From gitlab at gitlab.haskell.org Fri Nov 1 12:21:17 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 01 Nov 2024 08:21:17 -0400 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: rts/Disassembler: Fix encoding of BRK_FUN instruction Message-ID: <6724c7bd53d08_6d7396457081449b@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - 41ebe193 by doyougnu at 2024-11-01T08:20:54-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - da7326c3 by Kazuki Okamoto at 2024-11-01T08:20:58-04:00 No haddock markup in doctest line - - - - - 30 changed files: - compiler/GHC/Core/Make.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Tc/Types/Constraint.hs - compiler/GHC/Tc/Types/EvTerm.hs - libraries/ghc-internal/src/GHC/Internal/List.hs - libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs - rts/Disassembler.c - + testsuite/tests/codeGen/should_run/T25374/T25374.hs - + testsuite/tests/codeGen/should_run/T25374/T25374.script - + testsuite/tests/codeGen/should_run/T25374/T25374A.hs - + testsuite/tests/codeGen/should_run/T25374/all.T - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/simplCore/should_compile/T23864.hs - utils/check-exact/ExactPrint.hs - utils/check-exact/Parsers.hs - utils/check-exact/Transform.hs - utils/check-exact/Types.hs - utils/check-exact/Utils.hs - utils/check-ppr/Main.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/de769a1f4c04b304c2e97447f47595dc4f8bdbc2...da7326c3bfba011ca190c2fad21143db6b032477 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/de769a1f4c04b304c2e97447f47595dc4f8bdbc2...da7326c3bfba011ca190c2fad21143db6b032477 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 12:26:34 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Fri, 01 Nov 2024 08:26:34 -0400 Subject: [Git][ghc/ghc] Deleted branch wip/T23479 Message-ID: <6724c8fa4f863_6d739781e3c1649f@gitlab.mail> Serge S. Gulin deleted branch wip/T23479 at Glasgow Haskell Compiler / GHC -- You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 13:33:16 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Fri, 01 Nov 2024 09:33:16 -0400 Subject: [Git][ghc/ghc][wip/andreask/simd_test] 170 commits: base: Add `HasCallStack` constraint to `ioError` Message-ID: <6724d89c20e41_27f3152628d4479de@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/simd_test at Glasgow Haskell Compiler / GHC Commits: 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - 352cc3ac by Andreas Klebinger at 2024-11-01T14:12:55+01:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 23 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - CODEOWNERS - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/CmmToAsm/AArch64/CodeGen.hs - compiler/GHC/CmmToAsm/AArch64/Instr.hs - compiler/GHC/CmmToAsm/AArch64/Ppr.hs - compiler/GHC/CmmToAsm/Dwarf/Types.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b16b01f1f91821ff6920ecbfb8e702f27107b017...352cc3ac121681998fc13c9458644304010dbcf2 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b16b01f1f91821ff6920ecbfb8e702f27107b017...352cc3ac121681998fc13c9458644304010dbcf2 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 13:36:21 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Fri, 01 Nov 2024 09:36:21 -0400 Subject: [Git][ghc/ghc][wip/andreask/simd_test] Compile T25062 simd tests even if we can't run them. Message-ID: <6724d95562b3d_27f3153f378450828@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/simd_test at Glasgow Haskell Compiler / GHC Commits: 4ebd2cc0 by Andreas Klebinger at 2024-11-01T14:16:06+01:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 2 changed files: - testsuite/tests/simd/should_run/T25062_V64.hs - testsuite/tests/simd/should_run/all.T Changes: ===================================== testsuite/tests/simd/should_run/T25062_V64.hs ===================================== @@ -10,7 +10,7 @@ main = case foo ( \ x y -> plusDoubleX8# x y ) of v -> case unpackDoubleX8# v of (# d1, d2, d3, d4, d5, d6, d7, d8 #) -> - print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8s ] + print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8 ] {-# NOINLINE foo #-} foo :: ( DoubleX8# -> DoubleX8# -> DoubleX8# ) -> DoubleX8# ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -58,13 +58,26 @@ test('simd014', test('T22187', [],compile,['']) test('T22187_run', [],compile_and_run,['']) test('T25062_V16', [], compile_and_run, ['']) -test('T25062_V32', [ unless(have_cpu_feature('avx2'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 256 bit wide vectors - ] - , compile_and_run, ['']) -test('T25062_V64', [ unless(have_cpu_feature('avx512f'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 512 bit wide vectors - ] - , compile_and_run, ['']) + +# Even if the CPU we run on doesn't support *executing* those tests we should try to +# compile them. +# Currently even for compilation we only support 256+ bit on x86 +only_V32_plus_compilation_support = unless(arch('x86_64'), skip) + +test('T25062_V32' + , [ extra_hc_opts('-mavx2') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx2') else compile + , ['']) + +test('T25062_V64' + , [ extra_hc_opts('-mavx512f') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx512f') else compile + , ['']) test('T25169', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ebd2cc04c7c6ba6446800e4369c9f688650a2da -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ebd2cc04c7c6ba6446800e4369c9f688650a2da You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 13:39:47 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Fri, 01 Nov 2024 09:39:47 -0400 Subject: [Git][ghc/ghc][wip/andreask/expose-overloaded-docs] Apply 1 suggestion(s) to 1 file(s) Message-ID: <6724da23d00b9_27f31549b5ec52585@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/expose-overloaded-docs at Glasgow Haskell Compiler / GHC Commits: 890731c3 by Andreas Klebinger at 2024-11-01T13:39:45+00:00 Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1 changed file: - docs/users_guide/using-optimisation.rst Changes: ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -531,7 +531,7 @@ as such you shouldn't need to set any of them explicitly. A flag * Use of the magic `inline` function to force inlining. .. ghc-flag:: -fexpose-overloaded-unfoldings - :shortdesc: Expose function unfoldings whos type contains constraints, + :shortdesc: Expose function unfoldings whose type contains constraints, even for very large or recursive functions. :type: dynamic :reverse: -fno-expose-overloaded-unfoldings View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/890731c3dd4780d56804955d9089052de3604a96 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/890731c3dd4780d56804955d9089052de3604a96 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 13:40:43 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Fri, 01 Nov 2024 09:40:43 -0400 Subject: [Git][ghc/ghc][wip/andreask/expose-overloaded-docs] Reword -fexpose-overloaded-unfoldings docs. Message-ID: <6724da5b4b3af_27f3156448445397e@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/expose-overloaded-docs at Glasgow Haskell Compiler / GHC Commits: 064b92ff by Andreas Klebinger at 2024-11-01T14:20:16+01:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1 changed file: - docs/users_guide/using-optimisation.rst Changes: ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -531,7 +531,8 @@ as such you shouldn't need to set any of them explicitly. A flag * Use of the magic `inline` function to force inlining. .. ghc-flag:: -fexpose-overloaded-unfoldings - :shortdesc: Expose unfoldings carrying constraints, even for very large or recursive functions. + :shortdesc: Expose function unfoldings whose type contains constraints, + even for very large or recursive functions. :type: dynamic :reverse: -fno-expose-overloaded-unfoldings :category: @@ -541,19 +542,24 @@ as such you shouldn't need to set any of them explicitly. A flag This experimental flag is a slightly less heavy weight alternative to :ghc-flag:`-fexpose-all-unfoldings`. - Instead of exposing all functions it only aims at exposing constrained functions. + Instead of exposing all functions it exposes only those functions which + contain constraints within their type. This is intended to be used for cases where specialization is considered crucial but :ghc-flag:`-fexpose-all-unfoldings` imposes too much compile time cost. - Currently this won't expose unfoldings where a type class is hidden under a - newtype. That is for cases like: :: + This doesn't guarantee *all* functions which might benefit from specialization + will be exposed, for example currently this won't expose unfoldings where a + type class is hidden under a newtype. + + That is for cases like: :: newtype NT a = NT (Integral a => a) foo :: NT a -> T1 -> TR - GHC won't recognise `foo` as specialisable and won't expose the unfolding + GHC won't look under `NT` for constraints and therefore `foo` won't be + recognized as specialisable and this flag won't expose the unfolding even with :ghc-flag:`-fexpose-overloaded-unfoldings` enabled. All the other caveats about :ghc-flag:`-fexpose-overloaded-unfoldings` View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/064b92ff2424244573e7094cda6c4ea23f9a02d5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/064b92ff2424244573e7094cda6c4ea23f9a02d5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 13:49:44 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Fri, 01 Nov 2024 09:49:44 -0400 Subject: [Git][ghc/ghc][wip/andreask/base_c_fstat_refactor] 314 commits: Haddock: Add no-compilation flag Message-ID: <6724dc78dffb5_27f3157e011c592ee@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/base_c_fstat_refactor at Glasgow Haskell Compiler / GHC Commits: 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - 684b78ec by Andreas Klebinger at 2024-11-01T14:29:03+01:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - 0528a7b6 by Andreas Klebinger at 2024-11-01T14:29:08+01:00 Small cleanup around calls to fstat. Pulls out some common logic into a new fdWithCStat helper function. - - - - - 14 changed files: - .ghcid - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitmodules - CODEOWNERS - cabal.project-reinstall - compiler/CodeGen.Platform.h - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fc92fc9602731d840ef84f5bdc7b91dae7e671bd...0528a7b6bc7ad757975601bedb96ad70951f1225 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fc92fc9602731d840ef84f5bdc7b91dae7e671bd...0528a7b6bc7ad757975601bedb96ad70951f1225 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 13:52:28 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Fri, 01 Nov 2024 09:52:28 -0400 Subject: [Git][ghc/ghc][wip/andreask/base_c_fstat_refactor] Small cleanup around calls to fstat. Message-ID: <6724dd1ca7d3c_27f3157f6c1459471@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/base_c_fstat_refactor at Glasgow Haskell Compiler / GHC Commits: 3ae5ed83 by Andreas Klebinger at 2024-11-01T14:32:12+01:00 Small cleanup around calls to fstat. Pulls out some common logic into a new fdWithCStat helper function. - - - - - 6 changed files: - libraries/base/src/System/Posix/Internals.hs - libraries/ghc-internal/src/GHC/Internal/IO/FD.hs - libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== libraries/base/src/System/Posix/Internals.hs ===================================== @@ -27,4 +27,4 @@ module System.Posix.Internals ( module GHC.Internal.System.Posix.Internals -- TODO: deprecate ) where -import GHC.Internal.System.Posix.Internals +import GHC.Internal.System.Posix.Internals hiding (fdWithCStat) ===================================== libraries/ghc-internal/src/GHC/Internal/IO/FD.hs ===================================== @@ -57,7 +57,6 @@ import GHC.Internal.Foreign.Storable import GHC.Internal.Foreign.C.Types import GHC.Internal.Foreign.C.Error import GHC.Internal.Foreign.Marshal.Utils -import GHC.Internal.Foreign.Marshal.Alloc (allocaBytes) import qualified GHC.Internal.System.Posix.Internals import GHC.Internal.System.Posix.Internals hiding (FD, setEcho, getEcho) @@ -470,9 +469,7 @@ setNonBlockingMode fd set = do is_nonblock <- if set then do - allocaBytes sizeof_stat $ \ p_stat -> do - throwErrnoIfMinus1Retry_ "fileSize" $ - c_fstat (fdFD fd) p_stat + fdWithCStat (fdFD fd) $ \ p_stat -> do fd_type <- statGetType_maybe p_stat pure $ fd_type /= Just RegularFile && fd_type /= Just RawDevice else pure False ===================================== libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs ===================================== @@ -105,11 +105,16 @@ type FD = CInt -- --------------------------------------------------------------------------- -- stat()-related stuff -fdFileSize :: FD -> IO Integer -fdFileSize fd = +fdWithCStat :: FD -> (Ptr CStat -> IO a) -> IO a +fdWithCStat fd fun = do allocaBytes sizeof_stat $ \ p_stat -> do throwErrnoIfMinus1Retry_ "fileSize" $ - c_fstat fd p_stat + c_fstat fd p_stat + fun p_stat + +fdFileSize :: FD -> IO Integer +fdFileSize fd = + fdWithCStat fd $ \ p_stat -> do c_mode <- st_mode p_stat :: IO CMode if not (s_isreg c_mode) then return (-1) @@ -129,9 +134,7 @@ fileType file = -- referring to file handles. i.e., it'll fail for socket FDs. fdStat :: FD -> IO (IODeviceType, CDev, CIno) fdStat fd = - allocaBytes sizeof_stat $ \ p_stat -> do - throwErrnoIfMinus1Retry_ "fdType" $ - c_fstat fd p_stat + fdWithCStat fd $ \ p_stat -> do ty <- statGetType p_stat dev <- st_dev p_stat ino <- st_ino p_stat ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -10554,7 +10554,6 @@ module System.Posix.Internals where fdFileSize :: FD -> GHC.Types.IO GHC.Num.Integer.Integer fdGetMode :: FD -> GHC.Types.IO GHC.Internal.IO.IOMode.IOMode fdStat :: FD -> GHC.Types.IO (GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) - fdStat_maybe :: FD -> GHC.Types.IO (GHC.Internal.Maybe.Maybe GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) fdType :: FD -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType fileType :: GHC.Internal.IO.FilePath -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType getEcho :: FD -> GHC.Types.IO GHC.Types.Bool ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -13595,7 +13595,6 @@ module System.Posix.Internals where fdFileSize :: FD -> GHC.Types.IO GHC.Num.Integer.Integer fdGetMode :: FD -> GHC.Types.IO GHC.Internal.IO.IOMode.IOMode fdStat :: FD -> GHC.Types.IO (GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) - fdStat_maybe :: FD -> GHC.Types.IO (GHC.Internal.Maybe.Maybe GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) fdType :: FD -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType fileType :: GHC.Internal.IO.FilePath -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType getEcho :: FD -> GHC.Types.IO GHC.Types.Bool ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -10554,7 +10554,6 @@ module System.Posix.Internals where fdFileSize :: FD -> GHC.Types.IO GHC.Num.Integer.Integer fdGetMode :: FD -> GHC.Types.IO GHC.Internal.IO.IOMode.IOMode fdStat :: FD -> GHC.Types.IO (GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) - fdStat_maybe :: FD -> GHC.Types.IO (GHC.Internal.Maybe.Maybe GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) fdType :: FD -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType fileType :: GHC.Internal.IO.FilePath -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType getEcho :: FD -> GHC.Types.IO GHC.Types.Bool View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3ae5ed832e308d0b89bf7d13fc48f7d1e6491d17 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3ae5ed832e308d0b89bf7d13fc48f7d1e6491d17 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 14:47:58 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 01 Nov 2024 10:47:58 -0400 Subject: [Git][ghc/ghc][wip/T23210] 121 commits: users-guide: Document GHCi :where command Message-ID: <6724ea1ecd17d_110b56ff24481f7@gitlab.mail> Ben Gamari pushed to branch wip/T23210 at Glasgow Haskell Compiler / GHC Commits: 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - d17004e2 by Ben Gamari at 2024-11-01T10:47:32-04:00 rts: Tighten up invariants of PACK - - - - - 82b6de36 by Ben Gamari at 2024-11-01T10:47:47-04:00 StgToByteCode: Don't assume that data con workers are nullary Previously StgToByteCode assumed that all data-con workers were of a nullary representation. This is not a valid assumption, as seen in #23210, where an unsaturated application of a unary data constructor's worker resulted in invalid bytecode. Sadly, I have not yet been able to reduce a minimal testcase for this. Fixes #23210. - - - - - a65c9a5f by Ben Gamari at 2024-11-01T10:47:49-04:00 StgToByteCode: Fix handling of Addr# literals Previously we assumed that all unlifted types were Addr#. - - - - - f0c2839d by Ben Gamari at 2024-11-01T10:47:49-04:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - f6413566 by Ben Gamari at 2024-11-01T10:47:49-04:00 testsuite: Mark T23146* as unbroken - - - - - 24 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - CODEOWNERS - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/CmmToAsm/Dwarf/Types.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/92ef24a491912774eac21d9255a1551352b840d8...f641356616a30753abb2c5e9a6d136532d5407d8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/92ef24a491912774eac21d9255a1551352b840d8...f641356616a30753abb2c5e9a6d136532d5407d8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 15:37:05 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 01 Nov 2024 11:37:05 -0400 Subject: [Git][ghc/ghc] Pushed new branch wip/T25438 Message-ID: <6724f5a16d6db_110b563e62dc20245@gitlab.mail> Ben Gamari pushed new branch wip/T25438 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25438 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 15:40:24 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 01 Nov 2024 11:40:24 -0400 Subject: [Git][ghc/ghc][wip/T24382] 118 commits: users-guide: Document GHCi :where command Message-ID: <6724f6688d232_110b563e312c220a7@gitlab.mail> Ben Gamari pushed to branch wip/T24382 at Glasgow Haskell Compiler / GHC Commits: 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - 073615ec by Ben Gamari at 2024-11-01T11:34:16-04:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - ca5e9f15 by Ben Gamari at 2024-11-01T11:38:55-04:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Fixes #24382. - - - - - 24 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - CODEOWNERS - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/CmmToAsm/Dwarf/Types.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/680d1e4a28375f47b3161bc772a1408d954f8221...ca5e9f15198912d6a9ca3bf7e426a67b36691b7e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/680d1e4a28375f47b3161bc772a1408d954f8221...ca5e9f15198912d6a9ca3bf7e426a67b36691b7e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 16:05:36 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Fri, 01 Nov 2024 12:05:36 -0400 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <6724fc503a47c_a1141d4a6c20316@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: bd198fdb by Sjoerd Visscher at 2024-11-01T17:05:13+01:00 Multiplicity annotation on records - - - - - 27 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs Changes: ===================================== compiler/GHC/Hs/Type.hs ===================================== @@ -24,10 +24,10 @@ GHC.Hs.Type: Abstract syntax: user-defined types module GHC.Hs.Type ( Mult, HsScaled(..), - hsMult, hsScaledThing, - HsArrow, HsArrowOf(..), arrowToHsType, expandHsArrow, + hsMultIsLinear, hsScaledThing, hsScaledToHsTypes, + HsArrow, HsArrowOf(..), HsUnrestrictedArrowUse(..), arrowToHsType, expandHsArrow, EpLinearArrow(..), - hsLinear, hsUnrestricted, isUnrestricted, + hsLinear, hsUnrestricted, hsNoMultAnn, isUnrestricted, pprHsArrow, HsType(..), HsCoreTy, LHsType, HsKind, LHsKind, @@ -539,13 +539,19 @@ hsLinear = HsScaled (HsLinearArrow x) GhcTc -> noExtField hsUnrestricted :: forall p a. IsPass p => a -> HsScaled (GhcPass p) a -hsUnrestricted = HsScaled (HsUnrestrictedArrow x) +hsUnrestricted = hsNoMultAnn HsArrowUseOther + +hsNoMultAnn :: forall p a. IsPass p => HsUnrestrictedArrowUse -> a -> HsScaled (GhcPass p) a +hsNoMultAnn t = HsScaled (HsUnrestrictedArrow t x) where x = case ghcPass @p of GhcPs -> noAnn GhcRn -> noExtField GhcTc -> noExtField +hsScaledToHsTypes :: (a -> LHsType GhcRn) -> HsScaled GhcRn a -> [LHsType GhcRn] +hsScaledToHsTypes f (HsScaled arr x) = [arrowToHsType arr, f x] + isUnrestricted :: HsArrow GhcRn -> Bool isUnrestricted (arrowToHsType -> L _ (HsTyVar _ _ (L _ n))) = n == manyDataConName isUnrestricted _ = False @@ -557,7 +563,8 @@ arrowToHsType = expandHsArrow (HsTyVar noAnn NotPromoted) -- erases the information of whether the programmer wrote an explicit -- multiplicity or a shorthand. expandHsArrow :: (LocatedN Name -> t GhcRn) -> HsArrowOf (LocatedA (t GhcRn)) GhcRn -> LocatedA (t GhcRn) -expandHsArrow mk_var (HsUnrestrictedArrow _) = noLocA (mk_var (noLocA manyDataConName)) +expandHsArrow mk_var (HsUnrestrictedArrow HsRecFieldAnn _) = noLocA (mk_var (noLocA oneDataConName)) +expandHsArrow mk_var (HsUnrestrictedArrow _ _) = noLocA (mk_var (noLocA manyDataConName)) expandHsArrow mk_var (HsLinearArrow _) = noLocA (mk_var (noLocA oneDataConName)) expandHsArrow _mk_var (HsExplicitMult _ p) = p @@ -568,7 +575,7 @@ instance -- See #18846 pprHsArrow :: (Outputable mult, OutputableBndrId pass) => HsArrowOf mult (GhcPass pass) -> SDoc -pprHsArrow (HsUnrestrictedArrow _) = pprArrowWithMultiplicity visArgTypeLike (Left False) +pprHsArrow (HsUnrestrictedArrow _ _) = pprArrowWithMultiplicity visArgTypeLike (Left False) pprHsArrow (HsLinearArrow _) = pprArrowWithMultiplicity visArgTypeLike (Left True) pprHsArrow (HsExplicitMult _ p) = pprArrowWithMultiplicity visArgTypeLike (Right (ppr p)) @@ -577,7 +584,16 @@ type instance XXConDeclField (GhcPass _) = DataConCantHappen instance OutputableBndrId p => Outputable (ConDeclField (GhcPass p)) where - ppr (ConDeclField _ fld_n fld_ty _) = ppr fld_n <+> dcolon <+> ppr fld_ty + ppr (ConDeclField _ fld_n (HsScaled fld_mult fld_ty) _) = ppr_names fld_n <+> ppr_mult <+> ppr fld_ty + where + ppr_names :: [LFieldOcc (GhcPass p)] -> SDoc + ppr_names [n] = pprPrefixOcc n + ppr_names ns = sep (punctuate comma (map pprPrefixOcc ns)) + + ppr_mult = case fld_mult of + HsUnrestrictedArrow _ _ -> dcolon + HsLinearArrow _ -> text "%1" <+> dcolon + HsExplicitMult _ p -> text "%" <> ppr p <+> dcolon --------------------- hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name] @@ -1359,13 +1375,9 @@ pprConDeclFields :: forall p. OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields))) where - ppr_fld (L _ (ConDeclField { cd_fld_names = ns, cd_fld_type = ty, - cd_fld_doc = doc })) - = pprMaybeWithDoc doc (ppr_names ns <+> dcolon <+> ppr ty) - - ppr_names :: forall p. OutputableBndrId p => [LFieldOcc (GhcPass p)] -> SDoc - ppr_names [n] = pprPrefixOcc n - ppr_names ns = sep (punctuate comma (map pprPrefixOcc ns)) + ppr_fld :: LConDeclField (GhcPass p) -> SDoc + ppr_fld (L _ (cdf at ConDeclField { cd_fld_doc = doc })) + = pprMaybeWithDoc doc (ppr cdf) -- Printing works more-or-less as for Types ===================================== compiler/GHC/Hs/Utils.hs ===================================== @@ -623,7 +623,7 @@ nlHsParTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) nlHsAppTy f t = noLocA (HsAppTy noExtField f t) nlHsTyVar p x = noLocA (HsTyVar noAnn p (noLocA x)) -nlHsFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow x) a b) +nlHsFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther x) a b) where x = case ghcPass @p of GhcPs -> noAnn ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -2870,10 +2870,7 @@ repGadtDataCons cons details res_ty verifyLinearFields :: [HsScaled GhcRn (LHsType GhcRn)] -> MetaM () verifyLinearFields ps = do linear <- lift $ xoptM LangExt.LinearTypes - let allGood = all (\st -> case hsMult st of - HsUnrestrictedArrow _ -> not linear - HsLinearArrow _ -> True - _ -> False) ps + let allGood = all (hsMultIsLinear linear) ps unless allGood $ notHandled ThNonLinearDataCon -- Desugar the arguments in a data constructor declared with prefix syntax. @@ -2886,11 +2883,13 @@ repPrefixConArgs ps = do -- Desugar the arguments in a data constructor declared with record syntax. repRecConArgs :: LocatedL [LConDeclField GhcRn] -> MetaM (Core [M TH.VarBangType]) -repRecConArgs ips = do - args <- concatMapM rep_ip (unLoc ips) +repRecConArgs lips = do + let ips = map unLoc (unLoc lips) + verifyLinearFields (map cd_fld_type ips) + args <- concatMapM rep_ip ips coreListM varBangTypeTyConName args where - rep_ip (L _ ip) = mapM (rep_one_ip (cd_fld_type ip)) (cd_fld_names ip) + rep_ip ip = mapM (rep_one_ip (hsScaledThing $ cd_fld_type ip)) (cd_fld_names ip) rep_one_ip :: LBangType GhcRn -> LFieldOcc GhcRn -> MetaM (Core (M TH.VarBangType)) rep_one_ip t n = do { MkC v <- lookupOcc (unLoc . foLabel $ unLoc n) ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -2000,7 +2000,7 @@ instance HiePass p => ToHie (LocatedC [LocatedA (HsExpr (GhcPass p))]) where instance ToHie (LocatedA (ConDeclField GhcRn)) where toHie (L span field) = concatM $ makeNode field (locA span) : case field of ConDeclField _ fields typ doc -> - [ toHie $ map (RFC RecFieldDecl (getRealSpan $ getHasLoc typ)) fields + [ toHie $ map (RFC RecFieldDecl (getRealSpan $ getHasLoc $ hsScaledThing typ)) fields , toHie typ , toHie doc ] ===================================== compiler/GHC/Parser.y ===================================== @@ -2260,7 +2260,7 @@ type :: { LHsType GhcPs } -- See Note [%shift: type -> btype] : btype %shift { $1 } | btype '->' ctype {% amsA' (sLL $1 $> - $ HsFunTy noExtField (HsUnrestrictedArrow (epUniTok $2)) $1 $3) } + $ HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther (epUniTok $2)) $1 $3) } | btype mult '->' ctype {% hintLinear (getLoc $2) >> let arr = (unLoc $2) (epUniTok $3) @@ -2597,7 +2597,12 @@ fielddecl :: { LConDeclField GhcPs } {% amsA' (L (comb2 $1 $3) (ConDeclField (epUniTok $2) (reverse (map (\ln@(L l n) - -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) $3 Nothing))} + -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) (hsNoMultAnn HsRecFieldAnn $3) Nothing))} + | sig_vars PREFIX_PERCENT atype '::' ctype + {% amsA' (L (comb4 $1 $2 $3 $5) + (ConDeclField (epUniTok $4) + (reverse (map (\ln@(L l n) + -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) (mkMultField (epTok $2) $3 (epUniTok $4) $5) Nothing))} -- Reversed! maybe_derivings :: { Located (HsDeriving GhcPs) } @@ -2661,7 +2666,7 @@ There's an awkward overlap with a type signature. Consider decl_no_th :: { LHsDecl GhcPs } : sigdecl { $1 } - | infixexp opt_sig rhs {% runPV (unECP $1) >>= \ $1 -> + | infixexp opt_sig rhs {% runPV (unECP $1) >>= \ $1 -> do { let { l = comb2 $1 $> } ; r <- checkValDef l $1 (HsNoMultAnn noExtField, $2) $3; -- Depending upon what the pattern looks like we might get either @@ -2669,7 +2674,7 @@ decl_no_th :: { LHsDecl GhcPs } -- [FunBind vs PatBind] ; !cs <- getCommentsFor l ; return $! (sL (commentsA l cs) $ ValD noExtField r) } } - | PREFIX_PERCENT atype infixexp opt_sig rhs {% runPV (unECP $3) >>= \ $3 -> + | PREFIX_PERCENT atype infixexp opt_sig rhs {% runPV (unECP $3) >>= \ $3 -> do { let { l = comb2 $1 $> } ; r <- checkValDef l $3 (mkMultAnn (epTok $1) $2, $4) $5; -- parses bindings of the form %p x or @@ -2855,7 +2860,7 @@ infixexp2 :: { ECP } withArrowParsingMode' $ \mode -> unECP $1 >>= \ $1 -> unECP $3 >>= \ $3 -> - let arr = HsUnrestrictedArrow (epUniTok $2) + let arr = HsUnrestrictedArrow HsArrowUseOther (epUniTok $2) in mkHsArrowPV (comb2 $1 $>) mode $1 arr $3 } | infixexp expmult '->' infixexp2 { ECP $ ===================================== compiler/GHC/Parser/PostProcess.hs ===================================== @@ -71,6 +71,7 @@ module GHC.Parser.PostProcess ( UnpackednessPragma(..), mkMultTy, mkMultAnn, + mkMultField, -- Token location mkTokenLocation, @@ -805,7 +806,7 @@ mkGadtDecl loc names dcol ty = do case body_ty of L ll (HsFunTy _ hsArr (L (EpAnn anc _ cs) (HsRecTy an rf)) res_ty) -> do arr <- case hsArr of - HsUnrestrictedArrow arr -> return arr + HsUnrestrictedArrow _ arr -> return arr _ -> do addError $ mkPlainErrorMsgEnvelope (getLocA body_ty) $ (PsErrIllegalGadtRecordMultiplicity hsArr) return noAnn @@ -2071,7 +2072,7 @@ instance DisambECP (PatBuilder GhcPs) where where tok :: TokRarrow tok = case arr of - HsUnrestrictedArrow x -> x + HsUnrestrictedArrow _ x -> x _ -> -- unreachable case because in Parser.y the reduction rules for -- (a %m -> b) and (a ->. b) use ArrowIsFunType panic "mkHsArrowPV ArrowIsViewPat: expected HsUnrestrictedArrow" @@ -3518,6 +3519,9 @@ mkMultAnn pct t@(L _ (HsTyLit _ (HsNumTy (SourceText (unpackFS -> "1")) 1))) pct1 = epTokenWidenR pct (locA (getLoc t)) mkMultAnn pct t = HsMultAnn pct t +mkMultField :: EpToken "%" -> LHsType GhcPs -> TokDcolon -> LHsType GhcPs -> HsScaled GhcPs (LBangType GhcPs) +mkMultField pct mult (EpUniTok l u) t = HsScaled (mkMultTy pct mult (EpUniTok l u)) t + mkTokenLocation :: SrcSpan -> TokenLocation mkTokenLocation (UnhelpfulSpan _) = NoTokenLoc mkTokenLocation (RealSrcSpan r mb) = TokenLoc (EpaSpan (RealSrcSpan r mb)) ===================================== compiler/GHC/Rename/HsType.hs ===================================== @@ -451,10 +451,14 @@ rnLHsTypes :: HsDocContext -> [LHsType GhcPs] -> RnM ([LHsType GhcRn], FreeVars) rnLHsTypes doc tys = mapFvRn (rnLHsType doc) tys rnScaledLHsType :: HsDocContext -> HsScaled GhcPs (LHsType GhcPs) - -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) -rnScaledLHsType doc (HsScaled w ty) = do - (w' , fvs_w) <- rnHsArrow (mkTyKiEnv doc TypeLevel RnTypeBody) w - (ty', fvs) <- rnLHsType doc ty + -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) +rnScaledLHsType doc = rnScaledLHsTyKi (mkTyKiEnv doc TypeLevel RnTypeBody) + +rnScaledLHsTyKi :: RnTyKiEnv -> HsScaled GhcPs (LHsType GhcPs) + -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) +rnScaledLHsTyKi env (HsScaled w ty) = do + (w' , fvs_w) <- rnHsArrow env w + (ty', fvs) <- rnLHsTyKi env ty return (HsScaled w' ty', fvs `plusFV` fvs_w) @@ -709,7 +713,7 @@ rnHsArrow env = rnHsArrowWith (rnLHsTyKi env) rnHsArrowWith :: (LocatedA (mult GhcPs) -> RnM (LocatedA (mult GhcRn), FreeVars)) -> HsArrowOf (LocatedA (mult GhcPs)) GhcPs -> RnM (HsArrowOf (LocatedA (mult GhcRn)) GhcRn, FreeVars) -rnHsArrowWith _rn (HsUnrestrictedArrow _) = pure (HsUnrestrictedArrow noExtField, emptyFVs) +rnHsArrowWith _rn (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField, emptyFVs) rnHsArrowWith _rn (HsLinearArrow _) = pure (HsLinearArrow noExtField, emptyFVs) rnHsArrowWith rn (HsExplicitMult _ p) = (\(mult, fvs) -> (HsExplicitMult noExtField mult, fvs)) <$> rn p @@ -1334,7 +1338,7 @@ rnField :: FastStringEnv FieldLabel -> RnTyKiEnv -> LConDeclField GhcPs -> RnM (LConDeclField GhcRn, FreeVars) rnField fl_env env (L l (ConDeclField _ names ty haddock_doc)) = do { let new_names = map (fmap (lookupField fl_env)) names - ; (new_ty, fvs) <- rnLHsTyKi env ty + ; (new_ty, fvs) <- rnScaledLHsTyKi env ty ; haddock_doc' <- traverse rnLHsDoc haddock_doc ; return (L l (ConDeclField noAnn new_names new_ty haddock_doc') , fvs) } @@ -2030,7 +2034,7 @@ extractConDeclGADTDetailsTyVars :: HsConDeclGADTDetails GhcPs -> FreeKiTyVars -> FreeKiTyVars extractConDeclGADTDetailsTyVars con_args = case con_args of PrefixConGADT _ args -> extract_scaled_ltys args - RecConGADT _ (L _ flds) -> extract_ltys $ map (cd_fld_type . unLoc) $ flds + RecConGADT _ (L _ flds) -> extract_scaled_ltys $ map (cd_fld_type . unLoc) $ flds -- | Get type/kind variables mentioned in the kind signature, preserving -- left-to-right order: @@ -2062,7 +2066,7 @@ extract_lty (L _ ty) acc = case ty of HsTyVar _ _ ltv -> extract_tv ltv acc HsBangTy _ _ ty -> extract_lty ty acc - HsRecTy _ flds -> foldr (extract_lty + HsRecTy _ flds -> foldr (extract_scaled_lty . cd_fld_type . unLoc) acc flds HsAppTy _ ty1 ty2 -> extract_lty ty1 $ @@ -2119,6 +2123,10 @@ extract_hs_arrow :: HsArrow GhcPs -> FreeKiTyVars -> extract_hs_arrow (HsExplicitMult _ p) acc = extract_lty p acc extract_hs_arrow _ acc = acc +extract_hs_mult_ann :: HsMultAnn GhcPs -> FreeKiTyVars -> FreeKiTyVars +extract_hs_mult_ann (HsMultAnn _ p) acc = extract_lty p acc +extract_hs_mult_ann _ acc = acc + extract_hs_for_all_telescope :: HsForAllTelescope GhcPs -> FreeKiTyVars -- Accumulator -> FreeKiTyVars -- Free in body ===================================== compiler/GHC/Rename/Pat.hs ===================================== @@ -1432,7 +1432,7 @@ rn_ty_pat ty@(XHsType{}) = do liftRnFV $ rnHsType ctxt ty rn_ty_pat_arrow :: HsArrow GhcPs -> TPRnM (HsArrow GhcRn) -rn_ty_pat_arrow (HsUnrestrictedArrow _) = pure (HsUnrestrictedArrow noExtField) +rn_ty_pat_arrow (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField) rn_ty_pat_arrow (HsLinearArrow _) = pure (HsLinearArrow noExtField) rn_ty_pat_arrow (HsExplicitMult _ p) = rn_lty_pat p <&> (\mult -> HsExplicitMult noExtField mult) ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -985,7 +985,7 @@ expr_to_type earg = ; return (L l (HsFunTy noExtField mult' arg' res'))} where go_arrow :: HsArrowOf (LHsExpr GhcRn) GhcRn -> TcM (HsArrow GhcRn) - go_arrow (HsUnrestrictedArrow{}) = pure (HsUnrestrictedArrow noExtField) + go_arrow (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField) go_arrow (HsLinearArrow{}) = pure (HsLinearArrow noExtField) go_arrow (HsExplicitMult _ exp) = HsExplicitMult noExtField <$> go exp go (L l (HsForAll _ tele expr)) = ===================================== compiler/GHC/Tc/Gen/HsType.hs ===================================== @@ -1126,7 +1126,7 @@ tcHsType mode (HsFunTy _ mult ty1 ty2) exp_kind tcHsType mode (HsOpTy _ _ ty1 (L _ op) ty2) exp_kind | op `hasKey` unrestrictedFunTyConKey - = tc_fun_type mode (HsUnrestrictedArrow noExtField) ty1 ty2 exp_kind + = tc_fun_type mode (HsUnrestrictedArrow HsArrowUseOther noExtField) ty1 ty2 exp_kind --------- Foralls tcHsType mode t@(HsForAllTy { hst_tele = tele, hst_body = ty }) exp_kind ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -283,7 +283,7 @@ no_anon_wc_ty lty = go lty HsKindSig _ ty kind -> go ty && go kind HsDocTy _ ty _ -> go ty HsBangTy _ _ ty -> go ty - HsRecTy _ flds -> gos $ map (cd_fld_type . unLoc) flds + HsRecTy _ flds -> gos $ concatMap (hsScaledToHsTypes id . cd_fld_type . unLoc) flds HsExplicitListTy _ _ tys -> gos tys HsExplicitTupleTy _ tys -> gos tys HsForAllTy { hst_tele = tele ===================================== compiler/GHC/Tc/TyCl.hs ===================================== @@ -1801,11 +1801,11 @@ kcTyClDecl (FamDecl _ (FamilyDecl { fdInfo = fd_info })) fam_tc -- the first two arguments. kcConArgTys :: NewOrData -> TcKind -> [HsScaled GhcRn (LHsType GhcRn)] -> TcM () kcConArgTys new_or_data res_kind arg_tys = do - { let exp_kind = getArgExpKind new_or_data res_kind - ; forM_ arg_tys (\(HsScaled mult ty) -> do _ <- tcCheckLHsTypeInContext (getBangType ty) exp_kind - tcMult mult) + let exp_kind = getArgExpKind new_or_data res_kind + forM_ arg_tys $ + \case + HsScaled mult ty -> tcCheckLHsTypeInContext (getBangType ty) exp_kind >> tcMult mult -- See Note [Implementation of UnliftedNewtypes], STEP 2 - } -- Kind-check the types of arguments to a Haskell98 data constructor. kcConH98Args :: NewOrData -> TcKind -> HsConDeclH98Details GhcRn -> TcM () @@ -1813,14 +1813,14 @@ kcConH98Args new_or_data res_kind con_args = case con_args of PrefixCon _ tys -> kcConArgTys new_or_data res_kind tys InfixCon ty1 ty2 -> kcConArgTys new_or_data res_kind [ty1, ty2] RecCon (L _ flds) -> kcConArgTys new_or_data res_kind $ - map (hsLinear . cd_fld_type . unLoc) flds + map (cd_fld_type . unLoc) flds -- Kind-check the types of arguments to a GADT data constructor. kcConGADTArgs :: NewOrData -> TcKind -> HsConDeclGADTDetails GhcRn -> TcM () kcConGADTArgs new_or_data res_kind con_args = case con_args of PrefixConGADT _ tys -> kcConArgTys new_or_data res_kind tys RecConGADT _ (L _ flds) -> kcConArgTys new_or_data res_kind $ - map (hsLinear . cd_fld_type . unLoc) flds + map (cd_fld_type . unLoc) flds kcConDecls :: Foldable f => NewOrData @@ -3939,14 +3939,14 @@ tcRecConDeclFields exp_kind fields = mapM (tcConArg exp_kind) btys where -- We need a one-to-one mapping from field_names to btys - combined = map (\(L _ f) -> (cd_fld_names f,hsLinear (cd_fld_type f))) + combined = map (\(L _ f) -> (cd_fld_names f, cd_fld_type f)) (unLoc fields) explode (ns,ty) = zip ns (repeat ty) exploded = concatMap explode combined (_,btys) = unzip exploded tcDataConMult :: HsArrow GhcRn -> TcM Mult -tcDataConMult arr@(HsUnrestrictedArrow _) = do +tcDataConMult arr@(HsUnrestrictedArrow HsArrowUseOther _) = do -- See Note [Function arrows in GADT constructors] linearEnabled <- xoptM LangExt.LinearTypes if linearEnabled then tcMult arr else return oneDataConTy ===================================== compiler/GHC/ThToHs.hs ===================================== @@ -792,7 +792,7 @@ cvt_id_arg parent_con (i, str, ty) { cd_fld_ext = noAnn , cd_fld_names = [L (l2l li) $ FieldOcc noExtField (L li i')] - , cd_fld_type = ty' + , cd_fld_type = hsNoMultAnn HsRecFieldAnn ty' , cd_fld_doc = Nothing} } cvtDerivs :: [TH.DerivClause] -> CvtM (HsDeriving GhcPs) @@ -1690,7 +1690,7 @@ cvtTypeKind typeOrKind ty _ -> return $ parenthesizeHsType sigPrec x' let y'' = parenthesizeHsType sigPrec y' - returnLA (HsFunTy noExtField (HsUnrestrictedArrow noAnn) x'' y'') + returnLA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noAnn) x'' y'') | otherwise -> do { fun_tc <- returnLA $ getRdrName unrestrictedFunTyCon ; mk_apps (HsTyVar noAnn NotPromoted fun_tc) tys' } @@ -1857,7 +1857,7 @@ hsTypeToArrow :: LHsType GhcPs -> HsArrow GhcPs hsTypeToArrow w = case unLoc w of HsTyVar _ _ (L _ (isExact_maybe -> Just n)) | n == oneDataConName -> HsLinearArrow noAnn - | n == manyDataConName -> HsUnrestrictedArrow noAnn + | n == manyDataConName -> HsUnrestrictedArrow HsArrowUseOther noAnn _ -> HsExplicitMult noAnn w -- ConT/InfixT can contain both data constructor (i.e., promoted) names and ===================================== compiler/Language/Haskell/Syntax/Type.hs ===================================== @@ -21,8 +21,9 @@ GHC.Hs.Type: Abstract syntax: user-defined types -- See Note [Language.Haskell.Syntax.* Hierarchy] for why not GHC.Hs.* module Language.Haskell.Syntax.Type ( HsScaled(..), - hsMult, hsScaledThing, - HsArrow, HsArrowOf(..), XUnrestrictedArrow, XLinearArrow, XExplicitMult, XXArrow, + hsMultIsLinear, hsScaledThing, + HsArrow, HsArrowOf(..), HsUnrestrictedArrowUse(..), + XUnrestrictedArrow, XLinearArrow, XExplicitMult, XXArrow, HsType(..), LHsType, HsKind, LHsKind, HsBndrVis(..), XBndrRequired, XBndrInvisible, XXBndrVis, @@ -78,7 +79,7 @@ import Data.Maybe import Data.Eq import Data.Bool import Data.Char -import Prelude (Integer) +import Prelude (Integer, Functor) import Data.Ord (Ord) {- @@ -938,9 +939,12 @@ data HsTyLit pass type HsArrow pass = HsArrowOf (LHsType pass) pass +data HsUnrestrictedArrowUse = HsRecFieldAnn | HsArrowUseOther + deriving (Eq, Ord, Data) + -- | Denotes the type of arrows in the surface language data HsArrowOf mult pass - = HsUnrestrictedArrow !(XUnrestrictedArrow mult pass) + = HsUnrestrictedArrow HsUnrestrictedArrowUse !(XUnrestrictedArrow mult pass) -- ^ a -> b or a → b | HsLinearArrow !(XLinearArrow mult pass) @@ -962,9 +966,13 @@ type family XXArrow mult p -- | This is used in the syntax. In constructor declaration. It must keep the -- arrow representation. data HsScaled pass a = HsScaled (HsArrow pass) a + deriving (Functor) -hsMult :: HsScaled pass a -> HsArrow pass -hsMult (HsScaled m _) = m +hsMultIsLinear :: Bool -> HsScaled pass a -> Bool +hsMultIsLinear _ (HsScaled (HsUnrestrictedArrow HsRecFieldAnn _) _) = True +hsMultIsLinear linear (HsScaled HsUnrestrictedArrow{} _) = not linear +hsMultIsLinear _ (HsScaled HsLinearArrow{} _) = True +hsMultIsLinear _ _ = False hsScaledThing :: HsScaled pass a -> a hsScaledThing (HsScaled _ t) = t @@ -1072,7 +1080,7 @@ data ConDeclField pass -- Record fields have Haddock docs on them = ConDeclField { cd_fld_ext :: XConDeclField pass, cd_fld_names :: [LFieldOcc pass], -- ^ See Note [ConDeclField pass] - cd_fld_type :: LBangType pass, + cd_fld_type :: HsScaled pass (LBangType pass), cd_fld_doc :: Maybe (LHsDoc pass)} | XConDeclField !(XXConDeclField pass) ===================================== testsuite/tests/linear/should_compile/NonLinearRecord.hs ===================================== @@ -0,0 +1,15 @@ +{-# LANGUAGE LinearTypes, DataKinds #-} +module NonLinearRecord where + +import GHC.Exts (Multiplicity(..)) + +data C = C { linC %1 :: Int, urC %'Many :: Char, noC :: Bool } + +data G where + G :: { linG %1 :: Int, urG %'Many :: Char, noG :: Bool } -> G + +testC :: Int %1 -> Char -> Bool %1 -> C +testC x y z = C x y z + +testG :: Int %1 -> Char -> Bool %1 -> G +testG x y z = G x y z ===================================== testsuite/tests/linear/should_compile/all.T ===================================== @@ -47,3 +47,4 @@ test('LinearLet', normal, compile, ['']) test('LinearLetPoly', normal, compile, ['']) test('LinearListComprehension', normal, compile, ['-dlinear-core-lint']) test('OmitFieldPat', normal, compile, ['-dcore-lint']) +test('NonLinearRecord', normal, compile, ['']) \ No newline at end of file ===================================== testsuite/tests/linear/should_fail/LinearRecFieldMany.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE LinearTypes, DataKinds #-} +module LinearRecFieldMany where + +import GHC.Exts (Multiplicity(..)) + +data C = C { urC %'Many :: Int } + +test :: Int %1 -> C +test = C ===================================== testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr ===================================== @@ -0,0 +1,6 @@ +LinearRecFieldMany.hs:9:8: [GHC-83865] + Couldn't match type ‘Many’ with ‘One’ + Expected: Int %1 -> C + Actual: Int -> C + In the expression: C + In an equation for ‘test’: test = C ===================================== testsuite/tests/linear/should_fail/all.T ===================================== @@ -34,6 +34,7 @@ test('LinearFFI', normal, compile_fail, ['']) test('LinearTHFail', normal, compile_fail, ['']) test('LinearTHFail2', normal, compile_fail, ['']) test('LinearTHFail3', normal, compile_fail, ['']) +test('LinearRecFieldMany', normal, compile_fail, ['']) test('T18888', normal, compile_fail, ['']) test('T18888_datakinds', normal, compile_fail, ['']) test('T19120', normal, compile_fail, ['']) ===================================== utils/check-exact/ExactPrint.hs ===================================== @@ -4437,6 +4437,10 @@ instance (ExactPrint a) => ExactPrint (HsScaled GhcPs a) where t' <- markAnnotated t arr' <- markArrow arr return (HsScaled arr' t') + exact (HsRecFieldScaled mult t) = do + t' <- markAnnotated t + mult' <- exact mult + return (HsRecFieldScaled mult' t') -- --------------------------------------------------------------------- ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs ===================================== @@ -298,14 +298,14 @@ ppCtor sDocContext dat subdocs con at ConDeclH98{con_args = con_args'} = f (PrefixCon _ args) = [typeSig name $ (map hsScaledThing args) ++ [resType]] f (InfixCon a1 a2) = f $ PrefixCon [] [a1, a2] f (RecCon (L _ recs)) = - f (PrefixCon [] $ map (hsLinear . cd_fld_type . unLoc) recs) + f (PrefixCon [] $ map (cd_fld_type . unLoc) recs) ++ concat [ (concatMap (lookupCon sDocContext subdocs . noLocA . unLoc . foLabel . unLoc) (cd_fld_names r)) - ++ [out sDocContext (map (foExt . unLoc) $ cd_fld_names r) `typeSig` [resType, cd_fld_type r]] + ++ [out sDocContext (map (foExt . unLoc) $ cd_fld_names r) `typeSig` [resType, hsScaledThing $ cd_fld_type r]] | r <- map unLoc recs ] - funs = foldr1 (\x y -> reL $ HsFunTy noExtField (HsUnrestrictedArrow noExtField) x y) + funs = foldr1 (\x y -> reL $ HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) x y) apps = foldl1 (\x y -> reL $ HsAppTy noExtField x y) typeSig nm flds = @@ -356,8 +356,8 @@ ppCtor tau_ty = foldr mkFunTy res_ty $ case args of PrefixConGADT _ pos_args -> map hsScaledThing pos_args - RecConGADT _ (L _ flds) -> map (cd_fld_type . unL) flds - mkFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) a b) + RecConGADT _ (L _ flds) -> map (hsScaledThing . cd_fld_type . unL) flds + mkFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) a b) ppFixity :: SDocContext -> (Name, Fixity) -> [String] ppFixity sDocContext (name, fixity) = [out sDocContext ((FixitySig NoNamespaceSpecifier [noLocA name] fixity) :: FixitySig GhcRn)] ===================================== utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs ===================================== @@ -1035,7 +1035,7 @@ ppSideBySideField subdocs unicode (ConDeclField _ names ltype _) = decltt ( cat (punctuate comma (map (ppBinder . rdrNameOcc . foExt . unLoc) names)) <+> dcolon unicode - <+> ppLType unicode ltype + <+> ppLType unicode (hsScaledThing ltype) ) <-> rDoc mbDoc where @@ -1312,7 +1312,7 @@ ppr_mono_ty (HsFunTy _ mult ty1 ty2) u = where arr = case mult of HsLinearArrow _ -> lollipop u - HsUnrestrictedArrow _ -> arrow u + HsUnrestrictedArrow _ _ -> arrow u HsExplicitMult _ m -> multAnnotation <> ppr_mono_lty m u <+> arrow u ppr_mono_ty (HsBangTy _ b ty) u = ppBang b <> ppLParendType u ty ppr_mono_ty (HsTyVar _ NotPromoted (L _ name)) _ = ppDocName name ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs ===================================== @@ -1543,7 +1543,7 @@ ppSideBySideField subdocs unicode qual (ConDeclField _ names ltype _) = ] ) <+> dcolon unicode - <+> ppLType unicode qual HideEmptyContexts ltype + <+> ppLType unicode qual HideEmptyContexts (hsScaledThing ltype) , mbDoc , [] ) @@ -1559,7 +1559,7 @@ ppShortField :: Bool -> Unicode -> Qualification -> ConDeclField DocNameI -> Htm ppShortField summary unicode qual (ConDeclField _ names ltype _) = hsep (punctuate comma (map ((ppBinder summary) . rdrNameOcc . foExt . unLoc) names)) <+> dcolon unicode - <+> ppLType unicode qual HideEmptyContexts ltype + <+> ppLType unicode qual HideEmptyContexts (hsScaledThing ltype) -- | Pretty print an expanded pattern (for bundled patterns) ppSideBySidePat @@ -1817,7 +1817,7 @@ ppr_mono_ty (HsFunTy _ mult ty1 ty2) u q e = where arr = case mult of HsLinearArrow _ -> lollipop u - HsUnrestrictedArrow _ -> arrow u + HsUnrestrictedArrow _ _ -> arrow u HsExplicitMult _ m -> multAnnotation <> ppr_mono_lty m u q e <+> arrow u ppr_mono_ty (HsTupleTy _ con tys) u q _ = tupleParens con (map (ppLType u q HideEmptyContexts) tys) ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -506,8 +506,8 @@ synifyDataCon use_gadt_syntax dc = noLocA $ ConDeclField noAnn - [noLocA $ FieldOcc (mkVarUnqual $ field_label $ flLabel fl) (noLocA (flSelector fl))] - synTy + [noLocA $ FieldOcc (mkVarUnqual $ field_label $ flLabel fl) (noLocA (flSelector fl))] + (hsNoMultAnn HsRecFieldAnn synTy) Nothing mk_h98_arg_tys :: Either String (HsConDeclH98Details GhcRn) @@ -987,7 +987,7 @@ noKindTyVars _ _ = emptyVarSet synifyMult :: [TyVar] -> Mult -> HsArrow GhcRn synifyMult vs t = case t of OneTy -> HsLinearArrow noExtField - ManyTy -> HsUnrestrictedArrow noExtField + ManyTy -> HsUnrestrictedArrow HsArrowUseOther noExtField ty -> HsExplicitMult noExtField (synifyType WithinType vs ty) synifyPatSynType :: PatSyn -> LHsType GhcRn ===================================== utils/haddock/haddock-api/src/Haddock/GhcUtils.hs ===================================== @@ -223,7 +223,7 @@ getGADTConType PrefixConGADT _ pos_args -> foldr mkFunTy res_ty (map hsScaledThing pos_args) mkFunTy :: LHsType DocNameI -> LHsType DocNameI -> LHsType DocNameI - mkFunTy a b = noLocA (HsFunTy noAnn (HsUnrestrictedArrow noExtField) a b) + mkFunTy a b = noLocA (HsFunTy noAnn (HsUnrestrictedArrow HsArrowUseOther noExtField) a b) getGADTConType (ConDeclH98{}) = panic "getGADTConType" -- Should only be called on ConDeclGADT @@ -361,7 +361,7 @@ restrictCons names decls = [L p d | L p (Just d) <- fmap keep <$> decls] field_avail (L _ (ConDeclField _ fs _ _)) = all (\f -> (unLoc . foLabel . unLoc $ f) `elem` names) fs - field_types flds = [hsUnrestricted t | L _ (ConDeclField _ _ t _) <- flds] + field_types flds = [t | L _ (ConDeclField _ _ t _) <- flds] keep _ = Nothing restrictDecls :: [Name] -> [LSig GhcRn] -> [LSig GhcRn] @@ -512,7 +512,7 @@ reparenBndrKind v at XBndrKind{} = v -- | Add parenthesis around the types in a 'ConDeclField' (see 'reparenTypePrec') reparenConDeclField :: XRecCond a => ConDeclField a -> ConDeclField a -reparenConDeclField (ConDeclField x n t d) = ConDeclField x n (reparenLType t) d +reparenConDeclField (ConDeclField x n t d) = ConDeclField x n (fmap reparenLType t) d reparenConDeclField c at XConDeclField{} = c ------------------------------------------------------------------------------- ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Create.hs ===================================== @@ -963,11 +963,11 @@ extractPatternSyn nm t tvs cons = case con of ConDeclH98{con_args = con_args'} -> case con_args' of PrefixCon _ args' -> map hsScaledThing args' - RecCon (L _ fields) -> cd_fld_type . unLoc <$> fields + RecCon (L _ fields) -> hsScaledThing . cd_fld_type . unLoc <$> fields InfixCon arg1 arg2 -> map hsScaledThing [arg1, arg2] ConDeclGADT{con_g_args = con_args'} -> case con_args' of PrefixConGADT _ args' -> map hsScaledThing args' - RecConGADT _ (L _ fields) -> cd_fld_type . unLoc <$> fields + RecConGADT _ (L _ fields) -> hsScaledThing . cd_fld_type . unLoc <$> fields typ = longArrow args (data_ty con) typ' = case con of @@ -977,7 +977,7 @@ extractPatternSyn nm t tvs cons = in PatSynSig noAnn [noLocA nm] (mkEmptySigType typ'') longArrow :: [LHsType GhcRn] -> LHsType GhcRn -> LHsType GhcRn - longArrow inputs output = foldr (\x y -> noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) x y)) output inputs + longArrow inputs output = foldr (\x y -> noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) x y)) output inputs data_ty con | ConDeclGADT{} <- con = con_res_ty con @@ -999,7 +999,7 @@ extractRecSel nm t tvs (L _ con : rest) = case getRecConArgs_maybe con of Just (L _ fields) | ((l, L _ (ConDeclField _ _nn ty _)) : _) <- matching_fields fields -> - pure (L (noAnnSrcSpan l) (TypeSig noAnn [noLocA nm] (mkEmptyWildCardBndrs $ mkEmptySigType (noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) data_ty (getBangType ty)))))) + pure (L (noAnnSrcSpan l) (TypeSig noAnn [noLocA nm] (mkEmptyWildCardBndrs $ mkEmptySigType (noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) data_ty (getBangType $ hsScaledThing ty)))))) _ -> extractRecSel nm t tvs rest where matching_fields :: [LConDeclField GhcRn] -> [(SrcSpan, LConDeclField GhcRn)] ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -338,7 +338,7 @@ renameMaybeInjectivityAnn renameMaybeInjectivityAnn = traverse renameInjectivityAnn renameArrow :: HsArrow GhcRn -> RnM (HsArrow DocNameI) -renameArrow (HsUnrestrictedArrow _) = return (HsUnrestrictedArrow noExtField) +renameArrow (HsUnrestrictedArrow _ _) = return (HsUnrestrictedArrow HsArrowUseOther noExtField) renameArrow (HsLinearArrow _) = return (HsLinearArrow noExtField) renameArrow (HsExplicitMult _ p) = HsExplicitMult noExtField <$> renameLType p @@ -743,7 +743,7 @@ renameGADTDetails (PrefixConGADT _ ps) = PrefixConGADT noExtField <$> mapM renam renameConDeclFieldField :: LConDeclField GhcRn -> RnM (LConDeclField DocNameI) renameConDeclFieldField (L l (ConDeclField _ names t doc)) = do names' <- mapM renameLFieldOcc names - t' <- renameLType t + t' <- renameHsScaled t doc' <- mapM renameLDocHsSyn doc return $ L (locA l) (ConDeclField noExtField names' t' doc') View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bd198fdba1ed1d7820364b8f47d555970d696caf -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bd198fdba1ed1d7820364b8f47d555970d696caf You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 16:27:04 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Fri, 01 Nov 2024 12:27:04 -0400 Subject: [Git][ghc/ghc][wip/T18462] 7 commits: Add since tag for -fwrite-if-compression in user guide. Message-ID: <672501584d127_a114128a1f4215de@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - cd489802 by Sjoerd Visscher at 2024-11-01T17:26:56+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/Types.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/Types/Constraint.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/using-optimisation.rst - rts/Disassembler.c - + testsuite/tests/codeGen/should_run/T25374/T25374.hs - + testsuite/tests/codeGen/should_run/T25374/T25374.script - + testsuite/tests/codeGen/should_run/T25374/T25374A.hs - + testsuite/tests/codeGen/should_run/T25374/all.T - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bd198fdba1ed1d7820364b8f47d555970d696caf...cd489802ff884213645c277b34fc86f6e30a8107 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bd198fdba1ed1d7820364b8f47d555970d696caf...cd489802ff884213645c277b34fc86f6e30a8107 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 16:35:23 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Fri, 01 Nov 2024 12:35:23 -0400 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <6725034b16775_a114134fcb02474d@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: 8b8be922 by Sjoerd Visscher at 2024-11-01T17:35:00+01:00 Multiplicity annotation on records - - - - - 26 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs Changes: ===================================== compiler/GHC/Hs/Type.hs ===================================== @@ -24,10 +24,10 @@ GHC.Hs.Type: Abstract syntax: user-defined types module GHC.Hs.Type ( Mult, HsScaled(..), - hsMult, hsScaledThing, - HsArrow, HsArrowOf(..), arrowToHsType, expandHsArrow, + hsMultIsLinear, hsScaledThing, hsScaledToHsTypes, + HsArrow, HsArrowOf(..), HsUnrestrictedArrowUse(..), arrowToHsType, expandHsArrow, EpLinearArrow(..), - hsLinear, hsUnrestricted, isUnrestricted, + hsLinear, hsUnrestricted, hsNoMultAnn, isUnrestricted, pprHsArrow, HsType(..), HsCoreTy, LHsType, HsKind, LHsKind, @@ -539,13 +539,19 @@ hsLinear = HsScaled (HsLinearArrow x) GhcTc -> noExtField hsUnrestricted :: forall p a. IsPass p => a -> HsScaled (GhcPass p) a -hsUnrestricted = HsScaled (HsUnrestrictedArrow x) +hsUnrestricted = hsNoMultAnn HsArrowUseOther + +hsNoMultAnn :: forall p a. IsPass p => HsUnrestrictedArrowUse -> a -> HsScaled (GhcPass p) a +hsNoMultAnn t = HsScaled (HsUnrestrictedArrow t x) where x = case ghcPass @p of GhcPs -> noAnn GhcRn -> noExtField GhcTc -> noExtField +hsScaledToHsTypes :: (a -> LHsType GhcRn) -> HsScaled GhcRn a -> [LHsType GhcRn] +hsScaledToHsTypes f (HsScaled arr x) = [arrowToHsType arr, f x] + isUnrestricted :: HsArrow GhcRn -> Bool isUnrestricted (arrowToHsType -> L _ (HsTyVar _ _ (L _ n))) = n == manyDataConName isUnrestricted _ = False @@ -557,7 +563,8 @@ arrowToHsType = expandHsArrow (HsTyVar noAnn NotPromoted) -- erases the information of whether the programmer wrote an explicit -- multiplicity or a shorthand. expandHsArrow :: (LocatedN Name -> t GhcRn) -> HsArrowOf (LocatedA (t GhcRn)) GhcRn -> LocatedA (t GhcRn) -expandHsArrow mk_var (HsUnrestrictedArrow _) = noLocA (mk_var (noLocA manyDataConName)) +expandHsArrow mk_var (HsUnrestrictedArrow HsRecFieldAnn _) = noLocA (mk_var (noLocA oneDataConName)) +expandHsArrow mk_var (HsUnrestrictedArrow _ _) = noLocA (mk_var (noLocA manyDataConName)) expandHsArrow mk_var (HsLinearArrow _) = noLocA (mk_var (noLocA oneDataConName)) expandHsArrow _mk_var (HsExplicitMult _ p) = p @@ -568,16 +575,25 @@ instance -- See #18846 pprHsArrow :: (Outputable mult, OutputableBndrId pass) => HsArrowOf mult (GhcPass pass) -> SDoc -pprHsArrow (HsUnrestrictedArrow _) = pprArrowWithMultiplicity visArgTypeLike (Left False) -pprHsArrow (HsLinearArrow _) = pprArrowWithMultiplicity visArgTypeLike (Left True) -pprHsArrow (HsExplicitMult _ p) = pprArrowWithMultiplicity visArgTypeLike (Right (ppr p)) +pprHsArrow (HsUnrestrictedArrow _ _) = pprArrowWithMultiplicity visArgTypeLike (Left False) +pprHsArrow (HsLinearArrow _) = pprArrowWithMultiplicity visArgTypeLike (Left True) +pprHsArrow (HsExplicitMult _ p) = pprArrowWithMultiplicity visArgTypeLike (Right (ppr p)) type instance XConDeclField (GhcPass _) = TokDcolon type instance XXConDeclField (GhcPass _) = DataConCantHappen instance OutputableBndrId p => Outputable (ConDeclField (GhcPass p)) where - ppr (ConDeclField _ fld_n fld_ty _) = ppr fld_n <+> dcolon <+> ppr fld_ty + ppr (ConDeclField _ fld_n (HsScaled fld_mult fld_ty) _) = ppr_names fld_n <+> ppr_mult <+> ppr fld_ty + where + ppr_names :: [LFieldOcc (GhcPass p)] -> SDoc + ppr_names [n] = pprPrefixOcc n + ppr_names ns = sep (punctuate comma (map pprPrefixOcc ns)) + + ppr_mult = case fld_mult of + HsUnrestrictedArrow _ _ -> dcolon + HsLinearArrow _ -> text "%1" <+> dcolon + HsExplicitMult _ p -> text "%" <> ppr p <+> dcolon --------------------- hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name] @@ -1359,13 +1375,9 @@ pprConDeclFields :: forall p. OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields))) where - ppr_fld (L _ (ConDeclField { cd_fld_names = ns, cd_fld_type = ty, - cd_fld_doc = doc })) - = pprMaybeWithDoc doc (ppr_names ns <+> dcolon <+> ppr ty) - - ppr_names :: forall p. OutputableBndrId p => [LFieldOcc (GhcPass p)] -> SDoc - ppr_names [n] = pprPrefixOcc n - ppr_names ns = sep (punctuate comma (map pprPrefixOcc ns)) + ppr_fld :: LConDeclField (GhcPass p) -> SDoc + ppr_fld (L _ (cdf at ConDeclField { cd_fld_doc = doc })) + = pprMaybeWithDoc doc (ppr cdf) -- Printing works more-or-less as for Types ===================================== compiler/GHC/Hs/Utils.hs ===================================== @@ -623,7 +623,7 @@ nlHsParTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) nlHsAppTy f t = noLocA (HsAppTy noExtField f t) nlHsTyVar p x = noLocA (HsTyVar noAnn p (noLocA x)) -nlHsFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow x) a b) +nlHsFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther x) a b) where x = case ghcPass @p of GhcPs -> noAnn ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -2865,15 +2865,10 @@ repGadtDataCons cons details res_ty -- TH currently only supports linear constructors. -- We also accept the (->) arrow when -XLinearTypes is off, because this -- denotes a linear field. --- This check is not performed in repRecConArgs, since the GADT record --- syntax currently does not have a way to mark fields as nonlinear. verifyLinearFields :: [HsScaled GhcRn (LHsType GhcRn)] -> MetaM () verifyLinearFields ps = do linear <- lift $ xoptM LangExt.LinearTypes - let allGood = all (\st -> case hsMult st of - HsUnrestrictedArrow _ -> not linear - HsLinearArrow _ -> True - _ -> False) ps + let allGood = all (hsMultIsLinear linear) ps unless allGood $ notHandled ThNonLinearDataCon -- Desugar the arguments in a data constructor declared with prefix syntax. @@ -2886,11 +2881,13 @@ repPrefixConArgs ps = do -- Desugar the arguments in a data constructor declared with record syntax. repRecConArgs :: LocatedL [LConDeclField GhcRn] -> MetaM (Core [M TH.VarBangType]) -repRecConArgs ips = do - args <- concatMapM rep_ip (unLoc ips) +repRecConArgs lips = do + let ips = map unLoc (unLoc lips) + verifyLinearFields (map cd_fld_type ips) + args <- concatMapM rep_ip ips coreListM varBangTypeTyConName args where - rep_ip (L _ ip) = mapM (rep_one_ip (cd_fld_type ip)) (cd_fld_names ip) + rep_ip ip = mapM (rep_one_ip (hsScaledThing $ cd_fld_type ip)) (cd_fld_names ip) rep_one_ip :: LBangType GhcRn -> LFieldOcc GhcRn -> MetaM (Core (M TH.VarBangType)) rep_one_ip t n = do { MkC v <- lookupOcc (unLoc . foLabel $ unLoc n) ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -2000,7 +2000,7 @@ instance HiePass p => ToHie (LocatedC [LocatedA (HsExpr (GhcPass p))]) where instance ToHie (LocatedA (ConDeclField GhcRn)) where toHie (L span field) = concatM $ makeNode field (locA span) : case field of ConDeclField _ fields typ doc -> - [ toHie $ map (RFC RecFieldDecl (getRealSpan $ getHasLoc typ)) fields + [ toHie $ map (RFC RecFieldDecl (getRealSpan $ getHasLoc $ hsScaledThing typ)) fields , toHie typ , toHie doc ] ===================================== compiler/GHC/Parser.y ===================================== @@ -2260,7 +2260,7 @@ type :: { LHsType GhcPs } -- See Note [%shift: type -> btype] : btype %shift { $1 } | btype '->' ctype {% amsA' (sLL $1 $> - $ HsFunTy noExtField (HsUnrestrictedArrow (epUniTok $2)) $1 $3) } + $ HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther (epUniTok $2)) $1 $3) } | btype mult '->' ctype {% hintLinear (getLoc $2) >> let arr = (unLoc $2) (epUniTok $3) @@ -2597,7 +2597,12 @@ fielddecl :: { LConDeclField GhcPs } {% amsA' (L (comb2 $1 $3) (ConDeclField (epUniTok $2) (reverse (map (\ln@(L l n) - -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) $3 Nothing))} + -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) (hsNoMultAnn HsRecFieldAnn $3) Nothing))} + | sig_vars PREFIX_PERCENT atype '::' ctype + {% amsA' (L (comb4 $1 $2 $3 $5) + (ConDeclField (epUniTok $4) + (reverse (map (\ln@(L l n) + -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) (mkMultField (epTok $2) $3 (epUniTok $4) $5) Nothing))} -- Reversed! maybe_derivings :: { Located (HsDeriving GhcPs) } @@ -2661,7 +2666,7 @@ There's an awkward overlap with a type signature. Consider decl_no_th :: { LHsDecl GhcPs } : sigdecl { $1 } - | infixexp opt_sig rhs {% runPV (unECP $1) >>= \ $1 -> + | infixexp opt_sig rhs {% runPV (unECP $1) >>= \ $1 -> do { let { l = comb2 $1 $> } ; r <- checkValDef l $1 (HsNoMultAnn noExtField, $2) $3; -- Depending upon what the pattern looks like we might get either @@ -2669,7 +2674,7 @@ decl_no_th :: { LHsDecl GhcPs } -- [FunBind vs PatBind] ; !cs <- getCommentsFor l ; return $! (sL (commentsA l cs) $ ValD noExtField r) } } - | PREFIX_PERCENT atype infixexp opt_sig rhs {% runPV (unECP $3) >>= \ $3 -> + | PREFIX_PERCENT atype infixexp opt_sig rhs {% runPV (unECP $3) >>= \ $3 -> do { let { l = comb2 $1 $> } ; r <- checkValDef l $3 (mkMultAnn (epTok $1) $2, $4) $5; -- parses bindings of the form %p x or @@ -2855,7 +2860,7 @@ infixexp2 :: { ECP } withArrowParsingMode' $ \mode -> unECP $1 >>= \ $1 -> unECP $3 >>= \ $3 -> - let arr = HsUnrestrictedArrow (epUniTok $2) + let arr = HsUnrestrictedArrow HsArrowUseOther (epUniTok $2) in mkHsArrowPV (comb2 $1 $>) mode $1 arr $3 } | infixexp expmult '->' infixexp2 { ECP $ ===================================== compiler/GHC/Parser/PostProcess.hs ===================================== @@ -71,6 +71,7 @@ module GHC.Parser.PostProcess ( UnpackednessPragma(..), mkMultTy, mkMultAnn, + mkMultField, -- Token location mkTokenLocation, @@ -805,7 +806,7 @@ mkGadtDecl loc names dcol ty = do case body_ty of L ll (HsFunTy _ hsArr (L (EpAnn anc _ cs) (HsRecTy an rf)) res_ty) -> do arr <- case hsArr of - HsUnrestrictedArrow arr -> return arr + HsUnrestrictedArrow _ arr -> return arr _ -> do addError $ mkPlainErrorMsgEnvelope (getLocA body_ty) $ (PsErrIllegalGadtRecordMultiplicity hsArr) return noAnn @@ -2071,7 +2072,7 @@ instance DisambECP (PatBuilder GhcPs) where where tok :: TokRarrow tok = case arr of - HsUnrestrictedArrow x -> x + HsUnrestrictedArrow _ x -> x _ -> -- unreachable case because in Parser.y the reduction rules for -- (a %m -> b) and (a ->. b) use ArrowIsFunType panic "mkHsArrowPV ArrowIsViewPat: expected HsUnrestrictedArrow" @@ -3518,6 +3519,9 @@ mkMultAnn pct t@(L _ (HsTyLit _ (HsNumTy (SourceText (unpackFS -> "1")) 1))) pct1 = epTokenWidenR pct (locA (getLoc t)) mkMultAnn pct t = HsMultAnn pct t +mkMultField :: EpToken "%" -> LHsType GhcPs -> TokDcolon -> LHsType GhcPs -> HsScaled GhcPs (LBangType GhcPs) +mkMultField pct mult _ t = HsScaled (mkMultTy pct mult noAnn) t + mkTokenLocation :: SrcSpan -> TokenLocation mkTokenLocation (UnhelpfulSpan _) = NoTokenLoc mkTokenLocation (RealSrcSpan r mb) = TokenLoc (EpaSpan (RealSrcSpan r mb)) ===================================== compiler/GHC/Rename/HsType.hs ===================================== @@ -451,10 +451,14 @@ rnLHsTypes :: HsDocContext -> [LHsType GhcPs] -> RnM ([LHsType GhcRn], FreeVars) rnLHsTypes doc tys = mapFvRn (rnLHsType doc) tys rnScaledLHsType :: HsDocContext -> HsScaled GhcPs (LHsType GhcPs) - -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) -rnScaledLHsType doc (HsScaled w ty) = do - (w' , fvs_w) <- rnHsArrow (mkTyKiEnv doc TypeLevel RnTypeBody) w - (ty', fvs) <- rnLHsType doc ty + -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) +rnScaledLHsType doc = rnScaledLHsTyKi (mkTyKiEnv doc TypeLevel RnTypeBody) + +rnScaledLHsTyKi :: RnTyKiEnv -> HsScaled GhcPs (LHsType GhcPs) + -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) +rnScaledLHsTyKi env (HsScaled w ty) = do + (w' , fvs_w) <- rnHsArrow env w + (ty', fvs) <- rnLHsTyKi env ty return (HsScaled w' ty', fvs `plusFV` fvs_w) @@ -709,7 +713,7 @@ rnHsArrow env = rnHsArrowWith (rnLHsTyKi env) rnHsArrowWith :: (LocatedA (mult GhcPs) -> RnM (LocatedA (mult GhcRn), FreeVars)) -> HsArrowOf (LocatedA (mult GhcPs)) GhcPs -> RnM (HsArrowOf (LocatedA (mult GhcRn)) GhcRn, FreeVars) -rnHsArrowWith _rn (HsUnrestrictedArrow _) = pure (HsUnrestrictedArrow noExtField, emptyFVs) +rnHsArrowWith _rn (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField, emptyFVs) rnHsArrowWith _rn (HsLinearArrow _) = pure (HsLinearArrow noExtField, emptyFVs) rnHsArrowWith rn (HsExplicitMult _ p) = (\(mult, fvs) -> (HsExplicitMult noExtField mult, fvs)) <$> rn p @@ -1334,7 +1338,7 @@ rnField :: FastStringEnv FieldLabel -> RnTyKiEnv -> LConDeclField GhcPs -> RnM (LConDeclField GhcRn, FreeVars) rnField fl_env env (L l (ConDeclField _ names ty haddock_doc)) = do { let new_names = map (fmap (lookupField fl_env)) names - ; (new_ty, fvs) <- rnLHsTyKi env ty + ; (new_ty, fvs) <- rnScaledLHsTyKi env ty ; haddock_doc' <- traverse rnLHsDoc haddock_doc ; return (L l (ConDeclField noAnn new_names new_ty haddock_doc') , fvs) } @@ -2030,7 +2034,7 @@ extractConDeclGADTDetailsTyVars :: HsConDeclGADTDetails GhcPs -> FreeKiTyVars -> FreeKiTyVars extractConDeclGADTDetailsTyVars con_args = case con_args of PrefixConGADT _ args -> extract_scaled_ltys args - RecConGADT _ (L _ flds) -> extract_ltys $ map (cd_fld_type . unLoc) $ flds + RecConGADT _ (L _ flds) -> extract_scaled_ltys $ map (cd_fld_type . unLoc) $ flds -- | Get type/kind variables mentioned in the kind signature, preserving -- left-to-right order: @@ -2062,7 +2066,7 @@ extract_lty (L _ ty) acc = case ty of HsTyVar _ _ ltv -> extract_tv ltv acc HsBangTy _ _ ty -> extract_lty ty acc - HsRecTy _ flds -> foldr (extract_lty + HsRecTy _ flds -> foldr (extract_scaled_lty . cd_fld_type . unLoc) acc flds HsAppTy _ ty1 ty2 -> extract_lty ty1 $ ===================================== compiler/GHC/Rename/Pat.hs ===================================== @@ -1432,7 +1432,7 @@ rn_ty_pat ty@(XHsType{}) = do liftRnFV $ rnHsType ctxt ty rn_ty_pat_arrow :: HsArrow GhcPs -> TPRnM (HsArrow GhcRn) -rn_ty_pat_arrow (HsUnrestrictedArrow _) = pure (HsUnrestrictedArrow noExtField) +rn_ty_pat_arrow (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField) rn_ty_pat_arrow (HsLinearArrow _) = pure (HsLinearArrow noExtField) rn_ty_pat_arrow (HsExplicitMult _ p) = rn_lty_pat p <&> (\mult -> HsExplicitMult noExtField mult) ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -985,7 +985,7 @@ expr_to_type earg = ; return (L l (HsFunTy noExtField mult' arg' res'))} where go_arrow :: HsArrowOf (LHsExpr GhcRn) GhcRn -> TcM (HsArrow GhcRn) - go_arrow (HsUnrestrictedArrow{}) = pure (HsUnrestrictedArrow noExtField) + go_arrow (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField) go_arrow (HsLinearArrow{}) = pure (HsLinearArrow noExtField) go_arrow (HsExplicitMult _ exp) = HsExplicitMult noExtField <$> go exp go (L l (HsForAll _ tele expr)) = ===================================== compiler/GHC/Tc/Gen/HsType.hs ===================================== @@ -1126,7 +1126,7 @@ tcHsType mode (HsFunTy _ mult ty1 ty2) exp_kind tcHsType mode (HsOpTy _ _ ty1 (L _ op) ty2) exp_kind | op `hasKey` unrestrictedFunTyConKey - = tc_fun_type mode (HsUnrestrictedArrow noExtField) ty1 ty2 exp_kind + = tc_fun_type mode (HsUnrestrictedArrow HsArrowUseOther noExtField) ty1 ty2 exp_kind --------- Foralls tcHsType mode t@(HsForAllTy { hst_tele = tele, hst_body = ty }) exp_kind ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -283,7 +283,7 @@ no_anon_wc_ty lty = go lty HsKindSig _ ty kind -> go ty && go kind HsDocTy _ ty _ -> go ty HsBangTy _ _ ty -> go ty - HsRecTy _ flds -> gos $ map (cd_fld_type . unLoc) flds + HsRecTy _ flds -> gos $ concatMap (hsScaledToHsTypes id . cd_fld_type . unLoc) flds HsExplicitListTy _ _ tys -> gos tys HsExplicitTupleTy _ tys -> gos tys HsForAllTy { hst_tele = tele ===================================== compiler/GHC/Tc/TyCl.hs ===================================== @@ -1813,14 +1813,14 @@ kcConH98Args new_or_data res_kind con_args = case con_args of PrefixCon _ tys -> kcConArgTys new_or_data res_kind tys InfixCon ty1 ty2 -> kcConArgTys new_or_data res_kind [ty1, ty2] RecCon (L _ flds) -> kcConArgTys new_or_data res_kind $ - map (hsLinear . cd_fld_type . unLoc) flds + map (cd_fld_type . unLoc) flds -- Kind-check the types of arguments to a GADT data constructor. kcConGADTArgs :: NewOrData -> TcKind -> HsConDeclGADTDetails GhcRn -> TcM () kcConGADTArgs new_or_data res_kind con_args = case con_args of PrefixConGADT _ tys -> kcConArgTys new_or_data res_kind tys RecConGADT _ (L _ flds) -> kcConArgTys new_or_data res_kind $ - map (hsLinear . cd_fld_type . unLoc) flds + map (cd_fld_type . unLoc) flds kcConDecls :: Foldable f => NewOrData @@ -3939,14 +3939,14 @@ tcRecConDeclFields exp_kind fields = mapM (tcConArg exp_kind) btys where -- We need a one-to-one mapping from field_names to btys - combined = map (\(L _ f) -> (cd_fld_names f,hsLinear (cd_fld_type f))) + combined = map (\(L _ f) -> (cd_fld_names f, cd_fld_type f)) (unLoc fields) explode (ns,ty) = zip ns (repeat ty) exploded = concatMap explode combined (_,btys) = unzip exploded tcDataConMult :: HsArrow GhcRn -> TcM Mult -tcDataConMult arr@(HsUnrestrictedArrow _) = do +tcDataConMult arr@(HsUnrestrictedArrow HsArrowUseOther _) = do -- See Note [Function arrows in GADT constructors] linearEnabled <- xoptM LangExt.LinearTypes if linearEnabled then tcMult arr else return oneDataConTy ===================================== compiler/GHC/ThToHs.hs ===================================== @@ -792,7 +792,7 @@ cvt_id_arg parent_con (i, str, ty) { cd_fld_ext = noAnn , cd_fld_names = [L (l2l li) $ FieldOcc noExtField (L li i')] - , cd_fld_type = ty' + , cd_fld_type = hsNoMultAnn HsRecFieldAnn ty' , cd_fld_doc = Nothing} } cvtDerivs :: [TH.DerivClause] -> CvtM (HsDeriving GhcPs) @@ -1690,7 +1690,7 @@ cvtTypeKind typeOrKind ty _ -> return $ parenthesizeHsType sigPrec x' let y'' = parenthesizeHsType sigPrec y' - returnLA (HsFunTy noExtField (HsUnrestrictedArrow noAnn) x'' y'') + returnLA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noAnn) x'' y'') | otherwise -> do { fun_tc <- returnLA $ getRdrName unrestrictedFunTyCon ; mk_apps (HsTyVar noAnn NotPromoted fun_tc) tys' } @@ -1857,7 +1857,7 @@ hsTypeToArrow :: LHsType GhcPs -> HsArrow GhcPs hsTypeToArrow w = case unLoc w of HsTyVar _ _ (L _ (isExact_maybe -> Just n)) | n == oneDataConName -> HsLinearArrow noAnn - | n == manyDataConName -> HsUnrestrictedArrow noAnn + | n == manyDataConName -> HsUnrestrictedArrow HsArrowUseOther noAnn _ -> HsExplicitMult noAnn w -- ConT/InfixT can contain both data constructor (i.e., promoted) names and ===================================== compiler/Language/Haskell/Syntax/Type.hs ===================================== @@ -21,8 +21,9 @@ GHC.Hs.Type: Abstract syntax: user-defined types -- See Note [Language.Haskell.Syntax.* Hierarchy] for why not GHC.Hs.* module Language.Haskell.Syntax.Type ( HsScaled(..), - hsMult, hsScaledThing, - HsArrow, HsArrowOf(..), XUnrestrictedArrow, XLinearArrow, XExplicitMult, XXArrow, + hsMultIsLinear, hsScaledThing, + HsArrow, HsArrowOf(..), HsUnrestrictedArrowUse(..), + XUnrestrictedArrow, XLinearArrow, XExplicitMult, XXArrow, HsType(..), LHsType, HsKind, LHsKind, HsBndrVis(..), XBndrRequired, XBndrInvisible, XXBndrVis, @@ -78,7 +79,7 @@ import Data.Maybe import Data.Eq import Data.Bool import Data.Char -import Prelude (Integer) +import Prelude (Integer, Functor) import Data.Ord (Ord) {- @@ -938,9 +939,12 @@ data HsTyLit pass type HsArrow pass = HsArrowOf (LHsType pass) pass +data HsUnrestrictedArrowUse = HsRecFieldAnn | HsArrowUseOther + deriving (Eq, Ord, Data) + -- | Denotes the type of arrows in the surface language data HsArrowOf mult pass - = HsUnrestrictedArrow !(XUnrestrictedArrow mult pass) + = HsUnrestrictedArrow HsUnrestrictedArrowUse !(XUnrestrictedArrow mult pass) -- ^ a -> b or a → b | HsLinearArrow !(XLinearArrow mult pass) @@ -962,9 +966,13 @@ type family XXArrow mult p -- | This is used in the syntax. In constructor declaration. It must keep the -- arrow representation. data HsScaled pass a = HsScaled (HsArrow pass) a + deriving (Functor) -hsMult :: HsScaled pass a -> HsArrow pass -hsMult (HsScaled m _) = m +hsMultIsLinear :: Bool -> HsScaled pass a -> Bool +hsMultIsLinear _ (HsScaled (HsUnrestrictedArrow HsRecFieldAnn _) _) = True +hsMultIsLinear linear (HsScaled (HsUnrestrictedArrow HsArrowUseOther _) _) = not linear +hsMultIsLinear _ (HsScaled HsLinearArrow{} _) = True +hsMultIsLinear _ _ = False hsScaledThing :: HsScaled pass a -> a hsScaledThing (HsScaled _ t) = t @@ -1072,7 +1080,7 @@ data ConDeclField pass -- Record fields have Haddock docs on them = ConDeclField { cd_fld_ext :: XConDeclField pass, cd_fld_names :: [LFieldOcc pass], -- ^ See Note [ConDeclField pass] - cd_fld_type :: LBangType pass, + cd_fld_type :: HsScaled pass (LBangType pass), cd_fld_doc :: Maybe (LHsDoc pass)} | XConDeclField !(XXConDeclField pass) ===================================== testsuite/tests/linear/should_compile/NonLinearRecord.hs ===================================== @@ -0,0 +1,15 @@ +{-# LANGUAGE LinearTypes, DataKinds #-} +module NonLinearRecord where + +import GHC.Exts (Multiplicity(..)) + +data C = C { linC %1 :: Int, urC %'Many :: Char, noC :: Bool } + +data G where + G :: { linG %1 :: Int, urG %'Many :: Char, noG :: Bool } -> G + +testC :: Int %1 -> Char -> Bool %1 -> C +testC x y z = C x y z + +testG :: Int %1 -> Char -> Bool %1 -> G +testG x y z = G x y z ===================================== testsuite/tests/linear/should_compile/all.T ===================================== @@ -47,3 +47,4 @@ test('LinearLet', normal, compile, ['']) test('LinearLetPoly', normal, compile, ['']) test('LinearListComprehension', normal, compile, ['-dlinear-core-lint']) test('OmitFieldPat', normal, compile, ['-dcore-lint']) +test('NonLinearRecord', normal, compile, ['']) \ No newline at end of file ===================================== testsuite/tests/linear/should_fail/LinearRecFieldMany.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE LinearTypes, DataKinds #-} +module LinearRecFieldMany where + +import GHC.Exts (Multiplicity(..)) + +data C = C { urC %'Many :: Int } + +test :: Int %1 -> C +test = C ===================================== testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr ===================================== @@ -0,0 +1,6 @@ +LinearRecFieldMany.hs:9:8: [GHC-83865] + Couldn't match type ‘Many’ with ‘One’ + Expected: Int %1 -> C + Actual: Int -> C + In the expression: C + In an equation for ‘test’: test = C ===================================== testsuite/tests/linear/should_fail/all.T ===================================== @@ -34,6 +34,7 @@ test('LinearFFI', normal, compile_fail, ['']) test('LinearTHFail', normal, compile_fail, ['']) test('LinearTHFail2', normal, compile_fail, ['']) test('LinearTHFail3', normal, compile_fail, ['']) +test('LinearRecFieldMany', normal, compile_fail, ['']) test('T18888', normal, compile_fail, ['']) test('T18888_datakinds', normal, compile_fail, ['']) test('T19120', normal, compile_fail, ['']) ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs ===================================== @@ -298,14 +298,14 @@ ppCtor sDocContext dat subdocs con at ConDeclH98{con_args = con_args'} = f (PrefixCon _ args) = [typeSig name $ (map hsScaledThing args) ++ [resType]] f (InfixCon a1 a2) = f $ PrefixCon [] [a1, a2] f (RecCon (L _ recs)) = - f (PrefixCon [] $ map (hsLinear . cd_fld_type . unLoc) recs) + f (PrefixCon [] $ map (cd_fld_type . unLoc) recs) ++ concat [ (concatMap (lookupCon sDocContext subdocs . noLocA . unLoc . foLabel . unLoc) (cd_fld_names r)) - ++ [out sDocContext (map (foExt . unLoc) $ cd_fld_names r) `typeSig` [resType, cd_fld_type r]] + ++ [out sDocContext (map (foExt . unLoc) $ cd_fld_names r) `typeSig` [resType, hsScaledThing $ cd_fld_type r]] | r <- map unLoc recs ] - funs = foldr1 (\x y -> reL $ HsFunTy noExtField (HsUnrestrictedArrow noExtField) x y) + funs = foldr1 (\x y -> reL $ HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) x y) apps = foldl1 (\x y -> reL $ HsAppTy noExtField x y) typeSig nm flds = @@ -356,8 +356,8 @@ ppCtor tau_ty = foldr mkFunTy res_ty $ case args of PrefixConGADT _ pos_args -> map hsScaledThing pos_args - RecConGADT _ (L _ flds) -> map (cd_fld_type . unL) flds - mkFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) a b) + RecConGADT _ (L _ flds) -> map (hsScaledThing . cd_fld_type . unL) flds + mkFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) a b) ppFixity :: SDocContext -> (Name, Fixity) -> [String] ppFixity sDocContext (name, fixity) = [out sDocContext ((FixitySig NoNamespaceSpecifier [noLocA name] fixity) :: FixitySig GhcRn)] ===================================== utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs ===================================== @@ -1035,7 +1035,7 @@ ppSideBySideField subdocs unicode (ConDeclField _ names ltype _) = decltt ( cat (punctuate comma (map (ppBinder . rdrNameOcc . foExt . unLoc) names)) <+> dcolon unicode - <+> ppLType unicode ltype + <+> ppLType unicode (hsScaledThing ltype) ) <-> rDoc mbDoc where @@ -1312,7 +1312,7 @@ ppr_mono_ty (HsFunTy _ mult ty1 ty2) u = where arr = case mult of HsLinearArrow _ -> lollipop u - HsUnrestrictedArrow _ -> arrow u + HsUnrestrictedArrow _ _ -> arrow u HsExplicitMult _ m -> multAnnotation <> ppr_mono_lty m u <+> arrow u ppr_mono_ty (HsBangTy _ b ty) u = ppBang b <> ppLParendType u ty ppr_mono_ty (HsTyVar _ NotPromoted (L _ name)) _ = ppDocName name ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs ===================================== @@ -1543,7 +1543,7 @@ ppSideBySideField subdocs unicode qual (ConDeclField _ names ltype _) = ] ) <+> dcolon unicode - <+> ppLType unicode qual HideEmptyContexts ltype + <+> ppLType unicode qual HideEmptyContexts (hsScaledThing ltype) , mbDoc , [] ) @@ -1559,7 +1559,7 @@ ppShortField :: Bool -> Unicode -> Qualification -> ConDeclField DocNameI -> Htm ppShortField summary unicode qual (ConDeclField _ names ltype _) = hsep (punctuate comma (map ((ppBinder summary) . rdrNameOcc . foExt . unLoc) names)) <+> dcolon unicode - <+> ppLType unicode qual HideEmptyContexts ltype + <+> ppLType unicode qual HideEmptyContexts (hsScaledThing ltype) -- | Pretty print an expanded pattern (for bundled patterns) ppSideBySidePat @@ -1817,7 +1817,7 @@ ppr_mono_ty (HsFunTy _ mult ty1 ty2) u q e = where arr = case mult of HsLinearArrow _ -> lollipop u - HsUnrestrictedArrow _ -> arrow u + HsUnrestrictedArrow _ _ -> arrow u HsExplicitMult _ m -> multAnnotation <> ppr_mono_lty m u q e <+> arrow u ppr_mono_ty (HsTupleTy _ con tys) u q _ = tupleParens con (map (ppLType u q HideEmptyContexts) tys) ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -506,8 +506,8 @@ synifyDataCon use_gadt_syntax dc = noLocA $ ConDeclField noAnn - [noLocA $ FieldOcc (mkVarUnqual $ field_label $ flLabel fl) (noLocA (flSelector fl))] - synTy + [noLocA $ FieldOcc (mkVarUnqual $ field_label $ flLabel fl) (noLocA (flSelector fl))] + (hsNoMultAnn HsRecFieldAnn synTy) Nothing mk_h98_arg_tys :: Either String (HsConDeclH98Details GhcRn) @@ -987,7 +987,7 @@ noKindTyVars _ _ = emptyVarSet synifyMult :: [TyVar] -> Mult -> HsArrow GhcRn synifyMult vs t = case t of OneTy -> HsLinearArrow noExtField - ManyTy -> HsUnrestrictedArrow noExtField + ManyTy -> HsUnrestrictedArrow HsArrowUseOther noExtField ty -> HsExplicitMult noExtField (synifyType WithinType vs ty) synifyPatSynType :: PatSyn -> LHsType GhcRn ===================================== utils/haddock/haddock-api/src/Haddock/GhcUtils.hs ===================================== @@ -223,7 +223,7 @@ getGADTConType PrefixConGADT _ pos_args -> foldr mkFunTy res_ty (map hsScaledThing pos_args) mkFunTy :: LHsType DocNameI -> LHsType DocNameI -> LHsType DocNameI - mkFunTy a b = noLocA (HsFunTy noAnn (HsUnrestrictedArrow noExtField) a b) + mkFunTy a b = noLocA (HsFunTy noAnn (HsUnrestrictedArrow HsArrowUseOther noExtField) a b) getGADTConType (ConDeclH98{}) = panic "getGADTConType" -- Should only be called on ConDeclGADT @@ -361,7 +361,7 @@ restrictCons names decls = [L p d | L p (Just d) <- fmap keep <$> decls] field_avail (L _ (ConDeclField _ fs _ _)) = all (\f -> (unLoc . foLabel . unLoc $ f) `elem` names) fs - field_types flds = [hsUnrestricted t | L _ (ConDeclField _ _ t _) <- flds] + field_types flds = [t | L _ (ConDeclField _ _ t _) <- flds] keep _ = Nothing restrictDecls :: [Name] -> [LSig GhcRn] -> [LSig GhcRn] @@ -512,7 +512,7 @@ reparenBndrKind v at XBndrKind{} = v -- | Add parenthesis around the types in a 'ConDeclField' (see 'reparenTypePrec') reparenConDeclField :: XRecCond a => ConDeclField a -> ConDeclField a -reparenConDeclField (ConDeclField x n t d) = ConDeclField x n (reparenLType t) d +reparenConDeclField (ConDeclField x n t d) = ConDeclField x n (fmap reparenLType t) d reparenConDeclField c at XConDeclField{} = c ------------------------------------------------------------------------------- ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Create.hs ===================================== @@ -963,11 +963,11 @@ extractPatternSyn nm t tvs cons = case con of ConDeclH98{con_args = con_args'} -> case con_args' of PrefixCon _ args' -> map hsScaledThing args' - RecCon (L _ fields) -> cd_fld_type . unLoc <$> fields + RecCon (L _ fields) -> hsScaledThing . cd_fld_type . unLoc <$> fields InfixCon arg1 arg2 -> map hsScaledThing [arg1, arg2] ConDeclGADT{con_g_args = con_args'} -> case con_args' of PrefixConGADT _ args' -> map hsScaledThing args' - RecConGADT _ (L _ fields) -> cd_fld_type . unLoc <$> fields + RecConGADT _ (L _ fields) -> hsScaledThing . cd_fld_type . unLoc <$> fields typ = longArrow args (data_ty con) typ' = case con of @@ -977,7 +977,7 @@ extractPatternSyn nm t tvs cons = in PatSynSig noAnn [noLocA nm] (mkEmptySigType typ'') longArrow :: [LHsType GhcRn] -> LHsType GhcRn -> LHsType GhcRn - longArrow inputs output = foldr (\x y -> noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) x y)) output inputs + longArrow inputs output = foldr (\x y -> noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) x y)) output inputs data_ty con | ConDeclGADT{} <- con = con_res_ty con @@ -999,7 +999,7 @@ extractRecSel nm t tvs (L _ con : rest) = case getRecConArgs_maybe con of Just (L _ fields) | ((l, L _ (ConDeclField _ _nn ty _)) : _) <- matching_fields fields -> - pure (L (noAnnSrcSpan l) (TypeSig noAnn [noLocA nm] (mkEmptyWildCardBndrs $ mkEmptySigType (noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) data_ty (getBangType ty)))))) + pure (L (noAnnSrcSpan l) (TypeSig noAnn [noLocA nm] (mkEmptyWildCardBndrs $ mkEmptySigType (noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) data_ty (getBangType $ hsScaledThing ty)))))) _ -> extractRecSel nm t tvs rest where matching_fields :: [LConDeclField GhcRn] -> [(SrcSpan, LConDeclField GhcRn)] ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -338,7 +338,7 @@ renameMaybeInjectivityAnn renameMaybeInjectivityAnn = traverse renameInjectivityAnn renameArrow :: HsArrow GhcRn -> RnM (HsArrow DocNameI) -renameArrow (HsUnrestrictedArrow _) = return (HsUnrestrictedArrow noExtField) +renameArrow (HsUnrestrictedArrow _ _) = return (HsUnrestrictedArrow HsArrowUseOther noExtField) renameArrow (HsLinearArrow _) = return (HsLinearArrow noExtField) renameArrow (HsExplicitMult _ p) = HsExplicitMult noExtField <$> renameLType p @@ -743,7 +743,7 @@ renameGADTDetails (PrefixConGADT _ ps) = PrefixConGADT noExtField <$> mapM renam renameConDeclFieldField :: LConDeclField GhcRn -> RnM (LConDeclField DocNameI) renameConDeclFieldField (L l (ConDeclField _ names t doc)) = do names' <- mapM renameLFieldOcc names - t' <- renameLType t + t' <- renameHsScaled t doc' <- mapM renameLDocHsSyn doc return $ L (locA l) (ConDeclField noExtField names' t' doc') View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8b8be922fadbd4b5a6a7104bf99d98664deb7338 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8b8be922fadbd4b5a6a7104bf99d98664deb7338 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 16:44:28 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Fri, 01 Nov 2024 12:44:28 -0400 Subject: [Git][ghc/ghc][wip/hnf-spec] SetLevels: Use `exprOkForSpeculation` instead of `exprIsHNF` Message-ID: <6725056c50f6d_a1141480eb825732@gitlab.mail> Sebastian Graf pushed to branch wip/hnf-spec at Glasgow Haskell Compiler / GHC Commits: 366092a0 by Sebastian Graf at 2024-11-01T17:44:19+01:00 SetLevels: Use `exprOkForSpeculation` instead of `exprIsHNF` - - - - - 1 changed file: - compiler/GHC/Core/Opt/SetLevels.hs Changes: ===================================== compiler/GHC/Core/Opt/SetLevels.hs ===================================== @@ -446,10 +446,10 @@ lvlCase :: LevelEnv -- Level of in-scope names/tyvars lvlCase env scrut_fvs scrut' case_bndr ty alts -- See Note [Floating single-alternative cases] | [AnnAlt con@(DataAlt {}) bs body] <- alts - , exprIsHNF (deTagExpr scrut') -- See Note [Check the output scrutinee for exprIsHNF] - , not (isTopLvl dest_lvl) -- Can't have top-level cases - , not (floatTopLvlOnly env) -- Can float anywhere - , ManyTy <- idMult case_bndr -- See Note [Floating linear case] + , exprOkForSpeculation (deTagExpr scrut') -- See Note [Check the output scrutinee for exprOkForSpeculation] + , not (isTopLvl dest_lvl) -- Can't have top-level cases + , not (floatTopLvlOnly env) -- Can float anywhere + , ManyTy <- idMult case_bndr -- See Note [Floating linear case] = -- Always float the case if possible -- Unlike lets we don't insist that it escapes a value lambda do { (env1, (case_bndr' : bs')) <- cloneCaseBndrs env dest_lvl (case_bndr : bs) @@ -498,17 +498,8 @@ the inner loop. Things to note: - * The test we perform is exprIsHNF, and /not/ exprOkForSpeculation. - - - exprIsHNF catches the key case of an evaluated variable - - - exprOkForSpeculation is /false/ of an evaluated variable; - See Note [exprOkForSpeculation and evaluated variables] in GHC.Core.Utils - So we'd actually miss the key case! - - - Nothing is gained from the extra generality of exprOkForSpeculation - since we only consider floating a case whose single alternative - is a DataAlt K a b -> rhs + * The test we perform is exprOkForSpeculation, because speculating the case is + exactly what we do. * We can't float a case to top level @@ -558,8 +549,8 @@ needed to quantify over some of its free variables (e.g. z), resulting in shadowing and very confusing Core Lint failures. -Note [Check the output scrutinee for exprIsHNF] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Note [Check the output scrutinee for exprOkForSpeculation] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider this: case x of y { A -> ....(case y of alts).... @@ -573,10 +564,10 @@ evaluated), but the former is not -- and indeed we can't float the inner case out, at least not unless x is also evaluated at its binding site. See #5453. -That's why we apply exprIsHNF to scrut' and not to scrut. +That's why we apply exprOkForSpeculation to scrut' and not to scrut. See Note [Floating single-alternative cases] for why -we use exprIsHNF in the first place. +we use exprOkForSpeculation in the first place. -} lvlNonTailMFE :: LevelEnv -- Level of in-scope names/tyvars @@ -704,16 +695,16 @@ lvlMFE env strict_ctxt ann_expr float_me = saves_work || saves_alloc || is_mk_static -- See Note [Saving work] - saves_work = escapes_value_lam -- (a) - && not (exprIsHNF expr) -- (b) - && not float_is_new_lam -- (c) + saves_work = escapes_value_lam -- (a) + && not (exprOkForSpeculation expr) -- (b) + && not float_is_new_lam -- (c) escapes_value_lam = dest_lvl `ltMajLvl` (le_ctxt_lvl env) -- See Note [Saving allocation] and Note [Floating to the top] saves_alloc = isTopLvl dest_lvl && floatConsts env && ( not strict_ctxt -- (a) - || exprIsHNF expr -- (b) + || exprOkForSpeculation expr -- (b) || (is_bot_lam && escapes_value_lam)) -- (c) hasFreeJoin :: LevelEnv -> DVarSet -> Bool @@ -733,14 +724,14 @@ But see also Note [Saving allocation]. So we definitely float an expression out if (a) It will escape a value lambda (escapes_value_lam) -(b) The expression is not a head-normal form (exprIsHNF); see (SW1, SW2). +(b) The expression is not a head-normal form (exprOkForSpeculation); see (SW1, SW2). (c) Floating does not require wrapping it in value lambdas (float_is_new_lam). See (SW3) below Wrinkles: (SW1) Concerning (b) I experimented with using `exprIsCheap` rather than - `exprIsHNF` but the latter seems better, according to nofib + `exprOkForSpeculation` but the latter seems better, according to nofib (`spectral/mate` got 10% worse with exprIsCheap). It's really a bit of a heuristic. @@ -758,7 +749,7 @@ Wrinkles: See !12410 for some data comparing the effect of omitting (b) altogether, This doesn't apply, though, if we float the thing to the top level; see Note [Floating to the top]. Bottom line (data from !12410): adding the - not.exprIsHNF test to `saves_work`: + not.exprOkForSpeculation test to `saves_work`: - Decreases compiler allocations by 0.5% - Occasionally decreases runtime allocation (T12996 -2.5%) - Slightly mixed effect on nofib: (puzzle -10%, mate -5%, cichelli +5%) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/366092a0a8edff9ac7f10df90bbc02ef7f3bcd4b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/366092a0a8edff9ac7f10df90bbc02ef7f3bcd4b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 17:29:25 2024 From: gitlab at gitlab.haskell.org (Sven Tennie (@supersven)) Date: Fri, 01 Nov 2024 13:29:25 -0400 Subject: [Git][ghc/ghc][wip/supersven/riscv-vectors] simd000 green Message-ID: <67250ff57b44b_a11419814a8329a4@gitlab.mail> Sven Tennie pushed to branch wip/supersven/riscv-vectors at Glasgow Haskell Compiler / GHC Commits: e8d84f6a by Sven Tennie at 2024-11-01T18:28:38+01:00 simd000 green - - - - - 5 changed files: - compiler/CodeGen.Platform.h - compiler/GHC/CmmToAsm/RV64/CodeGen.hs - compiler/GHC/CmmToAsm/RV64/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Linear/RV64.hs - testsuite/tests/simd/should_run/simd000.hs Changes: ===================================== compiler/CodeGen.Platform.h ===================================== @@ -1171,6 +1171,8 @@ freeReg 8 = False -- made-up inter-procedural (ip) register -- See Note [The made-up RISCV64 TMP (IP) register] freeReg 31 = False +-- reserve v0 as mask operand +freeReg 64 = False # if defined(REG_Base) freeReg REG_Base = False ===================================== compiler/GHC/CmmToAsm/RV64/CodeGen.hs ===================================== @@ -827,19 +827,21 @@ getRegister' config plat expr = --TODO: MO_V_Broadcast with immediate: If the right value is a literal, -- it may use vmv.v.i (simpler) - MO_V_Broadcast _length w -> do + MO_V_Broadcast length w -> do (reg_idx, format_idx, code_idx) <- getSomeReg e let w_idx = formatToWidth format_idx pure $ Any (intFormat w) $ \dst -> code_idx `snocOL` - annExpr expr (VMV (OpReg w dst) (OpReg w_idx reg_idx)) + annExpr expr (VSETIVLI zeroReg (fromIntegral length) w M1 TA MA) `snocOL` + VMV (OpReg w dst) (OpReg w_idx reg_idx) - MO_VF_Broadcast l w -> do + MO_VF_Broadcast length w -> do (reg_idx, format_idx, code_idx) <- getSomeReg e let w_idx = formatToWidth format_idx - pure $ Any (vecFormat (cmmVec l (cmmFloat w))) $ \dst -> + pure $ Any (vecFormat (cmmVec length (cmmFloat w))) $ \dst -> code_idx `snocOL` - annExpr expr (VMV (OpReg w dst) (OpReg w_idx reg_idx)) + annExpr expr (VSETIVLI zeroReg (fromIntegral length) w M1 TA MA) `snocOL` + VMV (OpReg w dst) (OpReg w_idx reg_idx) x -> pprPanic ("getRegister' (monadic CmmMachOp): " ++ show x) (pdoc plat expr) where @@ -1183,7 +1185,8 @@ getRegister' config plat expr = code_idx `snocOL` -- Setup -- vsetivli zero, 1, e32, m1, ta, ma - annExpr expr (VSETIVLI zeroReg 1 W32 M1 TA MA) `snocOL` + -- TODO: Use width + annExpr expr (VSETIVLI zeroReg (fromIntegral length) w M1 TA MA) `snocOL` -- Move selected element to index 0 -- vslidedown.vi v8, v9, 2 VSLIDEDOWN (OpReg width_v tmp) (OpReg width_v reg_v) (OpReg (formatToWidth format_idx) reg_idx) `snocOL` @@ -1238,6 +1241,16 @@ getRegister' config plat expr = | otherwise -> sorry "The RISCV64 backend does not (yet) support vectors." -- TODO: Implement length as immediate + + -- insert_float_into_vector: + -- vsetivli zero, 4, e32, m1, ta, ma + -- vid.v v8 + -- vmseq.vi v0, v8, 2 + -- vfmv.v.f v8, fa0 + -- vmerge.vvm v8, v8, v8, v0 + -- ret + -- + -- https://godbolt.org/z/sEG8MrM8P MO_VF_Insert length w -> do (reg_v, format_v, code_v) <- getSomeReg x @@ -1245,21 +1258,22 @@ getRegister' config plat expr = (reg_idx, format_idx, code_idx) <- getSomeReg z (reg_l, format_l, code_l) <- getSomeReg (CmmLit (CmmInt (toInteger length) W64)) tmp <- getNewRegNat (VecFormat length (floatScalarFormat w)) - -- TODO: FmtInt8 should be FmtInt1 (which does not exist yet, so we're lying here) - reg_mask <- getNewRegNat (VecFormat length FmtInt8) let targetFormat = VecFormat length (floatScalarFormat w) pure $ Any targetFormat $ \dst -> code_v `appOL` code_f `appOL` code_idx `appOL` code_l `snocOL` + annExpr expr (VSETIVLI zeroReg (fromIntegral length) w M1 TA MA) `snocOL` -- Build mask for index -- 1. fill elements with index numbers -- TODO: The Width is made up - annExpr expr (VID (OpReg W8 reg_mask) (OpReg (formatToWidth format_l) reg_l)) `snocOL` - -- Merge with mask -> set element at index - VMSEQ (OpReg W8 reg_mask) (OpReg W8 reg_mask) (OpReg (formatToWidth format_f) reg_f) `snocOL` - VMERGE (OpReg (formatToWidth format_v) dst) (OpReg (formatToWidth format_v) reg_v) (OpReg (formatToWidth format_f) reg_f) (OpReg W8 reg_mask) + VID (OpReg W8 v0Reg) (OpReg (formatToWidth format_l) reg_l) `snocOL` + -- 2. Splat value into tmp vector + VMV (OpReg w tmp) (OpReg (formatToWidth format_f) reg_f) `snocOL` + -- 3. Merge with mask -> set element at index + VMSEQ (OpReg W8 v0Reg) (OpReg W8 v0Reg) (OpReg (formatToWidth format_idx) reg_idx) `snocOL` + VMERGE (OpReg w dst) (OpReg (formatToWidth format_v) reg_v) (OpReg w tmp) (OpReg W8 v0Reg) _ -> pprPanic "getRegister' (unhandled ternary CmmMachOp): " ===================================== compiler/GHC/CmmToAsm/RV64/Ppr.hs ===================================== @@ -718,17 +718,23 @@ pprInstr platform instr = case instr of FNMSub -> text "\tfnmsub" <> dot <> floatPrecission d in op4 fma d r1 r2 r3 - VMV o1@(OpReg w _) o2 | isFloatOp o1 -> op2 (text "\tvfmv" <> dot <> text "f" <> dot <> floatWidthSuffix w) o1 o2 + VMV o1@(OpReg w _) o2 | isFloatOp o1 && isVectorOp o2 -> op2 (text "\tvfmv" <> dot <> text "f" <> dot <> text "s") o1 o2 VMV o1@(OpReg _w _) o2 | isFloatOp o2 -> op2 (text "\tvfmv" <> dot <> opToVInstrSuffix o1 <> dot <> text "f") o1 o2 VMV o1 o2 -> op2 (text "\tvmv" <> dot <> opToVInstrSuffix o1 <> dot <> opToVInstrSuffix o2) o1 o2 - VID o1 o2 -> op2 (text "\tvid.v") o1 o2 - VMSEQ o1 o2 o3 -> op3 (text "\tvmseq.v.x") o1 o2 o3 - VMERGE o1 o2 o3 o4 -> op4 (text "\tvmerge.vxm") o1 o2 o3 o4 + -- TODO: Remove o2 from constructor + VID o1 _o2 -> op1 (text "\tvid.v") o1 + -- TODO: This expects int register as third operand: Generalize by calculating + -- the instruction suffix (".vx") + VMSEQ o1 o2 o3 -> op3 (text "\tvmseq.vx") o1 o2 o3 + -- TODO: All operands need to be vector registers. Make this more general or + -- validate this constraint. + VMERGE o1 o2 o3 o4 -> op4 (text "\tvmerge.vvm") o1 o2 o3 o4 VSLIDEDOWN o1 o2 o3 -> op3 (text "\tvslidedown.vx") o1 o2 o3 VSETIVLI dst len width grouping ta ma -> line $ text "\tvsetivli" <+> pprReg W64 dst <> comma <+> (text.show) len <> comma <+> pprVWidth width <> comma <+> pprGrouping grouping <> comma <+> pprTA ta <> comma <+> pprMasking ma instr -> panic $ "RV64.pprInstr - Unknown instruction: " ++ instrCon instr where + op1 op o1 = line $ op <+> pprOp platform o1 op2 op o1 o2 = line $ op <+> pprOp platform o1 <> comma <+> pprOp platform o2 op3 op o1 o2 o3 = line $ op <+> pprOp platform o1 <> comma <+> pprOp platform o2 <> comma <+> pprOp platform o3 op4 op o1 o2 o3 o4 = line $ op <+> pprOp platform o1 <> comma <+> pprOp platform o2 <> comma <+> pprOp platform o3 <> comma <+> pprOp platform o4 ===================================== compiler/GHC/CmmToAsm/Reg/Linear/RV64.hs ===================================== @@ -84,7 +84,7 @@ getFreeRegs cls (FreeRegs g f v) = -- change often.) allocatableIntRegs = [5 .. 7] ++ [10 .. 17] ++ [28 .. 30] allocatableDoubleRegs = [0 .. 7] ++ [10 .. 17] ++ [28 .. 31] - allocatableVectorRegs = 0 : [7 .. 31] + allocatableVectorRegs = 1 : [7 .. 31] -- | Set corresponding register bit to 0 allocateReg :: (HasCallStack) => RealReg -> FreeRegs -> FreeRegs ===================================== testsuite/tests/simd/should_run/simd000.hs ===================================== @@ -9,12 +9,11 @@ main = do -- FloatX4# case unpackFloatX4# (broadcastFloatX4# 1.5#) of (# a, b, c, d #) -> print (F# a, F# b, F# c, F# d) --- TODO: Uncomment again --- case unpackFloatX4# (packFloatX4# (# 4.5#,7.8#, 2.3#, 6.5# #)) of --- (# a, b, c, d #) -> print (F# a, F# b, F# c, F# d) --- --- -- DoubleX2# --- case unpackDoubleX2# (broadcastDoubleX2# 6.5##) of --- (# a, b #) -> print (D# a, D# b) --- case unpackDoubleX2# (packDoubleX2# (# 8.9##,7.2## #)) of --- (# a, b #) -> print (D# a, D# b) + case unpackFloatX4# (packFloatX4# (# 4.5#,7.8#, 2.3#, 6.5# #)) of + (# a, b, c, d #) -> print (F# a, F# b, F# c, F# d) + + -- DoubleX2# + case unpackDoubleX2# (broadcastDoubleX2# 6.5##) of + (# a, b #) -> print (D# a, D# b) + case unpackDoubleX2# (packDoubleX2# (# 8.9##,7.2## #)) of + (# a, b #) -> print (D# a, D# b) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e8d84f6a448d91eebe48c130b6c66a9ee0ffb9fd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e8d84f6a448d91eebe48c130b6c66a9ee0ffb9fd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 17:36:42 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 01 Nov 2024 13:36:42 -0400 Subject: [Git][ghc/ghc][wip/T20264] 2 commits: More progress Message-ID: <672511aa56c4b_a1141aecdd835755@gitlab.mail> Simon Peyton Jones pushed to branch wip/T20264 at Glasgow Haskell Compiler / GHC Commits: cef80573 by Simon Peyton Jones at 2024-11-01T17:36:04+00:00 More progress - - - - - 8ab34802 by Simon Peyton Jones at 2024-11-01T17:36:15+00:00 Temp debug printing - - - - - 11 changed files: - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Ppr.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Core/TyCo/FVs.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/Utils/Trace.hs Changes: ===================================== compiler/GHC/Core/Opt/Arity.hs ===================================== @@ -1618,6 +1618,9 @@ arityType env (Case scrut bndr _ alts) alts_type = foldr1 (andArityType env) (map arity_type_alt alts) arityType env (Let (NonRec b rhs) e) + | isTyCoVar b -- Totally ignore a type-let or coercion-let + = arityType env e + | otherwise = -- See Note [arityType for non-recursive let-bindings] floatIn rhs_cost (arityType env' e) where @@ -2667,7 +2670,7 @@ Fix 1: Zap `idArity` when analysing recursive RHSs and re-attach the info when (such as dropping of `seq`s when arity > 0) will no longer work in the RHS. Plus it requires non-trivial refactorings to both the simple optimiser (in the way `subst_opt_bndr` is used) as well as the Simplifier (in the way - `simplRecBndrs` and `simplRecJoinBndrs` is used), modifying the SimplEnv's + `simplIdBndrs` and `simplRecJoinBndrs` is used), modifying the SimplEnv's substitution twice in the process. A very complicated stop-gap. Fix 2: Pass the set of enclosing recursive binders to `tryEtaReduce`; these are ===================================== compiler/GHC/Core/Opt/CprAnal.hs ===================================== @@ -344,7 +344,7 @@ cprTransform env id args -- Other local Ids that respond True to 'isDataStructure' but don't have an -- expandable unfolding, such as NOINLINE bindings. They all get a top sig | isLocalId id - = assertPpr (isDataStructure id) (ppr id) topCprType + = assertPpr (isDataStructure id) (ppr id <+> ppr (idArity id) $$ ppr (maybeUnfoldingTemplate (idUnfolding id))) topCprType -- See Note [CPR for DataCon wrappers] | Just rhs <- dataConWrapUnfolding_maybe id = fst $ cprAnalApp env rhs args @@ -512,9 +512,10 @@ cprAnalBind env id rhs = (id, rhs, extendSigEnv env id topCprSig) -- See Note [CPR for data structures] | isDataStructure id -- Data structure => no code => no need to analyse rhs - = (id, rhs, env) + = pprTrace "cprAnalBind" (ppr id <+> ppr (maybeUnfoldingTemplate (idUnfolding id))) $ + (id, rhs, env) | otherwise - = -- pprTrace "cprAnalBind" (ppr id <+> ppr sig <+> ppr sig') + = pprTrace "cprAnalBind2" (ppr id <+> ppr sig <+> ppr sig') (id `setIdCprSig` sig', rhs', env') where (rhs_ty, rhs') = cprAnal env rhs ===================================== compiler/GHC/Core/Opt/OccurAnal.hs ===================================== @@ -354,10 +354,11 @@ through RULES. It only happens for rules whose head is an imported function (B.f in the example above). Solution: - - When simplifying, bring all top level identifiers into - scope at the start, ignoring the Rec/NonRec structure, so - that when 'h' pops up in f's rhs, we find it in the in-scope set - (as the simplifier generally expects). This happens in simplTopBinds. + + - When simplifying, bring all top level identifiers into scope at the start, + ignoring the Rec/NonRec structure, so that when '$sf' pops up in foo's rhs + (during simplification, when applying the RULE), we find it in the in-scope + set (as the simplifier generally expects). This happens in simplTopBinds. - In the occurrence analyser, if there are any out-of-scope occurrences that pop out of the top, which will happen after ===================================== compiler/GHC/Core/Opt/Simplify/Env.hs ===================================== @@ -28,7 +28,8 @@ module GHC.Core.Opt.Simplify.Env ( SimplSR(..), mkContEx, substId, lookupRecBndr, -- * Simplifying binders - simplTopBndrs, simplNonRecBndr, simplNonRecJoinBndr, simplRecBndrs, simplRecJoinBndrs, + simplTyVarBndr, simplIdBndr, simplIdBndrs, + simplNonRecJoinBndr, simplRecJoinBndrs, simplBinder, simplBinders, substTy, substTyVar, getSubst, substCo, substCoVar, @@ -740,13 +741,15 @@ andFF FltOkSpec _ = FltOkSpec andFF FltLifted flt = flt -doFloatFromRhs :: FloatEnable -> TopLevelFlag -> RecFlag -> Bool -> SimplFloats -> OutExpr -> Bool +doFloatFromRhs :: SimplEnv -> TopLevelFlag -> RecFlag -> Bool + -> [OutTyVar] -> SimplFloats -> OutExpr -> Bool -- If you change this function look also at FloatIn.noFloatIntoRhs -doFloatFromRhs fe lvl rec strict_bind (SimplFloats { sfLetFloats = LetFloats fs ff }) rhs - = floatEnabled lvl fe - && not (isNilOL fs) - && want_to_float - && can_float +doFloatFromRhs env lvl rec strict_bind tvs (SimplFloats { sfLetFloats = LetFloats fs ff }) rhs + = not (isNilOL fs) + && floatEnabled lvl (seFloatEnable env) + && want_to_float + && can_float + && not cant_float_types where want_to_float = isTopLevel lvl || exprIsCheap rhs || exprIsExpandable rhs -- See Note [Float when cheap or expandable] @@ -761,6 +764,19 @@ doFloatFromRhs fe lvl rec strict_bind (SimplFloats { sfLetFloats = LetFloats fs floatEnabled lvl FloatNestedOnly = not (isTopLevel lvl) floatEnabled _ FloatEnabled = True + float_bndrs = bindersOfBinds $ fromOL fs + + -- Currently we sadly can't float if we have + -- /\a. let @b = [a] in blah + -- becuase we don't have type-lambda + cant_float_types + | not (null tvs), any isTyCoVar float_bndrs + = (pprTraceWhen (any isId float_bndrs) + "WARNING-TyCo: skipping abstractFloats" (ppr fs)) $ + True + | otherwise + = False + {- Note [Float when cheap or expandable] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -894,9 +910,10 @@ addJoinFlts = appOL mkRecFloats :: SimplFloats -> SimplFloats -- Flattens the floats into a single Rec group, --- They must either all be lifted LetFloats or all JoinFloats +-- They must either all be lifted LetFloats or all JoinFloats -- If any are type bindings they must be non-recursive, so --- do not need to be joined into a letrec +-- do not need to be joined into a letrec; indeed they must not +-- since Rec{} is not allowed to have type binders mkRecFloats floats@(SimplFloats { sfLetFloats = LetFloats bs ff , sfJoinFloats = join_bs , sfInScope = in_scope }) @@ -995,7 +1012,7 @@ refineFromInScope in_scope v | otherwise = v lookupRecBndr :: SimplEnv -> InId -> OutId --- Look up an Id which has been put into the envt by simplRecBndrs, +-- Look up an Id which has been put into the envt by simplIdBndrs, -- but where we have not yet done its RHS -- lookupRecBndr (SimplEnv { seInScope = in_scope, seTvSubst = tvs }) v -- | isTyVar v @@ -1061,44 +1078,40 @@ simplBinder :: SimplEnv -> InBndr -> SimplM (SimplEnv, OutBndr) -- The substitution is extended only if the variable is cloned, because -- we *don't* need to use it to track occurrence info. simplBinder !env bndr - | isTyVar bndr = do { let (env', tv) = substTyVarBndr env bndr - ; seqTyVar tv `seq` return (env', tv) } - | otherwise = do { let (env', id) = substIdBndr env bndr - ; seqId id `seq` return (env', id) } + | isTyVar bndr = simplTyVarBndr env bndr + | otherwise = simplIdBndr env bndr --------------- -simplNonRecBndr :: SimplEnv -> InBndr -> SimplM (SimplEnv, OutBndr) --- A non-recursive let binder -simplNonRecBndr !env bndr - -- See Note [Bangs in the Simplifier] - = do { let (!env1, bndr1) = substBndr env bndr - ; seqVar bndr1 `seq` return (env1, bndr1) } +simplTyVarBndr :: SimplEnv -> InTyVar -> SimplM (SimplEnv, OutTyVar) +simplTyVarBndr env tv + = do { let (env', tv1) = substTyVarBndr env tv + ; seqTyVar tv1 `seq` return (env', tv1) } --------------- -simplRecBndrs :: SimplEnv -> [InBndr] -> SimplM SimplEnv --- Recursive let binders -simplRecBndrs env@(SimplEnv {}) bndrs +simplIdBndr :: SimplEnv -> InId -> SimplM (SimplEnv, OutId) +-- A non-recursive let binder +-- The returned Id has no unfolding or rules; we add those later +simplIdBndr !env id -- See Note [Bangs in the Simplifier] - = assert (all (not . isJoinId) bndrs) $ - do { let (!env1, bndrs1) = mapAccumL substIdBndr env bndrs - ; seqVars bndrs1 `seq` return env1 } + = do { let (!env1, id1) = substIdBndr env id + ; seqId id1 `seq` return (env1, id1) } --------------- -simplTopBndrs :: SimplEnv -> [InBndr] -> SimplM SimplEnv -simplTopBndrs env@(SimplEnv {}) bndrs +simplIdBndrs :: SimplEnv -> [InId] -> SimplM SimplEnv +-- Used for recursive let binders: Ids only +-- No fancy knot-tying! We simply go through the binders in +-- (arbitrary) order. For each: +-- - applying the substitution to its type +-- - clone the Unique if it's already in scope +-- The returned Ids have no unfolding or rules; we add those later +simplIdBndrs env@(SimplEnv {}) ids -- See Note [Bangs in the Simplifier] - = assert (all (not . isJoinId) bndrs) $ - do { let (!env1, bndrs1) = mapAccumL substBndr env bndrs - ; seqVars bndrs1 `seq` return env1 } - ---------------- -substBndr :: HasDebugCallStack => SimplEnv -> InBndr -> (SimplEnv, OutBndr) -substBndr env bndr - | isTyVar bndr = substTyVarBndr env bndr - | otherwise = substIdBndr env bndr + = assert (all (not . isJoinId) ids) $ + do { let (!env1, ids1) = mapAccumL substIdBndr env ids + ; seqIds ids1 `seq` return env1 } --------------- -substIdBndr :: HasDebugCallStack => SimplEnv -> InBndr -> (SimplEnv, OutBndr) +substIdBndr :: HasDebugCallStack => SimplEnv -> InId -> (SimplEnv, OutId) -- Might be a coercion variable substIdBndr env bndr | isCoVar bndr = substCoVarBndr env bndr @@ -1196,15 +1209,6 @@ seqIds :: [Id] -> () seqIds [] = () seqIds (id:ids) = seqId id `seq` seqIds ids -seqVar :: Var -> () -seqVar var - | isTyVar var = seqTyVar var - | otherwise = seqId var - -seqVars :: [Var] -> () -seqVars [] = () -seqVars (var:vars) = seqVar var `seq` seqVars vars - {- Note [Arity robustness] ~~~~~~~~~~~~~~~~~~~~~~~ ===================================== compiler/GHC/Core/Opt/Simplify/Iteration.hs ===================================== @@ -54,7 +54,7 @@ import GHC.Types.Demand import GHC.Types.Unique ( hasKey ) import GHC.Types.Basic import GHC.Types.Tickish -import GHC.Types.Var ( isTyCoVar ) +import GHC.Types.Var ( isTyCoVar, setTyVarUnfolding ) import GHC.Builtin.Types.Prim( realWorldStatePrimTy ) import GHC.Builtin.Names( runRWKey, seqHashKey ) @@ -205,22 +205,26 @@ simplTopBinds env0 binds0 -- It's rather as if the top-level binders were imported. -- See Note [Glomming] in "GHC.Core.Opt.OccurAnal". -- See Note [Bangs in the Simplifier] - ; !env1 <- {-#SCC "simplTopBinds-simplRecBndrs" #-} simplTopBndrs env0 (bindersOfBinds binds0) - ; (floats, env2) <- {-#SCC "simplTopBinds-simpl_binds" #-} simpl_binds env1 binds0 + ; (ty_floats, env1) <- {-#SCC "simplTopBinds-simplRecBndrs" #-} + simplTopTyVarBinds env0 binds0 + ; (val_floats, env2) <- {-#SCC "simplTopBinds-simpl_binds" #-} + simpl_binds env1 binds0 ; freeTick SimplifierDone - ; return (floats, env2) } + ; return (ty_floats `addFloats` val_floats, env2) } where - -- We need to track the zapped top-level binders, because - -- they should have their fragile IdInfo zapped (notably occurrence info) - -- That's why we run down binds and bndrs' simultaneously. - -- simpl_binds :: SimplEnv -> [InBind] -> SimplM (SimplFloats, SimplEnv) - simpl_binds env [] = return (emptyFloats env, env) - simpl_binds env (bind:binds) = do { (float, env1) <- simpl_bind env bind - ; (floats, env2) <- simpl_binds env1 binds - -- See Note [Bangs in the Simplifier] - ; let !floats1 = float `addFloats` floats - ; return (floats1, env2) } + simpl_binds env [] + = return (emptyFloats env, env) + + simpl_binds env (bind:binds) + | isTypeBind bind -- Already done! + = simpl_binds env binds + | otherwise + = do { (float, env1) <- simpl_bind env bind + ; (floats, env2) <- simpl_binds env1 binds + -- See Note [Bangs in the Simplifier] + ; let !floats1 = float `addFloats` floats + ; return (floats1, env2) } simpl_bind env (Rec pairs) = simplRecBind env (BC_Let TopLevel Recursive) pairs @@ -230,6 +234,80 @@ simplTopBinds env0 binds0 ; (env', b') <- addBndrRules env bind_cxt b b' ; simplRecOrTopPair env' bind_cxt b b' r } + +------------------------------------------- +simplTopTyVarBinds :: SimplEnv -> [InBind] + -> SimplM (SimplFloats, SimplEnv) +-- Simplify the /type/ bindings, and bring them all to the front +-- Substitute in the binders of the /value/ bindings, and bring +-- them into scope +simplTopTyVarBinds env [] + = return (emptyFloats env, env) + +simplTopTyVarBinds env (b:bs) + | Just (tv, rhs_ty) <- isTypeBind_maybe b + = assertPpr (isTyVar tv) (ppr tv) $ + do { (tbs1, env1) <- simplTyVarBind env tv rhs_ty + ; (tbs2, env') <- simplTopTyVarBinds env1 bs + ; return (tbs1 `addFloats` tbs2, env') } + + | otherwise + = do { env1 <- simplIdBndrs env (bindersOf b) + -- Bring all the value binders into scope + -- in env1, substituting in their types + ; simplTopTyVarBinds env1 bs } + +{- Note [Top level bindings] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +When simplifying the top level bindings, we do two slightly surprising things: + +* We add all the top level Ids into the InScopeSet right at the start. Why? + See Note [Glomming] in GHC.Core.Opt.OccurAnal. This consists mainly of + calling simplIdBndrs on all the top-level value binders. They'll get added + to the InScopeSet shorn of their unfoldings and rules, but that's fine; + only back-refs will see these less-useful versions. + +* When we bring them into scope, we'd better add them /with their correct type/. + That's a bit tricky becuase of type bindings. + @a = Int + f :: a = 3 + We might decide to inline a unconditionally, dropping its binding. If so, + we should not add (f::a) to the InScopeSet + + Solution, implemented in `simplTopVarBinds`: + * First, simplify all the type-bindings, and bring them to the front. + * Then we can apply that substitution to the type of `f`, before + adding it to the in-scope set +-} + +{- ********************************************************************* +* * + TyVar bindings +* * +********************************************************************* -} + +simplTyVarBind :: SimplEnv -> InTyVar -> InType + -> SimplM (SimplFloats, SimplEnv) +-- Returned SimplFloats is empty, or singleton type binding +simplTyVarBind env tv ty + | Just env' <- preInlineTypeUnconditionally env tv ty + = return (emptyFloats env', env') + | otherwise + = do { ty' <- simplType env ty + ; completeTyVarBindX env tv ty' } + +completeTyVarBindX :: SimplEnv -> InTyVar -> OutType + -> SimplM (SimplFloats, SimplEnv) +completeTyVarBindX env in_tv out_ty + | postInlineTypeUnconditionally out_ty + = return (emptyFloats env, extendTvSubst env in_tv out_ty) + + | otherwise + = do { (env1, out_tv) <- simplTyVarBndr env in_tv + ; let out_tv_w_unf = out_tv `setTyVarUnfolding` out_ty + env2 = extendTvSubst env1 in_tv (mkTyVarTy out_tv_w_unf) + ; return (mkFloatBind env2 (NonRec out_tv_w_unf (Type out_ty))) } + {- ************************************************************************ * * @@ -277,6 +355,7 @@ simplRecOrTopPair :: SimplEnv -> BindContext -> InId -> OutBndr -> InExpr -- Binder and rhs -> SimplM (SimplFloats, SimplEnv) +-- Precondition: not a TyVar binding simplRecOrTopPair env bind_cxt old_bndr new_bndr rhs | Just env' <- preInlineUnconditionally env (bindContextLevel bind_cxt) @@ -286,10 +365,6 @@ simplRecOrTopPair env bind_cxt old_bndr new_bndr rhs do { tick (PreInlineUnconditionally old_bndr) ; return ( emptyFloats env, env' ) } - | Type ty <- rhs - = do { ty' <- simplType env ty - ; return (mkTyVarFloatBind env old_bndr new_bndr ty') } - | otherwise = assertPpr (isId old_bndr) (ppr old_bndr) $ case bind_cxt of @@ -318,15 +393,15 @@ simplLazyBind :: TopLevelFlag -> RecFlag -> SimplM (SimplFloats, SimplEnv) -- Precondition: Ids only, no TyVars; not a JoinId -- Precondition: rhs obeys the let-can-float invariant -simplLazyBind top_lvl is_rec (bndr,unf_se) (bndr1,env) (rhs,rhs_se) - = assert (isId bndr ) - assertPpr (not (isJoinId bndr)) (ppr bndr) $ - -- pprTrace "simplLazyBind" ((ppr bndr <+> ppr bndr1) $$ ppr rhs $$ ppr (seIdSubst rhs_se)) $ +simplLazyBind top_lvl is_rec (in_bndr,unf_se) (out_bndr,env) (rhs,rhs_se) + = assert (isId in_bndr ) + assertPpr (not (isJoinId in_bndr)) (ppr in_bndr) $ + -- pprTrace "simplLazyBind" ((ppr in_bndr <+> ppr out_bndr) $$ ppr rhs $$ ppr (seIdSubst rhs_se)) $ do { let !rhs_env = rhs_se `setInScopeFromE` env -- See Note [Bangs in the Simplifier] - (tvs, body) = case collectTyAndValBinders rhs of - (tvs, [], body) - | surely_not_lam body -> (tvs, body) - _ -> ([], rhs) + (in_tvs, body) = case collectTyAndValBinders rhs of + (tvs, [], body) + | surely_not_lam body -> (tvs, body) + _ -> ([], rhs) surely_not_lam (Lam {}) = False surely_not_lam (Tick t e) @@ -338,53 +413,45 @@ simplLazyBind top_lvl is_rec (bndr,unf_se) (bndr1,env) (rhs,rhs_se) -- f = /\a. \x. g a x -- should eta-reduce. - ; (body_env, tvs') <- {-#SCC "simplBinders" #-} simplBinders rhs_env tvs + ; (body_env, out_tvs) <- {-#SCC "simplBinders" #-} simplBinders rhs_env in_tvs -- See Note [Floating and type abstraction] in GHC.Core.Opt.Simplify.Utils -- Simplify the RHS ; let rhs_cont = mkRhsStop (substTy body_env (exprType body)) - is_rec (idDemandInfo bndr) + is_rec (idDemandInfo in_bndr) ; (body_floats0, body0) <- {-#SCC "simplExprF" #-} simplExprF body_env body rhs_cont - ; (if isTopLevel top_lvl then pprTrace "simplLazyBind" (ppr bndr <+> ppr body_floats0 $$ ppr body0) else id) $ - return () +-- ; (if isTopLevel top_lvl +-- then pprTrace "simplLazyBind" (ppr in_bndr <+> ppr body_floats0 $$ ppr body0) +-- else id) $ +-- return () -- ANF-ise a constructor or PAP rhs ; (body_floats2, body2) <- {-#SCC "prepareBinding" #-} prepareBinding env top_lvl is_rec False -- Not strict; this is simplLazyBind - bndr1 body_floats0 body0 - -- Subtle point: we do not need or want tvs' in the InScope set + out_bndr out_tvs body_floats0 body0 + -- Subtle point: we do not need or want out_tvs in the InScope set -- of body_floats2, so we pass in 'env' not 'body_env'. - -- Don't want: if tvs' are in-scope in the scope of this let-binding, we may do + -- Don't want: if out_tvs are in-scope in the scope of this let-binding, we may do -- more renaming than necessary => extra work (see !7777 and test T16577). - -- Don't need: we wrap tvs' around the RHS anyway. - - ; let float_bndrs2 = bindersOfBinds $ letFloatBinds $ sfLetFloats body_floats2 - -- float_bndrs2 used only in debugging + -- Don't need: we wrap out_tvs around the RHS anyway. ; (rhs_floats, body3) - <- if isEmptyFloats body_floats2 || null tvs then -- Simple floating + <- if isEmptyFloats body_floats2 || null in_tvs then -- Simple floating {-#SCC "simplLazyBind-simple-floating" #-} return (body_floats2, body2) - else if any isTyCoVar float_bndrs2 - then (if not (any isId float_bndrs2) then id - else pprTrace "WARNING-TyCo: skipping abstractFloats" - (ppr bndr $$ ppr body_floats2)) $ - -- No Float because of the type bindings - return (emptyFloats env, wrapFloats body_floats2 body2) - else -- Non-empty floats, and non-empty tyvars: do type-abstraction first {-#SCC "simplLazyBind-type-abstraction-first" #-} do { (poly_binds, body3) <- abstractFloats (seUnfoldingOpts env) top_lvl - tvs' body_floats2 body2 + out_tvs body_floats2 body2 ; let poly_floats = foldl' extendFloats (emptyFloats env) poly_binds ; return (poly_floats, body3) } ; let env1 = env `setInScopeFromF` rhs_floats - ; rhs' <- rebuildLam env1 tvs' body3 rhs_cont - ; (bind_float, env2) <- completeBind (BC_Let top_lvl is_rec) (bndr,unf_se) (bndr1,rhs',env1) + ; rhs' <- rebuildLam env1 out_tvs body3 rhs_cont + ; (bind_float, env2) <- completeBind (BC_Let top_lvl is_rec) (in_bndr,unf_se) (out_bndr,rhs',env1) ; return (rhs_floats `addFloats` bind_float, env2) } -------------------------- @@ -615,7 +682,7 @@ tryCastWorkerWrapper env bind_cxt old_bndr bndr (Cast rhs co) is_strict = isStrictId bndr ; (rhs_floats, work_rhs) <- prepareBinding env top_lvl is_rec is_strict - work_id (emptyFloats env) rhs + work_id [] (emptyFloats env) rhs ; work_unf <- mk_worker_unfolding top_lvl work_id work_rhs ; let work_id_w_unf = work_id `setIdUnfolding` work_unf @@ -667,9 +734,9 @@ tryCastWorkerWrapper env bind_cxt old_bndr bndr (Cast rhs co) _ -> mkLetUnfolding env top_lvl VanillaSrc work_id False work_rhs tryCastWorkerWrapper env _ _ bndr rhs -- All other bindings - = do { traceSmpl "tcww:no" (vcat [ text "bndr:" <+> ppr bndr - , text "rhs:" <+> ppr rhs ]) - ; return (mkFloatBind env (NonRec bndr rhs)) } + = do { -- traceSmpl "tcww:no" (vcat [ text "bndr:" <+> ppr bndr + -- , text "rhs:" <+> ppr rhs ]) + return (mkFloatBind env (NonRec bndr rhs)) } mkCastWrapperInlinePrag :: InlinePragma -> InlinePragma -- See Note [Cast worker/wrapper] @@ -694,8 +761,10 @@ mkCastWrapperInlinePrag (InlinePragma { inl_inline = fn_inl, inl_act = fn_act, i ********************************************************************* -} prepareBinding :: SimplEnv -> TopLevelFlag -> RecFlag -> Bool - -> Id -- Used only for its OccName; can be InId or OutId - -> SimplFloats -> OutExpr + -> OutId -- Used only for its OccName + -> [OutTyVar] -- Type lambdas wrapped around this RHS + -> SimplFloats -- Floats from the RHS + -> OutExpr -- The rest of the RHS, inside the floats -> SimplM (SimplFloats, OutExpr) -- In (prepareBinding ... bndr floats rhs), the binding is really just -- bndr = let floats in rhs @@ -708,7 +777,7 @@ prepareBinding :: SimplEnv -> TopLevelFlag -> RecFlag -> Bool -- That's what prepareBinding does -- Precondition: binder is not a JoinId -- Postcondition: the returned SimplFloats contains only let-floats -prepareBinding env top_lvl is_rec strict_bind bndr rhs_floats rhs +prepareBinding env top_lvl is_rec strict_bind bndr tvs rhs_floats rhs = do { -- Never float join-floats out of a non-join let-binding (which this is) -- So wrap the body in the join-floats right now -- Hence: rhs_floats1 consists only of let-floats @@ -725,7 +794,7 @@ prepareBinding env top_lvl is_rec strict_bind bndr rhs_floats rhs -- Finally, decide whether or not to float ; let all_floats = rhs_floats1 `addLetFloats` anf_floats - ; if doFloatFromRhs (seFloatEnable env) top_lvl is_rec strict_bind all_floats rhs2 + ; if doFloatFromRhs env top_lvl is_rec strict_bind tvs all_floats rhs2 then -- Float! do { tick LetFloatFromLet ; return (all_floats, rhs2) } @@ -1263,6 +1332,12 @@ simplExprF1 env (Let (Rec pairs) body) cont = {-#SCC "simplRecE" #-} simplRecE env pairs body cont simplExprF1 env (Let (NonRec bndr rhs) body) cont + | Type ty <- rhs + = assert (isTyVar bndr) $ + do { (floats1, env1) <- simplTyVarBind env bndr ty + ; (floats2, expr') <- simplExprF env1 body cont + ; return (floats1 `addFloats` floats2, expr') } + | Just env' <- preInlineUnconditionally env NotTopLevel bndr rhs env -- Because of the let-can-float invariant, it's ok to -- inline freely, or to drop the binding if it is dead. @@ -1575,7 +1650,7 @@ completeBindX :: SimplEnv completeBindX env from_what bndr rhs body cont | FromBeta arg_levity <- from_what , needsCaseBindingL arg_levity rhs -- Enforcing the let-can-float-invariant - = do { (env1, bndr1) <- simplNonRecBndr env bndr -- Lambda binders don't have rules + = do { (env1, bndr1) <- simplIdBndr env bndr -- Lambda binders don't have rules ; (floats, expr') <- simplNonRecBody env1 from_what body cont -- Do not float floats past the Case binder below ; let expr'' = wrapFloats floats expr' @@ -1583,7 +1658,7 @@ completeBindX env from_what bndr rhs body cont ; return (emptyFloats env, case_expr) } | otherwise -- Make a let-binding - = do { (env1, bndr1) <- simplNonRecBndr env bndr + = do { (env1, bndr1) <- simplIdBndr env bndr ; (env2, bndr2) <- addBndrRules env1 (BC_Let NotTopLevel NonRecursive) bndr bndr1 ; let is_strict = isStrictId bndr2 @@ -1592,7 +1667,7 @@ completeBindX env from_what bndr rhs body cont -- c.f. Note [Dark corner with representation polymorphism] ; (rhs_floats, rhs1) <- prepareBinding env NotTopLevel NonRecursive is_strict - bndr2 (emptyFloats env) rhs + bndr2 [] (emptyFloats env) rhs -- NB: it makes a surprisingly big difference (5% in compiler allocation -- in T9630) to pass 'env' rather than 'env1'. It's fine to pass 'env', -- because this is completeBindX, so bndr is not in scope in the RHS. @@ -1890,8 +1965,7 @@ simplLamBndrs env bndrs = mapAccumLM simplLamBndr env bndrs simplNonRecE :: HasDebugCallStack => SimplEnv -> FromWhat - -> InVar -- The binder, may be a TyVar - -- Never a join point + -> InId -- Never a TyVar, nor a join point -- The static env for its unfolding (if any) is the first parameter -> (InExpr, SimplEnv) -- Rhs of binding (or arg of lambda) -> InExpr -- Body of the let/lambda @@ -1906,6 +1980,8 @@ simplNonRecE :: HasDebugCallStack -- = let env in -- cont< let b = rhs_se(rhs) in body > -- +-- preInlineUnconditionally is already dealt with, as are join points +-- -- It deals with strict bindings, via the StrictBind continuation, -- which may abort the whole process. -- @@ -1913,13 +1989,6 @@ simplNonRecE :: HasDebugCallStack -- Otherwise it may or may not satisfy it. simplNonRecE env from_what bndr (rhs, rhs_se) body cont - | Type ty <- rhs - = assert (isTyVar bndr) $ - do { ty' <- simplType (rhs_se `setInScopeFromE` env) ty - ; (floats1, env1) <- completeTyVarBindX env bndr ty' - ; (floats2, expr') <- simplNonRecBody env1 from_what body cont - ; return (floats1 `addFloats` floats2, expr') } - | assert (isId bndr && not (isJoinId bndr) ) $ is_strict_bind = -- Evaluate RHS strictly @@ -1928,7 +1997,7 @@ simplNonRecE env from_what bndr (rhs, rhs_se) body cont , sc_env = env, sc_cont = cont, sc_dup = NoDup }) | otherwise -- Evaluate RHS lazily - = do { (env1, bndr1) <- simplNonRecBndr env bndr + = do { (env1, bndr1) <- simplIdBndr env bndr ; (env2, bndr2) <- addBndrRules env1 (BC_Let NotTopLevel NonRecursive) bndr bndr1 ; (floats1, env3) <- simplLazyBind NotTopLevel NonRecursive (bndr,env) (bndr2,env2) (rhs,rhs_se) @@ -1945,14 +2014,6 @@ simplNonRecE env from_what bndr (rhs, rhs_se) body cont -- (FromBeta Lifted) or FromLet: look at the demand info _ -> seCaseCase env && isStrUsedDmd (idDemandInfo bndr) -completeTyVarBindX :: SimplEnv -> InTyVar -> OutType -> SimplM (SimplFloats, SimplEnv) -completeTyVarBindX env tv rhs_ty - | postInlineTypeUnconditionally rhs_ty - = return (emptyFloats env, extendTvSubst env tv rhs_ty) - | otherwise - = do { (env1, tv1) <- simplNonRecBndr env tv - ; return (mkTyVarFloatBind env1 tv tv1 rhs_ty) } - ------------------ simplRecE :: SimplEnv -> [(InId, InExpr)] @@ -1966,7 +2027,7 @@ simplRecE :: SimplEnv simplRecE env pairs body cont = do { let bndrs = map fst pairs ; massert (all (not . isJoinId) bndrs) - ; env1 <- simplRecBndrs env bndrs + ; env1 <- simplIdBndrs env bndrs -- NB: bndrs' don't have unfoldings or rules -- We add them as we go down ; (floats1, env2) <- simplRecBind env1 (BC_Let NotTopLevel Recursive) pairs @@ -3397,9 +3458,9 @@ simplAlts :: SimplEnv -> SimplM OutExpr -- Returns the complete simplified case expression simplAlts env0 scrut case_bndr alts cont' - = do { traceSmpl "simplAlts" (vcat [ ppr case_bndr - , text "cont':" <+> ppr cont' - , text "in_scope" <+> ppr (seInScope env0) ]) + = do { -- traceSmpl "simplAlts" (vcat [ ppr case_bndr + -- , text "cont':" <+> ppr cont' + -- , text "in_scope" <+> ppr (seInScope env0) ]) ; (env1, case_bndr1) <- simplBinder env0 case_bndr ; let case_bndr2 = case_bndr1 `setIdUnfolding` evaldUnfolding env2 = modifyInScope env1 case_bndr2 ===================================== compiler/GHC/Core/Opt/Simplify/Utils.hs ===================================== @@ -12,8 +12,8 @@ module GHC.Core.Opt.Simplify.Utils ( tryEtaExpandRhs, wantEtaExpansion, -- Inlining, - preInlineUnconditionally, postInlineUnconditionally, - postInlineTypeUnconditionally, + preInlineUnconditionally, preInlineTypeUnconditionally, + postInlineUnconditionally, postInlineTypeUnconditionally, activeRule, getUnfoldingInRuleMatch, updModeForStableUnfoldings, updModeForRules, @@ -1455,9 +1455,23 @@ is a term (not a coercion) so we can't necessarily inline the latter in the former. -} +preInlineTypeUnconditionally :: SimplEnv -> InTyVar -> InType -> Maybe SimplEnv +preInlineTypeUnconditionally env tv rhs_ty + | not (sePreInline env) + = Nothing + + -- Inline unconditionally if it occurs exactly once, inside a lambda or not. + -- No work is wasted by substituting inside a lambda, although if the + -- lambda is inlined a lot, we migth duplicate the type. + | OneOcc{ occ_n_br = 1 } <- tyVarOccInfo tv + = Just $! extendTvSubst env tv $! substTy env rhs_ty + + | otherwise + = Nothing + preInlineUnconditionally :: SimplEnv -> TopLevelFlag - -> InVar -- Works for TyVar, CoVar, and Id + -> InId -- Works for CoVar, and Id; not a TyVar -> InExpr -> StaticEnv -- These two go together -> Maybe SimplEnv -- Returned env has extended substitution -- Precondition: rhs satisfies the let-can-float invariant @@ -1465,18 +1479,8 @@ preInlineUnconditionally -- Reason: we don't want to inline single uses, or discard dead bindings, -- for unlifted, side-effect-ful bindings preInlineUnconditionally env top_lvl bndr rhs rhs_env - | not pre_inline_unconditionally = Nothing - - -- First deal with type variables; inline unconditionally - -- if it occurs exactly once, inside a lambda or not - -- No work is wasted by substituting inside a lambda, although - -- if the lambea is inlined a lot, we migth dupliate the type. - | isTyVar bndr - = case (tyVarOccInfo bndr, rhs) of - (OneOcc{ occ_n_br = 1 }, Type ty) -> Just $! (extend_tv_subst_with ty) - _ -> Nothing - - -- Now we are onto Ids + | assertPpr (isId bndr) (ppr bndr) $ + not pre_inline_unconditionally = Nothing | not active = Nothing | isTopLevel top_lvl && isDeadEndId bndr = Nothing -- Note [Top-level bottoming Ids] | isCoVar bndr = Nothing -- Note [Do not inline CoVars unconditionally] @@ -1492,7 +1496,6 @@ preInlineUnconditionally env top_lvl bndr rhs rhs_env where unf = idUnfolding bndr extend_id_subst_with inl_rhs = extendIdSubst env bndr $! (mkContEx rhs_env inl_rhs) - extend_tv_subst_with ty = extendTvSubst env bndr $! (substTy rhs_env ty) one_occ IAmDead = True -- Happens in ((\x.1) v) one_occ OneOcc{ occ_n_br = 1 @@ -1604,7 +1607,7 @@ rules] for details. -} postInlineTypeUnconditionally :: Type -> Bool -postInlineTypeUnconditionally _ = False +postInlineTypeUnconditionally _ = False -- For now postInlineUnconditionally :: SimplEnv -> BindContext ===================================== compiler/GHC/Core/Ppr.hs ===================================== @@ -191,7 +191,7 @@ ppr_expr :: OutputableBndr b => (SDoc -> SDoc) -> Expr b -> SDoc -- The function adds parens in context that need -- an atomic value (e.g. function args) -ppr_expr add_par (Var id) = ppr_id_occ add_par id +ppr_expr add_par (Var id) = ppr_id_occ add_par id <> braces (text $ case (maybeUnfoldingTemplate (idUnfolding id)) of { Just{} -> "has-unf" ; Nothing -> "no-unf" }) ppr_expr add_par (Type ty) = add_par (text "TYPE:" <+> ppr ty) -- Weird ppr_expr add_par (Coercion co) = add_par (text "CO:" <+> ppr co) ppr_expr add_par (Lit lit) = pprLiteral add_par lit @@ -234,7 +234,7 @@ ppr_expr add_par expr@(App {}) _ -> parens (hang fun_doc 2 pp_args) where - fun_doc = ppr_id_occ noParens f + fun_doc = ppr_id_occ noParens f <> braces (text $ case (maybeUnfoldingTemplate (idUnfolding f)) of { Just{} -> "has-unf" ; Nothing -> "no-unf" }) _ -> parens (hang (pprParendExpr fun) 2 pp_args) } ===================================== compiler/GHC/Core/Subst.hs ===================================== @@ -43,8 +43,7 @@ import GHC.Core.Utils -- We are defining local versions import GHC.Core.Type hiding ( substTy ) -import GHC.Core.Coercion - ( tyCoFVsOfCo, mkCoVarCo, substCoVarBndr ) +import GHC.Core.Coercion ( tyCoFVsOfCo, mkCoVarCo, substCoVarBndr ) import GHC.Types.Var.Set import GHC.Types.Var.Env as InScopeSet @@ -370,11 +369,7 @@ substIdBndr :: HasDebugCallStack -> (Subst, Id) -- ^ Transformed pair -- NB: unfolding may be zapped -substIdBndr _doc rec_subst subst old_id - = assertPpr (isId old_id) (ppr old_id) $ - substIdBndr' _doc rec_subst subst old_id - -substIdBndr' _doc rec_subst subst@(Subst in_scope env tvs cvs) old_id +substIdBndr _doc rec_subst subst@(Subst in_scope env tvs cvs) old_id = (Subst new_in_scope new_env tvs cvs, new_id) where id1 = uniqAway in_scope old_id -- id1 is cloned if necessary ===================================== compiler/GHC/Core/TyCo/FVs.hs ===================================== @@ -1077,10 +1077,11 @@ scopedSort = go [] [] | otherwise = (tv:a:as, fvs `unionVarSet` fv_tv : fvs : fvss) where - -- If tv has an unfolding, expand it instead of looking at its kind - fv_tv = case tyVarUnfolding_maybe tv of + -- If tv has an unfolding, expand it + fv_tv = tyCoVarsOfType (tyVarKind tv) `unionVarSet` + case tyVarUnfolding_maybe tv of Just ty -> tyCoVarsOfType ty - Nothing -> tyCoVarsOfType (tyVarKind tv) + Nothing -> emptyVarSet -- lists not in correspondence insert _ _ _ = panic "scopedSort" ===================================== compiler/GHC/Core/Utils.hs ===================================== @@ -54,7 +54,7 @@ module GHC.Core.Utils ( collectMakeStaticArgs, -- * Predicates on binds - isJoinBind, isTypeBind, isTyCoBind, + isJoinBind, isTypeBind, isTypeBind_maybe, isTyCoBind, -- * Tag inference mkStrictFieldSeqs, shouldStrictifyIdForCbv, shouldUseCbvForId, @@ -2775,6 +2775,10 @@ isTypeBind :: Bind b -> Bool isTypeBind (NonRec _ (Type {})) = True isTypeBind _ = False +isTypeBind_maybe :: Bind b -> Maybe (b, Type) +isTypeBind_maybe (NonRec tv (Type rhs_ty)) = Just (tv,rhs_ty) +isTypeBind_maybe _ = Nothing + -- | `isTypeBind` is True of type bindings (@a = Type ty) isTyCoBind :: Bind b -> Bool isTyCoBind (NonRec _ (Type {})) = True ===================================== compiler/GHC/Utils/Trace.hs ===================================== @@ -1,6 +1,7 @@ -- | Tracing utilities module GHC.Utils.Trace ( pprTrace + , pprTraceWhen , pprTraceM , pprTraceDebug , pprTraceIt @@ -42,6 +43,12 @@ pprTrace str doc x | unsafeHasNoDebugOutput = x | otherwise = pprDebugAndThen traceSDocContext trace (text str) doc x +pprTraceWhen :: Bool -> String -> SDoc -> a -> a +pprTraceWhen do_trace str doc x + | not do_trace = x + | unsafeHasNoDebugOutput = x + | otherwise = pprDebugAndThen traceSDocContext trace (text str) doc x + pprTraceM :: Applicative f => String -> SDoc -> f () pprTraceM str doc = pprTrace str doc (pure ()) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dc780436d233e1ea8d892ea659f28721efca09d9...8ab348029e635aef41670ea094cc4ba11f47fd30 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dc780436d233e1ea8d892ea659f28721efca09d9...8ab348029e635aef41670ea094cc4ba11f47fd30 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 18:07:43 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Fri, 01 Nov 2024 14:07:43 -0400 Subject: [Git][ghc/ghc][wip/hnf-spec] 3 commits: Make exprIsHNF imply exprOkForSpeculation Message-ID: <672518ef12395_a1141cd53984530@gitlab.mail> Sebastian Graf pushed to branch wip/hnf-spec at Glasgow Haskell Compiler / GHC Commits: dd212b91 by Sebastian Graf at 2024-11-01T19:06:52+01:00 Make exprIsHNF imply exprOkForSpeculation Fixes #23256 because SetLevels and CSE no longer do a reverse binder swap. Furthermore, we no longer need to check for exprIsHNF when exprOkForSpeculation fails. Also fixes #25423. - - - - - 49881df2 by Sebastian Graf at 2024-11-01T19:06:52+01:00 SetLevels: Use `exprOkForSpeculation` instead of `exprIsHNF` - - - - - 38b99494 by Sebastian Graf at 2024-11-01T19:06:52+01:00 Prep: Fix outcommented debug pretty-printing logic - - - - - 11 changed files: - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/SetLevels.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - + testsuite/tests/simplCore/should_compile/T25423.hs - + testsuite/tests/simplCore/should_compile/T25423.stderr - testsuite/tests/simplCore/should_compile/all.T Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -592,7 +592,7 @@ lintLetBind top_lvl rec_flag binder rhs rhs_ty || (isNonRec rec_flag && exprOkForSpeculation rhs) || isDataConWorkId binder || isDataConWrapId binder -- until #17521 is fixed || exprIsTickedString rhs) - (badBndrTyMsg binder (text "unlifted")) + (badUnliftedBndrTyMsg binder rhs) -- Check that if the binder is at the top level and has type Addr#, -- that it is a string literal. @@ -3741,10 +3741,11 @@ mkRhsMsg binder what ty hsep [text "Binder's type:", ppr (idType binder)], hsep [text "Rhs type:", ppr ty]] -badBndrTyMsg :: Id -> SDoc -> SDoc -badBndrTyMsg binder what - = vcat [ text "The type of this binder is" <+> what <> colon <+> ppr binder - , text "Binder's type:" <+> ppr (idType binder) ] +badUnliftedBndrTyMsg :: Id -> CoreExpr -> SDoc +badUnliftedBndrTyMsg bndr rhs + = vcat [ text "The let binder" <+> ppr bndr <+> text "does not satisfy the let-can-float invariant" + , text "Type:" <+> ppr (idType bndr) + , text "RHS:" <+> ppr rhs ] mkNonTopExportedMsg :: Id -> SDoc mkNonTopExportedMsg binder ===================================== compiler/GHC/Core/Opt/CSE.hs ===================================== @@ -498,7 +498,9 @@ extendCSEnvWithBinding env in_id out_id rhs' cse_done -- Should we use SUBSTITUTE or EXTEND? -- See Note [CSE for bindings] - use_subst | Var {} <- rhs' = True + use_subst | Var v <- rhs' + , isEvaldUnfolding (idUnfolding v) == isEvaldUnfolding (idUnfolding in_id) + = True | otherwise = False -- | Given a binder `let x = e`, this function ===================================== compiler/GHC/Core/Opt/CprAnal.hs ===================================== @@ -298,14 +298,8 @@ data TermFlag -- Better than using a Bool exprTerminates :: CoreExpr -> TermFlag -- ^ A /very/ simple termination analysis. exprTerminates e - | exprIsHNF e = Terminates | exprOkForSpeculation e = Terminates | otherwise = MightDiverge - -- Annoyingly, we have to check both for HNF and ok-for-spec. - -- * `I# (x# *# 2#)` is ok-for-spec, but not in HNF. Still worth CPR'ing! - -- * `lvl` is an HNF if its unfolding is evaluated - -- (perhaps `lvl = I# 0#` at top-level). But, tiresomely, it is never - -- ok-for-spec due to Note [exprOkForSpeculation and evaluated variables]. cprAnalApp :: AnalEnv -> CoreExpr -> [(CprType, CoreArg)] -> (CprType, CoreExpr) -- Main function that takes care of /nested/ CPR. See Note [Nested CPR] ===================================== compiler/GHC/Core/Opt/SetLevels.hs ===================================== @@ -127,6 +127,7 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import Data.Maybe +import Data.Either {- ************************************************************************ @@ -445,21 +446,21 @@ lvlCase :: LevelEnv -- Level of in-scope names/tyvars lvlCase env scrut_fvs scrut' case_bndr ty alts -- See Note [Floating single-alternative cases] | [AnnAlt con@(DataAlt {}) bs body] <- alts - , exprIsHNF (deTagExpr scrut') -- See Note [Check the output scrutinee for exprIsHNF] - , not (isTopLvl dest_lvl) -- Can't have top-level cases - , not (floatTopLvlOnly env) -- Can float anywhere - , ManyTy <- idMult case_bndr -- See Note [Floating linear case] + , exprOkForSpeculation (deTagExpr scrut') -- See Note [Check the output scrutinee for exprOkForSpeculation] + , not (isTopLvl dest_lvl) -- Can't have top-level cases + , not (floatTopLvlOnly env) -- Can float anywhere + , ManyTy <- idMult case_bndr -- See Note [Floating linear case] = -- Always float the case if possible -- Unlike lets we don't insist that it escapes a value lambda do { (env1, (case_bndr' : bs')) <- cloneCaseBndrs env dest_lvl (case_bndr : bs) - ; let rhs_env = extendCaseBndrEnv env1 case_bndr scrut' + ; let rhs_env = rememberEval env1 case_bndr' scrut' ; body' <- lvlMFE rhs_env True body ; let alt' = Alt con (map (stayPut dest_lvl) bs') body' ; return (Case scrut' (TB case_bndr' (FloatMe dest_lvl)) ty' [alt']) } | otherwise -- Stays put - = do { let (alts_env1, [case_bndr']) = substAndLvlBndrs NonRecursive env incd_lvl [case_bndr] - alts_env = extendCaseBndrEnv alts_env1 case_bndr scrut' + = do { let (alts_env1, [case_bndr'@(TB case_bndrr _)]) = substAndLvlBndrs NonRecursive env incd_lvl [case_bndr] + alts_env = rememberEval alts_env1 case_bndrr scrut' ; alts' <- mapM (lvl_alt alts_env) alts ; return (Case scrut' case_bndr' ty' alts') } where @@ -497,17 +498,8 @@ the inner loop. Things to note: - * The test we perform is exprIsHNF, and /not/ exprOkForSpeculation. - - - exprIsHNF catches the key case of an evaluated variable - - - exprOkForSpeculation is /false/ of an evaluated variable; - See Note [exprOkForSpeculation and evaluated variables] in GHC.Core.Utils - So we'd actually miss the key case! - - - Nothing is gained from the extra generality of exprOkForSpeculation - since we only consider floating a case whose single alternative - is a DataAlt K a b -> rhs + * The test we perform is exprOkForSpeculation, because speculating the case is + exactly what we do. * We can't float a case to top level @@ -557,8 +549,8 @@ needed to quantify over some of its free variables (e.g. z), resulting in shadowing and very confusing Core Lint failures. -Note [Check the output scrutinee for exprIsHNF] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Note [Check the output scrutinee for exprOkForSpeculation] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider this: case x of y { A -> ....(case y of alts).... @@ -572,10 +564,10 @@ evaluated), but the former is not -- and indeed we can't float the inner case out, at least not unless x is also evaluated at its binding site. See #5453. -That's why we apply exprIsHNF to scrut' and not to scrut. +That's why we apply exprOkForSpeculation to scrut' and not to scrut. See Note [Floating single-alternative cases] for why -we use exprIsHNF in the first place. +we use exprOkForSpeculation in the first place. -} lvlNonTailMFE :: LevelEnv -- Level of in-scope names/tyvars @@ -632,7 +624,7 @@ lvlMFE env strict_ctxt ann_expr | float_is_new_lam || exprIsTopLevelBindable expr expr_ty -- No wrapping needed if the type is lifted, or is a literal string -- or if we are wrapping it in one or more value lambdas - = do { expr1 <- lvlFloatRhs abs_vars dest_lvl rhs_env NonRecursive + = do { expr1 <- lvlFloatRhs abs_vars eval_vars dest_lvl rhs_env NonRecursive is_bot_lam NotJoinPoint ann_expr -- Treat the expr just like a right-hand side ; var <- newLvlVar expr1 NotJoinPoint is_mk_static @@ -653,6 +645,7 @@ lvlMFE env strict_ctxt ann_expr = do { expr1 <- lvlExpr rhs_env ann_expr ; let l1r = incMinorLvlFrom rhs_env float_rhs = mkLams abs_vars_w_lvls $ + flip (foldr (wrapEval l1r)) eval_vars $ Case expr1 (stayPut l1r ubx_bndr) box_ty [Alt DEFAULT [] (App boxing_expr (Var ubx_bndr))] @@ -678,7 +671,8 @@ lvlMFE env strict_ctxt ann_expr -- See Note [Bottoming floats] -- esp Bottoming floats (2) expr_ok_for_spec = exprOkForSpeculation expr - abs_vars = abstractVars dest_lvl env fvs + (abs_vars, eval_vars) = eliminateAbsCaseBndrs dest_lvl env $ + abstractVars dest_lvl env fvs dest_lvl = destLevel env fvs fvs_ty is_function is_bot_lam -- NB: is_bot_lam not is_bot; see (3) in -- Note [Bottoming floats] @@ -701,16 +695,16 @@ lvlMFE env strict_ctxt ann_expr float_me = saves_work || saves_alloc || is_mk_static -- See Note [Saving work] - saves_work = escapes_value_lam -- (a) - && not (exprIsHNF expr) -- (b) - && not float_is_new_lam -- (c) + saves_work = escapes_value_lam -- (a) + && not (exprOkForSpeculation expr) -- (b) + && not float_is_new_lam -- (c) escapes_value_lam = dest_lvl `ltMajLvl` (le_ctxt_lvl env) -- See Note [Saving allocation] and Note [Floating to the top] saves_alloc = isTopLvl dest_lvl && floatConsts env && ( not strict_ctxt -- (a) - || exprIsHNF expr -- (b) + || exprOkForSpeculation expr -- (b) || (is_bot_lam && escapes_value_lam)) -- (c) hasFreeJoin :: LevelEnv -> DVarSet -> Bool @@ -730,14 +724,14 @@ But see also Note [Saving allocation]. So we definitely float an expression out if (a) It will escape a value lambda (escapes_value_lam) -(b) The expression is not a head-normal form (exprIsHNF); see (SW1, SW2). +(b) The expression is not a head-normal form (exprOkForSpeculation); see (SW1, SW2). (c) Floating does not require wrapping it in value lambdas (float_is_new_lam). See (SW3) below Wrinkles: (SW1) Concerning (b) I experimented with using `exprIsCheap` rather than - `exprIsHNF` but the latter seems better, according to nofib + `exprOkForSpeculation` but the latter seems better, according to nofib (`spectral/mate` got 10% worse with exprIsCheap). It's really a bit of a heuristic. @@ -755,7 +749,7 @@ Wrinkles: See !12410 for some data comparing the effect of omitting (b) altogether, This doesn't apply, though, if we float the thing to the top level; see Note [Floating to the top]. Bottom line (data from !12410): adding the - not.exprIsHNF test to `saves_work`: + not.exprOkForSpeculation test to `saves_work`: - Decreases compiler allocations by 0.5% - Occasionally decreases runtime allocation (T12996 -2.5%) - Slightly mixed effect on nofib: (puzzle -10%, mate -5%, cichelli +5%) @@ -1233,7 +1227,7 @@ lvlBind env (AnnNonRec bndr rhs) -- Otherwise we are going to float | null abs_vars = do { -- No type abstraction; clone existing binder - rhs' <- lvlFloatRhs [] dest_lvl env NonRecursive + rhs' <- lvlFloatRhs [] [] dest_lvl env NonRecursive is_bot_lam NotJoinPoint rhs ; (env', [bndr']) <- cloneLetVars NonRecursive env dest_lvl [bndr] ; let bndr2 = annotateBotStr bndr' 0 mb_bot_str @@ -1241,7 +1235,7 @@ lvlBind env (AnnNonRec bndr rhs) | otherwise = do { -- Yes, type abstraction; create a new binder, extend substitution, etc - rhs' <- lvlFloatRhs abs_vars dest_lvl env NonRecursive + rhs' <- lvlFloatRhs abs_vars eval_vars dest_lvl env NonRecursive is_bot_lam NotJoinPoint rhs ; (env', [bndr']) <- newPolyBndrs dest_lvl env abs_vars [bndr] ; let bndr2 = annotateBotStr bndr' n_extra mb_bot_str @@ -1252,7 +1246,8 @@ lvlBind env (AnnNonRec bndr rhs) ty_fvs = tyCoVarsOfType bndr_ty rhs_fvs = freeVarsOf rhs bind_fvs = rhs_fvs `unionDVarSet` dIdFreeVars bndr - abs_vars = abstractVars dest_lvl env bind_fvs + (abs_vars, eval_vars) = eliminateAbsCaseBndrs dest_lvl env $ + abstractVars dest_lvl env bind_fvs dest_lvl = destLevel env bind_fvs ty_fvs (isFunction rhs) is_bot_lam deann_rhs = deAnnotate rhs @@ -1332,9 +1327,8 @@ lvlBind env (AnnRec pairs) -- function in a Rec, and we don't much care what -- happens to it. False is simple! - do_rhs env (_,rhs) = lvlFloatRhs abs_vars dest_lvl env Recursive - is_bot NotJoinPoint - rhs + do_rhs env (_,rhs) = lvlFloatRhs abs_vars eval_vars dest_lvl env Recursive + is_bot NotJoinPoint rhs -- Finding the free vars of the binding group is annoying bind_fvs = ((unionDVarSets [ freeVarsOf rhs | (_, rhs) <- pairs]) @@ -1346,7 +1340,8 @@ lvlBind env (AnnRec pairs) ty_fvs = foldr (unionVarSet . tyCoVarsOfType . idType) emptyVarSet bndrs dest_lvl = destLevel env bind_fvs ty_fvs is_fun is_bot - abs_vars = abstractVars dest_lvl env bind_fvs + (abs_vars, eval_vars) = eliminateAbsCaseBndrs dest_lvl env $ + abstractVars dest_lvl env bind_fvs is_top_bindable = not (any (mightBeUnliftedType . idType) bndrs) -- This mightBeUnliftedType stuff is the same test as in the non-rec case @@ -1396,21 +1391,28 @@ lvlRhs :: LevelEnv -> CoreExprWithFVs -> LvlM LevelledExpr lvlRhs env rec_flag is_bot mb_join_arity expr - = lvlFloatRhs [] (le_ctxt_lvl env) env + = lvlFloatRhs [] [] (le_ctxt_lvl env) env rec_flag is_bot mb_join_arity expr -lvlFloatRhs :: [OutVar] -> Level -> LevelEnv -> RecFlag +wrapEval :: Level -> (OutId, OutId) -> Expr LevelledBndr -> Expr LevelledBndr +-- A bit like GHC.Core.Utils.mkDefaultCase, but `Expr LevelledBndr` +wrapEval dest_lvl (scrut_v, case_bndr) body + = Case (Var scrut_v) (TB case_bndr (StayPut dest_lvl)) + (exprType $ deTagExpr body) [Alt DEFAULT [] body] + +lvlFloatRhs :: [OutVar] -> [(OutId,OutId)] -> Level -> LevelEnv -> RecFlag -> Bool -- Binding is for a bottoming function -> JoinPointHood -> CoreExprWithFVs -> LvlM (Expr LevelledBndr) -- Ignores the le_ctxt_lvl in env; treats dest_lvl as the baseline -lvlFloatRhs abs_vars dest_lvl env rec is_bot mb_join_arity rhs - = do { body' <- if not is_bot -- See Note [Floating from a RHS] +lvlFloatRhs abs_vars eval_vars dest_lvl env rec is_bot mb_join_arity rhs + = do { body1 <- if not is_bot -- See Note [Floating from a RHS] && any isId bndrs then lvlMFE body_env True body else lvlExpr body_env body - ; return (mkLams bndrs' body') } + ; let body2 = foldr (wrapEval dest_lvl) body1 eval_vars + ; return (mkLams bndrs' body2) } where (bndrs, body) | JoinPoint join_arity <- mb_join_arity = collectNAnnBndrs join_arity rhs @@ -1633,14 +1635,20 @@ countFreeIds = nonDetStrictFoldUDFM add 0 . getUniqDSet data LevelEnv = LE { le_switches :: FloatOutSwitches - , le_ctxt_lvl :: Level -- The current level - , le_lvl_env :: VarEnv Level -- Domain is *post-cloned* TyVars and Ids + , le_ctxt_lvl :: Level + -- ^ The current level + , le_lvl_env :: VarEnv (Level, Maybe OutId) + -- ^ Domain is *post-cloned* TyVars and Ids. + -- If `Just scrut`, then the var mapping belongs to a case binder with + -- variable scrutinee `scrut`. + -- This is to support Note [Duplicate evals into float]. -- See Note [le_subst and le_env] - , le_subst :: Subst -- Domain is pre-cloned TyVars and Ids - -- The Id -> CoreExpr in the Subst is ignored - -- (since we want to substitute a LevelledExpr for - -- an Id via le_env) but we do use the Co/TyVar substs + , le_subst :: Subst + -- ^ Domain is pre-cloned TyVars and Ids. + -- The Id -> CoreExpr in the Subst is ignored + -- (since we want to substitute a LevelledExpr for + -- an Id via le_env) but we do use the Co/TyVar substs , le_env :: IdEnv ([OutVar], LevelledExpr) -- Domain is pre-cloned Ids } @@ -1690,10 +1698,10 @@ initialEnv float_lams binds -- to a later one. So here we put all the top-level binders in scope before -- we start, to satisfy the lookupIdSubst invariants (#20200 and #20294) -addLvl :: Level -> VarEnv Level -> OutVar -> VarEnv Level -addLvl dest_lvl env v' = extendVarEnv env v' dest_lvl +addLvl :: Level -> VarEnv (Level, Maybe OutId) -> OutVar -> VarEnv (Level, Maybe OutId) +addLvl dest_lvl env v' = extendVarEnv env v' (dest_lvl, Nothing) -addLvls :: Level -> VarEnv Level -> [OutVar] -> VarEnv Level +addLvls :: Level -> VarEnv (Level, Maybe OutId) -> [OutVar] -> VarEnv (Level, Maybe OutId) addLvls dest_lvl env vs = foldl' (addLvl dest_lvl) env vs floatLams :: LevelEnv -> Maybe Int @@ -1711,20 +1719,19 @@ floatTopLvlOnly le = floatToTopLevelOnly (le_switches le) incMinorLvlFrom :: LevelEnv -> Level incMinorLvlFrom env = incMinorLvl (le_ctxt_lvl env) --- extendCaseBndrEnv adds the mapping case-bndr->scrut-var if it can +-- rememberEval adds the mapping case-bndr->scrut-var if it can -- See Note [Binder-swap during float-out] -extendCaseBndrEnv :: LevelEnv - -> Id -- Pre-cloned case binder - -> Expr LevelledBndr -- Post-cloned scrutinee - -> LevelEnv -extendCaseBndrEnv le@(LE { le_subst = subst, le_env = id_env }) +rememberEval :: LevelEnv + -> OutId -- Post-cloned case binder + -> Expr LevelledBndr -- Post-cloned scrutinee + -> LevelEnv +rememberEval le@(LE { le_lvl_env = lvl_env }) case_bndr (Var scrut_var) -- We could use OccurAnal. scrutOkForBinderSwap here, and perhaps -- get a bit more floating. But we didn't in the past and it's -- an unforced change, so I'm leaving it. - = le { le_subst = extendSubstWithVar subst case_bndr scrut_var - , le_env = add_id id_env (case_bndr, scrut_var) } -extendCaseBndrEnv env _ _ = env + = le { le_lvl_env = modifyVarEnv (\(lvl,_) -> (lvl, Just scrut_var)) lvl_env case_bndr } +rememberEval env _ _ = env maxFvLevel :: (Var -> Bool) -> LevelEnv -> DVarSet -> Level maxFvLevel max_me env var_set @@ -1745,8 +1752,8 @@ maxIn max_me (LE { le_lvl_env = lvl_env, le_env = id_env }) in_var lvl where max_out out_var lvl | max_me out_var = case lookupVarEnv lvl_env out_var of - Just lvl' -> maxLvl lvl' lvl - Nothing -> lvl + Just (lvl',_) -> maxLvl lvl' lvl + Nothing -> lvl | otherwise = lvl -- Ignore some vars depending on max_me lookupVar :: LevelEnv -> Id -> LevelledExpr @@ -1765,20 +1772,16 @@ abstractVars :: Level -> LevelEnv -> DVarSet -> [OutVar] -- variable computation and deterministic sort. -- See Note [Unique Determinism] in GHC.Types.Unique for explanation of why -- Uniques are not deterministic. -abstractVars dest_lvl (LE { le_subst = subst, le_lvl_env = lvl_env }) in_fvs +abstractVars dest_lvl le@(LE { le_subst = subst }) in_fvs = -- NB: sortQuantVars might not put duplicates next to each other - map zap $ sortQuantVars $ - filter abstract_me $ - dVarSetElems $ - closeOverKindsDSet $ + map zap $ sortQuantVars $ + filter (abstractMe dest_lvl le) $ + dVarSetElems $ + closeOverKindsDSet $ substDVarSet subst in_fvs -- NB: it's important to call abstract_me only on the OutIds the -- come from substDVarSet (not on fv, which is an InId) where - abstract_me v = case lookupVarEnv lvl_env v of - Just lvl -> dest_lvl `ltLvl` lvl - Nothing -> False - -- We are going to lambda-abstract, so nuke any IdInfo, -- and add the tyvars of the Id (if necessary) zap v | isId v = warnPprTrace (isStableUnfolding (idUnfolding v) || @@ -1787,6 +1790,23 @@ abstractVars dest_lvl (LE { le_subst = subst, le_lvl_env = lvl_env }) in_fvs setIdInfo v vanillaIdInfo | otherwise = v +abstractMe :: Level -> LevelEnv -> Var -> Bool +abstractMe dest_lvl (LE { le_lvl_env = lvl_env }) v + | Just (lvl, _) <- lookupVarEnv lvl_env v + = dest_lvl `ltLvl` lvl + | otherwise + = False + +eliminateAbsCaseBndrs :: Level -> LevelEnv -> [OutVar] -> ([OutVar], [(OutId,OutId)]) +eliminateAbsCaseBndrs dest_lvl le@(LE { le_lvl_env = lvl_env }) + = partitionEithers . map try_elim + where + try_elim v = case lookupVarEnv lvl_env v of + Just (_, Just scrut_id) + | not (abstractMe dest_lvl le scrut_id) -- would not abstract scrut_id + -> Right (scrut_id, v) -- turn abs_var v into an eval on scrut_id! + _ -> Left v -- retain as an abs_var + type LvlM result = UniqSM result initLvl :: UniqSupply -> UniqSM a -> a @@ -1835,9 +1855,12 @@ newLvlVar :: LevelledExpr -- The RHS of the new binding -> LvlM Id newLvlVar lvld_rhs join_arity_maybe is_mk_static = do { uniq <- getUniqueM - ; return (add_join_info (mk_id uniq rhs_ty)) + ; return (add_evald $ add_join_info $ mk_id uniq rhs_ty) } where + add_evald var + | exprIsHNF de_tagged_rhs = var `setIdUnfolding` evaldUnfolding + | otherwise = var add_join_info var = var `asJoinId_maybe` join_arity_maybe de_tagged_rhs = deTagExpr lvld_rhs rhs_ty = exprType de_tagged_rhs ===================================== compiler/GHC/Core/Subst.hs ===================================== @@ -519,7 +519,9 @@ substUnfolding subst df@(DFunUnfolding { df_bndrs = bndrs, df_args = args }) substUnfolding subst unf@(CoreUnfolding { uf_tmpl = tmpl, uf_src = src }) -- Retain stable unfoldings | not (isStableSource src) -- Zap an unstable unfolding, to save substitution work - = NoUnfolding + = if isEvaldUnfolding unf + then evaldUnfolding + else NoUnfolding | otherwise -- But keep a stable one! = seqExpr new_tmpl `seq` unf { uf_tmpl = new_tmpl } ===================================== compiler/GHC/Core/TyCo/Subst.hs ===================================== @@ -22,6 +22,7 @@ module GHC.Core.TyCo.Subst extendCvSubst, extendCvSubstWithClone, extendTvSubst, extendTvSubstWithClone, extendTvSubstList, extendTvSubstAndInScope, + extendCvSubstAndInScope, extendTCvSubstList, unionSubst, zipTyEnv, zipCoEnv, zipTvSubst, zipCvSubst, @@ -408,6 +409,14 @@ extendTvSubstAndInScope (Subst in_scope ids tenv cenv) tv ty (extendVarEnv tenv tv ty) cenv +extendCvSubstAndInScope :: Subst -> CoVar -> Coercion -> Subst +-- Also extends the in-scope set +extendCvSubstAndInScope (Subst in_scope ids tenv cenv) cv co + = Subst (in_scope `extendInScopeSetSet` tyCoVarsOfCo co) + ids + tenv + (extendVarEnv cenv cv co) + -- | Adds multiple 'TyVar' substitutions to the 'Subst': see also 'extendTvSubst' extendTvSubstList :: Subst -> [(TyVar,Type)] -> Subst extendTvSubstList subst vrs ===================================== compiler/GHC/Core/Utils.hs ===================================== @@ -74,9 +74,11 @@ import GHC.Core.Ppr import GHC.Core.FVs( bindFreeVars ) import GHC.Core.DataCon import GHC.Core.Type as Type +import GHC.Core.TyCo.Rep as Type import GHC.Core.Predicate( isCoVarType ) import GHC.Core.FamInstEnv import GHC.Core.TyCo.Compare( eqType, eqTypeX ) +import GHC.Core.TyCo.Subst import GHC.Core.Coercion import GHC.Core.Reduction import GHC.Core.TyCon @@ -1814,11 +1816,9 @@ expr_ok fun_ok primop_ok (Tick tickish e) expr_ok _ _ (Let {}) = False -- See W3 in the Haddock comment for exprOkForSpeculation -expr_ok fun_ok primop_ok (Case scrut bndr _ alts) +expr_ok fun_ok primop_ok (Case scrut _ _ alts) = -- See Note [exprOkForSpeculation: case expressions] expr_ok fun_ok primop_ok scrut - && isUnliftedType (idType bndr) - -- OK to call isUnliftedType: binders always have a fixed RuntimeRep && all (\(Alt _ _ rhs) -> expr_ok fun_ok primop_ok rhs) alts && altsAreExhaustive alts @@ -1847,7 +1847,7 @@ app_ok fun_ok primop_ok fun args | idArity fun > n_val_args -- Partial application: just check passing the arguments is OK - = args_ok + = args_ok notCBV | otherwise = case idDetails fun of @@ -1857,9 +1857,10 @@ app_ok fun_ok primop_ok fun args DataConWorkId dc | isLazyDataConRep dc - -> args_ok + -> args_ok notCBV | otherwise - -> fields_ok (dataConRepStrictness dc) + -> args_ok (dataConRepStrictness dc) + -- See (SFC1) of Note [Strict fields in Core] ClassOpId _ is_terminating_result | is_terminating_result -- See Note [exprOkForSpeculation and type classes] @@ -1881,7 +1882,7 @@ app_ok fun_ok primop_ok fun args -- Often there is a literal divisor, and this -- can get rid of a thunk in an inner loop - | otherwise -> primop_ok op && args_ok + | otherwise -> primop_ok op && args_ok notCBV _other -- Unlifted and terminating types; -- Also c.f. the Var case of exprIsHNF @@ -1898,37 +1899,54 @@ app_ok fun_ok primop_ok fun args -- See (U12) of Note [Implementing unsafeCoerce] | fun `hasKey` unsafeEqualityProofIdKey -> True - | otherwise -> False - -- NB: even in the nullary case, do /not/ check - -- for evaluated-ness of the fun; - -- see Note [exprOkForSpeculation and evaluated variables] + | 0 <- n_val_args + , isEvaldUnfolding (idUnfolding fun) + -> -- pprTrace "yes" (ppr fun) + True + + | otherwise -> -- pprTrace "no" (ppr fun <+> ppr args) + False where fun_ty = idType fun n_val_args = valArgCount args - (arg_tys, _) = splitPiTys fun_ty -- Even if a function call itself is OK, any unlifted - -- args are still evaluated eagerly and must be checked - args_ok = all2Prefix arg_ok arg_tys args - arg_ok :: PiTyVarBinder -> CoreExpr -> Bool - arg_ok (Named _) _ = True -- A type argument - arg_ok (Anon ty _) arg -- A term argument - | definitelyLiftedType (scaledThing ty) - = True -- lifted args are not evaluated eagerly + -- args are still evaluated eagerly and must be checked. + -- Furthermore, for saturated calls, we must check CBV args (strict fields + -- of DataCons!) + args_ok str_marks = relevantAppArgsSatisfy arg_ok fun_ty args str_marks + arg_ok :: Type -> CoreExpr -> StrictnessMark -> Bool + arg_ok ty arg str + | NotMarkedStrict <- str -- iff it's not a CBV arg + , definitelyLiftedType ty -- and its type is lifted + = True -- then the worker app does not eval | otherwise = expr_ok fun_ok primop_ok arg - -- Used for strict DataCon worker arguments - -- See (SFC1) of Note [Strict fields in Core] - fields_ok str_marks = all3Prefix field_ok arg_tys str_marks args - field_ok :: PiTyVarBinder -> StrictnessMark -> CoreExpr -> Bool - field_ok (Named _) _ _ = True - field_ok (Anon ty _) str arg - | NotMarkedStrict <- str -- iff it's a lazy field - , definitelyLiftedType (scaledThing ty) -- and its type is lifted - = True -- then the worker app does not eval - | otherwise - = expr_ok fun_ok primop_ok arg +notCBV :: [StrictnessMark] +notCBV = repeat NotMarkedStrict + +relevantAppArgsSatisfy :: (Type -> CoreExpr -> StrictnessMark -> Bool) -> Type -> [CoreExpr] -> [StrictnessMark] -> Bool +-- This calls the predicate on every non-Type CoreExpr arg. +-- We could just do `exprType arg` for every such arg, but carrying around a +-- substitution is much more efficient. +-- The obvious definition regresses T16577 by 30% so we don't do it. +relevantAppArgsSatisfy p ty = go (mkEmptySubst in_scope) ty + where + in_scope = mkInScopeSet (tyCoVarsOfType ty) + go subst (ForAllTy b res) (Type ty : args) strs + = go (extendTvSubstAndInScope subst (binderVar b) ty) res args strs + go subst (ForAllTy b res) (Coercion co : args) strs + = go (extendCvSubstAndInScope subst (binderVar b) co) res args strs + go subst (FunTy { ft_arg = arg, ft_res = res }) (e : args) (str : strs) + = p (substTy subst arg) e str && go subst res args strs + go subst ty args@(_:_) strs@(_:_) + | Just ty' <- coreView (substTy subst ty) + = go (mkEmptySubst (getSubstInScope subst)) ty' args strs + | otherwise + = pprPanic "Should see more argument tys" (ppr ty $$ ppr subst $$ ppr args $$ ppr (take 10 strs)) + go _ _ _ _ = True +{-# INLINE relevantAppArgsSatisfy #-} ----------------------------- altsAreExhaustive :: [Alt b] -> Bool @@ -1985,6 +2003,8 @@ GHC.Types.Id.Make.mkDictSelId for where this field is initialised. Note [exprOkForSpeculation: case expressions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +SG: I don't get what is so "very special" about this case. I find it very reasonable. + exprOkForSpeculation accepts very special case expressions. Reason: (a ==# b) is ok-for-speculation, but the litEq rules in GHC.Core.Opt.ConstantFold convert it (a ==# 3#) to @@ -1994,39 +2014,22 @@ for excellent reasons described in So, annoyingly, we want that case expression to be ok-for-speculation too. Bother. -But we restrict it sharply: - -* We restrict it to unlifted scrutinees. Consider this: - case x of y { - DEFAULT -> ... (let v::Int# = case y of { True -> e1 - ; False -> e2 } - in ...) ... - - Does the RHS of v satisfy the let-can-float invariant? Previously we said - yes, on the grounds that y is evaluated. But the binder-swap done - by GHC.Core.Opt.SetLevels would transform the inner alternative to - DEFAULT -> ... (let v::Int# = case x of { ... } - in ...) .... - which does /not/ satisfy the let-can-float invariant, because x is - not evaluated. See Note [Binder-swap during float-out] - in GHC.Core.Opt.SetLevels. To avoid this awkwardness it seems simpler - to stick to unlifted scrutinees where the issue does not - arise. - -* We restrict it to exhaustive alternatives. A non-exhaustive - case manifestly isn't ok-for-speculation. for example, - this is a valid program (albeit a slightly dodgy one) - let v = case x of { B -> ...; C -> ... } - in case x of - A -> ... - _ -> ...v...v.... - Should v be considered ok-for-speculation? Its scrutinee may be - evaluated, but the alternatives are incomplete so we should not - evaluate it strictly. - - Now, all this is for lifted types, but it'd be the same for any - finite unlifted type. We don't have many of them, but we might - add unlifted algebraic types in due course. +SG: Again, I don't see why we need to list a specific example. +Clearly, we want to detect as many expressions as ok-for-spec as possible! + +But we restrict it to exhaustive alternatives. A non-exhaustive +case manifestly isn't ok-for-speculation. For example, +this is a valid program (albeit a slightly dodgy one) + let v = case x of { B -> ...; C -> ... } + in case x of + A -> ... + _ -> ...v...v.... +Should v be considered ok-for-speculation? Its scrutinee may be +evaluated, but the alternatives are incomplete so we should not +evaluate it strictly. + +Now, all this is for lifted types, but it'd be the same for any +finite unlifted type. ----- Historical note: #15696: -------- @@ -2073,37 +2076,6 @@ points do the job nicely. ------- End of historical note ------------ -Note [exprOkForSpeculation and evaluated variables] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Consider these examples: - * case x of y { DEFAULT -> ....y.... } - Should 'y' (alone) be considered ok-for-speculation? - - * case x of y { DEFAULT -> ....let z = dataToTagLarge# y... } - Should (dataToTagLarge# y) be considered ok-for-spec? Recall that - dataToTagLarge# :: forall a. a -> Int# - must always evaluate its argument. (See also Note [DataToTag overview].) - -You could argue 'yes', because in the case alternative we know that -'y' is evaluated. But the binder-swap transformation, which is -extremely useful for float-out, changes these expressions to - case x of y { DEFAULT -> ....x.... } - case x of y { DEFAULT -> ....let z = dataToTagLarge# x... } - -And now the expression does not obey the let-can-float invariant! Yikes! -Moreover we really might float (dataToTagLarge# x) outside the case, -and then it really, really doesn't obey the let-can-float invariant. - -The solution is simple: exprOkForSpeculation does not try to take -advantage of the evaluated-ness of (lifted) variables. And it returns -False (always) for primops that perform evaluation. We achieve the latter -by marking the relevant primops as "ThrowsException" or -"ReadWriteEffect"; see also Note [Classifying primop effects] in -GHC.Builtin.PrimOps. - -Note that exprIsHNF /can/ and does take advantage of evaluated-ness; -it doesn't have the trickiness of the let-can-float invariant to worry about. - ************************************************************************ * * exprIsHNF, exprIsConLike @@ -2185,66 +2157,59 @@ exprIsHNFlike is_con is_con_unf e && is_hnf_like e -- See Note [exprIsHNF Tick] is_hnf_like (Cast e _) = is_hnf_like e - is_hnf_like (App e a) - | isValArg a = app_is_value e [a] - | otherwise = is_hnf_like e is_hnf_like (Let _ e) = is_hnf_like e -- Lazy let(rec)s don't affect us is_hnf_like (Case e b _ as) | Just rhs <- isUnsafeEqualityCase e b as = is_hnf_like rhs - is_hnf_like _ = False - - -- Collect arguments through Casts and Ticks and call id_app_is_value - app_is_value :: CoreExpr -> [CoreArg] -> Bool - app_is_value (Var f) as = id_app_is_value f as - app_is_value (Tick _ f) as = app_is_value f as - app_is_value (Cast f _) as = app_is_value f as - app_is_value (App f a) as | isValArg a = app_is_value f (a:as) - | otherwise = app_is_value f as - app_is_value _ _ = False - - id_app_is_value id val_args = + is_hnf_like e + | (fun, args) <- collectArgs e + = case stripTicksTopE (not . tickishCounts) fun of + Var f -> id_app_is_value f args + + -- 'LitRubbish' is the only literal that can occur in the head of an + -- application and will not be matched by the above case (Var /= Lit). + -- See Note [How a rubbish literal can be the head of an application] + -- in GHC.Types.Literal + Lit lit | debugIsOn, not (isLitRubbish lit) + -> pprPanic "Non-rubbish lit in app head" (ppr lit) + | otherwise + -> True + + _ -> False + + id_app_is_value id args = -- See Note [exprIsHNF for function applications] -- for the specification and examples - case compare (idArity id) (length val_args) of + case compare (idArity id) n_val_args of EQ | is_con id -> -- Saturated app of a DataCon/CONLIKE Id case mb_str_marks id of Just str_marks -> -- with strict fields; see (SFC1) of Note [Strict fields in Core] - assert (val_args `equalLength` str_marks) $ - fields_hnf str_marks + args_hnf str_marks Nothing -> -- without strict fields: like PAP - args_hnf -- NB: CONLIKEs are lazy! + args_hnf notCBV -- NB: CONLIKEs are lazy! - GT -> -- PAP: Check unlifted val_args - args_hnf + GT -> -- PAP: Check unlifted args + args_hnf notCBV _ -> False where - -- Saturated, Strict DataCon: Check unlifted val_args and strict fields - fields_hnf str_marks = all3Prefix check_field val_arg_tys str_marks val_args - - -- PAP: Check unlifted val_args - args_hnf = all2Prefix check_arg val_arg_tys val_args - fun_ty = idType id - val_arg_tys = mapMaybe anonPiTyBinderType_maybe (collectPiTyBinders fun_ty) - -- val_arg_tys = map exprType val_args, but much less costly. - -- The obvious definition regresses T16577 by 30% so we don't do it. - - check_arg a_ty a + n_val_args = valArgCount args + -- Check the args for HNFness. + args_hnf str_marks = relevantAppArgsSatisfy check_arg fun_ty args str_marks + -- * Unlifted args must always be HNF + -- * CBV args (strict fields!) must be HNF for saturated calls, + -- indicated by str_marks + check_arg a_ty a str | mightBeUnliftedType a_ty = is_hnf_like a + | isMarkedStrict str = is_hnf_like a | otherwise = True -- Check unliftedness; for example f (x /# 12#) where f has arity two, -- and the first argument is unboxed. This is not a value! -- But f 34# is a value, so check args for HNFs. -- NB: We check arity (and CONLIKEness) first because it's cheaper -- and we reject quickly on saturated apps. - check_field a_ty str a - | mightBeUnliftedType a_ty = is_hnf_like a - | isMarkedStrict str = is_hnf_like a - | otherwise = True - -- isMarkedStrict: Respect Note [Strict fields in Core] mb_str_marks id | Just dc <- isDataConWorkId_maybe id ===================================== compiler/GHC/CoreToStg/Prep.hs ===================================== @@ -2241,6 +2241,20 @@ decideFloatInfo FIA{fia_levity=lev, fia_demand=dmd, fia_is_hnf=is_hnf, | Lifted <- lev = (LetBound, TopLvlFloatable) -- And these float freely but can't be speculated, hence LetBound +instance Outputable FloatInfoArgs where + ppr FIA{ fia_levity=lev, fia_demand=dmd, fia_is_hnf=hnf, fia_is_triv=triv + , fia_is_string=string, fia_is_dc_worker=dcw, fia_ok_for_spec=ok_spec } + = brackets (pprWithCommas id traits) + where + traits = concat $ + [ [ text "string" | string ] + , [ text "DataCon worker binding" | dcw ] + , [ text "trivial" | triv ] + , [ text "unlifted" | Unlifted <- pure lev ] + , [ text "strict" | isStrUsedDmd dmd ] + , [ if hnf then text "hnf" else if ok_spec then text "ok-for-spec" else empty ] + ] + mkCaseFloat :: Id -> CpeRhs -> FloatingBind mkCaseFloat bndr scrut = -- pprTrace "mkCaseFloat" (ppr bndr <+> ppr (bound,info) @@ -2262,13 +2276,12 @@ mkCaseFloat bndr scrut mkNonRecFloat :: CorePrepEnv -> Levity -> Id -> CpeRhs -> (FloatingBind, Id) mkNonRecFloat env lev bndr rhs = -- pprTrace "mkNonRecFloat" (ppr bndr <+> ppr (bound,info) - -- <+> if is_strict then text "strict" else if is_lifted then text "lazy" else text "unlifted" - -- <+> if ok_for_spec then text "ok-for-spec" else empty - -- <+> if evald then text "evald" else empty + -- $$ ppr float_info_args -- $$ ppr rhs) $ (Float (NonRec bndr' rhs) bound info, bndr') where - !(bound, info) = decideFloatInfo $ (defFloatInfoArgs bndr rhs) + !(bound, info) = decideFloatInfo float_info_args + float_info_args = (defFloatInfoArgs bndr rhs) { fia_levity = lev , fia_is_hnf = is_hnf , fia_ok_for_spec = ok_for_spec ===================================== testsuite/tests/simplCore/should_compile/T25423.hs ===================================== @@ -0,0 +1,8 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE UnboxedTuples #-} + +module T25423 where + +f :: Int -> Int -> (# (# Int, Int #), (# Int, Int #) #) +f x y = let !p = (# x, y #) in (# p, p #) ===================================== testsuite/tests/simplCore/should_compile/T25423.stderr ===================================== @@ -0,0 +1,41 @@ + +==================== Tidy Core ==================== +Result size of Tidy Core = {terms: 24, types: 75, coercions: 0, joins: 0/1} + +-- RHS size: {terms: 9, types: 39, coercions: 0, joins: 0/1} +f :: Int -> Int -> (# (# Int, Int #), (# Int, Int #) #) +[GblId, Arity=2, Str=, Cpr=1(1, 1), Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)}] +f = \ (x :: Int) (y :: Int) -> + let { + p :: (# Int, Int #) + [LclId, Unf=OtherCon []] + p = (# x, y #) } in + (# p, p #) + +-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule4 :: GHC.Prim.Addr# +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +T25423.$trModule4 = "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule3 :: GHC.Types.TrName +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}] +T25423.$trModule3 = GHC.Types.TrNameS T25423.$trModule4 + +-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule2 :: GHC.Prim.Addr# +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] +T25423.$trModule2 = "T25423"# + +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule1 :: GHC.Types.TrName +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}] +T25423.$trModule1 = GHC.Types.TrNameS T25423.$trModule2 + +-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule :: GHC.Types.Module +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}] +T25423.$trModule = GHC.Types.Module T25423.$trModule3 T25423.$trModule1 + + + ===================================== testsuite/tests/simplCore/should_compile/all.T ===================================== @@ -532,3 +532,4 @@ test('T24725a', [ grep_errmsg(r'testedRule')], compile, ['-O -ddump-rule-firings test('T25033', normal, compile, ['-O']) test('T25160', normal, compile, ['-O -ddump-rules']) test('T25197', [req_th, extra_files(["T25197_TH.hs"]), only_ways(['optasm'])], multimod_compile, ['T25197', '-O2 -v0']) +test('T25423', [ grep_errmsg(r'let') ], compile, ['-O -ddump-simpl -dsuppress-uniques']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/366092a0a8edff9ac7f10df90bbc02ef7f3bcd4b...38b99494093a16390405b1b2830ecb5802c30a71 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/366092a0a8edff9ac7f10df90bbc02ef7f3bcd4b...38b99494093a16390405b1b2830ecb5802c30a71 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 19:04:08 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 01 Nov 2024 15:04:08 -0400 Subject: [Git][ghc/ghc] Pushed new branch wip/bytecode-improvements Message-ID: <67252628e40fb_a1141fe628054449@gitlab.mail> Ben Gamari pushed new branch wip/bytecode-improvements at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/bytecode-improvements You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 19:38:27 2024 From: gitlab at gitlab.haskell.org (Torsten Schmits (@torsten.schmits)) Date: Fri, 01 Nov 2024 15:38:27 -0400 Subject: [Git][ghc/ghc] Pushed new branch wip/torsten.schmits/fix-linters-file-collection Message-ID: <67252e33d26b5_a114111945a065462@gitlab.mail> Torsten Schmits pushed new branch wip/torsten.schmits/fix-linters-file-collection at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/torsten.schmits/fix-linters-file-collection You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 20:32:12 2024 From: gitlab at gitlab.haskell.org (Torsten Schmits (@torsten.schmits)) Date: Fri, 01 Nov 2024 16:32:12 -0400 Subject: [Git][ghc/ghc][wip/torsten.schmits/fix-linters-file-collection] test driver: fix file collection for regex linters Message-ID: <67253acc2651b_a114114c52607179c@gitlab.mail> Torsten Schmits pushed to branch wip/torsten.schmits/fix-linters-file-collection at Glasgow Haskell Compiler / GHC Commits: 8e122905 by Torsten Schmits at 2024-11-01T21:31:18+01:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 2 changed files: - testsuite/tests/linters/Makefile - testsuite/tests/linters/regex-linters/linter.py Changes: ===================================== testsuite/tests/linters/Makefile ===================================== @@ -12,16 +12,16 @@ uniques: python3 checkUniques/check-uniques.py $(TOP)/.. makefiles: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-makefiles.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-makefiles.py tracked) version-number: regex-linters/check-version-number.sh ${TOP}/.. cpp: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-cpp.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-cpp.py tracked) rts-includes: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-rts-includes.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-rts-includes.py tracked) changelogs: regex-linters/check-changelogs.sh $(TOP)/.. ===================================== testsuite/tests/linters/regex-linters/linter.py ===================================== @@ -40,6 +40,8 @@ def get_changed_files(base_commit: str, head_commit: str, def get_tracked_files(subdir: str = '.'): """ Get the files tracked by git in the given subdirectory. """ + if not Path(subdir).exists(): + raise Exception("Regex linter executed with nonexistent target directory '{}'".format(subdir)) cmd = ['git', 'ls-tree', '--name-only', '-r', 'HEAD', subdir] files = subprocess.check_output(cmd) return files.decode('UTF-8').split('\n') @@ -124,7 +126,7 @@ def run_linters(linters: Sequence[Linter], linted_files = args.get_linted_files(args) for path in linted_files: - if path.startswith('linters'): + if path.startswith('testsuite/tests/linters'): continue for linter in linters: linter.do_lint(Path(path)) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8e122905111ae973df455b3a7799373ae26cd1c1 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8e122905111ae973df455b3a7799373ae26cd1c1 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 21:10:25 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 01 Nov 2024 17:10:25 -0400 Subject: [Git][ghc/ghc] Pushed new branch wip/cleanup-glasgow-cpp Message-ID: <672543c1e92f7_a11411671e9c8037@gitlab.mail> Cheng Shao pushed new branch wip/cleanup-glasgow-cpp at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/cleanup-glasgow-cpp You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 21:14:44 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 01 Nov 2024 17:14:44 -0400 Subject: [Git][ghc/ghc][wip/cleanup-glasgow-cpp] Clean up obsolete CPP guarded code paths from the tree Message-ID: <672544c4db3_a1141176f7b882193@gitlab.mail> Cheng Shao pushed to branch wip/cleanup-glasgow-cpp at Glasgow Haskell Compiler / GHC Commits: 27981c43 by Cheng Shao at 2024-11-01T21:14:32+00:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 30 changed files: - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Platform/Ways.hs - compiler/GHC/Prelude/Basic.hs - compiler/GHC/SysTools/Process.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/GlobalVars.hs - compiler/GHC/Utils/Touch.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/cbits/genSym.c - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - libraries/base/tests/dynamic002.hs - libraries/base/tests/foldableArray.hs - libraries/ghc-bignum/src/GHC/Num/Integer.hs - libraries/ghc-bignum/src/GHC/Num/Primitives.hs - libraries/ghc-boot/GHC/BaseDir.hs - libraries/ghc-boot/GHC/Data/ShortText.hs - libraries/ghc-boot/GHC/Utils/Encoding/UTF8.hs - libraries/ghc-heap/GHC/Exts/Heap.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/27981c43a3c61c5927d0603857ec99b7dce05869 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/27981c43a3c61c5927d0603857ec99b7dce05869 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 21:19:02 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 01 Nov 2024 17:19:02 -0400 Subject: [Git][ghc/ghc][wip/cleanup-glasgow-cpp] Clean up obsolete CPP guarded code paths from the tree Message-ID: <672545c638d29_a114117e46e4824db@gitlab.mail> Cheng Shao pushed to branch wip/cleanup-glasgow-cpp at Glasgow Haskell Compiler / GHC Commits: 28294138 by Cheng Shao at 2024-11-01T21:18:50+00:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 30 changed files: - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Platform/Ways.hs - compiler/GHC/Prelude/Basic.hs - compiler/GHC/SysTools/Process.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/GlobalVars.hs - compiler/GHC/Utils/Touch.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/cbits/genSym.c - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - libraries/base/tests/dynamic002.hs - libraries/base/tests/foldableArray.hs - libraries/ghc-bignum/src/GHC/Num/Integer.hs - libraries/ghc-bignum/src/GHC/Num/Primitives.hs - libraries/ghc-boot/GHC/BaseDir.hs - libraries/ghc-boot/GHC/Data/ShortText.hs - libraries/ghc-boot/GHC/Utils/Encoding/UTF8.hs - libraries/ghc-heap/GHC/Exts/Heap.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/282941381742cd54be15866f1683848cd81f4c19 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/282941381742cd54be15866f1683848cd81f4c19 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 22:12:04 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 01 Nov 2024 18:12:04 -0400 Subject: [Git][ghc/ghc][master] ghc-internal: strict, unboxed src loc ranges Message-ID: <672552343b890_1af4ef1398e0637d2@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 7 changed files: - compiler/GHC/Core/Make.hs - compiler/GHC/Tc/Types/EvTerm.hs - libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== compiler/GHC/Core/Make.hs ===================================== @@ -4,7 +4,7 @@ module GHC.Core.Make ( -- * Constructing normal syntax mkCoreLet, mkCoreLets, - mkCoreApp, mkCoreApps, mkCoreConApps, + mkCoreApp, mkCoreApps, mkCoreConApps, mkCoreConWrapApps, mkCoreLams, mkWildCase, mkIfThenElse, mkWildValBinder, mkSingleAltCase, @@ -70,7 +70,7 @@ import GHC.Core.Type import GHC.Core.Predicate ( isCoVarType ) import GHC.Core.TyCo.Compare ( eqType ) import GHC.Core.Coercion ( isCoVar ) -import GHC.Core.DataCon ( DataCon, dataConWorkId ) +import GHC.Core.DataCon ( DataCon, dataConWorkId, dataConWrapId ) import GHC.Core.Multiplicity import GHC.Builtin.Types @@ -133,6 +133,13 @@ mkCoreLets binds body = foldr mkCoreLet body binds mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr mkCoreConApps con args = mkCoreApps (Var (dataConWorkId con)) args +-- | A variant of 'mkCoreConApps' constructs an expression which represents the +-- application of a number of expressions to that of a data constructor +-- expression using the wrapper, not the worker, of the data constructor. The +-- leftmost expression in the list is applied first +mkCoreConWrapApps :: DataCon -> [CoreExpr] -> CoreExpr +mkCoreConWrapApps con args = mkCoreApps (Var (dataConWrapId con)) args + -- | Construct an expression which represents the application of a number of -- expressions to another. The leftmost expression in the list is applied first mkCoreApps :: CoreExpr -- ^ function ===================================== compiler/GHC/Tc/Types/EvTerm.hs ===================================== @@ -45,7 +45,7 @@ evCallStack (EvCsPushCall fs loc tm) = do let platform = targetPlatform df m <- getModule srcLocDataCon <- lookupDataCon srcLocDataConName - let mkSrcLoc l = mkCoreConApps srcLocDataCon <$> + let mkSrcLoc l = mkCoreConWrapApps srcLocDataCon <$> sequence [ mkStringExprFS (unitFS $ moduleUnit m) , mkStringExprFS (moduleNameFS $ moduleName m) , mkStringExprFS (srcSpanFile l) ===================================== libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs ===================================== @@ -217,8 +217,8 @@ data SrcLoc = SrcLoc { srcLocPackage :: [Char] , srcLocModule :: [Char] , srcLocFile :: [Char] - , srcLocStartLine :: Int - , srcLocStartCol :: Int - , srcLocEndLine :: Int - , srcLocEndCol :: Int + , srcLocStartLine :: !Int + , srcLocStartCol :: !Int + , srcLocEndLine :: !Int + , srcLocEndCol :: !Int } deriving Eq -- ^ @since base-4.9.0.0 ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -234,7 +234,7 @@ module Control.Exception where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -308,7 +308,7 @@ module Control.Exception where module Control.Exception.Annotation where -- Safety: None type ExceptionAnnotation :: * -> Constraint - class ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => ExceptionAnnotation a where + class ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a => ExceptionAnnotation a where displayExceptionAnnotation :: a -> GHC.Internal.Base.String default displayExceptionAnnotation :: GHC.Internal.Show.Show a => a -> GHC.Internal.Base.String {-# MINIMAL #-} @@ -350,7 +350,7 @@ module Control.Exception.Base where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -855,11 +855,11 @@ module Data.Data where type TyCon :: * data TyCon = ... type TypeRep :: * - type TypeRep = ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + type TypeRep = ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} cast :: forall a b. (Typeable a, Typeable b) => a -> GHC.Internal.Maybe.Maybe b constrFields :: Constr -> [GHC.Internal.Base.String] constrFixity :: Constr -> Fixity @@ -902,7 +902,7 @@ module Data.Data where showConstr :: Constr -> GHC.Internal.Base.String showsTypeRep :: TypeRep -> GHC.Internal.Show.ShowS splitTyConApp :: TypeRep -> (TyCon, [TypeRep]) - trLiftedRep :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep + trLiftedRep :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConModule :: TyCon -> GHC.Internal.Base.String tyConName :: TyCon -> GHC.Internal.Base.String @@ -926,14 +926,14 @@ module Data.Dynamic where -- Safety: Safe type Dynamic :: * data Dynamic where - Dynamic :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a -> a -> Dynamic + Dynamic :: forall a. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a -> a -> Dynamic type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} dynApp :: Dynamic -> Dynamic -> Dynamic dynApply :: Dynamic -> Dynamic -> GHC.Internal.Maybe.Maybe Dynamic - dynTypeRep :: Dynamic -> ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + dynTypeRep :: Dynamic -> ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep fromDyn :: forall a. Typeable a => Dynamic -> a -> a fromDynamic :: forall a. Typeable a => Dynamic -> GHC.Internal.Maybe.Maybe a toDyn :: forall a. Typeable a => a -> Dynamic @@ -1820,11 +1820,11 @@ module Data.Typeable where type TyCon :: * data TyCon = ... type TypeRep :: * - type TypeRep = ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + type TypeRep = ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} cast :: forall a b. (Typeable a, Typeable b) => a -> GHC.Internal.Maybe.Maybe b decT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => GHC.Internal.Data.Either.Either ((a :~: b) -> GHC.Internal.Base.Void) (a :~: b) eqT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => GHC.Internal.Maybe.Maybe (a :~: b) @@ -1839,7 +1839,7 @@ module Data.Typeable where rnfTypeRep :: TypeRep -> () showsTypeRep :: TypeRep -> GHC.Internal.Show.ShowS splitTyConApp :: TypeRep -> (TyCon, [TypeRep]) - trLiftedRep :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep + trLiftedRep :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConModule :: TyCon -> GHC.Internal.Base.String tyConName :: TyCon -> GHC.Internal.Base.String @@ -5260,7 +5260,7 @@ module GHC.Event where data EventManager = ... type FdKey :: * data FdKey - = ghc-internal-9.1001.0:GHC.Internal.Event.Manager.FdKey {keyFd :: ! {-# UNPACK #-}(GHC.Internal.System.Posix.Types.N:Fd + = ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey {keyFd :: ! {-# UNPACK #-}(GHC.Internal.System.Posix.Types.N:Fd ; GHC.Internal.Foreign.C.Types.N:CInt)GHC.Internal.System.Posix.Types.Fd, ...} type IOCallback :: * @@ -5293,9 +5293,9 @@ module GHC.Event.TimeOut where type TimeoutEdit :: * type TimeoutEdit = TimeoutQueue -> TimeoutQueue type TimeoutKey :: * - newtype TimeoutKey = TK ghc-internal-9.1100.0:GHC.Internal.Event.Unique.Unique + newtype TimeoutKey = TK ghc-internal-9.1300.0:GHC.Internal.Event.Unique.Unique type TimeoutQueue :: * - type TimeoutQueue = ghc-internal-9.1100.0:GHC.Internal.Event.PSQ.PSQ TimeoutCallback + type TimeoutQueue = ghc-internal-9.1300.0:GHC.Internal.Event.PSQ.PSQ TimeoutCallback module GHC.Exception where -- Safety: Safe @@ -5307,7 +5307,7 @@ module GHC.Exception where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -5316,7 +5316,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -5336,7 +5336,7 @@ module GHC.Exception.Type where type ArithException :: * data ArithException = Overflow | Underflow | LossOfPrecision | DivideByZero | Denormal | RatioZeroDenominator type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -7889,8 +7889,8 @@ module GHC.IO.Handle where hTryLock :: Handle -> LockMode -> GHC.Types.IO GHC.Types.Bool hWaitForInput :: Handle -> GHC.Types.Int -> GHC.Types.IO GHC.Types.Bool isEOF :: GHC.Types.IO GHC.Types.Bool - mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle - mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle + mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle + mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle nativeNewline :: Newline nativeNewlineMode :: NewlineMode noNewlineTranslation :: NewlineMode @@ -7940,11 +7940,11 @@ module GHC.IO.Handle.Internals where ioe_notReadable :: forall a. GHC.Types.IO a ioe_notWritable :: forall a. GHC.Types.IO a ioe_semiclosedHandle :: forall a. GHC.Types.IO a - mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkDuplexHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkFileHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.Handle.Types.HandleType -> GHC.Types.Bool -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Internal.Maybe.Maybe HandleFinalizer -> GHC.Internal.Maybe.Maybe (GHC.Internal.MVar.MVar GHC.Internal.IO.Handle.Types.Handle__) -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkDuplexHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkFileHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.Handle.Types.HandleType -> GHC.Types.Bool -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Internal.Maybe.Maybe HandleFinalizer -> GHC.Internal.Maybe.Maybe (GHC.Internal.MVar.MVar GHC.Internal.IO.Handle.Types.Handle__) -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle openTextEncoding :: forall a. GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.HandleType -> (forall es ds. GHC.Internal.Maybe.Maybe (GHC.Internal.IO.Encoding.Types.TextEncoder es) -> GHC.Internal.Maybe.Maybe (GHC.Internal.IO.Encoding.Types.TextDecoder ds) -> GHC.Types.IO a) -> GHC.Types.IO a readTextDevice :: GHC.Internal.IO.Handle.Types.Handle__ -> GHC.Internal.IO.Buffer.CharBuffer -> GHC.Types.IO GHC.Internal.IO.Buffer.CharBuffer readTextDeviceNonBlocking :: GHC.Internal.IO.Handle.Types.Handle__ -> GHC.Internal.IO.Buffer.CharBuffer -> GHC.Types.IO GHC.Internal.IO.Buffer.CharBuffer @@ -8008,7 +8008,7 @@ module GHC.IO.Handle.Types where type Handle__ :: * data Handle__ = forall dev enc_state dec_state. - (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => + (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => Handle__ {haDevice :: !dev, haType :: HandleType, haByteBuffer :: ! {-# UNPACK #-}(GHC.Internal.IORef.N:IORef _N)(GHC.Internal.IORef.IORef (GHC.Internal.IO.Buffer.Buffer GHC.Internal.Word.Word8)), @@ -9350,7 +9350,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9411,7 +9411,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack @@ -9422,7 +9422,7 @@ module GHC.StaticPtr where -- Safety: None type IsStatic :: (* -> *) -> Constraint class IsStatic p where - fromStaticPtr :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => StaticPtr a -> p a + fromStaticPtr :: forall a. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a => StaticPtr a -> p a {-# MINIMAL fromStaticPtr #-} type StaticKey :: * type StaticKey = GHC.Internal.Fingerprint.Type.Fingerprint @@ -10819,8 +10819,8 @@ module Type.Reflection where data (:~~:) a b where HRefl :: forall {k1} (a :: k1). (:~~:) a a pattern App :: forall k2 (t :: k2). () => forall k1 (a :: k1 -> k2) (b :: k1). (t ~ a b) => TypeRep a -> TypeRep b -> TypeRep t - pattern Con :: forall k (a :: k). () => ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> TypeRep a - pattern Con' :: forall k (a :: k). () => ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> [SomeTypeRep] -> TypeRep a + pattern Con :: forall k (a :: k). () => ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> TypeRep a + pattern Con' :: forall k (a :: k). () => ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> [SomeTypeRep] -> TypeRep a pattern Fun :: forall k (fun :: k). () => forall (r1 :: GHC.Types.RuntimeRep) (r2 :: GHC.Types.RuntimeRep) (arg :: TYPE r1) (res :: TYPE r2). (k ~ *, fun ~~ (arg -> res)) => TypeRep arg -> TypeRep res -> TypeRep fun type Module :: * data Module = ... @@ -10837,7 +10837,7 @@ module Type.Reflection where type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} decTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> GHC.Internal.Data.Either.Either ((a :~~: b) -> GHC.Internal.Base.Void) (a :~~: b) eqTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> GHC.Internal.Maybe.Maybe (a :~~: b) moduleName :: Module -> GHC.Internal.Base.String @@ -10872,9 +10872,9 @@ module Type.Reflection.Unsafe where data TypeRep a where ... mkTrApp :: forall k1 k2 (a :: k1 -> k2) (b :: k1). TypeRep a -> TypeRep b -> TypeRep (a b) - mkTrCon :: forall k (a :: k). TyCon -> [ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep] -> TypeRep a + mkTrCon :: forall k (a :: k). TyCon -> [ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep] -> TypeRep a mkTyCon :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> GHC.Internal.Base.String -> GHC.Types.Int -> KindRep -> TyCon - someTypeRepFingerprint :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -> GHC.Internal.Fingerprint.Type.Fingerprint + someTypeRepFingerprint :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -> GHC.Internal.Fingerprint.Type.Fingerprint tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConKindArgs :: TyCon -> GHC.Types.Int tyConKindRep :: TyCon -> KindRep @@ -11195,9 +11195,9 @@ instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.I instance forall a. (GHC.Classes.Ord a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Base.Monoid (Data.Semigroup.Max a) -- Defined in ‘Data.Semigroup’ instance forall a. (GHC.Classes.Ord a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Base.Monoid (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’ instance forall m. GHC.Internal.Base.Monoid m => GHC.Internal.Base.Monoid (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Internal.Base.Monoid (f p), GHC.Internal.Base.Monoid (g p)) => GHC.Internal.Base.Monoid ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Internal.Base.Monoid (f (g p)) => GHC.Internal.Base.Monoid ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall a. (GHC.Internal.Generics.Generic a, GHC.Internal.Base.Monoid (GHC.Internal.Generics.Rep a ())) => GHC.Internal.Base.Monoid (GHC.Internal.Generics.Generically a) -- Defined in ‘GHC.Internal.Generics’ @@ -11253,9 +11253,9 @@ instance forall a. GHC.Internal.Base.Semigroup (Data.Semigroup.Last a) -- Define instance forall a. GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Data.Semigroup.Max a) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’ instance forall m. GHC.Internal.Base.Monoid m => GHC.Internal.Base.Semigroup (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Internal.Base.Semigroup (f p), GHC.Internal.Base.Semigroup (g p)) => GHC.Internal.Base.Semigroup ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Internal.Base.Semigroup (f (g p)) => GHC.Internal.Base.Semigroup ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall a. (GHC.Internal.Generics.Generic a, GHC.Internal.Base.Semigroup (GHC.Internal.Generics.Rep a ())) => GHC.Internal.Base.Semigroup (GHC.Internal.Generics.Generically a) -- Defined in ‘GHC.Internal.Generics’ @@ -11398,20 +11398,20 @@ instance GHC.Internal.Control.Monad.Zip.MonadZip GHC.Internal.Data.Semigroup.Int instance GHC.Internal.Control.Monad.Zip.MonadZip Solo -- Defined in ‘GHC.Internal.Control.Monad.Zip’ instance GHC.Internal.Control.Monad.Zip.MonadZip GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Control.Monad.Zip’ instance GHC.Internal.Control.Monad.Zip.MonadZip Data.Complex.Complex -- Defined in ‘Data.Complex’ -instance forall (a :: * -> * -> *) b c. (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable c, GHC.Internal.Data.Data.Data (a b c)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’ -instance forall (m :: * -> *) a. (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable m, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (m a)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’ +instance forall (a :: * -> * -> *) b c. (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable c, GHC.Internal.Data.Data.Data (a b c)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’ +instance forall (m :: * -> *) a. (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable m, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (m a)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Functor.ZipList’ instance GHC.Internal.Data.Data.Data Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’ -instance forall s. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable s => GHC.Internal.Data.Data.Data (Data.Array.Byte.MutableByteArray s) -- Defined in ‘Data.Array.Byte’ +instance forall s. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable s => GHC.Internal.Data.Data.Data (Data.Array.Byte.MutableByteArray s) -- Defined in ‘Data.Array.Byte’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Complex.Complex a) -- Defined in ‘Data.Complex’ -instance forall i j (a :: i) (b :: j). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable i, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable j, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b, a ~~ b) => GHC.Internal.Data.Data.Data (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Data’ +instance forall i j (a :: i) (b :: j). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable i, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable j, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b, a ~~ b) => GHC.Internal.Data.Data.Data (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Data.Semigroup.Internal.All -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Data.Semigroup.Internal.Any -- Defined in ‘GHC.Internal.Data.Data’ instance forall a b. (GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data b, GHC.Internal.Ix.Ix a) => GHC.Internal.Data.Data.Data (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Generics.Associativity -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Bool -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Char -- Defined in ‘GHC.Internal.Data.Data’ -instance forall k a (b :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b) => GHC.Internal.Data.Data.Data (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Data’ +instance forall k a (b :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b) => GHC.Internal.Data.Data.Data (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Data’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Generics.DecidedStrictness -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Double -- Defined in ‘GHC.Internal.Data.Data’ @@ -11459,10 +11459,10 @@ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word32 -- Defined in ‘G instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word64 -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word8 -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Foreign.Ptr.WordPtr -- Defined in ‘GHC.Internal.Data.Data’ -instance forall k (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ -instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k2, GHC.Internal.Data.Data.Data (f (g a))) => GHC.Internal.Data.Data.Data (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ -instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’ -instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’ +instance forall k (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ +instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k2, GHC.Internal.Data.Data.Data (f (g a))) => GHC.Internal.Data.Data.Data (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ +instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’ +instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’ instance forall a b. (GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data b) => GHC.Internal.Data.Data.Data (Data.Semigroup.Arg a b) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Semigroup.First a) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Semigroup.Last a) -- Defined in ‘Data.Semigroup’ @@ -11528,7 +11528,7 @@ instance GHC.Internal.Data.Type.Equality.TestEquality GHC.Internal.TypeLits.SCha instance GHC.Internal.Data.Type.Equality.TestEquality GHC.Internal.TypeLits.SSymbol -- Defined in ‘GHC.Internal.TypeLits’ instance forall k (a :: k). GHC.Internal.Data.Type.Equality.TestEquality ((GHC.Internal.Data.Type.Equality.:~:) a) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k1 k (a :: k1). GHC.Internal.Data.Type.Equality.TestEquality ((GHC.Internal.Data.Type.Equality.:~~:) a) -- Defined in ‘GHC.Internal.Data.Type.Equality’ -instance forall k. GHC.Internal.Data.Type.Equality.TestEquality ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k. GHC.Internal.Data.Type.Equality.TestEquality ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1). GHC.Internal.Data.Type.Equality.TestEquality f => GHC.Internal.Data.Type.Equality.TestEquality (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’ instance forall a k (b :: k). GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’ @@ -11726,7 +11726,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Base.RecUpdError -- Defined in ‘GHC.Internal.Control.Exception.Base’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Base.TypeError -- Defined in ‘GHC.Internal.Control.Exception.Base’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ -instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common’ +instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance forall a k (b :: k). GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ @@ -12398,8 +12398,8 @@ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.DataRep -- Defined in ‘ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.DataType -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.Fixity -- Defined in ‘GHC.Internal.Data.Data’ instance forall k (s :: k). GHC.Internal.Show.Show (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance GHC.Internal.Show.Show GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ instance forall a b. (GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Show.Show (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ @@ -12470,13 +12470,13 @@ instance GHC.Internal.Show.Show GHC.Internal.Foreign.C.Types.CWchar -- Defined i instance forall a. GHC.Internal.Show.Show (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -- Defined in ‘GHC.Internal.Foreign.C.ConstPtr’ instance forall a b. (GHC.Internal.Ix.Ix a, GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Arr’ instance GHC.Internal.Show.Show GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Timeout -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Timeout -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager’ instance GHC.Internal.Show.Show GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Fingerprint.Type’ instance GHC.Internal.Show.Show GHC.Types.Double -- Defined in ‘GHC.Internal.Float’ instance GHC.Internal.Show.Show GHC.Types.Float -- Defined in ‘GHC.Internal.Float’ @@ -12510,7 +12510,7 @@ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.Handle -- Defined i instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.HandleType -- Defined in ‘GHC.Internal.IO.Handle.Types’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.Newline -- Defined in ‘GHC.Internal.IO.Handle.Types’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.NewlineMode -- Defined in ‘GHC.Internal.IO.Handle.Types’ -instance [safe] GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common’ +instance [safe] GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.HandlePosn -- Defined in ‘GHC.Internal.IO.Handle’ instance GHC.Internal.Show.Show GHC.Internal.IO.IOMode.IOMode -- Defined in ‘GHC.Internal.IO.IOMode’ instance GHC.Internal.Show.Show GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ @@ -12607,8 +12607,8 @@ instance GHC.Classes.Eq GHC.Internal.Data.Data.ConstrRep -- Defined in ‘GHC.In instance GHC.Classes.Eq GHC.Internal.Data.Data.DataRep -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Classes.Eq GHC.Internal.Data.Data.Fixity -- Defined in ‘GHC.Internal.Data.Data’ instance forall k (s :: k). GHC.Classes.Eq (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Classes.Eq (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Classes.Eq (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall a b. (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). GHC.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Classes.Eq (f (g a)) => GHC.Classes.Eq (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ @@ -12684,13 +12684,13 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) - instance forall i e. (GHC.Internal.Ix.Ix i, GHC.Classes.Eq e) => GHC.Classes.Eq (GHC.Internal.Arr.Array i e) -- Defined in ‘GHC.Internal.Arr’ instance forall s i e. GHC.Classes.Eq (GHC.Internal.Arr.STArray s i e) -- Defined in ‘GHC.Internal.Arr’ instance GHC.Classes.Eq GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ instance GHC.Classes.Eq GHC.Internal.Event.TimeOut.TimeoutKey -- Defined in ‘GHC.Internal.Event.TimeOut’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager’ instance GHC.Classes.Eq GHC.Internal.Stack.Types.SrcLoc -- Defined in ‘GHC.Internal.Stack.Types’ instance GHC.Classes.Eq GHC.Internal.Exts.SpecConstrAnnotation -- Defined in ‘GHC.Internal.Exts’ instance GHC.Classes.Eq GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Fingerprint.Type’ @@ -12786,8 +12786,8 @@ instance GHC.Classes.Ord GHC.Internal.Unicode.GeneralCategory -- Defined in ‘G instance forall k (a :: k) (b :: k). GHC.Classes.Ord (a GHC.Internal.Data.Type.Equality.:~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k1 k2 (a :: k1) (b :: k2). GHC.Classes.Ord (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k (s :: k). GHC.Classes.Ord (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Classes.Ord ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Classes.Ord (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Classes.Ord ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Classes.Ord (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall a b. (GHC.Classes.Ord a, GHC.Classes.Ord b) => GHC.Classes.Ord (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). GHC.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Classes.Ord (f (g a)) => GHC.Classes.Ord (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -5285,7 +5285,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -12392,7 +12392,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -12453,7 +12453,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -5462,7 +5462,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -9574,7 +9574,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9635,7 +9635,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -5316,7 +5316,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -9350,7 +9350,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9411,7 +9411,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ea4587794b9e3a098f9c02bd6cea2294af2539ce -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ea4587794b9e3a098f9c02bd6cea2294af2539ce You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 1 22:12:38 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 01 Nov 2024 18:12:38 -0400 Subject: [Git][ghc/ghc][master] No haddock markup in doctest line Message-ID: <67255256beeea_1af4ef1ad27c6683f@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - 1 changed file: - libraries/ghc-internal/src/GHC/Internal/List.hs Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/List.hs ===================================== @@ -1619,7 +1619,7 @@ lookup key ((x,y):xys) -- >>> concatMap (\i -> [-i, i]) [1, 2, 3] -- [-1,1,-2,2,-3,3] -- --- >>> concatMap ('replicate' 3) [0, 2, 4] +-- >>> concatMap (replicate 3) [0, 2, 4] -- [0,0,0,2,2,2,4,4,4] concatMap :: (a -> [b]) -> [a] -> [b] concatMap f = foldr ((++) . f) [] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/778ac793289934eb89f904cee4b8d4162b0539fa -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/778ac793289934eb89f904cee4b8d4162b0539fa You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 2 00:41:52 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 01 Nov 2024 20:41:52 -0400 Subject: [Git][ghc/ghc][wip/T20264] 37 commits: Add since tag for -fwrite-if-compression in user guide. Message-ID: <6725755057f90_1af4efb72e24726ae@gitlab.mail> Simon Peyton Jones pushed to branch wip/T20264 at Glasgow Haskell Compiler / GHC Commits: 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - 7f5ed9a2 by Joseph Fourment at 2024-11-01T22:41:14+00:00 compiler: introduce type variable unfoldings The plan for #20264 is to introduce let-bound types to have observable sharing in types. To avoid the need to carry an environment when dealing with occurrences of these type variables, we embed the types they're bound to (if any) in a `tv_unfolding :: Maybe Type` attribute. This way, one can look through let-bound type variables using `coreView` and friends. In particular, definitional equality looks through unfoldings. - - - - - 21bf6d45 by Joseph Fourment at 2024-11-01T22:41:15+00:00 simple-opt: don't inline type-lets - - - - - 9cd37f39 by Joseph Fourment at 2024-11-01T22:41:15+00:00 specialise: fix type-lets in DFun unfoldings During specialisation, a dictionary being specialised gets a new unfolding by turning `DFun \ bndrs -> MkD @<T1> ... @<Tm> <op1> ... <opn>` into `DFun \ spec_bndrs -> MkD @((\ bndrs -> TYPE: <T1>) spec_args) ... ((\ bndrs -> <opn>) spec_args)` which in turns gets beta-reduced into `DFun \ spec_bndrs -> MkD (let { bndrs = spec_args } in TYPE: <T1>) ... (let { bndrs = spec_args } in <opn>)`. Previously, such let binders would immediately be substituted into the type so it didn't cause any issue, but now we want to avoid inlining. Arguments of the form `let { bndrs = spec_args } in TYPE: <T1>` are not considered as type arguments since they're not of the canonical form `TYPE: something`. This commit restores the previous behavior of substituting the specialised type arguments. Alternatively, we could attach some floated type bindings to `DFun`s. - - - - - 512fd81a by Joseph Fourment at 2024-11-01T22:41:15+00:00 occur-anal: implement occurence analysis for type variables In order to find out let-bound type variables that are used only once, in the hope of inlining them, we need to track type variables as well in the occurrence analiser. Just like Id's, we attach an `OccInfo` to each (immutable) type variable, and we walk into types and coercions to accurately gather occurrences. - - - - - 3443b58b by Joseph Fourment at 2024-11-01T22:41:15+00:00 simplifier: don't inline type-lets Keep propagating type-lets further down the pipeline, in the simplifier. We also update CallArity, CprAnal, DmdAnal, WorkWrap, and Specialise to ignore type-lets. - - - - - 55e30c6d by Joseph Fourment at 2024-11-01T22:41:15+00:00 prep: make type-lets pass through CorePrep As a first attempt, ignore type-lets in CorePrep to avoid crashes. However, this is not enough: CorePrep also does some let-floating. If we don't float type-lets along with value-level let-bindings, the latter can float out of the scope of a type variable in use. - - - - - a5ce5fb2 by Joseph Fourment at 2024-11-01T22:41:15+00:00 simple-opt: fix simple_type_bind Also: - Inline small types using a new typeIsSmallEnoughToInline predicate - Inline single-occurrence variables - - - - - ec362740 by Joseph Fourment at 2024-11-01T22:41:15+00:00 simple-opt: make beta-reduction use simple_bind_type - - - - - f3320983 by Joseph Fourment at 2024-11-01T22:41:15+00:00 iface: add IfaceTypeLetBndr to represent non-top-level type-let binders IfaceLetBndr isn't fit to represent type-let binders, as it includes a bunch of vacuous flags for Ids only. Instead of putting squares in circles, I added a new constructor for type binders. The downside is that it breaks existing iface files, so since we can't bootstrap yet so we have to bootstrap a cherry-picked branch and then checkout again to build with --freeze1. To avoid similar issues in the future, IfaceTyVarInfoItem serialises with a tag despite there being only one constructor for now. - - - - - 54ec5375 by Joseph Fourment at 2024-11-01T22:41:15+00:00 dmd-anal: prefix unused variable with _ to avoid warning - - - - - 56e971de by Joseph Fourment at 2024-11-01T22:41:16+00:00 type: inline unfoldView in sORTKind_maybe - - - - - ea9c8a46 by Joseph Fourment at 2024-11-01T22:41:16+00:00 tidy: deal with type-lets - - - - - 738e1af2 by Joseph Fourment at 2024-11-01T22:41:16+00:00 notes: add Note [Type and coercion lets] - - - - - bae3bfb3 by Joseph Fourment at 2024-11-01T22:41:16+00:00 notes: update Note [Comparing nullary type synonyms] to account for type variables While updating backlinks, I noticed the optimisation for type variables could be performed in more places. - - - - - adb12493 by Joseph Fourment at 2024-11-01T22:41:16+00:00 simplifier: inline single-occurring type-lets - - - - - c3219340 by Joseph Fourment at 2024-11-01T22:41:16+00:00 cleanup: remove NOINLINE on tyVarOccInfo - - - - - 713525b2 by Simon Peyton Jones at 2024-11-01T22:41:16+00:00 Wibbles - - - - - 5784433e by Simon Peyton Jones at 2024-11-01T22:41:16+00:00 Wibbles - - - - - 87078bcf by Simon Peyton Jones at 2024-11-01T22:41:17+00:00 Progress - - - - - 523acbd9 by Simon Peyton Jones at 2024-11-01T22:42:11+00:00 Progress - - - - - cf1a07ad by Simon Peyton Jones at 2024-11-01T22:42:11+00:00 More progress - - - - - 31450e83 by Simon Peyton Jones at 2024-11-01T22:42:11+00:00 Progress ...doesn't compile though - - - - - e319b35c by Simon Peyton Jones at 2024-11-01T22:42:12+00:00 Mostly working now - - - - - 866f26c6 by Simon Peyton Jones at 2024-11-01T22:42:12+00:00 Aggressively create type-lets - - - - - 6b12c575 by Simon Peyton Jones at 2024-11-01T22:42:12+00:00 more progress - - - - - a2ecf8a6 by Simon Peyton Jones at 2024-11-01T22:42:12+00:00 More progress - - - - - 12739b78 by Simon Peyton Jones at 2024-11-01T22:42:12+00:00 Temp debug printing - - - - - 1f95d353 by Simon Peyton Jones at 2024-11-02T00:40:27+00:00 Remove bogus assert - - - - - 9be15075 by Simon Peyton Jones at 2024-11-02T00:40:40+00:00 Fix anoher couple of bugs in SimpleOpt and exprIsTrivial - - - - - 30 changed files: - compiler/GHC/Core.hs - compiler/GHC/Core/Coercion/Axiom.hs - compiler/GHC/Core/FVs.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/CallArity.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/FloatIn.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/SetLevels.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Monad.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Ppr.hs - compiler/GHC/Core/Rules.hs - compiler/GHC/Core/Seq.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Core/Tidy.hs - compiler/GHC/Core/TyCo/Compare.hs - compiler/GHC/Core/TyCo/FVs.hs - compiler/GHC/Core/TyCo/Ppr.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8ab348029e635aef41670ea094cc4ba11f47fd30...9be15075b0a7ad745861b3f2bd7551dad6efce3e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8ab348029e635aef41670ea094cc4ba11f47fd30...9be15075b0a7ad745861b3f2bd7551dad6efce3e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 2 00:44:46 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 01 Nov 2024 20:44:46 -0400 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: ghc-internal: strict, unboxed src loc ranges Message-ID: <672575fedaa91_1af4efbb11747373d@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - aa6a2ddb by Andreas Klebinger at 2024-11-01T20:44:27-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 4cf08dce by Andreas Klebinger at 2024-11-01T20:44:28-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 62f5c044 by Cheng Shao at 2024-11-01T20:44:29-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 12 changed files: - compiler/GHC/Core/Make.hs - compiler/GHC/Tc/Types/EvTerm.hs - docs/users_guide/using-optimisation.rst - libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs - libraries/ghc-internal/src/GHC/Internal/List.hs - libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/simd/should_run/T25062_V64.hs - testsuite/tests/simd/should_run/all.T Changes: ===================================== compiler/GHC/Core/Make.hs ===================================== @@ -4,7 +4,7 @@ module GHC.Core.Make ( -- * Constructing normal syntax mkCoreLet, mkCoreLets, - mkCoreApp, mkCoreApps, mkCoreConApps, + mkCoreApp, mkCoreApps, mkCoreConApps, mkCoreConWrapApps, mkCoreLams, mkWildCase, mkIfThenElse, mkWildValBinder, mkSingleAltCase, @@ -70,7 +70,7 @@ import GHC.Core.Type import GHC.Core.Predicate ( isCoVarType ) import GHC.Core.TyCo.Compare ( eqType ) import GHC.Core.Coercion ( isCoVar ) -import GHC.Core.DataCon ( DataCon, dataConWorkId ) +import GHC.Core.DataCon ( DataCon, dataConWorkId, dataConWrapId ) import GHC.Core.Multiplicity import GHC.Builtin.Types @@ -133,6 +133,13 @@ mkCoreLets binds body = foldr mkCoreLet body binds mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr mkCoreConApps con args = mkCoreApps (Var (dataConWorkId con)) args +-- | A variant of 'mkCoreConApps' constructs an expression which represents the +-- application of a number of expressions to that of a data constructor +-- expression using the wrapper, not the worker, of the data constructor. The +-- leftmost expression in the list is applied first +mkCoreConWrapApps :: DataCon -> [CoreExpr] -> CoreExpr +mkCoreConWrapApps con args = mkCoreApps (Var (dataConWrapId con)) args + -- | Construct an expression which represents the application of a number of -- expressions to another. The leftmost expression in the list is applied first mkCoreApps :: CoreExpr -- ^ function ===================================== compiler/GHC/Tc/Types/EvTerm.hs ===================================== @@ -45,7 +45,7 @@ evCallStack (EvCsPushCall fs loc tm) = do let platform = targetPlatform df m <- getModule srcLocDataCon <- lookupDataCon srcLocDataConName - let mkSrcLoc l = mkCoreConApps srcLocDataCon <$> + let mkSrcLoc l = mkCoreConWrapApps srcLocDataCon <$> sequence [ mkStringExprFS (unitFS $ moduleUnit m) , mkStringExprFS (moduleNameFS $ moduleName m) , mkStringExprFS (srcSpanFile l) ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -531,7 +531,8 @@ as such you shouldn't need to set any of them explicitly. A flag * Use of the magic `inline` function to force inlining. .. ghc-flag:: -fexpose-overloaded-unfoldings - :shortdesc: Expose unfoldings carrying constraints, even for very large or recursive functions. + :shortdesc: Expose function unfoldings whose type contains constraints, + even for very large or recursive functions. :type: dynamic :reverse: -fno-expose-overloaded-unfoldings :category: @@ -541,19 +542,24 @@ as such you shouldn't need to set any of them explicitly. A flag This experimental flag is a slightly less heavy weight alternative to :ghc-flag:`-fexpose-all-unfoldings`. - Instead of exposing all functions it only aims at exposing constrained functions. + Instead of exposing all functions it exposes only those functions which + contain constraints within their type. This is intended to be used for cases where specialization is considered crucial but :ghc-flag:`-fexpose-all-unfoldings` imposes too much compile time cost. - Currently this won't expose unfoldings where a type class is hidden under a - newtype. That is for cases like: :: + This doesn't guarantee *all* functions which might benefit from specialization + will be exposed, for example currently this won't expose unfoldings where a + type class is hidden under a newtype. + + That is for cases like: :: newtype NT a = NT (Integral a => a) foo :: NT a -> T1 -> TR - GHC won't recognise `foo` as specialisable and won't expose the unfolding + GHC won't look under `NT` for constraints and therefore `foo` won't be + recognized as specialisable and this flag won't expose the unfolding even with :ghc-flag:`-fexpose-overloaded-unfoldings` enabled. All the other caveats about :ghc-flag:`-fexpose-overloaded-unfoldings` ===================================== libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, +{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables, MagicHash, BangPatterns #-} ----------------------------------------------------------------------------- @@ -370,9 +370,6 @@ findIndex p = listToMaybe . findIndices p -- >>> findIndices (\l -> length l > 3) ["a", "bcde", "fgh", "ijklmnop"] -- [1,3] findIndices :: (a -> Bool) -> [a] -> [Int] -#if defined(USE_REPORT_PRELUDE) -findIndices p xs = [ i | (x,i) <- zip xs [0..], p x] -#else -- Efficient definition, adapted from Data.Sequence -- (Note that making this INLINABLE instead of INLINE allows -- 'findIndex' to fuse, fixing #15426.) @@ -381,7 +378,6 @@ findIndices p ls = build $ \c n -> let go x r k | p x = I# k `c` r (k +# 1#) | otherwise = r (k +# 1#) in foldr go (\_ -> n) ls 0# -#endif /* USE_REPORT_PRELUDE */ -- | \(\mathcal{O}(\min(m,n))\). The 'isPrefixOf' function takes two lists and -- returns 'True' iff the first list is a prefix of the second. @@ -540,10 +536,6 @@ nub = nubBy (==) -- >>> nubBy (>) [1, 2, 3, 2, 1, 5, 4, 5, 3, 2] -- [1,2,3,5,5] nubBy :: (a -> a -> Bool) -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -nubBy eq [] = [] -nubBy eq (x:xs) = x : nubBy eq (filter (\ y -> not (eq x y)) xs) -#else -- stolen from HBC nubBy eq l = nubBy' l [] where @@ -562,7 +554,6 @@ nubBy eq l = nubBy' l [] elem_by :: (a -> a -> Bool) -> a -> [a] -> Bool elem_by _ _ [] = False elem_by eq y (x:xs) = x `eq` y || elem_by eq y xs -#endif -- | \(\mathcal{O}(n)\). 'delete' @x@ removes the first occurrence of @x@ from @@ -1627,10 +1618,6 @@ sort :: (Ord a) => [a] -> [a] -- [(1,"Hello"),(2,"world"),(4,"!")] sortBy :: (a -> a -> Ordering) -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -sort = sortBy compare -sortBy cmp = foldr (insertBy cmp) [] -#else {- GHC's mergesort replaced by a better implementation, 24/12/2009. @@ -1840,8 +1827,6 @@ rqpart cmp x (y:ys) rle rgt r = _ -> rqpart cmp x ys (y:rle) rgt r -} -#endif /* USE_REPORT_PRELUDE */ - -- | Sort a list by comparing the results of a key function applied to each -- element. @'sortOn' f@ is equivalent to @'sortBy' ('comparing' f)@, but has the -- performance advantage of only evaluating @f@ once for each element in the @@ -2027,14 +2012,10 @@ lines s = cons (case break (== '\n') s of -- >>> unlines . lines $ "foo\nbar" -- "foo\nbar\n" unlines :: [String] -> String -#if defined(USE_REPORT_PRELUDE) -unlines = concatMap (++ "\n") -#else -- HBC version (stolen) -- here's a more efficient version unlines [] = [] unlines (l:ls) = l ++ '\n' : unlines ls -#endif -- | 'words' breaks a string up into a list of words, which were delimited -- by white space (as defined by 'isSpace'). This function trims any white spaces @@ -2085,10 +2066,6 @@ wordsFB c n = go -- >>> unwords ["foo", "bar", "", "baz"] -- "foo bar baz" unwords :: [String] -> String -#if defined(USE_REPORT_PRELUDE) -unwords [] = "" -unwords ws = foldr1 (\w s -> w ++ ' ':s) ws -#else -- Here's a lazier version that can get the last element of a -- _|_-terminated list. {-# NOINLINE [1] unwords #-} @@ -2118,7 +2095,6 @@ tailUnwords (_:xs) = xs {-# INLINE [0] unwordsFB #-} unwordsFB :: String -> String -> String unwordsFB w r = ' ' : w ++ r -#endif {- A "SnocBuilder" is a version of Chris Okasaki's banker's queue that supports toListSB instead of uncons. In single-threaded use, its performance ===================================== libraries/ghc-internal/src/GHC/Internal/List.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables #-} +{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} @@ -208,11 +208,6 @@ tail [] = errorEmptyList "tail" -- >>> last [] -- *** Exception: Prelude.last: empty list last :: HasCallStack => [a] -> a -#if defined(USE_REPORT_PRELUDE) -last [x] = x -last (_:xs) = last xs -last [] = errorEmptyList "last" -#else -- Use foldl to make last a good consumer. -- This will compile to good code for the actual GHC.Internal.List.last. -- (At least as long it is eta-expanded, otherwise it does not, #10260.) @@ -222,7 +217,6 @@ last xs = foldl (\_ x -> x) lastError xs -- foldl. lastError :: HasCallStack => a lastError = errorEmptyList "last" -#endif -- | \(\mathcal{O}(n)\). Return all the elements of a list except the last one. -- The list must be non-empty. @@ -240,17 +234,11 @@ lastError = errorEmptyList "last" -- >>> init [] -- *** Exception: Prelude.init: empty list init :: HasCallStack => [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -init [x] = [] -init (x:xs) = x : init xs -init [] = errorEmptyList "init" -#else -- eliminate repeated cases init [] = errorEmptyList "init" init (x:xs) = init' x xs where init' _ [] = [] init' y (z:zs) = y : init' z zs -#endif -- | \(\mathcal{O}(1)\). Test whether a list is empty. -- @@ -1091,11 +1079,6 @@ dropWhile p xs@(x:xs') -- >>> take 0 [1,2] -- [] take :: Int -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -take n _ | n <= 0 = [] -take _ [] = [] -take n (x:xs) = x : take (n-1) xs -#else {- We always want to inline this to take advantage of a known length argument sign. Note, however, that it's important for the RULES to grab take, rather @@ -1141,7 +1124,6 @@ takeFB c n x xs = \ m -> case m of 1 -> x `c` n _ -> x `c` xs (m - 1) -#endif -- | 'drop' @n xs@ returns the suffix of @xs@ -- after the first @n@ elements, or @[]@ if @n >= 'length' xs at . @@ -1169,11 +1151,6 @@ takeFB c n x xs -- >>> drop 0 [1,2] -- [1,2] drop :: Int -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -drop n xs | n <= 0 = xs -drop _ [] = [] -drop n (_:xs) = drop (n-1) xs -#else /* hack away */ {-# INLINE drop #-} drop n ls | n <= 0 = ls @@ -1185,7 +1162,6 @@ drop n ls unsafeDrop !_ [] = [] unsafeDrop 1 (_:xs) = xs unsafeDrop m (_:xs) = unsafeDrop (m - 1) xs -#endif -- | 'splitAt' @n xs@ returns a tuple where first element is @xs@ prefix of -- length @n@ and second element is the remainder of the list: @@ -1231,9 +1207,6 @@ drop n ls -- ([],[1,2,3]) splitAt :: Int -> [a] -> ([a],[a]) -#if defined(USE_REPORT_PRELUDE) -splitAt n xs = (take n xs, drop n xs) -#else splitAt n ls | n <= 0 = ([], ls) | otherwise = splitAt' n ls @@ -1244,7 +1217,6 @@ splitAt n ls splitAt' m (x:xs) = (x:xs', xs'') where (xs', xs'') = splitAt' (m - 1) xs -#endif /* USE_REPORT_PRELUDE */ -- | 'span', applied to a predicate @p@ and a list @xs@, returns a tuple where -- first element is the longest prefix (possibly empty) of @xs@ of elements that @@ -1322,15 +1294,11 @@ span p xs@(x:xs') -- >>> break (> 9) [1,2,3] -- ([1,2,3],[]) break :: (a -> Bool) -> [a] -> ([a],[a]) -#if defined(USE_REPORT_PRELUDE) -break p = span (not . p) -#else -- HBC version (stolen) break _ xs@[] = (xs, xs) break p xs@(x:xs') | p x = ([],xs) | otherwise = let (ys,zs) = break p xs' in (x:ys,zs) -#endif -- | \(\mathcal{O}(n)\). 'reverse' @xs@ returns the elements of @xs@ in reverse order. -- @xs@ must be finite. @@ -1359,14 +1327,10 @@ break p xs@(x:xs') -- >>> reverse [1..] -- * Hangs forever * reverse :: [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -reverse = foldl (flip (:)) [] -#else reverse l = rev l [] where rev [] a = a rev (x:xs) a = rev xs (x:a) -#endif -- | 'and' returns the conjunction of a Boolean list. For the result to be -- 'True', the list must be finite; 'False', however, results from a 'False' @@ -1392,9 +1356,6 @@ reverse l = rev l [] -- >>> and (repeat True) -- * Hangs forever * and :: [Bool] -> Bool -#if defined(USE_REPORT_PRELUDE) -and = foldr (&&) True -#else and [] = True and (x:xs) = x && and xs {-# NOINLINE [1] and #-} @@ -1403,7 +1364,6 @@ and (x:xs) = x && and xs "and/build" forall (g::forall b.(Bool->b->b)->b->b) . and (build g) = g (&&) True #-} -#endif -- | 'or' returns the disjunction of a Boolean list. For the result to be -- 'False', the list must be finite; 'True', however, results from a 'True' @@ -1429,9 +1389,6 @@ and (x:xs) = x && and xs -- >>> or (repeat False) -- * Hangs forever * or :: [Bool] -> Bool -#if defined(USE_REPORT_PRELUDE) -or = foldr (||) False -#else or [] = False or (x:xs) = x || or xs {-# NOINLINE [1] or #-} @@ -1440,7 +1397,6 @@ or (x:xs) = x || or xs "or/build" forall (g::forall b.(Bool->b->b)->b->b) . or (build g) = g (||) False #-} -#endif -- | Applied to a predicate and a list, 'any' determines if any element -- of the list satisfies the predicate. For the result to be @@ -1465,9 +1421,6 @@ or (x:xs) = x || or xs -- >>> any (> 3) [0, -1..] -- * Hangs forever * any :: (a -> Bool) -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -any p = or . map p -#else any _ [] = False any p (x:xs) = p x || any p xs @@ -1477,7 +1430,6 @@ any p (x:xs) = p x || any p xs "any/build" forall p (g::forall b.(a->b->b)->b->b) . any p (build g) = g ((||) . p) False #-} -#endif -- | Applied to a predicate and a list, 'all' determines if all elements -- of the list satisfy the predicate. For the result to be @@ -1502,9 +1454,6 @@ any p (x:xs) = p x || any p xs -- >>> all (> 3) [4..] -- * Hangs forever * all :: (a -> Bool) -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -all p = and . map p -#else all _ [] = True all p (x:xs) = p x && all p xs @@ -1514,7 +1463,6 @@ all p (x:xs) = p x && all p xs "all/build" forall p (g::forall b.(a->b->b)->b->b) . all p (build g) = g ((&&) . p) True #-} -#endif -- | 'elem' is the list membership predicate, usually written in infix form, -- e.g., @x \`elem\` xs at . For the result to be @@ -1538,9 +1486,6 @@ all p (x:xs) = p x && all p xs -- >>> 3 `elem` [4..] -- * Hangs forever * elem :: (Eq a) => a -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -elem x = any (== x) -#else elem _ [] = False elem x (y:ys) = x==y || elem x ys {-# NOINLINE [1] elem #-} @@ -1548,7 +1493,6 @@ elem x (y:ys) = x==y || elem x ys "elem/build" forall x (g :: forall b . (a -> b -> b) -> b -> b) . elem x (build g) = g (\ y r -> (x == y) || r) False #-} -#endif -- | 'notElem' is the negation of 'elem'. -- @@ -1569,9 +1513,6 @@ elem x (y:ys) = x==y || elem x ys -- >>> 3 `notElem` [4..] -- * Hangs forever * notElem :: (Eq a) => a -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -notElem x = all (/= x) -#else notElem _ [] = True notElem x (y:ys)= x /= y && notElem x ys {-# NOINLINE [1] notElem #-} @@ -1579,7 +1520,6 @@ notElem x (y:ys)= x /= y && notElem x ys "notElem/build" forall x (g :: forall b . (a -> b -> b) -> b -> b) . notElem x (build g) = g (\ y r -> (x /= y) && r) True #-} -#endif -- | \(\mathcal{O}(n)\). 'lookup' @key assocs@ looks up a key in an association -- list. @@ -1619,7 +1559,7 @@ lookup key ((x,y):xys) -- >>> concatMap (\i -> [-i, i]) [1, 2, 3] -- [-1,1,-2,2,-3,3] -- --- >>> concatMap ('replicate' 3) [0, 2, 4] +-- >>> concatMap (replicate 3) [0, 2, 4] -- [0,0,0,2,2,2,4,4,4] concatMap :: (a -> [b]) -> [a] -> [b] concatMap f = foldr ((++) . f) [] @@ -1677,14 +1617,6 @@ concat = foldr (++) [] -- -- >>> ['a', 'b', 'c'] !! (-1) -- *** Exception: Prelude.!!: negative index -#if defined(USE_REPORT_PRELUDE) -(!!) :: [a] -> Int -> a -xs !! n | n < 0 = errorWithoutStackTrace "Prelude.!!: negative index" -[] !! _ = errorWithoutStackTrace "Prelude.!!: index too large" -(x:_) !! 0 = x -(_:xs) !! n = xs !! (n-1) --- Prelude version is without HasCallStack to avoid building linear one -#else (!!) :: HasCallStack => [a] -> Int -> a -- We don't really want the errors to inline with (!!). @@ -1703,7 +1635,6 @@ xs !! n | otherwise = foldr (\x r k -> case k of 0 -> x _ -> r (k-1)) tooLarge xs n -#endif -- | List index (subscript) operator, starting from 0. Returns 'Nothing' -- if the index is out of bounds ===================================== libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs ===================================== @@ -217,8 +217,8 @@ data SrcLoc = SrcLoc { srcLocPackage :: [Char] , srcLocModule :: [Char] , srcLocFile :: [Char] - , srcLocStartLine :: Int - , srcLocStartCol :: Int - , srcLocEndLine :: Int - , srcLocEndCol :: Int + , srcLocStartLine :: !Int + , srcLocStartCol :: !Int + , srcLocEndLine :: !Int + , srcLocEndCol :: !Int } deriving Eq -- ^ @since base-4.9.0.0 ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -234,7 +234,7 @@ module Control.Exception where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -308,7 +308,7 @@ module Control.Exception where module Control.Exception.Annotation where -- Safety: None type ExceptionAnnotation :: * -> Constraint - class ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => ExceptionAnnotation a where + class ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a => ExceptionAnnotation a where displayExceptionAnnotation :: a -> GHC.Internal.Base.String default displayExceptionAnnotation :: GHC.Internal.Show.Show a => a -> GHC.Internal.Base.String {-# MINIMAL #-} @@ -350,7 +350,7 @@ module Control.Exception.Base where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -855,11 +855,11 @@ module Data.Data where type TyCon :: * data TyCon = ... type TypeRep :: * - type TypeRep = ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + type TypeRep = ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} cast :: forall a b. (Typeable a, Typeable b) => a -> GHC.Internal.Maybe.Maybe b constrFields :: Constr -> [GHC.Internal.Base.String] constrFixity :: Constr -> Fixity @@ -902,7 +902,7 @@ module Data.Data where showConstr :: Constr -> GHC.Internal.Base.String showsTypeRep :: TypeRep -> GHC.Internal.Show.ShowS splitTyConApp :: TypeRep -> (TyCon, [TypeRep]) - trLiftedRep :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep + trLiftedRep :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConModule :: TyCon -> GHC.Internal.Base.String tyConName :: TyCon -> GHC.Internal.Base.String @@ -926,14 +926,14 @@ module Data.Dynamic where -- Safety: Safe type Dynamic :: * data Dynamic where - Dynamic :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a -> a -> Dynamic + Dynamic :: forall a. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a -> a -> Dynamic type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} dynApp :: Dynamic -> Dynamic -> Dynamic dynApply :: Dynamic -> Dynamic -> GHC.Internal.Maybe.Maybe Dynamic - dynTypeRep :: Dynamic -> ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + dynTypeRep :: Dynamic -> ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep fromDyn :: forall a. Typeable a => Dynamic -> a -> a fromDynamic :: forall a. Typeable a => Dynamic -> GHC.Internal.Maybe.Maybe a toDyn :: forall a. Typeable a => a -> Dynamic @@ -1820,11 +1820,11 @@ module Data.Typeable where type TyCon :: * data TyCon = ... type TypeRep :: * - type TypeRep = ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + type TypeRep = ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} cast :: forall a b. (Typeable a, Typeable b) => a -> GHC.Internal.Maybe.Maybe b decT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => GHC.Internal.Data.Either.Either ((a :~: b) -> GHC.Internal.Base.Void) (a :~: b) eqT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => GHC.Internal.Maybe.Maybe (a :~: b) @@ -1839,7 +1839,7 @@ module Data.Typeable where rnfTypeRep :: TypeRep -> () showsTypeRep :: TypeRep -> GHC.Internal.Show.ShowS splitTyConApp :: TypeRep -> (TyCon, [TypeRep]) - trLiftedRep :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep + trLiftedRep :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConModule :: TyCon -> GHC.Internal.Base.String tyConName :: TyCon -> GHC.Internal.Base.String @@ -5260,7 +5260,7 @@ module GHC.Event where data EventManager = ... type FdKey :: * data FdKey - = ghc-internal-9.1001.0:GHC.Internal.Event.Manager.FdKey {keyFd :: ! {-# UNPACK #-}(GHC.Internal.System.Posix.Types.N:Fd + = ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey {keyFd :: ! {-# UNPACK #-}(GHC.Internal.System.Posix.Types.N:Fd ; GHC.Internal.Foreign.C.Types.N:CInt)GHC.Internal.System.Posix.Types.Fd, ...} type IOCallback :: * @@ -5293,9 +5293,9 @@ module GHC.Event.TimeOut where type TimeoutEdit :: * type TimeoutEdit = TimeoutQueue -> TimeoutQueue type TimeoutKey :: * - newtype TimeoutKey = TK ghc-internal-9.1100.0:GHC.Internal.Event.Unique.Unique + newtype TimeoutKey = TK ghc-internal-9.1300.0:GHC.Internal.Event.Unique.Unique type TimeoutQueue :: * - type TimeoutQueue = ghc-internal-9.1100.0:GHC.Internal.Event.PSQ.PSQ TimeoutCallback + type TimeoutQueue = ghc-internal-9.1300.0:GHC.Internal.Event.PSQ.PSQ TimeoutCallback module GHC.Exception where -- Safety: Safe @@ -5307,7 +5307,7 @@ module GHC.Exception where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -5316,7 +5316,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -5336,7 +5336,7 @@ module GHC.Exception.Type where type ArithException :: * data ArithException = Overflow | Underflow | LossOfPrecision | DivideByZero | Denormal | RatioZeroDenominator type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -7889,8 +7889,8 @@ module GHC.IO.Handle where hTryLock :: Handle -> LockMode -> GHC.Types.IO GHC.Types.Bool hWaitForInput :: Handle -> GHC.Types.Int -> GHC.Types.IO GHC.Types.Bool isEOF :: GHC.Types.IO GHC.Types.Bool - mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle - mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle + mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle + mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle nativeNewline :: Newline nativeNewlineMode :: NewlineMode noNewlineTranslation :: NewlineMode @@ -7940,11 +7940,11 @@ module GHC.IO.Handle.Internals where ioe_notReadable :: forall a. GHC.Types.IO a ioe_notWritable :: forall a. GHC.Types.IO a ioe_semiclosedHandle :: forall a. GHC.Types.IO a - mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkDuplexHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkFileHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.Handle.Types.HandleType -> GHC.Types.Bool -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Internal.Maybe.Maybe HandleFinalizer -> GHC.Internal.Maybe.Maybe (GHC.Internal.MVar.MVar GHC.Internal.IO.Handle.Types.Handle__) -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkDuplexHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkFileHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.Handle.Types.HandleType -> GHC.Types.Bool -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Internal.Maybe.Maybe HandleFinalizer -> GHC.Internal.Maybe.Maybe (GHC.Internal.MVar.MVar GHC.Internal.IO.Handle.Types.Handle__) -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle openTextEncoding :: forall a. GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.HandleType -> (forall es ds. GHC.Internal.Maybe.Maybe (GHC.Internal.IO.Encoding.Types.TextEncoder es) -> GHC.Internal.Maybe.Maybe (GHC.Internal.IO.Encoding.Types.TextDecoder ds) -> GHC.Types.IO a) -> GHC.Types.IO a readTextDevice :: GHC.Internal.IO.Handle.Types.Handle__ -> GHC.Internal.IO.Buffer.CharBuffer -> GHC.Types.IO GHC.Internal.IO.Buffer.CharBuffer readTextDeviceNonBlocking :: GHC.Internal.IO.Handle.Types.Handle__ -> GHC.Internal.IO.Buffer.CharBuffer -> GHC.Types.IO GHC.Internal.IO.Buffer.CharBuffer @@ -8008,7 +8008,7 @@ module GHC.IO.Handle.Types where type Handle__ :: * data Handle__ = forall dev enc_state dec_state. - (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => + (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => Handle__ {haDevice :: !dev, haType :: HandleType, haByteBuffer :: ! {-# UNPACK #-}(GHC.Internal.IORef.N:IORef _N)(GHC.Internal.IORef.IORef (GHC.Internal.IO.Buffer.Buffer GHC.Internal.Word.Word8)), @@ -9350,7 +9350,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9411,7 +9411,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack @@ -9422,7 +9422,7 @@ module GHC.StaticPtr where -- Safety: None type IsStatic :: (* -> *) -> Constraint class IsStatic p where - fromStaticPtr :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => StaticPtr a -> p a + fromStaticPtr :: forall a. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a => StaticPtr a -> p a {-# MINIMAL fromStaticPtr #-} type StaticKey :: * type StaticKey = GHC.Internal.Fingerprint.Type.Fingerprint @@ -10819,8 +10819,8 @@ module Type.Reflection where data (:~~:) a b where HRefl :: forall {k1} (a :: k1). (:~~:) a a pattern App :: forall k2 (t :: k2). () => forall k1 (a :: k1 -> k2) (b :: k1). (t ~ a b) => TypeRep a -> TypeRep b -> TypeRep t - pattern Con :: forall k (a :: k). () => ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> TypeRep a - pattern Con' :: forall k (a :: k). () => ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> [SomeTypeRep] -> TypeRep a + pattern Con :: forall k (a :: k). () => ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> TypeRep a + pattern Con' :: forall k (a :: k). () => ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> [SomeTypeRep] -> TypeRep a pattern Fun :: forall k (fun :: k). () => forall (r1 :: GHC.Types.RuntimeRep) (r2 :: GHC.Types.RuntimeRep) (arg :: TYPE r1) (res :: TYPE r2). (k ~ *, fun ~~ (arg -> res)) => TypeRep arg -> TypeRep res -> TypeRep fun type Module :: * data Module = ... @@ -10837,7 +10837,7 @@ module Type.Reflection where type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} decTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> GHC.Internal.Data.Either.Either ((a :~~: b) -> GHC.Internal.Base.Void) (a :~~: b) eqTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> GHC.Internal.Maybe.Maybe (a :~~: b) moduleName :: Module -> GHC.Internal.Base.String @@ -10872,9 +10872,9 @@ module Type.Reflection.Unsafe where data TypeRep a where ... mkTrApp :: forall k1 k2 (a :: k1 -> k2) (b :: k1). TypeRep a -> TypeRep b -> TypeRep (a b) - mkTrCon :: forall k (a :: k). TyCon -> [ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep] -> TypeRep a + mkTrCon :: forall k (a :: k). TyCon -> [ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep] -> TypeRep a mkTyCon :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> GHC.Internal.Base.String -> GHC.Types.Int -> KindRep -> TyCon - someTypeRepFingerprint :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -> GHC.Internal.Fingerprint.Type.Fingerprint + someTypeRepFingerprint :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -> GHC.Internal.Fingerprint.Type.Fingerprint tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConKindArgs :: TyCon -> GHC.Types.Int tyConKindRep :: TyCon -> KindRep @@ -11195,9 +11195,9 @@ instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.I instance forall a. (GHC.Classes.Ord a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Base.Monoid (Data.Semigroup.Max a) -- Defined in ‘Data.Semigroup’ instance forall a. (GHC.Classes.Ord a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Base.Monoid (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’ instance forall m. GHC.Internal.Base.Monoid m => GHC.Internal.Base.Monoid (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Internal.Base.Monoid (f p), GHC.Internal.Base.Monoid (g p)) => GHC.Internal.Base.Monoid ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Internal.Base.Monoid (f (g p)) => GHC.Internal.Base.Monoid ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall a. (GHC.Internal.Generics.Generic a, GHC.Internal.Base.Monoid (GHC.Internal.Generics.Rep a ())) => GHC.Internal.Base.Monoid (GHC.Internal.Generics.Generically a) -- Defined in ‘GHC.Internal.Generics’ @@ -11253,9 +11253,9 @@ instance forall a. GHC.Internal.Base.Semigroup (Data.Semigroup.Last a) -- Define instance forall a. GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Data.Semigroup.Max a) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’ instance forall m. GHC.Internal.Base.Monoid m => GHC.Internal.Base.Semigroup (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Internal.Base.Semigroup (f p), GHC.Internal.Base.Semigroup (g p)) => GHC.Internal.Base.Semigroup ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Internal.Base.Semigroup (f (g p)) => GHC.Internal.Base.Semigroup ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall a. (GHC.Internal.Generics.Generic a, GHC.Internal.Base.Semigroup (GHC.Internal.Generics.Rep a ())) => GHC.Internal.Base.Semigroup (GHC.Internal.Generics.Generically a) -- Defined in ‘GHC.Internal.Generics’ @@ -11398,20 +11398,20 @@ instance GHC.Internal.Control.Monad.Zip.MonadZip GHC.Internal.Data.Semigroup.Int instance GHC.Internal.Control.Monad.Zip.MonadZip Solo -- Defined in ‘GHC.Internal.Control.Monad.Zip’ instance GHC.Internal.Control.Monad.Zip.MonadZip GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Control.Monad.Zip’ instance GHC.Internal.Control.Monad.Zip.MonadZip Data.Complex.Complex -- Defined in ‘Data.Complex’ -instance forall (a :: * -> * -> *) b c. (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable c, GHC.Internal.Data.Data.Data (a b c)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’ -instance forall (m :: * -> *) a. (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable m, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (m a)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’ +instance forall (a :: * -> * -> *) b c. (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable c, GHC.Internal.Data.Data.Data (a b c)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’ +instance forall (m :: * -> *) a. (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable m, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (m a)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Functor.ZipList’ instance GHC.Internal.Data.Data.Data Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’ -instance forall s. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable s => GHC.Internal.Data.Data.Data (Data.Array.Byte.MutableByteArray s) -- Defined in ‘Data.Array.Byte’ +instance forall s. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable s => GHC.Internal.Data.Data.Data (Data.Array.Byte.MutableByteArray s) -- Defined in ‘Data.Array.Byte’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Complex.Complex a) -- Defined in ‘Data.Complex’ -instance forall i j (a :: i) (b :: j). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable i, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable j, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b, a ~~ b) => GHC.Internal.Data.Data.Data (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Data’ +instance forall i j (a :: i) (b :: j). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable i, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable j, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b, a ~~ b) => GHC.Internal.Data.Data.Data (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Data.Semigroup.Internal.All -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Data.Semigroup.Internal.Any -- Defined in ‘GHC.Internal.Data.Data’ instance forall a b. (GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data b, GHC.Internal.Ix.Ix a) => GHC.Internal.Data.Data.Data (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Generics.Associativity -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Bool -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Char -- Defined in ‘GHC.Internal.Data.Data’ -instance forall k a (b :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b) => GHC.Internal.Data.Data.Data (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Data’ +instance forall k a (b :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b) => GHC.Internal.Data.Data.Data (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Data’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Generics.DecidedStrictness -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Double -- Defined in ‘GHC.Internal.Data.Data’ @@ -11459,10 +11459,10 @@ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word32 -- Defined in ‘G instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word64 -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word8 -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Foreign.Ptr.WordPtr -- Defined in ‘GHC.Internal.Data.Data’ -instance forall k (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ -instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k2, GHC.Internal.Data.Data.Data (f (g a))) => GHC.Internal.Data.Data.Data (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ -instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’ -instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’ +instance forall k (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ +instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k2, GHC.Internal.Data.Data.Data (f (g a))) => GHC.Internal.Data.Data.Data (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ +instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’ +instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’ instance forall a b. (GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data b) => GHC.Internal.Data.Data.Data (Data.Semigroup.Arg a b) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Semigroup.First a) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Semigroup.Last a) -- Defined in ‘Data.Semigroup’ @@ -11528,7 +11528,7 @@ instance GHC.Internal.Data.Type.Equality.TestEquality GHC.Internal.TypeLits.SCha instance GHC.Internal.Data.Type.Equality.TestEquality GHC.Internal.TypeLits.SSymbol -- Defined in ‘GHC.Internal.TypeLits’ instance forall k (a :: k). GHC.Internal.Data.Type.Equality.TestEquality ((GHC.Internal.Data.Type.Equality.:~:) a) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k1 k (a :: k1). GHC.Internal.Data.Type.Equality.TestEquality ((GHC.Internal.Data.Type.Equality.:~~:) a) -- Defined in ‘GHC.Internal.Data.Type.Equality’ -instance forall k. GHC.Internal.Data.Type.Equality.TestEquality ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k. GHC.Internal.Data.Type.Equality.TestEquality ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1). GHC.Internal.Data.Type.Equality.TestEquality f => GHC.Internal.Data.Type.Equality.TestEquality (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’ instance forall a k (b :: k). GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’ @@ -11726,7 +11726,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Base.RecUpdError -- Defined in ‘GHC.Internal.Control.Exception.Base’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Base.TypeError -- Defined in ‘GHC.Internal.Control.Exception.Base’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ -instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common’ +instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance forall a k (b :: k). GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ @@ -12398,8 +12398,8 @@ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.DataRep -- Defined in ‘ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.DataType -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.Fixity -- Defined in ‘GHC.Internal.Data.Data’ instance forall k (s :: k). GHC.Internal.Show.Show (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance GHC.Internal.Show.Show GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ instance forall a b. (GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Show.Show (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ @@ -12470,13 +12470,13 @@ instance GHC.Internal.Show.Show GHC.Internal.Foreign.C.Types.CWchar -- Defined i instance forall a. GHC.Internal.Show.Show (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -- Defined in ‘GHC.Internal.Foreign.C.ConstPtr’ instance forall a b. (GHC.Internal.Ix.Ix a, GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Arr’ instance GHC.Internal.Show.Show GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Timeout -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Timeout -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager’ instance GHC.Internal.Show.Show GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Fingerprint.Type’ instance GHC.Internal.Show.Show GHC.Types.Double -- Defined in ‘GHC.Internal.Float’ instance GHC.Internal.Show.Show GHC.Types.Float -- Defined in ‘GHC.Internal.Float’ @@ -12510,7 +12510,7 @@ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.Handle -- Defined i instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.HandleType -- Defined in ‘GHC.Internal.IO.Handle.Types’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.Newline -- Defined in ‘GHC.Internal.IO.Handle.Types’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.NewlineMode -- Defined in ‘GHC.Internal.IO.Handle.Types’ -instance [safe] GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common’ +instance [safe] GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.HandlePosn -- Defined in ‘GHC.Internal.IO.Handle’ instance GHC.Internal.Show.Show GHC.Internal.IO.IOMode.IOMode -- Defined in ‘GHC.Internal.IO.IOMode’ instance GHC.Internal.Show.Show GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ @@ -12607,8 +12607,8 @@ instance GHC.Classes.Eq GHC.Internal.Data.Data.ConstrRep -- Defined in ‘GHC.In instance GHC.Classes.Eq GHC.Internal.Data.Data.DataRep -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Classes.Eq GHC.Internal.Data.Data.Fixity -- Defined in ‘GHC.Internal.Data.Data’ instance forall k (s :: k). GHC.Classes.Eq (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Classes.Eq (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Classes.Eq (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall a b. (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). GHC.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Classes.Eq (f (g a)) => GHC.Classes.Eq (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ @@ -12684,13 +12684,13 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) - instance forall i e. (GHC.Internal.Ix.Ix i, GHC.Classes.Eq e) => GHC.Classes.Eq (GHC.Internal.Arr.Array i e) -- Defined in ‘GHC.Internal.Arr’ instance forall s i e. GHC.Classes.Eq (GHC.Internal.Arr.STArray s i e) -- Defined in ‘GHC.Internal.Arr’ instance GHC.Classes.Eq GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ instance GHC.Classes.Eq GHC.Internal.Event.TimeOut.TimeoutKey -- Defined in ‘GHC.Internal.Event.TimeOut’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager’ instance GHC.Classes.Eq GHC.Internal.Stack.Types.SrcLoc -- Defined in ‘GHC.Internal.Stack.Types’ instance GHC.Classes.Eq GHC.Internal.Exts.SpecConstrAnnotation -- Defined in ‘GHC.Internal.Exts’ instance GHC.Classes.Eq GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Fingerprint.Type’ @@ -12786,8 +12786,8 @@ instance GHC.Classes.Ord GHC.Internal.Unicode.GeneralCategory -- Defined in ‘G instance forall k (a :: k) (b :: k). GHC.Classes.Ord (a GHC.Internal.Data.Type.Equality.:~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k1 k2 (a :: k1) (b :: k2). GHC.Classes.Ord (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k (s :: k). GHC.Classes.Ord (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Classes.Ord ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Classes.Ord (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Classes.Ord ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Classes.Ord (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall a b. (GHC.Classes.Ord a, GHC.Classes.Ord b) => GHC.Classes.Ord (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). GHC.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Classes.Ord (f (g a)) => GHC.Classes.Ord (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -5285,7 +5285,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -12392,7 +12392,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -12453,7 +12453,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -5462,7 +5462,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -9574,7 +9574,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9635,7 +9635,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -5316,7 +5316,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -9350,7 +9350,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9411,7 +9411,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack ===================================== testsuite/tests/simd/should_run/T25062_V64.hs ===================================== @@ -10,7 +10,7 @@ main = case foo ( \ x y -> plusDoubleX8# x y ) of v -> case unpackDoubleX8# v of (# d1, d2, d3, d4, d5, d6, d7, d8 #) -> - print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8s ] + print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8 ] {-# NOINLINE foo #-} foo :: ( DoubleX8# -> DoubleX8# -> DoubleX8# ) -> DoubleX8# ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -58,13 +58,26 @@ test('simd014', test('T22187', [],compile,['']) test('T22187_run', [],compile_and_run,['']) test('T25062_V16', [], compile_and_run, ['']) -test('T25062_V32', [ unless(have_cpu_feature('avx2'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 256 bit wide vectors - ] - , compile_and_run, ['']) -test('T25062_V64', [ unless(have_cpu_feature('avx512f'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 512 bit wide vectors - ] - , compile_and_run, ['']) + +# Even if the CPU we run on doesn't support *executing* those tests we should try to +# compile them. +# Currently even for compilation we only support 256+ bit on x86 +only_V32_plus_compilation_support = unless(arch('x86_64'), skip) + +test('T25062_V32' + , [ extra_hc_opts('-mavx2') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx2') else compile + , ['']) + +test('T25062_V64' + , [ extra_hc_opts('-mavx512f') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx512f') else compile + , ['']) test('T25169', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/da7326c3bfba011ca190c2fad21143db6b032477...62f5c0447eba90a0c74b9ff717163d7457ec77b8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/da7326c3bfba011ca190c2fad21143db6b032477...62f5c0447eba90a0c74b9ff717163d7457ec77b8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 2 09:00:57 2024 From: gitlab at gitlab.haskell.org (Sven Tennie (@supersven)) Date: Sat, 02 Nov 2024 05:00:57 -0400 Subject: [Git][ghc/ghc] Pushed new branch wip/supersven/simplify-aarch64-load-and-store Message-ID: <6725ea4963e90_13ea83d64598139d@gitlab.mail> Sven Tennie pushed new branch wip/supersven/simplify-aarch64-load-and-store at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/supersven/simplify-aarch64-load-and-store You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 2 21:55:52 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 02 Nov 2024 17:55:52 -0400 Subject: [Git][ghc/ghc][master] Reword -fexpose-overloaded-unfoldings docs. Message-ID: <67269fe8cf56e_254c85b3439028691@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1 changed file: - docs/users_guide/using-optimisation.rst Changes: ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -531,7 +531,8 @@ as such you shouldn't need to set any of them explicitly. A flag * Use of the magic `inline` function to force inlining. .. ghc-flag:: -fexpose-overloaded-unfoldings - :shortdesc: Expose unfoldings carrying constraints, even for very large or recursive functions. + :shortdesc: Expose function unfoldings whose type contains constraints, + even for very large or recursive functions. :type: dynamic :reverse: -fno-expose-overloaded-unfoldings :category: @@ -541,19 +542,24 @@ as such you shouldn't need to set any of them explicitly. A flag This experimental flag is a slightly less heavy weight alternative to :ghc-flag:`-fexpose-all-unfoldings`. - Instead of exposing all functions it only aims at exposing constrained functions. + Instead of exposing all functions it exposes only those functions which + contain constraints within their type. This is intended to be used for cases where specialization is considered crucial but :ghc-flag:`-fexpose-all-unfoldings` imposes too much compile time cost. - Currently this won't expose unfoldings where a type class is hidden under a - newtype. That is for cases like: :: + This doesn't guarantee *all* functions which might benefit from specialization + will be exposed, for example currently this won't expose unfoldings where a + type class is hidden under a newtype. + + That is for cases like: :: newtype NT a = NT (Integral a => a) foo :: NT a -> T1 -> TR - GHC won't recognise `foo` as specialisable and won't expose the unfolding + GHC won't look under `NT` for constraints and therefore `foo` won't be + recognized as specialisable and this flag won't expose the unfolding even with :ghc-flag:`-fexpose-overloaded-unfoldings` enabled. All the other caveats about :ghc-flag:`-fexpose-overloaded-unfoldings` View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cf0deeaf0828f9da7ed5b7109123ef544c24002c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/cf0deeaf0828f9da7ed5b7109123ef544c24002c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 2 21:56:35 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 02 Nov 2024 17:56:35 -0400 Subject: [Git][ghc/ghc][master] Compile T25062 simd tests even if we can't run them. Message-ID: <6726a0133d039_254c85c440a033089@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 2 changed files: - testsuite/tests/simd/should_run/T25062_V64.hs - testsuite/tests/simd/should_run/all.T Changes: ===================================== testsuite/tests/simd/should_run/T25062_V64.hs ===================================== @@ -10,7 +10,7 @@ main = case foo ( \ x y -> plusDoubleX8# x y ) of v -> case unpackDoubleX8# v of (# d1, d2, d3, d4, d5, d6, d7, d8 #) -> - print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8s ] + print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8 ] {-# NOINLINE foo #-} foo :: ( DoubleX8# -> DoubleX8# -> DoubleX8# ) -> DoubleX8# ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -58,13 +58,26 @@ test('simd014', test('T22187', [],compile,['']) test('T22187_run', [],compile_and_run,['']) test('T25062_V16', [], compile_and_run, ['']) -test('T25062_V32', [ unless(have_cpu_feature('avx2'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 256 bit wide vectors - ] - , compile_and_run, ['']) -test('T25062_V64', [ unless(have_cpu_feature('avx512f'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 512 bit wide vectors - ] - , compile_and_run, ['']) + +# Even if the CPU we run on doesn't support *executing* those tests we should try to +# compile them. +# Currently even for compilation we only support 256+ bit on x86 +only_V32_plus_compilation_support = unless(arch('x86_64'), skip) + +test('T25062_V32' + , [ extra_hc_opts('-mavx2') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx2') else compile + , ['']) + +test('T25062_V64' + , [ extra_hc_opts('-mavx512f') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx512f') else compile + , ['']) test('T25169', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1c21e7d4358162342b707f20ae2765ad02affdf3 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1c21e7d4358162342b707f20ae2765ad02affdf3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 2 21:57:02 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 02 Nov 2024 17:57:02 -0400 Subject: [Git][ghc/ghc][master] Remove unused USE_REPORT_PRELUDE code paths from the tree Message-ID: <6726a02e55a3a_254c85fd99e03325d@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 2 changed files: - libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs - libraries/ghc-internal/src/GHC/Internal/List.hs Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, +{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables, MagicHash, BangPatterns #-} ----------------------------------------------------------------------------- @@ -370,9 +370,6 @@ findIndex p = listToMaybe . findIndices p -- >>> findIndices (\l -> length l > 3) ["a", "bcde", "fgh", "ijklmnop"] -- [1,3] findIndices :: (a -> Bool) -> [a] -> [Int] -#if defined(USE_REPORT_PRELUDE) -findIndices p xs = [ i | (x,i) <- zip xs [0..], p x] -#else -- Efficient definition, adapted from Data.Sequence -- (Note that making this INLINABLE instead of INLINE allows -- 'findIndex' to fuse, fixing #15426.) @@ -381,7 +378,6 @@ findIndices p ls = build $ \c n -> let go x r k | p x = I# k `c` r (k +# 1#) | otherwise = r (k +# 1#) in foldr go (\_ -> n) ls 0# -#endif /* USE_REPORT_PRELUDE */ -- | \(\mathcal{O}(\min(m,n))\). The 'isPrefixOf' function takes two lists and -- returns 'True' iff the first list is a prefix of the second. @@ -540,10 +536,6 @@ nub = nubBy (==) -- >>> nubBy (>) [1, 2, 3, 2, 1, 5, 4, 5, 3, 2] -- [1,2,3,5,5] nubBy :: (a -> a -> Bool) -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -nubBy eq [] = [] -nubBy eq (x:xs) = x : nubBy eq (filter (\ y -> not (eq x y)) xs) -#else -- stolen from HBC nubBy eq l = nubBy' l [] where @@ -562,7 +554,6 @@ nubBy eq l = nubBy' l [] elem_by :: (a -> a -> Bool) -> a -> [a] -> Bool elem_by _ _ [] = False elem_by eq y (x:xs) = x `eq` y || elem_by eq y xs -#endif -- | \(\mathcal{O}(n)\). 'delete' @x@ removes the first occurrence of @x@ from @@ -1627,10 +1618,6 @@ sort :: (Ord a) => [a] -> [a] -- [(1,"Hello"),(2,"world"),(4,"!")] sortBy :: (a -> a -> Ordering) -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -sort = sortBy compare -sortBy cmp = foldr (insertBy cmp) [] -#else {- GHC's mergesort replaced by a better implementation, 24/12/2009. @@ -1840,8 +1827,6 @@ rqpart cmp x (y:ys) rle rgt r = _ -> rqpart cmp x ys (y:rle) rgt r -} -#endif /* USE_REPORT_PRELUDE */ - -- | Sort a list by comparing the results of a key function applied to each -- element. @'sortOn' f@ is equivalent to @'sortBy' ('comparing' f)@, but has the -- performance advantage of only evaluating @f@ once for each element in the @@ -2027,14 +2012,10 @@ lines s = cons (case break (== '\n') s of -- >>> unlines . lines $ "foo\nbar" -- "foo\nbar\n" unlines :: [String] -> String -#if defined(USE_REPORT_PRELUDE) -unlines = concatMap (++ "\n") -#else -- HBC version (stolen) -- here's a more efficient version unlines [] = [] unlines (l:ls) = l ++ '\n' : unlines ls -#endif -- | 'words' breaks a string up into a list of words, which were delimited -- by white space (as defined by 'isSpace'). This function trims any white spaces @@ -2085,10 +2066,6 @@ wordsFB c n = go -- >>> unwords ["foo", "bar", "", "baz"] -- "foo bar baz" unwords :: [String] -> String -#if defined(USE_REPORT_PRELUDE) -unwords [] = "" -unwords ws = foldr1 (\w s -> w ++ ' ':s) ws -#else -- Here's a lazier version that can get the last element of a -- _|_-terminated list. {-# NOINLINE [1] unwords #-} @@ -2118,7 +2095,6 @@ tailUnwords (_:xs) = xs {-# INLINE [0] unwordsFB #-} unwordsFB :: String -> String -> String unwordsFB w r = ' ' : w ++ r -#endif {- A "SnocBuilder" is a version of Chris Okasaki's banker's queue that supports toListSB instead of uncons. In single-threaded use, its performance ===================================== libraries/ghc-internal/src/GHC/Internal/List.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables #-} +{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} @@ -208,11 +208,6 @@ tail [] = errorEmptyList "tail" -- >>> last [] -- *** Exception: Prelude.last: empty list last :: HasCallStack => [a] -> a -#if defined(USE_REPORT_PRELUDE) -last [x] = x -last (_:xs) = last xs -last [] = errorEmptyList "last" -#else -- Use foldl to make last a good consumer. -- This will compile to good code for the actual GHC.Internal.List.last. -- (At least as long it is eta-expanded, otherwise it does not, #10260.) @@ -222,7 +217,6 @@ last xs = foldl (\_ x -> x) lastError xs -- foldl. lastError :: HasCallStack => a lastError = errorEmptyList "last" -#endif -- | \(\mathcal{O}(n)\). Return all the elements of a list except the last one. -- The list must be non-empty. @@ -240,17 +234,11 @@ lastError = errorEmptyList "last" -- >>> init [] -- *** Exception: Prelude.init: empty list init :: HasCallStack => [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -init [x] = [] -init (x:xs) = x : init xs -init [] = errorEmptyList "init" -#else -- eliminate repeated cases init [] = errorEmptyList "init" init (x:xs) = init' x xs where init' _ [] = [] init' y (z:zs) = y : init' z zs -#endif -- | \(\mathcal{O}(1)\). Test whether a list is empty. -- @@ -1091,11 +1079,6 @@ dropWhile p xs@(x:xs') -- >>> take 0 [1,2] -- [] take :: Int -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -take n _ | n <= 0 = [] -take _ [] = [] -take n (x:xs) = x : take (n-1) xs -#else {- We always want to inline this to take advantage of a known length argument sign. Note, however, that it's important for the RULES to grab take, rather @@ -1141,7 +1124,6 @@ takeFB c n x xs = \ m -> case m of 1 -> x `c` n _ -> x `c` xs (m - 1) -#endif -- | 'drop' @n xs@ returns the suffix of @xs@ -- after the first @n@ elements, or @[]@ if @n >= 'length' xs at . @@ -1169,11 +1151,6 @@ takeFB c n x xs -- >>> drop 0 [1,2] -- [1,2] drop :: Int -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -drop n xs | n <= 0 = xs -drop _ [] = [] -drop n (_:xs) = drop (n-1) xs -#else /* hack away */ {-# INLINE drop #-} drop n ls | n <= 0 = ls @@ -1185,7 +1162,6 @@ drop n ls unsafeDrop !_ [] = [] unsafeDrop 1 (_:xs) = xs unsafeDrop m (_:xs) = unsafeDrop (m - 1) xs -#endif -- | 'splitAt' @n xs@ returns a tuple where first element is @xs@ prefix of -- length @n@ and second element is the remainder of the list: @@ -1231,9 +1207,6 @@ drop n ls -- ([],[1,2,3]) splitAt :: Int -> [a] -> ([a],[a]) -#if defined(USE_REPORT_PRELUDE) -splitAt n xs = (take n xs, drop n xs) -#else splitAt n ls | n <= 0 = ([], ls) | otherwise = splitAt' n ls @@ -1244,7 +1217,6 @@ splitAt n ls splitAt' m (x:xs) = (x:xs', xs'') where (xs', xs'') = splitAt' (m - 1) xs -#endif /* USE_REPORT_PRELUDE */ -- | 'span', applied to a predicate @p@ and a list @xs@, returns a tuple where -- first element is the longest prefix (possibly empty) of @xs@ of elements that @@ -1322,15 +1294,11 @@ span p xs@(x:xs') -- >>> break (> 9) [1,2,3] -- ([1,2,3],[]) break :: (a -> Bool) -> [a] -> ([a],[a]) -#if defined(USE_REPORT_PRELUDE) -break p = span (not . p) -#else -- HBC version (stolen) break _ xs@[] = (xs, xs) break p xs@(x:xs') | p x = ([],xs) | otherwise = let (ys,zs) = break p xs' in (x:ys,zs) -#endif -- | \(\mathcal{O}(n)\). 'reverse' @xs@ returns the elements of @xs@ in reverse order. -- @xs@ must be finite. @@ -1359,14 +1327,10 @@ break p xs@(x:xs') -- >>> reverse [1..] -- * Hangs forever * reverse :: [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -reverse = foldl (flip (:)) [] -#else reverse l = rev l [] where rev [] a = a rev (x:xs) a = rev xs (x:a) -#endif -- | 'and' returns the conjunction of a Boolean list. For the result to be -- 'True', the list must be finite; 'False', however, results from a 'False' @@ -1392,9 +1356,6 @@ reverse l = rev l [] -- >>> and (repeat True) -- * Hangs forever * and :: [Bool] -> Bool -#if defined(USE_REPORT_PRELUDE) -and = foldr (&&) True -#else and [] = True and (x:xs) = x && and xs {-# NOINLINE [1] and #-} @@ -1403,7 +1364,6 @@ and (x:xs) = x && and xs "and/build" forall (g::forall b.(Bool->b->b)->b->b) . and (build g) = g (&&) True #-} -#endif -- | 'or' returns the disjunction of a Boolean list. For the result to be -- 'False', the list must be finite; 'True', however, results from a 'True' @@ -1429,9 +1389,6 @@ and (x:xs) = x && and xs -- >>> or (repeat False) -- * Hangs forever * or :: [Bool] -> Bool -#if defined(USE_REPORT_PRELUDE) -or = foldr (||) False -#else or [] = False or (x:xs) = x || or xs {-# NOINLINE [1] or #-} @@ -1440,7 +1397,6 @@ or (x:xs) = x || or xs "or/build" forall (g::forall b.(Bool->b->b)->b->b) . or (build g) = g (||) False #-} -#endif -- | Applied to a predicate and a list, 'any' determines if any element -- of the list satisfies the predicate. For the result to be @@ -1465,9 +1421,6 @@ or (x:xs) = x || or xs -- >>> any (> 3) [0, -1..] -- * Hangs forever * any :: (a -> Bool) -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -any p = or . map p -#else any _ [] = False any p (x:xs) = p x || any p xs @@ -1477,7 +1430,6 @@ any p (x:xs) = p x || any p xs "any/build" forall p (g::forall b.(a->b->b)->b->b) . any p (build g) = g ((||) . p) False #-} -#endif -- | Applied to a predicate and a list, 'all' determines if all elements -- of the list satisfy the predicate. For the result to be @@ -1502,9 +1454,6 @@ any p (x:xs) = p x || any p xs -- >>> all (> 3) [4..] -- * Hangs forever * all :: (a -> Bool) -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -all p = and . map p -#else all _ [] = True all p (x:xs) = p x && all p xs @@ -1514,7 +1463,6 @@ all p (x:xs) = p x && all p xs "all/build" forall p (g::forall b.(a->b->b)->b->b) . all p (build g) = g ((&&) . p) True #-} -#endif -- | 'elem' is the list membership predicate, usually written in infix form, -- e.g., @x \`elem\` xs at . For the result to be @@ -1538,9 +1486,6 @@ all p (x:xs) = p x && all p xs -- >>> 3 `elem` [4..] -- * Hangs forever * elem :: (Eq a) => a -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -elem x = any (== x) -#else elem _ [] = False elem x (y:ys) = x==y || elem x ys {-# NOINLINE [1] elem #-} @@ -1548,7 +1493,6 @@ elem x (y:ys) = x==y || elem x ys "elem/build" forall x (g :: forall b . (a -> b -> b) -> b -> b) . elem x (build g) = g (\ y r -> (x == y) || r) False #-} -#endif -- | 'notElem' is the negation of 'elem'. -- @@ -1569,9 +1513,6 @@ elem x (y:ys) = x==y || elem x ys -- >>> 3 `notElem` [4..] -- * Hangs forever * notElem :: (Eq a) => a -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -notElem x = all (/= x) -#else notElem _ [] = True notElem x (y:ys)= x /= y && notElem x ys {-# NOINLINE [1] notElem #-} @@ -1579,7 +1520,6 @@ notElem x (y:ys)= x /= y && notElem x ys "notElem/build" forall x (g :: forall b . (a -> b -> b) -> b -> b) . notElem x (build g) = g (\ y r -> (x /= y) && r) True #-} -#endif -- | \(\mathcal{O}(n)\). 'lookup' @key assocs@ looks up a key in an association -- list. @@ -1677,14 +1617,6 @@ concat = foldr (++) [] -- -- >>> ['a', 'b', 'c'] !! (-1) -- *** Exception: Prelude.!!: negative index -#if defined(USE_REPORT_PRELUDE) -(!!) :: [a] -> Int -> a -xs !! n | n < 0 = errorWithoutStackTrace "Prelude.!!: negative index" -[] !! _ = errorWithoutStackTrace "Prelude.!!: index too large" -(x:_) !! 0 = x -(_:xs) !! n = xs !! (n-1) --- Prelude version is without HasCallStack to avoid building linear one -#else (!!) :: HasCallStack => [a] -> Int -> a -- We don't really want the errors to inline with (!!). @@ -1703,7 +1635,6 @@ xs !! n | otherwise = foldr (\x r k -> case k of 0 -> x _ -> r (k-1)) tooLarge xs n -#endif -- | List index (subscript) operator, starting from 0. Returns 'Nothing' -- if the index is out of bounds View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/573cad4bd9e7fc146581d9711d36c4e3bacbb6e9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/573cad4bd9e7fc146581d9711d36c4e3bacbb6e9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 00:04:09 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Sat, 02 Nov 2024 20:04:09 -0400 Subject: [Git][ghc/ghc][wip/T20264] Improve zonking of foreign decls to avoid TcTyVars escaping Message-ID: <6726bdf946697_254c85161f08437535@gitlab.mail> Simon Peyton Jones pushed to branch wip/T20264 at Glasgow Haskell Compiler / GHC Commits: 2df7352c by Simon Peyton Jones at 2024-11-03T00:03:38+00:00 Improve zonking of foreign decls to avoid TcTyVars escaping - - - - - 3 changed files: - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Tc/Zonk/Type.hs Changes: ===================================== compiler/GHC/Core/Opt/Simplify/Env.hs ===================================== @@ -1133,7 +1133,7 @@ substIdBndr env bndr -- = extendVarEnv tv_subst old_tv (DoneId new_tv) -- | otherwise -- = delVarEnv tv_subst old_tv --- +-- -- !new_in_scope = in_scope `extendInScopeSet` new_tv --------------- ===================================== compiler/GHC/Core/Opt/Simplify/Iteration.hs ===================================== @@ -1889,7 +1889,7 @@ simpl_lam env bndr body (ApplyToTy { sc_arg_ty = arg_ty, sc_cont = cont }) = do { tick (BetaReduction bndr) ; (floats1, env1) <- completeTyVarBindX env bndr arg_ty ; (floats2, expr') <- simplLam env1 body cont - ; return (floats1 `addFloats` floats2, expr') } + ; return (floats1 `addFloats` floats2, expr') } -- Coercion beta-reduction simpl_lam env bndr body (ApplyToVal { sc_arg = Coercion arg_co, sc_env = arg_se ===================================== compiler/GHC/Tc/Zonk/Type.hs ===================================== @@ -667,11 +667,13 @@ zonkTopDecls :: Bag EvBind zonkTopDecls ev_binds binds rules imp_specs fords = initZonkEnv DefaultFlexi $ runZonkBndrT (zonkEvBinds ev_binds) $ \ ev_binds' -> + runZonkBndrT (zonkForeignDecls fords) $ \ fords' -> + -- Do foreign decls first; they bring Ids + -- into scope that are mentioned in `binds` runZonkBndrT (zonkRecMonoBinds binds) $ \ binds' -> -- Top level is implicitly recursive do { rules' <- zonkRules rules ; specs' <- zonkLTcSpecPrags imp_specs - ; fords' <- zonkForeignDecls fords ; ty_env <- zonkEnvIds <$> getZonkEnv ; return (ty_env, ev_binds', binds', fords', specs', rules') } @@ -1651,19 +1653,20 @@ zonkPats = traverse zonkPat -} zonkForeignDecls :: [LForeignDecl GhcTc] - -> ZonkTcM [LForeignDecl GhcTc] -zonkForeignDecls ls = mapM (wrapLocZonkMA zonkForeignDecl) ls + -> ZonkBndrTcM [LForeignDecl GhcTc] +zonkForeignDecls ls = mapM (wrapLocZonkBndrMA zonkForeignDecl) ls -zonkForeignDecl :: ForeignDecl GhcTc -> ZonkTcM (ForeignDecl GhcTc) +zonkForeignDecl :: ForeignDecl GhcTc -> ZonkBndrTcM (ForeignDecl GhcTc) -- Zonk foreign decls, even though they are closed, to turn TcTyVars into TyVars zonkForeignDecl fd@(ForeignExport { fd_name = i, fd_e_ext = co }) - = do { i' <- zonkLIdOcc i + = noBinders $ + do { i' <- zonkLIdOcc i ; co' <- zonkCoToCo co ; return (fd { fd_name = i', fd_e_ext = co' }) } -zonkForeignDecl fd@(ForeignImport { fd_name = i, fd_i_ext = co }) - = do { i' <- zonkLIdOcc i - ; co' <- zonkCoToCo co - ; return (fd { fd_name = i', fd_i_ext = co' }) } +zonkForeignDecl fd@(ForeignImport { fd_name = L loc i, fd_i_ext = co }) + = do { i' <- zonkIdBndrX i + ; co' <- noBinders $ zonkCoToCo co + ; return (fd { fd_name = L loc i', fd_i_ext = co' }) } zonkRules :: [LRuleDecl GhcTc] -> ZonkTcM [LRuleDecl GhcTc] zonkRules rs = mapM (wrapLocZonkMA zonkRule) rs View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2df7352c3ce859c2a2377f01623bdedeb1a16aa8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2df7352c3ce859c2a2377f01623bdedeb1a16aa8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 00:12:50 2024 From: gitlab at gitlab.haskell.org (Brandon Chinn (@brandonchinn178)) Date: Sat, 02 Nov 2024 20:12:50 -0400 Subject: [Git][ghc/ghc][wip/T25375] Fix CRLF in multiline strings (#25375) Message-ID: <6726c002eedc2_254c8516f11ec38323@gitlab.mail> Brandon Chinn pushed to branch wip/T25375 at Glasgow Haskell Compiler / GHC Commits: 2ebce027 by Brandon Chinn at 2024-11-02T17:12:19-07:00 Fix CRLF in multiline strings (#25375) - - - - - 6 changed files: - .gitattributes - compiler/GHC/Parser/String.hs - docs/users_guide/exts/multiline_strings.rst - + testsuite/tests/parser/should_run/T25375.hs - + testsuite/tests/parser/should_run/T25375.stdout - testsuite/tests/parser/should_run/all.T Changes: ===================================== .gitattributes ===================================== @@ -2,3 +2,4 @@ # don't convert anything on checkout * text=auto eol=lf mk/win32-tarballs.md5sum text=auto eol=LF +testsuite/tests/parser/should_run/T25375.hs text=auto eol=crlf ===================================== compiler/GHC/Parser/String.hs ===================================== @@ -261,12 +261,22 @@ lexMultilineString = lexStringWith processChars processChars processChars :: HasChar c => [c] -> Either (c, LexErr) [c] processChars = collapseGaps -- Step 1 - >>> expandLeadingTabs -- Step 3 - >>> rmCommonWhitespacePrefix -- Step 4 - >>> collapseOnlyWsLines -- Step 5 - >>> rmFirstNewline -- Step 7a - >>> rmLastNewline -- Step 7b - >>> resolveEscapes -- Step 8 + >>> normalizeEOL -- Step 2 + >>> expandLeadingTabs -- Step 4 + >>> rmCommonWhitespacePrefix -- Step 5 + >>> collapseOnlyWsLines -- Step 6 + >>> rmFirstNewline -- Step 8a + >>> rmLastNewline -- Step 8b + >>> resolveEscapes -- Step 9 + + normalizeEOL :: HasChar c => [c] -> [c] + normalizeEOL = + let go = \case + Char '\r' : c@(Char '\n') : cs -> c : go cs + c@(Char '\f') : cs -> setChar '\n' c : go cs + c : cs -> c : go cs + [] -> [] + in go -- expands all tabs, since the lexer will verify that tabs can only appear -- as leading indentation @@ -354,15 +364,16 @@ the same behavior as HsString, which contains the normalized string The canonical steps for post processing a multiline string are: 1. Collapse string gaps -2. Split the string by newlines -3. Convert leading tabs into spaces +2. Normalize newline characters +3. Split the string by newlines +4. Convert leading tabs into spaces * In each line, any tabs preceding non-whitespace characters are replaced with spaces up to the next tab stop -4. Remove common whitespace prefix in every line except the first (see below) -5. If a line contains only whitespace, remove all of the whitespace -6. Join the string back with `\n` delimiters -7a. If the first character of the string is a newline, remove it -7b. If the last character of the string is a newline, remove it -8. Interpret escaped characters +5. Remove common whitespace prefix in every line except the first (see below) +6. If a line contains only whitespace, remove all of the whitespace +7. Join the string back with `\n` delimiters +8a. If the first character of the string is a newline, remove it +8b. If the last character of the string is a newline, remove it +9. Interpret escaped characters The common whitespace prefix can be informally defined as "The longest prefix of whitespace shared by all lines in the string, excluding the ===================================== docs/users_guide/exts/multiline_strings.rst ===================================== @@ -14,6 +14,8 @@ With this extension, GHC now recognizes multiline string literals with ``"""`` d Normal string literals are lexed, then string gaps are collapsed, then escape characters are resolved. Multiline string literals add the following post-processing steps between collapsing string gaps and resolving escape characters: +#. Convert all newlines (``\n``, ``\r\n``, ``\f``) to ``\n`` + #. Split the string by newlines #. Replace leading tabs with spaces up to the next tab stop @@ -26,6 +28,8 @@ Normal string literals are lexed, then string gaps are collapsed, then escape ch #. If the first character of the string is a newline, remove it +#. If the last character of the string is a newline, remove it + Examples ~~~~~~~~ ===================================== testsuite/tests/parser/should_run/T25375.hs ===================================== @@ -0,0 +1,38 @@ +{-# LANGUAGE MultilineStrings #-} + +str1 = unlines + [ "aaa" + , "bbb" + , "ccc" + ] + +str2 = "aaa\n\ + \bbb\n\ + \ccc\n" + +str3 = """ + aaa + bbb + ccc + """ + +str4 = """ + + aaa + bbb + ccc + + """ + +str5 = """ + aaa + bbb + ccc\n + """ + +main = do + print str1 + print str2 + print str3 + print str4 + print str5 ===================================== testsuite/tests/parser/should_run/T25375.stdout ===================================== @@ -0,0 +1,5 @@ +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc" +"\naaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" ===================================== testsuite/tests/parser/should_run/all.T ===================================== @@ -23,3 +23,4 @@ test('RecordDotSyntax5', normal, compile_and_run, ['']) test('ListTuplePunsConstraints', extra_files(['ListTuplePunsConstraints.hs']), ghci_script, ['ListTuplePunsConstraints.script']) test('MultilineStrings', normal, compile_and_run, ['']) test('MultilineStringsOverloaded', normal, compile_and_run, ['']) +test('T25375', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2ebce02756fd715a26882eed83de70a2b363685d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2ebce02756fd715a26882eed83de70a2b363685d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 00:14:01 2024 From: gitlab at gitlab.haskell.org (Brandon Chinn (@brandonchinn178)) Date: Sat, 02 Nov 2024 20:14:01 -0400 Subject: [Git][ghc/ghc][wip/T25375] Fix CRLF in multiline strings (#25375) Message-ID: <6726c04987984_254c8516f11ec403a8@gitlab.mail> Brandon Chinn pushed to branch wip/T25375 at Glasgow Haskell Compiler / GHC Commits: 7e963f9e by Brandon Chinn at 2024-11-02T17:13:42-07:00 Fix CRLF in multiline strings (#25375) - - - - - 6 changed files: - .gitattributes - compiler/GHC/Parser/String.hs - docs/users_guide/exts/multiline_strings.rst - + testsuite/tests/parser/should_run/T25375.hs - + testsuite/tests/parser/should_run/T25375.stdout - testsuite/tests/parser/should_run/all.T Changes: ===================================== .gitattributes ===================================== @@ -2,3 +2,4 @@ # don't convert anything on checkout * text=auto eol=lf mk/win32-tarballs.md5sum text=auto eol=LF +testsuite/tests/parser/should_run/T25375.hs text=auto eol=crlf ===================================== compiler/GHC/Parser/String.hs ===================================== @@ -261,12 +261,23 @@ lexMultilineString = lexStringWith processChars processChars processChars :: HasChar c => [c] -> Either (c, LexErr) [c] processChars = collapseGaps -- Step 1 - >>> expandLeadingTabs -- Step 3 - >>> rmCommonWhitespacePrefix -- Step 4 - >>> collapseOnlyWsLines -- Step 5 - >>> rmFirstNewline -- Step 7a - >>> rmLastNewline -- Step 7b - >>> resolveEscapes -- Step 8 + >>> normalizeEOL -- Step 2 + >>> expandLeadingTabs -- Step 4 + >>> rmCommonWhitespacePrefix -- Step 5 + >>> collapseOnlyWsLines -- Step 6 + >>> rmFirstNewline -- Step 8a + >>> rmLastNewline -- Step 8b + >>> resolveEscapes -- Step 9 + + normalizeEOL :: HasChar c => [c] -> [c] + normalizeEOL = + let go = \case + Char '\r' : c@(Char '\n') : cs -> c : go cs + c@(Char '\r') : cs -> setChar '\n' c : go cs + c@(Char '\f') : cs -> setChar '\n' c : go cs + c : cs -> c : go cs + [] -> [] + in go -- expands all tabs, since the lexer will verify that tabs can only appear -- as leading indentation @@ -354,15 +365,16 @@ the same behavior as HsString, which contains the normalized string The canonical steps for post processing a multiline string are: 1. Collapse string gaps -2. Split the string by newlines -3. Convert leading tabs into spaces +2. Normalize newline characters +3. Split the string by newlines +4. Convert leading tabs into spaces * In each line, any tabs preceding non-whitespace characters are replaced with spaces up to the next tab stop -4. Remove common whitespace prefix in every line except the first (see below) -5. If a line contains only whitespace, remove all of the whitespace -6. Join the string back with `\n` delimiters -7a. If the first character of the string is a newline, remove it -7b. If the last character of the string is a newline, remove it -8. Interpret escaped characters +5. Remove common whitespace prefix in every line except the first (see below) +6. If a line contains only whitespace, remove all of the whitespace +7. Join the string back with `\n` delimiters +8a. If the first character of the string is a newline, remove it +8b. If the last character of the string is a newline, remove it +9. Interpret escaped characters The common whitespace prefix can be informally defined as "The longest prefix of whitespace shared by all lines in the string, excluding the ===================================== docs/users_guide/exts/multiline_strings.rst ===================================== @@ -14,6 +14,8 @@ With this extension, GHC now recognizes multiline string literals with ``"""`` d Normal string literals are lexed, then string gaps are collapsed, then escape characters are resolved. Multiline string literals add the following post-processing steps between collapsing string gaps and resolving escape characters: +#. Convert all newlines (``\r\n``, ``\n``, ``\r``, ``\f``) to ``\n`` + #. Split the string by newlines #. Replace leading tabs with spaces up to the next tab stop @@ -26,6 +28,8 @@ Normal string literals are lexed, then string gaps are collapsed, then escape ch #. If the first character of the string is a newline, remove it +#. If the last character of the string is a newline, remove it + Examples ~~~~~~~~ ===================================== testsuite/tests/parser/should_run/T25375.hs ===================================== @@ -0,0 +1,38 @@ +{-# LANGUAGE MultilineStrings #-} + +str1 = unlines + [ "aaa" + , "bbb" + , "ccc" + ] + +str2 = "aaa\n\ + \bbb\n\ + \ccc\n" + +str3 = """ + aaa + bbb + ccc + """ + +str4 = """ + + aaa + bbb + ccc + + """ + +str5 = """ + aaa + bbb + ccc\n + """ + +main = do + print str1 + print str2 + print str3 + print str4 + print str5 ===================================== testsuite/tests/parser/should_run/T25375.stdout ===================================== @@ -0,0 +1,5 @@ +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc" +"\naaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" ===================================== testsuite/tests/parser/should_run/all.T ===================================== @@ -23,3 +23,4 @@ test('RecordDotSyntax5', normal, compile_and_run, ['']) test('ListTuplePunsConstraints', extra_files(['ListTuplePunsConstraints.hs']), ghci_script, ['ListTuplePunsConstraints.script']) test('MultilineStrings', normal, compile_and_run, ['']) test('MultilineStringsOverloaded', normal, compile_and_run, ['']) +test('T25375', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7e963f9e23f50d8aa2678ca823270d17c6da9afd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7e963f9e23f50d8aa2678ca823270d17c6da9afd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 13:25:24 2024 From: gitlab at gitlab.haskell.org (Hassan Al-Awwadi (@hassan.awwadi)) Date: Sun, 03 Nov 2024 08:25:24 -0500 Subject: [Git][ghc/ghc][wip/ttg/types/basic] unused import Message-ID: <672779c4e6602_3726cf1dd7607308e@gitlab.mail> Hassan Al-Awwadi pushed to branch wip/ttg/types/basic at Glasgow Haskell Compiler / GHC Commits: 4b2fb25c by Hassan Al-Awwadi at 2024-11-03T14:25:05+01:00 unused import - - - - - 1 changed file: - utils/haddock/haddock-api/src/Haddock/Convert.hs Changes: ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -58,7 +58,6 @@ import GHC.Core.TyCon import GHC.Core.Type import GHC.Hs import GHC.Types.Basic (DefMethSpec (..), TopLevelFlag (..), TupleSort (..)) -import GHC.Types.Fixity (LexicalFixity (..)) import GHC.Types.Id (idType, setIdType) import GHC.Types.Name import GHC.Types.Name.Reader (mkVarUnqual) @@ -78,7 +77,6 @@ import GHC.Utils.Misc , filterOut ) import GHC.Utils.Panic.Plain (assert) -import Language.Haskell.Syntax.Basic (FieldLabelString (..)) import Haddock.GhcUtils (defaultRuntimeRepVars, mkEmptySigType, orderedFVs) import Haddock.Interface.RenameType View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4b2fb25c74d7d684b6d22e0f183c5e023b037cb0 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4b2fb25c74d7d684b6d22e0f183c5e023b037cb0 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 13:59:41 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Sun, 03 Nov 2024 08:59:41 -0500 Subject: [Git][ghc/ghc][wip/buildplan] 34 commits: EPA: reduce [AddEpann] in AnnList Message-ID: <672781cdbc392_3726cf3655c473672@gitlab.mail> Cheng Shao pushed to branch wip/buildplan at Glasgow Haskell Compiler / GHC Commits: 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 70710690 by Cheng Shao at 2024-11-03T14:08:15+01:00 driver: make UsageFile distinguish hs/nonhs deps - - - - - b528e54f by Cheng Shao at 2024-11-03T14:54:17+01:00 driver: implement --buildplan major mode to extract BuildPlan info from dependency analysis - - - - - cdd379fb by Cheng Shao at 2024-11-03T14:54:22+01:00 track non-hs deps - - - - - 30 changed files: - .ghcid - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot - compiler/GHC/Core/Coercion/Opt.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Predicate.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/TyCo/Tidy.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8052b03196c1746762d77c296f215cffa9d659a1...cdd379fb5c93740ed91727b7fc0890dd26a769ea -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8052b03196c1746762d77c296f215cffa9d659a1...cdd379fb5c93740ed91727b7fc0890dd26a769ea You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 15:08:53 2024 From: gitlab at gitlab.haskell.org (Peter Trommler (@trommler)) Date: Sun, 03 Nov 2024 10:08:53 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/ppc64-fix-T25155-T25240 Message-ID: <672792055f392_3726cf629210766e5@gitlab.mail> Peter Trommler pushed new branch wip/ppc64-fix-T25155-T25240 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/ppc64-fix-T25155-T25240 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 15:10:48 2024 From: gitlab at gitlab.haskell.org (Peter Trommler (@trommler)) Date: Sun, 03 Nov 2024 10:10:48 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25323 Message-ID: <6727927890f0c_3726cf5738ac76821@gitlab.mail> Peter Trommler pushed new branch wip/T25323 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25323 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 16:09:07 2024 From: gitlab at gitlab.haskell.org (Hassan Al-Awwadi (@hassan.awwadi)) Date: Sun, 03 Nov 2024 11:09:07 -0500 Subject: [Git][ghc/ghc][wip/ttg/types/basic] unused import Message-ID: <6727a023661e4_3726cfa2b0e880480@gitlab.mail> Hassan Al-Awwadi pushed to branch wip/ttg/types/basic at Glasgow Haskell Compiler / GHC Commits: f64ab25a by Hassan Al-Awwadi at 2024-11-03T17:08:46+01:00 unused import - - - - - 1 changed file: - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs Changes: ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -30,7 +30,7 @@ import qualified Data.Set as Set import Data.Traversable (mapM) import GHC hiding (NoLink) import GHC.Builtin.Types (eqTyCon_RDR, tupleDataConName, tupleTyConName) -import GHC.Types.Basic (Boxity (..), TopLevelFlag (..), TupleSort (..)) +import GHC.Types.Basic (TupleSort (..)) import GHC.Types.Name import GHC.Types.Name.Reader (RdrName (Exact)) import Prelude hiding (mapM) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f64ab25afe519cb2c944380df97c862ff20b2ab9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f64ab25afe519cb2c944380df97c862ff20b2ab9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 17:37:26 2024 From: gitlab at gitlab.haskell.org (Brandon Chinn (@brandonchinn178)) Date: Sun, 03 Nov 2024 12:37:26 -0500 Subject: [Git][ghc/ghc][wip/T25375] Fix CRLF in multiline strings (#25375) Message-ID: <6727b4d6815f1_e25df292a70102127@gitlab.mail> Brandon Chinn pushed to branch wip/T25375 at Glasgow Haskell Compiler / GHC Commits: db2a1f4a by Brandon Chinn at 2024-11-03T09:37:04-08:00 Fix CRLF in multiline strings (#25375) - - - - - 6 changed files: - .gitattributes - compiler/GHC/Parser/String.hs - docs/users_guide/exts/multiline_strings.rst - + testsuite/tests/parser/should_run/T25375.hs - + testsuite/tests/parser/should_run/T25375.stdout - testsuite/tests/parser/should_run/all.T Changes: ===================================== .gitattributes ===================================== @@ -2,3 +2,4 @@ # don't convert anything on checkout * text=auto eol=lf mk/win32-tarballs.md5sum text=auto eol=LF +testsuite/tests/parser/should_run/T25375.hs text=auto eol=crlf ===================================== compiler/GHC/Parser/String.hs ===================================== @@ -261,6 +261,7 @@ lexMultilineString = lexStringWith processChars processChars processChars :: HasChar c => [c] -> Either (c, LexErr) [c] processChars = collapseGaps -- Step 1 + >>> normalizeEOL >>> expandLeadingTabs -- Step 3 >>> rmCommonWhitespacePrefix -- Step 4 >>> collapseOnlyWsLines -- Step 5 @@ -268,6 +269,19 @@ lexMultilineString = lexStringWith processChars processChars >>> rmLastNewline -- Step 7b >>> resolveEscapes -- Step 8 + -- Normalize line endings to LF. The spec dictates that lines should be + -- split on newline characters and rejoined with ``\n``. But because we + -- aren't actually splitting/rejoining, we'll manually normalize here + normalizeEOL :: HasChar c => [c] -> [c] + normalizeEOL = + let go = \case + Char '\r' : c@(Char '\n') : cs -> c : go cs + c@(Char '\r') : cs -> setChar '\n' c : go cs + c@(Char '\f') : cs -> setChar '\n' c : go cs + c : cs -> c : go cs + [] -> [] + in go + -- expands all tabs, since the lexer will verify that tabs can only appear -- as leading indentation expandLeadingTabs :: HasChar c => [c] -> [c] ===================================== docs/users_guide/exts/multiline_strings.rst ===================================== @@ -14,7 +14,9 @@ With this extension, GHC now recognizes multiline string literals with ``"""`` d Normal string literals are lexed, then string gaps are collapsed, then escape characters are resolved. Multiline string literals add the following post-processing steps between collapsing string gaps and resolving escape characters: -#. Split the string by newlines +#. Split the string by newline characters + + * Includes ``\r\n``, ``\r``, ``\n``, ``\f`` #. Replace leading tabs with spaces up to the next tab stop @@ -24,7 +26,9 @@ Normal string literals are lexed, then string gaps are collapsed, then escape ch #. Join the string back with ``\n`` delimiters -#. If the first character of the string is a newline, remove it +#. If the first character of the string is ``\n``, remove it + +#. If the last character of the string is ``\n``, remove it Examples ~~~~~~~~ ===================================== testsuite/tests/parser/should_run/T25375.hs ===================================== @@ -0,0 +1,38 @@ +{-# LANGUAGE MultilineStrings #-} + +str1 = unlines + [ "aaa" + , "bbb" + , "ccc" + ] + +str2 = "aaa\n\ + \bbb\n\ + \ccc\n" + +str3 = """ + aaa + bbb + ccc + """ + +str4 = """ + + aaa + bbb + ccc + + """ + +str5 = """ + aaa + bbb + ccc\n + """ + +main = do + print str1 + print str2 + print str3 + print str4 + print str5 ===================================== testsuite/tests/parser/should_run/T25375.stdout ===================================== @@ -0,0 +1,5 @@ +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc" +"\naaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" ===================================== testsuite/tests/parser/should_run/all.T ===================================== @@ -23,3 +23,4 @@ test('RecordDotSyntax5', normal, compile_and_run, ['']) test('ListTuplePunsConstraints', extra_files(['ListTuplePunsConstraints.hs']), ghci_script, ['ListTuplePunsConstraints.script']) test('MultilineStrings', normal, compile_and_run, ['']) test('MultilineStringsOverloaded', normal, compile_and_run, ['']) +test('T25375', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/db2a1f4afe9939b4e14114f0ba4bc3145b67c015 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/db2a1f4afe9939b4e14114f0ba4bc3145b67c015 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 19:24:11 2024 From: gitlab at gitlab.haskell.org (Hassan Al-Awwadi (@hassan.awwadi)) Date: Sun, 03 Nov 2024 14:24:11 -0500 Subject: [Git][ghc/ghc][wip/ttg/types/basic] Move types from GHC.Types.Basic to L.H.S.* Message-ID: <6727cddbe4428_e25df7167f411056f@gitlab.mail> Hassan Al-Awwadi pushed to branch wip/ttg/types/basic at Glasgow Haskell Compiler / GHC Commits: c222b17e by Hassan Al-Awwadi at 2024-11-03T20:23:12+01:00 Move types from GHC.Types.Basic to L.H.S.* This cuts a few different edges between L.H.S and GHC.Types.Basic * RuleName is moved to L.H.S.Basic * fdTopLevel (TopLevelFlag) has been moved to the extension field of FamilyDecl * OverlapMode has been moved to L.H.S.OverlapPragma * SourceText has been moved to its extension fields * NonCanonical has been moved to its extension constructor * InlinePragma has been moved to L.H.S.InlinePragma * SourceText and Arity have been moved to its extension point * Activation and InlineSpec have also been moved to L.H.S.InlinePragma * And some general churn as functions and instances move to new locations * GHC.Hs.OverlapPragma contains ghc specifics for L.H.S.OverlapPragma and * GHC.Hs.InlinePragma contains ghc specifics for L.H.S.InlinePragma * TyConFlavour definition is moved to GHC.Hs.Basic to avoid cyclical dependency ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - 30 changed files: - compiler/GHC/Builtin/PrimOps/Ids.hs - compiler/GHC/Core.hs - compiler/GHC/Core/InstEnv.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Pipeline.hs - compiler/GHC/Core/Opt/Pipeline/Types.hs - compiler/GHC/Core/Opt/Simplify.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Inline.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Ppr.hs - compiler/GHC/Core/Rules.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Core/Unfold/Make.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Driver/Config/Core/Lint.hs - compiler/GHC/Driver/Config/Core/Opt/Simplify.hs - compiler/GHC/Hs.hs - compiler/GHC/Hs/Basic.hs - compiler/GHC/Hs/Binds.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c222b17e5565a92f7278c0131f83d3d12ae5a446 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c222b17e5565a92f7278c0131f83d3d12ae5a446 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 3 19:42:15 2024 From: gitlab at gitlab.haskell.org (Hassan Al-Awwadi (@hassan.awwadi)) Date: Sun, 03 Nov 2024 14:42:15 -0500 Subject: [Git][ghc/ghc][wip/ttg/types/basic] 21 commits: Add a missing tidy in UnivCo Message-ID: <6727d217b36ab_e25df98cd94110996@gitlab.mail> Hassan Al-Awwadi pushed to branch wip/ttg/types/basic at Glasgow Haskell Compiler / GHC Commits: 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - d5092529 by Hassan Al-Awwadi at 2024-11-03T20:30:52+01:00 Move types from GHC.Types.Basic to L.H.S.* This cuts a few different edges between L.H.S and GHC.Types.Basic * RuleName is moved to L.H.S.Basic * fdTopLevel (TopLevelFlag) has been moved to the extension field of FamilyDecl * OverlapMode has been moved to L.H.S.OverlapPragma * SourceText has been moved to its extension fields * NonCanonical has been moved to its extension constructor * InlinePragma has been moved to L.H.S.InlinePragma * SourceText and Arity have been moved to its extension point * Activation and InlineSpec have also been moved to L.H.S.InlinePragma * And some general churn as functions and instances move to new locations * GHC.Hs.OverlapPragma contains ghc specifics for L.H.S.OverlapPragma and * GHC.Hs.InlinePragma contains ghc specifics for L.H.S.InlinePragma * TyConFlavour definition is moved to GHC.Hs.Basic to avoid cyclical dependency ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - 30 changed files: - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/PrimOps/Ids.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/InstEnv.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Pipeline.hs - compiler/GHC/Core/Opt/Pipeline/Types.hs - compiler/GHC/Core/Opt/Simplify.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Inline.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Ppr.hs - compiler/GHC/Core/Rules.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/TyCo/Tidy.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Core/Unfold/Make.hs - compiler/GHC/Core/Utils.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c222b17e5565a92f7278c0131f83d3d12ae5a446...d509252912af7aa6b746911e0aa3844812c77a21 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c222b17e5565a92f7278c0131f83d3d12ae5a446...d509252912af7aa6b746911e0aa3844812c77a21 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 04:26:06 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Sun, 03 Nov 2024 23:26:06 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T24744 Message-ID: <67284cde256c5_17916f5e7ec8437a0@gitlab.mail> Serge S. Gulin pushed new branch wip/T24744 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T24744 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 04:32:54 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Sun, 03 Nov 2024 23:32:54 -0500 Subject: [Git][ghc/ghc][wip/T24744] Add trivial optimizations for `unpackCString` and `unpackCStringUtf8` Message-ID: <67284e7687e96_17916f66cc90481b6@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: e5904575 by Serge S. Gulin at 2024-11-04T15:32:40+11:00 Add trivial optimizations for `unpackCString` and `unpackCStringUtf8` - - - - - 2 changed files: - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/Expr.hs Changes: ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -157,6 +157,24 @@ genApp ctx i args , ExprInline ) + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringName + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringUtf8Name + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + -- let-no-escape | Just n <- ctxLneBindingStackSize ctx i = do ===================================== compiler/GHC/StgToJS/Expr.hs ===================================== @@ -606,6 +606,32 @@ genCase ctx bnd e at alts l , ExprInline ) + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringName + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringUtf8Name + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + | isInlineExpr e = do bndi <- identsForId bnd let ctx' = ctxSetTop bnd View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e5904575bbde1558750ae3145854fb3c2199242a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e5904575bbde1558750ae3145854fb3c2199242a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 08:10:31 2024 From: gitlab at gitlab.haskell.org (Hassan Al-Awwadi (@hassan.awwadi)) Date: Mon, 04 Nov 2024 03:10:31 -0500 Subject: [Git][ghc/ghc][wip/ttg-booleanformula] 16 commits: JS: Re-add optimization for literal strings in genApp (fixes #23479) Message-ID: <672881776d98a_25830f2a2100198b8@gitlab.mail> Hassan Al-Awwadi pushed to branch wip/ttg-booleanformula at Glasgow Haskell Compiler / GHC Commits: e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 1f5cf708 by Hassan Al-Awwadi at 2024-11-04T09:10:08+01:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - 30 changed files: - compiler/GHC/Builtin/Names.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Make.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Parser/Types.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Expr.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f19fced7c802450ee08af8fcc0adfef7601fbd20...1f5cf708137b19d84d03800601c650dd0bbbfccf -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f19fced7c802450ee08af8fcc0adfef7601fbd20...1f5cf708137b19d84d03800601c650dd0bbbfccf You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 11:07:15 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Mon, 04 Nov 2024 06:07:15 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 4 commits: Improve performance of deriving Show Message-ID: <6728aae3dce22_2b0c0f21d11c626e3@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: e80f3fd3 by Rodrigo Mesquita at 2024-11-04T11:05:36+00:00 Improve performance of deriving Show Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: T12707 T3294 ------------------------ - - - - - 12798c57 by Rodrigo Mesquita at 2024-11-04T11:05:37+00:00 Deriving Ord: compare and <= only Since the implementation of CLC proposal #24, the default implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`. This means we no longer need to generate implementations for these methods when stock deriving `Ord`. Rather, just derive the implementation of `compare` and `<=`, and rely on the default implementations for the others. - - - - - e54c745f by Rodrigo Mesquita at 2024-11-04T11:05:37+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - 0d689b57 by Rodrigo Mesquita at 2024-11-04T11:05:37+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 10 changed files: - compiler/GHC/Hs/Utils.hs - compiler/GHC/Tc/Deriv/Functor.hs - compiler/GHC/Tc/Deriv/Generate.hs - testsuite/tests/deriving/should_compile/T14682.stderr - testsuite/tests/deriving/should_compile/T20496.stderr - testsuite/tests/deriving/should_run/T9576.stderr - testsuite/tests/driver/implicit-dyn-too/implicit-dyn-too.stdout - testsuite/tests/typecheck/should_fail/T15883c.stderr - testsuite/tests/typecheck/should_fail/T15883d.stderr - testsuite/tests/typecheck/should_fail/T15883e.stderr Changes: ===================================== compiler/GHC/Hs/Utils.hs ===================================== @@ -56,7 +56,7 @@ module GHC.Hs.Utils( nlHsTyApp, nlHsTyApps, nlHsVar, nlHsDataCon, nlHsLit, nlHsApp, nlHsApps, nlHsSyntaxApps, nlHsIntLit, nlHsVarApps, - nlHsDo, nlHsOpApp, nlHsPar, nlHsIf, nlHsCase, nlList, + nlHsDo, nlHsOpApp, nlHsLam, nlHsPar, nlHsIf, nlHsCase, nlList, mkLHsTupleExpr, mkLHsVarTuple, missingTupArg, mkLocatedList, nlAscribe, @@ -598,11 +598,15 @@ nlHsDo ctxt stmts = noLocA (mkHsDo ctxt (noLocA stmts)) nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs nlHsOpApp e1 op e2 = noLocA (mkHsOpApp e1 op e2) +nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs nlHsPar :: IsPass p => LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs +nlHsLam match = noLocA $ HsLam noAnn LamSingle + $ mkMatchGroup (Generated OtherExpansion SkipPmc) (noLocA [match]) + nlHsPar e = noLocA (gHsPar e) -- nlHsIf should generate if-expressions which are NOT subject to ===================================== compiler/GHC/Tc/Deriv/Functor.hs ===================================== @@ -689,9 +689,18 @@ mkSimpleConMatch2 ctxt fold extra_pats con insides = do con_expr | null asWithTyVar = nlHsApps con_name asWithoutTyVar | otherwise = - let bs = filterByList argTysTyVarInfo bs_RDRs - vars = filterByLists argTysTyVarInfo bs_Vars as_Vars - in mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) + let -- All trailing b-args can be eta-reduced: + -- (\b1 b2 b3 -> A b1 a2 b2 b3) ==> (\b1 -> A b1 a2) + -- This improves the number of allocations needed to compile + -- the generated code (it is not relevant for correctness) + -- We do this by counting the n of args to keep + keep_n = length $ dropWhileEndLE (== True) argTysTyVarInfo + bs = filterByList (take keep_n argTysTyVarInfo) bs_RDRs + vars = take keep_n $ + filterByLists argTysTyVarInfo bs_Vars as_Vars + in if keep_n == 0 + then nlHsVar con_name + else mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) rhs <- fold con_expr exps return $ mkMatch ctxt (noLocA (extra_pats ++ [pat])) rhs emptyLocalBinds ===================================== compiler/GHC/Tc/Deriv/Generate.hs ===================================== @@ -339,7 +339,7 @@ Several special cases: See function unliftedOrdOp Note [Game plan for deriving Ord] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's a bad idea to define only 'compare', and build the other binary comparisons on top of it; see #2130, #4019. Reason: we don't want to laboriously make a three-way comparison, only to extract a @@ -350,16 +350,22 @@ binary result, something like this: True -> False False -> True -This being said, we can get away with generating full code only for -'compare' and '<' thus saving us generation of other three operators. -Other operators can be cheaply expressed through '<': -a <= b = not $ b < a -a > b = b < a -a >= b = not $ a < b - So for sufficiently small types (few constructors, or all nullary) we generate all methods; for large ones we just use 'compare'. +This being said, we can get away with generating full code only for +'compare' and '<=' thus saving us generation of other three operators. +Other operators can be cheaply expressed through '<=' -- indeed, that's what +the default implementations of >, <, and >= do. + +Historically, derived instances defined '<' and the remaining operators as +cheap expressions in function of it: + a <= b = not $ b < a + a > b = b < a + a >= b = not $ a < b +but since the CLC proposal #24 (see 8f174e06185143674d6cbfee75c30e68805d85b8), +it suffices to derive '<=' and rely on the +default implementation for the others. -} data OrdOp = OrdCompare | OrdLT | OrdLE | OrdGE | OrdGT @@ -408,7 +414,7 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon return $ if null tycon_data_cons -- No data-cons => invoke bale-out case then ( [mkFunBindEC 2 loc compare_RDR (const eqTag_Expr) []] , emptyBag) - else ( [mkOrdOp OrdCompare] ++ other_ops + else ( [mkOrdOp OrdCompare] `chkAppend` other_ops , aux_binds) where aux_binds = emptyBag @@ -417,19 +423,10 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon other_ops | (last_tag - first_tag) <= 2 -- 1-3 constructors || null non_nullary_cons -- Or it's an enumeration - = [mkOrdOp OrdLT, lE, gT, gE] + = [mkOrdOp OrdLE] | otherwise = [] - negate_expr = nlHsApp (nlHsVar not_RDR) - pats = noLocA [a_Pat, b_Pat] - lE = mkSimpleGeneratedFunBind loc le_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr) - gT = mkSimpleGeneratedFunBind loc gt_RDR pats $ - nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr - gE = mkSimpleGeneratedFunBind loc ge_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) a_Expr) b_Expr) - get_tag con = dataConTag con - fIRST_TAG -- We want *zero-based* tags, because that's what -- con2Tag returns (generated by untag_Expr)! @@ -1407,7 +1404,7 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gfoldl_eqn con = ([nlVarPat k_RDR, z_Pat, nlConVarPat con_name as_needed], - foldl' mk_k_app (z_Expr `nlHsApp` (eta_expand_data_con con)) as_needed) + foldl' mk_k_app (z_Expr `nlHsApp` (nlHsVar (getRdrName con))) as_needed) where con_name :: RdrName con_name = getRdrName con @@ -1427,18 +1424,9 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gunfold_alt dc = mkHsCaseAlt (mk_unfold_pat dc) (mk_unfold_rhs dc) mk_unfold_rhs dc = foldr nlHsApp - (z_Expr `nlHsApp` (eta_expand_data_con dc)) + (z_Expr `nlHsApp` (nlHsVar (getRdrName dc))) (replicate (dataConSourceArity dc) (nlHsVar k_RDR)) - eta_expand_data_con dc = - mkHsLam (noLocA eta_expand_pats) - (foldl nlHsApp (nlHsVar (getRdrName dc)) eta_expand_hsvars) - where - eta_expand_pats = map nlVarPat eta_expand_vars - eta_expand_hsvars = map nlHsVar eta_expand_vars - eta_expand_vars = take (dataConSourceArity dc) as_RDRs - - mk_unfold_pat dc -- Last one is a wild-pat, to avoid -- redundant test, and annoying warning | tag-fIRST_TAG == n_cons-1 = nlWildPat -- Last constructor @@ -2528,11 +2516,15 @@ showParen_Expr showParen_Expr e1 e2 = nlHsApp (nlHsApp (nlHsVar showParen_RDR) e1) e2 nested_compose_Expr :: [LHsExpr GhcPs] -> LHsExpr GhcPs - -nested_compose_Expr [] = panic "nested_compose_expr" -- Arg is always non-empty -nested_compose_Expr [e] = parenify e -nested_compose_Expr (e:es) - = nlHsApp (nlHsApp (nlHsVar compose_RDR) (parenify e)) (nested_compose_Expr es) +nested_compose_Expr = + nlHsLam . mkSimpleMatch (LamAlt LamSingle) (noLocA [z_Pat]) . go + where + -- Previously we used (`.`), but inlining its definition improves compiler + -- performance significantly since we no longer need to typecheck lots of + -- (.) applications (each which needed three type applications, all @String) + go [] = panic "nested_compose_expr" -- Arg is always non-empty + go [e] = nlHsApp e z_Expr + go (e:es) = nlHsApp e (go es) -- impossible_Expr is used in case RHSs that should never happen. -- We generate these to keep the desugarer from complaining that they *might* happen! @@ -2570,10 +2562,9 @@ as_RDRs = [ mkVarUnqual (mkFastString ("a"++show i)) | i <- [(1::Int) .. bs_RDRs = [ mkVarUnqual (mkFastString ("b"++show i)) | i <- [(1::Int) .. ] ] cs_RDRs = [ mkVarUnqual (mkFastString ("c"++show i)) | i <- [(1::Int) .. ] ] -a_Expr, b_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, +a_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, true_Expr, pure_Expr, unsafeCodeCoerce_Expr :: LHsExpr GhcPs a_Expr = nlHsVar a_RDR -b_Expr = nlHsVar b_RDR c_Expr = nlHsVar c_RDR z_Expr = nlHsVar z_RDR ltTag_Expr = nlHsVar ltTag_RDR ===================================== testsuite/tests/deriving/should_compile/T14682.stderr ===================================== @@ -5,12 +5,11 @@ Derived class instances: GHC.Internal.Show.showsPrec a (T14682.Foo b1 b2) = GHC.Internal.Show.showParen (a GHC.Classes.>= 11) - ((GHC.Internal.Base..) - (GHC.Internal.Show.showString "Foo ") - ((GHC.Internal.Base..) - (GHC.Internal.Show.showsPrec 11 b1) - ((GHC.Internal.Base..) - GHC.Internal.Show.showSpace (GHC.Internal.Show.showsPrec 11 b2)))) + (\ z + -> (GHC.Internal.Show.showString "Foo ") + ((GHC.Internal.Show.showsPrec 11 b1) + (GHC.Internal.Show.showSpace + ((GHC.Internal.Show.showsPrec 11 b2) z)))) instance GHC.Internal.TH.Lift.Lift T14682.Foo where GHC.Internal.TH.Lift.lift (T14682.Foo a1 a2) @@ -25,9 +24,8 @@ Derived class instances: instance GHC.Internal.Data.Data.Data T14682.Foo where GHC.Internal.Data.Data.gfoldl k z (T14682.Foo a1 a2) - = ((z (\ a1 a2 -> T14682.Foo a1 a2) `k` a1) `k` a2) - GHC.Internal.Data.Data.gunfold k z _ - = k (k (z (\ a1 a2 -> T14682.Foo a1 a2))) + = ((z T14682.Foo `k` a1) `k` a2) + GHC.Internal.Data.Data.gunfold k z _ = k (k (z T14682.Foo)) GHC.Internal.Data.Data.toConstr (T14682.Foo _ _) = $cFoo GHC.Internal.Data.Data.dataTypeOf _ = $tFoo @@ -46,18 +44,15 @@ Derived class instances: GHC.Types.LT -> GHC.Types.LT GHC.Types.EQ -> (a2 `GHC.Classes.compare` b2) GHC.Types.GT -> GHC.Types.GT - (GHC.Classes.<) a b + (GHC.Classes.<=) a b = case a of T14682.Foo a1 a2 -> case b of T14682.Foo b1 b2 -> case (GHC.Classes.compare a1 b1) of GHC.Types.LT -> GHC.Types.True - GHC.Types.EQ -> (a2 GHC.Classes.< b2) + GHC.Types.EQ -> (a2 GHC.Classes.<= b2) GHC.Types.GT -> GHC.Types.False - (GHC.Classes.<=) a b = GHC.Classes.not ((GHC.Classes.<) b a) - (GHC.Classes.>) a b = (GHC.Classes.<) b a - (GHC.Classes.>=) a b = GHC.Classes.not ((GHC.Classes.<) a b) instance GHC.Internal.Ix.Ix T14682.Foo where GHC.Internal.Ix.range (T14682.Foo a1 a2, T14682.Foo b1 b2) @@ -177,6 +172,24 @@ GHC.Classes.Eq [T14682.Foo] +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.<) = GHC.Classes.$dm< @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>) = GHC.Classes.$dm> @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>=) = GHC.Classes.$dm>= @T14682.Foo + + + ==================== Filling in method body ==================== GHC.Classes.Ord [T14682.Foo] GHC.Classes.max = GHC.Classes.$dmmax @T14682.Foo ===================================== testsuite/tests/deriving/should_compile/T20496.stderr ===================================== @@ -32,5 +32,5 @@ rnd null (MkT _) = False instance Traversable T where - traverse f (MkT a1) = fmap (\ b1 -> MkT b1) (f a1) + traverse f (MkT a1) = fmap MkT (f a1) ===================================== testsuite/tests/deriving/should_run/T9576.stderr ===================================== @@ -2,11 +2,11 @@ T9576: Exception: T9576.hs:6:31: error: [GHC-39999] • No instance for ‘Show Foo’ arising from a use of ‘showsPrec’ - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘((showsPrec 11 b1) z)’ + In the expression: (showString "MkBar ") ((showsPrec 11 b1) z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkBar ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkBar ") (showsPrec 11 b1)) + ‘(\ z -> (showString "MkBar ") ((showsPrec 11 b1) z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show Bar’: To see the code I am typechecking, use -ddump-deriv @@ -17,9 +17,7 @@ Module: GHC.Internal.Control.Exception.Base Type: TypeError HasCallStack backtrace: - collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception - toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception - throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:423:30 in ghc-internal:GHC.Internal.Control.Exception.Base - - + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base ===================================== testsuite/tests/driver/implicit-dyn-too/implicit-dyn-too.stdout ===================================== @@ -1,4 +1,3 @@ [1 of 2] Compiling QuasiExpr ( QuasiExpr.hs, QuasiExpr.o, QuasiExpr.dyn_o ) [2 of 2] Compiling QuasiQuote ( QuasiQuote.hs, nothing ) [1 of 2] Compiling QuasiExpr ( QuasiExpr.hs, QuasiExpr.o, QuasiExpr.dyn_o ) [Missing dynamic object file] -[2 of 2] Compiling QuasiQuote ( QuasiQuote.hs, nothing ) [QuasiExpr[TH] changed] ===================================== testsuite/tests/typecheck/should_fail/T15883c.stderr ===================================== @@ -1,4 +1,3 @@ - T15883c.hs:14:1: error: [GHC-39999] • No instance for ‘Eq (Foo LiftedRep)’ arising from the superclasses of an instance declaration @@ -22,7 +21,7 @@ T15883c.hs:14:1: error: [GHC-39999] To see the code I am typechecking, use -ddump-deriv T15883c.hs:14:1: error: [GHC-39999] - • Ambiguous type variable ‘a1’ arising from a use of ‘<’ + • Ambiguous type variable ‘a1’ arising from a use of ‘<=’ prevents the constraint ‘(Ord a1)’ from being solved. Probable fix: use a type annotation to specify what ‘a1’ should be. Potentially matching instances: @@ -31,9 +30,10 @@ T15883c.hs:14:1: error: [GHC-39999] ...plus 24 others ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the expression: a1 < b1 - In a case alternative: MkFoo b1 -> (a1 < b1) - In the expression: case b of MkFoo b1 -> (a1 < b1) - When typechecking the code for ‘<’ + • In the expression: a1 <= b1 + In a case alternative: MkFoo b1 -> (a1 <= b1) + In the expression: case b of MkFoo b1 -> (a1 <= b1) + When typechecking the code for ‘<=’ in a derived instance for ‘Ord (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883d.stderr ===================================== @@ -1,4 +1,3 @@ - T15883d.hs:14:1: error: [GHC-39999] • Ambiguous type variable ‘a0’ arising from a use of ‘showsPrec’ prevents the constraint ‘(Show a0)’ from being solved. @@ -9,11 +8,12 @@ T15883d.hs:14:1: error: [GHC-39999] ...plus 29 others ...plus 10 instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘((showsPrec 11 b1) z)’ + In the expression: (showString "MkFoo ") ((showsPrec 11 b1) z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkFoo ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkFoo ") (showsPrec 11 b1)) + ‘(\ z -> (showString "MkFoo ") ((showsPrec 11 b1) z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883e.stderr ===================================== @@ -1,71 +1,26 @@ - -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘d0’ arising from a use of ‘k’ - prevents the constraint ‘(Data d0)’ from being solved. - Probable fix: use a type annotation to specify what ‘d0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: z (\ a1 -> MkFoo a1) `k` a1 - In an equation for ‘GHC.Internal.Data.Data.gfoldl’: - GHC.Internal.Data.Data.gfoldl k z (MkFoo a1) - = (z (\ a1 -> MkFoo a1) `k` a1) - When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ - -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘d0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘d0’ with ‘forall a. a’ + Expected: d0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘d0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘z MkFoo’ + In the expression: z MkFoo `k` a1 When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: d0 (bound at T15883e.hs:16:1) -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘b0’ arising from a use of ‘k’ - prevents the constraint ‘(Data b0)’ from being solved. - Probable fix: use a type annotation to specify what ‘b0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: k (z (\ a1 -> MkFoo a1)) - In an equation for ‘GHC.Internal.Data.Data.gunfold’: - GHC.Internal.Data.Data.gunfold k z _ = k (z (\ a1 -> MkFoo a1)) +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘b0’ with ‘forall a. a’ + Expected: b0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘b0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘(z MkFoo)’ + In the expression: k (z MkFoo) When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘b0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ - When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: b0 (bound at T15883e.hs:16:1) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2a72bb94719a4c16d65dfe92a9aacf7cffb8e712...0d689b577cb4df99b1db221bdf89308177cd85f7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2a72bb94719a4c16d65dfe92a9aacf7cffb8e712...0d689b577cb4df99b1db221bdf89308177cd85f7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 11:13:25 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 04 Nov 2024 06:13:25 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Reword -fexpose-overloaded-unfoldings docs. Message-ID: <6728ac552dae7_2b0c0f31e9bc7002b@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 62ceacea by Sylvain Henry at 2024-11-04T06:13:09-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - f3e924c3 by Peter Trommler at 2024-11-04T06:13:10-05:00 PPC NCG: Implement fmin and fmax - - - - - 13 changed files: - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Tc/Module.hs - docs/users_guide/using-optimisation.rst - hadrian/src/Rules/Documentation.hs - libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs - libraries/ghc-internal/src/GHC/Internal/List.hs - libraries/ghc-prim/Setup.hs - libraries/ghc-prim/ghc-prim.cabal - testsuite/tests/simd/should_run/T25062_V64.hs - testsuite/tests/simd/should_run/all.T Changes: ===================================== compiler/GHC/CmmToAsm/PPC/CodeGen.hs ===================================== @@ -398,7 +398,7 @@ iselExpr64 expr platform <- getPlatform pprPanic "iselExpr64(powerpc)" (pdoc platform expr) - +data MinOrMax = Min | Max getRegister :: CmmExpr -> NatM Register getRegister e = do config <- getConfig @@ -589,8 +589,9 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps MO_F_Sub w -> triv_float w FSUB MO_F_Mul w -> triv_float w FMUL MO_F_Quot w -> triv_float w FDIV - MO_F_Min w -> triv_float w FMIN - MO_F_Max w -> triv_float w FMAX + + MO_F_Min w -> minmax_float Min w x y + MO_F_Max w -> minmax_float Max w x y -- optimize addition with 32-bit immediate -- (needed for PIC) @@ -696,6 +697,31 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps code <- remainderCode rep sgn tmp x y return (Any fmt code) + minmax_float :: MinOrMax -> Width -> CmmExpr -> CmmExpr -> NatM Register + minmax_float m w x y = + do + (src1, src1Code) <- getSomeReg x + (src2, src2Code) <- getSomeReg y + l1 <- getBlockIdNat + l2 <- getBlockIdNat + end <- getBlockIdNat + let cond = case m of + Min -> LTT + Max -> GTT + let code dst = src1Code `appOL` src2Code `appOL` + toOL [ FCMP src1 src2 + , BCC cond l1 Nothing + , BCC ALWAYS l2 Nothing + , NEWBLOCK l2 + , MR dst src2 + , BCC ALWAYS end Nothing + , NEWBLOCK l1 + , MR dst src1 + , BCC ALWAYS end Nothing + , NEWBLOCK end + ] + return (Any (floatFormat w) code) + getRegister' _ _ (CmmMachOp mop [x, y, z]) -- ternary PrimOps = case mop of ===================================== compiler/GHC/CmmToAsm/PPC/Instr.hs ===================================== @@ -277,8 +277,6 @@ data Instr | FDIV Format Reg Reg Reg | FABS Reg Reg -- abs is the same for single and double | FNEG Reg Reg -- negate is the same for single and double prec. - | FMIN Format Reg Reg Reg - | FMAX Format Reg Reg Reg -- | Fused multiply-add instructions. -- ===================================== compiler/GHC/CmmToAsm/PPC/Ppr.hs ===================================== @@ -941,12 +941,6 @@ pprInstr platform instr = case instr of FNEG reg1 reg2 -> pprUnary (text "fneg") reg1 reg2 - FMIN fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmin") fmt reg1 reg2 reg3 - - FMAX fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmax") fmt reg1 reg2 reg3 - FMADD signs fmt dst ra rc rb -> pprTernaryF (pprFMASign signs) fmt dst ra rc rb ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -565,7 +565,7 @@ runHscBackendPhase pipe_env hsc_env mod_name src_flavour location result = do -- In the case of hs-boot files, generate a dummy .o-boot -- stamp file for the benefit of Make HsBootFile -> touchObjectFile o_file - HsSrcFile -> panic "HscUpdate not relevant for HscSrcFile" + HsSrcFile -> touchObjectFile o_file -- for ghc-prim:GHC.Prim -- MP: I wonder if there are any lurking bugs here because we -- return Linkable == emptyHomeModInfoLinkable, despite the fact that there is a ===================================== compiler/GHC/Tc/Module.hs ===================================== @@ -975,6 +975,13 @@ checkHiBootIface' = do { traceTc "checkHiBootIface" $ vcat [ ppr boot_type_env, ppr boot_exports ] + ; mod <- tcg_mod <$> getGblEnv + + -- don't perform type-checking for ghc-prim:GHC.Prim module. + -- The interface (see ghcPrimIface in GHC.Iface.Load) exports entities + -- not found in the module code. + ; if mod == gHC_PRIM then pure [] else do { + ; gre_env <- getGlobalRdrEnv -- Check the exports of the boot module, one by one @@ -994,7 +1001,7 @@ checkHiBootIface' ; failIfErrsM - ; return (fld_prs ++ dfun_prs) } + ; return (fld_prs ++ dfun_prs) }} where boot_dfun_names = map idName boot_dfuns ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -531,7 +531,8 @@ as such you shouldn't need to set any of them explicitly. A flag * Use of the magic `inline` function to force inlining. .. ghc-flag:: -fexpose-overloaded-unfoldings - :shortdesc: Expose unfoldings carrying constraints, even for very large or recursive functions. + :shortdesc: Expose function unfoldings whose type contains constraints, + even for very large or recursive functions. :type: dynamic :reverse: -fno-expose-overloaded-unfoldings :category: @@ -541,19 +542,24 @@ as such you shouldn't need to set any of them explicitly. A flag This experimental flag is a slightly less heavy weight alternative to :ghc-flag:`-fexpose-all-unfoldings`. - Instead of exposing all functions it only aims at exposing constrained functions. + Instead of exposing all functions it exposes only those functions which + contain constraints within their type. This is intended to be used for cases where specialization is considered crucial but :ghc-flag:`-fexpose-all-unfoldings` imposes too much compile time cost. - Currently this won't expose unfoldings where a type class is hidden under a - newtype. That is for cases like: :: + This doesn't guarantee *all* functions which might benefit from specialization + will be exposed, for example currently this won't expose unfoldings where a + type class is hidden under a newtype. + + That is for cases like: :: newtype NT a = NT (Integral a => a) foo :: NT a -> T1 -> TR - GHC won't recognise `foo` as specialisable and won't expose the unfolding + GHC won't look under `NT` for constraints and therefore `foo` won't be + recognized as specialisable and this flag won't expose the unfolding even with :ghc-flag:`-fexpose-overloaded-unfoldings` enabled. All the other caveats about :ghc-flag:`-fexpose-overloaded-unfoldings` ===================================== hadrian/src/Rules/Documentation.hs ===================================== @@ -12,10 +12,9 @@ import Hadrian.BuildPath import Hadrian.Haskell.Cabal import Hadrian.Haskell.Cabal.Type -import Rules.Generate (ghcPrimDependencies) import Base import Context -import Expression (getContextData, interpretInContext, (?), package) +import Expression (getContextData, interpretInContext) import Flavour import Oracles.ModuleFiles import Oracles.Setting (topDirectory) @@ -287,14 +286,7 @@ buildPackageDocumentation = do dep_pkgs <- sequence [pkgConfFile (context { way = haddockWay, Context.package = p}) | (p, _) <- haddocks] - -- `ghc-prim` has a source file for 'GHC.Prim' which is generated just - -- for Haddock. We need to 'union' (instead of '++') to avoid passing - -- 'GHC.PrimopWrappers' (which unfortunately shows up in both - -- `generatedSrcs` and `vanillaSrcs`) to Haddock twice. - generatedSrcs <- interpretInContext context (Expression.package ghcPrim ? ghcPrimDependencies) - vanillaSrcs <- hsSources context - let srcs = vanillaSrcs `union` generatedSrcs - + srcs <- hsSources context need $ srcs ++ (map snd haddocks) ++ dep_pkgs statsFilesDir <- haddockStatsFilesDir ===================================== libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, +{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables, MagicHash, BangPatterns #-} ----------------------------------------------------------------------------- @@ -370,9 +370,6 @@ findIndex p = listToMaybe . findIndices p -- >>> findIndices (\l -> length l > 3) ["a", "bcde", "fgh", "ijklmnop"] -- [1,3] findIndices :: (a -> Bool) -> [a] -> [Int] -#if defined(USE_REPORT_PRELUDE) -findIndices p xs = [ i | (x,i) <- zip xs [0..], p x] -#else -- Efficient definition, adapted from Data.Sequence -- (Note that making this INLINABLE instead of INLINE allows -- 'findIndex' to fuse, fixing #15426.) @@ -381,7 +378,6 @@ findIndices p ls = build $ \c n -> let go x r k | p x = I# k `c` r (k +# 1#) | otherwise = r (k +# 1#) in foldr go (\_ -> n) ls 0# -#endif /* USE_REPORT_PRELUDE */ -- | \(\mathcal{O}(\min(m,n))\). The 'isPrefixOf' function takes two lists and -- returns 'True' iff the first list is a prefix of the second. @@ -540,10 +536,6 @@ nub = nubBy (==) -- >>> nubBy (>) [1, 2, 3, 2, 1, 5, 4, 5, 3, 2] -- [1,2,3,5,5] nubBy :: (a -> a -> Bool) -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -nubBy eq [] = [] -nubBy eq (x:xs) = x : nubBy eq (filter (\ y -> not (eq x y)) xs) -#else -- stolen from HBC nubBy eq l = nubBy' l [] where @@ -562,7 +554,6 @@ nubBy eq l = nubBy' l [] elem_by :: (a -> a -> Bool) -> a -> [a] -> Bool elem_by _ _ [] = False elem_by eq y (x:xs) = x `eq` y || elem_by eq y xs -#endif -- | \(\mathcal{O}(n)\). 'delete' @x@ removes the first occurrence of @x@ from @@ -1627,10 +1618,6 @@ sort :: (Ord a) => [a] -> [a] -- [(1,"Hello"),(2,"world"),(4,"!")] sortBy :: (a -> a -> Ordering) -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -sort = sortBy compare -sortBy cmp = foldr (insertBy cmp) [] -#else {- GHC's mergesort replaced by a better implementation, 24/12/2009. @@ -1840,8 +1827,6 @@ rqpart cmp x (y:ys) rle rgt r = _ -> rqpart cmp x ys (y:rle) rgt r -} -#endif /* USE_REPORT_PRELUDE */ - -- | Sort a list by comparing the results of a key function applied to each -- element. @'sortOn' f@ is equivalent to @'sortBy' ('comparing' f)@, but has the -- performance advantage of only evaluating @f@ once for each element in the @@ -2027,14 +2012,10 @@ lines s = cons (case break (== '\n') s of -- >>> unlines . lines $ "foo\nbar" -- "foo\nbar\n" unlines :: [String] -> String -#if defined(USE_REPORT_PRELUDE) -unlines = concatMap (++ "\n") -#else -- HBC version (stolen) -- here's a more efficient version unlines [] = [] unlines (l:ls) = l ++ '\n' : unlines ls -#endif -- | 'words' breaks a string up into a list of words, which were delimited -- by white space (as defined by 'isSpace'). This function trims any white spaces @@ -2085,10 +2066,6 @@ wordsFB c n = go -- >>> unwords ["foo", "bar", "", "baz"] -- "foo bar baz" unwords :: [String] -> String -#if defined(USE_REPORT_PRELUDE) -unwords [] = "" -unwords ws = foldr1 (\w s -> w ++ ' ':s) ws -#else -- Here's a lazier version that can get the last element of a -- _|_-terminated list. {-# NOINLINE [1] unwords #-} @@ -2118,7 +2095,6 @@ tailUnwords (_:xs) = xs {-# INLINE [0] unwordsFB #-} unwordsFB :: String -> String -> String unwordsFB w r = ' ' : w ++ r -#endif {- A "SnocBuilder" is a version of Chris Okasaki's banker's queue that supports toListSB instead of uncons. In single-threaded use, its performance ===================================== libraries/ghc-internal/src/GHC/Internal/List.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables #-} +{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} @@ -208,11 +208,6 @@ tail [] = errorEmptyList "tail" -- >>> last [] -- *** Exception: Prelude.last: empty list last :: HasCallStack => [a] -> a -#if defined(USE_REPORT_PRELUDE) -last [x] = x -last (_:xs) = last xs -last [] = errorEmptyList "last" -#else -- Use foldl to make last a good consumer. -- This will compile to good code for the actual GHC.Internal.List.last. -- (At least as long it is eta-expanded, otherwise it does not, #10260.) @@ -222,7 +217,6 @@ last xs = foldl (\_ x -> x) lastError xs -- foldl. lastError :: HasCallStack => a lastError = errorEmptyList "last" -#endif -- | \(\mathcal{O}(n)\). Return all the elements of a list except the last one. -- The list must be non-empty. @@ -240,17 +234,11 @@ lastError = errorEmptyList "last" -- >>> init [] -- *** Exception: Prelude.init: empty list init :: HasCallStack => [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -init [x] = [] -init (x:xs) = x : init xs -init [] = errorEmptyList "init" -#else -- eliminate repeated cases init [] = errorEmptyList "init" init (x:xs) = init' x xs where init' _ [] = [] init' y (z:zs) = y : init' z zs -#endif -- | \(\mathcal{O}(1)\). Test whether a list is empty. -- @@ -1091,11 +1079,6 @@ dropWhile p xs@(x:xs') -- >>> take 0 [1,2] -- [] take :: Int -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -take n _ | n <= 0 = [] -take _ [] = [] -take n (x:xs) = x : take (n-1) xs -#else {- We always want to inline this to take advantage of a known length argument sign. Note, however, that it's important for the RULES to grab take, rather @@ -1141,7 +1124,6 @@ takeFB c n x xs = \ m -> case m of 1 -> x `c` n _ -> x `c` xs (m - 1) -#endif -- | 'drop' @n xs@ returns the suffix of @xs@ -- after the first @n@ elements, or @[]@ if @n >= 'length' xs at . @@ -1169,11 +1151,6 @@ takeFB c n x xs -- >>> drop 0 [1,2] -- [1,2] drop :: Int -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -drop n xs | n <= 0 = xs -drop _ [] = [] -drop n (_:xs) = drop (n-1) xs -#else /* hack away */ {-# INLINE drop #-} drop n ls | n <= 0 = ls @@ -1185,7 +1162,6 @@ drop n ls unsafeDrop !_ [] = [] unsafeDrop 1 (_:xs) = xs unsafeDrop m (_:xs) = unsafeDrop (m - 1) xs -#endif -- | 'splitAt' @n xs@ returns a tuple where first element is @xs@ prefix of -- length @n@ and second element is the remainder of the list: @@ -1231,9 +1207,6 @@ drop n ls -- ([],[1,2,3]) splitAt :: Int -> [a] -> ([a],[a]) -#if defined(USE_REPORT_PRELUDE) -splitAt n xs = (take n xs, drop n xs) -#else splitAt n ls | n <= 0 = ([], ls) | otherwise = splitAt' n ls @@ -1244,7 +1217,6 @@ splitAt n ls splitAt' m (x:xs) = (x:xs', xs'') where (xs', xs'') = splitAt' (m - 1) xs -#endif /* USE_REPORT_PRELUDE */ -- | 'span', applied to a predicate @p@ and a list @xs@, returns a tuple where -- first element is the longest prefix (possibly empty) of @xs@ of elements that @@ -1322,15 +1294,11 @@ span p xs@(x:xs') -- >>> break (> 9) [1,2,3] -- ([1,2,3],[]) break :: (a -> Bool) -> [a] -> ([a],[a]) -#if defined(USE_REPORT_PRELUDE) -break p = span (not . p) -#else -- HBC version (stolen) break _ xs@[] = (xs, xs) break p xs@(x:xs') | p x = ([],xs) | otherwise = let (ys,zs) = break p xs' in (x:ys,zs) -#endif -- | \(\mathcal{O}(n)\). 'reverse' @xs@ returns the elements of @xs@ in reverse order. -- @xs@ must be finite. @@ -1359,14 +1327,10 @@ break p xs@(x:xs') -- >>> reverse [1..] -- * Hangs forever * reverse :: [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -reverse = foldl (flip (:)) [] -#else reverse l = rev l [] where rev [] a = a rev (x:xs) a = rev xs (x:a) -#endif -- | 'and' returns the conjunction of a Boolean list. For the result to be -- 'True', the list must be finite; 'False', however, results from a 'False' @@ -1392,9 +1356,6 @@ reverse l = rev l [] -- >>> and (repeat True) -- * Hangs forever * and :: [Bool] -> Bool -#if defined(USE_REPORT_PRELUDE) -and = foldr (&&) True -#else and [] = True and (x:xs) = x && and xs {-# NOINLINE [1] and #-} @@ -1403,7 +1364,6 @@ and (x:xs) = x && and xs "and/build" forall (g::forall b.(Bool->b->b)->b->b) . and (build g) = g (&&) True #-} -#endif -- | 'or' returns the disjunction of a Boolean list. For the result to be -- 'False', the list must be finite; 'True', however, results from a 'True' @@ -1429,9 +1389,6 @@ and (x:xs) = x && and xs -- >>> or (repeat False) -- * Hangs forever * or :: [Bool] -> Bool -#if defined(USE_REPORT_PRELUDE) -or = foldr (||) False -#else or [] = False or (x:xs) = x || or xs {-# NOINLINE [1] or #-} @@ -1440,7 +1397,6 @@ or (x:xs) = x || or xs "or/build" forall (g::forall b.(Bool->b->b)->b->b) . or (build g) = g (||) False #-} -#endif -- | Applied to a predicate and a list, 'any' determines if any element -- of the list satisfies the predicate. For the result to be @@ -1465,9 +1421,6 @@ or (x:xs) = x || or xs -- >>> any (> 3) [0, -1..] -- * Hangs forever * any :: (a -> Bool) -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -any p = or . map p -#else any _ [] = False any p (x:xs) = p x || any p xs @@ -1477,7 +1430,6 @@ any p (x:xs) = p x || any p xs "any/build" forall p (g::forall b.(a->b->b)->b->b) . any p (build g) = g ((||) . p) False #-} -#endif -- | Applied to a predicate and a list, 'all' determines if all elements -- of the list satisfy the predicate. For the result to be @@ -1502,9 +1454,6 @@ any p (x:xs) = p x || any p xs -- >>> all (> 3) [4..] -- * Hangs forever * all :: (a -> Bool) -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -all p = and . map p -#else all _ [] = True all p (x:xs) = p x && all p xs @@ -1514,7 +1463,6 @@ all p (x:xs) = p x && all p xs "all/build" forall p (g::forall b.(a->b->b)->b->b) . all p (build g) = g ((&&) . p) True #-} -#endif -- | 'elem' is the list membership predicate, usually written in infix form, -- e.g., @x \`elem\` xs at . For the result to be @@ -1538,9 +1486,6 @@ all p (x:xs) = p x && all p xs -- >>> 3 `elem` [4..] -- * Hangs forever * elem :: (Eq a) => a -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -elem x = any (== x) -#else elem _ [] = False elem x (y:ys) = x==y || elem x ys {-# NOINLINE [1] elem #-} @@ -1548,7 +1493,6 @@ elem x (y:ys) = x==y || elem x ys "elem/build" forall x (g :: forall b . (a -> b -> b) -> b -> b) . elem x (build g) = g (\ y r -> (x == y) || r) False #-} -#endif -- | 'notElem' is the negation of 'elem'. -- @@ -1569,9 +1513,6 @@ elem x (y:ys) = x==y || elem x ys -- >>> 3 `notElem` [4..] -- * Hangs forever * notElem :: (Eq a) => a -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -notElem x = all (/= x) -#else notElem _ [] = True notElem x (y:ys)= x /= y && notElem x ys {-# NOINLINE [1] notElem #-} @@ -1579,7 +1520,6 @@ notElem x (y:ys)= x /= y && notElem x ys "notElem/build" forall x (g :: forall b . (a -> b -> b) -> b -> b) . notElem x (build g) = g (\ y r -> (x /= y) && r) True #-} -#endif -- | \(\mathcal{O}(n)\). 'lookup' @key assocs@ looks up a key in an association -- list. @@ -1677,14 +1617,6 @@ concat = foldr (++) [] -- -- >>> ['a', 'b', 'c'] !! (-1) -- *** Exception: Prelude.!!: negative index -#if defined(USE_REPORT_PRELUDE) -(!!) :: [a] -> Int -> a -xs !! n | n < 0 = errorWithoutStackTrace "Prelude.!!: negative index" -[] !! _ = errorWithoutStackTrace "Prelude.!!: index too large" -(x:_) !! 0 = x -(_:xs) !! n = xs !! (n-1) --- Prelude version is without HasCallStack to avoid building linear one -#else (!!) :: HasCallStack => [a] -> Int -> a -- We don't really want the errors to inline with (!!). @@ -1703,7 +1635,6 @@ xs !! n | otherwise = foldr (\x r k -> case k of 0 -> x _ -> r (k-1)) tooLarge xs n -#endif -- | List index (subscript) operator, starting from 0. Returns 'Nothing' -- if the index is out of bounds ===================================== libraries/ghc-prim/Setup.hs ===================================== @@ -19,43 +19,14 @@ import System.Directory main :: IO () main = do let hooks = simpleUserHooks { - regHook = addPrimModule - $ regHook simpleUserHooks, buildHook = build_primitive_sources $ buildHook simpleUserHooks, - haddockHook = addPrimModuleForHaddock - $ build_primitive_sources + haddockHook = build_primitive_sources $ haddockHook simpleUserHooks } defaultMainWithHooks hooks type Hook a = PackageDescription -> LocalBuildInfo -> UserHooks -> a -> IO () -addPrimModule :: Hook a -> Hook a -addPrimModule f pd lbi uhs x = - do let -- I'm not sure which one of these we actually need to change. - -- It seems bad that there are two. - pd' = addPrimModuleToPD pd - lpd = addPrimModuleToPD (localPkgDescr lbi) - lbi' = lbi { localPkgDescr = lpd } - f pd' lbi' uhs x - -addPrimModuleForHaddock :: Hook a -> Hook a -addPrimModuleForHaddock f pd lbi uhs x = - do let pc = withPrograms lbi - pc' = userSpecifyArgs "haddock" ["GHC/Prim.hs"] pc - lbi' = lbi { withPrograms = pc' } - f pd lbi' uhs x - -addPrimModuleToPD :: PackageDescription -> PackageDescription -addPrimModuleToPD pd = - case library pd of - Just lib -> - let ems = fromJust (simpleParse "GHC.Prim") : exposedModules lib - lib' = lib { exposedModules = ems } - in pd { library = Just lib' } - Nothing -> - error "Expected a library, but none found" - build_primitive_sources :: Hook a -> Hook a build_primitive_sources f pd lbi uhs x = do when (compilerFlavor (compiler lbi) == GHC) $ do ===================================== libraries/ghc-prim/ghc-prim.cabal ===================================== @@ -53,6 +53,7 @@ Library GHC.Debug GHC.Magic GHC.Magic.Dict + GHC.Prim GHC.Prim.Ext GHC.Prim.Panic GHC.Prim.Exception @@ -61,8 +62,9 @@ Library GHC.Tuple GHC.Types - virtual-modules: + autogen-modules: GHC.Prim + GHC.PrimopWrappers -- OS Specific if os(windows) ===================================== testsuite/tests/simd/should_run/T25062_V64.hs ===================================== @@ -10,7 +10,7 @@ main = case foo ( \ x y -> plusDoubleX8# x y ) of v -> case unpackDoubleX8# v of (# d1, d2, d3, d4, d5, d6, d7, d8 #) -> - print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8s ] + print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8 ] {-# NOINLINE foo #-} foo :: ( DoubleX8# -> DoubleX8# -> DoubleX8# ) -> DoubleX8# ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -58,13 +58,26 @@ test('simd014', test('T22187', [],compile,['']) test('T22187_run', [],compile_and_run,['']) test('T25062_V16', [], compile_and_run, ['']) -test('T25062_V32', [ unless(have_cpu_feature('avx2'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 256 bit wide vectors - ] - , compile_and_run, ['']) -test('T25062_V64', [ unless(have_cpu_feature('avx512f'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 512 bit wide vectors - ] - , compile_and_run, ['']) + +# Even if the CPU we run on doesn't support *executing* those tests we should try to +# compile them. +# Currently even for compilation we only support 256+ bit on x86 +only_V32_plus_compilation_support = unless(arch('x86_64'), skip) + +test('T25062_V32' + , [ extra_hc_opts('-mavx2') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx2') else compile + , ['']) + +test('T25062_V64' + , [ extra_hc_opts('-mavx512f') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx512f') else compile + , ['']) test('T25169', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/62f5c0447eba90a0c74b9ff717163d7457ec77b8...f3e924c33b6d4e1972887d0ec43a24fd7d7fd688 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/62f5c0447eba90a0c74b9ff717163d7457ec77b8...f3e924c33b6d4e1972887d0ec43a24fd7d7fd688 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 11:23:22 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Mon, 04 Nov 2024 06:23:22 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25439 Message-ID: <6728aeaa6097_3112debef50202f9@gitlab.mail> Sebastian Graf pushed new branch wip/T25439 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25439 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 12:12:09 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Mon, 04 Nov 2024 07:12:09 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 4 commits: Improve performance of deriving Show Message-ID: <6728ba1958ea4_3112de4ada58310c1@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: 0eb0f9da by Rodrigo Mesquita at 2024-11-04T12:11:56+00:00 Improve performance of deriving Show Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: T12707 T3294 ------------------------ - - - - - 4e177137 by Rodrigo Mesquita at 2024-11-04T12:11:56+00:00 Deriving Ord: compare and <= only Since the implementation of CLC proposal #24, the default implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`. This means we no longer need to generate implementations for these methods when stock deriving `Ord`. Rather, just derive the implementation of `compare` and `<=`, and rely on the default implementations for the others. - - - - - 312dadf2 by Rodrigo Mesquita at 2024-11-04T12:11:56+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - f2d1c3c8 by Rodrigo Mesquita at 2024-11-04T12:11:56+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 10 changed files: - compiler/GHC/Hs/Utils.hs - compiler/GHC/Tc/Deriv/Functor.hs - compiler/GHC/Tc/Deriv/Generate.hs - testsuite/tests/deriving/should_compile/T14682.stderr - testsuite/tests/deriving/should_compile/T20496.stderr - testsuite/tests/deriving/should_run/T9576.stderr - testsuite/tests/driver/implicit-dyn-too/implicit-dyn-too.stdout - testsuite/tests/typecheck/should_fail/T15883c.stderr - testsuite/tests/typecheck/should_fail/T15883d.stderr - testsuite/tests/typecheck/should_fail/T15883e.stderr Changes: ===================================== compiler/GHC/Hs/Utils.hs ===================================== @@ -56,7 +56,7 @@ module GHC.Hs.Utils( nlHsTyApp, nlHsTyApps, nlHsVar, nlHsDataCon, nlHsLit, nlHsApp, nlHsApps, nlHsSyntaxApps, nlHsIntLit, nlHsVarApps, - nlHsDo, nlHsOpApp, nlHsPar, nlHsIf, nlHsCase, nlList, + nlHsDo, nlHsOpApp, nlHsLam, nlHsPar, nlHsIf, nlHsCase, nlList, mkLHsTupleExpr, mkLHsVarTuple, missingTupArg, mkLocatedList, nlAscribe, @@ -598,11 +598,15 @@ nlHsDo ctxt stmts = noLocA (mkHsDo ctxt (noLocA stmts)) nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs nlHsOpApp e1 op e2 = noLocA (mkHsOpApp e1 op e2) +nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs nlHsPar :: IsPass p => LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs +nlHsLam match = noLocA $ HsLam noAnn LamSingle + $ mkMatchGroup (Generated OtherExpansion SkipPmc) (noLocA [match]) + nlHsPar e = noLocA (gHsPar e) -- nlHsIf should generate if-expressions which are NOT subject to ===================================== compiler/GHC/Tc/Deriv/Functor.hs ===================================== @@ -689,9 +689,18 @@ mkSimpleConMatch2 ctxt fold extra_pats con insides = do con_expr | null asWithTyVar = nlHsApps con_name asWithoutTyVar | otherwise = - let bs = filterByList argTysTyVarInfo bs_RDRs - vars = filterByLists argTysTyVarInfo bs_Vars as_Vars - in mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) + let -- All trailing b-args can be eta-reduced: + -- (\b1 b2 b3 -> A b1 a2 b2 b3) ==> (\b1 -> A b1 a2) + -- This improves the number of allocations needed to compile + -- the generated code (it is not relevant for correctness) + -- We do this by counting the n of args to keep + keep_n = length $ dropWhileEndLE (== True) argTysTyVarInfo + bs = filterByList (take keep_n argTysTyVarInfo) bs_RDRs + vars = take keep_n $ + filterByLists argTysTyVarInfo bs_Vars as_Vars + in if keep_n == 0 + then nlHsVar con_name + else mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) rhs <- fold con_expr exps return $ mkMatch ctxt (noLocA (extra_pats ++ [pat])) rhs emptyLocalBinds ===================================== compiler/GHC/Tc/Deriv/Generate.hs ===================================== @@ -339,7 +339,7 @@ Several special cases: See function unliftedOrdOp Note [Game plan for deriving Ord] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's a bad idea to define only 'compare', and build the other binary comparisons on top of it; see #2130, #4019. Reason: we don't want to laboriously make a three-way comparison, only to extract a @@ -350,16 +350,22 @@ binary result, something like this: True -> False False -> True -This being said, we can get away with generating full code only for -'compare' and '<' thus saving us generation of other three operators. -Other operators can be cheaply expressed through '<': -a <= b = not $ b < a -a > b = b < a -a >= b = not $ a < b - So for sufficiently small types (few constructors, or all nullary) we generate all methods; for large ones we just use 'compare'. +This being said, we can get away with generating full code only for +'compare' and '<=' thus saving us generation of other three operators. +Other operators can be cheaply expressed through '<=' -- indeed, that's what +the default implementations of >, <, and >= do. + +Historically, derived instances defined '<' and the remaining operators as +cheap expressions in function of it: + a <= b = not $ b < a + a > b = b < a + a >= b = not $ a < b +but since the CLC proposal #24 (see 8f174e06185143674d6cbfee75c30e68805d85b8), +it suffices to derive '<=' and rely on the +default implementation for the others. -} data OrdOp = OrdCompare | OrdLT | OrdLE | OrdGE | OrdGT @@ -408,7 +414,7 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon return $ if null tycon_data_cons -- No data-cons => invoke bale-out case then ( [mkFunBindEC 2 loc compare_RDR (const eqTag_Expr) []] , emptyBag) - else ( [mkOrdOp OrdCompare] ++ other_ops + else ( [mkOrdOp OrdCompare] `chkAppend` other_ops , aux_binds) where aux_binds = emptyBag @@ -417,19 +423,10 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon other_ops | (last_tag - first_tag) <= 2 -- 1-3 constructors || null non_nullary_cons -- Or it's an enumeration - = [mkOrdOp OrdLT, lE, gT, gE] + = [mkOrdOp OrdLE] | otherwise = [] - negate_expr = nlHsApp (nlHsVar not_RDR) - pats = noLocA [a_Pat, b_Pat] - lE = mkSimpleGeneratedFunBind loc le_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr) - gT = mkSimpleGeneratedFunBind loc gt_RDR pats $ - nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr - gE = mkSimpleGeneratedFunBind loc ge_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) a_Expr) b_Expr) - get_tag con = dataConTag con - fIRST_TAG -- We want *zero-based* tags, because that's what -- con2Tag returns (generated by untag_Expr)! @@ -1407,7 +1404,7 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gfoldl_eqn con = ([nlVarPat k_RDR, z_Pat, nlConVarPat con_name as_needed], - foldl' mk_k_app (z_Expr `nlHsApp` (eta_expand_data_con con)) as_needed) + foldl' mk_k_app (z_Expr `nlHsApp` (nlHsVar (getRdrName con))) as_needed) where con_name :: RdrName con_name = getRdrName con @@ -1427,18 +1424,9 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gunfold_alt dc = mkHsCaseAlt (mk_unfold_pat dc) (mk_unfold_rhs dc) mk_unfold_rhs dc = foldr nlHsApp - (z_Expr `nlHsApp` (eta_expand_data_con dc)) + (z_Expr `nlHsApp` (nlHsVar (getRdrName dc))) (replicate (dataConSourceArity dc) (nlHsVar k_RDR)) - eta_expand_data_con dc = - mkHsLam (noLocA eta_expand_pats) - (foldl nlHsApp (nlHsVar (getRdrName dc)) eta_expand_hsvars) - where - eta_expand_pats = map nlVarPat eta_expand_vars - eta_expand_hsvars = map nlHsVar eta_expand_vars - eta_expand_vars = take (dataConSourceArity dc) as_RDRs - - mk_unfold_pat dc -- Last one is a wild-pat, to avoid -- redundant test, and annoying warning | tag-fIRST_TAG == n_cons-1 = nlWildPat -- Last constructor @@ -2528,21 +2516,21 @@ showParen_Expr showParen_Expr e1 e2 = nlHsApp (nlHsApp (nlHsVar showParen_RDR) e1) e2 nested_compose_Expr :: [LHsExpr GhcPs] -> LHsExpr GhcPs - -nested_compose_Expr [] = panic "nested_compose_expr" -- Arg is always non-empty -nested_compose_Expr [e] = parenify e -nested_compose_Expr (e:es) - = nlHsApp (nlHsApp (nlHsVar compose_RDR) (parenify e)) (nested_compose_Expr es) +nested_compose_Expr = + nlHsLam . mkSimpleMatch (LamAlt LamSingle) (noLocA [z_Pat]) . go + where + -- Previously we used (`.`), but inlining its definition improves compiler + -- performance significantly since we no longer need to typecheck lots of + -- (.) applications (each which needed three type applications, all @String) + go [] = panic "nested_compose_expr" -- Arg is always non-empty + go [e] = nlHsApp e z_Expr + go (e:es) = nlHsApp e (go es) -- impossible_Expr is used in case RHSs that should never happen. -- We generate these to keep the desugarer from complaining that they *might* happen! error_Expr :: FastString -> LHsExpr GhcPs error_Expr string = nlHsApp (nlHsVar error_RDR) (nlHsLit (mkHsStringFS string)) -parenify :: LHsExpr GhcPs -> LHsExpr GhcPs -parenify e@(L _ (HsVar _ _)) = e -parenify e = mkHsPar e - -- genOpApp wraps brackets round the operator application, so that the -- renamer won't subsequently try to re-associate it. genOpApp :: LHsExpr GhcPs -> RdrName -> LHsExpr GhcPs -> LHsExpr GhcPs @@ -2570,10 +2558,9 @@ as_RDRs = [ mkVarUnqual (mkFastString ("a"++show i)) | i <- [(1::Int) .. bs_RDRs = [ mkVarUnqual (mkFastString ("b"++show i)) | i <- [(1::Int) .. ] ] cs_RDRs = [ mkVarUnqual (mkFastString ("c"++show i)) | i <- [(1::Int) .. ] ] -a_Expr, b_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, +a_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, true_Expr, pure_Expr, unsafeCodeCoerce_Expr :: LHsExpr GhcPs a_Expr = nlHsVar a_RDR -b_Expr = nlHsVar b_RDR c_Expr = nlHsVar c_RDR z_Expr = nlHsVar z_RDR ltTag_Expr = nlHsVar ltTag_RDR ===================================== testsuite/tests/deriving/should_compile/T14682.stderr ===================================== @@ -5,12 +5,11 @@ Derived class instances: GHC.Internal.Show.showsPrec a (T14682.Foo b1 b2) = GHC.Internal.Show.showParen (a GHC.Classes.>= 11) - ((GHC.Internal.Base..) - (GHC.Internal.Show.showString "Foo ") - ((GHC.Internal.Base..) - (GHC.Internal.Show.showsPrec 11 b1) - ((GHC.Internal.Base..) - GHC.Internal.Show.showSpace (GHC.Internal.Show.showsPrec 11 b2)))) + (\ z + -> (GHC.Internal.Show.showString "Foo ") + ((GHC.Internal.Show.showsPrec 11 b1) + (GHC.Internal.Show.showSpace + ((GHC.Internal.Show.showsPrec 11 b2) z)))) instance GHC.Internal.TH.Lift.Lift T14682.Foo where GHC.Internal.TH.Lift.lift (T14682.Foo a1 a2) @@ -25,9 +24,8 @@ Derived class instances: instance GHC.Internal.Data.Data.Data T14682.Foo where GHC.Internal.Data.Data.gfoldl k z (T14682.Foo a1 a2) - = ((z (\ a1 a2 -> T14682.Foo a1 a2) `k` a1) `k` a2) - GHC.Internal.Data.Data.gunfold k z _ - = k (k (z (\ a1 a2 -> T14682.Foo a1 a2))) + = ((z T14682.Foo `k` a1) `k` a2) + GHC.Internal.Data.Data.gunfold k z _ = k (k (z T14682.Foo)) GHC.Internal.Data.Data.toConstr (T14682.Foo _ _) = $cFoo GHC.Internal.Data.Data.dataTypeOf _ = $tFoo @@ -46,18 +44,15 @@ Derived class instances: GHC.Types.LT -> GHC.Types.LT GHC.Types.EQ -> (a2 `GHC.Classes.compare` b2) GHC.Types.GT -> GHC.Types.GT - (GHC.Classes.<) a b + (GHC.Classes.<=) a b = case a of T14682.Foo a1 a2 -> case b of T14682.Foo b1 b2 -> case (GHC.Classes.compare a1 b1) of GHC.Types.LT -> GHC.Types.True - GHC.Types.EQ -> (a2 GHC.Classes.< b2) + GHC.Types.EQ -> (a2 GHC.Classes.<= b2) GHC.Types.GT -> GHC.Types.False - (GHC.Classes.<=) a b = GHC.Classes.not ((GHC.Classes.<) b a) - (GHC.Classes.>) a b = (GHC.Classes.<) b a - (GHC.Classes.>=) a b = GHC.Classes.not ((GHC.Classes.<) a b) instance GHC.Internal.Ix.Ix T14682.Foo where GHC.Internal.Ix.range (T14682.Foo a1 a2, T14682.Foo b1 b2) @@ -177,6 +172,24 @@ GHC.Classes.Eq [T14682.Foo] +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.<) = GHC.Classes.$dm< @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>) = GHC.Classes.$dm> @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>=) = GHC.Classes.$dm>= @T14682.Foo + + + ==================== Filling in method body ==================== GHC.Classes.Ord [T14682.Foo] GHC.Classes.max = GHC.Classes.$dmmax @T14682.Foo ===================================== testsuite/tests/deriving/should_compile/T20496.stderr ===================================== @@ -32,5 +32,5 @@ rnd null (MkT _) = False instance Traversable T where - traverse f (MkT a1) = fmap (\ b1 -> MkT b1) (f a1) + traverse f (MkT a1) = fmap MkT (f a1) ===================================== testsuite/tests/deriving/should_run/T9576.stderr ===================================== @@ -2,11 +2,11 @@ T9576: Exception: T9576.hs:6:31: error: [GHC-39999] • No instance for ‘Show Foo’ arising from a use of ‘showsPrec’ - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘((showsPrec 11 b1) z)’ + In the expression: (showString "MkBar ") ((showsPrec 11 b1) z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkBar ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkBar ") (showsPrec 11 b1)) + ‘(\ z -> (showString "MkBar ") ((showsPrec 11 b1) z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show Bar’: To see the code I am typechecking, use -ddump-deriv @@ -17,9 +17,7 @@ Module: GHC.Internal.Control.Exception.Base Type: TypeError HasCallStack backtrace: - collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception - toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception - throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:423:30 in ghc-internal:GHC.Internal.Control.Exception.Base - - + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base ===================================== testsuite/tests/driver/implicit-dyn-too/implicit-dyn-too.stdout ===================================== @@ -1,4 +1,3 @@ [1 of 2] Compiling QuasiExpr ( QuasiExpr.hs, QuasiExpr.o, QuasiExpr.dyn_o ) [2 of 2] Compiling QuasiQuote ( QuasiQuote.hs, nothing ) [1 of 2] Compiling QuasiExpr ( QuasiExpr.hs, QuasiExpr.o, QuasiExpr.dyn_o ) [Missing dynamic object file] -[2 of 2] Compiling QuasiQuote ( QuasiQuote.hs, nothing ) [QuasiExpr[TH] changed] ===================================== testsuite/tests/typecheck/should_fail/T15883c.stderr ===================================== @@ -1,4 +1,3 @@ - T15883c.hs:14:1: error: [GHC-39999] • No instance for ‘Eq (Foo LiftedRep)’ arising from the superclasses of an instance declaration @@ -22,7 +21,7 @@ T15883c.hs:14:1: error: [GHC-39999] To see the code I am typechecking, use -ddump-deriv T15883c.hs:14:1: error: [GHC-39999] - • Ambiguous type variable ‘a1’ arising from a use of ‘<’ + • Ambiguous type variable ‘a1’ arising from a use of ‘<=’ prevents the constraint ‘(Ord a1)’ from being solved. Probable fix: use a type annotation to specify what ‘a1’ should be. Potentially matching instances: @@ -31,9 +30,10 @@ T15883c.hs:14:1: error: [GHC-39999] ...plus 24 others ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the expression: a1 < b1 - In a case alternative: MkFoo b1 -> (a1 < b1) - In the expression: case b of MkFoo b1 -> (a1 < b1) - When typechecking the code for ‘<’ + • In the expression: a1 <= b1 + In a case alternative: MkFoo b1 -> (a1 <= b1) + In the expression: case b of MkFoo b1 -> (a1 <= b1) + When typechecking the code for ‘<=’ in a derived instance for ‘Ord (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883d.stderr ===================================== @@ -1,4 +1,3 @@ - T15883d.hs:14:1: error: [GHC-39999] • Ambiguous type variable ‘a0’ arising from a use of ‘showsPrec’ prevents the constraint ‘(Show a0)’ from being solved. @@ -9,11 +8,12 @@ T15883d.hs:14:1: error: [GHC-39999] ...plus 29 others ...plus 10 instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘((showsPrec 11 b1) z)’ + In the expression: (showString "MkFoo ") ((showsPrec 11 b1) z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkFoo ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkFoo ") (showsPrec 11 b1)) + ‘(\ z -> (showString "MkFoo ") ((showsPrec 11 b1) z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883e.stderr ===================================== @@ -1,71 +1,26 @@ - -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘d0’ arising from a use of ‘k’ - prevents the constraint ‘(Data d0)’ from being solved. - Probable fix: use a type annotation to specify what ‘d0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: z (\ a1 -> MkFoo a1) `k` a1 - In an equation for ‘GHC.Internal.Data.Data.gfoldl’: - GHC.Internal.Data.Data.gfoldl k z (MkFoo a1) - = (z (\ a1 -> MkFoo a1) `k` a1) - When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ - -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘d0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘d0’ with ‘forall a. a’ + Expected: d0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘d0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘z MkFoo’ + In the expression: z MkFoo `k` a1 When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: d0 (bound at T15883e.hs:16:1) -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘b0’ arising from a use of ‘k’ - prevents the constraint ‘(Data b0)’ from being solved. - Probable fix: use a type annotation to specify what ‘b0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: k (z (\ a1 -> MkFoo a1)) - In an equation for ‘GHC.Internal.Data.Data.gunfold’: - GHC.Internal.Data.Data.gunfold k z _ = k (z (\ a1 -> MkFoo a1)) +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘b0’ with ‘forall a. a’ + Expected: b0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘b0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘(z MkFoo)’ + In the expression: k (z MkFoo) When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘b0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ - When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: b0 (bound at T15883e.hs:16:1) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0d689b577cb4df99b1db221bdf89308177cd85f7...f2d1c3c8071b1268e074141d3a952142c69a7c26 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0d689b577cb4df99b1db221bdf89308177cd85f7...f2d1c3c8071b1268e074141d3a952142c69a7c26 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 13:13:48 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Mon, 04 Nov 2024 08:13:48 -0500 Subject: [Git][ghc/ghc][wip/andreask/base_c_fstat_refactor] Small cleanup around calls to fstat. Message-ID: <6728c88cc52f8_bba7d226744990cc@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/base_c_fstat_refactor at Glasgow Haskell Compiler / GHC Commits: ee6bd01e by Andreas Klebinger at 2024-11-04T13:53:32+01:00 Small cleanup around calls to fstat. Pulls out some common logic into a new fdWithCStat helper function. - - - - - 7 changed files: - libraries/base/src/System/Posix/Internals.hs - libraries/ghc-internal/src/GHC/Internal/IO/FD.hs - libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== libraries/base/src/System/Posix/Internals.hs ===================================== @@ -27,4 +27,4 @@ module System.Posix.Internals ( module GHC.Internal.System.Posix.Internals -- TODO: deprecate ) where -import GHC.Internal.System.Posix.Internals +import GHC.Internal.System.Posix.Internals hiding (fdWithCStat) ===================================== libraries/ghc-internal/src/GHC/Internal/IO/FD.hs ===================================== @@ -57,7 +57,6 @@ import GHC.Internal.Foreign.Storable import GHC.Internal.Foreign.C.Types import GHC.Internal.Foreign.C.Error import GHC.Internal.Foreign.Marshal.Utils -import GHC.Internal.Foreign.Marshal.Alloc (allocaBytes) import qualified GHC.Internal.System.Posix.Internals import GHC.Internal.System.Posix.Internals hiding (FD, setEcho, getEcho) @@ -470,9 +469,7 @@ setNonBlockingMode fd set = do is_nonblock <- if set then do - allocaBytes sizeof_stat $ \ p_stat -> do - throwErrnoIfMinus1Retry_ "fileSize" $ - c_fstat (fdFD fd) p_stat + fdWithCStat (fdFD fd) $ \ p_stat -> do fd_type <- statGetType_maybe p_stat pure $ fd_type /= Just RegularFile && fd_type /= Just RawDevice else pure False ===================================== libraries/ghc-internal/src/GHC/Internal/System/Posix/Internals.hs ===================================== @@ -105,11 +105,16 @@ type FD = CInt -- --------------------------------------------------------------------------- -- stat()-related stuff -fdFileSize :: FD -> IO Integer -fdFileSize fd = +fdWithCStat :: FD -> (Ptr CStat -> IO a) -> IO a +fdWithCStat fd fun = do allocaBytes sizeof_stat $ \ p_stat -> do throwErrnoIfMinus1Retry_ "fileSize" $ - c_fstat fd p_stat + c_fstat fd p_stat + fun p_stat + +fdFileSize :: FD -> IO Integer +fdFileSize fd = + fdWithCStat fd $ \ p_stat -> do c_mode <- st_mode p_stat :: IO CMode if not (s_isreg c_mode) then return (-1) @@ -129,9 +134,7 @@ fileType file = -- referring to file handles. i.e., it'll fail for socket FDs. fdStat :: FD -> IO (IODeviceType, CDev, CIno) fdStat fd = - allocaBytes sizeof_stat $ \ p_stat -> do - throwErrnoIfMinus1Retry_ "fdType" $ - c_fstat fd p_stat + fdWithCStat fd $ \ p_stat -> do ty <- statGetType p_stat dev <- st_dev p_stat ino <- st_ino p_stat ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -10554,7 +10554,6 @@ module System.Posix.Internals where fdFileSize :: FD -> GHC.Types.IO GHC.Num.Integer.Integer fdGetMode :: FD -> GHC.Types.IO GHC.Internal.IO.IOMode.IOMode fdStat :: FD -> GHC.Types.IO (GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) - fdStat_maybe :: FD -> GHC.Types.IO (GHC.Internal.Maybe.Maybe GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) fdType :: FD -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType fileType :: GHC.Internal.IO.FilePath -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType getEcho :: FD -> GHC.Types.IO GHC.Types.Bool ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -13595,7 +13595,6 @@ module System.Posix.Internals where fdFileSize :: FD -> GHC.Types.IO GHC.Num.Integer.Integer fdGetMode :: FD -> GHC.Types.IO GHC.Internal.IO.IOMode.IOMode fdStat :: FD -> GHC.Types.IO (GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) - fdStat_maybe :: FD -> GHC.Types.IO (GHC.Internal.Maybe.Maybe GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) fdType :: FD -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType fileType :: GHC.Internal.IO.FilePath -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType getEcho :: FD -> GHC.Types.IO GHC.Types.Bool ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -10826,7 +10826,6 @@ module System.Posix.Internals where fdFileSize :: FD -> GHC.Types.IO GHC.Num.Integer.Integer fdGetMode :: FD -> GHC.Types.IO GHC.Internal.IO.IOMode.IOMode fdStat :: FD -> GHC.Types.IO (GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) - fdStat_maybe :: FD -> GHC.Types.IO (GHC.Internal.Maybe.Maybe GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) fdType :: FD -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType fileType :: GHC.Internal.IO.FilePath -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType getEcho :: FD -> GHC.Types.IO GHC.Types.Bool ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -10554,7 +10554,6 @@ module System.Posix.Internals where fdFileSize :: FD -> GHC.Types.IO GHC.Num.Integer.Integer fdGetMode :: FD -> GHC.Types.IO GHC.Internal.IO.IOMode.IOMode fdStat :: FD -> GHC.Types.IO (GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) - fdStat_maybe :: FD -> GHC.Types.IO (GHC.Internal.Maybe.Maybe GHC.Internal.IO.Device.IODeviceType, GHC.Internal.System.Posix.Types.CDev, GHC.Internal.System.Posix.Types.CIno) fdType :: FD -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType fileType :: GHC.Internal.IO.FilePath -> GHC.Types.IO GHC.Internal.IO.Device.IODeviceType getEcho :: FD -> GHC.Types.IO GHC.Types.Bool View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ee6bd01ede84c902e4a5b6bd567ae3e102dec61b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ee6bd01ede84c902e4a5b6bd567ae3e102dec61b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 13:26:31 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Mon, 04 Nov 2024 08:26:31 -0500 Subject: [Git][ghc/ghc][wip/andreask/bound_cmm_folding] 340 commits: compiler: Fix pretty printing of ticked prefix constructors (#24237) Message-ID: <6728cb8747ee0_bba7d3117581134ea@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/bound_cmm_folding at Glasgow Haskell Compiler / GHC Commits: 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 0e1d0e99 by Andreas Klebinger at 2024-11-04T13:26:25+00:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding operations on literals ensure the result is still within bounds by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - 15 changed files: - .ghcid - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitmodules - CODEOWNERS - cabal.project-reinstall - compiler/CodeGen.Platform.h - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fd1fa69ee764c1943c86fa4e8801901519335a18...0e1d0e99991a77f3b09fec18837974f928fddbf9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fd1fa69ee764c1943c86fa4e8801901519335a18...0e1d0e99991a77f3b09fec18837974f928fddbf9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 13:31:14 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Mon, 04 Nov 2024 08:31:14 -0500 Subject: [Git][ghc/ghc][wip/spj-apporv-Oct24] 65 commits: Bump transformers submodule Message-ID: <6728cca2850a5_bba7d564ac8113617@gitlab.mail> Simon Peyton Jones pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - deb5e0a6 by Apoorv Ingle at 2024-11-04T13:30:53+00:00 Make ApplicativeDo work with HsExpansions testcase added: T24406 Issues Fixed: #24406, #16135 Code Changes: - Remove `XStmtLR GhcTc` as `XStmtLR GhcRn` is now compiled to `HsExpr GhcTc` - The expanded statements are guided by `GHC.Hs.Expr.TcFunInfo` which is used to decide if the `XExpr GhcRn` is to be typechecked using `tcApp` or `tcExpr` Note [Expanding HsDo with XXExprGhcRn] explains the change in more detail - - - - - a4a9d1b6 by Apoorv Ingle at 2024-11-04T13:30:53+00:00 simplify data structures. remove doTcApp and applicative stmt fail blocks do not refer stmts - - - - - 828f7f8b by Simon Peyton Jones at 2024-11-04T13:30:53+00:00 Remove special cases ... to see what breaks - - - - - f0491b48 by Simon Peyton Jones at 2024-11-04T13:30:53+00:00 Don't use a user SrcSpan on a Stmt expansoin - - - - - 2556a942 by Apoorv Ingle at 2024-11-04T13:30:53+00:00 make caller wrap the pop err ctxt - - - - - df1b4d18 by Apoorv Ingle at 2024-11-04T13:30:53+00:00 wrap expansion statements with the statement location instead of genSpan - - - - - b9b16d29 by Apoorv Ingle at 2024-11-04T13:30:53+00:00 fix bugs, let stmt pop in the right place - - - - - 16 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot - compiler/GHC/Core/Coercion/Opt.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/43b80d2f1bd3131b00a4c6813a8d5c6d7f52cbee...b9b16d2974f05747769a45987ea232c298e56921 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/43b80d2f1bd3131b00a4c6813a8d5c6d7f52cbee...b9b16d2974f05747769a45987ea232c298e56921 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 13:54:53 2024 From: gitlab at gitlab.haskell.org (Torsten Schmits (@torsten.schmits)) Date: Mon, 04 Nov 2024 08:54:53 -0500 Subject: [Git][ghc/ghc][wip/torsten.schmits/fix-linters-file-collection] 2 commits: fix test lint that accumulated while the checks were broken Message-ID: <6728d22dcd6ee_bba7d761c68117758@gitlab.mail> Torsten Schmits pushed to branch wip/torsten.schmits/fix-linters-file-collection at Glasgow Haskell Compiler / GHC Commits: 375a122a by Torsten Schmits at 2024-11-04T14:54:34+01:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - f8b0cd3e by Torsten Schmits at 2024-11-04T14:54:41+01:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 11 changed files: - rts/IOManager.c - rts/Updates.h - testsuite/tests/bytecode/T24634/Makefile - testsuite/tests/bytecode/T25090/Makefile - testsuite/tests/driver/Makefile - testsuite/tests/driver/boot-target/Makefile - testsuite/tests/driver/fat-iface/Makefile - testsuite/tests/linters/Makefile - testsuite/tests/linters/regex-linters/check-cpp.py - testsuite/tests/linters/regex-linters/linter.py - testsuite/tests/perf/compiler/Makefile Changes: ===================================== rts/IOManager.c ===================================== @@ -364,7 +364,7 @@ void initIOManager(void) * TODO: rationalise this into one entry point, that internally * can do different things in the two cases. */ -#if defined (THREADED_RTS) +#if defined(THREADED_RTS) /* Win32 implementation in win32/ThrIOManager.c */ ioManagerStart(); ===================================== rts/Updates.h ===================================== @@ -9,8 +9,8 @@ #pragma once #if !defined(CMINUSMINUS) -#include "BeginPrivate.h" #include "RtsFlags.h" +#include "BeginPrivate.h" #endif ===================================== testsuite/tests/bytecode/T24634/Makefile ===================================== @@ -4,14 +4,14 @@ include $(TOP)/mk/test.mk # This case loads bytecode from the interface file written in the second invocation. T24634a: - $(TEST_HC) -c hello_c.c -o hello_c.o - $(TEST_HC) -c -fbyte-code-and-object-code -fno-omit-interface-pragmas Hello.hs - $(TEST_HC) -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Main.hs + '$(TEST_HC)' -c hello_c.c -o hello_c.o + '$(TEST_HC)' -c -fbyte-code-and-object-code -fno-omit-interface-pragmas Hello.hs + '$(TEST_HC)' -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Main.hs ./Main # This case uses the bytecode generated in 'runHscBackendPhase', not involving the interface, since 'Hello' is compiled # in the same invocation as 'Main'. T24634b: - $(TEST_HC) -c hello_c.c -o hello_c.o - $(TEST_HC) -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Hello.hs Main.hs + '$(TEST_HC)' -c hello_c.c -o hello_c.o + '$(TEST_HC)' -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Hello.hs Main.hs ./Main ===================================== testsuite/tests/bytecode/T25090/Makefile ===================================== @@ -4,18 +4,18 @@ include $(TOP)/mk/test.mk # Verify that the object files aren't linked by clobbering them. T25090a: - $(TEST_HC) -c -fbyte-code-and-object-code C.hs-boot - $(TEST_HC) -c -fbyte-code-and-object-code B.hs - $(TEST_HC) -c -fbyte-code-and-object-code C.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code C.hs-boot + '$(TEST_HC)' -c -fbyte-code-and-object-code B.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code C.hs echo 'corrupt' > B.o echo 'corrupt' > C.o echo 'corrupt' > C.o-boot - $(TEST_HC) -c -fbyte-code-and-object-code D.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code D.hs echo 'corrupt' > D.o - $(TEST_HC) -c -fbyte-code-and-object-code -fprefer-byte-code A.hs - $(TEST_HC) -fbyte-code-and-object-code -fprefer-byte-code A.o -o exe + '$(TEST_HC)' -c -fbyte-code-and-object-code -fprefer-byte-code A.hs + '$(TEST_HC)' -fbyte-code-and-object-code -fprefer-byte-code A.o -o exe ./exe T25090b: - $(TEST_HC) -fbyte-code-and-object-code -fprefer-byte-code A -o exe -v0 + '$(TEST_HC)' -fbyte-code-and-object-code -fprefer-byte-code A -o exe -v0 ./exe ===================================== testsuite/tests/driver/Makefile ===================================== @@ -788,7 +788,7 @@ T22044: .PHONY: T22669 T22669: - echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --interactive T22669 + echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) T22669 ! test -f T22669.o-boot ===================================== testsuite/tests/driver/boot-target/Makefile ===================================== @@ -1,8 +1,8 @@ boot1: - $(TEST_HC) -c A.hs-boot B.hs + '$(TEST_HC)' -c A.hs-boot B.hs boot2: - $(TEST_HC) A.hs-boot A.hs B.hs -v0 + '$(TEST_HC)' A.hs-boot A.hs B.hs -v0 boot3: - $(TEST_HC) A.hs-boot B.hs -v0 \ No newline at end of file + '$(TEST_HC)' A.hs-boot B.hs -v0 ===================================== testsuite/tests/driver/fat-iface/Makefile ===================================== @@ -55,5 +55,5 @@ T22807: clean T22807_ghci: clean "$(TEST_HC)" $(TEST_HC_OPTS) T22807_ghci.hs -fno-full-laziness -fhide-source-paths -fwrite-if-simplified-core -O2 -dynamic -v0 - "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --interactive -fhide-source-paths -fno-full-laziness < T22807_ghci.script + "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -fhide-source-paths -fno-full-laziness < T22807_ghci.script ===================================== testsuite/tests/linters/Makefile ===================================== @@ -12,16 +12,16 @@ uniques: python3 checkUniques/check-uniques.py $(TOP)/.. makefiles: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-makefiles.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-makefiles.py tracked) version-number: regex-linters/check-version-number.sh ${TOP}/.. cpp: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-cpp.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-cpp.py tracked) rts-includes: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-rts-includes.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-rts-includes.py tracked) changelogs: regex-linters/check-changelogs.sh $(TOP)/.. ===================================== testsuite/tests/linters/regex-linters/check-cpp.py ===================================== @@ -13,12 +13,12 @@ linters = [ message='CPP macros should not have a space between the macro name and their argument list'), RegexpLinter(r'ASSERT2\s+\(', message='CPP macros should not have a space between the macro name and their argument list'), - RegexpLinter(r'#ifdef\s+', - message='`#if defined(x)` is preferred to `#ifdef x`'), + # RegexpLinter(r'#ifdef\s+', + # message='`#if defined(x)` is preferred to `#ifdef x`'), RegexpLinter(r'#if\s+defined\s+', message='`#if defined(x)` is preferred to `#if defined x`'), - RegexpLinter(r'#ifndef\s+', - message='`#if !defined(x)` is preferred to `#ifndef x`'), + # RegexpLinter(r'#ifndef\s+', + # message='`#if !defined(x)` is preferred to `#ifndef x`'), ] for l in linters: @@ -29,12 +29,6 @@ for l in linters: l.add_path_filter(lambda path: not path.name == 'config.guess') # Don't lint files from external xxhash projects l.add_path_filter(lambda path: path != Path('rts', 'xxhash.h')), - # Don't lint font files - l.add_path_filter(lambda path: not path.parent == Path('docs','users_guide', - 'rtd-theme', 'static', 'fonts')) - # Don't lint image files - l.add_path_filter(lambda path: not path.parent == Path('docs','users_guide', - 'images')) # Don't lint core spec l.add_path_filter(lambda path: not path.name == 'core-spec.pdf') # Don't lint the linter itself ===================================== testsuite/tests/linters/regex-linters/linter.py ===================================== @@ -40,6 +40,8 @@ def get_changed_files(base_commit: str, head_commit: str, def get_tracked_files(subdir: str = '.'): """ Get the files tracked by git in the given subdirectory. """ + if not Path(subdir).exists(): + raise Exception("Regex linter executed with nonexistent target directory '{}'".format(subdir)) cmd = ['git', 'ls-tree', '--name-only', '-r', 'HEAD', subdir] files = subprocess.check_output(cmd) return files.decode('UTF-8').split('\n') @@ -77,9 +79,16 @@ class LineLinter(Linter): """ def lint(self, path: Path): if path.is_file(): - with path.open('r') as f: - for line_no, line in enumerate(f): - self.lint_line(path, line_no+1, line) + try: + with path.open('r') as f: + for line_no, line in enumerate(f): + self.lint_line(path, line_no+1, line) + # We don't want to explicitly exclude every single binary file in the test suite + except UnicodeDecodeError as e: + pass + except Exception as e: + print('Exception occurred while linting file: {}'.format(path)) + raise e def lint_line(self, path: Path, line_no: int, line: str): raise NotImplementedError @@ -124,7 +133,7 @@ def run_linters(linters: Sequence[Linter], linted_files = args.get_linted_files(args) for path in linted_files: - if path.startswith('linters'): + if path.startswith('testsuite/tests/linters'): continue for linter in linters: linter.do_lint(Path(path)) ===================================== testsuite/tests/perf/compiler/Makefile ===================================== @@ -21,7 +21,7 @@ MultiModulesRecomp: # containing core expressions, aka `mi_extra_decls` are populated. MultiModulesRecompDefsWithCore: ./genMultiLayerModulesCore - '$(TEST_HC)' --interactive $(TEST_HC_OPTS) -e "" -fwrite-if-simplified-core MultiLayerModules + '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -e "" -fwrite-if-simplified-core MultiLayerModules MultiModulesDefsWithCore: ./genMultiLayerModulesCore View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8e122905111ae973df455b3a7799373ae26cd1c1...f8b0cd3ed18532e6a2a96aeba113a97794cd2666 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8e122905111ae973df455b3a7799373ae26cd1c1...f8b0cd3ed18532e6a2a96aeba113a97794cd2666 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 14:08:40 2024 From: gitlab at gitlab.haskell.org (Torsten Schmits (@torsten.schmits)) Date: Mon, 04 Nov 2024 09:08:40 -0500 Subject: [Git][ghc/ghc][wip/torsten.schmits/fix-linters-file-collection] 7 commits: ghc-internal: strict, unboxed src loc ranges Message-ID: <6728d56850351_de58cbc71421683@gitlab.mail> Torsten Schmits pushed to branch wip/torsten.schmits/fix-linters-file-collection at Glasgow Haskell Compiler / GHC Commits: ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - b51377f2 by Torsten Schmits at 2024-11-04T15:08:20+01:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 1b080095 by Torsten Schmits at 2024-11-04T15:08:20+01:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 23 changed files: - compiler/GHC/Core/Make.hs - compiler/GHC/Tc/Types/EvTerm.hs - docs/users_guide/using-optimisation.rst - libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs - libraries/ghc-internal/src/GHC/Internal/List.hs - libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs - rts/IOManager.c - rts/Updates.h - testsuite/tests/bytecode/T24634/Makefile - testsuite/tests/bytecode/T25090/Makefile - testsuite/tests/driver/Makefile - testsuite/tests/driver/boot-target/Makefile - testsuite/tests/driver/fat-iface/Makefile - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/linters/Makefile - testsuite/tests/linters/regex-linters/check-cpp.py - testsuite/tests/linters/regex-linters/linter.py - testsuite/tests/perf/compiler/Makefile - testsuite/tests/simd/should_run/T25062_V64.hs - testsuite/tests/simd/should_run/all.T Changes: ===================================== compiler/GHC/Core/Make.hs ===================================== @@ -4,7 +4,7 @@ module GHC.Core.Make ( -- * Constructing normal syntax mkCoreLet, mkCoreLets, - mkCoreApp, mkCoreApps, mkCoreConApps, + mkCoreApp, mkCoreApps, mkCoreConApps, mkCoreConWrapApps, mkCoreLams, mkWildCase, mkIfThenElse, mkWildValBinder, mkSingleAltCase, @@ -70,7 +70,7 @@ import GHC.Core.Type import GHC.Core.Predicate ( isCoVarType ) import GHC.Core.TyCo.Compare ( eqType ) import GHC.Core.Coercion ( isCoVar ) -import GHC.Core.DataCon ( DataCon, dataConWorkId ) +import GHC.Core.DataCon ( DataCon, dataConWorkId, dataConWrapId ) import GHC.Core.Multiplicity import GHC.Builtin.Types @@ -133,6 +133,13 @@ mkCoreLets binds body = foldr mkCoreLet body binds mkCoreConApps :: DataCon -> [CoreExpr] -> CoreExpr mkCoreConApps con args = mkCoreApps (Var (dataConWorkId con)) args +-- | A variant of 'mkCoreConApps' constructs an expression which represents the +-- application of a number of expressions to that of a data constructor +-- expression using the wrapper, not the worker, of the data constructor. The +-- leftmost expression in the list is applied first +mkCoreConWrapApps :: DataCon -> [CoreExpr] -> CoreExpr +mkCoreConWrapApps con args = mkCoreApps (Var (dataConWrapId con)) args + -- | Construct an expression which represents the application of a number of -- expressions to another. The leftmost expression in the list is applied first mkCoreApps :: CoreExpr -- ^ function ===================================== compiler/GHC/Tc/Types/EvTerm.hs ===================================== @@ -45,7 +45,7 @@ evCallStack (EvCsPushCall fs loc tm) = do let platform = targetPlatform df m <- getModule srcLocDataCon <- lookupDataCon srcLocDataConName - let mkSrcLoc l = mkCoreConApps srcLocDataCon <$> + let mkSrcLoc l = mkCoreConWrapApps srcLocDataCon <$> sequence [ mkStringExprFS (unitFS $ moduleUnit m) , mkStringExprFS (moduleNameFS $ moduleName m) , mkStringExprFS (srcSpanFile l) ===================================== docs/users_guide/using-optimisation.rst ===================================== @@ -531,7 +531,8 @@ as such you shouldn't need to set any of them explicitly. A flag * Use of the magic `inline` function to force inlining. .. ghc-flag:: -fexpose-overloaded-unfoldings - :shortdesc: Expose unfoldings carrying constraints, even for very large or recursive functions. + :shortdesc: Expose function unfoldings whose type contains constraints, + even for very large or recursive functions. :type: dynamic :reverse: -fno-expose-overloaded-unfoldings :category: @@ -541,19 +542,24 @@ as such you shouldn't need to set any of them explicitly. A flag This experimental flag is a slightly less heavy weight alternative to :ghc-flag:`-fexpose-all-unfoldings`. - Instead of exposing all functions it only aims at exposing constrained functions. + Instead of exposing all functions it exposes only those functions which + contain constraints within their type. This is intended to be used for cases where specialization is considered crucial but :ghc-flag:`-fexpose-all-unfoldings` imposes too much compile time cost. - Currently this won't expose unfoldings where a type class is hidden under a - newtype. That is for cases like: :: + This doesn't guarantee *all* functions which might benefit from specialization + will be exposed, for example currently this won't expose unfoldings where a + type class is hidden under a newtype. + + That is for cases like: :: newtype NT a = NT (Integral a => a) foo :: NT a -> T1 -> TR - GHC won't recognise `foo` as specialisable and won't expose the unfolding + GHC won't look under `NT` for constraints and therefore `foo` won't be + recognized as specialisable and this flag won't expose the unfolding even with :ghc-flag:`-fexpose-overloaded-unfoldings` enabled. All the other caveats about :ghc-flag:`-fexpose-overloaded-unfoldings` ===================================== libraries/ghc-internal/src/GHC/Internal/Data/OldList.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables, +{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables, MagicHash, BangPatterns #-} ----------------------------------------------------------------------------- @@ -370,9 +370,6 @@ findIndex p = listToMaybe . findIndices p -- >>> findIndices (\l -> length l > 3) ["a", "bcde", "fgh", "ijklmnop"] -- [1,3] findIndices :: (a -> Bool) -> [a] -> [Int] -#if defined(USE_REPORT_PRELUDE) -findIndices p xs = [ i | (x,i) <- zip xs [0..], p x] -#else -- Efficient definition, adapted from Data.Sequence -- (Note that making this INLINABLE instead of INLINE allows -- 'findIndex' to fuse, fixing #15426.) @@ -381,7 +378,6 @@ findIndices p ls = build $ \c n -> let go x r k | p x = I# k `c` r (k +# 1#) | otherwise = r (k +# 1#) in foldr go (\_ -> n) ls 0# -#endif /* USE_REPORT_PRELUDE */ -- | \(\mathcal{O}(\min(m,n))\). The 'isPrefixOf' function takes two lists and -- returns 'True' iff the first list is a prefix of the second. @@ -540,10 +536,6 @@ nub = nubBy (==) -- >>> nubBy (>) [1, 2, 3, 2, 1, 5, 4, 5, 3, 2] -- [1,2,3,5,5] nubBy :: (a -> a -> Bool) -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -nubBy eq [] = [] -nubBy eq (x:xs) = x : nubBy eq (filter (\ y -> not (eq x y)) xs) -#else -- stolen from HBC nubBy eq l = nubBy' l [] where @@ -562,7 +554,6 @@ nubBy eq l = nubBy' l [] elem_by :: (a -> a -> Bool) -> a -> [a] -> Bool elem_by _ _ [] = False elem_by eq y (x:xs) = x `eq` y || elem_by eq y xs -#endif -- | \(\mathcal{O}(n)\). 'delete' @x@ removes the first occurrence of @x@ from @@ -1627,10 +1618,6 @@ sort :: (Ord a) => [a] -> [a] -- [(1,"Hello"),(2,"world"),(4,"!")] sortBy :: (a -> a -> Ordering) -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -sort = sortBy compare -sortBy cmp = foldr (insertBy cmp) [] -#else {- GHC's mergesort replaced by a better implementation, 24/12/2009. @@ -1840,8 +1827,6 @@ rqpart cmp x (y:ys) rle rgt r = _ -> rqpart cmp x ys (y:rle) rgt r -} -#endif /* USE_REPORT_PRELUDE */ - -- | Sort a list by comparing the results of a key function applied to each -- element. @'sortOn' f@ is equivalent to @'sortBy' ('comparing' f)@, but has the -- performance advantage of only evaluating @f@ once for each element in the @@ -2027,14 +2012,10 @@ lines s = cons (case break (== '\n') s of -- >>> unlines . lines $ "foo\nbar" -- "foo\nbar\n" unlines :: [String] -> String -#if defined(USE_REPORT_PRELUDE) -unlines = concatMap (++ "\n") -#else -- HBC version (stolen) -- here's a more efficient version unlines [] = [] unlines (l:ls) = l ++ '\n' : unlines ls -#endif -- | 'words' breaks a string up into a list of words, which were delimited -- by white space (as defined by 'isSpace'). This function trims any white spaces @@ -2085,10 +2066,6 @@ wordsFB c n = go -- >>> unwords ["foo", "bar", "", "baz"] -- "foo bar baz" unwords :: [String] -> String -#if defined(USE_REPORT_PRELUDE) -unwords [] = "" -unwords ws = foldr1 (\w s -> w ++ ' ':s) ws -#else -- Here's a lazier version that can get the last element of a -- _|_-terminated list. {-# NOINLINE [1] unwords #-} @@ -2118,7 +2095,6 @@ tailUnwords (_:xs) = xs {-# INLINE [0] unwordsFB #-} unwordsFB :: String -> String -> String unwordsFB w r = ' ' : w ++ r -#endif {- A "SnocBuilder" is a version of Chris Okasaki's banker's queue that supports toListSB instead of uncons. In single-threaded use, its performance ===================================== libraries/ghc-internal/src/GHC/Internal/List.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE Trustworthy #-} -{-# LANGUAGE CPP, NoImplicitPrelude, ScopedTypeVariables #-} +{-# LANGUAGE NoImplicitPrelude, ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-} @@ -208,11 +208,6 @@ tail [] = errorEmptyList "tail" -- >>> last [] -- *** Exception: Prelude.last: empty list last :: HasCallStack => [a] -> a -#if defined(USE_REPORT_PRELUDE) -last [x] = x -last (_:xs) = last xs -last [] = errorEmptyList "last" -#else -- Use foldl to make last a good consumer. -- This will compile to good code for the actual GHC.Internal.List.last. -- (At least as long it is eta-expanded, otherwise it does not, #10260.) @@ -222,7 +217,6 @@ last xs = foldl (\_ x -> x) lastError xs -- foldl. lastError :: HasCallStack => a lastError = errorEmptyList "last" -#endif -- | \(\mathcal{O}(n)\). Return all the elements of a list except the last one. -- The list must be non-empty. @@ -240,17 +234,11 @@ lastError = errorEmptyList "last" -- >>> init [] -- *** Exception: Prelude.init: empty list init :: HasCallStack => [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -init [x] = [] -init (x:xs) = x : init xs -init [] = errorEmptyList "init" -#else -- eliminate repeated cases init [] = errorEmptyList "init" init (x:xs) = init' x xs where init' _ [] = [] init' y (z:zs) = y : init' z zs -#endif -- | \(\mathcal{O}(1)\). Test whether a list is empty. -- @@ -1091,11 +1079,6 @@ dropWhile p xs@(x:xs') -- >>> take 0 [1,2] -- [] take :: Int -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -take n _ | n <= 0 = [] -take _ [] = [] -take n (x:xs) = x : take (n-1) xs -#else {- We always want to inline this to take advantage of a known length argument sign. Note, however, that it's important for the RULES to grab take, rather @@ -1141,7 +1124,6 @@ takeFB c n x xs = \ m -> case m of 1 -> x `c` n _ -> x `c` xs (m - 1) -#endif -- | 'drop' @n xs@ returns the suffix of @xs@ -- after the first @n@ elements, or @[]@ if @n >= 'length' xs at . @@ -1169,11 +1151,6 @@ takeFB c n x xs -- >>> drop 0 [1,2] -- [1,2] drop :: Int -> [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -drop n xs | n <= 0 = xs -drop _ [] = [] -drop n (_:xs) = drop (n-1) xs -#else /* hack away */ {-# INLINE drop #-} drop n ls | n <= 0 = ls @@ -1185,7 +1162,6 @@ drop n ls unsafeDrop !_ [] = [] unsafeDrop 1 (_:xs) = xs unsafeDrop m (_:xs) = unsafeDrop (m - 1) xs -#endif -- | 'splitAt' @n xs@ returns a tuple where first element is @xs@ prefix of -- length @n@ and second element is the remainder of the list: @@ -1231,9 +1207,6 @@ drop n ls -- ([],[1,2,3]) splitAt :: Int -> [a] -> ([a],[a]) -#if defined(USE_REPORT_PRELUDE) -splitAt n xs = (take n xs, drop n xs) -#else splitAt n ls | n <= 0 = ([], ls) | otherwise = splitAt' n ls @@ -1244,7 +1217,6 @@ splitAt n ls splitAt' m (x:xs) = (x:xs', xs'') where (xs', xs'') = splitAt' (m - 1) xs -#endif /* USE_REPORT_PRELUDE */ -- | 'span', applied to a predicate @p@ and a list @xs@, returns a tuple where -- first element is the longest prefix (possibly empty) of @xs@ of elements that @@ -1322,15 +1294,11 @@ span p xs@(x:xs') -- >>> break (> 9) [1,2,3] -- ([1,2,3],[]) break :: (a -> Bool) -> [a] -> ([a],[a]) -#if defined(USE_REPORT_PRELUDE) -break p = span (not . p) -#else -- HBC version (stolen) break _ xs@[] = (xs, xs) break p xs@(x:xs') | p x = ([],xs) | otherwise = let (ys,zs) = break p xs' in (x:ys,zs) -#endif -- | \(\mathcal{O}(n)\). 'reverse' @xs@ returns the elements of @xs@ in reverse order. -- @xs@ must be finite. @@ -1359,14 +1327,10 @@ break p xs@(x:xs') -- >>> reverse [1..] -- * Hangs forever * reverse :: [a] -> [a] -#if defined(USE_REPORT_PRELUDE) -reverse = foldl (flip (:)) [] -#else reverse l = rev l [] where rev [] a = a rev (x:xs) a = rev xs (x:a) -#endif -- | 'and' returns the conjunction of a Boolean list. For the result to be -- 'True', the list must be finite; 'False', however, results from a 'False' @@ -1392,9 +1356,6 @@ reverse l = rev l [] -- >>> and (repeat True) -- * Hangs forever * and :: [Bool] -> Bool -#if defined(USE_REPORT_PRELUDE) -and = foldr (&&) True -#else and [] = True and (x:xs) = x && and xs {-# NOINLINE [1] and #-} @@ -1403,7 +1364,6 @@ and (x:xs) = x && and xs "and/build" forall (g::forall b.(Bool->b->b)->b->b) . and (build g) = g (&&) True #-} -#endif -- | 'or' returns the disjunction of a Boolean list. For the result to be -- 'False', the list must be finite; 'True', however, results from a 'True' @@ -1429,9 +1389,6 @@ and (x:xs) = x && and xs -- >>> or (repeat False) -- * Hangs forever * or :: [Bool] -> Bool -#if defined(USE_REPORT_PRELUDE) -or = foldr (||) False -#else or [] = False or (x:xs) = x || or xs {-# NOINLINE [1] or #-} @@ -1440,7 +1397,6 @@ or (x:xs) = x || or xs "or/build" forall (g::forall b.(Bool->b->b)->b->b) . or (build g) = g (||) False #-} -#endif -- | Applied to a predicate and a list, 'any' determines if any element -- of the list satisfies the predicate. For the result to be @@ -1465,9 +1421,6 @@ or (x:xs) = x || or xs -- >>> any (> 3) [0, -1..] -- * Hangs forever * any :: (a -> Bool) -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -any p = or . map p -#else any _ [] = False any p (x:xs) = p x || any p xs @@ -1477,7 +1430,6 @@ any p (x:xs) = p x || any p xs "any/build" forall p (g::forall b.(a->b->b)->b->b) . any p (build g) = g ((||) . p) False #-} -#endif -- | Applied to a predicate and a list, 'all' determines if all elements -- of the list satisfy the predicate. For the result to be @@ -1502,9 +1454,6 @@ any p (x:xs) = p x || any p xs -- >>> all (> 3) [4..] -- * Hangs forever * all :: (a -> Bool) -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -all p = and . map p -#else all _ [] = True all p (x:xs) = p x && all p xs @@ -1514,7 +1463,6 @@ all p (x:xs) = p x && all p xs "all/build" forall p (g::forall b.(a->b->b)->b->b) . all p (build g) = g ((&&) . p) True #-} -#endif -- | 'elem' is the list membership predicate, usually written in infix form, -- e.g., @x \`elem\` xs at . For the result to be @@ -1538,9 +1486,6 @@ all p (x:xs) = p x && all p xs -- >>> 3 `elem` [4..] -- * Hangs forever * elem :: (Eq a) => a -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -elem x = any (== x) -#else elem _ [] = False elem x (y:ys) = x==y || elem x ys {-# NOINLINE [1] elem #-} @@ -1548,7 +1493,6 @@ elem x (y:ys) = x==y || elem x ys "elem/build" forall x (g :: forall b . (a -> b -> b) -> b -> b) . elem x (build g) = g (\ y r -> (x == y) || r) False #-} -#endif -- | 'notElem' is the negation of 'elem'. -- @@ -1569,9 +1513,6 @@ elem x (y:ys) = x==y || elem x ys -- >>> 3 `notElem` [4..] -- * Hangs forever * notElem :: (Eq a) => a -> [a] -> Bool -#if defined(USE_REPORT_PRELUDE) -notElem x = all (/= x) -#else notElem _ [] = True notElem x (y:ys)= x /= y && notElem x ys {-# NOINLINE [1] notElem #-} @@ -1579,7 +1520,6 @@ notElem x (y:ys)= x /= y && notElem x ys "notElem/build" forall x (g :: forall b . (a -> b -> b) -> b -> b) . notElem x (build g) = g (\ y r -> (x /= y) && r) True #-} -#endif -- | \(\mathcal{O}(n)\). 'lookup' @key assocs@ looks up a key in an association -- list. @@ -1619,7 +1559,7 @@ lookup key ((x,y):xys) -- >>> concatMap (\i -> [-i, i]) [1, 2, 3] -- [-1,1,-2,2,-3,3] -- --- >>> concatMap ('replicate' 3) [0, 2, 4] +-- >>> concatMap (replicate 3) [0, 2, 4] -- [0,0,0,2,2,2,4,4,4] concatMap :: (a -> [b]) -> [a] -> [b] concatMap f = foldr ((++) . f) [] @@ -1677,14 +1617,6 @@ concat = foldr (++) [] -- -- >>> ['a', 'b', 'c'] !! (-1) -- *** Exception: Prelude.!!: negative index -#if defined(USE_REPORT_PRELUDE) -(!!) :: [a] -> Int -> a -xs !! n | n < 0 = errorWithoutStackTrace "Prelude.!!: negative index" -[] !! _ = errorWithoutStackTrace "Prelude.!!: index too large" -(x:_) !! 0 = x -(_:xs) !! n = xs !! (n-1) --- Prelude version is without HasCallStack to avoid building linear one -#else (!!) :: HasCallStack => [a] -> Int -> a -- We don't really want the errors to inline with (!!). @@ -1703,7 +1635,6 @@ xs !! n | otherwise = foldr (\x r k -> case k of 0 -> x _ -> r (k-1)) tooLarge xs n -#endif -- | List index (subscript) operator, starting from 0. Returns 'Nothing' -- if the index is out of bounds ===================================== libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs ===================================== @@ -217,8 +217,8 @@ data SrcLoc = SrcLoc { srcLocPackage :: [Char] , srcLocModule :: [Char] , srcLocFile :: [Char] - , srcLocStartLine :: Int - , srcLocStartCol :: Int - , srcLocEndLine :: Int - , srcLocEndCol :: Int + , srcLocStartLine :: !Int + , srcLocStartCol :: !Int + , srcLocEndLine :: !Int + , srcLocEndCol :: !Int } deriving Eq -- ^ @since base-4.9.0.0 ===================================== rts/IOManager.c ===================================== @@ -364,7 +364,7 @@ void initIOManager(void) * TODO: rationalise this into one entry point, that internally * can do different things in the two cases. */ -#if defined (THREADED_RTS) +#if defined(THREADED_RTS) /* Win32 implementation in win32/ThrIOManager.c */ ioManagerStart(); ===================================== rts/Updates.h ===================================== @@ -9,8 +9,8 @@ #pragma once #if !defined(CMINUSMINUS) -#include "BeginPrivate.h" #include "RtsFlags.h" +#include "BeginPrivate.h" #endif ===================================== testsuite/tests/bytecode/T24634/Makefile ===================================== @@ -4,14 +4,14 @@ include $(TOP)/mk/test.mk # This case loads bytecode from the interface file written in the second invocation. T24634a: - $(TEST_HC) -c hello_c.c -o hello_c.o - $(TEST_HC) -c -fbyte-code-and-object-code -fno-omit-interface-pragmas Hello.hs - $(TEST_HC) -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Main.hs + '$(TEST_HC)' -c hello_c.c -o hello_c.o + '$(TEST_HC)' -c -fbyte-code-and-object-code -fno-omit-interface-pragmas Hello.hs + '$(TEST_HC)' -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Main.hs ./Main # This case uses the bytecode generated in 'runHscBackendPhase', not involving the interface, since 'Hello' is compiled # in the same invocation as 'Main'. T24634b: - $(TEST_HC) -c hello_c.c -o hello_c.o - $(TEST_HC) -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Hello.hs Main.hs + '$(TEST_HC)' -c hello_c.c -o hello_c.o + '$(TEST_HC)' -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Hello.hs Main.hs ./Main ===================================== testsuite/tests/bytecode/T25090/Makefile ===================================== @@ -4,18 +4,18 @@ include $(TOP)/mk/test.mk # Verify that the object files aren't linked by clobbering them. T25090a: - $(TEST_HC) -c -fbyte-code-and-object-code C.hs-boot - $(TEST_HC) -c -fbyte-code-and-object-code B.hs - $(TEST_HC) -c -fbyte-code-and-object-code C.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code C.hs-boot + '$(TEST_HC)' -c -fbyte-code-and-object-code B.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code C.hs echo 'corrupt' > B.o echo 'corrupt' > C.o echo 'corrupt' > C.o-boot - $(TEST_HC) -c -fbyte-code-and-object-code D.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code D.hs echo 'corrupt' > D.o - $(TEST_HC) -c -fbyte-code-and-object-code -fprefer-byte-code A.hs - $(TEST_HC) -fbyte-code-and-object-code -fprefer-byte-code A.o -o exe + '$(TEST_HC)' -c -fbyte-code-and-object-code -fprefer-byte-code A.hs + '$(TEST_HC)' -fbyte-code-and-object-code -fprefer-byte-code A.o -o exe ./exe T25090b: - $(TEST_HC) -fbyte-code-and-object-code -fprefer-byte-code A -o exe -v0 + '$(TEST_HC)' -fbyte-code-and-object-code -fprefer-byte-code A -o exe -v0 ./exe ===================================== testsuite/tests/driver/Makefile ===================================== @@ -788,7 +788,7 @@ T22044: .PHONY: T22669 T22669: - echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --interactive T22669 + echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) T22669 ! test -f T22669.o-boot ===================================== testsuite/tests/driver/boot-target/Makefile ===================================== @@ -1,8 +1,8 @@ boot1: - $(TEST_HC) -c A.hs-boot B.hs + '$(TEST_HC)' -c A.hs-boot B.hs boot2: - $(TEST_HC) A.hs-boot A.hs B.hs -v0 + '$(TEST_HC)' A.hs-boot A.hs B.hs -v0 boot3: - $(TEST_HC) A.hs-boot B.hs -v0 \ No newline at end of file + '$(TEST_HC)' A.hs-boot B.hs -v0 ===================================== testsuite/tests/driver/fat-iface/Makefile ===================================== @@ -55,5 +55,5 @@ T22807: clean T22807_ghci: clean "$(TEST_HC)" $(TEST_HC_OPTS) T22807_ghci.hs -fno-full-laziness -fhide-source-paths -fwrite-if-simplified-core -O2 -dynamic -v0 - "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --interactive -fhide-source-paths -fno-full-laziness < T22807_ghci.script + "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -fhide-source-paths -fno-full-laziness < T22807_ghci.script ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -234,7 +234,7 @@ module Control.Exception where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -308,7 +308,7 @@ module Control.Exception where module Control.Exception.Annotation where -- Safety: None type ExceptionAnnotation :: * -> Constraint - class ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => ExceptionAnnotation a where + class ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a => ExceptionAnnotation a where displayExceptionAnnotation :: a -> GHC.Internal.Base.String default displayExceptionAnnotation :: GHC.Internal.Show.Show a => a -> GHC.Internal.Base.String {-# MINIMAL #-} @@ -350,7 +350,7 @@ module Control.Exception.Base where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -855,11 +855,11 @@ module Data.Data where type TyCon :: * data TyCon = ... type TypeRep :: * - type TypeRep = ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + type TypeRep = ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} cast :: forall a b. (Typeable a, Typeable b) => a -> GHC.Internal.Maybe.Maybe b constrFields :: Constr -> [GHC.Internal.Base.String] constrFixity :: Constr -> Fixity @@ -902,7 +902,7 @@ module Data.Data where showConstr :: Constr -> GHC.Internal.Base.String showsTypeRep :: TypeRep -> GHC.Internal.Show.ShowS splitTyConApp :: TypeRep -> (TyCon, [TypeRep]) - trLiftedRep :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep + trLiftedRep :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConModule :: TyCon -> GHC.Internal.Base.String tyConName :: TyCon -> GHC.Internal.Base.String @@ -926,14 +926,14 @@ module Data.Dynamic where -- Safety: Safe type Dynamic :: * data Dynamic where - Dynamic :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a -> a -> Dynamic + Dynamic :: forall a. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a -> a -> Dynamic type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} dynApp :: Dynamic -> Dynamic -> Dynamic dynApply :: Dynamic -> Dynamic -> GHC.Internal.Maybe.Maybe Dynamic - dynTypeRep :: Dynamic -> ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + dynTypeRep :: Dynamic -> ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep fromDyn :: forall a. Typeable a => Dynamic -> a -> a fromDynamic :: forall a. Typeable a => Dynamic -> GHC.Internal.Maybe.Maybe a toDyn :: forall a. Typeable a => a -> Dynamic @@ -1820,11 +1820,11 @@ module Data.Typeable where type TyCon :: * data TyCon = ... type TypeRep :: * - type TypeRep = ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep + type TypeRep = ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} cast :: forall a b. (Typeable a, Typeable b) => a -> GHC.Internal.Maybe.Maybe b decT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => GHC.Internal.Data.Either.Either ((a :~: b) -> GHC.Internal.Base.Void) (a :~: b) eqT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => GHC.Internal.Maybe.Maybe (a :~: b) @@ -1839,7 +1839,7 @@ module Data.Typeable where rnfTypeRep :: TypeRep -> () showsTypeRep :: TypeRep -> GHC.Internal.Show.ShowS splitTyConApp :: TypeRep -> (TyCon, [TypeRep]) - trLiftedRep :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep + trLiftedRep :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep GHC.Types.LiftedRep tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConModule :: TyCon -> GHC.Internal.Base.String tyConName :: TyCon -> GHC.Internal.Base.String @@ -5260,7 +5260,7 @@ module GHC.Event where data EventManager = ... type FdKey :: * data FdKey - = ghc-internal-9.1001.0:GHC.Internal.Event.Manager.FdKey {keyFd :: ! {-# UNPACK #-}(GHC.Internal.System.Posix.Types.N:Fd + = ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey {keyFd :: ! {-# UNPACK #-}(GHC.Internal.System.Posix.Types.N:Fd ; GHC.Internal.Foreign.C.Types.N:CInt)GHC.Internal.System.Posix.Types.Fd, ...} type IOCallback :: * @@ -5293,9 +5293,9 @@ module GHC.Event.TimeOut where type TimeoutEdit :: * type TimeoutEdit = TimeoutQueue -> TimeoutQueue type TimeoutKey :: * - newtype TimeoutKey = TK ghc-internal-9.1100.0:GHC.Internal.Event.Unique.Unique + newtype TimeoutKey = TK ghc-internal-9.1300.0:GHC.Internal.Event.Unique.Unique type TimeoutQueue :: * - type TimeoutQueue = ghc-internal-9.1100.0:GHC.Internal.Event.PSQ.PSQ TimeoutCallback + type TimeoutQueue = ghc-internal-9.1300.0:GHC.Internal.Event.PSQ.PSQ TimeoutCallback module GHC.Exception where -- Safety: Safe @@ -5307,7 +5307,7 @@ module GHC.Exception where type ErrorCall :: * data ErrorCall = ErrorCallWithLocation GHC.Internal.Base.String GHC.Internal.Base.String type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -5316,7 +5316,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -5336,7 +5336,7 @@ module GHC.Exception.Type where type ArithException :: * data ArithException = Overflow | Underflow | LossOfPrecision | DivideByZero | Denormal | RatioZeroDenominator type Exception :: * -> Constraint - class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where + class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException fromException :: SomeException -> GHC.Internal.Maybe.Maybe e displayException :: e -> GHC.Internal.Base.String @@ -7889,8 +7889,8 @@ module GHC.IO.Handle where hTryLock :: Handle -> LockMode -> GHC.Types.IO GHC.Types.Bool hWaitForInput :: Handle -> GHC.Types.Int -> GHC.Types.IO GHC.Types.Bool isEOF :: GHC.Types.IO GHC.Types.Bool - mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle - mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle + mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle + mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> NewlineMode -> GHC.Types.IO Handle nativeNewline :: Newline nativeNewlineMode :: NewlineMode noNewlineTranslation :: NewlineMode @@ -7940,11 +7940,11 @@ module GHC.IO.Handle.Internals where ioe_notReadable :: forall a. GHC.Types.IO a ioe_notWritable :: forall a. GHC.Types.IO a ioe_semiclosedHandle :: forall a. GHC.Types.IO a - mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkDuplexHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkFileHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle - mkHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.Handle.Types.HandleType -> GHC.Types.Bool -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Internal.Maybe.Maybe HandleFinalizer -> GHC.Internal.Maybe.Maybe (GHC.Internal.MVar.MVar GHC.Internal.IO.Handle.Types.Handle__) -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkDuplexHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkDuplexHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkFileHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkFileHandleNoFinalizer :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.IOMode.IOMode -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle + mkHandle :: forall dev. (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => dev -> GHC.Internal.IO.FilePath -> GHC.Internal.IO.Handle.Types.HandleType -> GHC.Types.Bool -> GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.NewlineMode -> GHC.Internal.Maybe.Maybe HandleFinalizer -> GHC.Internal.Maybe.Maybe (GHC.Internal.MVar.MVar GHC.Internal.IO.Handle.Types.Handle__) -> GHC.Types.IO GHC.Internal.IO.Handle.Types.Handle openTextEncoding :: forall a. GHC.Internal.Maybe.Maybe GHC.Internal.IO.Encoding.Types.TextEncoding -> GHC.Internal.IO.Handle.Types.HandleType -> (forall es ds. GHC.Internal.Maybe.Maybe (GHC.Internal.IO.Encoding.Types.TextEncoder es) -> GHC.Internal.Maybe.Maybe (GHC.Internal.IO.Encoding.Types.TextDecoder ds) -> GHC.Types.IO a) -> GHC.Types.IO a readTextDevice :: GHC.Internal.IO.Handle.Types.Handle__ -> GHC.Internal.IO.Buffer.CharBuffer -> GHC.Types.IO GHC.Internal.IO.Buffer.CharBuffer readTextDeviceNonBlocking :: GHC.Internal.IO.Handle.Types.Handle__ -> GHC.Internal.IO.Buffer.CharBuffer -> GHC.Types.IO GHC.Internal.IO.Buffer.CharBuffer @@ -8008,7 +8008,7 @@ module GHC.IO.Handle.Types where type Handle__ :: * data Handle__ = forall dev enc_state dec_state. - (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => + (GHC.Internal.IO.Device.RawIO dev, GHC.Internal.IO.Device.IODevice dev, GHC.Internal.IO.BufferedIO.BufferedIO dev, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable dev) => Handle__ {haDevice :: !dev, haType :: HandleType, haByteBuffer :: ! {-# UNPACK #-}(GHC.Internal.IORef.N:IORef _N)(GHC.Internal.IORef.IORef (GHC.Internal.IO.Buffer.Buffer GHC.Internal.Word.Word8)), @@ -9350,7 +9350,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9411,7 +9411,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack @@ -9422,7 +9422,7 @@ module GHC.StaticPtr where -- Safety: None type IsStatic :: (* -> *) -> Constraint class IsStatic p where - fromStaticPtr :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => StaticPtr a -> p a + fromStaticPtr :: forall a. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a => StaticPtr a -> p a {-# MINIMAL fromStaticPtr #-} type StaticKey :: * type StaticKey = GHC.Internal.Fingerprint.Type.Fingerprint @@ -10819,8 +10819,8 @@ module Type.Reflection where data (:~~:) a b where HRefl :: forall {k1} (a :: k1). (:~~:) a a pattern App :: forall k2 (t :: k2). () => forall k1 (a :: k1 -> k2) (b :: k1). (t ~ a b) => TypeRep a -> TypeRep b -> TypeRep t - pattern Con :: forall k (a :: k). () => ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> TypeRep a - pattern Con' :: forall k (a :: k). () => ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> [SomeTypeRep] -> TypeRep a + pattern Con :: forall k (a :: k). () => ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> TypeRep a + pattern Con' :: forall k (a :: k). () => ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.NotApplication a => TyCon -> [SomeTypeRep] -> TypeRep a pattern Fun :: forall k (fun :: k). () => forall (r1 :: GHC.Types.RuntimeRep) (r2 :: GHC.Types.RuntimeRep) (arg :: TYPE r1) (res :: TYPE r2). (k ~ *, fun ~~ (arg -> res)) => TypeRep arg -> TypeRep res -> TypeRep fun type Module :: * data Module = ... @@ -10837,7 +10837,7 @@ module Type.Reflection where type Typeable :: forall k. k -> Constraint class Typeable a where ... - {-# MINIMAL ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} + {-# MINIMAL ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.typeRep# #-} decTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> GHC.Internal.Data.Either.Either ((a :~~: b) -> GHC.Internal.Base.Void) (a :~~: b) eqTypeRep :: forall k1 k2 (a :: k1) (b :: k2). TypeRep a -> TypeRep b -> GHC.Internal.Maybe.Maybe (a :~~: b) moduleName :: Module -> GHC.Internal.Base.String @@ -10872,9 +10872,9 @@ module Type.Reflection.Unsafe where data TypeRep a where ... mkTrApp :: forall k1 k2 (a :: k1 -> k2) (b :: k1). TypeRep a -> TypeRep b -> TypeRep (a b) - mkTrCon :: forall k (a :: k). TyCon -> [ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep] -> TypeRep a + mkTrCon :: forall k (a :: k). TyCon -> [ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep] -> TypeRep a mkTyCon :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> GHC.Internal.Base.String -> GHC.Types.Int -> KindRep -> TyCon - someTypeRepFingerprint :: ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -> GHC.Internal.Fingerprint.Type.Fingerprint + someTypeRepFingerprint :: ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -> GHC.Internal.Fingerprint.Type.Fingerprint tyConFingerprint :: TyCon -> GHC.Internal.Fingerprint.Type.Fingerprint tyConKindArgs :: TyCon -> GHC.Types.Int tyConKindRep :: TyCon -> KindRep @@ -11195,9 +11195,9 @@ instance forall a. GHC.Internal.Base.Monoid a => GHC.Internal.Base.Monoid (GHC.I instance forall a. (GHC.Classes.Ord a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Base.Monoid (Data.Semigroup.Max a) -- Defined in ‘Data.Semigroup’ instance forall a. (GHC.Classes.Ord a, GHC.Internal.Enum.Bounded a) => GHC.Internal.Base.Monoid (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’ instance forall m. GHC.Internal.Base.Monoid m => GHC.Internal.Base.Monoid (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Monoid ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Monoid ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Internal.Base.Monoid (f p), GHC.Internal.Base.Monoid (g p)) => GHC.Internal.Base.Monoid ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Internal.Base.Monoid (f (g p)) => GHC.Internal.Base.Monoid ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall a. (GHC.Internal.Generics.Generic a, GHC.Internal.Base.Monoid (GHC.Internal.Generics.Rep a ())) => GHC.Internal.Base.Monoid (GHC.Internal.Generics.Generically a) -- Defined in ‘GHC.Internal.Generics’ @@ -11253,9 +11253,9 @@ instance forall a. GHC.Internal.Base.Semigroup (Data.Semigroup.Last a) -- Define instance forall a. GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Data.Semigroup.Max a) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Classes.Ord a => GHC.Internal.Base.Semigroup (Data.Semigroup.Min a) -- Defined in ‘Data.Semigroup’ instance forall m. GHC.Internal.Base.Monoid m => GHC.Internal.Base.Semigroup (Data.Semigroup.WrappedMonoid m) -- Defined in ‘Data.Semigroup’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Base.Semigroup ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Base.Semigroup ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ instance forall k (f :: k -> *) (p :: k) (g :: k -> *). (GHC.Internal.Base.Semigroup (f p), GHC.Internal.Base.Semigroup (g p)) => GHC.Internal.Base.Semigroup ((GHC.Internal.Generics.:*:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall k2 k1 (f :: k2 -> *) (g :: k1 -> k2) (p :: k1). GHC.Internal.Base.Semigroup (f (g p)) => GHC.Internal.Base.Semigroup ((GHC.Internal.Generics.:.:) f g p) -- Defined in ‘GHC.Internal.Generics’ instance forall a. (GHC.Internal.Generics.Generic a, GHC.Internal.Base.Semigroup (GHC.Internal.Generics.Rep a ())) => GHC.Internal.Base.Semigroup (GHC.Internal.Generics.Generically a) -- Defined in ‘GHC.Internal.Generics’ @@ -11398,20 +11398,20 @@ instance GHC.Internal.Control.Monad.Zip.MonadZip GHC.Internal.Data.Semigroup.Int instance GHC.Internal.Control.Monad.Zip.MonadZip Solo -- Defined in ‘GHC.Internal.Control.Monad.Zip’ instance GHC.Internal.Control.Monad.Zip.MonadZip GHC.Internal.Data.Semigroup.Internal.Sum -- Defined in ‘GHC.Internal.Control.Monad.Zip’ instance GHC.Internal.Control.Monad.Zip.MonadZip Data.Complex.Complex -- Defined in ‘Data.Complex’ -instance forall (a :: * -> * -> *) b c. (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable c, GHC.Internal.Data.Data.Data (a b c)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’ -instance forall (m :: * -> *) a. (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable m, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (m a)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’ +instance forall (a :: * -> * -> *) b c. (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable c, GHC.Internal.Data.Data.Data (a b c)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedArrow a b c) -- Defined in ‘Control.Applicative’ +instance forall (m :: * -> *) a. (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable m, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, GHC.Internal.Data.Data.Data (m a)) => GHC.Internal.Data.Data.Data (Control.Applicative.WrappedMonad m a) -- Defined in ‘Control.Applicative’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Functor.ZipList.ZipList a) -- Defined in ‘GHC.Internal.Functor.ZipList’ instance GHC.Internal.Data.Data.Data Data.Array.Byte.ByteArray -- Defined in ‘Data.Array.Byte’ -instance forall s. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable s => GHC.Internal.Data.Data.Data (Data.Array.Byte.MutableByteArray s) -- Defined in ‘Data.Array.Byte’ +instance forall s. ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable s => GHC.Internal.Data.Data.Data (Data.Array.Byte.MutableByteArray s) -- Defined in ‘Data.Array.Byte’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Complex.Complex a) -- Defined in ‘Data.Complex’ -instance forall i j (a :: i) (b :: j). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable i, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable j, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b, a ~~ b) => GHC.Internal.Data.Data.Data (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Data’ +instance forall i j (a :: i) (b :: j). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable i, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable j, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b, a ~~ b) => GHC.Internal.Data.Data.Data (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Data.Semigroup.Internal.All -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Data.Semigroup.Internal.Any -- Defined in ‘GHC.Internal.Data.Data’ instance forall a b. (GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data b, GHC.Internal.Ix.Ix a) => GHC.Internal.Data.Data.Data (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Generics.Associativity -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Bool -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Char -- Defined in ‘GHC.Internal.Data.Data’ -instance forall k a (b :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable b) => GHC.Internal.Data.Data.Data (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Data’ +instance forall k a (b :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable b) => GHC.Internal.Data.Data.Data (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Data’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Generics.DecidedStrictness -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Types.Double -- Defined in ‘GHC.Internal.Data.Data’ @@ -11459,10 +11459,10 @@ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word32 -- Defined in ‘G instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word64 -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Word.Word8 -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Data.Data.Data GHC.Internal.Foreign.Ptr.WordPtr -- Defined in ‘GHC.Internal.Data.Data’ -instance forall k (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ -instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k2, GHC.Internal.Data.Data.Data (f (g a))) => GHC.Internal.Data.Data.Data (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ -instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’ -instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’ +instance forall k (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a) => GHC.Internal.Data.Data.Data (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ +instance forall k1 (f :: k1 -> *) k2 (g :: k2 -> k1) (a :: k2). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k1, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k2, GHC.Internal.Data.Data.Data (f (g a))) => GHC.Internal.Data.Data.Data (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ +instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Product.Product f g a) -- Defined in ‘Data.Functor.Product’ +instance [safe] forall k (f :: k -> *) (g :: k -> *) (a :: k). (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable a, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable f, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable g, ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable k, GHC.Internal.Data.Data.Data (f a), GHC.Internal.Data.Data.Data (g a)) => GHC.Internal.Data.Data.Data (Data.Functor.Sum.Sum f g a) -- Defined in ‘Data.Functor.Sum’ instance forall a b. (GHC.Internal.Data.Data.Data a, GHC.Internal.Data.Data.Data b) => GHC.Internal.Data.Data.Data (Data.Semigroup.Arg a b) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Semigroup.First a) -- Defined in ‘Data.Semigroup’ instance forall a. GHC.Internal.Data.Data.Data a => GHC.Internal.Data.Data.Data (Data.Semigroup.Last a) -- Defined in ‘Data.Semigroup’ @@ -11528,7 +11528,7 @@ instance GHC.Internal.Data.Type.Equality.TestEquality GHC.Internal.TypeLits.SCha instance GHC.Internal.Data.Type.Equality.TestEquality GHC.Internal.TypeLits.SSymbol -- Defined in ‘GHC.Internal.TypeLits’ instance forall k (a :: k). GHC.Internal.Data.Type.Equality.TestEquality ((GHC.Internal.Data.Type.Equality.:~:) a) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k1 k (a :: k1). GHC.Internal.Data.Type.Equality.TestEquality ((GHC.Internal.Data.Type.Equality.:~~:) a) -- Defined in ‘GHC.Internal.Data.Type.Equality’ -instance forall k. GHC.Internal.Data.Type.Equality.TestEquality ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k. GHC.Internal.Data.Type.Equality.TestEquality ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1). GHC.Internal.Data.Type.Equality.TestEquality f => GHC.Internal.Data.Type.Equality.TestEquality (Data.Functor.Compose.Compose f g) -- Defined in ‘Data.Functor.Compose’ instance forall a k (b :: k). GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Bits.And a) -- Defined in ‘GHC.Internal.Data.Bits’ @@ -11726,7 +11726,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Base.RecUpdError -- Defined in ‘GHC.Internal.Control.Exception.Base’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Base.TypeError -- Defined in ‘GHC.Internal.Control.Exception.Base’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ -instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common’ +instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance forall a k (b :: k). GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ @@ -12398,8 +12398,8 @@ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.DataRep -- Defined in ‘ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.DataType -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Internal.Show.Show GHC.Internal.Data.Data.Fixity -- Defined in ‘GHC.Internal.Data.Data’ instance forall k (s :: k). GHC.Internal.Show.Show (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Internal.Show.Show (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance GHC.Internal.Show.Show GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ instance forall a b. (GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). Data.Fixed.HasResolution a => GHC.Internal.Show.Show (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ @@ -12470,13 +12470,13 @@ instance GHC.Internal.Show.Show GHC.Internal.Foreign.C.Types.CWchar -- Defined i instance forall a. GHC.Internal.Show.Show (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) -- Defined in ‘GHC.Internal.Foreign.C.ConstPtr’ instance forall a b. (GHC.Internal.Ix.Ix a, GHC.Internal.Show.Show a, GHC.Internal.Show.Show b) => GHC.Internal.Show.Show (GHC.Internal.Arr.Array a b) -- Defined in ‘GHC.Internal.Arr’ instance GHC.Internal.Show.Show GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Timeout -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Timeout -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager’ instance GHC.Internal.Show.Show GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Fingerprint.Type’ instance GHC.Internal.Show.Show GHC.Types.Double -- Defined in ‘GHC.Internal.Float’ instance GHC.Internal.Show.Show GHC.Types.Float -- Defined in ‘GHC.Internal.Float’ @@ -12510,7 +12510,7 @@ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.Handle -- Defined i instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.HandleType -- Defined in ‘GHC.Internal.IO.Handle.Types’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.Newline -- Defined in ‘GHC.Internal.IO.Handle.Types’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.Types.NewlineMode -- Defined in ‘GHC.Internal.IO.Handle.Types’ -instance [safe] GHC.Internal.Show.Show ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common’ +instance [safe] GHC.Internal.Show.Show ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Show.Show GHC.Internal.IO.Handle.HandlePosn -- Defined in ‘GHC.Internal.IO.Handle’ instance GHC.Internal.Show.Show GHC.Internal.IO.IOMode.IOMode -- Defined in ‘GHC.Internal.IO.IOMode’ instance GHC.Internal.Show.Show GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ @@ -12607,8 +12607,8 @@ instance GHC.Classes.Eq GHC.Internal.Data.Data.ConstrRep -- Defined in ‘GHC.In instance GHC.Classes.Eq GHC.Internal.Data.Data.DataRep -- Defined in ‘GHC.Internal.Data.Data’ instance GHC.Classes.Eq GHC.Internal.Data.Data.Fixity -- Defined in ‘GHC.Internal.Data.Data’ instance forall k (s :: k). GHC.Classes.Eq (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Classes.Eq (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Classes.Eq (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall a b. (GHC.Classes.Eq a, GHC.Classes.Eq b) => GHC.Classes.Eq (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). GHC.Classes.Eq (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Classes.Eq (f (g a)) => GHC.Classes.Eq (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ @@ -12684,13 +12684,13 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Foreign.C.ConstPtr.ConstPtr a) - instance forall i e. (GHC.Internal.Ix.Ix i, GHC.Classes.Eq e) => GHC.Classes.Eq (GHC.Internal.Arr.Array i e) -- Defined in ‘GHC.Internal.Arr’ instance forall s i e. GHC.Classes.Eq (GHC.Internal.Arr.STArray s i e) -- Defined in ‘GHC.Internal.Arr’ instance GHC.Classes.Eq GHC.Internal.ByteOrder.ByteOrder -- Defined in ‘GHC.Internal.ByteOrder’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Internal.Types’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.Manager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Event -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.EventLifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types.Lifetime -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Internal.Types’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Manager.FdKey -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.Manager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.Manager’ instance GHC.Classes.Eq GHC.Internal.Event.TimeOut.TimeoutKey -- Defined in ‘GHC.Internal.Event.TimeOut’ -instance GHC.Classes.Eq ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Event.TimerManager’ +instance GHC.Classes.Eq ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager.State -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Event.TimerManager’ instance GHC.Classes.Eq GHC.Internal.Stack.Types.SrcLoc -- Defined in ‘GHC.Internal.Stack.Types’ instance GHC.Classes.Eq GHC.Internal.Exts.SpecConstrAnnotation -- Defined in ‘GHC.Internal.Exts’ instance GHC.Classes.Eq GHC.Internal.Fingerprint.Type.Fingerprint -- Defined in ‘GHC.Internal.Fingerprint.Type’ @@ -12786,8 +12786,8 @@ instance GHC.Classes.Ord GHC.Internal.Unicode.GeneralCategory -- Defined in ‘G instance forall k (a :: k) (b :: k). GHC.Classes.Ord (a GHC.Internal.Data.Type.Equality.:~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k1 k2 (a :: k1) (b :: k2). GHC.Classes.Ord (a GHC.Internal.Data.Type.Equality.:~~: b) -- Defined in ‘GHC.Internal.Data.Type.Equality’ instance forall k (s :: k). GHC.Classes.Ord (GHC.Internal.Data.Proxy.Proxy s) -- Defined in ‘GHC.Internal.Data.Proxy’ -instance GHC.Classes.Ord ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ -instance forall k (a :: k). GHC.Classes.Ord (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal’ +instance GHC.Classes.Ord ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.SomeTypeRep -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ +instance forall k (a :: k). GHC.Classes.Ord (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.TypeRep a) -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal’ instance forall a b. (GHC.Classes.Ord a, GHC.Classes.Ord b) => GHC.Classes.Ord (GHC.Internal.Data.Either.Either a b) -- Defined in ‘GHC.Internal.Data.Either’ instance forall k (a :: k). GHC.Classes.Ord (Data.Fixed.Fixed a) -- Defined in ‘Data.Fixed’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Classes.Ord (f (g a)) => GHC.Classes.Ord (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -5285,7 +5285,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -12392,7 +12392,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -12453,7 +12453,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -5462,7 +5462,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -9574,7 +9574,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9635,7 +9635,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -5316,7 +5316,7 @@ module GHC.Exception where type SomeException :: * data SomeException = forall e. (Exception e, GHC.Internal.Exception.Type.HasExceptionContext) => SomeException e type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} divZeroException :: SomeException errorCallException :: GHC.Internal.Base.String -> SomeException errorCallWithCallStackException :: GHC.Internal.Base.String -> CallStack -> SomeException @@ -9350,7 +9350,7 @@ module GHC.Stack where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} callStack :: HasCallStack => CallStack ccLabel :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString ccModule :: GHC.Internal.Ptr.Ptr CostCentre -> GHC.Types.IO GHC.Internal.Foreign.C.String.Encoding.CString @@ -9411,7 +9411,7 @@ module GHC.Stack.Types where type HasCallStack :: Constraint type HasCallStack = ?callStack::CallStack :: Constraint type SrcLoc :: * - data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int} + data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: {-# UNPACK #-}GHC.Types.Int, srcLocStartCol :: {-# UNPACK #-}GHC.Types.Int, srcLocEndLine :: {-# UNPACK #-}GHC.Types.Int, srcLocEndCol :: {-# UNPACK #-}GHC.Types.Int} emptyCallStack :: CallStack freezeCallStack :: CallStack -> CallStack fromCallSiteList :: [([GHC.Types.Char], SrcLoc)] -> CallStack ===================================== testsuite/tests/linters/Makefile ===================================== @@ -12,16 +12,16 @@ uniques: python3 checkUniques/check-uniques.py $(TOP)/.. makefiles: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-makefiles.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-makefiles.py tracked) version-number: regex-linters/check-version-number.sh ${TOP}/.. cpp: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-cpp.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-cpp.py tracked) rts-includes: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-rts-includes.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-rts-includes.py tracked) changelogs: regex-linters/check-changelogs.sh $(TOP)/.. ===================================== testsuite/tests/linters/regex-linters/check-cpp.py ===================================== @@ -13,12 +13,12 @@ linters = [ message='CPP macros should not have a space between the macro name and their argument list'), RegexpLinter(r'ASSERT2\s+\(', message='CPP macros should not have a space between the macro name and their argument list'), - RegexpLinter(r'#ifdef\s+', - message='`#if defined(x)` is preferred to `#ifdef x`'), + # RegexpLinter(r'#ifdef\s+', + # message='`#if defined(x)` is preferred to `#ifdef x`'), RegexpLinter(r'#if\s+defined\s+', message='`#if defined(x)` is preferred to `#if defined x`'), - RegexpLinter(r'#ifndef\s+', - message='`#if !defined(x)` is preferred to `#ifndef x`'), + # RegexpLinter(r'#ifndef\s+', + # message='`#if !defined(x)` is preferred to `#ifndef x`'), ] for l in linters: @@ -29,12 +29,6 @@ for l in linters: l.add_path_filter(lambda path: not path.name == 'config.guess') # Don't lint files from external xxhash projects l.add_path_filter(lambda path: path != Path('rts', 'xxhash.h')), - # Don't lint font files - l.add_path_filter(lambda path: not path.parent == Path('docs','users_guide', - 'rtd-theme', 'static', 'fonts')) - # Don't lint image files - l.add_path_filter(lambda path: not path.parent == Path('docs','users_guide', - 'images')) # Don't lint core spec l.add_path_filter(lambda path: not path.name == 'core-spec.pdf') # Don't lint the linter itself ===================================== testsuite/tests/linters/regex-linters/linter.py ===================================== @@ -40,6 +40,8 @@ def get_changed_files(base_commit: str, head_commit: str, def get_tracked_files(subdir: str = '.'): """ Get the files tracked by git in the given subdirectory. """ + if not Path(subdir).exists(): + raise Exception("Regex linter executed with nonexistent target directory '{}'".format(subdir)) cmd = ['git', 'ls-tree', '--name-only', '-r', 'HEAD', subdir] files = subprocess.check_output(cmd) return files.decode('UTF-8').split('\n') @@ -77,9 +79,16 @@ class LineLinter(Linter): """ def lint(self, path: Path): if path.is_file(): - with path.open('r') as f: - for line_no, line in enumerate(f): - self.lint_line(path, line_no+1, line) + try: + with path.open('r') as f: + for line_no, line in enumerate(f): + self.lint_line(path, line_no+1, line) + # We don't want to explicitly exclude every single binary file in the test suite + except UnicodeDecodeError as e: + pass + except Exception as e: + print('Exception occurred while linting file: {}'.format(path)) + raise e def lint_line(self, path: Path, line_no: int, line: str): raise NotImplementedError @@ -124,7 +133,7 @@ def run_linters(linters: Sequence[Linter], linted_files = args.get_linted_files(args) for path in linted_files: - if path.startswith('linters'): + if path.startswith('testsuite/tests/linters'): continue for linter in linters: linter.do_lint(Path(path)) ===================================== testsuite/tests/perf/compiler/Makefile ===================================== @@ -21,7 +21,7 @@ MultiModulesRecomp: # containing core expressions, aka `mi_extra_decls` are populated. MultiModulesRecompDefsWithCore: ./genMultiLayerModulesCore - '$(TEST_HC)' --interactive $(TEST_HC_OPTS) -e "" -fwrite-if-simplified-core MultiLayerModules + '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -e "" -fwrite-if-simplified-core MultiLayerModules MultiModulesDefsWithCore: ./genMultiLayerModulesCore ===================================== testsuite/tests/simd/should_run/T25062_V64.hs ===================================== @@ -10,7 +10,7 @@ main = case foo ( \ x y -> plusDoubleX8# x y ) of v -> case unpackDoubleX8# v of (# d1, d2, d3, d4, d5, d6, d7, d8 #) -> - print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8s ] + print [ D# d1, D# d2, D# d3, D# d4, D# d5, D# d6, D# d7, D# d8 ] {-# NOINLINE foo #-} foo :: ( DoubleX8# -> DoubleX8# -> DoubleX8# ) -> DoubleX8# ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -58,13 +58,26 @@ test('simd014', test('T22187', [],compile,['']) test('T22187_run', [],compile_and_run,['']) test('T25062_V16', [], compile_and_run, ['']) -test('T25062_V32', [ unless(have_cpu_feature('avx2'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 256 bit wide vectors - ] - , compile_and_run, ['']) -test('T25062_V64', [ unless(have_cpu_feature('avx512f'), skip) - , only_ways(llvm_ways) # SIMD NCG TODO: support 512 bit wide vectors - ] - , compile_and_run, ['']) + +# Even if the CPU we run on doesn't support *executing* those tests we should try to +# compile them. +# Currently even for compilation we only support 256+ bit on x86 +only_V32_plus_compilation_support = unless(arch('x86_64'), skip) + +test('T25062_V32' + , [ extra_hc_opts('-mavx2') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx2') else compile + , ['']) + +test('T25062_V64' + , [ extra_hc_opts('-mavx512f') + , only_ways(llvm_ways) # SIMD NCG TODO: support 256+ bit wide vectors + , only_V32_plus_compilation_support + ] + , compile_and_run if have_cpu_feature('avx512f') else compile + , ['']) test('T25169', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f8b0cd3ed18532e6a2a96aeba113a97794cd2666...1b0800955cea97c9f929bbfe22b212624d8b0120 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f8b0cd3ed18532e6a2a96aeba113a97794cd2666...1b0800955cea97c9f929bbfe22b212624d8b0120 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 14:42:30 2024 From: gitlab at gitlab.haskell.org (Apoorv Ingle (@ani)) Date: Mon, 04 Nov 2024 09:42:30 -0500 Subject: [Git][ghc/ghc][wip/spj-apporv-Oct24] addThingCtxt in tcXExpr Message-ID: <6728dd5637662_de58c33e154252cc@gitlab.mail> Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: 9395bd29 by Apoorv Ingle at 2024-11-04T08:42:08-06:00 addThingCtxt in tcXExpr - - - - - 5 changed files: - compiler/GHC/Hs/Expr.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Do.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Head.hs Changes: ===================================== compiler/GHC/Hs/Expr.hs ===================================== @@ -898,7 +898,7 @@ instance Outputable HsThingRn where OrigExpr x -> ppr_builder ":" x OrigStmt x _ -> ppr_builder ":" x OrigPat x _ -> ifPprDebug (braces (text ":" <+> parens (ppr x))) (ppr x) - where ppr_builder prefix x = ifPprDebug (braces (text prefix <+> parens (ppr x))) (ppr x) + where ppr_builder prefix x = ifPprDebug (braces (text prefix <+> parens (ppr x))) instance Outputable XXExprGhcRn where ppr (ExpandedThingRn o e) = ifPprDebug (braces $ vcat [ppr o, text ";;" , ppr e]) (ppr o) ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -402,14 +402,14 @@ tcApp rn_expr exp_res_ty -- Step 2: Infer the type of `fun`, the head of the application ; (tc_fun, fun_sigma) <- tcInferAppHead fun ; let tc_head = (tc_fun, fun_ctxt) - + ; traceTc "tcApp 1" (ppr rn_fun) -- Step 3: Instantiate the function type (taking a quick look at args) ; do_ql <- wantQuickLook rn_fun ; (inst_args, app_res_rho) <- setQLInstLevel do_ql $ -- See (TCAPP1) and (TCAPP2) in -- Note [tcApp: typechecking applications] tcInstFun do_ql True tc_head fun_sigma rn_args - + ; traceTc "tcApp 2" (ppr rn_fun) ; case do_ql of NoQL -> do { traceTc "tcApp:NoQL" (ppr rn_fun $$ ppr app_res_rho) @@ -417,6 +417,7 @@ tcApp rn_expr exp_res_ty -- See Note [Unify with expected type before typechecking arguments] ; res_wrap <- checkResultTy rn_expr tc_head inst_args app_res_rho exp_res_ty + ; traceTc "tcApp valArgs" (ppr inst_args) -- Step 4.2: typecheck the arguments ; tc_args <- tcValArgs NoQL inst_args -- Step 4.3: wrap up @@ -538,12 +539,7 @@ tcValArg do_ql (EValArg { ea_ctxt = ctxt , ea_arg = larg@(L arg_loc arg) , ea_arg_ty = sc_arg_ty }) = addArgCtxt ctxt larg $ - do { traceTc "tcValArg" $ - vcat [ ppr ctxt - , text "arg type:" <+> ppr sc_arg_ty - , text "arg:" <+> ppr larg ] - - -- Crucial step: expose QL results before checking exp_arg_ty + do { -- Crucial step: expose QL results before checking exp_arg_ty -- So far as the paper is concerned, this step applies -- the poly-substitution Theta, learned by QL, so that we -- "see" the polymorphism in that argument type. E.g. @@ -552,14 +548,21 @@ tcValArg do_ql (EValArg { ea_ctxt = ctxt -- Then Theta = [p :-> forall a. a->a], and we want -- to check 'e' with expected type (forall a. a->a) -- See Note [Instantiation variables are short lived] - ; Scaled mult exp_arg_ty <- case do_ql of + Scaled mult exp_arg_ty <- case do_ql of DoQL -> liftZonkM $ zonkScaledTcType sc_arg_ty NoQL -> return sc_arg_ty + ; traceTc "tcValArg {" $ + vcat [ text "ctxt:" <+> ppr ctxt + , text "sigma_type" <+> ppr (mkCheckExpType exp_arg_ty) + , text "arg:" <+> ppr larg + ] + -- Now check the argument ; arg' <- tcScalingUsage mult $ tcPolyExpr arg (mkCheckExpType exp_arg_ty) - + ; traceTc "tcValArg" $ vcat [ ppr arg' + , text "}" ] ; return (EValArg { ea_ctxt = ctxt , ea_arg = L arg_loc arg' , ea_arg_ty = noExtField }) } @@ -897,6 +900,9 @@ addArgCtxt :: AppCtxt -> LHsExpr GhcRn -- whether the piece of code is a `do`-expanded code or some other expanded code. addArgCtxt ctxt (L arg_loc arg) thing_inside = do { in_generated_code <- inGeneratedCode + ; traceTc "addArgCtxt" (vcat [ text "generated:" <+> ppr in_generated_code + , text "arg: " <+> ppr arg + , text "arg_loc" <+> ppr arg_loc]) ; case ctxt of VACall fun arg_no _ | not in_generated_code -> do setSrcSpanA arg_loc $ ===================================== compiler/GHC/Tc/Gen/Do.hs ===================================== @@ -93,7 +93,7 @@ expand_do_stmts doFlavour (stmt@(L _loc (LetStmt _ bs)) : lstmts) = -- See Note [Expanding HsDo with XXExprGhcRn] Equation (3) below -- stmts ~~> stmts' -- ------------------------------------------------ --- let x = e ; stmts ~~> let x = e in stmts' +-- let x = e ; stmts ~~> let x = e in stmts'xo do expand_stmts <- expand_do_stmts doFlavour lstmts let expansion = genHsLet bs (genPopErrCtxtExpr expand_stmts) return $ mkExpandedStmtAt stmt doFlavour expansion @@ -575,5 +575,5 @@ mkExpandedStmtAt -> HsDoFlavour -- ^ the flavour of the statement -> HsExpr GhcRn -- ^ expanded expression -> LHsExpr GhcRn -- ^ suitably wrapped located 'XXExprGhcRn' -mkExpandedStmtAt oStmt@(L loc _) flav eExpr - = L loc $ mkExpandedStmt oStmt flav eExpr +mkExpandedStmtAt oStmt flav eExpr + = wrapGenSpan $ mkExpandedStmt oStmt flav eExpr ===================================== compiler/GHC/Tc/Gen/Expr.hs ===================================== @@ -713,6 +713,10 @@ tcXExpr (PopErrCtxt (L loc e)) res_ty = popErrCtxt $ -- See Part 3 of Note [Expanding HsDo with XXExprGhcRn] in `GHC.Tc.Gen.Do` setSrcSpanA loc $ tcExpr e res_ty + +tcXExpr (ExpandedThingRn o e) res_ty + = addThingCtxt o $ + tcExpr e res_ty {- tcXExpr xe@(ExpandedThingRn o e') res_ty | OrigStmt ls@(L loc s) flav <- o @@ -734,8 +738,10 @@ tcXExpr xe@(ExpandedThingRn o e') res_ty = setSrcSpanA loc $ mkExpandedStmtTc ls flav <$> tcApp (XExpr xe) res_ty -} +-- For record selection tcXExpr xe res_ty = tcApp (XExpr xe) res_ty + {- ************************************************************************ * * ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -28,7 +28,7 @@ module GHC.Tc.Gen.Head , nonBidirectionalErr , pprArgInst - , addHeadCtxt, addExprCtxt, addStmtCtxt, addFunResCtxt ) where + , addHeadCtxt, addThingCtxt, addExprCtxt, addStmtCtxt, addFunResCtxt ) where import {-# SOURCE #-} GHC.Tc.Gen.Expr( tcExpr, tcCheckPolyExprNC, tcPolyLExprSig ) import {-# SOURCE #-} GHC.Tc.Gen.Splice( getUntypedSpliceBody ) @@ -1254,6 +1254,11 @@ mis-match in the number of value arguments. * * ********************************************************************* -} +addThingCtxt :: HsThingRn -> TcRn a -> TcRn a +addThingCtxt (OrigExpr e) thing_inside = addExprCtxt e thing_inside +addThingCtxt (OrigStmt (L loc stmt) flav) thing_inside = setSrcSpanA loc $ addStmtCtxt stmt flav $ setInGeneratedCode $ thing_inside +addThingCtxt _ thing_inside = thing_inside + addStmtCtxt :: ExprStmt GhcRn -> HsDoFlavour -> TcRn a -> TcRn a addStmtCtxt stmt flav thing_inside = do let err_doc = pprStmtInCtxt (HsDoStmt flav) stmt @@ -1269,7 +1274,7 @@ addExprCtxt :: HsExpr GhcRn -> TcRn a -> TcRn a addExprCtxt e thing_inside = case e of HsUnboundVar {} -> thing_inside - XExpr (PopErrCtxt (L _ e)) -> addExprCtxt e $ thing_inside + XExpr (PopErrCtxt (L loc e)) -> setSrcSpanA loc $ addExprCtxt e $ thing_inside XExpr (ExpandedThingRn (OrigStmt stmt flav) _) -> addStmtCtxt (unLoc stmt) flav thing_inside _ -> addErrCtxt (exprCtxt e) thing_inside -- The HsUnboundVar special case addresses situations like View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9395bd297bc71a8ffc8e912536d12674b18c92c5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9395bd297bc71a8ffc8e912536d12674b18c92c5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 14:45:24 2024 From: gitlab at gitlab.haskell.org (Apoorv Ingle (@ani)) Date: Mon, 04 Nov 2024 09:45:24 -0500 Subject: [Git][ghc/ghc][wip/spj-apporv-Oct24] addThingCtxt in tcXExpr Message-ID: <6728de04d3b8b_de58c34d424267cb@gitlab.mail> Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: 46961512 by Apoorv Ingle at 2024-11-04T08:44:58-06:00 addThingCtxt in tcXExpr - - - - - 5 changed files: - compiler/GHC/Hs/Expr.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Do.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Head.hs Changes: ===================================== compiler/GHC/Hs/Expr.hs ===================================== @@ -897,7 +897,7 @@ instance Outputable HsThingRn where = case thing of OrigExpr x -> ppr_builder ":" x OrigStmt x _ -> ppr_builder ":" x - OrigPat x _ -> ifPprDebug (braces (text ":" <+> parens (ppr x))) (ppr x) + OrigPat x _ -> ppr_builder ":" x where ppr_builder prefix x = ifPprDebug (braces (text prefix <+> parens (ppr x))) (ppr x) instance Outputable XXExprGhcRn where ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -402,14 +402,14 @@ tcApp rn_expr exp_res_ty -- Step 2: Infer the type of `fun`, the head of the application ; (tc_fun, fun_sigma) <- tcInferAppHead fun ; let tc_head = (tc_fun, fun_ctxt) - + ; traceTc "tcApp 1" (ppr rn_fun) -- Step 3: Instantiate the function type (taking a quick look at args) ; do_ql <- wantQuickLook rn_fun ; (inst_args, app_res_rho) <- setQLInstLevel do_ql $ -- See (TCAPP1) and (TCAPP2) in -- Note [tcApp: typechecking applications] tcInstFun do_ql True tc_head fun_sigma rn_args - + ; traceTc "tcApp 2" (ppr rn_fun) ; case do_ql of NoQL -> do { traceTc "tcApp:NoQL" (ppr rn_fun $$ ppr app_res_rho) @@ -417,6 +417,7 @@ tcApp rn_expr exp_res_ty -- See Note [Unify with expected type before typechecking arguments] ; res_wrap <- checkResultTy rn_expr tc_head inst_args app_res_rho exp_res_ty + ; traceTc "tcApp valArgs" (ppr inst_args) -- Step 4.2: typecheck the arguments ; tc_args <- tcValArgs NoQL inst_args -- Step 4.3: wrap up @@ -538,12 +539,7 @@ tcValArg do_ql (EValArg { ea_ctxt = ctxt , ea_arg = larg@(L arg_loc arg) , ea_arg_ty = sc_arg_ty }) = addArgCtxt ctxt larg $ - do { traceTc "tcValArg" $ - vcat [ ppr ctxt - , text "arg type:" <+> ppr sc_arg_ty - , text "arg:" <+> ppr larg ] - - -- Crucial step: expose QL results before checking exp_arg_ty + do { -- Crucial step: expose QL results before checking exp_arg_ty -- So far as the paper is concerned, this step applies -- the poly-substitution Theta, learned by QL, so that we -- "see" the polymorphism in that argument type. E.g. @@ -552,14 +548,21 @@ tcValArg do_ql (EValArg { ea_ctxt = ctxt -- Then Theta = [p :-> forall a. a->a], and we want -- to check 'e' with expected type (forall a. a->a) -- See Note [Instantiation variables are short lived] - ; Scaled mult exp_arg_ty <- case do_ql of + Scaled mult exp_arg_ty <- case do_ql of DoQL -> liftZonkM $ zonkScaledTcType sc_arg_ty NoQL -> return sc_arg_ty + ; traceTc "tcValArg {" $ + vcat [ text "ctxt:" <+> ppr ctxt + , text "sigma_type" <+> ppr (mkCheckExpType exp_arg_ty) + , text "arg:" <+> ppr larg + ] + -- Now check the argument ; arg' <- tcScalingUsage mult $ tcPolyExpr arg (mkCheckExpType exp_arg_ty) - + ; traceTc "tcValArg" $ vcat [ ppr arg' + , text "}" ] ; return (EValArg { ea_ctxt = ctxt , ea_arg = L arg_loc arg' , ea_arg_ty = noExtField }) } @@ -897,6 +900,9 @@ addArgCtxt :: AppCtxt -> LHsExpr GhcRn -- whether the piece of code is a `do`-expanded code or some other expanded code. addArgCtxt ctxt (L arg_loc arg) thing_inside = do { in_generated_code <- inGeneratedCode + ; traceTc "addArgCtxt" (vcat [ text "generated:" <+> ppr in_generated_code + , text "arg: " <+> ppr arg + , text "arg_loc" <+> ppr arg_loc]) ; case ctxt of VACall fun arg_no _ | not in_generated_code -> do setSrcSpanA arg_loc $ ===================================== compiler/GHC/Tc/Gen/Do.hs ===================================== @@ -93,7 +93,7 @@ expand_do_stmts doFlavour (stmt@(L _loc (LetStmt _ bs)) : lstmts) = -- See Note [Expanding HsDo with XXExprGhcRn] Equation (3) below -- stmts ~~> stmts' -- ------------------------------------------------ --- let x = e ; stmts ~~> let x = e in stmts' +-- let x = e ; stmts ~~> let x = e in stmts'xo do expand_stmts <- expand_do_stmts doFlavour lstmts let expansion = genHsLet bs (genPopErrCtxtExpr expand_stmts) return $ mkExpandedStmtAt stmt doFlavour expansion @@ -575,5 +575,5 @@ mkExpandedStmtAt -> HsDoFlavour -- ^ the flavour of the statement -> HsExpr GhcRn -- ^ expanded expression -> LHsExpr GhcRn -- ^ suitably wrapped located 'XXExprGhcRn' -mkExpandedStmtAt oStmt@(L loc _) flav eExpr - = L loc $ mkExpandedStmt oStmt flav eExpr +mkExpandedStmtAt oStmt flav eExpr + = wrapGenSpan $ mkExpandedStmt oStmt flav eExpr ===================================== compiler/GHC/Tc/Gen/Expr.hs ===================================== @@ -713,6 +713,10 @@ tcXExpr (PopErrCtxt (L loc e)) res_ty = popErrCtxt $ -- See Part 3 of Note [Expanding HsDo with XXExprGhcRn] in `GHC.Tc.Gen.Do` setSrcSpanA loc $ tcExpr e res_ty + +tcXExpr (ExpandedThingRn o e) res_ty + = addThingCtxt o $ + tcExpr e res_ty {- tcXExpr xe@(ExpandedThingRn o e') res_ty | OrigStmt ls@(L loc s) flav <- o @@ -734,8 +738,10 @@ tcXExpr xe@(ExpandedThingRn o e') res_ty = setSrcSpanA loc $ mkExpandedStmtTc ls flav <$> tcApp (XExpr xe) res_ty -} +-- For record selection tcXExpr xe res_ty = tcApp (XExpr xe) res_ty + {- ************************************************************************ * * ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -28,7 +28,7 @@ module GHC.Tc.Gen.Head , nonBidirectionalErr , pprArgInst - , addHeadCtxt, addExprCtxt, addStmtCtxt, addFunResCtxt ) where + , addHeadCtxt, addThingCtxt, addExprCtxt, addStmtCtxt, addFunResCtxt ) where import {-# SOURCE #-} GHC.Tc.Gen.Expr( tcExpr, tcCheckPolyExprNC, tcPolyLExprSig ) import {-# SOURCE #-} GHC.Tc.Gen.Splice( getUntypedSpliceBody ) @@ -1254,6 +1254,11 @@ mis-match in the number of value arguments. * * ********************************************************************* -} +addThingCtxt :: HsThingRn -> TcRn a -> TcRn a +addThingCtxt (OrigExpr e) thing_inside = addExprCtxt e thing_inside +addThingCtxt (OrigStmt (L loc stmt) flav) thing_inside = setSrcSpanA loc $ addStmtCtxt stmt flav $ setInGeneratedCode $ thing_inside +addThingCtxt _ thing_inside = thing_inside + addStmtCtxt :: ExprStmt GhcRn -> HsDoFlavour -> TcRn a -> TcRn a addStmtCtxt stmt flav thing_inside = do let err_doc = pprStmtInCtxt (HsDoStmt flav) stmt @@ -1269,7 +1274,7 @@ addExprCtxt :: HsExpr GhcRn -> TcRn a -> TcRn a addExprCtxt e thing_inside = case e of HsUnboundVar {} -> thing_inside - XExpr (PopErrCtxt (L _ e)) -> addExprCtxt e $ thing_inside + XExpr (PopErrCtxt (L loc e)) -> setSrcSpanA loc $ addExprCtxt e $ thing_inside XExpr (ExpandedThingRn (OrigStmt stmt flav) _) -> addStmtCtxt (unLoc stmt) flav thing_inside _ -> addErrCtxt (exprCtxt e) thing_inside -- The HsUnboundVar special case addresses situations like View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/46961512517bc79b904a30cd0a8c9e6c40ecb4a9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/46961512517bc79b904a30cd0a8c9e6c40ecb4a9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 15:30:26 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Mon, 04 Nov 2024 10:30:26 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 4 commits: Improve performance of deriving Show Message-ID: <6728e8929acb0_de58c837944293b5@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: 2fefec65 by Rodrigo Mesquita at 2024-11-04T15:30:13+00:00 Improve performance of deriving Show Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: T12707 T3294 ------------------------ - - - - - f247568f by Rodrigo Mesquita at 2024-11-04T15:30:13+00:00 Deriving Ord: compare and <= only Since the implementation of CLC proposal #24, the default implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`. This means we no longer need to generate implementations for these methods when stock deriving `Ord`. Rather, just derive the implementation of `compare` and `<=`, and rely on the default implementations for the others. - - - - - 295562ad by Rodrigo Mesquita at 2024-11-04T15:30:13+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - bb5a5e89 by Rodrigo Mesquita at 2024-11-04T15:30:14+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 10 changed files: - compiler/GHC/Hs/Utils.hs - compiler/GHC/Tc/Deriv/Functor.hs - compiler/GHC/Tc/Deriv/Generate.hs - testsuite/tests/deriving/should_compile/T14682.stderr - testsuite/tests/deriving/should_compile/T20496.stderr - testsuite/tests/deriving/should_run/T9576.stderr - testsuite/tests/driver/implicit-dyn-too/implicit-dyn-too.stdout - testsuite/tests/typecheck/should_fail/T15883c.stderr - testsuite/tests/typecheck/should_fail/T15883d.stderr - testsuite/tests/typecheck/should_fail/T15883e.stderr Changes: ===================================== compiler/GHC/Hs/Utils.hs ===================================== @@ -56,7 +56,7 @@ module GHC.Hs.Utils( nlHsTyApp, nlHsTyApps, nlHsVar, nlHsDataCon, nlHsLit, nlHsApp, nlHsApps, nlHsSyntaxApps, nlHsIntLit, nlHsVarApps, - nlHsDo, nlHsOpApp, nlHsPar, nlHsIf, nlHsCase, nlList, + nlHsDo, nlHsOpApp, nlHsLam, nlHsPar, nlHsIf, nlHsCase, nlList, mkLHsTupleExpr, mkLHsVarTuple, missingTupArg, mkLocatedList, nlAscribe, @@ -598,11 +598,15 @@ nlHsDo ctxt stmts = noLocA (mkHsDo ctxt (noLocA stmts)) nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs nlHsOpApp e1 op e2 = noLocA (mkHsOpApp e1 op e2) +nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs nlHsPar :: IsPass p => LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs +nlHsLam match = noLocA $ HsLam noAnn LamSingle + $ mkMatchGroup (Generated OtherExpansion SkipPmc) (noLocA [match]) + nlHsPar e = noLocA (gHsPar e) -- nlHsIf should generate if-expressions which are NOT subject to ===================================== compiler/GHC/Tc/Deriv/Functor.hs ===================================== @@ -689,9 +689,18 @@ mkSimpleConMatch2 ctxt fold extra_pats con insides = do con_expr | null asWithTyVar = nlHsApps con_name asWithoutTyVar | otherwise = - let bs = filterByList argTysTyVarInfo bs_RDRs - vars = filterByLists argTysTyVarInfo bs_Vars as_Vars - in mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) + let -- All trailing b-args can be eta-reduced: + -- (\b1 b2 b3 -> A b1 a2 b2 b3) ==> (\b1 -> A b1 a2) + -- This improves the number of allocations needed to compile + -- the generated code (it is not relevant for correctness) + -- We do this by counting the n of args to keep + keep_n = length $ dropWhileEndLE (== True) argTysTyVarInfo + bs = filterByList (take keep_n argTysTyVarInfo) bs_RDRs + vars = take keep_n $ + filterByLists argTysTyVarInfo bs_Vars as_Vars + in if keep_n == 0 + then nlHsVar con_name + else mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) rhs <- fold con_expr exps return $ mkMatch ctxt (noLocA (extra_pats ++ [pat])) rhs emptyLocalBinds ===================================== compiler/GHC/Tc/Deriv/Generate.hs ===================================== @@ -339,7 +339,7 @@ Several special cases: See function unliftedOrdOp Note [Game plan for deriving Ord] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's a bad idea to define only 'compare', and build the other binary comparisons on top of it; see #2130, #4019. Reason: we don't want to laboriously make a three-way comparison, only to extract a @@ -350,16 +350,22 @@ binary result, something like this: True -> False False -> True -This being said, we can get away with generating full code only for -'compare' and '<' thus saving us generation of other three operators. -Other operators can be cheaply expressed through '<': -a <= b = not $ b < a -a > b = b < a -a >= b = not $ a < b - So for sufficiently small types (few constructors, or all nullary) we generate all methods; for large ones we just use 'compare'. +This being said, we can get away with generating full code only for +'compare' and '<=' thus saving us generation of other three operators. +Other operators can be cheaply expressed through '<=' -- indeed, that's what +the default implementations of >, <, and >= do. + +Historically, derived instances defined '<' and the remaining operators as +cheap expressions in function of it: + a <= b = not $ b < a + a > b = b < a + a >= b = not $ a < b +but since the CLC proposal #24 (see 8f174e06185143674d6cbfee75c30e68805d85b8), +it suffices to derive '<=' and rely on the +default implementation for the others. -} data OrdOp = OrdCompare | OrdLT | OrdLE | OrdGE | OrdGT @@ -408,7 +414,7 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon return $ if null tycon_data_cons -- No data-cons => invoke bale-out case then ( [mkFunBindEC 2 loc compare_RDR (const eqTag_Expr) []] , emptyBag) - else ( [mkOrdOp OrdCompare] ++ other_ops + else ( [mkOrdOp OrdCompare] `chkAppend` other_ops , aux_binds) where aux_binds = emptyBag @@ -417,19 +423,10 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon other_ops | (last_tag - first_tag) <= 2 -- 1-3 constructors || null non_nullary_cons -- Or it's an enumeration - = [mkOrdOp OrdLT, lE, gT, gE] + = [mkOrdOp OrdLE] | otherwise = [] - negate_expr = nlHsApp (nlHsVar not_RDR) - pats = noLocA [a_Pat, b_Pat] - lE = mkSimpleGeneratedFunBind loc le_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr) - gT = mkSimpleGeneratedFunBind loc gt_RDR pats $ - nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr - gE = mkSimpleGeneratedFunBind loc ge_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) a_Expr) b_Expr) - get_tag con = dataConTag con - fIRST_TAG -- We want *zero-based* tags, because that's what -- con2Tag returns (generated by untag_Expr)! @@ -1407,7 +1404,7 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gfoldl_eqn con = ([nlVarPat k_RDR, z_Pat, nlConVarPat con_name as_needed], - foldl' mk_k_app (z_Expr `nlHsApp` (eta_expand_data_con con)) as_needed) + foldl' mk_k_app (z_Expr `nlHsApp` (nlHsVar (getRdrName con))) as_needed) where con_name :: RdrName con_name = getRdrName con @@ -1427,18 +1424,9 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gunfold_alt dc = mkHsCaseAlt (mk_unfold_pat dc) (mk_unfold_rhs dc) mk_unfold_rhs dc = foldr nlHsApp - (z_Expr `nlHsApp` (eta_expand_data_con dc)) + (z_Expr `nlHsApp` (nlHsVar (getRdrName dc))) (replicate (dataConSourceArity dc) (nlHsVar k_RDR)) - eta_expand_data_con dc = - mkHsLam (noLocA eta_expand_pats) - (foldl nlHsApp (nlHsVar (getRdrName dc)) eta_expand_hsvars) - where - eta_expand_pats = map nlVarPat eta_expand_vars - eta_expand_hsvars = map nlHsVar eta_expand_vars - eta_expand_vars = take (dataConSourceArity dc) as_RDRs - - mk_unfold_pat dc -- Last one is a wild-pat, to avoid -- redundant test, and annoying warning | tag-fIRST_TAG == n_cons-1 = nlWildPat -- Last constructor @@ -2528,21 +2516,21 @@ showParen_Expr showParen_Expr e1 e2 = nlHsApp (nlHsApp (nlHsVar showParen_RDR) e1) e2 nested_compose_Expr :: [LHsExpr GhcPs] -> LHsExpr GhcPs - -nested_compose_Expr [] = panic "nested_compose_expr" -- Arg is always non-empty -nested_compose_Expr [e] = parenify e -nested_compose_Expr (e:es) - = nlHsApp (nlHsApp (nlHsVar compose_RDR) (parenify e)) (nested_compose_Expr es) +nested_compose_Expr = + nlHsLam . mkSimpleMatch (LamAlt LamSingle) (noLocA [z_Pat]) . go + where + -- Previously we used (`.`), but inlining its definition improves compiler + -- performance significantly since we no longer need to typecheck lots of + -- (.) applications (each which needed three type applications, all @String) + go [] = panic "nested_compose_expr" -- Arg is always non-empty + go [e] = nlHsApp e z_Expr + go (e:es) = nlHsApp e (go es) -- impossible_Expr is used in case RHSs that should never happen. -- We generate these to keep the desugarer from complaining that they *might* happen! error_Expr :: FastString -> LHsExpr GhcPs error_Expr string = nlHsApp (nlHsVar error_RDR) (nlHsLit (mkHsStringFS string)) -parenify :: LHsExpr GhcPs -> LHsExpr GhcPs -parenify e@(L _ (HsVar _ _)) = e -parenify e = mkHsPar e - -- genOpApp wraps brackets round the operator application, so that the -- renamer won't subsequently try to re-associate it. genOpApp :: LHsExpr GhcPs -> RdrName -> LHsExpr GhcPs -> LHsExpr GhcPs @@ -2570,10 +2558,9 @@ as_RDRs = [ mkVarUnqual (mkFastString ("a"++show i)) | i <- [(1::Int) .. bs_RDRs = [ mkVarUnqual (mkFastString ("b"++show i)) | i <- [(1::Int) .. ] ] cs_RDRs = [ mkVarUnqual (mkFastString ("c"++show i)) | i <- [(1::Int) .. ] ] -a_Expr, b_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, +a_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, true_Expr, pure_Expr, unsafeCodeCoerce_Expr :: LHsExpr GhcPs a_Expr = nlHsVar a_RDR -b_Expr = nlHsVar b_RDR c_Expr = nlHsVar c_RDR z_Expr = nlHsVar z_RDR ltTag_Expr = nlHsVar ltTag_RDR ===================================== testsuite/tests/deriving/should_compile/T14682.stderr ===================================== @@ -5,12 +5,13 @@ Derived class instances: GHC.Internal.Show.showsPrec a (T14682.Foo b1 b2) = GHC.Internal.Show.showParen (a GHC.Classes.>= 11) - ((GHC.Internal.Base..) - (GHC.Internal.Show.showString "Foo ") - ((GHC.Internal.Base..) - (GHC.Internal.Show.showsPrec 11 b1) - ((GHC.Internal.Base..) - GHC.Internal.Show.showSpace (GHC.Internal.Show.showsPrec 11 b2)))) + (\ z + -> GHC.Internal.Show.showString + "Foo " + (GHC.Internal.Show.showsPrec + 11 b1 + (GHC.Internal.Show.showSpace + (GHC.Internal.Show.showsPrec 11 b2 z)))) instance GHC.Internal.TH.Lift.Lift T14682.Foo where GHC.Internal.TH.Lift.lift (T14682.Foo a1 a2) @@ -25,9 +26,8 @@ Derived class instances: instance GHC.Internal.Data.Data.Data T14682.Foo where GHC.Internal.Data.Data.gfoldl k z (T14682.Foo a1 a2) - = ((z (\ a1 a2 -> T14682.Foo a1 a2) `k` a1) `k` a2) - GHC.Internal.Data.Data.gunfold k z _ - = k (k (z (\ a1 a2 -> T14682.Foo a1 a2))) + = ((z T14682.Foo `k` a1) `k` a2) + GHC.Internal.Data.Data.gunfold k z _ = k (k (z T14682.Foo)) GHC.Internal.Data.Data.toConstr (T14682.Foo _ _) = $cFoo GHC.Internal.Data.Data.dataTypeOf _ = $tFoo @@ -46,18 +46,15 @@ Derived class instances: GHC.Types.LT -> GHC.Types.LT GHC.Types.EQ -> (a2 `GHC.Classes.compare` b2) GHC.Types.GT -> GHC.Types.GT - (GHC.Classes.<) a b + (GHC.Classes.<=) a b = case a of T14682.Foo a1 a2 -> case b of T14682.Foo b1 b2 -> case (GHC.Classes.compare a1 b1) of GHC.Types.LT -> GHC.Types.True - GHC.Types.EQ -> (a2 GHC.Classes.< b2) + GHC.Types.EQ -> (a2 GHC.Classes.<= b2) GHC.Types.GT -> GHC.Types.False - (GHC.Classes.<=) a b = GHC.Classes.not ((GHC.Classes.<) b a) - (GHC.Classes.>) a b = (GHC.Classes.<) b a - (GHC.Classes.>=) a b = GHC.Classes.not ((GHC.Classes.<) a b) instance GHC.Internal.Ix.Ix T14682.Foo where GHC.Internal.Ix.range (T14682.Foo a1 a2, T14682.Foo b1 b2) @@ -177,6 +174,24 @@ GHC.Classes.Eq [T14682.Foo] +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.<) = GHC.Classes.$dm< @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>) = GHC.Classes.$dm> @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>=) = GHC.Classes.$dm>= @T14682.Foo + + + ==================== Filling in method body ==================== GHC.Classes.Ord [T14682.Foo] GHC.Classes.max = GHC.Classes.$dmmax @T14682.Foo ===================================== testsuite/tests/deriving/should_compile/T20496.stderr ===================================== @@ -32,5 +32,5 @@ rnd null (MkT _) = False instance Traversable T where - traverse f (MkT a1) = fmap (\ b1 -> MkT b1) (f a1) + traverse f (MkT a1) = fmap MkT (f a1) ===================================== testsuite/tests/deriving/should_run/T9576.stderr ===================================== @@ -2,11 +2,11 @@ T9576: Exception: T9576.hs:6:31: error: [GHC-39999] • No instance for ‘Show Foo’ arising from a use of ‘showsPrec’ - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘(showsPrec 11 b1 z)’ + In the expression: showString "MkBar " (showsPrec 11 b1 z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkBar ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkBar ") (showsPrec 11 b1)) + ‘(\ z -> showString "MkBar " (showsPrec 11 b1 z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show Bar’: To see the code I am typechecking, use -ddump-deriv @@ -17,9 +17,7 @@ Module: GHC.Internal.Control.Exception.Base Type: TypeError HasCallStack backtrace: - collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception - toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception - throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:423:30 in ghc-internal:GHC.Internal.Control.Exception.Base - - + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base ===================================== testsuite/tests/driver/implicit-dyn-too/implicit-dyn-too.stdout ===================================== @@ -1,4 +1,3 @@ [1 of 2] Compiling QuasiExpr ( QuasiExpr.hs, QuasiExpr.o, QuasiExpr.dyn_o ) [2 of 2] Compiling QuasiQuote ( QuasiQuote.hs, nothing ) [1 of 2] Compiling QuasiExpr ( QuasiExpr.hs, QuasiExpr.o, QuasiExpr.dyn_o ) [Missing dynamic object file] -[2 of 2] Compiling QuasiQuote ( QuasiQuote.hs, nothing ) [QuasiExpr[TH] changed] ===================================== testsuite/tests/typecheck/should_fail/T15883c.stderr ===================================== @@ -1,4 +1,3 @@ - T15883c.hs:14:1: error: [GHC-39999] • No instance for ‘Eq (Foo LiftedRep)’ arising from the superclasses of an instance declaration @@ -22,7 +21,7 @@ T15883c.hs:14:1: error: [GHC-39999] To see the code I am typechecking, use -ddump-deriv T15883c.hs:14:1: error: [GHC-39999] - • Ambiguous type variable ‘a1’ arising from a use of ‘<’ + • Ambiguous type variable ‘a1’ arising from a use of ‘<=’ prevents the constraint ‘(Ord a1)’ from being solved. Probable fix: use a type annotation to specify what ‘a1’ should be. Potentially matching instances: @@ -31,9 +30,10 @@ T15883c.hs:14:1: error: [GHC-39999] ...plus 24 others ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the expression: a1 < b1 - In a case alternative: MkFoo b1 -> (a1 < b1) - In the expression: case b of MkFoo b1 -> (a1 < b1) - When typechecking the code for ‘<’ + • In the expression: a1 <= b1 + In a case alternative: MkFoo b1 -> (a1 <= b1) + In the expression: case b of MkFoo b1 -> (a1 <= b1) + When typechecking the code for ‘<=’ in a derived instance for ‘Ord (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883d.stderr ===================================== @@ -1,4 +1,3 @@ - T15883d.hs:14:1: error: [GHC-39999] • Ambiguous type variable ‘a0’ arising from a use of ‘showsPrec’ prevents the constraint ‘(Show a0)’ from being solved. @@ -9,11 +8,12 @@ T15883d.hs:14:1: error: [GHC-39999] ...plus 29 others ...plus 10 instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘(showsPrec 11 b1 z)’ + In the expression: showString "MkFoo " (showsPrec 11 b1 z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkFoo ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkFoo ") (showsPrec 11 b1)) + ‘(\ z -> showString "MkFoo " (showsPrec 11 b1 z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883e.stderr ===================================== @@ -1,71 +1,26 @@ - -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘d0’ arising from a use of ‘k’ - prevents the constraint ‘(Data d0)’ from being solved. - Probable fix: use a type annotation to specify what ‘d0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: z (\ a1 -> MkFoo a1) `k` a1 - In an equation for ‘GHC.Internal.Data.Data.gfoldl’: - GHC.Internal.Data.Data.gfoldl k z (MkFoo a1) - = (z (\ a1 -> MkFoo a1) `k` a1) - When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ - -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘d0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘d0’ with ‘forall a. a’ + Expected: d0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘d0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘z MkFoo’ + In the expression: z MkFoo `k` a1 When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: d0 (bound at T15883e.hs:16:1) -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘b0’ arising from a use of ‘k’ - prevents the constraint ‘(Data b0)’ from being solved. - Probable fix: use a type annotation to specify what ‘b0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: k (z (\ a1 -> MkFoo a1)) - In an equation for ‘GHC.Internal.Data.Data.gunfold’: - GHC.Internal.Data.Data.gunfold k z _ = k (z (\ a1 -> MkFoo a1)) +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘b0’ with ‘forall a. a’ + Expected: b0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘b0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘(z MkFoo)’ + In the expression: k (z MkFoo) When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘b0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ - When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: b0 (bound at T15883e.hs:16:1) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f2d1c3c8071b1268e074141d3a952142c69a7c26...bb5a5e8913d6069404b4cf8b2f086295edbbf738 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f2d1c3c8071b1268e074141d3a952142c69a7c26...bb5a5e8913d6069404b4cf8b2f086295edbbf738 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 15:52:33 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Mon, 04 Nov 2024 10:52:33 -0500 Subject: [Git][ghc/ghc][wip/ttg-booleanformula] Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <6728edc0f2303_de58ca727b83936b@gitlab.mail> Rodrigo Mesquita pushed to branch wip/ttg-booleanformula at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - 23 changed files: - compiler/GHC/Core/Class.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Parser.y - compiler/GHC/Rename/Bind.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/Language/Haskell/Syntax/Binds.hs - + compiler/Language/Haskell/Syntax/BooleanFormula.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Types.hs Changes: ===================================== compiler/GHC/Core/Class.hs ===================================== @@ -26,6 +26,7 @@ import GHC.Prelude import {-# SOURCE #-} GHC.Core.TyCon ( TyCon ) import {-# SOURCE #-} GHC.Core.TyCo.Rep ( Type, PredType ) import {-# SOURCE #-} GHC.Core.TyCo.Ppr ( pprType ) +import GHC.Hs.Extension (GhcRn) import GHC.Types.Var import GHC.Types.Name import GHC.Types.Basic @@ -35,7 +36,7 @@ import GHC.Utils.Panic import GHC.Types.SrcLoc import GHC.Types.Var.Set import GHC.Utils.Outputable -import GHC.Data.BooleanFormula (BooleanFormula, mkTrue) +import Language.Haskell.Syntax.BooleanFormula ( BooleanFormula, mkTrue ) import qualified Data.Data as Data @@ -131,7 +132,7 @@ data TyFamEqnValidityInfo -- Note [Type-checking default assoc decls] in GHC.Tc.TyCl. } -type ClassMinimalDef = BooleanFormula Name -- Required methods +type ClassMinimalDef = BooleanFormula GhcRn -- Required methods data ClassBody = AbstractClass ===================================== compiler/GHC/CoreToIface.hs ===================================== @@ -43,6 +43,7 @@ module GHC.CoreToIface , toIfaceVar -- * Other stuff , toIfaceLFInfo + , toIfaceBooleanFormula -- * CgBreakInfo , dehydrateCgBreakInfo ) where @@ -69,6 +70,7 @@ import GHC.Builtin.Types ( heqTyCon ) import GHC.Iface.Syntax import GHC.Data.FastString +import GHC.Data.BooleanFormula qualified as BF(BooleanFormula(..)) import GHC.Types.Id import GHC.Types.Id.Info @@ -82,11 +84,14 @@ import GHC.Types.Var.Set import GHC.Types.Tickish import GHC.Types.Demand ( isNopSig ) import GHC.Types.Cpr ( topCprSig ) +import GHC.Types.SrcLoc (unLoc) import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Misc +import GHC.Hs.Extension (GhcRn) + import Data.Maybe ( isNothing, catMaybes ) {- Note [Avoiding space leaks in toIface*] @@ -537,6 +542,14 @@ toIfGuidance src guidance , isStableSource src = IfWhen arity unsat_ok boring_ok | otherwise = IfNoGuidance +toIfaceBooleanFormula :: BF.BooleanFormula GhcRn -> IfaceBooleanFormula +toIfaceBooleanFormula = go + where + go (BF.Var nm ) = IfVar $ mkIfLclName . getOccFS . unLoc $ nm + go (BF.And bfs ) = IfAnd $ map (go . unLoc) bfs + go (BF.Or bfs ) = IfOr $ map (go . unLoc) bfs + go (BF.Parens bf) = IfParens $ (go . unLoc) bf + {- ************************************************************************ * * ===================================== compiler/GHC/Data/BooleanFormula.hs ===================================== @@ -1,5 +1,6 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveTraversable #-} +{-# OPTIONS_GHC -Wno-orphans #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE TypeFamilies #-} -------------------------------------------------------------------------------- -- | Boolean formulas without quantifiers and without negation. @@ -8,73 +9,62 @@ -- This module is used to represent minimal complete definitions for classes. -- module GHC.Data.BooleanFormula ( - BooleanFormula(..), LBooleanFormula, - mkFalse, mkTrue, mkAnd, mkOr, mkVar, + module Language.Haskell.Syntax.BooleanFormula, isFalse, isTrue, + bfMap, bfTraverse, eval, simplify, isUnsatisfied, implies, impliesAtom, - pprBooleanFormula, pprBooleanFormulaNice + pprBooleanFormula, pprBooleanFormulaNice, pprBooleanFormulaNormal ) where -import GHC.Prelude hiding ( init, last ) - -import Data.List ( nub, intersperse ) +import Data.List ( intersperse ) import Data.List.NonEmpty ( NonEmpty (..), init, last ) -import Data.Data -import GHC.Utils.Monad -import GHC.Utils.Outputable -import GHC.Parser.Annotation ( LocatedL ) -import GHC.Types.SrcLoc +import GHC.Prelude hiding ( init, last ) import GHC.Types.Unique import GHC.Types.Unique.Set +import GHC.Types.SrcLoc (unLoc) +import GHC.Utils.Outputable +import GHC.Parser.Annotation ( SrcSpanAnnL ) +import GHC.Hs.Extension (GhcPass (..), OutputableBndrId) +import Language.Haskell.Syntax.Extension (Anno, LIdP, IdP) +import Language.Haskell.Syntax.BooleanFormula + ---------------------------------------------------------------------- -- Boolean formula type and smart constructors ---------------------------------------------------------------------- -type LBooleanFormula a = LocatedL (BooleanFormula a) - -data BooleanFormula a = Var a | And [LBooleanFormula a] | Or [LBooleanFormula a] - | Parens (LBooleanFormula a) - deriving (Eq, Data, Functor, Foldable, Traversable) - -mkVar :: a -> BooleanFormula a -mkVar = Var +type instance Anno (BooleanFormula (GhcPass p)) = SrcSpanAnnL -mkFalse, mkTrue :: BooleanFormula a -mkFalse = Or [] -mkTrue = And [] +-- if we had Functor/Traversable (LbooleanFormula p) we could use that +-- as a constraint and we wouldn't need to specialize to just GhcPass p, +-- but becuase LBooleanFormula is a type synonym such a constraint is +-- impossible. --- Convert a Bool to a BooleanFormula -mkBool :: Bool -> BooleanFormula a -mkBool False = mkFalse -mkBool True = mkTrue - --- Make a conjunction, and try to simplify -mkAnd :: Eq a => [LBooleanFormula a] -> BooleanFormula a -mkAnd = maybe mkFalse (mkAnd' . nub) . concatMapM fromAnd +-- BooleanFormula can't be an instance of functor because it can't lift +-- arbitrary functions `a -> b`, only functions of type `LIdP a -> LIdP b` +-- ditto for Traversable. +bfMap :: (LIdP (GhcPass p) -> LIdP (GhcPass p')) + -> BooleanFormula (GhcPass p) -> BooleanFormula (GhcPass p') +bfMap f = go where - -- See Note [Simplification of BooleanFormulas] - fromAnd :: LBooleanFormula a -> Maybe [LBooleanFormula a] - fromAnd (L _ (And xs)) = Just xs - -- assume that xs are already simplified - -- otherwise we would need: fromAnd (And xs) = concat <$> traverse fromAnd xs - fromAnd (L _ (Or [])) = Nothing - -- in case of False we bail out, And [..,mkFalse,..] == mkFalse - fromAnd x = Just [x] - mkAnd' [x] = unLoc x - mkAnd' xs = And xs - -mkOr :: Eq a => [LBooleanFormula a] -> BooleanFormula a -mkOr = maybe mkTrue (mkOr' . nub) . concatMapM fromOr + go (Var a ) = Var $ f a + go (And bfs) = And $ map (fmap go) bfs + go (Or bfs) = Or $ map (fmap go) bfs + go (Parens bf ) = Parens $ fmap go bf + +bfTraverse :: Applicative f + => (LIdP (GhcPass p) -> f (LIdP (GhcPass p'))) + -> BooleanFormula (GhcPass p) + -> f (BooleanFormula (GhcPass p')) +bfTraverse f = go where - -- See Note [Simplification of BooleanFormulas] - fromOr (L _ (Or xs)) = Just xs - fromOr (L _ (And [])) = Nothing - fromOr x = Just [x] - mkOr' [x] = unLoc x - mkOr' xs = Or xs + go (Var a ) = Var <$> f a + go (And bfs) = And <$> traverse @[] (traverse go) bfs + go (Or bfs) = Or <$> traverse @[] (traverse go) bfs + go (Parens bf ) = Parens <$> traverse go bf + {- @@ -115,15 +105,15 @@ We don't show a ridiculous error message like -- Evaluation and simplification ---------------------------------------------------------------------- -isFalse :: BooleanFormula a -> Bool +isFalse :: BooleanFormula (GhcPass p) -> Bool isFalse (Or []) = True isFalse _ = False -isTrue :: BooleanFormula a -> Bool +isTrue :: BooleanFormula (GhcPass p) -> Bool isTrue (And []) = True isTrue _ = False -eval :: (a -> Bool) -> BooleanFormula a -> Bool +eval :: (LIdP (GhcPass p) -> Bool) -> BooleanFormula (GhcPass p) -> Bool eval f (Var x) = f x eval f (And xs) = all (eval f . unLoc) xs eval f (Or xs) = any (eval f . unLoc) xs @@ -131,18 +121,24 @@ eval f (Parens x) = eval f (unLoc x) -- Simplify a boolean formula. -- The argument function should give the truth of the atoms, or Nothing if undecided. -simplify :: Eq a => (a -> Maybe Bool) -> BooleanFormula a -> BooleanFormula a +simplify :: forall p. Eq (LIdP (GhcPass p)) + => (LIdP (GhcPass p) -> Maybe Bool) + -> BooleanFormula (GhcPass p) + -> BooleanFormula (GhcPass p) simplify f (Var a) = case f a of Nothing -> Var a Just b -> mkBool b -simplify f (And xs) = mkAnd (map (\(L l x) -> L l (simplify f x)) xs) -simplify f (Or xs) = mkOr (map (\(L l x) -> L l (simplify f x)) xs) +simplify f (And xs) = mkAnd (map (fmap (simplify f)) xs) +simplify f (Or xs) = mkOr (map (fmap (simplify f)) xs) simplify f (Parens x) = simplify f (unLoc x) -- Test if a boolean formula is satisfied when the given values are assigned to the atoms -- if it is, returns Nothing -- if it is not, return (Just remainder) -isUnsatisfied :: Eq a => (a -> Bool) -> BooleanFormula a -> Maybe (BooleanFormula a) +isUnsatisfied :: Eq (LIdP (GhcPass p)) + => (LIdP (GhcPass p) -> Bool) + -> BooleanFormula (GhcPass p) + -> Maybe (BooleanFormula (GhcPass p)) isUnsatisfied f bf | isTrue bf' = Nothing | otherwise = Just bf' @@ -155,42 +151,42 @@ isUnsatisfied f bf -- eval f x == False <==> isFalse (simplify (Just . f) x) -- If the boolean formula holds, does that mean that the given atom is always true? -impliesAtom :: Eq a => BooleanFormula a -> a -> Bool -Var x `impliesAtom` y = x == y -And xs `impliesAtom` y = any (\x -> (unLoc x) `impliesAtom` y) xs +impliesAtom :: Eq (IdP (GhcPass p)) => BooleanFormula (GhcPass p) -> LIdP (GhcPass p) -> Bool +Var x `impliesAtom` y = (unLoc x) == (unLoc y) +And xs `impliesAtom` y = any (\x -> unLoc x `impliesAtom` y) xs -- we have all of xs, so one of them implying y is enough -Or xs `impliesAtom` y = all (\x -> (unLoc x) `impliesAtom` y) xs -Parens x `impliesAtom` y = (unLoc x) `impliesAtom` y +Or xs `impliesAtom` y = all (\x -> unLoc x `impliesAtom` y) xs +Parens x `impliesAtom` y = unLoc x `impliesAtom` y -implies :: Uniquable a => BooleanFormula a -> BooleanFormula a -> Bool +implies :: (Uniquable (IdP (GhcPass p))) => BooleanFormula (GhcPass p) -> BooleanFormula (GhcPass p) -> Bool implies e1 e2 = go (Clause emptyUniqSet [e1]) (Clause emptyUniqSet [e2]) where - go :: Uniquable a => Clause a -> Clause a -> Bool + go :: Uniquable (IdP (GhcPass p)) => Clause (GhcPass p) -> Clause (GhcPass p) -> Bool go l at Clause{ clauseExprs = hyp:hyps } r = case hyp of - Var x | memberClauseAtoms x r -> True - | otherwise -> go (extendClauseAtoms l x) { clauseExprs = hyps } r + Var x | memberClauseAtoms (unLoc x) r -> True + | otherwise -> go (extendClauseAtoms l (unLoc x)) { clauseExprs = hyps } r Parens hyp' -> go l { clauseExprs = unLoc hyp':hyps } r And hyps' -> go l { clauseExprs = map unLoc hyps' ++ hyps } r Or hyps' -> all (\hyp' -> go l { clauseExprs = unLoc hyp':hyps } r) hyps' go l r at Clause{ clauseExprs = con:cons } = case con of - Var x | memberClauseAtoms x l -> True - | otherwise -> go l (extendClauseAtoms r x) { clauseExprs = cons } + Var x | memberClauseAtoms (unLoc x) l -> True + | otherwise -> go l (extendClauseAtoms r (unLoc x)) { clauseExprs = cons } Parens con' -> go l r { clauseExprs = unLoc con':cons } And cons' -> all (\con' -> go l r { clauseExprs = unLoc con':cons }) cons' Or cons' -> go l r { clauseExprs = map unLoc cons' ++ cons } go _ _ = False -- A small sequent calculus proof engine. -data Clause a = Clause { - clauseAtoms :: UniqSet a, - clauseExprs :: [BooleanFormula a] +data Clause p = Clause { + clauseAtoms :: UniqSet (IdP p), + clauseExprs :: [BooleanFormula p] } -extendClauseAtoms :: Uniquable a => Clause a -> a -> Clause a +extendClauseAtoms :: Uniquable (IdP p) => Clause p -> IdP p -> Clause p extendClauseAtoms c x = c { clauseAtoms = addOneToUniqSet (clauseAtoms c) x } -memberClauseAtoms :: Uniquable a => a -> Clause a -> Bool +memberClauseAtoms :: Uniquable (IdP p) => IdP p -> Clause p -> Bool memberClauseAtoms x c = x `elementOfUniqSet` clauseAtoms c ---------------------------------------------------------------------- @@ -199,28 +195,29 @@ memberClauseAtoms x c = x `elementOfUniqSet` clauseAtoms c -- Pretty print a BooleanFormula, -- using the arguments as pretty printers for Var, And and Or respectively -pprBooleanFormula' :: (Rational -> a -> SDoc) - -> (Rational -> [SDoc] -> SDoc) - -> (Rational -> [SDoc] -> SDoc) - -> Rational -> BooleanFormula a -> SDoc +pprBooleanFormula' :: (Rational -> LIdP (GhcPass p) -> SDoc) + -> (Rational -> [SDoc] -> SDoc) + -> (Rational -> [SDoc] -> SDoc) + -> Rational -> BooleanFormula (GhcPass p) -> SDoc pprBooleanFormula' pprVar pprAnd pprOr = go where go p (Var x) = pprVar p x - go p (And []) = cparen (p > 0) $ empty + go p (And []) = cparen (p > 0) empty go p (And xs) = pprAnd p (map (go 3 . unLoc) xs) go _ (Or []) = keyword $ text "FALSE" go p (Or xs) = pprOr p (map (go 2 . unLoc) xs) go p (Parens x) = go p (unLoc x) -- Pretty print in source syntax, "a | b | c,d,e" -pprBooleanFormula :: (Rational -> a -> SDoc) -> Rational -> BooleanFormula a -> SDoc +pprBooleanFormula :: (Rational -> LIdP (GhcPass p) -> SDoc) + -> Rational -> BooleanFormula (GhcPass p) -> SDoc pprBooleanFormula pprVar = pprBooleanFormula' pprVar pprAnd pprOr where pprAnd p = cparen (p > 3) . fsep . punctuate comma pprOr p = cparen (p > 2) . fsep . intersperse vbar -- Pretty print human in readable format, "either `a' or `b' or (`c', `d' and `e')"? -pprBooleanFormulaNice :: Outputable a => BooleanFormula a -> SDoc +pprBooleanFormulaNice :: Outputable (LIdP (GhcPass p)) => BooleanFormula (GhcPass p) -> SDoc pprBooleanFormulaNice = pprBooleanFormula' pprVar pprAnd pprOr 0 where pprVar _ = quotes . ppr @@ -230,15 +227,14 @@ pprBooleanFormulaNice = pprBooleanFormula' pprVar pprAnd pprOr 0 pprAnd' (x:xs) = fsep (punctuate comma (init (x:|xs))) <> text ", and" <+> last (x:|xs) pprOr p xs = cparen (p > 1) $ text "either" <+> sep (intersperse (text "or") xs) -instance (OutputableBndr a) => Outputable (BooleanFormula a) where +instance OutputableBndrId p => Outputable (BooleanFormula (GhcPass p)) where ppr = pprBooleanFormulaNormal -pprBooleanFormulaNormal :: (OutputableBndr a) - => BooleanFormula a -> SDoc +pprBooleanFormulaNormal :: OutputableBndrId p => BooleanFormula (GhcPass p) -> SDoc pprBooleanFormulaNormal = go where - go (Var x) = pprPrefixOcc x + go (Var x) = pprPrefixOcc (unLoc x) go (And xs) = fsep $ punctuate comma (map (go . unLoc) xs) go (Or []) = keyword $ text "FALSE" go (Or xs) = fsep $ intersperse vbar (map (go . unLoc) xs) - go (Parens x) = parens (go $ unLoc x) + go (Parens x) = parens (go $ unLoc x) \ No newline at end of file ===================================== compiler/GHC/Hs/Binds.hs ===================================== @@ -36,6 +36,7 @@ import Language.Haskell.Syntax.Binds import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, pprFunBind, pprPatBind ) import {-# SOURCE #-} GHC.Hs.Pat (pprLPat ) +import GHC.Data.BooleanFormula ( LBooleanFormula, pprBooleanFormulaNormal ) import GHC.Types.Tickish import GHC.Hs.Extension import GHC.Parser.Annotation @@ -47,7 +48,6 @@ import GHC.Types.Basic import GHC.Types.SourceText import GHC.Types.SrcLoc as SrcLoc import GHC.Types.Var -import GHC.Data.BooleanFormula (LBooleanFormula) import GHC.Types.Name import GHC.Utils.Outputable @@ -968,9 +968,8 @@ instance Outputable TcSpecPrag where ppr (SpecPrag var _ inl) = text (extractSpecPragName $ inl_src inl) <+> pprSpec var (text "") inl -pprMinimalSig :: (OutputableBndr name) - => LBooleanFormula (GenLocated l name) -> SDoc -pprMinimalSig (L _ bf) = ppr (fmap unLoc bf) +pprMinimalSig :: OutputableBndrId p => LBooleanFormula (GhcPass p) -> SDoc +pprMinimalSig (L _ bf) = pprBooleanFormulaNormal bf {- ************************************************************************ ===================================== compiler/GHC/Hs/Decls.hs ===================================== @@ -110,6 +110,7 @@ module GHC.Hs.Decls ( import GHC.Prelude import Language.Haskell.Syntax.Decls +import Language.Haskell.Syntax.Extension import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, pprUntypedSplice ) -- Because Expr imports Decls via HsBracket @@ -119,7 +120,7 @@ import GHC.Hs.Type import GHC.Hs.Doc import GHC.Types.Basic import GHC.Core.Coercion -import Language.Haskell.Syntax.Extension + import GHC.Hs.Extension import GHC.Parser.Annotation import GHC.Types.Name ===================================== compiler/GHC/Hs/Instances.hs ===================================== @@ -33,6 +33,8 @@ import GHC.Hs.Type import GHC.Hs.Pat import GHC.Hs.ImpExp import GHC.Parser.Annotation +import GHC.Data.BooleanFormula (BooleanFormula(..)) +import Language.Haskell.Syntax.Extension (Anno) -- --------------------------------------------------------------------- -- Data derivations from GHC.Hs----------------------------------------- @@ -590,3 +592,6 @@ deriving instance Data XXPatGhcTc deriving instance Data XViaStrategyPs -- --------------------------------------------------------------------- + +deriving instance (Typeable p, Data (Anno (IdGhcP p)), Data (IdGhcP p)) => Data (BooleanFormula (GhcPass p)) +--------------------------------------------------------------------- \ No newline at end of file ===================================== compiler/GHC/Iface/Decl.hs ===================================== @@ -13,7 +13,6 @@ module GHC.Iface.Decl ( coAxiomToIfaceDecl , tyThingToIfaceDecl -- Converting things to their Iface equivalents - , toIfaceBooleanFormula ) where @@ -33,21 +32,17 @@ import GHC.Core.DataCon import GHC.Core.Type import GHC.Core.Multiplicity - import GHC.Types.Id import GHC.Types.Var.Env import GHC.Types.Var import GHC.Types.Name import GHC.Types.Basic import GHC.Types.TyThing -import GHC.Types.SrcLoc import GHC.Utils.Panic.Plain import GHC.Utils.Misc import GHC.Data.Maybe -import GHC.Data.BooleanFormula - import Data.List ( findIndex, mapAccumL ) {- @@ -287,7 +282,7 @@ classToIfaceDecl env clas ifClassCtxt = tidyToIfaceContext env1 sc_theta, ifATs = map toIfaceAT clas_ats, ifSigs = map toIfaceClassOp op_stuff, - ifMinDef = toIfaceBooleanFormula $ fmap (mkIfLclName . getOccFS) (classMinimalDef clas) + ifMinDef = toIfaceBooleanFormula (classMinimalDef clas) } (env1, tc_binders) = tidyTyConBinders env (tyConBinders tycon) @@ -335,10 +330,3 @@ tidyTyConBinders = mapAccumL tidyTyConBinder tidyTyVar :: TidyEnv -> TyVar -> IfLclName tidyTyVar (_, subst) tv = toIfaceTyVar (lookupVarEnv subst tv `orElse` tv) - -toIfaceBooleanFormula :: BooleanFormula IfLclName -> IfaceBooleanFormula -toIfaceBooleanFormula = \case - Var nm -> IfVar nm - And bfs -> IfAnd (map (toIfaceBooleanFormula . unLoc) bfs) - Or bfs -> IfOr (map (toIfaceBooleanFormula . unLoc) bfs) - Parens bf -> IfParens (toIfaceBooleanFormula . unLoc $ bf) ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -2041,8 +2041,9 @@ instance ToHie PendingRnSplice where instance ToHie PendingTcSplice where toHie (PendingTcSplice _ e) = toHie e -instance ToHie (LBooleanFormula (LocatedN Name)) where - toHie (L span form) = concatM $ makeNode form (locA span) : case form of +instance (HiePass p, Data (IdGhcP p)) + => ToHie (GenLocated SrcSpanAnnL (BooleanFormula (GhcPass p))) where + toHie (L span form) = concatM $ makeNode form (locA span) : case form of Var a -> [ toHie $ C Use a ] ===================================== compiler/GHC/Iface/Syntax.hs ===================================== @@ -35,10 +35,8 @@ module GHC.Iface.Syntax ( -- Misc ifaceDeclImplicitBndrs, visibleIfConDecls, ifaceDeclFingerprints, - fromIfaceBooleanFormula, fromIfaceWarnings, fromIfaceWarningTxt, - -- Free Names freeNamesIfDecl, freeNamesIfRule, freeNamesIfFamInst, freeNamesIfConDecls, @@ -51,7 +49,10 @@ module GHC.Iface.Syntax ( import GHC.Prelude +import GHC.Builtin.Names(mkUnboundName) import GHC.Data.FastString +import GHC.Data.BooleanFormula (pprBooleanFormula, isTrue) + import GHC.Builtin.Names ( unrestrictedFunTyConKey, liftedTypeKindTyConKey, constraintKindTyConKey ) import GHC.Types.Unique ( hasKey ) @@ -62,9 +63,9 @@ import GHC.Types.Demand import GHC.Types.Cpr import GHC.Core.Class import GHC.Types.FieldLabel -import GHC.Types.Name.Set import GHC.Core.Coercion.Axiom ( BranchIndex ) import GHC.Types.Name +import GHC.Types.Name.Set import GHC.Types.Name.Reader import GHC.Types.CostCentre import GHC.Types.Literal @@ -75,7 +76,6 @@ import GHC.Unit.Module import GHC.Unit.Module.Warnings import GHC.Types.SrcLoc import GHC.Types.SourceText -import GHC.Data.BooleanFormula ( BooleanFormula(..), pprBooleanFormula, isTrue ) import GHC.Types.Var( VarBndr(..), binderVar, tyVarSpecToBinders, visArgTypeLike ) import GHC.Core.TyCon ( Role (..), Injectivity(..), tyConBndrVisForAllTyFlag ) import GHC.Core.DataCon (SrcStrictness(..), SrcUnpackedness(..)) @@ -94,6 +94,8 @@ import GHC.Utils.Panic import GHC.Utils.Misc( dropList, filterByList, notNull, unzipWith, seqList, zipWithEqual ) +import Language.Haskell.Syntax.BooleanFormula(BooleanFormula(..)) + import Control.Monad import System.IO.Unsafe import Control.DeepSeq @@ -213,18 +215,14 @@ data IfaceClassBody ifMinDef :: IfaceBooleanFormula -- Minimal complete definition } +-- See also 'BooleanFormula' data IfaceBooleanFormula = IfVar IfLclName | IfAnd [IfaceBooleanFormula] | IfOr [IfaceBooleanFormula] | IfParens IfaceBooleanFormula + deriving Eq -fromIfaceBooleanFormula :: IfaceBooleanFormula -> BooleanFormula IfLclName -fromIfaceBooleanFormula = \case - IfVar nm -> Var nm - IfAnd ibfs -> And (map (noLocA . fromIfaceBooleanFormula) ibfs) - IfOr ibfs -> Or (map (noLocA . fromIfaceBooleanFormula) ibfs) - IfParens ibf -> Parens (noLocA . fromIfaceBooleanFormula $ ibf) data IfaceTyConParent = IfNoParent @@ -1039,13 +1037,21 @@ pprIfaceDecl ss (IfaceClass { ifName = clas | showSub ss sg = Just $ pprIfaceClassOp ss sg | otherwise = Nothing - pprMinDef :: BooleanFormula IfLclName -> SDoc + pprMinDef :: BooleanFormula GhcRn -> SDoc pprMinDef minDef = ppUnless (isTrue minDef) $ -- hide empty definitions text "{-# MINIMAL" <+> pprBooleanFormula - (\_ def -> cparen (isLexSym def) (ppr def)) 0 (fmap ifLclNameFS minDef) <+> + (\_ def -> let fs = getOccFS def in cparen (isLexSym fs) (ppr fs)) 0 minDef <+> text "#-}" + fromIfaceBooleanFormula :: IfaceBooleanFormula -> BooleanFormula GhcRn + -- `mkUnboundName` here is fine because the Name generated is only used for pretty printing and nothing else. + fromIfaceBooleanFormula (IfVar nm ) = Var $ noLocA . mkUnboundName . mkVarOccFS . ifLclNameFS $ nm + fromIfaceBooleanFormula (IfAnd bfs ) = And $ map (noLocA . fromIfaceBooleanFormula) bfs + fromIfaceBooleanFormula (IfOr bfs ) = Or $ map (noLocA . fromIfaceBooleanFormula) bfs + fromIfaceBooleanFormula (IfParens bf) = Parens $ (noLocA . fromIfaceBooleanFormula) bf + + -- See Note [Suppressing binder signatures] in GHC.Iface.Type suppress_bndr_sig = SuppressBndrSig True ===================================== compiler/GHC/IfaceToCore.hs ===================================== @@ -32,6 +32,7 @@ module GHC.IfaceToCore ( hydrateCgBreakInfo ) where + import GHC.Prelude import GHC.ByteCode.Types @@ -43,7 +44,6 @@ import GHC.Driver.Config.Core.Lint ( initLintConfig ) import GHC.Builtin.Types.Literals(typeNatCoAxiomRules) import GHC.Builtin.Types -import GHC.Iface.Decl (toIfaceBooleanFormula) import GHC.Iface.Syntax import GHC.Iface.Load import GHC.Iface.Env @@ -123,20 +123,26 @@ import GHC.Types.Tickish import GHC.Types.TyThing import GHC.Types.Error +import GHC.Parser.Annotation (noLocA) + +import GHC.Hs.Extension ( GhcRn ) + import GHC.Fingerprint -import qualified GHC.Data.BooleanFormula as BF import Control.Monad -import GHC.Parser.Annotation import GHC.Driver.Env.KnotVars import GHC.Unit.Module.WholeCoreBindings import Data.IORef import Data.Foldable import Data.Function ( on ) +import Data.List(nub) import Data.List.NonEmpty ( NonEmpty ) import qualified Data.List.NonEmpty as NE import GHC.Builtin.Names (ioTyConName, rOOT_MAIN) import GHC.Iface.Errors.Types + +import Language.Haskell.Syntax.BooleanFormula (BooleanFormula) +import Language.Haskell.Syntax.BooleanFormula qualified as BF(BooleanFormula(..)) import Language.Haskell.Syntax.Extension (NoExtField (NoExtField)) {- @@ -297,14 +303,38 @@ mergeIfaceDecl d1 d2 plusNameEnv_C mergeIfaceClassOp (mkNameEnv [ (n, op) | op@(IfaceClassOp n _ _) <- ops1 ]) (mkNameEnv [ (n, op) | op@(IfaceClassOp n _ _) <- ops2 ]) + in d1 { ifBody = (ifBody d1) { ifSigs = ops, - ifMinDef = toIfaceBooleanFormula . BF.mkOr . map (noLocA . fromIfaceBooleanFormula) $ [bf1, bf2] + ifMinDef = mkOr [ bf1, bf2] } } `withRolesFrom` d2 -- It doesn't matter; we'll check for consistency later when -- we merge, see 'mergeSignatures' | otherwise = d1 `withRolesFrom` d2 + where + -- The reason we need to duplicate mkOr here, instead of + -- using BooleanFormula's mkOr and just doing the loop like: + -- `toIfaceBooleanFormula . mkOr . fromIfaceBooleanFormula` + -- is quite subtle. Say we have the following minimal pragma: + -- {-# MINIMAL f | g #-}. If we use fromIfaceBooleanFormula + -- first, we will end up doing + -- `nub [Var (mkUnboundName f), Var (mkUnboundName g)]`, + -- which might seem fine, but Name equallity is decided by + -- their Unique, which will be identical since mkUnboundName + -- just stuffs the mkUnboundKey unqiue into both. + -- So the result will be {-# MINIMAL f #-}, oopsie. + -- Duplication it is. + mkOr :: [IfaceBooleanFormula] -> IfaceBooleanFormula + mkOr = maybe (IfAnd []) (mkOr' . nub . concat) . mapM fromOr + where + -- See Note [Simplification of BooleanFormulas] + fromOr bf = case bf of + (IfOr xs) -> Just xs + (IfAnd []) -> Nothing + _ -> Just [bf] + mkOr' [x] = x + mkOr' xs = IfOr xs -- Note [Role merging] -- ~~~~~~~~~~~~~~~~~~~ @@ -795,8 +825,7 @@ tc_iface_decl _parent ignore_prags ; sigs <- mapM tc_sig rdr_sigs ; fds <- mapM tc_fd rdr_fds ; traceIf (text "tc-iface-class3" <+> ppr tc_name) - ; let mindef_occ = fromIfaceBooleanFormula if_mindef - ; mindef <- traverse (lookupIfaceTop . mkVarOccFS . ifLclNameFS) mindef_occ + ; mindef <- tc_boolean_formula if_mindef ; cls <- fixM $ \ cls -> do { ats <- mapM (tc_at cls) rdr_ats ; traceIf (text "tc-iface-class4" <+> ppr tc_name) @@ -845,6 +874,12 @@ tc_iface_decl _parent ignore_prags -- e.g. type AT a; type AT b = AT [b] #8002 return (ATI tc mb_def) + tc_boolean_formula :: IfaceBooleanFormula -> IfL (BooleanFormula GhcRn) + tc_boolean_formula (IfAnd ibfs ) = BF.And . map noLocA <$> traverse tc_boolean_formula ibfs + tc_boolean_formula (IfOr ibfs ) = BF.Or . map noLocA <$> traverse tc_boolean_formula ibfs + tc_boolean_formula (IfParens ibf) = BF.Parens . noLocA <$> tc_boolean_formula ibf + tc_boolean_formula (IfVar nm ) = BF.Var . noLocA <$> (lookupIfaceTop . mkVarOccFS . ifLclNameFS $ nm) + mk_sc_doc pred = text "Superclass" <+> ppr pred mk_at_doc tc = text "Associated type" <+> ppr tc mk_op_doc op_name op_ty = text "Class op" <+> sep [ppr op_name, ppr op_ty] ===================================== compiler/GHC/Parser.y ===================================== @@ -39,9 +39,9 @@ module GHC.Parser where -- base -import Control.Monad ( unless, liftM, when, (<=<) ) +import Control.Monad ( unless, liftM, when, (<=<) ) import GHC.Exts -import Data.Maybe ( maybeToList ) +import Data.Maybe ( maybeToList ) import Data.List.NonEmpty ( NonEmpty(..) ) import qualified Data.List.NonEmpty as NE import qualified Prelude -- for happy-generated code @@ -3710,27 +3710,27 @@ overloaded_label :: { Located (SourceText, FastString) } ----------------------------------------------------------------------------- -- Warnings and deprecations -name_boolformula_opt :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_opt :: { LBooleanFormula GhcPs } : name_boolformula { $1 } | {- empty -} { noLocA mkTrue } -name_boolformula :: { LBooleanFormula (LocatedN RdrName) } - : name_boolformula_and { $1 } +name_boolformula :: { LBooleanFormula GhcPs } + : name_boolformula_and { $1 } | name_boolformula_and '|' name_boolformula {% do { h <- addTrailingVbarL $1 (epTok $2) ; return (sLLa $1 $> (Or [h,$3])) } } -name_boolformula_and :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_and :: { LBooleanFormula GhcPs } : name_boolformula_and_list { sLLa (head $1) (last $1) (And ($1)) } -name_boolformula_and_list :: { [LBooleanFormula (LocatedN RdrName)] } +name_boolformula_and_list :: { [LBooleanFormula GhcPs] } : name_boolformula_atom { [$1] } | name_boolformula_atom ',' name_boolformula_and_list {% do { h <- addTrailingCommaL $1 (epTok $2) ; return (h : $3) } } -name_boolformula_atom :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_atom :: { LBooleanFormula GhcPs } : '(' name_boolformula ')' {% amsr (sLL $1 $> (Parens $2)) (AnnList Nothing (ListParens (epTok $1) (epTok $3)) [] noAnn []) } | name_var { sL1a $1 (Var $1) } @@ -4704,4 +4704,4 @@ combineHasLocs a b = combineSrcSpans (getHasLoc a) (getHasLoc b) fromTrailingN :: SrcSpanAnnN -> SrcSpanAnnA fromTrailingN (EpAnn anc ann cs) = EpAnn anc (AnnListItem (nann_trailing ann)) cs -} +} \ No newline at end of file ===================================== compiler/GHC/Rename/Bind.hs ===================================== @@ -80,6 +80,7 @@ import Control.Monad import Data.List ( partition ) import Data.List.NonEmpty ( NonEmpty(..) ) import GHC.Types.Unique.DSet (mkUniqDSet) +import GHC.Data.BooleanFormula (bfTraverse) {- -- ToDo: Put the annotations into the monad, so that they arrive in the proper @@ -1137,7 +1138,7 @@ renameSig ctxt (FixSig _ fsig) ; return (FixSig noAnn new_fsig, emptyFVs) } renameSig ctxt sig@(MinimalSig (_, s) (L l bf)) - = do new_bf <- traverse (lookupSigOccRnN ctxt sig) bf + = do new_bf <- bfTraverse (lookupSigOccRnN ctxt sig) bf return (MinimalSig (noAnn, s) (L l new_bf), emptyFVs) renameSig ctxt sig@(PatSynSig _ vs ty) ===================================== compiler/GHC/Tc/TyCl/Class.hs ===================================== @@ -344,7 +344,7 @@ tcClassMinimalDef _clas sigs op_info where -- By default require all methods without a default implementation defMindef :: ClassMinimalDef - defMindef = mkAnd [ noLocA (mkVar name) + defMindef = mkAnd [ noLocA (mkVar (noLocA name)) | (name, _, Nothing) <- op_info ] instantiateMethod :: Class -> TcId -> [TcType] -> TcType @@ -402,8 +402,8 @@ findMinimalDef :: [LSig GhcRn] -> Maybe ClassMinimalDef findMinimalDef = firstJusts . map toMinimalDef where toMinimalDef :: LSig GhcRn -> Maybe ClassMinimalDef - toMinimalDef (L _ (MinimalSig _ (L _ bf))) = Just (fmap unLoc bf) - toMinimalDef _ = Nothing + toMinimalDef (L _ (MinimalSig _ (L _ bf))) = Just bf + toMinimalDef _ = Nothing {- Note [Polymorphic methods] @@ -603,4 +603,4 @@ warnMissingAT name $ InvalidAssoc $ InvalidAssocInstance $ AssocInstanceMissing name ; diagnosticTc (warn && hsc_src == HsSrcFile) diag - } + } \ No newline at end of file ===================================== compiler/GHC/Tc/TyCl/Instance.hs ===================================== @@ -1889,7 +1889,7 @@ tcMethods skol_info dfun_id clas tyvars dfun_ev_vars inst_tys -- -- See Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors, -- point (D). - whenIsJust (isUnsatisfied methodExists (classMinimalDef clas)) $ + whenIsJust (isUnsatisfied (methodExists . unLoc) (classMinimalDef clas)) $ warnUnsatisfiedMinimalDefinition methodExists meth = isJust (findMethodBind meth binds prag_fn) ===================================== compiler/Language/Haskell/Syntax/Binds.hs ===================================== @@ -26,15 +26,13 @@ import {-# SOURCE #-} Language.Haskell.Syntax.Expr ( LHsExpr , MatchGroup , GRHSs ) -import {-# SOURCE #-} Language.Haskell.Syntax.Pat - ( LPat ) - +import {-# SOURCE #-} Language.Haskell.Syntax.Pat( LPat ) +import Language.Haskell.Syntax.BooleanFormula (LBooleanFormula) import Language.Haskell.Syntax.Extension import Language.Haskell.Syntax.Type import Language.Haskell.Syntax.Basic ( Fixity ) import GHC.Types.Basic (InlinePragma) -import GHC.Data.BooleanFormula (LBooleanFormula) import GHC.Types.SourceText (StringLiteral) import Data.Void @@ -379,7 +377,7 @@ data Sig pass -- | A minimal complete definition pragma -- -- > {-# MINIMAL a | (b, c | (d | e)) #-} - | MinimalSig (XMinimalSig pass) (LBooleanFormula (LIdP pass)) + | MinimalSig (XMinimalSig pass) (LBooleanFormula pass) -- | A "set cost centre" pragma for declarations -- ===================================== compiler/Language/Haskell/Syntax/BooleanFormula.hs ===================================== @@ -0,0 +1,62 @@ +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE QuantifiedConstraints #-} + +module Language.Haskell.Syntax.BooleanFormula( + BooleanFormula(..), LBooleanFormula, + mkVar, mkFalse, mkTrue, mkBool, mkAnd, mkOr + ) where + +import Prelude hiding ( init, last ) +import Data.List ( nub ) +import Language.Haskell.Syntax.Extension (XRec, UnXRec (..), LIdP) + + +-- types +type LBooleanFormula p = XRec p (BooleanFormula p) +data BooleanFormula p = Var (LIdP p) | And [LBooleanFormula p] | Or [LBooleanFormula p] + | Parens (LBooleanFormula p) + +-- instances +deriving instance (Eq (LIdP p), Eq (LBooleanFormula p)) => Eq (BooleanFormula p) + +-- smart constructors +-- see note [Simplification of BooleanFormulas] +mkVar :: LIdP p -> BooleanFormula p +mkVar = Var + +mkFalse, mkTrue :: BooleanFormula p +mkFalse = Or [] +mkTrue = And [] + +-- Convert a Bool to a BooleanFormula +mkBool :: Bool -> BooleanFormula p +mkBool False = mkFalse +mkBool True = mkTrue + +-- Make a conjunction, and try to simplify +mkAnd :: forall p. (UnXRec p, Eq (LIdP p), Eq (LBooleanFormula p)) => [LBooleanFormula p] -> BooleanFormula p +mkAnd = maybe mkFalse (mkAnd' . nub . concat) . mapM fromAnd + where + -- See Note [Simplification of BooleanFormulas] + fromAnd :: LBooleanFormula p -> Maybe [LBooleanFormula p] + fromAnd bf = case unXRec @p bf of + (And xs) -> Just xs + -- assume that xs are already simplified + -- otherwise we would need: fromAnd (And xs) = concat <$> traverse fromAnd xs + (Or []) -> Nothing + -- in case of False we bail out, And [..,mkFalse,..] == mkFalse + _ -> Just [bf] + mkAnd' [x] = unXRec @p x + mkAnd' xs = And xs + +mkOr :: forall p. (UnXRec p, Eq (LIdP p), Eq (LBooleanFormula p)) => [LBooleanFormula p] -> BooleanFormula p +mkOr = maybe mkTrue (mkOr' . nub . concat) . mapM fromOr + where + -- See Note [Simplification of BooleanFormulas] + fromOr bf = case unXRec @p bf of + (Or xs) -> Just xs + (And []) -> Nothing + _ -> Just [bf] + mkOr' [x] = unXRec @p x + mkOr' xs = Or xs ===================================== compiler/ghc.cabal.in ===================================== @@ -993,6 +993,7 @@ Library Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds + Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -234,6 +234,7 @@ GHC.Utils.Word64 Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds +Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -258,6 +258,7 @@ GHC.Utils.Word64 Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds +Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== utils/check-exact/ExactPrint.hs ===================================== @@ -2807,7 +2807,7 @@ instance ExactPrint (AnnDecl GhcPs) where -- --------------------------------------------------------------------- -instance ExactPrint (BF.BooleanFormula (LocatedN RdrName)) where +instance ExactPrint (BF.BooleanFormula GhcPs) where getAnnotationEntry = const NoEntryVal setAnnotationAnchor a _ _ _ = a @@ -4527,7 +4527,7 @@ instance ExactPrint (LocatedL [LocatedA (ConDeclField GhcPs)]) where (an', fs') <- markAnnList an (markAnnotated fs) return (L an' fs') -instance ExactPrint (LocatedL (BF.BooleanFormula (LocatedN RdrName))) where +instance ExactPrint (LocatedL (BF.BooleanFormula GhcPs)) where getAnnotationEntry = entryFromLocatedA setAnnotationAnchor = setAnchorAn exact (L an bf) = do ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -45,6 +45,7 @@ import GHC.Builtin.Types , promotedNilDataCon , unitTy ) + import GHC.Builtin.Types.Prim (alphaTyVars) import GHC.Core.Class import GHC.Core.Coercion.Axiom @@ -176,7 +177,7 @@ tyThingToLHsDecl prr t = case t of $ snd $ classTvsFds cl , tcdSigs = - noLocA (MinimalSig (noAnn, NoSourceText) . noLocA . fmap noLocA $ classMinimalDef cl) + noLocA (MinimalSig (noAnn, NoSourceText) . noLocA $ classMinimalDef cl) : [ noLocA tcdSig | clsOp <- classOpItems cl , tcdSig <- synifyTcIdSig vs clsOp ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -19,6 +19,8 @@ -- Portability : portable module Haddock.Interface.Rename (renameInterface) where +import Prelude hiding (mapM) + import Control.Applicative () import Control.DeepSeq (force) import Control.Monad hiding (mapM) @@ -28,12 +30,13 @@ import Data.Foldable (traverse_) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Data.Traversable (mapM) + import GHC hiding (NoLink) import GHC.Builtin.Types (eqTyCon_RDR, tupleDataConName, tupleTyConName) import GHC.Types.Basic (Boxity (..), TopLevelFlag (..), TupleSort (..)) import GHC.Types.Name import GHC.Types.Name.Reader (RdrName (Exact)) -import Prelude hiding (mapM) +import Language.Haskell.Syntax.BooleanFormula(BooleanFormula(..)) import Haddock.Backends.Hoogle (ppExportD) import Haddock.GhcUtils @@ -770,11 +773,22 @@ renameSig sig = case sig of lnames' <- mapM renameNameL lnames return $ FixSig noExtField (FixitySig noExtField lnames' fixity) MinimalSig _ (L l s) -> do - s' <- traverse (traverse lookupRn) s + s' <- bfTraverse (traverse lookupRn) s return $ MinimalSig noExtField (L l s') -- we have filtered out all other kinds of signatures in Interface.Create _ -> error "expected TypeSig" +bfTraverse :: Applicative f + => (LIdP (GhcPass p) -> f (LIdP DocNameI)) + -> BooleanFormula (GhcPass p) + -> f (BooleanFormula DocNameI) +bfTraverse f = go + where + go (Var a ) = Var <$> f a + go (And bfs) = And <$> traverse @[] (traverse go) bfs + go (Or bfs) = Or <$> traverse @[] (traverse go) bfs + go (Parens bf ) = Parens <$> traverse go bf + renameForD :: ForeignDecl GhcRn -> RnM (ForeignDecl DocNameI) renameForD (ForeignImport _ lname ltype x) = do lname' <- renameNameL lname ===================================== utils/haddock/haddock-api/src/Haddock/Types.hs ===================================== @@ -53,6 +53,7 @@ import qualified Data.Map as Map import qualified Data.Set as Set import GHC import qualified GHC.Data.Strict as Strict +import GHC.Data.BooleanFormula (BooleanFormula) import GHC.Driver.Session (Language) import qualified GHC.LanguageExtensions as LangExt import GHC.Core.InstEnv (is_dfun_name) @@ -819,6 +820,7 @@ type instance Anno (HsDecl DocNameI) = SrcSpanAnnA type instance Anno (FamilyResultSig DocNameI) = EpAnn NoEpAnns type instance Anno (HsOuterTyVarBndrs Specificity DocNameI) = SrcSpanAnnA type instance Anno (HsSigType DocNameI) = SrcSpanAnnA +type instance Anno (BooleanFormula DocNameI) = SrcSpanAnnL type XRecCond a = ( XParTy a ~ (EpToken "(", EpToken ")") View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97f600c647eb7a657a1c838a33dba59e18320164 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97f600c647eb7a657a1c838a33dba59e18320164 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 16:57:04 2024 From: gitlab at gitlab.haskell.org (sheaf (@sheaf)) Date: Mon, 04 Nov 2024 11:57:04 -0500 Subject: [Git][ghc/ghc][wip/T24359] fix exact-print for SpecPragE Message-ID: <6728fce09c739_2a48fe42b88c865d9@gitlab.mail> sheaf pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 390b6b02 by sheaf at 2024-11-04T17:56:56+01:00 fix exact-print for SpecPragE - - - - - 1 changed file: - utils/check-exact/ExactPrint.hs Changes: ===================================== utils/check-exact/ExactPrint.hs ===================================== @@ -1145,17 +1145,15 @@ lhsCaseAnnOf k parent = fmap (\new -> parent { hsCaseAnnOf = new }) -- --------------------------------------------------------------------- --- data HsRuleAnn --- = HsRuleAnn --- { ra_tyanns :: Maybe (TokForall, EpToken ".") --- , ra_tmanns :: Maybe (TokForall, EpToken ".") --- , ra_equal :: EpToken "=" --- , ra_rest :: ActivationAnn --- } deriving (Data, Eq) - -lra_tyanns :: Lens HsRuleBndrsAnn (Maybe (TokForall, EpToken ".")) -lra_tyanns k parent = fmap (\new -> parent { ra_tyanns = new }) - (k (ra_tyanns parent)) +-- data HsRuleBndrsAnn +-- = HsRuleBndrsAnn +-- { rb_tyanns :: Maybe (TokForall, EpToken ".") +-- , rb_tmanns :: Maybe (TokForall, EpToken ".") +-- } + +lrb_tyanns :: Lens HsRuleBndrsAnn (Maybe (TokForall, EpToken ".")) +lrb_tyanns k parent = fmap (\new -> parent { rb_tyanns = new }) + (k (rb_tyanns parent)) ff :: Maybe (a,b) -> (Maybe a,Maybe b) ff Nothing = (Nothing, Nothing) @@ -1172,21 +1170,21 @@ lff k parent = fmap (\new -> gg new) (k (ff parent)) -- (.) :: Lens' a b -> Lens' b c -> Lens' a c -lra_tyanns_fst :: Lens HsRuleBndrsAnn (Maybe TokForall) -lra_tyanns_fst = lra_tyanns . lff . lfst +lrb_tyanns_fst :: Lens HsRuleBndrsAnn (Maybe TokForall) +lrb_tyanns_fst = lrb_tyanns . lff . lfst -lra_tyanns_snd :: Lens HsRuleBndrsAnn (Maybe (EpToken ".")) -lra_tyanns_snd = lra_tyanns . lff . lsnd +lrb_tyanns_snd :: Lens HsRuleBndrsAnn (Maybe (EpToken ".")) +lrb_tyanns_snd = lrb_tyanns . lff . lsnd -lra_tmanns :: Lens HsRuleBndrsAnn (Maybe (TokForall, EpToken ".")) -lra_tmanns k parent = fmap (\new -> parent { ra_tmanns = new }) - (k (ra_tmanns parent)) +lrb_tmanns :: Lens HsRuleBndrsAnn (Maybe (TokForall, EpToken ".")) +lrb_tmanns k parent = fmap (\new -> parent { rb_tmanns = new }) + (k (rb_tmanns parent)) -lra_tmanns_fst :: Lens HsRuleBndrsAnn (Maybe TokForall) -lra_tmanns_fst = lra_tmanns . lff . lfst +lrb_tmanns_fst :: Lens HsRuleBndrsAnn (Maybe TokForall) +lrb_tmanns_fst = lrb_tmanns . lff . lfst -lra_tmanns_snd :: Lens HsRuleBndrsAnn (Maybe (EpToken ".")) -lra_tmanns_snd = lra_tmanns . lff . lsnd +lrb_tmanns_snd :: Lens HsRuleBndrsAnn (Maybe (EpToken ".")) +lrb_tmanns_snd = lrb_tmanns . lff . lsnd -- --------------------------------------------------------------------- -- data GrhsAnn @@ -2030,25 +2028,14 @@ instance ExactPrint (RuleDecl GhcPs) where getAnnotationEntry _ = NoEntryVal setAnnotationAnchor a _ _ _ = a - exact (HsRule (an,nsrc) (L ln n) act bndrs lhs rhs) = do + exact (HsRule ((ann_act, ann_eq),nsrc) (L ln n) act bndrs lhs rhs) = do (L ln' _) <- markAnnotated (L ln (nsrc, n)) - (an1, bndrs') <- - case bndrs of - Nothing -> return (an0, Nothing) - Just bndrs -> do - an1 <- markLensFun an0 lra_tyanns_fst (\mt -> mapM markEpUniToken mt) -- AnnForall - bndrs' <- mapM markAnnotated bndrs - an2 <- markLensFun an1 lra_tyanns_snd (\mt -> mapM markEpToken mt) -- AnnDot - return (an2, Just bndrs') + ann_act' <- markActivation ann_act act + bndrs' <- markAnnotated bndrs lhs' <- markAnnotated lhs - return (HsRule (an1,nsrc) (L ln' n) act bndrs' lhs' rhs') - - -markActivationL :: (Monad m, Monoid w) - => a -> Lens a ActivationAnn -> Activation -> EP w m a -markActivationL a l act = do - new <- markActivation (view l a) act - return (set l new a) + ann_eq' <- markEpToken ann_eq + rhs' <- markAnnotated rhs + return (HsRule ((ann_act', ann_eq'),nsrc) (L ln' n) act bndrs' lhs' rhs') markActivation :: (Monad m, Monoid w) => ActivationAnn -> Activation -> EP w m ActivationAnn @@ -2123,19 +2110,19 @@ instance ExactPrint (RuleBndrs GhcPs) where getAnnotationEntry = const NoEntryVal setAnnotationAnchor a _ _ _ = a exact (RuleBndrs an0 mtybndrs termbndrs) = do - (an1, mtybndrs') <- + (an2, mtybndrs') <- case mtybndrs of Nothing -> return (an0, Nothing) Just bndrs -> do - an1 <- markLensMAA' an0 lra_tyanns_fst -- AnnForall + an1 <- markLensFun an0 lrb_tyanns_fst (traverse markEpUniToken) -- AnnForall bndrs' <- mapM markAnnotated bndrs - an2 <- markLensMAA' an1 lra_tyanns_snd -- AnnDot + an2 <- markLensFun an1 lrb_tyanns_snd (traverse markEpToken) -- AnnDot return (an2, Just bndrs') - an2 <- markLensMAA' an1 lra_tmanns_fst -- AnnForall + an3 <- markLensFun an2 lrb_tmanns_fst (traverse markEpUniToken) -- AnnForall termbndrs' <- mapM markAnnotated termbndrs - an3 <- markLensMAA' an2 lra_tmanns_snd -- AnnDot - return (RuleBndrs an3 mtybndrs' termbndrs') + an4 <- markLensFun an3 lrb_tmanns_snd (traverse markEpToken) -- AnnDot + return (RuleBndrs an4 mtybndrs' termbndrs') -- --------------------------------------------------------------------- @@ -2704,21 +2691,21 @@ instance ExactPrint (Sig GhcPs) where o' <- markAnnOpen'' o (inl_src inl) "{-# SPECIALISE" -- Note: may be {-# SPECIALISE_INLINE act' <- markActivation act (inl_act inl) ln' <- markAnnotated ln - dc' <- markEpUniToken dc + dc' <- traverse markEpUniToken dc typs' <- markAnnotated typs c' <- markEpToken c return (SpecSig (AnnSpecSig o' c' dc' act') ln' typs' inl) - exact (SpecSigE an bndrs expr inl) = do - an0 <- markAnnOpen an (inl_src inl) "{-# SPECIALISE" -- Note: may be {-# SPECIALISE_INLINE - an1 <- markActivation an0 lidl (inl_act inl) + exact (SpecSigE (AnnSpecSig o c dc act) bndrs expr inl) = do + o' <- markAnnOpen'' o (inl_src inl) "{-# SPECIALISE" -- Note: may be {-# SPECIALISE_INLINE + act' <- markActivation act (inl_act inl) bndrs' <- markAnnotated bndrs - an2 <- markEpAnnL an1 lidl AnnDcolon + dc' <- traverse markEpUniToken dc expr' <- markAnnotated expr - an3 <- markEpAnnLMS'' an2 lidl AnnClose (Just "#-}") - return (SpecSigE an3 bndrs' expr' inl) + c' <- markEpToken c + return (SpecSigE (AnnSpecSig o' c' dc' act') bndrs' expr' inl) - exact (SpecInstSig (an,src) typ) = do + exact (SpecInstSig ((o,i,c),src) typ) = do o' <- markAnnOpen'' o src "{-# SPECIALISE" i' <- markEpToken i typ' <- markAnnotated typ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/390b6b02c2b0c921059ea413b40af2b6ca82c90c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/390b6b02c2b0c921059ea413b40af2b6ca82c90c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 17:34:19 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 04 Nov 2024 12:34:19 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Handle the special ghc-prim:GHC.Prim module in the compiler Message-ID: <6729059b34018_2a48fe64e04c93637@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 8cd79f1e by Sylvain Henry at 2024-11-04T12:34:06-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - 7db46b9e by Andreas Klebinger at 2024-11-04T12:34:07-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - 9ebd70bc by Peter Trommler at 2024-11-04T12:34:07-05:00 PPC NCG: Implement fmin and fmax - - - - - 12 changed files: - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Tc/Module.hs - docs/users_guide/9.14.1-notes.rst - hadrian/src/Rules/Documentation.hs - libraries/ghc-heap/GHC/Exts/Heap.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs - libraries/ghc-prim/Setup.hs - libraries/ghc-prim/ghc-prim.cabal Changes: ===================================== compiler/GHC/CmmToAsm/PPC/CodeGen.hs ===================================== @@ -398,7 +398,7 @@ iselExpr64 expr platform <- getPlatform pprPanic "iselExpr64(powerpc)" (pdoc platform expr) - +data MinOrMax = Min | Max getRegister :: CmmExpr -> NatM Register getRegister e = do config <- getConfig @@ -589,8 +589,9 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps MO_F_Sub w -> triv_float w FSUB MO_F_Mul w -> triv_float w FMUL MO_F_Quot w -> triv_float w FDIV - MO_F_Min w -> triv_float w FMIN - MO_F_Max w -> triv_float w FMAX + + MO_F_Min w -> minmax_float Min w x y + MO_F_Max w -> minmax_float Max w x y -- optimize addition with 32-bit immediate -- (needed for PIC) @@ -696,6 +697,31 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps code <- remainderCode rep sgn tmp x y return (Any fmt code) + minmax_float :: MinOrMax -> Width -> CmmExpr -> CmmExpr -> NatM Register + minmax_float m w x y = + do + (src1, src1Code) <- getSomeReg x + (src2, src2Code) <- getSomeReg y + l1 <- getBlockIdNat + l2 <- getBlockIdNat + end <- getBlockIdNat + let cond = case m of + Min -> LTT + Max -> GTT + let code dst = src1Code `appOL` src2Code `appOL` + toOL [ FCMP src1 src2 + , BCC cond l1 Nothing + , BCC ALWAYS l2 Nothing + , NEWBLOCK l2 + , MR dst src2 + , BCC ALWAYS end Nothing + , NEWBLOCK l1 + , MR dst src1 + , BCC ALWAYS end Nothing + , NEWBLOCK end + ] + return (Any (floatFormat w) code) + getRegister' _ _ (CmmMachOp mop [x, y, z]) -- ternary PrimOps = case mop of ===================================== compiler/GHC/CmmToAsm/PPC/Instr.hs ===================================== @@ -277,8 +277,6 @@ data Instr | FDIV Format Reg Reg Reg | FABS Reg Reg -- abs is the same for single and double | FNEG Reg Reg -- negate is the same for single and double prec. - | FMIN Format Reg Reg Reg - | FMAX Format Reg Reg Reg -- | Fused multiply-add instructions. -- ===================================== compiler/GHC/CmmToAsm/PPC/Ppr.hs ===================================== @@ -941,12 +941,6 @@ pprInstr platform instr = case instr of FNEG reg1 reg2 -> pprUnary (text "fneg") reg1 reg2 - FMIN fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmin") fmt reg1 reg2 reg3 - - FMAX fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmax") fmt reg1 reg2 reg3 - FMADD signs fmt dst ra rc rb -> pprTernaryF (pprFMASign signs) fmt dst ra rc rb ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -565,7 +565,7 @@ runHscBackendPhase pipe_env hsc_env mod_name src_flavour location result = do -- In the case of hs-boot files, generate a dummy .o-boot -- stamp file for the benefit of Make HsBootFile -> touchObjectFile o_file - HsSrcFile -> panic "HscUpdate not relevant for HscSrcFile" + HsSrcFile -> touchObjectFile o_file -- for ghc-prim:GHC.Prim -- MP: I wonder if there are any lurking bugs here because we -- return Linkable == emptyHomeModInfoLinkable, despite the fact that there is a ===================================== compiler/GHC/Runtime/Heap/Inspect.hs ===================================== @@ -128,6 +128,11 @@ isFullyEvaluatedTerm NewtypeWrap{wrapped_term=t} = isFullyEvaluatedTerm t isFullyEvaluatedTerm RefWrap{wrapped_term=t} = isFullyEvaluatedTerm t isFullyEvaluatedTerm _ = False +-- | Gives an error if the term doesn't have subterms +expectSubTerms :: Term -> [Term] +expectSubTerms (Term { subTerms = subTerms} ) = subTerms +expectSubTerms _ = panic "expectSubTerms" + instance Outputable (Term) where ppr t | Just doc <- cPprTerm cPprTermBase t = doc | otherwise = panic "Outputable Term instance" @@ -332,8 +337,8 @@ cPprTermBase :: forall m. Monad m => CustomTermPrinter m cPprTermBase y = [ ifTerm (isTupleTy.ty) (\_p -> liftM (parens . hcat . punctuate comma) . mapM (y (-1)) - . subTerms) - , ifTerm (\t -> isTyCon listTyCon (ty t) && subTerms t `lengthIs` 2) + . expectSubTerms) + , ifTerm (\t -> isTyCon listTyCon (ty t) && expectSubTerms t `lengthIs` 2) ppr_list , ifTerm' (isTyCon intTyCon . ty) ppr_int , ifTerm' (isTyCon charTyCon . ty) ppr_char @@ -768,7 +773,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do traceTR (text "Gave up reconstructing a term after" <> int max_depth <> text " steps") clos <- trIO $ GHCi.getClosure interp a - return (Suspension (tipe (info clos)) my_ty a Nothing) + return (Suspension (tipe (getClosureInfoTbl clos)) my_ty a Nothing) go !max_depth my_ty old_ty a = do let monomorphic = not(isTyVarTy my_ty) -- This ^^^ is a convention. The ancestor tests for @@ -864,7 +869,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do _ -> do traceTR (text "Unknown closure:" <+> text (show (fmap (const ()) clos))) - return (Suspension (tipe (info clos)) my_ty a Nothing) + return (Suspension (tipe (getClosureInfoTbl clos)) my_ty a Nothing) -- insert NewtypeWraps around newtypes expandNewtypes = foldTerm idTermFold { fTerm = worker } where @@ -918,7 +923,7 @@ extractSubTerms recurse clos = liftM thdOf3 . go 0 0 go_rep ptr_i arr_i ty rep | isGcPtrRep rep = do - t <- recurse ty $ (ptrArgs clos)!!ptr_i + t <- recurse ty $ (getClosurePtrArgs clos)!!ptr_i return (ptr_i + 1, arr_i, t) | otherwise = do -- This is a bit involved since we allow packing multiple fields ===================================== compiler/GHC/Tc/Module.hs ===================================== @@ -975,6 +975,13 @@ checkHiBootIface' = do { traceTc "checkHiBootIface" $ vcat [ ppr boot_type_env, ppr boot_exports ] + ; mod <- tcg_mod <$> getGblEnv + + -- don't perform type-checking for ghc-prim:GHC.Prim module. + -- The interface (see ghcPrimIface in GHC.Iface.Load) exports entities + -- not found in the module code. + ; if mod == gHC_PRIM then pure [] else do { + ; gre_env <- getGlobalRdrEnv -- Check the exports of the boot module, one by one @@ -994,7 +1001,7 @@ checkHiBootIface' ; failIfErrsM - ; return (fld_prs ++ dfun_prs) } + ; return (fld_prs ++ dfun_prs) }} where boot_dfun_names = map idName boot_dfuns ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -50,6 +50,11 @@ Cmm ``ghc-heap`` library ~~~~~~~~~~~~~~~~~~~~ +* The functions `getClosureInfoTbl_maybe`, `getClosureInfoTbl`, + `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow + reading of the relevant Closure attributes without reliance on incomplete + selectors. + ``ghc-experimental`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== hadrian/src/Rules/Documentation.hs ===================================== @@ -12,10 +12,9 @@ import Hadrian.BuildPath import Hadrian.Haskell.Cabal import Hadrian.Haskell.Cabal.Type -import Rules.Generate (ghcPrimDependencies) import Base import Context -import Expression (getContextData, interpretInContext, (?), package) +import Expression (getContextData, interpretInContext) import Flavour import Oracles.ModuleFiles import Oracles.Setting (topDirectory) @@ -287,14 +286,7 @@ buildPackageDocumentation = do dep_pkgs <- sequence [pkgConfFile (context { way = haddockWay, Context.package = p}) | (p, _) <- haddocks] - -- `ghc-prim` has a source file for 'GHC.Prim' which is generated just - -- for Haddock. We need to 'union' (instead of '++') to avoid passing - -- 'GHC.PrimopWrappers' (which unfortunately shows up in both - -- `generatedSrcs` and `vanillaSrcs`) to Haddock twice. - generatedSrcs <- interpretInContext context (Expression.package ghcPrim ? ghcPrimDependencies) - vanillaSrcs <- hsSources context - let srcs = vanillaSrcs `union` generatedSrcs - + srcs <- hsSources context need $ srcs ++ (map snd haddocks) ++ dep_pkgs statsFilesDir <- haddockStatsFilesDir ===================================== libraries/ghc-heap/GHC/Exts/Heap.hs ===================================== @@ -29,6 +29,10 @@ module GHC.Exts.Heap ( , WhyBlocked(..) , TsoFlags(..) , HasHeapRep(getClosureData) + , getClosureInfoTbl + , getClosureInfoTbl_maybe + , getClosurePtrArgs + , getClosurePtrArgs_maybe , getClosureDataFromHeapRep , getClosureDataFromHeapRepPrim ===================================== libraries/ghc-heap/GHC/Exts/Heap/Closures.hs ===================================== @@ -8,12 +8,18 @@ {-# LANGUAGE DeriveTraversable #-} -- Late cost centres introduce a thunk in the asBox function, which leads to -- an additional wrapper being added to any value placed inside a box. +-- This can be removed once our boot compiler is no longer affected by #25212 {-# OPTIONS_GHC -fno-prof-late #-} +{-# LANGUAGE NamedFieldPuns #-} module GHC.Exts.Heap.Closures ( -- * Closures Closure , GenClosure(..) + , getClosureInfoTbl + , getClosureInfoTbl_maybe + , getClosurePtrArgs + , getClosurePtrArgs_maybe , PrimType(..) , WhatNext(..) , WhyBlocked(..) @@ -67,6 +73,7 @@ import Data.Word import GHC.Exts import GHC.Generics import Numeric +import GHC.Stack (HasCallStack) ------------------------------------------------------------------------ -- Boxes @@ -382,6 +389,104 @@ data GenClosure b { wordVal :: !Word } deriving (Show, Generic, Functor, Foldable, Traversable) +-- | Get the info table for a heap closure, or Nothing for a prim value +-- +-- @since 9.14.1 +getClosureInfoTbl_maybe :: GenClosure b -> Maybe StgInfoTable +{-# INLINE getClosureInfoTbl_maybe #-} -- Ensure we can get rid of the just box +getClosureInfoTbl_maybe closure = case closure of + ConstrClosure{info} ->Just info + FunClosure{info} ->Just info + ThunkClosure{info} ->Just info + SelectorClosure{info} ->Just info + PAPClosure{info} ->Just info + APClosure{info} ->Just info + APStackClosure{info} ->Just info + IndClosure{info} ->Just info + BCOClosure{info} ->Just info + BlackholeClosure{info} ->Just info + ArrWordsClosure{info} ->Just info + MutArrClosure{info} ->Just info + SmallMutArrClosure{info} ->Just info + MVarClosure{info} ->Just info + IOPortClosure{info} ->Just info + MutVarClosure{info} ->Just info + BlockingQueueClosure{info} ->Just info + WeakClosure{info} ->Just info + TSOClosure{info} ->Just info + StackClosure{info} ->Just info + + IntClosure{} -> Nothing + WordClosure{} -> Nothing + Int64Closure{} -> Nothing + Word64Closure{} -> Nothing + AddrClosure{} -> Nothing + FloatClosure{} -> Nothing + DoubleClosure{} -> Nothing + + OtherClosure{info} -> Just info + UnsupportedClosure {info} -> Just info + + UnknownTypeWordSizedPrimitive{} -> Nothing + +-- | Partial version of getClosureInfoTbl_maybe for when we know we deal with a +-- heap closure. +-- +-- @since 9.14.1 +getClosureInfoTbl :: HasCallStack => GenClosure b -> StgInfoTable +getClosureInfoTbl closure = case getClosureInfoTbl_maybe closure of + Just info -> info + Nothing -> error "getClosureInfoTbl - Closure without info table" + +-- | Get the info table for a heap closure, or Nothing for a prim value +-- +-- @since 9.14.1 +getClosurePtrArgs_maybe :: GenClosure b -> Maybe [b] +{-# INLINE getClosurePtrArgs_maybe #-} -- Ensure we can get rid of the just box +getClosurePtrArgs_maybe closure = case closure of + ConstrClosure{ptrArgs} -> Just ptrArgs + FunClosure{ptrArgs} -> Just ptrArgs + ThunkClosure{ptrArgs} -> Just ptrArgs + SelectorClosure{} -> Nothing + PAPClosure{} -> Nothing + APClosure{} -> Nothing + APStackClosure{} -> Nothing + IndClosure{} -> Nothing + BCOClosure{} -> Nothing + BlackholeClosure{} -> Nothing + ArrWordsClosure{} -> Nothing + MutArrClosure{} -> Nothing + SmallMutArrClosure{} -> Nothing + MVarClosure{} -> Nothing + IOPortClosure{} -> Nothing + MutVarClosure{} -> Nothing + BlockingQueueClosure{} -> Nothing + WeakClosure{} -> Nothing + TSOClosure{} -> Nothing + StackClosure{} -> Nothing + + IntClosure{} -> Nothing + WordClosure{} -> Nothing + Int64Closure{} -> Nothing + Word64Closure{} -> Nothing + AddrClosure{} -> Nothing + FloatClosure{} -> Nothing + DoubleClosure{} -> Nothing + + OtherClosure{} -> Nothing + UnsupportedClosure{} -> Nothing + + UnknownTypeWordSizedPrimitive{} -> Nothing + +-- | Partial version of getClosureInfoTbl_maybe for when we know we deal with a +-- heap closure. +-- +-- @since 9.14.1 +getClosurePtrArgs :: HasCallStack => GenClosure b -> [b] +getClosurePtrArgs closure = case getClosurePtrArgs_maybe closure of + Just ptrs -> ptrs + Nothing -> error "getClosurePtrArgs - Closure without ptrArgs field" + type StgStackClosure = GenStgStackClosure Box -- | A decoded @StgStack@ with `StackFrame`s ===================================== libraries/ghc-prim/Setup.hs ===================================== @@ -19,43 +19,14 @@ import System.Directory main :: IO () main = do let hooks = simpleUserHooks { - regHook = addPrimModule - $ regHook simpleUserHooks, buildHook = build_primitive_sources $ buildHook simpleUserHooks, - haddockHook = addPrimModuleForHaddock - $ build_primitive_sources + haddockHook = build_primitive_sources $ haddockHook simpleUserHooks } defaultMainWithHooks hooks type Hook a = PackageDescription -> LocalBuildInfo -> UserHooks -> a -> IO () -addPrimModule :: Hook a -> Hook a -addPrimModule f pd lbi uhs x = - do let -- I'm not sure which one of these we actually need to change. - -- It seems bad that there are two. - pd' = addPrimModuleToPD pd - lpd = addPrimModuleToPD (localPkgDescr lbi) - lbi' = lbi { localPkgDescr = lpd } - f pd' lbi' uhs x - -addPrimModuleForHaddock :: Hook a -> Hook a -addPrimModuleForHaddock f pd lbi uhs x = - do let pc = withPrograms lbi - pc' = userSpecifyArgs "haddock" ["GHC/Prim.hs"] pc - lbi' = lbi { withPrograms = pc' } - f pd lbi' uhs x - -addPrimModuleToPD :: PackageDescription -> PackageDescription -addPrimModuleToPD pd = - case library pd of - Just lib -> - let ems = fromJust (simpleParse "GHC.Prim") : exposedModules lib - lib' = lib { exposedModules = ems } - in pd { library = Just lib' } - Nothing -> - error "Expected a library, but none found" - build_primitive_sources :: Hook a -> Hook a build_primitive_sources f pd lbi uhs x = do when (compilerFlavor (compiler lbi) == GHC) $ do ===================================== libraries/ghc-prim/ghc-prim.cabal ===================================== @@ -53,6 +53,7 @@ Library GHC.Debug GHC.Magic GHC.Magic.Dict + GHC.Prim GHC.Prim.Ext GHC.Prim.Panic GHC.Prim.Exception @@ -61,8 +62,9 @@ Library GHC.Tuple GHC.Types - virtual-modules: + autogen-modules: GHC.Prim + GHC.PrimopWrappers -- OS Specific if os(windows) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f3e924c33b6d4e1972887d0ec43a24fd7d7fd688...9ebd70bc66a4dbbf624f8549a2737daf2a9e7749 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f3e924c33b6d4e1972887d0ec43a24fd7d7fd688...9ebd70bc66a4dbbf624f8549a2737daf2a9e7749 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 17:41:51 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Mon, 04 Nov 2024 12:41:51 -0500 Subject: [Git][ghc/ghc][wip/splice-imports-2024] 6 commits: More no_debug_output Message-ID: <6729075f4cec6_2a48fe8828e09976e@gitlab.mail> Matthew Pickering pushed to branch wip/splice-imports-2024 at Glasgow Haskell Compiler / GHC Commits: 39c0f8f4 by Matthew Pickering at 2024-11-04T13:45:05+00:00 More no_debug_output - - - - - 70b87c5f by Matthew Pickering at 2024-11-04T13:46:10+00:00 Test output - - - - - 37f1f338 by Matthew Pickering at 2024-11-04T15:46:59+00:00 Fix VarBr stage checking - - - - - ae2a74c0 by Matthew Pickering at 2024-11-04T15:47:11+00:00 Lift deriving. Generate 'A `appE` lift x `appE lift y rather than [| A $(lift x) $(lift y) |]. - - - - - 723dcd6b by Matthew Pickering at 2024-11-04T17:36:34+00:00 splice imports tests and module graph - - - - - dd623619 by Matthew Pickering at 2024-11-04T17:41:37+00:00 looping test - - - - - 30 changed files: - compiler/GHC/Data/Graph/Directed.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Rename/Splice.hs - compiler/GHC/Tc/Deriv/Generate.hs - compiler/GHC/Unit/Module/Graph.hs - libraries/base/tests/IO/Makefile - testsuite/tests/annotations/should_fail/annfail03.stderr - testsuite/tests/annotations/should_fail/annfail04.stderr - testsuite/tests/annotations/should_fail/annfail06.stderr - testsuite/tests/annotations/should_fail/annfail09.stderr - testsuite/tests/driver/j-space/jspace.hs - testsuite/tests/module/mod185.stderr - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/patsyn/should_compile/T13350/Makefile - testsuite/tests/quasiquotation/qq001/qq001.stderr - testsuite/tests/quasiquotation/qq002/qq002.stderr - testsuite/tests/quasiquotation/qq003/qq003.stderr - testsuite/tests/quasiquotation/qq004/qq004.stderr - testsuite/tests/rts/Makefile - testsuite/tests/rts/T1791/Makefile - testsuite/tests/showIface/DocsInHiFile1.stdout - testsuite/tests/showIface/DocsInHiFileTH.stdout - testsuite/tests/showIface/HaddockIssue849.stdout - testsuite/tests/showIface/HaddockOpts.stdout - testsuite/tests/showIface/HaddockSpanIssueT24378.stdout - testsuite/tests/showIface/LanguageExts.stdout The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3e18b3d7eb33dc964df728ab18bb10e5853dbeaa...dd623619baadc01e340d377e6c0b311b47daa497 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3e18b3d7eb33dc964df728ab18bb10e5853dbeaa...dd623619baadc01e340d377e6c0b311b47daa497 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 19:12:59 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Mon, 04 Nov 2024 14:12:59 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 35 commits: EPA: reduce [AddEpann] in AnnList Message-ID: <67291cbbb222f_39496a4a00ec124ca@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - bdd9ddc2 by Rodrigo Mesquita at 2024-11-04T19:12:30+00:00 Improve performance of deriving Show Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: InstanceMatching T12707 T3294 ------------------------ - - - - - 80bcbc24 by Rodrigo Mesquita at 2024-11-04T19:12:41+00:00 Deriving Ord: compare and <= only Since the implementation of CLC proposal #24, the default implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`. This means we no longer need to generate implementations for these methods when stock deriving `Ord`. Rather, just derive the implementation of `compare` and `<=`, and rely on the default implementations for the others. - - - - - 54c62849 by Rodrigo Mesquita at 2024-11-04T19:12:42+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - 75f6e408 by Rodrigo Mesquita at 2024-11-04T19:12:42+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 30 changed files: - .ghcid - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot - compiler/GHC/Core/Coercion/Opt.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Predicate.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/TyCo/Tidy.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs.hs - compiler/GHC/Hs/Binds.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bb5a5e8913d6069404b4cf8b2f086295edbbf738...75f6e408c8a79427449d1e2b092bc8de4a5395b5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bb5a5e8913d6069404b4cf8b2f086295edbbf738...75f6e408c8a79427449d1e2b092bc8de4a5395b5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 20:04:34 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 04 Nov 2024 15:04:34 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Cmm constant folding: Narrow results to operations bitwidth. Message-ID: <672928d24516c_39496a742994246c3@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 0e1d0e99 by Andreas Klebinger at 2024-11-04T13:26:25+00:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding operations on literals ensure the result is still within bounds by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - f0916da6 by Hassan Al-Awwadi at 2024-11-04T15:04:28-05:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - 03ab49f7 by Andreas Klebinger at 2024-11-04T15:04:29-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - 11c58bef by Peter Trommler at 2024-11-04T15:04:29-05:00 PPC NCG: Implement fmin and fmax - - - - - 30 changed files: - compiler/GHC/Cmm/Opt.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Parser.y - compiler/GHC/Rename/Bind.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/Language/Haskell/Syntax/Binds.hs - + compiler/Language/Haskell/Syntax/BooleanFormula.hs - compiler/ghc.cabal.in - docs/users_guide/9.14.1-notes.rst - libraries/ghc-heap/GHC/Exts/Heap.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs - + testsuite/tests/cmm/opt/T24556.cmm - testsuite/tests/cmm/opt/all.T - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - utils/check-exact/ExactPrint.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9ebd70bc66a4dbbf624f8549a2737daf2a9e7749...11c58bef7d806f1cdf7c47fa459919a7b7cb9fe5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9ebd70bc66a4dbbf624f8549a2737daf2a9e7749...11c58bef7d806f1cdf7c47fa459919a7b7cb9fe5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 4 23:47:08 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Mon, 04 Nov 2024 18:47:08 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25445 Message-ID: <67295cfce3129_1fd89d5d1664737c1@gitlab.mail> Simon Peyton Jones pushed new branch wip/T25445 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25445 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 02:55:54 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 04 Nov 2024 21:55:54 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <6729893a886e3_35a023da824662a8@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - 7c6bf2f4 by Andreas Klebinger at 2024-11-04T21:55:26-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - ac45790b by Peter Trommler at 2024-11-04T21:55:27-05:00 PPC NCG: Implement fmin and fmax - - - - - 30 changed files: - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Parser.y - compiler/GHC/Rename/Bind.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/Language/Haskell/Syntax/Binds.hs - + compiler/Language/Haskell/Syntax/BooleanFormula.hs - compiler/ghc.cabal.in - docs/users_guide/9.14.1-notes.rst - libraries/ghc-heap/GHC/Exts/Heap.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Types.hs Changes: ===================================== compiler/GHC/CmmToAsm/PPC/CodeGen.hs ===================================== @@ -398,7 +398,7 @@ iselExpr64 expr platform <- getPlatform pprPanic "iselExpr64(powerpc)" (pdoc platform expr) - +data MinOrMax = Min | Max getRegister :: CmmExpr -> NatM Register getRegister e = do config <- getConfig @@ -589,8 +589,9 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps MO_F_Sub w -> triv_float w FSUB MO_F_Mul w -> triv_float w FMUL MO_F_Quot w -> triv_float w FDIV - MO_F_Min w -> triv_float w FMIN - MO_F_Max w -> triv_float w FMAX + + MO_F_Min w -> minmax_float Min w x y + MO_F_Max w -> minmax_float Max w x y -- optimize addition with 32-bit immediate -- (needed for PIC) @@ -696,6 +697,31 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps code <- remainderCode rep sgn tmp x y return (Any fmt code) + minmax_float :: MinOrMax -> Width -> CmmExpr -> CmmExpr -> NatM Register + minmax_float m w x y = + do + (src1, src1Code) <- getSomeReg x + (src2, src2Code) <- getSomeReg y + l1 <- getBlockIdNat + l2 <- getBlockIdNat + end <- getBlockIdNat + let cond = case m of + Min -> LTT + Max -> GTT + let code dst = src1Code `appOL` src2Code `appOL` + toOL [ FCMP src1 src2 + , BCC cond l1 Nothing + , BCC ALWAYS l2 Nothing + , NEWBLOCK l2 + , MR dst src2 + , BCC ALWAYS end Nothing + , NEWBLOCK l1 + , MR dst src1 + , BCC ALWAYS end Nothing + , NEWBLOCK end + ] + return (Any (floatFormat w) code) + getRegister' _ _ (CmmMachOp mop [x, y, z]) -- ternary PrimOps = case mop of ===================================== compiler/GHC/CmmToAsm/PPC/Instr.hs ===================================== @@ -277,8 +277,6 @@ data Instr | FDIV Format Reg Reg Reg | FABS Reg Reg -- abs is the same for single and double | FNEG Reg Reg -- negate is the same for single and double prec. - | FMIN Format Reg Reg Reg - | FMAX Format Reg Reg Reg -- | Fused multiply-add instructions. -- ===================================== compiler/GHC/CmmToAsm/PPC/Ppr.hs ===================================== @@ -941,12 +941,6 @@ pprInstr platform instr = case instr of FNEG reg1 reg2 -> pprUnary (text "fneg") reg1 reg2 - FMIN fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmin") fmt reg1 reg2 reg3 - - FMAX fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmax") fmt reg1 reg2 reg3 - FMADD signs fmt dst ra rc rb -> pprTernaryF (pprFMASign signs) fmt dst ra rc rb ===================================== compiler/GHC/Core/Class.hs ===================================== @@ -26,6 +26,7 @@ import GHC.Prelude import {-# SOURCE #-} GHC.Core.TyCon ( TyCon ) import {-# SOURCE #-} GHC.Core.TyCo.Rep ( Type, PredType ) import {-# SOURCE #-} GHC.Core.TyCo.Ppr ( pprType ) +import GHC.Hs.Extension (GhcRn) import GHC.Types.Var import GHC.Types.Name import GHC.Types.Basic @@ -35,7 +36,7 @@ import GHC.Utils.Panic import GHC.Types.SrcLoc import GHC.Types.Var.Set import GHC.Utils.Outputable -import GHC.Data.BooleanFormula (BooleanFormula, mkTrue) +import Language.Haskell.Syntax.BooleanFormula ( BooleanFormula, mkTrue ) import qualified Data.Data as Data @@ -131,7 +132,7 @@ data TyFamEqnValidityInfo -- Note [Type-checking default assoc decls] in GHC.Tc.TyCl. } -type ClassMinimalDef = BooleanFormula Name -- Required methods +type ClassMinimalDef = BooleanFormula GhcRn -- Required methods data ClassBody = AbstractClass ===================================== compiler/GHC/CoreToIface.hs ===================================== @@ -43,6 +43,7 @@ module GHC.CoreToIface , toIfaceVar -- * Other stuff , toIfaceLFInfo + , toIfaceBooleanFormula -- * CgBreakInfo , dehydrateCgBreakInfo ) where @@ -69,6 +70,7 @@ import GHC.Builtin.Types ( heqTyCon ) import GHC.Iface.Syntax import GHC.Data.FastString +import GHC.Data.BooleanFormula qualified as BF(BooleanFormula(..)) import GHC.Types.Id import GHC.Types.Id.Info @@ -82,11 +84,14 @@ import GHC.Types.Var.Set import GHC.Types.Tickish import GHC.Types.Demand ( isNopSig ) import GHC.Types.Cpr ( topCprSig ) +import GHC.Types.SrcLoc (unLoc) import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Misc +import GHC.Hs.Extension (GhcRn) + import Data.Maybe ( isNothing, catMaybes ) {- Note [Avoiding space leaks in toIface*] @@ -537,6 +542,14 @@ toIfGuidance src guidance , isStableSource src = IfWhen arity unsat_ok boring_ok | otherwise = IfNoGuidance +toIfaceBooleanFormula :: BF.BooleanFormula GhcRn -> IfaceBooleanFormula +toIfaceBooleanFormula = go + where + go (BF.Var nm ) = IfVar $ mkIfLclName . getOccFS . unLoc $ nm + go (BF.And bfs ) = IfAnd $ map (go . unLoc) bfs + go (BF.Or bfs ) = IfOr $ map (go . unLoc) bfs + go (BF.Parens bf) = IfParens $ (go . unLoc) bf + {- ************************************************************************ * * ===================================== compiler/GHC/Data/BooleanFormula.hs ===================================== @@ -1,5 +1,6 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveTraversable #-} +{-# OPTIONS_GHC -Wno-orphans #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE TypeFamilies #-} -------------------------------------------------------------------------------- -- | Boolean formulas without quantifiers and without negation. @@ -8,73 +9,62 @@ -- This module is used to represent minimal complete definitions for classes. -- module GHC.Data.BooleanFormula ( - BooleanFormula(..), LBooleanFormula, - mkFalse, mkTrue, mkAnd, mkOr, mkVar, + module Language.Haskell.Syntax.BooleanFormula, isFalse, isTrue, + bfMap, bfTraverse, eval, simplify, isUnsatisfied, implies, impliesAtom, - pprBooleanFormula, pprBooleanFormulaNice + pprBooleanFormula, pprBooleanFormulaNice, pprBooleanFormulaNormal ) where -import GHC.Prelude hiding ( init, last ) - -import Data.List ( nub, intersperse ) +import Data.List ( intersperse ) import Data.List.NonEmpty ( NonEmpty (..), init, last ) -import Data.Data -import GHC.Utils.Monad -import GHC.Utils.Outputable -import GHC.Parser.Annotation ( LocatedL ) -import GHC.Types.SrcLoc +import GHC.Prelude hiding ( init, last ) import GHC.Types.Unique import GHC.Types.Unique.Set +import GHC.Types.SrcLoc (unLoc) +import GHC.Utils.Outputable +import GHC.Parser.Annotation ( SrcSpanAnnL ) +import GHC.Hs.Extension (GhcPass (..), OutputableBndrId) +import Language.Haskell.Syntax.Extension (Anno, LIdP, IdP) +import Language.Haskell.Syntax.BooleanFormula + ---------------------------------------------------------------------- -- Boolean formula type and smart constructors ---------------------------------------------------------------------- -type LBooleanFormula a = LocatedL (BooleanFormula a) - -data BooleanFormula a = Var a | And [LBooleanFormula a] | Or [LBooleanFormula a] - | Parens (LBooleanFormula a) - deriving (Eq, Data, Functor, Foldable, Traversable) - -mkVar :: a -> BooleanFormula a -mkVar = Var +type instance Anno (BooleanFormula (GhcPass p)) = SrcSpanAnnL -mkFalse, mkTrue :: BooleanFormula a -mkFalse = Or [] -mkTrue = And [] +-- if we had Functor/Traversable (LbooleanFormula p) we could use that +-- as a constraint and we wouldn't need to specialize to just GhcPass p, +-- but becuase LBooleanFormula is a type synonym such a constraint is +-- impossible. --- Convert a Bool to a BooleanFormula -mkBool :: Bool -> BooleanFormula a -mkBool False = mkFalse -mkBool True = mkTrue - --- Make a conjunction, and try to simplify -mkAnd :: Eq a => [LBooleanFormula a] -> BooleanFormula a -mkAnd = maybe mkFalse (mkAnd' . nub) . concatMapM fromAnd +-- BooleanFormula can't be an instance of functor because it can't lift +-- arbitrary functions `a -> b`, only functions of type `LIdP a -> LIdP b` +-- ditto for Traversable. +bfMap :: (LIdP (GhcPass p) -> LIdP (GhcPass p')) + -> BooleanFormula (GhcPass p) -> BooleanFormula (GhcPass p') +bfMap f = go where - -- See Note [Simplification of BooleanFormulas] - fromAnd :: LBooleanFormula a -> Maybe [LBooleanFormula a] - fromAnd (L _ (And xs)) = Just xs - -- assume that xs are already simplified - -- otherwise we would need: fromAnd (And xs) = concat <$> traverse fromAnd xs - fromAnd (L _ (Or [])) = Nothing - -- in case of False we bail out, And [..,mkFalse,..] == mkFalse - fromAnd x = Just [x] - mkAnd' [x] = unLoc x - mkAnd' xs = And xs - -mkOr :: Eq a => [LBooleanFormula a] -> BooleanFormula a -mkOr = maybe mkTrue (mkOr' . nub) . concatMapM fromOr + go (Var a ) = Var $ f a + go (And bfs) = And $ map (fmap go) bfs + go (Or bfs) = Or $ map (fmap go) bfs + go (Parens bf ) = Parens $ fmap go bf + +bfTraverse :: Applicative f + => (LIdP (GhcPass p) -> f (LIdP (GhcPass p'))) + -> BooleanFormula (GhcPass p) + -> f (BooleanFormula (GhcPass p')) +bfTraverse f = go where - -- See Note [Simplification of BooleanFormulas] - fromOr (L _ (Or xs)) = Just xs - fromOr (L _ (And [])) = Nothing - fromOr x = Just [x] - mkOr' [x] = unLoc x - mkOr' xs = Or xs + go (Var a ) = Var <$> f a + go (And bfs) = And <$> traverse @[] (traverse go) bfs + go (Or bfs) = Or <$> traverse @[] (traverse go) bfs + go (Parens bf ) = Parens <$> traverse go bf + {- @@ -115,15 +105,15 @@ We don't show a ridiculous error message like -- Evaluation and simplification ---------------------------------------------------------------------- -isFalse :: BooleanFormula a -> Bool +isFalse :: BooleanFormula (GhcPass p) -> Bool isFalse (Or []) = True isFalse _ = False -isTrue :: BooleanFormula a -> Bool +isTrue :: BooleanFormula (GhcPass p) -> Bool isTrue (And []) = True isTrue _ = False -eval :: (a -> Bool) -> BooleanFormula a -> Bool +eval :: (LIdP (GhcPass p) -> Bool) -> BooleanFormula (GhcPass p) -> Bool eval f (Var x) = f x eval f (And xs) = all (eval f . unLoc) xs eval f (Or xs) = any (eval f . unLoc) xs @@ -131,18 +121,24 @@ eval f (Parens x) = eval f (unLoc x) -- Simplify a boolean formula. -- The argument function should give the truth of the atoms, or Nothing if undecided. -simplify :: Eq a => (a -> Maybe Bool) -> BooleanFormula a -> BooleanFormula a +simplify :: forall p. Eq (LIdP (GhcPass p)) + => (LIdP (GhcPass p) -> Maybe Bool) + -> BooleanFormula (GhcPass p) + -> BooleanFormula (GhcPass p) simplify f (Var a) = case f a of Nothing -> Var a Just b -> mkBool b -simplify f (And xs) = mkAnd (map (\(L l x) -> L l (simplify f x)) xs) -simplify f (Or xs) = mkOr (map (\(L l x) -> L l (simplify f x)) xs) +simplify f (And xs) = mkAnd (map (fmap (simplify f)) xs) +simplify f (Or xs) = mkOr (map (fmap (simplify f)) xs) simplify f (Parens x) = simplify f (unLoc x) -- Test if a boolean formula is satisfied when the given values are assigned to the atoms -- if it is, returns Nothing -- if it is not, return (Just remainder) -isUnsatisfied :: Eq a => (a -> Bool) -> BooleanFormula a -> Maybe (BooleanFormula a) +isUnsatisfied :: Eq (LIdP (GhcPass p)) + => (LIdP (GhcPass p) -> Bool) + -> BooleanFormula (GhcPass p) + -> Maybe (BooleanFormula (GhcPass p)) isUnsatisfied f bf | isTrue bf' = Nothing | otherwise = Just bf' @@ -155,42 +151,42 @@ isUnsatisfied f bf -- eval f x == False <==> isFalse (simplify (Just . f) x) -- If the boolean formula holds, does that mean that the given atom is always true? -impliesAtom :: Eq a => BooleanFormula a -> a -> Bool -Var x `impliesAtom` y = x == y -And xs `impliesAtom` y = any (\x -> (unLoc x) `impliesAtom` y) xs +impliesAtom :: Eq (IdP (GhcPass p)) => BooleanFormula (GhcPass p) -> LIdP (GhcPass p) -> Bool +Var x `impliesAtom` y = (unLoc x) == (unLoc y) +And xs `impliesAtom` y = any (\x -> unLoc x `impliesAtom` y) xs -- we have all of xs, so one of them implying y is enough -Or xs `impliesAtom` y = all (\x -> (unLoc x) `impliesAtom` y) xs -Parens x `impliesAtom` y = (unLoc x) `impliesAtom` y +Or xs `impliesAtom` y = all (\x -> unLoc x `impliesAtom` y) xs +Parens x `impliesAtom` y = unLoc x `impliesAtom` y -implies :: Uniquable a => BooleanFormula a -> BooleanFormula a -> Bool +implies :: (Uniquable (IdP (GhcPass p))) => BooleanFormula (GhcPass p) -> BooleanFormula (GhcPass p) -> Bool implies e1 e2 = go (Clause emptyUniqSet [e1]) (Clause emptyUniqSet [e2]) where - go :: Uniquable a => Clause a -> Clause a -> Bool + go :: Uniquable (IdP (GhcPass p)) => Clause (GhcPass p) -> Clause (GhcPass p) -> Bool go l at Clause{ clauseExprs = hyp:hyps } r = case hyp of - Var x | memberClauseAtoms x r -> True - | otherwise -> go (extendClauseAtoms l x) { clauseExprs = hyps } r + Var x | memberClauseAtoms (unLoc x) r -> True + | otherwise -> go (extendClauseAtoms l (unLoc x)) { clauseExprs = hyps } r Parens hyp' -> go l { clauseExprs = unLoc hyp':hyps } r And hyps' -> go l { clauseExprs = map unLoc hyps' ++ hyps } r Or hyps' -> all (\hyp' -> go l { clauseExprs = unLoc hyp':hyps } r) hyps' go l r at Clause{ clauseExprs = con:cons } = case con of - Var x | memberClauseAtoms x l -> True - | otherwise -> go l (extendClauseAtoms r x) { clauseExprs = cons } + Var x | memberClauseAtoms (unLoc x) l -> True + | otherwise -> go l (extendClauseAtoms r (unLoc x)) { clauseExprs = cons } Parens con' -> go l r { clauseExprs = unLoc con':cons } And cons' -> all (\con' -> go l r { clauseExprs = unLoc con':cons }) cons' Or cons' -> go l r { clauseExprs = map unLoc cons' ++ cons } go _ _ = False -- A small sequent calculus proof engine. -data Clause a = Clause { - clauseAtoms :: UniqSet a, - clauseExprs :: [BooleanFormula a] +data Clause p = Clause { + clauseAtoms :: UniqSet (IdP p), + clauseExprs :: [BooleanFormula p] } -extendClauseAtoms :: Uniquable a => Clause a -> a -> Clause a +extendClauseAtoms :: Uniquable (IdP p) => Clause p -> IdP p -> Clause p extendClauseAtoms c x = c { clauseAtoms = addOneToUniqSet (clauseAtoms c) x } -memberClauseAtoms :: Uniquable a => a -> Clause a -> Bool +memberClauseAtoms :: Uniquable (IdP p) => IdP p -> Clause p -> Bool memberClauseAtoms x c = x `elementOfUniqSet` clauseAtoms c ---------------------------------------------------------------------- @@ -199,28 +195,29 @@ memberClauseAtoms x c = x `elementOfUniqSet` clauseAtoms c -- Pretty print a BooleanFormula, -- using the arguments as pretty printers for Var, And and Or respectively -pprBooleanFormula' :: (Rational -> a -> SDoc) - -> (Rational -> [SDoc] -> SDoc) - -> (Rational -> [SDoc] -> SDoc) - -> Rational -> BooleanFormula a -> SDoc +pprBooleanFormula' :: (Rational -> LIdP (GhcPass p) -> SDoc) + -> (Rational -> [SDoc] -> SDoc) + -> (Rational -> [SDoc] -> SDoc) + -> Rational -> BooleanFormula (GhcPass p) -> SDoc pprBooleanFormula' pprVar pprAnd pprOr = go where go p (Var x) = pprVar p x - go p (And []) = cparen (p > 0) $ empty + go p (And []) = cparen (p > 0) empty go p (And xs) = pprAnd p (map (go 3 . unLoc) xs) go _ (Or []) = keyword $ text "FALSE" go p (Or xs) = pprOr p (map (go 2 . unLoc) xs) go p (Parens x) = go p (unLoc x) -- Pretty print in source syntax, "a | b | c,d,e" -pprBooleanFormula :: (Rational -> a -> SDoc) -> Rational -> BooleanFormula a -> SDoc +pprBooleanFormula :: (Rational -> LIdP (GhcPass p) -> SDoc) + -> Rational -> BooleanFormula (GhcPass p) -> SDoc pprBooleanFormula pprVar = pprBooleanFormula' pprVar pprAnd pprOr where pprAnd p = cparen (p > 3) . fsep . punctuate comma pprOr p = cparen (p > 2) . fsep . intersperse vbar -- Pretty print human in readable format, "either `a' or `b' or (`c', `d' and `e')"? -pprBooleanFormulaNice :: Outputable a => BooleanFormula a -> SDoc +pprBooleanFormulaNice :: Outputable (LIdP (GhcPass p)) => BooleanFormula (GhcPass p) -> SDoc pprBooleanFormulaNice = pprBooleanFormula' pprVar pprAnd pprOr 0 where pprVar _ = quotes . ppr @@ -230,15 +227,14 @@ pprBooleanFormulaNice = pprBooleanFormula' pprVar pprAnd pprOr 0 pprAnd' (x:xs) = fsep (punctuate comma (init (x:|xs))) <> text ", and" <+> last (x:|xs) pprOr p xs = cparen (p > 1) $ text "either" <+> sep (intersperse (text "or") xs) -instance (OutputableBndr a) => Outputable (BooleanFormula a) where +instance OutputableBndrId p => Outputable (BooleanFormula (GhcPass p)) where ppr = pprBooleanFormulaNormal -pprBooleanFormulaNormal :: (OutputableBndr a) - => BooleanFormula a -> SDoc +pprBooleanFormulaNormal :: OutputableBndrId p => BooleanFormula (GhcPass p) -> SDoc pprBooleanFormulaNormal = go where - go (Var x) = pprPrefixOcc x + go (Var x) = pprPrefixOcc (unLoc x) go (And xs) = fsep $ punctuate comma (map (go . unLoc) xs) go (Or []) = keyword $ text "FALSE" go (Or xs) = fsep $ intersperse vbar (map (go . unLoc) xs) - go (Parens x) = parens (go $ unLoc x) + go (Parens x) = parens (go $ unLoc x) \ No newline at end of file ===================================== compiler/GHC/Hs/Binds.hs ===================================== @@ -36,6 +36,7 @@ import Language.Haskell.Syntax.Binds import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, pprFunBind, pprPatBind ) import {-# SOURCE #-} GHC.Hs.Pat (pprLPat ) +import GHC.Data.BooleanFormula ( LBooleanFormula, pprBooleanFormulaNormal ) import GHC.Types.Tickish import GHC.Hs.Extension import GHC.Parser.Annotation @@ -47,7 +48,6 @@ import GHC.Types.Basic import GHC.Types.SourceText import GHC.Types.SrcLoc as SrcLoc import GHC.Types.Var -import GHC.Data.BooleanFormula (LBooleanFormula) import GHC.Types.Name import GHC.Utils.Outputable @@ -968,9 +968,8 @@ instance Outputable TcSpecPrag where ppr (SpecPrag var _ inl) = text (extractSpecPragName $ inl_src inl) <+> pprSpec var (text "") inl -pprMinimalSig :: (OutputableBndr name) - => LBooleanFormula (GenLocated l name) -> SDoc -pprMinimalSig (L _ bf) = ppr (fmap unLoc bf) +pprMinimalSig :: OutputableBndrId p => LBooleanFormula (GhcPass p) -> SDoc +pprMinimalSig (L _ bf) = pprBooleanFormulaNormal bf {- ************************************************************************ ===================================== compiler/GHC/Hs/Decls.hs ===================================== @@ -110,6 +110,7 @@ module GHC.Hs.Decls ( import GHC.Prelude import Language.Haskell.Syntax.Decls +import Language.Haskell.Syntax.Extension import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, pprUntypedSplice ) -- Because Expr imports Decls via HsBracket @@ -119,7 +120,7 @@ import GHC.Hs.Type import GHC.Hs.Doc import GHC.Types.Basic import GHC.Core.Coercion -import Language.Haskell.Syntax.Extension + import GHC.Hs.Extension import GHC.Parser.Annotation import GHC.Types.Name ===================================== compiler/GHC/Hs/Instances.hs ===================================== @@ -33,6 +33,8 @@ import GHC.Hs.Type import GHC.Hs.Pat import GHC.Hs.ImpExp import GHC.Parser.Annotation +import GHC.Data.BooleanFormula (BooleanFormula(..)) +import Language.Haskell.Syntax.Extension (Anno) -- --------------------------------------------------------------------- -- Data derivations from GHC.Hs----------------------------------------- @@ -590,3 +592,6 @@ deriving instance Data XXPatGhcTc deriving instance Data XViaStrategyPs -- --------------------------------------------------------------------- + +deriving instance (Typeable p, Data (Anno (IdGhcP p)), Data (IdGhcP p)) => Data (BooleanFormula (GhcPass p)) +--------------------------------------------------------------------- \ No newline at end of file ===================================== compiler/GHC/Iface/Decl.hs ===================================== @@ -13,7 +13,6 @@ module GHC.Iface.Decl ( coAxiomToIfaceDecl , tyThingToIfaceDecl -- Converting things to their Iface equivalents - , toIfaceBooleanFormula ) where @@ -33,21 +32,17 @@ import GHC.Core.DataCon import GHC.Core.Type import GHC.Core.Multiplicity - import GHC.Types.Id import GHC.Types.Var.Env import GHC.Types.Var import GHC.Types.Name import GHC.Types.Basic import GHC.Types.TyThing -import GHC.Types.SrcLoc import GHC.Utils.Panic.Plain import GHC.Utils.Misc import GHC.Data.Maybe -import GHC.Data.BooleanFormula - import Data.List ( findIndex, mapAccumL ) {- @@ -287,7 +282,7 @@ classToIfaceDecl env clas ifClassCtxt = tidyToIfaceContext env1 sc_theta, ifATs = map toIfaceAT clas_ats, ifSigs = map toIfaceClassOp op_stuff, - ifMinDef = toIfaceBooleanFormula $ fmap (mkIfLclName . getOccFS) (classMinimalDef clas) + ifMinDef = toIfaceBooleanFormula (classMinimalDef clas) } (env1, tc_binders) = tidyTyConBinders env (tyConBinders tycon) @@ -335,10 +330,3 @@ tidyTyConBinders = mapAccumL tidyTyConBinder tidyTyVar :: TidyEnv -> TyVar -> IfLclName tidyTyVar (_, subst) tv = toIfaceTyVar (lookupVarEnv subst tv `orElse` tv) - -toIfaceBooleanFormula :: BooleanFormula IfLclName -> IfaceBooleanFormula -toIfaceBooleanFormula = \case - Var nm -> IfVar nm - And bfs -> IfAnd (map (toIfaceBooleanFormula . unLoc) bfs) - Or bfs -> IfOr (map (toIfaceBooleanFormula . unLoc) bfs) - Parens bf -> IfParens (toIfaceBooleanFormula . unLoc $ bf) ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -2041,8 +2041,9 @@ instance ToHie PendingRnSplice where instance ToHie PendingTcSplice where toHie (PendingTcSplice _ e) = toHie e -instance ToHie (LBooleanFormula (LocatedN Name)) where - toHie (L span form) = concatM $ makeNode form (locA span) : case form of +instance (HiePass p, Data (IdGhcP p)) + => ToHie (GenLocated SrcSpanAnnL (BooleanFormula (GhcPass p))) where + toHie (L span form) = concatM $ makeNode form (locA span) : case form of Var a -> [ toHie $ C Use a ] ===================================== compiler/GHC/Iface/Syntax.hs ===================================== @@ -35,10 +35,8 @@ module GHC.Iface.Syntax ( -- Misc ifaceDeclImplicitBndrs, visibleIfConDecls, ifaceDeclFingerprints, - fromIfaceBooleanFormula, fromIfaceWarnings, fromIfaceWarningTxt, - -- Free Names freeNamesIfDecl, freeNamesIfRule, freeNamesIfFamInst, freeNamesIfConDecls, @@ -51,7 +49,10 @@ module GHC.Iface.Syntax ( import GHC.Prelude +import GHC.Builtin.Names(mkUnboundName) import GHC.Data.FastString +import GHC.Data.BooleanFormula (pprBooleanFormula, isTrue) + import GHC.Builtin.Names ( unrestrictedFunTyConKey, liftedTypeKindTyConKey, constraintKindTyConKey ) import GHC.Types.Unique ( hasKey ) @@ -62,9 +63,9 @@ import GHC.Types.Demand import GHC.Types.Cpr import GHC.Core.Class import GHC.Types.FieldLabel -import GHC.Types.Name.Set import GHC.Core.Coercion.Axiom ( BranchIndex ) import GHC.Types.Name +import GHC.Types.Name.Set import GHC.Types.Name.Reader import GHC.Types.CostCentre import GHC.Types.Literal @@ -75,7 +76,6 @@ import GHC.Unit.Module import GHC.Unit.Module.Warnings import GHC.Types.SrcLoc import GHC.Types.SourceText -import GHC.Data.BooleanFormula ( BooleanFormula(..), pprBooleanFormula, isTrue ) import GHC.Types.Var( VarBndr(..), binderVar, tyVarSpecToBinders, visArgTypeLike ) import GHC.Core.TyCon ( Role (..), Injectivity(..), tyConBndrVisForAllTyFlag ) import GHC.Core.DataCon (SrcStrictness(..), SrcUnpackedness(..)) @@ -94,6 +94,8 @@ import GHC.Utils.Panic import GHC.Utils.Misc( dropList, filterByList, notNull, unzipWith, seqList, zipWithEqual ) +import Language.Haskell.Syntax.BooleanFormula(BooleanFormula(..)) + import Control.Monad import System.IO.Unsafe import Control.DeepSeq @@ -213,18 +215,14 @@ data IfaceClassBody ifMinDef :: IfaceBooleanFormula -- Minimal complete definition } +-- See also 'BooleanFormula' data IfaceBooleanFormula = IfVar IfLclName | IfAnd [IfaceBooleanFormula] | IfOr [IfaceBooleanFormula] | IfParens IfaceBooleanFormula + deriving Eq -fromIfaceBooleanFormula :: IfaceBooleanFormula -> BooleanFormula IfLclName -fromIfaceBooleanFormula = \case - IfVar nm -> Var nm - IfAnd ibfs -> And (map (noLocA . fromIfaceBooleanFormula) ibfs) - IfOr ibfs -> Or (map (noLocA . fromIfaceBooleanFormula) ibfs) - IfParens ibf -> Parens (noLocA . fromIfaceBooleanFormula $ ibf) data IfaceTyConParent = IfNoParent @@ -1039,13 +1037,21 @@ pprIfaceDecl ss (IfaceClass { ifName = clas | showSub ss sg = Just $ pprIfaceClassOp ss sg | otherwise = Nothing - pprMinDef :: BooleanFormula IfLclName -> SDoc + pprMinDef :: BooleanFormula GhcRn -> SDoc pprMinDef minDef = ppUnless (isTrue minDef) $ -- hide empty definitions text "{-# MINIMAL" <+> pprBooleanFormula - (\_ def -> cparen (isLexSym def) (ppr def)) 0 (fmap ifLclNameFS minDef) <+> + (\_ def -> let fs = getOccFS def in cparen (isLexSym fs) (ppr fs)) 0 minDef <+> text "#-}" + fromIfaceBooleanFormula :: IfaceBooleanFormula -> BooleanFormula GhcRn + -- `mkUnboundName` here is fine because the Name generated is only used for pretty printing and nothing else. + fromIfaceBooleanFormula (IfVar nm ) = Var $ noLocA . mkUnboundName . mkVarOccFS . ifLclNameFS $ nm + fromIfaceBooleanFormula (IfAnd bfs ) = And $ map (noLocA . fromIfaceBooleanFormula) bfs + fromIfaceBooleanFormula (IfOr bfs ) = Or $ map (noLocA . fromIfaceBooleanFormula) bfs + fromIfaceBooleanFormula (IfParens bf) = Parens $ (noLocA . fromIfaceBooleanFormula) bf + + -- See Note [Suppressing binder signatures] in GHC.Iface.Type suppress_bndr_sig = SuppressBndrSig True ===================================== compiler/GHC/IfaceToCore.hs ===================================== @@ -32,6 +32,7 @@ module GHC.IfaceToCore ( hydrateCgBreakInfo ) where + import GHC.Prelude import GHC.ByteCode.Types @@ -43,7 +44,6 @@ import GHC.Driver.Config.Core.Lint ( initLintConfig ) import GHC.Builtin.Types.Literals(typeNatCoAxiomRules) import GHC.Builtin.Types -import GHC.Iface.Decl (toIfaceBooleanFormula) import GHC.Iface.Syntax import GHC.Iface.Load import GHC.Iface.Env @@ -123,20 +123,26 @@ import GHC.Types.Tickish import GHC.Types.TyThing import GHC.Types.Error +import GHC.Parser.Annotation (noLocA) + +import GHC.Hs.Extension ( GhcRn ) + import GHC.Fingerprint -import qualified GHC.Data.BooleanFormula as BF import Control.Monad -import GHC.Parser.Annotation import GHC.Driver.Env.KnotVars import GHC.Unit.Module.WholeCoreBindings import Data.IORef import Data.Foldable import Data.Function ( on ) +import Data.List(nub) import Data.List.NonEmpty ( NonEmpty ) import qualified Data.List.NonEmpty as NE import GHC.Builtin.Names (ioTyConName, rOOT_MAIN) import GHC.Iface.Errors.Types + +import Language.Haskell.Syntax.BooleanFormula (BooleanFormula) +import Language.Haskell.Syntax.BooleanFormula qualified as BF(BooleanFormula(..)) import Language.Haskell.Syntax.Extension (NoExtField (NoExtField)) {- @@ -297,14 +303,38 @@ mergeIfaceDecl d1 d2 plusNameEnv_C mergeIfaceClassOp (mkNameEnv [ (n, op) | op@(IfaceClassOp n _ _) <- ops1 ]) (mkNameEnv [ (n, op) | op@(IfaceClassOp n _ _) <- ops2 ]) + in d1 { ifBody = (ifBody d1) { ifSigs = ops, - ifMinDef = toIfaceBooleanFormula . BF.mkOr . map (noLocA . fromIfaceBooleanFormula) $ [bf1, bf2] + ifMinDef = mkOr [ bf1, bf2] } } `withRolesFrom` d2 -- It doesn't matter; we'll check for consistency later when -- we merge, see 'mergeSignatures' | otherwise = d1 `withRolesFrom` d2 + where + -- The reason we need to duplicate mkOr here, instead of + -- using BooleanFormula's mkOr and just doing the loop like: + -- `toIfaceBooleanFormula . mkOr . fromIfaceBooleanFormula` + -- is quite subtle. Say we have the following minimal pragma: + -- {-# MINIMAL f | g #-}. If we use fromIfaceBooleanFormula + -- first, we will end up doing + -- `nub [Var (mkUnboundName f), Var (mkUnboundName g)]`, + -- which might seem fine, but Name equallity is decided by + -- their Unique, which will be identical since mkUnboundName + -- just stuffs the mkUnboundKey unqiue into both. + -- So the result will be {-# MINIMAL f #-}, oopsie. + -- Duplication it is. + mkOr :: [IfaceBooleanFormula] -> IfaceBooleanFormula + mkOr = maybe (IfAnd []) (mkOr' . nub . concat) . mapM fromOr + where + -- See Note [Simplification of BooleanFormulas] + fromOr bf = case bf of + (IfOr xs) -> Just xs + (IfAnd []) -> Nothing + _ -> Just [bf] + mkOr' [x] = x + mkOr' xs = IfOr xs -- Note [Role merging] -- ~~~~~~~~~~~~~~~~~~~ @@ -795,8 +825,7 @@ tc_iface_decl _parent ignore_prags ; sigs <- mapM tc_sig rdr_sigs ; fds <- mapM tc_fd rdr_fds ; traceIf (text "tc-iface-class3" <+> ppr tc_name) - ; let mindef_occ = fromIfaceBooleanFormula if_mindef - ; mindef <- traverse (lookupIfaceTop . mkVarOccFS . ifLclNameFS) mindef_occ + ; mindef <- tc_boolean_formula if_mindef ; cls <- fixM $ \ cls -> do { ats <- mapM (tc_at cls) rdr_ats ; traceIf (text "tc-iface-class4" <+> ppr tc_name) @@ -845,6 +874,12 @@ tc_iface_decl _parent ignore_prags -- e.g. type AT a; type AT b = AT [b] #8002 return (ATI tc mb_def) + tc_boolean_formula :: IfaceBooleanFormula -> IfL (BooleanFormula GhcRn) + tc_boolean_formula (IfAnd ibfs ) = BF.And . map noLocA <$> traverse tc_boolean_formula ibfs + tc_boolean_formula (IfOr ibfs ) = BF.Or . map noLocA <$> traverse tc_boolean_formula ibfs + tc_boolean_formula (IfParens ibf) = BF.Parens . noLocA <$> tc_boolean_formula ibf + tc_boolean_formula (IfVar nm ) = BF.Var . noLocA <$> (lookupIfaceTop . mkVarOccFS . ifLclNameFS $ nm) + mk_sc_doc pred = text "Superclass" <+> ppr pred mk_at_doc tc = text "Associated type" <+> ppr tc mk_op_doc op_name op_ty = text "Class op" <+> sep [ppr op_name, ppr op_ty] ===================================== compiler/GHC/Parser.y ===================================== @@ -39,9 +39,9 @@ module GHC.Parser where -- base -import Control.Monad ( unless, liftM, when, (<=<) ) +import Control.Monad ( unless, liftM, when, (<=<) ) import GHC.Exts -import Data.Maybe ( maybeToList ) +import Data.Maybe ( maybeToList ) import Data.List.NonEmpty ( NonEmpty(..) ) import qualified Data.List.NonEmpty as NE import qualified Prelude -- for happy-generated code @@ -3710,27 +3710,27 @@ overloaded_label :: { Located (SourceText, FastString) } ----------------------------------------------------------------------------- -- Warnings and deprecations -name_boolformula_opt :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_opt :: { LBooleanFormula GhcPs } : name_boolformula { $1 } | {- empty -} { noLocA mkTrue } -name_boolformula :: { LBooleanFormula (LocatedN RdrName) } - : name_boolformula_and { $1 } +name_boolformula :: { LBooleanFormula GhcPs } + : name_boolformula_and { $1 } | name_boolformula_and '|' name_boolformula {% do { h <- addTrailingVbarL $1 (epTok $2) ; return (sLLa $1 $> (Or [h,$3])) } } -name_boolformula_and :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_and :: { LBooleanFormula GhcPs } : name_boolformula_and_list { sLLa (head $1) (last $1) (And ($1)) } -name_boolformula_and_list :: { [LBooleanFormula (LocatedN RdrName)] } +name_boolformula_and_list :: { [LBooleanFormula GhcPs] } : name_boolformula_atom { [$1] } | name_boolformula_atom ',' name_boolformula_and_list {% do { h <- addTrailingCommaL $1 (epTok $2) ; return (h : $3) } } -name_boolformula_atom :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_atom :: { LBooleanFormula GhcPs } : '(' name_boolformula ')' {% amsr (sLL $1 $> (Parens $2)) (AnnList Nothing (ListParens (epTok $1) (epTok $3)) [] noAnn []) } | name_var { sL1a $1 (Var $1) } @@ -4704,4 +4704,4 @@ combineHasLocs a b = combineSrcSpans (getHasLoc a) (getHasLoc b) fromTrailingN :: SrcSpanAnnN -> SrcSpanAnnA fromTrailingN (EpAnn anc ann cs) = EpAnn anc (AnnListItem (nann_trailing ann)) cs -} +} \ No newline at end of file ===================================== compiler/GHC/Rename/Bind.hs ===================================== @@ -80,6 +80,7 @@ import Control.Monad import Data.List ( partition ) import Data.List.NonEmpty ( NonEmpty(..) ) import GHC.Types.Unique.DSet (mkUniqDSet) +import GHC.Data.BooleanFormula (bfTraverse) {- -- ToDo: Put the annotations into the monad, so that they arrive in the proper @@ -1137,7 +1138,7 @@ renameSig ctxt (FixSig _ fsig) ; return (FixSig noAnn new_fsig, emptyFVs) } renameSig ctxt sig@(MinimalSig (_, s) (L l bf)) - = do new_bf <- traverse (lookupSigOccRnN ctxt sig) bf + = do new_bf <- bfTraverse (lookupSigOccRnN ctxt sig) bf return (MinimalSig (noAnn, s) (L l new_bf), emptyFVs) renameSig ctxt sig@(PatSynSig _ vs ty) ===================================== compiler/GHC/Runtime/Heap/Inspect.hs ===================================== @@ -128,6 +128,11 @@ isFullyEvaluatedTerm NewtypeWrap{wrapped_term=t} = isFullyEvaluatedTerm t isFullyEvaluatedTerm RefWrap{wrapped_term=t} = isFullyEvaluatedTerm t isFullyEvaluatedTerm _ = False +-- | Gives an error if the term doesn't have subterms +expectSubTerms :: Term -> [Term] +expectSubTerms (Term { subTerms = subTerms} ) = subTerms +expectSubTerms _ = panic "expectSubTerms" + instance Outputable (Term) where ppr t | Just doc <- cPprTerm cPprTermBase t = doc | otherwise = panic "Outputable Term instance" @@ -332,8 +337,8 @@ cPprTermBase :: forall m. Monad m => CustomTermPrinter m cPprTermBase y = [ ifTerm (isTupleTy.ty) (\_p -> liftM (parens . hcat . punctuate comma) . mapM (y (-1)) - . subTerms) - , ifTerm (\t -> isTyCon listTyCon (ty t) && subTerms t `lengthIs` 2) + . expectSubTerms) + , ifTerm (\t -> isTyCon listTyCon (ty t) && expectSubTerms t `lengthIs` 2) ppr_list , ifTerm' (isTyCon intTyCon . ty) ppr_int , ifTerm' (isTyCon charTyCon . ty) ppr_char @@ -768,7 +773,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do traceTR (text "Gave up reconstructing a term after" <> int max_depth <> text " steps") clos <- trIO $ GHCi.getClosure interp a - return (Suspension (tipe (info clos)) my_ty a Nothing) + return (Suspension (tipe (getClosureInfoTbl clos)) my_ty a Nothing) go !max_depth my_ty old_ty a = do let monomorphic = not(isTyVarTy my_ty) -- This ^^^ is a convention. The ancestor tests for @@ -864,7 +869,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do _ -> do traceTR (text "Unknown closure:" <+> text (show (fmap (const ()) clos))) - return (Suspension (tipe (info clos)) my_ty a Nothing) + return (Suspension (tipe (getClosureInfoTbl clos)) my_ty a Nothing) -- insert NewtypeWraps around newtypes expandNewtypes = foldTerm idTermFold { fTerm = worker } where @@ -918,7 +923,7 @@ extractSubTerms recurse clos = liftM thdOf3 . go 0 0 go_rep ptr_i arr_i ty rep | isGcPtrRep rep = do - t <- recurse ty $ (ptrArgs clos)!!ptr_i + t <- recurse ty $ (getClosurePtrArgs clos)!!ptr_i return (ptr_i + 1, arr_i, t) | otherwise = do -- This is a bit involved since we allow packing multiple fields ===================================== compiler/GHC/Tc/TyCl/Class.hs ===================================== @@ -344,7 +344,7 @@ tcClassMinimalDef _clas sigs op_info where -- By default require all methods without a default implementation defMindef :: ClassMinimalDef - defMindef = mkAnd [ noLocA (mkVar name) + defMindef = mkAnd [ noLocA (mkVar (noLocA name)) | (name, _, Nothing) <- op_info ] instantiateMethod :: Class -> TcId -> [TcType] -> TcType @@ -402,8 +402,8 @@ findMinimalDef :: [LSig GhcRn] -> Maybe ClassMinimalDef findMinimalDef = firstJusts . map toMinimalDef where toMinimalDef :: LSig GhcRn -> Maybe ClassMinimalDef - toMinimalDef (L _ (MinimalSig _ (L _ bf))) = Just (fmap unLoc bf) - toMinimalDef _ = Nothing + toMinimalDef (L _ (MinimalSig _ (L _ bf))) = Just bf + toMinimalDef _ = Nothing {- Note [Polymorphic methods] @@ -603,4 +603,4 @@ warnMissingAT name $ InvalidAssoc $ InvalidAssocInstance $ AssocInstanceMissing name ; diagnosticTc (warn && hsc_src == HsSrcFile) diag - } + } \ No newline at end of file ===================================== compiler/GHC/Tc/TyCl/Instance.hs ===================================== @@ -1889,7 +1889,7 @@ tcMethods skol_info dfun_id clas tyvars dfun_ev_vars inst_tys -- -- See Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors, -- point (D). - whenIsJust (isUnsatisfied methodExists (classMinimalDef clas)) $ + whenIsJust (isUnsatisfied (methodExists . unLoc) (classMinimalDef clas)) $ warnUnsatisfiedMinimalDefinition methodExists meth = isJust (findMethodBind meth binds prag_fn) ===================================== compiler/Language/Haskell/Syntax/Binds.hs ===================================== @@ -26,15 +26,13 @@ import {-# SOURCE #-} Language.Haskell.Syntax.Expr ( LHsExpr , MatchGroup , GRHSs ) -import {-# SOURCE #-} Language.Haskell.Syntax.Pat - ( LPat ) - +import {-# SOURCE #-} Language.Haskell.Syntax.Pat( LPat ) +import Language.Haskell.Syntax.BooleanFormula (LBooleanFormula) import Language.Haskell.Syntax.Extension import Language.Haskell.Syntax.Type import Language.Haskell.Syntax.Basic ( Fixity ) import GHC.Types.Basic (InlinePragma) -import GHC.Data.BooleanFormula (LBooleanFormula) import GHC.Types.SourceText (StringLiteral) import Data.Void @@ -379,7 +377,7 @@ data Sig pass -- | A minimal complete definition pragma -- -- > {-# MINIMAL a | (b, c | (d | e)) #-} - | MinimalSig (XMinimalSig pass) (LBooleanFormula (LIdP pass)) + | MinimalSig (XMinimalSig pass) (LBooleanFormula pass) -- | A "set cost centre" pragma for declarations -- ===================================== compiler/Language/Haskell/Syntax/BooleanFormula.hs ===================================== @@ -0,0 +1,62 @@ +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE QuantifiedConstraints #-} + +module Language.Haskell.Syntax.BooleanFormula( + BooleanFormula(..), LBooleanFormula, + mkVar, mkFalse, mkTrue, mkBool, mkAnd, mkOr + ) where + +import Prelude hiding ( init, last ) +import Data.List ( nub ) +import Language.Haskell.Syntax.Extension (XRec, UnXRec (..), LIdP) + + +-- types +type LBooleanFormula p = XRec p (BooleanFormula p) +data BooleanFormula p = Var (LIdP p) | And [LBooleanFormula p] | Or [LBooleanFormula p] + | Parens (LBooleanFormula p) + +-- instances +deriving instance (Eq (LIdP p), Eq (LBooleanFormula p)) => Eq (BooleanFormula p) + +-- smart constructors +-- see note [Simplification of BooleanFormulas] +mkVar :: LIdP p -> BooleanFormula p +mkVar = Var + +mkFalse, mkTrue :: BooleanFormula p +mkFalse = Or [] +mkTrue = And [] + +-- Convert a Bool to a BooleanFormula +mkBool :: Bool -> BooleanFormula p +mkBool False = mkFalse +mkBool True = mkTrue + +-- Make a conjunction, and try to simplify +mkAnd :: forall p. (UnXRec p, Eq (LIdP p), Eq (LBooleanFormula p)) => [LBooleanFormula p] -> BooleanFormula p +mkAnd = maybe mkFalse (mkAnd' . nub . concat) . mapM fromAnd + where + -- See Note [Simplification of BooleanFormulas] + fromAnd :: LBooleanFormula p -> Maybe [LBooleanFormula p] + fromAnd bf = case unXRec @p bf of + (And xs) -> Just xs + -- assume that xs are already simplified + -- otherwise we would need: fromAnd (And xs) = concat <$> traverse fromAnd xs + (Or []) -> Nothing + -- in case of False we bail out, And [..,mkFalse,..] == mkFalse + _ -> Just [bf] + mkAnd' [x] = unXRec @p x + mkAnd' xs = And xs + +mkOr :: forall p. (UnXRec p, Eq (LIdP p), Eq (LBooleanFormula p)) => [LBooleanFormula p] -> BooleanFormula p +mkOr = maybe mkTrue (mkOr' . nub . concat) . mapM fromOr + where + -- See Note [Simplification of BooleanFormulas] + fromOr bf = case unXRec @p bf of + (Or xs) -> Just xs + (And []) -> Nothing + _ -> Just [bf] + mkOr' [x] = unXRec @p x + mkOr' xs = Or xs ===================================== compiler/ghc.cabal.in ===================================== @@ -993,6 +993,7 @@ Library Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds + Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -50,6 +50,11 @@ Cmm ``ghc-heap`` library ~~~~~~~~~~~~~~~~~~~~ +* The functions `getClosureInfoTbl_maybe`, `getClosureInfoTbl`, + `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow + reading of the relevant Closure attributes without reliance on incomplete + selectors. + ``ghc-experimental`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== libraries/ghc-heap/GHC/Exts/Heap.hs ===================================== @@ -29,6 +29,10 @@ module GHC.Exts.Heap ( , WhyBlocked(..) , TsoFlags(..) , HasHeapRep(getClosureData) + , getClosureInfoTbl + , getClosureInfoTbl_maybe + , getClosurePtrArgs + , getClosurePtrArgs_maybe , getClosureDataFromHeapRep , getClosureDataFromHeapRepPrim ===================================== libraries/ghc-heap/GHC/Exts/Heap/Closures.hs ===================================== @@ -8,12 +8,18 @@ {-# LANGUAGE DeriveTraversable #-} -- Late cost centres introduce a thunk in the asBox function, which leads to -- an additional wrapper being added to any value placed inside a box. +-- This can be removed once our boot compiler is no longer affected by #25212 {-# OPTIONS_GHC -fno-prof-late #-} +{-# LANGUAGE NamedFieldPuns #-} module GHC.Exts.Heap.Closures ( -- * Closures Closure , GenClosure(..) + , getClosureInfoTbl + , getClosureInfoTbl_maybe + , getClosurePtrArgs + , getClosurePtrArgs_maybe , PrimType(..) , WhatNext(..) , WhyBlocked(..) @@ -67,6 +73,7 @@ import Data.Word import GHC.Exts import GHC.Generics import Numeric +import GHC.Stack (HasCallStack) ------------------------------------------------------------------------ -- Boxes @@ -382,6 +389,104 @@ data GenClosure b { wordVal :: !Word } deriving (Show, Generic, Functor, Foldable, Traversable) +-- | Get the info table for a heap closure, or Nothing for a prim value +-- +-- @since 9.14.1 +getClosureInfoTbl_maybe :: GenClosure b -> Maybe StgInfoTable +{-# INLINE getClosureInfoTbl_maybe #-} -- Ensure we can get rid of the just box +getClosureInfoTbl_maybe closure = case closure of + ConstrClosure{info} ->Just info + FunClosure{info} ->Just info + ThunkClosure{info} ->Just info + SelectorClosure{info} ->Just info + PAPClosure{info} ->Just info + APClosure{info} ->Just info + APStackClosure{info} ->Just info + IndClosure{info} ->Just info + BCOClosure{info} ->Just info + BlackholeClosure{info} ->Just info + ArrWordsClosure{info} ->Just info + MutArrClosure{info} ->Just info + SmallMutArrClosure{info} ->Just info + MVarClosure{info} ->Just info + IOPortClosure{info} ->Just info + MutVarClosure{info} ->Just info + BlockingQueueClosure{info} ->Just info + WeakClosure{info} ->Just info + TSOClosure{info} ->Just info + StackClosure{info} ->Just info + + IntClosure{} -> Nothing + WordClosure{} -> Nothing + Int64Closure{} -> Nothing + Word64Closure{} -> Nothing + AddrClosure{} -> Nothing + FloatClosure{} -> Nothing + DoubleClosure{} -> Nothing + + OtherClosure{info} -> Just info + UnsupportedClosure {info} -> Just info + + UnknownTypeWordSizedPrimitive{} -> Nothing + +-- | Partial version of getClosureInfoTbl_maybe for when we know we deal with a +-- heap closure. +-- +-- @since 9.14.1 +getClosureInfoTbl :: HasCallStack => GenClosure b -> StgInfoTable +getClosureInfoTbl closure = case getClosureInfoTbl_maybe closure of + Just info -> info + Nothing -> error "getClosureInfoTbl - Closure without info table" + +-- | Get the info table for a heap closure, or Nothing for a prim value +-- +-- @since 9.14.1 +getClosurePtrArgs_maybe :: GenClosure b -> Maybe [b] +{-# INLINE getClosurePtrArgs_maybe #-} -- Ensure we can get rid of the just box +getClosurePtrArgs_maybe closure = case closure of + ConstrClosure{ptrArgs} -> Just ptrArgs + FunClosure{ptrArgs} -> Just ptrArgs + ThunkClosure{ptrArgs} -> Just ptrArgs + SelectorClosure{} -> Nothing + PAPClosure{} -> Nothing + APClosure{} -> Nothing + APStackClosure{} -> Nothing + IndClosure{} -> Nothing + BCOClosure{} -> Nothing + BlackholeClosure{} -> Nothing + ArrWordsClosure{} -> Nothing + MutArrClosure{} -> Nothing + SmallMutArrClosure{} -> Nothing + MVarClosure{} -> Nothing + IOPortClosure{} -> Nothing + MutVarClosure{} -> Nothing + BlockingQueueClosure{} -> Nothing + WeakClosure{} -> Nothing + TSOClosure{} -> Nothing + StackClosure{} -> Nothing + + IntClosure{} -> Nothing + WordClosure{} -> Nothing + Int64Closure{} -> Nothing + Word64Closure{} -> Nothing + AddrClosure{} -> Nothing + FloatClosure{} -> Nothing + DoubleClosure{} -> Nothing + + OtherClosure{} -> Nothing + UnsupportedClosure{} -> Nothing + + UnknownTypeWordSizedPrimitive{} -> Nothing + +-- | Partial version of getClosureInfoTbl_maybe for when we know we deal with a +-- heap closure. +-- +-- @since 9.14.1 +getClosurePtrArgs :: HasCallStack => GenClosure b -> [b] +getClosurePtrArgs closure = case getClosurePtrArgs_maybe closure of + Just ptrs -> ptrs + Nothing -> error "getClosurePtrArgs - Closure without ptrArgs field" + type StgStackClosure = GenStgStackClosure Box -- | A decoded @StgStack@ with `StackFrame`s ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -234,6 +234,7 @@ GHC.Utils.Word64 Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds +Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -258,6 +258,7 @@ GHC.Utils.Word64 Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds +Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== utils/check-exact/ExactPrint.hs ===================================== @@ -2807,7 +2807,7 @@ instance ExactPrint (AnnDecl GhcPs) where -- --------------------------------------------------------------------- -instance ExactPrint (BF.BooleanFormula (LocatedN RdrName)) where +instance ExactPrint (BF.BooleanFormula GhcPs) where getAnnotationEntry = const NoEntryVal setAnnotationAnchor a _ _ _ = a @@ -4527,7 +4527,7 @@ instance ExactPrint (LocatedL [LocatedA (ConDeclField GhcPs)]) where (an', fs') <- markAnnList an (markAnnotated fs) return (L an' fs') -instance ExactPrint (LocatedL (BF.BooleanFormula (LocatedN RdrName))) where +instance ExactPrint (LocatedL (BF.BooleanFormula GhcPs)) where getAnnotationEntry = entryFromLocatedA setAnnotationAnchor = setAnchorAn exact (L an bf) = do ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -45,6 +45,7 @@ import GHC.Builtin.Types , promotedNilDataCon , unitTy ) + import GHC.Builtin.Types.Prim (alphaTyVars) import GHC.Core.Class import GHC.Core.Coercion.Axiom @@ -176,7 +177,7 @@ tyThingToLHsDecl prr t = case t of $ snd $ classTvsFds cl , tcdSigs = - noLocA (MinimalSig (noAnn, NoSourceText) . noLocA . fmap noLocA $ classMinimalDef cl) + noLocA (MinimalSig (noAnn, NoSourceText) . noLocA $ classMinimalDef cl) : [ noLocA tcdSig | clsOp <- classOpItems cl , tcdSig <- synifyTcIdSig vs clsOp ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -19,6 +19,8 @@ -- Portability : portable module Haddock.Interface.Rename (renameInterface) where +import Prelude hiding (mapM) + import Control.Applicative () import Control.DeepSeq (force) import Control.Monad hiding (mapM) @@ -28,12 +30,13 @@ import Data.Foldable (traverse_) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Data.Traversable (mapM) + import GHC hiding (NoLink) import GHC.Builtin.Types (eqTyCon_RDR, tupleDataConName, tupleTyConName) import GHC.Types.Basic (Boxity (..), TopLevelFlag (..), TupleSort (..)) import GHC.Types.Name import GHC.Types.Name.Reader (RdrName (Exact)) -import Prelude hiding (mapM) +import Language.Haskell.Syntax.BooleanFormula(BooleanFormula(..)) import Haddock.Backends.Hoogle (ppExportD) import Haddock.GhcUtils @@ -770,11 +773,22 @@ renameSig sig = case sig of lnames' <- mapM renameNameL lnames return $ FixSig noExtField (FixitySig noExtField lnames' fixity) MinimalSig _ (L l s) -> do - s' <- traverse (traverse lookupRn) s + s' <- bfTraverse (traverse lookupRn) s return $ MinimalSig noExtField (L l s') -- we have filtered out all other kinds of signatures in Interface.Create _ -> error "expected TypeSig" +bfTraverse :: Applicative f + => (LIdP (GhcPass p) -> f (LIdP DocNameI)) + -> BooleanFormula (GhcPass p) + -> f (BooleanFormula DocNameI) +bfTraverse f = go + where + go (Var a ) = Var <$> f a + go (And bfs) = And <$> traverse @[] (traverse go) bfs + go (Or bfs) = Or <$> traverse @[] (traverse go) bfs + go (Parens bf ) = Parens <$> traverse go bf + renameForD :: ForeignDecl GhcRn -> RnM (ForeignDecl DocNameI) renameForD (ForeignImport _ lname ltype x) = do lname' <- renameNameL lname ===================================== utils/haddock/haddock-api/src/Haddock/Types.hs ===================================== @@ -53,6 +53,7 @@ import qualified Data.Map as Map import qualified Data.Set as Set import GHC import qualified GHC.Data.Strict as Strict +import GHC.Data.BooleanFormula (BooleanFormula) import GHC.Driver.Session (Language) import qualified GHC.LanguageExtensions as LangExt import GHC.Core.InstEnv (is_dfun_name) @@ -819,6 +820,7 @@ type instance Anno (HsDecl DocNameI) = SrcSpanAnnA type instance Anno (FamilyResultSig DocNameI) = EpAnn NoEpAnns type instance Anno (HsOuterTyVarBndrs Specificity DocNameI) = SrcSpanAnnA type instance Anno (HsSigType DocNameI) = SrcSpanAnnA +type instance Anno (BooleanFormula DocNameI) = SrcSpanAnnL type XRecCond a = ( XParTy a ~ (EpToken "(", EpToken ")") View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/11c58bef7d806f1cdf7c47fa459919a7b7cb9fe5...ac45790be4af2182b74f499bb00bb282f4695693 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/11c58bef7d806f1cdf7c47fa459919a7b7cb9fe5...ac45790be4af2182b74f499bb00bb282f4695693 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 09:29:28 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Tue, 05 Nov 2024 04:29:28 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/release-script-fixes-2 Message-ID: <6729e5784bd28_189e117880336be@gitlab.mail> Zubin pushed new branch wip/release-script-fixes-2 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/release-script-fixes-2 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 09:48:46 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Tue, 05 Nov 2024 04:48:46 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 4 commits: Improve performance of deriving Show Message-ID: <6729e9fe7bd22_189e37d7a0456cf@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: fd7a2449 by Rodrigo Mesquita at 2024-11-05T09:48:33+00:00 Improve performance of deriving Show Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: InstanceMatching T12707 T3294 ------------------------ - - - - - 5649f593 by Rodrigo Mesquita at 2024-11-05T09:48:34+00:00 Deriving Ord: compare and <= only Since the implementation of CLC proposal #24, the default implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`. This means we no longer need to generate implementations for these methods when stock deriving `Ord`. Rather, just derive the implementation of `compare` and `<=`, and rely on the default implementations for the others. - - - - - 95b55547 by Rodrigo Mesquita at 2024-11-05T09:48:34+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - 5f730439 by Rodrigo Mesquita at 2024-11-05T09:48:34+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 9 changed files: - compiler/GHC/Hs/Utils.hs - compiler/GHC/Tc/Deriv/Functor.hs - compiler/GHC/Tc/Deriv/Generate.hs - testsuite/tests/deriving/should_compile/T14682.stderr - testsuite/tests/deriving/should_compile/T20496.stderr - testsuite/tests/deriving/should_run/T9576.stderr - testsuite/tests/typecheck/should_fail/T15883c.stderr - testsuite/tests/typecheck/should_fail/T15883d.stderr - testsuite/tests/typecheck/should_fail/T15883e.stderr Changes: ===================================== compiler/GHC/Hs/Utils.hs ===================================== @@ -56,7 +56,7 @@ module GHC.Hs.Utils( nlHsTyApp, nlHsTyApps, nlHsVar, nlHsDataCon, nlHsLit, nlHsApp, nlHsApps, nlHsSyntaxApps, nlHsIntLit, nlHsVarApps, - nlHsDo, nlHsOpApp, nlHsPar, nlHsIf, nlHsCase, nlList, + nlHsDo, nlHsOpApp, nlHsLam, nlHsPar, nlHsIf, nlHsCase, nlList, mkLHsTupleExpr, mkLHsVarTuple, missingTupArg, mkLocatedList, nlAscribe, @@ -598,11 +598,15 @@ nlHsDo ctxt stmts = noLocA (mkHsDo ctxt (noLocA stmts)) nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs nlHsOpApp e1 op e2 = noLocA (mkHsOpApp e1 op e2) +nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs nlHsPar :: IsPass p => LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs +nlHsLam match = noLocA $ HsLam noAnn LamSingle + $ mkMatchGroup (Generated OtherExpansion SkipPmc) (noLocA [match]) + nlHsPar e = noLocA (gHsPar e) -- nlHsIf should generate if-expressions which are NOT subject to ===================================== compiler/GHC/Tc/Deriv/Functor.hs ===================================== @@ -689,9 +689,18 @@ mkSimpleConMatch2 ctxt fold extra_pats con insides = do con_expr | null asWithTyVar = nlHsApps con_name asWithoutTyVar | otherwise = - let bs = filterByList argTysTyVarInfo bs_RDRs - vars = filterByLists argTysTyVarInfo bs_Vars as_Vars - in mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) + let -- All trailing b-args can be eta-reduced: + -- (\b1 b2 b3 -> A b1 a2 b2 b3) ==> (\b1 -> A b1 a2) + -- This improves the number of allocations needed to compile + -- the generated code (it is not relevant for correctness) + -- We do this by counting the n of args to keep + keep_n = length $ dropWhileEndLE (== True) argTysTyVarInfo + bs = filterByList (take keep_n argTysTyVarInfo) bs_RDRs + vars = take keep_n $ + filterByLists argTysTyVarInfo bs_Vars as_Vars + in if keep_n == 0 + then nlHsVar con_name + else mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) rhs <- fold con_expr exps return $ mkMatch ctxt (noLocA (extra_pats ++ [pat])) rhs emptyLocalBinds ===================================== compiler/GHC/Tc/Deriv/Generate.hs ===================================== @@ -339,7 +339,7 @@ Several special cases: See function unliftedOrdOp Note [Game plan for deriving Ord] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's a bad idea to define only 'compare', and build the other binary comparisons on top of it; see #2130, #4019. Reason: we don't want to laboriously make a three-way comparison, only to extract a @@ -350,16 +350,22 @@ binary result, something like this: True -> False False -> True -This being said, we can get away with generating full code only for -'compare' and '<' thus saving us generation of other three operators. -Other operators can be cheaply expressed through '<': -a <= b = not $ b < a -a > b = b < a -a >= b = not $ a < b - So for sufficiently small types (few constructors, or all nullary) we generate all methods; for large ones we just use 'compare'. +This being said, we can get away with generating full code only for +'compare' and '<=' thus saving us generation of other three operators. +Other operators can be cheaply expressed through '<=' -- indeed, that's what +the default implementations of >, <, and >= do. + +Historically, derived instances defined '<' and the remaining operators as +cheap expressions in function of it: + a <= b = not $ b < a + a > b = b < a + a >= b = not $ a < b +but since the CLC proposal #24 (see 8f174e06185143674d6cbfee75c30e68805d85b8), +it suffices to derive '<=' and rely on the +default implementation for the others. -} data OrdOp = OrdCompare | OrdLT | OrdLE | OrdGE | OrdGT @@ -408,7 +414,7 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon return $ if null tycon_data_cons -- No data-cons => invoke bale-out case then ( [mkFunBindEC 2 loc compare_RDR (const eqTag_Expr) []] , emptyBag) - else ( [mkOrdOp OrdCompare] ++ other_ops + else ( [mkOrdOp OrdCompare] `chkAppend` other_ops , aux_binds) where aux_binds = emptyBag @@ -417,19 +423,10 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon other_ops | (last_tag - first_tag) <= 2 -- 1-3 constructors || null non_nullary_cons -- Or it's an enumeration - = [mkOrdOp OrdLT, lE, gT, gE] + = [mkOrdOp OrdLE] | otherwise = [] - negate_expr = nlHsApp (nlHsVar not_RDR) - pats = noLocA [a_Pat, b_Pat] - lE = mkSimpleGeneratedFunBind loc le_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr) - gT = mkSimpleGeneratedFunBind loc gt_RDR pats $ - nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr - gE = mkSimpleGeneratedFunBind loc ge_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) a_Expr) b_Expr) - get_tag con = dataConTag con - fIRST_TAG -- We want *zero-based* tags, because that's what -- con2Tag returns (generated by untag_Expr)! @@ -1407,7 +1404,7 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gfoldl_eqn con = ([nlVarPat k_RDR, z_Pat, nlConVarPat con_name as_needed], - foldl' mk_k_app (z_Expr `nlHsApp` (eta_expand_data_con con)) as_needed) + foldl' mk_k_app (z_Expr `nlHsApp` (nlHsVar (getRdrName con))) as_needed) where con_name :: RdrName con_name = getRdrName con @@ -1427,18 +1424,9 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gunfold_alt dc = mkHsCaseAlt (mk_unfold_pat dc) (mk_unfold_rhs dc) mk_unfold_rhs dc = foldr nlHsApp - (z_Expr `nlHsApp` (eta_expand_data_con dc)) + (z_Expr `nlHsApp` (nlHsVar (getRdrName dc))) (replicate (dataConSourceArity dc) (nlHsVar k_RDR)) - eta_expand_data_con dc = - mkHsLam (noLocA eta_expand_pats) - (foldl nlHsApp (nlHsVar (getRdrName dc)) eta_expand_hsvars) - where - eta_expand_pats = map nlVarPat eta_expand_vars - eta_expand_hsvars = map nlHsVar eta_expand_vars - eta_expand_vars = take (dataConSourceArity dc) as_RDRs - - mk_unfold_pat dc -- Last one is a wild-pat, to avoid -- redundant test, and annoying warning | tag-fIRST_TAG == n_cons-1 = nlWildPat -- Last constructor @@ -2528,21 +2516,21 @@ showParen_Expr showParen_Expr e1 e2 = nlHsApp (nlHsApp (nlHsVar showParen_RDR) e1) e2 nested_compose_Expr :: [LHsExpr GhcPs] -> LHsExpr GhcPs - -nested_compose_Expr [] = panic "nested_compose_expr" -- Arg is always non-empty -nested_compose_Expr [e] = parenify e -nested_compose_Expr (e:es) - = nlHsApp (nlHsApp (nlHsVar compose_RDR) (parenify e)) (nested_compose_Expr es) +nested_compose_Expr = + nlHsLam . mkSimpleMatch (LamAlt LamSingle) (noLocA [z_Pat]) . go + where + -- Previously we used (`.`), but inlining its definition improves compiler + -- performance significantly since we no longer need to typecheck lots of + -- (.) applications (each which needed three type applications, all @String) + go [] = panic "nested_compose_expr" -- Arg is always non-empty + go [e] = nlHsApp e z_Expr + go (e:es) = nlHsApp e (go es) -- impossible_Expr is used in case RHSs that should never happen. -- We generate these to keep the desugarer from complaining that they *might* happen! error_Expr :: FastString -> LHsExpr GhcPs error_Expr string = nlHsApp (nlHsVar error_RDR) (nlHsLit (mkHsStringFS string)) -parenify :: LHsExpr GhcPs -> LHsExpr GhcPs -parenify e@(L _ (HsVar _ _)) = e -parenify e = mkHsPar e - -- genOpApp wraps brackets round the operator application, so that the -- renamer won't subsequently try to re-associate it. genOpApp :: LHsExpr GhcPs -> RdrName -> LHsExpr GhcPs -> LHsExpr GhcPs @@ -2570,10 +2558,9 @@ as_RDRs = [ mkVarUnqual (mkFastString ("a"++show i)) | i <- [(1::Int) .. bs_RDRs = [ mkVarUnqual (mkFastString ("b"++show i)) | i <- [(1::Int) .. ] ] cs_RDRs = [ mkVarUnqual (mkFastString ("c"++show i)) | i <- [(1::Int) .. ] ] -a_Expr, b_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, +a_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, true_Expr, pure_Expr, unsafeCodeCoerce_Expr :: LHsExpr GhcPs a_Expr = nlHsVar a_RDR -b_Expr = nlHsVar b_RDR c_Expr = nlHsVar c_RDR z_Expr = nlHsVar z_RDR ltTag_Expr = nlHsVar ltTag_RDR ===================================== testsuite/tests/deriving/should_compile/T14682.stderr ===================================== @@ -5,12 +5,13 @@ Derived class instances: GHC.Internal.Show.showsPrec a (T14682.Foo b1 b2) = GHC.Internal.Show.showParen (a GHC.Classes.>= 11) - ((GHC.Internal.Base..) - (GHC.Internal.Show.showString "Foo ") - ((GHC.Internal.Base..) - (GHC.Internal.Show.showsPrec 11 b1) - ((GHC.Internal.Base..) - GHC.Internal.Show.showSpace (GHC.Internal.Show.showsPrec 11 b2)))) + (\ z + -> GHC.Internal.Show.showString + "Foo " + (GHC.Internal.Show.showsPrec + 11 b1 + (GHC.Internal.Show.showSpace + (GHC.Internal.Show.showsPrec 11 b2 z)))) instance GHC.Internal.TH.Lift.Lift T14682.Foo where GHC.Internal.TH.Lift.lift (T14682.Foo a1 a2) @@ -25,9 +26,8 @@ Derived class instances: instance GHC.Internal.Data.Data.Data T14682.Foo where GHC.Internal.Data.Data.gfoldl k z (T14682.Foo a1 a2) - = ((z (\ a1 a2 -> T14682.Foo a1 a2) `k` a1) `k` a2) - GHC.Internal.Data.Data.gunfold k z _ - = k (k (z (\ a1 a2 -> T14682.Foo a1 a2))) + = ((z T14682.Foo `k` a1) `k` a2) + GHC.Internal.Data.Data.gunfold k z _ = k (k (z T14682.Foo)) GHC.Internal.Data.Data.toConstr (T14682.Foo _ _) = $cFoo GHC.Internal.Data.Data.dataTypeOf _ = $tFoo @@ -46,18 +46,15 @@ Derived class instances: GHC.Types.LT -> GHC.Types.LT GHC.Types.EQ -> (a2 `GHC.Classes.compare` b2) GHC.Types.GT -> GHC.Types.GT - (GHC.Classes.<) a b + (GHC.Classes.<=) a b = case a of T14682.Foo a1 a2 -> case b of T14682.Foo b1 b2 -> case (GHC.Classes.compare a1 b1) of GHC.Types.LT -> GHC.Types.True - GHC.Types.EQ -> (a2 GHC.Classes.< b2) + GHC.Types.EQ -> (a2 GHC.Classes.<= b2) GHC.Types.GT -> GHC.Types.False - (GHC.Classes.<=) a b = GHC.Classes.not ((GHC.Classes.<) b a) - (GHC.Classes.>) a b = (GHC.Classes.<) b a - (GHC.Classes.>=) a b = GHC.Classes.not ((GHC.Classes.<) a b) instance GHC.Internal.Ix.Ix T14682.Foo where GHC.Internal.Ix.range (T14682.Foo a1 a2, T14682.Foo b1 b2) @@ -177,6 +174,24 @@ GHC.Classes.Eq [T14682.Foo] +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.<) = GHC.Classes.$dm< @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>) = GHC.Classes.$dm> @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>=) = GHC.Classes.$dm>= @T14682.Foo + + + ==================== Filling in method body ==================== GHC.Classes.Ord [T14682.Foo] GHC.Classes.max = GHC.Classes.$dmmax @T14682.Foo ===================================== testsuite/tests/deriving/should_compile/T20496.stderr ===================================== @@ -32,5 +32,5 @@ rnd null (MkT _) = False instance Traversable T where - traverse f (MkT a1) = fmap (\ b1 -> MkT b1) (f a1) + traverse f (MkT a1) = fmap MkT (f a1) ===================================== testsuite/tests/deriving/should_run/T9576.stderr ===================================== @@ -2,11 +2,11 @@ T9576: Exception: T9576.hs:6:31: error: [GHC-39999] • No instance for ‘Show Foo’ arising from a use of ‘showsPrec’ - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘(showsPrec 11 b1 z)’ + In the expression: showString "MkBar " (showsPrec 11 b1 z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkBar ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkBar ") (showsPrec 11 b1)) + ‘(\ z -> showString "MkBar " (showsPrec 11 b1 z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show Bar’: To see the code I am typechecking, use -ddump-deriv @@ -17,9 +17,7 @@ Module: GHC.Internal.Control.Exception.Base Type: TypeError HasCallStack backtrace: - collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception - toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception - throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:423:30 in ghc-internal:GHC.Internal.Control.Exception.Base - - + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:169:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:89:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base ===================================== testsuite/tests/typecheck/should_fail/T15883c.stderr ===================================== @@ -1,4 +1,3 @@ - T15883c.hs:14:1: error: [GHC-39999] • No instance for ‘Eq (Foo LiftedRep)’ arising from the superclasses of an instance declaration @@ -22,7 +21,7 @@ T15883c.hs:14:1: error: [GHC-39999] To see the code I am typechecking, use -ddump-deriv T15883c.hs:14:1: error: [GHC-39999] - • Ambiguous type variable ‘a1’ arising from a use of ‘<’ + • Ambiguous type variable ‘a1’ arising from a use of ‘<=’ prevents the constraint ‘(Ord a1)’ from being solved. Probable fix: use a type annotation to specify what ‘a1’ should be. Potentially matching instances: @@ -31,9 +30,10 @@ T15883c.hs:14:1: error: [GHC-39999] ...plus 24 others ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the expression: a1 < b1 - In a case alternative: MkFoo b1 -> (a1 < b1) - In the expression: case b of MkFoo b1 -> (a1 < b1) - When typechecking the code for ‘<’ + • In the expression: a1 <= b1 + In a case alternative: MkFoo b1 -> (a1 <= b1) + In the expression: case b of MkFoo b1 -> (a1 <= b1) + When typechecking the code for ‘<=’ in a derived instance for ‘Ord (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883d.stderr ===================================== @@ -1,4 +1,3 @@ - T15883d.hs:14:1: error: [GHC-39999] • Ambiguous type variable ‘a0’ arising from a use of ‘showsPrec’ prevents the constraint ‘(Show a0)’ from being solved. @@ -9,11 +8,12 @@ T15883d.hs:14:1: error: [GHC-39999] ...plus 29 others ...plus 10 instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘(showsPrec 11 b1 z)’ + In the expression: showString "MkFoo " (showsPrec 11 b1 z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkFoo ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkFoo ") (showsPrec 11 b1)) + ‘(\ z -> showString "MkFoo " (showsPrec 11 b1 z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883e.stderr ===================================== @@ -1,71 +1,26 @@ - -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘d0’ arising from a use of ‘k’ - prevents the constraint ‘(Data d0)’ from being solved. - Probable fix: use a type annotation to specify what ‘d0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: z (\ a1 -> MkFoo a1) `k` a1 - In an equation for ‘GHC.Internal.Data.Data.gfoldl’: - GHC.Internal.Data.Data.gfoldl k z (MkFoo a1) - = (z (\ a1 -> MkFoo a1) `k` a1) - When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ - -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘d0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘d0’ with ‘forall a. a’ + Expected: d0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘d0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘z MkFoo’ + In the expression: z MkFoo `k` a1 When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: d0 (bound at T15883e.hs:16:1) -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘b0’ arising from a use of ‘k’ - prevents the constraint ‘(Data b0)’ from being solved. - Probable fix: use a type annotation to specify what ‘b0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: k (z (\ a1 -> MkFoo a1)) - In an equation for ‘GHC.Internal.Data.Data.gunfold’: - GHC.Internal.Data.Data.gunfold k z _ = k (z (\ a1 -> MkFoo a1)) +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘b0’ with ‘forall a. a’ + Expected: b0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘b0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘(z MkFoo)’ + In the expression: k (z MkFoo) When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘b0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ - When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: b0 (bound at T15883e.hs:16:1) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/75f6e408c8a79427449d1e2b092bc8de4a5395b5...5f730439d106b18f35ee7b1949b3a1498b2fc1ee -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/75f6e408c8a79427449d1e2b092bc8de4a5395b5...5f730439d106b18f35ee7b1949b3a1498b2fc1ee You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 11:57:59 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Tue, 05 Nov 2024 06:57:59 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/rm-obsolete-wrapper Message-ID: <672a08477998d_3ea90b164a4097916@gitlab.mail> Cheng Shao pushed new branch wip/rm-obsolete-wrapper at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/rm-obsolete-wrapper You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 12:16:55 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Tue, 05 Nov 2024 07:16:55 -0500 Subject: [Git][ghc/ghc] Pushed new tag ghc-9.12.1-alpha2 Message-ID: <672a0cb7e209c_3ea90b3b6f2810411e@gitlab.mail> Zubin pushed new tag ghc-9.12.1-alpha2 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/ghc-9.12.1-alpha2 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 12:27:41 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Tue, 05 Nov 2024 07:27:41 -0500 Subject: [Git][ghc/ghc][wip/splice-imports-2024] Some fixes Message-ID: <672a0f3d3f73f_3ea90b30c9c410901e@gitlab.mail> Matthew Pickering pushed to branch wip/splice-imports-2024 at Glasgow Haskell Compiler / GHC Commits: b14e2a3a by Matthew Pickering at 2024-11-05T12:27:05+00:00 Some fixes - - - - - 4 changed files: - compiler/GHC/Driver/Errors/Ppr.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs Changes: ===================================== compiler/GHC/Driver/Errors/Ppr.hs ===================================== @@ -258,7 +258,8 @@ instance Diagnostic DriverMessage where go (m:ms) = (text "which imports" <+> ppr_node m) : go ms ppr_node :: ModuleGraphNode -> SDoc - ppr_node (ModuleNode _deps _uids lvl m) = text "module" <+> ppr_ms m <+> text "@" <> ppr lvl + ppr_node (ModuleNode _deps _uids lvl m) + = text "module" <+> ppr_ms m <+> if lvl == zeroStage then empty else (text "@" <> ppr lvl) ppr_node (InstantiationNode _uid u) = text "instantiated unit" <+> ppr u ppr_node (LinkNode uid _) = pprPanic "LinkNode should not be in a cycle" (ppr uid) ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -1633,9 +1633,11 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro -- Add a dependency on the HsBoot file if it exists -- This gets passed to the loopImports function which just ignores it if it -- can't be found. - [(ms_unitid ms, todoStage, NoPkgQual, GWIB (noLoc $ ms_mod_name ms) IsBoot) | NotBoot <- [isBootSummary ms] ] ++ + [(ms_unitid ms, lvl, NoPkgQual, GWIB (noLoc $ ms_mod_name ms) IsBoot) | NotBoot <- [isBootSummary ms] ] ++ [(ms_unitid ms, offsetStage lvl st, b, c) | (st, b, c) <- msDeps ms ] + -- Hacky.. + offsetStage lvl _ | lvl >= ModuleStage 10 || lvl <= ModuleStage (-10) = lvl offsetStage lvl NormalStage = lvl offsetStage lvl QuoteStage = incModuleStage lvl offsetStage lvl SpliceStage = decModuleStage lvl @@ -2027,9 +2029,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph (mg, lookup_node) = moduleGraphNodesZero unit_state mod_graph - ttMap = mkTransDepsZero unit_state mod_graph - - mk_needed_set roots = pprTrace "ttMap" (ppr ttMap) $ Set.fromList $ map fst $ pprTraceIt "mk_needed_set" $ lefts $ map node_payload $ reachablesG2 mg (map (expectJust "needs_th" . lookup_node) (map Left roots)) + mk_needed_set roots = Set.fromList $ map fst $ pprTraceIt "mk_needed_set" $ lefts $ map node_payload $ reachablesG2 mg (map (expectJust "needs_th" . lookup_node) (map Left roots)) needs_obj_set, needs_bc_set :: Set.Set ModNodeKeyWithUid needs_obj_set = pprTraceIt "res_needs_obj_set" $ mk_needed_set (pprTraceIt "needs_obj_set" need_obj_set) ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -123,7 +123,6 @@ get_link_deps opts pls maybe_normal_osuf span mods = do else do (pkgs, mmods) <- unzip <$> mapM get_mod_info all_home_mods return (catMaybes mmods, unionManyUniqDSets (init_pkg_set : pkgs)) - pprTraceM "ld" (ppr (all_home_mods, mods_s, pkgs_s)) let -- 2. Exclude ones already linked ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -44,9 +44,9 @@ module GHC.Unit.Module.Graph , moduleGraphNodeUnitId - , ModNodeKeyWithUid(..) + , ModNodeKeyWithUid(..) - , ModuleStage + , ModuleStage(..) , zeroStage , todoStage , moduleStageToThLevel View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b14e2a3aad7fde9e0d39ecd255fc22c5a9c9a915 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b14e2a3aad7fde9e0d39ecd255fc22c5a9c9a915 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 12:36:14 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 05 Nov 2024 07:36:14 -0500 Subject: [Git][ghc/ghc][master] Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <672a113e2f3d0_3ea90b6e290411266e@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - 23 changed files: - compiler/GHC/Core/Class.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Parser.y - compiler/GHC/Rename/Bind.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/Language/Haskell/Syntax/Binds.hs - + compiler/Language/Haskell/Syntax/BooleanFormula.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Types.hs Changes: ===================================== compiler/GHC/Core/Class.hs ===================================== @@ -26,6 +26,7 @@ import GHC.Prelude import {-# SOURCE #-} GHC.Core.TyCon ( TyCon ) import {-# SOURCE #-} GHC.Core.TyCo.Rep ( Type, PredType ) import {-# SOURCE #-} GHC.Core.TyCo.Ppr ( pprType ) +import GHC.Hs.Extension (GhcRn) import GHC.Types.Var import GHC.Types.Name import GHC.Types.Basic @@ -35,7 +36,7 @@ import GHC.Utils.Panic import GHC.Types.SrcLoc import GHC.Types.Var.Set import GHC.Utils.Outputable -import GHC.Data.BooleanFormula (BooleanFormula, mkTrue) +import Language.Haskell.Syntax.BooleanFormula ( BooleanFormula, mkTrue ) import qualified Data.Data as Data @@ -131,7 +132,7 @@ data TyFamEqnValidityInfo -- Note [Type-checking default assoc decls] in GHC.Tc.TyCl. } -type ClassMinimalDef = BooleanFormula Name -- Required methods +type ClassMinimalDef = BooleanFormula GhcRn -- Required methods data ClassBody = AbstractClass ===================================== compiler/GHC/CoreToIface.hs ===================================== @@ -43,6 +43,7 @@ module GHC.CoreToIface , toIfaceVar -- * Other stuff , toIfaceLFInfo + , toIfaceBooleanFormula -- * CgBreakInfo , dehydrateCgBreakInfo ) where @@ -69,6 +70,7 @@ import GHC.Builtin.Types ( heqTyCon ) import GHC.Iface.Syntax import GHC.Data.FastString +import GHC.Data.BooleanFormula qualified as BF(BooleanFormula(..)) import GHC.Types.Id import GHC.Types.Id.Info @@ -82,11 +84,14 @@ import GHC.Types.Var.Set import GHC.Types.Tickish import GHC.Types.Demand ( isNopSig ) import GHC.Types.Cpr ( topCprSig ) +import GHC.Types.SrcLoc (unLoc) import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Utils.Misc +import GHC.Hs.Extension (GhcRn) + import Data.Maybe ( isNothing, catMaybes ) {- Note [Avoiding space leaks in toIface*] @@ -537,6 +542,14 @@ toIfGuidance src guidance , isStableSource src = IfWhen arity unsat_ok boring_ok | otherwise = IfNoGuidance +toIfaceBooleanFormula :: BF.BooleanFormula GhcRn -> IfaceBooleanFormula +toIfaceBooleanFormula = go + where + go (BF.Var nm ) = IfVar $ mkIfLclName . getOccFS . unLoc $ nm + go (BF.And bfs ) = IfAnd $ map (go . unLoc) bfs + go (BF.Or bfs ) = IfOr $ map (go . unLoc) bfs + go (BF.Parens bf) = IfParens $ (go . unLoc) bf + {- ************************************************************************ * * ===================================== compiler/GHC/Data/BooleanFormula.hs ===================================== @@ -1,5 +1,6 @@ -{-# LANGUAGE DeriveDataTypeable #-} -{-# LANGUAGE DeriveTraversable #-} +{-# OPTIONS_GHC -Wno-orphans #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE TypeFamilies #-} -------------------------------------------------------------------------------- -- | Boolean formulas without quantifiers and without negation. @@ -8,73 +9,62 @@ -- This module is used to represent minimal complete definitions for classes. -- module GHC.Data.BooleanFormula ( - BooleanFormula(..), LBooleanFormula, - mkFalse, mkTrue, mkAnd, mkOr, mkVar, + module Language.Haskell.Syntax.BooleanFormula, isFalse, isTrue, + bfMap, bfTraverse, eval, simplify, isUnsatisfied, implies, impliesAtom, - pprBooleanFormula, pprBooleanFormulaNice + pprBooleanFormula, pprBooleanFormulaNice, pprBooleanFormulaNormal ) where -import GHC.Prelude hiding ( init, last ) - -import Data.List ( nub, intersperse ) +import Data.List ( intersperse ) import Data.List.NonEmpty ( NonEmpty (..), init, last ) -import Data.Data -import GHC.Utils.Monad -import GHC.Utils.Outputable -import GHC.Parser.Annotation ( LocatedL ) -import GHC.Types.SrcLoc +import GHC.Prelude hiding ( init, last ) import GHC.Types.Unique import GHC.Types.Unique.Set +import GHC.Types.SrcLoc (unLoc) +import GHC.Utils.Outputable +import GHC.Parser.Annotation ( SrcSpanAnnL ) +import GHC.Hs.Extension (GhcPass (..), OutputableBndrId) +import Language.Haskell.Syntax.Extension (Anno, LIdP, IdP) +import Language.Haskell.Syntax.BooleanFormula + ---------------------------------------------------------------------- -- Boolean formula type and smart constructors ---------------------------------------------------------------------- -type LBooleanFormula a = LocatedL (BooleanFormula a) - -data BooleanFormula a = Var a | And [LBooleanFormula a] | Or [LBooleanFormula a] - | Parens (LBooleanFormula a) - deriving (Eq, Data, Functor, Foldable, Traversable) - -mkVar :: a -> BooleanFormula a -mkVar = Var +type instance Anno (BooleanFormula (GhcPass p)) = SrcSpanAnnL -mkFalse, mkTrue :: BooleanFormula a -mkFalse = Or [] -mkTrue = And [] +-- if we had Functor/Traversable (LbooleanFormula p) we could use that +-- as a constraint and we wouldn't need to specialize to just GhcPass p, +-- but becuase LBooleanFormula is a type synonym such a constraint is +-- impossible. --- Convert a Bool to a BooleanFormula -mkBool :: Bool -> BooleanFormula a -mkBool False = mkFalse -mkBool True = mkTrue - --- Make a conjunction, and try to simplify -mkAnd :: Eq a => [LBooleanFormula a] -> BooleanFormula a -mkAnd = maybe mkFalse (mkAnd' . nub) . concatMapM fromAnd +-- BooleanFormula can't be an instance of functor because it can't lift +-- arbitrary functions `a -> b`, only functions of type `LIdP a -> LIdP b` +-- ditto for Traversable. +bfMap :: (LIdP (GhcPass p) -> LIdP (GhcPass p')) + -> BooleanFormula (GhcPass p) -> BooleanFormula (GhcPass p') +bfMap f = go where - -- See Note [Simplification of BooleanFormulas] - fromAnd :: LBooleanFormula a -> Maybe [LBooleanFormula a] - fromAnd (L _ (And xs)) = Just xs - -- assume that xs are already simplified - -- otherwise we would need: fromAnd (And xs) = concat <$> traverse fromAnd xs - fromAnd (L _ (Or [])) = Nothing - -- in case of False we bail out, And [..,mkFalse,..] == mkFalse - fromAnd x = Just [x] - mkAnd' [x] = unLoc x - mkAnd' xs = And xs - -mkOr :: Eq a => [LBooleanFormula a] -> BooleanFormula a -mkOr = maybe mkTrue (mkOr' . nub) . concatMapM fromOr + go (Var a ) = Var $ f a + go (And bfs) = And $ map (fmap go) bfs + go (Or bfs) = Or $ map (fmap go) bfs + go (Parens bf ) = Parens $ fmap go bf + +bfTraverse :: Applicative f + => (LIdP (GhcPass p) -> f (LIdP (GhcPass p'))) + -> BooleanFormula (GhcPass p) + -> f (BooleanFormula (GhcPass p')) +bfTraverse f = go where - -- See Note [Simplification of BooleanFormulas] - fromOr (L _ (Or xs)) = Just xs - fromOr (L _ (And [])) = Nothing - fromOr x = Just [x] - mkOr' [x] = unLoc x - mkOr' xs = Or xs + go (Var a ) = Var <$> f a + go (And bfs) = And <$> traverse @[] (traverse go) bfs + go (Or bfs) = Or <$> traverse @[] (traverse go) bfs + go (Parens bf ) = Parens <$> traverse go bf + {- @@ -115,15 +105,15 @@ We don't show a ridiculous error message like -- Evaluation and simplification ---------------------------------------------------------------------- -isFalse :: BooleanFormula a -> Bool +isFalse :: BooleanFormula (GhcPass p) -> Bool isFalse (Or []) = True isFalse _ = False -isTrue :: BooleanFormula a -> Bool +isTrue :: BooleanFormula (GhcPass p) -> Bool isTrue (And []) = True isTrue _ = False -eval :: (a -> Bool) -> BooleanFormula a -> Bool +eval :: (LIdP (GhcPass p) -> Bool) -> BooleanFormula (GhcPass p) -> Bool eval f (Var x) = f x eval f (And xs) = all (eval f . unLoc) xs eval f (Or xs) = any (eval f . unLoc) xs @@ -131,18 +121,24 @@ eval f (Parens x) = eval f (unLoc x) -- Simplify a boolean formula. -- The argument function should give the truth of the atoms, or Nothing if undecided. -simplify :: Eq a => (a -> Maybe Bool) -> BooleanFormula a -> BooleanFormula a +simplify :: forall p. Eq (LIdP (GhcPass p)) + => (LIdP (GhcPass p) -> Maybe Bool) + -> BooleanFormula (GhcPass p) + -> BooleanFormula (GhcPass p) simplify f (Var a) = case f a of Nothing -> Var a Just b -> mkBool b -simplify f (And xs) = mkAnd (map (\(L l x) -> L l (simplify f x)) xs) -simplify f (Or xs) = mkOr (map (\(L l x) -> L l (simplify f x)) xs) +simplify f (And xs) = mkAnd (map (fmap (simplify f)) xs) +simplify f (Or xs) = mkOr (map (fmap (simplify f)) xs) simplify f (Parens x) = simplify f (unLoc x) -- Test if a boolean formula is satisfied when the given values are assigned to the atoms -- if it is, returns Nothing -- if it is not, return (Just remainder) -isUnsatisfied :: Eq a => (a -> Bool) -> BooleanFormula a -> Maybe (BooleanFormula a) +isUnsatisfied :: Eq (LIdP (GhcPass p)) + => (LIdP (GhcPass p) -> Bool) + -> BooleanFormula (GhcPass p) + -> Maybe (BooleanFormula (GhcPass p)) isUnsatisfied f bf | isTrue bf' = Nothing | otherwise = Just bf' @@ -155,42 +151,42 @@ isUnsatisfied f bf -- eval f x == False <==> isFalse (simplify (Just . f) x) -- If the boolean formula holds, does that mean that the given atom is always true? -impliesAtom :: Eq a => BooleanFormula a -> a -> Bool -Var x `impliesAtom` y = x == y -And xs `impliesAtom` y = any (\x -> (unLoc x) `impliesAtom` y) xs +impliesAtom :: Eq (IdP (GhcPass p)) => BooleanFormula (GhcPass p) -> LIdP (GhcPass p) -> Bool +Var x `impliesAtom` y = (unLoc x) == (unLoc y) +And xs `impliesAtom` y = any (\x -> unLoc x `impliesAtom` y) xs -- we have all of xs, so one of them implying y is enough -Or xs `impliesAtom` y = all (\x -> (unLoc x) `impliesAtom` y) xs -Parens x `impliesAtom` y = (unLoc x) `impliesAtom` y +Or xs `impliesAtom` y = all (\x -> unLoc x `impliesAtom` y) xs +Parens x `impliesAtom` y = unLoc x `impliesAtom` y -implies :: Uniquable a => BooleanFormula a -> BooleanFormula a -> Bool +implies :: (Uniquable (IdP (GhcPass p))) => BooleanFormula (GhcPass p) -> BooleanFormula (GhcPass p) -> Bool implies e1 e2 = go (Clause emptyUniqSet [e1]) (Clause emptyUniqSet [e2]) where - go :: Uniquable a => Clause a -> Clause a -> Bool + go :: Uniquable (IdP (GhcPass p)) => Clause (GhcPass p) -> Clause (GhcPass p) -> Bool go l at Clause{ clauseExprs = hyp:hyps } r = case hyp of - Var x | memberClauseAtoms x r -> True - | otherwise -> go (extendClauseAtoms l x) { clauseExprs = hyps } r + Var x | memberClauseAtoms (unLoc x) r -> True + | otherwise -> go (extendClauseAtoms l (unLoc x)) { clauseExprs = hyps } r Parens hyp' -> go l { clauseExprs = unLoc hyp':hyps } r And hyps' -> go l { clauseExprs = map unLoc hyps' ++ hyps } r Or hyps' -> all (\hyp' -> go l { clauseExprs = unLoc hyp':hyps } r) hyps' go l r at Clause{ clauseExprs = con:cons } = case con of - Var x | memberClauseAtoms x l -> True - | otherwise -> go l (extendClauseAtoms r x) { clauseExprs = cons } + Var x | memberClauseAtoms (unLoc x) l -> True + | otherwise -> go l (extendClauseAtoms r (unLoc x)) { clauseExprs = cons } Parens con' -> go l r { clauseExprs = unLoc con':cons } And cons' -> all (\con' -> go l r { clauseExprs = unLoc con':cons }) cons' Or cons' -> go l r { clauseExprs = map unLoc cons' ++ cons } go _ _ = False -- A small sequent calculus proof engine. -data Clause a = Clause { - clauseAtoms :: UniqSet a, - clauseExprs :: [BooleanFormula a] +data Clause p = Clause { + clauseAtoms :: UniqSet (IdP p), + clauseExprs :: [BooleanFormula p] } -extendClauseAtoms :: Uniquable a => Clause a -> a -> Clause a +extendClauseAtoms :: Uniquable (IdP p) => Clause p -> IdP p -> Clause p extendClauseAtoms c x = c { clauseAtoms = addOneToUniqSet (clauseAtoms c) x } -memberClauseAtoms :: Uniquable a => a -> Clause a -> Bool +memberClauseAtoms :: Uniquable (IdP p) => IdP p -> Clause p -> Bool memberClauseAtoms x c = x `elementOfUniqSet` clauseAtoms c ---------------------------------------------------------------------- @@ -199,28 +195,29 @@ memberClauseAtoms x c = x `elementOfUniqSet` clauseAtoms c -- Pretty print a BooleanFormula, -- using the arguments as pretty printers for Var, And and Or respectively -pprBooleanFormula' :: (Rational -> a -> SDoc) - -> (Rational -> [SDoc] -> SDoc) - -> (Rational -> [SDoc] -> SDoc) - -> Rational -> BooleanFormula a -> SDoc +pprBooleanFormula' :: (Rational -> LIdP (GhcPass p) -> SDoc) + -> (Rational -> [SDoc] -> SDoc) + -> (Rational -> [SDoc] -> SDoc) + -> Rational -> BooleanFormula (GhcPass p) -> SDoc pprBooleanFormula' pprVar pprAnd pprOr = go where go p (Var x) = pprVar p x - go p (And []) = cparen (p > 0) $ empty + go p (And []) = cparen (p > 0) empty go p (And xs) = pprAnd p (map (go 3 . unLoc) xs) go _ (Or []) = keyword $ text "FALSE" go p (Or xs) = pprOr p (map (go 2 . unLoc) xs) go p (Parens x) = go p (unLoc x) -- Pretty print in source syntax, "a | b | c,d,e" -pprBooleanFormula :: (Rational -> a -> SDoc) -> Rational -> BooleanFormula a -> SDoc +pprBooleanFormula :: (Rational -> LIdP (GhcPass p) -> SDoc) + -> Rational -> BooleanFormula (GhcPass p) -> SDoc pprBooleanFormula pprVar = pprBooleanFormula' pprVar pprAnd pprOr where pprAnd p = cparen (p > 3) . fsep . punctuate comma pprOr p = cparen (p > 2) . fsep . intersperse vbar -- Pretty print human in readable format, "either `a' or `b' or (`c', `d' and `e')"? -pprBooleanFormulaNice :: Outputable a => BooleanFormula a -> SDoc +pprBooleanFormulaNice :: Outputable (LIdP (GhcPass p)) => BooleanFormula (GhcPass p) -> SDoc pprBooleanFormulaNice = pprBooleanFormula' pprVar pprAnd pprOr 0 where pprVar _ = quotes . ppr @@ -230,15 +227,14 @@ pprBooleanFormulaNice = pprBooleanFormula' pprVar pprAnd pprOr 0 pprAnd' (x:xs) = fsep (punctuate comma (init (x:|xs))) <> text ", and" <+> last (x:|xs) pprOr p xs = cparen (p > 1) $ text "either" <+> sep (intersperse (text "or") xs) -instance (OutputableBndr a) => Outputable (BooleanFormula a) where +instance OutputableBndrId p => Outputable (BooleanFormula (GhcPass p)) where ppr = pprBooleanFormulaNormal -pprBooleanFormulaNormal :: (OutputableBndr a) - => BooleanFormula a -> SDoc +pprBooleanFormulaNormal :: OutputableBndrId p => BooleanFormula (GhcPass p) -> SDoc pprBooleanFormulaNormal = go where - go (Var x) = pprPrefixOcc x + go (Var x) = pprPrefixOcc (unLoc x) go (And xs) = fsep $ punctuate comma (map (go . unLoc) xs) go (Or []) = keyword $ text "FALSE" go (Or xs) = fsep $ intersperse vbar (map (go . unLoc) xs) - go (Parens x) = parens (go $ unLoc x) + go (Parens x) = parens (go $ unLoc x) \ No newline at end of file ===================================== compiler/GHC/Hs/Binds.hs ===================================== @@ -36,6 +36,7 @@ import Language.Haskell.Syntax.Binds import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, pprFunBind, pprPatBind ) import {-# SOURCE #-} GHC.Hs.Pat (pprLPat ) +import GHC.Data.BooleanFormula ( LBooleanFormula, pprBooleanFormulaNormal ) import GHC.Types.Tickish import GHC.Hs.Extension import GHC.Parser.Annotation @@ -47,7 +48,6 @@ import GHC.Types.Basic import GHC.Types.SourceText import GHC.Types.SrcLoc as SrcLoc import GHC.Types.Var -import GHC.Data.BooleanFormula (LBooleanFormula) import GHC.Types.Name import GHC.Utils.Outputable @@ -968,9 +968,8 @@ instance Outputable TcSpecPrag where ppr (SpecPrag var _ inl) = text (extractSpecPragName $ inl_src inl) <+> pprSpec var (text "") inl -pprMinimalSig :: (OutputableBndr name) - => LBooleanFormula (GenLocated l name) -> SDoc -pprMinimalSig (L _ bf) = ppr (fmap unLoc bf) +pprMinimalSig :: OutputableBndrId p => LBooleanFormula (GhcPass p) -> SDoc +pprMinimalSig (L _ bf) = pprBooleanFormulaNormal bf {- ************************************************************************ ===================================== compiler/GHC/Hs/Decls.hs ===================================== @@ -110,6 +110,7 @@ module GHC.Hs.Decls ( import GHC.Prelude import Language.Haskell.Syntax.Decls +import Language.Haskell.Syntax.Extension import {-# SOURCE #-} GHC.Hs.Expr ( pprExpr, pprUntypedSplice ) -- Because Expr imports Decls via HsBracket @@ -119,7 +120,7 @@ import GHC.Hs.Type import GHC.Hs.Doc import GHC.Types.Basic import GHC.Core.Coercion -import Language.Haskell.Syntax.Extension + import GHC.Hs.Extension import GHC.Parser.Annotation import GHC.Types.Name ===================================== compiler/GHC/Hs/Instances.hs ===================================== @@ -33,6 +33,8 @@ import GHC.Hs.Type import GHC.Hs.Pat import GHC.Hs.ImpExp import GHC.Parser.Annotation +import GHC.Data.BooleanFormula (BooleanFormula(..)) +import Language.Haskell.Syntax.Extension (Anno) -- --------------------------------------------------------------------- -- Data derivations from GHC.Hs----------------------------------------- @@ -590,3 +592,6 @@ deriving instance Data XXPatGhcTc deriving instance Data XViaStrategyPs -- --------------------------------------------------------------------- + +deriving instance (Typeable p, Data (Anno (IdGhcP p)), Data (IdGhcP p)) => Data (BooleanFormula (GhcPass p)) +--------------------------------------------------------------------- \ No newline at end of file ===================================== compiler/GHC/Iface/Decl.hs ===================================== @@ -13,7 +13,6 @@ module GHC.Iface.Decl ( coAxiomToIfaceDecl , tyThingToIfaceDecl -- Converting things to their Iface equivalents - , toIfaceBooleanFormula ) where @@ -33,21 +32,17 @@ import GHC.Core.DataCon import GHC.Core.Type import GHC.Core.Multiplicity - import GHC.Types.Id import GHC.Types.Var.Env import GHC.Types.Var import GHC.Types.Name import GHC.Types.Basic import GHC.Types.TyThing -import GHC.Types.SrcLoc import GHC.Utils.Panic.Plain import GHC.Utils.Misc import GHC.Data.Maybe -import GHC.Data.BooleanFormula - import Data.List ( findIndex, mapAccumL ) {- @@ -287,7 +282,7 @@ classToIfaceDecl env clas ifClassCtxt = tidyToIfaceContext env1 sc_theta, ifATs = map toIfaceAT clas_ats, ifSigs = map toIfaceClassOp op_stuff, - ifMinDef = toIfaceBooleanFormula $ fmap (mkIfLclName . getOccFS) (classMinimalDef clas) + ifMinDef = toIfaceBooleanFormula (classMinimalDef clas) } (env1, tc_binders) = tidyTyConBinders env (tyConBinders tycon) @@ -335,10 +330,3 @@ tidyTyConBinders = mapAccumL tidyTyConBinder tidyTyVar :: TidyEnv -> TyVar -> IfLclName tidyTyVar (_, subst) tv = toIfaceTyVar (lookupVarEnv subst tv `orElse` tv) - -toIfaceBooleanFormula :: BooleanFormula IfLclName -> IfaceBooleanFormula -toIfaceBooleanFormula = \case - Var nm -> IfVar nm - And bfs -> IfAnd (map (toIfaceBooleanFormula . unLoc) bfs) - Or bfs -> IfOr (map (toIfaceBooleanFormula . unLoc) bfs) - Parens bf -> IfParens (toIfaceBooleanFormula . unLoc $ bf) ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -2041,8 +2041,9 @@ instance ToHie PendingRnSplice where instance ToHie PendingTcSplice where toHie (PendingTcSplice _ e) = toHie e -instance ToHie (LBooleanFormula (LocatedN Name)) where - toHie (L span form) = concatM $ makeNode form (locA span) : case form of +instance (HiePass p, Data (IdGhcP p)) + => ToHie (GenLocated SrcSpanAnnL (BooleanFormula (GhcPass p))) where + toHie (L span form) = concatM $ makeNode form (locA span) : case form of Var a -> [ toHie $ C Use a ] ===================================== compiler/GHC/Iface/Syntax.hs ===================================== @@ -35,10 +35,8 @@ module GHC.Iface.Syntax ( -- Misc ifaceDeclImplicitBndrs, visibleIfConDecls, ifaceDeclFingerprints, - fromIfaceBooleanFormula, fromIfaceWarnings, fromIfaceWarningTxt, - -- Free Names freeNamesIfDecl, freeNamesIfRule, freeNamesIfFamInst, freeNamesIfConDecls, @@ -51,7 +49,10 @@ module GHC.Iface.Syntax ( import GHC.Prelude +import GHC.Builtin.Names(mkUnboundName) import GHC.Data.FastString +import GHC.Data.BooleanFormula (pprBooleanFormula, isTrue) + import GHC.Builtin.Names ( unrestrictedFunTyConKey, liftedTypeKindTyConKey, constraintKindTyConKey ) import GHC.Types.Unique ( hasKey ) @@ -62,9 +63,9 @@ import GHC.Types.Demand import GHC.Types.Cpr import GHC.Core.Class import GHC.Types.FieldLabel -import GHC.Types.Name.Set import GHC.Core.Coercion.Axiom ( BranchIndex ) import GHC.Types.Name +import GHC.Types.Name.Set import GHC.Types.Name.Reader import GHC.Types.CostCentre import GHC.Types.Literal @@ -75,7 +76,6 @@ import GHC.Unit.Module import GHC.Unit.Module.Warnings import GHC.Types.SrcLoc import GHC.Types.SourceText -import GHC.Data.BooleanFormula ( BooleanFormula(..), pprBooleanFormula, isTrue ) import GHC.Types.Var( VarBndr(..), binderVar, tyVarSpecToBinders, visArgTypeLike ) import GHC.Core.TyCon ( Role (..), Injectivity(..), tyConBndrVisForAllTyFlag ) import GHC.Core.DataCon (SrcStrictness(..), SrcUnpackedness(..)) @@ -94,6 +94,8 @@ import GHC.Utils.Panic import GHC.Utils.Misc( dropList, filterByList, notNull, unzipWith, seqList, zipWithEqual ) +import Language.Haskell.Syntax.BooleanFormula(BooleanFormula(..)) + import Control.Monad import System.IO.Unsafe import Control.DeepSeq @@ -213,18 +215,14 @@ data IfaceClassBody ifMinDef :: IfaceBooleanFormula -- Minimal complete definition } +-- See also 'BooleanFormula' data IfaceBooleanFormula = IfVar IfLclName | IfAnd [IfaceBooleanFormula] | IfOr [IfaceBooleanFormula] | IfParens IfaceBooleanFormula + deriving Eq -fromIfaceBooleanFormula :: IfaceBooleanFormula -> BooleanFormula IfLclName -fromIfaceBooleanFormula = \case - IfVar nm -> Var nm - IfAnd ibfs -> And (map (noLocA . fromIfaceBooleanFormula) ibfs) - IfOr ibfs -> Or (map (noLocA . fromIfaceBooleanFormula) ibfs) - IfParens ibf -> Parens (noLocA . fromIfaceBooleanFormula $ ibf) data IfaceTyConParent = IfNoParent @@ -1039,13 +1037,21 @@ pprIfaceDecl ss (IfaceClass { ifName = clas | showSub ss sg = Just $ pprIfaceClassOp ss sg | otherwise = Nothing - pprMinDef :: BooleanFormula IfLclName -> SDoc + pprMinDef :: BooleanFormula GhcRn -> SDoc pprMinDef minDef = ppUnless (isTrue minDef) $ -- hide empty definitions text "{-# MINIMAL" <+> pprBooleanFormula - (\_ def -> cparen (isLexSym def) (ppr def)) 0 (fmap ifLclNameFS minDef) <+> + (\_ def -> let fs = getOccFS def in cparen (isLexSym fs) (ppr fs)) 0 minDef <+> text "#-}" + fromIfaceBooleanFormula :: IfaceBooleanFormula -> BooleanFormula GhcRn + -- `mkUnboundName` here is fine because the Name generated is only used for pretty printing and nothing else. + fromIfaceBooleanFormula (IfVar nm ) = Var $ noLocA . mkUnboundName . mkVarOccFS . ifLclNameFS $ nm + fromIfaceBooleanFormula (IfAnd bfs ) = And $ map (noLocA . fromIfaceBooleanFormula) bfs + fromIfaceBooleanFormula (IfOr bfs ) = Or $ map (noLocA . fromIfaceBooleanFormula) bfs + fromIfaceBooleanFormula (IfParens bf) = Parens $ (noLocA . fromIfaceBooleanFormula) bf + + -- See Note [Suppressing binder signatures] in GHC.Iface.Type suppress_bndr_sig = SuppressBndrSig True ===================================== compiler/GHC/IfaceToCore.hs ===================================== @@ -32,6 +32,7 @@ module GHC.IfaceToCore ( hydrateCgBreakInfo ) where + import GHC.Prelude import GHC.ByteCode.Types @@ -43,7 +44,6 @@ import GHC.Driver.Config.Core.Lint ( initLintConfig ) import GHC.Builtin.Types.Literals(typeNatCoAxiomRules) import GHC.Builtin.Types -import GHC.Iface.Decl (toIfaceBooleanFormula) import GHC.Iface.Syntax import GHC.Iface.Load import GHC.Iface.Env @@ -123,20 +123,26 @@ import GHC.Types.Tickish import GHC.Types.TyThing import GHC.Types.Error +import GHC.Parser.Annotation (noLocA) + +import GHC.Hs.Extension ( GhcRn ) + import GHC.Fingerprint -import qualified GHC.Data.BooleanFormula as BF import Control.Monad -import GHC.Parser.Annotation import GHC.Driver.Env.KnotVars import GHC.Unit.Module.WholeCoreBindings import Data.IORef import Data.Foldable import Data.Function ( on ) +import Data.List(nub) import Data.List.NonEmpty ( NonEmpty ) import qualified Data.List.NonEmpty as NE import GHC.Builtin.Names (ioTyConName, rOOT_MAIN) import GHC.Iface.Errors.Types + +import Language.Haskell.Syntax.BooleanFormula (BooleanFormula) +import Language.Haskell.Syntax.BooleanFormula qualified as BF(BooleanFormula(..)) import Language.Haskell.Syntax.Extension (NoExtField (NoExtField)) {- @@ -297,14 +303,38 @@ mergeIfaceDecl d1 d2 plusNameEnv_C mergeIfaceClassOp (mkNameEnv [ (n, op) | op@(IfaceClassOp n _ _) <- ops1 ]) (mkNameEnv [ (n, op) | op@(IfaceClassOp n _ _) <- ops2 ]) + in d1 { ifBody = (ifBody d1) { ifSigs = ops, - ifMinDef = toIfaceBooleanFormula . BF.mkOr . map (noLocA . fromIfaceBooleanFormula) $ [bf1, bf2] + ifMinDef = mkOr [ bf1, bf2] } } `withRolesFrom` d2 -- It doesn't matter; we'll check for consistency later when -- we merge, see 'mergeSignatures' | otherwise = d1 `withRolesFrom` d2 + where + -- The reason we need to duplicate mkOr here, instead of + -- using BooleanFormula's mkOr and just doing the loop like: + -- `toIfaceBooleanFormula . mkOr . fromIfaceBooleanFormula` + -- is quite subtle. Say we have the following minimal pragma: + -- {-# MINIMAL f | g #-}. If we use fromIfaceBooleanFormula + -- first, we will end up doing + -- `nub [Var (mkUnboundName f), Var (mkUnboundName g)]`, + -- which might seem fine, but Name equallity is decided by + -- their Unique, which will be identical since mkUnboundName + -- just stuffs the mkUnboundKey unqiue into both. + -- So the result will be {-# MINIMAL f #-}, oopsie. + -- Duplication it is. + mkOr :: [IfaceBooleanFormula] -> IfaceBooleanFormula + mkOr = maybe (IfAnd []) (mkOr' . nub . concat) . mapM fromOr + where + -- See Note [Simplification of BooleanFormulas] + fromOr bf = case bf of + (IfOr xs) -> Just xs + (IfAnd []) -> Nothing + _ -> Just [bf] + mkOr' [x] = x + mkOr' xs = IfOr xs -- Note [Role merging] -- ~~~~~~~~~~~~~~~~~~~ @@ -795,8 +825,7 @@ tc_iface_decl _parent ignore_prags ; sigs <- mapM tc_sig rdr_sigs ; fds <- mapM tc_fd rdr_fds ; traceIf (text "tc-iface-class3" <+> ppr tc_name) - ; let mindef_occ = fromIfaceBooleanFormula if_mindef - ; mindef <- traverse (lookupIfaceTop . mkVarOccFS . ifLclNameFS) mindef_occ + ; mindef <- tc_boolean_formula if_mindef ; cls <- fixM $ \ cls -> do { ats <- mapM (tc_at cls) rdr_ats ; traceIf (text "tc-iface-class4" <+> ppr tc_name) @@ -845,6 +874,12 @@ tc_iface_decl _parent ignore_prags -- e.g. type AT a; type AT b = AT [b] #8002 return (ATI tc mb_def) + tc_boolean_formula :: IfaceBooleanFormula -> IfL (BooleanFormula GhcRn) + tc_boolean_formula (IfAnd ibfs ) = BF.And . map noLocA <$> traverse tc_boolean_formula ibfs + tc_boolean_formula (IfOr ibfs ) = BF.Or . map noLocA <$> traverse tc_boolean_formula ibfs + tc_boolean_formula (IfParens ibf) = BF.Parens . noLocA <$> tc_boolean_formula ibf + tc_boolean_formula (IfVar nm ) = BF.Var . noLocA <$> (lookupIfaceTop . mkVarOccFS . ifLclNameFS $ nm) + mk_sc_doc pred = text "Superclass" <+> ppr pred mk_at_doc tc = text "Associated type" <+> ppr tc mk_op_doc op_name op_ty = text "Class op" <+> sep [ppr op_name, ppr op_ty] ===================================== compiler/GHC/Parser.y ===================================== @@ -39,9 +39,9 @@ module GHC.Parser where -- base -import Control.Monad ( unless, liftM, when, (<=<) ) +import Control.Monad ( unless, liftM, when, (<=<) ) import GHC.Exts -import Data.Maybe ( maybeToList ) +import Data.Maybe ( maybeToList ) import Data.List.NonEmpty ( NonEmpty(..) ) import qualified Data.List.NonEmpty as NE import qualified Prelude -- for happy-generated code @@ -3710,27 +3710,27 @@ overloaded_label :: { Located (SourceText, FastString) } ----------------------------------------------------------------------------- -- Warnings and deprecations -name_boolformula_opt :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_opt :: { LBooleanFormula GhcPs } : name_boolformula { $1 } | {- empty -} { noLocA mkTrue } -name_boolformula :: { LBooleanFormula (LocatedN RdrName) } - : name_boolformula_and { $1 } +name_boolformula :: { LBooleanFormula GhcPs } + : name_boolformula_and { $1 } | name_boolformula_and '|' name_boolformula {% do { h <- addTrailingVbarL $1 (epTok $2) ; return (sLLa $1 $> (Or [h,$3])) } } -name_boolformula_and :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_and :: { LBooleanFormula GhcPs } : name_boolformula_and_list { sLLa (head $1) (last $1) (And ($1)) } -name_boolformula_and_list :: { [LBooleanFormula (LocatedN RdrName)] } +name_boolformula_and_list :: { [LBooleanFormula GhcPs] } : name_boolformula_atom { [$1] } | name_boolformula_atom ',' name_boolformula_and_list {% do { h <- addTrailingCommaL $1 (epTok $2) ; return (h : $3) } } -name_boolformula_atom :: { LBooleanFormula (LocatedN RdrName) } +name_boolformula_atom :: { LBooleanFormula GhcPs } : '(' name_boolformula ')' {% amsr (sLL $1 $> (Parens $2)) (AnnList Nothing (ListParens (epTok $1) (epTok $3)) [] noAnn []) } | name_var { sL1a $1 (Var $1) } @@ -4704,4 +4704,4 @@ combineHasLocs a b = combineSrcSpans (getHasLoc a) (getHasLoc b) fromTrailingN :: SrcSpanAnnN -> SrcSpanAnnA fromTrailingN (EpAnn anc ann cs) = EpAnn anc (AnnListItem (nann_trailing ann)) cs -} +} \ No newline at end of file ===================================== compiler/GHC/Rename/Bind.hs ===================================== @@ -80,6 +80,7 @@ import Control.Monad import Data.List ( partition ) import Data.List.NonEmpty ( NonEmpty(..) ) import GHC.Types.Unique.DSet (mkUniqDSet) +import GHC.Data.BooleanFormula (bfTraverse) {- -- ToDo: Put the annotations into the monad, so that they arrive in the proper @@ -1137,7 +1138,7 @@ renameSig ctxt (FixSig _ fsig) ; return (FixSig noAnn new_fsig, emptyFVs) } renameSig ctxt sig@(MinimalSig (_, s) (L l bf)) - = do new_bf <- traverse (lookupSigOccRnN ctxt sig) bf + = do new_bf <- bfTraverse (lookupSigOccRnN ctxt sig) bf return (MinimalSig (noAnn, s) (L l new_bf), emptyFVs) renameSig ctxt sig@(PatSynSig _ vs ty) ===================================== compiler/GHC/Tc/TyCl/Class.hs ===================================== @@ -344,7 +344,7 @@ tcClassMinimalDef _clas sigs op_info where -- By default require all methods without a default implementation defMindef :: ClassMinimalDef - defMindef = mkAnd [ noLocA (mkVar name) + defMindef = mkAnd [ noLocA (mkVar (noLocA name)) | (name, _, Nothing) <- op_info ] instantiateMethod :: Class -> TcId -> [TcType] -> TcType @@ -402,8 +402,8 @@ findMinimalDef :: [LSig GhcRn] -> Maybe ClassMinimalDef findMinimalDef = firstJusts . map toMinimalDef where toMinimalDef :: LSig GhcRn -> Maybe ClassMinimalDef - toMinimalDef (L _ (MinimalSig _ (L _ bf))) = Just (fmap unLoc bf) - toMinimalDef _ = Nothing + toMinimalDef (L _ (MinimalSig _ (L _ bf))) = Just bf + toMinimalDef _ = Nothing {- Note [Polymorphic methods] @@ -603,4 +603,4 @@ warnMissingAT name $ InvalidAssoc $ InvalidAssocInstance $ AssocInstanceMissing name ; diagnosticTc (warn && hsc_src == HsSrcFile) diag - } + } \ No newline at end of file ===================================== compiler/GHC/Tc/TyCl/Instance.hs ===================================== @@ -1889,7 +1889,7 @@ tcMethods skol_info dfun_id clas tyvars dfun_ev_vars inst_tys -- -- See Note [Implementation of Unsatisfiable constraints] in GHC.Tc.Errors, -- point (D). - whenIsJust (isUnsatisfied methodExists (classMinimalDef clas)) $ + whenIsJust (isUnsatisfied (methodExists . unLoc) (classMinimalDef clas)) $ warnUnsatisfiedMinimalDefinition methodExists meth = isJust (findMethodBind meth binds prag_fn) ===================================== compiler/Language/Haskell/Syntax/Binds.hs ===================================== @@ -26,15 +26,13 @@ import {-# SOURCE #-} Language.Haskell.Syntax.Expr ( LHsExpr , MatchGroup , GRHSs ) -import {-# SOURCE #-} Language.Haskell.Syntax.Pat - ( LPat ) - +import {-# SOURCE #-} Language.Haskell.Syntax.Pat( LPat ) +import Language.Haskell.Syntax.BooleanFormula (LBooleanFormula) import Language.Haskell.Syntax.Extension import Language.Haskell.Syntax.Type import Language.Haskell.Syntax.Basic ( Fixity ) import GHC.Types.Basic (InlinePragma) -import GHC.Data.BooleanFormula (LBooleanFormula) import GHC.Types.SourceText (StringLiteral) import Data.Void @@ -379,7 +377,7 @@ data Sig pass -- | A minimal complete definition pragma -- -- > {-# MINIMAL a | (b, c | (d | e)) #-} - | MinimalSig (XMinimalSig pass) (LBooleanFormula (LIdP pass)) + | MinimalSig (XMinimalSig pass) (LBooleanFormula pass) -- | A "set cost centre" pragma for declarations -- ===================================== compiler/Language/Haskell/Syntax/BooleanFormula.hs ===================================== @@ -0,0 +1,62 @@ +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE QuantifiedConstraints #-} + +module Language.Haskell.Syntax.BooleanFormula( + BooleanFormula(..), LBooleanFormula, + mkVar, mkFalse, mkTrue, mkBool, mkAnd, mkOr + ) where + +import Prelude hiding ( init, last ) +import Data.List ( nub ) +import Language.Haskell.Syntax.Extension (XRec, UnXRec (..), LIdP) + + +-- types +type LBooleanFormula p = XRec p (BooleanFormula p) +data BooleanFormula p = Var (LIdP p) | And [LBooleanFormula p] | Or [LBooleanFormula p] + | Parens (LBooleanFormula p) + +-- instances +deriving instance (Eq (LIdP p), Eq (LBooleanFormula p)) => Eq (BooleanFormula p) + +-- smart constructors +-- see note [Simplification of BooleanFormulas] +mkVar :: LIdP p -> BooleanFormula p +mkVar = Var + +mkFalse, mkTrue :: BooleanFormula p +mkFalse = Or [] +mkTrue = And [] + +-- Convert a Bool to a BooleanFormula +mkBool :: Bool -> BooleanFormula p +mkBool False = mkFalse +mkBool True = mkTrue + +-- Make a conjunction, and try to simplify +mkAnd :: forall p. (UnXRec p, Eq (LIdP p), Eq (LBooleanFormula p)) => [LBooleanFormula p] -> BooleanFormula p +mkAnd = maybe mkFalse (mkAnd' . nub . concat) . mapM fromAnd + where + -- See Note [Simplification of BooleanFormulas] + fromAnd :: LBooleanFormula p -> Maybe [LBooleanFormula p] + fromAnd bf = case unXRec @p bf of + (And xs) -> Just xs + -- assume that xs are already simplified + -- otherwise we would need: fromAnd (And xs) = concat <$> traverse fromAnd xs + (Or []) -> Nothing + -- in case of False we bail out, And [..,mkFalse,..] == mkFalse + _ -> Just [bf] + mkAnd' [x] = unXRec @p x + mkAnd' xs = And xs + +mkOr :: forall p. (UnXRec p, Eq (LIdP p), Eq (LBooleanFormula p)) => [LBooleanFormula p] -> BooleanFormula p +mkOr = maybe mkTrue (mkOr' . nub . concat) . mapM fromOr + where + -- See Note [Simplification of BooleanFormulas] + fromOr bf = case unXRec @p bf of + (Or xs) -> Just xs + (And []) -> Nothing + _ -> Just [bf] + mkOr' [x] = unXRec @p x + mkOr' xs = Or xs ===================================== compiler/ghc.cabal.in ===================================== @@ -993,6 +993,7 @@ Library Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds + Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -234,6 +234,7 @@ GHC.Utils.Word64 Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds +Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -258,6 +258,7 @@ GHC.Utils.Word64 Language.Haskell.Syntax Language.Haskell.Syntax.Basic Language.Haskell.Syntax.Binds +Language.Haskell.Syntax.BooleanFormula Language.Haskell.Syntax.Decls Language.Haskell.Syntax.Expr Language.Haskell.Syntax.Extension ===================================== utils/check-exact/ExactPrint.hs ===================================== @@ -2807,7 +2807,7 @@ instance ExactPrint (AnnDecl GhcPs) where -- --------------------------------------------------------------------- -instance ExactPrint (BF.BooleanFormula (LocatedN RdrName)) where +instance ExactPrint (BF.BooleanFormula GhcPs) where getAnnotationEntry = const NoEntryVal setAnnotationAnchor a _ _ _ = a @@ -4527,7 +4527,7 @@ instance ExactPrint (LocatedL [LocatedA (ConDeclField GhcPs)]) where (an', fs') <- markAnnList an (markAnnotated fs) return (L an' fs') -instance ExactPrint (LocatedL (BF.BooleanFormula (LocatedN RdrName))) where +instance ExactPrint (LocatedL (BF.BooleanFormula GhcPs)) where getAnnotationEntry = entryFromLocatedA setAnnotationAnchor = setAnchorAn exact (L an bf) = do ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -45,6 +45,7 @@ import GHC.Builtin.Types , promotedNilDataCon , unitTy ) + import GHC.Builtin.Types.Prim (alphaTyVars) import GHC.Core.Class import GHC.Core.Coercion.Axiom @@ -176,7 +177,7 @@ tyThingToLHsDecl prr t = case t of $ snd $ classTvsFds cl , tcdSigs = - noLocA (MinimalSig (noAnn, NoSourceText) . noLocA . fmap noLocA $ classMinimalDef cl) + noLocA (MinimalSig (noAnn, NoSourceText) . noLocA $ classMinimalDef cl) : [ noLocA tcdSig | clsOp <- classOpItems cl , tcdSig <- synifyTcIdSig vs clsOp ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -19,6 +19,8 @@ -- Portability : portable module Haddock.Interface.Rename (renameInterface) where +import Prelude hiding (mapM) + import Control.Applicative () import Control.DeepSeq (force) import Control.Monad hiding (mapM) @@ -28,12 +30,13 @@ import Data.Foldable (traverse_) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Data.Traversable (mapM) + import GHC hiding (NoLink) import GHC.Builtin.Types (eqTyCon_RDR, tupleDataConName, tupleTyConName) import GHC.Types.Basic (Boxity (..), TopLevelFlag (..), TupleSort (..)) import GHC.Types.Name import GHC.Types.Name.Reader (RdrName (Exact)) -import Prelude hiding (mapM) +import Language.Haskell.Syntax.BooleanFormula(BooleanFormula(..)) import Haddock.Backends.Hoogle (ppExportD) import Haddock.GhcUtils @@ -770,11 +773,22 @@ renameSig sig = case sig of lnames' <- mapM renameNameL lnames return $ FixSig noExtField (FixitySig noExtField lnames' fixity) MinimalSig _ (L l s) -> do - s' <- traverse (traverse lookupRn) s + s' <- bfTraverse (traverse lookupRn) s return $ MinimalSig noExtField (L l s') -- we have filtered out all other kinds of signatures in Interface.Create _ -> error "expected TypeSig" +bfTraverse :: Applicative f + => (LIdP (GhcPass p) -> f (LIdP DocNameI)) + -> BooleanFormula (GhcPass p) + -> f (BooleanFormula DocNameI) +bfTraverse f = go + where + go (Var a ) = Var <$> f a + go (And bfs) = And <$> traverse @[] (traverse go) bfs + go (Or bfs) = Or <$> traverse @[] (traverse go) bfs + go (Parens bf ) = Parens <$> traverse go bf + renameForD :: ForeignDecl GhcRn -> RnM (ForeignDecl DocNameI) renameForD (ForeignImport _ lname ltype x) = do lname' <- renameNameL lname ===================================== utils/haddock/haddock-api/src/Haddock/Types.hs ===================================== @@ -53,6 +53,7 @@ import qualified Data.Map as Map import qualified Data.Set as Set import GHC import qualified GHC.Data.Strict as Strict +import GHC.Data.BooleanFormula (BooleanFormula) import GHC.Driver.Session (Language) import qualified GHC.LanguageExtensions as LangExt import GHC.Core.InstEnv (is_dfun_name) @@ -819,6 +820,7 @@ type instance Anno (HsDecl DocNameI) = SrcSpanAnnA type instance Anno (FamilyResultSig DocNameI) = EpAnn NoEpAnns type instance Anno (HsOuterTyVarBndrs Specificity DocNameI) = SrcSpanAnnA type instance Anno (HsSigType DocNameI) = SrcSpanAnnA +type instance Anno (BooleanFormula DocNameI) = SrcSpanAnnL type XRecCond a = ( XParTy a ~ (EpToken "(", EpToken ")") View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97f600c647eb7a657a1c838a33dba59e18320164 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97f600c647eb7a657a1c838a33dba59e18320164 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 12:36:48 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 05 Nov 2024 07:36:48 -0500 Subject: [Git][ghc/ghc][master] ghc-heap: Fix incomplete selector warnings. Message-ID: <672a11604db86_3ea90b7062141170d7@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - 4 changed files: - compiler/GHC/Runtime/Heap/Inspect.hs - docs/users_guide/9.14.1-notes.rst - libraries/ghc-heap/GHC/Exts/Heap.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs Changes: ===================================== compiler/GHC/Runtime/Heap/Inspect.hs ===================================== @@ -128,6 +128,11 @@ isFullyEvaluatedTerm NewtypeWrap{wrapped_term=t} = isFullyEvaluatedTerm t isFullyEvaluatedTerm RefWrap{wrapped_term=t} = isFullyEvaluatedTerm t isFullyEvaluatedTerm _ = False +-- | Gives an error if the term doesn't have subterms +expectSubTerms :: Term -> [Term] +expectSubTerms (Term { subTerms = subTerms} ) = subTerms +expectSubTerms _ = panic "expectSubTerms" + instance Outputable (Term) where ppr t | Just doc <- cPprTerm cPprTermBase t = doc | otherwise = panic "Outputable Term instance" @@ -332,8 +337,8 @@ cPprTermBase :: forall m. Monad m => CustomTermPrinter m cPprTermBase y = [ ifTerm (isTupleTy.ty) (\_p -> liftM (parens . hcat . punctuate comma) . mapM (y (-1)) - . subTerms) - , ifTerm (\t -> isTyCon listTyCon (ty t) && subTerms t `lengthIs` 2) + . expectSubTerms) + , ifTerm (\t -> isTyCon listTyCon (ty t) && expectSubTerms t `lengthIs` 2) ppr_list , ifTerm' (isTyCon intTyCon . ty) ppr_int , ifTerm' (isTyCon charTyCon . ty) ppr_char @@ -768,7 +773,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do traceTR (text "Gave up reconstructing a term after" <> int max_depth <> text " steps") clos <- trIO $ GHCi.getClosure interp a - return (Suspension (tipe (info clos)) my_ty a Nothing) + return (Suspension (tipe (getClosureInfoTbl clos)) my_ty a Nothing) go !max_depth my_ty old_ty a = do let monomorphic = not(isTyVarTy my_ty) -- This ^^^ is a convention. The ancestor tests for @@ -864,7 +869,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do _ -> do traceTR (text "Unknown closure:" <+> text (show (fmap (const ()) clos))) - return (Suspension (tipe (info clos)) my_ty a Nothing) + return (Suspension (tipe (getClosureInfoTbl clos)) my_ty a Nothing) -- insert NewtypeWraps around newtypes expandNewtypes = foldTerm idTermFold { fTerm = worker } where @@ -918,7 +923,7 @@ extractSubTerms recurse clos = liftM thdOf3 . go 0 0 go_rep ptr_i arr_i ty rep | isGcPtrRep rep = do - t <- recurse ty $ (ptrArgs clos)!!ptr_i + t <- recurse ty $ (getClosurePtrArgs clos)!!ptr_i return (ptr_i + 1, arr_i, t) | otherwise = do -- This is a bit involved since we allow packing multiple fields ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -50,6 +50,11 @@ Cmm ``ghc-heap`` library ~~~~~~~~~~~~~~~~~~~~ +* The functions `getClosureInfoTbl_maybe`, `getClosureInfoTbl`, + `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow + reading of the relevant Closure attributes without reliance on incomplete + selectors. + ``ghc-experimental`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== libraries/ghc-heap/GHC/Exts/Heap.hs ===================================== @@ -29,6 +29,10 @@ module GHC.Exts.Heap ( , WhyBlocked(..) , TsoFlags(..) , HasHeapRep(getClosureData) + , getClosureInfoTbl + , getClosureInfoTbl_maybe + , getClosurePtrArgs + , getClosurePtrArgs_maybe , getClosureDataFromHeapRep , getClosureDataFromHeapRepPrim ===================================== libraries/ghc-heap/GHC/Exts/Heap/Closures.hs ===================================== @@ -8,12 +8,18 @@ {-# LANGUAGE DeriveTraversable #-} -- Late cost centres introduce a thunk in the asBox function, which leads to -- an additional wrapper being added to any value placed inside a box. +-- This can be removed once our boot compiler is no longer affected by #25212 {-# OPTIONS_GHC -fno-prof-late #-} +{-# LANGUAGE NamedFieldPuns #-} module GHC.Exts.Heap.Closures ( -- * Closures Closure , GenClosure(..) + , getClosureInfoTbl + , getClosureInfoTbl_maybe + , getClosurePtrArgs + , getClosurePtrArgs_maybe , PrimType(..) , WhatNext(..) , WhyBlocked(..) @@ -67,6 +73,7 @@ import Data.Word import GHC.Exts import GHC.Generics import Numeric +import GHC.Stack (HasCallStack) ------------------------------------------------------------------------ -- Boxes @@ -382,6 +389,104 @@ data GenClosure b { wordVal :: !Word } deriving (Show, Generic, Functor, Foldable, Traversable) +-- | Get the info table for a heap closure, or Nothing for a prim value +-- +-- @since 9.14.1 +getClosureInfoTbl_maybe :: GenClosure b -> Maybe StgInfoTable +{-# INLINE getClosureInfoTbl_maybe #-} -- Ensure we can get rid of the just box +getClosureInfoTbl_maybe closure = case closure of + ConstrClosure{info} ->Just info + FunClosure{info} ->Just info + ThunkClosure{info} ->Just info + SelectorClosure{info} ->Just info + PAPClosure{info} ->Just info + APClosure{info} ->Just info + APStackClosure{info} ->Just info + IndClosure{info} ->Just info + BCOClosure{info} ->Just info + BlackholeClosure{info} ->Just info + ArrWordsClosure{info} ->Just info + MutArrClosure{info} ->Just info + SmallMutArrClosure{info} ->Just info + MVarClosure{info} ->Just info + IOPortClosure{info} ->Just info + MutVarClosure{info} ->Just info + BlockingQueueClosure{info} ->Just info + WeakClosure{info} ->Just info + TSOClosure{info} ->Just info + StackClosure{info} ->Just info + + IntClosure{} -> Nothing + WordClosure{} -> Nothing + Int64Closure{} -> Nothing + Word64Closure{} -> Nothing + AddrClosure{} -> Nothing + FloatClosure{} -> Nothing + DoubleClosure{} -> Nothing + + OtherClosure{info} -> Just info + UnsupportedClosure {info} -> Just info + + UnknownTypeWordSizedPrimitive{} -> Nothing + +-- | Partial version of getClosureInfoTbl_maybe for when we know we deal with a +-- heap closure. +-- +-- @since 9.14.1 +getClosureInfoTbl :: HasCallStack => GenClosure b -> StgInfoTable +getClosureInfoTbl closure = case getClosureInfoTbl_maybe closure of + Just info -> info + Nothing -> error "getClosureInfoTbl - Closure without info table" + +-- | Get the info table for a heap closure, or Nothing for a prim value +-- +-- @since 9.14.1 +getClosurePtrArgs_maybe :: GenClosure b -> Maybe [b] +{-# INLINE getClosurePtrArgs_maybe #-} -- Ensure we can get rid of the just box +getClosurePtrArgs_maybe closure = case closure of + ConstrClosure{ptrArgs} -> Just ptrArgs + FunClosure{ptrArgs} -> Just ptrArgs + ThunkClosure{ptrArgs} -> Just ptrArgs + SelectorClosure{} -> Nothing + PAPClosure{} -> Nothing + APClosure{} -> Nothing + APStackClosure{} -> Nothing + IndClosure{} -> Nothing + BCOClosure{} -> Nothing + BlackholeClosure{} -> Nothing + ArrWordsClosure{} -> Nothing + MutArrClosure{} -> Nothing + SmallMutArrClosure{} -> Nothing + MVarClosure{} -> Nothing + IOPortClosure{} -> Nothing + MutVarClosure{} -> Nothing + BlockingQueueClosure{} -> Nothing + WeakClosure{} -> Nothing + TSOClosure{} -> Nothing + StackClosure{} -> Nothing + + IntClosure{} -> Nothing + WordClosure{} -> Nothing + Int64Closure{} -> Nothing + Word64Closure{} -> Nothing + AddrClosure{} -> Nothing + FloatClosure{} -> Nothing + DoubleClosure{} -> Nothing + + OtherClosure{} -> Nothing + UnsupportedClosure{} -> Nothing + + UnknownTypeWordSizedPrimitive{} -> Nothing + +-- | Partial version of getClosureInfoTbl_maybe for when we know we deal with a +-- heap closure. +-- +-- @since 9.14.1 +getClosurePtrArgs :: HasCallStack => GenClosure b -> [b] +getClosurePtrArgs closure = case getClosurePtrArgs_maybe closure of + Just ptrs -> ptrs + Nothing -> error "getClosurePtrArgs - Closure without ptrArgs field" + type StgStackClosure = GenStgStackClosure Box -- | A decoded @StgStack@ with `StackFrame`s View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d4fd3580f8d0140918198fa464492d327b867fc8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d4fd3580f8d0140918198fa464492d327b867fc8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 12:37:24 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 05 Nov 2024 07:37:24 -0500 Subject: [Git][ghc/ghc][master] PPC NCG: Implement fmin and fmax Message-ID: <672a118477a04_3ea90b6e2940120151@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 3 changed files: - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs Changes: ===================================== compiler/GHC/CmmToAsm/PPC/CodeGen.hs ===================================== @@ -398,7 +398,7 @@ iselExpr64 expr platform <- getPlatform pprPanic "iselExpr64(powerpc)" (pdoc platform expr) - +data MinOrMax = Min | Max getRegister :: CmmExpr -> NatM Register getRegister e = do config <- getConfig @@ -589,8 +589,9 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps MO_F_Sub w -> triv_float w FSUB MO_F_Mul w -> triv_float w FMUL MO_F_Quot w -> triv_float w FDIV - MO_F_Min w -> triv_float w FMIN - MO_F_Max w -> triv_float w FMAX + + MO_F_Min w -> minmax_float Min w x y + MO_F_Max w -> minmax_float Max w x y -- optimize addition with 32-bit immediate -- (needed for PIC) @@ -696,6 +697,31 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps code <- remainderCode rep sgn tmp x y return (Any fmt code) + minmax_float :: MinOrMax -> Width -> CmmExpr -> CmmExpr -> NatM Register + minmax_float m w x y = + do + (src1, src1Code) <- getSomeReg x + (src2, src2Code) <- getSomeReg y + l1 <- getBlockIdNat + l2 <- getBlockIdNat + end <- getBlockIdNat + let cond = case m of + Min -> LTT + Max -> GTT + let code dst = src1Code `appOL` src2Code `appOL` + toOL [ FCMP src1 src2 + , BCC cond l1 Nothing + , BCC ALWAYS l2 Nothing + , NEWBLOCK l2 + , MR dst src2 + , BCC ALWAYS end Nothing + , NEWBLOCK l1 + , MR dst src1 + , BCC ALWAYS end Nothing + , NEWBLOCK end + ] + return (Any (floatFormat w) code) + getRegister' _ _ (CmmMachOp mop [x, y, z]) -- ternary PrimOps = case mop of ===================================== compiler/GHC/CmmToAsm/PPC/Instr.hs ===================================== @@ -277,8 +277,6 @@ data Instr | FDIV Format Reg Reg Reg | FABS Reg Reg -- abs is the same for single and double | FNEG Reg Reg -- negate is the same for single and double prec. - | FMIN Format Reg Reg Reg - | FMAX Format Reg Reg Reg -- | Fused multiply-add instructions. -- ===================================== compiler/GHC/CmmToAsm/PPC/Ppr.hs ===================================== @@ -941,12 +941,6 @@ pprInstr platform instr = case instr of FNEG reg1 reg2 -> pprUnary (text "fneg") reg1 reg2 - FMIN fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmin") fmt reg1 reg2 reg3 - - FMAX fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmax") fmt reg1 reg2 reg3 - FMADD signs fmt dst ra rc rb -> pprTernaryF (pprFMASign signs) fmt dst ra rc rb View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fdd9f62ad3deb64dabef438032a1e8c89c98cd99 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fdd9f62ad3deb64dabef438032a1e8c89c98cd99 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 12:48:43 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Tue, 05 Nov 2024 07:48:43 -0500 Subject: [Git][ghc/ghc][wip/cleanup-glasgow-cpp] 6 commits: ghc-internal: strict, unboxed src loc ranges Message-ID: <672a142b260e9_14eeeabd57442744@gitlab.mail> Cheng Shao pushed to branch wip/cleanup-glasgow-cpp at Glasgow Haskell Compiler / GHC Commits: ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 6bb9d2a0 by Cheng Shao at 2024-11-05T12:48:31+00:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 30 changed files: - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Platform/Ways.hs - compiler/GHC/Prelude/Basic.hs - compiler/GHC/SysTools/Process.hs - compiler/GHC/Tc/Types/EvTerm.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/GlobalVars.hs - compiler/GHC/Utils/Touch.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/cbits/genSym.c - docs/users_guide/using-optimisation.rst - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - libraries/base/tests/dynamic002.hs - libraries/base/tests/foldableArray.hs - libraries/ghc-bignum/src/GHC/Num/Integer.hs - libraries/ghc-bignum/src/GHC/Num/Primitives.hs - libraries/ghc-boot/GHC/BaseDir.hs - libraries/ghc-boot/GHC/Data/ShortText.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/282941381742cd54be15866f1683848cd81f4c19...6bb9d2a0f159849b9dc74f979b0704fb97bc253c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/282941381742cd54be15866f1683848cd81f4c19...6bb9d2a0f159849b9dc74f979b0704fb97bc253c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 13:18:57 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Tue, 05 Nov 2024 08:18:57 -0500 Subject: [Git][ghc/ghc][wip/sv/T25246-a] 22 commits: EPA: Remove AddEpAnn Commit 8/final Message-ID: <672a1b4145093_3e9d7c122820566e8@gitlab.mail> Sjoerd Visscher pushed to branch wip/sv/T25246-a at Glasgow Haskell Compiler / GHC Commits: 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 65fd4e41 by Sjoerd Visscher at 2024-11-05T14:18:48+01:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - a5229dbf by Sjoerd Visscher at 2024-11-05T14:18:48+01:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 30 changed files: - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/Make.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Dump.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/36659cf2d0aab2df73c56441e4610f63c5275fff...a5229dbf702290f5db4b0da89a53d98b0c645d1a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/36659cf2d0aab2df73c56441e4610f63c5275fff...a5229dbf702290f5db4b0da89a53d98b0c645d1a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 17:33:05 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Tue, 05 Nov 2024 12:33:05 -0500 Subject: [Git][ghc/ghc][wip/splice-imports-2024] WIPS Message-ID: <672a56d1bc4ec_1b62a241faa08696f@gitlab.mail> Matthew Pickering pushed to branch wip/splice-imports-2024 at Glasgow Haskell Compiler / GHC Commits: 48c4e78b by Matthew Pickering at 2024-11-05T17:32:44+00:00 WIPS - - - - - 23 changed files: - compiler/GHC/Data/Graph/Directed.hs - compiler/GHC/Driver/Env.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Parser/Header.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/Splice.hs - compiler/GHC/Tc/Deriv/Generate.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Utils/Env.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Types/Name/Reader.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModSummary.hs - compiler/Language/Haskell/Syntax/ImpExp.hs - testsuite/tests/splice-imports/SI03.stderr - testsuite/tests/splice-imports/SI05.stderr - testsuite/tests/splice-imports/SI09.hs - testsuite/tests/splice-imports/SI20.stderr - testsuite/tests/splice-imports/all.T Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -70,7 +70,6 @@ import qualified Data.Set as S import Data.Array.ST.Safe (STUArray) import Control.Monad.ST import Data.Array.ST.Safe (newArray, readArray, writeArray) -import Data.Array {- ************************************************************************ @@ -523,6 +522,7 @@ dfs2 g vs0 = run (bounds g) $ start vs0 reachable :: IntGraph -> [Vertex] -> [Vertex] reachable g vs = preorderF (G.dfs g vs) +reachableBut :: G.Graph -> [Vertex] -> [Vertex] reachableBut g vs = dfs2 g vs reachableGraph :: IntGraph -> IM.IntMap IS.IntSet ===================================== compiler/GHC/Driver/Env.hs ===================================== @@ -259,12 +259,12 @@ hptInstancesBelow hsc_env uid lvl mnwib = -- | Get rules from modules "below" this one (in the dependency sense) hptRules :: HscEnv -> UnitId -> ModuleStage -> ModuleNameWithIsBoot -> [CoreRule] -hptRules = hptSomeThingsBelowUs (\lvl info -> md_rules (hm_details info)) False +hptRules = hptSomeThingsBelowUs (\_lvl info -> md_rules (hm_details info)) False -- | Get annotations from modules "below" this one (in the dependency sense) hptAnns :: HscEnv -> Maybe (UnitId, ModuleStage, ModuleNameWithIsBoot) -> [Annotation] -hptAnns hsc_env (Just (uid, lvl, mn)) = hptSomeThingsBelowUs (\lvl info -> md_anns (hm_details info)) False hsc_env uid lvl mn +hptAnns hsc_env (Just (uid, lvl, mn)) = hptSomeThingsBelowUs (\_lvl info -> md_anns (hm_details info)) False hsc_env uid lvl mn hptAnns hsc_env Nothing = hptAllThings (md_anns . hm_details) hsc_env hptAllThings :: (HomeModInfo -> [a]) -> HscEnv -> [a] ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -631,13 +631,13 @@ createBuildPlan mod_graph maybe_top_mod = -- An environment mapping a module to its hs-boot file and all nodes on the path between the two, if one exists boot_modules = mkModuleEnv - [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) | m@(ModuleNode _ _ lvl ms) <- (mgModSummaries' mod_graph), isBootSummary ms == IsBoot] + [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) | m@(ModuleNode _ _ _lvl ms) <- (mgModSummaries' mod_graph), isBootSummary ms == IsBoot] select_boot_modules :: [ModuleGraphNode] -> [ModuleGraphNode] select_boot_modules = mapMaybe (fmap fst . get_boot_module) get_boot_module :: ModuleGraphNode -> Maybe (ModuleGraphNode, [ModuleGraphNode]) - get_boot_module m = case m of ModuleNode _ _ lvl ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing + get_boot_module m = case m of ModuleNode _ _ _lvl ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing -- Any cycles should be resolved now collapseSCC :: [SCC ModuleGraphNode] -> Either [ModuleGraphNode] [(Either ModuleGraphNode ModuleGraphNodeWithBootFile)] @@ -1600,6 +1600,7 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro = do let root_map = mkRootMap rootSummariesOk checkDuplicates root_map + pprTraceM "roots" (ppr root_map) (deps, map0) <- loopSummaries (zip (repeat zeroStage) rootSummariesOk) (M.empty, root_map) let closure_errs = checkHomeUnitsClosed unit_env unit_env = hsc_unit_env hsc_env @@ -1673,10 +1674,14 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro (final_deps, uids, done', summarised') <- loopImports (calcDeps lvl ms) done summarised -- This has the effect of finding a .hs file if we are looking at the .hs-boot file. (_, _, done'', summarised'') <- loopImports (maybeToList hs_file_for_boot) done' summarised' - loopSummaries next (M.insert k (ModuleNode final_deps uids lvl ms) done'', summarised'') + loopSummaries (maybeToList zero ++ next) (M.insert k (ModuleNode final_deps uids lvl ms) done'', summarised'') where k = NodeKey_Module (msKey lvl ms) + --MP: Not clear if this is needed + zero | lvl == zeroStage = Nothing + | otherwise = Just (zeroStage, ms) + hs_file_for_boot | HsBootFile <- ms_hsc_src ms = Just $ ((ms_unitid ms), lvl, NoPkgQual, (GWIB (noLoc $ ms_mod_name ms) NotBoot)) @@ -2053,7 +2058,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph -- Note we don't need object code for a module if it uses TemplateHaskell itself. Only -- it's dependencies. [ (msKey lvl ms, code_stage ms) - | (ModuleNode deps uids lvl ms) <- mod_graph + | (ModuleNode _deps _uids lvl ms) <- mod_graph , isTemplateHaskellOrQQNonBoot ms , not (gopt Opt_UseBytecodeRatherThanObjects (ms_hspp_opts ms)) ] @@ -2061,7 +2066,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph -- The direct dependencies of modules which require byte code need_bc_set = [ (msKey lvl ms, code_stage ms) - | (ModuleNode deps uids lvl ms) <- mod_graph + | (ModuleNode _deps _uids lvl ms) <- mod_graph , isTemplateHaskellOrQQNonBoot ms , gopt Opt_UseBytecodeRatherThanObjects (ms_hspp_opts ms) ] @@ -2415,8 +2420,7 @@ getPreprocessedImports hsc_env src_fn mb_phase maybe_buf = do <- ExceptT $ do let imp_prelude = xopt LangExt.ImplicitPrelude pi_local_dflags popts = initParserOpts pi_local_dflags - splice_imports = xopt LangExt.StagedImports pi_local_dflags - mimps <- getImports popts imp_prelude splice_imports pi_hspp_buf pi_hspp_fn src_fn + mimps <- getImports popts imp_prelude pi_hspp_buf pi_hspp_fn src_fn return (first (mkMessages . fmap mkDriverPsHeaderMessage . getMessages) mimps) let rn_pkg_qual = renameRawPkgQual (hsc_unit_env hsc_env) let rn_imps = fmap (\(sp, pk, lmn@(L _ mn)) -> (sp, rn_pkg_qual mn pk, lmn)) ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -705,11 +705,10 @@ runHscPhase pipe_env hsc_env0 input_fn src_flavour = do (hspp_buf,mod_name,imps,src_imps, ghc_prim_imp) <- do buf <- hGetStringBuffer input_fn let imp_prelude = xopt LangExt.ImplicitPrelude dflags - splice_imports = xopt LangExt.StagedImports dflags popts = initParserOpts dflags rn_pkg_qual = renameRawPkgQual (hsc_unit_env hsc_env) rn_imps = fmap (\(s, rpk, lmn@(L _ mn)) -> (s, rn_pkg_qual mn rpk, lmn)) - eimps <- getImports popts imp_prelude splice_imports buf input_fn (basename <.> suff) + eimps <- getImports popts imp_prelude buf input_fn (basename <.> suff) case eimps of Left errs -> throwErrors (GhcPsMessage <$> errs) Right (src_imps,imps, ghc_prim_imp, L _ mod_name) -> return ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -173,7 +173,7 @@ get_link_deps opts pls maybe_normal_osuf span mods = do todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) lvl uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) lvl uid) <- Set.toList trans_deps] in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) Nothing -> - let (ModNodeKeyWithUid _ lvl uid) = nk + let (ModNodeKeyWithUid _ _lvl uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) todoStage (moduleUnitId m) @@ -181,7 +181,7 @@ get_link_deps opts pls maybe_normal_osuf span mods = do all_home_mods = [with_uid | NodeKey_Module with_uid <- Set.toList all_deps] - get_mod_info (ModNodeKeyWithUid gwib lvl uid) = + get_mod_info (ModNodeKeyWithUid gwib _lvl uid) = case lookupHug (ue_home_unit_graph unit_env) uid (gwib_mod gwib) of Just hmi -> let iface = (hm_iface hmi) ===================================== compiler/GHC/Parser/Header.hs ===================================== @@ -67,7 +67,6 @@ import Text.Read (readPrec) -- Throws a 'SourceError' if parsing fails. getImports :: ParserOpts -- ^ Parser options -> Bool -- ^ Implicit Prelude? - -> Bool -- ^ Explicit staged imports? -> StringBuffer -- ^ Parse this. -> FilePath -- ^ Filename the buffer came from. Used for -- reporting parse error locations. @@ -81,7 +80,7 @@ getImports :: ParserOpts -- ^ Parser options Located ModuleName)) -- ^ The source imports and normal imports (with optional package -- names from -XPackageImports), and the module name. -getImports popts implicit_prelude staged_imports buf filename source_filename = do +getImports popts implicit_prelude buf filename source_filename = do let loc = mkRealSrcLoc (mkFastString filename) 1 1 case unP parseHeader (initParserState popts buf loc) of PFailed pst -> ===================================== compiler/GHC/Rename/Expr.hs ===================================== @@ -310,7 +310,7 @@ finishHsVar :: LocatedA Name -> RnM (HsExpr GhcRn, FreeVars) -- Separated from rnExpr because it's also used -- when renaming infix expressions finishHsVar (L l name) - = do { this_mod <- getModule + = do { --this_mod <- getModule -- ; when (nameIsLocalOrFrom this_mod name) $ ; checkThLocalName name ; return (HsVar noExtField (L (l2l l) name), unitFV name) } ===================================== compiler/GHC/Rename/Splice.hs ===================================== @@ -44,7 +44,7 @@ import Control.Monad ( unless, when ) import {-# SOURCE #-} GHC.Rename.Expr ( rnLExpr ) -import GHC.Tc.Utils.Env ( checkWellStaged, tcMetaTy ) +import GHC.Tc.Utils.Env ( tcMetaTy ) import GHC.Driver.DynFlags import GHC.Data.FastString @@ -188,6 +188,7 @@ rn_utbracket (VarBr x flg rdr_name) ; check_namespace flg name ; this_mod <- getModule ; dflags <- getDynFlags + ; env <- getGlobalRdrEnv ; when (flg && nameIsLocalOrFrom this_mod name) $ -- Type variables can be quoted in TH. See #5721. @@ -206,9 +207,9 @@ rn_utbracket (VarBr x flg rdr_name) -> do { traceRn "rn_utbracket VarBr" (ppr name <+> ppr bind_lvl <+> ppr use_lvl) - + ; let mgre = lookupGRE_Name env name ; checkTc (any (thLevel use_lvl ==) (Set.toList bind_lvl)) - (TcRnBadlyStaged (StageCheckSplice name) bind_lvl (thLevel use_lvl)) + (TcRnBadlyStaged (StageCheckSplice name mgre) bind_lvl (thLevel use_lvl)) ; when (isExternalName name) (keepAlive name) } } } @@ -524,7 +525,7 @@ rnUntypedSpliceExpr splice -- mod_finalizers: See Note [Delaying modFinalizers in untyped splices]. -- Rename the expanded expression - ; (L l expr_rn, fvs) <- checkNoErrs (rnLExpr expr_ps) + ; (L l expr_rn, fvs) <- setXOptM LangExt.PathCrossStagedPersistence $ checkNoErrs (rnLExpr expr_ps) -- rn_splice :: HsUntypedSplice GhcRn is the original TH expression, -- before expansion @@ -982,7 +983,7 @@ checkThLocalName name | otherwise = do { --pprTraceM "checkThLocalName" (ppr name) - ; mb_local_use <- getStageAndBindLevel name + mb_local_use <- getStageAndBindLevel name ; case mb_local_use of { Nothing -> return () ; -- Not a locally-bound thing Just (top_lvl, bind_lvl, use_stage) -> @@ -990,11 +991,13 @@ checkThLocalName name ; cur_mod <- extractModule <$> getGblEnv ; let is_local = nameIsLocalOrFrom cur_mod name -- ; checkWellStaged (StageCheckSplice name) bind_lvl use_lvl - --; pprTraceM "checkThLocalName" (ppr name <+> ppr bind_lvl - -- <+> ppr use_stage - -- <+> ppr use_lvl) + {-} ; pprTraceM "checkThLocalName" (ppr name <+> ppr bind_lvl + <+> ppr use_stage + <+> ppr use_lvl) -} ; dflags <- getDynFlags - ; checkCrossStageLifting dflags (StageCheckSplice name) top_lvl is_local bind_lvl use_stage use_lvl name } } } + ; env <- getGlobalRdrEnv + ; let mgre = lookupGRE_Name env name + ; checkCrossStageLifting dflags (StageCheckSplice name mgre) top_lvl is_local bind_lvl use_stage use_lvl name } } } -------------------------------------- checkCrossStageLifting :: DynFlags ===================================== compiler/GHC/Tc/Deriv/Generate.hs ===================================== @@ -1671,7 +1671,7 @@ gen_Lift_binds loc (DerivInstTys{ dit_rep_tc = tycon as_needed = take con_arity as_RDRs lift_Expr = mk_bracket finish con_brack :: LHsExpr GhcPs - con_brack = nlHsApps (Exact varEName) [noLocA $ HsUntypedBracket noAnn $ VarBr noExtField True (noLocA (Exact (dataConName data_con)))] + con_brack = nlHsApps (Exact conEName) [noLocA $ HsUntypedBracket noAnn $ VarBr noExtField True (noLocA (Exact (dataConName data_con)))] finish = foldl' (\b1 b2 -> nlHsApps (Exact appEName) [b1, b2]) con_brack (map lift_var2 as_needed) ===================================== compiler/GHC/Tc/Errors/Ppr.hs ===================================== @@ -1470,8 +1470,11 @@ instance Diagnostic TcRnMessage where [ hsep [ text "Hint: quoting" <+> thBrackets (ppUnless (isValName n) "t") (ppr n) , text "or an enclosing expression would allow the quotation to be used in an earlier stage" ] - | StageCheckSplice n <- [reason] - ] + | StageCheckSplice n _ <- [reason] + ] ++ + [ "From imports" <+> (ppr (gre_imp gre)) + | StageCheckSplice _ (Just gre) <- [reason] + , not (isEmptyBag (gre_imp gre)) ] TcRnBadlyStagedType name bind_lvl use_lvl -> mkSimpleDecorated $ text "Badly staged type:" <+> ppr name <+> @@ -5613,7 +5616,7 @@ pprStageCheckReason :: StageCheckReason -> SDoc pprStageCheckReason = \case StageCheckInstance _ t -> text "instance for" <+> quotes (ppr t) - StageCheckSplice t -> + StageCheckSplice t _ -> quotes (ppr t) pprUninferrableTyVarCtx :: UninferrableTyVarCtx -> SDoc ===================================== compiler/GHC/Tc/Errors/Types.hs ===================================== @@ -6096,7 +6096,7 @@ data WrongThingSort data StageCheckReason = StageCheckInstance !InstanceWhat !PredType - | StageCheckSplice !Name + | StageCheckSplice !Name !(Maybe GlobalRdrElt) data UninferrableTyVarCtx = UninfTyCtx_ClassContext [TcType] ===================================== compiler/GHC/Tc/Solver/Monad.hs ===================================== @@ -138,9 +138,9 @@ import qualified GHC.Tc.Utils.Monad as TcM import qualified GHC.Tc.Utils.TcMType as TcM import qualified GHC.Tc.Instance.Class as TcM( matchGlobalInst, ClsInstResult(..) ) import qualified GHC.Tc.Utils.Env as TcM - ( checkWellStaged, tcGetDefaultTys + ( tcGetDefaultTys , tcLookupClass, tcLookupId, tcLookupTyCon - , topIdLvl ) + ) import GHC.Tc.Zonk.Monad ( ZonkM ) import qualified GHC.Tc.Zonk.TcType as TcM import qualified GHC.Tc.Zonk.Type as TcM @@ -163,7 +163,6 @@ import GHC.Tc.Types import GHC.Tc.Types.Origin import GHC.Tc.Types.CtLoc import GHC.Tc.Types.Constraint -import GHC.Tc.Types.LclEnv import GHC.Builtin.Names ( unsatisfiableClassNameKey ) @@ -184,7 +183,6 @@ import GHC.Types.Var import GHC.Types.Var.Set import GHC.Types.Unique.Supply import GHC.Types.Unique.Set( elementOfUniqSet ) -import GHC.Types.Name.Env import GHC.Types.Id import GHC.Unit.Module @@ -219,6 +217,8 @@ import qualified Data.Set as Set import qualified Data.Map as Map import GHC.Unit.Module.Graph +import Data.Bifunctor (bimap) + {- ********************************************************************* * * SolverStage and StopOrContinue @@ -1420,8 +1420,8 @@ checkWellStagedDFun :: CtLoc -> InstanceWhat -> PredType -> TcS () checkWellStagedDFun loc what pred = do mbind_lvl <- checkWellStagedInstanceWhat what - env <- getLclEnv - use_lvl <- thLevel <$> (wrapTcS $ TcM.getStage) + --env <- getLclEnv + --use_lvl <- thLevel <$> (wrapTcS $ TcM.getStage) case mbind_lvl of Just (bind_lvl, is_local) -> wrapTcS $ TcM.setCtLocM loc $ do @@ -1456,56 +1456,35 @@ checkWellStagedInstanceWhat what | TopLevInstance { iw_dfun_id = dfun_id } <- what = do cur_mod <- extractModule <$> getGblEnv - gbl_env <- getGblEnv --- pprTraceM "checkWellStaged" (ppr what) hsc_env <- getTopEnv let tg = mkTransDepsZero (hsc_units hsc_env) (mgModSummaries' (hsc_mod_graph hsc_env)) - let lkup s = flip (Map.!) (Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)) tg + pprTraceM "tg" (ppr tg) + pprTraceM "tg" (ppr $ mgModSummaries' (hsc_mod_graph hsc_env)) + let lkup s = Set.map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id) $ flip (Map.!) (Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)) tg let splice_lvl = lkup SpliceStage normal_lvl = lkup NormalStage quote_lvl = lkup QuoteStage name_module = nameModule (idName dfun_id) instance_key = if moduleUnitId name_module `Set.member` hsc_all_home_unit_ids hsc_env - then Left (ModNodeKeyWithUid (GWIB (moduleName name_module) NotBoot) zeroStage (moduleUnitId name_module), NormalStage) + then Left name_module else Right (moduleUnitId name_module) - {- pprTraceM "instnace_key" (ppr instance_key) - pprTraceM "splice_lvl" (ppr (instance_key `Set.member` splice_lvl)) - pprTraceM "splice_lvl" (ppr (instance_key `Set.member` normal_lvl)) - pprTraceM "splice_lvl" (ppr (instance_key `Set.member` quote_lvl)) - -} let lvls = [ 0 | instance_key `Set.member` splice_lvl] ++ [ 1 | instance_key `Set.member` normal_lvl ] ++ [ 2 | instance_key `Set.member` quote_lvl ] - + pprTraceM "lvls" (ppr dfun_id $$ ppr splice_lvl $$ ppr normal_lvl $$ ppr quote_lvl) if isLocalId dfun_id then return $ Just ( (Set.singleton outerLevel, True) ) else return $ Just ( Set.fromList lvls, False ) - --- pprTraceM "checkWellStaged" (ppr (tcg_bind_env gbl_env)) --- pprTraceM "checkWellStaged" --- (ppr (lookupNameEnv (tcg_bind_env gbl_env) (idName dfun_id))) --- {- - return $ (,isLocalId dfun_id) <$> (lookupNameEnv (tcg_bind_env gbl_env) (idName dfun_id)) - return $ case lookupNameEnv (tcg_bind_env gbl_env) (idName dfun_id) of - -- The instance comes from HPT imported module - Just res -> Just (res, isLocalId dfun_id) - Nothing -> - if isLocalId dfun_id - then Just ( (Set.singleton outerLevel, True) ) - -- TODO: Instances coming from external packages also need somehow - -- to deal with splice imports - else Just ( (Set.fromList [impLevel, outerLevel], False) ) --- return $ Just (TcM.topIdLvl dfun_id) --- -} | BuiltinTypeableInstance tc <- what = do cur_mod <- extractModule <$> getGblEnv return $ Just (if nameIsLocalOrFrom cur_mod (tyConName tc) then (Set.singleton outerLevel, True) - else (Set.singleton impLevel, False)) + -- TODO, not correct, needs similar checks to normal instances + else (Set.fromList [impLevel, outerLevel], False)) | otherwise = return Nothing {- ===================================== compiler/GHC/Tc/Utils/Env.hs ===================================== @@ -1167,7 +1167,7 @@ notFound name Splice {} | isUnboundName name -> failM -- If the name really isn't in scope -- don't report it again (#11941) - | otherwise -> failWithTc (TcRnStageRestriction (StageCheckSplice name)) + | otherwise -> failWithTc (TcRnStageRestriction (StageCheckSplice name Nothing)) _ | isTermVarOrFieldNameSpace (nameNameSpace name) -> -- This code path is only reachable with RequiredTypeArguments enabled ===================================== compiler/GHC/Tc/Utils/Monad.hs ===================================== @@ -2088,8 +2088,9 @@ getStageAndBindLevel name -- -- TODO: What happens if someone generates [|| GHC.Magic.dataToTag# ||] then do - env <- getGlobalRdrEnv - pprTrace "NO_LVLS" (ppr name) (return Nothing) + --env <- getGlobalRdrEnv + --pprTrace "NO_LVLS" (ppr name) (return Nothing) + return Nothing else return (Just (TopLevel, lvls, getLclEnvThStage env)) Just (top_lvl, bind_lvl) -> return (Just (top_lvl, Set.singleton bind_lvl, getLclEnvThStage env)) } @@ -2102,7 +2103,8 @@ getExternalBindLvl name = do Nothing -> if nameIsLocalOrFrom mod name then return $ Set.singleton outerLevel - else pprTrace "NO LVLS" (ppr name) (return Set.empty) -- pprPanic "getExternalBindLvl" (ppr env $$ ppr name $$ ppr (nameSrcSpan name)) +-- else pprTrace "NO LVLS" (ppr name) (return Set.empty) -- pprPanic "getExternalBindLvl" (ppr env $$ ppr name $$ ppr (nameSrcSpan name)) + else return Set.empty where convert_lvl NormalStage = thLevel topStage convert_lvl SpliceStage = thLevel topSpliceStage ===================================== compiler/GHC/Types/Name/Reader.hs ===================================== @@ -101,7 +101,7 @@ module GHC.Types.Name.Reader ( Parent(..), greParent_maybe, mkParent, availParent, ImportSpec(..), ImpDeclSpec(..), ImpItemSpec(..), - importSpecLoc, importSpecModule, isExplicitItem, bestImport, + importSpecLoc, importSpecModule, importSpecStage, isExplicitItem, bestImport, -- * Utils opIsAt, @@ -2080,6 +2080,9 @@ importSpecLoc (ImpSpec _ item) = is_iloc item importSpecModule :: ImportSpec -> ModuleName importSpecModule = moduleName . is_mod . is_decl +importSpecStage :: ImportSpec -> ImportStage +importSpecStage = is_staged . is_decl + isExplicitItem :: ImpItemSpec -> Bool isExplicitItem ImpAll = False isExplicitItem (ImpSome {is_explicit = exp}) = exp @@ -2117,11 +2120,17 @@ instance Outputable ImportSpec where ppr imp_spec = text "imported" <+> qual <+> text "from" <+> quotes (ppr (importSpecModule imp_spec)) + <+> stage <+> pprLoc (importSpecLoc imp_spec) where qual | is_qual (is_decl imp_spec) = text "qualified" | otherwise = empty + stage = case importSpecStage imp_spec of + NormalStage -> empty + QuoteStage -> text "at 2" + SpliceStage -> text "at 0" + pprLoc :: SrcSpan -> SDoc pprLoc (RealSrcSpan s _) = text "at" <+> ppr s pprLoc (UnhelpfulSpan {}) = empty ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -150,9 +150,9 @@ nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk nodeKeyUnitId (NodeKey_Link uid) = uid nodeKeyLevel :: NodeKey -> ModuleStage -nodeKeyLevel (NodeKey_Unit iud) = zeroStage +nodeKeyLevel (NodeKey_Unit {}) = zeroStage nodeKeyLevel (NodeKey_Module mk) = mnkLevel mk -nodeKeyLevel (NodeKey_Link uid) = zeroStage +nodeKeyLevel (NodeKey_Link {}) = zeroStage nodeKeyModName :: NodeKey -> Maybe ModuleName nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) @@ -170,7 +170,10 @@ todoStage :: HasCallStack => ModuleStage todoStage -- = pprTrace "todoStage" callStackDoc = zeroStage +moduleStageToThLevel :: ModuleStage -> Int moduleStageToThLevel (ModuleStage m) = m + +decModuleStage, incModuleStage :: ModuleStage -> ModuleStage incModuleStage (ModuleStage m) = ModuleStage (m + 1) decModuleStage (ModuleStage m) = ModuleStage (m - 1) @@ -289,6 +292,7 @@ extendMG' mg = \case mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph mkModuleGraph = foldr (flip extendMG') emptyMG +collapseModuleGraph :: ModuleGraph -> ModuleGraph collapseModuleGraph = mkModuleGraph . collapseModuleGraphNodes . mgModSummaries' -- Collapse information about levels and map everything to level 0 @@ -387,7 +391,7 @@ nodeDependencies drop_hs_boot_nodes = \case LinkNode deps _uid -> deps InstantiationNode uid iuid -> NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) zeroStage uid) <$> uniqDSetToList (instUnitHoles iuid) - ModuleNode deps uid _lvl _ms -> + ModuleNode deps _ _lvl _ms -> map drop_hs_boot deps where -- Drop hs-boot nodes by using HsSrcFile as the key @@ -471,7 +475,7 @@ moduleGraphNodesZero :: UnitState -> [ModuleGraphNode] -> (Graph ZeroSummaryNode, Either (ModNodeKeyWithUid, ImportStage) UnitId -> Maybe ZeroSummaryNode) -moduleGraphNodesZero us summaries = +moduleGraphNodesZero us summaries = pprTrace "mg_zero" (ppr summaries) (graphFromEdgedVerticesUniq nodes, lookup_node) where -- Map from module to extra boot summary dependencies which need to be merged in ===================================== compiler/GHC/Unit/Module/ModSummary.hs ===================================== @@ -170,8 +170,7 @@ ms_mnwib ms = GWIB (ms_mod_name ms) (isBootSummary ms) -- | Returns the dependencies of the ModSummary s. msDeps :: ModSummary -> ([(ImportStage, PkgQual, GenWithIsBoot (Located ModuleName))]) -msDeps s = - [ (unanalysedStage, NoPkgQual, d) +msDeps s = [ (unanalysedStage, NoPkgQual, d) | m <- ms_home_srcimps s , d <- [ GWIB { gwib_mod = m, gwib_isBoot = IsBoot } ] ===================================== compiler/Language/Haskell/Syntax/ImpExp.hs ===================================== @@ -17,8 +17,6 @@ import Prelude ( (.), show ) import Control.DeepSeq import GHC.Stack -import GHC.Utils.Panic -import GHC.Utils.Trace import GHC.Utils.Outputable import {-# SOURCE #-} GHC.Hs.Doc (LHsDoc) -- ROMES:TODO Discuss in #21592 whether this is parsed AST or base AST @@ -57,7 +55,7 @@ data ImportStage = NormalStage | SpliceStage | QuoteStage deriving (Eq, Ord, Dat -- A placeholder which is used when the stage is not yet analysed. unanalysedStage :: HasCallStack => ImportStage -unanalysedStage = pprTrace "unanalysedStage" callStackDoc NormalStage +unanalysedStage = NormalStage -- pprTrace "unanalysedStage" callStackDoc NormalStage instance Outputable ImportStage where ppr = text . show ===================================== testsuite/tests/splice-imports/SI03.stderr ===================================== @@ -1,5 +1,6 @@ SI03.hs:8:11: error: [GHC-28914] • Stage error: ‘sid’ is bound at stage {1} but used at stage 0 Hint: quoting [| sid |] or an enclosing expression would allow the quotation to be used in an earlier stage + From imports {imported from ‘SI01A’ at SI03.hs:5:1-12} • In the untyped splice: $(sid [| pure () |]) ===================================== testsuite/tests/splice-imports/SI05.stderr ===================================== @@ -1,6 +1,7 @@ SI05.hs:9:11: error: [GHC-28914] • Stage error: ‘SI01A.sid’ is bound at stage {1} but used at stage 0 Hint: quoting [| SI01A.sid |] or an enclosing expression would allow the quotation to be used in an earlier stage + From imports {imported from ‘SI01A’ at SI05.hs:5:1-12} • In the untyped splice: $(sid [| pure () |]) SI05.hs:9:11: error: [GHC-87543] @@ -10,7 +11,7 @@ SI05.hs:9:11: error: [GHC-87543] imported from ‘SI01A’ at SI05.hs:5:1-12 (and originally defined at SI01A.hs:3:1-3), or ‘SI05A.sid’, - imported from ‘SI05A’ at SI05.hs:6:1-19 + imported from ‘SI05A’ at 0 at SI05.hs:6:1-19 (and originally defined at SI05A.hs:3:1-3). • In the untyped splice: $(sid [| pure () |]) ===================================== testsuite/tests/splice-imports/SI09.hs ===================================== @@ -5,8 +5,6 @@ module SI09 where import splice InstanceA () import splice ClassA import splice Prelude --- Why is implicit prelude import broken? -import Prelude e :: IO () -- Uses a non-splice imported instance ===================================== testsuite/tests/splice-imports/SI20.stderr ===================================== @@ -1,5 +1,7 @@ SI20.hs:9:7: error: [GHC-28914] • Stage error: ‘foo’ is bound at stage {0, 1} but used at stage 2 Hint: quoting [| foo |] or an enclosing expression would allow the quotation to be used in an earlier stage + From imports {imported from ‘SI19A’ at 0 at SI20.hs:7:1-19, + imported from ‘SI19A’ at SI20.hs:6:1-12} • In the Template Haskell quotation 'foo ===================================== testsuite/tests/splice-imports/all.T ===================================== @@ -4,7 +4,7 @@ def check_nothing(actual_file, normaliser): test('SI01', normal, multimod_compile, ['SI01', '-v0']) -test('SI02', normal, compile, ['']) +test('SI02', normal, multimod_compile, ['SI02', '-v0']) test('SI03', [extra_files(["SI01A.hs"])], multimod_compile_fail, ['SI03', '-v0']) test('SI04', [extra_files(["SI01A.hs"])], multimod_compile, ['SI04', '-v0']) test('SI05', [extra_files(["SI01A.hs"])], multimod_compile_fail, ['SI05', '-v0']) @@ -16,7 +16,7 @@ test('SI09', [extra_files(["ClassA.hs", "InstanceA.hs"])], multimod_compile, ['S test('SI10', [extra_files(["ClassA.hs", "InstanceA.hs"])], multimod_compile, ['SI10', '-v0']) test('SI11', normal, compile_fail, ['']) test('SI12', normal, compile_fail, ['']) -test('SI13', normal, compile, ['']) +test('SI13', normal, multimod_compile, ['SI13', '-v0']) test('SI14', normal, compile_fail, ['']) test('SI15', normal, compile_fail, ['']) test('SI16', normal, compile_fail, ['']) @@ -26,4 +26,5 @@ test('SI19', extra_files(["SI19A.hs"]), multimod_compile, ['SI19', '-v0']) test('SI20', extra_files(["SI19A.hs"]), multimod_compile_fail, ['SI20', '-v0']) test('SI21', normal, multimod_compile_fail, ['SI21', '-v0']) test('SI22', normal, multimod_compile_fail, ['SI22', '-v0']) +test('SI23', extra_files(["SI23A.hs"]), multimod_compile, ['SI23', '-v0']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/48c4e78bd382f53846a30daa7d3f2ab1dbf17d55 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/48c4e78bd382f53846a30daa7d3f2ab1dbf17d55 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 17:39:26 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Tue, 05 Nov 2024 12:39:26 -0500 Subject: [Git][ghc/ghc][wip/T25445] Getting there Message-ID: <672a584ded7f8_1b62a243676487129@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445 at Glasgow Haskell Compiler / GHC Commits: 8f853a4a by Simon Peyton Jones at 2024-11-05T17:38:55+00:00 Getting there - - - - - 4 changed files: - compiler/GHC/Core.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Types/Var.hs Changes: ===================================== compiler/GHC/Core.hs ===================================== @@ -14,9 +14,10 @@ module GHC.Core ( -- * In/Out type synonyms InId, InBind, InExpr, InAlt, InArg, InType, InKind, - InBndr, InVar, InCoercion, InTyVar, InCoVar, + InBndr, InVar, InCoercion, InTyVar, InCoVar, InTyCoVar, OutId, OutBind, OutExpr, OutAlt, OutArg, OutType, OutKind, - OutBndr, OutVar, OutCoercion, OutTyVar, OutCoVar, MOutCoercion, + OutBndr, OutVar, OutCoercion, OutTyVar, OutCoVar, + OutTyCoVar, MOutCoercion, -- ** 'Expr' construction mkLet, mkLets, mkLetNonRec, mkLetRec, mkLams, ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -45,6 +45,7 @@ import GHC.Core import GHC.Core.FVs import GHC.Core.Utils import GHC.Core.Stats ( coreBindsStats ) +import GHC.Core.Subst ( lookupIdSubst ) import GHC.Core.DataCon import GHC.Core.Ppr import GHC.Core.Coercion @@ -99,7 +100,6 @@ import GHC.Utils.Logger import Control.Monad import Data.Foldable ( for_, toList ) import Data.List.NonEmpty ( NonEmpty(..), groupWith ) -import Data.List ( partition ) import Data.Maybe import Data.IntMap.Strict ( IntMap ) import qualified Data.IntMap.Strict as IntMap ( lookup, keys, empty, fromList ) @@ -882,21 +882,17 @@ lintCoreExpr (Cast expr co) -- markAllJoinsBad: see Note [Join points and casts] ; (co', role, from_ty, to_ty) <- lintCoercion co - ; checkValueType to_ty $ - text "target of cast" <+> quotes (ppr co') + ; _ <- checkValueType (typeKind to_ty) $ + text "target of cast" <+> quotes (ppr co') ; lintRole co' Representational role ; ensureEqTys from_ty expr_ty (mkCastErr expr co' from_ty expr_ty) - ; return to_ty } - ; return (to_ty, ue) } lintCoreExpr (Tick tickish expr) - = do case tickish of - Breakpoint _ _ ids _ -> forM_ ids $ \id -> do - checkDeadIdOcc id - lookupIdInScope id - _ -> return () - markAllJoinsBadIf block_joins $ lintCoreExpr expr + = do { case tickish of + Breakpoint _ _ ids _ -> forM_ ids $ \id -> lintIdOcc id 0 + _ -> return () + ; markAllJoinsBadIf block_joins $ lintCoreExpr expr } where block_joins = not (tickish `tickishScopesLike` SoftScope) -- TODO Consider whether this is the correct rule. It is consistent with @@ -908,12 +904,12 @@ lintCoreExpr (Tick tickish expr) lintCoreExpr (Let (NonRec tv (Type ty)) body) | isTyVar tv = -- See Note [Linting type lets] - do { ty' <- lintType ty - ; lintTyBndr tv $ \ tv' -> - do { addLoc (RhsOf tv) $ lintTyKind tv' ty' + do { pr@(ty',_) <- lintType ty + ; lintTyCoBndr tv $ \ tv' -> + do { addLoc (RhsOf tv) $ lintTyKind tv' pr -- Now extend the substitution so we -- take advantage of it in the body - ; extendTvSubstL tv ty' $ + ; extendTvSubstL tv ty' $ addLoc (BodyOfLet tv) $ lintCoreExpr body } } @@ -1010,9 +1006,9 @@ lintCoreExpr (Type ty) lintCoreExpr (Coercion co) -- See Note [Coercions in terms] - = do { co' <- addLoc (InCo co) $ - lintCoercion co - ; return (coercionType co', zeroUE) } + = do { (_co', role, lty, rty) <- addLoc (InCo co) $ + lintCoercion co + ; return (mkCoercionType role lty rty, zeroUE) } ---------------------- lintIdOcc :: Var -> Int -- Number of arguments (type or value) being passed @@ -1034,11 +1030,7 @@ lintIdOcc var nargs -- (Maybe a) from the binding site with bogus (Maybe a1) from -- the occurrence site. Comparing un-substituted types finesses -- this altogether - ; (bndr, linted_bndr_ty) <- lookupIdInScope var - ; let occ_ty = idType var - bndr_ty = idType bndr - ; ensureEqTys occ_ty bndr_ty $ - mkBndrOccTypeMismatchMsg bndr var bndr_ty occ_ty + ; lintVarOcc var -- Check for a nested occurrence of the StaticPtr constructor. -- See Note [Checking StaticPtrs]. @@ -1048,14 +1040,45 @@ lintIdOcc var nargs text "Found makeStatic nested in an expression" ; checkDeadIdOcc var - ; checkJoinOcc var nargs + ; case isDataConId_maybe var of Nothing -> return () Just dc -> checkTypeDataConOcc "expression" dc - ; usage <- varCallSiteUsage var - ; return (linted_bndr_ty, usage) } + -- lintVarOcc has already checked that the Id is in scope + ; subst <- getSubst + ; let out_id = case lookupIdSubst subst var of + Var out_id -> out_id + e -> pprPanic "lintIdOcc" (ppr var $$ ppr e) + -- The Id substitution is just for freshening + + ; check_bad_global out_id + ; checkJoinOcc out_id nargs + + ; usage <- varCallSiteUsage out_id + ; return (idType out_id, usage) } + + where + -- 'check_bad_global' checks for the case where an /occurrence/ is + -- a GlobalId, but there is an enclosing binding fora a LocalId. + -- NB: the in-scope variables are mostly LocalIds, checked by lintIdBndr, + -- but GHCi adds GlobalIds from the interactive context. These + -- are fine; hence the test (isLocalId id == isLocalId v) + -- NB: when compiling Control.Exception.Base, things like absentError + -- are defined locally, but appear in expressions as (global) + -- wired-in Ids after worker/wrapper + -- So we simply disable the test in this case + check_bad_global out_id_bndr + | isGlobalId var + , isLocalId out_id_bndr + , not (isWiredIn var) + = failWithL $ hang (text "Occurrence is GlobalId, but binding is LocalId") + 2 (vcat [ hang (text "occurrence:") 2 $ pprBndr LetBind var + , hang (text "binder :") 2 $ pprBndr LetBind out_id_bndr ]) + | otherwise + = return () + lintCoreFun :: CoreExpr -> Int -- Number of arguments (type or val) being passed @@ -1458,15 +1481,15 @@ lintCoreArg (fun_ty, ue) (Type arg_ty) = do { checkL (not (isCoercionTy arg_ty)) (text "Unnecessary coercion-to-type injection:" <+> ppr arg_ty) - ; arg_ty' <- lintType arg_ty - ; res <- lintTyApp fun_ty arg_ty' + ; arg_tk <- lintType arg_ty + ; res <- lintTyApp fun_ty arg_tk ; return (res, ue) } -- Coercion argument lintCoreArg (fun_ty, ue) (Coercion co) - = do { co' <- addLoc (InCo co) $ - lintCoercion co - ; res <- lintCoApp fun_ty co' + = do { (co', r, lty, rty) <- addLoc (InCo co) $ + lintCoercion co + ; res <- lintCoApp fun_ty (co', mkCoercionType r lty rty) ; return (res, ue) } -- Other value argument @@ -1499,7 +1522,7 @@ lintAltBinders rhs_ue _case_bndr scrut_ty con_ty [] ; return rhs_ue } lintAltBinders rhs_ue case_bndr scrut_ty con_ty ((var_w, bndr):bndrs) | isTyVar bndr - = do { con_ty' <- lintTyApp con_ty (mkTyVarTy bndr) + = do { con_ty' <- lintTyApp con_ty (mkTyVarTy bndr, tyVarKind bndr) ; lintAltBinders rhs_ue case_bndr scrut_ty con_ty' bndrs } | otherwise = do { (con_ty', _) <- lintValApp (Var bndr) con_ty (idType bndr) zeroUE zeroUE @@ -1532,10 +1555,10 @@ checkCaseLinearity ue case_bndr var_w bndr = do ----------------- -lintTyApp :: OutType -> OutType -> LintM OutType -lintTyApp fun_ty arg_ty +lintTyApp :: OutType -> (OutType,OutKind) -> LintM OutType +lintTyApp fun_ty arg_pr@(arg_ty,_) | Just (tv,body_ty) <- splitForAllTyVar_maybe fun_ty - = do { lintTyKind tv arg_ty + = do { lintTyKind tv arg_pr ; in_scope <- getInScope -- substTy needs the set of tyvars in scope to avoid generating -- uniques that are already in scope. @@ -1546,11 +1569,10 @@ lintTyApp fun_ty arg_ty = failWithL (mkTyAppMsg fun_ty arg_ty) ----------------- -lintCoApp :: OutType -> OutCoercion -> LintM OutType -lintCoApp fun_ty co +lintCoApp :: OutType -> (OutCoercion, OutType) -> LintM OutType +lintCoApp fun_ty (co, co_ty) | Just (cv,body_ty) <- splitForAllCoVar_maybe fun_ty - , let co_ty = coercionType co - cv_ty = idType cv + , let cv_ty = idType cv , cv_ty `eqType` co_ty = do { in_scope <- getInScope ; let init_subst = mkEmptySubst in_scope @@ -1564,9 +1586,6 @@ lintCoApp fun_ty co | otherwise = failWithL (mkCoAppMsg fun_ty co) - where - co_ty = coercionType co - ----------------- -- | @lintValApp arg fun_ty arg_ty@ lints an application of @fun arg@ @@ -1584,17 +1603,16 @@ lintValApp arg fun_ty arg_ty fun_ue arg_ue where err2 = mkNonFunAppMsg fun_ty arg_ty arg -lintTyKind :: OutTyVar -> OutType -> LintM () +lintTyKind :: OutTyVar -> (OutType,OutKind) -> LintM () -- Both args have had substitution applied -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism] -lintTyKind tyvar arg_ty +lintTyKind tyvar (arg_ty,arg_kind) = unless (arg_kind `eqType` tyvar_kind) $ addErrL (mkKindErrMsg tyvar arg_ty $$ (text "Linted Arg kind:" <+> ppr arg_kind)) where tyvar_kind = tyVarKind tyvar - arg_kind = typeKind arg_ty {- ************************************************************************ @@ -1752,9 +1770,10 @@ lintCoreAlt case_bndr scrut_ty _scrut_mult alt_ty alt@(Alt (DataAlt con) args rh -- And now bring the new binders into scope ; lintBinders CasePatBind args $ \ args' -> do - { - rhs_ue <- lintAltExpr rhs alt_ty - ; rhs_ue' <- addLoc (CasePat alt) (lintAltBinders rhs_ue case_bndr scrut_ty con_payload_ty (zipEqual "lintCoreAlt" multiplicities args')) + { rhs_ue <- lintAltExpr rhs alt_ty + ; rhs_ue' <- addLoc (CasePat alt) $ + lintAltBinders rhs_ue case_bndr scrut_ty con_payload_ty + (zipEqual "lintCoreAlt" multiplicities args') ; return $ deleteUE rhs_ue' case_bndr } } @@ -1812,29 +1831,35 @@ lintBinder site var linterF | isTyCoVar var = lintTyCoBndr var linterF | otherwise = lintIdBndr NotTopLevel site var linterF -lintTyBndr :: TyVar -> (OutTyCoVer -> LintM a) -> LintM a -lintTyBndr = lintTyCoBndr -- We could specialise it, I guess - -lintTyCoBndr :: TyCoVar -> (OutTyCoVer -> LintM a) -> LintM a +lintTyCoBndr :: TyCoVar -> (OutTyCoVar -> LintM a) -> LintM a lintTyCoBndr tcv thing_inside - = do { subst <- getSubst - ; tcv_type' <- lintType (varType tcv) - ; let tcv' = uniqAway (substInScopeSet subst) $ - setVarType tcv tcv_type' - subst' = extendTCvSubstWithClone subst tcv tcv' + = do { (tcv_type', tcv_kind) <- lintType (varType tcv) - -- See (FORALL1) and (FORALL2) in GHC.Core.Type + -- See (FORALL1) and (FORALL2) in GHC.Core.Type ; if (isTyVar tcv) then -- Check that in (forall (a:ki). blah) we have ki:Type - lintL (isLiftedTypeKind (typeKind tcv_type')) $ + lintL (isLiftedTypeKind tcv_kind) $ hang (text "TyVar whose kind does not have kind Type:") - 2 (ppr tcv' <+> dcolon <+> ppr tcv_type' <+> dcolon <+> ppr (typeKind tcv_type')) + 2 (ppr tcv <+> dcolon <+> ppr tcv_type' <+> dcolon <+> ppr (typeKind tcv_kind)) else -- Check that in (forall (cv::ty). blah), -- then ty looks like (t1 ~# t2) lintL (isCoVarType tcv_type') $ text "CoVar with non-coercion type:" <+> pprTyVar tcv - ; updateSubst subst' (thing_inside tcv') } + ; subst <- getSubst + ; let (subst', tcv') = subst_bndr subst tcv tcv_type' + ; updateSubst subst' $ + addInScopeTyCoVar tcv $ + thing_inside tcv' } + where + subst_bndr subst tcv tcv_type' + | isEmptyTCvSubst subst -- No change in kind + , not (tcv `elemInScopeSet` in_scope) -- No change in unique + = (subst `extendSubstInScope` tcv, tcv) + | let tcv' = uniqAway in_scope (setVarType tcv tcv_type') + = (extendTCvSubstWithClone subst tcv tcv', tcv') + where + in_scope = substInScopeSet subst lintIdBndrs :: forall a. TopLevelFlag -> [InId] -> ([OutId] -> LintM a) -> LintM a lintIdBndrs top_lvl ids thing_inside @@ -1889,8 +1914,11 @@ lintIdBndr top_lvl bind_site id thing_inside ; linted_ty <- addLoc (IdTy id) (lintValueType id_ty) - ; addInScopeId id linted_ty $ - thing_inside (setIdType id linted_ty) } + ; subst <- getSubst + ; let (subst', id') = subst_id subst (setIdType id linted_ty) + ; updateSubst subst' $ + addInScopeId id id' $ + thing_inside id' } where id_ty = idType id @@ -1899,6 +1927,18 @@ lintIdBndr top_lvl bind_site id thing_inside LetBind -> True _ -> False + -- Extend the in-scope set, and perhaps the substitution + subst_id (Subst in_scope id_env tvs cvs) id + | not (id `elemInScopeSet` in_scope) + = (Subst (in_scope `extendInScopeSet` id) id_env tvs cvs, id) + | otherwise + = ( Subst (in_scope `extendInScopeSet` id') + (extendVarEnv id_env id (Var id')) + tvs cvs + , id' ) + where + id' = uniqAway in_scope id + {- %************************************************************************ %* * @@ -1913,8 +1953,7 @@ lintValueType :: Type -> LintM OutType -- See Note [Linting type lets] lintValueType ty = addLoc (InType ty) $ - do { ty' <- lintType ty - ; let sk = typeKind ty' + do { (ty',sk) <- lintType ty ; lintL (isTYPEorCONSTRAINT sk) $ hang (text "Ill-kinded type:" <+> ppr ty) 2 (text "has kind:" <+> ppr sk) @@ -1951,7 +1990,7 @@ lintType (TyVarTy tv) ; subst <- getSubst ; case lookupTyVar subst tv of Just linted_ty -> return (linted_ty, typeKind linted_ty) - Nothing -> return (TyVarTy tv) + Nothing -> return (TyVarTy tv, tyVarKind tv) -- If the type variable is not substituted for, it is entirely unchanged -- See Note [Extending the TvSubstEnv and CvSubstEnv] in GHC.Core.TyCo.Subst } @@ -1980,14 +2019,14 @@ lintType ty@(TyConApp tc tys) = do { checkTyCon tc ; prs <- mapM lintType tys ; res_k <- lint_ty_app ty (tyConKind tc) prs - ; return (TyConApp tc tys', res_k) } + ; return (TyConApp tc (map fst prs), res_k) } -- arrows can related *unlifted* kinds, so this has to be separate from -- a dependent forall. lintType ty@(FunTy af tw t1 t2) = do { pr1@(t1', _) <- lintType t1 ; pr2@(t2', _) <- lintType t2 - ; pr2@(tw', _) <- lintType tw + ; prw@(tw', _) <- lintType tw ; lintArrow (text "type or kind" <+> quotes (ppr ty)) pr1 pr2 prw ; let real_af = chooseFunTyFlag t1 t2 ; unless (real_af == af) $ addErrL $ @@ -2003,7 +2042,7 @@ lintType ty@(ForAllTy (Bndr tcv vis) body_ty) = failWithL (text "Non-Tyvar or Non-Covar bound in type:" <+> ppr ty) | otherwise = lintTyCoBndr tcv $ \tcv' -> - do { pr@(body_ty', body_k) <- lintType body_ty + do { pr@(body_ty', _) <- lintType body_ty ; when (isCoVar tcv) $ lintL (tcv `elemVarSet` tyCoVarsOfType body_ty) $ @@ -2012,15 +2051,14 @@ lintType ty@(ForAllTy (Bndr tcv vis) body_ty) ; torc <- lintForAllBody tcv' pr ; let res_k = liftedTypeOrConstraintKind torc - ; return (ForAllTy (Bndr tcv' vis) body_ty', ) } + ; return (ForAllTy (Bndr tcv' vis) body_ty', res_k) } lintType ty@(LitTy l) = do { lintTyLit l; return (ty, typeKind ty) } lintType (CastTy ty co) = do { (ty', ty_kind) <- lintType ty - ; (co', role, co_lk, co_rk) <- lintStarCoercion co - ; lintRole co Nominaal role + ; (co', co_lk, co_rk) <- lintStarCoercion co ; ensureEqTys ty_kind co_lk (mkCastTyErr ty co ty_kind co_lk) ; return (CastTy ty' co', co_rk) } @@ -2029,7 +2067,7 @@ lintType (CoercionTy co) ; return (CoercionTy co', mkCoercionType role co_lk co_rk) } ----------------- -lintForAllBody :: OutTyCoVer -> (OutType, OutKind) -> LintM TypeOrConstraint +lintForAllBody :: OutTyCoVar -> (OutType, OutKind) -> LintM TypeOrConstraint -- Do the checks for the body of a forall-type lintForAllBody tcv (body_ty, body_kind) = do { -- For type variables, check for skolem escape @@ -2047,7 +2085,7 @@ lintForAllBody tcv (body_ty, body_kind) ; checkValueType body_kind (text "the body of forall:" <+> ppr body_ty) } ----------------- -lintTySynFamApp :: Bool -> InType -> TyCon -> [InType] -> LintM OutType +lintTySynFamApp :: Bool -> InType -> TyCon -> [InType] -> LintM (OutType, OutKind) -- The TyCon is a type synonym or a type family (not a data family) -- See Note [Linting type synonym applications] -- c.f. GHC.Tc.Validity.check_syn_tc_app @@ -2074,16 +2112,16 @@ lintTySynFamApp report_unsat ty tc tys | otherwise = do { prs <- mapM lintType tys ; res_k <- lint_ty_app ty (tyConKind tc) prs - ; return (TyConApp tc (map fst prs)) } + ; return (TyConApp tc (map fst prs), res_k) } ----------------- --- Confirms that a type is really TYPE r or Constraint +-- Confirms that a kind is really TYPE r or Constraint checkValueType :: OutKind -> SDoc -> LintM TypeOrConstraint -checkValueType (ty,ki) doc - = case sortKind_maybe ki of - Just torc -> return torc - Nothing -> failL $ - vcat [ text "Non-Type-like kind when Type-like expected:" <+> ppr kind $$ +checkValueType ki doc + = case sORTKind_maybe ki of + Just (torc,_) -> return torc + Nothing -> failWithL $ + vcat [ text "Non-Type-like kind when Type-like expected:" <+> ppr ki , text "when checking" <+> doc ] ----------------- @@ -2091,7 +2129,7 @@ lintArrow :: SDoc -> (OutType, OutKind) -> (OutType, OutKind) -> (OutType, OutKind) -> LintM () -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism] -lintArrow what (t1,k1) (t2,k2) (tw,kw) -- Eg lintArrow "type or kind `blah'" k1 k2 kw +lintArrow what (_,k1) (_,k2) (_,kw) -- Eg lintArrow "type or kind `blah'" k1 k2 kw -- or lintArrow "coercion `blah'" k1 k2 kw = do { unless (isTYPEorCONSTRAINT k1) (report (text "argument") k1) ; unless (isTYPEorCONSTRAINT k2) (report (text "result") k2) @@ -2117,15 +2155,21 @@ lint_ty_app msg_ty k prs = lint_app (\msg_ty -> text "type" <+> quotes (ppr msg_ty)) msg_ty k prs ---------------- -lint_co_app :: Coercion -> OutKind -> [(OutType,OutKind)] -> LintM OutKind +lint_co_app :: Coercion -> OutKind -> [OutType] -> LintM () lint_co_app msg_ty k tys -- See Note [Avoiding compiler perf traps when constructing error messages.] - = lint_app (\msg_ty -> text "coercion" <+> quotes (ppr msg_ty)) msg_ty k tys + = do { _ <- lint_app (\msg_ty -> text "coercion" <+> quotes (ppr msg_ty)) + msg_ty k (map add_kind tys) + ; return () } + +add_kind :: OutType -> (OutType,OutKind) +add_kind ty = (ty,typeKind ty) + ---------------- lint_app :: Outputable msg_thing => (msg_thing -> SDoc) -> msg_thing - -> OutKind -> [(OutType,OutKind)] -> LintM () + -> OutKind -> [(OutType,OutKind)] -> LintM OutKind -- (lint_app d fun_kind arg_tys) -- We have an application (f arg_ty1 .. arg_tyn), -- where f :: fun_kind @@ -2305,14 +2349,13 @@ which is what used to happen. But that proved tricky and error prone -- lints a coercion, confirming that its lh kind and its rh kind are both * -- also ensures that the role is Nominal -lintStarCoercion :: InCoercion -> LintM OutCoercion +lintStarCoercion :: InCoercion -> LintM (OutCoercion, OutType, OutType) lintStarCoercion g - = do { g' <- lintCoercion g - ; let Pair t1 t2 = coercionKind g' - ; checkValueType t1 (text "the kind of the left type in" <+> ppr g) - ; checkValueType t2 (text "the kind of the right type in" <+> ppr g) - ; lintRole g Nominal (coercionRole g) - ; return g' } + = do { (g', role, t1, t2) <- lintCoercion g + ; _ <- checkValueType (typeKind t1) (text "the kind of the left type in" <+> ppr g) + ; _ <- checkValueType (typeKind t2) (text "the kind of the right type in" <+> ppr g) + ; lintRole g Nominal role + ; return (g', t1, t2) } lintCoercion :: InCoercion -> LintM (OutCoercion, Role, OutType, OutType) -- If you edit this function, you may need to update the GHC formalism @@ -2323,12 +2366,18 @@ lintCoercion (CoVarCo cv) = failWithL (hang (text "Bad CoVarCo:" <+> ppr cv) 2 (text "With offending type:" <+> ppr (varType cv))) - | otherwise + | otherwise -- C.f. lintType (TyVarTy tv), which has better docs = do { lintVarOcc cv + ; subst <- getSubst ; case lookupCoVar subst cv of - Just linted_co -> return linted_co ; - Nothing -> do { checkTyCoVarInScope subst cv - ; return (CoVarCo cv) } + Just linted_co -> return (linted_co, role, lty, rty) + where + (Pair lty rty, role) = coercionKindRole linted_co + + Nothing -> do { checkTyCoVarInScope subst cv + ; return (CoVarCo cv, role, lty, rty) } + where + (lty, rty, role) = coVarTypesRole cv } @@ -2337,19 +2386,17 @@ lintCoercion (Refl ty) ; return (Refl ty', Nominal, ty', ty') } lintCoercion (GRefl r ty MRefl) - = do { ty' <- lintType ty - ; return (GRefl r ty' MRefl) } + = do { (ty', _) <- lintType ty + ; return (GRefl r ty' MRefl, r, ty', ty') } lintCoercion (GRefl r ty (MCo co)) - = do { ty' <- lintType ty - ; co' <- lintCoercion co - ; let tk = typeKind ty' - tl = coercionLKind co' - ; ensureEqTys tk tl $ + = do { (ty',tk) <- lintType ty + ; (co', role, lk, _rk) <- lintCoercion co + ; ensureEqTys tk lk $ hang (text "GRefl coercion kind mis-match:" <+> ppr co) - 2 (vcat [ppr ty', ppr tk, ppr tl]) - ; lintRole co' Nominal (coercionRole co') - ; return (GRefl r ty' (MCo co')) } + 2 (vcat [ppr ty', ppr tk, ppr lk]) + ; lintRole co' Nominal role + ; return (GRefl r ty' (MCo co'), r, ty', mkCastTy ty' co') } lintCoercion co@(TyConAppCo r tc cos) | Just {} <- tyConAppFunCo_maybe r tc cos @@ -2362,12 +2409,11 @@ lintCoercion co@(TyConAppCo r tc cos) | otherwise = do { checkTyCon tc - ; cos' <- mapM lintCoercion cos - ; let (co_kinds, co_roles) = unzip (map coercionKindRole cos') - ; lint_co_app co (tyConKind tc) (map pFst co_kinds) - ; lint_co_app co (tyConKind tc) (map pSnd co_kinds) + ; (cos', co_roles, ltys, rtys) <- mapAndUnzip4M lintCoercion cos + ; lint_co_app co (tyConKind tc) ltys + ; lint_co_app co (tyConKind tc) rtys ; zipWithM_ (lintRole co) (tyConRoleListX r tc) co_roles - ; return (TyConAppCo r tc cos') } + ; return (TyConAppCo r tc cos', r, mkTyConApp tc ltys, mkTyConApp tc rtys) } lintCoercion co@(AppCo co1 co2) | TyConAppCo {} <- co1 @@ -2375,10 +2421,8 @@ lintCoercion co@(AppCo co1 co2) | Just (TyConApp {}, _) <- isReflCo_maybe co1 = failWithL (text "Refl (TyConApp ...) to the left of AppCo:" <+> ppr co) | otherwise - = do { co1' <- lintCoercion co1 - ; co2' <- lintCoercion co2 - ; let (Pair lk1 rk1, r1) = coercionKindRole co1' - (Pair lk2 rk2, r2) = coercionKindRole co2' + = do { (co1', r1, lk1, rk1) <- lintCoercion co1 + ; (co2', r2, lk2, rk2) <- lintCoercion co2 ; lint_co_app co (typeKind lk1) [lk2] ; lint_co_app co (typeKind rk1) [rk2] @@ -2388,7 +2432,7 @@ lintCoercion co@(AppCo co1 co2) ppr co) else lintRole co Nominal r2 - ; return (AppCo co1' co2') } + ; return (AppCo co1' co2', r1, mkAppTy lk1 lk2, mkAppTy rk1 rk2) } ---------- lintCoercion co@(ForAllCo { fco_tcv = tcv, fco_visL = visL, fco_visR = visR @@ -2400,10 +2444,10 @@ lintCoercion co@(ForAllCo { fco_tcv = tcv, fco_visL = visL, fco_visR = visR = failWithL (text "Non tyco binder in ForAllCo:" <+> ppr co) | otherwise - = do { kind_co' <- lintStarCoercion kind_co + = do { (kind_co', lkind, _rkind) <- lintStarCoercion kind_co ; lintTyCoBndr tcv $ \tcv' -> - do { body_co' <- lintCoercion body_co - ; ensureEqTys (varType tcv') (coercionLKind kind_co') $ + do { (body_co', body_role, lty, rty) <- lintCoercion body_co + ; ensureEqTys (varType tcv') lkind $ text "Kind mis-match in ForallCo" <+> ppr co -- Assuming kind_co :: k1 ~ k2 @@ -2412,9 +2456,8 @@ lintCoercion co@(ForAllCo { fco_tcv = tcv, fco_visL = visL, fco_visR = visR -- (forall (tcv:k2). rty[(tcv:k2) |> sym kind_co/tcv]) -- are both well formed. Easiest way is to call lintForAllBody -- for each; there is actually no need to do the funky substitution - ; let (Pair lty rty, body_role) = coercionKindRole body_co' - ; lintForAllBody tcv' lty - ; lintForAllBody tcv' rty + ; _ <- lintForAllBody tcv' (lty, typeKind lty) + ; _ <- lintForAllBody tcv' (rty, typeKind rty) ; when (isCoVar tcv) $ do { lintL (visL == coreTyLamForAllTyFlag && visR == coreTyLamForAllTyFlag) $ @@ -2429,29 +2472,34 @@ lintCoercion co@(ForAllCo { fco_tcv = tcv, fco_visL = visL, fco_visR = visR lintL (visL `eqForAllVis` visR) $ text "Nominal ForAllCo has mismatched visibilities: " <+> ppr co - ; return (co { fco_tcv = tcv', fco_kind = kind_co', fco_body = body_co' }) } } + ; let co' = co { fco_tcv = tcv', fco_kind = kind_co', fco_body = body_co' } + lty' = mkTyCoForAllTy tcv' visL lty + rty' = coercionRKind co' -- Too complicated to inline! + ; return ( co', body_role, lty', rty') } } lintCoercion co@(FunCo { fco_role = r, fco_afl = afl, fco_afr = afr , fco_mult = cow, fco_arg = co1, fco_res = co2 }) - = do { co1' <- lintCoercion co1 - ; co2' <- lintCoercion co2 - ; cow' <- lintCoercion cow - ; let Pair lt1 rt1 = coercionKind co1 - Pair lt2 rt2 = coercionKind co2 - Pair ltw rtw = coercionKind cow + = do { (co1', r1, lt1, rt1) <- lintCoercion co1 + ; (co2', r2, lt2, rt2) <- lintCoercion co2 + ; (cow', rw, ltw, rtw) <- lintCoercion cow ; lintL (afl == chooseFunTyFlag lt1 lt2) (bad_co_msg "afl") ; lintL (afr == chooseFunTyFlag rt1 rt2) (bad_co_msg "afr") - ; lintArrow (bad_co_msg "arrowl") lt1 lt2 ltw - ; lintArrow (bad_co_msg "arrowr") rt1 rt2 rtw - ; lintRole co1 r (coercionRole co1) - ; lintRole co2 r (coercionRole co2) + ; let ltw_kind = typeKind ltw + rtw_kind = typeKind rtw ; ensureEqTys (typeKind ltw) multiplicityTy (bad_co_msg "mult-l") ; ensureEqTys (typeKind rtw) multiplicityTy (bad_co_msg "mult-r") + ; lintArrow (bad_co_msg "arrowl") (add_kind lt1) (add_kind lt2) (ltw, ltw_kind) + ; lintArrow (bad_co_msg "arrowr") (add_kind rt1) (add_kind rt2) (rtw, rtw_kind) + ; lintRole co1 r r1 + ; lintRole co2 r r2 ; let expected_mult_role = case r of Phantom -> Phantom _ -> Nominal - ; lintRole cow expected_mult_role (coercionRole cow) - ; return (co { fco_mult = cow', fco_arg = co1', fco_res = co2' }) } + ; lintRole cow expected_mult_role rw + ; return ( co { fco_mult = cow', fco_arg = co1', fco_res = co2' } + , r + , FunTy { ft_af = afl, ft_mult = ltw, ft_arg = lt1, ft_res = lt2 } + , FunTy { ft_af = afr, ft_mult = rtw, ft_arg = rt1, ft_res = rt2 } ) } where bad_co_msg s = hang (text "Bad coercion" <+> parens (text s)) 2 (vcat [ text "afl:" <+> ppr afl @@ -2468,19 +2516,18 @@ lintCoercion co@(UnivCo { uco_role = r, uco_prov = prov _ -> return () -- Check the to and from types - ; ty1' <- lintType ty1 - ; ty2' <- lintType ty2 + ; (ty1', k1) <- lintType ty1 + ; (ty2', k2) <- lintType ty2 - ; let k1 = typeKind ty1' - k2 = typeKind ty2' ; when (r /= Phantom && isTYPEorCONSTRAINT k1 && isTYPEorCONSTRAINT k2) (checkTypes ty1 ty2) -- Check the coercions on which this UnivCo depends - ; deps' <- mapM lintCoercion deps + ; (deps', _, _, _) <- mapAndUnzip4M lintCoercion deps - ; return (co { uco_lty = ty1', uco_rty = ty2', uco_deps = deps' }) } + ; return ( co { uco_lty = ty1', uco_rty = ty2', uco_deps = deps' } + , r, ty1', ty2' ) } where report s = hang (text $ "Unsafe coercion: " ++ s) 2 (vcat [ text "From:" <+> ppr ty1 @@ -2524,37 +2571,33 @@ lintCoercion co@(UnivCo { uco_role = r, uco_prov = prov } lintCoercion (SymCo co) - = do { co' <- lintCoercion co - ; return (SymCo co') } + = do { (co', r, lty, rty) <- lintCoercion co + ; return (SymCo co', r, rty, lty) } lintCoercion co@(TransCo co1 co2) - = do { co1' <- lintCoercion co1 - ; co2' <- lintCoercion co2 - ; let ty1b = coercionRKind co1' - ty2a = coercionLKind co2' - ; ensureEqTys ty1b ty2a + = do { (co1', r1, lty1, rty1) <- lintCoercion co1 + ; (co2', r2, lty2, rty2) <- lintCoercion co2 + ; ensureEqTys rty1 lty2 (hang (text "Trans coercion mis-match:" <+> ppr co) 2 (vcat [ppr (coercionKind co1'), ppr (coercionKind co2')])) - ; lintRole co (coercionRole co1) (coercionRole co2) - ; return (TransCo co1' co2') } + ; lintRole co r1 r2 + ; return (TransCo co1' co2', r1, lty1, rty2) } lintCoercion the_co@(SelCo cs co) - = do { co' <- lintCoercion co - ; let (Pair s t, co_role) = coercionKindRole co' - + = do { (co', co_role, s, t) <- lintCoercion co ; if -- forall (both TyVar and CoVar) | Just _ <- splitForAllTyCoVar_maybe s , Just _ <- splitForAllTyCoVar_maybe t , SelForAll <- cs , (isForAllTy_ty s && isForAllTy_ty t) || (isForAllTy_co s && isForAllTy_co t) - -> return (SelCo cs co') + -> return () -- function | isFunTy s , isFunTy t , SelFun {} <- cs - -> return (SelCo cs co') + -> return () -- TyCon | Just (tc_s, tys_s) <- splitTyConApp_maybe s @@ -2566,58 +2609,71 @@ lintCoercion the_co@(SelCo cs co) , tys_s `equalLength` tys_t , tys_s `lengthExceeds` n -> do { lintRole the_co (tyConRole co_role tc_s n) r0 - ; return (SelCo cs co') } + ; return () } | otherwise -> failWithL (hang (text "Bad SelCo:") - 2 (ppr the_co $$ ppr s $$ ppr t)) } + 2 (ppr the_co $$ ppr s $$ ppr t)) + + ; return ( SelCo cs co', mkSelCoResRole cs co_role + , selectFromType cs s, selectFromType cs t) } lintCoercion the_co@(LRCo lr co) - = do { co' <- lintCoercion co - ; let Pair s t = coercionKind co' - r = coercionRole co' + = do { (co', r, s, t) <- lintCoercion co ; lintRole co Nominal r - ; case (splitAppTy_maybe s, splitAppTy_maybe t) of - (Just _, Just _) -> return (LRCo lr co') + ; (lty, rty) <- case (splitAppTy_maybe s, splitAppTy_maybe t) of + (Just (s1,s2), Just (t1,t2)) -> return (pickLR lr ((s1,t1),(s2,t2))) _ -> failWithL (hang (text "Bad LRCo:") - 2 (ppr the_co $$ ppr s $$ ppr t)) } - -lintCoercion (InstCo co arg) - = do { co' <- lintCoercion co - ; arg' <- lintCoercion arg - ; let Pair t1 t2 = coercionKind co' - Pair s1 s2 = coercionKind arg' - - ; lintRole arg Nominal (coercionRole arg') - - ; case (splitForAllTyVar_maybe t1, splitForAllTyVar_maybe t2) of - -- forall over tvar - { (Just (tv1,_), Just (tv2,_)) - | typeKind s1 `eqType` tyVarKind tv1 - , typeKind s2 `eqType` tyVarKind tv2 - -> return (InstCo co' arg') - | otherwise - -> failWithL (text "Kind mis-match in inst coercion1" <+> ppr co) - - ; _ -> case (splitForAllCoVar_maybe t1, splitForAllCoVar_maybe t2) of - -- forall over covar - { (Just (cv1, _), Just (cv2, _)) - | typeKind s1 `eqType` varType cv1 - , typeKind s2 `eqType` varType cv2 - , CoercionTy _ <- s1 - , CoercionTy _ <- s2 - -> return (InstCo co' arg') - | otherwise - -> failWithL (text "Kind mis-match in inst coercion2" <+> ppr co) + 2 (ppr the_co $$ ppr s $$ ppr t)) + ; return (LRCo lr co', Nominal, lty, rty) } - ; _ -> failWithL (text "Bad argument of inst") }}} +lintCoercion orig_co@(InstCo co arg) + = go co [arg] + where + go (InstCo co arg) args = go co (arg:args) + go co args = do { (co', fun_role, lty, rty) <- lintCoercion co + ; in_scope <- getInScope + ; let subst = mkEmptySubst in_scope + ; (lty', rty', args') <- go_args (subst, lty) (subst,rty) args + ; return (foldl InstCo co' args', fun_role, lty', rty') } + where + + ------------- + go_args (lsubst,lty) (rsubst,rty) [] + = return (substTy lsubst lty, substTy rsubst rty, []) + go_args lty rty (arg:args) + = do { (lty1, rty1, arg') <- go_arg lty rty arg + ; (lty', rty', args') <- go_args lty1 rty1 args + ; return (lty', rty', arg':args') } + + ------------- + go_arg (lsubst,lty) (rsubst,rty) arg + = do { (arg', arg_role, arg_lty, arg_rty) <- lintCoercion arg + ; lintRole arg Nominal arg_role + + ; case (splitForAllTyCoVar_maybe lty, splitForAllTyCoVar_maybe rty) of + -- forall over tvar + (Just (ltv,lty1), Just (rtv,rty1)) + | typeKind arg_lty `eqType` tyVarKind ltv + , typeKind arg_rty `eqType` tyVarKind rtv + -> return ( (extendTCvSubst lsubst ltv arg_lty, lty1) + , (extendTCvSubst rsubst rtv arg_rty, rty1) + , arg' ) + | otherwise + -> failWithL (text "Kind mis-match in inst coercion1" <+> ppr orig_co) + + _ -> failWithL (text "Bad argument of inst" <+> ppr orig_co) } lintCoercion this_co@(AxiomCo ax cos) - = do { cos' <- mapM lintCoercion cos - ; let arg_kinds :: [Pair Type] = map coercionKind cos' - ; lint_roles 0 (coAxiomRuleArgRoles ax) cos' - ; lint_ax ax arg_kinds - ; return (AxiomCo ax cos') } + = do { (cos', arg_roles, ltys, rtys) <- mapAndUnzip4M lintCoercion cos + ; lint_roles 0 (coAxiomRuleArgRoles ax) arg_roles + ; lint_ax ax (zipWith Pair ltys rtys) + ; let co' = AxiomCo ax cos' + ; return ( co', coAxiomRuleRole ax + , coercionLKind co', coercionRKind co' + -- The kind of a AxiomCo is a bit tricky, + -- so bale out into coercionLKind etc + ) } where lint_ax :: CoAxiomRule -> [Pair Type] -> LintM () lint_ax (BuiltInFamRew bif) prs @@ -2640,13 +2696,13 @@ lintCoercion this_co@(AxiomCo ax cos) err m xs = failWithL $ hang (text m) 2 $ vcat (text "Rule:" <+> ppr ax : xs) - lint_roles n (e : es) (co : cos) - | e == coercionRole co - = lint_roles (n+1) es cos + lint_roles n (e : es) (arg_role:arg_roles) + | e == arg_role + = lint_roles (n+1) es arg_roles | otherwise = err "Argument roles mismatch" [ text "In argument:" <+> int (n+1) , text "Expected:" <+> ppr e - , text "Found:" <+> ppr (coercionRole co) ] + , text "Found:" <+> ppr arg_role ] lint_roles _ [] [] = return () lint_roles n [] rs = err "Too many coercion arguments" [ text "Expected:" <+> int n @@ -2656,20 +2712,17 @@ lintCoercion this_co@(AxiomCo ax cos) [ text "Expected:" <+> int (n + length es) , text "Provided:" <+> int n ] - lintCoercion (KindCo co) - = do { co' <- lintCoercion co - ; return (KindCo co') } + = do { (co', _r, lty, rty) <- lintCoercion co + ; return (KindCo co', Nominal, typeKind lty, typeKind rty) } lintCoercion (SubCo co') - = do { co' <- lintCoercion co' - ; lintRole co' Nominal (coercionRole co') - ; return (SubCo co') } + = do { (co', r, lty, rty) <- lintCoercion co' + ; lintRole co' Nominal r + ; return (SubCo co', Representational, lty, rty) } lintCoercion (HoleCo h) - = do { addErrL $ text "Unfilled coercion hole:" <+> ppr h - ; lintCoercion (CoVarCo (coHoleCoVar h)) } - + = failWithL (text "Unfilled coercion hole:" <+> ppr h) {- Note [Conflict checking for axiom applications] @@ -2844,10 +2897,8 @@ lint_branch ax_tc (CoAxBranch { cab_tvs = tvs, cab_cvs = cvs , cab_lhs = lhs_args, cab_rhs = rhs }) = lintBinders LambdaBind (tvs ++ cvs) $ \_ -> do { let lhs = mkTyConApp ax_tc lhs_args - ; lhs' <- lintType lhs - ; rhs' <- lintType rhs - ; let lhs_kind = typeKind lhs' - rhs_kind = typeKind rhs' + ; (_lhs', lhs_kind) <- lintType lhs + ; (_rhs', rhs_kind) <- lintType rhs ; lintL (not (lhs_kind `typesAreApart` rhs_kind)) $ hang (text "Inhomogeneous axiom") 2 (text "lhs:" <+> ppr lhs <+> dcolon <+> ppr lhs_kind $$ @@ -3287,12 +3338,12 @@ initL cfg m | otherwise -> pprPanic ("Bug in Lint: a failure occurred " ++ "without reporting an error message") empty where - (tcvs, ids) = partition isTyCoVar $ l_vars cfg - env = LE { le_flags = l_flags cfg - , le_subst = mkEmptySubst (mkInScopeSetList tcvs) - , le_ids = mkVarEnv [(id, (id,idType id)) | id <- ids] - , le_joins = emptyVarSet - , le_loc = [] + vars = l_vars cfg + env = LE { le_flags = l_flags cfg + , le_subst = mkEmptySubst (mkInScopeSetList vars) + , le_in_vars = mkVarEnv [ (v,v) | v <- vars ] + , le_joins = emptyVarSet + , le_loc = [] , le_ue_aliases = emptyNameEnv , le_platform = l_platform cfg , le_diagOpts = l_diagOpts cfg @@ -3374,23 +3425,29 @@ inCasePat = LintM $ \ env errs -> fromBoxedLResult (Just (is_case_pat env), errs is_case_pat (LE { le_loc = CasePat {} : _ }) = True is_case_pat _other = False -addInScopeId :: Id -> OutType -> LintM a -> LintM a -addInScopeId id linted_ty m - = LintM $ \ env@(LE { le_ids = id_set, le_joins = join_set, le_ue_aliases = aliases }) errs -> - unLintM m (env { le_ids = extendVarEnv id_set id (id, linted_ty) - , le_joins = add_joins join_set - , le_ue_aliases = delFromNameEnv aliases (idName id) }) errs +addInScopeId :: InId -> OutId -> LintM a -> LintM a +addInScopeId in_id out_id m + = LintM $ \ env@(LE { le_in_vars = id_vars, le_joins = join_set, le_ue_aliases = aliases }) errs -> + unLintM m (env { le_in_vars = extendVarEnv id_vars in_id in_id + , le_joins = add_joins join_set + , le_ue_aliases = delFromNameEnv aliases (idName out_id) }) errs -- When shadowing an alias, we need to make sure the Id is no longer -- classified as such. E.g. in -- let x = in case x of x { _DEFAULT -> } -- Occurrences of 'x' in e2 shouldn't count as occurrences of e1. where add_joins join_set - | isJoinId id = extendVarSet join_set id -- Overwrite with new arity - | otherwise = delVarSet join_set id -- Remove any existing binding + | isJoinId out_id = extendVarSet join_set out_id -- Overwrite with new arity + | otherwise = delVarSet join_set out_id -- Remove any existing binding -getInScopeIds :: LintM (VarEnv (Id,OutType)) -getInScopeIds = LintM (\env errs -> fromBoxedLResult (Just (le_ids env), errs)) +addInScopeTyCoVar :: InTyCoVar -> LintM a -> LintM a +addInScopeTyCoVar v thing_inside + = LintM $ \ env errs -> + unLintM thing_inside + (env { le_in_vars = extendVarEnv (le_in_vars env) v v }) errs + +getInVarEnv :: LintM (VarEnv InId) +getInVarEnv = LintM (\env errs -> fromBoxedLResult (Just (le_in_vars env), errs)) extendTvSubstL :: TyVar -> Type -> LintM a -> LintM a extendTvSubstL tv ty m @@ -3421,60 +3478,26 @@ getUEAliases = LintM (\ env errs -> fromBoxedLResult (Just (le_ue_aliases env), getInScope :: LintM InScopeSet getInScope = LintM (\ env errs -> fromBoxedLResult (Just (substInScopeSet $ le_subst env), errs)) -lookupIdInScope :: Id -> LintM (Id, OutType) -lookupIdInScope id_occ - = do { in_scope_ids <- getInScopeIds - ; case lookupVarEnv in_scope_ids id_occ of - Just (id_bndr, linted_ty) - -> do { checkL (not (bad_global id_bndr)) $ global_in_scope id_bndr - ; return (id_bndr, linted_ty) } - Nothing -> do { checkL (not is_local) local_out_of_scope - ; return (id_occ, idType id_occ) } } - -- We don't bother to lint the type - -- of global (i.e. imported) Ids - where - is_local = mustHaveLocalBinding id_occ - local_out_of_scope = text "Out of scope:" <+> pprBndr LetBind id_occ - global_in_scope id_bndr = hang (text "Occurrence is GlobalId, but binding is LocalId") - 2 $ vcat [hang (text "occurrence:") 2 $ pprBndr LetBind id_occ - ,hang (text "binder :") 2 $ pprBndr LetBind id_bndr - ] - bad_global id_bnd = isGlobalId id_occ - && isLocalId id_bnd - && not (isWiredIn id_occ) - -- 'bad_global' checks for the case where an /occurrence/ is - -- a GlobalId, but there is an enclosing binding fora a LocalId. - -- NB: the in-scope variables are mostly LocalIds, checked by lintIdBndr, - -- but GHCi adds GlobalIds from the interactive context. These - -- are fine; hence the test (isLocalId id == isLocalId v) - -- NB: when compiling Control.Exception.Base, things like absentError - -- are defined locally, but appear in expressions as (global) - -- wired-in Ids after worker/wrapper - -- So we simply disable the test in this case - lintVarOcc :: InVar -> LintM () -- Checks two things: -- a) that it is in scope -- b) that the type at the ocurrences matches the type at the binding site lintVarOcc v_occ + | isGlobalId v_occ + = return () + | otherwise = do { in_var_env <- getInVarEnv ; case lookupVarEnv in_var_env v_occ of - Nothing -> failWithL out_of_scope_msg - Just v_bndr | varType v_vndr `eqType` varType v_occ - -> failWithL (bad_type_msg v_bndr) - | otherwise - -> return () } + Nothing -> failWithL (text pp_what <+> quotes (ppr v_occ) <+> text "is out of scope") + Just v_bndr -> ensureEqTys occ_ty bndr_ty $ + mkBndrOccTypeMismatchMsg v_occ bndr_ty occ_ty + where + occ_ty = varType v_occ + bndr_ty = varType v_bndr } where - pp_what | isTyVar v = "The type variable" - | isCoVar v = "The coercion variable" - | otherwise = "The value variable" - - out_of_scope_msg = hang pp_what 2 (text "is out of scope") - bad_type_msg v_bndr = hang pp_what 2 $ - vcat [ text "has a different type at its binding site and occurrence" - , text "Binding site type: " <+> ppr (varType v_bndr) - , text "Occurrence site type:" <+> ppr (varType v_occ) - + pp_what | isTyVar v_occ = "The type variable" + | isCoVar v_occ = "The coercion variable" + | otherwise = "The value variable" lookupJoinId :: Id -> LintM JoinPointHood -- Look up an Id which should be a join point, valid here @@ -3723,7 +3746,7 @@ mkLetErr bndr rhs hang (text "Rhs:") 4 (ppr rhs)] -mkTyAppMsg :: Type -> Type -> SDoc +mkTyAppMsg :: OutType -> Type -> SDoc mkTyAppMsg ty arg_ty = vcat [text "Illegal type application:", hang (text "Function type:") @@ -3852,12 +3875,11 @@ mkJoinBndrOccMismatchMsg bndr join_arity_bndr join_arity_occ , text "Arity at binding site:" <+> ppr join_arity_bndr , text "Arity at occurrence: " <+> ppr join_arity_occ ] -mkBndrOccTypeMismatchMsg :: Var -> Var -> OutType -> OutType -> SDoc -mkBndrOccTypeMismatchMsg bndr var bndr_ty var_ty +mkBndrOccTypeMismatchMsg :: InVar -> InType -> InType -> SDoc +mkBndrOccTypeMismatchMsg var bndr_ty occ_ty = vcat [ text "Mismatch in type between binder and occurrence" - , text "Binder:" <+> ppr bndr <+> dcolon <+> ppr bndr_ty - , text "Occurrence:" <+> ppr var <+> dcolon <+> ppr var_ty - , text " Before subst:" <+> ppr (idType var) ] + , text "Binder: " <+> ppr var <+> dcolon <+> ppr bndr_ty + , text "Occurrence:" <+> ppr var <+> dcolon <+> ppr occ_ty ] mkBadJoinPointRuleMsg :: JoinId -> JoinArity -> CoreRule -> SDoc mkBadJoinPointRuleMsg bndr join_arity rule ===================================== compiler/GHC/Core/Type.hs ===================================== @@ -3450,5 +3450,5 @@ typeOrConstraintKind TypeLike rep = mkTYPEapp rep typeOrConstraintKind ConstraintLike rep = mkCONSTRAINTapp rep liftedTypeOrConstraintKind :: TypeOrConstraint -> Kind -liftedTypeOrConstraintKind TypeLike = typeKind +liftedTypeOrConstraintKind TypeLike = liftedTypeKind liftedTypeOrConstraintKind ConstraintLike = constraintKind ===================================== compiler/GHC/Types/Var.hs ===================================== @@ -40,8 +40,8 @@ module GHC.Types.Var ( TyVar, TcTyVar, TypeVar, KindVar, TKVar, TyCoVar, -- * In and Out variants - InVar, InCoVar, InId, InTyVar, - OutVar, OutCoVar, OutId, OutTyVar, + InVar, InCoVar, InId, InTyVar, InTyCoVar, + OutVar, OutCoVar, OutId, OutTyVar, OutTyCoVar, -- ** Taking 'Var's apart varName, varUnique, varType, @@ -205,10 +205,12 @@ type TyCoVar = Id -- Type, *or* coercion variable type InVar = Var type InTyVar = TyVar type InCoVar = CoVar +type InTyCoVar = TyCoVar type InId = Id type OutVar = Var type OutTyVar = TyVar type OutCoVar = CoVar +type OutTyCoVar = TyCoVar type OutId = Id View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8f853a4aa13b5417621d2c640cf87e87d6d12003 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8f853a4aa13b5417621d2c640cf87e87d6d12003 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 17:41:57 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Tue, 05 Nov 2024 12:41:57 -0500 Subject: [Git][ghc/ghc][wip/splice-imports-2024] 2 commits: trace Message-ID: <672a58e51ca36_1b62a24367648739d@gitlab.mail> Matthew Pickering pushed to branch wip/splice-imports-2024 at Glasgow Haskell Compiler / GHC Commits: 0b49ac1d by Matthew Pickering at 2024-11-05T17:37:19+00:00 trace - - - - - b272697d by Matthew Pickering at 2024-11-05T17:41:50+00:00 fix order - - - - - 2 changed files: - compiler/GHC/Driver/Make.hs - compiler/GHC/Tc/Solver/Monad.hs Changes: ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -1600,7 +1600,6 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro = do let root_map = mkRootMap rootSummariesOk checkDuplicates root_map - pprTraceM "roots" (ppr root_map) (deps, map0) <- loopSummaries (zip (repeat zeroStage) rootSummariesOk) (M.empty, root_map) let closure_errs = checkHomeUnitsClosed unit_env unit_env = hsc_unit_env hsc_env ===================================== compiler/GHC/Tc/Solver/Monad.hs ===================================== @@ -1437,14 +1437,14 @@ checkWellStagedDFun loc what pred checkCrossStageClass :: DynFlags -> StageCheckReason -> Set.Set ThLevel -> ThLevel -> Bool -> TcM () checkCrossStageClass dflags reason bind_lvl use_lvl is_local - | use_lvl `Set.member` bind_lvl = return () - -- With path CSP, using later than bound is fine - | xopt LangExt.PathCrossStagedPersistence dflags - , any (use_lvl >=) bind_lvl = return () -- If the Id is imported, ie global, then allow with PathCrossStagedPersist | not is_local , xopt LangExt.PathCrossStagedPersistence dflags = return () + | use_lvl `Set.member` bind_lvl = return () + -- With path CSP, using later than bound is fine + | xopt LangExt.PathCrossStagedPersistence dflags + , any (use_lvl >=) bind_lvl = return () | otherwise = TcM.failWithTc (TcRnBadlyStaged reason bind_lvl use_lvl) @@ -1458,8 +1458,6 @@ checkWellStagedInstanceWhat what cur_mod <- extractModule <$> getGblEnv hsc_env <- getTopEnv let tg = mkTransDepsZero (hsc_units hsc_env) (mgModSummaries' (hsc_mod_graph hsc_env)) - pprTraceM "tg" (ppr tg) - pprTraceM "tg" (ppr $ mgModSummaries' (hsc_mod_graph hsc_env)) let lkup s = Set.map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id) $ flip (Map.!) (Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)) tg let splice_lvl = lkup SpliceStage normal_lvl = lkup NormalStage @@ -1473,7 +1471,6 @@ checkWellStagedInstanceWhat what let lvls = [ 0 | instance_key `Set.member` splice_lvl] ++ [ 1 | instance_key `Set.member` normal_lvl ] ++ [ 2 | instance_key `Set.member` quote_lvl ] - pprTraceM "lvls" (ppr dfun_id $$ ppr splice_lvl $$ ppr normal_lvl $$ ppr quote_lvl) if isLocalId dfun_id then return $ Just ( (Set.singleton outerLevel, True) ) else return $ Just ( Set.fromList lvls, False ) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/48c4e78bd382f53846a30daa7d3f2ab1dbf17d55...b272697dbaae57edd7c770d39bc5325dbb7a04ba -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/48c4e78bd382f53846a30daa7d3f2ab1dbf17d55...b272697dbaae57edd7c770d39bc5325dbb7a04ba You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 20:25:26 2024 From: gitlab at gitlab.haskell.org (Apoorv Ingle (@ani)) Date: Tue, 05 Nov 2024 15:25:26 -0500 Subject: [Git][ghc/ghc][wip/spj-apporv-Oct24] some more progress in error messages Message-ID: <672a7f3685270_27666114e90c2845@gitlab.mail> Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: ced016ea by Apoorv Ingle at 2024-11-05T14:24:37-06:00 some more progress in error messages - - - - - 3 changed files: - compiler/GHC/Tc/Gen/Do.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Head.hs Changes: ===================================== compiler/GHC/Tc/Gen/Do.hs ===================================== @@ -73,13 +73,13 @@ expand_do_stmts _ (stmt@(L _ (ParStmt {})):_) = expand_do_stmts _ [] = pprPanic "expand_do_stmts: impossible happened. Empty stmts" empty -expand_do_stmts flav [stmt@(L _ (LastStmt _ (L body_loc body) _ ret_expr))] +expand_do_stmts flav [stmt@(L loc (LastStmt _ (L body_loc body) _ ret_expr))] -- See Note [Expanding HsDo with XXExprGhcRn] Equation (5) below -- last statement of a list comprehension, needs to explicitly return it -- See `checkLastStmt` and `Syntax.Expr.StmtLR.LastStmt` | NoSyntaxExprRn <- ret_expr -- Last statement is just body if we are not in ListComp context. See Syntax.Expr.LastStmt - = return $ mkExpandedStmtAt stmt flav body + = return $ mkExpandedStmtAt loc stmt flav body | SyntaxExprRn ret <- ret_expr -- @@ -87,16 +87,16 @@ expand_do_stmts flav [stmt@(L _ (LastStmt _ (L body_loc body) _ ret_expr))] -- return e ~~> return e -- to make T18324 work = do let expansion = genHsApp ret (L body_loc body) - return $ mkExpandedStmtAt stmt flav expansion + return $ mkExpandedStmtAt body_loc stmt flav expansion -expand_do_stmts doFlavour (stmt@(L _loc (LetStmt _ bs)) : lstmts) = +expand_do_stmts doFlavour (stmt@(L _ (LetStmt _ bs)) : lstmts) = -- See Note [Expanding HsDo with XXExprGhcRn] Equation (3) below -- stmts ~~> stmts' -- ------------------------------------------------ -- let x = e ; stmts ~~> let x = e in stmts'xo do expand_stmts <- expand_do_stmts doFlavour lstmts let expansion = genHsLet bs (genPopErrCtxtExpr expand_stmts) - return $ mkExpandedStmtAt stmt doFlavour expansion + return $ mkExpandedStmtAt (noAnnSrcSpan generatedSrcSpan) stmt doFlavour expansion expand_do_stmts doFlavour (stmt@(L _loc (BindStmt xbsrn pat e)): lstmts) | SyntaxExprRn bind_op <- xbsrn_bindOp xbsrn @@ -112,7 +112,7 @@ expand_do_stmts doFlavour (stmt@(L _loc (BindStmt xbsrn pat e)): lstmts) let expansion = genHsExpApps bind_op -- (>>=) [ e , failable_expr ] - return $ mkExpandedStmtAt stmt doFlavour expansion + return $ mkExpandedStmtAt (noAnnSrcSpan generatedSrcSpan) stmt doFlavour expansion | otherwise = pprPanic "expand_do_stmts: The impossible happened, missing bind operator from renamer" (text "stmt" <+> ppr stmt) @@ -127,7 +127,7 @@ expand_do_stmts doFlavour (stmt@(L _loc (BodyStmt _ e (SyntaxExprRn then_op) _)) let expansion = genHsExpApps then_op -- (>>) [ e , genPopErrCtxtExpr expand_stmts_expr ] - return $ mkExpandedStmtAt stmt doFlavour expansion + return $ mkExpandedStmtAt (noAnnSrcSpan generatedSrcSpan) stmt doFlavour expansion expand_do_stmts doFlavour ((L loc (RecStmt { recS_stmts = L stmts_loc rec_stmts @@ -216,7 +216,7 @@ expand_do_stmts doFlavour ((L _ (XStmtLR (ApplicativeStmt _ args mb_join))): lst { xarg_app_arg_one = mb_fail_op , app_arg_pattern = pat , arg_expr = (L rhs_loc rhs) }) = - do let xx_expr = mkExpandedStmtAt stmt doFlavour rhs + do let xx_expr = mkExpandedStmtAt rhs_loc stmt doFlavour rhs traceTc "do_arg" (text "OneArg" <+> vcat [ppr pat, ppr xx_expr]) return ((pat, mb_fail_op) , xx_expr) @@ -243,19 +243,19 @@ expand_do_stmts _ stmts = pprPanic "expand_do_stmts: impossible happened" $ (ppr -- checks the pattern `pat` for irrefutability which decides if we need to wrap it with a fail block mk_failable_expr :: HsDoFlavour -> LPat GhcRn -> LHsExpr GhcRn -> FailOperator GhcRn -> TcM (LHsExpr GhcRn) -mk_failable_expr doFlav lpat@(L loc pat) expr@(L _exprloc _) fail_op = +mk_failable_expr doFlav lpat expr@(L _exprloc _) fail_op = do { is_strict <- xoptM LangExt.Strict ; hscEnv <- getTopEnv ; rdrEnv <- getGlobalRdrEnv ; comps <- getCompleteMatchesTcM ; let irrf_pat = isIrrefutableHsPat is_strict (irrefutableConLikeRn hscEnv rdrEnv comps) lpat - ; traceTc "mk_failable_expr" (vcat [ text "pat:" <+> ppr pat + ; traceTc "mk_failable_expr" (vcat [ text "pat:" <+> ppr lpat , text "isIrrefutable:" <+> ppr irrf_pat ]) ; if irrf_pat -- don't wrap with fail block if -- the pattern is irrefutable then return $ genHsLamDoExp doFlav [lpat] expr - else L loc <$> mk_fail_block doFlav lpat expr fail_op + else wrapGenSpan <$> mk_fail_block doFlav lpat expr fail_op } -- makes the fail block with a given fail_op @@ -571,9 +571,10 @@ genPopErrCtxtExpr a = wrapGenSpan $ mkPopErrCtxtExpr a -- and the two components of the expansion: original do stmt and -- expanded expression and associate it with a provided location mkExpandedStmtAt - :: ExprLStmt GhcRn -- ^ source statement + :: SrcSpanAnnA + -> ExprLStmt GhcRn -- ^ source statement -> HsDoFlavour -- ^ the flavour of the statement -> HsExpr GhcRn -- ^ expanded expression -> LHsExpr GhcRn -- ^ suitably wrapped located 'XXExprGhcRn' -mkExpandedStmtAt oStmt flav eExpr - = wrapGenSpan $ mkExpandedStmt oStmt flav eExpr +mkExpandedStmtAt loc oStmt flav eExpr + = L loc $ mkExpandedStmt oStmt flav eExpr ===================================== compiler/GHC/Tc/Gen/Expr.hs ===================================== @@ -714,9 +714,9 @@ tcXExpr (PopErrCtxt (L loc e)) res_ty setSrcSpanA loc $ tcExpr e res_ty -tcXExpr (ExpandedThingRn o e) res_ty +tcXExpr (ExpandedThingRn o@(OrigStmt stmt flav) e) res_ty = addThingCtxt o $ - tcExpr e res_ty + mkExpandedStmtTc stmt flav <$> tcExpr e res_ty {- tcXExpr xe@(ExpandedThingRn o e') res_ty | OrigStmt ls@(L loc s) flav <- o ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -1255,8 +1255,12 @@ mis-match in the number of value arguments. ********************************************************************* -} addThingCtxt :: HsThingRn -> TcRn a -> TcRn a -addThingCtxt (OrigExpr e) thing_inside = addExprCtxt e thing_inside -addThingCtxt (OrigStmt (L loc stmt) flav) thing_inside = setSrcSpanA loc $ addStmtCtxt stmt flav $ setInGeneratedCode $ thing_inside +-- addThingCtxt (OrigExpr e) thing_inside = addExprCtxt e thing_inside +addThingCtxt (OrigStmt (L loc stmt) flav) thing_inside = do + gen <- inGeneratedCode + if gen + then setSrcSpanA loc $ addStmtCtxt stmt flav $ setInGeneratedCode $ thing_inside + else addStmtCtxt stmt flav $ thing_inside addThingCtxt _ thing_inside = thing_inside addStmtCtxt :: ExprStmt GhcRn -> HsDoFlavour -> TcRn a -> TcRn a @@ -1274,8 +1278,6 @@ addExprCtxt :: HsExpr GhcRn -> TcRn a -> TcRn a addExprCtxt e thing_inside = case e of HsUnboundVar {} -> thing_inside - XExpr (PopErrCtxt (L loc e)) -> setSrcSpanA loc $ addExprCtxt e $ thing_inside - XExpr (ExpandedThingRn (OrigStmt stmt flav) _) -> addStmtCtxt (unLoc stmt) flav thing_inside _ -> addErrCtxt (exprCtxt e) thing_inside -- The HsUnboundVar special case addresses situations like -- f x = _ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ced016ea7c3501372389dbe52abd7475853d1b62 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ced016ea7c3501372389dbe52abd7475853d1b62 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 22:37:18 2024 From: gitlab at gitlab.haskell.org (Alan Zimmerman (@alanz)) Date: Tue, 05 Nov 2024 17:37:18 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/az/ghc-9.12-epa-backports Message-ID: <672a9e1e14853_276661858d8836264@gitlab.mail> Alan Zimmerman pushed new branch wip/az/ghc-9.12-epa-backports at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/az/ghc-9.12-epa-backports You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 5 23:12:49 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 05 Nov 2024 18:12:49 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: ghc-heap: Fix incomplete selector warnings. Message-ID: <672aa6718fa12_124f5d19236452968@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - d2cbabf6 by Mike Pilgrem at 2024-11-05T18:12:33-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 4343a639 by Zubin Duggal at 2024-11-05T18:12:33-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - 2bc736dc by Zubin Duggal at 2024-11-05T18:12:33-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 11 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Runtime/Heap/Inspect.hs - docs/users_guide/9.14.1-notes.rst - libraries/base/changelog.md - libraries/base/src/Data/List/NonEmpty.hs - libraries/ghc-heap/GHC/Exts/Heap.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs Changes: ===================================== .gitlab/rel_eng/recompress-all ===================================== @@ -24,7 +24,7 @@ usage : tmp="$$(mktemp -d tmp.XXX)" && \ tar -C "$$tmp" -xf $< && \ cd "$$tmp" && \ - zip -9 -r $@ * && \ + zip -9 -r ../$@ * && \ cd .. && \ rm -R "$$tmp" ===================================== .gitlab/rel_eng/upload.sh ===================================== @@ -78,6 +78,7 @@ function hash_files() { echo $(find -maxdepth 1 \ -iname '*.xz' \ -o -iname '*.lz' \ + -o -iname '*.gz' \ -o -iname '*.bz2' \ -o -iname '*.zip' \ ) ===================================== compiler/GHC/CmmToAsm/PPC/CodeGen.hs ===================================== @@ -398,7 +398,7 @@ iselExpr64 expr platform <- getPlatform pprPanic "iselExpr64(powerpc)" (pdoc platform expr) - +data MinOrMax = Min | Max getRegister :: CmmExpr -> NatM Register getRegister e = do config <- getConfig @@ -589,8 +589,9 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps MO_F_Sub w -> triv_float w FSUB MO_F_Mul w -> triv_float w FMUL MO_F_Quot w -> triv_float w FDIV - MO_F_Min w -> triv_float w FMIN - MO_F_Max w -> triv_float w FMAX + + MO_F_Min w -> minmax_float Min w x y + MO_F_Max w -> minmax_float Max w x y -- optimize addition with 32-bit immediate -- (needed for PIC) @@ -696,6 +697,31 @@ getRegister' _ _ (CmmMachOp mop [x, y]) -- dyadic PrimOps code <- remainderCode rep sgn tmp x y return (Any fmt code) + minmax_float :: MinOrMax -> Width -> CmmExpr -> CmmExpr -> NatM Register + minmax_float m w x y = + do + (src1, src1Code) <- getSomeReg x + (src2, src2Code) <- getSomeReg y + l1 <- getBlockIdNat + l2 <- getBlockIdNat + end <- getBlockIdNat + let cond = case m of + Min -> LTT + Max -> GTT + let code dst = src1Code `appOL` src2Code `appOL` + toOL [ FCMP src1 src2 + , BCC cond l1 Nothing + , BCC ALWAYS l2 Nothing + , NEWBLOCK l2 + , MR dst src2 + , BCC ALWAYS end Nothing + , NEWBLOCK l1 + , MR dst src1 + , BCC ALWAYS end Nothing + , NEWBLOCK end + ] + return (Any (floatFormat w) code) + getRegister' _ _ (CmmMachOp mop [x, y, z]) -- ternary PrimOps = case mop of ===================================== compiler/GHC/CmmToAsm/PPC/Instr.hs ===================================== @@ -277,8 +277,6 @@ data Instr | FDIV Format Reg Reg Reg | FABS Reg Reg -- abs is the same for single and double | FNEG Reg Reg -- negate is the same for single and double prec. - | FMIN Format Reg Reg Reg - | FMAX Format Reg Reg Reg -- | Fused multiply-add instructions. -- ===================================== compiler/GHC/CmmToAsm/PPC/Ppr.hs ===================================== @@ -941,12 +941,6 @@ pprInstr platform instr = case instr of FNEG reg1 reg2 -> pprUnary (text "fneg") reg1 reg2 - FMIN fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmin") fmt reg1 reg2 reg3 - - FMAX fmt reg1 reg2 reg3 - -> pprBinaryF (text "fmax") fmt reg1 reg2 reg3 - FMADD signs fmt dst ra rc rb -> pprTernaryF (pprFMASign signs) fmt dst ra rc rb ===================================== compiler/GHC/Runtime/Heap/Inspect.hs ===================================== @@ -128,6 +128,11 @@ isFullyEvaluatedTerm NewtypeWrap{wrapped_term=t} = isFullyEvaluatedTerm t isFullyEvaluatedTerm RefWrap{wrapped_term=t} = isFullyEvaluatedTerm t isFullyEvaluatedTerm _ = False +-- | Gives an error if the term doesn't have subterms +expectSubTerms :: Term -> [Term] +expectSubTerms (Term { subTerms = subTerms} ) = subTerms +expectSubTerms _ = panic "expectSubTerms" + instance Outputable (Term) where ppr t | Just doc <- cPprTerm cPprTermBase t = doc | otherwise = panic "Outputable Term instance" @@ -332,8 +337,8 @@ cPprTermBase :: forall m. Monad m => CustomTermPrinter m cPprTermBase y = [ ifTerm (isTupleTy.ty) (\_p -> liftM (parens . hcat . punctuate comma) . mapM (y (-1)) - . subTerms) - , ifTerm (\t -> isTyCon listTyCon (ty t) && subTerms t `lengthIs` 2) + . expectSubTerms) + , ifTerm (\t -> isTyCon listTyCon (ty t) && expectSubTerms t `lengthIs` 2) ppr_list , ifTerm' (isTyCon intTyCon . ty) ppr_int , ifTerm' (isTyCon charTyCon . ty) ppr_char @@ -768,7 +773,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do traceTR (text "Gave up reconstructing a term after" <> int max_depth <> text " steps") clos <- trIO $ GHCi.getClosure interp a - return (Suspension (tipe (info clos)) my_ty a Nothing) + return (Suspension (tipe (getClosureInfoTbl clos)) my_ty a Nothing) go !max_depth my_ty old_ty a = do let monomorphic = not(isTyVarTy my_ty) -- This ^^^ is a convention. The ancestor tests for @@ -864,7 +869,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do _ -> do traceTR (text "Unknown closure:" <+> text (show (fmap (const ()) clos))) - return (Suspension (tipe (info clos)) my_ty a Nothing) + return (Suspension (tipe (getClosureInfoTbl clos)) my_ty a Nothing) -- insert NewtypeWraps around newtypes expandNewtypes = foldTerm idTermFold { fTerm = worker } where @@ -918,7 +923,7 @@ extractSubTerms recurse clos = liftM thdOf3 . go 0 0 go_rep ptr_i arr_i ty rep | isGcPtrRep rep = do - t <- recurse ty $ (ptrArgs clos)!!ptr_i + t <- recurse ty $ (getClosurePtrArgs clos)!!ptr_i return (ptr_i + 1, arr_i, t) | otherwise = do -- This is a bit involved since we allow packing multiple fields ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -50,6 +50,11 @@ Cmm ``ghc-heap`` library ~~~~~~~~~~~~~~~~~~~~ +* The functions `getClosureInfoTbl_maybe`, `getClosureInfoTbl`, + `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow + reading of the relevant Closure attributes without reliance on incomplete + selectors. + ``ghc-experimental`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== libraries/base/changelog.md ===================================== @@ -4,6 +4,7 @@ * Restrict `Data.List.NonEmpty.unzip` to `NonEmpty (a, b) -> (NonEmpty a, NonEmpty b)`. ([CLC proposal #86](https://github.com/haskell/core-libraries-committee/issues/86)) * Modify the implementation of `Control.Exception.throw` to avoid call-sites being inferred as diverging via precise exception. ([GHC #25066](https://gitlab.haskell.org/ghc/ghc/-/issues/25066), [CLC proposal #290](https://github.com/haskell/core-libraries-committee/issues/290)) + * `Data.List.NonEmpty.{init,last,tails1}` are now defined using only total functions (rather than partial ones). ([CLC proposal #293](https://github.com/haskell/core-libraries-committee/issues/293)) ## 4.21.0.0 *TBA* * `GHC.Desugar` has been deprecated and should be removed in GHC 9.14. ([CLC proposal #216](https://github.com/haskell/core-libraries-committee/issues/216)) ===================================== libraries/base/src/Data/List/NonEmpty.hs ===================================== @@ -206,11 +206,13 @@ tail (_ :| as) = as -- | Extract the last element of the stream. last :: NonEmpty a -> a -last ~(a :| as) = List.last (a : as) +last (a :| []) = a +last (_ :| (a : as)) = last (a :| as) -- | Extract everything except the last element of the stream. init :: NonEmpty a -> [a] -init ~(a :| as) = List.init (a : as) +init (_ :| []) = [] +init (a1 :| (a2 : as)) = a1 : init (a2 :| as) -- | Construct a 'NonEmpty' list from a single element. -- @@ -324,7 +326,7 @@ tails = fromList . List.tails . Foldable.toList -- -- @since 4.18 tails1 :: NonEmpty a -> NonEmpty (NonEmpty a) -tails1 = fromList . List.tails1 . Foldable.toList +tails1 xs = xs :| List.tails1 (tail xs) -- | @'insert' x xs@ inserts @x@ into the last position in @xs@ where it -- is still less than or equal to the next element. In particular, if the ===================================== libraries/ghc-heap/GHC/Exts/Heap.hs ===================================== @@ -29,6 +29,10 @@ module GHC.Exts.Heap ( , WhyBlocked(..) , TsoFlags(..) , HasHeapRep(getClosureData) + , getClosureInfoTbl + , getClosureInfoTbl_maybe + , getClosurePtrArgs + , getClosurePtrArgs_maybe , getClosureDataFromHeapRep , getClosureDataFromHeapRepPrim ===================================== libraries/ghc-heap/GHC/Exts/Heap/Closures.hs ===================================== @@ -8,12 +8,18 @@ {-# LANGUAGE DeriveTraversable #-} -- Late cost centres introduce a thunk in the asBox function, which leads to -- an additional wrapper being added to any value placed inside a box. +-- This can be removed once our boot compiler is no longer affected by #25212 {-# OPTIONS_GHC -fno-prof-late #-} +{-# LANGUAGE NamedFieldPuns #-} module GHC.Exts.Heap.Closures ( -- * Closures Closure , GenClosure(..) + , getClosureInfoTbl + , getClosureInfoTbl_maybe + , getClosurePtrArgs + , getClosurePtrArgs_maybe , PrimType(..) , WhatNext(..) , WhyBlocked(..) @@ -67,6 +73,7 @@ import Data.Word import GHC.Exts import GHC.Generics import Numeric +import GHC.Stack (HasCallStack) ------------------------------------------------------------------------ -- Boxes @@ -382,6 +389,104 @@ data GenClosure b { wordVal :: !Word } deriving (Show, Generic, Functor, Foldable, Traversable) +-- | Get the info table for a heap closure, or Nothing for a prim value +-- +-- @since 9.14.1 +getClosureInfoTbl_maybe :: GenClosure b -> Maybe StgInfoTable +{-# INLINE getClosureInfoTbl_maybe #-} -- Ensure we can get rid of the just box +getClosureInfoTbl_maybe closure = case closure of + ConstrClosure{info} ->Just info + FunClosure{info} ->Just info + ThunkClosure{info} ->Just info + SelectorClosure{info} ->Just info + PAPClosure{info} ->Just info + APClosure{info} ->Just info + APStackClosure{info} ->Just info + IndClosure{info} ->Just info + BCOClosure{info} ->Just info + BlackholeClosure{info} ->Just info + ArrWordsClosure{info} ->Just info + MutArrClosure{info} ->Just info + SmallMutArrClosure{info} ->Just info + MVarClosure{info} ->Just info + IOPortClosure{info} ->Just info + MutVarClosure{info} ->Just info + BlockingQueueClosure{info} ->Just info + WeakClosure{info} ->Just info + TSOClosure{info} ->Just info + StackClosure{info} ->Just info + + IntClosure{} -> Nothing + WordClosure{} -> Nothing + Int64Closure{} -> Nothing + Word64Closure{} -> Nothing + AddrClosure{} -> Nothing + FloatClosure{} -> Nothing + DoubleClosure{} -> Nothing + + OtherClosure{info} -> Just info + UnsupportedClosure {info} -> Just info + + UnknownTypeWordSizedPrimitive{} -> Nothing + +-- | Partial version of getClosureInfoTbl_maybe for when we know we deal with a +-- heap closure. +-- +-- @since 9.14.1 +getClosureInfoTbl :: HasCallStack => GenClosure b -> StgInfoTable +getClosureInfoTbl closure = case getClosureInfoTbl_maybe closure of + Just info -> info + Nothing -> error "getClosureInfoTbl - Closure without info table" + +-- | Get the info table for a heap closure, or Nothing for a prim value +-- +-- @since 9.14.1 +getClosurePtrArgs_maybe :: GenClosure b -> Maybe [b] +{-# INLINE getClosurePtrArgs_maybe #-} -- Ensure we can get rid of the just box +getClosurePtrArgs_maybe closure = case closure of + ConstrClosure{ptrArgs} -> Just ptrArgs + FunClosure{ptrArgs} -> Just ptrArgs + ThunkClosure{ptrArgs} -> Just ptrArgs + SelectorClosure{} -> Nothing + PAPClosure{} -> Nothing + APClosure{} -> Nothing + APStackClosure{} -> Nothing + IndClosure{} -> Nothing + BCOClosure{} -> Nothing + BlackholeClosure{} -> Nothing + ArrWordsClosure{} -> Nothing + MutArrClosure{} -> Nothing + SmallMutArrClosure{} -> Nothing + MVarClosure{} -> Nothing + IOPortClosure{} -> Nothing + MutVarClosure{} -> Nothing + BlockingQueueClosure{} -> Nothing + WeakClosure{} -> Nothing + TSOClosure{} -> Nothing + StackClosure{} -> Nothing + + IntClosure{} -> Nothing + WordClosure{} -> Nothing + Int64Closure{} -> Nothing + Word64Closure{} -> Nothing + AddrClosure{} -> Nothing + FloatClosure{} -> Nothing + DoubleClosure{} -> Nothing + + OtherClosure{} -> Nothing + UnsupportedClosure{} -> Nothing + + UnknownTypeWordSizedPrimitive{} -> Nothing + +-- | Partial version of getClosureInfoTbl_maybe for when we know we deal with a +-- heap closure. +-- +-- @since 9.14.1 +getClosurePtrArgs :: HasCallStack => GenClosure b -> [b] +getClosurePtrArgs closure = case getClosurePtrArgs_maybe closure of + Just ptrs -> ptrs + Nothing -> error "getClosurePtrArgs - Closure without ptrArgs field" + type StgStackClosure = GenStgStackClosure Box -- | A decoded @StgStack@ with `StackFrame`s View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ac45790be4af2182b74f499bb00bb282f4695693...2bc736dc0f8ba235ea8ce5ec148b8a73bed3d394 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ac45790be4af2182b74f499bb00bb282f4695693...2bc736dc0f8ba235ea8ce5ec148b8a73bed3d394 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 6 10:14:32 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Wed, 06 Nov 2024 05:14:32 -0500 Subject: [Git][ghc/ghc][wip/splice-imports-2024] 2 commits: fixes Message-ID: <672b41889a55_2e5b067d3b38115574@gitlab.mail> Matthew Pickering pushed to branch wip/splice-imports-2024 at Glasgow Haskell Compiler / GHC Commits: 7f295b31 by Matthew Pickering at 2024-11-06T10:04:28+00:00 fixes - - - - - 33a7564e by Matthew Pickering at 2024-11-06T10:14:18+00:00 test output - - - - - 5 changed files: - compiler/GHC/Driver/Make.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Unit/Module/Graph.hs - docs/users_guide/exts/template_haskell.rst - testsuite/tests/th/T16976z.stderr Changes: ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -1673,7 +1673,7 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro (final_deps, uids, done', summarised') <- loopImports (calcDeps lvl ms) done summarised -- This has the effect of finding a .hs file if we are looking at the .hs-boot file. (_, _, done'', summarised'') <- loopImports (maybeToList hs_file_for_boot) done' summarised' - loopSummaries (maybeToList zero ++ next) (M.insert k (ModuleNode final_deps uids lvl ms) done'', summarised'') + loopSummaries (maybeToList zero ++ next) (M.insert k (ModuleNode final_deps (ordNub uids) lvl ms) done'', summarised'') where k = NodeKey_Module (msKey lvl ms) ===================================== compiler/GHC/Tc/Solver/Monad.hs ===================================== @@ -214,10 +214,11 @@ import GHC.Data.Graph.Directed #endif import qualified Data.Set as Set -import qualified Data.Map as Map import GHC.Unit.Module.Graph import Data.Bifunctor (bimap) +import GHC.Data.Graph.Directed +import GHC.Data.Maybe {- ********************************************************************* * * @@ -1457,8 +1458,11 @@ checkWellStagedInstanceWhat what = do cur_mod <- extractModule <$> getGblEnv hsc_env <- getTopEnv - let tg = mkTransDepsZero (hsc_units hsc_env) (mgModSummaries' (hsc_mod_graph hsc_env)) - let lkup s = Set.map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id) $ flip (Map.!) (Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)) tg + let (mg, lookup_node) = moduleGraphNodesZero (hsc_units hsc_env) (mgModSummaries' $ hsc_mod_graph hsc_env) + + let lkup :: ImportStage -> Set.Set (Either Module UnitId) + lkup s = Set.fromList $ map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id . node_payload) $ reachablesG2 mg (map (expectJust "needs_th" . lookup_node) [Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)]) +-- let lkup s = Set.map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id) $ flip (Map.!) (Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)) tg let splice_lvl = lkup SpliceStage normal_lvl = lkup NormalStage quote_lvl = lkup QuoteStage @@ -1467,7 +1471,6 @@ checkWellStagedInstanceWhat what instance_key = if moduleUnitId name_module `Set.member` hsc_all_home_unit_ids hsc_env then Left name_module else Right (moduleUnitId name_module) - let lvls = [ 0 | instance_key `Set.member` splice_lvl] ++ [ 1 | instance_key `Set.member` normal_lvl ] ++ [ 2 | instance_key `Set.member` quote_lvl ] ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -122,7 +122,7 @@ moduleGraphNodeUnitId mgn = instance Outputable ModuleGraphNode where ppr = \case InstantiationNode _ iuid -> ppr iuid - ModuleNode nks _ lvl ms -> ppr (msKey lvl ms) <+> ppr nks + ModuleNode nks uids lvl ms -> ppr (msKey lvl ms) <+> ppr nks <+> ppr uids LinkNode uid _ -> text "LN:" <+> ppr uid instance Eq ModuleGraphNode where @@ -475,7 +475,7 @@ moduleGraphNodesZero :: UnitState -> [ModuleGraphNode] -> (Graph ZeroSummaryNode, Either (ModNodeKeyWithUid, ImportStage) UnitId -> Maybe ZeroSummaryNode) -moduleGraphNodesZero us summaries = pprTrace "mg_zero" (ppr summaries) +moduleGraphNodesZero us summaries = (graphFromEdgedVerticesUniq nodes, lookup_node) where -- Map from module to extra boot summary dependencies which need to be merged in @@ -494,7 +494,7 @@ moduleGraphNodesZero us summaries = pprTrace "mg_zero" (ppr summaries) Just $ DigraphNode (Right u) key (mapMaybe lookup_key $ map Right us) normal_case _ = Nothing - only_module_deps ds = pprTraceIt "only_module" [ k | NodeKey_Module k <- ds ] + only_module_deps ds = [ k | NodeKey_Module k <- ds ] jimmy_lvl l s = case s of NormalStage -> l @@ -511,7 +511,7 @@ moduleGraphNodesZero us summaries = pprTrace "mg_zero" (ppr summaries) go cache [] = cache go cache (u:uxs) = case Map.lookup u cache of - Just {} -> cache + Just {} -> go cache uxs Nothing -> case unitDepends <$> lookupUnitId us u of Just us -> go (go (Map.insert u us cache) us) uxs Nothing -> panic "bad" ===================================== docs/users_guide/exts/template_haskell.rst ===================================== @@ -469,6 +469,27 @@ splices and quotations are supported.) was not written by the user. If you want to have warnings for splices anyway, pass :ghc-flag:`-fenable-th-splice-warnings`. +.. extension:: ExplicitStageImports + :shortdesc: TODO + + :since: 8.0.1 + + Enable Template Haskell's quotation syntax. + +.. extension:: PathCSP + :shortdesc: TODO + + :since: 8.0.1 + + Enable Template Haskell's quotation syntax. + +.. extension:: LiftCSP + :shortdesc: TODO + + :since: 8.0.1 + + TODO + .. _th-usage: Using Template Haskell ===================================== testsuite/tests/th/T16976z.stderr ===================================== @@ -1,5 +1,5 @@ - -T16976z.hs:7:20: error: [GHC-57695] - • Stage error: the non-top-level quoted name 'str - must be used at the same stage at which it is bound. +T16976z.hs:7:20: error: [GHC-28914] + • Stage error: ‘str’ is bound at stage {0} but used at stage 1 + Hint: quoting [| str |] or an enclosing expression would allow the quotation to be used in an earlier stage • In the Template Haskell quotation 'str + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b272697dbaae57edd7c770d39bc5325dbb7a04ba...33a7564e4c95c47f02ceac245d5da76b93be9899 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b272697dbaae57edd7c770d39bc5325dbb7a04ba...33a7564e4c95c47f02ceac245d5da76b93be9899 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 6 10:49:57 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Wed, 06 Nov 2024 05:49:57 -0500 Subject: [Git][ghc/ghc][wip/splice-imports-2024] Remove traces Message-ID: <672b49d540add_2e5b06a5715c1279cf@gitlab.mail> Matthew Pickering pushed to branch wip/splice-imports-2024 at Glasgow Haskell Compiler / GHC Commits: ce8950bc by Matthew Pickering at 2024-11-06T10:49:40+00:00 Remove traces - - - - - 1 changed file: - compiler/GHC/Driver/Make.hs Changes: ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -2033,10 +2033,10 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph (mg, lookup_node) = moduleGraphNodesZero unit_state mod_graph - mk_needed_set roots = Set.fromList $ map fst $ pprTraceIt "mk_needed_set" $ lefts $ map node_payload $ reachablesG2 mg (map (expectJust "needs_th" . lookup_node) (map Left roots)) + mk_needed_set roots = Set.fromList $ map fst $ lefts $ map node_payload $ reachablesG2 mg (map (expectJust "needs_th" . lookup_node) (map Left roots)) needs_obj_set, needs_bc_set :: Set.Set ModNodeKeyWithUid - needs_obj_set = pprTraceIt "res_needs_obj_set" $ mk_needed_set (pprTraceIt "needs_obj_set" need_obj_set) + needs_obj_set = mk_needed_set need_obj_set needs_bc_set = mk_needed_set need_bc_set View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ce8950bc98b5bcde029664c503a55deeec3abe01 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ce8950bc98b5bcde029664c503a55deeec3abe01 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 6 13:32:51 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Wed, 06 Nov 2024 08:32:51 -0500 Subject: [Git][ghc/ghc][wip/T18462] 9 commits: ghc-internal: strict, unboxed src loc ranges Message-ID: <672b700390ffc_2e5b0612b5448153142@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 72c99c44 by Sjoerd Visscher at 2024-11-06T14:32:44+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Make.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/GHC/Tc/Types/EvTerm.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8b8be922fadbd4b5a6a7104bf99d98664deb7338...72c99c44ad3caa9ab8128b35f933f610c7bbaee0 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8b8be922fadbd4b5a6a7104bf99d98664deb7338...72c99c44ad3caa9ab8128b35f933f610c7bbaee0 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 6 13:46:00 2024 From: gitlab at gitlab.haskell.org (sheaf (@sheaf)) Date: Wed, 06 Nov 2024 08:46:00 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/check-exact-multi Message-ID: <672b7318a2b40_2e5b0613be22c156562@gitlab.mail> sheaf pushed new branch wip/check-exact-multi at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/check-exact-multi You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 6 22:16:07 2024 From: gitlab at gitlab.haskell.org (Alan Zimmerman (@alanz)) Date: Wed, 06 Nov 2024 17:16:07 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/az/T25454-wildcard-type-binders Message-ID: <672beaa75e5f4_3c85d0e04ac345ed@gitlab.mail> Alan Zimmerman pushed new branch wip/az/T25454-wildcard-type-binders at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/az/T25454-wildcard-type-binders You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 6 23:44:13 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 06 Nov 2024 18:44:13 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial Message-ID: <672bff4d2d197_3c85d04ec08c58961@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 39e13db8 by Mike Pilgrem at 2024-11-06T18:43:56-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 311e846b by Zubin Duggal at 2024-11-06T18:43:56-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - 32e8469e by Zubin Duggal at 2024-11-06T18:43:56-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 954a56d0 by Hécate Kleidukos at 2024-11-06T18:44:02-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - 5 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - hadrian/ghci-multi-cabal.in - libraries/base/changelog.md - libraries/base/src/Data/List/NonEmpty.hs Changes: ===================================== .gitlab/rel_eng/recompress-all ===================================== @@ -24,7 +24,7 @@ usage : tmp="$$(mktemp -d tmp.XXX)" && \ tar -C "$$tmp" -xf $< && \ cd "$$tmp" && \ - zip -9 -r $@ * && \ + zip -9 -r ../$@ * && \ cd .. && \ rm -R "$$tmp" ===================================== .gitlab/rel_eng/upload.sh ===================================== @@ -78,6 +78,7 @@ function hash_files() { echo $(find -maxdepth 1 \ -iname '*.xz' \ -o -iname '*.lz' \ + -o -iname '*.gz' \ -o -iname '*.bz2' \ -o -iname '*.zip' \ ) ===================================== hadrian/ghci-multi-cabal.in ===================================== @@ -1,7 +1,7 @@ #!/usr/bin/env sh RUN_GHC=@WithGhc@ -if [[ $(printf "9.4.0\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.4.0" ]]; then echo "Multi-repl needs at least GHC-9.4.1"; exit 1; fi +if [[ $(printf "9.8.1\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.8.1" ]]; then echo "Multi-repl needs at least GHC-9.8.1"; exit 1; fi # This file is generated by configure from ghci-multi.in ===================================== libraries/base/changelog.md ===================================== @@ -4,6 +4,7 @@ * Restrict `Data.List.NonEmpty.unzip` to `NonEmpty (a, b) -> (NonEmpty a, NonEmpty b)`. ([CLC proposal #86](https://github.com/haskell/core-libraries-committee/issues/86)) * Modify the implementation of `Control.Exception.throw` to avoid call-sites being inferred as diverging via precise exception. ([GHC #25066](https://gitlab.haskell.org/ghc/ghc/-/issues/25066), [CLC proposal #290](https://github.com/haskell/core-libraries-committee/issues/290)) + * `Data.List.NonEmpty.{init,last,tails1}` are now defined using only total functions (rather than partial ones). ([CLC proposal #293](https://github.com/haskell/core-libraries-committee/issues/293)) ## 4.21.0.0 *TBA* * `GHC.Desugar` has been deprecated and should be removed in GHC 9.14. ([CLC proposal #216](https://github.com/haskell/core-libraries-committee/issues/216)) ===================================== libraries/base/src/Data/List/NonEmpty.hs ===================================== @@ -206,11 +206,13 @@ tail (_ :| as) = as -- | Extract the last element of the stream. last :: NonEmpty a -> a -last ~(a :| as) = List.last (a : as) +last (a :| []) = a +last (_ :| (a : as)) = last (a :| as) -- | Extract everything except the last element of the stream. init :: NonEmpty a -> [a] -init ~(a :| as) = List.init (a : as) +init (_ :| []) = [] +init (a1 :| (a2 : as)) = a1 : init (a2 :| as) -- | Construct a 'NonEmpty' list from a single element. -- @@ -324,7 +326,7 @@ tails = fromList . List.tails . Foldable.toList -- -- @since 4.18 tails1 :: NonEmpty a -> NonEmpty (NonEmpty a) -tails1 = fromList . List.tails1 . Foldable.toList +tails1 xs = xs :| List.tails1 (tail xs) -- | @'insert' x xs@ inserts @x@ into the last position in @xs@ where it -- is still less than or equal to the next element. In particular, if the View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2bc736dc0f8ba235ea8ce5ec148b8a73bed3d394...954a56d0358f69d02a968861c77594d0ffb0d9df -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2bc736dc0f8ba235ea8ce5ec148b8a73bed3d394...954a56d0358f69d02a968861c77594d0ffb0d9df You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 09:34:46 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 07 Nov 2024 04:34:46 -0500 Subject: [Git][ghc/ghc][master] Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial Message-ID: <672c89b628eb0_2672c7bc4309844c@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 2 changed files: - libraries/base/changelog.md - libraries/base/src/Data/List/NonEmpty.hs Changes: ===================================== libraries/base/changelog.md ===================================== @@ -4,6 +4,7 @@ * Restrict `Data.List.NonEmpty.unzip` to `NonEmpty (a, b) -> (NonEmpty a, NonEmpty b)`. ([CLC proposal #86](https://github.com/haskell/core-libraries-committee/issues/86)) * Modify the implementation of `Control.Exception.throw` to avoid call-sites being inferred as diverging via precise exception. ([GHC #25066](https://gitlab.haskell.org/ghc/ghc/-/issues/25066), [CLC proposal #290](https://github.com/haskell/core-libraries-committee/issues/290)) + * `Data.List.NonEmpty.{init,last,tails1}` are now defined using only total functions (rather than partial ones). ([CLC proposal #293](https://github.com/haskell/core-libraries-committee/issues/293)) ## 4.21.0.0 *TBA* * `GHC.Desugar` has been deprecated and should be removed in GHC 9.14. ([CLC proposal #216](https://github.com/haskell/core-libraries-committee/issues/216)) ===================================== libraries/base/src/Data/List/NonEmpty.hs ===================================== @@ -206,11 +206,13 @@ tail (_ :| as) = as -- | Extract the last element of the stream. last :: NonEmpty a -> a -last ~(a :| as) = List.last (a : as) +last (a :| []) = a +last (_ :| (a : as)) = last (a :| as) -- | Extract everything except the last element of the stream. init :: NonEmpty a -> [a] -init ~(a :| as) = List.init (a : as) +init (_ :| []) = [] +init (a1 :| (a2 : as)) = a1 : init (a2 :| as) -- | Construct a 'NonEmpty' list from a single element. -- @@ -324,7 +326,7 @@ tails = fromList . List.tails . Foldable.toList -- -- @since 4.18 tails1 :: NonEmpty a -> NonEmpty (NonEmpty a) -tails1 = fromList . List.tails1 . Foldable.toList +tails1 xs = xs :| List.tails1 (tail xs) -- | @'insert' x xs@ inserts @x@ into the last position in @xs@ where it -- is still less than or equal to the next element. In particular, if the View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8e217256520adc148ccb78e9c518c80cff92525f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8e217256520adc148ccb78e9c518c80cff92525f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 09:36:01 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 07 Nov 2024 04:36:01 -0500 Subject: [Git][ghc/ghc][master] 2 commits: release: copy zip files into the correct directory Message-ID: <672c8a01406be_2672c745045c10945a@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 2 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh Changes: ===================================== .gitlab/rel_eng/recompress-all ===================================== @@ -24,7 +24,7 @@ usage : tmp="$$(mktemp -d tmp.XXX)" && \ tar -C "$$tmp" -xf $< && \ cd "$$tmp" && \ - zip -9 -r $@ * && \ + zip -9 -r ../$@ * && \ cd .. && \ rm -R "$$tmp" ===================================== .gitlab/rel_eng/upload.sh ===================================== @@ -78,6 +78,7 @@ function hash_files() { echo $(find -maxdepth 1 \ -iname '*.xz' \ -o -iname '*.lz' \ + -o -iname '*.gz' \ -o -iname '*.bz2' \ -o -iname '*.zip' \ ) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8e217256520adc148ccb78e9c518c80cff92525f...bbdbe2254df1bfc9157cfb409afc93f8157712cd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8e217256520adc148ccb78e9c518c80cff92525f...bbdbe2254df1bfc9157cfb409afc93f8157712cd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 09:36:37 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 07 Nov 2024 04:36:37 -0500 Subject: [Git][ghc/ghc][master] hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi Message-ID: <672c8a259b7d3_2672c745045c1122cf@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - 1 changed file: - hadrian/ghci-multi-cabal.in Changes: ===================================== hadrian/ghci-multi-cabal.in ===================================== @@ -1,7 +1,7 @@ #!/usr/bin/env sh RUN_GHC=@WithGhc@ -if [[ $(printf "9.4.0\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.4.0" ]]; then echo "Multi-repl needs at least GHC-9.4.1"; exit 1; fi +if [[ $(printf "9.8.1\n%s\n" $($RUN_GHC --numeric-version) | sort -uV | head -n 1) != "9.8.1" ]]; then echo "Multi-repl needs at least GHC-9.8.1"; exit 1; fi # This file is generated by configure from ghci-multi.in View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0c722e143be81e2178d30621e46553462486b828 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0c722e143be81e2178d30621e46553462486b828 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 10:07:29 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 07 Nov 2024 05:07:29 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 8 commits: Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial Message-ID: <672c9160e2f8f_2672c79a1fc812777@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - 0267c0c5 by Sylvain Henry at 2024-11-07T05:07:17-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - 1bd2e76c by Cheng Shao at 2024-11-07T05:07:17-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - c1fa6ea3 by Cheng Shao at 2024-11-07T05:07:18-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 3c338357 by tristian at 2024-11-07T05:07:22-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Platform/Ways.hs - compiler/GHC/Prelude/Basic.hs - compiler/GHC/SysTools/Process.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/GlobalVars.hs - compiler/GHC/Utils/Touch.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/cbits/genSym.c - − ghc/ghc.wrapper - hadrian/ghci-multi-cabal.in - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - hadrian/src/Rules/Documentation.hs - libraries/base/changelog.md The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/954a56d0358f69d02a968861c77594d0ffb0d9df...3c33835737c60e0f607b571e58de42a7b679c0b9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/954a56d0358f69d02a968861c77594d0ffb0d9df...3c33835737c60e0f607b571e58de42a7b679c0b9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 10:18:52 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Thu, 07 Nov 2024 05:18:52 -0500 Subject: [Git][ghc/ghc][wip/T25445] Wibbles Message-ID: <672c940cae781_2672c7bcf1c413759f@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445 at Glasgow Haskell Compiler / GHC Commits: c826a27a by Simon Peyton Jones at 2024-11-07T10:18:37+00:00 Wibbles - - - - - 1 changed file: - compiler/GHC/Core/Lint.hs Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -922,7 +922,8 @@ lintCoreExpr (Let (NonRec bndr rhs) body) -- Now lint the binder ; lintBinder LetBind bndr $ \bndr' -> do { lintLetBind NotTopLevel NonRecursive bndr' rhs rhs_ty - ; addAliasUE bndr let_ue (lintLetBody (BodyOfLet bndr') [bndr'] body) } } + ; addAliasUE bndr' let_ue $ + lintLetBody (BodyOfLet bndr') [bndr'] body } } | otherwise = failWithL (mkLetErr bndr rhs) -- Not quite accurate @@ -1007,7 +1008,7 @@ lintCoreExpr (Type ty) lintCoreExpr (Coercion co) -- See Note [Coercions in terms] = do { (_co', role, lty, rty) <- addLoc (InCo co) $ - lintCoercion co + lintCoercion co ; return (mkCoercionType role lty rty, zeroUE) } ---------------------- @@ -1343,13 +1344,14 @@ concreteTyVarPositions fun_id conc_tvs -- Check that the usage of var is consistent with var itself, and pop the var -- from the usage environment (this is important because of shadowing). -checkLinearity :: UsageEnv -> Var -> LintM UsageEnv +checkLinearity :: UsageEnv -> OutVar -> LintM UsageEnv checkLinearity body_ue lam_var = case varMultMaybe lam_var of Just mult -> do let (lhs, body_ue') = popUE body_ue lam_var - err_msg = text "Linearity failure in lambda:" <+> ppr lam_var - $$ ppr lhs <+> text "⊈" <+> ppr mult + err_msg = vcat [ text "Linearity failure in lambda:" <+> ppr lam_var + , ppr lhs <+> text "⊈" <+> ppr mult + , ppr body_ue ] ensureSubUsage lhs mult err_msg return body_ue' Nothing -> return body_ue -- A type variable @@ -1622,86 +1624,92 @@ lintTyKind tyvar (arg_ty,arg_kind) ************************************************************************ -} -lintCaseExpr :: CoreExpr -> Id -> Type -> [CoreAlt] -> LintM (OutType, UsageEnv) -lintCaseExpr scrut var alt_ty alts = - do { let e = Case scrut var alt_ty alts -- Just for error messages - - -- Check the scrutinee - ; (scrut_ty, scrut_ue) <- markAllJoinsBad $ lintCoreExpr scrut - -- See Note [Join points are less general than the paper] - -- in GHC.Core - ; let scrut_mult = idMult var - - ; alt_ty <- addLoc (CaseTy scrut) $ - lintValueType alt_ty - ; var_ty <- addLoc (IdTy var) $ - lintValueType (idType var) - - -- We used to try to check whether a case expression with no - -- alternatives was legitimate, but this didn't work. - -- See Note [No alternatives lint check] for details. - - -- Check that the scrutinee is not a floating-point type - -- if there are any literal alternatives - -- See GHC.Core Note [Case expression invariants] item (5) - -- See Note [Rules for floating-point comparisons] in GHC.Core.Opt.ConstantFold - ; let isLitPat (Alt (LitAlt _) _ _) = True - isLitPat _ = False - ; checkL (not $ isFloatingPrimTy scrut_ty && any isLitPat alts) - (text "Lint warning: Scrutinising floating-point expression with literal pattern in case analysis (see #9238)." - $$ text "scrut" <+> ppr scrut) - - ; case tyConAppTyCon_maybe (idType var) of - Just tycon - | debugIsOn - , isAlgTyCon tycon - , not (isAbstractTyCon tycon) - , null (tyConDataCons tycon) - , not (exprIsDeadEnd scrut) - -> pprTrace "Lint warning: case binder's type has no constructors" (ppr var <+> ppr (idType var)) - -- This can legitimately happen for type families - $ return () - _otherwise -> return () - - -- Don't use lintIdBndr on var, because unboxed tuple is legitimate - - ; subst <- getSubst - ; ensureEqTys var_ty scrut_ty (mkScrutMsg var var_ty scrut_ty subst) - -- See GHC.Core Note [Case expression invariants] item (7) - - ; lintBinder CaseBind var $ \_ -> - do { -- Check the alternatives - ; alt_ues <- mapM (lintCoreAlt var scrut_ty scrut_mult alt_ty) alts - ; let case_ue = (scaleUE scrut_mult scrut_ue) `addUE` supUEs alt_ues - ; checkCaseAlts e scrut_ty alts - ; return (alt_ty, case_ue) } } - -checkCaseAlts :: CoreExpr -> OutType -> [CoreAlt] -> LintM () +lintCaseExpr :: CoreExpr -> InId -> InType -> [CoreAlt] -> LintM (OutType, UsageEnv) +lintCaseExpr scrut case_bndr alt_ty alts + = do { let e = Case scrut case_bndr alt_ty alts -- Just for error messages + + -- Check the scrutinee + ; (scrut_ty', scrut_ue) <- markAllJoinsBad $ lintCoreExpr scrut + -- See Note [Join points are less general than the paper] + -- in GHC.Core + + ; alt_ty' <- addLoc (CaseTy scrut) $ lintValueType alt_ty + + ; checkCaseAlts e scrut scrut_ty' alts + + -- Lint the case-binder. Must do this after linting the scrutinee + -- because the case-binder isn't in scope in the scrutineex + ; lintBinder CaseBind case_bndr $ \case_bndr' -> + -- Don't use lintIdBndr on case_bndr, because unboxed tuple is legitimate + + do { let case_bndr_ty' = idType case_bndr' + scrut_mult = idMult case_bndr' + + ; ensureEqTys case_bndr_ty' scrut_ty' (mkScrutMsg case_bndr case_bndr_ty' scrut_ty') + -- See GHC.Core Note [Case expression invariants] item (7) + + ; -- Check the alternatives + ; alt_ues <- mapM (lintCoreAlt case_bndr' scrut_ty' scrut_mult alt_ty') alts + ; let case_ue = (scaleUE scrut_mult scrut_ue) `addUE` supUEs alt_ues + ; return (alt_ty', case_ue) } } + +checkCaseAlts :: InExpr -> InExpr -> OutType -> [CoreAlt] -> LintM () -- a) Check that the alts are non-empty -- b1) Check that the DEFAULT comes first, if it exists -- b2) Check that the others are in increasing order -- c) Check that there's a default for infinite types +-- d) Check that the scrutinee is not a floating-point type +-- if there are any literal alternatives +-- e) Check if the scrutinee type has no constructors +-- +-- We used to try to check whether a case expression with no +-- alternatives was legitimate, but this didn't work. +-- See Note [No alternatives lint check] for details. +-- -- NB: Algebraic cases are not necessarily exhaustive, because -- the simplifier correctly eliminates case that can't -- possibly match. - -checkCaseAlts e ty alts = - do { checkL (all non_deflt con_alts) (mkNonDefltMsg e) - -- See GHC.Core Note [Case expression invariants] item (2) - - ; checkL (increasing_tag con_alts) (mkNonIncreasingAltsMsg e) - -- See GHC.Core Note [Case expression invariants] item (3) - - -- For types Int#, Word# with an infinite (well, large!) number of - -- possible values, there should usually be a DEFAULT case - -- But (see Note [Empty case alternatives] in GHC.Core) it's ok to - -- have *no* case alternatives. - -- In effect, this is a kind of partial test. I suppose it's possible - -- that we might *know* that 'x' was 1 or 2, in which case - -- case x of { 1 -> e1; 2 -> e2 } - -- would be fine. - ; checkL (isJust maybe_deflt || not is_infinite_ty || null alts) - (nonExhaustiveAltsMsg e) } +checkCaseAlts e scrut scrut_ty alts + = do { checkL (all non_deflt con_alts) (mkNonDefltMsg e) + -- See GHC.Core Note [Case expression invariants] item (2) + + ; checkL (increasing_tag con_alts) (mkNonIncreasingAltsMsg e) + -- See GHC.Core Note [Case expression invariants] item (3) + + -- For types Int#, Word# with an infinite (well, large!) number of + -- possible values, there should usually be a DEFAULT case + -- But (see Note [Empty case alternatives] in GHC.Core) it's ok to + -- have *no* case alternatives. + -- In effect, this is a kind of partial test. I suppose it's possible + -- that we might *know* that 'x' was 1 or 2, in which case + -- case x of { 1 -> e1; 2 -> e2 } + -- would be fine. + ; checkL (isJust maybe_deflt || not is_infinite_ty || null alts) + (nonExhaustiveAltsMsg e) + + -- Check that the scrutinee is not a floating-point type + -- if there are any literal alternatives + -- See GHC.Core Note [Case expression invariants] item (5) + -- See Note [Rules for floating-point comparisons] in GHC.Core.Opt.ConstantFold + ; checkL (not $ isFloatingPrimTy scrut_ty && any is_lit_alt alts) + (text "Lint warning: Scrutinising floating-point expression with literal pattern in case analysis (see #9238)." + $$ text "scrut" <+> ppr scrut) + + -- Check if scrutinee type has no constructors + -- Just a trace message for now + ; case tyConAppTyCon_maybe scrut_ty of + Just tycon + | debugIsOn + , isAlgTyCon tycon + , not (isAbstractTyCon tycon) + , null (tyConDataCons tycon) + , not (exprIsDeadEnd scrut) + -> pprTrace "Lint warning: case scrutinee type has no constructors" + (ppr scrut_ty) + -- This can legitimately happen for type families + $ return () + _otherwise -> return () + } where (con_alts, maybe_deflt) = findDefault alts @@ -1712,7 +1720,10 @@ checkCaseAlts e ty alts = non_deflt (Alt DEFAULT _ _) = False non_deflt _ = True - is_infinite_ty = case tyConAppTyCon_maybe ty of + is_lit_alt (Alt (LitAlt _) _ _) = True + is_lit_alt _ = False + + is_infinite_ty = case tyConAppTyCon_maybe scrut_ty of Nothing -> False Just tycon -> isPrimTyCon tycon @@ -1723,9 +1734,9 @@ lintAltExpr expr ann_ty ; return ue } -- See GHC.Core Note [Case expression invariants] item (6) -lintCoreAlt :: Var -- Case binder +lintCoreAlt :: OutId -- Case binder -> OutType -- Type of scrutinee - -> Mult -- Multiplicity of scrutinee + -> Mult -- Multiplicity of scrutinee -> OutType -- Type of the alternative -> CoreAlt -> LintM UsageEnv @@ -1735,8 +1746,8 @@ lintCoreAlt case_bndr _ scrut_mult alt_ty (Alt DEFAULT args rhs) = do { lintL (null args) (mkDefaultArgsMsg args) ; rhs_ue <- lintAltExpr rhs alt_ty ; let (case_bndr_usage, rhs_ue') = popUE rhs_ue case_bndr - err_msg = text "Linearity failure in the DEFAULT clause:" <+> ppr case_bndr - $$ ppr case_bndr_usage <+> text "⊈" <+> ppr scrut_mult + err_msg = vcat [ text "Linearity failure in the DEFAULT clause:" <+> ppr case_bndr + , ppr case_bndr_usage <+> text "⊈" <+> ppr scrut_mult ] ; ensureSubUsage case_bndr_usage scrut_mult err_msg ; return rhs_ue' } @@ -1999,10 +2010,13 @@ lintType ty@(AppTy t1 t2) | TyConApp {} <- t1 = failWithL $ text "TyConApp to the left of AppTy:" <+> ppr ty | otherwise - = do { (t1', k1) <- lintType t1 - ; pr@(t2', _) <- lintType t2 - ; res_k <- lint_ty_app ty k1 [pr] - ; return (AppTy t1' t2', res_k) } + = do { let (fun_ty, arg_tys) = collect t1 [t2] + ; (fun_ty', fun_kind) <- lintType fun_ty + ; (arg_tys', res_k) <- lint_ty_app ty fun_kind arg_tys + ; return (foldl AppTy fun_ty' arg_tys', res_k) } + where + collect (AppTy f a) as = collect f (a:as) + collect fun as = (fun, as) lintType ty@(TyConApp tc tys) | isTypeSynonymTyCon tc || isTypeFamilyTyCon tc @@ -2017,9 +2031,8 @@ lintType ty@(TyConApp tc tys) | otherwise -- Data types, data families, primitive types = do { checkTyCon tc - ; prs <- mapM lintType tys - ; res_k <- lint_ty_app ty (tyConKind tc) prs - ; return (TyConApp tc (map fst prs), res_k) } + ; (tys', res_k) <- lint_ty_app ty (tyConKind tc) tys + ; return (TyConApp tc tys', res_k) } -- arrows can related *unlifted* kinds, so this has to be separate from -- a dependent forall. @@ -2039,7 +2052,7 @@ lintType ty@(FunTy af tw t1 t2) lintType ty@(ForAllTy (Bndr tcv vis) body_ty) | not (isTyCoVar tcv) - = failWithL (text "Non-Tyvar or Non-Covar bound in type:" <+> ppr ty) + = failWithL (text "Non-TyVar or Non-CoVar bound in type:" <+> ppr ty) | otherwise = lintTyCoBndr tcv $ \tcv' -> do { pr@(body_ty', _) <- lintType body_ty @@ -2097,22 +2110,20 @@ lintTySynFamApp report_unsat ty tc tys -- Deal with type synonyms | ExpandsSyn tenv rhs tys' <- expandSynTyCon_maybe tc tys , let expanded_ty = mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys' - = do { -- Kind-check the argument types, but without reporting - -- un-saturated type families/synonyms - prs <- setReportUnsat False (mapM lintType tys) + = do { when report_unsat $ do { _ <- lintType expanded_ty + ; return () } - ; when report_unsat $ - do { _ <- lintType expanded_ty - ; return () } + ; -- Kind-check the argument types, but without reporting + -- un-saturated type families/synonyms + ; (tys', res_k) <- setReportUnsat False $ + lint_ty_app ty (tyConKind tc) tys - ; res_k <- lint_ty_app ty (tyConKind tc) prs - ; return (TyConApp tc (map fst prs), res_k) } + ; return (TyConApp tc tys', res_k) } -- Otherwise this must be a type family | otherwise - = do { prs <- mapM lintType tys - ; res_k <- lint_ty_app ty (tyConKind tc) prs - ; return (TyConApp tc (map fst prs), res_k) } + = do { (tys', res_k) <- lint_ty_app ty (tyConKind tc) tys + ; return (TyConApp tc tys', res_k) } ----------------- -- Confirms that a kind is really TYPE r or Constraint @@ -2149,10 +2160,13 @@ lintTyLit (StrTyLit _) = return () lintTyLit (CharTyLit _) = return () ----------------- -lint_ty_app :: Type -> OutKind -> [(OutType, OutKind)] -> LintM OutKind -lint_ty_app msg_ty k prs +lint_ty_app :: InType -> OutKind -> [InType] -> LintM ([OutType], OutKind) +lint_ty_app msg_ty fun_kind arg_tys -- See Note [Avoiding compiler perf traps when constructing error messages.] - = lint_app (\msg_ty -> text "type" <+> quotes (ppr msg_ty)) msg_ty k prs + = do { prs <- mapM lintType arg_tys + ; res_k <- lint_app (\msg_ty -> text "type" <+> quotes (ppr msg_ty)) msg_ty + fun_kind prs + ; return (map fst prs, res_k) } ---------------- lint_co_app :: Coercion -> OutKind -> [OutType] -> LintM () @@ -2639,6 +2653,8 @@ lintCoercion orig_co@(InstCo co arg) where ------------- + go_args :: (Subst, OutType) -> (Subst,OutType) -> [InCoercion] + -> LintM (OutType, OutType, [OutCoercion]) go_args (lsubst,lty) (rsubst,rty) [] = return (substTy lsubst lty, substTy rsubst rty, []) go_args lty rty (arg:args) @@ -2647,6 +2663,8 @@ lintCoercion orig_co@(InstCo co arg) ; return (lty', rty', arg':args') } ------------- + go_arg :: (Subst, OutType) -> (Subst,OutType) -> InCoercion + -> LintM ((Subst,OutType), (Subst,OutType), OutCoercion) go_arg (lsubst,lty) (rsubst,rty) arg = do { (arg', arg_role, arg_lty, arg_rty) <- lintCoercion arg ; lintRole arg Nominal arg_role @@ -2654,13 +2672,21 @@ lintCoercion orig_co@(InstCo co arg) ; case (splitForAllTyCoVar_maybe lty, splitForAllTyCoVar_maybe rty) of -- forall over tvar (Just (ltv,lty1), Just (rtv,rty1)) - | typeKind arg_lty `eqType` tyVarKind ltv - , typeKind arg_rty `eqType` tyVarKind rtv + | typeKind arg_lty `eqType` substTy lsubst (tyVarKind ltv) + , typeKind arg_rty `eqType` substTy rsubst (tyVarKind rtv) -> return ( (extendTCvSubst lsubst ltv arg_lty, lty1) , (extendTCvSubst rsubst rtv arg_rty, rty1) , arg' ) | otherwise - -> failWithL (text "Kind mis-match in inst coercion1" <+> ppr orig_co) + -> failWithL (hang (text "Kind mis-match in inst coercion") + 2 (vcat [ text "arg" <+> ppr arg + , text "arg'" <+> ppr arg' + , text "lty" <+> ppr lty <+> dcolon <+> ppr (typeKind lty) + , text "rty" <+> ppr rty <+> dcolon <+> ppr (typeKind rty) + , text "arg_lty" <+> ppr arg_lty <+> dcolon <+> ppr (typeKind arg_lty) + , text "arg_rty" <+> ppr arg_rty <+> dcolon <+> ppr (typeKind arg_rty) + , text "ltv" <+> ppr ltv <+> dcolon <+> ppr (tyVarKind ltv) + , text "rtv" <+> ppr rtv <+> dcolon <+> ppr (tyVarKind rtv) ])) _ -> failWithL (text "Bad argument of inst" <+> ppr orig_co) } @@ -2992,9 +3018,10 @@ data LintEnv -- A subset of the InScopeSet in le_subst -- See Note [Join points] - , le_ue_aliases :: NameEnv UsageEnv -- Assigns usage environments to the - -- alias-like binders, as found in - -- non-recursive lets. + , le_ue_aliases :: NameEnv UsageEnv + -- Assigns usage environments to the alias-like binders, + -- as found in non-recursive lets. + -- Domain is OutIds , le_platform :: Platform -- ^ Target platform , le_diagOpts :: DiagOpts -- ^ Target platform @@ -3508,14 +3535,14 @@ lookupJoinId id Just id' -> return (idJoinPointHood id') Nothing -> return NotJoinPoint } -addAliasUE :: Id -> UsageEnv -> LintM a -> LintM a +addAliasUE :: OutId -> UsageEnv -> LintM a -> LintM a addAliasUE id ue thing_inside = LintM $ \ env errs -> let new_ue_aliases = extendNameEnv (le_ue_aliases env) (getName id) ue in unLintM thing_inside (env { le_ue_aliases = new_ue_aliases }) errs -varCallSiteUsage :: Id -> LintM UsageEnv +varCallSiteUsage :: OutId -> LintM UsageEnv varCallSiteUsage id = do m <- getUEAliases return $ case lookupNameEnv m (getName id) of @@ -3671,12 +3698,11 @@ mkCaseAltMsg e ty1 ty2 text "Annotation on case:" <+> ppr ty2, text "Alt Rhs:" <+> ppr e ]) -mkScrutMsg :: Id -> Type -> Type -> Subst -> SDoc -mkScrutMsg var var_ty scrut_ty subst +mkScrutMsg :: Id -> Type -> Type -> SDoc +mkScrutMsg var var_ty scrut_ty = vcat [text "Result binder in case doesn't match scrutinee:" <+> ppr var, text "Result binder type:" <+> ppr var_ty,--(idType var), - text "Scrutinee type:" <+> ppr scrut_ty, - hsep [text "Current TCv subst", ppr subst]] + text "Scrutinee type:" <+> ppr scrut_ty] mkNonDefltMsg, mkNonIncreasingAltsMsg :: CoreExpr -> SDoc mkNonDefltMsg e View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c826a27a0402aadee2e217f59fd7efaf15c482ca -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c826a27a0402aadee2e217f59fd7efaf15c482ca You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 11:06:59 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 07 Nov 2024 06:06:59 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 11 commits: Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <672c9f5383024_38b4a11dde7c693f0@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - c19d2999 by Rodrigo Mesquita at 2024-11-07T11:06:35+00:00 Improve performance of deriving Show Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: InstanceMatching T12707 T3294 ------------------------ - - - - - 8935fbc0 by Rodrigo Mesquita at 2024-11-07T11:06:36+00:00 Deriving Ord: compare and <= only Since the implementation of CLC proposal #24, the default implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`. This means we no longer need to generate implementations for these methods when stock deriving `Ord`. Rather, just derive the implementation of `compare` and `<=`, and rely on the default implementations for the others. - - - - - 00861f5f by Rodrigo Mesquita at 2024-11-07T11:06:36+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - 37b40db8 by Rodrigo Mesquita at 2024-11-07T11:06:36+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/Parser.y - compiler/GHC/Rename/Bind.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Tc/Deriv/Functor.hs - compiler/GHC/Tc/Deriv/Generate.hs - compiler/GHC/Tc/TyCl/Class.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/Language/Haskell/Syntax/Binds.hs - + compiler/Language/Haskell/Syntax/BooleanFormula.hs - compiler/ghc.cabal.in - docs/users_guide/9.14.1-notes.rst - hadrian/ghci-multi-cabal.in - libraries/base/changelog.md - libraries/base/src/Data/List/NonEmpty.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5f730439d106b18f35ee7b1949b3a1498b2fc1ee...37b40db8ec8b362ee8bd5e1da9eba025648ae2cc -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5f730439d106b18f35ee7b1949b3a1498b2fc1ee...37b40db8ec8b362ee8bd5e1da9eba025648ae2cc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 11:36:04 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Thu, 07 Nov 2024 06:36:04 -0500 Subject: [Git][ghc/ghc][wip/T25445] Don't return a kind when linting types Message-ID: <672ca62442272_38b4a137963c7913e@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445 at Glasgow Haskell Compiler / GHC Commits: 5b3a747d by Simon Peyton Jones at 2024-11-07T11:35:26+00:00 Don't return a kind when linting types - - - - - 2 changed files: - compiler/GHC/Core/Lint.hs - testsuite/tests/perf/compiler/T8095.hs Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -83,7 +83,6 @@ import GHC.Types.Demand ( splitDmdSig, isDeadEndDiv ) import GHC.Builtin.Names import GHC.Builtin.Types.Prim -import GHC.Builtin.Types ( multiplicityTy ) import GHC.Data.Bag import GHC.Data.List.SetOps @@ -882,8 +881,8 @@ lintCoreExpr (Cast expr co) -- markAllJoinsBad: see Note [Join points and casts] ; (co', role, from_ty, to_ty) <- lintCoercion co - ; _ <- checkValueType (typeKind to_ty) $ - text "target of cast" <+> quotes (ppr co') + ; checkValueType (typeKind to_ty) $ + text "target of cast" <+> quotes (ppr co') ; lintRole co' Representational role ; ensureEqTys from_ty expr_ty (mkCastErr expr co' from_ty expr_ty) ; return (to_ty, ue) } @@ -904,9 +903,9 @@ lintCoreExpr (Tick tickish expr) lintCoreExpr (Let (NonRec tv (Type ty)) body) | isTyVar tv = -- See Note [Linting type lets] - do { pr@(ty',_) <- lintType ty + do { ty' <- lintType ty ; lintTyCoBndr tv $ \ tv' -> - do { addLoc (RhsOf tv) $ lintTyKind tv' pr + do { addLoc (RhsOf tv) $ lintTyKind tv' ty' -- Now extend the substitution so we -- take advantage of it in the body ; extendTvSubstL tv ty' $ @@ -1483,8 +1482,8 @@ lintCoreArg (fun_ty, ue) (Type arg_ty) = do { checkL (not (isCoercionTy arg_ty)) (text "Unnecessary coercion-to-type injection:" <+> ppr arg_ty) - ; arg_tk <- lintType arg_ty - ; res <- lintTyApp fun_ty arg_tk + ; arg_ty' <- lintType arg_ty + ; res <- lintTyApp fun_ty arg_ty' ; return (res, ue) } -- Coercion argument @@ -1524,7 +1523,7 @@ lintAltBinders rhs_ue _case_bndr scrut_ty con_ty [] ; return rhs_ue } lintAltBinders rhs_ue case_bndr scrut_ty con_ty ((var_w, bndr):bndrs) | isTyVar bndr - = do { con_ty' <- lintTyApp con_ty (mkTyVarTy bndr, tyVarKind bndr) + = do { con_ty' <- lintTyApp con_ty (mkTyVarTy bndr) ; lintAltBinders rhs_ue case_bndr scrut_ty con_ty' bndrs } | otherwise = do { (con_ty', _) <- lintValApp (Var bndr) con_ty (idType bndr) zeroUE zeroUE @@ -1557,10 +1556,10 @@ checkCaseLinearity ue case_bndr var_w bndr = do ----------------- -lintTyApp :: OutType -> (OutType,OutKind) -> LintM OutType -lintTyApp fun_ty arg_pr@(arg_ty,_) +lintTyApp :: OutType -> OutType -> LintM OutType +lintTyApp fun_ty arg_ty | Just (tv,body_ty) <- splitForAllTyVar_maybe fun_ty - = do { lintTyKind tv arg_pr + = do { lintTyKind tv arg_ty ; in_scope <- getInScope -- substTy needs the set of tyvars in scope to avoid generating -- uniques that are already in scope. @@ -1605,16 +1604,17 @@ lintValApp arg fun_ty arg_ty fun_ue arg_ue where err2 = mkNonFunAppMsg fun_ty arg_ty arg -lintTyKind :: OutTyVar -> (OutType,OutKind) -> LintM () +lintTyKind :: OutTyVar -> OutType -> LintM () -- Both args have had substitution applied -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism] -lintTyKind tyvar (arg_ty,arg_kind) +lintTyKind tyvar arg_ty = unless (arg_kind `eqType` tyvar_kind) $ addErrL (mkKindErrMsg tyvar arg_ty $$ (text "Linted Arg kind:" <+> ppr arg_kind)) where tyvar_kind = tyVarKind tyvar + arg_kind = typeKind arg_ty {- ************************************************************************ @@ -1844,7 +1844,8 @@ lintBinder site var linterF lintTyCoBndr :: TyCoVar -> (OutTyCoVar -> LintM a) -> LintM a lintTyCoBndr tcv thing_inside - = do { (tcv_type', tcv_kind) <- lintType (varType tcv) + = do { tcv_type' <- lintType (varType tcv) + ; let tcv_kind = typeKind tcv_type' -- See (FORALL1) and (FORALL2) in GHC.Core.Type ; if (isTyVar tcv) @@ -1964,7 +1965,8 @@ lintValueType :: Type -> LintM OutType -- See Note [Linting type lets] lintValueType ty = addLoc (InType ty) $ - do { (ty',sk) <- lintType ty + do { ty' <- lintType ty + ; let sk = typeKind ty' ; lintL (isTYPEorCONSTRAINT sk) $ hang (text "Ill-kinded type:" <+> ppr ty) 2 (text "has kind:" <+> ppr sk) @@ -1982,7 +1984,7 @@ checkTyCoVarInScope subst tcv 2 (text "is out of scope") ------------------- -lintType :: InType -> LintM (OutType, OutKind) +lintType :: InType -> LintM OutType -- The OutType is just the substitution applied to the InType; -- the OutKind is the OutType's kind @@ -2000,8 +2002,8 @@ lintType (TyVarTy tv) ; subst <- getSubst ; case lookupTyVar subst tv of - Just linted_ty -> return (linted_ty, typeKind linted_ty) - Nothing -> return (TyVarTy tv, tyVarKind tv) + Just linted_ty -> return linted_ty + Nothing -> return (TyVarTy tv) -- If the type variable is not substituted for, it is entirely unchanged -- See Note [Extending the TvSubstEnv and CvSubstEnv] in GHC.Core.TyCo.Subst } @@ -2011,9 +2013,9 @@ lintType ty@(AppTy t1 t2) = failWithL $ text "TyConApp to the left of AppTy:" <+> ppr ty | otherwise = do { let (fun_ty, arg_tys) = collect t1 [t2] - ; (fun_ty', fun_kind) <- lintType fun_ty - ; (arg_tys', res_k) <- lint_ty_app ty fun_kind arg_tys - ; return (foldl AppTy fun_ty' arg_tys', res_k) } + ; fun_ty' <- lintType fun_ty + ; arg_tys' <- lint_ty_app ty (typeKind fun_ty') arg_tys + ; return (foldl AppTy fun_ty' arg_tys') } where collect (AppTy f a) as = collect f (a:as) collect fun as = (fun, as) @@ -2031,63 +2033,58 @@ lintType ty@(TyConApp tc tys) | otherwise -- Data types, data families, primitive types = do { checkTyCon tc - ; (tys', res_k) <- lint_ty_app ty (tyConKind tc) tys - ; return (TyConApp tc tys', res_k) } + ; tys' <- lint_ty_app ty (tyConKind tc) tys + ; return (TyConApp tc tys') } -- arrows can related *unlifted* kinds, so this has to be separate from -- a dependent forall. lintType ty@(FunTy af tw t1 t2) - = do { pr1@(t1', _) <- lintType t1 - ; pr2@(t2', _) <- lintType t2 - ; prw@(tw', _) <- lintType tw - ; lintArrow (text "type or kind" <+> quotes (ppr ty)) pr1 pr2 prw - ; let real_af = chooseFunTyFlag t1 t2 - ; unless (real_af == af) $ addErrL $ - hang (text "Bad FunTyFlag in FunTy") - 2 (vcat [ ppr ty - , text "FunTyFlag =" <+> ppr af - , text "Computed FunTyFlag =" <+> ppr real_af ]) - ; let res_k = liftedTypeOrConstraintKind (funTyFlagResultTypeOrConstraint af) - ; return (FunTy af tw' t1' t2', res_k) } + = do { t1' <- lintType t1 + ; t2' <- lintType t2 + ; tw' <- lintType tw + ; lintArrow (text "type or kind" <+> quotes (ppr ty)) af t1' t2' tw' + ; return (FunTy af tw' t1' t2') } lintType ty@(ForAllTy (Bndr tcv vis) body_ty) | not (isTyCoVar tcv) = failWithL (text "Non-TyVar or Non-CoVar bound in type:" <+> ppr ty) | otherwise = lintTyCoBndr tcv $ \tcv' -> - do { pr@(body_ty', _) <- lintType body_ty + do { body_ty' <- lintType body_ty ; when (isCoVar tcv) $ lintL (tcv `elemVarSet` tyCoVarsOfType body_ty) $ text "Covar does not occur in the body:" <+> (ppr tcv $$ ppr body_ty) -- See GHC.Core.TyCo.Rep Note [Unused coercion variable in ForAllTy] - ; torc <- lintForAllBody tcv' pr - ; let res_k = liftedTypeOrConstraintKind torc - ; return (ForAllTy (Bndr tcv' vis) body_ty', res_k) } + ; _ <- lintForAllBody tcv' body_ty' + + ; return (ForAllTy (Bndr tcv' vis) body_ty') } lintType ty@(LitTy l) - = do { lintTyLit l; return (ty, typeKind ty) } + = do { lintTyLit l; return ty } lintType (CastTy ty co) - = do { (ty', ty_kind) <- lintType ty - ; (co', co_lk, co_rk) <- lintStarCoercion co + = do { ty' <- lintType ty + ; let ty_kind = typeKind ty' + ; (co', co_lk, _co_rk) <- lintStarCoercion co ; ensureEqTys ty_kind co_lk (mkCastTyErr ty co ty_kind co_lk) - ; return (CastTy ty' co', co_rk) } + ; return (CastTy ty' co') } lintType (CoercionTy co) - = do { (co', role, co_lk, co_rk) <- lintCoercion co - ; return (CoercionTy co', mkCoercionType role co_lk co_rk) } + = do { (co', _, _, _) <- lintCoercion co + ; return (CoercionTy co') } ----------------- -lintForAllBody :: OutTyCoVar -> (OutType, OutKind) -> LintM TypeOrConstraint +lintForAllBody :: OutTyCoVar -> OutType -> LintM () -- Do the checks for the body of a forall-type -lintForAllBody tcv (body_ty, body_kind) +lintForAllBody tcv body_ty = do { -- For type variables, check for skolem escape -- See Note [Phantom type variables in kinds] in GHC.Core.Type -- The kind of (forall cv. th) is liftedTypeKind, so no -- need to check for skolem-escape in the CoVar case - when (isTyVar tcv) $ + let body_kind = typeKind body_ty + ; when (isTyVar tcv) $ case occCheckExpand [tcv] body_kind of Just {} -> return () Nothing -> failWithL $ @@ -2098,7 +2095,7 @@ lintForAllBody tcv (body_ty, body_kind) ; checkValueType body_kind (text "the body of forall:" <+> ppr body_ty) } ----------------- -lintTySynFamApp :: Bool -> InType -> TyCon -> [InType] -> LintM (OutType, OutKind) +lintTySynFamApp :: Bool -> InType -> TyCon -> [InType] -> LintM OutType -- The TyCon is a type synonym or a type family (not a data family) -- See Note [Linting type synonym applications] -- c.f. GHC.Tc.Validity.check_syn_tc_app @@ -2115,40 +2112,47 @@ lintTySynFamApp report_unsat ty tc tys ; -- Kind-check the argument types, but without reporting -- un-saturated type families/synonyms - ; (tys', res_k) <- setReportUnsat False $ - lint_ty_app ty (tyConKind tc) tys + ; tys' <- setReportUnsat False $ + lint_ty_app ty (tyConKind tc) tys - ; return (TyConApp tc tys', res_k) } + ; return (TyConApp tc tys') } -- Otherwise this must be a type family | otherwise - = do { (tys', res_k) <- lint_ty_app ty (tyConKind tc) tys - ; return (TyConApp tc tys', res_k) } + = do { tys' <- lint_ty_app ty (tyConKind tc) tys + ; return (TyConApp tc tys') } ----------------- -- Confirms that a kind is really TYPE r or Constraint -checkValueType :: OutKind -> SDoc -> LintM TypeOrConstraint -checkValueType ki doc - = case sORTKind_maybe ki of - Just (torc,_) -> return torc - Nothing -> failWithL $ - vcat [ text "Non-Type-like kind when Type-like expected:" <+> ppr ki - , text "when checking" <+> doc ] +checkValueType :: OutKind -> SDoc -> LintM () +checkValueType kind doc + = lintL (isTYPEorCONSTRAINT kind) + (text "Non-Type-like kind when Type-like expected:" <+> ppr kind $$ + text "when checking" <+> doc) ----------------- -lintArrow :: SDoc -> (OutType, OutKind) -> (OutType, OutKind) - -> (OutType, OutKind) -> LintM () +lintArrow :: SDoc -> FunTyFlag -> OutType -> OutType -> OutType -> LintM () -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism] -lintArrow what (_,k1) (_,k2) (_,kw) -- Eg lintArrow "type or kind `blah'" k1 k2 kw - -- or lintArrow "coercion `blah'" k1 k2 kw - = do { unless (isTYPEorCONSTRAINT k1) (report (text "argument") k1) - ; unless (isTYPEorCONSTRAINT k2) (report (text "result") k2) - ; unless (isMultiplicityTy kw) (report (text "multiplicity") kw) } +lintArrow what af t1 t2 tw -- Eg lintArrow "type or kind `blah'" k1 k2 kw + -- or lintArrow "coercion `blah'" k1 k2 kw + = do { unless (isTYPEorCONSTRAINT k1) (report (text "argument") t1 k1) + ; unless (isTYPEorCONSTRAINT k2) (report (text "result") t2 k2) + ; unless (isMultiplicityTy kw) (report (text "multiplicity") tw kw) + + ; unless (real_af == af) $ addErrL $ + hang (text "Bad FunTyFlag") + 2 (vcat [ text "FunTyFlag =" <+> ppr af + , text "Computed FunTyFlag =" <+> ppr real_af + , text "in" <+> what ]) } where - report ar k = addErrL (vcat [ hang (text "Ill-kinded" <+> ar) - 2 (text "in" <+> what) - , what <+> text "kind:" <+> ppr k ]) + k1 = typeKind t1 + k2 = typeKind t2 + kw = typeKind tw + real_af = chooseFunTyFlag t1 t2 + report ar t k = addErrL (hang (text "Ill-kinded" <+> ar) + 2 (vcat [ ppr t <+> dcolon <+> ppr k + , text "in" <+> what ])) ----------------- lintTyLit :: TyLit -> LintM () @@ -2160,30 +2164,26 @@ lintTyLit (StrTyLit _) = return () lintTyLit (CharTyLit _) = return () ----------------- -lint_ty_app :: InType -> OutKind -> [InType] -> LintM ([OutType], OutKind) +lint_ty_app :: InType -> OutKind -> [InType] -> LintM [OutType] lint_ty_app msg_ty fun_kind arg_tys -- See Note [Avoiding compiler perf traps when constructing error messages.] - = do { prs <- mapM lintType arg_tys - ; res_k <- lint_app (\msg_ty -> text "type" <+> quotes (ppr msg_ty)) msg_ty - fun_kind prs - ; return (map fst prs, res_k) } + = do { arg_tys' <- mapM lintType arg_tys + ; lint_app (\msg_ty -> text "type" <+> quotes (ppr msg_ty)) msg_ty + fun_kind arg_tys' + ; return arg_tys' } ---------------- lint_co_app :: Coercion -> OutKind -> [OutType] -> LintM () lint_co_app msg_ty k tys -- See Note [Avoiding compiler perf traps when constructing error messages.] = do { _ <- lint_app (\msg_ty -> text "coercion" <+> quotes (ppr msg_ty)) - msg_ty k (map add_kind tys) + msg_ty k tys ; return () } -add_kind :: OutType -> (OutType,OutKind) -add_kind ty = (ty,typeKind ty) - - ---------------- lint_app :: Outputable msg_thing => (msg_thing -> SDoc) -> msg_thing - -> OutKind -> [(OutType,OutKind)] -> LintM OutKind + -> OutKind -> [OutType] -> LintM () -- (lint_app d fun_kind arg_tys) -- We have an application (f arg_ty1 .. arg_tyn), -- where f :: fun_kind @@ -2205,21 +2205,23 @@ lint_app mk_msg msg_type !kfn arg_tys -- We use explicit recursion instead of a fold here to avoid go_app becoming -- an allocated function closure. This reduced allocations by up to 7% for some -- modules. - go_app :: InScopeSet -> OutKind -> [(OutType,OutKind)] -> LintM OutKind + go_app :: InScopeSet -> OutKind -> [OutType] -> LintM () go_app !in_scope !kfn ta | Just kfn' <- coreView kfn = go_app in_scope kfn' ta - go_app _in_scope kfn [] = return kfn + go_app _in_scope _kfn [] = return () - go_app in_scope fun_kind@(FunTy _ _ kfa kfb) ((ta,ka):tas) - = do { unless (ka `eqType` kfa) $ + go_app in_scope fun_kind@(FunTy _ _ kfa kfb) (ta:tas) + = do { let ka = typeKind ta + ; unless (ka `eqType` kfa) $ addErrL (lint_app_fail_msg kfn arg_tys mk_msg msg_type (text "Fun:" <+> (ppr fun_kind $$ ppr ta <+> dcolon <+> ppr ka))) ; go_app in_scope kfb tas } - go_app in_scope (ForAllTy (Bndr kv _vis) kfn) ((ta,ka):tas) + go_app in_scope (ForAllTy (Bndr kv _vis) kfn) (ta:tas) = do { let kv_kind = varType kv + ka = typeKind ta ; unless (ka `eqType` kv_kind) $ addErrL (lint_app_fail_msg kfn arg_tys mk_msg msg_type (text "Forall:" <+> (ppr kv $$ ppr kv_kind $$ @@ -2366,8 +2368,8 @@ which is what used to happen. But that proved tricky and error prone lintStarCoercion :: InCoercion -> LintM (OutCoercion, OutType, OutType) lintStarCoercion g = do { (g', role, t1, t2) <- lintCoercion g - ; _ <- checkValueType (typeKind t1) (text "the kind of the left type in" <+> ppr g) - ; _ <- checkValueType (typeKind t2) (text "the kind of the right type in" <+> ppr g) + ; checkValueType (typeKind t1) (text "the kind of the left type in" <+> ppr g) + ; checkValueType (typeKind t2) (text "the kind of the right type in" <+> ppr g) ; lintRole g Nominal role ; return (g', t1, t2) } @@ -2396,19 +2398,19 @@ lintCoercion (CoVarCo cv) lintCoercion (Refl ty) - = do { (ty', _) <- lintType ty + = do { ty' <- lintType ty ; return (Refl ty', Nominal, ty', ty') } lintCoercion (GRefl r ty MRefl) - = do { (ty', _) <- lintType ty + = do { ty' <- lintType ty ; return (GRefl r ty' MRefl, r, ty', ty') } lintCoercion (GRefl r ty (MCo co)) - = do { (ty',tk) <- lintType ty + = do { ty' <- lintType ty ; (co', role, lk, _rk) <- lintCoercion co - ; ensureEqTys tk lk $ + ; ensureEqTys (typeKind ty') lk $ hang (text "GRefl coercion kind mis-match:" <+> ppr co) - 2 (vcat [ppr ty', ppr tk, ppr lk]) + 2 (vcat [ppr ty', ppr ty', ppr lk]) ; lintRole co' Nominal role ; return (GRefl r ty' (MCo co'), r, ty', mkCastTy ty' co') } @@ -2470,8 +2472,8 @@ lintCoercion co@(ForAllCo { fco_tcv = tcv, fco_visL = visL, fco_visR = visR -- (forall (tcv:k2). rty[(tcv:k2) |> sym kind_co/tcv]) -- are both well formed. Easiest way is to call lintForAllBody -- for each; there is actually no need to do the funky substitution - ; _ <- lintForAllBody tcv' (lty, typeKind lty) - ; _ <- lintForAllBody tcv' (rty, typeKind rty) + ; lintForAllBody tcv' lty + ; lintForAllBody tcv' rty ; when (isCoVar tcv) $ do { lintL (visL == coreTyLamForAllTyFlag && visR == coreTyLamForAllTyFlag) $ @@ -2496,14 +2498,8 @@ lintCoercion co@(FunCo { fco_role = r, fco_afl = afl, fco_afr = afr = do { (co1', r1, lt1, rt1) <- lintCoercion co1 ; (co2', r2, lt2, rt2) <- lintCoercion co2 ; (cow', rw, ltw, rtw) <- lintCoercion cow - ; lintL (afl == chooseFunTyFlag lt1 lt2) (bad_co_msg "afl") - ; lintL (afr == chooseFunTyFlag rt1 rt2) (bad_co_msg "afr") - ; let ltw_kind = typeKind ltw - rtw_kind = typeKind rtw - ; ensureEqTys (typeKind ltw) multiplicityTy (bad_co_msg "mult-l") - ; ensureEqTys (typeKind rtw) multiplicityTy (bad_co_msg "mult-r") - ; lintArrow (bad_co_msg "arrowl") (add_kind lt1) (add_kind lt2) (ltw, ltw_kind) - ; lintArrow (bad_co_msg "arrowr") (add_kind rt1) (add_kind rt2) (rtw, rtw_kind) + ; lintArrow (bad_co_msg "arrowl") afl lt1 lt2 ltw + ; lintArrow (bad_co_msg "arrowr") afr rt1 rt2 rtw ; lintRole co1 r r1 ; lintRole co2 r r2 ; let expected_mult_role = case r of @@ -2530,11 +2526,11 @@ lintCoercion co@(UnivCo { uco_role = r, uco_prov = prov _ -> return () -- Check the to and from types - ; (ty1', k1) <- lintType ty1 - ; (ty2', k2) <- lintType ty2 + ; ty1' <- lintType ty1 + ; ty2' <- lintType ty2 - ; when (r /= Phantom && isTYPEorCONSTRAINT k1 - && isTYPEorCONSTRAINT k2) + ; when (r /= Phantom && isTYPEorCONSTRAINT (typeKind ty1') + && isTYPEorCONSTRAINT (typeKind ty2')) (checkTypes ty1 ty2) -- Check the coercions on which this UnivCo depends @@ -2923,8 +2919,8 @@ lint_branch ax_tc (CoAxBranch { cab_tvs = tvs, cab_cvs = cvs , cab_lhs = lhs_args, cab_rhs = rhs }) = lintBinders LambdaBind (tvs ++ cvs) $ \_ -> do { let lhs = mkTyConApp ax_tc lhs_args - ; (_lhs', lhs_kind) <- lintType lhs - ; (_rhs', rhs_kind) <- lintType rhs + ; lhs_kind <- typeKind <$> lintType lhs + ; rhs_kind <- typeKind <$> lintType rhs ; lintL (not (lhs_kind `typesAreApart` rhs_kind)) $ hang (text "Inhomogeneous axiom") 2 (text "lhs:" <+> ppr lhs <+> dcolon <+> ppr lhs_kind $$ ===================================== testsuite/tests/perf/compiler/T8095.hs ===================================== @@ -17,3 +17,10 @@ instance (xs ~ Replicate1 ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ f X = Y f Y = X test1 = f (X :: Data ( Replicate1 ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Succ ( Zero ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) () )) + +{- +instance (xs ~ Replicate1 ( Succ ( Succ ( Succ ( Succ Zero)))) ()) => Class (Data xs) where + f X = Y + f Y = X +test1 = f (X :: Data ( Replicate1 ( Succ ( Succ ( Succ ( Succ Zero ))) ) ())) +-} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5b3a747d34f5b8c63fc14136aa163a1964d27375 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5b3a747d34f5b8c63fc14136aa163a1964d27375 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 13:49:55 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Thu, 07 Nov 2024 08:49:55 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <672cc5838e601_39abc3bc73c9964@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: 07ccdec4 by Sjoerd Visscher at 2024-11-07T14:49:31+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/html-test/ref/LinearTypes.html - utils/haddock/html-test/src/LinearTypes.hs - utils/haddock/latex-test/ref/LinearTypes/LinearTypes.tex - utils/haddock/latex-test/src/LinearTypes/LinearTypes.hs Changes: ===================================== compiler/GHC/Hs/Type.hs ===================================== @@ -24,10 +24,10 @@ GHC.Hs.Type: Abstract syntax: user-defined types module GHC.Hs.Type ( Mult, HsScaled(..), - hsMult, hsScaledThing, - HsArrow, HsArrowOf(..), arrowToHsType, expandHsArrow, + hsMultIsLinear, hsScaledThing, hsScaledToHsTypes, + HsArrow, HsArrowOf(..), HsUnrestrictedArrowUse(..), arrowToHsType, expandHsArrow, EpLinearArrow(..), - hsLinear, hsUnrestricted, isUnrestricted, + hsLinear, hsUnrestricted, hsNoMultAnn, isUnrestricted, pprHsArrow, HsType(..), HsCoreTy, LHsType, HsKind, LHsKind, @@ -539,13 +539,19 @@ hsLinear = HsScaled (HsLinearArrow x) GhcTc -> noExtField hsUnrestricted :: forall p a. IsPass p => a -> HsScaled (GhcPass p) a -hsUnrestricted = HsScaled (HsUnrestrictedArrow x) +hsUnrestricted = hsNoMultAnn HsArrowUseOther + +hsNoMultAnn :: forall p a. IsPass p => HsUnrestrictedArrowUse -> a -> HsScaled (GhcPass p) a +hsNoMultAnn t = HsScaled (HsUnrestrictedArrow t x) where x = case ghcPass @p of GhcPs -> noAnn GhcRn -> noExtField GhcTc -> noExtField +hsScaledToHsTypes :: (a -> LHsType GhcRn) -> HsScaled GhcRn a -> [LHsType GhcRn] +hsScaledToHsTypes f (HsScaled arr x) = [arrowToHsType arr, f x] + isUnrestricted :: HsArrow GhcRn -> Bool isUnrestricted (arrowToHsType -> L _ (HsTyVar _ _ (L _ n))) = n == manyDataConName isUnrestricted _ = False @@ -557,7 +563,8 @@ arrowToHsType = expandHsArrow (HsTyVar noAnn NotPromoted) -- erases the information of whether the programmer wrote an explicit -- multiplicity or a shorthand. expandHsArrow :: (LocatedN Name -> t GhcRn) -> HsArrowOf (LocatedA (t GhcRn)) GhcRn -> LocatedA (t GhcRn) -expandHsArrow mk_var (HsUnrestrictedArrow _) = noLocA (mk_var (noLocA manyDataConName)) +expandHsArrow mk_var (HsUnrestrictedArrow HsRecFieldAnn _) = noLocA (mk_var (noLocA oneDataConName)) +expandHsArrow mk_var (HsUnrestrictedArrow _ _) = noLocA (mk_var (noLocA manyDataConName)) expandHsArrow mk_var (HsLinearArrow _) = noLocA (mk_var (noLocA oneDataConName)) expandHsArrow _mk_var (HsExplicitMult _ p) = p @@ -568,16 +575,25 @@ instance -- See #18846 pprHsArrow :: (Outputable mult, OutputableBndrId pass) => HsArrowOf mult (GhcPass pass) -> SDoc -pprHsArrow (HsUnrestrictedArrow _) = pprArrowWithMultiplicity visArgTypeLike (Left False) -pprHsArrow (HsLinearArrow _) = pprArrowWithMultiplicity visArgTypeLike (Left True) -pprHsArrow (HsExplicitMult _ p) = pprArrowWithMultiplicity visArgTypeLike (Right (ppr p)) +pprHsArrow (HsUnrestrictedArrow _ _) = pprArrowWithMultiplicity visArgTypeLike (Left False) +pprHsArrow (HsLinearArrow _) = pprArrowWithMultiplicity visArgTypeLike (Left True) +pprHsArrow (HsExplicitMult _ p) = pprArrowWithMultiplicity visArgTypeLike (Right (ppr p)) type instance XConDeclField (GhcPass _) = TokDcolon type instance XXConDeclField (GhcPass _) = DataConCantHappen instance OutputableBndrId p => Outputable (ConDeclField (GhcPass p)) where - ppr (ConDeclField _ fld_n fld_ty _) = ppr fld_n <+> dcolon <+> ppr fld_ty + ppr (ConDeclField _ fld_n (HsScaled fld_mult fld_ty) _) = ppr_names fld_n <+> ppr_mult <+> ppr fld_ty + where + ppr_names :: [LFieldOcc (GhcPass p)] -> SDoc + ppr_names [n] = pprPrefixOcc n + ppr_names ns = sep (punctuate comma (map pprPrefixOcc ns)) + + ppr_mult = case fld_mult of + HsUnrestrictedArrow _ _ -> dcolon + HsLinearArrow _ -> text "%1" <+> dcolon + HsExplicitMult _ p -> text "%" <> ppr p <+> dcolon --------------------- hsWcScopedTvs :: LHsSigWcType GhcRn -> [Name] @@ -1359,13 +1375,9 @@ pprConDeclFields :: forall p. OutputableBndrId p => [LConDeclField (GhcPass p)] -> SDoc pprConDeclFields fields = braces (sep (punctuate comma (map ppr_fld fields))) where - ppr_fld (L _ (ConDeclField { cd_fld_names = ns, cd_fld_type = ty, - cd_fld_doc = doc })) - = pprMaybeWithDoc doc (ppr_names ns <+> dcolon <+> ppr ty) - - ppr_names :: forall p. OutputableBndrId p => [LFieldOcc (GhcPass p)] -> SDoc - ppr_names [n] = pprPrefixOcc n - ppr_names ns = sep (punctuate comma (map pprPrefixOcc ns)) + ppr_fld :: LConDeclField (GhcPass p) -> SDoc + ppr_fld (L _ (cdf at ConDeclField { cd_fld_doc = doc })) + = pprMaybeWithDoc doc (ppr cdf) -- Printing works more-or-less as for Types ===================================== compiler/GHC/Hs/Utils.hs ===================================== @@ -623,7 +623,7 @@ nlHsParTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) nlHsAppTy f t = noLocA (HsAppTy noExtField f t) nlHsTyVar p x = noLocA (HsTyVar noAnn p (noLocA x)) -nlHsFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow x) a b) +nlHsFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther x) a b) where x = case ghcPass @p of GhcPs -> noAnn ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -2865,15 +2865,10 @@ repGadtDataCons cons details res_ty -- TH currently only supports linear constructors. -- We also accept the (->) arrow when -XLinearTypes is off, because this -- denotes a linear field. --- This check is not performed in repRecConArgs, since the GADT record --- syntax currently does not have a way to mark fields as nonlinear. verifyLinearFields :: [HsScaled GhcRn (LHsType GhcRn)] -> MetaM () verifyLinearFields ps = do linear <- lift $ xoptM LangExt.LinearTypes - let allGood = all (\st -> case hsMult st of - HsUnrestrictedArrow _ -> not linear - HsLinearArrow _ -> True - _ -> False) ps + let allGood = all (hsMultIsLinear linear) ps unless allGood $ notHandled ThNonLinearDataCon -- Desugar the arguments in a data constructor declared with prefix syntax. @@ -2886,11 +2881,13 @@ repPrefixConArgs ps = do -- Desugar the arguments in a data constructor declared with record syntax. repRecConArgs :: LocatedL [LConDeclField GhcRn] -> MetaM (Core [M TH.VarBangType]) -repRecConArgs ips = do - args <- concatMapM rep_ip (unLoc ips) +repRecConArgs lips = do + let ips = map unLoc (unLoc lips) + verifyLinearFields (map cd_fld_type ips) + args <- concatMapM rep_ip ips coreListM varBangTypeTyConName args where - rep_ip (L _ ip) = mapM (rep_one_ip (cd_fld_type ip)) (cd_fld_names ip) + rep_ip ip = mapM (rep_one_ip (hsScaledThing $ cd_fld_type ip)) (cd_fld_names ip) rep_one_ip :: LBangType GhcRn -> LFieldOcc GhcRn -> MetaM (Core (M TH.VarBangType)) rep_one_ip t n = do { MkC v <- lookupOcc (unLoc . foLabel $ unLoc n) ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -2000,7 +2000,7 @@ instance HiePass p => ToHie (LocatedC [LocatedA (HsExpr (GhcPass p))]) where instance ToHie (LocatedA (ConDeclField GhcRn)) where toHie (L span field) = concatM $ makeNode field (locA span) : case field of ConDeclField _ fields typ doc -> - [ toHie $ map (RFC RecFieldDecl (getRealSpan $ getHasLoc typ)) fields + [ toHie $ map (RFC RecFieldDecl (getRealSpan $ getHasLoc $ hsScaledThing typ)) fields , toHie typ , toHie doc ] ===================================== compiler/GHC/Parser.y ===================================== @@ -2260,7 +2260,7 @@ type :: { LHsType GhcPs } -- See Note [%shift: type -> btype] : btype %shift { $1 } | btype '->' ctype {% amsA' (sLL $1 $> - $ HsFunTy noExtField (HsUnrestrictedArrow (epUniTok $2)) $1 $3) } + $ HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther (epUniTok $2)) $1 $3) } | btype mult '->' ctype {% hintLinear (getLoc $2) >> let arr = (unLoc $2) (epUniTok $3) @@ -2597,7 +2597,12 @@ fielddecl :: { LConDeclField GhcPs } {% amsA' (L (comb2 $1 $3) (ConDeclField (epUniTok $2) (reverse (map (\ln@(L l n) - -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) $3 Nothing))} + -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) (hsNoMultAnn HsRecFieldAnn $3) Nothing))} + | sig_vars PREFIX_PERCENT atype '::' ctype + {% amsA' (L (comb4 $1 $2 $3 $5) + (ConDeclField (epUniTok $4) + (reverse (map (\ln@(L l n) + -> L (fromTrailingN l) $ FieldOcc noExtField (L (noTrailingN l) n)) (unLoc $1))) (mkMultField (epTok $2) $3 (epUniTok $4) $5) Nothing))} -- Reversed! maybe_derivings :: { Located (HsDeriving GhcPs) } @@ -2661,7 +2666,7 @@ There's an awkward overlap with a type signature. Consider decl_no_th :: { LHsDecl GhcPs } : sigdecl { $1 } - | infixexp opt_sig rhs {% runPV (unECP $1) >>= \ $1 -> + | infixexp opt_sig rhs {% runPV (unECP $1) >>= \ $1 -> do { let { l = comb2 $1 $> } ; r <- checkValDef l $1 (HsNoMultAnn noExtField, $2) $3; -- Depending upon what the pattern looks like we might get either @@ -2669,7 +2674,7 @@ decl_no_th :: { LHsDecl GhcPs } -- [FunBind vs PatBind] ; !cs <- getCommentsFor l ; return $! (sL (commentsA l cs) $ ValD noExtField r) } } - | PREFIX_PERCENT atype infixexp opt_sig rhs {% runPV (unECP $3) >>= \ $3 -> + | PREFIX_PERCENT atype infixexp opt_sig rhs {% runPV (unECP $3) >>= \ $3 -> do { let { l = comb2 $1 $> } ; r <- checkValDef l $3 (mkMultAnn (epTok $1) $2, $4) $5; -- parses bindings of the form %p x or @@ -2855,7 +2860,7 @@ infixexp2 :: { ECP } withArrowParsingMode' $ \mode -> unECP $1 >>= \ $1 -> unECP $3 >>= \ $3 -> - let arr = HsUnrestrictedArrow (epUniTok $2) + let arr = HsUnrestrictedArrow HsArrowUseOther (epUniTok $2) in mkHsArrowPV (comb2 $1 $>) mode $1 arr $3 } | infixexp expmult '->' infixexp2 { ECP $ ===================================== compiler/GHC/Parser/PostProcess.hs ===================================== @@ -71,6 +71,7 @@ module GHC.Parser.PostProcess ( UnpackednessPragma(..), mkMultTy, mkMultAnn, + mkMultField, -- Token location mkTokenLocation, @@ -805,7 +806,7 @@ mkGadtDecl loc names dcol ty = do case body_ty of L ll (HsFunTy _ hsArr (L (EpAnn anc _ cs) (HsRecTy an rf)) res_ty) -> do arr <- case hsArr of - HsUnrestrictedArrow arr -> return arr + HsUnrestrictedArrow _ arr -> return arr _ -> do addError $ mkPlainErrorMsgEnvelope (getLocA body_ty) $ (PsErrIllegalGadtRecordMultiplicity hsArr) return noAnn @@ -2071,7 +2072,7 @@ instance DisambECP (PatBuilder GhcPs) where where tok :: TokRarrow tok = case arr of - HsUnrestrictedArrow x -> x + HsUnrestrictedArrow _ x -> x _ -> -- unreachable case because in Parser.y the reduction rules for -- (a %m -> b) and (a ->. b) use ArrowIsFunType panic "mkHsArrowPV ArrowIsViewPat: expected HsUnrestrictedArrow" @@ -3518,6 +3519,9 @@ mkMultAnn pct t@(L _ (HsTyLit _ (HsNumTy (SourceText (unpackFS -> "1")) 1))) pct1 = epTokenWidenR pct (locA (getLoc t)) mkMultAnn pct t = HsMultAnn pct t +mkMultField :: EpToken "%" -> LHsType GhcPs -> TokDcolon -> LHsType GhcPs -> HsScaled GhcPs (LBangType GhcPs) +mkMultField pct mult _ t = HsScaled (mkMultTy pct mult noAnn) t + mkTokenLocation :: SrcSpan -> TokenLocation mkTokenLocation (UnhelpfulSpan _) = NoTokenLoc mkTokenLocation (RealSrcSpan r mb) = TokenLoc (EpaSpan (RealSrcSpan r mb)) ===================================== compiler/GHC/Rename/HsType.hs ===================================== @@ -451,10 +451,14 @@ rnLHsTypes :: HsDocContext -> [LHsType GhcPs] -> RnM ([LHsType GhcRn], FreeVars) rnLHsTypes doc tys = mapFvRn (rnLHsType doc) tys rnScaledLHsType :: HsDocContext -> HsScaled GhcPs (LHsType GhcPs) - -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) -rnScaledLHsType doc (HsScaled w ty) = do - (w' , fvs_w) <- rnHsArrow (mkTyKiEnv doc TypeLevel RnTypeBody) w - (ty', fvs) <- rnLHsType doc ty + -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) +rnScaledLHsType doc = rnScaledLHsTyKi (mkTyKiEnv doc TypeLevel RnTypeBody) + +rnScaledLHsTyKi :: RnTyKiEnv -> HsScaled GhcPs (LHsType GhcPs) + -> RnM (HsScaled GhcRn (LHsType GhcRn), FreeVars) +rnScaledLHsTyKi env (HsScaled w ty) = do + (w' , fvs_w) <- rnHsArrow env w + (ty', fvs) <- rnLHsTyKi env ty return (HsScaled w' ty', fvs `plusFV` fvs_w) @@ -709,7 +713,7 @@ rnHsArrow env = rnHsArrowWith (rnLHsTyKi env) rnHsArrowWith :: (LocatedA (mult GhcPs) -> RnM (LocatedA (mult GhcRn), FreeVars)) -> HsArrowOf (LocatedA (mult GhcPs)) GhcPs -> RnM (HsArrowOf (LocatedA (mult GhcRn)) GhcRn, FreeVars) -rnHsArrowWith _rn (HsUnrestrictedArrow _) = pure (HsUnrestrictedArrow noExtField, emptyFVs) +rnHsArrowWith _rn (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField, emptyFVs) rnHsArrowWith _rn (HsLinearArrow _) = pure (HsLinearArrow noExtField, emptyFVs) rnHsArrowWith rn (HsExplicitMult _ p) = (\(mult, fvs) -> (HsExplicitMult noExtField mult, fvs)) <$> rn p @@ -1334,7 +1338,7 @@ rnField :: FastStringEnv FieldLabel -> RnTyKiEnv -> LConDeclField GhcPs -> RnM (LConDeclField GhcRn, FreeVars) rnField fl_env env (L l (ConDeclField _ names ty haddock_doc)) = do { let new_names = map (fmap (lookupField fl_env)) names - ; (new_ty, fvs) <- rnLHsTyKi env ty + ; (new_ty, fvs) <- rnScaledLHsTyKi env ty ; haddock_doc' <- traverse rnLHsDoc haddock_doc ; return (L l (ConDeclField noAnn new_names new_ty haddock_doc') , fvs) } @@ -2030,7 +2034,7 @@ extractConDeclGADTDetailsTyVars :: HsConDeclGADTDetails GhcPs -> FreeKiTyVars -> FreeKiTyVars extractConDeclGADTDetailsTyVars con_args = case con_args of PrefixConGADT _ args -> extract_scaled_ltys args - RecConGADT _ (L _ flds) -> extract_ltys $ map (cd_fld_type . unLoc) $ flds + RecConGADT _ (L _ flds) -> extract_scaled_ltys $ map (cd_fld_type . unLoc) $ flds -- | Get type/kind variables mentioned in the kind signature, preserving -- left-to-right order: @@ -2062,7 +2066,7 @@ extract_lty (L _ ty) acc = case ty of HsTyVar _ _ ltv -> extract_tv ltv acc HsBangTy _ _ ty -> extract_lty ty acc - HsRecTy _ flds -> foldr (extract_lty + HsRecTy _ flds -> foldr (extract_scaled_lty . cd_fld_type . unLoc) acc flds HsAppTy _ ty1 ty2 -> extract_lty ty1 $ ===================================== compiler/GHC/Rename/Pat.hs ===================================== @@ -1432,7 +1432,7 @@ rn_ty_pat ty@(XHsType{}) = do liftRnFV $ rnHsType ctxt ty rn_ty_pat_arrow :: HsArrow GhcPs -> TPRnM (HsArrow GhcRn) -rn_ty_pat_arrow (HsUnrestrictedArrow _) = pure (HsUnrestrictedArrow noExtField) +rn_ty_pat_arrow (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField) rn_ty_pat_arrow (HsLinearArrow _) = pure (HsLinearArrow noExtField) rn_ty_pat_arrow (HsExplicitMult _ p) = rn_lty_pat p <&> (\mult -> HsExplicitMult noExtField mult) ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -985,7 +985,7 @@ expr_to_type earg = ; return (L l (HsFunTy noExtField mult' arg' res'))} where go_arrow :: HsArrowOf (LHsExpr GhcRn) GhcRn -> TcM (HsArrow GhcRn) - go_arrow (HsUnrestrictedArrow{}) = pure (HsUnrestrictedArrow noExtField) + go_arrow (HsUnrestrictedArrow arrUse _) = pure (HsUnrestrictedArrow arrUse noExtField) go_arrow (HsLinearArrow{}) = pure (HsLinearArrow noExtField) go_arrow (HsExplicitMult _ exp) = HsExplicitMult noExtField <$> go exp go (L l (HsForAll _ tele expr)) = ===================================== compiler/GHC/Tc/Gen/HsType.hs ===================================== @@ -1126,7 +1126,7 @@ tcHsType mode (HsFunTy _ mult ty1 ty2) exp_kind tcHsType mode (HsOpTy _ _ ty1 (L _ op) ty2) exp_kind | op `hasKey` unrestrictedFunTyConKey - = tc_fun_type mode (HsUnrestrictedArrow noExtField) ty1 ty2 exp_kind + = tc_fun_type mode (HsUnrestrictedArrow HsArrowUseOther noExtField) ty1 ty2 exp_kind --------- Foralls tcHsType mode t@(HsForAllTy { hst_tele = tele, hst_body = ty }) exp_kind ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -283,7 +283,7 @@ no_anon_wc_ty lty = go lty HsKindSig _ ty kind -> go ty && go kind HsDocTy _ ty _ -> go ty HsBangTy _ _ ty -> go ty - HsRecTy _ flds -> gos $ map (cd_fld_type . unLoc) flds + HsRecTy _ flds -> gos $ concatMap (hsScaledToHsTypes id . cd_fld_type . unLoc) flds HsExplicitListTy _ _ tys -> gos tys HsExplicitTupleTy _ tys -> gos tys HsForAllTy { hst_tele = tele ===================================== compiler/GHC/Tc/TyCl.hs ===================================== @@ -1813,14 +1813,14 @@ kcConH98Args new_or_data res_kind con_args = case con_args of PrefixCon _ tys -> kcConArgTys new_or_data res_kind tys InfixCon ty1 ty2 -> kcConArgTys new_or_data res_kind [ty1, ty2] RecCon (L _ flds) -> kcConArgTys new_or_data res_kind $ - map (hsLinear . cd_fld_type . unLoc) flds + map (cd_fld_type . unLoc) flds -- Kind-check the types of arguments to a GADT data constructor. kcConGADTArgs :: NewOrData -> TcKind -> HsConDeclGADTDetails GhcRn -> TcM () kcConGADTArgs new_or_data res_kind con_args = case con_args of PrefixConGADT _ tys -> kcConArgTys new_or_data res_kind tys RecConGADT _ (L _ flds) -> kcConArgTys new_or_data res_kind $ - map (hsLinear . cd_fld_type . unLoc) flds + map (cd_fld_type . unLoc) flds kcConDecls :: Foldable f => NewOrData @@ -3939,14 +3939,14 @@ tcRecConDeclFields exp_kind fields = mapM (tcConArg exp_kind) btys where -- We need a one-to-one mapping from field_names to btys - combined = map (\(L _ f) -> (cd_fld_names f,hsLinear (cd_fld_type f))) + combined = map (\(L _ f) -> (cd_fld_names f, cd_fld_type f)) (unLoc fields) explode (ns,ty) = zip ns (repeat ty) exploded = concatMap explode combined (_,btys) = unzip exploded tcDataConMult :: HsArrow GhcRn -> TcM Mult -tcDataConMult arr@(HsUnrestrictedArrow _) = do +tcDataConMult arr@(HsUnrestrictedArrow HsArrowUseOther _) = do -- See Note [Function arrows in GADT constructors] linearEnabled <- xoptM LangExt.LinearTypes if linearEnabled then tcMult arr else return oneDataConTy ===================================== compiler/GHC/ThToHs.hs ===================================== @@ -792,7 +792,7 @@ cvt_id_arg parent_con (i, str, ty) { cd_fld_ext = noAnn , cd_fld_names = [L (l2l li) $ FieldOcc noExtField (L li i')] - , cd_fld_type = ty' + , cd_fld_type = hsNoMultAnn HsRecFieldAnn ty' , cd_fld_doc = Nothing} } cvtDerivs :: [TH.DerivClause] -> CvtM (HsDeriving GhcPs) @@ -1690,7 +1690,7 @@ cvtTypeKind typeOrKind ty _ -> return $ parenthesizeHsType sigPrec x' let y'' = parenthesizeHsType sigPrec y' - returnLA (HsFunTy noExtField (HsUnrestrictedArrow noAnn) x'' y'') + returnLA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noAnn) x'' y'') | otherwise -> do { fun_tc <- returnLA $ getRdrName unrestrictedFunTyCon ; mk_apps (HsTyVar noAnn NotPromoted fun_tc) tys' } @@ -1857,7 +1857,7 @@ hsTypeToArrow :: LHsType GhcPs -> HsArrow GhcPs hsTypeToArrow w = case unLoc w of HsTyVar _ _ (L _ (isExact_maybe -> Just n)) | n == oneDataConName -> HsLinearArrow noAnn - | n == manyDataConName -> HsUnrestrictedArrow noAnn + | n == manyDataConName -> HsUnrestrictedArrow HsArrowUseOther noAnn _ -> HsExplicitMult noAnn w -- ConT/InfixT can contain both data constructor (i.e., promoted) names and ===================================== compiler/Language/Haskell/Syntax/Type.hs ===================================== @@ -21,8 +21,9 @@ GHC.Hs.Type: Abstract syntax: user-defined types -- See Note [Language.Haskell.Syntax.* Hierarchy] for why not GHC.Hs.* module Language.Haskell.Syntax.Type ( HsScaled(..), - hsMult, hsScaledThing, - HsArrow, HsArrowOf(..), XUnrestrictedArrow, XLinearArrow, XExplicitMult, XXArrow, + hsMultIsLinear, hsScaledThing, + HsArrow, HsArrowOf(..), HsUnrestrictedArrowUse(..), + XUnrestrictedArrow, XLinearArrow, XExplicitMult, XXArrow, HsType(..), LHsType, HsKind, LHsKind, HsBndrVis(..), XBndrRequired, XBndrInvisible, XXBndrVis, @@ -78,7 +79,7 @@ import Data.Maybe import Data.Eq import Data.Bool import Data.Char -import Prelude (Integer) +import Prelude (Integer, Functor) import Data.Ord (Ord) {- @@ -938,9 +939,12 @@ data HsTyLit pass type HsArrow pass = HsArrowOf (LHsType pass) pass +data HsUnrestrictedArrowUse = HsRecFieldAnn | HsArrowUseOther + deriving (Eq, Ord, Data) + -- | Denotes the type of arrows in the surface language data HsArrowOf mult pass - = HsUnrestrictedArrow !(XUnrestrictedArrow mult pass) + = HsUnrestrictedArrow HsUnrestrictedArrowUse !(XUnrestrictedArrow mult pass) -- ^ a -> b or a → b | HsLinearArrow !(XLinearArrow mult pass) @@ -962,9 +966,13 @@ type family XXArrow mult p -- | This is used in the syntax. In constructor declaration. It must keep the -- arrow representation. data HsScaled pass a = HsScaled (HsArrow pass) a + deriving (Functor) -hsMult :: HsScaled pass a -> HsArrow pass -hsMult (HsScaled m _) = m +hsMultIsLinear :: Bool -> HsScaled pass a -> Bool +hsMultIsLinear _ (HsScaled (HsUnrestrictedArrow HsRecFieldAnn _) _) = True +hsMultIsLinear linear (HsScaled (HsUnrestrictedArrow HsArrowUseOther _) _) = not linear +hsMultIsLinear _ (HsScaled HsLinearArrow{} _) = True +hsMultIsLinear _ _ = False hsScaledThing :: HsScaled pass a -> a hsScaledThing (HsScaled _ t) = t @@ -1072,7 +1080,7 @@ data ConDeclField pass -- Record fields have Haddock docs on them = ConDeclField { cd_fld_ext :: XConDeclField pass, cd_fld_names :: [LFieldOcc pass], -- ^ See Note [ConDeclField pass] - cd_fld_type :: LBangType pass, + cd_fld_type :: HsScaled pass (LBangType pass), cd_fld_doc :: Maybe (LHsDoc pass)} | XConDeclField !(XXConDeclField pass) ===================================== testsuite/tests/linear/should_compile/NonLinearRecord.hs ===================================== @@ -0,0 +1,15 @@ +{-# LANGUAGE LinearTypes, DataKinds #-} +module NonLinearRecord where + +import GHC.Exts (Multiplicity(..)) + +data C m = C { linC %1 :: Int, urC %Many :: Char, varC %m :: String, noC :: Bool } + +data G mult where + G :: { linG %1 :: Int, urG %Many :: Char, varG %m :: String, noG :: Bool } -> G m + +testC :: Int %1 -> Char -> String -> Bool %1 -> C Many +testC w x y z = C w x y z + +testG :: Int %1 -> Char -> String %1 -> Bool %1 -> G One +testG w x y z = G w x y z ===================================== testsuite/tests/linear/should_compile/all.T ===================================== @@ -47,3 +47,4 @@ test('LinearLet', normal, compile, ['']) test('LinearLetPoly', normal, compile, ['']) test('LinearListComprehension', normal, compile, ['-dlinear-core-lint']) test('OmitFieldPat', normal, compile, ['-dcore-lint']) +test('NonLinearRecord', normal, compile, ['']) \ No newline at end of file ===================================== testsuite/tests/linear/should_fail/LinearRecFieldMany.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE LinearTypes, DataKinds #-} +module LinearRecFieldMany where + +import GHC.Exts (Multiplicity(..)) + +data C = C { urC %'Many :: Int } + +test :: Int %1 -> C +test = C ===================================== testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr ===================================== @@ -0,0 +1,6 @@ +LinearRecFieldMany.hs:9:8: [GHC-83865] + Couldn't match type ‘Many’ with ‘One’ + Expected: Int %1 -> C + Actual: Int -> C + In the expression: C + In an equation for ‘test’: test = C ===================================== testsuite/tests/linear/should_fail/all.T ===================================== @@ -34,6 +34,7 @@ test('LinearFFI', normal, compile_fail, ['']) test('LinearTHFail', normal, compile_fail, ['']) test('LinearTHFail2', normal, compile_fail, ['']) test('LinearTHFail3', normal, compile_fail, ['']) +test('LinearRecFieldMany', normal, compile_fail, ['']) test('T18888', normal, compile_fail, ['']) test('T18888_datakinds', normal, compile_fail, ['']) test('T19120', normal, compile_fail, ['']) ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs ===================================== @@ -298,14 +298,14 @@ ppCtor sDocContext dat subdocs con at ConDeclH98{con_args = con_args'} = f (PrefixCon _ args) = [typeSig name $ (map hsScaledThing args) ++ [resType]] f (InfixCon a1 a2) = f $ PrefixCon [] [a1, a2] f (RecCon (L _ recs)) = - f (PrefixCon [] $ map (hsLinear . cd_fld_type . unLoc) recs) + f (PrefixCon [] $ map (cd_fld_type . unLoc) recs) ++ concat [ (concatMap (lookupCon sDocContext subdocs . noLocA . unLoc . foLabel . unLoc) (cd_fld_names r)) - ++ [out sDocContext (map (foExt . unLoc) $ cd_fld_names r) `typeSig` [resType, cd_fld_type r]] + ++ [out sDocContext (map (foExt . unLoc) $ cd_fld_names r) `typeSig` [resType, hsScaledThing $ cd_fld_type r]] | r <- map unLoc recs ] - funs = foldr1 (\x y -> reL $ HsFunTy noExtField (HsUnrestrictedArrow noExtField) x y) + funs = foldr1 (\x y -> reL $ HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) x y) apps = foldl1 (\x y -> reL $ HsAppTy noExtField x y) typeSig nm flds = @@ -356,8 +356,8 @@ ppCtor tau_ty = foldr mkFunTy res_ty $ case args of PrefixConGADT _ pos_args -> map hsScaledThing pos_args - RecConGADT _ (L _ flds) -> map (cd_fld_type . unL) flds - mkFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) a b) + RecConGADT _ (L _ flds) -> map (hsScaledThing . cd_fld_type . unL) flds + mkFunTy a b = noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) a b) ppFixity :: SDocContext -> (Name, Fixity) -> [String] ppFixity sDocContext (name, fixity) = [out sDocContext ((FixitySig NoNamespaceSpecifier [noLocA name] fixity) :: FixitySig GhcRn)] ===================================== utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs ===================================== @@ -1034,8 +1034,8 @@ ppSideBySideField :: [(DocName, DocForDecl DocName)] -> Bool -> ConDeclField Doc ppSideBySideField subdocs unicode (ConDeclField _ names ltype _) = decltt ( cat (punctuate comma (map (ppBinder . rdrNameOcc . foExt . unLoc) names)) - <+> dcolon unicode - <+> ppLType unicode ltype + <+> ppRecFieldMultAnn unicode ltype (dcolon unicode) + <+> ppLType unicode (hsScaledThing ltype) ) <-> rDoc mbDoc where @@ -1047,6 +1047,12 @@ ppSideBySideField subdocs unicode (ConDeclField _ names ltype _) = Nothing -> error "No names. An invariant was broken. Please report this to the Haddock project" Just hd -> hd +ppRecFieldMultAnn :: Bool -> HsScaled DocNameI a -> LaTeX -> LaTeX +ppRecFieldMultAnn unicode (HsScaled arr _) following = case arr of + HsUnrestrictedArrow _ _ -> following + HsLinearArrow _ -> text "%1" <+> following + HsExplicitMult _ mult -> multAnnotation <> ppr_mono_lty mult unicode <+> following + -- | Pretty-print a bundled pattern synonym ppSideBySidePat :: [LocatedN DocName] @@ -1312,7 +1318,7 @@ ppr_mono_ty (HsFunTy _ mult ty1 ty2) u = where arr = case mult of HsLinearArrow _ -> lollipop u - HsUnrestrictedArrow _ -> arrow u + HsUnrestrictedArrow _ _ -> arrow u HsExplicitMult _ m -> multAnnotation <> ppr_mono_lty m u <+> arrow u ppr_mono_ty (HsBangTy _ b ty) u = ppBang b <> ppLParendType u ty ppr_mono_ty (HsTyVar _ NotPromoted (L _ name)) _ = ppDocName name ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs ===================================== @@ -1542,8 +1542,8 @@ ppSideBySideField subdocs unicode qual (ConDeclField _ names ltype _) = , let field = (foExt) name ] ) - <+> dcolon unicode - <+> ppLType unicode qual HideEmptyContexts ltype + <+> ppRecFieldMultAnn unicode qual ltype (dcolon unicode) + <+> ppLType unicode qual HideEmptyContexts (hsScaledThing ltype) , mbDoc , [] ) @@ -1555,11 +1555,17 @@ ppSideBySideField subdocs unicode qual (ConDeclField _ names ltype _) = Nothing -> error "No names. An invariant was broken. Please report this to the Haddock project" Just hd -> hd +ppRecFieldMultAnn :: Unicode -> Qualification -> HsScaled DocNameI a -> Html -> Html +ppRecFieldMultAnn unicode qual (HsScaled arr _) following = case arr of + HsUnrestrictedArrow _ _ -> following + HsLinearArrow _ -> toHtml "%1" <+> following + HsExplicitMult _ mult -> multAnnotation <> ppr_mono_lty mult unicode qual HideEmptyContexts <+> following + ppShortField :: Bool -> Unicode -> Qualification -> ConDeclField DocNameI -> Html ppShortField summary unicode qual (ConDeclField _ names ltype _) = hsep (punctuate comma (map ((ppBinder summary) . rdrNameOcc . foExt . unLoc) names)) - <+> dcolon unicode - <+> ppLType unicode qual HideEmptyContexts ltype + <+> ppRecFieldMultAnn unicode qual ltype (dcolon unicode) + <+> ppLType unicode qual HideEmptyContexts (hsScaledThing ltype) -- | Pretty print an expanded pattern (for bundled patterns) ppSideBySidePat @@ -1817,7 +1823,7 @@ ppr_mono_ty (HsFunTy _ mult ty1 ty2) u q e = where arr = case mult of HsLinearArrow _ -> lollipop u - HsUnrestrictedArrow _ -> arrow u + HsUnrestrictedArrow _ _ -> arrow u HsExplicitMult _ m -> multAnnotation <> ppr_mono_lty m u q e <+> arrow u ppr_mono_ty (HsTupleTy _ con tys) u q _ = tupleParens con (map (ppLType u q HideEmptyContexts) tys) ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -493,11 +493,13 @@ synifyDataCon use_gadt_syntax dc = linear_tys = zipWith - ( \ty bang -> - let tySyn = synifyType WithinType [] (scaledThing ty) - in case bang of + ( \(Scaled mult ty) bang -> + let tySyn = synifyType WithinType [] ty + multSyn = synifyMultRec [] mult + bangTy = case bang of (HsSrcBang _ (HsBang NoSrcUnpack NoSrcStrict)) -> tySyn (HsSrcBang src bang') -> noLocA $ HsBangTy (noAnn, src) bang' tySyn + in HsScaled multSyn bangTy ) arg_tys (dataConSrcBangs dc) @@ -507,7 +509,7 @@ synifyDataCon use_gadt_syntax dc = noLocA $ ConDeclField noAnn - [noLocA $ FieldOcc (mkVarUnqual $ field_label $ flLabel fl) (noLocA (flSelector fl))] + [noLocA $ FieldOcc (mkVarUnqual $ field_label $ flLabel fl) (noLocA (flSelector fl))] synTy Nothing @@ -515,15 +517,15 @@ synifyDataCon use_gadt_syntax dc = mk_h98_arg_tys = case (use_named_field_syntax, use_infix_syntax) of (True, True) -> Left "synifyDataCon: contradiction!" (True, False) -> return $ RecCon (noLocA field_tys) - (False, False) -> return $ PrefixCon noTypeArgs (map hsUnrestricted linear_tys) + (False, False) -> return $ PrefixCon noTypeArgs linear_tys (False, True) -> case linear_tys of - [a, b] -> return $ InfixCon (hsUnrestricted a) (hsUnrestricted b) + [a, b] -> return $ InfixCon a b _ -> Left "synifyDataCon: infix with non-2 args?" mk_gadt_arg_tys :: HsConDeclGADTDetails GhcRn mk_gadt_arg_tys | use_named_field_syntax = RecConGADT noExtField (noLocA field_tys) - | otherwise = PrefixConGADT noExtField (map hsUnrestricted linear_tys) + | otherwise = PrefixConGADT noExtField linear_tys in -- finally we get synifyDataCon's result! if use_gadt_syntax @@ -988,7 +990,12 @@ noKindTyVars _ _ = emptyVarSet synifyMult :: [TyVar] -> Mult -> HsArrow GhcRn synifyMult vs t = case t of OneTy -> HsLinearArrow noExtField - ManyTy -> HsUnrestrictedArrow noExtField + ManyTy -> HsUnrestrictedArrow HsArrowUseOther noExtField + ty -> HsExplicitMult noExtField (synifyType WithinType vs ty) + +synifyMultRec :: [TyVar] -> Mult -> HsArrow GhcRn +synifyMultRec vs t = case t of + OneTy -> HsUnrestrictedArrow HsRecFieldAnn noExtField ty -> HsExplicitMult noExtField (synifyType WithinType vs ty) synifyPatSynType :: PatSyn -> LHsType GhcRn ===================================== utils/haddock/haddock-api/src/Haddock/GhcUtils.hs ===================================== @@ -223,7 +223,7 @@ getGADTConType PrefixConGADT _ pos_args -> foldr mkFunTy res_ty (map hsScaledThing pos_args) mkFunTy :: LHsType DocNameI -> LHsType DocNameI -> LHsType DocNameI - mkFunTy a b = noLocA (HsFunTy noAnn (HsUnrestrictedArrow noExtField) a b) + mkFunTy a b = noLocA (HsFunTy noAnn (HsUnrestrictedArrow HsArrowUseOther noExtField) a b) getGADTConType (ConDeclH98{}) = panic "getGADTConType" -- Should only be called on ConDeclGADT @@ -361,7 +361,7 @@ restrictCons names decls = [L p d | L p (Just d) <- fmap keep <$> decls] field_avail (L _ (ConDeclField _ fs _ _)) = all (\f -> (unLoc . foLabel . unLoc $ f) `elem` names) fs - field_types flds = [hsUnrestricted t | L _ (ConDeclField _ _ t _) <- flds] + field_types flds = [t | L _ (ConDeclField _ _ t _) <- flds] keep _ = Nothing restrictDecls :: [Name] -> [LSig GhcRn] -> [LSig GhcRn] @@ -512,7 +512,7 @@ reparenBndrKind v at XBndrKind{} = v -- | Add parenthesis around the types in a 'ConDeclField' (see 'reparenTypePrec') reparenConDeclField :: XRecCond a => ConDeclField a -> ConDeclField a -reparenConDeclField (ConDeclField x n t d) = ConDeclField x n (reparenLType t) d +reparenConDeclField (ConDeclField x n t d) = ConDeclField x n (fmap reparenLType t) d reparenConDeclField c at XConDeclField{} = c ------------------------------------------------------------------------------- ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Create.hs ===================================== @@ -963,11 +963,11 @@ extractPatternSyn nm t tvs cons = case con of ConDeclH98{con_args = con_args'} -> case con_args' of PrefixCon _ args' -> map hsScaledThing args' - RecCon (L _ fields) -> cd_fld_type . unLoc <$> fields + RecCon (L _ fields) -> hsScaledThing . cd_fld_type . unLoc <$> fields InfixCon arg1 arg2 -> map hsScaledThing [arg1, arg2] ConDeclGADT{con_g_args = con_args'} -> case con_args' of PrefixConGADT _ args' -> map hsScaledThing args' - RecConGADT _ (L _ fields) -> cd_fld_type . unLoc <$> fields + RecConGADT _ (L _ fields) -> hsScaledThing . cd_fld_type . unLoc <$> fields typ = longArrow args (data_ty con) typ' = case con of @@ -977,7 +977,7 @@ extractPatternSyn nm t tvs cons = in PatSynSig noAnn [noLocA nm] (mkEmptySigType typ'') longArrow :: [LHsType GhcRn] -> LHsType GhcRn -> LHsType GhcRn - longArrow inputs output = foldr (\x y -> noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) x y)) output inputs + longArrow inputs output = foldr (\x y -> noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) x y)) output inputs data_ty con | ConDeclGADT{} <- con = con_res_ty con @@ -999,7 +999,7 @@ extractRecSel nm t tvs (L _ con : rest) = case getRecConArgs_maybe con of Just (L _ fields) | ((l, L _ (ConDeclField _ _nn ty _)) : _) <- matching_fields fields -> - pure (L (noAnnSrcSpan l) (TypeSig noAnn [noLocA nm] (mkEmptyWildCardBndrs $ mkEmptySigType (noLocA (HsFunTy noExtField (HsUnrestrictedArrow noExtField) data_ty (getBangType ty)))))) + pure (L (noAnnSrcSpan l) (TypeSig noAnn [noLocA nm] (mkEmptyWildCardBndrs $ mkEmptySigType (noLocA (HsFunTy noExtField (HsUnrestrictedArrow HsArrowUseOther noExtField) data_ty (getBangType $ hsScaledThing ty)))))) _ -> extractRecSel nm t tvs rest where matching_fields :: [LConDeclField GhcRn] -> [(SrcSpan, LConDeclField GhcRn)] ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -341,7 +341,7 @@ renameMaybeInjectivityAnn renameMaybeInjectivityAnn = traverse renameInjectivityAnn renameArrow :: HsArrow GhcRn -> RnM (HsArrow DocNameI) -renameArrow (HsUnrestrictedArrow _) = return (HsUnrestrictedArrow noExtField) +renameArrow (HsUnrestrictedArrow _ _) = return (HsUnrestrictedArrow HsArrowUseOther noExtField) renameArrow (HsLinearArrow _) = return (HsLinearArrow noExtField) renameArrow (HsExplicitMult _ p) = HsExplicitMult noExtField <$> renameLType p @@ -746,7 +746,7 @@ renameGADTDetails (PrefixConGADT _ ps) = PrefixConGADT noExtField <$> mapM renam renameConDeclFieldField :: LConDeclField GhcRn -> RnM (LConDeclField DocNameI) renameConDeclFieldField (L l (ConDeclField _ names t doc)) = do names' <- mapM renameLFieldOcc names - t' <- renameLType t + t' <- renameHsScaled t doc' <- mapM renameLDocHsSyn doc return $ L (locA l) (ConDeclField noExtField names' t' doc') ===================================== utils/haddock/html-test/ref/LinearTypes.html ===================================== @@ -36,7 +36,7 @@ >Safe HaskellSafe-InferredNone a (m :: Multiplicity) b. a %m -> b
  • data C (m :: Multiplicity) = C {}
  • data G (mult :: Multiplicity) where
  • Does something polymorphic.

    data C (m :: Multiplicity) #

    A record with non-linear fields.

    Constructors

    C 

    Fields

    data G (mult :: Multiplicity) where #

    A GADT record with non-linear fields.

    Constructors

    G 

    Fields

    b unrestricted = undefined @@ -13,3 +17,10 @@ linear = linear -- | Does something polymorphic. poly :: a %m -> b poly = poly + +-- | A record with non-linear fields. +data C m = C { linC %1 :: Int, urC %Many :: Char, varC %m :: String, noC :: Bool } + +-- | A GADT record with non-linear fields. +data G mult where + G :: { linG %1 :: Int, urG %Many :: Char, varG %m :: String, noG :: Bool } -> G m ===================================== utils/haddock/latex-test/ref/LinearTypes/LinearTypes.tex ===================================== @@ -3,7 +3,8 @@ \haddockbeginheader {\haddockverb\begin{verbatim} module LinearTypes ( - unrestricted, linear, poly + unrestricted, linear, poly, C(C, linC, noC, urC, varC), + G(G, linG, noG, urG, varG) ) where\end{verbatim}} \haddockendheader @@ -27,4 +28,32 @@ poly :: forall a (m :: Multiplicity) b. a {\char '45}m -> b \end{tabular}] {\haddockbegindoc Does something polymorphic.\par} +\end{haddockdesc} +\begin{haddockdesc} +\item[\begin{tabular}{@{}l} +data C m +\end{tabular}] +{\haddockbegindoc +A record with non-linear fields.\par +\enspace \emph{Constructors}\par +\haddockbeginconstrs +\haddockdecltt{=} & \haddockdecltt{C} & \\ + & \haddocktt{\qquad \{} \haddockdecltt{linC :: Int} & \\ + & \haddocktt{\qquad ,} \haddockdecltt{urC {\char '45}'Many :: Char} & \\ + & \haddocktt{\qquad ,} \haddockdecltt{varC {\char '45}m :: String} & \\ + & \haddocktt{\qquad ,} \haddockdecltt{noC :: Bool} & \\ & \haddocktt{\qquad \}} \\ +\end{tabulary}\par} +\end{haddockdesc} +\begin{haddockdesc} +\item[\begin{tabular}{@{}l} +data G mult where +\end{tabular}] +{\haddockbegindoc +A GADT record with non-linear fields.\par +\enspace \emph{Constructors}\par +\haddockbeginconstrs +& \haddockdecltt{G} & \\ + & \qquad \haddockdecltt{::} \enspace \haddockdecltt{forall (mult :: Multiplicity).} {..} + -> G mult +\end{tabulary}\par} \end{haddockdesc} \ No newline at end of file ===================================== utils/haddock/latex-test/src/LinearTypes/LinearTypes.hs ===================================== @@ -1,7 +1,11 @@ {-# LANGUAGE Haskell2010 #-} {-# LANGUAGE LinearTypes #-} +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE GADTs #-} module LinearTypes where +import GHC.Exts (Multiplicity(..)) + -- | Does something unrestricted. unrestricted :: a -> b unrestricted = undefined @@ -13,3 +17,10 @@ linear = linear -- | Does something polymorphic. poly :: a %m -> b poly = poly + +-- | A record with non-linear fields. +data C m = C { linC %1 :: Int, urC %Many :: Char, varC %m :: String, noC :: Bool } + +-- | A GADT record with non-linear fields. +data G mult where + G :: { linG %1 :: Int, urG %Many :: Char, varG %m :: String, noG :: Bool } -> G m View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/07ccdec4fc0a3d6f938314fa2cb33f49624b8519 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/07ccdec4fc0a3d6f938314fa2cb33f49624b8519 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 17:33:29 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Thu, 07 Nov 2024 12:33:29 -0500 Subject: [Git][ghc/ghc][wip/T24359] Thinking about equalities and casts in SpecSigE Message-ID: <672cf9e9c46e9_3cc73abc98073789@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: f9cb037f by Simon Peyton Jones at 2024-11-07T17:32:54+00:00 Thinking about equalities and casts in SpecSigE - - - - - 4 changed files: - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Types/Evidence.hs - testsuite/tests/simplCore/should_compile/T5821.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -847,9 +847,10 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id ; mk_spec_call <- do { ds_call <- dsLExpr the_call ; return $ \ poly_id poly_rhs -> + mkLets ds_lhs_binds $ + mkLets ds_rhs_binds $ mkLetNonRec (localiseId poly_id) poly_rhs $ - mkLets ds_lhs_binds $ - mkLets ds_rhs_binds ds_call } + ds_call } ; finishSpecPrag mb_poly_rhs (tv_bndrs ++ lhs_evs ++ id_bndrs) core_call @@ -865,7 +866,7 @@ failBecauseOfClassOp poly_id ; return Nothing } finishSpecPrag :: Maybe CoreExpr -- See the first param of dsSpec - -> [Var] -- LHS binders + -> [Var] -- Binders, over LHS and RHS -> CoreExpr -- LHS pattern -> [Var] -> (Id -> CoreExpr -> CoreExpr) -- Make spec RHS given function body -> InlinePragma ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -50,7 +50,7 @@ import GHC.Tc.Utils.Instantiate( topInstantiate, tcInstTypeBndrs ) import GHC.Tc.Utils.Env import GHC.Tc.Types.Origin -import GHC.Tc.Types.Evidence( HsWrapper, (<.>) ) +import GHC.Tc.Types.Evidence( HsWrapper, (<.>), hsWrapperHasNoBinders ) import GHC.Tc.Types.Constraint import GHC.Tc.Zonk.TcType @@ -717,29 +717,39 @@ See `GHC.Rename.Bind.checkSpecESigShape` for the shape-check. Example: f :: forall a b. (Eq a, Eq b, Ord c) => a -> b -> c -> Bool -> blah {-# SPECIALISE forall x y. f (x::Int) y y True #-} + -- y::p We want to generate: RULE forall @p (d1::Eq Int) (d2::Eq p) (d3::Ord p) (x::Int) (y::p). f @Int @p @p d1 d2 d3 x y y True = $sf @p d1 d2 d3 x y - $sf @p (d1::Eq Int) (d2::Eq p) (d3::Ord p) (x::Int) (y::p) - = let d1a = $fEqint - d2a = d2 - d3a = d3 + $sf @p (d1a::Eq Int) (d2a::Eq p) (d3a::Ord p) (x::Int) (y::p) + = let d1 = $fEqInt + d2 = d2a + d3 = d3a in let f = - in f @p @p @Int (d1a::Eq p) (d2a::Eq p) (d3a::OrdInt) y y True + in f @p @p @Int (d1::Eq p) (d2::Eq p) (d3::Ord Int) x y y True + +In terms of the code: + spe_tv_bndrs = @p + spe_id_bndrs = x:Int y y:p + spe_lhs_ev_bndrs = (e1:Eq p) (d2:Eq p) (d3:Ord Int) + spe_lhs_call = f @p @p @Int (d1::Eq p) (d2::Eq p) (d3::Ord Int) x y y True + -- We can't meddle with this; it's a perhaps-big expression + spe_rhs_ev_bndrs = @d1a @d2a @d3a + spe_rhs_binds = { d1=$fEqInt; d2=d2a; d3=d3a } Note that -* In the RULE we have separate binders for `d1` and `d2` even though - they are the same (Eq p) dictionary. Reason: we don't want to force - them to be visibly equal at the call site. +* In the RULE we have separate binders for `d1` and `d2` even though they are + the same (Eq p) dictionary. Reason: we don't want to force them to be visibly + equal at the call site. -* The specialised function $sf takes all three dictionaries as - arguments; but the constraint solver does not use d1 (short-cut - solved). We rely on the Simplifier to drop the dead arguments. - It isn't strictly necessary to pass d2 either, but it does no harm. +* The specialised function $sf takes all three dictionaries as arguments; but + the constraint solver does not use d1 (short-cut solved). We rely on the + Simplifier to drop the dead arguments. It isn't strictly necessary to pass d2 + either, but it does no harm. Note [Handling old-form SPECIALISE pragmas] @@ -895,8 +905,10 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) do { (tv_bndrs, id_bndrs) <- tcRuleBndrs skol_info bndrs ; tcExtendNameTyVarEnv [(tyVarName tv, tv) | tv <- tv_bndrs] $ tcExtendIdEnv id_bndrs $ - do { (spec_e', rho) <- tcInferRho spec_e - ; return (id_bndrs, spec_e', rho) } } + do { (L loc spec_e', rho) <- tcInferRho spec_e + ; return (id_bndrs, L loc (unwrap_hs_expr spec_e'), rho) } } + -- unwrap_hs_expr: if the expression looks like (e |> co), simply drop `co` + -- ToDo: document this -- Solve unification constraints -- c.f. Note [The SimplifyRule Plan] step 1 @@ -922,15 +934,18 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) qtkvs lhs_evs residual_wanted -- rhs_binds uses rhs_evs to build `wanted` (NB not just `residual_wanted`) - ; let quant_wanted = emptyWC { wc_simple = quant_cts } ; rhs_evs <- mapM newEvVar quant_preds ; (implic2, rhs_binds) <- buildImplicationFor tc_lvl skol_info_anon - qtkvs rhs_evs quant_wanted + qtkvs rhs_evs + (emptyWC { wc_simple = quant_cts }) ; emitImplications (implic1 `unionBags` implic2) ; traceTc "tcSpecPrag:SpecSigE" $ - vcat [ text "tv/id bndrs:" <+> ppr qtkvs <+> ppr id_bndrs + vcat [ text "nm:" <+> ppr nm + , text "bndrs:" <+> ppr bndrs + , text "spec_e:" <+> ppr spec_e + , text "tv/id bndrs:" <+> ppr qtkvs <+> ppr id_bndrs , text "lhs_evs:" <+> ppr lhs_evs , text "rhs_evs:" <+> ppr rhs_evs , text "spec_e:" <+> ppr spec_e' @@ -944,6 +959,18 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) , spe_rhs_ev_bndrs = rhs_evs , spe_rhs_binds = rhs_binds , spe_inl = inl }] } + where + unwrap_hs_expr e +{- + | ExprWithTySig _ (L _ inner_e) _ <- e + = unwrap_hs_expr inner_e + | XExpr (WrapExpr wrap inner_e) <- e + , hsWrapperHasNoBinders wrap + = unwrap_hs_expr inner_e + | otherwise +-} + = e + tcSpecPrag _ prag = pprPanic "tcSpecPrag" (ppr prag) @@ -1457,7 +1484,7 @@ mk_quant_evs cts mk_one ct = pprPanic "mk_quant_ev" (ppr ct) getRuleQuantCts :: WantedConstraints -> (Cts, WantedConstraints) --- Extract all the constraints we can quantify over, +-- Extract all the constraints that we can quantify over, -- also returning the depleted WantedConstraints -- -- NB: we must look inside implications, because with ===================================== compiler/GHC/Tc/Types/Evidence.hs ===================================== @@ -11,7 +11,7 @@ module GHC.Tc.Types.Evidence ( mkWpEvLams, mkWpLet, mkWpFun, mkWpCastN, mkWpCastR, mkWpEta, collectHsWrapBinders, idHsWrapper, isIdHsWrapper, - pprHsWrapper, hsWrapDictBinders, + pprHsWrapper, hsWrapDictBinders, hsWrapperHasNoBinders, -- * Evidence bindings TcEvBinds(..), EvBindsVar(..), @@ -331,6 +331,19 @@ collectHsWrapBinders wrap = go wrap [] add_lam v (vs,w) = (v:vs, w) +hsWrapperHasNoBinders :: HsWrapper -> Bool +hsWrapperHasNoBinders wrap = go wrap + where + go WpHole = True + go (w1 `WpCompose` w2) = go w1 && go w2 + go (WpEvLam {}) = False + go (WpTyLam {}) = False + go (WpFun _ w _) = go w + go (WpCast {}) = True + go (WpEvApp {}) = True + go (WpTyApp {}) = True + go (WpLet {}) = False + {- ************************************************************************ * * ===================================== testsuite/tests/simplCore/should_compile/T5821.hs ===================================== @@ -9,3 +9,6 @@ foo :: Num a => a -> T a foo = undefined {-# SPECIALISE foo :: Int -> Bool #-} +{- # SPECIALISE (foo :: Int -> Bool) # -} +{- # SPECIALISE forall x. foo (x::Int) :: Bool # -} +{- # SPECIALISE forall x. (foo :: Int -> Bool) x # -} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f9cb037f22c98ad27681d5d0503ab60f0d5a8832 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f9cb037f22c98ad27681d5d0503ab60f0d5a8832 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 18:44:09 2024 From: gitlab at gitlab.haskell.org (Alan Zimmerman (@alanz)) Date: Thu, 07 Nov 2024 13:44:09 -0500 Subject: [Git][ghc/ghc][wip/az/T25454-wildcard-type-binders] EPA: Capture location of '_' for wild card type binder Message-ID: <672d0a793ba89_3cc73a36a5c48517a@gitlab.mail> Alan Zimmerman pushed to branch wip/az/T25454-wildcard-type-binders at Glasgow Haskell Compiler / GHC Commits: d431b766 by Alan Zimmerman at 2024-11-07T18:43:46+00:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - 24 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/printer/Makefile - testsuite/tests/printer/all.T - utils/check-exact/ExactPrint.hs - utils/check-exact/Main.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Interface/RenameType.hs Changes: ===================================== compiler/GHC/Hs/Type.hs ===================================== @@ -365,7 +365,11 @@ type instance XBndrNoKind (GhcPass p) = NoExtField type instance XXBndrKind (GhcPass p) = DataConCantHappen type instance XBndrVar (GhcPass p) = NoExtField -type instance XBndrWildCard (GhcPass p) = NoExtField + +type instance XBndrWildCard GhcPs = EpToken "_" +type instance XBndrWildCard GhcRn = NoExtField +type instance XBndrWildCard GhcTc = NoExtField + type instance XXBndrVar (GhcPass p) = DataConCantHappen data AnnTyVarBndr @@ -491,7 +495,9 @@ type instance XExplicitTupleTy GhcTc = [Kind] type instance XTyLit (GhcPass _) = NoExtField -type instance XWildCardTy (GhcPass _) = NoExtField +type instance XWildCardTy GhcPs = EpToken "_" +type instance XWildCardTy GhcRn = NoExtField +type instance XWildCardTy GhcTc = NoExtField type instance XXType (GhcPass _) = HsCoreTy @@ -674,8 +680,8 @@ ignoreParens ty = ty ************************************************************************ -} -mkAnonWildCardTy :: HsType GhcPs -mkAnonWildCardTy = HsWildCardTy noExtField +mkAnonWildCardTy :: EpToken "_" -> HsType GhcPs +mkAnonWildCardTy tok = HsWildCardTy tok mkHsOpTy :: (Anno (IdGhcP p) ~ SrcSpanAnnN) => PromotionFlag @@ -1413,13 +1419,13 @@ ppr_mono_ty (HsSpliceTy ext s) = ppr_mono_ty (HsExplicitListTy _ prom tys) | isPromoted prom = quote $ brackets (maybeAddSpace tys $ interpp'SP tys) | otherwise = brackets (interpp'SP tys) -ppr_mono_ty (HsExplicitTupleTy _ tys) +ppr_mono_ty (HsExplicitTupleTy _ prom tys) -- Special-case unary boxed tuples so that they are pretty-printed as -- `'MkSolo x`, not `'(x)` | [ty] <- tys - = quoteIfPunsEnabled $ sep [text (mkTupleStr Boxed dataName 1), ppr_mono_lty ty] + = quote_tuple prom $ sep [text (mkTupleStr Boxed dataName 1), ppr_mono_lty ty] | otherwise - = quoteIfPunsEnabled $ parens (maybeAddSpace tys $ interpp'SP tys) + = quote_tuple prom $ parens (maybeAddSpace tys $ interpp'SP tys) ppr_mono_ty (HsTyLit _ t) = ppr t ppr_mono_ty (HsWildCardTy {}) = char '_' @@ -1453,6 +1459,10 @@ ppr_fun_ty mult ty1 ty2 in sep [p1, arr <+> p2] +quote_tuple :: PromotionFlag -> SDoc -> SDoc +quote_tuple IsPromoted doc = quote doc +quote_tuple NotPromoted doc = doc + -------------------------- -- | @'hsTypeNeedsParens' p t@ returns 'True' if the type @t@ needs parentheses -- under precedence @p at . @@ -1482,7 +1492,7 @@ hsTypeNeedsParens p = go_hs_ty -- Special-case unary boxed tuple applications so that they are -- parenthesized as `Proxy ('MkSolo x)`, not `Proxy 'MkSolo x` (#18612) -- See Note [One-tuples] in GHC.Builtin.Types - go_hs_ty (HsExplicitTupleTy _ [_]) + go_hs_ty (HsExplicitTupleTy _ _ [_]) = p >= appPrec go_hs_ty (HsExplicitTupleTy{}) = False go_hs_ty (HsTyLit{}) = False ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -1464,7 +1464,7 @@ repTy t@(HsSpliceTy (HsUntypedSpliceTop _ _) _) = pprPanic "repTy: top level spl repTy (HsExplicitListTy _ _ tys) = do tys1 <- repLTys tys repTPromotedList tys1 -repTy (HsExplicitTupleTy _ tys) = do +repTy (HsExplicitTupleTy _ _ tys) = do tys1 <- repLTys tys tcon <- repPromotedTupleTyCon (length tys) repTapps tcon tys1 ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -1952,7 +1952,7 @@ instance ToHie (LocatedA (HsType GhcRn)) where HsExplicitListTy _ _ tys -> [ toHie tys ] - HsExplicitTupleTy _ tys -> + HsExplicitTupleTy _ _ tys -> [ toHie tys ] HsTyLit _ _ -> [] ===================================== compiler/GHC/Parser.y ===================================== @@ -2316,7 +2316,7 @@ atype :: { LHsType GhcPs } : ntgtycon {% amsA' (sL1 $1 (HsTyVar noAnn NotPromoted $1)) } -- Not including unit tuples -- See Note [%shift: atype -> tyvar] | tyvar %shift {% amsA' (sL1 $1 (HsTyVar noAnn NotPromoted $1)) } -- (See Note [Unit tuples]) - | '_' %shift { sL1a $1 $ mkAnonWildCardTy } + | '_' %shift { sL1a $1 $ mkAnonWildCardTy (epTok $1) } | '*' {% do { warnStarIsType (getLoc $1) ; return $ sL1a $1 (HsStarTy noExtField (isUnicode $1)) } } @@ -2342,14 +2342,14 @@ atype :: { LHsType GhcPs } | '(' ktype ')' {% amsA' (sLL $1 $> $ HsParTy (epTok $1, epTok $3) $2) } -- see Note [Promotion] for the followings | SIMPLEQUOTE '(' ')' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> - ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $3) []) }} + ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $3) IsPromoted []) }} | SIMPLEQUOTE gen_qcon {% amsA' (sLL $1 $> $ HsTyVar (epTok $1) IsPromoted $2) } | SIMPLEQUOTE sysdcon_nolist {% do { requireLTPuns PEP_QuoteDisambiguation $1 (reLoc $>) ; amsA' (sLL $1 $> $ HsTyVar (epTok $1) IsPromoted (L (getLoc $2) $ nameRdrName (dataConName (unLoc $2)))) }} | SIMPLEQUOTE '(' ktype ',' comma_types1 ')' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> ; h <- addTrailingCommaA $3 (epTok $4) - ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $6) (h : $5)) }} + ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $6) IsPromoted (h : $5)) }} | '[' ']' {% withCombinedComments $1 $> (mkListSyntaxTy0 (epTok $1) (epTok $2)) } | SIMPLEQUOTE '[' comma_types0 ']' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> ; amsA' (sLL $1 $> $ HsExplicitListTy (epTok $1, epTok $2, epTok $4) IsPromoted $3) }} @@ -2435,7 +2435,7 @@ tv_bndr_no_braces :: { LHsTyVarBndr Specificity GhcPs } tyvar_wc :: { Located (HsBndrVar GhcPs) } : tyvar { sL1 $1 (HsBndrVar noExtField $1) } - | '_' { sL1 $1 (HsBndrWildCard noExtField) } + | '_' { sL1 $1 (HsBndrWildCard (epTok $1)) } fds :: { Located (EpToken "|",[LHsFunDep GhcPs]) } : {- empty -} { noLoc (NoEpTok,[]) } @@ -4704,4 +4704,4 @@ combineHasLocs a b = combineSrcSpans (getHasLoc a) (getHasLoc b) fromTrailingN :: SrcSpanAnnN -> SrcSpanAnnA fromTrailingN (EpAnn anc ann cs) = EpAnn anc (AnnListItem (nann_trailing ann)) cs -} \ No newline at end of file +} ===================================== compiler/GHC/Parser/PostProcess.hs ===================================== @@ -980,8 +980,8 @@ checkTyVars pp_what equals_or_where tc tparms match_bndr_var :: HsType GhcPs -> Maybe (EpToken "'", HsBndrVar GhcPs) match_bndr_var (HsTyVar ann _ tv) | isRdrTyVar (unLoc tv) = Just (ann, HsBndrVar noExtField tv) - match_bndr_var (HsWildCardTy _) - = Just (noAnn, HsBndrWildCard noExtField) + match_bndr_var (HsWildCardTy tok) + = Just (noAnn, HsBndrWildCard tok) match_bndr_var _ = Nothing -- Return a EpaLocation for use in widenLocatedAnL. @@ -1159,7 +1159,7 @@ checkContext orig_t@(L (EpAnn l _ cs) _orig_t) = -- With NoListTuplePuns, contexts are parsed as data constructors, which causes failure -- downstream. -- This converts them just like when they are parsed as types in the punned case. - check (oparens,cparens,cs) (L _l (HsExplicitTupleTy (q,o,c) ts)) + check (oparens,cparens,cs) (L _l (HsExplicitTupleTy (q,o,c) _ ts)) = punsAllowed >>= \case True -> unprocessed False -> do @@ -3622,7 +3622,7 @@ mkTupleSyntaxTy parOpen args parClose = enabled = HsTupleTy annParen HsBoxedOrConstraintTuple args disabled = - HsExplicitTupleTy annsKeyword args + HsExplicitTupleTy annsKeyword NotPromoted args annParen = AnnParens parOpen parClose annsKeyword = (NoEpTok, parOpen, parClose) ===================================== compiler/GHC/Rename/HsType.hs ===================================== @@ -684,10 +684,10 @@ rnHsTyKi env ty@(HsExplicitListTy _ ip tys) addDiagnostic (TcRnUntickedPromotedThing $ UntickedExplicitList) ; return (HsExplicitListTy noExtField ip tys', fvs) } -rnHsTyKi env ty@(HsExplicitTupleTy _ tys) +rnHsTyKi env ty@(HsExplicitTupleTy _ ip tys) = do { checkDataKinds env ty ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys - ; return (HsExplicitTupleTy noExtField tys', fvs) } + ; return (HsExplicitTupleTy noExtField ip tys', fvs) } rnHsTyKi env (HsWildCardTy _) = do { checkAnonWildCard env @@ -955,9 +955,10 @@ bindHsQTyVars doc mb_assoc body_kv_occs hsq_bndrs thing_inside get_bndr_loc (L l tvb) = combineSrcSpans (case hsBndrVar tvb of - HsBndrWildCard _ -> - locA l -- this should rather be the location of the wildcard, - -- but we don't have it + HsBndrWildCard tok -> + case tok of + NoEpTok -> locA l + EpTok loc -> locA loc HsBndrVar _ ln -> getLocA ln) (case hsBndrKind tvb of HsBndrNoKind _ -> noSrcSpan @@ -2083,7 +2084,7 @@ extract_lty (L _ ty) acc HsSpliceTy {} -> acc -- Type splices mention no tvs HsDocTy _ ty _ -> extract_lty ty acc HsExplicitListTy _ _ tys -> extract_ltys tys acc - HsExplicitTupleTy _ tys -> extract_ltys tys acc + HsExplicitTupleTy _ _ tys -> extract_ltys tys acc HsTyLit _ _ -> acc HsStarTy _ _ -> acc HsKindSig _ ty ki -> extract_kind_sig ty ki acc ===================================== compiler/GHC/Rename/Pat.hs ===================================== @@ -1375,10 +1375,10 @@ rn_ty_pat ty@(HsExplicitListTy _ prom tys) = do tys' <- mapM rn_lty_pat tys pure (HsExplicitListTy noExtField prom tys') -rn_ty_pat ty@(HsExplicitTupleTy _ tys) = do +rn_ty_pat ty@(HsExplicitTupleTy _ prom tys) = do check_data_kinds ty tys' <- mapM rn_lty_pat tys - pure (HsExplicitTupleTy noExtField tys') + pure (HsExplicitTupleTy noExtField prom tys') rn_ty_pat tyLit@(HsTyLit src t) = do check_data_kinds tyLit ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -1027,7 +1027,7 @@ expr_to_type earg = | isBoxed boxity , Just es <- tupArgsPresent_maybe tup_args = do { ts <- traverse go es - ; return (L l (HsExplicitTupleTy noExtField ts)) } + ; return (L l (HsExplicitTupleTy noExtField NotPromoted ts)) } go (L l (ExplicitList _ es)) = do { ts <- traverse go es ; return (L l (HsExplicitListTy noExtField NotPromoted ts)) } ===================================== compiler/GHC/Tc/Gen/HsType.hs ===================================== @@ -1214,7 +1214,7 @@ tcHsType mode rn_ty@(HsExplicitListTy _ _ tys) exp_kind mk_cons k a b = mkTyConApp (promoteDataCon consDataCon) [k, a, b] mk_nil k = mkTyConApp (promoteDataCon nilDataCon) [k] -tcHsType mode rn_ty@(HsExplicitTupleTy _ tys) exp_kind +tcHsType mode rn_ty@(HsExplicitTupleTy _ _ tys) exp_kind -- using newMetaKindVar means that we force instantiations of any polykinded -- types. At first, I just used tc_infer_lhs_type, but that led to #11255. = do { ks <- replicateM arity newMetaKindVar ===================================== compiler/GHC/Tc/Gen/Pat.hs ===================================== @@ -536,7 +536,7 @@ pat_to_type (SplicePat (HsUntypedSpliceTop mod_finalizers pat) splice) = do pat_to_type (TuplePat _ pats Boxed) = do { tys <- traverse (pat_to_type . unLoc) pats - ; let t = noLocA (HsExplicitTupleTy noExtField tys) + ; let t = noLocA (HsExplicitTupleTy noExtField NotPromoted tys) ; pure t } pat_to_type (ListPat _ pats) = do { tys <- traverse (pat_to_type . unLoc) pats ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -285,7 +285,7 @@ no_anon_wc_ty lty = go lty HsBangTy _ _ ty -> go ty HsRecTy _ flds -> gos $ map (cd_fld_type . unLoc) flds HsExplicitListTy _ _ tys -> gos tys - HsExplicitTupleTy _ tys -> gos tys + HsExplicitTupleTy _ _ tys -> gos tys HsForAllTy { hst_tele = tele , hst_body = ty } -> no_anon_wc_tele tele && go ty ===================================== compiler/GHC/ThToHs.hs ===================================== @@ -1756,7 +1756,7 @@ cvtTypeKind typeOrKind ty -> mk_apps (HsTyLit noExtField (cvtTyLit lit)) tys' WildCardT - -> mk_apps mkAnonWildCardTy tys' + -> mk_apps (mkAnonWildCardTy noAnn) tys' InfixT t1 s t2 -> do { s' <- tconName s @@ -1805,7 +1805,7 @@ cvtTypeKind typeOrKind ty PromotedTupleT n | Just normals <- m_normals , normals `lengthIs` n -- Saturated - -> returnLA (HsExplicitTupleTy noAnn normals) + -> returnLA (HsExplicitTupleTy noAnn IsPromoted normals) | otherwise -> do { tuple_tc <- returnLA $ getRdrName $ tupleDataCon Boxed n ; mk_apps (HsTyVar noAnn IsPromoted tuple_tc) tys' } ===================================== compiler/Language/Haskell/Syntax/Type.hs ===================================== @@ -917,6 +917,7 @@ data HsType pass | HsExplicitTupleTy -- A promoted explicit tuple (XExplicitTupleTy pass) + PromotionFlag -- whether explicitly promoted, for pretty printer [LHsType pass] | HsTyLit (XTyLit pass) (HsTyLit pass) -- A promoted numeric literal. ===================================== testsuite/tests/parser/should_compile/KindSigs.stderr ===================================== @@ -1418,6 +1418,7 @@ (EpaSpan { KindSigs.hs:28:17 })) (EpTok (EpaSpan { KindSigs.hs:28:44 }))) + (IsPromoted) [(L (EpAnn (EpaSpan { KindSigs.hs:28:19-39 }) ===================================== testsuite/tests/printer/Makefile ===================================== @@ -886,3 +886,8 @@ Test24159: Test25132: $(CHECK_PPR) $(LIBDIR) Test25132.hs $(CHECK_EXACT) $(LIBDIR) Test25132.hs + +.PHONY: Test25454 +Test25454: + $(CHECK_PPR) $(LIBDIR) Test25454.hs + $(CHECK_EXACT) $(LIBDIR) Test25454.hs ===================================== testsuite/tests/printer/all.T ===================================== @@ -212,3 +212,5 @@ test('Test24159', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24159']) test('Test25132', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25132']) test('T24237', normal, compile_fail, ['']) + +test('Test25454', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25454']) \ No newline at end of file ===================================== utils/check-exact/ExactPrint.hs ===================================== @@ -3935,9 +3935,9 @@ instance ExactPrint (HsBndrVar GhcPs) where exact (HsBndrVar x n) = do n' <- markAnnotated n return (HsBndrVar x n') - exact (HsBndrWildCard x) = do - printStringAdvance "_" - return (HsBndrWildCard x) + exact (HsBndrWildCard t) = do + t' <- markEpToken t + return (HsBndrWildCard t') -- --------------------------------------------------------------------- @@ -4046,12 +4046,14 @@ instance ExactPrint (HsType GhcPs) where tys' <- markAnnotated tys c' <- markEpToken c return (HsExplicitListTy (sq',o',c') prom tys') - exact (HsExplicitTupleTy (sq, o, c) tys) = do - sq' <- markEpToken sq + exact (HsExplicitTupleTy (sq, o, c) prom tys) = do + sq' <- if (isPromoted prom) + then markEpToken sq + else return sq o' <- markEpToken o tys' <- markAnnotated tys c' <- markEpToken c - return (HsExplicitTupleTy (sq', o', c') tys') + return (HsExplicitTupleTy (sq', o', c') prom tys') exact (HsTyLit a lit) = do case lit of (HsNumTy src v) -> printSourceText src (show v) ===================================== utils/check-exact/Main.hs ===================================== @@ -89,7 +89,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/parser/should_compile/T14189.hs" Nothing -- "../../testsuite/tests/printer/AnnotationLet.hs" Nothing - "../../testsuite/tests/printer/AnnotationTuple.hs" Nothing + -- "../../testsuite/tests/printer/AnnotationTuple.hs" Nothing -- "../../testsuite/tests/printer/Ppr001.hs" Nothing -- "../../testsuite/tests/printer/Ppr002.hs" Nothing -- "../../testsuite/tests/printer/Ppr002a.hs" Nothing @@ -216,6 +216,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/printer/Test22765.hs" Nothing -- "../../testsuite/tests/printer/Test22771.hs" Nothing -- "../../testsuite/tests/printer/Test23465.hs" Nothing + "../../testsuite/tests/printer/Test25454.hs" Nothing -- cloneT does not need a test, function can be retired ===================================== utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs ===================================== @@ -1327,7 +1327,8 @@ ppr_mono_ty (HsRecTy{}) _ = text "{..}" ppr_mono_ty (XHsType{}) _ = error "ppr_mono_ty HsCoreTy" ppr_mono_ty (HsExplicitListTy _ IsPromoted tys) u = Pretty.quote $ brackets $ hsep $ punctuate comma $ map (ppLType u) tys ppr_mono_ty (HsExplicitListTy _ NotPromoted tys) u = brackets $ hsep $ punctuate comma $ map (ppLType u) tys -ppr_mono_ty (HsExplicitTupleTy _ tys) u = Pretty.quote $ parenList $ map (ppLType u) tys +ppr_mono_ty (HsExplicitTupleTy _ IsPromoted tys) u = Pretty.quote $ parenList $ map (ppLType u) tys +ppr_mono_ty (HsExplicitTupleTy _ NotPromoted tys) u = parenList $ map (ppLType u) tys ppr_mono_ty (HsAppTy _ fun_ty arg_ty) unicode = hsep [ppr_mono_lty fun_ty unicode, ppr_mono_lty arg_ty unicode] ppr_mono_ty (HsAppKindTy _ fun_ty arg_ki) unicode = ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs ===================================== @@ -1836,7 +1836,8 @@ ppr_mono_ty (HsRecTy{}) _ _ _ = toHtml "{..}" ppr_mono_ty (XHsType{}) _ _ _ = error "ppr_mono_ty HsCoreTy" ppr_mono_ty (HsExplicitListTy _ IsPromoted tys) u q _ = promoQuote $ brackets $ hsep $ punctuate comma $ map (ppLType u q HideEmptyContexts) tys ppr_mono_ty (HsExplicitListTy _ NotPromoted tys) u q _ = brackets $ hsep $ punctuate comma $ map (ppLType u q HideEmptyContexts) tys -ppr_mono_ty (HsExplicitTupleTy _ tys) u q _ = promoQuote $ parenList $ map (ppLType u q HideEmptyContexts) tys +ppr_mono_ty (HsExplicitTupleTy _ IsPromoted tys) u q _ = promoQuote $ parenList $ map (ppLType u q HideEmptyContexts) tys +ppr_mono_ty (HsExplicitTupleTy _ NotPromoted tys) u q _ = parenList $ map (ppLType u q HideEmptyContexts) tys ppr_mono_ty (HsAppTy _ fun_ty arg_ty) unicode qual _ = hsep [ ppr_mono_lty fun_ty unicode qual HideEmptyContexts ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -742,7 +742,7 @@ synifyType _ vs (TyConApp tc tys) = | Just dc <- isPromotedDataCon_maybe tc , isTupleDataCon dc , dataConSourceArity dc == length vis_tys = - noLocA $ HsExplicitTupleTy noExtField (map (synifyType WithinType vs) vis_tys) + noLocA $ HsExplicitTupleTy noExtField IsPromoted (map (synifyType WithinType vs) vis_tys) -- ditto for lists | getName tc == listTyConName , [ty] <- vis_tys = ===================================== utils/haddock/haddock-api/src/Haddock/GhcUtils.hs ===================================== @@ -417,7 +417,7 @@ reparenTypePrec = go go _ (HsRecTy x flds) = HsRecTy x (map (mapXRec @a reparenConDeclField) flds) go p (HsDocTy x ty d) = HsDocTy x (goL p ty) d go _ (HsExplicitListTy x p tys) = HsExplicitListTy x p (map reparenLType tys) - go _ (HsExplicitTupleTy x tys) = HsExplicitTupleTy x (map reparenLType tys) + go _ (HsExplicitTupleTy x p tys) = HsExplicitTupleTy x p (map reparenLType tys) go p (HsKindSig x ty kind) = paren p PREC_SIG $ HsKindSig x (goL PREC_SIG ty) (goL PREC_SIG kind) go p (HsIParamTy x n ty) = ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -408,12 +408,12 @@ renameType t = case t of HsExplicitListTy _ a b -> HsExplicitListTy noAnn a <$> mapM renameLType b -- Special-case unary boxed tuples so that they are pretty-printed as -- `'MkSolo x`, not `'(x)` - HsExplicitTupleTy _ [ty] -> do + HsExplicitTupleTy _ ip [ty] -> do name <- renameName (tupleDataConName Boxed 1) - let lhs = noLocA $ HsTyVar noAnn IsPromoted (noLocA name) + let lhs = noLocA $ HsTyVar noAnn ip (noLocA name) rhs <- renameLType ty return (HsAppTy noAnn lhs rhs) - HsExplicitTupleTy _ b -> HsExplicitTupleTy noAnn <$> mapM renameLType b + HsExplicitTupleTy _ ip b -> HsExplicitTupleTy noAnn ip <$> mapM renameLType b HsSpliceTy (HsUntypedSpliceTop _ st) _ -> renameType (unLoc st) HsSpliceTy (HsUntypedSpliceNested _) _ -> error "renameType: not an top level type splice" HsWildCardTy _ -> pure (HsWildCardTy noAnn) ===================================== utils/haddock/haddock-api/src/Haddock/Interface/RenameType.hs ===================================== @@ -116,8 +116,8 @@ renameType t@(HsRecTy _ _) = pure t renameType t@(XHsType _) = pure t renameType (HsExplicitListTy x ip ltys) = HsExplicitListTy x ip <$> renameLTypes ltys -renameType (HsExplicitTupleTy x ltys) = - HsExplicitTupleTy x <$> renameLTypes ltys +renameType (HsExplicitTupleTy x ip ltys) = + HsExplicitTupleTy x ip <$> renameLTypes ltys renameType t@(HsTyLit _ _) = pure t renameType (HsWildCardTy wc) = pure (HsWildCardTy wc) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d431b76695d6dd2a2d1117df340bd606e1d6570b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d431b76695d6dd2a2d1117df340bd606e1d6570b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 20:45:42 2024 From: gitlab at gitlab.haskell.org (Alan Zimmerman (@alanz)) Date: Thu, 07 Nov 2024 15:45:42 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/az/T25453-strictness Message-ID: <672d26f6c50ca_3cc73a8ec9d497268@gitlab.mail> Alan Zimmerman pushed new branch wip/az/T25453-strictness at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/az/T25453-strictness You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 7 23:38:28 2024 From: gitlab at gitlab.haskell.org (Alan Zimmerman (@alanz)) Date: Thu, 07 Nov 2024 18:38:28 -0500 Subject: [Git][ghc/ghc][wip/az/T25454-wildcard-type-binders] EPA: Capture location of '_' for wild card type binder Message-ID: <672d4f7439a27_3a74f81ccdc070954@gitlab.mail> Alan Zimmerman pushed to branch wip/az/T25454-wildcard-type-binders at Glasgow Haskell Compiler / GHC Commits: c932df0e by Alan Zimmerman at 2024-11-07T23:38:00+00:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - 25 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/printer/Makefile - + testsuite/tests/printer/Test25454.hs - testsuite/tests/printer/all.T - utils/check-exact/ExactPrint.hs - utils/check-exact/Main.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Interface/RenameType.hs Changes: ===================================== compiler/GHC/Hs/Type.hs ===================================== @@ -365,7 +365,11 @@ type instance XBndrNoKind (GhcPass p) = NoExtField type instance XXBndrKind (GhcPass p) = DataConCantHappen type instance XBndrVar (GhcPass p) = NoExtField -type instance XBndrWildCard (GhcPass p) = NoExtField + +type instance XBndrWildCard GhcPs = EpToken "_" +type instance XBndrWildCard GhcRn = NoExtField +type instance XBndrWildCard GhcTc = NoExtField + type instance XXBndrVar (GhcPass p) = DataConCantHappen data AnnTyVarBndr @@ -491,7 +495,9 @@ type instance XExplicitTupleTy GhcTc = [Kind] type instance XTyLit (GhcPass _) = NoExtField -type instance XWildCardTy (GhcPass _) = NoExtField +type instance XWildCardTy GhcPs = EpToken "_" +type instance XWildCardTy GhcRn = NoExtField +type instance XWildCardTy GhcTc = NoExtField type instance XXType (GhcPass _) = HsCoreTy @@ -674,8 +680,8 @@ ignoreParens ty = ty ************************************************************************ -} -mkAnonWildCardTy :: HsType GhcPs -mkAnonWildCardTy = HsWildCardTy noExtField +mkAnonWildCardTy :: EpToken "_" -> HsType GhcPs +mkAnonWildCardTy tok = HsWildCardTy tok mkHsOpTy :: (Anno (IdGhcP p) ~ SrcSpanAnnN) => PromotionFlag @@ -1413,13 +1419,13 @@ ppr_mono_ty (HsSpliceTy ext s) = ppr_mono_ty (HsExplicitListTy _ prom tys) | isPromoted prom = quote $ brackets (maybeAddSpace tys $ interpp'SP tys) | otherwise = brackets (interpp'SP tys) -ppr_mono_ty (HsExplicitTupleTy _ tys) +ppr_mono_ty (HsExplicitTupleTy _ prom tys) -- Special-case unary boxed tuples so that they are pretty-printed as -- `'MkSolo x`, not `'(x)` | [ty] <- tys - = quoteIfPunsEnabled $ sep [text (mkTupleStr Boxed dataName 1), ppr_mono_lty ty] + = quote_tuple prom $ sep [text (mkTupleStr Boxed dataName 1), ppr_mono_lty ty] | otherwise - = quoteIfPunsEnabled $ parens (maybeAddSpace tys $ interpp'SP tys) + = quote_tuple prom $ parens (maybeAddSpace tys $ interpp'SP tys) ppr_mono_ty (HsTyLit _ t) = ppr t ppr_mono_ty (HsWildCardTy {}) = char '_' @@ -1453,6 +1459,10 @@ ppr_fun_ty mult ty1 ty2 in sep [p1, arr <+> p2] +quote_tuple :: PromotionFlag -> SDoc -> SDoc +quote_tuple IsPromoted doc = quote doc +quote_tuple NotPromoted doc = doc + -------------------------- -- | @'hsTypeNeedsParens' p t@ returns 'True' if the type @t@ needs parentheses -- under precedence @p at . @@ -1482,7 +1492,7 @@ hsTypeNeedsParens p = go_hs_ty -- Special-case unary boxed tuple applications so that they are -- parenthesized as `Proxy ('MkSolo x)`, not `Proxy 'MkSolo x` (#18612) -- See Note [One-tuples] in GHC.Builtin.Types - go_hs_ty (HsExplicitTupleTy _ [_]) + go_hs_ty (HsExplicitTupleTy _ _ [_]) = p >= appPrec go_hs_ty (HsExplicitTupleTy{}) = False go_hs_ty (HsTyLit{}) = False ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -1464,7 +1464,7 @@ repTy t@(HsSpliceTy (HsUntypedSpliceTop _ _) _) = pprPanic "repTy: top level spl repTy (HsExplicitListTy _ _ tys) = do tys1 <- repLTys tys repTPromotedList tys1 -repTy (HsExplicitTupleTy _ tys) = do +repTy (HsExplicitTupleTy _ _ tys) = do tys1 <- repLTys tys tcon <- repPromotedTupleTyCon (length tys) repTapps tcon tys1 ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -1952,7 +1952,7 @@ instance ToHie (LocatedA (HsType GhcRn)) where HsExplicitListTy _ _ tys -> [ toHie tys ] - HsExplicitTupleTy _ tys -> + HsExplicitTupleTy _ _ tys -> [ toHie tys ] HsTyLit _ _ -> [] ===================================== compiler/GHC/Parser.y ===================================== @@ -2316,7 +2316,7 @@ atype :: { LHsType GhcPs } : ntgtycon {% amsA' (sL1 $1 (HsTyVar noAnn NotPromoted $1)) } -- Not including unit tuples -- See Note [%shift: atype -> tyvar] | tyvar %shift {% amsA' (sL1 $1 (HsTyVar noAnn NotPromoted $1)) } -- (See Note [Unit tuples]) - | '_' %shift { sL1a $1 $ mkAnonWildCardTy } + | '_' %shift { sL1a $1 $ mkAnonWildCardTy (epTok $1) } | '*' {% do { warnStarIsType (getLoc $1) ; return $ sL1a $1 (HsStarTy noExtField (isUnicode $1)) } } @@ -2342,14 +2342,14 @@ atype :: { LHsType GhcPs } | '(' ktype ')' {% amsA' (sLL $1 $> $ HsParTy (epTok $1, epTok $3) $2) } -- see Note [Promotion] for the followings | SIMPLEQUOTE '(' ')' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> - ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $3) []) }} + ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $3) IsPromoted []) }} | SIMPLEQUOTE gen_qcon {% amsA' (sLL $1 $> $ HsTyVar (epTok $1) IsPromoted $2) } | SIMPLEQUOTE sysdcon_nolist {% do { requireLTPuns PEP_QuoteDisambiguation $1 (reLoc $>) ; amsA' (sLL $1 $> $ HsTyVar (epTok $1) IsPromoted (L (getLoc $2) $ nameRdrName (dataConName (unLoc $2)))) }} | SIMPLEQUOTE '(' ktype ',' comma_types1 ')' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> ; h <- addTrailingCommaA $3 (epTok $4) - ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $6) (h : $5)) }} + ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $6) IsPromoted (h : $5)) }} | '[' ']' {% withCombinedComments $1 $> (mkListSyntaxTy0 (epTok $1) (epTok $2)) } | SIMPLEQUOTE '[' comma_types0 ']' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> ; amsA' (sLL $1 $> $ HsExplicitListTy (epTok $1, epTok $2, epTok $4) IsPromoted $3) }} @@ -2435,7 +2435,7 @@ tv_bndr_no_braces :: { LHsTyVarBndr Specificity GhcPs } tyvar_wc :: { Located (HsBndrVar GhcPs) } : tyvar { sL1 $1 (HsBndrVar noExtField $1) } - | '_' { sL1 $1 (HsBndrWildCard noExtField) } + | '_' { sL1 $1 (HsBndrWildCard (epTok $1)) } fds :: { Located (EpToken "|",[LHsFunDep GhcPs]) } : {- empty -} { noLoc (NoEpTok,[]) } @@ -4704,4 +4704,4 @@ combineHasLocs a b = combineSrcSpans (getHasLoc a) (getHasLoc b) fromTrailingN :: SrcSpanAnnN -> SrcSpanAnnA fromTrailingN (EpAnn anc ann cs) = EpAnn anc (AnnListItem (nann_trailing ann)) cs -} \ No newline at end of file +} ===================================== compiler/GHC/Parser/PostProcess.hs ===================================== @@ -980,8 +980,8 @@ checkTyVars pp_what equals_or_where tc tparms match_bndr_var :: HsType GhcPs -> Maybe (EpToken "'", HsBndrVar GhcPs) match_bndr_var (HsTyVar ann _ tv) | isRdrTyVar (unLoc tv) = Just (ann, HsBndrVar noExtField tv) - match_bndr_var (HsWildCardTy _) - = Just (noAnn, HsBndrWildCard noExtField) + match_bndr_var (HsWildCardTy tok) + = Just (noAnn, HsBndrWildCard tok) match_bndr_var _ = Nothing -- Return a EpaLocation for use in widenLocatedAnL. @@ -1159,7 +1159,7 @@ checkContext orig_t@(L (EpAnn l _ cs) _orig_t) = -- With NoListTuplePuns, contexts are parsed as data constructors, which causes failure -- downstream. -- This converts them just like when they are parsed as types in the punned case. - check (oparens,cparens,cs) (L _l (HsExplicitTupleTy (q,o,c) ts)) + check (oparens,cparens,cs) (L _l (HsExplicitTupleTy (q,o,c) _ ts)) = punsAllowed >>= \case True -> unprocessed False -> do @@ -3622,7 +3622,7 @@ mkTupleSyntaxTy parOpen args parClose = enabled = HsTupleTy annParen HsBoxedOrConstraintTuple args disabled = - HsExplicitTupleTy annsKeyword args + HsExplicitTupleTy annsKeyword NotPromoted args annParen = AnnParens parOpen parClose annsKeyword = (NoEpTok, parOpen, parClose) ===================================== compiler/GHC/Rename/HsType.hs ===================================== @@ -684,10 +684,10 @@ rnHsTyKi env ty@(HsExplicitListTy _ ip tys) addDiagnostic (TcRnUntickedPromotedThing $ UntickedExplicitList) ; return (HsExplicitListTy noExtField ip tys', fvs) } -rnHsTyKi env ty@(HsExplicitTupleTy _ tys) +rnHsTyKi env ty@(HsExplicitTupleTy _ ip tys) = do { checkDataKinds env ty ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys - ; return (HsExplicitTupleTy noExtField tys', fvs) } + ; return (HsExplicitTupleTy noExtField ip tys', fvs) } rnHsTyKi env (HsWildCardTy _) = do { checkAnonWildCard env @@ -955,9 +955,10 @@ bindHsQTyVars doc mb_assoc body_kv_occs hsq_bndrs thing_inside get_bndr_loc (L l tvb) = combineSrcSpans (case hsBndrVar tvb of - HsBndrWildCard _ -> - locA l -- this should rather be the location of the wildcard, - -- but we don't have it + HsBndrWildCard tok -> + case tok of + NoEpTok -> locA l + EpTok loc -> locA loc HsBndrVar _ ln -> getLocA ln) (case hsBndrKind tvb of HsBndrNoKind _ -> noSrcSpan @@ -2083,7 +2084,7 @@ extract_lty (L _ ty) acc HsSpliceTy {} -> acc -- Type splices mention no tvs HsDocTy _ ty _ -> extract_lty ty acc HsExplicitListTy _ _ tys -> extract_ltys tys acc - HsExplicitTupleTy _ tys -> extract_ltys tys acc + HsExplicitTupleTy _ _ tys -> extract_ltys tys acc HsTyLit _ _ -> acc HsStarTy _ _ -> acc HsKindSig _ ty ki -> extract_kind_sig ty ki acc ===================================== compiler/GHC/Rename/Pat.hs ===================================== @@ -1375,10 +1375,10 @@ rn_ty_pat ty@(HsExplicitListTy _ prom tys) = do tys' <- mapM rn_lty_pat tys pure (HsExplicitListTy noExtField prom tys') -rn_ty_pat ty@(HsExplicitTupleTy _ tys) = do +rn_ty_pat ty@(HsExplicitTupleTy _ prom tys) = do check_data_kinds ty tys' <- mapM rn_lty_pat tys - pure (HsExplicitTupleTy noExtField tys') + pure (HsExplicitTupleTy noExtField prom tys') rn_ty_pat tyLit@(HsTyLit src t) = do check_data_kinds tyLit ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -1027,7 +1027,7 @@ expr_to_type earg = | isBoxed boxity , Just es <- tupArgsPresent_maybe tup_args = do { ts <- traverse go es - ; return (L l (HsExplicitTupleTy noExtField ts)) } + ; return (L l (HsExplicitTupleTy noExtField NotPromoted ts)) } go (L l (ExplicitList _ es)) = do { ts <- traverse go es ; return (L l (HsExplicitListTy noExtField NotPromoted ts)) } ===================================== compiler/GHC/Tc/Gen/HsType.hs ===================================== @@ -1214,7 +1214,7 @@ tcHsType mode rn_ty@(HsExplicitListTy _ _ tys) exp_kind mk_cons k a b = mkTyConApp (promoteDataCon consDataCon) [k, a, b] mk_nil k = mkTyConApp (promoteDataCon nilDataCon) [k] -tcHsType mode rn_ty@(HsExplicitTupleTy _ tys) exp_kind +tcHsType mode rn_ty@(HsExplicitTupleTy _ _ tys) exp_kind -- using newMetaKindVar means that we force instantiations of any polykinded -- types. At first, I just used tc_infer_lhs_type, but that led to #11255. = do { ks <- replicateM arity newMetaKindVar ===================================== compiler/GHC/Tc/Gen/Pat.hs ===================================== @@ -536,7 +536,7 @@ pat_to_type (SplicePat (HsUntypedSpliceTop mod_finalizers pat) splice) = do pat_to_type (TuplePat _ pats Boxed) = do { tys <- traverse (pat_to_type . unLoc) pats - ; let t = noLocA (HsExplicitTupleTy noExtField tys) + ; let t = noLocA (HsExplicitTupleTy noExtField NotPromoted tys) ; pure t } pat_to_type (ListPat _ pats) = do { tys <- traverse (pat_to_type . unLoc) pats ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -285,7 +285,7 @@ no_anon_wc_ty lty = go lty HsBangTy _ _ ty -> go ty HsRecTy _ flds -> gos $ map (cd_fld_type . unLoc) flds HsExplicitListTy _ _ tys -> gos tys - HsExplicitTupleTy _ tys -> gos tys + HsExplicitTupleTy _ _ tys -> gos tys HsForAllTy { hst_tele = tele , hst_body = ty } -> no_anon_wc_tele tele && go ty ===================================== compiler/GHC/ThToHs.hs ===================================== @@ -1756,7 +1756,7 @@ cvtTypeKind typeOrKind ty -> mk_apps (HsTyLit noExtField (cvtTyLit lit)) tys' WildCardT - -> mk_apps mkAnonWildCardTy tys' + -> mk_apps (mkAnonWildCardTy noAnn) tys' InfixT t1 s t2 -> do { s' <- tconName s @@ -1805,7 +1805,7 @@ cvtTypeKind typeOrKind ty PromotedTupleT n | Just normals <- m_normals , normals `lengthIs` n -- Saturated - -> returnLA (HsExplicitTupleTy noAnn normals) + -> returnLA (HsExplicitTupleTy noAnn IsPromoted normals) | otherwise -> do { tuple_tc <- returnLA $ getRdrName $ tupleDataCon Boxed n ; mk_apps (HsTyVar noAnn IsPromoted tuple_tc) tys' } ===================================== compiler/Language/Haskell/Syntax/Type.hs ===================================== @@ -917,6 +917,7 @@ data HsType pass | HsExplicitTupleTy -- A promoted explicit tuple (XExplicitTupleTy pass) + PromotionFlag -- whether explicitly promoted, for pretty printer [LHsType pass] | HsTyLit (XTyLit pass) (HsTyLit pass) -- A promoted numeric literal. ===================================== testsuite/tests/parser/should_compile/KindSigs.stderr ===================================== @@ -1418,6 +1418,7 @@ (EpaSpan { KindSigs.hs:28:17 })) (EpTok (EpaSpan { KindSigs.hs:28:44 }))) + (IsPromoted) [(L (EpAnn (EpaSpan { KindSigs.hs:28:19-39 }) ===================================== testsuite/tests/printer/Makefile ===================================== @@ -886,3 +886,8 @@ Test24159: Test25132: $(CHECK_PPR) $(LIBDIR) Test25132.hs $(CHECK_EXACT) $(LIBDIR) Test25132.hs + +.PHONY: Test25454 +Test25454: + $(CHECK_PPR) $(LIBDIR) Test25454.hs + $(CHECK_EXACT) $(LIBDIR) Test25454.hs ===================================== testsuite/tests/printer/Test25454.hs ===================================== @@ -0,0 +1,139 @@ +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE TypeAbstractions #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE DataKinds, NoListTuplePuns #-} + +module T23501a where + +import Prelude.Experimental (List, Unit) +import Data.Kind (Type, Constraint) + +---------------------------- +-- Class declarations -- +---------------------------- + +class C1 (_ :: k) _ -- no SAKS + where f1 :: k -> Unit + +f1' :: C1 @k a b => k -> Unit +f1' @_ @a @b = f1 @_ @a @b + +type C2 :: k1 -> k2 -> Constraint +class C2 (_ :: k) _ where + f2 :: k -> Unit + +f2' :: C2 @k1 @k2 a b => k1 -> Unit +f2' @_ @_ @a @b = f2 @_ @_ @a @b + +type C3 :: k1 -> k2 -> Constraint +class C3 @k @_ _ _ where + f3 :: k -> Unit + +f3' :: C3 @k1 @k2 a b => k1 -> Unit +f3' @_ @_ @a @b = f3 @_ @_ @a @b + +--------------------------- +-- Data declarations -- +--------------------------- + +data D1 k (_ :: k) _ -- no SAKS + where MkD1 :: k -> D1 k a b + +mkD1 :: k -> D1 k a b +mkD1 = MkD1 + +type D2 :: forall (k1 :: Type) -> k1 -> k2 -> Type +data D2 k (_ :: k) _ where + MkD2 :: k -> D2 k a b + +mkD2 :: k -> D2 k a b +mkD2 = MkD2 + +type D3 :: k1 -> k2 -> Type +data D3 @k @_ _ _ = MkD3 k + +data MProxy (_ :: Type) = MPrx +data CProxy (_ :: k -> Constraint) = CPrx + +type Rec :: (k -> Type) -> List k -> Type +data Rec _ _ where + RNil :: Rec f [] + (:&) :: f x -> Rec f xs -> Rec f (x:xs) + +------------------ +-- Newtypes -- +------------------ + +newtype N1 k (_ :: k) _ -- no SAKS + = MkN1 k + +mkN1 :: k -> N1 k a b +mkN1 = MkN1 + +type N2 :: forall (k1 :: Type) -> k1 -> k2 -> Type +newtype N2 k (_ :: k) _ = MkN2 k + +mkN2 :: k -> N2 k a b +mkN2 = MkN2 + +---------------------------- +-- Open type families -- +---------------------------- + +type family OTF1 (_ :: Type -> Type) _ -- no SAKS + +type instance OTF1 f x = f x + +otf1 :: OTF1 Maybe Int -> Int +otf1 Nothing = 0 +otf1 (Just x) = x + +type OTF2 :: (Type -> Type) -> Type -> Type +type family OTF2 (_ :: Type -> Type) _ + +type instance OTF2 f x = f x + +otf2 :: OTF2 Maybe Int -> Int +otf2 Nothing = 0 +otf2 (Just x) = x + +------------------------------ +-- Closed type families -- +------------------------------ + +type family CTF1 (_ :: Type -> Type) _ -- no SAKS + where CTF1 f x = f x + +ctf1 :: CTF1 Maybe Int -> Int +ctf1 Nothing = 0 +ctf1 (Just x) = x + +type CTF2 :: (Type -> Type) -> Type -> Type +type family CTF2 (_ :: Type -> Type) _ where + CTF2 f x = f x + +ctf2 :: CTF2 Maybe Int -> Int +ctf2 Nothing = 0 +ctf2 (Just x) = x + +type CTF3 :: k1 -> k2 -> Type +type family CTF3 @_ @k _ _ + where CTF3 @_ @k _ _ = k + +ctf3 :: CTF3 a True -> Bool +ctf3 = id + +----------------------- +-- Type synonyms -- +----------------------- + +type T1 (_ :: Type -> Type) _ = () -- no SAKS + +type T2 :: (Type -> Type) -> k -> Type +type T2 (_ :: Type -> Type) _ = Unit + +type T3 :: k1 -> k2 -> Type +type T3 @_ @k _ _ = k + +type FConst _ = () ===================================== testsuite/tests/printer/all.T ===================================== @@ -212,3 +212,5 @@ test('Test24159', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24159']) test('Test25132', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25132']) test('T24237', normal, compile_fail, ['']) + +test('Test25454', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25454']) \ No newline at end of file ===================================== utils/check-exact/ExactPrint.hs ===================================== @@ -3935,9 +3935,9 @@ instance ExactPrint (HsBndrVar GhcPs) where exact (HsBndrVar x n) = do n' <- markAnnotated n return (HsBndrVar x n') - exact (HsBndrWildCard x) = do - printStringAdvance "_" - return (HsBndrWildCard x) + exact (HsBndrWildCard t) = do + t' <- markEpToken t + return (HsBndrWildCard t') -- --------------------------------------------------------------------- @@ -4046,12 +4046,14 @@ instance ExactPrint (HsType GhcPs) where tys' <- markAnnotated tys c' <- markEpToken c return (HsExplicitListTy (sq',o',c') prom tys') - exact (HsExplicitTupleTy (sq, o, c) tys) = do - sq' <- markEpToken sq + exact (HsExplicitTupleTy (sq, o, c) prom tys) = do + sq' <- if (isPromoted prom) + then markEpToken sq + else return sq o' <- markEpToken o tys' <- markAnnotated tys c' <- markEpToken c - return (HsExplicitTupleTy (sq', o', c') tys') + return (HsExplicitTupleTy (sq', o', c') prom tys') exact (HsTyLit a lit) = do case lit of (HsNumTy src v) -> printSourceText src (show v) ===================================== utils/check-exact/Main.hs ===================================== @@ -89,7 +89,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/parser/should_compile/T14189.hs" Nothing -- "../../testsuite/tests/printer/AnnotationLet.hs" Nothing - "../../testsuite/tests/printer/AnnotationTuple.hs" Nothing + -- "../../testsuite/tests/printer/AnnotationTuple.hs" Nothing -- "../../testsuite/tests/printer/Ppr001.hs" Nothing -- "../../testsuite/tests/printer/Ppr002.hs" Nothing -- "../../testsuite/tests/printer/Ppr002a.hs" Nothing @@ -216,6 +216,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/printer/Test22765.hs" Nothing -- "../../testsuite/tests/printer/Test22771.hs" Nothing -- "../../testsuite/tests/printer/Test23465.hs" Nothing + "../../testsuite/tests/printer/Test25454.hs" Nothing -- cloneT does not need a test, function can be retired ===================================== utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs ===================================== @@ -1327,7 +1327,8 @@ ppr_mono_ty (HsRecTy{}) _ = text "{..}" ppr_mono_ty (XHsType{}) _ = error "ppr_mono_ty HsCoreTy" ppr_mono_ty (HsExplicitListTy _ IsPromoted tys) u = Pretty.quote $ brackets $ hsep $ punctuate comma $ map (ppLType u) tys ppr_mono_ty (HsExplicitListTy _ NotPromoted tys) u = brackets $ hsep $ punctuate comma $ map (ppLType u) tys -ppr_mono_ty (HsExplicitTupleTy _ tys) u = Pretty.quote $ parenList $ map (ppLType u) tys +ppr_mono_ty (HsExplicitTupleTy _ IsPromoted tys) u = Pretty.quote $ parenList $ map (ppLType u) tys +ppr_mono_ty (HsExplicitTupleTy _ NotPromoted tys) u = parenList $ map (ppLType u) tys ppr_mono_ty (HsAppTy _ fun_ty arg_ty) unicode = hsep [ppr_mono_lty fun_ty unicode, ppr_mono_lty arg_ty unicode] ppr_mono_ty (HsAppKindTy _ fun_ty arg_ki) unicode = ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs ===================================== @@ -1836,7 +1836,8 @@ ppr_mono_ty (HsRecTy{}) _ _ _ = toHtml "{..}" ppr_mono_ty (XHsType{}) _ _ _ = error "ppr_mono_ty HsCoreTy" ppr_mono_ty (HsExplicitListTy _ IsPromoted tys) u q _ = promoQuote $ brackets $ hsep $ punctuate comma $ map (ppLType u q HideEmptyContexts) tys ppr_mono_ty (HsExplicitListTy _ NotPromoted tys) u q _ = brackets $ hsep $ punctuate comma $ map (ppLType u q HideEmptyContexts) tys -ppr_mono_ty (HsExplicitTupleTy _ tys) u q _ = promoQuote $ parenList $ map (ppLType u q HideEmptyContexts) tys +ppr_mono_ty (HsExplicitTupleTy _ IsPromoted tys) u q _ = promoQuote $ parenList $ map (ppLType u q HideEmptyContexts) tys +ppr_mono_ty (HsExplicitTupleTy _ NotPromoted tys) u q _ = parenList $ map (ppLType u q HideEmptyContexts) tys ppr_mono_ty (HsAppTy _ fun_ty arg_ty) unicode qual _ = hsep [ ppr_mono_lty fun_ty unicode qual HideEmptyContexts ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -742,7 +742,7 @@ synifyType _ vs (TyConApp tc tys) = | Just dc <- isPromotedDataCon_maybe tc , isTupleDataCon dc , dataConSourceArity dc == length vis_tys = - noLocA $ HsExplicitTupleTy noExtField (map (synifyType WithinType vs) vis_tys) + noLocA $ HsExplicitTupleTy noExtField IsPromoted (map (synifyType WithinType vs) vis_tys) -- ditto for lists | getName tc == listTyConName , [ty] <- vis_tys = ===================================== utils/haddock/haddock-api/src/Haddock/GhcUtils.hs ===================================== @@ -417,7 +417,7 @@ reparenTypePrec = go go _ (HsRecTy x flds) = HsRecTy x (map (mapXRec @a reparenConDeclField) flds) go p (HsDocTy x ty d) = HsDocTy x (goL p ty) d go _ (HsExplicitListTy x p tys) = HsExplicitListTy x p (map reparenLType tys) - go _ (HsExplicitTupleTy x tys) = HsExplicitTupleTy x (map reparenLType tys) + go _ (HsExplicitTupleTy x p tys) = HsExplicitTupleTy x p (map reparenLType tys) go p (HsKindSig x ty kind) = paren p PREC_SIG $ HsKindSig x (goL PREC_SIG ty) (goL PREC_SIG kind) go p (HsIParamTy x n ty) = ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -408,12 +408,12 @@ renameType t = case t of HsExplicitListTy _ a b -> HsExplicitListTy noAnn a <$> mapM renameLType b -- Special-case unary boxed tuples so that they are pretty-printed as -- `'MkSolo x`, not `'(x)` - HsExplicitTupleTy _ [ty] -> do + HsExplicitTupleTy _ ip [ty] -> do name <- renameName (tupleDataConName Boxed 1) - let lhs = noLocA $ HsTyVar noAnn IsPromoted (noLocA name) + let lhs = noLocA $ HsTyVar noAnn ip (noLocA name) rhs <- renameLType ty return (HsAppTy noAnn lhs rhs) - HsExplicitTupleTy _ b -> HsExplicitTupleTy noAnn <$> mapM renameLType b + HsExplicitTupleTy _ ip b -> HsExplicitTupleTy noAnn ip <$> mapM renameLType b HsSpliceTy (HsUntypedSpliceTop _ st) _ -> renameType (unLoc st) HsSpliceTy (HsUntypedSpliceNested _) _ -> error "renameType: not an top level type splice" HsWildCardTy _ -> pure (HsWildCardTy noAnn) ===================================== utils/haddock/haddock-api/src/Haddock/Interface/RenameType.hs ===================================== @@ -116,8 +116,8 @@ renameType t@(HsRecTy _ _) = pure t renameType t@(XHsType _) = pure t renameType (HsExplicitListTy x ip ltys) = HsExplicitListTy x ip <$> renameLTypes ltys -renameType (HsExplicitTupleTy x ltys) = - HsExplicitTupleTy x <$> renameLTypes ltys +renameType (HsExplicitTupleTy x ip ltys) = + HsExplicitTupleTy x ip <$> renameLTypes ltys renameType t@(HsTyLit _ _) = pure t renameType (HsWildCardTy wc) = pure (HsWildCardTy wc) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c932df0ee90348b6d6f179f001dbc981b66189f1 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c932df0ee90348b6d6f179f001dbc981b66189f1 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 00:28:15 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 07 Nov 2024 19:28:15 -0500 Subject: [Git][ghc/ghc][master] Handle the special ghc-prim:GHC.Prim module in the compiler Message-ID: <672d5b1f58130_3a74f848ab70768e3@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - 5 changed files: - compiler/GHC/Driver/Main.hs - compiler/GHC/Tc/Module.hs - hadrian/src/Rules/Documentation.hs - libraries/ghc-prim/Setup.hs - libraries/ghc-prim/ghc-prim.cabal Changes: ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -1215,12 +1215,17 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h -- -- We usually desugar even when we are not generating code, otherwise we -- would miss errors thrown by the desugaring (see #10600). The only - -- exceptions are when the Module is Ghc.Prim or when it is not a - -- HsSrcFile Module. - mb_desugar <- - if ms_mod summary /= gHC_PRIM && hsc_src == HsSrcFile - then Just <$> hscDesugar' (ms_location summary) tc_result - else pure Nothing + -- exception is when it is not a HsSrcFile module. + mb_desugar <- if + | hsc_src /= HsSrcFile -> pure Nothing + -- Desugar an empty ghc-prim:GHC.Prim module by filtering out all its + -- bindings: the reason is that some of them are invalid (such as top-level + -- unlifted ones like void# or proxy#) and cause HsToCore failures. + -- + -- We still need to desugar *something* because the driver and the linkers + -- expect a valid object file (.o) to be generated for this module. + | ms_mod summary == gHC_PRIM -> Just <$> hscDesugar' (ms_location summary) (tc_result { tcg_binds = [] }) + | otherwise -> Just <$> hscDesugar' (ms_location summary) tc_result -- Report the warnings from both typechecking and desugar together w <- getDiagnostics ===================================== compiler/GHC/Tc/Module.hs ===================================== @@ -975,6 +975,13 @@ checkHiBootIface' = do { traceTc "checkHiBootIface" $ vcat [ ppr boot_type_env, ppr boot_exports ] + ; mod <- tcg_mod <$> getGblEnv + + -- don't perform type-checking for ghc-prim:GHC.Prim module. + -- The interface (see ghcPrimIface in GHC.Iface.Load) exports entities + -- not found in the module code. + ; if mod == gHC_PRIM then pure [] else do { + ; gre_env <- getGlobalRdrEnv -- Check the exports of the boot module, one by one @@ -994,7 +1001,7 @@ checkHiBootIface' ; failIfErrsM - ; return (fld_prs ++ dfun_prs) } + ; return (fld_prs ++ dfun_prs) }} where boot_dfun_names = map idName boot_dfuns ===================================== hadrian/src/Rules/Documentation.hs ===================================== @@ -12,10 +12,9 @@ import Hadrian.BuildPath import Hadrian.Haskell.Cabal import Hadrian.Haskell.Cabal.Type -import Rules.Generate (ghcPrimDependencies) import Base import Context -import Expression (getContextData, interpretInContext, (?), package) +import Expression (getContextData, interpretInContext) import Flavour import Oracles.ModuleFiles import Oracles.Setting (topDirectory) @@ -287,14 +286,7 @@ buildPackageDocumentation = do dep_pkgs <- sequence [pkgConfFile (context { way = haddockWay, Context.package = p}) | (p, _) <- haddocks] - -- `ghc-prim` has a source file for 'GHC.Prim' which is generated just - -- for Haddock. We need to 'union' (instead of '++') to avoid passing - -- 'GHC.PrimopWrappers' (which unfortunately shows up in both - -- `generatedSrcs` and `vanillaSrcs`) to Haddock twice. - generatedSrcs <- interpretInContext context (Expression.package ghcPrim ? ghcPrimDependencies) - vanillaSrcs <- hsSources context - let srcs = vanillaSrcs `union` generatedSrcs - + srcs <- hsSources context need $ srcs ++ (map snd haddocks) ++ dep_pkgs statsFilesDir <- haddockStatsFilesDir ===================================== libraries/ghc-prim/Setup.hs ===================================== @@ -19,43 +19,14 @@ import System.Directory main :: IO () main = do let hooks = simpleUserHooks { - regHook = addPrimModule - $ regHook simpleUserHooks, buildHook = build_primitive_sources $ buildHook simpleUserHooks, - haddockHook = addPrimModuleForHaddock - $ build_primitive_sources + haddockHook = build_primitive_sources $ haddockHook simpleUserHooks } defaultMainWithHooks hooks type Hook a = PackageDescription -> LocalBuildInfo -> UserHooks -> a -> IO () -addPrimModule :: Hook a -> Hook a -addPrimModule f pd lbi uhs x = - do let -- I'm not sure which one of these we actually need to change. - -- It seems bad that there are two. - pd' = addPrimModuleToPD pd - lpd = addPrimModuleToPD (localPkgDescr lbi) - lbi' = lbi { localPkgDescr = lpd } - f pd' lbi' uhs x - -addPrimModuleForHaddock :: Hook a -> Hook a -addPrimModuleForHaddock f pd lbi uhs x = - do let pc = withPrograms lbi - pc' = userSpecifyArgs "haddock" ["GHC/Prim.hs"] pc - lbi' = lbi { withPrograms = pc' } - f pd lbi' uhs x - -addPrimModuleToPD :: PackageDescription -> PackageDescription -addPrimModuleToPD pd = - case library pd of - Just lib -> - let ems = fromJust (simpleParse "GHC.Prim") : exposedModules lib - lib' = lib { exposedModules = ems } - in pd { library = Just lib' } - Nothing -> - error "Expected a library, but none found" - build_primitive_sources :: Hook a -> Hook a build_primitive_sources f pd lbi uhs x = do when (compilerFlavor (compiler lbi) == GHC) $ do ===================================== libraries/ghc-prim/ghc-prim.cabal ===================================== @@ -53,6 +53,7 @@ Library GHC.Debug GHC.Magic GHC.Magic.Dict + GHC.Prim GHC.Prim.Ext GHC.Prim.Panic GHC.Prim.Exception @@ -61,8 +62,9 @@ Library GHC.Tuple GHC.Types - virtual-modules: + autogen-modules: GHC.Prim + GHC.PrimopWrappers -- OS Specific if os(windows) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d8f8a1c387b39d3284597b229916cdd0f957c5c0 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d8f8a1c387b39d3284597b229916cdd0f957c5c0 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 00:28:45 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 07 Nov 2024 19:28:45 -0500 Subject: [Git][ghc/ghc][master] Clean up obsolete CPP guarded code paths from the tree Message-ID: <672d5b3d9e3dd_3a74f84ca4a0796b4@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 30 changed files: - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Platform/Ways.hs - compiler/GHC/Prelude/Basic.hs - compiler/GHC/SysTools/Process.hs - compiler/GHC/Utils/Binary.hs - compiler/GHC/Utils/GlobalVars.hs - compiler/GHC/Utils/Touch.hs - compiler/Language/Haskell/Syntax/Extension.hs - compiler/cbits/genSym.c - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - libraries/base/tests/dynamic002.hs - libraries/base/tests/foldableArray.hs - libraries/ghc-bignum/src/GHC/Num/Integer.hs - libraries/ghc-bignum/src/GHC/Num/Primitives.hs - libraries/ghc-boot/GHC/BaseDir.hs - libraries/ghc-boot/GHC/Data/ShortText.hs - libraries/ghc-boot/GHC/Utils/Encoding/UTF8.hs - libraries/ghc-heap/GHC/Exts/Heap.hs - libraries/ghc-heap/GHC/Exts/Heap/Closures.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a55adc8e3fda2e93949c896461fd5d6913a2e03c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a55adc8e3fda2e93949c896461fd5d6913a2e03c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 00:29:27 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 07 Nov 2024 19:29:27 -0500 Subject: [Git][ghc/ghc][master] Remove obsolete executable wrappers from the tree Message-ID: <672d5b6713382_3a74f84b3e94824d7@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 5 changed files: - − ghc/ghc.wrapper - − utils/ghc-pkg/ghc-pkg.wrapper - − utils/haddock/haddock.wrapper - − utils/hp2ps/hp2ps.wrapper - − utils/runghc/runghc.wrapper Changes: ===================================== ghc/ghc.wrapper deleted ===================================== @@ -1 +0,0 @@ -exec "$executablename" -B"$topdir" ${1+"$@"} ===================================== utils/ghc-pkg/ghc-pkg.wrapper deleted ===================================== @@ -1,5 +0,0 @@ -#!/bin/sh - -PKGCONF="$topdir/package.conf.d" -exec "$executablename" --global-package-db "$PKGCONF" ${1+"$@"} - ===================================== utils/haddock/haddock.wrapper deleted ===================================== @@ -1,3 +0,0 @@ -#!/bin/sh - -exec "$executablename" -B"$topdir" -l"$topdir" ${1+"$@"} ===================================== utils/hp2ps/hp2ps.wrapper deleted ===================================== @@ -1,2 +0,0 @@ -#!/bin/sh -exec "$executablename" ${1+"$@"} ===================================== utils/runghc/runghc.wrapper deleted ===================================== @@ -1,3 +0,0 @@ -#!/bin/sh - -exec "$executablename" -f "$bindir/$ghcprog" ${1+"$@"} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ede97f3431cba9394904751762b9ab1a59dde0e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ede97f3431cba9394904751762b9ab1a59dde0e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 00:30:05 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 07 Nov 2024 19:30:05 -0500 Subject: [Git][ghc/ghc][master] TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Message-ID: <672d5b8d7234f_3a74f84e2e6085692@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - 3 changed files: - compiler/GHC/Tc/Errors/Ppr.hs - testsuite/tests/overloadedrecflds/should_fail/NFSDuplicate.stderr - testsuite/tests/rename/should_fail/rn_dup.stderr Changes: ===================================== compiler/GHC/Tc/Errors/Ppr.hs ===================================== @@ -3253,8 +3253,8 @@ instance Diagnostic TcRnMessage where -> noHints TcRnUnusedImport{} -> noHints - TcRnDuplicateDecls{} - -> noHints + TcRnDuplicateDecls _ fs + -> [suggestExtension LangExt.DuplicateRecordFields | all isFieldName fs] TcRnPackageImportsDisabled -> [suggestExtension LangExt.PackageImports] TcRnIllegalDataCon{} ===================================== testsuite/tests/overloadedrecflds/should_fail/NFSDuplicate.stderr ===================================== @@ -1,5 +1,7 @@ - NFSDuplicate.hs:8:16: error: [GHC-29916] Multiple declarations of ‘foo’ Declared at: NFSDuplicate.hs:7:16 NFSDuplicate.hs:8:16 + Suggested fix: + Perhaps you intended to use the ‘DuplicateRecordFields’ extension + ===================================== testsuite/tests/rename/should_fail/rn_dup.stderr ===================================== @@ -1,4 +1,3 @@ - rn_dup.hs:9:10: error: [GHC-29916] Multiple declarations of ‘MkT’ Declared at: rn_dup.hs:7:16 @@ -16,6 +15,8 @@ rn_dup.hs:12:16: error: [GHC-29916] Multiple declarations of ‘rf’ Declared at: rn_dup.hs:11:27 rn_dup.hs:12:16 + Suggested fix: + Perhaps you intended to use the ‘DuplicateRecordFields’ extension rn_dup.hs:17:3: error: [GHC-29916] Multiple declarations of ‘CT’ @@ -26,3 +27,4 @@ rn_dup.hs:18:3: error: [GHC-29916] Multiple declarations of ‘f’ Declared at: rn_dup.hs:16:3 rn_dup.hs:18:3 + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7d42b2df006c50aecfeea6f6a53b9b198f5764bf -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7d42b2df006c50aecfeea6f6a53b9b198f5764bf You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 10:55:26 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Fri, 08 Nov 2024 05:55:26 -0500 Subject: [Git][ghc/ghc][wip/sv/T25246-a] 10 commits: Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial Message-ID: <672dee1e6fa2c_17cafd1f615c715a8@gitlab.mail> Sjoerd Visscher pushed to branch wip/sv/T25246-a at Glasgow Haskell Compiler / GHC Commits: 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - d14f27e2 by Sjoerd Visscher at 2024-11-08T11:55:16+01:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 4db26d4a by Sjoerd Visscher at 2024-11-08T11:55:17+01:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Platform/Ways.hs - compiler/GHC/Prelude/Basic.hs - compiler/GHC/SysTools/Process.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Finder/Types.hs - compiler/GHC/Unit/Module/Env.hs - compiler/GHC/Unit/Module/Location.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a5229dbf702290f5db4b0da89a53d98b0c645d1a...4db26d4a90739caa530859adeb0d404675ae2fa5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a5229dbf702290f5db4b0da89a53d98b0c645d1a...4db26d4a90739caa530859adeb0d404675ae2fa5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 11:04:18 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Fri, 08 Nov 2024 06:04:18 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 3 commits: Deriving Ord: compare and <= only Message-ID: <672df0328fd03_17cafd3ee20c7426f@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: 3d068f70 by Rodrigo Mesquita at 2024-11-08T11:04:06+00:00 Deriving Ord: compare and <= only Since the implementation of CLC proposal #24, the default implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`. This means we no longer need to generate implementations for these methods when stock deriving `Ord`. Rather, just derive the implementation of `compare` and `<=`, and rely on the default implementations for the others. - - - - - 6e556741 by Rodrigo Mesquita at 2024-11-08T11:04:07+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - c8e109ec by Rodrigo Mesquita at 2024-11-08T11:04:07+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 6 changed files: - compiler/GHC/Tc/Deriv/Functor.hs - compiler/GHC/Tc/Deriv/Generate.hs - testsuite/tests/deriving/should_compile/T14682.stderr - testsuite/tests/deriving/should_compile/T20496.stderr - testsuite/tests/typecheck/should_fail/T15883c.stderr - testsuite/tests/typecheck/should_fail/T15883e.stderr Changes: ===================================== compiler/GHC/Tc/Deriv/Functor.hs ===================================== @@ -689,9 +689,18 @@ mkSimpleConMatch2 ctxt fold extra_pats con insides = do con_expr | null asWithTyVar = nlHsApps con_name asWithoutTyVar | otherwise = - let bs = filterByList argTysTyVarInfo bs_RDRs - vars = filterByLists argTysTyVarInfo bs_Vars as_Vars - in mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) + let -- All trailing b-args can be eta-reduced: + -- (\b1 b2 b3 -> A b1 a2 b2 b3) ==> (\b1 -> A b1 a2) + -- This improves the number of allocations needed to compile + -- the generated code (it is not relevant for correctness) + -- We do this by counting the n of args to keep + keep_n = length $ dropWhileEndLE (== True) argTysTyVarInfo + bs = filterByList (take keep_n argTysTyVarInfo) bs_RDRs + vars = take keep_n $ + filterByLists argTysTyVarInfo bs_Vars as_Vars + in if keep_n == 0 + then nlHsVar con_name + else mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) rhs <- fold con_expr exps return $ mkMatch ctxt (noLocA (extra_pats ++ [pat])) rhs emptyLocalBinds ===================================== compiler/GHC/Tc/Deriv/Generate.hs ===================================== @@ -339,7 +339,7 @@ Several special cases: See function unliftedOrdOp Note [Game plan for deriving Ord] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's a bad idea to define only 'compare', and build the other binary comparisons on top of it; see #2130, #4019. Reason: we don't want to laboriously make a three-way comparison, only to extract a @@ -350,16 +350,22 @@ binary result, something like this: True -> False False -> True -This being said, we can get away with generating full code only for -'compare' and '<' thus saving us generation of other three operators. -Other operators can be cheaply expressed through '<': -a <= b = not $ b < a -a > b = b < a -a >= b = not $ a < b - So for sufficiently small types (few constructors, or all nullary) we generate all methods; for large ones we just use 'compare'. +This being said, we can get away with generating full code only for +'compare' and '<=' thus saving us generation of other three operators. +Other operators can be cheaply expressed through '<=' -- indeed, that's what +the default implementations of >, <, and >= do. + +Historically, derived instances defined '<' and the remaining operators as +cheap expressions in function of it: + a <= b = not $ b < a + a > b = b < a + a >= b = not $ a < b +but since the CLC proposal #24 (see 8f174e06185143674d6cbfee75c30e68805d85b8), +it suffices to derive '<=' and rely on the +default implementation for the others. -} data OrdOp = OrdCompare | OrdLT | OrdLE | OrdGE | OrdGT @@ -417,19 +423,10 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon other_ops | (last_tag - first_tag) <= 2 -- 1-3 constructors || null non_nullary_cons -- Or it's an enumeration - = [mkOrdOp OrdLT, lE, gT, gE] + = [mkOrdOp OrdLE] | otherwise = [] - negate_expr = nlHsApp (nlHsVar not_RDR) - pats = noLocA [a_Pat, b_Pat] - lE = mkSimpleGeneratedFunBind loc le_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr) - gT = mkSimpleGeneratedFunBind loc gt_RDR pats $ - nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr - gE = mkSimpleGeneratedFunBind loc ge_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) a_Expr) b_Expr) - get_tag con = dataConTag con - fIRST_TAG -- We want *zero-based* tags, because that's what -- con2Tag returns (generated by untag_Expr)! @@ -1407,7 +1404,7 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gfoldl_eqn con = ([nlVarPat k_RDR, z_Pat, nlConVarPat con_name as_needed], - foldl' mk_k_app (z_Expr `nlHsApp` (eta_expand_data_con con)) as_needed) + foldl' mk_k_app (z_Expr `nlHsApp` (nlHsVar (getRdrName con))) as_needed) where con_name :: RdrName con_name = getRdrName con @@ -1427,18 +1424,9 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gunfold_alt dc = mkHsCaseAlt (mk_unfold_pat dc) (mk_unfold_rhs dc) mk_unfold_rhs dc = foldr nlHsApp - (z_Expr `nlHsApp` (eta_expand_data_con dc)) + (z_Expr `nlHsApp` (nlHsVar (getRdrName dc))) (replicate (dataConSourceArity dc) (nlHsVar k_RDR)) - eta_expand_data_con dc = - mkHsLam (noLocA eta_expand_pats) - (foldl nlHsApp (nlHsVar (getRdrName dc)) eta_expand_hsvars) - where - eta_expand_pats = map nlVarPat eta_expand_vars - eta_expand_hsvars = map nlHsVar eta_expand_vars - eta_expand_vars = take (dataConSourceArity dc) as_RDRs - - mk_unfold_pat dc -- Last one is a wild-pat, to avoid -- redundant test, and annoying warning | tag-fIRST_TAG == n_cons-1 = nlWildPat -- Last constructor @@ -2570,10 +2558,9 @@ as_RDRs = [ mkVarUnqual (mkFastString ("a"++show i)) | i <- [(1::Int) .. bs_RDRs = [ mkVarUnqual (mkFastString ("b"++show i)) | i <- [(1::Int) .. ] ] cs_RDRs = [ mkVarUnqual (mkFastString ("c"++show i)) | i <- [(1::Int) .. ] ] -a_Expr, b_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, +a_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, true_Expr, pure_Expr, unsafeCodeCoerce_Expr :: LHsExpr GhcPs a_Expr = nlHsVar a_RDR -b_Expr = nlHsVar b_RDR c_Expr = nlHsVar c_RDR z_Expr = nlHsVar z_RDR ltTag_Expr = nlHsVar ltTag_RDR ===================================== testsuite/tests/deriving/should_compile/T14682.stderr ===================================== @@ -26,9 +26,8 @@ Derived class instances: instance GHC.Internal.Data.Data.Data T14682.Foo where GHC.Internal.Data.Data.gfoldl k z (T14682.Foo a1 a2) - = ((z (\ a1 a2 -> T14682.Foo a1 a2) `k` a1) `k` a2) - GHC.Internal.Data.Data.gunfold k z _ - = k (k (z (\ a1 a2 -> T14682.Foo a1 a2))) + = ((z T14682.Foo `k` a1) `k` a2) + GHC.Internal.Data.Data.gunfold k z _ = k (k (z T14682.Foo)) GHC.Internal.Data.Data.toConstr (T14682.Foo _ _) = $cFoo GHC.Internal.Data.Data.dataTypeOf _ = $tFoo @@ -47,18 +46,15 @@ Derived class instances: GHC.Types.LT -> GHC.Types.LT GHC.Types.EQ -> (a2 `GHC.Classes.compare` b2) GHC.Types.GT -> GHC.Types.GT - (GHC.Classes.<) a b + (GHC.Classes.<=) a b = case a of T14682.Foo a1 a2 -> case b of T14682.Foo b1 b2 -> case (GHC.Classes.compare a1 b1) of GHC.Types.LT -> GHC.Types.True - GHC.Types.EQ -> (a2 GHC.Classes.< b2) + GHC.Types.EQ -> (a2 GHC.Classes.<= b2) GHC.Types.GT -> GHC.Types.False - (GHC.Classes.<=) a b = GHC.Classes.not ((GHC.Classes.<) b a) - (GHC.Classes.>) a b = (GHC.Classes.<) b a - (GHC.Classes.>=) a b = GHC.Classes.not ((GHC.Classes.<) a b) instance GHC.Internal.Ix.Ix T14682.Foo where GHC.Internal.Ix.range (T14682.Foo a1 a2, T14682.Foo b1 b2) @@ -178,6 +174,24 @@ GHC.Classes.Eq [T14682.Foo] +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.<) = GHC.Classes.$dm< @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>) = GHC.Classes.$dm> @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>=) = GHC.Classes.$dm>= @T14682.Foo + + + ==================== Filling in method body ==================== GHC.Classes.Ord [T14682.Foo] GHC.Classes.max = GHC.Classes.$dmmax @T14682.Foo ===================================== testsuite/tests/deriving/should_compile/T20496.stderr ===================================== @@ -32,5 +32,5 @@ rnd null (MkT _) = False instance Traversable T where - traverse f (MkT a1) = fmap (\ b1 -> MkT b1) (f a1) + traverse f (MkT a1) = fmap MkT (f a1) ===================================== testsuite/tests/typecheck/should_fail/T15883c.stderr ===================================== @@ -1,4 +1,3 @@ - T15883c.hs:14:1: error: [GHC-39999] • No instance for ‘Eq (Foo LiftedRep)’ arising from the superclasses of an instance declaration @@ -22,7 +21,7 @@ T15883c.hs:14:1: error: [GHC-39999] To see the code I am typechecking, use -ddump-deriv T15883c.hs:14:1: error: [GHC-39999] - • Ambiguous type variable ‘a1’ arising from a use of ‘<’ + • Ambiguous type variable ‘a1’ arising from a use of ‘<=’ prevents the constraint ‘(Ord a1)’ from being solved. Probable fix: use a type annotation to specify what ‘a1’ should be. Potentially matching instances: @@ -31,9 +30,10 @@ T15883c.hs:14:1: error: [GHC-39999] ...plus 24 others ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the expression: a1 < b1 - In a case alternative: MkFoo b1 -> (a1 < b1) - In the expression: case b of MkFoo b1 -> (a1 < b1) - When typechecking the code for ‘<’ + • In the expression: a1 <= b1 + In a case alternative: MkFoo b1 -> (a1 <= b1) + In the expression: case b of MkFoo b1 -> (a1 <= b1) + When typechecking the code for ‘<=’ in a derived instance for ‘Ord (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883e.stderr ===================================== @@ -1,71 +1,26 @@ - -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘d0’ arising from a use of ‘k’ - prevents the constraint ‘(Data d0)’ from being solved. - Probable fix: use a type annotation to specify what ‘d0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: z (\ a1 -> MkFoo a1) `k` a1 - In an equation for ‘GHC.Internal.Data.Data.gfoldl’: - GHC.Internal.Data.Data.gfoldl k z (MkFoo a1) - = (z (\ a1 -> MkFoo a1) `k` a1) - When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ - -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘d0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘d0’ with ‘forall a. a’ + Expected: d0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘d0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘z MkFoo’ + In the expression: z MkFoo `k` a1 When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: d0 (bound at T15883e.hs:16:1) -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘b0’ arising from a use of ‘k’ - prevents the constraint ‘(Data b0)’ from being solved. - Probable fix: use a type annotation to specify what ‘b0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: k (z (\ a1 -> MkFoo a1)) - In an equation for ‘GHC.Internal.Data.Data.gunfold’: - GHC.Internal.Data.Data.gunfold k z _ = k (z (\ a1 -> MkFoo a1)) +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘b0’ with ‘forall a. a’ + Expected: b0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘b0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘(z MkFoo)’ + In the expression: k (z MkFoo) When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘b0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ - When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: b0 (bound at T15883e.hs:16:1) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/37b40db8ec8b362ee8bd5e1da9eba025648ae2cc...c8e109ec4d8542956b80ecf591ef8faea18b28eb -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/37b40db8ec8b362ee8bd5e1da9eba025648ae2cc...c8e109ec4d8542956b80ecf591ef8faea18b28eb You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 12:32:36 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Fri, 08 Nov 2024 07:32:36 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <672e04e413cb7_17cafd9827cc8063e@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: 02a078eb by Sjoerd Visscher at 2024-11-08T13:32:29+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hoogle.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/html-test/ref/LinearTypes.html - utils/haddock/html-test/src/LinearTypes.hs - utils/haddock/latex-test/ref/LinearTypes/LinearTypes.tex The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/02a078eb527c900c5dfcbec1f05a6e4a4aad0fe8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/02a078eb527c900c5dfcbec1f05a6e4a4aad0fe8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 16:50:45 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 08 Nov 2024 11:50:45 -0500 Subject: [Git][ghc/ghc][wip/T25445] Don't clone Ids Message-ID: <672e41652b971_36b723173ea08774d@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445 at Glasgow Haskell Compiler / GHC Commits: 8c02e330 by Simon Peyton Jones at 2024-11-08T16:50:27+00:00 Don't clone Ids - - - - - 1 changed file: - compiler/GHC/Core/Lint.hs Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -45,7 +45,6 @@ import GHC.Core import GHC.Core.FVs import GHC.Core.Utils import GHC.Core.Stats ( coreBindsStats ) -import GHC.Core.Subst ( lookupIdSubst ) import GHC.Core.DataCon import GHC.Core.Ppr import GHC.Core.Coercion @@ -96,15 +95,17 @@ import GHC.Utils.Error import qualified GHC.Utils.Error as Err import GHC.Utils.Logger +import GHC.Data.Pair +import GHC.Data.Maybe( orElse ) +import GHC.Base (oneShot) +import GHC.Data.Unboxed + import Control.Monad import Data.Foldable ( for_, toList ) import Data.List.NonEmpty ( NonEmpty(..), groupWith ) import Data.Maybe import Data.IntMap.Strict ( IntMap ) import qualified Data.IntMap.Strict as IntMap ( lookup, keys, empty, fromList ) -import GHC.Data.Pair -import GHC.Base (oneShot) -import GHC.Data.Unboxed {- Note [Core Lint guarantee] @@ -1011,12 +1012,12 @@ lintCoreExpr (Coercion co) ; return (mkCoercionType role lty rty, zeroUE) } ---------------------- -lintIdOcc :: Var -> Int -- Number of arguments (type or value) being passed +lintIdOcc :: InId -> Int -- Number of arguments (type or value) being passed -> LintM (OutType, UsageEnv) -- returns type of the *variable* -lintIdOcc var nargs - = addLoc (OccOf var) $ - do { checkL (isNonCoVarId var) - (text "Non term variable" <+> ppr var) +lintIdOcc in_id nargs + = addLoc (OccOf in_id) $ + do { checkL (isNonCoVarId in_id) + (text "Non term variable" <+> ppr in_id) -- See GHC.Core Note [Variable occurrences in Core] -- Check that the type of the occurrence is the same @@ -1030,28 +1031,27 @@ lintIdOcc var nargs -- (Maybe a) from the binding site with bogus (Maybe a1) from -- the occurrence site. Comparing un-substituted types finesses -- this altogether - ; lintVarOcc var + ; lintVarOcc in_id -- Check for a nested occurrence of the StaticPtr constructor. -- See Note [Checking StaticPtrs]. ; lf <- getLintFlags ; when (nargs /= 0 && lf_check_static_ptrs lf /= AllowAnywhere) $ - checkL (idName var /= makeStaticName) $ + checkL (idName in_id /= makeStaticName) $ text "Found makeStatic nested in an expression" - ; checkDeadIdOcc var + ; checkDeadIdOcc in_id - ; case isDataConId_maybe var of + ; case isDataConId_maybe in_id of Nothing -> return () Just dc -> checkTypeDataConOcc "expression" dc -- lintVarOcc has already checked that the Id is in scope - ; subst <- getSubst - ; let out_id = case lookupIdSubst subst var of - Var out_id -> out_id - e -> pprPanic "lintIdOcc" (ppr var $$ ppr e) - -- The Id substitution is just for freshening + ; in_scope <- getInScope + ; let out_id = lookupInScope in_scope in_id `orElse` in_id + -- It might not be there at all if the freshening + -- substitution is empty ; check_bad_global out_id ; checkJoinOcc out_id nargs @@ -1070,11 +1070,11 @@ lintIdOcc var nargs -- wired-in Ids after worker/wrapper -- So we simply disable the test in this case check_bad_global out_id_bndr - | isGlobalId var + | isGlobalId in_id , isLocalId out_id_bndr - , not (isWiredIn var) + , not (isWiredIn in_id) = failWithL $ hang (text "Occurrence is GlobalId, but binding is LocalId") - 2 (vcat [ hang (text "occurrence:") 2 $ pprBndr LetBind var + 2 (vcat [ hang (text "occurrence:") 2 $ pprBndr LetBind in_id , hang (text "binder :") 2 $ pprBndr LetBind out_id_bndr ]) | otherwise = return () @@ -1858,20 +1858,7 @@ lintTyCoBndr tcv thing_inside lintL (isCoVarType tcv_type') $ text "CoVar with non-coercion type:" <+> pprTyVar tcv - ; subst <- getSubst - ; let (subst', tcv') = subst_bndr subst tcv tcv_type' - ; updateSubst subst' $ - addInScopeTyCoVar tcv $ - thing_inside tcv' } - where - subst_bndr subst tcv tcv_type' - | isEmptyTCvSubst subst -- No change in kind - , not (tcv `elemInScopeSet` in_scope) -- No change in unique - = (subst `extendSubstInScope` tcv, tcv) - | let tcv' = uniqAway in_scope (setVarType tcv tcv_type') - = (extendTCvSubstWithClone subst tcv tcv', tcv') - where - in_scope = substInScopeSet subst + ; addInScopeTyCoVar tcv tcv_type' thing_inside } lintIdBndrs :: forall a. TopLevelFlag -> [InId] -> ([OutId] -> LintM a) -> LintM a lintIdBndrs top_lvl ids thing_inside @@ -1924,13 +1911,9 @@ lintIdBndr top_lvl bind_site id thing_inside ; lintL (not (bind_site == LambdaBind && isEvaldUnfolding (idUnfolding id))) (text "Lambda binder with value or OtherCon unfolding.") - ; linted_ty <- addLoc (IdTy id) (lintValueType id_ty) + ; out_ty <- addLoc (IdTy id) (lintValueType id_ty) - ; subst <- getSubst - ; let (subst', id') = subst_id subst (setIdType id linted_ty) - ; updateSubst subst' $ - addInScopeId id id' $ - thing_inside id' } + ; addInScopeId id out_ty thing_inside } where id_ty = idType id @@ -1939,18 +1922,6 @@ lintIdBndr top_lvl bind_site id thing_inside LetBind -> True _ -> False - -- Extend the in-scope set, and perhaps the substitution - subst_id (Subst in_scope id_env tvs cvs) id - | not (id `elemInScopeSet` in_scope) - = (Subst (in_scope `extendInScopeSet` id) id_env tvs cvs, id) - | otherwise - = ( Subst (in_scope `extendInScopeSet` id') - (extendVarEnv id_env id (Var id')) - tvs cvs - , id' ) - where - id' = uniqAway in_scope id - {- %************************************************************************ %* * @@ -1985,8 +1956,13 @@ checkTyCoVarInScope subst tcv ------------------- lintType :: InType -> LintM OutType --- The OutType is just the substitution applied to the InType; --- the OutKind is the OutType's kind +-- The OutType is just the substitution applied to the InType +-- +-- I experimented with returning the kind along with the type, +-- to avoid a number of calls to typeKind, which might in principle be quadratic +-- (as we recurse over the type). But in fact returning both seems to slow +-- down Lint -- it certainly allocates a lot more. And the code is simpler +-- this way too. -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism] @@ -3006,15 +2982,15 @@ data LintEnv , le_subst :: Subst -- Current freshening substitution , le_in_vars :: VarEnv InVar -- Domain is InVar; all in-scope variables are here - -- Maps an InVar (unique) to its binding InVar + -- Maps an InVar (i.e. its unique) to its binding InVar , le_joins :: IdSet -- Join points in scope that are valid - -- A set of OutIds -- A subset of the InScopeSet in le_subst -- See Note [Join points] , le_ue_aliases :: NameEnv UsageEnv + -- See Note [Linting linearity] -- Assigns usage environments to the alias-like binders, -- as found in non-recursive lets. -- Domain is OutIds @@ -3148,17 +3124,23 @@ Note [Linting linearity] ~~~~~~~~~~~~~~~~~~~~~~~~ Lint ignores linearity unless `-dlinear-core-lint` is set. For why, see below. -But first, "ignore linearity" specifically means two things. When ignoring linearity: -* In `ensureEqTypes`, use `eqTypeIgnoringMultiplicity` -* In `ensureSubMult`, do nothing +* When do we /check linearity/ in Lint? That is, when is `-dlinear-core-lint` + lint set? Answer: we check linearity in the output of the desugarer, shortly + after type checking. -But why make `-dcore-lint` ignore linearity? Because optimisation passes are -not (yet) guaranteed to maintain linearity. They should do so semantically (GHC -is careful not to duplicate computation) but it is much harder to ensure that -the statically-checkable constraints of Linear Core are maintained. The current -Linear Core is described in the wiki at: +* When so we /not/ check linearity in Lint? On all passes after desugaring. Why? + Because optimisation passes are not (yet) guaranteed to maintain linearity. + They should do so semantically (GHC is careful not to duplicate computation) + but it is much harder to ensure that the statically-checkable constraints of + Linear Core are maintained. See examples below. + +The current Linear Core is described in the wiki at: https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types/implementation. +Concretely, "ignore linearity in Lint" specifically means two things: +* In `ensureEqTypes`, use `eqTypeIgnoringMultiplicity` +* In `ensureSubMult`, do nothing + Here are some examples of how the optimiser can break linearity checking. Other examples are documented in the linear-type implementation wiki page [https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types/implementation#core-to-core-passes] @@ -3448,26 +3430,51 @@ inCasePat = LintM $ \ env errs -> fromBoxedLResult (Just (is_case_pat env), errs is_case_pat (LE { le_loc = CasePat {} : _ }) = True is_case_pat _other = False -addInScopeId :: InId -> OutId -> LintM a -> LintM a -addInScopeId in_id out_id m - = LintM $ \ env@(LE { le_in_vars = id_vars, le_joins = join_set, le_ue_aliases = aliases }) errs -> - unLintM m (env { le_in_vars = extendVarEnv id_vars in_id in_id - , le_joins = add_joins join_set - , le_ue_aliases = delFromNameEnv aliases (idName out_id) }) errs - -- When shadowing an alias, we need to make sure the Id is no longer - -- classified as such. E.g. in - -- let x = in case x of x { _DEFAULT -> } - -- Occurrences of 'x' in e2 shouldn't count as occurrences of e1. - where - add_joins join_set - | isJoinId out_id = extendVarSet join_set out_id -- Overwrite with new arity - | otherwise = delVarSet join_set out_id -- Remove any existing binding - -addInScopeTyCoVar :: InTyCoVar -> LintM a -> LintM a -addInScopeTyCoVar v thing_inside +addInScopeId :: InId -> OutType -> (OutId -> LintM a) -> LintM a +addInScopeId in_id out_ty thing_inside = LintM $ \ env errs -> - unLintM thing_inside - (env { le_in_vars = extendVarEnv (le_in_vars env) v v }) errs + let !(out_id, env') = add env + in unLintM (thing_inside out_id) env' errs + + where + add env@(LE { le_in_vars = id_vars, le_joins = join_set + , le_ue_aliases = aliases, le_subst = subst }) + | isEmptyTCvSubst subst = (in_id, env1) + | otherwise = (out_id, env1 { le_subst = subst' }) + -- isEmptyTCvSubst: short-cut when the types of in_id and out_id are identical + where + env1 = env { le_in_vars = in_vars', le_joins = join_set', le_ue_aliases = aliases' } + + in_vars' = extendVarEnv id_vars in_id in_id + aliases' = delFromNameEnv aliases (idName in_id) + -- aliases': when shadowing an alias, we need to make sure the + -- Id is no longer classified as such. E.g. + -- let x = in case x of x { _DEFAULT -> } + -- Occurrences of 'x' in e2 shouldn't count as occurrences of e1. + + out_id = setIdType in_id out_ty + subst' = subst `extendSubstInScope` out_id + + join_set' + | isJoinId out_id = extendVarSet join_set in_id -- Overwrite with new arity + | otherwise = delVarSet join_set in_id -- Remove any existing binding + +addInScopeTyCoVar :: InTyCoVar -> OutType -> (OutTyCoVar -> LintM a) -> LintM a +addInScopeTyCoVar tcv tcv_type' thing_inside + = LintM $ \ env@(LE { le_in_vars = in_vars, le_subst = subst }) errs -> + let (tcv', subst') = subst_bndr subst tcv tcv_type' + env' = env { le_in_vars = extendVarEnv in_vars tcv tcv + , le_subst = subst' } + in unLintM (thing_inside tcv') env' errs + where + subst_bndr subst tcv tcv_type' + | isEmptyTCvSubst subst -- No change in kind + , not (tcv `elemInScopeSet` in_scope) -- No change in unique + = (tcv, subst `extendSubstInScope` tcv) + | let tcv' = uniqAway in_scope (setVarType tcv tcv_type') + = (tcv', extendTCvSubstWithClone subst tcv tcv') + where + in_scope = substInScopeSet subst getInVarEnv :: LintM (VarEnv InId) getInVarEnv = LintM (\env errs -> fromBoxedLResult (Just (le_in_vars env), errs)) @@ -3477,10 +3484,6 @@ extendTvSubstL tv ty m = LintM $ \ env errs -> unLintM m (env { le_subst = Type.extendTvSubst (le_subst env) tv ty }) errs -updateSubst :: Subst -> LintM a -> LintM a -updateSubst subst' m - = LintM $ \ env errs -> unLintM m (env { le_subst = subst' }) errs - markAllJoinsBad :: LintM a -> LintM a markAllJoinsBad m = LintM $ \ env errs -> unLintM m (env { le_joins = emptyVarSet }) errs View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8c02e33044221fb5d72aad89a9d5ba92887b94b3 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8c02e33044221fb5d72aad89a9d5ba92887b94b3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 17:10:38 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 08 Nov 2024 12:10:38 -0500 Subject: [Git][ghc/ghc][wip/T23210] 8 commits: testsuite: Fix badly escaped literals Message-ID: <672e460e10942_36b7232de4fc962bf@gitlab.mail> Ben Gamari pushed to branch wip/T23210 at Glasgow Haskell Compiler / GHC Commits: 42f1801d by Ben Gamari at 2024-11-01T15:04:01-04:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 29f4d34d by Ben Gamari at 2024-11-01T15:04:01-04:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 2f1a492a by Ben Gamari at 2024-11-01T15:04:01-04:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 4d7afaaa by Ben Gamari at 2024-11-01T15:04:01-04:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 5f7c2d3e by Ben Gamari at 2024-11-01T15:04:01-04:00 rts: Annotate BCOs with their Name - - - - - d14d3b82 by Ben Gamari at 2024-11-08T12:08:42-05:00 StgToByteCode: Don't assume that data con workers are nullary Previously StgToByteCode assumed that all data-con workers were of a nullary representation. This is not a valid assumption, as seen in #23210, where an unsaturated application of a unary data constructor's worker resulted in invalid bytecode. Sadly, I have not yet been able to reduce a minimal testcase for this. Fixes #23210. - - - - - 250e70bd by Ben Gamari at 2024-11-08T12:08:42-05:00 StgToByteCode: Fix handling of Addr# literals Previously we assumed that all unlifted types were Addr#. - - - - - 2d806c85 by Ben Gamari at 2024-11-08T12:08:42-05:00 testsuite: Mark T23146* as unbroken - - - - - 9 changed files: - compiler/GHC/ByteCode/Asm.hs - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/Stg/Utils.hs - compiler/GHC/StgToByteCode.hs - rts/Disassembler.c - rts/Interpreter.c - rts/include/rts/Bytecodes.h - testsuite/driver/testlib.py - testsuite/tests/codeGen/should_run/T23146/all.T Changes: ===================================== compiler/GHC/ByteCode/Asm.hs ===================================== @@ -106,7 +106,7 @@ assembleBCOs interp profile proto_bcos tycons top_strs modbreaks spt_entries = d bcos' <- mallocStrings interp bcos return CompiledByteCode { bc_bcos = bcos' - , bc_itbls = itblenv + , bc_itbls = itblenv , bc_ffis = concatMap protoBCOFFIs proto_bcos , bc_strs = top_strs , bc_breaks = modbreaks @@ -178,11 +178,12 @@ assembleOneBCO interp profile pbco = do return ubco' assembleBCO :: Platform -> ProtoBCO Name -> IO UnlinkedBCO -assembleBCO platform (ProtoBCO { protoBCOName = nm - , protoBCOInstrs = instrs - , protoBCOBitmap = bitmap - , protoBCOBitmapSize = bsize - , protoBCOArity = arity }) = do +assembleBCO platform + (ProtoBCO { protoBCOName = nm + , protoBCOInstrs = instrs + , protoBCOBitmap = bitmap + , protoBCOBitmapSize = bsize + , protoBCOArity = arity }) = do -- pass 1: collect up the offsets of the local labels. let asm = mapM_ (assembleI platform) instrs @@ -527,6 +528,8 @@ assembleI platform i = case i of , SmallOp tickx, SmallOp infox , Op np ] + BCO_NAME name -> do np <- lit [BCONPtrStr name] + emit bci_BCO_NAME [Op np] where literal (LitLabel fs _) = litlabel fs ===================================== compiler/GHC/ByteCode/Instr.hs ===================================== @@ -27,6 +27,8 @@ import GHC.Runtime.Heap.Layout ( StgWord ) import Data.Int import Data.Word +import Data.ByteString (ByteString) + import GHC.Stack.CCS (CostCentre) import GHC.Stg.Syntax @@ -130,7 +132,18 @@ data BCInstr | PUSH_APPLY_PPPPP | PUSH_APPLY_PPPPPP - | SLIDE !WordOff{-this many-} !WordOff{-down by this much-} + -- | Drop entries @(n, n+by]@ entries from the stack. Graphically: + -- @ + -- a_1 ← top + -- ... + -- a_n + -- b_1 => a_1 ← top + -- ... ... + -- b_by a_n + -- k k + -- @ + | SLIDE !WordOff -- ^ n = this many + !WordOff -- ^ by = down by this much -- To do with the heap | ALLOC_AP !HalfWord {- make an AP with this many payload words. @@ -175,7 +188,12 @@ data BCInstr -- The Word16 value is a constructor number and therefore -- stored in the insn stream rather than as an offset into -- the literal pool. + + -- | Test whether the tag of a closure pointer is less than the given value. + -- If not, jump to the given label. | TESTLT_P !Word16 LocalLabel + -- | Test whether the tag of a closure pointer is equal to the given value. + -- If not, jump to the given label. | TESTEQ_P !Word16 LocalLabel | CASEFAIL @@ -213,6 +231,10 @@ data BCInstr !Word16 -- breakpoint info index (RemotePtr CostCentre) + -- | A "meta"-instruction for recording the name of a BCO for debugging purposes. + -- These are ignored by the interpreter but helpfully printed by the disassmbler. + | BCO_NAME !ByteString + -- ----------------------------------------------------------------------------- -- Printing bytecode instructions @@ -367,6 +389,7 @@ instance Outputable BCInstr where <+> text "" <+> ppr tickx <+> text "" <+> ppr infox <+> text "" + ppr (BCO_NAME nm) = text "BCO_NAME" <+> text (show nm) @@ -471,3 +494,4 @@ bciStackUse SLIDE{} = 0 bciStackUse MKAP{} = 0 bciStackUse MKPAP{} = 0 bciStackUse PACK{} = 1 -- worst case is PACK 0 words +bciStackUse BCO_NAME{} = 0 ===================================== compiler/GHC/Stg/Utils.hs ===================================== @@ -11,6 +11,7 @@ module GHC.Stg.Utils , mkUnarisedId, mkUnarisedIds , allowTopLevelConApp + , hasNoNonZeroWidthArgs ) where import GHC.Prelude @@ -19,6 +20,7 @@ import GHC.Platform import GHC.Types.Id import GHC.Core.Type import GHC.Core.TyCon +import GHC.Core.Multiplicity ( scaledThing ) import GHC.Core.DataCon import GHC.Core ( AltCon(..) ) import GHC.Types.Tickish @@ -35,6 +37,13 @@ import GHC.Utils.Panic import GHC.Data.FastString +-- | Returns whether there are any arguments with a non-zero-width runtime +-- representation. +-- +-- Returns True if the datacon has no or /just/ zero-width arguments. +hasNoNonZeroWidthArgs :: DataCon -> Bool +hasNoNonZeroWidthArgs = all (isZeroBitTy . scaledThing) . dataConRepArgTys + mkUnarisedIds :: MonadUnique m => FastString -> [NvUnaryType] -> m [Id] mkUnarisedIds fs tys = mapM (mkUnarisedId fs) tys ===================================== compiler/GHC/StgToByteCode.hs ===================================== @@ -81,6 +81,7 @@ import GHC.Unit.Home.ModInfo (lookupHpt) import Data.Array import Data.Coerce (coerce) import Data.ByteString (ByteString) +import qualified Data.ByteString.Char8 as BS import Data.Map (Map) import Data.IntMap (IntMap) import qualified Data.Map as Map @@ -236,7 +237,8 @@ ppBCEnv p -- Create a BCO and do a spot of peephole optimisation on the insns -- at the same time. mkProtoBCO - :: Platform + :: (Outputable name) + => Platform -> name -> BCInstrList -> Either [CgStgAlt] (CgStgRhs) @@ -250,7 +252,7 @@ mkProtoBCO mkProtoBCO platform nm instrs_ordlist origin arity bitmap_size bitmap is_ret ffis = ProtoBCO { protoBCOName = nm, - protoBCOInstrs = maybe_with_stack_check, + protoBCOInstrs = maybe_add_bco_name $ maybe_add_stack_check peep_d, protoBCOBitmap = bitmap, protoBCOBitmapSize = fromIntegral bitmap_size, protoBCOArity = arity, @@ -258,6 +260,10 @@ mkProtoBCO platform nm instrs_ordlist origin arity bitmap_size bitmap is_ret ffi protoBCOFFIs = ffis } where + maybe_add_bco_name instrs = BCO_NAME str : instrs + where + str = BS.pack $ showSDocOneLine defaultSDocContext (ppr nm) + -- Overestimate the stack usage (in words) of this BCO, -- and if >= iNTERP_STACK_CHECK_THRESH, add an explicit -- stack check. (The interpreter always does a stack check @@ -265,17 +271,17 @@ mkProtoBCO platform nm instrs_ordlist origin arity bitmap_size bitmap is_ret ffi -- BCO anyway, so we only need to add an explicit one in the -- (hopefully rare) cases when the (overestimated) stack use -- exceeds iNTERP_STACK_CHECK_THRESH. - maybe_with_stack_check - | is_ret && stack_usage < fromIntegral (pc_AP_STACK_SPLIM (platformConstants platform)) = peep_d + maybe_add_stack_check instrs + | is_ret && stack_usage < fromIntegral (pc_AP_STACK_SPLIM (platformConstants platform)) = instrs -- don't do stack checks at return points, -- everything is aggregated up to the top BCO -- (which must be a function). -- That is, unless the stack usage is >= AP_STACK_SPLIM, -- see bug #1466. | stack_usage >= fromIntegral iNTERP_STACK_CHECK_THRESH - = STKCHECK stack_usage : peep_d + = STKCHECK stack_usage : instrs | otherwise - = peep_d -- the supposedly common case + = instrs -- the supposedly common case -- We assume that this sum doesn't wrap stack_usage = sum (map bciStackUse peep_d) @@ -1926,20 +1932,18 @@ pushAtom d p (StgVarArg var) -- PUSH_G doesn't tag constructors. So we use PACK here -- if we are dealing with nullary constructor. case isDataConWorkId_maybe var of - Just con -> do - massert (isNullaryRepDataCon con) - return (unitOL (PACK con 0), szb) + Just con + -- See Note [LFInfo of DataCon workers and wrappers] in GHC.Types.Id.Make. + | isNullaryRepDataCon con -> do + return (unitOL (PACK con 0), szb) - Nothing -- see Note [Generating code for top-level string literal bindings] - | isUnliftedType (idType var) -> do - massert (idType var `eqType` addrPrimTy) + _ | idType var `eqType` addrPrimTy -> return (unitOL (PUSH_ADDR (getName var)), szb) | otherwise -> do return (unitOL (PUSH_G (getName var)), szb) - pushAtom _ _ (StgLitArg lit) = pushLiteral True lit pushLiteral :: Bool -> Literal -> BcM (BCInstrList, ByteOff) ===================================== rts/Disassembler.c ===================================== @@ -452,6 +452,13 @@ disInstr ( StgBCO *bco, int pc ) debugBelch("RETURN_T\n "); break; + case bci_BCO_NAME: { + const char *name = (const char*) literals[instrs[pc]]; + debugBelch("BCO_NAME \"%s\"\n ", name); + pc += 1; + break; + } + default: barf("disInstr: unknown opcode %u", (unsigned int) instr); } @@ -464,10 +471,9 @@ void disassemble( StgBCO *bco ) StgWord16* instrs = (StgWord16*)(bco->instrs->payload); StgMutArrPtrs* ptrs = bco->ptrs; uint32_t nbcs = (uint32_t)(bco->instrs->bytes / sizeof(StgWord16)); - uint32_t pc = 1; + uint32_t pc = 0; debugBelch("BCO\n" ); - pc = 0; while (pc < nbcs) { debugBelch("\t%2d: ", pc ); pc = disInstr ( bco, pc ); ===================================== rts/Interpreter.c ===================================== @@ -1630,7 +1630,11 @@ run_BCO: case bci_SLIDE: { W_ n = BCO_GET_LARGE_ARG; W_ by = BCO_GET_LARGE_ARG; - /* a_1, .. a_n, b_1, .. b_by, s => a_1, .. a_n, s */ + /* + * a_1 ... a_n, b_1 ... b_by, k + * => + * a_1 ... a_n, k + */ while(n-- > 0) { SpW(n+by) = SpW(n); } @@ -1757,7 +1761,6 @@ run_BCO: // n_nptrs=1, n_ptrs=0. ASSERT(n_ptrs + n_nptrs == n_words || (n_nptrs == 1 && n_ptrs == 0)); ASSERT(n_ptrs + n_nptrs > 0); - //ASSERT(n_words > 0); // We shouldn't ever need to allocate nullary constructors for (W_ i = 0; i < n_words; i++) { con->payload[i] = (StgClosure*)SpW(i); } @@ -1781,6 +1784,7 @@ run_BCO: case bci_TESTLT_P: { unsigned int discr = BCO_NEXT; int failto = BCO_GET_LARGE_ARG; + ASSERT(discr <= TAG_MASK); StgClosure* con = UNTAG_CLOSURE((StgClosure*)SpW(0)); if (GET_TAG(con) >= discr) { bciPtr = failto; @@ -1791,6 +1795,7 @@ run_BCO: case bci_TESTEQ_P: { unsigned int discr = BCO_NEXT; int failto = BCO_GET_LARGE_ARG; + ASSERT(discr <= TAG_MASK); StgClosure* con = UNTAG_CLOSURE((StgClosure*)SpW(0)); if (GET_TAG(con) != discr) { bciPtr = failto; @@ -2081,6 +2086,10 @@ run_BCO: goto do_return_nonpointer; } + case bci_BCO_NAME: + BCO_NEXT; + goto nextInsn; + case bci_SWIZZLE: { W_ stkoff = BCO_GET_LARGE_ARG; StgInt n = BCO_GET_LARGE_ARG; ===================================== rts/include/rts/Bytecodes.h ===================================== @@ -112,6 +112,8 @@ #define bci_PRIMCALL 87 +#define bci_BCO_NAME 88 + /* If you need to go past 255 then you will run into the flags */ /* If you need to go below 0x0100 then you will run into the instructions */ ===================================== testsuite/driver/testlib.py ===================================== @@ -3000,12 +3000,12 @@ def normalise_prof (s: str) -> str: # Source locations from internal libraries, remove the source location # > libraries/ghc-internal/src/path/Foo.hs:204:1-18 # => ghc-internal/src/path/Foo.hs - s = re.sub('\slibraries/(\S+)(:\S+){2}\s',' \\1 ', s) + s = re.sub(r'\slibraries/(\S+)(:\S+){2}\s', r' \1 ', s) # Source locations from internal libraries, remove the source location # > libraries/ghc-internal/src/path/Foo.hs::(2,1)-(5,38) # => ghc-internal/src/path/Foo.hs - s = re.sub('\slibraries/(\S+)(:\S+){1}\s',' \\1 ', s) + s = re.sub(r'\slibraries/(\S+)(:\S+){1}\s', r' \1 ', s) # We have something like this: # ===================================== testsuite/tests/codeGen/should_run/T23146/all.T ===================================== @@ -1,4 +1,4 @@ -test('T23146', expect_broken_for(23060, ghci_ways), compile_and_run, ['']) +test('T23146', normal, compile_and_run, ['']) test('T23146_lifted', normal, compile_and_run, ['']) -test('T23146_liftedeq', expect_broken_for(23060, ghci_ways), compile_and_run, ['']) +test('T23146_liftedeq', normal, compile_and_run, ['']) test('T23146_lifted_unlifted', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f641356616a30753abb2c5e9a6d136532d5407d8...2d806c856dc7747c663ffdfa88f4ec36073b3077 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f641356616a30753abb2c5e9a6d136532d5407d8...2d806c856dc7747c663ffdfa88f4ec36073b3077 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 17:29:39 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 08 Nov 2024 12:29:39 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25452 Message-ID: <672e4a83146b8_36b7234ef14c101588@gitlab.mail> Ben Gamari pushed new branch wip/T25452 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25452 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 18:20:38 2024 From: gitlab at gitlab.haskell.org (Apoorv Ingle (@ani)) Date: Fri, 08 Nov 2024 13:20:38 -0500 Subject: [Git][ghc/ghc][wip/spj-apporv-Oct24] addExprCtxt ignores Expanded Statements Message-ID: <672e5676af9eb_36b7239084f4117091@gitlab.mail> Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: fab1aa92 by Apoorv Ingle at 2024-11-08T12:20:10-06:00 addExprCtxt ignores Expanded Statements - - - - - 1 changed file: - compiler/GHC/Tc/Gen/Head.hs Changes: ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -1260,6 +1260,9 @@ addThingCtxt (OrigStmt (L loc stmt) flav) thing_inside = do gen <- inGeneratedCode if gen then setSrcSpanA loc $ addStmtCtxt stmt flav $ setInGeneratedCode $ thing_inside + -- If we are in generated code, we need to set the error context at the correct + -- location and then switch context back into generated code to do the thing_inside + -- See Note [Rebindable syntax and XXExprGhcRn] else addStmtCtxt stmt flav $ thing_inside addThingCtxt _ thing_inside = thing_inside @@ -1278,6 +1281,7 @@ addExprCtxt :: HsExpr GhcRn -> TcRn a -> TcRn a addExprCtxt e thing_inside = case e of HsUnboundVar {} -> thing_inside + XExpr (ExpandedThingRn (OrigStmt{}) _) -> thing_inside _ -> addErrCtxt (exprCtxt e) thing_inside -- The HsUnboundVar special case addresses situations like -- f x = _ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fab1aa924939b5e88d247f1caceca313827dec8a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fab1aa924939b5e88d247f1caceca313827dec8a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 18:22:17 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 08 Nov 2024 13:22:17 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/improve-clangd Message-ID: <672e56d989c1a_36b7238f2d701193d3@gitlab.mail> Cheng Shao pushed new branch wip/improve-clangd at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/improve-clangd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 18:29:25 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 08 Nov 2024 13:29:25 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/rm-obsolete-cross-port Message-ID: <672e5885350f0_36b7238fe350122521@gitlab.mail> Cheng Shao pushed new branch wip/rm-obsolete-cross-port at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/rm-obsolete-cross-port You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 19:16:35 2024 From: gitlab at gitlab.haskell.org (Teo Camarasu (@teo)) Date: Fri, 08 Nov 2024 14:16:35 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25262 Message-ID: <672e6393f240d_36b723da1d301296ea@gitlab.mail> Teo Camarasu pushed new branch wip/T25262 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25262 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 19:41:04 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 08 Nov 2024 14:41:04 -0500 Subject: [Git][ghc/ghc][wip/T25452] 4 commits: base: Label threads forked by System.Timeout Message-ID: <672e6950a19d9_36b723ed5af813591f@gitlab.mail> Ben Gamari pushed to branch wip/T25452 at Glasgow Haskell Compiler / GHC Commits: cd055f94 by Ben Gamari at 2024-11-08T12:50:28-05:00 base: Label threads forked by System.Timeout Addresses part of #25452. - - - - - 891b560b by Ben Gamari at 2024-11-08T12:50:28-05:00 base: Label signal handling threads Addresses part of #25452. - - - - - 1cc5b0f5 by Ben Gamari at 2024-11-08T12:50:28-05:00 base: Label Windows console event handling threads Addresses part of #25452. - - - - - 34460bbc by Ben Gamari at 2024-11-08T12:50:28-05:00 ghci: Label evaluation sandbox thread Addresses part of #25452. - - - - - 4 changed files: - libraries/base/src/System/Timeout.hs - libraries/ghc-internal/src/GHC/Internal/Conc/Signal.hs - libraries/ghc-internal/src/GHC/Internal/Event/Windows/ConsoleEvent.hsc - libraries/ghci/GHCi/Run.hs Changes: ===================================== libraries/base/src/System/Timeout.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE Safe #-} +{-# LANGUAGE Trustworthy #-} ------------------------------------------------------------------------------- -- | @@ -29,6 +29,7 @@ import GHC.Internal.Control.Exception (Exception(..), handleJust, bracket, asyncExceptionToException, asyncExceptionFromException) import GHC.Internal.Data.Unique (Unique, newUnique) +import GHC.Conc (labelThread) import Prelude -- $setup @@ -119,7 +120,9 @@ timeout n f let handleTimeout = do v <- isEmptyMVar lock when v $ void $ forkIOWithUnmask $ \unmask -> unmask $ do - v2 <- tryPutMVar lock =<< myThreadId + tid <- myThreadId + labelThread tid "timeout worker" + v2 <- tryPutMVar lock tid when v2 $ throwTo pid ex cleanupTimeout key = uninterruptibleMask_ $ do v <- tryPutMVar lock undefined @@ -136,7 +139,9 @@ timeout n f ex <- fmap Timeout newUnique handleJust (\e -> if e == ex then Just () else Nothing) (\_ -> return Nothing) - (bracket (forkIOWithUnmask $ \unmask -> + (bracket (forkIOWithUnmask $ \unmask -> do + tid <- myThreadId + labelThread tid "timeout worker" unmask $ threadDelay n >> throwTo pid ex) (uninterruptibleMask_ . killThread) (\_ -> fmap Just f)) ===================================== libraries/ghc-internal/src/GHC/Internal/Conc/Signal.hs ===================================== @@ -19,7 +19,7 @@ import GHC.Internal.Foreign.Ptr (Ptr, castPtr) import GHC.Internal.Foreign.Marshal.Alloc (finalizerFree) import GHC.Internal.Arr (inRange) import GHC.Internal.Base -import GHC.Internal.Conc.Sync (forkIO) +import GHC.Internal.Conc.Sync (myThreadId, labelThread, forkIO) import GHC.Internal.IO (mask_, unsafePerformIO) import GHC.Internal.IOArray (IOArray, boundsIOArray, newIOArray, unsafeReadIOArray, unsafeWriteIOArray) @@ -69,7 +69,10 @@ runHandlers p_info sig = do else do handler <- unsafeReadIOArray arr int case handler of Nothing -> return () - Just (f,_) -> do _ <- forkIO (f p_info) + Just (f,_) -> do _ <- forkIO $ do + tid <- myThreadId + labelThread tid "signal handler" + f p_info return () -- It is our responsibility to free the memory buffer, so we create a ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows/ConsoleEvent.hsc ===================================== @@ -53,7 +53,10 @@ start_console_handler :: Word32 -> IO () start_console_handler r = case toWin32ConsoleEvent r of Just x -> withMVar win32ConsoleHandler $ \handler -> do - _ <- forkIO (handler x) + _ <- forkIO $ do + tid <- myThreadId + labelThread tid "console event handler" + handler x return () Nothing -> return () ===================================== libraries/ghci/GHCi/Run.hs ===================================== @@ -226,7 +226,10 @@ sandboxIO opts io = do let runIt = measureAlloc $ tryEval $ rethrow opts $ clearCCS io if useSandboxThread opts then do - tid <- forkIO $ do unsafeUnmask runIt >>= putMVar statusMVar + tid <- forkIO $ do + tid <- myThreadId + labelThread tid "GHCi sandbox" + unsafeUnmask runIt >>= putMVar statusMVar -- empty: can't block redirectInterrupts tid $ unsafeUnmask $ takeMVar statusMVar else View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e6e7ac796bca2de169272bb761f862622151480b...34460bbc772d5c8c20e5775e884f0cac525ee5b4 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e6e7ac796bca2de169272bb761f862622151480b...34460bbc772d5c8c20e5775e884f0cac525ee5b4 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 20:12:24 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 08 Nov 2024 15:12:24 -0500 Subject: [Git][ghc/ghc][wip/bytecode-improvements] Deleted 1 commit: rts: Annotate BCOs with their Name Message-ID: <672e70a881edb_36b723110cbb414545b@gitlab.mail> Ben Gamari pushed to branch wip/bytecode-improvements at Glasgow Haskell Compiler / GHC WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below. Deleted commits: 5f7c2d3e by Ben Gamari at 2024-11-01T15:04:01-04:00 rts: Annotate BCOs with their Name - - - - - 6 changed files: - compiler/GHC/ByteCode/Asm.hs - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/StgToByteCode.hs - rts/Disassembler.c - rts/Interpreter.c - rts/include/rts/Bytecodes.h Changes: ===================================== compiler/GHC/ByteCode/Asm.hs ===================================== @@ -106,7 +106,7 @@ assembleBCOs interp profile proto_bcos tycons top_strs modbreaks spt_entries = d bcos' <- mallocStrings interp bcos return CompiledByteCode { bc_bcos = bcos' - , bc_itbls = itblenv + , bc_itbls = itblenv , bc_ffis = concatMap protoBCOFFIs proto_bcos , bc_strs = top_strs , bc_breaks = modbreaks @@ -178,11 +178,12 @@ assembleOneBCO interp profile pbco = do return ubco' assembleBCO :: Platform -> ProtoBCO Name -> IO UnlinkedBCO -assembleBCO platform (ProtoBCO { protoBCOName = nm - , protoBCOInstrs = instrs - , protoBCOBitmap = bitmap - , protoBCOBitmapSize = bsize - , protoBCOArity = arity }) = do +assembleBCO platform + (ProtoBCO { protoBCOName = nm + , protoBCOInstrs = instrs + , protoBCOBitmap = bitmap + , protoBCOBitmapSize = bsize + , protoBCOArity = arity }) = do -- pass 1: collect up the offsets of the local labels. let asm = mapM_ (assembleI platform) instrs @@ -527,6 +528,8 @@ assembleI platform i = case i of , SmallOp tickx, SmallOp infox , Op np ] + BCO_NAME name -> do np <- lit [BCONPtrStr name] + emit bci_BCO_NAME [Op np] where literal (LitLabel fs _) = litlabel fs ===================================== compiler/GHC/ByteCode/Instr.hs ===================================== @@ -27,6 +27,8 @@ import GHC.Runtime.Heap.Layout ( StgWord ) import Data.Int import Data.Word +import Data.ByteString (ByteString) + import GHC.Stack.CCS (CostCentre) import GHC.Stg.Syntax @@ -229,6 +231,10 @@ data BCInstr !Word16 -- breakpoint info index (RemotePtr CostCentre) + -- | A "meta"-instruction for recording the name of a BCO for debugging purposes. + -- These are ignored by the interpreter but helpfully printed by the disassmbler. + | BCO_NAME !ByteString + -- ----------------------------------------------------------------------------- -- Printing bytecode instructions @@ -383,6 +389,7 @@ instance Outputable BCInstr where <+> text "" <+> ppr tickx <+> text "" <+> ppr infox <+> text "" + ppr (BCO_NAME nm) = text "BCO_NAME" <+> text (show nm) @@ -487,3 +494,4 @@ bciStackUse SLIDE{} = 0 bciStackUse MKAP{} = 0 bciStackUse MKPAP{} = 0 bciStackUse PACK{} = 1 -- worst case is PACK 0 words +bciStackUse BCO_NAME{} = 0 ===================================== compiler/GHC/StgToByteCode.hs ===================================== @@ -81,6 +81,7 @@ import GHC.Unit.Home.ModInfo (lookupHpt) import Data.Array import Data.Coerce (coerce) import Data.ByteString (ByteString) +import qualified Data.ByteString.Char8 as BS import Data.Map (Map) import Data.IntMap (IntMap) import qualified Data.Map as Map @@ -236,7 +237,8 @@ ppBCEnv p -- Create a BCO and do a spot of peephole optimisation on the insns -- at the same time. mkProtoBCO - :: Platform + :: (Outputable name) + => Platform -> name -> BCInstrList -> Either [CgStgAlt] (CgStgRhs) @@ -250,7 +252,7 @@ mkProtoBCO mkProtoBCO platform nm instrs_ordlist origin arity bitmap_size bitmap is_ret ffis = ProtoBCO { protoBCOName = nm, - protoBCOInstrs = maybe_with_stack_check, + protoBCOInstrs = maybe_add_bco_name $ maybe_add_stack_check peep_d, protoBCOBitmap = bitmap, protoBCOBitmapSize = fromIntegral bitmap_size, protoBCOArity = arity, @@ -258,6 +260,10 @@ mkProtoBCO platform nm instrs_ordlist origin arity bitmap_size bitmap is_ret ffi protoBCOFFIs = ffis } where + maybe_add_bco_name instrs = BCO_NAME str : instrs + where + str = BS.pack $ showSDocOneLine defaultSDocContext (ppr nm) + -- Overestimate the stack usage (in words) of this BCO, -- and if >= iNTERP_STACK_CHECK_THRESH, add an explicit -- stack check. (The interpreter always does a stack check @@ -265,17 +271,17 @@ mkProtoBCO platform nm instrs_ordlist origin arity bitmap_size bitmap is_ret ffi -- BCO anyway, so we only need to add an explicit one in the -- (hopefully rare) cases when the (overestimated) stack use -- exceeds iNTERP_STACK_CHECK_THRESH. - maybe_with_stack_check - | is_ret && stack_usage < fromIntegral (pc_AP_STACK_SPLIM (platformConstants platform)) = peep_d + maybe_add_stack_check instrs + | is_ret && stack_usage < fromIntegral (pc_AP_STACK_SPLIM (platformConstants platform)) = instrs -- don't do stack checks at return points, -- everything is aggregated up to the top BCO -- (which must be a function). -- That is, unless the stack usage is >= AP_STACK_SPLIM, -- see bug #1466. | stack_usage >= fromIntegral iNTERP_STACK_CHECK_THRESH - = STKCHECK stack_usage : peep_d + = STKCHECK stack_usage : instrs | otherwise - = peep_d -- the supposedly common case + = instrs -- the supposedly common case -- We assume that this sum doesn't wrap stack_usage = sum (map bciStackUse peep_d) ===================================== rts/Disassembler.c ===================================== @@ -452,6 +452,13 @@ disInstr ( StgBCO *bco, int pc ) debugBelch("RETURN_T\n "); break; + case bci_BCO_NAME: { + const char *name = (const char*) literals[instrs[pc]]; + debugBelch("BCO_NAME \"%s\"\n ", name); + pc += 1; + break; + } + default: barf("disInstr: unknown opcode %u", (unsigned int) instr); } @@ -464,10 +471,9 @@ void disassemble( StgBCO *bco ) StgWord16* instrs = (StgWord16*)(bco->instrs->payload); StgMutArrPtrs* ptrs = bco->ptrs; uint32_t nbcs = (uint32_t)(bco->instrs->bytes / sizeof(StgWord16)); - uint32_t pc = 1; + uint32_t pc = 0; debugBelch("BCO\n" ); - pc = 0; while (pc < nbcs) { debugBelch("\t%2d: ", pc ); pc = disInstr ( bco, pc ); ===================================== rts/Interpreter.c ===================================== @@ -2087,6 +2087,10 @@ run_BCO: goto do_return_nonpointer; } + case bci_BCO_NAME: + BCO_NEXT; + goto nextInsn; + case bci_SWIZZLE: { W_ stkoff = BCO_GET_LARGE_ARG; StgInt n = BCO_GET_LARGE_ARG; ===================================== rts/include/rts/Bytecodes.h ===================================== @@ -112,6 +112,8 @@ #define bci_PRIMCALL 87 +#define bci_BCO_NAME 88 + /* If you need to go past 255 then you will run into the flags */ /* If you need to go below 0x0100 then you will run into the instructions */ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5f7c2d3e99ccae94d5cebfb7412ee20c49562037 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5f7c2d3e99ccae94d5cebfb7412ee20c49562037 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 20:12:29 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 08 Nov 2024 15:12:29 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/bco-name Message-ID: <672e70ad4fef3_36b72310f77dc145657@gitlab.mail> Ben Gamari pushed new branch wip/bco-name at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/bco-name You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 8 22:02:23 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 08 Nov 2024 17:02:23 -0500 Subject: [Git][ghc/ghc][wip/T25445] Wibble Message-ID: <672e8a6f9e706_abd3e55cc742282e@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445 at Glasgow Haskell Compiler / GHC Commits: 287ea40a by Simon Peyton Jones at 2024-11-08T22:02:06+00:00 Wibble - - - - - 2 changed files: - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/TyCo/Subst.hs Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -3439,8 +3439,8 @@ addInScopeId in_id out_ty thing_inside where add env@(LE { le_in_vars = id_vars, le_joins = join_set , le_ue_aliases = aliases, le_subst = subst }) - | isEmptyTCvSubst subst = (in_id, env1) - | otherwise = (out_id, env1 { le_subst = subst' }) + | isEmptyTCvSubst subst = (in_id, env1 { le_subst = subst `delSubstInScope` in_id }) + | otherwise = (out_id, env1 { le_subst = subst `extendSubstInScope` out_id}) -- isEmptyTCvSubst: short-cut when the types of in_id and out_id are identical where env1 = env { le_in_vars = in_vars', le_joins = join_set', le_ue_aliases = aliases' } @@ -3453,7 +3453,6 @@ addInScopeId in_id out_ty thing_inside -- Occurrences of 'x' in e2 shouldn't count as occurrences of e1. out_id = setIdType in_id out_ty - subst' = subst `extendSubstInScope` out_id join_set' | isJoinId out_id = extendVarSet join_set in_id -- Overwrite with new arity ===================================== compiler/GHC/Core/TyCo/Subst.hs ===================================== @@ -17,7 +17,7 @@ module GHC.Core.TyCo.Subst getTvSubstEnv, getIdSubstEnv, getCvSubstEnv, substInScopeSet, setInScope, getSubstRangeTyCoFVs, isInScope, elemSubst, notElemSubst, zapSubst, - extendSubstInScope, extendSubstInScopeList, extendSubstInScopeSet, + extendSubstInScope, extendSubstInScopeList, extendSubstInScopeSet, delSubstInScope, extendTCvSubst, extendTCvSubstWithClone, extendCvSubst, extendCvSubstWithClone, extendTvSubst, extendTvSubstWithClone, @@ -339,6 +339,11 @@ extendSubstInScope (Subst in_scope ids tvs cvs) v = Subst (in_scope `extendInScopeSet` v) ids tvs cvs +delSubstInScope :: Subst -> Var -> Subst +delSubstInScope (Subst in_scope ids tvs cvs) v + = Subst (in_scope `delInScopeSet` v) + ids tvs cvs + -- | Add the 'Var's to the in-scope set: see also 'extendInScope' extendSubstInScopeList :: Subst -> [Var] -> Subst extendSubstInScopeList (Subst in_scope ids tvs cvs) vs View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/287ea40afb6d60bac1d88d999655894f69cc9757 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/287ea40afb6d60bac1d88d999655894f69cc9757 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 00:05:31 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 08 Nov 2024 19:05:31 -0500 Subject: [Git][ghc/ghc][wip/kill-pre-c11] 570 commits: users-guide: Fix stylistic issues in 9.12 release notes Message-ID: <672ea74b8f420_27b05e3dae3c638b7@gitlab.mail> Cheng Shao pushed to branch wip/kill-pre-c11 at Glasgow Haskell Compiler / GHC Commits: e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - d1bd796e by Cheng Shao at 2024-11-09T00:04:13+00:00 Remove legacy pre-C11 logic from the tree GHC has required C11 support from the C compiler since a long time ago. This patch cleans up pre-C11 logic from the tree: - autoconf/ghc-toolchain logic to add C99 flag into CPPFLAGS/CFLAGS are changed to add C11 flag instead (in practice invoked only for centos7 with gcc 4.8) - Redundant CPP-logic around __GNUC__ is cleaned up. __GNUC__ >= 4 is universally true for all platforms and C compilers we support. - Replace some legacy GHC-specific macros with GNU C equivalents. - Hash.c optimization flags is controlled by hadrian, remove the redundant in-file optimization pragmas. - - - - - 9 changed files: - .ghcid - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/aed79a2465dd6f6ba8dd32f981e9c129013009d1...d1bd796e2bd7637b4628b118b0e2b11295268507 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/aed79a2465dd6f6ba8dd32f981e9c129013009d1...d1bd796e2bd7637b4628b118b0e2b11295268507 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 00:08:57 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 08 Nov 2024 19:08:57 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/kill-pre-c11-with-centos7-fix Message-ID: <672ea819152e9_27b05e2d91146715f@gitlab.mail> Cheng Shao pushed new branch wip/kill-pre-c11-with-centos7-fix at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/kill-pre-c11-with-centos7-fix You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 00:27:56 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 08 Nov 2024 19:27:56 -0500 Subject: [Git][ghc/ghc][wip/ubuntu24_04] 4677 commits: [haddock @ 2002-04-04 16:23:43 by simonmar] Message-ID: <672eac8c5cbb_27b05e6cfbec6777e@gitlab.mail> Cheng Shao pushed to branch wip/ubuntu24_04 at Glasgow Haskell Compiler / GHC Commits: 2b39cd94 by Simon Marlow at 2002-04-04T16:23:43+00:00 [haddock @ 2002-04-04 16:23:43 by simonmar] This is Haddock, my stab at a Haskell documentation tool. It's not quite ready for release yet, but I'm putting it in the repository so others can take a look. It uses a locally modified version of the hssource parser, extended with support for GHC extensions and documentation annotations. - - - - - 99ede94f by Simon Marlow at 2002-04-04T16:24:10+00:00 [haddock @ 2002-04-04 16:24:10 by simonmar] forgot one file - - - - - 8363294c by Simon Marlow at 2002-04-05T13:58:15+00:00 [haddock @ 2002-04-05 13:58:15 by simonmar] Remap names in the exported declarations to be "closer" to the current module. eg. if an exported declaration mentions a type 'T' which is imported from module A then re-exported from the current module, then links from the type or indeed the documentation will point to the current module rather than module A. This is to support better hiding: module A won't be referred to in the generated output. - - - - - 1570cbc1 by Simon Marlow at 2002-04-05T13:58:23+00:00 [haddock @ 2002-04-05 13:58:23 by simonmar] update the TODO list - - - - - 3a62f96b by Simon Marlow at 2002-04-05T14:11:51+00:00 [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration - - - - - c5d9a471 by Simon Marlow at 2002-04-05T14:18:41+00:00 [haddock @ 2002-04-05 14:18:41 by simonmar] remove underlines on visited links - - - - - 97280525 by Simon Marlow at 2002-04-05T16:11:47+00:00 [haddock @ 2002-04-05 16:11:47 by simonmar] - Update to generate more correct HTML. - Use our own non-overloaded table combinators, as the overloaded versions were giving me a headache. The improved type safety caught several errors in the HTML generation. - - - - - 9acd3a4d by Simon Marlow at 2002-04-05T16:32:19+00:00 [haddock @ 2002-04-05 16:32:19 by simonmar] Add width property to the title, and add TD.children for the module contents page. - - - - - ec9a0847 by Simon Marlow at 2002-04-08T16:39:56+00:00 [haddock @ 2002-04-08 16:39:56 by simonmar] Fix a problem with exports of the form T(..). - - - - - e4627dc8 by Simon Marlow at 2002-04-08T16:41:38+00:00 [haddock @ 2002-04-08 16:41:37 by simonmar] - Add our own versions of Html & BlockTable for the time being. - Add support for generating an index to the HTML backend - - - - - 2d73fd75 by Simon Marlow at 2002-04-09T11:23:24+00:00 [haddock @ 2002-04-09 11:23:24 by simonmar] Add '-- /' as a synonym for '-- |', for compatibility with IDoc. - - - - - 3675464e by Simon Marlow at 2002-04-09T11:33:55+00:00 [haddock @ 2002-04-09 11:33:54 by simonmar] - add the <...> syntax for marking up URLs in documentation - Make the output for data & class declarations more compact when there aren't any documentation annotations on the individual methods or constructors respectively. - - - - - 5077f5b1 by Simon Marlow at 2002-04-09T11:36:04+00:00 [haddock @ 2002-04-09 11:36:04 by simonmar] Update the TODO list - - - - - 9e83c54d by Simon Marlow at 2002-04-10T10:50:06+00:00 [haddock @ 2002-04-10 10:50:06 by simonmar] Use explicit 'px' suffix on pixel sizes; IE seems to prefer them - - - - - 052de51c by Simon Marlow at 2002-04-10T13:23:13+00:00 [haddock @ 2002-04-10 13:23:13 by simonmar] Lex URLs as a single token to avoid having to escape special characters inside the URL string. - - - - - 47187edb by Simon Marlow at 2002-04-10T13:23:55+00:00 [haddock @ 2002-04-10 13:23:55 by simonmar] Not sure why I made the constructor name for a record declaration into a TyCls name, but change it back into a Var name anyhow. - - - - - 3dc6aa81 by Simon Marlow at 2002-04-10T13:26:10+00:00 [haddock @ 2002-04-10 13:26:09 by simonmar] Lots of changes, including: - add index support to the HTML backend - clean up the renamer, put it into a monad - propogate unresolved names to the top level and report them in a nicer way - various bugfixes - - - - - c2a70a72 by Simon Marlow at 2002-04-10T13:32:39+00:00 [haddock @ 2002-04-10 13:32:39 by simonmar] Skeleton documentation - - - - - 50c98d17 by Simon Marlow at 2002-04-10T13:37:23+00:00 [haddock @ 2002-04-10 13:37:23 by simonmar] Update the TODO list, separate into pre-1.0 and post-1.0 items - - - - - f3778be6 by Simon Marlow at 2002-04-10T14:30:58+00:00 [haddock @ 2002-04-10 14:30:58 by simonmar] Add an introduction - - - - - cfbaf9f7 by Simon Marlow at 2002-04-10T14:59:51+00:00 [haddock @ 2002-04-10 14:59:51 by simonmar] Sort the module tree - - - - - 76bd7b34 by Simon Marlow at 2002-04-10T15:50:11+00:00 [haddock @ 2002-04-10 15:50:10 by simonmar] Generate a little table of contents at the top of the module doc (only if the module actually contains some section headings, though). - - - - - bb8560a1 by Simon Marlow at 2002-04-10T16:10:26+00:00 [haddock @ 2002-04-10 16:10:26 by simonmar] Now we understand (or at least don't barf on) type signatures in patterns such as you might find when scoped type variables are in use. - - - - - 86c2a026 by Simon Marlow at 2002-04-10T16:10:49+00:00 [haddock @ 2002-04-10 16:10:49 by simonmar] more updates - - - - - 1c052b0e by Simon Marlow at 2002-04-10T16:28:05+00:00 [haddock @ 2002-04-10 16:28:05 by simonmar] Parse errors in doc strings are now reported as warnings rather that causing the whole thing to fall over. It still needs cleaning up (the warning is emitted with trace) but this will do for the time being. - - - - - ace03e8f by Simon Marlow at 2002-04-10T16:38:03+00:00 [haddock @ 2002-04-10 16:38:03 by simonmar] update again - - - - - 69006c3e by Simon Marlow at 2002-04-11T13:38:02+00:00 [haddock @ 2002-04-11 13:38:02 by simonmar] mention Opera - - - - - fe9b10f8 by Simon Marlow at 2002-04-11T13:40:31+00:00 [haddock @ 2002-04-11 13:40:30 by simonmar] - copy haddock.css into the same place as the generated HTML - new option: --css <file> specifies the style sheet to use - new option: -o <dir> specifies the directory in which to generate the output. - because Haddock now needs to know where to find its default stylesheet, we have to have a wrapper script and do the haddock-inplace thing (Makefile code copied largely from fptools/happy). - - - - - 106adbbe by Simon Marlow at 2002-04-24T15:12:41+00:00 [haddock @ 2002-04-24 15:12:41 by simonmar] Stop slurping comment lines when we see a row of dashes longer than length 2: these are useful as separators. - - - - - 995d3f9e by Simon Marlow at 2002-04-24T15:14:12+00:00 [haddock @ 2002-04-24 15:14:11 by simonmar] Grok the kind of module headers we use in fptools/libraries, and pass the "portability", "stability", and "maintainer" strings through into the generated HTML. If the module header doesn't match the pattern, then we don't include the info in the HTML. - - - - - e14da136 by Simon Marlow at 2002-04-24T15:16:57+00:00 [haddock @ 2002-04-24 15:16:57 by simonmar] Done module headers now. - - - - - 2ca8dfd4 by Simon Marlow at 2002-04-24T15:57:48+00:00 [haddock @ 2002-04-24 15:57:47 by simonmar] Handle gcons in export lists (a common extension). - - - - - 044cea81 by Simon Marlow at 2002-04-25T14:20:12+00:00 [haddock @ 2002-04-25 14:20:12 by simonmar] Add the little lambda icon - - - - - 63955027 by Simon Marlow at 2002-04-25T14:40:05+00:00 [haddock @ 2002-04-25 14:40:05 by simonmar] - Add support for named chunks of documentation which can be referenced from the export list. - Copy the icon from $libdir to the destination in HTML mode. - - - - - 36e3f913 by Simon Marlow at 2002-04-25T16:48:36+00:00 [haddock @ 2002-04-25 16:48:36 by simonmar] More keyboard bashing - - - - - 7ae18dd0 by Simon Marlow at 2002-04-26T08:43:33+00:00 [haddock @ 2002-04-26 08:43:33 by simonmar] Package util reqd. to compile with 4.08.2 - - - - - bbd5fbab by Simon Marlow at 2002-04-26T10:13:00+00:00 [haddock @ 2002-04-26 10:13:00 by simonmar] Include $(GHC_HAPPY_OPTS) when compiling HsParser - - - - - 31c53d79 by Simon Marlow at 2002-04-26T11:18:57+00:00 [haddock @ 2002-04-26 11:18:56 by simonmar] - support for fundeps (partially contributed by Brett Letner - thanks Brett). - make it build with GHC 4.08.2 - - - - - c415ce76 by Simon Marlow at 2002-04-26T13:15:02+00:00 [haddock @ 2002-04-26 13:15:02 by simonmar] Move the explicit formatting of the little table for the stability/portability/maintainer info from the HTML into the CSS, and remove the explicit table size (just right-align it). - - - - - 520ee21a by Simon Marlow at 2002-04-26T16:01:44+00:00 [haddock @ 2002-04-26 16:01:44 by simonmar] Yet more keyboard bashing - this is pretty much complete now. - - - - - 2ae37179 by Simon Marlow at 2002-04-26T16:02:14+00:00 [haddock @ 2002-04-26 16:02:14 by simonmar] Add a couple of things I forgot about - - - - - b7211e04 by Simon Marlow at 2002-04-29T15:28:12+00:00 [haddock @ 2002-04-29 15:28:12 by simonmar] bugfix for declBinders on a NewTypeDecl - - - - - 640c154a by Simon Marlow at 2002-04-29T15:28:54+00:00 [haddock @ 2002-04-29 15:28:54 by simonmar] Allow '-- |' style annotations on constructors and record fields. - - - - - 393f258a by Simon Marlow at 2002-04-29T15:37:32+00:00 [haddock @ 2002-04-29 15:37:32 by simonmar] syntax fix - - - - - 8a2c2549 by Simon Marlow at 2002-04-29T15:37:48+00:00 [haddock @ 2002-04-29 15:37:48 by simonmar] Add an example - - - - - db88f8a2 by Simon Marlow at 2002-04-29T15:55:46+00:00 [haddock @ 2002-04-29 15:55:46 by simonmar] remove a trace - - - - - 2b0248e0 by Simon Marlow at 2002-04-29T15:56:19+00:00 [haddock @ 2002-04-29 15:56:19 by simonmar] Fix for 'make install' - - - - - 120453a0 by Simon Marlow at 2002-04-29T15:56:39+00:00 [haddock @ 2002-04-29 15:56:39 by simonmar] Install the auxilliary bits - - - - - 950e6dbb by Simon Marlow at 2002-04-29T15:57:30+00:00 [haddock @ 2002-04-29 15:57:30 by simonmar] Add BinDist bits - - - - - 154b9d71 by Simon Marlow at 2002-05-01T11:02:52+00:00 [haddock @ 2002-05-01 11:02:52 by simonmar] update - - - - - ba6c39fa by Simon Marlow at 2002-05-01T11:03:26+00:00 [haddock @ 2002-05-01 11:03:26 by simonmar] Add another item - - - - - bacb5e33 by Simon Marlow at 2002-05-03T08:50:00+00:00 [haddock @ 2002-05-03 08:50:00 by simonmar] Fix some typos. - - - - - 54c87895 by Sven Panne at 2002-05-05T19:40:51+00:00 [haddock @ 2002-05-05 19:40:51 by panne] As a temporary hack/workaround for a bug in GHC's simplifier, don't pass Happy the -c option for generating the parsers in this subdir. Furthermore, disable -O for HaddocParse, too. - - - - - e6c08703 by Simon Marlow at 2002-05-06T09:51:10+00:00 [haddock @ 2002-05-06 09:51:10 by simonmar] Add RPM spec file (thanks to Tom Moertel <tom-rpms at moertel.com>) - - - - - 7b8fa8e7 by Simon Marlow at 2002-05-06T12:29:26+00:00 [haddock @ 2002-05-06 12:29:26 by simonmar] Add missing type signature (a different workaround for the bug in GHC's simplifier). - - - - - cd0e300d by Simon Marlow at 2002-05-06T12:30:09+00:00 [haddock @ 2002-05-06 12:30:09 by simonmar] Remove workaround for simplifier bug in previous revision. - - - - - 687e68fa by Simon Marlow at 2002-05-06T12:32:32+00:00 [haddock @ 2002-05-06 12:32:32 by simonmar] Allow empty data declarations (another GHC extension). - - - - - 8f29f696 by Simon Marlow at 2002-05-06T12:49:21+00:00 [haddock @ 2002-05-06 12:49:21 by simonmar] Fix silly bug in named documentation block lookup. - - - - - 8e0059af by Simon Marlow at 2002-05-06T13:02:42+00:00 [haddock @ 2002-05-06 13:02:42 by simonmar] Add another named chunk with a different name - - - - - 68f8a896 by Simon Marlow at 2002-05-06T13:32:32+00:00 [haddock @ 2002-05-06 13:32:32 by simonmar] Be more lenient about extra paragraph breaks - - - - - 65fc31db by Simon Marlow at 2002-05-07T15:36:36+00:00 [haddock @ 2002-05-07 15:36:36 by simonmar] DocEmpty is a right and left-unit of DocAppend (remove it in the smart constructor). - - - - - adc81078 by Simon Marlow at 2002-05-07T15:37:15+00:00 [haddock @ 2002-05-07 15:37:15 by simonmar] Allow code blocks to be denoted with bird-tracks in addition to [...]. - - - - - 1283a3c1 by Simon Marlow at 2002-05-08T11:21:56+00:00 [haddock @ 2002-05-08 11:21:56 by simonmar] Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak at cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace. - - - - - a2239cf5 by Simon Marlow at 2002-05-08T11:22:30+00:00 [haddock @ 2002-05-08 11:22:30 by simonmar] Update to test new features. - - - - - 6add955f by Simon Marlow at 2002-05-08T13:37:25+00:00 [haddock @ 2002-05-08 13:37:25 by simonmar] Change the markup for typewriter-font from [...] to @... at . The reasoning is that the '@' symbol is much less likely to be needed than square brackets, and we don't want to have to escape square brackets in code fragments. This will be mildly painful in the short term, but it's better to get the change out of the way as early as possible. - - - - - cda06447 by Simon Marlow at 2002-05-08T13:39:56+00:00 [haddock @ 2002-05-08 13:39:56 by simonmar] Allow nested-style comments to be used as documentation annotations too. eg. {-| ... -} is equivalent to -- | ... An extra space can also be left after the comment opener: {- | ... -}. The only version that isn't allowed is {-# ... -}, because this syntax overlaps with Haskell pragmas; use {- # ... -} instead. - - - - - db23f65e by Simon Marlow at 2002-05-08T14:48:41+00:00 [haddock @ 2002-05-08 14:48:39 by simonmar] Add support for existential quantifiers on constructors. - - - - - adce3794 by Simon Marlow at 2002-05-08T15:43:25+00:00 [haddock @ 2002-05-08 15:43:25 by simonmar] update - - - - - 62a1f436 by Simon Marlow at 2002-05-08T15:44:10+00:00 [haddock @ 2002-05-08 15:44:10 by simonmar] Update to version 0.2 - - - - - f6a24ba3 by Simon Marlow at 2002-05-09T08:48:29+00:00 [haddock @ 2002-05-09 08:48:29 by simonmar] typo - - - - - 9f9522a4 by Simon Marlow at 2002-05-09T10:33:14+00:00 [haddock @ 2002-05-09 10:33:14 by simonmar] oops, left out '/' from the special characters in the last change. - - - - - 14abcb39 by Simon Marlow at 2002-05-09T10:34:44+00:00 [haddock @ 2002-05-09 10:34:44 by simonmar] Fix buglet - - - - - b8d878be by Simon Marlow at 2002-05-09T10:35:00+00:00 [haddock @ 2002-05-09 10:35:00 by simonmar] Give a more useful instance of Show for Module. - - - - - f7bfd626 by Simon Marlow at 2002-05-09T10:37:07+00:00 [haddock @ 2002-05-09 10:37:07 by simonmar] The last commit to Main.lhs broke the delicate balance of laziness which was being used to avoid computing the dependency graph of modules. So I finally bit the bullet and did a proper topological sort of the module graph, which turned out to be easy (stealing the Digraph module from GHC - this really ought to be in the libraries somewhere). - - - - - b481c1d0 by Simon Marlow at 2002-05-09T10:37:25+00:00 [haddock @ 2002-05-09 10:37:25 by simonmar] another item done - - - - - 032e2b42 by Simon Marlow at 2002-05-09T10:44:15+00:00 [haddock @ 2002-05-09 10:44:15 by simonmar] Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not. - - - - - 5fb45e92 by Simon Marlow at 2002-05-09T11:10:55+00:00 [haddock @ 2002-05-09 11:10:55 by simonmar] Add a special case for list types in ppHsAType - - - - - 1937e428 by Simon Marlow at 2002-05-09T12:43:06+00:00 [haddock @ 2002-05-09 12:43:06 by simonmar] Type synonyms can accept a ctype on the RHS, to match GHC. - - - - - 0f16ce56 by Simon Marlow at 2002-05-09T12:45:19+00:00 [haddock @ 2002-05-09 12:45:19 by simonmar] Add 'stdcall' keyword - - - - - 29b0d7d2 by Simon Marlow at 2002-05-09T13:35:45+00:00 [haddock @ 2002-05-09 13:35:45 by simonmar] Add System Requirements section - - - - - bf14dddd by Simon Marlow at 2002-05-09T13:36:11+00:00 [haddock @ 2002-05-09 13:36:11 by simonmar] Test existential types, amongst other things - - - - - 502f8f6f by Simon Marlow at 2002-05-09T13:37:35+00:00 [haddock @ 2002-05-09 13:37:35 by simonmar] Print the module name in a doc-string parse error - - - - - ca1f8d49 by Simon Marlow at 2002-05-09T13:38:04+00:00 [haddock @ 2002-05-09 13:38:04 by simonmar] Add dependency - - - - - 8d3d91ff by Simon Marlow at 2002-05-09T15:37:57+00:00 [haddock @ 2002-05-09 15:37:57 by simonmar] Add the changelog/release notes - - - - - f3960959 by Simon Marlow at 2002-05-09T15:47:47+00:00 [haddock @ 2002-05-09 15:47:47 by simonmar] mention the backquote-style of markup - - - - - 089fb6e6 by Simon Marlow at 2002-05-09T15:59:45+00:00 [haddock @ 2002-05-09 15:59:45 by simonmar] update - - - - - bdd3be0b by Simon Marlow at 2002-05-09T15:59:56+00:00 [haddock @ 2002-05-09 15:59:56 by simonmar] Document changes since 0.1 - - - - - 00fc4af8 by Simon Marlow at 2002-05-10T08:22:48+00:00 [haddock @ 2002-05-10 08:22:48 by simonmar] oops, update to version 0.2 - - - - - a8a79041 by Simon Marlow at 2002-05-10T16:05:08+00:00 [haddock @ 2002-05-10 16:05:08 by simonmar] Only include a mini-contents if there are 2 or more sections - - - - - 06653319 by Simon Marlow at 2002-05-13T09:13:12+00:00 [haddock @ 2002-05-13 09:13:12 by simonmar] fix typos - - - - - 1402b19b by Simon Marlow at 2002-05-13T10:14:22+00:00 [haddock @ 2002-05-13 10:14:22 by simonmar] Allow backquote as the right-hand quote as well as the left-hand quote, as suggested by Dean Herrington. Clean up the grammar a litte. - - - - - dcd5320d by Simon Marlow at 2002-05-13T10:44:10+00:00 [haddock @ 2002-05-13 10:44:10 by simonmar] a couple more things, prioritise a bit - - - - - a90130c4 by Simon Marlow at 2002-05-13T15:19:03+00:00 [haddock @ 2002-05-13 15:19:03 by simonmar] Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs). - - - - - a774d432 by Simon Marlow at 2002-05-13T15:20:54+00:00 [haddock @ 2002-05-13 15:20:54 by simonmar] Fix one of the record examples - - - - - 2d1d5218 by Simon Marlow at 2002-05-15T12:44:35+00:00 [haddock @ 2002-05-15 12:44:35 by simonmar] Preserve the newline before a bird-track, but only within a paragraph. - - - - - 1554c09a by Simon Marlow at 2002-05-15T13:03:02+00:00 [haddock @ 2002-05-15 13:03:01 by simonmar] Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed. - - - - - 57344dc3 by Simon Marlow at 2002-05-15T13:03:19+00:00 [haddock @ 2002-05-15 13:03:19 by simonmar] Bump to version 0.3 - - - - - b2791812 by Simon Marlow at 2002-05-15T13:03:41+00:00 [haddock @ 2002-05-15 13:03:41 by simonmar] update - - - - - fead183e by Simon Marlow at 2002-05-15T13:10:15+00:00 [haddock @ 2002-05-15 13:10:15 by simonmar] Rename Foo.hs to Test.hs, and add a Makefile - - - - - b0b1f89f by Simon Marlow at 2002-05-15T13:16:07+00:00 [haddock @ 2002-05-15 13:16:07 by simonmar] - Remove the note about function argument docs not being implemented - Note that qualified identifiers can be used to point to entities that aren't in scope. - - - - - 5665f31a by Simon Marlow at 2002-05-15T13:28:46+00:00 [haddock @ 2002-05-15 13:28:46 by simonmar] Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson. - - - - - 0564505d by Simon Marlow at 2002-05-17T10:51:57+00:00 [haddock @ 2002-05-17 10:51:57 by simonmar] Fix bugs in qualified name handling (A.B.f was returned as B.f) - - - - - 10e7311c by Simon Marlow at 2002-05-21T10:24:52+00:00 [haddock @ 2002-05-21 10:24:52 by simonmar] - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation - - - - - 2f91c2a6 by Simon Marlow at 2002-05-21T10:27:40+00:00 [haddock @ 2002-05-21 10:27:40 by simonmar] add a few more test cases - - - - - 01c2ddd2 by Simon Marlow at 2002-05-21T10:28:33+00:00 [haddock @ 2002-05-21 10:28:33 by simonmar] Rearrange a bit, and add support for tabular datatype rendering - - - - - a4e4c5f8 by Simon Marlow at 2002-05-27T09:03:52+00:00 [haddock @ 2002-05-27 09:03:51 by simonmar] Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others) - - - - - 48722e68 by Simon Marlow at 2002-05-27T12:30:38+00:00 [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. - - - - - 657204d2 by Simon Marlow at 2002-05-27T13:19:49+00:00 [haddock @ 2002-05-27 13:19:49 by simonmar] Fix bug: we weren't renaming HsDocCommentNamed in renameDecl - - - - - 592aae66 by Simon Marlow at 2002-05-27T14:10:27+00:00 [haddock @ 2002-05-27 14:10:27 by simonmar] Fix some bugs in the rendering of qualified type signatures. - - - - - 69c8f763 by Simon Marlow at 2002-05-27T14:36:45+00:00 [haddock @ 2002-05-27 14:36:45 by simonmar] warning message tweak - - - - - 16e64e21 by Simon Marlow at 2002-05-27T14:53:53+00:00 [haddock @ 2002-05-27 14:53:53 by simonmar] hyperlinked identifiers should be in <tt> - - - - - 8d5e4783 by Simon Marlow at 2002-05-27T15:56:45+00:00 [haddock @ 2002-05-27 15:56:45 by simonmar] Do something sensible for modules which don't export anything (except instances). - - - - - 9d3ef811 by Simon Marlow at 2002-05-28T10:12:50+00:00 [haddock @ 2002-05-28 10:12:50 by simonmar] Rename the module documentation properly (bug reported by Sven Panne). - - - - - ef03a1cc by Simon Marlow at 2002-05-28T10:13:04+00:00 [haddock @ 2002-05-28 10:13:04 by simonmar] Add some more test cases - - - - - 92baa0e8 by Simon Marlow at 2002-05-28T11:17:55+00:00 [haddock @ 2002-05-28 11:17:55 by simonmar] If an identifier doesn't lex, then just replace it by a DocString. - - - - - a3156213 by Simon Marlow at 2002-05-28T16:16:19+00:00 [haddock @ 2002-05-28 16:16:19 by simonmar] Only link to names in the current module which are actually listed in the documentation. A name may be exported but not present in the documentation if it is exported as part of a 'module M' export specifier. - - - - - 31acf941 by Simon Marlow at 2002-05-28T16:17:11+00:00 [haddock @ 2002-05-28 16:17:11 by simonmar] update - - - - - 7e474ebf by Sigbjorn Finne at 2002-05-28T22:42:08+00:00 [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] - - - - - 093f7e53 by Simon Marlow at 2002-05-29T09:09:49+00:00 [haddock @ 2002-05-29 09:09:49 by simonmar] Back out previous change until we can find a better way to do this. - - - - - 9234389c by Simon Marlow at 2002-05-29T13:19:06+00:00 [haddock @ 2002-05-29 13:19:06 by simonmar] Make the markup syntax a little more friendly: - single quotes are now interpreted literally unless they surround a valid Haskell identifier. So for example now there's no need to escape a single quote used as an apostrophe. - text to the right of a bird track is now literal (if you want marked-up text in a code block, use @...@). - - - - - b3333526 by Simon Marlow at 2002-05-29T13:38:51+00:00 [haddock @ 2002-05-29 13:38:51 by simonmar] Document recent changes to markup syntax - - - - - f93641d6 by Simon Marlow at 2002-05-29T15:27:18+00:00 [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too - - - - - 613f21e3 by Simon Marlow at 2002-06-03T13:05:58+00:00 [haddock @ 2002-06-03 13:05:57 by simonmar] Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case). - - - - - 14b36807 by Simon Marlow at 2002-06-03T13:20:00+00:00 [haddock @ 2002-06-03 13:20:00 by simonmar] Fix linking to qualified names again (thanks to Sven Panne for pointing out the bug). - - - - - 95b10eac by Simon Marlow at 2002-06-03T13:46:48+00:00 [haddock @ 2002-06-03 13:46:48 by simonmar] Fix for exporting record selectors from a newtype declaration - - - - - 272f932e by Simon Marlow at 2002-06-03T13:56:38+00:00 [haddock @ 2002-06-03 13:56:38 by simonmar] update to version 0.3 - - - - - 1c0a3bed by Simon Marlow at 2002-06-03T14:05:07+00:00 [haddock @ 2002-06-03 14:05:07 by simonmar] Add changes in version 0.3 - - - - - 145b4626 by Simon Marlow at 2002-06-03T14:12:38+00:00 [haddock @ 2002-06-03 14:12:38 by simonmar] Render class names as proper binders - - - - - 052106b3 by Simon Marlow at 2002-06-03T14:15:10+00:00 [haddock @ 2002-06-03 14:15:10 by simonmar] update, and separate into bugs, features, and cosmetic items. - - - - - 854f4914 by Simon Marlow at 2002-06-03T14:16:13+00:00 [haddock @ 2002-06-03 14:16:13 by simonmar] More test cases - - - - - 466922c8 by Simon Marlow at 2002-06-03T14:16:56+00:00 [haddock @ 2002-06-03 14:16:56 by simonmar] Example from the paper - - - - - 9962a045 by Simon Marlow at 2002-06-03T14:17:49+00:00 [haddock @ 2002-06-03 14:17:49 by simonmar] A debugging version of the style-sheet, which gives some tables coloured backgrounds so we can see what's going on. - - - - - f16b79db by Simon Marlow at 2002-06-03T14:19:46+00:00 [haddock @ 2002-06-03 14:19:46 by simonmar] typo - - - - - 620db27b by Simon Marlow at 2002-06-03T14:48:32+00:00 [haddock @ 2002-06-03 14:48:32 by simonmar] oops, fix markup bugs - - - - - 53fd105c by Simon Marlow at 2002-06-05T09:05:07+00:00 [haddock @ 2002-06-05 09:05:07 by simonmar] Keep foreign imports when there is no export list (bug reported by Sven Panne). - - - - - 6d98989c by Simon Marlow at 2002-06-05T09:12:02+00:00 [haddock @ 2002-06-05 09:12:02 by simonmar] Identifiers in single quotes can be symbol names too (bug reported by Hal Daume). - - - - - 001811e5 by Sven Panne at 2002-06-08T14:03:36+00:00 [haddock @ 2002-06-08 14:03:36 by panne] Tiny workaround for the fact that Haddock currently ignores HsImportSpecs: Let the local_orig_env take precedence. This is no real solution at all, but improves things sometimes, e.g. in my GLUT documentation. :-) - - - - - 504d19c9 by Simon Marlow at 2002-06-11T09:23:25+00:00 [haddock @ 2002-06-11 09:23:25 by simonmar] portability nit - - - - - e13b5af4 by Simon Marlow at 2002-06-20T12:38:07+00:00 [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. - - - - - f467a9b6 by Simon Marlow at 2002-06-20T12:39:02+00:00 [haddock @ 2002-06-20 12:39:01 by simonmar] Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list. - - - - - b8dbfe20 by Simon Marlow at 2002-06-21T12:43:06+00:00 [haddock @ 2002-06-21 12:43:06 by simonmar] When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers. - - - - - 4831dbbd by Simon Marlow at 2002-06-21T15:50:42+00:00 [haddock @ 2002-06-21 15:50:42 by simonmar] Add support for reading and writing interface files(!) This turned out to be quite easy, and necessary to get decent hyperlinks between the documentation for separate packages in the libraries. The functionality isn't quite complete yet: for a given package of modules, you'd like to say "the HTML for these modules lives in directory <dir>" (currently they are assumed to be all in the same place). Two new flags: --dump-interface=FILE dump an interface file in FILE --read-interface=FILE read interface from FILE an interface file describes *all* the modules being processed. Only the exported names are kept in the interface: if you re-export a name from a module in another interface the signature won't be copied. This is a compromise to keep the size of the interfaces sensible. Also, I added another useful option: --no-implicit-prelude avoids trying to import the Prelude. Previously this was the default, but now importing the Prelude from elsewhere makes sense if you also read in an interface containing the Prelude module, so Haddock imports the Prelude implicitly according to the Haskell spec. - - - - - d3640a19 by Sven Panne at 2002-06-23T14:54:00+00:00 [haddock @ 2002-06-23 14:54:00 by panne] Make it compile with newer GHCs - - - - - 780c506b by Sven Panne at 2002-06-23T15:44:31+00:00 [haddock @ 2002-06-23 15:44:31 by panne] Cleaned up build root handling and added more docs - - - - - 45290d2e by Simon Marlow at 2002-06-24T14:37:43+00:00 [haddock @ 2002-06-24 14:37:42 by simonmar] When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface. - - - - - 4e2b9ae6 by Simon Marlow at 2002-07-03T16:01:08+00:00 [haddock @ 2002-07-03 16:01:07 by simonmar] Handle import specs properly, include 'hiding'. Haddock now has a complete implementation of the Haskell module system (more or less; I won't claim it's 100% correct). - - - - - 9a9aa1a8 by Simon Marlow at 2002-07-03T16:18:16+00:00 [haddock @ 2002-07-03 16:18:16 by simonmar] Update - - - - - 560c3026 by Simon Marlow at 2002-07-04T14:56:10+00:00 [haddock @ 2002-07-04 14:56:10 by simonmar] Clean up the code that constructs the exported declarations, and fix a couple of bugs along the way. Now if you import a class hiding one of the methods, then re-export the class, the version in the documentation will correctly have the appropriate method removed. - - - - - 2c26e77d by Simon Marlow at 2002-07-04T15:26:13+00:00 [haddock @ 2002-07-04 15:26:13 by simonmar] More bugfixes to the export handling - - - - - 03e0710d by Simon Marlow at 2002-07-09T10:12:10+00:00 [haddock @ 2002-07-09 10:12:10 by simonmar] Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base). - - - - - 44f3891a by Simon Marlow at 2002-07-09T10:12:51+00:00 [haddock @ 2002-07-09 10:12:51 by simonmar] commented-out debugging code - - - - - 97280873 by Krasimir Angelov at 2002-07-09T16:33:33+00:00 [haddock @ 2002-07-09 16:33:31 by krasimir] 'Microsoft HTML Help' support - - - - - 3dc04655 by Simon Marlow at 2002-07-10T09:40:56+00:00 [haddock @ 2002-07-10 09:40:56 by simonmar] Fix for rendering of the (->) type constructor, from Ross Paterson. - - - - - c9f149c6 by Simon Marlow at 2002-07-10T10:26:11+00:00 [haddock @ 2002-07-10 10:26:11 by simonmar] Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help). - - - - - e8acc1e6 by Simon Marlow at 2002-07-10T10:57:10+00:00 [haddock @ 2002-07-10 10:57:10 by simonmar] Document all the new options since 0.3 - - - - - 8bb85544 by Simon Marlow at 2002-07-10T10:58:31+00:00 [haddock @ 2002-07-10 10:58:31 by simonmar] Sort the options a bit - - - - - abc0dd59 by Simon Marlow at 2002-07-15T09:19:38+00:00 [haddock @ 2002-07-15 09:19:38 by simonmar] Fix a bug in mkExportItems when processing a module without an explicit export list. We were placing one copy of a declaration for each binder in the declaration, which for a data type would mean one copy of the whole declaration per constructor or record selector. - - - - - dde65bb9 by Simon Marlow at 2002-07-15T09:54:16+00:00 [haddock @ 2002-07-15 09:54:16 by simonmar] merge rev. 1.35 - - - - - bd7eb8c4 by Simon Marlow at 2002-07-15T10:14:31+00:00 [haddock @ 2002-07-15 10:14:30 by simonmar] Be a bit more liberal in the kind of commenting styles we allow, as suggested by Malcolm Wallace. Mostly this consists of allowing doc comments either side of a separator token. In an export list, a section heading is now allowed before the comma, as well as after it. eg. module M where ( T(..) -- * a section heading , f -- * another section heading , g ) In record fields, doc comments are allowed anywhere (previously a doc-next was allowed only after the comma, and a doc-before was allowed only before the comma). eg. data R = C { -- | describes 'f' f :: Int -- | describes 'g' , g :: Int } - - - - - 8f6dfe34 by Simon Marlow at 2002-07-15T10:21:56+00:00 [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. - - - - - fc515bb7 by Simon Marlow at 2002-07-15T16:16:50+00:00 [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). - - - - - 80a97e74 by Simon Marlow at 2002-07-19T09:13:10+00:00 [haddock @ 2002-07-19 09:13:10 by simonmar] Allow special id's ([], (), etc.) to be used in an import declaration. - - - - - a69d7378 by Simon Marlow at 2002-07-19T09:59:02+00:00 [haddock @ 2002-07-19 09:59:02 by simonmar] Allow special id's ([], (), etc.) to be used in an import declarations. - - - - - d205fa60 by Simon Marlow at 2002-07-19T10:00:16+00:00 [haddock @ 2002-07-19 10:00:16 by simonmar] Relax the restrictions which require doc comments to be followed by semi colons - in some cases this isn't necessary. Now you can write module M where { -- | some doc class C where {} } without needing to put a semicolon before the class declaration. - - - - - e9301e14 by Simon Marlow at 2002-07-23T08:24:09+00:00 [haddock @ 2002-07-23 08:24:09 by simonmar] A new TODO list item - - - - - e5d77586 by Simon Marlow at 2002-07-23T08:40:56+00:00 [haddock @ 2002-07-23 08:40:56 by simonmar] - update the acknowledgements - remove the paragraph that described how to use explicit layout with doc comments; it isn't relevant any more. - - - - - 78a94137 by Simon Marlow at 2002-07-23T08:43:02+00:00 [haddock @ 2002-07-23 08:43:02 by simonmar] more tests - - - - - 5c320927 by Simon Marlow at 2002-07-23T08:43:26+00:00 [haddock @ 2002-07-23 08:43:26 by simonmar] Updates for version 0.4 - - - - - 488e99ae by Simon Marlow at 2002-07-23T09:10:46+00:00 [haddock @ 2002-07-23 09:10:46 by simonmar] Fix the %changelog (rpm complained that it wasn't in the right order) - - - - - a77bb373 by Simon Marlow at 2002-07-23T09:12:38+00:00 [haddock @ 2002-07-23 09:12:38 by simonmar] Another item for the TODO list - - - - - f1ec1813 by Simon Marlow at 2002-07-23T10:18:46+00:00 [haddock @ 2002-07-23 10:18:46 by simonmar] Add a version banner when invoked with -v - - - - - 1d44cadf by Simon Marlow at 2002-07-24T09:28:19+00:00 [haddock @ 2002-07-24 09:28:19 by simonmar] Remove ^Ms - - - - - 4d8d5e94 by Simon Marlow at 2002-07-24T09:42:18+00:00 [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. - - - - - d6edc43e by Simon Marlow at 2002-07-25T14:37:29+00:00 [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. - - - - - b34d18fa by Simon Marlow at 2002-08-02T09:08:22+00:00 [haddock @ 2002-08-02 09:08:22 by simonmar] The <TT> and <PRE> environments seem to use a font that is a little too small in IE. Compensate. (suggestion from Daan Leijen). - - - - - 8106b086 by Simon Marlow at 2002-08-02T09:25:23+00:00 [haddock @ 2002-08-02 09:25:20 by simonmar] Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen). - - - - - c1acff8f by Simon Marlow at 2002-08-05T09:03:49+00:00 [haddock @ 2002-08-05 09:03:49 by simonmar] update - - - - - f968661c by Simon Marlow at 2002-11-11T09:32:57+00:00 [haddock @ 2002-11-11 09:32:57 by simonmar] Fix cut-n-pasto - - - - - 12d02619 by Simon Marlow at 2002-11-13T09:49:46+00:00 [haddock @ 2002-11-13 09:49:46 by simonmar] Small bugfix in the --read-interface option parsing from Brett Letner. - - - - - 30e32d5e by Ross Paterson at 2003-01-16T15:07:57+00:00 [haddock @ 2003-01-16 15:07:57 by ross] Adjust for the new exception libraries (as well as the old ones). - - - - - 871f65df by Sven Panne at 2003-02-20T21:31:40+00:00 [haddock @ 2003-02-20 21:31:40 by panne] * Add varsyms and consyms to index * Exclude empty entries from index - - - - - bc42cc87 by Sven Panne at 2003-02-24T21:26:29+00:00 [haddock @ 2003-02-24 21:26:29 by panne] Don't convert a "newtype" to a single-constructor "data" for non-abstractly exported types, they are quite different regarding strictness/pattern matching. Now a "data" without any constructors is only emitted for an abstractly exported type, regardless if it is actually a "newtype" or a "data". - - - - - 0c2a1d99 by Sven Panne at 2003-03-08T19:02:38+00:00 [haddock @ 2003-03-08 19:02:38 by panne] Fixed some broken/redirected/canonicalized links found by a very picky link checker. - - - - - 25459269 by Sven Panne at 2003-03-09T21:13:43+00:00 [haddock @ 2003-03-09 21:13:43 by panne] Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor. - - - - - 6be4db86 by Sven Panne at 2003-03-10T21:34:25+00:00 [haddock @ 2003-03-10 21:34:24 by panne] Escape fragments. This fixes e.g. links to operators. - - - - - eb12972c by Ross Paterson at 2003-04-25T10:50:06+00:00 [haddock @ 2003-04-25 10:50:05 by ross] An 80% solution to generating derived instances. A complete solution would duplicate the instance inference logic, but if a type variable occurs as a constructor argument, then we can just propagate the derived class to the variable. But we know nothing of the constraints on any type variables that occur elsewhere. For example, the declarations data Either a b = Left a | Right b deriving (Eq, Ord) data Ptr a = Ptr Addr# deriving (Eq, Ord) newtype IORef a = IORef (STRef RealWorld a) deriving Eq yield the instances (Eq a, Eq b) => Eq (Either a b) (Ord a, Ord b) => Ord (Either a b) Eq (Ptr a) Ord (Ptr a) (??? a) => Eq (IORef a) The last example shows the limits of this local analysis. Note that a type variable may be in both categories: then we know a constraint, but there may be more, or a stronger constraint, e.g. data Tree a = Node a [Tree a] deriving Eq yields (Eq a, ??? a) => Eq (Tree a) - - - - - de886f78 by Simon Marlow at 2003-04-25T11:17:55+00:00 [haddock @ 2003-04-25 11:17:55 by simonmar] Some updates, including moving the derived instance item down to the bottom of the list now that Ross has contributed some code that does the job for common cases. - - - - - 1b52cffd by Simon Marlow at 2003-04-30T14:02:32+00:00 [haddock @ 2003-04-30 14:02:32 by simonmar] When installing on Windows, run cygpath over $(HADDOCKLIB) so that haddock (a mingw program, built by GHC) can understand it. You still need to be in a cygwin environment to run Haddock, because of the shell script wrapper. - - - - - d4f638de by Simon Marlow at 2003-05-06T10:04:47+00:00 [haddock @ 2003-05-06 10:04:47 by simonmar] Catch another case of a paragraph containing just a DocMonospaced that should turn into a DocCodeBlock. - - - - - 4162b2b9 by Simon Marlow at 2003-05-06T10:11:44+00:00 [haddock @ 2003-05-06 10:11:44 by simonmar] Add some more code-block tests. - - - - - 4f5802c8 by Simon Marlow at 2003-05-06T10:14:52+00:00 [haddock @ 2003-05-06 10:14:52 by simonmar] Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code. - - - - - ef8c45f7 by Simon Marlow at 2003-05-21T15:07:21+00:00 [haddock @ 2003-05-21 15:07:21 by simonmar] Only omit the module contents when there are no section headings at all. - - - - - bcee1e75 by Sigbjorn Finne at 2003-05-30T16:50:45+00:00 [haddock @ 2003-05-30 16:50:45 by sof] cygpath: for now, steer clear of --mixed - - - - - 30567af3 by Sigbjorn Finne at 2003-05-30T17:59:28+00:00 [haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit - - - - - b0856e7d by Simon Marlow at 2003-06-03T09:55:26+00:00 [haddock @ 2003-06-03 09:55:26 by simonmar] Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems. - - - - - 70e137ea by Simon Marlow at 2003-07-28T13:30:35+00:00 [haddock @ 2003-07-28 13:30:35 by simonmar] Add tests for a couple of bugs. - - - - - 122bd578 by Simon Marlow at 2003-07-28T13:31:25+00:00 [haddock @ 2003-07-28 13:31:25 by simonmar] Add documentation for anchors. - - - - - 0bd27cb2 by Simon Marlow at 2003-07-28T13:31:46+00:00 [haddock @ 2003-07-28 13:31:46 by simonmar] Update - - - - - 08052d42 by Simon Marlow at 2003-07-28T13:32:12+00:00 [haddock @ 2003-07-28 13:32:12 by simonmar] layout tweak. - - - - - 13942749 by Simon Marlow at 2003-07-28T13:33:03+00:00 [haddock @ 2003-07-28 13:33:03 by simonmar] Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively). - - - - - d7f493b9 by Simon Marlow at 2003-07-28T13:35:17+00:00 [haddock @ 2003-07-28 13:35:16 by simonmar] When a module A exports another module's contents via 'module B', then modules which import entities from B re-exported by A should link to B.foo rather than A.foo. See examples/Bug2.hs. - - - - - d94cf705 by Simon Marlow at 2003-07-28T13:36:14+00:00 [haddock @ 2003-07-28 13:36:14 by simonmar] Update to version 0.5 - - - - - dbb776cd by Sven Panne at 2003-07-28T14:02:43+00:00 [haddock @ 2003-07-28 14:02:43 by panne] * Updated to version 0.5 * Automagically generate configure if it is not there - - - - - 6cfeee53 by Simon Marlow at 2003-07-28T14:32:43+00:00 [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 - - - - - a1ce838f by Simon Marlow at 2003-07-28T14:33:37+00:00 [haddock @ 2003-07-28 14:33:37 by simonmar] Update for 0.5 - - - - - c0fe6493 by Simon Marlow at 2003-07-28T14:53:22+00:00 [haddock @ 2003-07-28 14:53:22 by simonmar] Markup fix - - - - - 6ea31596 by Sven Panne at 2003-07-28T16:40:45+00:00 [haddock @ 2003-07-28 16:40:45 by panne] Make it compile with GHC >= 6.01 - - - - - afcd30fc by Simon Marlow at 2003-07-30T15:04:52+00:00 [haddock @ 2003-07-30 15:04:52 by simonmar] Pay attention to import specs when building the the import env, as well as the orig env. This may fix some wrong links in documentation when import specs are being used. - - - - - 17c3137f by Simon Marlow at 2003-07-30T16:05:41+00:00 [haddock @ 2003-07-30 16:05:40 by simonmar] Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup. - - - - - 3d3b5c87 by Sven Panne at 2003-08-04T10:18:24+00:00 [haddock @ 2003-08-04 10:18:24 by panne] Don't print parentheses around one-element contexts - - - - - 9e3f3f2d by Simon Marlow at 2003-08-04T12:59:47+00:00 [haddock @ 2003-08-04 12:59:47 by simonmar] A couple of TODOs. - - - - - e9d8085c by Simon Marlow at 2003-08-05T14:10:31+00:00 [haddock @ 2003-08-05 14:10:31 by simonmar] I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it. - - - - - ff5c7d6d by Simon Marlow at 2003-08-15T14:42:59+00:00 [haddock @ 2003-08-15 14:42:59 by simonmar] Convert the lexer to Alex, and fix a bug in the process. - - - - - 1aa077bf by Simon Marlow at 2003-08-15T15:00:18+00:00 [haddock @ 2003-08-15 15:00:18 by simonmar] Update - - - - - d3de1e38 by Simon Marlow at 2003-08-15T15:01:03+00:00 [haddock @ 2003-08-15 15:01:03 by simonmar] wibbles - - - - - b40ece3b by Simon Marlow at 2003-08-18T10:04:47+00:00 [haddock @ 2003-08-18 10:04:47 by simonmar] Lex the 'mdo' keyword as 'do'. - - - - - 8f9a1146 by Simon Marlow at 2003-08-18T11:48:24+00:00 [haddock @ 2003-08-18 11:48:24 by simonmar] Two bugs from Sven. - - - - - ea54ebc0 by Simon Marlow at 2003-08-18T11:48:46+00:00 [haddock @ 2003-08-18 11:48:46 by simonmar] Fixes to the new lexer. - - - - - d5f6a4b5 by Simon Marlow at 2003-08-19T09:09:03+00:00 [haddock @ 2003-08-19 09:09:03 by simonmar] Further wibbles to the syntax. - - - - - 6bbdadb7 by Sven Panne at 2003-08-26T18:45:35+00:00 [haddock @ 2003-08-26 18:45:35 by panne] Use autoreconf instead of autoconf - - - - - 32e889cb by Sven Panne at 2003-08-26T19:01:19+00:00 [haddock @ 2003-08-26 19:01:18 by panne] Made option handling a bit more consistent with other tools, in particular: Every program in fptools should output * version info on stdout and terminate successfully when -V or --version * usage info on stdout and terminate successfully when -? or --help * usage info on stderr and terminate unsuccessfully when an unknown option is given. - - - - - 5d156a91 by Sven Panne at 2003-08-26T19:20:55+00:00 [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag - - - - - e6577265 by Sven Panne at 2003-08-27T07:50:03+00:00 [haddock @ 2003-08-27 07:50:02 by panne] * Made -D a short option for --dump-interface. * Made -m a short option for --ms-help. * Made -n a short option for --no-implicit-prelude. * Made -c a short option for --css. * Removed DocBook options from executable (they didn't do anything), but mark them as reserved in the docs. Note that the short option for DocBook output is now -S (from SGML) instead of -d. The latter is now a short option for --debug. * The order of the Options in the documentation now matches the order printed by Haddock itself. Note: Although changing the names of options is often a bad idea, I'd really like to make the options for the programs in fptools more consistent and compatible to the ones used in common GNU programs. - - - - - d303ff98 by Simon Marlow at 2003-09-10T08:23:48+00:00 [haddock @ 2003-09-10 08:23:48 by simonmar] Add doc subdir. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 9a70e46a by Simon Marlow at 2003-09-10T08:24:32+00:00 [haddock @ 2003-09-10 08:24:32 by simonmar] Install these files in $(datadir), not $(libdir), since they're architecture independent. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - bbb87e7a by Simon Marlow at 2003-09-10T08:25:31+00:00 [haddock @ 2003-09-10 08:25:31 by simonmar] Haddock's supplementary HTML bits now live in $(datadir), not $(libdir). Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 3587c24b by Simon Marlow at 2003-09-22T10:34:38+00:00 [haddock @ 2003-09-22 10:34:38 by simonmar] Allow installing of docs. - - - - - d510b517 by Sven Panne at 2003-10-11T08:10:44+00:00 [haddock @ 2003-10-11 08:10:44 by panne] Include architecture-independent files in file list - - - - - 187d7618 by Sigbjorn Finne at 2003-10-20T17:19:24+00:00 [haddock @ 2003-10-20 17:19:22 by sof] support for i-parameters + zip comprehensions - - - - - b6c7a273 by Simon Marlow at 2003-11-03T14:24:24+00:00 [haddock @ 2003-11-03 14:24:24 by simonmar] Update TODO file. - - - - - 58513e33 by Simon Marlow at 2003-11-05T11:22:04+00:00 [haddock @ 2003-11-05 11:22:04 by simonmar] Remove the last of the uses of 'trace' to emit warnings, and tidy up a couple of places where duplicate warnings were being emitted. - - - - - 33a78846 by Simon Marlow at 2003-11-05T11:30:53+00:00 [haddock @ 2003-11-05 11:30:52 by simonmar] - Suppress warnings about unknown imported modules by default. - Add a -v/--verbose flag to re-enable these warnings. The general idea is to suppress the "Warning: unknown module: Prelude" warnings which most Haddock users will see every time, and which aren't terribly useful. - - - - - a969de7f by Simon Marlow at 2003-11-05T12:30:28+00:00 [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. - - - - - f14ea82a by Simon Marlow at 2003-11-05T15:15:59+00:00 [haddock @ 2003-11-05 15:15:59 by simonmar] Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this. - - - - - 01a25ca6 by Simon Marlow at 2003-11-05T15:16:38+00:00 [haddock @ 2003-11-05 15:16:38 by simonmar] Update - - - - - 1a7ccb86 by Simon Marlow at 2003-11-05T17:16:05+00:00 [haddock @ 2003-11-05 17:16:04 by simonmar] Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up. - - - - - a2bca16d by Simon Marlow at 2003-11-06T10:44:52+00:00 [haddock @ 2003-11-06 10:44:52 by simonmar] Include iface_reexported in the .haddock file. This unfortunately bloats the file (40% for base). If this gets to be a problem we can always apply the dictionary trick that GHC uses for squashing .hi files. - - - - - 0a09c293 by Simon Marlow at 2003-11-06T12:39:47+00:00 [haddock @ 2003-11-06 12:39:46 by simonmar] - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo at . -- -- [@bar@] The description of @bar at . Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added. - - - - - fe1b3460 by Simon Marlow at 2003-11-06T14:47:36+00:00 [haddock @ 2003-11-06 14:47:36 by simonmar] Remove the 'Parent' button - it is of dubious use, and often points into thin air. - - - - - db6d762f by Simon Marlow at 2003-11-06T16:48:14+00:00 [haddock @ 2003-11-06 16:48:11 by simonmar] - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page. - - - - - 7d71718b by Simon Marlow at 2003-11-06T16:50:28+00:00 [haddock @ 2003-11-06 16:50:28 by simonmar] Add -k/--package docs - - - - - ef43949d by Simon Marlow at 2003-11-06T16:51:23+00:00 [haddock @ 2003-11-06 16:51:23 by simonmar] Bump to 0.6 - - - - - 1c419e06 by Simon Marlow at 2003-11-06T16:51:50+00:00 [haddock @ 2003-11-06 16:51:50 by simonmar] update - - - - - 69422327 by Simon Marlow at 2003-11-10T14:41:06+00:00 [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. - - - - - 3c3fc433 by Simon Marlow at 2003-11-10T14:51:59+00:00 [haddock @ 2003-11-10 14:51:59 by simonmar] Fix for getReExports: take into account names which are not visible because they are re-exported from a different package. - - - - - 31c8437b by Simon Marlow at 2003-11-10T15:10:53+00:00 [haddock @ 2003-11-10 15:10:53 by simonmar] Version 0.6 changes - - - - - a7c2430b by Simon Marlow at 2003-11-10T15:15:58+00:00 [haddock @ 2003-11-10 15:15:58 by simonmar] getReExports: one error case that isn't - - - - - 00cc459c by Simon Marlow at 2003-11-10T16:15:19+00:00 [haddock @ 2003-11-10 16:15:18 by simonmar] copyright update - - - - - ca62408d by Simon Marlow at 2003-11-11T09:57:25+00:00 [haddock @ 2003-11-11 09:57:25 by simonmar] Version 0.6 - - - - - 3acbf818 by Simon Marlow at 2003-11-11T12:10:44+00:00 [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. - - - - - 6c90abc2 by Simon Marlow at 2003-11-12T10:03:39+00:00 [haddock @ 2003-11-12 10:03:39 by simonmar] 2002 -> 2003 - - - - - 090bbc4c by Simon Marlow at 2003-11-28T12:08:00+00:00 [haddock @ 2003-11-28 12:08:00 by simonmar] update - - - - - 8096a832 by Simon Marlow at 2003-11-28T12:09:58+00:00 [haddock @ 2003-11-28 12:09:58 by simonmar] Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it. - - - - - 35294929 by Sven Panne at 2003-12-29T17:16:31+00:00 [haddock @ 2003-12-29 17:16:31 by panne] Updated my email address - - - - - cdb697bf by Simon Marlow at 2004-01-08T10:14:24+00:00 [haddock @ 2004-01-08 10:14:24 by simonmar] Add instructions for using GHC to pre-process source for feeding to Haddock. - - - - - 8dfc491f by Simon Marlow at 2004-01-09T12:45:46+00:00 [haddock @ 2004-01-09 12:45:46 by simonmar] Add -optP-P to example ghc command line. - - - - - ac41b820 by Simon Marlow at 2004-02-03T11:02:03+00:00 [haddock @ 2004-02-03 11:02:03 by simonmar] Fix bug in index generation - - - - - f4e7edcb by Simon Marlow at 2004-02-10T11:51:16+00:00 [haddock @ 2004-02-10 11:51:16 by simonmar] Don't throw away whitespace at the beginning of a line (experimental fix). - - - - - 68e212d2 by Simon Marlow at 2004-02-10T12:10:08+00:00 [haddock @ 2004-02-10 12:10:08 by simonmar] Fix for previous commit: I now realise why the whitespace was stripped from the beginning of the line. Work around it. - - - - - e7d7f2df by Sven Panne at 2004-02-10T18:38:45+00:00 [haddock @ 2004-02-10 18:38:45 by panne] Make Haddock link with the latest relocated monad transformer package - - - - - 992d4225 by Simon Marlow at 2004-02-16T10:21:35+00:00 [haddock @ 2004-02-16 10:21:35 by simonmar] Add a TODO - - - - - 1ac55326 by Simon Marlow at 2004-03-12T11:33:39+00:00 [haddock @ 2004-03-12 11:33:39 by simonmar] Add an item. - - - - - 0478e903 by Simon Marlow at 2004-03-15T12:24:05+00:00 [haddock @ 2004-03-15 12:24:05 by simonmar] Add an item. - - - - - 6f26d21a by Simon Marlow at 2004-03-18T14:21:29+00:00 [haddock @ 2004-03-18 14:21:29 by simonmar] Fix URL - - - - - 19b6bb99 by Simon Marlow at 2004-03-22T14:09:03+00:00 [haddock @ 2004-03-22 14:09:03 by simonmar] getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me). - - - - - 5c756031 by Simon Marlow at 2004-03-24T09:42:11+00:00 [haddock @ 2004-03-24 09:42:10 by simonmar] hiding bug from Ross Paterson (fixed in rev 1.59 of Main.hs) - - - - - 1b692e6c by Simon Marlow at 2004-03-24T10:10:50+00:00 [haddock @ 2004-03-24 10:10:50 by simonmar] mkExportItems fix & simplification: we should be looking at the actual exported names (calculated earlier) to figure out which subordinates of a declaration are exported. This means that if you export a record, and name its fields separately in the export list, the fields will still be visible in the documentation for the constructor. - - - - - 90e5e294 by Simon Marlow at 2004-03-24T10:12:08+00:00 [haddock @ 2004-03-24 10:12:08 by simonmar] Make restrictCons take into account record field names too (removing a ToDo). - - - - - 2600efa4 by Simon Marlow at 2004-03-24T10:16:17+00:00 [haddock @ 2004-03-24 10:16:17 by simonmar] Record export tests. - - - - - 6a8575c7 by Simon Marlow at 2004-03-25T09:35:14+00:00 [haddock @ 2004-03-25 09:35:14 by simonmar] restrictTo: fix for restricting a newtype with a record field. - - - - - dcf55a8d by Simon Marlow at 2004-03-25T10:01:42+00:00 [haddock @ 2004-03-25 10:01:42 by simonmar] Fix duplicate instance bug - - - - - f49aa758 by Simon Marlow at 2004-03-25T10:02:41+00:00 [haddock @ 2004-03-25 10:02:41 by simonmar] Duplicate instance bug. - - - - - 7b87344c by Simon Marlow at 2004-03-25T10:29:56+00:00 [haddock @ 2004-03-25 10:29:56 by simonmar] If a name is imported from two places, one hidden and one not, choose the unhidden one to link to. Also, when there's only a hidden module to link to, don't try linking to it. - - - - - 40f44d7b by Simon Marlow at 2004-03-25T15:17:24+00:00 [haddock @ 2004-03-25 15:17:23 by simonmar] Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment. - - - - - 9b64dc0f by Simon Marlow at 2004-03-25T15:20:55+00:00 [haddock @ 2004-03-25 15:20:55 by simonmar] Update - - - - - c2fff7f2 by Simon Marlow at 2004-03-25T15:45:10+00:00 [haddock @ 2004-03-25 15:45:10 by simonmar] Eliminate some unnecessary spaces in the HTML rendering - - - - - b7948ff0 by Simon Marlow at 2004-03-25T16:00:37+00:00 [haddock @ 2004-03-25 16:00:36 by simonmar] Remove all that indentation in the generated HTML to keep the file sizes down. - - - - - da2bb4ca by Sven Panne at 2004-03-27T09:57:58+00:00 [haddock @ 2004-03-27 09:57:57 by panne] Added the new-born haddock.js to the build process and the documentation. - - - - - b99e6f8c by Sven Panne at 2004-03-27T10:32:20+00:00 [haddock @ 2004-03-27 10:32:20 by panne] "type" is a required attribute of the "script" element - - - - - 562b185a by Sven Panne at 2004-03-27T12:52:34+00:00 [haddock @ 2004-03-27 12:52:34 by panne] Add a doctype for the contents page, too. - - - - - f6a99c2d by Simon Marlow at 2004-04-14T10:03:25+00:00 [haddock @ 2004-04-14 10:03:25 by simonmar] fix for single-line comment syntax - - - - - de366303 by Simon Marlow at 2004-04-20T13:08:04+00:00 [haddock @ 2004-04-20 13:08:04 by simonmar] Allow a 'type' declaration to include documentation comments. These will be ignored by Haddock, but at least one user (Johannes Waldmann) finds this feature useful, and it's easy to add. - - - - - fd78f51e by Simon Marlow at 2004-05-07T15:14:56+00:00 [haddock @ 2004-05-07 15:14:56 by simonmar] - update copyright - add version to abstract - - - - - 59f53e32 by Sven Panne at 2004-05-09T14:39:53+00:00 [haddock @ 2004-05-09 14:39:53 by panne] Fix the fix for single-line comment syntax, ------------------------------------------- is now a valid comment line again. - - - - - 8b18f2fe by Simon Marlow at 2004-05-10T10:11:51+00:00 [haddock @ 2004-05-10 10:11:51 by simonmar] Update - - - - - 225a491d by Ross Paterson at 2004-05-19T13:10:23+00:00 [haddock @ 2004-05-19 13:10:23 by ross] Make the handling of "deriving" slightly smarter, by ignoring data constructor arguments that are identical to the lhs. Now handles things like data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ... - - - - - 37588686 by Mike Thomas at 2004-05-21T06:38:14+00:00 [haddock @ 2004-05-21 06:38:14 by mthomas] Windows exe extensions (bin remains for Unix). - - - - - cf2b9152 by Simon Marlow at 2004-05-25T09:34:54+00:00 [haddock @ 2004-05-25 09:34:54 by simonmar] Add some TODO items - - - - - 4d29cdfc by Simon Marlow at 2004-05-25T10:41:46+00:00 [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. - - - - - 2e0771e0 by Mike Thomas at 2004-05-28T20:17:55+00:00 [haddock @ 2004-05-28 20:17:55 by mthomas] Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg. - - - - - 8d10bde1 by Sven Panne at 2004-06-05T16:53:34+00:00 [haddock @ 2004-06-05 16:53:34 by panne] Misc. rpm spec file cleanup, including: * make BuildRoot handling more consistent * added default file attributes * consistent defines and tags - - - - - 59974349 by Sven Panne at 2004-06-05T18:01:00+00:00 [haddock @ 2004-06-05 18:01:00 by panne] More rpm spec file cleanup, including: * added some BuildRequires * changed packager to me, so people can complain at the right place :-] * consistently refer to haskell.org instead of www.haskell.org - - - - - b94d4903 by Simon Marlow at 2004-07-01T11:08:58+00:00 [haddock @ 2004-07-01 11:08:57 by simonmar] Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead. - - - - - d5278f67 by Sven Panne at 2004-07-04T15:15:55+00:00 [haddock @ 2004-07-04 15:15:55 by panne] Install pictures for +/- pictures, too (JPEG is a strange format for graphics like this, I would have expected GIF or PNG here.) Things look fine with Konqueror and Netscape on Linux now, the only downside is that the cursor doesn't change when positioned above the "button". - - - - - 46dec6c5 by Sven Panne at 2004-07-13T17:59:28+00:00 [haddock @ 2004-07-13 17:59:28 by panne] A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there. - - - - - 1d7bc432 by Simon Marlow at 2004-07-22T08:54:06+00:00 [haddock @ 2004-07-22 08:54:06 by simonmar] Add single quote to $ident, so you can say eg. 'foldl'' to refer to foldl' (the longest match rule is our friend). Bug reported by Adrian Hey <ahey at iee.org> - - - - - f183618b by Krasimir Angelov at 2004-07-27T22:59:35+00:00 [haddock @ 2004-07-27 22:58:23 by krasimir] Add basic support for Microsoft HTML Help 2.0 - - - - - d515d0c2 by Krasimir Angelov at 2004-07-27T23:02:36+00:00 [haddock @ 2004-07-27 23:02:36 by krasimir] escape names in the index - - - - - a5f1be23 by Krasimir Angelov at 2004-07-27T23:05:21+00:00 [haddock @ 2004-07-27 23:05:21 by krasimir] Add jsFile, plusFile and minusFile to the file list - - - - - c4fb4881 by Krasimir Angelov at 2004-07-28T22:12:10+00:00 [haddock @ 2004-07-28 22:12:09 by krasimir] bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs - - - - - 64d30b1d by Krasimir Angelov at 2004-07-30T22:15:47+00:00 [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug - - - - - 133c8c5c by Krasimir Angelov at 2004-07-31T12:04:38+00:00 [haddock @ 2004-07-31 12:04:37 by krasimir] make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful. - - - - - 79040963 by Krasimir Angelov at 2004-07-31T13:10:20+00:00 [haddock @ 2004-07-31 13:10:20 by krasimir] Make DHtmlTree compatible with Mozila browser - - - - - 1a55dc90 by Krasimir Angelov at 2004-07-31T14:52:55+00:00 [haddock @ 2004-07-31 14:52:55 by krasimir] fix - - - - - 85ce0237 by Krasimir Angelov at 2004-07-31T14:53:28+00:00 [haddock @ 2004-07-31 14:53:28 by krasimir] HtmlHelp 1.x - - - - - 3c0c53ba by Krasimir Angelov at 2004-07-31T20:35:21+00:00 [haddock @ 2004-07-31 20:35:21 by krasimir] Added support for DevHelp - - - - - d42b5af1 by Krasimir Angelov at 2004-07-31T21:17:51+00:00 [haddock @ 2004-07-31 21:17:51 by krasimir] Document new features in HtmlHelp - - - - - 790fe21e by Krasimir Angelov at 2004-08-01T15:14:02+00:00 [haddock @ 2004-08-01 15:14:02 by krasimir] add missing imports - - - - - fd7cc6bc by Krasimir Angelov at 2004-08-01T19:52:08+00:00 [haddock @ 2004-08-01 19:52:06 by krasimir] fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format. - - - - - 94ad7ac8 by Krasimir Angelov at 2004-08-01T19:53:50+00:00 [haddock @ 2004-08-01 19:53:50 by krasimir] I forgot to add the new +/- images - - - - - f0c65388 by Krasimir Angelov at 2004-08-02T16:25:53+00:00 [haddock @ 2004-08-02 16:25:53 by krasimir] Add root node to the table of contents. All modules in tree are not children of the root - - - - - f50bd85d by Sven Panne at 2004-08-02T18:17:46+00:00 [haddock @ 2004-08-02 18:17:46 by panne] Mainly DocBook fixes - - - - - 09527ce3 by Sven Panne at 2004-08-02T20:02:29+00:00 [haddock @ 2004-08-02 20:02:29 by panne] Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays... - - - - - c8fbacfa by Sven Panne at 2004-08-02T20:31:13+00:00 [haddock @ 2004-08-02 20:31:13 by panne] Warning police - - - - - 37830bff by Sven Panne at 2004-08-02T20:32:29+00:00 [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code - - - - - 13847171 by Sven Panne at 2004-08-02T21:12:27+00:00 [haddock @ 2004-08-02 21:12:25 by panne] Use pathJoin instead of low-level list-based manipulation for FilePaths - - - - - c711d61e by Sven Panne at 2004-08-02T21:16:02+00:00 [haddock @ 2004-08-02 21:16:02 by panne] Removed WinDoze CRs - - - - - b1f7dc88 by Sven Panne at 2004-08-03T19:35:59+00:00 [haddock @ 2004-08-03 19:35:59 by panne] Fixed spelling of "http-equiv" attribute - - - - - dd5f394e by Sven Panne at 2004-08-03T19:44:03+00:00 [haddock @ 2004-08-03 19:44:03 by panne] Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before) - - - - - 919c47c6 by Sigbjorn Finne at 2004-08-03T19:45:11+00:00 [haddock @ 2004-08-03 19:45:11 by sof] make it compile with <= ghc-6.1 - - - - - 4d6f01d8 by Sigbjorn Finne at 2004-08-03T19:45:30+00:00 [haddock @ 2004-08-03 19:45:30 by sof] ffi wibble - - - - - 4770643a by Sven Panne at 2004-08-03T20:47:46+00:00 [haddock @ 2004-08-03 20:47:46 by panne] Fixed CSS for button style. Note that only "0" is a valid measure without a unit! - - - - - 14aaf2e5 by Sven Panne at 2004-08-03T21:07:59+00:00 [haddock @ 2004-08-03 21:07:58 by panne] Improved spacing of dynamic module tree - - - - - 97c3579a by Simon Marlow at 2004-08-09T11:03:04+00:00 [haddock @ 2004-08-09 11:03:04 by simonmar] Add FormatVersion Patch submitted by: George Russell <ger at informatik.uni-bremen.de> - - - - - af7f8c03 by Simon Marlow at 2004-08-09T11:55:07+00:00 [haddock @ 2004-08-09 11:55:05 by simonmar] Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger at informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header. - - - - - 7b865ad3 by Simon Marlow at 2004-08-10T14:09:57+00:00 [haddock @ 2004-08-10 14:09:57 by simonmar] Fixes for DevHelp/HtmlHelp following introduction of short module description. - - - - - 814766cd by Simon Marlow at 2004-08-10T14:33:46+00:00 [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. - - - - - 39cf9ede by Simon Marlow at 2004-08-12T12:08:23+00:00 [haddock @ 2004-08-12 12:08:23 by simonmar] Avoid using string-gap tricks. - - - - - b6d78551 by Simon Marlow at 2004-08-13T10:53:21+00:00 [haddock @ 2004-08-13 10:53:21 by simonmar] Update - - - - - eaae7417 by Simon Marlow at 2004-08-13T10:53:50+00:00 [haddock @ 2004-08-13 10:53:50 by simonmar] Test for primes in quoted links - - - - - 68c34f06 by Sven Panne at 2004-08-16T19:59:38+00:00 [haddock @ 2004-08-16 19:59:36 by panne] XMLification - - - - - 7f45a6f9 by Sven Panne at 2004-08-18T16:42:54+00:00 [haddock @ 2004-08-18 16:42:54 by panne] Re-added indices + minor fixes - - - - - 8a5dd97c by Sigbjorn Finne at 2004-08-25T17:15:42+00:00 [haddock @ 2004-08-25 17:15:42 by sof] backquote HADDOCK_VERSION defn for <= ghc-6.0.x; believe this is only needed under mingw - - - - - 4b1b42ea by Sven Panne at 2004-08-26T20:08:50+00:00 [haddock @ 2004-08-26 20:08:49 by panne] SGML is dead, long live DocBook XML! Note: The BuildRequires tags in the spec files are still incomplete and the documentation about the DocBook tools needs to be updated, too. Stay tuned... - - - - - 8d52cedb by Sven Panne at 2004-08-26T21:03:19+00:00 [haddock @ 2004-08-26 21:03:19 by panne] Updated BuildRequires tags. Alas, there seems to be no real standard here, so your mileage may vary... At least the current specs should work on SuSE Linux. - - - - - e6982912 by Sigbjorn Finne at 2004-08-30T15:44:59+00:00 [haddock @ 2004-08-30 15:44:59 by sof] escape HADDOCK_VERSION double quotes on all platforms when compiling with <=6.0.x - - - - - b3fbc867 by Simon Marlow at 2004-08-31T13:09:42+00:00 [haddock @ 2004-08-31 13:09:42 by simonmar] Avoid GHC/shell versionitis and create Version.hs - - - - - c359e16a by Sven Panne at 2004-09-05T19:12:33+00:00 [haddock @ 2004-09-05 19:12:32 by panne] * HTML documentation for "foo.xml" goes into directory "foo" again, not "foo-html". This is nicer and consistent with the behaviour for building the docs from SGML. * Disabled building PostScript documentation in the spec files for now, there are some strange issues with the FO->PS conversion for some files which have to be clarified first. - - - - - c68b1eba by Sven Panne at 2004-09-24T07:04:38+00:00 [haddock @ 2004-09-24 07:04:38 by panne] Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable. - - - - - dfb32615 by Simon Marlow at 2004-09-30T08:21:29+00:00 [haddock @ 2004-09-30 08:21:29 by simonmar] Add a feature request - - - - - 45ff783c by Sven Panne at 2004-10-23T19:54:00+00:00 [haddock @ 2004-10-23 19:54:00 by panne] Improved the Cygwin/MinGW chaos a little bit. There is still confusion about host platform vs. target platform... - - - - - 5f644714 by Krasimir Angelov at 2004-10-28T16:01:51+00:00 [haddock @ 2004-10-28 16:01:51 by krasimir] update for ghc-6.3+ - - - - - 92d9753e by Sven Panne at 2004-11-01T16:39:01+00:00 [haddock @ 2004-11-01 16:39:01 by panne] Revert previous commit: It's Network.URI which should be changed, not Haddock. - - - - - 05f70f6e by Simon Marlow at 2005-01-04T16:15:51+00:00 [haddock @ 2005-01-04 16:15:51 by simonmar] parser fix: allow qualified specialids. - - - - - 47870837 by Simon Marlow at 2005-01-04T16:16:54+00:00 [haddock @ 2005-01-04 16:16:54 by simonmar] Add a test - - - - - ff11fc2c by Ross Paterson at 2005-01-10T19:18:22+00:00 [haddock @ 2005-01-10 19:18:22 by ross] Render non-ASCII characters using numeric character references, to simplify charset issues. There's a META tag saying the charset is UTF-8, but GHC outputs characters as raw bytes. Ideally we need an encoding on the input side too, primarily in comments, because source files containing non-ASCII characters aren't portable between locales. - - - - - eba2fc4e by Simon Marlow at 2005-01-11T10:44:37+00:00 [haddock @ 2005-01-11 10:44:37 by simonmar] Remove string gap - - - - - b899a381 by Ross Paterson at 2005-01-13T11:41:33+00:00 [haddock @ 2005-01-13 11:41:33 by ross] recognize SGML-style numeric character references &#ddd; or &#xhhhh; and translate them into Chars. - - - - - 106e3cf0 by Ross Paterson at 2005-01-13T14:43:41+00:00 [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) - - - - - e8f54f25 by Ross Paterson at 2005-01-13T14:44:24+00:00 [haddock @ 2005-01-13 14:44:24 by ross] Describe numeric character references. - - - - - 914ccdce by Sven Panne at 2005-01-15T18:44:48+00:00 [haddock @ 2005-01-15 18:44:45 by panne] Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later. - - - - - 6ab20e84 by Sven Panne at 2005-01-16T12:18:26+00:00 [haddock @ 2005-01-16 12:18:26 by panne] Trim imports - - - - - efb81da9 by Sven Panne at 2005-01-16T12:58:08+00:00 [haddock @ 2005-01-16 12:58:03 by panne] Correctly handle the new order of arguments for the combining function given to fromListWith. - - - - - e27b5834 by Sven Panne at 2005-01-16T14:14:41+00:00 [haddock @ 2005-01-16 14:14:39 by panne] Data.Map.unions is left-biased. - - - - - dae3cc3e by Sven Panne at 2005-01-16T14:22:44+00:00 [haddock @ 2005-01-16 14:22:44 by panne] Added the last missing "flip" to get identical HTML output as previous versions. - - - - - 951d8408 by Sven Panne at 2005-01-16T14:37:10+00:00 [haddock @ 2005-01-16 14:37:10 by panne] Refactored Text.PrettyPrint legacy hell into a separate module. - - - - - f1c4b892 by Sven Panne at 2005-01-16T15:41:25+00:00 [haddock @ 2005-01-16 15:41:21 by panne] Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway. - - - - - 60824c6e by Simon Marlow at 2005-01-18T10:02:48+00:00 [haddock @ 2005-01-18 10:02:48 by simonmar] Add a TODO - - - - - a8c82f23 by Krasimir Angelov at 2005-01-28T23:19:39+00:00 [haddock @ 2005-01-28 23:19:39 by krasimir] import Foreign/Foreign.C are required for Windows - - - - - d8450a23 by Simon Marlow at 2005-02-02T16:23:04+00:00 [haddock @ 2005-02-02 16:23:00 by simonmar] Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning. - - - - - 1cce71d0 by Simon Marlow at 2005-02-03T13:42:19+00:00 [haddock @ 2005-02-03 13:42:19 by simonmar] - add --ignore-all-exports flag, which behaves as if every module has the ignore-exports attribute (requested by Chris Ryder). - add --hide option to hide a module on the command line. - add --use-package option to get Haddock info for a package from ghc-pkg (largely untested). - remove reexports from the .haddock file, they aren't used any more. - - - - - 767123ef by Ross Paterson at 2005-02-03T16:17:37+00:00 [haddock @ 2005-02-03 16:17:37 by ross] fix typo for < 6.3 - - - - - 0c680c04 by Simon Marlow at 2005-02-04T12:03:31+00:00 [haddock @ 2005-02-04 12:03:31 by simonmar] Fix bug in renameExportItems that meant links in instances weren't being renamed properly. - - - - - ff7abe5f by Simon Marlow at 2005-02-04T12:15:53+00:00 [haddock @ 2005-02-04 12:15:52 by simonmar] Add attribute #not-home, to indicate that the current module should not be considered to be a home module for the each entity it exports, unless there is no other module that exports the entity. - - - - - fc2cfd27 by Simon Marlow at 2005-02-04T12:40:02+00:00 [haddock @ 2005-02-04 12:40:02 by simonmar] Update the documentation w.r.t. home modules and the not-home attribute. - - - - - 26b8ddf7 by Ross Paterson at 2005-02-04T13:36:06+00:00 [haddock @ 2005-02-04 13:36:05 by ross] sort lists of instances by - arity of the type constructors (so higher-kinded instances come first) - name of the class - argument types - - - - - 26bfb19c by Simon Marlow at 2005-02-23T15:57:12+00:00 [haddock @ 2005-02-23 15:57:12 by simonmar] Fix documentation regarding the module attributes. - - - - - 9c3afd02 by Simon Marlow at 2005-02-28T16:18:17+00:00 [haddock @ 2005-02-28 16:18:17 by simonmar] version 0.7 - - - - - a95fd63f by Simon Marlow at 2005-02-28T16:22:08+00:00 [haddock @ 2005-02-28 16:22:08 by simonmar] Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results. - - - - - 905d42f7 by Simon Marlow at 2005-03-01T17:16:42+00:00 [haddock @ 2005-03-01 17:16:40 by simonmar] Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case). - - - - - a0e1d178 by Wolfgang Thaller at 2005-03-09T08:28:39+00:00 [haddock @ 2005-03-09 08:28:39 by wolfgang] Hack haddock's lexer to accept the output from Apple's broken version of cpp (Apple's cpp leaves #pragma set_debug_pwd directives in it's output). - - - - - 9e1eb784 by Simon Marlow at 2005-04-22T14:27:15+00:00 [haddock @ 2005-04-22 14:27:15 by simonmar] Add a TODO item - - - - - 23281f78 by Ross Paterson at 2005-05-18T12:41:59+00:00 [haddock @ 2005-05-18 12:41:59 by ross] fix 3 bugs in --use-package, and document it. - - - - - 00074a68 by Sven Panne at 2005-05-21T12:35:29+00:00 [haddock @ 2005-05-21 12:35:29 by panne] Warning/versionitis police - - - - - 341fa822 by Simon Marlow at 2005-06-15T15:43:21+00:00 [haddock @ 2005-06-15 15:43:21 by simonmar] Allow "licence" as an alternate spelling of "license" - - - - - 3b953f8b by Simon Marlow at 2005-06-16T08:14:12+00:00 [haddock @ 2005-06-16 08:14:12 by simonmar] wibble - - - - - abfd9826 by Simon Marlow at 2005-06-27T14:46:40+00:00 [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The old way confused Apache because the extensions are sometimes interpreted as having special meanings. - - - - - a01eea00 by Simon Marlow at 2005-08-04T13:59:40+00:00 [haddock @ 2005-08-04 13:59:40 by simonmar] 0.7 changes - - - - - 170ef87e by Simon Marlow at 2005-08-04T15:08:03+00:00 [haddock @ 2005-08-04 15:08:03 by simonmar] spec file from Jens Peterson - - - - - 7621fde4 by Simon Marlow at 2005-08-04T15:59:30+00:00 [haddock @ 2005-08-04 15:59:30 by simonmar] replace mingw tests with $(Windows) - - - - - a20739bb by Sven Panne at 2005-08-05T07:01:12+00:00 [haddock @ 2005-08-05 07:01:12 by panne] Reverted to previous version (but with bumped version number), the last commit broke RPM building on SuSE systems due to differently named dependencies. As a clarification: All .spec files in the repository have to work at least on SuSE, because that's the system I'm using. And as "Mr. Building Police", I reserve me the right to keep them that way... >:-) It might very well be the case that we need different .spec files for different platforms, so packagers which are unhappy with the current .spec files should contact me, stating the actual problems. - - - - - 4afb15cf by Simon Marlow at 2005-10-05T10:51:45+00:00 [haddock @ 2005-10-05 10:51:45 by simonmar] Add a bug - - - - - 60f69f82 by Simon Marlow at 2005-10-05T12:52:03+00:00 [haddock @ 2005-10-05 12:52:03 by simonmar] Document new behaviour of -s option - - - - - f7e520ca by Simon Marlow at 2005-10-10T15:02:55+00:00 [haddock @ 2005-10-10 15:02:55 by simonmar] extractRecSel: ignore non-record constructors (fixes a crash when using datatypes with a mixture of record and non-record style constructors). - - - - - b2edbedb by Simon Marlow at 2005-10-14T09:44:21+00:00 Start CHANGES for 0.8 - - - - - 21c7ac8d by Simon Marlow at 2005-10-14T23:11:19+00:00 First cut of Cabal build system - - - - - 766cecdd by Simon Marlow at 2005-10-29T08:14:43+00:00 Add configure script and Makefile for the docs Add a separate configure script and build system for building the documentation. The configure and Makefile code is stolen from fptools. This is left as a separate build system so that the main Cabal setup doesn't require a Unix build environment or DocBook XML tools. - - - - - aa36c783 by Duncan Coutts at 2006-01-17T19:29:55+00:00 Add a --wiki=URL flag to add a per-module link to a correspondng wiki page. So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option. - - - - - e06e2da2 by Simon Marlow at 2006-01-18T09:28:15+00:00 TODO: documnet --wiki - - - - - 17adfda9 by Duncan Coutts at 2006-01-19T20:17:59+00:00 Add an optional wiki link for each top level exported name. In each module, for each "top level" exported entity we add a hyper link to a corresponding wiki page. The link url gets the name of the exported entity as a '#'-style anchor, so if there is an anchor in the page with that name then the users browser should jump directly to it. By "top level" we mean functions, classes, class members and data types (data, type, newtype), but not data constructors, class instances or data type class membership. The link is added at the right of the page and in a small font. Hopefully this is the right balance of visibility/distraction. We also include a link to the wiki base url in the contents and index pages. - - - - - f52324bb by Duncan Coutts at 2006-01-19T20:28:27+00:00 Rewrite pathJoin to only add a path separator when necessary. When the path ends in a file seperator there is no need to add another. Now using "--wiki=http://blah.com/foo/" should do the right thing. (Code snippet adapted from Isaac's FilePath package.) - - - - - 43bb89fa by Duncan Coutts at 2006-01-21T17:15:27+00:00 Teach haddock about line pragmas and add accurate source code links Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's source location tracking to include the file name as well as line/column. This way each AST item that is tagged with a SrcLoc gets the original file name too. Use this original file name to add source links to each exported item, in the same visual style as the wiki links. Note that the per-export source links are to the defining module rather than whichever module haddock pretends it is exported from. This is what we want for source code links. The source code link URL can also contain the name of the export so one could implement jumping to the actual location of the function in the file if it were linked to an html version of the source rather than just plain text. The name can be selected with the %N wild card. So for linking to the raw source code one might use: --source=http://darcs/haskell.org/foo/%F Or for linking to html syntax highlighted code: --source=http://darcs/haskell.org/foo/%M.html#%N - - - - - edd9f229 by Duncan Coutts at 2006-01-22T00:02:00+00:00 Extend URL variable expansion syntax and add source links to the contents page Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module. - - - - - eb3c6ada by Duncan Coutts at 2006-01-23T13:42:34+00:00 Remove the complex substitutions and add more command line flags instead. Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now use three seperate command line flags for the top level, per-module and per-entity source and wiki links. They are: --source-base, --source-module, --source-entity --comments-base, --comments-module, --comments-entity We leave -s, --source as an alias for --source-module which is how that option behaved previously. The long forms of the substitutions are still available, ${FILE} ${MODULE} etc and the only non-trivial substitution is ${MODULE/./c} to replace the '.' characters in the module name with any other character c. eg ${MODULE/./-} Seperating the source and wiki url flags has the added bonus that they can be turned on or off individually. So users can have per-module links for example without having to also have per-entity links.` - - - - - a2f0f2af by Duncan Coutts at 2006-01-23T13:54:52+00:00 Make the --help output fit in 80 columns. This is a purely cosmetic patch, feel free to ignore it. The only trickery going on is that we don't display the deprecated -s, --source flags in the help message, but we do still accept them. - - - - - 2d3a4b0c by Duncan Coutts at 2006-01-23T14:12:16+00:00 Add documentation for the new --source-* and --comments-* command line options - - - - - 1a82a297 by Simon Marlow at 2006-01-23T17:03:27+00:00 fix markup - - - - - 100d464a by Duncan Coutts at 2006-01-23T18:31:13+00:00 remove a couple TODO items that have been done The --wiki, or rather the --comment-* options are now documented. There is probably no need to have haddock invoke unlit or cpp itself since it can now pick up the line pragmas to get the source locations right. Tools like Cabal will arrange for preprocessors to be run so there is less of a need for tools like haddock to do it themselves. - - - - - 3162fa91 by Simon Marlow at 2006-01-24T14:21:56+00:00 add a test I had lying around - - - - - 98947063 by Simon Marlow at 2006-01-31T13:52:54+00:00 add scabal-version field - - - - - c41876e6 by Neil Mitchell at 2006-02-26T17:48:21+00:00 Add Hoogle output option - - - - - f86fb9c0 by Simon Marlow at 2006-03-08T09:15:20+00:00 add haskell.vim Contributed by Brad Bowman <bsb at bereft.net>, thanks! - - - - - 35d3c511 by benjamin.franksen at 2006-03-03T22:39:54+00:00 fixed libdir (/html was missing) - - - - - 4d08fd7d by Simon Marlow at 2006-03-10T11:13:31+00:00 add PatternGuards extension - - - - - 3f095e70 by Simon Marlow at 2006-03-13T11:40:42+00:00 bug fixes from Brad Bowman - - - - - 8610849d by Sven Panne at 2006-03-19T17:02:56+00:00 Fixed Cabal/RPM build - - - - - 34a994d6 by sven.panne at 2006-04-20T12:39:23+00:00 Avoid pattern guards Due to the use of pattern guards in Haddock, GHC was called with -fglasgow-exts. This in turn enables bang patterns, too, which broke the Haddock build. Removing some unnecessary pattern guards seemed to be the better way of fixing this instead of using a pragma to disable pattern guards. - - - - - bb523f51 by Ross Paterson at 2006-04-24T09:03:25+00:00 extend 'deriving' heuristic a little If an argument of a data constructor has a type variable head, it is irreducible and the same type class can be copied into the constraint. (Formerly we just did this for type variable arguments.) - - - - - dab9fe7a by Simon Marlow at 2006-04-26T10:02:31+00:00 record an idea - - - - - 748b7078 by Simon Marlow at 2006-05-08T08:28:53+00:00 add section about deriving - - - - - 11252ea1 by Simon Marlow at 2006-05-24T15:43:10+00:00 replace a fatal error in lexChar with a parseError - - - - - 382c9411 by Simon Marlow at 2006-05-24T15:45:47+00:00 add a bug - - - - - b79272f5 by Simon Marlow at 2006-05-24T15:46:29+00:00 add a bug report - - - - - 912edf65 by David Waern at 2006-07-10T19:09:23+00:00 Initial modifications -- doesn't compile - - - - - a3c7ba99 by David Waern at 2006-07-11T00:54:19+00:00 More porting work -- doesn't compile - - - - - 0a173d19 by David Waern at 2006-07-11T11:30:03+00:00 Make the repos temporarily compile and illustrate a problem - - - - - bad316de by David Waern at 2006-07-11T15:43:47+00:00 Progress on the porting process - - - - - bbf12d02 by David Waern at 2006-07-11T23:07:44+00:00 More progress on the porting -- first pass starting to shape up - - - - - de580ba2 by David Waern at 2006-07-20T17:48:30+00:00 More progress -- still on phase1 - - - - - 75a917a2 by David Waern at 2006-07-23T18:22:43+00:00 More work on pass1 -- mostly done - - - - - 6697b3f7 by David Waern at 2006-07-23T22:17:40+00:00 More work, started working on the renaming phase -- this code will need a cleanup soon :) - - - - - 82a5bcbb by David Waern at 2006-07-29T16:16:43+00:00 Add instances, build renaming environment, start on the renamer - - - - - c3f8f4f1 by David Waern at 2006-07-29T21:37:48+00:00 Complete the renamer - - - - - 7e00d464 by David Waern at 2006-07-30T21:01:57+00:00 Start porting the Html renderer - - - - - f04ce121 by David Waern at 2006-08-09T20:04:56+00:00 More Html rendering progress - - - - - 20c21b53 by David Waern at 2006-08-10T17:37:47+00:00 More progress - - - - - d7097e0d by David Waern at 2006-08-11T20:31:51+00:00 Cleanup - - - - - a7351e86 by David Waern at 2006-08-12T11:44:47+00:00 Render H98 Data declarations - - - - - 3fb2208e by David Waern at 2006-08-12T17:15:34+00:00 Perfect rendering of Test.hs - - - - - 454fd062 by David Waern at 2006-08-13T21:57:08+00:00 Misc fixes and interface load/save - - - - - 7ef7e7be by David Waern at 2006-08-14T00:56:07+00:00 Some refactoring - - - - - a7d3efef by David Waern at 2006-08-19T20:07:55+00:00 Adapt to latest GHC - - - - - 5fc3c0d7 by David Waern at 2006-08-20T21:28:11+00:00 Move interface read/write to its own module + some cleanup - - - - - 037e011c by David Waern at 2006-08-20T21:38:24+00:00 Small cleanup - - - - - da3a1023 by David Waern at 2006-09-03T16:05:22+00:00 Change mode to BatchCompile to avoid GHC API bug - - - - - 3cc9be3b by David Waern at 2006-09-03T16:06:59+00:00 Starting work on GADT rendering - - - - - 94506037 by David Waern at 2006-09-03T20:02:48+00:00 Compensate for change of export list order in GHC - - - - - c2cec4eb by David Waern at 2006-09-04T20:53:01+00:00 Rename a function - - - - - 9a9735ba by David Waern at 2006-09-05T15:51:21+00:00 Change version number to 2.0 - - - - - 3758a714 by David Waern at 2006-09-05T15:51:49+00:00 Align comment properly - - - - - 68478d9e by David Waern at 2006-09-15T18:03:00+00:00 Remove interface reading/writing code and use the GHC api for creating package environments instead - - - - - d2eedd95 by David Waern at 2006-09-15T18:05:29+00:00 Change the executable name to haddock-ghc-nolib - - - - - fcfbcf66 by David Waern at 2006-09-15T18:05:45+00:00 Small source code cleanup - - - - - d08eb017 by David Waern at 2006-09-15T18:06:21+00:00 Remove handling of --package flag - - - - - b8a4cf53 by David Waern at 2006-09-15T18:07:16+00:00 Remove commented-out code - - - - - bef0a684 by David Waern at 2006-09-15T18:37:57+00:00 Don't warn about missing links to () - - - - - e7d25fd7 by David Waern at 2006-09-15T19:50:49+00:00 Remove Interface and Binary2 modules - - - - - 9894f2a1 by David Waern at 2006-09-15T19:53:43+00:00 Remove debug printing from HaddockHtml - - - - - a0e7455d by David Waern at 2006-09-16T00:16:29+00:00 Comments only - - - - - d5b26fa7 by David Waern at 2006-09-16T00:16:57+00:00 Refactor PackageData creation code and start on building the doc env propery (unfinished) - - - - - 06aaa779 by David Waern at 2006-09-16T00:19:25+00:00 Better comments in Main.hs - - - - - 1a52d1b4 by David Waern at 2006-09-18T22:17:11+00:00 Comments and spacing change - - - - - e5a97767 by David Waern at 2006-09-21T17:02:45+00:00 Remove unnecessary fmapM import in Main - - - - - 9d0f9d3a by David Waern at 2006-09-22T18:07:07+00:00 Make import list in HaddockHtml prettier - - - - - 3452f662 by David Waern at 2006-09-22T18:08:47+00:00 Refactor context rendering - - - - - 12d0a6d0 by David Waern at 2006-09-22T18:09:52+00:00 Do proper HsType rendering (inser parentheses correctly) - - - - - 2c20c2f9 by David Waern at 2006-09-22T18:10:45+00:00 Fix a bug in Main.toHsType - - - - - c5396443 by David Waern at 2006-09-22T18:11:16+00:00 Skip external package modules sort for now - - - - - 3fb95547 by David Waern at 2006-09-22T20:35:40+00:00 Take away trailin "2" on all previously clashing type names - - - - - 2174755f by David Waern at 2006-09-22T20:51:43+00:00 Remove unused imports in Main - - - - - 1e9f7a39 by David Waern at 2006-09-22T20:52:11+00:00 Fix a comment in Main - - - - - 32d9e028 by David Waern at 2006-10-05T16:40:11+00:00 Merge with changes to ghc HEAD - - - - - 3058c8f5 by David Waern at 2006-10-05T16:41:02+00:00 Comment fixes - - - - - b9c217ec by David Waern at 2006-10-05T16:49:59+00:00 Filter out more builtin type constructors from warning messages - - - - - 67e7d252 by David Waern at 2006-10-05T19:38:22+00:00 Refactoring -- better structured pass1 - - - - - cd21c0c1 by David Waern at 2006-10-05T19:44:42+00:00 Remove read/dump interface flags - - - - - 313f9e69 by David Waern at 2006-10-05T19:49:26+00:00 Remove unused pretty printing - - - - - 480f09d1 by David Waern at 2006-12-28T13:22:24+00:00 Update to build with latest GHC HEAD - - - - - 63dccfcb by David Waern at 2007-01-05T01:38:45+00:00 Fixed a bug so that --ghc-flag works correctly - - - - - 3117dadc by David Waern at 2006-12-29T18:53:39+00:00 Automatically get the GHC lib dir - - - - - 9dc84a5c by David Waern at 2006-12-29T19:58:53+00:00 Comments - - - - - 0b0237cc by David Waern at 2007-01-05T16:48:30+00:00 Collect docs based on SrcLoc, syncing with removal of DeclEntity from GHC - - - - - a962c256 by David Waern at 2007-01-05T17:02:47+00:00 Add tabs in haddock.cabal - - - - - 0ca30c97 by David Waern at 2007-01-05T17:04:11+00:00 Add GHCUtils.hs - - - - - c0ab9abe by David Waern at 2007-01-10T11:43:08+00:00 Change package name to haddock-ghc, version 0.1 - - - - - 38e18b27 by David Waern at 2007-01-12T12:03:52+00:00 No binder name for foreign exports - - - - - d18587ab by David Waern at 2007-01-12T12:08:15+00:00 Temp record - - - - - ba6251a0 by David Waern at 2007-01-12T18:27:55+00:00 Remove read/dump-interface (again) - - - - - f4ba2b39 by David Waern at 2007-01-12T18:31:36+00:00 Remove DocOption, use the GHC type - - - - - 511be8bd by David Waern at 2007-01-12T18:32:41+00:00 Use exceptions instead of Either when loading package info - - - - - 0f2144d8 by David Waern at 2007-01-12T18:33:23+00:00 Small type change - - - - - 77507eb7 by David Waern at 2007-01-12T18:33:59+00:00 Remove interface file read/write - - - - - 0ea1e14f by David Waern at 2007-01-17T21:40:26+00:00 Add trace_ppr to GHCUtils - - - - - 3878b493 by David Waern at 2007-01-17T21:40:53+00:00 Sort external package modules and build a doc env - - - - - 8dc323fc by David Waern at 2007-01-17T21:42:41+00:00 Remove comment - - - - - f4c5b097 by David Waern at 2007-01-18T23:22:18+00:00 Add haddock-ghc.cabal and remove ghc option pragma in source file - - - - - da242b2c by David Waern at 2007-01-18T23:22:46+00:00 Remove some tabs - - - - - 288ed096 by David Waern at 2007-01-18T23:39:28+00:00 Moved the defaultErrorHandler to scope only over sortAndCheckModules for now - - - - - 4dd150fe by David Waern at 2007-02-03T21:23:56+00:00 Let restrictCons handle infix constructors - - - - - 97893442 by David Waern at 2007-02-04T16:26:00+00:00 Render infix data constructors - - - - - da89db72 by David Waern at 2007-02-04T16:26:33+00:00 CHange project name to Haddock-GHC - - - - - e93d48af by David Waern at 2007-02-04T16:59:08+00:00 Render infix type constructors properly - - - - - 357bc99b by David Waern at 2007-02-04T17:37:08+00:00 Insert spaces around infix function names - - - - - ab6cfc49 by David Waern at 2007-02-04T17:59:54+00:00 Do not list entities without documentation - - - - - 04249c7e by David Waern at 2007-02-04T19:16:25+00:00 Add GADT support (quite untested) - - - - - 2c223f8d by David Waern at 2007-02-04T19:25:10+00:00 Add package file write/save again! - - - - - b07ed218 by David Waern at 2007-02-04T19:33:02+00:00 Comment out minf_iface based stuff - - - - - 953d1fa7 by David Waern at 2007-02-05T00:12:23+00:00 Solve conflicts - - - - - 593247fc by David Waern at 2007-02-06T19:48:48+00:00 Remove -package flag, GHC's can be used instead - - - - - f658ded2 by David Waern at 2007-02-06T20:50:44+00:00 Start for support of ATs - - - - - 97f9e913 by David Waern at 2007-02-06T20:52:27+00:00 Wibble - - - - - 2ce8e4cf by David Waern at 2007-02-16T12:09:49+00:00 Add the DocOptions change - - - - - dee4a9b5 by David Waern at 2007-03-06T01:24:48+00:00 Wibble - - - - - 7cb99d18 by David Waern at 2007-03-06T01:24:58+00:00 Change version to 2.0 and executable name to haddock - - - - - c5aa02bc by David Waern at 2007-03-08T15:59:49+00:00 Go back to -B flag - - - - - 3a349201 by David Waern at 2007-03-09T13:31:59+00:00 Better exception handling and parsing of GHC flags - - - - - 05a69b71 by David Waern at 2007-03-09T17:45:44+00:00 Remove commented-out DocEntity printing - - - - - 755032cb by davve at dtek.chalmers.se at 2007-03-23T23:30:20+00:00 Remove a file that shouldn't be here - - - - - a7077e5f by davve at dtek.chalmers.se at 2007-03-24T03:58:48+00:00 Remove an import - - - - - 6f55aa8b by davve at dtek.chalmers.se at 2007-03-25T00:46:48+00:00 Start work on Haddock API - - - - - f0199480 by davve at dtek.chalmers.se at 2007-03-25T00:56:36+00:00 Prettify some comments - - - - - f952f9d1 by davve at dtek.chalmers.se at 2007-03-25T00:56:53+00:00 Remove ppr in HaddockTypes - - - - - bc594904 by davve at dtek.chalmers.se at 2007-03-25T00:57:53+00:00 Remove commented out doc env inference - - - - - 11ebf08d by davve at dtek.chalmers.se at 2007-03-25T01:23:25+00:00 De-flatten the namespace - - - - - f696b4bc by davve at dtek.chalmers.se at 2007-03-25T03:21:48+00:00 Add missing stuff to API - - - - - 9a2a04c3 by davve at dtek.chalmers.se at 2007-03-25T03:22:02+00:00 Wibble - - - - - 7d04a6d5 by davve at dtek.chalmers.se at 2007-03-25T03:22:08+00:00 Avoid a GHC bug with parseStaticFlags [] - - - - - 4d2820ba by davve at dtek.chalmers.se at 2007-03-26T04:57:01+00:00 Add fall-through case to mkExportItem - - - - - 6ebc8950 by Stefan O'Rear at 2007-03-26T04:14:53+00:00 Add shebang line to Setup.lhs - - - - - 80966ec5 by davve at dtek.chalmers.se at 2007-03-26T05:24:26+00:00 Fix stupid compile error - - - - - 1ea1385d by davve at dtek.chalmers.se at 2007-04-05T17:19:56+00:00 Do save/read of interface files properly - - - - - 0e4f6541 by David Waern at 2007-04-10T21:08:36+00:00 Add version to ghc dependency - - - - - b0499b63 by David Waern at 2007-04-10T21:37:08+00:00 Change package name to haddock - - - - - 9d50d27e by David Waern at 2007-04-24T00:22:14+00:00 Use filepath package instead of FilePath - - - - - 87c7fcdf by David Waern at 2007-07-10T21:03:04+00:00 Add new package dependencies - - - - - 4768709c by David Waern at 2007-07-11T20:37:11+00:00 Follow changes to record constructor representation - - - - - b9a02fee by Simon Marlow at 2007-05-30T14:00:48+00:00 update to compile with the latest GHC & Cabal - - - - - c0ebdc01 by David Waern at 2007-07-11T21:35:45+00:00 Fix conflicts - - - - - 97f7afd4 by David Waern at 2007-07-11T21:52:38+00:00 Follow changes to the GHC API - - - - - a5b7b58f by David Waern at 2007-07-12T20:36:48+00:00 Call parseStaticFlags before newSession - - - - - f7f50dbc by David Waern at 2007-08-01T21:52:58+00:00 Better indentation in haddock.cabal - - - - - d84e52ad by David Waern at 2007-08-02T00:08:18+00:00 Wibble - - - - - a23f494a by David Waern at 2007-08-02T00:08:24+00:00 Be better at trying to load all module dependencies (debugging) - - - - - ee917f13 by David Waern at 2007-08-03T18:48:08+00:00 Load all targets explicitly (checkModule doesn't chase dependencies anymore) - - - - - 5182d631 by David Waern at 2007-08-16T16:48:55+00:00 Finalize support for links to other packages - - - - - dfd1e3da by David Waern at 2007-08-16T16:51:11+00:00 Fix haddock comment errors in Haddock.Types - - - - - 50c0d83e by David Waern at 2007-08-16T16:51:37+00:00 Remove a debug import - - - - - d84b7c2b by David Waern at 2007-08-16T17:06:30+00:00 Rename PackageData to HaddockPackage - - - - - 3b52cb9f by David Waern at 2007-08-16T17:09:42+00:00 Simplify some comments - - - - - 66fa68d9 by David Waern at 2007-08-16T17:11:38+00:00 Comment the HaddockPackage definition - - - - - 8674c761 by David Waern at 2007-08-16T17:25:54+00:00 Improve code layout in Main - - - - - 571a3a0b by David Waern at 2007-08-16T17:32:13+00:00 Remove explict module imports in Main - - - - - d31b3cb0 by David Waern at 2007-08-16T17:36:23+00:00 Correct comments - - - - - 7f8a9f2b by David Waern at 2007-08-16T17:39:50+00:00 Fix layout problems in Haddock.Types - - - - - 9f421d7f by David Waern at 2007-08-17T11:16:48+00:00 Move options out of Main into Haddock.Options - - - - - 80042b63 by David Waern at 2007-08-17T11:26:59+00:00 Small comment/layout fixes - - - - - b141b982 by David Waern at 2007-08-17T11:28:28+00:00 Change project name from Haddock-GHC to Haddock - - - - - dbeb4a81 by David Waern at 2007-08-17T11:41:05+00:00 Add top module comment to all files - - - - - ce99cc9e by David Waern at 2007-08-17T14:53:04+00:00 Factor out typechecking phase into Haddock.Typecheck - - - - - 6bf75d9e by David Waern at 2007-08-17T16:55:35+00:00 Factor out package code to Haddock.Packages - - - - - b396db37 by David Waern at 2007-08-29T22:40:23+00:00 Major refactoring - - - - - 3d4f95ee by David Waern at 2007-08-29T23:26:24+00:00 Rename HaddockModule to Interface and a few more refactorings - - - - - c55326db by David Waern at 2007-08-29T23:48:03+00:00 Some comment cleanup - - - - - 9a84fc46 by David Waern at 2007-08-29T23:49:29+00:00 Add some modules that I forgot to add earlier - - - - - 4536dce2 by David Waern at 2007-08-29T23:55:24+00:00 Wibble - - - - - 9b7f0206 by David Waern at 2007-08-30T16:03:29+00:00 Wibble - - - - - c52c050a by David Waern at 2007-08-30T16:30:37+00:00 Rename HaddockModule to Interface - - - - - eae2995f by David Waern at 2007-08-30T16:42:59+00:00 Simplify createInterfaces - - - - - 53f99caa by David Waern at 2007-09-29T00:04:31+00:00 Add build-type: Simple to the cabal file - - - - - 0d3103a8 by David Waern at 2007-09-29T00:04:58+00:00 Add containers and array dependency - - - - - 6acf5f30 by David Waern at 2007-09-29T00:13:36+00:00 Prettify the cabal file - - - - - 87c1e378 by David Waern at 2007-09-29T13:16:39+00:00 FIX: consym data headers with more than two variables - - - - - b67fc16a by David Waern at 2007-09-29T14:01:32+00:00 FIX: prefix types used as operators should be quoted - - - - - a8f925bc by David Waern at 2007-09-29T14:02:26+00:00 Use isSymOcc from OccName instead of isConSym - - - - - fc330701 by David Waern at 2007-09-29T14:15:37+00:00 Use isLexConSym/isLexVarSym from OccName - - - - - e4f3dbad by David Waern at 2007-09-29T15:01:08+00:00 FIX: do not quote varsym type operators - - - - - 402207d2 by David Waern at 2007-09-29T15:01:50+00:00 Wibble - - - - - f9d89ef0 by David Waern at 2007-09-29T15:17:40+00:00 Take care when pp tyvars - add parens on syms - - - - - 849e2a77 by David Waern at 2007-10-01T21:56:39+00:00 Go back to using a ModuleMap instead of LookupMod - fixes a bug - - - - - 549dbac6 by David Waern at 2007-10-02T01:05:19+00:00 Improve parsing of doc options - - - - - a36021b8 by David Waern at 2007-10-02T23:05:00+00:00 FIX: double arrows in constructor contexts - - - - - d03bf347 by David Waern at 2007-10-09T16:14:05+00:00 Add a simple test suite - - - - - c252c140 by David Waern at 2007-10-17T16:02:28+00:00 Add --optghc=.. style flag passing to GHC - - - - - cce6c1b3 by David Waern at 2007-10-18T22:03:20+00:00 Add support for --read-interface again - - - - - 33d059c0 by David Waern at 2007-10-18T22:30:18+00:00 Refactoring -- get rid of Haddock.Packages - - - - - f9ed0a4c by David Waern at 2007-10-18T22:34:36+00:00 Name changes - - - - - 8a1c816f by David Waern at 2007-10-20T14:24:23+00:00 Add --ghc-version option - - - - - 4925aaa1 by David Waern at 2007-10-21T14:34:26+00:00 Add some Outputable utils - - - - - 69e7e47f by David Waern at 2007-10-21T14:35:49+00:00 FIX: Ord for OrdName was not comparing modules - - - - - 5a4ae535 by David Waern at 2007-10-21T21:18:48+00:00 Wibble - - - - - 03d48e20 by David Waern at 2007-10-24T15:52:56+00:00 Remove Main from "other modules" - - - - - c66f6d82 by David Waern at 2007-10-24T16:37:18+00:00 Make it possible to run haddock on itself - - - - - 21d156d8 by David Waern at 2007-10-25T14:02:14+00:00 Don't set boot modules as targets - - - - - f8bcf91c by David Waern at 2007-10-31T22:11:17+00:00 Add optimisation flags - - - - - 7ac758f2 by David Waern at 2007-11-04T09:48:28+00:00 Go back to loading only targets (seems to work now) - - - - - 4862aae1 by David Waern at 2007-11-05T22:24:57+00:00 Do full compilation of modules -- temporary fix for GHC API problem - - - - - 697e1517 by David Waern at 2007-11-05T22:25:50+00:00 Don't warn about not being able to link to wired/system/builtin-names - - - - - 892186da by David Waern at 2007-11-06T00:49:21+00:00 Filter out instances with TyCons that are not exported - - - - - 9548314c by David Waern at 2007-11-06T09:37:14+00:00 Wibble - - - - - 5cafd627 by David Waern at 2007-11-08T01:43:07+00:00 Filter out all non-vanilla type sigs - - - - - 04621830 by David Waern at 2007-11-08T01:45:13+00:00 Synch loading of names from .haddock files with GHC's name cache - - - - - 88d37f77 by David Waern at 2007-11-08T01:46:21+00:00 Remove commented-out code - - - - - 6409c911 by David Waern at 2007-11-08T01:56:00+00:00 Small bugfix and cleanup in getDeclFromTyCls - - - - - af59d9c2 by David Waern at 2007-11-08T02:08:44+00:00 Remove OrdName stuff - - - - - 3a615e2e by David Waern at 2007-11-08T02:13:41+00:00 Update runtests.hs following changes to haddock - - - - - 01f3314e by David Waern at 2007-11-08T02:33:01+00:00 Complain if we can't link to wired-in names - - - - - fcafb5d1 by David Waern at 2007-11-09T02:40:16+00:00 Don't exit when there are no file arguments - - - - - 194bc332 by David Waern at 2007-11-09T02:55:37+00:00 Wibble - - - - - dbe4cb55 by David Waern at 2007-11-09T02:56:14+00:00 Wibble - - - - - 82869fda by David Waern at 2007-11-10T17:01:43+00:00 Introduce InstalledInterface structure and add more stuff to the .haddock files We introduce InstalledInterface capturing the part of Interface that is stored in the interface files. We change the ppHtmlContents and ppHtmllIndex to take this structure instead of a partial Interface. We add stuff like the doc map and exported names to the .haddock file (via InstalledInterface). - - - - - d6bb57bf by David Waern at 2007-11-10T17:19:48+00:00 FIX: contents and index should include external package modules when --gen-contents/--gen-index - - - - - e8814716 by David Waern at 2007-11-11T00:29:27+00:00 Remove lDocLinkName and its use in Html backend - - - - - 6f9bd702 by David Waern at 2007-11-11T00:50:57+00:00 Do some refactoring in the html backend This also merges an old patch by Augustsson: Wed Jul 12 19:54:36 CEST 2006 lennart.augustsson at credit-suisse.com * Print type definitions like signatures if given arrows. - - - - - 09d0ce24 by Malcolm.Wallace at 2006-07-20T13:13:57+00:00 mention HsColour in the docs, next to option flags for linking to source code - - - - - 24da6c34 by Malcolm.Wallace at 2006-07-20T13:14:50+00:00 change doc references to CVS to give darcs repository location instead - - - - - 74d52cd6 by David Waern at 2007-11-11T00:55:33+00:00 Update copyright - - - - - fcaa3b4f by Duncan Coutts at 2006-09-08T13:41:00+00:00 Eliminate dep on network by doing a little cut'n'paste haddock depending on the network causes a circular dependency at least if you want to build the network lib with haddock docs. - - - - - 10cc9bda by David Waern at 2007-11-11T02:09:41+00:00 Fix conflicts - - - - - 4e3acd39 by David Waern at 2007-11-11T02:21:19+00:00 Manual merge of a patch from Duncan Coutts that removes the dependency on mtl - - - - - fa9070da by Neil Mitchell at 2006-09-29T15:52:03+00:00 Do not generate an empty table if there are no exports, this fixes a <table></table> tag being generated, which is not valid HTML 4.01 - - - - - d7431c85 by David Waern at 2007-11-11T02:28:50+00:00 Fix conflicts - - - - - f87e8f98 by Simon Marlow at 2006-10-10T11:37:16+00:00 changes for 0.8 - - - - - db929565 by Simon Marlow at 2006-10-10T12:07:12+00:00 fix the name of the source file - - - - - 8220aa4b by Simon Marlow at 2006-10-11T14:17:37+00:00 Rename haddock.js to haddock-util.js haddock.js will be run automatically by Windows when you type 'haddock' if it is found on the PATH, so rename to avoid confusion. Spotted by Adrian Hey. - - - - - 6bccdaa1 by sven.panne at 2006-10-12T15:28:23+00:00 Cabal's sdist does not generate "-src.tar.gz" files, but ".tar.gz" ones - - - - - d3f3fc19 by Simon Marlow at 2006-12-06T16:05:07+00:00 add todo item for --maintainer - - - - - 2da7e269 by Simon Marlow at 2006-12-15T15:52:00+00:00 TODO: do something better about re-exported symbols from another package - - - - - 42d85549 by David Waern at 2007-11-11T02:30:59+00:00 Fix conflicts - - - - - 5e7ef6e5 by Neil Mitchell at 2007-01-11T15:41:15+00:00 Never do spliting index files into many - - - - - f3d4aebe by Neil Mitchell at 2007-01-11T17:07:09+00:00 Add searching on the index page - - - - - bad3ab66 by Neil Mitchell at 2007-01-11T18:17:46+00:00 Delete dead code, now there is only one index page - - - - - cd09eedb by Neil Mitchell at 2007-01-11T18:21:19+00:00 Delete more stuff that is no longer required - - - - - e2806646 by David Waern at 2007-11-11T02:41:53+00:00 Fix conflicts - - - - - a872a823 by Neil Mitchell at 2007-01-11T18:51:43+00:00 Make the index be in case-insensitive alphabetic order - - - - - 8bddd9d7 by Neil Mitchell at 2007-02-06T17:49:12+00:00 Do not create empty tables for data declarations which don't have any constructors, instances or comments. Gets better HTML 4.01 compliance - - - - - 036b8120 by David Waern at 2007-11-11T02:56:58+00:00 Fix conflicts - - - - - f50c1639 by Conal Elliott at 2007-02-14T21:54:00+00:00 added substitution %{FILE///c} - - - - - 402e166a by David Waern at 2007-11-11T03:35:46+00:00 Manual merge of old patch: Sat Apr 21 04:36:43 CEST 2007 Roberto Zunino <zunrob at users.sf.net> * URL expansion for %%, %L, %{LINE} - - - - - 2f264fbd by David Waern at 2007-11-11T03:40:33+00:00 Manual merge of an old patch: Thu Apr 19 20:23:40 CEST 2007 Wolfgang Jeltsch <g9ks157k at acme.softbase.org> * bug fix When Haddock was invoked with the --ignore-all-exports flag but the ignore-exports module attribute wasn't used, hyperlinks weren't created for non-exported names. This fix might not be as clean as one would wish (since --ignore-all-exports now results in ignore_all_exports = True *and* an additional OptIgnoreExports option for every module) but at least the bug seems to be resolved now. - - - - - 7d7ae106 by sven.panne at 2007-09-02T12:18:02+00:00 Install LICENSE in the correct place - - - - - 66eaa924 by David Waern at 2007-11-11T19:02:46+00:00 Fix a bug that made haddock loop - - - - - 4ed47b58 by David Waern at 2007-11-11T19:03:09+00:00 Rename java-script file (this wasn't merge correctly) - - - - - d569534a by David Waern at 2007-11-11T19:06:44+00:00 Don't require -B <ghc-libdir> when no argument files Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B <ghc-libdir> to Haddock when there're no source files to process. This is nice when computing contents/index for external packages. - - - - - 373368bc by Neil Mitchell at 2007-01-11T18:22:44+00:00 Change from tabs to spaces in the ppHtmlIndex function - - - - - 6b063a77 by Neil Mitchell at 2007-01-12T12:17:46+00:00 Rewrite much of the index searching code, previously was too slow to execute on the base library with IE, the new version guarantees less than O(log n) operations be performed, where n is the number in the list (before was always O(n)) - - - - - bfad00b7 by David Waern at 2007-11-11T23:33:53+00:00 Fix conflicts - - - - - cd2dcc09 by Neil Mitchell at 2007-01-12T12:25:01+00:00 Make the max number of results 75 instead of 50, to allow map searching in the base library to work - - - - - 3ae74764 by Neil Mitchell at 2007-01-12T12:58:17+00:00 Make the search box in a form so that enter does the default search - - - - - 142103e5 by David Waern at 2007-11-12T00:03:18+00:00 Merge patch from the old branch: Fri Aug 31 13:21:45 CEST 2007 Duncan Coutts <duncan at haskell.org> * Add category: Development to .cabal file Otherwise it appears on the hackage website in the "Unclassified" category. - - - - - 22ec2ddb by David Waern at 2007-11-25T01:55:29+00:00 A a list of small improvements to the TODO file - - - - - eb0129f4 by Wolfgang Jeltsch at 2007-12-03T23:47:55+00:00 addition of type equality support (at least for HTML generation) - - - - - 816a7e22 by David Waern at 2007-12-08T15:46:26+00:00 Handle class operators correctly when rendering predicates - - - - - 68baaad2 by David Waern at 2007-12-08T16:15:54+00:00 Code layout changes - - - - - 09b77fb4 by David Waern at 2007-12-08T16:16:03+00:00 Handle infix operators correctly in the Type -> HsType translation - - - - - 31c36da2 by David Waern at 2007-12-08T16:24:27+00:00 Add ppLParendTypes/ppLParendType - - - - - b17cc818 by David Waern at 2007-12-08T16:26:12+00:00 Use ppParendType when printing types args in predicates - - - - - ffd1f2cf by David Waern at 2007-12-08T16:45:06+00:00 Fix rendering of instance heads to handle infix operators This is also a refactoring to share this code for rendering predicates. - - - - - ff886d45 by David Waern at 2007-12-08T17:27:46+00:00 Fix rendering of class operators - - - - - e2fcbb9e by David Waern at 2007-12-08T17:59:28+00:00 Fix a bug (use ppTyName instead of ppName to print names in type apps) - - - - - 79a1056e by David Waern at 2007-12-08T21:25:18+00:00 Update tests - - - - - 867741ac by David Waern at 2007-12-08T21:25:49+00:00 Give a diff on test failure - - - - - 7e5eb274 by David Waern at 2008-01-05T14:33:45+00:00 Add DrIFT commands - - - - - 3656454d by David Waern at 2008-01-05T20:26:00+00:00 Add "cabal-version: >= 1.2" to the cabal file - - - - - 77974efc by Simon Marlow at 2007-12-20T09:52:44+00:00 add an item - - - - - f6ac1708 by Simon Marlow at 2007-12-06T14:00:10+00:00 Source links must point to the original module, not the referring module - - - - - eda1d5c9 by David Waern at 2008-01-06T14:40:52+00:00 Manual merge of a patch to the 0.8 branch Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar at microsoft.com> * Source links must point to the original module, not the referring module - - - - - 378f4085 by David Waern at 2008-01-06T16:03:45+00:00 Change stability from stable to experimental - - - - - 8bdafe44 by David Waern at 2008-01-06T16:14:22+00:00 Add haskell.vim (it had been removed somehow) - - - - - ea34d02e by David Waern at 2008-01-06T16:36:57+00:00 Change version to 2.0.0.0 - - - - - 34631ac0 by David Waern at 2008-01-06T16:44:57+00:00 Add missing modules to the cabal file - - - - - 9e142935 by David Waern at 2008-01-06T17:25:42+00:00 Depend on ghc >= 6.8.2 && < 6.9 - - - - - 59f9eeaa by Simon Marlow at 2007-12-20T10:43:04+00:00 add build scripts - - - - - 1c29ae30 by Simon Marlow at 2007-12-20T10:47:07+00:00 update version number - - - - - fe16a3e4 by Simon Marlow at 2007-12-20T10:48:03+00:00 update version - - - - - f688530f by Simon Marlow at 2007-12-20T10:48:29+00:00 doc updates - - - - - ce71b611 by David Waern at 2008-01-07T13:46:32+00:00 Change version in docs and spec - - - - - 03ab8d6f by David Waern at 2008-01-07T13:47:38+00:00 Manually merge over changes to CHANGES for 0.9 - - - - - 39f1b042 by David Waern at 2008-01-07T15:17:41+00:00 Remove the -use-package flag, we don't support it anyway - - - - - 7274a544 by David Waern at 2008-01-07T15:33:05+00:00 Update CHANGES for 2.0.0.0 - - - - - 96594f5d by David Waern at 2008-01-07T15:46:49+00:00 Wibble - - - - - f4c5a4c4 by David Waern at 2008-01-07T15:55:36+00:00 Change url to repo in documentation - - - - - 8a4c77f0 by David Waern at 2008-01-07T16:00:54+00:00 Update CHANGES - - - - - cb3a9288 by David Waern at 2008-01-07T16:02:55+00:00 Documentation fix - - - - - d8e45539 by David Waern at 2008-01-07T16:12:00+00:00 Update docs to say that Haddock accets .lhs files and module names - - - - - 4b5ce824 by David Waern at 2008-01-07T16:12:25+00:00 Document -B option - - - - - 47274262 by David Waern at 2008-01-07T16:23:07+00:00 Update CHANGES - - - - - 7ff314a9 by David Waern at 2008-01-07T16:23:20+00:00 Remove --use-package, --package & --no-implicit.. flags from docs - - - - - 6c3819c0 by David Waern at 2008-01-07T16:23:52+00:00 Remove --no-implicit-prelide flag - - - - - 1b14ae40 by David Waern at 2008-01-07T16:32:26+00:00 Update the "Using literate or pre-processed source" section - - - - - 0117f620 by David Waern at 2008-01-07T16:41:55+00:00 Document the --optghc flag - - - - - 087ab1cf by David Waern at 2008-01-07T16:42:10+00:00 Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 - - - - - 7253951e by David Waern at 2008-01-07T16:48:40+00:00 Document OPTIONS_HADDOCK - - - - - 3b6bdcf6 by David Waern at 2008-01-07T16:56:54+00:00 Wibble - - - - - 3025adf9 by David Waern at 2008-01-07T17:08:14+00:00 Wibble - - - - - 5f30f1a0 by David Waern at 2008-01-07T17:15:44+00:00 Change synopsis field to description - - - - - 1673f54b by David Waern at 2008-01-07T17:18:21+00:00 Change my email address in the cabal file - - - - - 55aa9808 by David Waern at 2008-01-07T18:18:02+00:00 Add documentation for readInterfaceFile - - - - - eaea417f by David Waern at 2008-01-07T18:21:30+00:00 Export necessary stuff from Distribution.Haddock - - - - - 7ea18759 by David Waern at 2008-01-07T18:31:49+00:00 Remove dep on Cabal - - - - - 7b79c74e by David Waern at 2008-01-07T18:33:49+00:00 Remove dep on process - - - - - ce3054e6 by David Waern at 2008-01-16T23:01:21+00:00 Add feature-requsts from Henning Thielemann to TODO - - - - - 0c08f1ec by David Waern at 2008-01-16T23:03:02+00:00 Record a bug in TODO - - - - - b04605f3 by David Waern at 2008-01-23T16:59:06+00:00 Add a bug reported by Ross to TODO - - - - - 5b17c030 by David Waern at 2008-01-23T18:05:53+00:00 A a bug report to TODO - - - - - 1c993b0d by David Waern at 2008-01-25T16:30:25+00:00 Accept test output - - - - - c22fc0d0 by David Waern at 2008-01-25T16:34:49+00:00 Accept test output - - - - - 4b795811 by David Waern at 2008-01-25T16:38:37+00:00 Change Hidden.hs (test) to use OPTIONS_HADDOCK - - - - - c124dbd9 by David Waern at 2008-01-25T16:39:23+00:00 Accept test output - - - - - ec6f6eea by David Waern at 2008-01-25T16:42:08+00:00 Add Hidden.html.ref to tests - - - - - 1dc9610c by David Waern at 2008-02-02T20:50:51+00:00 Add a comment about UNPACK bug in TODO - - - - - 2d3f7081 by David Waern at 2008-02-09T22:33:24+00:00 Change the representation of DocNames Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented. - - - - - 0f28c921 by David Waern at 2008-02-09T23:00:36+00:00 H.GHC.Utils: remove unused imports/exports - - - - - 0c44cad5 by David Waern at 2008-02-10T00:28:13+00:00 H.GHC.Utils: add some functions that were removed by mistake - - - - - e3452f49 by David Waern at 2008-02-10T00:28:48+00:00 Fix some trivial warnings in H.InterfaceFile - - - - - a6d74644 by David Waern at 2008-02-10T00:48:06+00:00 Update the version message to fit in small terminals - - - - - 76c9cd3e by David Waern at 2008-02-10T14:47:39+00:00 Remove bugs from TODO that don't apply anymore since the port - - - - - 5e10e090 by David Waern at 2008-02-10T15:22:47+00:00 Remove bugs from TODO that weren't actual bugs - - - - - fef70878 by David Waern at 2008-02-10T15:23:44+00:00 Remove yet another item from TODO that was not an actual bug - - - - - e1af47b8 by David Waern at 2008-02-11T10:25:57+00:00 Bump the version number to 2.1.0 Since the exported datatype DocName has changed, we need to bump the major version number. Let's also drop the fourth version component, it's not that useful. - - - - - e3be7825 by David Waern at 2008-04-11T14:29:04+00:00 Add a bug to TODO - - - - - cb6574be by David Waern at 2008-04-11T16:00:45+00:00 Use the in-place haddock when running tests - - - - - c6d7af0d by David Waern at 2008-04-11T16:09:16+00:00 Turn off GHC warnings when running tests - - - - - 7f61b546 by David Waern at 2008-04-11T17:24:00+00:00 Add a flag for turning off all warnings - - - - - 883b8422 by David Waern at 2008-04-12T14:02:18+00:00 Fix printing of data binders - - - - - 2a0db8fc by David Waern at 2008-04-12T18:52:46+00:00 Fix missing parenthesis in constructor args bug - - - - - 1b3ac3f9 by David Waern at 2008-04-12T18:57:23+00:00 Simplify test suite and add tests I move all tests into one single directory to simplify things, and add a test for the last bug that was fixed. - - - - - 8f178376 by David Waern at 2008-04-12T19:00:15+00:00 Add a script for copying test output to "expected" output - - - - - 193e3a03 by David Waern at 2008-04-12T19:16:37+00:00 Remove two fixed bugs from TODO - - - - - ddc9130c by David Waern at 2008-04-12T19:37:06+00:00 Update test README - - - - - 956069c0 by David Waern at 2008-05-01T12:16:14+00:00 Update version number in spec and docs - - - - - 5478621c by David Waern at 2008-05-01T12:28:12+00:00 Remove claim of backwards compatibility from docs for readInterfaceFile - - - - - 4a16dea9 by David Waern at 2008-05-01T12:33:04+00:00 Update CHANGES - - - - - 804216fb by David Waern at 2008-05-01T12:43:16+00:00 Add a synopsis - - - - - fd0c84d5 by David Waern at 2008-05-01T12:44:44+00:00 Add Haddock.DocName to the cabal file - - - - - 9f4a7439 by David Waern at 2008-05-01T12:45:53+00:00 Remove -fglasgow-exts and -fasm - - - - - aee7c145 by David Waern at 2008-05-01T12:54:01+00:00 Add LANGUAGE pragmas to source files - - - - - 9a58428b by David Waern at 2008-05-01T12:54:19+00:00 Add extensions to cabal file - - - - - 494f1bee by David Waern at 2008-05-01T13:12:09+00:00 Export DocName in the API - - - - - c938196b by David Waern at 2008-05-01T13:12:19+00:00 Add hide options to some source files - - - - - 236e86af by Neil Mitchell at 2008-06-07T20:45:10+00:00 Rewrite the --hoogle flag support - - - - - 6d910950 by Neil Mitchell at 2008-06-14T10:56:50+00:00 Simplify the newtype/data outputting in Hoogle, as haddock does it automatically - - - - - f87a95a8 by Neil Mitchell at 2008-06-14T12:10:18+00:00 Add initial structure for outputting documentation as well, but does not yet output anything - - - - - 7c3bce54 by Neil Mitchell at 2008-06-14T12:27:07+00:00 Remove <document comment> from the Hoogle output - - - - - 9504a325 by Neil Mitchell at 2008-06-16T06:33:21+00:00 Default to "main" if there is no package, otherwise will clobber hoogle's hoogle info - - - - - 4a794a79 by Neil Mitchell at 2008-06-16T06:53:29+00:00 Change packageName to packageStr, as it better reflects the information stored in it - - - - - 7abc9baf by Neil Mitchell at 2008-06-16T07:09:49+00:00 Add modulePkgInfo to Haddock.GHC.Utils, which gives back package name and version info - - - - - 8ca11514 by Neil Mitchell at 2008-06-16T07:13:48+00:00 Change Hoogle to take the package name and package version separately - - - - - a6da452d by Neil Mitchell at 2008-06-18T11:29:46+00:00 In Hoogle do not list things that are not local to this module - - - - - 974b76b7 by David Waern at 2008-06-19T18:40:13+00:00 Be more consistent with GHC API naming in H.GHC.Utils - - - - - 2facb4eb by David Waern at 2008-06-19T19:03:03+00:00 Update test output - - - - - c501de72 by David Waern at 2008-06-26T20:26:49+00:00 Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. - - - - - ac4c6836 by David Waern at 2008-06-26T20:33:08+00:00 Update CHANGES - - - - - 9d21c60a by David Waern at 2008-06-26T20:34:53+00:00 Update README - - - - - 741448f0 by David Waern at 2008-06-26T21:12:57+00:00 Improve wording in the help message - - - - - b1b42b11 by David Waern at 2008-06-30T10:16:17+00:00 Rename ForeignType - - - - - 6d6c2b34 by David Waern at 2008-06-30T10:25:09+00:00 Rename TyFamily - - - - - 8d1125ed by David Waern at 2008-06-30T10:37:21+00:00 Rename type patterns - - - - - 7610a4cb by David Waern at 2008-06-30T10:45:07+00:00 Rename associated types - - - - - 8eeba14c by David Waern at 2008-06-30T10:47:41+00:00 Remove the TODO file now that we have a trac - - - - - 1af5b25b by David Waern at 2008-07-02T18:19:28+00:00 Render type family declarations (untested) - - - - - ceb99797 by David Waern at 2008-07-02T18:24:06+00:00 Remove redundant check for summary when rendering data types - - - - - b36a58e0 by David Waern at 2008-07-02T22:01:38+00:00 More support for type families and associated types Now we just need to render the instances - - - - - 78784879 by David Waern at 2008-07-07T22:13:58+00:00 Remove filtering of instances We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later. - - - - - 3e758dad by David Waern at 2008-06-30T18:50:30+00:00 Run haddock in-place during testing - - - - - d9dab0ce by David Waern at 2008-07-08T21:04:32+00:00 Remove index.html and doc-index.html from output, they should not be versioned - - - - - 3e6c4681 by David Waern at 2008-07-08T21:06:42+00:00 Update test output following change to instance filtering - - - - - e34a3f14 by David Waern at 2008-07-12T16:48:28+00:00 Stop using the map from exported names to declarations During creation of the interface, we were using two maps: one from exported names to declarations, and one from all defined names in the module to declarations. The first contained subordinate names while the second one didn't. The first map was never used to look up names not defined in the associated module, so if we add subordinate names to the second map, we could use it everywhere. That's that this patch does. This simplifies code because we don't have to pass around two maps everywhere. We now store the map from locally defined things in the interface structure instead of the one from exported names. - - - - - 2e1d2766 by David Waern at 2008-07-12T16:55:21+00:00 Get the all locally defined names from GHC API We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API. - - - - - bf637994 by David Waern at 2008-07-13T13:09:16+00:00 Refactoring in H.Interface.Create We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names). - - - - - 547e410e by David Waern at 2008-07-13T13:34:51+00:00 Remove FastString import and FSLIT macro in H.I.Create -- they were unused - - - - - 693759d1 by David Waern at 2008-07-13T13:36:23+00:00 Remove unused import from H.I.Create - - - - - cde6e7fb by David Waern at 2008-07-13T13:51:54+00:00 Small touches - - - - - 96de8f1d by David Waern at 2008-07-20T11:21:46+00:00 Preparation for rendering instances as separate declarations We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet. - - - - - b0f824fb by David Waern at 2008-07-20T15:53:08+00:00 Follow changes to ExportDecl in Hoogle - - - - - 1192eff3 by Neil Mitchell at 2008-06-26T00:28:10+00:00 Change how the Hoogle backend outputs classes, adding the context in - - - - - 7a0d1464 by Neil Mitchell at 2008-06-26T00:28:46+00:00 Remove the indent utility function from Hoogle backend - - - - - 3361241b by Neil Mitchell at 2008-06-26T09:45:09+00:00 Add support for Hoogle writing ForeignImport/ForeignExport properly - - - - - 795ad3bf by Neil Mitchell at 2008-06-26T12:15:25+00:00 Flesh out the Hoogle code to render documentation - - - - - 23277995 by Neil Mitchell at 2008-06-26T14:56:41+00:00 Fix a bug in the Hoogle backend, unordered lists were being written out <ul>...</u> - - - - - db739b27 by Neil Mitchell at 2008-06-26T15:09:54+00:00 Remove any white space around a <li> element - - - - - f2e6bb8c by Neil Mitchell at 2008-07-10T15:30:47+00:00 Remove the TODO in the Hoogle HTML generation, was already done - - - - - 693ec9a3 by Neil Mitchell at 2008-07-10T15:53:00+00:00 Put brackets round operators in more places in the Hoogle output - - - - - 842313aa by Neil Mitchell at 2008-07-10T16:01:25+00:00 Print type signatures with brackets around the name - - - - - cf93deb0 by David Waern at 2008-07-20T17:04:22+00:00 Bump version number to 2.2.0 - - - - - 30e6a8d1 by David Waern at 2008-07-20T17:04:41+00:00 Resolve conflicts in H.B.Hoogle - - - - - 1f0071c9 by David Waern at 2008-07-23T23:05:01+00:00 Add "all" command to runtests.hs that runs all tests despite failures - - - - - f2723023 by David Waern at 2008-07-23T23:08:39+00:00 Update tests/README - - - - - c0304a11 by David Waern at 2008-07-23T23:21:15+00:00 Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. - - - - - 88a5fe71 by David Waern at 2008-07-23T23:54:16+00:00 Depend on the currently available ghc-paths versions only - - - - - 8738d97b by David Waern at 2008-07-24T10:50:44+00:00 FIX haskell/haddock#44: Propagate parenthesis level when printing documented types - - - - - 05339119 by David Waern at 2008-07-24T16:06:18+00:00 Drop unnecessary parenthesis in types, put in by the user We were putting in parenthesis were the user did. Let's remove this since it just clutters up the types. The types are readable anyway since we print parens around infix operators and do not rely on fixity levels. When doing this I discovered that we were relying on user parenthesis when printin types like (a `O` b) c. This patchs fixes this problem so that parenthesis are always inserted around an infix op application in case it is applied to further arguments, or if it's an arguments to a type constructor. Tests are updated. - - - - - b3a99828 by David Waern at 2008-07-24T10:19:43+00:00 Print parenthesis around non-atomic banged types Fixes half of haskell/haddock#44 - - - - - ab5238e0 by David Waern at 2008-07-24T22:07:49+00:00 Add a reference file for the TypeFamilies test - - - - - 1941cc11 by David Waern at 2008-07-25T17:15:53+00:00 Simplify definition of pretty and trace_ppr - - - - - e3bfa33c by David Waern at 2008-07-25T17:18:27+00:00 Warning messages Output a warning when filtering out data/type instances and associated types in instances. We don't show these in the documentation yet, and we need to let the user know. - - - - - 9b85fc89 by David Waern at 2008-07-25T17:45:40+00:00 Doc: Mention Hoogle in the Introduction - - - - - afb2dd60 by David Waern at 2008-07-25T17:49:00+00:00 Doc: update -B description - - - - - 584c0c91 by David Waern at 2008-07-25T18:11:38+00:00 Doc: describe -w flag - - - - - 77619c24 by David Waern at 2008-07-28T12:29:07+00:00 Remove TODO from cabal file - - - - - 96717d5f by David Waern at 2008-07-28T12:29:27+00:00 Support type equality predicates - - - - - c2fd2330 by David Waern at 2008-07-29T19:45:14+00:00 Move unL from H.B.Hoogle to H.GHC.Utils I like Neil's shorter unL better than unLoc from the GHC API. - - - - - c4c3bf6a by David Waern at 2008-07-29T19:47:36+00:00 Do not export ATs when not in list of subitems - - - - - bf9a7b85 by David Waern at 2008-08-03T11:42:59+00:00 Filter out ForeignExports - - - - - df59fcb0 by David Waern at 2008-08-03T14:02:51+00:00 Filter out more declarations The previous refactorings in H.I.Create introduced a few bugs. Filtering of some types of declarations that we don't handle was removed. This patch fixes this. - - - - - 2f8a958b by David Waern at 2008-08-03T15:24:07+00:00 Move reL to H.GHC.Utils so we can use it everywhere - - - - - 8ec15efd by David Waern at 2008-08-03T15:25:00+00:00 Use isVanillaLSig from GHC API instead of home brewn function - - - - - 300f93a2 by David Waern at 2008-08-03T15:25:27+00:00 Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. - - - - - 8776d1ec by David Waern at 2008-08-03T16:21:21+00:00 Filter out more declarations and keep only vanilla type sigs in classes - - - - - ea07eada by David Waern at 2008-08-03T16:48:00+00:00 Fix layout - - - - - dd5e8199 by David Waern at 2008-08-03T16:50:52+00:00 Move some utility functions from H.I.Create to H.GHC.Utils - - - - - 4a1dbd72 by David Waern at 2008-08-03T17:39:55+00:00 Do not filter out doc declarations - - - - - 0bc8dca4 by David Waern at 2008-08-03T17:47:26+00:00 Filter out separately exported ATs (take two) - - - - - af970fe8 by David Waern at 2008-08-03T22:39:17+00:00 Update CHANGES - - - - - 5436ad24 by David Waern at 2008-08-03T22:40:20+00:00 Bump version number to 2.2.1 - - - - - d66de448 by David Waern at 2008-08-05T19:00:32+00:00 Remove version restriction on ghc-paths - - - - - 534b1364 by David Waern at 2008-08-05T19:04:35+00:00 Bump version to 2.2.2 and update CHANGES - - - - - 549188ff by David Waern at 2008-08-05T19:16:49+00:00 Fix CHANGES - - - - - 0d156bb4 by Luke Plant at 2008-08-11T15:20:59+00:00 invoking haddock clarification and help - - - - - 748295cc by David Waern at 2008-08-11T18:56:37+00:00 Doc: say that the --hoogle option is functional - - - - - 43301db4 by David Waern at 2008-08-05T19:26:08+00:00 Change ghc version dependency to >= 6.8.2 - - - - - 3e5a53b6 by David Waern at 2008-08-10T22:42:05+00:00 Make H.GHC.Utils build with GHC HEAD - - - - - 7568ace0 by David Waern at 2008-08-11T19:41:54+00:00 Import Control.OldException instead of C.Exception when using ghc >= 6.9 We should really test for base version instead, but I don't currently know which version to test for. - - - - - b71ae991 by David Waern at 2008-08-12T22:40:39+00:00 Make our .haddock file version number depend on the GHC version We need to do this, since our .haddock format can potentially change whenever GHC's version changes (even when only the patchlevel changes). - - - - - 6307ce3f by David Waern at 2008-08-12T22:49:57+00:00 Remove matching on NoteTy in AttachInstances, it has been removed - - - - - 2dbcfd5f by David Waern at 2008-08-12T23:02:02+00:00 Comment out H.GHC.loadPackages - it is unused and doesn't build with ghc >= 6.9 - - - - - c74db5c2 by David Waern at 2008-08-12T23:03:58+00:00 Hide <.> from GHC import in Hoogle only for ghc <= 6.8.3 - - - - - 69a44ebb by David Waern at 2008-08-12T23:11:12+00:00 Follow changes to parseDynamic/StaticFlags - - - - - 5881f3f0 by David Waern at 2008-08-13T21:43:58+00:00 Add __GHC_PATCHLEVEL__ symbol also when building the library - - - - - 8574dc11 by David Waern at 2008-08-13T21:44:17+00:00 Follow move of package string functions from PackageConfig to Module - - - - - c9baa77f by David Waern at 2008-08-13T21:45:29+00:00 Follow extensible exceptions changes - - - - - 9092de15 by David Waern at 2008-08-13T21:46:20+00:00 Update test following Haddock version change - - - - - ebe569a4 by David Waern at 2008-08-13T21:46:54+00:00 Follow changes to parseDynamic- parseStaticFlags in GHC - - - - - b8a5ffd3 by David Waern at 2008-08-13T21:47:36+00:00 Follow changes to Binary in GHC 6.9 - - - - - edfda1cc by David Waern at 2008-08-13T21:50:17+00:00 Change ghc version dependency to >= 6.8.2 && <= 6.9 - - - - - d59be1cf by Neil Mitchell at 2008-08-12T16:02:53+00:00 Output all items, even if they are not defined in this module - ensures map comes from Prelude, not just GHC.Base - - - - - dda93b9f by Neil Mitchell at 2008-08-12T21:37:32+00:00 Add support for type synonyms to Hoogle, was accidentally missing before (woops!) - - - - - b6ee795c by Neil Mitchell at 2008-08-13T14:03:24+00:00 Generalise Hoogle.doc and add a docWith - - - - - 415e1bb2 by Neil Mitchell at 2008-08-13T14:03:46+00:00 Make Hoogle add documentation to a package - - - - - 790a1202 by Neil Mitchell at 2008-08-18T12:52:43+00:00 Use the same method to put out signatures as class methods in the Hoogle backend - - - - - ded37eba by Neil Mitchell at 2008-08-18T12:53:04+00:00 Remove Explicit top-level forall's when pretty-printing signatures - - - - - 6468c722 by Neil Mitchell at 2008-08-20T07:59:13+00:00 Simplify the code by removing not-to-important use of <.> in the Hoogle back end - - - - - 788c3a8b by Neil Mitchell at 2008-08-21T18:20:24+00:00 In the hoogle back end, markup definition lists using <i>, not <b> - - - - - 77d4b000 by Ian Lynagh at 2008-08-14T10:49:14+00:00 Add a Makefile for GHC's build system. Still won't work yet, but we're closer - - - - - 920440d7 by Ian Lynagh at 2008-08-27T18:06:46+00:00 Add haddock.wrapper - - - - - bcda925f by Ian Lynagh at 2008-08-27T18:07:02+00:00 Add a manual Cabal flag to control the ghc-paths dependency - - - - - 04d194e2 by Ian Lynagh at 2008-08-27T20:41:27+00:00 Update extensions in Cabal file Use ScopedTypeVariables instead of PatternSignatures - - - - - 12480043 by Ian Lynagh at 2008-08-27T20:41:55+00:00 Increase the upper bound on the GHC version number - - - - - b1f809a5 by Ian Lynagh at 2008-08-27T21:32:22+00:00 Fix some warnings - - - - - aea0453d by Ian Lynagh at 2008-08-28T14:22:29+00:00 Fixes for using haddock in a GHC build tree - - - - - ad23bf86 by Ian Lynagh at 2008-08-28T21:14:27+00:00 Don't use Cabal wrappers on Windows - - - - - 35858e4c by Ian Lynagh at 2008-08-29T00:07:42+00:00 Fix in-tree haddock on Windows - - - - - c2642066 by Ian Lynagh at 2008-09-03T22:35:53+00:00 follow library changes - - - - - 2eb55d50 by Ian Lynagh at 2008-09-07T18:52:51+00:00 bindist fixes - - - - - 3daa5b59 by Ian Lynagh at 2008-09-10T16:58:18+00:00 We need to tell haddock that its datasubdir is . or it can't find package.conf - - - - - 388fd8c2 by Ian Lynagh at 2008-09-10T19:47:44+00:00 Fix haddock inplace on Windows - - - - - 70a641c1 by Ian Lynagh at 2008-09-10T22:15:44+00:00 Fix installed haddock on Windows - - - - - 83c1e997 by Neil Mitchell at 2008-09-11T10:48:55+00:00 Import GHC.Paths if not IN_GHC_TREE, seems to match the use of GHC.Paths functions much better - - - - - b452519b by Ian Lynagh at 2008-09-12T12:58:24+00:00 Add a LANGUAGE ForeignFunctionInterface pragma - - - - - afbd592c by Ian Lynagh at 2008-09-12T12:59:13+00:00 Wibble imports - - - - - 547ac4ad by Ian Lynagh at 2008-09-14T15:34:22+00:00 Add a "#!/bin/sh" to haddock.wrapper - - - - - f207a807 by Ian Lynagh at 2008-09-15T10:02:32+00:00 Use "exec" when calling haddock in the wrapper - - - - - 2ee68509 by Thomas Schilling at 2008-09-15T09:09:16+00:00 Port Haddock.Interface to new GHC API. This required one bigger change: 'readInterfaceFile' used to take an optional 'Session' argument. This was used to optionally update the name cache of an existing GHC session. This does not work with the new GHC API, because an active session requires the function to return a 'GhcMonad' action, but this is not possible if no session is provided. The solution is to use an argument of functions for reading and updating the name cache and to make the function work for any monad that embeds IO, so it's result type can adapt to the calling context. While refactoring, I tried to make the code a little more self-documenting, mostly turning comments into function names. - - - - - 3bb96431 by Thomas Schilling at 2008-09-15T09:09:37+00:00 Reflect GHC API changes. - - - - - 2e60f714 by Thomas Schilling at 2008-09-15T09:10:37+00:00 Port Haddock.GHC.Typecheck to new GHC API. - - - - - 9cfd4cff by Thomas Schilling at 2008-09-15T09:11:00+00:00 Port Haddock.GHC to new GHC API. - - - - - caffa003 by Thomas Schilling at 2008-09-15T09:11:25+00:00 Port Main to new GHC API. - - - - - 069a4608 by Ian Lynagh at 2008-09-21T11:19:00+00:00 Fix paths used on Windows frmo a GHC tree: There is no whare directory - - - - - 7ceee1f7 by Ian Lynagh at 2008-09-21T12:20:16+00:00 Fix the in-tree haddock on Windows - - - - - 0d486514 by Ian Lynagh at 2008-09-23T18:06:58+00:00 Increase the GHC upper bound from 6.11 to 6.13 - - - - - f092c414 by Neil Mitchell at 2008-09-11T14:56:07+00:00 Do not wrap __ in brackets - - - - - 036bdd13 by Ian Lynagh at 2008-09-28T01:42:35+00:00 Fix building haddock when GhcProfiled=YES - - - - - 01434a89 by David Waern at 2008-09-24T20:24:21+00:00 Add PatternSignatures LANGUAGE pragma to Main and Utils - - - - - 1671a750 by David Waern at 2008-10-02T22:57:25+00:00 For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). - - - - - a25dde99 by David Waern at 2008-10-02T22:59:57+00:00 Remove ifaceEnv from Interface - it's no longer used - - - - - 610993da by David Waern at 2008-10-02T23:04:58+00:00 Write a comment about source links for type instance declarations - - - - - 5a96b5d5 by Thomas Schilling at 2008-10-03T10:45:08+00:00 Follow GHC API change of parseModule. - - - - - 5a943ae5 by Ian Lynagh at 2008-10-03T15:56:58+00:00 TAG 2008-10-03 - - - - - 76cdd6ae by Thomas Schilling at 2008-10-08T12:29:50+00:00 Only load modules once when typechecking with GHC. This still doesn't fix the memory leak since the typechecked source is retained and then processed separately. To fix the leak, modules must be processed directly after typechecking. - - - - - 7074d251 by David Waern at 2008-10-09T23:53:54+00:00 Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. - - - - - 4b9b2b2d by David Waern at 2008-10-09T23:54:49+00:00 Add some strictness annotations in Interface We add some strictness annotations to the fields of Interface, so that less GHC data is hold on to during processing. - - - - - 22035628 by David Waern at 2008-10-10T20:02:31+00:00 Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck - - - - - be637ad3 by David Waern at 2008-10-10T20:33:38+00:00 Make Haddock build with GHC 6.8.2 - - - - - 523b3404 by David Waern at 2008-10-10T21:08:09+00:00 Fix documentation for createInterfaces - - - - - e1556702 by David Waern at 2008-10-10T21:26:19+00:00 Hide H.Utils in library - - - - - a8e751c3 by David Waern at 2008-10-10T21:34:59+00:00 Add back .haddock file versioning based on GHC version It was accidentally removed in the patch for GHC 6.8.2 compatibility - - - - - 06fb3c01 by David Waern at 2008-10-10T21:47:15+00:00 Bump version number to 2.3.0 - - - - - ff087fce by David Waern at 2008-10-10T22:35:49+00:00 Add support for DocPic The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix! - - - - - 3af85bf6 by David Waern at 2008-10-10T23:34:05+00:00 Update tests - - - - - 0966873c by Simon Marlow at 2008-10-10T14:43:04+00:00 no need for handleErrMsg now, we don't throw any ErrMsgs - - - - - f1870de3 by Clemens Fruhwirth at 2008-10-10T13:29:36+00:00 Compile with wrapper but remove it for dist-install - - - - - 7b440dc2 by David Waern at 2008-10-11T14:02:25+00:00 Remove interface from LinksInfo It was there to know the documentation home module when creating a wiki link, but we already know this since we have the DocName. - - - - - e5729e6a by David Waern at 2008-10-15T20:49:18+00:00 Wibble - - - - - b2a8e01a by David Waern at 2008-10-15T21:03:36+00:00 Use type synonyms for declarations and docs in H.I.Create - - - - - be71a15b by David Waern at 2008-10-15T21:12:17+00:00 Comment out unused type family stuff completely - - - - - 91aaf075 by David Waern at 2008-10-15T21:49:04+00:00 Wibble - - - - - 42ba4eb4 by David Waern at 2008-10-15T21:53:53+00:00 Move convenient type synonym to H.Types - - - - - db11b723 by David Waern at 2008-10-15T22:14:07+00:00 Add DeclInfo to H.Types - - - - - 193552b6 by David Waern at 2008-10-15T22:15:01+00:00 Add subordinates with docs to the declaration map The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate. - - - - - 31e6eebc by David Waern at 2008-10-16T17:18:47+00:00 Wibble - - - - - 0dcbd79f by David Waern at 2008-10-16T20:58:42+00:00 Fix haskell/haddock#61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. - - - - - de47f20a by David Waern at 2008-10-16T22:06:35+00:00 Document function and improve its layout - - - - - e74e625a by Thomas Schilling at 2008-10-20T11:12:57+00:00 Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). - - - - - b63ac9a1 by David Waern at 2008-10-20T20:25:50+00:00 Make renamer consistent Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name). - - - - - f6de0bb0 by Ian Lynagh at 2008-09-19T00:54:43+00:00 TAG GHC 6.10 fork - - - - - 74599cd0 by David Waern at 2008-10-20T21:13:24+00:00 Do not save hidden modules in the .haddock file We were saving interfaces of all processed modules including those hidden using {-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links when generating the index for the libraries that come with GHC. This patch excludes modules with hidden documentation when writing .haddock files. It should fix the above problem. - - - - - 7b6742e9 by David Waern at 2008-10-21T19:54:52+00:00 Do not save hidden modules in the .haddock file (also for ghc >= 6.9) When writing the first patch, I forgot to do the fix in both branches of an #if macro. - - - - - b99b1951 by David Waern at 2008-10-22T20:04:18+00:00 Remove subordinate map and its usage It is not needed now that we store subordinate names in the DeclInfo map. - - - - - da97cddc by David Waern at 2008-10-22T20:11:46+00:00 Tidy up code in H.I.Create a little Remove commented out half-done type instance support, and remove DeclWithDoc synonym. - - - - - 6afa76f3 by David Waern at 2008-10-22T21:17:29+00:00 Fix warnings in H.GHC.Utils - - - - - 171ea1e8 by David Waern at 2008-10-22T21:35:04+00:00 Fix warnings in H.Utils - - - - - c8cb3b91 by David Waern at 2008-10-22T21:36:49+00:00 Wibble - - - - - 767fa06a by David Waern at 2008-10-27T19:59:04+00:00 Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. - - - - - e638bbc6 by David Waern at 2008-11-02T22:21:10+00:00 Add HCAR entry - - - - - 92b4ffcf by David Waern at 2008-11-02T22:44:19+00:00 Update CHANGES - - - - - 84d4da6e by David Waern at 2008-11-03T11:25:04+00:00 Add failing test for template haskell crash - - - - - 2a9cd2b1 by David Waern at 2008-11-04T21:13:44+00:00 Add tests/TH.hs - - - - - 8a59348e by David Waern at 2008-11-04T21:30:26+00:00 TAG 2.3.0 - - - - - 54f70d31 by Thomas Schilling at 2008-10-24T17:04:08+00:00 Enable framed view of the HTML documentation. This patch introduces: - A page that displays the documentation in a framed view. The left side will show a full module index. Clicking a module name will show it in the right frame. If Javascript is enabled, the left side is split again to show the modules at the top and a very short synopsis for the module currently displayed on the right. - Code to generate the mini-synopsis for each module and the mini module index ("index-frames.html"). - CSS rules for the mini-synopsis. - A very small amount of javascript to update the mini-synopsis (but only if inside a frame.) Some perhaps controversial things: - Sharing code was very difficult, so there is a small amount of code duplication. - The amount of generated pages has been doubled, since every module now also gets a mini-synopsis. The overhead should not be too much, but I haven't checked. Alternatively, the mini-synopsis could also be generated using Javascript if we properly annotate the actual synopsis. - - - - - 5d7ea5a6 by David Waern at 2008-11-04T23:20:17+00:00 Follow change to ExportDecl in frames code - - - - - 60e16308 by David Waern at 2008-11-04T23:35:26+00:00 Update CHANGES - - - - - d63fd26d by David Waern at 2008-11-04T23:37:43+00:00 Bump version number - - - - - c1660c39 by David Waern at 2008-11-04T23:44:46+00:00 Update CHANGES - - - - - 995ab384 by David Waern at 2008-11-04T23:55:21+00:00 Remove .ref files from tests/output/ - - - - - 1abbbe75 by David Waern at 2008-11-04T23:57:41+00:00 Output version info before running tests - - - - - 649b182f by David Waern at 2008-11-05T22:45:37+00:00 Add ANNOUNCE message - - - - - c36ae0bb by David Waern at 2008-11-05T23:15:35+00:00 Update ANNOUNCE - - - - - 9c4f3d40 by David Waern at 2008-11-05T23:18:30+00:00 Wibble - - - - - 5aac87ce by David Waern at 2008-11-06T21:07:48+00:00 Depend on base 4.* when using GHC >= 6.9, otherwise 3.* - - - - - b9796a74 by David Waern at 2008-11-06T21:13:40+00:00 Bump version to 2.4.1 and update CHANGES - - - - - d4b26baa by David Waern at 2008-11-06T21:26:33+00:00 Depend on base 4.0.* instead of 4.* - - - - - 2cb0903c by David Waern at 2008-11-06T21:46:53+00:00 Fix warnings in H.B.HH and H.B.HH2 - - - - - e568e89a by David Waern at 2008-11-06T21:47:12+00:00 Fix warnings in Haddock.ModuleTree - - - - - 9dc14fbd by David Waern at 2008-11-06T21:47:52+00:00 Fix warnings in Haddock.Version - - - - - 02ac197c by David Waern at 2008-11-06T21:51:31+00:00 Fix warnings in H.InterfaceFile and H.Options - - - - - 63e7439a by David Waern at 2008-11-06T21:59:45+00:00 Fix warnings in H.GHC.Typecheck - - - - - 4bca5b68 by David Waern at 2008-11-08T13:43:42+00:00 Set HscTarget to HscNothing instead of HscAsm There used to be a bug in the GHC API that prevented us from setting this value. - - - - - 07357aec by David Waern at 2008-11-09T22:27:00+00:00 Re-export NameCache and friends from Distribution.Haddock - - - - - ea554b5a by David Waern at 2008-11-09T23:14:10+00:00 Add Haddock.GHC.Utils to other-modules in library - - - - - 74aecfd7 by David Waern at 2008-11-10T01:18:57+00:00 Export DocName in the library - - - - - 241a58b3 by David Waern at 2008-11-10T01:19:18+00:00 Document the functions in H.DocName - - - - - edc2ef1b by David Waern at 2008-11-10T01:20:52+00:00 Export H.DocName in the library - - - - - 4f588d55 by David Waern at 2008-11-10T01:29:14+00:00 Make DocName an instance of NamedThing - - - - - b4647244 by David Waern at 2008-11-15T22:58:18+00:00 Reflect version bump in test suite - - - - - 4bee8ce2 by David Waern at 2008-11-15T22:58:45+00:00 Update tests For unknown reasons, test output for Bug1 and Test has changed for the better. - - - - - 1690e2f9 by David Waern at 2008-11-15T22:59:33+00:00 Store hidden modules in .haddock files We store documentation for an entity in the 'InstalledInterface' of the definition site module, and never in the same structure for a module which re-exports the entity. So when a client of the Haddock library wants to look up some documentation, he/she might need to access a hidden module. But we currently don't store hidden modules in the .haddock files. So we add the hidden modules and the Haddock options to the .haddock files. The options will be used to filter the module list to obtain the visible modules only, which is necessary for generating the contents and index for installed packages. - - - - - 8add6435 by David Waern at 2008-11-16T14:35:50+00:00 Bump major version number due to .haddock file format change - - - - - 48bfcf82 by David Waern at 2008-11-23T14:32:52+00:00 Update tests to account for version number bump - - - - - 0bbd1738 by David Waern at 2008-11-23T14:33:31+00:00 HADDOCK_DATA_DIR changed to haddock_datadir - - - - - 5088b78c by David Waern at 2008-11-23T17:13:21+00:00 FIX haskell/haddock#45: generate two anchors for each name We generate two anchor tags for each name, one where we don't escape the name and one where we URI-encode it. This is for compatibility between IE and Opera. Test output is updated. - - - - - 5ee5ca3b by Neil Mitchell at 2008-11-27T14:38:11+00:00 Drop HsDocTy annotations, they mess up pretty printing and also have a bracketing bug (#2584) - - - - - 51c014e9 by Roman Cheplyaka at 2008-11-27T22:27:36+00:00 Allow referring to a specific section within a module in a module link Fixes haskell/haddock#65 - - - - - 4094bdc5 by David Waern at 2008-11-28T21:13:33+00:00 Update tests following anchor change - - - - - f89552dd by Thomas Schilling at 2008-11-29T16:16:20+00:00 Haddock really shouldn't try to overwrite files. - - - - - 98127499 by David Waern at 2008-12-07T14:09:15+00:00 Solve conflict - - - - - 319356c5 by David Waern at 2008-10-22T21:16:55+00:00 Add -Wall -Werror to ghc-options - - - - - 3c4968c9 by David Waern at 2008-11-04T23:38:56+00:00 TAG 2.4.0 - - - - - 4b21e003 by David Waern at 2008-11-06T21:14:04+00:00 TAG 2.4.1 - - - - - 8e0cad5c by David Waern at 2008-12-07T14:12:54+00:00 Remove -Werror - - - - - 299d6deb by David Waern at 2008-12-07T14:25:18+00:00 Remove -Wall, we'll focus on warnings after 6.10.2 is out - - - - - 5f4216b6 by David Waern at 2008-12-07T20:58:05+00:00 Resolve conflict properly - - - - - 67d774e7 by Neil Mitchell at 2008-12-15T11:44:26+00:00 Make forall's in constructors explicit, i.e. data Foo = Foo {foo :: Eq a => a} - - - - - 61851792 by Neil Mitchell at 2008-12-18T15:39:39+00:00 Try and find a better package name than "main" for Hoogle, goes wrong when working on an executable rather than a library - - - - - 2fab8554 by David Waern at 2008-12-08T23:19:48+00:00 Make visible names from ExportItems Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment. - - - - - 7caadd8c by Ian Lynagh at 2008-12-11T17:01:04+00:00 Wrap the GHC usage with defaultCleanupHandler This fixes a bug where haddock leaves /tmp/ghc* directories uncleaned. - - - - - 7c9fc9a5 by David Waern at 2009-01-02T21:38:27+00:00 Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. - - - - - 119e4e05 by David Waern at 2009-01-06T23:34:17+00:00 Do not process boot modules We should of course not try to produce documentation for boot modules! The reason this has worked in the past is that the output of "real" modules overwrites the output of boot modules later in the process. However, this causes a subtle link environment problem. So let's get rid of this stupid behaviour. We avoid processing boot modules, but we continue to typecheck them. - - - - - c285b9d2 by David Waern at 2009-01-08T18:03:36+00:00 Export modules also when coming from external packages This seems to have regressed since a refactoring that was part of the 2.3.0 release. - - - - - 24031c17 by David Waern at 2009-01-10T15:26:26+00:00 Change version to 2.4.2 - no need to go to 2.5.0 - - - - - 864d1c3f by David Waern at 2009-01-10T15:35:20+00:00 Update tests to account for version number change - - - - - 524ba886 by David Waern at 2009-01-10T18:29:17+00:00 Add test for Template Haskell splicing - - - - - 05e6e003 by David Waern at 2009-01-10T19:35:42+00:00 Fix Trac haskell/haddock#68: Turn on compilation via C for Template Haskell packages We can't use HscNothing if we need to run code coming from modules inside the processed package during typechecking, which is the case for some packages using Template Haskell. This could be improved, to e.g. use HscInterpreted and HscNothing where possible, instead of using HscC for all modules in the package. - - - - - 2b2bafa1 by David Waern at 2009-01-10T20:22:25+00:00 Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above - - - - - bedc3a93 by Ian Lynagh at 2009-01-11T14:58:41+00:00 Fix the location of INPLACE_PKG_CONF; fixes the build Spotted by Conal Elliott - - - - - 943107c8 by David Waern at 2009-01-20T19:27:39+00:00 Document H.I.Create.collectDocs better - - - - - c6252e37 by David Waern at 2009-01-20T19:29:51+00:00 Fix Trac haskell/haddock#59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). - - - - - 3568a6af by David Waern at 2009-01-21T21:41:48+00:00 Do not indicate that a constructor argument is unboxed We only show the strictness annotation for an unboxed constructor argument. The fact that it is unboxed is an implementation detail and should not be part of the module interface. - - - - - 562a4523 by David Waern at 2009-01-22T18:53:49+00:00 Fix Trac haskell/haddock#50: do not attach docs to pragmas or other kinds of non-declarations We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations. - - - - - 6fdf21c2 by David Waern at 2009-01-22T19:48:09+00:00 Add test for quasi quotation. No reference output yet. - - - - - dc4100fd by David Waern at 2009-01-22T19:57:47+00:00 Improve quasi-quotation test and add reference output - - - - - 908b74bb by David Waern at 2009-01-23T23:22:03+00:00 Filter out separately exported associated types in a smarter way - - - - - f6b42ecb by David Waern at 2009-01-24T16:54:39+00:00 Correct spelling mistake in error message - - - - - 24e4245d by David Waern at 2009-01-24T17:48:03+00:00 Correct comment - - - - - b5e8462f by David Waern at 2009-02-07T13:22:29+00:00 Do not show a subordinate at the top level if its parent is also exported See note in the source code for more info. - - - - - 4b09de57 by David Waern at 2009-02-07T13:53:53+00:00 Update test following change to top level subordinates - - - - - 76379896 by David Waern at 2009-02-07T13:58:04+00:00 Remove html files in the tests/output/ directory which have been accidentally added - - - - - 1a6d8b10 by Joachim Breitner at 2009-02-20T10:29:43+00:00 Typo in comment - - - - - fec367d0 by David Waern at 2009-02-24T20:21:17+00:00 Fix small bug The rule is to prefer type constructors to other things when an identifier in a doc string can refer to multiple things. This stopped working with newer GHC versions (due to a tiny change in the GHC renamer). We implement this rule in the HTML backend for now, instead of fixing it in GHC, since we will move renaming of doc strings to Haddock in the future anyway. - - - - - 9b4172eb by David Waern at 2009-02-25T20:04:38+00:00 Fix bad error handling with newer GHCs When support for GHC 6.10 was added, an error handler was installed only around the typechecking phase. This had the effect that errors thrown during dependency chasing were caught in the top-level exception handler and not printed with enough detail. With this patch we wrap the error handler around all our usage of the Ghc monad. - - - - - de2df363 by Simon Peyton Jones at 2009-02-02T16:47:42+00:00 Hide funTyConName, now exported by TypeRep - - - - - 4d40a29f by Ian Lynagh at 2009-02-12T18:57:49+00:00 Don't build the library when building in the GHC tree - - - - - 1cd0abe4 by Ian Lynagh at 2009-02-13T13:58:53+00:00 Add a ghc.mk - - - - - 3d814eeb by Ian Lynagh at 2009-02-13T18:50:28+00:00 do .depend generation for haddock with the stage1 compiler This is a bit of a hack. We mkdepend with stage1 as if .depend depends on the stage2 compiler then make goes wrong: haddock's .depend gets included, which means that make won't reload until it's built, but we can't build it without the stage2 compiler. We therefore build the stage2 compiler before its .depend file is available, and so compilation fails. - - - - - b55036a4 by Ian Lynagh at 2009-02-25T01:38:13+00:00 Give haddock a wrapper on unix in the new GHC build system - - - - - 9eabfe68 by Ian Lynagh at 2009-02-25T19:21:32+00:00 Create inplace/lib/html in the new GHC build system - - - - - 93af30c7 by Ian Lynagh at 2008-11-07T19:18:23+00:00 TAG GHC 6.10.1 release - - - - - 06e6e34a by Thomas Schilling at 2009-02-24T18:11:00+00:00 Define __GHC_PATCHLEVEL__ for recent version of GHC (stable). - - - - - 680e6ed8 by Thomas Schilling at 2009-02-24T18:12:26+00:00 'needsTemplateHaskell' is not defined in current stable GHC. - - - - - 6c5619df by David Waern at 2009-02-25T22:15:23+00:00 Hide fynTyConName only for recent GHC versions - - - - - 6b2344f1 by Ian Lynagh at 2009-02-26T00:49:56+00:00 Add the module to one of haddocks warnings - - - - - e5d11c70 by David Waern at 2009-02-27T21:37:20+00:00 Bug fix We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates. - - - - - 10a79a60 by David Waern at 2009-02-27T22:08:08+00:00 Fix error message conflict The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now. - - - - - c5055c7f by David Waern at 2009-02-27T22:15:17+00:00 Shorten warning message - - - - - a72fed3a by David Waern at 2009-02-28T00:53:55+00:00 Do not show package name in warning message - - - - - a5daccb2 by Ian Lynagh at 2009-03-01T14:59:35+00:00 Install haddock in the new GHC build system - - - - - dfdb025c by Ian Lynagh at 2009-03-07T23:56:29+00:00 Relax base dependency to < 4.2, not < 4.1 - - - - - 5769c8b4 by David Waern at 2009-03-21T14:58:52+00:00 Bump .haddock file version number (due to change of format) - - - - - f1b8f67b by David Waern at 2009-03-21T14:59:26+00:00 Define __GHC_PATCHLEVEL__=1 when using ghc-6.10.1 - - - - - 23f78831 by David Waern at 2009-03-21T16:40:52+00:00 Update CHANGES - - - - - 7d2735e9 by David Waern at 2009-03-21T16:50:33+00:00 Update ANNOUNCE - - - - - 0771e00a by David Waern at 2009-03-21T16:54:40+00:00 Update ANNOUNCE, again - - - - - 81a6942a by David Waern at 2009-03-21T17:50:06+00:00 Don't be too verbose in CHANGES - - - - - 29861dcf by David Waern at 2009-03-21T18:03:31+00:00 TAG 2.4.2 - - - - - a585f285 by David Waern at 2009-03-21T19:20:29+00:00 Require Cabal >= 1.2.3 - - - - - 7c611662 by David Waern at 2009-03-21T19:21:48+00:00 TAG 2.4.2 with cabal-version >= 1.2.3 - - - - - 23b7deff by Simon Marlow at 2009-03-20T15:43:42+00:00 new GHC build system: use shell-wrappers macro - - - - - 25f8afe7 by Ian Lynagh at 2009-03-21T19:13:53+00:00 Fix (with a hack?) haddock in teh new build system - - - - - 6a29a37e by David Waern at 2009-03-24T22:10:15+00:00 Remove unnecessary LANGUAGE pragma - - - - - 954da57d by David Waern at 2009-03-24T22:21:23+00:00 Fix warnings in H.B.DevHelp - - - - - 1619f1df by David Waern at 2009-03-26T23:20:44+00:00 -Wall police in H.B.Html - - - - - b211e13b by Simon Marlow at 2009-03-24T13:00:56+00:00 install Haddock's html stuff - - - - - 78e0b107 by David Waern at 2008-12-07T19:58:53+00:00 Add verbosity flag and utils, remove "verbose" flag - - - - - 913dae06 by David Waern at 2008-12-07T20:01:05+00:00 Add some basic "verbose" mode logging in H.Interface - - - - - 1cbff3bf by David Waern at 2009-03-27T00:07:26+00:00 Fix conflicts - - - - - 22f82032 by David Waern at 2009-03-27T21:15:11+00:00 Remove H.GHC.Typecheck - - - - - 81557804 by David Waern at 2009-03-27T21:19:22+00:00 Remove docNameOrig and use getName everywhere instead - - - - - d8267213 by David Waern at 2009-03-27T21:21:46+00:00 Use docNameOcc instead of nameOccName . getName - - - - - 5d55deab by David Waern at 2009-03-27T21:33:04+00:00 Remove H.DocName and put DocName in H.Types - - - - - 8ba72611 by David Waern at 2009-03-27T22:06:26+00:00 Document DocName - - - - - 605f8ca5 by David Waern at 2009-03-27T22:45:21+00:00 -Wall police - - - - - e4da93ae by David Waern at 2009-03-27T23:12:53+00:00 -Wall police in H.B.Hoogle - - - - - bb255519 by David Waern at 2009-03-27T23:41:28+00:00 Define Foldable and Traversable instances for Located - - - - - f1195cfe by David Waern at 2009-03-27T23:51:34+00:00 Wibble - - - - - 23818d7c by David Waern at 2009-03-28T00:03:55+00:00 -Wall police in H.I.Rename - - - - - 0f050d67 by David Waern at 2009-03-28T00:15:15+00:00 -Wall police in H.I.AttachInstances - - - - - 0f3fe038 by David Waern at 2009-03-28T21:09:41+00:00 Wibble - - - - - 275d4865 by David Waern at 2009-03-28T21:27:06+00:00 Layout fix - - - - - 54ff0ef8 by David Waern at 2009-03-28T21:59:07+00:00 -Wall police in H.I.Create - - - - - 7f58b117 by David Waern at 2009-03-28T22:10:19+00:00 -Wall police in H.Interface - - - - - f0c03b44 by David Waern at 2009-03-28T22:22:59+00:00 -Wall police in Main - - - - - 29da355c by David Waern at 2009-03-28T22:23:39+00:00 Turn on -Wall -Werror - - - - - 446d3060 by David Waern at 2009-04-01T20:40:30+00:00 hlint police - - - - - 3867c9fc by David Waern at 2009-04-01T20:48:42+00:00 hlint police - - - - - bd1f1600 by David Waern at 2009-04-01T20:58:02+00:00 hlint police - - - - - e0e90866 by David Waern at 2009-04-05T12:42:53+00:00 Move H.GHC.Utils to H.GhcUtils - - - - - 9cbd426b by David Waern at 2009-04-05T12:57:21+00:00 Remove Haddock.GHC and move its (small) contents to Main - - - - - b5c2cbfd by David Waern at 2009-04-05T13:07:04+00:00 Fix whitespace and stylistic issues in Main - - - - - 3c04aa56 by porges at 2008-12-07T08:22:19+00:00 add unicode output - - - - - 607918da by David Waern at 2009-04-26T15:09:43+00:00 Resolve conflict - - - - - 4bec6b6b by Simon Marlow at 2009-05-13T10:00:31+00:00 fix markup - - - - - 436ad6f4 by Simon Marlow at 2009-03-23T11:54:45+00:00 clean up - - - - - bdcd1398 by Simon Marlow at 2009-03-24T10:36:45+00:00 new GHC build system: add $(exeext) - - - - - 9c0972f3 by Simon Marlow at 2009-03-24T11:04:31+00:00 update for new GHC build system layout - - - - - d0f3f83a by Ian Lynagh at 2009-03-29T15:31:43+00:00 GHC new build system fixes - - - - - 5a8245c2 by Ian Lynagh at 2009-04-04T20:44:23+00:00 Tweak new build system - - - - - 9c6f2d7b by Simon Marlow at 2009-05-13T10:01:27+00:00 add build instructions for GHC - - - - - 66d07c76 by Ian Lynagh at 2009-05-31T00:37:53+00:00 Quote program paths in ghc.mk - - - - - bb7de2cd by Ian Lynagh at 2009-06-03T22:57:55+00:00 Use a bang pattern on an unlifted binding - - - - - 3ad283fc by Ian Lynagh at 2009-06-13T16:17:50+00:00 Include haddock in GHC bindists - - - - - ac447ff4 by David Waern at 2009-06-24T21:07:50+00:00 Delete Haddock.Exception and move contents to Haddock.Types Only a few lines of code that mainly declares a type - why not just put it in Haddock.Types. - - - - - 4464fb9b by David Waern at 2009-06-24T22:23:23+00:00 Add Haddock module headers Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock at projects.haskell.org. Next step is to add a brief description to each module. - - - - - 5f4c95dd by David Waern at 2009-06-24T22:39:44+00:00 Fix spelling error - - - - - 6d074cdb by David Waern at 2009-06-25T21:53:56+00:00 Document Interface and InstalledInterface better - - - - - d0cbd183 by David Waern at 2009-06-27T12:46:46+00:00 Remove misplaced whitespace in H.I.Rename - - - - - fa381c49 by David Waern at 2009-06-27T13:26:03+00:00 Fix haskell/haddock#104 - create output directory if missing - - - - - 91fb77ae by Ian Lynagh at 2009-06-25T15:59:50+00:00 TAG 2009-06-25 - - - - - 0d853f40 by Simon Peyton Jones at 2009-07-02T15:35:22+00:00 Follow extra field in ConDecl - - - - - b201735d by Ian Lynagh at 2009-07-05T16:50:35+00:00 Update Makefile for the new GHC build system - - - - - df6c0092 by Ian Lynagh at 2009-07-05T17:01:13+00:00 Resolve conflicts - - - - - 1066870a by Ian Lynagh at 2009-07-05T17:01:48+00:00 Remove the -Wwarn hack in the GHC build system - - - - - 7e856076 by Ian Lynagh at 2009-07-05T17:17:59+00:00 Fix warnings - - - - - 5d4cd958 by Ian Lynagh at 2009-07-05T19:35:40+00:00 Bump version number Cabal needs to distinguish between haddocks having a --verbose and --verbosity flag - - - - - 6ee07c99 by David Waern at 2009-07-06T20:14:57+00:00 Wibble - - - - - 2308b66f by David Waern at 2009-07-06T20:24:20+00:00 Clearer printing of versions by runtests.hs - - - - - d4b5d9ab by David Waern at 2009-07-06T21:22:42+00:00 Fix (invisible) bug introduced by unicode patch - - - - - 2caca8d8 by David Waern at 2009-07-06T21:44:10+00:00 Use HscAsm instead of HscC when using TH - - - - - 18f3b755 by David Waern at 2009-07-06T22:10:22+00:00 Update HCAR entry (by Janis) - - - - - a72ac9db by David Waern at 2009-07-06T23:01:35+00:00 Follow HsRecTy change with an #if __GLASGOW_HASKEL__ >= 611 - - - - - 549135d2 by David Waern at 2009-07-06T23:11:41+00:00 Remove unused functions from Haddock.Utils - - - - - b450134a by Isaac Dupree at 2009-07-11T14:59:00+00:00 revert to split-index for large indices - remove the search-box, because browsers have search-for-text abilities anyway. - pick 150 items in index as the arbitrary time at which to split it - notice the bug that identifiers starting with non-ASCII characters won't be listed in split-index, but don't bother to fix it yet (see ticket haskell/haddock#116, http://trac.haskell.org/haddock/ticket/116 ) - - - - - 78a5661e by Isaac Dupree at 2009-07-20T15:37:18+00:00 Implement GADT records in HTML backend - - - - - 4e163555 by Isaac Dupree at 2009-07-21T22:03:25+00:00 add test for GADT records - - - - - 79aa4d6e by David Waern at 2009-07-23T20:40:37+00:00 Update test suite following version bump - - - - - 5932c011 by David Waern at 2009-08-02T10:25:39+00:00 Fix documentation bug - - - - - a6970fca by David Waern at 2009-08-12T23:08:53+00:00 Remove support for ghc 6.8.* from .cabal file - - - - - c1695902 by Ian Lynagh at 2009-07-07T13:35:45+00:00 Fix unused import warnings - - - - - fb6df7f9 by Ian Lynagh at 2009-07-16T00:20:31+00:00 Use cProjectVersion directly rather than going through compilerInfo Fixes the build after changes in GHC - - - - - 548cdd66 by Simon Marlow at 2009-07-28T14:27:04+00:00 follow changes in GHC's ForeignType - - - - - 9395aaa0 by David Waern at 2009-08-13T22:17:33+00:00 Switch from PatternSignatures to ScopedTypeVariables in Main - - - - - eebf39bd by David Waern at 2009-08-14T17:14:28+00:00 Version .haddock files made with GHC 6.10.3/4 correclty - - - - - 58f3e735 by David Waern at 2009-08-14T17:19:37+00:00 Support GHC 6.10.* and 6.11.* only - - - - - 5f63cecc by David Waern at 2009-08-14T22:03:20+00:00 Do not version .haddock file based on GHC patchlevel version We require that the instances of Binary that we use from GHC will not change between patchlevel versions. - - - - - d519de9f by David Waern at 2009-08-14T23:50:00+00:00 Update CHANGES - - - - - 35dccf5c by David Waern at 2009-08-14T23:51:38+00:00 Update version number everywhere - - - - - 6d363fea by David Waern at 2009-08-15T09:46:49+00:00 Update ANNOUNCE - - - - - c7ee6bc2 by David Waern at 2009-08-15T09:47:13+00:00 Remove -Werror Forgot that Hackage doesn't like it. - - - - - a125c12b by David Waern at 2009-08-15T09:49:50+00:00 Require Cabal >= 1.6 - - - - - adb2f560 by Isaac Dupree at 2009-08-12T03:47:14+00:00 Cross-Package Documentation version 4 - - - - - 3d6dc04d by David Waern at 2009-08-15T23:42:57+00:00 Put all the IN_GHC_TREE stuff inside getGhcLibDir - - - - - 56624097 by David Waern at 2009-08-15T23:52:03+00:00 Add --print-ghc-libdir - - - - - f15d3ccb by David Waern at 2009-08-16T00:37:52+00:00 Read base.haddock when running tests We can now test cross-package docs. - - - - - 283f0fb9 by David Waern at 2009-08-16T00:50:59+00:00 Update test output - we now have more links - - - - - 673d1004 by David Waern at 2009-08-16T01:26:08+00:00 Read process.haddock when running tests - - - - - 0d127f82 by David Waern at 2009-08-16T01:43:04+00:00 Add a test for cross-package documentation - - - - - f94db967 by Ian Lynagh at 2009-08-16T18:42:44+00:00 Follow GHC build system changes - - - - - 5151278a by Isaac Dupree at 2009-08-16T19:58:05+00:00 make cross-package list types look nicer - - - - - c41e8228 by Isaac Dupree at 2009-08-18T01:47:47+00:00 Haddock.Convert: export more functions This lets us remove some code in Haddock.Interface.AttachInstances - - - - - 2e5fa398 by Isaac Dupree at 2009-08-18T02:11:05+00:00 switch AttachInstances to use synify code It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication! - - - - - b8b07123 by Isaac Dupree at 2009-08-18T02:23:31+00:00 Find instances using GHC, which is more complete. In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?) - - - - - 6959b451 by Isaac Dupree at 2009-08-17T00:37:18+00:00 fix preprocessor conditional sense - - - - - 942823af by Isaac Dupree at 2009-08-16T22:46:48+00:00 remove ghc 6.8 conditionals from Haddock.Interface - - - - - 4b3ad888 by Isaac Dupree at 2009-08-18T20:24:38+00:00 Fix GHC 6.11 build in Haddock.Convert - - - - - 0a89c5ab by Isaac Dupree at 2009-08-23T00:08:58+00:00 hacks to make it compile without fnArgDocsn - - - - - 7b3bed43 by Isaac Dupree at 2009-08-23T03:01:28+00:00 less big-Map-based proper extraction of constructor subdocs - - - - - b21c279a by Isaac Dupree at 2009-08-23T03:02:06+00:00 Html: remove unnecessary+troublesome GHC. qualifications - - - - - 96c97115 by Isaac Dupree at 2009-08-23T03:08:03+00:00 Move doc parsing/lexing into Haddock for ghc>=6.11 - - - - - e1cec02d by Isaac Dupree at 2009-08-23T05:08:14+00:00 get rid of unused DocMap parameter in Html - - - - - 66960c59 by Isaac Dupree at 2009-08-23T05:54:20+00:00 fix horrible named-docs-disappearing bug :-) - - - - - a9d7eff3 by Isaac Dupree at 2009-08-23T06:26:36+00:00 re-implement function-argument docs ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently. - - - - - 8bf6852c by Isaac Dupree at 2009-08-23T07:26:05+00:00 cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! - - - - - 30115a64 by Isaac Dupree at 2009-08-23T18:22:47+00:00 Improve behavior for unfindable .haddock - - - - - aa364bda by Isaac Dupree at 2009-08-23T18:28:16+00:00 add comment for FnArgsDoc type - - - - - 49b23a99 by Isaac Dupree at 2009-08-23T21:52:48+00:00 bugfix: restore fnArgDocs for type-synonyms - - - - - f65f9467 by Isaac Dupree at 2009-08-23T22:06:55+00:00 Backends.Hoogle: eliminate warnings - - - - - a292d216 by Isaac Dupree at 2009-08-23T22:10:24+00:00 Haddock.Convert: eliminate warnings - - - - - 5546cd20 by Isaac Dupree at 2009-08-23T22:12:31+00:00 Haddock.Interface.Rename: eliminate warnings - - - - - 0a9798b6 by Isaac Dupree at 2009-08-23T22:18:47+00:00 Main.hs: remove ghc<6.9 conditionals - - - - - e8f9867f by Isaac Dupree at 2009-08-23T22:27:46+00:00 Main.hs: eliminate warnings (except for OldException) - - - - - 61c64247 by Isaac Dupree at 2009-08-23T22:41:01+00:00 move get*LibDir code in Main.hs, to +consistent code, -duplication - - - - - 948f1e69 by Isaac Dupree at 2009-08-23T23:14:26+00:00 Main.hs: OldException->Exception: which eliminates warnings - - - - - 3d5d5e03 by Isaac Dupree at 2009-08-23T23:20:11+00:00 GhcUtils: ghc >= 6.10 - - - - - 2771d657 by Isaac Dupree at 2009-08-23T23:21:55+00:00 InterfaceFile: ghc >= 6.10 - - - - - d9f2b9d1 by Isaac Dupree at 2009-08-23T23:22:58+00:00 Types: ghc >= 6.10 - - - - - ca39210e by Isaac Dupree at 2009-08-23T23:23:26+00:00 ModuleTree: ghc >= 6.10 - - - - - 883c4e59 by Isaac Dupree at 2009-08-23T23:24:04+00:00 Backends.DevHelp: ghc >= 6.10 - - - - - 04667df5 by Isaac Dupree at 2009-08-23T23:24:37+00:00 Backends.Html: ghc >= 6.10 - - - - - a9f7f25f by Isaac Dupree at 2009-08-23T23:25:24+00:00 Utils: ghc >= 6.10 - - - - - b7105022 by Isaac Dupree at 2009-08-23T23:37:47+00:00 eliminate haskell98 dependency, following GHC's example It turns out I/we already had, and it was only a matter of deleting it from the cabal file. - - - - - 292e0911 by Isaac Dupree at 2009-08-24T01:22:44+00:00 refactor out subordinatesWithNoDocs dep of inferenced-decls fix - - - - - c2ed46a2 by Isaac Dupree at 2009-08-24T01:24:03+00:00 Eradicate wrong runtime warning for type-inferenced exported-functions see the long comment in the patch for why I did it this way :-) - - - - - 4ac0b57c by David Waern at 2009-09-04T22:56:20+00:00 Clean up tyThingToHsSynSig a little Factor out noLoc and use the case construct. Also rename the function to tyThingToLHsDecl, since it doesn't just create type signatures. - - - - - 28ab9201 by David Waern at 2009-09-04T22:58:50+00:00 Wibble - - - - - 0d9fe6d0 by David Waern at 2009-09-06T18:39:30+00:00 Add more copyright owners to H.I.AttachInstances - - - - - 122441b1 by David Waern at 2009-09-06T18:44:12+00:00 Style police - - - - - 1fa79463 by David Waern at 2009-09-06T18:57:45+00:00 Move toHsInstHead to Haddock.Convert and call it synifyInstHead - - - - - 0d42a8aa by David Waern at 2009-09-06T21:11:38+00:00 Use colordiff to display test results if available - - - - - ea9d8e03 by Simon Marlow at 2009-08-24T08:46:14+00:00 Follow changes in GHC's interface file format Word32 instead of Int for FastString and Name offsets - - - - - 537e051e by Simon Marlow at 2009-07-29T14:16:53+00:00 define unpackPackageId (it was removed from GHC) - - - - - 50c63aa7 by David Waern at 2009-09-09T23:18:03+00:00 Remove commented-out code - - - - - 511631fe by David Waern at 2009-09-09T23:19:05+00:00 Correct copyright in H.I.ParseModuleHeader - - - - - 898ec768 by David Waern at 2009-09-11T11:22:29+00:00 Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time. - - - - - 37bec0d5 by Simon Peyton Jones at 2009-09-11T08:28:04+00:00 Track change in HsType - - - - - eb3a97c3 by Ian Lynagh at 2009-09-11T16:07:09+00:00 Allow building with base 4.2 - - - - - bb4205ed by Ian Lynagh at 2009-09-22T13:50:02+00:00 Loosen the GHC dependency - - - - - 5c75deb2 by Ian Lynagh at 2009-09-22T14:08:39+00:00 Fix building with GHC >= 6.12 - - - - - fb131481 by David Waern at 2009-09-11T11:24:48+00:00 Update runtests.hs to work with GHC 6.11 - - - - - ac3a419d by David Waern at 2009-09-11T11:25:14+00:00 Update CrossPackageDocs test - - - - - ec65c3c6 by David Waern at 2009-09-11T11:25:40+00:00 Add reference output for CrossPackageDocs - - - - - 520c2758 by Ian Lynagh at 2009-10-25T17:26:40+00:00 Fix installation in the GHC build system - - - - - 28b3d7df by Ian Lynagh at 2009-11-05T15:57:27+00:00 GHC build system: Make *nix installation work in paths containing spaces - - - - - 5c9bb541 by David Waern at 2009-11-14T11:56:39+00:00 Track change in HsType for the right compiler version - - - - - 905097ce by David Waern at 2009-11-14T12:10:47+00:00 hlint police - - - - - 04920630 by Ian Lynagh at 2009-11-20T13:46:30+00:00 Use defaultObjectTarget rather than HscAsm This fixes haddock when we don't have a native code generator - - - - - 966eb079 by David Waern at 2009-11-15T12:32:21+00:00 Remove commented-out code - - - - - 37f00fc4 by David Waern at 2009-11-22T13:58:48+00:00 Make runtests.hs strip links before diffing Generates easier to read diffs when tests fail. The content of the links is not important anyway since it is not taken into account by the tests. - - - - - 3a9bb8ef by David Waern at 2009-11-22T14:05:06+00:00 Follow findProgramOnPath signature change in runtests.hs - - - - - b26b9e5a by David Waern at 2009-11-22T14:08:40+00:00 Follow removal of GHC.MVar from base in CrossPackageDocs - - - - - f4d90ae4 by David Waern at 2009-11-22T14:48:47+00:00 Make copy.hs strip link contents before copying No more updating of reference files when URLs in links changes. - - - - - 4c9c420d by David Waern at 2009-11-22T15:26:41+00:00 Update test reference output * More links (Int, Float etc) * Stripped link contents - - - - - a62b80e3 by David Waern at 2009-11-23T23:19:39+00:00 Update CrossPackageDocs reference output - Remove GHC.MVar import (removed from base) - Strip link contents - - - - - 43491394 by David Waern at 2009-11-23T23:20:00+00:00 Update test reference files with comments on instances - - - - - 0d370a0b by David Waern at 2009-11-23T23:25:16+00:00 Bump version number - - - - - 2293113e by David Waern at 2009-11-24T20:55:49+00:00 Comments on instances Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances - - - - - bf586f29 by David Waern at 2009-11-27T22:05:15+00:00 Whitespace police - - - - - b8f03afa by David Waern at 2009-11-27T22:11:46+00:00 Remove bad whitespace and commented-out pieces - - - - - 90b8ee90 by David Waern at 2009-11-27T22:15:04+00:00 Whitespace police - - - - - b5ede900 by David Waern at 2009-11-27T22:15:50+00:00 Whitespace police - - - - - e3fddbfe by David Waern at 2009-11-28T13:37:59+00:00 Remove Name from DocInstance It's not used. - - - - - 9502786c by David Waern at 2009-11-28T13:56:54+00:00 Require at least GHC 6.12 While regression testing Haddock, I found a bug that happens with GHC 6.10.3, but not with GHC 6.12-rc2 (haven't tried 6.10.4). I don't have time to track it down. I think we should just always require the latest major GHC version. The time spent on making Haddock work with older versions is too high compared to the time spent on bugfixing, refactoring and features. - - - - - 8fa688d8 by David Waern at 2009-11-28T15:05:03+00:00 Remove cruft due to compatibility with older GHCs - - - - - 46fbbe9d by David Waern at 2009-11-28T15:07:50+00:00 Add a documentation header to Haddock.Convert - - - - - c3d2cc4a by David Waern at 2009-11-28T15:10:14+00:00 Remove unused H.Utils.FastMutInt2 - - - - - 490aba80 by David Waern at 2009-11-28T15:36:36+00:00 Rename Distribution.Haddock into Documentation.Haddock - - - - - 33ee2397 by David Waern at 2009-11-28T15:36:47+00:00 Fix error message - - - - - a5a3b950 by David Waern at 2009-11-28T16:58:39+00:00 Add a test flag that brings in QuickCheck - - - - - fa049e13 by David Waern at 2009-11-28T19:32:18+00:00 Say that we want quickcheck 2 - - - - - f32b0d9b by David Waern at 2009-11-28T19:32:40+00:00 Add an Arbitrary instance for HsDoc - - - - - da9a8bd7 by David Waern at 2009-11-28T20:15:30+00:00 Rename HsDoc back into Doc - - - - - edb60101 by David Waern at 2009-11-28T22:16:16+00:00 Move H.Interface.Parse/Lex to H.Parse/Lex These are not just used to build Interfaces. - - - - - 0656a9b8 by David Waern at 2009-11-28T23:12:14+00:00 Update version number in test suite - - - - - 5e8c6f4a by David Waern at 2009-12-21T14:12:41+00:00 Improve doc of DocName - - - - - 7868e551 by Ian Lynagh at 2009-09-22T10:43:03+00:00 TAG GHC 6.12-branch created - - - - - 0452a3ea by Ian Lynagh at 2009-12-15T12:46:07+00:00 TAG GHC 6.12.1 release - - - - - 65e9be62 by David Waern at 2009-12-21T16:58:58+00:00 Update CHANGES - - - - - 145cee32 by David Waern at 2009-12-21T16:59:09+00:00 TAG 2.6.0 - - - - - 3c552008 by David Waern at 2009-12-22T17:11:14+00:00 Update ANNOUNCE - - - - - 931f9db4 by David Waern at 2010-01-22T19:57:17+00:00 Convert haddock.vim to use unix newlines - - - - - 4e56588f by David Waern at 2010-01-22T22:11:17+00:00 Remove unnecessary (and inexplicable) uses of nub - - - - - 744bb4d1 by David Waern at 2010-01-22T22:12:14+00:00 Follow move of parser and lexer - - - - - e34bab14 by David Waern at 2010-01-22T22:49:13+00:00 Use findProgramLocation instead of findProgramOnPath in runtests.hs - - - - - 8d39891b by Isaac Dupree at 2010-01-14T18:53:18+00:00 fix html arg-doc off-by-one and silliness - - - - - 9401f2e9 by David Waern at 2010-01-22T22:57:03+00:00 Create a test for function argument docs - - - - - 507a82d7 by David Waern at 2010-01-22T23:24:47+00:00 Put parenthesis around type signature arguments of function type - - - - - 8a305c28 by David Waern at 2010-01-23T17:26:59+00:00 Add reference file for the FunArgs test - - - - - 1309d5e1 by David Waern at 2010-01-24T16:05:08+00:00 Improve FunArg test and update Test.html.ref - - - - - 2990f055 by Yitzchak Gale at 2010-02-14T16:03:46+00:00 Do not generate illegal character in HTML ID attribute. - - - - - c5bcab7a by David Waern at 2010-02-22T22:10:30+00:00 Fix Haddock markup error in comment - - - - - c6416a73 by David Waern at 2010-02-24T22:55:08+00:00 Large additions to the Haddock API Also improved and added more doc comments. - - - - - 57d289d7 by David Waern at 2010-02-24T22:58:02+00:00 Remove unused ifaceLocals - - - - - 80528d93 by David Waern at 2010-02-25T21:05:09+00:00 Add HaddockModInfo to the API - - - - - 82806848 by David Waern at 2010-02-25T21:05:27+00:00 Wibble - - - - - 744cad4c by David Waern at 2010-02-25T23:30:59+00:00 Make it possible to run a single test - - - - - 6a806e4c by David Waern at 2010-03-14T14:19:39+00:00 Bump version number - - - - - a5a8e4a7 by David Waern at 2010-03-14T14:36:35+00:00 Update ANNOUNCE - - - - - 6f05435e by Simon Hengel at 2010-03-15T20:52:42+00:00 Add missing dependencies for 'library' in haddock.cabal - - - - - faefe2bd by David Waern at 2010-03-15T22:29:37+00:00 Solve conflicts - - - - - 9808ad52 by David Waern at 2010-03-15T22:51:21+00:00 Bump version number - - - - - eb0bf60b by David Waern at 2010-03-15T22:52:32+00:00 Update CHANGES - - - - - f95cd891 by David Waern at 2010-03-15T23:01:06+00:00 Add Paths_haddock to other-modules of library - - - - - 65997b0a by David Waern at 2010-03-15T23:14:59+00:00 Update CHANGES - - - - - 7e251731 by David Waern at 2010-03-15T23:15:30+00:00 Bump version number - - - - - c9cd0ddc by David Waern at 2010-03-16T00:28:34+00:00 Fix warning - - - - - 1cac2d93 by Simon Peyton Jones at 2010-01-04T15:22:16+00:00 Fix imports for new location of splitKindFunTys - - - - - 474f26f6 by Simon Peyton Jones at 2010-02-10T14:36:06+00:00 Update Haddock for quasiquotes - - - - - 0dcc06c0 by Simon Peyton Jones at 2010-02-10T10:59:45+00:00 Track changes in HsTyVarBndr - - - - - 2d84733a by Simon Peyton Jones at 2010-02-10T14:52:44+00:00 Track HsSyn chnages - - - - - 9e3adb8b by Ian Lynagh at 2010-02-20T17:09:42+00:00 Resolve conflicts - - - - - a3e72ff8 by Simon Peyton Jones at 2010-03-04T13:05:16+00:00 Track change in HsUtils; and use a nicer function not an internal one - - - - - 27994854 by David Waern at 2010-03-18T22:22:27+00:00 Fix build with GHC 6.12.1 - - - - - 11f6e488 by David Waern at 2010-03-18T22:24:09+00:00 Bump version in test reference files - - - - - 0ef2f11b by David Waern at 2010-03-20T00:56:30+00:00 Fix library part of cabal file when in ghc tree - - - - - 3f6146ff by Mark Lentczner at 2010-03-20T22:30:11+00:00 First, experimental XHTML rendering switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString) - - - - - b8ab329b by Mark Lentczner at 2010-03-20T22:54:01+00:00 apply changes to Html.hs to Xhtml/*.hs incorporate changes that were made between the time Html.hs was copied and split into Xhtml.hs and Xhtml/*.hs includes patchs after "Wibble" (!) through "Fix build with GHC 6.12.1" - - - - - 73df2433 by Ian Lynagh at 2010-03-20T21:56:37+00:00 Follow LazyUniqFM->UniqFM in GHC - - - - - db4f602b by David Waern at 2010-03-29T22:00:01+00:00 Fix build with GHC 6.12 - - - - - d8dca088 by Simon Hengel at 2010-04-02T16:39:55+00:00 Add missing dependencies to cabal file - - - - - e2adc437 by Simon Hengel at 2010-04-02T14:08:40+00:00 Add markup support for interactive examples - - - - - e882ac05 by Simon Hengel at 2010-04-02T14:11:53+00:00 Add tests for interactive examples - - - - - 5a07a6d3 by David Waern at 2010-04-07T17:05:20+00:00 Propagate source positions from Lex.x to Parse.y - - - - - 6493b46f by David Waern at 2010-04-07T21:48:57+00:00 Let runtests.hs die when haddock has not been built - - - - - 5e34423e by David Waern at 2010-04-07T22:01:13+00:00 Make runtests.hs slightly more readable - - - - - 321d59b3 by David Waern at 2010-04-07T22:13:27+00:00 Fix haskell/haddock#75 Add colons to the $ident character set. - - - - - 37b08b8d by David Waern at 2010-04-08T00:32:52+00:00 Fix haskell/haddock#118 Avoid being too greedy when lexing URL markup (<..>), in order to allow multiple URLs on the same line. Do the same thing with <<..>> and #..#. - - - - - df8feac9 by David Waern at 2010-04-08T00:57:33+00:00 Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. - - - - - 1ca6f84b by David Waern at 2010-04-08T01:03:06+00:00 Add ghc-prim to test suite deps - - - - - 27371e3a by Simon Hengel at 2010-04-08T19:26:34+00:00 Let parsing fails on paragraphs that are immediately followed by an example This is more consistent with the way we treat code blocks. - - - - - 83096e4a by David Waern at 2010-04-08T21:20:00+00:00 Improve function name - - - - - 439983ce by David Waern at 2010-04-10T10:46:14+00:00 Fix haskell/haddock#112 No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds. - - - - - 5c0d35d7 by David Waern at 2010-04-10T10:54:06+00:00 Rename startGhc into withGhc - - - - - dca081fa by Simon Hengel at 2010-04-12T19:09:16+00:00 Add documentation for interactive examples - - - - - c7f26bfa by David Waern at 2010-04-13T00:51:51+00:00 Slight fix to the documentation of examples - - - - - 06eb7c4c by David Waern at 2010-04-13T00:57:05+00:00 Rename Interactive Examples into Examples (and simplify explanation) - - - - - 264830cb by David Waern at 2010-05-10T20:07:27+00:00 Update CHANGES with info about 2.6.1 - - - - - 8e5d4514 by Simon Hengel at 2010-04-18T18:16:54+00:00 Add unit tests for parser - - - - - 68297f40 by David Waern at 2010-05-10T21:53:37+00:00 Improve testsuite README - - - - - f04eb6e4 by David Waern at 2010-05-11T19:14:31+00:00 Re-organise the testsuite structure - - - - - a360f710 by David Waern at 2010-05-11T19:18:03+00:00 Shorten function name - - - - - 1d5dd359 by David Waern at 2010-05-11T21:40:02+00:00 Update runtests.hs following testsuite re-organisation - - - - - ffebe217 by David Waern at 2010-05-11T21:40:10+00:00 Update runtests.hs to use base-4.2.0.1 - - - - - 635de402 by David Waern at 2010-05-11T21:41:11+00:00 Update runparsetests.hs following testsuite reorganisation - - - - - 72137910 by Ian Lynagh at 2010-05-06T20:43:06+00:00 Fix build - - - - - 1a80b76e by Ian Lynagh at 2010-05-06T22:25:29+00:00 Remove redundant import - - - - - 1031a80c by Simon Peyton Jones at 2010-05-07T13:21:09+00:00 Minor wibbles to HsBang stuff - - - - - dd8e7fe5 by Ian Lynagh at 2010-05-08T15:22:00+00:00 GHC build system: Follow "rm" variable changes - - - - - 7f5e6748 by David Waern at 2010-05-13T11:53:02+00:00 Fix build with GHC 6.12.2 - - - - - 7953d4d8 by David Waern at 2010-05-13T18:45:01+00:00 Fixes to comments only - - - - - 8ae8eb64 by David Waern at 2010-05-13T18:57:26+00:00 ModuleMap -> IfaceMap - - - - - 1c3eadc6 by David Waern at 2010-05-13T19:03:13+00:00 Fix whitespace style issues - - - - - e96783c0 by David Waern at 2010-05-13T19:08:53+00:00 Fix comment - - - - - c998a78b by David Waern at 2010-05-13T19:39:00+00:00 Position the module header the same way everywhere Silly, but nice with some consistency :-) - - - - - b48a714e by David Waern at 2010-05-13T19:41:32+00:00 Position of module header, this time in the HTML backends - - - - - f9bfb12e by David Waern at 2010-05-13T19:43:05+00:00 Two newlines between declarations in Main - - - - - 071d44c7 by David Waern at 2010-05-13T19:44:21+00:00 Newlines in Convert - - - - - 036346db by David Waern at 2010-05-13T19:46:47+00:00 Fix a few stylistic issues in H.InterfaceFile - - - - - f0b8379e by David Waern at 2010-05-13T19:47:53+00:00 Add newlines to H.ModuleTree - - - - - 27409f8e by David Waern at 2010-05-13T19:51:10+00:00 Fix stylistic issues in H.Utils - - - - - 24774a11 by David Waern at 2010-05-13T20:00:43+00:00 Structure H.Types better - - - - - 7b6f5e40 by David Waern at 2010-05-13T20:01:04+00:00 Remove bad Arbitrary instance - - - - - fac9f1f6 by David Waern at 2010-05-13T20:05:50+00:00 Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead - - - - - fe6d00c4 by David Waern at 2010-05-13T20:51:55+00:00 Export a couple of more types from the API - - - - - b2e33a5f by David Waern at 2010-05-13T21:27:51+00:00 Improve doc comment for Interface - - - - - c585f2ce by David Waern at 2010-05-13T21:30:14+00:00 Improve documentation of Haddock.Interface - - - - - e6791db2 by David Waern at 2010-05-13T22:07:35+00:00 Remove meaningless comments - - - - - 7801b390 by David Waern at 2010-05-14T17:53:33+00:00 Remove unused modules - - - - - f813e937 by David Waern at 2010-05-14T17:55:17+00:00 Re-direct compilation output to a temporary directory Also add a flag --no-tmp-comp-dir that can be used to get the old behaviour of writing compilation files to GHC's output directory (default "."). - - - - - e56737ec by David Waern at 2010-05-14T18:06:11+00:00 Wibble - - - - - e40b0447 by David Waern at 2010-05-14T19:01:52+00:00 Move flag evaluation code from Main to Haddock.Options Determining the value of "singular" flags (by e.g. taking the last occurrence of the flag) and other flag evaluation should done in Haddock.Options which is the module that is supposed to define the command line interface. This makes Main a bit easier on the eyes as well. - - - - - 27091f57 by David Waern at 2010-05-14T19:05:10+00:00 Wibble - - - - - c658cf61 by David Waern at 2010-05-14T19:06:49+00:00 Re-order things in Haddock.Options a bit - - - - - 8cfdd342 by David Waern at 2010-05-14T19:20:29+00:00 De-tabify Haddock.Options and fix other whitespace issues - - - - - 0df16b62 by David Waern at 2010-05-14T19:25:07+00:00 Improve comments - - - - - 80b38e2b by David Waern at 2010-05-14T19:26:42+00:00 Whitespace police - - - - - fe580255 by David Waern at 2010-05-14T19:31:23+00:00 Wibbles to comments - - - - - a2b43fad by David Waern at 2010-05-14T20:24:32+00:00 Move some more flag functions to Haddock.Options - - - - - 3f895547 by David Waern at 2010-05-14T20:37:12+00:00 Make renderStep a top-level function in Main - - - - - 5cdca11d by David Waern at 2010-05-14T20:39:27+00:00 Spelling in comment - - - - - ad98d14c by David Waern at 2010-05-14T20:40:26+00:00 Comment fixes - - - - - 0bb9218f by David Waern at 2010-05-14T20:49:01+00:00 Whitespace police - - - - - 0f0a533f by David Waern at 2010-05-15T16:42:29+00:00 Improve description of --dump-interface - - - - - 5b2833ac by David Waern at 2010-05-15T17:16:53+00:00 Document --no-tmp-comp-dir - - - - - 8160b170 by David Waern at 2010-05-15T17:18:59+00:00 Wibble - - - - - 570dbe33 by David Waern at 2010-05-18T21:15:38+00:00 HLint police - - - - - 204e425f by David Waern at 2010-05-18T21:16:30+00:00 HLint police - - - - - 6db657ac by David Waern at 2010-05-18T21:16:37+00:00 Wibble - - - - - b942ccd7 by Simon Marlow at 2010-06-02T08:27:30+00:00 Interrupted disappeared in GHC 6.13 (GHC ticket haskell/haddock#4100) - - - - - 3b94a819 by Simon Marlow at 2010-06-02T08:45:08+00:00 Allow base-4.3 - - - - - c5a1fb7c by Simon Marlow at 2010-06-02T09:03:04+00:00 Fix compilation with GHC 6.13 - - - - - 6181296c by David Waern at 2010-06-08T21:09:05+00:00 Display name of prologue file when parsing it fails - - - - - 7cbc6f60 by Ian Lynagh at 2010-06-13T16:20:25+00:00 Remove redundant imports - - - - - 980c804b by Simon Marlow at 2010-06-22T08:41:50+00:00 isLocalAndTypeInferenced: fix for local module names overlapping package modules - - - - - d74d4a12 by Simon Marlow at 2010-06-23T12:03:27+00:00 Unresolved identifiers in Doc get replaced with DocMonospaced rather than plain strings - - - - - d8546783 by Simon Marlow at 2010-06-30T12:45:17+00:00 LaTeX backend (new options: --latex, --latex-style=<style>) - - - - - 437afa9e by David Waern at 2010-07-01T12:02:44+00:00 Fix a few stylistic whitespace issues in LaTeX backend - - - - - 85bc1fae by David Waern at 2010-07-01T15:42:45+00:00 Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this) - - - - - 7d2eb86f by David Waern at 2010-07-01T15:43:33+00:00 Update test following Simon's patch to render unresolved names in monospaced font - - - - - 08fcbcd2 by David Waern at 2010-07-01T16:12:18+00:00 Warning police - - - - - d04a8d7a by David Waern at 2010-07-04T14:53:39+00:00 Fix a bug in attachInstances We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however. - - - - - d10344eb by Simon Hengel at 2010-07-10T09:19:04+00:00 Add missing dependencies to cabal file - - - - - 24090531 by Mark Lentczner at 2010-03-21T04:51:16+00:00 add exports to Xhtml modules - - - - - 84f9a333 by Mark Lentczner at 2010-04-03T19:14:22+00:00 clean up Doc formatting code - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up <pre> sections - - - - - bebccf52 by Mark Lentczner at 2010-04-04T04:51:08+00:00 tweak list css - - - - - 0c2aeb5e by Mark Lentczner at 2010-04-04T06:24:14+00:00 all decls now generate Html not HtmlTable - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code - - - - - dbf73e6e by Mark Lentczner at 2010-04-05T05:02:43+00:00 clean up processExport and place a div around each decl - - - - - e25b7e9f by Mark Lentczner at 2010-04-10T21:23:21+00:00 data decls are now a sequence of paragraphs, not a table - - - - - 89ee0294 by Mark Lentczner at 2010-04-10T21:29:16+00:00 removed commented out code that can't be maintained - - - - - d466f536 by Mark Lentczner at 2010-04-12T04:56:27+00:00 removed declWithDoc and cleaned up data decls in summary - - - - - ed755832 by Mark Lentczner at 2010-04-12T05:07:53+00:00 merge in markupExample changes - - - - - c36f51fd by Mark Lentczner at 2010-04-25T04:56:37+00:00 made record fields be an unordList, not a table - - - - - ed3a28d6 by Mark Lentczner at 2010-04-25T05:23:28+00:00 fixed surround of instance and constructor tables - - - - - 0e35bbc4 by Mark Lentczner at 2010-04-25T05:36:59+00:00 fix class member boxes in summary - - - - - 5041749b by Mark Lentczner at 2010-04-25T05:38:35+00:00 remove unused bodyBox - - - - - e91724db by Mark Lentczner at 2010-04-25T06:26:10+00:00 fixed javascript quoting/escpaing issue - - - - - f4abbb73 by Mark Lentczner at 2010-05-03T23:04:31+00:00 adjust css for current markup - - - - - e75fec4c by Mark Lentczner at 2010-05-04T06:14:34+00:00 added assoicated types and methods back into class decls - - - - - 84169323 by Mark Lentczner at 2010-05-24T13:13:42+00:00 merge in changes from the big-whitespace cleanup - - - - - 3c1c872e by Mark Lentczner at 2010-06-11T21:03:58+00:00 adjust synopsis and bottom bar spacing - - - - - 3c1f9ef7 by Mark Lentczner at 2010-06-11T21:14:44+00:00 fix missing space in "module" lines in synoposis - - - - - 9a137e6d by Mark Lentczner at 2010-06-11T21:34:08+00:00 changed tt elements to code elements - - - - - 50f71ef1 by Mark Lentczner at 2010-06-11T23:27:46+00:00 factored out ppInstances - - - - - 3b9a9de5 by Mark Lentczner at 2010-06-17T17:36:01+00:00 push single constructors (newtype) onto line with decl - - - - - e0f8f2ec by Mark Lentczner at 2010-06-17T22:20:56+00:00 remove <++> connector - - - - - 56c075dd by Mark Lentczner at 2010-07-13T05:26:21+00:00 change to new page structure - - - - - 04be6ca7 by Mark Lentczner at 2010-07-14T04:21:55+00:00 constructors and args as dl lists, built in Layout.hs - - - - - 65aeafc2 by Mark Lentczner at 2010-07-14T05:38:32+00:00 better interface to subDecls - - - - - 72032189 by Mark Lentczner at 2010-07-14T07:04:10+00:00 made subDecl tables looks just so - - - - - b782eca2 by Mark Lentczner at 2010-07-14T16:00:54+00:00 convert args to SubDecl format - - - - - cc75e98f by Mark Lentczner at 2010-07-14T16:28:53+00:00 convert instances to SubDecl - - - - - 34e2aa5a by Mark Lentczner at 2010-07-14T21:07:32+00:00 removing old table cruft from Layout.hs - - - - - d5810d95 by Mark Lentczner at 2010-07-14T21:54:58+00:00 methods and associated types in new layout scheme - - - - - 65ef9579 by Mark Lentczner at 2010-07-14T23:43:42+00:00 clean up synopsis lists - - - - - e523318f by Mark Lentczner at 2010-07-15T05:02:26+00:00 clean up of anchors - - - - - 1215dfc5 by Mark Lentczner at 2010-07-15T23:53:01+00:00 added two new themes and rough css switcher - - - - - 7f0fd36f by Mark Lentczner at 2010-07-16T04:57:38+00:00 fixed package catpion, added style menu - - - - - 0dd4999c by Mark Lentczner at 2010-07-16T20:12:39+00:00 new output for mini_ pages - - - - - 64b2810b by Mark Lentczner at 2010-07-16T20:58:41+00:00 reformat index-frames - - - - - 3173f555 by Mark Lentczner at 2010-07-16T22:41:53+00:00 convert index to new markup - - - - - b0a4b7c9 by Mark Lentczner at 2010-07-17T04:07:22+00:00 convert index.html to new markup, adjust module markup - - - - - 8261ae1e by Mark Lentczner at 2010-07-17T05:07:29+00:00 classing styling of ancillary pages - - - - - 2a4fb025 by Mark Lentczner at 2010-07-17T05:11:45+00:00 clean up Layout.hs: no more vanillaTable - - - - - 87eec685 by Mark Lentczner at 2010-07-17T05:35:16+00:00 clean up Util.hs - - - - - d304e9b0 by Mark Lentczner at 2010-07-17T05:38:50+00:00 qualify import of XHtml as XHtml - - - - - 7dc05807 by Mark Lentczner at 2010-07-17T06:17:53+00:00 factored out head element generation - - - - - 9cdaec9e by Mark Lentczner at 2010-07-17T06:44:54+00:00 refactored out main page body generation - - - - - 8a51019e by Mark Lentczner at 2010-07-17T06:48:20+00:00 moved footer into only place that used it - - - - - efa479da by Mark Lentczner at 2010-07-17T18:48:30+00:00 styling auxillary pages for tibbe and snappy themes - - - - - 81de5509 by Mark Lentczner at 2010-07-18T04:41:38+00:00 fixed alphabet on index page, and styling of it and packages in module lists - - - - - 20718c1a by Mark Lentczner at 2010-07-18T05:34:29+00:00 cleaned up div functions in Layout.hs - - - - - 60d50453 by Mark Lentczner at 2010-07-18T05:48:39+00:00 added content div to main pages - - - - - ed16561c by Mark Lentczner at 2010-07-18T06:12:22+00:00 add .doc class to documentation blocks - - - - - f5c781b0 by Mark Lentczner at 2010-07-19T05:20:53+00:00 refactoring of anchor ID and fragment handling - - - - - a69a93bf by Mark Lentczner at 2010-07-19T05:35:55+00:00 remove an explicit bold tag - replace with .def class - - - - - d76c7225 by Mark Lentczner at 2010-07-19T06:56:15+00:00 rename Haddock.Backends.Xhtml.Util to Utils - - - - - 5a58c0da by David Waern at 2010-07-21T13:30:54+00:00 Remove trailing whitespace in Haddock.Backends.Xhtml - - - - - 0652aa17 by David Waern at 2010-07-21T13:33:21+00:00 Align a few comments - - - - - 785776c3 by David Waern at 2010-07-21T13:39:04+00:00 Remove trailing whitespace in H.B.X.Decl - - - - - 71a30710 by David Waern at 2010-07-21T13:44:27+00:00 Remove more trailing whitespace - - - - - 38750394 by David Waern at 2010-07-21T13:50:43+00:00 Style police - - - - - 3023d940 by David Waern at 2010-07-21T14:01:22+00:00 Style police in H.B.X.Decl - - - - - df16e9e6 by David Waern at 2010-07-21T14:14:45+00:00 Style police in H.B.X.DocMarkup - - - - - 6020e321 by David Waern at 2010-07-21T14:17:32+00:00 More style police - - - - - 86ad8bf5 by David Waern at 2010-07-21T14:21:02+00:00 Style police in H.B.Xhtml - - - - - aea27d03 by David Waern at 2010-07-21T14:42:03+00:00 Fix warnings in LaTeX backend - - - - - 2aff34a9 by David Waern at 2010-07-21T14:50:46+00:00 Style police in LaTeX backend (mainly more newlines) - - - - - e517162d by David Waern at 2010-07-21T15:05:47+00:00 Doc sections in Main - - - - - b971aa0c by David Waern at 2010-07-21T15:06:17+00:00 Trailing whitespace in Documentation.Haddock - - - - - f11628fb by David Waern at 2010-07-21T15:07:06+00:00 Trailing whitespace in Haddock.Convert - - - - - cbaf284c by David Waern at 2010-07-21T15:08:11+00:00 Style police in Haddock.GhcUtils - - - - - 71feb77b by David Waern at 2010-07-21T15:09:06+00:00 Style police in Haddock.InterfaceFile - - - - - 0a9c80e6 by David Waern at 2010-07-21T15:11:33+00:00 Whitespace police - - - - - 6168376c by David Waern at 2010-07-21T15:16:35+00:00 Style police in Haddock.Utils - - - - - 9fe4dd90 by David Waern at 2010-07-21T15:19:31+00:00 Add -fwarn-tabs - - - - - a000d752 by Mark Lentczner at 2010-07-20T17:25:52+00:00 move CSS Theme functions into Themes.hs - - - - - b52b440f by Mark Lentczner at 2010-07-20T17:29:35+00:00 add Thomas Schilling's theme - - - - - e43fa7e8 by Mark Lentczner at 2010-07-21T04:49:34+00:00 correct icon used with Snappy theme - - - - - ba5092d3 by Mark Lentczner at 2010-07-21T04:56:47+00:00 apply Tibbe's updates to his theme - - - - - 7804eef6 by Mark Lentczner at 2010-07-21T05:15:49+00:00 space between "Style" and the downward triangle - - - - - 7131d4c6 by Mark Lentczner at 2010-07-21T17:43:35+00:00 merge with David's source cleanups - - - - - ee65f1cb by David Waern at 2010-07-22T16:50:46+00:00 Fix a bug where we allowed --hoogle, --latex, etc without input files - - - - - e413ff7a by David Waern at 2010-07-22T17:21:58+00:00 Improve function name - - - - - a0fd14f3 by Simon Marlow at 2010-06-30T15:34:32+00:00 fix warnings - - - - - 31f73d2a by David Waern at 2010-07-22T19:29:41+00:00 Solve conflicts - - - - - d563b4a5 by Simon Marlow at 2010-06-30T15:34:37+00:00 fix warning - - - - - 412b6469 by David Waern at 2010-07-22T19:31:28+00:00 Solve conflict - - - - - 35174b94 by Ian Lynagh at 2010-07-06T17:27:16+00:00 Follow mkPState argument order change - - - - - b5c3585c by Simon Marlow at 2010-07-14T08:49:21+00:00 common up code for instance rendering - - - - - d8009560 by Simon Marlow at 2010-07-14T12:37:11+00:00 fix warnings - - - - - a6d88695 by David Waern at 2010-07-24T15:33:33+00:00 Fix build with ghc < 6.13 - - - - - 94cf9de1 by David Waern at 2010-07-24T15:34:37+00:00 Remove conflict left-over - - - - - 313b15c0 by Mark Lentczner at 2010-07-21T22:09:04+00:00 reorganization of nhaddock.css with tibbe - - - - - 9defed80 by Mark Lentczner at 2010-07-21T22:42:14+00:00 further cleanup of nhaddock.css, float TOC, support aux. pages - - - - - 6d944c1b by Mark Lentczner at 2010-07-22T06:22:23+00:00 remove old HTML backend - - - - - b3e8cba5 by Mark Lentczner at 2010-07-22T06:43:32+00:00 remove --html-help support - it was old, out-of-date, and mostly missing - - - - - d2654a08 by Mark Lentczner at 2010-07-22T21:45:34+00:00 tweaks to nhaddock.css - - - - - f73b285c by Mark Lentczner at 2010-07-23T06:19:35+00:00 command like processing for theme selection The bulk of the change is threadnig the selected theme set through functions in Xhtml.hs so that the selected themes can be used when generating the page output. There isn't much going on in most of these changes, just passing it along. The real work is all done in Themes.hs. - - - - - 8bddc90d by Mark Lentczner at 2010-07-23T06:58:31+00:00 drop --themes support, add named theme support decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. - - - - - 20cafd4f by Mark Lentczner at 2010-07-23T17:44:29+00:00 rename --default-themes to --built-in-themes - - - - - 0fe41307 by Mark Lentczner at 2010-07-23T18:33:02+00:00 tweaks to theme for info table, headings, and tables - - - - - cba4fee0 by Mark Lentczner at 2010-07-23T19:13:59+00:00 tweaks for dl layout, though still not used - - - - - 463fa294 by Mark Lentczner at 2010-07-23T21:07:19+00:00 tweak look of mini pages, keywords, and preblocks - - - - - 5472fc02 by Mark Lentczner at 2010-07-24T05:36:15+00:00 slide out Synopsis drawer - - - - - 9d5d5de5 by Mark Lentczner at 2010-07-24T06:02:42+00:00 extend package header and footer to edges of page - - - - - a47c91a2 by Mark Lentczner at 2010-07-24T06:28:44+00:00 fields are def lists, tweak css for style menu, mini pages, arguments - - - - - ca20f23b by Mark Lentczner at 2010-07-24T16:55:22+00:00 excisting last vestiges of the --xhtml flag - - - - - 71fb012e by Mark Lentczner at 2010-07-25T18:47:49+00:00 change how collapsing sections are done make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags - - - - - c168c8d3 by Mark Lentczner at 2010-07-26T00:32:05+00:00 reorganize files in the html lib data dir - - - - - 93324301 by Mark Lentczner at 2010-07-26T01:27:42+00:00 cleaned up Themes.hs - - - - - ad3b5dd4 by Mark Lentczner at 2010-07-26T02:39:15+00:00 make module list use new collapsers - - - - - 1df9bfc6 by Mark Lentczner at 2010-07-27T19:09:25+00:00 remove Tibbe theme - - - - - 8b9b01b3 by Mark Lentczner at 2010-07-27T20:04:03+00:00 move themes into html dir with .theme and .std-theme extensions - - - - - a7beb965 by Mark Lentczner at 2010-07-27T21:06:34+00:00 give a class to empty dd elements so they can be hidden - - - - - a258c117 by Mark Lentczner at 2010-07-27T21:23:58+00:00 remove custom version of copyFile in Xhtml.hs - - - - - b70dba6e by Mark Lentczner at 2010-07-27T22:12:45+00:00 apply margin changes to pre and headings as per group decision, and small cleanups - - - - - e6f722a2 by Mark Lentczner at 2010-07-28T00:03:12+00:00 make info block and package bar links be floatable by placing them first in the dom tree - - - - - c8278867 by Mark Lentczner at 2010-07-28T19:01:18+00:00 styling source links on declarations - - - - - 88fdc399 by Mark Lentczner at 2010-07-29T01:12:46+00:00 styling tweaks don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers - - - - - 8a75b213 by Ian Lynagh at 2010-07-30T20:21:46+00:00 Fix build in GHC tree - - - - - ce8e18b3 by Simon Hengel at 2010-08-03T18:37:26+00:00 Adapt paths to data files in cabal file - - - - - 9701a455 by Simon Hengel at 2010-08-07T13:20:27+00:00 Add missing dependency to cabal file - - - - - 01b838d1 by Mark Lentczner at 2010-07-30T20:19:40+00:00 improved synopsis drawer: on click, not hover - - - - - 7b6f3e59 by Mark Lentczner at 2010-07-30T23:38:55+00:00 put the synopsis back in the other themes - - - - - 7b2904c9 by Mark Lentczner at 2010-08-11T11:11:26+00:00 close arrows on expanded synopsis drawer - - - - - ea19e177 by Mark Lentczner at 2010-08-12T21:16:45+00:00 width and font changes removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent - - - - - 5ced00c0 by Mark Lentczner at 2010-08-13T15:09:55+00:00 implemented YUI's CSS font approach - - - - - 2799c548 by Mark Lentczner at 2010-08-13T15:11:59+00:00 adjusted margin to 2em, 1 wasn't enough - - - - - 58f06893 by Mark Lentczner at 2010-08-13T15:48:44+00:00 removed underlining on hover for named anchors headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute - - - - - 7aced4c4 by Mark Lentczner at 2010-08-13T15:50:22+00:00 more space between elements - - - - - 5a3c1cce by Mark Lentczner at 2010-08-13T16:43:43+00:00 adjusted font sizes of auxilary pages per new scheme - - - - - 487539ef by Mark Lentczner at 2010-08-13T21:43:41+00:00 add Frames button and clean up frames.html - - - - - c1a140b6 by Mark Lentczner at 2010-08-13T22:17:48+00:00 move frames button to js - - - - - b0bdb68e by Mark Lentczner at 2010-08-14T03:44:46+00:00 build style menu in javascript moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page - - - - - 43ab7120 by Mark Lentczner at 2010-08-16T15:15:37+00:00 font size and margin tweaks - - - - - c0b68652 by Mark Lentczner at 2010-08-17T18:19:52+00:00 clean up collapser logics javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS - - - - - 5d573427 by Mark Lentczner at 2010-08-17T23:06:02+00:00 don't collapse entries in module list when clicking on links - - - - - 8c307c4a by Mark Lentczner at 2010-08-17T23:21:43+00:00 add missing data file to .cabal - - - - - 414bcfcf by Mark Lentczner at 2010-08-17T23:28:47+00:00 remove synopsis when in frames - - - - - ba0fa98a by Mark Lentczner at 2010-08-18T16:16:11+00:00 layout tweeks - mini page font size, toc color, etc. - - - - - 63c1bed1 by Mark Lentczner at 2010-08-18T19:50:02+00:00 margin fiddling - - - - - c311c094 by Mark Lentczner at 2010-08-20T01:37:55+00:00 better synopsis handling logic - no flashing - - - - - f1fe5fa8 by Mark Lentczner at 2010-08-20T01:41:06+00:00 fix small layout issues mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers - - - - - 0de84d77 by Mark Lentczner at 2010-08-20T02:13:09+00:00 made style changing and cookies storage robust - - - - - 1ef064f9 by Thomas Schilling at 2010-08-04T13:12:22+00:00 Make synopsis frame behave properly in Firefox. In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. - - - - - dd1c9a94 by Mark Lentczner at 2010-08-21T01:46:19+00:00 remove Snappy theme - - - - - 2353a90d by Mark Lentczner at 2010-08-25T05:16:19+00:00 fix occasional v.scroll bars on pre blocks (I think) - - - - - 459b8bf1 by Simon Hengel at 2010-08-08T10:12:45+00:00 Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API - - - - - b1b68675 by David Waern at 2010-08-26T20:31:58+00:00 Follow recent API additions with some refactorings Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. - - - - - 264d4d67 by David Waern at 2010-08-26T21:40:59+00:00 Get rid of GhcModule and related cruft We can get everything we need directly from TypecheckedModule. - - - - - 0feacec2 by Mark Lentczner at 2010-08-26T23:44:13+00:00 fixed CSS for ordered lists and def lists in doc blocks - - - - - 2997e0c2 by Mark Lentczner at 2010-08-26T23:45:03+00:00 support both kinds of enumerated lists in doc markup The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported - - - - - 5d4ddeec by Mark Lentczner at 2010-08-27T21:29:48+00:00 fix broken header link margins - - - - - 614456ba by Mark Lentczner at 2010-08-27T22:16:19+00:00 fix table of contents CSS - - - - - 03f329a2 by David Waern at 2010-08-28T16:36:09+00:00 Update tests following switch to the Xhtml backend - - - - - ca689fa2 by Mark Lentczner at 2010-08-28T18:25:16+00:00 fix def lists - - - - - 18e1d3d2 by Mark Lentczner at 2010-08-28T18:26:18+00:00 push footer to bottom of window - - - - - b0ab8d82 by David Waern at 2010-08-28T22:04:32+00:00 Whitespace police - - - - - 2d217977 by David Waern at 2010-08-29T12:44:45+00:00 Remove Snappy data files - - - - - 01e27d5f by David Waern at 2010-08-29T13:03:28+00:00 Add source entity path to --read-interface You can now use this flag like this: --read-interface=<html path>,<source entity path>,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. - - - - - 20bf4aaa by David Waern at 2010-08-29T13:11:03+00:00 Naming wibbles - - - - - ad22463f by Mark Lentczner at 2010-08-29T15:14:54+00:00 make portability block be a table - solves layout issues - - - - - 97bd1ae6 by Mark Lentczner at 2010-08-29T15:17:42+00:00 update golden test for Test due to portability box change - - - - - d37e139e by Mark Lentczner at 2010-08-29T17:07:17+00:00 move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs - - - - - acf52501 by David Waern at 2010-08-29T17:32:36+00:00 Allow building with ghc < 6.16 - - - - - 1cb34ed8 by Ian Lynagh at 2010-07-24T23:18:49+00:00 Flatten the dynflags before parsing - - - - - b36845b4 by Ian Lynagh at 2010-07-24T23:26:49+00:00 Follow flattenLanguageFlags -> flattenExtensionFlags rename - - - - - 7f7fcc7e by David Waern at 2010-08-29T17:46:23+00:00 Use flattenExtensionFlags with ghc >= 6.13 only - - - - - 13cf9411 by Ian Lynagh at 2010-08-01T18:09:54+00:00 Make the main haddock script versioned, and make plain "haddock" a symlink - - - - - 495cbff2 by Ian Lynagh at 2010-08-18T18:57:24+00:00 Fix installation in the GHC build system Data-files are now in subdirectories, so we need to handle that - - - - - 88ebab0a by Ian Lynagh at 2010-08-18T19:43:53+00:00 GHC build system: Add all the data files to BINDIST_EXTRAS - - - - - 65837172 by David Waern at 2010-08-29T20:12:34+00:00 Update Test - - - - - 094bbaa2 by David Waern at 2010-08-29T20:55:14+00:00 Revert update to Test - - - - - a881cfb3 by David Waern at 2010-08-31T18:24:15+00:00 Bump version number - - - - - 1fc8a3eb by David Waern at 2010-08-31T22:32:27+00:00 Update ANNOUNCE - - - - - ee1df9d0 by David Waern at 2010-08-31T22:33:11+00:00 Update CHANGES - - - - - 394cc854 by David Waern at 2010-08-31T22:33:23+00:00 Update interface file versioning to work with ghc 6.14/15 - - - - - 7d03b79b by David Waern at 2010-08-31T22:36:00+00:00 Update test output following version change - - - - - a48d82d1 by Mark Lentczner at 2010-09-01T04:29:35+00:00 sort options in doc to match --help output removed --html-help option, as it is no longer supported - - - - - 06561aeb by Mark Lentczner at 2010-09-01T05:29:32+00:00 update options documentation rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents - - - - - 57dea832 by Mark Lentczner at 2010-09-01T05:31:27+00:00 slight wording change about Frames mode - - - - - fa1f6da3 by David Waern at 2010-09-01T10:57:44+00:00 Update doc configure script to find docbook stylesheets on arch linux - - - - - addff770 by David Waern at 2010-09-01T11:02:29+00:00 Wibble - - - - - 8399006d by David Waern at 2010-09-01T11:19:21+00:00 Replace ghci> with >>> in example syntax - - - - - 35074cf8 by David Waern at 2010-09-01T19:03:27+00:00 Improve docs for --no-tmp-comp-dir - - - - - 0f8f8cfd by David Waern at 2010-09-02T11:22:27+00:00 Add a list of contributors to the user guide Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. - - - - - 42ccf099 by David Waern at 2010-09-02T11:29:22+00:00 Update copyright years in license - - - - - 0d560479 by David Waern at 2010-09-02T11:38:52+00:00 Update release instructions - - - - - 72ab7796 by David Waern at 2010-09-02T19:27:08+00:00 Add a note to ANNOUNCE - - - - - bf9d9c5d by David Waern at 2010-09-02T19:27:48+00:00 H.Utils needs FFI on Win+MinGW - - - - - 048ae44a by Mark Lentczner at 2010-09-04T23:19:47+00:00 make TOC group header identifiers validate - - - - - 8c6faf36 by Simon Michael at 2010-09-22T07:12:34+00:00 add hints for cleaner darcs show authors output - - - - - 9909bd17 by Simon Michael at 2010-09-22T17:58:06+00:00 print haddock coverage info on stdout when generating docs A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability. - - - - - 6da72171 by David Waern at 2010-10-03T21:31:24+00:00 Style wibble - - - - - 2f8d8e4d by Tobias Brandt at 2010-08-27T07:01:21+00:00 adding the option to fully qualify identifiers - - - - - 833be6c6 by Tobias Brandt at 2010-08-27T15:50:28+00:00 adding support for local and relative name qualification - - - - - df15c4e9 by Tobias Brandt at 2010-08-27T15:56:37+00:00 corrected qualification help message - - - - - 449e9ce1 by David Waern at 2010-10-16T17:34:30+00:00 Solve conflicts - - - - - 3469bda5 by David Waern at 2010-10-16T18:42:40+00:00 Use "qual" as an abbreviation for qualification instead of "quali" for consistency - - - - - 97c2d728 by David Waern at 2010-10-16T18:47:07+00:00 Style police - - - - - ce14fbea by David Waern at 2010-10-16T21:15:25+00:00 Style police - - - - - fdf29e9d by David Waern at 2010-10-17T00:30:44+00:00 Add a pointer to the style guide - - - - - 8e6b44e8 by rrnewton at 2010-10-24T03:19:28+00:00 Change to index pages: include an 'All' option even when subdividing A-Z. - - - - - 755b131c by David Waern at 2010-11-14T19:39:36+00:00 Bump version - - - - - d0345a04 by David Waern at 2010-11-14T19:41:59+00:00 TAG 2.8.1 - - - - - f6221508 by Simon Peyton Jones at 2010-09-13T09:53:00+00:00 Adapt to minor changes in internal GHC functions - - - - - 1290713d by Ian Lynagh at 2010-09-15T10:37:18+00:00 Remove duplicate Outputable instance for Data.Map.Map - - - - - 87f69eef by Ian Lynagh at 2010-09-21T15:01:10+00:00 Bump GHC dep upper bound - - - - - af36e087 by Ian Lynagh at 2010-09-21T15:12:02+00:00 Fix up __GLASGOW_HASKELL__ tests - - - - - ad67716c by Ian Lynagh at 2010-09-21T20:31:35+00:00 Don't build haddock is HADDOCK_DOCS is NO - - - - - 63b3f1f5 by Ian Lynagh at 2010-09-21T21:39:51+00:00 Fixes for when HADDOCK_DOCS=NO - - - - - e92bfa42 by Ian Lynagh at 2010-09-29T21:15:38+00:00 Fix URL creation on Windows: Use / not \ in URLs. Fixes haskell/haddock#4353 - - - - - 66c55e05 by Ian Lynagh at 2010-09-30T17:03:34+00:00 Tidy up haddock symlink installation In particular, it now doesn't get created if we aren't installing haddock. - - - - - 549b5556 by Ian Lynagh at 2010-10-23T21:17:14+00:00 Follow extension-flattening change in GHC - - - - - d7c2f72b by David Waern at 2010-11-14T20:17:55+00:00 Bump version to 2.8.2 - - - - - 6989a3a9 by David Waern at 2010-11-14T20:26:01+00:00 Solve conflict - - - - - 055c6910 by Ian Lynagh at 2010-09-22T15:36:20+00:00 Bump GHC dep - - - - - c96c0763 by Simon Marlow at 2010-10-27T11:09:44+00:00 follow changes in the GHC API - - - - - 45907129 by David Waern at 2010-11-07T14:00:58+00:00 Update the HCAR entry - - - - - 61940b95 by David Waern at 2010-11-07T14:07:34+00:00 Make the HCAR entry smaller - - - - - aa590b7d by David Waern at 2010-11-14T21:30:59+00:00 Update HCAR entry with November 2010 version - - - - - 587f9847 by David Waern at 2010-11-14T23:48:17+00:00 Require ghc >= 7.0 - - - - - ff5c647c by David Waern at 2010-11-14T23:49:09+00:00 TAG 2.8.2 - - - - - 937fcb4f by David Waern at 2010-11-14T23:49:45+00:00 Solve conflict - - - - - 8e5d0c1a by David Waern at 2010-11-15T21:09:50+00:00 Remove code for ghc < 7 - - - - - 3d47b70a by David Waern at 2010-11-15T21:11:06+00:00 Fix bad merge - - - - - 7f4a0d8a by David Waern at 2010-11-15T21:13:57+00:00 Remove more ghc < 7 code - - - - - 9ee34b50 by David Waern at 2010-11-15T21:31:25+00:00 Match all AsyncExceptions in exception handler - - - - - 42849c70 by David Waern at 2010-11-15T21:35:31+00:00 Just say "internal error" instead of "internal Haddock or GHC error" - - - - - c88c809b by David Waern at 2010-11-15T21:44:19+00:00 Remove docNameOcc under the motto "don't name compositions" - - - - - b798fc7c by David Waern at 2010-11-15T23:27:13+00:00 Wibble - - - - - 2228197e by David Waern at 2010-11-15T23:28:24+00:00 Rename the HCAR entry file - - - - - 8a3f9090 by David Waern at 2010-11-16T00:05:29+00:00 Remove Haskell 2010 extensions from .cabal file - - - - - c7a0c597 by David Waern at 2010-11-16T00:10:28+00:00 Style wibbles - - - - - cde707a5 by David Waern at 2010-11-16T00:12:00+00:00 Remove LANGUAGE ForeignFunctionInterface pragmas - - - - - 1dbda8ed by David Waern at 2010-11-16T00:17:21+00:00 Make a little more use of DoAndIfThenElse - - - - - 4c45ff6e by David Waern at 2010-11-16T00:59:41+00:00 hlint police - - - - - d2feaf09 by David Waern at 2010-11-16T01:14:15+00:00 hlint police - - - - - 99876e97 by David Waern at 2010-11-20T19:06:00+00:00 Haddock documentation updates - - - - - 65ce6987 by David Waern at 2010-11-20T19:42:51+00:00 Follow the style guide closer in Haddock.Types and improve docs - - - - - 28ca304a by tob.brandt at 2010-11-20T17:04:40+00:00 add full qualification for undocumented names - - - - - d61341e3 by David Waern at 2010-11-20T20:04:15+00:00 Re-structure qualification code a little - - - - - 0057e4d6 by David Waern at 2010-11-20T20:07:55+00:00 Re-order functions - - - - - d7279afd by David Waern at 2010-11-21T03:39:54+00:00 Add BangPatterns to alex and happy source files - - - - - 629fe60e by tob.brandt at 2010-11-23T23:35:11+00:00 documentation for qualification - - - - - 37031cee by David Waern at 2010-11-23T21:06:44+00:00 Update CHANGES - don't mention 2.8.2, we won't release it - - - - - f2489e19 by David Waern at 2010-12-01T21:57:11+00:00 Update deps of runtests.hs to work with ghc 7.0.1 - - - - - d3657e9a by David Waern at 2010-12-01T22:04:57+00:00 Make tests compile with ghc 7.0.1 - - - - - a2f09d9b by David Waern at 2010-12-01T22:06:59+00:00 Update tests following version bump - - - - - 50883ebb by David Waern at 2010-12-06T14:09:18+00:00 Update tests following recent changes - - - - - fc2fadeb by David Waern at 2010-12-06T14:17:29+00:00 Add a flag --pretty-html for rendering indented html with newlines - - - - - 30832ef2 by David Waern at 2010-12-06T14:17:35+00:00 Use --pretty-html when running the test suite. Makes it easier to compare output - - - - - a0b81b31 by David Waern at 2010-12-06T14:18:27+00:00 Wibble - - - - - 3aaa23fe by David Waern at 2010-12-06T14:19:29+00:00 Haddockify ppHtml comments - - - - - 24bb24f0 by David Waern at 2010-12-06T14:23:15+00:00 Remove --debug. It was't used, and --verbosity should take its place - - - - - 6bc076e5 by David Waern at 2010-12-06T14:25:37+00:00 Rename golden-tests into html-tests. "golden tests" sounds strange - - - - - 53301e55 by David Waern at 2010-12-06T14:26:26+00:00 QUALI -> QUAL in the description --qual for consistency - - - - - 98b6affb by David Waern at 2010-12-06T21:54:02+00:00 Bump version - - - - - 371bf1b3 by David Waern at 2010-12-06T22:08:55+00:00 Update tests following version bump - - - - - 25be762d by David Waern at 2010-12-06T22:21:03+00:00 Update CHANGES - - - - - 7c7dac71 by David Waern at 2010-12-06T22:33:43+00:00 Update ANNOUNCE - - - - - 30d7a5f2 by Simon Peyton Jones at 2010-11-15T08:38:38+00:00 Alex generates BangPatterns, so make Lex.x accept them (It'd be better for Alex to generate this pragma.) - - - - - 605e8018 by Simon Marlow at 2010-11-17T11:37:24+00:00 Add {-# LANGUAGE BangPatterns #-} to mollify GHC - - - - - a46607ba by David Waern at 2010-12-07T14:08:10+00:00 Solve conflicts - - - - - b28cda66 by David Waern at 2010-12-09T20:41:35+00:00 Docs: Mention that \ is a special character in markup - - - - - a435bfdd by Ian Lynagh at 2010-11-17T14:01:19+00:00 TAG GHC 7.0.1 release - - - - - 5a15a05a by David Waern at 2010-12-11T17:51:19+00:00 Fix indentation problem - - - - - 4232289a by Lennart Kolmodin at 2010-12-17T18:32:03+00:00 Revise haddock.cabal given that we now require ghc-7 default-language should be Haskell2010, slight new semantics for extensions. Rewrite into clearer dependencies of base and Cabal. - - - - - a36302dc by David Waern at 2010-12-19T17:12:37+00:00 Update CHANGES - - - - - 7c8b85b3 by David Waern at 2010-12-19T17:14:24+00:00 Bump version - - - - - cff22813 by Ian Lynagh at 2011-01-05T18:24:27+00:00 Write hoogle output in utf8; fixes GHC build on Windows - - - - - c7e762ea by David Waern at 2011-01-22T00:00:35+00:00 Put title outside doc div when HTML:fying title+prologue Avoids indenting the title, and makes more sense since the title is not a doc string anyway. - - - - - 5f639054 by David Waern at 2011-01-22T16:09:44+00:00 Fix spelling error - contributed by Marco Silva - - - - - c11dce78 by Ian Lynagh at 2011-01-07T02:33:11+00:00 Follow GHC build system changes - - - - - 101cfaf5 by David Waern at 2011-01-08T14:06:44+00:00 Bump version - - - - - af62348b by David Waern at 2011-01-08T14:07:07+00:00 TAG 2.9.2 - - - - - 4d1f6461 by Ian Lynagh at 2011-01-07T23:06:57+00:00 Name the haddock script haddock-ghc-7.0.2 instead of haddock-7.0.2; haskell/haddock#4882 "7.0.2" looked like a haddock version number before - - - - - 8ee4d5d3 by Simon Peyton Jones at 2011-01-10T17:31:12+00:00 Update Haddock to reflect change in hs_tyclds field of HsGroup - - - - - 06f3e3db by Ian Lynagh at 2011-03-03T15:02:37+00:00 TAG GHC 7.0.2 release - - - - - 7de0667d by David Waern at 2011-03-10T22:47:13+00:00 Update CHANGES - - - - - 33a9f1c8 by David Waern at 2011-03-10T22:47:31+00:00 Fix build with ghc 7.0.1 - - - - - 4616f861 by David Waern at 2011-03-10T22:47:50+00:00 TAG 2.9.2-actual - - - - - 0dab5e3c by Simon Hengel at 2011-04-08T15:53:01+00:00 Set shell script for unit tests back to work - - - - - 85c54dee by Simon Hengel at 2011-04-08T16:01:24+00:00 Set unit tests back to work Here "ghci>" was still used instead of ">>>". - - - - - 1cea9b78 by Simon Hengel at 2011-04-08T16:25:36+00:00 Update runtests.hs for GHC 7.0.2 - - - - - 8e5b3bbb by Simon Hengel at 2011-04-08T16:28:49+00:00 Update Haddock version in *.html.ref - - - - - 2545e955 by Simon Hengel at 2011-04-08T17:09:28+00:00 Add support for blank lines in the result of examples Result lines that only contain the string "<BLANKLINE>" are treated as a blank line. - - - - - adf64d2e by Simon Hengel at 2011-04-08T17:36:50+00:00 Add documentation for "support for blank lines in the result of examples" - - - - - c51352ca by David Waern at 2011-05-21T23:57:56+00:00 Improve a haddock comment - - - - - 7419cf2c by David Waern at 2011-05-22T15:41:52+00:00 Use cabal's test suite support to run the test suite This gives up proper dependency tracking of the test script. - - - - - 7770070c by David Waern at 2011-05-22T01:45:44+00:00 We don't need to send DocOptions nor a flag to mkExportItems - - - - - 9d95b7b6 by David Waern at 2011-05-22T21:39:03+00:00 Fix a bug - - - - - 1f93699b by David Waern at 2011-05-22T21:40:21+00:00 Break out fullContentsOf, give it a better name and some documentation The documentation describes how we want this function to eventually behave, once we have fixed a few problems with the current implementation. - - - - - 9a86432f by David Waern at 2011-05-22T21:53:52+00:00 Fix some stylistic issues in mkExportItems - - - - - c271ff0c by David Waern at 2011-05-22T22:09:11+00:00 Indentation - - - - - 93e602b1 by David Waern at 2011-06-10T01:35:31+00:00 Add git commits since switchover: darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower at hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo at earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm at cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo at earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC - - - - - 498da5ae by David Waern at 2011-06-11T00:33:33+00:00 * Merge in git patch from Michal Terepeta >From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001 From: Michal Terepeta <michal.terepeta at gmail.com> Date: Sat, 14 May 2011 19:18:22 +0200 Subject: [PATCH] Follow the change of TypeSig in GHC. This follows the change in GHC to make TypeSig take a list of names (instead of just one); GHC ticket haskell/haddock#1595. This should also improve the Haddock output in case the user writes a type signature that refers to many names: -- | Some comment.. foo, bar :: ... will now generate the expected output with one signature for both names. - - - - - 094607fe by Ian Lynagh at 2011-06-17T19:10:29+01:00 Fix build - - - - - 8fa35740 by Ian Lynagh at 2011-06-26T21:06:40+01:00 Bump GHC dep to allow 7.2 - - - - - e4d2ca3c by Ian Lynagh at 2011-07-07T23:06:28+01:00 Relax base dep - - - - - b948fde9 by Ian Lynagh at 2011-07-28T16:39:45+01:00 GHC build system: Don't install the datafiles twice - - - - - f82f6d70 by Simon Marlow at 2011-08-11T12:08:15+01:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - b341cc12 by Max Bolingbroke at 2011-08-22T20:25:27+01:00 Fix compilation with no-pred-ty GHC - - - - - 30494581 by Max Bolingbroke at 2011-08-23T10:20:54+01:00 Remaining fixes for PredTy removal - - - - - 0b197138 by Max Bolingbroke at 2011-08-26T08:27:45+01:00 Rename factKind to constraintKind - - - - - a379bec5 by Max Bolingbroke at 2011-09-04T12:54:47+01:00 Deal with change to IParam handling in GHC - - - - - f94e421b by Max Bolingbroke at 2011-09-06T17:34:31+01:00 Adapt Haddock for the ConstraintKind extension changes - - - - - 8821e5cc by Max Bolingbroke at 2011-09-09T08:24:59+01:00 Ignore associated type defaults (just as we ignore default methods) - - - - - 31a0afd4 by Max Bolingbroke at 2011-09-09T09:06:00+01:00 Merge branch 'no-pred-ty' of ssh://darcs.haskell.org/srv/darcs/haddock into no-pred-ty - - - - - dd3b530a by Max Bolingbroke at 2011-09-09T14:10:25+01:00 Merge branch 'no-pred-ty' Conflicts: src/Haddock/Convert.hs - - - - - 5f25ec96 by Max Bolingbroke at 2011-09-09T14:10:40+01:00 Replace FactTuple with ConstraintTuple - - - - - cd30b9cc by David Waern at 2011-09-26T02:17:55+02:00 Bump to version 2.9.3 - - - - - 4fbfd397 by Max Bolingbroke at 2011-09-27T14:55:21+01:00 Follow changes to BinIface Name serialization - - - - - 92257d90 by David Waern at 2011-09-30T23:45:07+02:00 Fix problem with test files not added to distribution tarball - - - - - 00255bda by David Waern at 2011-09-30T23:48:24+02:00 Merge branch 'development' - - - - - 5421264f by David Waern at 2011-10-01T01:25:39+02:00 Merge in darcs patch from Simon Meier: Wed Jun 1 19:41:16 CEST 2011 iridcode at gmail.com * prettier haddock coverage info The new coverage info rendering uses less horizontal space. This reduces the number of unnecessary line-wrappings. Moreover, the most important information, how much has been documented already, is now put up front. Hopefully, this makes it more likely that a library author is bothered by the low coverage of his modules and fixes that issue ;-) - - - - - 07d318ef by David Waern at 2011-10-01T01:34:10+02:00 Use printException instead of deprecated printExceptionAndWarnings - - - - - 40d52ee4 by David Waern at 2011-10-01T01:41:13+02:00 Merge in darcs pach: Mon Apr 11 18:09:54 JST 2011 Liyang HU <haddock at liyang.hu> * Remember collapsed sections in index.html / haddock-util.js - - - - - 279d6dd4 by David Waern at 2011-10-01T01:55:45+02:00 Merge in darcs patch: Joachim Breitner <mail at joachim-breitner.de>**20110619201645 Ignore-this: f6c51228205b0902ad5bfad5040b989a As reported on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578301, generating the global index takes much too long if type-level (with lots of auto-generated types) is installed. The patch avoids a quadratic runtime in the subfunction getIfaceIndex of ppHtmlIndex by using a temporary set. Runtime improvement observed here from 25.36s to 2.86s. - - - - - d1612383 by David Waern at 2011-10-01T01:56:48+02:00 Merge branch 'development' - - - - - 347520c1 by David Waern at 2011-10-01T01:56:54+02:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9a0c95e8 by David Waern at 2011-10-01T02:19:10+02:00 Improve .cabal file - - - - - 6967dc64 by Ian Lynagh at 2011-10-01T01:34:06+01:00 Follow changes to ForeignImport/ForeignExport in GHC - - - - - 565cb26b by Simon Marlow at 2011-10-04T00:15:04+02:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - 8b74f512 by David Waern at 2011-10-04T00:18:17+02:00 Requre ghc >= 7.2 - - - - - 271d360c by David Waern at 2011-10-04T00:22:50+02:00 Bump version to 2.9.4 - - - - - 37f3edb0 by David Waern at 2011-10-06T02:30:21+02:00 Add alex and happy to build-tools. - - - - - 7ac2bb6e by David Terei at 2011-10-12T14:02:55-07:00 Add safe haskell indication to haddock output - - - - - 42c91a47 by David Terei at 2011-10-12T14:06:03-07:00 Fix CSS issue with info table not being contained in module header - - - - - 0eddab6c by David Terei at 2011-10-12T14:06:58-07:00 Add safe haskell indication to haddock output - - - - - 3df058eb by David Terei at 2011-10-12T14:07:07-07:00 Fix CSS issue with info table not being contained in module header - - - - - a40a6c3f by David Waern at 2011-10-22T11:29:06+02:00 Bump .haddock file version since the format has changed recently - - - - - 8a6254be by David Waern at 2011-10-22T11:30:42+02:00 Merge branch 'development' - - - - - 642e3e02 by David Waern at 2011-10-23T21:23:39+02:00 Sort import list - - - - - 36371cf8 by David Waern at 2011-10-23T22:48:18+02:00 Remove NEW_GHC_LAYOUT conditional. - - - - - 5604b499 by David Waern at 2011-10-27T00:15:03+02:00 Add --print-ghc-path. - - - - - 463499fa by David Waern at 2011-10-27T00:16:22+02:00 Make testsuite able to find its dependencies automatically. - - - - - a3506172 by Ryan Newton at 2011-11-05T05:59:58-04:00 Improved declNames internal error. Added a case to handle DocD. - - - - - 001b8baf by David Waern at 2011-11-05T20:37:29+01:00 Rename copy.hs -> accept.hs. - - - - - 55d808d3 by David Waern at 2011-11-05T23:30:02+01:00 Fix build. - - - - - deb5c3be by David Waern at 2011-11-06T00:01:47+01:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9b663554 by David Waern at 2011-11-06T00:03:45+01:00 Merge https://github.com/rrnewton/haddock - - - - - 1abb0ff6 by David Waern at 2011-11-06T01:20:37+01:00 Use getDeclMainBinder instead of declNames. - - - - - 4b005c01 by David Waern at 2011-11-06T19:09:53+01:00 Fix build. - - - - - c2c51bc7 by Ian Lynagh at 2011-11-06T23:01:33+00:00 Remove -DNEW_GHC_LAYOUT in ghc.mk - - - - - f847d703 by Jose Pedro Magalhaes at 2011-11-11T09:07:39+00:00 New kind-polymorphic core This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds - - - - - 7d7c3b09 by Jose Pedro Magalhaes at 2011-11-16T21:42:22+01:00 Follow changes to tuple sorts in master - - - - - 8430e03e by Simon Peyton Jones at 2011-11-17T10:20:27+00:00 Remove redundant imports - - - - - d1b06832 by Ian Lynagh at 2011-11-19T01:33:21+00:00 Follow GHC build system change to the way we call rm - - - - - 9e2230ed by David Waern at 2011-11-24T15:00:24+01:00 Fix a bug in test runner and get rid of regex-compat dependency. - - - - - 52039b21 by David Waern at 2011-11-24T23:55:36+01:00 Avoid haskell98 dependency in test - - - - - 92e1220d by David Waern at 2011-11-25T00:03:33+01:00 Avoid depency on regex-compat also in accept.hs. - - - - - ddac6b6f by David Waern at 2011-11-25T02:13:38+01:00 Accept test output. - - - - - 5a720455 by David Waern at 2011-11-25T02:16:20+01:00 Some more changes to test scripts. - - - - - 170a9004 by David Waern at 2011-11-25T02:30:41+01:00 Add flag --interface-version. - - - - - d225576c by David Waern at 2011-11-25T02:39:26+01:00 Remove #ifs for older compiler versions. - - - - - f0d0a4f5 by David Waern at 2011-11-26T04:20:12+01:00 Give preference to type over data constructors for doc comment links at renaming time. Previously this was done in the backends. Also, warn when a doc comment refers to something that is in scope but which we don't have the .haddock file for. These changes mean we can make DocIdentifier [a] into DocIdentifier a. - - - - - eef0e776 by David Waern at 2011-11-26T17:01:06+01:00 Allow doc comments to link to out-of-scope things (#78). (A bug that should have been fixed long ago.) - - - - - 565ad529 by David Waern at 2011-11-26T19:56:21+01:00 Update tests. - - - - - fb3ce7b9 by David Waern at 2011-11-26T21:44:28+01:00 Cleanup. - - - - - d0328126 by David Waern at 2011-11-26T22:10:28+01:00 Fix module reference bug. - - - - - c03765f8 by David Waern at 2011-12-03T05:20:20+01:00 Slightly better behaviour on top-levels without type signatures. - Docs don't get attached to the next top-level with signature by mistake. - If there's an export list and the top-level is part of it, its doc comment shows up in the documentation. - - - - - 48461d31 by David Waern at 2011-12-03T05:38:10+01:00 Add a test for Unicode doc comments. - - - - - 549c4b4e by David Waern at 2011-12-03T19:07:55+01:00 Cleanup. - - - - - 7bfecf91 by David Waern at 2011-12-03T20:13:08+01:00 More cleanup. - - - - - 14fab722 by Ian Lynagh at 2011-12-12T21:21:35+00:00 Update dependencies and binaryInterfaceVersion - - - - - 469e6568 by Ian Lynagh at 2011-12-18T12:56:16+00:00 Fix (untested) building from source tarball without alex/happy haddock's .cabal file was declaring that it needed alex and happy to build, but in the GHC source tarballs it doesn't. - - - - - 895c9a8c by David Waern at 2011-12-27T12:57:43+01:00 Go back to having a doc, sub and decl map instead of one big decl map. This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer. - - - - - 736767d9 by David Waern at 2011-12-27T13:33:41+01:00 Merge ../../../haddock Conflicts: src/Haddock/InterfaceFile.hs - - - - - 20016f79 by David Waern at 2011-12-27T13:57:23+01:00 Bump version. - - - - - 31f276fb by David Waern at 2011-12-27T13:57:32+01:00 Merge ../ghc/utils/haddock - - - - - 95b367cd by David Waern at 2011-12-27T14:57:29+01:00 Update tests following version bump. - - - - - fa3c94cd by David Waern at 2011-12-27T14:57:51+01:00 Get rid of quite unnecessary use of different lists. - - - - - 9c4d3c54 by David Waern at 2011-12-27T15:26:42+01:00 Cleanup. - - - - - 2caf9f90 by David Waern at 2011-12-27T16:18:05+01:00 Wibbles. - - - - - 3757d09b by David Waern at 2011-12-27T20:50:26+01:00 Complete support for inferring types for top-level bindings. - - - - - 53418734 by David Waern at 2011-12-28T15:02:13+01:00 Minor fixes and cleanup. - - - - - 0c9d0385 by Ian Lynagh at 2012-01-03T18:31:29+00:00 Follow rename of Instance to ClsInst in GHC - - - - - c9bc969a by Simon Hengel at 2012-01-12T21:28:14+01:00 Make sure that generated xhtml is valid (close haskell/haddock#186) Thanks to Phyx. - - - - - 836a0b9a by David Waern at 2012-02-01T02:30:05+01:00 Fix bug introduced in my recent refactoring. - - - - - c7d733eb by David Waern at 2012-02-01T02:30:26+01:00 Cleanup mkMaps and avoid quadratic behaviour. - - - - - da3cda8f by David Waern at 2012-02-01T02:56:56+01:00 Require ghc >= 7.4. - - - - - 83a3287e by David Waern at 2012-02-01T02:57:36+01:00 Update CHANGES. - - - - - 93408f0b by Simon Hengel at 2012-02-04T00:48:04+01:00 Add reference renderings - - - - - 49d00d2c by Simon Hengel at 2012-02-04T00:48:25+01:00 Set unit tests for parser back to work - - - - - eb450980 by Simon Hengel at 2012-02-04T00:49:07+01:00 Add .gitignore - - - - - a841602c by Simon Hengel at 2012-02-04T00:49:16+01:00 Add .ghci file - - - - - 8861199d by Simon Hengel at 2012-02-04T00:49:29+01:00 tests/html-tests/copy.hs: Use mapM_ instead of mapM So we do net get a list of () on stdout when running with runhaskell. - - - - - b477d9b5 by Simon Hengel at 2012-02-04T00:49:46+01:00 Remove index files from golden tests - - - - - 9dbda34e by Simon Hengel at 2012-02-04T00:49:57+01:00 Add /tests/html-tests/tests/*index*.ref to .gitignore - - - - - a9434817 by Simon Hengel at 2012-02-04T00:50:04+01:00 Add DocWarning to Doc The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis. - - - - - de2fb6fa by Simon Hengel at 2012-02-04T00:50:13+01:00 Add support for module warnings - - - - - 0640920e by Simon Hengel at 2012-02-04T00:50:21+01:00 Add tests for module warnings - - - - - 30ce0d77 by Simon Hengel at 2012-02-04T00:50:29+01:00 Add support for warnings - - - - - bb367960 by Simon Hengel at 2012-02-04T00:50:37+01:00 Add tests for warnings - - - - - 6af1dc2d by Simon Hengel at 2012-02-04T00:50:50+01:00 Expand type signatures in export list (fixes haskell/haddock#192) - - - - - a06cbf25 by Simon Hengel at 2012-02-04T00:51:04+01:00 Expand type signatures for modules without explicit export list - - - - - 57dda796 by Simon Hengel at 2012-02-04T00:51:15+01:00 Remove obsolete TODO - - - - - 270c3253 by David Waern at 2012-02-04T00:51:24+01:00 Fix issues in support for warnings. * Match against local names only. * Simplify (it's OK to map over the warnings). - - - - - 683634bd by David Waern at 2012-02-04T00:55:11+01:00 Some cleanup and make sure we filter warnings through exports. - - - - - 210cb4ca by David Waern at 2012-02-04T03:01:30+01:00 Merge branch 'fix-for-186' of https://github.com/sol/haddock into ghc-7.4 - - - - - e8db9031 by David Waern at 2012-02-04T03:07:51+01:00 Style police. - - - - - 261f9462 by David Waern at 2012-02-04T03:20:16+01:00 Update tests. - - - - - 823cfc7c by David Waern at 2012-02-04T03:21:12+01:00 Use mapM_ in accept.hs as well. - - - - - 873dd619 by David Waern at 2012-02-04T03:21:33+01:00 Remove copy.hs - use accept.hs instead. - - - - - 0e31a14a by David Waern at 2012-02-04T03:47:33+01:00 Use <> instead of mappend. - - - - - 2ff7544f by David Waern at 2012-02-04T03:48:55+01:00 Remove code for older ghc versions. - - - - - dacf2786 by David Waern at 2012-02-04T15:52:51+01:00 Clean up some code from last SoC project. - - - - - 00cbb117 by David Waern at 2012-02-04T21:43:49+01:00 Mostly hlint-inspired cleanup. - - - - - 7dc86cc2 by Simon Peyton Jones at 2012-02-06T09:14:41+00:00 Track changes in HsDecls - - - - - f91f82fe by Ian Lynagh at 2012-02-16T13:40:11+00:00 Follow changes in GHC caused by the CAPI CTYPE pragma - - - - - a0ea6b0b by Ian Lynagh at 2012-02-22T02:26:12+00:00 Follow changes in GHC - - - - - b23b07d1 by Simon Peyton Jones at 2012-03-02T16:36:41+00:00 Follow changes in data representation from the big PolyKinds commit - - - - - 43406022 by Simon Hengel at 2012-03-05T11:18:34+01:00 Save/restore global state for static flags when running GHC actions This is necessary if we want to run createInterfaces (from Documentation.Haddock) multiple times in the same process. - - - - - 9fba16fe by Paolo Capriotti at 2012-03-06T10:57:33+00:00 Update .gitignore. - - - - - a9325044 by Simon Peyton Jones at 2012-03-14T17:35:42+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - fd48065a by Iavor Diatchki at 2012-03-15T22:43:35-07:00 Add support for type-level literals. - - - - - 2e8206dd by Simon Peyton Jones at 2012-03-16T14:18:22+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - 93e13319 by Simon Peyton Jones at 2012-03-17T01:04:05+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock Conflicts: src/Haddock/Convert.hs - - - - - d253fa71 by Iavor Diatchki at 2012-03-19T20:12:18-07:00 Merge remote-tracking branch 'origin/master' into type-nats - - - - - fc40acc8 by Iavor Diatchki at 2012-03-19T20:31:27-07:00 Add a missing case for type literals. - - - - - fd2ad699 by Iavor Diatchki at 2012-03-24T13:28:29-07:00 Rename variable to avoid shadowing warning. - - - - - 9369dd3c by Simon Peyton Jones at 2012-03-26T09:14:23+01:00 Follow refactoring of TyClDecl/HsTyDefn - - - - - 38825ca5 by Simon Peyton Jones at 2012-03-26T09:14:37+01:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - 4324ac0f by David Waern at 2012-04-01T01:51:19+02:00 Disable unicode test. - - - - - 3165b750 by David Waern at 2012-04-01T01:51:34+02:00 Take reader environment directly from TypecheckedSource. - - - - - 213b644c by David Waern at 2012-04-01T01:55:20+02:00 Cleanup. - - - - - 3118b4ba by David Waern at 2012-04-01T02:16:15+02:00 Don't filter out unexported names from the four maps - fixes a regression. - - - - - d6524e17 by David Waern at 2012-04-01T02:40:34+02:00 Fix crash when using --qual. Naughty GHC API! - - - - - ea3c43d8 by Henning Thielemann at 2012-04-01T13:03:07+02:00 add QualOption type for distinction between qualification argument given by the user and the actual qualification for a concrete module - - - - - 5422ff05 by Henning Thielemann at 2012-04-01T16:25:02+02:00 emit an error message when the --qual option is used incorrectly - - - - - 026e3404 by David Waern at 2012-04-01T18:10:30+02:00 Don't crash on unicode strings in doc comments. - - - - - ce006632 by David Waern at 2012-04-01T20:13:35+02:00 Add test for --ignore-all-exports flag/ignore-exports pragma. - - - - - 6e4dd33c by David Waern at 2012-04-01T20:21:03+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.4 - - - - - 734ae124 by Henning Thielemann at 2012-04-01T20:22:10+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - 622f9ba5 by David Waern at 2012-04-01T21:26:13+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 55ce17cb by Henning Thielemann at 2012-04-01T22:03:25+02:00 'abbreviate' qualification style - basic support Currently we ignore the package a module is imported from. This means that a module import would shadow another one with the same module name from a different package. - - - - - c85314ef by David Waern at 2012-04-01T22:05:12+02:00 Check qualification option before processing modules. - - - - - ae4b626c by Henning Thielemann at 2012-04-02T00:19:36+02:00 abbreviated qualification: use Packages.lookupModuleInAllPackages for finding the package that a module belongs to - - - - - 60bdbcf5 by Henning Thielemann at 2012-04-02T00:25:31+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - df44301d by Henning Thielemann at 2012-04-02T00:29:05+02:00 qualification style 'abbreviated' -> 'aliased' - - - - - f4192a64 by David Waern at 2012-04-02T01:05:47+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 7ba09067 by David Terei at 2012-04-04T15:08:21-07:00 Fix reporting of modules safe haskell mode (#5989) - - - - - d0cc33d0 by David Terei at 2012-04-06T15:50:41+01:00 Fix reporting of modules safe haskell mode (#5989) - - - - - 6e3434c5 by Simon Peyton Jones at 2012-04-20T18:37:46+01:00 Track changes in HsSyn - - - - - 22014ed0 by Simon Peyton Jones at 2012-05-11T22:45:15+01:00 Follow changes to LHsTyVarBndrs - - - - - d9a07b24 by David Waern at 2012-05-15T01:46:35+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - a6c4ebc6 by David Waern at 2012-05-16T02:18:32+02:00 Update CHANGES. - - - - - 8e181d29 by David Waern at 2012-05-16T02:27:56+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - e358210d by David Waern at 2012-05-16T02:35:33+02:00 Mention the new aliased --qual mode in CHANGES. - - - - - efd36a28 by David Waern at 2012-05-16T21:33:13+02:00 Bump version number. - - - - - d6b3af14 by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for deprecated record field - - - - - 927f800e by Simon Hengel at 2012-05-17T19:08:20+02:00 Use >>= instead of fmap and join - - - - - 048b41d5 by Simon Hengel at 2012-05-17T19:08:20+02:00 newtype-wrap Doc nodes for things that may have warnings attached - - - - - e3a89fc3 by Simon Hengel at 2012-05-17T19:08:20+02:00 Attach warnings to `Documentation` type - - - - - 5d4cc43d by Simon Hengel at 2012-05-17T19:08:20+02:00 Simplify lookupWarning - - - - - cf8ae69d by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for haskell/haddock#205 - - - - - cb409b19 by Simon Peyton Jones at 2012-05-25T08:30:11+01:00 Follow changes in LHsTyVarBndrs - - - - - 2d5f4179 by Simon Hengel at 2012-05-26T19:21:29+02:00 Add Applicative instance for (GenRnM a) - - - - - e4373060 by Simon Hengel at 2012-05-26T19:21:33+02:00 Use a map for warnings, as suggested by @waern - - - - - 597a68c7 by Simon Hengel at 2012-05-27T08:48:24+02:00 Add an optional label to URLs - - - - - ef1ac7fe by Simon Hengel at 2012-05-27T08:48:24+02:00 Add support for hyperlink labels to parser - - - - - 41f2adce by Simon Hengel at 2012-05-27T08:48:24+02:00 Add golden test for hyperlinks - - - - - 83d5e764 by Simon Hengel at 2012-05-27T08:50:02+02:00 Use LANGUAGE pragmas instead of default-extensions in cabal file - - - - - ddb755e5 by Simon Hengel at 2012-05-27T08:50:02+02:00 Fix typo in comment - - - - - 110676b4 by Simon Hengel at 2012-05-27T08:50:02+02:00 Add a type signature for a where-binding - - - - - 7d9ba2a0 by Ian Lynagh at 2012-06-12T14:38:01+01:00 Follow changes in GHC - - - - - 47c704f2 by Ian Lynagh at 2012-06-12T18:52:16+01:00 Follow changes in GHC - - - - - e1efe1ab by Simon Peyton Jones at 2012-06-13T17:25:29+01:00 Follow changes for the implementation of implicit parameters - - - - - 69abc81c by Ian Lynagh at 2012-06-19T22:52:58+01:00 Follow changes in base - - - - - 9d074a21 by Paolo Capriotti at 2012-06-22T18:26:47+01:00 Use right docMap to get decl documentation. - - - - - e3292ef6 by Ian Lynagh at 2012-07-15T01:31:19+01:00 Follow changes in GHC - - - - - ceae56b0 by Ian Lynagh at 2012-07-16T21:22:48+01:00 Fix haddock following some GHC changes Passing _|_ as the Settings for defaultDynFlags no longer works well enough - - - - - 9df72735 by Paolo Capriotti at 2012-07-19T16:49:32+01:00 Forward port changes from stable. - - - - - 572f5fcf by Ian Lynagh at 2012-07-19T20:38:26+01:00 Merge branch 'master' of darcs.haskell.org:/srv/darcs//haddock - - - - - 9195aca4 by Paolo Capriotti at 2012-07-20T10:27:28+01:00 Update dependencies. - - - - - 33db3923 by Ian Lynagh at 2012-07-20T17:54:43+01:00 Build with GHC 7.7 - - - - - 925a2cea by David Waern at 2012-07-23T16:50:40+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.6 Conflicts: src/Haddock/InterfaceFile.hs - - - - - d710ef97 by David Waern at 2012-07-23T16:52:07+02:00 Bump version number. - - - - - eb0c2f83 by David Waern at 2012-07-23T16:57:58+02:00 Update CHANGES. - - - - - b3f56943 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Hide "internal" instances This fixes haskell/haddock#37 (http://trac.haskell.org/haddock/ticket/37) Precisely, we show an instance iff its class and all the types are exported by non-hidden modules. - - - - - a70aa412 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Tests for hiding instances (#37) - - - - - c0f4aa58 by Simon Hengel at 2012-07-27T13:00:13+03:00 Add an other test for hiding instances (#37) - - - - - a7ed6268 by Ian Lynagh at 2012-08-07T14:48:13+01:00 Follow changes in GHC - - - - - 0ab30d38 by Ian Lynagh at 2012-08-13T22:12:27+01:00 Improve haddock memory usage - - - - - 0eaa4e30 by Ian Lynagh at 2012-08-13T23:58:46+01:00 Improve haddock memory usage - - - - - 659d26cf by Ian Lynagh at 2012-08-14T13:16:48+01:00 Remove some temporary pragmas I accidentally recorded - - - - - d97fceb6 by Simon Hengel at 2012-08-25T13:19:34+02:00 Add missing dependency to library - - - - - 4c910697 by Simon Hengel at 2012-08-28T07:39:14+02:00 Move .ghci to project root - - - - - fc3c601a by Simon Hengel at 2012-08-28T07:39:14+02:00 accept.hs: Ignore some files - - - - - 1af9b984 by Simon Hengel at 2012-08-28T07:40:04+02:00 Update reference renderings (bump version) - - - - - 980dc253 by Simon Hengel at 2012-08-28T07:40:32+02:00 Update reference renderings (remove links for ()) - - - - - 33651dbf by Simon Hengel at 2012-08-28T07:41:50+02:00 Update documentation of `runInteractiveProcess` in reference rendering - - - - - 7ab25078 by David Waern at 2012-09-07T10:38:50+02:00 Merge branch 'hiddenInstances2' of http://github.com/feuerbach/haddock into ghc-7.6 - - - - - c3de3a4b by David Waern at 2012-09-07T14:29:27+02:00 Follow changes in GHC. - - - - - 298c43ac by David Waern at 2012-09-07T14:59:24+02:00 Update CHANGES. - - - - - e797993a by David Waern at 2012-09-07T15:21:30+02:00 Update ANNOUNCE. - - - - - d0b44790 by David Waern at 2012-09-07T15:22:43+02:00 Merge branch 'hidden-instances' into ghc-7.6 - - - - - 41a4adc8 by Simon Hengel at 2012-09-08T12:08:37+02:00 Update doc/README - - - - - 71ad1040 by Simon Hengel at 2012-09-08T12:17:17+02:00 Add documentation for URL labels - - - - - 9bb41afd by Simon Peyton Jones at 2012-09-20T18:14:26+01:00 Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs - - - - - b8139bfa by Simon Hengel at 2012-09-21T14:24:16+02:00 Disable Unicode test for now - - - - - a5fafdd7 by Simon Hengel at 2012-09-21T14:35:45+02:00 Update TypeOperators test for GHC 7.6.1 Type operators can't be used as type variables anymore! - - - - - 6ccf0025 by Simon Hengel at 2012-09-21T16:02:24+02:00 Remove (Monad (Either e)) instance from ref. rendering of CrossPackageDocs I do not really understand why the behavior changed, so I'll open a ticket, so that we can further investigate. - - - - - b5c6c138 by Ian Lynagh at 2012-09-27T02:00:57+01:00 Follow changes in GHC build system - - - - - b98eded0 by David Waern at 2012-09-27T15:37:02+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 76cc2051 by David Waern at 2012-09-27T15:48:19+02:00 Update hidden instances tests. - - - - - aeaa1c59 by David Waern at 2012-09-28T10:21:32+02:00 Make API buildable with GHC 7.6. - - - - - d76be1b0 by Simon Peyton Jones at 2012-09-28T15:57:05+01:00 Merge remote-tracking branch 'origin/master' into tc-untouchables - - - - - a1922af8 by David Waern at 2012-09-28T19:50:20+02:00 Fix spurious superclass constraints bug. - - - - - bc41bdbb by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove old examples - - - - - bed7d3dd by Simon Hengel at 2012-10-01T11:30:51+02:00 Adapt parsetests for GHC 7.6.1 - - - - - dcdb22bb by Simon Hengel at 2012-10-01T11:30:51+02:00 Add test-suite section for parsetests to cabal file + get rid of HUnit dependency - - - - - 1e5263c9 by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove test flag from cabal file This was not really used. - - - - - 4beee98b by David Waern at 2012-09-28T23:42:28+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 11dd2256 by Ian Lynagh at 2012-10-03T16:17:35+01:00 Follow change in GHC build system - - - - - fbd77962 by Simon Hengel at 2012-10-03T18:49:40+02:00 Remove redundant dependency from cabal file - - - - - 09218989 by Simon Hengel at 2012-10-04T16:03:05+02:00 Fix typo - - - - - 93a2d5f9 by Simon Hengel at 2012-10-04T16:11:41+02:00 Remove trailing whitespace from cabal file - - - - - c8b46cd3 by Simon Hengel at 2012-10-04T16:12:17+02:00 Export Haddock's main entry point from library - - - - - b411e77b by Simon Hengel at 2012-10-04T16:29:46+02:00 Depend on library for executable The main motivation for this is to increase build speed. In GHC's source tree the library is not build, but all modules are now required for the executable, so that GHC's validate will now detect build failures for the library. - - - - - f8f0979f by Simon Hengel at 2012-10-05T00:32:57+02:00 Set executable flag for Setup.lhs - - - - - dd045998 by Simon Hengel at 2012-10-07T16:44:06+02:00 Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. - - - - - 7b39c3ae by Simon Hengel at 2012-10-07T17:05:45+02:00 cross-package test: re-export IsString instead of Monad There is a monad instance for Q, which is not available on platforms that do not have GHCi support. This caused CrossPackageDocs to fail on those platforms. Re-exporting IsString should test the same thing, but it works on all platforms. - - - - - 0700c605 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Fix some warnings - - - - - f78eca79 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Make -Wall proof - - - - - 6beec041 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Use listToMaybe/fromMaybe instead of safeHead/maybe - - - - - 44b8ce86 by Ian Lynagh at 2012-10-08T21:59:46+01:00 Follow changes in GHC - - - - - 6da5f702 by Simon Hengel at 2012-10-09T11:16:19+02:00 Update .ghci - - - - - 9ac1a1b9 by Kazu Yamamoto at 2012-10-09T12:45:31+02:00 Add markup support for properties - - - - - 1944cb42 by Simon Hengel at 2012-10-09T12:45:31+02:00 Simplify lexing/parsing of properties In contrast to what we do for examples, we do not really need to capture the "prompt" here. - - - - - bffd8e62 by Simon Hengel at 2012-10-09T13:40:14+02:00 Add HTML test for properties - - - - - 2fe9c5cb by Simon Hengel at 2012-10-09T13:40:21+02:00 Add unit tests for properties - - - - - 874e361b by Simon Hengel at 2012-10-09T13:40:33+02:00 Bump interface version - - - - - 2506cc37 by Simon Hengel at 2012-10-09T15:15:04+02:00 Fix parser bug - - - - - 743d2b7d by Simon Hengel at 2012-10-09T15:31:06+02:00 Allow to load interface files with compatible versions - - - - - 981a1660 by Simon Hengel at 2012-10-10T10:32:05+02:00 Export more types from Documentation.Haddock (fixes haskell/haddock#216) - - - - - dff7dc76 by Simon Hengel at 2012-10-10T11:15:19+02:00 Update ANNOUNCE and CHANGES - - - - - edd2bb01 by Simon Hengel at 2012-10-10T11:22:50+02:00 Bump version - - - - - 5039163b by Simon Hengel at 2012-10-10T13:56:04+02:00 Fix typo in documentation - - - - - e4ce34da by Simon Hengel at 2012-10-10T14:28:35+02:00 Add documentation for properties - - - - - 9555ebca by Simon Hengel at 2012-10-11T10:49:04+02:00 Remove redundant if-defs, more source documentation - - - - - 87aa67e1 by Simon Hengel at 2012-10-11T12:32:51+02:00 Adapt cabal file - - - - - c44c1dee by Simon Hengel at 2012-10-11T12:41:58+02:00 Require ghc 7.6 - - - - - 8383bc34 by Simon Hengel at 2012-10-11T12:50:24+02:00 Bump version - - - - - 1030eb38 by Simon Hengel at 2012-10-11T12:55:44+02:00 Update ANNOUNCE and CHANGES - - - - - 74955088 by Simon Hengel at 2012-10-12T09:49:31+02:00 Improve note about `binaryInterfaceVersion` (thanks David) - - - - - ee30f6b7 by Simon Hengel at 2012-10-13T13:40:59+02:00 Update version in html tests, rpm spec file, and user manual - - - - - f2861f18 by Simon Hengel at 2012-10-13T14:40:33+02:00 Remove unused MonadFix constraint - - - - - dfdf1a74 by Simon Hengel at 2012-10-13T15:15:38+02:00 Minor code simplification - - - - - 4ecd1e70 by Simon Hengel at 2012-10-13T15:33:43+02:00 Increase code locality - - - - - f7df5cc9 by Simon Hengel at 2012-10-13T16:03:12+02:00 Minor code simplification - - - - - e737eb6e by Simon Hengel at 2012-10-13T19:03:04+02:00 Handle HsExplicitListTy in renameer (fixes haskell/haddock#213) - - - - - c2dc8f17 by Simon Hengel at 2012-10-13T20:46:31+02:00 Better error messages - - - - - 14d48b4c by Simon Hengel at 2012-10-14T00:21:07+02:00 Simplify RnM type - - - - - 6c2cc547 by Simon Hengel at 2012-10-14T00:23:35+02:00 Simplify lookupRn - - - - - bc77ce85 by Simon Hengel at 2012-10-14T01:51:32+02:00 Organize unite tests hierarchically - - - - - 2306d117 by Simon Hengel at 2012-10-14T10:34:58+02:00 Handle more cases in renameType - - - - - 8a864203 by Simon Hengel at 2012-10-14T11:47:59+02:00 Add mini_HiddenInstances.html.ref and mini_HiddenInstancesB.html.ref - - - - - 3a978eca by Simon Hengel at 2012-10-14T11:49:28+02:00 Add /tests/html-tests/output/ to .gitignore - - - - - db18888a by Simon Hengel at 2012-10-14T13:38:21+02:00 Allow haddock markup in deprecation messages - - - - - e7cfee9f by Simon Hengel at 2012-10-14T14:00:23+02:00 If parsing of deprecation message fails, include it verbatim - - - - - 242a85be by Simon Hengel at 2012-10-14T14:13:24+02:00 Add description for PruneWithWarning test - - - - - 43d33df1 by Simon Hengel at 2012-10-14T15:40:53+02:00 Minor formatting change - - - - - 22768c44 by Simon Hengel at 2012-10-14T16:03:43+02:00 Properly handle deprecation messages for re-exported things (fixes haskell/haddock#220) - - - - - cb4b9111 by Simon Hengel at 2012-10-14T17:30:28+02:00 Add build artifacts for documentation to .gitignore - - - - - 854cd8de by Simon Hengel at 2012-10-14T23:34:51+02:00 unit-tests: Improve readability Add IsString instance for (Doc RdrName) + use <> instead of DocAppend. - - - - - c4446d54 by Simon Hengel at 2012-10-14T23:37:21+02:00 unit-tests: Minor refactoring Rename parse to parseParas. - - - - - 04f2703c by Simon Hengel at 2012-10-15T00:36:42+02:00 Fix typo - - - - - 3d109e44 by Simon Hengel at 2012-10-15T10:30:07+02:00 Add description for DeprecatedReExport test - - - - - 84f0985c by Simon Hengel at 2012-10-15T14:54:19+02:00 Move resources to /resources directory - - - - - a5de7ca6 by Simon Hengel at 2012-10-15T15:46:18+02:00 Move HTML tests to directory /html-test/ - - - - - e21f727d by Simon Hengel at 2012-10-15T19:32:42+02:00 Move HTML reference renderings to /html-test/ref/ - - - - - 3a3c6c75 by Simon Hengel at 2012-10-15T19:32:42+02:00 Copy css, images, etc. on accept - - - - - 40ead6dc by Simon Hengel at 2012-10-15T19:32:42+02:00 Move unit tests to /test directory - - - - - 99a28231 by Simon Hengel at 2012-10-15T19:32:42+02:00 Fix Setup.lhs /usr/bin/runhaskell is not installed on all systems. - - - - - 95faf45e by Simon Hengel at 2012-10-15T19:32:42+02:00 Make test management scripts more robust * They are now independent from the current directory, and hence can be called from everywhere * On UNIX/Linux they can now be run as scripts - - - - - 027aaa2d by Simon Hengel at 2012-10-15T19:53:40+02:00 Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. - - - - - e0266ede by Simon Hengel at 2012-10-15T20:03:43+02:00 Add test case for "spurious superclass constraints bug" - - - - - 52a2aa92 by Simon Hengel at 2012-10-15T20:28:55+02:00 Adapt accept.lhs, so that it ignores more index files - - - - - 53530781 by Simon Hengel at 2012-10-15T20:49:39+02:00 Rename html-test/runtests.lhs to html-test/run.lhs - - - - - 84518797 by Simon Hengel at 2012-10-15T20:49:39+02:00 Move source files for HTML tests to html-test/src - - - - - a911dc6c by Simon Hengel at 2012-10-15T20:49:39+02:00 Adapt output directory for HTML tests - - - - - d3c15857 by Ian Lynagh at 2012-10-16T16:54:43+01:00 Follow dopt->gopt rename - - - - - 956665a5 by Simon Hengel at 2012-10-18T08:42:48+02:00 Update html-test/README - - - - - 903b1029 by Simon Hengel at 2012-10-18T08:50:26+02:00 Use markdown for html-test/README - - - - - 150b4d63 by Ian Lynagh at 2012-10-18T16:36:00+01:00 Follow changes in GHC: 'flags' has been renamed 'generalFlags' - - - - - 41e04ff9 by Simon Hengel at 2012-11-28T09:54:35+01:00 Export missing types from Documentation.Haddock - - - - - 9be59237 by Ian Lynagh at 2012-11-30T23:20:47+00:00 Update dependencies - - - - - e06842f5 by Simon Hengel at 2012-12-07T20:58:05+01:00 Bump version - - - - - e3dbede0 by Simon Hengel at 2012-12-07T20:58:05+01:00 Add missing test files to cabal file (fixes haskell/haddock#230) - - - - - ee0dcca7 by Simon Hengel at 2012-12-07T20:58:05+01:00 Update CHANGES - - - - - 51601bdb by Simon Peyton Jones at 2012-12-19T17:28:35+00:00 Track changes in UNPACK pragma stuff - - - - - f2573bc1 by Richard Eisenberg at 2012-12-21T20:56:25-05:00 Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances. - - - - - f788d0fb by Simon Peyton Jones at 2012-12-23T15:49:58+00:00 Track changes in HsBang - - - - - ca460a0c by Simon Peyton Jones at 2012-12-23T15:50:28+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - f078fea6 by Simon Peyton Jones at 2013-01-02T08:33:13+00:00 Use InstEnv.instanceSig rather than instanceHead (name change) - - - - - 88e41305 by Simon Peyton Jones at 2013-01-14T17:10:27+00:00 Track change to HsBang type - - - - - e1ad4e19 by Kazu Yamamoto at 2013-02-01T11:59:24+09:00 Merge branch 'ghc-7.6' into ghc-7.6-merge-2 Conflicts: haddock.cabal src/Haddock/Interface/AttachInstances.hs src/Haddock/Interface/Create.hs src/Haddock/Interface/LexParseRn.hs src/Haddock/InterfaceFile.hs src/Haddock/Types.hs Only GHC HEAD can compile this. GHC 7.6.x cannot compile this. Some test fail. - - - - - 62bec012 by Kazu Yamamoto at 2013-02-06T11:12:28+09:00 Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.) - - - - - 013fd2e4 by Kazu Yamamoto at 2013-02-06T17:56:21+09:00 Refactoring instanceHead'. - - - - - 3148ce0e by Kazu Yamamoto at 2013-02-07T17:45:10+09:00 Using new syntax in html-test/src/GADTRecords.hs. - - - - - 626dabe7 by Gabor Greif at 2013-02-15T22:42:01+01:00 Typo - - - - - 1eb667ae by Ian Lynagh at 2013-02-16T17:02:07+00:00 Follow changes in base - - - - - 3ef8253a by Ian Lynagh at 2013-03-01T23:23:57+00:00 Follow changes in GHC's build system - - - - - 1a265a3c by Ian Lynagh at 2013-03-03T23:12:07+00:00 Follow changes in GHC build system - - - - - 69941c79 by Max Bolingbroke at 2013-03-10T09:38:28-07:00 Use Alex 3's Unicode support to properly lex source files as UTF-8 Signed-off-by: David Waern <david.waern at gmail.com> - - - - - ea687dad by Simon Peyton Jones at 2013-03-15T14:16:10+00:00 Adapt to tcRnGetInfo returning family instances too This API change was part of the fix to Trac haskell/haddock#4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays. - - - - - 971a30b0 by Andreas Voellmy at 2013-05-19T20:47:39+01:00 Fix for haskell/haddock#7879. Changed copy of utils/haddock/html/resources/html to use "cp -RL" rather than "cp -R". This allows users to run validate in a build tree, where the build tree was setup using lndir with a relative path to the source directory. - - - - - 31fb7694 by Ian Lynagh at 2013-05-19T20:47:49+01:00 Use "cp -L" when making $(INPLACE_LIB)/latex too - - - - - e9952233 by Simon Hengel at 2013-06-01T18:06:50+02:00 Add -itest to .ghci - - - - - b06873b3 by Mateusz Kowalczyk at 2013-06-01T18:06:50+02:00 Workaround for a failing build with --enable-tests. - - - - - e7858d16 by Simon Hengel at 2013-06-01T19:29:28+02:00 Fix broken test - - - - - 0690acb1 by Richard Eisenberg at 2013-06-21T14:08:25+01:00 Updates to reflect changes in HsDecls to support closed type families. - - - - - 7fd347ec by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 53ed81b6 by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 931c4f4f by Richard Eisenberg at 2013-07-24T13:15:59+01:00 Remove (error "synifyKind") to use WithinType, to allow haddock to process base. - - - - - 55a9c804 by Richard Eisenberg at 2013-08-02T15:54:55+01:00 Changes to reflect changes in GHC's type HsTyVarBndr - - - - - b6e9226c by Mathieu Boespflug at 2013-08-04T10:39:43-07:00 Output Copright and License keys in Xhtml backend. This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern at gmail.com> - - - - - 4c66028a by David Waern at 2013-08-04T15:27:36-07:00 Bump interface file version. - - - - - 67340163 by David Waern at 2013-08-09T16:12:51-07:00 Update tests. - - - - - 2087569b by Mateusz Kowalczyk at 2013-08-25T09:24:13+02:00 Add spec tests. This adds tests for all elements we can create during regular parsing. This also adds tests for text with unicode in it. - - - - - 97f36a11 by Mateusz Kowalczyk at 2013-08-27T06:59:12+01:00 Fix ticket haskell/haddock#247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. - - - - - 60681b4f by Mateusz Kowalczyk at 2013-08-27T21:22:48+02:00 LaTeX tests setup - - - - - fa4c27b2 by Mateusz Kowalczyk at 2013-09-02T23:21:43+01:00 Fixes haskell/haddock#253 - - - - - 1a202490 by Mateusz Kowalczyk at 2013-09-03T01:12:50+01:00 Use Hspec instead of nanospec This is motivated by the fact that Haddock tests are not ran by the GHC's ‘validate’ script so we're pretty liberal on dependencies in that area. Full Hspec gives us some nice features such as Quickcheck integration. - - - - - 8cde3b20 by David Luposchainsky at 2013-09-08T07:27:28-05:00 Fix AMP warnings Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - d10661f2 by Herbert Valerio Riedel at 2013-09-11T15:15:01+02:00 Update Git repo URL in `.cabal` file - - - - - 16a44eb5 by Richard Eisenberg at 2013-09-17T09:34:26-04:00 Revision to reflect new role annotation syntax in GHC. - - - - - 4b9833b9 by Herbert Valerio Riedel at 2013-09-18T10:15:28+02:00 Add missing `traverse` method for `GenLocated` As `Traversable` needs at least one of `traverse` or `sequenceA` to be overridden. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - b71fed5d by Simon Hengel at 2013-09-18T22:43:34+02:00 Add test helper - - - - - 4fc1ea86 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#231 - - - - - 435872f6 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#256 We inject -dynamic-too into flags before we run all our actions in the GHC monad. - - - - - b8b24abb by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Add new field to DynFlags - - - - - 49558795 by Simon Hengel at 2013-09-18T22:43:35+02:00 Fallback to ./resources when Cabal data is not found (so that themes are found during development) - - - - - bf79d05c by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Fixes haskell/haddock#5 - - - - - e1baebc2 by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Print missing documentation. Fixes haskell/haddock#258. - - - - - 02ea74de by Austin Seipp at 2013-10-09T10:52:22-05:00 Don't consider StaticFlags when parsing arguments. Instead, discard any static flags before parsing the command line using GHC's DynFlags parser. See http://ghc.haskell.org/trac/ghc/ticket/8276 Based off a patch from Simon Hengel. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 704fd5bb by Simon Hengel at 2013-11-09T00:15:13+01:00 Update HTML tests - - - - - f9fed49e by Simon Hengel at 2013-11-10T18:43:58+01:00 Bump version - - - - - 97ae1999 by Simon Peyton Jones at 2013-11-25T17:25:14+00:00 Track changes in HsSpliceTy data constructor - - - - - 59ad8268 by Simon Peyton Jones at 2014-01-10T18:17:43+00:00 Adapt to small change in Pretty's exports - - - - - 8b12e6aa by Simon Hengel at 2014-01-12T14:48:35-06:00 Some code simplification by using traverse - - - - - fc5ea9a2 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix warnings in test helper - - - - - 6dbb3ba5 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Add ByteString version of Attoparsec - - - - - 968d7774 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 One pass parser and tests. We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing. - - - - - 37a07c9c by Simon Hengel at 2014-01-12T14:48:35-06:00 Rename Haddock.ParseSpec to Haddock.ParserSpec - - - - - f0f68fe9 by Simon Hengel at 2014-01-12T14:48:35-06:00 Don't append newline to parseString input We also check that we have parsed everything with endOfInput. - - - - - 95d60093 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu at fuuzetsu.co.uk if you need the full commit history. - - - - - 7d99108c by Simon Hengel at 2014-01-12T14:48:35-06:00 Update acceptance tests - - - - - d1b59640 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Support for bold. Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs - - - - - 4b412b39 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Allow for headings inside function documentation. LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs - - - - - fdcca428 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Per-module extension flags and language listing. Any extensions that are not enabled by a used language (Haskell2010 &c) will be shown. Furthermore, any implicitly enabled are also going to be shown. While we could eliminate this either by using the GHC API or a dirty hack, I opted not to: if a user doesn't want the implied flags to show, they are recommended to use enable extensions more carefully or individually. Perhaps this will encourage users to not enable the most powerful flags needlessly. Enabled with show-extensions. Conflicts: src/Haddock/InterfaceFile.hs - - - - - 368942a2 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Bump interface version There were some breaking changes over the last few patches so we bump the interface version. This causes a big problem with testing: 1. To generate cross package docs, we first need to generate docs for the package used. 2. To generate package docs with new interface version, we need to use Haddock which has the version bumped. 3. To get Haddock with the version bump, we first need to test cross package docs 4. GOTO 1 So the problem is the chicken and the egg problem. It seems that the only solution would be to generate some interface files on the fly but it is non-trivial. To run this test, you'll have to: * build Haddock without the test (make sure everything else passes) * rebuild the packages used in the test with your shiny new binary making sure they are visible to Haddock * remove the ‘_hidden’ suffix and re-run the tests Note: because the packages currently used for this test are those provided by GHC, it's probably non-trivial to just re-build them. Preferably something less tedious to rebuild should be used and something that is not subject to change. - - - - - 124ae7a9 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow for nesting of paragraphs under lists. The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - c7913535 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow escaping in URLs and pictures. Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - 32326680 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update documentation. - - - - - fbef6406 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update maintainer - - - - - b40e82f4 by Mateusz Kowalczyk at 2014-01-13T02:39:25-06:00 Fixes haskell/haddock#271 Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - f4eafbf8 by Gergő Érdi at 2014-01-19T15:35:16-06:00 Support for -XPatternSynonyms Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - a8939591 by Austin Seipp at 2014-01-29T08:09:04-06:00 Update CPP check for __GLASGOW_HASKELL__ Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 30d7e9d5 by Gergő Érdi at 2014-01-31T00:15:01+08:00 <+>: Don't insert a space when concatenating empty nodes - - - - - a25ccd4d by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Fix @ code blocks In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. - - - - - 0f67305a by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Update tests This updates tests due to Haddock Trac haskell/haddock#271 fix and due to removal of TypeHoles as an extension from GHC. - - - - - 157322a7 by Gergő Érdi at 2014-01-31T01:03:17+08:00 Handle infix vs prefix names correctly everywhere, by explicitly specifying the context The basic idea is that "a" and "+" are either pretty-printed as "a" and "(+)" or "`a`" and "+" - - - - - aa6d9685 by Mateusz Kowalczyk at 2014-01-30T17:21:50+00:00 Correct whitespace in ‘hidden’ test for <+> change - - - - - 121872f0 by Mateusz Kowalczyk at 2014-02-09T17:59:12+00:00 Document module header. Fixes Haddock Trac haskell/haddock#270. - - - - - e3253746 by Mateusz Kowalczyk at 2014-02-10T21:37:48+00:00 Insert a space between module link and description Fixes Haddock Trac haskell/haddock#277. - - - - - 771d2384 by Mateusz Kowalczyk at 2014-02-10T23:27:21+00:00 Ensure a space between type signature and ‘Source’ This is briefly related to Haddock Trac haskell/haddock#249 and employs effectively the suggested fix _but_ it doesn't actually fix the reported issue. This commit simply makes copying the full line a bit less of a pain. - - - - - 8cda9eff by nand at 2014-02-11T15:48:30+00:00 Add support for type/data families This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 3f22c510 by nand at 2014-02-11T15:53:50+00:00 Improve display of poly-kinded type operators This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - effb2d6b by nand at 2014-02-11T15:56:50+00:00 Add test case for PatternSynonyms This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - b38faf0d by Niklas Haas at 2014-02-13T21:53:32+00:00 Get rid of re-implementation of sortBy I have no idea what this was doing lying around here, and due to the usage of tuples it's actually slower, too. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - ac1e0413 by Mateusz Kowalczyk at 2014-02-13T23:57:16+00:00 Only warn about missing docs when docs are missing This fixes the ‘Missing documentation for…’ message for modules with 100% coverage. - - - - - cae2e36a by Niklas Haas at 2014-02-15T21:56:18+00:00 Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 8bea5c3a by Mateusz Kowalczyk at 2014-02-19T05:11:34+00:00 Use a bespoke data type to indicate fixity This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment. - - - - - 5b52d57c by Niklas Haas at 2014-02-22T21:31:03+01:00 Strip a single leading space from bird tracks (#201) This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch. - - - - - 5a1315a5 by Simon Hengel at 2014-02-22T21:55:35+01:00 Turn a source code comment into specs - - - - - 784cfe58 by Mateusz Kowalczyk at 2014-02-23T05:02:22+00:00 Update test case for lifted GADT type rendering The parsing of these seems to have been fixed by GHC folk and it now renders differently. IMHO it now renders in a better way so I'm updating the test to reflect this. - - - - - c3c88c2f by Mateusz Kowalczyk at 2014-02-23T06:37:14+00:00 Don't shadow ‘strip’. -Wall complains - - - - - 293031d8 by Niklas Haas at 2014-02-23T15:21:52+01:00 Make ImplicitParams render correctly (#260) This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone) - - - - - 4200842d by Niklas Haas at 2014-02-23T15:37:13+01:00 Lower precedence of equality constraints This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC - - - - - b59e3227 by Niklas Haas at 2014-02-23T16:11:22+01:00 Add RankNTypes test case to ImplicitParams.hs This test actually tests what haskell/haddock#260 originally reported - I omitted the RankNTypes scenario from the original fix because I realized it's not relevant to the underlying issue and indeed, this renders as intended now. Still good to have more tests. - - - - - c373dbf7 by Mateusz Kowalczyk at 2014-02-24T06:09:54+00:00 Fix rendering of Contents when links are present Fixes Haddock Trac haskell/haddock#267. - - - - - 9ecb0e56 by Mateusz Kowalczyk at 2014-02-24T06:26:50+00:00 Fix wording in the docs - - - - - 4f4dcd8e by Mateusz Kowalczyk at 2014-02-27T03:00:33+00:00 Change rendering of duplicate record field docs See Haddock Trac haskell/haddock#195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this. - - - - - ad8aa609 by Niklas Haas at 2014-03-08T09:43:26+01:00 Render fixity information Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of. - - - - - 6a39c917 by Niklas Haas at 2014-03-09T07:43:39+01:00 Reorder topDeclElem to move the source/wiki links to the top They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom. - - - - - 2d34b3b4 by Niklas Haas at 2014-03-09T07:53:46+01:00 Use optLast instead of listToMaybe for sourceUrls/wikiUrls This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates. - - - - - 0eff4624 by Niklas Haas at 2014-03-09T07:53:46+01:00 Differentiate between TH splices (line-links) and regular names This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures. - - - - - 66d6f77b by Niklas Haas at 2014-03-09T20:02:43+01:00 Group similar fixities together Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <= - - - - - 6587f9f5 by Mateusz Kowalczyk at 2014-03-10T04:24:18+00:00 Update changelog - - - - - 7387ddad by Niklas Haas at 2014-03-11T10:26:04+01:00 Include fixity information in the Interface file This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly. - - - - - ab46ef44 by Niklas Haas at 2014-03-11T10:26:04+01:00 Update changelog - - - - - 565cab6f by Niklas Haas at 2014-03-11T10:26:04+01:00 Update appearance of fixity annotations This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present. - - - - - 5d7afd67 by Niklas Haas at 2014-03-11T10:26:05+01:00 Filter family instances of hidden types Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case. - - - - - ec291b0c by Niklas Haas at 2014-03-11T10:26:05+01:00 Add documentation for --source-entity-line - - - - - 0922e581 by Niklas Haas at 2014-03-11T10:37:32+01:00 Revert "Reorder topDeclElem to move the source/wiki links to the top" This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines. - - - - - 30618e8b by Mateusz Kowalczyk at 2014-03-11T09:41:07+00:00 Bump version to 2.15.0 - - - - - adf3f1bb by Mateusz Kowalczyk at 2014-03-11T09:41:09+00:00 Fix up some whitespace - - - - - 8905f57d by Niklas Haas at 2014-03-13T19:18:06+00:00 Hide RHS of TFs with non-exported right hand sides Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user. - - - - - 5c44d5c2 by Niklas Haas at 2014-03-13T19:18:08+00:00 Add UnicodeSyntax alternatives for * and -> I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting. - - - - - b04a63e6 by Niklas Haas at 2014-03-13T19:18:10+00:00 Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. - - - - - a4a20b16 by Niklas Haas at 2014-03-13T19:18:12+00:00 Strip links from recently added html tests These were accidentally left there when the tests were originally added - - - - - d624f315 by Mateusz Kowalczyk at 2014-03-13T19:19:31+00:00 Update changelog - - - - - d27a21ac by Mateusz Kowalczyk at 2014-03-13T21:19:07+00:00 Always read in prologue files as UTF8 (#286). - - - - - 54b2fd78 by Mateusz Kowalczyk at 2014-03-13T21:28:09+00:00 Style only - - - - - fa4fe650 by Simon Hengel at 2014-03-15T09:04:18+01:00 Add Fuuzetsu maintainers field in cabal file - - - - - f83484b7 by Niklas Haas at 2014-03-15T18:20:24+00:00 Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. - - - - - 0099d276 by Niklas Haas at 2014-03-15T18:20:26+00:00 Fix issue haskell/haddock#281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. - - - - - 1f9687bd by Mateusz Kowalczyk at 2014-03-21T17:48:37+00:00 Please cabal sdist - - - - - 75542693 by Mateusz Kowalczyk at 2014-03-22T16:36:16+00:00 Drop needless --split-objs which slows us down. Involves tiny cleanup of all the dynflag bindings. Fixes haskell/haddock#292. - - - - - 31214dc3 by Herbert Valerio Riedel at 2014-03-23T18:01:01+01:00 Fix a few typos Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 0b73e638 by Mateusz Kowalczyk at 2014-03-31T05:34:36+01:00 Print kind signatures on GADTs - - - - - 2bab42f3 by Mateusz Kowalczyk at 2014-03-31T16:53:25+01:00 Add default for new PlatformConstraints field - - - - - 42647c5f by Mateusz Kowalczyk at 2014-03-31T18:29:04+01:00 Drop leading whitespace in @-style blocks. Fixes haskell/haddock#201. - - - - - 98208294 by Niklas Haas at 2014-03-31T20:09:58+02:00 Crash when exporting record selectors of data family instances This fixes bug haskell/haddock#294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated. - - - - - 3832d171 by Mateusz Kowalczyk at 2014-04-01T19:07:33+01:00 Make CHANGES consistent with what's now in 2.14.2 - - - - - c386ae89 by Mateusz Kowalczyk at 2014-04-01T19:18:36+01:00 Actually bundle extra spec tests in sdist - - - - - bd57a6d3 by Mateusz Kowalczyk at 2014-04-03T21:13:48+01:00 Update test cases for GHC bug haskell/haddock#8945, Haddock haskell/haddock#188 The order of signature groups has been corrected upstream. Here we add a test case and update some existing test-cases to reflect this change. We remove grouped signature in test cases that we can (Minimal, BugDeprecated &c) so that the test is as self-contained as possible. - - - - - 708b88b1 by Mateusz Kowalczyk at 2014-04-03T21:16:07+01:00 Enforce strict GHC version in cabal file This stops people with 7.6.3 trying to install 2.15.x which clearly won't work. Unfortunately we shipped 2.14.x without realising this. - - - - - 60334f7c by Mateusz Kowalczyk at 2014-04-03T21:19:24+01:00 Initialise some new PlatformConstants fields - - - - - ea77f668 by Mateusz Kowalczyk at 2014-04-11T16:52:23+01:00 We don't actually want unicode here - - - - - 0b651cae by Mateusz Kowalczyk at 2014-04-11T18:13:30+01:00 Parse identifiers with ^ and ⋆ in them. Fixes haskell/haddock#298. - - - - - e8ad0f5f by Mateusz Kowalczyk at 2014-04-11T18:47:41+01:00 Ignore version string during HTML tests. - - - - - de489089 by Mateusz Kowalczyk at 2014-04-11T18:59:30+01:00 Update CHANGES to follow 2.14.3 - - - - - beb464a9 by Gergő Érdi at 2014-04-13T16:31:10+08:00 remove Origin flag from LHsBindsLR - - - - - cb16f07c by Herbert Valerio Riedel at 2014-04-21T17:16:50+02:00 Replace local `die` by new `System.Exit.die` Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 9b9b23c7 by Mateusz Kowalczyk at 2014-05-03T15:40:11+02:00 Disambiguate ‘die’ in test runners. - - - - - 5d28a2b8 by Mateusz Kowalczyk at 2014-05-05T09:19:49+02:00 Prepare modules for parser split. We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type. - - - - - d3967ff3 by Mateusz Kowalczyk at 2014-05-05T11:00:41+02:00 Move parser + parser tests out to own package. We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes. - - - - - 522a448d by Mateusz Kowalczyk at 2014-05-05T11:14:47+02:00 Move out Show and Eq instances to Types They are much more useful to the users here. - - - - - 11a6f0f2 by Mateusz Kowalczyk at 2014-05-06T13:50:31+02:00 Remove no longer necessary parser error handling. We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places. - - - - - 6992c924 by Mateusz Kowalczyk at 2014-05-14T02:23:55+02:00 Please the GHC build-system. As I can not figure out how to do this properly, if we're in GHC tree, we treat the library as being the same package. If we're not in the tree, we require that the library be installed separately. - - - - - 7a8ad763 by Mateusz Kowalczyk at 2014-05-14T14:50:25+02:00 Update issue tracker URL - - - - - f616c521 by Mateusz Kowalczyk at 2014-05-14T14:53:32+02:00 Update issue tracker URL for haddock-library - - - - - 66580ded by Gergő Érdi at 2014-05-25T14:24:16+08:00 Accomodate change in PatSyn representation - - - - - 0e43b988 by Mateusz Kowalczyk at 2014-05-29T03:15:29+02:00 Revert "Accomodate change in PatSyn representation" This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this. - - - - - e10d7ec8 by Mateusz Kowalczyk at 2014-05-29T03:24:11+02:00 Revert "Revert "Accomodate change in PatSyn representation"" This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me. - - - - - 5861aca9 by Mateusz Kowalczyk at 2014-06-05T19:49:27+02:00 Clear up highlighting of identifiers with ‘'’s. - - - - - d7cc420f by Simon Peyton Jones at 2014-06-06T12:41:09+01:00 Follow change in patSynSig - - - - - 938b4fd8 by Mateusz Kowalczyk at 2014-06-12T07:24:29+02:00 Slightly update the readme. Style-sheets are no longer a recent thing, dead links, old maintainers, different formats. - - - - - c7799dea by Mateusz Kowalczyk at 2014-06-18T00:05:56+02:00 Update cabal files Update repository urls, use subdir property for haddock-library and use a separate versioning scheme for haddock-library in preparation for release. - - - - - a2750b6a by Simon Hengel at 2014-06-18T11:01:18+08:00 Compatibility with older versions of base and bytestring - - - - - 009b4b03 by Simon Hengel at 2014-06-18T11:14:01+08:00 Enable travis-ci for haddock-library - - - - - 9b5862eb by Simon Hengel at 2014-06-18T11:14:01+08:00 haddock-library: Do not depend on haddock-library in test suite I think you either add src to hs-source-dirs or the library to build-depends. But doing both does not make sense (AFAICT). - - - - - fb1f3279 by Simon Hengel at 2014-06-18T11:49:05+08:00 haddock-library: Use -Wall for specs - - - - - 649340e1 by Mateusz Kowalczyk at 2014-06-18T06:58:54+02:00 Use Travis with multiple GHC versions When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project. - - - - - d7eeeec2 by Mateusz Kowalczyk at 2014-06-18T07:49:04+02:00 Comment improvements + few words in cabal file - - - - - 0f8db914 by Simon Hengel at 2014-06-18T13:52:23+08:00 Use doctest to check examples in documentation - - - - - 2888a8dc by Simon Hengel at 2014-06-18T14:16:48+08:00 Remove doctest dependency (so that we can use haddock-library with doctest) - - - - - 626d5e85 by Mateusz Kowalczyk at 2014-06-18T08:41:25+02:00 Travis tweaks - - - - - 41d4f9cc by Mateusz Kowalczyk at 2014-06-18T08:58:43+02:00 Don't actually forget to install specified GHC. - - - - - c6aa512a by John MacFarlane at 2014-06-18T10:43:57-07:00 Removed reliance on LambdaCase (which breaks build with ghc 7.4). - - - - - b9b93b6f by John MacFarlane at 2014-06-18T10:54:56-07:00 Fixed haddock warnings. - - - - - a41b0ab5 by Mateusz Kowalczyk at 2014-06-19T01:20:10+02:00 Update Travis, bump version - - - - - 864bf62a by Mateusz Kowalczyk at 2014-06-25T10:36:54+02:00 Fix anchors. Closes haskell/haddock#308. - - - - - 53df91bb by Mateusz Kowalczyk at 2014-06-25T15:04:49+02:00 Drop DocParagraph from front of headers I can not remember why they were wrapped in paragraphs to begin with and it seems unnecessary now that I test it. Closes haskell/haddock#307. - - - - - 29b5f2fa by Mateusz Kowalczyk at 2014-06-25T15:17:20+02:00 Don't mangle append order for nested lists. The benefit of this is that the ‘top-level’ element of such lists is properly wrapped in <p> tags so any CSS working with these will be applied properly. It also just makes more sense. Pointed out at jgm/pandoc#1346. - - - - - 05cb6e9c by Mateusz Kowalczyk at 2014-06-25T15:19:45+02:00 Bump haddock-library to 1.1.0 for release - - - - - 70feab15 by Iavor Diatchki at 2014-07-01T03:37:07-07:00 Propagate overloading-mode for instance declarations in haddock (#9242) - - - - - d4ca34a7 by Simon Peyton Jones at 2014-07-14T16:23:15+01:00 Adapt to new definition of HsDecls.TyFamEqn This is a knock-on from the refactoring from Trac haskell/haddock#9063. I'll push the corresponding changes to GHC shortly. - - - - - f91e2276 by Edward Z. Yang at 2014-07-21T08:14:19-07:00 Track GHC PackageId to PackageKey renaming. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - b010f9ef by Edward Z. Yang at 2014-07-25T16:28:46-07:00 Track changes for module reexports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - 8b85f9f9 by Mateusz Kowalczyk at 2014-07-28T13:25:43+02:00 Catch mid-line URLs. Fixes haskell/haddock#314. - - - - - 4c613a78 by Edward Z. Yang at 2014-08-05T03:11:00-07:00 Track type signature change of lookupModuleInAllPackages Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - e80b051c by Edward Z. Yang at 2014-08-05T17:34:26+01:00 If GhcProfiled, also build Haddock profiled. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f9cccd29 by Edward Z. Yang at 2014-08-07T14:23:35+01:00 Ignore TAGS files. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 00b3af52 by Mateusz Kowalczyk at 2014-08-08T04:58:19+02:00 Update to attoparsec-0.12.1.1 There seems to be memory and speed improvement. - - - - - 5457dc71 by Mateusz Kowalczyk at 2014-08-08T18:24:02+02:00 Fix forgotten src - - - - - 3520cb04 by Mateusz Kowalczyk at 2014-08-14T20:19:07+01:00 Bump down the version for master to 2.14.4 - - - - - dc98c21b by Mateusz Kowalczyk at 2014-08-14T20:23:27+01:00 Revert "Track type signature change of lookupModuleInAllPackages" This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f. - - - - - 3f2038c0 by Mateusz Kowalczyk at 2014-08-14T20:23:31+01:00 Revert "Track changes for module reexports." This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d. - - - - - 56d4e49e by Mateusz Kowalczyk at 2014-08-14T20:23:42+01:00 Revert "Track GHC PackageId to PackageKey renaming." This reverts commit 8ac42d3327473939c013551750425cac191ff0fd. - - - - - 726ea3cb by Mateusz Kowalczyk at 2014-08-14T20:23:47+01:00 Revert "Adapt to new definition of HsDecls.TyFamEqn" This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd. - - - - - 61a88ff0 by Mateusz Kowalczyk at 2014-08-14T20:23:52+01:00 Revert "Propagate overloading-mode for instance declarations in haddock (#9242)" This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c. - - - - - a32ba674 by Mateusz Kowalczyk at 2014-08-14T20:26:03+01:00 Revert "Disambiguate ‘die’ in test runners." This reverts commit dba02d6df32534aac5d257f2d28596238d248942. - - - - - f335820f by Mateusz Kowalczyk at 2014-08-14T20:26:09+01:00 Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. - - - - - 107078e4 by Mateusz Kowalczyk at 2014-08-14T20:27:34+01:00 Merge branch 'reverts' This reverts any changes that were made to have Haddock compile with 7.9. When 7.10 release comes, we can simply re-apply all the patches and any patches that occur on ghc-head branch from now on. This allows us to build master with 7.8.3 - - - - - b44b3871 by Mateusz Kowalczyk at 2014-08-15T02:47:40+01:00 Fix haskell/haddock#313 by doing some list munging. I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly. - - - - - e1a62cde by Mateusz Kowalczyk at 2014-08-15T02:52:56+01:00 Stop testing haskell/haddock#188. Because the change is in GHC 7.9 and we now work against 7.8.3, this test no longer makes sense. We revert it until 7.10 becomes the standard version. If anything, there should be a test for this in GHC itself. - - - - - 54e8286d by Mateusz Kowalczyk at 2014-08-15T05:31:57+01:00 Add haskell/haddock#313 to CHANGES - - - - - 9df7ad5d by Simon Hengel at 2014-08-20T11:25:32+08:00 Fix warning - - - - - ee2574d6 by Simon Hengel at 2014-08-20T12:07:01+08:00 Fix travis builds - - - - - 384cf2e6 by Simon Hengel at 2014-08-20T12:14:31+08:00 Require GHC 7.8.3 - - - - - d4779863 by Simon Hengel at 2014-08-22T12:14:16+08:00 Move Haddock API to a separate package - - - - - 80f3e0e1 by Simon Hengel at 2014-08-22T14:57:38+08:00 Bump version to 2.15.0 and add version constraints - - - - - 309a94ce by Simon Hengel at 2014-08-22T15:18:06+08:00 Add deprecated compatibility module - - - - - 4d1e4e3f by Luite Stegeman at 2014-08-22T20:46:45+02:00 export things to allow customizing how the Ghc session is run - - - - - 47884591 by Luite Stegeman at 2014-08-22T20:46:51+02:00 ghc 7.8.2 compatibility - - - - - 5ea94e2c by Luite Stegeman at 2014-08-22T22:08:58+02:00 install dependencies for haddock-api on travis - - - - - 9fb845b2 by Mateusz Kowalczyk at 2014-08-23T10:09:34+01:00 Move sources under haddock-api/src - - - - - 85817dc4 by Mateusz Kowalczyk at 2014-08-23T10:10:48+01:00 Remove compat stuff - - - - - 151c6169 by Niklas Haas at 2014-08-24T08:14:10+02:00 Fix extra whitespace on signatures and update all test cases This was long overdue, now running ./accept.lhs on a clean test from master will not generate a bunch of changes. - - - - - d320e0d2 by Niklas Haas at 2014-08-24T08:14:35+02:00 Omit unnecessary foralls and fix haskell/haddock#315 This also fixes haskell/haddock#86. - - - - - bdafe108 by Mateusz Kowalczyk at 2014-08-24T15:06:46+01:00 Update CHANGES - - - - - fafa6d6e by Mateusz Kowalczyk at 2014-08-24T15:14:23+01:00 Delete few unused/irrelevant/badly-place files. - - - - - 3634923d by Duncan Coutts at 2014-08-27T13:49:31+01:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. - - - - - 539a7e70 by Herbert Valerio Riedel at 2014-08-31T11:36:32+02:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 9e3a0e5b by Mateusz Kowalczyk at 2014-08-31T12:54:43+01:00 Bump version in doc - - - - - 4a177525 by Mateusz Kowalczyk at 2014-08-31T13:01:23+01:00 Bump haddock-library version - - - - - f99c1384 by Mateusz Kowalczyk at 2014-08-31T13:05:25+01:00 Remove references to deleted files - - - - - 5e51a247 by Mateusz Kowalczyk at 2014-08-31T14:18:44+01:00 Make the doc parser not complain - - - - - 2cedb49a by Mateusz Kowalczyk at 2014-09-03T03:33:15+01:00 CONTRIBUTING file for issues - - - - - 88027143 by Mateusz Kowalczyk at 2014-09-04T00:46:59+01:00 Mention --print-missing-docs - - - - - 42f6754f by Alan Zimmerman at 2014-09-05T18:13:24-05:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e712719e by Austin Seipp at 2014-09-09T01:03:27-05:00 Fix import of 'empty' due to AMP. Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 71c29755 by Herbert Valerio Riedel at 2014-09-09T17:35:20+02:00 Bump `base` constraint for AMP - - - - - 0bf9f3ed by Mateusz Kowalczyk at 2014-09-12T19:18:32+01:00 Delete stale ANNOUNCE - - - - - cac89ee6 by Krzysztof Gogolewski at 2014-09-14T17:17:09+02:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 4d683426 by Edward Z. Yang at 2014-09-18T13:38:11-07:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 80697fd5 by Herbert Valerio Riedel at 2014-09-19T00:07:52+02:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. - - - - - c015eb70 by Herbert Valerio Riedel at 2014-09-19T00:10:36+02:00 Revert "Followup changes to addition of -fwarn-context-quantification" This reverts commit 4023817d7c0e46db012ba2eea28022626841ca9b temporarily as the respective feature hasn't landed in GHC HEAD yet, but this commit blocks later commits from being referenced in GHC HEAD. - - - - - 38ded784 by Edward Z. Yang at 2014-09-18T15:32:15-07:00 Revert "Revert "Followup changes to addition of -fwarn-context-quantification"" This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now. - - - - - f55d59c9 by Herbert Valerio Riedel at 2014-09-26T19:18:28+02:00 Revert "Fix import of 'empty' due to AMP." This reverts commit 0cc5bc85e9fca92ab712b68a2ba2c0dd9d3d79f4 since it turns out we don't need to re-export `empty` from Control.Monad after all. - - - - - 467050f1 by David Feuer at 2014-10-09T20:07:36-04:00 Fix improper lazy IO use Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. - - - - - cc47b699 by Edward Z. Yang at 2014-10-09T21:38:19-07:00 Fix use-after-close lazy IO bug Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. Signed-off-by: David Feuer <David.Feuer at gmail.com> Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 87babcbe by Austin Seipp at 2014-10-20T20:05:27-05:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - ab259516 by Austin Seipp at 2014-10-20T20:07:01-05:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - b918093c by Mateusz Kowalczyk at 2014-10-29T03:59:39+00:00 Experimental support for collapsable headers Closes haskell/haddock#335 - - - - - 849db129 by Mateusz Kowalczyk at 2014-10-29T10:07:26+01:00 Experimental support for collapsable headers (cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc) - - - - - a4cc4789 by Herbert Valerio Riedel at 2014-10-31T11:08:26+01:00 Collapse user-defined section by default (re haskell/haddock#335) - - - - - 9da1b33e by Yuras Shumovich at 2014-10-31T16:11:04-05:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - c625aefc by Austin Seipp at 2014-10-31T19:34:10-05:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - c7738e5e by Simon Hengel at 2014-11-02T07:25:30+08:00 Remove -fobject-code from .ghci (this slows down reloads on modifications) - - - - - d4a86e95 by Simon Hengel at 2014-11-03T09:26:11+08:00 Get rid of StandaloneDeriving - - - - - a974e311 by Simon Hengel at 2014-11-03T09:26:11+08:00 Derive more instances - - - - - 8aa0c4d7 by Simon Hengel at 2014-11-03T09:27:08+08:00 Remove unused language extensions - - - - - 3052d46a by Simon Hengel at 2014-11-03T09:30:46+08:00 Minor refactoring - - - - - 4281d3cb by Simon Hengel at 2014-11-03T09:30:46+08:00 parser: Try to parse definition lists right before text paragraphs - - - - - 8ba12bf9 by Simon Hengel at 2014-11-03T09:34:19+08:00 Add support for markdown links (closes haskell/haddock#336) - - - - - a2f8d747 by Simon Hengel at 2014-11-03T09:34:19+08:00 Allow markdown links at the beginning of a paragraph - - - - - 53b11207 by Simon Hengel at 2014-11-03T09:34:20+08:00 Update documentation - - - - - 652267c6 by Simon Hengel at 2014-11-03T09:34:20+08:00 Add support for markdown images - - - - - 9d667502 by Simon Hengel at 2014-11-03T09:34:20+08:00 Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. - - - - - 8167fc32 by Mateusz Kowalczyk at 2014-11-04T01:16:51+00:00 whitespace only - - - - - 3da62981 by Mateusz Kowalczyk at 2014-11-04T01:17:31+00:00 Fix re-exports of built-in type families Fixes haskell/haddock#310 - - - - - edc76b34 by Mateusz Kowalczyk at 2014-11-04T02:54:28+00:00 Turn some uses of error into recoverable warnings This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end. - - - - - 0a137400 by Mateusz Kowalczyk at 2014-11-04T04:09:44+00:00 Fix warnings - - - - - d068fc21 by Mateusz Kowalczyk at 2014-11-04T21:04:07+00:00 Fix parsing of identifiers written in infix way - - - - - 1a9f2f3d by Simon Hengel at 2014-11-08T11:32:42+08:00 Minor code simplification - - - - - 6475e9b1 by Simon Hengel at 2014-11-08T17:28:33+08:00 newtype-wrap parser monad - - - - - dc1ea105 by Herbert Valerio Riedel at 2014-11-15T11:55:43+01:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - fbb1aca4 by Simon Hengel at 2014-11-16T08:51:38+08:00 State intention rather than implementation details in Haddock comment - - - - - 97851ab2 by Simon Hengel at 2014-11-16T10:20:19+08:00 (wip) Add support for @since (closes haskell/haddock#26) - - - - - 34bcd18e by Gergő Érdi at 2014-11-20T22:35:38+08:00 Update Haddock to new pattern synonym type signature syntax - - - - - 304b7dc3 by Jan Stolarek at 2014-11-20T17:48:43+01:00 Follow changes from haskell/haddock#9812 - - - - - 920f9b03 by Richard Eisenberg at 2014-11-20T16:52:50-05:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 0bfe4e78 by Alan Zimmerman at 2014-11-21T11:23:09-06:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 356ed45a by Thomas Winant at 2014-11-28T16:11:22-06:00 Support for PartialTypeSignatures - - - - - 5dc8f3b1 by Gergő Érdi at 2014-11-29T15:39:09+08:00 For pattern synonyms, render "pattern" as a keyword - - - - - fe704480 by Mateusz Kowalczyk at 2014-12-09T03:38:32+00:00 List new module in cabal file - - - - - b9ad5a29 by Mateusz Kowalczyk at 2014-12-10T00:58:24+00:00 Allow the parser to spit out meta-info Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes haskell/haddock#26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves. - - - - - 765af0e3 by Mateusz Kowalczyk at 2014-12-10T01:17:19+00:00 Update doctest parts of comments - - - - - 8670272b by jpmoresmau at 2014-12-10T01:35:31+00:00 header could contain several lines Closes haskell/haddock#348 - - - - - 4f9ae4f3 by Mateusz Kowalczyk at 2014-12-12T06:22:31+00:00 Revert "Merge branch 'reverts'" This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - e974ac94 by Duncan Coutts at 2014-12-12T06:26:11+00:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. Conflicts: haddock-api/src/Haddock.hs - - - - - 2f3a2365 by Herbert Valerio Riedel at 2014-12-12T06:26:51+00:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 1dbd6390 by Alan Zimmerman at 2014-12-12T06:32:07+00:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - bb6ff1f4 by Mateusz Kowalczyk at 2014-12-12T06:35:07+00:00 Bump ‘base’ constraint Follows the similar commit made on ghc-head branch - - - - - 466fe4ab by Krzysztof Gogolewski at 2014-12-12T06:37:42+00:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 97e080c9 by Edward Z. Yang at 2014-12-12T06:39:35+00:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs - - - - - 20b2af56 by Herbert Valerio Riedel at 2014-12-12T06:42:50+00:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. Conflicts: haddock-library/src/Documentation/Haddock/Parser.hs - - - - - b3ad269d by Austin Seipp at 2014-12-12T06:44:14+00:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 072df0dd by Austin Seipp at 2014-12-12T06:45:01+00:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - dbb9294a by Herbert Valerio Riedel at 2014-12-12T06:46:17+00:00 Collapse user-defined section by default (re haskell/haddock#335) Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - - - - - f23ab545 by Yuras Shumovich at 2014-12-12T06:46:41+00:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - 753a4b67 by Austin Seipp at 2014-12-12T06:46:51+00:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8954e8f5 by Herbert Valerio Riedel at 2014-12-12T06:50:53+00:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - d2b06d61 by Gergő Érdi at 2014-12-12T07:07:30+00:00 Update Haddock to new pattern synonym type signature syntax Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 1ff02426 by Jan Stolarek at 2014-12-12T07:13:24+00:00 Follow changes from haskell/haddock#9812 Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - 06ad7600 by Richard Eisenberg at 2014-12-12T07:13:43+00:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 8fd2aa8b by Alan Zimmerman at 2014-12-12T07:22:25+00:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Backends/LaTeX.hs haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 95c3db98 by Thomas Winant at 2014-12-12T07:35:49+00:00 Support for PartialTypeSignatures Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs haddock-api/src/Haddock/Interface/Create.hs - - - - - 45494428 by Gergő Érdi at 2014-12-12T07:36:18+00:00 For pattern synonyms, render "pattern" as a keyword - - - - - a237e3eb by Mateusz Kowalczyk at 2014-12-12T12:27:13+00:00 Various fixups and bumps for next release - - - - - 22918bcd by Herbert Valerio Riedel at 2014-12-14T10:11:47+01:00 Remove redundant wild-card pattern match (this would otherwise cause a build-failure with `-Werror`) - - - - - 1d6ce947 by Herbert Valerio Riedel at 2014-12-14T10:17:06+01:00 Treat GHC 7.10 the same as GHC 7.9 ...since the current GHC 7.9 is going to become GHC 7.10 real-soon-now anyway - - - - - f434ea89 by Herbert Valerio Riedel at 2014-12-14T18:26:50+01:00 Fixup ghc.mk (follow-up to 1739375eb23342) This makes the GHC build-system aware of the data-files to be copied into the bindist (as haddock.cabal doesn't list those anymore) - - - - - 6fb839eb by Mateusz Kowalczyk at 2014-12-17T09:28:59+00:00 Only keep one Version instead of blindly appending - - - - - 40645489 by Mateusz Kowalczyk at 2014-12-18T07:09:44+00:00 Fix dependency version - - - - - 8b3b927b by Mateusz Kowalczyk at 2014-12-18T07:14:23+00:00 Print missing docs by default Adds --no-print-missing-docs - - - - - 59666694 by Mateusz Kowalczyk at 2014-12-18T07:21:37+00:00 update changelog - - - - - aa6d168e by Mateusz Kowalczyk at 2014-12-18T07:30:58+00:00 Update docs for @since - - - - - 2d7043ee by Luite Stegeman at 2014-12-19T18:29:35-06:00 hide projectVersion from DynFlags since it clashes with Haddock.Version.projectVersion - - - - - aaa70fc0 by Luite Stegeman at 2014-12-22T15:58:43+01:00 Add missing import for standalone haddock-api package - - - - - 9ce01269 by Herbert Valerio Riedel at 2014-12-22T17:48:45+01:00 Reset ghc-head with master's tree (this is an overwriting git merge of master into ghc-head) - - - - - fcd6fec1 by Herbert Valerio Riedel at 2014-12-22T17:51:52+01:00 Bump versions for ghc-7.11 - - - - - 525ec900 by Mateusz Kowalczyk at 2014-12-23T13:36:24+00:00 travis-ci: test with HEAD - - - - - cbf494b5 by Simon Peyton Jones at 2014-12-23T15:22:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 50e01c99 by Mateusz Kowalczyk at 2014-12-29T15:28:47+00:00 Make travis use 7.10.x - - - - - 475e60b0 by Njagi Mwaniki at 2014-12-29T15:30:44+00:00 Turn the README into GitHub Markdown format. Closes haskell/haddock#354 - - - - - 8cacf48e by Luite Stegeman at 2015-01-05T16:25:37+01:00 bump haddock-api ghc dependency to allow release candidate and first release - - - - - 6ed6cf1f by Simon Peyton Jones at 2015-01-06T16:37:47+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 8b484f33 by Simon Peyton Jones at 2015-01-08T15:50:22+00:00 Track naming change in DataCon - - - - - 23c5c0b5 by Alan Zimmerman at 2015-01-16T10:15:11-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e7a5532c by JP Moresmau at 2015-01-22T17:19:03+00:00 Ignore warnings, install Cabal 1.22 - - - - - 86942c84 by jpmoresmau at 2015-01-22T17:19:04+00:00 solve dataDir ambiguity - - - - - 5ceb743e by jpmoresmau at 2015-01-22T19:17:32+00:00 support GHC 7.10: no Safe-Inferred, Foldable instance - - - - - 6a3b3fb5 by Mateusz Kowalczyk at 2015-01-22T19:32:10+00:00 Update test files Test: a correct behaviour for fields comma-separating values. I'm surprised we had no bug open for this. Maybe it affects how haskell/haddock#301 renders now but I doubt. Operators: Seems GHC is giving us a new order for operators, something must have changed on their side again. cc @haasn , this makes the fixity to the side not match the order on the LHS which is a bit unpleasant. Maybe the fixity can be made to match the GHC order? Bug335: We expand examples by default now. Bug310: Now inferred safe. - - - - - 708f8b2f by jpmoresmau at 2015-01-22T19:36:59+00:00 Links to source location of class instance definitions - - - - - 5cf8a6da by Vincent Berthoux at 2015-01-22T19:59:58+00:00 Filter '\r' from comments due to Windows problems. On Windows this was causing newline to be rendered twice in code blocks. Closes haskell/haddock#359, fixes haskell/haddock#356. - - - - - 1749e6f0 by Mateusz Kowalczyk at 2015-01-22T20:31:27+00:00 Changelog only - - - - - c8145f90 by Mateusz Kowalczyk at 2015-01-22T23:34:05+00:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. - - - - - 14248254 by Mateusz Kowalczyk at 2015-01-22T23:43:18+00:00 Sort out some module import warnings - - - - - d8a38989 by Simon Peyton Jones at 2015-01-23T07:10:16-06:00 Track naming change in DataCon (cherry picked from commit 04cf63d0195837ed52075ed7d2676e71831e8a0b) - - - - - d3ac6ae4 by Alan Zimmerman at 2015-01-23T07:17:19-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit d61bbc75890e4eb0ad508b9c2a27b91f691213e6) - - - - - 4c1ffeb0 by Simon Peyton Jones at 2015-02-10T12:10:33+00:00 Track changes in HsSyn for quasi-quotes - - - - - 775d20f7 by Mateusz Kowalczyk at 2015-03-15T08:11:48+01:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. (cherry picked from commit 8e06728afb0784128ab2df0be7a5d7a191d30ff4) - - - - - f9245e72 by Phil Ruffwind at 2015-03-16T04:32:01-04:00 Prevent Synopsis from using up too much horizontal space When long type signatures occur in the Synopsis, the element is stretched beyond the width of the window. Scrollbars don't appear, so it's impossible to read anything when this happens. - - - - - cd8fa415 by Mateusz Kowalczyk at 2015-03-17T21:59:39+00:00 Update changelog Closes haskell/haddock#151 due to 71170fc77962f10d7d001e3b8bc8b92bfeda99bc - - - - - b5248b47 by Ben Gamari at 2015-03-25T17:12:17+00:00 Make the error encountered when a package can't be found more user-friendly Closes haskell/haddock#369 - - - - - b756b772 by Mateusz Kowalczyk at 2015-03-26T16:31:40+00:00 Remove now redundant imports - - - - - 5ea5e8dd by Mateusz Kowalczyk at 2015-03-26T16:45:52+00:00 Update test to account for \r filtering - - - - - 6539bfb3 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Test for anchor defaulting I delete the old tests because it turns out that: * test runner would never put them in scope of each other even with imports so just one would suffice * test runner actually needed some hacking to keep links so in the end we would end up with no anchors making them useless - - - - - 1a01d950 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Clearly default to variables in out of scope case - - - - - 7943abe8 by Mateusz Kowalczyk at 2015-03-27T01:14:11+00:00 Fix Hoogle display of constructors Fixes haskell/haddock#361 - - - - - 6d6e587e by Mateusz Kowalczyk at 2015-03-27T01:45:18+00:00 Fully qualify names in Hoogle instances output Closes haskell/haddock#263 - - - - - 52dac365 by Mateusz Kowalczyk at 2015-03-27T01:55:01+00:00 Update changelog - - - - - ca5af9a8 by Mateusz Kowalczyk at 2015-03-27T02:43:55+00:00 Output method documentation in Hoogle backend One thing of note is that we no longer preserve grouping of methods and print each method on its own line. We could preserve it if no documentation is present for any methods in the group if someone asks for it though. Fixes haskell/haddock#259 - - - - - a33f0c10 by Mateusz Kowalczyk at 2015-03-27T03:04:21+00:00 Don't print instance safety information in Hoogle Fixes haskell/haddock#168 - - - - - df6c935a by Mateusz Kowalczyk at 2015-03-28T00:11:47+00:00 Post-release version bumps and changelog - - - - - dde8f7c0 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Loosen bounds on haddock-* - - - - - de93bf89 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Expand response files in arguments Closes haskell/haddock#285 - - - - - 1f0b0856 by Zejun Wu at 2015-04-26T16:35:35-07:00 Do not insert anchor for section headings in contents box - - - - - 860439d7 by Simon Peyton Jones at 2015-05-01T09:36:47+01:00 Track change in API of TyCon - - - - - a32f3e5f by Adam Gundry at 2015-05-04T15:32:59+01:00 Track API changes to support empty closed type familes - - - - - 77e98bee by Ben Gamari at 2015-05-06T20:17:08+01:00 Ignore doc/haddock.{ps,pdf} - - - - - 663d0204 by Murray Campbell at 2015-05-11T04:47:37-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8bb0dcf5 by Murray Campbell at 2015-05-11T06:35:06-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit 2380f07c430c525b205ce2eae6dab23c8388d899) - - - - - bad900ea by Adam Bergmark at 2015-05-11T15:29:39+01:00 haddock-library: require GHC >= 7.4 `Data.Monoid.<>` was added in base-4.5/GHC-7.4 Closes haskell/haddock#394 Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - daceff85 by Simon Peyton Jones at 2015-05-13T12:04:21+01:00 Track the new location of setRdrNameSpace - - - - - 1937d1c4 by Alan Zimmerman at 2015-05-25T21:27:15+02:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - ee0fb6c2 by Łukasz Hanuszczak at 2015-05-27T11:51:31+02:00 Create simple method for indentation parsing. - - - - - 7d6fcad5 by Łukasz Hanuszczak at 2015-05-27T21:36:13+02:00 Make nested lists count indentation according to first item. - - - - - d6819398 by Łukasz Hanuszczak at 2015-05-27T22:46:13+02:00 Add simple test case for arbitrary-depth list nesting. - - - - - 2929c54d by Łukasz Hanuszczak at 2015-06-03T02:11:31+02:00 Add arbitrary-indent spec test for parser. - - - - - 9a0a9bb0 by Mateusz Kowalczyk at 2015-06-03T05:25:29+01:00 Update docs with info on new list nesting rule Fixes haskell/haddock#278 through commits from PR haskell/haddock#401 - - - - - 12efc92c by Mateusz Kowalczyk at 2015-06-03T05:29:26+01:00 Update some meta data at the top of the docs - - - - - 765ee49f by Bartosz Nitka at 2015-06-07T08:40:59-07:00 Add some Hacking docs for getting started - - - - - 19aaf851 by Bartosz Nitka at 2015-06-07T08:44:30-07:00 Fix markdown - - - - - 2a90cb70 by Mateusz Kowalczyk at 2015-06-08T15:08:36+01:00 Refine hacking instructions slightly - - - - - 0894da6e by Thomas Winant at 2015-06-08T23:47:28-05:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 10a9bb76 by Emanuel Borsboom at 2015-06-12T02:46:23+01:00 Build executable with '-threaded' (fixes haskell/haddock#399) - - - - - 7696b94f by Mateusz Kowalczyk at 2015-06-12T02:59:19+01:00 Update changelog for -threaded Closes haskell/haddock#400 - - - - - d3c118ec by Bartosz Nitka at 2015-06-12T03:00:58+01:00 Fix haddock: internal error: spliceURL UnhelpfulSpan (#207) Inferred type signatures don't have SrcSpans, so let's use the one from the declaration. I've tested this manually on the test-case from haskell/haddock#207, but I got stuck at trying to run the test-suite. - - - - - b67e843b by Mateusz Kowalczyk at 2015-06-12T03:01:50+01:00 Changelog for haskell/haddock#207 Fixes haskell/haddock#207, closes haskell/haddock#402 - - - - - 841d785e by jpmoresmau at 2015-06-12T16:03:16+01:00 Attach to instance location the name that has the same location file Fixes haskell/haddock#383 - - - - - 98791cae by Mateusz Kowalczyk at 2015-06-12T16:08:27+01:00 Update changelog Closes haskell/haddock#398 - - - - - 7c0b5a87 by Phil Ruffwind at 2015-06-12T13:07:25-04:00 Fix alignment of Source links in instance table in Firefox Due to a Firefox bug [1], a combination of 'whitespace: nowrap' on the parent element with 'float: right' on the inner element can cause the floated element to be displaced downwards for no apparent reason. To work around this, the left side is wrapped in its own <span> and set to 'float: left'. As a precautionary measure to prevent the parent element from collapsing entirely, we also add the classic "clearfix" hack. The latter is not strictly needed but it helps prevent bugs if the layout is altered again in the future. Fixes haskell/haddock#384. Remark: line 159 of src/Haddock/Backends/Xhtml/Layout.hs was indented to prevent confusion over the operator precedence of (<+>) vs (<<). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=488725 - - - - - cfe86e73 by Mateusz Kowalczyk at 2015-06-14T10:49:01+01:00 Update tests for the CSS changes - - - - - 2d4983c1 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding for Haskell source parser module. - - - - - 29548785 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement function for tagging parsed chunks with source spans. - - - - - 6a5e4074 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement simple string chunking based on HsColour library. - - - - - 6e52291f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create basic token classification method. - - - - - da971a27 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Adapt source span tagging to work with current whitespace handling. - - - - - 4feb5a22 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add record accessors to exports of hyperlinker parser module. - - - - - a8cc4e39 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Make parser module export all types and associated accessors. - - - - - fb8d468f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple HTML renderer for parsed source file. - - - - - 80747822 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for specifying the CSS file path in HTML source renderer. - - - - - 994dc1f5 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix identifier recognition in Haskell source parser. - - - - - b1bd0430 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix comment recognition in Haskell source parser. - - - - - 11db85ae by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for recognizing compiler pragmas in source parser. - - - - - 736c7bd3 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding of module for associating tokens with AST names. - - - - - 7e149bc2 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement utility method for extracting variable identifiers from AST. - - - - - 32eb640a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple mechanism for associating tokens with AST names. - - - - - d4eba5bc by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add dummy support for hyperlinking named tokens. - - - - - 2b76141f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matcher bug causing wrong items being hyperlinked. - - - - - 2d48002e by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Constrain elements exported by hyperlinker modules. - - - - - 9715eec6 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for type token recognition. - - - - - 8fa401cb by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for binding token recognition. - - - - - d062400b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement go-to-definition mechanism for local bindings. - - - - - f4dc229b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement module export- and import-list item hyperlinking. - - - - - c9a46d58 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matching to allow parenthesized operators hyperlinking. - - - - - 03aad95a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix weird hyperlinking of parenthesized operators. - - - - - b4694a7d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for type declaration anchors. - - - - - 7358d2d2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for top-level function declaration anchors. - - - - - dfc24b24 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix external anchors to contain HTML file extension. - - - - - a045926c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Refactor the way AST names are handled within detailed tokens. - - - - - c76049b4 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement hyperlinking of imported module names. - - - - - 2d2a1572 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix parsing of single line comments with broken up newlines. - - - - - 11afdcf2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix bug with improper newline handling. - - - - - 8137f104 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issues with escaped newlines in comments. - - - - - 34759b19 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for parsing C preprocessor macros. - - - - - 09f0f847 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for parser module of source hyperlinker. - - - - - 709a8389 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for AST module of source hyperlinker. - - - - - 4df5c227 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add command line option for generating hyperlinked source. - - - - - 7a755ea2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Extend module interface with rich source token stream field. - - - - - 494f4ab1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement source tokenization during interface creation process. - - - - - 5f21c953 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create hyperlinker module and plug it into the Haddock pipeline. - - - - - 0cc8a216 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for providing custom CSS files for hyperlinked source. - - - - - a32bbdc1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for fancy highlighting upon hovering over identifier. - - - - - d16d642a by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make source hyperlinker generate output in apropriate directory. - - - - - ae12953d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create module with hyperlinker utility functions. - - - - - 6d4952c5 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make external hyperlinks point to locations specified by source URLs. - - - - - 8417555d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Rewrite source generation to fixed links and directory structure. - - - - - ce9cec01 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add basic support for cross-package hyperlink generation. - - - - - 7eaf025c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Disable generating hyperlinks for module references. - - - - - a50bf92e by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make Haddock generate source for all interfaces (also hidden ones). - - - - - f5ae2838 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Prevent source parser from throwing exception when lexing fails. - - - - - db9ffbe0 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement workaround for Chrome highlighting issues. - - - - - 0b6b453b by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate correct anchors for data constructors. - - - - - c86d38bc by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate anchors for record field declarations. - - - - - 063abf7f by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issue with hyperlink highlight styling in Chrome browser. - - - - - 880fc611 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking constructor names in patters. - - - - - c9e89b95 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record patterns. - - - - - 17a11996 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record expressions. - - - - - 0eef932d by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Make hyperlinker respect pretty-printer flag and add documentation. - - - - - f87c1776 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Unexpose hyperlinker modules in Cabal configuration. - - - - - 4c9e2b06 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Setup HSpec framework for Haddock API package. - - - - - 4b20cb30 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add basic tests related to comment parsing. - - - - - 6842e919 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add tests related to parsing basic language constructs. - - - - - 87bffb35 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add simple tests for do-notation parsing. - - - - - e7af1841 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add very simple QuickCheck properties for source parser spec. - - - - - c84efcf1 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Create simple test runner for hyperlinker tests. - - - - - 76b90447 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for basic identifier hyperlinking. - - - - - 0fbf4df6 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for operator hyperlinking. - - - - - 731aa039 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for constructor hyperlinking. - - - - - 995a78a2 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for record expressions and patterns hyperlinking. - - - - - 3566875a by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for literal syntax highlighting. - - - - - 68469a35 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add hyperlinker test runner to .cabal and .gitignore files. - - - - - aa946c93 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Adapt hyperlinker test runner to have the same interface as HTML one. - - - - - ce34da16 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Fix hyperlinker test runner file paths and add pretty-printing option. - - - - - 0d7dd65e by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add reference files for hyperlinker test cases. - - - - - efa4a1e0 by Łukasz Hanuszczak at 2015-07-01T00:47:32+02:00 Make hyperlinker test runner strip local links from generated source. - - - - - 3e96e584 by Łukasz Hanuszczak at 2015-07-01T01:14:59+02:00 Create simple script for accepting hyperlinker test case references. - - - - - 526fe610 by Łukasz Hanuszczak at 2015-07-01T01:16:41+02:00 Re-accept hyperlinker test cases with local references stripped out. - - - - - 892e2cb3 by Łukasz Hanuszczak at 2015-07-01T01:22:09+02:00 Fix bug with diffing wrong files in hyperlinker test runner. - - - - - 9ff46039 by Łukasz Hanuszczak at 2015-07-01T18:04:46+02:00 Remove unused dependencies in Haddock API spec configuration. - - - - - 47969c07 by Łukasz Hanuszczak at 2015-07-01T18:32:19+02:00 Add support for hyperlinking synonyms in patterns. - - - - - a73449e0 by Łukasz Hanuszczak at 2015-07-01T18:33:44+02:00 Create test case for hyperlinking @-patterns. - - - - - c2077ed8 by Łukasz Hanuszczak at 2015-07-01T19:06:04+02:00 Add support for hyperlinking universally quantified type variables. - - - - - 68017342 by Łukasz Hanuszczak at 2015-07-01T19:28:32+02:00 Create hyperlinker test case with quantified type variables. - - - - - 51c01a78 by Łukasz Hanuszczak at 2015-07-01T19:34:22+02:00 Add scoped type variables test for polymorphism test case. - - - - - 13181ae2 by Łukasz Hanuszczak at 2015-07-01T19:56:27+02:00 Add record wildcards test for records hyperlinking test case. - - - - - 991b81dd by Łukasz Hanuszczak at 2015-07-01T21:01:42+02:00 Document some functions in XHTML utlity module. - - - - - 98c8dfe5 by Łukasz Hanuszczak at 2015-07-01T22:25:21+02:00 Make hyperlinker render qualified names as one entity. - - - - - 75e13b9b by Łukasz Hanuszczak at 2015-07-01T22:27:38+02:00 Add qualified name test for identifiers hyperlinking test case. - - - - - de1e143f by Łukasz Hanuszczak at 2015-07-02T12:32:59+02:00 Fix crash happening when hyperlinking type family declarations. - - - - - 7a8fb175 by Łukasz Hanuszczak at 2015-07-02T12:47:03+02:00 Add support for anchoring data family constructor declarations. - - - - - 3b404e49 by Łukasz Hanuszczak at 2015-07-02T13:31:05+02:00 Improve support for hyperlinking type families. - - - - - 59eb7143 by Łukasz Hanuszczak at 2015-07-02T13:33:34+02:00 Add hyperlinker test case for checking type and type family declarations. - - - - - d1cda0c0 by Łukasz Hanuszczak at 2015-07-02T13:41:38+02:00 Fix issue with operators being recognized as preprocessor directives. - - - - - da206c9d by Łukasz Hanuszczak at 2015-07-02T17:18:12+02:00 Fix broken tests for parsing and hyperlinking hash operators. - - - - - 53750d1b by Łukasz Hanuszczak at 2015-07-02T18:53:28+02:00 Add support for anchoring signatures in type class declarations. - - - - - 1fa5bb10 by Łukasz Hanuszczak at 2015-07-02T19:04:47+02:00 Make hyperlinker generate anchors only to top-level value bindings. - - - - - a542305c by Łukasz Hanuszczak at 2015-07-02T19:05:58+02:00 Create hyperlinker test case for type classes. - - - - - b0dd4581 by Łukasz Hanuszczak at 2015-07-04T16:28:26+02:00 Update docs with information about source hyperlinking. - - - - - 9795302a by Łukasz Hanuszczak at 2015-07-04T16:52:15+02:00 Update docs on using `--read-interface` option. - - - - - 9acdc002 by Łukasz Hanuszczak at 2015-07-04T17:15:26+02:00 Remove potentially dangerous record access in hyperlinker AST module. - - - - - fb3ab7be by Łukasz Hanuszczak at 2015-07-04T17:40:10+02:00 Make Haddock generate warnings about potential misuse of hyperlinker. - - - - - a324c504 by Łukasz Hanuszczak at 2015-07-04T17:43:22+02:00 Fix incorrect specification of source style option in doc file. - - - - - 3f01a8e4 by Łukasz Hanuszczak at 2015-07-05T17:06:36+02:00 Refactor source path mapping to use modules as indices. - - - - - ac70f5b1 by Łukasz Hanuszczak at 2015-07-05T17:47:34+02:00 Fix bug where not all module interfaces were added to source mapping. - - - - - f5e57da9 by Łukasz Hanuszczak at 2015-07-06T16:39:57+02:00 Extract main hyperlinker types to separate module. - - - - - 43974905 by Łukasz Hanuszczak at 2015-07-06T16:52:13+02:00 Move source paths types to hyperlinker types module. - - - - - 3e236055 by Łukasz Hanuszczak at 2015-07-06T17:06:19+02:00 Add support for hyperlinking modules in import lists. - - - - - 58233d9f by Łukasz Hanuszczak at 2015-07-06T17:26:49+02:00 Add short documentation for hyperlinker source map type. - - - - - 14da016d by Łukasz Hanuszczak at 2015-07-06T18:07:20+02:00 Fix bug with module name being hyperlinked to `Prelude`. - - - - - 8f79db52 by Łukasz Hanuszczak at 2015-07-06T18:23:47+02:00 Fix problem with spec build in Haddock API configuration. - - - - - e7cc056c by Adam Sandberg Eriksson at 2015-07-07T23:22:21+01:00 StrictData: print correct strictness marks - - - - - e8253ca8 by Mateusz Kowalczyk at 2015-07-07T23:58:28+01:00 Update changelog - - - - - 0aba676b by Mateusz Kowalczyk at 2015-07-07T23:58:33+01:00 Relax upper bound on GHC a bit - - - - - 7a595381 by Mateusz Kowalczyk at 2015-07-07T23:58:52+01:00 Delete trailing whitespace - - - - - 50976d5e by Adam Sandberg Eriksson at 2015-07-08T15:03:04+02:00 StrictData: changes in HsBang type - - - - - 83b045fa by Mateusz Kowalczyk at 2015-07-11T14:35:18+01:00 Fix expansion icon for user-collapsible sections Closes haskell/haddock#412 - - - - - b2a3b0d1 by Mateusz Kowalczyk at 2015-07-22T22:03:21+01:00 Make some version changes after 2.16.1 release - - - - - a8294423 by Ben Gamari at 2015-07-27T13:16:07+02:00 Merge pull request haskell/haddock#422 from adamse/adamse-D1033 Merge for GHC D1033 - - - - - c0173f17 by randen at 2015-07-30T14:49:08-07:00 Break the response file by line termination rather than spaces, since spaces may be within the parameters. This simple approach avoids having the need for any quoting and/or escaping (although a newline char will not be possible in a parameter and has no escape mechanism to allow it). - - - - - 47c0ca14 by Alan Zimmerman at 2015-07-31T10:41:52+02:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - 45a9d770 by Mateusz Kowalczyk at 2015-07-31T09:47:43+01:00 Update changelog - - - - - 347a20a3 by Phil Ruffwind at 2015-08-02T23:15:26+01:00 Avoid JavaScript error during page load in non-frame mode In non-frame mode, parent.window.synopsis refers to the synopsis div rather than the nonexistent frame. Unfortunately, the script wrongly assumes that if it exists it must be a frame, leading to an error where it tries to access the nonexistent attribute 'replace' of an undefined value (synopsis.location). Closes haskell/haddock#406 - - - - - 54ebd519 by Phil Ruffwind at 2015-08-02T23:27:10+01:00 Link to the definitions to themselves Currently, the definitions already have an anchor tag that allows URLs with fragment identifiers to locate them, but it is rather inconvenient to obtain such a URL (so-called "permalink") as it would require finding the a link to the corresponding item in the Synopsis or elsewhere. This commit adds hyperlinks to the definitions themselves, allowing users to obtain links to them easily. To preserve the original aesthetics of the definitions, we alter the color of the link so as to be identical to what it was, except it now has a hover effect indicating that it is clickable. Additionally, the anchor now uses the 'id' attribute instead of the (obsolete) 'name' attribute. Closes haskell/haddock#407 - - - - - 02cc8bb7 by Phil Ruffwind at 2015-08-02T23:28:02+01:00 Fix typo in Haddock.Backends.Xhtml.Layout: divSynposis -> divSynopsis Closes haskell/haddock#408 - - - - - 2eb0a458 by Phil Ruffwind at 2015-08-02T23:30:07+01:00 Fix record field alignment when name is too long Change <dl> to <ul> and use display:table rather than floats to layout the record fields. This avoids bug haskell/haddock#301 that occurs whenever the field name gets too long. Slight aesthetic change: the entire cell of the field's source code is now shaded gray rather than just the area where text exists. Fixes haskell/haddock#301. Closes haskell/haddock#421 - - - - - 7abb3402 by Łukasz Hanuszczak at 2015-08-02T23:32:14+01:00 Add some utility definitions for generating line anchors. - - - - - e0b1d79b by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Make hyperlinked source renderer generate line anchors. - - - - - 24dd4c9f by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Re-accept test cases after adding line anchors for each of them. - - - - - 0372cfcb by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Override source line flags when source hyperlinker is enabled. - - - - - a81bcd07 by Mateusz Kowalczyk at 2015-08-02T23:58:25+01:00 Update tests to follow HTML changes - - - - - d2d7426f by Łukasz Hanuszczak at 2015-08-06T20:54:59+02:00 Fix quote syntax for promoted types. - - - - - 668cf029 by Łukasz Hanuszczak at 2015-08-06T21:12:00+02:00 Apply promoted type quoting to type-level consing. - - - - - 89f8e7c6 by Łukasz Hanuszczak at 2015-08-06T21:17:10+02:00 Extend advanced types test case with other examples. - - - - - 86494bca by Łukasz Hanuszczak at 2015-08-06T21:22:06+02:00 Rename advanced types test case and accept new output. - - - - - dbb7c7c0 by Adam Sandberg Eriksson at 2015-08-09T23:01:05+02:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 2a7704fa by Ben Gamari at 2015-08-10T13:18:05+02:00 Merge pull request haskell/haddock#433 from adamse/split-hsbang HsBang is split into HsSrcBang and HsImplBang - - - - - 891954bc by Thomas Miedema at 2015-08-15T14:51:18+02:00 Follow changes in GHC build system - - - - - b55d32ab by Mateusz Kowalczyk at 2015-08-21T18:06:09+01:00 Make Travis use 7.10.2 - - - - - 97348b51 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Move SYB utilities to standalone module. - - - - - 748ec081 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement `everywhere` transformation in SYB module. - - - - - 011cc543 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement generic transformation constructor. - - - - - b9510db2 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Create simple utility module for type specialization. - - - - - 43229fa6 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Make type of type specialization function more general. - - - - - fd844e90 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Add basic HTML test case for checking instance specialization. - - - - - 6ea0ad04 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Make HTML class instance printer take optional signature argument. - - - - - 65aa41b6 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Refactor instance head type to record instead of a meaningless tuple. - - - - - 3fc3bede by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add expandable method section for each class instance declaration. - - - - - 99ceb107 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Move dummy post-family instances for `DocName` to `Types` module. - - - - - e98f4708 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create convenience functions for type specialization module. - - - - - b947552f by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Hook type specialization logic with HTML pretty-printer. - - - - - dcaa8030 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create stub functions for sugaring specialized types. - - - - - fa84bc65 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement list syntax sugaring logic for specialized types. - - - - - e8b05b07 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement tuple syntax sugaring logic for specialized types. - - - - - 68a2e5bc by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Get rid of code duplication in type specialization module. - - - - - 4721c336 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create scaffolding of a framework for renaming specialized types. - - - - - 271b488d by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in missing cases in specialized type renaming function. - - - - - bfa5f2a4 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Remove code duplication in specialized type renamer. - - - - - ea6bd0e8 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Change state of the type renaming monad. - - - - - 77c5496e by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement simple mechanism for generating new type names. - - - - - 91bfb48b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in stub behaviour with actual environment renaming. - - - - - d244517b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix logic behind binder type renaming. - - - - - f3c5e360 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add SYB-like utility function for performing stateful queries. - - - - - eb3f9154 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create function for retrieving free variables from given type. - - - - - a94561d3 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix compilation error caused by incorrect type signature. - - - - - 8bb707cf by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Move `SetName` class definition to types module. - - - - - 5800b13b by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Hook type renamer with instance method HTML pretty-printer. - - - - - 6a480164 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some test cases for type renamer. - - - - - 839842f7 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized signatures refer to original signature declaration. - - - - - 4880f7c9 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized methods be nicely formatted again. - - - - - ab5a6a2e by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Attach source locations to the specialized class methods. - - - - - 43f8a559 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Extend instances test case to also test multi-name type signatures. - - - - - 59bc751c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix tab-based indentation in instances test case. - - - - - c2126815 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Improve placement of instance methods expander button. - - - - - 0a32e287 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add new data type declaration to instance specialization test case. - - - - - 5281af1f by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make type renamer first try single-letter names as alternatives. - - - - - 7d509475 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix type renamer bug with incorrect names being generated. - - - - - 0f35bf7c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some documentation and refactor type specialization module. - - - - - da1d0803 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix another bug where type renamer was generating incorrect names. - - - - - cd39b5cb by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Refactor type renamer to rebinding and pure renaming phases. - - - - - 850251f4 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix unwitting compilation bug. - - - - - e5e9fc01 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Integrate instance specification type into class instance definition. - - - - - 825b0ea0 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer neccessary instance specification type. - - - - - cdba44eb by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix declaration converter to use more appropriate mode for methods. - - - - - bc45c309 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug with types not being specialized at all. - - - - - 5d8e5d89 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug where instance expander was opening wrong section. - - - - - 6001ee41 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix another type renamer bug where not all names were rebound. - - - - - 5f58ce2a by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix yet another renamer bug where some names were not unique. - - - - - 8265e521 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split instance subsection layout method to top-level declarations. - - - - - e5e66298 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Rearrange layout of instance methods in generated documentation. - - - - - a50b4eea by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer used layout method. - - - - - 2ff36ec2 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach section title to the instance methods block. - - - - - 7ac15300 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Add basic tests for associated types in instances test case. - - - - - db0ea2f9 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach associated types information to instance header. - - - - - 71cad4d5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details section contain associated types information. - - - - - deee2809 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Improve look of rendered associated families in instance details. - - - - - 839d13a5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Introduce alternative type for family declarations. - - - - - d397f03f by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details record use new type for family declarations. - - - - - 2b23fe97 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split printer of type family header to separate functions. - - - - - c3498cdc by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Implement HTML renderer for pseudo-family declarations. - - - - - c12bbb04 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Apply type specializer to associated type family declarations. - - - - - 2fd69ff2 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Create helper method for specializing type signatures. - - - - - 475826e7 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Refactor specializer module to be independent from XHTML backend. - - - - - f00b431c by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add some documentation for instance head specializer. - - - - - a9fef2dc by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix bug with missing space in documentation for associated types. - - - - - 50e29056 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with incorrect instance details sections being expanded. - - - - - e6dfdd03 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by adding instance details section. - - - - - 75565b2a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make section identifier of instance details more GHC-independent. - - - - - add0c23e by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Re-accept tests after applying deterministic section identifiers. - - - - - 878f2534 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make identifier generation also architecture-independent. - - - - - 48be69f8 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with instance expander hijacking type hyperlink click. - - - - - 47830c1f by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Get rid of dreadful hashing function for generating identifiers. - - - - - 956cd5af by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Move `InstOrigin` type declaration to more appropriate module. - - - - - bf672ed3 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by changes related to instance expander. - - - - - 8f2a949a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add examples with type operators to the instances test case. - - - - - 64600a84 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add basic support for sugaring infix type operators. - - - - - 747d71b8 by Łukasz Hanuszczak at 2015-08-21T18:22:34+01:00 Add support for sugaring built-in function syntax. - - - - - d4696ffb by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Remove default methods from Hoogle class output. - - - - - bf0e09d7 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add fixity declarations in Hoogle backend output. - - - - - 90e91a51 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix bug with incorrect fixities being generated in Hoogle backend. - - - - - 48f11d35 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve class type family declarations output in Hoogle backend. - - - - - 661e8e8f by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add missing default family equations in Hoogle output. - - - - - e2d64103 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve formatting of class details output in Hoogle backend. - - - - - 490fc377 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix weird-looking Hoogle output for familyless classes. - - - - - ea115b64 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create script file for new HTML test runner. - - - - - 609913d3 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Set default behaviour if no arguments given. - - - - - dc115f67 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for providing optional arguments for test runner. - - - - - d93ec867 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve output of test runner error messages. - - - - - 0be9fe12 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for executing Haddock process in test runner. - - - - - 4e4d00d9 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add GHC path to test runner configuration. - - - - - d67a2086 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make GHC path a test runner command-line argument. - - - - - c810079a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Extend test runner configuration with Haddock arguments. - - - - - fee18845 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor test runner and create stub functions. - - - - - ff7c161f by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make test runner actually run Haddock executable. - - - - - 391f73e6 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with test runner not producing any output files. - - - - - 81a74e2d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Setup skeleton of framework for running tests. - - - - - f8a79ec4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with modules not being found in global search mode. - - - - - 7e700b4d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make Haddock standard output redirection be more configurable. - - - - - 53b4c17a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Incorporate old, ugly functions for comparing output files. - - - - - 8277c8aa by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor architecture of test runner output checking functions. - - - - - 587bb414 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement actual diffing mechanism. - - - - - 9ed2b5e4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve code style to match popular guidelines. - - - - - 14bffaf8 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make it possible to choose alternative diff tool. - - - - - 5cdfb005 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create stub methods for processing test output as XML documents. - - - - - 7ef8e12e by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement link-stripping logic as simple SYB transformation. - - - - - 8a1fcd4f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Incorporate link stripping to output diffing mechanism. - - - - - 37dba2bc by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement footer-stripping logic. - - - - - 9cd52120 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Add missing dependencies in Cabal configuration file. - - - - - e0f83c6e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix issue with output being printed in incorrect order. - - - - - 0a94fbb0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to run tests without generating diff. - - - - - 76a58c6f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor HTML test suite boilerplate to external package. - - - - - af41e6b0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utilities for storing directory configuration. - - - - - d8f0698f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move IO-dependent config of HTML test suite to test package. - - - - - 17369fa0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Enable all compiler warnings in Haddock test package configuration. - - - - - 9d03b47a by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move Haddock runner of HTML test suite to Haddock test package. - - - - - 4b3483c5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 03754194 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience wrappers to simplify in test entry points. - - - - - 27476ab7 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adjust module visibility and items they export. - - - - - c40002ba by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Remove no longer useful test option. - - - - - 55ab2541 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Change extension of test files used for diffing. - - - - - 136bf4e4 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor and simplify XHTML helper module of test package. - - - - - 69f7e3df by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix typo in link stripper of HTML test suite runner. - - - - - 0c3c1c6b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience script for running specific HTML tests. - - - - - 489e1b05 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement utility functions for conditional link stripping. - - - - - 0f985dc3 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt `hypsrc-test` module to work with new testing framework. - - - - - 927406f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement output accepting mechanism in test package. - - - - - 8545715e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utility function for recursive obtaining directory contents. - - - - - cb70381f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 019599b5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix path handling in test runner. - - - - - 399b985b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to specify ignored files for test output. - - - - - 41b3d93d by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt HTML test runner to use new ignoring functionality. - - - - - e2091c8b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix bug with not all test output files being checked. - - - - - b22134f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Specify ignored files for hyperlinker source test runner. - - - - - 3301dfa1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Copy test runner script for hyperlinked source case. - - - - - d39a6dfa by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner invoking Haddock in incorrect mode. - - - - - f32c8ff3 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix path handling in test module loader. - - - - - 10f94ee9 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make test runner ignore test packages with no modules. - - - - - 5dc4239c by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create test runner entry points for LaTeX test suite. - - - - - 58d1f7cf by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with unnecessary checking old test output. - - - - - c7ce76e1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Re-implement test acceptance functionality. - - - - - 13bbabe8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix warning about no longer needed definition. - - - - - 958a99b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Adapt Cabal configuration to execute LaTeX suite with new runner. - - - - - 550ff663 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Setup test suite for Hoogle backend. - - - - - 3aa969c4 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make Hoogle backend create output directory if needed. - - - - - eb085b02 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Add appropriate .gitignore entry and configure Hoogle test suite. - - - - - a50bf915 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner failing when run on multiple test packages. - - - - - bf5368b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create simple test cases for Hoogle backend. - - - - - 6121ba4b by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create helper function for conversion between XML and XHTML. - - - - - cb516061 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Refactor existing code to use XHTML printer instead of XML one. - - - - - e2de8c82 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Improve portability of test runner scripts. - - - - - 9563e774 by Łukasz Hanuszczak at 2015-08-22T23:43:16+02:00 Remove redundant import statement. - - - - - 55353df1 by Łukasz Hanuszczak at 2015-08-24T23:09:20+02:00 Fix bug with accepting to non-existing directory. - - - - - 00a334ca by Łukasz Hanuszczak at 2015-08-24T23:09:47+02:00 Accept output for Hoogle and LaTeX backends. - - - - - 29191d8b by Łukasz Hanuszczak at 2015-08-24T23:14:18+02:00 Get rid of obsolete testing utilities. - - - - - bbb25db3 by Łukasz Hanuszczak at 2015-08-24T23:18:50+02:00 Update sandbox setup guide to work with Haddock test package. - - - - - cfd45248 by Łukasz Hanuszczak at 2015-08-24T23:51:30+02:00 Make Travis aware of Haddock test package. - - - - - 74185b7a by Łukasz Hanuszczak at 2015-08-25T17:41:59+02:00 Fix test suite failure when used with Stack. - - - - - 18769697 by Łukasz Hanuszczak at 2015-08-25T18:02:09+02:00 Add sample Stack setup to the hacking guide. - - - - - 22715eeb by Łukasz Hanuszczak at 2015-08-25T18:04:47+02:00 Fix Markdown formatting of README file. - - - - - b49ec386 by Łukasz Hanuszczak at 2015-08-25T18:13:36+02:00 Setup Haddock executable path in Travis configuration. - - - - - 5d29eb03 by Eric Seidel at 2015-08-30T09:55:58-07:00 account for changes to ipClass - - - - - f111740a by Ben Gamari at 2015-09-02T13:20:37+02:00 Merge pull request haskell/haddock#443 from bgamari/ghc-head account for changes to ipClass - - - - - a2654bf6 by Jan Stolarek at 2015-09-03T01:32:57+02:00 Follow changes from haskell/haddock#6018 - - - - - 2678bafe by Richard Eisenberg at 2015-09-21T12:00:47-04:00 React to refactoring CoAxiom branch lists. - - - - - ebc56e24 by Edward Z. Yang at 2015-09-21T11:53:46-07:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4a8c4198 by Tamar Christina at 2015-09-27T13:59:08+02:00 Create Process: removed PhaseFailed - - - - - 7e99b790 by Oleg Grenrus at 2015-09-27T20:52:10+03:00 Generate docs for orphan instances - - - - - 32e932e2 by Oleg Grenrus at 2015-09-28T07:21:11+03:00 Have source links for orphan instances - - - - - c2eb9f4f by Oleg Grenrus at 2015-09-28T07:24:58+03:00 Print orphan instances header only if required - - - - - ff96f978 by Oleg Grenrus at 2015-09-28T07:40:54+03:00 Add orphan instances link to contents box - - - - - d72490a6 by Oleg Grenrus at 2015-09-28T16:37:44+03:00 Fix orphan instance collapsing - - - - - 25d3dfe5 by Ben Gamari at 2015-10-03T12:38:09+02:00 Merge pull request haskell/haddock#448 from Mistuke/fix-silent-death-of-runInteractive Remove PhaseFailed - - - - - 1e45e43b by Edward Z. Yang at 2015-10-11T13:10:10-07:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b1370ac1 by Adam Gundry at 2015-10-16T16:26:42+01:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 60bef421 by Simon Peyton Jones at 2015-10-26T12:52:36+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 4c1898ca by Simon Peyton Jones at 2015-10-27T14:24:56+00:00 Track change to PatSyn.patSynSig - - - - - 25108e85 by Simon Peyton Jones at 2015-10-27T17:34:18+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - 693643ac by Ben Gamari at 2015-10-28T14:33:06+01:00 Account for Typeable changes The treatment of type families changed. - - - - - cd7c2221 by Simon Peyton Jones at 2015-10-30T13:03:51+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - 712032cb by Herbert Valerio Riedel at 2015-10-31T11:01:45+01:00 Relax upper bound on `base` to allow base-4.9 - - - - - 0bfa0475 by Simon Peyton Jones at 2015-10-31T19:08:13+00:00 More adaption to wildcard-refactor - - - - - 0a3c0cb7 by Simon Peyton Jones at 2015-10-31T22:14:43+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - c4fd4ec9 by Alan Zimmerman at 2015-11-01T11:16:34+01:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 42cdd882 by Matthew Pickering at 2015-11-06T20:02:16+00:00 Change for IEThingWith - - - - - f368b7be by Ben Gamari at 2015-11-11T11:35:51+01:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - e32965b8 by Simon Peyton Jones at 2015-11-13T12:18:17+00:00 Merge with origin/head - - - - - ebcf795a by Edward Z. Yang at 2015-11-13T21:56:27-08:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4e23989f by Simon Peyton Jones at 2015-11-18T11:32:54+00:00 Wibbles to Haddock - - - - - 2289cd4a by Simon Peyton Jones at 2015-11-20T23:12:49+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor - - - - - 695975a6 by Alan Zimmerman at 2015-11-21T21:16:12+02:00 Update to match GHC wip/T11019 - - - - - bbba21e7 by Simon Peyton Jones at 2015-11-23T13:54:31+00:00 merge with origin/ghc-head - - - - - 3d664258 by Simon Peyton Jones at 2015-11-23T17:17:18+00:00 Wibble - - - - - e64cf586 by Herbert Valerio Riedel at 2015-12-05T00:29:55+01:00 Canonicalise Monad instances - - - - - a2de15a7 by Alan Zimmerman at 2015-12-05T17:33:52+02:00 Matching changes for haskell/haddock#11028 - - - - - cc29a3e4 by Alan Zimmerman at 2015-12-05T19:45:33+02:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 95dd15d1 by Richard Eisenberg at 2015-12-11T17:33:39-06:00 Update for type=kinds - - - - - cb5fd9ed by Herbert Valerio Riedel at 2015-12-14T15:07:30+00:00 Bump versions for ghc-7.11 - - - - - 4f286d96 by Simon Peyton Jones at 2015-12-14T15:10:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 13ea2733 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 098df8b8 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track changes in HsSyn for quasi-quotes - - - - - 716a64de by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track change in API of TyCon - - - - - 77a66bca by Adam Gundry at 2015-12-14T15:10:58+00:00 Track API changes to support empty closed type familes - - - - - f2808305 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track the new location of setRdrNameSpace - - - - - ba8b08a4 by Alan Zimmerman at 2015-12-14T15:10:59+00:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - a4ded87e by Thomas Winant at 2015-12-14T15:14:05+00:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 25c78107 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: print correct strictness marks - - - - - 6cbc41c4 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: changes in HsBang type - - - - - ad46821a by Alan Zimmerman at 2015-12-14T15:14:06+00:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - abc0ae5b by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 3308d06c by Thomas Miedema at 2015-12-14T15:14:07+00:00 Follow changes in GHC build system - - - - - 6c763deb by Eric Seidel at 2015-12-14T15:14:07+00:00 account for changes to ipClass - - - - - ae5b4eac by Jan Stolarek at 2015-12-14T15:17:00+00:00 Follow changes from haskell/haddock#6018 - - - - - ffbc40e0 by Richard Eisenberg at 2015-12-14T15:17:02+00:00 React to refactoring CoAxiom branch lists. - - - - - d1f531e9 by Edward Z. Yang at 2015-12-14T15:17:02+00:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 79f73754 by Tamar Christina at 2015-12-14T15:17:02+00:00 Create Process: removed PhaseFailed - - - - - 3d37bebb by Edward Z. Yang at 2015-12-14T15:20:46+00:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 5f8a9e44 by Adam Gundry at 2015-12-14T15:20:48+00:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 79dda70f by Simon Peyton Jones at 2015-12-14T15:26:02+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 959930fb by Simon Peyton Jones at 2015-12-14T15:37:50+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - e18a8df5 by Simon Peyton Jones at 2015-12-14T15:37:52+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - aa35ab52 by Simon Peyton Jones at 2015-12-14T15:40:18+00:00 More adaption to wildcard-refactor - - - - - 8ceef94b by Simon Peyton Jones at 2015-12-14T15:46:04+00:00 Track change to PatSyn.patSynSig - - - - - cd81e83d by Ben Gamari at 2015-12-14T15:46:06+00:00 Account for Typeable changes The treatment of type families changed. - - - - - 63c9117c by Herbert Valerio Riedel at 2015-12-14T15:46:34+00:00 Relax upper bound on `base` to allow base-4.9 - - - - - a484c613 by Alan Zimmerman at 2015-12-14T15:47:46+00:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 2c26fa51 by Matthew Pickering at 2015-12-14T15:47:47+00:00 Change for IEThingWith - - - - - 593baa0f by Ben Gamari at 2015-12-14T15:49:21+00:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - b6b5ca78 by Edward Z. Yang at 2015-12-14T15:49:54+00:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b5b0e072 by Alan Zimmerman at 2015-12-14T15:54:20+00:00 Update to match GHC wip/T11019 - - - - - 14ddeb68 by Simon Peyton Jones at 2015-12-14T15:54:22+00:00 Wibble - - - - - 10a90ad8 by Herbert Valerio Riedel at 2015-12-14T15:54:22+00:00 Canonicalise Monad instances - - - - - ed68ac50 by Alan Zimmerman at 2015-12-14T15:55:48+00:00 Matching changes for haskell/haddock#11028 - - - - - 3f7e5a2d by Alan Zimmerman at 2015-12-14T15:55:49+00:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 6543a73f by Richard Eisenberg at 2015-12-14T15:59:55+00:00 Update for type=kinds - - - - - 193a5c48 by Matthew Pickering at 2015-12-14T18:17:00+00:00 Changes to compile with 8.0 - - - - - add669ec by Matthew Pickering at 2015-12-14T18:47:12+00:00 Warnings - - - - - 223f3fb4 by Ben Gamari at 2015-12-15T23:45:05+01:00 Update for D1200 - - - - - d058388f by Ben Gamari at 2015-12-16T05:40:17-05:00 Types: Add Outputable[Bndr] DocName instances - - - - - 62ecd7fb by Ben Gamari at 2015-12-16T09:23:09-05:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ddbc187a by Ben Gamari at 2015-12-16T17:54:55+01:00 Update for D1200 - - - - - cec83b52 by Ben Gamari at 2015-12-16T17:54:55+01:00 Types: Add Outputable[Bndr] DocName instances - - - - - d12ecc98 by Ben Gamari at 2015-12-16T17:54:55+01:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ada1616f by Ben Gamari at 2015-12-16T17:54:58+01:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a4f0383d by Ben Gamari at 2015-12-16T23:32:38+01:00 Fix Hyperlinker GHC.con_names is now GHC.getConNames - - - - - a10e6849 by Ben Gamari at 2015-12-20T00:54:11+01:00 Merge remote-tracking branch 'mrhania/testing-framework-improvements' into ghc-head - - - - - f078b4fd by Ben Gamari at 2015-12-20T00:59:51+01:00 test: Compatibility with Cabal 1.23 - - - - - 88a511a9 by Ben Gamari at 2015-12-20T01:14:35+01:00 Merge remote-tracking branch 'phadej/orphans' into ghc-head - - - - - 4e250f36 by Ben Gamari at 2015-12-20T01:14:52+01:00 Add html-test for orphan instances output - - - - - 87fffbad by Alan Zimmerman at 2015-12-20T09:50:42+02:00 Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc - - - - - 6b7e51c9 by idontgetoutmuch at 2015-12-20T21:01:47+00:00 Merge pull request haskell/haddock#1 from haskell/ghc-head Ghc head - - - - - 229c1fb5 by Dominic Steinitz at 2015-12-21T07:19:16+00:00 Handle inline math with mathjax. - - - - - 57902d66 by Dominic Steinitz at 2015-12-21T08:07:11+00:00 Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs - - - - - 0e69f236 by Herbert Valerio Riedel at 2015-12-21T18:30:43+01:00 Fix-up left-over assumptions of GHC 7.12 into GHC 8.0 - - - - - c67f8444 by Simon Peyton Jones at 2015-12-22T16:26:56+00:00 Follow removal of NamedWildCard from HsType - - - - - da40327a by Ben Gamari at 2015-12-23T14:15:28+01:00 html-test/Operators: Clear up ambiguous types For reasons that aren't entirely clear a class with ambiguous types was accepted by GHC <8.0. I've added a functional dependency to clear up this ambiguity. - - - - - 541b7fa4 by Ben Gamari at 2015-12-23T14:18:51+01:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 0febc947 by Ben Gamari at 2015-12-24T00:30:20+01:00 hoogle-test/AssocTypes: Allow AmbiguousTypes GHC 8.0 complains otherwise - - - - - 25810841 by Ben Gamari at 2015-12-24T00:33:18+01:00 OrphanInstances: Accept test output - - - - - 841987f3 by Ben Gamari at 2015-12-25T11:03:11+01:00 Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head - - - - - 358391f0 by Ben Gamari at 2015-12-26T10:44:50+01:00 Add missing import - - - - - a8896885 by Ben Gamari at 2015-12-26T10:45:27+01:00 travis: Use Travis containers - - - - - 85e82134 by Herbert Valerio Riedel at 2015-12-30T17:25:39+01:00 tweak version bounds for GHC-8.1 - - - - - 672a5f75 by randen at 2016-01-01T23:45:25-08:00 The Haddock part for fully gcc-like response files " driver/Main.hs * Moved the response file handling into ResponseFile.hs, updating import section as appropriate. * driver/ResponseFile.hs * New file. In anticipation that maybe some day this could be provided by another library, and to make it possible to unit test, this functionality is pulled out of the Main.hs module, and expanded to support the style/format of response files which gcc uses. * The specification for the format of response files which gcc generates and consumes, seems to be best derived from the gcc code itself (libiberty/argv.c), so that is what has been done here. * This is intended to fix haskell/haddock#379 * driver-test/Main.hs * New file for testing code in the driver source tree * driver-test/ResponseFileSpec.hs * Tests, adapted/adopted from the same gcc code where the escaping/unescaping is from, in the hspec style of unit tests * haddock.cabal * Add the driver-test test-suite. Introduces a new library dependency (upon hspec) for the haddock driver target in the haddock.cabal file, but practically, this should not be a problem as the haddock-api tests already depend on hspec. - - - - - 498781df by Ben Gamari at 2016-01-06T13:41:04+01:00 Version bumps and changelog - - - - - 8451e46a by Ben Gamari at 2016-01-06T13:47:17+01:00 Merge remote-tracking branch 'randen/bug468' - - - - - fb2d9181 by Ben Gamari at 2016-01-06T08:14:42-05:00 Add ResponseFile to OtherModules - - - - - 2cb2d2e3 by Ben Gamari at 2016-01-06T14:35:00+01:00 Merge branch 'master' into ghc-head - - - - - 913477d4 by Eric Seidel at 2016-01-11T14:57:57-08:00 deal with un-wiring of IP class - - - - - c557a4b3 by Alan Zimmerman at 2016-01-15T11:14:35+02:00 Update to match wip/T11430 in GHC - - - - - 3e135093 by Alan Zimmerman at 2016-01-16T18:21:59+01:00 Update to match wip/T11430 in GHC - - - - - c48ef2f9 by Ben Gamari at 2016-01-18T09:50:06+01:00 Merge remote-tracking branch 'gridaphobe/ghc-head' into ghc-head - - - - - 9138a1b0 by Eric Seidel at 2016-01-18T12:50:15+01:00 deal with un-wiring of IP class (cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f) - - - - - b48c172e by Joachim Breitner at 2016-01-19T00:11:38+01:00 Make sure --mathjax affects all written HTML files This fixes haskell/haddock#475. - - - - - af61fe63 by Ryan Scott at 2016-02-07T23:25:57+01:00 Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes haskell/haddock#473) - - - - - b6458693 by Ben Gamari at 2016-02-07T23:29:27+01:00 Merge pull request haskell/haddock#477 from haskell/issue-475 Make sure --mathjax affects all written HTML files - - - - - adcc0071 by Ben Gamari at 2016-02-07T23:34:52+01:00 Merge branch 'master' into ghc-head - - - - - d0404e61 by Ben Gamari at 2016-02-08T12:46:49+01:00 doc: Switch to Sphinx - - - - - acb153b3 by Ben Gamari at 2016-02-08T12:46:56+01:00 Document --use-unicode flag - - - - - c20bdf1d by Ben Gamari at 2016-02-08T13:41:24+01:00 Fix GHC and haddock-library dependency bounds - - - - - 8d946801 by Ben Gamari at 2016-02-08T14:54:56+01:00 testsuite: Rework handling of output sanitization Previously un-cleaned artifacts were kept as reference output, making it difficult to tell what has changed and causing spurious changes in the version control history. Here we rework this, cleaning the output during acceptance. To accomplish this it was necessary to move to strict I/O to ensure the reference handle was closed before accept attempts to open the reference file. - - - - - c465705d by Ben Gamari at 2016-02-08T15:36:05+01:00 test: Compare on dump For reasons I don't understand the Xml representations differ despite their textual representations being identical. - - - - - 1ec0227a by Ben Gamari at 2016-02-08T15:36:05+01:00 html-test: Accept test output - - - - - eefbd63a by Ben Gamari at 2016-02-08T15:36:08+01:00 hypsrc-test: Accept test output And fix impredicative Polymorphism testcase. - - - - - d1df4372 by Ben Gamari at 2016-02-08T15:40:44+01:00 Merge branch 'fix-up-testsuite' - - - - - 206a3859 by Phil Ruffwind at 2016-02-08T17:51:21+01:00 Move the permalinks to "#" on the right side Since pull request haskell/haddock#407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). - - - - - 6c89fa03 by Phil Ruffwind at 2016-02-08T17:54:44+01:00 Update tests for previous commit - - - - - effaa832 by Ben Gamari at 2016-02-08T17:56:17+01:00 Merge branch 'anchors-redux' - - - - - 9a2bec90 by Ben Gamari at 2016-02-08T17:58:40+01:00 Use -fprint-unicode-syntax when --use-unicode is enabled This allows GHC to render `*` as its Unicode representation, among other things. - - - - - 28ecac5b by Ben Gamari at 2016-02-11T18:53:03+01:00 Merge pull request haskell/haddock#480 from bgamari/sphinx Move documentation to ReStructuredText - - - - - 222e5920 by Ryan Scott at 2016-02-11T15:42:42-05:00 Collapse type/data family instances by default - - - - - a80ac03b by Ryan Scott at 2016-02-11T20:17:09-05:00 Ensure expanded family instances render correctly - - - - - 7f985231 by Ben Gamari at 2016-02-12T10:04:22+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - d4eda086 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Various cleanups - - - - - 79bee48d by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show kind signatures for type family variables Addresses GHC haskell/haddock#11588. - - - - - b2981d98 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show 'where ...' after closed type family Seems like we should ideally show the actual equations as well but that seems like it would be a fair amount of work - - - - - cfc0e621 by Ben Gamari at 2016-02-18T22:48:12+01:00 Merge pull request haskell/haddock#483 from bgamari/T11588 Fix GHC haskell/haddock#11588 This fixes GHC haskell/haddock#11588: * Show where ... after closed type families * Show kind signatures on type family type variables - - - - - 256e8a0d by Ben Gamari at 2016-02-18T23:15:39+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 32402036 by Richard Eisenberg at 2016-02-24T13:21:44-05:00 Follow-on changes to support RuntimeRep - - - - - 2b1c572d by Matthew Pickering at 2016-03-04T21:04:02+00:00 Remove unused functions - - - - - eb906f50 by Richard Eisenberg at 2016-03-13T21:17:20+01:00 Follow-on changes to support RuntimeRep (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c) - - - - - 8c34ef34 by Richard Eisenberg at 2016-03-14T23:47:23-04:00 Changes due to fix for GHC#11648. - - - - - 0e022014 by Richard Eisenberg at 2016-03-15T14:06:45+01:00 Changes due to fix for GHC#11648. (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1) - - - - - ed3f78ab by Rik Steenkamp at 2016-04-02T22:20:36+01:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 - - - - - d3210042 by Rik Steenkamp at 2016-04-04T15:43:32+02:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb) - - - - - 236eec90 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 692ee7e0 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. - - - - - 79619f57 by Ben Gamari at 2016-04-10T23:46:22+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. (cherry picked from commit c6d6a18d85e5e2d9bb5904e6919e8a8d7e31c4c5) - - - - - 3358ccb4 by Ben Gamari at 2016-04-10T23:47:27+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 264949b1 by Ben Gamari at 2016-04-16T17:50:23+02:00 Merge pull request haskell/haddock#482 from RyanGlScott/ghc-head Collapse type/data family instances by default - - - - - 478c483a by Ben Gamari at 2016-04-16T17:51:09+02:00 Merge pull request haskell/haddock#489 from mpickering/unused-functions Remove some unused functions - - - - - c94e55f0 by Ryan Scott at 2016-04-16T17:57:54+02:00 Collapse type/data family instances by default (cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088) - - - - - 31e633d3 by Ryan Scott at 2016-04-16T17:58:06+02:00 Ensure expanded family instances render correctly (cherry picked from commit 1338b5d7c32939de6bbc31af0049477e4f847103) - - - - - 03e4d197 by Matthew Pickering at 2016-04-16T17:58:21+02:00 Remove unused functions (cherry picked from commit b89d1c2456bdb2d4208d94ded56155f7088a37d0) - - - - - ed4116f6 by Ben Gamari at 2016-04-20T10:46:57+02:00 ghc: Install files for needed --hyperlinked-source - - - - - 0be999c4 by Ben Gamari at 2016-04-20T11:37:54+02:00 ghc: Install files for needed --hyperlinked-source (cherry picked from commit 5c82c9fc2d21ddaae4a2470f1c375426968f19c6) - - - - - 4d17544c by Simon Peyton Jones at 2016-04-20T12:42:28+01:00 Track change to HsGroup This relates to a big GHC patch for Trac haskell/haddock#11348 - - - - - 1700a50d by Ben Gamari at 2016-05-01T13:19:27+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. - - - - - 0b7c8125 by Ben Gamari at 2016-05-01T13:21:43+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. (cherry picked from commit 609018dd09c4ffe27f9248b2d8b50f6196cd42b9) - - - - - af115ce0 by Ryan Scott at 2016-05-04T22:15:50-04:00 Render Haddocks for derived instances Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac haskell/haddock#11768. - - - - - 76fa1edc by Ben Gamari at 2016-05-10T18:13:25+02:00 haddock-test: A bit of refactoring for debuggability - - - - - 7d4c4b20 by Ben Gamari at 2016-05-10T18:13:25+02:00 Create: Mark a comment as TODO - - - - - 2a6d0c90 by Ben Gamari at 2016-05-10T18:13:25+02:00 html-test: Update reference output - - - - - bd60913d by Ben Gamari at 2016-05-10T18:13:25+02:00 hypsrc-test: Fix reference file path in cabal file It appears the haddock insists on prefixing --hyperlinked-sourcer output with directory which the source appeared in. - - - - - c1548057 by Ben Gamari at 2016-05-10T18:22:12+02:00 doc: Update extra-source-files in Cabal file - - - - - 41d5bae3 by Ben Gamari at 2016-05-10T18:29:21+02:00 Bump versions - - - - - ca75b779 by Ben Gamari at 2016-05-11T16:03:44+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 4e3cfd62 by Ben Gamari at 2016-05-11T16:06:45+02:00 Merge remote-tracking branch 'RyanGlScott/ghc-head' into ghc-head - - - - - a2379970 by Ben Gamari at 2016-05-11T23:15:11+02:00 doc: Add clean targets - - - - - f275212e by Ben Gamari at 2016-05-11T23:15:14+02:00 doc: Add html as an all-target for ghc Otherwise the html documentation won't be installed for binary-dist. - - - - - 388fc0af by Ben Gamari at 2016-05-12T09:49:12+02:00 Update CHANGES - - - - - bad81ad5 by Ben Gamari at 2016-05-12T09:49:38+02:00 Version bump - - - - - c01688a7 by Ben Gamari at 2016-05-12T10:04:58+02:00 Revert "Version bump" This bump was a bit premature. This reverts commit 7b238d9c5be9b07aa2d10df323b5c7b8d1634dc8. - - - - - 7ed05724 by Ben Gamari at 2016-05-12T10:05:33+02:00 doc: Fix GHC clean rule Apparently GHC's build system doesn't permit wildcards in clean paths. - - - - - 5d9611f4 by Ben Gamari at 2016-05-12T17:43:50+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 653566b2 by Ben Gamari at 2016-05-14T09:57:31+02:00 Version bump to 2.17.2 - - - - - b355c439 by Ben Gamari at 2016-05-14T09:57:51+02:00 doc: Use `$(MAKE)` instead of `make` This is necessary to ensure we use gmake. - - - - - 8a18537d by Ben Gamari at 2016-05-14T10:15:45+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - b3290ef1 by Sebastian Meric de Bellefon at 2016-05-14T11:29:47-04:00 Fix haskell/haddock#303. Hide footer when printing The "Produced by Haddock" footer was overlapping the page's body when printing. This patch hides the footer with a css media rule. - - - - - b4a76f89 by Sebastian Meric de Bellefon at 2016-05-15T02:12:46-04:00 Fix haskell/haddock#280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines - - - - - ba797c9e by Ben Gamari at 2016-05-16T14:53:46+02:00 doc: Vendorize alabaster Sphinx theme Alabaster is now the default sphinx theme and is a significant improvement over the previous default that it's worthproviding it when unavailable (e.g. Sphinx <1.3). - - - - - c9283e44 by Ben Gamari at 2016-05-16T14:55:17+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 1c9ea198 by Sebastian Méric de Bellefon at 2016-05-16T12:30:40-04:00 Merge pull request haskell/haddock#502 from Helkafen/master Fix haskell/haddock#303. Hide footer when printing - - - - - 33631016 by Ben Gamari at 2016-05-16T19:56:11+02:00 Revert "doc: Vendorize alabaster Sphinx theme" This ended up causes far too many issues to be worthwhile. We'll just have to live with inconsistent haddock documentation. This reverts commit cec21957001143794e71bcd9420283df18e7de40. - - - - - 93317d26 by Ben Gamari at 2016-05-16T19:56:11+02:00 cabal: Fix README path - - - - - c8695b22 by Ben Gamari at 2016-05-16T19:58:51+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 0b50eaaa by Ben Gamari at 2016-05-16T21:02:08+02:00 doc: Use whichever theme sphinx deems appropriate - - - - - 857c1c9c by Ben Gamari at 2016-05-16T21:07:08+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 15fc5637 by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Remove redundant imports - - - - - 132ddc6a by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Better debug output For tracking down haskell/haddock#505 - - - - - 2252a149 by Ben Gamari at 2016-05-22T12:43:59+02:00 Don't consider default class ops when looking for decls When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of haskell/haddock#505. - - - - - 4886b2ec by Oleg Grenrus at 2016-05-24T16:19:48+03:00 UnfelpfulSpan line number omitted Kind of resolves https://github.com/haskell/haddock/issues/508 - - - - - a4befd36 by Oleg Grenrus at 2016-05-24T16:53:35+03:00 Change Hyperlinked lexer to know about DataKinds ticks - - - - - f45cb52e by David Feuer at 2016-05-24T18:48:53-04:00 Make parser state a newtype Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day. - - - - - 05013dd7 by Sebastian Meric de Bellefon at 2016-05-24T22:03:55-04:00 remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) Frames are a bit broken, ignored by Hackage, and considered obsolete in general. This patch disables frames generation. The mini_*.html files are still used in the synopsis. - - - - - b8163a88 by Ben Gamari at 2016-05-25T14:44:15+02:00 Merge pull request haskell/haddock#507 from bgamari/T505 Fix haskell/haddock#505 - - - - - ea1b30c6 by Sebastian Meric de Bellefon at 2016-05-25T14:17:00-04:00 Update CHANGES - - - - - eddfc258 by Sebastian Méric de Bellefon at 2016-05-25T15:17:40-04:00 Merge pull request haskell/haddock#514 from Helkafen/frames remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) - - - - - 0e506818 by Alex Biehl at 2016-05-26T12:43:09+02:00 Remove misplaced haddock comment - - - - - a07d28c0 by Ben Gamari at 2016-05-27T11:34:59+02:00 Merge pull request haskell/haddock#515 from alexbiehl/master Remove misplaced haddock comment - - - - - 9001d267 by Ben Gamari at 2016-05-27T11:35:46+02:00 Merge pull request haskell/haddock#513 from treeowl/newtype-since Make parser state a newtype - - - - - 74e1a018 by Sebastian Méric de Bellefon at 2016-05-28T17:28:15-04:00 Merge pull request haskell/haddock#504 from Helkafen/issue-280 Fix haskell/haddock#280. Parsing of module header - - - - - 37557f4f by Alan Zimmerman at 2016-05-29T23:36:50+02:00 Matching changes for haskell/haddock#12105 - - - - - 7d09e5d6 by Sebastian Meric de Bellefon at 2016-06-03T18:07:48-04:00 Version bumps (2.17.3, 1.4.2) - - - - - 85b4bc15 by Sebastian Méric de Bellefon at 2016-06-06T18:35:13-04:00 Merge pull request haskell/haddock#521 from Helkafen/master Version bumps (2.17.3, 1.4.2) - - - - - e95f0dee by Sebastian Meric de Bellefon at 2016-06-06T19:11:35-04:00 publish haddock-test library - - - - - 4de40586 by Sebastian Méric de Bellefon at 2016-06-06T20:26:30-04:00 Merge pull request haskell/haddock#512 from phadej/oleg-fixes Fixes for haskell/haddock#508 and haskell/haddock#510 - - - - - ddfd0789 by Dominic Steinitz at 2016-06-09T09:27:28+01:00 Documentation for LaTeX markup. - - - - - 697a503a by Dominic Steinitz at 2016-06-09T09:33:59+01:00 Fix spelling mistake. - - - - - 246f6fff by Dominic Steinitz at 2016-06-09T09:37:15+01:00 Camel case MathJax. - - - - - 4684bd23 by Dominic Steinitz at 2016-06-09T09:44:53+01:00 Fix math typo and add link. - - - - - f20c037c by Simon Peyton Jones at 2016-06-13T18:26:03+01:00 Follow changes to LHsSigWcType - - - - - 0c58996d by Simon Peyton Jones at 2016-06-15T12:56:01+01:00 Follow GHC re-adding FunTy - - - - - 401b5ca7 by Sebastian Méric de Bellefon at 2016-06-15T12:16:47-04:00 Merge pull request haskell/haddock#525 from idontgetoutmuch/master Documentation for LaTeX markup. - - - - - 92d263b7 by Sebastian Méric de Bellefon at 2016-06-15T12:17:29-04:00 Merge pull request haskell/haddock#522 from Helkafen/master publish haddock-test library - - - - - 0953a2ca by Sebastian Meric de Bellefon at 2016-06-16T00:46:46-04:00 Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 65453e14 by Ben Gamari at 2016-06-16T11:16:32+02:00 ocean: Ensure that synopsis fully covers other content Previously MathJax content was being rendered on top of the synopsis due to ambiguous z-ordering. Here we explicitly give the synopsis block a higher z-index to ensure it is rendered on top. Fixes haskell/haddock#531. - - - - - 68e411a1 by Sebastian Méric de Bellefon at 2016-06-16T23:34:39-04:00 Merge pull request haskell/haddock#534 from bgamari/T531 ocean: Ensure that synopsis fully covers other content - - - - - fad6491b by Sebastian Méric de Bellefon at 2016-06-18T23:57:20-04:00 Merge pull request haskell/haddock#533 from Helkafen/master Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 6108e21b by Sebastian Meric de Bellefon at 2016-06-22T23:08:28-04:00 do not create empty src directory Fix haskell/haddock#536. - - - - - 1ef23823 by Sebastian Méric de Bellefon at 2016-06-24T00:04:48-04:00 Merge pull request haskell/haddock#537 from Helkafen/master do not create empty src directory - - - - - 966baa96 by Omari Norman at 2016-06-29T21:59:34-04:00 Add $ as a special character If this character is not escaped, documentation built with Haddock 2.17.2 will fail. This was not an issue with 2.16 series, which causes builds to fail and there is nothing in the docs or error message giving a clue about why builds that used to succeed now don't. - - - - - 324adb60 by Ben Gamari at 2016-07-01T12:18:51+02:00 GhcUtils: Changes for multi-pattern signatures - - - - - d7571675 by Ömer Sinan Ağacan at 2016-07-21T13:30:47+02:00 Add support for unboxed sums - - - - - 29d0907b by Simon Marlow at 2016-07-22T13:55:48+01:00 Disable NFData instances for GHC types when GHC >= 8.2 - - - - - 702d95f3 by Simon Marlow at 2016-08-02T15:57:30+02:00 Disable NFData instances for GHC types when GHC >= 8.0.2 (cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a) - - - - - f4fa79c3 by Ben Gamari at 2016-08-07T13:51:18+02:00 ghc.mk: Don't attempt to install html/frames.html The frames business has been removed. - - - - - 9cd63daf by Ben Gamari at 2016-08-07T13:51:40+02:00 Haddock.Types: More precise version guard This allows haddock to be built with GHC 8.0.2 pre-releases. - - - - - f3d7e03f by Mateusz Kowalczyk at 2016-08-29T20:47:45+01:00 Merge pull request haskell/haddock#538 from massysett/master Add $ as a special character - - - - - 16dbf7fd by Bartosz Nitka at 2016-09-20T19:44:04+01:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 - - - - - 7c31c1ff by Bartosz Nitka at 2016-09-27T17:32:22-04:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b) - - - - - 33a90dce by Ryan Scott at 2016-09-30T20:53:41-04:00 Haddock changes for T10598 See https://ghc.haskell.org/trac/ghc/ticket/10598 - - - - - 1f32f7cb by Ben Gamari at 2016-10-13T20:01:26-04:00 Update for refactoring of NameCache - - - - - 1678ff2e by Ben Gamari at 2016-11-15T17:42:48-05:00 Bump upper bound on base - - - - - 9262a7c5 by Alan Zimmerman at 2016-12-07T21:14:28+02:00 Match changes in GHC wip/T3384 branch - - - - - ac0eaf1a by Ben Gamari at 2016-12-09T09:48:41-05:00 haddock-api: Don't use stdcall calling convention on 64-bit Windows See GHC haskell/haddock#12890. - - - - - 04afe4f7 by Alan Zimmerman at 2016-12-12T20:07:21+02:00 Matching changes for GHC wip/T12942 - - - - - e1d1701d by Ben Gamari at 2016-12-13T16:50:41-05:00 Bump base upper bound - - - - - 3d3eacd1 by Alan Zimmerman at 2017-01-10T16:59:38+02:00 HsIParamTy now has a Located name - - - - - 7dbceefd by Kyrill Briantsev at 2017-01-12T13:23:50+03:00 Prevent GHC API from doing optimization passes. - - - - - d48d1e33 by Richard Eisenberg at 2017-01-19T08:41:41-05:00 Upstream changes re levity polymorphism - - - - - 40c25ed6 by Alan Zimmerman at 2017-01-26T15:16:18+02:00 Changes to match haskell/haddock#13163 in GHC - - - - - 504f586d by Ben Gamari at 2017-02-02T17:19:37-05:00 Kill remaining static flags - - - - - 49147ea0 by Justus Adam at 2017-03-02T15:33:34+01:00 Adding MDoc to exports of Documentation.Haddock - - - - - 1cfba9b4 by Justus Adam at 2017-03-09T11:41:44+01:00 Also exposing toInstalledIface - - - - - 53f0c0dd by Ben Gamari at 2017-03-09T13:10:08-05:00 Bump for GHC 8.3 - - - - - c7902d2e by Ben Gamari at 2017-03-09T23:46:02-05:00 Bump for GHC 8.2 - - - - - 4f3a74f8 by Ben Gamari at 2017-03-10T10:21:55-05:00 Merge branch 'ghc-head' - - - - - e273b72f by Richard Eisenberg at 2017-03-14T13:34:04-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - 6ec3d436 by Richard Eisenberg at 2017-03-14T15:15:52-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - eee3cda1 by Ben Gamari at 2017-03-15T15:19:59-04:00 Adapt to EnumSet - - - - - 017cf58e by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 736d6773 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 475f84a0 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 13240b53 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - cd16d529 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 3bea97ae by Edward Z. Yang at 2017-03-15T22:50:46-07:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b2b051ce by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 0f082795 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 20ef63c9 by Edward Z. Yang at 2017-03-22T13:48:12-07:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 45692dcb by Edward Z. Yang at 2017-03-22T14:11:25-07:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4eae8caf by Ben Gamari at 2017-03-23T09:25:33-04:00 Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEAD - - - - - 0bbe03f5 by Ben Gamari at 2017-03-23T09:27:28-04:00 haddock-api: Bump bound on GHC - - - - - 65f3ac9d by Alex Biehl at 2017-03-23T17:36:11+01:00 Merge pull request haskell/haddock#581 from JustusAdam/master Adding more exports to Documentation.Haddock - - - - - 37d49a47 by Alex Biehl at 2017-03-23T17:39:14+01:00 Merge pull request haskell/haddock#568 from awson/ghc-head Prevent GHC API from doing optimization passes. - - - - - 1ed047e4 by Brian Huffman at 2017-03-23T17:45:58+01:00 Print any user-supplied kind signatures on type parameters. This applies to type parameters on data, newtype, type, and class declarations, and also to forall-bound type vars in type signatures. - - - - - 1b78ca5c by Brian Huffman at 2017-03-23T17:45:58+01:00 Update test suite to expect kind annotations on type parameters. - - - - - a856b162 by Alex Biehl at 2017-03-23T17:49:32+01:00 Include travis build indication badge - - - - - 8e2e2c56 by Ben Gamari at 2017-03-23T17:20:08-04:00 haddock-api: Bump bound on GHC - - - - - 4d2d9995 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737) - - - - - a650e20f by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858) - - - - - caa282c2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 2067a2d0afa9cef381d26fb7140b67c62f433fc0) - - - - - 49684884 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc) - - - - - 4dcfeb1a by Edward Z. Yang at 2017-03-23T17:20:08-04:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a) - - - - - 74dd19d2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e) - - - - - a9b19a23 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3) - - - - - d3631064 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit bf3c4d72a0fda38561376eac7eda216158783267) - - - - - ef2148fc by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1) - - - - - 2f29518b by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 4eb765ca4205c79539d60b7afa9b7e261a4a49fe) - - - - - 37de047d by Phil Ruffwind at 2017-04-03T11:57:14+02:00 Update MathJax URL MathJax is shutting down their CDN: https://www.mathjax.org/cdn-shutting-down/ They recommend migrating to cdnjs. - - - - - e9d24ba8 by David C. Turner at 2017-04-03T14:58:01+02:00 Add highlight for :target to ocean.css - - - - - 4819a202 by Alex Biehl at 2017-04-11T19:36:48+02:00 Allow base-4.10 for haddock-test - - - - - 44cec69c by Alex Biehl at 2017-04-11T19:39:22+02:00 cabal.project for haddock-api, haddock-library and haddock-test - - - - - 935d0f6a by Alex Biehl at 2017-04-11T19:46:29+02:00 Move dist scripts to scripts/ - - - - - 128e150c by Alex Biehl at 2017-04-11T20:34:46+02:00 Add haddock to cabal.project - - - - - cc8e08ea by Alex Biehl at 2017-04-11T20:35:08+02:00 Read files for hyperlinker eagerly This also exposes Documentation.Haddock.Utf8 - - - - - 152dda78 by Alex Biehl at 2017-04-11T20:37:06+02:00 Explicit import list ofr Control.DeepSeq in Haddock.Interface.Create - - - - - 501b33c4 by Kyrill Briantsev at 2017-04-11T21:01:42+02:00 Prevent GHC API from doing optimization passes. - - - - - c9f3f5ff by Alexander Biehl at 2017-04-12T16:36:53+02:00 Add @alexbiehl as maintaner - - - - - 76f214cc by Alex Biehl at 2017-04-13T07:27:18+02:00 Disable doctest with ghc-8.3 Currently doctest doesn't support ghc-head - - - - - 46b4f5fc by Edward Z. Yang at 2017-04-22T20:38:26-07:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f0555235 by Alex Biehl at 2017-04-25T10:08:48+02:00 Travis: Use ghc-8.2.1 on master - - - - - 966ea348 by Alex Biehl at 2017-04-25T10:32:01+02:00 Travis: Verbose cabal output cf. https://travis-ci.org/haskell/haddock/jobs/225512194#L377 - - - - - 36972bcd by Alex Biehl at 2017-04-25T10:40:43+02:00 Use travis_retry for cabal invocations - - - - - b3a09d2c by Alex Biehl at 2017-04-25T17:02:20+02:00 Use new MathJax URL in html-test 18ed871afb82560d5433b2f53e31b4db9353a74e switched to a new MathJax URL but didn't update the tests. - - - - - ae331e5f by Alexander Biehl at 2017-04-25T17:02:20+02:00 Expand signatures for class declarations - - - - - e573c65a by Alexander Biehl at 2017-04-25T17:02:20+02:00 Hoogle: Correctly print classes with associated data types - - - - - 3fc6be9b by Edward Z. Yang at 2017-04-25T17:02:20+02:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9) - - - - - 6725c060 by Herbert Valerio Riedel at 2017-04-25T17:02:20+02:00 `html-test --accept` deltas to reference samples - - - - - 7d444d61 by Alex Biehl at 2017-04-26T07:13:50+02:00 Remove anything related to obsolete frames mode - - - - - b888972c by Alex Biehl at 2017-04-26T07:49:10+02:00 Cherry-picked remaining commits from haddock-2.17.4-release (#603) * Release haddock/haddock-api 2.17.4 and haddock-library 1.4.3 * Set version bounds for haddock-library NB: This allows GHC 8.2.1's base * Set version bounds for haddock & haddock-api The version bounds support GHC 8.2 * Merge (temporary) v2.17.3 branch into v2.17 This allows us to delete the v2.17.3 branch * Fixup changelog * Pin down haddock-api to a single version as otherwise `haddock`'s package version has no proper meaning * fix source-repo spec for haddock-api - - - - - 4161099b by Alex Biehl at 2017-04-26T11:11:20+02:00 Update changelog to reflect news in HEAD - - - - - eed72cb8 by Alex Biehl at 2017-04-26T11:11:20+02:00 Markdownify changelog - - - - - 5815cea1 by Alex Biehl at 2017-04-26T11:32:33+02:00 Bump to 2.18.0 (#605) - - - - - a551d558 by Alex Biehl at 2017-04-29T22:00:25+02:00 Update attoparsec-0.12.1.1 to attoparsec-0.13.1.0 - - - - - ea164a8d by Sergey Vinokurov at 2017-04-29T22:42:36+02:00 Improve error message - - - - - 2e10122f by Alex Biehl at 2017-04-30T10:07:46+02:00 Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. - - - - - f9b24d99 by Alex Biehl at 2017-05-01T17:40:36+02:00 Lazily decode docMap and argMap (#610) These are only used in case of a doc reexport so most of the time decoding these is wasted work. - - - - - 2372af62 by Alex Biehl at 2017-05-01T21:59:23+02:00 Fix Binary instance for InstalledInterface (#611) (#610) introduced lazy decoding for docs from InstalledInterface but forgot to remove the original calls to get and put_ - - - - - 6c633c13 by Nathan Collins at 2017-05-11T11:47:55+02:00 Improve documenation of Haddock markup (#614) * Improve documentation of Haddock markup. - document that Haddock supports inferring types top-level functions with without type signatures, but also explain why using this feature is discouraged. Looks like this feature has been around since version 2.0.0.0 in 2008! - rework the "Module description" section: - move the general discussion of field formatting to the section intro and add examples illustrating the prose for multiline fields. - mention that newlines are preserved in some multiline fields, but not in others (I also noticed that commas in the `Copyright` field are not preserved; I'll look into this bug later). - add a subsection for the module description fields documentation, and put the field keywords in code formatting (double back ticks) instead of double quotes, to be consistent with the typesetting of keywords in other parts of the documentation. - mention that "Named chunks" are not supported in the long-form "Module description" documentation. - fix formatting of keywords in the "Module attributes" section. Perhaps these errors were left over from an automatic translation to ReST from some other format as part of the transition to using Sphinx for Haddock documentation? Also, add a missing reference here; it just said "See ?"! - update footnote about special treatment for re-exporting partially imported modules not being implemented. In my tests it's not implemented at all -- I tried re-exporting both `import B hiding (f)` and `import B (a, b)` style partial imports, and in both cases got the same result as with full imports `import B`: I only get a module reference. * Rework the `Controlling the documentation structure` section. My main goal was to better explain how to use Haddock without an export list, since that's my most common use case, but I hope I improved the section overall: - remove the incomplete `Omitting the export list` section and fold it into the other sections. In particular, summarize the differences between using and not using an export list -- i.e. control over what and in what order is documented -- in the section lead. - add "realistic" examples that use the structure markup, both with and without an export list. I wanted a realistic example here to capture how it can be useful to explain the relationship between a group of functions in a section, in addition to documenting their individual APIs. - make it clear that you can associate documentation chunks with documentation sections when you aren't using an export list, and that doing it in the most obvious way -- i.e. with `-- |`, as you can in the export list -- doesn't work without an export list. It took me a while to figure this out the first time, since the docs didn't explain it at all before. - add a "no export list" example to the section header section. - add more cross references. * Add examples of gotchas for markup in `@...@`. I'm not sure this will help anyone, since I think most people first learn about `@...@` by reading other people's Haddocks, but I've documented the mistakes which I've made and then gotten confused by. * Use consistent Capitalization of Titles. Some titles were in usual title caps, and others only had the first word capitalized. I chose making them all use title caps because that seems to make the cross references look better. - - - - - d4734f45 by Ben Gamari at 2017-05-12T20:36:08+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 93883f37 by Alex Biehl at 2017-05-12T21:02:33+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 5b8f179c by Alex Biehl at 2017-05-13T12:48:10+02:00 Consequently use inClass and notInClass in haddock-library (#617) These allow attoparsec to do some clever lookup optimization - - - - - 77984b82 by Doug Wilson at 2017-05-27T17:37:38+02:00 Don't enable compilation for template haskell (#624) This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa - - - - - 5a3de2b4 by Doug Wilson at 2017-05-27T19:54:53+02:00 Improve Syb code (#621) Specialize.hs and Ast.hs are modified to have their Syb code not recurse into Name or Id in HsSyn types. Specialize.hs is refactored to have fewer calls to Syb functions. Syb.hs has some foldl calls replaced with foldl' calls. There is still a lot of performance on the floor of Ast.hs. The RenamedSource is traversed many times, and lookupBySpan is very inefficient. everywhereBut and lookupBySpan dominate the runtime whenever --hyperlinked-source is passed. - - - - - 3d35a949 by Alex Biehl at 2017-05-30T19:01:37+02:00 Clear fixme comment (#625) - - - - - 2a44bd0c by Alex Biehl at 2017-05-30T19:02:12+02:00 Make haddock-library and haddock-api warning free (#626) - - - - - bd1a0e42 by Alex Biehl at 2017-06-01T10:40:33+02:00 Include `driver-test/*.hs` sdist (#630) This lead to haskell/haddock#629. - - - - - 184a3ab6 by Doug Wilson at 2017-06-03T12:02:08+02:00 Disable pattern match warnings (#628) This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns - - - - - 0cf68004 by Alex Biehl at 2017-06-03T20:37:28+02:00 Allow user defined signatures for pattern synonyms (#631) - - - - - 7f51a58a by Alex Biehl at 2017-06-04T11:56:38+02:00 Use NameSet for isExported check (#632) - - - - - d8f044a9 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Match new AST as per GHC wip/new-tree-one-param See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow - - - - - da1254e3 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Rename extension index tags - - - - - 538c7514 by Christiaan Baaij at 2017-06-09T08:26:43+02:00 Haddock support for bundled pattern synonyms (#627) * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after haskell/haddock#631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case - - - - - a050bffd by Doug Wilson at 2017-06-21T09:27:33+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636) There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6 - - - - - 5d06b871 by Doug Wilson at 2017-06-22T20:23:29+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639) * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports - - - - - b11bb73a by Alex Biehl at 2017-06-23T14:44:41+02:00 Lookup fixities for reexports without subordinates (#642) So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In haskell/haddock#644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from haskell/haddock#642 top-level functions now started to fail reexporting their fixities. - - - - - d2a6dad6 by Alex Biehl at 2017-06-23T18:30:45+02:00 Don't include names with empty subordinates in maps (#644) These are unecessary anyway and just blow up interface size - - - - - 69c2aac4 by Alex Biehl at 2017-06-29T19:54:49+02:00 Make per-argument docs for class methods work again (#648) * Make per-argument docs for class methods work again * Test case - - - - - c9448d54 by Bartosz Nitka at 2017-07-02T12:12:01+02:00 Fix haddock: internal error: links: UnhelpfulSpan (#561) * Fix haddock: internal error: links: UnhelpfulSpan This fixes haskell/haddock#554 for me. I believe this is another fall out of `wildcard-refactor`, like haskell/haddock#549. * Comment to clarify why we take the methods name location - - - - - d4f29eb7 by Alex Biehl at 2017-07-03T19:43:04+02:00 Document record fields when DuplicateRecordFields is enabled (#649) - - - - - 9d6e3423 by Yuji Yamamoto at 2017-07-03T22:37:58+02:00 Fix test failures on Windows (#564) * Ignore .stack-work * Fix for windows: use nul instead of /dev/null * Fix for windows: canonicalize line separator * Also normalize osx line endings - - - - - 7d81e8b3 by Yuji Yamamoto at 2017-07-04T16:13:12+02:00 Avoid errors on non UTF-8 Windows (#566) * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1) - - - - - eded67d2 by Alex Biehl at 2017-07-07T19:17:15+02:00 Remove redudant import warning (#651) - - - - - 05114757 by Alex Biehl at 2017-07-08T00:33:12+02:00 Avoid missing home module warning (#652) * Avoid missing home module warning * Update haddock-library.cabal - - - - - e9cfc902 by Bryn Edwards at 2017-07-17T07:51:20+02:00 Fix haskell/haddock#249 (#655) - - - - - eb02792b by Herbert Valerio Riedel at 2017-07-20T09:09:15+02:00 Fix compilation of lib:haddock-library w/ GHC < 8 - - - - - 9200bfbc by Alex Biehl at 2017-07-20T09:20:38+02:00 Prepare 2.18.1 release (#657) - - - - - 46ddd22c by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Tweak haddock-api.cabal for pending release - - - - - 85e33d29 by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Avoid trivial use of LambdaCase otherwise we can't test w/ e.g. GHC 7.4.2 - - - - - 3afb4bfe by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Refactor .cabal to use sub-lib for vendored lib A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite. - - - - - e56a552e by Herbert Valerio Riedel at 2017-07-20T10:17:48+02:00 haddock-api: add changelog pointing to haddock's changelog This addresses https://github.com/haskell/haddock/issues/638#issuecomment-309283297 - - - - - 2222ff0d by Herbert Valerio Riedel at 2017-07-20T10:19:56+02:00 Drop obsolete/misleading `stability: experimental` This .cabal property has long been considered obsolete - - - - - 9b882905 by Alex Biehl at 2017-07-20T11:25:54+02:00 Beef up haddock description (#658) * Beef up haddock description * Handle empty lines - - - - - bb60e95c by Herbert Valerio Riedel at 2017-07-20T12:08:53+02:00 Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet - - - - - 0761e456 by Herbert Valerio Riedel at 2017-07-20T12:12:55+02:00 Add cheatsheet to haddock.cabal - - - - - 2ece0f0f by Herbert Valerio Riedel at 2017-07-20T12:18:38+02:00 Mention new-build in README - - - - - 947b7865 by Herbert Valerio Riedel at 2017-07-20T12:32:16+02:00 Update README Also improves markup and removes/fixes redundant/obsolete parts [skip ci] - - - - - 785e09ad by Alex Biehl at 2017-07-27T07:28:57+02:00 Bump haddock to 2.18.2, haddock-library to 1.4.5 - - - - - e3ff1ca3 by Alex Biehl at 2017-07-31T20:15:32+02:00 Move `DocMarkup` from haddock-api to haddock-library (#659) * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG - - - - - cda7c20c by Alex Biehl at 2017-07-31T20:35:49+02:00 Fixup haddock - - - - - 583b6812 by Alex Biehl at 2017-07-31T21:20:45+02:00 Changelog for haddock-library - - - - - bac6a0eb by Alex Biehl at 2017-07-31T21:50:24+02:00 Prepare haddock-library-1.4.5 release - - - - - 58ce6877 by Moritz Drexl at 2017-08-05T16:44:40+02:00 Fix renaming after instance signature specializing (#660) * rework rename * Add regression test for Bug 613 * update tests * update changelog - - - - - b8137ec8 by Tim Baumann at 2017-08-06T11:33:38+02:00 Fix: Generate pattern signatures for constructors exported as patterns (#663) * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes haskell/haddock#653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR haskell/haddock#663 * Fix extractPatternSyn error message - - - - - d037086b by Alex Biehl at 2017-08-06T12:43:25+02:00 Bump haddock-library - - - - - 99d7e792 by Alex Biehl at 2017-08-06T12:44:07+02:00 Bump haddock-library in haddock-api - - - - - 94802a5b by Alex Biehl at 2017-08-06T13:18:02+02:00 Provide --show-interface option to dump interfaces (#645) * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated. - - - - - c662e476 by Ryan Scott at 2017-08-14T21:00:21-04:00 Adapt to haskell/haddock#14060 - - - - - b891eb73 by Alex Biehl at 2017-08-16T08:24:48+02:00 Bifoldable and Bitraversable for DocH and MetaDoc - - - - - 021bb56c by Alex Biehl at 2017-08-16T09:06:40+02:00 Refactoring: Make doc renaming monadic This allows us to later throw warnings if can't find an identifier - - - - - 39fbf022 by Alex Biehl at 2017-08-19T20:35:27+02:00 Hyperlinker: Avoid linear lookup in enrichToken (#669) * Make Span strict in Position * Hyperlinker: Use a proper map to enrich tokens - - - - - e13baedd by Alex Biehl at 2017-08-21T20:05:42+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 27dd6e87 by Alex Biehl at 2017-08-21T22:06:35+02:00 Drop Avails from export list - - - - - 86b247e2 by Alex Biehl at 2017-08-22T08:44:22+02:00 Bump ghc version for haddock-api tests - - - - - d4607ca0 by Alex Biehl at 2017-08-22T08:45:17+02:00 Revert "Drop Avails from export list" This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def. - - - - - c9c54c30 by Alex Biehl at 2017-08-22T09:26:01+02:00 IntefaceFile version - - - - - a85b7c02 by Ben Gamari at 2017-08-22T09:29:52-04:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 34e976f5 by Ben Gamari at 2017-08-22T17:40:06+02:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 577abf06 by Ryan Scott at 2017-08-23T14:47:29-04:00 Update for haskell/haddock#14131 - - - - - da68fc55 by Florian Eggenhofer at 2017-08-27T18:21:56+02:00 Generate an index for package content search (#662) Generate an index for package content search - - - - - 39e62302 by Alex Biehl at 2017-08-27T18:50:16+02:00 Content search for haddock html doc - - - - - 91fd6fb2 by Alex Biehl at 2017-08-28T18:39:58+02:00 Fix tests for content search - - - - - b4a3798a by Alex Biehl at 2017-08-28T18:44:08+02:00 Add search button to #page-menu - - - - - 25a7ca65 by Alex Biehl at 2017-08-28T18:47:43+02:00 Load javascript below the fold - - - - - 8d323c1a by Alex Biehl at 2017-08-28T18:49:22+02:00 Accept tests - - - - - c5dac557 by Alex Biehl at 2017-08-28T19:14:55+02:00 Content search css - - - - - 89a5af57 by Paolo Veronelli at 2017-08-29T07:42:13+02:00 Removed `nowrap` for interface method sigs (#674) with nowrap the interfaces method sigs would expand at libitum - - - - - a505f6f7 by Alex Biehl at 2017-08-29T08:05:33+02:00 Include subordinates in content index - - - - - 4bb698c4 by Alexander Biehl at 2017-08-29T11:40:19+02:00 QuickNav: Make docbase configurable - - - - - c783bf44 by Alexander Biehl at 2017-08-29T11:48:36+02:00 QuickNav: Also use baseUrl for doc-index.json request - - - - - 47017510 by Alex Biehl at 2017-08-29T17:56:47+02:00 Fix test fallout (again) - - - - - 924fc318 by Alex Biehl at 2017-08-30T09:24:56+02:00 Write meta.json when generating html output (#676) - - - - - 717dea52 by Alex Biehl at 2017-09-01T09:20:34+02:00 Use relative URL when no docBaseUrl given - - - - - e5d85f3b by Alex Biehl at 2017-09-01T09:35:19+02:00 Add missing js files to data-files (#677) - - - - - 95b9231a by Alex Biehl at 2017-09-01T11:01:36+02:00 Rename "Search" tab to "Quick Jump" - - - - - da0ead0b by Alex Biehl at 2017-09-01T13:03:49+02:00 Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger - - - - - de7da594 by Ben Gamari at 2017-09-05T06:49:55-04:00 Account for "Remember the AvailInfo for each IE" As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building. - - - - - b05cd3b3 by Ben Gamari at 2017-09-14T07:55:07-04:00 Bump upper bound on base - - - - - 79db899e by Herbert Valerio Riedel at 2017-09-21T23:27:52+02:00 Make compatible with Prelude.<> export in GHC 8.4/base-4.11 - - - - - 3405dd52 by Tim Baumann at 2017-09-23T22:02:01+02:00 Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme - - - - - df0b5742 by Alex Biehl at 2017-09-29T21:15:40+02:00 Bump base for haddock-library and haddock-test - - - - - 62b12ea0 by Merijn Verstraaten at 2017-10-04T16:03:13+02:00 Inhibit output of coverage information for hidden modules. (#687) * Inhibit output of coverage information for hidden modules. * Add changelog entry. - - - - - 8daf8bc1 by Alexander Biehl at 2017-10-05T11:27:05+02:00 Don't use subMap in attachInstances - - - - - ad75114e by Alexander Biehl at 2017-10-05T11:27:58+02:00 Revert "Don't use subMap in attachInstances" This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9. - - - - - 7d4aa02f by Alex Biehl at 2017-10-08T15:32:28+02:00 Precise Haddock: Use Avails for export resolution (#688) * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting - - - - - b9b4faa8 by Alex Biehl at 2017-10-08T19:38:21+02:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 43325295 by Alex Biehl at 2017-10-08T20:18:46+02:00 Fix merge fallout - - - - - c6423cc0 by Alex Biehl at 2017-10-08T20:36:12+02:00 Copy QuickJump files over - - - - - 1db587c3 by Tim Baumann at 2017-10-09T18:33:09+02:00 Use <details> element for collapsibles (#690) * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes haskell/haddock#560. - - - - - 1b54c64b by Tim Baumann at 2017-10-10T09:50:59+02:00 Quick Jump: Show error when loading 'doc-index.json' failed (#691) - - - - - 910f716d by Veronika Romashkina at 2017-10-24T07:36:20+02:00 Fix tiny typo in docs (#693) - - - - - b21de7e5 by Ryan Scott at 2017-10-24T13:07:15+02:00 Overhaul Haddock's rendering of kind signatures (#681) * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC - - - - - 6704405c by Ryan Scott at 2017-10-28T07:10:27+02:00 Fix Haddock rendering of kind-indexed data family instances (#694) - - - - - 470f6b9c by Alex Biehl at 2017-10-30T08:45:51+01:00 Add QuickJump version to meta.json (#696) - - - - - b89eccdf by Alex Biehl at 2017-10-30T10:15:49+01:00 Put Quickjump behind --quickjump flag (#697) - - - - - 3095fb58 by Alex Biehl at 2017-10-30T19:09:06+01:00 Add build command to package.json - - - - - f223fda9 by Alex Biehl at 2017-10-30T19:10:39+01:00 Decrease threshold for fuzzy matching - - - - - 80245dda by Edward Z. Yang at 2017-10-31T20:35:05+01:00 Supported reexported-modules via --reexport flag. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 7e389742 by Alex Biehl at 2017-10-31T20:37:56+01:00 Correct missing title in changelog - - - - - 1a2a1c03 by Alex Biehl at 2017-10-31T20:59:07+01:00 Copy quickjump.css for nicer error messages - - - - - db234bb9 by Alex Biehl at 2017-10-31T21:31:18+01:00 Reexported modules: Report warnings if argument cannot be parsed or ... module cannot be found - - - - - eea8a205 by Carlo Hamalainen at 2017-10-31T21:43:14+01:00 More general type for nameCacheFromGhc. (#539) - - - - - 580eb42a by Alex Biehl at 2017-10-31T21:46:52+01:00 Remote tab - - - - - 0e599498 by Alex Biehl at 2017-10-31T21:48:55+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 7b8539bb by Alex Biehl at 2017-10-31T22:28:34+01:00 fullModuleContents traverses exports in declaration order - - - - - 0c91fbf2 by Alex Biehl at 2017-10-31T22:32:31+01:00 Remove excessive use of list comprehensions - - - - - f7356e02 by Alex Biehl at 2017-11-01T19:11:03+01:00 Make better use of AvailInfo - - - - - f3e512d5 by Alex Biehl at 2017-11-02T12:16:22+01:00 Always return documentation for exported subordinates ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks. - - - - - 7cf58898 by Alan Zimmerman at 2017-11-07T08:28:03+02:00 Match changes for Trees that Grow in GHC - - - - - e5105a41 by Alan Zimmerman at 2017-11-08T17:21:58+02:00 Match Trees That Grow - - - - - 55178266 by Alan Zimmerman at 2017-11-11T22:20:31+02:00 Match Trees that Grow in GHC for HsExpr - - - - - 2082ab02 by Ryan Scott at 2017-11-14T15:27:03+01:00 Actually render infix type operators as infix (#703) * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too - - - - - c52ab7d0 by Alan Zimmerman at 2017-11-14T23:14:26+02:00 Clean up use of PlaceHolder, to match TTG - - - - - 81cc9851 by Moritz Angermann at 2017-11-20T07:52:49+01:00 Declare use of `Paths_haddock` module in other-modules (#705) This was detected by `-Wmissing-home-modules` - - - - - f9d27598 by Moritz Angermann at 2017-11-20T12:47:34+01:00 Drop Paths_haddock from ghc.mk (#707) With haskell/haddock#705 and haskell/haddock#706, the custom addition should not be necessary any more. # Conflicts: # ghc.mk - - - - - f34818dc by Moritz Angermann at 2017-11-20T12:47:59+01:00 Add autogen-modules (#706) > Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail. # Conflicts: # haddock.cabal - - - - - bb43a0aa by Ben Gamari at 2017-11-21T15:50:12-05:00 Revert "Clean up use of PlaceHolder, to match TTG" This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049. - - - - - af9ebb2b by Ben Gamari at 2017-11-21T15:50:14-05:00 Revert "Match Trees that Grow in GHC for HsExpr" This reverts commit 9f054dc365379c66668de6719840918190ae6e44. - - - - - 5d35c3af by Ben Gamari at 2017-11-21T15:50:15-05:00 Revert "Match Trees That Grow" This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c. - - - - - 99a8e43b by Ben Gamari at 2017-11-21T16:36:06-05:00 Revert "Match changes for Trees that Grow in GHC" This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547. - - - - - c4d650c2 by Ben Gamari at 2017-12-04T15:06:07-05:00 Bump GHC version - - - - - 027b2274 by Ben Gamari at 2017-12-04T17:06:31-05:00 Bump GHC bound to 8.4.* - - - - - 58eaf755 by Alex Biehl at 2017-12-06T15:44:24+01:00 Update changelog - - - - - d68f5584 by Simon Peyton Jones at 2017-12-07T14:39:56+00:00 Track changes to follow Trac haskell/haddock#14529 This tracks the refactoring of HsDecl.ConDecl. - - - - - dc519d6b by Alec Theriault at 2018-01-06T08:20:43-08:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - 8285118c by Alec Theriault at 2018-01-13T12:12:37+01:00 Constructor and pattern synonym argument docs (#709) * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors. - - - - - ca4fabb4 by Alec Theriault at 2018-01-15T17:12:18-08:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 4c472fea by Ryan Scott at 2018-01-19T10:44:02+01:00 Fix haskell/haddock#732 (#733) - - - - - bff14dbd by Alex Biehl at 2018-01-19T15:33:30+01:00 extractDecl: Extract associated types correctly (#736) - - - - - a2a94a73 by Alex Biehl at 2018-01-19T15:34:40+01:00 extractDecl: Extract associated types correctly (#736) - - - - - 26df93dc by Alex Biehl at 2018-01-20T10:18:22+01:00 haddock-api: bump ghc to ^>= 8.4 - - - - - f65aeb1d by Alex Biehl at 2018-01-20T19:18:20+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - 0e721b97 by Alex Biehl at 2018-01-20T19:20:19+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - cb6234f6 by Ben Gamari at 2018-01-26T13:40:55-05:00 Merge remote-tracking branch 'harpocrates/fix/missing-orphan-instances' into ghc-head - - - - - 0fc28554 by Alec Theriault at 2018-02-01T14:58:18+01:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - b9123772 by Alec Theriault at 2018-02-01T14:58:18+01:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 0c12e274 by Ryan Scott at 2018-02-01T14:58:18+01:00 Fix haskell/haddock#548 by rendering datatype kinds more carefully (#702) - - - - - 8876d20b by Alec Theriault at 2018-02-01T14:58:18+01:00 Use the GHC lexer for the Hyperlinker backend (#714) * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog - - - - - 95c6a771 by Alec Theriault at 2018-02-01T14:58:18+01:00 Clickable anchors for headings (#716) See haskell/haddock#579. This just adds an <a> tag around the heading, pointing to the heading itself. - - - - - 21463d28 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump: Matches on function names weight more than matches in ... module names. - - - - - 8023af39 by Alex Biehl at 2018-02-01T14:58:18+01:00 Treat escaped \] better in definition lists (#717) This fixes haskell/haddock#546. - - - - - e4866dc1 by Alex Biehl at 2018-02-01T14:58:18+01:00 Remove scanner, takeWhile1_ already takes care of escaping - - - - - 9bcaa49d by Alex Biehl at 2018-02-01T14:58:18+01:00 Take until line feed - - - - - 01d2af93 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. - - - - - 31128417 by Alec Theriault at 2018-02-01T14:58:18+01:00 Patch flaky parser test (#720) * Patch flaky parser test This test was a great idea, but it doesn't port over too well to using the GHC lexer. GHC rewrites its input a bit - nothing surprising, but we need to guard against those cases for the test. * Change instance head * Change use site - - - - - 9704f214 by Herbert Valerio Riedel at 2018-02-01T14:58:18+01:00 Include secondary LICENSE file in source dist - - - - - 51f25074 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Grid Tables (#718) * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example - - - - - 670d6200 by Alex Biehl at 2018-02-01T14:58:18+01:00 Add grid table example to cheatsheet (pdf and svg need to be regenerated thought) - - - - - 4262dec9 by Alec Theriault at 2018-02-01T14:58:18+01:00 Fix infinite loop when specializing instance heads (#723) * Fix infinite loop when specializing instance heads The bug can only be triggered from TH, hence why it went un-noticed for so long. * Add test for haskell/haddock#679 and haskell/haddock#710 - - - - - 67ecd803 by Alec Theriault at 2018-02-01T14:58:18+01:00 Filter RTS arguments from 'ghc-options' arguments (#725) This fixes haskell/haddock#666. - - - - - 7db26992 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump Scrollable overlay - - - - - da9ff634 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Hyperlinker: Adjust parser to new PFailed constructor - - - - - 7b7cf8cb by Alexander Biehl at 2018-02-01T14:58:18+01:00 Specialize: Add missing IdP annotations - - - - - 78cd7231 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Convert: Correct pass type - - - - - a2d0f590 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Warning free compilation - - - - - cd861cf3 by Alexander Biehl at 2018-02-01T14:58:18+01:00 hadock-2.19.0 / haddock-api-2.19.0 / haddock-library-1.5.0 - - - - - c6651b72 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Adjust changelogs - - - - - 1e93da0b by Alexander Biehl at 2018-02-01T14:58:18+01:00 haddock-library: Info about breaking changes - - - - - f9b11db8 by Alec Theriault at 2018-02-02T12:36:02+01:00 Properly color pragma contents in hyperlinker The hyperlinker backend now classifies the content of pragmas as 'TkPragma'. That means that in something like '{-# INLINE foo #-}', 'foo' still gets classified as a pragma token. - - - - - c40b0043 by Alec Theriault at 2018-02-02T12:36:02+01:00 Support the new 'ITcolumn_prag' token - - - - - 4a2a4d39 by Alex Biehl at 2018-02-03T12:11:55+01:00 QuickJump: Mitigate encoding problems on Windows - - - - - bb34503a by Alex Biehl at 2018-02-04T18:39:31+01:00 Use withBinaryFile - - - - - 637605bf by Herbert Valerio Riedel at 2018-02-05T09:48:32+01:00 Try GHC 8.4.1 for Travis CI job - - - - - 7abb67e4 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 try harder to build w/ GHC 8.4.1 - - - - - 8255cc98 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 Add `SPDX-License-Identifier` as alised for "license" module header tokens C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from haskell/haddock#743 - - - - - 267cd23d by Herbert Valerio Riedel at 2018-02-05T10:24:34+01:00 Make test-suite SMP compatible - - - - - 95d4bf40 by Alec Theriault at 2018-02-05T22:01:04+01:00 Hyperlink pattern synonyms and 'module' imports (#744) Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes haskell/haddock#731. - - - - - 67838dcd by Alec Theriault at 2018-02-06T08:23:36+01:00 Don't warn about missing '~' (#746) This manually filters out '~' from the list of things to warn about. It truly makes no sense to warn on this since '~' has nothing it could link to - it is magical. This fixes haskell/haddock#532. - - - - - ab6c3f9f by Alec Theriault at 2018-02-06T08:24:47+01:00 Don't barf on 'HsSpliceTy' (#745) This handles 'HsSpliceTy's by replacing them with what they expand to. IIUC everything that is happening, 'renameHsSpliceTy' should not be able to fail for the inputs we feed it from GHC. This fixes haskell/haddock#574. - - - - - 92bf95ad by Alex Biehl at 2018-02-06T08:28:23+01:00 Rename: renameHsSpliceTy ttg - - - - - 3130b1e1 by Alex Biehl at 2018-02-06T09:02:14+01:00 Expand SigDs - - - - - c72adae5 by Alex Biehl at 2018-02-06T09:20:51+01:00 fullModuleContents: support named docs - - - - - de2e4dbf by Alex Biehl at 2018-02-06T13:56:17+01:00 Hyperlinker: Also link pattern synonym arguments - - - - - b7c98237 by Alex Biehl at 2018-02-09T18:44:23+01:00 Expand SigD in a better place In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place. - - - - - 8f598b27 by Alec Theriault at 2018-02-11T12:29:56+01:00 Add module tooltips to linked identifiers (#753) No more clicking to figure out whether your bytestring is strict or lazy! - - - - - d812e65d by Alec Theriault at 2018-02-11T12:31:44+01:00 Add 'show' option to complement 'hide' (#752) * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes haskell/haddock#751 and haskell/haddock#266. * Add a '--show-all' option - - - - - 6676cecb by Alex Biehl at 2018-02-18T11:07:15-05:00 QuickJump: Mitigate encoding problems on Windows (cherry picked from commit 86292c54bfee2343aee84559ec01f1fc68f52231) - - - - - e753dd88 by Alex Biehl at 2018-02-18T17:59:54+01:00 Use withBinaryFile - - - - - 724dc881 by Tamar Christina at 2018-02-19T05:34:49+01:00 Haddock: support splitted include paths. (#689) - - - - - 9b6d6f50 by Alex Biehl at 2018-02-19T05:57:02+01:00 Teach the HTML backend how to render methods with multiple names - - - - - a74aa754 by Alexander Biehl at 2018-02-19T10:04:34+01:00 Hoogle/Latex: Remove use of partial function - - - - - 66d8bb0e by Alec Theriault at 2018-02-25T16:04:01+01:00 Fix file handle leak (#763) (#764) Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137. - - - - - bb92d03d by Alex Biehl at 2018-03-02T14:21:23+01:00 Enable running test suite with stock haddock and ghc using ``` $ cabal new-run -- html-test --haddock-path=$(which haddock) --ghc-path=$(which ghc) ``` - - - - - dddb3cb2 by Alex Biehl at 2018-03-02T15:43:21+01:00 Make testsuite work with haddock-1.19.0 release (#766) - - - - - f38636ed by Alec Theriault at 2018-03-02T15:48:36+01:00 Support unicode operators, proper modules Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes haskell/haddock#458. - - - - - 09d89f7c by Alec Theriault at 2018-03-02T15:48:43+01:00 Remove bang pattern - - - - - d150a687 by Alex Biehl at 2018-03-02T15:48:48+01:00 fix test - - - - - d6fd71a5 by Alex Biehl at 2018-03-02T16:22:38+01:00 haddock-test: Be more explicit which packages to pass We now pass `-hide-all-packages` to haddock when invoking the testsuite. This ensures we don't accidentally pick up any dependencies up through ghc.env files. - - - - - 0932c78c by Alex Biehl at 2018-03-02T17:50:38+01:00 Revert "fix test" This reverts commit 1ac2f9569242f6cb074ba6e577285a4c33ae1197. - - - - - 52516029 by Alex Biehl at 2018-03-02T18:16:50+01:00 Fix Bug548 for real - - - - - 89df9eb5 by Alex Biehl at 2018-03-05T18:28:19+01:00 Hyperlinker: Links for TyOps, class methods and associated types - - - - - d019a4cb by Ryan Scott at 2018-03-06T13:43:56-05:00 Updates for haskell/haddock#13324 - - - - - 6d5a42ce by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump haddock-2.19.0.1, haddock-api-2.19.0.1, haddock-library-1.5.0.1 - - - - - c0e6f380 by Alex Biehl at 2018-03-10T18:25:57+01:00 Update changelogs for haddock-2.19.0.1 and haddock-library-1.5.0.1 - - - - - 500da489 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Update to QC 2.11 - - - - - ce8362e9 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Restore backward-compat with base-4.5 through base-4.8 - - - - - baae4435 by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump lower bound for haddock-library - - - - - 10b7a73e by Alex Biehl at 2018-03-10T18:25:57+01:00 Haddock: Straighten out base bound - - - - - a6096f7b by Alex Biehl at 2018-03-13T08:45:06+01:00 extractDecl: Extract constructor patterns from data family instances (#776) * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors - - - - - ba4a0744 by Simon Jakobi at 2018-03-14T08:26:42+01:00 Readme: Update GHC version (#778) - - - - - 8de157d4 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for definition lists - - - - - 425b46f9 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for links - - - - - d53945d8 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for inline links - - - - - f1dc7c99 by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Slightly unmangle output - - - - - 0879d31c by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Prevent stdout buffering - - - - - 1f9e5f1b by Simon Jakobi at 2018-03-14T20:39:29+01:00 haddock-library.cabal: Clean up GHC options - - - - - 066b891a by Simon Jakobi at 2018-03-14T20:39:29+01:00 Make a proper definition for the <link> parser - - - - - 573d6ba7 by Alec Theriault at 2018-03-21T09:16:57+01:00 Show where instances are defined (#748) * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests - - - - - 99b5d28b by Alex Biehl at 2018-03-21T09:20:36+01:00 Prepare changelog for next release - - - - - 482d3a93 by Alex Biehl at 2018-03-23T15:57:36+01:00 Useful cost centres, timers and allocation counters (#785) * Add some useful cost-centres for profiling * Add withTiming for each haddock phase Invoking haddock with `--optghc=-ddump-timings` now shows the amount of time spent and the number of allocated bytes for each phase. - - - - - 773b41bb by Alec Theriault at 2018-03-27T08:35:59+02:00 @since includes package name (#749) * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too. - - - - - e42c57bc by Alex Biehl at 2018-03-27T08:42:50+02:00 haddock-2.19.1, haddock-api-2.19.1, haddock-library-1.6.0 - - - - - 8373a529 by Alex Biehl at 2018-03-28T10:17:11+02:00 Bump haddock and haddock-api to 2.20.0 - - - - - 5038eddd by Jack Henahan at 2018-04-03T13:28:12+02:00 Clear search string on hide for haskell/haddock#781 (#789) - - - - - 920ca1eb by Alex Biehl at 2018-04-03T16:35:50+02:00 Travis: Build with ghc-8.4.2 (#793) - - - - - a232f0eb by Alan Zimmerman at 2018-04-07T14:14:32+02:00 Match changes in GHC for D4199 Removing HasSourceText and SourceTextX classes. - - - - - ab85060b by Alan Zimmerman at 2018-04-09T21:20:24+02:00 Match GHC changes for TTG - - - - - 739302b6 by Alan Zimmerman at 2018-04-13T13:31:44+02:00 Match GHC for TTG implemented on HsBinds, D4581 - - - - - 2f56d3cb by Ryan Scott at 2018-04-19T11:42:58-04:00 Bump upper bound on base to < 4.13 See https://ghc.haskell.org/trac/ghc/ticket/15018. - - - - - a49df92a by Alex Biehl at 2018-04-20T07:31:44+02:00 Don't treat fixity signatures like declarations - - - - - d02c103b by Ryan Scott at 2018-04-24T11:20:11-04:00 Add regression test for haskell/haddock#413 Fixes haskell/haddock#413. - - - - - c7577f52 by Ryan Scott at 2018-04-24T13:51:06-07:00 Improve the Hoogle backend's treatment of type families (#808) Fixes parts 1 and 2 of haskell/haddock#806. - - - - - d88f85b1 by Alec Theriault at 2018-04-25T11:24:07-07:00 Replace 'attoparsec' with 'parsec' (#799) * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments - - - - - fc25e2fe by Alan Zimmerman at 2018-04-27T15:36:53+02:00 Match changes in GHC for TTG - - - - - 06175f91 by Herbert Valerio Riedel at 2018-05-01T18:11:09+02:00 Merge branch 'ghc-head' with 'ghc-8.4' - - - - - 879caaa8 by Alec Theriault at 2018-05-07T18:53:15-07:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 3e0120cb by Simon Jakobi at 2018-05-07T19:00:18-07:00 Add docs for some DocH constructors (#814) - - - - - 0a32c6db by Alec Theriault at 2018-05-08T02:15:45-07:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 8816e783 by Simon Jakobi at 2018-05-08T10:48:11-07:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - ad60366f by Ryan Scott at 2018-05-10T11:19:47-04:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - 03b7cc3b by Ryan Scott at 2018-05-10T11:24:38-04:00 Wibbles - - - - - b03dd563 by Chaitanya Koparkar at 2018-05-10T11:44:58-04:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 9f298a40 by Ben Gamari at 2018-05-13T17:36:04-04:00 Account for refactoring of LitString - - - - - ea3dabe7 by Ryan Scott at 2018-05-16T09:21:43-04:00 Merge pull request haskell/haddock#826 from haskell/T825 Remove Hoogle backend hack that butchers infix datatype names - - - - - 0d234f7c by Alec Theriault at 2018-05-23T11:29:05+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 15fc9712 by Simon Jakobi at 2018-05-31T04:17:47+02:00 Adjust to new HsDocString internals - - - - - 6f1e19a8 by Ben Gamari at 2018-06-02T16:18:58-04:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 0d0355d9 by Ryan Scott at 2018-06-04T21:26:59-04:00 DerivingVia changes - - - - - 0d93475a by Simon Jakobi at 2018-06-05T19:47:05+02:00 Bump a few dependency bounds (#845) - - - - - 5cbef804 by Alec Theriault at 2018-06-05T19:47:16+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 9094c56f by Alec Theriault at 2018-06-05T22:53:25+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 70188719 by Simon Jakobi at 2018-06-08T22:20:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - 495cd1fc by Chaitanya Koparkar at 2018-06-13T23:01:34+02:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 81088732 by Ben Gamari at 2018-06-13T23:01:34+02:00 Account for refactoring of LitString - - - - - 7baf6587 by Simon Jakobi at 2018-06-13T23:05:08+02:00 Adjust to new HsDocString internals - - - - - bb61464d by Ben Gamari at 2018-06-13T23:05:22+02:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 5d8cb87f by Ryan Scott at 2018-06-13T23:39:30+02:00 DerivingVia changes - - - - - 73d373a3 by Alec Theriault at 2018-06-13T23:39:30+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 4865e254 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Remove `ITtildehsh` token - - - - - b867db54 by Alec Theriault at 2018-06-13T23:39:30+02:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 9598e392 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Add docs for some DocH constructors (#814) - - - - - 8a59035b by Alec Theriault at 2018-06-13T23:39:30+02:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 29350fc8 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - 2590bbd9 by Ryan Scott at 2018-06-13T23:39:30+02:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - a9939fdc by Ryan Scott at 2018-06-13T23:39:30+02:00 Wibbles - - - - - a22f7df4 by Alec Theriault at 2018-06-13T23:39:30+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 8741015d by Simon Jakobi at 2018-06-13T23:39:30+02:00 Bump a few dependency bounds (#845) - - - - - 4791e1cc by Alec Theriault at 2018-06-13T23:39:30+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 311d3216 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - d0577817 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Complete FixitySig and FamilyDecl pattern matches - - - - - 055b3aa7 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Fix redundant import warnings - - - - - f9ce19b1 by Simon Jakobi at 2018-06-13T23:49:52+02:00 html-test: Accept output - - - - - 04604ea7 by Simon Jakobi at 2018-06-13T23:54:37+02:00 Bump bounds on Cabal - - - - - 0713b692 by Simon Jakobi at 2018-06-14T00:00:12+02:00 Merge branch 'ghc-head' into ghc-head-update-3 - - - - - c6a56bfd by Simon Jakobi at 2018-06-14T02:33:27+02:00 Bump ghc bound for haddock-api spec test-suite - - - - - 119d04b2 by Simon Jakobi at 2018-06-14T12:37:48+02:00 Travis: `--allow-newer` for all packages - - - - - 0e876e2c by Alex Biehl at 2018-06-14T15:28:52+02:00 Merge pull request haskell/haddock#857 from sjakobi/ghc-head-update-3 Update ghc-head - - - - - 5be46454 by Alec Theriault at 2018-06-14T21:42:45+02:00 Improved handling of interfaces in 'haddock-test' (#851) This should now work with an inplace GHC where (for instance) HTML directories may not be properly recorded in the package DB. - - - - - 96ab1387 by Vladislav Zavialov at 2018-06-14T17:06:21-04:00 Handle -XStarIsType - - - - - e518f8c4 by Ben Gamari at 2018-06-14T17:48:00-04:00 Revert unintentional reversion of fix of haskell/haddock#548 - - - - - 01b9f96d by Alan Zimmerman at 2018-06-19T11:52:22+02:00 Match changes in GHC for haskell/haddock#14259 - - - - - 7f8c8298 by Ben Gamari at 2018-06-19T18:14:27-04:00 Bump GHC version to 8.6 - - - - - 11c6b5d2 by Ryan Scott at 2018-06-19T23:17:31-04:00 Remove HsEqTy and XEqTy - - - - - b33347c2 by Herbert Valerio Riedel at 2018-06-20T23:14:52+02:00 Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. - - - - - f0d2460e by Herbert Valerio Riedel at 2018-06-20T23:28:46+02:00 Update Travis CI job - - - - - ef239223 by Herbert Valerio Riedel at 2018-06-20T23:32:41+02:00 Drop GHC HEAD from CI and update GHC to 8.4.3 It's a waste of resource to even try to build this branch w/ ghc-head; so let's not do that... - - - - - 41c4a9fa by Ben Gamari at 2018-06-20T18:26:20-04:00 Bump GHC version to 8.7 - - - - - 8be593dc by Herbert Valerio Riedel at 2018-06-21T22:32:15+02:00 Update CI job to use GHC 8.7.* - - - - - b91d334a by Simon Jakobi at 2018-06-30T13:41:38+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section - - - - - f707d848 by Alec Theriault at 2018-07-05T10:43:35-04:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. - - - - - a6d2b8dc by Alec Theriault at 2018-07-06T10:06:32-04:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case - - - - - 13819f71 by Alan Zimmerman at 2018-07-15T19:33:51+02:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 - - - - - c346aa78 by Simon Jakobi at 2018-07-19T12:29:32+02:00 haddock-library: Bump bounds for containers - - - - - 722e733c by Simon Jakobi at 2018-07-19T13:36:45+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] - - - - - f0bd83fd by Alec Theriault at 2018-07-19T14:39:57+02:00 Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. - - - - - 394053a8 by Simon Jakobi at 2018-07-19T14:58:07+02:00 haddock-library: Bump bounds for containers - - - - - 1bda11a2 by Alec Theriault at 2018-07-20T09:04:03+02:00 Add HEAD.hackage overlay (#887) * Add HEAD.hackage overlay * Add HCPKG variable - - - - - c7b4ab45 by Alec Theriault at 2018-07-20T12:01:16+02:00 Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test - - - - - c05d32ad by Alec Theriault at 2018-07-20T12:01:49+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output - - - - - 24b39ee4 by Alec Theriault at 2018-07-20T12:02:16+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. - - - - - cb9d2099 by Simon Jakobi at 2018-07-20T13:39:29+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) - - - - - 133f24f5 by Alec Theriault at 2018-07-20T13:39:29+02:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) - - - - - 11024149 by Alec Theriault at 2018-07-20T13:39:29+02:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) - - - - - de0c139e by Simon Jakobi at 2018-07-20T13:39:29+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) - - - - - 6435e952 by Alec Theriault at 2018-07-20T13:39:29+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) - - - - - 1461af39 by Alec Theriault at 2018-07-20T13:39:29+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) - - - - - 69d3bde1 by Alec Theriault at 2018-07-20T13:49:47+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) - - - - - 6a5c73c7 by Alec Theriault at 2018-07-20T13:50:00+02:00 Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests - - - - - 92ca94c6 by Alec Theriault at 2018-07-20T13:55:36+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) - - - - - 981bc7fa by Simon Jakobi at 2018-07-20T15:06:06+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers - - - - - 27e7c0c5 by Simon Jakobi at 2018-07-20T15:09:05+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 49e1a415 by Simon Jakobi at 2018-07-20T16:02:02+02:00 Update the ghc-8.6 branch (#889) * Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. * README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) * Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) * Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) * tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) * Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. * Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test * Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) * Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) * Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) * Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests * Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 5ca14bed by Simon Jakobi at 2018-07-20T16:05:47+02:00 Revert "Revert "Bump GHC version to 8.6"" That commit didn't belong onto the ghc-8.6 branch. This reverts commit acbaef3b9daf1d2dea10017964bf886e77a8e967. - - - - - 2dd600dd by Simon Jakobi at 2018-07-20T16:18:21+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. - - - - - fceb2422 by Simon Jakobi at 2018-07-20T16:18:21+02:00 outOfScope: Recommend qualifying the identifier - - - - - acea5d23 by Simon Jakobi at 2018-07-20T16:19:35+02:00 outOfScope: Recommend qualifying the identifier (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7) - - - - - 1a83ca55 by Simon Jakobi at 2018-07-20T16:19:35+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f) - - - - - 48374451 by Masahiro Sakai at 2018-07-20T17:06:42+02:00 Add # as a special character (#884) '#' has special meaning used for anchors and can be escaped using backslash. Therefore it would be nice to be listed as special characters. - - - - - 5e1a5275 by Alec Theriault at 2018-07-20T23:37:24+02:00 Let `haddock-test` bypass interface version check (#890) This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to. - - - - - 27286754 by Yuji Yamamoto at 2018-07-23T08:16:01+02:00 Avoid "invalid argument (invalid character)" on non-unicode Windows (#892) Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566 - - - - - 6729d361 by Alec Theriault at 2018-07-23T13:52:56-07:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). - - - - - 8cf4e6b5 by Ryan Scott at 2018-07-27T11:28:03-04:00 eqTyCon_RDR now lives in TysWiredIn After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071 - - - - - 1ad251a6 by Alan Zimmerman at 2018-07-30T13:28:09-04:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 (cherry picked from commit e3926b50ab8a7269fd6904b06e881745f08bc5d6) - - - - - 8aea2492 by Richard Eisenberg at 2018-08-02T10:54:17-04:00 Update against new HsImplicitBndrs - - - - - e42cada9 by Alec Theriault at 2018-08-04T17:51:30+02:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 0e852512 by Alex Biehl at 2018-08-06T13:04:02+02:00 Make --package-version optional for --hoogle generation (#899) * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion - - - - - d2abd684 by Noel Bourke at 2018-08-21T09:34:18+02:00 Remove unnecessary backslashes from docs (#908) On https://haskell-haddock.readthedocs.io/en/latest/markup.html#special-characters the backslash and backtick special characters showed up with an extra backslash before them – I think the escaping is not (or no longer) needed for those characters in rst. - - - - - 7a578a9e by Matthew Pickering at 2018-08-21T09:34:50+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - aa3d4db3 by Matthew Pickering at 2018-08-21T09:37:34+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - ede91744 by Alec Theriault at 2018-08-21T09:42:52+02:00 Better test output when Haddock crashes on a test (#902) In particular: we report the tests that crashed seperately from the tests that produced incorrect output. In order for tests to pass (and exit 0), they must not crash and must produce the right output. - - - - - 4a872b84 by Guillaume Bouchard at 2018-08-21T09:45:57+02:00 Fix a typo (#878) - - - - - 4dbf7595 by Ben Sklaroff at 2018-08-21T12:04:09-04:00 Add ITcomment_line_prag token to Hyperlinker Parser This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935 - - - - - 9170b2a9 by Ben Gamari at 2018-08-21T17:55:15-04:00 Merge pull request haskell/haddock#893 from harpocrates/get-name-to-instances Accumulate explicitly which modules to load for 'attachInstances' - - - - - d57b57cc by Ben Gamari at 2018-08-21T17:59:13-04:00 Merge branch 'ghc-head' of github.com:haskell/haddock into ghc-head - - - - - 14601ca2 by Alec Theriault at 2018-08-21T19:09:37-04:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1) - - - - - 438c645e by Matthew Pickering at 2018-08-21T19:12:39-04:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d) - - - - - a80c5161 by Alec Theriault at 2018-08-21T22:06:40-07:00 Better rendering of unboxed sums/tuples * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType' - - - - - 88456cc1 by Alec Theriault at 2018-08-21T22:06:40-07:00 Handle promoted tuples in 'synifyType' When we have a fully applied promoted tuple, we can expand it out properly. - - - - - fd1c1094 by Alec Theriault at 2018-08-21T22:19:34-07:00 Accept test cases - - - - - 6e80d9e0 by Alec Theriault at 2018-08-21T22:24:03-07:00 Merge pull request haskell/haddock#914 from harpocrates/feature/unboxed-stuff Better rendering of unboxed sums, unboxed tuples, promoted tuples. - - - - - 181a23f1 by Ben Gamari at 2018-08-23T15:53:48-04:00 Merge remote-tracking branch 'origin/ghc-8.6' into ghc-8.6 - - - - - 3a18c1d8 by Alec Theriault at 2018-08-27T14:15:25-07:00 Properly synify promoted list types We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type])))) - - - - - b4794946 by Alec Theriault at 2018-09-03T07:19:55-07:00 Only look at visible types when synifying a 'HsListTy' The other types are still looked at when considering whether to make a kind signature or not. - - - - - a231fce2 by Alec Theriault at 2018-09-03T07:38:10-07:00 Merge pull request haskell/haddock#922 from harpocrates/promoted-lists Properly synify promoted list types - - - - - 0fdf044e by Ningning Xie at 2018-09-15T10:25:58-04:00 Update according to GHC Core changes - - - - - 7379b115 by Ningning Xie at 2018-09-15T15:40:18-04:00 update dataFullSig to work with Co Quantification This should have been in the previous patch, but wasn't. - - - - - cf84a046 by Alec Theriault at 2018-09-17T20:12:18-07:00 Fix/add to various docs * Add documentation for a bunch of previously undocumented options (fixes haskell/haddock#870) * Extend the documentation of `--hoogle` considerably (see haskell/haddock#807) * Describe how to add docs to `deriving` clauses (fixes haskell/haddock#912) * Fix inaccurate docs about hyperlinking infix identifiers (fixes haskell/haddock#780) - - - - - ae017935 by Alec Theriault at 2018-09-22T08:32:16-07:00 Update Travis - - - - - d95ae753 by Alec Theriault at 2018-09-22T09:34:10-07:00 Accept failing tests Also silence orphan warnings. - - - - - f3e67024 by Alec Theriault at 2018-09-22T09:41:23-07:00 Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README - - - - - 3f136d4a by Alec Theriault at 2018-09-22T10:53:31-07:00 Turn haddock-library into a minor release Fix some version bounds in haddock-library too. - - - - - b9def006 by Alec Theriault at 2018-09-22T13:07:35-07:00 keep cabal.project file - - - - - 4909aca7 by Alec Theriault at 2018-10-16T09:36:30-07:00 Build on 7.4 and 7.8 - - - - - 99d20a28 by Herbert Valerio Riedel at 2018-10-16T18:45:52+02:00 Minor tweak to package description - - - - - a8059618 by Herbert Valerio Riedel at 2018-10-16T18:47:24+02:00 Merge pull request haskell/haddock#945 haddock-api 2.21.0 and haddock-library 1.6.1 release - - - - - 2d9bdfc1 by Alec Theriault at 2018-10-16T10:54:21-07:00 Bump haddock-library to 1.7.0 The 1.6.1 release should've been a major bump, since types in the `Documentation.Haddock.Parser.Monad` module changed. This version makes that module internal (as it morally should be). - - - - - ed340cef by Alec Theriault at 2018-10-16T14:59:13-07:00 Merge branch 'ghc-8.4' into ghc-8.6 - - - - - 2821a8df by Alec Theriault at 2018-10-16T15:14:48-07:00 Merge branch 'ghc-8.6' into ghc-head - - - - - a722dc84 by Alec Theriault at 2018-10-16T16:28:55-07:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 63377496 by Alec Theriault at 2018-10-16T16:39:07-07:00 Update changelog - - - - - 099a0110 by Alec Theriault at 2018-10-16T16:49:28-07:00 Merge pull request haskell/haddock#942 from harpocrates/update-docs Fix & add to documentation - - - - - 0927416f by Alec Theriault at 2018-10-16T16:50:14-07:00 Set UTF-8 encoding before writing files (#934) This should fix haskell/haddock#929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8). - - - - - 83b7b017 by Alec Theriault at 2018-10-16T17:42:05-07:00 Output pattern synonyms in Hoogle backend (#947) * Output pattern synonyms in Hoogle backend We were previously weren't outputting _any_ pattern synonyms, bundled or not. Now, we output both. Fixes haskell/haddock#946. * Update changelog - - - - - 81e5033d by Alec Theriault at 2018-10-16T18:04:40-07:00 Release `haddock{,-api}-2.22.0` This version will accompany ghc-8.6.2 - - - - - 9661744e by Alex Biehl at 2018-10-18T08:14:32-07:00 Add NewOcean theme And make it the default theme. - - - - - 7ae6d722 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Improve appearance and readability These changes include: - use latest Haskell's logo colors - decrease #content width to improve readability - use nicer font - improve sizes and distances - - - - - 37f8703d by NunoAlexandre at 2018-10-18T08:14:32-07:00 Include custom font in the html head - - - - - 1d5e1d79 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Update html test reference files - - - - - 53b7651f by NunoAlexandre at 2018-10-18T08:14:32-07:00 Make it responsive - It makes small screens taking more space than larger ones - fixes a few issues present in small screens currently - make it look good across different screen sizes. - - - - - 6aa1aeb1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make the style consistent with hackage Several things are addressed here: - better responsive behaviour on the header - better space usage - consistent colors overall - other nit PR comments - - - - - 3a250c5c by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Place the package name before the menu links This supports the expected responsive menu design, where the package name appears above the menu links. - - - - - cae699b3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update html-test reference files The package name element in the package-header is now a div instead of a paragraph, and it is now above the menu ul.links instead of below. - - - - - 2ec7fd2d by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve synopsis style and code - Use CSS3 instead of loading pictures to show "+" and "-" symbols - Drop redundant code - - - - - 0c874c01 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Decrease space between code blocks There was too much space between code blocks as pointed out by reviewers. - - - - - 85568ce2 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Add an initial-scale property to all haddock pages This solves an issue reported about the content looking incredibly small on mobile devices. - - - - - c1538926 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Address several PR comments - Darken text color like done for hackage - Move synopsis to left side - Make table of contents stick to the left on wide screens - Wrap links to avoid page overflow - Improve expand/collapse buttons - Fix issue with content size on mobile devices - Fix issue with font-size on landscape mode - Increase width of the content - Change colors of table of contents and synopsis - Etc - - - - - e6639e5f by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make synopsis scrollable on wide screens When the synopsis is longer than the screen, you can’t see its end and you can't scroll down either, making the content unreachable. - - - - - 1f0591ff by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve information density - Reduce font size - Improve space between and within code blocks - Improve alignments - Improve spacing within sub-blocks - - - - - bf083097 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Minor adjustments Bring in some adjustments made to hackage: - link colors - page header show everything when package title is too long - - - - - 10375fc7 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix responsive triggers overlap issue The min and max width triggers have the same values, which caused the style resolution to take an intersection of both style declarations when the screen resolution had the size of the limts (say 1280px), causing an odd behaviour and look. - - - - - 95ff2f95 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix issue with menu alignment on firefox Reported and described here: https://github.com/haskell/haddock/pull/721#issuecomment-374668869 - - - - - dc86587e by Alex Biehl at 2018-10-18T08:14:32-07:00 Changelog entry for NewOcean - - - - - 27195e47 by Herbert Valerio Riedel at 2018-10-18T08:14:32-07:00 html-test --accept - - - - - 83f4f9c0 by Alex Biehl at 2018-10-18T08:14:32-07:00 Avoid name shadowing - - - - - 231487f1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font to PT Sans Also migrate some general text related changes from hackage. - - - - - 313db81a by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Use 'flex' to fix header alignment - - - - - 5087367b by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Misc of tweaks - Update link colors to hackage scheme - Tune spacing between content elements - Update footer style - Fix and improve code blocks identation - - - - - b08020df by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font in Xhtml.hs to PT Sans - - - - - 78ce06e3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve code blocks styling - Fix and improve spacing - Improve colors and borders - - - - - 81262d20 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make package-header caption backward-compatible The current html generator of this branch wraps the package-header caption as a div, which does not work (without style adjustments) with the old themes. Changing it from div to span does the trick, without needing to adjust the old stylesheets. - - - - - dc4475cb by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update test-suite reference html pages - - - - - 393d35d8 by Alec Theriault at 2018-10-18T08:25:36-07:00 Accept tests - - - - - a94484ba by Alec Theriault at 2018-10-21T10:29:29-07:00 Fix CHANGELOG - - - - - 8797eca3 by Alec Theriault at 2018-10-21T10:36:19-07:00 Update 'data-files' to include NewOcean stuff - - - - - 1ae51e4a by Simon Jakobi at 2018-10-23T11:29:14+02:00 Fix typo in a warning - - - - - 009ad8e8 by Alec Theriault at 2018-10-24T12:47:47-07:00 Update JS dependencies This was done via `npm audit fix`. I think this fixes haskell/haddock#903 along with some more serious vulnerabilities that nobody seems to have noticed. - - - - - 051994db by Alec Theriault at 2018-10-24T17:31:09-07:00 Resurrect the style-switcher This fixes haskell/haddock#810. Looks like things were broken during the quickjump refactor of the JS. For the (git) record: I do not think the style switcher is a good idea. I'm fixing it for the same reason @mzero added it; as an answer to "rumblings from some that they didn't want their pixels changed on bit" - - - - - 2a1d620f by Alec Theriault at 2018-10-24T17:38:07-07:00 Fix copy-pasta error in data-files - - - - - ed5bfb7f by Alec Theriault at 2018-10-24T20:42:14-07:00 Fix the synopsis button Here's these changes are supposed to do: * put the synopsis back on the right side * properly have it on the edge of the screen on wide screens * adjust the background of the synopsis to match the button (otherwise the grey blends in with what is underneath) * get rid of the dotted purple line * the synopsis contents are now scrollable even when in wide screens (this has been a long-standing bug) - - - - - 883fd74b by Alec Theriault at 2018-10-25T20:16:46-07:00 Avoid more conflicts in generated ids (#954) This fixes haskell/haddock#953 by passing more names into the generated ids. - - - - - ea54e331 by Alec Theriault at 2018-10-25T21:07:12-07:00 Don't hide bullets in method docs I think thst CSS was meant only to deal with fields and the effect on bullets was accidental. Fixes haskell/haddock#926. - - - - - 9a14ef4a by Alec Theriault at 2018-10-25T22:02:07-07:00 Indent more things + slightly smaller font - - - - - b9f17e29 by Alec Theriault at 2018-10-25T22:10:01-07:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 096a3cfa by Alec Theriault at 2018-10-25T22:24:38-07:00 Accept HTML output - - - - - 2669517d by Alec Theriault at 2018-10-26T09:02:35-07:00 User manual + stuff for building GHC docs - - - - - 46b27687 by Alec Theriault at 2018-10-26T09:10:59-07:00 Make 'Contents' in NewOcean scrollable This only happens if the contents block on the left is so big that it doesn't fit (vertically) on the page. If that happens, we want it to be scrollable. - - - - - 3443dd94 by Alec Theriault at 2018-10-26T09:36:46-07:00 Revert "Make 'Contents' in NewOcean scrollable" This reverts commit f909ffd8353d6463fd5dd184998a32aa98d5c922. I missed the fact this also forces the 'Contents' to always go down to the bottom of the page. - - - - - ed081424 by Alec Theriault at 2018-10-26T14:22:23-07:00 Avoid some partiality AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes haskell/haddock#569. - - - - - 6a5bec41 by Alec Theriault at 2018-10-27T10:05:04-07:00 Fix documentation in `haddock-api` (#957) * Fix misplaced Haddocks in Haddock itself Haddock should be able to generate documentation for 'haddock-api' again. * Make CI check that documentation can be built. * Add back a doc that is OK - - - - - 5100450a by Matthew Yacavone at 2018-10-27T14:51:38-04:00 More explicit foralls (GHC Proposal 0007) - - - - - 8771a6b0 by Alec Theriault at 2018-11-05T13:58:11-08:00 Only run MathJax on entities with "mathjax" class (#960) Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes haskell/haddock#959. - - - - - bd7ff5c5 by Alec Theriault at 2018-11-05T15:54:22-08:00 Deduplicate some work in 'AttachInstances' Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too - - - - - cf99fd8f by Alec Theriault at 2018-11-05T15:54:22-08:00 Specialize some SYB functions Perf only change: * Add a 'SPECIALIZE' pragma to help GHC optimize a 'Data a =>' constraint * Manually specialize the needlessly general type of 'specializeTyVarBndrs' - - - - - 4f91c473 by Alec Theriault at 2018-11-05T15:54:22-08:00 Improve perf of renaming Perf only change: * don't look up type variable names (they're never in the environment) * use a difference list for accumulating missing names * more efficient 'Functor'/'Applicative' instances for 'RnM' - - - - - 4bbab0d4 by Alec Theriault at 2018-11-05T15:54:22-08:00 Faster 'Text' driven parser combinators Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}' - - - - - fa430c02 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support hyperlink labels with inline markup The parser for pictures hasn't been properly adjusted yet. - - - - - c1431035 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support (and flatten) inline markup in image links Inline markup is supported in image links but, as per the [commonmark recommendation][0], it is stripped back to a plain text representation. [0]: https://spec.commonmark.org/0.28/#example-547 - - - - - d4ee1ba5 by Alec Theriault at 2018-11-06T12:03:24-08:00 Accept test case - - - - - 8088aeb1 by Alec Theriault at 2018-11-06T12:03:24-08:00 Fix/add to haddock-library test suite - - - - - e78f644d by Alec Theriault at 2018-11-06T13:26:31-08:00 Bump version bounds - - - - - 644335eb by Alec Theriault at 2018-11-06T13:53:30-08:00 Merge pull request haskell/haddock#875 from harpocrates/feature/markup-in-hyperlinks Inline markup in markdown-style links and images - - - - - e173ed0d by Alec Theriault at 2018-11-07T12:37:18-08:00 Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page - - - - - b2d92df7 by Alec Theriault at 2018-11-07T13:41:57-08:00 Allow "Contents" summary to scroll in a fixed div In the unfortunate event that the "Contents" summary doesn't fit vertically (like in the "Prelude"), it will be scrollable. - - - - - ca704c23 by Alec Theriault at 2018-11-07T13:45:15-08:00 Accept HTML output changes - - - - - 82c0ec6d by Alec Theriault at 2018-11-07T18:12:54-08:00 overflow-y 'scroll' -> 'auto' - - - - - 571d7657 by Alec Theriault at 2018-11-08T19:44:12-08:00 Clicking on "Contents" navigates to top of page - - - - - 8065a012 by Alec Theriault at 2018-11-08T19:44:17-08:00 Space out functions more Also, functions and data decls now have the same space before and after them. - - - - - cc650ede by Alec Theriault at 2018-11-09T08:13:35-08:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 65f8c17f by Alec Theriault at 2018-11-10T14:04:06-08:00 Update changelog - - - - - 20473847 by Alec Theriault at 2018-11-10T14:21:40-08:00 Replace oplus/ominus expander/collapser icons with triangles - - - - - 16592957 by Alec Theriault at 2018-11-10T14:35:10-08:00 Merge pull request haskell/haddock#949 from haskell/wip/new-ocean Introduce NewOcean theme. - - - - - 357cefe1 by Alec Theriault at 2018-11-10T16:02:13-08:00 Merge branch 'ghc-8.6' into ghc-head - - - - - de612267 by Alec Theriault at 2018-11-11T20:01:21-08:00 Rename 'NewOcean' theme to 'Linuwial' - - - - - 954b5baa by Alec Theriault at 2018-11-12T08:33:18-08:00 Add blockquote styling Matches b71da1feabf33efbbc517ac376bb690b5a604c2f from hackage-server. Fixes haskell/haddock#967. - - - - - d32c0b0b by Fangyi Zhou at 2018-11-12T10:24:13-08:00 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, osa1 Reviewed By: osa1 GHC Trac Issues: haskell/haddock#15733 Differential Revision: https://phabricator.haskell.org/D5262 - - - - - 41098b1f by Alp Mestanogullari at 2018-11-15T22:40:09+01:00 Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change It got introduced in ghc/ghc at ae2c9b40f5b6bf272251d1f4107c60003f541b62. - - - - - c5c1c7e0 by Alec Theriault at 2018-11-15T13:48:13-08:00 Merge pull request haskell/haddock#970 from alpmestan/alp/fix-promotionflag Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change - - - - - 6473d3a4 by Shayan-Najd at 2018-11-23T01:38:49+01:00 [TTG: Handling Source Locations] Foundation and Pat Trac Issues haskell/haddock#15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`) - - - - - 7a088dfe by Alec Theriault at 2018-11-26T11:11:28-08:00 More uniform handling of `forall`'s in HTML/LaTeX * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes haskell/haddock#973 - - - - - d735e570 by Alec Theriault at 2018-12-12T08:42:09-08:00 Fix warnings, accept output * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's - - - - - a3852f8a by Zejun Wu at 2018-12-14T09:37:47-05:00 Output better debug infromation on internal error in extractDecl This will make investigation of haskell/haddock#979 easier - - - - - 2eccb5b9 by Alec Theriault at 2018-12-17T09:25:10-05:00 Refactor names + unused functions (#982) This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions - - - - - e82e4df8 by Alec Theriault at 2018-12-20T16:16:30-05:00 Load plugins when compiling each module (#983) * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code - - - - - 96e86f38 by Alec Theriault at 2018-12-23T10:23:20-05:00 Properly synify and render promoted type variables (#985) * Synify and render properly promoted type variables Fixes haskell/haddock#923. * Accept output - - - - - 23343345 by Alec Theriault at 2018-12-27T16:39:38-05:00 Remove `haddock-test`'s dep. on `syb` (#987) The functionality is easily inlined into one short function: `gmapEverywhere`. This doesn't warrant pulling in another package. - - - - - d0734f21 by Alec Theriault at 2018-12-27T16:39:52-05:00 Address deprecation warnings in `haddock-test` (#988) Fixes haskell/haddock#885. - - - - - 4d9f144e by mynguyen at 2018-12-30T23:42:26-05:00 Visible kind application haddock update - - - - - ffe0e9ed by Alec Theriault at 2019-01-07T13:55:22-08:00 Print kinded tyvars in constructors for Hoogle (#993) Fixes haskell/haddock#992 - - - - - 2e18b55d by Alec Theriault at 2019-01-10T16:42:45-08:00 Accept new output `GHC.Maybe` -> `Data.Maybe` (#996) Since 53874834b779ad0dfbcde6650069c37926da1b79 in GHC, "GHC.Maybe" is marked as `not-home`. That changes around some test output. - - - - - 055da666 by Gabor Greif at 2019-01-22T14:41:51+01:00 Lone typofix - - - - - 01bb71c9 by Alec Theriault at 2019-01-23T11:46:46-08:00 Keep forall on H98 existential data constructors (#1003) The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes haskell/haddock#1002. - - - - - f9b9bc0e by Ryan Scott at 2019-01-27T09:28:12-08:00 Fix haskell/haddock#1004 with a pinch of dropForAlls - - - - - 5cfcdd0a by Alec Theriault at 2019-01-28T16:49:57-08:00 Loosen 'QuickCheck' and 'hspec' bounds It looks like the new versions don't cause any breakage and loosening the bounds helps deps fit in one stack resolver. - - - - - 3545d3dd by Alec Theriault at 2019-01-31T01:37:25-08:00 Use `.hie` files for the Hyperlinker backend (#977) # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see haskell/haddock#998) * restructure temporary folder logic for `.hi`/`.hie` model - - - - - 2ded3359 by Herbert Valerio Riedel at 2019-02-02T12:06:12+01:00 Update/modernise haddock-library.cabal file - - - - - 62b93451 by Herbert Valerio Riedel at 2019-02-02T12:19:31+01:00 Tentatively declare support for unreleased base-4.13/ghc-8.8 - - - - - 6041e767 by Herbert Valerio Riedel at 2019-02-02T16:04:32+01:00 Normalise LICENSE text w/ cabal's BSD2 template Also, correct the `.cabal` files to advertise `BSD2` instead of the incorrect `BSD3` license. - - - - - 0b459d7f by Alec Theriault at 2019-02-02T18:06:12-08:00 CI: fetch GHC from validate artifact Should help make CI be less broken - - - - - 6b5c07cf by Alec Theriault at 2019-02-02T18:06:12-08:00 Fix some Hyperlinker test suite fallout * Amend `ParserSpec` to match new Hyperlinker API - pass in compiler info - strip out null tokens * Make `hypsrc-test` pass reliably - strip out `local-*` ids - strip out `line-*` ids from the `ClangCppBug` test - re-accept output - - - - - ded34791 by Nathan Collins at 2019-02-02T18:31:23-08:00 Update README instructions for Stack No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock. - - - - - 723298c9 by Alec Theriault at 2019-02-03T09:11:05-08:00 Remove `Documentation.Haddock.Utf8` The circumstances under which this module appeared are completely gone. The Hyperlinker backend no longer needs this module (it uses the more efficient `Encoding` module from `ghc`). Why no deprecation? Because this module really shouldn't exist! - It isn't used in `haddock-library`/`haddock-api` anymore - It was copy pasted directly from `utf8-string` - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding` - - - - - 51050006 by Alec Theriault at 2019-02-03T22:58:58-08:00 Miscellaneous improvements to `Convert` (#1020) Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms - - - - - 841980c4 by Oleg Grenrus at 2019-02-04T08:44:25-08:00 Make a fixture of weird parsing of lists (#997) The second example is interesting. If there's a list directly after the header, and that list has deeper structure, the parser is confused: It finds two lists: - One with the first nested element, - everything after it I'm not trying to fix this, as I'm not even sure this is a bug, and not a feature. - - - - - 7315c0c8 by Ryan Scott at 2019-02-04T12:17:56-08:00 Fix haskell/haddock#1015 with dataConUserTyVars (#1022) The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes haskell/haddock#1015. - - - - - ee0b49a3 by Ryan Scott at 2019-02-04T15:25:17-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. - - - - - 1c850dc8 by Alan Zimmerman at 2019-02-05T21:54:18+02:00 Matching changes in GHC for haskell/haddock#16236 - - - - - ab03c38e by Simon Marlow at 2019-02-06T08:07:33+00:00 Merge pull request haskell/haddock#1014 from hvr/pr/bsd2-normalise Normalise LICENSE text w/ cabal's BSD2 template - - - - - 5a92ccae by Alec Theriault at 2019-02-10T06:21:55-05:00 Merge remote-tracking branch 'gitlab/wip/T16236-2' into ghc-head - - - - - c0485a1d by Alec Theriault at 2019-02-10T03:32:52-08:00 Removes `haddock-test`s dependency on `xml`/`xhtml` (#1027) This means that `html-test`, `latex-test`, `hoogle-test`, and `hypsrc-test` now only depend on GHC boot libs. So we should now be able to build and run these as part of GHC's testsuite. \o/ The reference output has changed very slightly, in three ways: * we don't convert quotes back into `&quot;` as the `xml` lib did * we don't add extra `&nbsp;` as the `xml` lib did * we now remove the entire footer `div` (instead of just emptying it) - - - - - 65a448e3 by Alec Theriault at 2019-02-11T12:27:41-05:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - 360ca937 by Alec Theriault at 2019-02-13T11:36:11-05:00 Clean up logic for guessing `-B` and `--lib` (#1026) Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works. - - - - - d583e364 by Alec Theriault at 2019-02-16T10:41:22-05:00 Fix tests broken by GHC Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings. - - - - - da0c42cc by Vladislav Zavialov at 2019-02-17T11:39:19+03:00 Parser changes to match !380 - - - - - ab96bed7 by Ryan Scott at 2019-02-18T04:44:08-05:00 Bump ghc version to 8.9 - - - - - 44b7c714 by Alec Theriault at 2019-02-22T05:49:43-08:00 Match GHC changes for T16185 `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock. - - - - - 2ee653b1 by Alec Theriault at 2019-02-24T18:53:33-08:00 Update .travis.yml Points to the new GHC CI artifact. - - - - - 90939d71 by Alec Theriault at 2019-02-25T00:42:41-08:00 Support value/type namespaces on identifier links Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity) - - - - - d6ed496c by Alec Theriault at 2019-02-25T00:42:46-08:00 Better identifier parsing * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental). - - - - - 3c3b404c by Alec Theriault at 2019-02-25T22:12:11-08:00 Fix standalone deriving docs Docs on standalone deriving decls for classes with associated types should be associated with the class instance, not the associated type instance. Fixes haskell/haddock#1033 - - - - - d51ef69e by Alec Theriault at 2019-02-26T19:14:59-08:00 Fix bogus identifier defaulting This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes haskell/haddock#1035. - - - - - 88cbbdc7 by Ryan Scott at 2019-02-27T10:14:03-05:00 Visible dependent quantification (#16326) changes - - - - - 0dcf6cee by Xia Li-yao at 2019-02-27T21:53:27-05:00 Menu item controlling which instances are expanded/collapsed (#1007) Adds a menu item (like "Quick Jump") for options related to displaying instances. This provides functionality for: * expanding/collapsing all instances on the currently opened page * controlling whether instances are expanded/collapsed by default * controlling whether the state of instances should be "remembered" This new functionality is implemented in Typescript in `details-helper`. The built-in-themes style switcher also got a revamp so that all three of QuickJump, the style switcher, and instance preferences now have the same style and implementation structure. See also: https://mail.haskell.org/pipermail/haskell-cafe/2019-January/130495.html Fixes haskell/haddock#698. Co-authored-by: Lysxia <lysxia at gmail.com> Co-authored-by: Nathan Collins <conathan at galois.com> - - - - - 3828c0fb by Alec Theriault at 2019-02-28T12:42:49-05:00 `--show-interface` should output to stdout. (#1040) Fixes haskell/haddock#864. - - - - - a50f4cda by gbaz at 2019-03-01T07:43:16-08:00 Increase contrast of Linuwal theme (#1037) This is to address the concern that, on less nice and older screens, some of the shades of grey blend in too easily with the white background. * darken the font slightly * darken slightly the grey behind type signatures and such * add a border and round the corners on code blocks * knock the font down by one point - - - - - ab4d41de by Alec Theriault at 2019-03-03T09:23:26-08:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 12f509eb by Ben Gamari at 2019-03-04T22:13:20-05:00 Remove reference to Opt_SplitObjs flag Split-objects has been removed. - - - - - 5b3e4c9a by Ryan Scott at 2019-03-06T19:16:24-05:00 Update html-test output to reflect haskell/haddock#16391 changes - - - - - fc228af1 by Alec Theriault at 2019-03-09T08:29:23-08:00 Match changes for "Stop inferring over-polymorphic kinds" The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock. - - - - - 6ac109eb by Alec Theriault at 2019-03-09T11:22:55-08:00 Add .hi, .dyn_hi, etc files to .gitignore Fixes haskell/haddock#1030. - - - - - b55f0c05 by Alec Theriault at 2019-03-09T11:22:55-08:00 Better support for default methods in classes * default methods now get rendered differently * default associated types get rendered * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend * LaTeX backend now renders default method signatures NB: there is still no way to document default class members and the NB: LaTeX backend still crashes on associated types - - - - - 10aea0cf by Alec Theriault at 2019-03-09T11:22:55-08:00 Avoid multi-line `emph` in LaTeX backend `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes haskell/haddock#936. - - - - - d22dc2c9 by Alec Theriault at 2019-03-09T11:22:55-08:00 Many LaTeX backend fixes After this commit, we can run with `--latex` on all boot libraries without crashing (although the generated LaTeX still fails to compile in a handful of larger packages like `ghc` and `base`). * Add newlines after all block elements in LaTeX. This is important to prevent the final output from being more an more indented. See the `latext-test/src/Example` test case for a sample of this. * Support associated types in class declarations (but not yet defaults) * Several small issues for producing compiling LaTeX; - avoid empy `\haddockbeginargs` lists (ex: `type family Any`) - properly escape identifiers depending on context (ex: `Int#`) - add `vbox` around `itemize`/`enumerate` (so they can be in tables) * Several spacing fixes: - limit the width of `Pretty`-arranged monospaced code - cut out extra space characters in export lists - only escape spaces if there are _multiple_ spaces - allow type signatures to be multiline (even without docs) * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files from `latex-test` test reference output. Fixes haskell/haddock#935, haskell/haddock#929 (LaTeX docs for `text` build & compile) Fixes haskell/haddock#727, haskell/haddock#930 (I think both are really about type families...) - - - - - 0e6cee00 by Alec Theriault at 2019-03-29T12:11:56-07:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - ce05434d by Alan Zimmerman at 2019-03-29T12:12:11-07:00 Matching changes in GHC for haskell/haddock#16236 (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576) - - - - - d85766b2 by Ben Gamari at 2019-03-29T12:14:04-07:00 Bump GHC to 8.8 - - - - - 5a82cbaf by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Redo ParseModuleHeader - - - - - b9033348 by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - bb55c8f4 by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove outdated `.ghci` files and `scripts` The `.ghci` files are actively annoying when trying to `cabal v2-repl`. As for the `scripts`, the distribution workflow is completely different. - - - - - 5ee244dc by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove obsolete arcanist files + STYLE Now that GHC is hosted on Gitlab, the arcanist files don't make sense anymore. The STYLE file contains nothing more than a dead link too. - - - - - d07c1928 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Redo ParseModuleHeader - - - - - 492762d2 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - af2ac773 by Ryan Scott at 2019-05-14T17:22:13-04:00 Changes for haskell/haddock#16110/#16356 - - - - - 6820ed0d by Alec Theriault at 2019-05-17T08:51:27-07:00 Unbreak haskell/haddock#1004 test case `fail` is no longer part of `Monad`. - - - - - 6bf7be98 by Alec Theriault at 2019-05-17T08:51:27-07:00 Fix haskell/haddock#1063 with better parenthesization logic for contexts The only other change in html/hoogle/hyperlinker output for the boot libraries that this caused is a fix to some Hoogle output for implicit params. ``` $ diff -r _build/docs/ old_docs diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt 13296c13296 < assertError :: (?callStack :: CallStack) => Bool -> a -> a --- > assertError :: ?callStack :: CallStack => Bool -> a -> a ``` - - - - - b5716b61 by Ryan Scott at 2019-05-22T17:24:32-04:00 Match changes with haskell/haddock#14332 - - - - - c115abf6 by Alec Theriault at 2019-05-26T16:01:58-04:00 Remove Haddock's dependency on `Cabal` At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries). - - - - - e5b2d4a3 by Alec Theriault at 2019-05-26T16:16:25-04:00 Regression test: promoted lists in associated types When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes haskell/haddock#466, - - - - - cc5ad5d3 by Alec Theriault at 2019-05-26T17:55:54-04:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 4b3301a6 by Alec Theriault at 2019-05-26T17:57:52-04:00 Release haddock-2.23, haddock-library-1.8.0 Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1. - - - - - 69c7cfce by Matthew Pickering at 2019-05-30T10:54:27+01:00 Update hyperlinker tests for new types in .hie files - - - - - 29b7e738 by Zubin Duggal at 2019-05-30T10:57:51+01:00 update for new way to store hiefile headers - - - - - aeca5d5f by Zubin Duggal at 2019-06-04T18:57:42-04:00 update for new way to store hiefile headers - - - - - ba2ca518 by Ben Gamari at 2019-06-07T23:11:14+00:00 Update test output for introduction of Safe-Inferred - - - - - 3a975a6c by Ryan Scott at 2019-07-03T12:06:27-04:00 Changes for haskell/haddock#15247 - - - - - 0df46555 by Zubin Duggal at 2019-07-22T10:52:50+01:00 Fix haddockHypsrcTest - - - - - 2688686b by Sylvain Henry at 2019-09-12T23:19:39+02:00 Fix for GHC module renaming - - - - - 9ec0f3fc by Alec Theriault at 2019-09-20T03:21:00-04:00 Fix Travis CI, loosen .cabal bounds (#1089) Tentatively for the 2.23 release: * updated Travis CI to work again * tweaked bounds in the `.cabal` files * adjusted `extra-source-files` to properly identify test files - - - - - ca559beb by Matthías Páll Gissurarson at 2019-09-28T12:14:40-04:00 Small change in to facilitate extended typed-holes (#1090) This change has no functional effect on haddock itself, it just changes one pattern to use `_ (` rather than `_(`, so that we may use `_(` as a token for extended typed-holes later. - - - - - 02e28976 by Vladislav Zavialov at 2019-09-28T12:17:45-04:00 Remove spaces around @-patterns (#1093) This is needed to compile `haddock` when [GHC Proposal haskell/haddock#229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented. - - - - - 83cbbf55 by Alexis King at 2019-09-30T21:12:42-04:00 Fix the ignore-exports option (#1082) The `ignore-exports` option has been broken since haskell/haddock#688, as mentioned in https://github.com/haskell/haddock/pull/766#issue-172505043. This PR fixes it. - - - - - e127e0ab by Ben Gamari at 2019-10-06T15:12:06-04:00 Fix a few haddock issues - - - - - 3a0f5c89 by Zubin Duggal at 2019-10-07T17:56:13-04:00 Fix crash when there are no srcspans in the file due to CPP - - - - - 339c5ff8 by Alec Theriault at 2019-10-07T17:56:13-04:00 Prefer un-hyperlinked sources to no sources It is possible to fail to extract an HIE ast. This is however not a reason to produce _no_ output - we should still make a colorized HTML page. - - - - - d47ef478 by Alec Theriault at 2019-10-07T17:56:13-04:00 Add a regression test for haskell/haddock#1091 Previously, this input would crash Haddock. - - - - - ed7c8b0f by Alec Theriault at 2019-10-07T20:56:48-04:00 Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. - - - - - d00436ab by Andreas Klebinger at 2019-10-21T15:53:03+02:00 Refactor for withTiming changes. - - - - - 4230e712 by Ben Gamari at 2019-10-22T09:36:37-04:00 Merge pull request haskell/haddock#1101 from AndreasPK/withTimingRefactor Refactor for withTiming changes. - - - - - d155c5f4 by Ryan Scott at 2019-10-23T10:37:17-04:00 Reify oversaturated data family instances correctly (#1103) This fixes haskell/haddock#1103 by adapting the corresponding patch for GHC (see https://gitlab.haskell.org/ghc/ghc/issues/17296 and https://gitlab.haskell.org/ghc/ghc/merge_requests/1877). - - - - - 331a5adf by Sebastian Graf at 2019-10-25T17:14:40+02:00 Refactor for OutputableBndrId changes - - - - - 48a490e0 by Ben Gamari at 2019-10-27T10:16:16-04:00 Merge pull request haskell/haddock#1105 from sgraf812/wip/flexible-outputable Refactor for OutputableBndrId changes - - - - - f62a7dfc by Sebastian Graf at 2019-11-01T11:54:16+00:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - d9b242ed by Ryan Scott at 2019-11-03T13:20:03-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. (cherry picked from commit cfd682c5fd03b099a3d78c44f9279faf56a0ac70) - - - - - dfd42406 by Sebastian Graf at 2019-11-04T07:02:14-05:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - 0b15be7c by Ben Gamari at 2019-11-09T13:21:33-05:00 Import isRuntimeRepVar from Type rather than TyCoRep isRuntimeRepVar is not longer exported from TyCoRep due to ghc#17441. - - - - - 091f7283 by Ben Gamari at 2019-11-10T12:47:06-05:00 Bump to GHC 8.10 - - - - - e88c71f2 by Ben Gamari at 2019-11-14T00:22:24-05:00 Merge pull request haskell/haddock#1110 from haskell/wip/T17441 Import isRuntimeRepVar from Type rather than TyCoRep - - - - - 4e0bbc17 by Ben Gamari at 2019-11-14T00:22:45-05:00 Version bumps for GHC 8.11 - - - - - 0e85ceb4 by Ben Gamari at 2019-11-15T11:59:45-05:00 Bump to GHC 8.10 - - - - - 00d6d68b by Ben Gamari at 2019-11-16T18:35:58-05:00 Bump ghc version to 8.11 - - - - - dde1fc3f by Ben Gamari at 2019-11-16T20:40:37-05:00 Drop support for base 4.13 - - - - - f52e331d by Vladislav Zavialov at 2019-11-24T13:02:28+03:00 Update Hyperlinker.Parser.classify to use ITdollar - - - - - 1ad96198 by Vladislav Zavialov at 2019-11-28T16:12:33+03:00 Remove HasSrcSpan (#17494) - - - - - 651afd70 by Herbert Valerio Riedel at 2019-12-08T12:08:16+01:00 Document error-prone conditional definition of instances This can easily trip up people if one isn't aware of it. Usually it's better to avoid this kind of conditionality especially for typeclasses for which there's an compat-package as conditional instances like these tend to fragment the ecosystem into those packages that go the extra mile to provide backward compat via those compat-packages and those that fail to do so. - - - - - b521af56 by Herbert Valerio Riedel at 2019-12-08T12:09:54+01:00 Fix build-failure regression for base < 4.7 The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses haskell/haddock#1119 - - - - - 556c375d by Sylvain Henry at 2020-01-02T19:01:55+01:00 Fix after Iface modules renaming - - - - - bd6c53e5 by Sylvain Henry at 2020-01-07T00:48:48+01:00 hsyl20-modules-renamer - - - - - fb23713b by Ryan Scott at 2020-01-08T07:41:13-05:00 Changes for GHC#17608 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2372 - - - - - 4a4dd382 by Ryan Scott at 2020-01-25T08:08:26-05:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - e782a44d by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename PackageConfig into UnitInfo - - - - - ba3c9f05 by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename lookupPackage - - - - - ab37f9b3 by Ben Gamari at 2020-01-29T13:00:44-05:00 Merge pull request haskell/haddock#1125 from haskell/wip/T17566-take-two Changes for GHC#17566 - - - - - 3ebd5ae0 by Ryan Scott at 2020-01-31T05:56:50-05:00 Merge branch 'wip-hsyl20-package-refactor' into ghc-head - - - - - 602a747e by Richard Eisenberg at 2020-02-04T09:05:43+00:00 Echo GHC's removal of PlaceHolder module This goes with GHC's !2083. - - - - - ccfe5679 by Sylvain Henry at 2020-02-10T10:13:56+01:00 Module hierarchy: runtime (cf haskell/haddock#13009) - - - - - 554914ce by Cale Gibbard at 2020-02-10T16:10:39-05:00 Fix build of haddock in stage1 We have to use the correct version of the GHC API, but the version of the compiler itself doesn't matter. - - - - - 5b6fa2a7 by John Ericson at 2020-02-10T16:18:07-05:00 Noramlize `tested-with` fields in cabal files - - - - - e6eb3ebe by Vladislav Zavialov at 2020-02-16T13:25:26+03:00 No MonadFail/Alternative for P - - - - - 90e181f7 by Ben Gamari at 2020-02-18T14:13:47-05:00 Merge pull request haskell/haddock#1129 from obsidiansystems/wip/fix-stage1-build Fix build of haddock in stage1 - - - - - 93b64636 by Sylvain Henry at 2020-02-19T11:20:27+01:00 Modules: Driver (#13009) - - - - - da4f6c7b by Vladislav Zavialov at 2020-02-22T15:33:02+03:00 Use RealSrcSpan in InstMap - - - - - 479b1b50 by Ben Gamari at 2020-02-23T10:28:13-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 55ecacf0 by Sylvain Henry at 2020-02-25T15:18:27+01:00 Modules: Core (#13009) - - - - - 60867b3b by Vladislav Zavialov at 2020-02-28T15:53:52+03:00 Ignore the BufLoc/BufSpan added in GHC's !2516 - - - - - 1e5506d3 by Sylvain Henry at 2020-03-02T12:32:43+01:00 Modules: Core (#13009) - - - - - 6fb53177 by Richard Eisenberg at 2020-03-09T14:49:40+00:00 Changes in GHC's !1913. - - - - - 30b792ea by Ben Gamari at 2020-03-16T12:45:02-04:00 Merge pull request haskell/haddock#1130 from hsyl20/wip/hsyl20-modules-core2 Modules: Core (#13009) - - - - - cd761ffa by Sylvain Henry at 2020-03-18T15:24:00+01:00 Modules: Types - - - - - b6646486 by Ben Gamari at 2020-03-18T14:42:43-04:00 Merge pull request haskell/haddock#1133 from hsyl20/wip/hsyl20/modules/types Modules: Types - - - - - 9325d734 by Kleidukos at 2020-03-19T12:38:31-04:00 Replace the 'caption' class so that the collapsible sections are shown - - - - - 5e2bb555 by Kleidukos at 2020-03-19T12:38:31-04:00 Force ghc-8.8.3 - - - - - c6fcd0aa by Kleidukos at 2020-03-19T12:38:31-04:00 Update test fixtures - - - - - 5c849cb1 by Sylvain Henry at 2020-03-20T09:34:39+01:00 Modules: Types - - - - - 7f439155 by Alec Theriault at 2020-03-20T20:17:01-04:00 Merge branch 'ghc-8.8' into ghc-8.10 - - - - - b7904e5c by Alina Banerjee at 2020-03-20T20:24:17-04:00 Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests - - - - - b9d60a59 by Alec Theriault at 2020-03-22T11:46:42-04:00 Clean up warnings * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal` - - - - - 0c317dbe by Alec Theriault at 2020-03-22T18:46:54-04:00 Fix NPM security warnings This was done by calling `npm audit fix`. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. - - - - - 6e306242 by Alec Theriault at 2020-03-22T20:10:52-04:00 Tentative 2.24 release Adjusted changelogs and versions in `.cabal` files in preparation for the upcoming release bundled with GHC 8.10. - - - - - 1bfb4645 by Ben Gamari at 2020-03-23T16:40:54-04:00 Merge commit '3c2944c037263b426c4fe60a3424c27b852ea71c' into HEAD More changes from the GHC types module refactoring. - - - - - be8c6f3d by Alec Theriault at 2020-03-26T20:10:53-04:00 Update `.travis.yml` to work with GHC 8.10.1 * Regenerated the Travis file with `haskell-ci` * Beef up `.cabal` files with more `tested-with` information - - - - - b025a9c6 by Alec Theriault at 2020-03-26T20:10:53-04:00 Update README Removed some out of date links/info, added some more useful links. * badge to Hackage * update old trac link * `ghc-head` => `ghc-8.10` * `cabal new-*` is now `cabal v2-*` and it should Just Work * `--test-option='--accept'` is the way to accept testsuite output - - - - - 564d889a by Alec Theriault at 2020-03-27T20:34:33-04:00 Fix crash in `haddock-library` on unicode space Our quickcheck tests for `haddock-library` stumbled across an edge case input that was causing Haddock to crash: it was a unicode space character. The root cause of the crash is that we were implicitly assuming that if a space character was not " \t\f\v\r", it would have to be "\n". We fix this by instead defining horizontal space as: any space character that is not '\n'. Fixes haskell/haddock#1142 - - - - - 2d360ba1 by Alec Theriault at 2020-03-27T21:57:32-04:00 Disallow qualified uses of reserved identifiers This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes haskell/haddock#952 - - - - - 47ae22ed by Alec Theriault at 2020-03-28T13:36:25-04:00 Remove unused `Haddock.Utils` functions * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils` - - - - - c0291245 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use TTG empty extensions to remove some `error`'s None of these error cases should ever have been reachable, so this is just a matter of leveraging the type system to assert this. * Use the `NoExtCon` and `noExtCon` to handle case matches for no extension constructors, instead of throwing an `error`. * Use the extension field of `HsSpliceTy` to ensure that this variant of `HsType` cannot exist in an `HsType DocNameI`. - - - - - 0aff8dc4 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` * `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes haskell/haddock#978 - - - - - bf6f2fb7 by Alec Theriault at 2020-03-28T13:36:25-04:00 Cleanup up GHC flags in `.cabal` files * enable more useful warning flags in `haddock-api`, handle the new warnings generated * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in `-Wall` for a while now) - - - - - c576fbf1 by Alec Theriault at 2020-03-28T13:36:25-04:00 `haddock-library` document header level Document the fact the header level is going to always be between 1 and 6 inclusive. Along the way, I also optimized the parsing code a bit. - - - - - 71bce0ee by Alec Theriault at 2020-03-28T14:26:27-04:00 Disallow links in section headers This is quite straightforward to implement, since we already had a function `docToHtmlNoAnchors` (which we used to generate the link in the sidebar "Contents"). This breaks test `Bug387`, but that test case has aged badly: we now automatically generate anchors for all headings, so manually adding an anchor in a section makes no sense. Nested anchors are, as pointed out in haskell/haddock#1054, disallowed by the HTML standard. Fixes haskell/haddock#1054 - - - - - b461b0ed by Sylvain Henry at 2020-03-30T10:34:23+02:00 Modules: type checker - - - - - cd8cd1ee by Ben Gamari at 2020-03-31T12:45:02-04:00 Merge pull request haskell/haddock#1152 from hsyl20/wip/hsyl20/modules/tc Module renaming - - - - - 5e8f8ea7 by Felix Yan at 2020-04-01T17:58:06-07:00 Allow QuickCheck 2.14 Builds fine and all tests pass. - - - - - dc6b1633 by Sylvain Henry at 2020-04-05T16:43:44+02:00 Module renaming: amend previous patch - - - - - eee2f4ae by Ryan Scott at 2020-04-05T09:04:43-07:00 Fix haskell/haddock#1050 by filtering out invisible AppTy arguments This makes the `synifyType` case for `AppTy` more intelligent by taking into consideration the visibilities of each `AppTy` argument and filtering out any invisible arguments, as they aren't intended to be displayed in the source code. (See haskell/haddock#1050 for an example of what can happen if you fail to filter these out.) Along the way, I noticed that a special `synifyType` case for `AppTy t1 (CoercionTy {})` could be consolidated with the case below it, so I took the opportunity to tidy this up. - - - - - 23eb99e8 by Ben Gamari at 2020-04-07T11:19:58-04:00 Merge pull request haskell/haddock#1154 from hsyl20/wip/hsyl20/modules/tc Module renaming: amend previous patch - - - - - 072d994d by Ryan Scott at 2020-04-07T19:32:47-04:00 Make NoExtCon fields strict These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992). - - - - - d8ebf6c8 by Ignat Insarov at 2020-04-09T21:15:01-04:00 Recode Doc to Json. (#1159) * Recode Doc to Json. * More descriptive field labels. - - - - - 52df4b4e by Sylvain Henry at 2020-04-10T12:39:18+02:00 Module renaming - - - - - d9ab8ec8 by Cale Gibbard at 2020-04-14T11:43:34-04:00 Add instance of XCollectPat for DocNameI - - - - - 323d221d by Cale Gibbard at 2020-04-14T11:43:34-04:00 Rename XCollectPat -> CollectPass - - - - - 2df80867 by Alec Theriault at 2020-04-15T07:30:51-07:00 Prune docstrings that are never rendered When first creating a Haddock interface, trim `ifaceDocMap` and `ifaceArgMap` to not include docstrings that can never appear in the final output. Besides checking with GHC which names are exported, we also need to keep all the docs attached to instance declarations (it is much tougher to detect when an instance is fully private). This change means: * slightly smaller interface files (7% reduction on boot libs) * slightly less work to do processing docstrings that aren't used * no warnings in Haddock's output about private docstrings (see haskell/haddock#1070) I've tested manually that this does not affect any of the boot library generated docs (the only change in output was some small re-ordering in a handful of instance lists). This should mean no docstrings have been incorrectly dropped. - - - - - f49c90cc by Alec Theriault at 2020-04-15T07:30:51-07:00 Don't warn about missing links in miminal sigs When renaming the Haddock interface, never emit warnings when renaming a minimal signature. Also added some documention around `renameInterface`. Minimal signatures intentionally include references to potentially un-exported methods (see the discussion in haskell/haddock#330), so it is expected that they will not always have a link destination. On the principle that warnings should always be resolvable, this shouldn't produce a warning. See haskell/haddock#1070. - - - - - a9eda64d by Ben Gamari at 2020-04-17T09:27:35-04:00 Merge pull request haskell/haddock#1160 from hsyl20/wip/hsyl20/modules/systools Module renaming - - - - - f40d7879 by Cale Gibbard at 2020-04-20T11:30:38-04:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ttg-con-pat - - - - - a50e7753 by Ben Gamari at 2020-04-20T11:36:10-04:00 Merge pull request haskell/haddock#1165 from obsidiansystems/wip/ttg-con-pat Trees that Grow refactor (GHC !2553) - - - - - 6a24795c by Alec Theriault at 2020-04-21T08:06:45-07:00 Fallback to `hiDecl` when `extractDecl` fails Sometimes, the declaration being exported is a subdecl (for instance, a record accessor getting exported at the top-level). For these cases, Haddock has to find a way to produce some synthetic sensible top-level declaration. This is done with `extractDecl`. As is shown by haskell/haddock#1067, this is sometimes impossible to do just at a syntactic level (for instance when the subdecl is re-exported). In these cases, the only sensible thing to do is to try to reify a declaration based on a GHC `TyThing` via `hiDecl`. - - - - - eee1a8b7 by Sylvain Henry at 2020-04-24T15:46:05+02:00 Module structure - - - - - 50b9259c by Iñaki at 2020-04-25T18:38:11-04:00 Add support for custom section anchors (#1179) This allows to have stable anchors for groups, even if the set of groups in the documentation is altered. The syntax for setting the anchor of a group is -- * Group name #desiredAnchor# Which will produce an html anchor of the form '#g:desiredAnchor' Co-authored-by: Iñaki García Etxebarria <git at inaki.blueleaf.cc> - - - - - 4003c97a by Ben Gamari at 2020-04-26T09:35:15-04:00 Merge pull request haskell/haddock#1166 from hsyl20/wip/hsyl20/modules/utils Module structure - - - - - 5206ab60 by Sylvain Henry at 2020-04-27T16:47:39+02:00 Renamed UnitInfo fields - - - - - c32c333b by Sylvain Henry at 2020-04-27T17:32:58+02:00 UnitId has been renamed into Unit - - - - - 3e87db64 by Sylvain Henry at 2020-04-27T17:36:00+02:00 Fix for GHC.Unit.* modules - - - - - ae3323a7 by Ben Gamari at 2020-04-29T12:36:37-04:00 Merge pull request haskell/haddock#1183 from hsyl20/wip/hsyl20/unitid Refactoring of Unit code - - - - - b105564a by Artem Pelenitsyn at 2020-05-03T08:14:10+01:00 add dependency on exceptions because GHC.Exception was boiled down (ghc haskell/haddock#18075) - - - - - 9857eff3 by Zubin Duggal at 2020-05-04T18:48:25+01:00 Atomic update of NameCache in readHieFile - - - - - 86bbb226 by Sylvain Henry at 2020-05-14T16:36:27+02:00 Fix after Config module renaming - - - - - a4bbdbc2 by Gert-Jan Bottu at 2020-05-15T22:09:44+02:00 Explicit Specificity Support for Haddock - - - - - 46199daf by Ben Gamari at 2020-05-19T09:59:56-04:00 Merge pull request haskell/haddock#1192 from hsyl20/hsyl20/modules-config Fix after Config module renaming - - - - - f9a9d2ba by Gert-Jan Bottu at 2020-05-20T16:48:38-04:00 Explicit Specificity Support for Haddock - - - - - 55c5b7ea by Ben Gamari at 2020-05-21T00:32:02-04:00 Merge commit 'a8d7e66da4dcc3b242103271875261604be42d6e' into ghc-head - - - - - a566557f by Cale Gibbard at 2020-05-21T16:02:06-04:00 isBootSummary now produces a result of type IsBootInterface - - - - - ea52f905 by Zubin Duggal at 2020-05-24T17:55:48+01:00 update for hiefile-typeclass-info - - - - - 49ba7a67 by Willem Van Onsem at 2020-05-25T12:23:01-04:00 Use floor over round to calculate the percentage (#1195) If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes haskell/haddock#1194 - - - - - c025ebf1 by Ben Gamari at 2020-05-29T14:32:42-04:00 Merge pull request haskell/haddock#1185 from obsidiansystems/boot-disambig isBootSummary now produces a result of type IsBootInterface - - - - - 74ab9415 by Ben Gamari at 2020-05-29T20:23:39-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - b40be944 by Ben Gamari at 2020-06-03T17:02:31-04:00 testsuite: Update expected output for simplified subsumption - - - - - 624be71c by Ryan Scott at 2020-06-05T12:43:23-04:00 Changes for GHC#18191 See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337. - - - - - fbd8f7ce by Sylvain Henry at 2020-06-08T15:31:47+02:00 Fix after unit refactoring - - - - - 743fda4d by Ben Gamari at 2020-06-09T12:09:58-04:00 Merge pull request haskell/haddock#1202 from hsyl20/wip/hsyl20/unitid-ii Fix after unit refactoring - - - - - d07a06a9 by Ryan Scott at 2020-06-13T07:16:55-04:00 Use HsForAllTelescope (GHC#18235) - - - - - 389bb60d by Ben Gamari at 2020-06-13T15:30:52-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - 7a377f5f by Ben Gamari at 2020-06-17T14:53:16-04:00 Merge pull request haskell/haddock#1199 from bgamari/wip/ghc-8.12 haddock: Bounds bumps for GHC 8.12 - - - - - 9fd9e586 by Krzysztof Gogolewski at 2020-06-17T16:09:07-04:00 Adapt Haddock to LinearTypes See ghc/ghc!852. - - - - - 46fe7636 by Ben Gamari at 2020-06-18T14:20:02-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 35a3c9e2 by Zubin Duggal at 2020-06-21T21:19:18+05:30 Use functions exported from HsToCore - - - - - 8abe3928 by Ben Gamari at 2020-06-24T13:53:39-04:00 Merge pull request haskell/haddock#1204 from wz1000/wip/haddock-hstocore Use functions exported from GHC.HsToCore.Docs - - - - - 22f2c937 by Matthías Páll Gissurarson at 2020-06-26T19:07:03+02:00 Adapt Haddock for QualifiedDo - - - - - 3f6208d7 by Vladislav Zavialov at 2020-06-28T14:28:16+03:00 Handle LexicalNegation's ITprefixminus - - - - - 03a19f41 by Sylvain Henry at 2020-07-02T09:37:38+02:00 Rename hsctarget into backend - - - - - ea17ff23 by Andreas Klebinger at 2020-07-02T17:44:18+02:00 Update for UniqFM changes. - - - - - 9872f2f3 by Ben Gamari at 2020-07-09T10:39:19-04:00 Merge pull request haskell/haddock#1209 from AndreasPK/wip/typed_uniqfm Update for UniqFM changes. - - - - - 68f7b668 by Krzysztof Gogolewski at 2020-07-12T18:16:57+02:00 Sync with GHC removing {-# CORE #-} pragma See ghc ticket haskell/haddock#18048 - - - - - eb372681 by Sylvain Henry at 2020-07-20T11:41:30+02:00 Rename hscTarget into backend - - - - - fb7f78bf by Ben Gamari at 2020-07-21T12:15:25-04:00 Merge pull request haskell/haddock#1214 from hsyl20/wip/hsyl20/hadrian/ncg Rename hscTarget into backend - - - - - 1e8f5b56 by Ben Gamari at 2020-07-23T09:11:50-04:00 Merge commit '904dce0cafe0a241dd3ef355775db47fc12f434d' into ghc-head - - - - - d8fd1775 by Zubin Duggal at 2020-07-23T18:46:40+05:30 Update for modular ping pong - - - - - 8416f872 by Ben Gamari at 2020-07-23T09:35:03-04:00 Merge pull request haskell/haddock#1200 from wz1000/wip/wz1000-modular-ping-pong Modular ping pong - - - - - a24a8577 by Ben Gamari at 2020-07-28T15:23:36-04:00 Bump GHC version to 9.0 - - - - - 6a51c9dd by Sylvain Henry at 2020-08-05T18:47:05+02:00 Fix after Outputable refactoring - - - - - c05e1c99 by Ben Gamari at 2020-08-10T14:41:41-04:00 Merge pull request haskell/haddock#1223 from hsyl20/wip/hsyl20/dynflags/exception Fix after Outputable refactoring - - - - - d964f15b by Sylvain Henry at 2020-08-12T11:58:49+02:00 Fix after HomeUnit - - - - - 8e6d5b23 by Ben Gamari at 2020-08-12T14:25:30-04:00 Merge pull request haskell/haddock#1225 from hsyl20/wip/hsyl20/plugins/homeunit Fix after HomeUnit - - - - - 8c7880fe by Sylvain Henry at 2020-08-17T14:13:29+02:00 Remove Ord FastString instance - - - - - 8ea410db by Alex Biehl at 2020-08-19T10:56:32+02:00 Another round of `npm audit fix` (#1228) This should shut down the warnings on Github. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. Last NPM dependency audit happend in d576b2327e2bc117f912fe0a9d595e9ae62614e0 Co-authored-by: Alex Biehl <alex.biehl at target.com> - - - - - 7af6e2a8 by Ben Gamari at 2020-08-31T13:59:34-04:00 Merge pull request haskell/haddock#1226 from hsyl20/wip/hsyl20/fs_ord Remove Ord FastString instance - - - - - ffbc8702 by Alan Zimmerman at 2020-09-07T21:47:41+01:00 Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - a93f1268 by Alan Zimmerman at 2020-09-07T23:11:38+01:00 Merge pull request haskell/haddock#1232 from haskell/wip/T18639-remove-generated-pragma, Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - 1f605d50 by Ben Gamari at 2020-09-14T18:30:01-04:00 Bump GHC version to 9.1 - - - - - 6599df62 by Vladislav Zavialov at 2020-09-18T14:05:15+03:00 Bump base upper bound to 4.16 - - - - - a01b3c43 by Ben Gamari at 2020-09-22T15:41:48-04:00 Update hypsrc-test for QuickLook This appears to be a spurious change. - - - - - e9cc6cac by Vladislav Zavialov at 2020-09-26T21:00:12+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 30e3ca7c by Sylvain Henry at 2020-09-29T11:18:32-04:00 Update for parser (#1234) - - - - - b172f3e3 by Vladislav Zavialov at 2020-09-30T01:01:30+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 0b9c08d3 by Sylvain Henry at 2020-09-30T11:02:33+02:00 Adapt to GHC parser changes - - - - - b9540b7a by Sylvain Henry at 2020-10-12T09:13:38-04:00 Don't pass the HomeUnitId (#1239) - - - - - 34762e80 by HaskellMouse at 2020-10-13T12:58:04+03:00 Changed tests due to unification of `Nat` and `Natural` in the follwing merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583 - - - - - 256f86b6 by Vladislav Zavialov at 2020-10-15T10:48:03+03:00 Add whitespace in: map ($ v) - - - - - 4a3f711b by Alan Zimmerman at 2020-10-19T08:57:27+01:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled - - - - - 072cdd21 by Alan Zimmerman at 2020-10-21T14:48:28-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 9e09a445 by Alan Zimmerman at 2020-10-21T23:53:34-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 636d7de3 by Sylvain Henry at 2020-10-26T14:31:54-04:00 GHC.Driver.Types refactoring (#1242) - - - - - a597f000 by Ryan Scott at 2020-10-29T04:18:05-04:00 Adapt to the removal of Hs{Boxed,Constraint}Tuple See ghc/ghc!4097 and GHC#18723. - - - - - b96660fb by Ryan Scott at 2020-10-30T04:53:05-04:00 Adapt to HsConDecl{H98,GADT}Details split Needed for GHC#18844. - - - - - c287d82c by Ryan Scott at 2020-10-30T19:35:59-04:00 Adapt to HsOuterTyVarBndrs These changes accompany ghc/ghc!4107, which aims to be a fix for haskell/haddock#16762. - - - - - a34c31a1 by Ryan Scott at 2020-11-13T13:38:34-05:00 Adapt to splitPiTysInvisible being renamed to splitInvisPiTys This is a part of !4434, a fix for GHC#18939. - - - - - 66ea459d by Sylvain Henry at 2020-11-16T10:59:30+01:00 Fix after Plugins moved into HscEnv - - - - - 508556d8 by Ben Gamari at 2020-11-18T15:47:40-05:00 Merge pull request haskell/haddock#1253 from hsyl20/wip/hsyl20/plugins/hscenv Fix after Plugins moved into HscEnv - - - - - 620fec1a by Andreas Klebinger at 2020-11-24T20:51:59+01:00 Update for changes in GHC's Pretty - - - - - 01cc13ab by Richard Eisenberg at 2020-11-25T23:18:35-05:00 Avoid GHC#18932. - - - - - 8d29ba21 by Cale Gibbard at 2020-11-25T23:18:35-05:00 Add type arguments to PrefixCon - - - - - 414d5f87 by Sylvain Henry at 2020-11-30T17:06:04+01:00 DynFlags's unit fields moved to HscEnv - - - - - e356668c by Ben Gamari at 2020-11-30T11:11:37-05:00 Merge pull request haskell/haddock#1258 from hsyl20/wip/hsyl20/hscenv/unitstate Unit fields moved from DynFlags to HscEnv - - - - - 7cf552f1 by Ben Gamari at 2020-12-03T10:31:27-05:00 Merge pull request haskell/haddock#1257 from AndreasPK/wip/andreask/opt_dumps Update for changes in GHC's Pretty - - - - - fc0871c3 by Veronika Romashkina at 2020-12-08T16:35:33+01:00 Fix docs links from Darcs to GitHub in intro (#1262) - - - - - 7059e808 by Veronika Romashkina at 2020-12-08T16:36:16+01:00 Use gender neutral word in docs (#1260) - - - - - 1b16e5ee by Maximilian Tagher at 2020-12-08T16:40:03+01:00 Allow scrolling search results (#1235) Closes https://github.com/haskell/haddock/issues/1231 - - - - - 8a118c01 by dependabot[bot] at 2020-12-08T16:40:25+01:00 Bump bl from 1.2.2 to 1.2.3 in /haddock-api/resources/html (#1255) Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - c89ff587 by Xia Li-yao at 2020-12-08T16:42:17+01:00 Allow more characters in anchor following module reference (#1220) - - - - - 14af7d64 by Xia Li-yao at 2020-12-08T16:43:05+01:00 Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243) * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt at mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem at users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard at tweag.io> Co-authored-by: Pepe Iborra <pepeiborra at gmail.com> - - - - - 89e3af13 by tomjaguarpaw at 2020-12-08T18:00:04+01:00 Enable two warnings (#1245) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - c3320f8d by Willem Van Onsem at 2020-12-08T18:26:55+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 685df308 by Alex Biehl at 2020-12-08T20:06:26+01:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - be3ec3c0 by Alex Biehl at 2020-12-08T20:06:26+01:00 Import intercalate - - - - - 32c33912 by Matthías Páll Gissurarson at 2020-12-08T21:15:30+01:00 Adapt Haddock for QualifiedDo - - - - - 31696088 by Alex Biehl at 2020-12-08T22:06:02+01:00 Fix haddock-library tests - - - - - fbc0998a by Alex Biehl at 2020-12-08T23:08:23+01:00 Move to GitHub CI (#1266) * Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell at v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up - - - - - 5b946b9a by tomjaguarpaw at 2020-12-10T19:01:41+01:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - bc5a408f by dependabot[bot] at 2020-12-10T19:02:16+01:00 Bump ini from 1.3.5 to 1.3.7 in /haddock-api/resources/html (#1269) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - d02995f1 by Andrew Martin at 2020-12-14T16:48:40-05:00 Update for boxed rep - - - - - a381aeff by Ben Gamari at 2020-12-15T15:13:30-05:00 Revert "Enable two warnings (#1245) (#1268)" As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce. - - - - - a63c0a9e by Ben Gamari at 2020-12-15T15:17:59-05:00 Revert "Update for boxed rep" This reverts commit 4ffb30d8b637ccebecc81ce610f0af451ac8088d. - - - - - 53bfbb29 by Ben Gamari at 2020-12-15T15:37:24-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - bae76a30 by Ben Gamari at 2020-12-16T02:44:42+00:00 Update output for nullary TyConApp optimisation (ghc/ghc!2952) - - - - - 4b733b57 by Krzysztof Gogolewski at 2020-12-16T20:03:14+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. - - - - - ee463bd3 by Ryan Scott at 2020-12-16T16:55:23-05:00 Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonym Needed for !4417, the fix for GHC#15706 and GHC#18914. - - - - - ed0b02f8 by tomjaguarpaw at 2020-12-19T10:17:19+00:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - d80bf8f5 by Sylvain Henry at 2020-12-21T10:09:25+01:00 Fix after binder collect changes - - - - - bf4c9d32 by Adam Gundry at 2020-12-23T21:35:01+00:00 Adapt to changes to GlobalRdrElt and AvailInfo Needed for ghc/ghc!4467 - - - - - 37736c4c by John Ericson at 2020-12-28T12:27:02-05:00 Support a new ghc --make node type for parallel backpack upsweep - - - - - 717bdeac by Vladislav Zavialov at 2020-12-29T10:50:02+03:00 Inline and fix getGADTConTypeG The getGADTConTypeG used HsRecTy, which is at odds with GHC issue haskell/haddock#18782. I noticed that getGADTConTypeG was only used in the Hoogle backend. Interestingly, when handling H98 constructors, Hoogle converts RecCon to PrefixCon (see Haddock.Backends.Hoogle.ppCtor). So I changed getGADTConTypeG to handle RecConGADT in the same manner as PrefixConGADT, and after this simplification moved it into the 'where' clause of ppCtor, to the only place where it is used. The practical effect of this change is as follows. Consider this example: data TestH98 = T98 { bar::Int } data TestGADT where TG :: { foo :: Int } -> TestGADT Before this patch, haddock --hoogle used to produce: T98 :: Int -> TestH98 [TG] :: {foo :: Int} -> TestGADT Notice how the record syntax was discarded in T98 but not TG. With this patch, we always produce signatures without record syntax: T98 :: Int -> TestH98 [TG] :: Int -> TestGADT I suspect this might also be a bugfix, as currently Hoogle doesn't seem to render GADT record constructors properly. - - - - - cb1b8c56 by Andreas Abel at 2020-12-30T21:12:37+01:00 Build instructions: haddock-library and -api first! - - - - - b947f6ad by Ben Gamari at 2020-12-31T13:04:19-05:00 Merge pull request haskell/haddock#1281 from obsidiansystems/wip/backpack-j Changes to support -j with backpack - - - - - 120e1cfd by Hécate Moonlight at 2021-01-04T19:54:58+01:00 Merge pull request haskell/haddock#1282 from andreasabel/master Build instructions: haddock-library and -api first! - - - - - fd45e41a by Ben Gamari at 2021-01-05T16:14:31-05:00 Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0 - - - - - b471bdec by Ben Gamari at 2021-01-05T16:23:02-05:00 Merge commit '1e56f63c3197e7ca1c1e506e083c2bad25d08793' into ghc-9.0 - - - - - 81cdbc41 by Alex Biehl at 2021-01-09T12:14:41+01:00 Prepare Haddock for being a GHC Plugin - - - - - b646d952 by Alex Biehl at 2021-01-09T12:14:41+01:00 Make Haddock a GHC Plugin - - - - - cc044674 by Alex Biehl at 2021-01-09T12:14:41+01:00 Add -j[n] CLI param to Haddock executable It translates to `--ghcopt=-j[n]` - - - - - 84a04073 by Alex Biehl at 2021-01-09T12:14:41+01:00 Abstract Monad for interface creation I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName. - - - - - 5be2c4f7 by Alex Biehl at 2021-01-09T12:14:41+01:00 Accept tests - - - - - 8cefee9d by Alex Biehl at 2021-01-09T16:10:47+01:00 Add missing dependency for mtl - - - - - 3681f919 by Ben Gamari at 2021-01-13T18:39:25-05:00 Merge remote-tracking branch 'origin/ghc-9.0' into ghc-head - - - - - 33c6b152 by Hécate Moonlight at 2021-01-14T16:04:20+01:00 Merge pull request haskell/haddock#1273 from hsyl20/wip/hsyl20/arrows Fix after binder collect changes - - - - - 70d13e8e by Joachim Breitner at 2021-01-22T19:03:45+01:00 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) - - - - - 7d6dd57a by John Ericson at 2021-01-22T22:02:02+00:00 Add `NoGhcTc` instance now that it's not closed - - - - - e5fdaf0a by Alan Zimmerman at 2021-01-23T22:57:44+00:00 Merge pull request haskell/haddock#1293 from obsidiansystems/wip/fix-18936 Add `NoGhcTc` instance now that it's not closed - - - - - 989a1e05 by Oleg Grenrus at 2021-01-24T16:11:46+03:00 Add import list to Data.List - - - - - 368e144a by Ben Gamari at 2021-01-28T22:15:48+01:00 Adapt to "Make PatSyn immutable" - - - - - abe66c21 by Alfredo Di Napoli at 2021-02-01T08:05:35+01:00 Rename pprLogErrMsg to new name - - - - - e600e75c by Hécate Moonlight at 2021-02-05T14:53:00+01:00 Move CI to ghc-9.0 - - - - - dd492961 by Vladislav Zavialov at 2021-02-05T14:53:00+01:00 Update cabal.project and README build instructions - - - - - 31bd292a by Hécate Moonlight at 2021-02-05T15:03:56+01:00 Merge pull request haskell/haddock#1296 from Kleidukos/ghc-9.0 Merge the late additions to ghc-8.10 into ghc-9.0 - - - - - 6388989e by Vladislav Zavialov at 2021-02-05T17:41:57+03:00 Cleanup: fix build warnings - - - - - f99407ef by Daniel Rogozin at 2021-02-05T18:11:48+03:00 type level characters support for haddock (required for haskell/haddock#11342) - - - - - d8c6b26f by Hécate Moonlight at 2021-02-05T17:44:50+01:00 Add a CONTRIBUTING.md file - - - - - 6a01ad98 by Hécate Moonlight at 2021-02-05T17:58:16+01:00 Merge pull request haskell/haddock#1312 from Kleidukos/proper-branch-etiquette Add a CONTRIBUTING.md file - - - - - 955eecc4 by Vladislav Zavialov at 2021-02-05T20:29:00+03:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into ghc-head - - - - - 47b3d6ab by Hécate Moonlight at 2021-02-05T19:09:38+01:00 Amend the CONTRIBUTING.md file - - - - - 23de6137 by Hécate Moonlight at 2021-02-05T19:16:49+01:00 Merge pull request haskell/haddock#1313 from Kleidukos/amend-contributing Amend the CONTRIBUTING.md file - - - - - 69026b59 by Krzysztof Gogolewski at 2021-02-05T23:05:56+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb) - - - - - ea026b78 by Oleg Grenrus at 2021-02-06T17:14:45+01:00 Add import list to Data.List - - - - - 5204326f by Hécate Moonlight at 2021-02-06T17:15:44+01:00 Merge pull request haskell/haddock#1316 from Kleidukos/explicit-imports-to-data-list Add import list to Data.List - - - - - 1f4d2136 by Ben Gamari at 2021-02-06T11:53:31-05:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge - - - - - 13f0d09a by Ben Gamari at 2021-02-06T11:53:45-05:00 Fix partial record selector warning - - - - - 5c115f7e by Ben Gamari at 2021-02-06T11:55:52-05:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into wip/ghc-head-merge - - - - - b6fd8b75 by Ben Gamari at 2021-02-06T12:01:31-05:00 Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-merge - - - - - a967194c by Ben Gamari at 2021-02-06T18:30:35-05:00 Merge branch 'wip/ghc-head-merge' into ghc-head - - - - - 1f4c3a91 by MorrowM at 2021-02-07T01:52:33+02:00 Fix search div not scrolling - - - - - 684b1287 by Iñaki García Etxebarria at 2021-02-07T16:13:04+01:00 Add support for labeled module references Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label". - - - - - bdb55a5d by Hécate Moonlight at 2021-02-07T16:18:10+01:00 Merge pull request haskell/haddock#1319 from alexbiehl/alex/compat Backward compat: Add support for labeled module references - - - - - 6ca70991 by Hécate Moonlight at 2021-02-07T16:21:29+01:00 Merge pull request haskell/haddock#1314 from tweag/show-linear-backport Backport haskell/haddock#1238 (linear types) to ghc-9.0 - - - - - d9d73298 by Alex Biehl at 2021-02-07T17:46:25+01:00 Remove dubious parseModLink Instead construct the ModLink value directly when parsing. - - - - - 33b4d020 by Hécate Moonlight at 2021-02-07T17:52:05+01:00 Merge pull request haskell/haddock#1320 from haskell/alex/fix Remove dubious parseModLink - - - - - 54211316 by Hécate Moonlight at 2021-02-07T18:12:07+01:00 Merge pull request haskell/haddock#1318 from MorrowM/ghc-9.0 Fix search div not scrolling - - - - - 19db679e by alexbiehl-gc at 2021-02-07T18:14:46+01:00 Merge pull request haskell/haddock#1317 from bgamari/wip/ghc-head-merge Merge ghc-8.10 into ghc-head - - - - - 6bc1e9e4 by Willem Van Onsem at 2021-02-07T18:25:30+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - c8537cf8 by alexbiehl-gc at 2021-02-07T18:30:40+01:00 Merge pull request haskell/haddock#1322 from haskell/alex/forward-port simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 2d47ae4e by alexbiehl-gc at 2021-02-07T18:39:59+01:00 Merge branch 'ghc-head' into ghc-9.0 - - - - - 849e4733 by Hécate Moonlight at 2021-02-07T18:43:19+01:00 Merge pull request haskell/haddock#1321 from Kleidukos/ghc-9.0 Merge ghc-9.0 into ghc-head - - - - - ee6095d7 by Sylvain Henry at 2021-02-08T11:36:38+01:00 Update for Logger - - - - - 4ad688c9 by Alex Biehl at 2021-02-08T18:11:24+01:00 Merge pull request haskell/haddock#1310 from hsyl20/wip/hsyl20/logger2 Logger refactoring - - - - - 922a9e0e by Ben Gamari at 2021-02-08T12:54:33-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - 991649d2 by Sylvain Henry at 2021-02-09T10:55:17+01:00 Fix to build with HEAD - - - - - a8348dc2 by Hécate Moonlight at 2021-02-09T10:58:51+01:00 Merge pull request haskell/haddock#1327 from hsyl20/wip/hsyl20/logger2 Fix to build with HEAD - - - - - 0abdbca6 by Fendor at 2021-02-09T20:06:15+01:00 Add UnitId to Target record - - - - - d5790a0e by Alex Biehl at 2021-02-11T10:32:32+01:00 Stable sort for (data/newtype) instances - - - - - 8e6036f5 by Alex Biehl at 2021-02-11T10:32:32+01:00 Also make TyLit deterministic - - - - - f76d2945 by Hécate Moonlight at 2021-02-11T11:00:31+01:00 Merge pull request haskell/haddock#1329 from hsyl20/hsyl20/stabe_iface Stable sort for instances - - - - - 5e0469ea by Oleg Grenrus at 2021-02-14T15:28:15+02:00 Add import list to Data.List in Haddock.Interface.Create - - - - - fa57cd24 by Hécate Moonlight at 2021-02-14T17:19:27+01:00 Merge pull request haskell/haddock#1331 from phadej/more-explicit-data-list-imports Add import list to Data.List in Haddock.Interface.Create - - - - - f0cd629c by Hécate Moonlight at 2021-02-21T00:22:01+01:00 Merge pull request haskell/haddock#1311 from fendor/wip/add-targetUnitId-to-target Add UnitId to Target record - - - - - 674ef723 by Joachim Breitner at 2021-02-22T10:39:18+01:00 html-test: Always set language from ghc-9.2 on, the “default” langauge of GHC is expected to change more wildly. To prepare for that (and unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4853), this sets the language for all the test files to `Haskell2010`. This should insolate this test suite against changes to the default. Cherry-picked from https://github.com/haskell/haddock/pull/1341 - - - - - f072d623 by Hécate Moonlight at 2021-02-22T10:56:51+01:00 Merge pull request haskell/haddock#1342 from nomeata/joachim/haskell2010-in-tests-ghc-head html-test: Always set language - - - - - caebbfca by Hécate Moonlight at 2021-02-22T11:53:07+01:00 Clean-up of Interface and Interface.Create's imports and pragmata - - - - - f6caa89d by Hécate Moonlight at 2021-02-22T11:54:58+01:00 Merge pull request haskell/haddock#1345 from Kleidukos/head/fix-interface-imports [ghc-head] Clean-up of Interface and Interface.Create's imports and pragmata - - - - - 7395c9cb by Hécate Moonlight at 2021-02-22T18:44:57+01:00 Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 6e9fb5d5 by Hécate Moonlight at 2021-02-22T18:45:28+01:00 Merge pull request haskell/haddock#1348 from Kleidukos/head/explicit-imports-interface Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 9198b118 by Alan Zimmerman at 2021-02-22T20:04:24+00:00 Context becomes a Maybe in the GHC AST This prevents noLoc's appearing in the ParsedSource. Match the change in GHC. - - - - - 0af20f64 by Hécate Moonlight at 2021-02-23T12:36:12+01:00 Fix the call-site of guessTarget in Interface.hs Explicit the imports from GHC.HsToCore.Docs - - - - - b7886885 by Hécate Moonlight at 2021-02-23T12:37:54+01:00 Merge pull request haskell/haddock#1349 from Kleidukos/fix-interface-guesstarget-call Fix the call-site of guessTarget in Interface.hs - - - - - 9cf041ba by Sylvain Henry at 2021-02-24T11:08:20+01:00 Fix haddockHypsrcTest output in ghc-head - - - - - b194182a by Hécate Moonlight at 2021-02-24T11:12:36+01:00 Merge pull request haskell/haddock#1351 from hsyl20/wip/hsyl20/fix-head Fix haddockHypsrcTest output in ghc-head - - - - - 3ce8b375 by Shayne Fletcher at 2021-03-06T09:55:03-05:00 Add ITproj to parser - - - - - d2abf762 by Ben Gamari at 2021-03-06T19:26:49-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a0f6047d by Andrew Martin at 2021-03-07T11:25:23-05:00 Update for boxed rep - - - - - 6f63c99e by Ben Gamari at 2021-03-10T13:20:21-05:00 Update for "FastString: Use FastMutInt instead of IORef Int" - - - - - e13f01df by Luke Lau at 2021-03-10T15:38:40-05:00 Implement template-haskell's putDoc This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int - - - - - 89263d94 by Alan Zimmerman at 2021-03-15T17:15:26+00:00 Match changes in GHC AST for in-tree API Annotations As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418 - - - - - 28db1934 by Alan Zimmerman at 2021-03-15T20:40:09+00:00 Change some type family test results. It is not clear to me whether the original was printing incorrectly (since we did not have the TopLevel flag before now), or if this behaviour is expected. For the time being I am assuming the former. - - - - - 7c11c989 by Sylvain Henry at 2021-03-22T10:05:19+01:00 Fix after NameCache changes - - - - - addbde15 by Sylvain Henry at 2021-03-22T10:05:19+01:00 NameCache doesn't store a UniqSupply anymore - - - - - 15ec6cec by Ben Gamari at 2021-03-22T17:53:44-04:00 Bump GHC version to 9.2 - - - - - dbd6aa63 by Hécate Moonlight at 2021-03-24T14:28:36+01:00 Merge pull request haskell/haddock#1365 from hsyl20/wip/hsyl20/iface1 NameCache refactoring - - - - - 2d32da7e by Oleg Grenrus at 2021-03-27T01:12:00+02:00 Specialization of Data.List - - - - - 32b84fa6 by Fendor at 2021-03-27T10:50:17+01:00 Add UnitId to Target record This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time. - - - - - 54bf9f0e by Hécate Moonlight at 2021-03-28T14:08:35+02:00 Merge pull request haskell/haddock#1368 from fendor/target-unit-id-revert Add UnitId to Target record - - - - - 7dea168a by Alan Zimmerman at 2021-03-29T08:45:52+01:00 EPA : Rename ApiAnn to EpAnn - - - - - 72967f65 by Alfredo Di Napoli at 2021-03-29T09:47:01+02:00 pprError changed name in GHC - - - - - 4bc61035 by Alan Zimmerman at 2021-03-29T16:16:27-04:00 EPA : Rename ApiAnn to EpAnn - - - - - 108d031d by Ben Gamari at 2021-03-29T18:49:36-04:00 Merge commit '36418c4f70d7d2b179a77925b3ad5caedb08c9b5' into HEAD - - - - - 1444f700 by Ben Gamari at 2021-03-31T09:18:39-04:00 Merge pull request haskell/haddock#1370 from adinapoli/wip/adinapoli-diag-reason-severity Rename pprError to mkParserErr - - - - - d3087b79 by Ben Gamari at 2021-03-31T11:34:17-04:00 Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head - - - - - 170b79e9 by Ben Gamari at 2021-03-31T12:24:56-04:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - db0d6bae by Ben Gamari at 2021-04-10T09:34:35-04:00 Bump GHC version to 9.3 - - - - - a9f2c421 by Alan Zimmerman at 2021-04-19T18:26:46-04:00 Update for EPA changes in GHC (cherry picked from commit cafb48118f7c111020663776845897e225607b41) - - - - - 1ee4b7c7 by Sylvain Henry at 2021-05-11T10:00:06+02:00 Removal of HsVersions.h (#1388) * Update for EPA changes in GHC * Account for HsVersions.h removal Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 79e819e9 by Hécate Moonlight at 2021-05-11T10:14:47+02:00 Revert "Removal of HsVersions.h (#1388)" This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6. - - - - - 3dbd3f8b by Alan Zimmerman at 2021-05-11T10:15:17+02:00 Update for EPA changes in GHC - - - - - 2ce80c17 by Sylvain Henry at 2021-05-11T10:15:19+02:00 Account for HsVersions.h removal - - - - - 00e4c918 by Christiaan Baaij at 2021-05-13T08:21:56+02:00 Add Haddock support for the OPAQUE pragma (#1380) - - - - - 8f9049b2 by Hécate Moonlight at 2021-05-13T08:40:22+02:00 fixup! Use GHC 9.2 in CI runner - - - - - 27ddec38 by Alan Zimmerman at 2021-05-13T22:51:20+01:00 EPA: match changes from GHC T19834 - - - - - f8a1d714 by Felix Yan at 2021-05-14T17:10:04+02:00 Allow hspec 2.8 (#1389) All tests are passing. - - - - - df44453b by Divam Narula at 2021-05-20T15:42:42+02:00 Update ref, the variables got renamed. (#1391) This is due to ghc/ghc!5555 which caused a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used. - - - - - e46bfc87 by Alan Zimmerman at 2021-05-20T19:05:09+01:00 Remove Maybe from HsQualTy Match changes in GHC for haskell/haddock#19845 - - - - - 79bd7b62 by Shayne Fletcher at 2021-05-22T08:20:39+10:00 FieldOcc: rename extFieldOcc to foExt - - - - - 6ed68c74 by Ben Gamari at 2021-05-21T22:29:30-04:00 Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head - - - - - f9a02d34 by Alfredo Di Napoli at 2021-05-24T13:53:00+02:00 New Parser diagnostics interface - - - - - 392807d0 by Ben Gamari at 2021-05-24T09:57:40-04:00 Merge pull request haskell/haddock#1394 from adinapoli/wip/adinapoli-align-ps-messages Align Haddock to use the new Parser diagnostics interface - - - - - 33023cd8 by Ben Gamari at 2021-05-24T11:19:16-04:00 Revert "Add Haddock support for the OPAQUE pragma (#1380)" This reverts commit a1337c599ef7720b0482a25c55f11794112496dc. The GHC patch associated with this change is not yet ready to be merged. - - - - - 8c005af7 by Ben Simms at 2021-05-28T07:56:20+02:00 CI configuration for ghc-head (#1395) - - - - - 1e947612 by Hécate Moonlight at 2021-05-28T12:27:35+02:00 Use GHC 9.2 in CI runner (#1378) - - - - - e6fa10ab by CGenie at 2021-05-31T09:02:13+02:00 Add page about common errors (#1396) * Update index.rst Common errors page * Create common-errors.rst * Update common-errors.rst * Use GHC 9.2 in CI runner (#1378) * [haddock-api] remove .hspec-failures Co-authored-by: Hécate Moonlight <Kleidukos at users.noreply.github.com> - - - - - abc72a8d by Sylvain Henry at 2021-06-01T10:02:06+02:00 Adapt Haddock to Logger and Parser changes (#1399) - - - - - 91373656 by Zubin Duggal at 2021-06-01T20:45:10+02:00 Update haddockHypSrc tests since we now compute slighly more type info (#1397) - - - - - ed712822 by Marcin Szamotulski at 2021-06-02T08:54:33+02:00 Added myself to contributors - - - - - 49fdbcb7 by Marcin Szamotulski at 2021-06-02T08:57:24+02:00 Document multi component support - - - - - 9ddc8d7d by Hécate Moonlight at 2021-06-02T09:35:55+02:00 Merge pull request haskell/haddock#1379 from coot/coot/document-multi-component-support Document multi component support - - - - - 585b5c5e by Ben Simms at 2021-06-02T19:46:54+02:00 Update CONTRIBUTING.md (#1402) - - - - - 1df4a605 by Ben Simms at 2021-06-02T19:47:14+02:00 Update CONTRIBUTING.md (#1403) - - - - - 58ea43d2 by sheaf at 2021-06-02T22:09:06+02:00 Update Haddock Bug873 to account for renaming - - - - - c5d0ab23 by Vladislav Zavialov at 2021-06-10T13:35:42+03:00 HsToken in FunTy, RecConGADT - - - - - 1ae2f40c by Hécate Moonlight at 2021-06-11T11:19:09+02:00 Update the CI badges - - - - - 6fdc4de2 by Sylvain Henry at 2021-06-28T19:21:17+02:00 Fix mkParserOpts (#1411) - - - - - 18201670 by Alfredo Di Napoli at 2021-07-05T07:55:12+02:00 Rename getErrorMessages Lexer import This commit renames the Lexer import in `Hyperlinker.Parser` from `getErrorMessages` to `getPsErrorMessages` to eliminate the ambiguity with the `getErrorMessages` function defined in `GHC.Types.Error`. - - - - - 23173ca3 by Ben Gamari at 2021-07-07T11:31:44-04:00 Merge pull request haskell/haddock#1413 from adinapoli/wip/adinapoli-issue-19920 Rename getErrorMessages Lexer import - - - - - b3dc4ed8 by Alan Zimmerman at 2021-07-28T22:30:59+01:00 EPA: match changes from GHC T19834 (cherry picked from commit 2fec1b44e0ee7e263286709aa528b4ecb99ac6c2) - - - - - 5f177278 by Ben Gamari at 2021-08-06T01:17:37-04:00 Merge commit '2a966c8ca37' into HEAD - - - - - cdd81d08 by Marcin Szamotulski at 2021-08-08T17:19:06+02:00 coot/multiple packages (ghc-9.2) (#1418) - - - - - be0d71f1 by Marcin Szamotulski at 2021-08-16T08:46:03+02:00 coot/multiple package (ghc-head) (#1419) * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".". - - - - - 3b09dbdf by Hécate Moonlight at 2021-10-07T23:26:03+02:00 Update GHC 9.2 to latest pre-release in CI - - - - - 7ac55417 by Zubin Duggal at 2021-10-11T12:10:19+02:00 Enable Haddock tests in GHC windows CI (#1428) * testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC - - - - - 1cb81f25 by Andrew Lelechenko at 2021-10-12T15:23:19+02:00 haddock-library does not depend on bytestring or transformers (#1426) - - - - - a890b9aa by sheaf at 2021-10-15T22:19:42+02:00 update haddockHypsrcTest for GHC MR !6705 (#1430) - - - - - 42a55c6c by Sylvain Henry at 2021-10-15T22:20:10+02:00 Fix after PkgQual refactoring (#1429) - - - - - 91659238 by Alan Zimmerman at 2021-10-28T18:57:10+01:00 Update for changes in GHC for branch wip/az/no-srcspan-anno-instances - - - - - acf23e60 by Vladislav Zavialov at 2021-11-05T02:09:47+03:00 Do not use forall as an identifier See GHC ticket haskell/haddock#20609 - - - - - c565db0e by Krzysztof Gogolewski at 2021-11-27T02:42:35+01:00 Update after NoExtCon -> DataConCantHappen rename - - - - - b5f55590 by Artem Pelenitsyn at 2021-11-27T11:14:17+01:00 fix CI for 9.2 (#1436) - - - - - 25cd621e by Matthew Pickering at 2021-12-02T11:46:54+00:00 Update html-test for Data.List revert - - - - - 1d5ff85f by malteneuss at 2021-12-15T07:56:55+01:00 Add hint about inline link issue (#1444) - - - - - 791fde81 by Sylvain Henry at 2021-12-16T09:29:51+01:00 Bump ghc-head (#1445) * Update after NoExtCon -> DataConCantHappen rename * Update html-test for Data.List revert * Fix for new Plugins datatype Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 44236317 by Sylvain Henry at 2021-12-17T09:39:00+01:00 Fix for new Plugins datatype - - - - - 80ada0fa by Hécate Moonlight at 2021-12-17T17:28:48+01:00 Remove ghc-head workflow (#1446) Contributions of GHC glue code are now done on the GHC gitlab, not in the GitHub repo anymore. - - - - - 49e171cd by Matthew Pickering at 2021-12-28T09:47:09+00:00 Remove use of ExtendedModSummary - - - - - 0e91b5ea by askeblad at 2022-01-04T09:18:35+01:00 update URLs - - - - - 9f13c212 by Hécate Moonlight at 2022-02-25T10:19:46+01:00 Fix solver for GHC 9.2 - - - - - 386751a1 by Meng Weng Wong at 2022-02-25T19:19:11+01:00 IDoc link has bitrotted; replaced with web.archive.org cache. (#1454) - - - - - d877cbe6 by Hécate Moonlight at 2022-02-25T19:21:58+01:00 Fix haddock user guide (#1456) - - - - - cc47f036 by Andrew Lelechenko at 2022-03-04T17:29:36+01:00 Allow text-2.0 in haddock-library (#1459) - - - - - 7b3685a3 by malteneuss at 2022-03-07T19:27:24+01:00 Add multi-line style hint to style section (#1460) - - - - - c51088b8 by John Ericson at 2022-03-11T16:46:26+01:00 Fix CollectPass instance to match TTG refactor Companion to GHC !7614 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7614) - - - - - b882195b by Vladislav Zavialov at 2022-03-14T20:32:30+01:00 Link to (~) - - - - - 877349b8 by Christiaan Baaij at 2022-03-16T09:20:43+01:00 Add Haddock support for the OPAQUE pragma - - - - - 0ea22721 by askeblad at 2022-03-16T09:44:27+01:00 typos (#1464) - - - - - a6d13da1 by Matthew Pickering at 2022-03-22T13:41:17+00:00 Minimum changes needed for compilation with hi-haddock With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC. - - - - - e7ac9129 by Matthew Pickering at 2022-03-22T21:17:50+00:00 Update test output - - - - - 6d916214 by Matthew Pickering at 2022-03-24T15:06:26+00:00 Merge branch 'wip/opaque_pragma' into 'ghc-head' Add Haddock support for the OPAQUE pragma See merge request ghc/haddock!2 - - - - - 42208183 by Steve Hart at 2022-03-25T20:43:50+01:00 Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. - - - - - 9676fd79 by Steve Hart at 2022-03-25T21:33:34+01:00 Make links in Synopsis functional again (#1458) Commit e41c1cbe9f0476997eac7b4a3f17cbc6b2262faf added a call to e.preventDefault() when handling click events that reach a toggle element. This prevents the browser from following hyperlinks within the Synopsis section when they are clicked by a user. This commit restores functioning hyperlinks within the Synopsis section by removing the call to e.preventDefault(), as it does not appear to be necessary, and removing it increases the flexibility of the details-helper code. - - - - - d1edd637 by sheaf at 2022-04-01T12:02:02+02:00 Keep track of promotion ticks in HsOpTy Keeping track of promotion ticks in HsOpTy allows us to properly pretty-print promoted constructors such as lists. - - - - - 9dcb2dfc by Jakob Brünker at 2022-04-01T15:46:22+00:00 Add support for \cases See merge request ghc/ghc!7873 - - - - - b0412ee5 by askeblad at 2022-04-06T17:47:57+02:00 spelling errors (#1471) - - - - - 6b18829b by Vladislav Zavialov at 2022-04-06T18:53:58+02:00 Rename [] to List - - - - - 2d046691 by Vladislav Zavialov at 2022-04-07T20:25:54+03:00 HsToken ConDeclGADT con_dcolon - - - - - 90b43da4 by Steve Hart at 2022-04-12T13:29:46+02:00 Parse Markdown links at beginning of line within a paragraph (#1470) * Catch Markdown links at beginning of line within paragraph Per Issue haskell/haddock#774, Markdown links were being parsed as ordinary text when they occurred at the beginning of a line other than the first line of the paragraph. This occurred because the parser was not interpreting a left square bracket as a special character that could delimit special markup. A space character was considered a special character, so, if a space occurred at the beginning of the new line, then the parser would interpret the space by itself and then continue parsing, thereby catching the Markdown link. '\n' was not treated as a special character, so the parser did not catch a Markdown link that may have followed. Note that this will allow for Markdown links that are not surrounded by spaces. For example, the following text includes a Markdown link that will be parsed: Hello, world[label](url) This is consistent with how the parser handles other types of markup. * Remove obsolete documentation hint Commit 6b9aeafddf20efc65d3725c16e3fc43a20aac343 should eliminate the need for the workaround suggested in the documentation. - - - - - 5b08312d by Hécate Moonlight at 2022-04-12T13:36:38+02:00 Force ghc-9.2 in the cabal.project - - - - - 0d0ea349 by dependabot[bot] at 2022-04-12T13:57:41+02:00 Bump path-parse from 1.0.5 to 1.0.7 in /haddock-api/resources/html (#1469) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 2b9fc65e by dependabot[bot] at 2022-04-12T13:57:54+02:00 Bump copy-props from 2.0.4 to 2.0.5 in /haddock-api/resources/html (#1468) Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - ea98a6fb by Ben Gamari at 2022-04-23T22:54:37-04:00 Update for GHC 9.4 - - - - - 9e11864f by Ben Gamari at 2022-04-25T16:24:31-04:00 Merge remote-tracking branch 'upstream/ghc-9.2' into ghc-head - - - - - f83cc506 by Ben Gamari at 2022-04-25T17:00:25-04:00 Bump ghc version to 9.5 - - - - - e01c2e7d by Ben Gamari at 2022-04-28T16:19:04-04:00 Revert "Bump ghc-head (#1445)" This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2. This should not have been merged. - - - - - a2b5ee8c by Ben Gamari at 2022-04-28T16:19:24-04:00 Merge commit '2627a86c' into ghc-head - - - - - 0c6fe4f9 by Ben Gamari at 2022-04-29T10:05:54-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-9.4 - - - - - b6e5cb0a by Ben Gamari at 2022-04-29T11:46:06-04:00 Revert "HsToken ConDeclGADT con_dcolon" This reverts commit 24208496649a02d5f87373052c430ea4a97842c5. - - - - - 15a62888 by Ben Gamari at 2022-04-29T15:12:55-04:00 Bump base upper bound - - - - - 165b9031 by Ben Gamari at 2022-04-29T23:58:38-04:00 Update test output - - - - - e0c3e5da by Phil de Joux at 2022-05-02T14:46:38+02:00 Add hlint action .hlint.yaml with ignores & CPP. (#1475) - - - - - ead1158d by Raphael Das Gupta at 2022-05-02T14:46:48+02:00 fix grammar in docs: "can the" → "can be" (#1477) - - - - - cff97944 by Ben Gamari at 2022-05-02T18:38:56-04:00 Allow base-4.17 - - - - - e4ecb201 by Phil de Joux at 2022-05-03T13:14:55+02:00 Remove unused imports that GHC warned about. (#1480) - - - - - 222890b1 by Phil de Joux at 2022-05-03T13:15:46+02:00 Follow hlint suggestion to remove redundant bang. (#1479) - - - - - 058b671f by Phil de Joux at 2022-05-03T13:34:04+02:00 Follow hlint, remove language pragmas in libs. (#1478) - - - - - 0a645049 by Ben Simms at 2022-05-03T14:19:24+02:00 Keep track of ordered list indexes and render them (#1407) * Keep track of ordered list indexes and render them * Rename some identifiers to clarify - - - - - f0433304 by Norman Ramsey at 2022-05-04T15:13:34-04:00 update for changes in GHC API - - - - - 3740cf71 by Emily Martins at 2022-05-06T18:23:48+02:00 Add link to the readthedocs in cabal description to show on hackage. (cherry picked from commit 52e2d40d47295c02d3181aac0c53028e730f1e3b) - - - - - 5d754f1e by Hécate Moonlight at 2022-05-06T18:44:57+02:00 remove Bug873 - - - - - 968fc267 by Hécate Moonlight at 2022-05-06T18:48:28+02:00 Ignore "Use second" HLint suggestion. It increases laziness. - - - - - 02d14e97 by Jade Lovelace at 2022-05-07T17:42:08+02:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` - - - - - b22b87ed by Artem Pelenitsyn at 2022-05-08T16:19:47+02:00 fix parsing trailing quotes in backticked identifiers (#1408) (#1483) - - - - - 80ae107b by Alex Biehl at 2022-05-08T16:37:16+02:00 Fix "Defined by not used" error (cherry picked from commit 6e02a620a26c3a44f98675dd1b93b08070c36c0a) - - - - - 4c838e84 by Hécate Moonlight at 2022-05-08T16:37:16+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - fc9827b4 by Hécate Moonlight at 2022-05-08T16:40:40+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - b153b555 by Xia Li-yao at 2022-05-20T17:52:42+02:00 Hide synopsis from search when hidden (#1486) Fix haskell/haddock#1451 - - - - - f3e38b85 by Marcin Szamotulski at 2022-05-21T23:32:31+02:00 Allow to hide interfaces when rendering multiple components (#1487) This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package. - - - - - f942863b by Marcin Szamotulski at 2022-05-24T08:29:59+02:00 Check if doc-index.json exists before reading it (#1488) - - - - - 31e92982 by Marcin Szamotulski at 2022-05-25T16:22:13+02:00 Version bump 2.26.1 (#1489) * Version bump 2.26.1 We extended format accepted by `--read-interface` option, which requires updating the minor version. * Update documentation of --read-interface option - - - - - 7cc873e0 by sheaf at 2022-05-25T16:42:31+02:00 Updated HaddockHypsrcTest output for record update changes (MR !7981) - - - - - cd196942 by Marcin Szamotulski at 2022-05-25T20:28:47+02:00 Use visibility to decide which interfaces are included in quickjump (#1490) This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision. - - - - - 00c713c5 by Hécate Moonlight at 2022-05-26T17:09:15+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 2f3039f1 by Hécate Moonlight at 2022-05-26T17:10:59+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 63a5650c by romes at 2022-05-31T12:43:22+01:00 TTG: Match new GHC AST - - - - - dd7d1617 by romes at 2022-06-02T16:11:00+01:00 Update for IE changes in !8228 - - - - - c23aaab7 by cydparser at 2022-06-06T08:48:14+02:00 Fix and improve CI (#1495) * Pin GHC version before creating the freeze file * Use newest action versions * Improve caching * Avoid unnecessarily reinstalling GHC * Use GHC 9.2.2 for CI Co-authored-by: Cyd Wise <cwise at tripshot.com> - - - - - c156fa77 by Hécate Moonlight at 2022-06-06T11:59:35+02:00 Add Mergify configuration (#1496) - - - - - 2dba4188 by Hécate Moonlight at 2022-06-06T16:12:50+02:00 Bump haddock's version in cabal file to 2.26.1 (#1497) - - - - - d7d4b8b9 by Marcin Szamotulski at 2022-06-07T06:09:40+00:00 Render module tree per package in the content page (#1492) * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version. - - - - - 77765665 by Mike Pilgrem at 2022-06-12T21:57:19+01:00 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - b0e079b0 by mergify[bot] at 2022-06-13T11:49:37+00:00 Merge pull request haskell/haddock#1108 from mpilgrem/fix783 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - 6c0292b1 by Hécate Moonlight at 2022-06-21T17:21:08+02:00 Update the contribution guide - - - - - e413b9fa by dependabot[bot] at 2022-06-21T23:38:19+02:00 Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 29d0ef70 by romes at 2022-07-06T11:29:39+02:00 TTG: AST Updates for !8308 - - - - - 1bae7c87 by Alan Zimmerman at 2022-07-06T22:50:43+01:00 Match GHC changes for T21805 This brings in a newtype for FieldLabelString - - - - - 6fe8b988 by Phil de Joux at 2022-07-16T20:54:26+00:00 Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. - - - - - 48fb43af by Phil de Joux at 2022-07-19T09:32:55+02:00 Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. - - - - - c1cf1fa7 by Phil de Joux at 2022-07-24T13:45:59+02:00 Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. - - - - - 74777eb2 by Jade Lovelace at 2022-07-29T11:02:41+01:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` (cherry picked from commit ab53ccf089ea703b767581ac14be0f6c78a7678a) - - - - - faa4cfcf by Hécate Moonlight at 2022-07-29T20:31:20+02:00 Merge pull request haskell/haddock#1516 from duog/9-4-backport-fix-hyperlinks Backport 9-4: Fix hyperlinks to external items and modules (#1482) - - - - - 5d2450f3 by Ben Gamari at 2022-08-05T17:41:15-04:00 Merge remote-tracking branch 'origin/ghc-9.4' - - - - - 63954f73 by Ben Gamari at 2022-08-05T19:08:36-04:00 Clean up build and testsuite for GHC 9.4 - - - - - d4568cb8 by Hécate Moonlight at 2022-08-05T19:10:49-04:00 Bump the versions - - - - - 505583a4 by Ben Gamari at 2022-08-06T13:58:27-04:00 Merge pull request haskell/haddock#1518 from bgamari/wip/ghc-9.4-merge Merge GHC 9.4 into `main` - - - - - 5706f6a4 by Ben Gamari at 2022-08-06T22:57:21-04:00 html-test: Testsuite changes for GHC 9.4.1 - - - - - 5f2a45a2 by Ben Gamari at 2022-08-15T14:33:05-04:00 doc: Fix a few minor ReST issues Sphinx was complaining about too-short title underlines. - - - - - 220e6410 by Ben Gamari at 2022-08-15T14:41:24-04:00 Merge branch 'main' into ghc-head - - - - - fbeb1b02 by Ben Gamari at 2022-08-15T14:45:16-04:00 Updates for GHC 9.5 - - - - - eee562eb by Vladislav Zavialov at 2022-08-15T14:46:13-04:00 HsToken ConDeclGADT con_dcolon - - - - - c5f073db by Ben Gamari at 2022-08-15T16:55:35-04:00 Updates for GHC 9.5 - - - - - 3f7ab242 by Vladislav Zavialov at 2022-08-15T16:55:35-04:00 HsToken ConDeclGADT con_dcolon - - - - - a18e473d by Ben Gamari at 2022-08-16T08:35:19-04:00 Merge branch 'wip/ghc-head-bump' into ghc-head - - - - - af0ff3a4 by M Farkas-Dyck at 2022-09-15T21:16:05+00:00 Disuse `mapLoc`. - - - - - a748fc38 by Matthew Farkas-Dyck at 2022-09-17T10:44:18+00:00 Scrub partiality about `NewOrData`. - - - - - 2758fb6c by John Ericson at 2022-09-18T03:27:37+02:00 Test output changed because of change to `base` Spooky, but I guess that is intended? - - - - - a7eec128 by Torsten Schmits at 2022-09-21T11:06:55+02:00 update tests for the move of tuples to GHC.Tuple.Prim - - - - - 461e7b9d by Ross Paterson at 2022-09-24T22:01:25+00:00 match implementation of GHC proposal haskell/haddock#106 (Define Kinds Without Promotion) - - - - - f7fd77ef by sheaf at 2022-10-17T14:53:01+02:00 Update Haddock for GHC MR !8563 (configuration of diagnostics) - - - - - 3d3e85ab by Vladislav Zavialov at 2022-10-22T23:04:06+03:00 Class layout info - - - - - cbde4cb0 by Simon Peyton Jones at 2022-10-25T23:19:18+01:00 Adapt to Constraint-vs-Type See haskell/haddock#21623 and !8750 - - - - - 7108ba96 by Tom Smeding at 2022-11-01T22:33:23+01:00 Remove outdated footnote about module re-exports The footnote is invalid with GHC 9.2.4 (and possibly earlier): the described behaviour in the main text works fine. - - - - - 206c6bc7 by Hécate Moonlight at 2022-11-01T23:00:46+01:00 Merge pull request haskell/haddock#1534 from tomsmeding/patch-1 - - - - - a57b4c4b by Andrew Lelechenko at 2022-11-21T00:39:52+00:00 Support mtl-2.3 - - - - - e9d62453 by Simon Peyton Jones at 2022-11-25T13:49:12+01:00 Track small API change in TyCon.hs - - - - - eb1c73f7 by Ben Gamari at 2022-12-07T08:46:21-05:00 Update for GhC 9.6 - - - - - 063268dd by Ben Gamari at 2022-12-07T11:26:32-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 4ca722fe by Ben Gamari at 2022-12-08T14:43:26-05:00 Bump bounds to accomodate base-4.18 - - - - - 340b7511 by Vladislav Zavialov at 2022-12-10T12:31:28+00:00 HsToken in HsAppKindTy - - - - - 946226ec by Ben Gamari at 2022-12-13T20:12:56-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - fd8faa66 by Ben Gamari at 2022-12-22T13:44:28-05:00 Bump GHC version to 9.7 - - - - - 2958aa9c by Ben Gamari at 2022-12-22T14:49:16-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 9e0fefd8 by Andrei Borzenkov at 2023-01-30T14:02:04+04:00 Rename () to Unit, Rename (,,...,,) to Tuple<n> - - - - - eb3968b5 by Ben Gamari at 2023-03-10T02:32:43-05:00 Bump versions for ghc-9.6 release - - - - - 4aeead36 by Adam Gundry at 2023-03-23T13:53:47+01:00 Adapt to warning categories changes - - - - - 642d8d60 by sheaf at 2023-03-29T13:35:56+02:00 Adapt to record field refactor This commit adapts to the changes in GHC MR !8686, which overhauls the treatment of record fields in the renamer, adding separate record field namespaces and entirely removing the GreName datatype. - - - - - ac8d4333 by doyougnu at 2023-03-29T11:11:44-04:00 Update UniqMap API - - - - - 7866fc86 by Ben Orchard at 2023-04-20T11:29:33+02:00 update classify with new tokens - - - - - ffcdd683 by Finley McIlwaine at 2023-04-24T09:36:18-06:00 Remove index-state - - - - - 05b70982 by Finley McIlwaine at 2023-04-26T08:16:31-06:00 `renameInterface` space leak fixes - Change logic for accumulation of names for which link warnings will be generated - Change handling of `--ignore-link-symbol` to allow qualified and unqualified names. Added to CHANGES.md - Some formatting changes and comments here and there - - - - - e5697d7c by Finley McIlwaine at 2023-04-27T18:46:36-06:00 Messy things - ghc-debug dependency and instrumentation - cabal.project custom with-compiler - hie.yaml files - traces and such - - - - - 0b8ef80b by Finley McIlwaine at 2023-05-02T18:08:52-06:00 Stop retaining GRE closures GRE closures should never be necessary to Haddock, so we never want to keep them on the heap. Despite that, they are retained by a lot of the data structures that Haddock makes use of. - Attempt to fix that situation by adding strictness to various computations and pruning the `ifaceInstances` field of `Interface` to a much thinner data type. - Removes the `ifaceFamInstances` field, as it was never used. - Move some of the attach instances types (e.g. `SimpleType`) to the types module - - - - - 8bda991b by Finley McIlwaine at 2023-05-08T16:07:51-06:00 Memory usage fixes - Refactor `ifaceDeclMap` to drastically reduce memory footprint. We no longer store all declarations associated with a given name, since we only cared to determine if the only declaration associated with a name was a value declaration. Change the `DeclMap` type to better reflect this. - Drop pre-renaming export items after the renaming step. Since the Hoogle backend used the pre-renamed export items, this isn't trivial. We now generate Hoogle output for exported declarations during the renaming step (if Hoogle output /should/ be generated), and store that with the renamed export item. - Slightly refactor Hoogle backend to handle the above change and allow for early generation of Hoogle output. - Remove the `ifaceRnDocMap` and `ifaceRnArgMap` fields of the `Interface` type, as they were never used. - Remove some unnecessary strictness - Remove a lot of dead code from `Syb` module - - - - - 1611ac0c by Finley McIlwaine at 2023-05-09T11:51:57-06:00 Unify ErrMsgM and IfM - Delete ErrMsgM, stop accumulating warnings in a writer - Make IfM a state monad, print warnings directly to stdout, move IfM type into types module - Drop ErrMsg = String synonym - Unset IORefs from plugin after they are read, preventing unnecessary retention of interfaces - - - - - 42d696ab by Finley McIlwaine at 2023-05-11T15:52:07-06:00 Thunk leak fixes The strictness introduced in this commit was motivated by observing thunk leaks in the eventlog2html output. - Refactor attach instances list comprehension to avoid large intermediate thunks - Refactor some HTML backend list comprehensions to avoid large intermediate thunks - Avoid thunks accumulating in documentation types or documentation parser - A lot of orphan NFData instances to allow us to force documentation values - - - - - 68561cf6 by Finley McIlwaine at 2023-05-11T17:02:10-06:00 Remove GHC debug dep - - - - - 10519e3d by Finley McIlwaine at 2023-05-15T12:40:48-06:00 Force HIE file path Removes a potential retainer of `ModSummary`s - - - - - 1e4a6ec6 by Finley McIlwaine at 2023-05-15T14:20:34-06:00 Re-add index-state, with-compiler, delete hie.yamls - - - - - a2363fe9 by Hécate Moonlight at 2023-05-15T22:45:16+02:00 Merge pull request haskell/haddock#1594 from FinleyMcIlwaine/finley/ghc-9.6-mem-fixes Reduce memory usage - - - - - e8a78383 by Finley McIlwaine at 2023-05-17T12:19:16-06:00 Merge branch ghc-9.6 into ghc-head - - - - - 22e25581 by Finley McIlwaine at 2023-05-17T12:20:23-06:00 Merge branch 'ghc-head' of gitlab.haskell.org:ghc/haddock into ghc-head - - - - - 41bbf0df by Bartłomiej Cieślar at 2023-05-24T08:57:58+02:00 changes to the WarningTxt cases Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - c686ba9b by Hécate Moonlight at 2023-06-01T14:03:02-06:00 Port the remains of Hi-Haddock - - - - - 9d8a85fd by Hécate Moonlight at 2023-06-01T14:03:06-06:00 Stdout for tests - - - - - 36331d07 by Finley McIlwaine at 2023-06-01T14:06:02-06:00 Formatting, organize imports - - - - - a06059b1 by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix empty context confusion in Convert module - - - - - 379346ae by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix associated type families in Hoogle output - - - - - fc6ea7ed by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix test refs Accept several changes in Hoogle tests: Pretty printing logic no longer prints the `(Proxy (Proxy (...))` chain in Bug806 with parentheses. Since this test was only meant to verify that line breaks do not occur, accept the change. `tyThingToLHsDecl` is called for class and data declarations, which ends up "synifying" the type variables and giving unlifted types kind signatures. As a result, type variables of kind `Type -> Type` are now printed with kind signatures in Hoogle output. This could be changed by manually drop kind signatures from class variables in the Hoogle backend if the behavior is deemed unacceptable. Sometimes subordinate declarations are exported separate from their parent declarations (e.g. record selectors). In this case, a type signature is cobbled together for the export item in `extractDecl`. Since this type signature is very manually constructed, it may lack kind signatures of decls constructed from `tyThingToLHsDecl`. An example of this is the `type-sigs` Hoogle test. Change `*` to `Type` in Hoogle test refs. I don't think this will break Hoogle behavior, since it appears to not consider type signatures in search. I have not fully verified this. - - - - - e14b7e58 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix LaTeX backend test refs Changes to GHC pretty printing code have resulted in some differences to Haddock's LaTeX output. - Type variables are printed explicitly quantified in the LinearTypes test - Wildcard types in type family equations are now printed numbered, e.g. _1 _2, in the TypeFamilies3 test - Combined signatures in DefaultSignatures test are now documented as separate signatures - - - - - 41b5b296 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and test source updates - Stop using kind `*` in html test sources - Add TypeOperators where necessary to avoid warnings and future errors - Rename some test modules to match their module names - - - - - c640e2a2 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix missing deprecation warnings on record fields `lookupOccEnv` was used to resolve `OccNames` with warnings attached, but it doesn't look in the record field namespace. Thus, if a record field had a warning attached, it would not resolve and the warning map would not include it. This commit fixes by using `lookupOccEnv_WithFields` instead. - - - - - fad0c462 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and some comments - - - - - 751fd023 by Finley McIlwaine at 2023-06-01T14:11:41-06:00 Accept HTML test diffs All diffs now boil down to the expected differences resulting from declarations being reified from TyThings in hi-haddock. Surface syntax now has much less control over the syntax used in the documentation. - - - - - d835c845 by Finley McIlwaine at 2023-06-01T14:11:45-06:00 Adapt to new load' type - - - - - dcf776c4 by Finley McIlwaine at 2023-06-01T14:13:13-06:00 Update mkWarningMap and moduleWarning - - - - - 8e8432fd by Finley McIlwaine at 2023-06-01T14:28:54-06:00 Revert load' changes - - - - - aeb2982c by Finley McIlwaine at 2023-06-01T14:40:24-06:00 Accept change to Instances test in html-test Link to Data.Tuple instead of GHC.Tuple.Prim - - - - - 8adfdbac by Finley McIlwaine at 2023-06-01T15:53:17-06:00 Reset ghc dep to ^>= 9.6 - - - - - 2b1ce93d by Finley McIlwaine at 2023-06-06T07:50:04-06:00 Update CHANGES.md, user guide, recomp avoidance * Add --trace-args flag for tracing arguments received to standard output * Avoid recompiling due to changes in optimization flags * Update users guide and changes.md - - - - - f3da6676 by Finley McIlwaine at 2023-06-06T14:12:56-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - bf36c467 by Matthew Pickering at 2023-06-07T10:16:09+01:00 Revert back to e16e20d592a6f5d9ed1af17b77fafd6495242345 Neither of these MRs are ready to land yet which causes issues with other MRs which are ready to land and need haddock changes. - - - - - 421510a9 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 atSign has no unicode variant Prior to this change, atSign was defined as follows: atSign unicode = text (if unicode then "@" else "@") Yes, this is the same symbol '\64' and not your font playing tricks on you. Now we define: atSign = char '@' Both the LaTeX and the Xhtml backend are updated accordingly. - - - - - 3785c276 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 LaTeX: fix printing of type variable bindings Consider this type signature: kindOf :: forall {k} (a :: k). Proxy a -> Proxy k Prior to this fix, the LaTeX backend rendered it like this: kindOf :: forall k a. Proxy a -> Proxy k Now we preserve explicit specificity and kind annotations. - - - - - 0febf3a8 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 Add support for invisible binders in type declarations - - - - - 13e33bb3 by Finley McIlwaine at 2023-06-08T07:51:59-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - 3e5340ce by Finley McIlwaine at 2023-06-08T07:54:27-06:00 Add note about stubdir to recompilation docs - - - - - db7e84dc by Finley at 2023-06-08T08:11:03-06:00 Merge pull request haskell/haddock#1597 from haskell/finley/hi-haddock-9.6 hi-haddock for ghc 9.6 - - - - - 4e085d17 by Finley McIlwaine at 2023-06-14T13:41:06-06:00 Replace SYB traversals - - - - - 7b39aec5 by Finley McIlwaine at 2023-06-14T14:20:17-06:00 Test ref accepts, remove unused HaddockClsInst - - - - - df9c2090 by Finley McIlwaine at 2023-06-15T08:02:51-06:00 Use batchMsg for progress reporting during load With hi-haddock as is, there is an awkward silence during the load operation. This commit makes haddock use the default `batchMsg` Messager for progress reporting, and makes the default GHC verbosity level 1, so the user can see what GHC is doing. - - - - - f23679a8 by Hécate Moonlight at 2023-06-15T20:31:53+02:00 Merge pull request haskell/haddock#1600 from haskell/finley/hi-haddock-optim - - - - - a7982192 by Finley McIlwaine at 2023-06-15T15:02:16-06:00 hi-haddock squashed - - - - - c34f0c8d by Finley McIlwaine at 2023-06-15T16:22:03-06:00 Merge remote-tracking branch 'origin/ghc-9.6' into finley/hi-haddock-squashed - - - - - 40452797 by Bartłomiej Cieślar at 2023-06-16T12:26:04+02:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - e58673bf by Ben Gamari at 2023-06-16T09:33:35-04:00 Bump GHC version to 9.8 - - - - - 74bdf972 by Ben Gamari at 2023-06-16T09:36:18-04:00 Merge commit 'fcaaad06770a26d35d4aafd65772dedadf17669c' into ghc-head - - - - - 418ee3dc by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Remove NFData SourceText, IfaceWarnings updates The NFData SourceText instance is now available in GHC Handle mod_iface mi_warns now being IfaceWarnings - - - - - 62f31380 by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Accept Instances.hs test output Due to ghc!10469. - - - - - a8f2fc0e by Ben Gamari at 2023-06-20T15:48:08-04:00 Test fixes for "Fix associated data family doc structure items" Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - cb1ac33e by Bartłomiej Cieślar at 2023-06-21T12:56:02-04:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 9933e10b by Ben Gamari at 2023-06-21T12:56:02-04:00 Bump GHC version to 9.8 - - - - - fe8c18b6 by Ben Gamari at 2023-06-21T15:36:29-04:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - c61a0d5b by Ben Gamari at 2023-06-21T16:10:51-04:00 Bump GHC version to 9.9 - - - - - 0c2a756e by sheaf at 2023-07-07T13:45:12+02:00 Avoid incomplete record update in Haddock Hoogle This commit avoids running into an incomplete record update warning in the Hoogle backend of Haddock. This was only noticed now, because incomplete record updates were broken in GHC 9.6. Now that they are fixed, we have to avoid running into them! - - - - - f9b952a7 by Ben Gamari at 2023-07-21T11:58:05-04:00 Bump base bound to <4.20 For GHC 9.8. - - - - - 1b27e151 by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Check for puns (see ghc#23368) - - - - - 457341fd by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Remove fake exports for (~), List, and Tuple<n> The old reasoning no longer applies, nowadays those names can be mentioned in export lists. - - - - - bf3dcddf by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Fix pretty-printing of Solo and MkSolo - - - - - 495b2241 by Matthew Pickering at 2023-09-01T13:02:07+02:00 Fix issue with duplicate reexported definitions (T23616) When a class method was reexported, it's default methods were also showing up in the generated html page. The simplest and most non-invasive fix is to not look for the default method if we are just exporting the class method.. because the backends are just showing default methods when the whole class is exported. In general it would be worthwhile to rewrite this bit of code I think as the logic and what gets included is split over `lookupDocs` and `availExportDecl` it would be clearer to combine the two. The result of lookupDocs is always just passed to availExportDecl so it seems simpler and more obvious to just write the function directly. - - - - - 6551824d by Finley McIlwaine at 2023-09-05T13:06:57-07:00 Remove fake export of `FUN` from Prelude This prevents `data FUN` from being shown at the top of the Prelude docs. Fixes \#23920 on GHC. - - - - - 9ab5a448 by Alan Zimmerman at 2023-09-08T18:26:53+01:00 Match changes in wip/az/T23885-unicode-funtycon - - - - - 4d08364e by Alan Zimmerman at 2023-10-31T19:46:45+00:00 EPA: match changes in GHC - EPA: Comments in AnchorOperation - EPA: Remove EpaEofComment - - - - - e7da0d25 by Alan Zimmerman at 2023-11-05T11:20:31+00:00 EPA: match changes in GHC, l2l cleanup - - - - - 4ceac14d by Alan Zimmerman at 2023-11-11T15:16:41+00:00 EPA: Replace Anchor with EpaLocation Match GHC - - - - - 94fb8d47 by Alan Zimmerman at 2023-11-29T18:10:26+00:00 Match GHC, No comments in EpaDelta for comments - - - - - 32d208e1 by Vladislav Zavialov at 2023-12-12T20:41:36+03:00 EPA: Match changes to LHsToken removal - - - - - eebdd316 by Apoorv Ingle at 2024-01-23T13:49:12+00:00 Changes for haskell/haddock#18324 - - - - - ae856a82 by Matthew Pickering at 2024-02-05T12:22:39+00:00 ghc-internals fallout - - - - - f8429266 by Jade at 2024-02-08T14:56:50+01:00 Adjust test for ghc MR !10993 - - - - - 6d1e2386 by Alan Zimmerman at 2024-02-13T22:00:28+03:00 EPA: Match changes to HsParTy and HsFunTy - - - - - 9c588f19 by Fendor at 2024-02-14T11:05:36+01:00 Adapt to GHC giving better Name's for linking - - - - - 778e1db3 by Andrei Borzenkov at 2024-02-16T16:12:07+03:00 Namespace specifiers for fixity signatures - - - - - 826c5b47 by Torsten Schmits at 2024-02-21T13:17:05+01:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 2cff14d5 by Ben Gamari at 2024-02-22T09:35:56-05:00 Bump bounds - - - - - f49376b3 by Ben Gamari at 2024-02-22T09:35:56-05:00 Allow `@since` annotations in export lists Here we extend Haddock to admit `@since` annotations in export lists. These can be attached to most export list items (although not subordinate lists). These annotations supercede the declaration's `@since` annotation in produced Haddocks. - - - - - b5aa93df by Ben Gamari at 2024-02-22T12:09:06-05:00 Allow package-qualified @since declarations - - - - - 8f5957f2 by Ben Gamari at 2024-02-22T13:55:19-05:00 Documentation changes from ghc-internal restructuring Previously many declarations (e.g. `Int`) were declared to have a "home" in `Prelude`. However, now Haddock instead chooses to put these in more specific homes (e.g. `Data.Int`). Given that the "home" decision is driven by heuristics and in general these changes seem quite reasonable I am accepting them: * `Int` moved from `Prelude` to `Data.Int` * `(~)` moved from `Prelude` to `Data.Type.Equality` * `Type` moved from `GHC.Types` to `Data.Kind` * `Maybe` moved from `Prelude` to `Data.Maybe` * `Bool` moved from `Prelude` to `Data.Bool` * `Ordering` moved from `Prelude` to `Data.Ord` As well, more identifiers are now hyperlinked; it's not immediately clear *why*, but it is an improvement nevertheless. - - - - - ec33fec3 by Ben Gamari at 2024-02-22T20:36:24-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 30cfd251 by Torsten Schmits at 2024-02-24T13:00:42-05:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 732db81d by Ben Gamari at 2024-02-24T19:12:18-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 86bf7010 by Ben Gamari at 2024-02-27T19:28:10-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 4b6e76b5 by Patrick at 2024-03-07T22:09:30+08:00 fix haskell/haddock#24493, with module name introduced in hieAst The accompanies haddoc PR with GHC PR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12153 Two things have been done: 1. Link is introduced to every `X` in `module X where`, since we introduce the module name to HieAst, 2. `{-# LINE 4 "hypsrc-test/src/PositionPragmas.hs" #-}` is added before the `module PositionPragmas where` in ` hypsrc-test/ref/src/PositionPragmas.html `.It ensures only a single hieAst for file `hypsrc-test/src/PositionPragmas.hs` is generated. - - - - - 635abccc by Ben Gamari at 2024-03-08T17:09:06-05:00 Bump ghc version to 9.10 - - - - - 5b934048 by Ben Gamari at 2024-03-08T18:50:12-05:00 Bump base upper bound - - - - - b30d134e by Ben Gamari at 2024-03-08T18:50:44-05:00 Testsuite output update - - - - - 9bdf3586 by Ben Gamari at 2024-03-09T21:37:44-05:00 Merge branch 'ghc-9.10' into ghc-head - - - - - cec76981 by Ben Gamari at 2024-03-09T21:54:00-05:00 Bump GHC version to 9.11 - - - - - 4c59feb7 by Ben Gamari at 2024-03-09T22:15:01-05:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - bee54c24 by Krzysztof Gogolewski at 2024-04-19T11:13:00+02:00 Update quantification order following GHC haskell/haddock#23764 - - - - - 2814eb89 by Ben Gamari at 2024-04-19T18:57:05+02:00 hypsrc-test: Fix output of PositionPragmas.html - - - - - a27c6a49 by Fendor at 2024-04-22T10:13:03+02:00 Adapt to UserData split - - - - - 1efc5a7a by Fendor at 2024-04-22T10:13:03+02:00 Adapt to BinHandle split - - - - - c62239b7 by Sylvain Henry at 2024-04-29T10:35:00+02:00 Fix tests for T22229 - - - - - b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00 Document NcgImpl methods Fixes #19914 - - - - - 4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00 Make renamer to be more flexible with parens in the LHS of the rules We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621 - - - - - ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00 IPE: Eliminate dependency on Read Instead of encoding the closure type as decimal string we now simply represent it as an integer, eliminating the need for `Read` in `GHC.Internal.InfoProv.Types.peekInfoProv`. Closes #24504. ------------------------- Metric Decrease: T24602_perf_size size_hello_artifact ------------------------- - - - - - a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00 testsuite: fix testwsdeque with recent clang This patch fixes compilation of testwsdeque.c with recent versions of clang, which will fail with the error below: ``` testwsdeque.c:95:33: error: warning: format specifies type 'long' but the argument has type 'void *' [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~~ ^ testwsdeque.c:95:39: error: warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~ ^~~ | %lu testwsdeque.c:133:42: error: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types] 133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); | ^~~~~ /workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error: note: passing argument to parameter 'startProc' here 193 | OSThreadProc *startProc, void *param); | ^ 2 warnings and 1 error generated. ``` - - - - - c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00 Rename pre-processor invocation args Small clean up. Uses proper names for the various groups of arguments that make up the pre-processor invocation. - - - - - 2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00 ghc-heap: fix typo in ghc-heap cbits - - - - - fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00 Improve performance of Data.List.sort(By) This patch improves the algorithm to sort lists in base. It does so using two strategies: 1) Use a four-way-merge instead of the 'default' two-way-merge. This is able to save comparisons and allocations. 2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization. This mainly benefits types with a fast (>). Note that this *may* break instances with a *malformed* Ord instance where `a > b` is *not* equal to `compare a b == GT`. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236 Fixes #24280 ------------------------- Metric Decrease: MultiLayerModulesTH_Make T10421 T13719 T15164 T18698a T18698b T1969 T9872a T9961 T18730 WWRec T12425 T15703 ------------------------- - - - - - 1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00 Revert "ghcup-metadata: Drop output_name field" This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f. This breaks the ghcup metadata generation on the nightly jobs. - - - - - daff1e30 by Jannis at 2024-05-12T13:38:35-04:00 Division by constants optimization - - - - - 413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00 Tidy: Add flag to expose unfoldings if they take dictionary arguments. Add the flag `-fexpose-overloaded-unfoldings` to be able to control this behaviour. For ghc's boot libraries file size grew by less than 1% when it was enabled. However I refrained from enabling it by default for now. I've also added a section on specialization more broadly to the users guide. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: T12425 T13386 hard_hole_fits ------------------------- - - - - - c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00 Don't store a GlobalRdrEnv in `mi_globals` for GHCi. GHCi only needs the `mi_globals` field for modules imported with :module +*SomeModule. It uses this field to make the top level environment in `SomeModule` available to the repl. By default, only the first target in the command line parameters is "star" loaded into GHCi. Other modules have to be manually "star" loaded into the repl. Storing the top level GlobalRdrEnv for each module is very wasteful, especially given that we will most likely never need most of these environments. Instead we store only the information needed to reconstruct the top level environment in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements as well as all top level symbols defined in the module (not taking export lists into account) When a particular module is "star-loaded" into GHCi (as the first commandline target, or via an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using the `IfaceTopEnv`. - - - - - d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00 Add perf regression test for `-fwrite-if-simplified-core` - - - - - 2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00 Improve pattern to type pattern transformation (23739) `pat_to_type_pat` function now can handle more patterns: - TuplePat - ListPat - LitPat - NPat - ConPat Allowing these new constructors in type patterns significantly increases possible shapes of type patterns without `type` keyword. This patch also changes how lookups in `lookupOccRnConstr` are performed, because we need to fall back into types when we didn't find a constructor on data level to perform `ConPat` to type transformation properly. - - - - - be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00 hadrian: fix hadrian building with ghc-9.10.1 - - - - - ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00 linters: fix lint-whitespace compilation with ghc-9.10.1 - - - - - a593f284 by Andreas Klebinger at 2024-05-15T07:32:10-04:00 Expand the `inline` rule to look through casts/ticks. Fixes #24808 - - - - - b1e0c313 by Cheng Shao at 2024-05-15T07:32:46-04:00 testsuite: bump PartialDownSweep timeout to 5x on wasm32 - - - - - b2227487 by Fendor at 2024-05-15T17:14:06-04:00 Add Eq and Ord instance to `IfaceType` We add an `Ord` instance so that we can store `IfaceType` in a `Data.Map` container. This is required to deduplicate `IfaceType` while writing `.hi` files to disk. Deduplication has many beneficial consequences to both file size and memory usage, as the deduplication enables implicit sharing of values. See issue #24540 for more motivation. The `Ord` instance would be unnecessary if we used a `TrieMap` instead of `Data.Map` for the deduplication process. While in theory this is clerarly the better option, experiments on the agda code base showed that a `TrieMap` implementation has worse run-time performance characteristics. To the change itself, we mostly derive `Eq` and `Ord`. This requires us to change occurrences of `FastString` with `LexicalFastString`, since `FastString` has no `Ord` instance. We change the definition of `IfLclName` to a newtype of `LexicalFastString`, to make such changes in the future easier. Bump haddock submodule for IfLclName changes - - - - - d368f9a6 by Fendor at 2024-05-15T17:14:06-04:00 Move out LiteralMap to avoid cyclic module dependencies - - - - - 2fcc09fd by Fendor at 2024-05-15T17:14:06-04:00 Add deduplication table for `IfaceType` The type `IfaceType` is a highly redundant, tree-like data structure. While benchmarking, we realised that the high redundancy of `IfaceType` causes high memory consumption in GHCi sessions when byte code is embedded into the `.hi` file via `-fwrite-if-simplified-core` or `-fbyte-code-and-object-code`. Loading such `.hi` files from disk introduces many duplicates of memory expensive values in `IfaceType`, such as `IfaceTyCon`, `IfaceTyConApp`, `IA_Arg` and many more. We improve the memory behaviour of GHCi by adding an additional deduplication table for `IfaceType` to the serialisation of `ModIface`, similar to how we deduplicate `Name`s and `FastString`s. When reading the interface file back, the table allows us to automatically share identical values of `IfaceType`. To provide some numbers, we evaluated this patch on the agda code base. We loaded the full library from the `.hi` files, which contained the embedded core expressions (`-fwrite-if-simplified-core`). Before this patch: * Load time: 11.7 s, 2.5 GB maximum residency. After this patch: * Load time: 7.3 s, 1.7 GB maximum residency. This deduplication has the beneficial side effect to additionally reduce the size of the on-disk interface files tremendously. For example, on agda, we reduce the size of `.hi` files (with `-fwrite-if-simplified-core`): * Before: 101 MB on disk * Now: 24 MB on disk This has even a beneficial side effect on the cabal store. We reduce the size of the store on disk: * Before: 341 MB on disk * Now: 310 MB on disk Note, none of the dependencies have been compiled with `-fwrite-if-simplified-core`, but `IfaceType` occurs in multiple locations in a `ModIface`. We also add IfaceType deduplication table to .hie serialisation and refactor .hie file serialisation to use the same infrastrucutre as `putWithTables`. Bump haddock submodule to accomodate for changes to the deduplication table layout and binary interface. - - - - - 36aa7cf1 by Fendor at 2024-05-15T17:14:06-04:00 Add run-time configurability of `.hi` file compression Introduce the flag `-fwrite-if-compression=<n>` which allows to configure the compression level of writing .hi files. The motivation is that some deduplication operations are too expensive for the average use case. Hence, we introduce multiple compression levels with variable impact on performance, but still reduce the memory residency and `.hi` file size on disk considerably. We introduce three compression levels: * `1`: `Normal` mode. This is the least amount of compression. It deduplicates only `Name` and `FastString`s, and is naturally the fastest compression mode. * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is marginally slower than `Normal` mode. In general, it should be safe to always use `Safe` mode. * `3`: `Full` deduplication mode. Deduplicate as much as we can, resulting in minimal .hi files, but at the cost of additional compilation time. Reading .hi files doesn't need to know the initial compression level, and can always deserialise a `ModIface`, as we write out a byte that indicates the next value has been deduplicated. This allows users to experiment with different compression levels for packages, without recompilation of dependencies. Note, the deduplication also has an additional side effect of reduced memory consumption to implicit sharing of deduplicated elements. See https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for example where that matters. ------------------------- Metric Decrease: MultiLayerModulesDefsGhciWithCore T16875 T21839c T24471 hard_hole_fits libdir ------------------------- - - - - - 1e63a6fb by Matthew Pickering at 2024-05-15T17:14:07-04:00 Introduce regression tests for `.hi` file sizes Add regression tests to track how `-fwrite-if-compression` levels affect the size of `.hi` files. - - - - - 639d742b by M Farkas-Dyck at 2024-05-15T17:14:49-04:00 TTG: ApplicativeStatement exist only in Rn and Tc Co-Authored-By: romes <rodrigo.m.mesquita at gmail.com> - - - - - aa7b336b by Jade at 2024-05-15T23:06:17-04:00 Documentation: Improve documentation for symbols exported from System.IO - - - - - c561de8f by Jade at 2024-05-15T23:06:54-04:00 Improve suggestions for language extensions - When suggesting Language extensions, also suggest Extensions which imply them - Suggest ExplicitForAll and GADTSyntax instead of more specific extensions - Rephrase suggestion to include the term 'Extension' - Also moves some flag specific definitions out of Session.hs into Flags.hs (#24478) Fixes: #24477 Fixes: #24448 Fixes: #10893 - - - - - 4c7ae2a1 by Andreas Klebinger at 2024-05-15T23:07:30-04:00 Testsuite: Check if llvm assembler is available for have_llvm - - - - - bc672166 by Torsten Schmits at 2024-05-15T23:08:06-04:00 refactor quadratic search in warnMissingHomeModules - - - - - 7875e8cb by Torsten Schmits at 2024-05-15T23:08:06-04:00 add test that runs MakeDepend on thousands of modules - - - - - b84b91f5 by Adam Gundry at 2024-05-16T15:32:06-04:00 Representation-polymorphic HasField (fixes #22156) This generalises the HasField class to support representation polymorphism, so that instead of type HasField :: forall {k} . k -> Type -> Type -> Constraint we have type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint - - - - - 05285090 by Matthew Pickering at 2024-05-16T15:32:43-04:00 Bump os-string submodule to 2.0.2.2 Closes #24786 - - - - - 886ab43a by Cheng Shao at 2024-05-17T01:34:50-04:00 rts: do not prefetch mark_closure bdescr in non-moving gc when ASSERTS_ENABLED This commit fixes a small an oversight in !12148: the prefetch logic in non-moving GC may trap in debug RTS because it calls Bdescr() for mark_closure which may be a static one. It's fine in non-debug RTS because even invalid bdescr addresses are prefetched, they will not cause segfaults, so this commit implements the most straightforward fix: don't prefetch mark_closure bdescr when assertions are enabled. - - - - - b38dcf39 by Teo Camarasu at 2024-05-17T01:34:50-04:00 rts: Allocate non-moving segments with megablocks Non-moving segments are 8 blocks long and need to be aligned. Previously we serviced allocations by grabbing 15 blocks, finding an aligned 8 block group in it and returning the rest. This proved to lead to high levels of fragmentation as a de-allocating a segment caused an 8 block gap to form, and this could not be reused for allocation. This patch introduces a segment allocator based around using entire megablocks to service segment allocations in bulk. When there are no free segments, we grab an entire megablock and fill it with aligned segments. As the megablock is free, we can easily guarantee alignment. Any unused segments are placed on a free list. It only makes sense to free segments in bulk when all of the segments in a megablock are freeable. After sweeping, we grab the free list, sort it, and find all groups of segments where they cover the megablock and free them. This introduces a period of time when free segments are not available to the mutator, but the risk that this would lead to excessive allocation is low. Right after sweep, we should have an abundance of partially full segments, and this pruning step is relatively quick. In implementing this we drop the logic that kept NONMOVING_MAX_FREE segments on the free list. We also introduce an eventlog event to log the amount of pruned/retained free segments. See Note [Segment allocation strategy] Resolves #24150 ------------------------- Metric Decrease: T13253 T19695 ------------------------- - - - - - 710665bd by Cheng Shao at 2024-05-17T01:35:30-04:00 rts: fix I/O manager compilation errors for win32 target This patch fixes I/O manager compilation errors for win32 target discovered when cross-compiling to win32 using recent clang: ``` rts/win32/ThrIOManager.c:117:7: error: error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | if (is_io_mng_native_p ()) { | ^ | 117 | if (is_io_mng_native_p ()) { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/fs.c:143:28: error: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 143 | int setErrNoFromWin32Error () { | ^ | void | 143 | int setErrNoFromWin32Error () { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:227:9: error: error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 227 | interruptIOManagerEvent (); | ^ | 227 | interruptIOManagerEvent (); | ^ rts/win32/ConsoleHandler.c:227:9: error: note: did you mean 'getIOManagerEvent'? | 227 | interruptIOManagerEvent (); | ^ rts/include/rts/IOInterface.h:27:10: error: note: 'getIOManagerEvent' declared here 27 | void * getIOManagerEvent (void); | ^ | 27 | void * getIOManagerEvent (void); | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:196:9: error: error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/win32/ConsoleHandler.c:196:9: error: note: did you mean 'postThreadLabel'? | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/eventlog/EventLog.h:118:6: error: note: 'postThreadLabel' declared here 118 | void postThreadLabel(Capability *cap, | ^ | 118 | void postThreadLabel(Capability *cap, | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) ``` - - - - - 28b9cee0 by Rodrigo Mesquita at 2024-05-17T01:36:05-04:00 configure: Check C99-compat for Cmm preprocessor Fixes #24815 - - - - - 8927e0c3 by Andreas Klebinger at 2024-05-17T01:36:41-04:00 Ensure `tcHasFixedRuntimeRep (# #)` returns True. - - - - - 04179044 by doyougnu at 2024-05-17T09:00:32-04:00 testsuite: make find_so regex less general Closes #24759 Background. In MR !12372 we began tracking shared object files and directories sizes for dependencies. However, this broke release builds because release builds alter the filenames swapping "in-place" for a hash. This was not considered in the MR and thus broke release pipelines. Furthermore, the rts_so test was found to be wildly varying and was therefore disabled in !12561. This commit fixes both of these issues: - fix the rts_so test by making the regex less general, now the rts_so test and all other foo.so tests must match "libHS<some-lib>-<version>-<hash|'in-place>-<ghc>". This prevents the rts_so test from accidentally matching different rts variants such as rts_threaded, which was the cause of the wild swings after !12372. - add logic to match either a hash or the string in-place. This should make the find_so function build agnostic. - - - - - 0962b50d by Andreas Klebinger at 2024-05-17T09:01:08-04:00 TagAnalysis: Treat all bottom ids as tagged during analysis. Ticket #24806 showed that we also need to treat dead end thunks as tagged during the analysis. - - - - - 7eb9f184 by Ben Gamari at 2024-05-17T11:23:37-04:00 Remove haddock submodule In preparation for merge into the GHC, as proposed in #23178. - - - - - 47b14dcc by Fendor at 2024-05-17T11:28:17-04:00 Adapt to `IfLclName` newtype changes (cherry picked from commit a711607e29b925f3d69e27c5fde4ba655c711ff1) - - - - - 6cc6681d by Fendor at 2024-05-17T11:28:17-04:00 Add IfaceType deduplication table to interface file serialisation Although we do not really need it in the interface file serialisation, as the deserialisation uses `getWithUserData`, we need to mirror the structure `getWithUserData` expects. Thus, we write essentially an empty `IfaceType` table at the end of the file, as the interface file doesn't reference `IfaceType`. (cherry picked from commit c9bc29c6a708483d2abc3d8ec9262510ce87ca61) - - - - - b9721206 by Ben Gamari at 2024-05-17T11:30:22-04:00 ghc-tags.yaml: Initial commit - - - - - 074e7d8f by Ben Gamari at 2024-05-17T11:31:29-04:00 fourmolu: Add configuration - - - - - 151b1736 by Ben Gamari at 2024-05-17T11:32:52-04:00 Makefile: Rework for use by haddock developers Previously the Makefile was present only for GHC's old make-based build system. Now since the make-based build system is gone we can use it for more useful ends. - - - - - a7dcf13b by Ben Gamari at 2024-05-17T11:36:14-04:00 Reformat with fourmolu Using previously-added configuration and `fourmolu -i .` Note that we exclude the test-cases (`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to formatting. - - - - - 0ea6017b by Ben Gamari at 2024-05-17T11:40:04-04:00 Add 'utils/haddock/' from commit 'a7dcf13bfbb97b20e75cc8ce650e2bb628db4660' git-subtree-dir: utils/haddock git-subtree-mainline: 7eb9f1849b1c72a1c61dee88462b4244550406f3 git-subtree-split: a7dcf13bfbb97b20e75cc8ce650e2bb628db4660 - - - - - aba1d304 by Hécate Moonlight at 2024-05-17T11:40:48-04:00 Add exceptions to the dangling notes list - - - - - 527bfbfb by Hécate Moonlight at 2024-05-17T11:40:52-04:00 Add haddock to the whitespace lint ignore list - - - - - 43274677 by Ben Gamari at 2024-05-17T11:41:20-04:00 git-blame-ignore-revs: Ignore haddock reformatting - - - - - 0e679e37 by Fendor at 2024-05-18T00:27:24-04:00 Pass cpp options to the CC builder in hadrian - - - - - bb40244e by Sylvain Henry at 2024-05-18T00:28:06-04:00 JS: fix allocation constant (fix #24746) - - - - - 646d30ab by Jade at 2024-05-18T19:23:31+02:00 Add highlighting for inline-code snippets in haddock - - - - - 64459a3e by Hécate Moonlight at 2024-05-19T08:42:27-04:00 haddock: Add a .readthedocs.yml file for online documentation - - - - - 7d3d9bbf by Serge S. Gulin at 2024-05-19T18:47:05+00:00 Unicode: General Category size test (related #24789) Added trivial size performance test which involves unicode general category usage via `read`. The `read` itself uses general category to detect spaces. The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789. - - - - - 8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00 EPA: Remove redundant code Remove unused epAnnAnns function various cases for showAstData that no longer exist - - - - - 071d7a1e by Rodrigo Mesquita at 2024-05-20T10:55:16-04:00 Improve docs on closed type families in hs-boots Fixes #24776 - - - - - d9e2c119 by Torsten Schmits at 2024-05-20T10:55:52-04:00 Use default deviation for large-project test This new performance test has the purpose of detecting regressions in complexity in relation to the number of modules in a project, so 1% deviation is way too small to avoid false positives. - - - - - 20b0136a by Ben Gamari at 2024-05-22T00:31:39-04:00 ghcup-metadata: Various fixes from 9.10.1 Use Debian 12/x86-64, Debian 10/aarch64, and Debian 11/aarch64 bindists where possible. - - - - - 6838a7c3 by Sylvain Henry at 2024-05-22T00:32:23-04:00 Reverse arguments to stgCallocBytes (fix #24828) - - - - - f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00 Add log messages for Iface serialisation compression level Fix the label of the number of 'IfaceType' entries in the log message. Add log message for the compression level that is used to serialise a an interface file. Adds `Outputable` instance for 'CompressionIFace'. - - - - - 3bad5d55 by Hécate Moonlight at 2024-05-22T00:33:40-04:00 base: Update doctests outputs ghc-internal: Update doctests outputs - - - - - 9317c6fb by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix the testsuites of the haddock-library - Apply all the metadata revisions from Hackage to the cabal file. - Fix the `ParserSpec.hs` file in the `spec` testsuite of haddock-library. - Make `CHANGES.md` an extra-doc-file instead of an extra-source-file. - - - - - 54073b02 by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix parser of @since pragma The testsuite contained tests for annotations of the form `@since foo-bar-0.5.0`, but the parser was written incorrectly. - - - - - ede6ede3 by Matthew Pickering at 2024-05-22T00:34:57-04:00 Fix nightly pages job It seems likely broken by 9f99126a which moved `index.html` from the root folder into `docs/` folder. Fixes #24840 - - - - - b7bcf729 by Cheng Shao at 2024-05-22T00:35:32-04:00 autoconf: remove unused context diff check This patch removes redundant autoconf check for the context diff program given it isn't actually been used anywhere, especially since make removal. - - - - - ea2fe66e by Hécate Moonlight at 2024-05-22T00:36:13-04:00 haddock: Rework the contributing guide - - - - - 0f302a94 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 haddock: Add module relationships diagrams of haddock-api and haddock-library - - - - - d1a9f34f by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add instructions - - - - - b880ee80 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add SVG outputs - - - - - 6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00 rts: Fix size of StgOrigThunkInfo frames Previously the entry code of the `stg_orig_thunk` frame failed to account for the size of the profiling header as it hard-coded the frame size. Fix this. Fixes #24809. - - - - - c645fe40 by Fendor at 2024-05-22T13:40:05-04:00 Add regression test T24809 for stg_orig_thunk_info_frame size - - - - - 4181aa40 by Andreas Klebinger at 2024-05-22T13:40:42-04:00 bindists: Check for existence of share folder before trying to copy it. This folder isn't distributed in windows bindists A lack of doing so resulted us copying loads of files twice. - - - - - d216510e by Matthew Pickering at 2024-05-22T13:40:42-04:00 Remove ad-hoc installation of mingw toolchain in relocatable bindists This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951 The choice about whether to install mingw is taken in the installation makefile. This is also broken on non-windows systems. The actual issue was the EnableDistroToolchain variable wasn't declared in mk/config.mk and therefore the check to install mingw was failing. - - - - - 7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04:00 testsuite: fix T17920 for wasm backend T17920 was marked as fragile on wasm before; it can be trivially fixed by avoiding calling variadic printf() in cmm. - - - - - c739383b by Cheng Shao at 2024-05-22T21:53:29-04:00 testsuite: bump T22744 timeout to 5x - - - - - c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00 testsuite: don't attempt to detect host cpu features when testing cross ghc The testsuite driver CPU feature detection logic only detects host CPU and only makes sense when we are not testing a cross GHC. - - - - - 3d9e4ce6 by Simon Peyton Jones at 2024-05-22T21:54:43-04:00 Better skolemisation As #24810 showed, it is (a little) better to skolemise en-bloc, so that Note [Let-bound skolems] fires more often. See Note [Skolemisation en bloc] in GHC.Tc.Utils.Instantiate. - - - - - a3cd3a1d by Ryan Scott at 2024-05-22T21:55:19-04:00 Add missing parenthesizePat in cvtp We need to ensure that the output of `cvtp` is parenthesized (at precedence `sigPrec`) so that any pattern signatures with a surrounding pattern signature can parse correctly. Fixes #24837. - - - - - 4bb2a7cc by Hécate Moonlight at 2024-05-22T21:55:59-04:00 [base] Document the memory overhead of ByteArray Add a diagram that shows the constituent parts of a ByteArray and their memory overhead. - - - - - 8b2a016a by Hécate Moonlight at 2024-05-22T21:56:38-04:00 Haddock: Add MR template for Haddock - - - - - ead75532 by Peter Trommler at 2024-05-23T02:28:05-04:00 PPC: Support ELF v2 on powerpc64 big-endian Detect ELF v2 on PowerPC 64-bit systems. Check for `_CALL_ELF` preprocessor macro. Fixes #21191 - - - - - 9d4c10f2 by Hécate Kleidukos at 2024-05-23T02:28:44-04:00 gitlab: Add @Kleidukos to CODEOWNERS for utils/haddock - - - - - 28e64170 by Preetham Gujjula at 2024-05-23T07:20:48-04:00 haddock: Add cabal-fmt to tools for `make style` - - - - - 00126a89 by Andrei Borzenkov at 2024-05-23T07:21:24-04:00 haddock: fix verbosity option parsing - - - - - a3e0b68b by Ryan Hendrickson at 2024-05-23T15:52:03-04:00 base: specify tie-breaking behavior of min, max, and related list/Foldable functions - - - - - bdcc0f37 by doyougnu at 2024-05-24T07:51:18-04:00 cmm: add word <-> double/float bitcast - closes: #25331 This is the last step in the project plan described in #25331. This commit: - adds bitcast operands for x86_64, LLVM, aarch64 - For PPC and i386 we resort to using the cmm implementations - renames conversion MachOps from Conv to Round|Truncate - - - - - f0d257f7 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor Some functions in StgToByteCode were filtering out void arguments. However, StgToByteCode is called after unarisation: the void arguments should have been removed earlier. Instead of filtering out, we assert that the args are non-void. - - - - - 03137fd2 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor `layoutNativeCall` was always called with a `primRepCmmType platform` callback. Hence we can put it inside of `layoutNativeCall` rather than repeat it. - - - - - 27c430f3 by David Binder at 2024-05-24T07:52:38-04:00 haddock: Remove compatibility shims for GHC < 8.4 from haddock-library - - - - - 8dd8a076 by Cheng Shao at 2024-05-24T07:53:14-04:00 compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs This patch makes the STG->Cmm backend avoid saving foreign call target to local when there are no caller-save GlobalRegs. Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a foreign call, we unconditionally save the foreign call target to a temporary local first, then rely on cmmSink to clean it up later, which only happens with -fcmm-sink (implied by -O) and not in unoptimized code. And this is troublesome for the wasm backend NCG, which needs to infer a foreign call target symbol's type signature from the Cmm call site. Previously, the NCG has been emitting incorrect type signatures for unoptimized code, which happens to work with `wasm-ld` most of the time, but this is never future-proof against upstream toolchain updates, and it causes horrible breakages when LTO objects are included in linker input. Hence this patch. - - - - - 986df1ab by Cheng Shao at 2024-05-24T07:53:14-04:00 testsuite: add callee-no-local regression test - - - - - 52d62e2a by Sylvain Henry at 2024-05-24T07:53:57-04:00 Fix HasCallStack leftovers from !12514 / #24726 - - - - - c5e00c35 by crumbtoo at 2024-05-24T07:54:38-04:00 user_guide: Fix typo in MultiWayIf chapter Close #24829 - - - - - bd323b0e by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Ensure that CHANGELOG is included in extra-source-files This was missed in the `ghc-internal` split. Closes #24831. - - - - - 1bfd32e8 by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Fix changelog reference to setBacktraceMechanismState (cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d) - - - - - 43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00 Float/double unboxed literal support for HexFloatLiterals (fix #22155) - - - - - 4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00 Improve test labels for binary interface file size tests Test labels for binary interface file sizes are hard to read and overly verbose at the same time. Extend the name for the metric title, but shorten it in the actual comparison table. - - - - - 14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00 Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present" This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa. - - - - - f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00 Fix default hyperlinked sources pattern Previously this didn't include the `%M` token which manifested as broken links to the hyperlinked sources of reexports of declarations defined in other packages. Fixes haddock#1628. (cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36) - - - - - 42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00 Make DocPaths a proper data type (cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c) - - - - - 53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00 haddock: Bump version to 2.30 (cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602) - - - - - e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00 haddock-api: allow base 4.20 and ghc 9.11 - - - - - e294f7a2 by PHO at 2024-05-24T12:17:55-04:00 Add a flag "threaded" for building haddock with the threaded RTS GHC isn't guaranteed to have a threaded RTS. There should be a way to build it with the vanilla one. (cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d) - - - - - 51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00 Update ticky counter event docs. Add the info about the info table address and json fields. Fixes #23200 - - - - - 98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00 Export extractPromotedList (#24866) This can be useful in plugins. - - - - - 228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00 template-haskell: Move wired-ins to ghc-internal Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so ------------------------- - - - - - 62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00 testsuite: mark tests broken by #24886 Now that `template-haskell` is no longer wired-in. These tests are triggering #24886, and so need to be marked broken. - - - - - 3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00 rts: fix missing function prototypes in ClosureMacros.h - - - - - e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00 UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful. - - - - - d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00 ci: Update ci-images commit for fedora38 image The fedora38 nightly job has been failing for quite a while because `diff` was no longer installed. The ci-images bump explicitly installs `diffutils` into these images so hopefully they now pass again. - - - - - 3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00 Update exactprint docs - - - - - 77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00 Incorporate review feedback - - - - - 87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00 Remove no longer relevant reference to comments - - - - - 05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00 Replace outdated code example - - - - - 45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00 Reword error resulting from missing -XBangPatterns. It can be the result of either a bang pattern or strict binding, so now we say so instead of claiming it must be a bang pattern. Fixes #21032 - - - - - e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00 testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x - - - - - 7a660042 by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: ensure gc_thread/gen_workspace is allocated with proper alignment gc_thread/gen_workspace are required to be aligned by 64 bytes. However, this property has not been properly enforced before, and numerous alignment violations at runtime has been caught by UndefinedBehaviorSanitizer that look like: ``` rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment 0x0000027a3390: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8 rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment 0x0000027a3450: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13 ``` This patch fixes the gc_thread/gen_workspace misalignment issue by explicitly allocating them with alignment constraint. - - - - - c77a48af by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: fix an unaligned load in nonmoving gc This patch fixes an unaligned load in nonmoving gc by ensuring the closure address is properly untagged first before attempting to prefetch its header. The unaligned load is reported by UndefinedBehaviorSanitizer: ``` rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment 0x0042005f3a71: note: pointer points here 00 00 00 98 43 13 8e 12 7f 00 00 50 3c 5f 00 42 00 00 00 58 17 b7 92 12 7f 00 00 89 cb 5e 00 42 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9 ``` This issue had previously gone unnoticed since it didn't really harm runtime correctness, the invalid header address directly loaded from a tagged pointer is only used as prefetch address and will not cause segfaults. However, it still should be corrected because the prefetch would be rendered useless by this issue, and untagging only involves a single bitwise operation without memory access so it's cheap enough to add. - - - - - 05c4fafb by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: use __builtin_offsetof to implement STG_FIELD_OFFSET This patch fixes the STG_FIELD_OFFSET macro definition by using __builtin_offsetof, which is what gcc/clang uses to implement offsetof in standard C. The previous definition that uses NULL pointer involves subtle undefined behavior in C and thus reported by UndefinedBehaviorSanitizer as well: ``` rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58 ``` - - - - - 5ff83bfc by Sylvain Henry at 2024-05-30T14:43:10-04:00 JS: remove useless h$CLOCK_REALTIME (#23202) - - - - - 95ef2d58 by Matthew Pickering at 2024-05-30T14:43:47-04:00 ghcup-metadata: Fix metadata generation There were some syntax errors in the generation script which were preventing it from running. I have tested this with: ``` nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525 ``` which completed successfully. - - - - - 1bc66ee4 by Jakob Bruenker at 2024-05-30T14:44:22-04:00 Add diagrams to Arrows documentation This adds diagrams to the documentation of Arrows, similar to the ones found on https://www.haskell.org/arrows/. It does not add diagrams for ArrowChoice for the time being, mainly because it's not clear to me how to visually distinguish them from the ones for Arrow. Ideally, you might want to do something like highlight the arrows belonging to the same tuple or same Either in common colors, but that's not really possible with unicode. - - - - - d10a1c65 by Matthew Craven at 2024-05-30T23:35:48-04:00 Make UnsafeSNat et al. into pattern synonyms ...so that they do not cause coerce to bypass the nominal role on the corresponding singleton types when they are imported. See Note [Preventing unsafe coercions for singleton types] and the discussion at #23478. This also introduces unsafeWithSNatCo (and analogues for Char and Symbol) so that users can still access the dangerous coercions that importing the real constructors would allow, but only in a very localized way. - - - - - 0958937e by Cheng Shao at 2024-05-30T23:36:25-04:00 hadrian: build C/C++ with split sections when enabled When split sections is enabled, ensure -fsplit-sections is passed to GHC as well when invoking GHC to compile C/C++; and pass -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++ with the hadrian Cc builder. Fixes #23381. - - - - - 02b1f91e by Cheng Shao at 2024-05-30T23:36:25-04:00 driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled When -fsplit-sections is passed to GHC, pass -ffunction-sections -fdata-sections to gcc/clang when building C/C++. Previously, -fsplit-sections was only respected by the NCG/LLVM backends, but not the unregisterised backend; the GHC driver did not pass -fdata-sections and -ffunction-sections to the C compiler, which resulted in excessive executable sizes. Fixes #23381. ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - fd47e2e3 by Cheng Shao at 2024-05-30T23:37:00-04:00 testsuite: mark process005 as fragile on JS - - - - - 34a04ea1 by Matthew Pickering at 2024-05-31T06:08:36-04:00 Add -Wderiving-typeable to -Wall Deriving `Typeable` does nothing, and it hasn't done for a long while. There has also been a warning for a long while which warns you about uselessly deriving it but it wasn't enabled in -Wall. Fixes #24784 - - - - - 75fa7b0b by Matthew Pickering at 2024-05-31T06:08:36-04:00 docs: Fix formatting of changelog entries - - - - - 303c4b33 by Preetham Gujjula at 2024-05-31T06:09:21-04:00 docs: Fix link to injective type families paper Closes #24863 - - - - - df97e9a6 by Ben Gamari at 2024-05-31T06:09:57-04:00 ghc-internal: Fix package description The previous description was inherited from `base` and was inappropriate for `ghc-internal`. Also fix the maintainer and bug reporting fields. Closes #24906. - - - - - bf0737c0 by Cheng Shao at 2024-05-31T06:10:33-04:00 compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans This patch removes special consideration for ArchWasm32 in cmmDoCmmSwitchPlans, which means the compiler will now disable cmmImplementSwitchPlans for wasm unreg backend, just like unreg backend of other targets. We enabled it in the past to workaround some compile-time panic in older versions of LLVM, but those panics are no longer present, hence no need to keep this workaround. - - - - - 7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00 utils: add hie.yaml config file for ghc-config Add hie.yaml to ghc-config project directory so it can be edited using HLS. - - - - - 1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00 hadrian: handle findExecutable "" gracefully hadrian may invoke findExecutable "" at run-time due to a certain program is not found by configure script. Which is fine and findExecutable is supposed to return Nothing in this case. However, on Windows there's a directory bug that throws an exception (see https://github.com/haskell/directory/issues/180), so we might as well use a wrapper for findExecutable and handle exceptions gracefully. - - - - - 4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00 configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails When configure fails to find LLC/OPT/LLVMAS within supported version range, it used to set "llc"/"opt"/"clang" as fallback values. This behavior is particularly troublesome when the user has llc/opt/clang with other versions in their PATH and run the testsuite, since hadrian will incorrectly assume have_llvm=True and pass that to the testsuite driver, resulting in annoying optllvm test failures (#23186). If configure determines llc/opt/clang wouldn't work, then we shouldn't pretend it'll work at all, and the bindist configure will invoke FIND_LLVM_PROG check again at install time anyway. - - - - - 5f1afdf7 by Sylvain Henry at 2024-05-31T15:52:52-04:00 Introduce UniqueSet and use it to replace 'UniqSet Unique' 'UniqSet Unique' represents a set of uniques as a 'Map Unique Unique', which is wasting space (associated key/value are always the same). Fix #23572 and #23605 - - - - - e0aa42b9 by crumbtoo at 2024-05-31T15:53:33-04:00 Improve template-haskell haddocks Closes #15822 - - - - - ae170155 by Olivier Benz at 2024-06-01T09:35:17-04:00 Bump max LLVM version to 19 (not inclusive) - - - - - 92aa65ea by Matthew Pickering at 2024-06-01T09:35:17-04:00 ci: Update CI images to test LLVM 18 The debian12 image in this commit has llvm 18 installed. - - - - - adb1fe42 by Serge S. Gulin at 2024-06-01T09:35:53-04:00 Unicode: make ucd2haskell build-able again ucd2haskell tool used streamly library which version in cabal was out of date. It is updated to the latest version at hackage with deprecated parts rewritten. Also following fixes were applied to existing code in suppose that from its last run the code structure was changed and now it was required to be up to date with actual folder structures: 1. Ghc module path environment got a suffix with `src`. 2. Generated code got 2.1 `GHC.Internal` prefix for `Data.*`. 2.2 `GHC.Unicode.Internal` swapped on `GHC.Internal.Unicode` according to actual structure. - - - - - ad56fd84 by Jade at 2024-06-01T09:36:29-04:00 Replace 'NB' with 'Note' in error messages - - - - - 6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00 compiler: fix -ddump-cmm-raw when compiling .cmm This patch fixes missing -ddump-cmm-raw output when compiling .cmm, which is useful for debugging cmm related codegen issues. - - - - - 1c834ad4 by Ryan Scott at 2024-06-01T09:37:40-04:00 Print namespace specifiers in FixitySig's Outputable instance For whatever reason, the `Outputable` instance for `FixitySig` simply did not print out namespace specifiers, leading to the confusing `-ddump-splices` output seen in #24911. This patch corrects this oversight. Fixes #24911. - - - - - cf49fb5f by Sylvain Henry at 2024-06-01T09:38:19-04:00 Configure: display C++ compiler path - - - - - f9c1ae12 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable PIC for in-tree GMP on wasm32 This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. - - - - - 1a32f828 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable in-tree gmp fft code path for wasm32 This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. - - - - - 06277d56 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: build in-tree GMP with malloc-notreentrant on wasm32 This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. - - - - - 9f614270 by ARATA Mizuki at 2024-06-02T14:02:35-04:00 Set package include paths when assembling .S files Fixes #24839. Co-authored-by: Sylvain Henry <hsyl20 at gmail.com> - - - - - 4998a6ed by Alex Mason at 2024-06-03T02:09:29-04:00 Improve performance of genericWordQuotRem2Op (#22966) Implements the algorithm from compiler-rt's udiv128by64to64default. This rewrite results in a roughly 24x improvement in runtime on AArch64 (and likely any other arch that uses it). - - - - - ae50a8eb by Cheng Shao at 2024-06-03T02:10:05-04:00 testsuite: mark T7773 as fragile on wasm - - - - - c8ece0df by Fendor at 2024-06-03T19:43:22-04:00 Migrate `Finder` component to `OsPath`, fixed #24616 For each module in a GHCi session, we keep alive one `ModLocation`. A `ModLocation` is fairly inefficiently packed, as `String`s are expensive in memory usage. While benchmarking the agda codebase, we concluded that we keep alive around 11MB of `FilePath`'s, solely retained by `ModLocation`. We provide a more densely packed encoding of `ModLocation`, by moving from `FilePath` to `OsPath`. Further, we migrate the full `Finder` component to `OsPath` to avoid unnecessary transformations. As the `Finder` component is well-encapsulated, this requires only a minimal amount of changes in other modules. We introduce pattern synonym for 'ModLocation' which maintains backwards compatibility and avoids breaking consumers of 'ModLocation'. - - - - - 0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00 compiler: emit NaturallyAligned when element type & index type are the same width This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. - - - - - 18f63970 by Sebastian Graf at 2024-06-04T05:05:27-04:00 Parser: Remove unused `apats` rule - - - - - 38757c30 by David Knothe at 2024-06-04T05:05:27-04:00 Implement Or Patterns (#22596) This commit introduces a new language extension, `-XOrPatterns`, as described in GHC Proposal 522. An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ..., `patk` succeed, in this order. See also the summary `Note [Implmentation of OrPatterns]`. Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> - - - - - 395412e8 by Cheng Shao at 2024-06-04T05:06:04-04:00 compiler/ghci/rts: remove stdcall support completely We have formally dropped i386 windows support (#18487) a long time ago. The stdcall foreign call convention is only used by i386 windows, and the legacy logic around it is a significant maintenance burden for future work that adds arm64 windows support (#24603). Therefore, this patch removes stdcall support completely from the compiler as well as the RTS (#24883): - stdcall is still recognized as a FFI calling convention in Haskell syntax. GHC will now unconditionally emit a warning (-Wunsupported-calling-conventions) and treat it as ccall. - Apart from minimum logic to support the parsing and warning logic, all other code paths related to stdcall has been completely stripped from the compiler. - ghci only supports FFI_DEFAULT_ABI and ccall convention from now on. - FFI foreign export adjustor code on all platforms no longer handles the stdcall case and only handles ccall from now on. - The Win32 specific parts of RTS no longer has special code paths for stdcall. This commit is the final nail on the coffin for i386 windows support. Further commits will perform more housecleaning to strip the legacy code paths and pave way for future arm64 windows support. - - - - - d1fe9ab6 by Cheng Shao at 2024-06-04T05:06:04-04:00 rts: remove legacy i386 windows code paths This commit removes some legacy i386 windows related code paths in the RTS, given this target is no longer supported. - - - - - a605e4b2 by Cheng Shao at 2024-06-04T05:06:04-04:00 autoconf: remove i386 windows related logic This commit removes legacy i386 windows logic in autoconf scripts. - - - - - 91e5ac5e by Cheng Shao at 2024-06-04T05:06:04-04:00 llvm-targets: remove i386 windows support This commit removes i386 windows from llvm-targets and the script to generate it. - - - - - 65fe75a4 by Cheng Shao at 2024-06-04T05:06:04-04:00 libraries/utils: remove stdcall related legacy logic This commit removes stdcall related legacy logic in libraries and utils. ccall should be used uniformly for all supported windows hosts from now on. - - - - - d2a83302 by Cheng Shao at 2024-06-04T05:06:04-04:00 testsuite: adapt the testsuite for stdcall removal This patch adjusts test cases to handle the stdcall removal: - Some stdcall usages are replaced with ccall since stdcall doesn't make sense anymore. - We also preserve some stdcall usages, and check in the expected warning messages to ensure GHC always warn about stdcall usages (-Wunsupported-calling-conventions) as expected. - Error code testsuite coverage is slightly improved, -Wunsupported-calling-conventions is now tested. - Obsolete code paths related to i386 windows are also removed. - - - - - cef8f47a by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: minor adjustments for stdcall removal This commit include minor adjustments of documentation related to stdcall removal. - - - - - 54332437 by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: mention i386 Windows removal in 9.12 changelog This commit mentions removal of i386 Windows support and stdcall related change in the 9.12 changelog. - - - - - 2aaea8a1 by Cheng Shao at 2024-06-04T05:06:40-04:00 hadrian: improve user settings documentation This patch adds minor improvements to hadrian user settings documentation: - Add missing `ghc.cpp.opts` case - Remove non-existent `cxx` case - Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't - Add example of passing configure argument to autoconf packages - - - - - 71010381 by Alex Mason at 2024-06-04T12:09:07-04:00 Add AArch64 CLZ, CTZ, RBIT primop implementations. Adds support for emitting the clz and rbit instructions, which are used by GHC.Prim.clz*#, GHC.Prim.ctz*# and GHC.Prim.bitReverse*#. - - - - - 44e2abfb by Cheng Shao at 2024-06-04T12:09:43-04:00 hadrian: add +text_simdutf flavour transformer to allow building text with simdutf This patch adds a +text_simdutf flavour transformer to hadrian to allow downstream packagers and users that build from source to opt-in simdutf support for text, in order to benefit from SIMD speedup at run-time. It's still disabled by default for the time being. - - - - - 077cb2e1 by Cheng Shao at 2024-06-04T12:09:43-04:00 ci: enable +text_simdutf flavour transformer for wasm jobs This commit enables +text_simdutf flavour transformer for wasm jobs, so text is now built with simdutf support for wasm. - - - - - b23746ad by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Use TemplateHaskellQuotes in instance Lift ByteArray Resolves #24852 - - - - - 3fd25743 by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Mark addrToByteArray as NOINLINE This function should never be inlined in order to keep code size small. - - - - - 98ad1ea5 by Cheng Shao at 2024-06-04T22:51:26-04:00 compiler: remove unused CompilerInfo/LinkerInfo types This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. - - - - - 11795244 by Cheng Shao at 2024-06-05T06:33:17-04:00 rts: remove unused PowerPC/IA64 native adjustor code This commit removes unused PowerPC/IA64 native adjustor code which is never actually enabled by autoconf/hadrian. Fixes #24920. - - - - - 5132754b by Sylvain Henry at 2024-06-05T06:33:57-04:00 RTS: fix warnings with doing*Profiling (#24918) - - - - - accc8c33 by Cheng Shao at 2024-06-05T11:35:36-04:00 hadrian: don't depend on inplace/mingw when --enable-distro-toolchain on Windows - - - - - 6ffbd678 by Cheng Shao at 2024-06-05T11:35:37-04:00 autoconf: normalize paths of some build-time dependencies on Windows This commit applies path normalization via cygpath -m to some build-time dependencies on Windows. Without this logic, the /clang64/bin prefixed msys2-style paths cause the build to fail with --enable-distro-toolchain. - - - - - 075dc6d4 by Cheng Shao at 2024-06-05T11:36:12-04:00 hadrian: remove OSDarwin mention from speedHack This commit removes mentioning of OSDarwin from speedHack, since speedHack is purely for i386 and we no longer support i386 darwin (#24921). - - - - - 83235c4c by Cheng Shao at 2024-06-05T11:36:12-04:00 compiler: remove 32-bit darwin logic This commit removes all 32-bit darwin logic from the compiler, given we no longer support 32-bit apple systems (#24921). Also contains a bit more cleanup of obsolete i386 windows logic. - - - - - 1eb99bc3 by Cheng Shao at 2024-06-05T11:36:12-04:00 rts: remove 32-bit darwin/ios logic This commit removes 32-bit darwin/ios related logic from the rts, given we no longer support them (#24921). - - - - - 24f65892 by Cheng Shao at 2024-06-05T11:36:12-04:00 llvm-targets: remove 32-bit darwin/ios targets This commit removes 32-bit darwin/ios targets from llvm-targets given we no longer support them (#24921). - - - - - ccdbd689 by Cheng Shao at 2024-06-05T11:36:12-04:00 testsuite: remove 32-bit darwin logic This commit removes 32-bit darwin logic from the testsuite given it's no longer supported (#24921). Also contains more cleanup of obsolete i386 windows logic. - - - - - 11d661c4 by Cheng Shao at 2024-06-05T11:36:13-04:00 docs: mention 32-bit darwin/ios removal in 9.12 changelog This commit mentions removal of 32-bit darwin/ios support (#24921) in the 9.12 changelog. - - - - - 7c173310 by Georgi Lyubenov at 2024-06-05T15:17:22-04:00 Add firstA and secondA to Data.Bitraversable Please see https://github.com/haskell/core-libraries-committee/issues/172 for related discussion - - - - - 3b6f9fd1 by Ben Gamari at 2024-06-05T15:17:59-04:00 base: Fix name of changelog Fixes #24899. Also place it under `extra-doc-files` to better reflect its nature and avoid triggering unnecessary recompilation if it changes. - - - - - 1f4d2ef7 by Sebastian Graf at 2024-06-05T15:18:34-04:00 Announce Or-patterns in the release notes for GHC 9.12 (#22596) Leftover from !9229. - - - - - 8650338d by Jan Hrček at 2024-06-06T10:39:24-04:00 Improve haddocks of Language.Haskell.Syntax.Pat.Pat - - - - - 2eee65e1 by Cheng Shao at 2024-06-06T10:40:00-04:00 testsuite: bump T7653 timeout for wasm - - - - - 990fed60 by Sylvain Henry at 2024-06-07T14:45:23-04:00 StgToCmm: refactor opTranslate and friends - Change arguments order to avoid `\args -> ...` lambdas - Fix documentation - Rename StgToCmm options ("big" doesn't mean anything) - - - - - 1afad514 by Sylvain Henry at 2024-06-07T14:45:23-04:00 NCG x86: remove dead code (#5444) Since 6755d833af8c21bbad6585144b10e20ac4a0a1ab this code is dead. - - - - - 595c0894 by Cheng Shao at 2024-06-07T14:45:58-04:00 testsuite: skip objc-hi/objcxx-hi when cross compiling objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. - - - - - edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - 56b79d9e by Cheng Shao at 2024-11-09T00:26:44+00:00 ci: add x86_64-linux-ubuntu24_04 nightly/release jobs - - - - - 10 changed files: - .ghcid - + .git-blame-ignore-revs - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dbacdb856abf0e3d6d79b7570178a55e7d07bb32...56b79d9ea60768e0e85aebef791041d7befb65cc -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dbacdb856abf0e3d6d79b7570178a55e7d07bb32...56b79d9ea60768e0e85aebef791041d7befb65cc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 00:28:10 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Fri, 08 Nov 2024 19:28:10 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/ubuntu24_04-ci Message-ID: <672eac9aab1e9_27b05e8a26cc67962@gitlab.mail> Cheng Shao pushed new branch wip/ubuntu24_04-ci at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/ubuntu24_04-ci You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 02:32:00 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 08 Nov 2024 21:32:00 -0500 Subject: [Git][ghc/ghc][wip/T25445] More improvements Message-ID: <672ec9a076364_24465d1b1944440cc@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445 at Glasgow Haskell Compiler / GHC Commits: 6cad3ad1 by Simon Peyton Jones at 2024-11-09T02:31:17+00:00 More improvements - - - - - 1 changed file: - compiler/GHC/Core/Lint.hs Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -96,7 +96,6 @@ import qualified GHC.Utils.Error as Err import GHC.Utils.Logger import GHC.Data.Pair -import GHC.Data.Maybe( orElse ) import GHC.Base (oneShot) import GHC.Data.Unboxed @@ -108,6 +107,14 @@ import Data.IntMap.Strict ( IntMap ) import qualified Data.IntMap.Strict as IntMap ( lookup, keys, empty, fromList ) {- + +ToDo: notes + +* We do not bother to clone non-CoVar Ids at all +* The Subst deals only in TyCoVars; Non-CoVarIds do not even live in the InScope set +* For Ids, the le_in_vars envt gives the OutType of the Id + + Note [Core Lint guarantee] ~~~~~~~~~~~~~~~~~~~~~~~~~~ Core Lint is the type-checker for Core. Using it, we get the following guarantee: @@ -1031,7 +1038,7 @@ lintIdOcc in_id nargs -- (Maybe a) from the binding site with bogus (Maybe a1) from -- the occurrence site. Comparing un-substituted types finesses -- this altogether - ; lintVarOcc in_id + ; out_ty <- lintVarOcc in_id -- Check for a nested occurrence of the StaticPtr constructor. -- See Note [Checking StaticPtrs]. @@ -1046,38 +1053,11 @@ lintIdOcc in_id nargs Nothing -> return () Just dc -> checkTypeDataConOcc "expression" dc + ; checkJoinOcc in_id nargs + ; usage <- varCallSiteUsage in_id - -- lintVarOcc has already checked that the Id is in scope - ; in_scope <- getInScope - ; let out_id = lookupInScope in_scope in_id `orElse` in_id - -- It might not be there at all if the freshening - -- substitution is empty - - ; check_bad_global out_id - ; checkJoinOcc out_id nargs + ; return (out_ty, usage) } - ; usage <- varCallSiteUsage out_id - ; return (idType out_id, usage) } - - where - -- 'check_bad_global' checks for the case where an /occurrence/ is - -- a GlobalId, but there is an enclosing binding fora a LocalId. - -- NB: the in-scope variables are mostly LocalIds, checked by lintIdBndr, - -- but GHCi adds GlobalIds from the interactive context. These - -- are fine; hence the test (isLocalId id == isLocalId v) - -- NB: when compiling Control.Exception.Base, things like absentError - -- are defined locally, but appear in expressions as (global) - -- wired-in Ids after worker/wrapper - -- So we simply disable the test in this case - check_bad_global out_id_bndr - | isGlobalId in_id - , isLocalId out_id_bndr - , not (isWiredIn in_id) - = failWithL $ hang (text "Occurrence is GlobalId, but binding is LocalId") - 2 (vcat [ hang (text "occurrence:") 2 $ pprBndr LetBind in_id - , hang (text "binder :") 2 $ pprBndr LetBind out_id_bndr ]) - | otherwise - = return () lintCoreFun :: CoreExpr @@ -1947,13 +1927,6 @@ checkTyCon :: TyCon -> LintM () checkTyCon tc = checkL (not (isTcTyCon tc)) (text "Found TcTyCon:" <+> ppr tc) -------------------- -checkTyCoVarInScope :: Subst -> TyCoVar -> LintM () -checkTyCoVarInScope subst tcv - = checkL (tcv `isInScope` subst) $ - hang (text "The type or coercion variable" <+> pprBndr LetBind tcv) - 2 (text "is out of scope") - ------------------- lintType :: InType -> LintM OutType -- The OutType is just the substitution applied to the InType @@ -1971,7 +1944,7 @@ lintType (TyVarTy tv) = failWithL (mkBadTyVarMsg tv) | otherwise - = do { lintVarOcc tv + = do { _ <- lintVarOcc tv -- In GHCi we may lint an expression with a free -- type variable. Then it won't be in the -- substitution, but it should be in scope @@ -2359,15 +2332,14 @@ lintCoercion (CoVarCo cv) 2 (text "With offending type:" <+> ppr (varType cv))) | otherwise -- C.f. lintType (TyVarTy tv), which has better docs - = do { lintVarOcc cv + = do { _ <- lintVarOcc cv ; subst <- getSubst ; case lookupCoVar subst cv of Just linted_co -> return (linted_co, role, lty, rty) where (Pair lty rty, role) = coercionKindRole linted_co - Nothing -> do { checkTyCoVarInScope subst cv - ; return (CoVarCo cv, role, lty, rty) } + Nothing -> return (CoVarCo cv, role, lty, rty) where (lty, rty, role) = coVarTypesRole cv } @@ -2980,9 +2952,13 @@ data LintEnv , le_loc :: [LintLocInfo] -- Locations , le_subst :: Subst -- Current freshening substitution + -- for TyCoVars only. Non-CoVar Ids don't + -- appear in here, not even in the InScopeSet - , le_in_vars :: VarEnv InVar -- Domain is InVar; all in-scope variables are here - -- Maps an InVar (i.e. its unique) to its binding InVar + , le_in_vars :: VarEnv (InVar, OutType) + -- Domain is InVar; all in-scope variables are here + -- Maps an InVar (i.e. its unique) to its binding InVar + -- and to its OutType , le_joins :: IdSet -- Join points in scope that are valid @@ -3346,7 +3322,7 @@ initL cfg m vars = l_vars cfg env = LE { le_flags = l_flags cfg , le_subst = mkEmptySubst (mkInScopeSetList vars) - , le_in_vars = mkVarEnv [ (v,v) | v <- vars ] + , le_in_vars = mkVarEnv [ (v,(v, varType v)) | v <- vars ] , le_joins = emptyVarSet , le_loc = [] , le_ue_aliases = emptyNameEnv @@ -3439,20 +3415,21 @@ addInScopeId in_id out_ty thing_inside where add env@(LE { le_in_vars = id_vars, le_joins = join_set , le_ue_aliases = aliases, le_subst = subst }) - | isEmptyTCvSubst subst = (in_id, env1 { le_subst = subst `delSubstInScope` in_id }) - | otherwise = (out_id, env1 { le_subst = subst `extendSubstInScope` out_id}) - -- isEmptyTCvSubst: short-cut when the types of in_id and out_id are identical + = (out_id, env1) where env1 = env { le_in_vars = in_vars', le_joins = join_set', le_ue_aliases = aliases' } - in_vars' = extendVarEnv id_vars in_id in_id + in_vars' = extendVarEnv id_vars in_id (in_id, out_ty) aliases' = delFromNameEnv aliases (idName in_id) -- aliases': when shadowing an alias, we need to make sure the -- Id is no longer classified as such. E.g. -- let x = in case x of x { _DEFAULT -> } -- Occurrences of 'x' in e2 shouldn't count as occurrences of e1. - out_id = setIdType in_id out_ty + -- A very tiny optimisation, not sure if it's really worth it + -- Short-cut when the substitution is a no-op + out_id | isEmptyTCvSubst subst = in_id + | otherwise = setIdType in_id out_ty join_set' | isJoinId out_id = extendVarSet join_set in_id -- Overwrite with new arity @@ -3462,7 +3439,7 @@ addInScopeTyCoVar :: InTyCoVar -> OutType -> (OutTyCoVar -> LintM a) -> LintM a addInScopeTyCoVar tcv tcv_type' thing_inside = LintM $ \ env@(LE { le_in_vars = in_vars, le_subst = subst }) errs -> let (tcv', subst') = subst_bndr subst tcv tcv_type' - env' = env { le_in_vars = extendVarEnv in_vars tcv tcv + env' = env { le_in_vars = extendVarEnv in_vars tcv (tcv, tcv_type') , le_subst = subst' } in unLintM (thing_inside tcv') env' errs where @@ -3475,7 +3452,7 @@ addInScopeTyCoVar tcv tcv_type' thing_inside where in_scope = substInScopeSet subst -getInVarEnv :: LintM (VarEnv InId) +getInVarEnv :: LintM (VarEnv (InId, OutType)) getInVarEnv = LintM (\env errs -> fromBoxedLResult (Just (le_in_vars env), errs)) extendTvSubstL :: TyVar -> Type -> LintM a -> LintM a @@ -3503,19 +3480,19 @@ getUEAliases = LintM (\ env errs -> fromBoxedLResult (Just (le_ue_aliases env), getInScope :: LintM InScopeSet getInScope = LintM (\ env errs -> fromBoxedLResult (Just (substInScopeSet $ le_subst env), errs)) -lintVarOcc :: InVar -> LintM () +lintVarOcc :: InVar -> LintM OutType -- Checks two things: -- a) that it is in scope -- b) that the type at the ocurrences matches the type at the binding site lintVarOcc v_occ - | isGlobalId v_occ - = return () - | otherwise = do { in_var_env <- getInVarEnv ; case lookupVarEnv in_var_env v_occ of - Nothing -> failWithL (text pp_what <+> quotes (ppr v_occ) <+> text "is out of scope") - Just v_bndr -> ensureEqTys occ_ty bndr_ty $ - mkBndrOccTypeMismatchMsg v_occ bndr_ty occ_ty + Nothing | isGlobalId v_occ -> return (idType v_occ) + | otherwise -> failWithL (text pp_what <+> quotes (ppr v_occ) <+> text "is out of scope") + Just (v_bndr, out_ty) -> do { check_bad_global v_bndr + ; ensureEqTys occ_ty bndr_ty $ + mkBndrOccTypeMismatchMsg v_occ bndr_ty occ_ty + ; return out_ty } where occ_ty = varType v_occ bndr_ty = varType v_bndr } @@ -3524,6 +3501,25 @@ lintVarOcc v_occ | isCoVar v_occ = "The coercion variable" | otherwise = "The value variable" + -- 'check_bad_global' checks for the case where an /occurrence/ is + -- a GlobalId, but there is an enclosing binding fora a LocalId. + -- NB: the in-scope variables are mostly LocalIds, checked by lintIdBndr, + -- but GHCi adds GlobalIds from the interactive context. These + -- are fine; hence the test (isLocalId id == isLocalId v) + -- NB: when compiling Control.Exception.Base, things like absentError + -- are defined locally, but appear in expressions as (global) + -- wired-in Ids after worker/wrapper + -- So we simply disable the test in this case + check_bad_global v_bndr + | isGlobalId v_occ + , isLocalId v_bndr + , not (isWiredIn v_occ) + = failWithL $ hang (text "Occurrence is GlobalId, but binding is LocalId") + 2 (vcat [ hang (text "occurrence:") 2 $ pprBndr LetBind v_occ + , hang (text "binder :") 2 $ pprBndr LetBind v_bndr ]) + | otherwise + = return () + lookupJoinId :: Id -> LintM JoinPointHood -- Look up an Id which should be a join point, valid here -- If so, return its arity, if not return Nothing View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6cad3ad11fdbfd51cb2f21cb066602778507ed2e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6cad3ad11fdbfd51cb2f21cb066602778507ed2e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 11:06:37 2024 From: gitlab at gitlab.haskell.org (Alan Zimmerman (@alanz)) Date: Sat, 09 Nov 2024 06:06:37 -0500 Subject: [Git][ghc/ghc][wip/az/T25453-strictness] EPA: Add strictness annotations to data structures Message-ID: <672f423ddab21_157d6334245c47388@gitlab.mail> Alan Zimmerman pushed to branch wip/az/T25453-strictness at Glasgow Haskell Compiler / GHC Commits: 0c92dccb by Alan Zimmerman at 2024-11-09T11:01:10+00:00 EPA: Add strictness annotations to data structures As pointed out in #25453, a lot of time/allocations come about from the Semigroup instance for AddEpAnn. To mitigate some of this, add strictness marks to most data structures for annotations. Any left out are accidental. - - - - - 6 changed files: - compiler/GHC/Hs.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Parser/Annotation.hs Changes: ===================================== compiler/GHC/Hs.hs ===================================== @@ -88,11 +88,11 @@ deriving instance Data (HsModule GhcPs) data AnnsModule = AnnsModule { - am_sig :: EpToken "signature", - am_mod :: EpToken "module", - am_where :: EpToken "where", + am_sig :: !(EpToken "signature"), + am_mod :: !(EpToken "module"), + am_where :: !(EpToken "where"), am_decls :: [TrailingAnn], -- ^ Semis before the start of top decls - am_cs :: [LEpaComment], -- ^ Comments before start of top decl, + am_cs :: [LEpaComment], -- ^ Comments before start of top decl, -- used in exact printing only am_eof :: Maybe (RealSrcSpan, RealSrcSpan) -- ^ End of file and end of prior token } deriving (Data, Eq) ===================================== compiler/GHC/Hs/Binds.hs ===================================== @@ -154,11 +154,11 @@ type instance XXMultAnn (GhcPass _) = DataConCantHappen data AnnPSB = AnnPSB { - ap_pattern :: EpToken "pattern", - ap_openc :: Maybe (EpToken "{"), - ap_closec :: Maybe (EpToken "}"), - ap_larrow :: Maybe (EpUniToken "<-" "←"), - ap_equal :: Maybe (EpToken "=") + ap_pattern :: !(EpToken "pattern"), + ap_openc :: !(Maybe (EpToken "{")), + ap_closec :: !(Maybe (EpToken "}")), + ap_larrow :: !(Maybe (EpUniToken "<-" "←")), + ap_equal :: !(Maybe (EpToken "=")) } deriving Data instance NoAnn AnnPSB where @@ -736,10 +736,10 @@ type instance XXFixitySig (GhcPass p) = DataConCantHappen data AnnSpecSig = AnnSpecSig { - ass_open :: EpaLocation, - ass_close :: EpToken "#-}", - ass_dcolon :: TokDcolon, - ass_act :: ActivationAnn + ass_open :: !EpaLocation, + ass_close :: !(EpToken "#-}"), + ass_dcolon :: !TokDcolon, + ass_act :: !ActivationAnn } deriving Data instance NoAnn AnnSpecSig where @@ -747,10 +747,10 @@ instance NoAnn AnnSpecSig where data ActivationAnn = ActivationAnn { - aa_openc :: EpToken "[", - aa_closec :: EpToken "]", - aa_tilde :: Maybe (EpToken "~"), - aa_val :: Maybe EpaLocation + aa_openc :: !(EpToken "["), + aa_closec :: !(EpToken "]"), + aa_tilde :: !(Maybe (EpToken "~")), + aa_val :: !(Maybe EpaLocation) } deriving (Data, Eq) instance NoAnn ActivationAnn where @@ -807,9 +807,9 @@ newtype IdSig = IdSig { unIdSig :: Id } data AnnSig = AnnSig { - asDcolon :: EpUniToken "::" "∷", - asPattern :: Maybe (EpToken "pattern"), - asDefault :: Maybe (EpToken "default") + asDcolon :: !(EpUniToken "::" "∷"), + asPattern :: !(Maybe (EpToken "pattern")), + asDefault :: !(Maybe (EpToken "default")) } deriving Data instance NoAnn AnnSig where ===================================== compiler/GHC/Hs/Decls.hs ===================================== @@ -392,15 +392,15 @@ data AnnDataDefn = AnnDataDefn { andd_openp :: [EpToken "("], andd_closep :: [EpToken ")"], - andd_type :: EpToken "type", - andd_newtype :: EpToken "newtype", - andd_data :: EpToken "data", - andd_instance :: EpToken "instance", - andd_dcolon :: TokDcolon, - andd_where :: EpToken "where", - andd_openc :: EpToken "{", - andd_closec :: EpToken "}", - andd_equal :: EpToken "=" + andd_type :: !(EpToken "type"), + andd_newtype :: !(EpToken "newtype"), + andd_data :: !(EpToken "data"), + andd_instance :: !(EpToken "instance"), + andd_dcolon :: !TokDcolon, + andd_where :: !(EpToken "where"), + andd_openc :: !(EpToken "{"), + andd_closec :: !(EpToken "}"), + andd_equal :: !(EpToken "=") } deriving Data instance NoAnn AnnDataDefn where @@ -408,13 +408,13 @@ instance NoAnn AnnDataDefn where data AnnClassDecl = AnnClassDecl { - acd_class :: EpToken "class", + acd_class :: !(EpToken "class"), acd_openp :: [EpToken "("], acd_closep :: [EpToken ")"], - acd_vbar :: EpToken "|", - acd_where :: EpToken "where", - acd_openc :: EpToken "{", - acd_closec :: EpToken "}", + acd_vbar :: !(EpToken "|"), + acd_where :: !(EpToken "where"), + acd_openc :: !(EpToken "{"), + acd_closec :: !(EpToken "}"), acd_semis :: [EpToken ";"] } deriving Data @@ -425,8 +425,8 @@ data AnnSynDecl = AnnSynDecl { asd_opens :: [EpToken "("], asd_closes :: [EpToken ")"], - asd_type :: EpToken "type", - asd_equal :: EpToken "=" + asd_type :: !(EpToken "type"), + asd_equal :: !(EpToken "=") } deriving Data instance NoAnn AnnSynDecl where @@ -624,16 +624,16 @@ data AnnFamilyDecl = AnnFamilyDecl { afd_openp :: [EpToken "("], afd_closep :: [EpToken ")"], - afd_type :: EpToken "type", - afd_data :: EpToken "data", - afd_family :: EpToken "family", - afd_dcolon :: TokDcolon, - afd_equal :: EpToken "=", - afd_vbar :: EpToken "|", - afd_where :: EpToken "where", - afd_openc :: EpToken "{", - afd_dotdot :: EpToken "..", - afd_closec :: EpToken "}" + afd_type :: !(EpToken "type"), + afd_data :: !(EpToken "data"), + afd_family :: !(EpToken "family"), + afd_dcolon :: !TokDcolon, + afd_equal :: !(EpToken "="), + afd_vbar :: !(EpToken "|"), + afd_where :: !(EpToken "where"), + afd_openc :: !(EpToken "{"), + afd_dotdot :: !(EpToken ".."), + afd_closec :: !(EpToken "}") } deriving Data instance NoAnn AnnFamilyDecl where @@ -774,9 +774,9 @@ type instance XXConDeclGADTDetails (GhcPass _) = DataConCantHappen data AnnConDeclH98 = AnnConDeclH98 { - acdh_forall :: TokForall, - acdh_dot :: EpToken ".", - acdh_darrow :: TokDarrow + acdh_forall :: !TokForall, + acdh_dot :: !(EpToken "."), + acdh_darrow :: !TokDarrow } deriving Data instance NoAnn AnnConDeclH98 where @@ -786,7 +786,7 @@ data AnnConDeclGADT = AnnConDeclGADT { acdg_openp :: [EpToken "("], acdg_closep :: [EpToken ")"], - acdg_dcolon :: TokDcolon + acdg_dcolon :: !TokDcolon } deriving Data instance NoAnn AnnConDeclGADT where @@ -950,11 +950,11 @@ type instance XXInstDecl (GhcPass _) = DataConCantHappen data AnnClsInstDecl = AnnClsInstDecl { - acid_instance :: EpToken "instance", - acid_where :: EpToken "where", - acid_openc :: EpToken "{", + acid_instance :: !(EpToken "instance"), + acid_where :: !(EpToken "where"), + acid_openc :: !(EpToken "{"), acid_semis :: [EpToken ";"], - acid_closec :: EpToken "}" + acid_closec :: !(EpToken "}") } deriving Data instance NoAnn AnnClsInstDecl where ===================================== compiler/GHC/Hs/Expr.hs ===================================== @@ -418,10 +418,10 @@ arrowToHsExpr = expandHsArrow (HsVar noExtField) data AnnExplicitSum = AnnExplicitSum { - aesOpen :: EpaLocation, + aesOpen :: !EpaLocation, aesBarsBefore :: [EpToken "|"], aesBarsAfter :: [EpToken "|"], - aesClose :: EpaLocation + aesClose :: !EpaLocation } deriving Data instance NoAnn AnnExplicitSum where @@ -429,7 +429,7 @@ instance NoAnn AnnExplicitSum where data AnnFieldLabel = AnnFieldLabel { - afDot :: Maybe (EpToken ".") + afDot :: !(Maybe (EpToken ".")) } deriving Data instance NoAnn AnnFieldLabel where @@ -437,8 +437,8 @@ instance NoAnn AnnFieldLabel where data AnnProjection = AnnProjection { - apOpen :: EpToken "(", - apClose :: EpToken ")" + apOpen :: !(EpToken "("), + apClose :: !(EpToken ")") } deriving Data instance NoAnn AnnProjection where @@ -446,10 +446,10 @@ instance NoAnn AnnProjection where data AnnArithSeq = AnnArithSeq { - aas_open :: EpToken "[", - aas_comma :: Maybe (EpToken ","), - aas_dotdot :: EpToken "..", - aas_close :: EpToken "]" + aas_open :: !(EpToken "["), + aas_comma :: !(Maybe (EpToken ")")), + aas_dotdot :: !(EpToken ".."), + aas_close :: !(EpToken "]") } deriving Data instance NoAnn AnnArithSeq where @@ -457,11 +457,11 @@ instance NoAnn AnnArithSeq where data AnnsIf = AnnsIf { - aiIf :: EpToken "if", - aiThen :: EpToken "then", - aiElse :: EpToken "else", - aiThenSemi :: Maybe (EpToken ";"), - aiElseSemi :: Maybe (EpToken ";") + aiIf :: !(EpToken "if"), + aiThen :: !(EpToken "then"), + aiElse :: !(EpToken "else"), + aiThenSemi :: !(Maybe (EpToken ";")), + aiElseSemi :: !(Maybe (EpToken ";")) } deriving Data instance NoAnn AnnsIf where @@ -469,7 +469,7 @@ instance NoAnn AnnsIf where data AnnFunRhs = AnnFunRhs { - afr_strict :: EpToken "!", + afr_strict :: !(EpToken "!"), afr_opens :: [EpToken "("], afr_closes :: [EpToken ")"] } deriving Data @@ -1791,10 +1791,10 @@ type instance XXStmtLR (GhcPass x) GhcTc b = ApplicativeStmt (GhcPass x) data AnnTransStmt = AnnTransStmt { - ats_then :: EpToken "then", - ats_group :: Maybe (EpToken "group"), - ats_by :: Maybe (EpToken "by"), - ats_using :: Maybe (EpToken "using") + ats_then :: !(EpToken "then"), + ats_group :: !(Maybe (EpToken "group")), + ats_by :: !(Maybe (EpToken "by")), + ats_using :: !(Maybe (EpToken "using")) } deriving Data instance NoAnn AnnTransStmt where ===================================== compiler/GHC/Hs/Type.hs ===================================== @@ -372,8 +372,8 @@ data AnnTyVarBndr = AnnTyVarBndr { atv_opens :: [EpaLocation], -- all "(" or all "{" atv_closes :: [EpaLocation], -- all ")" or all "}" - atv_tv :: EpToken "'", - atv_dcolon :: TokDcolon + atv_tv :: !(EpToken "'"), + atv_dcolon :: !TokDcolon } deriving Data instance NoAnn AnnTyVarBndr where ===================================== compiler/GHC/Parser/Annotation.hs ===================================== @@ -302,8 +302,8 @@ deriving instance Data EpLayout data EpaComment = EpaComment - { ac_tok :: EpaCommentTok - , ac_prior_tok :: RealSrcSpan + { ac_tok :: !EpaCommentTok + , ac_prior_tok :: !RealSrcSpan -- ^ The location of the prior token, used in exact printing. The -- 'EpaComment' appears as an 'LEpaComment' containing its -- location. The difference between the end of the prior token @@ -314,10 +314,10 @@ data EpaComment = data EpaCommentTok = -- Documentation annotations - EpaDocComment HsDocString -- ^ a docstring that can be pretty printed using pprHsDocString - | EpaDocOptions String -- ^ doc options (prune, ignore-exports, etc) - | EpaLineComment String -- ^ comment starting by "--" - | EpaBlockComment String -- ^ comment in {- -} + EpaDocComment !HsDocString -- ^ a docstring that can be pretty printed using pprHsDocString + | EpaDocOptions String -- ^ doc options (prune, ignore-exports, etc) + | EpaLineComment String -- ^ comment starting by "--" + | EpaBlockComment String -- ^ comment in {- -} deriving (Eq, Data, Show) -- Note: these are based on the Token versions, but the Token type is -- defined in GHC.Parser.Lexer and bringing it in here would create a loop @@ -420,10 +420,10 @@ noSpanAnchor = EpaDelta noSrcSpan (SameLine 0) noAnn -- following it. The 'EpaCommentsBalanced' constructor is used to do -- this. The GHC parser will only insert the 'EpaComments' form. data EpAnnComments = EpaComments - { priorComments :: ![LEpaComment] } + { priorComments :: [LEpaComment] } | EpaCommentsBalanced - { priorComments :: ![LEpaComment] - , followingComments :: ![LEpaComment] } + { priorComments :: [LEpaComment] + , followingComments :: [LEpaComment] } deriving (Data, Eq) type LEpaComment = GenLocated NoCommentsLocation EpaComment @@ -504,10 +504,10 @@ meaning we can have type LocatedN RdrName -- | Captures the location of punctuation occurring between items, -- normally in a list. It is captured as a trailing annotation. data TrailingAnn - = AddSemiAnn (EpToken ";") -- ^ Trailing ';' - | AddCommaAnn (EpToken ",") -- ^ Trailing ',' - | AddVbarAnn (EpToken "|") -- ^ Trailing '|' - | AddDarrowAnn TokDarrow -- ^ Trailing '=>' / '⇒' + = AddSemiAnn !(EpToken ";") -- ^ Trailing ';' + | AddCommaAnn !(EpToken ",") -- ^ Trailing ',' + | AddVbarAnn !(EpToken "|") -- ^ Trailing '|' + | AddDarrowAnn !TokDarrow -- ^ Trailing '=>' / '⇒' deriving (Data, Eq) ta_location :: TrailingAnn -> EpaLocation @@ -544,16 +544,16 @@ data AnnList a al_brackets :: !AnnListBrackets, al_semis :: [EpToken ";"], -- decls al_rest :: !a, - al_trailing :: ![TrailingAnn] -- ^ items appearing after the - -- list, such as '=>' for a - -- context + al_trailing :: [TrailingAnn] -- ^ items appearing after the + -- list, such as '=>' for a + -- context } deriving (Data,Eq) data AnnListBrackets - = ListParens (EpToken "(") (EpToken ")") - | ListBraces (EpToken "{") (EpToken "}") - | ListSquare (EpToken "[") (EpToken "]") - | ListBanana (EpUniToken "(|" "⦇") (EpUniToken "|)" "⦈") + = ListParens !(EpToken "(") !(EpToken ")") + | ListBraces !(EpToken "{") !(EpToken "}") + | ListSquare !(EpToken "[") !(EpToken "]") + | ListBanana !(EpUniToken "(|" "⦇") !(EpUniToken "|)" "⦈") | ListNone deriving (Data,Eq) @@ -564,9 +564,9 @@ data AnnListBrackets -- | exact print annotation for an item having surrounding "brackets", such as -- tuples or lists data AnnParen - = AnnParens (EpToken "(") (EpToken ")") -- ^ '(', ')' - | AnnParensHash (EpToken "(#") (EpToken "#)") -- ^ '(#', '#)' - | AnnParensSquare (EpToken "[") (EpToken "]") -- ^ '[', ']' + = AnnParens !(EpToken "(") !(EpToken ")") -- ^ '(', ')' + | AnnParensHash !(EpToken "(#") !(EpToken "#)") -- ^ '(#', '#)' + | AnnParensSquare !(EpToken "[") !(EpToken "]") -- ^ '[', ']' deriving Data -- --------------------------------------------------------------------- @@ -574,7 +574,7 @@ data AnnParen -- | Exact print annotation for the 'Context' data type. data AnnContext = AnnContext { - ac_darrow :: Maybe TokDarrow, + ac_darrow :: !(Maybe TokDarrow), -- ^ location of the '=>', if present. ac_open :: [EpToken "("], -- ^ zero or more opening parentheses. ac_close :: [EpToken ")"] -- ^ zero or more closing parentheses. @@ -591,39 +591,39 @@ data AnnContext data NameAnn -- | Used for a name with an adornment, so '`foo`', '(bar)' = NameAnn { - nann_adornment :: NameAdornment, - nann_name :: EpaLocation, + nann_adornment :: !NameAdornment, + nann_name :: !EpaLocation, nann_trailing :: [TrailingAnn] } -- | Used for @(,,,)@, or @(#,,,#)@ | NameAnnCommas { - nann_adornment :: NameAdornment, + nann_adornment :: !NameAdornment, nann_commas :: [EpToken ","], nann_trailing :: [TrailingAnn] } -- | Used for @(# | | #)@ | NameAnnBars { - nann_parensh :: (EpToken "(#", EpToken "#)"), + nann_parensh :: !(EpToken "(#", EpToken "#)"), nann_bars :: [EpToken "|"], nann_trailing :: [TrailingAnn] } -- | Used for @()@, @(##)@, @[]@ | NameAnnOnly { - nann_adornment :: NameAdornment, + nann_adornment :: !NameAdornment, nann_trailing :: [TrailingAnn] } -- | Used for @->@, as an identifier | NameAnnRArrow { - nann_mopen :: Maybe (EpToken "("), - nann_arrow :: TokRarrow, - nann_mclose :: Maybe (EpToken ")"), + nann_mopen :: !(Maybe (EpToken "(")), + nann_arrow :: !TokRarrow, + nann_mclose :: !(Maybe (EpToken ")")), nann_trailing :: [TrailingAnn] } -- | Used for an item with a leading @'@. The annotation for -- unquoted item is stored in 'nann_quoted'. | NameAnnQuote { - nann_quote :: EpToken "'", - nann_quoted :: SrcSpanAnnN, + nann_quote :: !(EpToken "'"), + nann_quoted :: !SrcSpanAnnN, nann_trailing :: [TrailingAnn] } -- | Used when adding a 'TrailingAnn' to an existing 'LocatedN' @@ -637,10 +637,10 @@ data NameAnn -- such as parens or backquotes. This data type identifies what -- particular pair are being used. data NameAdornment - = NameParens (EpToken "(") (EpToken ")") - | NameParensHash (EpToken "(#") (EpToken "#)") - | NameBackquotes (EpToken "`") (EpToken "`") - | NameSquare (EpToken "[") (EpToken "]") + = NameParens !(EpToken "(") !(EpToken ")") + | NameParensHash !(EpToken "(#") !(EpToken "#)") + | NameBackquotes !(EpToken "`") !(EpToken "`") + | NameSquare !(EpToken "[") !(EpToken "]") | NameNoAdornment deriving (Eq, Data) @@ -651,13 +651,13 @@ data NameAdornment -- annotations in pragmas. data AnnPragma = AnnPragma { - apr_open :: EpaLocation, - apr_close :: EpToken "#-}", - apr_squares :: (EpToken "[", EpToken "]"), - apr_loc1 :: EpaLocation, - apr_loc2 :: EpaLocation, - apr_type :: EpToken "type", - apr_module :: EpToken "module" + apr_open :: !EpaLocation, + apr_close :: !(EpToken "#-}"), + apr_squares :: !(EpToken "[", EpToken "]"), + apr_loc1 :: !EpaLocation, + apr_loc2 :: !EpaLocation, + apr_type :: !(EpToken "type"), + apr_module :: !(EpToken "module") } deriving (Data,Eq) -- --------------------------------------------------------------------- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0c92dccba009571f421c0b771613f3e369547e0c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0c92dccba009571f421c0b771613f3e369547e0c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 12:31:18 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Sat, 09 Nov 2024 07:31:18 -0500 Subject: [Git][ghc/ghc][ghc-9.8] testsuite: Elide progress output from bkpfail{16,18,19} Message-ID: <672f5616f8c8_157d63780ba4653c@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: b6639a64 by Ben Gamari at 2024-10-19T14:22:45-04:00 testsuite: Elide progress output from bkpfail{16,18,19} These tests are seemingly testing the error message, not the progress output and the latter contains filenames with unstable hashes. - - - - - 4 changed files: - testsuite/tests/backpack/should_fail/all.T - testsuite/tests/backpack/should_fail/bkpfail16.stderr - testsuite/tests/backpack/should_fail/bkpfail17.stderr - testsuite/tests/backpack/should_fail/bkpfail19.stderr Changes: ===================================== testsuite/tests/backpack/should_fail/all.T ===================================== @@ -11,10 +11,10 @@ test('bkpfail12', normal, backpack_compile_fail, ['']) test('bkpfail13', normal, backpack_compile_fail, ['']) test('bkpfail14', normal, backpack_compile_fail, ['']) test('bkpfail15', normal, backpack_compile_fail, ['']) -test('bkpfail16', normalise_version('base'), backpack_compile_fail, ['']) -test('bkpfail17', normalise_version('base'), backpack_compile_fail, ['']) +test('bkpfail16', normalise_version('base'), backpack_compile_fail, ['-v0']) +test('bkpfail17', normalise_version('base'), backpack_compile_fail, ['-v0']) test('bkpfail18', normal, backpack_compile_fail, ['']) -test('bkpfail19', normalise_version('base'), backpack_compile_fail, ['']) +test('bkpfail19', normalise_version('base'), backpack_compile_fail, ['-v0']) test('bkpfail20', normal, backpack_compile_fail, ['']) test('bkpfail21', normal, backpack_compile_fail, ['']) test('bkpfail22', normal, backpack_compile_fail, ['']) ===================================== testsuite/tests/backpack/should_fail/bkpfail16.stderr ===================================== @@ -1,10 +1,4 @@ -[1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) -[2 of 2] Processing q - Instantiating q - [1 of 1] Including p[ShouldFail=base-4.19.1.0:Data.Bool] - Instantiating p[ShouldFail=base-4.19.1.0:Data.Bool] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail16.out/p/p-IWIH695NuFKHfA9JCzN8tU/ShouldFail.o ) -: error: - Something is amiss; requested module base-4.19.1.0-inplace:Data.Bool differs from name found in the interface file base:Data.Bool (if these names look the same, try again with -dppr-debug) +bkpfail16.out/p/p-1OqLaT7dAn947wScQQKCw5/../ShouldFail.hi:1:1: error: [GHC-93011] + • ‘Booly’ is exported by the hsig file, but not exported by the implementing module ‘Data.Bool’ + • While checking that ‘Data.Bool’ implements signature ‘ShouldFail’ in ‘p[ShouldFail=Data.Bool]’. ===================================== testsuite/tests/backpack/should_fail/bkpfail17.stderr ===================================== @@ -1,10 +1,11 @@ -[1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) -[2 of 2] Processing q - Instantiating q - [1 of 1] Including p[ShouldFail=base-4.19.1.0:Prelude] - Instantiating p[ShouldFail=base-4.19.1.0:Prelude] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail17.out/p/p-9af3lmxJNZa50ZueXSR02Y/ShouldFail.o ) -: error: - Something is amiss; requested module base-4.19.1.0-inplace:Prelude differs from name found in the interface file base:Prelude (if these names look the same, try again with -dppr-debug) +: error: [GHC-15843] + • Type constructor ‘Either’ has conflicting definitions in the module + and its hsig file. + Main module: type Either :: * -> * -> * + data Either a b = Left a | Right b + Hsig file: type role Either representational phantom phantom + type Either :: * -> * -> * -> * + data Either a b c = Left a + The types have different kinds. + • While checking that ‘Prelude’ implements signature ‘ShouldFail’ in ‘p[ShouldFail=Prelude]’. ===================================== testsuite/tests/backpack/should_fail/bkpfail19.stderr ===================================== @@ -1,10 +1,5 @@ -[1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) -[2 of 2] Processing q - Instantiating q - [1 of 1] Including p[ShouldFail=base-4.19.1.0:Data.STRef] - Instantiating p[ShouldFail=base-4.19.1.0:Data.STRef] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail19.out/p/p-Ak3HDozWrn3BPHIdYYNht5/ShouldFail.o ) -: error: - Something is amiss; requested module base-4.19.1.0-inplace:Data.STRef differs from name found in the interface file base:Data.STRef (if these names look the same, try again with -dppr-debug) +: error: [GHC-12424] + • The hsig file (re)exports ‘Data.STRef.Lazy.newSTRef’ + but the implementing module exports a different identifier ‘GHC.STRef.newSTRef’ + • While checking that ‘Data.STRef’ implements signature ‘ShouldFail’ in ‘p[ShouldFail=Data.STRef]’. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6639a64c30c5d3a3783507eca998be659e3ebf7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6639a64c30c5d3a3783507eca998be659e3ebf7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 18:09:48 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Sat, 09 Nov 2024 13:09:48 -0500 Subject: [Git][ghc/ghc][wip/ubuntu24_04] rel-eng: add ubuntu24_04 bindists to ghcup metadata and fetch gitlab scripts Message-ID: <672fa56c7c5c4_8aca746bc4875325@gitlab.mail> Cheng Shao pushed to branch wip/ubuntu24_04 at Glasgow Haskell Compiler / GHC Commits: 7fc714db by Cheng Shao at 2024-11-09T18:09:36+00:00 rel-eng: add ubuntu24_04 bindists to ghcup metadata and fetch gitlab scripts - - - - - 3 changed files: - .gitlab-ci.yml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py Changes: ===================================== .gitlab-ci.yml ===================================== @@ -1142,6 +1142,8 @@ ghcup-metadata-nightly: artifacts: false - job: nightly-x86_64-linux-centos7-validate artifacts: false + - job: nightly-x86_64-linux-ubuntu24_04-validate + artifacts: false - job: nightly-x86_64-linux-ubuntu22_04-validate artifacts: false - job: nightly-x86_64-linux-ubuntu20_04-validate ===================================== .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py ===================================== @@ -19,6 +19,7 @@ def job_triple(job_name): 'release-x86_64-windows-release': 'x86_64-unknown-mingw32', 'release-x86_64-windows-int_native-release': 'x86_64-unknown-mingw32-int_native', 'release-x86_64-linux-rocky8-release': 'x86_64-rocky8-linux', + 'release-x86_64-linux-ubuntu24_04-release': 'x86_64-ubuntu24_04-linux', 'release-x86_64-linux-ubuntu22_04-release': 'x86_64-ubuntu22_04-linux', 'release-x86_64-linux-ubuntu20_04-release': 'x86_64-ubuntu20_04-linux', 'release-x86_64-linux-ubuntu18_04-release': 'x86_64-ubuntu18_04-linux', ===================================== .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py ===================================== @@ -201,6 +201,7 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map): ubuntu1804 = mk(ubuntu("18_04")) ubuntu2004 = mk(ubuntu("20_04")) ubuntu2204 = mk(ubuntu("22_04")) + ubuntu2404 = mk(ubuntu("24_04")) rocky8 = mk(rocky("8")) centos7 = mk(centos(7)) fedora33 = mk(fedora(33)) @@ -234,7 +235,8 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map): , "( >= 16 && < 18 )": deb9 , "( >= 18 && < 19 )": ubuntu1804 , "( >= 19 && < 21 )": ubuntu2004 - , "( >= 21 )": ubuntu2204 + , "( >= 21 && < 24 )": ubuntu2204 + , "( >= 24 )": ubuntu2404 } , "Linux_Mint" : { "< 20": ubuntu1804 , ">= 20": ubuntu2004 @@ -369,4 +371,3 @@ def main() -> None: if __name__ == '__main__': main() - View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7fc714dbb85bfbf16ff015d5af471aaac19a3efa -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7fc714dbb85bfbf16ff015d5af471aaac19a3efa You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 18:23:08 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Sat, 09 Nov 2024 13:23:08 -0500 Subject: [Git][ghc/ghc][wip/kill-pre-c11] Remove legacy pre-C11 logic from the tree Message-ID: <672fa88ccdacd_8aca7469330769a6@gitlab.mail> Cheng Shao pushed to branch wip/kill-pre-c11 at Glasgow Haskell Compiler / GHC Commits: f58fab20 by Cheng Shao at 2024-11-09T18:22:11+00:00 Remove legacy pre-C11 logic from the tree GHC has required C11 support from the C compiler since a long time ago. This patch cleans up pre-C11 logic from the tree: - autoconf/ghc-toolchain logic to add C99 flag into CPPFLAGS/CFLAGS are changed to add C11 flag instead (in practice invoked only for centos7 with gcc 4.8) - Redundant CPP-logic around __GNUC__ is cleaned up. __GNUC__ >= 4 is universally true for all platforms and C compilers we support. - Remove autoconf checks that are universally true on all supported platforms; replace some legacy GHC-specific macros with GNU C equivalents. - Hash.c optimization flags is controlled by hadrian, remove the redundant in-file optimization pragmas. - - - - - 30 changed files: - configure.ac - distrib/configure.ac.in - docs/coding-style.html - libraries/ghc-prim/cbits/atomic.c - libraries/ghc-prim/cbits/ctz.c - m4/fp_cmm_cpp_cmd_with_args.m4 - + m4/fp_set_cflags_c11.m4 - − m4/fp_set_cflags_c99.m4 - − m4/fp_visibility_hidden.m4 - rts/BeginPrivate.h - rts/Capability.h - rts/EndPrivate.h - rts/Hash.c - rts/RtsStartup.c - rts/RtsSymbols.c - rts/configure.ac - rts/include/Cmm.h - rts/include/Rts.h - rts/include/Stg.h - rts/include/rts/IPE.h - rts/include/rts/Types.h - rts/include/rts/storage/HeapAlloc.h - rts/include/stg/DLL.h - rts/sm/BlockAlloc.c - rts/sm/CNF.c - rts/sm/Evac.h - rts/sm/GC.c - rts/sm/GCThread.h - rts/sm/NonMoving.h - rts/sm/Storage.c The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f58fab20c086de10cdf289d9c1976433a1725643 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f58fab20c086de10cdf289d9c1976433a1725643 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 9 18:24:39 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Sat, 09 Nov 2024 13:24:39 -0500 Subject: [Git][ghc/ghc][wip/kill-pre-c11-with-centos7-fix] 2 commits: Remove legacy pre-C11 logic from the tree Message-ID: <672fa8e793b49_8aca7717be0772f5@gitlab.mail> Cheng Shao pushed to branch wip/kill-pre-c11-with-centos7-fix at Glasgow Haskell Compiler / GHC Commits: f58fab20 by Cheng Shao at 2024-11-09T18:22:11+00:00 Remove legacy pre-C11 logic from the tree GHC has required C11 support from the C compiler since a long time ago. This patch cleans up pre-C11 logic from the tree: - autoconf/ghc-toolchain logic to add C99 flag into CPPFLAGS/CFLAGS are changed to add C11 flag instead (in practice invoked only for centos7 with gcc 4.8) - Redundant CPP-logic around __GNUC__ is cleaned up. __GNUC__ >= 4 is universally true for all platforms and C compilers we support. - Remove autoconf checks that are universally true on all supported platforms; replace some legacy GHC-specific macros with GNU C equivalents. - Hash.c optimization flags is controlled by hadrian, remove the redundant in-file optimization pragmas. - - - - - 196ae82d by Cheng Shao at 2024-11-09T18:24:30+00:00 testsuite: fix process010 for centos7 job (cherry picked from commit f94510df6e93b0378aedf730d0caba7a595d1b94) - - - - - 30 changed files: - configure.ac - distrib/configure.ac.in - docs/coding-style.html - libraries/ghc-prim/cbits/atomic.c - libraries/ghc-prim/cbits/ctz.c - m4/fp_cmm_cpp_cmd_with_args.m4 - + m4/fp_set_cflags_c11.m4 - − m4/fp_set_cflags_c99.m4 - − m4/fp_visibility_hidden.m4 - rts/BeginPrivate.h - rts/Capability.h - rts/EndPrivate.h - rts/Hash.c - rts/RtsStartup.c - rts/RtsSymbols.c - rts/configure.ac - rts/include/Cmm.h - rts/include/Rts.h - rts/include/Stg.h - rts/include/rts/IPE.h - rts/include/rts/Types.h - rts/include/rts/storage/HeapAlloc.h - rts/include/stg/DLL.h - rts/sm/BlockAlloc.c - rts/sm/CNF.c - rts/sm/Evac.h - rts/sm/GC.c - rts/sm/GCThread.h - rts/sm/NonMoving.h - rts/sm/Storage.c The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/eaf67aaad3b454fcad0fc55db64ff6fbc7084e96...196ae82df7a0743f940aeeddd155ede614b4f22e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/eaf67aaad3b454fcad0fc55db64ff6fbc7084e96...196ae82df7a0743f940aeeddd155ede614b4f22e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 10 14:59:39 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Sun, 10 Nov 2024 09:59:39 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] deriving Traversable: Eta reduce more constructor Message-ID: <6730ca5b4da5c_261a0abc430253cd@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: e59b353d by Rodrigo Mesquita at 2024-11-10T14:59:20+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 2 changed files: - compiler/GHC/Tc/Deriv/Functor.hs - testsuite/tests/deriving/should_compile/T20496.stderr Changes: ===================================== compiler/GHC/Tc/Deriv/Functor.hs ===================================== @@ -689,9 +689,18 @@ mkSimpleConMatch2 ctxt fold extra_pats con insides = do con_expr | null asWithTyVar = nlHsApps con_name asWithoutTyVar | otherwise = - let bs = filterByList argTysTyVarInfo bs_RDRs - vars = filterByLists argTysTyVarInfo bs_Vars as_Vars - in mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) + let -- All trailing b-args can be eta-reduced: + -- (\b1 b2 b3 -> A b1 a2 b2 b3) ==> (\b1 -> A b1 a2) + -- This improves the number of allocations needed to compile + -- the generated code (it is not relevant for correctness) + -- We do this by counting the n of args to keep + keep_n = length $ dropWhile (== True) $ reverse argTysTyVarInfo + bs = filterByList (take keep_n argTysTyVarInfo) bs_RDRs + vars = take keep_n $ + filterByLists argTysTyVarInfo bs_Vars as_Vars + in if keep_n == 0 + then nlHsVar con_name + else mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) rhs <- fold con_expr exps return $ mkMatch ctxt (noLocA (extra_pats ++ [pat])) rhs emptyLocalBinds ===================================== testsuite/tests/deriving/should_compile/T20496.stderr ===================================== @@ -32,5 +32,5 @@ rnd null (MkT _) = False instance Traversable T where - traverse f (MkT a1) = fmap (\ b1 -> MkT b1) (f a1) + traverse f (MkT a1) = fmap MkT (f a1) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e59b353dc710b92a71f26735d8af961b2cf2eae3 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e59b353dc710b92a71f26735d8af961b2cf2eae3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 10 15:38:59 2024 From: gitlab at gitlab.haskell.org (Sven Tennie (@supersven)) Date: Sun, 10 Nov 2024 10:38:59 -0500 Subject: [Git][ghc/ghc][wip/supersven/riscv-vectors] 4 commits: simd001 green Message-ID: <6730d393a4d29_261a0a270eac3199a@gitlab.mail> Sven Tennie pushed to branch wip/supersven/riscv-vectors at Glasgow Haskell Compiler / GHC Commits: 558ed8e4 by Sven Tennie at 2024-11-02T10:46:28+01:00 simd001 green - - - - - 03f2767a by Sven Tennie at 2024-11-02T12:22:36+01:00 simd003 green - - - - - a9b9a340 by Sven Tennie at 2024-11-02T13:19:05+01:00 simd006 green - - - - - 0682aed3 by Sven Tennie at 2024-11-10T16:37:14+01:00 simd007 green - - - - - 5 changed files: - compiler/GHC/CmmToAsm/RV64/CodeGen.hs - compiler/GHC/CmmToAsm/RV64/Instr.hs - compiler/GHC/CmmToAsm/RV64/Ppr.hs - compiler/GHC/CmmToAsm/RV64/Regs.hs - testsuite/tests/simd/should_run/all.T Changes: ===================================== compiler/GHC/CmmToAsm/RV64/CodeGen.hs ===================================== @@ -364,15 +364,11 @@ stmtToInstrs stmt = do genCCall target result_regs args CmmComment s -> pure (unitOL (COMMENT (ftext s))) CmmTick {} -> pure nilOL - CmmAssign reg src - | isFloatType ty -> assignReg_FltCode format reg src - | otherwise -> assignReg_IntCode format reg src + CmmAssign reg src -> assignReg format reg src where ty = cmmRegType reg format = cmmTypeFormat ty - CmmStore addr src _alignment - | isFloatType ty -> assignMem_FltCode format addr src - | otherwise -> assignMem_IntCode format addr src + CmmStore addr src _alignment -> assignMem format addr src where ty = cmmExprType platform src format = cmmTypeFormat ty @@ -662,9 +658,21 @@ getRegister' config plat expr = let format = cmmTypeFormat rep width = typeWidth rep Amode addr addr_code <- getAmode plat width mem - case width of - w - | (w <= W64) || isVecFormat format -> + case (width, format) of + (_w, f) + | VecFormat l vf <- f -> + pure + ( Any + format + ( \dst -> + unitOL (COMMENT (text "XXX here")) `appOL` + addr_code `snocOL` + annExpr expr + (LDRU format (OpReg width dst) (OpAddr addr)) + ) + ) + (w, _f) + | w <= W64 -> -- Load without sign-extension. See Note [Signed arithmetic on RISCV64] pure ( Any @@ -828,20 +836,29 @@ getRegister' config plat expr = --TODO: MO_V_Broadcast with immediate: If the right value is a literal, -- it may use vmv.v.i (simpler) MO_V_Broadcast length w -> do - (reg_idx, format_idx, code_idx) <- getSomeReg e - let w_idx = formatToWidth format_idx + (reg_val, format_val, code_val) <- getSomeReg e + let w_val = formatToWidth format_val pure $ Any (intFormat w) $ \dst -> - code_idx `snocOL` - annExpr expr (VSETIVLI zeroReg (fromIntegral length) w M1 TA MA) `snocOL` - VMV (OpReg w dst) (OpReg w_idx reg_idx) + code_val `snocOL` + annExpr expr + (VMV (VecFormat length (intScalarFormat w)) (OpReg w dst) (OpReg w_val reg_val)) MO_VF_Broadcast length w -> do - (reg_idx, format_idx, code_idx) <- getSomeReg e - let w_idx = formatToWidth format_idx + (reg_val, format_val, code_val) <- getSomeReg e + let w_val = formatToWidth format_val pure $ Any (vecFormat (cmmVec length (cmmFloat w))) $ \dst -> - code_idx `snocOL` - annExpr expr (VSETIVLI zeroReg (fromIntegral length) w M1 TA MA) `snocOL` - VMV (OpReg w dst) (OpReg w_idx reg_idx) + code_val `snocOL` + annExpr expr + (VMV (VecFormat length (floatScalarFormat w)) (OpReg w dst) (OpReg w_val reg_val)) + + -- TODO: NO MO_V_Neg? Why? + MO_VF_Neg length w -> do + (reg_v, format_v, code_v) <- getSomeReg e + let w_v = formatToWidth format_v + pure $ Any (vecFormat (cmmVec length (cmmFloat w))) $ \dst -> + code_v `snocOL` + annExpr expr + (VNEG (VecFormat length (floatScalarFormat w))(OpReg w dst) (OpReg w_v reg_v)) x -> pprPanic ("getRegister' (monadic CmmMachOp): " ++ show x) (pdoc plat expr) where @@ -1123,6 +1140,17 @@ getRegister' config plat expr = `appOL` op (OpReg w dst) (OpReg w reg_fx) (OpReg w reg_fy) ) + vecOp length w op = do + (reg_x, format_x, code_x) <- getSomeReg x + (reg_y, format_y, code_y) <- getSomeReg y + massertPpr (isVecFormat format_x && isVecFormat format_y) $ + text "vecOp: non-vector operand. operands: " <+> ppr format_x <+> ppr format_y + pure $ Any (vecFormat (cmmVec length (cmmFloat w))) $ \dst -> + code_x `appOL` + code_y `snocOL` + annExpr expr + (op (OpReg w dst) (OpReg w reg_x) (OpReg w reg_y)) + case op of -- Integer operations -- Add/Sub should only be Integer Options. @@ -1174,6 +1202,7 @@ getRegister' config plat expr = MO_U_Shr w -> intOp False w (\d x y -> unitOL $ annExpr expr (SRL d x y)) MO_S_Shr w -> intOp True w (\d x y -> unitOL $ annExpr expr (SRA d x y)) + -- TODO: Use vecOp here MO_VF_Extract length w -> do (reg_v, format_v, code_v) <- getSomeReg x (reg_idx, format_idx, code_idx) <- getSomeReg y @@ -1184,15 +1213,27 @@ getRegister' config plat expr = code_v `appOL` code_idx `snocOL` -- Setup - -- vsetivli zero, 1, e32, m1, ta, ma -- TODO: Use width - annExpr expr (VSETIVLI zeroReg (fromIntegral length) w M1 TA MA) `snocOL` + annExpr expr -- Move selected element to index 0 -- vslidedown.vi v8, v9, 2 - VSLIDEDOWN (OpReg width_v tmp) (OpReg width_v reg_v) (OpReg (formatToWidth format_idx) reg_idx) `snocOL` + (VSLIDEDOWN (VecFormat length (floatScalarFormat w)) (OpReg width_v tmp) (OpReg width_v reg_v) (OpReg (formatToWidth format_idx) reg_idx)) `snocOL` -- Move to float register -- vmv.x.s a0, v8 - VMV (OpReg w dst) (OpReg (formatToWidth tmpFormat) tmp) + VMV (VecFormat length (floatScalarFormat w))(OpReg w dst) (OpReg (formatToWidth tmpFormat) tmp) + MO_VF_Add length w -> vecOp length w (\d x y -> (VADD (VecFormat length (floatScalarFormat w)) d x y)) + MO_VF_Sub length w -> vecOp length w (\d x y -> (VSUB (VecFormat length (floatScalarFormat w)) d x y)) + MO_VF_Mul length w -> vecOp length w (\d x y -> (VMUL (VecFormat length (floatScalarFormat w)) d x y)) + MO_VF_Quot length w -> vecOp length w (\d x y -> (VQUOT (VecFormat length (floatScalarFormat w)) d x y)) + + -- See https://godbolt.org/z/PvcWKMKoW + MO_VS_Min length w -> vecOp length w (\d x y -> (VSMIN (VecFormat length (intScalarFormat w)) d x y)) + MO_VS_Max length w -> vecOp length w (\d x y -> (VSMAX (VecFormat length (intScalarFormat w)) d x y)) + MO_VU_Min length w -> vecOp length w (\d x y -> (VUMIN (VecFormat length (intScalarFormat w)) d x y)) + MO_VU_Max length w -> vecOp length w (\d x y -> (VUMAX (VecFormat length (intScalarFormat w)) d x y)) + MO_VF_Min length w -> vecOp length w (\d x y -> (VFMIN (VecFormat length (floatScalarFormat w)) d x y)) + MO_VF_Max length w -> vecOp length w (\d x y -> (VFMAX (VecFormat length (floatScalarFormat w)) d x y)) + _e -> panic $ "Missing operation " ++ show expr @@ -1264,16 +1305,16 @@ getRegister' config plat expr = code_f `appOL` code_idx `appOL` code_l `snocOL` - annExpr expr (VSETIVLI zeroReg (fromIntegral length) w M1 TA MA) `snocOL` + annExpr expr -- Build mask for index -- 1. fill elements with index numbers -- TODO: The Width is made up - VID (OpReg W8 v0Reg) (OpReg (formatToWidth format_l) reg_l) `snocOL` + (VID (VecFormat length (intScalarFormat w)) (OpReg W8 v0Reg) (OpReg (formatToWidth format_l) reg_l)) `snocOL` -- 2. Splat value into tmp vector - VMV (OpReg w tmp) (OpReg (formatToWidth format_f) reg_f) `snocOL` + VMV (VecFormat length (floatScalarFormat w)) (OpReg w tmp) (OpReg (formatToWidth format_f) reg_f) `snocOL` -- 3. Merge with mask -> set element at index - VMSEQ (OpReg W8 v0Reg) (OpReg W8 v0Reg) (OpReg (formatToWidth format_idx) reg_idx) `snocOL` - VMERGE (OpReg w dst) (OpReg (formatToWidth format_v) reg_v) (OpReg w tmp) (OpReg W8 v0Reg) + VMSEQ (VecFormat length (floatScalarFormat w)) (OpReg W8 v0Reg) (OpReg W8 v0Reg) (OpReg (formatToWidth format_idx) reg_idx) `snocOL` + VMERGE (VecFormat length (floatScalarFormat w)) (OpReg w dst) (OpReg (formatToWidth format_v) reg_v) (OpReg w tmp) (OpReg W8 v0Reg) _ -> pprPanic "getRegister' (unhandled ternary CmmMachOp): " @@ -1532,18 +1573,18 @@ getAmode _platform _ (CmmMachOp (MO_Add _w) [expr, CmmLit (CmmInt off _w')]) | fitsIn12bitImm off = do (reg, _format, code) <- getSomeReg expr - return $ Amode (AddrRegImm reg (ImmInteger off)) code + return $ Amode (AddrRegImm reg (ImmInteger off)) $ COMMENT (text "getAmode generic" <+> (text . show) expr) `consOL` code getAmode _platform _ (CmmMachOp (MO_Sub _w) [expr, CmmLit (CmmInt off _w')]) | fitsIn12bitImm (-off) = do (reg, _format, code) <- getSomeReg expr - return $ Amode (AddrRegImm reg (ImmInteger (-off))) code + return $ Amode (AddrRegImm reg (ImmInteger (-off))) $ COMMENT (text "getAmode generic" <+> (text . show) expr) `consOL` code -- Generic case getAmode _platform _ expr = do (reg, _format, code) <- getSomeReg expr - return $ Amode (AddrReg reg) code + return $ Amode (AddrReg reg) $ COMMENT (text "getAmode generic" <+> (text . show) expr) `consOL` code -- ----------------------------------------------------------------------------- -- Generating assignments @@ -1557,11 +1598,8 @@ getAmode _platform _ expr = -- fails when the right hand side is forced into a fixed register -- (e.g. the result of a call). -assignMem_IntCode :: Format -> CmmExpr -> CmmExpr -> NatM InstrBlock -assignReg_IntCode :: Format -> CmmReg -> CmmExpr -> NatM InstrBlock -assignMem_FltCode :: Format -> CmmExpr -> CmmExpr -> NatM InstrBlock -assignReg_FltCode :: Format -> CmmReg -> CmmExpr -> NatM InstrBlock -assignMem_IntCode rep addrE srcE = +assignMem :: Format -> CmmExpr -> CmmExpr -> NatM InstrBlock +assignMem rep addrE srcE = do (src_reg, _format, code) <- getSomeReg srcE platform <- getPlatform @@ -1573,7 +1611,8 @@ assignMem_IntCode rep addrE srcE = `snocOL` STR rep (OpReg w src_reg) (OpAddr addr) ) -assignReg_IntCode _ reg src = +assignReg :: Format -> CmmReg -> CmmExpr -> NatM InstrBlock +assignReg _ reg src = do platform <- getPlatform let dst = getRegisterReg platform reg @@ -1588,12 +1627,6 @@ assignReg_IntCode _ reg src = `snocOL` MOV (OpReg (formatToWidth format) dst) (OpReg (formatToWidth format) freg) ) --- Let's treat Floating point stuff --- as integer code for now. Opaque. -assignMem_FltCode = assignMem_IntCode - -assignReg_FltCode = assignReg_IntCode - -- ----------------------------------------------------------------------------- -- Jumps -- AArch64 has 26bits for targets, whereas RiscV only has 20. @@ -2336,19 +2369,30 @@ makeFarBranches {- only used when debugging -} _platform statics basic_blocks = CSET {} -> 2 STR {} -> 1 LDR {} -> 3 - LDRU {} -> 1 + LDRU {} -> 2 FENCE {} -> 1 FCVT {} -> 1 FABS {} -> 1 FMIN {} -> 1 FMAX {} -> 1 FMA {} -> 1 - VMV {} -> 1 - VID {} -> 1 - VMSEQ {} -> 1 - VMERGE {} -> 1 - VSLIDEDOWN {} -> 1 + VMV {} -> 2 + VID {} -> 2 + VMSEQ {} -> 2 + VMERGE {} -> 2 + VSLIDEDOWN {} -> 2 VSETIVLI {} -> 1 + VNEG {} -> 2 + VADD {} -> 2 + VSUB {} -> 2 + VMUL {} -> 2 + VQUOT {} -> 2 + VSMIN {} -> 2 + VSMAX {} -> 2 + VUMIN {} -> 2 + VUMAX {} -> 2 + VFMIN {} -> 2 + VFMAX {} -> 2 -- estimate the subsituted size for jumps to lables -- jumps to registers have size 1 BCOND {} -> long_bc_jump_size ===================================== compiler/GHC/CmmToAsm/RV64/Instr.hs ===================================== @@ -109,12 +109,24 @@ regUsageOfInstr platform instr = case instr of FABS dst src -> usage (regOp src, regOp dst) FMIN dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) FMAX dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) - VMV dst src1 -> usage (regOp src1, regOp dst) - VID dst src1 -> usage (regOp src1, regOp dst) - VMSEQ dst src op -> usage (regOp src ++ regOp op, regOp dst) - VMERGE dst op1 op2 opm -> usage (regOp op1 ++ regOp op2 ++ regOp opm, regOp dst) - VSLIDEDOWN dst op1 op2 -> usage (regOp op1 ++ regOp op2, regOp dst) + VMV fmt dst src1 -> usage (regOp src1, regOp dst) + VID fmt dst src1 -> usage (regOp src1, regOp dst) + VMSEQ fmt dst src op -> usage (regOp src ++ regOp op, regOp dst) + VMERGE fmt dst op1 op2 opm -> usage (regOp op1 ++ regOp op2 ++ regOp opm, regOp dst) + VSLIDEDOWN fmt dst op1 op2 -> usage (regOp op1 ++ regOp op2, regOp dst) + -- WARNING: VSETIVLI is a special case. It changes the interpretation of all vector registers! VSETIVLI dst _ _ _ _ _ -> usage ([], [dst]) + VNEG fmt dst src1 -> usage (regOp src1, regOp dst) + VADD fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VSUB fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VMUL fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VQUOT fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VSMIN fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VSMAX fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VUMIN fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VUMAX fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VFMIN fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) + VFMAX fmt dst src1 src2 -> usage (regOp src1 ++ regOp src2, regOp dst) FMA _ dst src1 src2 src3 -> usage (regOp src1 ++ regOp src2 ++ regOp src3, regOp dst) _ -> panic $ "regUsageOfInstr: " ++ instrCon instr @@ -216,12 +228,23 @@ patchRegsOfInstr instr env = case instr of FABS o1 o2 -> FABS (patchOp o1) (patchOp o2) FMIN o1 o2 o3 -> FMIN (patchOp o1) (patchOp o2) (patchOp o3) FMAX o1 o2 o3 -> FMAX (patchOp o1) (patchOp o2) (patchOp o3) - VMV o1 o2 -> VMV (patchOp o1) (patchOp o2) - VID o1 o2 -> VID (patchOp o1) (patchOp o2) - VMSEQ o1 o2 o3 -> VMSEQ (patchOp o1) (patchOp o2) (patchOp o3) - VMERGE o1 o2 o3 o4 -> VMERGE (patchOp o1) (patchOp o2) (patchOp o3) (patchOp o4) - VSLIDEDOWN o1 o2 o3 -> VSLIDEDOWN (patchOp o1) (patchOp o2) (patchOp o3) + VMV fmt o1 o2 -> VMV fmt (patchOp o1) (patchOp o2) + VID fmt o1 o2 -> VID fmt (patchOp o1) (patchOp o2) + VMSEQ fmt o1 o2 o3 -> VMSEQ fmt (patchOp o1) (patchOp o2) (patchOp o3) + VMERGE fmt o1 o2 o3 o4 -> VMERGE fmt (patchOp o1) (patchOp o2) (patchOp o3) (patchOp o4) + VSLIDEDOWN fmt o1 o2 o3 -> VSLIDEDOWN fmt (patchOp o1) (patchOp o2) (patchOp o3) VSETIVLI o1 o2 o3 o4 o5 o6 -> VSETIVLI (env o1) o2 o3 o4 o5 o6 + VNEG fmt o1 o2 -> VNEG fmt (patchOp o1) (patchOp o2) + VADD fmt o1 o2 o3 -> VADD fmt (patchOp o1) (patchOp o2) (patchOp o3) + VSUB fmt o1 o2 o3 -> VSUB fmt (patchOp o1) (patchOp o2) (patchOp o3) + VMUL fmt o1 o2 o3 -> VMUL fmt (patchOp o1) (patchOp o2) (patchOp o3) + VQUOT fmt o1 o2 o3 -> VQUOT fmt (patchOp o1) (patchOp o2) (patchOp o3) + VSMIN fmt o1 o2 o3 -> VSMIN fmt (patchOp o1) (patchOp o2) (patchOp o3) + VSMAX fmt o1 o2 o3 -> VSMAX fmt (patchOp o1) (patchOp o2) (patchOp o3) + VUMIN fmt o1 o2 o3 -> VUMIN fmt (patchOp o1) (patchOp o2) (patchOp o3) + VUMAX fmt o1 o2 o3 -> VUMAX fmt (patchOp o1) (patchOp o2) (patchOp o3) + VFMIN fmt o1 o2 o3 -> VFMIN fmt (patchOp o1) (patchOp o2) (patchOp o3) + VFMAX fmt o1 o2 o3 -> VFMAX fmt (patchOp o1) (patchOp o2) (patchOp o3) FMA s o1 o2 o3 o4 -> FMA s (patchOp o1) (patchOp o2) (patchOp o3) (patchOp o4) _ -> panic $ "patchRegsOfInstr: " ++ instrCon instr @@ -319,21 +342,23 @@ mkSpillInstr :: -- | spill slot to use Int -> [Instr] -mkSpillInstr _config (RegWithFormat reg _fmt) delta slot = +mkSpillInstr _config (RegWithFormat reg fmt) delta slot = case off - delta of - imm | fitsIn12bitImm imm -> [mkStrSpImm imm] + imm | fitsIn12bitImm imm && not (isVecFormat fmt) -> [mkStrSpImm imm] imm -> [ movImmToTmp imm, addSpToTmp, mkStrTmp ] where - fmt = case reg of - RegReal (RealRegSingle n) | n < d0RegNo -> II64 - _ -> FF64 + fmt' + | isVecFormat fmt + = fmt + | otherwise + = scalarMoveFormat fmt mkStrSpImm imm = ANN (text "Spill@" <> int (off - delta)) - $ STR fmt (OpReg W64 reg) (OpAddr (AddrRegImm spMachReg (ImmInt imm))) + $ STR fmt' (OpReg W64 reg) (OpAddr (AddrRegImm spMachReg (ImmInt imm))) movImmToTmp imm = ANN (text "Spill: TMP <- " <> int imm) $ MOV tmp (OpImm (ImmInt imm)) @@ -342,7 +367,7 @@ mkSpillInstr _config (RegWithFormat reg _fmt) delta slot = $ ADD tmp tmp sp mkStrTmp = ANN (text "Spill@" <> int (off - delta)) - $ STR fmt (OpReg W64 reg) (OpAddr (AddrReg tmpReg)) + $ STR fmt' (OpReg W64 reg) (OpAddr (AddrReg tmpReg)) off = spillSlotToOffset slot @@ -356,21 +381,23 @@ mkLoadInstr :: -- | spill slot to use Int -> [Instr] -mkLoadInstr _config (RegWithFormat reg _fmt) delta slot = +mkLoadInstr _config (RegWithFormat reg fmt) delta slot = case off - delta of - imm | fitsIn12bitImm imm -> [mkLdrSpImm imm] + imm | fitsIn12bitImm imm && not (isVecFormat fmt) -> [mkLdrSpImm imm] imm -> [ movImmToTmp imm, addSpToTmp, mkLdrTmp ] where - fmt = case reg of - RegReal (RealRegSingle n) | n < d0RegNo -> II64 - _ -> FF64 + fmt' + | isVecFormat fmt + = fmt + | otherwise + = scalarMoveFormat fmt mkLdrSpImm imm = ANN (text "Reload@" <> int (off - delta)) - $ LDR fmt (OpReg W64 reg) (OpAddr (AddrRegImm spMachReg (ImmInt imm))) + $ LDR fmt' (OpReg W64 reg) (OpAddr (AddrRegImm spMachReg (ImmInt imm))) movImmToTmp imm = ANN (text "Reload: TMP <- " <> int imm) $ MOV tmp (OpImm (ImmInt imm)) @@ -379,10 +406,16 @@ mkLoadInstr _config (RegWithFormat reg _fmt) delta slot = $ ADD tmp tmp sp mkLdrTmp = ANN (text "Reload@" <> int (off - delta)) - $ LDR fmt (OpReg W64 reg) (OpAddr (AddrReg tmpReg)) + $ LDR fmt' (OpReg W64 reg) (OpAddr (AddrReg tmpReg)) off = spillSlotToOffset slot +scalarMoveFormat :: Format -> Format +scalarMoveFormat fmt + | isFloatFormat fmt = FF64 + | otherwise = II64 + + -- | See if this instruction is telling us the current C stack delta takeDeltaInstr :: Instr -> Maybe Int takeDeltaInstr (ANN _ i) = takeDeltaInstr i @@ -638,12 +671,23 @@ data Instr FMA FMASign Operand Operand Operand Operand -- TODO: Care about the variants (.x.y) -> sum type - | VMV Operand Operand - | VID Operand Operand - | VMSEQ Operand Operand Operand - | VMERGE Operand Operand Operand Operand - | VSLIDEDOWN Operand Operand Operand + | VMV Format Operand Operand + | VID Format Operand Operand + | VMSEQ Format Operand Operand Operand + | VMERGE Format Operand Operand Operand Operand + | VSLIDEDOWN Format Operand Operand Operand | VSETIVLI Reg Word Width VectorGrouping TailAgnosticFlag MaskAgnosticFlag + | VNEG Format Operand Operand + | VADD Format Operand Operand Operand + | VSUB Format Operand Operand Operand + | VMUL Format Operand Operand Operand + | VQUOT Format Operand Operand Operand + | VSMIN Format Operand Operand Operand + | VSMAX Format Operand Operand Operand + | VUMIN Format Operand Operand Operand + | VUMAX Format Operand Operand Operand + | VFMIN Format Operand Operand Operand + | VFMAX Format Operand Operand Operand -- | Operand of a FENCE instruction (@r@, @w@ or @rw@) data FenceType = FenceRead | FenceWrite | FenceReadWrite @@ -714,6 +758,17 @@ instrCon i = VMERGE {} -> "VMERGE" VSLIDEDOWN {} -> "VSLIDEDOWN" VSETIVLI {} -> "VSETIVLI" + VNEG {} -> "VNEG" + VADD {} -> "VADD" + VSUB {} -> "VSUB" + VMUL {} -> "VMUL" + VQUOT {} -> "VQUOT" + VSMIN {} -> "VSMIN" + VSMAX {} -> "VSMAX" + VUMIN {} -> "VUMIN" + VUMAX {} -> "VUMAX" + VFMIN {} -> "VFMIN" + VFMAX {} -> "VFMAX" FMA variant _ _ _ _ -> case variant of FMAdd -> "FMADD" @@ -725,6 +780,7 @@ data Target = TBlock BlockId | TReg Reg +-- TODO: OpReg should carry the format, not only the width. This would unify OpReg and OpVecReg. data Operand = -- | register OpReg Width Reg ===================================== compiler/GHC/CmmToAsm/RV64/Ppr.hs ===================================== @@ -59,7 +59,6 @@ pprNatCmmDecl config proc@(CmmProc top_info lbl _ (ListGraph blocks)) = -- elimination, it might be the target of a goto. ( if platformHasSubsectionsViaSymbols platform then -- See Note [Subsections Via Symbols] - line $ text "\t.long " <+> pprAsmLabel platform info_lbl @@ -655,9 +654,12 @@ pprInstr platform instr = case instr of STR II64 o1 o2 -> op2 (text "\tsd") o1 o2 STR FF32 o1 o2 -> op2 (text "\tfsw") o1 o2 STR FF64 o1 o2 -> op2 (text "\tfsd") o1 o2 - STR (VecFormat 2 FmtFloat) o1 o2@(OpAddr _) -> op2 (text "\tvse32.v") o1 o2 - STR (VecFormat 2 FmtDouble) o1 o2@(OpAddr _) -> op2 (text "\tvse64.v") o1 o2 - STR f o1 o2 -> pprPanic "Unsupported store" ((text . show) f <+> pprOp platform o1 <+> pprOp platform o2) + STR fmt@(VecFormat _ FmtInt8) o1 o2 -> configVec fmt $$ op2 (text "\tvse8.v") o1 o2 + STR fmt@(VecFormat _ FmtInt16) o1 o2 -> configVec fmt $$ op2 (text "\tvse16.v") o1 o2 + STR fmt@(VecFormat _ FmtInt32) o1 o2 -> configVec fmt $$ op2 (text "\tvse32.v") o1 o2 + STR fmt@(VecFormat _ FmtInt64) o1 o2 -> configVec fmt $$ op2 (text "\tvse64.v") o1 o2 + STR fmt@(VecFormat _ FmtFloat) o1 o2 -> configVec fmt $$ op2 (text "\tvse32.v") o1 o2 + STR fmt@(VecFormat _ FmtDouble) o1 o2 -> configVec fmt $$ op2 (text "\tvse64.v") o1 o2 LDR _f o1 (OpImm (ImmIndex lbl off)) -> lines_ [ text "\tla" <+> pprOp platform o1 <> comma <+> pprAsmLabel platform lbl, @@ -671,6 +673,12 @@ pprInstr platform instr = case instr of LDR II64 o1 o2 -> op2 (text "\tld") o1 o2 LDR FF32 o1 o2 -> op2 (text "\tflw") o1 o2 LDR FF64 o1 o2 -> op2 (text "\tfld") o1 o2 + LDR fmt@(VecFormat _ FmtInt8) o1 o2 -> configVec fmt $$ op2 (text "\tvle8.v") o1 o2 + LDR fmt@(VecFormat _ FmtInt16) o1 o2 -> configVec fmt $$ op2 (text "\tvle16.v") o1 o2 + LDR fmt@(VecFormat _ FmtInt32) o1 o2 -> configVec fmt $$ op2 (text "\tvle32.v") o1 o2 + LDR fmt@(VecFormat _ FmtInt64) o1 o2 -> configVec fmt $$ op2 (text "\tvle64.v") o1 o2 + LDR fmt@(VecFormat _ FmtFloat) o1 o2 -> configVec fmt $$ op2 (text "\tvle32.v") o1 o2 + LDR fmt@(VecFormat _ FmtDouble) o1 o2 -> configVec fmt $$ op2 (text "\tvle64.v") o1 o2 LDRU II8 o1 o2 -> op2 (text "\tlbu") o1 o2 LDRU II16 o1 o2 -> op2 (text "\tlhu") o1 o2 LDRU II32 o1 o2 -> op2 (text "\tlwu") o1 o2 @@ -681,8 +689,12 @@ pprInstr platform instr = case instr of LDRU FF64 o1 o2@(OpAddr (AddrReg _)) -> op2 (text "\tfld") o1 o2 LDRU FF64 o1 o2@(OpAddr (AddrRegImm _ _)) -> op2 (text "\tfld") o1 o2 -- vectors - LDRU (VecFormat 2 FmtFloat) o1 o2@(OpAddr _) -> op2 (text "\tvle32.v") o1 o2 - LDRU (VecFormat 2 FmtDouble) o1 o2@(OpAddr _) -> op2 (text "\tvle64.v") o1 o2 + LDRU fmt@(VecFormat _ FmtInt8) o1 o2 -> configVec fmt $$ op2 (text "\tvle8.v") o1 o2 + LDRU fmt@(VecFormat _ FmtInt16) o1 o2 -> configVec fmt $$ op2 (text "\tvle16.v") o1 o2 + LDRU fmt@(VecFormat _ FmtInt32) o1 o2 -> configVec fmt $$ op2 (text "\tvle32.v") o1 o2 + LDRU fmt@(VecFormat _ FmtInt64) o1 o2 -> configVec fmt $$ op2 (text "\tvle64.v") o1 o2 + LDRU fmt@(VecFormat _ FmtFloat) o1 o2 -> configVec fmt $$ op2 (text "\tvle32.v") o1 o2 + LDRU fmt@(VecFormat _ FmtDouble) o1 o2 -> configVec fmt $$ op2 (text "\tvle64.v") o1 o2 LDRU f o1 o2 -> pprPanic "Unsupported unsigned load" ((text . show) f <+> pprOp platform o1 <+> pprOp platform o2) FENCE r w -> line $ text "\tfence" <+> pprFenceType r <> char ',' <+> pprFenceType w FCVT FloatToFloat o1@(OpReg W32 _) o2@(OpReg W64 _) -> op2 (text "\tfcvt.s.d") o1 o2 @@ -706,10 +718,12 @@ pprInstr platform instr = case instr of $ line (pprOp platform o1 <> text "->" <> pprOp platform o2) FABS o1 o2 | isSingleOp o2 -> op2 (text "\tfabs.s") o1 o2 FABS o1 o2 | isDoubleOp o2 -> op2 (text "\tfabs.d") o1 o2 - FMIN o1 o2 o3 | isSingleOp o1 -> op3 (text "\tfmin.s") o1 o2 o3 - | isDoubleOp o2 -> op3 (text "\tfmin.d") o1 o2 o3 - FMAX o1 o2 o3 | isSingleOp o1 -> op3 (text "\tfmax.s") o1 o2 o3 - | isDoubleOp o2 -> op3 (text "\tfmax.d") o1 o2 o3 + FMIN o1 o2 o3 + | isSingleOp o1 -> op3 (text "\tfmin.s") o1 o2 o3 + | isDoubleOp o2 -> op3 (text "\tfmin.d") o1 o2 o3 + FMAX o1 o2 o3 + | isSingleOp o1 -> op3 (text "\tfmax.s") o1 o2 o3 + | isDoubleOp o2 -> op3 (text "\tfmax.d") o1 o2 o3 FMA variant d r1 r2 r3 -> let fma = case variant of FMAdd -> text "\tfmadd" <> dot <> floatPrecission d @@ -717,21 +731,44 @@ pprInstr platform instr = case instr of FNMAdd -> text "\tfnmadd" <> dot <> floatPrecission d FNMSub -> text "\tfnmsub" <> dot <> floatPrecission d in op4 fma d r1 r2 r3 - - VMV o1@(OpReg w _) o2 | isFloatOp o1 && isVectorOp o2 -> op2 (text "\tvfmv" <> dot <> text "f" <> dot <> text "s") o1 o2 - VMV o1@(OpReg _w _) o2 | isFloatOp o2 -> op2 (text "\tvfmv" <> dot <> opToVInstrSuffix o1 <> dot <> text "f") o1 o2 - VMV o1 o2 -> op2 (text "\tvmv" <> dot <> opToVInstrSuffix o1 <> dot <> opToVInstrSuffix o2) o1 o2 + VMV fmt o1@(OpReg w _) o2 | isFloatOp o1 && isVectorOp o2 -> configVec fmt $$ op2 (text "\tvfmv" <> dot <> text "f" <> dot <> text "s") o1 o2 + VMV fmt o1@(OpReg _w _) o2 | isFloatOp o2 -> configVec fmt $$ op2 (text "\tvfmv" <> dot <> opToVInstrSuffix o1 <> dot <> text "f") o1 o2 + VMV fmt o1 o2 -> configVec fmt $$ op2 (text "\tvmv" <> dot <> opToVInstrSuffix o1 <> dot <> opToVInstrSuffix o2) o1 o2 -- TODO: Remove o2 from constructor - VID o1 _o2 -> op1 (text "\tvid.v") o1 + VID fmt o1 _o2 -> configVec fmt $$ op1 (text "\tvid.v") o1 -- TODO: This expects int register as third operand: Generalize by calculating -- the instruction suffix (".vx") - VMSEQ o1 o2 o3 -> op3 (text "\tvmseq.vx") o1 o2 o3 + VMSEQ fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvmseq.vx") o1 o2 o3 -- TODO: All operands need to be vector registers. Make this more general or -- validate this constraint. - VMERGE o1 o2 o3 o4 -> op4 (text "\tvmerge.vvm") o1 o2 o3 o4 - VSLIDEDOWN o1 o2 o3 -> op3 (text "\tvslidedown.vx") o1 o2 o3 - VSETIVLI dst len width grouping ta ma -> line $ - text "\tvsetivli" <+> pprReg W64 dst <> comma <+> (text.show) len <> comma <+> pprVWidth width <> comma <+> pprGrouping grouping <> comma <+> pprTA ta <> comma <+> pprMasking ma + VMERGE fmt o1 o2 o3 o4 -> configVec fmt $$ op4 (text "\tvmerge.vvm") o1 o2 o3 o4 + VSLIDEDOWN fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvslidedown.vx") o1 o2 o3 + -- TODO: Use configVec, adjust VSETIVLI to contain only format? + VSETIVLI dst len width grouping ta ma -> + line + $ text "\tvsetivli" + <+> pprReg W64 dst + <> comma + <+> (text . show) len + <> comma + <+> pprVWidth width + <> comma + <+> pprGrouping grouping + <> comma + <+> pprTA ta + <> comma + <+> pprMasking ma + VNEG fmt o1 o2 -> configVec fmt $$ op2 (text "\tvfneg.v") o1 o2 + VADD fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvfadd.vv") o1 o2 o3 + VSUB fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvfsub.vv") o1 o2 o3 + VMUL fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvfmul.vv") o1 o2 o3 + VQUOT fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvfdiv.vv") o1 o2 o3 + VSMIN fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvmin.vv") o1 o2 o3 + VSMAX fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvmax.vv") o1 o2 o3 + VUMIN fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvminu.vv") o1 o2 o3 + VUMAX fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvmaxu.vv") o1 o2 o3 + VFMIN fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvfmin.vv") o1 o2 o3 + VFMAX fmt o1 o2 o3 -> configVec fmt $$ op3 (text "\tvfmax.vv") o1 o2 o3 instr -> panic $ "RV64.pprInstr - Unknown instruction: " ++ instrCon instr where op1 op o1 = line $ op <+> pprOp platform o1 @@ -749,7 +786,7 @@ pprInstr platform instr = case instr of pprTA TA = text "ta" pprTA TU = text "tu" - pprVWidth :: IsLine doc => Width -> doc + pprVWidth :: (IsLine doc) => Width -> doc pprVWidth W8 = text "e8" pprVWidth W16 = text "e16" pprVWidth W32 = text "e32" @@ -767,17 +804,22 @@ pprInstr platform instr = case instr of pprMasking MA = text "ma" pprMasking MU = text "mu" - opToVInstrSuffix :: IsLine doc => Operand -> doc + opToVInstrSuffix :: (IsLine doc) => Operand -> doc opToVInstrSuffix op | isIntOp op = text "x" opToVInstrSuffix op | isFloatOp op = text "f" opToVInstrSuffix op | isVectorOp op = text "v" opToVInstrSuffix op = pprPanic "Unsupported operand for vector instruction" (pprOp platform op) - floatWidthSuffix :: IsLine doc => Width -> doc + floatWidthSuffix :: (IsLine doc) => Width -> doc floatWidthSuffix W32 = text "s" floatWidthSuffix W64 = text "d" floatWidthSuffix w = pprPanic "Unsupported floating point vector operation width" (ppr w) + configVec :: (IsDoc doc) => Format -> doc + configVec (VecFormat length fmt) = + pprInstr platform (VSETIVLI zeroReg (fromIntegral length) ((formatToWidth . scalarFormatFormat) fmt) M1 TA MA) + configVec fmt = pprPanic "Unsupported vector configuration" ((text . show) fmt) + floatOpPrecision :: Platform -> Operand -> Operand -> String floatOpPrecision _p l r | isFloatOp l && isFloatOp r && isSingleOp l && isSingleOp r = "s" -- single precision floatOpPrecision _p l r | isFloatOp l && isFloatOp r && isDoubleOp l && isDoubleOp r = "d" -- double precision ===================================== compiler/GHC/CmmToAsm/RV64/Regs.hs ===================================== @@ -144,6 +144,10 @@ allGpArgRegs = map regSingle [a0RegNo .. a7RegNo] allFpArgRegs :: [Reg] allFpArgRegs = map regSingle [fa0RegNo .. fa7RegNo] +-- | Literally all general vector registers (no status registers) +allVecRegs :: [Reg] +allVecRegs = map regSingle [v0RegNo .. v31RegNo] + -- * Addressing modes -- | Addressing modes ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -26,14 +26,14 @@ setTestOpts( # TODO: Revert debug trace dumps test('simd000', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm']) -test('simd001', [], compile_and_run, ['']) -test('simd002', [], compile_and_run, ['']) -test('simd003', [], compile_and_run, ['']) -test('simd004', [], compile_and_run, ['-O2']) -test('simd005', [], compile_and_run, ['']) -test('simd006', [], compile_and_run, ['']) -test('simd007', [], compile_and_run, ['']) -test('simd008', [], compile_and_run, ['']) +test('simd001', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm']) +test('simd002', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm']) +test('simd003', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm']) +test('simd004', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm -O2']) +test('simd005', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm']) +test('simd006', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm']) +test('simd007', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm']) +test('simd008', [], compile_and_run, ['-opta=-march=rv64gv -dppr-debug -ddump-to-file -ddump-asm']) test('simd009', [ req_th , extra_files(['Simd009b.hs', 'Simd009c.hs']) , unless(have_cpu_feature('avx'), skip) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e8d84f6a448d91eebe48c130b6c66a9ee0ffb9fd...0682aed34baf0f7a4767d1d1571982851086f7dc -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e8d84f6a448d91eebe48c130b6c66a9ee0ffb9fd...0682aed34baf0f7a4767d1d1571982851086f7dc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 10 18:23:09 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Sun, 10 Nov 2024 13:23:09 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/fix-cloudflare-workers Message-ID: <6730fa0df01bd_1aa5e1381a1c20869@gitlab.mail> Cheng Shao pushed new branch wip/fix-cloudflare-workers at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/fix-cloudflare-workers You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 08:49:50 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Mon, 11 Nov 2024 03:49:50 -0500 Subject: [Git][ghc/ghc][wip/T25445] Performance-related fixes Message-ID: <6731c52ed46e1_a9544d805541492dc@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445 at Glasgow Haskell Compiler / GHC Commits: 43d003f1 by Simon Peyton Jones at 2024-11-11T08:44:16+00:00 Performance-related fixes Addresses #25463 (too much specialisation) and #20825 (Lint is expensive) - - - - - 3 changed files: - compiler/GHC/Core/Lint.hs - compiler/GHC/Data/Unboxed.hs - compiler/GHC/Hs/Dump.hs Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -3016,6 +3016,12 @@ type WarnsAndErrs = (Bag SDoc, Bag SDoc) -- Using a unboxed tuple here reduced allocations for a lint heavy -- file by ~6%. Using MaybeUB reduced them further by another ~12%. +-- +-- Warning: if you don't inline the matcher for JustUB etc, Lint becomes +-- /tremendously/ inefficient, and compiling GHC.Tc.Errors.Types (which +-- contains gigantic types) is very very slow indeed. Conclusion: make +-- sure unfoldings are expose in GHC.Data.Unboxed, and that you compile +-- Lint.hs with optimistation on. type LResult a = (# MaybeUB a, WarnsAndErrs #) pattern LResult :: MaybeUB a -> WarnsAndErrs -> LResult a ===================================== compiler/GHC/Data/Unboxed.hs ===================================== @@ -4,6 +4,13 @@ {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE UnliftedNewtypes #-} +{-# OPTIONS_GHC -fno-omit-interface-pragmas #-} + -- If you use -fomit-interface-pragmas for your build, we won't + -- inline the matcher for JustUB, and that turns out to have a + -- catastropic effect on Lint, which uses unboxed Maybes. + -- Simple fix: switch off -fomit-interface-pragmas for this tiny + -- and very stable module. + module GHC.Data.Unboxed ( MaybeUB(JustUB, NothingUB), fmapMaybeUB, fromMaybeUB, apMaybeUB, maybeUB ===================================== compiler/GHC/Hs/Dump.hs ===================================== @@ -6,6 +6,10 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DataKinds #-} +{-# OPTIONS_GHC -fno-specialise #-} + -- Don't do type-class specialisation; it goes mad in this module + -- See #25463 + -- | Contains a debug function to dump parts of the GHC.Hs AST. It uses a syb -- traversal which falls back to displaying based on the constructor name, so -- can be used to dump anything having a @Data.Data@ instance. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/43d003f14c9bc434861d1e29cfbf740daed3253f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/43d003f14c9bc434861d1e29cfbf740daed3253f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 09:12:31 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Mon, 11 Nov 2024 04:12:31 -0500 Subject: [Git][ghc/ghc][wip/T25439] DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <6731ca7fa014b_a9544ebc46815559e@gitlab.mail> Sebastian Graf pushed to branch wip/T25439 at Glasgow Haskell Compiler / GHC Commits: 5b774e86 by Sebastian Graf at 2024-11-11T10:10:57+01:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 4 changed files: - compiler/GHC/Builtin/primops.txt.pp - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strictness for mask/unmask/atomically] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask, unmask and atomically (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch*/prompt] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops call their action strictly, just like +-- outlined in Note [Strictness for mask/unmask/atomically]. +-- However, it is important that we do not give them strictOnceApply1Dmd: +-- Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, the strictOnceApply1Dmd would mean that the call +-- forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order not to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often use a wrapper around catch# that is head-strict +-- in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a use of `control0#` +-- in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch*/prompt] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for mask/unmask/atomically] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2813,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for mask/unmask/atomically] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +2999,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch*/prompt] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3028,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for mask/unmask/atomically] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3057,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch*/prompt] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3069,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch*/prompt] out_of_line = True effect = ReadWriteEffect ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5b774e867dcae5a87bf5ee6fd9e4a8eafab4df6c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5b774e867dcae5a87bf5ee6fd9e4a8eafab4df6c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 09:26:08 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Mon, 11 Nov 2024 04:26:08 -0500 Subject: [Git][ghc/ghc][wip/T25439] DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <6731cdaff269c_a9544108bfc815691e@gitlab.mail> Sebastian Graf pushed to branch wip/T25439 at Glasgow Haskell Compiler / GHC Commits: 91e17d93 by Sebastian Graf at 2024-11-11T10:25:57+01:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 4 changed files: - compiler/GHC/Builtin/primops.txt.pp - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask, unmask and atomically (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we do not give them strictOnceApply1Dmd. +-- Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, the strictOnceApply1Dmd would mean that the call +-- forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often use a wrapper around catch# that is head-strict +-- in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2813,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +2999,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3028,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3057,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3069,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/91e17d930c06adc57ca243764ff1774baf903311 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/91e17d930c06adc57ca243764ff1774baf903311 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 09:26:50 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Mon, 11 Nov 2024 04:26:50 -0500 Subject: [Git][ghc/ghc][wip/T25439] DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <6731cddaa3d16_a9544fd9c8815748c@gitlab.mail> Sebastian Graf pushed to branch wip/T25439 at Glasgow Haskell Compiler / GHC Commits: 615f01a3 by Sebastian Graf at 2024-11-11T10:26:42+01:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 4 changed files: - compiler/GHC/Builtin/primops.txt.pp - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask, unmask and atomically (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we do not give them strictOnceApply1Dmd. +-- Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, the strictOnceApply1Dmd would mean that the call +-- forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often use a wrapper around catch# that is head-strict +-- in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2772,6 +2799,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2814,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +3000,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3029,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3058,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3070,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3731,6 +3760,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] effect = ReadWriteEffect -- The invoked computation may have side effects ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/615f01a392f241084a7dcd43acd11b9706f51556 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/615f01a392f241084a7dcd43acd11b9706f51556 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 09:28:55 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Mon, 11 Nov 2024 04:28:55 -0500 Subject: [Git][ghc/ghc][wip/T25439] DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <6731ce57c8a2c_a954410914a01599b3@gitlab.mail> Sebastian Graf pushed to branch wip/T25439 at Glasgow Haskell Compiler / GHC Commits: 5236592e by Sebastian Graf at 2024-11-11T10:28:45+01:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 4 changed files: - compiler/GHC/Builtin/primops.txt.pp - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask, unmask and atomically (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we give them lazyApply1Dmd and not +-- strictOnceApply1Dmd. Here is why. Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, the strictOnceApply1Dmd would mean that the call +-- forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often use a wrapper around catch# that is head-strict +-- in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2772,6 +2799,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2814,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +3000,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3029,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3058,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3070,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3731,6 +3760,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] effect = ReadWriteEffect -- The invoked computation may have side effects ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5236592e8cbcdf86b622f0c0389763717843988d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5236592e8cbcdf86b622f0c0389763717843988d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 09:44:06 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Mon, 11 Nov 2024 04:44:06 -0500 Subject: [Git][ghc/ghc][wip/25431] 23 commits: Add since tag for -fwrite-if-compression in user guide. Message-ID: <6731d1e657751_a954410828741704a5@gitlab.mail> Zubin pushed to branch wip/25431 at Glasgow Haskell Compiler / GHC Commits: 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - c267ab50 by Zubin Duggal at 2024-11-11T09:43:54+00:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a23d8e73166725b699af88a36e97c63b2a0ede25...c267ab50996aa33320cd560c3c7b87bb6dbceda2 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a23d8e73166725b699af88a36e97c63b2a0ede25...c267ab50996aa33320cd560c3c7b87bb6dbceda2 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 09:44:19 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Mon, 11 Nov 2024 04:44:19 -0500 Subject: [Git][ghc/ghc][wip/9.12-testsuite-fixes] 28 commits: Add since tag for -fwrite-if-compression in user guide. Message-ID: <6731d1f328598_a954413a62f817117e@gitlab.mail> Zubin pushed to branch wip/9.12-testsuite-fixes at Glasgow Haskell Compiler / GHC Commits: 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - d5fe31fd by Zubin Duggal at 2024-11-11T09:44:08+00:00 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - cf9004a7 by Zubin Duggal at 2024-11-11T09:44:08+00:00 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - 4bedc1f9 by Zubin Duggal at 2024-11-11T09:44:08+00:00 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - 37ce0883 by Zubin Duggal at 2024-11-11T09:44:08+00:00 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 19c92c8b by Zubin Duggal at 2024-11-11T09:44:08+00:00 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 3bb8084f by Zubin Duggal at 2024-11-11T09:44:08+00:00 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c4ce90c81e85830269cfa4840b071e2198e8095d...3bb8084feba59fd121925a152726b2eed720f7a7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c4ce90c81e85830269cfa4840b071e2198e8095d...3bb8084feba59fd121925a152726b2eed720f7a7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 09:52:09 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Mon, 11 Nov 2024 04:52:09 -0500 Subject: [Git][ghc/ghc][wip/9.12-testsuite-fixes] 7 commits: testsuite: normalise some versions in callstacks Message-ID: <6731d3c98e80b_333a4610de9832959@gitlab.mail> Zubin pushed to branch wip/9.12-testsuite-fixes at Glasgow Haskell Compiler / GHC Commits: e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - 16 changed files: - testsuite/driver/testlib.py - testsuite/tests/backpack/should_compile/all.T - testsuite/tests/backpack/should_compile/bkp16.stderr - testsuite/tests/backpack/should_fail/all.T - testsuite/tests/backpack/should_fail/bkpfail17.stderr - testsuite/tests/backpack/should_fail/bkpfail19.stderr - testsuite/tests/gadt/all.T - testsuite/tests/ghc-api/T20757.stderr - testsuite/tests/ghc-api/all.T - testsuite/tests/ghc-e/should_fail/all.T - testsuite/tests/profiling/should_run/all.T - utils/haddock/haddock-test/src/Test/Haddock.hs - utils/haddock/haddock-test/src/Test/Haddock/Xhtml.hs - utils/haddock/html-test/Main.hs - utils/haddock/html-test/ref/Bug1004.html - utils/haddock/html-test/ref/Bug548.html Changes: ===================================== testsuite/driver/testlib.py ===================================== @@ -2857,7 +2857,7 @@ def normalise_whitespace(s: str) -> str: # Merge contiguous whitespace characters into a single space. return ' '.join(s.split()) -callSite_re = re.compile(r', called at (.+):[\d]+:[\d]+ in [\w\-\.]+:') +callSite_re = re.compile(r', called at (.+):[\d]+:[\d]+ in [<>\w\-\.]+:') def normalise_callstacks(s: str) -> str: opts = getTestOpts() ===================================== testsuite/tests/backpack/should_compile/all.T ===================================== @@ -8,7 +8,7 @@ test('bkp11', normal, backpack_compile, ['']) test('bkp12', normal, backpack_compile, ['']) test('bkp14', normal, backpack_compile, ['']) test('bkp15', normal, backpack_compile, ['']) -test('bkp16', normalise_version('base', 'ghc-internal'), backpack_compile, ['']) +test('bkp16', [normalise_version('base', 'ghc-internal')], backpack_compile, ['-fhide-source-paths']) test('bkp17', normal, backpack_compile, ['']) test('bkp18', normal, backpack_compile, ['']) test('bkp19', normal, backpack_compile, ['']) @@ -60,4 +60,4 @@ test('T13214', normal, backpack_compile, ['']) test('T13250', normal, backpack_compile, ['']) test('T13323', normal, backpack_compile, ['']) test('T20396', normal, backpack_compile, ['']) -test('T23424', [ignore_stdout, ignore_stderr], backpack_compile, ['-ddump-rn-trace -ddump-if-trace -ddump-tc-trace']) \ No newline at end of file +test('T23424', [ignore_stdout, ignore_stderr], backpack_compile, ['-ddump-rn-trace -ddump-if-trace -ddump-tc-trace']) ===================================== testsuite/tests/backpack/should_compile/bkp16.stderr ===================================== @@ -1,9 +1,9 @@ [1 of 2] Processing p - [1 of 1] Compiling Int[sig] ( p/Int.hsig, nothing ) + [1 of 1] Compiling Int[sig] [2 of 2] Processing q Instantiating q [1 of 1] Including p[Int=base-4.20.0.0:GHC.Exts] Instantiating p[Int=base-4.20.0.0:GHC.Exts] [1 of 1] Including base-4.20.0.0 - [1 of 1] Compiling Int[sig] ( p/Int.hsig, bkp16.out/p/p-3JmGAx0a1DyKjX6bh7CxGJ/Int.o ) + [1 of 1] Compiling Int[sig] [1 of 1] Instantiating p ===================================== testsuite/tests/backpack/should_fail/all.T ===================================== @@ -12,9 +12,9 @@ test('bkpfail13', normal, backpack_compile_fail, ['']) test('bkpfail14', normal, backpack_compile_fail, ['']) test('bkpfail15', normal, backpack_compile_fail, ['']) test('bkpfail16', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['']) -test('bkpfail17', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['']) +test('bkpfail17', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['-fhide-source-paths']) test('bkpfail18', normal, backpack_compile_fail, ['']) -test('bkpfail19', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['']) +test('bkpfail19', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['-fhide-source-paths']) test('bkpfail20', normal, backpack_compile_fail, ['']) test('bkpfail21', normal, backpack_compile_fail, ['']) test('bkpfail22', normal, backpack_compile_fail, ['']) ===================================== testsuite/tests/backpack/should_fail/bkpfail17.stderr ===================================== @@ -1,10 +1,10 @@ [1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) + [1 of 1] Compiling ShouldFail[sig] [2 of 2] Processing q Instantiating q [1 of 1] Including p[ShouldFail=base-4.20.0.0:Prelude] Instantiating p[ShouldFail=base-4.20.0.0:Prelude] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail17.out/p/p-9R9TTjIBG3MEjwCQffKVYM/ShouldFail.o ) + [1 of 1] Compiling ShouldFail[sig] : error: [GHC-15843] • Type constructor ‘Either’ has conflicting definitions in the module and its hsig file. ===================================== testsuite/tests/backpack/should_fail/bkpfail19.stderr ===================================== @@ -1,10 +1,10 @@ [1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) + [1 of 1] Compiling ShouldFail[sig] [2 of 2] Processing q Instantiating q [1 of 1] Including p[ShouldFail=base-4.20.0.0:Data.STRef] Instantiating p[ShouldFail=base-4.20.0.0:Data.STRef] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail19.out/p/p-Gwl8Z2CPH0M7Zi2wPSYSbs/ShouldFail.o ) + [1 of 1] Compiling ShouldFail[sig] : error: [GHC-12424] • The hsig file (re)exports ‘Data.STRef.Lazy.newSTRef’ but the implementing module exports a different identifier ‘GHC.Internal.STRef.newSTRef’ ===================================== testsuite/tests/gadt/all.T ===================================== @@ -127,7 +127,7 @@ test('T20485', normal, compile, ['']) test('T20485a', normal, compile, ['']) test('T22235', normal, compile, ['']) test('T19847', normal, compile, ['']) -test('T19847a', normal, compile, ['-ddump-types']) +test('T19847a', normalise_version('base'), compile, ['-ddump-types']) test('T19847b', normal, compile, ['']) test('T23022', normal, compile, ['-dcore-lint']) test('T23023', normal, compile_fail, ['-O -dcore-lint']) # todo: move this test? ===================================== testsuite/tests/ghc-api/T20757.stderr ===================================== @@ -2,11 +2,11 @@ T20757: Exception: could not detect mingw toolchain in the following paths: ["/..//mingw","/..//..//mingw","/..//..//..//mingw"] -Package: ghc-inplace +Package: ghc-- Module: GHC.Utils.Panic Type: GhcException HasCallStack backtrace: collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:: in :GHC.Internal.Exception toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/IO.hs:: in :GHC.Internal.IO - throwIO, called at compiler/GHC/Utils/Panic.hs:: in :GHC.Utils.Panic + throwIO, called at compiler/GHC/Utils/Panic.hs:183:23 in ghc--:GHC.Utils.Panic ===================================== testsuite/tests/ghc-api/all.T ===================================== @@ -38,7 +38,7 @@ test('T19156', [ extra_run_opts('"' + config.libdir + '"') ], compile_and_run, ['-package ghc']) -test('T20757', [unless(opsys('mingw32'), skip), exit_code(1)], +test('T20757', [unless(opsys('mingw32'), skip), exit_code(1), normalise_version('ghc')], compile_and_run, ['-package ghc']) test('PrimOpEffect_Sanity', normal, compile_and_run, ['-Wall -Werror -package ghc']) ===================================== testsuite/tests/ghc-e/should_fail/all.T ===================================== @@ -15,6 +15,7 @@ test('ghc-e-fail2', req_interp, makefile_test, ['ghc-e-fail2']) test('T9930fail', [extra_files(['T9930']), when(opsys('mingw32'), skip), + normalise_errmsg_fun(lambda s: normalise_version_("ghc")(s).replace('ghc--','ghc')), # broken for JS until cross-compilers become stage2 compilers (#19174) # or until we bootstrap with a 9.10 compiler js_broken(19174)], @@ -24,7 +25,7 @@ test('T18441fail0', req_interp, makefile_test, ['T18441fail0']) test('T18441fail1', req_interp, makefile_test, ['T18441fail1']) -test('T18441fail2', req_interp, makefile_test, ['T18441fail2']) +test('T18441fail2', [req_interp, normalise_version('ghc')], makefile_test, ['T18441fail2']) test('T18441fail3', [ignore_stderr, exit_code(1)], run_command, ['{compiler} -e ":! abcde"']) @@ -34,9 +35,9 @@ test('T18441fail5', req_interp, makefile_test, ['T18441fail5']) test('T18441fail6', req_interp, makefile_test, ['T18441fail6']) -test('T18441fail7', req_interp, makefile_test, ['T18441fail7']) +test('T18441fail7', [req_interp, normalise_version('ghc')], makefile_test, ['T18441fail7']) -test('T18441fail8', req_interp, makefile_test, ['T18441fail8']) +test('T18441fail8', [req_interp, normalise_version('ghc')], makefile_test, ['T18441fail8']) test('T18441fail9', req_interp, makefile_test, ['T18441fail9']) @@ -60,6 +61,6 @@ test('T18441fail18', req_interp, makefile_test, ['T18441fail18']) test('T18441fail19', [ignore_stderr, exit_code(1)], run_command, ['{compiler} -e ":cd abcd"']) -test('T23663', req_interp, makefile_test, ['T23663']) +test('T23663', [req_interp, normalise_version('ghc')], makefile_test, ['T23663']) test('T24172', normal, compile_fail, ['-fdiagnostics-color=always']) ===================================== testsuite/tests/profiling/should_run/all.T ===================================== @@ -145,11 +145,13 @@ test('T7275', test_opts_dot_prof, makefile_test, []) test('callstack001', # unoptimised results are different w.r.t. CAF attribution [test_opts_dot_prof # produces a different stack + ,normalise_fun(lambda s: re.sub(r"(? listDirectory hiDir -- Use the output order of GHC as a simple dependency order - filesSorted <- Map.elems . Map.fromList <$> traverse (\file -> (,file) <$> getModificationTime (hiDir file)) files + filesSorted <- Map.elems . Map.fromList <$> traverse (\file -> (\mt -> ((mt,file),file)) <$> getModificationTime (hiDir file)) files let srcRef = if "--hyperlinked-source" `elem` cfgHaddockArgs then ",src,visible," else "" loop [] = pure True loop (file : files) = do ===================================== utils/haddock/haddock-test/src/Test/Haddock/Xhtml.hs ===================================== @@ -8,6 +8,7 @@ module Test.Haddock.Xhtml , stripIdsWhen , stripFooter , fixAttrValueWhen + , stripVersions ) where {- @@ -22,7 +23,7 @@ and since the `xhtml` library already handles the pretty-printing aspect, this would appear to be a reasonable compromise for now. -} -import Data.Char (isSpace) +import Data.Char (isSpace, isAlphaNum) import Data.List (isPrefixOf, stripPrefix) -- | Simple wrapper around the pretty-printed HTML source @@ -142,3 +143,18 @@ stripFooter (Xml body) = Xml (findDiv body) Just valRest'' | otherwise = dropToDiv cs + +-- | Strip strings of the form -- +-- to just +stripVersions :: [String] -> Xml -> Xml +stripVersions xs (Xml body) = Xml $ foldr id body $ map go xs + where + go pkg "" = "" + go pkg body@(x:body') = case stripPrefix pkg body of + Just ('-':rest) + | (version,'-':rest') <- span (/= '-') rest + , all (`elem` ('.':['0'..'9'])) version + , let (hash, rest'') = span isAlphaNum rest' + -> pkg ++ go pkg rest'' + _ -> x:go pkg body' + ===================================== utils/haddock/html-test/Main.hs ===================================== @@ -42,7 +42,7 @@ main = do stripIfRequired :: String -> Xml -> Xml stripIfRequired mdl = - stripLinks' . stripFooter + stripLinks' . stripFooter . stripVersions ["base"] where stripLinks' | mdl `elem` preserveLinksModules = id ===================================== utils/haddock/html-test/ref/Bug1004.html ===================================== @@ -210,7 +210,7 @@ >D1 ('MetaData "Product" "Data.Functor.Product" "base-4.20.0.0-inplace" ' "Product" "Data.Functor.Product" "base" 'False) (C1D1 ('MetaData "Product" "Data.Functor.Product" "base-4.20.0.0-inplace" ' "Product" "Data.Functor.Product" "base" 'False) (C1D1 ('MetaData "Product" "Data.Functor.Product" "base-4.20.0.0-inplace" ' "Product" "Data.Functor.Product" "base" 'False) (C1D1 ('MetaData "Product" "Data.Functor.Product" "base-4.20.0.0-inplace" ' "Product" "Data.Functor.Product" "base" 'False) (C1D1 ('MetaData "WrappedArrow" "Control.Applicative" "base-4.20.0.0-inplace" ' "WrappedArrow" "Control.Applicative" "base" 'True) (C1D1 ('MetaData "WrappedArrow" "Control.Applicative" "base-4.20.0.0-inplace" ' "WrappedArrow" "Control.Applicative" "base" 'True) (C1D1 ('MetaData "WrappedArrow" "Control.Applicative" "base-4.20.0.0-inplace" ' "WrappedArrow" "Control.Applicative" "base" 'True) (C1D1 ('MetaData "WrappedArrow" "Control.Applicative" "base-4.20.0.0-inplace" ' "WrappedArrow" "Control.Applicative" "base" 'True) (C1 From gitlab at gitlab.haskell.org Mon Nov 11 11:39:39 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Mon, 11 Nov 2024 06:39:39 -0500 Subject: [Git][ghc/ghc][wip/hnf-spec] 3 commits: Make exprIsHNF imply exprOkForSpeculation Message-ID: <6731ecfba58de_333a4653558441612@gitlab.mail> Sebastian Graf pushed to branch wip/hnf-spec at Glasgow Haskell Compiler / GHC Commits: 35076bb4 by Sebastian Graf at 2024-11-11T12:38:08+01:00 Make exprIsHNF imply exprOkForSpeculation Fixes #23256 because SetLevels and CSE no longer do a reverse binder swap. Furthermore, we no longer need to check for exprIsHNF when exprOkForSpeculation fails. Also fixes #25423. I had a brief look at `-v` in T5642 (which regresses ghc/alloc by 2-3%). It is essentially a benchmark on `Generic` code and uses `exprOkForSpeculation` quite a lot, which now maintains a substitution, explaining the regression. No changes to any intermediate programs. I also had a look at `-v` in T9961 (which regresses ghc/alloc by 1-2%) In T16577 (regresses ghc/alloc by 2-3%) we end up with a marginally smaller program, but the benefit is offset by an additional Simplifier iteration. Metric Decrease: T9872b_defer T9872d Metric Increase: T5642 T9961 T16577 - - - - - e2838bff by Sebastian Graf at 2024-11-11T12:38:08+01:00 SetLevels: Use `exprOkForSpeculation` instead of `exprIsHNF` - - - - - be75e30f by Sebastian Graf at 2024-11-11T12:38:08+01:00 Prep: Fix outcommented debug pretty-printing logic - - - - - 14 changed files: - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/SetLevels.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Utils/Misc.hs - + testsuite/tests/simplCore/should_compile/T25423.hs - + testsuite/tests/simplCore/should_compile/T25423.stderr - testsuite/tests/simplCore/should_compile/all.T Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -592,7 +592,7 @@ lintLetBind top_lvl rec_flag binder rhs rhs_ty || (isNonRec rec_flag && exprOkForSpeculation rhs) || isDataConWorkId binder || isDataConWrapId binder -- until #17521 is fixed || exprIsTickedString rhs) - (badBndrTyMsg binder (text "unlifted")) + (badUnliftedBndrTyMsg binder rhs) -- Check that if the binder is at the top level and has type Addr#, -- that it is a string literal. @@ -3741,10 +3741,11 @@ mkRhsMsg binder what ty hsep [text "Binder's type:", ppr (idType binder)], hsep [text "Rhs type:", ppr ty]] -badBndrTyMsg :: Id -> SDoc -> SDoc -badBndrTyMsg binder what - = vcat [ text "The type of this binder is" <+> what <> colon <+> ppr binder - , text "Binder's type:" <+> ppr (idType binder) ] +badUnliftedBndrTyMsg :: Id -> CoreExpr -> SDoc +badUnliftedBndrTyMsg bndr rhs + = vcat [ text "The let binder" <+> ppr bndr <+> text "does not satisfy the let-can-float invariant" + , text "Type:" <+> ppr (idType bndr) + , text "RHS:" <+> ppr rhs ] mkNonTopExportedMsg :: Id -> SDoc mkNonTopExportedMsg binder ===================================== compiler/GHC/Core/Opt/CSE.hs ===================================== @@ -106,7 +106,11 @@ Let-bindings have two cases, implemented by extendCSEnvWithBinding. the substitution so that we can CSE the binding for y2. - Second, we use extendCSEnvWithBinding for case expression scrutinees too; - see Note [CSE for case expressions] + see Note [CSE for case expressions]. + Although we must be careful not to substitute an unevaluated variable for + an evaluated case binder, because that may degrade ok-for-spec-ness and + hence cause violations of the Note [Core let-can-float invariant]. + Hence we only substitute variables of same evaluatedness. * EXTEND THE REVERSE MAPPING: applies in all other cases @@ -497,8 +501,11 @@ extendCSEnvWithBinding env in_id out_id rhs' cse_done -- analysis -- Should we use SUBSTITUTE or EXTEND? - -- See Note [CSE for bindings] - use_subst | Var {} <- rhs' = True + -- See Note [CSE for bindings], in particular the caveat about evaluatedness + use_subst | Var v <- rhs' + , isEvaldUnfolding (idUnfolding v) -- NB: Must have same eval'ness + == isEvaldUnfolding (idUnfolding in_id) -- See Note [CSE for bindings] + = True | otherwise = False -- | Given a binder `let x = e`, this function ===================================== compiler/GHC/Core/Opt/CprAnal.hs ===================================== @@ -298,14 +298,8 @@ data TermFlag -- Better than using a Bool exprTerminates :: CoreExpr -> TermFlag -- ^ A /very/ simple termination analysis. exprTerminates e - | exprIsHNF e = Terminates | exprOkForSpeculation e = Terminates | otherwise = MightDiverge - -- Annoyingly, we have to check both for HNF and ok-for-spec. - -- * `I# (x# *# 2#)` is ok-for-spec, but not in HNF. Still worth CPR'ing! - -- * `lvl` is an HNF if its unfolding is evaluated - -- (perhaps `lvl = I# 0#` at top-level). But, tiresomely, it is never - -- ok-for-spec due to Note [exprOkForSpeculation and evaluated variables]. cprAnalApp :: AnalEnv -> CoreExpr -> [(CprType, CoreArg)] -> (CprType, CoreExpr) -- Main function that takes care of /nested/ CPR. See Note [Nested CPR] ===================================== compiler/GHC/Core/Opt/SetLevels.hs ===================================== @@ -38,39 +38,58 @@ We do *not* clone top-level bindings, because some of them must not change, but we *do* clone bindings that are heading for the top level -4. Note [Binder-swap during float-out] - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +4. Note [Duplicate evals into float] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the expression - case x of wild { p -> ...wild... } - we substitute x for wild in the RHS of the case alternatives: - case x of wild { p -> ...x... } - This means that a sub-expression involving x is not "trapped" inside the RHS - (i.e. it can now be floated out, whereas if it mentioned wild it could not). - And it's not inconvenient because we already have a substitution. + case x of wild { p -> ...f wild... } + the sub-expression `f wild` appears "trapped" inside the Case. + (i.e. it cannot be floated out because it mentions wild). + In order to "free" it, we float out the expression + `case x of wild { __DEFAULT -> f wild }`, thus duplicating the eval. For example, consider: f x = letrec go y = case x of z { (a,b) -> ...(expensive z)... } in ... - If we do the reverse binder-swap we get + If we dup the eval we get - f x = letrec go y = case x of z { (a,b) -> ...(expensive x)... } + f x = letrec go y = case x of z { (a,b) -> ...(case x of z { __DEFAULT -> expensive z })... } in ... and now we can float out: - f x = let t = expensive x - in letrec go y = case x of z { (a,b) -> ...(t)... } + f x = let t = case x of wild { __DEFAULT -> expensive wild } + in letrec go y = case x of wild { (a,b) -> ...(t)... } in ... - Now (expensive x) is computed once, rather than once each time around the 'go' loop. - - Note that this is EXACTLY BACKWARDS from the what the simplifier does. - The simplifier tries to get rid of occurrences of x, in favour of wild, - in the hope that there will only be one remaining occurrence of x, namely - the scrutinee of the case, and we can inline it. - + Now (expensive wild) is computed once, rather than once each time around the 'go' loop. + + Implementation: + + 1. When entering an eval `case x of wild { __DEFAULT -> ...}`, remember + that `wild` is the result of evaluating `x`. + + 2. After figuring out the variables over which the expression needs to be + abstracted in order to float (abstractVars), go over these variables + once more to see if `wild` occurs among them. If so, and if the + scrutinee variable `x` is bound at a lower level than the destination + level of the float, then remove `wild` as an abs_var and record the + obligation to eval `x` into `wild` instead (i.e., add a new `eval_vars` + pairing). This is implemented in eliminateAbsCaseBndrs. + Of course, it only makes sense to duplicate the eval if we end up + with a thunk in doing so; hence eliminateAbsCaseBndrs checks whether + the abs_vars become empty after duplicating evals. + + + Historically, we implemented a reverse binder-swap + (see Note [The binder-swap substitution] for the forward direction), + which would float `expensive x` and thus drop the eval on `x`. This caused + trouble for expressions such as + case x of wild { __DEFAULT -> let y = dataToTagLarge# wild in ... } + When the case binder `wild` is swapped for the unevaluated scrutinee + `x`, `dataToTagLarge# x` no longer is ok-for-spec and thus the unlifted let + violates the let-can-float invariant. Hence we duplicate the eval nowadays. -} module GHC.Core.Opt.SetLevels ( @@ -127,6 +146,7 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import Data.Maybe +import Data.Either {- ************************************************************************ @@ -445,21 +465,21 @@ lvlCase :: LevelEnv -- Level of in-scope names/tyvars lvlCase env scrut_fvs scrut' case_bndr ty alts -- See Note [Floating single-alternative cases] | [AnnAlt con@(DataAlt {}) bs body] <- alts - , exprIsHNF (deTagExpr scrut') -- See Note [Check the output scrutinee for exprIsHNF] - , not (isTopLvl dest_lvl) -- Can't have top-level cases - , not (floatTopLvlOnly env) -- Can float anywhere - , ManyTy <- idMult case_bndr -- See Note [Floating linear case] + , exprOkForSpeculation (deTagExpr scrut') -- See Note [Check the output scrutinee for exprOkForSpeculation] + , not (isTopLvl dest_lvl) -- Can't have top-level cases + , not (floatTopLvlOnly env) -- Can float anywhere + , ManyTy <- idMult case_bndr -- See Note [Floating linear case] = -- Always float the case if possible -- Unlike lets we don't insist that it escapes a value lambda do { (env1, (case_bndr' : bs')) <- cloneCaseBndrs env dest_lvl (case_bndr : bs) - ; let rhs_env = extendCaseBndrEnv env1 case_bndr scrut' + ; let rhs_env = rememberEval env1 case_bndr' scrut' ; body' <- lvlMFE rhs_env True body ; let alt' = Alt con (map (stayPut dest_lvl) bs') body' ; return (Case scrut' (TB case_bndr' (FloatMe dest_lvl)) ty' [alt']) } | otherwise -- Stays put - = do { let (alts_env1, [case_bndr']) = substAndLvlBndrs NonRecursive env incd_lvl [case_bndr] - alts_env = extendCaseBndrEnv alts_env1 case_bndr scrut' + = do { let (alts_env1, [case_bndr'@(TB case_bndrr _)]) = substAndLvlBndrs NonRecursive env incd_lvl [case_bndr] + alts_env = rememberEval alts_env1 case_bndrr scrut' ; alts' <- mapM (lvl_alt alts_env) alts ; return (Case scrut' case_bndr' ty' alts') } where @@ -497,17 +517,8 @@ the inner loop. Things to note: - * The test we perform is exprIsHNF, and /not/ exprOkForSpeculation. - - - exprIsHNF catches the key case of an evaluated variable - - - exprOkForSpeculation is /false/ of an evaluated variable; - See Note [exprOkForSpeculation and evaluated variables] in GHC.Core.Utils - So we'd actually miss the key case! - - - Nothing is gained from the extra generality of exprOkForSpeculation - since we only consider floating a case whose single alternative - is a DataAlt K a b -> rhs + * The test we perform is exprOkForSpeculation, because speculating the case is + exactly what we do. * We can't float a case to top level @@ -557,8 +568,8 @@ needed to quantify over some of its free variables (e.g. z), resulting in shadowing and very confusing Core Lint failures. -Note [Check the output scrutinee for exprIsHNF] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Note [Check the output scrutinee for exprOkForSpeculation] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider this: case x of y { A -> ....(case y of alts).... @@ -572,10 +583,10 @@ evaluated), but the former is not -- and indeed we can't float the inner case out, at least not unless x is also evaluated at its binding site. See #5453. -That's why we apply exprIsHNF to scrut' and not to scrut. +That's why we apply exprOkForSpeculation to scrut' and not to scrut. See Note [Floating single-alternative cases] for why -we use exprIsHNF in the first place. +we use exprOkForSpeculation in the first place. -} lvlNonTailMFE :: LevelEnv -- Level of in-scope names/tyvars @@ -632,7 +643,7 @@ lvlMFE env strict_ctxt ann_expr | float_is_new_lam || exprIsTopLevelBindable expr expr_ty -- No wrapping needed if the type is lifted, or is a literal string -- or if we are wrapping it in one or more value lambdas - = do { expr1 <- lvlFloatRhs abs_vars dest_lvl rhs_env NonRecursive + = do { expr1 <- lvlFloatRhs abs_vars eval_vars dest_lvl rhs_env NonRecursive is_bot_lam NotJoinPoint ann_expr -- Treat the expr just like a right-hand side ; var <- newLvlVar expr1 NotJoinPoint is_mk_static @@ -653,6 +664,7 @@ lvlMFE env strict_ctxt ann_expr = do { expr1 <- lvlExpr rhs_env ann_expr ; let l1r = incMinorLvlFrom rhs_env float_rhs = mkLams abs_vars_w_lvls $ + flip (foldr (wrapEval l1r)) eval_vars $ Case expr1 (stayPut l1r ubx_bndr) box_ty [Alt DEFAULT [] (App boxing_expr (Var ubx_bndr))] @@ -678,7 +690,8 @@ lvlMFE env strict_ctxt ann_expr -- See Note [Bottoming floats] -- esp Bottoming floats (2) expr_ok_for_spec = exprOkForSpeculation expr - abs_vars = abstractVars dest_lvl env fvs + (abs_vars, eval_vars) = eliminateAbsCaseBndrs dest_lvl env $ + abstractVars dest_lvl env fvs dest_lvl = destLevel env fvs fvs_ty is_function is_bot_lam -- NB: is_bot_lam not is_bot; see (3) in -- Note [Bottoming floats] @@ -701,16 +714,16 @@ lvlMFE env strict_ctxt ann_expr float_me = saves_work || saves_alloc || is_mk_static -- See Note [Saving work] - saves_work = escapes_value_lam -- (a) - && not (exprIsHNF expr) -- (b) - && not float_is_new_lam -- (c) + saves_work = escapes_value_lam -- (a) + && not (exprOkForSpeculation expr) -- (b) + && not float_is_new_lam -- (c) escapes_value_lam = dest_lvl `ltMajLvl` (le_ctxt_lvl env) -- See Note [Saving allocation] and Note [Floating to the top] saves_alloc = isTopLvl dest_lvl && floatConsts env && ( not strict_ctxt -- (a) - || exprIsHNF expr -- (b) + || exprOkForSpeculation expr -- (b) || (is_bot_lam && escapes_value_lam)) -- (c) hasFreeJoin :: LevelEnv -> DVarSet -> Bool @@ -730,14 +743,14 @@ But see also Note [Saving allocation]. So we definitely float an expression out if (a) It will escape a value lambda (escapes_value_lam) -(b) The expression is not a head-normal form (exprIsHNF); see (SW1, SW2). +(b) The expression is not a head-normal form (exprOkForSpeculation); see (SW1, SW2). (c) Floating does not require wrapping it in value lambdas (float_is_new_lam). See (SW3) below Wrinkles: (SW1) Concerning (b) I experimented with using `exprIsCheap` rather than - `exprIsHNF` but the latter seems better, according to nofib + `exprOkForSpeculation` but the latter seems better, according to nofib (`spectral/mate` got 10% worse with exprIsCheap). It's really a bit of a heuristic. @@ -755,7 +768,7 @@ Wrinkles: See !12410 for some data comparing the effect of omitting (b) altogether, This doesn't apply, though, if we float the thing to the top level; see Note [Floating to the top]. Bottom line (data from !12410): adding the - not.exprIsHNF test to `saves_work`: + not.exprOkForSpeculation test to `saves_work`: - Decreases compiler allocations by 0.5% - Occasionally decreases runtime allocation (T12996 -2.5%) - Slightly mixed effect on nofib: (puzzle -10%, mate -5%, cichelli +5%) @@ -1233,7 +1246,7 @@ lvlBind env (AnnNonRec bndr rhs) -- Otherwise we are going to float | null abs_vars = do { -- No type abstraction; clone existing binder - rhs' <- lvlFloatRhs [] dest_lvl env NonRecursive + rhs' <- lvlFloatRhs [] [] dest_lvl env NonRecursive is_bot_lam NotJoinPoint rhs ; (env', [bndr']) <- cloneLetVars NonRecursive env dest_lvl [bndr] ; let bndr2 = annotateBotStr bndr' 0 mb_bot_str @@ -1241,7 +1254,7 @@ lvlBind env (AnnNonRec bndr rhs) | otherwise = do { -- Yes, type abstraction; create a new binder, extend substitution, etc - rhs' <- lvlFloatRhs abs_vars dest_lvl env NonRecursive + rhs' <- lvlFloatRhs abs_vars eval_vars dest_lvl env NonRecursive is_bot_lam NotJoinPoint rhs ; (env', [bndr']) <- newPolyBndrs dest_lvl env abs_vars [bndr] ; let bndr2 = annotateBotStr bndr' n_extra mb_bot_str @@ -1252,7 +1265,8 @@ lvlBind env (AnnNonRec bndr rhs) ty_fvs = tyCoVarsOfType bndr_ty rhs_fvs = freeVarsOf rhs bind_fvs = rhs_fvs `unionDVarSet` dIdFreeVars bndr - abs_vars = abstractVars dest_lvl env bind_fvs + (abs_vars, eval_vars) = eliminateAbsCaseBndrs dest_lvl env $ + abstractVars dest_lvl env bind_fvs dest_lvl = destLevel env bind_fvs ty_fvs (isFunction rhs) is_bot_lam deann_rhs = deAnnotate rhs @@ -1332,9 +1346,8 @@ lvlBind env (AnnRec pairs) -- function in a Rec, and we don't much care what -- happens to it. False is simple! - do_rhs env (_,rhs) = lvlFloatRhs abs_vars dest_lvl env Recursive - is_bot NotJoinPoint - rhs + do_rhs env (_,rhs) = lvlFloatRhs abs_vars eval_vars dest_lvl env Recursive + is_bot NotJoinPoint rhs -- Finding the free vars of the binding group is annoying bind_fvs = ((unionDVarSets [ freeVarsOf rhs | (_, rhs) <- pairs]) @@ -1346,7 +1359,8 @@ lvlBind env (AnnRec pairs) ty_fvs = foldr (unionVarSet . tyCoVarsOfType . idType) emptyVarSet bndrs dest_lvl = destLevel env bind_fvs ty_fvs is_fun is_bot - abs_vars = abstractVars dest_lvl env bind_fvs + (abs_vars, eval_vars) = eliminateAbsCaseBndrs dest_lvl env $ + abstractVars dest_lvl env bind_fvs is_top_bindable = not (any (mightBeUnliftedType . idType) bndrs) -- This mightBeUnliftedType stuff is the same test as in the non-rec case @@ -1396,21 +1410,28 @@ lvlRhs :: LevelEnv -> CoreExprWithFVs -> LvlM LevelledExpr lvlRhs env rec_flag is_bot mb_join_arity expr - = lvlFloatRhs [] (le_ctxt_lvl env) env + = lvlFloatRhs [] [] (le_ctxt_lvl env) env rec_flag is_bot mb_join_arity expr -lvlFloatRhs :: [OutVar] -> Level -> LevelEnv -> RecFlag +wrapEval :: Level -> (OutId, OutId) -> Expr LevelledBndr -> Expr LevelledBndr +-- A bit like GHC.Core.Utils.mkDefaultCase, but `Expr LevelledBndr` +wrapEval dest_lvl (scrut_v, case_bndr) body + = Case (Var scrut_v) (TB case_bndr (StayPut dest_lvl)) + (exprType $ deTagExpr body) [Alt DEFAULT [] body] + +lvlFloatRhs :: [OutVar] -> [(OutId,OutId)] -> Level -> LevelEnv -> RecFlag -> Bool -- Binding is for a bottoming function -> JoinPointHood -> CoreExprWithFVs -> LvlM (Expr LevelledBndr) -- Ignores the le_ctxt_lvl in env; treats dest_lvl as the baseline -lvlFloatRhs abs_vars dest_lvl env rec is_bot mb_join_arity rhs - = do { body' <- if not is_bot -- See Note [Floating from a RHS] +lvlFloatRhs abs_vars eval_vars dest_lvl env rec is_bot mb_join_arity rhs + = do { body1 <- if not is_bot -- See Note [Floating from a RHS] && any isId bndrs then lvlMFE body_env True body else lvlExpr body_env body - ; return (mkLams bndrs' body') } + ; let body2 = foldr (wrapEval dest_lvl) body1 eval_vars + ; return (mkLams bndrs' body2) } where (bndrs, body) | JoinPoint join_arity <- mb_join_arity = collectNAnnBndrs join_arity rhs @@ -1633,14 +1654,20 @@ countFreeIds = nonDetStrictFoldUDFM add 0 . getUniqDSet data LevelEnv = LE { le_switches :: FloatOutSwitches - , le_ctxt_lvl :: Level -- The current level - , le_lvl_env :: VarEnv Level -- Domain is *post-cloned* TyVars and Ids + , le_ctxt_lvl :: Level + -- ^ The current level + , le_lvl_env :: VarEnv (Level, Maybe OutId) + -- ^ Domain is *post-cloned* TyVars and Ids. + -- If `Just scrut`, then the var mapping belongs to a case binder with + -- variable scrutinee `scrut`. + -- This is to support Note [Duplicate evals into float]. -- See Note [le_subst and le_env] - , le_subst :: Subst -- Domain is pre-cloned TyVars and Ids - -- The Id -> CoreExpr in the Subst is ignored - -- (since we want to substitute a LevelledExpr for - -- an Id via le_env) but we do use the Co/TyVar substs + , le_subst :: Subst + -- ^ Domain is pre-cloned TyVars and Ids. + -- The Id -> CoreExpr in the Subst is ignored + -- (since we want to substitute a LevelledExpr for + -- an Id via le_env) but we do use the Co/TyVar substs , le_env :: IdEnv ([OutVar], LevelledExpr) -- Domain is pre-cloned Ids } @@ -1690,10 +1717,10 @@ initialEnv float_lams binds -- to a later one. So here we put all the top-level binders in scope before -- we start, to satisfy the lookupIdSubst invariants (#20200 and #20294) -addLvl :: Level -> VarEnv Level -> OutVar -> VarEnv Level -addLvl dest_lvl env v' = extendVarEnv env v' dest_lvl +addLvl :: Level -> VarEnv (Level, Maybe OutId) -> OutVar -> VarEnv (Level, Maybe OutId) +addLvl dest_lvl env v' = extendVarEnv env v' (dest_lvl, Nothing) -addLvls :: Level -> VarEnv Level -> [OutVar] -> VarEnv Level +addLvls :: Level -> VarEnv (Level, Maybe OutId) -> [OutVar] -> VarEnv (Level, Maybe OutId) addLvls dest_lvl env vs = foldl' (addLvl dest_lvl) env vs floatLams :: LevelEnv -> Maybe Int @@ -1711,20 +1738,19 @@ floatTopLvlOnly le = floatToTopLevelOnly (le_switches le) incMinorLvlFrom :: LevelEnv -> Level incMinorLvlFrom env = incMinorLvl (le_ctxt_lvl env) --- extendCaseBndrEnv adds the mapping case-bndr->scrut-var if it can --- See Note [Binder-swap during float-out] -extendCaseBndrEnv :: LevelEnv - -> Id -- Pre-cloned case binder - -> Expr LevelledBndr -- Post-cloned scrutinee - -> LevelEnv -extendCaseBndrEnv le@(LE { le_subst = subst, le_env = id_env }) +-- rememberEval adds the mapping case-bndr->scrut-var if it can +-- See Note [Duplicate evals into float] +rememberEval :: LevelEnv + -> OutId -- Post-cloned case binder + -> Expr LevelledBndr -- Post-cloned scrutinee + -> LevelEnv +rememberEval le@(LE { le_lvl_env = lvl_env }) case_bndr (Var scrut_var) -- We could use OccurAnal. scrutOkForBinderSwap here, and perhaps -- get a bit more floating. But we didn't in the past and it's -- an unforced change, so I'm leaving it. - = le { le_subst = extendSubstWithVar subst case_bndr scrut_var - , le_env = add_id id_env (case_bndr, scrut_var) } -extendCaseBndrEnv env _ _ = env + = le { le_lvl_env = modifyVarEnv (\(lvl,_) -> (lvl, Just scrut_var)) lvl_env case_bndr } +rememberEval env _ _ = env maxFvLevel :: (Var -> Bool) -> LevelEnv -> DVarSet -> Level maxFvLevel max_me env var_set @@ -1745,8 +1771,8 @@ maxIn max_me (LE { le_lvl_env = lvl_env, le_env = id_env }) in_var lvl where max_out out_var lvl | max_me out_var = case lookupVarEnv lvl_env out_var of - Just lvl' -> maxLvl lvl' lvl - Nothing -> lvl + Just (lvl',_) -> maxLvl lvl' lvl + Nothing -> lvl | otherwise = lvl -- Ignore some vars depending on max_me lookupVar :: LevelEnv -> Id -> LevelledExpr @@ -1765,20 +1791,16 @@ abstractVars :: Level -> LevelEnv -> DVarSet -> [OutVar] -- variable computation and deterministic sort. -- See Note [Unique Determinism] in GHC.Types.Unique for explanation of why -- Uniques are not deterministic. -abstractVars dest_lvl (LE { le_subst = subst, le_lvl_env = lvl_env }) in_fvs +abstractVars dest_lvl le@(LE { le_subst = subst }) in_fvs = -- NB: sortQuantVars might not put duplicates next to each other - map zap $ sortQuantVars $ - filter abstract_me $ - dVarSetElems $ - closeOverKindsDSet $ + map zap $ sortQuantVars $ + filter (abstractMe dest_lvl le) $ + dVarSetElems $ + closeOverKindsDSet $ substDVarSet subst in_fvs -- NB: it's important to call abstract_me only on the OutIds the -- come from substDVarSet (not on fv, which is an InId) where - abstract_me v = case lookupVarEnv lvl_env v of - Just lvl -> dest_lvl `ltLvl` lvl - Nothing -> False - -- We are going to lambda-abstract, so nuke any IdInfo, -- and add the tyvars of the Id (if necessary) zap v | isId v = warnPprTrace (isStableUnfolding (idUnfolding v) || @@ -1787,6 +1809,31 @@ abstractVars dest_lvl (LE { le_subst = subst, le_lvl_env = lvl_env }) in_fvs setIdInfo v vanillaIdInfo | otherwise = v +abstractMe :: Level -> LevelEnv -> Var -> Bool +abstractMe dest_lvl (LE { le_lvl_env = lvl_env }) v + | Just (lvl, _) <- lookupVarEnv lvl_env v + = dest_lvl `ltLvl` lvl + | otherwise + = False + +eliminateAbsCaseBndrs :: Level -> LevelEnv -> [OutVar] -> ([OutVar], [(OutId,OutId)]) +-- Try turning all runtime abs_vars into evals. +-- See Note [Duplicate evals into float] +eliminateAbsCaseBndrs dest_lvl le@(LE { le_lvl_env = lvl_env }) abs_vars + | enables_thunking -- otherwise we do not get to safe work anyway! + = res + | otherwise + = (abs_vars, []) + where + res@(abs_vars',_eval_vars') = partitionEithers (map try_elim abs_vars) + enables_thunking = not (any isRuntimeVar abs_vars') + + try_elim v = case lookupVarEnv lvl_env v of + Just (_, Just scrut_id) + | not (abstractMe dest_lvl le scrut_id) -- would not abstract scrut_id + -> Right (scrut_id, v) -- turn abs_var v into an eval on scrut_id! + _ -> Left v -- retain as an abs_var + type LvlM result = UniqSM result initLvl :: UniqSupply -> UniqSM a -> a @@ -1835,9 +1882,12 @@ newLvlVar :: LevelledExpr -- The RHS of the new binding -> LvlM Id newLvlVar lvld_rhs join_arity_maybe is_mk_static = do { uniq <- getUniqueM - ; return (add_join_info (mk_id uniq rhs_ty)) + ; return (add_evald $ add_join_info $ mk_id uniq rhs_ty) } where + add_evald var + | exprIsHNF de_tagged_rhs = var `setIdUnfolding` evaldUnfolding + | otherwise = var add_join_info var = var `asJoinId_maybe` join_arity_maybe de_tagged_rhs = deTagExpr lvld_rhs rhs_ty = exprType de_tagged_rhs ===================================== compiler/GHC/Core/Opt/WorkWrap/Utils.hs ===================================== @@ -1598,7 +1598,7 @@ move_transit_vars :: [Id] -> (CoreExpr -> CoreExpr -> CoreExpr, CoreExpr) move_transit_vars vars | [var] <- vars , let var_ty = idType var - , isUnliftedType var_ty || exprIsHNF (Var var) + , isUnliftedType var_ty || isEvaldUnfolding (idUnfolding var) -- See Note [No unboxed tuple for single, unlifted transit var] -- * Wrapper: `unbox scrut alt = (case of a -> )` -- * Worker: `tup = a` @@ -1702,9 +1702,7 @@ return unboxed instead of in an unboxed singleton tuple: We want `$wh :: Int# -> [Int]`. We'd get `$wh :: Int# -> (# [Int] #)`. -By considering vars as unlifted that satisfy 'exprIsHNF', we catch (3). -Why not check for 'exprOkForSpeculation'? Quite perplexingly, evaluated vars -are not ok-for-spec, see Note [exprOkForSpeculation and evaluated variables]. +By considering vars as evaluated that have an evald unfolding, we catch (3). For (1) and (2) we would have to look at the term. WW only looks at the type and the CPR signature, so the only way to fix (1) and (2) would be to have a nested termination signature, like in MR !1866. ===================================== compiler/GHC/Core/Subst.hs ===================================== @@ -519,7 +519,9 @@ substUnfolding subst df@(DFunUnfolding { df_bndrs = bndrs, df_args = args }) substUnfolding subst unf@(CoreUnfolding { uf_tmpl = tmpl, uf_src = src }) -- Retain stable unfoldings | not (isStableSource src) -- Zap an unstable unfolding, to save substitution work - = NoUnfolding + = if isEvaldUnfolding unf + then evaldUnfolding + else NoUnfolding | otherwise -- But keep a stable one! = seqExpr new_tmpl `seq` unf { uf_tmpl = new_tmpl } ===================================== compiler/GHC/Core/TyCo/Subst.hs ===================================== @@ -22,6 +22,7 @@ module GHC.Core.TyCo.Subst extendCvSubst, extendCvSubstWithClone, extendTvSubst, extendTvSubstWithClone, extendTvSubstList, extendTvSubstAndInScope, + extendCvSubstAndInScope, extendTCvSubstList, unionSubst, zipTyEnv, zipCoEnv, zipTvSubst, zipCvSubst, @@ -408,6 +409,14 @@ extendTvSubstAndInScope (Subst in_scope ids tenv cenv) tv ty (extendVarEnv tenv tv ty) cenv +extendCvSubstAndInScope :: Subst -> CoVar -> Coercion -> Subst +-- Also extends the in-scope set +extendCvSubstAndInScope (Subst in_scope ids tenv cenv) cv co + = Subst (in_scope `extendInScopeSetSet` tyCoVarsOfCo co) + ids + tenv + (extendVarEnv cenv cv co) + -- | Adds multiple 'TyVar' substitutions to the 'Subst': see also 'extendTvSubst' extendTvSubstList :: Subst -> [(TyVar,Type)] -> Subst extendTvSubstList subst vrs ===================================== compiler/GHC/Core/Type.hs ===================================== @@ -55,7 +55,7 @@ module GHC.Core.Type ( splitForAllForAllTyBinders, splitForAllForAllTyBinder_maybe, splitForAllTyCoVar_maybe, splitForAllTyCoVar, splitForAllTyVar_maybe, splitForAllCoVar_maybe, - splitPiTy_maybe, splitPiTy, splitPiTys, collectPiTyBinders, + splitPiTy_maybe, splitPiTy, splitPiTys, getRuntimeArgTys, mkTyConBindersPreferAnon, mkPiTy, mkPiTys, @@ -290,7 +290,6 @@ import GHC.Utils.Panic import GHC.Data.FastString import GHC.Data.Maybe ( orElse, isJust, firstJust ) -import GHC.List (build) -- $type_classification -- #type_classification# @@ -2056,18 +2055,6 @@ splitPiTys ty = split ty ty [] split orig_ty ty bs | Just ty' <- coreView ty = split orig_ty ty' bs split orig_ty _ bs = (reverse bs, orig_ty) -collectPiTyBinders :: Type -> [PiTyBinder] -collectPiTyBinders ty = build $ \c n -> - let - split (ForAllTy b res) = Named b `c` split res - split (FunTy { ft_af = af, ft_mult = w, ft_arg = arg, ft_res = res }) - = Anon (Scaled w arg) af `c` split res - split ty | Just ty' <- coreView ty = split ty' - split _ = n - in - split ty -{-# INLINE collectPiTyBinders #-} - -- | Extracts a list of run-time arguments from a function type, -- looking through newtypes to the right of arrows. -- ===================================== compiler/GHC/Core/Utils.hs ===================================== @@ -74,9 +74,11 @@ import GHC.Core.Ppr import GHC.Core.FVs( bindFreeVars ) import GHC.Core.DataCon import GHC.Core.Type as Type +import GHC.Core.TyCo.Rep as Type import GHC.Core.Predicate( isCoVarType ) import GHC.Core.FamInstEnv import GHC.Core.TyCo.Compare( eqType, eqTypeX ) +import GHC.Core.TyCo.Subst import GHC.Core.Coercion import GHC.Core.Reduction import GHC.Core.TyCon @@ -1714,7 +1716,8 @@ it's applied only to dictionaries. ----------------------------- -- | To a first approximation, 'exprOkForSpeculation' returns True of --- an expression that is: +-- an expression that is nearly a value (i.e., it implies 'exprIsHNF'). +-- That is, the expression is -- -- * Safe to evaluate even if normal order eval might not -- evaluate the expression at all, and @@ -1740,29 +1743,19 @@ it's applied only to dictionaries. -- But in fact both functions are a bit more conservative than the above, -- in at least the following ways: -- --- * W1: We do not take advantage of already-evaluated lifted variables. --- As a result, 'exprIsHNF' DOES NOT imply 'exprOkForSpeculation'; --- if @y@ is a case-binder of lifted type, then @exprIsHNF y@ is --- 'True', while @exprOkForSpeculation y@ is 'False'. --- See Note [exprOkForSpeculation and evaluated variables] for why. --- * W2: Read-effects on mutable variables are currently also included. +-- * W1: Read-effects on mutable variables are currently also included. -- See Note [Classifying primop effects] "GHC.Builtin.PrimOps". --- * W3: Currently, 'exprOkForSpeculation' always returns 'False' for --- let-expressions. Lets can be stacked deeply, so we just give up. --- In any case, the argument of 'exprOkForSpeculation' is usually in --- a strict context, so any lets will have been floated away. --- -- -- As an example of the considerations in this test, consider: -- -- > let x = case y# +# 1# of { r# -> I# r# } --- > in E +-- > in e -- -- being translated to: -- -- > case y# +# 1# of { r# -> -- > let x = I# r# --- > in E +-- > in e -- > } -- -- We can only do this if the @y# +# 1#@ is ok for speculation: it has no @@ -1811,14 +1804,12 @@ expr_ok fun_ok primop_ok (Tick tickish e) | tickishCounts tickish = False | otherwise = expr_ok fun_ok primop_ok e -expr_ok _ _ (Let {}) = False --- See W3 in the Haddock comment for exprOkForSpeculation +expr_ok fun_ok primop_ok (Let _ e) = expr_ok fun_ok primop_ok e + -- Ignore binds becaue of Note [Core let-can-float invariant] in GHC.Core -expr_ok fun_ok primop_ok (Case scrut bndr _ alts) +expr_ok fun_ok primop_ok (Case scrut _ _ alts) = -- See Note [exprOkForSpeculation: case expressions] expr_ok fun_ok primop_ok scrut - && isUnliftedType (idType bndr) - -- OK to call isUnliftedType: binders always have a fixed RuntimeRep && all (\(Alt _ _ rhs) -> expr_ok fun_ok primop_ok rhs) alts && altsAreExhaustive alts @@ -1847,7 +1838,7 @@ app_ok fun_ok primop_ok fun args | idArity fun > n_val_args -- Partial application: just check passing the arguments is OK - = args_ok + = args_ok notCBV | otherwise = case idDetails fun of @@ -1857,9 +1848,10 @@ app_ok fun_ok primop_ok fun args DataConWorkId dc | isLazyDataConRep dc - -> args_ok + -> args_ok notCBV | otherwise - -> fields_ok (dataConRepStrictness dc) + -> args_ok (dataConRepStrictness dc) + -- See (SFC1) of Note [Strict fields in Core] ClassOpId _ is_terminating_result | is_terminating_result -- See Note [exprOkForSpeculation and type classes] @@ -1881,7 +1873,7 @@ app_ok fun_ok primop_ok fun args -- Often there is a literal divisor, and this -- can get rid of a thunk in an inner loop - | otherwise -> primop_ok op && args_ok + | otherwise -> primop_ok op && args_ok notCBV _other -- Unlifted and terminating types; -- Also c.f. the Var case of exprIsHNF @@ -1898,37 +1890,54 @@ app_ok fun_ok primop_ok fun args -- See (U12) of Note [Implementing unsafeCoerce] | fun `hasKey` unsafeEqualityProofIdKey -> True - | otherwise -> False - -- NB: even in the nullary case, do /not/ check - -- for evaluated-ness of the fun; - -- see Note [exprOkForSpeculation and evaluated variables] + | 0 <- n_val_args + , isEvaldUnfolding (idUnfolding fun) + -> -- pprTrace "yes" (ppr fun) + True + + | otherwise -> -- pprTrace "no" (ppr fun <+> ppr args) + False where fun_ty = idType fun n_val_args = valArgCount args - (arg_tys, _) = splitPiTys fun_ty -- Even if a function call itself is OK, any unlifted - -- args are still evaluated eagerly and must be checked - args_ok = all2Prefix arg_ok arg_tys args - arg_ok :: PiTyVarBinder -> CoreExpr -> Bool - arg_ok (Named _) _ = True -- A type argument - arg_ok (Anon ty _) arg -- A term argument - | definitelyLiftedType (scaledThing ty) - = True -- lifted args are not evaluated eagerly + -- args are still evaluated eagerly and must be checked. + -- Furthermore, for saturated calls, we must check CBV args (strict fields + -- of DataCons!) + args_ok str_marks = relevantAppArgsSatisfy arg_ok fun_ty args str_marks + arg_ok :: Type -> CoreExpr -> StrictnessMark -> Bool + arg_ok ty arg str + | NotMarkedStrict <- str -- iff it's not a CBV arg + , definitelyLiftedType ty -- and its type is lifted + = True -- then the worker app does not eval | otherwise = expr_ok fun_ok primop_ok arg - -- Used for strict DataCon worker arguments - -- See (SFC1) of Note [Strict fields in Core] - fields_ok str_marks = all3Prefix field_ok arg_tys str_marks args - field_ok :: PiTyVarBinder -> StrictnessMark -> CoreExpr -> Bool - field_ok (Named _) _ _ = True - field_ok (Anon ty _) str arg - | NotMarkedStrict <- str -- iff it's a lazy field - , definitelyLiftedType (scaledThing ty) -- and its type is lifted - = True -- then the worker app does not eval - | otherwise - = expr_ok fun_ok primop_ok arg +notCBV :: [StrictnessMark] +notCBV = repeat NotMarkedStrict + +relevantAppArgsSatisfy :: (Type -> CoreExpr -> StrictnessMark -> Bool) -> Type -> [CoreExpr] -> [StrictnessMark] -> Bool +-- This calls the predicate on every non-Type CoreExpr arg. +-- We could just do `exprType arg` for every such arg, but carrying around a +-- substitution is much more efficient. +-- The obvious definition regresses T16577 by 30% so we don't do it. +relevantAppArgsSatisfy p ty = go (mkEmptySubst in_scope) ty + where + in_scope = mkInScopeSet (tyCoVarsOfType ty) + go subst (ForAllTy b res) (Type ty : args) strs + = go (extendTvSubstAndInScope subst (binderVar b) ty) res args strs + go subst (ForAllTy b res) (Coercion co : args) strs + = go (extendCvSubstAndInScope subst (binderVar b) co) res args strs + go subst (FunTy { ft_arg = arg, ft_res = res }) (e : args) (str : strs) + = p (substTy subst arg) e str && go subst res args strs + go subst ty args@(_:_) strs@(_:_) + | Just ty' <- coreView (substTy subst ty) + = go (mkEmptySubst (getSubstInScope subst)) ty' args strs + | otherwise + = pprPanic "Should see more argument tys" (ppr ty $$ ppr subst $$ ppr args $$ ppr (take 10 strs)) + go _ _ _ _ = True +{-# INLINE relevantAppArgsSatisfy #-} ----------------------------- altsAreExhaustive :: [Alt b] -> Bool @@ -1985,6 +1994,8 @@ GHC.Types.Id.Make.mkDictSelId for where this field is initialised. Note [exprOkForSpeculation: case expressions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +SG: I don't get what is so "very special" about this case. I find it very reasonable. + exprOkForSpeculation accepts very special case expressions. Reason: (a ==# b) is ok-for-speculation, but the litEq rules in GHC.Core.Opt.ConstantFold convert it (a ==# 3#) to @@ -1994,39 +2005,22 @@ for excellent reasons described in So, annoyingly, we want that case expression to be ok-for-speculation too. Bother. -But we restrict it sharply: - -* We restrict it to unlifted scrutinees. Consider this: - case x of y { - DEFAULT -> ... (let v::Int# = case y of { True -> e1 - ; False -> e2 } - in ...) ... - - Does the RHS of v satisfy the let-can-float invariant? Previously we said - yes, on the grounds that y is evaluated. But the binder-swap done - by GHC.Core.Opt.SetLevels would transform the inner alternative to - DEFAULT -> ... (let v::Int# = case x of { ... } - in ...) .... - which does /not/ satisfy the let-can-float invariant, because x is - not evaluated. See Note [Binder-swap during float-out] - in GHC.Core.Opt.SetLevels. To avoid this awkwardness it seems simpler - to stick to unlifted scrutinees where the issue does not - arise. - -* We restrict it to exhaustive alternatives. A non-exhaustive - case manifestly isn't ok-for-speculation. for example, - this is a valid program (albeit a slightly dodgy one) - let v = case x of { B -> ...; C -> ... } - in case x of - A -> ... - _ -> ...v...v.... - Should v be considered ok-for-speculation? Its scrutinee may be - evaluated, but the alternatives are incomplete so we should not - evaluate it strictly. - - Now, all this is for lifted types, but it'd be the same for any - finite unlifted type. We don't have many of them, but we might - add unlifted algebraic types in due course. +SG: Again, I don't see why we need to list a specific example. +Clearly, we want to detect as many expressions as ok-for-spec as possible! + +But we restrict it to exhaustive alternatives. A non-exhaustive +case manifestly isn't ok-for-speculation. For example, +this is a valid program (albeit a slightly dodgy one) + let v = case x of { B -> ...; C -> ... } + in case x of + A -> ... + _ -> ...v...v.... +Should v be considered ok-for-speculation? Its scrutinee may be +evaluated, but the alternatives are incomplete so we should not +evaluate it strictly. + +Now, all this is for lifted types, but it'd be the same for any +finite unlifted type. ----- Historical note: #15696: -------- @@ -2073,37 +2067,6 @@ points do the job nicely. ------- End of historical note ------------ -Note [exprOkForSpeculation and evaluated variables] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Consider these examples: - * case x of y { DEFAULT -> ....y.... } - Should 'y' (alone) be considered ok-for-speculation? - - * case x of y { DEFAULT -> ....let z = dataToTagLarge# y... } - Should (dataToTagLarge# y) be considered ok-for-spec? Recall that - dataToTagLarge# :: forall a. a -> Int# - must always evaluate its argument. (See also Note [DataToTag overview].) - -You could argue 'yes', because in the case alternative we know that -'y' is evaluated. But the binder-swap transformation, which is -extremely useful for float-out, changes these expressions to - case x of y { DEFAULT -> ....x.... } - case x of y { DEFAULT -> ....let z = dataToTagLarge# x... } - -And now the expression does not obey the let-can-float invariant! Yikes! -Moreover we really might float (dataToTagLarge# x) outside the case, -and then it really, really doesn't obey the let-can-float invariant. - -The solution is simple: exprOkForSpeculation does not try to take -advantage of the evaluated-ness of (lifted) variables. And it returns -False (always) for primops that perform evaluation. We achieve the latter -by marking the relevant primops as "ThrowsException" or -"ReadWriteEffect"; see also Note [Classifying primop effects] in -GHC.Builtin.PrimOps. - -Note that exprIsHNF /can/ and does take advantage of evaluated-ness; -it doesn't have the trickiness of the let-can-float invariant to worry about. - ************************************************************************ * * exprIsHNF, exprIsConLike @@ -2166,7 +2129,6 @@ exprIsHNFlike is_con is_con_unf e || is_con_unf (idUnfolding v) -- Check the thing's unfolding; it might be bound to a value -- or to a guaranteed-evaluated variable (isEvaldUnfolding) - -- Contrast with Note [exprOkForSpeculation and evaluated variables] -- We don't look through loop breakers here, which is a bit conservative -- but otherwise I worry that if an Id's unfolding is just itself, -- we could get an infinite loop @@ -2185,66 +2147,59 @@ exprIsHNFlike is_con is_con_unf e && is_hnf_like e -- See Note [exprIsHNF Tick] is_hnf_like (Cast e _) = is_hnf_like e - is_hnf_like (App e a) - | isValArg a = app_is_value e [a] - | otherwise = is_hnf_like e is_hnf_like (Let _ e) = is_hnf_like e -- Lazy let(rec)s don't affect us is_hnf_like (Case e b _ as) | Just rhs <- isUnsafeEqualityCase e b as = is_hnf_like rhs - is_hnf_like _ = False - - -- Collect arguments through Casts and Ticks and call id_app_is_value - app_is_value :: CoreExpr -> [CoreArg] -> Bool - app_is_value (Var f) as = id_app_is_value f as - app_is_value (Tick _ f) as = app_is_value f as - app_is_value (Cast f _) as = app_is_value f as - app_is_value (App f a) as | isValArg a = app_is_value f (a:as) - | otherwise = app_is_value f as - app_is_value _ _ = False - - id_app_is_value id val_args = + is_hnf_like e + | (fun, args) <- collectArgs e + = case stripTicksTopE (not . tickishCounts) fun of + Var f -> id_app_is_value f args + + -- 'LitRubbish' is the only literal that can occur in the head of an + -- application and will not be matched by the above case (Var /= Lit). + -- See Note [How a rubbish literal can be the head of an application] + -- in GHC.Types.Literal + Lit lit | debugIsOn, not (isLitRubbish lit) + -> pprPanic "Non-rubbish lit in app head" (ppr lit) + | otherwise + -> True + + _ -> False + + id_app_is_value id args = -- See Note [exprIsHNF for function applications] -- for the specification and examples - case compare (idArity id) (length val_args) of + case compare (idArity id) n_val_args of EQ | is_con id -> -- Saturated app of a DataCon/CONLIKE Id case mb_str_marks id of Just str_marks -> -- with strict fields; see (SFC1) of Note [Strict fields in Core] - assert (val_args `equalLength` str_marks) $ - fields_hnf str_marks + args_hnf str_marks Nothing -> -- without strict fields: like PAP - args_hnf -- NB: CONLIKEs are lazy! + args_hnf notCBV -- NB: CONLIKEs are lazy! - GT -> -- PAP: Check unlifted val_args - args_hnf + GT -> -- PAP: Check unlifted args + args_hnf notCBV _ -> False where - -- Saturated, Strict DataCon: Check unlifted val_args and strict fields - fields_hnf str_marks = all3Prefix check_field val_arg_tys str_marks val_args - - -- PAP: Check unlifted val_args - args_hnf = all2Prefix check_arg val_arg_tys val_args - fun_ty = idType id - val_arg_tys = mapMaybe anonPiTyBinderType_maybe (collectPiTyBinders fun_ty) - -- val_arg_tys = map exprType val_args, but much less costly. - -- The obvious definition regresses T16577 by 30% so we don't do it. - - check_arg a_ty a + n_val_args = valArgCount args + -- Check the args for HNFness. + args_hnf str_marks = relevantAppArgsSatisfy check_arg fun_ty args str_marks + -- * Unlifted args must always be HNF + -- * CBV args (strict fields!) must be HNF for saturated calls, + -- indicated by str_marks + check_arg a_ty a str | mightBeUnliftedType a_ty = is_hnf_like a + | isMarkedStrict str = is_hnf_like a | otherwise = True -- Check unliftedness; for example f (x /# 12#) where f has arity two, -- and the first argument is unboxed. This is not a value! -- But f 34# is a value, so check args for HNFs. -- NB: We check arity (and CONLIKEness) first because it's cheaper -- and we reject quickly on saturated apps. - check_field a_ty str a - | mightBeUnliftedType a_ty = is_hnf_like a - | isMarkedStrict str = is_hnf_like a - | otherwise = True - -- isMarkedStrict: Respect Note [Strict fields in Core] mb_str_marks id | Just dc <- isDataConWorkId_maybe id ===================================== compiler/GHC/CoreToStg/Prep.hs ===================================== @@ -2241,6 +2241,20 @@ decideFloatInfo FIA{fia_levity=lev, fia_demand=dmd, fia_is_hnf=is_hnf, | Lifted <- lev = (LetBound, TopLvlFloatable) -- And these float freely but can't be speculated, hence LetBound +instance Outputable FloatInfoArgs where + ppr FIA{ fia_levity=lev, fia_demand=dmd, fia_is_hnf=hnf, fia_is_triv=triv + , fia_is_string=string, fia_is_dc_worker=dcw, fia_ok_for_spec=ok_spec } + = brackets (pprWithCommas id traits) + where + traits = concat $ + [ [ text "string" | string ] + , [ text "DataCon worker binding" | dcw ] + , [ text "trivial" | triv ] + , [ text "unlifted" | Unlifted <- pure lev ] + , [ text "strict" | isStrUsedDmd dmd ] + , [ if hnf then text "hnf" else if ok_spec then text "ok-for-spec" else empty ] + ] + mkCaseFloat :: Id -> CpeRhs -> FloatingBind mkCaseFloat bndr scrut = -- pprTrace "mkCaseFloat" (ppr bndr <+> ppr (bound,info) @@ -2262,13 +2276,12 @@ mkCaseFloat bndr scrut mkNonRecFloat :: CorePrepEnv -> Levity -> Id -> CpeRhs -> (FloatingBind, Id) mkNonRecFloat env lev bndr rhs = -- pprTrace "mkNonRecFloat" (ppr bndr <+> ppr (bound,info) - -- <+> if is_strict then text "strict" else if is_lifted then text "lazy" else text "unlifted" - -- <+> if ok_for_spec then text "ok-for-spec" else empty - -- <+> if evald then text "evald" else empty + -- $$ ppr float_info_args -- $$ ppr rhs) $ (Float (NonRec bndr' rhs) bound info, bndr') where - !(bound, info) = decideFloatInfo $ (defFloatInfoArgs bndr rhs) + !(bound, info) = decideFloatInfo float_info_args + float_info_args = (defFloatInfoArgs bndr rhs) { fia_levity = lev , fia_is_hnf = is_hnf , fia_ok_for_spec = ok_for_spec ===================================== compiler/GHC/Utils/Misc.hs ===================================== @@ -23,7 +23,7 @@ module GHC.Utils.Misc ( dropWhileEndLE, spanEnd, last2, lastMaybe, onJust, - List.foldl1', foldl2, count, countWhile, all2, any2, all2Prefix, all3Prefix, + List.foldl1', foldl2, count, countWhile, all2, any2, lengthExceeds, lengthIs, lengthIsNot, lengthAtLeast, lengthAtMost, lengthLessThan, @@ -658,36 +658,6 @@ any2 :: (a -> b -> Bool) -> [a] -> [b] -> Bool any2 p (x:xs) (y:ys) = p x y || any2 p xs ys any2 _ _ _ = False -all2Prefix :: forall a b. (a -> b -> Bool) -> [a] -> [b] -> Bool --- ^ `all2Prefix p xs ys` is a fused version of `and $ zipWith2 p xs ys`. --- (It generates good code nonetheless.) --- So if one list is shorter than the other, `p` is assumed to be `True` for the --- suffix. -all2Prefix p = foldr k z - where - k :: a -> ([b] -> Bool) -> [b] -> Bool - k x go ys' = case ys' of - (y:ys'') -> p x y && go ys'' - _ -> True - z :: [b] -> Bool - z _ = True -{-# INLINE all2Prefix #-} - -all3Prefix :: forall a b c. (a -> b -> c -> Bool) -> [a] -> [b] -> [c] -> Bool --- ^ `all3Prefix p xs ys zs` is a fused version of `and $ zipWith3 p xs ys zs`. --- (It generates good code nonetheless.) --- So if one list is shorter than the others, `p` is assumed to be `True` for --- the suffix. -all3Prefix p = foldr k z - where - k :: a -> ([b] -> [c] -> Bool) -> [b] -> [c] -> Bool - k x go ys' zs' = case (ys',zs') of - (y:ys'',z:zs'') -> p x y z && go ys'' zs'' - _ -> False - z :: [b] -> [c] -> Bool - z _ _ = True -{-# INLINE all3Prefix #-} - -- Count the number of times a predicate is true count :: (a -> Bool) -> [a] -> Int ===================================== testsuite/tests/simplCore/should_compile/T25423.hs ===================================== @@ -0,0 +1,8 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE MagicHash #-} +{-# LANGUAGE UnboxedTuples #-} + +module T25423 where + +f :: Int -> Int -> (# (# Int, Int #), (# Int, Int #) #) +f x y = let !p = (# x, y #) in (# p, p #) ===================================== testsuite/tests/simplCore/should_compile/T25423.stderr ===================================== @@ -0,0 +1,41 @@ + +==================== Tidy Core ==================== +Result size of Tidy Core = {terms: 24, types: 75, coercions: 0, joins: 0/1} + +-- RHS size: {terms: 9, types: 39, coercions: 0, joins: 0/1} +f :: Int -> Int -> (# (# Int, Int #), (# Int, Int #) #) +[GblId, Arity=2, Str=, Cpr=1(1, 1), Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)}] +f = \ (x :: Int) (y :: Int) -> + let { + p :: (# Int, Int #) + [LclId, Unf=OtherCon []] + p = (# x, y #) } in + (# p, p #) + +-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule4 :: GHC.Prim.Addr# +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +T25423.$trModule4 = "main"# + +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule3 :: GHC.Types.TrName +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}] +T25423.$trModule3 = GHC.Types.TrNameS T25423.$trModule4 + +-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule2 :: GHC.Prim.Addr# +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] +T25423.$trModule2 = "T25423"# + +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule1 :: GHC.Types.TrName +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}] +T25423.$trModule1 = GHC.Types.TrNameS T25423.$trModule2 + +-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} +T25423.$trModule :: GHC.Types.Module +[GblId, Unf=Unf{Src=, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}] +T25423.$trModule = GHC.Types.Module T25423.$trModule3 T25423.$trModule1 + + + ===================================== testsuite/tests/simplCore/should_compile/all.T ===================================== @@ -532,3 +532,4 @@ test('T24725a', [ grep_errmsg(r'testedRule')], compile, ['-O -ddump-rule-firings test('T25033', normal, compile, ['-O']) test('T25160', normal, compile, ['-O -ddump-rules']) test('T25197', [req_th, extra_files(["T25197_TH.hs"]), only_ways(['optasm'])], multimod_compile, ['T25197', '-O2 -v0']) +test('T25423', [ grep_errmsg(r'let') ], compile, ['-O -ddump-simpl -dsuppress-uniques']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/38b99494093a16390405b1b2830ecb5802c30a71...be75e30fe7569bbb81d7a2ca5d66f663a99bd178 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/38b99494093a16390405b1b2830ecb5802c30a71...be75e30fe7569bbb81d7a2ca5d66f663a99bd178 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 11:40:53 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Mon, 11 Nov 2024 06:40:53 -0500 Subject: [Git][ghc/ghc][wip/hnf-spec] 40 commits: EPA: Remove AddEpann commit 7 Message-ID: <6731ed45c6ada_333a46511ef44438c@gitlab.mail> Sebastian Graf pushed to branch wip/hnf-spec at Glasgow Haskell Compiler / GHC Commits: dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - c4b89587 by Sebastian Graf at 2024-11-11T12:40:41+01:00 Clarify haddocks of `isValueUnfolding` and `isEvaldUnfolding` (#25425) Fixes #25425. - - - - - ed0a719f by Sebastian Graf at 2024-11-11T12:40:41+01:00 Make exprIsHNF imply exprOkForSpeculation Fixes #23256 because SetLevels and CSE no longer do a reverse binder swap. Furthermore, we no longer need to check for exprIsHNF when exprOkForSpeculation fails. Also fixes #25423. I had a brief look at `-v` in T5642 (which regresses ghc/alloc by 2-3%). It is essentially a benchmark on `Generic` code and uses `exprOkForSpeculation` quite a lot, which now maintains a substitution, explaining the regression. No changes to any intermediate programs. I also had a look at `-v` in T9961 (which regresses ghc/alloc by 1-2%) In T16577 (regresses ghc/alloc by 2-3%) we end up with a marginally smaller program, but the benefit is offset by an additional Simplifier iteration. Metric Decrease: T9872b_defer T9872d Metric Increase: T5642 T9961 T16577 - - - - - d34fa798 by Sebastian Graf at 2024-11-11T12:40:41+01:00 SetLevels: Use `exprOkForSpeculation` instead of `exprIsHNF` - - - - - 41e98722 by Sebastian Graf at 2024-11-11T12:40:41+01:00 Prep: Fix outcommented debug pretty-printing logic - - - - - 30 changed files: - .ghcid - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot - compiler/GHC/Core/Coercion/Opt.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/SetLevels.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/WorkWrap/Utils.hs - compiler/GHC/Core/Subst.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/TyCo/Tidy.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/CoreToStg/Prep.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/be75e30fe7569bbb81d7a2ca5d66f663a99bd178...41e98722c118da4dbdf480af76f4e2d7f24e106d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/be75e30fe7569bbb81d7a2ca5d66f663a99bd178...41e98722c118da4dbdf480af76f4e2d7f24e106d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 15:06:52 2024 From: gitlab at gitlab.haskell.org (Krzysztof Gogolewski (@monoidal)) Date: Mon, 11 Nov 2024 10:06:52 -0500 Subject: [Git][ghc/ghc][wip/forall-kind-rule] 176 commits: EPA: Remove unused hsCaseAnnsRest Message-ID: <67321d8cdcdd2_1a8c3565ee3840535@gitlab.mail> Krzysztof Gogolewski pushed to branch wip/forall-kind-rule at Glasgow Haskell Compiler / GHC Commits: 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - 0fdb959f by Krzysztof Gogolewski at 2024-11-11T16:06:24+01:00 Limit forall to TYPE r and CONSTRAINT r Fixes #22063. - - - - - 29 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - CODEOWNERS - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/CmmToAsm/AArch64/CodeGen.hs - compiler/GHC/CmmToAsm/AArch64/Instr.hs - compiler/GHC/CmmToAsm/AArch64/Ppr.hs - compiler/GHC/CmmToAsm/Dwarf/Types.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9c3e33e49eea60452c62f20c51705291fe68c1ab...0fdb959f1839103aa9f4eb5f39d10ffe16f989b5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9c3e33e49eea60452c62f20c51705291fe68c1ab...0fdb959f1839103aa9f4eb5f39d10ffe16f989b5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 16:38:49 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Mon, 11 Nov 2024 11:38:49 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/loaddlls Message-ID: <67323319a27eb_1a8c35a03f0c68821@gitlab.mail> Cheng Shao pushed new branch wip/loaddlls at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/loaddlls You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 17:02:59 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 11 Nov 2024 12:02:59 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/filepath-9.8 Message-ID: <673238c3795e7_1a8c35ba78047682c@gitlab.mail> Ben Gamari pushed new branch wip/filepath-9.8 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/filepath-9.8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 17:07:37 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 11 Nov 2024 12:07:37 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/manpage-9.8 Message-ID: <673239d93890c_1a8c35dd8e207853@gitlab.mail> Ben Gamari pushed new branch wip/manpage-9.8 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/manpage-9.8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 18:20:45 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 11 Nov 2024 13:20:45 -0500 Subject: [Git][ghc/ghc][wip/T24744] 17 commits: Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <67324afdcf23d_27bdd12f1264973e5@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - b9298134 by Serge S. Gulin at 2024-11-11T21:20:28+03:00 basic cleanup - - - - - 173a8074 by Serge S. Gulin at 2024-11-11T21:20:28+03:00 Add trivial optimizations for `unpackCString` and `unpackCStringUtf8` - - - - - 20dd7121 by Serge S. Gulin at 2024-11-11T21:20:28+03:00 basic cleanup - - - - - e9a9fdfd by Serge S. Gulin at 2024-11-11T21:20:28+03:00 basic cleanup - - - - - 5b0b86c0 by Serge S. Gulin at 2024-11-11T21:20:28+03:00 basic cleanup - - - - - de992617 by Serge S. Gulin at 2024-11-11T21:20:28+03:00 Enable static args - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Parser.y - compiler/GHC/Platform/Ways.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e5904575bbde1558750ae3145854fb3c2199242a...de992617109c68aa4c758b5d6b3f7067abef37e3 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e5904575bbde1558750ae3145854fb3c2199242a...de992617109c68aa4c758b5d6b3f7067abef37e3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 18:22:17 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 11 Nov 2024 13:22:17 -0500 Subject: [Git][ghc/ghc][wip/T24744] 3 commits: Basic cleanup Message-ID: <67324b594322c_27bdd12b643497773@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: d1b84159 by Serge S. Gulin at 2024-11-11T21:21:47+03:00 Basic cleanup - - - - - ca0c53ba by Serge S. Gulin at 2024-11-11T21:22:00+03:00 Add trivial optimizations for `unpackCString` and `unpackCStringUtf8` - - - - - 854f7ee9 by Serge S. Gulin at 2024-11-11T21:22:00+03:00 Enable static args - - - - - 11 changed files: - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/Arg.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Expr.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/StgToJS/Linker/Linker.hs - compiler/GHC/StgToJS/Monad.hs - compiler/GHC/StgToJS/Object.hs - compiler/GHC/StgToJS/Symbols.hs - compiler/GHC/StgToJS/Types.hs - rts/js/string.js Changes: ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -157,6 +157,24 @@ genApp ctx i args , ExprInline ) + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringName + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringUtf8Name + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + -- let-no-escape | Just n <- ctxLneBindingStackSize ctx i = do ===================================== compiler/GHC/StgToJS/Arg.hs ===================================== @@ -22,9 +22,6 @@ module GHC.StgToJS.Arg , genIdArgI , genIdStackArgI , allocConStatic - , allocUnboxedConStatic - , allocateStaticList - , jsStaticArg , jsStaticArgs ) where @@ -215,7 +212,7 @@ allocConStatic (identFS -> to) cc con args = do emitStatic to (StaticUnboxed $ StaticUnboxedBool True) cc' | otherwise = do e <- identFS <$> identForDataConWorker con - emitStatic to (StaticData e []) cc' + emitStatic to (StaticScalar $ StaticApp SAKData e []) cc' allocConStatic' cc' [x] | isUnboxableCon con = case x of @@ -234,7 +231,7 @@ allocConStatic (identFS -> to) cc con args = do _ -> panic "allocConStatic: invalid args for consDataCon" else do e <- identFS <$> identForDataConWorker con - emitStatic to (StaticData e xs) cc' + emitStatic to (StaticScalar $ StaticApp SAKData e xs) cc' -- | Allocate unboxed constructors allocUnboxedConStatic :: DataCon -> [StaticArg] -> StaticArg ===================================== compiler/GHC/StgToJS/CodeGen.hs ===================================== @@ -329,7 +329,7 @@ genToplevelRhs i rhs = case rhs of body <- genBody (initExprCtx i) R2 args body typ global_occs <- globalOccs body let eidt = identFS eid - let lidents = map global_ident global_occs + let lidents = concatMap global_idents global_occs let lids = map global_id global_occs let lidents' = map identFS lidents CIStaticRefs sr0 <- genStaticRefsRhs rhs @@ -337,15 +337,15 @@ genToplevelRhs i rhs = case rhs of sr = CIStaticRefs sri et <- genEntryType args ll <- loadLiveFun lids - (static, regs, upd) <- + (appK, regs, upd) <- if et == CIThunk then do r <- updateThunk - pure (StaticThunk (Just (eidt, map StaticObjArg lidents')), CIRegs 0 [PtrV],r) - else return (StaticFun eidt (map StaticObjArg lidents'), - (if null lidents then CIRegs 1 (concatMap idJSRep args) - else CIRegs 0 (PtrV : concatMap idJSRep args)) - , mempty) + pure (SAKThunk, CIRegs 0 [PtrV], r) + else + let regs = if null lidents then CIRegs 1 (concatMap idJSRep args) + else CIRegs 0 (PtrV : concatMap idJSRep args) + in pure (SAKFun, regs, mempty) setcc <- ifProfiling $ if et == CIThunk then enterCostCentreThunk @@ -359,5 +359,5 @@ genToplevelRhs i rhs = case rhs of , ciStatic = sr } ccId <- costCentreStackLbl cc - emitStatic idt static ccId + emitStatic idt (StaticScalar $ StaticApp appK eidt $ map StaticObjArg lidents') ccId return $ (FuncStat eid [] (ll <> upd <> setcc <> body)) ===================================== compiler/GHC/StgToJS/Expr.hs ===================================== @@ -606,6 +606,32 @@ genCase ctx bnd e at alts l , ExprInline ) + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringName + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringUtf8Name + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + | isInlineExpr e = do bndi <- identsForId bnd let ctx' = ctxSetTop bnd ===================================== compiler/GHC/StgToJS/Ids.hs ===================================== @@ -155,7 +155,7 @@ cachedIdentForId i mi id_type = do -- Now update the GlobalId cache, if required - let update_global_cache = isGlobalId i && isNothing mi && id_type == IdPlain + let update_global_cache = isGlobalId i && id_type == IdPlain -- fixme also allow caching entries for lifting? when (update_global_cache) $ do ===================================== compiler/GHC/StgToJS/Linker/Linker.hs ===================================== @@ -24,8 +24,6 @@ module GHC.StgToJS.Linker.Linker ( jsLinkBinary , jsLink , embedJsFile - , staticInitStat - , staticDeclStat , mkExportedFuns , mkExportedModFuns , computeLinkDependencies @@ -1253,27 +1251,22 @@ staticInitStat :: StaticInfo -> JS.JStat staticInitStat (StaticInfo i sv mcc) = jStgStatToJS $ case sv of - StaticData con args -> appS hdStiStr $ add_cc_arg - [ global i - , global con - , jsStaticArgs args - ] - StaticFun f args -> appS hdStiStr $ add_cc_arg - [ global i - , global f - , jsStaticArgs args - ] - StaticList args mt -> appS hdStlStr $ add_cc_arg - [ global i - , jsStaticArgs args - , toJExpr $ maybe null_ (toJExpr . TxtI) mt - ] - StaticThunk (Just (f,args)) -> appS hdStcStr $ add_cc_arg - [ global i - , global f - , jsStaticArgs args - ] - _ -> mempty + StaticScalar (StaticApp k app args) -> appS + (if k == SAKThunk then hdStcStr else hdStiStr) + $ add_cc_arg + [ global i + , global app + , jsStaticArgs args + ] + + StaticList args mt -> appS hdStlStr + $ add_cc_arg + [ global i + , jsStaticArgs args + , toJExpr $ maybe null_ (toJExpr . TxtI) mt + ] + + StaticUnboxed _ -> mempty where -- add optional cost-center argument add_cc_arg as = case mcc of @@ -1286,20 +1279,15 @@ staticDeclStat (StaticInfo global_name static_value _) = jStgStatToJS decl where global_ident = name global_name decl_init v = global_ident ||= v - decl_no_init = appS hdDiStr [toJExpr global_ident] decl = case static_value of StaticUnboxed u -> decl_init (unboxed_expr u) - StaticThunk Nothing -> decl_no_init -- CAF initialized in an alternative way _ -> decl_init (app hdDStr []) unboxed_expr = \case StaticUnboxedBool b -> app hdPStr [toJExpr b] StaticUnboxedInt i -> app hdPStr [toJExpr i] StaticUnboxedDouble d -> app hdPStr [toJExpr (unSaneDouble d)] - -- GHCJS used a function wrapper for this: - -- StaticUnboxedString str -> ApplExpr (initStr str) [] - -- But we are defining it statically for now. StaticUnboxedString str -> initStr str StaticUnboxedStringOffset {} -> 0 ===================================== compiler/GHC/StgToJS/Monad.hs ===================================== @@ -153,16 +153,16 @@ getGlobalIdCache = State.gets (ggsGlobalIdCache . gsGroup) setGlobalIdCache :: GlobalIdCache -> G () setGlobalIdCache v = State.modify (\s -> s { gsGroup = (gsGroup s) { ggsGlobalIdCache = v}}) - data GlobalOcc = GlobalOcc - { global_ident :: !Ident + { global_idents :: ![Ident] + -- ^ Some ids are represented by few idents. i.e. Addr# , global_id :: !Id , global_count :: !Word } instance Outputable GlobalOcc where ppr g = hang (text "GlobalOcc") 2 $ vcat - [ hcat [text "Ident: ", ppr (global_ident g)] + [ hcat [text "Idents: ", ppr (global_idents g)] , hcat [text "Id:", ppr (global_id g)] , hcat [text "Count:", ppr (global_count g)] ] @@ -175,7 +175,12 @@ globalOccs jst = do -- build a map form Ident Unique to (Ident, Id, Count) let cmp_cnt g1 g2 = compare (global_count g1) (global_count g2) - inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 } + inc g1 g2 = g1 + { global_count = global_count g1 + global_count g2 + , global_idents = global_idents g1 ++ global_idents g2 + } + + go :: UniqFM Id GlobalOcc -> [Ident] -> [GlobalOcc] go gids = \case [] -> -- return global Ids used locally sorted by increased use L.sortBy cmp_cnt $ nonDetEltsUFM gids @@ -186,7 +191,7 @@ globalOccs jst = do Just (_k,gid) -> -- add it to the list of already found global ids. Increasing -- count by 1 - let g = GlobalOcc i gid 1 - in go (addToUFM_C inc gids i g) is + let g = GlobalOcc [i] gid 1 + in go (addToUFM_C inc gids gid g) is pure $ go emptyUFM (identsS jst) ===================================== compiler/GHC/StgToJS/Object.hs ===================================== @@ -615,16 +615,17 @@ instance Binary StaticInfo where get bh = StaticInfo <$> get bh <*> get bh <*> get bh instance Binary StaticVal where - put_ bh (StaticFun f args) = putByte bh 1 >> put_ bh f >> put_ bh args - put_ bh (StaticThunk t) = putByte bh 2 >> put_ bh t - put_ bh (StaticUnboxed u) = putByte bh 3 >> put_ bh u - put_ bh (StaticData dc args) = putByte bh 4 >> put_ bh dc >> put_ bh args - put_ bh (StaticList xs t) = putByte bh 5 >> put_ bh xs >> put_ bh t + put_ bh (StaticScalar (StaticApp SAKFun f args)) = putByte bh 1 >> put_ bh f >> put_ bh args + put_ bh (StaticScalar (StaticApp SAKThunk f args)) = putByte bh 2 >> put_ bh (f, args) + put_ bh (StaticUnboxed u) = putByte bh 3 >> put_ bh u + put_ bh (StaticScalar (StaticApp SAKData dc args)) = putByte bh 4 >> put_ bh dc >> put_ bh args + put_ bh (StaticList xs t) = putByte bh 5 >> put_ bh xs >> put_ bh t get bh = getByte bh >>= \case - 1 -> StaticFun <$> get bh <*> get bh - 2 -> StaticThunk <$> get bh + 1 -> StaticScalar <$> (StaticApp SAKFun <$> get bh <*> get bh) + 2 -> let bh' = get bh + in StaticScalar <$> (StaticApp SAKThunk <$> (fst <$> bh') <*> (snd <$> bh')) 3 -> StaticUnboxed <$> get bh - 4 -> StaticData <$> get bh <*> get bh + 4 -> StaticScalar <$> (StaticApp SAKData <$> get bh <*> get bh) 5 -> StaticList <$> get bh <*> get bh n -> error ("Binary get bh StaticVal: invalid tag " ++ show n) ===================================== compiler/GHC/StgToJS/Symbols.hs ===================================== @@ -849,9 +849,6 @@ unknown = fsLit "" typeof :: FastString typeof = fsLit "typeof" -hdRawStr :: FastString -hdRawStr = fsLit "h$rstr" - throwStr :: FastString throwStr = fsLit "throw" @@ -1213,8 +1210,6 @@ hdStlStr = fsLit "h$stl" hdStiStr :: FastString hdStiStr = fsLit "h$sti" -hdStrStr :: FastString -hdStrStr = fsLit "h$str" ------------------------------ Pack/Unpack -------------------------------------------- hdDecodeUtf8Z :: FastString ===================================== compiler/GHC/StgToJS/Types.hs ===================================== @@ -231,18 +231,25 @@ data StaticInfo = StaticInfo , siCC :: !(Maybe Ident) -- ^ optional CCS name } deriving stock (Eq, Show) +data StaticAppKind + = SAKFun + -- ^ heap object for function + | SAKThunk + -- ^ heap object for CAF + | SAKData + -- ^ regular datacon app + deriving stock (Eq, Show) + +-- Static scalar application +data StaticApp = StaticApp StaticAppKind !FastString [StaticArg] + deriving stock (Eq, Show) + data StaticVal - = StaticFun !FastString [StaticArg] - -- ^ heap object for function - | StaticThunk !(Maybe (FastString,[StaticArg])) - -- ^ heap object for CAF (field is Nothing when thunk is initialized in an - -- alternative way, like string thunks through h$str) - | StaticUnboxed !StaticUnboxed + = StaticUnboxed !StaticUnboxed -- ^ unboxed constructor (Bool, Int, Double etc) - | StaticData !FastString [StaticArg] - -- ^ regular datacon app | StaticList [StaticArg] (Maybe FastString) -- ^ list initializer (with optional tail) + | StaticScalar StaticApp deriving stock (Eq, Show) data StaticUnboxed ===================================== rts/js/string.js ===================================== @@ -1,16 +1,5 @@ //#OPTIONS: CPP -// encode a string constant -function h$str(s) { - var enc = null; - return function() { - if(enc === null) { - enc = h$encodeModifiedUtf8(s); - } - return enc; - } -} - // encode a packed string // since \0 is used to separate strings (and a common occurrence) // we add the following mapping: @@ -28,26 +17,6 @@ function h$str(s) { // data. supported range: 0x20 .. 0x9f (1-128 bytes data) // -function h$pstr(s) { - var enc = null; - return function() { - if(enc === null) { - enc = h$encodePackedUtf8(s); - } - return enc; - } -} -// encode a raw string from bytes -function h$rstr(d) { - var enc = null; - return function() { - if(enc === null) { - enc = h$rawStringData(d); - } - return enc; - } -} - // these aren't added to the CAFs, so the list stays in mem indefinitely, is that a problem? #ifdef GHCJS_PROF function h$strt(str, cc) { return MK_LAZY_CC(function() { return h$toHsString(str, cc); }, cc); } @@ -759,6 +728,30 @@ function h$appendToHsStringA(str, appendTo) { return r; } +// unpack utf8 string, append to existing Haskell string +#ifdef GHCJS_PROF +function h$appendToHsString(str, appendTo, cc) { +#else +function h$appendToHsString(str, appendTo) { +#endif + var i = str.length - 1; + // we need to make an updatable thunk here + // if we embed the given closure in a CONS cell. + // (#24495) + var r = i == 0 ? appendTo : MK_UPD_THUNK(appendTo); + while(i>=0) { + // Copied from h$toHsString + var cp = str.charCodeAt(i); + if(cp >= 0xDC00 && cp <= 0xDFFF && i > 0) { + --i; + cp = (cp - 0xDC00) + (str.charCodeAt(i) - 0xD800) * 1024 + 0x10000; + } + r = MK_CONS_CC(cp, r, cc); + --i; + } + return r; +} + // throw e wrapped in a GHCJS.Prim.JSException in the current thread function h$throwJSException(e) { // create a JSException object and wrap it in a SomeException View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/de992617109c68aa4c758b5d6b3f7067abef37e3...854f7ee90cd86fea634d23450805e590385c57c0 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/de992617109c68aa4c758b5d6b3f7067abef37e3...854f7ee90cd86fea634d23450805e590385c57c0 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 11 20:01:30 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 11 Nov 2024 15:01:30 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 19 commits: Handle the special ghc-prim:GHC.Prim module in the compiler Message-ID: <6732629a72d70_27bdd1772090107597@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - 65b08a37 by Ben Gamari at 2024-11-11T15:01:17-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - c04d23ba by Teo Camarasu at 2024-11-11T15:01:17-05:00 docs: link to #14474 in the template-haskell docs - - - - - 212f236b by Zubin Duggal at 2024-11-11T15:01:18-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 09a43333 by Torsten Schmits at 2024-11-11T15:01:18-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - ad76f3b0 by Torsten Schmits at 2024-11-11T15:01:18-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - e55be696 by Alan Zimmerman at 2024-11-11T15:01:19-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c5ffd1ae by Cheng Shao at 2024-11-11T15:01:20-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - f0d185f8 by Cheng Shao at 2024-11-11T15:01:20-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 30 changed files: - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Platform/Ways.hs - compiler/GHC/Prelude/Basic.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/SysTools/Process.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/ThToHs.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3c33835737c60e0f607b571e58de42a7b679c0b9...f0d185f80ecee7d767bd63089f32a66b0d330c15 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3c33835737c60e0f607b571e58de42a7b679c0b9...f0d185f80ecee7d767bd63089f32a66b0d330c15 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 00:30:27 2024 From: gitlab at gitlab.haskell.org (Adriaan Leijnse (@aidylns)) Date: Mon, 11 Nov 2024 19:30:27 -0500 Subject: [Git][ghc/ghc][wip/aidylns/ttg-remove-hsunboundvar-via-hshole] 160 commits: Handle exceptions from IO manager backend Message-ID: <6732a1a3c3f53_2c1df5426080314ba@gitlab.mail> Adriaan Leijnse pushed to branch wip/aidylns/ttg-remove-hsunboundvar-via-hshole at Glasgow Haskell Compiler / GHC Commits: 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - a6b51575 by Adriaan Leijnse at 2024-11-12T00:18:58+00:00 HsUnboundVar -> HsVar Bound/Unbound - - - - - b50f80f0 by Adriaan Leijnse at 2024-11-12T00:23:03+00:00 HoleExprRef = HER (IORef EvTerm) Id Replace the TcType and Unique of HoleExprRef with just Id. - - - - - 9eb5ce46 by Adriaan Leijnse at 2024-11-12T00:23:07+00:00 HoleExprRef = HER (IORef EvTerm) Removes the Id information from HoleExprRef alltogether. - - - - - 30 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - CODEOWNERS - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/CmmToAsm/Dwarf/Types.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/32a151e1e0706bb16c9f9a920e796bf2a8f8886b...9eb5ce46901dbebf38e90f411e06b9c7e036c21f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/32a151e1e0706bb16c9f9a920e796bf2a8f8886b...9eb5ce46901dbebf38e90f411e06b9c7e036c21f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 01:10:22 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 11 Nov 2024 20:10:22 -0500 Subject: [Git][ghc/ghc][wip/manpage-9.8] testsuite: Skip MultiLayerModulesTH_OneShot on darwin Message-ID: <6732aafe78da8_2c1df55b51e4344fd@gitlab.mail> Ben Gamari pushed to branch wip/manpage-9.8 at Glasgow Haskell Compiler / GHC Commits: 90c7d9a6 by Zubin Duggal at 2024-11-11T20:10:03-05:00 testsuite: Skip MultiLayerModulesTH_OneShot on darwin See #24177 (cherry picked from commit 1bf7ce0e3ec4be3bacea015c42a2a218c33bea43) - - - - - 1 changed file: - testsuite/tests/perf/compiler/all.T Changes: ===================================== testsuite/tests/perf/compiler/all.T ===================================== @@ -366,7 +366,10 @@ test('MultiLayerModulesTH_OneShot', pre_cmd('$MAKE -s --no-print-directory MultiLayerModulesTH_OneShot_Prep'), extra_files(['genMultiLayerModulesTH']), unless(have_dynamic(),skip), - compile_timeout_multiplier(5) + compile_timeout_multiplier(5), + # We skip the test on darwin due to recent regression due to toolchain + # upgrade (tracked in #24177) + when(opsys('darwin'), skip) ], compile_fail, ['-v0']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/90c7d9a67a65252d14c99cab35c88bae039e230c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/90c7d9a67a65252d14c99cab35c88bae039e230c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 06:22:06 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 12 Nov 2024 01:22:06 -0500 Subject: [Git][ghc/ghc][master] 7 commits: testsuite: normalise some versions in callstacks Message-ID: <6732f40ea9886_1960fe381cb0977b3@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - 16 changed files: - testsuite/driver/testlib.py - testsuite/tests/backpack/should_compile/all.T - testsuite/tests/backpack/should_compile/bkp16.stderr - testsuite/tests/backpack/should_fail/all.T - testsuite/tests/backpack/should_fail/bkpfail17.stderr - testsuite/tests/backpack/should_fail/bkpfail19.stderr - testsuite/tests/gadt/all.T - testsuite/tests/ghc-api/T20757.stderr - testsuite/tests/ghc-api/all.T - testsuite/tests/ghc-e/should_fail/all.T - testsuite/tests/profiling/should_run/all.T - utils/haddock/haddock-test/src/Test/Haddock.hs - utils/haddock/haddock-test/src/Test/Haddock/Xhtml.hs - utils/haddock/html-test/Main.hs - utils/haddock/html-test/ref/Bug1004.html - utils/haddock/html-test/ref/Bug548.html Changes: ===================================== testsuite/driver/testlib.py ===================================== @@ -2857,7 +2857,7 @@ def normalise_whitespace(s: str) -> str: # Merge contiguous whitespace characters into a single space. return ' '.join(s.split()) -callSite_re = re.compile(r', called at (.+):[\d]+:[\d]+ in [\w\-\.]+:') +callSite_re = re.compile(r', called at (.+):[\d]+:[\d]+ in [<>\w\-\.]+:') def normalise_callstacks(s: str) -> str: opts = getTestOpts() ===================================== testsuite/tests/backpack/should_compile/all.T ===================================== @@ -8,7 +8,7 @@ test('bkp11', normal, backpack_compile, ['']) test('bkp12', normal, backpack_compile, ['']) test('bkp14', normal, backpack_compile, ['']) test('bkp15', normal, backpack_compile, ['']) -test('bkp16', normalise_version('base', 'ghc-internal'), backpack_compile, ['']) +test('bkp16', [normalise_version('base', 'ghc-internal')], backpack_compile, ['-fhide-source-paths']) test('bkp17', normal, backpack_compile, ['']) test('bkp18', normal, backpack_compile, ['']) test('bkp19', normal, backpack_compile, ['']) @@ -60,4 +60,4 @@ test('T13214', normal, backpack_compile, ['']) test('T13250', normal, backpack_compile, ['']) test('T13323', normal, backpack_compile, ['']) test('T20396', normal, backpack_compile, ['']) -test('T23424', [ignore_stdout, ignore_stderr], backpack_compile, ['-ddump-rn-trace -ddump-if-trace -ddump-tc-trace']) \ No newline at end of file +test('T23424', [ignore_stdout, ignore_stderr], backpack_compile, ['-ddump-rn-trace -ddump-if-trace -ddump-tc-trace']) ===================================== testsuite/tests/backpack/should_compile/bkp16.stderr ===================================== @@ -1,9 +1,9 @@ [1 of 2] Processing p - [1 of 1] Compiling Int[sig] ( p/Int.hsig, nothing ) + [1 of 1] Compiling Int[sig] [2 of 2] Processing q Instantiating q [1 of 1] Including p[Int=base-4.20.0.0:GHC.Exts] Instantiating p[Int=base-4.20.0.0:GHC.Exts] [1 of 1] Including base-4.20.0.0 - [1 of 1] Compiling Int[sig] ( p/Int.hsig, bkp16.out/p/p-3JmGAx0a1DyKjX6bh7CxGJ/Int.o ) + [1 of 1] Compiling Int[sig] [1 of 1] Instantiating p ===================================== testsuite/tests/backpack/should_fail/all.T ===================================== @@ -12,9 +12,9 @@ test('bkpfail13', normal, backpack_compile_fail, ['']) test('bkpfail14', normal, backpack_compile_fail, ['']) test('bkpfail15', normal, backpack_compile_fail, ['']) test('bkpfail16', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['']) -test('bkpfail17', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['']) +test('bkpfail17', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['-fhide-source-paths']) test('bkpfail18', normal, backpack_compile_fail, ['']) -test('bkpfail19', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['']) +test('bkpfail19', normalise_version('ghc-internal', 'base'), backpack_compile_fail, ['-fhide-source-paths']) test('bkpfail20', normal, backpack_compile_fail, ['']) test('bkpfail21', normal, backpack_compile_fail, ['']) test('bkpfail22', normal, backpack_compile_fail, ['']) ===================================== testsuite/tests/backpack/should_fail/bkpfail17.stderr ===================================== @@ -1,10 +1,10 @@ [1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) + [1 of 1] Compiling ShouldFail[sig] [2 of 2] Processing q Instantiating q [1 of 1] Including p[ShouldFail=base-4.20.0.0:Prelude] Instantiating p[ShouldFail=base-4.20.0.0:Prelude] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail17.out/p/p-9R9TTjIBG3MEjwCQffKVYM/ShouldFail.o ) + [1 of 1] Compiling ShouldFail[sig] : error: [GHC-15843] • Type constructor ‘Either’ has conflicting definitions in the module and its hsig file. ===================================== testsuite/tests/backpack/should_fail/bkpfail19.stderr ===================================== @@ -1,10 +1,10 @@ [1 of 2] Processing p - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, nothing ) + [1 of 1] Compiling ShouldFail[sig] [2 of 2] Processing q Instantiating q [1 of 1] Including p[ShouldFail=base-4.20.0.0:Data.STRef] Instantiating p[ShouldFail=base-4.20.0.0:Data.STRef] - [1 of 1] Compiling ShouldFail[sig] ( p/ShouldFail.hsig, bkpfail19.out/p/p-Gwl8Z2CPH0M7Zi2wPSYSbs/ShouldFail.o ) + [1 of 1] Compiling ShouldFail[sig] : error: [GHC-12424] • The hsig file (re)exports ‘Data.STRef.Lazy.newSTRef’ but the implementing module exports a different identifier ‘GHC.Internal.STRef.newSTRef’ ===================================== testsuite/tests/gadt/all.T ===================================== @@ -127,7 +127,7 @@ test('T20485', normal, compile, ['']) test('T20485a', normal, compile, ['']) test('T22235', normal, compile, ['']) test('T19847', normal, compile, ['']) -test('T19847a', normal, compile, ['-ddump-types']) +test('T19847a', normalise_version('base'), compile, ['-ddump-types']) test('T19847b', normal, compile, ['']) test('T23022', normal, compile, ['-dcore-lint']) test('T23023', normal, compile_fail, ['-O -dcore-lint']) # todo: move this test? ===================================== testsuite/tests/ghc-api/T20757.stderr ===================================== @@ -2,11 +2,11 @@ T20757: Exception: could not detect mingw toolchain in the following paths: ["/..//mingw","/..//..//mingw","/..//..//..//mingw"] -Package: ghc-inplace +Package: ghc-- Module: GHC.Utils.Panic Type: GhcException HasCallStack backtrace: collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:: in :GHC.Internal.Exception toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/IO.hs:: in :GHC.Internal.IO - throwIO, called at compiler/GHC/Utils/Panic.hs:: in :GHC.Utils.Panic + throwIO, called at compiler/GHC/Utils/Panic.hs:183:23 in ghc--:GHC.Utils.Panic ===================================== testsuite/tests/ghc-api/all.T ===================================== @@ -38,7 +38,7 @@ test('T19156', [ extra_run_opts('"' + config.libdir + '"') ], compile_and_run, ['-package ghc']) -test('T20757', [unless(opsys('mingw32'), skip), exit_code(1)], +test('T20757', [unless(opsys('mingw32'), skip), exit_code(1), normalise_version('ghc')], compile_and_run, ['-package ghc']) test('PrimOpEffect_Sanity', normal, compile_and_run, ['-Wall -Werror -package ghc']) ===================================== testsuite/tests/ghc-e/should_fail/all.T ===================================== @@ -15,6 +15,7 @@ test('ghc-e-fail2', req_interp, makefile_test, ['ghc-e-fail2']) test('T9930fail', [extra_files(['T9930']), when(opsys('mingw32'), skip), + normalise_errmsg_fun(lambda s: normalise_version_("ghc")(s).replace('ghc--','ghc')), # broken for JS until cross-compilers become stage2 compilers (#19174) # or until we bootstrap with a 9.10 compiler js_broken(19174)], @@ -24,7 +25,7 @@ test('T18441fail0', req_interp, makefile_test, ['T18441fail0']) test('T18441fail1', req_interp, makefile_test, ['T18441fail1']) -test('T18441fail2', req_interp, makefile_test, ['T18441fail2']) +test('T18441fail2', [req_interp, normalise_version('ghc')], makefile_test, ['T18441fail2']) test('T18441fail3', [ignore_stderr, exit_code(1)], run_command, ['{compiler} -e ":! abcde"']) @@ -34,9 +35,9 @@ test('T18441fail5', req_interp, makefile_test, ['T18441fail5']) test('T18441fail6', req_interp, makefile_test, ['T18441fail6']) -test('T18441fail7', req_interp, makefile_test, ['T18441fail7']) +test('T18441fail7', [req_interp, normalise_version('ghc')], makefile_test, ['T18441fail7']) -test('T18441fail8', req_interp, makefile_test, ['T18441fail8']) +test('T18441fail8', [req_interp, normalise_version('ghc')], makefile_test, ['T18441fail8']) test('T18441fail9', req_interp, makefile_test, ['T18441fail9']) @@ -60,6 +61,6 @@ test('T18441fail18', req_interp, makefile_test, ['T18441fail18']) test('T18441fail19', [ignore_stderr, exit_code(1)], run_command, ['{compiler} -e ":cd abcd"']) -test('T23663', req_interp, makefile_test, ['T23663']) +test('T23663', [req_interp, normalise_version('ghc')], makefile_test, ['T23663']) test('T24172', normal, compile_fail, ['-fdiagnostics-color=always']) ===================================== testsuite/tests/profiling/should_run/all.T ===================================== @@ -145,11 +145,13 @@ test('T7275', test_opts_dot_prof, makefile_test, []) test('callstack001', # unoptimised results are different w.r.t. CAF attribution [test_opts_dot_prof # produces a different stack + ,normalise_fun(lambda s: re.sub(r"(? listDirectory hiDir -- Use the output order of GHC as a simple dependency order - filesSorted <- Map.elems . Map.fromList <$> traverse (\file -> (,file) <$> getModificationTime (hiDir file)) files + filesSorted <- Map.elems . Map.fromList <$> traverse (\file -> (\mt -> ((mt,file),file)) <$> getModificationTime (hiDir file)) files let srcRef = if "--hyperlinked-source" `elem` cfgHaddockArgs then ",src,visible," else "" loop [] = pure True loop (file : files) = do ===================================== utils/haddock/haddock-test/src/Test/Haddock/Xhtml.hs ===================================== @@ -8,6 +8,7 @@ module Test.Haddock.Xhtml , stripIdsWhen , stripFooter , fixAttrValueWhen + , stripVersions ) where {- @@ -22,7 +23,7 @@ and since the `xhtml` library already handles the pretty-printing aspect, this would appear to be a reasonable compromise for now. -} -import Data.Char (isSpace) +import Data.Char (isSpace, isAlphaNum) import Data.List (isPrefixOf, stripPrefix) -- | Simple wrapper around the pretty-printed HTML source @@ -142,3 +143,18 @@ stripFooter (Xml body) = Xml (findDiv body) Just valRest'' | otherwise = dropToDiv cs + +-- | Strip strings of the form -- +-- to just +stripVersions :: [String] -> Xml -> Xml +stripVersions xs (Xml body) = Xml $ foldr id body $ map go xs + where + go pkg "" = "" + go pkg body@(x:body') = case stripPrefix pkg body of + Just ('-':rest) + | (version,'-':rest') <- span (/= '-') rest + , all (`elem` ('.':['0'..'9'])) version + , let (hash, rest'') = span isAlphaNum rest' + -> pkg ++ go pkg rest'' + _ -> x:go pkg body' + ===================================== utils/haddock/html-test/Main.hs ===================================== @@ -42,7 +42,7 @@ main = do stripIfRequired :: String -> Xml -> Xml stripIfRequired mdl = - stripLinks' . stripFooter + stripLinks' . stripFooter . stripVersions ["base"] where stripLinks' | mdl `elem` preserveLinksModules = id ===================================== utils/haddock/html-test/ref/Bug1004.html ===================================== @@ -210,7 +210,7 @@ >D1 ('MetaData "Product" "Data.Functor.Product" "base-4.20.0.0-inplace" ' "Product" "Data.Functor.Product" "base" 'False) (C1D1 ('MetaData "Product" "Data.Functor.Product" "base-4.20.0.0-inplace" ' "Product" "Data.Functor.Product" "base" 'False) (C1D1 ('MetaData "Product" "Data.Functor.Product" "base-4.20.0.0-inplace" ' "Product" "Data.Functor.Product" "base" 'False) (C1D1 ('MetaData "Product" "Data.Functor.Product" "base-4.20.0.0-inplace" ' "Product" "Data.Functor.Product" "base" 'False) (C1D1 ('MetaData "WrappedArrow" "Control.Applicative" "base-4.20.0.0-inplace" ' "WrappedArrow" "Control.Applicative" "base" 'True) (C1D1 ('MetaData "WrappedArrow" "Control.Applicative" "base-4.20.0.0-inplace" ' "WrappedArrow" "Control.Applicative" "base" 'True) (C1D1 ('MetaData "WrappedArrow" "Control.Applicative" "base-4.20.0.0-inplace" ' "WrappedArrow" "Control.Applicative" "base" 'True) (C1D1 ('MetaData "WrappedArrow" "Control.Applicative" "base-4.20.0.0-inplace" ' "WrappedArrow" "Control.Applicative" "base" 'True) (C1 From gitlab at gitlab.haskell.org Tue Nov 12 06:22:49 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 12 Nov 2024 01:22:49 -0500 Subject: [Git][ghc/ghc][master] configure: Check version number validity Message-ID: <6732f439a98ad_1960fe3e08dc10252c@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 1 changed file: - m4/fp_setup_project_version.m4 Changes: ===================================== m4/fp_setup_project_version.m4 ===================================== @@ -2,6 +2,9 @@ # --------------------- AC_DEFUN([FP_SETUP_PROJECT_VERSION], [ + # number of version number components + NumVersionComponents="$(( $(echo "$PACKAGE_VERSION" | tr -cd . | wc -c) + 1 ))" + if test "$RELEASE" = "NO"; then AC_MSG_CHECKING([for GHC version date]) if test -f VERSION_DATE; then @@ -62,6 +65,22 @@ AC_DEFUN([FP_SETUP_PROJECT_VERSION], VERSION_MINOR=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\1'/` ProjectPatchLevel=`echo $VERSION_TMP | sed 's/^\(@<:@^.@:>@*\)\(\.\{0,1\}\(.*\)\)$/\3'/` + # Verify that the version number has three components if a release version + # (that is, even minor version number). + AC_MSG_CHECKING([package version validity]) + StableRelease="$(( ($VERSION_MINOR & 1) == 0))" + if test "$StableRelease" = "1" -a "$NumVersionComponents" != "3"; then + AC_MSG_ERROR([Stable (even) version numbers must have three components]) + elif test "$StableRelease" = "0" -a "$NumVersionComponents" != "2"; then + AC_MSG_ERROR([Unstable (odd) version numbers must have two components]) + elif test "$RELEASE" = "YES" -a "$StableRelease" = "0"; then + AC_MSG_ERROR([RELEASE=YES despite having an unstable odd minor version number]) + elif test "$StableRelease" = "1"; then + AC_MSG_RESULT([okay stable branch version]) + else + AC_MSG_RESULT([okay unstable branch version]) + fi + # Calculate project version as an integer, using 2 digits for minor version case $VERSION_MINOR in ?) ProjectVersionInt=${VERSION_MAJOR}0${VERSION_MINOR} ;; View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c02add17f04c0521f0cb97b4c8511b47f4b639d7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c02add17f04c0521f0cb97b4c8511b47f4b639d7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 06:24:04 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 12 Nov 2024 01:24:04 -0500 Subject: [Git][ghc/ghc][master] docs: link to #14474 in the template-haskell docs Message-ID: <6732f484aea83_1960fe6c72d01095eb@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 1 changed file: - libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs ===================================== @@ -1534,9 +1534,11 @@ data Info The @Maybe Dec@ field contains @Just@ the declaration which defined the variable - including the RHS of the declaration - or else @Nothing@, in the case where the RHS is unavailable to - the compiler. At present, this value is /always/ @Nothing@: - returning the RHS has not yet been implemented because of - lack of interest. + the compiler. + + At present, this value is /always/ @Nothing@: + returning the RHS has not yet been implemented and is tracked by + [GHC #14474](https://gitlab.haskell.org/ghc/ghc/-/issues/14474). -} | VarI Name View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/747fd3224f9832a97367aaf7e6085a9b0a26fba9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/747fd3224f9832a97367aaf7e6085a9b0a26fba9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 06:24:51 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 12 Nov 2024 01:24:51 -0500 Subject: [Git][ghc/ghc][master] testsuite: normalise execvp vs exec differences in process tests Message-ID: <6732f4b3d7290_1960fea6d85811426d@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 1 changed file: - testsuite/tests/process/all.T Changes: ===================================== testsuite/tests/process/all.T ===================================== @@ -1,6 +1,6 @@ # some platforms use spawnp instead of exec in some cases, resulting # in spurious error output changes. -normalise_exec = normalise_fun(lambda s: s.replace('posix_spawnp', 'exec')) +normalise_exec = normalise_fun(lambda s: s.replace('posix_spawnp', 'exec').replace('execvp','exec')) test('process001', [req_process], compile_and_run, ['']) test('process002', [fragile_for(16547, concurrent_ways), req_process], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6d96bb6290114302534c928ea065a3da4e606f3f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6d96bb6290114302534c928ea065a3da4e606f3f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 06:26:06 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 12 Nov 2024 01:26:06 -0500 Subject: [Git][ghc/ghc][master] 2 commits: fix test lint that accumulated while the checks were broken Message-ID: <6732f4fe3726d_1960fe3f2438120628@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 11 changed files: - rts/IOManager.c - rts/Updates.h - testsuite/tests/bytecode/T24634/Makefile - testsuite/tests/bytecode/T25090/Makefile - testsuite/tests/driver/Makefile - testsuite/tests/driver/boot-target/Makefile - testsuite/tests/driver/fat-iface/Makefile - testsuite/tests/linters/Makefile - testsuite/tests/linters/regex-linters/check-cpp.py - testsuite/tests/linters/regex-linters/linter.py - testsuite/tests/perf/compiler/Makefile Changes: ===================================== rts/IOManager.c ===================================== @@ -364,7 +364,7 @@ void initIOManager(void) * TODO: rationalise this into one entry point, that internally * can do different things in the two cases. */ -#if defined (THREADED_RTS) +#if defined(THREADED_RTS) /* Win32 implementation in win32/ThrIOManager.c */ ioManagerStart(); ===================================== rts/Updates.h ===================================== @@ -9,8 +9,8 @@ #pragma once #if !defined(CMINUSMINUS) -#include "BeginPrivate.h" #include "RtsFlags.h" +#include "BeginPrivate.h" #endif ===================================== testsuite/tests/bytecode/T24634/Makefile ===================================== @@ -4,14 +4,14 @@ include $(TOP)/mk/test.mk # This case loads bytecode from the interface file written in the second invocation. T24634a: - $(TEST_HC) -c hello_c.c -o hello_c.o - $(TEST_HC) -c -fbyte-code-and-object-code -fno-omit-interface-pragmas Hello.hs - $(TEST_HC) -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Main.hs + '$(TEST_HC)' -c hello_c.c -o hello_c.o + '$(TEST_HC)' -c -fbyte-code-and-object-code -fno-omit-interface-pragmas Hello.hs + '$(TEST_HC)' -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Main.hs ./Main # This case uses the bytecode generated in 'runHscBackendPhase', not involving the interface, since 'Hello' is compiled # in the same invocation as 'Main'. T24634b: - $(TEST_HC) -c hello_c.c -o hello_c.o - $(TEST_HC) -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Hello.hs Main.hs + '$(TEST_HC)' -c hello_c.c -o hello_c.o + '$(TEST_HC)' -fprefer-byte-code -fbyte-code-and-object-code -fno-ignore-interface-pragmas hello_c.o Hello.hs Main.hs ./Main ===================================== testsuite/tests/bytecode/T25090/Makefile ===================================== @@ -4,18 +4,18 @@ include $(TOP)/mk/test.mk # Verify that the object files aren't linked by clobbering them. T25090a: - $(TEST_HC) -c -fbyte-code-and-object-code C.hs-boot - $(TEST_HC) -c -fbyte-code-and-object-code B.hs - $(TEST_HC) -c -fbyte-code-and-object-code C.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code C.hs-boot + '$(TEST_HC)' -c -fbyte-code-and-object-code B.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code C.hs echo 'corrupt' > B.o echo 'corrupt' > C.o echo 'corrupt' > C.o-boot - $(TEST_HC) -c -fbyte-code-and-object-code D.hs + '$(TEST_HC)' -c -fbyte-code-and-object-code D.hs echo 'corrupt' > D.o - $(TEST_HC) -c -fbyte-code-and-object-code -fprefer-byte-code A.hs - $(TEST_HC) -fbyte-code-and-object-code -fprefer-byte-code A.o -o exe + '$(TEST_HC)' -c -fbyte-code-and-object-code -fprefer-byte-code A.hs + '$(TEST_HC)' -fbyte-code-and-object-code -fprefer-byte-code A.o -o exe ./exe T25090b: - $(TEST_HC) -fbyte-code-and-object-code -fprefer-byte-code A -o exe -v0 + '$(TEST_HC)' -fbyte-code-and-object-code -fprefer-byte-code A -o exe -v0 ./exe ===================================== testsuite/tests/driver/Makefile ===================================== @@ -788,7 +788,7 @@ T22044: .PHONY: T22669 T22669: - echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --interactive T22669 + echo ":q" | "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) T22669 ! test -f T22669.o-boot ===================================== testsuite/tests/driver/boot-target/Makefile ===================================== @@ -1,8 +1,8 @@ boot1: - $(TEST_HC) -c A.hs-boot B.hs + '$(TEST_HC)' -c A.hs-boot B.hs boot2: - $(TEST_HC) A.hs-boot A.hs B.hs -v0 + '$(TEST_HC)' A.hs-boot A.hs B.hs -v0 boot3: - $(TEST_HC) A.hs-boot B.hs -v0 \ No newline at end of file + '$(TEST_HC)' A.hs-boot B.hs -v0 ===================================== testsuite/tests/driver/fat-iface/Makefile ===================================== @@ -55,5 +55,5 @@ T22807: clean T22807_ghci: clean "$(TEST_HC)" $(TEST_HC_OPTS) T22807_ghci.hs -fno-full-laziness -fhide-source-paths -fwrite-if-simplified-core -O2 -dynamic -v0 - "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --interactive -fhide-source-paths -fno-full-laziness < T22807_ghci.script + "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) -fhide-source-paths -fno-full-laziness < T22807_ghci.script ===================================== testsuite/tests/linters/Makefile ===================================== @@ -12,16 +12,16 @@ uniques: python3 checkUniques/check-uniques.py $(TOP)/.. makefiles: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-makefiles.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-makefiles.py tracked) version-number: regex-linters/check-version-number.sh ${TOP}/.. cpp: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-cpp.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-cpp.py tracked) rts-includes: - (cd $(TOP)/tests/linters/ && python3 regex-linters/check-rts-includes.py tracked) + (cd $(TOP)/.. && python3 testsuite/tests/linters/regex-linters/check-rts-includes.py tracked) changelogs: regex-linters/check-changelogs.sh $(TOP)/.. ===================================== testsuite/tests/linters/regex-linters/check-cpp.py ===================================== @@ -13,12 +13,12 @@ linters = [ message='CPP macros should not have a space between the macro name and their argument list'), RegexpLinter(r'ASSERT2\s+\(', message='CPP macros should not have a space between the macro name and their argument list'), - RegexpLinter(r'#ifdef\s+', - message='`#if defined(x)` is preferred to `#ifdef x`'), + # RegexpLinter(r'#ifdef\s+', + # message='`#if defined(x)` is preferred to `#ifdef x`'), RegexpLinter(r'#if\s+defined\s+', message='`#if defined(x)` is preferred to `#if defined x`'), - RegexpLinter(r'#ifndef\s+', - message='`#if !defined(x)` is preferred to `#ifndef x`'), + # RegexpLinter(r'#ifndef\s+', + # message='`#if !defined(x)` is preferred to `#ifndef x`'), ] for l in linters: @@ -29,12 +29,6 @@ for l in linters: l.add_path_filter(lambda path: not path.name == 'config.guess') # Don't lint files from external xxhash projects l.add_path_filter(lambda path: path != Path('rts', 'xxhash.h')), - # Don't lint font files - l.add_path_filter(lambda path: not path.parent == Path('docs','users_guide', - 'rtd-theme', 'static', 'fonts')) - # Don't lint image files - l.add_path_filter(lambda path: not path.parent == Path('docs','users_guide', - 'images')) # Don't lint core spec l.add_path_filter(lambda path: not path.name == 'core-spec.pdf') # Don't lint the linter itself ===================================== testsuite/tests/linters/regex-linters/linter.py ===================================== @@ -40,6 +40,8 @@ def get_changed_files(base_commit: str, head_commit: str, def get_tracked_files(subdir: str = '.'): """ Get the files tracked by git in the given subdirectory. """ + if not Path(subdir).exists(): + raise Exception("Regex linter executed with nonexistent target directory '{}'".format(subdir)) cmd = ['git', 'ls-tree', '--name-only', '-r', 'HEAD', subdir] files = subprocess.check_output(cmd) return files.decode('UTF-8').split('\n') @@ -77,9 +79,16 @@ class LineLinter(Linter): """ def lint(self, path: Path): if path.is_file(): - with path.open('r') as f: - for line_no, line in enumerate(f): - self.lint_line(path, line_no+1, line) + try: + with path.open('r') as f: + for line_no, line in enumerate(f): + self.lint_line(path, line_no+1, line) + # We don't want to explicitly exclude every single binary file in the test suite + except UnicodeDecodeError as e: + pass + except Exception as e: + print('Exception occurred while linting file: {}'.format(path)) + raise e def lint_line(self, path: Path, line_no: int, line: str): raise NotImplementedError @@ -124,7 +133,7 @@ def run_linters(linters: Sequence[Linter], linted_files = args.get_linted_files(args) for path in linted_files: - if path.startswith('linters'): + if path.startswith('testsuite/tests/linters'): continue for linter in linters: linter.do_lint(Path(path)) ===================================== testsuite/tests/perf/compiler/Makefile ===================================== @@ -21,7 +21,7 @@ MultiModulesRecomp: # containing core expressions, aka `mi_extra_decls` are populated. MultiModulesRecompDefsWithCore: ./genMultiLayerModulesCore - '$(TEST_HC)' --interactive $(TEST_HC_OPTS) -e "" -fwrite-if-simplified-core MultiLayerModules + '$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) -e "" -fwrite-if-simplified-core MultiLayerModules MultiModulesDefsWithCore: ./genMultiLayerModulesCore View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6d96bb6290114302534c928ea065a3da4e606f3f...223a4cb591af06276be83320d49bd5e6caeef8cd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6d96bb6290114302534c928ea065a3da4e606f3f...223a4cb591af06276be83320d49bd5e6caeef8cd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 06:27:07 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 12 Nov 2024 01:27:07 -0500 Subject: [Git][ghc/ghc][master] EPA: Capture location of '_' for wild card type binder Message-ID: <6732f53bae494_1960fefba11c12205f@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - 25 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/printer/Makefile - + testsuite/tests/printer/Test25454.hs - testsuite/tests/printer/all.T - utils/check-exact/ExactPrint.hs - utils/check-exact/Main.hs - utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs - utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs - utils/haddock/haddock-api/src/Haddock/Convert.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs - utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs - utils/haddock/haddock-api/src/Haddock/Interface/RenameType.hs Changes: ===================================== compiler/GHC/Hs/Type.hs ===================================== @@ -365,7 +365,11 @@ type instance XBndrNoKind (GhcPass p) = NoExtField type instance XXBndrKind (GhcPass p) = DataConCantHappen type instance XBndrVar (GhcPass p) = NoExtField -type instance XBndrWildCard (GhcPass p) = NoExtField + +type instance XBndrWildCard GhcPs = EpToken "_" +type instance XBndrWildCard GhcRn = NoExtField +type instance XBndrWildCard GhcTc = NoExtField + type instance XXBndrVar (GhcPass p) = DataConCantHappen data AnnTyVarBndr @@ -491,7 +495,9 @@ type instance XExplicitTupleTy GhcTc = [Kind] type instance XTyLit (GhcPass _) = NoExtField -type instance XWildCardTy (GhcPass _) = NoExtField +type instance XWildCardTy GhcPs = EpToken "_" +type instance XWildCardTy GhcRn = NoExtField +type instance XWildCardTy GhcTc = NoExtField type instance XXType (GhcPass _) = HsCoreTy @@ -674,8 +680,8 @@ ignoreParens ty = ty ************************************************************************ -} -mkAnonWildCardTy :: HsType GhcPs -mkAnonWildCardTy = HsWildCardTy noExtField +mkAnonWildCardTy :: EpToken "_" -> HsType GhcPs +mkAnonWildCardTy tok = HsWildCardTy tok mkHsOpTy :: (Anno (IdGhcP p) ~ SrcSpanAnnN) => PromotionFlag @@ -1413,13 +1419,13 @@ ppr_mono_ty (HsSpliceTy ext s) = ppr_mono_ty (HsExplicitListTy _ prom tys) | isPromoted prom = quote $ brackets (maybeAddSpace tys $ interpp'SP tys) | otherwise = brackets (interpp'SP tys) -ppr_mono_ty (HsExplicitTupleTy _ tys) +ppr_mono_ty (HsExplicitTupleTy _ prom tys) -- Special-case unary boxed tuples so that they are pretty-printed as -- `'MkSolo x`, not `'(x)` | [ty] <- tys - = quoteIfPunsEnabled $ sep [text (mkTupleStr Boxed dataName 1), ppr_mono_lty ty] + = quote_tuple prom $ sep [text (mkTupleStr Boxed dataName 1), ppr_mono_lty ty] | otherwise - = quoteIfPunsEnabled $ parens (maybeAddSpace tys $ interpp'SP tys) + = quote_tuple prom $ parens (maybeAddSpace tys $ interpp'SP tys) ppr_mono_ty (HsTyLit _ t) = ppr t ppr_mono_ty (HsWildCardTy {}) = char '_' @@ -1453,6 +1459,10 @@ ppr_fun_ty mult ty1 ty2 in sep [p1, arr <+> p2] +quote_tuple :: PromotionFlag -> SDoc -> SDoc +quote_tuple IsPromoted doc = quote doc +quote_tuple NotPromoted doc = doc + -------------------------- -- | @'hsTypeNeedsParens' p t@ returns 'True' if the type @t@ needs parentheses -- under precedence @p at . @@ -1482,7 +1492,7 @@ hsTypeNeedsParens p = go_hs_ty -- Special-case unary boxed tuple applications so that they are -- parenthesized as `Proxy ('MkSolo x)`, not `Proxy 'MkSolo x` (#18612) -- See Note [One-tuples] in GHC.Builtin.Types - go_hs_ty (HsExplicitTupleTy _ [_]) + go_hs_ty (HsExplicitTupleTy _ _ [_]) = p >= appPrec go_hs_ty (HsExplicitTupleTy{}) = False go_hs_ty (HsTyLit{}) = False ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -1464,7 +1464,7 @@ repTy t@(HsSpliceTy (HsUntypedSpliceTop _ _) _) = pprPanic "repTy: top level spl repTy (HsExplicitListTy _ _ tys) = do tys1 <- repLTys tys repTPromotedList tys1 -repTy (HsExplicitTupleTy _ tys) = do +repTy (HsExplicitTupleTy _ _ tys) = do tys1 <- repLTys tys tcon <- repPromotedTupleTyCon (length tys) repTapps tcon tys1 ===================================== compiler/GHC/Iface/Ext/Ast.hs ===================================== @@ -1952,7 +1952,7 @@ instance ToHie (LocatedA (HsType GhcRn)) where HsExplicitListTy _ _ tys -> [ toHie tys ] - HsExplicitTupleTy _ tys -> + HsExplicitTupleTy _ _ tys -> [ toHie tys ] HsTyLit _ _ -> [] ===================================== compiler/GHC/Parser.y ===================================== @@ -2316,7 +2316,7 @@ atype :: { LHsType GhcPs } : ntgtycon {% amsA' (sL1 $1 (HsTyVar noAnn NotPromoted $1)) } -- Not including unit tuples -- See Note [%shift: atype -> tyvar] | tyvar %shift {% amsA' (sL1 $1 (HsTyVar noAnn NotPromoted $1)) } -- (See Note [Unit tuples]) - | '_' %shift { sL1a $1 $ mkAnonWildCardTy } + | '_' %shift { sL1a $1 $ mkAnonWildCardTy (epTok $1) } | '*' {% do { warnStarIsType (getLoc $1) ; return $ sL1a $1 (HsStarTy noExtField (isUnicode $1)) } } @@ -2342,14 +2342,14 @@ atype :: { LHsType GhcPs } | '(' ktype ')' {% amsA' (sLL $1 $> $ HsParTy (epTok $1, epTok $3) $2) } -- see Note [Promotion] for the followings | SIMPLEQUOTE '(' ')' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> - ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $3) []) }} + ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $3) IsPromoted []) }} | SIMPLEQUOTE gen_qcon {% amsA' (sLL $1 $> $ HsTyVar (epTok $1) IsPromoted $2) } | SIMPLEQUOTE sysdcon_nolist {% do { requireLTPuns PEP_QuoteDisambiguation $1 (reLoc $>) ; amsA' (sLL $1 $> $ HsTyVar (epTok $1) IsPromoted (L (getLoc $2) $ nameRdrName (dataConName (unLoc $2)))) }} | SIMPLEQUOTE '(' ktype ',' comma_types1 ')' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> ; h <- addTrailingCommaA $3 (epTok $4) - ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $6) (h : $5)) }} + ; amsA' (sLL $1 $> $ HsExplicitTupleTy (epTok $1,epTok $2,epTok $6) IsPromoted (h : $5)) }} | '[' ']' {% withCombinedComments $1 $> (mkListSyntaxTy0 (epTok $1) (epTok $2)) } | SIMPLEQUOTE '[' comma_types0 ']' {% do { requireLTPuns PEP_QuoteDisambiguation $1 $> ; amsA' (sLL $1 $> $ HsExplicitListTy (epTok $1, epTok $2, epTok $4) IsPromoted $3) }} @@ -2435,7 +2435,7 @@ tv_bndr_no_braces :: { LHsTyVarBndr Specificity GhcPs } tyvar_wc :: { Located (HsBndrVar GhcPs) } : tyvar { sL1 $1 (HsBndrVar noExtField $1) } - | '_' { sL1 $1 (HsBndrWildCard noExtField) } + | '_' { sL1 $1 (HsBndrWildCard (epTok $1)) } fds :: { Located (EpToken "|",[LHsFunDep GhcPs]) } : {- empty -} { noLoc (NoEpTok,[]) } @@ -4704,4 +4704,4 @@ combineHasLocs a b = combineSrcSpans (getHasLoc a) (getHasLoc b) fromTrailingN :: SrcSpanAnnN -> SrcSpanAnnA fromTrailingN (EpAnn anc ann cs) = EpAnn anc (AnnListItem (nann_trailing ann)) cs -} \ No newline at end of file +} ===================================== compiler/GHC/Parser/PostProcess.hs ===================================== @@ -980,8 +980,8 @@ checkTyVars pp_what equals_or_where tc tparms match_bndr_var :: HsType GhcPs -> Maybe (EpToken "'", HsBndrVar GhcPs) match_bndr_var (HsTyVar ann _ tv) | isRdrTyVar (unLoc tv) = Just (ann, HsBndrVar noExtField tv) - match_bndr_var (HsWildCardTy _) - = Just (noAnn, HsBndrWildCard noExtField) + match_bndr_var (HsWildCardTy tok) + = Just (noAnn, HsBndrWildCard tok) match_bndr_var _ = Nothing -- Return a EpaLocation for use in widenLocatedAnL. @@ -1159,7 +1159,7 @@ checkContext orig_t@(L (EpAnn l _ cs) _orig_t) = -- With NoListTuplePuns, contexts are parsed as data constructors, which causes failure -- downstream. -- This converts them just like when they are parsed as types in the punned case. - check (oparens,cparens,cs) (L _l (HsExplicitTupleTy (q,o,c) ts)) + check (oparens,cparens,cs) (L _l (HsExplicitTupleTy (q,o,c) _ ts)) = punsAllowed >>= \case True -> unprocessed False -> do @@ -3622,7 +3622,7 @@ mkTupleSyntaxTy parOpen args parClose = enabled = HsTupleTy annParen HsBoxedOrConstraintTuple args disabled = - HsExplicitTupleTy annsKeyword args + HsExplicitTupleTy annsKeyword NotPromoted args annParen = AnnParens parOpen parClose annsKeyword = (NoEpTok, parOpen, parClose) ===================================== compiler/GHC/Rename/HsType.hs ===================================== @@ -684,10 +684,10 @@ rnHsTyKi env ty@(HsExplicitListTy _ ip tys) addDiagnostic (TcRnUntickedPromotedThing $ UntickedExplicitList) ; return (HsExplicitListTy noExtField ip tys', fvs) } -rnHsTyKi env ty@(HsExplicitTupleTy _ tys) +rnHsTyKi env ty@(HsExplicitTupleTy _ ip tys) = do { checkDataKinds env ty ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys - ; return (HsExplicitTupleTy noExtField tys', fvs) } + ; return (HsExplicitTupleTy noExtField ip tys', fvs) } rnHsTyKi env (HsWildCardTy _) = do { checkAnonWildCard env @@ -955,9 +955,10 @@ bindHsQTyVars doc mb_assoc body_kv_occs hsq_bndrs thing_inside get_bndr_loc (L l tvb) = combineSrcSpans (case hsBndrVar tvb of - HsBndrWildCard _ -> - locA l -- this should rather be the location of the wildcard, - -- but we don't have it + HsBndrWildCard tok -> + case tok of + NoEpTok -> locA l + EpTok loc -> locA loc HsBndrVar _ ln -> getLocA ln) (case hsBndrKind tvb of HsBndrNoKind _ -> noSrcSpan @@ -2083,7 +2084,7 @@ extract_lty (L _ ty) acc HsSpliceTy {} -> acc -- Type splices mention no tvs HsDocTy _ ty _ -> extract_lty ty acc HsExplicitListTy _ _ tys -> extract_ltys tys acc - HsExplicitTupleTy _ tys -> extract_ltys tys acc + HsExplicitTupleTy _ _ tys -> extract_ltys tys acc HsTyLit _ _ -> acc HsStarTy _ _ -> acc HsKindSig _ ty ki -> extract_kind_sig ty ki acc ===================================== compiler/GHC/Rename/Pat.hs ===================================== @@ -1375,10 +1375,10 @@ rn_ty_pat ty@(HsExplicitListTy _ prom tys) = do tys' <- mapM rn_lty_pat tys pure (HsExplicitListTy noExtField prom tys') -rn_ty_pat ty@(HsExplicitTupleTy _ tys) = do +rn_ty_pat ty@(HsExplicitTupleTy _ prom tys) = do check_data_kinds ty tys' <- mapM rn_lty_pat tys - pure (HsExplicitTupleTy noExtField tys') + pure (HsExplicitTupleTy noExtField prom tys') rn_ty_pat tyLit@(HsTyLit src t) = do check_data_kinds tyLit ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -1027,7 +1027,7 @@ expr_to_type earg = | isBoxed boxity , Just es <- tupArgsPresent_maybe tup_args = do { ts <- traverse go es - ; return (L l (HsExplicitTupleTy noExtField ts)) } + ; return (L l (HsExplicitTupleTy noExtField NotPromoted ts)) } go (L l (ExplicitList _ es)) = do { ts <- traverse go es ; return (L l (HsExplicitListTy noExtField NotPromoted ts)) } ===================================== compiler/GHC/Tc/Gen/HsType.hs ===================================== @@ -1214,7 +1214,7 @@ tcHsType mode rn_ty@(HsExplicitListTy _ _ tys) exp_kind mk_cons k a b = mkTyConApp (promoteDataCon consDataCon) [k, a, b] mk_nil k = mkTyConApp (promoteDataCon nilDataCon) [k] -tcHsType mode rn_ty@(HsExplicitTupleTy _ tys) exp_kind +tcHsType mode rn_ty@(HsExplicitTupleTy _ _ tys) exp_kind -- using newMetaKindVar means that we force instantiations of any polykinded -- types. At first, I just used tc_infer_lhs_type, but that led to #11255. = do { ks <- replicateM arity newMetaKindVar ===================================== compiler/GHC/Tc/Gen/Pat.hs ===================================== @@ -536,7 +536,7 @@ pat_to_type (SplicePat (HsUntypedSpliceTop mod_finalizers pat) splice) = do pat_to_type (TuplePat _ pats Boxed) = do { tys <- traverse (pat_to_type . unLoc) pats - ; let t = noLocA (HsExplicitTupleTy noExtField tys) + ; let t = noLocA (HsExplicitTupleTy noExtField NotPromoted tys) ; pure t } pat_to_type (ListPat _ pats) = do { tys <- traverse (pat_to_type . unLoc) pats ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -285,7 +285,7 @@ no_anon_wc_ty lty = go lty HsBangTy _ _ ty -> go ty HsRecTy _ flds -> gos $ map (cd_fld_type . unLoc) flds HsExplicitListTy _ _ tys -> gos tys - HsExplicitTupleTy _ tys -> gos tys + HsExplicitTupleTy _ _ tys -> gos tys HsForAllTy { hst_tele = tele , hst_body = ty } -> no_anon_wc_tele tele && go ty ===================================== compiler/GHC/ThToHs.hs ===================================== @@ -1756,7 +1756,7 @@ cvtTypeKind typeOrKind ty -> mk_apps (HsTyLit noExtField (cvtTyLit lit)) tys' WildCardT - -> mk_apps mkAnonWildCardTy tys' + -> mk_apps (mkAnonWildCardTy noAnn) tys' InfixT t1 s t2 -> do { s' <- tconName s @@ -1805,7 +1805,7 @@ cvtTypeKind typeOrKind ty PromotedTupleT n | Just normals <- m_normals , normals `lengthIs` n -- Saturated - -> returnLA (HsExplicitTupleTy noAnn normals) + -> returnLA (HsExplicitTupleTy noAnn IsPromoted normals) | otherwise -> do { tuple_tc <- returnLA $ getRdrName $ tupleDataCon Boxed n ; mk_apps (HsTyVar noAnn IsPromoted tuple_tc) tys' } ===================================== compiler/Language/Haskell/Syntax/Type.hs ===================================== @@ -917,6 +917,7 @@ data HsType pass | HsExplicitTupleTy -- A promoted explicit tuple (XExplicitTupleTy pass) + PromotionFlag -- whether explicitly promoted, for pretty printer [LHsType pass] | HsTyLit (XTyLit pass) (HsTyLit pass) -- A promoted numeric literal. ===================================== testsuite/tests/parser/should_compile/KindSigs.stderr ===================================== @@ -1418,6 +1418,7 @@ (EpaSpan { KindSigs.hs:28:17 })) (EpTok (EpaSpan { KindSigs.hs:28:44 }))) + (IsPromoted) [(L (EpAnn (EpaSpan { KindSigs.hs:28:19-39 }) ===================================== testsuite/tests/printer/Makefile ===================================== @@ -886,3 +886,8 @@ Test24159: Test25132: $(CHECK_PPR) $(LIBDIR) Test25132.hs $(CHECK_EXACT) $(LIBDIR) Test25132.hs + +.PHONY: Test25454 +Test25454: + $(CHECK_PPR) $(LIBDIR) Test25454.hs + $(CHECK_EXACT) $(LIBDIR) Test25454.hs ===================================== testsuite/tests/printer/Test25454.hs ===================================== @@ -0,0 +1,139 @@ +{-# LANGUAGE AllowAmbiguousTypes #-} +{-# LANGUAGE TypeAbstractions #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE DataKinds, NoListTuplePuns #-} + +module T23501a where + +import Prelude.Experimental (List, Unit) +import Data.Kind (Type, Constraint) + +---------------------------- +-- Class declarations -- +---------------------------- + +class C1 (_ :: k) _ -- no SAKS + where f1 :: k -> Unit + +f1' :: C1 @k a b => k -> Unit +f1' @_ @a @b = f1 @_ @a @b + +type C2 :: k1 -> k2 -> Constraint +class C2 (_ :: k) _ where + f2 :: k -> Unit + +f2' :: C2 @k1 @k2 a b => k1 -> Unit +f2' @_ @_ @a @b = f2 @_ @_ @a @b + +type C3 :: k1 -> k2 -> Constraint +class C3 @k @_ _ _ where + f3 :: k -> Unit + +f3' :: C3 @k1 @k2 a b => k1 -> Unit +f3' @_ @_ @a @b = f3 @_ @_ @a @b + +--------------------------- +-- Data declarations -- +--------------------------- + +data D1 k (_ :: k) _ -- no SAKS + where MkD1 :: k -> D1 k a b + +mkD1 :: k -> D1 k a b +mkD1 = MkD1 + +type D2 :: forall (k1 :: Type) -> k1 -> k2 -> Type +data D2 k (_ :: k) _ where + MkD2 :: k -> D2 k a b + +mkD2 :: k -> D2 k a b +mkD2 = MkD2 + +type D3 :: k1 -> k2 -> Type +data D3 @k @_ _ _ = MkD3 k + +data MProxy (_ :: Type) = MPrx +data CProxy (_ :: k -> Constraint) = CPrx + +type Rec :: (k -> Type) -> List k -> Type +data Rec _ _ where + RNil :: Rec f [] + (:&) :: f x -> Rec f xs -> Rec f (x:xs) + +------------------ +-- Newtypes -- +------------------ + +newtype N1 k (_ :: k) _ -- no SAKS + = MkN1 k + +mkN1 :: k -> N1 k a b +mkN1 = MkN1 + +type N2 :: forall (k1 :: Type) -> k1 -> k2 -> Type +newtype N2 k (_ :: k) _ = MkN2 k + +mkN2 :: k -> N2 k a b +mkN2 = MkN2 + +---------------------------- +-- Open type families -- +---------------------------- + +type family OTF1 (_ :: Type -> Type) _ -- no SAKS + +type instance OTF1 f x = f x + +otf1 :: OTF1 Maybe Int -> Int +otf1 Nothing = 0 +otf1 (Just x) = x + +type OTF2 :: (Type -> Type) -> Type -> Type +type family OTF2 (_ :: Type -> Type) _ + +type instance OTF2 f x = f x + +otf2 :: OTF2 Maybe Int -> Int +otf2 Nothing = 0 +otf2 (Just x) = x + +------------------------------ +-- Closed type families -- +------------------------------ + +type family CTF1 (_ :: Type -> Type) _ -- no SAKS + where CTF1 f x = f x + +ctf1 :: CTF1 Maybe Int -> Int +ctf1 Nothing = 0 +ctf1 (Just x) = x + +type CTF2 :: (Type -> Type) -> Type -> Type +type family CTF2 (_ :: Type -> Type) _ where + CTF2 f x = f x + +ctf2 :: CTF2 Maybe Int -> Int +ctf2 Nothing = 0 +ctf2 (Just x) = x + +type CTF3 :: k1 -> k2 -> Type +type family CTF3 @_ @k _ _ + where CTF3 @_ @k _ _ = k + +ctf3 :: CTF3 a True -> Bool +ctf3 = id + +----------------------- +-- Type synonyms -- +----------------------- + +type T1 (_ :: Type -> Type) _ = () -- no SAKS + +type T2 :: (Type -> Type) -> k -> Type +type T2 (_ :: Type -> Type) _ = Unit + +type T3 :: k1 -> k2 -> Type +type T3 @_ @k _ _ = k + +type FConst _ = () ===================================== testsuite/tests/printer/all.T ===================================== @@ -212,3 +212,5 @@ test('Test24159', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24159']) test('Test25132', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25132']) test('T24237', normal, compile_fail, ['']) + +test('Test25454', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25454']) \ No newline at end of file ===================================== utils/check-exact/ExactPrint.hs ===================================== @@ -3935,9 +3935,9 @@ instance ExactPrint (HsBndrVar GhcPs) where exact (HsBndrVar x n) = do n' <- markAnnotated n return (HsBndrVar x n') - exact (HsBndrWildCard x) = do - printStringAdvance "_" - return (HsBndrWildCard x) + exact (HsBndrWildCard t) = do + t' <- markEpToken t + return (HsBndrWildCard t') -- --------------------------------------------------------------------- @@ -4046,12 +4046,14 @@ instance ExactPrint (HsType GhcPs) where tys' <- markAnnotated tys c' <- markEpToken c return (HsExplicitListTy (sq',o',c') prom tys') - exact (HsExplicitTupleTy (sq, o, c) tys) = do - sq' <- markEpToken sq + exact (HsExplicitTupleTy (sq, o, c) prom tys) = do + sq' <- if (isPromoted prom) + then markEpToken sq + else return sq o' <- markEpToken o tys' <- markAnnotated tys c' <- markEpToken c - return (HsExplicitTupleTy (sq', o', c') tys') + return (HsExplicitTupleTy (sq', o', c') prom tys') exact (HsTyLit a lit) = do case lit of (HsNumTy src v) -> printSourceText src (show v) ===================================== utils/check-exact/Main.hs ===================================== @@ -89,7 +89,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/parser/should_compile/T14189.hs" Nothing -- "../../testsuite/tests/printer/AnnotationLet.hs" Nothing - "../../testsuite/tests/printer/AnnotationTuple.hs" Nothing + -- "../../testsuite/tests/printer/AnnotationTuple.hs" Nothing -- "../../testsuite/tests/printer/Ppr001.hs" Nothing -- "../../testsuite/tests/printer/Ppr002.hs" Nothing -- "../../testsuite/tests/printer/Ppr002a.hs" Nothing @@ -216,6 +216,7 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/printer/Test22765.hs" Nothing -- "../../testsuite/tests/printer/Test22771.hs" Nothing -- "../../testsuite/tests/printer/Test23465.hs" Nothing + "../../testsuite/tests/printer/Test25454.hs" Nothing -- cloneT does not need a test, function can be retired ===================================== utils/haddock/haddock-api/src/Haddock/Backends/LaTeX.hs ===================================== @@ -1327,7 +1327,8 @@ ppr_mono_ty (HsRecTy{}) _ = text "{..}" ppr_mono_ty (XHsType{}) _ = error "ppr_mono_ty HsCoreTy" ppr_mono_ty (HsExplicitListTy _ IsPromoted tys) u = Pretty.quote $ brackets $ hsep $ punctuate comma $ map (ppLType u) tys ppr_mono_ty (HsExplicitListTy _ NotPromoted tys) u = brackets $ hsep $ punctuate comma $ map (ppLType u) tys -ppr_mono_ty (HsExplicitTupleTy _ tys) u = Pretty.quote $ parenList $ map (ppLType u) tys +ppr_mono_ty (HsExplicitTupleTy _ IsPromoted tys) u = Pretty.quote $ parenList $ map (ppLType u) tys +ppr_mono_ty (HsExplicitTupleTy _ NotPromoted tys) u = parenList $ map (ppLType u) tys ppr_mono_ty (HsAppTy _ fun_ty arg_ty) unicode = hsep [ppr_mono_lty fun_ty unicode, ppr_mono_lty arg_ty unicode] ppr_mono_ty (HsAppKindTy _ fun_ty arg_ki) unicode = ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs ===================================== @@ -1836,7 +1836,8 @@ ppr_mono_ty (HsRecTy{}) _ _ _ = toHtml "{..}" ppr_mono_ty (XHsType{}) _ _ _ = error "ppr_mono_ty HsCoreTy" ppr_mono_ty (HsExplicitListTy _ IsPromoted tys) u q _ = promoQuote $ brackets $ hsep $ punctuate comma $ map (ppLType u q HideEmptyContexts) tys ppr_mono_ty (HsExplicitListTy _ NotPromoted tys) u q _ = brackets $ hsep $ punctuate comma $ map (ppLType u q HideEmptyContexts) tys -ppr_mono_ty (HsExplicitTupleTy _ tys) u q _ = promoQuote $ parenList $ map (ppLType u q HideEmptyContexts) tys +ppr_mono_ty (HsExplicitTupleTy _ IsPromoted tys) u q _ = promoQuote $ parenList $ map (ppLType u q HideEmptyContexts) tys +ppr_mono_ty (HsExplicitTupleTy _ NotPromoted tys) u q _ = parenList $ map (ppLType u q HideEmptyContexts) tys ppr_mono_ty (HsAppTy _ fun_ty arg_ty) unicode qual _ = hsep [ ppr_mono_lty fun_ty unicode qual HideEmptyContexts ===================================== utils/haddock/haddock-api/src/Haddock/Convert.hs ===================================== @@ -742,7 +742,7 @@ synifyType _ vs (TyConApp tc tys) = | Just dc <- isPromotedDataCon_maybe tc , isTupleDataCon dc , dataConSourceArity dc == length vis_tys = - noLocA $ HsExplicitTupleTy noExtField (map (synifyType WithinType vs) vis_tys) + noLocA $ HsExplicitTupleTy noExtField IsPromoted (map (synifyType WithinType vs) vis_tys) -- ditto for lists | getName tc == listTyConName , [ty] <- vis_tys = ===================================== utils/haddock/haddock-api/src/Haddock/GhcUtils.hs ===================================== @@ -417,7 +417,7 @@ reparenTypePrec = go go _ (HsRecTy x flds) = HsRecTy x (map (mapXRec @a reparenConDeclField) flds) go p (HsDocTy x ty d) = HsDocTy x (goL p ty) d go _ (HsExplicitListTy x p tys) = HsExplicitListTy x p (map reparenLType tys) - go _ (HsExplicitTupleTy x tys) = HsExplicitTupleTy x (map reparenLType tys) + go _ (HsExplicitTupleTy x p tys) = HsExplicitTupleTy x p (map reparenLType tys) go p (HsKindSig x ty kind) = paren p PREC_SIG $ HsKindSig x (goL PREC_SIG ty) (goL PREC_SIG kind) go p (HsIParamTy x n ty) = ===================================== utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs ===================================== @@ -408,12 +408,12 @@ renameType t = case t of HsExplicitListTy _ a b -> HsExplicitListTy noAnn a <$> mapM renameLType b -- Special-case unary boxed tuples so that they are pretty-printed as -- `'MkSolo x`, not `'(x)` - HsExplicitTupleTy _ [ty] -> do + HsExplicitTupleTy _ ip [ty] -> do name <- renameName (tupleDataConName Boxed 1) - let lhs = noLocA $ HsTyVar noAnn IsPromoted (noLocA name) + let lhs = noLocA $ HsTyVar noAnn ip (noLocA name) rhs <- renameLType ty return (HsAppTy noAnn lhs rhs) - HsExplicitTupleTy _ b -> HsExplicitTupleTy noAnn <$> mapM renameLType b + HsExplicitTupleTy _ ip b -> HsExplicitTupleTy noAnn ip <$> mapM renameLType b HsSpliceTy (HsUntypedSpliceTop _ st) _ -> renameType (unLoc st) HsSpliceTy (HsUntypedSpliceNested _) _ -> error "renameType: not an top level type splice" HsWildCardTy _ -> pure (HsWildCardTy noAnn) ===================================== utils/haddock/haddock-api/src/Haddock/Interface/RenameType.hs ===================================== @@ -116,8 +116,8 @@ renameType t@(HsRecTy _ _) = pure t renameType t@(XHsType _) = pure t renameType (HsExplicitListTy x ip ltys) = HsExplicitListTy x ip <$> renameLTypes ltys -renameType (HsExplicitTupleTy x ltys) = - HsExplicitTupleTy x <$> renameLTypes ltys +renameType (HsExplicitTupleTy x ip ltys) = + HsExplicitTupleTy x ip <$> renameLTypes ltys renameType t@(HsTyLit _ _) = pure t renameType (HsWildCardTy wc) = pure (HsWildCardTy wc) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ad9ac63abed33aa48d4df40142d2809bdfd1ff0 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ad9ac63abed33aa48d4df40142d2809bdfd1ff0 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 06:27:39 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 12 Nov 2024 01:27:39 -0500 Subject: [Git][ghc/ghc][master] 2 commits: wasm: fix setImmediate() implementation for Cloudflare Workers Message-ID: <6732f55b18645_1960fe89ad281222ab@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 2 changed files: - utils/jsffi/post-link.mjs - utils/jsffi/prelude.mjs Changes: ===================================== utils/jsffi/post-link.mjs ===================================== @@ -62,7 +62,7 @@ export async function postLink(mod) { // Keep this in sync with dyld.mjs! src = `${src}\nexport default (__exports) => {`; src = `${src}\nconst __ghc_wasm_jsffi_jsval_manager = new JSValManager();`; - src = `${src}\nconst __ghc_wasm_jsffi_finalization_registry = new FinalizationRegistry(sp => __exports.rts_freeStablePtr(sp));`; + src = `${src}\nconst __ghc_wasm_jsffi_finalization_registry = globalThis.FinalizationRegistry ? new FinalizationRegistry(sp => __exports.rts_freeStablePtr(sp)) : { register: () => {}, unregister: () => true };`; src = `${src}\nreturn {`; src = `${src}\nnewJSVal: (v) => __ghc_wasm_jsffi_jsval_manager.newJSVal(v),`; src = `${src}\ngetJSVal: (k) => __ghc_wasm_jsffi_jsval_manager.getJSVal(k),`; ===================================== utils/jsffi/prelude.mjs ===================================== @@ -51,6 +51,10 @@ export class JSValManager { // The actual setImmediate() to be used. This is a ESM module top // level binding and doesn't pollute the globalThis namespace. +// +// To benchmark different setImmediate() implementations in the +// browser, use https://github.com/jphpsf/setImmediate-shim-demo as a +// starting point. const setImmediate = await (async () => { // node, bun, or other scripts might have set this up in the browser if (globalThis.setImmediate) { @@ -67,30 +71,35 @@ const setImmediate = await (async () => { return (cb, ...args) => scheduler.postTask(() => cb(...args)); } - // A simple & fast setImmediate() implementation for browsers. It's - // not a drop-in replacement for node.js setImmediate() because: - // 1. There's no clearImmediate(), and setImmediate() doesn't return - // anything - // 2. There's no guarantee that callbacks scheduled by setImmediate() - // are executed in the same order (in fact it's the opposite lol), - // but you are never supposed to rely on this assumption anyway - class SetImmediate { - #fs = []; - #mc = new MessageChannel(); + // Cloudflare workers doesn't support MessageChannel + if (globalThis.MessageChannel) { + // A simple & fast setImmediate() implementation for browsers. It's + // not a drop-in replacement for node.js setImmediate() because: + // 1. There's no clearImmediate(), and setImmediate() doesn't return + // anything + // 2. There's no guarantee that callbacks scheduled by setImmediate() + // are executed in the same order (in fact it's the opposite lol), + // but you are never supposed to rely on this assumption anyway + class SetImmediate { + #fs = []; + #mc = new MessageChannel(); - constructor() { - this.#mc.port1.addEventListener("message", () => { - this.#fs.pop()(); - }); - this.#mc.port1.start(); - } + constructor() { + this.#mc.port1.addEventListener("message", () => { + this.#fs.pop()(); + }); + this.#mc.port1.start(); + } - setImmediate(cb, ...args) { - this.#fs.push(() => cb(...args)); - this.#mc.port2.postMessage(undefined); + setImmediate(cb, ...args) { + this.#fs.push(() => cb(...args)); + this.#mc.port2.postMessage(undefined); + } } + + const sm = new SetImmediate(); + return (cb, ...args) => sm.setImmediate(cb, ...args); } - const sm = new SetImmediate(); - return (cb, ...args) => sm.setImmediate(cb, ...args); + return (cb, ...args) => setTimeout(cb, 0, ...args); })(); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9ad9ac63abed33aa48d4df40142d2809bdfd1ff0...bea8ea4cabcd51d098a361bd27d78884effa5d00 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9ad9ac63abed33aa48d4df40142d2809bdfd1ff0...bea8ea4cabcd51d098a361bd27d78884effa5d00 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 07:42:31 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Tue, 12 Nov 2024 02:42:31 -0500 Subject: [Git][ghc/ghc][wip/T25439] DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <673306e769826_1960fe13b97f4131861@gitlab.mail> Sebastian Graf pushed to branch wip/T25439 at Glasgow Haskell Compiler / GHC Commits: 38ec8053 by Sebastian Graf at 2024-11-12T08:39:09+01:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 4 changed files: - compiler/GHC/Builtin/primops.txt.pp - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we give their first arg lazyApply1Dmd and not +-- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that +-- the call forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often (but not always) choose to use a wrapper around +-- catch# that is head-strict in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2772,6 +2799,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2814,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +3000,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3029,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3058,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3070,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3731,6 +3760,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] effect = ReadWriteEffect -- The invoked computation may have side effects ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/38ec8053e3c6c86e3271e9eff8e3aa0ba94e5b02 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/38ec8053e3c6c86e3271e9eff8e3aa0ba94e5b02 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 08:13:09 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Tue, 12 Nov 2024 03:13:09 -0500 Subject: [Git][ghc/ghc][wip/9.12-alpha2] testsuite: allow metric increase for TcPlugin_RewritePerf Message-ID: <67330e151109a_1960fe15bc60013498@gitlab.mail> Zubin pushed to branch wip/9.12-alpha2 at Glasgow Haskell Compiler / GHC Commits: 8de7406f by Zubin Duggal at 2024-11-12T13:42:19+05:30 testsuite: allow metric increase for TcPlugin_RewritePerf this is an empty commit to allow this backports batch to be merged. Metric Increase: TcPlugin_RewritePerf - - - - - 0 changed files: Changes: View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8de7406f00c8db25fe93a1e612b2ac258aed4d3d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8de7406f00c8db25fe93a1e612b2ac258aed4d3d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 08:40:00 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Tue, 12 Nov 2024 03:40:00 -0500 Subject: [Git][ghc/ghc][wip/T24744] 3 commits: Basic cleanup Message-ID: <67331460ce0ed_1960fe1721f041384aa@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: b4519be3 by Serge S. Gulin at 2024-11-12T11:39:39+03:00 Basic cleanup - - - - - 235225c1 by Serge S. Gulin at 2024-11-12T11:39:48+03:00 Add trivial optimizations for `unpackCString` and `unpackCStringUtf8` - - - - - ae9b18fd by Serge S. Gulin at 2024-11-12T11:39:48+03:00 Enable static args - - - - - 11 changed files: - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/Arg.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Expr.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/StgToJS/Linker/Linker.hs - compiler/GHC/StgToJS/Monad.hs - compiler/GHC/StgToJS/Object.hs - compiler/GHC/StgToJS/Symbols.hs - compiler/GHC/StgToJS/Types.hs - rts/js/string.js Changes: ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -157,6 +157,24 @@ genApp ctx i args , ExprInline ) + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringName + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringUtf8Name + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + -- let-no-escape | Just n <- ctxLneBindingStackSize ctx i = do ===================================== compiler/GHC/StgToJS/Arg.hs ===================================== @@ -22,9 +22,6 @@ module GHC.StgToJS.Arg , genIdArgI , genIdStackArgI , allocConStatic - , allocUnboxedConStatic - , allocateStaticList - , jsStaticArg , jsStaticArgs ) where @@ -215,7 +212,7 @@ allocConStatic (identFS -> to) cc con args = do emitStatic to (StaticUnboxed $ StaticUnboxedBool True) cc' | otherwise = do e <- identFS <$> identForDataConWorker con - emitStatic to (StaticData e []) cc' + emitStatic to (StaticScalar $ StaticApp SAKData e []) cc' allocConStatic' cc' [x] | isUnboxableCon con = case x of @@ -234,7 +231,7 @@ allocConStatic (identFS -> to) cc con args = do _ -> panic "allocConStatic: invalid args for consDataCon" else do e <- identFS <$> identForDataConWorker con - emitStatic to (StaticData e xs) cc' + emitStatic to (StaticScalar $ StaticApp SAKData e xs) cc' -- | Allocate unboxed constructors allocUnboxedConStatic :: DataCon -> [StaticArg] -> StaticArg ===================================== compiler/GHC/StgToJS/CodeGen.hs ===================================== @@ -329,7 +329,7 @@ genToplevelRhs i rhs = case rhs of body <- genBody (initExprCtx i) R2 args body typ global_occs <- globalOccs body let eidt = identFS eid - let lidents = map global_ident global_occs + let lidents = concatMap global_idents global_occs let lids = map global_id global_occs let lidents' = map identFS lidents CIStaticRefs sr0 <- genStaticRefsRhs rhs @@ -337,15 +337,15 @@ genToplevelRhs i rhs = case rhs of sr = CIStaticRefs sri et <- genEntryType args ll <- loadLiveFun lids - (static, regs, upd) <- + (appK, regs, upd) <- if et == CIThunk then do r <- updateThunk - pure (StaticThunk (Just (eidt, map StaticObjArg lidents')), CIRegs 0 [PtrV],r) - else return (StaticFun eidt (map StaticObjArg lidents'), - (if null lidents then CIRegs 1 (concatMap idJSRep args) - else CIRegs 0 (PtrV : concatMap idJSRep args)) - , mempty) + pure (SAKThunk, CIRegs 0 [PtrV], r) + else + let regs = if null lidents then CIRegs 1 (concatMap idJSRep args) + else CIRegs 0 (PtrV : concatMap idJSRep args) + in pure (SAKFun, regs, mempty) setcc <- ifProfiling $ if et == CIThunk then enterCostCentreThunk @@ -359,5 +359,5 @@ genToplevelRhs i rhs = case rhs of , ciStatic = sr } ccId <- costCentreStackLbl cc - emitStatic idt static ccId + emitStatic idt (StaticScalar $ StaticApp appK eidt $ map StaticObjArg lidents') ccId return $ (FuncStat eid [] (ll <> upd <> setcc <> body)) ===================================== compiler/GHC/StgToJS/Expr.hs ===================================== @@ -606,6 +606,32 @@ genCase ctx bnd e at alts l , ExprInline ) + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringName + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringUtf8Name + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + | isInlineExpr e = do bndi <- identsForId bnd let ctx' = ctxSetTop bnd ===================================== compiler/GHC/StgToJS/Ids.hs ===================================== @@ -155,7 +155,7 @@ cachedIdentForId i mi id_type = do -- Now update the GlobalId cache, if required - let update_global_cache = isGlobalId i && isNothing mi && id_type == IdPlain + let update_global_cache = isGlobalId i && id_type == IdPlain -- fixme also allow caching entries for lifting? when (update_global_cache) $ do ===================================== compiler/GHC/StgToJS/Linker/Linker.hs ===================================== @@ -24,8 +24,6 @@ module GHC.StgToJS.Linker.Linker ( jsLinkBinary , jsLink , embedJsFile - , staticInitStat - , staticDeclStat , mkExportedFuns , mkExportedModFuns , computeLinkDependencies @@ -1253,27 +1251,22 @@ staticInitStat :: StaticInfo -> JS.JStat staticInitStat (StaticInfo i sv mcc) = jStgStatToJS $ case sv of - StaticData con args -> appS hdStiStr $ add_cc_arg - [ global i - , global con - , jsStaticArgs args - ] - StaticFun f args -> appS hdStiStr $ add_cc_arg - [ global i - , global f - , jsStaticArgs args - ] - StaticList args mt -> appS hdStlStr $ add_cc_arg - [ global i - , jsStaticArgs args - , toJExpr $ maybe null_ (toJExpr . TxtI) mt - ] - StaticThunk (Just (f,args)) -> appS hdStcStr $ add_cc_arg - [ global i - , global f - , jsStaticArgs args - ] - _ -> mempty + StaticScalar (StaticApp k app args) -> appS + (if k == SAKThunk then hdStcStr else hdStiStr) + $ add_cc_arg + [ global i + , global app + , jsStaticArgs args + ] + + StaticList args mt -> appS hdStlStr + $ add_cc_arg + [ global i + , jsStaticArgs args + , toJExpr $ maybe null_ (toJExpr . TxtI) mt + ] + + StaticUnboxed _ -> mempty where -- add optional cost-center argument add_cc_arg as = case mcc of @@ -1286,20 +1279,15 @@ staticDeclStat (StaticInfo global_name static_value _) = jStgStatToJS decl where global_ident = name global_name decl_init v = global_ident ||= v - decl_no_init = appS hdDiStr [toJExpr global_ident] decl = case static_value of StaticUnboxed u -> decl_init (unboxed_expr u) - StaticThunk Nothing -> decl_no_init -- CAF initialized in an alternative way _ -> decl_init (app hdDStr []) unboxed_expr = \case StaticUnboxedBool b -> app hdPStr [toJExpr b] StaticUnboxedInt i -> app hdPStr [toJExpr i] StaticUnboxedDouble d -> app hdPStr [toJExpr (unSaneDouble d)] - -- GHCJS used a function wrapper for this: - -- StaticUnboxedString str -> ApplExpr (initStr str) [] - -- But we are defining it statically for now. StaticUnboxedString str -> initStr str StaticUnboxedStringOffset {} -> 0 ===================================== compiler/GHC/StgToJS/Monad.hs ===================================== @@ -153,16 +153,16 @@ getGlobalIdCache = State.gets (ggsGlobalIdCache . gsGroup) setGlobalIdCache :: GlobalIdCache -> G () setGlobalIdCache v = State.modify (\s -> s { gsGroup = (gsGroup s) { ggsGlobalIdCache = v}}) - data GlobalOcc = GlobalOcc - { global_ident :: !Ident + { global_idents :: ![Ident] + -- ^ Some ids are represented by few idents. i.e. Addr# , global_id :: !Id , global_count :: !Word } instance Outputable GlobalOcc where ppr g = hang (text "GlobalOcc") 2 $ vcat - [ hcat [text "Ident: ", ppr (global_ident g)] + [ hcat [text "Idents: ", ppr (global_idents g)] , hcat [text "Id:", ppr (global_id g)] , hcat [text "Count:", ppr (global_count g)] ] @@ -175,7 +175,12 @@ globalOccs jst = do -- build a map form Ident Unique to (Ident, Id, Count) let cmp_cnt g1 g2 = compare (global_count g1) (global_count g2) - inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 } + inc g1 g2 = g1 + { global_count = global_count g1 + global_count g2 + , global_idents = global_idents g1 ++ global_idents g2 + } + + go :: UniqFM Id GlobalOcc -> [Ident] -> [GlobalOcc] go gids = \case [] -> -- return global Ids used locally sorted by increased use L.sortBy cmp_cnt $ nonDetEltsUFM gids @@ -186,7 +191,7 @@ globalOccs jst = do Just (_k,gid) -> -- add it to the list of already found global ids. Increasing -- count by 1 - let g = GlobalOcc i gid 1 - in go (addToUFM_C inc gids i g) is + let g = GlobalOcc [i] gid 1 + in go (addToUFM_C inc gids gid g) is pure $ go emptyUFM (identsS jst) ===================================== compiler/GHC/StgToJS/Object.hs ===================================== @@ -615,16 +615,16 @@ instance Binary StaticInfo where get bh = StaticInfo <$> get bh <*> get bh <*> get bh instance Binary StaticVal where - put_ bh (StaticFun f args) = putByte bh 1 >> put_ bh f >> put_ bh args - put_ bh (StaticThunk t) = putByte bh 2 >> put_ bh t - put_ bh (StaticUnboxed u) = putByte bh 3 >> put_ bh u - put_ bh (StaticData dc args) = putByte bh 4 >> put_ bh dc >> put_ bh args - put_ bh (StaticList xs t) = putByte bh 5 >> put_ bh xs >> put_ bh t + put_ bh (StaticScalar (StaticApp SAKFun f args)) = putByte bh 1 >> put_ bh f >> put_ bh args + put_ bh (StaticScalar (StaticApp SAKThunk f args)) = putByte bh 2 >> put_ bh f >> put_ bh args + put_ bh (StaticUnboxed u) = putByte bh 3 >> put_ bh u + put_ bh (StaticScalar (StaticApp SAKData dc args)) = putByte bh 4 >> put_ bh dc >> put_ bh args + put_ bh (StaticList xs t) = putByte bh 5 >> put_ bh xs >> put_ bh t get bh = getByte bh >>= \case - 1 -> StaticFun <$> get bh <*> get bh - 2 -> StaticThunk <$> get bh + 1 -> StaticScalar <$> (StaticApp SAKFun <$> get bh <*> get bh) + 2 -> StaticScalar <$> (StaticApp SAKThunk <$> get bh <*> get bh) 3 -> StaticUnboxed <$> get bh - 4 -> StaticData <$> get bh <*> get bh + 4 -> StaticScalar <$> (StaticApp SAKData <$> get bh <*> get bh) 5 -> StaticList <$> get bh <*> get bh n -> error ("Binary get bh StaticVal: invalid tag " ++ show n) ===================================== compiler/GHC/StgToJS/Symbols.hs ===================================== @@ -849,9 +849,6 @@ unknown = fsLit "" typeof :: FastString typeof = fsLit "typeof" -hdRawStr :: FastString -hdRawStr = fsLit "h$rstr" - throwStr :: FastString throwStr = fsLit "throw" @@ -1213,8 +1210,6 @@ hdStlStr = fsLit "h$stl" hdStiStr :: FastString hdStiStr = fsLit "h$sti" -hdStrStr :: FastString -hdStrStr = fsLit "h$str" ------------------------------ Pack/Unpack -------------------------------------------- hdDecodeUtf8Z :: FastString ===================================== compiler/GHC/StgToJS/Types.hs ===================================== @@ -231,18 +231,25 @@ data StaticInfo = StaticInfo , siCC :: !(Maybe Ident) -- ^ optional CCS name } deriving stock (Eq, Show) +data StaticAppKind + = SAKFun + -- ^ heap object for function + | SAKThunk + -- ^ heap object for CAF + | SAKData + -- ^ regular datacon app + deriving stock (Eq, Show) + +-- Static scalar application +data StaticApp = StaticApp StaticAppKind !FastString [StaticArg] + deriving stock (Eq, Show) + data StaticVal - = StaticFun !FastString [StaticArg] - -- ^ heap object for function - | StaticThunk !(Maybe (FastString,[StaticArg])) - -- ^ heap object for CAF (field is Nothing when thunk is initialized in an - -- alternative way, like string thunks through h$str) - | StaticUnboxed !StaticUnboxed + = StaticUnboxed !StaticUnboxed -- ^ unboxed constructor (Bool, Int, Double etc) - | StaticData !FastString [StaticArg] - -- ^ regular datacon app | StaticList [StaticArg] (Maybe FastString) -- ^ list initializer (with optional tail) + | StaticScalar StaticApp deriving stock (Eq, Show) data StaticUnboxed ===================================== rts/js/string.js ===================================== @@ -1,53 +1,5 @@ //#OPTIONS: CPP -// encode a string constant -function h$str(s) { - var enc = null; - return function() { - if(enc === null) { - enc = h$encodeModifiedUtf8(s); - } - return enc; - } -} - -// encode a packed string -// since \0 is used to separate strings (and a common occurrence) -// we add the following mapping: -// - \0 -> \cz\0 -// - \cz -> \cz\cz -// -// decoding to bytes, the following is produced: -// - \cz\0 -> C0 80 -// - \cz\cz -> 1A -// -// additionally, for dealing with raw binary data we have an escape sequence -// to pack base64 encoded runs: -// -// - \cz\xNN -> followed by NN-0x1f (31 decimal) bytes of base64 encoded -// data. supported range: 0x20 .. 0x9f (1-128 bytes data) -// - -function h$pstr(s) { - var enc = null; - return function() { - if(enc === null) { - enc = h$encodePackedUtf8(s); - } - return enc; - } -} -// encode a raw string from bytes -function h$rstr(d) { - var enc = null; - return function() { - if(enc === null) { - enc = h$rawStringData(d); - } - return enc; - } -} - // these aren't added to the CAFs, so the list stays in mem indefinitely, is that a problem? #ifdef GHCJS_PROF function h$strt(str, cc) { return MK_LAZY_CC(function() { return h$toHsString(str, cc); }, cc); } @@ -265,10 +217,27 @@ function h$encodeUtf8(str) { return h$encodeUtf8Internal(str, false, false); } +// encode a string constant function h$encodeModifiedUtf8(str) { return h$encodeUtf8Internal(str, true, false); } +// encode a packed string +// since \0 is used to separate strings (and a common occurrence) +// we add the following mapping: +// - \0 -> \cz\0 +// - \cz -> \cz\cz +// +// decoding to bytes, the following is produced: +// - \cz\0 -> C0 80 +// - \cz\cz -> 1A +// +// additionally, for dealing with raw binary data we have an escape sequence +// to pack base64 encoded runs: +// +// - \cz\xNN -> followed by NN-0x1f (31 decimal) bytes of base64 encoded +// data. supported range: 0x20 .. 0x9f (1-128 bytes data) +// function h$encodePackedUtf8(str) { return h$encodeUtf8Internal(str, false, true); } @@ -759,6 +728,30 @@ function h$appendToHsStringA(str, appendTo) { return r; } +// unpack utf8 string, append to existing Haskell string +#ifdef GHCJS_PROF +function h$appendToHsString(str, appendTo, cc) { +#else +function h$appendToHsString(str, appendTo) { +#endif + var i = str.length - 1; + // we need to make an updatable thunk here + // if we embed the given closure in a CONS cell. + // (#24495) + var r = i == 0 ? appendTo : MK_UPD_THUNK(appendTo); + while(i>=0) { + // Copied from h$toHsString + var cp = str.charCodeAt(i); + if(cp >= 0xDC00 && cp <= 0xDFFF && i > 0) { + --i; + cp = (cp - 0xDC00) + (str.charCodeAt(i) - 0xD800) * 1024 + 0x10000; + } + r = MK_CONS_CC(cp, r, cc); + --i; + } + return r; +} + // throw e wrapped in a GHCJS.Prim.JSException in the current thread function h$throwJSException(e) { // create a JSException object and wrap it in a SomeException View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/854f7ee90cd86fea634d23450805e590385c57c0...ae9b18fd3d13642423424f980b5c61866d40f453 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/854f7ee90cd86fea634d23450805e590385c57c0...ae9b18fd3d13642423424f980b5c61866d40f453 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 08:49:45 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Tue, 12 Nov 2024 03:49:45 -0500 Subject: [Git][ghc/ghc][wip/T24744] 18 commits: testsuite: normalise some versions in callstacks Message-ID: <673316a9e6880_1960fe186abcc140860@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 86f13d43 by Serge S. Gulin at 2024-11-12T11:49:25+03:00 Basic cleanup - - - - - be3b0779 by Serge S. Gulin at 2024-11-12T11:49:25+03:00 Add trivial optimizations for `unpackCString` and `unpackCStringUtf8` - - - - - 89cb8cb6 by Serge S. Gulin at 2024-11-12T11:49:25+03:00 Enable static args - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/Arg.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Expr.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/StgToJS/Linker/Linker.hs - compiler/GHC/StgToJS/Monad.hs - compiler/GHC/StgToJS/Object.hs - compiler/GHC/StgToJS/Symbols.hs - compiler/GHC/StgToJS/Types.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs - m4/fp_setup_project_version.m4 - rts/IOManager.c - rts/Updates.h - rts/js/string.js - testsuite/driver/testlib.py - testsuite/tests/backpack/should_compile/all.T The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ae9b18fd3d13642423424f980b5c61866d40f453...89cb8cb6545ef52ee07c582646bc34f1ed17e3b4 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ae9b18fd3d13642423424f980b5c61866d40f453...89cb8cb6545ef52ee07c582646bc34f1ed17e3b4 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 13:20:43 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Tue, 12 Nov 2024 08:20:43 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <6733562b4b854_2533dc6fec083768@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: eaccf5e1 by Sjoerd Visscher at 2024-11-12T14:20:35+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/printer/T18791.stderr - utils/check-exact/ExactPrint.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eaccf5e12990f30731e8a49d441f3bc18a86babd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/eaccf5e12990f30731e8a49d441f3bc18a86babd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 16:52:51 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 12 Nov 2024 11:52:51 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/testsuite-metrics-untracked Message-ID: <673387e3a7d7f_3e70956bbf98788c1@gitlab.mail> Ben Gamari pushed new branch wip/testsuite-metrics-untracked at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/testsuite-metrics-untracked You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 16:54:39 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Tue, 12 Nov 2024 11:54:39 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/fix-wasm-bindist-mk Message-ID: <6733884f2880c_3e70956bbfac79047@gitlab.mail> Cheng Shao pushed new branch wip/fix-wasm-bindist-mk at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/fix-wasm-bindist-mk You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 16:56:15 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 12 Nov 2024 11:56:15 -0500 Subject: [Git][ghc/ghc][wip/testsuite-metrics-untracked] 5940 commits: [haddock @ 2002-04-04 16:23:43 by simonmar] Message-ID: <673388af40495_3e70956f357480729@gitlab.mail> Ben Gamari pushed to branch wip/testsuite-metrics-untracked at Glasgow Haskell Compiler / GHC Commits: 2b39cd94 by Simon Marlow at 2002-04-04T16:23:43+00:00 [haddock @ 2002-04-04 16:23:43 by simonmar] This is Haddock, my stab at a Haskell documentation tool. It's not quite ready for release yet, but I'm putting it in the repository so others can take a look. It uses a locally modified version of the hssource parser, extended with support for GHC extensions and documentation annotations. - - - - - 99ede94f by Simon Marlow at 2002-04-04T16:24:10+00:00 [haddock @ 2002-04-04 16:24:10 by simonmar] forgot one file - - - - - 8363294c by Simon Marlow at 2002-04-05T13:58:15+00:00 [haddock @ 2002-04-05 13:58:15 by simonmar] Remap names in the exported declarations to be "closer" to the current module. eg. if an exported declaration mentions a type 'T' which is imported from module A then re-exported from the current module, then links from the type or indeed the documentation will point to the current module rather than module A. This is to support better hiding: module A won't be referred to in the generated output. - - - - - 1570cbc1 by Simon Marlow at 2002-04-05T13:58:23+00:00 [haddock @ 2002-04-05 13:58:23 by simonmar] update the TODO list - - - - - 3a62f96b by Simon Marlow at 2002-04-05T14:11:51+00:00 [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration - - - - - c5d9a471 by Simon Marlow at 2002-04-05T14:18:41+00:00 [haddock @ 2002-04-05 14:18:41 by simonmar] remove underlines on visited links - - - - - 97280525 by Simon Marlow at 2002-04-05T16:11:47+00:00 [haddock @ 2002-04-05 16:11:47 by simonmar] - Update to generate more correct HTML. - Use our own non-overloaded table combinators, as the overloaded versions were giving me a headache. The improved type safety caught several errors in the HTML generation. - - - - - 9acd3a4d by Simon Marlow at 2002-04-05T16:32:19+00:00 [haddock @ 2002-04-05 16:32:19 by simonmar] Add width property to the title, and add TD.children for the module contents page. - - - - - ec9a0847 by Simon Marlow at 2002-04-08T16:39:56+00:00 [haddock @ 2002-04-08 16:39:56 by simonmar] Fix a problem with exports of the form T(..). - - - - - e4627dc8 by Simon Marlow at 2002-04-08T16:41:38+00:00 [haddock @ 2002-04-08 16:41:37 by simonmar] - Add our own versions of Html & BlockTable for the time being. - Add support for generating an index to the HTML backend - - - - - 2d73fd75 by Simon Marlow at 2002-04-09T11:23:24+00:00 [haddock @ 2002-04-09 11:23:24 by simonmar] Add '-- /' as a synonym for '-- |', for compatibility with IDoc. - - - - - 3675464e by Simon Marlow at 2002-04-09T11:33:55+00:00 [haddock @ 2002-04-09 11:33:54 by simonmar] - add the <...> syntax for marking up URLs in documentation - Make the output for data & class declarations more compact when there aren't any documentation annotations on the individual methods or constructors respectively. - - - - - 5077f5b1 by Simon Marlow at 2002-04-09T11:36:04+00:00 [haddock @ 2002-04-09 11:36:04 by simonmar] Update the TODO list - - - - - 9e83c54d by Simon Marlow at 2002-04-10T10:50:06+00:00 [haddock @ 2002-04-10 10:50:06 by simonmar] Use explicit 'px' suffix on pixel sizes; IE seems to prefer them - - - - - 052de51c by Simon Marlow at 2002-04-10T13:23:13+00:00 [haddock @ 2002-04-10 13:23:13 by simonmar] Lex URLs as a single token to avoid having to escape special characters inside the URL string. - - - - - 47187edb by Simon Marlow at 2002-04-10T13:23:55+00:00 [haddock @ 2002-04-10 13:23:55 by simonmar] Not sure why I made the constructor name for a record declaration into a TyCls name, but change it back into a Var name anyhow. - - - - - 3dc6aa81 by Simon Marlow at 2002-04-10T13:26:10+00:00 [haddock @ 2002-04-10 13:26:09 by simonmar] Lots of changes, including: - add index support to the HTML backend - clean up the renamer, put it into a monad - propogate unresolved names to the top level and report them in a nicer way - various bugfixes - - - - - c2a70a72 by Simon Marlow at 2002-04-10T13:32:39+00:00 [haddock @ 2002-04-10 13:32:39 by simonmar] Skeleton documentation - - - - - 50c98d17 by Simon Marlow at 2002-04-10T13:37:23+00:00 [haddock @ 2002-04-10 13:37:23 by simonmar] Update the TODO list, separate into pre-1.0 and post-1.0 items - - - - - f3778be6 by Simon Marlow at 2002-04-10T14:30:58+00:00 [haddock @ 2002-04-10 14:30:58 by simonmar] Add an introduction - - - - - cfbaf9f7 by Simon Marlow at 2002-04-10T14:59:51+00:00 [haddock @ 2002-04-10 14:59:51 by simonmar] Sort the module tree - - - - - 76bd7b34 by Simon Marlow at 2002-04-10T15:50:11+00:00 [haddock @ 2002-04-10 15:50:10 by simonmar] Generate a little table of contents at the top of the module doc (only if the module actually contains some section headings, though). - - - - - bb8560a1 by Simon Marlow at 2002-04-10T16:10:26+00:00 [haddock @ 2002-04-10 16:10:26 by simonmar] Now we understand (or at least don't barf on) type signatures in patterns such as you might find when scoped type variables are in use. - - - - - 86c2a026 by Simon Marlow at 2002-04-10T16:10:49+00:00 [haddock @ 2002-04-10 16:10:49 by simonmar] more updates - - - - - 1c052b0e by Simon Marlow at 2002-04-10T16:28:05+00:00 [haddock @ 2002-04-10 16:28:05 by simonmar] Parse errors in doc strings are now reported as warnings rather that causing the whole thing to fall over. It still needs cleaning up (the warning is emitted with trace) but this will do for the time being. - - - - - ace03e8f by Simon Marlow at 2002-04-10T16:38:03+00:00 [haddock @ 2002-04-10 16:38:03 by simonmar] update again - - - - - 69006c3e by Simon Marlow at 2002-04-11T13:38:02+00:00 [haddock @ 2002-04-11 13:38:02 by simonmar] mention Opera - - - - - fe9b10f8 by Simon Marlow at 2002-04-11T13:40:31+00:00 [haddock @ 2002-04-11 13:40:30 by simonmar] - copy haddock.css into the same place as the generated HTML - new option: --css <file> specifies the style sheet to use - new option: -o <dir> specifies the directory in which to generate the output. - because Haddock now needs to know where to find its default stylesheet, we have to have a wrapper script and do the haddock-inplace thing (Makefile code copied largely from fptools/happy). - - - - - 106adbbe by Simon Marlow at 2002-04-24T15:12:41+00:00 [haddock @ 2002-04-24 15:12:41 by simonmar] Stop slurping comment lines when we see a row of dashes longer than length 2: these are useful as separators. - - - - - 995d3f9e by Simon Marlow at 2002-04-24T15:14:12+00:00 [haddock @ 2002-04-24 15:14:11 by simonmar] Grok the kind of module headers we use in fptools/libraries, and pass the "portability", "stability", and "maintainer" strings through into the generated HTML. If the module header doesn't match the pattern, then we don't include the info in the HTML. - - - - - e14da136 by Simon Marlow at 2002-04-24T15:16:57+00:00 [haddock @ 2002-04-24 15:16:57 by simonmar] Done module headers now. - - - - - 2ca8dfd4 by Simon Marlow at 2002-04-24T15:57:48+00:00 [haddock @ 2002-04-24 15:57:47 by simonmar] Handle gcons in export lists (a common extension). - - - - - 044cea81 by Simon Marlow at 2002-04-25T14:20:12+00:00 [haddock @ 2002-04-25 14:20:12 by simonmar] Add the little lambda icon - - - - - 63955027 by Simon Marlow at 2002-04-25T14:40:05+00:00 [haddock @ 2002-04-25 14:40:05 by simonmar] - Add support for named chunks of documentation which can be referenced from the export list. - Copy the icon from $libdir to the destination in HTML mode. - - - - - 36e3f913 by Simon Marlow at 2002-04-25T16:48:36+00:00 [haddock @ 2002-04-25 16:48:36 by simonmar] More keyboard bashing - - - - - 7ae18dd0 by Simon Marlow at 2002-04-26T08:43:33+00:00 [haddock @ 2002-04-26 08:43:33 by simonmar] Package util reqd. to compile with 4.08.2 - - - - - bbd5fbab by Simon Marlow at 2002-04-26T10:13:00+00:00 [haddock @ 2002-04-26 10:13:00 by simonmar] Include $(GHC_HAPPY_OPTS) when compiling HsParser - - - - - 31c53d79 by Simon Marlow at 2002-04-26T11:18:57+00:00 [haddock @ 2002-04-26 11:18:56 by simonmar] - support for fundeps (partially contributed by Brett Letner - thanks Brett). - make it build with GHC 4.08.2 - - - - - c415ce76 by Simon Marlow at 2002-04-26T13:15:02+00:00 [haddock @ 2002-04-26 13:15:02 by simonmar] Move the explicit formatting of the little table for the stability/portability/maintainer info from the HTML into the CSS, and remove the explicit table size (just right-align it). - - - - - 520ee21a by Simon Marlow at 2002-04-26T16:01:44+00:00 [haddock @ 2002-04-26 16:01:44 by simonmar] Yet more keyboard bashing - this is pretty much complete now. - - - - - 2ae37179 by Simon Marlow at 2002-04-26T16:02:14+00:00 [haddock @ 2002-04-26 16:02:14 by simonmar] Add a couple of things I forgot about - - - - - b7211e04 by Simon Marlow at 2002-04-29T15:28:12+00:00 [haddock @ 2002-04-29 15:28:12 by simonmar] bugfix for declBinders on a NewTypeDecl - - - - - 640c154a by Simon Marlow at 2002-04-29T15:28:54+00:00 [haddock @ 2002-04-29 15:28:54 by simonmar] Allow '-- |' style annotations on constructors and record fields. - - - - - 393f258a by Simon Marlow at 2002-04-29T15:37:32+00:00 [haddock @ 2002-04-29 15:37:32 by simonmar] syntax fix - - - - - 8a2c2549 by Simon Marlow at 2002-04-29T15:37:48+00:00 [haddock @ 2002-04-29 15:37:48 by simonmar] Add an example - - - - - db88f8a2 by Simon Marlow at 2002-04-29T15:55:46+00:00 [haddock @ 2002-04-29 15:55:46 by simonmar] remove a trace - - - - - 2b0248e0 by Simon Marlow at 2002-04-29T15:56:19+00:00 [haddock @ 2002-04-29 15:56:19 by simonmar] Fix for 'make install' - - - - - 120453a0 by Simon Marlow at 2002-04-29T15:56:39+00:00 [haddock @ 2002-04-29 15:56:39 by simonmar] Install the auxilliary bits - - - - - 950e6dbb by Simon Marlow at 2002-04-29T15:57:30+00:00 [haddock @ 2002-04-29 15:57:30 by simonmar] Add BinDist bits - - - - - 154b9d71 by Simon Marlow at 2002-05-01T11:02:52+00:00 [haddock @ 2002-05-01 11:02:52 by simonmar] update - - - - - ba6c39fa by Simon Marlow at 2002-05-01T11:03:26+00:00 [haddock @ 2002-05-01 11:03:26 by simonmar] Add another item - - - - - bacb5e33 by Simon Marlow at 2002-05-03T08:50:00+00:00 [haddock @ 2002-05-03 08:50:00 by simonmar] Fix some typos. - - - - - 54c87895 by Sven Panne at 2002-05-05T19:40:51+00:00 [haddock @ 2002-05-05 19:40:51 by panne] As a temporary hack/workaround for a bug in GHC's simplifier, don't pass Happy the -c option for generating the parsers in this subdir. Furthermore, disable -O for HaddocParse, too. - - - - - e6c08703 by Simon Marlow at 2002-05-06T09:51:10+00:00 [haddock @ 2002-05-06 09:51:10 by simonmar] Add RPM spec file (thanks to Tom Moertel <tom-rpms at moertel.com>) - - - - - 7b8fa8e7 by Simon Marlow at 2002-05-06T12:29:26+00:00 [haddock @ 2002-05-06 12:29:26 by simonmar] Add missing type signature (a different workaround for the bug in GHC's simplifier). - - - - - cd0e300d by Simon Marlow at 2002-05-06T12:30:09+00:00 [haddock @ 2002-05-06 12:30:09 by simonmar] Remove workaround for simplifier bug in previous revision. - - - - - 687e68fa by Simon Marlow at 2002-05-06T12:32:32+00:00 [haddock @ 2002-05-06 12:32:32 by simonmar] Allow empty data declarations (another GHC extension). - - - - - 8f29f696 by Simon Marlow at 2002-05-06T12:49:21+00:00 [haddock @ 2002-05-06 12:49:21 by simonmar] Fix silly bug in named documentation block lookup. - - - - - 8e0059af by Simon Marlow at 2002-05-06T13:02:42+00:00 [haddock @ 2002-05-06 13:02:42 by simonmar] Add another named chunk with a different name - - - - - 68f8a896 by Simon Marlow at 2002-05-06T13:32:32+00:00 [haddock @ 2002-05-06 13:32:32 by simonmar] Be more lenient about extra paragraph breaks - - - - - 65fc31db by Simon Marlow at 2002-05-07T15:36:36+00:00 [haddock @ 2002-05-07 15:36:36 by simonmar] DocEmpty is a right and left-unit of DocAppend (remove it in the smart constructor). - - - - - adc81078 by Simon Marlow at 2002-05-07T15:37:15+00:00 [haddock @ 2002-05-07 15:37:15 by simonmar] Allow code blocks to be denoted with bird-tracks in addition to [...]. - - - - - 1283a3c1 by Simon Marlow at 2002-05-08T11:21:56+00:00 [haddock @ 2002-05-08 11:21:56 by simonmar] Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak at cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace. - - - - - a2239cf5 by Simon Marlow at 2002-05-08T11:22:30+00:00 [haddock @ 2002-05-08 11:22:30 by simonmar] Update to test new features. - - - - - 6add955f by Simon Marlow at 2002-05-08T13:37:25+00:00 [haddock @ 2002-05-08 13:37:25 by simonmar] Change the markup for typewriter-font from [...] to @... at . The reasoning is that the '@' symbol is much less likely to be needed than square brackets, and we don't want to have to escape square brackets in code fragments. This will be mildly painful in the short term, but it's better to get the change out of the way as early as possible. - - - - - cda06447 by Simon Marlow at 2002-05-08T13:39:56+00:00 [haddock @ 2002-05-08 13:39:56 by simonmar] Allow nested-style comments to be used as documentation annotations too. eg. {-| ... -} is equivalent to -- | ... An extra space can also be left after the comment opener: {- | ... -}. The only version that isn't allowed is {-# ... -}, because this syntax overlaps with Haskell pragmas; use {- # ... -} instead. - - - - - db23f65e by Simon Marlow at 2002-05-08T14:48:41+00:00 [haddock @ 2002-05-08 14:48:39 by simonmar] Add support for existential quantifiers on constructors. - - - - - adce3794 by Simon Marlow at 2002-05-08T15:43:25+00:00 [haddock @ 2002-05-08 15:43:25 by simonmar] update - - - - - 62a1f436 by Simon Marlow at 2002-05-08T15:44:10+00:00 [haddock @ 2002-05-08 15:44:10 by simonmar] Update to version 0.2 - - - - - f6a24ba3 by Simon Marlow at 2002-05-09T08:48:29+00:00 [haddock @ 2002-05-09 08:48:29 by simonmar] typo - - - - - 9f9522a4 by Simon Marlow at 2002-05-09T10:33:14+00:00 [haddock @ 2002-05-09 10:33:14 by simonmar] oops, left out '/' from the special characters in the last change. - - - - - 14abcb39 by Simon Marlow at 2002-05-09T10:34:44+00:00 [haddock @ 2002-05-09 10:34:44 by simonmar] Fix buglet - - - - - b8d878be by Simon Marlow at 2002-05-09T10:35:00+00:00 [haddock @ 2002-05-09 10:35:00 by simonmar] Give a more useful instance of Show for Module. - - - - - f7bfd626 by Simon Marlow at 2002-05-09T10:37:07+00:00 [haddock @ 2002-05-09 10:37:07 by simonmar] The last commit to Main.lhs broke the delicate balance of laziness which was being used to avoid computing the dependency graph of modules. So I finally bit the bullet and did a proper topological sort of the module graph, which turned out to be easy (stealing the Digraph module from GHC - this really ought to be in the libraries somewhere). - - - - - b481c1d0 by Simon Marlow at 2002-05-09T10:37:25+00:00 [haddock @ 2002-05-09 10:37:25 by simonmar] another item done - - - - - 032e2b42 by Simon Marlow at 2002-05-09T10:44:15+00:00 [haddock @ 2002-05-09 10:44:15 by simonmar] Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not. - - - - - 5fb45e92 by Simon Marlow at 2002-05-09T11:10:55+00:00 [haddock @ 2002-05-09 11:10:55 by simonmar] Add a special case for list types in ppHsAType - - - - - 1937e428 by Simon Marlow at 2002-05-09T12:43:06+00:00 [haddock @ 2002-05-09 12:43:06 by simonmar] Type synonyms can accept a ctype on the RHS, to match GHC. - - - - - 0f16ce56 by Simon Marlow at 2002-05-09T12:45:19+00:00 [haddock @ 2002-05-09 12:45:19 by simonmar] Add 'stdcall' keyword - - - - - 29b0d7d2 by Simon Marlow at 2002-05-09T13:35:45+00:00 [haddock @ 2002-05-09 13:35:45 by simonmar] Add System Requirements section - - - - - bf14dddd by Simon Marlow at 2002-05-09T13:36:11+00:00 [haddock @ 2002-05-09 13:36:11 by simonmar] Test existential types, amongst other things - - - - - 502f8f6f by Simon Marlow at 2002-05-09T13:37:35+00:00 [haddock @ 2002-05-09 13:37:35 by simonmar] Print the module name in a doc-string parse error - - - - - ca1f8d49 by Simon Marlow at 2002-05-09T13:38:04+00:00 [haddock @ 2002-05-09 13:38:04 by simonmar] Add dependency - - - - - 8d3d91ff by Simon Marlow at 2002-05-09T15:37:57+00:00 [haddock @ 2002-05-09 15:37:57 by simonmar] Add the changelog/release notes - - - - - f3960959 by Simon Marlow at 2002-05-09T15:47:47+00:00 [haddock @ 2002-05-09 15:47:47 by simonmar] mention the backquote-style of markup - - - - - 089fb6e6 by Simon Marlow at 2002-05-09T15:59:45+00:00 [haddock @ 2002-05-09 15:59:45 by simonmar] update - - - - - bdd3be0b by Simon Marlow at 2002-05-09T15:59:56+00:00 [haddock @ 2002-05-09 15:59:56 by simonmar] Document changes since 0.1 - - - - - 00fc4af8 by Simon Marlow at 2002-05-10T08:22:48+00:00 [haddock @ 2002-05-10 08:22:48 by simonmar] oops, update to version 0.2 - - - - - a8a79041 by Simon Marlow at 2002-05-10T16:05:08+00:00 [haddock @ 2002-05-10 16:05:08 by simonmar] Only include a mini-contents if there are 2 or more sections - - - - - 06653319 by Simon Marlow at 2002-05-13T09:13:12+00:00 [haddock @ 2002-05-13 09:13:12 by simonmar] fix typos - - - - - 1402b19b by Simon Marlow at 2002-05-13T10:14:22+00:00 [haddock @ 2002-05-13 10:14:22 by simonmar] Allow backquote as the right-hand quote as well as the left-hand quote, as suggested by Dean Herrington. Clean up the grammar a litte. - - - - - dcd5320d by Simon Marlow at 2002-05-13T10:44:10+00:00 [haddock @ 2002-05-13 10:44:10 by simonmar] a couple more things, prioritise a bit - - - - - a90130c4 by Simon Marlow at 2002-05-13T15:19:03+00:00 [haddock @ 2002-05-13 15:19:03 by simonmar] Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs). - - - - - a774d432 by Simon Marlow at 2002-05-13T15:20:54+00:00 [haddock @ 2002-05-13 15:20:54 by simonmar] Fix one of the record examples - - - - - 2d1d5218 by Simon Marlow at 2002-05-15T12:44:35+00:00 [haddock @ 2002-05-15 12:44:35 by simonmar] Preserve the newline before a bird-track, but only within a paragraph. - - - - - 1554c09a by Simon Marlow at 2002-05-15T13:03:02+00:00 [haddock @ 2002-05-15 13:03:01 by simonmar] Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed. - - - - - 57344dc3 by Simon Marlow at 2002-05-15T13:03:19+00:00 [haddock @ 2002-05-15 13:03:19 by simonmar] Bump to version 0.3 - - - - - b2791812 by Simon Marlow at 2002-05-15T13:03:41+00:00 [haddock @ 2002-05-15 13:03:41 by simonmar] update - - - - - fead183e by Simon Marlow at 2002-05-15T13:10:15+00:00 [haddock @ 2002-05-15 13:10:15 by simonmar] Rename Foo.hs to Test.hs, and add a Makefile - - - - - b0b1f89f by Simon Marlow at 2002-05-15T13:16:07+00:00 [haddock @ 2002-05-15 13:16:07 by simonmar] - Remove the note about function argument docs not being implemented - Note that qualified identifiers can be used to point to entities that aren't in scope. - - - - - 5665f31a by Simon Marlow at 2002-05-15T13:28:46+00:00 [haddock @ 2002-05-15 13:28:46 by simonmar] Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson. - - - - - 0564505d by Simon Marlow at 2002-05-17T10:51:57+00:00 [haddock @ 2002-05-17 10:51:57 by simonmar] Fix bugs in qualified name handling (A.B.f was returned as B.f) - - - - - 10e7311c by Simon Marlow at 2002-05-21T10:24:52+00:00 [haddock @ 2002-05-21 10:24:52 by simonmar] - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation - - - - - 2f91c2a6 by Simon Marlow at 2002-05-21T10:27:40+00:00 [haddock @ 2002-05-21 10:27:40 by simonmar] add a few more test cases - - - - - 01c2ddd2 by Simon Marlow at 2002-05-21T10:28:33+00:00 [haddock @ 2002-05-21 10:28:33 by simonmar] Rearrange a bit, and add support for tabular datatype rendering - - - - - a4e4c5f8 by Simon Marlow at 2002-05-27T09:03:52+00:00 [haddock @ 2002-05-27 09:03:51 by simonmar] Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others) - - - - - 48722e68 by Simon Marlow at 2002-05-27T12:30:38+00:00 [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. - - - - - 657204d2 by Simon Marlow at 2002-05-27T13:19:49+00:00 [haddock @ 2002-05-27 13:19:49 by simonmar] Fix bug: we weren't renaming HsDocCommentNamed in renameDecl - - - - - 592aae66 by Simon Marlow at 2002-05-27T14:10:27+00:00 [haddock @ 2002-05-27 14:10:27 by simonmar] Fix some bugs in the rendering of qualified type signatures. - - - - - 69c8f763 by Simon Marlow at 2002-05-27T14:36:45+00:00 [haddock @ 2002-05-27 14:36:45 by simonmar] warning message tweak - - - - - 16e64e21 by Simon Marlow at 2002-05-27T14:53:53+00:00 [haddock @ 2002-05-27 14:53:53 by simonmar] hyperlinked identifiers should be in <tt> - - - - - 8d5e4783 by Simon Marlow at 2002-05-27T15:56:45+00:00 [haddock @ 2002-05-27 15:56:45 by simonmar] Do something sensible for modules which don't export anything (except instances). - - - - - 9d3ef811 by Simon Marlow at 2002-05-28T10:12:50+00:00 [haddock @ 2002-05-28 10:12:50 by simonmar] Rename the module documentation properly (bug reported by Sven Panne). - - - - - ef03a1cc by Simon Marlow at 2002-05-28T10:13:04+00:00 [haddock @ 2002-05-28 10:13:04 by simonmar] Add some more test cases - - - - - 92baa0e8 by Simon Marlow at 2002-05-28T11:17:55+00:00 [haddock @ 2002-05-28 11:17:55 by simonmar] If an identifier doesn't lex, then just replace it by a DocString. - - - - - a3156213 by Simon Marlow at 2002-05-28T16:16:19+00:00 [haddock @ 2002-05-28 16:16:19 by simonmar] Only link to names in the current module which are actually listed in the documentation. A name may be exported but not present in the documentation if it is exported as part of a 'module M' export specifier. - - - - - 31acf941 by Simon Marlow at 2002-05-28T16:17:11+00:00 [haddock @ 2002-05-28 16:17:11 by simonmar] update - - - - - 7e474ebf by Sigbjorn Finne at 2002-05-28T22:42:08+00:00 [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] - - - - - 093f7e53 by Simon Marlow at 2002-05-29T09:09:49+00:00 [haddock @ 2002-05-29 09:09:49 by simonmar] Back out previous change until we can find a better way to do this. - - - - - 9234389c by Simon Marlow at 2002-05-29T13:19:06+00:00 [haddock @ 2002-05-29 13:19:06 by simonmar] Make the markup syntax a little more friendly: - single quotes are now interpreted literally unless they surround a valid Haskell identifier. So for example now there's no need to escape a single quote used as an apostrophe. - text to the right of a bird track is now literal (if you want marked-up text in a code block, use @...@). - - - - - b3333526 by Simon Marlow at 2002-05-29T13:38:51+00:00 [haddock @ 2002-05-29 13:38:51 by simonmar] Document recent changes to markup syntax - - - - - f93641d6 by Simon Marlow at 2002-05-29T15:27:18+00:00 [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too - - - - - 613f21e3 by Simon Marlow at 2002-06-03T13:05:58+00:00 [haddock @ 2002-06-03 13:05:57 by simonmar] Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case). - - - - - 14b36807 by Simon Marlow at 2002-06-03T13:20:00+00:00 [haddock @ 2002-06-03 13:20:00 by simonmar] Fix linking to qualified names again (thanks to Sven Panne for pointing out the bug). - - - - - 95b10eac by Simon Marlow at 2002-06-03T13:46:48+00:00 [haddock @ 2002-06-03 13:46:48 by simonmar] Fix for exporting record selectors from a newtype declaration - - - - - 272f932e by Simon Marlow at 2002-06-03T13:56:38+00:00 [haddock @ 2002-06-03 13:56:38 by simonmar] update to version 0.3 - - - - - 1c0a3bed by Simon Marlow at 2002-06-03T14:05:07+00:00 [haddock @ 2002-06-03 14:05:07 by simonmar] Add changes in version 0.3 - - - - - 145b4626 by Simon Marlow at 2002-06-03T14:12:38+00:00 [haddock @ 2002-06-03 14:12:38 by simonmar] Render class names as proper binders - - - - - 052106b3 by Simon Marlow at 2002-06-03T14:15:10+00:00 [haddock @ 2002-06-03 14:15:10 by simonmar] update, and separate into bugs, features, and cosmetic items. - - - - - 854f4914 by Simon Marlow at 2002-06-03T14:16:13+00:00 [haddock @ 2002-06-03 14:16:13 by simonmar] More test cases - - - - - 466922c8 by Simon Marlow at 2002-06-03T14:16:56+00:00 [haddock @ 2002-06-03 14:16:56 by simonmar] Example from the paper - - - - - 9962a045 by Simon Marlow at 2002-06-03T14:17:49+00:00 [haddock @ 2002-06-03 14:17:49 by simonmar] A debugging version of the style-sheet, which gives some tables coloured backgrounds so we can see what's going on. - - - - - f16b79db by Simon Marlow at 2002-06-03T14:19:46+00:00 [haddock @ 2002-06-03 14:19:46 by simonmar] typo - - - - - 620db27b by Simon Marlow at 2002-06-03T14:48:32+00:00 [haddock @ 2002-06-03 14:48:32 by simonmar] oops, fix markup bugs - - - - - 53fd105c by Simon Marlow at 2002-06-05T09:05:07+00:00 [haddock @ 2002-06-05 09:05:07 by simonmar] Keep foreign imports when there is no export list (bug reported by Sven Panne). - - - - - 6d98989c by Simon Marlow at 2002-06-05T09:12:02+00:00 [haddock @ 2002-06-05 09:12:02 by simonmar] Identifiers in single quotes can be symbol names too (bug reported by Hal Daume). - - - - - 001811e5 by Sven Panne at 2002-06-08T14:03:36+00:00 [haddock @ 2002-06-08 14:03:36 by panne] Tiny workaround for the fact that Haddock currently ignores HsImportSpecs: Let the local_orig_env take precedence. This is no real solution at all, but improves things sometimes, e.g. in my GLUT documentation. :-) - - - - - 504d19c9 by Simon Marlow at 2002-06-11T09:23:25+00:00 [haddock @ 2002-06-11 09:23:25 by simonmar] portability nit - - - - - e13b5af4 by Simon Marlow at 2002-06-20T12:38:07+00:00 [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. - - - - - f467a9b6 by Simon Marlow at 2002-06-20T12:39:02+00:00 [haddock @ 2002-06-20 12:39:01 by simonmar] Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list. - - - - - b8dbfe20 by Simon Marlow at 2002-06-21T12:43:06+00:00 [haddock @ 2002-06-21 12:43:06 by simonmar] When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers. - - - - - 4831dbbd by Simon Marlow at 2002-06-21T15:50:42+00:00 [haddock @ 2002-06-21 15:50:42 by simonmar] Add support for reading and writing interface files(!) This turned out to be quite easy, and necessary to get decent hyperlinks between the documentation for separate packages in the libraries. The functionality isn't quite complete yet: for a given package of modules, you'd like to say "the HTML for these modules lives in directory <dir>" (currently they are assumed to be all in the same place). Two new flags: --dump-interface=FILE dump an interface file in FILE --read-interface=FILE read interface from FILE an interface file describes *all* the modules being processed. Only the exported names are kept in the interface: if you re-export a name from a module in another interface the signature won't be copied. This is a compromise to keep the size of the interfaces sensible. Also, I added another useful option: --no-implicit-prelude avoids trying to import the Prelude. Previously this was the default, but now importing the Prelude from elsewhere makes sense if you also read in an interface containing the Prelude module, so Haddock imports the Prelude implicitly according to the Haskell spec. - - - - - d3640a19 by Sven Panne at 2002-06-23T14:54:00+00:00 [haddock @ 2002-06-23 14:54:00 by panne] Make it compile with newer GHCs - - - - - 780c506b by Sven Panne at 2002-06-23T15:44:31+00:00 [haddock @ 2002-06-23 15:44:31 by panne] Cleaned up build root handling and added more docs - - - - - 45290d2e by Simon Marlow at 2002-06-24T14:37:43+00:00 [haddock @ 2002-06-24 14:37:42 by simonmar] When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface. - - - - - 4e2b9ae6 by Simon Marlow at 2002-07-03T16:01:08+00:00 [haddock @ 2002-07-03 16:01:07 by simonmar] Handle import specs properly, include 'hiding'. Haddock now has a complete implementation of the Haskell module system (more or less; I won't claim it's 100% correct). - - - - - 9a9aa1a8 by Simon Marlow at 2002-07-03T16:18:16+00:00 [haddock @ 2002-07-03 16:18:16 by simonmar] Update - - - - - 560c3026 by Simon Marlow at 2002-07-04T14:56:10+00:00 [haddock @ 2002-07-04 14:56:10 by simonmar] Clean up the code that constructs the exported declarations, and fix a couple of bugs along the way. Now if you import a class hiding one of the methods, then re-export the class, the version in the documentation will correctly have the appropriate method removed. - - - - - 2c26e77d by Simon Marlow at 2002-07-04T15:26:13+00:00 [haddock @ 2002-07-04 15:26:13 by simonmar] More bugfixes to the export handling - - - - - 03e0710d by Simon Marlow at 2002-07-09T10:12:10+00:00 [haddock @ 2002-07-09 10:12:10 by simonmar] Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base). - - - - - 44f3891a by Simon Marlow at 2002-07-09T10:12:51+00:00 [haddock @ 2002-07-09 10:12:51 by simonmar] commented-out debugging code - - - - - 97280873 by Krasimir Angelov at 2002-07-09T16:33:33+00:00 [haddock @ 2002-07-09 16:33:31 by krasimir] 'Microsoft HTML Help' support - - - - - 3dc04655 by Simon Marlow at 2002-07-10T09:40:56+00:00 [haddock @ 2002-07-10 09:40:56 by simonmar] Fix for rendering of the (->) type constructor, from Ross Paterson. - - - - - c9f149c6 by Simon Marlow at 2002-07-10T10:26:11+00:00 [haddock @ 2002-07-10 10:26:11 by simonmar] Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help). - - - - - e8acc1e6 by Simon Marlow at 2002-07-10T10:57:10+00:00 [haddock @ 2002-07-10 10:57:10 by simonmar] Document all the new options since 0.3 - - - - - 8bb85544 by Simon Marlow at 2002-07-10T10:58:31+00:00 [haddock @ 2002-07-10 10:58:31 by simonmar] Sort the options a bit - - - - - abc0dd59 by Simon Marlow at 2002-07-15T09:19:38+00:00 [haddock @ 2002-07-15 09:19:38 by simonmar] Fix a bug in mkExportItems when processing a module without an explicit export list. We were placing one copy of a declaration for each binder in the declaration, which for a data type would mean one copy of the whole declaration per constructor or record selector. - - - - - dde65bb9 by Simon Marlow at 2002-07-15T09:54:16+00:00 [haddock @ 2002-07-15 09:54:16 by simonmar] merge rev. 1.35 - - - - - bd7eb8c4 by Simon Marlow at 2002-07-15T10:14:31+00:00 [haddock @ 2002-07-15 10:14:30 by simonmar] Be a bit more liberal in the kind of commenting styles we allow, as suggested by Malcolm Wallace. Mostly this consists of allowing doc comments either side of a separator token. In an export list, a section heading is now allowed before the comma, as well as after it. eg. module M where ( T(..) -- * a section heading , f -- * another section heading , g ) In record fields, doc comments are allowed anywhere (previously a doc-next was allowed only after the comma, and a doc-before was allowed only before the comma). eg. data R = C { -- | describes 'f' f :: Int -- | describes 'g' , g :: Int } - - - - - 8f6dfe34 by Simon Marlow at 2002-07-15T10:21:56+00:00 [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. - - - - - fc515bb7 by Simon Marlow at 2002-07-15T16:16:50+00:00 [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). - - - - - 80a97e74 by Simon Marlow at 2002-07-19T09:13:10+00:00 [haddock @ 2002-07-19 09:13:10 by simonmar] Allow special id's ([], (), etc.) to be used in an import declaration. - - - - - a69d7378 by Simon Marlow at 2002-07-19T09:59:02+00:00 [haddock @ 2002-07-19 09:59:02 by simonmar] Allow special id's ([], (), etc.) to be used in an import declarations. - - - - - d205fa60 by Simon Marlow at 2002-07-19T10:00:16+00:00 [haddock @ 2002-07-19 10:00:16 by simonmar] Relax the restrictions which require doc comments to be followed by semi colons - in some cases this isn't necessary. Now you can write module M where { -- | some doc class C where {} } without needing to put a semicolon before the class declaration. - - - - - e9301e14 by Simon Marlow at 2002-07-23T08:24:09+00:00 [haddock @ 2002-07-23 08:24:09 by simonmar] A new TODO list item - - - - - e5d77586 by Simon Marlow at 2002-07-23T08:40:56+00:00 [haddock @ 2002-07-23 08:40:56 by simonmar] - update the acknowledgements - remove the paragraph that described how to use explicit layout with doc comments; it isn't relevant any more. - - - - - 78a94137 by Simon Marlow at 2002-07-23T08:43:02+00:00 [haddock @ 2002-07-23 08:43:02 by simonmar] more tests - - - - - 5c320927 by Simon Marlow at 2002-07-23T08:43:26+00:00 [haddock @ 2002-07-23 08:43:26 by simonmar] Updates for version 0.4 - - - - - 488e99ae by Simon Marlow at 2002-07-23T09:10:46+00:00 [haddock @ 2002-07-23 09:10:46 by simonmar] Fix the %changelog (rpm complained that it wasn't in the right order) - - - - - a77bb373 by Simon Marlow at 2002-07-23T09:12:38+00:00 [haddock @ 2002-07-23 09:12:38 by simonmar] Another item for the TODO list - - - - - f1ec1813 by Simon Marlow at 2002-07-23T10:18:46+00:00 [haddock @ 2002-07-23 10:18:46 by simonmar] Add a version banner when invoked with -v - - - - - 1d44cadf by Simon Marlow at 2002-07-24T09:28:19+00:00 [haddock @ 2002-07-24 09:28:19 by simonmar] Remove ^Ms - - - - - 4d8d5e94 by Simon Marlow at 2002-07-24T09:42:18+00:00 [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. - - - - - d6edc43e by Simon Marlow at 2002-07-25T14:37:29+00:00 [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. - - - - - b34d18fa by Simon Marlow at 2002-08-02T09:08:22+00:00 [haddock @ 2002-08-02 09:08:22 by simonmar] The <TT> and <PRE> environments seem to use a font that is a little too small in IE. Compensate. (suggestion from Daan Leijen). - - - - - 8106b086 by Simon Marlow at 2002-08-02T09:25:23+00:00 [haddock @ 2002-08-02 09:25:20 by simonmar] Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen). - - - - - c1acff8f by Simon Marlow at 2002-08-05T09:03:49+00:00 [haddock @ 2002-08-05 09:03:49 by simonmar] update - - - - - f968661c by Simon Marlow at 2002-11-11T09:32:57+00:00 [haddock @ 2002-11-11 09:32:57 by simonmar] Fix cut-n-pasto - - - - - 12d02619 by Simon Marlow at 2002-11-13T09:49:46+00:00 [haddock @ 2002-11-13 09:49:46 by simonmar] Small bugfix in the --read-interface option parsing from Brett Letner. - - - - - 30e32d5e by Ross Paterson at 2003-01-16T15:07:57+00:00 [haddock @ 2003-01-16 15:07:57 by ross] Adjust for the new exception libraries (as well as the old ones). - - - - - 871f65df by Sven Panne at 2003-02-20T21:31:40+00:00 [haddock @ 2003-02-20 21:31:40 by panne] * Add varsyms and consyms to index * Exclude empty entries from index - - - - - bc42cc87 by Sven Panne at 2003-02-24T21:26:29+00:00 [haddock @ 2003-02-24 21:26:29 by panne] Don't convert a "newtype" to a single-constructor "data" for non-abstractly exported types, they are quite different regarding strictness/pattern matching. Now a "data" without any constructors is only emitted for an abstractly exported type, regardless if it is actually a "newtype" or a "data". - - - - - 0c2a1d99 by Sven Panne at 2003-03-08T19:02:38+00:00 [haddock @ 2003-03-08 19:02:38 by panne] Fixed some broken/redirected/canonicalized links found by a very picky link checker. - - - - - 25459269 by Sven Panne at 2003-03-09T21:13:43+00:00 [haddock @ 2003-03-09 21:13:43 by panne] Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor. - - - - - 6be4db86 by Sven Panne at 2003-03-10T21:34:25+00:00 [haddock @ 2003-03-10 21:34:24 by panne] Escape fragments. This fixes e.g. links to operators. - - - - - eb12972c by Ross Paterson at 2003-04-25T10:50:06+00:00 [haddock @ 2003-04-25 10:50:05 by ross] An 80% solution to generating derived instances. A complete solution would duplicate the instance inference logic, but if a type variable occurs as a constructor argument, then we can just propagate the derived class to the variable. But we know nothing of the constraints on any type variables that occur elsewhere. For example, the declarations data Either a b = Left a | Right b deriving (Eq, Ord) data Ptr a = Ptr Addr# deriving (Eq, Ord) newtype IORef a = IORef (STRef RealWorld a) deriving Eq yield the instances (Eq a, Eq b) => Eq (Either a b) (Ord a, Ord b) => Ord (Either a b) Eq (Ptr a) Ord (Ptr a) (??? a) => Eq (IORef a) The last example shows the limits of this local analysis. Note that a type variable may be in both categories: then we know a constraint, but there may be more, or a stronger constraint, e.g. data Tree a = Node a [Tree a] deriving Eq yields (Eq a, ??? a) => Eq (Tree a) - - - - - de886f78 by Simon Marlow at 2003-04-25T11:17:55+00:00 [haddock @ 2003-04-25 11:17:55 by simonmar] Some updates, including moving the derived instance item down to the bottom of the list now that Ross has contributed some code that does the job for common cases. - - - - - 1b52cffd by Simon Marlow at 2003-04-30T14:02:32+00:00 [haddock @ 2003-04-30 14:02:32 by simonmar] When installing on Windows, run cygpath over $(HADDOCKLIB) so that haddock (a mingw program, built by GHC) can understand it. You still need to be in a cygwin environment to run Haddock, because of the shell script wrapper. - - - - - d4f638de by Simon Marlow at 2003-05-06T10:04:47+00:00 [haddock @ 2003-05-06 10:04:47 by simonmar] Catch another case of a paragraph containing just a DocMonospaced that should turn into a DocCodeBlock. - - - - - 4162b2b9 by Simon Marlow at 2003-05-06T10:11:44+00:00 [haddock @ 2003-05-06 10:11:44 by simonmar] Add some more code-block tests. - - - - - 4f5802c8 by Simon Marlow at 2003-05-06T10:14:52+00:00 [haddock @ 2003-05-06 10:14:52 by simonmar] Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code. - - - - - ef8c45f7 by Simon Marlow at 2003-05-21T15:07:21+00:00 [haddock @ 2003-05-21 15:07:21 by simonmar] Only omit the module contents when there are no section headings at all. - - - - - bcee1e75 by Sigbjorn Finne at 2003-05-30T16:50:45+00:00 [haddock @ 2003-05-30 16:50:45 by sof] cygpath: for now, steer clear of --mixed - - - - - 30567af3 by Sigbjorn Finne at 2003-05-30T17:59:28+00:00 [haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit - - - - - b0856e7d by Simon Marlow at 2003-06-03T09:55:26+00:00 [haddock @ 2003-06-03 09:55:26 by simonmar] Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems. - - - - - 70e137ea by Simon Marlow at 2003-07-28T13:30:35+00:00 [haddock @ 2003-07-28 13:30:35 by simonmar] Add tests for a couple of bugs. - - - - - 122bd578 by Simon Marlow at 2003-07-28T13:31:25+00:00 [haddock @ 2003-07-28 13:31:25 by simonmar] Add documentation for anchors. - - - - - 0bd27cb2 by Simon Marlow at 2003-07-28T13:31:46+00:00 [haddock @ 2003-07-28 13:31:46 by simonmar] Update - - - - - 08052d42 by Simon Marlow at 2003-07-28T13:32:12+00:00 [haddock @ 2003-07-28 13:32:12 by simonmar] layout tweak. - - - - - 13942749 by Simon Marlow at 2003-07-28T13:33:03+00:00 [haddock @ 2003-07-28 13:33:03 by simonmar] Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively). - - - - - d7f493b9 by Simon Marlow at 2003-07-28T13:35:17+00:00 [haddock @ 2003-07-28 13:35:16 by simonmar] When a module A exports another module's contents via 'module B', then modules which import entities from B re-exported by A should link to B.foo rather than A.foo. See examples/Bug2.hs. - - - - - d94cf705 by Simon Marlow at 2003-07-28T13:36:14+00:00 [haddock @ 2003-07-28 13:36:14 by simonmar] Update to version 0.5 - - - - - dbb776cd by Sven Panne at 2003-07-28T14:02:43+00:00 [haddock @ 2003-07-28 14:02:43 by panne] * Updated to version 0.5 * Automagically generate configure if it is not there - - - - - 6cfeee53 by Simon Marlow at 2003-07-28T14:32:43+00:00 [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 - - - - - a1ce838f by Simon Marlow at 2003-07-28T14:33:37+00:00 [haddock @ 2003-07-28 14:33:37 by simonmar] Update for 0.5 - - - - - c0fe6493 by Simon Marlow at 2003-07-28T14:53:22+00:00 [haddock @ 2003-07-28 14:53:22 by simonmar] Markup fix - - - - - 6ea31596 by Sven Panne at 2003-07-28T16:40:45+00:00 [haddock @ 2003-07-28 16:40:45 by panne] Make it compile with GHC >= 6.01 - - - - - afcd30fc by Simon Marlow at 2003-07-30T15:04:52+00:00 [haddock @ 2003-07-30 15:04:52 by simonmar] Pay attention to import specs when building the the import env, as well as the orig env. This may fix some wrong links in documentation when import specs are being used. - - - - - 17c3137f by Simon Marlow at 2003-07-30T16:05:41+00:00 [haddock @ 2003-07-30 16:05:40 by simonmar] Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup. - - - - - 3d3b5c87 by Sven Panne at 2003-08-04T10:18:24+00:00 [haddock @ 2003-08-04 10:18:24 by panne] Don't print parentheses around one-element contexts - - - - - 9e3f3f2d by Simon Marlow at 2003-08-04T12:59:47+00:00 [haddock @ 2003-08-04 12:59:47 by simonmar] A couple of TODOs. - - - - - e9d8085c by Simon Marlow at 2003-08-05T14:10:31+00:00 [haddock @ 2003-08-05 14:10:31 by simonmar] I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it. - - - - - ff5c7d6d by Simon Marlow at 2003-08-15T14:42:59+00:00 [haddock @ 2003-08-15 14:42:59 by simonmar] Convert the lexer to Alex, and fix a bug in the process. - - - - - 1aa077bf by Simon Marlow at 2003-08-15T15:00:18+00:00 [haddock @ 2003-08-15 15:00:18 by simonmar] Update - - - - - d3de1e38 by Simon Marlow at 2003-08-15T15:01:03+00:00 [haddock @ 2003-08-15 15:01:03 by simonmar] wibbles - - - - - b40ece3b by Simon Marlow at 2003-08-18T10:04:47+00:00 [haddock @ 2003-08-18 10:04:47 by simonmar] Lex the 'mdo' keyword as 'do'. - - - - - 8f9a1146 by Simon Marlow at 2003-08-18T11:48:24+00:00 [haddock @ 2003-08-18 11:48:24 by simonmar] Two bugs from Sven. - - - - - ea54ebc0 by Simon Marlow at 2003-08-18T11:48:46+00:00 [haddock @ 2003-08-18 11:48:46 by simonmar] Fixes to the new lexer. - - - - - d5f6a4b5 by Simon Marlow at 2003-08-19T09:09:03+00:00 [haddock @ 2003-08-19 09:09:03 by simonmar] Further wibbles to the syntax. - - - - - 6bbdadb7 by Sven Panne at 2003-08-26T18:45:35+00:00 [haddock @ 2003-08-26 18:45:35 by panne] Use autoreconf instead of autoconf - - - - - 32e889cb by Sven Panne at 2003-08-26T19:01:19+00:00 [haddock @ 2003-08-26 19:01:18 by panne] Made option handling a bit more consistent with other tools, in particular: Every program in fptools should output * version info on stdout and terminate successfully when -V or --version * usage info on stdout and terminate successfully when -? or --help * usage info on stderr and terminate unsuccessfully when an unknown option is given. - - - - - 5d156a91 by Sven Panne at 2003-08-26T19:20:55+00:00 [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag - - - - - e6577265 by Sven Panne at 2003-08-27T07:50:03+00:00 [haddock @ 2003-08-27 07:50:02 by panne] * Made -D a short option for --dump-interface. * Made -m a short option for --ms-help. * Made -n a short option for --no-implicit-prelude. * Made -c a short option for --css. * Removed DocBook options from executable (they didn't do anything), but mark them as reserved in the docs. Note that the short option for DocBook output is now -S (from SGML) instead of -d. The latter is now a short option for --debug. * The order of the Options in the documentation now matches the order printed by Haddock itself. Note: Although changing the names of options is often a bad idea, I'd really like to make the options for the programs in fptools more consistent and compatible to the ones used in common GNU programs. - - - - - d303ff98 by Simon Marlow at 2003-09-10T08:23:48+00:00 [haddock @ 2003-09-10 08:23:48 by simonmar] Add doc subdir. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 9a70e46a by Simon Marlow at 2003-09-10T08:24:32+00:00 [haddock @ 2003-09-10 08:24:32 by simonmar] Install these files in $(datadir), not $(libdir), since they're architecture independent. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - bbb87e7a by Simon Marlow at 2003-09-10T08:25:31+00:00 [haddock @ 2003-09-10 08:25:31 by simonmar] Haddock's supplementary HTML bits now live in $(datadir), not $(libdir). Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 3587c24b by Simon Marlow at 2003-09-22T10:34:38+00:00 [haddock @ 2003-09-22 10:34:38 by simonmar] Allow installing of docs. - - - - - d510b517 by Sven Panne at 2003-10-11T08:10:44+00:00 [haddock @ 2003-10-11 08:10:44 by panne] Include architecture-independent files in file list - - - - - 187d7618 by Sigbjorn Finne at 2003-10-20T17:19:24+00:00 [haddock @ 2003-10-20 17:19:22 by sof] support for i-parameters + zip comprehensions - - - - - b6c7a273 by Simon Marlow at 2003-11-03T14:24:24+00:00 [haddock @ 2003-11-03 14:24:24 by simonmar] Update TODO file. - - - - - 58513e33 by Simon Marlow at 2003-11-05T11:22:04+00:00 [haddock @ 2003-11-05 11:22:04 by simonmar] Remove the last of the uses of 'trace' to emit warnings, and tidy up a couple of places where duplicate warnings were being emitted. - - - - - 33a78846 by Simon Marlow at 2003-11-05T11:30:53+00:00 [haddock @ 2003-11-05 11:30:52 by simonmar] - Suppress warnings about unknown imported modules by default. - Add a -v/--verbose flag to re-enable these warnings. The general idea is to suppress the "Warning: unknown module: Prelude" warnings which most Haddock users will see every time, and which aren't terribly useful. - - - - - a969de7f by Simon Marlow at 2003-11-05T12:30:28+00:00 [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. - - - - - f14ea82a by Simon Marlow at 2003-11-05T15:15:59+00:00 [haddock @ 2003-11-05 15:15:59 by simonmar] Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this. - - - - - 01a25ca6 by Simon Marlow at 2003-11-05T15:16:38+00:00 [haddock @ 2003-11-05 15:16:38 by simonmar] Update - - - - - 1a7ccb86 by Simon Marlow at 2003-11-05T17:16:05+00:00 [haddock @ 2003-11-05 17:16:04 by simonmar] Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up. - - - - - a2bca16d by Simon Marlow at 2003-11-06T10:44:52+00:00 [haddock @ 2003-11-06 10:44:52 by simonmar] Include iface_reexported in the .haddock file. This unfortunately bloats the file (40% for base). If this gets to be a problem we can always apply the dictionary trick that GHC uses for squashing .hi files. - - - - - 0a09c293 by Simon Marlow at 2003-11-06T12:39:47+00:00 [haddock @ 2003-11-06 12:39:46 by simonmar] - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo at . -- -- [@bar@] The description of @bar at . Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added. - - - - - fe1b3460 by Simon Marlow at 2003-11-06T14:47:36+00:00 [haddock @ 2003-11-06 14:47:36 by simonmar] Remove the 'Parent' button - it is of dubious use, and often points into thin air. - - - - - db6d762f by Simon Marlow at 2003-11-06T16:48:14+00:00 [haddock @ 2003-11-06 16:48:11 by simonmar] - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page. - - - - - 7d71718b by Simon Marlow at 2003-11-06T16:50:28+00:00 [haddock @ 2003-11-06 16:50:28 by simonmar] Add -k/--package docs - - - - - ef43949d by Simon Marlow at 2003-11-06T16:51:23+00:00 [haddock @ 2003-11-06 16:51:23 by simonmar] Bump to 0.6 - - - - - 1c419e06 by Simon Marlow at 2003-11-06T16:51:50+00:00 [haddock @ 2003-11-06 16:51:50 by simonmar] update - - - - - 69422327 by Simon Marlow at 2003-11-10T14:41:06+00:00 [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. - - - - - 3c3fc433 by Simon Marlow at 2003-11-10T14:51:59+00:00 [haddock @ 2003-11-10 14:51:59 by simonmar] Fix for getReExports: take into account names which are not visible because they are re-exported from a different package. - - - - - 31c8437b by Simon Marlow at 2003-11-10T15:10:53+00:00 [haddock @ 2003-11-10 15:10:53 by simonmar] Version 0.6 changes - - - - - a7c2430b by Simon Marlow at 2003-11-10T15:15:58+00:00 [haddock @ 2003-11-10 15:15:58 by simonmar] getReExports: one error case that isn't - - - - - 00cc459c by Simon Marlow at 2003-11-10T16:15:19+00:00 [haddock @ 2003-11-10 16:15:18 by simonmar] copyright update - - - - - ca62408d by Simon Marlow at 2003-11-11T09:57:25+00:00 [haddock @ 2003-11-11 09:57:25 by simonmar] Version 0.6 - - - - - 3acbf818 by Simon Marlow at 2003-11-11T12:10:44+00:00 [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. - - - - - 6c90abc2 by Simon Marlow at 2003-11-12T10:03:39+00:00 [haddock @ 2003-11-12 10:03:39 by simonmar] 2002 -> 2003 - - - - - 090bbc4c by Simon Marlow at 2003-11-28T12:08:00+00:00 [haddock @ 2003-11-28 12:08:00 by simonmar] update - - - - - 8096a832 by Simon Marlow at 2003-11-28T12:09:58+00:00 [haddock @ 2003-11-28 12:09:58 by simonmar] Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it. - - - - - 35294929 by Sven Panne at 2003-12-29T17:16:31+00:00 [haddock @ 2003-12-29 17:16:31 by panne] Updated my email address - - - - - cdb697bf by Simon Marlow at 2004-01-08T10:14:24+00:00 [haddock @ 2004-01-08 10:14:24 by simonmar] Add instructions for using GHC to pre-process source for feeding to Haddock. - - - - - 8dfc491f by Simon Marlow at 2004-01-09T12:45:46+00:00 [haddock @ 2004-01-09 12:45:46 by simonmar] Add -optP-P to example ghc command line. - - - - - ac41b820 by Simon Marlow at 2004-02-03T11:02:03+00:00 [haddock @ 2004-02-03 11:02:03 by simonmar] Fix bug in index generation - - - - - f4e7edcb by Simon Marlow at 2004-02-10T11:51:16+00:00 [haddock @ 2004-02-10 11:51:16 by simonmar] Don't throw away whitespace at the beginning of a line (experimental fix). - - - - - 68e212d2 by Simon Marlow at 2004-02-10T12:10:08+00:00 [haddock @ 2004-02-10 12:10:08 by simonmar] Fix for previous commit: I now realise why the whitespace was stripped from the beginning of the line. Work around it. - - - - - e7d7f2df by Sven Panne at 2004-02-10T18:38:45+00:00 [haddock @ 2004-02-10 18:38:45 by panne] Make Haddock link with the latest relocated monad transformer package - - - - - 992d4225 by Simon Marlow at 2004-02-16T10:21:35+00:00 [haddock @ 2004-02-16 10:21:35 by simonmar] Add a TODO - - - - - 1ac55326 by Simon Marlow at 2004-03-12T11:33:39+00:00 [haddock @ 2004-03-12 11:33:39 by simonmar] Add an item. - - - - - 0478e903 by Simon Marlow at 2004-03-15T12:24:05+00:00 [haddock @ 2004-03-15 12:24:05 by simonmar] Add an item. - - - - - 6f26d21a by Simon Marlow at 2004-03-18T14:21:29+00:00 [haddock @ 2004-03-18 14:21:29 by simonmar] Fix URL - - - - - 19b6bb99 by Simon Marlow at 2004-03-22T14:09:03+00:00 [haddock @ 2004-03-22 14:09:03 by simonmar] getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me). - - - - - 5c756031 by Simon Marlow at 2004-03-24T09:42:11+00:00 [haddock @ 2004-03-24 09:42:10 by simonmar] hiding bug from Ross Paterson (fixed in rev 1.59 of Main.hs) - - - - - 1b692e6c by Simon Marlow at 2004-03-24T10:10:50+00:00 [haddock @ 2004-03-24 10:10:50 by simonmar] mkExportItems fix & simplification: we should be looking at the actual exported names (calculated earlier) to figure out which subordinates of a declaration are exported. This means that if you export a record, and name its fields separately in the export list, the fields will still be visible in the documentation for the constructor. - - - - - 90e5e294 by Simon Marlow at 2004-03-24T10:12:08+00:00 [haddock @ 2004-03-24 10:12:08 by simonmar] Make restrictCons take into account record field names too (removing a ToDo). - - - - - 2600efa4 by Simon Marlow at 2004-03-24T10:16:17+00:00 [haddock @ 2004-03-24 10:16:17 by simonmar] Record export tests. - - - - - 6a8575c7 by Simon Marlow at 2004-03-25T09:35:14+00:00 [haddock @ 2004-03-25 09:35:14 by simonmar] restrictTo: fix for restricting a newtype with a record field. - - - - - dcf55a8d by Simon Marlow at 2004-03-25T10:01:42+00:00 [haddock @ 2004-03-25 10:01:42 by simonmar] Fix duplicate instance bug - - - - - f49aa758 by Simon Marlow at 2004-03-25T10:02:41+00:00 [haddock @ 2004-03-25 10:02:41 by simonmar] Duplicate instance bug. - - - - - 7b87344c by Simon Marlow at 2004-03-25T10:29:56+00:00 [haddock @ 2004-03-25 10:29:56 by simonmar] If a name is imported from two places, one hidden and one not, choose the unhidden one to link to. Also, when there's only a hidden module to link to, don't try linking to it. - - - - - 40f44d7b by Simon Marlow at 2004-03-25T15:17:24+00:00 [haddock @ 2004-03-25 15:17:23 by simonmar] Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment. - - - - - 9b64dc0f by Simon Marlow at 2004-03-25T15:20:55+00:00 [haddock @ 2004-03-25 15:20:55 by simonmar] Update - - - - - c2fff7f2 by Simon Marlow at 2004-03-25T15:45:10+00:00 [haddock @ 2004-03-25 15:45:10 by simonmar] Eliminate some unnecessary spaces in the HTML rendering - - - - - b7948ff0 by Simon Marlow at 2004-03-25T16:00:37+00:00 [haddock @ 2004-03-25 16:00:36 by simonmar] Remove all that indentation in the generated HTML to keep the file sizes down. - - - - - da2bb4ca by Sven Panne at 2004-03-27T09:57:58+00:00 [haddock @ 2004-03-27 09:57:57 by panne] Added the new-born haddock.js to the build process and the documentation. - - - - - b99e6f8c by Sven Panne at 2004-03-27T10:32:20+00:00 [haddock @ 2004-03-27 10:32:20 by panne] "type" is a required attribute of the "script" element - - - - - 562b185a by Sven Panne at 2004-03-27T12:52:34+00:00 [haddock @ 2004-03-27 12:52:34 by panne] Add a doctype for the contents page, too. - - - - - f6a99c2d by Simon Marlow at 2004-04-14T10:03:25+00:00 [haddock @ 2004-04-14 10:03:25 by simonmar] fix for single-line comment syntax - - - - - de366303 by Simon Marlow at 2004-04-20T13:08:04+00:00 [haddock @ 2004-04-20 13:08:04 by simonmar] Allow a 'type' declaration to include documentation comments. These will be ignored by Haddock, but at least one user (Johannes Waldmann) finds this feature useful, and it's easy to add. - - - - - fd78f51e by Simon Marlow at 2004-05-07T15:14:56+00:00 [haddock @ 2004-05-07 15:14:56 by simonmar] - update copyright - add version to abstract - - - - - 59f53e32 by Sven Panne at 2004-05-09T14:39:53+00:00 [haddock @ 2004-05-09 14:39:53 by panne] Fix the fix for single-line comment syntax, ------------------------------------------- is now a valid comment line again. - - - - - 8b18f2fe by Simon Marlow at 2004-05-10T10:11:51+00:00 [haddock @ 2004-05-10 10:11:51 by simonmar] Update - - - - - 225a491d by Ross Paterson at 2004-05-19T13:10:23+00:00 [haddock @ 2004-05-19 13:10:23 by ross] Make the handling of "deriving" slightly smarter, by ignoring data constructor arguments that are identical to the lhs. Now handles things like data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ... - - - - - 37588686 by Mike Thomas at 2004-05-21T06:38:14+00:00 [haddock @ 2004-05-21 06:38:14 by mthomas] Windows exe extensions (bin remains for Unix). - - - - - cf2b9152 by Simon Marlow at 2004-05-25T09:34:54+00:00 [haddock @ 2004-05-25 09:34:54 by simonmar] Add some TODO items - - - - - 4d29cdfc by Simon Marlow at 2004-05-25T10:41:46+00:00 [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. - - - - - 2e0771e0 by Mike Thomas at 2004-05-28T20:17:55+00:00 [haddock @ 2004-05-28 20:17:55 by mthomas] Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg. - - - - - 8d10bde1 by Sven Panne at 2004-06-05T16:53:34+00:00 [haddock @ 2004-06-05 16:53:34 by panne] Misc. rpm spec file cleanup, including: * make BuildRoot handling more consistent * added default file attributes * consistent defines and tags - - - - - 59974349 by Sven Panne at 2004-06-05T18:01:00+00:00 [haddock @ 2004-06-05 18:01:00 by panne] More rpm spec file cleanup, including: * added some BuildRequires * changed packager to me, so people can complain at the right place :-] * consistently refer to haskell.org instead of www.haskell.org - - - - - b94d4903 by Simon Marlow at 2004-07-01T11:08:58+00:00 [haddock @ 2004-07-01 11:08:57 by simonmar] Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead. - - - - - d5278f67 by Sven Panne at 2004-07-04T15:15:55+00:00 [haddock @ 2004-07-04 15:15:55 by panne] Install pictures for +/- pictures, too (JPEG is a strange format for graphics like this, I would have expected GIF or PNG here.) Things look fine with Konqueror and Netscape on Linux now, the only downside is that the cursor doesn't change when positioned above the "button". - - - - - 46dec6c5 by Sven Panne at 2004-07-13T17:59:28+00:00 [haddock @ 2004-07-13 17:59:28 by panne] A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there. - - - - - 1d7bc432 by Simon Marlow at 2004-07-22T08:54:06+00:00 [haddock @ 2004-07-22 08:54:06 by simonmar] Add single quote to $ident, so you can say eg. 'foldl'' to refer to foldl' (the longest match rule is our friend). Bug reported by Adrian Hey <ahey at iee.org> - - - - - f183618b by Krasimir Angelov at 2004-07-27T22:59:35+00:00 [haddock @ 2004-07-27 22:58:23 by krasimir] Add basic support for Microsoft HTML Help 2.0 - - - - - d515d0c2 by Krasimir Angelov at 2004-07-27T23:02:36+00:00 [haddock @ 2004-07-27 23:02:36 by krasimir] escape names in the index - - - - - a5f1be23 by Krasimir Angelov at 2004-07-27T23:05:21+00:00 [haddock @ 2004-07-27 23:05:21 by krasimir] Add jsFile, plusFile and minusFile to the file list - - - - - c4fb4881 by Krasimir Angelov at 2004-07-28T22:12:10+00:00 [haddock @ 2004-07-28 22:12:09 by krasimir] bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs - - - - - 64d30b1d by Krasimir Angelov at 2004-07-30T22:15:47+00:00 [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug - - - - - 133c8c5c by Krasimir Angelov at 2004-07-31T12:04:38+00:00 [haddock @ 2004-07-31 12:04:37 by krasimir] make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful. - - - - - 79040963 by Krasimir Angelov at 2004-07-31T13:10:20+00:00 [haddock @ 2004-07-31 13:10:20 by krasimir] Make DHtmlTree compatible with Mozila browser - - - - - 1a55dc90 by Krasimir Angelov at 2004-07-31T14:52:55+00:00 [haddock @ 2004-07-31 14:52:55 by krasimir] fix - - - - - 85ce0237 by Krasimir Angelov at 2004-07-31T14:53:28+00:00 [haddock @ 2004-07-31 14:53:28 by krasimir] HtmlHelp 1.x - - - - - 3c0c53ba by Krasimir Angelov at 2004-07-31T20:35:21+00:00 [haddock @ 2004-07-31 20:35:21 by krasimir] Added support for DevHelp - - - - - d42b5af1 by Krasimir Angelov at 2004-07-31T21:17:51+00:00 [haddock @ 2004-07-31 21:17:51 by krasimir] Document new features in HtmlHelp - - - - - 790fe21e by Krasimir Angelov at 2004-08-01T15:14:02+00:00 [haddock @ 2004-08-01 15:14:02 by krasimir] add missing imports - - - - - fd7cc6bc by Krasimir Angelov at 2004-08-01T19:52:08+00:00 [haddock @ 2004-08-01 19:52:06 by krasimir] fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format. - - - - - 94ad7ac8 by Krasimir Angelov at 2004-08-01T19:53:50+00:00 [haddock @ 2004-08-01 19:53:50 by krasimir] I forgot to add the new +/- images - - - - - f0c65388 by Krasimir Angelov at 2004-08-02T16:25:53+00:00 [haddock @ 2004-08-02 16:25:53 by krasimir] Add root node to the table of contents. All modules in tree are not children of the root - - - - - f50bd85d by Sven Panne at 2004-08-02T18:17:46+00:00 [haddock @ 2004-08-02 18:17:46 by panne] Mainly DocBook fixes - - - - - 09527ce3 by Sven Panne at 2004-08-02T20:02:29+00:00 [haddock @ 2004-08-02 20:02:29 by panne] Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays... - - - - - c8fbacfa by Sven Panne at 2004-08-02T20:31:13+00:00 [haddock @ 2004-08-02 20:31:13 by panne] Warning police - - - - - 37830bff by Sven Panne at 2004-08-02T20:32:29+00:00 [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code - - - - - 13847171 by Sven Panne at 2004-08-02T21:12:27+00:00 [haddock @ 2004-08-02 21:12:25 by panne] Use pathJoin instead of low-level list-based manipulation for FilePaths - - - - - c711d61e by Sven Panne at 2004-08-02T21:16:02+00:00 [haddock @ 2004-08-02 21:16:02 by panne] Removed WinDoze CRs - - - - - b1f7dc88 by Sven Panne at 2004-08-03T19:35:59+00:00 [haddock @ 2004-08-03 19:35:59 by panne] Fixed spelling of "http-equiv" attribute - - - - - dd5f394e by Sven Panne at 2004-08-03T19:44:03+00:00 [haddock @ 2004-08-03 19:44:03 by panne] Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before) - - - - - 919c47c6 by Sigbjorn Finne at 2004-08-03T19:45:11+00:00 [haddock @ 2004-08-03 19:45:11 by sof] make it compile with <= ghc-6.1 - - - - - 4d6f01d8 by Sigbjorn Finne at 2004-08-03T19:45:30+00:00 [haddock @ 2004-08-03 19:45:30 by sof] ffi wibble - - - - - 4770643a by Sven Panne at 2004-08-03T20:47:46+00:00 [haddock @ 2004-08-03 20:47:46 by panne] Fixed CSS for button style. Note that only "0" is a valid measure without a unit! - - - - - 14aaf2e5 by Sven Panne at 2004-08-03T21:07:59+00:00 [haddock @ 2004-08-03 21:07:58 by panne] Improved spacing of dynamic module tree - - - - - 97c3579a by Simon Marlow at 2004-08-09T11:03:04+00:00 [haddock @ 2004-08-09 11:03:04 by simonmar] Add FormatVersion Patch submitted by: George Russell <ger at informatik.uni-bremen.de> - - - - - af7f8c03 by Simon Marlow at 2004-08-09T11:55:07+00:00 [haddock @ 2004-08-09 11:55:05 by simonmar] Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger at informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header. - - - - - 7b865ad3 by Simon Marlow at 2004-08-10T14:09:57+00:00 [haddock @ 2004-08-10 14:09:57 by simonmar] Fixes for DevHelp/HtmlHelp following introduction of short module description. - - - - - 814766cd by Simon Marlow at 2004-08-10T14:33:46+00:00 [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. - - - - - 39cf9ede by Simon Marlow at 2004-08-12T12:08:23+00:00 [haddock @ 2004-08-12 12:08:23 by simonmar] Avoid using string-gap tricks. - - - - - b6d78551 by Simon Marlow at 2004-08-13T10:53:21+00:00 [haddock @ 2004-08-13 10:53:21 by simonmar] Update - - - - - eaae7417 by Simon Marlow at 2004-08-13T10:53:50+00:00 [haddock @ 2004-08-13 10:53:50 by simonmar] Test for primes in quoted links - - - - - 68c34f06 by Sven Panne at 2004-08-16T19:59:38+00:00 [haddock @ 2004-08-16 19:59:36 by panne] XMLification - - - - - 7f45a6f9 by Sven Panne at 2004-08-18T16:42:54+00:00 [haddock @ 2004-08-18 16:42:54 by panne] Re-added indices + minor fixes - - - - - 8a5dd97c by Sigbjorn Finne at 2004-08-25T17:15:42+00:00 [haddock @ 2004-08-25 17:15:42 by sof] backquote HADDOCK_VERSION defn for <= ghc-6.0.x; believe this is only needed under mingw - - - - - 4b1b42ea by Sven Panne at 2004-08-26T20:08:50+00:00 [haddock @ 2004-08-26 20:08:49 by panne] SGML is dead, long live DocBook XML! Note: The BuildRequires tags in the spec files are still incomplete and the documentation about the DocBook tools needs to be updated, too. Stay tuned... - - - - - 8d52cedb by Sven Panne at 2004-08-26T21:03:19+00:00 [haddock @ 2004-08-26 21:03:19 by panne] Updated BuildRequires tags. Alas, there seems to be no real standard here, so your mileage may vary... At least the current specs should work on SuSE Linux. - - - - - e6982912 by Sigbjorn Finne at 2004-08-30T15:44:59+00:00 [haddock @ 2004-08-30 15:44:59 by sof] escape HADDOCK_VERSION double quotes on all platforms when compiling with <=6.0.x - - - - - b3fbc867 by Simon Marlow at 2004-08-31T13:09:42+00:00 [haddock @ 2004-08-31 13:09:42 by simonmar] Avoid GHC/shell versionitis and create Version.hs - - - - - c359e16a by Sven Panne at 2004-09-05T19:12:33+00:00 [haddock @ 2004-09-05 19:12:32 by panne] * HTML documentation for "foo.xml" goes into directory "foo" again, not "foo-html". This is nicer and consistent with the behaviour for building the docs from SGML. * Disabled building PostScript documentation in the spec files for now, there are some strange issues with the FO->PS conversion for some files which have to be clarified first. - - - - - c68b1eba by Sven Panne at 2004-09-24T07:04:38+00:00 [haddock @ 2004-09-24 07:04:38 by panne] Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable. - - - - - dfb32615 by Simon Marlow at 2004-09-30T08:21:29+00:00 [haddock @ 2004-09-30 08:21:29 by simonmar] Add a feature request - - - - - 45ff783c by Sven Panne at 2004-10-23T19:54:00+00:00 [haddock @ 2004-10-23 19:54:00 by panne] Improved the Cygwin/MinGW chaos a little bit. There is still confusion about host platform vs. target platform... - - - - - 5f644714 by Krasimir Angelov at 2004-10-28T16:01:51+00:00 [haddock @ 2004-10-28 16:01:51 by krasimir] update for ghc-6.3+ - - - - - 92d9753e by Sven Panne at 2004-11-01T16:39:01+00:00 [haddock @ 2004-11-01 16:39:01 by panne] Revert previous commit: It's Network.URI which should be changed, not Haddock. - - - - - 05f70f6e by Simon Marlow at 2005-01-04T16:15:51+00:00 [haddock @ 2005-01-04 16:15:51 by simonmar] parser fix: allow qualified specialids. - - - - - 47870837 by Simon Marlow at 2005-01-04T16:16:54+00:00 [haddock @ 2005-01-04 16:16:54 by simonmar] Add a test - - - - - ff11fc2c by Ross Paterson at 2005-01-10T19:18:22+00:00 [haddock @ 2005-01-10 19:18:22 by ross] Render non-ASCII characters using numeric character references, to simplify charset issues. There's a META tag saying the charset is UTF-8, but GHC outputs characters as raw bytes. Ideally we need an encoding on the input side too, primarily in comments, because source files containing non-ASCII characters aren't portable between locales. - - - - - eba2fc4e by Simon Marlow at 2005-01-11T10:44:37+00:00 [haddock @ 2005-01-11 10:44:37 by simonmar] Remove string gap - - - - - b899a381 by Ross Paterson at 2005-01-13T11:41:33+00:00 [haddock @ 2005-01-13 11:41:33 by ross] recognize SGML-style numeric character references &#ddd; or &#xhhhh; and translate them into Chars. - - - - - 106e3cf0 by Ross Paterson at 2005-01-13T14:43:41+00:00 [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) - - - - - e8f54f25 by Ross Paterson at 2005-01-13T14:44:24+00:00 [haddock @ 2005-01-13 14:44:24 by ross] Describe numeric character references. - - - - - 914ccdce by Sven Panne at 2005-01-15T18:44:48+00:00 [haddock @ 2005-01-15 18:44:45 by panne] Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later. - - - - - 6ab20e84 by Sven Panne at 2005-01-16T12:18:26+00:00 [haddock @ 2005-01-16 12:18:26 by panne] Trim imports - - - - - efb81da9 by Sven Panne at 2005-01-16T12:58:08+00:00 [haddock @ 2005-01-16 12:58:03 by panne] Correctly handle the new order of arguments for the combining function given to fromListWith. - - - - - e27b5834 by Sven Panne at 2005-01-16T14:14:41+00:00 [haddock @ 2005-01-16 14:14:39 by panne] Data.Map.unions is left-biased. - - - - - dae3cc3e by Sven Panne at 2005-01-16T14:22:44+00:00 [haddock @ 2005-01-16 14:22:44 by panne] Added the last missing "flip" to get identical HTML output as previous versions. - - - - - 951d8408 by Sven Panne at 2005-01-16T14:37:10+00:00 [haddock @ 2005-01-16 14:37:10 by panne] Refactored Text.PrettyPrint legacy hell into a separate module. - - - - - f1c4b892 by Sven Panne at 2005-01-16T15:41:25+00:00 [haddock @ 2005-01-16 15:41:21 by panne] Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway. - - - - - 60824c6e by Simon Marlow at 2005-01-18T10:02:48+00:00 [haddock @ 2005-01-18 10:02:48 by simonmar] Add a TODO - - - - - a8c82f23 by Krasimir Angelov at 2005-01-28T23:19:39+00:00 [haddock @ 2005-01-28 23:19:39 by krasimir] import Foreign/Foreign.C are required for Windows - - - - - d8450a23 by Simon Marlow at 2005-02-02T16:23:04+00:00 [haddock @ 2005-02-02 16:23:00 by simonmar] Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning. - - - - - 1cce71d0 by Simon Marlow at 2005-02-03T13:42:19+00:00 [haddock @ 2005-02-03 13:42:19 by simonmar] - add --ignore-all-exports flag, which behaves as if every module has the ignore-exports attribute (requested by Chris Ryder). - add --hide option to hide a module on the command line. - add --use-package option to get Haddock info for a package from ghc-pkg (largely untested). - remove reexports from the .haddock file, they aren't used any more. - - - - - 767123ef by Ross Paterson at 2005-02-03T16:17:37+00:00 [haddock @ 2005-02-03 16:17:37 by ross] fix typo for < 6.3 - - - - - 0c680c04 by Simon Marlow at 2005-02-04T12:03:31+00:00 [haddock @ 2005-02-04 12:03:31 by simonmar] Fix bug in renameExportItems that meant links in instances weren't being renamed properly. - - - - - ff7abe5f by Simon Marlow at 2005-02-04T12:15:53+00:00 [haddock @ 2005-02-04 12:15:52 by simonmar] Add attribute #not-home, to indicate that the current module should not be considered to be a home module for the each entity it exports, unless there is no other module that exports the entity. - - - - - fc2cfd27 by Simon Marlow at 2005-02-04T12:40:02+00:00 [haddock @ 2005-02-04 12:40:02 by simonmar] Update the documentation w.r.t. home modules and the not-home attribute. - - - - - 26b8ddf7 by Ross Paterson at 2005-02-04T13:36:06+00:00 [haddock @ 2005-02-04 13:36:05 by ross] sort lists of instances by - arity of the type constructors (so higher-kinded instances come first) - name of the class - argument types - - - - - 26bfb19c by Simon Marlow at 2005-02-23T15:57:12+00:00 [haddock @ 2005-02-23 15:57:12 by simonmar] Fix documentation regarding the module attributes. - - - - - 9c3afd02 by Simon Marlow at 2005-02-28T16:18:17+00:00 [haddock @ 2005-02-28 16:18:17 by simonmar] version 0.7 - - - - - a95fd63f by Simon Marlow at 2005-02-28T16:22:08+00:00 [haddock @ 2005-02-28 16:22:08 by simonmar] Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results. - - - - - 905d42f7 by Simon Marlow at 2005-03-01T17:16:42+00:00 [haddock @ 2005-03-01 17:16:40 by simonmar] Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case). - - - - - a0e1d178 by Wolfgang Thaller at 2005-03-09T08:28:39+00:00 [haddock @ 2005-03-09 08:28:39 by wolfgang] Hack haddock's lexer to accept the output from Apple's broken version of cpp (Apple's cpp leaves #pragma set_debug_pwd directives in it's output). - - - - - 9e1eb784 by Simon Marlow at 2005-04-22T14:27:15+00:00 [haddock @ 2005-04-22 14:27:15 by simonmar] Add a TODO item - - - - - 23281f78 by Ross Paterson at 2005-05-18T12:41:59+00:00 [haddock @ 2005-05-18 12:41:59 by ross] fix 3 bugs in --use-package, and document it. - - - - - 00074a68 by Sven Panne at 2005-05-21T12:35:29+00:00 [haddock @ 2005-05-21 12:35:29 by panne] Warning/versionitis police - - - - - 341fa822 by Simon Marlow at 2005-06-15T15:43:21+00:00 [haddock @ 2005-06-15 15:43:21 by simonmar] Allow "licence" as an alternate spelling of "license" - - - - - 3b953f8b by Simon Marlow at 2005-06-16T08:14:12+00:00 [haddock @ 2005-06-16 08:14:12 by simonmar] wibble - - - - - abfd9826 by Simon Marlow at 2005-06-27T14:46:40+00:00 [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The old way confused Apache because the extensions are sometimes interpreted as having special meanings. - - - - - a01eea00 by Simon Marlow at 2005-08-04T13:59:40+00:00 [haddock @ 2005-08-04 13:59:40 by simonmar] 0.7 changes - - - - - 170ef87e by Simon Marlow at 2005-08-04T15:08:03+00:00 [haddock @ 2005-08-04 15:08:03 by simonmar] spec file from Jens Peterson - - - - - 7621fde4 by Simon Marlow at 2005-08-04T15:59:30+00:00 [haddock @ 2005-08-04 15:59:30 by simonmar] replace mingw tests with $(Windows) - - - - - a20739bb by Sven Panne at 2005-08-05T07:01:12+00:00 [haddock @ 2005-08-05 07:01:12 by panne] Reverted to previous version (but with bumped version number), the last commit broke RPM building on SuSE systems due to differently named dependencies. As a clarification: All .spec files in the repository have to work at least on SuSE, because that's the system I'm using. And as "Mr. Building Police", I reserve me the right to keep them that way... >:-) It might very well be the case that we need different .spec files for different platforms, so packagers which are unhappy with the current .spec files should contact me, stating the actual problems. - - - - - 4afb15cf by Simon Marlow at 2005-10-05T10:51:45+00:00 [haddock @ 2005-10-05 10:51:45 by simonmar] Add a bug - - - - - 60f69f82 by Simon Marlow at 2005-10-05T12:52:03+00:00 [haddock @ 2005-10-05 12:52:03 by simonmar] Document new behaviour of -s option - - - - - f7e520ca by Simon Marlow at 2005-10-10T15:02:55+00:00 [haddock @ 2005-10-10 15:02:55 by simonmar] extractRecSel: ignore non-record constructors (fixes a crash when using datatypes with a mixture of record and non-record style constructors). - - - - - b2edbedb by Simon Marlow at 2005-10-14T09:44:21+00:00 Start CHANGES for 0.8 - - - - - 21c7ac8d by Simon Marlow at 2005-10-14T23:11:19+00:00 First cut of Cabal build system - - - - - 766cecdd by Simon Marlow at 2005-10-29T08:14:43+00:00 Add configure script and Makefile for the docs Add a separate configure script and build system for building the documentation. The configure and Makefile code is stolen from fptools. This is left as a separate build system so that the main Cabal setup doesn't require a Unix build environment or DocBook XML tools. - - - - - aa36c783 by Duncan Coutts at 2006-01-17T19:29:55+00:00 Add a --wiki=URL flag to add a per-module link to a correspondng wiki page. So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option. - - - - - e06e2da2 by Simon Marlow at 2006-01-18T09:28:15+00:00 TODO: documnet --wiki - - - - - 17adfda9 by Duncan Coutts at 2006-01-19T20:17:59+00:00 Add an optional wiki link for each top level exported name. In each module, for each "top level" exported entity we add a hyper link to a corresponding wiki page. The link url gets the name of the exported entity as a '#'-style anchor, so if there is an anchor in the page with that name then the users browser should jump directly to it. By "top level" we mean functions, classes, class members and data types (data, type, newtype), but not data constructors, class instances or data type class membership. The link is added at the right of the page and in a small font. Hopefully this is the right balance of visibility/distraction. We also include a link to the wiki base url in the contents and index pages. - - - - - f52324bb by Duncan Coutts at 2006-01-19T20:28:27+00:00 Rewrite pathJoin to only add a path separator when necessary. When the path ends in a file seperator there is no need to add another. Now using "--wiki=http://blah.com/foo/" should do the right thing. (Code snippet adapted from Isaac's FilePath package.) - - - - - 43bb89fa by Duncan Coutts at 2006-01-21T17:15:27+00:00 Teach haddock about line pragmas and add accurate source code links Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's source location tracking to include the file name as well as line/column. This way each AST item that is tagged with a SrcLoc gets the original file name too. Use this original file name to add source links to each exported item, in the same visual style as the wiki links. Note that the per-export source links are to the defining module rather than whichever module haddock pretends it is exported from. This is what we want for source code links. The source code link URL can also contain the name of the export so one could implement jumping to the actual location of the function in the file if it were linked to an html version of the source rather than just plain text. The name can be selected with the %N wild card. So for linking to the raw source code one might use: --source=http://darcs/haskell.org/foo/%F Or for linking to html syntax highlighted code: --source=http://darcs/haskell.org/foo/%M.html#%N - - - - - edd9f229 by Duncan Coutts at 2006-01-22T00:02:00+00:00 Extend URL variable expansion syntax and add source links to the contents page Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module. - - - - - eb3c6ada by Duncan Coutts at 2006-01-23T13:42:34+00:00 Remove the complex substitutions and add more command line flags instead. Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now use three seperate command line flags for the top level, per-module and per-entity source and wiki links. They are: --source-base, --source-module, --source-entity --comments-base, --comments-module, --comments-entity We leave -s, --source as an alias for --source-module which is how that option behaved previously. The long forms of the substitutions are still available, ${FILE} ${MODULE} etc and the only non-trivial substitution is ${MODULE/./c} to replace the '.' characters in the module name with any other character c. eg ${MODULE/./-} Seperating the source and wiki url flags has the added bonus that they can be turned on or off individually. So users can have per-module links for example without having to also have per-entity links.` - - - - - a2f0f2af by Duncan Coutts at 2006-01-23T13:54:52+00:00 Make the --help output fit in 80 columns. This is a purely cosmetic patch, feel free to ignore it. The only trickery going on is that we don't display the deprecated -s, --source flags in the help message, but we do still accept them. - - - - - 2d3a4b0c by Duncan Coutts at 2006-01-23T14:12:16+00:00 Add documentation for the new --source-* and --comments-* command line options - - - - - 1a82a297 by Simon Marlow at 2006-01-23T17:03:27+00:00 fix markup - - - - - 100d464a by Duncan Coutts at 2006-01-23T18:31:13+00:00 remove a couple TODO items that have been done The --wiki, or rather the --comment-* options are now documented. There is probably no need to have haddock invoke unlit or cpp itself since it can now pick up the line pragmas to get the source locations right. Tools like Cabal will arrange for preprocessors to be run so there is less of a need for tools like haddock to do it themselves. - - - - - 3162fa91 by Simon Marlow at 2006-01-24T14:21:56+00:00 add a test I had lying around - - - - - 98947063 by Simon Marlow at 2006-01-31T13:52:54+00:00 add scabal-version field - - - - - c41876e6 by Neil Mitchell at 2006-02-26T17:48:21+00:00 Add Hoogle output option - - - - - f86fb9c0 by Simon Marlow at 2006-03-08T09:15:20+00:00 add haskell.vim Contributed by Brad Bowman <bsb at bereft.net>, thanks! - - - - - 35d3c511 by benjamin.franksen at 2006-03-03T22:39:54+00:00 fixed libdir (/html was missing) - - - - - 4d08fd7d by Simon Marlow at 2006-03-10T11:13:31+00:00 add PatternGuards extension - - - - - 3f095e70 by Simon Marlow at 2006-03-13T11:40:42+00:00 bug fixes from Brad Bowman - - - - - 8610849d by Sven Panne at 2006-03-19T17:02:56+00:00 Fixed Cabal/RPM build - - - - - 34a994d6 by sven.panne at 2006-04-20T12:39:23+00:00 Avoid pattern guards Due to the use of pattern guards in Haddock, GHC was called with -fglasgow-exts. This in turn enables bang patterns, too, which broke the Haddock build. Removing some unnecessary pattern guards seemed to be the better way of fixing this instead of using a pragma to disable pattern guards. - - - - - bb523f51 by Ross Paterson at 2006-04-24T09:03:25+00:00 extend 'deriving' heuristic a little If an argument of a data constructor has a type variable head, it is irreducible and the same type class can be copied into the constraint. (Formerly we just did this for type variable arguments.) - - - - - dab9fe7a by Simon Marlow at 2006-04-26T10:02:31+00:00 record an idea - - - - - 748b7078 by Simon Marlow at 2006-05-08T08:28:53+00:00 add section about deriving - - - - - 11252ea1 by Simon Marlow at 2006-05-24T15:43:10+00:00 replace a fatal error in lexChar with a parseError - - - - - 382c9411 by Simon Marlow at 2006-05-24T15:45:47+00:00 add a bug - - - - - b79272f5 by Simon Marlow at 2006-05-24T15:46:29+00:00 add a bug report - - - - - 912edf65 by David Waern at 2006-07-10T19:09:23+00:00 Initial modifications -- doesn't compile - - - - - a3c7ba99 by David Waern at 2006-07-11T00:54:19+00:00 More porting work -- doesn't compile - - - - - 0a173d19 by David Waern at 2006-07-11T11:30:03+00:00 Make the repos temporarily compile and illustrate a problem - - - - - bad316de by David Waern at 2006-07-11T15:43:47+00:00 Progress on the porting process - - - - - bbf12d02 by David Waern at 2006-07-11T23:07:44+00:00 More progress on the porting -- first pass starting to shape up - - - - - de580ba2 by David Waern at 2006-07-20T17:48:30+00:00 More progress -- still on phase1 - - - - - 75a917a2 by David Waern at 2006-07-23T18:22:43+00:00 More work on pass1 -- mostly done - - - - - 6697b3f7 by David Waern at 2006-07-23T22:17:40+00:00 More work, started working on the renaming phase -- this code will need a cleanup soon :) - - - - - 82a5bcbb by David Waern at 2006-07-29T16:16:43+00:00 Add instances, build renaming environment, start on the renamer - - - - - c3f8f4f1 by David Waern at 2006-07-29T21:37:48+00:00 Complete the renamer - - - - - 7e00d464 by David Waern at 2006-07-30T21:01:57+00:00 Start porting the Html renderer - - - - - f04ce121 by David Waern at 2006-08-09T20:04:56+00:00 More Html rendering progress - - - - - 20c21b53 by David Waern at 2006-08-10T17:37:47+00:00 More progress - - - - - d7097e0d by David Waern at 2006-08-11T20:31:51+00:00 Cleanup - - - - - a7351e86 by David Waern at 2006-08-12T11:44:47+00:00 Render H98 Data declarations - - - - - 3fb2208e by David Waern at 2006-08-12T17:15:34+00:00 Perfect rendering of Test.hs - - - - - 454fd062 by David Waern at 2006-08-13T21:57:08+00:00 Misc fixes and interface load/save - - - - - 7ef7e7be by David Waern at 2006-08-14T00:56:07+00:00 Some refactoring - - - - - a7d3efef by David Waern at 2006-08-19T20:07:55+00:00 Adapt to latest GHC - - - - - 5fc3c0d7 by David Waern at 2006-08-20T21:28:11+00:00 Move interface read/write to its own module + some cleanup - - - - - 037e011c by David Waern at 2006-08-20T21:38:24+00:00 Small cleanup - - - - - da3a1023 by David Waern at 2006-09-03T16:05:22+00:00 Change mode to BatchCompile to avoid GHC API bug - - - - - 3cc9be3b by David Waern at 2006-09-03T16:06:59+00:00 Starting work on GADT rendering - - - - - 94506037 by David Waern at 2006-09-03T20:02:48+00:00 Compensate for change of export list order in GHC - - - - - c2cec4eb by David Waern at 2006-09-04T20:53:01+00:00 Rename a function - - - - - 9a9735ba by David Waern at 2006-09-05T15:51:21+00:00 Change version number to 2.0 - - - - - 3758a714 by David Waern at 2006-09-05T15:51:49+00:00 Align comment properly - - - - - 68478d9e by David Waern at 2006-09-15T18:03:00+00:00 Remove interface reading/writing code and use the GHC api for creating package environments instead - - - - - d2eedd95 by David Waern at 2006-09-15T18:05:29+00:00 Change the executable name to haddock-ghc-nolib - - - - - fcfbcf66 by David Waern at 2006-09-15T18:05:45+00:00 Small source code cleanup - - - - - d08eb017 by David Waern at 2006-09-15T18:06:21+00:00 Remove handling of --package flag - - - - - b8a4cf53 by David Waern at 2006-09-15T18:07:16+00:00 Remove commented-out code - - - - - bef0a684 by David Waern at 2006-09-15T18:37:57+00:00 Don't warn about missing links to () - - - - - e7d25fd7 by David Waern at 2006-09-15T19:50:49+00:00 Remove Interface and Binary2 modules - - - - - 9894f2a1 by David Waern at 2006-09-15T19:53:43+00:00 Remove debug printing from HaddockHtml - - - - - a0e7455d by David Waern at 2006-09-16T00:16:29+00:00 Comments only - - - - - d5b26fa7 by David Waern at 2006-09-16T00:16:57+00:00 Refactor PackageData creation code and start on building the doc env propery (unfinished) - - - - - 06aaa779 by David Waern at 2006-09-16T00:19:25+00:00 Better comments in Main.hs - - - - - 1a52d1b4 by David Waern at 2006-09-18T22:17:11+00:00 Comments and spacing change - - - - - e5a97767 by David Waern at 2006-09-21T17:02:45+00:00 Remove unnecessary fmapM import in Main - - - - - 9d0f9d3a by David Waern at 2006-09-22T18:07:07+00:00 Make import list in HaddockHtml prettier - - - - - 3452f662 by David Waern at 2006-09-22T18:08:47+00:00 Refactor context rendering - - - - - 12d0a6d0 by David Waern at 2006-09-22T18:09:52+00:00 Do proper HsType rendering (inser parentheses correctly) - - - - - 2c20c2f9 by David Waern at 2006-09-22T18:10:45+00:00 Fix a bug in Main.toHsType - - - - - c5396443 by David Waern at 2006-09-22T18:11:16+00:00 Skip external package modules sort for now - - - - - 3fb95547 by David Waern at 2006-09-22T20:35:40+00:00 Take away trailin "2" on all previously clashing type names - - - - - 2174755f by David Waern at 2006-09-22T20:51:43+00:00 Remove unused imports in Main - - - - - 1e9f7a39 by David Waern at 2006-09-22T20:52:11+00:00 Fix a comment in Main - - - - - 32d9e028 by David Waern at 2006-10-05T16:40:11+00:00 Merge with changes to ghc HEAD - - - - - 3058c8f5 by David Waern at 2006-10-05T16:41:02+00:00 Comment fixes - - - - - b9c217ec by David Waern at 2006-10-05T16:49:59+00:00 Filter out more builtin type constructors from warning messages - - - - - 67e7d252 by David Waern at 2006-10-05T19:38:22+00:00 Refactoring -- better structured pass1 - - - - - cd21c0c1 by David Waern at 2006-10-05T19:44:42+00:00 Remove read/dump interface flags - - - - - 313f9e69 by David Waern at 2006-10-05T19:49:26+00:00 Remove unused pretty printing - - - - - 480f09d1 by David Waern at 2006-12-28T13:22:24+00:00 Update to build with latest GHC HEAD - - - - - 63dccfcb by David Waern at 2007-01-05T01:38:45+00:00 Fixed a bug so that --ghc-flag works correctly - - - - - 3117dadc by David Waern at 2006-12-29T18:53:39+00:00 Automatically get the GHC lib dir - - - - - 9dc84a5c by David Waern at 2006-12-29T19:58:53+00:00 Comments - - - - - 0b0237cc by David Waern at 2007-01-05T16:48:30+00:00 Collect docs based on SrcLoc, syncing with removal of DeclEntity from GHC - - - - - a962c256 by David Waern at 2007-01-05T17:02:47+00:00 Add tabs in haddock.cabal - - - - - 0ca30c97 by David Waern at 2007-01-05T17:04:11+00:00 Add GHCUtils.hs - - - - - c0ab9abe by David Waern at 2007-01-10T11:43:08+00:00 Change package name to haddock-ghc, version 0.1 - - - - - 38e18b27 by David Waern at 2007-01-12T12:03:52+00:00 No binder name for foreign exports - - - - - d18587ab by David Waern at 2007-01-12T12:08:15+00:00 Temp record - - - - - ba6251a0 by David Waern at 2007-01-12T18:27:55+00:00 Remove read/dump-interface (again) - - - - - f4ba2b39 by David Waern at 2007-01-12T18:31:36+00:00 Remove DocOption, use the GHC type - - - - - 511be8bd by David Waern at 2007-01-12T18:32:41+00:00 Use exceptions instead of Either when loading package info - - - - - 0f2144d8 by David Waern at 2007-01-12T18:33:23+00:00 Small type change - - - - - 77507eb7 by David Waern at 2007-01-12T18:33:59+00:00 Remove interface file read/write - - - - - 0ea1e14f by David Waern at 2007-01-17T21:40:26+00:00 Add trace_ppr to GHCUtils - - - - - 3878b493 by David Waern at 2007-01-17T21:40:53+00:00 Sort external package modules and build a doc env - - - - - 8dc323fc by David Waern at 2007-01-17T21:42:41+00:00 Remove comment - - - - - f4c5b097 by David Waern at 2007-01-18T23:22:18+00:00 Add haddock-ghc.cabal and remove ghc option pragma in source file - - - - - da242b2c by David Waern at 2007-01-18T23:22:46+00:00 Remove some tabs - - - - - 288ed096 by David Waern at 2007-01-18T23:39:28+00:00 Moved the defaultErrorHandler to scope only over sortAndCheckModules for now - - - - - 4dd150fe by David Waern at 2007-02-03T21:23:56+00:00 Let restrictCons handle infix constructors - - - - - 97893442 by David Waern at 2007-02-04T16:26:00+00:00 Render infix data constructors - - - - - da89db72 by David Waern at 2007-02-04T16:26:33+00:00 CHange project name to Haddock-GHC - - - - - e93d48af by David Waern at 2007-02-04T16:59:08+00:00 Render infix type constructors properly - - - - - 357bc99b by David Waern at 2007-02-04T17:37:08+00:00 Insert spaces around infix function names - - - - - ab6cfc49 by David Waern at 2007-02-04T17:59:54+00:00 Do not list entities without documentation - - - - - 04249c7e by David Waern at 2007-02-04T19:16:25+00:00 Add GADT support (quite untested) - - - - - 2c223f8d by David Waern at 2007-02-04T19:25:10+00:00 Add package file write/save again! - - - - - b07ed218 by David Waern at 2007-02-04T19:33:02+00:00 Comment out minf_iface based stuff - - - - - 953d1fa7 by David Waern at 2007-02-05T00:12:23+00:00 Solve conflicts - - - - - 593247fc by David Waern at 2007-02-06T19:48:48+00:00 Remove -package flag, GHC's can be used instead - - - - - f658ded2 by David Waern at 2007-02-06T20:50:44+00:00 Start for support of ATs - - - - - 97f9e913 by David Waern at 2007-02-06T20:52:27+00:00 Wibble - - - - - 2ce8e4cf by David Waern at 2007-02-16T12:09:49+00:00 Add the DocOptions change - - - - - dee4a9b5 by David Waern at 2007-03-06T01:24:48+00:00 Wibble - - - - - 7cb99d18 by David Waern at 2007-03-06T01:24:58+00:00 Change version to 2.0 and executable name to haddock - - - - - c5aa02bc by David Waern at 2007-03-08T15:59:49+00:00 Go back to -B flag - - - - - 3a349201 by David Waern at 2007-03-09T13:31:59+00:00 Better exception handling and parsing of GHC flags - - - - - 05a69b71 by David Waern at 2007-03-09T17:45:44+00:00 Remove commented-out DocEntity printing - - - - - 755032cb by davve at dtek.chalmers.se at 2007-03-23T23:30:20+00:00 Remove a file that shouldn't be here - - - - - a7077e5f by davve at dtek.chalmers.se at 2007-03-24T03:58:48+00:00 Remove an import - - - - - 6f55aa8b by davve at dtek.chalmers.se at 2007-03-25T00:46:48+00:00 Start work on Haddock API - - - - - f0199480 by davve at dtek.chalmers.se at 2007-03-25T00:56:36+00:00 Prettify some comments - - - - - f952f9d1 by davve at dtek.chalmers.se at 2007-03-25T00:56:53+00:00 Remove ppr in HaddockTypes - - - - - bc594904 by davve at dtek.chalmers.se at 2007-03-25T00:57:53+00:00 Remove commented out doc env inference - - - - - 11ebf08d by davve at dtek.chalmers.se at 2007-03-25T01:23:25+00:00 De-flatten the namespace - - - - - f696b4bc by davve at dtek.chalmers.se at 2007-03-25T03:21:48+00:00 Add missing stuff to API - - - - - 9a2a04c3 by davve at dtek.chalmers.se at 2007-03-25T03:22:02+00:00 Wibble - - - - - 7d04a6d5 by davve at dtek.chalmers.se at 2007-03-25T03:22:08+00:00 Avoid a GHC bug with parseStaticFlags [] - - - - - 4d2820ba by davve at dtek.chalmers.se at 2007-03-26T04:57:01+00:00 Add fall-through case to mkExportItem - - - - - 6ebc8950 by Stefan O'Rear at 2007-03-26T04:14:53+00:00 Add shebang line to Setup.lhs - - - - - 80966ec5 by davve at dtek.chalmers.se at 2007-03-26T05:24:26+00:00 Fix stupid compile error - - - - - 1ea1385d by davve at dtek.chalmers.se at 2007-04-05T17:19:56+00:00 Do save/read of interface files properly - - - - - 0e4f6541 by David Waern at 2007-04-10T21:08:36+00:00 Add version to ghc dependency - - - - - b0499b63 by David Waern at 2007-04-10T21:37:08+00:00 Change package name to haddock - - - - - 9d50d27e by David Waern at 2007-04-24T00:22:14+00:00 Use filepath package instead of FilePath - - - - - 87c7fcdf by David Waern at 2007-07-10T21:03:04+00:00 Add new package dependencies - - - - - 4768709c by David Waern at 2007-07-11T20:37:11+00:00 Follow changes to record constructor representation - - - - - b9a02fee by Simon Marlow at 2007-05-30T14:00:48+00:00 update to compile with the latest GHC & Cabal - - - - - c0ebdc01 by David Waern at 2007-07-11T21:35:45+00:00 Fix conflicts - - - - - 97f7afd4 by David Waern at 2007-07-11T21:52:38+00:00 Follow changes to the GHC API - - - - - a5b7b58f by David Waern at 2007-07-12T20:36:48+00:00 Call parseStaticFlags before newSession - - - - - f7f50dbc by David Waern at 2007-08-01T21:52:58+00:00 Better indentation in haddock.cabal - - - - - d84e52ad by David Waern at 2007-08-02T00:08:18+00:00 Wibble - - - - - a23f494a by David Waern at 2007-08-02T00:08:24+00:00 Be better at trying to load all module dependencies (debugging) - - - - - ee917f13 by David Waern at 2007-08-03T18:48:08+00:00 Load all targets explicitly (checkModule doesn't chase dependencies anymore) - - - - - 5182d631 by David Waern at 2007-08-16T16:48:55+00:00 Finalize support for links to other packages - - - - - dfd1e3da by David Waern at 2007-08-16T16:51:11+00:00 Fix haddock comment errors in Haddock.Types - - - - - 50c0d83e by David Waern at 2007-08-16T16:51:37+00:00 Remove a debug import - - - - - d84b7c2b by David Waern at 2007-08-16T17:06:30+00:00 Rename PackageData to HaddockPackage - - - - - 3b52cb9f by David Waern at 2007-08-16T17:09:42+00:00 Simplify some comments - - - - - 66fa68d9 by David Waern at 2007-08-16T17:11:38+00:00 Comment the HaddockPackage definition - - - - - 8674c761 by David Waern at 2007-08-16T17:25:54+00:00 Improve code layout in Main - - - - - 571a3a0b by David Waern at 2007-08-16T17:32:13+00:00 Remove explict module imports in Main - - - - - d31b3cb0 by David Waern at 2007-08-16T17:36:23+00:00 Correct comments - - - - - 7f8a9f2b by David Waern at 2007-08-16T17:39:50+00:00 Fix layout problems in Haddock.Types - - - - - 9f421d7f by David Waern at 2007-08-17T11:16:48+00:00 Move options out of Main into Haddock.Options - - - - - 80042b63 by David Waern at 2007-08-17T11:26:59+00:00 Small comment/layout fixes - - - - - b141b982 by David Waern at 2007-08-17T11:28:28+00:00 Change project name from Haddock-GHC to Haddock - - - - - dbeb4a81 by David Waern at 2007-08-17T11:41:05+00:00 Add top module comment to all files - - - - - ce99cc9e by David Waern at 2007-08-17T14:53:04+00:00 Factor out typechecking phase into Haddock.Typecheck - - - - - 6bf75d9e by David Waern at 2007-08-17T16:55:35+00:00 Factor out package code to Haddock.Packages - - - - - b396db37 by David Waern at 2007-08-29T22:40:23+00:00 Major refactoring - - - - - 3d4f95ee by David Waern at 2007-08-29T23:26:24+00:00 Rename HaddockModule to Interface and a few more refactorings - - - - - c55326db by David Waern at 2007-08-29T23:48:03+00:00 Some comment cleanup - - - - - 9a84fc46 by David Waern at 2007-08-29T23:49:29+00:00 Add some modules that I forgot to add earlier - - - - - 4536dce2 by David Waern at 2007-08-29T23:55:24+00:00 Wibble - - - - - 9b7f0206 by David Waern at 2007-08-30T16:03:29+00:00 Wibble - - - - - c52c050a by David Waern at 2007-08-30T16:30:37+00:00 Rename HaddockModule to Interface - - - - - eae2995f by David Waern at 2007-08-30T16:42:59+00:00 Simplify createInterfaces - - - - - 53f99caa by David Waern at 2007-09-29T00:04:31+00:00 Add build-type: Simple to the cabal file - - - - - 0d3103a8 by David Waern at 2007-09-29T00:04:58+00:00 Add containers and array dependency - - - - - 6acf5f30 by David Waern at 2007-09-29T00:13:36+00:00 Prettify the cabal file - - - - - 87c1e378 by David Waern at 2007-09-29T13:16:39+00:00 FIX: consym data headers with more than two variables - - - - - b67fc16a by David Waern at 2007-09-29T14:01:32+00:00 FIX: prefix types used as operators should be quoted - - - - - a8f925bc by David Waern at 2007-09-29T14:02:26+00:00 Use isSymOcc from OccName instead of isConSym - - - - - fc330701 by David Waern at 2007-09-29T14:15:37+00:00 Use isLexConSym/isLexVarSym from OccName - - - - - e4f3dbad by David Waern at 2007-09-29T15:01:08+00:00 FIX: do not quote varsym type operators - - - - - 402207d2 by David Waern at 2007-09-29T15:01:50+00:00 Wibble - - - - - f9d89ef0 by David Waern at 2007-09-29T15:17:40+00:00 Take care when pp tyvars - add parens on syms - - - - - 849e2a77 by David Waern at 2007-10-01T21:56:39+00:00 Go back to using a ModuleMap instead of LookupMod - fixes a bug - - - - - 549dbac6 by David Waern at 2007-10-02T01:05:19+00:00 Improve parsing of doc options - - - - - a36021b8 by David Waern at 2007-10-02T23:05:00+00:00 FIX: double arrows in constructor contexts - - - - - d03bf347 by David Waern at 2007-10-09T16:14:05+00:00 Add a simple test suite - - - - - c252c140 by David Waern at 2007-10-17T16:02:28+00:00 Add --optghc=.. style flag passing to GHC - - - - - cce6c1b3 by David Waern at 2007-10-18T22:03:20+00:00 Add support for --read-interface again - - - - - 33d059c0 by David Waern at 2007-10-18T22:30:18+00:00 Refactoring -- get rid of Haddock.Packages - - - - - f9ed0a4c by David Waern at 2007-10-18T22:34:36+00:00 Name changes - - - - - 8a1c816f by David Waern at 2007-10-20T14:24:23+00:00 Add --ghc-version option - - - - - 4925aaa1 by David Waern at 2007-10-21T14:34:26+00:00 Add some Outputable utils - - - - - 69e7e47f by David Waern at 2007-10-21T14:35:49+00:00 FIX: Ord for OrdName was not comparing modules - - - - - 5a4ae535 by David Waern at 2007-10-21T21:18:48+00:00 Wibble - - - - - 03d48e20 by David Waern at 2007-10-24T15:52:56+00:00 Remove Main from "other modules" - - - - - c66f6d82 by David Waern at 2007-10-24T16:37:18+00:00 Make it possible to run haddock on itself - - - - - 21d156d8 by David Waern at 2007-10-25T14:02:14+00:00 Don't set boot modules as targets - - - - - f8bcf91c by David Waern at 2007-10-31T22:11:17+00:00 Add optimisation flags - - - - - 7ac758f2 by David Waern at 2007-11-04T09:48:28+00:00 Go back to loading only targets (seems to work now) - - - - - 4862aae1 by David Waern at 2007-11-05T22:24:57+00:00 Do full compilation of modules -- temporary fix for GHC API problem - - - - - 697e1517 by David Waern at 2007-11-05T22:25:50+00:00 Don't warn about not being able to link to wired/system/builtin-names - - - - - 892186da by David Waern at 2007-11-06T00:49:21+00:00 Filter out instances with TyCons that are not exported - - - - - 9548314c by David Waern at 2007-11-06T09:37:14+00:00 Wibble - - - - - 5cafd627 by David Waern at 2007-11-08T01:43:07+00:00 Filter out all non-vanilla type sigs - - - - - 04621830 by David Waern at 2007-11-08T01:45:13+00:00 Synch loading of names from .haddock files with GHC's name cache - - - - - 88d37f77 by David Waern at 2007-11-08T01:46:21+00:00 Remove commented-out code - - - - - 6409c911 by David Waern at 2007-11-08T01:56:00+00:00 Small bugfix and cleanup in getDeclFromTyCls - - - - - af59d9c2 by David Waern at 2007-11-08T02:08:44+00:00 Remove OrdName stuff - - - - - 3a615e2e by David Waern at 2007-11-08T02:13:41+00:00 Update runtests.hs following changes to haddock - - - - - 01f3314e by David Waern at 2007-11-08T02:33:01+00:00 Complain if we can't link to wired-in names - - - - - fcafb5d1 by David Waern at 2007-11-09T02:40:16+00:00 Don't exit when there are no file arguments - - - - - 194bc332 by David Waern at 2007-11-09T02:55:37+00:00 Wibble - - - - - dbe4cb55 by David Waern at 2007-11-09T02:56:14+00:00 Wibble - - - - - 82869fda by David Waern at 2007-11-10T17:01:43+00:00 Introduce InstalledInterface structure and add more stuff to the .haddock files We introduce InstalledInterface capturing the part of Interface that is stored in the interface files. We change the ppHtmlContents and ppHtmllIndex to take this structure instead of a partial Interface. We add stuff like the doc map and exported names to the .haddock file (via InstalledInterface). - - - - - d6bb57bf by David Waern at 2007-11-10T17:19:48+00:00 FIX: contents and index should include external package modules when --gen-contents/--gen-index - - - - - e8814716 by David Waern at 2007-11-11T00:29:27+00:00 Remove lDocLinkName and its use in Html backend - - - - - 6f9bd702 by David Waern at 2007-11-11T00:50:57+00:00 Do some refactoring in the html backend This also merges an old patch by Augustsson: Wed Jul 12 19:54:36 CEST 2006 lennart.augustsson at credit-suisse.com * Print type definitions like signatures if given arrows. - - - - - 09d0ce24 by Malcolm.Wallace at 2006-07-20T13:13:57+00:00 mention HsColour in the docs, next to option flags for linking to source code - - - - - 24da6c34 by Malcolm.Wallace at 2006-07-20T13:14:50+00:00 change doc references to CVS to give darcs repository location instead - - - - - 74d52cd6 by David Waern at 2007-11-11T00:55:33+00:00 Update copyright - - - - - fcaa3b4f by Duncan Coutts at 2006-09-08T13:41:00+00:00 Eliminate dep on network by doing a little cut'n'paste haddock depending on the network causes a circular dependency at least if you want to build the network lib with haddock docs. - - - - - 10cc9bda by David Waern at 2007-11-11T02:09:41+00:00 Fix conflicts - - - - - 4e3acd39 by David Waern at 2007-11-11T02:21:19+00:00 Manual merge of a patch from Duncan Coutts that removes the dependency on mtl - - - - - fa9070da by Neil Mitchell at 2006-09-29T15:52:03+00:00 Do not generate an empty table if there are no exports, this fixes a <table></table> tag being generated, which is not valid HTML 4.01 - - - - - d7431c85 by David Waern at 2007-11-11T02:28:50+00:00 Fix conflicts - - - - - f87e8f98 by Simon Marlow at 2006-10-10T11:37:16+00:00 changes for 0.8 - - - - - db929565 by Simon Marlow at 2006-10-10T12:07:12+00:00 fix the name of the source file - - - - - 8220aa4b by Simon Marlow at 2006-10-11T14:17:37+00:00 Rename haddock.js to haddock-util.js haddock.js will be run automatically by Windows when you type 'haddock' if it is found on the PATH, so rename to avoid confusion. Spotted by Adrian Hey. - - - - - 6bccdaa1 by sven.panne at 2006-10-12T15:28:23+00:00 Cabal's sdist does not generate "-src.tar.gz" files, but ".tar.gz" ones - - - - - d3f3fc19 by Simon Marlow at 2006-12-06T16:05:07+00:00 add todo item for --maintainer - - - - - 2da7e269 by Simon Marlow at 2006-12-15T15:52:00+00:00 TODO: do something better about re-exported symbols from another package - - - - - 42d85549 by David Waern at 2007-11-11T02:30:59+00:00 Fix conflicts - - - - - 5e7ef6e5 by Neil Mitchell at 2007-01-11T15:41:15+00:00 Never do spliting index files into many - - - - - f3d4aebe by Neil Mitchell at 2007-01-11T17:07:09+00:00 Add searching on the index page - - - - - bad3ab66 by Neil Mitchell at 2007-01-11T18:17:46+00:00 Delete dead code, now there is only one index page - - - - - cd09eedb by Neil Mitchell at 2007-01-11T18:21:19+00:00 Delete more stuff that is no longer required - - - - - e2806646 by David Waern at 2007-11-11T02:41:53+00:00 Fix conflicts - - - - - a872a823 by Neil Mitchell at 2007-01-11T18:51:43+00:00 Make the index be in case-insensitive alphabetic order - - - - - 8bddd9d7 by Neil Mitchell at 2007-02-06T17:49:12+00:00 Do not create empty tables for data declarations which don't have any constructors, instances or comments. Gets better HTML 4.01 compliance - - - - - 036b8120 by David Waern at 2007-11-11T02:56:58+00:00 Fix conflicts - - - - - f50c1639 by Conal Elliott at 2007-02-14T21:54:00+00:00 added substitution %{FILE///c} - - - - - 402e166a by David Waern at 2007-11-11T03:35:46+00:00 Manual merge of old patch: Sat Apr 21 04:36:43 CEST 2007 Roberto Zunino <zunrob at users.sf.net> * URL expansion for %%, %L, %{LINE} - - - - - 2f264fbd by David Waern at 2007-11-11T03:40:33+00:00 Manual merge of an old patch: Thu Apr 19 20:23:40 CEST 2007 Wolfgang Jeltsch <g9ks157k at acme.softbase.org> * bug fix When Haddock was invoked with the --ignore-all-exports flag but the ignore-exports module attribute wasn't used, hyperlinks weren't created for non-exported names. This fix might not be as clean as one would wish (since --ignore-all-exports now results in ignore_all_exports = True *and* an additional OptIgnoreExports option for every module) but at least the bug seems to be resolved now. - - - - - 7d7ae106 by sven.panne at 2007-09-02T12:18:02+00:00 Install LICENSE in the correct place - - - - - 66eaa924 by David Waern at 2007-11-11T19:02:46+00:00 Fix a bug that made haddock loop - - - - - 4ed47b58 by David Waern at 2007-11-11T19:03:09+00:00 Rename java-script file (this wasn't merge correctly) - - - - - d569534a by David Waern at 2007-11-11T19:06:44+00:00 Don't require -B <ghc-libdir> when no argument files Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B <ghc-libdir> to Haddock when there're no source files to process. This is nice when computing contents/index for external packages. - - - - - 373368bc by Neil Mitchell at 2007-01-11T18:22:44+00:00 Change from tabs to spaces in the ppHtmlIndex function - - - - - 6b063a77 by Neil Mitchell at 2007-01-12T12:17:46+00:00 Rewrite much of the index searching code, previously was too slow to execute on the base library with IE, the new version guarantees less than O(log n) operations be performed, where n is the number in the list (before was always O(n)) - - - - - bfad00b7 by David Waern at 2007-11-11T23:33:53+00:00 Fix conflicts - - - - - cd2dcc09 by Neil Mitchell at 2007-01-12T12:25:01+00:00 Make the max number of results 75 instead of 50, to allow map searching in the base library to work - - - - - 3ae74764 by Neil Mitchell at 2007-01-12T12:58:17+00:00 Make the search box in a form so that enter does the default search - - - - - 142103e5 by David Waern at 2007-11-12T00:03:18+00:00 Merge patch from the old branch: Fri Aug 31 13:21:45 CEST 2007 Duncan Coutts <duncan at haskell.org> * Add category: Development to .cabal file Otherwise it appears on the hackage website in the "Unclassified" category. - - - - - 22ec2ddb by David Waern at 2007-11-25T01:55:29+00:00 A a list of small improvements to the TODO file - - - - - eb0129f4 by Wolfgang Jeltsch at 2007-12-03T23:47:55+00:00 addition of type equality support (at least for HTML generation) - - - - - 816a7e22 by David Waern at 2007-12-08T15:46:26+00:00 Handle class operators correctly when rendering predicates - - - - - 68baaad2 by David Waern at 2007-12-08T16:15:54+00:00 Code layout changes - - - - - 09b77fb4 by David Waern at 2007-12-08T16:16:03+00:00 Handle infix operators correctly in the Type -> HsType translation - - - - - 31c36da2 by David Waern at 2007-12-08T16:24:27+00:00 Add ppLParendTypes/ppLParendType - - - - - b17cc818 by David Waern at 2007-12-08T16:26:12+00:00 Use ppParendType when printing types args in predicates - - - - - ffd1f2cf by David Waern at 2007-12-08T16:45:06+00:00 Fix rendering of instance heads to handle infix operators This is also a refactoring to share this code for rendering predicates. - - - - - ff886d45 by David Waern at 2007-12-08T17:27:46+00:00 Fix rendering of class operators - - - - - e2fcbb9e by David Waern at 2007-12-08T17:59:28+00:00 Fix a bug (use ppTyName instead of ppName to print names in type apps) - - - - - 79a1056e by David Waern at 2007-12-08T21:25:18+00:00 Update tests - - - - - 867741ac by David Waern at 2007-12-08T21:25:49+00:00 Give a diff on test failure - - - - - 7e5eb274 by David Waern at 2008-01-05T14:33:45+00:00 Add DrIFT commands - - - - - 3656454d by David Waern at 2008-01-05T20:26:00+00:00 Add "cabal-version: >= 1.2" to the cabal file - - - - - 77974efc by Simon Marlow at 2007-12-20T09:52:44+00:00 add an item - - - - - f6ac1708 by Simon Marlow at 2007-12-06T14:00:10+00:00 Source links must point to the original module, not the referring module - - - - - eda1d5c9 by David Waern at 2008-01-06T14:40:52+00:00 Manual merge of a patch to the 0.8 branch Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar at microsoft.com> * Source links must point to the original module, not the referring module - - - - - 378f4085 by David Waern at 2008-01-06T16:03:45+00:00 Change stability from stable to experimental - - - - - 8bdafe44 by David Waern at 2008-01-06T16:14:22+00:00 Add haskell.vim (it had been removed somehow) - - - - - ea34d02e by David Waern at 2008-01-06T16:36:57+00:00 Change version to 2.0.0.0 - - - - - 34631ac0 by David Waern at 2008-01-06T16:44:57+00:00 Add missing modules to the cabal file - - - - - 9e142935 by David Waern at 2008-01-06T17:25:42+00:00 Depend on ghc >= 6.8.2 && < 6.9 - - - - - 59f9eeaa by Simon Marlow at 2007-12-20T10:43:04+00:00 add build scripts - - - - - 1c29ae30 by Simon Marlow at 2007-12-20T10:47:07+00:00 update version number - - - - - fe16a3e4 by Simon Marlow at 2007-12-20T10:48:03+00:00 update version - - - - - f688530f by Simon Marlow at 2007-12-20T10:48:29+00:00 doc updates - - - - - ce71b611 by David Waern at 2008-01-07T13:46:32+00:00 Change version in docs and spec - - - - - 03ab8d6f by David Waern at 2008-01-07T13:47:38+00:00 Manually merge over changes to CHANGES for 0.9 - - - - - 39f1b042 by David Waern at 2008-01-07T15:17:41+00:00 Remove the -use-package flag, we don't support it anyway - - - - - 7274a544 by David Waern at 2008-01-07T15:33:05+00:00 Update CHANGES for 2.0.0.0 - - - - - 96594f5d by David Waern at 2008-01-07T15:46:49+00:00 Wibble - - - - - f4c5a4c4 by David Waern at 2008-01-07T15:55:36+00:00 Change url to repo in documentation - - - - - 8a4c77f0 by David Waern at 2008-01-07T16:00:54+00:00 Update CHANGES - - - - - cb3a9288 by David Waern at 2008-01-07T16:02:55+00:00 Documentation fix - - - - - d8e45539 by David Waern at 2008-01-07T16:12:00+00:00 Update docs to say that Haddock accets .lhs files and module names - - - - - 4b5ce824 by David Waern at 2008-01-07T16:12:25+00:00 Document -B option - - - - - 47274262 by David Waern at 2008-01-07T16:23:07+00:00 Update CHANGES - - - - - 7ff314a9 by David Waern at 2008-01-07T16:23:20+00:00 Remove --use-package, --package & --no-implicit.. flags from docs - - - - - 6c3819c0 by David Waern at 2008-01-07T16:23:52+00:00 Remove --no-implicit-prelide flag - - - - - 1b14ae40 by David Waern at 2008-01-07T16:32:26+00:00 Update the "Using literate or pre-processed source" section - - - - - 0117f620 by David Waern at 2008-01-07T16:41:55+00:00 Document the --optghc flag - - - - - 087ab1cf by David Waern at 2008-01-07T16:42:10+00:00 Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 - - - - - 7253951e by David Waern at 2008-01-07T16:48:40+00:00 Document OPTIONS_HADDOCK - - - - - 3b6bdcf6 by David Waern at 2008-01-07T16:56:54+00:00 Wibble - - - - - 3025adf9 by David Waern at 2008-01-07T17:08:14+00:00 Wibble - - - - - 5f30f1a0 by David Waern at 2008-01-07T17:15:44+00:00 Change synopsis field to description - - - - - 1673f54b by David Waern at 2008-01-07T17:18:21+00:00 Change my email address in the cabal file - - - - - 55aa9808 by David Waern at 2008-01-07T18:18:02+00:00 Add documentation for readInterfaceFile - - - - - eaea417f by David Waern at 2008-01-07T18:21:30+00:00 Export necessary stuff from Distribution.Haddock - - - - - 7ea18759 by David Waern at 2008-01-07T18:31:49+00:00 Remove dep on Cabal - - - - - 7b79c74e by David Waern at 2008-01-07T18:33:49+00:00 Remove dep on process - - - - - ce3054e6 by David Waern at 2008-01-16T23:01:21+00:00 Add feature-requsts from Henning Thielemann to TODO - - - - - 0c08f1ec by David Waern at 2008-01-16T23:03:02+00:00 Record a bug in TODO - - - - - b04605f3 by David Waern at 2008-01-23T16:59:06+00:00 Add a bug reported by Ross to TODO - - - - - 5b17c030 by David Waern at 2008-01-23T18:05:53+00:00 A a bug report to TODO - - - - - 1c993b0d by David Waern at 2008-01-25T16:30:25+00:00 Accept test output - - - - - c22fc0d0 by David Waern at 2008-01-25T16:34:49+00:00 Accept test output - - - - - 4b795811 by David Waern at 2008-01-25T16:38:37+00:00 Change Hidden.hs (test) to use OPTIONS_HADDOCK - - - - - c124dbd9 by David Waern at 2008-01-25T16:39:23+00:00 Accept test output - - - - - ec6f6eea by David Waern at 2008-01-25T16:42:08+00:00 Add Hidden.html.ref to tests - - - - - 1dc9610c by David Waern at 2008-02-02T20:50:51+00:00 Add a comment about UNPACK bug in TODO - - - - - 2d3f7081 by David Waern at 2008-02-09T22:33:24+00:00 Change the representation of DocNames Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented. - - - - - 0f28c921 by David Waern at 2008-02-09T23:00:36+00:00 H.GHC.Utils: remove unused imports/exports - - - - - 0c44cad5 by David Waern at 2008-02-10T00:28:13+00:00 H.GHC.Utils: add some functions that were removed by mistake - - - - - e3452f49 by David Waern at 2008-02-10T00:28:48+00:00 Fix some trivial warnings in H.InterfaceFile - - - - - a6d74644 by David Waern at 2008-02-10T00:48:06+00:00 Update the version message to fit in small terminals - - - - - 76c9cd3e by David Waern at 2008-02-10T14:47:39+00:00 Remove bugs from TODO that don't apply anymore since the port - - - - - 5e10e090 by David Waern at 2008-02-10T15:22:47+00:00 Remove bugs from TODO that weren't actual bugs - - - - - fef70878 by David Waern at 2008-02-10T15:23:44+00:00 Remove yet another item from TODO that was not an actual bug - - - - - e1af47b8 by David Waern at 2008-02-11T10:25:57+00:00 Bump the version number to 2.1.0 Since the exported datatype DocName has changed, we need to bump the major version number. Let's also drop the fourth version component, it's not that useful. - - - - - e3be7825 by David Waern at 2008-04-11T14:29:04+00:00 Add a bug to TODO - - - - - cb6574be by David Waern at 2008-04-11T16:00:45+00:00 Use the in-place haddock when running tests - - - - - c6d7af0d by David Waern at 2008-04-11T16:09:16+00:00 Turn off GHC warnings when running tests - - - - - 7f61b546 by David Waern at 2008-04-11T17:24:00+00:00 Add a flag for turning off all warnings - - - - - 883b8422 by David Waern at 2008-04-12T14:02:18+00:00 Fix printing of data binders - - - - - 2a0db8fc by David Waern at 2008-04-12T18:52:46+00:00 Fix missing parenthesis in constructor args bug - - - - - 1b3ac3f9 by David Waern at 2008-04-12T18:57:23+00:00 Simplify test suite and add tests I move all tests into one single directory to simplify things, and add a test for the last bug that was fixed. - - - - - 8f178376 by David Waern at 2008-04-12T19:00:15+00:00 Add a script for copying test output to "expected" output - - - - - 193e3a03 by David Waern at 2008-04-12T19:16:37+00:00 Remove two fixed bugs from TODO - - - - - ddc9130c by David Waern at 2008-04-12T19:37:06+00:00 Update test README - - - - - 956069c0 by David Waern at 2008-05-01T12:16:14+00:00 Update version number in spec and docs - - - - - 5478621c by David Waern at 2008-05-01T12:28:12+00:00 Remove claim of backwards compatibility from docs for readInterfaceFile - - - - - 4a16dea9 by David Waern at 2008-05-01T12:33:04+00:00 Update CHANGES - - - - - 804216fb by David Waern at 2008-05-01T12:43:16+00:00 Add a synopsis - - - - - fd0c84d5 by David Waern at 2008-05-01T12:44:44+00:00 Add Haddock.DocName to the cabal file - - - - - 9f4a7439 by David Waern at 2008-05-01T12:45:53+00:00 Remove -fglasgow-exts and -fasm - - - - - aee7c145 by David Waern at 2008-05-01T12:54:01+00:00 Add LANGUAGE pragmas to source files - - - - - 9a58428b by David Waern at 2008-05-01T12:54:19+00:00 Add extensions to cabal file - - - - - 494f1bee by David Waern at 2008-05-01T13:12:09+00:00 Export DocName in the API - - - - - c938196b by David Waern at 2008-05-01T13:12:19+00:00 Add hide options to some source files - - - - - 236e86af by Neil Mitchell at 2008-06-07T20:45:10+00:00 Rewrite the --hoogle flag support - - - - - 6d910950 by Neil Mitchell at 2008-06-14T10:56:50+00:00 Simplify the newtype/data outputting in Hoogle, as haddock does it automatically - - - - - f87a95a8 by Neil Mitchell at 2008-06-14T12:10:18+00:00 Add initial structure for outputting documentation as well, but does not yet output anything - - - - - 7c3bce54 by Neil Mitchell at 2008-06-14T12:27:07+00:00 Remove <document comment> from the Hoogle output - - - - - 9504a325 by Neil Mitchell at 2008-06-16T06:33:21+00:00 Default to "main" if there is no package, otherwise will clobber hoogle's hoogle info - - - - - 4a794a79 by Neil Mitchell at 2008-06-16T06:53:29+00:00 Change packageName to packageStr, as it better reflects the information stored in it - - - - - 7abc9baf by Neil Mitchell at 2008-06-16T07:09:49+00:00 Add modulePkgInfo to Haddock.GHC.Utils, which gives back package name and version info - - - - - 8ca11514 by Neil Mitchell at 2008-06-16T07:13:48+00:00 Change Hoogle to take the package name and package version separately - - - - - a6da452d by Neil Mitchell at 2008-06-18T11:29:46+00:00 In Hoogle do not list things that are not local to this module - - - - - 974b76b7 by David Waern at 2008-06-19T18:40:13+00:00 Be more consistent with GHC API naming in H.GHC.Utils - - - - - 2facb4eb by David Waern at 2008-06-19T19:03:03+00:00 Update test output - - - - - c501de72 by David Waern at 2008-06-26T20:26:49+00:00 Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. - - - - - ac4c6836 by David Waern at 2008-06-26T20:33:08+00:00 Update CHANGES - - - - - 9d21c60a by David Waern at 2008-06-26T20:34:53+00:00 Update README - - - - - 741448f0 by David Waern at 2008-06-26T21:12:57+00:00 Improve wording in the help message - - - - - b1b42b11 by David Waern at 2008-06-30T10:16:17+00:00 Rename ForeignType - - - - - 6d6c2b34 by David Waern at 2008-06-30T10:25:09+00:00 Rename TyFamily - - - - - 8d1125ed by David Waern at 2008-06-30T10:37:21+00:00 Rename type patterns - - - - - 7610a4cb by David Waern at 2008-06-30T10:45:07+00:00 Rename associated types - - - - - 8eeba14c by David Waern at 2008-06-30T10:47:41+00:00 Remove the TODO file now that we have a trac - - - - - 1af5b25b by David Waern at 2008-07-02T18:19:28+00:00 Render type family declarations (untested) - - - - - ceb99797 by David Waern at 2008-07-02T18:24:06+00:00 Remove redundant check for summary when rendering data types - - - - - b36a58e0 by David Waern at 2008-07-02T22:01:38+00:00 More support for type families and associated types Now we just need to render the instances - - - - - 78784879 by David Waern at 2008-07-07T22:13:58+00:00 Remove filtering of instances We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later. - - - - - 3e758dad by David Waern at 2008-06-30T18:50:30+00:00 Run haddock in-place during testing - - - - - d9dab0ce by David Waern at 2008-07-08T21:04:32+00:00 Remove index.html and doc-index.html from output, they should not be versioned - - - - - 3e6c4681 by David Waern at 2008-07-08T21:06:42+00:00 Update test output following change to instance filtering - - - - - e34a3f14 by David Waern at 2008-07-12T16:48:28+00:00 Stop using the map from exported names to declarations During creation of the interface, we were using two maps: one from exported names to declarations, and one from all defined names in the module to declarations. The first contained subordinate names while the second one didn't. The first map was never used to look up names not defined in the associated module, so if we add subordinate names to the second map, we could use it everywhere. That's that this patch does. This simplifies code because we don't have to pass around two maps everywhere. We now store the map from locally defined things in the interface structure instead of the one from exported names. - - - - - 2e1d2766 by David Waern at 2008-07-12T16:55:21+00:00 Get the all locally defined names from GHC API We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API. - - - - - bf637994 by David Waern at 2008-07-13T13:09:16+00:00 Refactoring in H.Interface.Create We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names). - - - - - 547e410e by David Waern at 2008-07-13T13:34:51+00:00 Remove FastString import and FSLIT macro in H.I.Create -- they were unused - - - - - 693759d1 by David Waern at 2008-07-13T13:36:23+00:00 Remove unused import from H.I.Create - - - - - cde6e7fb by David Waern at 2008-07-13T13:51:54+00:00 Small touches - - - - - 96de8f1d by David Waern at 2008-07-20T11:21:46+00:00 Preparation for rendering instances as separate declarations We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet. - - - - - b0f824fb by David Waern at 2008-07-20T15:53:08+00:00 Follow changes to ExportDecl in Hoogle - - - - - 1192eff3 by Neil Mitchell at 2008-06-26T00:28:10+00:00 Change how the Hoogle backend outputs classes, adding the context in - - - - - 7a0d1464 by Neil Mitchell at 2008-06-26T00:28:46+00:00 Remove the indent utility function from Hoogle backend - - - - - 3361241b by Neil Mitchell at 2008-06-26T09:45:09+00:00 Add support for Hoogle writing ForeignImport/ForeignExport properly - - - - - 795ad3bf by Neil Mitchell at 2008-06-26T12:15:25+00:00 Flesh out the Hoogle code to render documentation - - - - - 23277995 by Neil Mitchell at 2008-06-26T14:56:41+00:00 Fix a bug in the Hoogle backend, unordered lists were being written out <ul>...</u> - - - - - db739b27 by Neil Mitchell at 2008-06-26T15:09:54+00:00 Remove any white space around a <li> element - - - - - f2e6bb8c by Neil Mitchell at 2008-07-10T15:30:47+00:00 Remove the TODO in the Hoogle HTML generation, was already done - - - - - 693ec9a3 by Neil Mitchell at 2008-07-10T15:53:00+00:00 Put brackets round operators in more places in the Hoogle output - - - - - 842313aa by Neil Mitchell at 2008-07-10T16:01:25+00:00 Print type signatures with brackets around the name - - - - - cf93deb0 by David Waern at 2008-07-20T17:04:22+00:00 Bump version number to 2.2.0 - - - - - 30e6a8d1 by David Waern at 2008-07-20T17:04:41+00:00 Resolve conflicts in H.B.Hoogle - - - - - 1f0071c9 by David Waern at 2008-07-23T23:05:01+00:00 Add "all" command to runtests.hs that runs all tests despite failures - - - - - f2723023 by David Waern at 2008-07-23T23:08:39+00:00 Update tests/README - - - - - c0304a11 by David Waern at 2008-07-23T23:21:15+00:00 Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. - - - - - 88a5fe71 by David Waern at 2008-07-23T23:54:16+00:00 Depend on the currently available ghc-paths versions only - - - - - 8738d97b by David Waern at 2008-07-24T10:50:44+00:00 FIX haskell/haddock#44: Propagate parenthesis level when printing documented types - - - - - 05339119 by David Waern at 2008-07-24T16:06:18+00:00 Drop unnecessary parenthesis in types, put in by the user We were putting in parenthesis were the user did. Let's remove this since it just clutters up the types. The types are readable anyway since we print parens around infix operators and do not rely on fixity levels. When doing this I discovered that we were relying on user parenthesis when printin types like (a `O` b) c. This patchs fixes this problem so that parenthesis are always inserted around an infix op application in case it is applied to further arguments, or if it's an arguments to a type constructor. Tests are updated. - - - - - b3a99828 by David Waern at 2008-07-24T10:19:43+00:00 Print parenthesis around non-atomic banged types Fixes half of haskell/haddock#44 - - - - - ab5238e0 by David Waern at 2008-07-24T22:07:49+00:00 Add a reference file for the TypeFamilies test - - - - - 1941cc11 by David Waern at 2008-07-25T17:15:53+00:00 Simplify definition of pretty and trace_ppr - - - - - e3bfa33c by David Waern at 2008-07-25T17:18:27+00:00 Warning messages Output a warning when filtering out data/type instances and associated types in instances. We don't show these in the documentation yet, and we need to let the user know. - - - - - 9b85fc89 by David Waern at 2008-07-25T17:45:40+00:00 Doc: Mention Hoogle in the Introduction - - - - - afb2dd60 by David Waern at 2008-07-25T17:49:00+00:00 Doc: update -B description - - - - - 584c0c91 by David Waern at 2008-07-25T18:11:38+00:00 Doc: describe -w flag - - - - - 77619c24 by David Waern at 2008-07-28T12:29:07+00:00 Remove TODO from cabal file - - - - - 96717d5f by David Waern at 2008-07-28T12:29:27+00:00 Support type equality predicates - - - - - c2fd2330 by David Waern at 2008-07-29T19:45:14+00:00 Move unL from H.B.Hoogle to H.GHC.Utils I like Neil's shorter unL better than unLoc from the GHC API. - - - - - c4c3bf6a by David Waern at 2008-07-29T19:47:36+00:00 Do not export ATs when not in list of subitems - - - - - bf9a7b85 by David Waern at 2008-08-03T11:42:59+00:00 Filter out ForeignExports - - - - - df59fcb0 by David Waern at 2008-08-03T14:02:51+00:00 Filter out more declarations The previous refactorings in H.I.Create introduced a few bugs. Filtering of some types of declarations that we don't handle was removed. This patch fixes this. - - - - - 2f8a958b by David Waern at 2008-08-03T15:24:07+00:00 Move reL to H.GHC.Utils so we can use it everywhere - - - - - 8ec15efd by David Waern at 2008-08-03T15:25:00+00:00 Use isVanillaLSig from GHC API instead of home brewn function - - - - - 300f93a2 by David Waern at 2008-08-03T15:25:27+00:00 Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. - - - - - 8776d1ec by David Waern at 2008-08-03T16:21:21+00:00 Filter out more declarations and keep only vanilla type sigs in classes - - - - - ea07eada by David Waern at 2008-08-03T16:48:00+00:00 Fix layout - - - - - dd5e8199 by David Waern at 2008-08-03T16:50:52+00:00 Move some utility functions from H.I.Create to H.GHC.Utils - - - - - 4a1dbd72 by David Waern at 2008-08-03T17:39:55+00:00 Do not filter out doc declarations - - - - - 0bc8dca4 by David Waern at 2008-08-03T17:47:26+00:00 Filter out separately exported ATs (take two) - - - - - af970fe8 by David Waern at 2008-08-03T22:39:17+00:00 Update CHANGES - - - - - 5436ad24 by David Waern at 2008-08-03T22:40:20+00:00 Bump version number to 2.2.1 - - - - - d66de448 by David Waern at 2008-08-05T19:00:32+00:00 Remove version restriction on ghc-paths - - - - - 534b1364 by David Waern at 2008-08-05T19:04:35+00:00 Bump version to 2.2.2 and update CHANGES - - - - - 549188ff by David Waern at 2008-08-05T19:16:49+00:00 Fix CHANGES - - - - - 0d156bb4 by Luke Plant at 2008-08-11T15:20:59+00:00 invoking haddock clarification and help - - - - - 748295cc by David Waern at 2008-08-11T18:56:37+00:00 Doc: say that the --hoogle option is functional - - - - - 43301db4 by David Waern at 2008-08-05T19:26:08+00:00 Change ghc version dependency to >= 6.8.2 - - - - - 3e5a53b6 by David Waern at 2008-08-10T22:42:05+00:00 Make H.GHC.Utils build with GHC HEAD - - - - - 7568ace0 by David Waern at 2008-08-11T19:41:54+00:00 Import Control.OldException instead of C.Exception when using ghc >= 6.9 We should really test for base version instead, but I don't currently know which version to test for. - - - - - b71ae991 by David Waern at 2008-08-12T22:40:39+00:00 Make our .haddock file version number depend on the GHC version We need to do this, since our .haddock format can potentially change whenever GHC's version changes (even when only the patchlevel changes). - - - - - 6307ce3f by David Waern at 2008-08-12T22:49:57+00:00 Remove matching on NoteTy in AttachInstances, it has been removed - - - - - 2dbcfd5f by David Waern at 2008-08-12T23:02:02+00:00 Comment out H.GHC.loadPackages - it is unused and doesn't build with ghc >= 6.9 - - - - - c74db5c2 by David Waern at 2008-08-12T23:03:58+00:00 Hide <.> from GHC import in Hoogle only for ghc <= 6.8.3 - - - - - 69a44ebb by David Waern at 2008-08-12T23:11:12+00:00 Follow changes to parseDynamic/StaticFlags - - - - - 5881f3f0 by David Waern at 2008-08-13T21:43:58+00:00 Add __GHC_PATCHLEVEL__ symbol also when building the library - - - - - 8574dc11 by David Waern at 2008-08-13T21:44:17+00:00 Follow move of package string functions from PackageConfig to Module - - - - - c9baa77f by David Waern at 2008-08-13T21:45:29+00:00 Follow extensible exceptions changes - - - - - 9092de15 by David Waern at 2008-08-13T21:46:20+00:00 Update test following Haddock version change - - - - - ebe569a4 by David Waern at 2008-08-13T21:46:54+00:00 Follow changes to parseDynamic- parseStaticFlags in GHC - - - - - b8a5ffd3 by David Waern at 2008-08-13T21:47:36+00:00 Follow changes to Binary in GHC 6.9 - - - - - edfda1cc by David Waern at 2008-08-13T21:50:17+00:00 Change ghc version dependency to >= 6.8.2 && <= 6.9 - - - - - d59be1cf by Neil Mitchell at 2008-08-12T16:02:53+00:00 Output all items, even if they are not defined in this module - ensures map comes from Prelude, not just GHC.Base - - - - - dda93b9f by Neil Mitchell at 2008-08-12T21:37:32+00:00 Add support for type synonyms to Hoogle, was accidentally missing before (woops!) - - - - - b6ee795c by Neil Mitchell at 2008-08-13T14:03:24+00:00 Generalise Hoogle.doc and add a docWith - - - - - 415e1bb2 by Neil Mitchell at 2008-08-13T14:03:46+00:00 Make Hoogle add documentation to a package - - - - - 790a1202 by Neil Mitchell at 2008-08-18T12:52:43+00:00 Use the same method to put out signatures as class methods in the Hoogle backend - - - - - ded37eba by Neil Mitchell at 2008-08-18T12:53:04+00:00 Remove Explicit top-level forall's when pretty-printing signatures - - - - - 6468c722 by Neil Mitchell at 2008-08-20T07:59:13+00:00 Simplify the code by removing not-to-important use of <.> in the Hoogle back end - - - - - 788c3a8b by Neil Mitchell at 2008-08-21T18:20:24+00:00 In the hoogle back end, markup definition lists using <i>, not <b> - - - - - 77d4b000 by Ian Lynagh at 2008-08-14T10:49:14+00:00 Add a Makefile for GHC's build system. Still won't work yet, but we're closer - - - - - 920440d7 by Ian Lynagh at 2008-08-27T18:06:46+00:00 Add haddock.wrapper - - - - - bcda925f by Ian Lynagh at 2008-08-27T18:07:02+00:00 Add a manual Cabal flag to control the ghc-paths dependency - - - - - 04d194e2 by Ian Lynagh at 2008-08-27T20:41:27+00:00 Update extensions in Cabal file Use ScopedTypeVariables instead of PatternSignatures - - - - - 12480043 by Ian Lynagh at 2008-08-27T20:41:55+00:00 Increase the upper bound on the GHC version number - - - - - b1f809a5 by Ian Lynagh at 2008-08-27T21:32:22+00:00 Fix some warnings - - - - - aea0453d by Ian Lynagh at 2008-08-28T14:22:29+00:00 Fixes for using haddock in a GHC build tree - - - - - ad23bf86 by Ian Lynagh at 2008-08-28T21:14:27+00:00 Don't use Cabal wrappers on Windows - - - - - 35858e4c by Ian Lynagh at 2008-08-29T00:07:42+00:00 Fix in-tree haddock on Windows - - - - - c2642066 by Ian Lynagh at 2008-09-03T22:35:53+00:00 follow library changes - - - - - 2eb55d50 by Ian Lynagh at 2008-09-07T18:52:51+00:00 bindist fixes - - - - - 3daa5b59 by Ian Lynagh at 2008-09-10T16:58:18+00:00 We need to tell haddock that its datasubdir is . or it can't find package.conf - - - - - 388fd8c2 by Ian Lynagh at 2008-09-10T19:47:44+00:00 Fix haddock inplace on Windows - - - - - 70a641c1 by Ian Lynagh at 2008-09-10T22:15:44+00:00 Fix installed haddock on Windows - - - - - 83c1e997 by Neil Mitchell at 2008-09-11T10:48:55+00:00 Import GHC.Paths if not IN_GHC_TREE, seems to match the use of GHC.Paths functions much better - - - - - b452519b by Ian Lynagh at 2008-09-12T12:58:24+00:00 Add a LANGUAGE ForeignFunctionInterface pragma - - - - - afbd592c by Ian Lynagh at 2008-09-12T12:59:13+00:00 Wibble imports - - - - - 547ac4ad by Ian Lynagh at 2008-09-14T15:34:22+00:00 Add a "#!/bin/sh" to haddock.wrapper - - - - - f207a807 by Ian Lynagh at 2008-09-15T10:02:32+00:00 Use "exec" when calling haddock in the wrapper - - - - - 2ee68509 by Thomas Schilling at 2008-09-15T09:09:16+00:00 Port Haddock.Interface to new GHC API. This required one bigger change: 'readInterfaceFile' used to take an optional 'Session' argument. This was used to optionally update the name cache of an existing GHC session. This does not work with the new GHC API, because an active session requires the function to return a 'GhcMonad' action, but this is not possible if no session is provided. The solution is to use an argument of functions for reading and updating the name cache and to make the function work for any monad that embeds IO, so it's result type can adapt to the calling context. While refactoring, I tried to make the code a little more self-documenting, mostly turning comments into function names. - - - - - 3bb96431 by Thomas Schilling at 2008-09-15T09:09:37+00:00 Reflect GHC API changes. - - - - - 2e60f714 by Thomas Schilling at 2008-09-15T09:10:37+00:00 Port Haddock.GHC.Typecheck to new GHC API. - - - - - 9cfd4cff by Thomas Schilling at 2008-09-15T09:11:00+00:00 Port Haddock.GHC to new GHC API. - - - - - caffa003 by Thomas Schilling at 2008-09-15T09:11:25+00:00 Port Main to new GHC API. - - - - - 069a4608 by Ian Lynagh at 2008-09-21T11:19:00+00:00 Fix paths used on Windows frmo a GHC tree: There is no whare directory - - - - - 7ceee1f7 by Ian Lynagh at 2008-09-21T12:20:16+00:00 Fix the in-tree haddock on Windows - - - - - 0d486514 by Ian Lynagh at 2008-09-23T18:06:58+00:00 Increase the GHC upper bound from 6.11 to 6.13 - - - - - f092c414 by Neil Mitchell at 2008-09-11T14:56:07+00:00 Do not wrap __ in brackets - - - - - 036bdd13 by Ian Lynagh at 2008-09-28T01:42:35+00:00 Fix building haddock when GhcProfiled=YES - - - - - 01434a89 by David Waern at 2008-09-24T20:24:21+00:00 Add PatternSignatures LANGUAGE pragma to Main and Utils - - - - - 1671a750 by David Waern at 2008-10-02T22:57:25+00:00 For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). - - - - - a25dde99 by David Waern at 2008-10-02T22:59:57+00:00 Remove ifaceEnv from Interface - it's no longer used - - - - - 610993da by David Waern at 2008-10-02T23:04:58+00:00 Write a comment about source links for type instance declarations - - - - - 5a96b5d5 by Thomas Schilling at 2008-10-03T10:45:08+00:00 Follow GHC API change of parseModule. - - - - - 5a943ae5 by Ian Lynagh at 2008-10-03T15:56:58+00:00 TAG 2008-10-03 - - - - - 76cdd6ae by Thomas Schilling at 2008-10-08T12:29:50+00:00 Only load modules once when typechecking with GHC. This still doesn't fix the memory leak since the typechecked source is retained and then processed separately. To fix the leak, modules must be processed directly after typechecking. - - - - - 7074d251 by David Waern at 2008-10-09T23:53:54+00:00 Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. - - - - - 4b9b2b2d by David Waern at 2008-10-09T23:54:49+00:00 Add some strictness annotations in Interface We add some strictness annotations to the fields of Interface, so that less GHC data is hold on to during processing. - - - - - 22035628 by David Waern at 2008-10-10T20:02:31+00:00 Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck - - - - - be637ad3 by David Waern at 2008-10-10T20:33:38+00:00 Make Haddock build with GHC 6.8.2 - - - - - 523b3404 by David Waern at 2008-10-10T21:08:09+00:00 Fix documentation for createInterfaces - - - - - e1556702 by David Waern at 2008-10-10T21:26:19+00:00 Hide H.Utils in library - - - - - a8e751c3 by David Waern at 2008-10-10T21:34:59+00:00 Add back .haddock file versioning based on GHC version It was accidentally removed in the patch for GHC 6.8.2 compatibility - - - - - 06fb3c01 by David Waern at 2008-10-10T21:47:15+00:00 Bump version number to 2.3.0 - - - - - ff087fce by David Waern at 2008-10-10T22:35:49+00:00 Add support for DocPic The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix! - - - - - 3af85bf6 by David Waern at 2008-10-10T23:34:05+00:00 Update tests - - - - - 0966873c by Simon Marlow at 2008-10-10T14:43:04+00:00 no need for handleErrMsg now, we don't throw any ErrMsgs - - - - - f1870de3 by Clemens Fruhwirth at 2008-10-10T13:29:36+00:00 Compile with wrapper but remove it for dist-install - - - - - 7b440dc2 by David Waern at 2008-10-11T14:02:25+00:00 Remove interface from LinksInfo It was there to know the documentation home module when creating a wiki link, but we already know this since we have the DocName. - - - - - e5729e6a by David Waern at 2008-10-15T20:49:18+00:00 Wibble - - - - - b2a8e01a by David Waern at 2008-10-15T21:03:36+00:00 Use type synonyms for declarations and docs in H.I.Create - - - - - be71a15b by David Waern at 2008-10-15T21:12:17+00:00 Comment out unused type family stuff completely - - - - - 91aaf075 by David Waern at 2008-10-15T21:49:04+00:00 Wibble - - - - - 42ba4eb4 by David Waern at 2008-10-15T21:53:53+00:00 Move convenient type synonym to H.Types - - - - - db11b723 by David Waern at 2008-10-15T22:14:07+00:00 Add DeclInfo to H.Types - - - - - 193552b6 by David Waern at 2008-10-15T22:15:01+00:00 Add subordinates with docs to the declaration map The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate. - - - - - 31e6eebc by David Waern at 2008-10-16T17:18:47+00:00 Wibble - - - - - 0dcbd79f by David Waern at 2008-10-16T20:58:42+00:00 Fix haskell/haddock#61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. - - - - - de47f20a by David Waern at 2008-10-16T22:06:35+00:00 Document function and improve its layout - - - - - e74e625a by Thomas Schilling at 2008-10-20T11:12:57+00:00 Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). - - - - - b63ac9a1 by David Waern at 2008-10-20T20:25:50+00:00 Make renamer consistent Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name). - - - - - f6de0bb0 by Ian Lynagh at 2008-09-19T00:54:43+00:00 TAG GHC 6.10 fork - - - - - 74599cd0 by David Waern at 2008-10-20T21:13:24+00:00 Do not save hidden modules in the .haddock file We were saving interfaces of all processed modules including those hidden using {-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links when generating the index for the libraries that come with GHC. This patch excludes modules with hidden documentation when writing .haddock files. It should fix the above problem. - - - - - 7b6742e9 by David Waern at 2008-10-21T19:54:52+00:00 Do not save hidden modules in the .haddock file (also for ghc >= 6.9) When writing the first patch, I forgot to do the fix in both branches of an #if macro. - - - - - b99b1951 by David Waern at 2008-10-22T20:04:18+00:00 Remove subordinate map and its usage It is not needed now that we store subordinate names in the DeclInfo map. - - - - - da97cddc by David Waern at 2008-10-22T20:11:46+00:00 Tidy up code in H.I.Create a little Remove commented out half-done type instance support, and remove DeclWithDoc synonym. - - - - - 6afa76f3 by David Waern at 2008-10-22T21:17:29+00:00 Fix warnings in H.GHC.Utils - - - - - 171ea1e8 by David Waern at 2008-10-22T21:35:04+00:00 Fix warnings in H.Utils - - - - - c8cb3b91 by David Waern at 2008-10-22T21:36:49+00:00 Wibble - - - - - 767fa06a by David Waern at 2008-10-27T19:59:04+00:00 Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. - - - - - e638bbc6 by David Waern at 2008-11-02T22:21:10+00:00 Add HCAR entry - - - - - 92b4ffcf by David Waern at 2008-11-02T22:44:19+00:00 Update CHANGES - - - - - 84d4da6e by David Waern at 2008-11-03T11:25:04+00:00 Add failing test for template haskell crash - - - - - 2a9cd2b1 by David Waern at 2008-11-04T21:13:44+00:00 Add tests/TH.hs - - - - - 8a59348e by David Waern at 2008-11-04T21:30:26+00:00 TAG 2.3.0 - - - - - 54f70d31 by Thomas Schilling at 2008-10-24T17:04:08+00:00 Enable framed view of the HTML documentation. This patch introduces: - A page that displays the documentation in a framed view. The left side will show a full module index. Clicking a module name will show it in the right frame. If Javascript is enabled, the left side is split again to show the modules at the top and a very short synopsis for the module currently displayed on the right. - Code to generate the mini-synopsis for each module and the mini module index ("index-frames.html"). - CSS rules for the mini-synopsis. - A very small amount of javascript to update the mini-synopsis (but only if inside a frame.) Some perhaps controversial things: - Sharing code was very difficult, so there is a small amount of code duplication. - The amount of generated pages has been doubled, since every module now also gets a mini-synopsis. The overhead should not be too much, but I haven't checked. Alternatively, the mini-synopsis could also be generated using Javascript if we properly annotate the actual synopsis. - - - - - 5d7ea5a6 by David Waern at 2008-11-04T23:20:17+00:00 Follow change to ExportDecl in frames code - - - - - 60e16308 by David Waern at 2008-11-04T23:35:26+00:00 Update CHANGES - - - - - d63fd26d by David Waern at 2008-11-04T23:37:43+00:00 Bump version number - - - - - c1660c39 by David Waern at 2008-11-04T23:44:46+00:00 Update CHANGES - - - - - 995ab384 by David Waern at 2008-11-04T23:55:21+00:00 Remove .ref files from tests/output/ - - - - - 1abbbe75 by David Waern at 2008-11-04T23:57:41+00:00 Output version info before running tests - - - - - 649b182f by David Waern at 2008-11-05T22:45:37+00:00 Add ANNOUNCE message - - - - - c36ae0bb by David Waern at 2008-11-05T23:15:35+00:00 Update ANNOUNCE - - - - - 9c4f3d40 by David Waern at 2008-11-05T23:18:30+00:00 Wibble - - - - - 5aac87ce by David Waern at 2008-11-06T21:07:48+00:00 Depend on base 4.* when using GHC >= 6.9, otherwise 3.* - - - - - b9796a74 by David Waern at 2008-11-06T21:13:40+00:00 Bump version to 2.4.1 and update CHANGES - - - - - d4b26baa by David Waern at 2008-11-06T21:26:33+00:00 Depend on base 4.0.* instead of 4.* - - - - - 2cb0903c by David Waern at 2008-11-06T21:46:53+00:00 Fix warnings in H.B.HH and H.B.HH2 - - - - - e568e89a by David Waern at 2008-11-06T21:47:12+00:00 Fix warnings in Haddock.ModuleTree - - - - - 9dc14fbd by David Waern at 2008-11-06T21:47:52+00:00 Fix warnings in Haddock.Version - - - - - 02ac197c by David Waern at 2008-11-06T21:51:31+00:00 Fix warnings in H.InterfaceFile and H.Options - - - - - 63e7439a by David Waern at 2008-11-06T21:59:45+00:00 Fix warnings in H.GHC.Typecheck - - - - - 4bca5b68 by David Waern at 2008-11-08T13:43:42+00:00 Set HscTarget to HscNothing instead of HscAsm There used to be a bug in the GHC API that prevented us from setting this value. - - - - - 07357aec by David Waern at 2008-11-09T22:27:00+00:00 Re-export NameCache and friends from Distribution.Haddock - - - - - ea554b5a by David Waern at 2008-11-09T23:14:10+00:00 Add Haddock.GHC.Utils to other-modules in library - - - - - 74aecfd7 by David Waern at 2008-11-10T01:18:57+00:00 Export DocName in the library - - - - - 241a58b3 by David Waern at 2008-11-10T01:19:18+00:00 Document the functions in H.DocName - - - - - edc2ef1b by David Waern at 2008-11-10T01:20:52+00:00 Export H.DocName in the library - - - - - 4f588d55 by David Waern at 2008-11-10T01:29:14+00:00 Make DocName an instance of NamedThing - - - - - b4647244 by David Waern at 2008-11-15T22:58:18+00:00 Reflect version bump in test suite - - - - - 4bee8ce2 by David Waern at 2008-11-15T22:58:45+00:00 Update tests For unknown reasons, test output for Bug1 and Test has changed for the better. - - - - - 1690e2f9 by David Waern at 2008-11-15T22:59:33+00:00 Store hidden modules in .haddock files We store documentation for an entity in the 'InstalledInterface' of the definition site module, and never in the same structure for a module which re-exports the entity. So when a client of the Haddock library wants to look up some documentation, he/she might need to access a hidden module. But we currently don't store hidden modules in the .haddock files. So we add the hidden modules and the Haddock options to the .haddock files. The options will be used to filter the module list to obtain the visible modules only, which is necessary for generating the contents and index for installed packages. - - - - - 8add6435 by David Waern at 2008-11-16T14:35:50+00:00 Bump major version number due to .haddock file format change - - - - - 48bfcf82 by David Waern at 2008-11-23T14:32:52+00:00 Update tests to account for version number bump - - - - - 0bbd1738 by David Waern at 2008-11-23T14:33:31+00:00 HADDOCK_DATA_DIR changed to haddock_datadir - - - - - 5088b78c by David Waern at 2008-11-23T17:13:21+00:00 FIX haskell/haddock#45: generate two anchors for each name We generate two anchor tags for each name, one where we don't escape the name and one where we URI-encode it. This is for compatibility between IE and Opera. Test output is updated. - - - - - 5ee5ca3b by Neil Mitchell at 2008-11-27T14:38:11+00:00 Drop HsDocTy annotations, they mess up pretty printing and also have a bracketing bug (#2584) - - - - - 51c014e9 by Roman Cheplyaka at 2008-11-27T22:27:36+00:00 Allow referring to a specific section within a module in a module link Fixes haskell/haddock#65 - - - - - 4094bdc5 by David Waern at 2008-11-28T21:13:33+00:00 Update tests following anchor change - - - - - f89552dd by Thomas Schilling at 2008-11-29T16:16:20+00:00 Haddock really shouldn't try to overwrite files. - - - - - 98127499 by David Waern at 2008-12-07T14:09:15+00:00 Solve conflict - - - - - 319356c5 by David Waern at 2008-10-22T21:16:55+00:00 Add -Wall -Werror to ghc-options - - - - - 3c4968c9 by David Waern at 2008-11-04T23:38:56+00:00 TAG 2.4.0 - - - - - 4b21e003 by David Waern at 2008-11-06T21:14:04+00:00 TAG 2.4.1 - - - - - 8e0cad5c by David Waern at 2008-12-07T14:12:54+00:00 Remove -Werror - - - - - 299d6deb by David Waern at 2008-12-07T14:25:18+00:00 Remove -Wall, we'll focus on warnings after 6.10.2 is out - - - - - 5f4216b6 by David Waern at 2008-12-07T20:58:05+00:00 Resolve conflict properly - - - - - 67d774e7 by Neil Mitchell at 2008-12-15T11:44:26+00:00 Make forall's in constructors explicit, i.e. data Foo = Foo {foo :: Eq a => a} - - - - - 61851792 by Neil Mitchell at 2008-12-18T15:39:39+00:00 Try and find a better package name than "main" for Hoogle, goes wrong when working on an executable rather than a library - - - - - 2fab8554 by David Waern at 2008-12-08T23:19:48+00:00 Make visible names from ExportItems Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment. - - - - - 7caadd8c by Ian Lynagh at 2008-12-11T17:01:04+00:00 Wrap the GHC usage with defaultCleanupHandler This fixes a bug where haddock leaves /tmp/ghc* directories uncleaned. - - - - - 7c9fc9a5 by David Waern at 2009-01-02T21:38:27+00:00 Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. - - - - - 119e4e05 by David Waern at 2009-01-06T23:34:17+00:00 Do not process boot modules We should of course not try to produce documentation for boot modules! The reason this has worked in the past is that the output of "real" modules overwrites the output of boot modules later in the process. However, this causes a subtle link environment problem. So let's get rid of this stupid behaviour. We avoid processing boot modules, but we continue to typecheck them. - - - - - c285b9d2 by David Waern at 2009-01-08T18:03:36+00:00 Export modules also when coming from external packages This seems to have regressed since a refactoring that was part of the 2.3.0 release. - - - - - 24031c17 by David Waern at 2009-01-10T15:26:26+00:00 Change version to 2.4.2 - no need to go to 2.5.0 - - - - - 864d1c3f by David Waern at 2009-01-10T15:35:20+00:00 Update tests to account for version number change - - - - - 524ba886 by David Waern at 2009-01-10T18:29:17+00:00 Add test for Template Haskell splicing - - - - - 05e6e003 by David Waern at 2009-01-10T19:35:42+00:00 Fix Trac haskell/haddock#68: Turn on compilation via C for Template Haskell packages We can't use HscNothing if we need to run code coming from modules inside the processed package during typechecking, which is the case for some packages using Template Haskell. This could be improved, to e.g. use HscInterpreted and HscNothing where possible, instead of using HscC for all modules in the package. - - - - - 2b2bafa1 by David Waern at 2009-01-10T20:22:25+00:00 Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above - - - - - bedc3a93 by Ian Lynagh at 2009-01-11T14:58:41+00:00 Fix the location of INPLACE_PKG_CONF; fixes the build Spotted by Conal Elliott - - - - - 943107c8 by David Waern at 2009-01-20T19:27:39+00:00 Document H.I.Create.collectDocs better - - - - - c6252e37 by David Waern at 2009-01-20T19:29:51+00:00 Fix Trac haskell/haddock#59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). - - - - - 3568a6af by David Waern at 2009-01-21T21:41:48+00:00 Do not indicate that a constructor argument is unboxed We only show the strictness annotation for an unboxed constructor argument. The fact that it is unboxed is an implementation detail and should not be part of the module interface. - - - - - 562a4523 by David Waern at 2009-01-22T18:53:49+00:00 Fix Trac haskell/haddock#50: do not attach docs to pragmas or other kinds of non-declarations We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations. - - - - - 6fdf21c2 by David Waern at 2009-01-22T19:48:09+00:00 Add test for quasi quotation. No reference output yet. - - - - - dc4100fd by David Waern at 2009-01-22T19:57:47+00:00 Improve quasi-quotation test and add reference output - - - - - 908b74bb by David Waern at 2009-01-23T23:22:03+00:00 Filter out separately exported associated types in a smarter way - - - - - f6b42ecb by David Waern at 2009-01-24T16:54:39+00:00 Correct spelling mistake in error message - - - - - 24e4245d by David Waern at 2009-01-24T17:48:03+00:00 Correct comment - - - - - b5e8462f by David Waern at 2009-02-07T13:22:29+00:00 Do not show a subordinate at the top level if its parent is also exported See note in the source code for more info. - - - - - 4b09de57 by David Waern at 2009-02-07T13:53:53+00:00 Update test following change to top level subordinates - - - - - 76379896 by David Waern at 2009-02-07T13:58:04+00:00 Remove html files in the tests/output/ directory which have been accidentally added - - - - - 1a6d8b10 by Joachim Breitner at 2009-02-20T10:29:43+00:00 Typo in comment - - - - - fec367d0 by David Waern at 2009-02-24T20:21:17+00:00 Fix small bug The rule is to prefer type constructors to other things when an identifier in a doc string can refer to multiple things. This stopped working with newer GHC versions (due to a tiny change in the GHC renamer). We implement this rule in the HTML backend for now, instead of fixing it in GHC, since we will move renaming of doc strings to Haddock in the future anyway. - - - - - 9b4172eb by David Waern at 2009-02-25T20:04:38+00:00 Fix bad error handling with newer GHCs When support for GHC 6.10 was added, an error handler was installed only around the typechecking phase. This had the effect that errors thrown during dependency chasing were caught in the top-level exception handler and not printed with enough detail. With this patch we wrap the error handler around all our usage of the Ghc monad. - - - - - de2df363 by Simon Peyton Jones at 2009-02-02T16:47:42+00:00 Hide funTyConName, now exported by TypeRep - - - - - 4d40a29f by Ian Lynagh at 2009-02-12T18:57:49+00:00 Don't build the library when building in the GHC tree - - - - - 1cd0abe4 by Ian Lynagh at 2009-02-13T13:58:53+00:00 Add a ghc.mk - - - - - 3d814eeb by Ian Lynagh at 2009-02-13T18:50:28+00:00 do .depend generation for haddock with the stage1 compiler This is a bit of a hack. We mkdepend with stage1 as if .depend depends on the stage2 compiler then make goes wrong: haddock's .depend gets included, which means that make won't reload until it's built, but we can't build it without the stage2 compiler. We therefore build the stage2 compiler before its .depend file is available, and so compilation fails. - - - - - b55036a4 by Ian Lynagh at 2009-02-25T01:38:13+00:00 Give haddock a wrapper on unix in the new GHC build system - - - - - 9eabfe68 by Ian Lynagh at 2009-02-25T19:21:32+00:00 Create inplace/lib/html in the new GHC build system - - - - - 93af30c7 by Ian Lynagh at 2008-11-07T19:18:23+00:00 TAG GHC 6.10.1 release - - - - - 06e6e34a by Thomas Schilling at 2009-02-24T18:11:00+00:00 Define __GHC_PATCHLEVEL__ for recent version of GHC (stable). - - - - - 680e6ed8 by Thomas Schilling at 2009-02-24T18:12:26+00:00 'needsTemplateHaskell' is not defined in current stable GHC. - - - - - 6c5619df by David Waern at 2009-02-25T22:15:23+00:00 Hide fynTyConName only for recent GHC versions - - - - - 6b2344f1 by Ian Lynagh at 2009-02-26T00:49:56+00:00 Add the module to one of haddocks warnings - - - - - e5d11c70 by David Waern at 2009-02-27T21:37:20+00:00 Bug fix We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates. - - - - - 10a79a60 by David Waern at 2009-02-27T22:08:08+00:00 Fix error message conflict The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now. - - - - - c5055c7f by David Waern at 2009-02-27T22:15:17+00:00 Shorten warning message - - - - - a72fed3a by David Waern at 2009-02-28T00:53:55+00:00 Do not show package name in warning message - - - - - a5daccb2 by Ian Lynagh at 2009-03-01T14:59:35+00:00 Install haddock in the new GHC build system - - - - - dfdb025c by Ian Lynagh at 2009-03-07T23:56:29+00:00 Relax base dependency to < 4.2, not < 4.1 - - - - - 5769c8b4 by David Waern at 2009-03-21T14:58:52+00:00 Bump .haddock file version number (due to change of format) - - - - - f1b8f67b by David Waern at 2009-03-21T14:59:26+00:00 Define __GHC_PATCHLEVEL__=1 when using ghc-6.10.1 - - - - - 23f78831 by David Waern at 2009-03-21T16:40:52+00:00 Update CHANGES - - - - - 7d2735e9 by David Waern at 2009-03-21T16:50:33+00:00 Update ANNOUNCE - - - - - 0771e00a by David Waern at 2009-03-21T16:54:40+00:00 Update ANNOUNCE, again - - - - - 81a6942a by David Waern at 2009-03-21T17:50:06+00:00 Don't be too verbose in CHANGES - - - - - 29861dcf by David Waern at 2009-03-21T18:03:31+00:00 TAG 2.4.2 - - - - - a585f285 by David Waern at 2009-03-21T19:20:29+00:00 Require Cabal >= 1.2.3 - - - - - 7c611662 by David Waern at 2009-03-21T19:21:48+00:00 TAG 2.4.2 with cabal-version >= 1.2.3 - - - - - 23b7deff by Simon Marlow at 2009-03-20T15:43:42+00:00 new GHC build system: use shell-wrappers macro - - - - - 25f8afe7 by Ian Lynagh at 2009-03-21T19:13:53+00:00 Fix (with a hack?) haddock in teh new build system - - - - - 6a29a37e by David Waern at 2009-03-24T22:10:15+00:00 Remove unnecessary LANGUAGE pragma - - - - - 954da57d by David Waern at 2009-03-24T22:21:23+00:00 Fix warnings in H.B.DevHelp - - - - - 1619f1df by David Waern at 2009-03-26T23:20:44+00:00 -Wall police in H.B.Html - - - - - b211e13b by Simon Marlow at 2009-03-24T13:00:56+00:00 install Haddock's html stuff - - - - - 78e0b107 by David Waern at 2008-12-07T19:58:53+00:00 Add verbosity flag and utils, remove "verbose" flag - - - - - 913dae06 by David Waern at 2008-12-07T20:01:05+00:00 Add some basic "verbose" mode logging in H.Interface - - - - - 1cbff3bf by David Waern at 2009-03-27T00:07:26+00:00 Fix conflicts - - - - - 22f82032 by David Waern at 2009-03-27T21:15:11+00:00 Remove H.GHC.Typecheck - - - - - 81557804 by David Waern at 2009-03-27T21:19:22+00:00 Remove docNameOrig and use getName everywhere instead - - - - - d8267213 by David Waern at 2009-03-27T21:21:46+00:00 Use docNameOcc instead of nameOccName . getName - - - - - 5d55deab by David Waern at 2009-03-27T21:33:04+00:00 Remove H.DocName and put DocName in H.Types - - - - - 8ba72611 by David Waern at 2009-03-27T22:06:26+00:00 Document DocName - - - - - 605f8ca5 by David Waern at 2009-03-27T22:45:21+00:00 -Wall police - - - - - e4da93ae by David Waern at 2009-03-27T23:12:53+00:00 -Wall police in H.B.Hoogle - - - - - bb255519 by David Waern at 2009-03-27T23:41:28+00:00 Define Foldable and Traversable instances for Located - - - - - f1195cfe by David Waern at 2009-03-27T23:51:34+00:00 Wibble - - - - - 23818d7c by David Waern at 2009-03-28T00:03:55+00:00 -Wall police in H.I.Rename - - - - - 0f050d67 by David Waern at 2009-03-28T00:15:15+00:00 -Wall police in H.I.AttachInstances - - - - - 0f3fe038 by David Waern at 2009-03-28T21:09:41+00:00 Wibble - - - - - 275d4865 by David Waern at 2009-03-28T21:27:06+00:00 Layout fix - - - - - 54ff0ef8 by David Waern at 2009-03-28T21:59:07+00:00 -Wall police in H.I.Create - - - - - 7f58b117 by David Waern at 2009-03-28T22:10:19+00:00 -Wall police in H.Interface - - - - - f0c03b44 by David Waern at 2009-03-28T22:22:59+00:00 -Wall police in Main - - - - - 29da355c by David Waern at 2009-03-28T22:23:39+00:00 Turn on -Wall -Werror - - - - - 446d3060 by David Waern at 2009-04-01T20:40:30+00:00 hlint police - - - - - 3867c9fc by David Waern at 2009-04-01T20:48:42+00:00 hlint police - - - - - bd1f1600 by David Waern at 2009-04-01T20:58:02+00:00 hlint police - - - - - e0e90866 by David Waern at 2009-04-05T12:42:53+00:00 Move H.GHC.Utils to H.GhcUtils - - - - - 9cbd426b by David Waern at 2009-04-05T12:57:21+00:00 Remove Haddock.GHC and move its (small) contents to Main - - - - - b5c2cbfd by David Waern at 2009-04-05T13:07:04+00:00 Fix whitespace and stylistic issues in Main - - - - - 3c04aa56 by porges at 2008-12-07T08:22:19+00:00 add unicode output - - - - - 607918da by David Waern at 2009-04-26T15:09:43+00:00 Resolve conflict - - - - - 4bec6b6b by Simon Marlow at 2009-05-13T10:00:31+00:00 fix markup - - - - - 436ad6f4 by Simon Marlow at 2009-03-23T11:54:45+00:00 clean up - - - - - bdcd1398 by Simon Marlow at 2009-03-24T10:36:45+00:00 new GHC build system: add $(exeext) - - - - - 9c0972f3 by Simon Marlow at 2009-03-24T11:04:31+00:00 update for new GHC build system layout - - - - - d0f3f83a by Ian Lynagh at 2009-03-29T15:31:43+00:00 GHC new build system fixes - - - - - 5a8245c2 by Ian Lynagh at 2009-04-04T20:44:23+00:00 Tweak new build system - - - - - 9c6f2d7b by Simon Marlow at 2009-05-13T10:01:27+00:00 add build instructions for GHC - - - - - 66d07c76 by Ian Lynagh at 2009-05-31T00:37:53+00:00 Quote program paths in ghc.mk - - - - - bb7de2cd by Ian Lynagh at 2009-06-03T22:57:55+00:00 Use a bang pattern on an unlifted binding - - - - - 3ad283fc by Ian Lynagh at 2009-06-13T16:17:50+00:00 Include haddock in GHC bindists - - - - - ac447ff4 by David Waern at 2009-06-24T21:07:50+00:00 Delete Haddock.Exception and move contents to Haddock.Types Only a few lines of code that mainly declares a type - why not just put it in Haddock.Types. - - - - - 4464fb9b by David Waern at 2009-06-24T22:23:23+00:00 Add Haddock module headers Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock at projects.haskell.org. Next step is to add a brief description to each module. - - - - - 5f4c95dd by David Waern at 2009-06-24T22:39:44+00:00 Fix spelling error - - - - - 6d074cdb by David Waern at 2009-06-25T21:53:56+00:00 Document Interface and InstalledInterface better - - - - - d0cbd183 by David Waern at 2009-06-27T12:46:46+00:00 Remove misplaced whitespace in H.I.Rename - - - - - fa381c49 by David Waern at 2009-06-27T13:26:03+00:00 Fix haskell/haddock#104 - create output directory if missing - - - - - 91fb77ae by Ian Lynagh at 2009-06-25T15:59:50+00:00 TAG 2009-06-25 - - - - - 0d853f40 by Simon Peyton Jones at 2009-07-02T15:35:22+00:00 Follow extra field in ConDecl - - - - - b201735d by Ian Lynagh at 2009-07-05T16:50:35+00:00 Update Makefile for the new GHC build system - - - - - df6c0092 by Ian Lynagh at 2009-07-05T17:01:13+00:00 Resolve conflicts - - - - - 1066870a by Ian Lynagh at 2009-07-05T17:01:48+00:00 Remove the -Wwarn hack in the GHC build system - - - - - 7e856076 by Ian Lynagh at 2009-07-05T17:17:59+00:00 Fix warnings - - - - - 5d4cd958 by Ian Lynagh at 2009-07-05T19:35:40+00:00 Bump version number Cabal needs to distinguish between haddocks having a --verbose and --verbosity flag - - - - - 6ee07c99 by David Waern at 2009-07-06T20:14:57+00:00 Wibble - - - - - 2308b66f by David Waern at 2009-07-06T20:24:20+00:00 Clearer printing of versions by runtests.hs - - - - - d4b5d9ab by David Waern at 2009-07-06T21:22:42+00:00 Fix (invisible) bug introduced by unicode patch - - - - - 2caca8d8 by David Waern at 2009-07-06T21:44:10+00:00 Use HscAsm instead of HscC when using TH - - - - - 18f3b755 by David Waern at 2009-07-06T22:10:22+00:00 Update HCAR entry (by Janis) - - - - - a72ac9db by David Waern at 2009-07-06T23:01:35+00:00 Follow HsRecTy change with an #if __GLASGOW_HASKEL__ >= 611 - - - - - 549135d2 by David Waern at 2009-07-06T23:11:41+00:00 Remove unused functions from Haddock.Utils - - - - - b450134a by Isaac Dupree at 2009-07-11T14:59:00+00:00 revert to split-index for large indices - remove the search-box, because browsers have search-for-text abilities anyway. - pick 150 items in index as the arbitrary time at which to split it - notice the bug that identifiers starting with non-ASCII characters won't be listed in split-index, but don't bother to fix it yet (see ticket haskell/haddock#116, http://trac.haskell.org/haddock/ticket/116 ) - - - - - 78a5661e by Isaac Dupree at 2009-07-20T15:37:18+00:00 Implement GADT records in HTML backend - - - - - 4e163555 by Isaac Dupree at 2009-07-21T22:03:25+00:00 add test for GADT records - - - - - 79aa4d6e by David Waern at 2009-07-23T20:40:37+00:00 Update test suite following version bump - - - - - 5932c011 by David Waern at 2009-08-02T10:25:39+00:00 Fix documentation bug - - - - - a6970fca by David Waern at 2009-08-12T23:08:53+00:00 Remove support for ghc 6.8.* from .cabal file - - - - - c1695902 by Ian Lynagh at 2009-07-07T13:35:45+00:00 Fix unused import warnings - - - - - fb6df7f9 by Ian Lynagh at 2009-07-16T00:20:31+00:00 Use cProjectVersion directly rather than going through compilerInfo Fixes the build after changes in GHC - - - - - 548cdd66 by Simon Marlow at 2009-07-28T14:27:04+00:00 follow changes in GHC's ForeignType - - - - - 9395aaa0 by David Waern at 2009-08-13T22:17:33+00:00 Switch from PatternSignatures to ScopedTypeVariables in Main - - - - - eebf39bd by David Waern at 2009-08-14T17:14:28+00:00 Version .haddock files made with GHC 6.10.3/4 correclty - - - - - 58f3e735 by David Waern at 2009-08-14T17:19:37+00:00 Support GHC 6.10.* and 6.11.* only - - - - - 5f63cecc by David Waern at 2009-08-14T22:03:20+00:00 Do not version .haddock file based on GHC patchlevel version We require that the instances of Binary that we use from GHC will not change between patchlevel versions. - - - - - d519de9f by David Waern at 2009-08-14T23:50:00+00:00 Update CHANGES - - - - - 35dccf5c by David Waern at 2009-08-14T23:51:38+00:00 Update version number everywhere - - - - - 6d363fea by David Waern at 2009-08-15T09:46:49+00:00 Update ANNOUNCE - - - - - c7ee6bc2 by David Waern at 2009-08-15T09:47:13+00:00 Remove -Werror Forgot that Hackage doesn't like it. - - - - - a125c12b by David Waern at 2009-08-15T09:49:50+00:00 Require Cabal >= 1.6 - - - - - adb2f560 by Isaac Dupree at 2009-08-12T03:47:14+00:00 Cross-Package Documentation version 4 - - - - - 3d6dc04d by David Waern at 2009-08-15T23:42:57+00:00 Put all the IN_GHC_TREE stuff inside getGhcLibDir - - - - - 56624097 by David Waern at 2009-08-15T23:52:03+00:00 Add --print-ghc-libdir - - - - - f15d3ccb by David Waern at 2009-08-16T00:37:52+00:00 Read base.haddock when running tests We can now test cross-package docs. - - - - - 283f0fb9 by David Waern at 2009-08-16T00:50:59+00:00 Update test output - we now have more links - - - - - 673d1004 by David Waern at 2009-08-16T01:26:08+00:00 Read process.haddock when running tests - - - - - 0d127f82 by David Waern at 2009-08-16T01:43:04+00:00 Add a test for cross-package documentation - - - - - f94db967 by Ian Lynagh at 2009-08-16T18:42:44+00:00 Follow GHC build system changes - - - - - 5151278a by Isaac Dupree at 2009-08-16T19:58:05+00:00 make cross-package list types look nicer - - - - - c41e8228 by Isaac Dupree at 2009-08-18T01:47:47+00:00 Haddock.Convert: export more functions This lets us remove some code in Haddock.Interface.AttachInstances - - - - - 2e5fa398 by Isaac Dupree at 2009-08-18T02:11:05+00:00 switch AttachInstances to use synify code It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication! - - - - - b8b07123 by Isaac Dupree at 2009-08-18T02:23:31+00:00 Find instances using GHC, which is more complete. In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?) - - - - - 6959b451 by Isaac Dupree at 2009-08-17T00:37:18+00:00 fix preprocessor conditional sense - - - - - 942823af by Isaac Dupree at 2009-08-16T22:46:48+00:00 remove ghc 6.8 conditionals from Haddock.Interface - - - - - 4b3ad888 by Isaac Dupree at 2009-08-18T20:24:38+00:00 Fix GHC 6.11 build in Haddock.Convert - - - - - 0a89c5ab by Isaac Dupree at 2009-08-23T00:08:58+00:00 hacks to make it compile without fnArgDocsn - - - - - 7b3bed43 by Isaac Dupree at 2009-08-23T03:01:28+00:00 less big-Map-based proper extraction of constructor subdocs - - - - - b21c279a by Isaac Dupree at 2009-08-23T03:02:06+00:00 Html: remove unnecessary+troublesome GHC. qualifications - - - - - 96c97115 by Isaac Dupree at 2009-08-23T03:08:03+00:00 Move doc parsing/lexing into Haddock for ghc>=6.11 - - - - - e1cec02d by Isaac Dupree at 2009-08-23T05:08:14+00:00 get rid of unused DocMap parameter in Html - - - - - 66960c59 by Isaac Dupree at 2009-08-23T05:54:20+00:00 fix horrible named-docs-disappearing bug :-) - - - - - a9d7eff3 by Isaac Dupree at 2009-08-23T06:26:36+00:00 re-implement function-argument docs ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently. - - - - - 8bf6852c by Isaac Dupree at 2009-08-23T07:26:05+00:00 cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! - - - - - 30115a64 by Isaac Dupree at 2009-08-23T18:22:47+00:00 Improve behavior for unfindable .haddock - - - - - aa364bda by Isaac Dupree at 2009-08-23T18:28:16+00:00 add comment for FnArgsDoc type - - - - - 49b23a99 by Isaac Dupree at 2009-08-23T21:52:48+00:00 bugfix: restore fnArgDocs for type-synonyms - - - - - f65f9467 by Isaac Dupree at 2009-08-23T22:06:55+00:00 Backends.Hoogle: eliminate warnings - - - - - a292d216 by Isaac Dupree at 2009-08-23T22:10:24+00:00 Haddock.Convert: eliminate warnings - - - - - 5546cd20 by Isaac Dupree at 2009-08-23T22:12:31+00:00 Haddock.Interface.Rename: eliminate warnings - - - - - 0a9798b6 by Isaac Dupree at 2009-08-23T22:18:47+00:00 Main.hs: remove ghc<6.9 conditionals - - - - - e8f9867f by Isaac Dupree at 2009-08-23T22:27:46+00:00 Main.hs: eliminate warnings (except for OldException) - - - - - 61c64247 by Isaac Dupree at 2009-08-23T22:41:01+00:00 move get*LibDir code in Main.hs, to +consistent code, -duplication - - - - - 948f1e69 by Isaac Dupree at 2009-08-23T23:14:26+00:00 Main.hs: OldException->Exception: which eliminates warnings - - - - - 3d5d5e03 by Isaac Dupree at 2009-08-23T23:20:11+00:00 GhcUtils: ghc >= 6.10 - - - - - 2771d657 by Isaac Dupree at 2009-08-23T23:21:55+00:00 InterfaceFile: ghc >= 6.10 - - - - - d9f2b9d1 by Isaac Dupree at 2009-08-23T23:22:58+00:00 Types: ghc >= 6.10 - - - - - ca39210e by Isaac Dupree at 2009-08-23T23:23:26+00:00 ModuleTree: ghc >= 6.10 - - - - - 883c4e59 by Isaac Dupree at 2009-08-23T23:24:04+00:00 Backends.DevHelp: ghc >= 6.10 - - - - - 04667df5 by Isaac Dupree at 2009-08-23T23:24:37+00:00 Backends.Html: ghc >= 6.10 - - - - - a9f7f25f by Isaac Dupree at 2009-08-23T23:25:24+00:00 Utils: ghc >= 6.10 - - - - - b7105022 by Isaac Dupree at 2009-08-23T23:37:47+00:00 eliminate haskell98 dependency, following GHC's example It turns out I/we already had, and it was only a matter of deleting it from the cabal file. - - - - - 292e0911 by Isaac Dupree at 2009-08-24T01:22:44+00:00 refactor out subordinatesWithNoDocs dep of inferenced-decls fix - - - - - c2ed46a2 by Isaac Dupree at 2009-08-24T01:24:03+00:00 Eradicate wrong runtime warning for type-inferenced exported-functions see the long comment in the patch for why I did it this way :-) - - - - - 4ac0b57c by David Waern at 2009-09-04T22:56:20+00:00 Clean up tyThingToHsSynSig a little Factor out noLoc and use the case construct. Also rename the function to tyThingToLHsDecl, since it doesn't just create type signatures. - - - - - 28ab9201 by David Waern at 2009-09-04T22:58:50+00:00 Wibble - - - - - 0d9fe6d0 by David Waern at 2009-09-06T18:39:30+00:00 Add more copyright owners to H.I.AttachInstances - - - - - 122441b1 by David Waern at 2009-09-06T18:44:12+00:00 Style police - - - - - 1fa79463 by David Waern at 2009-09-06T18:57:45+00:00 Move toHsInstHead to Haddock.Convert and call it synifyInstHead - - - - - 0d42a8aa by David Waern at 2009-09-06T21:11:38+00:00 Use colordiff to display test results if available - - - - - ea9d8e03 by Simon Marlow at 2009-08-24T08:46:14+00:00 Follow changes in GHC's interface file format Word32 instead of Int for FastString and Name offsets - - - - - 537e051e by Simon Marlow at 2009-07-29T14:16:53+00:00 define unpackPackageId (it was removed from GHC) - - - - - 50c63aa7 by David Waern at 2009-09-09T23:18:03+00:00 Remove commented-out code - - - - - 511631fe by David Waern at 2009-09-09T23:19:05+00:00 Correct copyright in H.I.ParseModuleHeader - - - - - 898ec768 by David Waern at 2009-09-11T11:22:29+00:00 Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time. - - - - - 37bec0d5 by Simon Peyton Jones at 2009-09-11T08:28:04+00:00 Track change in HsType - - - - - eb3a97c3 by Ian Lynagh at 2009-09-11T16:07:09+00:00 Allow building with base 4.2 - - - - - bb4205ed by Ian Lynagh at 2009-09-22T13:50:02+00:00 Loosen the GHC dependency - - - - - 5c75deb2 by Ian Lynagh at 2009-09-22T14:08:39+00:00 Fix building with GHC >= 6.12 - - - - - fb131481 by David Waern at 2009-09-11T11:24:48+00:00 Update runtests.hs to work with GHC 6.11 - - - - - ac3a419d by David Waern at 2009-09-11T11:25:14+00:00 Update CrossPackageDocs test - - - - - ec65c3c6 by David Waern at 2009-09-11T11:25:40+00:00 Add reference output for CrossPackageDocs - - - - - 520c2758 by Ian Lynagh at 2009-10-25T17:26:40+00:00 Fix installation in the GHC build system - - - - - 28b3d7df by Ian Lynagh at 2009-11-05T15:57:27+00:00 GHC build system: Make *nix installation work in paths containing spaces - - - - - 5c9bb541 by David Waern at 2009-11-14T11:56:39+00:00 Track change in HsType for the right compiler version - - - - - 905097ce by David Waern at 2009-11-14T12:10:47+00:00 hlint police - - - - - 04920630 by Ian Lynagh at 2009-11-20T13:46:30+00:00 Use defaultObjectTarget rather than HscAsm This fixes haddock when we don't have a native code generator - - - - - 966eb079 by David Waern at 2009-11-15T12:32:21+00:00 Remove commented-out code - - - - - 37f00fc4 by David Waern at 2009-11-22T13:58:48+00:00 Make runtests.hs strip links before diffing Generates easier to read diffs when tests fail. The content of the links is not important anyway since it is not taken into account by the tests. - - - - - 3a9bb8ef by David Waern at 2009-11-22T14:05:06+00:00 Follow findProgramOnPath signature change in runtests.hs - - - - - b26b9e5a by David Waern at 2009-11-22T14:08:40+00:00 Follow removal of GHC.MVar from base in CrossPackageDocs - - - - - f4d90ae4 by David Waern at 2009-11-22T14:48:47+00:00 Make copy.hs strip link contents before copying No more updating of reference files when URLs in links changes. - - - - - 4c9c420d by David Waern at 2009-11-22T15:26:41+00:00 Update test reference output * More links (Int, Float etc) * Stripped link contents - - - - - a62b80e3 by David Waern at 2009-11-23T23:19:39+00:00 Update CrossPackageDocs reference output - Remove GHC.MVar import (removed from base) - Strip link contents - - - - - 43491394 by David Waern at 2009-11-23T23:20:00+00:00 Update test reference files with comments on instances - - - - - 0d370a0b by David Waern at 2009-11-23T23:25:16+00:00 Bump version number - - - - - 2293113e by David Waern at 2009-11-24T20:55:49+00:00 Comments on instances Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances - - - - - bf586f29 by David Waern at 2009-11-27T22:05:15+00:00 Whitespace police - - - - - b8f03afa by David Waern at 2009-11-27T22:11:46+00:00 Remove bad whitespace and commented-out pieces - - - - - 90b8ee90 by David Waern at 2009-11-27T22:15:04+00:00 Whitespace police - - - - - b5ede900 by David Waern at 2009-11-27T22:15:50+00:00 Whitespace police - - - - - e3fddbfe by David Waern at 2009-11-28T13:37:59+00:00 Remove Name from DocInstance It's not used. - - - - - 9502786c by David Waern at 2009-11-28T13:56:54+00:00 Require at least GHC 6.12 While regression testing Haddock, I found a bug that happens with GHC 6.10.3, but not with GHC 6.12-rc2 (haven't tried 6.10.4). I don't have time to track it down. I think we should just always require the latest major GHC version. The time spent on making Haddock work with older versions is too high compared to the time spent on bugfixing, refactoring and features. - - - - - 8fa688d8 by David Waern at 2009-11-28T15:05:03+00:00 Remove cruft due to compatibility with older GHCs - - - - - 46fbbe9d by David Waern at 2009-11-28T15:07:50+00:00 Add a documentation header to Haddock.Convert - - - - - c3d2cc4a by David Waern at 2009-11-28T15:10:14+00:00 Remove unused H.Utils.FastMutInt2 - - - - - 490aba80 by David Waern at 2009-11-28T15:36:36+00:00 Rename Distribution.Haddock into Documentation.Haddock - - - - - 33ee2397 by David Waern at 2009-11-28T15:36:47+00:00 Fix error message - - - - - a5a3b950 by David Waern at 2009-11-28T16:58:39+00:00 Add a test flag that brings in QuickCheck - - - - - fa049e13 by David Waern at 2009-11-28T19:32:18+00:00 Say that we want quickcheck 2 - - - - - f32b0d9b by David Waern at 2009-11-28T19:32:40+00:00 Add an Arbitrary instance for HsDoc - - - - - da9a8bd7 by David Waern at 2009-11-28T20:15:30+00:00 Rename HsDoc back into Doc - - - - - edb60101 by David Waern at 2009-11-28T22:16:16+00:00 Move H.Interface.Parse/Lex to H.Parse/Lex These are not just used to build Interfaces. - - - - - 0656a9b8 by David Waern at 2009-11-28T23:12:14+00:00 Update version number in test suite - - - - - 5e8c6f4a by David Waern at 2009-12-21T14:12:41+00:00 Improve doc of DocName - - - - - 7868e551 by Ian Lynagh at 2009-09-22T10:43:03+00:00 TAG GHC 6.12-branch created - - - - - 0452a3ea by Ian Lynagh at 2009-12-15T12:46:07+00:00 TAG GHC 6.12.1 release - - - - - 65e9be62 by David Waern at 2009-12-21T16:58:58+00:00 Update CHANGES - - - - - 145cee32 by David Waern at 2009-12-21T16:59:09+00:00 TAG 2.6.0 - - - - - 3c552008 by David Waern at 2009-12-22T17:11:14+00:00 Update ANNOUNCE - - - - - 931f9db4 by David Waern at 2010-01-22T19:57:17+00:00 Convert haddock.vim to use unix newlines - - - - - 4e56588f by David Waern at 2010-01-22T22:11:17+00:00 Remove unnecessary (and inexplicable) uses of nub - - - - - 744bb4d1 by David Waern at 2010-01-22T22:12:14+00:00 Follow move of parser and lexer - - - - - e34bab14 by David Waern at 2010-01-22T22:49:13+00:00 Use findProgramLocation instead of findProgramOnPath in runtests.hs - - - - - 8d39891b by Isaac Dupree at 2010-01-14T18:53:18+00:00 fix html arg-doc off-by-one and silliness - - - - - 9401f2e9 by David Waern at 2010-01-22T22:57:03+00:00 Create a test for function argument docs - - - - - 507a82d7 by David Waern at 2010-01-22T23:24:47+00:00 Put parenthesis around type signature arguments of function type - - - - - 8a305c28 by David Waern at 2010-01-23T17:26:59+00:00 Add reference file for the FunArgs test - - - - - 1309d5e1 by David Waern at 2010-01-24T16:05:08+00:00 Improve FunArg test and update Test.html.ref - - - - - 2990f055 by Yitzchak Gale at 2010-02-14T16:03:46+00:00 Do not generate illegal character in HTML ID attribute. - - - - - c5bcab7a by David Waern at 2010-02-22T22:10:30+00:00 Fix Haddock markup error in comment - - - - - c6416a73 by David Waern at 2010-02-24T22:55:08+00:00 Large additions to the Haddock API Also improved and added more doc comments. - - - - - 57d289d7 by David Waern at 2010-02-24T22:58:02+00:00 Remove unused ifaceLocals - - - - - 80528d93 by David Waern at 2010-02-25T21:05:09+00:00 Add HaddockModInfo to the API - - - - - 82806848 by David Waern at 2010-02-25T21:05:27+00:00 Wibble - - - - - 744cad4c by David Waern at 2010-02-25T23:30:59+00:00 Make it possible to run a single test - - - - - 6a806e4c by David Waern at 2010-03-14T14:19:39+00:00 Bump version number - - - - - a5a8e4a7 by David Waern at 2010-03-14T14:36:35+00:00 Update ANNOUNCE - - - - - 6f05435e by Simon Hengel at 2010-03-15T20:52:42+00:00 Add missing dependencies for 'library' in haddock.cabal - - - - - faefe2bd by David Waern at 2010-03-15T22:29:37+00:00 Solve conflicts - - - - - 9808ad52 by David Waern at 2010-03-15T22:51:21+00:00 Bump version number - - - - - eb0bf60b by David Waern at 2010-03-15T22:52:32+00:00 Update CHANGES - - - - - f95cd891 by David Waern at 2010-03-15T23:01:06+00:00 Add Paths_haddock to other-modules of library - - - - - 65997b0a by David Waern at 2010-03-15T23:14:59+00:00 Update CHANGES - - - - - 7e251731 by David Waern at 2010-03-15T23:15:30+00:00 Bump version number - - - - - c9cd0ddc by David Waern at 2010-03-16T00:28:34+00:00 Fix warning - - - - - 1cac2d93 by Simon Peyton Jones at 2010-01-04T15:22:16+00:00 Fix imports for new location of splitKindFunTys - - - - - 474f26f6 by Simon Peyton Jones at 2010-02-10T14:36:06+00:00 Update Haddock for quasiquotes - - - - - 0dcc06c0 by Simon Peyton Jones at 2010-02-10T10:59:45+00:00 Track changes in HsTyVarBndr - - - - - 2d84733a by Simon Peyton Jones at 2010-02-10T14:52:44+00:00 Track HsSyn chnages - - - - - 9e3adb8b by Ian Lynagh at 2010-02-20T17:09:42+00:00 Resolve conflicts - - - - - a3e72ff8 by Simon Peyton Jones at 2010-03-04T13:05:16+00:00 Track change in HsUtils; and use a nicer function not an internal one - - - - - 27994854 by David Waern at 2010-03-18T22:22:27+00:00 Fix build with GHC 6.12.1 - - - - - 11f6e488 by David Waern at 2010-03-18T22:24:09+00:00 Bump version in test reference files - - - - - 0ef2f11b by David Waern at 2010-03-20T00:56:30+00:00 Fix library part of cabal file when in ghc tree - - - - - 3f6146ff by Mark Lentczner at 2010-03-20T22:30:11+00:00 First, experimental XHTML rendering switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString) - - - - - b8ab329b by Mark Lentczner at 2010-03-20T22:54:01+00:00 apply changes to Html.hs to Xhtml/*.hs incorporate changes that were made between the time Html.hs was copied and split into Xhtml.hs and Xhtml/*.hs includes patchs after "Wibble" (!) through "Fix build with GHC 6.12.1" - - - - - 73df2433 by Ian Lynagh at 2010-03-20T21:56:37+00:00 Follow LazyUniqFM->UniqFM in GHC - - - - - db4f602b by David Waern at 2010-03-29T22:00:01+00:00 Fix build with GHC 6.12 - - - - - d8dca088 by Simon Hengel at 2010-04-02T16:39:55+00:00 Add missing dependencies to cabal file - - - - - e2adc437 by Simon Hengel at 2010-04-02T14:08:40+00:00 Add markup support for interactive examples - - - - - e882ac05 by Simon Hengel at 2010-04-02T14:11:53+00:00 Add tests for interactive examples - - - - - 5a07a6d3 by David Waern at 2010-04-07T17:05:20+00:00 Propagate source positions from Lex.x to Parse.y - - - - - 6493b46f by David Waern at 2010-04-07T21:48:57+00:00 Let runtests.hs die when haddock has not been built - - - - - 5e34423e by David Waern at 2010-04-07T22:01:13+00:00 Make runtests.hs slightly more readable - - - - - 321d59b3 by David Waern at 2010-04-07T22:13:27+00:00 Fix haskell/haddock#75 Add colons to the $ident character set. - - - - - 37b08b8d by David Waern at 2010-04-08T00:32:52+00:00 Fix haskell/haddock#118 Avoid being too greedy when lexing URL markup (<..>), in order to allow multiple URLs on the same line. Do the same thing with <<..>> and #..#. - - - - - df8feac9 by David Waern at 2010-04-08T00:57:33+00:00 Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. - - - - - 1ca6f84b by David Waern at 2010-04-08T01:03:06+00:00 Add ghc-prim to test suite deps - - - - - 27371e3a by Simon Hengel at 2010-04-08T19:26:34+00:00 Let parsing fails on paragraphs that are immediately followed by an example This is more consistent with the way we treat code blocks. - - - - - 83096e4a by David Waern at 2010-04-08T21:20:00+00:00 Improve function name - - - - - 439983ce by David Waern at 2010-04-10T10:46:14+00:00 Fix haskell/haddock#112 No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds. - - - - - 5c0d35d7 by David Waern at 2010-04-10T10:54:06+00:00 Rename startGhc into withGhc - - - - - dca081fa by Simon Hengel at 2010-04-12T19:09:16+00:00 Add documentation for interactive examples - - - - - c7f26bfa by David Waern at 2010-04-13T00:51:51+00:00 Slight fix to the documentation of examples - - - - - 06eb7c4c by David Waern at 2010-04-13T00:57:05+00:00 Rename Interactive Examples into Examples (and simplify explanation) - - - - - 264830cb by David Waern at 2010-05-10T20:07:27+00:00 Update CHANGES with info about 2.6.1 - - - - - 8e5d4514 by Simon Hengel at 2010-04-18T18:16:54+00:00 Add unit tests for parser - - - - - 68297f40 by David Waern at 2010-05-10T21:53:37+00:00 Improve testsuite README - - - - - f04eb6e4 by David Waern at 2010-05-11T19:14:31+00:00 Re-organise the testsuite structure - - - - - a360f710 by David Waern at 2010-05-11T19:18:03+00:00 Shorten function name - - - - - 1d5dd359 by David Waern at 2010-05-11T21:40:02+00:00 Update runtests.hs following testsuite re-organisation - - - - - ffebe217 by David Waern at 2010-05-11T21:40:10+00:00 Update runtests.hs to use base-4.2.0.1 - - - - - 635de402 by David Waern at 2010-05-11T21:41:11+00:00 Update runparsetests.hs following testsuite reorganisation - - - - - 72137910 by Ian Lynagh at 2010-05-06T20:43:06+00:00 Fix build - - - - - 1a80b76e by Ian Lynagh at 2010-05-06T22:25:29+00:00 Remove redundant import - - - - - 1031a80c by Simon Peyton Jones at 2010-05-07T13:21:09+00:00 Minor wibbles to HsBang stuff - - - - - dd8e7fe5 by Ian Lynagh at 2010-05-08T15:22:00+00:00 GHC build system: Follow "rm" variable changes - - - - - 7f5e6748 by David Waern at 2010-05-13T11:53:02+00:00 Fix build with GHC 6.12.2 - - - - - 7953d4d8 by David Waern at 2010-05-13T18:45:01+00:00 Fixes to comments only - - - - - 8ae8eb64 by David Waern at 2010-05-13T18:57:26+00:00 ModuleMap -> IfaceMap - - - - - 1c3eadc6 by David Waern at 2010-05-13T19:03:13+00:00 Fix whitespace style issues - - - - - e96783c0 by David Waern at 2010-05-13T19:08:53+00:00 Fix comment - - - - - c998a78b by David Waern at 2010-05-13T19:39:00+00:00 Position the module header the same way everywhere Silly, but nice with some consistency :-) - - - - - b48a714e by David Waern at 2010-05-13T19:41:32+00:00 Position of module header, this time in the HTML backends - - - - - f9bfb12e by David Waern at 2010-05-13T19:43:05+00:00 Two newlines between declarations in Main - - - - - 071d44c7 by David Waern at 2010-05-13T19:44:21+00:00 Newlines in Convert - - - - - 036346db by David Waern at 2010-05-13T19:46:47+00:00 Fix a few stylistic issues in H.InterfaceFile - - - - - f0b8379e by David Waern at 2010-05-13T19:47:53+00:00 Add newlines to H.ModuleTree - - - - - 27409f8e by David Waern at 2010-05-13T19:51:10+00:00 Fix stylistic issues in H.Utils - - - - - 24774a11 by David Waern at 2010-05-13T20:00:43+00:00 Structure H.Types better - - - - - 7b6f5e40 by David Waern at 2010-05-13T20:01:04+00:00 Remove bad Arbitrary instance - - - - - fac9f1f6 by David Waern at 2010-05-13T20:05:50+00:00 Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead - - - - - fe6d00c4 by David Waern at 2010-05-13T20:51:55+00:00 Export a couple of more types from the API - - - - - b2e33a5f by David Waern at 2010-05-13T21:27:51+00:00 Improve doc comment for Interface - - - - - c585f2ce by David Waern at 2010-05-13T21:30:14+00:00 Improve documentation of Haddock.Interface - - - - - e6791db2 by David Waern at 2010-05-13T22:07:35+00:00 Remove meaningless comments - - - - - 7801b390 by David Waern at 2010-05-14T17:53:33+00:00 Remove unused modules - - - - - f813e937 by David Waern at 2010-05-14T17:55:17+00:00 Re-direct compilation output to a temporary directory Also add a flag --no-tmp-comp-dir that can be used to get the old behaviour of writing compilation files to GHC's output directory (default "."). - - - - - e56737ec by David Waern at 2010-05-14T18:06:11+00:00 Wibble - - - - - e40b0447 by David Waern at 2010-05-14T19:01:52+00:00 Move flag evaluation code from Main to Haddock.Options Determining the value of "singular" flags (by e.g. taking the last occurrence of the flag) and other flag evaluation should done in Haddock.Options which is the module that is supposed to define the command line interface. This makes Main a bit easier on the eyes as well. - - - - - 27091f57 by David Waern at 2010-05-14T19:05:10+00:00 Wibble - - - - - c658cf61 by David Waern at 2010-05-14T19:06:49+00:00 Re-order things in Haddock.Options a bit - - - - - 8cfdd342 by David Waern at 2010-05-14T19:20:29+00:00 De-tabify Haddock.Options and fix other whitespace issues - - - - - 0df16b62 by David Waern at 2010-05-14T19:25:07+00:00 Improve comments - - - - - 80b38e2b by David Waern at 2010-05-14T19:26:42+00:00 Whitespace police - - - - - fe580255 by David Waern at 2010-05-14T19:31:23+00:00 Wibbles to comments - - - - - a2b43fad by David Waern at 2010-05-14T20:24:32+00:00 Move some more flag functions to Haddock.Options - - - - - 3f895547 by David Waern at 2010-05-14T20:37:12+00:00 Make renderStep a top-level function in Main - - - - - 5cdca11d by David Waern at 2010-05-14T20:39:27+00:00 Spelling in comment - - - - - ad98d14c by David Waern at 2010-05-14T20:40:26+00:00 Comment fixes - - - - - 0bb9218f by David Waern at 2010-05-14T20:49:01+00:00 Whitespace police - - - - - 0f0a533f by David Waern at 2010-05-15T16:42:29+00:00 Improve description of --dump-interface - - - - - 5b2833ac by David Waern at 2010-05-15T17:16:53+00:00 Document --no-tmp-comp-dir - - - - - 8160b170 by David Waern at 2010-05-15T17:18:59+00:00 Wibble - - - - - 570dbe33 by David Waern at 2010-05-18T21:15:38+00:00 HLint police - - - - - 204e425f by David Waern at 2010-05-18T21:16:30+00:00 HLint police - - - - - 6db657ac by David Waern at 2010-05-18T21:16:37+00:00 Wibble - - - - - b942ccd7 by Simon Marlow at 2010-06-02T08:27:30+00:00 Interrupted disappeared in GHC 6.13 (GHC ticket haskell/haddock#4100) - - - - - 3b94a819 by Simon Marlow at 2010-06-02T08:45:08+00:00 Allow base-4.3 - - - - - c5a1fb7c by Simon Marlow at 2010-06-02T09:03:04+00:00 Fix compilation with GHC 6.13 - - - - - 6181296c by David Waern at 2010-06-08T21:09:05+00:00 Display name of prologue file when parsing it fails - - - - - 7cbc6f60 by Ian Lynagh at 2010-06-13T16:20:25+00:00 Remove redundant imports - - - - - 980c804b by Simon Marlow at 2010-06-22T08:41:50+00:00 isLocalAndTypeInferenced: fix for local module names overlapping package modules - - - - - d74d4a12 by Simon Marlow at 2010-06-23T12:03:27+00:00 Unresolved identifiers in Doc get replaced with DocMonospaced rather than plain strings - - - - - d8546783 by Simon Marlow at 2010-06-30T12:45:17+00:00 LaTeX backend (new options: --latex, --latex-style=<style>) - - - - - 437afa9e by David Waern at 2010-07-01T12:02:44+00:00 Fix a few stylistic whitespace issues in LaTeX backend - - - - - 85bc1fae by David Waern at 2010-07-01T15:42:45+00:00 Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this) - - - - - 7d2eb86f by David Waern at 2010-07-01T15:43:33+00:00 Update test following Simon's patch to render unresolved names in monospaced font - - - - - 08fcbcd2 by David Waern at 2010-07-01T16:12:18+00:00 Warning police - - - - - d04a8d7a by David Waern at 2010-07-04T14:53:39+00:00 Fix a bug in attachInstances We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however. - - - - - d10344eb by Simon Hengel at 2010-07-10T09:19:04+00:00 Add missing dependencies to cabal file - - - - - 24090531 by Mark Lentczner at 2010-03-21T04:51:16+00:00 add exports to Xhtml modules - - - - - 84f9a333 by Mark Lentczner at 2010-04-03T19:14:22+00:00 clean up Doc formatting code - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up <pre> sections - - - - - bebccf52 by Mark Lentczner at 2010-04-04T04:51:08+00:00 tweak list css - - - - - 0c2aeb5e by Mark Lentczner at 2010-04-04T06:24:14+00:00 all decls now generate Html not HtmlTable - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code - - - - - dbf73e6e by Mark Lentczner at 2010-04-05T05:02:43+00:00 clean up processExport and place a div around each decl - - - - - e25b7e9f by Mark Lentczner at 2010-04-10T21:23:21+00:00 data decls are now a sequence of paragraphs, not a table - - - - - 89ee0294 by Mark Lentczner at 2010-04-10T21:29:16+00:00 removed commented out code that can't be maintained - - - - - d466f536 by Mark Lentczner at 2010-04-12T04:56:27+00:00 removed declWithDoc and cleaned up data decls in summary - - - - - ed755832 by Mark Lentczner at 2010-04-12T05:07:53+00:00 merge in markupExample changes - - - - - c36f51fd by Mark Lentczner at 2010-04-25T04:56:37+00:00 made record fields be an unordList, not a table - - - - - ed3a28d6 by Mark Lentczner at 2010-04-25T05:23:28+00:00 fixed surround of instance and constructor tables - - - - - 0e35bbc4 by Mark Lentczner at 2010-04-25T05:36:59+00:00 fix class member boxes in summary - - - - - 5041749b by Mark Lentczner at 2010-04-25T05:38:35+00:00 remove unused bodyBox - - - - - e91724db by Mark Lentczner at 2010-04-25T06:26:10+00:00 fixed javascript quoting/escpaing issue - - - - - f4abbb73 by Mark Lentczner at 2010-05-03T23:04:31+00:00 adjust css for current markup - - - - - e75fec4c by Mark Lentczner at 2010-05-04T06:14:34+00:00 added assoicated types and methods back into class decls - - - - - 84169323 by Mark Lentczner at 2010-05-24T13:13:42+00:00 merge in changes from the big-whitespace cleanup - - - - - 3c1c872e by Mark Lentczner at 2010-06-11T21:03:58+00:00 adjust synopsis and bottom bar spacing - - - - - 3c1f9ef7 by Mark Lentczner at 2010-06-11T21:14:44+00:00 fix missing space in "module" lines in synoposis - - - - - 9a137e6d by Mark Lentczner at 2010-06-11T21:34:08+00:00 changed tt elements to code elements - - - - - 50f71ef1 by Mark Lentczner at 2010-06-11T23:27:46+00:00 factored out ppInstances - - - - - 3b9a9de5 by Mark Lentczner at 2010-06-17T17:36:01+00:00 push single constructors (newtype) onto line with decl - - - - - e0f8f2ec by Mark Lentczner at 2010-06-17T22:20:56+00:00 remove <++> connector - - - - - 56c075dd by Mark Lentczner at 2010-07-13T05:26:21+00:00 change to new page structure - - - - - 04be6ca7 by Mark Lentczner at 2010-07-14T04:21:55+00:00 constructors and args as dl lists, built in Layout.hs - - - - - 65aeafc2 by Mark Lentczner at 2010-07-14T05:38:32+00:00 better interface to subDecls - - - - - 72032189 by Mark Lentczner at 2010-07-14T07:04:10+00:00 made subDecl tables looks just so - - - - - b782eca2 by Mark Lentczner at 2010-07-14T16:00:54+00:00 convert args to SubDecl format - - - - - cc75e98f by Mark Lentczner at 2010-07-14T16:28:53+00:00 convert instances to SubDecl - - - - - 34e2aa5a by Mark Lentczner at 2010-07-14T21:07:32+00:00 removing old table cruft from Layout.hs - - - - - d5810d95 by Mark Lentczner at 2010-07-14T21:54:58+00:00 methods and associated types in new layout scheme - - - - - 65ef9579 by Mark Lentczner at 2010-07-14T23:43:42+00:00 clean up synopsis lists - - - - - e523318f by Mark Lentczner at 2010-07-15T05:02:26+00:00 clean up of anchors - - - - - 1215dfc5 by Mark Lentczner at 2010-07-15T23:53:01+00:00 added two new themes and rough css switcher - - - - - 7f0fd36f by Mark Lentczner at 2010-07-16T04:57:38+00:00 fixed package catpion, added style menu - - - - - 0dd4999c by Mark Lentczner at 2010-07-16T20:12:39+00:00 new output for mini_ pages - - - - - 64b2810b by Mark Lentczner at 2010-07-16T20:58:41+00:00 reformat index-frames - - - - - 3173f555 by Mark Lentczner at 2010-07-16T22:41:53+00:00 convert index to new markup - - - - - b0a4b7c9 by Mark Lentczner at 2010-07-17T04:07:22+00:00 convert index.html to new markup, adjust module markup - - - - - 8261ae1e by Mark Lentczner at 2010-07-17T05:07:29+00:00 classing styling of ancillary pages - - - - - 2a4fb025 by Mark Lentczner at 2010-07-17T05:11:45+00:00 clean up Layout.hs: no more vanillaTable - - - - - 87eec685 by Mark Lentczner at 2010-07-17T05:35:16+00:00 clean up Util.hs - - - - - d304e9b0 by Mark Lentczner at 2010-07-17T05:38:50+00:00 qualify import of XHtml as XHtml - - - - - 7dc05807 by Mark Lentczner at 2010-07-17T06:17:53+00:00 factored out head element generation - - - - - 9cdaec9e by Mark Lentczner at 2010-07-17T06:44:54+00:00 refactored out main page body generation - - - - - 8a51019e by Mark Lentczner at 2010-07-17T06:48:20+00:00 moved footer into only place that used it - - - - - efa479da by Mark Lentczner at 2010-07-17T18:48:30+00:00 styling auxillary pages for tibbe and snappy themes - - - - - 81de5509 by Mark Lentczner at 2010-07-18T04:41:38+00:00 fixed alphabet on index page, and styling of it and packages in module lists - - - - - 20718c1a by Mark Lentczner at 2010-07-18T05:34:29+00:00 cleaned up div functions in Layout.hs - - - - - 60d50453 by Mark Lentczner at 2010-07-18T05:48:39+00:00 added content div to main pages - - - - - ed16561c by Mark Lentczner at 2010-07-18T06:12:22+00:00 add .doc class to documentation blocks - - - - - f5c781b0 by Mark Lentczner at 2010-07-19T05:20:53+00:00 refactoring of anchor ID and fragment handling - - - - - a69a93bf by Mark Lentczner at 2010-07-19T05:35:55+00:00 remove an explicit bold tag - replace with .def class - - - - - d76c7225 by Mark Lentczner at 2010-07-19T06:56:15+00:00 rename Haddock.Backends.Xhtml.Util to Utils - - - - - 5a58c0da by David Waern at 2010-07-21T13:30:54+00:00 Remove trailing whitespace in Haddock.Backends.Xhtml - - - - - 0652aa17 by David Waern at 2010-07-21T13:33:21+00:00 Align a few comments - - - - - 785776c3 by David Waern at 2010-07-21T13:39:04+00:00 Remove trailing whitespace in H.B.X.Decl - - - - - 71a30710 by David Waern at 2010-07-21T13:44:27+00:00 Remove more trailing whitespace - - - - - 38750394 by David Waern at 2010-07-21T13:50:43+00:00 Style police - - - - - 3023d940 by David Waern at 2010-07-21T14:01:22+00:00 Style police in H.B.X.Decl - - - - - df16e9e6 by David Waern at 2010-07-21T14:14:45+00:00 Style police in H.B.X.DocMarkup - - - - - 6020e321 by David Waern at 2010-07-21T14:17:32+00:00 More style police - - - - - 86ad8bf5 by David Waern at 2010-07-21T14:21:02+00:00 Style police in H.B.Xhtml - - - - - aea27d03 by David Waern at 2010-07-21T14:42:03+00:00 Fix warnings in LaTeX backend - - - - - 2aff34a9 by David Waern at 2010-07-21T14:50:46+00:00 Style police in LaTeX backend (mainly more newlines) - - - - - e517162d by David Waern at 2010-07-21T15:05:47+00:00 Doc sections in Main - - - - - b971aa0c by David Waern at 2010-07-21T15:06:17+00:00 Trailing whitespace in Documentation.Haddock - - - - - f11628fb by David Waern at 2010-07-21T15:07:06+00:00 Trailing whitespace in Haddock.Convert - - - - - cbaf284c by David Waern at 2010-07-21T15:08:11+00:00 Style police in Haddock.GhcUtils - - - - - 71feb77b by David Waern at 2010-07-21T15:09:06+00:00 Style police in Haddock.InterfaceFile - - - - - 0a9c80e6 by David Waern at 2010-07-21T15:11:33+00:00 Whitespace police - - - - - 6168376c by David Waern at 2010-07-21T15:16:35+00:00 Style police in Haddock.Utils - - - - - 9fe4dd90 by David Waern at 2010-07-21T15:19:31+00:00 Add -fwarn-tabs - - - - - a000d752 by Mark Lentczner at 2010-07-20T17:25:52+00:00 move CSS Theme functions into Themes.hs - - - - - b52b440f by Mark Lentczner at 2010-07-20T17:29:35+00:00 add Thomas Schilling's theme - - - - - e43fa7e8 by Mark Lentczner at 2010-07-21T04:49:34+00:00 correct icon used with Snappy theme - - - - - ba5092d3 by Mark Lentczner at 2010-07-21T04:56:47+00:00 apply Tibbe's updates to his theme - - - - - 7804eef6 by Mark Lentczner at 2010-07-21T05:15:49+00:00 space between "Style" and the downward triangle - - - - - 7131d4c6 by Mark Lentczner at 2010-07-21T17:43:35+00:00 merge with David's source cleanups - - - - - ee65f1cb by David Waern at 2010-07-22T16:50:46+00:00 Fix a bug where we allowed --hoogle, --latex, etc without input files - - - - - e413ff7a by David Waern at 2010-07-22T17:21:58+00:00 Improve function name - - - - - a0fd14f3 by Simon Marlow at 2010-06-30T15:34:32+00:00 fix warnings - - - - - 31f73d2a by David Waern at 2010-07-22T19:29:41+00:00 Solve conflicts - - - - - d563b4a5 by Simon Marlow at 2010-06-30T15:34:37+00:00 fix warning - - - - - 412b6469 by David Waern at 2010-07-22T19:31:28+00:00 Solve conflict - - - - - 35174b94 by Ian Lynagh at 2010-07-06T17:27:16+00:00 Follow mkPState argument order change - - - - - b5c3585c by Simon Marlow at 2010-07-14T08:49:21+00:00 common up code for instance rendering - - - - - d8009560 by Simon Marlow at 2010-07-14T12:37:11+00:00 fix warnings - - - - - a6d88695 by David Waern at 2010-07-24T15:33:33+00:00 Fix build with ghc < 6.13 - - - - - 94cf9de1 by David Waern at 2010-07-24T15:34:37+00:00 Remove conflict left-over - - - - - 313b15c0 by Mark Lentczner at 2010-07-21T22:09:04+00:00 reorganization of nhaddock.css with tibbe - - - - - 9defed80 by Mark Lentczner at 2010-07-21T22:42:14+00:00 further cleanup of nhaddock.css, float TOC, support aux. pages - - - - - 6d944c1b by Mark Lentczner at 2010-07-22T06:22:23+00:00 remove old HTML backend - - - - - b3e8cba5 by Mark Lentczner at 2010-07-22T06:43:32+00:00 remove --html-help support - it was old, out-of-date, and mostly missing - - - - - d2654a08 by Mark Lentczner at 2010-07-22T21:45:34+00:00 tweaks to nhaddock.css - - - - - f73b285c by Mark Lentczner at 2010-07-23T06:19:35+00:00 command like processing for theme selection The bulk of the change is threadnig the selected theme set through functions in Xhtml.hs so that the selected themes can be used when generating the page output. There isn't much going on in most of these changes, just passing it along. The real work is all done in Themes.hs. - - - - - 8bddc90d by Mark Lentczner at 2010-07-23T06:58:31+00:00 drop --themes support, add named theme support decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. - - - - - 20cafd4f by Mark Lentczner at 2010-07-23T17:44:29+00:00 rename --default-themes to --built-in-themes - - - - - 0fe41307 by Mark Lentczner at 2010-07-23T18:33:02+00:00 tweaks to theme for info table, headings, and tables - - - - - cba4fee0 by Mark Lentczner at 2010-07-23T19:13:59+00:00 tweaks for dl layout, though still not used - - - - - 463fa294 by Mark Lentczner at 2010-07-23T21:07:19+00:00 tweak look of mini pages, keywords, and preblocks - - - - - 5472fc02 by Mark Lentczner at 2010-07-24T05:36:15+00:00 slide out Synopsis drawer - - - - - 9d5d5de5 by Mark Lentczner at 2010-07-24T06:02:42+00:00 extend package header and footer to edges of page - - - - - a47c91a2 by Mark Lentczner at 2010-07-24T06:28:44+00:00 fields are def lists, tweak css for style menu, mini pages, arguments - - - - - ca20f23b by Mark Lentczner at 2010-07-24T16:55:22+00:00 excisting last vestiges of the --xhtml flag - - - - - 71fb012e by Mark Lentczner at 2010-07-25T18:47:49+00:00 change how collapsing sections are done make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags - - - - - c168c8d3 by Mark Lentczner at 2010-07-26T00:32:05+00:00 reorganize files in the html lib data dir - - - - - 93324301 by Mark Lentczner at 2010-07-26T01:27:42+00:00 cleaned up Themes.hs - - - - - ad3b5dd4 by Mark Lentczner at 2010-07-26T02:39:15+00:00 make module list use new collapsers - - - - - 1df9bfc6 by Mark Lentczner at 2010-07-27T19:09:25+00:00 remove Tibbe theme - - - - - 8b9b01b3 by Mark Lentczner at 2010-07-27T20:04:03+00:00 move themes into html dir with .theme and .std-theme extensions - - - - - a7beb965 by Mark Lentczner at 2010-07-27T21:06:34+00:00 give a class to empty dd elements so they can be hidden - - - - - a258c117 by Mark Lentczner at 2010-07-27T21:23:58+00:00 remove custom version of copyFile in Xhtml.hs - - - - - b70dba6e by Mark Lentczner at 2010-07-27T22:12:45+00:00 apply margin changes to pre and headings as per group decision, and small cleanups - - - - - e6f722a2 by Mark Lentczner at 2010-07-28T00:03:12+00:00 make info block and package bar links be floatable by placing them first in the dom tree - - - - - c8278867 by Mark Lentczner at 2010-07-28T19:01:18+00:00 styling source links on declarations - - - - - 88fdc399 by Mark Lentczner at 2010-07-29T01:12:46+00:00 styling tweaks don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers - - - - - 8a75b213 by Ian Lynagh at 2010-07-30T20:21:46+00:00 Fix build in GHC tree - - - - - ce8e18b3 by Simon Hengel at 2010-08-03T18:37:26+00:00 Adapt paths to data files in cabal file - - - - - 9701a455 by Simon Hengel at 2010-08-07T13:20:27+00:00 Add missing dependency to cabal file - - - - - 01b838d1 by Mark Lentczner at 2010-07-30T20:19:40+00:00 improved synopsis drawer: on click, not hover - - - - - 7b6f3e59 by Mark Lentczner at 2010-07-30T23:38:55+00:00 put the synopsis back in the other themes - - - - - 7b2904c9 by Mark Lentczner at 2010-08-11T11:11:26+00:00 close arrows on expanded synopsis drawer - - - - - ea19e177 by Mark Lentczner at 2010-08-12T21:16:45+00:00 width and font changes removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent - - - - - 5ced00c0 by Mark Lentczner at 2010-08-13T15:09:55+00:00 implemented YUI's CSS font approach - - - - - 2799c548 by Mark Lentczner at 2010-08-13T15:11:59+00:00 adjusted margin to 2em, 1 wasn't enough - - - - - 58f06893 by Mark Lentczner at 2010-08-13T15:48:44+00:00 removed underlining on hover for named anchors headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute - - - - - 7aced4c4 by Mark Lentczner at 2010-08-13T15:50:22+00:00 more space between elements - - - - - 5a3c1cce by Mark Lentczner at 2010-08-13T16:43:43+00:00 adjusted font sizes of auxilary pages per new scheme - - - - - 487539ef by Mark Lentczner at 2010-08-13T21:43:41+00:00 add Frames button and clean up frames.html - - - - - c1a140b6 by Mark Lentczner at 2010-08-13T22:17:48+00:00 move frames button to js - - - - - b0bdb68e by Mark Lentczner at 2010-08-14T03:44:46+00:00 build style menu in javascript moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page - - - - - 43ab7120 by Mark Lentczner at 2010-08-16T15:15:37+00:00 font size and margin tweaks - - - - - c0b68652 by Mark Lentczner at 2010-08-17T18:19:52+00:00 clean up collapser logics javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS - - - - - 5d573427 by Mark Lentczner at 2010-08-17T23:06:02+00:00 don't collapse entries in module list when clicking on links - - - - - 8c307c4a by Mark Lentczner at 2010-08-17T23:21:43+00:00 add missing data file to .cabal - - - - - 414bcfcf by Mark Lentczner at 2010-08-17T23:28:47+00:00 remove synopsis when in frames - - - - - ba0fa98a by Mark Lentczner at 2010-08-18T16:16:11+00:00 layout tweeks - mini page font size, toc color, etc. - - - - - 63c1bed1 by Mark Lentczner at 2010-08-18T19:50:02+00:00 margin fiddling - - - - - c311c094 by Mark Lentczner at 2010-08-20T01:37:55+00:00 better synopsis handling logic - no flashing - - - - - f1fe5fa8 by Mark Lentczner at 2010-08-20T01:41:06+00:00 fix small layout issues mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers - - - - - 0de84d77 by Mark Lentczner at 2010-08-20T02:13:09+00:00 made style changing and cookies storage robust - - - - - 1ef064f9 by Thomas Schilling at 2010-08-04T13:12:22+00:00 Make synopsis frame behave properly in Firefox. In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. - - - - - dd1c9a94 by Mark Lentczner at 2010-08-21T01:46:19+00:00 remove Snappy theme - - - - - 2353a90d by Mark Lentczner at 2010-08-25T05:16:19+00:00 fix occasional v.scroll bars on pre blocks (I think) - - - - - 459b8bf1 by Simon Hengel at 2010-08-08T10:12:45+00:00 Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API - - - - - b1b68675 by David Waern at 2010-08-26T20:31:58+00:00 Follow recent API additions with some refactorings Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. - - - - - 264d4d67 by David Waern at 2010-08-26T21:40:59+00:00 Get rid of GhcModule and related cruft We can get everything we need directly from TypecheckedModule. - - - - - 0feacec2 by Mark Lentczner at 2010-08-26T23:44:13+00:00 fixed CSS for ordered lists and def lists in doc blocks - - - - - 2997e0c2 by Mark Lentczner at 2010-08-26T23:45:03+00:00 support both kinds of enumerated lists in doc markup The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported - - - - - 5d4ddeec by Mark Lentczner at 2010-08-27T21:29:48+00:00 fix broken header link margins - - - - - 614456ba by Mark Lentczner at 2010-08-27T22:16:19+00:00 fix table of contents CSS - - - - - 03f329a2 by David Waern at 2010-08-28T16:36:09+00:00 Update tests following switch to the Xhtml backend - - - - - ca689fa2 by Mark Lentczner at 2010-08-28T18:25:16+00:00 fix def lists - - - - - 18e1d3d2 by Mark Lentczner at 2010-08-28T18:26:18+00:00 push footer to bottom of window - - - - - b0ab8d82 by David Waern at 2010-08-28T22:04:32+00:00 Whitespace police - - - - - 2d217977 by David Waern at 2010-08-29T12:44:45+00:00 Remove Snappy data files - - - - - 01e27d5f by David Waern at 2010-08-29T13:03:28+00:00 Add source entity path to --read-interface You can now use this flag like this: --read-interface=<html path>,<source entity path>,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. - - - - - 20bf4aaa by David Waern at 2010-08-29T13:11:03+00:00 Naming wibbles - - - - - ad22463f by Mark Lentczner at 2010-08-29T15:14:54+00:00 make portability block be a table - solves layout issues - - - - - 97bd1ae6 by Mark Lentczner at 2010-08-29T15:17:42+00:00 update golden test for Test due to portability box change - - - - - d37e139e by Mark Lentczner at 2010-08-29T17:07:17+00:00 move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs - - - - - acf52501 by David Waern at 2010-08-29T17:32:36+00:00 Allow building with ghc < 6.16 - - - - - 1cb34ed8 by Ian Lynagh at 2010-07-24T23:18:49+00:00 Flatten the dynflags before parsing - - - - - b36845b4 by Ian Lynagh at 2010-07-24T23:26:49+00:00 Follow flattenLanguageFlags -> flattenExtensionFlags rename - - - - - 7f7fcc7e by David Waern at 2010-08-29T17:46:23+00:00 Use flattenExtensionFlags with ghc >= 6.13 only - - - - - 13cf9411 by Ian Lynagh at 2010-08-01T18:09:54+00:00 Make the main haddock script versioned, and make plain "haddock" a symlink - - - - - 495cbff2 by Ian Lynagh at 2010-08-18T18:57:24+00:00 Fix installation in the GHC build system Data-files are now in subdirectories, so we need to handle that - - - - - 88ebab0a by Ian Lynagh at 2010-08-18T19:43:53+00:00 GHC build system: Add all the data files to BINDIST_EXTRAS - - - - - 65837172 by David Waern at 2010-08-29T20:12:34+00:00 Update Test - - - - - 094bbaa2 by David Waern at 2010-08-29T20:55:14+00:00 Revert update to Test - - - - - a881cfb3 by David Waern at 2010-08-31T18:24:15+00:00 Bump version number - - - - - 1fc8a3eb by David Waern at 2010-08-31T22:32:27+00:00 Update ANNOUNCE - - - - - ee1df9d0 by David Waern at 2010-08-31T22:33:11+00:00 Update CHANGES - - - - - 394cc854 by David Waern at 2010-08-31T22:33:23+00:00 Update interface file versioning to work with ghc 6.14/15 - - - - - 7d03b79b by David Waern at 2010-08-31T22:36:00+00:00 Update test output following version change - - - - - a48d82d1 by Mark Lentczner at 2010-09-01T04:29:35+00:00 sort options in doc to match --help output removed --html-help option, as it is no longer supported - - - - - 06561aeb by Mark Lentczner at 2010-09-01T05:29:32+00:00 update options documentation rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents - - - - - 57dea832 by Mark Lentczner at 2010-09-01T05:31:27+00:00 slight wording change about Frames mode - - - - - fa1f6da3 by David Waern at 2010-09-01T10:57:44+00:00 Update doc configure script to find docbook stylesheets on arch linux - - - - - addff770 by David Waern at 2010-09-01T11:02:29+00:00 Wibble - - - - - 8399006d by David Waern at 2010-09-01T11:19:21+00:00 Replace ghci> with >>> in example syntax - - - - - 35074cf8 by David Waern at 2010-09-01T19:03:27+00:00 Improve docs for --no-tmp-comp-dir - - - - - 0f8f8cfd by David Waern at 2010-09-02T11:22:27+00:00 Add a list of contributors to the user guide Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. - - - - - 42ccf099 by David Waern at 2010-09-02T11:29:22+00:00 Update copyright years in license - - - - - 0d560479 by David Waern at 2010-09-02T11:38:52+00:00 Update release instructions - - - - - 72ab7796 by David Waern at 2010-09-02T19:27:08+00:00 Add a note to ANNOUNCE - - - - - bf9d9c5d by David Waern at 2010-09-02T19:27:48+00:00 H.Utils needs FFI on Win+MinGW - - - - - 048ae44a by Mark Lentczner at 2010-09-04T23:19:47+00:00 make TOC group header identifiers validate - - - - - 8c6faf36 by Simon Michael at 2010-09-22T07:12:34+00:00 add hints for cleaner darcs show authors output - - - - - 9909bd17 by Simon Michael at 2010-09-22T17:58:06+00:00 print haddock coverage info on stdout when generating docs A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability. - - - - - 6da72171 by David Waern at 2010-10-03T21:31:24+00:00 Style wibble - - - - - 2f8d8e4d by Tobias Brandt at 2010-08-27T07:01:21+00:00 adding the option to fully qualify identifiers - - - - - 833be6c6 by Tobias Brandt at 2010-08-27T15:50:28+00:00 adding support for local and relative name qualification - - - - - df15c4e9 by Tobias Brandt at 2010-08-27T15:56:37+00:00 corrected qualification help message - - - - - 449e9ce1 by David Waern at 2010-10-16T17:34:30+00:00 Solve conflicts - - - - - 3469bda5 by David Waern at 2010-10-16T18:42:40+00:00 Use "qual" as an abbreviation for qualification instead of "quali" for consistency - - - - - 97c2d728 by David Waern at 2010-10-16T18:47:07+00:00 Style police - - - - - ce14fbea by David Waern at 2010-10-16T21:15:25+00:00 Style police - - - - - fdf29e9d by David Waern at 2010-10-17T00:30:44+00:00 Add a pointer to the style guide - - - - - 8e6b44e8 by rrnewton at 2010-10-24T03:19:28+00:00 Change to index pages: include an 'All' option even when subdividing A-Z. - - - - - 755b131c by David Waern at 2010-11-14T19:39:36+00:00 Bump version - - - - - d0345a04 by David Waern at 2010-11-14T19:41:59+00:00 TAG 2.8.1 - - - - - f6221508 by Simon Peyton Jones at 2010-09-13T09:53:00+00:00 Adapt to minor changes in internal GHC functions - - - - - 1290713d by Ian Lynagh at 2010-09-15T10:37:18+00:00 Remove duplicate Outputable instance for Data.Map.Map - - - - - 87f69eef by Ian Lynagh at 2010-09-21T15:01:10+00:00 Bump GHC dep upper bound - - - - - af36e087 by Ian Lynagh at 2010-09-21T15:12:02+00:00 Fix up __GLASGOW_HASKELL__ tests - - - - - ad67716c by Ian Lynagh at 2010-09-21T20:31:35+00:00 Don't build haddock is HADDOCK_DOCS is NO - - - - - 63b3f1f5 by Ian Lynagh at 2010-09-21T21:39:51+00:00 Fixes for when HADDOCK_DOCS=NO - - - - - e92bfa42 by Ian Lynagh at 2010-09-29T21:15:38+00:00 Fix URL creation on Windows: Use / not \ in URLs. Fixes haskell/haddock#4353 - - - - - 66c55e05 by Ian Lynagh at 2010-09-30T17:03:34+00:00 Tidy up haddock symlink installation In particular, it now doesn't get created if we aren't installing haddock. - - - - - 549b5556 by Ian Lynagh at 2010-10-23T21:17:14+00:00 Follow extension-flattening change in GHC - - - - - d7c2f72b by David Waern at 2010-11-14T20:17:55+00:00 Bump version to 2.8.2 - - - - - 6989a3a9 by David Waern at 2010-11-14T20:26:01+00:00 Solve conflict - - - - - 055c6910 by Ian Lynagh at 2010-09-22T15:36:20+00:00 Bump GHC dep - - - - - c96c0763 by Simon Marlow at 2010-10-27T11:09:44+00:00 follow changes in the GHC API - - - - - 45907129 by David Waern at 2010-11-07T14:00:58+00:00 Update the HCAR entry - - - - - 61940b95 by David Waern at 2010-11-07T14:07:34+00:00 Make the HCAR entry smaller - - - - - aa590b7d by David Waern at 2010-11-14T21:30:59+00:00 Update HCAR entry with November 2010 version - - - - - 587f9847 by David Waern at 2010-11-14T23:48:17+00:00 Require ghc >= 7.0 - - - - - ff5c647c by David Waern at 2010-11-14T23:49:09+00:00 TAG 2.8.2 - - - - - 937fcb4f by David Waern at 2010-11-14T23:49:45+00:00 Solve conflict - - - - - 8e5d0c1a by David Waern at 2010-11-15T21:09:50+00:00 Remove code for ghc < 7 - - - - - 3d47b70a by David Waern at 2010-11-15T21:11:06+00:00 Fix bad merge - - - - - 7f4a0d8a by David Waern at 2010-11-15T21:13:57+00:00 Remove more ghc < 7 code - - - - - 9ee34b50 by David Waern at 2010-11-15T21:31:25+00:00 Match all AsyncExceptions in exception handler - - - - - 42849c70 by David Waern at 2010-11-15T21:35:31+00:00 Just say "internal error" instead of "internal Haddock or GHC error" - - - - - c88c809b by David Waern at 2010-11-15T21:44:19+00:00 Remove docNameOcc under the motto "don't name compositions" - - - - - b798fc7c by David Waern at 2010-11-15T23:27:13+00:00 Wibble - - - - - 2228197e by David Waern at 2010-11-15T23:28:24+00:00 Rename the HCAR entry file - - - - - 8a3f9090 by David Waern at 2010-11-16T00:05:29+00:00 Remove Haskell 2010 extensions from .cabal file - - - - - c7a0c597 by David Waern at 2010-11-16T00:10:28+00:00 Style wibbles - - - - - cde707a5 by David Waern at 2010-11-16T00:12:00+00:00 Remove LANGUAGE ForeignFunctionInterface pragmas - - - - - 1dbda8ed by David Waern at 2010-11-16T00:17:21+00:00 Make a little more use of DoAndIfThenElse - - - - - 4c45ff6e by David Waern at 2010-11-16T00:59:41+00:00 hlint police - - - - - d2feaf09 by David Waern at 2010-11-16T01:14:15+00:00 hlint police - - - - - 99876e97 by David Waern at 2010-11-20T19:06:00+00:00 Haddock documentation updates - - - - - 65ce6987 by David Waern at 2010-11-20T19:42:51+00:00 Follow the style guide closer in Haddock.Types and improve docs - - - - - 28ca304a by tob.brandt at 2010-11-20T17:04:40+00:00 add full qualification for undocumented names - - - - - d61341e3 by David Waern at 2010-11-20T20:04:15+00:00 Re-structure qualification code a little - - - - - 0057e4d6 by David Waern at 2010-11-20T20:07:55+00:00 Re-order functions - - - - - d7279afd by David Waern at 2010-11-21T03:39:54+00:00 Add BangPatterns to alex and happy source files - - - - - 629fe60e by tob.brandt at 2010-11-23T23:35:11+00:00 documentation for qualification - - - - - 37031cee by David Waern at 2010-11-23T21:06:44+00:00 Update CHANGES - don't mention 2.8.2, we won't release it - - - - - f2489e19 by David Waern at 2010-12-01T21:57:11+00:00 Update deps of runtests.hs to work with ghc 7.0.1 - - - - - d3657e9a by David Waern at 2010-12-01T22:04:57+00:00 Make tests compile with ghc 7.0.1 - - - - - a2f09d9b by David Waern at 2010-12-01T22:06:59+00:00 Update tests following version bump - - - - - 50883ebb by David Waern at 2010-12-06T14:09:18+00:00 Update tests following recent changes - - - - - fc2fadeb by David Waern at 2010-12-06T14:17:29+00:00 Add a flag --pretty-html for rendering indented html with newlines - - - - - 30832ef2 by David Waern at 2010-12-06T14:17:35+00:00 Use --pretty-html when running the test suite. Makes it easier to compare output - - - - - a0b81b31 by David Waern at 2010-12-06T14:18:27+00:00 Wibble - - - - - 3aaa23fe by David Waern at 2010-12-06T14:19:29+00:00 Haddockify ppHtml comments - - - - - 24bb24f0 by David Waern at 2010-12-06T14:23:15+00:00 Remove --debug. It was't used, and --verbosity should take its place - - - - - 6bc076e5 by David Waern at 2010-12-06T14:25:37+00:00 Rename golden-tests into html-tests. "golden tests" sounds strange - - - - - 53301e55 by David Waern at 2010-12-06T14:26:26+00:00 QUALI -> QUAL in the description --qual for consistency - - - - - 98b6affb by David Waern at 2010-12-06T21:54:02+00:00 Bump version - - - - - 371bf1b3 by David Waern at 2010-12-06T22:08:55+00:00 Update tests following version bump - - - - - 25be762d by David Waern at 2010-12-06T22:21:03+00:00 Update CHANGES - - - - - 7c7dac71 by David Waern at 2010-12-06T22:33:43+00:00 Update ANNOUNCE - - - - - 30d7a5f2 by Simon Peyton Jones at 2010-11-15T08:38:38+00:00 Alex generates BangPatterns, so make Lex.x accept them (It'd be better for Alex to generate this pragma.) - - - - - 605e8018 by Simon Marlow at 2010-11-17T11:37:24+00:00 Add {-# LANGUAGE BangPatterns #-} to mollify GHC - - - - - a46607ba by David Waern at 2010-12-07T14:08:10+00:00 Solve conflicts - - - - - b28cda66 by David Waern at 2010-12-09T20:41:35+00:00 Docs: Mention that \ is a special character in markup - - - - - a435bfdd by Ian Lynagh at 2010-11-17T14:01:19+00:00 TAG GHC 7.0.1 release - - - - - 5a15a05a by David Waern at 2010-12-11T17:51:19+00:00 Fix indentation problem - - - - - 4232289a by Lennart Kolmodin at 2010-12-17T18:32:03+00:00 Revise haddock.cabal given that we now require ghc-7 default-language should be Haskell2010, slight new semantics for extensions. Rewrite into clearer dependencies of base and Cabal. - - - - - a36302dc by David Waern at 2010-12-19T17:12:37+00:00 Update CHANGES - - - - - 7c8b85b3 by David Waern at 2010-12-19T17:14:24+00:00 Bump version - - - - - cff22813 by Ian Lynagh at 2011-01-05T18:24:27+00:00 Write hoogle output in utf8; fixes GHC build on Windows - - - - - c7e762ea by David Waern at 2011-01-22T00:00:35+00:00 Put title outside doc div when HTML:fying title+prologue Avoids indenting the title, and makes more sense since the title is not a doc string anyway. - - - - - 5f639054 by David Waern at 2011-01-22T16:09:44+00:00 Fix spelling error - contributed by Marco Silva - - - - - c11dce78 by Ian Lynagh at 2011-01-07T02:33:11+00:00 Follow GHC build system changes - - - - - 101cfaf5 by David Waern at 2011-01-08T14:06:44+00:00 Bump version - - - - - af62348b by David Waern at 2011-01-08T14:07:07+00:00 TAG 2.9.2 - - - - - 4d1f6461 by Ian Lynagh at 2011-01-07T23:06:57+00:00 Name the haddock script haddock-ghc-7.0.2 instead of haddock-7.0.2; haskell/haddock#4882 "7.0.2" looked like a haddock version number before - - - - - 8ee4d5d3 by Simon Peyton Jones at 2011-01-10T17:31:12+00:00 Update Haddock to reflect change in hs_tyclds field of HsGroup - - - - - 06f3e3db by Ian Lynagh at 2011-03-03T15:02:37+00:00 TAG GHC 7.0.2 release - - - - - 7de0667d by David Waern at 2011-03-10T22:47:13+00:00 Update CHANGES - - - - - 33a9f1c8 by David Waern at 2011-03-10T22:47:31+00:00 Fix build with ghc 7.0.1 - - - - - 4616f861 by David Waern at 2011-03-10T22:47:50+00:00 TAG 2.9.2-actual - - - - - 0dab5e3c by Simon Hengel at 2011-04-08T15:53:01+00:00 Set shell script for unit tests back to work - - - - - 85c54dee by Simon Hengel at 2011-04-08T16:01:24+00:00 Set unit tests back to work Here "ghci>" was still used instead of ">>>". - - - - - 1cea9b78 by Simon Hengel at 2011-04-08T16:25:36+00:00 Update runtests.hs for GHC 7.0.2 - - - - - 8e5b3bbb by Simon Hengel at 2011-04-08T16:28:49+00:00 Update Haddock version in *.html.ref - - - - - 2545e955 by Simon Hengel at 2011-04-08T17:09:28+00:00 Add support for blank lines in the result of examples Result lines that only contain the string "<BLANKLINE>" are treated as a blank line. - - - - - adf64d2e by Simon Hengel at 2011-04-08T17:36:50+00:00 Add documentation for "support for blank lines in the result of examples" - - - - - c51352ca by David Waern at 2011-05-21T23:57:56+00:00 Improve a haddock comment - - - - - 7419cf2c by David Waern at 2011-05-22T15:41:52+00:00 Use cabal's test suite support to run the test suite This gives up proper dependency tracking of the test script. - - - - - 7770070c by David Waern at 2011-05-22T01:45:44+00:00 We don't need to send DocOptions nor a flag to mkExportItems - - - - - 9d95b7b6 by David Waern at 2011-05-22T21:39:03+00:00 Fix a bug - - - - - 1f93699b by David Waern at 2011-05-22T21:40:21+00:00 Break out fullContentsOf, give it a better name and some documentation The documentation describes how we want this function to eventually behave, once we have fixed a few problems with the current implementation. - - - - - 9a86432f by David Waern at 2011-05-22T21:53:52+00:00 Fix some stylistic issues in mkExportItems - - - - - c271ff0c by David Waern at 2011-05-22T22:09:11+00:00 Indentation - - - - - 93e602b1 by David Waern at 2011-06-10T01:35:31+00:00 Add git commits since switchover: darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower at hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo at earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm at cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo at earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC - - - - - 498da5ae by David Waern at 2011-06-11T00:33:33+00:00 * Merge in git patch from Michal Terepeta >From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001 From: Michal Terepeta <michal.terepeta at gmail.com> Date: Sat, 14 May 2011 19:18:22 +0200 Subject: [PATCH] Follow the change of TypeSig in GHC. This follows the change in GHC to make TypeSig take a list of names (instead of just one); GHC ticket haskell/haddock#1595. This should also improve the Haddock output in case the user writes a type signature that refers to many names: -- | Some comment.. foo, bar :: ... will now generate the expected output with one signature for both names. - - - - - 094607fe by Ian Lynagh at 2011-06-17T19:10:29+01:00 Fix build - - - - - 8fa35740 by Ian Lynagh at 2011-06-26T21:06:40+01:00 Bump GHC dep to allow 7.2 - - - - - e4d2ca3c by Ian Lynagh at 2011-07-07T23:06:28+01:00 Relax base dep - - - - - b948fde9 by Ian Lynagh at 2011-07-28T16:39:45+01:00 GHC build system: Don't install the datafiles twice - - - - - f82f6d70 by Simon Marlow at 2011-08-11T12:08:15+01:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - b341cc12 by Max Bolingbroke at 2011-08-22T20:25:27+01:00 Fix compilation with no-pred-ty GHC - - - - - 30494581 by Max Bolingbroke at 2011-08-23T10:20:54+01:00 Remaining fixes for PredTy removal - - - - - 0b197138 by Max Bolingbroke at 2011-08-26T08:27:45+01:00 Rename factKind to constraintKind - - - - - a379bec5 by Max Bolingbroke at 2011-09-04T12:54:47+01:00 Deal with change to IParam handling in GHC - - - - - f94e421b by Max Bolingbroke at 2011-09-06T17:34:31+01:00 Adapt Haddock for the ConstraintKind extension changes - - - - - 8821e5cc by Max Bolingbroke at 2011-09-09T08:24:59+01:00 Ignore associated type defaults (just as we ignore default methods) - - - - - 31a0afd4 by Max Bolingbroke at 2011-09-09T09:06:00+01:00 Merge branch 'no-pred-ty' of ssh://darcs.haskell.org/srv/darcs/haddock into no-pred-ty - - - - - dd3b530a by Max Bolingbroke at 2011-09-09T14:10:25+01:00 Merge branch 'no-pred-ty' Conflicts: src/Haddock/Convert.hs - - - - - 5f25ec96 by Max Bolingbroke at 2011-09-09T14:10:40+01:00 Replace FactTuple with ConstraintTuple - - - - - cd30b9cc by David Waern at 2011-09-26T02:17:55+02:00 Bump to version 2.9.3 - - - - - 4fbfd397 by Max Bolingbroke at 2011-09-27T14:55:21+01:00 Follow changes to BinIface Name serialization - - - - - 92257d90 by David Waern at 2011-09-30T23:45:07+02:00 Fix problem with test files not added to distribution tarball - - - - - 00255bda by David Waern at 2011-09-30T23:48:24+02:00 Merge branch 'development' - - - - - 5421264f by David Waern at 2011-10-01T01:25:39+02:00 Merge in darcs patch from Simon Meier: Wed Jun 1 19:41:16 CEST 2011 iridcode at gmail.com * prettier haddock coverage info The new coverage info rendering uses less horizontal space. This reduces the number of unnecessary line-wrappings. Moreover, the most important information, how much has been documented already, is now put up front. Hopefully, this makes it more likely that a library author is bothered by the low coverage of his modules and fixes that issue ;-) - - - - - 07d318ef by David Waern at 2011-10-01T01:34:10+02:00 Use printException instead of deprecated printExceptionAndWarnings - - - - - 40d52ee4 by David Waern at 2011-10-01T01:41:13+02:00 Merge in darcs pach: Mon Apr 11 18:09:54 JST 2011 Liyang HU <haddock at liyang.hu> * Remember collapsed sections in index.html / haddock-util.js - - - - - 279d6dd4 by David Waern at 2011-10-01T01:55:45+02:00 Merge in darcs patch: Joachim Breitner <mail at joachim-breitner.de>**20110619201645 Ignore-this: f6c51228205b0902ad5bfad5040b989a As reported on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578301, generating the global index takes much too long if type-level (with lots of auto-generated types) is installed. The patch avoids a quadratic runtime in the subfunction getIfaceIndex of ppHtmlIndex by using a temporary set. Runtime improvement observed here from 25.36s to 2.86s. - - - - - d1612383 by David Waern at 2011-10-01T01:56:48+02:00 Merge branch 'development' - - - - - 347520c1 by David Waern at 2011-10-01T01:56:54+02:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9a0c95e8 by David Waern at 2011-10-01T02:19:10+02:00 Improve .cabal file - - - - - 6967dc64 by Ian Lynagh at 2011-10-01T01:34:06+01:00 Follow changes to ForeignImport/ForeignExport in GHC - - - - - 565cb26b by Simon Marlow at 2011-10-04T00:15:04+02:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - 8b74f512 by David Waern at 2011-10-04T00:18:17+02:00 Requre ghc >= 7.2 - - - - - 271d360c by David Waern at 2011-10-04T00:22:50+02:00 Bump version to 2.9.4 - - - - - 37f3edb0 by David Waern at 2011-10-06T02:30:21+02:00 Add alex and happy to build-tools. - - - - - 7ac2bb6e by David Terei at 2011-10-12T14:02:55-07:00 Add safe haskell indication to haddock output - - - - - 42c91a47 by David Terei at 2011-10-12T14:06:03-07:00 Fix CSS issue with info table not being contained in module header - - - - - 0eddab6c by David Terei at 2011-10-12T14:06:58-07:00 Add safe haskell indication to haddock output - - - - - 3df058eb by David Terei at 2011-10-12T14:07:07-07:00 Fix CSS issue with info table not being contained in module header - - - - - a40a6c3f by David Waern at 2011-10-22T11:29:06+02:00 Bump .haddock file version since the format has changed recently - - - - - 8a6254be by David Waern at 2011-10-22T11:30:42+02:00 Merge branch 'development' - - - - - 642e3e02 by David Waern at 2011-10-23T21:23:39+02:00 Sort import list - - - - - 36371cf8 by David Waern at 2011-10-23T22:48:18+02:00 Remove NEW_GHC_LAYOUT conditional. - - - - - 5604b499 by David Waern at 2011-10-27T00:15:03+02:00 Add --print-ghc-path. - - - - - 463499fa by David Waern at 2011-10-27T00:16:22+02:00 Make testsuite able to find its dependencies automatically. - - - - - a3506172 by Ryan Newton at 2011-11-05T05:59:58-04:00 Improved declNames internal error. Added a case to handle DocD. - - - - - 001b8baf by David Waern at 2011-11-05T20:37:29+01:00 Rename copy.hs -> accept.hs. - - - - - 55d808d3 by David Waern at 2011-11-05T23:30:02+01:00 Fix build. - - - - - deb5c3be by David Waern at 2011-11-06T00:01:47+01:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9b663554 by David Waern at 2011-11-06T00:03:45+01:00 Merge https://github.com/rrnewton/haddock - - - - - 1abb0ff6 by David Waern at 2011-11-06T01:20:37+01:00 Use getDeclMainBinder instead of declNames. - - - - - 4b005c01 by David Waern at 2011-11-06T19:09:53+01:00 Fix build. - - - - - c2c51bc7 by Ian Lynagh at 2011-11-06T23:01:33+00:00 Remove -DNEW_GHC_LAYOUT in ghc.mk - - - - - f847d703 by Jose Pedro Magalhaes at 2011-11-11T09:07:39+00:00 New kind-polymorphic core This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds - - - - - 7d7c3b09 by Jose Pedro Magalhaes at 2011-11-16T21:42:22+01:00 Follow changes to tuple sorts in master - - - - - 8430e03e by Simon Peyton Jones at 2011-11-17T10:20:27+00:00 Remove redundant imports - - - - - d1b06832 by Ian Lynagh at 2011-11-19T01:33:21+00:00 Follow GHC build system change to the way we call rm - - - - - 9e2230ed by David Waern at 2011-11-24T15:00:24+01:00 Fix a bug in test runner and get rid of regex-compat dependency. - - - - - 52039b21 by David Waern at 2011-11-24T23:55:36+01:00 Avoid haskell98 dependency in test - - - - - 92e1220d by David Waern at 2011-11-25T00:03:33+01:00 Avoid depency on regex-compat also in accept.hs. - - - - - ddac6b6f by David Waern at 2011-11-25T02:13:38+01:00 Accept test output. - - - - - 5a720455 by David Waern at 2011-11-25T02:16:20+01:00 Some more changes to test scripts. - - - - - 170a9004 by David Waern at 2011-11-25T02:30:41+01:00 Add flag --interface-version. - - - - - d225576c by David Waern at 2011-11-25T02:39:26+01:00 Remove #ifs for older compiler versions. - - - - - f0d0a4f5 by David Waern at 2011-11-26T04:20:12+01:00 Give preference to type over data constructors for doc comment links at renaming time. Previously this was done in the backends. Also, warn when a doc comment refers to something that is in scope but which we don't have the .haddock file for. These changes mean we can make DocIdentifier [a] into DocIdentifier a. - - - - - eef0e776 by David Waern at 2011-11-26T17:01:06+01:00 Allow doc comments to link to out-of-scope things (#78). (A bug that should have been fixed long ago.) - - - - - 565ad529 by David Waern at 2011-11-26T19:56:21+01:00 Update tests. - - - - - fb3ce7b9 by David Waern at 2011-11-26T21:44:28+01:00 Cleanup. - - - - - d0328126 by David Waern at 2011-11-26T22:10:28+01:00 Fix module reference bug. - - - - - c03765f8 by David Waern at 2011-12-03T05:20:20+01:00 Slightly better behaviour on top-levels without type signatures. - Docs don't get attached to the next top-level with signature by mistake. - If there's an export list and the top-level is part of it, its doc comment shows up in the documentation. - - - - - 48461d31 by David Waern at 2011-12-03T05:38:10+01:00 Add a test for Unicode doc comments. - - - - - 549c4b4e by David Waern at 2011-12-03T19:07:55+01:00 Cleanup. - - - - - 7bfecf91 by David Waern at 2011-12-03T20:13:08+01:00 More cleanup. - - - - - 14fab722 by Ian Lynagh at 2011-12-12T21:21:35+00:00 Update dependencies and binaryInterfaceVersion - - - - - 469e6568 by Ian Lynagh at 2011-12-18T12:56:16+00:00 Fix (untested) building from source tarball without alex/happy haddock's .cabal file was declaring that it needed alex and happy to build, but in the GHC source tarballs it doesn't. - - - - - 895c9a8c by David Waern at 2011-12-27T12:57:43+01:00 Go back to having a doc, sub and decl map instead of one big decl map. This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer. - - - - - 736767d9 by David Waern at 2011-12-27T13:33:41+01:00 Merge ../../../haddock Conflicts: src/Haddock/InterfaceFile.hs - - - - - 20016f79 by David Waern at 2011-12-27T13:57:23+01:00 Bump version. - - - - - 31f276fb by David Waern at 2011-12-27T13:57:32+01:00 Merge ../ghc/utils/haddock - - - - - 95b367cd by David Waern at 2011-12-27T14:57:29+01:00 Update tests following version bump. - - - - - fa3c94cd by David Waern at 2011-12-27T14:57:51+01:00 Get rid of quite unnecessary use of different lists. - - - - - 9c4d3c54 by David Waern at 2011-12-27T15:26:42+01:00 Cleanup. - - - - - 2caf9f90 by David Waern at 2011-12-27T16:18:05+01:00 Wibbles. - - - - - 3757d09b by David Waern at 2011-12-27T20:50:26+01:00 Complete support for inferring types for top-level bindings. - - - - - 53418734 by David Waern at 2011-12-28T15:02:13+01:00 Minor fixes and cleanup. - - - - - 0c9d0385 by Ian Lynagh at 2012-01-03T18:31:29+00:00 Follow rename of Instance to ClsInst in GHC - - - - - c9bc969a by Simon Hengel at 2012-01-12T21:28:14+01:00 Make sure that generated xhtml is valid (close haskell/haddock#186) Thanks to Phyx. - - - - - 836a0b9a by David Waern at 2012-02-01T02:30:05+01:00 Fix bug introduced in my recent refactoring. - - - - - c7d733eb by David Waern at 2012-02-01T02:30:26+01:00 Cleanup mkMaps and avoid quadratic behaviour. - - - - - da3cda8f by David Waern at 2012-02-01T02:56:56+01:00 Require ghc >= 7.4. - - - - - 83a3287e by David Waern at 2012-02-01T02:57:36+01:00 Update CHANGES. - - - - - 93408f0b by Simon Hengel at 2012-02-04T00:48:04+01:00 Add reference renderings - - - - - 49d00d2c by Simon Hengel at 2012-02-04T00:48:25+01:00 Set unit tests for parser back to work - - - - - eb450980 by Simon Hengel at 2012-02-04T00:49:07+01:00 Add .gitignore - - - - - a841602c by Simon Hengel at 2012-02-04T00:49:16+01:00 Add .ghci file - - - - - 8861199d by Simon Hengel at 2012-02-04T00:49:29+01:00 tests/html-tests/copy.hs: Use mapM_ instead of mapM So we do net get a list of () on stdout when running with runhaskell. - - - - - b477d9b5 by Simon Hengel at 2012-02-04T00:49:46+01:00 Remove index files from golden tests - - - - - 9dbda34e by Simon Hengel at 2012-02-04T00:49:57+01:00 Add /tests/html-tests/tests/*index*.ref to .gitignore - - - - - a9434817 by Simon Hengel at 2012-02-04T00:50:04+01:00 Add DocWarning to Doc The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis. - - - - - de2fb6fa by Simon Hengel at 2012-02-04T00:50:13+01:00 Add support for module warnings - - - - - 0640920e by Simon Hengel at 2012-02-04T00:50:21+01:00 Add tests for module warnings - - - - - 30ce0d77 by Simon Hengel at 2012-02-04T00:50:29+01:00 Add support for warnings - - - - - bb367960 by Simon Hengel at 2012-02-04T00:50:37+01:00 Add tests for warnings - - - - - 6af1dc2d by Simon Hengel at 2012-02-04T00:50:50+01:00 Expand type signatures in export list (fixes haskell/haddock#192) - - - - - a06cbf25 by Simon Hengel at 2012-02-04T00:51:04+01:00 Expand type signatures for modules without explicit export list - - - - - 57dda796 by Simon Hengel at 2012-02-04T00:51:15+01:00 Remove obsolete TODO - - - - - 270c3253 by David Waern at 2012-02-04T00:51:24+01:00 Fix issues in support for warnings. * Match against local names only. * Simplify (it's OK to map over the warnings). - - - - - 683634bd by David Waern at 2012-02-04T00:55:11+01:00 Some cleanup and make sure we filter warnings through exports. - - - - - 210cb4ca by David Waern at 2012-02-04T03:01:30+01:00 Merge branch 'fix-for-186' of https://github.com/sol/haddock into ghc-7.4 - - - - - e8db9031 by David Waern at 2012-02-04T03:07:51+01:00 Style police. - - - - - 261f9462 by David Waern at 2012-02-04T03:20:16+01:00 Update tests. - - - - - 823cfc7c by David Waern at 2012-02-04T03:21:12+01:00 Use mapM_ in accept.hs as well. - - - - - 873dd619 by David Waern at 2012-02-04T03:21:33+01:00 Remove copy.hs - use accept.hs instead. - - - - - 0e31a14a by David Waern at 2012-02-04T03:47:33+01:00 Use <> instead of mappend. - - - - - 2ff7544f by David Waern at 2012-02-04T03:48:55+01:00 Remove code for older ghc versions. - - - - - dacf2786 by David Waern at 2012-02-04T15:52:51+01:00 Clean up some code from last SoC project. - - - - - 00cbb117 by David Waern at 2012-02-04T21:43:49+01:00 Mostly hlint-inspired cleanup. - - - - - 7dc86cc2 by Simon Peyton Jones at 2012-02-06T09:14:41+00:00 Track changes in HsDecls - - - - - f91f82fe by Ian Lynagh at 2012-02-16T13:40:11+00:00 Follow changes in GHC caused by the CAPI CTYPE pragma - - - - - a0ea6b0b by Ian Lynagh at 2012-02-22T02:26:12+00:00 Follow changes in GHC - - - - - b23b07d1 by Simon Peyton Jones at 2012-03-02T16:36:41+00:00 Follow changes in data representation from the big PolyKinds commit - - - - - 43406022 by Simon Hengel at 2012-03-05T11:18:34+01:00 Save/restore global state for static flags when running GHC actions This is necessary if we want to run createInterfaces (from Documentation.Haddock) multiple times in the same process. - - - - - 9fba16fe by Paolo Capriotti at 2012-03-06T10:57:33+00:00 Update .gitignore. - - - - - a9325044 by Simon Peyton Jones at 2012-03-14T17:35:42+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - fd48065a by Iavor Diatchki at 2012-03-15T22:43:35-07:00 Add support for type-level literals. - - - - - 2e8206dd by Simon Peyton Jones at 2012-03-16T14:18:22+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - 93e13319 by Simon Peyton Jones at 2012-03-17T01:04:05+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock Conflicts: src/Haddock/Convert.hs - - - - - d253fa71 by Iavor Diatchki at 2012-03-19T20:12:18-07:00 Merge remote-tracking branch 'origin/master' into type-nats - - - - - fc40acc8 by Iavor Diatchki at 2012-03-19T20:31:27-07:00 Add a missing case for type literals. - - - - - fd2ad699 by Iavor Diatchki at 2012-03-24T13:28:29-07:00 Rename variable to avoid shadowing warning. - - - - - 9369dd3c by Simon Peyton Jones at 2012-03-26T09:14:23+01:00 Follow refactoring of TyClDecl/HsTyDefn - - - - - 38825ca5 by Simon Peyton Jones at 2012-03-26T09:14:37+01:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - 4324ac0f by David Waern at 2012-04-01T01:51:19+02:00 Disable unicode test. - - - - - 3165b750 by David Waern at 2012-04-01T01:51:34+02:00 Take reader environment directly from TypecheckedSource. - - - - - 213b644c by David Waern at 2012-04-01T01:55:20+02:00 Cleanup. - - - - - 3118b4ba by David Waern at 2012-04-01T02:16:15+02:00 Don't filter out unexported names from the four maps - fixes a regression. - - - - - d6524e17 by David Waern at 2012-04-01T02:40:34+02:00 Fix crash when using --qual. Naughty GHC API! - - - - - ea3c43d8 by Henning Thielemann at 2012-04-01T13:03:07+02:00 add QualOption type for distinction between qualification argument given by the user and the actual qualification for a concrete module - - - - - 5422ff05 by Henning Thielemann at 2012-04-01T16:25:02+02:00 emit an error message when the --qual option is used incorrectly - - - - - 026e3404 by David Waern at 2012-04-01T18:10:30+02:00 Don't crash on unicode strings in doc comments. - - - - - ce006632 by David Waern at 2012-04-01T20:13:35+02:00 Add test for --ignore-all-exports flag/ignore-exports pragma. - - - - - 6e4dd33c by David Waern at 2012-04-01T20:21:03+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.4 - - - - - 734ae124 by Henning Thielemann at 2012-04-01T20:22:10+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - 622f9ba5 by David Waern at 2012-04-01T21:26:13+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 55ce17cb by Henning Thielemann at 2012-04-01T22:03:25+02:00 'abbreviate' qualification style - basic support Currently we ignore the package a module is imported from. This means that a module import would shadow another one with the same module name from a different package. - - - - - c85314ef by David Waern at 2012-04-01T22:05:12+02:00 Check qualification option before processing modules. - - - - - ae4b626c by Henning Thielemann at 2012-04-02T00:19:36+02:00 abbreviated qualification: use Packages.lookupModuleInAllPackages for finding the package that a module belongs to - - - - - 60bdbcf5 by Henning Thielemann at 2012-04-02T00:25:31+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - df44301d by Henning Thielemann at 2012-04-02T00:29:05+02:00 qualification style 'abbreviated' -> 'aliased' - - - - - f4192a64 by David Waern at 2012-04-02T01:05:47+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 7ba09067 by David Terei at 2012-04-04T15:08:21-07:00 Fix reporting of modules safe haskell mode (#5989) - - - - - d0cc33d0 by David Terei at 2012-04-06T15:50:41+01:00 Fix reporting of modules safe haskell mode (#5989) - - - - - 6e3434c5 by Simon Peyton Jones at 2012-04-20T18:37:46+01:00 Track changes in HsSyn - - - - - 22014ed0 by Simon Peyton Jones at 2012-05-11T22:45:15+01:00 Follow changes to LHsTyVarBndrs - - - - - d9a07b24 by David Waern at 2012-05-15T01:46:35+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - a6c4ebc6 by David Waern at 2012-05-16T02:18:32+02:00 Update CHANGES. - - - - - 8e181d29 by David Waern at 2012-05-16T02:27:56+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - e358210d by David Waern at 2012-05-16T02:35:33+02:00 Mention the new aliased --qual mode in CHANGES. - - - - - efd36a28 by David Waern at 2012-05-16T21:33:13+02:00 Bump version number. - - - - - d6b3af14 by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for deprecated record field - - - - - 927f800e by Simon Hengel at 2012-05-17T19:08:20+02:00 Use >>= instead of fmap and join - - - - - 048b41d5 by Simon Hengel at 2012-05-17T19:08:20+02:00 newtype-wrap Doc nodes for things that may have warnings attached - - - - - e3a89fc3 by Simon Hengel at 2012-05-17T19:08:20+02:00 Attach warnings to `Documentation` type - - - - - 5d4cc43d by Simon Hengel at 2012-05-17T19:08:20+02:00 Simplify lookupWarning - - - - - cf8ae69d by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for haskell/haddock#205 - - - - - cb409b19 by Simon Peyton Jones at 2012-05-25T08:30:11+01:00 Follow changes in LHsTyVarBndrs - - - - - 2d5f4179 by Simon Hengel at 2012-05-26T19:21:29+02:00 Add Applicative instance for (GenRnM a) - - - - - e4373060 by Simon Hengel at 2012-05-26T19:21:33+02:00 Use a map for warnings, as suggested by @waern - - - - - 597a68c7 by Simon Hengel at 2012-05-27T08:48:24+02:00 Add an optional label to URLs - - - - - ef1ac7fe by Simon Hengel at 2012-05-27T08:48:24+02:00 Add support for hyperlink labels to parser - - - - - 41f2adce by Simon Hengel at 2012-05-27T08:48:24+02:00 Add golden test for hyperlinks - - - - - 83d5e764 by Simon Hengel at 2012-05-27T08:50:02+02:00 Use LANGUAGE pragmas instead of default-extensions in cabal file - - - - - ddb755e5 by Simon Hengel at 2012-05-27T08:50:02+02:00 Fix typo in comment - - - - - 110676b4 by Simon Hengel at 2012-05-27T08:50:02+02:00 Add a type signature for a where-binding - - - - - 7d9ba2a0 by Ian Lynagh at 2012-06-12T14:38:01+01:00 Follow changes in GHC - - - - - 47c704f2 by Ian Lynagh at 2012-06-12T18:52:16+01:00 Follow changes in GHC - - - - - e1efe1ab by Simon Peyton Jones at 2012-06-13T17:25:29+01:00 Follow changes for the implementation of implicit parameters - - - - - 69abc81c by Ian Lynagh at 2012-06-19T22:52:58+01:00 Follow changes in base - - - - - 9d074a21 by Paolo Capriotti at 2012-06-22T18:26:47+01:00 Use right docMap to get decl documentation. - - - - - e3292ef6 by Ian Lynagh at 2012-07-15T01:31:19+01:00 Follow changes in GHC - - - - - ceae56b0 by Ian Lynagh at 2012-07-16T21:22:48+01:00 Fix haddock following some GHC changes Passing _|_ as the Settings for defaultDynFlags no longer works well enough - - - - - 9df72735 by Paolo Capriotti at 2012-07-19T16:49:32+01:00 Forward port changes from stable. - - - - - 572f5fcf by Ian Lynagh at 2012-07-19T20:38:26+01:00 Merge branch 'master' of darcs.haskell.org:/srv/darcs//haddock - - - - - 9195aca4 by Paolo Capriotti at 2012-07-20T10:27:28+01:00 Update dependencies. - - - - - 33db3923 by Ian Lynagh at 2012-07-20T17:54:43+01:00 Build with GHC 7.7 - - - - - 925a2cea by David Waern at 2012-07-23T16:50:40+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.6 Conflicts: src/Haddock/InterfaceFile.hs - - - - - d710ef97 by David Waern at 2012-07-23T16:52:07+02:00 Bump version number. - - - - - eb0c2f83 by David Waern at 2012-07-23T16:57:58+02:00 Update CHANGES. - - - - - b3f56943 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Hide "internal" instances This fixes haskell/haddock#37 (http://trac.haskell.org/haddock/ticket/37) Precisely, we show an instance iff its class and all the types are exported by non-hidden modules. - - - - - a70aa412 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Tests for hiding instances (#37) - - - - - c0f4aa58 by Simon Hengel at 2012-07-27T13:00:13+03:00 Add an other test for hiding instances (#37) - - - - - a7ed6268 by Ian Lynagh at 2012-08-07T14:48:13+01:00 Follow changes in GHC - - - - - 0ab30d38 by Ian Lynagh at 2012-08-13T22:12:27+01:00 Improve haddock memory usage - - - - - 0eaa4e30 by Ian Lynagh at 2012-08-13T23:58:46+01:00 Improve haddock memory usage - - - - - 659d26cf by Ian Lynagh at 2012-08-14T13:16:48+01:00 Remove some temporary pragmas I accidentally recorded - - - - - d97fceb6 by Simon Hengel at 2012-08-25T13:19:34+02:00 Add missing dependency to library - - - - - 4c910697 by Simon Hengel at 2012-08-28T07:39:14+02:00 Move .ghci to project root - - - - - fc3c601a by Simon Hengel at 2012-08-28T07:39:14+02:00 accept.hs: Ignore some files - - - - - 1af9b984 by Simon Hengel at 2012-08-28T07:40:04+02:00 Update reference renderings (bump version) - - - - - 980dc253 by Simon Hengel at 2012-08-28T07:40:32+02:00 Update reference renderings (remove links for ()) - - - - - 33651dbf by Simon Hengel at 2012-08-28T07:41:50+02:00 Update documentation of `runInteractiveProcess` in reference rendering - - - - - 7ab25078 by David Waern at 2012-09-07T10:38:50+02:00 Merge branch 'hiddenInstances2' of http://github.com/feuerbach/haddock into ghc-7.6 - - - - - c3de3a4b by David Waern at 2012-09-07T14:29:27+02:00 Follow changes in GHC. - - - - - 298c43ac by David Waern at 2012-09-07T14:59:24+02:00 Update CHANGES. - - - - - e797993a by David Waern at 2012-09-07T15:21:30+02:00 Update ANNOUNCE. - - - - - d0b44790 by David Waern at 2012-09-07T15:22:43+02:00 Merge branch 'hidden-instances' into ghc-7.6 - - - - - 41a4adc8 by Simon Hengel at 2012-09-08T12:08:37+02:00 Update doc/README - - - - - 71ad1040 by Simon Hengel at 2012-09-08T12:17:17+02:00 Add documentation for URL labels - - - - - 9bb41afd by Simon Peyton Jones at 2012-09-20T18:14:26+01:00 Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs - - - - - b8139bfa by Simon Hengel at 2012-09-21T14:24:16+02:00 Disable Unicode test for now - - - - - a5fafdd7 by Simon Hengel at 2012-09-21T14:35:45+02:00 Update TypeOperators test for GHC 7.6.1 Type operators can't be used as type variables anymore! - - - - - 6ccf0025 by Simon Hengel at 2012-09-21T16:02:24+02:00 Remove (Monad (Either e)) instance from ref. rendering of CrossPackageDocs I do not really understand why the behavior changed, so I'll open a ticket, so that we can further investigate. - - - - - b5c6c138 by Ian Lynagh at 2012-09-27T02:00:57+01:00 Follow changes in GHC build system - - - - - b98eded0 by David Waern at 2012-09-27T15:37:02+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 76cc2051 by David Waern at 2012-09-27T15:48:19+02:00 Update hidden instances tests. - - - - - aeaa1c59 by David Waern at 2012-09-28T10:21:32+02:00 Make API buildable with GHC 7.6. - - - - - d76be1b0 by Simon Peyton Jones at 2012-09-28T15:57:05+01:00 Merge remote-tracking branch 'origin/master' into tc-untouchables - - - - - a1922af8 by David Waern at 2012-09-28T19:50:20+02:00 Fix spurious superclass constraints bug. - - - - - bc41bdbb by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove old examples - - - - - bed7d3dd by Simon Hengel at 2012-10-01T11:30:51+02:00 Adapt parsetests for GHC 7.6.1 - - - - - dcdb22bb by Simon Hengel at 2012-10-01T11:30:51+02:00 Add test-suite section for parsetests to cabal file + get rid of HUnit dependency - - - - - 1e5263c9 by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove test flag from cabal file This was not really used. - - - - - 4beee98b by David Waern at 2012-09-28T23:42:28+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 11dd2256 by Ian Lynagh at 2012-10-03T16:17:35+01:00 Follow change in GHC build system - - - - - fbd77962 by Simon Hengel at 2012-10-03T18:49:40+02:00 Remove redundant dependency from cabal file - - - - - 09218989 by Simon Hengel at 2012-10-04T16:03:05+02:00 Fix typo - - - - - 93a2d5f9 by Simon Hengel at 2012-10-04T16:11:41+02:00 Remove trailing whitespace from cabal file - - - - - c8b46cd3 by Simon Hengel at 2012-10-04T16:12:17+02:00 Export Haddock's main entry point from library - - - - - b411e77b by Simon Hengel at 2012-10-04T16:29:46+02:00 Depend on library for executable The main motivation for this is to increase build speed. In GHC's source tree the library is not build, but all modules are now required for the executable, so that GHC's validate will now detect build failures for the library. - - - - - f8f0979f by Simon Hengel at 2012-10-05T00:32:57+02:00 Set executable flag for Setup.lhs - - - - - dd045998 by Simon Hengel at 2012-10-07T16:44:06+02:00 Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. - - - - - 7b39c3ae by Simon Hengel at 2012-10-07T17:05:45+02:00 cross-package test: re-export IsString instead of Monad There is a monad instance for Q, which is not available on platforms that do not have GHCi support. This caused CrossPackageDocs to fail on those platforms. Re-exporting IsString should test the same thing, but it works on all platforms. - - - - - 0700c605 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Fix some warnings - - - - - f78eca79 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Make -Wall proof - - - - - 6beec041 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Use listToMaybe/fromMaybe instead of safeHead/maybe - - - - - 44b8ce86 by Ian Lynagh at 2012-10-08T21:59:46+01:00 Follow changes in GHC - - - - - 6da5f702 by Simon Hengel at 2012-10-09T11:16:19+02:00 Update .ghci - - - - - 9ac1a1b9 by Kazu Yamamoto at 2012-10-09T12:45:31+02:00 Add markup support for properties - - - - - 1944cb42 by Simon Hengel at 2012-10-09T12:45:31+02:00 Simplify lexing/parsing of properties In contrast to what we do for examples, we do not really need to capture the "prompt" here. - - - - - bffd8e62 by Simon Hengel at 2012-10-09T13:40:14+02:00 Add HTML test for properties - - - - - 2fe9c5cb by Simon Hengel at 2012-10-09T13:40:21+02:00 Add unit tests for properties - - - - - 874e361b by Simon Hengel at 2012-10-09T13:40:33+02:00 Bump interface version - - - - - 2506cc37 by Simon Hengel at 2012-10-09T15:15:04+02:00 Fix parser bug - - - - - 743d2b7d by Simon Hengel at 2012-10-09T15:31:06+02:00 Allow to load interface files with compatible versions - - - - - 981a1660 by Simon Hengel at 2012-10-10T10:32:05+02:00 Export more types from Documentation.Haddock (fixes haskell/haddock#216) - - - - - dff7dc76 by Simon Hengel at 2012-10-10T11:15:19+02:00 Update ANNOUNCE and CHANGES - - - - - edd2bb01 by Simon Hengel at 2012-10-10T11:22:50+02:00 Bump version - - - - - 5039163b by Simon Hengel at 2012-10-10T13:56:04+02:00 Fix typo in documentation - - - - - e4ce34da by Simon Hengel at 2012-10-10T14:28:35+02:00 Add documentation for properties - - - - - 9555ebca by Simon Hengel at 2012-10-11T10:49:04+02:00 Remove redundant if-defs, more source documentation - - - - - 87aa67e1 by Simon Hengel at 2012-10-11T12:32:51+02:00 Adapt cabal file - - - - - c44c1dee by Simon Hengel at 2012-10-11T12:41:58+02:00 Require ghc 7.6 - - - - - 8383bc34 by Simon Hengel at 2012-10-11T12:50:24+02:00 Bump version - - - - - 1030eb38 by Simon Hengel at 2012-10-11T12:55:44+02:00 Update ANNOUNCE and CHANGES - - - - - 74955088 by Simon Hengel at 2012-10-12T09:49:31+02:00 Improve note about `binaryInterfaceVersion` (thanks David) - - - - - ee30f6b7 by Simon Hengel at 2012-10-13T13:40:59+02:00 Update version in html tests, rpm spec file, and user manual - - - - - f2861f18 by Simon Hengel at 2012-10-13T14:40:33+02:00 Remove unused MonadFix constraint - - - - - dfdf1a74 by Simon Hengel at 2012-10-13T15:15:38+02:00 Minor code simplification - - - - - 4ecd1e70 by Simon Hengel at 2012-10-13T15:33:43+02:00 Increase code locality - - - - - f7df5cc9 by Simon Hengel at 2012-10-13T16:03:12+02:00 Minor code simplification - - - - - e737eb6e by Simon Hengel at 2012-10-13T19:03:04+02:00 Handle HsExplicitListTy in renameer (fixes haskell/haddock#213) - - - - - c2dc8f17 by Simon Hengel at 2012-10-13T20:46:31+02:00 Better error messages - - - - - 14d48b4c by Simon Hengel at 2012-10-14T00:21:07+02:00 Simplify RnM type - - - - - 6c2cc547 by Simon Hengel at 2012-10-14T00:23:35+02:00 Simplify lookupRn - - - - - bc77ce85 by Simon Hengel at 2012-10-14T01:51:32+02:00 Organize unite tests hierarchically - - - - - 2306d117 by Simon Hengel at 2012-10-14T10:34:58+02:00 Handle more cases in renameType - - - - - 8a864203 by Simon Hengel at 2012-10-14T11:47:59+02:00 Add mini_HiddenInstances.html.ref and mini_HiddenInstancesB.html.ref - - - - - 3a978eca by Simon Hengel at 2012-10-14T11:49:28+02:00 Add /tests/html-tests/output/ to .gitignore - - - - - db18888a by Simon Hengel at 2012-10-14T13:38:21+02:00 Allow haddock markup in deprecation messages - - - - - e7cfee9f by Simon Hengel at 2012-10-14T14:00:23+02:00 If parsing of deprecation message fails, include it verbatim - - - - - 242a85be by Simon Hengel at 2012-10-14T14:13:24+02:00 Add description for PruneWithWarning test - - - - - 43d33df1 by Simon Hengel at 2012-10-14T15:40:53+02:00 Minor formatting change - - - - - 22768c44 by Simon Hengel at 2012-10-14T16:03:43+02:00 Properly handle deprecation messages for re-exported things (fixes haskell/haddock#220) - - - - - cb4b9111 by Simon Hengel at 2012-10-14T17:30:28+02:00 Add build artifacts for documentation to .gitignore - - - - - 854cd8de by Simon Hengel at 2012-10-14T23:34:51+02:00 unit-tests: Improve readability Add IsString instance for (Doc RdrName) + use <> instead of DocAppend. - - - - - c4446d54 by Simon Hengel at 2012-10-14T23:37:21+02:00 unit-tests: Minor refactoring Rename parse to parseParas. - - - - - 04f2703c by Simon Hengel at 2012-10-15T00:36:42+02:00 Fix typo - - - - - 3d109e44 by Simon Hengel at 2012-10-15T10:30:07+02:00 Add description for DeprecatedReExport test - - - - - 84f0985c by Simon Hengel at 2012-10-15T14:54:19+02:00 Move resources to /resources directory - - - - - a5de7ca6 by Simon Hengel at 2012-10-15T15:46:18+02:00 Move HTML tests to directory /html-test/ - - - - - e21f727d by Simon Hengel at 2012-10-15T19:32:42+02:00 Move HTML reference renderings to /html-test/ref/ - - - - - 3a3c6c75 by Simon Hengel at 2012-10-15T19:32:42+02:00 Copy css, images, etc. on accept - - - - - 40ead6dc by Simon Hengel at 2012-10-15T19:32:42+02:00 Move unit tests to /test directory - - - - - 99a28231 by Simon Hengel at 2012-10-15T19:32:42+02:00 Fix Setup.lhs /usr/bin/runhaskell is not installed on all systems. - - - - - 95faf45e by Simon Hengel at 2012-10-15T19:32:42+02:00 Make test management scripts more robust * They are now independent from the current directory, and hence can be called from everywhere * On UNIX/Linux they can now be run as scripts - - - - - 027aaa2d by Simon Hengel at 2012-10-15T19:53:40+02:00 Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. - - - - - e0266ede by Simon Hengel at 2012-10-15T20:03:43+02:00 Add test case for "spurious superclass constraints bug" - - - - - 52a2aa92 by Simon Hengel at 2012-10-15T20:28:55+02:00 Adapt accept.lhs, so that it ignores more index files - - - - - 53530781 by Simon Hengel at 2012-10-15T20:49:39+02:00 Rename html-test/runtests.lhs to html-test/run.lhs - - - - - 84518797 by Simon Hengel at 2012-10-15T20:49:39+02:00 Move source files for HTML tests to html-test/src - - - - - a911dc6c by Simon Hengel at 2012-10-15T20:49:39+02:00 Adapt output directory for HTML tests - - - - - d3c15857 by Ian Lynagh at 2012-10-16T16:54:43+01:00 Follow dopt->gopt rename - - - - - 956665a5 by Simon Hengel at 2012-10-18T08:42:48+02:00 Update html-test/README - - - - - 903b1029 by Simon Hengel at 2012-10-18T08:50:26+02:00 Use markdown for html-test/README - - - - - 150b4d63 by Ian Lynagh at 2012-10-18T16:36:00+01:00 Follow changes in GHC: 'flags' has been renamed 'generalFlags' - - - - - 41e04ff9 by Simon Hengel at 2012-11-28T09:54:35+01:00 Export missing types from Documentation.Haddock - - - - - 9be59237 by Ian Lynagh at 2012-11-30T23:20:47+00:00 Update dependencies - - - - - e06842f5 by Simon Hengel at 2012-12-07T20:58:05+01:00 Bump version - - - - - e3dbede0 by Simon Hengel at 2012-12-07T20:58:05+01:00 Add missing test files to cabal file (fixes haskell/haddock#230) - - - - - ee0dcca7 by Simon Hengel at 2012-12-07T20:58:05+01:00 Update CHANGES - - - - - 51601bdb by Simon Peyton Jones at 2012-12-19T17:28:35+00:00 Track changes in UNPACK pragma stuff - - - - - f2573bc1 by Richard Eisenberg at 2012-12-21T20:56:25-05:00 Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances. - - - - - f788d0fb by Simon Peyton Jones at 2012-12-23T15:49:58+00:00 Track changes in HsBang - - - - - ca460a0c by Simon Peyton Jones at 2012-12-23T15:50:28+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - f078fea6 by Simon Peyton Jones at 2013-01-02T08:33:13+00:00 Use InstEnv.instanceSig rather than instanceHead (name change) - - - - - 88e41305 by Simon Peyton Jones at 2013-01-14T17:10:27+00:00 Track change to HsBang type - - - - - e1ad4e19 by Kazu Yamamoto at 2013-02-01T11:59:24+09:00 Merge branch 'ghc-7.6' into ghc-7.6-merge-2 Conflicts: haddock.cabal src/Haddock/Interface/AttachInstances.hs src/Haddock/Interface/Create.hs src/Haddock/Interface/LexParseRn.hs src/Haddock/InterfaceFile.hs src/Haddock/Types.hs Only GHC HEAD can compile this. GHC 7.6.x cannot compile this. Some test fail. - - - - - 62bec012 by Kazu Yamamoto at 2013-02-06T11:12:28+09:00 Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.) - - - - - 013fd2e4 by Kazu Yamamoto at 2013-02-06T17:56:21+09:00 Refactoring instanceHead'. - - - - - 3148ce0e by Kazu Yamamoto at 2013-02-07T17:45:10+09:00 Using new syntax in html-test/src/GADTRecords.hs. - - - - - 626dabe7 by Gabor Greif at 2013-02-15T22:42:01+01:00 Typo - - - - - 1eb667ae by Ian Lynagh at 2013-02-16T17:02:07+00:00 Follow changes in base - - - - - 3ef8253a by Ian Lynagh at 2013-03-01T23:23:57+00:00 Follow changes in GHC's build system - - - - - 1a265a3c by Ian Lynagh at 2013-03-03T23:12:07+00:00 Follow changes in GHC build system - - - - - 69941c79 by Max Bolingbroke at 2013-03-10T09:38:28-07:00 Use Alex 3's Unicode support to properly lex source files as UTF-8 Signed-off-by: David Waern <david.waern at gmail.com> - - - - - ea687dad by Simon Peyton Jones at 2013-03-15T14:16:10+00:00 Adapt to tcRnGetInfo returning family instances too This API change was part of the fix to Trac haskell/haddock#4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays. - - - - - 971a30b0 by Andreas Voellmy at 2013-05-19T20:47:39+01:00 Fix for haskell/haddock#7879. Changed copy of utils/haddock/html/resources/html to use "cp -RL" rather than "cp -R". This allows users to run validate in a build tree, where the build tree was setup using lndir with a relative path to the source directory. - - - - - 31fb7694 by Ian Lynagh at 2013-05-19T20:47:49+01:00 Use "cp -L" when making $(INPLACE_LIB)/latex too - - - - - e9952233 by Simon Hengel at 2013-06-01T18:06:50+02:00 Add -itest to .ghci - - - - - b06873b3 by Mateusz Kowalczyk at 2013-06-01T18:06:50+02:00 Workaround for a failing build with --enable-tests. - - - - - e7858d16 by Simon Hengel at 2013-06-01T19:29:28+02:00 Fix broken test - - - - - 0690acb1 by Richard Eisenberg at 2013-06-21T14:08:25+01:00 Updates to reflect changes in HsDecls to support closed type families. - - - - - 7fd347ec by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 53ed81b6 by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 931c4f4f by Richard Eisenberg at 2013-07-24T13:15:59+01:00 Remove (error "synifyKind") to use WithinType, to allow haddock to process base. - - - - - 55a9c804 by Richard Eisenberg at 2013-08-02T15:54:55+01:00 Changes to reflect changes in GHC's type HsTyVarBndr - - - - - b6e9226c by Mathieu Boespflug at 2013-08-04T10:39:43-07:00 Output Copright and License keys in Xhtml backend. This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern at gmail.com> - - - - - 4c66028a by David Waern at 2013-08-04T15:27:36-07:00 Bump interface file version. - - - - - 67340163 by David Waern at 2013-08-09T16:12:51-07:00 Update tests. - - - - - 2087569b by Mateusz Kowalczyk at 2013-08-25T09:24:13+02:00 Add spec tests. This adds tests for all elements we can create during regular parsing. This also adds tests for text with unicode in it. - - - - - 97f36a11 by Mateusz Kowalczyk at 2013-08-27T06:59:12+01:00 Fix ticket haskell/haddock#247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. - - - - - 60681b4f by Mateusz Kowalczyk at 2013-08-27T21:22:48+02:00 LaTeX tests setup - - - - - fa4c27b2 by Mateusz Kowalczyk at 2013-09-02T23:21:43+01:00 Fixes haskell/haddock#253 - - - - - 1a202490 by Mateusz Kowalczyk at 2013-09-03T01:12:50+01:00 Use Hspec instead of nanospec This is motivated by the fact that Haddock tests are not ran by the GHC's ‘validate’ script so we're pretty liberal on dependencies in that area. Full Hspec gives us some nice features such as Quickcheck integration. - - - - - 8cde3b20 by David Luposchainsky at 2013-09-08T07:27:28-05:00 Fix AMP warnings Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - d10661f2 by Herbert Valerio Riedel at 2013-09-11T15:15:01+02:00 Update Git repo URL in `.cabal` file - - - - - 16a44eb5 by Richard Eisenberg at 2013-09-17T09:34:26-04:00 Revision to reflect new role annotation syntax in GHC. - - - - - 4b9833b9 by Herbert Valerio Riedel at 2013-09-18T10:15:28+02:00 Add missing `traverse` method for `GenLocated` As `Traversable` needs at least one of `traverse` or `sequenceA` to be overridden. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - b71fed5d by Simon Hengel at 2013-09-18T22:43:34+02:00 Add test helper - - - - - 4fc1ea86 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#231 - - - - - 435872f6 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#256 We inject -dynamic-too into flags before we run all our actions in the GHC monad. - - - - - b8b24abb by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Add new field to DynFlags - - - - - 49558795 by Simon Hengel at 2013-09-18T22:43:35+02:00 Fallback to ./resources when Cabal data is not found (so that themes are found during development) - - - - - bf79d05c by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Fixes haskell/haddock#5 - - - - - e1baebc2 by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Print missing documentation. Fixes haskell/haddock#258. - - - - - 02ea74de by Austin Seipp at 2013-10-09T10:52:22-05:00 Don't consider StaticFlags when parsing arguments. Instead, discard any static flags before parsing the command line using GHC's DynFlags parser. See http://ghc.haskell.org/trac/ghc/ticket/8276 Based off a patch from Simon Hengel. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 704fd5bb by Simon Hengel at 2013-11-09T00:15:13+01:00 Update HTML tests - - - - - f9fed49e by Simon Hengel at 2013-11-10T18:43:58+01:00 Bump version - - - - - 97ae1999 by Simon Peyton Jones at 2013-11-25T17:25:14+00:00 Track changes in HsSpliceTy data constructor - - - - - 59ad8268 by Simon Peyton Jones at 2014-01-10T18:17:43+00:00 Adapt to small change in Pretty's exports - - - - - 8b12e6aa by Simon Hengel at 2014-01-12T14:48:35-06:00 Some code simplification by using traverse - - - - - fc5ea9a2 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix warnings in test helper - - - - - 6dbb3ba5 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Add ByteString version of Attoparsec - - - - - 968d7774 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 One pass parser and tests. We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing. - - - - - 37a07c9c by Simon Hengel at 2014-01-12T14:48:35-06:00 Rename Haddock.ParseSpec to Haddock.ParserSpec - - - - - f0f68fe9 by Simon Hengel at 2014-01-12T14:48:35-06:00 Don't append newline to parseString input We also check that we have parsed everything with endOfInput. - - - - - 95d60093 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu at fuuzetsu.co.uk if you need the full commit history. - - - - - 7d99108c by Simon Hengel at 2014-01-12T14:48:35-06:00 Update acceptance tests - - - - - d1b59640 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Support for bold. Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs - - - - - 4b412b39 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Allow for headings inside function documentation. LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs - - - - - fdcca428 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Per-module extension flags and language listing. Any extensions that are not enabled by a used language (Haskell2010 &c) will be shown. Furthermore, any implicitly enabled are also going to be shown. While we could eliminate this either by using the GHC API or a dirty hack, I opted not to: if a user doesn't want the implied flags to show, they are recommended to use enable extensions more carefully or individually. Perhaps this will encourage users to not enable the most powerful flags needlessly. Enabled with show-extensions. Conflicts: src/Haddock/InterfaceFile.hs - - - - - 368942a2 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Bump interface version There were some breaking changes over the last few patches so we bump the interface version. This causes a big problem with testing: 1. To generate cross package docs, we first need to generate docs for the package used. 2. To generate package docs with new interface version, we need to use Haddock which has the version bumped. 3. To get Haddock with the version bump, we first need to test cross package docs 4. GOTO 1 So the problem is the chicken and the egg problem. It seems that the only solution would be to generate some interface files on the fly but it is non-trivial. To run this test, you'll have to: * build Haddock without the test (make sure everything else passes) * rebuild the packages used in the test with your shiny new binary making sure they are visible to Haddock * remove the ‘_hidden’ suffix and re-run the tests Note: because the packages currently used for this test are those provided by GHC, it's probably non-trivial to just re-build them. Preferably something less tedious to rebuild should be used and something that is not subject to change. - - - - - 124ae7a9 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow for nesting of paragraphs under lists. The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - c7913535 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow escaping in URLs and pictures. Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - 32326680 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update documentation. - - - - - fbef6406 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update maintainer - - - - - b40e82f4 by Mateusz Kowalczyk at 2014-01-13T02:39:25-06:00 Fixes haskell/haddock#271 Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - f4eafbf8 by Gergő Érdi at 2014-01-19T15:35:16-06:00 Support for -XPatternSynonyms Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - a8939591 by Austin Seipp at 2014-01-29T08:09:04-06:00 Update CPP check for __GLASGOW_HASKELL__ Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 30d7e9d5 by Gergő Érdi at 2014-01-31T00:15:01+08:00 <+>: Don't insert a space when concatenating empty nodes - - - - - a25ccd4d by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Fix @ code blocks In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. - - - - - 0f67305a by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Update tests This updates tests due to Haddock Trac haskell/haddock#271 fix and due to removal of TypeHoles as an extension from GHC. - - - - - 157322a7 by Gergő Érdi at 2014-01-31T01:03:17+08:00 Handle infix vs prefix names correctly everywhere, by explicitly specifying the context The basic idea is that "a" and "+" are either pretty-printed as "a" and "(+)" or "`a`" and "+" - - - - - aa6d9685 by Mateusz Kowalczyk at 2014-01-30T17:21:50+00:00 Correct whitespace in ‘hidden’ test for <+> change - - - - - 121872f0 by Mateusz Kowalczyk at 2014-02-09T17:59:12+00:00 Document module header. Fixes Haddock Trac haskell/haddock#270. - - - - - e3253746 by Mateusz Kowalczyk at 2014-02-10T21:37:48+00:00 Insert a space between module link and description Fixes Haddock Trac haskell/haddock#277. - - - - - 771d2384 by Mateusz Kowalczyk at 2014-02-10T23:27:21+00:00 Ensure a space between type signature and ‘Source’ This is briefly related to Haddock Trac haskell/haddock#249 and employs effectively the suggested fix _but_ it doesn't actually fix the reported issue. This commit simply makes copying the full line a bit less of a pain. - - - - - 8cda9eff by nand at 2014-02-11T15:48:30+00:00 Add support for type/data families This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 3f22c510 by nand at 2014-02-11T15:53:50+00:00 Improve display of poly-kinded type operators This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - effb2d6b by nand at 2014-02-11T15:56:50+00:00 Add test case for PatternSynonyms This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - b38faf0d by Niklas Haas at 2014-02-13T21:53:32+00:00 Get rid of re-implementation of sortBy I have no idea what this was doing lying around here, and due to the usage of tuples it's actually slower, too. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - ac1e0413 by Mateusz Kowalczyk at 2014-02-13T23:57:16+00:00 Only warn about missing docs when docs are missing This fixes the ‘Missing documentation for…’ message for modules with 100% coverage. - - - - - cae2e36a by Niklas Haas at 2014-02-15T21:56:18+00:00 Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 8bea5c3a by Mateusz Kowalczyk at 2014-02-19T05:11:34+00:00 Use a bespoke data type to indicate fixity This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment. - - - - - 5b52d57c by Niklas Haas at 2014-02-22T21:31:03+01:00 Strip a single leading space from bird tracks (#201) This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch. - - - - - 5a1315a5 by Simon Hengel at 2014-02-22T21:55:35+01:00 Turn a source code comment into specs - - - - - 784cfe58 by Mateusz Kowalczyk at 2014-02-23T05:02:22+00:00 Update test case for lifted GADT type rendering The parsing of these seems to have been fixed by GHC folk and it now renders differently. IMHO it now renders in a better way so I'm updating the test to reflect this. - - - - - c3c88c2f by Mateusz Kowalczyk at 2014-02-23T06:37:14+00:00 Don't shadow ‘strip’. -Wall complains - - - - - 293031d8 by Niklas Haas at 2014-02-23T15:21:52+01:00 Make ImplicitParams render correctly (#260) This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone) - - - - - 4200842d by Niklas Haas at 2014-02-23T15:37:13+01:00 Lower precedence of equality constraints This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC - - - - - b59e3227 by Niklas Haas at 2014-02-23T16:11:22+01:00 Add RankNTypes test case to ImplicitParams.hs This test actually tests what haskell/haddock#260 originally reported - I omitted the RankNTypes scenario from the original fix because I realized it's not relevant to the underlying issue and indeed, this renders as intended now. Still good to have more tests. - - - - - c373dbf7 by Mateusz Kowalczyk at 2014-02-24T06:09:54+00:00 Fix rendering of Contents when links are present Fixes Haddock Trac haskell/haddock#267. - - - - - 9ecb0e56 by Mateusz Kowalczyk at 2014-02-24T06:26:50+00:00 Fix wording in the docs - - - - - 4f4dcd8e by Mateusz Kowalczyk at 2014-02-27T03:00:33+00:00 Change rendering of duplicate record field docs See Haddock Trac haskell/haddock#195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this. - - - - - ad8aa609 by Niklas Haas at 2014-03-08T09:43:26+01:00 Render fixity information Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of. - - - - - 6a39c917 by Niklas Haas at 2014-03-09T07:43:39+01:00 Reorder topDeclElem to move the source/wiki links to the top They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom. - - - - - 2d34b3b4 by Niklas Haas at 2014-03-09T07:53:46+01:00 Use optLast instead of listToMaybe for sourceUrls/wikiUrls This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates. - - - - - 0eff4624 by Niklas Haas at 2014-03-09T07:53:46+01:00 Differentiate between TH splices (line-links) and regular names This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures. - - - - - 66d6f77b by Niklas Haas at 2014-03-09T20:02:43+01:00 Group similar fixities together Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <= - - - - - 6587f9f5 by Mateusz Kowalczyk at 2014-03-10T04:24:18+00:00 Update changelog - - - - - 7387ddad by Niklas Haas at 2014-03-11T10:26:04+01:00 Include fixity information in the Interface file This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly. - - - - - ab46ef44 by Niklas Haas at 2014-03-11T10:26:04+01:00 Update changelog - - - - - 565cab6f by Niklas Haas at 2014-03-11T10:26:04+01:00 Update appearance of fixity annotations This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present. - - - - - 5d7afd67 by Niklas Haas at 2014-03-11T10:26:05+01:00 Filter family instances of hidden types Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case. - - - - - ec291b0c by Niklas Haas at 2014-03-11T10:26:05+01:00 Add documentation for --source-entity-line - - - - - 0922e581 by Niklas Haas at 2014-03-11T10:37:32+01:00 Revert "Reorder topDeclElem to move the source/wiki links to the top" This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines. - - - - - 30618e8b by Mateusz Kowalczyk at 2014-03-11T09:41:07+00:00 Bump version to 2.15.0 - - - - - adf3f1bb by Mateusz Kowalczyk at 2014-03-11T09:41:09+00:00 Fix up some whitespace - - - - - 8905f57d by Niklas Haas at 2014-03-13T19:18:06+00:00 Hide RHS of TFs with non-exported right hand sides Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user. - - - - - 5c44d5c2 by Niklas Haas at 2014-03-13T19:18:08+00:00 Add UnicodeSyntax alternatives for * and -> I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting. - - - - - b04a63e6 by Niklas Haas at 2014-03-13T19:18:10+00:00 Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. - - - - - a4a20b16 by Niklas Haas at 2014-03-13T19:18:12+00:00 Strip links from recently added html tests These were accidentally left there when the tests were originally added - - - - - d624f315 by Mateusz Kowalczyk at 2014-03-13T19:19:31+00:00 Update changelog - - - - - d27a21ac by Mateusz Kowalczyk at 2014-03-13T21:19:07+00:00 Always read in prologue files as UTF8 (#286). - - - - - 54b2fd78 by Mateusz Kowalczyk at 2014-03-13T21:28:09+00:00 Style only - - - - - fa4fe650 by Simon Hengel at 2014-03-15T09:04:18+01:00 Add Fuuzetsu maintainers field in cabal file - - - - - f83484b7 by Niklas Haas at 2014-03-15T18:20:24+00:00 Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. - - - - - 0099d276 by Niklas Haas at 2014-03-15T18:20:26+00:00 Fix issue haskell/haddock#281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. - - - - - 1f9687bd by Mateusz Kowalczyk at 2014-03-21T17:48:37+00:00 Please cabal sdist - - - - - 75542693 by Mateusz Kowalczyk at 2014-03-22T16:36:16+00:00 Drop needless --split-objs which slows us down. Involves tiny cleanup of all the dynflag bindings. Fixes haskell/haddock#292. - - - - - 31214dc3 by Herbert Valerio Riedel at 2014-03-23T18:01:01+01:00 Fix a few typos Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 0b73e638 by Mateusz Kowalczyk at 2014-03-31T05:34:36+01:00 Print kind signatures on GADTs - - - - - 2bab42f3 by Mateusz Kowalczyk at 2014-03-31T16:53:25+01:00 Add default for new PlatformConstraints field - - - - - 42647c5f by Mateusz Kowalczyk at 2014-03-31T18:29:04+01:00 Drop leading whitespace in @-style blocks. Fixes haskell/haddock#201. - - - - - 98208294 by Niklas Haas at 2014-03-31T20:09:58+02:00 Crash when exporting record selectors of data family instances This fixes bug haskell/haddock#294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated. - - - - - 3832d171 by Mateusz Kowalczyk at 2014-04-01T19:07:33+01:00 Make CHANGES consistent with what's now in 2.14.2 - - - - - c386ae89 by Mateusz Kowalczyk at 2014-04-01T19:18:36+01:00 Actually bundle extra spec tests in sdist - - - - - bd57a6d3 by Mateusz Kowalczyk at 2014-04-03T21:13:48+01:00 Update test cases for GHC bug haskell/haddock#8945, Haddock haskell/haddock#188 The order of signature groups has been corrected upstream. Here we add a test case and update some existing test-cases to reflect this change. We remove grouped signature in test cases that we can (Minimal, BugDeprecated &c) so that the test is as self-contained as possible. - - - - - 708b88b1 by Mateusz Kowalczyk at 2014-04-03T21:16:07+01:00 Enforce strict GHC version in cabal file This stops people with 7.6.3 trying to install 2.15.x which clearly won't work. Unfortunately we shipped 2.14.x without realising this. - - - - - 60334f7c by Mateusz Kowalczyk at 2014-04-03T21:19:24+01:00 Initialise some new PlatformConstants fields - - - - - ea77f668 by Mateusz Kowalczyk at 2014-04-11T16:52:23+01:00 We don't actually want unicode here - - - - - 0b651cae by Mateusz Kowalczyk at 2014-04-11T18:13:30+01:00 Parse identifiers with ^ and ⋆ in them. Fixes haskell/haddock#298. - - - - - e8ad0f5f by Mateusz Kowalczyk at 2014-04-11T18:47:41+01:00 Ignore version string during HTML tests. - - - - - de489089 by Mateusz Kowalczyk at 2014-04-11T18:59:30+01:00 Update CHANGES to follow 2.14.3 - - - - - beb464a9 by Gergő Érdi at 2014-04-13T16:31:10+08:00 remove Origin flag from LHsBindsLR - - - - - cb16f07c by Herbert Valerio Riedel at 2014-04-21T17:16:50+02:00 Replace local `die` by new `System.Exit.die` Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 9b9b23c7 by Mateusz Kowalczyk at 2014-05-03T15:40:11+02:00 Disambiguate ‘die’ in test runners. - - - - - 5d28a2b8 by Mateusz Kowalczyk at 2014-05-05T09:19:49+02:00 Prepare modules for parser split. We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type. - - - - - d3967ff3 by Mateusz Kowalczyk at 2014-05-05T11:00:41+02:00 Move parser + parser tests out to own package. We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes. - - - - - 522a448d by Mateusz Kowalczyk at 2014-05-05T11:14:47+02:00 Move out Show and Eq instances to Types They are much more useful to the users here. - - - - - 11a6f0f2 by Mateusz Kowalczyk at 2014-05-06T13:50:31+02:00 Remove no longer necessary parser error handling. We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places. - - - - - 6992c924 by Mateusz Kowalczyk at 2014-05-14T02:23:55+02:00 Please the GHC build-system. As I can not figure out how to do this properly, if we're in GHC tree, we treat the library as being the same package. If we're not in the tree, we require that the library be installed separately. - - - - - 7a8ad763 by Mateusz Kowalczyk at 2014-05-14T14:50:25+02:00 Update issue tracker URL - - - - - f616c521 by Mateusz Kowalczyk at 2014-05-14T14:53:32+02:00 Update issue tracker URL for haddock-library - - - - - 66580ded by Gergő Érdi at 2014-05-25T14:24:16+08:00 Accomodate change in PatSyn representation - - - - - 0e43b988 by Mateusz Kowalczyk at 2014-05-29T03:15:29+02:00 Revert "Accomodate change in PatSyn representation" This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this. - - - - - e10d7ec8 by Mateusz Kowalczyk at 2014-05-29T03:24:11+02:00 Revert "Revert "Accomodate change in PatSyn representation"" This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me. - - - - - 5861aca9 by Mateusz Kowalczyk at 2014-06-05T19:49:27+02:00 Clear up highlighting of identifiers with ‘'’s. - - - - - d7cc420f by Simon Peyton Jones at 2014-06-06T12:41:09+01:00 Follow change in patSynSig - - - - - 938b4fd8 by Mateusz Kowalczyk at 2014-06-12T07:24:29+02:00 Slightly update the readme. Style-sheets are no longer a recent thing, dead links, old maintainers, different formats. - - - - - c7799dea by Mateusz Kowalczyk at 2014-06-18T00:05:56+02:00 Update cabal files Update repository urls, use subdir property for haddock-library and use a separate versioning scheme for haddock-library in preparation for release. - - - - - a2750b6a by Simon Hengel at 2014-06-18T11:01:18+08:00 Compatibility with older versions of base and bytestring - - - - - 009b4b03 by Simon Hengel at 2014-06-18T11:14:01+08:00 Enable travis-ci for haddock-library - - - - - 9b5862eb by Simon Hengel at 2014-06-18T11:14:01+08:00 haddock-library: Do not depend on haddock-library in test suite I think you either add src to hs-source-dirs or the library to build-depends. But doing both does not make sense (AFAICT). - - - - - fb1f3279 by Simon Hengel at 2014-06-18T11:49:05+08:00 haddock-library: Use -Wall for specs - - - - - 649340e1 by Mateusz Kowalczyk at 2014-06-18T06:58:54+02:00 Use Travis with multiple GHC versions When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project. - - - - - d7eeeec2 by Mateusz Kowalczyk at 2014-06-18T07:49:04+02:00 Comment improvements + few words in cabal file - - - - - 0f8db914 by Simon Hengel at 2014-06-18T13:52:23+08:00 Use doctest to check examples in documentation - - - - - 2888a8dc by Simon Hengel at 2014-06-18T14:16:48+08:00 Remove doctest dependency (so that we can use haddock-library with doctest) - - - - - 626d5e85 by Mateusz Kowalczyk at 2014-06-18T08:41:25+02:00 Travis tweaks - - - - - 41d4f9cc by Mateusz Kowalczyk at 2014-06-18T08:58:43+02:00 Don't actually forget to install specified GHC. - - - - - c6aa512a by John MacFarlane at 2014-06-18T10:43:57-07:00 Removed reliance on LambdaCase (which breaks build with ghc 7.4). - - - - - b9b93b6f by John MacFarlane at 2014-06-18T10:54:56-07:00 Fixed haddock warnings. - - - - - a41b0ab5 by Mateusz Kowalczyk at 2014-06-19T01:20:10+02:00 Update Travis, bump version - - - - - 864bf62a by Mateusz Kowalczyk at 2014-06-25T10:36:54+02:00 Fix anchors. Closes haskell/haddock#308. - - - - - 53df91bb by Mateusz Kowalczyk at 2014-06-25T15:04:49+02:00 Drop DocParagraph from front of headers I can not remember why they were wrapped in paragraphs to begin with and it seems unnecessary now that I test it. Closes haskell/haddock#307. - - - - - 29b5f2fa by Mateusz Kowalczyk at 2014-06-25T15:17:20+02:00 Don't mangle append order for nested lists. The benefit of this is that the ‘top-level’ element of such lists is properly wrapped in <p> tags so any CSS working with these will be applied properly. It also just makes more sense. Pointed out at jgm/pandoc#1346. - - - - - 05cb6e9c by Mateusz Kowalczyk at 2014-06-25T15:19:45+02:00 Bump haddock-library to 1.1.0 for release - - - - - 70feab15 by Iavor Diatchki at 2014-07-01T03:37:07-07:00 Propagate overloading-mode for instance declarations in haddock (#9242) - - - - - d4ca34a7 by Simon Peyton Jones at 2014-07-14T16:23:15+01:00 Adapt to new definition of HsDecls.TyFamEqn This is a knock-on from the refactoring from Trac haskell/haddock#9063. I'll push the corresponding changes to GHC shortly. - - - - - f91e2276 by Edward Z. Yang at 2014-07-21T08:14:19-07:00 Track GHC PackageId to PackageKey renaming. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - b010f9ef by Edward Z. Yang at 2014-07-25T16:28:46-07:00 Track changes for module reexports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - 8b85f9f9 by Mateusz Kowalczyk at 2014-07-28T13:25:43+02:00 Catch mid-line URLs. Fixes haskell/haddock#314. - - - - - 4c613a78 by Edward Z. Yang at 2014-08-05T03:11:00-07:00 Track type signature change of lookupModuleInAllPackages Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - e80b051c by Edward Z. Yang at 2014-08-05T17:34:26+01:00 If GhcProfiled, also build Haddock profiled. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f9cccd29 by Edward Z. Yang at 2014-08-07T14:23:35+01:00 Ignore TAGS files. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 00b3af52 by Mateusz Kowalczyk at 2014-08-08T04:58:19+02:00 Update to attoparsec-0.12.1.1 There seems to be memory and speed improvement. - - - - - 5457dc71 by Mateusz Kowalczyk at 2014-08-08T18:24:02+02:00 Fix forgotten src - - - - - 3520cb04 by Mateusz Kowalczyk at 2014-08-14T20:19:07+01:00 Bump down the version for master to 2.14.4 - - - - - dc98c21b by Mateusz Kowalczyk at 2014-08-14T20:23:27+01:00 Revert "Track type signature change of lookupModuleInAllPackages" This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f. - - - - - 3f2038c0 by Mateusz Kowalczyk at 2014-08-14T20:23:31+01:00 Revert "Track changes for module reexports." This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d. - - - - - 56d4e49e by Mateusz Kowalczyk at 2014-08-14T20:23:42+01:00 Revert "Track GHC PackageId to PackageKey renaming." This reverts commit 8ac42d3327473939c013551750425cac191ff0fd. - - - - - 726ea3cb by Mateusz Kowalczyk at 2014-08-14T20:23:47+01:00 Revert "Adapt to new definition of HsDecls.TyFamEqn" This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd. - - - - - 61a88ff0 by Mateusz Kowalczyk at 2014-08-14T20:23:52+01:00 Revert "Propagate overloading-mode for instance declarations in haddock (#9242)" This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c. - - - - - a32ba674 by Mateusz Kowalczyk at 2014-08-14T20:26:03+01:00 Revert "Disambiguate ‘die’ in test runners." This reverts commit dba02d6df32534aac5d257f2d28596238d248942. - - - - - f335820f by Mateusz Kowalczyk at 2014-08-14T20:26:09+01:00 Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. - - - - - 107078e4 by Mateusz Kowalczyk at 2014-08-14T20:27:34+01:00 Merge branch 'reverts' This reverts any changes that were made to have Haddock compile with 7.9. When 7.10 release comes, we can simply re-apply all the patches and any patches that occur on ghc-head branch from now on. This allows us to build master with 7.8.3 - - - - - b44b3871 by Mateusz Kowalczyk at 2014-08-15T02:47:40+01:00 Fix haskell/haddock#313 by doing some list munging. I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly. - - - - - e1a62cde by Mateusz Kowalczyk at 2014-08-15T02:52:56+01:00 Stop testing haskell/haddock#188. Because the change is in GHC 7.9 and we now work against 7.8.3, this test no longer makes sense. We revert it until 7.10 becomes the standard version. If anything, there should be a test for this in GHC itself. - - - - - 54e8286d by Mateusz Kowalczyk at 2014-08-15T05:31:57+01:00 Add haskell/haddock#313 to CHANGES - - - - - 9df7ad5d by Simon Hengel at 2014-08-20T11:25:32+08:00 Fix warning - - - - - ee2574d6 by Simon Hengel at 2014-08-20T12:07:01+08:00 Fix travis builds - - - - - 384cf2e6 by Simon Hengel at 2014-08-20T12:14:31+08:00 Require GHC 7.8.3 - - - - - d4779863 by Simon Hengel at 2014-08-22T12:14:16+08:00 Move Haddock API to a separate package - - - - - 80f3e0e1 by Simon Hengel at 2014-08-22T14:57:38+08:00 Bump version to 2.15.0 and add version constraints - - - - - 309a94ce by Simon Hengel at 2014-08-22T15:18:06+08:00 Add deprecated compatibility module - - - - - 4d1e4e3f by Luite Stegeman at 2014-08-22T20:46:45+02:00 export things to allow customizing how the Ghc session is run - - - - - 47884591 by Luite Stegeman at 2014-08-22T20:46:51+02:00 ghc 7.8.2 compatibility - - - - - 5ea94e2c by Luite Stegeman at 2014-08-22T22:08:58+02:00 install dependencies for haddock-api on travis - - - - - 9fb845b2 by Mateusz Kowalczyk at 2014-08-23T10:09:34+01:00 Move sources under haddock-api/src - - - - - 85817dc4 by Mateusz Kowalczyk at 2014-08-23T10:10:48+01:00 Remove compat stuff - - - - - 151c6169 by Niklas Haas at 2014-08-24T08:14:10+02:00 Fix extra whitespace on signatures and update all test cases This was long overdue, now running ./accept.lhs on a clean test from master will not generate a bunch of changes. - - - - - d320e0d2 by Niklas Haas at 2014-08-24T08:14:35+02:00 Omit unnecessary foralls and fix haskell/haddock#315 This also fixes haskell/haddock#86. - - - - - bdafe108 by Mateusz Kowalczyk at 2014-08-24T15:06:46+01:00 Update CHANGES - - - - - fafa6d6e by Mateusz Kowalczyk at 2014-08-24T15:14:23+01:00 Delete few unused/irrelevant/badly-place files. - - - - - 3634923d by Duncan Coutts at 2014-08-27T13:49:31+01:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. - - - - - 539a7e70 by Herbert Valerio Riedel at 2014-08-31T11:36:32+02:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 9e3a0e5b by Mateusz Kowalczyk at 2014-08-31T12:54:43+01:00 Bump version in doc - - - - - 4a177525 by Mateusz Kowalczyk at 2014-08-31T13:01:23+01:00 Bump haddock-library version - - - - - f99c1384 by Mateusz Kowalczyk at 2014-08-31T13:05:25+01:00 Remove references to deleted files - - - - - 5e51a247 by Mateusz Kowalczyk at 2014-08-31T14:18:44+01:00 Make the doc parser not complain - - - - - 2cedb49a by Mateusz Kowalczyk at 2014-09-03T03:33:15+01:00 CONTRIBUTING file for issues - - - - - 88027143 by Mateusz Kowalczyk at 2014-09-04T00:46:59+01:00 Mention --print-missing-docs - - - - - 42f6754f by Alan Zimmerman at 2014-09-05T18:13:24-05:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e712719e by Austin Seipp at 2014-09-09T01:03:27-05:00 Fix import of 'empty' due to AMP. Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 71c29755 by Herbert Valerio Riedel at 2014-09-09T17:35:20+02:00 Bump `base` constraint for AMP - - - - - 0bf9f3ed by Mateusz Kowalczyk at 2014-09-12T19:18:32+01:00 Delete stale ANNOUNCE - - - - - cac89ee6 by Krzysztof Gogolewski at 2014-09-14T17:17:09+02:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 4d683426 by Edward Z. Yang at 2014-09-18T13:38:11-07:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 80697fd5 by Herbert Valerio Riedel at 2014-09-19T00:07:52+02:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. - - - - - c015eb70 by Herbert Valerio Riedel at 2014-09-19T00:10:36+02:00 Revert "Followup changes to addition of -fwarn-context-quantification" This reverts commit 4023817d7c0e46db012ba2eea28022626841ca9b temporarily as the respective feature hasn't landed in GHC HEAD yet, but this commit blocks later commits from being referenced in GHC HEAD. - - - - - 38ded784 by Edward Z. Yang at 2014-09-18T15:32:15-07:00 Revert "Revert "Followup changes to addition of -fwarn-context-quantification"" This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now. - - - - - f55d59c9 by Herbert Valerio Riedel at 2014-09-26T19:18:28+02:00 Revert "Fix import of 'empty' due to AMP." This reverts commit 0cc5bc85e9fca92ab712b68a2ba2c0dd9d3d79f4 since it turns out we don't need to re-export `empty` from Control.Monad after all. - - - - - 467050f1 by David Feuer at 2014-10-09T20:07:36-04:00 Fix improper lazy IO use Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. - - - - - cc47b699 by Edward Z. Yang at 2014-10-09T21:38:19-07:00 Fix use-after-close lazy IO bug Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. Signed-off-by: David Feuer <David.Feuer at gmail.com> Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 87babcbe by Austin Seipp at 2014-10-20T20:05:27-05:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - ab259516 by Austin Seipp at 2014-10-20T20:07:01-05:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - b918093c by Mateusz Kowalczyk at 2014-10-29T03:59:39+00:00 Experimental support for collapsable headers Closes haskell/haddock#335 - - - - - 849db129 by Mateusz Kowalczyk at 2014-10-29T10:07:26+01:00 Experimental support for collapsable headers (cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc) - - - - - a4cc4789 by Herbert Valerio Riedel at 2014-10-31T11:08:26+01:00 Collapse user-defined section by default (re haskell/haddock#335) - - - - - 9da1b33e by Yuras Shumovich at 2014-10-31T16:11:04-05:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - c625aefc by Austin Seipp at 2014-10-31T19:34:10-05:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - c7738e5e by Simon Hengel at 2014-11-02T07:25:30+08:00 Remove -fobject-code from .ghci (this slows down reloads on modifications) - - - - - d4a86e95 by Simon Hengel at 2014-11-03T09:26:11+08:00 Get rid of StandaloneDeriving - - - - - a974e311 by Simon Hengel at 2014-11-03T09:26:11+08:00 Derive more instances - - - - - 8aa0c4d7 by Simon Hengel at 2014-11-03T09:27:08+08:00 Remove unused language extensions - - - - - 3052d46a by Simon Hengel at 2014-11-03T09:30:46+08:00 Minor refactoring - - - - - 4281d3cb by Simon Hengel at 2014-11-03T09:30:46+08:00 parser: Try to parse definition lists right before text paragraphs - - - - - 8ba12bf9 by Simon Hengel at 2014-11-03T09:34:19+08:00 Add support for markdown links (closes haskell/haddock#336) - - - - - a2f8d747 by Simon Hengel at 2014-11-03T09:34:19+08:00 Allow markdown links at the beginning of a paragraph - - - - - 53b11207 by Simon Hengel at 2014-11-03T09:34:20+08:00 Update documentation - - - - - 652267c6 by Simon Hengel at 2014-11-03T09:34:20+08:00 Add support for markdown images - - - - - 9d667502 by Simon Hengel at 2014-11-03T09:34:20+08:00 Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. - - - - - 8167fc32 by Mateusz Kowalczyk at 2014-11-04T01:16:51+00:00 whitespace only - - - - - 3da62981 by Mateusz Kowalczyk at 2014-11-04T01:17:31+00:00 Fix re-exports of built-in type families Fixes haskell/haddock#310 - - - - - edc76b34 by Mateusz Kowalczyk at 2014-11-04T02:54:28+00:00 Turn some uses of error into recoverable warnings This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end. - - - - - 0a137400 by Mateusz Kowalczyk at 2014-11-04T04:09:44+00:00 Fix warnings - - - - - d068fc21 by Mateusz Kowalczyk at 2014-11-04T21:04:07+00:00 Fix parsing of identifiers written in infix way - - - - - 1a9f2f3d by Simon Hengel at 2014-11-08T11:32:42+08:00 Minor code simplification - - - - - 6475e9b1 by Simon Hengel at 2014-11-08T17:28:33+08:00 newtype-wrap parser monad - - - - - dc1ea105 by Herbert Valerio Riedel at 2014-11-15T11:55:43+01:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - fbb1aca4 by Simon Hengel at 2014-11-16T08:51:38+08:00 State intention rather than implementation details in Haddock comment - - - - - 97851ab2 by Simon Hengel at 2014-11-16T10:20:19+08:00 (wip) Add support for @since (closes haskell/haddock#26) - - - - - 34bcd18e by Gergő Érdi at 2014-11-20T22:35:38+08:00 Update Haddock to new pattern synonym type signature syntax - - - - - 304b7dc3 by Jan Stolarek at 2014-11-20T17:48:43+01:00 Follow changes from haskell/haddock#9812 - - - - - 920f9b03 by Richard Eisenberg at 2014-11-20T16:52:50-05:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 0bfe4e78 by Alan Zimmerman at 2014-11-21T11:23:09-06:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 356ed45a by Thomas Winant at 2014-11-28T16:11:22-06:00 Support for PartialTypeSignatures - - - - - 5dc8f3b1 by Gergő Érdi at 2014-11-29T15:39:09+08:00 For pattern synonyms, render "pattern" as a keyword - - - - - fe704480 by Mateusz Kowalczyk at 2014-12-09T03:38:32+00:00 List new module in cabal file - - - - - b9ad5a29 by Mateusz Kowalczyk at 2014-12-10T00:58:24+00:00 Allow the parser to spit out meta-info Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes haskell/haddock#26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves. - - - - - 765af0e3 by Mateusz Kowalczyk at 2014-12-10T01:17:19+00:00 Update doctest parts of comments - - - - - 8670272b by jpmoresmau at 2014-12-10T01:35:31+00:00 header could contain several lines Closes haskell/haddock#348 - - - - - 4f9ae4f3 by Mateusz Kowalczyk at 2014-12-12T06:22:31+00:00 Revert "Merge branch 'reverts'" This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - e974ac94 by Duncan Coutts at 2014-12-12T06:26:11+00:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. Conflicts: haddock-api/src/Haddock.hs - - - - - 2f3a2365 by Herbert Valerio Riedel at 2014-12-12T06:26:51+00:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 1dbd6390 by Alan Zimmerman at 2014-12-12T06:32:07+00:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - bb6ff1f4 by Mateusz Kowalczyk at 2014-12-12T06:35:07+00:00 Bump ‘base’ constraint Follows the similar commit made on ghc-head branch - - - - - 466fe4ab by Krzysztof Gogolewski at 2014-12-12T06:37:42+00:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 97e080c9 by Edward Z. Yang at 2014-12-12T06:39:35+00:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs - - - - - 20b2af56 by Herbert Valerio Riedel at 2014-12-12T06:42:50+00:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. Conflicts: haddock-library/src/Documentation/Haddock/Parser.hs - - - - - b3ad269d by Austin Seipp at 2014-12-12T06:44:14+00:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 072df0dd by Austin Seipp at 2014-12-12T06:45:01+00:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - dbb9294a by Herbert Valerio Riedel at 2014-12-12T06:46:17+00:00 Collapse user-defined section by default (re haskell/haddock#335) Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - - - - - f23ab545 by Yuras Shumovich at 2014-12-12T06:46:41+00:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - 753a4b67 by Austin Seipp at 2014-12-12T06:46:51+00:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8954e8f5 by Herbert Valerio Riedel at 2014-12-12T06:50:53+00:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - d2b06d61 by Gergő Érdi at 2014-12-12T07:07:30+00:00 Update Haddock to new pattern synonym type signature syntax Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 1ff02426 by Jan Stolarek at 2014-12-12T07:13:24+00:00 Follow changes from haskell/haddock#9812 Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - 06ad7600 by Richard Eisenberg at 2014-12-12T07:13:43+00:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 8fd2aa8b by Alan Zimmerman at 2014-12-12T07:22:25+00:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Backends/LaTeX.hs haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 95c3db98 by Thomas Winant at 2014-12-12T07:35:49+00:00 Support for PartialTypeSignatures Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs haddock-api/src/Haddock/Interface/Create.hs - - - - - 45494428 by Gergő Érdi at 2014-12-12T07:36:18+00:00 For pattern synonyms, render "pattern" as a keyword - - - - - a237e3eb by Mateusz Kowalczyk at 2014-12-12T12:27:13+00:00 Various fixups and bumps for next release - - - - - 22918bcd by Herbert Valerio Riedel at 2014-12-14T10:11:47+01:00 Remove redundant wild-card pattern match (this would otherwise cause a build-failure with `-Werror`) - - - - - 1d6ce947 by Herbert Valerio Riedel at 2014-12-14T10:17:06+01:00 Treat GHC 7.10 the same as GHC 7.9 ...since the current GHC 7.9 is going to become GHC 7.10 real-soon-now anyway - - - - - f434ea89 by Herbert Valerio Riedel at 2014-12-14T18:26:50+01:00 Fixup ghc.mk (follow-up to 1739375eb23342) This makes the GHC build-system aware of the data-files to be copied into the bindist (as haddock.cabal doesn't list those anymore) - - - - - 6fb839eb by Mateusz Kowalczyk at 2014-12-17T09:28:59+00:00 Only keep one Version instead of blindly appending - - - - - 40645489 by Mateusz Kowalczyk at 2014-12-18T07:09:44+00:00 Fix dependency version - - - - - 8b3b927b by Mateusz Kowalczyk at 2014-12-18T07:14:23+00:00 Print missing docs by default Adds --no-print-missing-docs - - - - - 59666694 by Mateusz Kowalczyk at 2014-12-18T07:21:37+00:00 update changelog - - - - - aa6d168e by Mateusz Kowalczyk at 2014-12-18T07:30:58+00:00 Update docs for @since - - - - - 2d7043ee by Luite Stegeman at 2014-12-19T18:29:35-06:00 hide projectVersion from DynFlags since it clashes with Haddock.Version.projectVersion - - - - - aaa70fc0 by Luite Stegeman at 2014-12-22T15:58:43+01:00 Add missing import for standalone haddock-api package - - - - - 9ce01269 by Herbert Valerio Riedel at 2014-12-22T17:48:45+01:00 Reset ghc-head with master's tree (this is an overwriting git merge of master into ghc-head) - - - - - fcd6fec1 by Herbert Valerio Riedel at 2014-12-22T17:51:52+01:00 Bump versions for ghc-7.11 - - - - - 525ec900 by Mateusz Kowalczyk at 2014-12-23T13:36:24+00:00 travis-ci: test with HEAD - - - - - cbf494b5 by Simon Peyton Jones at 2014-12-23T15:22:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 50e01c99 by Mateusz Kowalczyk at 2014-12-29T15:28:47+00:00 Make travis use 7.10.x - - - - - 475e60b0 by Njagi Mwaniki at 2014-12-29T15:30:44+00:00 Turn the README into GitHub Markdown format. Closes haskell/haddock#354 - - - - - 8cacf48e by Luite Stegeman at 2015-01-05T16:25:37+01:00 bump haddock-api ghc dependency to allow release candidate and first release - - - - - 6ed6cf1f by Simon Peyton Jones at 2015-01-06T16:37:47+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 8b484f33 by Simon Peyton Jones at 2015-01-08T15:50:22+00:00 Track naming change in DataCon - - - - - 23c5c0b5 by Alan Zimmerman at 2015-01-16T10:15:11-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e7a5532c by JP Moresmau at 2015-01-22T17:19:03+00:00 Ignore warnings, install Cabal 1.22 - - - - - 86942c84 by jpmoresmau at 2015-01-22T17:19:04+00:00 solve dataDir ambiguity - - - - - 5ceb743e by jpmoresmau at 2015-01-22T19:17:32+00:00 support GHC 7.10: no Safe-Inferred, Foldable instance - - - - - 6a3b3fb5 by Mateusz Kowalczyk at 2015-01-22T19:32:10+00:00 Update test files Test: a correct behaviour for fields comma-separating values. I'm surprised we had no bug open for this. Maybe it affects how haskell/haddock#301 renders now but I doubt. Operators: Seems GHC is giving us a new order for operators, something must have changed on their side again. cc @haasn , this makes the fixity to the side not match the order on the LHS which is a bit unpleasant. Maybe the fixity can be made to match the GHC order? Bug335: We expand examples by default now. Bug310: Now inferred safe. - - - - - 708f8b2f by jpmoresmau at 2015-01-22T19:36:59+00:00 Links to source location of class instance definitions - - - - - 5cf8a6da by Vincent Berthoux at 2015-01-22T19:59:58+00:00 Filter '\r' from comments due to Windows problems. On Windows this was causing newline to be rendered twice in code blocks. Closes haskell/haddock#359, fixes haskell/haddock#356. - - - - - 1749e6f0 by Mateusz Kowalczyk at 2015-01-22T20:31:27+00:00 Changelog only - - - - - c8145f90 by Mateusz Kowalczyk at 2015-01-22T23:34:05+00:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. - - - - - 14248254 by Mateusz Kowalczyk at 2015-01-22T23:43:18+00:00 Sort out some module import warnings - - - - - d8a38989 by Simon Peyton Jones at 2015-01-23T07:10:16-06:00 Track naming change in DataCon (cherry picked from commit 04cf63d0195837ed52075ed7d2676e71831e8a0b) - - - - - d3ac6ae4 by Alan Zimmerman at 2015-01-23T07:17:19-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit d61bbc75890e4eb0ad508b9c2a27b91f691213e6) - - - - - 4c1ffeb0 by Simon Peyton Jones at 2015-02-10T12:10:33+00:00 Track changes in HsSyn for quasi-quotes - - - - - 775d20f7 by Mateusz Kowalczyk at 2015-03-15T08:11:48+01:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. (cherry picked from commit 8e06728afb0784128ab2df0be7a5d7a191d30ff4) - - - - - f9245e72 by Phil Ruffwind at 2015-03-16T04:32:01-04:00 Prevent Synopsis from using up too much horizontal space When long type signatures occur in the Synopsis, the element is stretched beyond the width of the window. Scrollbars don't appear, so it's impossible to read anything when this happens. - - - - - cd8fa415 by Mateusz Kowalczyk at 2015-03-17T21:59:39+00:00 Update changelog Closes haskell/haddock#151 due to 71170fc77962f10d7d001e3b8bc8b92bfeda99bc - - - - - b5248b47 by Ben Gamari at 2015-03-25T17:12:17+00:00 Make the error encountered when a package can't be found more user-friendly Closes haskell/haddock#369 - - - - - b756b772 by Mateusz Kowalczyk at 2015-03-26T16:31:40+00:00 Remove now redundant imports - - - - - 5ea5e8dd by Mateusz Kowalczyk at 2015-03-26T16:45:52+00:00 Update test to account for \r filtering - - - - - 6539bfb3 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Test for anchor defaulting I delete the old tests because it turns out that: * test runner would never put them in scope of each other even with imports so just one would suffice * test runner actually needed some hacking to keep links so in the end we would end up with no anchors making them useless - - - - - 1a01d950 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Clearly default to variables in out of scope case - - - - - 7943abe8 by Mateusz Kowalczyk at 2015-03-27T01:14:11+00:00 Fix Hoogle display of constructors Fixes haskell/haddock#361 - - - - - 6d6e587e by Mateusz Kowalczyk at 2015-03-27T01:45:18+00:00 Fully qualify names in Hoogle instances output Closes haskell/haddock#263 - - - - - 52dac365 by Mateusz Kowalczyk at 2015-03-27T01:55:01+00:00 Update changelog - - - - - ca5af9a8 by Mateusz Kowalczyk at 2015-03-27T02:43:55+00:00 Output method documentation in Hoogle backend One thing of note is that we no longer preserve grouping of methods and print each method on its own line. We could preserve it if no documentation is present for any methods in the group if someone asks for it though. Fixes haskell/haddock#259 - - - - - a33f0c10 by Mateusz Kowalczyk at 2015-03-27T03:04:21+00:00 Don't print instance safety information in Hoogle Fixes haskell/haddock#168 - - - - - df6c935a by Mateusz Kowalczyk at 2015-03-28T00:11:47+00:00 Post-release version bumps and changelog - - - - - dde8f7c0 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Loosen bounds on haddock-* - - - - - de93bf89 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Expand response files in arguments Closes haskell/haddock#285 - - - - - 1f0b0856 by Zejun Wu at 2015-04-26T16:35:35-07:00 Do not insert anchor for section headings in contents box - - - - - 860439d7 by Simon Peyton Jones at 2015-05-01T09:36:47+01:00 Track change in API of TyCon - - - - - a32f3e5f by Adam Gundry at 2015-05-04T15:32:59+01:00 Track API changes to support empty closed type familes - - - - - 77e98bee by Ben Gamari at 2015-05-06T20:17:08+01:00 Ignore doc/haddock.{ps,pdf} - - - - - 663d0204 by Murray Campbell at 2015-05-11T04:47:37-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8bb0dcf5 by Murray Campbell at 2015-05-11T06:35:06-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit 2380f07c430c525b205ce2eae6dab23c8388d899) - - - - - bad900ea by Adam Bergmark at 2015-05-11T15:29:39+01:00 haddock-library: require GHC >= 7.4 `Data.Monoid.<>` was added in base-4.5/GHC-7.4 Closes haskell/haddock#394 Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - daceff85 by Simon Peyton Jones at 2015-05-13T12:04:21+01:00 Track the new location of setRdrNameSpace - - - - - 1937d1c4 by Alan Zimmerman at 2015-05-25T21:27:15+02:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - ee0fb6c2 by Łukasz Hanuszczak at 2015-05-27T11:51:31+02:00 Create simple method for indentation parsing. - - - - - 7d6fcad5 by Łukasz Hanuszczak at 2015-05-27T21:36:13+02:00 Make nested lists count indentation according to first item. - - - - - d6819398 by Łukasz Hanuszczak at 2015-05-27T22:46:13+02:00 Add simple test case for arbitrary-depth list nesting. - - - - - 2929c54d by Łukasz Hanuszczak at 2015-06-03T02:11:31+02:00 Add arbitrary-indent spec test for parser. - - - - - 9a0a9bb0 by Mateusz Kowalczyk at 2015-06-03T05:25:29+01:00 Update docs with info on new list nesting rule Fixes haskell/haddock#278 through commits from PR haskell/haddock#401 - - - - - 12efc92c by Mateusz Kowalczyk at 2015-06-03T05:29:26+01:00 Update some meta data at the top of the docs - - - - - 765ee49f by Bartosz Nitka at 2015-06-07T08:40:59-07:00 Add some Hacking docs for getting started - - - - - 19aaf851 by Bartosz Nitka at 2015-06-07T08:44:30-07:00 Fix markdown - - - - - 2a90cb70 by Mateusz Kowalczyk at 2015-06-08T15:08:36+01:00 Refine hacking instructions slightly - - - - - 0894da6e by Thomas Winant at 2015-06-08T23:47:28-05:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 10a9bb76 by Emanuel Borsboom at 2015-06-12T02:46:23+01:00 Build executable with '-threaded' (fixes haskell/haddock#399) - - - - - 7696b94f by Mateusz Kowalczyk at 2015-06-12T02:59:19+01:00 Update changelog for -threaded Closes haskell/haddock#400 - - - - - d3c118ec by Bartosz Nitka at 2015-06-12T03:00:58+01:00 Fix haddock: internal error: spliceURL UnhelpfulSpan (#207) Inferred type signatures don't have SrcSpans, so let's use the one from the declaration. I've tested this manually on the test-case from haskell/haddock#207, but I got stuck at trying to run the test-suite. - - - - - b67e843b by Mateusz Kowalczyk at 2015-06-12T03:01:50+01:00 Changelog for haskell/haddock#207 Fixes haskell/haddock#207, closes haskell/haddock#402 - - - - - 841d785e by jpmoresmau at 2015-06-12T16:03:16+01:00 Attach to instance location the name that has the same location file Fixes haskell/haddock#383 - - - - - 98791cae by Mateusz Kowalczyk at 2015-06-12T16:08:27+01:00 Update changelog Closes haskell/haddock#398 - - - - - 7c0b5a87 by Phil Ruffwind at 2015-06-12T13:07:25-04:00 Fix alignment of Source links in instance table in Firefox Due to a Firefox bug [1], a combination of 'whitespace: nowrap' on the parent element with 'float: right' on the inner element can cause the floated element to be displaced downwards for no apparent reason. To work around this, the left side is wrapped in its own <span> and set to 'float: left'. As a precautionary measure to prevent the parent element from collapsing entirely, we also add the classic "clearfix" hack. The latter is not strictly needed but it helps prevent bugs if the layout is altered again in the future. Fixes haskell/haddock#384. Remark: line 159 of src/Haddock/Backends/Xhtml/Layout.hs was indented to prevent confusion over the operator precedence of (<+>) vs (<<). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=488725 - - - - - cfe86e73 by Mateusz Kowalczyk at 2015-06-14T10:49:01+01:00 Update tests for the CSS changes - - - - - 2d4983c1 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding for Haskell source parser module. - - - - - 29548785 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement function for tagging parsed chunks with source spans. - - - - - 6a5e4074 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement simple string chunking based on HsColour library. - - - - - 6e52291f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create basic token classification method. - - - - - da971a27 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Adapt source span tagging to work with current whitespace handling. - - - - - 4feb5a22 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add record accessors to exports of hyperlinker parser module. - - - - - a8cc4e39 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Make parser module export all types and associated accessors. - - - - - fb8d468f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple HTML renderer for parsed source file. - - - - - 80747822 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for specifying the CSS file path in HTML source renderer. - - - - - 994dc1f5 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix identifier recognition in Haskell source parser. - - - - - b1bd0430 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix comment recognition in Haskell source parser. - - - - - 11db85ae by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for recognizing compiler pragmas in source parser. - - - - - 736c7bd3 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding of module for associating tokens with AST names. - - - - - 7e149bc2 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement utility method for extracting variable identifiers from AST. - - - - - 32eb640a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple mechanism for associating tokens with AST names. - - - - - d4eba5bc by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add dummy support for hyperlinking named tokens. - - - - - 2b76141f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matcher bug causing wrong items being hyperlinked. - - - - - 2d48002e by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Constrain elements exported by hyperlinker modules. - - - - - 9715eec6 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for type token recognition. - - - - - 8fa401cb by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for binding token recognition. - - - - - d062400b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement go-to-definition mechanism for local bindings. - - - - - f4dc229b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement module export- and import-list item hyperlinking. - - - - - c9a46d58 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matching to allow parenthesized operators hyperlinking. - - - - - 03aad95a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix weird hyperlinking of parenthesized operators. - - - - - b4694a7d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for type declaration anchors. - - - - - 7358d2d2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for top-level function declaration anchors. - - - - - dfc24b24 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix external anchors to contain HTML file extension. - - - - - a045926c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Refactor the way AST names are handled within detailed tokens. - - - - - c76049b4 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement hyperlinking of imported module names. - - - - - 2d2a1572 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix parsing of single line comments with broken up newlines. - - - - - 11afdcf2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix bug with improper newline handling. - - - - - 8137f104 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issues with escaped newlines in comments. - - - - - 34759b19 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for parsing C preprocessor macros. - - - - - 09f0f847 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for parser module of source hyperlinker. - - - - - 709a8389 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for AST module of source hyperlinker. - - - - - 4df5c227 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add command line option for generating hyperlinked source. - - - - - 7a755ea2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Extend module interface with rich source token stream field. - - - - - 494f4ab1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement source tokenization during interface creation process. - - - - - 5f21c953 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create hyperlinker module and plug it into the Haddock pipeline. - - - - - 0cc8a216 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for providing custom CSS files for hyperlinked source. - - - - - a32bbdc1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for fancy highlighting upon hovering over identifier. - - - - - d16d642a by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make source hyperlinker generate output in apropriate directory. - - - - - ae12953d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create module with hyperlinker utility functions. - - - - - 6d4952c5 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make external hyperlinks point to locations specified by source URLs. - - - - - 8417555d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Rewrite source generation to fixed links and directory structure. - - - - - ce9cec01 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add basic support for cross-package hyperlink generation. - - - - - 7eaf025c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Disable generating hyperlinks for module references. - - - - - a50bf92e by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make Haddock generate source for all interfaces (also hidden ones). - - - - - f5ae2838 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Prevent source parser from throwing exception when lexing fails. - - - - - db9ffbe0 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement workaround for Chrome highlighting issues. - - - - - 0b6b453b by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate correct anchors for data constructors. - - - - - c86d38bc by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate anchors for record field declarations. - - - - - 063abf7f by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issue with hyperlink highlight styling in Chrome browser. - - - - - 880fc611 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking constructor names in patters. - - - - - c9e89b95 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record patterns. - - - - - 17a11996 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record expressions. - - - - - 0eef932d by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Make hyperlinker respect pretty-printer flag and add documentation. - - - - - f87c1776 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Unexpose hyperlinker modules in Cabal configuration. - - - - - 4c9e2b06 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Setup HSpec framework for Haddock API package. - - - - - 4b20cb30 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add basic tests related to comment parsing. - - - - - 6842e919 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add tests related to parsing basic language constructs. - - - - - 87bffb35 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add simple tests for do-notation parsing. - - - - - e7af1841 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add very simple QuickCheck properties for source parser spec. - - - - - c84efcf1 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Create simple test runner for hyperlinker tests. - - - - - 76b90447 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for basic identifier hyperlinking. - - - - - 0fbf4df6 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for operator hyperlinking. - - - - - 731aa039 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for constructor hyperlinking. - - - - - 995a78a2 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for record expressions and patterns hyperlinking. - - - - - 3566875a by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for literal syntax highlighting. - - - - - 68469a35 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add hyperlinker test runner to .cabal and .gitignore files. - - - - - aa946c93 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Adapt hyperlinker test runner to have the same interface as HTML one. - - - - - ce34da16 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Fix hyperlinker test runner file paths and add pretty-printing option. - - - - - 0d7dd65e by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add reference files for hyperlinker test cases. - - - - - efa4a1e0 by Łukasz Hanuszczak at 2015-07-01T00:47:32+02:00 Make hyperlinker test runner strip local links from generated source. - - - - - 3e96e584 by Łukasz Hanuszczak at 2015-07-01T01:14:59+02:00 Create simple script for accepting hyperlinker test case references. - - - - - 526fe610 by Łukasz Hanuszczak at 2015-07-01T01:16:41+02:00 Re-accept hyperlinker test cases with local references stripped out. - - - - - 892e2cb3 by Łukasz Hanuszczak at 2015-07-01T01:22:09+02:00 Fix bug with diffing wrong files in hyperlinker test runner. - - - - - 9ff46039 by Łukasz Hanuszczak at 2015-07-01T18:04:46+02:00 Remove unused dependencies in Haddock API spec configuration. - - - - - 47969c07 by Łukasz Hanuszczak at 2015-07-01T18:32:19+02:00 Add support for hyperlinking synonyms in patterns. - - - - - a73449e0 by Łukasz Hanuszczak at 2015-07-01T18:33:44+02:00 Create test case for hyperlinking @-patterns. - - - - - c2077ed8 by Łukasz Hanuszczak at 2015-07-01T19:06:04+02:00 Add support for hyperlinking universally quantified type variables. - - - - - 68017342 by Łukasz Hanuszczak at 2015-07-01T19:28:32+02:00 Create hyperlinker test case with quantified type variables. - - - - - 51c01a78 by Łukasz Hanuszczak at 2015-07-01T19:34:22+02:00 Add scoped type variables test for polymorphism test case. - - - - - 13181ae2 by Łukasz Hanuszczak at 2015-07-01T19:56:27+02:00 Add record wildcards test for records hyperlinking test case. - - - - - 991b81dd by Łukasz Hanuszczak at 2015-07-01T21:01:42+02:00 Document some functions in XHTML utlity module. - - - - - 98c8dfe5 by Łukasz Hanuszczak at 2015-07-01T22:25:21+02:00 Make hyperlinker render qualified names as one entity. - - - - - 75e13b9b by Łukasz Hanuszczak at 2015-07-01T22:27:38+02:00 Add qualified name test for identifiers hyperlinking test case. - - - - - de1e143f by Łukasz Hanuszczak at 2015-07-02T12:32:59+02:00 Fix crash happening when hyperlinking type family declarations. - - - - - 7a8fb175 by Łukasz Hanuszczak at 2015-07-02T12:47:03+02:00 Add support for anchoring data family constructor declarations. - - - - - 3b404e49 by Łukasz Hanuszczak at 2015-07-02T13:31:05+02:00 Improve support for hyperlinking type families. - - - - - 59eb7143 by Łukasz Hanuszczak at 2015-07-02T13:33:34+02:00 Add hyperlinker test case for checking type and type family declarations. - - - - - d1cda0c0 by Łukasz Hanuszczak at 2015-07-02T13:41:38+02:00 Fix issue with operators being recognized as preprocessor directives. - - - - - da206c9d by Łukasz Hanuszczak at 2015-07-02T17:18:12+02:00 Fix broken tests for parsing and hyperlinking hash operators. - - - - - 53750d1b by Łukasz Hanuszczak at 2015-07-02T18:53:28+02:00 Add support for anchoring signatures in type class declarations. - - - - - 1fa5bb10 by Łukasz Hanuszczak at 2015-07-02T19:04:47+02:00 Make hyperlinker generate anchors only to top-level value bindings. - - - - - a542305c by Łukasz Hanuszczak at 2015-07-02T19:05:58+02:00 Create hyperlinker test case for type classes. - - - - - b0dd4581 by Łukasz Hanuszczak at 2015-07-04T16:28:26+02:00 Update docs with information about source hyperlinking. - - - - - 9795302a by Łukasz Hanuszczak at 2015-07-04T16:52:15+02:00 Update docs on using `--read-interface` option. - - - - - 9acdc002 by Łukasz Hanuszczak at 2015-07-04T17:15:26+02:00 Remove potentially dangerous record access in hyperlinker AST module. - - - - - fb3ab7be by Łukasz Hanuszczak at 2015-07-04T17:40:10+02:00 Make Haddock generate warnings about potential misuse of hyperlinker. - - - - - a324c504 by Łukasz Hanuszczak at 2015-07-04T17:43:22+02:00 Fix incorrect specification of source style option in doc file. - - - - - 3f01a8e4 by Łukasz Hanuszczak at 2015-07-05T17:06:36+02:00 Refactor source path mapping to use modules as indices. - - - - - ac70f5b1 by Łukasz Hanuszczak at 2015-07-05T17:47:34+02:00 Fix bug where not all module interfaces were added to source mapping. - - - - - f5e57da9 by Łukasz Hanuszczak at 2015-07-06T16:39:57+02:00 Extract main hyperlinker types to separate module. - - - - - 43974905 by Łukasz Hanuszczak at 2015-07-06T16:52:13+02:00 Move source paths types to hyperlinker types module. - - - - - 3e236055 by Łukasz Hanuszczak at 2015-07-06T17:06:19+02:00 Add support for hyperlinking modules in import lists. - - - - - 58233d9f by Łukasz Hanuszczak at 2015-07-06T17:26:49+02:00 Add short documentation for hyperlinker source map type. - - - - - 14da016d by Łukasz Hanuszczak at 2015-07-06T18:07:20+02:00 Fix bug with module name being hyperlinked to `Prelude`. - - - - - 8f79db52 by Łukasz Hanuszczak at 2015-07-06T18:23:47+02:00 Fix problem with spec build in Haddock API configuration. - - - - - e7cc056c by Adam Sandberg Eriksson at 2015-07-07T23:22:21+01:00 StrictData: print correct strictness marks - - - - - e8253ca8 by Mateusz Kowalczyk at 2015-07-07T23:58:28+01:00 Update changelog - - - - - 0aba676b by Mateusz Kowalczyk at 2015-07-07T23:58:33+01:00 Relax upper bound on GHC a bit - - - - - 7a595381 by Mateusz Kowalczyk at 2015-07-07T23:58:52+01:00 Delete trailing whitespace - - - - - 50976d5e by Adam Sandberg Eriksson at 2015-07-08T15:03:04+02:00 StrictData: changes in HsBang type - - - - - 83b045fa by Mateusz Kowalczyk at 2015-07-11T14:35:18+01:00 Fix expansion icon for user-collapsible sections Closes haskell/haddock#412 - - - - - b2a3b0d1 by Mateusz Kowalczyk at 2015-07-22T22:03:21+01:00 Make some version changes after 2.16.1 release - - - - - a8294423 by Ben Gamari at 2015-07-27T13:16:07+02:00 Merge pull request haskell/haddock#422 from adamse/adamse-D1033 Merge for GHC D1033 - - - - - c0173f17 by randen at 2015-07-30T14:49:08-07:00 Break the response file by line termination rather than spaces, since spaces may be within the parameters. This simple approach avoids having the need for any quoting and/or escaping (although a newline char will not be possible in a parameter and has no escape mechanism to allow it). - - - - - 47c0ca14 by Alan Zimmerman at 2015-07-31T10:41:52+02:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - 45a9d770 by Mateusz Kowalczyk at 2015-07-31T09:47:43+01:00 Update changelog - - - - - 347a20a3 by Phil Ruffwind at 2015-08-02T23:15:26+01:00 Avoid JavaScript error during page load in non-frame mode In non-frame mode, parent.window.synopsis refers to the synopsis div rather than the nonexistent frame. Unfortunately, the script wrongly assumes that if it exists it must be a frame, leading to an error where it tries to access the nonexistent attribute 'replace' of an undefined value (synopsis.location). Closes haskell/haddock#406 - - - - - 54ebd519 by Phil Ruffwind at 2015-08-02T23:27:10+01:00 Link to the definitions to themselves Currently, the definitions already have an anchor tag that allows URLs with fragment identifiers to locate them, but it is rather inconvenient to obtain such a URL (so-called "permalink") as it would require finding the a link to the corresponding item in the Synopsis or elsewhere. This commit adds hyperlinks to the definitions themselves, allowing users to obtain links to them easily. To preserve the original aesthetics of the definitions, we alter the color of the link so as to be identical to what it was, except it now has a hover effect indicating that it is clickable. Additionally, the anchor now uses the 'id' attribute instead of the (obsolete) 'name' attribute. Closes haskell/haddock#407 - - - - - 02cc8bb7 by Phil Ruffwind at 2015-08-02T23:28:02+01:00 Fix typo in Haddock.Backends.Xhtml.Layout: divSynposis -> divSynopsis Closes haskell/haddock#408 - - - - - 2eb0a458 by Phil Ruffwind at 2015-08-02T23:30:07+01:00 Fix record field alignment when name is too long Change <dl> to <ul> and use display:table rather than floats to layout the record fields. This avoids bug haskell/haddock#301 that occurs whenever the field name gets too long. Slight aesthetic change: the entire cell of the field's source code is now shaded gray rather than just the area where text exists. Fixes haskell/haddock#301. Closes haskell/haddock#421 - - - - - 7abb3402 by Łukasz Hanuszczak at 2015-08-02T23:32:14+01:00 Add some utility definitions for generating line anchors. - - - - - e0b1d79b by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Make hyperlinked source renderer generate line anchors. - - - - - 24dd4c9f by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Re-accept test cases after adding line anchors for each of them. - - - - - 0372cfcb by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Override source line flags when source hyperlinker is enabled. - - - - - a81bcd07 by Mateusz Kowalczyk at 2015-08-02T23:58:25+01:00 Update tests to follow HTML changes - - - - - d2d7426f by Łukasz Hanuszczak at 2015-08-06T20:54:59+02:00 Fix quote syntax for promoted types. - - - - - 668cf029 by Łukasz Hanuszczak at 2015-08-06T21:12:00+02:00 Apply promoted type quoting to type-level consing. - - - - - 89f8e7c6 by Łukasz Hanuszczak at 2015-08-06T21:17:10+02:00 Extend advanced types test case with other examples. - - - - - 86494bca by Łukasz Hanuszczak at 2015-08-06T21:22:06+02:00 Rename advanced types test case and accept new output. - - - - - dbb7c7c0 by Adam Sandberg Eriksson at 2015-08-09T23:01:05+02:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 2a7704fa by Ben Gamari at 2015-08-10T13:18:05+02:00 Merge pull request haskell/haddock#433 from adamse/split-hsbang HsBang is split into HsSrcBang and HsImplBang - - - - - 891954bc by Thomas Miedema at 2015-08-15T14:51:18+02:00 Follow changes in GHC build system - - - - - b55d32ab by Mateusz Kowalczyk at 2015-08-21T18:06:09+01:00 Make Travis use 7.10.2 - - - - - 97348b51 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Move SYB utilities to standalone module. - - - - - 748ec081 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement `everywhere` transformation in SYB module. - - - - - 011cc543 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement generic transformation constructor. - - - - - b9510db2 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Create simple utility module for type specialization. - - - - - 43229fa6 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Make type of type specialization function more general. - - - - - fd844e90 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Add basic HTML test case for checking instance specialization. - - - - - 6ea0ad04 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Make HTML class instance printer take optional signature argument. - - - - - 65aa41b6 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Refactor instance head type to record instead of a meaningless tuple. - - - - - 3fc3bede by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add expandable method section for each class instance declaration. - - - - - 99ceb107 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Move dummy post-family instances for `DocName` to `Types` module. - - - - - e98f4708 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create convenience functions for type specialization module. - - - - - b947552f by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Hook type specialization logic with HTML pretty-printer. - - - - - dcaa8030 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create stub functions for sugaring specialized types. - - - - - fa84bc65 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement list syntax sugaring logic for specialized types. - - - - - e8b05b07 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement tuple syntax sugaring logic for specialized types. - - - - - 68a2e5bc by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Get rid of code duplication in type specialization module. - - - - - 4721c336 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create scaffolding of a framework for renaming specialized types. - - - - - 271b488d by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in missing cases in specialized type renaming function. - - - - - bfa5f2a4 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Remove code duplication in specialized type renamer. - - - - - ea6bd0e8 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Change state of the type renaming monad. - - - - - 77c5496e by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement simple mechanism for generating new type names. - - - - - 91bfb48b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in stub behaviour with actual environment renaming. - - - - - d244517b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix logic behind binder type renaming. - - - - - f3c5e360 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add SYB-like utility function for performing stateful queries. - - - - - eb3f9154 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create function for retrieving free variables from given type. - - - - - a94561d3 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix compilation error caused by incorrect type signature. - - - - - 8bb707cf by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Move `SetName` class definition to types module. - - - - - 5800b13b by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Hook type renamer with instance method HTML pretty-printer. - - - - - 6a480164 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some test cases for type renamer. - - - - - 839842f7 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized signatures refer to original signature declaration. - - - - - 4880f7c9 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized methods be nicely formatted again. - - - - - ab5a6a2e by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Attach source locations to the specialized class methods. - - - - - 43f8a559 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Extend instances test case to also test multi-name type signatures. - - - - - 59bc751c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix tab-based indentation in instances test case. - - - - - c2126815 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Improve placement of instance methods expander button. - - - - - 0a32e287 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add new data type declaration to instance specialization test case. - - - - - 5281af1f by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make type renamer first try single-letter names as alternatives. - - - - - 7d509475 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix type renamer bug with incorrect names being generated. - - - - - 0f35bf7c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some documentation and refactor type specialization module. - - - - - da1d0803 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix another bug where type renamer was generating incorrect names. - - - - - cd39b5cb by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Refactor type renamer to rebinding and pure renaming phases. - - - - - 850251f4 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix unwitting compilation bug. - - - - - e5e9fc01 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Integrate instance specification type into class instance definition. - - - - - 825b0ea0 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer neccessary instance specification type. - - - - - cdba44eb by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix declaration converter to use more appropriate mode for methods. - - - - - bc45c309 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug with types not being specialized at all. - - - - - 5d8e5d89 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug where instance expander was opening wrong section. - - - - - 6001ee41 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix another type renamer bug where not all names were rebound. - - - - - 5f58ce2a by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix yet another renamer bug where some names were not unique. - - - - - 8265e521 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split instance subsection layout method to top-level declarations. - - - - - e5e66298 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Rearrange layout of instance methods in generated documentation. - - - - - a50b4eea by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer used layout method. - - - - - 2ff36ec2 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach section title to the instance methods block. - - - - - 7ac15300 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Add basic tests for associated types in instances test case. - - - - - db0ea2f9 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach associated types information to instance header. - - - - - 71cad4d5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details section contain associated types information. - - - - - deee2809 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Improve look of rendered associated families in instance details. - - - - - 839d13a5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Introduce alternative type for family declarations. - - - - - d397f03f by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details record use new type for family declarations. - - - - - 2b23fe97 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split printer of type family header to separate functions. - - - - - c3498cdc by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Implement HTML renderer for pseudo-family declarations. - - - - - c12bbb04 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Apply type specializer to associated type family declarations. - - - - - 2fd69ff2 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Create helper method for specializing type signatures. - - - - - 475826e7 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Refactor specializer module to be independent from XHTML backend. - - - - - f00b431c by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add some documentation for instance head specializer. - - - - - a9fef2dc by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix bug with missing space in documentation for associated types. - - - - - 50e29056 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with incorrect instance details sections being expanded. - - - - - e6dfdd03 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by adding instance details section. - - - - - 75565b2a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make section identifier of instance details more GHC-independent. - - - - - add0c23e by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Re-accept tests after applying deterministic section identifiers. - - - - - 878f2534 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make identifier generation also architecture-independent. - - - - - 48be69f8 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with instance expander hijacking type hyperlink click. - - - - - 47830c1f by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Get rid of dreadful hashing function for generating identifiers. - - - - - 956cd5af by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Move `InstOrigin` type declaration to more appropriate module. - - - - - bf672ed3 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by changes related to instance expander. - - - - - 8f2a949a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add examples with type operators to the instances test case. - - - - - 64600a84 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add basic support for sugaring infix type operators. - - - - - 747d71b8 by Łukasz Hanuszczak at 2015-08-21T18:22:34+01:00 Add support for sugaring built-in function syntax. - - - - - d4696ffb by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Remove default methods from Hoogle class output. - - - - - bf0e09d7 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add fixity declarations in Hoogle backend output. - - - - - 90e91a51 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix bug with incorrect fixities being generated in Hoogle backend. - - - - - 48f11d35 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve class type family declarations output in Hoogle backend. - - - - - 661e8e8f by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add missing default family equations in Hoogle output. - - - - - e2d64103 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve formatting of class details output in Hoogle backend. - - - - - 490fc377 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix weird-looking Hoogle output for familyless classes. - - - - - ea115b64 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create script file for new HTML test runner. - - - - - 609913d3 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Set default behaviour if no arguments given. - - - - - dc115f67 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for providing optional arguments for test runner. - - - - - d93ec867 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve output of test runner error messages. - - - - - 0be9fe12 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for executing Haddock process in test runner. - - - - - 4e4d00d9 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add GHC path to test runner configuration. - - - - - d67a2086 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make GHC path a test runner command-line argument. - - - - - c810079a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Extend test runner configuration with Haddock arguments. - - - - - fee18845 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor test runner and create stub functions. - - - - - ff7c161f by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make test runner actually run Haddock executable. - - - - - 391f73e6 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with test runner not producing any output files. - - - - - 81a74e2d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Setup skeleton of framework for running tests. - - - - - f8a79ec4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with modules not being found in global search mode. - - - - - 7e700b4d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make Haddock standard output redirection be more configurable. - - - - - 53b4c17a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Incorporate old, ugly functions for comparing output files. - - - - - 8277c8aa by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor architecture of test runner output checking functions. - - - - - 587bb414 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement actual diffing mechanism. - - - - - 9ed2b5e4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve code style to match popular guidelines. - - - - - 14bffaf8 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make it possible to choose alternative diff tool. - - - - - 5cdfb005 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create stub methods for processing test output as XML documents. - - - - - 7ef8e12e by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement link-stripping logic as simple SYB transformation. - - - - - 8a1fcd4f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Incorporate link stripping to output diffing mechanism. - - - - - 37dba2bc by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement footer-stripping logic. - - - - - 9cd52120 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Add missing dependencies in Cabal configuration file. - - - - - e0f83c6e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix issue with output being printed in incorrect order. - - - - - 0a94fbb0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to run tests without generating diff. - - - - - 76a58c6f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor HTML test suite boilerplate to external package. - - - - - af41e6b0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utilities for storing directory configuration. - - - - - d8f0698f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move IO-dependent config of HTML test suite to test package. - - - - - 17369fa0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Enable all compiler warnings in Haddock test package configuration. - - - - - 9d03b47a by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move Haddock runner of HTML test suite to Haddock test package. - - - - - 4b3483c5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 03754194 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience wrappers to simplify in test entry points. - - - - - 27476ab7 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adjust module visibility and items they export. - - - - - c40002ba by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Remove no longer useful test option. - - - - - 55ab2541 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Change extension of test files used for diffing. - - - - - 136bf4e4 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor and simplify XHTML helper module of test package. - - - - - 69f7e3df by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix typo in link stripper of HTML test suite runner. - - - - - 0c3c1c6b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience script for running specific HTML tests. - - - - - 489e1b05 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement utility functions for conditional link stripping. - - - - - 0f985dc3 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt `hypsrc-test` module to work with new testing framework. - - - - - 927406f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement output accepting mechanism in test package. - - - - - 8545715e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utility function for recursive obtaining directory contents. - - - - - cb70381f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 019599b5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix path handling in test runner. - - - - - 399b985b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to specify ignored files for test output. - - - - - 41b3d93d by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt HTML test runner to use new ignoring functionality. - - - - - e2091c8b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix bug with not all test output files being checked. - - - - - b22134f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Specify ignored files for hyperlinker source test runner. - - - - - 3301dfa1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Copy test runner script for hyperlinked source case. - - - - - d39a6dfa by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner invoking Haddock in incorrect mode. - - - - - f32c8ff3 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix path handling in test module loader. - - - - - 10f94ee9 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make test runner ignore test packages with no modules. - - - - - 5dc4239c by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create test runner entry points for LaTeX test suite. - - - - - 58d1f7cf by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with unnecessary checking old test output. - - - - - c7ce76e1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Re-implement test acceptance functionality. - - - - - 13bbabe8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix warning about no longer needed definition. - - - - - 958a99b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Adapt Cabal configuration to execute LaTeX suite with new runner. - - - - - 550ff663 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Setup test suite for Hoogle backend. - - - - - 3aa969c4 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make Hoogle backend create output directory if needed. - - - - - eb085b02 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Add appropriate .gitignore entry and configure Hoogle test suite. - - - - - a50bf915 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner failing when run on multiple test packages. - - - - - bf5368b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create simple test cases for Hoogle backend. - - - - - 6121ba4b by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create helper function for conversion between XML and XHTML. - - - - - cb516061 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Refactor existing code to use XHTML printer instead of XML one. - - - - - e2de8c82 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Improve portability of test runner scripts. - - - - - 9563e774 by Łukasz Hanuszczak at 2015-08-22T23:43:16+02:00 Remove redundant import statement. - - - - - 55353df1 by Łukasz Hanuszczak at 2015-08-24T23:09:20+02:00 Fix bug with accepting to non-existing directory. - - - - - 00a334ca by Łukasz Hanuszczak at 2015-08-24T23:09:47+02:00 Accept output for Hoogle and LaTeX backends. - - - - - 29191d8b by Łukasz Hanuszczak at 2015-08-24T23:14:18+02:00 Get rid of obsolete testing utilities. - - - - - bbb25db3 by Łukasz Hanuszczak at 2015-08-24T23:18:50+02:00 Update sandbox setup guide to work with Haddock test package. - - - - - cfd45248 by Łukasz Hanuszczak at 2015-08-24T23:51:30+02:00 Make Travis aware of Haddock test package. - - - - - 74185b7a by Łukasz Hanuszczak at 2015-08-25T17:41:59+02:00 Fix test suite failure when used with Stack. - - - - - 18769697 by Łukasz Hanuszczak at 2015-08-25T18:02:09+02:00 Add sample Stack setup to the hacking guide. - - - - - 22715eeb by Łukasz Hanuszczak at 2015-08-25T18:04:47+02:00 Fix Markdown formatting of README file. - - - - - b49ec386 by Łukasz Hanuszczak at 2015-08-25T18:13:36+02:00 Setup Haddock executable path in Travis configuration. - - - - - 5d29eb03 by Eric Seidel at 2015-08-30T09:55:58-07:00 account for changes to ipClass - - - - - f111740a by Ben Gamari at 2015-09-02T13:20:37+02:00 Merge pull request haskell/haddock#443 from bgamari/ghc-head account for changes to ipClass - - - - - a2654bf6 by Jan Stolarek at 2015-09-03T01:32:57+02:00 Follow changes from haskell/haddock#6018 - - - - - 2678bafe by Richard Eisenberg at 2015-09-21T12:00:47-04:00 React to refactoring CoAxiom branch lists. - - - - - ebc56e24 by Edward Z. Yang at 2015-09-21T11:53:46-07:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4a8c4198 by Tamar Christina at 2015-09-27T13:59:08+02:00 Create Process: removed PhaseFailed - - - - - 7e99b790 by Oleg Grenrus at 2015-09-27T20:52:10+03:00 Generate docs for orphan instances - - - - - 32e932e2 by Oleg Grenrus at 2015-09-28T07:21:11+03:00 Have source links for orphan instances - - - - - c2eb9f4f by Oleg Grenrus at 2015-09-28T07:24:58+03:00 Print orphan instances header only if required - - - - - ff96f978 by Oleg Grenrus at 2015-09-28T07:40:54+03:00 Add orphan instances link to contents box - - - - - d72490a6 by Oleg Grenrus at 2015-09-28T16:37:44+03:00 Fix orphan instance collapsing - - - - - 25d3dfe5 by Ben Gamari at 2015-10-03T12:38:09+02:00 Merge pull request haskell/haddock#448 from Mistuke/fix-silent-death-of-runInteractive Remove PhaseFailed - - - - - 1e45e43b by Edward Z. Yang at 2015-10-11T13:10:10-07:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b1370ac1 by Adam Gundry at 2015-10-16T16:26:42+01:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 60bef421 by Simon Peyton Jones at 2015-10-26T12:52:36+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 4c1898ca by Simon Peyton Jones at 2015-10-27T14:24:56+00:00 Track change to PatSyn.patSynSig - - - - - 25108e85 by Simon Peyton Jones at 2015-10-27T17:34:18+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - 693643ac by Ben Gamari at 2015-10-28T14:33:06+01:00 Account for Typeable changes The treatment of type families changed. - - - - - cd7c2221 by Simon Peyton Jones at 2015-10-30T13:03:51+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - 712032cb by Herbert Valerio Riedel at 2015-10-31T11:01:45+01:00 Relax upper bound on `base` to allow base-4.9 - - - - - 0bfa0475 by Simon Peyton Jones at 2015-10-31T19:08:13+00:00 More adaption to wildcard-refactor - - - - - 0a3c0cb7 by Simon Peyton Jones at 2015-10-31T22:14:43+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - c4fd4ec9 by Alan Zimmerman at 2015-11-01T11:16:34+01:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 42cdd882 by Matthew Pickering at 2015-11-06T20:02:16+00:00 Change for IEThingWith - - - - - f368b7be by Ben Gamari at 2015-11-11T11:35:51+01:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - e32965b8 by Simon Peyton Jones at 2015-11-13T12:18:17+00:00 Merge with origin/head - - - - - ebcf795a by Edward Z. Yang at 2015-11-13T21:56:27-08:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4e23989f by Simon Peyton Jones at 2015-11-18T11:32:54+00:00 Wibbles to Haddock - - - - - 2289cd4a by Simon Peyton Jones at 2015-11-20T23:12:49+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor - - - - - 695975a6 by Alan Zimmerman at 2015-11-21T21:16:12+02:00 Update to match GHC wip/T11019 - - - - - bbba21e7 by Simon Peyton Jones at 2015-11-23T13:54:31+00:00 merge with origin/ghc-head - - - - - 3d664258 by Simon Peyton Jones at 2015-11-23T17:17:18+00:00 Wibble - - - - - e64cf586 by Herbert Valerio Riedel at 2015-12-05T00:29:55+01:00 Canonicalise Monad instances - - - - - a2de15a7 by Alan Zimmerman at 2015-12-05T17:33:52+02:00 Matching changes for haskell/haddock#11028 - - - - - cc29a3e4 by Alan Zimmerman at 2015-12-05T19:45:33+02:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 95dd15d1 by Richard Eisenberg at 2015-12-11T17:33:39-06:00 Update for type=kinds - - - - - cb5fd9ed by Herbert Valerio Riedel at 2015-12-14T15:07:30+00:00 Bump versions for ghc-7.11 - - - - - 4f286d96 by Simon Peyton Jones at 2015-12-14T15:10:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 13ea2733 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 098df8b8 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track changes in HsSyn for quasi-quotes - - - - - 716a64de by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track change in API of TyCon - - - - - 77a66bca by Adam Gundry at 2015-12-14T15:10:58+00:00 Track API changes to support empty closed type familes - - - - - f2808305 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track the new location of setRdrNameSpace - - - - - ba8b08a4 by Alan Zimmerman at 2015-12-14T15:10:59+00:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - a4ded87e by Thomas Winant at 2015-12-14T15:14:05+00:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 25c78107 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: print correct strictness marks - - - - - 6cbc41c4 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: changes in HsBang type - - - - - ad46821a by Alan Zimmerman at 2015-12-14T15:14:06+00:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - abc0ae5b by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 3308d06c by Thomas Miedema at 2015-12-14T15:14:07+00:00 Follow changes in GHC build system - - - - - 6c763deb by Eric Seidel at 2015-12-14T15:14:07+00:00 account for changes to ipClass - - - - - ae5b4eac by Jan Stolarek at 2015-12-14T15:17:00+00:00 Follow changes from haskell/haddock#6018 - - - - - ffbc40e0 by Richard Eisenberg at 2015-12-14T15:17:02+00:00 React to refactoring CoAxiom branch lists. - - - - - d1f531e9 by Edward Z. Yang at 2015-12-14T15:17:02+00:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 79f73754 by Tamar Christina at 2015-12-14T15:17:02+00:00 Create Process: removed PhaseFailed - - - - - 3d37bebb by Edward Z. Yang at 2015-12-14T15:20:46+00:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 5f8a9e44 by Adam Gundry at 2015-12-14T15:20:48+00:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 79dda70f by Simon Peyton Jones at 2015-12-14T15:26:02+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 959930fb by Simon Peyton Jones at 2015-12-14T15:37:50+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - e18a8df5 by Simon Peyton Jones at 2015-12-14T15:37:52+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - aa35ab52 by Simon Peyton Jones at 2015-12-14T15:40:18+00:00 More adaption to wildcard-refactor - - - - - 8ceef94b by Simon Peyton Jones at 2015-12-14T15:46:04+00:00 Track change to PatSyn.patSynSig - - - - - cd81e83d by Ben Gamari at 2015-12-14T15:46:06+00:00 Account for Typeable changes The treatment of type families changed. - - - - - 63c9117c by Herbert Valerio Riedel at 2015-12-14T15:46:34+00:00 Relax upper bound on `base` to allow base-4.9 - - - - - a484c613 by Alan Zimmerman at 2015-12-14T15:47:46+00:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 2c26fa51 by Matthew Pickering at 2015-12-14T15:47:47+00:00 Change for IEThingWith - - - - - 593baa0f by Ben Gamari at 2015-12-14T15:49:21+00:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - b6b5ca78 by Edward Z. Yang at 2015-12-14T15:49:54+00:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b5b0e072 by Alan Zimmerman at 2015-12-14T15:54:20+00:00 Update to match GHC wip/T11019 - - - - - 14ddeb68 by Simon Peyton Jones at 2015-12-14T15:54:22+00:00 Wibble - - - - - 10a90ad8 by Herbert Valerio Riedel at 2015-12-14T15:54:22+00:00 Canonicalise Monad instances - - - - - ed68ac50 by Alan Zimmerman at 2015-12-14T15:55:48+00:00 Matching changes for haskell/haddock#11028 - - - - - 3f7e5a2d by Alan Zimmerman at 2015-12-14T15:55:49+00:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 6543a73f by Richard Eisenberg at 2015-12-14T15:59:55+00:00 Update for type=kinds - - - - - 193a5c48 by Matthew Pickering at 2015-12-14T18:17:00+00:00 Changes to compile with 8.0 - - - - - add669ec by Matthew Pickering at 2015-12-14T18:47:12+00:00 Warnings - - - - - 223f3fb4 by Ben Gamari at 2015-12-15T23:45:05+01:00 Update for D1200 - - - - - d058388f by Ben Gamari at 2015-12-16T05:40:17-05:00 Types: Add Outputable[Bndr] DocName instances - - - - - 62ecd7fb by Ben Gamari at 2015-12-16T09:23:09-05:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ddbc187a by Ben Gamari at 2015-12-16T17:54:55+01:00 Update for D1200 - - - - - cec83b52 by Ben Gamari at 2015-12-16T17:54:55+01:00 Types: Add Outputable[Bndr] DocName instances - - - - - d12ecc98 by Ben Gamari at 2015-12-16T17:54:55+01:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ada1616f by Ben Gamari at 2015-12-16T17:54:58+01:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a4f0383d by Ben Gamari at 2015-12-16T23:32:38+01:00 Fix Hyperlinker GHC.con_names is now GHC.getConNames - - - - - a10e6849 by Ben Gamari at 2015-12-20T00:54:11+01:00 Merge remote-tracking branch 'mrhania/testing-framework-improvements' into ghc-head - - - - - f078b4fd by Ben Gamari at 2015-12-20T00:59:51+01:00 test: Compatibility with Cabal 1.23 - - - - - 88a511a9 by Ben Gamari at 2015-12-20T01:14:35+01:00 Merge remote-tracking branch 'phadej/orphans' into ghc-head - - - - - 4e250f36 by Ben Gamari at 2015-12-20T01:14:52+01:00 Add html-test for orphan instances output - - - - - 87fffbad by Alan Zimmerman at 2015-12-20T09:50:42+02:00 Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc - - - - - 6b7e51c9 by idontgetoutmuch at 2015-12-20T21:01:47+00:00 Merge pull request haskell/haddock#1 from haskell/ghc-head Ghc head - - - - - 229c1fb5 by Dominic Steinitz at 2015-12-21T07:19:16+00:00 Handle inline math with mathjax. - - - - - 57902d66 by Dominic Steinitz at 2015-12-21T08:07:11+00:00 Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs - - - - - 0e69f236 by Herbert Valerio Riedel at 2015-12-21T18:30:43+01:00 Fix-up left-over assumptions of GHC 7.12 into GHC 8.0 - - - - - c67f8444 by Simon Peyton Jones at 2015-12-22T16:26:56+00:00 Follow removal of NamedWildCard from HsType - - - - - da40327a by Ben Gamari at 2015-12-23T14:15:28+01:00 html-test/Operators: Clear up ambiguous types For reasons that aren't entirely clear a class with ambiguous types was accepted by GHC <8.0. I've added a functional dependency to clear up this ambiguity. - - - - - 541b7fa4 by Ben Gamari at 2015-12-23T14:18:51+01:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 0febc947 by Ben Gamari at 2015-12-24T00:30:20+01:00 hoogle-test/AssocTypes: Allow AmbiguousTypes GHC 8.0 complains otherwise - - - - - 25810841 by Ben Gamari at 2015-12-24T00:33:18+01:00 OrphanInstances: Accept test output - - - - - 841987f3 by Ben Gamari at 2015-12-25T11:03:11+01:00 Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head - - - - - 358391f0 by Ben Gamari at 2015-12-26T10:44:50+01:00 Add missing import - - - - - a8896885 by Ben Gamari at 2015-12-26T10:45:27+01:00 travis: Use Travis containers - - - - - 85e82134 by Herbert Valerio Riedel at 2015-12-30T17:25:39+01:00 tweak version bounds for GHC-8.1 - - - - - 672a5f75 by randen at 2016-01-01T23:45:25-08:00 The Haddock part for fully gcc-like response files " driver/Main.hs * Moved the response file handling into ResponseFile.hs, updating import section as appropriate. * driver/ResponseFile.hs * New file. In anticipation that maybe some day this could be provided by another library, and to make it possible to unit test, this functionality is pulled out of the Main.hs module, and expanded to support the style/format of response files which gcc uses. * The specification for the format of response files which gcc generates and consumes, seems to be best derived from the gcc code itself (libiberty/argv.c), so that is what has been done here. * This is intended to fix haskell/haddock#379 * driver-test/Main.hs * New file for testing code in the driver source tree * driver-test/ResponseFileSpec.hs * Tests, adapted/adopted from the same gcc code where the escaping/unescaping is from, in the hspec style of unit tests * haddock.cabal * Add the driver-test test-suite. Introduces a new library dependency (upon hspec) for the haddock driver target in the haddock.cabal file, but practically, this should not be a problem as the haddock-api tests already depend on hspec. - - - - - 498781df by Ben Gamari at 2016-01-06T13:41:04+01:00 Version bumps and changelog - - - - - 8451e46a by Ben Gamari at 2016-01-06T13:47:17+01:00 Merge remote-tracking branch 'randen/bug468' - - - - - fb2d9181 by Ben Gamari at 2016-01-06T08:14:42-05:00 Add ResponseFile to OtherModules - - - - - 2cb2d2e3 by Ben Gamari at 2016-01-06T14:35:00+01:00 Merge branch 'master' into ghc-head - - - - - 913477d4 by Eric Seidel at 2016-01-11T14:57:57-08:00 deal with un-wiring of IP class - - - - - c557a4b3 by Alan Zimmerman at 2016-01-15T11:14:35+02:00 Update to match wip/T11430 in GHC - - - - - 3e135093 by Alan Zimmerman at 2016-01-16T18:21:59+01:00 Update to match wip/T11430 in GHC - - - - - c48ef2f9 by Ben Gamari at 2016-01-18T09:50:06+01:00 Merge remote-tracking branch 'gridaphobe/ghc-head' into ghc-head - - - - - 9138a1b0 by Eric Seidel at 2016-01-18T12:50:15+01:00 deal with un-wiring of IP class (cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f) - - - - - b48c172e by Joachim Breitner at 2016-01-19T00:11:38+01:00 Make sure --mathjax affects all written HTML files This fixes haskell/haddock#475. - - - - - af61fe63 by Ryan Scott at 2016-02-07T23:25:57+01:00 Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes haskell/haddock#473) - - - - - b6458693 by Ben Gamari at 2016-02-07T23:29:27+01:00 Merge pull request haskell/haddock#477 from haskell/issue-475 Make sure --mathjax affects all written HTML files - - - - - adcc0071 by Ben Gamari at 2016-02-07T23:34:52+01:00 Merge branch 'master' into ghc-head - - - - - d0404e61 by Ben Gamari at 2016-02-08T12:46:49+01:00 doc: Switch to Sphinx - - - - - acb153b3 by Ben Gamari at 2016-02-08T12:46:56+01:00 Document --use-unicode flag - - - - - c20bdf1d by Ben Gamari at 2016-02-08T13:41:24+01:00 Fix GHC and haddock-library dependency bounds - - - - - 8d946801 by Ben Gamari at 2016-02-08T14:54:56+01:00 testsuite: Rework handling of output sanitization Previously un-cleaned artifacts were kept as reference output, making it difficult to tell what has changed and causing spurious changes in the version control history. Here we rework this, cleaning the output during acceptance. To accomplish this it was necessary to move to strict I/O to ensure the reference handle was closed before accept attempts to open the reference file. - - - - - c465705d by Ben Gamari at 2016-02-08T15:36:05+01:00 test: Compare on dump For reasons I don't understand the Xml representations differ despite their textual representations being identical. - - - - - 1ec0227a by Ben Gamari at 2016-02-08T15:36:05+01:00 html-test: Accept test output - - - - - eefbd63a by Ben Gamari at 2016-02-08T15:36:08+01:00 hypsrc-test: Accept test output And fix impredicative Polymorphism testcase. - - - - - d1df4372 by Ben Gamari at 2016-02-08T15:40:44+01:00 Merge branch 'fix-up-testsuite' - - - - - 206a3859 by Phil Ruffwind at 2016-02-08T17:51:21+01:00 Move the permalinks to "#" on the right side Since pull request haskell/haddock#407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). - - - - - 6c89fa03 by Phil Ruffwind at 2016-02-08T17:54:44+01:00 Update tests for previous commit - - - - - effaa832 by Ben Gamari at 2016-02-08T17:56:17+01:00 Merge branch 'anchors-redux' - - - - - 9a2bec90 by Ben Gamari at 2016-02-08T17:58:40+01:00 Use -fprint-unicode-syntax when --use-unicode is enabled This allows GHC to render `*` as its Unicode representation, among other things. - - - - - 28ecac5b by Ben Gamari at 2016-02-11T18:53:03+01:00 Merge pull request haskell/haddock#480 from bgamari/sphinx Move documentation to ReStructuredText - - - - - 222e5920 by Ryan Scott at 2016-02-11T15:42:42-05:00 Collapse type/data family instances by default - - - - - a80ac03b by Ryan Scott at 2016-02-11T20:17:09-05:00 Ensure expanded family instances render correctly - - - - - 7f985231 by Ben Gamari at 2016-02-12T10:04:22+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - d4eda086 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Various cleanups - - - - - 79bee48d by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show kind signatures for type family variables Addresses GHC haskell/haddock#11588. - - - - - b2981d98 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show 'where ...' after closed type family Seems like we should ideally show the actual equations as well but that seems like it would be a fair amount of work - - - - - cfc0e621 by Ben Gamari at 2016-02-18T22:48:12+01:00 Merge pull request haskell/haddock#483 from bgamari/T11588 Fix GHC haskell/haddock#11588 This fixes GHC haskell/haddock#11588: * Show where ... after closed type families * Show kind signatures on type family type variables - - - - - 256e8a0d by Ben Gamari at 2016-02-18T23:15:39+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 32402036 by Richard Eisenberg at 2016-02-24T13:21:44-05:00 Follow-on changes to support RuntimeRep - - - - - 2b1c572d by Matthew Pickering at 2016-03-04T21:04:02+00:00 Remove unused functions - - - - - eb906f50 by Richard Eisenberg at 2016-03-13T21:17:20+01:00 Follow-on changes to support RuntimeRep (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c) - - - - - 8c34ef34 by Richard Eisenberg at 2016-03-14T23:47:23-04:00 Changes due to fix for GHC#11648. - - - - - 0e022014 by Richard Eisenberg at 2016-03-15T14:06:45+01:00 Changes due to fix for GHC#11648. (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1) - - - - - ed3f78ab by Rik Steenkamp at 2016-04-02T22:20:36+01:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 - - - - - d3210042 by Rik Steenkamp at 2016-04-04T15:43:32+02:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb) - - - - - 236eec90 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 692ee7e0 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. - - - - - 79619f57 by Ben Gamari at 2016-04-10T23:46:22+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. (cherry picked from commit c6d6a18d85e5e2d9bb5904e6919e8a8d7e31c4c5) - - - - - 3358ccb4 by Ben Gamari at 2016-04-10T23:47:27+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 264949b1 by Ben Gamari at 2016-04-16T17:50:23+02:00 Merge pull request haskell/haddock#482 from RyanGlScott/ghc-head Collapse type/data family instances by default - - - - - 478c483a by Ben Gamari at 2016-04-16T17:51:09+02:00 Merge pull request haskell/haddock#489 from mpickering/unused-functions Remove some unused functions - - - - - c94e55f0 by Ryan Scott at 2016-04-16T17:57:54+02:00 Collapse type/data family instances by default (cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088) - - - - - 31e633d3 by Ryan Scott at 2016-04-16T17:58:06+02:00 Ensure expanded family instances render correctly (cherry picked from commit 1338b5d7c32939de6bbc31af0049477e4f847103) - - - - - 03e4d197 by Matthew Pickering at 2016-04-16T17:58:21+02:00 Remove unused functions (cherry picked from commit b89d1c2456bdb2d4208d94ded56155f7088a37d0) - - - - - ed4116f6 by Ben Gamari at 2016-04-20T10:46:57+02:00 ghc: Install files for needed --hyperlinked-source - - - - - 0be999c4 by Ben Gamari at 2016-04-20T11:37:54+02:00 ghc: Install files for needed --hyperlinked-source (cherry picked from commit 5c82c9fc2d21ddaae4a2470f1c375426968f19c6) - - - - - 4d17544c by Simon Peyton Jones at 2016-04-20T12:42:28+01:00 Track change to HsGroup This relates to a big GHC patch for Trac haskell/haddock#11348 - - - - - 1700a50d by Ben Gamari at 2016-05-01T13:19:27+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. - - - - - 0b7c8125 by Ben Gamari at 2016-05-01T13:21:43+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. (cherry picked from commit 609018dd09c4ffe27f9248b2d8b50f6196cd42b9) - - - - - af115ce0 by Ryan Scott at 2016-05-04T22:15:50-04:00 Render Haddocks for derived instances Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac haskell/haddock#11768. - - - - - 76fa1edc by Ben Gamari at 2016-05-10T18:13:25+02:00 haddock-test: A bit of refactoring for debuggability - - - - - 7d4c4b20 by Ben Gamari at 2016-05-10T18:13:25+02:00 Create: Mark a comment as TODO - - - - - 2a6d0c90 by Ben Gamari at 2016-05-10T18:13:25+02:00 html-test: Update reference output - - - - - bd60913d by Ben Gamari at 2016-05-10T18:13:25+02:00 hypsrc-test: Fix reference file path in cabal file It appears the haddock insists on prefixing --hyperlinked-sourcer output with directory which the source appeared in. - - - - - c1548057 by Ben Gamari at 2016-05-10T18:22:12+02:00 doc: Update extra-source-files in Cabal file - - - - - 41d5bae3 by Ben Gamari at 2016-05-10T18:29:21+02:00 Bump versions - - - - - ca75b779 by Ben Gamari at 2016-05-11T16:03:44+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 4e3cfd62 by Ben Gamari at 2016-05-11T16:06:45+02:00 Merge remote-tracking branch 'RyanGlScott/ghc-head' into ghc-head - - - - - a2379970 by Ben Gamari at 2016-05-11T23:15:11+02:00 doc: Add clean targets - - - - - f275212e by Ben Gamari at 2016-05-11T23:15:14+02:00 doc: Add html as an all-target for ghc Otherwise the html documentation won't be installed for binary-dist. - - - - - 388fc0af by Ben Gamari at 2016-05-12T09:49:12+02:00 Update CHANGES - - - - - bad81ad5 by Ben Gamari at 2016-05-12T09:49:38+02:00 Version bump - - - - - c01688a7 by Ben Gamari at 2016-05-12T10:04:58+02:00 Revert "Version bump" This bump was a bit premature. This reverts commit 7b238d9c5be9b07aa2d10df323b5c7b8d1634dc8. - - - - - 7ed05724 by Ben Gamari at 2016-05-12T10:05:33+02:00 doc: Fix GHC clean rule Apparently GHC's build system doesn't permit wildcards in clean paths. - - - - - 5d9611f4 by Ben Gamari at 2016-05-12T17:43:50+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 653566b2 by Ben Gamari at 2016-05-14T09:57:31+02:00 Version bump to 2.17.2 - - - - - b355c439 by Ben Gamari at 2016-05-14T09:57:51+02:00 doc: Use `$(MAKE)` instead of `make` This is necessary to ensure we use gmake. - - - - - 8a18537d by Ben Gamari at 2016-05-14T10:15:45+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - b3290ef1 by Sebastian Meric de Bellefon at 2016-05-14T11:29:47-04:00 Fix haskell/haddock#303. Hide footer when printing The "Produced by Haddock" footer was overlapping the page's body when printing. This patch hides the footer with a css media rule. - - - - - b4a76f89 by Sebastian Meric de Bellefon at 2016-05-15T02:12:46-04:00 Fix haskell/haddock#280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines - - - - - ba797c9e by Ben Gamari at 2016-05-16T14:53:46+02:00 doc: Vendorize alabaster Sphinx theme Alabaster is now the default sphinx theme and is a significant improvement over the previous default that it's worthproviding it when unavailable (e.g. Sphinx <1.3). - - - - - c9283e44 by Ben Gamari at 2016-05-16T14:55:17+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 1c9ea198 by Sebastian Méric de Bellefon at 2016-05-16T12:30:40-04:00 Merge pull request haskell/haddock#502 from Helkafen/master Fix haskell/haddock#303. Hide footer when printing - - - - - 33631016 by Ben Gamari at 2016-05-16T19:56:11+02:00 Revert "doc: Vendorize alabaster Sphinx theme" This ended up causes far too many issues to be worthwhile. We'll just have to live with inconsistent haddock documentation. This reverts commit cec21957001143794e71bcd9420283df18e7de40. - - - - - 93317d26 by Ben Gamari at 2016-05-16T19:56:11+02:00 cabal: Fix README path - - - - - c8695b22 by Ben Gamari at 2016-05-16T19:58:51+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 0b50eaaa by Ben Gamari at 2016-05-16T21:02:08+02:00 doc: Use whichever theme sphinx deems appropriate - - - - - 857c1c9c by Ben Gamari at 2016-05-16T21:07:08+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 15fc5637 by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Remove redundant imports - - - - - 132ddc6a by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Better debug output For tracking down haskell/haddock#505 - - - - - 2252a149 by Ben Gamari at 2016-05-22T12:43:59+02:00 Don't consider default class ops when looking for decls When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of haskell/haddock#505. - - - - - 4886b2ec by Oleg Grenrus at 2016-05-24T16:19:48+03:00 UnfelpfulSpan line number omitted Kind of resolves https://github.com/haskell/haddock/issues/508 - - - - - a4befd36 by Oleg Grenrus at 2016-05-24T16:53:35+03:00 Change Hyperlinked lexer to know about DataKinds ticks - - - - - f45cb52e by David Feuer at 2016-05-24T18:48:53-04:00 Make parser state a newtype Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day. - - - - - 05013dd7 by Sebastian Meric de Bellefon at 2016-05-24T22:03:55-04:00 remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) Frames are a bit broken, ignored by Hackage, and considered obsolete in general. This patch disables frames generation. The mini_*.html files are still used in the synopsis. - - - - - b8163a88 by Ben Gamari at 2016-05-25T14:44:15+02:00 Merge pull request haskell/haddock#507 from bgamari/T505 Fix haskell/haddock#505 - - - - - ea1b30c6 by Sebastian Meric de Bellefon at 2016-05-25T14:17:00-04:00 Update CHANGES - - - - - eddfc258 by Sebastian Méric de Bellefon at 2016-05-25T15:17:40-04:00 Merge pull request haskell/haddock#514 from Helkafen/frames remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) - - - - - 0e506818 by Alex Biehl at 2016-05-26T12:43:09+02:00 Remove misplaced haddock comment - - - - - a07d28c0 by Ben Gamari at 2016-05-27T11:34:59+02:00 Merge pull request haskell/haddock#515 from alexbiehl/master Remove misplaced haddock comment - - - - - 9001d267 by Ben Gamari at 2016-05-27T11:35:46+02:00 Merge pull request haskell/haddock#513 from treeowl/newtype-since Make parser state a newtype - - - - - 74e1a018 by Sebastian Méric de Bellefon at 2016-05-28T17:28:15-04:00 Merge pull request haskell/haddock#504 from Helkafen/issue-280 Fix haskell/haddock#280. Parsing of module header - - - - - 37557f4f by Alan Zimmerman at 2016-05-29T23:36:50+02:00 Matching changes for haskell/haddock#12105 - - - - - 7d09e5d6 by Sebastian Meric de Bellefon at 2016-06-03T18:07:48-04:00 Version bumps (2.17.3, 1.4.2) - - - - - 85b4bc15 by Sebastian Méric de Bellefon at 2016-06-06T18:35:13-04:00 Merge pull request haskell/haddock#521 from Helkafen/master Version bumps (2.17.3, 1.4.2) - - - - - e95f0dee by Sebastian Meric de Bellefon at 2016-06-06T19:11:35-04:00 publish haddock-test library - - - - - 4de40586 by Sebastian Méric de Bellefon at 2016-06-06T20:26:30-04:00 Merge pull request haskell/haddock#512 from phadej/oleg-fixes Fixes for haskell/haddock#508 and haskell/haddock#510 - - - - - ddfd0789 by Dominic Steinitz at 2016-06-09T09:27:28+01:00 Documentation for LaTeX markup. - - - - - 697a503a by Dominic Steinitz at 2016-06-09T09:33:59+01:00 Fix spelling mistake. - - - - - 246f6fff by Dominic Steinitz at 2016-06-09T09:37:15+01:00 Camel case MathJax. - - - - - 4684bd23 by Dominic Steinitz at 2016-06-09T09:44:53+01:00 Fix math typo and add link. - - - - - f20c037c by Simon Peyton Jones at 2016-06-13T18:26:03+01:00 Follow changes to LHsSigWcType - - - - - 0c58996d by Simon Peyton Jones at 2016-06-15T12:56:01+01:00 Follow GHC re-adding FunTy - - - - - 401b5ca7 by Sebastian Méric de Bellefon at 2016-06-15T12:16:47-04:00 Merge pull request haskell/haddock#525 from idontgetoutmuch/master Documentation for LaTeX markup. - - - - - 92d263b7 by Sebastian Méric de Bellefon at 2016-06-15T12:17:29-04:00 Merge pull request haskell/haddock#522 from Helkafen/master publish haddock-test library - - - - - 0953a2ca by Sebastian Meric de Bellefon at 2016-06-16T00:46:46-04:00 Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 65453e14 by Ben Gamari at 2016-06-16T11:16:32+02:00 ocean: Ensure that synopsis fully covers other content Previously MathJax content was being rendered on top of the synopsis due to ambiguous z-ordering. Here we explicitly give the synopsis block a higher z-index to ensure it is rendered on top. Fixes haskell/haddock#531. - - - - - 68e411a1 by Sebastian Méric de Bellefon at 2016-06-16T23:34:39-04:00 Merge pull request haskell/haddock#534 from bgamari/T531 ocean: Ensure that synopsis fully covers other content - - - - - fad6491b by Sebastian Méric de Bellefon at 2016-06-18T23:57:20-04:00 Merge pull request haskell/haddock#533 from Helkafen/master Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 6108e21b by Sebastian Meric de Bellefon at 2016-06-22T23:08:28-04:00 do not create empty src directory Fix haskell/haddock#536. - - - - - 1ef23823 by Sebastian Méric de Bellefon at 2016-06-24T00:04:48-04:00 Merge pull request haskell/haddock#537 from Helkafen/master do not create empty src directory - - - - - 966baa96 by Omari Norman at 2016-06-29T21:59:34-04:00 Add $ as a special character If this character is not escaped, documentation built with Haddock 2.17.2 will fail. This was not an issue with 2.16 series, which causes builds to fail and there is nothing in the docs or error message giving a clue about why builds that used to succeed now don't. - - - - - 324adb60 by Ben Gamari at 2016-07-01T12:18:51+02:00 GhcUtils: Changes for multi-pattern signatures - - - - - d7571675 by Ömer Sinan Ağacan at 2016-07-21T13:30:47+02:00 Add support for unboxed sums - - - - - 29d0907b by Simon Marlow at 2016-07-22T13:55:48+01:00 Disable NFData instances for GHC types when GHC >= 8.2 - - - - - 702d95f3 by Simon Marlow at 2016-08-02T15:57:30+02:00 Disable NFData instances for GHC types when GHC >= 8.0.2 (cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a) - - - - - f4fa79c3 by Ben Gamari at 2016-08-07T13:51:18+02:00 ghc.mk: Don't attempt to install html/frames.html The frames business has been removed. - - - - - 9cd63daf by Ben Gamari at 2016-08-07T13:51:40+02:00 Haddock.Types: More precise version guard This allows haddock to be built with GHC 8.0.2 pre-releases. - - - - - f3d7e03f by Mateusz Kowalczyk at 2016-08-29T20:47:45+01:00 Merge pull request haskell/haddock#538 from massysett/master Add $ as a special character - - - - - 16dbf7fd by Bartosz Nitka at 2016-09-20T19:44:04+01:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 - - - - - 7c31c1ff by Bartosz Nitka at 2016-09-27T17:32:22-04:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b) - - - - - 33a90dce by Ryan Scott at 2016-09-30T20:53:41-04:00 Haddock changes for T10598 See https://ghc.haskell.org/trac/ghc/ticket/10598 - - - - - 1f32f7cb by Ben Gamari at 2016-10-13T20:01:26-04:00 Update for refactoring of NameCache - - - - - 1678ff2e by Ben Gamari at 2016-11-15T17:42:48-05:00 Bump upper bound on base - - - - - 9262a7c5 by Alan Zimmerman at 2016-12-07T21:14:28+02:00 Match changes in GHC wip/T3384 branch - - - - - ac0eaf1a by Ben Gamari at 2016-12-09T09:48:41-05:00 haddock-api: Don't use stdcall calling convention on 64-bit Windows See GHC haskell/haddock#12890. - - - - - 04afe4f7 by Alan Zimmerman at 2016-12-12T20:07:21+02:00 Matching changes for GHC wip/T12942 - - - - - e1d1701d by Ben Gamari at 2016-12-13T16:50:41-05:00 Bump base upper bound - - - - - 3d3eacd1 by Alan Zimmerman at 2017-01-10T16:59:38+02:00 HsIParamTy now has a Located name - - - - - 7dbceefd by Kyrill Briantsev at 2017-01-12T13:23:50+03:00 Prevent GHC API from doing optimization passes. - - - - - d48d1e33 by Richard Eisenberg at 2017-01-19T08:41:41-05:00 Upstream changes re levity polymorphism - - - - - 40c25ed6 by Alan Zimmerman at 2017-01-26T15:16:18+02:00 Changes to match haskell/haddock#13163 in GHC - - - - - 504f586d by Ben Gamari at 2017-02-02T17:19:37-05:00 Kill remaining static flags - - - - - 49147ea0 by Justus Adam at 2017-03-02T15:33:34+01:00 Adding MDoc to exports of Documentation.Haddock - - - - - 1cfba9b4 by Justus Adam at 2017-03-09T11:41:44+01:00 Also exposing toInstalledIface - - - - - 53f0c0dd by Ben Gamari at 2017-03-09T13:10:08-05:00 Bump for GHC 8.3 - - - - - c7902d2e by Ben Gamari at 2017-03-09T23:46:02-05:00 Bump for GHC 8.2 - - - - - 4f3a74f8 by Ben Gamari at 2017-03-10T10:21:55-05:00 Merge branch 'ghc-head' - - - - - e273b72f by Richard Eisenberg at 2017-03-14T13:34:04-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - 6ec3d436 by Richard Eisenberg at 2017-03-14T15:15:52-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - eee3cda1 by Ben Gamari at 2017-03-15T15:19:59-04:00 Adapt to EnumSet - - - - - 017cf58e by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 736d6773 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 475f84a0 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 13240b53 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - cd16d529 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 3bea97ae by Edward Z. Yang at 2017-03-15T22:50:46-07:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b2b051ce by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 0f082795 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 20ef63c9 by Edward Z. Yang at 2017-03-22T13:48:12-07:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 45692dcb by Edward Z. Yang at 2017-03-22T14:11:25-07:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4eae8caf by Ben Gamari at 2017-03-23T09:25:33-04:00 Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEAD - - - - - 0bbe03f5 by Ben Gamari at 2017-03-23T09:27:28-04:00 haddock-api: Bump bound on GHC - - - - - 65f3ac9d by Alex Biehl at 2017-03-23T17:36:11+01:00 Merge pull request haskell/haddock#581 from JustusAdam/master Adding more exports to Documentation.Haddock - - - - - 37d49a47 by Alex Biehl at 2017-03-23T17:39:14+01:00 Merge pull request haskell/haddock#568 from awson/ghc-head Prevent GHC API from doing optimization passes. - - - - - 1ed047e4 by Brian Huffman at 2017-03-23T17:45:58+01:00 Print any user-supplied kind signatures on type parameters. This applies to type parameters on data, newtype, type, and class declarations, and also to forall-bound type vars in type signatures. - - - - - 1b78ca5c by Brian Huffman at 2017-03-23T17:45:58+01:00 Update test suite to expect kind annotations on type parameters. - - - - - a856b162 by Alex Biehl at 2017-03-23T17:49:32+01:00 Include travis build indication badge - - - - - 8e2e2c56 by Ben Gamari at 2017-03-23T17:20:08-04:00 haddock-api: Bump bound on GHC - - - - - 4d2d9995 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737) - - - - - a650e20f by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858) - - - - - caa282c2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 2067a2d0afa9cef381d26fb7140b67c62f433fc0) - - - - - 49684884 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc) - - - - - 4dcfeb1a by Edward Z. Yang at 2017-03-23T17:20:08-04:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a) - - - - - 74dd19d2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e) - - - - - a9b19a23 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3) - - - - - d3631064 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit bf3c4d72a0fda38561376eac7eda216158783267) - - - - - ef2148fc by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1) - - - - - 2f29518b by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 4eb765ca4205c79539d60b7afa9b7e261a4a49fe) - - - - - 37de047d by Phil Ruffwind at 2017-04-03T11:57:14+02:00 Update MathJax URL MathJax is shutting down their CDN: https://www.mathjax.org/cdn-shutting-down/ They recommend migrating to cdnjs. - - - - - e9d24ba8 by David C. Turner at 2017-04-03T14:58:01+02:00 Add highlight for :target to ocean.css - - - - - 4819a202 by Alex Biehl at 2017-04-11T19:36:48+02:00 Allow base-4.10 for haddock-test - - - - - 44cec69c by Alex Biehl at 2017-04-11T19:39:22+02:00 cabal.project for haddock-api, haddock-library and haddock-test - - - - - 935d0f6a by Alex Biehl at 2017-04-11T19:46:29+02:00 Move dist scripts to scripts/ - - - - - 128e150c by Alex Biehl at 2017-04-11T20:34:46+02:00 Add haddock to cabal.project - - - - - cc8e08ea by Alex Biehl at 2017-04-11T20:35:08+02:00 Read files for hyperlinker eagerly This also exposes Documentation.Haddock.Utf8 - - - - - 152dda78 by Alex Biehl at 2017-04-11T20:37:06+02:00 Explicit import list ofr Control.DeepSeq in Haddock.Interface.Create - - - - - 501b33c4 by Kyrill Briantsev at 2017-04-11T21:01:42+02:00 Prevent GHC API from doing optimization passes. - - - - - c9f3f5ff by Alexander Biehl at 2017-04-12T16:36:53+02:00 Add @alexbiehl as maintaner - - - - - 76f214cc by Alex Biehl at 2017-04-13T07:27:18+02:00 Disable doctest with ghc-8.3 Currently doctest doesn't support ghc-head - - - - - 46b4f5fc by Edward Z. Yang at 2017-04-22T20:38:26-07:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f0555235 by Alex Biehl at 2017-04-25T10:08:48+02:00 Travis: Use ghc-8.2.1 on master - - - - - 966ea348 by Alex Biehl at 2017-04-25T10:32:01+02:00 Travis: Verbose cabal output cf. https://travis-ci.org/haskell/haddock/jobs/225512194#L377 - - - - - 36972bcd by Alex Biehl at 2017-04-25T10:40:43+02:00 Use travis_retry for cabal invocations - - - - - b3a09d2c by Alex Biehl at 2017-04-25T17:02:20+02:00 Use new MathJax URL in html-test 18ed871afb82560d5433b2f53e31b4db9353a74e switched to a new MathJax URL but didn't update the tests. - - - - - ae331e5f by Alexander Biehl at 2017-04-25T17:02:20+02:00 Expand signatures for class declarations - - - - - e573c65a by Alexander Biehl at 2017-04-25T17:02:20+02:00 Hoogle: Correctly print classes with associated data types - - - - - 3fc6be9b by Edward Z. Yang at 2017-04-25T17:02:20+02:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9) - - - - - 6725c060 by Herbert Valerio Riedel at 2017-04-25T17:02:20+02:00 `html-test --accept` deltas to reference samples - - - - - 7d444d61 by Alex Biehl at 2017-04-26T07:13:50+02:00 Remove anything related to obsolete frames mode - - - - - b888972c by Alex Biehl at 2017-04-26T07:49:10+02:00 Cherry-picked remaining commits from haddock-2.17.4-release (#603) * Release haddock/haddock-api 2.17.4 and haddock-library 1.4.3 * Set version bounds for haddock-library NB: This allows GHC 8.2.1's base * Set version bounds for haddock & haddock-api The version bounds support GHC 8.2 * Merge (temporary) v2.17.3 branch into v2.17 This allows us to delete the v2.17.3 branch * Fixup changelog * Pin down haddock-api to a single version as otherwise `haddock`'s package version has no proper meaning * fix source-repo spec for haddock-api - - - - - 4161099b by Alex Biehl at 2017-04-26T11:11:20+02:00 Update changelog to reflect news in HEAD - - - - - eed72cb8 by Alex Biehl at 2017-04-26T11:11:20+02:00 Markdownify changelog - - - - - 5815cea1 by Alex Biehl at 2017-04-26T11:32:33+02:00 Bump to 2.18.0 (#605) - - - - - a551d558 by Alex Biehl at 2017-04-29T22:00:25+02:00 Update attoparsec-0.12.1.1 to attoparsec-0.13.1.0 - - - - - ea164a8d by Sergey Vinokurov at 2017-04-29T22:42:36+02:00 Improve error message - - - - - 2e10122f by Alex Biehl at 2017-04-30T10:07:46+02:00 Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. - - - - - f9b24d99 by Alex Biehl at 2017-05-01T17:40:36+02:00 Lazily decode docMap and argMap (#610) These are only used in case of a doc reexport so most of the time decoding these is wasted work. - - - - - 2372af62 by Alex Biehl at 2017-05-01T21:59:23+02:00 Fix Binary instance for InstalledInterface (#611) (#610) introduced lazy decoding for docs from InstalledInterface but forgot to remove the original calls to get and put_ - - - - - 6c633c13 by Nathan Collins at 2017-05-11T11:47:55+02:00 Improve documenation of Haddock markup (#614) * Improve documentation of Haddock markup. - document that Haddock supports inferring types top-level functions with without type signatures, but also explain why using this feature is discouraged. Looks like this feature has been around since version 2.0.0.0 in 2008! - rework the "Module description" section: - move the general discussion of field formatting to the section intro and add examples illustrating the prose for multiline fields. - mention that newlines are preserved in some multiline fields, but not in others (I also noticed that commas in the `Copyright` field are not preserved; I'll look into this bug later). - add a subsection for the module description fields documentation, and put the field keywords in code formatting (double back ticks) instead of double quotes, to be consistent with the typesetting of keywords in other parts of the documentation. - mention that "Named chunks" are not supported in the long-form "Module description" documentation. - fix formatting of keywords in the "Module attributes" section. Perhaps these errors were left over from an automatic translation to ReST from some other format as part of the transition to using Sphinx for Haddock documentation? Also, add a missing reference here; it just said "See ?"! - update footnote about special treatment for re-exporting partially imported modules not being implemented. In my tests it's not implemented at all -- I tried re-exporting both `import B hiding (f)` and `import B (a, b)` style partial imports, and in both cases got the same result as with full imports `import B`: I only get a module reference. * Rework the `Controlling the documentation structure` section. My main goal was to better explain how to use Haddock without an export list, since that's my most common use case, but I hope I improved the section overall: - remove the incomplete `Omitting the export list` section and fold it into the other sections. In particular, summarize the differences between using and not using an export list -- i.e. control over what and in what order is documented -- in the section lead. - add "realistic" examples that use the structure markup, both with and without an export list. I wanted a realistic example here to capture how it can be useful to explain the relationship between a group of functions in a section, in addition to documenting their individual APIs. - make it clear that you can associate documentation chunks with documentation sections when you aren't using an export list, and that doing it in the most obvious way -- i.e. with `-- |`, as you can in the export list -- doesn't work without an export list. It took me a while to figure this out the first time, since the docs didn't explain it at all before. - add a "no export list" example to the section header section. - add more cross references. * Add examples of gotchas for markup in `@...@`. I'm not sure this will help anyone, since I think most people first learn about `@...@` by reading other people's Haddocks, but I've documented the mistakes which I've made and then gotten confused by. * Use consistent Capitalization of Titles. Some titles were in usual title caps, and others only had the first word capitalized. I chose making them all use title caps because that seems to make the cross references look better. - - - - - d4734f45 by Ben Gamari at 2017-05-12T20:36:08+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 93883f37 by Alex Biehl at 2017-05-12T21:02:33+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 5b8f179c by Alex Biehl at 2017-05-13T12:48:10+02:00 Consequently use inClass and notInClass in haddock-library (#617) These allow attoparsec to do some clever lookup optimization - - - - - 77984b82 by Doug Wilson at 2017-05-27T17:37:38+02:00 Don't enable compilation for template haskell (#624) This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa - - - - - 5a3de2b4 by Doug Wilson at 2017-05-27T19:54:53+02:00 Improve Syb code (#621) Specialize.hs and Ast.hs are modified to have their Syb code not recurse into Name or Id in HsSyn types. Specialize.hs is refactored to have fewer calls to Syb functions. Syb.hs has some foldl calls replaced with foldl' calls. There is still a lot of performance on the floor of Ast.hs. The RenamedSource is traversed many times, and lookupBySpan is very inefficient. everywhereBut and lookupBySpan dominate the runtime whenever --hyperlinked-source is passed. - - - - - 3d35a949 by Alex Biehl at 2017-05-30T19:01:37+02:00 Clear fixme comment (#625) - - - - - 2a44bd0c by Alex Biehl at 2017-05-30T19:02:12+02:00 Make haddock-library and haddock-api warning free (#626) - - - - - bd1a0e42 by Alex Biehl at 2017-06-01T10:40:33+02:00 Include `driver-test/*.hs` sdist (#630) This lead to haskell/haddock#629. - - - - - 184a3ab6 by Doug Wilson at 2017-06-03T12:02:08+02:00 Disable pattern match warnings (#628) This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns - - - - - 0cf68004 by Alex Biehl at 2017-06-03T20:37:28+02:00 Allow user defined signatures for pattern synonyms (#631) - - - - - 7f51a58a by Alex Biehl at 2017-06-04T11:56:38+02:00 Use NameSet for isExported check (#632) - - - - - d8f044a9 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Match new AST as per GHC wip/new-tree-one-param See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow - - - - - da1254e3 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Rename extension index tags - - - - - 538c7514 by Christiaan Baaij at 2017-06-09T08:26:43+02:00 Haddock support for bundled pattern synonyms (#627) * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after haskell/haddock#631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case - - - - - a050bffd by Doug Wilson at 2017-06-21T09:27:33+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636) There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6 - - - - - 5d06b871 by Doug Wilson at 2017-06-22T20:23:29+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639) * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports - - - - - b11bb73a by Alex Biehl at 2017-06-23T14:44:41+02:00 Lookup fixities for reexports without subordinates (#642) So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In haskell/haddock#644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from haskell/haddock#642 top-level functions now started to fail reexporting their fixities. - - - - - d2a6dad6 by Alex Biehl at 2017-06-23T18:30:45+02:00 Don't include names with empty subordinates in maps (#644) These are unecessary anyway and just blow up interface size - - - - - 69c2aac4 by Alex Biehl at 2017-06-29T19:54:49+02:00 Make per-argument docs for class methods work again (#648) * Make per-argument docs for class methods work again * Test case - - - - - c9448d54 by Bartosz Nitka at 2017-07-02T12:12:01+02:00 Fix haddock: internal error: links: UnhelpfulSpan (#561) * Fix haddock: internal error: links: UnhelpfulSpan This fixes haskell/haddock#554 for me. I believe this is another fall out of `wildcard-refactor`, like haskell/haddock#549. * Comment to clarify why we take the methods name location - - - - - d4f29eb7 by Alex Biehl at 2017-07-03T19:43:04+02:00 Document record fields when DuplicateRecordFields is enabled (#649) - - - - - 9d6e3423 by Yuji Yamamoto at 2017-07-03T22:37:58+02:00 Fix test failures on Windows (#564) * Ignore .stack-work * Fix for windows: use nul instead of /dev/null * Fix for windows: canonicalize line separator * Also normalize osx line endings - - - - - 7d81e8b3 by Yuji Yamamoto at 2017-07-04T16:13:12+02:00 Avoid errors on non UTF-8 Windows (#566) * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1) - - - - - eded67d2 by Alex Biehl at 2017-07-07T19:17:15+02:00 Remove redudant import warning (#651) - - - - - 05114757 by Alex Biehl at 2017-07-08T00:33:12+02:00 Avoid missing home module warning (#652) * Avoid missing home module warning * Update haddock-library.cabal - - - - - e9cfc902 by Bryn Edwards at 2017-07-17T07:51:20+02:00 Fix haskell/haddock#249 (#655) - - - - - eb02792b by Herbert Valerio Riedel at 2017-07-20T09:09:15+02:00 Fix compilation of lib:haddock-library w/ GHC < 8 - - - - - 9200bfbc by Alex Biehl at 2017-07-20T09:20:38+02:00 Prepare 2.18.1 release (#657) - - - - - 46ddd22c by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Tweak haddock-api.cabal for pending release - - - - - 85e33d29 by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Avoid trivial use of LambdaCase otherwise we can't test w/ e.g. GHC 7.4.2 - - - - - 3afb4bfe by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Refactor .cabal to use sub-lib for vendored lib A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite. - - - - - e56a552e by Herbert Valerio Riedel at 2017-07-20T10:17:48+02:00 haddock-api: add changelog pointing to haddock's changelog This addresses https://github.com/haskell/haddock/issues/638#issuecomment-309283297 - - - - - 2222ff0d by Herbert Valerio Riedel at 2017-07-20T10:19:56+02:00 Drop obsolete/misleading `stability: experimental` This .cabal property has long been considered obsolete - - - - - 9b882905 by Alex Biehl at 2017-07-20T11:25:54+02:00 Beef up haddock description (#658) * Beef up haddock description * Handle empty lines - - - - - bb60e95c by Herbert Valerio Riedel at 2017-07-20T12:08:53+02:00 Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet - - - - - 0761e456 by Herbert Valerio Riedel at 2017-07-20T12:12:55+02:00 Add cheatsheet to haddock.cabal - - - - - 2ece0f0f by Herbert Valerio Riedel at 2017-07-20T12:18:38+02:00 Mention new-build in README - - - - - 947b7865 by Herbert Valerio Riedel at 2017-07-20T12:32:16+02:00 Update README Also improves markup and removes/fixes redundant/obsolete parts [skip ci] - - - - - 785e09ad by Alex Biehl at 2017-07-27T07:28:57+02:00 Bump haddock to 2.18.2, haddock-library to 1.4.5 - - - - - e3ff1ca3 by Alex Biehl at 2017-07-31T20:15:32+02:00 Move `DocMarkup` from haddock-api to haddock-library (#659) * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG - - - - - cda7c20c by Alex Biehl at 2017-07-31T20:35:49+02:00 Fixup haddock - - - - - 583b6812 by Alex Biehl at 2017-07-31T21:20:45+02:00 Changelog for haddock-library - - - - - bac6a0eb by Alex Biehl at 2017-07-31T21:50:24+02:00 Prepare haddock-library-1.4.5 release - - - - - 58ce6877 by Moritz Drexl at 2017-08-05T16:44:40+02:00 Fix renaming after instance signature specializing (#660) * rework rename * Add regression test for Bug 613 * update tests * update changelog - - - - - b8137ec8 by Tim Baumann at 2017-08-06T11:33:38+02:00 Fix: Generate pattern signatures for constructors exported as patterns (#663) * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes haskell/haddock#653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR haskell/haddock#663 * Fix extractPatternSyn error message - - - - - d037086b by Alex Biehl at 2017-08-06T12:43:25+02:00 Bump haddock-library - - - - - 99d7e792 by Alex Biehl at 2017-08-06T12:44:07+02:00 Bump haddock-library in haddock-api - - - - - 94802a5b by Alex Biehl at 2017-08-06T13:18:02+02:00 Provide --show-interface option to dump interfaces (#645) * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated. - - - - - c662e476 by Ryan Scott at 2017-08-14T21:00:21-04:00 Adapt to haskell/haddock#14060 - - - - - b891eb73 by Alex Biehl at 2017-08-16T08:24:48+02:00 Bifoldable and Bitraversable for DocH and MetaDoc - - - - - 021bb56c by Alex Biehl at 2017-08-16T09:06:40+02:00 Refactoring: Make doc renaming monadic This allows us to later throw warnings if can't find an identifier - - - - - 39fbf022 by Alex Biehl at 2017-08-19T20:35:27+02:00 Hyperlinker: Avoid linear lookup in enrichToken (#669) * Make Span strict in Position * Hyperlinker: Use a proper map to enrich tokens - - - - - e13baedd by Alex Biehl at 2017-08-21T20:05:42+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 27dd6e87 by Alex Biehl at 2017-08-21T22:06:35+02:00 Drop Avails from export list - - - - - 86b247e2 by Alex Biehl at 2017-08-22T08:44:22+02:00 Bump ghc version for haddock-api tests - - - - - d4607ca0 by Alex Biehl at 2017-08-22T08:45:17+02:00 Revert "Drop Avails from export list" This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def. - - - - - c9c54c30 by Alex Biehl at 2017-08-22T09:26:01+02:00 IntefaceFile version - - - - - a85b7c02 by Ben Gamari at 2017-08-22T09:29:52-04:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 34e976f5 by Ben Gamari at 2017-08-22T17:40:06+02:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 577abf06 by Ryan Scott at 2017-08-23T14:47:29-04:00 Update for haskell/haddock#14131 - - - - - da68fc55 by Florian Eggenhofer at 2017-08-27T18:21:56+02:00 Generate an index for package content search (#662) Generate an index for package content search - - - - - 39e62302 by Alex Biehl at 2017-08-27T18:50:16+02:00 Content search for haddock html doc - - - - - 91fd6fb2 by Alex Biehl at 2017-08-28T18:39:58+02:00 Fix tests for content search - - - - - b4a3798a by Alex Biehl at 2017-08-28T18:44:08+02:00 Add search button to #page-menu - - - - - 25a7ca65 by Alex Biehl at 2017-08-28T18:47:43+02:00 Load javascript below the fold - - - - - 8d323c1a by Alex Biehl at 2017-08-28T18:49:22+02:00 Accept tests - - - - - c5dac557 by Alex Biehl at 2017-08-28T19:14:55+02:00 Content search css - - - - - 89a5af57 by Paolo Veronelli at 2017-08-29T07:42:13+02:00 Removed `nowrap` for interface method sigs (#674) with nowrap the interfaces method sigs would expand at libitum - - - - - a505f6f7 by Alex Biehl at 2017-08-29T08:05:33+02:00 Include subordinates in content index - - - - - 4bb698c4 by Alexander Biehl at 2017-08-29T11:40:19+02:00 QuickNav: Make docbase configurable - - - - - c783bf44 by Alexander Biehl at 2017-08-29T11:48:36+02:00 QuickNav: Also use baseUrl for doc-index.json request - - - - - 47017510 by Alex Biehl at 2017-08-29T17:56:47+02:00 Fix test fallout (again) - - - - - 924fc318 by Alex Biehl at 2017-08-30T09:24:56+02:00 Write meta.json when generating html output (#676) - - - - - 717dea52 by Alex Biehl at 2017-09-01T09:20:34+02:00 Use relative URL when no docBaseUrl given - - - - - e5d85f3b by Alex Biehl at 2017-09-01T09:35:19+02:00 Add missing js files to data-files (#677) - - - - - 95b9231a by Alex Biehl at 2017-09-01T11:01:36+02:00 Rename "Search" tab to "Quick Jump" - - - - - da0ead0b by Alex Biehl at 2017-09-01T13:03:49+02:00 Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger - - - - - de7da594 by Ben Gamari at 2017-09-05T06:49:55-04:00 Account for "Remember the AvailInfo for each IE" As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building. - - - - - b05cd3b3 by Ben Gamari at 2017-09-14T07:55:07-04:00 Bump upper bound on base - - - - - 79db899e by Herbert Valerio Riedel at 2017-09-21T23:27:52+02:00 Make compatible with Prelude.<> export in GHC 8.4/base-4.11 - - - - - 3405dd52 by Tim Baumann at 2017-09-23T22:02:01+02:00 Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme - - - - - df0b5742 by Alex Biehl at 2017-09-29T21:15:40+02:00 Bump base for haddock-library and haddock-test - - - - - 62b12ea0 by Merijn Verstraaten at 2017-10-04T16:03:13+02:00 Inhibit output of coverage information for hidden modules. (#687) * Inhibit output of coverage information for hidden modules. * Add changelog entry. - - - - - 8daf8bc1 by Alexander Biehl at 2017-10-05T11:27:05+02:00 Don't use subMap in attachInstances - - - - - ad75114e by Alexander Biehl at 2017-10-05T11:27:58+02:00 Revert "Don't use subMap in attachInstances" This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9. - - - - - 7d4aa02f by Alex Biehl at 2017-10-08T15:32:28+02:00 Precise Haddock: Use Avails for export resolution (#688) * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting - - - - - b9b4faa8 by Alex Biehl at 2017-10-08T19:38:21+02:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 43325295 by Alex Biehl at 2017-10-08T20:18:46+02:00 Fix merge fallout - - - - - c6423cc0 by Alex Biehl at 2017-10-08T20:36:12+02:00 Copy QuickJump files over - - - - - 1db587c3 by Tim Baumann at 2017-10-09T18:33:09+02:00 Use <details> element for collapsibles (#690) * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes haskell/haddock#560. - - - - - 1b54c64b by Tim Baumann at 2017-10-10T09:50:59+02:00 Quick Jump: Show error when loading 'doc-index.json' failed (#691) - - - - - 910f716d by Veronika Romashkina at 2017-10-24T07:36:20+02:00 Fix tiny typo in docs (#693) - - - - - b21de7e5 by Ryan Scott at 2017-10-24T13:07:15+02:00 Overhaul Haddock's rendering of kind signatures (#681) * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC - - - - - 6704405c by Ryan Scott at 2017-10-28T07:10:27+02:00 Fix Haddock rendering of kind-indexed data family instances (#694) - - - - - 470f6b9c by Alex Biehl at 2017-10-30T08:45:51+01:00 Add QuickJump version to meta.json (#696) - - - - - b89eccdf by Alex Biehl at 2017-10-30T10:15:49+01:00 Put Quickjump behind --quickjump flag (#697) - - - - - 3095fb58 by Alex Biehl at 2017-10-30T19:09:06+01:00 Add build command to package.json - - - - - f223fda9 by Alex Biehl at 2017-10-30T19:10:39+01:00 Decrease threshold for fuzzy matching - - - - - 80245dda by Edward Z. Yang at 2017-10-31T20:35:05+01:00 Supported reexported-modules via --reexport flag. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 7e389742 by Alex Biehl at 2017-10-31T20:37:56+01:00 Correct missing title in changelog - - - - - 1a2a1c03 by Alex Biehl at 2017-10-31T20:59:07+01:00 Copy quickjump.css for nicer error messages - - - - - db234bb9 by Alex Biehl at 2017-10-31T21:31:18+01:00 Reexported modules: Report warnings if argument cannot be parsed or ... module cannot be found - - - - - eea8a205 by Carlo Hamalainen at 2017-10-31T21:43:14+01:00 More general type for nameCacheFromGhc. (#539) - - - - - 580eb42a by Alex Biehl at 2017-10-31T21:46:52+01:00 Remote tab - - - - - 0e599498 by Alex Biehl at 2017-10-31T21:48:55+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 7b8539bb by Alex Biehl at 2017-10-31T22:28:34+01:00 fullModuleContents traverses exports in declaration order - - - - - 0c91fbf2 by Alex Biehl at 2017-10-31T22:32:31+01:00 Remove excessive use of list comprehensions - - - - - f7356e02 by Alex Biehl at 2017-11-01T19:11:03+01:00 Make better use of AvailInfo - - - - - f3e512d5 by Alex Biehl at 2017-11-02T12:16:22+01:00 Always return documentation for exported subordinates ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks. - - - - - 7cf58898 by Alan Zimmerman at 2017-11-07T08:28:03+02:00 Match changes for Trees that Grow in GHC - - - - - e5105a41 by Alan Zimmerman at 2017-11-08T17:21:58+02:00 Match Trees That Grow - - - - - 55178266 by Alan Zimmerman at 2017-11-11T22:20:31+02:00 Match Trees that Grow in GHC for HsExpr - - - - - 2082ab02 by Ryan Scott at 2017-11-14T15:27:03+01:00 Actually render infix type operators as infix (#703) * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too - - - - - c52ab7d0 by Alan Zimmerman at 2017-11-14T23:14:26+02:00 Clean up use of PlaceHolder, to match TTG - - - - - 81cc9851 by Moritz Angermann at 2017-11-20T07:52:49+01:00 Declare use of `Paths_haddock` module in other-modules (#705) This was detected by `-Wmissing-home-modules` - - - - - f9d27598 by Moritz Angermann at 2017-11-20T12:47:34+01:00 Drop Paths_haddock from ghc.mk (#707) With haskell/haddock#705 and haskell/haddock#706, the custom addition should not be necessary any more. # Conflicts: # ghc.mk - - - - - f34818dc by Moritz Angermann at 2017-11-20T12:47:59+01:00 Add autogen-modules (#706) > Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail. # Conflicts: # haddock.cabal - - - - - bb43a0aa by Ben Gamari at 2017-11-21T15:50:12-05:00 Revert "Clean up use of PlaceHolder, to match TTG" This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049. - - - - - af9ebb2b by Ben Gamari at 2017-11-21T15:50:14-05:00 Revert "Match Trees that Grow in GHC for HsExpr" This reverts commit 9f054dc365379c66668de6719840918190ae6e44. - - - - - 5d35c3af by Ben Gamari at 2017-11-21T15:50:15-05:00 Revert "Match Trees That Grow" This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c. - - - - - 99a8e43b by Ben Gamari at 2017-11-21T16:36:06-05:00 Revert "Match changes for Trees that Grow in GHC" This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547. - - - - - c4d650c2 by Ben Gamari at 2017-12-04T15:06:07-05:00 Bump GHC version - - - - - 027b2274 by Ben Gamari at 2017-12-04T17:06:31-05:00 Bump GHC bound to 8.4.* - - - - - 58eaf755 by Alex Biehl at 2017-12-06T15:44:24+01:00 Update changelog - - - - - d68f5584 by Simon Peyton Jones at 2017-12-07T14:39:56+00:00 Track changes to follow Trac haskell/haddock#14529 This tracks the refactoring of HsDecl.ConDecl. - - - - - dc519d6b by Alec Theriault at 2018-01-06T08:20:43-08:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - 8285118c by Alec Theriault at 2018-01-13T12:12:37+01:00 Constructor and pattern synonym argument docs (#709) * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors. - - - - - ca4fabb4 by Alec Theriault at 2018-01-15T17:12:18-08:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 4c472fea by Ryan Scott at 2018-01-19T10:44:02+01:00 Fix haskell/haddock#732 (#733) - - - - - bff14dbd by Alex Biehl at 2018-01-19T15:33:30+01:00 extractDecl: Extract associated types correctly (#736) - - - - - a2a94a73 by Alex Biehl at 2018-01-19T15:34:40+01:00 extractDecl: Extract associated types correctly (#736) - - - - - 26df93dc by Alex Biehl at 2018-01-20T10:18:22+01:00 haddock-api: bump ghc to ^>= 8.4 - - - - - f65aeb1d by Alex Biehl at 2018-01-20T19:18:20+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - 0e721b97 by Alex Biehl at 2018-01-20T19:20:19+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - cb6234f6 by Ben Gamari at 2018-01-26T13:40:55-05:00 Merge remote-tracking branch 'harpocrates/fix/missing-orphan-instances' into ghc-head - - - - - 0fc28554 by Alec Theriault at 2018-02-01T14:58:18+01:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - b9123772 by Alec Theriault at 2018-02-01T14:58:18+01:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 0c12e274 by Ryan Scott at 2018-02-01T14:58:18+01:00 Fix haskell/haddock#548 by rendering datatype kinds more carefully (#702) - - - - - 8876d20b by Alec Theriault at 2018-02-01T14:58:18+01:00 Use the GHC lexer for the Hyperlinker backend (#714) * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog - - - - - 95c6a771 by Alec Theriault at 2018-02-01T14:58:18+01:00 Clickable anchors for headings (#716) See haskell/haddock#579. This just adds an <a> tag around the heading, pointing to the heading itself. - - - - - 21463d28 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump: Matches on function names weight more than matches in ... module names. - - - - - 8023af39 by Alex Biehl at 2018-02-01T14:58:18+01:00 Treat escaped \] better in definition lists (#717) This fixes haskell/haddock#546. - - - - - e4866dc1 by Alex Biehl at 2018-02-01T14:58:18+01:00 Remove scanner, takeWhile1_ already takes care of escaping - - - - - 9bcaa49d by Alex Biehl at 2018-02-01T14:58:18+01:00 Take until line feed - - - - - 01d2af93 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. - - - - - 31128417 by Alec Theriault at 2018-02-01T14:58:18+01:00 Patch flaky parser test (#720) * Patch flaky parser test This test was a great idea, but it doesn't port over too well to using the GHC lexer. GHC rewrites its input a bit - nothing surprising, but we need to guard against those cases for the test. * Change instance head * Change use site - - - - - 9704f214 by Herbert Valerio Riedel at 2018-02-01T14:58:18+01:00 Include secondary LICENSE file in source dist - - - - - 51f25074 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Grid Tables (#718) * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example - - - - - 670d6200 by Alex Biehl at 2018-02-01T14:58:18+01:00 Add grid table example to cheatsheet (pdf and svg need to be regenerated thought) - - - - - 4262dec9 by Alec Theriault at 2018-02-01T14:58:18+01:00 Fix infinite loop when specializing instance heads (#723) * Fix infinite loop when specializing instance heads The bug can only be triggered from TH, hence why it went un-noticed for so long. * Add test for haskell/haddock#679 and haskell/haddock#710 - - - - - 67ecd803 by Alec Theriault at 2018-02-01T14:58:18+01:00 Filter RTS arguments from 'ghc-options' arguments (#725) This fixes haskell/haddock#666. - - - - - 7db26992 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump Scrollable overlay - - - - - da9ff634 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Hyperlinker: Adjust parser to new PFailed constructor - - - - - 7b7cf8cb by Alexander Biehl at 2018-02-01T14:58:18+01:00 Specialize: Add missing IdP annotations - - - - - 78cd7231 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Convert: Correct pass type - - - - - a2d0f590 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Warning free compilation - - - - - cd861cf3 by Alexander Biehl at 2018-02-01T14:58:18+01:00 hadock-2.19.0 / haddock-api-2.19.0 / haddock-library-1.5.0 - - - - - c6651b72 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Adjust changelogs - - - - - 1e93da0b by Alexander Biehl at 2018-02-01T14:58:18+01:00 haddock-library: Info about breaking changes - - - - - f9b11db8 by Alec Theriault at 2018-02-02T12:36:02+01:00 Properly color pragma contents in hyperlinker The hyperlinker backend now classifies the content of pragmas as 'TkPragma'. That means that in something like '{-# INLINE foo #-}', 'foo' still gets classified as a pragma token. - - - - - c40b0043 by Alec Theriault at 2018-02-02T12:36:02+01:00 Support the new 'ITcolumn_prag' token - - - - - 4a2a4d39 by Alex Biehl at 2018-02-03T12:11:55+01:00 QuickJump: Mitigate encoding problems on Windows - - - - - bb34503a by Alex Biehl at 2018-02-04T18:39:31+01:00 Use withBinaryFile - - - - - 637605bf by Herbert Valerio Riedel at 2018-02-05T09:48:32+01:00 Try GHC 8.4.1 for Travis CI job - - - - - 7abb67e4 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 try harder to build w/ GHC 8.4.1 - - - - - 8255cc98 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 Add `SPDX-License-Identifier` as alised for "license" module header tokens C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from haskell/haddock#743 - - - - - 267cd23d by Herbert Valerio Riedel at 2018-02-05T10:24:34+01:00 Make test-suite SMP compatible - - - - - 95d4bf40 by Alec Theriault at 2018-02-05T22:01:04+01:00 Hyperlink pattern synonyms and 'module' imports (#744) Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes haskell/haddock#731. - - - - - 67838dcd by Alec Theriault at 2018-02-06T08:23:36+01:00 Don't warn about missing '~' (#746) This manually filters out '~' from the list of things to warn about. It truly makes no sense to warn on this since '~' has nothing it could link to - it is magical. This fixes haskell/haddock#532. - - - - - ab6c3f9f by Alec Theriault at 2018-02-06T08:24:47+01:00 Don't barf on 'HsSpliceTy' (#745) This handles 'HsSpliceTy's by replacing them with what they expand to. IIUC everything that is happening, 'renameHsSpliceTy' should not be able to fail for the inputs we feed it from GHC. This fixes haskell/haddock#574. - - - - - 92bf95ad by Alex Biehl at 2018-02-06T08:28:23+01:00 Rename: renameHsSpliceTy ttg - - - - - 3130b1e1 by Alex Biehl at 2018-02-06T09:02:14+01:00 Expand SigDs - - - - - c72adae5 by Alex Biehl at 2018-02-06T09:20:51+01:00 fullModuleContents: support named docs - - - - - de2e4dbf by Alex Biehl at 2018-02-06T13:56:17+01:00 Hyperlinker: Also link pattern synonym arguments - - - - - b7c98237 by Alex Biehl at 2018-02-09T18:44:23+01:00 Expand SigD in a better place In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place. - - - - - 8f598b27 by Alec Theriault at 2018-02-11T12:29:56+01:00 Add module tooltips to linked identifiers (#753) No more clicking to figure out whether your bytestring is strict or lazy! - - - - - d812e65d by Alec Theriault at 2018-02-11T12:31:44+01:00 Add 'show' option to complement 'hide' (#752) * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes haskell/haddock#751 and haskell/haddock#266. * Add a '--show-all' option - - - - - 6676cecb by Alex Biehl at 2018-02-18T11:07:15-05:00 QuickJump: Mitigate encoding problems on Windows (cherry picked from commit 86292c54bfee2343aee84559ec01f1fc68f52231) - - - - - e753dd88 by Alex Biehl at 2018-02-18T17:59:54+01:00 Use withBinaryFile - - - - - 724dc881 by Tamar Christina at 2018-02-19T05:34:49+01:00 Haddock: support splitted include paths. (#689) - - - - - 9b6d6f50 by Alex Biehl at 2018-02-19T05:57:02+01:00 Teach the HTML backend how to render methods with multiple names - - - - - a74aa754 by Alexander Biehl at 2018-02-19T10:04:34+01:00 Hoogle/Latex: Remove use of partial function - - - - - 66d8bb0e by Alec Theriault at 2018-02-25T16:04:01+01:00 Fix file handle leak (#763) (#764) Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137. - - - - - bb92d03d by Alex Biehl at 2018-03-02T14:21:23+01:00 Enable running test suite with stock haddock and ghc using ``` $ cabal new-run -- html-test --haddock-path=$(which haddock) --ghc-path=$(which ghc) ``` - - - - - dddb3cb2 by Alex Biehl at 2018-03-02T15:43:21+01:00 Make testsuite work with haddock-1.19.0 release (#766) - - - - - f38636ed by Alec Theriault at 2018-03-02T15:48:36+01:00 Support unicode operators, proper modules Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes haskell/haddock#458. - - - - - 09d89f7c by Alec Theriault at 2018-03-02T15:48:43+01:00 Remove bang pattern - - - - - d150a687 by Alex Biehl at 2018-03-02T15:48:48+01:00 fix test - - - - - d6fd71a5 by Alex Biehl at 2018-03-02T16:22:38+01:00 haddock-test: Be more explicit which packages to pass We now pass `-hide-all-packages` to haddock when invoking the testsuite. This ensures we don't accidentally pick up any dependencies up through ghc.env files. - - - - - 0932c78c by Alex Biehl at 2018-03-02T17:50:38+01:00 Revert "fix test" This reverts commit 1ac2f9569242f6cb074ba6e577285a4c33ae1197. - - - - - 52516029 by Alex Biehl at 2018-03-02T18:16:50+01:00 Fix Bug548 for real - - - - - 89df9eb5 by Alex Biehl at 2018-03-05T18:28:19+01:00 Hyperlinker: Links for TyOps, class methods and associated types - - - - - d019a4cb by Ryan Scott at 2018-03-06T13:43:56-05:00 Updates for haskell/haddock#13324 - - - - - 6d5a42ce by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump haddock-2.19.0.1, haddock-api-2.19.0.1, haddock-library-1.5.0.1 - - - - - c0e6f380 by Alex Biehl at 2018-03-10T18:25:57+01:00 Update changelogs for haddock-2.19.0.1 and haddock-library-1.5.0.1 - - - - - 500da489 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Update to QC 2.11 - - - - - ce8362e9 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Restore backward-compat with base-4.5 through base-4.8 - - - - - baae4435 by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump lower bound for haddock-library - - - - - 10b7a73e by Alex Biehl at 2018-03-10T18:25:57+01:00 Haddock: Straighten out base bound - - - - - a6096f7b by Alex Biehl at 2018-03-13T08:45:06+01:00 extractDecl: Extract constructor patterns from data family instances (#776) * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors - - - - - ba4a0744 by Simon Jakobi at 2018-03-14T08:26:42+01:00 Readme: Update GHC version (#778) - - - - - 8de157d4 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for definition lists - - - - - 425b46f9 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for links - - - - - d53945d8 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for inline links - - - - - f1dc7c99 by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Slightly unmangle output - - - - - 0879d31c by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Prevent stdout buffering - - - - - 1f9e5f1b by Simon Jakobi at 2018-03-14T20:39:29+01:00 haddock-library.cabal: Clean up GHC options - - - - - 066b891a by Simon Jakobi at 2018-03-14T20:39:29+01:00 Make a proper definition for the <link> parser - - - - - 573d6ba7 by Alec Theriault at 2018-03-21T09:16:57+01:00 Show where instances are defined (#748) * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests - - - - - 99b5d28b by Alex Biehl at 2018-03-21T09:20:36+01:00 Prepare changelog for next release - - - - - 482d3a93 by Alex Biehl at 2018-03-23T15:57:36+01:00 Useful cost centres, timers and allocation counters (#785) * Add some useful cost-centres for profiling * Add withTiming for each haddock phase Invoking haddock with `--optghc=-ddump-timings` now shows the amount of time spent and the number of allocated bytes for each phase. - - - - - 773b41bb by Alec Theriault at 2018-03-27T08:35:59+02:00 @since includes package name (#749) * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too. - - - - - e42c57bc by Alex Biehl at 2018-03-27T08:42:50+02:00 haddock-2.19.1, haddock-api-2.19.1, haddock-library-1.6.0 - - - - - 8373a529 by Alex Biehl at 2018-03-28T10:17:11+02:00 Bump haddock and haddock-api to 2.20.0 - - - - - 5038eddd by Jack Henahan at 2018-04-03T13:28:12+02:00 Clear search string on hide for haskell/haddock#781 (#789) - - - - - 920ca1eb by Alex Biehl at 2018-04-03T16:35:50+02:00 Travis: Build with ghc-8.4.2 (#793) - - - - - a232f0eb by Alan Zimmerman at 2018-04-07T14:14:32+02:00 Match changes in GHC for D4199 Removing HasSourceText and SourceTextX classes. - - - - - ab85060b by Alan Zimmerman at 2018-04-09T21:20:24+02:00 Match GHC changes for TTG - - - - - 739302b6 by Alan Zimmerman at 2018-04-13T13:31:44+02:00 Match GHC for TTG implemented on HsBinds, D4581 - - - - - 2f56d3cb by Ryan Scott at 2018-04-19T11:42:58-04:00 Bump upper bound on base to < 4.13 See https://ghc.haskell.org/trac/ghc/ticket/15018. - - - - - a49df92a by Alex Biehl at 2018-04-20T07:31:44+02:00 Don't treat fixity signatures like declarations - - - - - d02c103b by Ryan Scott at 2018-04-24T11:20:11-04:00 Add regression test for haskell/haddock#413 Fixes haskell/haddock#413. - - - - - c7577f52 by Ryan Scott at 2018-04-24T13:51:06-07:00 Improve the Hoogle backend's treatment of type families (#808) Fixes parts 1 and 2 of haskell/haddock#806. - - - - - d88f85b1 by Alec Theriault at 2018-04-25T11:24:07-07:00 Replace 'attoparsec' with 'parsec' (#799) * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments - - - - - fc25e2fe by Alan Zimmerman at 2018-04-27T15:36:53+02:00 Match changes in GHC for TTG - - - - - 06175f91 by Herbert Valerio Riedel at 2018-05-01T18:11:09+02:00 Merge branch 'ghc-head' with 'ghc-8.4' - - - - - 879caaa8 by Alec Theriault at 2018-05-07T18:53:15-07:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 3e0120cb by Simon Jakobi at 2018-05-07T19:00:18-07:00 Add docs for some DocH constructors (#814) - - - - - 0a32c6db by Alec Theriault at 2018-05-08T02:15:45-07:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 8816e783 by Simon Jakobi at 2018-05-08T10:48:11-07:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - ad60366f by Ryan Scott at 2018-05-10T11:19:47-04:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - 03b7cc3b by Ryan Scott at 2018-05-10T11:24:38-04:00 Wibbles - - - - - b03dd563 by Chaitanya Koparkar at 2018-05-10T11:44:58-04:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 9f298a40 by Ben Gamari at 2018-05-13T17:36:04-04:00 Account for refactoring of LitString - - - - - ea3dabe7 by Ryan Scott at 2018-05-16T09:21:43-04:00 Merge pull request haskell/haddock#826 from haskell/T825 Remove Hoogle backend hack that butchers infix datatype names - - - - - 0d234f7c by Alec Theriault at 2018-05-23T11:29:05+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 15fc9712 by Simon Jakobi at 2018-05-31T04:17:47+02:00 Adjust to new HsDocString internals - - - - - 6f1e19a8 by Ben Gamari at 2018-06-02T16:18:58-04:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 0d0355d9 by Ryan Scott at 2018-06-04T21:26:59-04:00 DerivingVia changes - - - - - 0d93475a by Simon Jakobi at 2018-06-05T19:47:05+02:00 Bump a few dependency bounds (#845) - - - - - 5cbef804 by Alec Theriault at 2018-06-05T19:47:16+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 9094c56f by Alec Theriault at 2018-06-05T22:53:25+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 70188719 by Simon Jakobi at 2018-06-08T22:20:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - 495cd1fc by Chaitanya Koparkar at 2018-06-13T23:01:34+02:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 81088732 by Ben Gamari at 2018-06-13T23:01:34+02:00 Account for refactoring of LitString - - - - - 7baf6587 by Simon Jakobi at 2018-06-13T23:05:08+02:00 Adjust to new HsDocString internals - - - - - bb61464d by Ben Gamari at 2018-06-13T23:05:22+02:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 5d8cb87f by Ryan Scott at 2018-06-13T23:39:30+02:00 DerivingVia changes - - - - - 73d373a3 by Alec Theriault at 2018-06-13T23:39:30+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 4865e254 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Remove `ITtildehsh` token - - - - - b867db54 by Alec Theriault at 2018-06-13T23:39:30+02:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 9598e392 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Add docs for some DocH constructors (#814) - - - - - 8a59035b by Alec Theriault at 2018-06-13T23:39:30+02:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 29350fc8 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - 2590bbd9 by Ryan Scott at 2018-06-13T23:39:30+02:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - a9939fdc by Ryan Scott at 2018-06-13T23:39:30+02:00 Wibbles - - - - - a22f7df4 by Alec Theriault at 2018-06-13T23:39:30+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 8741015d by Simon Jakobi at 2018-06-13T23:39:30+02:00 Bump a few dependency bounds (#845) - - - - - 4791e1cc by Alec Theriault at 2018-06-13T23:39:30+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 311d3216 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - d0577817 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Complete FixitySig and FamilyDecl pattern matches - - - - - 055b3aa7 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Fix redundant import warnings - - - - - f9ce19b1 by Simon Jakobi at 2018-06-13T23:49:52+02:00 html-test: Accept output - - - - - 04604ea7 by Simon Jakobi at 2018-06-13T23:54:37+02:00 Bump bounds on Cabal - - - - - 0713b692 by Simon Jakobi at 2018-06-14T00:00:12+02:00 Merge branch 'ghc-head' into ghc-head-update-3 - - - - - c6a56bfd by Simon Jakobi at 2018-06-14T02:33:27+02:00 Bump ghc bound for haddock-api spec test-suite - - - - - 119d04b2 by Simon Jakobi at 2018-06-14T12:37:48+02:00 Travis: `--allow-newer` for all packages - - - - - 0e876e2c by Alex Biehl at 2018-06-14T15:28:52+02:00 Merge pull request haskell/haddock#857 from sjakobi/ghc-head-update-3 Update ghc-head - - - - - 5be46454 by Alec Theriault at 2018-06-14T21:42:45+02:00 Improved handling of interfaces in 'haddock-test' (#851) This should now work with an inplace GHC where (for instance) HTML directories may not be properly recorded in the package DB. - - - - - 96ab1387 by Vladislav Zavialov at 2018-06-14T17:06:21-04:00 Handle -XStarIsType - - - - - e518f8c4 by Ben Gamari at 2018-06-14T17:48:00-04:00 Revert unintentional reversion of fix of haskell/haddock#548 - - - - - 01b9f96d by Alan Zimmerman at 2018-06-19T11:52:22+02:00 Match changes in GHC for haskell/haddock#14259 - - - - - 7f8c8298 by Ben Gamari at 2018-06-19T18:14:27-04:00 Bump GHC version to 8.6 - - - - - 11c6b5d2 by Ryan Scott at 2018-06-19T23:17:31-04:00 Remove HsEqTy and XEqTy - - - - - b33347c2 by Herbert Valerio Riedel at 2018-06-20T23:14:52+02:00 Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. - - - - - f0d2460e by Herbert Valerio Riedel at 2018-06-20T23:28:46+02:00 Update Travis CI job - - - - - ef239223 by Herbert Valerio Riedel at 2018-06-20T23:32:41+02:00 Drop GHC HEAD from CI and update GHC to 8.4.3 It's a waste of resource to even try to build this branch w/ ghc-head; so let's not do that... - - - - - 41c4a9fa by Ben Gamari at 2018-06-20T18:26:20-04:00 Bump GHC version to 8.7 - - - - - 8be593dc by Herbert Valerio Riedel at 2018-06-21T22:32:15+02:00 Update CI job to use GHC 8.7.* - - - - - b91d334a by Simon Jakobi at 2018-06-30T13:41:38+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section - - - - - f707d848 by Alec Theriault at 2018-07-05T10:43:35-04:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. - - - - - a6d2b8dc by Alec Theriault at 2018-07-06T10:06:32-04:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case - - - - - 13819f71 by Alan Zimmerman at 2018-07-15T19:33:51+02:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 - - - - - c346aa78 by Simon Jakobi at 2018-07-19T12:29:32+02:00 haddock-library: Bump bounds for containers - - - - - 722e733c by Simon Jakobi at 2018-07-19T13:36:45+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] - - - - - f0bd83fd by Alec Theriault at 2018-07-19T14:39:57+02:00 Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. - - - - - 394053a8 by Simon Jakobi at 2018-07-19T14:58:07+02:00 haddock-library: Bump bounds for containers - - - - - 1bda11a2 by Alec Theriault at 2018-07-20T09:04:03+02:00 Add HEAD.hackage overlay (#887) * Add HEAD.hackage overlay * Add HCPKG variable - - - - - c7b4ab45 by Alec Theriault at 2018-07-20T12:01:16+02:00 Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test - - - - - c05d32ad by Alec Theriault at 2018-07-20T12:01:49+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output - - - - - 24b39ee4 by Alec Theriault at 2018-07-20T12:02:16+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. - - - - - cb9d2099 by Simon Jakobi at 2018-07-20T13:39:29+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) - - - - - 133f24f5 by Alec Theriault at 2018-07-20T13:39:29+02:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) - - - - - 11024149 by Alec Theriault at 2018-07-20T13:39:29+02:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) - - - - - de0c139e by Simon Jakobi at 2018-07-20T13:39:29+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) - - - - - 6435e952 by Alec Theriault at 2018-07-20T13:39:29+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) - - - - - 1461af39 by Alec Theriault at 2018-07-20T13:39:29+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) - - - - - 69d3bde1 by Alec Theriault at 2018-07-20T13:49:47+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) - - - - - 6a5c73c7 by Alec Theriault at 2018-07-20T13:50:00+02:00 Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests - - - - - 92ca94c6 by Alec Theriault at 2018-07-20T13:55:36+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) - - - - - 981bc7fa by Simon Jakobi at 2018-07-20T15:06:06+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers - - - - - 27e7c0c5 by Simon Jakobi at 2018-07-20T15:09:05+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 49e1a415 by Simon Jakobi at 2018-07-20T16:02:02+02:00 Update the ghc-8.6 branch (#889) * Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. * README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) * Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) * Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) * tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) * Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. * Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test * Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) * Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) * Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) * Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests * Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 5ca14bed by Simon Jakobi at 2018-07-20T16:05:47+02:00 Revert "Revert "Bump GHC version to 8.6"" That commit didn't belong onto the ghc-8.6 branch. This reverts commit acbaef3b9daf1d2dea10017964bf886e77a8e967. - - - - - 2dd600dd by Simon Jakobi at 2018-07-20T16:18:21+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. - - - - - fceb2422 by Simon Jakobi at 2018-07-20T16:18:21+02:00 outOfScope: Recommend qualifying the identifier - - - - - acea5d23 by Simon Jakobi at 2018-07-20T16:19:35+02:00 outOfScope: Recommend qualifying the identifier (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7) - - - - - 1a83ca55 by Simon Jakobi at 2018-07-20T16:19:35+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f) - - - - - 48374451 by Masahiro Sakai at 2018-07-20T17:06:42+02:00 Add # as a special character (#884) '#' has special meaning used for anchors and can be escaped using backslash. Therefore it would be nice to be listed as special characters. - - - - - 5e1a5275 by Alec Theriault at 2018-07-20T23:37:24+02:00 Let `haddock-test` bypass interface version check (#890) This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to. - - - - - 27286754 by Yuji Yamamoto at 2018-07-23T08:16:01+02:00 Avoid "invalid argument (invalid character)" on non-unicode Windows (#892) Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566 - - - - - 6729d361 by Alec Theriault at 2018-07-23T13:52:56-07:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). - - - - - 8cf4e6b5 by Ryan Scott at 2018-07-27T11:28:03-04:00 eqTyCon_RDR now lives in TysWiredIn After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071 - - - - - 1ad251a6 by Alan Zimmerman at 2018-07-30T13:28:09-04:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 (cherry picked from commit e3926b50ab8a7269fd6904b06e881745f08bc5d6) - - - - - 8aea2492 by Richard Eisenberg at 2018-08-02T10:54:17-04:00 Update against new HsImplicitBndrs - - - - - e42cada9 by Alec Theriault at 2018-08-04T17:51:30+02:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 0e852512 by Alex Biehl at 2018-08-06T13:04:02+02:00 Make --package-version optional for --hoogle generation (#899) * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion - - - - - d2abd684 by Noel Bourke at 2018-08-21T09:34:18+02:00 Remove unnecessary backslashes from docs (#908) On https://haskell-haddock.readthedocs.io/en/latest/markup.html#special-characters the backslash and backtick special characters showed up with an extra backslash before them – I think the escaping is not (or no longer) needed for those characters in rst. - - - - - 7a578a9e by Matthew Pickering at 2018-08-21T09:34:50+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - aa3d4db3 by Matthew Pickering at 2018-08-21T09:37:34+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - ede91744 by Alec Theriault at 2018-08-21T09:42:52+02:00 Better test output when Haddock crashes on a test (#902) In particular: we report the tests that crashed seperately from the tests that produced incorrect output. In order for tests to pass (and exit 0), they must not crash and must produce the right output. - - - - - 4a872b84 by Guillaume Bouchard at 2018-08-21T09:45:57+02:00 Fix a typo (#878) - - - - - 4dbf7595 by Ben Sklaroff at 2018-08-21T12:04:09-04:00 Add ITcomment_line_prag token to Hyperlinker Parser This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935 - - - - - 9170b2a9 by Ben Gamari at 2018-08-21T17:55:15-04:00 Merge pull request haskell/haddock#893 from harpocrates/get-name-to-instances Accumulate explicitly which modules to load for 'attachInstances' - - - - - d57b57cc by Ben Gamari at 2018-08-21T17:59:13-04:00 Merge branch 'ghc-head' of github.com:haskell/haddock into ghc-head - - - - - 14601ca2 by Alec Theriault at 2018-08-21T19:09:37-04:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1) - - - - - 438c645e by Matthew Pickering at 2018-08-21T19:12:39-04:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d) - - - - - a80c5161 by Alec Theriault at 2018-08-21T22:06:40-07:00 Better rendering of unboxed sums/tuples * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType' - - - - - 88456cc1 by Alec Theriault at 2018-08-21T22:06:40-07:00 Handle promoted tuples in 'synifyType' When we have a fully applied promoted tuple, we can expand it out properly. - - - - - fd1c1094 by Alec Theriault at 2018-08-21T22:19:34-07:00 Accept test cases - - - - - 6e80d9e0 by Alec Theriault at 2018-08-21T22:24:03-07:00 Merge pull request haskell/haddock#914 from harpocrates/feature/unboxed-stuff Better rendering of unboxed sums, unboxed tuples, promoted tuples. - - - - - 181a23f1 by Ben Gamari at 2018-08-23T15:53:48-04:00 Merge remote-tracking branch 'origin/ghc-8.6' into ghc-8.6 - - - - - 3a18c1d8 by Alec Theriault at 2018-08-27T14:15:25-07:00 Properly synify promoted list types We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type])))) - - - - - b4794946 by Alec Theriault at 2018-09-03T07:19:55-07:00 Only look at visible types when synifying a 'HsListTy' The other types are still looked at when considering whether to make a kind signature or not. - - - - - a231fce2 by Alec Theriault at 2018-09-03T07:38:10-07:00 Merge pull request haskell/haddock#922 from harpocrates/promoted-lists Properly synify promoted list types - - - - - 0fdf044e by Ningning Xie at 2018-09-15T10:25:58-04:00 Update according to GHC Core changes - - - - - 7379b115 by Ningning Xie at 2018-09-15T15:40:18-04:00 update dataFullSig to work with Co Quantification This should have been in the previous patch, but wasn't. - - - - - cf84a046 by Alec Theriault at 2018-09-17T20:12:18-07:00 Fix/add to various docs * Add documentation for a bunch of previously undocumented options (fixes haskell/haddock#870) * Extend the documentation of `--hoogle` considerably (see haskell/haddock#807) * Describe how to add docs to `deriving` clauses (fixes haskell/haddock#912) * Fix inaccurate docs about hyperlinking infix identifiers (fixes haskell/haddock#780) - - - - - ae017935 by Alec Theriault at 2018-09-22T08:32:16-07:00 Update Travis - - - - - d95ae753 by Alec Theriault at 2018-09-22T09:34:10-07:00 Accept failing tests Also silence orphan warnings. - - - - - f3e67024 by Alec Theriault at 2018-09-22T09:41:23-07:00 Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README - - - - - 3f136d4a by Alec Theriault at 2018-09-22T10:53:31-07:00 Turn haddock-library into a minor release Fix some version bounds in haddock-library too. - - - - - b9def006 by Alec Theriault at 2018-09-22T13:07:35-07:00 keep cabal.project file - - - - - 4909aca7 by Alec Theriault at 2018-10-16T09:36:30-07:00 Build on 7.4 and 7.8 - - - - - 99d20a28 by Herbert Valerio Riedel at 2018-10-16T18:45:52+02:00 Minor tweak to package description - - - - - a8059618 by Herbert Valerio Riedel at 2018-10-16T18:47:24+02:00 Merge pull request haskell/haddock#945 haddock-api 2.21.0 and haddock-library 1.6.1 release - - - - - 2d9bdfc1 by Alec Theriault at 2018-10-16T10:54:21-07:00 Bump haddock-library to 1.7.0 The 1.6.1 release should've been a major bump, since types in the `Documentation.Haddock.Parser.Monad` module changed. This version makes that module internal (as it morally should be). - - - - - ed340cef by Alec Theriault at 2018-10-16T14:59:13-07:00 Merge branch 'ghc-8.4' into ghc-8.6 - - - - - 2821a8df by Alec Theriault at 2018-10-16T15:14:48-07:00 Merge branch 'ghc-8.6' into ghc-head - - - - - a722dc84 by Alec Theriault at 2018-10-16T16:28:55-07:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 63377496 by Alec Theriault at 2018-10-16T16:39:07-07:00 Update changelog - - - - - 099a0110 by Alec Theriault at 2018-10-16T16:49:28-07:00 Merge pull request haskell/haddock#942 from harpocrates/update-docs Fix & add to documentation - - - - - 0927416f by Alec Theriault at 2018-10-16T16:50:14-07:00 Set UTF-8 encoding before writing files (#934) This should fix haskell/haddock#929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8). - - - - - 83b7b017 by Alec Theriault at 2018-10-16T17:42:05-07:00 Output pattern synonyms in Hoogle backend (#947) * Output pattern synonyms in Hoogle backend We were previously weren't outputting _any_ pattern synonyms, bundled or not. Now, we output both. Fixes haskell/haddock#946. * Update changelog - - - - - 81e5033d by Alec Theriault at 2018-10-16T18:04:40-07:00 Release `haddock{,-api}-2.22.0` This version will accompany ghc-8.6.2 - - - - - 9661744e by Alex Biehl at 2018-10-18T08:14:32-07:00 Add NewOcean theme And make it the default theme. - - - - - 7ae6d722 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Improve appearance and readability These changes include: - use latest Haskell's logo colors - decrease #content width to improve readability - use nicer font - improve sizes and distances - - - - - 37f8703d by NunoAlexandre at 2018-10-18T08:14:32-07:00 Include custom font in the html head - - - - - 1d5e1d79 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Update html test reference files - - - - - 53b7651f by NunoAlexandre at 2018-10-18T08:14:32-07:00 Make it responsive - It makes small screens taking more space than larger ones - fixes a few issues present in small screens currently - make it look good across different screen sizes. - - - - - 6aa1aeb1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make the style consistent with hackage Several things are addressed here: - better responsive behaviour on the header - better space usage - consistent colors overall - other nit PR comments - - - - - 3a250c5c by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Place the package name before the menu links This supports the expected responsive menu design, where the package name appears above the menu links. - - - - - cae699b3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update html-test reference files The package name element in the package-header is now a div instead of a paragraph, and it is now above the menu ul.links instead of below. - - - - - 2ec7fd2d by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve synopsis style and code - Use CSS3 instead of loading pictures to show "+" and "-" symbols - Drop redundant code - - - - - 0c874c01 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Decrease space between code blocks There was too much space between code blocks as pointed out by reviewers. - - - - - 85568ce2 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Add an initial-scale property to all haddock pages This solves an issue reported about the content looking incredibly small on mobile devices. - - - - - c1538926 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Address several PR comments - Darken text color like done for hackage - Move synopsis to left side - Make table of contents stick to the left on wide screens - Wrap links to avoid page overflow - Improve expand/collapse buttons - Fix issue with content size on mobile devices - Fix issue with font-size on landscape mode - Increase width of the content - Change colors of table of contents and synopsis - Etc - - - - - e6639e5f by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make synopsis scrollable on wide screens When the synopsis is longer than the screen, you can’t see its end and you can't scroll down either, making the content unreachable. - - - - - 1f0591ff by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve information density - Reduce font size - Improve space between and within code blocks - Improve alignments - Improve spacing within sub-blocks - - - - - bf083097 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Minor adjustments Bring in some adjustments made to hackage: - link colors - page header show everything when package title is too long - - - - - 10375fc7 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix responsive triggers overlap issue The min and max width triggers have the same values, which caused the style resolution to take an intersection of both style declarations when the screen resolution had the size of the limts (say 1280px), causing an odd behaviour and look. - - - - - 95ff2f95 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix issue with menu alignment on firefox Reported and described here: https://github.com/haskell/haddock/pull/721#issuecomment-374668869 - - - - - dc86587e by Alex Biehl at 2018-10-18T08:14:32-07:00 Changelog entry for NewOcean - - - - - 27195e47 by Herbert Valerio Riedel at 2018-10-18T08:14:32-07:00 html-test --accept - - - - - 83f4f9c0 by Alex Biehl at 2018-10-18T08:14:32-07:00 Avoid name shadowing - - - - - 231487f1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font to PT Sans Also migrate some general text related changes from hackage. - - - - - 313db81a by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Use 'flex' to fix header alignment - - - - - 5087367b by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Misc of tweaks - Update link colors to hackage scheme - Tune spacing between content elements - Update footer style - Fix and improve code blocks identation - - - - - b08020df by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font in Xhtml.hs to PT Sans - - - - - 78ce06e3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve code blocks styling - Fix and improve spacing - Improve colors and borders - - - - - 81262d20 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make package-header caption backward-compatible The current html generator of this branch wraps the package-header caption as a div, which does not work (without style adjustments) with the old themes. Changing it from div to span does the trick, without needing to adjust the old stylesheets. - - - - - dc4475cb by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update test-suite reference html pages - - - - - 393d35d8 by Alec Theriault at 2018-10-18T08:25:36-07:00 Accept tests - - - - - a94484ba by Alec Theriault at 2018-10-21T10:29:29-07:00 Fix CHANGELOG - - - - - 8797eca3 by Alec Theriault at 2018-10-21T10:36:19-07:00 Update 'data-files' to include NewOcean stuff - - - - - 1ae51e4a by Simon Jakobi at 2018-10-23T11:29:14+02:00 Fix typo in a warning - - - - - 009ad8e8 by Alec Theriault at 2018-10-24T12:47:47-07:00 Update JS dependencies This was done via `npm audit fix`. I think this fixes haskell/haddock#903 along with some more serious vulnerabilities that nobody seems to have noticed. - - - - - 051994db by Alec Theriault at 2018-10-24T17:31:09-07:00 Resurrect the style-switcher This fixes haskell/haddock#810. Looks like things were broken during the quickjump refactor of the JS. For the (git) record: I do not think the style switcher is a good idea. I'm fixing it for the same reason @mzero added it; as an answer to "rumblings from some that they didn't want their pixels changed on bit" - - - - - 2a1d620f by Alec Theriault at 2018-10-24T17:38:07-07:00 Fix copy-pasta error in data-files - - - - - ed5bfb7f by Alec Theriault at 2018-10-24T20:42:14-07:00 Fix the synopsis button Here's these changes are supposed to do: * put the synopsis back on the right side * properly have it on the edge of the screen on wide screens * adjust the background of the synopsis to match the button (otherwise the grey blends in with what is underneath) * get rid of the dotted purple line * the synopsis contents are now scrollable even when in wide screens (this has been a long-standing bug) - - - - - 883fd74b by Alec Theriault at 2018-10-25T20:16:46-07:00 Avoid more conflicts in generated ids (#954) This fixes haskell/haddock#953 by passing more names into the generated ids. - - - - - ea54e331 by Alec Theriault at 2018-10-25T21:07:12-07:00 Don't hide bullets in method docs I think thst CSS was meant only to deal with fields and the effect on bullets was accidental. Fixes haskell/haddock#926. - - - - - 9a14ef4a by Alec Theriault at 2018-10-25T22:02:07-07:00 Indent more things + slightly smaller font - - - - - b9f17e29 by Alec Theriault at 2018-10-25T22:10:01-07:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 096a3cfa by Alec Theriault at 2018-10-25T22:24:38-07:00 Accept HTML output - - - - - 2669517d by Alec Theriault at 2018-10-26T09:02:35-07:00 User manual + stuff for building GHC docs - - - - - 46b27687 by Alec Theriault at 2018-10-26T09:10:59-07:00 Make 'Contents' in NewOcean scrollable This only happens if the contents block on the left is so big that it doesn't fit (vertically) on the page. If that happens, we want it to be scrollable. - - - - - 3443dd94 by Alec Theriault at 2018-10-26T09:36:46-07:00 Revert "Make 'Contents' in NewOcean scrollable" This reverts commit f909ffd8353d6463fd5dd184998a32aa98d5c922. I missed the fact this also forces the 'Contents' to always go down to the bottom of the page. - - - - - ed081424 by Alec Theriault at 2018-10-26T14:22:23-07:00 Avoid some partiality AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes haskell/haddock#569. - - - - - 6a5bec41 by Alec Theriault at 2018-10-27T10:05:04-07:00 Fix documentation in `haddock-api` (#957) * Fix misplaced Haddocks in Haddock itself Haddock should be able to generate documentation for 'haddock-api' again. * Make CI check that documentation can be built. * Add back a doc that is OK - - - - - 5100450a by Matthew Yacavone at 2018-10-27T14:51:38-04:00 More explicit foralls (GHC Proposal 0007) - - - - - 8771a6b0 by Alec Theriault at 2018-11-05T13:58:11-08:00 Only run MathJax on entities with "mathjax" class (#960) Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes haskell/haddock#959. - - - - - bd7ff5c5 by Alec Theriault at 2018-11-05T15:54:22-08:00 Deduplicate some work in 'AttachInstances' Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too - - - - - cf99fd8f by Alec Theriault at 2018-11-05T15:54:22-08:00 Specialize some SYB functions Perf only change: * Add a 'SPECIALIZE' pragma to help GHC optimize a 'Data a =>' constraint * Manually specialize the needlessly general type of 'specializeTyVarBndrs' - - - - - 4f91c473 by Alec Theriault at 2018-11-05T15:54:22-08:00 Improve perf of renaming Perf only change: * don't look up type variable names (they're never in the environment) * use a difference list for accumulating missing names * more efficient 'Functor'/'Applicative' instances for 'RnM' - - - - - 4bbab0d4 by Alec Theriault at 2018-11-05T15:54:22-08:00 Faster 'Text' driven parser combinators Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}' - - - - - fa430c02 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support hyperlink labels with inline markup The parser for pictures hasn't been properly adjusted yet. - - - - - c1431035 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support (and flatten) inline markup in image links Inline markup is supported in image links but, as per the [commonmark recommendation][0], it is stripped back to a plain text representation. [0]: https://spec.commonmark.org/0.28/#example-547 - - - - - d4ee1ba5 by Alec Theriault at 2018-11-06T12:03:24-08:00 Accept test case - - - - - 8088aeb1 by Alec Theriault at 2018-11-06T12:03:24-08:00 Fix/add to haddock-library test suite - - - - - e78f644d by Alec Theriault at 2018-11-06T13:26:31-08:00 Bump version bounds - - - - - 644335eb by Alec Theriault at 2018-11-06T13:53:30-08:00 Merge pull request haskell/haddock#875 from harpocrates/feature/markup-in-hyperlinks Inline markup in markdown-style links and images - - - - - e173ed0d by Alec Theriault at 2018-11-07T12:37:18-08:00 Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page - - - - - b2d92df7 by Alec Theriault at 2018-11-07T13:41:57-08:00 Allow "Contents" summary to scroll in a fixed div In the unfortunate event that the "Contents" summary doesn't fit vertically (like in the "Prelude"), it will be scrollable. - - - - - ca704c23 by Alec Theriault at 2018-11-07T13:45:15-08:00 Accept HTML output changes - - - - - 82c0ec6d by Alec Theriault at 2018-11-07T18:12:54-08:00 overflow-y 'scroll' -> 'auto' - - - - - 571d7657 by Alec Theriault at 2018-11-08T19:44:12-08:00 Clicking on "Contents" navigates to top of page - - - - - 8065a012 by Alec Theriault at 2018-11-08T19:44:17-08:00 Space out functions more Also, functions and data decls now have the same space before and after them. - - - - - cc650ede by Alec Theriault at 2018-11-09T08:13:35-08:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 65f8c17f by Alec Theriault at 2018-11-10T14:04:06-08:00 Update changelog - - - - - 20473847 by Alec Theriault at 2018-11-10T14:21:40-08:00 Replace oplus/ominus expander/collapser icons with triangles - - - - - 16592957 by Alec Theriault at 2018-11-10T14:35:10-08:00 Merge pull request haskell/haddock#949 from haskell/wip/new-ocean Introduce NewOcean theme. - - - - - 357cefe1 by Alec Theriault at 2018-11-10T16:02:13-08:00 Merge branch 'ghc-8.6' into ghc-head - - - - - de612267 by Alec Theriault at 2018-11-11T20:01:21-08:00 Rename 'NewOcean' theme to 'Linuwial' - - - - - 954b5baa by Alec Theriault at 2018-11-12T08:33:18-08:00 Add blockquote styling Matches b71da1feabf33efbbc517ac376bb690b5a604c2f from hackage-server. Fixes haskell/haddock#967. - - - - - d32c0b0b by Fangyi Zhou at 2018-11-12T10:24:13-08:00 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, osa1 Reviewed By: osa1 GHC Trac Issues: haskell/haddock#15733 Differential Revision: https://phabricator.haskell.org/D5262 - - - - - 41098b1f by Alp Mestanogullari at 2018-11-15T22:40:09+01:00 Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change It got introduced in ghc/ghc at ae2c9b40f5b6bf272251d1f4107c60003f541b62. - - - - - c5c1c7e0 by Alec Theriault at 2018-11-15T13:48:13-08:00 Merge pull request haskell/haddock#970 from alpmestan/alp/fix-promotionflag Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change - - - - - 6473d3a4 by Shayan-Najd at 2018-11-23T01:38:49+01:00 [TTG: Handling Source Locations] Foundation and Pat Trac Issues haskell/haddock#15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`) - - - - - 7a088dfe by Alec Theriault at 2018-11-26T11:11:28-08:00 More uniform handling of `forall`'s in HTML/LaTeX * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes haskell/haddock#973 - - - - - d735e570 by Alec Theriault at 2018-12-12T08:42:09-08:00 Fix warnings, accept output * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's - - - - - a3852f8a by Zejun Wu at 2018-12-14T09:37:47-05:00 Output better debug infromation on internal error in extractDecl This will make investigation of haskell/haddock#979 easier - - - - - 2eccb5b9 by Alec Theriault at 2018-12-17T09:25:10-05:00 Refactor names + unused functions (#982) This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions - - - - - e82e4df8 by Alec Theriault at 2018-12-20T16:16:30-05:00 Load plugins when compiling each module (#983) * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code - - - - - 96e86f38 by Alec Theriault at 2018-12-23T10:23:20-05:00 Properly synify and render promoted type variables (#985) * Synify and render properly promoted type variables Fixes haskell/haddock#923. * Accept output - - - - - 23343345 by Alec Theriault at 2018-12-27T16:39:38-05:00 Remove `haddock-test`'s dep. on `syb` (#987) The functionality is easily inlined into one short function: `gmapEverywhere`. This doesn't warrant pulling in another package. - - - - - d0734f21 by Alec Theriault at 2018-12-27T16:39:52-05:00 Address deprecation warnings in `haddock-test` (#988) Fixes haskell/haddock#885. - - - - - 4d9f144e by mynguyen at 2018-12-30T23:42:26-05:00 Visible kind application haddock update - - - - - ffe0e9ed by Alec Theriault at 2019-01-07T13:55:22-08:00 Print kinded tyvars in constructors for Hoogle (#993) Fixes haskell/haddock#992 - - - - - 2e18b55d by Alec Theriault at 2019-01-10T16:42:45-08:00 Accept new output `GHC.Maybe` -> `Data.Maybe` (#996) Since 53874834b779ad0dfbcde6650069c37926da1b79 in GHC, "GHC.Maybe" is marked as `not-home`. That changes around some test output. - - - - - 055da666 by Gabor Greif at 2019-01-22T14:41:51+01:00 Lone typofix - - - - - 01bb71c9 by Alec Theriault at 2019-01-23T11:46:46-08:00 Keep forall on H98 existential data constructors (#1003) The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes haskell/haddock#1002. - - - - - f9b9bc0e by Ryan Scott at 2019-01-27T09:28:12-08:00 Fix haskell/haddock#1004 with a pinch of dropForAlls - - - - - 5cfcdd0a by Alec Theriault at 2019-01-28T16:49:57-08:00 Loosen 'QuickCheck' and 'hspec' bounds It looks like the new versions don't cause any breakage and loosening the bounds helps deps fit in one stack resolver. - - - - - 3545d3dd by Alec Theriault at 2019-01-31T01:37:25-08:00 Use `.hie` files for the Hyperlinker backend (#977) # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see haskell/haddock#998) * restructure temporary folder logic for `.hi`/`.hie` model - - - - - 2ded3359 by Herbert Valerio Riedel at 2019-02-02T12:06:12+01:00 Update/modernise haddock-library.cabal file - - - - - 62b93451 by Herbert Valerio Riedel at 2019-02-02T12:19:31+01:00 Tentatively declare support for unreleased base-4.13/ghc-8.8 - - - - - 6041e767 by Herbert Valerio Riedel at 2019-02-02T16:04:32+01:00 Normalise LICENSE text w/ cabal's BSD2 template Also, correct the `.cabal` files to advertise `BSD2` instead of the incorrect `BSD3` license. - - - - - 0b459d7f by Alec Theriault at 2019-02-02T18:06:12-08:00 CI: fetch GHC from validate artifact Should help make CI be less broken - - - - - 6b5c07cf by Alec Theriault at 2019-02-02T18:06:12-08:00 Fix some Hyperlinker test suite fallout * Amend `ParserSpec` to match new Hyperlinker API - pass in compiler info - strip out null tokens * Make `hypsrc-test` pass reliably - strip out `local-*` ids - strip out `line-*` ids from the `ClangCppBug` test - re-accept output - - - - - ded34791 by Nathan Collins at 2019-02-02T18:31:23-08:00 Update README instructions for Stack No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock. - - - - - 723298c9 by Alec Theriault at 2019-02-03T09:11:05-08:00 Remove `Documentation.Haddock.Utf8` The circumstances under which this module appeared are completely gone. The Hyperlinker backend no longer needs this module (it uses the more efficient `Encoding` module from `ghc`). Why no deprecation? Because this module really shouldn't exist! - It isn't used in `haddock-library`/`haddock-api` anymore - It was copy pasted directly from `utf8-string` - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding` - - - - - 51050006 by Alec Theriault at 2019-02-03T22:58:58-08:00 Miscellaneous improvements to `Convert` (#1020) Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms - - - - - 841980c4 by Oleg Grenrus at 2019-02-04T08:44:25-08:00 Make a fixture of weird parsing of lists (#997) The second example is interesting. If there's a list directly after the header, and that list has deeper structure, the parser is confused: It finds two lists: - One with the first nested element, - everything after it I'm not trying to fix this, as I'm not even sure this is a bug, and not a feature. - - - - - 7315c0c8 by Ryan Scott at 2019-02-04T12:17:56-08:00 Fix haskell/haddock#1015 with dataConUserTyVars (#1022) The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes haskell/haddock#1015. - - - - - ee0b49a3 by Ryan Scott at 2019-02-04T15:25:17-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. - - - - - 1c850dc8 by Alan Zimmerman at 2019-02-05T21:54:18+02:00 Matching changes in GHC for haskell/haddock#16236 - - - - - ab03c38e by Simon Marlow at 2019-02-06T08:07:33+00:00 Merge pull request haskell/haddock#1014 from hvr/pr/bsd2-normalise Normalise LICENSE text w/ cabal's BSD2 template - - - - - 5a92ccae by Alec Theriault at 2019-02-10T06:21:55-05:00 Merge remote-tracking branch 'gitlab/wip/T16236-2' into ghc-head - - - - - c0485a1d by Alec Theriault at 2019-02-10T03:32:52-08:00 Removes `haddock-test`s dependency on `xml`/`xhtml` (#1027) This means that `html-test`, `latex-test`, `hoogle-test`, and `hypsrc-test` now only depend on GHC boot libs. So we should now be able to build and run these as part of GHC's testsuite. \o/ The reference output has changed very slightly, in three ways: * we don't convert quotes back into `&quot;` as the `xml` lib did * we don't add extra `&nbsp;` as the `xml` lib did * we now remove the entire footer `div` (instead of just emptying it) - - - - - 65a448e3 by Alec Theriault at 2019-02-11T12:27:41-05:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - 360ca937 by Alec Theriault at 2019-02-13T11:36:11-05:00 Clean up logic for guessing `-B` and `--lib` (#1026) Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works. - - - - - d583e364 by Alec Theriault at 2019-02-16T10:41:22-05:00 Fix tests broken by GHC Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings. - - - - - da0c42cc by Vladislav Zavialov at 2019-02-17T11:39:19+03:00 Parser changes to match !380 - - - - - ab96bed7 by Ryan Scott at 2019-02-18T04:44:08-05:00 Bump ghc version to 8.9 - - - - - 44b7c714 by Alec Theriault at 2019-02-22T05:49:43-08:00 Match GHC changes for T16185 `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock. - - - - - 2ee653b1 by Alec Theriault at 2019-02-24T18:53:33-08:00 Update .travis.yml Points to the new GHC CI artifact. - - - - - 90939d71 by Alec Theriault at 2019-02-25T00:42:41-08:00 Support value/type namespaces on identifier links Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity) - - - - - d6ed496c by Alec Theriault at 2019-02-25T00:42:46-08:00 Better identifier parsing * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental). - - - - - 3c3b404c by Alec Theriault at 2019-02-25T22:12:11-08:00 Fix standalone deriving docs Docs on standalone deriving decls for classes with associated types should be associated with the class instance, not the associated type instance. Fixes haskell/haddock#1033 - - - - - d51ef69e by Alec Theriault at 2019-02-26T19:14:59-08:00 Fix bogus identifier defaulting This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes haskell/haddock#1035. - - - - - 88cbbdc7 by Ryan Scott at 2019-02-27T10:14:03-05:00 Visible dependent quantification (#16326) changes - - - - - 0dcf6cee by Xia Li-yao at 2019-02-27T21:53:27-05:00 Menu item controlling which instances are expanded/collapsed (#1007) Adds a menu item (like "Quick Jump") for options related to displaying instances. This provides functionality for: * expanding/collapsing all instances on the currently opened page * controlling whether instances are expanded/collapsed by default * controlling whether the state of instances should be "remembered" This new functionality is implemented in Typescript in `details-helper`. The built-in-themes style switcher also got a revamp so that all three of QuickJump, the style switcher, and instance preferences now have the same style and implementation structure. See also: https://mail.haskell.org/pipermail/haskell-cafe/2019-January/130495.html Fixes haskell/haddock#698. Co-authored-by: Lysxia <lysxia at gmail.com> Co-authored-by: Nathan Collins <conathan at galois.com> - - - - - 3828c0fb by Alec Theriault at 2019-02-28T12:42:49-05:00 `--show-interface` should output to stdout. (#1040) Fixes haskell/haddock#864. - - - - - a50f4cda by gbaz at 2019-03-01T07:43:16-08:00 Increase contrast of Linuwal theme (#1037) This is to address the concern that, on less nice and older screens, some of the shades of grey blend in too easily with the white background. * darken the font slightly * darken slightly the grey behind type signatures and such * add a border and round the corners on code blocks * knock the font down by one point - - - - - ab4d41de by Alec Theriault at 2019-03-03T09:23:26-08:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 12f509eb by Ben Gamari at 2019-03-04T22:13:20-05:00 Remove reference to Opt_SplitObjs flag Split-objects has been removed. - - - - - 5b3e4c9a by Ryan Scott at 2019-03-06T19:16:24-05:00 Update html-test output to reflect haskell/haddock#16391 changes - - - - - fc228af1 by Alec Theriault at 2019-03-09T08:29:23-08:00 Match changes for "Stop inferring over-polymorphic kinds" The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock. - - - - - 6ac109eb by Alec Theriault at 2019-03-09T11:22:55-08:00 Add .hi, .dyn_hi, etc files to .gitignore Fixes haskell/haddock#1030. - - - - - b55f0c05 by Alec Theriault at 2019-03-09T11:22:55-08:00 Better support for default methods in classes * default methods now get rendered differently * default associated types get rendered * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend * LaTeX backend now renders default method signatures NB: there is still no way to document default class members and the NB: LaTeX backend still crashes on associated types - - - - - 10aea0cf by Alec Theriault at 2019-03-09T11:22:55-08:00 Avoid multi-line `emph` in LaTeX backend `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes haskell/haddock#936. - - - - - d22dc2c9 by Alec Theriault at 2019-03-09T11:22:55-08:00 Many LaTeX backend fixes After this commit, we can run with `--latex` on all boot libraries without crashing (although the generated LaTeX still fails to compile in a handful of larger packages like `ghc` and `base`). * Add newlines after all block elements in LaTeX. This is important to prevent the final output from being more an more indented. See the `latext-test/src/Example` test case for a sample of this. * Support associated types in class declarations (but not yet defaults) * Several small issues for producing compiling LaTeX; - avoid empy `\haddockbeginargs` lists (ex: `type family Any`) - properly escape identifiers depending on context (ex: `Int#`) - add `vbox` around `itemize`/`enumerate` (so they can be in tables) * Several spacing fixes: - limit the width of `Pretty`-arranged monospaced code - cut out extra space characters in export lists - only escape spaces if there are _multiple_ spaces - allow type signatures to be multiline (even without docs) * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files from `latex-test` test reference output. Fixes haskell/haddock#935, haskell/haddock#929 (LaTeX docs for `text` build & compile) Fixes haskell/haddock#727, haskell/haddock#930 (I think both are really about type families...) - - - - - 0e6cee00 by Alec Theriault at 2019-03-29T12:11:56-07:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - ce05434d by Alan Zimmerman at 2019-03-29T12:12:11-07:00 Matching changes in GHC for haskell/haddock#16236 (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576) - - - - - d85766b2 by Ben Gamari at 2019-03-29T12:14:04-07:00 Bump GHC to 8.8 - - - - - 5a82cbaf by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Redo ParseModuleHeader - - - - - b9033348 by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - bb55c8f4 by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove outdated `.ghci` files and `scripts` The `.ghci` files are actively annoying when trying to `cabal v2-repl`. As for the `scripts`, the distribution workflow is completely different. - - - - - 5ee244dc by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove obsolete arcanist files + STYLE Now that GHC is hosted on Gitlab, the arcanist files don't make sense anymore. The STYLE file contains nothing more than a dead link too. - - - - - d07c1928 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Redo ParseModuleHeader - - - - - 492762d2 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - af2ac773 by Ryan Scott at 2019-05-14T17:22:13-04:00 Changes for haskell/haddock#16110/#16356 - - - - - 6820ed0d by Alec Theriault at 2019-05-17T08:51:27-07:00 Unbreak haskell/haddock#1004 test case `fail` is no longer part of `Monad`. - - - - - 6bf7be98 by Alec Theriault at 2019-05-17T08:51:27-07:00 Fix haskell/haddock#1063 with better parenthesization logic for contexts The only other change in html/hoogle/hyperlinker output for the boot libraries that this caused is a fix to some Hoogle output for implicit params. ``` $ diff -r _build/docs/ old_docs diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt 13296c13296 < assertError :: (?callStack :: CallStack) => Bool -> a -> a --- > assertError :: ?callStack :: CallStack => Bool -> a -> a ``` - - - - - b5716b61 by Ryan Scott at 2019-05-22T17:24:32-04:00 Match changes with haskell/haddock#14332 - - - - - c115abf6 by Alec Theriault at 2019-05-26T16:01:58-04:00 Remove Haddock's dependency on `Cabal` At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries). - - - - - e5b2d4a3 by Alec Theriault at 2019-05-26T16:16:25-04:00 Regression test: promoted lists in associated types When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes haskell/haddock#466, - - - - - cc5ad5d3 by Alec Theriault at 2019-05-26T17:55:54-04:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 4b3301a6 by Alec Theriault at 2019-05-26T17:57:52-04:00 Release haddock-2.23, haddock-library-1.8.0 Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1. - - - - - 69c7cfce by Matthew Pickering at 2019-05-30T10:54:27+01:00 Update hyperlinker tests for new types in .hie files - - - - - 29b7e738 by Zubin Duggal at 2019-05-30T10:57:51+01:00 update for new way to store hiefile headers - - - - - aeca5d5f by Zubin Duggal at 2019-06-04T18:57:42-04:00 update for new way to store hiefile headers - - - - - ba2ca518 by Ben Gamari at 2019-06-07T23:11:14+00:00 Update test output for introduction of Safe-Inferred - - - - - 3a975a6c by Ryan Scott at 2019-07-03T12:06:27-04:00 Changes for haskell/haddock#15247 - - - - - 0df46555 by Zubin Duggal at 2019-07-22T10:52:50+01:00 Fix haddockHypsrcTest - - - - - 2688686b by Sylvain Henry at 2019-09-12T23:19:39+02:00 Fix for GHC module renaming - - - - - 9ec0f3fc by Alec Theriault at 2019-09-20T03:21:00-04:00 Fix Travis CI, loosen .cabal bounds (#1089) Tentatively for the 2.23 release: * updated Travis CI to work again * tweaked bounds in the `.cabal` files * adjusted `extra-source-files` to properly identify test files - - - - - ca559beb by Matthías Páll Gissurarson at 2019-09-28T12:14:40-04:00 Small change in to facilitate extended typed-holes (#1090) This change has no functional effect on haddock itself, it just changes one pattern to use `_ (` rather than `_(`, so that we may use `_(` as a token for extended typed-holes later. - - - - - 02e28976 by Vladislav Zavialov at 2019-09-28T12:17:45-04:00 Remove spaces around @-patterns (#1093) This is needed to compile `haddock` when [GHC Proposal haskell/haddock#229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented. - - - - - 83cbbf55 by Alexis King at 2019-09-30T21:12:42-04:00 Fix the ignore-exports option (#1082) The `ignore-exports` option has been broken since haskell/haddock#688, as mentioned in https://github.com/haskell/haddock/pull/766#issue-172505043. This PR fixes it. - - - - - e127e0ab by Ben Gamari at 2019-10-06T15:12:06-04:00 Fix a few haddock issues - - - - - 3a0f5c89 by Zubin Duggal at 2019-10-07T17:56:13-04:00 Fix crash when there are no srcspans in the file due to CPP - - - - - 339c5ff8 by Alec Theriault at 2019-10-07T17:56:13-04:00 Prefer un-hyperlinked sources to no sources It is possible to fail to extract an HIE ast. This is however not a reason to produce _no_ output - we should still make a colorized HTML page. - - - - - d47ef478 by Alec Theriault at 2019-10-07T17:56:13-04:00 Add a regression test for haskell/haddock#1091 Previously, this input would crash Haddock. - - - - - ed7c8b0f by Alec Theriault at 2019-10-07T20:56:48-04:00 Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. - - - - - d00436ab by Andreas Klebinger at 2019-10-21T15:53:03+02:00 Refactor for withTiming changes. - - - - - 4230e712 by Ben Gamari at 2019-10-22T09:36:37-04:00 Merge pull request haskell/haddock#1101 from AndreasPK/withTimingRefactor Refactor for withTiming changes. - - - - - d155c5f4 by Ryan Scott at 2019-10-23T10:37:17-04:00 Reify oversaturated data family instances correctly (#1103) This fixes haskell/haddock#1103 by adapting the corresponding patch for GHC (see https://gitlab.haskell.org/ghc/ghc/issues/17296 and https://gitlab.haskell.org/ghc/ghc/merge_requests/1877). - - - - - 331a5adf by Sebastian Graf at 2019-10-25T17:14:40+02:00 Refactor for OutputableBndrId changes - - - - - 48a490e0 by Ben Gamari at 2019-10-27T10:16:16-04:00 Merge pull request haskell/haddock#1105 from sgraf812/wip/flexible-outputable Refactor for OutputableBndrId changes - - - - - f62a7dfc by Sebastian Graf at 2019-11-01T11:54:16+00:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - d9b242ed by Ryan Scott at 2019-11-03T13:20:03-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. (cherry picked from commit cfd682c5fd03b099a3d78c44f9279faf56a0ac70) - - - - - dfd42406 by Sebastian Graf at 2019-11-04T07:02:14-05:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - 0b15be7c by Ben Gamari at 2019-11-09T13:21:33-05:00 Import isRuntimeRepVar from Type rather than TyCoRep isRuntimeRepVar is not longer exported from TyCoRep due to ghc#17441. - - - - - 091f7283 by Ben Gamari at 2019-11-10T12:47:06-05:00 Bump to GHC 8.10 - - - - - e88c71f2 by Ben Gamari at 2019-11-14T00:22:24-05:00 Merge pull request haskell/haddock#1110 from haskell/wip/T17441 Import isRuntimeRepVar from Type rather than TyCoRep - - - - - 4e0bbc17 by Ben Gamari at 2019-11-14T00:22:45-05:00 Version bumps for GHC 8.11 - - - - - 0e85ceb4 by Ben Gamari at 2019-11-15T11:59:45-05:00 Bump to GHC 8.10 - - - - - 00d6d68b by Ben Gamari at 2019-11-16T18:35:58-05:00 Bump ghc version to 8.11 - - - - - dde1fc3f by Ben Gamari at 2019-11-16T20:40:37-05:00 Drop support for base 4.13 - - - - - f52e331d by Vladislav Zavialov at 2019-11-24T13:02:28+03:00 Update Hyperlinker.Parser.classify to use ITdollar - - - - - 1ad96198 by Vladislav Zavialov at 2019-11-28T16:12:33+03:00 Remove HasSrcSpan (#17494) - - - - - 651afd70 by Herbert Valerio Riedel at 2019-12-08T12:08:16+01:00 Document error-prone conditional definition of instances This can easily trip up people if one isn't aware of it. Usually it's better to avoid this kind of conditionality especially for typeclasses for which there's an compat-package as conditional instances like these tend to fragment the ecosystem into those packages that go the extra mile to provide backward compat via those compat-packages and those that fail to do so. - - - - - b521af56 by Herbert Valerio Riedel at 2019-12-08T12:09:54+01:00 Fix build-failure regression for base < 4.7 The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses haskell/haddock#1119 - - - - - 556c375d by Sylvain Henry at 2020-01-02T19:01:55+01:00 Fix after Iface modules renaming - - - - - bd6c53e5 by Sylvain Henry at 2020-01-07T00:48:48+01:00 hsyl20-modules-renamer - - - - - fb23713b by Ryan Scott at 2020-01-08T07:41:13-05:00 Changes for GHC#17608 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2372 - - - - - 4a4dd382 by Ryan Scott at 2020-01-25T08:08:26-05:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - e782a44d by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename PackageConfig into UnitInfo - - - - - ba3c9f05 by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename lookupPackage - - - - - ab37f9b3 by Ben Gamari at 2020-01-29T13:00:44-05:00 Merge pull request haskell/haddock#1125 from haskell/wip/T17566-take-two Changes for GHC#17566 - - - - - 3ebd5ae0 by Ryan Scott at 2020-01-31T05:56:50-05:00 Merge branch 'wip-hsyl20-package-refactor' into ghc-head - - - - - 602a747e by Richard Eisenberg at 2020-02-04T09:05:43+00:00 Echo GHC's removal of PlaceHolder module This goes with GHC's !2083. - - - - - ccfe5679 by Sylvain Henry at 2020-02-10T10:13:56+01:00 Module hierarchy: runtime (cf haskell/haddock#13009) - - - - - 554914ce by Cale Gibbard at 2020-02-10T16:10:39-05:00 Fix build of haddock in stage1 We have to use the correct version of the GHC API, but the version of the compiler itself doesn't matter. - - - - - 5b6fa2a7 by John Ericson at 2020-02-10T16:18:07-05:00 Noramlize `tested-with` fields in cabal files - - - - - e6eb3ebe by Vladislav Zavialov at 2020-02-16T13:25:26+03:00 No MonadFail/Alternative for P - - - - - 90e181f7 by Ben Gamari at 2020-02-18T14:13:47-05:00 Merge pull request haskell/haddock#1129 from obsidiansystems/wip/fix-stage1-build Fix build of haddock in stage1 - - - - - 93b64636 by Sylvain Henry at 2020-02-19T11:20:27+01:00 Modules: Driver (#13009) - - - - - da4f6c7b by Vladislav Zavialov at 2020-02-22T15:33:02+03:00 Use RealSrcSpan in InstMap - - - - - 479b1b50 by Ben Gamari at 2020-02-23T10:28:13-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 55ecacf0 by Sylvain Henry at 2020-02-25T15:18:27+01:00 Modules: Core (#13009) - - - - - 60867b3b by Vladislav Zavialov at 2020-02-28T15:53:52+03:00 Ignore the BufLoc/BufSpan added in GHC's !2516 - - - - - 1e5506d3 by Sylvain Henry at 2020-03-02T12:32:43+01:00 Modules: Core (#13009) - - - - - 6fb53177 by Richard Eisenberg at 2020-03-09T14:49:40+00:00 Changes in GHC's !1913. - - - - - 30b792ea by Ben Gamari at 2020-03-16T12:45:02-04:00 Merge pull request haskell/haddock#1130 from hsyl20/wip/hsyl20-modules-core2 Modules: Core (#13009) - - - - - cd761ffa by Sylvain Henry at 2020-03-18T15:24:00+01:00 Modules: Types - - - - - b6646486 by Ben Gamari at 2020-03-18T14:42:43-04:00 Merge pull request haskell/haddock#1133 from hsyl20/wip/hsyl20/modules/types Modules: Types - - - - - 9325d734 by Kleidukos at 2020-03-19T12:38:31-04:00 Replace the 'caption' class so that the collapsible sections are shown - - - - - 5e2bb555 by Kleidukos at 2020-03-19T12:38:31-04:00 Force ghc-8.8.3 - - - - - c6fcd0aa by Kleidukos at 2020-03-19T12:38:31-04:00 Update test fixtures - - - - - 5c849cb1 by Sylvain Henry at 2020-03-20T09:34:39+01:00 Modules: Types - - - - - 7f439155 by Alec Theriault at 2020-03-20T20:17:01-04:00 Merge branch 'ghc-8.8' into ghc-8.10 - - - - - b7904e5c by Alina Banerjee at 2020-03-20T20:24:17-04:00 Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests - - - - - b9d60a59 by Alec Theriault at 2020-03-22T11:46:42-04:00 Clean up warnings * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal` - - - - - 0c317dbe by Alec Theriault at 2020-03-22T18:46:54-04:00 Fix NPM security warnings This was done by calling `npm audit fix`. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. - - - - - 6e306242 by Alec Theriault at 2020-03-22T20:10:52-04:00 Tentative 2.24 release Adjusted changelogs and versions in `.cabal` files in preparation for the upcoming release bundled with GHC 8.10. - - - - - 1bfb4645 by Ben Gamari at 2020-03-23T16:40:54-04:00 Merge commit '3c2944c037263b426c4fe60a3424c27b852ea71c' into HEAD More changes from the GHC types module refactoring. - - - - - be8c6f3d by Alec Theriault at 2020-03-26T20:10:53-04:00 Update `.travis.yml` to work with GHC 8.10.1 * Regenerated the Travis file with `haskell-ci` * Beef up `.cabal` files with more `tested-with` information - - - - - b025a9c6 by Alec Theriault at 2020-03-26T20:10:53-04:00 Update README Removed some out of date links/info, added some more useful links. * badge to Hackage * update old trac link * `ghc-head` => `ghc-8.10` * `cabal new-*` is now `cabal v2-*` and it should Just Work * `--test-option='--accept'` is the way to accept testsuite output - - - - - 564d889a by Alec Theriault at 2020-03-27T20:34:33-04:00 Fix crash in `haddock-library` on unicode space Our quickcheck tests for `haddock-library` stumbled across an edge case input that was causing Haddock to crash: it was a unicode space character. The root cause of the crash is that we were implicitly assuming that if a space character was not " \t\f\v\r", it would have to be "\n". We fix this by instead defining horizontal space as: any space character that is not '\n'. Fixes haskell/haddock#1142 - - - - - 2d360ba1 by Alec Theriault at 2020-03-27T21:57:32-04:00 Disallow qualified uses of reserved identifiers This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes haskell/haddock#952 - - - - - 47ae22ed by Alec Theriault at 2020-03-28T13:36:25-04:00 Remove unused `Haddock.Utils` functions * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils` - - - - - c0291245 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use TTG empty extensions to remove some `error`'s None of these error cases should ever have been reachable, so this is just a matter of leveraging the type system to assert this. * Use the `NoExtCon` and `noExtCon` to handle case matches for no extension constructors, instead of throwing an `error`. * Use the extension field of `HsSpliceTy` to ensure that this variant of `HsType` cannot exist in an `HsType DocNameI`. - - - - - 0aff8dc4 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` * `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes haskell/haddock#978 - - - - - bf6f2fb7 by Alec Theriault at 2020-03-28T13:36:25-04:00 Cleanup up GHC flags in `.cabal` files * enable more useful warning flags in `haddock-api`, handle the new warnings generated * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in `-Wall` for a while now) - - - - - c576fbf1 by Alec Theriault at 2020-03-28T13:36:25-04:00 `haddock-library` document header level Document the fact the header level is going to always be between 1 and 6 inclusive. Along the way, I also optimized the parsing code a bit. - - - - - 71bce0ee by Alec Theriault at 2020-03-28T14:26:27-04:00 Disallow links in section headers This is quite straightforward to implement, since we already had a function `docToHtmlNoAnchors` (which we used to generate the link in the sidebar "Contents"). This breaks test `Bug387`, but that test case has aged badly: we now automatically generate anchors for all headings, so manually adding an anchor in a section makes no sense. Nested anchors are, as pointed out in haskell/haddock#1054, disallowed by the HTML standard. Fixes haskell/haddock#1054 - - - - - b461b0ed by Sylvain Henry at 2020-03-30T10:34:23+02:00 Modules: type checker - - - - - cd8cd1ee by Ben Gamari at 2020-03-31T12:45:02-04:00 Merge pull request haskell/haddock#1152 from hsyl20/wip/hsyl20/modules/tc Module renaming - - - - - 5e8f8ea7 by Felix Yan at 2020-04-01T17:58:06-07:00 Allow QuickCheck 2.14 Builds fine and all tests pass. - - - - - dc6b1633 by Sylvain Henry at 2020-04-05T16:43:44+02:00 Module renaming: amend previous patch - - - - - eee2f4ae by Ryan Scott at 2020-04-05T09:04:43-07:00 Fix haskell/haddock#1050 by filtering out invisible AppTy arguments This makes the `synifyType` case for `AppTy` more intelligent by taking into consideration the visibilities of each `AppTy` argument and filtering out any invisible arguments, as they aren't intended to be displayed in the source code. (See haskell/haddock#1050 for an example of what can happen if you fail to filter these out.) Along the way, I noticed that a special `synifyType` case for `AppTy t1 (CoercionTy {})` could be consolidated with the case below it, so I took the opportunity to tidy this up. - - - - - 23eb99e8 by Ben Gamari at 2020-04-07T11:19:58-04:00 Merge pull request haskell/haddock#1154 from hsyl20/wip/hsyl20/modules/tc Module renaming: amend previous patch - - - - - 072d994d by Ryan Scott at 2020-04-07T19:32:47-04:00 Make NoExtCon fields strict These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992). - - - - - d8ebf6c8 by Ignat Insarov at 2020-04-09T21:15:01-04:00 Recode Doc to Json. (#1159) * Recode Doc to Json. * More descriptive field labels. - - - - - 52df4b4e by Sylvain Henry at 2020-04-10T12:39:18+02:00 Module renaming - - - - - d9ab8ec8 by Cale Gibbard at 2020-04-14T11:43:34-04:00 Add instance of XCollectPat for DocNameI - - - - - 323d221d by Cale Gibbard at 2020-04-14T11:43:34-04:00 Rename XCollectPat -> CollectPass - - - - - 2df80867 by Alec Theriault at 2020-04-15T07:30:51-07:00 Prune docstrings that are never rendered When first creating a Haddock interface, trim `ifaceDocMap` and `ifaceArgMap` to not include docstrings that can never appear in the final output. Besides checking with GHC which names are exported, we also need to keep all the docs attached to instance declarations (it is much tougher to detect when an instance is fully private). This change means: * slightly smaller interface files (7% reduction on boot libs) * slightly less work to do processing docstrings that aren't used * no warnings in Haddock's output about private docstrings (see haskell/haddock#1070) I've tested manually that this does not affect any of the boot library generated docs (the only change in output was some small re-ordering in a handful of instance lists). This should mean no docstrings have been incorrectly dropped. - - - - - f49c90cc by Alec Theriault at 2020-04-15T07:30:51-07:00 Don't warn about missing links in miminal sigs When renaming the Haddock interface, never emit warnings when renaming a minimal signature. Also added some documention around `renameInterface`. Minimal signatures intentionally include references to potentially un-exported methods (see the discussion in haskell/haddock#330), so it is expected that they will not always have a link destination. On the principle that warnings should always be resolvable, this shouldn't produce a warning. See haskell/haddock#1070. - - - - - a9eda64d by Ben Gamari at 2020-04-17T09:27:35-04:00 Merge pull request haskell/haddock#1160 from hsyl20/wip/hsyl20/modules/systools Module renaming - - - - - f40d7879 by Cale Gibbard at 2020-04-20T11:30:38-04:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ttg-con-pat - - - - - a50e7753 by Ben Gamari at 2020-04-20T11:36:10-04:00 Merge pull request haskell/haddock#1165 from obsidiansystems/wip/ttg-con-pat Trees that Grow refactor (GHC !2553) - - - - - 6a24795c by Alec Theriault at 2020-04-21T08:06:45-07:00 Fallback to `hiDecl` when `extractDecl` fails Sometimes, the declaration being exported is a subdecl (for instance, a record accessor getting exported at the top-level). For these cases, Haddock has to find a way to produce some synthetic sensible top-level declaration. This is done with `extractDecl`. As is shown by haskell/haddock#1067, this is sometimes impossible to do just at a syntactic level (for instance when the subdecl is re-exported). In these cases, the only sensible thing to do is to try to reify a declaration based on a GHC `TyThing` via `hiDecl`. - - - - - eee1a8b7 by Sylvain Henry at 2020-04-24T15:46:05+02:00 Module structure - - - - - 50b9259c by Iñaki at 2020-04-25T18:38:11-04:00 Add support for custom section anchors (#1179) This allows to have stable anchors for groups, even if the set of groups in the documentation is altered. The syntax for setting the anchor of a group is -- * Group name #desiredAnchor# Which will produce an html anchor of the form '#g:desiredAnchor' Co-authored-by: Iñaki García Etxebarria <git at inaki.blueleaf.cc> - - - - - 4003c97a by Ben Gamari at 2020-04-26T09:35:15-04:00 Merge pull request haskell/haddock#1166 from hsyl20/wip/hsyl20/modules/utils Module structure - - - - - 5206ab60 by Sylvain Henry at 2020-04-27T16:47:39+02:00 Renamed UnitInfo fields - - - - - c32c333b by Sylvain Henry at 2020-04-27T17:32:58+02:00 UnitId has been renamed into Unit - - - - - 3e87db64 by Sylvain Henry at 2020-04-27T17:36:00+02:00 Fix for GHC.Unit.* modules - - - - - ae3323a7 by Ben Gamari at 2020-04-29T12:36:37-04:00 Merge pull request haskell/haddock#1183 from hsyl20/wip/hsyl20/unitid Refactoring of Unit code - - - - - b105564a by Artem Pelenitsyn at 2020-05-03T08:14:10+01:00 add dependency on exceptions because GHC.Exception was boiled down (ghc haskell/haddock#18075) - - - - - 9857eff3 by Zubin Duggal at 2020-05-04T18:48:25+01:00 Atomic update of NameCache in readHieFile - - - - - 86bbb226 by Sylvain Henry at 2020-05-14T16:36:27+02:00 Fix after Config module renaming - - - - - a4bbdbc2 by Gert-Jan Bottu at 2020-05-15T22:09:44+02:00 Explicit Specificity Support for Haddock - - - - - 46199daf by Ben Gamari at 2020-05-19T09:59:56-04:00 Merge pull request haskell/haddock#1192 from hsyl20/hsyl20/modules-config Fix after Config module renaming - - - - - f9a9d2ba by Gert-Jan Bottu at 2020-05-20T16:48:38-04:00 Explicit Specificity Support for Haddock - - - - - 55c5b7ea by Ben Gamari at 2020-05-21T00:32:02-04:00 Merge commit 'a8d7e66da4dcc3b242103271875261604be42d6e' into ghc-head - - - - - a566557f by Cale Gibbard at 2020-05-21T16:02:06-04:00 isBootSummary now produces a result of type IsBootInterface - - - - - ea52f905 by Zubin Duggal at 2020-05-24T17:55:48+01:00 update for hiefile-typeclass-info - - - - - 49ba7a67 by Willem Van Onsem at 2020-05-25T12:23:01-04:00 Use floor over round to calculate the percentage (#1195) If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes haskell/haddock#1194 - - - - - c025ebf1 by Ben Gamari at 2020-05-29T14:32:42-04:00 Merge pull request haskell/haddock#1185 from obsidiansystems/boot-disambig isBootSummary now produces a result of type IsBootInterface - - - - - 74ab9415 by Ben Gamari at 2020-05-29T20:23:39-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - b40be944 by Ben Gamari at 2020-06-03T17:02:31-04:00 testsuite: Update expected output for simplified subsumption - - - - - 624be71c by Ryan Scott at 2020-06-05T12:43:23-04:00 Changes for GHC#18191 See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337. - - - - - fbd8f7ce by Sylvain Henry at 2020-06-08T15:31:47+02:00 Fix after unit refactoring - - - - - 743fda4d by Ben Gamari at 2020-06-09T12:09:58-04:00 Merge pull request haskell/haddock#1202 from hsyl20/wip/hsyl20/unitid-ii Fix after unit refactoring - - - - - d07a06a9 by Ryan Scott at 2020-06-13T07:16:55-04:00 Use HsForAllTelescope (GHC#18235) - - - - - 389bb60d by Ben Gamari at 2020-06-13T15:30:52-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - 7a377f5f by Ben Gamari at 2020-06-17T14:53:16-04:00 Merge pull request haskell/haddock#1199 from bgamari/wip/ghc-8.12 haddock: Bounds bumps for GHC 8.12 - - - - - 9fd9e586 by Krzysztof Gogolewski at 2020-06-17T16:09:07-04:00 Adapt Haddock to LinearTypes See ghc/ghc!852. - - - - - 46fe7636 by Ben Gamari at 2020-06-18T14:20:02-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 35a3c9e2 by Zubin Duggal at 2020-06-21T21:19:18+05:30 Use functions exported from HsToCore - - - - - 8abe3928 by Ben Gamari at 2020-06-24T13:53:39-04:00 Merge pull request haskell/haddock#1204 from wz1000/wip/haddock-hstocore Use functions exported from GHC.HsToCore.Docs - - - - - 22f2c937 by Matthías Páll Gissurarson at 2020-06-26T19:07:03+02:00 Adapt Haddock for QualifiedDo - - - - - 3f6208d7 by Vladislav Zavialov at 2020-06-28T14:28:16+03:00 Handle LexicalNegation's ITprefixminus - - - - - 03a19f41 by Sylvain Henry at 2020-07-02T09:37:38+02:00 Rename hsctarget into backend - - - - - ea17ff23 by Andreas Klebinger at 2020-07-02T17:44:18+02:00 Update for UniqFM changes. - - - - - 9872f2f3 by Ben Gamari at 2020-07-09T10:39:19-04:00 Merge pull request haskell/haddock#1209 from AndreasPK/wip/typed_uniqfm Update for UniqFM changes. - - - - - 68f7b668 by Krzysztof Gogolewski at 2020-07-12T18:16:57+02:00 Sync with GHC removing {-# CORE #-} pragma See ghc ticket haskell/haddock#18048 - - - - - eb372681 by Sylvain Henry at 2020-07-20T11:41:30+02:00 Rename hscTarget into backend - - - - - fb7f78bf by Ben Gamari at 2020-07-21T12:15:25-04:00 Merge pull request haskell/haddock#1214 from hsyl20/wip/hsyl20/hadrian/ncg Rename hscTarget into backend - - - - - 1e8f5b56 by Ben Gamari at 2020-07-23T09:11:50-04:00 Merge commit '904dce0cafe0a241dd3ef355775db47fc12f434d' into ghc-head - - - - - d8fd1775 by Zubin Duggal at 2020-07-23T18:46:40+05:30 Update for modular ping pong - - - - - 8416f872 by Ben Gamari at 2020-07-23T09:35:03-04:00 Merge pull request haskell/haddock#1200 from wz1000/wip/wz1000-modular-ping-pong Modular ping pong - - - - - a24a8577 by Ben Gamari at 2020-07-28T15:23:36-04:00 Bump GHC version to 9.0 - - - - - 6a51c9dd by Sylvain Henry at 2020-08-05T18:47:05+02:00 Fix after Outputable refactoring - - - - - c05e1c99 by Ben Gamari at 2020-08-10T14:41:41-04:00 Merge pull request haskell/haddock#1223 from hsyl20/wip/hsyl20/dynflags/exception Fix after Outputable refactoring - - - - - d964f15b by Sylvain Henry at 2020-08-12T11:58:49+02:00 Fix after HomeUnit - - - - - 8e6d5b23 by Ben Gamari at 2020-08-12T14:25:30-04:00 Merge pull request haskell/haddock#1225 from hsyl20/wip/hsyl20/plugins/homeunit Fix after HomeUnit - - - - - 8c7880fe by Sylvain Henry at 2020-08-17T14:13:29+02:00 Remove Ord FastString instance - - - - - 8ea410db by Alex Biehl at 2020-08-19T10:56:32+02:00 Another round of `npm audit fix` (#1228) This should shut down the warnings on Github. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. Last NPM dependency audit happend in d576b2327e2bc117f912fe0a9d595e9ae62614e0 Co-authored-by: Alex Biehl <alex.biehl at target.com> - - - - - 7af6e2a8 by Ben Gamari at 2020-08-31T13:59:34-04:00 Merge pull request haskell/haddock#1226 from hsyl20/wip/hsyl20/fs_ord Remove Ord FastString instance - - - - - ffbc8702 by Alan Zimmerman at 2020-09-07T21:47:41+01:00 Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - a93f1268 by Alan Zimmerman at 2020-09-07T23:11:38+01:00 Merge pull request haskell/haddock#1232 from haskell/wip/T18639-remove-generated-pragma, Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - 1f605d50 by Ben Gamari at 2020-09-14T18:30:01-04:00 Bump GHC version to 9.1 - - - - - 6599df62 by Vladislav Zavialov at 2020-09-18T14:05:15+03:00 Bump base upper bound to 4.16 - - - - - a01b3c43 by Ben Gamari at 2020-09-22T15:41:48-04:00 Update hypsrc-test for QuickLook This appears to be a spurious change. - - - - - e9cc6cac by Vladislav Zavialov at 2020-09-26T21:00:12+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 30e3ca7c by Sylvain Henry at 2020-09-29T11:18:32-04:00 Update for parser (#1234) - - - - - b172f3e3 by Vladislav Zavialov at 2020-09-30T01:01:30+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 0b9c08d3 by Sylvain Henry at 2020-09-30T11:02:33+02:00 Adapt to GHC parser changes - - - - - b9540b7a by Sylvain Henry at 2020-10-12T09:13:38-04:00 Don't pass the HomeUnitId (#1239) - - - - - 34762e80 by HaskellMouse at 2020-10-13T12:58:04+03:00 Changed tests due to unification of `Nat` and `Natural` in the follwing merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583 - - - - - 256f86b6 by Vladislav Zavialov at 2020-10-15T10:48:03+03:00 Add whitespace in: map ($ v) - - - - - 4a3f711b by Alan Zimmerman at 2020-10-19T08:57:27+01:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled - - - - - 072cdd21 by Alan Zimmerman at 2020-10-21T14:48:28-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 9e09a445 by Alan Zimmerman at 2020-10-21T23:53:34-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 636d7de3 by Sylvain Henry at 2020-10-26T14:31:54-04:00 GHC.Driver.Types refactoring (#1242) - - - - - a597f000 by Ryan Scott at 2020-10-29T04:18:05-04:00 Adapt to the removal of Hs{Boxed,Constraint}Tuple See ghc/ghc!4097 and GHC#18723. - - - - - b96660fb by Ryan Scott at 2020-10-30T04:53:05-04:00 Adapt to HsConDecl{H98,GADT}Details split Needed for GHC#18844. - - - - - c287d82c by Ryan Scott at 2020-10-30T19:35:59-04:00 Adapt to HsOuterTyVarBndrs These changes accompany ghc/ghc!4107, which aims to be a fix for haskell/haddock#16762. - - - - - a34c31a1 by Ryan Scott at 2020-11-13T13:38:34-05:00 Adapt to splitPiTysInvisible being renamed to splitInvisPiTys This is a part of !4434, a fix for GHC#18939. - - - - - 66ea459d by Sylvain Henry at 2020-11-16T10:59:30+01:00 Fix after Plugins moved into HscEnv - - - - - 508556d8 by Ben Gamari at 2020-11-18T15:47:40-05:00 Merge pull request haskell/haddock#1253 from hsyl20/wip/hsyl20/plugins/hscenv Fix after Plugins moved into HscEnv - - - - - 620fec1a by Andreas Klebinger at 2020-11-24T20:51:59+01:00 Update for changes in GHC's Pretty - - - - - 01cc13ab by Richard Eisenberg at 2020-11-25T23:18:35-05:00 Avoid GHC#18932. - - - - - 8d29ba21 by Cale Gibbard at 2020-11-25T23:18:35-05:00 Add type arguments to PrefixCon - - - - - 414d5f87 by Sylvain Henry at 2020-11-30T17:06:04+01:00 DynFlags's unit fields moved to HscEnv - - - - - e356668c by Ben Gamari at 2020-11-30T11:11:37-05:00 Merge pull request haskell/haddock#1258 from hsyl20/wip/hsyl20/hscenv/unitstate Unit fields moved from DynFlags to HscEnv - - - - - 7cf552f1 by Ben Gamari at 2020-12-03T10:31:27-05:00 Merge pull request haskell/haddock#1257 from AndreasPK/wip/andreask/opt_dumps Update for changes in GHC's Pretty - - - - - fc0871c3 by Veronika Romashkina at 2020-12-08T16:35:33+01:00 Fix docs links from Darcs to GitHub in intro (#1262) - - - - - 7059e808 by Veronika Romashkina at 2020-12-08T16:36:16+01:00 Use gender neutral word in docs (#1260) - - - - - 1b16e5ee by Maximilian Tagher at 2020-12-08T16:40:03+01:00 Allow scrolling search results (#1235) Closes https://github.com/haskell/haddock/issues/1231 - - - - - 8a118c01 by dependabot[bot] at 2020-12-08T16:40:25+01:00 Bump bl from 1.2.2 to 1.2.3 in /haddock-api/resources/html (#1255) Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - c89ff587 by Xia Li-yao at 2020-12-08T16:42:17+01:00 Allow more characters in anchor following module reference (#1220) - - - - - 14af7d64 by Xia Li-yao at 2020-12-08T16:43:05+01:00 Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243) * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt at mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem at users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard at tweag.io> Co-authored-by: Pepe Iborra <pepeiborra at gmail.com> - - - - - 89e3af13 by tomjaguarpaw at 2020-12-08T18:00:04+01:00 Enable two warnings (#1245) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - c3320f8d by Willem Van Onsem at 2020-12-08T18:26:55+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 685df308 by Alex Biehl at 2020-12-08T20:06:26+01:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - be3ec3c0 by Alex Biehl at 2020-12-08T20:06:26+01:00 Import intercalate - - - - - 32c33912 by Matthías Páll Gissurarson at 2020-12-08T21:15:30+01:00 Adapt Haddock for QualifiedDo - - - - - 31696088 by Alex Biehl at 2020-12-08T22:06:02+01:00 Fix haddock-library tests - - - - - fbc0998a by Alex Biehl at 2020-12-08T23:08:23+01:00 Move to GitHub CI (#1266) * Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell at v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up - - - - - 5b946b9a by tomjaguarpaw at 2020-12-10T19:01:41+01:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - bc5a408f by dependabot[bot] at 2020-12-10T19:02:16+01:00 Bump ini from 1.3.5 to 1.3.7 in /haddock-api/resources/html (#1269) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - d02995f1 by Andrew Martin at 2020-12-14T16:48:40-05:00 Update for boxed rep - - - - - a381aeff by Ben Gamari at 2020-12-15T15:13:30-05:00 Revert "Enable two warnings (#1245) (#1268)" As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce. - - - - - a63c0a9e by Ben Gamari at 2020-12-15T15:17:59-05:00 Revert "Update for boxed rep" This reverts commit 4ffb30d8b637ccebecc81ce610f0af451ac8088d. - - - - - 53bfbb29 by Ben Gamari at 2020-12-15T15:37:24-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - bae76a30 by Ben Gamari at 2020-12-16T02:44:42+00:00 Update output for nullary TyConApp optimisation (ghc/ghc!2952) - - - - - 4b733b57 by Krzysztof Gogolewski at 2020-12-16T20:03:14+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. - - - - - ee463bd3 by Ryan Scott at 2020-12-16T16:55:23-05:00 Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonym Needed for !4417, the fix for GHC#15706 and GHC#18914. - - - - - ed0b02f8 by tomjaguarpaw at 2020-12-19T10:17:19+00:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - d80bf8f5 by Sylvain Henry at 2020-12-21T10:09:25+01:00 Fix after binder collect changes - - - - - bf4c9d32 by Adam Gundry at 2020-12-23T21:35:01+00:00 Adapt to changes to GlobalRdrElt and AvailInfo Needed for ghc/ghc!4467 - - - - - 37736c4c by John Ericson at 2020-12-28T12:27:02-05:00 Support a new ghc --make node type for parallel backpack upsweep - - - - - 717bdeac by Vladislav Zavialov at 2020-12-29T10:50:02+03:00 Inline and fix getGADTConTypeG The getGADTConTypeG used HsRecTy, which is at odds with GHC issue haskell/haddock#18782. I noticed that getGADTConTypeG was only used in the Hoogle backend. Interestingly, when handling H98 constructors, Hoogle converts RecCon to PrefixCon (see Haddock.Backends.Hoogle.ppCtor). So I changed getGADTConTypeG to handle RecConGADT in the same manner as PrefixConGADT, and after this simplification moved it into the 'where' clause of ppCtor, to the only place where it is used. The practical effect of this change is as follows. Consider this example: data TestH98 = T98 { bar::Int } data TestGADT where TG :: { foo :: Int } -> TestGADT Before this patch, haddock --hoogle used to produce: T98 :: Int -> TestH98 [TG] :: {foo :: Int} -> TestGADT Notice how the record syntax was discarded in T98 but not TG. With this patch, we always produce signatures without record syntax: T98 :: Int -> TestH98 [TG] :: Int -> TestGADT I suspect this might also be a bugfix, as currently Hoogle doesn't seem to render GADT record constructors properly. - - - - - cb1b8c56 by Andreas Abel at 2020-12-30T21:12:37+01:00 Build instructions: haddock-library and -api first! - - - - - b947f6ad by Ben Gamari at 2020-12-31T13:04:19-05:00 Merge pull request haskell/haddock#1281 from obsidiansystems/wip/backpack-j Changes to support -j with backpack - - - - - 120e1cfd by Hécate Moonlight at 2021-01-04T19:54:58+01:00 Merge pull request haskell/haddock#1282 from andreasabel/master Build instructions: haddock-library and -api first! - - - - - fd45e41a by Ben Gamari at 2021-01-05T16:14:31-05:00 Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0 - - - - - b471bdec by Ben Gamari at 2021-01-05T16:23:02-05:00 Merge commit '1e56f63c3197e7ca1c1e506e083c2bad25d08793' into ghc-9.0 - - - - - 81cdbc41 by Alex Biehl at 2021-01-09T12:14:41+01:00 Prepare Haddock for being a GHC Plugin - - - - - b646d952 by Alex Biehl at 2021-01-09T12:14:41+01:00 Make Haddock a GHC Plugin - - - - - cc044674 by Alex Biehl at 2021-01-09T12:14:41+01:00 Add -j[n] CLI param to Haddock executable It translates to `--ghcopt=-j[n]` - - - - - 84a04073 by Alex Biehl at 2021-01-09T12:14:41+01:00 Abstract Monad for interface creation I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName. - - - - - 5be2c4f7 by Alex Biehl at 2021-01-09T12:14:41+01:00 Accept tests - - - - - 8cefee9d by Alex Biehl at 2021-01-09T16:10:47+01:00 Add missing dependency for mtl - - - - - 3681f919 by Ben Gamari at 2021-01-13T18:39:25-05:00 Merge remote-tracking branch 'origin/ghc-9.0' into ghc-head - - - - - 33c6b152 by Hécate Moonlight at 2021-01-14T16:04:20+01:00 Merge pull request haskell/haddock#1273 from hsyl20/wip/hsyl20/arrows Fix after binder collect changes - - - - - 70d13e8e by Joachim Breitner at 2021-01-22T19:03:45+01:00 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) - - - - - 7d6dd57a by John Ericson at 2021-01-22T22:02:02+00:00 Add `NoGhcTc` instance now that it's not closed - - - - - e5fdaf0a by Alan Zimmerman at 2021-01-23T22:57:44+00:00 Merge pull request haskell/haddock#1293 from obsidiansystems/wip/fix-18936 Add `NoGhcTc` instance now that it's not closed - - - - - 989a1e05 by Oleg Grenrus at 2021-01-24T16:11:46+03:00 Add import list to Data.List - - - - - 368e144a by Ben Gamari at 2021-01-28T22:15:48+01:00 Adapt to "Make PatSyn immutable" - - - - - abe66c21 by Alfredo Di Napoli at 2021-02-01T08:05:35+01:00 Rename pprLogErrMsg to new name - - - - - e600e75c by Hécate Moonlight at 2021-02-05T14:53:00+01:00 Move CI to ghc-9.0 - - - - - dd492961 by Vladislav Zavialov at 2021-02-05T14:53:00+01:00 Update cabal.project and README build instructions - - - - - 31bd292a by Hécate Moonlight at 2021-02-05T15:03:56+01:00 Merge pull request haskell/haddock#1296 from Kleidukos/ghc-9.0 Merge the late additions to ghc-8.10 into ghc-9.0 - - - - - 6388989e by Vladislav Zavialov at 2021-02-05T17:41:57+03:00 Cleanup: fix build warnings - - - - - f99407ef by Daniel Rogozin at 2021-02-05T18:11:48+03:00 type level characters support for haddock (required for haskell/haddock#11342) - - - - - d8c6b26f by Hécate Moonlight at 2021-02-05T17:44:50+01:00 Add a CONTRIBUTING.md file - - - - - 6a01ad98 by Hécate Moonlight at 2021-02-05T17:58:16+01:00 Merge pull request haskell/haddock#1312 from Kleidukos/proper-branch-etiquette Add a CONTRIBUTING.md file - - - - - 955eecc4 by Vladislav Zavialov at 2021-02-05T20:29:00+03:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into ghc-head - - - - - 47b3d6ab by Hécate Moonlight at 2021-02-05T19:09:38+01:00 Amend the CONTRIBUTING.md file - - - - - 23de6137 by Hécate Moonlight at 2021-02-05T19:16:49+01:00 Merge pull request haskell/haddock#1313 from Kleidukos/amend-contributing Amend the CONTRIBUTING.md file - - - - - 69026b59 by Krzysztof Gogolewski at 2021-02-05T23:05:56+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb) - - - - - ea026b78 by Oleg Grenrus at 2021-02-06T17:14:45+01:00 Add import list to Data.List - - - - - 5204326f by Hécate Moonlight at 2021-02-06T17:15:44+01:00 Merge pull request haskell/haddock#1316 from Kleidukos/explicit-imports-to-data-list Add import list to Data.List - - - - - 1f4d2136 by Ben Gamari at 2021-02-06T11:53:31-05:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge - - - - - 13f0d09a by Ben Gamari at 2021-02-06T11:53:45-05:00 Fix partial record selector warning - - - - - 5c115f7e by Ben Gamari at 2021-02-06T11:55:52-05:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into wip/ghc-head-merge - - - - - b6fd8b75 by Ben Gamari at 2021-02-06T12:01:31-05:00 Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-merge - - - - - a967194c by Ben Gamari at 2021-02-06T18:30:35-05:00 Merge branch 'wip/ghc-head-merge' into ghc-head - - - - - 1f4c3a91 by MorrowM at 2021-02-07T01:52:33+02:00 Fix search div not scrolling - - - - - 684b1287 by Iñaki García Etxebarria at 2021-02-07T16:13:04+01:00 Add support for labeled module references Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label". - - - - - bdb55a5d by Hécate Moonlight at 2021-02-07T16:18:10+01:00 Merge pull request haskell/haddock#1319 from alexbiehl/alex/compat Backward compat: Add support for labeled module references - - - - - 6ca70991 by Hécate Moonlight at 2021-02-07T16:21:29+01:00 Merge pull request haskell/haddock#1314 from tweag/show-linear-backport Backport haskell/haddock#1238 (linear types) to ghc-9.0 - - - - - d9d73298 by Alex Biehl at 2021-02-07T17:46:25+01:00 Remove dubious parseModLink Instead construct the ModLink value directly when parsing. - - - - - 33b4d020 by Hécate Moonlight at 2021-02-07T17:52:05+01:00 Merge pull request haskell/haddock#1320 from haskell/alex/fix Remove dubious parseModLink - - - - - 54211316 by Hécate Moonlight at 2021-02-07T18:12:07+01:00 Merge pull request haskell/haddock#1318 from MorrowM/ghc-9.0 Fix search div not scrolling - - - - - 19db679e by alexbiehl-gc at 2021-02-07T18:14:46+01:00 Merge pull request haskell/haddock#1317 from bgamari/wip/ghc-head-merge Merge ghc-8.10 into ghc-head - - - - - 6bc1e9e4 by Willem Van Onsem at 2021-02-07T18:25:30+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - c8537cf8 by alexbiehl-gc at 2021-02-07T18:30:40+01:00 Merge pull request haskell/haddock#1322 from haskell/alex/forward-port simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 2d47ae4e by alexbiehl-gc at 2021-02-07T18:39:59+01:00 Merge branch 'ghc-head' into ghc-9.0 - - - - - 849e4733 by Hécate Moonlight at 2021-02-07T18:43:19+01:00 Merge pull request haskell/haddock#1321 from Kleidukos/ghc-9.0 Merge ghc-9.0 into ghc-head - - - - - ee6095d7 by Sylvain Henry at 2021-02-08T11:36:38+01:00 Update for Logger - - - - - 4ad688c9 by Alex Biehl at 2021-02-08T18:11:24+01:00 Merge pull request haskell/haddock#1310 from hsyl20/wip/hsyl20/logger2 Logger refactoring - - - - - 922a9e0e by Ben Gamari at 2021-02-08T12:54:33-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - 991649d2 by Sylvain Henry at 2021-02-09T10:55:17+01:00 Fix to build with HEAD - - - - - a8348dc2 by Hécate Moonlight at 2021-02-09T10:58:51+01:00 Merge pull request haskell/haddock#1327 from hsyl20/wip/hsyl20/logger2 Fix to build with HEAD - - - - - 0abdbca6 by Fendor at 2021-02-09T20:06:15+01:00 Add UnitId to Target record - - - - - d5790a0e by Alex Biehl at 2021-02-11T10:32:32+01:00 Stable sort for (data/newtype) instances - - - - - 8e6036f5 by Alex Biehl at 2021-02-11T10:32:32+01:00 Also make TyLit deterministic - - - - - f76d2945 by Hécate Moonlight at 2021-02-11T11:00:31+01:00 Merge pull request haskell/haddock#1329 from hsyl20/hsyl20/stabe_iface Stable sort for instances - - - - - 5e0469ea by Oleg Grenrus at 2021-02-14T15:28:15+02:00 Add import list to Data.List in Haddock.Interface.Create - - - - - fa57cd24 by Hécate Moonlight at 2021-02-14T17:19:27+01:00 Merge pull request haskell/haddock#1331 from phadej/more-explicit-data-list-imports Add import list to Data.List in Haddock.Interface.Create - - - - - f0cd629c by Hécate Moonlight at 2021-02-21T00:22:01+01:00 Merge pull request haskell/haddock#1311 from fendor/wip/add-targetUnitId-to-target Add UnitId to Target record - - - - - 674ef723 by Joachim Breitner at 2021-02-22T10:39:18+01:00 html-test: Always set language from ghc-9.2 on, the “default” langauge of GHC is expected to change more wildly. To prepare for that (and unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4853), this sets the language for all the test files to `Haskell2010`. This should insolate this test suite against changes to the default. Cherry-picked from https://github.com/haskell/haddock/pull/1341 - - - - - f072d623 by Hécate Moonlight at 2021-02-22T10:56:51+01:00 Merge pull request haskell/haddock#1342 from nomeata/joachim/haskell2010-in-tests-ghc-head html-test: Always set language - - - - - caebbfca by Hécate Moonlight at 2021-02-22T11:53:07+01:00 Clean-up of Interface and Interface.Create's imports and pragmata - - - - - f6caa89d by Hécate Moonlight at 2021-02-22T11:54:58+01:00 Merge pull request haskell/haddock#1345 from Kleidukos/head/fix-interface-imports [ghc-head] Clean-up of Interface and Interface.Create's imports and pragmata - - - - - 7395c9cb by Hécate Moonlight at 2021-02-22T18:44:57+01:00 Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 6e9fb5d5 by Hécate Moonlight at 2021-02-22T18:45:28+01:00 Merge pull request haskell/haddock#1348 from Kleidukos/head/explicit-imports-interface Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 9198b118 by Alan Zimmerman at 2021-02-22T20:04:24+00:00 Context becomes a Maybe in the GHC AST This prevents noLoc's appearing in the ParsedSource. Match the change in GHC. - - - - - 0af20f64 by Hécate Moonlight at 2021-02-23T12:36:12+01:00 Fix the call-site of guessTarget in Interface.hs Explicit the imports from GHC.HsToCore.Docs - - - - - b7886885 by Hécate Moonlight at 2021-02-23T12:37:54+01:00 Merge pull request haskell/haddock#1349 from Kleidukos/fix-interface-guesstarget-call Fix the call-site of guessTarget in Interface.hs - - - - - 9cf041ba by Sylvain Henry at 2021-02-24T11:08:20+01:00 Fix haddockHypsrcTest output in ghc-head - - - - - b194182a by Hécate Moonlight at 2021-02-24T11:12:36+01:00 Merge pull request haskell/haddock#1351 from hsyl20/wip/hsyl20/fix-head Fix haddockHypsrcTest output in ghc-head - - - - - 3ce8b375 by Shayne Fletcher at 2021-03-06T09:55:03-05:00 Add ITproj to parser - - - - - d2abf762 by Ben Gamari at 2021-03-06T19:26:49-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a0f6047d by Andrew Martin at 2021-03-07T11:25:23-05:00 Update for boxed rep - - - - - 6f63c99e by Ben Gamari at 2021-03-10T13:20:21-05:00 Update for "FastString: Use FastMutInt instead of IORef Int" - - - - - e13f01df by Luke Lau at 2021-03-10T15:38:40-05:00 Implement template-haskell's putDoc This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int - - - - - 89263d94 by Alan Zimmerman at 2021-03-15T17:15:26+00:00 Match changes in GHC AST for in-tree API Annotations As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418 - - - - - 28db1934 by Alan Zimmerman at 2021-03-15T20:40:09+00:00 Change some type family test results. It is not clear to me whether the original was printing incorrectly (since we did not have the TopLevel flag before now), or if this behaviour is expected. For the time being I am assuming the former. - - - - - 7c11c989 by Sylvain Henry at 2021-03-22T10:05:19+01:00 Fix after NameCache changes - - - - - addbde15 by Sylvain Henry at 2021-03-22T10:05:19+01:00 NameCache doesn't store a UniqSupply anymore - - - - - 15ec6cec by Ben Gamari at 2021-03-22T17:53:44-04:00 Bump GHC version to 9.2 - - - - - dbd6aa63 by Hécate Moonlight at 2021-03-24T14:28:36+01:00 Merge pull request haskell/haddock#1365 from hsyl20/wip/hsyl20/iface1 NameCache refactoring - - - - - 2d32da7e by Oleg Grenrus at 2021-03-27T01:12:00+02:00 Specialization of Data.List - - - - - 32b84fa6 by Fendor at 2021-03-27T10:50:17+01:00 Add UnitId to Target record This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time. - - - - - 54bf9f0e by Hécate Moonlight at 2021-03-28T14:08:35+02:00 Merge pull request haskell/haddock#1368 from fendor/target-unit-id-revert Add UnitId to Target record - - - - - 7dea168a by Alan Zimmerman at 2021-03-29T08:45:52+01:00 EPA : Rename ApiAnn to EpAnn - - - - - 72967f65 by Alfredo Di Napoli at 2021-03-29T09:47:01+02:00 pprError changed name in GHC - - - - - 4bc61035 by Alan Zimmerman at 2021-03-29T16:16:27-04:00 EPA : Rename ApiAnn to EpAnn - - - - - 108d031d by Ben Gamari at 2021-03-29T18:49:36-04:00 Merge commit '36418c4f70d7d2b179a77925b3ad5caedb08c9b5' into HEAD - - - - - 1444f700 by Ben Gamari at 2021-03-31T09:18:39-04:00 Merge pull request haskell/haddock#1370 from adinapoli/wip/adinapoli-diag-reason-severity Rename pprError to mkParserErr - - - - - d3087b79 by Ben Gamari at 2021-03-31T11:34:17-04:00 Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head - - - - - 170b79e9 by Ben Gamari at 2021-03-31T12:24:56-04:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - db0d6bae by Ben Gamari at 2021-04-10T09:34:35-04:00 Bump GHC version to 9.3 - - - - - a9f2c421 by Alan Zimmerman at 2021-04-19T18:26:46-04:00 Update for EPA changes in GHC (cherry picked from commit cafb48118f7c111020663776845897e225607b41) - - - - - 1ee4b7c7 by Sylvain Henry at 2021-05-11T10:00:06+02:00 Removal of HsVersions.h (#1388) * Update for EPA changes in GHC * Account for HsVersions.h removal Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 79e819e9 by Hécate Moonlight at 2021-05-11T10:14:47+02:00 Revert "Removal of HsVersions.h (#1388)" This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6. - - - - - 3dbd3f8b by Alan Zimmerman at 2021-05-11T10:15:17+02:00 Update for EPA changes in GHC - - - - - 2ce80c17 by Sylvain Henry at 2021-05-11T10:15:19+02:00 Account for HsVersions.h removal - - - - - 00e4c918 by Christiaan Baaij at 2021-05-13T08:21:56+02:00 Add Haddock support for the OPAQUE pragma (#1380) - - - - - 8f9049b2 by Hécate Moonlight at 2021-05-13T08:40:22+02:00 fixup! Use GHC 9.2 in CI runner - - - - - 27ddec38 by Alan Zimmerman at 2021-05-13T22:51:20+01:00 EPA: match changes from GHC T19834 - - - - - f8a1d714 by Felix Yan at 2021-05-14T17:10:04+02:00 Allow hspec 2.8 (#1389) All tests are passing. - - - - - df44453b by Divam Narula at 2021-05-20T15:42:42+02:00 Update ref, the variables got renamed. (#1391) This is due to ghc/ghc!5555 which caused a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used. - - - - - e46bfc87 by Alan Zimmerman at 2021-05-20T19:05:09+01:00 Remove Maybe from HsQualTy Match changes in GHC for haskell/haddock#19845 - - - - - 79bd7b62 by Shayne Fletcher at 2021-05-22T08:20:39+10:00 FieldOcc: rename extFieldOcc to foExt - - - - - 6ed68c74 by Ben Gamari at 2021-05-21T22:29:30-04:00 Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head - - - - - f9a02d34 by Alfredo Di Napoli at 2021-05-24T13:53:00+02:00 New Parser diagnostics interface - - - - - 392807d0 by Ben Gamari at 2021-05-24T09:57:40-04:00 Merge pull request haskell/haddock#1394 from adinapoli/wip/adinapoli-align-ps-messages Align Haddock to use the new Parser diagnostics interface - - - - - 33023cd8 by Ben Gamari at 2021-05-24T11:19:16-04:00 Revert "Add Haddock support for the OPAQUE pragma (#1380)" This reverts commit a1337c599ef7720b0482a25c55f11794112496dc. The GHC patch associated with this change is not yet ready to be merged. - - - - - 8c005af7 by Ben Simms at 2021-05-28T07:56:20+02:00 CI configuration for ghc-head (#1395) - - - - - 1e947612 by Hécate Moonlight at 2021-05-28T12:27:35+02:00 Use GHC 9.2 in CI runner (#1378) - - - - - e6fa10ab by CGenie at 2021-05-31T09:02:13+02:00 Add page about common errors (#1396) * Update index.rst Common errors page * Create common-errors.rst * Update common-errors.rst * Use GHC 9.2 in CI runner (#1378) * [haddock-api] remove .hspec-failures Co-authored-by: Hécate Moonlight <Kleidukos at users.noreply.github.com> - - - - - abc72a8d by Sylvain Henry at 2021-06-01T10:02:06+02:00 Adapt Haddock to Logger and Parser changes (#1399) - - - - - 91373656 by Zubin Duggal at 2021-06-01T20:45:10+02:00 Update haddockHypSrc tests since we now compute slighly more type info (#1397) - - - - - ed712822 by Marcin Szamotulski at 2021-06-02T08:54:33+02:00 Added myself to contributors - - - - - 49fdbcb7 by Marcin Szamotulski at 2021-06-02T08:57:24+02:00 Document multi component support - - - - - 9ddc8d7d by Hécate Moonlight at 2021-06-02T09:35:55+02:00 Merge pull request haskell/haddock#1379 from coot/coot/document-multi-component-support Document multi component support - - - - - 585b5c5e by Ben Simms at 2021-06-02T19:46:54+02:00 Update CONTRIBUTING.md (#1402) - - - - - 1df4a605 by Ben Simms at 2021-06-02T19:47:14+02:00 Update CONTRIBUTING.md (#1403) - - - - - 58ea43d2 by sheaf at 2021-06-02T22:09:06+02:00 Update Haddock Bug873 to account for renaming - - - - - c5d0ab23 by Vladislav Zavialov at 2021-06-10T13:35:42+03:00 HsToken in FunTy, RecConGADT - - - - - 1ae2f40c by Hécate Moonlight at 2021-06-11T11:19:09+02:00 Update the CI badges - - - - - 6fdc4de2 by Sylvain Henry at 2021-06-28T19:21:17+02:00 Fix mkParserOpts (#1411) - - - - - 18201670 by Alfredo Di Napoli at 2021-07-05T07:55:12+02:00 Rename getErrorMessages Lexer import This commit renames the Lexer import in `Hyperlinker.Parser` from `getErrorMessages` to `getPsErrorMessages` to eliminate the ambiguity with the `getErrorMessages` function defined in `GHC.Types.Error`. - - - - - 23173ca3 by Ben Gamari at 2021-07-07T11:31:44-04:00 Merge pull request haskell/haddock#1413 from adinapoli/wip/adinapoli-issue-19920 Rename getErrorMessages Lexer import - - - - - b3dc4ed8 by Alan Zimmerman at 2021-07-28T22:30:59+01:00 EPA: match changes from GHC T19834 (cherry picked from commit 2fec1b44e0ee7e263286709aa528b4ecb99ac6c2) - - - - - 5f177278 by Ben Gamari at 2021-08-06T01:17:37-04:00 Merge commit '2a966c8ca37' into HEAD - - - - - cdd81d08 by Marcin Szamotulski at 2021-08-08T17:19:06+02:00 coot/multiple packages (ghc-9.2) (#1418) - - - - - be0d71f1 by Marcin Szamotulski at 2021-08-16T08:46:03+02:00 coot/multiple package (ghc-head) (#1419) * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".". - - - - - 3b09dbdf by Hécate Moonlight at 2021-10-07T23:26:03+02:00 Update GHC 9.2 to latest pre-release in CI - - - - - 7ac55417 by Zubin Duggal at 2021-10-11T12:10:19+02:00 Enable Haddock tests in GHC windows CI (#1428) * testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC - - - - - 1cb81f25 by Andrew Lelechenko at 2021-10-12T15:23:19+02:00 haddock-library does not depend on bytestring or transformers (#1426) - - - - - a890b9aa by sheaf at 2021-10-15T22:19:42+02:00 update haddockHypsrcTest for GHC MR !6705 (#1430) - - - - - 42a55c6c by Sylvain Henry at 2021-10-15T22:20:10+02:00 Fix after PkgQual refactoring (#1429) - - - - - 91659238 by Alan Zimmerman at 2021-10-28T18:57:10+01:00 Update for changes in GHC for branch wip/az/no-srcspan-anno-instances - - - - - acf23e60 by Vladislav Zavialov at 2021-11-05T02:09:47+03:00 Do not use forall as an identifier See GHC ticket haskell/haddock#20609 - - - - - c565db0e by Krzysztof Gogolewski at 2021-11-27T02:42:35+01:00 Update after NoExtCon -> DataConCantHappen rename - - - - - b5f55590 by Artem Pelenitsyn at 2021-11-27T11:14:17+01:00 fix CI for 9.2 (#1436) - - - - - 25cd621e by Matthew Pickering at 2021-12-02T11:46:54+00:00 Update html-test for Data.List revert - - - - - 1d5ff85f by malteneuss at 2021-12-15T07:56:55+01:00 Add hint about inline link issue (#1444) - - - - - 791fde81 by Sylvain Henry at 2021-12-16T09:29:51+01:00 Bump ghc-head (#1445) * Update after NoExtCon -> DataConCantHappen rename * Update html-test for Data.List revert * Fix for new Plugins datatype Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 44236317 by Sylvain Henry at 2021-12-17T09:39:00+01:00 Fix for new Plugins datatype - - - - - 80ada0fa by Hécate Moonlight at 2021-12-17T17:28:48+01:00 Remove ghc-head workflow (#1446) Contributions of GHC glue code are now done on the GHC gitlab, not in the GitHub repo anymore. - - - - - 49e171cd by Matthew Pickering at 2021-12-28T09:47:09+00:00 Remove use of ExtendedModSummary - - - - - 0e91b5ea by askeblad at 2022-01-04T09:18:35+01:00 update URLs - - - - - 9f13c212 by Hécate Moonlight at 2022-02-25T10:19:46+01:00 Fix solver for GHC 9.2 - - - - - 386751a1 by Meng Weng Wong at 2022-02-25T19:19:11+01:00 IDoc link has bitrotted; replaced with web.archive.org cache. (#1454) - - - - - d877cbe6 by Hécate Moonlight at 2022-02-25T19:21:58+01:00 Fix haddock user guide (#1456) - - - - - cc47f036 by Andrew Lelechenko at 2022-03-04T17:29:36+01:00 Allow text-2.0 in haddock-library (#1459) - - - - - 7b3685a3 by malteneuss at 2022-03-07T19:27:24+01:00 Add multi-line style hint to style section (#1460) - - - - - c51088b8 by John Ericson at 2022-03-11T16:46:26+01:00 Fix CollectPass instance to match TTG refactor Companion to GHC !7614 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7614) - - - - - b882195b by Vladislav Zavialov at 2022-03-14T20:32:30+01:00 Link to (~) - - - - - 877349b8 by Christiaan Baaij at 2022-03-16T09:20:43+01:00 Add Haddock support for the OPAQUE pragma - - - - - 0ea22721 by askeblad at 2022-03-16T09:44:27+01:00 typos (#1464) - - - - - a6d13da1 by Matthew Pickering at 2022-03-22T13:41:17+00:00 Minimum changes needed for compilation with hi-haddock With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC. - - - - - e7ac9129 by Matthew Pickering at 2022-03-22T21:17:50+00:00 Update test output - - - - - 6d916214 by Matthew Pickering at 2022-03-24T15:06:26+00:00 Merge branch 'wip/opaque_pragma' into 'ghc-head' Add Haddock support for the OPAQUE pragma See merge request ghc/haddock!2 - - - - - 42208183 by Steve Hart at 2022-03-25T20:43:50+01:00 Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. - - - - - 9676fd79 by Steve Hart at 2022-03-25T21:33:34+01:00 Make links in Synopsis functional again (#1458) Commit e41c1cbe9f0476997eac7b4a3f17cbc6b2262faf added a call to e.preventDefault() when handling click events that reach a toggle element. This prevents the browser from following hyperlinks within the Synopsis section when they are clicked by a user. This commit restores functioning hyperlinks within the Synopsis section by removing the call to e.preventDefault(), as it does not appear to be necessary, and removing it increases the flexibility of the details-helper code. - - - - - d1edd637 by sheaf at 2022-04-01T12:02:02+02:00 Keep track of promotion ticks in HsOpTy Keeping track of promotion ticks in HsOpTy allows us to properly pretty-print promoted constructors such as lists. - - - - - 9dcb2dfc by Jakob Brünker at 2022-04-01T15:46:22+00:00 Add support for \cases See merge request ghc/ghc!7873 - - - - - b0412ee5 by askeblad at 2022-04-06T17:47:57+02:00 spelling errors (#1471) - - - - - 6b18829b by Vladislav Zavialov at 2022-04-06T18:53:58+02:00 Rename [] to List - - - - - 2d046691 by Vladislav Zavialov at 2022-04-07T20:25:54+03:00 HsToken ConDeclGADT con_dcolon - - - - - 90b43da4 by Steve Hart at 2022-04-12T13:29:46+02:00 Parse Markdown links at beginning of line within a paragraph (#1470) * Catch Markdown links at beginning of line within paragraph Per Issue haskell/haddock#774, Markdown links were being parsed as ordinary text when they occurred at the beginning of a line other than the first line of the paragraph. This occurred because the parser was not interpreting a left square bracket as a special character that could delimit special markup. A space character was considered a special character, so, if a space occurred at the beginning of the new line, then the parser would interpret the space by itself and then continue parsing, thereby catching the Markdown link. '\n' was not treated as a special character, so the parser did not catch a Markdown link that may have followed. Note that this will allow for Markdown links that are not surrounded by spaces. For example, the following text includes a Markdown link that will be parsed: Hello, world[label](url) This is consistent with how the parser handles other types of markup. * Remove obsolete documentation hint Commit 6b9aeafddf20efc65d3725c16e3fc43a20aac343 should eliminate the need for the workaround suggested in the documentation. - - - - - 5b08312d by Hécate Moonlight at 2022-04-12T13:36:38+02:00 Force ghc-9.2 in the cabal.project - - - - - 0d0ea349 by dependabot[bot] at 2022-04-12T13:57:41+02:00 Bump path-parse from 1.0.5 to 1.0.7 in /haddock-api/resources/html (#1469) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 2b9fc65e by dependabot[bot] at 2022-04-12T13:57:54+02:00 Bump copy-props from 2.0.4 to 2.0.5 in /haddock-api/resources/html (#1468) Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - ea98a6fb by Ben Gamari at 2022-04-23T22:54:37-04:00 Update for GHC 9.4 - - - - - 9e11864f by Ben Gamari at 2022-04-25T16:24:31-04:00 Merge remote-tracking branch 'upstream/ghc-9.2' into ghc-head - - - - - f83cc506 by Ben Gamari at 2022-04-25T17:00:25-04:00 Bump ghc version to 9.5 - - - - - e01c2e7d by Ben Gamari at 2022-04-28T16:19:04-04:00 Revert "Bump ghc-head (#1445)" This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2. This should not have been merged. - - - - - a2b5ee8c by Ben Gamari at 2022-04-28T16:19:24-04:00 Merge commit '2627a86c' into ghc-head - - - - - 0c6fe4f9 by Ben Gamari at 2022-04-29T10:05:54-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-9.4 - - - - - b6e5cb0a by Ben Gamari at 2022-04-29T11:46:06-04:00 Revert "HsToken ConDeclGADT con_dcolon" This reverts commit 24208496649a02d5f87373052c430ea4a97842c5. - - - - - 15a62888 by Ben Gamari at 2022-04-29T15:12:55-04:00 Bump base upper bound - - - - - 165b9031 by Ben Gamari at 2022-04-29T23:58:38-04:00 Update test output - - - - - e0c3e5da by Phil de Joux at 2022-05-02T14:46:38+02:00 Add hlint action .hlint.yaml with ignores & CPP. (#1475) - - - - - ead1158d by Raphael Das Gupta at 2022-05-02T14:46:48+02:00 fix grammar in docs: "can the" → "can be" (#1477) - - - - - cff97944 by Ben Gamari at 2022-05-02T18:38:56-04:00 Allow base-4.17 - - - - - e4ecb201 by Phil de Joux at 2022-05-03T13:14:55+02:00 Remove unused imports that GHC warned about. (#1480) - - - - - 222890b1 by Phil de Joux at 2022-05-03T13:15:46+02:00 Follow hlint suggestion to remove redundant bang. (#1479) - - - - - 058b671f by Phil de Joux at 2022-05-03T13:34:04+02:00 Follow hlint, remove language pragmas in libs. (#1478) - - - - - 0a645049 by Ben Simms at 2022-05-03T14:19:24+02:00 Keep track of ordered list indexes and render them (#1407) * Keep track of ordered list indexes and render them * Rename some identifiers to clarify - - - - - f0433304 by Norman Ramsey at 2022-05-04T15:13:34-04:00 update for changes in GHC API - - - - - 3740cf71 by Emily Martins at 2022-05-06T18:23:48+02:00 Add link to the readthedocs in cabal description to show on hackage. (cherry picked from commit 52e2d40d47295c02d3181aac0c53028e730f1e3b) - - - - - 5d754f1e by Hécate Moonlight at 2022-05-06T18:44:57+02:00 remove Bug873 - - - - - 968fc267 by Hécate Moonlight at 2022-05-06T18:48:28+02:00 Ignore "Use second" HLint suggestion. It increases laziness. - - - - - 02d14e97 by Jade Lovelace at 2022-05-07T17:42:08+02:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` - - - - - b22b87ed by Artem Pelenitsyn at 2022-05-08T16:19:47+02:00 fix parsing trailing quotes in backticked identifiers (#1408) (#1483) - - - - - 80ae107b by Alex Biehl at 2022-05-08T16:37:16+02:00 Fix "Defined by not used" error (cherry picked from commit 6e02a620a26c3a44f98675dd1b93b08070c36c0a) - - - - - 4c838e84 by Hécate Moonlight at 2022-05-08T16:37:16+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - fc9827b4 by Hécate Moonlight at 2022-05-08T16:40:40+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - b153b555 by Xia Li-yao at 2022-05-20T17:52:42+02:00 Hide synopsis from search when hidden (#1486) Fix haskell/haddock#1451 - - - - - f3e38b85 by Marcin Szamotulski at 2022-05-21T23:32:31+02:00 Allow to hide interfaces when rendering multiple components (#1487) This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package. - - - - - f942863b by Marcin Szamotulski at 2022-05-24T08:29:59+02:00 Check if doc-index.json exists before reading it (#1488) - - - - - 31e92982 by Marcin Szamotulski at 2022-05-25T16:22:13+02:00 Version bump 2.26.1 (#1489) * Version bump 2.26.1 We extended format accepted by `--read-interface` option, which requires updating the minor version. * Update documentation of --read-interface option - - - - - 7cc873e0 by sheaf at 2022-05-25T16:42:31+02:00 Updated HaddockHypsrcTest output for record update changes (MR !7981) - - - - - cd196942 by Marcin Szamotulski at 2022-05-25T20:28:47+02:00 Use visibility to decide which interfaces are included in quickjump (#1490) This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision. - - - - - 00c713c5 by Hécate Moonlight at 2022-05-26T17:09:15+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 2f3039f1 by Hécate Moonlight at 2022-05-26T17:10:59+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 63a5650c by romes at 2022-05-31T12:43:22+01:00 TTG: Match new GHC AST - - - - - dd7d1617 by romes at 2022-06-02T16:11:00+01:00 Update for IE changes in !8228 - - - - - c23aaab7 by cydparser at 2022-06-06T08:48:14+02:00 Fix and improve CI (#1495) * Pin GHC version before creating the freeze file * Use newest action versions * Improve caching * Avoid unnecessarily reinstalling GHC * Use GHC 9.2.2 for CI Co-authored-by: Cyd Wise <cwise at tripshot.com> - - - - - c156fa77 by Hécate Moonlight at 2022-06-06T11:59:35+02:00 Add Mergify configuration (#1496) - - - - - 2dba4188 by Hécate Moonlight at 2022-06-06T16:12:50+02:00 Bump haddock's version in cabal file to 2.26.1 (#1497) - - - - - d7d4b8b9 by Marcin Szamotulski at 2022-06-07T06:09:40+00:00 Render module tree per package in the content page (#1492) * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version. - - - - - 77765665 by Mike Pilgrem at 2022-06-12T21:57:19+01:00 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - b0e079b0 by mergify[bot] at 2022-06-13T11:49:37+00:00 Merge pull request haskell/haddock#1108 from mpilgrem/fix783 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - 6c0292b1 by Hécate Moonlight at 2022-06-21T17:21:08+02:00 Update the contribution guide - - - - - e413b9fa by dependabot[bot] at 2022-06-21T23:38:19+02:00 Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 29d0ef70 by romes at 2022-07-06T11:29:39+02:00 TTG: AST Updates for !8308 - - - - - 1bae7c87 by Alan Zimmerman at 2022-07-06T22:50:43+01:00 Match GHC changes for T21805 This brings in a newtype for FieldLabelString - - - - - 6fe8b988 by Phil de Joux at 2022-07-16T20:54:26+00:00 Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. - - - - - 48fb43af by Phil de Joux at 2022-07-19T09:32:55+02:00 Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. - - - - - c1cf1fa7 by Phil de Joux at 2022-07-24T13:45:59+02:00 Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. - - - - - 74777eb2 by Jade Lovelace at 2022-07-29T11:02:41+01:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` (cherry picked from commit ab53ccf089ea703b767581ac14be0f6c78a7678a) - - - - - faa4cfcf by Hécate Moonlight at 2022-07-29T20:31:20+02:00 Merge pull request haskell/haddock#1516 from duog/9-4-backport-fix-hyperlinks Backport 9-4: Fix hyperlinks to external items and modules (#1482) - - - - - 5d2450f3 by Ben Gamari at 2022-08-05T17:41:15-04:00 Merge remote-tracking branch 'origin/ghc-9.4' - - - - - 63954f73 by Ben Gamari at 2022-08-05T19:08:36-04:00 Clean up build and testsuite for GHC 9.4 - - - - - d4568cb8 by Hécate Moonlight at 2022-08-05T19:10:49-04:00 Bump the versions - - - - - 505583a4 by Ben Gamari at 2022-08-06T13:58:27-04:00 Merge pull request haskell/haddock#1518 from bgamari/wip/ghc-9.4-merge Merge GHC 9.4 into `main` - - - - - 5706f6a4 by Ben Gamari at 2022-08-06T22:57:21-04:00 html-test: Testsuite changes for GHC 9.4.1 - - - - - 5f2a45a2 by Ben Gamari at 2022-08-15T14:33:05-04:00 doc: Fix a few minor ReST issues Sphinx was complaining about too-short title underlines. - - - - - 220e6410 by Ben Gamari at 2022-08-15T14:41:24-04:00 Merge branch 'main' into ghc-head - - - - - fbeb1b02 by Ben Gamari at 2022-08-15T14:45:16-04:00 Updates for GHC 9.5 - - - - - eee562eb by Vladislav Zavialov at 2022-08-15T14:46:13-04:00 HsToken ConDeclGADT con_dcolon - - - - - c5f073db by Ben Gamari at 2022-08-15T16:55:35-04:00 Updates for GHC 9.5 - - - - - 3f7ab242 by Vladislav Zavialov at 2022-08-15T16:55:35-04:00 HsToken ConDeclGADT con_dcolon - - - - - a18e473d by Ben Gamari at 2022-08-16T08:35:19-04:00 Merge branch 'wip/ghc-head-bump' into ghc-head - - - - - af0ff3a4 by M Farkas-Dyck at 2022-09-15T21:16:05+00:00 Disuse `mapLoc`. - - - - - a748fc38 by Matthew Farkas-Dyck at 2022-09-17T10:44:18+00:00 Scrub partiality about `NewOrData`. - - - - - 2758fb6c by John Ericson at 2022-09-18T03:27:37+02:00 Test output changed because of change to `base` Spooky, but I guess that is intended? - - - - - a7eec128 by Torsten Schmits at 2022-09-21T11:06:55+02:00 update tests for the move of tuples to GHC.Tuple.Prim - - - - - 461e7b9d by Ross Paterson at 2022-09-24T22:01:25+00:00 match implementation of GHC proposal haskell/haddock#106 (Define Kinds Without Promotion) - - - - - f7fd77ef by sheaf at 2022-10-17T14:53:01+02:00 Update Haddock for GHC MR !8563 (configuration of diagnostics) - - - - - 3d3e85ab by Vladislav Zavialov at 2022-10-22T23:04:06+03:00 Class layout info - - - - - cbde4cb0 by Simon Peyton Jones at 2022-10-25T23:19:18+01:00 Adapt to Constraint-vs-Type See haskell/haddock#21623 and !8750 - - - - - 7108ba96 by Tom Smeding at 2022-11-01T22:33:23+01:00 Remove outdated footnote about module re-exports The footnote is invalid with GHC 9.2.4 (and possibly earlier): the described behaviour in the main text works fine. - - - - - 206c6bc7 by Hécate Moonlight at 2022-11-01T23:00:46+01:00 Merge pull request haskell/haddock#1534 from tomsmeding/patch-1 - - - - - a57b4c4b by Andrew Lelechenko at 2022-11-21T00:39:52+00:00 Support mtl-2.3 - - - - - e9d62453 by Simon Peyton Jones at 2022-11-25T13:49:12+01:00 Track small API change in TyCon.hs - - - - - eb1c73f7 by Ben Gamari at 2022-12-07T08:46:21-05:00 Update for GhC 9.6 - - - - - 063268dd by Ben Gamari at 2022-12-07T11:26:32-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 4ca722fe by Ben Gamari at 2022-12-08T14:43:26-05:00 Bump bounds to accomodate base-4.18 - - - - - 340b7511 by Vladislav Zavialov at 2022-12-10T12:31:28+00:00 HsToken in HsAppKindTy - - - - - 946226ec by Ben Gamari at 2022-12-13T20:12:56-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - fd8faa66 by Ben Gamari at 2022-12-22T13:44:28-05:00 Bump GHC version to 9.7 - - - - - 2958aa9c by Ben Gamari at 2022-12-22T14:49:16-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 9e0fefd8 by Andrei Borzenkov at 2023-01-30T14:02:04+04:00 Rename () to Unit, Rename (,,...,,) to Tuple<n> - - - - - eb3968b5 by Ben Gamari at 2023-03-10T02:32:43-05:00 Bump versions for ghc-9.6 release - - - - - 4aeead36 by Adam Gundry at 2023-03-23T13:53:47+01:00 Adapt to warning categories changes - - - - - 642d8d60 by sheaf at 2023-03-29T13:35:56+02:00 Adapt to record field refactor This commit adapts to the changes in GHC MR !8686, which overhauls the treatment of record fields in the renamer, adding separate record field namespaces and entirely removing the GreName datatype. - - - - - ac8d4333 by doyougnu at 2023-03-29T11:11:44-04:00 Update UniqMap API - - - - - 7866fc86 by Ben Orchard at 2023-04-20T11:29:33+02:00 update classify with new tokens - - - - - ffcdd683 by Finley McIlwaine at 2023-04-24T09:36:18-06:00 Remove index-state - - - - - 05b70982 by Finley McIlwaine at 2023-04-26T08:16:31-06:00 `renameInterface` space leak fixes - Change logic for accumulation of names for which link warnings will be generated - Change handling of `--ignore-link-symbol` to allow qualified and unqualified names. Added to CHANGES.md - Some formatting changes and comments here and there - - - - - e5697d7c by Finley McIlwaine at 2023-04-27T18:46:36-06:00 Messy things - ghc-debug dependency and instrumentation - cabal.project custom with-compiler - hie.yaml files - traces and such - - - - - 0b8ef80b by Finley McIlwaine at 2023-05-02T18:08:52-06:00 Stop retaining GRE closures GRE closures should never be necessary to Haddock, so we never want to keep them on the heap. Despite that, they are retained by a lot of the data structures that Haddock makes use of. - Attempt to fix that situation by adding strictness to various computations and pruning the `ifaceInstances` field of `Interface` to a much thinner data type. - Removes the `ifaceFamInstances` field, as it was never used. - Move some of the attach instances types (e.g. `SimpleType`) to the types module - - - - - 8bda991b by Finley McIlwaine at 2023-05-08T16:07:51-06:00 Memory usage fixes - Refactor `ifaceDeclMap` to drastically reduce memory footprint. We no longer store all declarations associated with a given name, since we only cared to determine if the only declaration associated with a name was a value declaration. Change the `DeclMap` type to better reflect this. - Drop pre-renaming export items after the renaming step. Since the Hoogle backend used the pre-renamed export items, this isn't trivial. We now generate Hoogle output for exported declarations during the renaming step (if Hoogle output /should/ be generated), and store that with the renamed export item. - Slightly refactor Hoogle backend to handle the above change and allow for early generation of Hoogle output. - Remove the `ifaceRnDocMap` and `ifaceRnArgMap` fields of the `Interface` type, as they were never used. - Remove some unnecessary strictness - Remove a lot of dead code from `Syb` module - - - - - 1611ac0c by Finley McIlwaine at 2023-05-09T11:51:57-06:00 Unify ErrMsgM and IfM - Delete ErrMsgM, stop accumulating warnings in a writer - Make IfM a state monad, print warnings directly to stdout, move IfM type into types module - Drop ErrMsg = String synonym - Unset IORefs from plugin after they are read, preventing unnecessary retention of interfaces - - - - - 42d696ab by Finley McIlwaine at 2023-05-11T15:52:07-06:00 Thunk leak fixes The strictness introduced in this commit was motivated by observing thunk leaks in the eventlog2html output. - Refactor attach instances list comprehension to avoid large intermediate thunks - Refactor some HTML backend list comprehensions to avoid large intermediate thunks - Avoid thunks accumulating in documentation types or documentation parser - A lot of orphan NFData instances to allow us to force documentation values - - - - - 68561cf6 by Finley McIlwaine at 2023-05-11T17:02:10-06:00 Remove GHC debug dep - - - - - 10519e3d by Finley McIlwaine at 2023-05-15T12:40:48-06:00 Force HIE file path Removes a potential retainer of `ModSummary`s - - - - - 1e4a6ec6 by Finley McIlwaine at 2023-05-15T14:20:34-06:00 Re-add index-state, with-compiler, delete hie.yamls - - - - - a2363fe9 by Hécate Moonlight at 2023-05-15T22:45:16+02:00 Merge pull request haskell/haddock#1594 from FinleyMcIlwaine/finley/ghc-9.6-mem-fixes Reduce memory usage - - - - - e8a78383 by Finley McIlwaine at 2023-05-17T12:19:16-06:00 Merge branch ghc-9.6 into ghc-head - - - - - 22e25581 by Finley McIlwaine at 2023-05-17T12:20:23-06:00 Merge branch 'ghc-head' of gitlab.haskell.org:ghc/haddock into ghc-head - - - - - 41bbf0df by Bartłomiej Cieślar at 2023-05-24T08:57:58+02:00 changes to the WarningTxt cases Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - c686ba9b by Hécate Moonlight at 2023-06-01T14:03:02-06:00 Port the remains of Hi-Haddock - - - - - 9d8a85fd by Hécate Moonlight at 2023-06-01T14:03:06-06:00 Stdout for tests - - - - - 36331d07 by Finley McIlwaine at 2023-06-01T14:06:02-06:00 Formatting, organize imports - - - - - a06059b1 by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix empty context confusion in Convert module - - - - - 379346ae by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix associated type families in Hoogle output - - - - - fc6ea7ed by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix test refs Accept several changes in Hoogle tests: Pretty printing logic no longer prints the `(Proxy (Proxy (...))` chain in Bug806 with parentheses. Since this test was only meant to verify that line breaks do not occur, accept the change. `tyThingToLHsDecl` is called for class and data declarations, which ends up "synifying" the type variables and giving unlifted types kind signatures. As a result, type variables of kind `Type -> Type` are now printed with kind signatures in Hoogle output. This could be changed by manually drop kind signatures from class variables in the Hoogle backend if the behavior is deemed unacceptable. Sometimes subordinate declarations are exported separate from their parent declarations (e.g. record selectors). In this case, a type signature is cobbled together for the export item in `extractDecl`. Since this type signature is very manually constructed, it may lack kind signatures of decls constructed from `tyThingToLHsDecl`. An example of this is the `type-sigs` Hoogle test. Change `*` to `Type` in Hoogle test refs. I don't think this will break Hoogle behavior, since it appears to not consider type signatures in search. I have not fully verified this. - - - - - e14b7e58 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix LaTeX backend test refs Changes to GHC pretty printing code have resulted in some differences to Haddock's LaTeX output. - Type variables are printed explicitly quantified in the LinearTypes test - Wildcard types in type family equations are now printed numbered, e.g. _1 _2, in the TypeFamilies3 test - Combined signatures in DefaultSignatures test are now documented as separate signatures - - - - - 41b5b296 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and test source updates - Stop using kind `*` in html test sources - Add TypeOperators where necessary to avoid warnings and future errors - Rename some test modules to match their module names - - - - - c640e2a2 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix missing deprecation warnings on record fields `lookupOccEnv` was used to resolve `OccNames` with warnings attached, but it doesn't look in the record field namespace. Thus, if a record field had a warning attached, it would not resolve and the warning map would not include it. This commit fixes by using `lookupOccEnv_WithFields` instead. - - - - - fad0c462 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and some comments - - - - - 751fd023 by Finley McIlwaine at 2023-06-01T14:11:41-06:00 Accept HTML test diffs All diffs now boil down to the expected differences resulting from declarations being reified from TyThings in hi-haddock. Surface syntax now has much less control over the syntax used in the documentation. - - - - - d835c845 by Finley McIlwaine at 2023-06-01T14:11:45-06:00 Adapt to new load' type - - - - - dcf776c4 by Finley McIlwaine at 2023-06-01T14:13:13-06:00 Update mkWarningMap and moduleWarning - - - - - 8e8432fd by Finley McIlwaine at 2023-06-01T14:28:54-06:00 Revert load' changes - - - - - aeb2982c by Finley McIlwaine at 2023-06-01T14:40:24-06:00 Accept change to Instances test in html-test Link to Data.Tuple instead of GHC.Tuple.Prim - - - - - 8adfdbac by Finley McIlwaine at 2023-06-01T15:53:17-06:00 Reset ghc dep to ^>= 9.6 - - - - - 2b1ce93d by Finley McIlwaine at 2023-06-06T07:50:04-06:00 Update CHANGES.md, user guide, recomp avoidance * Add --trace-args flag for tracing arguments received to standard output * Avoid recompiling due to changes in optimization flags * Update users guide and changes.md - - - - - f3da6676 by Finley McIlwaine at 2023-06-06T14:12:56-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - bf36c467 by Matthew Pickering at 2023-06-07T10:16:09+01:00 Revert back to e16e20d592a6f5d9ed1af17b77fafd6495242345 Neither of these MRs are ready to land yet which causes issues with other MRs which are ready to land and need haddock changes. - - - - - 421510a9 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 atSign has no unicode variant Prior to this change, atSign was defined as follows: atSign unicode = text (if unicode then "@" else "@") Yes, this is the same symbol '\64' and not your font playing tricks on you. Now we define: atSign = char '@' Both the LaTeX and the Xhtml backend are updated accordingly. - - - - - 3785c276 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 LaTeX: fix printing of type variable bindings Consider this type signature: kindOf :: forall {k} (a :: k). Proxy a -> Proxy k Prior to this fix, the LaTeX backend rendered it like this: kindOf :: forall k a. Proxy a -> Proxy k Now we preserve explicit specificity and kind annotations. - - - - - 0febf3a8 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 Add support for invisible binders in type declarations - - - - - 13e33bb3 by Finley McIlwaine at 2023-06-08T07:51:59-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - 3e5340ce by Finley McIlwaine at 2023-06-08T07:54:27-06:00 Add note about stubdir to recompilation docs - - - - - db7e84dc by Finley at 2023-06-08T08:11:03-06:00 Merge pull request haskell/haddock#1597 from haskell/finley/hi-haddock-9.6 hi-haddock for ghc 9.6 - - - - - 4e085d17 by Finley McIlwaine at 2023-06-14T13:41:06-06:00 Replace SYB traversals - - - - - 7b39aec5 by Finley McIlwaine at 2023-06-14T14:20:17-06:00 Test ref accepts, remove unused HaddockClsInst - - - - - df9c2090 by Finley McIlwaine at 2023-06-15T08:02:51-06:00 Use batchMsg for progress reporting during load With hi-haddock as is, there is an awkward silence during the load operation. This commit makes haddock use the default `batchMsg` Messager for progress reporting, and makes the default GHC verbosity level 1, so the user can see what GHC is doing. - - - - - f23679a8 by Hécate Moonlight at 2023-06-15T20:31:53+02:00 Merge pull request haskell/haddock#1600 from haskell/finley/hi-haddock-optim - - - - - a7982192 by Finley McIlwaine at 2023-06-15T15:02:16-06:00 hi-haddock squashed - - - - - c34f0c8d by Finley McIlwaine at 2023-06-15T16:22:03-06:00 Merge remote-tracking branch 'origin/ghc-9.6' into finley/hi-haddock-squashed - - - - - 40452797 by Bartłomiej Cieślar at 2023-06-16T12:26:04+02:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - e58673bf by Ben Gamari at 2023-06-16T09:33:35-04:00 Bump GHC version to 9.8 - - - - - 74bdf972 by Ben Gamari at 2023-06-16T09:36:18-04:00 Merge commit 'fcaaad06770a26d35d4aafd65772dedadf17669c' into ghc-head - - - - - 418ee3dc by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Remove NFData SourceText, IfaceWarnings updates The NFData SourceText instance is now available in GHC Handle mod_iface mi_warns now being IfaceWarnings - - - - - 62f31380 by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Accept Instances.hs test output Due to ghc!10469. - - - - - a8f2fc0e by Ben Gamari at 2023-06-20T15:48:08-04:00 Test fixes for "Fix associated data family doc structure items" Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - cb1ac33e by Bartłomiej Cieślar at 2023-06-21T12:56:02-04:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 9933e10b by Ben Gamari at 2023-06-21T12:56:02-04:00 Bump GHC version to 9.8 - - - - - fe8c18b6 by Ben Gamari at 2023-06-21T15:36:29-04:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - c61a0d5b by Ben Gamari at 2023-06-21T16:10:51-04:00 Bump GHC version to 9.9 - - - - - 4e1de71c by Ben Gamari at 2023-06-21T21:07:48-04:00 configure: Bump version to 9.9 Bumps haddock submodule. - - - - - 5b6612bc by Ben Gamari at 2023-06-23T03:56:49-04:00 rts: Work around missing prototypes errors Darwin's toolchain inexpliciably claims that `write_barrier` and friends have declarations without prototypes, despite the fact that (a) they are definitions, and (b) the prototypes appear only a few lines above. Work around this by making the definitions proper prototypes. - - - - - 43b66a13 by Matthew Pickering at 2023-06-23T03:57:26-04:00 ghcup-metadata: Fix date modifier (M = minutes, m = month) Fixes #23552 - - - - - 564164ef by Luite Stegeman at 2023-06-24T10:27:29+09:00 Support large stack frames/offsets in GHCi bytecode interpreter Bytecode instructions like PUSH_L (push a local variable) contain an operand that refers to the stack slot. Before this patch, the operand type was SmallOp (Word16), limiting the maximum stack offset to 65535 words. This could cause compiler panics in some cases (See #22888). This patch changes the operand type for stack offsets from SmallOp to Op, removing the stack offset limit. Fixes #22888 - - - - - 8d6574bc by Sylvain Henry at 2023-06-26T13:15:06-04:00 JS: support levity-polymorphic datatypes (#22360,#22291) - thread knowledge about levity into PrimRep instead of panicking - JS: remove assumption that unlifted heap objects are rts objects (TVar#, etc.) Doing this also fixes #22291 (test added). There is a small performance hit (~1% more allocations). Metric Increase: T18698a T18698b - - - - - 5578bbad by Matthew Pickering at 2023-06-26T13:15:43-04:00 MR Review Template: Mention "Blocked on Review" label In order to improve our MR review processes we now have the label "Blocked on Review" which allows people to signal that a MR is waiting on a review to happen. See: https://mail.haskell.org/pipermail/ghc-devs/2023-June/021255.html - - - - - 4427e9cf by Matthew Pickering at 2023-06-26T13:15:43-04:00 Move MR template to Default.md This makes it more obvious what you have to modify to affect the default template rather than looking in the project settings. - - - - - 522bd584 by Arnaud Spiwack at 2023-06-26T13:16:33-04:00 Revert "Avoid desugaring non-recursive lets into recursive lets" This (temporary) reverts commit 3e80c2b40213bebe302b1bd239af48b33f1b30ef. Fixes #23550 - - - - - c59fbb0b by Torsten Schmits at 2023-06-26T19:34:20+02:00 Propagate breakpoint information when inlining across modules Tracking ticket: #23394 MR: !10448 * Add constructor `IfaceBreakpoint` to `IfaceTickish` * Store breakpoint data in interface files * Store `BreakArray` for the breakpoint's module, not the current module, in BCOs * Store module name in BCOs instead of `Unique`, since the `Unique` from an `Iface` doesn't match the modules in GHCi's state * Allocate module name in `ModBreaks`, like `BreakArray` * Lookup breakpoint by module name in GHCi * Skip creating breakpoint instructions when no `ModBreaks` are available, rather than injecting `ModBreaks` in the linker when breakpoints are enabled, and panicking when `ModBreaks` is missing - - - - - 6f904808 by Greg Steuck at 2023-06-27T16:53:07-04:00 Remove undefined FP_PROG_LD_BUILD_ID from configure.ac's - - - - - e89aa072 by Andrei Borzenkov at 2023-06-27T16:53:44-04:00 Remove arity inference in type declarations (#23514) Arity inference in type declarations was introduced as a workaround for the lack of @k-binders. They were added in 4aea0a72040, so I simplified all of this by simply removing arity inference altogether. This is part of GHC Proposal #425 "Invisible binders in type declarations". - - - - - 459dee1b by Torsten Schmits at 2023-06-27T16:54:20-04:00 Relax defaulting of RuntimeRep/Levity when printing Fixes #16468 MR: !10702 Only default RuntimeRep to LiftedRep when variables are bound by the toplevel forall - - - - - 151f8f18 by Torsten Schmits at 2023-06-27T16:54:57-04:00 Remove duplicate link label in linear types docs - - - - - ecdc4353 by Rodrigo Mesquita at 2023-06-28T12:24:57-04:00 Stop configuring unused Ld command in `settings` GHC has no direct dependence on the linker. Rather, we depend upon the C compiler for linking and an object-merging program (which is typically `ld`) for production of GHCi objects and merging of C stubs into final object files. Despite this, for historical reasons we still recorded information about the linker into `settings`. Remove these entries from `settings`, `hadrian/cfg/system.config`, as well as the `configure` logic responsible for this information. Closes #23566. - - - - - bf9ec3e4 by Bryan Richter at 2023-06-28T12:25:33-04:00 Remove extraneous debug output - - - - - 7eb68dd6 by Bryan Richter at 2023-06-28T12:25:33-04:00 Work with unset vars in -e mode - - - - - 49c27936 by Bryan Richter at 2023-06-28T12:25:33-04:00 Pass positional arguments in their positions By quoting $cmd, the default "bash -i" is a single argument to run, and no file named "bash -i" actually exists to be run. - - - - - 887dc4fc by Bryan Richter at 2023-06-28T12:25:33-04:00 Handle unset value in -e context - - - - - 5ffc7d7b by Rodrigo Mesquita at 2023-06-28T21:07:36-04:00 Configure CPP into settings There is a distinction to be made between the Haskell Preprocessor and the C preprocessor. The former is used to preprocess Haskell files, while the latter is used in C preprocessing such as Cmm files. In practice, they are both the same program (usually the C compiler) but invoked with different flags. Previously we would, at configure time, configure the haskell preprocessor and save the configuration in the settings file, but, instead of doing the same for CPP, we had hardcoded in GHC that the CPP program was either `cc -E` or `cpp`. This commit fixes that asymmetry by also configuring CPP at configure time, and tries to make more explicit the difference between HsCpp and Cpp (see Note [Preprocessing invocations]). Note that we don't use the standard CPP and CPPFLAGS to configure Cpp, but instead use the non-standard --with-cpp and --with-cpp-flags. The reason is that autoconf sets CPP to "$CC -E", whereas we expect the CPP command to be configured as a standalone executable rather than a command. These are symmetrical with --with-hs-cpp and --with-hs-cpp-flags. Cleanup: Hadrian no longer needs to pass the CPP configuration for CPP to be C99 compatible through -optP, since we now configure that into settings. Closes #23422 - - - - - 5efa9ca5 by Ben Gamari at 2023-06-28T21:08:13-04:00 hadrian: Always canonicalize topDirectory Hadrian's `topDirectory` is intended to provide an absolute path to the root of the GHC tree. However, if the tree is reached via a symlink this One question here is whether the `canonicalizePath` call is expensive enough to warrant caching. In a quick microbenchmark I observed that `canonicalizePath "."` takes around 10us per call; this seems sufficiently low not to worry. Alternatively, another approach here would have been to rather move the canonicalization into `m4/fp_find_root.m4`. This would have avoided repeated canonicalization but sadly path canonicalization is a hard problem in POSIX shell. Addresses #22451. - - - - - b3e1436f by aadaa_fgtaa at 2023-06-28T21:08:53-04:00 Optimise ELF linker (#23464) - cache last elements of `relTable`, `relaTable` and `symbolTables` in `ocInit_ELF` - cache shndx table in ObjectCode - run `checkProddableBlock` only with debug rts - - - - - 30525b00 by Ben Gamari at 2023-06-28T21:09:30-04:00 compiler: Introduce MO_{ACQUIRE,RELEASE}_FENCE - - - - - b787e259 by Ben Gamari at 2023-06-28T21:09:30-04:00 compiler: Drop MO_WriteBarrier rts: Drop write_barrier - - - - - 7550b4a5 by Ben Gamari at 2023-06-28T21:09:30-04:00 rts: Drop load_store_barrier() This is no longer used. - - - - - d5f2875e by Ben Gamari at 2023-06-28T21:09:31-04:00 rts: Drop last instances of prim_{write,read}_barrier - - - - - 965ac2ba by Ben Gamari at 2023-06-28T21:09:31-04:00 rts: Eliminate remaining uses of load_load_barrier - - - - - 0fc5cb97 by Sven Tennie at 2023-06-28T21:09:31-04:00 compiler: Drop MO_ReadBarrier - - - - - 7a7d326c by Ben Gamari at 2023-06-28T21:09:31-04:00 rts: Drop load_load_barrier This is no longer used. - - - - - 9f63da66 by Sven Tennie at 2023-06-28T21:09:31-04:00 Delete write_barrier function - - - - - bb0ed354 by Ben Gamari at 2023-06-28T21:09:31-04:00 rts: Make collectFreshWeakPtrs definition a prototype x86-64/Darwin's toolchain inexplicably warns that collectFreshWeakPtrs needs to be a prototype. - - - - - ef81a1eb by Sven Tennie at 2023-06-28T21:10:08-04:00 Fix number of free double regs D1..D4 are defined for aarch64 and thus not free. - - - - - c335fb7c by Ryan Scott at 2023-06-28T21:10:44-04:00 Fix typechecking of promoted empty lists The `'[]` case in `tc_infer_hs_type` is smart enough to handle arity-0 uses of `'[]` (see the newly added `T23543` test case for an example), but the `'[]` case in `tc_hs_type` was not. We fix this by changing the `tc_hs_type` case to invoke `tc_infer_hs_type`, as prescribed in `Note [Future-proofing the type checker]`. There are some benign changes to test cases' expected output due to the new code path using `forall a. [a]` as the kind of `'[]` rather than `[k]`. Fixes #23543. - - - - - fcf310e7 by Rodrigo Mesquita at 2023-06-28T21:11:21-04:00 Configure MergeObjs supports response files rather than Ld The previous configuration script to test whether Ld supported response files was * Incorrect (see #23542) * Used, in practice, to check if the *merge objects tool* supported response files. This commit modifies the macro to run the merge objects tool (rather than Ld), using a response file, and checking the result with $NM Fixes #23542 - - - - - 78b2f3cc by Sylvain Henry at 2023-06-28T21:12:02-04:00 JS: fix JS stack printing (#23565) - - - - - 9f01d14b by Matthew Pickering at 2023-06-29T04:13:41-04:00 Add -fpolymorphic-specialisation flag (off by default at all optimisation levels) Polymorphic specialisation has led to a number of hard to diagnose incorrect runtime result bugs (see #23469, #23109, #21229, #23445) so this commit introduces a flag `-fpolymorhphic-specialisation` which allows users to turn on this experimental optimisation if they are willing to buy into things going very wrong. Ticket #23469 - - - - - b1e611d5 by Ben Gamari at 2023-06-29T04:14:17-04:00 Rip out runtime linker/compiler checks We used to choose flags to pass to the toolchain at runtime based on the platform running GHC, and in this commit we drop all of those runtime linker checks Ultimately, this represents a change in policy: We no longer adapt at runtime to the toolchain being used, but rather make final decisions about the toolchain used at /configure time/ (we have deleted Note [Run-time linker info] altogether!). This works towards the goal of having all toolchain configuration logic living in the same place, which facilities the work towards a runtime-retargetable GHC (see #19877). As of this commit, the runtime linker/compiler logic was moved to autoconf, but soon it, and the rest of the existing toolchain configuration logic, will live in the standalone ghc-toolchain program (see !9263) In particular, what used to be done at runtime is now as follows: * The flags -Wl,--no-as-needed for needed shared libs are configured into settings * The flag -fstack-check is configured into settings * The check for broken tables-next-to-code was outdated * We use the configured c compiler by default as the assembler program * We drop `asmOpts` because we already configure -Qunused-arguments flag into settings (see !10589) Fixes #23562 Co-author: Rodrigo Mesquita (@alt-romes) - - - - - 8b35e8ca by Ben Gamari at 2023-06-29T18:46:12-04:00 Define FFI_GO_CLOSURES The libffi shipped with Apple's XCode toolchain does not contain a definition of the FFI_GO_CLOSURES macro, despite containing references to said macro. Work around this by defining the macro, following the model of a similar workaround in OpenJDK [1]. [1] https://github.com/openjdk/jdk17u-dev/pull/741/files - - - - - d7ef1704 by Ben Gamari at 2023-06-29T18:46:12-04:00 base: Fix incorrect CPP guard This was guarded on `darwin_HOST_OS` instead of `defined(darwin_HOST_OS)`. - - - - - 7c7d1f66 by Ben Gamari at 2023-06-29T18:46:48-04:00 rts/Trace: Ensure that debugTrace arguments are used As debugTrace is a macro we must take care to ensure that the fact is clear to the compiler lest we see warnings. - - - - - cb92051e by Ben Gamari at 2023-06-29T18:46:48-04:00 rts: Various warnings fixes - - - - - dec81dd1 by Ben Gamari at 2023-06-29T18:46:48-04:00 hadrian: Ignore warnings in unix and semaphore-compat - - - - - d7f6448a by Matthew Pickering at 2023-06-30T12:38:43-04:00 hadrian: Fix dependencies of docs:* rule For the docs:* rule we need to actually build the package rather than just the haddocks for the dependent packages. Therefore we depend on the .conf files of the packages we are trying to build documentation for as well as the .haddock files. Fixes #23472 - - - - - cec90389 by sheaf at 2023-06-30T12:39:27-04:00 Add tests for #22106 Fixes #22106 - - - - - 083794b1 by Torsten Schmits at 2023-07-03T03:27:27-04:00 Add -fbreak-points to control breakpoint insertion Rather than statically enabling breakpoints only for the interpreter, this adds a new flag. Tracking ticket: #23057 MR: !10466 - - - - - fd8c5769 by Ben Gamari at 2023-07-03T03:28:04-04:00 rts: Ensure that pinned allocations respect block size Previously, it was possible for pinned, aligned allocation requests to allocate beyond the end of the pinned accumulator block. Specifically, we failed to account for the padding needed to achieve the requested alignment in the "large object" check. With large alignment requests, this can result in the allocator using the capability's pinned object accumulator block to service a request which is larger than `PINNED_EMPTY_SIZE`. To fix this we reorganize `allocatePinned` to consistently account for the alignment padding in all large object checks. This is a bit subtle as we must handle the case of a small allocation request filling the accumulator block, as well as large requests. Fixes #23400. - - - - - 98185d52 by Ben Gamari at 2023-07-03T03:28:05-04:00 testsuite: Add test for #23400 - - - - - 4aac0540 by Ben Gamari at 2023-07-03T03:28:42-04:00 ghc-heap: Support for BLOCKING_QUEUE closures - - - - - 03f941f4 by Ben Bellick at 2023-07-03T03:29:29-04:00 Add some structured diagnostics in Tc/Validity.hs This addresses the work of ticket #20118 Created the following constructors for TcRnMessage - TcRnInaccessibleCoAxBranch - TcRnPatersonCondFailure - - - - - 6074cc3c by Moisés Ackerman at 2023-07-03T03:30:13-04:00 Add failing test case for #23492 - - - - - 356a2692 by Moisés Ackerman at 2023-07-03T03:30:13-04:00 Use generated src span for catch-all case of record selector functions This fixes #23492. The problem was that we used the real source span of the field declaration for the generated catch-all case in the selector function, in particular in the generated call to `recSelError`, which meant it was included in the HIE output. Using `generatedSrcSpan` instead means that it is not included. - - - - - 3efe7f39 by Moisés Ackerman at 2023-07-03T03:30:13-04:00 Introduce genLHsApp and genLHsLit helpers in GHC.Rename.Utils - - - - - dd782343 by Moisés Ackerman at 2023-07-03T03:30:13-04:00 Construct catch-all default case using helpers GHC.Rename.Utils concrete helpers instead of wrapGenSpan + HS AST constructors - - - - - 0e09c38e by Ryan Hendrickson at 2023-07-03T03:30:56-04:00 Add regression test for #23549 - - - - - 32741743 by Alexis King at 2023-07-03T03:31:36-04:00 perf tests: Increase default stack size for MultiLayerModules An unhelpfully small stack size appears to have been the real culprit behind the metric fluctuations in #19293. Debugging metric decreases triggered by !10729 helped to finally identify the problem. Metric Decrease: MultiLayerModules MultiLayerModulesTH_Make T13701 T14697 - - - - - 82ac6bf1 by Bryan Richter at 2023-07-03T03:32:15-04:00 Add missing void prototypes to rts functions See #23561. - - - - - 6078b429 by Ben Gamari at 2023-07-03T03:32:51-04:00 gitlab-ci: Refactor compilation of gen_ci Flakify and document it, making it far less sensitive to the build environment. - - - - - aa2db0ae by Ben Gamari at 2023-07-03T03:33:29-04:00 testsuite: Update documentation - - - - - 924a2362 by Gregory Gerasev at 2023-07-03T03:34:10-04:00 Better error for data deriving of type synonym/family. Closes #23522 - - - - - 4457da2a by Dave Barton at 2023-07-03T03:34:51-04:00 Fix some broken links and typos - - - - - de5830d0 by Ben Gamari at 2023-07-04T22:03:59-04:00 configure: Rip out Solaris dyld check Solaris 11 was released over a decade ago and, moreover, I doubt we have any Solaris users - - - - - 59c5fe1d by doyougnu at 2023-07-04T22:04:56-04:00 CI: add JS release and debug builds, regen CI jobs - - - - - 679bbc97 by Vladislav Zavialov at 2023-07-04T22:05:32-04:00 testsuite: Do not require CUSKs Numerous tests make use of CUSKs (complete user-supplied kinds), a legacy feature scheduled for deprecation. In order to proceed with the said deprecation, the tests have been updated to use SAKS instead (standalone kind signatures). This also allows us to remove the Haskell2010 language pragmas that were added in 115cd3c85a8 to work around the lack of CUSKs in GHC2021. - - - - - 945d3599 by Ben Gamari at 2023-07-04T22:06:08-04:00 gitlab: Drop backport-for-8.8 MR template Its usefulness has long passed. - - - - - 66c721d3 by Alan Zimmerman at 2023-07-04T22:06:44-04:00 EPA: Simplify GHC/Parser.y comb2 Use the HasLoc instance from Ast.hs to allow comb2 to work with anything with a SrcSpan This gets rid of the custom comb2A, comb2Al, comb2N functions, and removes various reLoc calls. - - - - - 2be99b7e by Matthew Pickering at 2023-07-04T22:07:21-04:00 Fix deprecation warning when deprecated identifier is from another module A stray 'Just' was being printed in the deprecation message. Fixes #23573 - - - - - 46c9bcd6 by Ben Gamari at 2023-07-04T22:07:58-04:00 rts: Don't rely on initializers for sigaction_t As noted in #23577, CentOS's ancient toolchain throws spurious missing-field-initializer warnings. - - - - - ec55035f by Ben Gamari at 2023-07-04T22:07:58-04:00 hadrian: Don't treat -Winline warnings as fatal Such warnings are highly dependent upon the toolchain, platform, and build configuration. It's simply too fragile to rely on these. - - - - - 3a09b789 by Ben Gamari at 2023-07-04T22:07:58-04:00 hadrian: Only pass -Wno-nonportable-include-path on Darwin This flag, which was introduced due to #17798, is only understood by Clang and consequently throws warnings on platforms using gcc. Sadly, there is no good way to treat such warnings as non-fatal with `-Werror` so for now we simply make this flag specific to platforms known to use Clang and case-insensitive filesystems (Darwin and Windows). See #23577. - - - - - 4af7eac2 by Mario Blažević at 2023-07-04T22:08:38-04:00 Fixed ticket #23571, TH.Ppr.pprLit hanging on large numeric literals - - - - - 2304c697 by Ben Gamari at 2023-07-04T22:09:15-04:00 compiler: Make OccSet opaque - - - - - cf735db8 by Andrei Borzenkov at 2023-07-04T22:09:51-04:00 Add Note about why we need forall in Code to be on the right - - - - - fb140f82 by Hécate Moonlight at 2023-07-04T22:10:34-04:00 Relax the constraint about the foreign function's calling convention of FinalizerPtr to capi as well as ccall. - - - - - 9ce44336 by meooow25 at 2023-07-05T11:42:37-04:00 Improve the situation with the stimes cycle Currently the Semigroup stimes cycle is resolved in GHC.Base by importing stimes implementations from a hs-boot file. Resolve the cycle using hs-boot files for required classes (Num, Integral) instead. Now stimes can be defined directly in GHC.Base, making inlining and specialization possible. This leads to some new boot files for `GHC.Num` and `GHC.Real`, the methods for those are only used to implement `stimes` so it doesn't appear that these boot files will introduce any new performance traps. Metric Decrease: T13386 T8095 Metric Increase: T13253 T13386 T18698a T18698b T19695 T8095 - - - - - 9edcb1fb by Jaro Reinders at 2023-07-05T11:43:24-04:00 Refactor Unique to be represented by Word64 In #22010 we established that Int was not always sufficient to store all the uniques we generate during compilation on 32-bit platforms. This commit addresses that problem by using Word64 instead of Int for uniques. The core of the change is in GHC.Core.Types.Unique and GHC.Core.Types.Unique.Supply. However, the representation of uniques is used in many other places, so those needed changes too. Additionally, the RTS has been extended with an atomic_inc64 operation. One major change from this commit is the introduction of the Word64Set and Word64Map data types. These are adapted versions of IntSet and IntMap from the containers package. These are planned to be upstreamed in the future. As a natural consequence of these changes, the compiler will be a bit slower and take more space on 32-bit platforms. Our CI tests indicate around a 5% residency increase. Metric Increase: CoOpt_Read CoOpt_Singletons LargeRecord ManyAlternatives ManyConstructors MultiComponentModules MultiComponentModulesRecomp MultiLayerModulesTH_OneShot RecordUpdPerf T10421 T10547 T12150 T12227 T12234 T12425 T12707 T13035 T13056 T13253 T13253-spj T13379 T13386 T13719 T14683 T14697 T14766 T15164 T15703 T16577 T16875 T17516 T18140 T18223 T18282 T18304 T18698a T18698b T18923 T1969 T19695 T20049 T21839c T3064 T3294 T4801 T5030 T5321FD T5321Fun T5631 T5642 T5837 T6048 T783 T8095 T9020 T9198 T9233 T9630 T9675 T9872a T9872b T9872b_defer T9872c T9872d T9961 TcPlugin_RewritePerf UniqLoop WWRec hard_hole_fits - - - - - 6b9db7d4 by Brandon Chinn at 2023-07-05T11:44:03-04:00 Fix docs for __GLASGOW_HASKELL_FULL_VERSION__ macro - - - - - 40f4ef7c by Torsten Schmits at 2023-07-05T18:06:19-04:00 Substitute free variables captured by breakpoints in SpecConstr Fixes #23267 - - - - - 2b55cb5f by sheaf at 2023-07-05T18:07:07-04:00 Reinstate untouchable variable error messages This extra bit of information was accidentally being discarded after a refactoring of the way we reported problems when unifying a type variable with another type. This patch rectifies that. - - - - - 53ed21c5 by Rodrigo Mesquita at 2023-07-05T18:07:47-04:00 configure: Drop Clang command from settings Due to 01542cb7227614a93508b97ecad5b16dddeb6486 we no longer use the `runClang` function, and no longer need to configure into settings the Clang command. We used to determine options at runtime to pass clang when it was used as an assembler, but now that we configure at configure time we no longer need to. - - - - - 6fdcf969 by Torsten Schmits at 2023-07-06T12:12:09-04:00 Filter out nontrivial substituted expressions in substTickish Fixes #23272 - - - - - 41968fd6 by Sylvain Henry at 2023-07-06T12:13:02-04:00 JS: testsuite: use req_c predicate instead of js_broken - - - - - 74a4dd2e by Sylvain Henry at 2023-07-06T12:13:02-04:00 JS: implement some file primitives (lstat,rmdir) (#22374) - Implement lstat and rmdir. - Implement base_c_s_is* functions (testing a file type) - Enable passing tests - - - - - 7e759914 by Sylvain Henry at 2023-07-07T02:39:38-04:00 JS: cleanup utils (#23314) - Removed unused code - Don't export unused functions - Move toTypeList to Closure module - - - - - f617655c by Sylvain Henry at 2023-07-07T02:39:38-04:00 JS: rename VarType/Vt into JSRep - - - - - 19216ca5 by Sylvain Henry at 2023-07-07T02:39:38-04:00 JS: remove custom PrimRep conversion (#23314) We use the usual conversion to PrimRep and then we convert these PrimReps to JSReps. - - - - - d3de8668 by Sylvain Henry at 2023-07-07T02:39:38-04:00 JS: don't use isRuntimeRepKindedTy in JS FFI - - - - - 8d1b75cb by Matthew Pickering at 2023-07-07T02:40:15-04:00 ghcup-metadata: Also updates ghcup-nightlies-0.0.7.yaml file Fixes #23600 - - - - - e524fa7f by Matthew Pickering at 2023-07-07T02:40:15-04:00 ghcup-metadata: Use dynamically linked alpine bindists In theory these will work much better on alpine to allow people to build statically linked applications there. We don't need to distribute a statically linked application ourselves in order to allow that. Fixes #23602 - - - - - 0c2a756e by sheaf at 2023-07-07T13:45:12+02:00 Avoid incomplete record update in Haddock Hoogle This commit avoids running into an incomplete record update warning in the Hoogle backend of Haddock. This was only noticed now, because incomplete record updates were broken in GHC 9.6. Now that they are fixed, we have to avoid running into them! - - - - - b9e7beb9 by Ben Gamari at 2023-07-07T11:32:22-04:00 Drop circle-ci-job.sh - - - - - 9955eead by Ben Gamari at 2023-07-07T11:32:22-04:00 testsuite: Allow preservation of unexpected output Here we introduce a new flag to the testsuite driver, --unexpected-output-dir=<dir>, which allows the user to ask the driver to preserve unexpected output from tests. The intent is for this to be used in CI to allow users to more easily fix unexpected platform-dependent output. - - - - - 48f80968 by Ben Gamari at 2023-07-07T11:32:22-04:00 gitlab-ci: Preserve unexpected output Here we enable use of the testsuite driver's `--unexpected-output-dir` flag by CI, preserving the result as an artifact for use by users. - - - - - 76983a0d by Matthew Pickering at 2023-07-07T11:32:58-04:00 driver: Fix -S with .cmm files There was an oversight in the driver which assumed that you would always produce a `.o` file when compiling a .cmm file. Fixes #23610 - - - - - 6df15e93 by Mike Pilgrem at 2023-07-07T11:33:40-04:00 Update Hadrian's stack.yaml - - - - - 1dff43cf by Ben Gamari at 2023-07-08T05:05:37-04:00 compiler: Rework ShowSome Previously the field used to filter the sub-declarations to show was rather ad-hoc and was only able to show at most one sub-declaration. - - - - - 8165404b by Ben Gamari at 2023-07-08T05:05:37-04:00 testsuite: Add test to catch changes in core libraries This adds testing infrastructure to ensure that changes in core libraries (e.g. `base` and `ghc-prim`) are caught in CI. - - - - - ec1c32e2 by Melanie Phoenix at 2023-07-08T05:06:14-04:00 Deprecate Data.List.NonEmpty.unzip - - - - - 5d2442b8 by Ben Gamari at 2023-07-08T05:06:51-04:00 Drop latent mentions of -split-objs Closes #21134. - - - - - a9bc20cb by Oleg Grenrus at 2023-07-08T05:07:31-04:00 Add warn_and_run test kind This is a compile_and_run variant which also captures the GHC's stderr. The warn_and_run name is best I can come up with, as compile_and_run is taken. This is useful specifically for testing warnings. We want to test that when warning triggers, and it's not a false positive, i.e. that the runtime behaviour is indeed "incorrect". As an example a single test is altered to use warn_and_run - - - - - c7026962 by Ben Gamari at 2023-07-08T05:08:11-04:00 configure: Don't use ld.gold on i386 ld.gold appears to produce invalid static constructor tables on i386. While ideally we would add an autoconf check to check for this brokenness, sadly such a check isn't easy to compose. Instead to summarily reject such linkers on i386. Somewhat hackily closes #23579. - - - - - 054261dd by Andrew Lelechenko at 2023-07-08T19:32:47-04:00 Add since annotations for Data.Foldable1 - - - - - 550af505 by Sylvain Henry at 2023-07-08T19:33:28-04:00 JS: support -this-unit-id for programs in the linker (#23613) - - - - - d284470a by Andrew Lelechenko at 2023-07-08T19:34:08-04:00 Bump text submodule - - - - - 8e11630e by jade at 2023-07-10T16:58:40-04:00 Add a hint to enable ExplicitNamespaces for type operator imports (Fixes/Enhances #20007) As suggested in #20007 and implemented in !8895, trying to import type operators will suggest a fix to use the 'type' keyword, without considering whether ExplicitNamespaces is enabled. This patch will query whether ExplicitNamespaces is enabled and add a hint to suggest enabling ExplicitNamespaces if it isn't enabled, alongside the suggestion of adding the 'type' keyword. - - - - - 61b1932e by sheaf at 2023-07-10T16:59:26-04:00 tyThingLocalGREs: include all DataCons for RecFlds The GREInfo for a record field should include the collection of all the data constructors of the parent TyCon that have this record field. This information was being incorrectly computed in the tyThingLocalGREs function for a DataCon, as we were not taking into account other DataCons with the same parent TyCon. Fixes #23546 - - - - - e6627cbd by Alan Zimmerman at 2023-07-10T17:00:05-04:00 EPA: Simplify GHC/Parser.y comb3 A follow up to !10743 - - - - - ee20da34 by Andrew Lelechenko at 2023-07-10T17:01:01-04:00 Document that compareByteArrays# is available since ghc-prim-0.5.2.0 - - - - - 4926af7b by Matthew Pickering at 2023-07-10T17:01:38-04:00 Revert "Bump text submodule" This reverts commit d284470a77042e6bc17bdb0ab0d740011196958a. This commit requires that we bootstrap with ghc-9.4, which we do not require until #23195 has been completed. Subsequently this has broken nighty jobs such as the rocky8 job which in turn has broken nightly releases. - - - - - d1c92bf3 by Ben Gamari at 2023-07-11T08:07:02-04:00 compiler: Fingerprint more code generation flags Previously our recompilation check was quite inconsistent in its coverage of non-optimisation code generation flags. Specifically, we failed to account for most flags that would affect the behavior of generated code in ways that might affect the result of a program's execution (e.g. `-feager-blackholing`, `-fstrict-dicts`) Closes #23369. - - - - - eb623149 by Ben Gamari at 2023-07-11T08:07:02-04:00 compiler: Record original thunk info tables on stack Here we introduce a new code generation option, `-forig-thunk-info`, which ensures that an `stg_orig_thunk_info` frame is pushed before every update frame. This can be invaluable when debugging thunk cycles and similar. See Note [Original thunk info table frames] for details. Closes #23255. - - - - - 4731f44e by Jaro Reinders at 2023-07-11T08:07:40-04:00 Fix wrong MIN_VERSION_GLASGOW_HASKELL macros I forgot to change these after rebasing. - - - - - dd38aca9 by Andreas Schwab at 2023-07-11T13:55:56+00:00 Hadrian: enable GHCi support on riscv64 - - - - - 09a5c6cc by Josh Meredith at 2023-07-12T11:25:13-04:00 JavaScript: support unicode code points > 2^16 in toJSString using String.fromCodePoint (#23628) - - - - - 29fbbd4e by Matthew Pickering at 2023-07-12T11:25:49-04:00 Remove references to make build system in mk/build.mk Fixes #23636 - - - - - 630e3026 by sheaf at 2023-07-12T11:26:43-04:00 Valid hole fits: don't panic on a Given The function GHC.Tc.Errors.validHoleFits would end up panicking when encountering a Given constraint. To fix this, it suffices to filter out the Givens before continuing. Fixes #22684 - - - - - c39f279b by Matthew Pickering at 2023-07-12T23:18:38-04:00 Use deb10 for i386 bindists deb9 is now EOL so it's time to upgrade the i386 bindist to use deb10 Fixes #23585 - - - - - bf9b9de0 by Krzysztof Gogolewski at 2023-07-12T23:19:15-04:00 Fix #23567, a specializer bug Found by Simon in https://gitlab.haskell.org/ghc/ghc/-/issues/23567#note_507834 The testcase isn't ideal because it doesn't detect the bug in master, unless doNotUnbox is removed as in https://gitlab.haskell.org/ghc/ghc/-/issues/23567#note_507692. But I have confirmed that with that modification, it fails before and passes afterwards. - - - - - 84c1a4a2 by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00 Comments - - - - - b2846cb5 by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00 updates to comments - - - - - 2af23f0e by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00 changes - - - - - 6143838a by sheaf at 2023-07-13T08:02:17-04:00 Fix deprecation of record fields Commit 3f374399 inadvertently broke the deprecation/warning mechanism for record fields due to its introduction of record field namespaces. This patch ensures that, when a top-level deprecation is applied to an identifier, it applies to all the record fields as well. This is achieved by refactoring GHC.Rename.Env.lookupLocalTcNames, and GHC.Rename.Env.lookupBindGroupOcc, to not look up a fixed number of NameSpaces but to look up all NameSpaces and filter out the irrelevant ones. - - - - - 6fd8f566 by sheaf at 2023-07-13T08:02:17-04:00 Introduce greInfo, greParent These are simple helper functions that wrap the internal field names gre_info, gre_par. - - - - - 7f0a86ed by sheaf at 2023-07-13T08:02:17-04:00 Refactor lookupGRE_... functions This commit consolidates all the logic for looking up something in the Global Reader Environment into the single function lookupGRE. This allows us to declaratively specify all the different modes of looking up in the GlobalRdrEnv, and avoids manually passing around filtering functions as was the case in e.g. the function GHC.Rename.Env.lookupSubBndrOcc_helper. ------------------------- Metric Decrease: T8095 ------------------------- ------------------------- Metric Increase: T8095 ------------------------- - - - - - 5e951395 by Rodrigo Mesquita at 2023-07-13T08:02:54-04:00 configure: Drop DllWrap command We used to configure into settings a DllWrap command for windows builds and distributions, however, we no longer do, and dllwrap is effectively unused. This simplification is motivated in part by the larger toolchain-selection project (#19877, !9263) - - - - - e10556b6 by Teo Camarasu at 2023-07-14T16:28:46-04:00 base: fix haddock syntax in GHC.Profiling - - - - - 0f3fda81 by Matthew Pickering at 2023-07-14T16:29:23-04:00 Revert "CI: add JS release and debug builds, regen CI jobs" This reverts commit 59c5fe1d4b624423b1c37891710f2757bb58d6af. This commit added two duplicate jobs on all validate pipelines, so we are reverting for now whilst we work out what the best way forward is. Ticket #23618 - - - - - 54bca324 by Alan Zimmerman at 2023-07-15T03:23:26-04:00 EPA: Simplify GHC/Parser.y sLL Follow up to !10743 - - - - - c8863828 by sheaf at 2023-07-15T03:24:06-04:00 Configure: canonicalise PythonCmd on Windows This change makes PythonCmd resolve to a canonical absolute path on Windows, which prevents HLS getting confused (now that we have a build-time dependency on python). fixes #23652 - - - - - ca1e636a by Rodrigo Mesquita at 2023-07-15T03:24:42-04:00 Improve Note [Binder-swap during float-out] - - - - - cf86f3ec by Matthew Craven at 2023-07-16T01:42:09+02:00 Equality of forall-types is visibility aware This patch finally (I hope) nails the question of whether (forall a. ty) and (forall a -> ty) are `eqType`: they aren't! There is a long discussion in #22762, plus useful Notes: * Note [ForAllTy and type equality] in GHC.Core.TyCo.Compare * Note [Comparing visiblities] in GHC.Core.TyCo.Compare * Note [ForAllCo] in GHC.Core.TyCo.Rep It also establishes a helpful new invariant for ForAllCo, and ForAllTy, when the bound variable is a CoVar:in that case the visibility must be coreTyLamForAllTyFlag. All this is well documented in revised Notes. - - - - - 7f13acbf by Vladislav Zavialov at 2023-07-16T01:56:27-04:00 List and Tuple<n>: update documentation Add the missing changelog.md entries and @since-annotations. - - - - - 2afbddb0 by Andrei Borzenkov at 2023-07-16T10:21:24+04:00 Type patterns (#22478, #18986) Improved name resolution and type checking of type patterns in constructors: 1. HsTyPat: a new dedicated data type that represents type patterns in HsConPatDetails instead of reusing HsPatSigType 2. rnHsTyPat: a new function that renames a type pattern and collects its binders into three groups: - explicitly bound type variables, excluding locally bound variables - implicitly bound type variables from kind signatures (only if ScopedTypeVariables are enabled) - named wildcards (only from kind signatures) 2a. rnHsPatSigTypeBindingVars: removed in favour of rnHsTyPat 2b. rnImplcitTvBndrs: removed because no longer needed 3. collect_pat: updated to collect type variable binders from type patterns (this means that types and terms use the same infrastructure to detect conflicting bindings, unused variables and name shadowing) 3a. CollVarTyVarBinders: a new CollectFlag constructor that enables collection of type variables 4. tcHsTyPat: a new function that typechecks type patterns, capable of handling polymorphic kinds. See Note [Type patterns: binders and unifiers] Examples of code that is now accepted: f = \(P @a) -> \(P @a) -> ... -- triggers -Wname-shadowing g :: forall a. Proxy a -> ... g (P @a) = ... -- also triggers -Wname-shadowing h (P @($(TH.varT (TH.mkName "t")))) = ... -- t is bound at splice time j (P @(a :: (x,x))) = ... -- (x,x) is no longer rejected data T where MkT :: forall (f :: forall k. k -> Type). f Int -> f Maybe -> T k :: T -> () k (MkT @f (x :: f Int) (y :: f Maybe)) = () -- f :: forall k. k -> Type Examples of code that is rejected with better error messages: f (Left @a @a _) = ... -- new message: -- • Conflicting definitions for ‘a’ -- Bound at: Test.hs:1:11 -- Test.hs:1:14 Examples of code that is now rejected: {-# OPTIONS_GHC -Werror=unused-matches #-} f (P @a) = () -- Defined but not used: type variable ‘a’ - - - - - eb1a6ab1 by sheaf at 2023-07-16T09:20:45-04:00 Don't use substTyUnchecked in newMetaTyVar There were some comments that explained that we needed to use an unchecked substitution function because of issue #12931, but that has since been fixed, so we should be able to use substTy instead now. - - - - - c7bbad9a by sheaf at 2023-07-17T02:48:19-04:00 rnImports: var shouldn't import NoFldSelectors In an import declaration such as import M ( var ) the import of the variable "var" should **not** bring into scope record fields named "var" which are defined with NoFieldSelectors. Doing so can cause spurious "unused import" warnings, as reported in ticket #23557. Fixes #23557 - - - - - 1af2e773 by sheaf at 2023-07-17T02:48:19-04:00 Suggest similar names in imports This commit adds similar name suggestions when importing. For example module A where { spelling = 'o' } module B where { import B ( speling ) } will give rise to the error message: Module ‘A’ does not export ‘speling’. Suggested fix: Perhaps use ‘spelling’ This also provides hints when users try to import record fields defined with NoFieldSelectors. - - - - - 654fdb98 by Alan Zimmerman at 2023-07-17T02:48:55-04:00 EPA: Store leading AnnSemi for decllist in al_rest This simplifies the markAnnListA implementation in ExactPrint - - - - - 22565506 by sheaf at 2023-07-17T21:12:59-04:00 base: add COMPLETE pragma to BufferCodec PatSyn This implements CLC proposal #178, rectifying an oversight in the implementation of CLC proposal #134 which could lead to spurious pattern match warnings. https://github.com/haskell/core-libraries-committee/issues/178 https://github.com/haskell/core-libraries-committee/issues/134 - - - - - 860f6269 by sheaf at 2023-07-17T21:13:00-04:00 exactprint: silence incomplete record update warnings - - - - - df706de3 by sheaf at 2023-07-17T21:13:00-04:00 Re-instate -Wincomplete-record-updates Commit e74fc066 refactored the handling of record updates to use the HsExpanded mechanism. This meant that the pattern matching inherent to a record update was considered to be "generated code", and thus we stopped emitting "incomplete record update" warnings entirely. This commit changes the "data Origin = Source | Generated" datatype, adding a field to the Generated constructor to indicate whether we still want to perform pattern-match checking. We also have to do a bit of plumbing with HsCase, to record that the HsCase arose from an HsExpansion of a RecUpd, so that the error message continues to mention record updates as opposed to a generic "incomplete pattern matches in case" error. Finally, this patch also changes the way we handle inaccessible code warnings. Commit e74fc066 was also a regression in this regard, as we were emitting "inaccessible code" warnings for case statements spuriously generated when desugaring a record update (remember: the desugaring mechanism happens before typechecking; it thus can't take into account e.g. GADT information in order to decide which constructors to include in the RHS of the desugaring of the record update). We fix this by changing the mechanism through which we disable inaccessible code warnings: we now check whether we are in generated code in GHC.Tc.Utils.TcMType.newImplication in order to determine whether to emit inaccessible code warnings. Fixes #23520 Updates haddock submodule, to avoid incomplete record update warnings - - - - - 1d05971e by sheaf at 2023-07-17T21:13:00-04:00 Propagate long-distance information in do-notation The preceding commit re-enabled pattern-match checking inside record updates. This revealed that #21360 was in fact NOT fixed by e74fc066. This commit makes sure we correctly propagate long-distance information in do blocks, e.g. in ```haskell data T = A { fld :: Int } | B f :: T -> Maybe T f r = do a at A{} <- Just r Just $ case a of { A _ -> A 9 } ``` we need to propagate the fact that "a" is headed by the constructor "A" to see that the case expression "case a of { A _ -> A 9 }" cannot fail. Fixes #21360 - - - - - bea0e323 by sheaf at 2023-07-17T21:13:00-04:00 Skip PMC for boring patterns Some patterns introduce no new information to the pattern-match checker (such as plain variable or wildcard patterns). We can thus skip doing any pattern-match checking on them when the sole purpose for doing so was introducing new long-distance information. See Note [Boring patterns] in GHC.Hs.Pat. Doing this avoids regressing in performance now that we do additional pattern-match checking inside do notation. - - - - - ddcdd88c by Rodrigo Mesquita at 2023-07-17T21:13:36-04:00 Split GHC.Platform.ArchOS from ghc-boot into ghc-platform Split off the `GHC.Platform.ArchOS` module from the `ghc-boot` package into this reinstallable standalone package which abides by the PVP, in part motivated by the ongoing work on `ghc-toolchain` towards runtime retargetability. - - - - - b55a8ea7 by Sylvain Henry at 2023-07-17T21:14:27-04:00 JS: better implementation for plusWord64 (#23597) - - - - - 889c2bbb by sheaf at 2023-07-18T06:37:32-04:00 Do primop rep-poly checks when instantiating This patch changes how we perform representation-polymorphism checking for primops (and other wired-in Ids such as coerce). When instantiating the primop, we check whether each type variable is required to instantiated to a concrete type, and if so we create a new concrete metavariable (a ConcreteTv) instead of a simple MetaTv. (A little subtlety is the need to apply the substitution obtained from instantiating to the ConcreteTvOrigins, see Note [substConcreteTvOrigin] in GHC.Tc.Utils.TcMType.) This allows us to prevent representation-polymorphism in non-argument position, as that is required for some of these primops. We can also remove the logic in tcRemainingValArgs, except for the part concerning representation-polymorphic unlifted newtypes. The function has been renamed rejectRepPolyNewtypes; all it does now is reject unsaturated occurrences of representation-polymorphic newtype constructors when the representation of its argument isn't a concrete RuntimeRep (i.e. still a PHASE 1 FixedRuntimeRep check). The Note [Eta-expanding rep-poly unlifted newtypes] in GHC.Tc.Gen.Head gives more explanation about a possible path to PHASE 2, which would be in line with the treatment for primops taken in this patch. We also update the Core Lint check to handle this new framework. This means Core Lint now checks representation-polymorphism in continuation position like needed for catch#. Fixes #21906 ------------------------- Metric Increase: LargeRecord ------------------------- - - - - - 00648e5d by Krzysztof Gogolewski at 2023-07-18T06:38:10-04:00 Core Lint: distinguish let and letrec in locations Lint messages were saying "in the body of letrec" even for non-recursive let. I've also renamed BodyOfLetRec to BodyOfLet in stg, since there's no separate letrec. - - - - - 787bae96 by Krzysztof Gogolewski at 2023-07-18T06:38:50-04:00 Use extended literals when deriving Show This implements GHC proposal https://github.com/ghc-proposals/ghc-proposals/pull/596 Also add support for Int64# and Word64#; see testcase ShowPrim. - - - - - 257f1567 by Jaro Reinders at 2023-07-18T06:39:29-04:00 Add StgFromCore and StgCodeGen linting - - - - - 34d08a20 by Ben Gamari at 2023-07-19T03:33:22-04:00 Reg.Liveness: Strictness - - - - - c5deaa27 by Ben Gamari at 2023-07-19T03:33:22-04:00 Reg.Liveness: Don't repeatedly construct UniqSets - - - - - b947250b by Ben Gamari at 2023-07-19T03:33:22-04:00 compiler/Types: Ensure that fromList-type operations can fuse In #20740 I noticed that mkUniqSet does not fuse. In practice, allowing it to do so makes a considerable difference in allocations due to the backend. Metric Decrease: T12707 T13379 T3294 T4801 T5321FD T5321Fun T783 - - - - - 6c88c2ba by Sven Tennie at 2023-07-19T03:33:59-04:00 x86 Codegen: Implement MO_S_MulMayOflo for W16 - - - - - 5f1154e0 by Sven Tennie at 2023-07-19T03:33:59-04:00 x86 CodeGen: MO_S_MulMayOflo better error message for rep > W64 It's useful to see which value made the pattern match fail. (If it ever occurs.) - - - - - e8c9a95f by Sven Tennie at 2023-07-19T03:33:59-04:00 x86 CodeGen: Implement MO_S_MulMayOflo for W8 This case wasn't handled before. But, the test-primops test suite showed that it actually might appear. - - - - - a36f9dc9 by Sven Tennie at 2023-07-19T03:33:59-04:00 Add test for %mulmayoflo primop The test expects a perfect implementation with no false positives. - - - - - 38a36248 by Matthew Pickering at 2023-07-19T03:34:36-04:00 lint-ci-config: Generate jobs-metadata.json We also now save the jobs-metadata.json and jobs.yaml file as artifacts as: * It might be useful for someone who is modifying CI to copy jobs.yaml if they are having trouble regenerating locally. * jobs-metadata.json is very useful for downstream pipelines to work out the right job to download. Fixes #23654 - - - - - 1535a671 by Vladislav Zavialov at 2023-07-19T03:35:12-04:00 Initialize 9.10.1-notes.rst Create new release notes for the next GHC release (GHC 9.10) - - - - - 3bd4d5b5 by sheaf at 2023-07-19T03:35:53-04:00 Prioritise Parent when looking up class sub-binder When we look up children GlobalRdrElts of a given Parent, we sometimes would rather prioritise those GlobalRdrElts which have the right Parent, and sometimes prioritise those that have the right NameSpace: - in export lists, we should prioritise NameSpace - for class/instance binders, we should prioritise Parent See Note [childGREPriority] in GHC.Types.Name.Reader. fixes #23664 - - - - - 9c8fdda3 by Alan Zimmerman at 2023-07-19T03:36:29-04:00 EPA: Improve annotation management in getMonoBind Ensure the LHsDecl for a FunBind has the correct leading comments and trailing annotations. See the added note for details. - - - - - ff884b77 by Matthew Pickering at 2023-07-19T11:42:02+01:00 Remove unused files in .gitlab These were left over after 6078b429 - - - - - 29ef590c by Matthew Pickering at 2023-07-19T11:42:52+01:00 gen_ci: Add hie.yaml file This allows you to load `gen_ci.hs` into HLS, and now it is a huge module, that is quite useful. - - - - - 808b55cf by Matthew Pickering at 2023-07-19T12:24:41+01:00 ci: Make "fast-ci" the default validate configuration We are trying out a lighter weight validation pipeline where by default we just test on 5 platforms: * x86_64-deb10-slow-validate * windows * x86_64-fedora33-release * aarch64-darwin * aarch64-linux-deb10 In order to enable the "full" validation pipeline you can apply the `full-ci` label which will enable all the validation pipelines. All the validation jobs are still run on a marge batch. The goal is to reduce the overall CI capacity so that pipelines start faster for MRs and marge bot batches are faster. Fixes #23694 - - - - - 0b23db03 by Alan Zimmerman at 2023-07-20T05:28:47-04:00 EPA: Simplify GHC/Parser.y sL1 This is the next patch in a series simplifying location management in GHC/Parser.y This one simplifies sL1, to use the HasLoc instances introduced in !10743 (closed) - - - - - 3ece9856 by Ben Gamari at 2023-07-21T07:30:45-04:00 nativeGen: Explicitly set flags of text sections on Windows The binutils documentation (for COFF) claims, > If no flags are specified, the default flags depend upon the section > name. If the section name is not recognized, the default will be for the > section to be loaded and writable. We previously assumed that this would do the right thing for split sections (e.g. a section named `.text$foo` would be correctly inferred to be a text section). However, we have observed that this is not the case (at least under the clang toolchain used on Windows): when split-sections is enabled, text sections are treated by the assembler as data (matching the "default" behavior specified by the documentation). Avoid this by setting section flags explicitly. This should fix split sections on Windows. Fixes #22834. - - - - - db7f7240 by Ben Gamari at 2023-07-21T07:30:45-04:00 nativeGen: Set explicit section types on all platforms - - - - - b444c16f by Finley McIlwaine at 2023-07-21T07:31:28-04:00 Insert documentation into parsed signature modules Causes haddock comments in signature modules to be properly inserted into the AST (just as they are for regular modules) if the `-haddock` flag is given. Also adds a test that compares `-ddump-parsed-ast` output for a signature module to prevent further regressions. Fixes #23315 - - - - - f9b952a7 by Ben Gamari at 2023-07-21T11:58:05-04:00 Bump base bound to <4.20 For GHC 9.8. - - - - - c30cea53 by Ben Gamari at 2023-07-21T23:23:49-04:00 primops: Introduce unsafeThawByteArray# This addresses an odd asymmetry in the ByteArray# primops, which previously provided unsafeFreezeByteArray# but no corresponding thaw operation. Closes #22710 - - - - - 87f9bd47 by Ben Gamari at 2023-07-21T23:23:49-04:00 testsuite: Elaborate in interface stability README This discussion didn't make it into the original MR. - - - - - e4350b41 by Matthew Pickering at 2023-07-21T23:24:25-04:00 Allow users to override non-essential haddock options in a Flavour We now supply the non-essential options to haddock using the `extraArgs` field, which can be specified in a Flavour so that if an advanced user wants to change how documentation is generated then they can use something other than the `defaultHaddockExtraArgs`. This does have the potential to regress some packaging if a user has overridden `extraArgs` themselves, because now they also need to add the haddock options to extraArgs. This can easily be done by appending `defaultHaddockExtraArgs` to their extraArgs invocation but someone might not notice this behaviour has changed. In any case, I think passing the non-essential options in this manner is the right thing to do and matches what we do for the "ghc" builder, which by default doesn't pass any optmisation levels, and would likewise be very bad if someone didn't pass suitable `-O` levels for builds. Fixes #23625 - - - - - fc186b0c by Ilias Tsitsimpis at 2023-07-21T23:25:03-04:00 ghc-prim: Link against libatomic Commit b4d39adbb58 made 'hs_cmpxchg64()' available to all architectures. Unfortunately this made GHC to fail to build on armel, since armel needs libatomic to support atomic operations on 64-bit word sizes. Configure libraries/ghc-prim/ghc-prim.cabal to link against libatomic, the same way as we do in rts/rts.cabal. - - - - - 4f5538a8 by Matthew Pickering at 2023-07-21T23:25:39-04:00 simplifier: Correct InScopeSet in rule matching The in-scope set passedto the `exprIsLambda_maybe` call lacked all the in-scope binders. @simonpj suggests this fix where we augment the in-scope set with the free variables of expression which fixes this failure mode in quite a direct way. Fixes #23630 - - - - - 5ad8d597 by Krzysztof Gogolewski at 2023-07-21T23:26:17-04:00 Add a test for #23413 It was fixed by commit e1590ddc661d6: Add the SolverStage monad. - - - - - 7e05f6df by sheaf at 2023-07-21T23:26:56-04:00 Finish migration of diagnostics in GHC.Tc.Validity This patch finishes migrating the error messages in GHC.Tc.Validity to use the new diagnostic infrastructure. It also refactors the error message datatypes for class and family instances, to common them up under a single datatype as much as possible. - - - - - 4876fddc by Matthew Pickering at 2023-07-21T23:27:33-04:00 ci: Enable some more jobs to run in a marge batch In !10907 I made the majority of jobs not run on a validate pipeline but then forgot to renable a select few jobs on the marge batch MR. - - - - - 026991d7 by Jens Petersen at 2023-07-21T23:28:13-04:00 user_guide/flags.py: python-3.12 no longer includes distutils packaging.version seems able to handle this fine - - - - - b91bbc2b by Matthew Pickering at 2023-07-21T23:28:50-04:00 ci: Mention ~full-ci label in MR template We mention that if you need a full validation pipeline then you can apply the ~full-ci label to your MR in order to test against the full validation pipeline (like we do for marge). - - - - - 42b05e9b by sheaf at 2023-07-22T12:36:00-04:00 RTS: declare setKeepCAFs symbol Commit 08ba8720 failed to declare the dependency of keepCAFsForGHCi on the symbol setKeepCAFs in the RTS, which led to undefined symbol errors on Windows, as exhibited by the testcase frontend001. Thanks to Moritz Angermann and Ryan Scott for the diagnosis and fix. Fixes #22961 - - - - - a72015d6 by sheaf at 2023-07-22T12:36:01-04:00 Mark plugins-external as broken on Windows This test is broken on Windows, so we explicitly mark it as such now that we stop skipping plugin tests on Windows. - - - - - cb9c93d7 by sheaf at 2023-07-22T12:36:01-04:00 Stop marking plugin tests as fragile on Windows Now that b2bb3e62 has landed we are in a better situation with regards to plugins on Windows, allowing us to unmark many plugin tests as fragile. Fixes #16405 - - - - - a7349217 by Krzysztof Gogolewski at 2023-07-22T12:36:37-04:00 Misc cleanup - Remove unused RDR names - Fix typos in comments - Deriving: simplify boxConTbl and remove unused litConTbl - chmod -x GHC/Exts.hs, this seems accidental - - - - - 33b6850a by Vladislav Zavialov at 2023-07-23T10:27:37-04:00 Visible forall in types of terms: Part 1 (#22326) This patch implements part 1 of GHC Proposal #281, introducing explicit `type` patterns and `type` arguments. Summary of the changes: 1. New extension flag: RequiredTypeArguments 2. New user-facing syntax: `type p` patterns (represented by EmbTyPat) `type e` expressions (represented by HsEmbTy) 3. Functions with required type arguments (visible forall) can now be defined and applied: idv :: forall a -> a -> a -- signature (relevant change: checkVdqOK in GHC/Tc/Validity.hs) idv (type a) (x :: a) = x -- definition (relevant change: tcPats in GHC/Tc/Gen/Pat.hs) x = idv (type Int) 42 -- usage (relevant change: tcInstFun in GHC/Tc/Gen/App.hs) 4. template-haskell support: TH.TypeE corresponds to HsEmbTy TH.TypeP corresponds to EmbTyPat 5. Test cases and a new User's Guide section Changes *not* included here are the t2t (term-to-type) transformation and term variable capture; those belong to part 2. - - - - - 73b5c7ce by sheaf at 2023-07-23T10:28:18-04:00 Add test for #22424 This is a simple Template Haskell test in which we refer to record selectors by their exact Names, in two different ways. Fixes #22424 - - - - - 83cbc672 by Ben Gamari at 2023-07-24T07:40:49+00:00 ghc-toolchain: Initial commit - - - - - 31dcd26c by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00 ghc-toolchain: Toolchain Selection This commit integrates ghc-toolchain, the brand new way of configuring toolchains for GHC, with the Hadrian build system, with configure, and extends and improves the first iteration of ghc-toolchain. The general overview is * We introduce a program invoked `ghc-toolchain --triple=...` which, when run, produces a file with a `Target`. A `GHC.Toolchain.Target.Target` describes the properties of a target and the toolchain (executables and configured flags) to produce code for that target * Hadrian was modified to read Target files, and will both * Invoke the toolchain configured in the Target file as needed * Produce a `settings` file for GHC based on the Target file for that stage * `./configure` will invoke ghc-toolchain to generate target files, but it will also generate target files based on the flags configure itself configured (through `.in` files that are substituted) * By default, the Targets generated by configure are still (for now) the ones used by Hadrian * But we additionally validate the Target files generated by ghc-toolchain against the ones generated by configure, to get a head start on catching configuration bugs before we transition completely. * When we make that transition, we will want to drop a lot of the toolchain configuration logic from configure, but keep it otherwise. * For each compiler stage we should have 1 target file (up to a stage compiler we can't run in our machine) * We just have a HOST target file, which we use as the target for stage0 * And a TARGET target file, which we use for stage1 (and later stages, if not cross compiling) * Note there is no BUILD target file, because we only support cross compilation where BUILD=HOST * (for more details on cross-compilation see discussion on !9263) See also * Note [How we configure the bundled windows toolchain] * Note [ghc-toolchain consistency checking] * Note [ghc-toolchain overview] Ticket: #19877 MR: !9263 - - - - - a732b6d3 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00 Add flag to enable/disable ghc-toolchain based configurations This flag is disabled by default, and we'll use the configure-generated-toolchains by default until we remove the toolchain configuration logic from configure. - - - - - 61eea240 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00 Split ghc-toolchain executable to new packge In light of #23690, we split the ghc-toolchain executable out of the library package to be able to ship it in the bindist using Hadrian. Ideally, we eventually revert this commit. - - - - - 38e795ff by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00 Ship ghc-toolchain in the bindist Add the ghc-toolchain binary to the binary distribution we ship to users, and teach the bindist configure to use the existing ghc-toolchain. - - - - - 32cae784 by Matthew Craven at 2023-07-24T16:48:24-04:00 Kill off gen_bytearray_addr_access_ops.py The relevant primop descriptions are now generated directly by genprimopcode. This makes progress toward fixing #23490, but it is not a complete fix since there is more than one way in which cabal-reinstall (hadrian/build build-cabal) is broken. - - - - - 02e6a6ce by Matthew Pickering at 2023-07-24T16:49:00-04:00 compiler: Remove unused `containers.h` include Fixes #23712 - - - - - 822ef66b by Matthew Pickering at 2023-07-25T08:44:50-04:00 Fix pretty printing of WARNING pragmas There is still something quite unsavoury going on with WARNING pragma printing because the printing relies on the fact that for decl deprecations the SourceText of WarningTxt is empty. However, I let that lion sleep and just fixed things directly. Fixes #23465 - - - - - e7b38ede by Matthew Pickering at 2023-07-25T08:45:28-04:00 ci-images: Bump to commit which has 9.6 image The test-bootstrap job has been failing for 9.6 because we accidentally used a non-master commit. - - - - - bb408936 by Matthew Pickering at 2023-07-25T08:45:28-04:00 Update bootstrap plans for 9.6.2 and 9.4.5 - - - - - 355e1792 by Alan Zimmerman at 2023-07-26T10:17:32-04:00 EPA: Simplify GHC/Parser.y comb4/comb5 Use the HasLoc instance from Ast.hs to allow comb4/comb5 to work with anything with a SrcSpan Also get rid of some more now unnecessary reLoc calls. - - - - - 9393df83 by Gavin Zhao at 2023-07-26T10:18:16-04:00 compiler: make -ddump-asm work with wasm backend NCG Fixes #23503. Now the `-ddump-asm` flag is respected in the wasm backend NCG, so developers can directly view the generated ASM instead of needing to pass `-S` or `-keep-tmp-files` and manually find & open the assembly file. Ideally, we should be able to output the assembly files in smaller chunks like in other NCG backends. This would also make dumping assembly stats easier. However, this would require a large refactoring, so for short-term debugging purposes I think the current approach works fine. Signed-off-by: Gavin Zhao <git at gzgz.dev> - - - - - 79463036 by Krzysztof Gogolewski at 2023-07-26T10:18:54-04:00 llvm: Restore accidentally deleted code in 0fc5cb97 Fixes #23711 - - - - - 20db7e26 by Rodrigo Mesquita at 2023-07-26T10:19:33-04:00 configure: Default missing options to False when preparing ghc-toolchain Targets This commit fixes building ghc with 9.2 as the boostrap compiler. The ghc-toolchain patch assumed all _STAGE0 options were available, and forgot to account for this missing information in 9.2. Ghc 9.2 does not have in settings whether ar supports -l, hence can't report it with --info (unliked 9.4 upwards). The fix is to default the missing information (we default "ar supports -l" and other missing options to False) - - - - - fac9e84e by Naïm Favier at 2023-07-26T10:20:16-04:00 docs: Fix typo - - - - - 503fd647 by Bartłomiej Cieślar at 2023-07-26T17:23:10-04:00 This MR is an implementation of the proposal #516. It adds a warning -Wincomplete-record-selectors for usages of a record field access function (either a record selector or getField @"rec"), while trying to silence the warning whenever it can be sure that a constructor without the record field would not be invoked (which would otherwise cause the program to fail). For example: data T = T1 | T2 {x :: Bool} f a = x a -- this would throw an error g T1 = True g a = x a -- this would not throw an error h :: HasField "x" r Bool => r -> Bool h = getField @"x" j :: T -> Bool j = h -- this would throw an error because of the `HasField` -- constraint being solved See the tests DsIncompleteRecSel* and TcIncompleteRecSel for more examples of the warning. See Note [Detecting incomplete record selectors] in GHC.HsToCore.Expr for implementation details - - - - - af6fdf42 by Arnaud Spiwack at 2023-07-26T17:23:52-04:00 Fix user-facing label in MR template - - - - - 5d45b92a by Matthew Pickering at 2023-07-27T05:46:46-04:00 ci: Test bootstrapping configurations with full-ci and on marge batches There have been two incidents recently where bootstrapping has been broken by removing support for building with 9.2.*. The process for bumping the minimum required version starts with bumping the configure version and then other CI jobs such as the bootstrap jobs have to be updated. We must not silently bump the minimum required version. Now we are running a slimmed down validate pipeline it seems worthwile to test these bootstrap configurations in the full-ci pipeline. - - - - - 25d4fee7 by Matthew Pickering at 2023-07-27T05:46:46-04:00 bootstrap: Remove ghc-9_2_* plans We are anticipating shortly making it necessary to use ghc-9.4 to boot the compiler. - - - - - 2f66da16 by Matthew Pickering at 2023-07-27T05:46:46-04:00 Update bootstrap plans for ghc-platform and ghc-toolchain dependencies Fixes #23735 - - - - - c8c6eab1 by Matthew Pickering at 2023-07-27T05:46:46-04:00 bootstrap: Disable -selftest flag from bootstrap plans This saves on building one dependency (QuickCheck) which is unecessary for bootstrapping. - - - - - a80ca086 by Andrew Lelechenko at 2023-07-27T05:47:26-04:00 Link reference paper and package from System.Mem.{StableName,Weak} - - - - - a5319358 by David Knothe at 2023-07-28T13:13:10-04:00 Update Match Datatype EquationInfo currently contains a list of the equation's patterns together with a CoreExpr that is to be evaluated after a successful match on this equation. All the match-functions only operate on the first pattern of an equation - after successfully matching it, match is called recursively on the tail of the pattern list. We can express this more clearly and make the code a little more elegant by updating the datatype of EquationInfo as follows: data EquationInfo = EqnMatch { eqn_pat = Pat GhcTc, eqn_rest = EquationInfo } | EqnDone { eqn_rhs = MatchResult CoreExpr } An EquationInfo now explicitly exposes its first pattern which most functions operate on, and exposes the equation that remains after processing the first pattern. An EqnDone signifies an empty equation where the CoreExpr can now be evaluated. - - - - - 86ad1af9 by David Binder at 2023-07-28T13:13:53-04:00 Improve documentation for Data.Fixed - - - - - f8fa1d08 by Ben Gamari at 2023-07-28T13:14:31-04:00 ghc-prim: Use C11 atomics Previously `ghc-prim`'s atomic wrappers used the legacy `__sync_*` family of C builtins. Here we refactor these to rather use the appropriate C11 atomic equivalents, allowing us to be more explicit about the expected ordering semantics. - - - - - 0bfc8908 by Finley McIlwaine at 2023-07-28T18:46:26-04:00 Include -haddock in DynFlags fingerprint The -haddock flag determines whether or not the resulting .hi files contain haddock documentation strings. If the existing .hi files do not contain haddock documentation strings and the user requests them, we should recompile. - - - - - 40425c50 by Andreas Klebinger at 2023-07-28T18:47:02-04:00 Aarch64 NCG: Use encoded immediates for literals. Try to generate instr x2, <imm> instead of mov x1, lit instr x2, x1 When possible. This get's rid if quite a few redundant mov instructions. I believe this causes a metric decrease for LargeRecords as we reduce register pressure. ------------------------- Metric Decrease: LargeRecord ------------------------- - - - - - e9a0fa3f by Andrew Lelechenko at 2023-07-28T18:47:42-04:00 Bump filepath submodule to 1.4.100.4 Resolves #23741 Metric Decrease: MultiComponentModules MultiComponentModulesRecomp MultiLayerModules MultiLayerModulesRecomp T10421 T12234 T12425 T13035 T13701 T13719 T16875 T18304 T18698a T18698b T21839c T9198 TcPlugin_RewritePerf hard_hole_fits Metric decrease on Windows can be probably attributed to https://github.com/haskell/filepath/pull/183 - - - - - ee93edfd by Andrew Lelechenko at 2023-07-28T18:48:21-04:00 Add since pragmas to GHC.IO.Handle.FD - - - - - d0369802 by Simon Peyton Jones at 2023-07-30T09:24:48+01:00 Make the occurrence analyser smarter about join points This MR addresses #22404. There is a big Note Note [Occurrence analysis for join points] that explains it all. Significant changes * New field occ_join_points in OccEnv * The NonRec case of occAnalBind splits into two cases: one for existing join points (which does the special magic for Note [Occurrence analysis for join points], and one for other bindings. * mkOneOcc adds in info from occ_join_points. * All "bring into scope" activity is centralised in the new function `addInScope`. * I made a local data type LocalOcc for use inside the occurrence analyser It is like OccInfo, but lacks IAmDead and IAmALoopBreaker, which in turn makes computationns over it simpler and more efficient. * I found quite a bit of allocation in GHC.Core.Rules.getRules so I optimised it a bit. More minor changes * I found I was using (Maybe Arity) a lot, so I defined a new data type JoinPointHood and used it everwhere. This touches a lot of non-occ-anal files, but it makes everything more perspicuous. * Renamed data constructor WithUsageDetails to WUD, and WithTailUsageDetails to WTUD This also fixes #21128, on the way. --------- Compiler perf ----------- I spent quite a time on performance tuning, so even though it does more than before, the occurrence analyser runs slightly faster on average. Here are the compile-time allocation changes over 0.5% CoOpt_Read(normal) ghc/alloc 766,025,520 754,561,992 -1.5% CoOpt_Singletons(normal) ghc/alloc 759,436,840 762,925,512 +0.5% LargeRecord(normal) ghc/alloc 1,814,482,440 1,799,530,456 -0.8% PmSeriesT(normal) ghc/alloc 68,159,272 67,519,720 -0.9% T10858(normal) ghc/alloc 120,805,224 118,746,968 -1.7% T11374(normal) ghc/alloc 164,901,104 164,070,624 -0.5% T11545(normal) ghc/alloc 79,851,808 78,964,704 -1.1% T12150(optasm) ghc/alloc 73,903,664 71,237,544 -3.6% GOOD T12227(normal) ghc/alloc 333,663,200 331,625,864 -0.6% T12234(optasm) ghc/alloc 52,583,224 52,340,344 -0.5% T12425(optasm) ghc/alloc 81,943,216 81,566,720 -0.5% T13056(optasm) ghc/alloc 294,517,928 289,642,512 -1.7% T13253-spj(normal) ghc/alloc 118,271,264 59,859,040 -49.4% GOOD T15164(normal) ghc/alloc 1,102,630,352 1,091,841,296 -1.0% T15304(normal) ghc/alloc 1,196,084,000 1,166,733,000 -2.5% T15630(normal) ghc/alloc 148,729,632 147,261,064 -1.0% T15703(normal) ghc/alloc 379,366,664 377,600,008 -0.5% T16875(normal) ghc/alloc 32,907,120 32,670,976 -0.7% T17516(normal) ghc/alloc 1,658,001,888 1,627,863,848 -1.8% T17836(normal) ghc/alloc 395,329,400 393,080,248 -0.6% T18140(normal) ghc/alloc 71,968,824 73,243,040 +1.8% T18223(normal) ghc/alloc 456,852,568 453,059,088 -0.8% T18282(normal) ghc/alloc 129,105,576 131,397,064 +1.8% T18304(normal) ghc/alloc 71,311,712 70,722,720 -0.8% T18698a(normal) ghc/alloc 208,795,112 210,102,904 +0.6% T18698b(normal) ghc/alloc 230,320,736 232,697,976 +1.0% BAD T19695(normal) ghc/alloc 1,483,648,128 1,504,702,976 +1.4% T20049(normal) ghc/alloc 85,612,024 85,114,376 -0.6% T21839c(normal) ghc/alloc 415,080,992 410,906,216 -1.0% GOOD T4801(normal) ghc/alloc 247,590,920 250,726,272 +1.3% T6048(optasm) ghc/alloc 95,699,416 95,080,680 -0.6% T783(normal) ghc/alloc 335,323,384 332,988,120 -0.7% T9233(normal) ghc/alloc 709,641,224 685,947,008 -3.3% GOOD T9630(normal) ghc/alloc 965,635,712 948,356,120 -1.8% T9675(optasm) ghc/alloc 444,604,152 428,987,216 -3.5% GOOD T9961(normal) ghc/alloc 303,064,592 308,798,800 +1.9% BAD WWRec(normal) ghc/alloc 503,728,832 498,102,272 -1.1% geo. mean -1.0% minimum -49.4% maximum +1.9% In fact these figures seem to vary between platforms; generally worse on i386 for some reason. The Windows numbers vary by 1% espec in benchmarks where the total allocation is low. But the geom mean stays solidly negative, which is good. The "increase/decrease" list below covers all platforms. The big win on T13253-spj comes because it has a big nest of join points, each occurring twice in the next one. The new occ-anal takes only one iteration of the simplifier to do the inlining; the old one took four. Moreover, we get much smaller code with the new one: New: Result size of Tidy Core = {terms: 429, types: 84, coercions: 0, joins: 14/14} Old: Result size of Tidy Core = {terms: 2,437, types: 304, coercions: 0, joins: 10/10} --------- Runtime perf ----------- No significant changes in nofib results, except a 1% reduction in compiler allocation. Metric Decrease: CoOpt_Read T13253-spj T9233 T9630 T9675 T12150 T21839c LargeRecord MultiComponentModulesRecomp T10421 T13701 T10421 T13701 T12425 Metric Increase: T18140 T9961 T18282 T18698a T18698b T19695 - - - - - 42aa7fbd by Julian Ospald at 2023-07-30T17:22:01-04:00 Improve documentation around IOException and ioe_filename See: * https://github.com/haskell/core-libraries-committee/issues/189 * https://github.com/haskell/unix/pull/279 * https://github.com/haskell/unix/pull/289 - - - - - 33598ecb by Sylvain Henry at 2023-08-01T14:45:54-04:00 JS: implement getMonotonicTime (fix #23687) - - - - - d2bedffd by Bartłomiej Cieślar at 2023-08-01T14:46:40-04:00 Implementation of the Deprecated Instances proposal #575 This commit implements the ability to deprecate certain instances, which causes the compiler to emit the desired deprecation message whenever they are instantiated. For example: module A where class C t where instance {-# DEPRECATED "dont use" #-} C Int where module B where import A f :: C t => t f = undefined g :: Int g = f -- "dont use" emitted here The implementation is as follows: - In the parser, we parse deprecations/warnings attached to instances: instance {-# DEPRECATED "msg" #-} Show X deriving instance {-# WARNING "msg2" #-} Eq Y (Note that non-standalone deriving instance declarations do not support this mechanism.) - We store the resulting warning message in `ClsInstDecl` (respectively, `DerivDecl`). In `GHC.Tc.TyCl.Instance.tcClsInstDecl` (respectively, `GHC.Tc.Deriv.Utils.newDerivClsInst`), we pass on that information to `ClsInst` (and eventually store it in `IfaceClsInst` too). - Finally, when we solve a constraint using such an instance, in `GHC.Tc.Instance.Class.matchInstEnv`, we emit the appropriate warning that was stored in `ClsInst`. Note that we only emit a warning when the instance is used in a different module than it is defined, which keeps the behaviour in line with the deprecation of top-level identifiers. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - d5a65af6 by Ben Gamari at 2023-08-01T14:47:18-04:00 compiler: Style fixes - - - - - 7218c80a by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Fix implicit cast This ensures that Task.h can be built with a C++ compiler. - - - - - d6d5aafc by Ben Gamari at 2023-08-01T14:47:19-04:00 testsuite: Fix warning in hs_try_putmvar001 - - - - - d9eddf7a by Ben Gamari at 2023-08-01T14:47:19-04:00 testsuite: Add AtomicModifyIORef test - - - - - f9eea4ba by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Introduce NO_WARN macro This allows fine-grained ignoring of warnings. - - - - - 497b24ec by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Simplify atomicModifyMutVar2# implementation Previously we would perform a redundant load in the non-threaded RTS in atomicModifyMutVar2# implementation for the benefit of the non-moving GC's write barrier. Eliminate this. - - - - - 52ee082b by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Introduce more principled fence operations - - - - - cd3c0377 by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Introduce SET_INFO_RELAXED - - - - - 6df2352a by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Style fixes - - - - - 4ef6f319 by Ben Gamari at 2023-08-01T14:47:19-04:00 codeGen/tsan: Rework handling of spilling - - - - - f9ca7e27 by Ben Gamari at 2023-08-01T14:47:19-04:00 hadrian: More debug information - - - - - df4153ac by Ben Gamari at 2023-08-01T14:47:19-04:00 Improve TSAN documentation - - - - - fecae988 by Ben Gamari at 2023-08-01T14:47:19-04:00 hadrian: More selective TSAN instrumentation - - - - - 465a9a0b by Alan Zimmerman at 2023-08-01T14:47:56-04:00 EPA: Provide correct annotation span for ImportDecl Use the whole declaration, rather than just the span of the 'import' keyword. Metric Decrease: T9961 T5205 Metric Increase: T13035 - - - - - ae63d0fa by Bartłomiej Cieślar at 2023-08-01T14:48:40-04:00 Add cases to T23279: HasField for deprecated record fields This commit adds additional tests from ticket #23279 to ensure that we don't regress on reporting deprecated record fields in conjunction with HasField, either when using overloaded record dot syntax or directly through `getField`. Fixes #23279 - - - - - 00fb6e6b by Andreas Klebinger at 2023-08-01T14:49:17-04:00 AArch NCG: Pure refactor Combine some alternatives. Add some line breaks for overly long lines - - - - - 8f3b3b78 by Andreas Klebinger at 2023-08-01T14:49:54-04:00 Aarch ncg: Optimize immediate use for address calculations When the offset doesn't fit into the immediate we now just reuse the general getRegister' code path which is well optimized to compute the offset into a register instead of a special case for CmmRegOff. This means we generate a lot less code under certain conditions which is why performance metrics for these improve. ------------------------- Metric Decrease: T4801 T5321FD T5321Fun ------------------------- - - - - - 74a882dc by MorrowM at 2023-08-02T06:00:03-04:00 Add a RULE to make lookup fuse See https://github.com/haskell/core-libraries-committee/issues/175 Metric Increase: T18282 - - - - - cca74dab by Ben Gamari at 2023-08-02T06:00:39-04:00 hadrian: Ensure that way-flags are passed to CC Previously the way-specific compilation flags (e.g. `-DDEBUG`, `-DTHREADED_RTS`) would not be passed to the CC invocations. This meant that C dependency files would not correctly reflect dependencies predicated on the way, resulting in the rather painful #23554. Closes #23554. - - - - - 622b483c by Jaro Reinders at 2023-08-02T06:01:20-04:00 Native 32-bit Enum Int64/Word64 instances This commits adds more performant Enum Int64 and Enum Word64 instances for 32-bit platforms, replacing the Integer-based implementation. These instances are a copy of the Enum Int and Enum Word instances with minimal changes to manipulate Int64 and Word64 instead. On i386 this yields a 1.5x performance increase and for the JavaScript back end it even yields a 5.6x speedup. Metric Decrease: T18964 - - - - - c8bd7fa4 by Sylvain Henry at 2023-08-02T06:02:03-04:00 JS: fix typos in constants (#23650) - - - - - b9d5bfe9 by Josh Meredith at 2023-08-02T06:02:40-04:00 JavaScript: update MK_TUP macros to use current tuple constructors (#23659) - - - - - 28211215 by Matthew Pickering at 2023-08-02T06:03:19-04:00 ci: Pass -Werror when building hadrian in hadrian-ghc-in-ghci job Warnings when building Hadrian can end up cluttering the output of HLS, and we've had bug reports in the past about these warnings when building Hadrian. It would be nice to turn on -Werror on at least one build of Hadrian in CI to avoid a patch introducing warnings when building Hadrian. Fixes #23638 - - - - - aca20a5d by Ben Gamari at 2023-08-02T06:03:55-04:00 codeGen: Ensure that TSAN is aware of writeArray# write barriers By using a proper release store instead of a fence. - - - - - 453c0531 by Ben Gamari at 2023-08-02T06:03:55-04:00 codeGen: Ensure that array reads have necessary barriers This was the cause of #23541. - - - - - 93a0d089 by Arnaud Spiwack at 2023-08-02T06:04:37-04:00 Add test for #23550 - - - - - 6a2f4a20 by Arnaud Spiwack at 2023-08-02T06:04:37-04:00 Desugar non-recursive lets to non-recursive lets (take 2) This reverts commit 522bd584f71ddeda21efdf0917606ce3d81ec6cc. And takes care of the case that I missed in my previous attempt. Namely the case of an AbsBinds with no type variables and no dictionary variable. Ironically, the comment explaining why non-recursive lets were desugared to recursive lets were pointing specifically at this case as the reason. I just failed to understand that it was until Simon PJ pointed it out to me. See #23550 for more discussion. - - - - - ff81d53f by jade at 2023-08-02T06:05:20-04:00 Expand documentation of List & Data.List This commit aims to improve the documentation and examples of symbols exported from Data.List - - - - - fa4e5913 by Jade at 2023-08-02T06:06:03-04:00 Improve documentation of Semigroup & Monoid This commit aims to improve the documentation of various symbols exported from Data.Semigroup and Data.Monoid - - - - - 1b27e151 by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Check for puns (see ghc#23368) - - - - - 457341fd by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Remove fake exports for (~), List, and Tuple<n> The old reasoning no longer applies, nowadays those names can be mentioned in export lists. - - - - - bf3dcddf by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Fix pretty-printing of Solo and MkSolo - - - - - e2c91bff by Gergő Érdi at 2023-08-03T02:55:46+01:00 Desugar bindings in the context of their evidence Closes #23172 - - - - - 481f4a46 by Gergő Érdi at 2023-08-03T07:48:43+01:00 Add flag to `-f{no-}specialise-incoherents` to enable/disable specialisation of incoherent instances Fixes #23287 - - - - - d751c583 by Profpatsch at 2023-08-04T12:24:26-04:00 base: Improve String & IsString documentation - - - - - 01db1117 by Ben Gamari at 2023-08-04T12:25:02-04:00 rts/win32: Ensure reliability of IO manager shutdown When the Win32 threaded IO manager shuts down, `ioManagerDie` sends an `IO_MANAGER_DIE` event to the IO manager thread using the `io_manager_event` event object. Finally, it will closes the event object, and invalidate `io_manager_event`. Previously, `readIOManagerEvent` would see that `io_manager_event` is invalid and return `0`, suggesting that everything is right with the world. This meant that if `ioManagerDie` invalidated the handle before the event manager was blocked on the event we would end up in a situation where the event manager would never realize it was asked to shut down. Fix this by ensuring that `readIOManagerEvent` instead returns `IO_MANAGER_DIE` when we detect that the event object has been invalidated by `ioManagerDie`. Fixes #23691. - - - - - fdef003a by Ryan Scott at 2023-08-04T12:25:39-04:00 Look through TH splices in splitHsApps This modifies `splitHsApps` (a key function used in typechecking function applications) to look through untyped TH splices and quasiquotes. Not doing so was the cause of #21077. This builds on !7821 by making `splitHsApps` match on `HsUntypedSpliceTop`, which contains the `ThModFinalizers` that must be run as part of invoking the TH splice. See the new `Note [Looking through Template Haskell splices in splitHsApps]` in `GHC.Tc.Gen.Head`. Along the way, I needed to make the type of `splitHsApps.set` slightly more general to accommodate the fact that the location attached to a quasiquote is a `SrcAnn NoEpAnns` rather than a `SrcSpanAnnA`. Fixes #21077. - - - - - e77a0b41 by Ben Gamari at 2023-08-04T12:26:15-04:00 Bump deepseq submodule to 1.5. And bump bounds (cherry picked from commit 1228d3a4a08d30eaf0138a52d1be25b38339ef0b) - - - - - cebb5819 by Ben Gamari at 2023-08-04T12:26:15-04:00 configure: Bump minimal boot GHC version to 9.4 (cherry picked from commit d3ffdaf9137705894d15ccc3feff569d64163e8e) - - - - - 83766dbf by Ben Gamari at 2023-08-04T12:26:15-04:00 template-haskell: Bump version to 2.21.0.0 Bumps exceptions submodule. (cherry picked from commit bf57fc9aea1196f97f5adb72c8b56434ca4b87cb) - - - - - 1211112a by Ben Gamari at 2023-08-04T12:26:15-04:00 base: Bump version to 4.19 Updates all boot library submodules. (cherry picked from commit 433d99a3c24a55b14ec09099395e9b9641430143) - - - - - 3ab5efd9 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Normalise versions more aggressively In backpack hashes can contain `+` characters. (cherry picked from commit 024861af51aee807d800e01e122897166a65ea93) - - - - - d52be957 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Declare bkpcabal08 as fragile Due to spurious output changes described in #23648. (cherry picked from commit c046a2382420f2be2c4a657c56f8d95f914ea47b) - - - - - e75a58d1 by Ben Gamari at 2023-08-04T12:26:15-04:00 gitlab-ci: Only mark linker_unload_native as broken in static jobs This test passes on dynamically-linked Alpine. (cherry picked from commit f356a7e8ec8ec3d6b2b30fd175598b9b80065d87) - - - - - 8b176514 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Update base-exports - - - - - 4b647936 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite/interface-stability: normalise versions This eliminates spurious changes from version bumps. - - - - - 0eb54c05 by Ben Gamari at 2023-08-04T12:26:51-04:00 linker/PEi386: Don't sign-extend symbol section number Previously we incorrectly interpreted PE section numbers as signed values. However, this isn't the case; rather, it's an unsigned 16-bit number with a few special bit-patterns (0xffff and 0xfffe). This resulted in #22941 as the linker would conclude that the sections were invalid. Fixing this required quite a bit of refactoring. Closes #22941. - - - - - fd7ce39c by Ben Gamari at 2023-08-04T12:27:28-04:00 testsuite: Mark MulMayOflo_full as broken rather than skipping To ensure that we don't accidentally fix it. See #23742. - - - - - 824092f2 by Ben Gamari at 2023-08-04T12:27:28-04:00 nativeGen/AArch64: Fix sign extension in MulMayOflo Previously the 32-bit implementations of MulMayOflo would use the a non-sensical sign-extension mode. Rewrite these to reflect what gcc 11 produces. Also similarly rework the 16- and 8-bit cases. This now passes the MulMayOflo tests in ghc/test-primops> in all four widths, including the precision tests. Fixes #23721. - - - - - 1b15dbc4 by Jan Hrček at 2023-08-04T12:28:08-04:00 Fix haddock markup in code example for coerce - - - - - 46fd8ced by Vladislav Zavialov at 2023-08-04T12:28:44-04:00 Fix (~) and (@) infix operators in TH splices (#23748) 8168b42a "Whitespace-sensitive bang patterns" allows GHC to accept the following infix operators: a ~ b = () a @ b = () But not if TH is used to generate those declarations: $([d| a ~ b = () a @ b = () |]) -- Test.hs:5:2: error: [GHC-55017] -- Illegal variable name: ‘~’ -- When splicing a TH declaration: (~_0) a_1 b_2 = GHC.Tuple.Prim.() This is easily fixed by modifying `reservedOps` in GHC.Utils.Lexeme - - - - - a1899d8f by Aaron Allen at 2023-08-04T12:29:24-04:00 [#23663] Show Flag Suggestions in GHCi Makes suggestions when using `:set` in GHCi with a misspelled flag. This mirrors how invalid flags are handled when passed to GHC directly. Logic for producing flag suggestions was moved to GHC.Driver.Sesssion so it can be shared. resolves #23663 - - - - - 03f2debd by Rodrigo Mesquita at 2023-08-04T12:30:00-04:00 Improve ghc-toolchain validation configure warning Fixes the layout of the ghc-toolchain validation warning produced by configure. - - - - - de25487d by Alan Zimmerman at 2023-08-04T12:30:36-04:00 EPA make getLocA a synonym for getHasLoc This is basically a no-op change, but allows us to make future changes that can rely on the HasLoc instances And I presume this means we can use more precise functions based on class resolution, so the Windows CI build reports Metric Decrease: T12234 T13035 - - - - - 3ac423b9 by Ben Gamari at 2023-08-04T12:31:13-04:00 ghc-platform: Add upper bound on base Hackage upload requires this. - - - - - 8ba20b21 by Matthew Craven at 2023-08-04T17:22:59-04:00 Adjust and clarify handling of primop effects Fixes #17900; fixes #20195. The existing "can_fail" and "has_side_effects" primop attributes that previously governed this were used in inconsistent and confusingly-documented ways, especially with regard to raising exceptions. This patch replaces them with a single "effect" attribute, which has four possible values: NoEffect, CanFail, ThrowsException, and ReadWriteEffect. These are described in Note [Classifying primop effects]. A substantial amount of related documentation has been re-drafted for clarity and accuracy. In the process of making this attribute format change for literally every primop, several existing mis-classifications were detected and corrected. One of these mis-classifications was tagToEnum#, which is now considered CanFail; this particular fix is known to cause a regression in performance for derived Enum instances. (See #23782.) Fixing this is left as future work. New primop attributes "cheap" and "work_free" were also added, and used in the corresponding parts of GHC.Core.Utils. In view of their actual meaning and uses, `primOpOkForSideEffects` and `exprOkForSideEffects` have been renamed to `primOpOkToDiscard` and `exprOkToDiscard`, respectively. Metric Increase: T21839c - - - - - 41bf2c09 by sheaf at 2023-08-04T17:23:42-04:00 Update inert_solved_dicts for ImplicitParams When adding an implicit parameter dictionary to the inert set, we must make sure that it replaces any previous implicit parameter dictionaries that overlap, in order to get the appropriate shadowing behaviour, as in let ?x = 1 in let ?x = 2 in ?x We were already doing this for inert_cans, but we weren't doing the same thing for inert_solved_dicts, which lead to the bug reported in #23761. The fix is thus to make sure that, when handling an implicit parameter dictionary in updInertDicts, we update **both** inert_cans and inert_solved_dicts to ensure a new implicit parameter dictionary correctly shadows old ones. Fixes #23761 - - - - - 43578d60 by Matthew Craven at 2023-08-05T01:05:36-04:00 Bump bytestring submodule to 0.11.5.1 - - - - - 91353622 by Ben Gamari at 2023-08-05T01:06:13-04:00 Initial commit of Note [Thunks, blackholes, and indirections] This Note attempts to summarize the treatment of thunks, thunk update, and indirections. This fell out of work on #23185. - - - - - 8d686854 by sheaf at 2023-08-05T01:06:54-04:00 Remove zonk in tcVTA This removes the zonk in GHC.Tc.Gen.App.tc_inst_forall_arg and its accompanying Note [Visible type application zonk]. Indeed, this zonk is no longer necessary, as we no longer maintain the invariant that types are well-kinded without zonking; only that typeKind does not crash; see Note [The Purely Kinded Type Invariant (PKTI)]. This commit removes this zonking step (as well as a secondary zonk), and replaces the aforementioned Note with the explanatory Note [Type application substitution], which justifies why the substitution performed in tc_inst_forall_arg remains valid without this zonking step. Fixes #23661 - - - - - 19dea673 by Ben Gamari at 2023-08-05T01:07:30-04:00 Bump nofib submodule Ensuring that nofib can be build using the same range of bootstrap compilers as GHC itself. - - - - - aa07402e by Luite Stegeman at 2023-08-05T23:15:55+09:00 JS: Improve compatibility with recent emsdk The JavaScript code in libraries/base/jsbits/base.js had some hardcoded offsets for fields in structs, because we expected the layout of the data structures to remain unchanged. Emsdk 3.1.42 changed the layout of the stat struct, breaking this assumption, and causing code in .hsc files accessing the stat struct to fail. This patch improves compatibility with recent emsdk by removing the assumption that data layouts stay unchanged: 1. offsets of fields in structs used by JavaScript code are now computed by the configure script, so both the .js and .hsc files will automatically use the new layout if anything changes. 2. the distrib/configure script checks that the emsdk version on a user's system is the same version that a bindist was booted with, to avoid data layout inconsistencies See #23641 - - - - - b938950d by Luite Stegeman at 2023-08-07T06:27:51-04:00 JS: Fix missing local variable declarations This fixes some missing local variable declarations that were found by running the testsuite in strict mode. Fixes #23775 - - - - - 6c0e2247 by sheaf at 2023-08-07T13:31:21-04:00 Update Haddock submodule to fix #23368 This submodule update adds the following three commits: bbf1c8ae - Check for puns 0550694e - Remove fake exports for (~), List, and Tuple<n> 5877bceb - Fix pretty-printing of Solo and MkSolo These commits fix the issues with Haddock HTML rendering reported in ticket #23368. Fixes #23368 - - - - - 5b5be3ea by Matthew Pickering at 2023-08-07T13:32:00-04:00 Revert "Bump bytestring submodule to 0.11.5.1" This reverts commit 43578d60bfc478e7277dcd892463cec305400025. Fixes #23789 - - - - - 01961be3 by Ben Gamari at 2023-08-08T02:47:14-04:00 configure: Derive library version from ghc-prim.cabal.in Since ghc-prim.cabal is now generated by Hadrian, we cannot depend upon it. Closes #23726. - - - - - 3b373838 by Ryan Scott at 2023-08-08T02:47:49-04:00 tcExpr: Push expected types for untyped TH splices inwards In !10911, I deleted a `tcExpr` case for `HsUntypedSplice` in favor of a much simpler case that simply delegates to `tcApp`. Although this passed the test suite at the time, this was actually an error, as the previous `tcExpr` case was critically pushing the expected type inwards. This actually matters for programs like the one in #23796, which GHC would not accept with type inference alone—we need full-blown type _checking_ to accept these. I have added back the previous `tcExpr` case for `HsUntypedSplice` and now explain why we have two different `HsUntypedSplice` cases (one in `tcExpr` and another in `splitHsApps`) in `Note [Looking through Template Haskell splices in splitHsApps]` in `GHC.Tc.Gen.Head`. Fixes #23796. - - - - - 0ef1d8ae by sheaf at 2023-08-08T21:26:51-04:00 Compute all emitted diagnostic codes This commit introduces in GHC.Types.Error.Codes the function constructorCodes :: forall diag. (...) => Map DiagnosticCode String which computes a collection of all the diagnostic codes that correspond to a particular type. In particular, we can compute the collection of all diagnostic codes emitted by GHC using the invocation constructorCodes @GhcMessage We then make use of this functionality in the new "codes" test which checks consistency and coverage of GHC diagnostic codes. It performs three checks: - check 1: all non-outdated GhcDiagnosticCode equations are statically used. - check 2: all outdated GhcDiagnosticCode equations are statically unused. - check 3: all statically used diagnostic codes are covered by the testsuite (modulo accepted exceptions). - - - - - 4bc7b1e5 by Fraser Tweedale at 2023-08-08T21:27:32-04:00 numberToRangedRational: fix edge cases for exp ≈ (maxBound :: Int) Currently a negative exponent less than `minBound :: Int` results in Infinity, which is very surprising and obviously wrong. ``` λ> read "1e-9223372036854775808" :: Double 0.0 λ> read "1e-9223372036854775809" :: Double Infinity ``` There is a further edge case where the exponent can overflow when increased by the number of tens places in the integer part, or underflow when decreased by the number of leading zeros in the fractional part if the integer part is zero: ``` λ> read "10e9223372036854775807" :: Double 0.0 λ> read "0.01e-9223372036854775808" :: Double Infinity ``` To resolve both of these issues, perform all arithmetic and comparisons involving the exponent in type `Integer`. This approach also eliminates the need to explicitly check the exponent against `maxBound :: Int` and `minBound :: Int`, because the allowed range of the exponent (i.e. the result of `floatRange` for the target floating point type) is certainly within those bounds. This change implements CLC proposal 192: https://github.com/haskell/core-libraries-committee/issues/192 - - - - - 6eab07b2 by Alan Zimmerman at 2023-08-08T21:28:10-04:00 EPA: Remove Location from WarningTxt source This is not needed. - - - - - 1a98d673 by Sebastian Graf at 2023-08-09T16:24:29-04:00 Cleanup a TODO introduced in 1f94e0f7 The change must have slipped through review of !4412 - - - - - 2274abc8 by Sebastian Graf at 2023-08-09T16:24:29-04:00 More explicit strictness in GHC.Real - - - - - ce8aa54c by Sebastian Graf at 2023-08-09T16:24:30-04:00 exprIsTrivial: Factor out shared implementation The duplication between `exprIsTrivial` and `getIdFromTrivialExpr_maybe` has been bugging me for a long time. This patch introduces an inlinable worker function `trivial_expr_fold` acting as the single, shared decision procedure of triviality. It "returns" a Church-encoded `Maybe (Maybe Id)`, so when it is inlined, it fuses to similar code as before. (Better code, even, in the case of `getIdFromTrivialExpr` which presently allocates a `Just` constructor that cancels away after this patch.) - - - - - d004a36d by Sebastian Graf at 2023-08-09T16:24:30-04:00 Simplify: Simplification of arguments in a single function The Simplifier had a function `simplArg` that wasn't called in `rebuildCall`, which seems to be the main way to simplify args. Hence I consolidated the code path to call `simplArg`, too, renaming to `simplLazyArg`. - - - - - 8c73505e by Sebastian Graf at 2023-08-09T16:24:30-04:00 Core.Ppr: Omit case binder for empty case alternatives A minor improvement to pretty-printing - - - - - d8d993f1 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Disable tests RepPolyWrappedVar2 and RepPolyUnsafeCoerce1 in JS backend ... because those coerce between incompatible/unknown PrimReps. - - - - - f06e87e4 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Inlining literals into boring contexts is OK - - - - - 4a6b7c87 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Clarify floating of unsafeEqualityProofs (#23754) - - - - - b0f4752e by Sebastian Graf at 2023-08-09T16:24:30-04:00 Kill SetLevel.notWorthFloating.is_triv (#23270) We have had it since b84ba676034, when it operated on annotated expressions. Nowadays it operates on vanilla `CoreExpr` though, so we should just call `exprIsTrivial`; thus handling empty cases and string literals correctly. - - - - - 7e0c8b3b by Sebastian Graf at 2023-08-09T16:24:30-04:00 ANFise string literal arguments (#23270) This instates the invariant that a trivial CoreExpr translates to an atomic StgExpr. Nice. Annoyingly, in -O0 we sometimes generate ``` foo = case "blah"# of sat { __DEFAULT -> unpackCString# sat } ``` which makes it a bit harder to spot that we can emit a standard `stg_unpack_cstring` thunk. Fixes #23270. - - - - - 357f2738 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Deactivate -fcatch-nonexhaustive-cases in ghc-bignum (#23345) - - - - - 59202c80 by Sebastian Graf at 2023-08-09T16:24:30-04:00 CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now. The main reason is that it plays far better in conjunction with eta expansion (as we aim to do for arguments in CorePrep, #23083), because we can discard any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta` it's impossible to discard the argument. We do also give the same treatment to unsafeCoerce proofs and treat them as trivial iff their RHS is trivial. It is also both much simpler to describe than the previous mechanism of emitting an unsafe coercion and simpler to implement, removing quite a bit of commentary and `CorePrepProv`. In the ghc/alloc perf test `LargeRecord`, we introduce an additional Simplifier iteration due to #17910. E.g., FloatOut produces a binding ``` lvl_s6uK [Occ=Once1] :: GHC.Types.Int [LclId] lvl_s6uK = GHC.Types.I# 2# lvl_s6uL [Occ=Once1] :: GHC.Types.Any [LclId] lvl_s6uL = case Unsafe.Coerce.unsafeEqualityProof ... of { Unsafe.Coerce.UnsafeRefl v2_i6tr -> lvl_s6uK `cast` (... v2_i6tr ...) } ``` That occurs once and hence is pre-inlined unconditionally in the next Simplifier pass. It's non-trivial to find a way around that, but not really harmful otherwise. Hence we accept a 1.2% increase on some architectures. Metric Increase: LargeRecord - - - - - 00d31188 by Sebastian Graf at 2023-08-09T16:24:30-04:00 CorePrep: Eta expand arguments (#23083) Previously, we'd only eta expand let bindings and lambdas, now we'll also eta expand arguments such as in T23083: ```hs g f h = f (h `seq` (h $)) ``` Unless `-fpedantic-bottoms` is set, we'll now transform to ```hs g f h = f (\eta -> h eta) ``` in CorePrep. See the new `Note [Eta expansion of arguments in CorePrep]` for the details. We only do this optimisation with -O2 because we saw 2-3% ghc/alloc regressions in T4801 and T5321FD. Fixes #23083. - - - - - bf885d7a by Matthew Craven at 2023-08-09T16:25:07-04:00 Bump bytestring submodule to 0.11.5, again Fixes #23789. The bytestring commit used here is unreleased; a release can be made when necessary. - - - - - 7acbf0fd by Sven Tennie at 2023-08-10T19:17:11-04:00 Serialize CmmRetInfo in .rodata The handling of case was missing. - - - - - 0c3136f2 by Sven Tennie at 2023-08-10T19:17:11-04:00 Reference StgRetFun payload by its struct field address This is easier to grasp than relative pointer offsets. - - - - - f68ff313 by Sven Tennie at 2023-08-10T19:17:11-04:00 Better variable name: u -> frame The 'u' was likely introduced by copy'n'paste. - - - - - 0131bb7f by Sven Tennie at 2023-08-10T19:17:11-04:00 Make checkSTACK() public Such that it can also be used in tests. - - - - - 7b6e1e53 by Sven Tennie at 2023-08-10T19:17:11-04:00 Publish stack related fields in DerivedConstants.h These will be used in ghc-heap to decode these parts of the stack. - - - - - 907ed054 by Sven Tennie at 2023-08-10T19:17:11-04:00 ghc-heap: Decode StgStack and its stack frames Previously, ghc-heap could only decode heap closures. The approach is explained in detail in note [Decoding the stack]. - - - - - 6beb6ac2 by Sven Tennie at 2023-08-10T19:17:11-04:00 Remove RetFunType from RetFun stack frame representation It's a technical detail. The single usage is replaced by a predicate. - - - - - 006bb4f3 by Sven Tennie at 2023-08-10T19:17:11-04:00 Better parameter name The call-site uses the term "offset", too. - - - - - d4c2c1af by Sven Tennie at 2023-08-10T19:17:11-04:00 Make closure boxing pure There seems to be no need to do something complicated. However, the strictness of the closure pointer matters, otherwise a thunk gets decoded. - - - - - 8d8426c9 by Sven Tennie at 2023-08-10T19:17:11-04:00 Document entertainGC in test It wasn't obvious why it's there and what its role is. Also, increase the "entertainment level" a bit. I checked in STG and Cmm dumps that this really generates closures (and is not e.g. constant folded away.) - - - - - cc52c358 by Finley McIlwaine at 2023-08-10T19:17:47-04:00 Add -dipe-stats flag This is useful for seeing which info tables have information. - - - - - 261c4acb by Finley McIlwaine at 2023-08-10T19:17:47-04:00 Add -finfo-table-map-with-fallback -finfo-table-map-with-stack The -fno-info-table-map-with-stack flag omits STACK info tables from the info table map, and the -fno-info-table-map-with-fallback flag omits info tables with defaulted source locations from the map. In a test on the Agda codebase the build results were about 7% smaller when both of those types of tables were omitted. Adds a test that verifies that passing each combination of these flags results in the correct output for -dipe-stats, which is disabled for the js backend since profiling is not implemented. This commit also refactors a lot of the logic around extracting info tables from the Cmm results and building the info table map. This commit also fixes some issues in the users guide rst source to fix warnings that were noticed while debugging the documentation for these flags. Fixes #23702 - - - - - d7047e0d by Jaro Reinders at 2023-08-14T04:41:42-04:00 Add changelog entry for specialised Enum Int64/Word64 instances - - - - - 52f5e8fb by cydparser at 2023-08-14T04:42:20-04:00 Fix -ddump-to-file and -ddump-timings interaction (#20316) - - - - - 1274c5d6 by cydparser at 2023-08-14T04:42:20-04:00 Update release notes (#20316) - - - - - 8e699b23 by Matthew Pickering at 2023-08-14T10:44:47-04:00 base: Add changelog entry for CLC #188 This proposal modified the implementations of copyBytes, moveBytes and fillBytes (as detailed in the proposal) https://github.com/haskell/core-libraries-committee/issues/188 - - - - - 026f040a by Matthew Pickering at 2023-08-14T10:45:23-04:00 packaging: Build manpage in separate directory to other documentation We were installing two copies of the manpage: * One useless one in the `share/doc` folder, because we copy the doc/ folder into share/ * The one we deliberately installed into `share/man` etc The solution is to build the manpage into the `manpage` directory when building the bindist, and then just install it separately. Fixes #23707 - - - - - 524c60c8 by Bartłomiej Cieślar at 2023-08-14T13:46:33-04:00 Report deprecated fields bound by record wildcards when used This commit ensures that we emit the appropriate warnings when a deprecated record field bound by a record wildcard is used. For example: module A where data Foo = Foo {x :: Int, y :: Bool, z :: Char} {-# DEPRECATED x "Don't use x" #-} {-# WARNING y "Don't use y" #-} module B where import A foo (Foo {..}) = x This will cause us to emit a "Don't use x" warning, with location the location of the record wildcard. Note that we don't warn about `y`, because it is unused in the RHS of `foo`. Fixes #23382 - - - - - d6130065 by Matthew Pickering at 2023-08-14T13:47:11-04:00 Add zstd suffix to jobs which rely on zstd This was causing some confusion as the job was named simply "x86_64-linux-deb10-validate", which implies a standard configuration rather than any dependency on libzstd. - - - - - e24e44fc by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: Always run project-version job This is needed for the downstream test-primops pipeline to workout what the version of a bindist produced by a pipeline is. - - - - - f17b9d62 by Matthew Pickering at 2023-08-14T13:47:11-04:00 gen_ci: Rework how jobs-metadata.json is generated * We now represent a job group a triple of Maybes, which makes it easier to work out when jobs are enabled/disabled on certain pipelines. ``` data JobGroup a = StandardTriple { v :: Maybe (NamedJob a) , n :: Maybe (NamedJob a) , r :: Maybe (NamedJob a) } ``` * `jobs-metadata.json` generation is reworked using the following algorithm. - For each pipeline type, find all the platforms we are doing builds for. - Select one build per platform - Zip together the results This way we can choose different pipelines for validate/nightly/release which makes the metadata also useful for validate pipelines. This feature is used by the test-primops downstream CI in order to select the right bindist for testing validate pipelines. This makes it easier to inspect which jobs are going to be enabled on a particular pipeline. - - - - - f9a5563d by Matthew Pickering at 2023-08-14T13:47:11-04:00 gen_ci: Rules rework In particular we now distinguish between whether we are dealing with a Nightly/Release pipeline (which labels don't matter for) and a validate pipeline where labels do matter. The overall goal here is to allow a disjunction of labels for validate pipelines, for example, > Run a job if we have the full-ci label or test-primops label Therefore the "ValidateOnly" rules are treated as a set of disjunctions rather than conjunctions like before. What this means in particular is that if we want to ONLY run a job if a label is set, for example, "FreeBSD" label then we have to override the whole label set. Fixes #23772 - - - - - d54b0c1d by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: set -e for lint-ci-config scripts - - - - - 994a9b35 by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: Fix job metadata generation - - - - - e194ed2b by Ben Gamari at 2023-08-15T00:58:09-04:00 users-guide: Note that GHC2021 doesn't include ExplicitNamespaces As noted in #23801. - - - - - d814bda9 by Ben Gamari at 2023-08-15T05:43:53-04:00 users-guide: Support both distutils and packaging As noted in #23818, some old distributions (e.g. Debian 9) only include `distutils` while newer distributions only include `packaging`. Fixes #23818. - - - - - 1726db3f by Ben Gamari at 2023-08-15T05:43:53-04:00 users-guide: Ensure extlinks is compatible with Sphinx <4 The semantics of the `extlinks` attribute annoyingly changed in Sphinx 4. Reflect this in our configuration. See #22690. Fixes #23807. - - - - - 173338cf by Matthew Pickering at 2023-08-15T22:00:24-04:00 ci: Run full-ci on master and release branches Fixes #23737 - - - - - bdab6898 by Andrew Lelechenko at 2023-08-15T22:01:03-04:00 Add @since pragmas for Data.Ord.clamp and GHC.Float.clamp - - - - - 662d351b by Matthew Pickering at 2023-08-16T09:35:04-04:00 ghc-toolchain: Match CPP args with configure script At the moment we need ghc-toolchain to precisely match the output as provided by the normal configure script. The normal configure script (FP_HSCPP_CMD_WITH_ARGS) branches on whether we are using clang or gcc so we match that logic exactly in ghc-toolchain. The old implementation (which checks if certain flags are supported) is better but for now we have to match to catch any potential errors in the configuration. Ticket: #23720 - - - - - 09c6759e by Matthew Pickering at 2023-08-16T09:35:04-04:00 configure: Fix `-Wl,--no-as-needed` check The check was failing because the args supplied by $$1 were quoted which failed because then the C compiler thought they were an input file. Fixes #23720 - - - - - 2129678b by Matthew Pickering at 2023-08-16T09:35:04-04:00 configure: Add flag which turns ghc-toolchain check into error We want to catch these errors in CI, but first we need to a flag which turns this check into an error. - - - - - 6e2aa8e0 by Matthew Pickering at 2023-08-16T09:35:04-04:00 ci: Enable --enable-strict-ghc-toolchain-check for all CI jobs This will cause any CI job to fail if we have a mismatch between what ghc-toolchain reports and what ./configure natively reports. Fixing these kinds of issues is highest priority for 9.10 release. - - - - - 12d39e24 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 Pass user-specified options to ghc-toolchain The current user interface to configuring target toolchains is `./configure`. In !9263 we added a new tool to configure target toolchains called `ghc-toolchain`, but the blessed way of creating these toolchains is still through configure. However, we were not passing the user-specified options given with the `./configure` invocation to the ghc-toolchain tool. This commit remedies that by storing the user options and environment variables in USER_* variables, which then get passed to GHC-toolchain. The exception to the rule is the windows bundled toolchain, which overrides the USER_* variables with whatever flags the windows bundled toolchain requires to work. We consider the bundled toolchain to be effectively the user specifying options, since the actual user delegated that configuration work. Closes #23678 - - - - - f7b3c3a0 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 ghc-toolchain: Parse javascript and ghcjs as a Arch and OS - - - - - 8a0ae4ee by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 ghc-toolchain: Fix ranlib option - - - - - 31e9ec96 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 Check Link Works with -Werror - - - - - bc1998b3 by Matthew Pickering at 2023-08-16T09:35:04-04:00 Only check for no_compact_unwind support on darwin While writing ghc-toolchain we noticed that the FP_PROG_LD_NO_COMPACT_UNWIND check is subtly wrong. Specifically, we pass -Wl,-no_compact_unwind to cc. However, ld.gold interprets this as -n o_compact_unwind, which is a valid argument. Fixes #23676 - - - - - 0283f36e by Matthew Pickering at 2023-08-16T09:35:04-04:00 Add some javascript special cases to ghc-toolchain On javascript there isn't a choice of toolchain but some of the configure checks were not accurately providing the correct answer. 1. The linker was reported as gnu LD because the --version output mentioned gnu LD. 2. The --target flag makes no sense on javascript but it was just ignored by the linker, so we add a special case to stop ghc-toolchain thinking that emcc supports --target when used as a linker. - - - - - a48ec5f8 by Matthew Pickering at 2023-08-16T09:35:04-04:00 check for emcc in gnu_LD check - - - - - 50df2e69 by Matthew Pickering at 2023-08-16T09:35:04-04:00 Add ldOverrideWhitelist to only default to ldOverride on windows/linux On some platforms - ie darwin, javascript etc we really do not want to allow the user to use any linker other than the default one as this leads to all kinds of bugs. Therefore it is a bit more prudant to add a whitelist which specifies on which platforms it might be possible to use a different linker. - - - - - a669a39c by Matthew Pickering at 2023-08-16T09:35:04-04:00 Fix plaform glob in FPTOOLS_SET_C_LD_FLAGS A normal triple may look like x86_64-unknown-linux but when cross-compiling you get $target set to a quad such as.. aarch64-unknown-linux-gnu Which should also match this check. - - - - - c52b6769 by Matthew Pickering at 2023-08-16T09:35:04-04:00 ghc-toolchain: Pass ld-override onto ghc-toolchain - - - - - 039b484f by Matthew Pickering at 2023-08-16T09:35:04-04:00 ld override: Make whitelist override user given option - - - - - d2b63cbc by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: Add format mode to normalise differences before diffing. The "format" mode takes an "--input" and "--ouput" target file and formats it. This is intended to be useful on windows where the configure/ghc-toolchain target files can't be diffed very easily because the path separators are different. - - - - - f2b39e4a by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: Bump ci-images commit to get new ghc-wasm-meta We needed to remove -Wno-unused-command-line-argument from the arguments passed in order for the configure check to report correctly. See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10976#note_516335 - - - - - 92103830 by Matthew Pickering at 2023-08-16T09:35:05-04:00 configure: MergeObjsCmd - distinguish between empty string and unset variable If `MergeObjsCmd` is explicitly set to the empty string then we should assume that MergeObjs is just not supported. This is especially important for windows where we set MergeObjsCmd to "" in m4/fp_setup_windows_toolchain.m4. - - - - - 3500bb2c by Matthew Pickering at 2023-08-16T09:35:05-04:00 configure: Add proper check to see if object merging works - - - - - 08c9a014 by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: If MergeObjsCmd is not set, replace setting with Nothing If the user explicitly chooses to not set a MergeObjsCmd then it is correct to use Nothing for tgtMergeObjs field in the Target file. - - - - - c9071d94 by Matthew Pickering at 2023-08-16T09:35:05-04:00 HsCppArgs: Augment the HsCppOptions This is important when we pass -I when setting up the windows toolchain. - - - - - 294a6d80 by Matthew Pickering at 2023-08-16T09:35:05-04:00 Set USER_CPP_ARGS when setting up windows toolchain - - - - - bde4b5d4 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00 Improve handling of Cc as a fallback - - - - - f4c1c3a3 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00 ghc-toolchain: Configure Cpp and HsCpp correctly when user specifies flags In ghc-toolchain, we were only /not/ configuring required flags when the user specified any flags at all for the of the HsCpp and Cpp tools. Otherwise, the linker takes into consideration the user specified flags to determine whether to search for a better linker implementation, but already configured the remaining GHC and platform-specific flags regardless of the user options. Other Tools consider the user options as a baseline for further configuration (see `findProgram`), so #23689 is not applicable. Closes #23689 - - - - - bfe4ffac by Matthew Pickering at 2023-08-16T09:35:05-04:00 CPP_ARGS: Put new options after user specified options This matches up with the behaviour of ghc-toolchain, so that the output of both matches. - - - - - a6828173 by Gergő Érdi at 2023-08-16T09:35:41-04:00 If a defaulting plugin made progress, re-zonk wanteds before built-in defaulting Fixes #23821. - - - - - e2b38115 by Sylvain Henry at 2023-08-17T07:54:06-04:00 JS: implement openat(AT_FDCWD...) (#23697) Use `openSync` to implement `openat(AT_FDCWD...)`. - - - - - a975c663 by sheaf at 2023-08-17T07:54:47-04:00 Use unsatisfiable for missing methods w/ defaults When a class instance has an Unsatisfiable constraint in its context and the user has not explicitly provided an implementation of a method, we now always provide a RHS of the form `unsatisfiable @msg`, even if the method has a default definition available. This ensures that, when deferring type errors, users get the appropriate error message instead of a possible runtime loop, if class default methods were defined recursively. Fixes #23816 - - - - - 45ca51e5 by Ben Gamari at 2023-08-17T15:16:41-04:00 ghc-internal: Initial commit of the skeleton - - - - - 88bbf8c5 by Ben Gamari at 2023-08-17T15:16:41-04:00 ghc-experimental: Initial commit - - - - - 664468c0 by Ben Gamari at 2023-08-17T15:17:17-04:00 testsuite/cloneStackLib: Fix incorrect format specifiers - - - - - eaa835bb by Ben Gamari at 2023-08-17T15:17:17-04:00 rts/ipe: Fix const-correctness of IpeBufferListNode Both info tables and the string table should be `const` - - - - - 78f6f6fd by Ben Gamari at 2023-08-17T15:17:17-04:00 nonmoving: Drop dead debugging utilities These are largely superceded by support in the ghc-utils GDB extension. - - - - - 3f6e8f42 by Ben Gamari at 2023-08-17T15:17:17-04:00 nonmoving: Refactor management of mark thread Here we refactor that treatment of the worker thread used by the nonmoving GC for concurrent marking, avoiding creating a new thread with every major GC cycle. As well, the new scheme is considerably easier to reason about, consolidating all state in one place, accessed via a small set of accessors with clear semantics. - - - - - 88c32b7d by Ben Gamari at 2023-08-17T15:17:17-04:00 testsuite: Skip T23221 in nonmoving GC ways This test is very dependent upon GC behavior. - - - - - 381cfaed by Ben Gamari at 2023-08-17T15:17:17-04:00 ghc-heap: Don't expose stack dirty and marking fields These are GC metadata and are not relevant to the end-user. Moreover, they are unstable which makes ghc-heap harder to test than necessary. - - - - - 16828ca5 by Luite Stegeman at 2023-08-21T18:42:53-04:00 bump process submodule to include macOS fix and JS support - - - - - b4d5f6ed by Matthew Pickering at 2023-08-21T18:43:29-04:00 ci: Add support for triggering test-primops pipelines This commit adds 4 ways to trigger testing with test-primops. 1. Applying the ~test-primops label to a validate pipeline. 2. A manually triggered job on a validate pipeline 3. A nightly pipeline job 4. A release pipeline job Fixes #23695 - - - - - 32c50daa by Matthew Pickering at 2023-08-21T18:43:29-04:00 Add test-primops label support The test-primops CI job requires some additional builds in the validation pipeline, so we make sure to enable these jobs when test-primops label is set. - - - - - 73ca8340 by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "Aarch ncg: Optimize immediate use for address calculations" This reverts commit 8f3b3b78a8cce3bd463ed175ee933c2aabffc631. See #23793 - - - - - 5546ad9e by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "AArch NCG: Pure refactor" This reverts commit 00fb6e6b06598752414a0b9a92840fb6ca61338d. See #23793 - - - - - 02dfcdc2 by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "Aarch64 NCG: Use encoded immediates for literals." This reverts commit 40425c5021a9d8eb5e1c1046e2d5fa0a2918f96c. See #23793 ------------------------- Metric Increase: T4801 T5321FD T5321Fun ------------------------- - - - - - 7be4a272 by Matthew Pickering at 2023-08-22T08:55:20+01:00 ci: Remove manually triggered test-ci job This doesn't work on slimmed down pipelines as the needed jobs don't exist. If you want to run test-primops then apply the label. - - - - - 76a4d11b by Jaro Reinders at 2023-08-22T08:08:13-04:00 Remove Ptr example from roles docs - - - - - 069729d3 by Bryan Richter at 2023-08-22T08:08:49-04:00 Guard against duplicate pipelines in forks - - - - - f861423b by Rune K. Svendsen at 2023-08-22T08:09:35-04:00 dump-decls: fix "Ambiguous module name"-error Fixes errors of the following kind, which happen when dump-decls is run on a package that contains a module name that clashes with that of another package. ``` dump-decls: <no location info>: error: Ambiguous module name `System.Console.ANSI.Types': it was found in multiple packages: ansi-terminal-0.11.4 ansi-terminal-types-0.11.5 ``` - - - - - edd8bc43 by Krzysztof Gogolewski at 2023-08-22T12:31:20-04:00 Fix MultiWayIf linearity checking (#23814) Co-authored-by: Thomas BAGREL <thomas.bagrel at tweag.io> - - - - - 4ba088d1 by konsumlamm at 2023-08-22T12:32:02-04:00 Update `Control.Concurrent.*` documentation - - - - - 015886ec by ARATA Mizuki at 2023-08-22T15:13:13-04:00 Support 128-bit SIMD on AArch64 via LLVM backend - - - - - 52a6d868 by Krzysztof Gogolewski at 2023-08-22T15:13:51-04:00 Testsuite cleanup - Remove misleading help text in perf_notes, ways are not metrics - Remove no_print_summary - this was used for Phabricator - In linters tests, run 'git ls-files' just once. Previously, it was called on each has_ls_files() - Add ghc-prim.cabal to gitignore, noticed in #23726 - Remove ghc-prim.cabal, it was accidentally committed in 524c60c8cd - - - - - ab40aa52 by Alan Zimmerman at 2023-08-22T15:14:28-04:00 EPA: Use Introduce [DeclTag] in AnnSortKey The AnnSortKey is used to keep track of the order of declarations for printing when the container has split them apart. This applies to HsValBinds and ClassDecl, ClsInstDecl. When making modifications to the list of declarations, the new order must be captured for when it must be printed. For each list of declarations (binds and sigs for a HsValBind) we can just store the list in order. To recreate the list when printing, we must merge them, and this is what the AnnSortKey records. It used to be indexed by SrcSpan, we now simply index by a marker as to which list to take the next item from. - - - - - e7db36c1 by sheaf at 2023-08-23T08:41:28-04:00 Don't attempt pattern synonym error recovery This commit gets rid of the pattern synonym error recovery mechanism (recoverPSB). The rationale is that the fake pattern synonym binding that the recovery mechanism introduced could lead to undesirable knock-on errors, and it isn't really feasible to conjure up a satisfactory binding as pattern synonyms can be used both in expressions and patterns. See Note [Pattern synonym error recovery] in GHC.Tc.TyCl.PatSyn. It isn't such a big deal to eagerly fail compilation on a pattern synonym that doesn't typecheck anyway. Fixes #23467 - - - - - 6ccd9d65 by Ben Gamari at 2023-08-23T08:42:05-04:00 base: Don't use Data.ByteString.Internals.memcpy This function is now deprecated from `bytestring`. Use `Foreign.Marshal.Utils.copyBytes` instead. Fixes #23880. - - - - - 0bfa0031 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Uniformly pass buildOptions to all builders in runBuilder In Builder.hs, runBuilderWith mostly ignores the buildOptions in BuildInfo. This leads to hard to diagnose bugs as any build options you pass with runBuilderWithCmdOptions are ignored for many builders. Solution: Uniformly pass buildOptions to the invocation of cmd. Fixes #23845 - - - - - 9cac8f11 by Matthew Pickering at 2023-08-23T13:43:48-04:00 Abstract windows toolchain setup This commit splits up the windows toolchain setup logic into two functions. * FP_INSTALL_WINDOWS_TOOLCHAIN - deals with downloading the toolchain if it isn't already downloaded * FP_SETUP_WINDOWS_TOOLCHAIN - sets the environment variables to point to the correct place FP_SETUP_WINDOWS_TOOLCHAIN is abstracted from the location of the mingw toolchain and also the eventual location where we will install the toolchain in the installed bindist. This is the first step towards #23608 - - - - - 6c043187 by Matthew Pickering at 2023-08-23T13:43:48-04:00 Generate build.mk for bindists The config.mk.in script was relying on some variables which were supposed to be set by build.mk but therefore never were when used to install a bindist. Specifically * BUILD_PROF_LIBS to determine whether we had profiled libraries or not * DYNAMIC_GHC_PROGRAMS to determine whether we had shared libraries or not Not only were these never set but also not really accurate because you could have shared libaries but still statically linked ghc executable. In addition variables like GhcLibWays were just never used, so those have been deleted from the script. Now instead we generate a build.mk file which just directly specifies which RtsWays we have supplied in the bindist and whether we have DYNAMIC_GHC_PROGRAMS. - - - - - fe23629b by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Add reloc-binary-dist-* targets This adds a command line option to build a "relocatable" bindist. The bindist is created by first creating a normal bindist and then installing it using the `RelocatableBuild=YES` option. This creates a bindist without any wrapper scripts pointing to the libdir. The motivation for this feature is that we want to ship relocatable bindists on windows and this method is more uniform than the ad-hoc method which lead to bugs such as #23608 and #23476 The relocatable bindist can be built with the "reloc-binary-dist" target and supports the same suffixes as the normal "binary-dist" command to specify the compression style. - - - - - 41cbaf44 by Matthew Pickering at 2023-08-23T13:43:48-04:00 packaging: Fix installation scripts on windows/RelocatableBuild case This includes quite a lot of small fixes which fix the installation makefile to work on windows properly. This also required fixing the RelocatableBuild variable which seemed to have been broken for a long while. Sam helped me a lot writing this patch by providing a windows machine to test the changes. Without him it would have taken ages to tweak everything. Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 03474456 by Matthew Pickering at 2023-08-23T13:43:48-04:00 ci: Build relocatable bindist on windows We now build the relocatable bindist target on windows, which means we test and distribute the new method of creating a relocatable bindist. - - - - - d0b48113 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Add error when trying to build binary-dist target on windows The binary dist produced by `binary-dist` target doesn't work on windows because of the wrapper script the makefile installs. In order to not surprise any packagers we just give an error if someone tries to build the old binary-dist target rather than the reloc-binary-dist target. - - - - - 7cbf9361 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Remove query' logic to use tooldir - - - - - 03fad42e by Matthew Pickering at 2023-08-23T13:43:48-04:00 configure: Set WindresCmd directly and removed unused variables For some reason there was an indirection via the Windres variable before setting WindresCmd. That indirection led to #23855. I then also noticed that these other variables were just not used anywhere when trying to work out what the correct condition was for this bit of the configure script. - - - - - c82770f5 by sheaf at 2023-08-23T13:43:48-04:00 Apply shellcheck suggestion to SUBST_TOOLDIR - - - - - 896e35e5 by sheaf at 2023-08-23T13:44:34-04:00 Compute hints from TcSolverReportMsg This commit changes how hints are handled in conjunction with constraint solver report messages. Instead of storing `[GhcHint]` in the TcRnSolverReport error constructor, we compute the hints depending on the underlying TcSolverReportMsg. This disentangles the logic and makes it easier to add new hints for certain errors. - - - - - a05cdaf0 by Alexander Esgen at 2023-08-23T13:45:16-04:00 users-guide: remove note about fatal Haddock parse failures - - - - - 4908d798 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Introduce Data.Enum - - - - - f59707c7 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num.Integer - - - - - b1054053 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num - - - - - 6baa481d by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num.Natural - - - - - 2ac15233 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Float - - - - - f3c489de by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Real - - - - - 94f59eaa by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Eliminate module reexport in GHC.Exception The metric increase here isn't strictly due to this commit but it's a rather small, incidental change. Metric Increase: T8095 T13386 Metric Decrease: T8095 T13386 T18304 - - - - - be1fc7df by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add disclaimers in internal modules To warn users that these modules are internal and their interfaces may change with little warning. As proposed in Core Libraries Committee #146 [CLC146]. [CLC146]: https://github.com/haskell/core-libraries-committee/issues/146 - - - - - 0326f3f4 by sheaf at 2023-08-23T17:37:29-04:00 Bump Cabal submodule We need to bump the Cabal submodule to include commit ec75950 which fixes an issue with a dodgy import Rep(..) which relied on GHC bug #23570 - - - - - 0504cd08 by Facundo Domínguez at 2023-08-23T17:38:11-04:00 Fix typos in the documentation of Data.OldList.permutations - - - - - 1420b8cb by Antoine Leblanc at 2023-08-24T16:18:17-04:00 Be more eager in TyCon boot validity checking This commit performs boot-file consistency checking for TyCons into checkValidTyCl. This ensures that we eagerly catch any mismatches, which prevents the compiler from seeing these inconsistencies and panicking as a result. See Note [TyCon boot consistency checking] in GHC.Tc.TyCl. Fixes #16127 - - - - - d99c816f by Finley McIlwaine at 2023-08-24T16:18:55-04:00 Refactor estimation of stack info table provenance This commit greatly refactors the way we compute estimated provenance for stack info tables. Previously, this process was done using an entirely separate traversal of the whole Cmm code stream to build the map from info tables to source locations. The separate traversal is now fused with the Cmm code generation pipeline in GHC.Driver.Main. This results in very significant code generation speed ups when -finfo-table-map is enabled. In testing, this patch reduces code generation times by almost 30% with -finfo-table-map and -O0, and 60% with -finfo-table-map and -O1 or -O2 . Fixes #23103 - - - - - d3e0124c by Finley McIlwaine at 2023-08-24T16:18:55-04:00 Add a test checking overhead of -finfo-table-map We want to make sure we don't end up with poor codegen performance resulting from -finfo-table-map again as in #23103. This test adds a performance test tracking total allocations while compiling ExactPrint with -finfo-table-map. - - - - - fcfc1777 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Add export list to GHC.Llvm.MetaData - - - - - 5880fff6 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Allow LlvmLits in MetaExprs This omission appears to be an oversight. - - - - - 86ce92a2 by Ben Gamari at 2023-08-25T10:58:16-04:00 compiler: Move platform feature predicates to GHC.Driver.DynFlags These are useful in `GHC.Driver.Config.*`. - - - - - a6a38742 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Introduce infrastructure for module flag metadata - - - - - e9af2cf3 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Don't pass stack alignment via command line As of https://reviews.llvm.org/D103048 LLVM no longer supports the `-stack-alignment=...` flag. Instead this information is passed via a module flag metadata node. This requires dropping support for LLVM 11 and 12. Fixes #23870 - - - - - a936f244 by Alan Zimmerman at 2023-08-25T10:58:56-04:00 EPA: Keep track of "in" token for WarningTxt category A warning can now be written with a category, e.g. {-# WARNInG in "x-c" e "d" #-} Keep track of the location of the 'in' keyword and string, as well as the original SourceText of the label, in case it uses character escapes. - - - - - 3df8a653 by Matthew Pickering at 2023-08-25T17:42:18-04:00 Remove redundant import in InfoTableProv The copyBytes function is provided by the import of Foreign. Fixes #23889 - - - - - d6f807ec by Ben Gamari at 2023-08-25T17:42:54-04:00 gitlab/issue-template: Mention report-a-bug - - - - - 50b9f75d by Artin Ghasivand at 2023-08-26T20:02:50+03:30 Added StandaloneKindSignature examples to replace CUSKs ones - - - - - 2f6309a4 by Vladislav Zavialov at 2023-08-27T03:47:37-04:00 Remove outdated CPP in compiler/* and template-haskell/* The boot compiler was bumped to 9.4 in cebb5819b43. There is no point supporting older GHC versions with CPP. - - - - - 5248fdf7 by Zubin Duggal at 2023-08-28T15:01:09+05:30 testsuite: Add regression test for #23861 Simon says this was fixed by commit 8d68685468d0b6e922332a3ee8c7541efbe46137 Author: sheaf <sam.derbyshire at gmail.com> Date: Fri Aug 4 15:28:45 2023 +0200 Remove zonk in tcVTA - - - - - b6903f4d by Zubin Duggal at 2023-08-28T12:33:58-04:00 testsuite: Add regression test for #23864 Simon says this was fixed by commit 59202c800f2c97c16906120ab2561f6e1556e4af Author: Sebastian Graf <sebastian.graf at kit.edu> Date: Fri Mar 31 17:35:22 2023 +0200 CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now. The main reason is that it plays far better in conjunction with eta expansion (as we aim to do for arguments in CorePrep, #23083), because we can discard any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta` it's impossible to discard the argument. - - - - - 9eecdf33 by sheaf at 2023-08-28T18:54:06+00:00 Remove ScopedTypeVariables => TypeAbstractions This commit implements [amendment 604](https://github.com/ghc-proposals/ghc-proposals/pull/604/) to [GHC proposal 448](https://github.com/ghc-proposals/ghc-proposals/pull/448) by removing the implication of language extensions ScopedTypeVariables => TypeAbstractions To limit breakage, we now allow type arguments in constructor patterns when both ScopedTypeVariables and TypeApplications are enabled, but we emit a warning notifying the user that this is deprecated behaviour that will go away starting in GHC 9.12. Fixes #23776 - - - - - fadd5b4d by sheaf at 2023-08-28T18:54:06+00:00 .stderr: ScopedTypeVariables =/> TypeAbstractions This commit accepts testsuite changes for the changes in the previous commit, which mean that TypeAbstractions is no longer implied by ScopedTypeVariables. - - - - - 4f5fb500 by Greg Steuck at 2023-08-29T07:55:13-04:00 Repair `codes` test on OpenBSD by explicitly requesting extended RE - - - - - 6bbde581 by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Add test for #23540 `T23540.hs` makes use of `explainEv` from `HieQueries.hs`, so `explainEv` has been moved to `TestUtils.hs`. - - - - - 257bb3bd by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Add test for #23120 - - - - - 4f192947 by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Make some evidence uses reachable by toHie Resolves #23540, #23120 This adds spans to certain expressions in the typechecker and renamer, and lets 'toHie' make use of those spans. Therefore the relevant evidence uses for the following syntax will now show up under the expected nodes in 'HieAst's: - Overloaded literals ('IsString', 'Num', 'Fractional') - Natural patterns and N+k patterns ('Eq', 'Ord', and instances from the overloaded literals being matched on) - Arithmetic sequences ('Enum') - Monadic bind statements ('Monad') - Monadic body statements ('Monad', 'Alternative') - ApplicativeDo ('Applicative', 'Functor') - Overloaded lists ('IsList') Also see Note [Source locations for implicit function calls] In the process of handling overloaded lists I added an extra 'SrcSpan' field to 'VAExpansion' - this allows us to more accurately reconstruct the locations from the renamer in 'rebuildHsApps'. This also happens to fix #23120. See the additions to Note [Looking through HsExpanded] - - - - - fe9fcf9d by Sylvain Henry at 2023-08-29T12:07:50-04:00 ghc-heap: rename C file (fix #23898) - - - - - b60d6576 by Krzysztof Gogolewski at 2023-08-29T12:08:29-04:00 Misc cleanup - Builtin.PrimOps: ReturnsAlg was used only for unboxed tuples. Rename to ReturnsTuple. - Builtin.Utils: use SDoc for a panic message. The comment about <<details unavailable>> was obsoleted by e8d356773b56. - TagCheck: fix wrong logic. It was zipping a list 'args' with its version 'args_cmm' after filtering. - Core.Type: remove an outdated 1999 comment about unlifted polymorphic types - hadrian: remove leftover debugging print - - - - - 3054fd6d by Krzysztof Gogolewski at 2023-08-29T12:09:08-04:00 Add a regression test for #23903 The bug has been fixed by commit bad2f8b8aa8424. - - - - - 21584b12 by Ben Gamari at 2023-08-29T19:52:02-04:00 README: Refer to ghc-hq repository for contributor and governance information - - - - - e542d590 by sheaf at 2023-08-29T19:52:40-04:00 Export setInertSet from GHC.Tc.Solver.Monad We used to export getTcSInerts and setTcSInerts from GHC.Tc.Solver.Monad. These got renamed to getInertSet/setInertSet in e1590ddc. That commit also removed the export of setInertSet, but that function is useful for the GHC API. - - - - - 694ec5b1 by sheaf at 2023-08-30T10:18:32-04:00 Don't bundle children for non-parent Avails We used to bundle all children of the parent Avail with things that aren't the parent, e.g. with class C a where type T a meth :: .. we would bundle the whole Avail (C, T, meth) with all of C, T and meth, instead of only with C. Avoiding this fixes #23570 - - - - - d926380d by Krzysztof Gogolewski at 2023-08-30T10:19:08-04:00 Fix typos - - - - - d07080d2 by Josh Meredith at 2023-08-30T19:42:32-04:00 JS: Implement missing C functions `rename`, `realpath`, and `getcwd` (#23806) - - - - - e2940272 by David Binder at 2023-08-30T19:43:08-04:00 Bump submodules of hpc and hpc-bin to version 0.7.0.0 hpc 0.7.0.0 dropped SafeHaskell safety guarantees in order to simplify compatibility with newer versions of the directory package which dropped all SafeHaskell guarantees. - - - - - 5d56d05c by David Binder at 2023-08-30T19:43:08-04:00 Bump hpc bound in ghc.cabal.in - - - - - 99fff496 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 ghc classes documentation: rm redundant comment - - - - - fe021bab by Dominik Schrempf at 2023-08-31T00:04:46-04:00 prelude documentation: various nits - - - - - 48c84547 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 integer documentation: minor corrections - - - - - 20cd12f4 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 real documentation: nits - - - - - dd39bdc0 by sheaf at 2023-08-31T00:05:27-04:00 Add a test for #21765 This issue (of reporting a constraint as being redundant even though removing it causes typechecking to fail) was fixed in aed1974e. This commit simply adds a regression test. Fixes #21765 - - - - - f1ec3628 by Andrew Lelechenko at 2023-08-31T23:53:30-04:00 Export foldl' from Prelude and bump submodules See https://github.com/haskell/core-libraries-committee/issues/167 for discussion Metric Decrease: T8095 T13386 Metric Increase: T13386 T8095 T8095 ghc/alloc decreased on x86_64, but increased on aarch64. T13386 ghc/alloc decreased on x86_64-windows, but increased on other platforms. Neither has anything to do with `foldl'`, so I conclude that both are flaky. - - - - - 3181b97d by Gergő Érdi at 2023-08-31T23:54:06-04:00 Allow cross-tyvar defaulting proposals from plugins Fixes #23832. - - - - - 495b2241 by Matthew Pickering at 2023-09-01T13:02:07+02:00 Fix issue with duplicate reexported definitions (T23616) When a class method was reexported, it's default methods were also showing up in the generated html page. The simplest and most non-invasive fix is to not look for the default method if we are just exporting the class method.. because the backends are just showing default methods when the whole class is exported. In general it would be worthwhile to rewrite this bit of code I think as the logic and what gets included is split over `lookupDocs` and `availExportDecl` it would be clearer to combine the two. The result of lookupDocs is always just passed to availExportDecl so it seems simpler and more obvious to just write the function directly. - - - - - e4af506e by Sebastian Graf at 2023-09-01T14:29:12-04:00 Clarify Note [GlobalId/LocalId] after CorePrep (#23797) Fixes #23797. - - - - - ac29787c by Sylvain Henry at 2023-09-01T14:30:02-04:00 Fix warning with UNPACK on sum type (#23921) - - - - - 9765ac7b by Zubin Duggal at 2023-09-05T00:37:45-04:00 hadrian: track python dependencies in doc rules - - - - - 1578215f by sheaf at 2023-09-05T00:38:26-04:00 Bump Haddock to fix #23616 This commit updates the Haddock submodule to include the fix to #23616. Fixes #23616 - - - - - 5a2fe35a by David Binder at 2023-09-05T00:39:07-04:00 Fix example in GHC user guide in SafeHaskell section The example given in the SafeHaskell section uses an implementation of Monad which no longer works. This MR removes the non-canonical return instance and adds the necessary instances of Functor and Applicative. - - - - - 291d81ae by Matthew Pickering at 2023-09-05T14:03:10-04:00 driver: Check transitive closure of haskell package dependencies when deciding whether to relink We were previously just checking whether direct package dependencies had been modified. This caused issues when compiling without optimisations as we wouldn't relink the direct dependency if one of its dependenices changed. Fixes #23724 - - - - - 35da0775 by Krzysztof Gogolewski at 2023-09-05T14:03:47-04:00 Re-export GHC.Utils.Panic.Plain from GHC.Utils.Panic Fixes #23930 - - - - - 6551824d by Finley McIlwaine at 2023-09-05T13:06:57-07:00 Remove fake export of `FUN` from Prelude This prevents `data FUN` from being shown at the top of the Prelude docs. Fixes \#23920 on GHC. - - - - - 3930d793 by Jaro Reinders at 2023-09-06T18:42:55-04:00 Make STG rewriter produce updatable closures - - - - - 0104221a by Krzysztof Gogolewski at 2023-09-06T18:43:32-04:00 configure: update message to use hadrian (#22616) - - - - - b34f8586 by Alan Zimmerman at 2023-09-07T10:58:38-04:00 EPA: Incorrect locations for UserTyVar with '@' In T13343.hs, the location for the @ is not within the span of the surrounding UserTyVar. type Bad @v = (forall (v1 :: RuntimeRep) (a1 :: TYPE v). a1) :: TYPE v Widen it so it is captured. Closes #23887 - - - - - 8046f020 by Finley McIlwaine at 2023-09-07T10:59:15-04:00 Bump haddock submodule to fix #23920 Removes the fake export of `FUN` from Prelude. Fixes #23920. Bumps haddock submodule. - - - - - e0aa8c6e by Krzysztof Gogolewski at 2023-09-07T11:00:03-04:00 Fix wrong role in mkSelCo_maybe In the Lint failure in #23938, we start with a coercion Refl :: T a ~R T a, and call mkSelCo (SelTyCon 1 nominal) Refl. The function incorrectly returned Refl :: a ~R a. The returned role should be nominal, according to the SelCo rule: co : (T s1..sn) ~r0 (T t1..tn) r = tyConRole tc r0 i ---------------------------------- SelCo (SelTyCon i r) : si ~r ti In this test case, r is nominal while r0 is representational. - - - - - 1d92f2df by Gergő Érdi at 2023-09-08T04:04:30-04:00 If we have multiple defaulting plugins, then we should zonk in between them after any defaulting has taken place, to avoid a defaulting plugin seeing a metavariable that has already been filled. Fixes #23821. - - - - - eaee4d29 by Gergő Érdi at 2023-09-08T04:04:30-04:00 Improvements to the documentation of defaulting plugins Based on @simonpj's draft and comments in !11117 - - - - - ede3df27 by Alan Zimmerman at 2023-09-08T04:05:06-04:00 EPA: Incorrect span for LWarnDec GhcPs The code (from T23465.hs) {-# WARNInG in "x-c" e "d" #-} e = e gives an incorrect span for the LWarnDecl GhcPs Closes #23892 It also fixes the Test23465/Test23464 mixup - - - - - a0ccef7a by Krzysztof Gogolewski at 2023-09-08T04:05:42-04:00 Valid hole fits: don't suggest unsafeCoerce (#17940) - - - - - 9ab5a448 by Alan Zimmerman at 2023-09-08T18:26:53+01:00 Match changes in wip/az/T23885-unicode-funtycon - - - - - 88b942c4 by Oleg Grenrus at 2023-09-08T19:58:42-04:00 Add warning for badly staged types. Resolves #23829. The stage violation results in out-of-bound names in splices. Technically this is an error, but someone might rely on this!? Internal changes: - we now track stages for TyVars. - thLevel (RunSplice _) = 0, instead of panic, as reifyInstances does in fact rename its argument type, and it can contain variables. - - - - - 9861f787 by Ben Gamari at 2023-09-08T19:59:19-04:00 rts: Fix invalid symbol type I suspect this code is dead since we haven't observed this failing despite the obviously incorrect macro name. - - - - - 03ed6a9a by Ben Gamari at 2023-09-08T19:59:19-04:00 testsuite: Add simple test exercising C11 atomics in GHCi See #22012. - - - - - 1aa5733a by Ben Gamari at 2023-09-08T19:59:19-04:00 rts/RtsSymbols: Add AArch64 outline atomic operations Fixes #22012 by adding the symbols described in https://github.com/llvm/llvm-project/blob/main/llvm/docs/Atomics.rst#libcalls-atomic. Ultimately this would be better addressed by #22011, but this is a first step in the right direction and fixes the immediate symptom. Note that we dropped the `__arch64_cas16` operations as these provided by all platforms's compilers. Also, we don't link directly against the libgcc/compiler-rt definitions but rather provide our own wrappers to work around broken toolchains (e.g. https://bugs.gentoo.org/868018). Generated via https://gitlab.haskell.org/ghc/ghc/-/snippets/5733. - - - - - 8f7d3041 by Matthew Pickering at 2023-09-08T19:59:55-04:00 ci: Build debian12 and fedora38 bindists This adds builds for the latest releases for fedora and debian We build these bindists in nightly and release pipelines. - - - - - a1f0d55c by Felix Leitz at 2023-09-08T20:00:37-04:00 Fix documentation around extension implication for MultiParamTypeClasses/ConstrainedClassMethods. - - - - - 98166389 by Teo Camarasu at 2023-09-12T04:30:54-04:00 docs: move -xn flag beside --nonmoving-gc It makes sense to have these beside each other as they are aliases. - - - - - f367835c by Teo Camarasu at 2023-09-12T04:30:55-04:00 nonmoving: introduce a family of dense allocators Supplement the existing power 2 sized nonmoving allocators with a family of dense allocators up to a configurable threshold. This should reduce waste from rounding up block sizes while keeping the amount of allocator sizes manageable. This patch: - Adds a new configuration option `--nonmoving-dense-allocator-count` to control the amount of these new dense allocators. - Adds some constants to `NonmovingAllocator` in order to keep marking fast with the new allocators. Resolves #23340 - - - - - 2b07bf2e by Teo Camarasu at 2023-09-12T04:30:55-04:00 Add changelog entry for #23340 - - - - - f96fe681 by sheaf at 2023-09-12T04:31:44-04:00 Use printGhciException in run{Stmt, Decls} When evaluating statements in GHCi, we need to use printGhciException instead of the printException function that GHC provides in order to get the appropriate error messages that are customised for ghci use. - - - - - d09b932b by psilospore at 2023-09-12T04:31:44-04:00 T23686: Suggest how to enable Language Extension when in ghci Fixes #23686 - - - - - da30f0be by Matthew Craven at 2023-09-12T04:32:24-04:00 Unarise: Split Rubbish literals in function args Fixes #23914. Also adds a check to STG lint that these args are properly unary or nullary after unarisation - - - - - 261b6747 by Matthew Pickering at 2023-09-12T04:33:04-04:00 darwin: Bump MAXOSX_DEPLOYMENT_TARGET to 10.13 This bumps the minumum supported version to 10.13 (High Sierra) which is 6 years old at this point. Fixes #22938 - - - - - f418f919 by Mario Blažević at 2023-09-12T04:33:45-04:00 Fix TH pretty-printing of nested GADTs, issue #23937 This commit fixes `Language.Haskell.TH.Ppr.pprint` so that it correctly pretty-prints GADTs declarations contained within data family instances. Fixes #23937 - - - - - d7a64753 by John Ericson at 2023-09-12T04:34:20-04:00 Put hadrian non-bootstrap plans through `jq` This makes it possible to review changes with conventional diffing tools. This is picking up where ad8cfed4195b1bbfc15b841f010e75e71f63157d left off. - - - - - ff0a709a by Sylvain Henry at 2023-09-12T08:46:28-04:00 JS: fix some tests - Tests using Setup programs need to pass --with-hc-pkg - Several other fixes See https://gitlab.haskell.org/ghc/ghc/-/wikis/javascript-backend/bug_triage for the current status - - - - - fc86f0e7 by Krzysztof Gogolewski at 2023-09-12T08:47:04-04:00 Fix in-scope set assertion failure (#23918) Patch by Simon - - - - - 21a906c2 by Matthew Pickering at 2023-09-12T17:21:04+02:00 Add -Winconsistent-flags warning The warning fires when inconsistent command line flags are passed. For example: * -dynamic-too and -dynamic * -dynamic-too on windows * -O and --interactive * etc This is on by default and allows users to control whether the warning is displayed and whether it should be an error or not. Fixes #22572 - - - - - dfc4f426 by Krzysztof Gogolewski at 2023-09-12T20:31:35-04:00 Avoid serializing BCOs with the internal interpreter Refs #23919 - - - - - 9217950b by Finley McIlwaine at 2023-09-13T08:06:03-04:00 Fix numa auto configure - - - - - 98e7c1cf by Simon Peyton Jones at 2023-09-13T08:06:40-04:00 Add -fno-cse to T15426 and T18964 This -fno-cse change is to avoid these performance tests depending on flukey CSE stuff. Each contains several independent tests, and we don't want them to interact. See #23925. By killing CSE we expect a 400% increase in T15426, and 100% in T18964. Metric Increase: T15426 T18964 - - - - - 236a134e by Simon Peyton Jones at 2023-09-13T08:06:40-04:00 Tiny refactor canEtaReduceToArity was only called internally, and always with two arguments equal to zero. This patch just specialises the function, and renames it to cantEtaReduceFun. No change in behaviour. - - - - - 56b403c9 by Ben Gamari at 2023-09-13T19:21:36-04:00 spec-constr: Lift argument limit for SPEC-marked functions When the user adds a SPEC argument to a function, they are informing us that they expect the function to be specialised. However, previously this instruction could be preempted by the specialised-argument limit (sc_max_args). Fix this. This fixes #14003. - - - - - 6840012e by Simon Peyton Jones at 2023-09-13T19:22:13-04:00 Fix eta reduction Issue #23922 showed that GHC was bogusly eta-reducing a join point. We should never eta-reduce (\x -> j x) to j, if j is a join point. It is extremly difficult to trigger this bug. It took me 45 mins of trying to make a small tests case, here immortalised as T23922a. - - - - - e5c00092 by Andreas Klebinger at 2023-09-14T08:57:43-04:00 Profiling: Properly escape characters when using `-pj`. There are some ways in which unusual characters like quotes or others can make it into cost centre names. So properly escape these. Fixes #23924 - - - - - ec490578 by Ellie Hermaszewska at 2023-09-14T08:58:24-04:00 Use clearer example variable names for bool eliminator - - - - - 5126a2fe by Sylvain Henry at 2023-09-15T11:18:02-04:00 Add missing int64/word64-to-double/float rules (#23907) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/203 - - - - - 566ef411 by Mario Blažević at 2023-09-15T11:18:43-04:00 Fix and test TH pretty-printing of type operator role declarations This commit fixes and tests `Language.Haskell.TH.Ppr.pprint` so that it correctly pretty-prints `type role` declarations for operator names. Fixes #23954 - - - - - 8e05c54a by Simon Peyton Jones at 2023-09-16T01:42:33-04:00 Use correct FunTyFlag in adjustJoinPointType As the Lint error in #23952 showed, the function adjustJoinPointType was failing to adjust the FunTyFlag when adjusting the type. I don't think this caused the seg-fault reported in the ticket, but it is definitely. This patch fixes it. It is tricky to come up a small test case; Krzysztof came up with this one, but it only triggers a failure in GHC 9.6. - - - - - 778c84b6 by Pierre Le Marre at 2023-09-16T01:43:15-04:00 Update to Unicode 15.1.0 See: https://www.unicode.org/versions/Unicode15.1.0/ - - - - - f9d79a6c by Alan Zimmerman at 2023-09-18T00:00:14-04:00 EPA: track unicode version for unrestrictedFunTyCon Closes #23885 Updates haddock submodule - - - - - 9374f116 by Andrew Lelechenko at 2023-09-18T00:00:54-04:00 Bump parsec submodule to allow text-2.1 and bytestring-0.12 - - - - - 7ca0240e by Ben Gamari at 2023-09-18T15:16:48-04:00 base: Advertise linear time of readFloat As noted in #23538, `readFloat` has runtime that scales nonlinearly in the size of its input. Consequently, its use on untrusted input can be exploited as a denial-of-service vector. Point this out and suggest use of `read` instead. See #23538. - - - - - f3f58f13 by Simon Peyton Jones at 2023-09-18T15:17:24-04:00 Remove dead code GHC.CoreToStg.Prep.canFloat This function never fires, so we can delete it: #23965. - - - - - ccab5b15 by Ben Gamari at 2023-09-18T15:18:02-04:00 base/changelog: Move fix for #23907 to 9.8.1 section Since the fix was backported to 9.8.1 - - - - - 51b57d65 by Matthew Pickering at 2023-09-19T08:44:31-04:00 Add aarch64 alpine bindist This is dynamically linked and makes creating statically linked executables more straightforward. Fixes #23482 - - - - - 02c87213 by Matthew Pickering at 2023-09-19T08:44:31-04:00 Add aarch64-deb11 bindist This adds a debian 11 release job for aarch64. Fixes #22005 - - - - - 8b61dfd6 by Alexis King at 2023-09-19T08:45:13-04:00 Don’t store the async exception masking state in CATCH frames - - - - - 86d2971e by doyougnu at 2023-09-19T19:08:19-04:00 compiler,ghci: error codes link to HF error index closes: #23259 - adds -fprint-error-index-links={auto|always|never} flag - - - - - 5f826c18 by sheaf at 2023-09-19T19:09:03-04:00 Pass quantified tyvars in tcDefaultAssocDecl This commit passes the correct set of quantified type variables written by the user in associated type default declarations for validity checking. This ensures that validity checking of associated type defaults mirrors that of standalone type family instances. Fixes #23768 (see testcase T23734 in subsequent commit) - - - - - aba18424 by sheaf at 2023-09-19T19:09:03-04:00 Avoid panic in mkGADTVars This commit avoids panicking in mkGADTVars when we encounter a type variable as in #23784 that is bound by a user-written forall but not actually used. Fixes #23784 - - - - - a525a92a by sheaf at 2023-09-19T19:09:03-04:00 Adjust reporting of unused tyvars in data FamInsts This commit adjusts the validity checking of data family instances to improve the reporting of unused type variables. See Note [Out of scope tvs in data family instances] in GHC.Tc.Validity. The problem was that, in a situation such as data family D :: Type data instance forall (d :: Type). D = MkD the RHS passed to 'checkFamPatBinders' would be the TyCon app R:D d which mentions the type variable 'd' quantified in the user-written forall. Thus, when computing the set of unused type variables in the RHS of the data family instance, we would find that 'd' is used, and report a strange error message that would say that 'd' is not bound on the LHS. To fix this, we special-case the data-family instance case, manually extracting all the type variables that appear in the arguments of all the data constructores of the data family instance. Fixes #23778 - - - - - 28dd52ee by sheaf at 2023-09-19T19:09:03-04:00 Unused tyvars in FamInst: only report user tyvars This commit changes how we perform some validity checking for coercion axioms to mirror how we handle default declarations for associated type families. This allows us to keep track of whether type variables in type and data family instances were user-written or not, in order to only report the user-written ones in "unused type variable" error messages. Consider for example: {-# LANGUAGE PolyKinds #-} type family F type instance forall a. F = () In this case, we get two quantified type variables, (k :: Type) and (a :: k); the second being user-written, but the first is introduced by the typechecker. We should only report 'a' as being unused, as the user has no idea what 'k' is. Fixes #23734 - - - - - 1eed645c by sheaf at 2023-09-19T19:09:03-04:00 Validity: refactor treatment of data families This commit refactors the reporting of unused type variables in type and data family instances to be more principled. This avoids ad-hoc logic in the treatment of data family instances. - - - - - 35bc506b by John Ericson at 2023-09-19T19:09:40-04:00 Remove `ghc-cabal` It is dead code since the Make build system was removed. I tried to go over every match of `git grep -i ghc-cabal` to find other stray bits. Some of those might be workarounds that can be further removed. - - - - - 665ca116 by John Paul Adrian Glaubitz at 2023-09-19T19:10:39-04:00 Re-add unregisterised build support for sparc and sparc64 Closes #23959 - - - - - 142f8740 by Matthew Pickering at 2023-09-19T19:11:16-04:00 Bump ci-images to use updated version of Alex Fixes #23977 - - - - - fa977034 by John Ericson at 2023-09-21T12:55:25-04:00 Use Cabal 3.10 for Hadrian We need the newer version for `CABAL_FLAG_*` env vars for #17191. - - - - - a5d22cab by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: `need` any `configure` script we will call When the script is changed, we should reconfigure. - - - - - db882b57 by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: Make it easier to debug Cabal configure Right now, output is squashed. This make per-package configure scripts extremely hard to maintain, because we get vague "library is missing" errors when the actually probably is usually completely unrelated except for also involving the C/C++ toolchain. (I can always pass `-VVV` to Hadrian locally, but these errors are subtle and I often cannot reproduce them locally!) `--disable-option-checking` was added back in 75c6e0684dda585c37b4ac254cd7a13537a59a91 but seems to be a bit overkill; if other flags are passed that are not recognized behind the two from Cabal mentioned in the former comment, we *do* want to know about it. - - - - - 7ed65f5a by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: Increase verbosity of certain cabal commands This is a hack to get around the cabal function we're calling *decreasing* the verbosity it passes to another function, which is the stuff we often actually care about. Sigh. Keeping this a separate commit so if this makes things too verbose it is easy to revert. - - - - - a4fde569 by John Ericson at 2023-09-21T12:55:25-04:00 rts: Move most external symbols logic to the configure script This is much more terse because we are programmatically handling the leading underscore. `findPtr` however is still handled in the Cabal file because we need a newer Cabal to pass flags to the configure script automatically. Co-Authored-By: Ben Gamari <ben at well-typed.com> - - - - - 56cc85fb by Andrew Lelechenko at 2023-09-21T12:56:21-04:00 Bump Cabal submodule to allow text-2.1 and bytestring-0.12 - - - - - 0cd6148c by Matthew Pickering at 2023-09-21T12:56:21-04:00 hadrian: Generate Distribution/Fields/Lexer.x before creating a source-dist - - - - - b10ba6a3 by Andrew Lelechenko at 2023-09-21T12:56:21-04:00 Bump hadrian's index-state to upgrade alex at least to 3.2.7.3 - - - - - 11ecc37b by Luite Stegeman at 2023-09-21T12:57:03-04:00 JS: correct file size and times Programs produced by the JavaScript backend were returning incorrect file sizes and modification times, causing cabal related tests to fail. This fixes the problem and adds an additional test that verifies basic file information operations. fixes #23980 - - - - - b35fd2cd by Ben Gamari at 2023-09-21T12:57:39-04:00 gitlab-ci: Drop libiserv from upload_ghc_libs libiserv has been merged into the ghci package. - - - - - 37ad04e8 by Ben Gamari at 2023-09-21T12:58:15-04:00 testsuite: Fix Windows line endings - - - - - 5795b365 by Ben Gamari at 2023-09-21T12:58:15-04:00 testsuite: Use makefile_test - - - - - 15118740 by Ben Gamari at 2023-09-21T12:58:55-04:00 system-cxx-std-lib: Add license and description - - - - - 0208f1d5 by Ben Gamari at 2023-09-21T12:59:33-04:00 gitlab/issue-templates: Rename bug.md -> default.md So that it is visible by default. - - - - - 23cc3f21 by Andrew Lelechenko at 2023-09-21T20:18:11+01:00 Bump submodule text to 2.1 - - - - - b8e4fe23 by Andrew Lelechenko at 2023-09-22T20:05:05-04:00 Bump submodule unix to 2.8.2.1 - - - - - 54b2016e by John Ericson at 2023-09-23T11:40:41-04:00 Move lib{numa,dw} defines to RTS configure Clean up the m4 to handle the auto case always and be more consistent. Also simplify the CPP --- we should always have both headers if we are using libnuma. "side effects" (AC_DEFINE, and AC_SUBST) are removed from the macros to better separate searching from actions taken based on search results. This might seem overkill now, but will make shuffling logic between configure scripts easier later. The macro comments are converted from `dnl` to `#` following the recomendation in https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Macro-Definitions.html - - - - - d51b601b by John Ericson at 2023-09-23T11:40:50-04:00 Shuffle libzstd configuring between scripts Like the prior commit for libdw and libnuma, `AC_DEFINE` to RTS configure, `AC_SUBST` goes to the top-level configure script, and the documentation of the m4 macro is improved. - - - - - d1425af0 by John Ericson at 2023-09-23T11:41:03-04:00 Move `FP_ARM_OUTLINE_ATOMICS` to RTS configure It is just `AC_DEFINE` it belongs there instead. - - - - - 18de37e4 by John Ericson at 2023-09-23T11:41:03-04:00 Move mmap in the runtime linker check to the RTS configure `AC_DEFINE` should go there instead. - - - - - 74132c2b by Andrew Lelechenko at 2023-09-25T21:56:54-04:00 Elaborate comment on GHC_NO_UNICODE - - - - - de142aa2 by Ben Gamari at 2023-09-26T15:25:03-04:00 gitlab-ci: Mark T22012 as broken on CentOS 7 Due to #23979. - - - - - 6a896ce8 by Teo Camarasu at 2023-09-26T15:25:39-04:00 hadrian: better error for failing to find file's dependencies Resolves #24004 - - - - - d697a6c2 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Refactor uses of `partitionEithers . map` This patch changes occurences of the idiom `partitionEithers (map f xs)` by the simpler form `partitionWith f xs` where `partitionWith` is the utility function defined in `GHC.Utils.Misc`. Resolves: #23953 - - - - - 8a2968b7 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Refactor uses of `partitionEithers <$> mapM f xs` This patch changes occurences of the idiom `partitionEithers <$> mapM f xs` by the simpler form `partitionWithM f xs` where `partitionWithM` is a utility function newly added to `GHC.Utils.Misc`. - - - - - 6a27eb97 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Mark `GHC.Utils.Misc.partitionWithM` as inlineable This patch adds an `INLINEABLE` pragma for `partitionWithM` to ensure that the right-hand side of the definition of this function remains available for specialisation at call sites. - - - - - f1e5245a by David Binder at 2023-09-27T01:19:00-04:00 Add RTS option to supress tix file - - - - - 1f43124f by David Binder at 2023-09-27T01:19:00-04:00 Add expected output to testsuite in test interface-stability/base-exports - - - - - b9d2c354 by David Binder at 2023-09-27T01:19:00-04:00 Expose HpcFlags and getHpcFlags from GHC.RTS.Flags - - - - - 345675c6 by David Binder at 2023-09-27T01:19:00-04:00 Fix expected output of interface-stability test - - - - - 146e1c39 by David Binder at 2023-09-27T01:19:00-04:00 Implement getHpcFlags - - - - - 61ba8e20 by David Binder at 2023-09-27T01:19:00-04:00 Add section in user guide - - - - - ea05f890 by David Binder at 2023-09-27T01:19:01-04:00 Rename --emit-tix-file to --write-tix-file - - - - - cabce2ce by David Binder at 2023-09-27T01:19:01-04:00 Update the golden files for interface stability - - - - - 1dbdb9d0 by Krzysztof Gogolewski at 2023-09-27T01:19:37-04:00 Refactor: introduce stgArgRep The function 'stgArgType' returns the type in STG. But this violates the abstraction: in STG we're supposed to operate on PrimReps. This introduces stgArgRep ty = typePrimRep (stgArgType ty) stgArgRep1 ty = typePrimRep1 (stgArgType ty) stgArgRep_maybe ty = typePrimRep_maybe (stgArgType ty) stgArgType is still directly used for unboxed tuples (should be fixable), FFI and in ticky. - - - - - b02f8042 by Mario Blažević at 2023-09-27T17:33:28-04:00 Fix TH pretty-printer's parenthesization This PR Fixes `Language.Haskell.TH.Ppr.pprint` so it correctly emits parentheses where needed. Fixes #23962, #23968, #23971, and #23986 - - - - - 79104334 by Krzysztof Gogolewski at 2023-09-27T17:34:04-04:00 Add a testcase for #17564 The code in the ticket relied on the behaviour of Derived constraints. Derived constraints were removed in GHC 9.4 and now the code works as expected. - - - - - d7a80143 by sheaf at 2023-09-28T03:25:53-04:00 lint-codes: add new modes of operation This commit adds two new modes of operation to the lint-codes utility: list - list all statically used diagnostic codes outdated - list all outdated diagnostic codes The previous behaviour is now: test - test consistency and coverage of diagnostic codes - - - - - 477d223c by sheaf at 2023-09-28T03:25:53-04:00 lint codes: avoid using git-grep We manually traverse through the filesystem to find the diagnostic codes embedded in .stdout and .stderr files, to avoid any issues with old versions of grep. Fixes #23843 - - - - - a38ae69a by sheaf at 2023-09-28T03:25:53-04:00 lint-codes: add Hadrian targets This commit adds new Hadrian targets: codes, codes:used - list all used diagnostic codes codes:outdated - list outdated diagnostic codes This allows users to easily query GHC for used and outdated diagnostic codes, e.g. hadrian/build -j --flavour=<..> codes will list all used diagnostic codes in the command line by running the lint-codes utility in the "list codes" mode of operation. The diagnostic code consistency and coverage test is still run as usual, through the testsuite: hadrian/build test --only="codes" - - - - - 9cdd629b by Ben Gamari at 2023-09-28T03:26:29-04:00 hadrian: Install LICENSE files in bindists Fixes #23548. - - - - - b8ebf876 by Matthew Craven at 2023-09-28T03:27:05-04:00 Fix visibility when eta-reducing a type lambda Fixes #24014. - - - - - d3874407 by Torsten Schmits at 2023-09-30T16:08:10-04:00 Fix several mistakes around free variables in iface breakpoints Fixes #23612 , #23607, #23998 and #23666. MR: !11026 The fingerprinting logic in `Iface.Recomp` failed lookups when processing decls containing breakpoints for two reasons: * IfaceBreakpoint created binders for free variables instead of expressions * When collecting free names for the dependency analysis for fingerprinting, breakpoint FVs were skipped - - - - - ef5342cd by Simon Peyton Jones at 2023-09-30T16:08:48-04:00 Refactor to combine HsLam and HsLamCase This MR is pure refactoring (#23916): * Combine `HsLam` and `HsLamCase` * Combine `HsCmdLam` and `HsCmdLamCase` This just arranges to treat uniformly \x -> e \case pi -> ei \cases pis -> ie In the exising code base the first is treated differently to the latter two. No change in behaviour. More specifics: * Combine `HsLam` and `HsLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsExpr`) into one data construtor covering * Lambda * `\case` * `\cases` * The new `HsLam` has an argument of type `HsLamVariant` to distinguish the three cases. * Similarly, combine `HsCmdLam` and `HsCmdLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsCmd` ) into one. * Similarly, combine `mkHsLamPV` and `mkHsLamCasePV` (methods of class `DisambECP`) into one. (Thank you Alan Zimmerman.) * Similarly, combine `LambdaExpr` and `LamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsMatchContext`) into one: `LamAlt` with a `HsLamVariant` argument. * Similarly, combine `KappaExpr` and `ArrowLamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsArrowMatchContext`) into one: `ArrowLamAlt` with a `HsLamVariant` argument. * Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one. * Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one. * In the same `PsError` data type, combine `PsErrLambdaCmdInFunAppCmd` and `PsErrLambdaCaseCmdInFunAppCmd` into one. * In the same `PsError` data tpye, combine `PsErrLambdaInFunAppExpr` and `PsErrLambdaCaseInFunAppExpr` into one. p* Smilarly combine `ExpectedFunTyLam` and `ExpectedFunTyLamCase` (constructors of `GHC.Tc.Types.Origin.ExpectedFunTyOrigin`) into one. Phew! - - - - - b048bea0 by Andreas Klebinger at 2023-09-30T16:09:24-04:00 Arm: Make ppr methods easier to use by not requiring NCGConfig - - - - - 2adc0508 by Andreas Klebinger at 2023-09-30T16:09:24-04:00 AArch64: Fix broken conditional jumps for offsets >= 1MB Rewrite conditional jump instructions with offsets >= 1MB to use unconditional jumps to avoid overflowing the immediate. Fixes #23746 - - - - - 1424f790 by Alan Zimmerman at 2023-09-30T16:10:00-04:00 EPA: Replace Monoid with NoAnn We currently use the Monoid class as a constraint on Exact Print Annotation functions, so we can use mempty. But this leads to requiring Semigroup instances too, which do not always make sense. Instead, introduce a class NoAnn, with a function noAnn analogous to mempty. Closes #20372 Updates haddock submodule - - - - - c1a3ecde by Ben Gamari at 2023-09-30T16:10:36-04:00 users-guide: Refactor handling of :base-ref: et al. - - - - - bc204783 by Richard Eisenberg at 2023-10-02T14:50:52+02:00 Simplify and correct nasty case in coercion opt This fixes #21062. No test case, because triggering this code seems challenging. - - - - - 9c9ca67e by Andrew Lelechenko at 2023-10-04T05:42:28-04:00 Bump bytestring submodule to 0.12.0.2 - - - - - 4e46dc2b by Andrew Lelechenko at 2023-10-04T05:42:28-04:00 Inline bucket_match - - - - - f6b2751f by Ben Gamari at 2023-10-04T05:43:05-04:00 configure: Fix #21712 again This is a bit of a shot in the dark to fix #24033, which appears to be another instance of #21712. For some reason the ld-override logic *still* appears to be active on Darwin targets (or at least one). Consequently, on misconfigured systems we may choose a non-`ld64` linker. It's a bit unclear exactly what happened in #24033 but ultimately the check added for #21712 was not quite right, checking for the `ghc_host_os` (the value of which depends upon the bootstrap compiler) instead of the target platform. Fix this. Fixes #24033. - - - - - 2f0a101d by Krzysztof Gogolewski at 2023-10-04T05:43:42-04:00 Add a regression test for #24029 - - - - - 8cee3fd7 by sheaf at 2023-10-04T05:44:22-04:00 Fix non-symbolic children lookup of fixity decl The fix for #23664 did not correctly account for non-symbolic names when looking up children of a given parent. This one-line fix changes that. Fixes #24037 - - - - - a4785b33 by Cheng Shao at 2023-10-04T05:44:59-04:00 rts: fix incorrect ticket reference - - - - - e037f459 by Ben Gamari at 2023-10-04T05:45:35-04:00 users-guide: Fix discussion of -Wpartial-fields * fix a few typos * add a new example showing when the warning fires * clarify the existing example * point out -Wincomplete-record-selects Fixes #24049. - - - - - 8ff3134e by Matthew Pickering at 2023-10-05T05:34:58-04:00 Revert "Pass preprocessor options to C compiler when building foreign C files (#16737)" This reverts commit 1c18d3b41f897f34a93669edaebe6069f319f9e2. `-optP` should pass options to the preprocessor, that might be a very different program to the C compiler, so passing the options to the C compiler is likely to result in `-optP` being useless. Fixes #17185 and #21291 - - - - - 8f6010b9 by Ben Gamari at 2023-10-05T05:35:36-04:00 rts/nonmoving: Fix on LLP64 platforms Previously `NONMOVING_SEGMENT_MASK` and friends were defined with the `UL` size suffix. However, this is wrong on LLP64 platforms like Windows, where `long` is 32-bits. Fixes #23003. Fixes #24042. - - - - - f20d02f8 by Andreas Klebinger at 2023-10-05T05:36:14-04:00 Fix isAArch64Bitmask for 32bit immediates. Fixes #23802 - - - - - 63afb701 by Bryan Richter at 2023-10-05T05:36:49-04:00 Work around perf note fetch failure Addresses #24055. - - - - - 242102f4 by Krzysztof Gogolewski at 2023-10-05T05:37:26-04:00 Add a test for #21348 - - - - - 7d390bce by Rewbert at 2023-10-05T05:38:08-04:00 Fixes #24046 - - - - - 69abb171 by Finley McIlwaine at 2023-10-06T14:06:28-07:00 Ensure unconstrained instance dictionaries get IPE info In the `StgRhsCon` case of `GHC.Stg.Debug.collectStgRhs`, we were not coming up with an initial source span based on the span of the binder, which was causing instance dictionaries without dynamic superclass constraints to not have source locations in their IPE info. Now they do. Resolves #24005 - - - - - 390443b7 by Andreas Klebinger at 2023-10-07T10:00:20-04:00 rts: Split up rts/include/stg/MachRegs.h by arch - - - - - 3685942f by Bryan Richter at 2023-10-07T10:00:56-04:00 Actually set hackage index state Or at least, use a version of the cabal command that *claims* to set the index state. Time will tell. - - - - - 46a0e5be by Bryan Richter at 2023-10-07T10:00:56-04:00 Update hackage index state - - - - - d4b037de by Bryan Richter at 2023-10-07T10:00:56-04:00 Ensure hadrian uses CI's hackage index state - - - - - e206be64 by Andrew Lelechenko at 2023-10-08T15:06:14-04:00 Do not use O_NONBLOCK on regular files or block devices CLC proposal https://github.com/haskell/core-libraries-committee/issues/166 - - - - - a06197c4 by David Binder at 2023-10-08T15:06:55-04:00 Update hpc-bin submodule to 0.69 - - - - - ed6785b6 by David Binder at 2023-10-08T15:06:55-04:00 Update Hadrian with correct path to happy file for hpc-bin - - - - - 94066d58 by Alan Zimmerman at 2023-10-09T21:35:53-04:00 EPA: Introduce HasAnnotation class The class is defined as class HasAnnotation e where noAnnSrcSpan :: SrcSpan -> e This generalises noAnnSrcSpan, and allows noLocA :: (HasAnnotation e) => a -> GenLocated e a noLocA = L (noAnnSrcSpan noSrcSpan) - - - - - 8792a1bc by Ben Gamari at 2023-10-09T21:36:29-04:00 Bump unix submodule to v2.8.3.0 - - - - - e96c51cb by Andreas Klebinger at 2023-10-10T16:44:27+01:00 Add a flag -fkeep-auto-rules to optionally keep auto-generated rules around. The motivation for the flag is given in #21917. - - - - - 3ed58cef by Matthew Pickering at 2023-10-10T19:01:22-04:00 hadrian: Add ghcToolchain to tool args list This allows you to load ghc-toolchain and ghc-toolchain-bin into HLS. - - - - - 476c02d4 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Normalise triple via config.sub We were not normalising the target triple anymore like we did with the old make build system. Fixes #23856 - - - - - 303dd237 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add missing vendor normalisation This is copied from m4/ghc_convert_vendor.m4 Towards #23868 - - - - - 838026c9 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add loongarch64 to parseArch Towards #23868 - - - - - 1a5bc0b5 by Matthew Pickering at 2023-10-10T19:01:22-04:00 Add same LD hack to ghc-toolchain In the ./configure script, if you pass the `LD` variable then this has the effect of stopping use searching for a linker and hence passing `-fuse-ld=...`. We want to emulate this logic in ghc-toolchain, if a use explicilty specifies `LD` variable then don't add `-fuse-ld=..` with the goal of making ./configure and ghc-toolchain agree on which flags to use when using the C compiler as a linker. This is quite unsavoury as we don't bake the choice of LD into the configuration anywhere but what's important for now is making ghc-toolchain and ./configure agree as much as possible. See #23857 for more discussion - - - - - 42d50b5a by Ben Gamari at 2023-10-10T19:01:22-04:00 ghc-toolchain: Check for C99 support with -std=c99 Previously we failed to try enabling C99 support with `-std=c99`, as `autoconf` attempts. This broke on older compilers (e.g. CentOS 7) which don't enable C99 by default. Fixes #23879. - - - - - da2961af by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add endianess check using __BYTE_ORDER__ macro In very old toolchains the BYTE_ORDER macro is not set but thankfully the __BYTE_ORDER__ macro can be used instead. - - - - - d8da73cd by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: AC_PATH_TARGET_TOOL for LD We want to make sure that LD is set to an absolute path in order to be consistent with the `LD=$(command -v ld)` call. The AC_PATH_TARGET_TOOL macro uses the absolute path rather than AC_CHECK_TARGET_TOOL which might use a relative path. - - - - - 171f93cc by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Check whether we need -std=gnu99 for CPP as well In ./configure the C99 flag is passed to the C compiler when used as a C preprocessor. So we also check the same thing in ghc-toolchain. - - - - - 89a0918d by Matthew Pickering at 2023-10-10T19:01:22-04:00 Check for --target linker flag separately to C compiler There are situations where the C compiler doesn't accept `--target` but when used as a linker it does (but doesn't do anything most likely) In particular with old gcc toolchains, the C compiler doesn't support --target but when used as a linker it does. - - - - - 37218329 by Matthew Pickering at 2023-10-10T19:01:22-04:00 Use Cc to compile test file in nopie check We were attempting to use the C compiler, as a linker, to compile a file in the nopie check, but that won't work in general as the flags we pass to the linker might not be compatible with the ones we pass when using the C compiler. - - - - - 9b2dfd21 by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: Error when ghc-toolchain fails to compile This is a small QOL change as if you are working on ghc-toolchain and it fails to compile then configure will continue and can give you outdated results. - - - - - 1f0de49a by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: Check whether -no-pie works when the C compiler is used as a linker `-no-pie` is a flag we pass when using the C compiler as a linker (see pieCCLDOpts in GHC.Driver.Session) so we should test whether the C compiler used as a linker supports the flag, rather than just the C compiler. - - - - - 62cd2579 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Remove javascript special case for --target detection emcc when used as a linker seems to ignore the --target flag, and for consistency with configure which now tests for --target, we remove this special case. - - - - - 0720fde7 by Ben Gamari at 2023-10-10T19:01:22-04:00 toolchain: Don't pass --target to emscripten toolchain As noted in `Note [Don't pass --target to emscripten toolchain]`, emscripten's `emcc` is rather inconsistent with respect to its treatment of the `--target` flag. Avoid this by special-casing this toolchain in the `configure` script and `ghc-toolchain`. Fixes on aspect of #23744. - - - - - 6354e1da by Matthew Pickering at 2023-10-10T19:01:22-04:00 hadrian: Don't pass `--gcc-options` as a --configure-arg to cabal configure Stop passing -gcc-options which mixed together linker flags and non-linker flags. There's no guarantee the C compiler will accept both of these in each mode. - - - - - c00a4bd6 by Ben Gamari at 2023-10-10T19:01:22-04:00 configure: Probe stage0 link flags For consistency with later stages and CC. - - - - - 1f11e7c4 by Sebastian Graf at 2023-10-10T19:01:58-04:00 Stricter Binary.get in GHC.Types.Unit (#23964) I noticed some thunking while looking at Core. This change has very modest, but throughout positive ghc/alloc effect: ``` hard_hole_fits(normal) ghc/alloc 283,057,664 281,620,872 -0.5% geo. mean -0.1% minimum -0.5% maximum +0.0% ``` Fixes #23964. - - - - - a4f1a181 by Bryan Richter at 2023-10-10T19:02:37-04:00 rel_eng/upload.sh cleanups - - - - - 80705335 by doyougnu at 2023-10-10T19:03:18-04:00 ci: add javascript label rule This adds a rule which triggers the javascript job when the "javascript" label is assigned to an MR. - - - - - a2c0fff6 by Matthew Craven at 2023-10-10T19:03:54-04:00 Make 'wWarningFlagsDeps' include every WarningFlag Fixes #24071. - - - - - d055f099 by Jan Hrček at 2023-10-10T19:04:33-04:00 Fix pretty printing of overlap pragmas in TH splices (fixes #24074) - - - - - 0746b868 by Andreas Klebinger at 2023-10-10T19:05:09-04:00 Aarch64 NCG: Use encoded immediates for literals. Try to generate instr x2, <imm> instead of mov x1, lit instr x2, x1 When possible. This get's rid if quite a few redundant mov instructions. I believe this causes a metric decrease for LargeRecords as we reduce register pressure. ------------------------- Metric Decrease: LargeRecord ------------------------- - - - - - 739f4e6f by Andreas Klebinger at 2023-10-10T19:05:09-04:00 AArch NCG: Refactor getRegister' Remove some special cases which can be handled just as well by the generic case. This increases code re-use while also fixing #23749. Since some of the special case wasn't upholding Note [Signed arithmetic on AArch64]. - - - - - 1b213d33 by Andreas Klebinger at 2023-10-10T19:05:09-04:00 Aarch ncg: Optimize immediate use for address calculations When the offset doesn't fit into the immediate we now just reuse the general getRegister' code path which is well optimized to compute the offset into a register instead of a special case for CmmRegOff. This means we generate a lot less code under certain conditions which is why performance metrics for these improve. ------------------------- Metric Decrease: T4801 T5321FD T5321Fun ------------------------- - - - - - b7df0732 by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over mem management checks These are for heap allocation, a strictly RTS concern. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. The RTS configure one has a new ``` AC_CHECK_SIZEOF([void *]) ``` that the top-level configure version didn't have, so that `ac_cv_sizeof_void_p` is defined. Once more code is moved over in latter commits, that can go away. Progress towards #17191 - - - - - 41130a65 by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over `__thread` check This used by (@bgamari thinks) the `GCThread` abstraction in the RTS. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - cc5ec2bd by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over misc function checks These are for general use in the RTS. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - 809e7c2d by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over `eventfd` check This check is for the RTS part of the event manager and has a corresponding part in `base`. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - 58f3babf by John Ericson at 2023-10-11T16:02:48-04:00 Split `FP_CHECK_PTHREADS` and move part to RTS configure `NEED_PTHREAD_LIB` is unused since 3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the make build system), and so is no longer defined. Progress towards #17191 - - - - - e99cf237 by Moritz Angermann at 2023-10-11T16:03:24-04:00 nativeGen: section flags for .text$foo only Commit 3ece9856d157c85511d59f9f862ab351bbd9b38b, was supposed to fix #22834 in !9810. It does however add "xr" indiscriminatly to .text sections even if splitSections is disabled. This leads to the assembler saying: ghc_1.s:7849:0: error: Warning: Ignoring changed section attributes for .text | 7849 | .section .text,"xr" | ^ - - - - - f383a242 by Sylvain Henry at 2023-10-11T16:04:04-04:00 Modularity: pass TempDir instead of DynFlags (#17957) - - - - - 34fc28b0 by John Ericson at 2023-10-12T06:48:28-04:00 Test that functions from `mingwex` are available Ryan wrote these two minimizations, but they never got added to the test suite. See #23309, #23378 Co-Authored-By: Ben Gamari <bgamari.foss at gmail.com> Co-Authored-By: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - bdb54a0e by John Ericson at 2023-10-12T06:48:28-04:00 Do not check for the `mingwex` library in `/configure` See the recent discussion in !10360 --- Cabal will itself check for the library for the packages that need it, and while the autoconf check additionally does some other things like define a `HAS_LIBMINGWEX` C Preprocessor macro, those other things are also unused and unneeded. Progress towards #17191, which aims to get rid of `/configure` entirely. - - - - - 43e814e1 by Ben Gamari at 2023-10-12T06:49:40-04:00 base: Introduce move modules into src The only non-move changes here are whitespace changes to pass the `whitespace` test and a few testsuite adaptations. - - - - - df81536f by Moritz Angermann at 2023-10-12T06:50:16-04:00 [PEi386 linker] Bounds check and null-deref guard We should resonably be able to expect that we won't exceed the number of sections if we assume to be dealing with legal object files. We can however not guarantee that we get some negative values, and while we try to special case most, we should exclude negative indexing into the sections array. We also need to ensure that we do not try to derefences targetSection, if it is NULL, due to the switch statement. - - - - - c74c4f00 by John Ericson at 2023-10-12T10:31:13-04:00 Move apple compat check to RTS configure - - - - - c80778ea by John Ericson at 2023-10-12T10:31:13-04:00 Move clock/timer fun checks to RTS configure Actual library check (which will set the Cabal flag) is left in the top-level configure for now. Progress towards #17191 - - - - - 7f9f2686 by John Ericson at 2023-10-12T10:31:13-04:00 Move visibility and "musttail" annotation checks to the RTS configure All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - ffb3efe6 by John Ericson at 2023-10-12T10:31:13-04:00 Move leading underscore checks to RTS configure `CabalLeadingUnderscore` is done via Hadrian already, so we can stop `AC_SUBST`ing it completely. - - - - - 25fa4b02 by John Ericson at 2023-10-12T10:31:13-04:00 Move alloca, fork, const, and big endian checks to RTS configure All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. - - - - - 5170f42a by John Ericson at 2023-10-12T10:31:13-04:00 Move libdl check to RTS configure - - - - - ea7a1447 by John Ericson at 2023-10-12T10:31:13-04:00 Adjust `FP_FIND_LIBFFI` Just set vars, and `AC_SUBST` in top-level configure. Don't define `HAVE_SYSTEM_LIBFFI` because nothing is using it. It hasn't be in used since 3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the make build system). - - - - - f399812c by John Ericson at 2023-10-12T10:31:13-04:00 Split BFD support to RTS configure The flag is still in the top-level configure, but the other checks (which define various macros --- important) are in the RTS configure. - - - - - f64f44e9 by John Ericson at 2023-10-12T10:31:13-04:00 Split libm check between top level and RTS - - - - - dafc4709 by Moritz Angermann at 2023-10-12T10:31:49-04:00 CgUtils.fixStgRegStmt respect register width This change ensure that the reg + offset computation is always of the same size. Before this we could end up with a 64bit register, and then add a 32bit offset (on 32bit platforms). This not only would fail type sanity checking, but also incorrectly truncate 64bit values into 32bit values silently on 32bit architectures. - - - - - 9e6ef7ba by Matthew Pickering at 2023-10-12T20:35:00-04:00 hadrian: Decrease verbosity of cabal commands In Normal, most tools do not produce output to stdout unless there are error conditions. Reverts 7ed65f5a1bc8e040e318ccff395f53a9bbfd8217 - - - - - 08fc27af by John Ericson at 2023-10-12T20:35:36-04:00 Do not substitute `@...@` for stage-specific values in cabal files `rts` and `ghc-prim` now no longer have a `*.cabal.in` to set Cabal flag defaults; instead manual choices are passed to configure in the usual way. The old way was fundamentally broken, because it meant we were baking these Cabal files for a specific stage. Now we only do stage-agnostic @...@ substitution in cabal files (the GHC version), and so all stage-specific configuration is properly confined to `_build` and the right stage dir. Also `include-ghc-prim` is a flag that no longer exists for `ghc-prim` (it was removed in 835d8ddbbfb11796ea8a03d1806b7cee38ba17a6) so I got rid of it. Co-Authored-By: Matthew Pickering <matthewtpickering at gmail.com> - - - - - a0ac8785 by Sebastian Graf at 2023-10-14T19:17:12-04:00 Fix restarts in .ghcid Using the whole of `hadrian/` restarted in a loop for me. - - - - - fea9ecdb by Sebastian Graf at 2023-10-14T19:17:12-04:00 CorePrep: Refactor FloatingBind (#23442) A drastically improved architecture for local floating in CorePrep that decouples the decision of whether a float is going to be let- or case-bound from how far it can float (out of strict contexts, out of lazy contexts, to top-level). There are a couple of new Notes describing the effort: * `Note [Floating in CorePrep]` for the overview * `Note [BindInfo and FloatInfo]` for the new classification of floats * `Note [Floats and FloatDecision]` for how FloatInfo is used to inform floating decisions This is necessary ground work for proper treatment of Strict fields and unlifted values at top-level. Fixes #23442. NoFib results (omitted = 0.0%): ``` -------------------------------------------------------------------------------- Program Allocs Instrs -------------------------------------------------------------------------------- pretty 0.0% -1.6% scc 0.0% -1.7% -------------------------------------------------------------------------------- Min 0.0% -1.7% Max 0.0% -0.0% Geometric Mean -0.0% -0.0% ``` - - - - - 32523713 by Matthew Pickering at 2023-10-14T19:17:49-04:00 hadrian: Move ghcBinDeps into ghcLibDeps This completes a5227080b57cb51ac34d4c9de1accdf6360b818b, the `ghc-usage.txt` and `ghci-usage.txt` file are also used by the `ghc` library so need to make sure they are present in the libdir even if we are not going to build `ghc-bin`. This also fixes things for cross compilers because the stage2 cross-compiler requires the ghc-usage.txt file, but we are using the stage2 lib folder but not building stage3:exe:ghc-bin so ghc-usage.txt was not being generated. - - - - - ec3c4488 by sheaf at 2023-10-14T19:18:29-04:00 Combine GREs when combining in mkImportOccEnv In `GHC.Rename.Names.mkImportOccEnv`, we sometimes discard one import item in favour of another, as explained in Note [Dealing with imports] in `GHC.Rename.Names`. However, this can cause us to lose track of important parent information. Consider for example #24084: module M1 where { class C a where { type T a } } module M2 ( module M1 ) where { import M1 } module M3 where { import M2 ( C, T ); instance C () where T () = () } When processing the import list of `M3`, we start off (for reasons that are not relevant right now) with two `Avail`s attached to `T`, namely `C(C, T)` and `T(T)`. We combine them in the `combine` function of `mkImportOccEnv`; as described in Note [Dealing with imports] we discard `C(C, T)` in favour of `T(T)`. However, in doing so, we **must not** discard the information want that `C` is the parent of `T`. Indeed, losing track of this information can cause errors when importing, as we could get an error of the form ‘T’ is not a (visible) associated type of class ‘C’ We fix this by combining the two GREs for `T` using `plusGRE`. Fixes #24084 - - - - - 257c2807 by Ilias Tsitsimpis at 2023-10-14T19:19:07-04:00 hadrian: Pass -DNOSMP to C compiler when needed Hadrian passes the -DNOSMP flag to GHC when the target doesn't support SMP, but doesn't pass it to CC as well, leading to the following compilation error on mips64el: | Run Cc (FindCDependencies CDep) Stage1: rts/sm/NonMovingScav.c => _build/stage1/rts/build/c/sm/NonMovingScav.o.d Command line: /usr/bin/mips64el-linux-gnuabi64-gcc -E -MM -MG -MF _build/stage1/rts/build/c/hooks/FlagDefaults.thr_debug_p_o.d -MT _build/stage1/rts/build/c/hooks/FlagDefaults.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -x c rts/hooks/FlagDefaults.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -DTHREADED_RTS -DDEBUG -fomit-frame-pointer -O2 -g -Irts -I_build/stage1/rts/build -DDEBUG -fno-omit-frame-pointer -g3 -O0 ===> Command failed with error code: 1 In file included from rts/include/Stg.h:348, from rts/include/Rts.h:38, from rts/hooks/FlagDefaults.c:8: rts/include/stg/SMP.h:416:2: error: #error memory barriers unimplemented on this architecture 416 | #error memory barriers unimplemented on this architecture | ^~~~~ rts/include/stg/SMP.h:440:2: error: #error memory barriers unimplemented on this architecture 440 | #error memory barriers unimplemented on this architecture | ^~~~~ rts/include/stg/SMP.h:464:2: error: #error memory barriers unimplemented on this architecture 464 | #error memory barriers unimplemented on this architecture | ^~~~~ The old make system correctly passed this flag to both GHC and CC [1]. Fix this error by passing -DNOSMP to CC as well. [1] https://gitlab.haskell.org/ghc/ghc/-/blob/00920f176b0235d5bb52a8e054d89a664f8938fe/rts/ghc.mk#L407 Closes #24082 - - - - - 13d3c613 by John Ericson at 2023-10-14T19:19:42-04:00 Users Guide: Drop dead code for Haddock refs to `parallel` I noticed while working on !11451 that `@LIBRARY_parallel_UNIT_ID@` was not substituted. It is dead code -- there is no `parallel-ref` usages and it doesn't look like there ever was (going back to 3e5d0f188d6c8633e55e9ba6c8941c07e459fa4b), so let's delete it. - - - - - fe067577 by Sylvain Henry at 2023-10-18T19:40:25-04:00 Avoid out-of-bound array access in bigNatIsPowerOf2 (fix #24066) bigNatIndex# in the `where` clause wasn't guarded by "bigNatIsZero a". - - - - - cc1625b1 by Sylvain Henry at 2023-10-18T19:40:25-04:00 Bignum: fix right shift of negative BigNat with native backend - - - - - cbe4400d by Sylvain Henry at 2023-10-18T19:40:25-04:00 Rts: expose rtsOutOfBoundsAccess symbol - - - - - 72c7380c by Sylvain Henry at 2023-10-18T19:40:25-04:00 Hadrian: enable `-fcheck-prim-bounds` in validate flavour This allows T24066 to fail when the bug is present. Otherwise the out-of-bound access isn't detected as it happens in ghc-bignum which wasn't compiled with the bounds check. - - - - - f9436990 by John Ericson at 2023-10-18T19:41:01-04:00 Make Hadrian solely responsible for substituting `docs/users_guide/ghc_config.py.in` Fixes #24091 Progress on #23966 Issue #24091 reports that `@ProjectVersion@` is no longer being substituted in the GHC user's guide. I assume this is a recent issue, but I am not sure how it's worked since c1a3ecde720b3bddc2c8616daaa06ee324e602ab; it looks like both Hadrian and configure are trying to substitute the same `.in` file! Now only Hadrian does. That is better anyways; already something that issue #23966 requested. It seems like we were missing some dependencies in Hadrian. (I really, really hate that this is possible!) Hopefully it is fixed now. - - - - - b12df0bb by John Ericson at 2023-10-18T19:41:37-04:00 `ghcversion.h`: No need to cope with undefined `ProjectPatchLevel*` Since 4e6c80197f1cc46dfdef0300de46847c7cfbdcb0, these are guaranteed to be defined. (Guaranteed including a test in the testsuite.) - - - - - 0295375a by John Ericson at 2023-10-18T19:41:37-04:00 Generate `ghcversion.h` from a `.in` file Now that there are no conditional sections (see the previous commit), we can just a do simple substitution rather than pasting it together line by line. Progress on #23966 - - - - - 740a1b85 by Krzysztof Gogolewski at 2023-10-19T11:37:20-04:00 Add a regression test for #24064 - - - - - 921fbf2f by Hécate Moonlight at 2023-10-19T11:37:59-04:00 CLC Proposal #182: Export List from Data.List Proposal link: https://github.com/haskell/core-libraries-committee/issues/182 - - - - - 4f02d3c1 by Sylvain Henry at 2023-10-20T04:01:32-04:00 rts: fix small argument passing on big-endian arch (fix #23387) - - - - - b86243b4 by Sylvain Henry at 2023-10-20T04:02:13-04:00 Interpreter: fix literal alignment on big-endian architectures (fix #19261) Literals weren't correctly aligned on big-endian, despite what the comment said. - - - - - a4b2ec47 by Sylvain Henry at 2023-10-20T04:02:54-04:00 Testsuite: recomp011 and recomp015 are fixed on powerpc These tests have been fixed but not tested and re-enabled on big-endian powerpc (see comments in #11260 and #11323) - - - - - fded7dd4 by Sebastian Graf at 2023-10-20T04:03:30-04:00 CorePrep: Allow floating dictionary applications in -O0 into a Rec (#24102) - - - - - 02efc181 by John Ericson at 2023-10-22T02:48:55-04:00 Move function checks to RTS configure Some of these functions are used in `base` too, but we can copy the checks over to its configure if that's an issue. - - - - - 5f4bccab by John Ericson at 2023-10-22T02:48:55-04:00 Move over a number of C-style checks to RTS configure - - - - - 5cf04f58 by John Ericson at 2023-10-22T02:48:55-04:00 Move/Copy more `AC_DEFINE` to RTS config Only exception is the LLVM version macros, which are used for GHC itself. - - - - - b8ce5dfe by John Ericson at 2023-10-22T02:48:55-04:00 Define `TABLES_NEXT_TO_CODE` in the RTS configure We create a new cabal flag to facilitate this. - - - - - 4a40271e by John Ericson at 2023-10-22T02:48:55-04:00 Configure scripts: `checkOS`: Make a bit more robust `mingw64` and `mingw32` are now both accepted for `OSMinGW32`. This allows us to cope with configs/triples that we haven't normalized extra being what GNU `config.sub` does. - - - - - 16bec0a0 by John Ericson at 2023-10-22T02:48:55-04:00 Generate `ghcplatform.h` from RTS configure We create a new cabal flag to facilitate this. - - - - - 7dfcab2f by John Ericson at 2023-10-22T02:48:55-04:00 Get rid of all mention of `mk/config.h` The RTS configure script is now solely responsible for managing its headers; the top level configure script does not help. - - - - - c1e3719c by Cheng Shao at 2023-10-22T02:49:33-04:00 rts: drop stale mentions of MIN_UPD_SIZE We used to have MIN_UPD_SIZE macro that describes the minimum reserved size for thunks, so that the thunk can be overwritten in place as indirections or blackholes. However, this macro has not been actually defined or used anywhere since a long time ago; StgThunkHeader already reserves a padding word for this purpose. Hence this patch which drops stale mentions of MIN_UPD_SIZE. - - - - - d24b0d85 by Andrew Lelechenko at 2023-10-22T02:50:11-04:00 base changelog: move non-backported entries from 4.19 section to 4.20 Neither !10933 (check https://hackage.haskell.org/package/base-4.19.0.0/docs/src/Text.Read.Lex.html#numberToRangedRational) nor !10189 (check https://hackage.haskell.org/package/base-4.19.0.0/docs/src/Data.List.NonEmpty.html#unzip) were backported to `base-4.19.0.0`. Moving them to `base-4.20.0.0` section. Also minor stylistic changes to other entries, bringing them to a uniform form. - - - - - de78b32a by Alan Zimmerman at 2023-10-23T09:09:41-04:00 EPA Some tweaks to annotations - Fix span for GRHS - Move TrailingAnns from last match to FunBind - Fix GADT 'where' clause span - Capture full range for a CaseAlt Match - - - - - d5a8780d by Simon Hengel at 2023-10-23T09:10:23-04:00 Update primitives.rst - - - - - 4d075924 by Josh Meredith at 2023-10-24T23:04:12+11:00 JS/userguide: add explanation of writing jsbits - - - - - 07ab5cc1 by Cheng Shao at 2023-10-24T15:40:32-04:00 testsuite: increase timeout of ghc-api tests for wasm32 ghc-api tests for wasm32 are more likely to timeout due to the large wasm module sizes, especially when testing with wasm native tail calls, given wasmtime's handling of tail call opcodes are suboptimal at the moment. It makes sense to increase timeout specifically for these tests on wasm32. This doesn't affect other targets, and for wasm32 we don't increase timeout for all tests, so not to risk letting major performance regressions slip through the testsuite. - - - - - 0d6acca5 by Greg Steuck at 2023-10-26T08:44:23-04:00 Explicitly require RLIMIT_AS before use in OSMem.c This is done elsewhere in the source tree. It also suddenly is required on OpenBSD. - - - - - 9408b086 by Sylvain Henry at 2023-10-26T08:45:03-04:00 Modularity: modularize external linker Decouple runLink from DynFlags to allow calling runLink more easily. This is preliminary work for calling Emscripten's linker (emcc) from our JavaScript linker. - - - - - e0f35030 by doyougnu at 2023-10-27T08:41:12-04:00 js: add JStg IR, remove unsaturated constructor - Major step towards #22736 and adding the optimizer in #22261 - - - - - 35587eba by Simon Peyton Jones at 2023-10-27T08:41:48-04:00 Fix a bug in tail calls with ticks See #24078 for the diagnosis. The change affects only the Tick case of occurrence analysis. It's a bit hard to test, so no regression test (yet anyway). - - - - - 9bc5cb92 by Matthew Craven at 2023-10-28T07:06:17-04:00 Teach tag-inference about SeqOp/seq# Fixes the STG/tag-inference analogue of #15226. Co-Authored-By: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - 34f06334 by Moritz Angermann at 2023-10-28T07:06:53-04:00 [PEi386] Mask SYM_TYPE_DUP_DISCARD in makeSymbolExtra 48e391952c17ff7eab10b0b1456e3f2a2af28a9b introduced `SYM_TYPE_DUP_DISCARD` to the bitfield. The linker however, failed to mask the `SYM_TYPE_DUP_DISCARD` value. Thus `== SYM_TYPE_CODE` comparisons easily failed. This lead to us relocating DATA lookups (GOT) into E8 (call) and E9 (jump) instructions. - - - - - 5b51b2a2 by Mario Blažević at 2023-10-28T07:07:33-04:00 Fix and test for issue #24111, TH.Ppr output of pattern synonyms - - - - - 723bc352 by Alan Zimmerman at 2023-10-30T20:36:41-04:00 EPA: print doc comments as normal comments And ignore the ones allocated in haddock processing. It does not guarantee that every original haddock-like comment appears in the output, as it discards ones that have no legal attachment point. closes #23459 - - - - - 21b76843 by Simon Peyton Jones at 2023-10-30T20:37:17-04:00 Fix non-termination bug in equality solver constraint left-to-right then right to left, forever. Easily fixed. - - - - - 270867ac by Sebastian Graf at 2023-10-30T20:37:52-04:00 ghc-toolchain: build with `-package-env=-` (#24131) Otherwise globally installed libraries (via `cabal install --lib`) break the build. Fixes #24131. - - - - - 4d08364e by Alan Zimmerman at 2023-10-31T19:46:45+00:00 EPA: match changes in GHC - EPA: Comments in AnchorOperation - EPA: Remove EpaEofComment - - - - - 7a90020f by Krzysztof Gogolewski at 2023-10-31T20:03:37-04:00 docs: fix ScopedTypeVariables example (#24101) The previous example didn't compile. Furthermore, it wasn't demonstrating the point properly. I have changed it to an example which shows that 'a' in the signature must be the same 'a' as in the instance head. - - - - - 49f69f50 by Krzysztof Gogolewski at 2023-10-31T20:04:13-04:00 Fix pretty-printing of type family dependencies "where" should be after the injectivity annotation. - - - - - 73c191c0 by Ben Gamari at 2023-10-31T20:04:49-04:00 gitlab-ci: Bump LLVM bootstrap jobs to Debian 12 As the Debian 10 images have too old an LLVM. Addresses #24056. - - - - - 5b0392e0 by Matthew Pickering at 2023-10-31T20:04:49-04:00 ci: Run aarch64 llvm backend job with "LLVM backend" label This brings it into line with the x86 LLVM backend job. - - - - - 9f9c9227 by Ryan Scott at 2023-11-01T09:19:12-04:00 More robust checking for DataKinds As observed in #22141, GHC was not doing its due diligence in catching code that should require `DataKinds` in order to use. Most notably, it was allowing the use of arbitrary data types in kind contexts without `DataKinds`, e.g., ```hs data Vector :: Nat -> Type -> Type where ``` This patch revamps how GHC tracks `DataKinds`. The full specification is written out in the `DataKinds` section of the GHC User's Guide, and the implementation thereof is described in `Note [Checking for DataKinds]` in `GHC.Tc.Validity`. In brief: * We catch _type_-level `DataKinds` violations in the renamer. See `checkDataKinds` in `GHC.Rename.HsType` and `check_data_kinds` in `GHC.Rename.Pat`. * We catch _kind_-level `DataKinds` violations in the typechecker, as this allows us to catch things that appear beneath type synonyms. (We do *not* want to do this in type-level contexts, as it is perfectly fine for a type synonym to mention something that requires DataKinds while still using the type synonym in a module that doesn't enable DataKinds.) See `checkValidType` in `GHC.Tc.Validity`. * There is now a single `TcRnDataKindsError` that classifies all manner of `DataKinds` violations, both in the renamer and the typechecker. The `NoDataKindsDC` error has been removed, as it has been subsumed by `TcRnDataKindsError`. * I have added `CONSTRAINT` is `isKindTyCon`, which is what checks for illicit uses of data types at the kind level without `DataKinds`. Previously, `isKindTyCon` checked for `Constraint` but not `CONSTRAINT`. This is inconsistent, given that both `Type` and `TYPE` were checked by `isKindTyCon`. Moreover, it thwarted the implementation of the `DataKinds` check in `checkValidType`, since we would expand `Constraint` (which was OK without `DataKinds`) to `CONSTRAINT` (which was _not_ OK without `DataKinds`) and reject it. Now both are allowed. * I have added a flurry of additional test cases that test various corners of `DataKinds` checking. Fixes #22141. - - - - - 575d7690 by Sylvain Henry at 2023-11-01T09:19:53-04:00 JS: fix FFI "wrapper" and "dynamic" Fix codegen and helper functions for "wrapper" and "dynamic" foreign imports. Fix tests: - ffi006 - ffi011 - T2469 - T4038 Related to #22363 - - - - - 81fb8885 by Alan Zimmerman at 2023-11-01T22:23:56-04:00 EPA: Use full range for Anchor This change requires a series of related changes, which must all land at the same time, otherwise all the EPA tests break. * Use the current Anchor end as prior end Use the original anchor location end as the source of truth for calculating print deltas. This allows original spacing to apply in most cases, only changed AST items need initial delta positions. * Add DArrow to TrailingAnn * EPA Introduce HasTrailing in ExactPrint Use [TrailingAnn] in enterAnn and remove it from ExactPrint (LocatedN RdrName) * In HsDo, put TrailingAnns at top of LastStmt * EPA: do not convert comments to deltas when balancing. * EPA: deal with fallout from getMonoBind * EPA fix captureLineSpacing * EPA print any comments in the span before exiting it * EPA: Add comments to AnchorOperation * EPA: remove AnnEofComment, it is no longer used Updates Haddock submodule - - - - - 03e82511 by Rodrigo Mesquita at 2023-11-01T22:24:32-04:00 Fix in docs regarding SSymbol, SNat, SChar (#24119) - - - - - 362cc693 by Matthew Pickering at 2023-11-01T22:25:08-04:00 hadrian: Update bootstrap plans (9.4.6, 9.4.7, 9.6.2, 9.6.3, 9.8.1) Updating the bootstrap plans with more recent GHC versions. - - - - - 00b9b8d3 by Matthew Pickering at 2023-11-01T22:25:08-04:00 ci: Add 9.8.1 bootstrap testing job - - - - - ef3d20f8 by Matthew Pickering at 2023-11-01T22:25:08-04:00 Compatibility with 9.8.1 as boot compiler This fixes several compatability issues when using 9.8.1 as the boot compiler. * An incorrect version guard on the stack decoding logic in ghc-heap * Some ghc-prim bounds need relaxing * ghc is no longer wired in, so we have to remove the -this-unit-id ghc call. Fixes #24077 - - - - - 6755d833 by Jaro Reinders at 2023-11-03T10:54:42+01:00 Add NCG support for common 64bit operations to the x86 backend. These used to be implemented via C calls which was obviously quite bad for performance for operations like simple addition. Co-authored-by: Andreas Klebinger - - - - - 0dfb1fa7 by Vladislav Zavialov at 2023-11-03T14:08:41-04:00 T2T in Expressions (#23738) This patch implements the T2T (term-to-type) transformation in expressions. Given a function with a required type argument vfun :: forall a -> ... the user can now call it as vfun (Maybe Int) instead of vfun (type (Maybe Int)) The Maybe Int argument is parsed and renamed as a term (HsExpr), but then undergoes a conversion to a type (HsType). See the new function expr_to_type in compiler/GHC/Tc/Gen/App.hs and Note [RequiredTypeArguments and the T2T mapping] Left as future work: checking for puns. - - - - - cc1c7c54 by Duncan Coutts at 2023-11-05T00:23:44-04:00 Add a test for I/O managers It tries to cover the cases of multiple threads waiting on the same fd for reading and multiple threads waiting for writing, including wait cancellation by async exceptions. It should work for any I/O manager, in-RTS or in-Haskell. Unfortunately it will not currently work for Windows because it relies on anonymous unix sockets. It could in principle be ported to use Windows named pipes. - - - - - 2e448f98 by Cheng Shao at 2023-11-05T00:23:44-04:00 Skip the IOManager test on wasm32 arch. The test relies on the sockets API which are not (yet) available. - - - - - fe50eb35 by Cheng Shao at 2023-11-05T00:24:20-04:00 compiler: fix eager blackhole symbol in wasm32 NCG - - - - - af771148 by Cheng Shao at 2023-11-05T00:24:20-04:00 testsuite: fix optasm tests for wasm32 - - - - - 1b90735c by Matthew Pickering at 2023-11-05T00:24:20-04:00 testsuite: Add wasm32 to testsuite arches with NCG The compiler --info reports that wasm32 compilers have a NCG, so we should agree with that here. - - - - - db9a6496 by Alan Zimmerman at 2023-11-05T00:24:55-04:00 EPA: make locA a function, not a field name And use it to generalise reLoc The following for the windows pipeline one. 5.5% Metric Increase: T5205 - - - - - 833e250c by Simon Peyton Jones at 2023-11-05T00:25:31-04:00 Update the unification count in wrapUnifierX Omitting this caused type inference to fail in #24146. This was an accidental omision in my refactoring of the equality solver. - - - - - e451139f by Andreas Klebinger at 2023-11-05T00:26:07-04:00 Remove an accidental git conflict marker from a comment. - - - - - e7da0d25 by Alan Zimmerman at 2023-11-05T11:20:31+00:00 EPA: match changes in GHC, l2l cleanup - - - - - 30baac7a by Tobias Haslop at 2023-11-06T10:50:32+00:00 Add laws relating between Foldable/Traversable with their Bi- superclasses See https://github.com/haskell/core-libraries-committee/issues/205 for discussion. This commit also documents that the tuple instances only satisfy the laws up to lazyness, similar to the documentation added in !9512. - - - - - df626f00 by Tobias Haslop at 2023-11-07T02:20:37-05:00 Elaborate on the quantified superclass of Bifunctor This was requested in the comment https://github.com/haskell/core-libraries-committee/issues/93#issuecomment-1597271700 for when Traversable becomes a superclass of Bitraversable, but similarly applies to Functor/Bifunctor, which already are in a superclass relationship. - - - - - 8217acb8 by Alan Zimmerman at 2023-11-07T02:21:12-05:00 EPA: get rid of l2l and friends Replace them with l2l to convert the location la2la to convert a GenLocated thing Updates haddock submodule - - - - - dd88a260 by Luite Stegeman at 2023-11-07T02:21:53-05:00 JS: remove broken newIdents from JStg Monad GHC.JS.JStg.Monad.newIdents was broken, resulting in duplicate identifiers being generated in h$c1, h$c2, ... . This change removes the broken newIdents. - - - - - 455524a2 by Matthew Craven at 2023-11-09T08:41:59-05:00 Create specially-solved DataToTag class Closes #20532. This implements CLC proposal 104: https://github.com/haskell/core-libraries-committee/issues/104 The design is explained in Note [DataToTag overview] in GHC.Tc.Instance.Class. This replaces the existing `dataToTag#` primop. These metric changes are not "real"; they represent Unique-related flukes triggering on a different set of jobs than they did previously. See also #19414. Metric Decrease: T13386 T8095 Metric Increase: T13386 T8095 Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - a05f4554 by Alan Zimmerman at 2023-11-09T08:42:35-05:00 EPA: get rid of glRR and friends in GHC/Parser.y With the HasLoc and HasAnnotation classes, we can replace a number of type-specific helper functions in the parser with polymorphic ones instead Metric Decrease: MultiLayerModulesTH_Make - - - - - 18498538 by Cheng Shao at 2023-11-09T16:58:12+00:00 ci: bump ci-images for wasi-sdk upgrade - - - - - 52c0fc69 by PHO at 2023-11-09T19:16:22-05:00 Don't assume the current locale is *.UTF-8, set the encoding explicitly primops.txt contains Unicode characters: > LC_ALL=C ./genprimopcode --data-decl < ./primops.txt > genprimopcode: <stdin>: hGetContents: invalid argument (cannot decode byte sequence starting from 226) Hadrian must also avoid using readFile' to read primops.txt because it tries to decode the file with a locale-specific encoding. - - - - - 7233b3b1 by PHO at 2023-11-09T19:17:01-05:00 Use '[' instead of '[[' because the latter is a Bash-ism It doesn't work on platforms where /bin/sh is something other than Bash. - - - - - 6dbab180 by Simon Peyton Jones at 2023-11-09T19:17:36-05:00 Add an extra check in kcCheckDeclHeader_sig Fix #24083 by checking for a implicitly-scoped type variable that is not actually bound. See Note [Disconnected type variables] in GHC.Tc.Gen.HsType For some reason, on aarch64-darwin we saw a 2.8% decrease in compiler allocations for MultiLayerModulesTH_Make; but 0.0% on other architectures. Metric Decrease: MultiLayerModulesTH_Make - - - - - 22551364 by Sven Tennie at 2023-11-11T06:35:22-05:00 AArch64: Delete unused LDATA pseudo-instruction Though there were consuming functions for LDATA, there were no producers. Thus, the removed code was "dead". - - - - - 2a0ec8eb by Alan Zimmerman at 2023-11-11T06:35:59-05:00 EPA: harmonise acsa and acsA in GHC/Parser.y With the HasLoc class, we can remove the acsa helper function, using acsA instead. - - - - - 4ceac14d by Alan Zimmerman at 2023-11-11T15:16:41+00:00 EPA: Replace Anchor with EpaLocation Match GHC - - - - - 7ae517a0 by Teo Camarasu at 2023-11-12T08:04:12-05:00 nofib: bump submodule This includes changes that: - fix building a benchmark with HEAD - remove a Makefile-ism that causes errors in bash scripts Resolves #24178 - - - - - 3f0036ec by Alan Zimmerman at 2023-11-12T08:04:47-05:00 EPA: Replace Anchor with EpaLocation An Anchor has a location and an operation, which is either that it is unchanged or that it has moved with a DeltaPos data Anchor = Anchor { anchor :: RealSrcSpan , anchor_op :: AnchorOperation } An EpaLocation also has either a location or a DeltaPos data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan) | EpaDelta !DeltaPos ![LEpaComment] Now that we do not care about always having a location in the anchor, we remove Anchor and replace it with EpaLocation We do this with a type alias initially, to ease the transition. The alias will be removed in time. We also have helpers to reconstruct the AnchorOperation from an EpaLocation. This is also temporary. Updates Haddock submodule - - - - - a7492048 by Alan Zimmerman at 2023-11-12T13:43:07+00:00 EPA: get rid of AnchorOperation Now that the Anchor type is an alias for EpaLocation, remove AnchorOperation. Updates haddock submodule - - - - - 0745c34d by Andrew Lelechenko at 2023-11-13T16:25:07-05:00 Add since annotation for showHFloat - - - - - e98051a5 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 Suppress duplicate librares linker warning of new macOS linker Fixes #24167 XCode 15 introduced a new linker which warns on duplicate libraries being linked. To disable this warning, we pass -Wl,-no_warn_duplicate_libraries as suggested by Brad King in CMake issue #25297. This flag isn't necessarily available to other linkers on darwin, so we must only configure it into the CC linker arguments if valid. - - - - - c411c431 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Encoding test witnesses recent iconv bug is fragile A regression in the new iconv() distributed with XCode 15 and MacOS Sonoma causes the test 'encoding004' to fail in the CP936 roundrip. We mark this test as fragile until this is fixed upstream (rather than broken, since previous versions of iconv pass the test) See #24161 - - - - - ce7fe5a9 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Update to LC_ALL=C no longer being ignored in darwin MacOS seems to have fixed an issue where it used to ignore the variable `LC_ALL` in program invocations and default to using Unicode. Since the behaviour seems to be fixed to account for the locale variable, we mark tests that were previously broken in spite of it as fragile (since they now pass in recent macOS distributions) See #24161 - - - - - e6c803f7 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 darwin: Fix single_module is obsolete warning In XCode 15's linker, -single_module is the default and otherwise passing it as a flag results in a warning being raised: ld: warning: -single_module is obsolete This patch fixes this warning by, at configure time, determining whether the linker supports -single_module (which is likely false for all non-darwin linkers, and true for darwin linkers in previous versions of macOS), and using that information at runtime to decide to pass or not the flag in the invocation. Fixes #24168 - - - - - 929ba2f9 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Skip MultiLayerModulesTH_Make on darwin The recent toolchain upgrade on darwin machines resulted in the MultiLayerModulesTH_Make test metrics varying too much from the baseline, ultimately blocking the CI pipelines. This commit skips the test on darwin to temporarily avoid failures due to the environment change in the runners. However, the metrics divergence is being investigated still (tracked in #24177) - - - - - af261ccd by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 configure: check target (not build) understands -no_compact_unwind Previously, we were branching on whether the build system was darwin to shortcut this check, but we really want to branch on whether the target system (which is what we are configuring ld_prog for) is darwin. - - - - - 2125c176 by Luite Stegeman at 2023-11-15T13:19:38-05:00 JS: Fix missing variable declarations The JStg IR update was missing some local variable declarations that were present earlier, causing global variables to be used implicitly (or an error in JavaScript strict mode). This adds the local variable declarations again. - - - - - 99ced73b by Krzysztof Gogolewski at 2023-11-15T13:20:14-05:00 Remove loopy superclass solve mechanism Programs with a -Wloopy-superclass-solve warning will now fail with an error. Fixes #23017 - - - - - 2aff2361 by Zubin Duggal at 2023-11-15T13:20:50-05:00 users-guide: Fix links to libraries from the users-guide. The unit-ids generated in c1a3ecde720b3bddc2c8616daaa06ee324e602ab include the package name, so we don't need to explicitly add it to the links. Fixes #24151 - - - - - 27981fac by Alan Zimmerman at 2023-11-15T13:21:25-05:00 EPA: splitLHsForAllTyInvis does not return ann We did not use the annotations returned from splitLHsForAllTyInvis, so do not return them. - - - - - a6467834 by Krzysztof Gogolewski at 2023-11-15T22:22:59-05:00 Document defaulting of RuntimeReps Fixes #24099 - - - - - 2776920e by Simon Peyton Jones at 2023-11-15T22:23:35-05:00 Second fix to #24083 My earlier fix turns out to be too aggressive for data/type families See wrinkle (DTV1) in Note [Disconnected type variables] - - - - - cee81370 by Sylvain Henry at 2023-11-16T09:57:46-05:00 Fix unusable units and module reexport interaction (#21097) This commit fixes an issue with ModUnusable introduced in df0f148feae. In mkUnusableModuleNameProvidersMap we traverse the list of unusable units and generate ModUnusable origin for all the modules they contain: exposed modules, hidden modules, and also re-exported modules. To do this we have a two-level map: ModuleName -> Unit:ModuleName (aka Module) -> ModuleOrigin So for each module name "M" in broken unit "u" we have: "M" -> u:M -> ModUnusable reason However in the case of module reexports we were using the *target* module as a key. E.g. if "u:M" is a reexport for "X" from unit "o": "M" -> o:X -> ModUnusable reason Case 1: suppose a reexport without module renaming (u:M -> o:M) from unusable unit u: "M" -> o:M -> ModUnusable reason Here it's claiming that the import of M is unusable because a reexport from u is unusable. But if unit o isn't unusable we could also have in the map: "M" -> o:M -> ModOrigin ... Issue: the Semigroup instance of ModuleOrigin doesn't handle the case (ModUnusable <> ModOrigin) Case 2: similarly we could have 2 unusable units reexporting the same module without renaming, say (u:M -> o:M) and (v:M -> o:M) with u and v unusable. It gives: "M" -> o:M -> ModUnusable ... (for u) "M" -> o:M -> ModUnusable ... (for v) Issue: the Semigroup instance of ModuleOrigin doesn't handle the case (ModUnusable <> ModUnusable). This led to #21097, #16996, #11050. To fix this, in this commit we make ModUnusable track whether the module used as key is a reexport or not (for better error messages) and we use the re-export module as key. E.g. if "u:M" is a reexport for "o:X" and u is unusable, we now record: "M" -> u:M -> ModUnusable reason reexported=True So now, we have two cases for a reexport u:M -> o:X: - u unusable: "M" -> u:M -> ModUnusable ... reexported=True - u usable: "M" -> o:X -> ModOrigin ... reexportedFrom=u:M The second case is indexed with o:X because in this case the Semigroup instance of ModOrigin is used to combine valid expositions of a module (directly or via reexports). Note that module lookup functions select usable modules first (those who have a ModOrigin value), so it doesn't matter if we add new ModUnusable entries in the map like this: "M" -> { u:M -> ModUnusable ... reexported=True o:M -> ModOrigin ... } The ModOrigin one will be used. Only if there is no ModOrigin or ModHidden entry will the ModUnusable error be printed. See T21097 for an example printing several reasons why an import is unusable. - - - - - 3e606230 by Krzysztof Gogolewski at 2023-11-16T09:58:22-05:00 Fix IPE test A helper function was defined in a different module than used. To reproduce: ./hadrian/build test --test-root-dirs=testsuite/tests/rts/ipe - - - - - 49f5264b by Andreas Klebinger at 2023-11-16T20:52:11-05:00 Properly compute unpacked sizes for -funpack-small-strict-fields. Use rep size rather than rep count to compute the size. Fixes #22309 - - - - - b4f84e4b by James Henri Haydon at 2023-11-16T20:52:53-05:00 Explicit methods for Alternative Compose Explicitly define some and many in Alternative instance for Data.Functor.Compose Implementation of https://github.com/haskell/core-libraries-committee/issues/181 - - - - - 9bc0dd1f by Ignat Insarov at 2023-11-16T20:53:34-05:00 Add permutations for non-empty lists. Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/68#issuecomment-1221409837 - - - - - 5643ecf9 by Andrew Lelechenko at 2023-11-16T20:53:34-05:00 Update changelog and since annotations for Data.List.NonEmpty.permutations Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/68#issuecomment-1221409837 - - - - - 94ff2134 by Oleg Alexander at 2023-11-16T20:54:15-05:00 Update doc string for traceShow Updated doc string for traceShow. - - - - - faff671a by Luite Stegeman at 2023-11-17T14:12:51+01:00 JS: clean up some foreign imports - - - - - 856e0a4e by Sven Tennie at 2023-11-18T06:54:11-05:00 AArch64: Remove unused instructions As these aren't ever emitted, we don't even know if they work or will ever be used. If one of them is needed in future, we may easily re-add it. Deleted instructions are: - CMN - ANDS - BIC - BICS - EON - ORN - ROR - TST - STP - LDP - DMBSY - - - - - 615441ef by Alan Zimmerman at 2023-11-18T06:54:46-05:00 EPA: Replace Monoid with NoAnn Remove the final Monoid instances in the exact print infrastructure. For Windows CI Metric Decrease: T5205 - - - - - 5a6c49d4 by David Feuer at 2023-11-20T18:53:18-05:00 Speed up stimes in instance Semigroup Endo As discussed at https://github.com/haskell/core-libraries-committee/issues/4 - - - - - cf9da4b3 by Andrew Lelechenko at 2023-11-20T18:53:18-05:00 base: reflect latest changes in the changelog - - - - - 48bf364e by Alan Zimmerman at 2023-11-20T18:53:54-05:00 EPA: Use SrcSpan in EpaSpan This is more natural, since we already need to deal with invalid RealSrcSpans, and that is exactly what SrcSpan.UnhelpfulSpan is for. Updates haddock submodule. - - - - - 97ec37cc by Sebastian Graf at 2023-11-20T18:54:31-05:00 Add regression test for #6070 Fixes #6070. - - - - - e9d5ae41 by Owen Shepherd at 2023-11-21T18:32:23-05:00 chore: Correct typo in the gitlab MR template [skip ci] - - - - - f158a8d0 by Rodrigo Mesquita at 2023-11-21T18:32:59-05:00 Improve error message when reading invalid `.target` files A `.target` file generated by ghc-toolchain or by configure can become invalid if the target representation (`Toolchain.Target`) is changed while the files are not re-generated by calling `./configure` or `ghc-toolchain` again. There is also the issue of hadrian caching the dependencies on `.target` files, which makes parsing fail when reading reading the cached value if the representation has been updated. This patch provides a better error message in both situations, moving away from a terrible `Prelude.read: no parse` error that you would get otherwise. Fixes #24199 - - - - - 955520c6 by Ben Gamari at 2023-11-21T18:33:34-05:00 users guide: Note that QuantifiedConstraints implies ExplicitForAll Fixes #24025. - - - - - 17ec3e97 by Owen Shepherd at 2023-11-22T09:37:28+01:00 fix: Change type signatures in NonEmpty export comments to reflect reality This fixes several typos in the comments of Data.List.NonEmpty export list items. - - - - - 2fd78f9f by Samuel Thibault at 2023-11-22T11:49:13-05:00 Fix the platform string for GNU/Hurd As commited in Cargo https://github.com/haskell/cabal/pull/9434 there is confusion between "gnu" and "hurd". This got fixed in Cargo, we need the converse in Hadrian. Fixes #24180 - - - - - a79960fe by Alan Zimmerman at 2023-11-22T11:49:48-05:00 EPA: Tuple Present no longer has annotation The Present constructor for a Tuple argument will never have an exact print annotation. So make this impossible. - - - - - 121c9ab7 by David Binder at 2023-11-22T21:12:29-05:00 Unify the hpc testsuites The hpc testsuite was split between testsuite/tests/hpc and the submodule libraries/hpc/test. This commit unifies the two testsuites in the GHC repository in the directory testsuite/tests/hpc. - - - - - d2733a05 by Alan Zimmerman at 2023-11-22T21:13:05-05:00 EPA: empty tup_tail has noAnn In Parser.y, the tup_tail rule had the following option | {- empty -} %shift { return [Left noAnn] } Once this works through PostProcess.hs, it means we add an extra Missing constructor if the last item was a comma. Change the annotation type to a Bool to indicate this, and use the EpAnn Anchor for the print location for the others. - - - - - fa576eb8 by Andreas Klebinger at 2023-11-24T08:29:13-05:00 Fix FMA primops generating broken assembly on x86. `genFMA3Code` assumed that we had to take extra precations to avoid overwriting the result of `getNonClobberedReg`. One of these special cases caused a bug resulting in broken assembly. I believe we don't need to hadle these cases specially at all, which means this MR simply deletes the special cases to fix the bug. Fixes #24160 - - - - - 34d86315 by Alan Zimmerman at 2023-11-24T08:29:49-05:00 EPA: Remove parenthesizeHsType This is called from PostProcess.hs, and adds spurious parens. With the looser version of exact printing we had before we could tolerate this, as they would be swallowed by the original at the same place. But with the next change (remove EpAnnNotUsed) they result in duplicates in the output. For Darwin build: Metric Increase: MultiLayerModulesTH_OneShot - - - - - 3ede659d by Vladislav Zavialov at 2023-11-26T06:43:32-05:00 Add name for -Wdeprecated-type-abstractions (#24154) This warning had no name or flag and was triggered unconditionally. Now it is part of -Wcompat. - - - - - 7902ebf8 by Alan Zimmerman at 2023-11-26T06:44:08-05:00 EPA: Remove EpAnnNotUsed We no longer need the EpAnnNotUsed constructor for EpAnn, as we can represent an unused annotation with an anchor having a EpaDelta of zero, and empty comments and annotations. This simplifies code handling annotations considerably. Updates haddock submodule Metric Increase: parsing001 - - - - - 471b2672 by Mario Blažević at 2023-11-26T06:44:48-05:00 Bumped the upper bound of text to <2.2 - - - - - d1bf25c7 by Vladislav Zavialov at 2023-11-26T11:45:49-05:00 Term variable capture (#23740) This patch changes type variable lookup rules (lookupTypeOccRn) and implicit quantification rules (filterInScope) so that variables bound in the term namespace can be captured at the type level {-# LANGUAGE RequiredTypeArguments #-} f1 x = g1 @x -- `x` used in a type application f2 x = g2 (undefined :: x) -- `x` used in a type annotation f3 x = g3 (type x) -- `x` used in an embedded type f4 x = ... where g4 :: x -> x -- `x` used in a type signature g4 = ... This change alone does not allow us to accept examples shown above, but at least it gets them past the renamer. - - - - - da863d15 by Vladislav Zavialov at 2023-11-26T11:46:26-05:00 Update Note [hsScopedTvs and visible foralls] The Note was written before GHC gained support for visible forall in types of terms. Rewrite a few sentences and use a better example. - - - - - b5213542 by Matthew Pickering at 2023-11-27T12:53:59-05:00 testsuite: Add mechanism to collect generic metrics * Generalise the metric logic by adding an additional field which allows you to specify how to query for the actual value. Previously the method of querying the baseline value was abstracted (but always set to the same thing). * This requires rejigging how the stat collection works slightly but now it's more uniform and hopefully simpler. * Introduce some new "generic" helper functions for writing generic stats tests. - collect_size ( deviation, path ) Record the size of the file as a metric - stat_from_file ( metric, deviation, path ) Read a value from the given path, and store that as a metric - collect_generic_stat ( metric, deviation, get_stat) Provide your own `get_stat` function, `lambda way: <Int>`, which can be used to establish the current value of the metric. - collect_generic_stats ( metric_info ): Like collect_generic_stat but provide the whole dictionary of metric definitions. { metric: { deviation: <Int> current: lambda way: <Int> } } * Introduce two new "size" metrics for keeping track of build products. - `size_hello_obj` - The size of `hello.o` from compiling hello.hs - `libdir` - The total size of the `libdir` folder. * Track the number of modules in the AST tests - CountDepsAst - CountDepsParser This lays the infrastructure for #24191 #22256 #17129 - - - - - 7d9a2e44 by ARATA Mizuki at 2023-11-27T12:54:39-05:00 x86: Don't require -mavx2 when using 256-bit floating-point SIMD primitives Fixes #24222 - - - - - 4e5ff6a4 by Alan Zimmerman at 2023-11-27T12:55:15-05:00 EPA: Remove SrcSpanAnn Now that we only have a single constructor for EpAnn, And it uses a SrcSpan for its location, we can do away with SrcSpanAnn completely. It only existed to wrap the original SrcSpan in a location, and provide a place for the exact print annotation. For darwin only: Metric Increase: MultiLayerModulesTH_OneShot Updates haddock submodule - - - - - e05bca39 by Krzysztof Gogolewski at 2023-11-28T08:00:55-05:00 testsuite: don't initialize testdir to '.' The test directory is removed during cleanup, if there's an interrupt that could remove the entire repository. Fixes #24219 - - - - - af881674 by Alan Zimmerman at 2023-11-28T08:01:30-05:00 EPA: Clean up mkScope in Ast.hs Now that we have HasLoc we can get rid of all the custom variants of mkScope For deb10-numa Metric Increase: libdir - - - - - 292983c8 by Ben Gamari at 2023-11-28T22:44:28-05:00 distrib: Rediscover otool and install_name_tool on Darwin In the bindist configure script we must rediscover the `otool` and `install_name_tool`s since they may be different from the build environment. Fixes #24211. - - - - - dfe1c354 by Stefan Schulze Frielinghaus at 2023-11-28T22:45:04-05:00 llvmGen: Align objects in the data section Objects in the data section may be referenced via tagged pointers. Thus, align those objects to a 4- or 8-byte boundary for 32- or 64-bit platforms, respectively. Note, this may need to be reconsidered if objects with a greater natural alignment requirement are emitted as e.g. 128-bit atomics. Fixes #24163. - - - - - f6c486c3 by Matthew Pickering at 2023-11-29T11:08:13-05:00 metrics: Widen libdir and size_hello_obj acceptance window af8816740d9b8759be1a22af8adcb5f13edeb61d shows that the libdir size can fluctuate quite significantly even when the change is quite small. Therefore we widen the acceptance window to 10%. - - - - - 99a6a49c by Alan Zimmerman at 2023-11-29T11:08:49-05:00 EPA: Clean up TC Monad Utils We no longer need the alternative variant of addLocM (addLocMA) nor wrapLocAM, wrapLocSndMA. aarch64-darwin Metric Increase: MultiLayerModulesTH_OneShot deb10-numa-slow Metric Decrease: libdir - - - - - 94fb8d47 by Alan Zimmerman at 2023-11-29T18:10:26+00:00 Match GHC, No comments in EpaDelta for comments - - - - - cbc03fa0 by Sebastian Graf at 2023-11-30T12:37:21-05:00 perf tests: Move comments into new `Note [Sensitivity to unique increment]` (#19414) And additionally to T12545, link from T8095, T13386 to this new Note. - - - - - c7623b22 by Alan Zimmerman at 2023-11-30T12:37:56-05:00 EPA: EpaDelta for comment has no comments EpaLocation is used to position things. It has two constructors, EpaSpan holding a SrcSpan, and EpaDelta with a delta position and a possible list of comments. The comment list is needed because the location in EpaDelta has no absolute information to decide which comments should be emitted before them when printing. But it is also used for specifying the position of a comment. To prevent the absurdity of a comment position having a list of comments in it, we make EpaLocation parameterisable, using comments for the normal case and a constant for within comments. Updates haddock submodule. aarch64-darwin Metric Decrease: MultiLayerModulesTH_OneShot - - - - - bd8acc0c by Krzysztof Gogolewski at 2023-11-30T12:38:32-05:00 Kind-check body of a required forall We now require that in 'forall a -> ty', ty has kind TYPE r for some r. Fixes #24176 - - - - - 010fb784 by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Remove incorrect haddock link quotes in code block - - - - - cda9c12d by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Remove cycle from group haddock example - - - - - 495265b9 by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Use repl haddock syntax in group docs - - - - - d134d1de by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Use list [] notation in group haddock - - - - - dfcf629c by Owen Shepherd at 2023-12-03T00:10:10-05:00 docs(NonEmpty/group): Specify final property of group function in haddock - - - - - cad3b734 by Owen Shepherd at 2023-12-03T00:10:10-05:00 fix: Add missing property of List.group - - - - - bad37656 by Matthew Pickering at 2023-12-03T00:10:46-05:00 testsuite: Fix T21097b test with make 4.1 (deb9) cee81370cd6ef256f66035e3116878d4cb82e28b recently added a test which failed on deb9 because the version of make was emitting the recipe failure to stdout rather than stderr. One way to fix this is to be more precise in the test about which part of the output we care about inspecting. - - - - - 5efdf421 by Matthew Pickering at 2023-12-03T00:11:21-05:00 testsuite: Track size of libdir in bytes For consistency it's better if we track all size metrics in bytes. Metric Increase: libdir - - - - - f5eb0f29 by Matthew Pickering at 2023-12-03T00:11:22-05:00 testsuite: Remove rogue trace in testsuite I accidentally left a trace in the generics metric patch. - - - - - d5610737 by Claudio Bley at 2023-12-06T16:13:33-05:00 Only exit ghci in -e mode when :add command fails Previously, when running `ghci -e ':add Sample.hs'` the process would exit with exit code 1 if the file exists and could be loaded. Fixes #24115 - - - - - 0f0c53a5 by Vladislav Zavialov at 2023-12-06T16:14:09-05:00 T2T in Patterns (#23739) This patch implements the T2T (term-to-type) transformation in patterns. Patterns that are checked against a visible forall can now be written without the `type` keyword: \(type t) (x :: t) -> ... -- old \t (x :: t) -> ... -- new The `t` binder is parsed and renamed as a term pattern (Pat), but then undergoes a conversion to a type pattern (HsTyPat). See the new function pat_to_type_pat in compiler/GHC/Tc/Gen/Pat.hs - - - - - 10a1a6c6 by Sebastian Graf at 2023-12-06T16:14:45-05:00 Pmc: Fix SrcLoc and warning for incomplete irrefutable pats (#24234) Before, the source location would point at the surrounding function definition, causing the confusion in #24234. I also took the opportunity to introduce a new `LazyPatCtx :: HsMatchContext _` to make the warning message say "irrefutable pattern" instead of "pattern binding". - - - - - 36b9a38c by Matthew Pickering at 2023-12-06T16:15:21-05:00 libraries: Bump filepath to 1.4.200.1 and unix to 2.8.4.0 Updates filepath submodule Updates unix submodule Fixes #24240 - - - - - 91ff0971 by Matthew Pickering at 2023-12-06T16:15:21-05:00 Submodule linter: Allow references to tags We modify the submodule linter so that if the bumped commit is a specific tag then the commit is accepted. Fixes #24241 - - - - - 86f652dc by Zubin Duggal at 2023-12-06T16:15:21-05:00 hadrian: set -Wno-deprecations for directory and Win32 The filepath bump to 1.4.200.1 introduces a deprecation warning. See https://gitlab.haskell.org/ghc/ghc/-/issues/24240 https://github.com/haskell/filepath/pull/206 - - - - - 7ac6006e by Sylvain Henry at 2023-12-06T16:16:02-05:00 Zap OccInfo on case binders during StgCse #14895 #24233 StgCse can revive dead binders: case foo of dead { Foo x y -> Foo x y; ... } ===> case foo of dead { Foo x y -> dead; ... } -- dead is no longer dead So we must zap occurrence information on case binders. Fix #14895 and #24233 - - - - - 57c391c4 by Sebastian Graf at 2023-12-06T16:16:37-05:00 Cpr: Turn an assertion into a check to deal with some dead code (#23862) See the new `Note [Dead code may contain type confusions]`. Fixes #23862. - - - - - c1c8abf8 by Zubin Duggal at 2023-12-08T02:25:07-05:00 testsuite: add test for #23944 - - - - - 6329d308 by Zubin Duggal at 2023-12-08T02:25:07-05:00 driver: Only run a dynamic-too pipeline if object files are going to be generated Otherwise we run into a panic in hscMaybeWriteIface: "Unexpected DT_Dyn state when writing simple interface" when dynamic-too is enabled We could remove the panic and just write the interface even if the state is `DT_Dyn`, but it seems pointless to run the pipeline twice when `hscMaybeWriteIface` is already designed to write both `hi` and `dyn_hi` files if dynamic-too is enabled. Fixes #23944. - - - - - 28811f88 by Simon Peyton Jones at 2023-12-08T05:47:18-05:00 Improve duplicate elimination in SpecConstr This partially fixes #24229. See the new Note [Pattern duplicate elimination] in SpecConstr - - - - - fec7894f by Simon Peyton Jones at 2023-12-08T05:47:18-05:00 Make SpecConstr deal with casts better This patch does two things, to fix #23209: * It improves SpecConstr so that it no longer quantifies over coercion variables. See Note [SpecConstr and casts] * It improves the rule matcher to deal nicely with the case where the rule does not quantify over coercion variables, but the the template has a cast in it. See Note [Casts in the template] - - - - - 8db8d2fd by Zubin Duggal at 2023-12-08T05:47:54-05:00 driver: Don't lose track of nodes when we fail to resolve cycles The nodes that take part in a cycle should include both hs-boot and hs files, but when we fail to resolve a cycle, we were only counting the nodes from the graph without boot files. Fixes #24196 - - - - - c5b4efd3 by Zubin Duggal at 2023-12-08T05:48:30-05:00 testsuite: Skip MultiLayerModulesTH_OneShot on darwin See #24177 - - - - - fae472a9 by Wendao Lee at 2023-12-08T05:49:12-05:00 docs(Data.Char):Add more detailed descriptions for some functions Related changed function's docs: -GHC.Unicode.isAlpha -GHC.Unicode.isPrint -GHC.Unicode.isAlphaNum Add more details for what the function will return. Co-authored-by: Bodigrim <andrew.lelechenko at gmail.com> - - - - - ca7510e4 by Malik Ammar Faisal at 2023-12-08T05:49:55-05:00 Fix float parsing in GHC Cmm Lexer Add test case for bug #24224 - - - - - d8baa1bd by Simon Peyton Jones at 2023-12-08T15:40:37+00:00 Take care when simplifying unfoldings This MR fixes a very subtle bug exposed by #24242. See Note [Environment for simplLetUnfolding]. I also updated a bunch of Notes on shadowing - - - - - 03ca551d by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Comments only in FloatIn Relevant to #3458 - - - - - 50c78779 by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Comments only in SpecConstr - - - - - 9431e195 by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Add test for #22238 - - - - - d9e4c597 by Vladislav Zavialov at 2023-12-11T04:19:34-05:00 Make forall a keyword (#23719) Before this change, GHC used to accept `forall` as a term-level identifier: -- from constraints-0.13 forall :: forall p. (forall a. Dict (p a)) -> Dict (Forall p) forall d = ... Now it is a parse error. The -Wforall-identifier warning has served its purpose and is now a deprecated no-op. - - - - - 58d56644 by Zubin Duggal at 2023-12-11T04:20:10-05:00 driver: Ensure we actually clear the interactive context before reloading Previously we called discardIC, but immediately after set the session back to an old HscEnv that still contained the IC Partially addresses #24107 Fixes #23405 - - - - - 8e5745a0 by Zubin Duggal at 2023-12-11T04:20:10-05:00 driver: Ensure we force the lookup of old build artifacts before returning the build plan This prevents us from retaining all previous build artifacts in memory until a recompile finishes, instead only retaining the exact artifacts we need. Fixes #24118 - - - - - 105c370c by Zubin Duggal at 2023-12-11T04:20:10-05:00 testsuite: add test for #24118 and #24107 MultiLayerModulesDefsGhci was not able to catch the leak because it uses :l which discards the previous environment. Using :r catches both of these leaks - - - - - e822ff88 by Zubin Duggal at 2023-12-11T04:20:10-05:00 compiler: Add some strictness annotations to ImportSpec and related constructors This prevents us from retaining entire HscEnvs. Force these ImportSpecs when forcing the GlobalRdrEltX Adds an NFData instance for Bag Fixes #24107 - - - - - 522c12a4 by Zubin Duggal at 2023-12-11T04:20:10-05:00 compiler: Force IfGlobalRdrEnv in NFData instance. - - - - - 188b280d by Arnaud Spiwack at 2023-12-11T15:33:31+01:00 LinearTypes => MonoLocalBinds - - - - - 8e0446df by Arnaud Spiwack at 2023-12-11T15:44:28+01:00 Linear let and where bindings For expediency, the initial implementation of linear types in GHC made it so that let and where binders would always be considered unrestricted. This was rather unpleasant, and probably a big obstacle to adoption. At any rate, this was not how the proposal was designed. This patch fixes this infelicity. It was surprisingly difficult to build, which explains, in part, why it took so long to materialise. As of this patch, let or where bindings marked with %1 will be linear (respectively %p for an arbitrary multiplicity p). Unmarked let will infer their multiplicity. Here is a prototypical example of program that used to be rejected and is accepted with this patch: ```haskell f :: A %1 -> B g :: B %1 -> C h :: A %1 -> C h x = g y where y = f x ``` Exceptions: - Recursive let are unrestricted, as there isn't a clear semantics of what a linear recursive binding would be. - Destructive lets with lazy bindings are unrestricted, as their desugaring isn't linear (see also #23461). - (Strict) destructive lets with inferred polymorphic type are unrestricted. Because the desugaring isn't linear (See #18461 down-thread). Closes #18461 and #18739 Co-authored-by: @jackohughes - - - - - effa7e2d by Matthew Craven at 2023-12-12T04:37:20-05:00 Introduce `dataToTagSmall#` primop (closes #21710) ...and use it to generate slightly better code when dataToTag# is used at a "small data type" where there is no need to mess with "is_too_big_tag" or potentially look at an info table. Metric Decrease: T18304 - - - - - 35c7aef6 by Matthew Craven at 2023-12-12T04:37:20-05:00 Fix formatting of Note [alg-alt heap check] - - - - - 7397c784 by Oleg Grenrus at 2023-12-12T04:37:56-05:00 Allow untyped brackets in typed splices and vice versa. Resolves #24190 Apparently the check was essentially always (as far as I can trace back: d0d47ba76f8f0501cf3c4966bc83966ab38cac27), and while it does catch some mismatches, the type-checker will catch them too. OTOH, it prevents writing completely reasonable programs. - - - - - 32d208e1 by Vladislav Zavialov at 2023-12-12T20:41:36+03:00 EPA: Match changes to LHsToken removal - - - - - a3ee3b99 by Moritz Angermann at 2023-12-12T19:50:58-05:00 Drop hard Xcode dependency XCODE_VERSION calls out to `xcodebuild`, which is only available when having `Xcode` installed. The CommandLineTools are not sufficient. To install Xcode, you must have an apple id to download the Xcode.xip from apple. We do not use xcodebuild anywhere in our build explicilty. At best it appears to be a proxy for checking the linker or the compiler. These should rather be done with ``` xcrun ld -version ``` or similar, and not by proxy through Xcode. The CLR should be sufficient for building software on macOS. - - - - - 1c9496e0 by Vladislav Zavialov at 2023-12-12T19:51:34-05:00 docs: update information on RequiredTypeArguments Update the User's Guide and Release Notes to account for the recent progress in the implementation of RequiredTypeArguments. - - - - - d0b17576 by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Fix off-by-one in assertion Previously we failed to account for the NULL terminator `postString` asserted that there is enough room in the buffer for the string. - - - - - a10f9b9b by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Honor result of ensureRoomForVariableEvent is Previously we would keep plugging along, even if isn't enough room for the event. - - - - - 0e0f41c0 by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Avoid truncating event sizes Previously ensureRoomForVariableEvent would truncate the desired size to 16-bits, resulting in #24197. Fixes #24197. - - - - - 64e724c8 by Artin Ghasivand at 2023-12-13T06:34:20-05:00 Remove the "Derived Constraint" argument of TcPluginSolver, docs - - - - - fe6d97dd by Vladislav Zavialov at 2023-12-13T06:34:56-05:00 EPA: Move tokens into GhcPs extension fields (#23447) Summary of changes * Remove Language.Haskell.Syntax.Concrete * Move all tokens into GhcPs extension fields (LHsToken -> EpToken) * Create new TTG extension fields as needed * Drop the MultAnn wrapper Updates the haddock submodule. Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 8106e695 by Zubin Duggal at 2023-12-13T06:35:34-05:00 testsuite: use copy_files in T23405 This prevents the tree from being dirtied when the file is modified. - - - - - ed0e4099 by Bryan Richter at 2023-12-14T04:30:53-05:00 Document ghc package's PVP-noncompliance This changes nothing, it just makes the status quo explicit. - - - - - 8bef8d9f by Luite Stegeman at 2023-12-14T04:31:33-05:00 JS: Mark spurious CI failures js_fragile(24259) This marks the spurious test failures on the JS platform as js_fragile(24259), so we don't hold up merge requests while fixing the underlying issues. See #24259 - - - - - 1c79526a by Finley McIlwaine at 2023-12-15T12:24:40-08:00 Late plugins - - - - - 000c3302 by Finley McIlwaine at 2023-12-15T12:24:40-08:00 withTiming on LateCCs and late plugins - - - - - be4551ac by Finley McIlwaine at 2023-12-15T12:24:40-08:00 add test for late plugins - - - - - 7c29da9f by Finley McIlwaine at 2023-12-15T12:24:40-08:00 Document late plugins - - - - - 9a52ae46 by Ben Gamari at 2023-12-20T07:07:26-05:00 Fix thunk update ordering Previously we attempted to ensure soundness of concurrent thunk update by synchronizing on the access of the thunk's info table pointer field. This was believed to be sufficient since the indirectee (which may expose a closure allocated by another core) would not be examined until the info table pointer update is complete. However, it turns out that this can result in data races in the presence of multiple threads racing a update a single thunk. For instance, consider this interleaving under the old scheme: Thread A Thread B --------- --------- t=0 Enter t 1 Push update frame 2 Begin evaluation 4 Pause thread 5 t.indirectee=tso 6 Release t.info=BLACKHOLE 7 ... (e.g. GC) 8 Resume thread 9 Finish evaluation 10 Relaxed t.indirectee=x 11 Load t.info 12 Acquire fence 13 Inspect t.indirectee 14 Release t.info=BLACKHOLE Here Thread A enters thunk `t` but is soon paused, resulting in `t` being lazily blackholed at t=6. Then, at t=10 Thread A finishes evaluation and updates `t.indirectee` with a relaxed store. Meanwhile, Thread B enters the blackhole. Under the old scheme this would introduce an acquire-fence but this would only synchronize with Thread A at t=6. Consequently, the result of the evaluation, `x`, is not visible to Thread B, introducing a data race. We fix this by treating the `indirectee` field as we do all other mutable fields. This means we must always access this field with acquire-loads and release-stores. See #23185. - - - - - f4b53538 by Vladislav Zavialov at 2023-12-20T07:08:02-05:00 docs: Fix link to 051-ghc-base-libraries.rst The proposal is no longer available at the previous URL. - - - - - f7e21fab by Matthew Pickering at 2023-12-21T14:57:40+00:00 hadrian: Build all executables in bin/ folder In the end the bindist creation logic copies them all into the bin folder. There is no benefit to building a specific few binaries in the lib/bin folder anymore. This also removes the ad-hoc logic to copy the touchy and unlit executables from stage0 into stage1. It takes <1s to build so we might as well just build it. - - - - - 0038d052 by Zubin Duggal at 2023-12-22T23:28:00-05:00 testsuite: mark jspace as fragile on i386. This test has been flaky for some time and has been failing consistently on i386-linux since 8e0446df landed. See #24261 - - - - - dfd670a0 by Ben Bellick at 2023-12-24T10:10:31-05:00 Deprecate -ddump-json and introduce -fdiagnostics-as-json Addresses #19278 This commit deprecates the underspecified -ddump-json flag and introduces a newer, well-specified flag -fdiagnostics-as-json. Also included is a JSON schema as part of the documentation. The -ddump-json flag will be slated for removal shortly after this merge. - - - - - 609e6225 by Ben Bellick at 2023-12-24T10:10:31-05:00 Deprecate -ddump-json and introduce -fdiagnostics-as-json Addresses #19278 This commit deprecates the underspecified -ddump-json flag and introduces a newer, well-specified flag -fdiagnostics-as-json. Also included is a JSON schema as part of the documentation. The -ddump-json flag will be slated for removal shortly after this merge. - - - - - 865513b2 by Ömer Sinan Ağacan at 2023-12-24T10:11:13-05:00 Fix BNF in user manual 6.6.8.2: formal syntax for instance declarations - - - - - c247b6be by Zubin Duggal at 2023-12-25T16:01:23-05:00 docs: document permissibility of -XOverloadedLabels (#24249) Document the permissibility introduced by https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0170-unrestricted-overloadedlabels.rst - - - - - e5b7eb59 by Ömer Sinan Ağacan at 2023-12-25T16:02:03-05:00 Fix a code block syntax in user manual sec. 6.8.8.6 - - - - - 2db11c08 by Ben Gamari at 2023-12-29T15:35:48-05:00 genSym: Reimplement via CAS on 32-bit platforms Previously the remaining use of the C implementation on 32-bit platforms resulted in a subtle bug, #24261. This was due to the C object (which used the RTS's `atomic_inc64` macro) being compiled without `-threaded` yet later being used in a threaded compiler. Side-step this issue by using the pure Haskell `genSym` implementation on all platforms. This required implementing `fetchAddWord64Addr#` in terms of CAS on 64-bit platforms. - - - - - 19328a8c by Xiaoyan Ren at 2023-12-29T15:36:30-05:00 Do not color the diagnostic code in error messages (#24172) - - - - - 685b467c by Krzysztof Gogolewski at 2023-12-29T15:37:06-05:00 Enforce that bindings of implicit parameters are lifted Fixes #24298 - - - - - bc4d67b7 by Matthew Craven at 2023-12-31T06:15:42-05:00 StgToCmm: Detect some no-op case-continuations ...and generate no code for them. Fixes #24264. - - - - - 5b603139 by Krzysztof Gogolewski at 2023-12-31T06:16:18-05:00 Revert "testsuite: mark jspace as fragile on i386." This reverts commit 0038d052c8c80b4b430bb2aa1c66d5280be1aa95. The atomicity bug should be fixed by !11802. - - - - - d55216ad by Krzysztof Gogolewski at 2024-01-01T12:05:49-05:00 Refactor: store [[PrimRep]] rather than [Type] in STG StgConApp stored a list of types. This list was used exclusively during unarisation of unboxed sums (mkUbxSum). However, this is at a wrong level of abstraction: STG shouldn't be concerned with Haskell types, only PrimReps. Update the code to store a [[PrimRep]]. Also, there's no point in storing this list when we're not dealing with an unboxed sum. - - - - - 8b340bc7 by Ömer Sinan Ağacan at 2024-01-01T12:06:29-05:00 Kind signatures docs: mention that they're allowed in newtypes - - - - - 989bf8e5 by Zubin Duggal at 2024-01-03T20:08:47-05:00 ci: Ensure we use the correct bindist name for the test artifact when generating release ghcup metadata Fixes #24268 - - - - - 89299a89 by Krzysztof Gogolewski at 2024-01-03T20:09:23-05:00 Refactor: remove calls to typePrimRepArgs The function typePrimRepArgs is just a thin wrapper around typePrimRep, adding a VoidRep if the list is empty. However, in StgToByteCode, we were discarding that VoidRep anyway, so there's no point in calling it. - - - - - c7be0c68 by mmzk1526 at 2024-01-03T20:10:07-05:00 Use "-V" for alex version check for better backward compatibility Fixes #24302. In recent versions of alex, "-v" is used for "--verbose" instead of "-version". - - - - - 67dbcc0a by Krzysztof Gogolewski at 2024-01-05T02:07:18-05:00 Fix VoidRep handling in ghci debugger 'go' inside extractSubTerms was giving a bad result given a VoidRep, attempting to round towards the next multiple of 0. I don't understand much about the debugger but the code should be better than it was. Fixes #24306 - - - - - 90ea574e by Krzysztof Gogolewski at 2024-01-05T02:07:54-05:00 VoidRep-related refactor * In GHC.StgToByteCode, replace bcIdPrimId with idPrimRep, bcIdArgRep with idArgRep, atomPrimRep with stgArgRep1. All of them were duplicates. * In GHC.Stg.Unarise, we were converting a PrimRep to a Type and back to PrimRep. Remove the calls to primRepToType and typePrimRep1 which cancel out. * In GHC.STG.Lint, GHC.StgToCmm, GHC.Types.RepType we were filtering out VoidRep from the result of typePrimRep. But typePrimRep never returns VoidRep - remove the filtering. - - - - - eaf72479 by brian at 2024-01-06T23:03:09-05:00 Add unaligned Addr# primops Implements CLC proposal #154: https://github.com/haskell/core-libraries-committee/issues/154 * add unaligned addr primops * add tests * accept tests * add documentation * fix js primops * uncomment in access ops * use Word64 in tests * apply suggestions * remove extra file * move docs * remove random options * use setByteArray# primop * better naming * update base-exports test * add base-exports for other architectures - - - - - d471d445 by Krzysztof Gogolewski at 2024-01-06T23:03:47-05:00 Remove VoidRep from PrimRep, introduce PrimOrVoidRep This introduces data PrimOrVoidRep = VoidRep | NVRep PrimRep changes typePrimRep1 to return PrimOrVoidRep, and adds a new function typePrimRepU to be used when the argument is definitely non-void. Details in Note [VoidRep] in GHC.Types.RepType. Fixes #19520 - - - - - 48720a07 by Matthew Craven at 2024-01-08T18:57:36-05:00 Apply Note [Sensitivity to unique increment] to LargeRecord - - - - - 9e2e180f by Sebastian Graf at 2024-01-08T18:58:13-05:00 Debugging: Add diffUFM for convenient diffing between UniqFMs - - - - - 948f3e35 by Sebastian Graf at 2024-01-08T18:58:13-05:00 Rename Opt_D_dump_stranal to Opt_D_dump_dmdanal ... and Opt_D_dump_str_signatures to Opt_D_dump_dmd_signatures - - - - - 4e217e3e by Sebastian Graf at 2024-01-08T18:58:13-05:00 Deprecate -ddump-stranal and -ddump-str-signatures ... and suggest -ddump-dmdanal and -ddump-dmd-signatures instead - - - - - 6c613c90 by Sebastian Graf at 2024-01-08T18:58:13-05:00 Move testsuite/tests/stranal to testsuite/tests/dmdanal A separate commit so that the rename is obvious to Git(Lab) - - - - - c929f02b by Sebastian Graf at 2024-01-08T18:58:13-05:00 CoreSubst: Stricten `substBndr` and `cloneBndr` Doing so reduced allocations of `cloneBndr` by about 25%. ``` T9233(normal) ghc/alloc 672,488,656 663,083,216 -1.4% GOOD T9675(optasm) ghc/alloc 423,029,256 415,812,200 -1.7% geo. mean -0.1% minimum -1.7% maximum +0.1% ``` Metric Decrease: T9233 - - - - - e3ca78f3 by Krzysztof Gogolewski at 2024-01-10T17:35:59-05:00 Deprecate -Wsemigroup This warning was used to prepare for Semigroup becoming a superclass of Monoid, and for (<>) being exported from Prelude. This happened in GHC 8.4 in 8ae263ceb3566 and feac0a3bc69fd3. The leftover logic for (<>) has been removed in GHC 9.8, 4d29ecdfcc79. Now the warning does nothing at all and can be deprecated. - - - - - 08d14925 by amesgen at 2024-01-10T17:36:42-05:00 WASM metadata: use correct GHC version - - - - - 7a808419 by Xiaoyan Ren at 2024-01-10T17:37:24-05:00 Allow SCC declarations in TH (#24081) - - - - - 28827c51 by Xiaoyan Ren at 2024-01-10T17:37:24-05:00 Fix prettyprinting of SCC pragmas - - - - - ae9cc1a8 by Matthew Craven at 2024-01-10T17:38:01-05:00 Fix loopification in the presence of void arguments This also removes Note [Void arguments in self-recursive tail calls], which was just misleading. It's important to count void args both in the function's arity and at the call site. Fixes #24295. - - - - - b718b145 by Zubin Duggal at 2024-01-10T17:38:36-05:00 testsuite: Teach testsuite driver about c++ sources - - - - - 09cb57ad by Zubin Duggal at 2024-01-10T17:38:36-05:00 driver: Set -DPROFILING when compiling C++ sources with profiling Earlier, we used to pass all preprocessor flags to the c++ compiler. This meant that -DPROFILING was passed to the c++ compiler because it was a part of C++ flags However, this was incorrect and the behaviour was changed in 8ff3134ed4aa323b0199ad683f72165e51a59ab6. See #21291. But that commit exposed this bug where -DPROFILING was no longer being passed when compiling c++ sources. The fix is to explicitly include -DPROFILING in `opt_cxx` when profiling is enabled to ensure we pass the correct options for the way to both C and C++ compilers Fixes #24286 - - - - - 2cf9dd96 by Zubin Duggal at 2024-01-10T17:38:36-05:00 testsuite: rename objcpp -> objcxx To avoid confusion with C Pre Processsor - - - - - af6932d6 by Simon Peyton Jones at 2024-01-10T17:39:12-05:00 Make TYPE and CONSTRAINT not-apart Issue #24279 showed up a bug in the logic in GHC.Core.Unify.unify_ty which is supposed to make TYPE and CONSTRAINT be not-apart. Easily fixed. - - - - - 4a39b5ff by Zubin Duggal at 2024-01-10T17:39:48-05:00 ci: Fix typo in mk_ghcup_metadata.py There was a missing colon in the fix to #24268 in 989bf8e53c08eb22de716901b914b3607bc8dd08 - - - - - 13503451 by Zubin Duggal at 2024-01-10T17:40:24-05:00 release-ci: remove release-x86_64-linux-deb11-release+boot_nonmoving_gc job There is no reason to have this release build or distribute this variation. This configuration is for testing purposes only. - - - - - afca46a4 by Sebastian Graf at 2024-01-10T17:41:00-05:00 Parser: Add a Note detailing why we need happy's `error` to implement layout - - - - - eaf8a06d by Krzysztof Gogolewski at 2024-01-11T00:43:17+01:00 Turn -Wtype-equality-out-of-scope on by default Also remove -Wnoncanonical-{monoid,monad}-instances from -Wcompat, since they are enabled by default. Refresh wcompat-warnings/ test with new -Wcompat warnings. Part of #24267 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 42bee5aa by Sebastian Graf at 2024-01-12T21:16:21-05:00 Arity: Require called *exactly once* for eta exp with -fpedantic-bottoms (#24296) In #24296, we had a program in which we eta expanded away an error despite the presence of `-fpedantic-bottoms`. This was caused by turning called *at least once* lambdas into one-shot lambdas, while with `-fpedantic-bottoms` it is only sound to eta expand over lambdas that are called *exactly* once. An example can be found in `Note [Combining arity type with demand info]`. Fixes #24296. - - - - - 7e95f738 by Andreas Klebinger at 2024-01-12T21:16:57-05:00 Aarch64: Enable -mfma by default. Fixes #24311 - - - - - e43788d0 by Jason Shipman at 2024-01-14T12:47:38-05:00 Add more instances for Compose: Fractional, RealFrac, Floating, RealFloat CLC proposal #226 https://github.com/haskell/core-libraries-committee/issues/226 - - - - - ae6d8cd2 by Sebastian Graf at 2024-01-14T12:48:15-05:00 Pmc: COMPLETE pragmas associated with Family TyCons should apply to representation TyCons as well (#24326) Fixes #24326. - - - - - c5fc7304 by sheaf at 2024-01-15T14:15:29-05:00 Use lookupOccRn_maybe in TH.lookupName When looking up a value, we want to be able to find both variables and record fields. So we should not use the lookupSameOccRn_maybe function, as we can't know ahead of time which record field namespace a record field with the given textual name will belong to. Fixes #24293 - - - - - da908790 by Krzysztof Gogolewski at 2024-01-15T14:16:05-05:00 Make the build more strict on documentation errors * Detect undefined labels. This can be tested by adding :ref:`nonexistent` to a documentation rst file; attempting to build docs will fail. Fixed the undefined label in `9.8.1-notes.rst`. * Detect errors. While we have plenty of warnings, we can at least enforce that Sphinx does not report errors. Fixed the error in `required_type_arguments.rst`. Unrelated change: I have documented that the `-dlint` enables `-fcatch-nonexhaustive-cases`, as can be verified by checking `enableDLint`. - - - - - 5077416e by Javier Sagredo at 2024-01-16T15:40:06-05:00 Profiling: Adds an option to not start time profiling at startup Using the functionality provided by d89deeba47ce04a5198a71fa4cbc203fe2c90794, this patch creates a new rts flag `--no-automatic-time-samples` which disables the time profiling when starting a program. It is then expected that the user starts it whenever it is needed. Fixes #24337 - - - - - 5776008c by Matthew Pickering at 2024-01-16T15:40:42-05:00 eventlog: Fix off-by-one error in postIPE We were missing the extra_comma from the calculation of the size of the payload of postIPE. This was causing assertion failures when the event would overflow the buffer by one byte, as ensureRoomForVariable event would report there was enough space for `n` bytes but then we would write `n + 1` bytes into the buffer. Fixes #24287 - - - - - 66dc09b1 by Simon Peyton Jones at 2024-01-16T15:41:18-05:00 Improve SpecConstr (esp nofib/spectral/ansi) This MR makes three improvements to SpecConstr: see #24282 * It fixes an outright (and recently-introduced) bug in `betterPat`, which was wrongly forgetting to compare the lengths of the argument lists. * It enhances ConVal to inclue a boolean for work-free-ness, so that the envt can contain non-work-free constructor applications, so that we can do more: see Note [ConVal work-free-ness] * It rejigs `subsumePats` so that it doesn't reverse the list. This can make a difference because, when patterns overlap, we arbitrarily pick the first. There is no "right" way, but this retains the old pre-subsumePats behaviour, thereby "fixing" the regression in #24282. Nofib results +======================================== | spectral/ansi -21.14% | spectral/hartel/comp_lab_zift -0.12% | spectral/hartel/parstof +0.09% | spectral/last-piece -2.32% | spectral/multiplier +6.03% | spectral/para +0.60% | spectral/simple -0.26% +======================================== | geom mean -0.18% +---------------------------------------- The regression in `multiplier` is sad, but it simply replicates GHC's previous behaviour (e.g. GHC 9.6). - - - - - 65da79b3 by Matthew Pickering at 2024-01-16T15:41:54-05:00 hadrian: Reduce Cabal verbosity The comment claims that `simpleUserHooks` decrease verbosity, and it does, but only for the `postConf` phase. The other phases are too verbose with `-V`. At the moment > 5000 lines of the build log are devoted to output from `cabal copy`. So I take the simple approach and just decrease the verbosity level again. If the output of `postConf` is essential then it would be better to implement our own `UserHooks` which doesn't decrease the verbosity for `postConf`. Fixes #24338 - - - - - 16414d7d by Matthew Pickering at 2024-01-17T10:54:59-05:00 Stop retaining old ModGuts throughout subsequent simplifier phases Each phase of the simplifier typically rewrites the majority of ModGuts, so we want to be able to release the old ModGuts as soon as possible. `name_ppr_ctxt` lives throught the whole optimiser phase and it was retaining a reference to `ModGuts`, so we were failing to release the old `ModGuts` until the end of the phase (potentially doubling peak memory usage for that particular phase). This was discovered using eras profiling (#24332) Fixes #24328 - - - - - 7f0879e1 by Matthew Pickering at 2024-01-17T10:55:35-05:00 Update nofib submodule - - - - - 320454d3 by Cheng Shao at 2024-01-17T23:02:40+00:00 ci: bump ci-images for updated wasm image - - - - - 2eca52b4 by Cheng Shao at 2024-01-17T23:06:44+00:00 base: treat all FDs as "nonblocking" on wasm On posix platforms, when performing read/write on FDs, we check the nonblocking flag first. For FDs without this flag (e.g. stdout), we call fdReady() first, which in turn calls poll() to wait for I/O to be available on that FD. This is problematic for wasm32-wasi: although select()/poll() is supported via the poll_oneoff() wasi syscall, that syscall is rather heavyweight and runtime behavior differs in different wasi implementations. The issue is even worse when targeting browsers, given there's no satisfactory way to implement async I/O as a synchronous syscall, so existing JS polyfills for wasi often give up and simply return ENOSYS. Before we have a proper I/O manager that avoids poll_oneoff() for async I/O on wasm, this patch improves the status quo a lot by merely pretending all FDs are "nonblocking". Read/write on FDs will directly invoke read()/write(), which are much more reliably handled in existing wasi implementations, especially those in browsers. Fixes #23275 and the following test cases: T7773 isEOF001 openFile009 T4808 cgrun025 Approved by CLC proposal #234: https://github.com/haskell/core-libraries-committee/issues/234 - - - - - 83c6c710 by Andrew Lelechenko at 2024-01-18T05:21:49-05:00 base: clarify how to disable warnings about partiality of Data.List.{head,tail} - - - - - c4078f2f by Simon Peyton Jones at 2024-01-18T05:22:25-05:00 Fix four bug in handling of (forall cv. body_ty) These bugs are all described in #24335 It's not easy to provoke the bug, hence no test case. - - - - - 119586ea by Alexis King at 2024-01-19T00:08:00-05:00 Always refresh profiling CCSes after running pending initializers Fixes #24171. - - - - - 9718d970 by Oleg Grenrus at 2024-01-19T00:08:36-05:00 Set default-language: GHC2021 in ghc library Go through compiler/ sources, and remove all BangPatterns (and other GHC2021 enabled extensions in these files). - - - - - 3ef71669 by Matthew Pickering at 2024-01-19T21:55:16-05:00 testsuite: Remove unused have_library function Also remove the hence unused testsuite option `--test-package-db`. Fixes #24342 - - - - - 5b7fa20c by Jade at 2024-01-19T21:55:53-05:00 Fix Spelling in the compiler Tracking: #16591 - - - - - 09875f48 by Matthew Pickering at 2024-01-20T12:20:44-05:00 testsuite: Implement `isInTreeCompiler` in a more robust way Just a small refactoring to avoid redundantly specifying the same strings in two different places. - - - - - 0d12b987 by Jade at 2024-01-20T12:21:20-05:00 Change maintainer email from cvs-ghc at haskell.org to ghc-devs at haskell.org. Fixes #22142 - - - - - eebdd316 by Apoorv Ingle at 2024-01-23T13:49:12+00:00 Changes for haskell/haddock#18324 - - - - - 1fa1c00c by Jade at 2024-01-23T19:17:03-05:00 Enhance Documentation of functions exported by Data.Function This patch aims to improve the documentation of functions exported in Data.Function Tracking: #17929 Fixes: #10065 - - - - - ab47a43d by Jade at 2024-01-23T19:17:39-05:00 Improve documentation of hGetLine. - Add explanation for whether a newline is returned - Add examples Fixes #14804 - - - - - dd4af0e5 by Cheng Shao at 2024-01-23T19:18:17-05:00 Fix genapply for cross-compilation by nuking fragile CPP logic This commit fixes incorrectly built genapply when cross compiling (#24347) by nuking all fragile CPP logic in it from the orbit. All target-specific info are now read from DerivedConstants.h at runtime, see added note for details. Also removes a legacy Makefile and adds haskell language server support for genapply. - - - - - 0cda2b8b by Cheng Shao at 2024-01-23T19:18:17-05:00 rts: enable wasm32 register mapping The wasm backend didn't properly make use of all Cmm global registers due to #24347. Now that it is fixed, this patch re-enables full register mapping for wasm32, and we can now generate smaller & faster wasm modules that doesn't always spill arguments onto the stack. Fixes #22460 #24152. - - - - - 0325a6e5 by Greg Steuck at 2024-01-24T01:29:44-05:00 Avoid utf8 in primops.txt.pp comments They don't make it through readFile' without explicitly setting the encoding. See https://gitlab.haskell.org/ghc/ghc/-/issues/17755 - - - - - 1aaf0bd8 by David Binder at 2024-01-24T01:30:20-05:00 Bump hpc and hpc-bin submodule Bump hpc to 0.7.0.1 Bump hpc-bin to commit d1780eb2 - - - - - e693a4e8 by Ben Gamari at 2024-01-24T01:30:56-05:00 testsuite: Ignore stderr in T8089 Otherwise spurious "Killed: 9" messages to stderr may cause the test to fail. Fixes #24361. - - - - - a40f4ab2 by sheaf at 2024-01-24T14:04:33-05:00 Fix FMA instruction on LLVM We were emitting the wrong instructions for fused multiply-add operations on LLVM: - the instruction name is "llvm.fma.f32" or "llvm.fma.f64", not "fmadd" - LLVM does not support other instructions such as "fmsub"; instead we implement these by flipping signs of some arguments - the instruction is an LLVM intrinsic, which requires handling it like a normal function call instead of a machine instruction Fixes #24223 - - - - - 69abc786 by Andrei Borzenkov at 2024-01-24T14:05:09-05:00 Add changelog entry for renaming tuples from (,,...,,) to Tuple<n> (24291) - - - - - 0ac8f385 by Cheng Shao at 2024-01-25T00:27:48-05:00 compiler: remove unused GHC.Linker module The GHC.Linker module is empty and unused, other than as a hack for the make build system. We can remove it now that make is long gone; the note is moved to GHC.Linker.Loader instead. - - - - - 699da01b by Hécate Moonlight at 2024-01-25T00:28:27-05:00 Clarification for newtype constructors when using `coerce` - - - - - b2d8cd85 by Matt Walker at 2024-01-26T09:50:08-05:00 Fix #24308 Add tests for semicolon separated where clauses - - - - - 0da490a1 by Ben Gamari at 2024-01-26T17:34:41-05:00 hsc2hs: Bump submodule - - - - - 3f442fd2 by Ben Gamari at 2024-01-26T17:34:41-05:00 Bump containers submodule to 0.7 - - - - - 82a1c656 by Sebastian Nagel at 2024-01-29T02:32:40-05:00 base: with{Binary}File{Blocking} only annotates own exceptions Fixes #20886 This ensures that inner, unrelated exceptions are not misleadingly annotated with the opened file. - - - - - 9294a086 by Andreas Klebinger at 2024-01-29T02:33:15-05:00 Fix fma warning when using llvm on aarch64. On aarch64 fma is always on so the +fma flag doesn't exist for that target. Hence no need to try and pass +fma to llvm. Fixes #24379 - - - - - ced2e731 by sheaf at 2024-01-29T17:27:12-05:00 No shadowing warnings for NoFieldSelector fields This commit ensures we don't emit shadowing warnings when a user shadows a field defined with NoFieldSelectors. Fixes #24381 - - - - - 8eeadfad by Patrick at 2024-01-29T17:27:51-05:00 Fix bug wrong span of nested_doc_comment #24378 close #24378 1. Update the start position of span in `nested_doc_comment` correctly. and hence the spans of identifiers of haddoc can be computed correctly. 2. add test `HaddockSpanIssueT24378`. - - - - - a557580f by Alexey Radkov at 2024-01-30T19:41:52-05:00 Fix irrelevant dodgy-foreign-imports warning on import f-pointers by value A test *сс018* is attached (not sure about the naming convention though). Note that without the fix, the test fails with the *dodgy-foreign-imports* warning passed to stderr. The warning disappears after the fix. GHC shouldn't warn on imports of natural function pointers from C by value (which is feasible with CApiFFI), such as ```haskell foreign import capi "cc018.h value f" f :: FunPtr (Int -> IO ()) ``` where ```c void (*f)(int); ``` See a related real-world use-case [here](https://gitlab.com/daniel-casanueva/pcre-light/-/merge_requests/17). There, GHC warns on import of C function pointer `pcre_free`. - - - - - ca99efaf by Alexey Radkov at 2024-01-30T19:41:53-05:00 Rename test cc018 -> T24034 - - - - - 88c38dd5 by Ben Gamari at 2024-01-30T19:42:28-05:00 rts/TraverseHeap.c: Ensure that PosixSource.h is included first - - - - - ca2e919e by Simon Peyton Jones at 2024-01-31T09:29:45+00:00 Make decomposeRuleLhs a bit more clever This fixes #24370 by making decomposeRuleLhs undertand dictionary /functions/ as well as plain /dictionaries/ - - - - - 94ce031d by Teo Camarasu at 2024-02-01T05:49:49-05:00 doc: Add -Dn flag to user guide Resolves #24394 - - - - - 31553b11 by Ben Gamari at 2024-02-01T12:21:29-05:00 cmm: Introduce MO_RelaxedRead In hand-written Cmm it can sometimes be necessary to atomically load from memory deep within an expression (e.g. see the `CHECK_GC` macro). This MachOp provides a convenient way to do so without breaking the expression into multiple statements. - - - - - 0785cf81 by Ben Gamari at 2024-02-01T12:21:29-05:00 codeGen: Use relaxed accesses in ticky bumping - - - - - be423dda by Ben Gamari at 2024-02-01T12:21:29-05:00 base: use atomic write when updating timer manager - - - - - 8a310e35 by Ben Gamari at 2024-02-01T12:21:29-05:00 Use relaxed atomics to manipulate TSO status fields - - - - - d6809ee4 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Add necessary barriers when manipulating TSO owner - - - - - 39e3ac5d by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Use `switch` to branch on why_blocked This is a semantics-preserving refactoring. - - - - - 515eb33d by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix synchronization on thread blocking state We now use a release barrier whenever we update a thread's blocking state. This required widening StgTSO.why_blocked as AArch64 does not support atomic writes on 16-bit values. - - - - - eb38812e by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in threadPaused This only affects an assertion in the debug RTS and only needs relaxed ordering. - - - - - 26c48dd6 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in threadStatus# - - - - - 6af43ab4 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in Interpreter's preemption check - - - - - 9502ad3c by Ben Gamari at 2024-02-01T12:21:29-05:00 rts/Messages: Fix data race - - - - - 60802db5 by Ben Gamari at 2024-02-01T12:21:30-05:00 rts/Prof: Fix data race - - - - - ef8ccef5 by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Use relaxed ordering on dirty/clean info tables updates When changing the dirty/clean state of a mutable object we needn't have any particular ordering. - - - - - 76fe2b75 by Ben Gamari at 2024-02-01T12:21:30-05:00 codeGen: Use relaxed-read in closureInfoPtr - - - - - a6316eb4 by Ben Gamari at 2024-02-01T12:21:30-05:00 STM: Use acquire loads when possible Full sequential consistency is not needed here. - - - - - 6bddfd3d by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Use fence rather than redundant load Previously we would use an atomic load to ensure acquire ordering. However, we now have `ACQUIRE_FENCE_ON`, which allows us to express this more directly. - - - - - 55c65dbc by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Fix data races in profiling timer - - - - - 856b5e75 by Ben Gamari at 2024-02-01T12:21:30-05:00 Add Note [C11 memory model] - - - - - 6534da24 by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: move generic cmm optimization logic in NCG to a standalone module This commit moves GHC.CmmToAsm.cmmToCmm to a standalone module, GHC.Cmm.GenericOpt. The main motivation is enabling this logic to be run in the wasm backend NCG code, which is defined in other modules that's imported by GHC.CmmToAsm, causing a cyclic dependency issue. - - - - - 87e34888 by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: explicitly disable PIC in wasm32 NCG This commit explicitly disables the ncgPIC flag for the wasm32 target. The wasm backend doesn't support PIC for the time being. - - - - - c6ce242e by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: enable generic cmm optimizations in wasm backend NCG This commit enables the generic cmm optimizations in other NCGs to be run in the wasm backend as well, followed by a late cmm control-flow optimization pass. The added optimizations do catch some corner cases not handled by the pre-NCG cmm pipeline and are useful in generating smaller CFGs. - - - - - 151dda4e by Andrei Borzenkov at 2024-02-01T12:22:43-05:00 Namespacing for WARNING/DEPRECATED pragmas (#24396) New syntax for WARNING and DEPRECATED pragmas was added, namely namespace specifierss: namespace_spec ::= 'type' | 'data' | {- empty -} warning ::= warning_category namespace_spec namelist strings deprecation ::= namespace_spec namelist strings A new data type was introduced to represent these namespace specifiers: data NamespaceSpecifier = NoSpecifier | TypeNamespaceSpecifier (EpToken "type") | DataNamespaceSpecifier (EpToken "data") Extension field XWarning now contains this NamespaceSpecifier. lookupBindGroupOcc function was changed: it now takes NamespaceSpecifier and checks that the namespace of the found names matches the passed flag. With this change {-# WARNING data D "..." #-} pragma will only affect value namespace and {-# WARNING type D "..." #-} will only affect type namespace. The same logic is applicable to DEPRECATED pragmas. Finding duplicated warnings inside rnSrcWarnDecls now takes into consideration NamespaceSpecifier flag to allow warnings with the same names that refer to different namespaces. - - - - - 38c3afb6 by Bryan Richter at 2024-02-01T12:23:19-05:00 CI: Disable the test-cabal-reinstall job Fixes #24363 - - - - - 27020458 by Matthew Craven at 2024-02-03T01:53:26-05:00 Bump bytestring submodule to something closer to 0.12.1 ...mostly so that 16d6b7e835ffdcf9b894e79f933dd52348dedd0c (which reworks unaligned writes in Builder) and the stuff in https://github.com/haskell/bytestring/pull/631 can see wider testing. The less-terrible code for unaligned writes used in Builder on hosts not known to be ulaigned-friendly also takes less effort for GHC to compile, resulting in a metric decrease for T21839c on some platforms. The metric increase on T21839r is caused by the unrelated commit 750dac33465e7b59100698a330b44de7049a345c. It perhaps warrants further analysis and discussion (see #23822) but is not critical. Metric Decrease: T21839c Metric Increase: T21839r - - - - - cdddeb0f by Rodrigo Mesquita at 2024-02-03T01:54:02-05:00 Work around autotools setting C11 standard in CC/CXX In autoconf >=2.70, C11 is set by default for $CC and $CXX via the -std=...11 flag. In this patch, we split the "-std" flag out of the $CC and $CXX variables, which we traditionally assume to be just the executable name/path, and move it to $CFLAGS/$CXXFLAGS instead. Fixes #24324 - - - - - 5ff7cc26 by Apoorv Ingle at 2024-02-03T13:14:46-06:00 Expand `do` blocks right before typechecking using the `HsExpansion` philosophy. - Fixes #18324 #20020 #23147 #22788 #15598 #22086 #21206 - The change is detailed in - Note [Expanding HsDo with HsExpansion] in `GHC.Tc.Gen.Do` - Note [Doing HsExpansion in the Renamer vs Typechecker] in `GHC.Rename.Expr` expains the rational of doing expansions in type checker as opposed to in the renamer - Adds new datatypes: - `GHC.Hs.Expr.XXExprGhcRn`: new datatype makes this expansion work easier 1. Expansion bits for Expressions, Statements and Patterns in (`ExpandedThingRn`) 2. `PopErrCtxt` a special GhcRn Phase only artifcat to pop the previous error message in the error context stack - `GHC.Basic.Origin` now tracks the reason for expansion in case of Generated This is useful for type checking cf. `GHC.Tc.Gen.Expr.tcExpr` case for `HsLam` - Kills `HsExpansion` and `HsExpanded` as we have inlined them in `XXExprGhcRn` and `XXExprGhcTc` - Ensures warnings such as 1. Pattern match checks 2. Failable patterns 3. non-() return in body statements are preserved - Kill `HsMatchCtxt` in favor of `TcMatchAltChecker` - Testcases: * T18324 T20020 T23147 T22788 T15598 T22086 * T23147b (error message check), * DoubleMatch (match inside a match for pmc check) * pattern-fails (check pattern match with non-refutable pattern, eg. newtype) * Simple-rec (rec statements inside do statment) * T22788 (code snippet from #22788) * DoExpanion1 (Error messages for body statments) * DoExpansion2 (Error messages for bind statements) * DoExpansion3 (Error messages for let statements) Also repoint haddock to the right submodule so that the test (haddockHypsrcTest) pass Metric Increase 'compile_time/bytes allocated': T9020 The testcase is a pathalogical example of a `do`-block with many statements that do nothing. Given that we are expanding the statements into function binds, we will have to bear a (small) 2% cost upfront in the compiler to unroll the statements. - - - - - 0df8ce27 by Vladislav Zavialov at 2024-02-04T03:55:14-05:00 Reduce parser allocations in allocateCommentsP In the most common case, the comment queue is empty, so we can skip the work of processing it. This reduces allocations by about 10% in the parsing001 test. Metric Decrease: MultiLayerModulesRecomp parsing001 - - - - - ae856a82 by Matthew Pickering at 2024-02-05T12:22:39+00:00 ghc-internals fallout - - - - - cfd68290 by Simon Peyton Jones at 2024-02-05T17:58:33-05:00 Stop dropping a case whose binder is demanded This MR fixes #24251. See Note [Case-to-let for strictly-used binders] in GHC.Core.Opt.Simplify.Iteration, plus #24251, for lots of discussion. Final Nofib changes over 0.1%: +----------------------------------------- | imaginary/digits-of-e2 -2.16% | imaginary/rfib -0.15% | real/fluid -0.10% | real/gamteb -1.47% | real/gg -0.20% | real/maillist +0.19% | real/pic -0.23% | real/scs -0.43% | shootout/n-body -0.41% | shootout/spectral-norm -0.12% +======================================== | geom mean -0.05% Pleasingly, overall executable size is down by just over 1%. Compile times (in perf/compiler) wobble around a bit +/- 0.5%, but the geometric mean is -0.1% which seems good. - - - - - e4d137bb by Simon Peyton Jones at 2024-02-05T17:58:33-05:00 Add Note [Bangs in Integer functions] ...to document the bangs in the functions in GHC.Num.Integer - - - - - ce90f12f by Andrei Borzenkov at 2024-02-05T17:59:09-05:00 Hide WARNING/DEPRECATED namespacing under -XExplicitNamespaces (#24396) - - - - - e2ea933f by Simon Peyton Jones at 2024-02-06T10:12:04-05:00 Refactoring in preparation for lazy skolemisation * Make HsMatchContext and HsStmtContext be parameterised over the function name itself, rather than over the pass. See [mc_fun field of FunRhs] in Language.Haskell.Syntax.Expr - Replace types HsMatchContext GhcPs --> HsMatchContextPs HsMatchContext GhcRn --> HsMatchContextRn HsMatchContext GhcTc --> HsMatchContextRn (sic! not Tc) HsStmtContext GhcRn --> HsStmtContextRn - Kill off convertHsMatchCtxt * Split GHC.Tc.Type.BasicTypes.TcSigInfo so that TcCompleteSig (describing a complete user-supplied signature) is its own data type. - Split TcIdSigInfo(CompleteSig, PartialSig) into TcCompleteSig(CSig) TcPartialSig(PSig) - Use TcCompleteSig in tcPolyCheck, CheckGen - Rename types and data constructors: TcIdSigInfo --> TcIdSig TcPatSynInfo(TPSI) --> TcPatSynSig(PatSig) - Shuffle around helper functions: tcSigInfoName (moved to GHC.Tc.Types.BasicTypes) completeSigPolyId_maybe (moved to GHC.Tc.Types.BasicTypes) tcIdSigName (inlined and removed) tcIdSigLoc (introduced) - Rearrange the pattern match in chooseInferredQuantifiers * Rename functions and types: tcMatchesCase --> tcCaseMatches tcMatchesFun --> tcFunBindMatches tcMatchLambda --> tcLambdaMatches tcPats --> tcMatchPats matchActualFunTysRho --> matchActualFunTys matchActualFunTySigma --> matchActualFunTy * Add HasDebugCallStack constraints to: mkBigCoreVarTupTy, mkBigCoreTupTy, boxTy, mkPiTy, mkPiTys, splitAppTys, splitTyConAppNoView_maybe * Use `penv` from the outer context in the inner loop of GHC.Tc.Gen.Pat.tcMultiple * Move tcMkVisFunTy, tcMkInvisFunTy, tcMkScaledFunTys down the file, factor out and export tcMkScaledFunTy. * Move isPatSigCtxt down the file. * Formatting and comments Co-authored-by: Vladislav Zavialov <vlad.z.4096 at gmail.com> - - - - - f5d3e03c by Andrei Borzenkov at 2024-02-06T10:12:04-05:00 Lazy skolemisation for @a-binders (#17594) This patch is a preparation for @a-binders implementation. The main changes are: * Skolemisation is now prepared to deal with @binders. See Note [Skolemisation overview] in GHC.Tc.Utils.Unify. Most of the action is in - Utils.Unify.matchExpectedFunTys - Gen.Pat.tcMatchPats - Gen.Expr.tcPolyExprCheck - Gen.Binds.tcPolyCheck Some accompanying refactoring: * I found that funTyConAppTy_maybe was doing a lot of allocation, and rejigged userTypeError_maybe to avoid calling it. - - - - - 532993c8 by Zubin Duggal at 2024-02-06T10:12:41-05:00 driver: Really don't lose track of nodes when we fail to resolve cycles This fixes a bug in 8db8d2fd1c881032b1b360c032b6d9d072c11723, where we could lose track of acyclic components at the start of an unresolved cycle. We now ensure we never loose track of any of these components. As T24275 demonstrates, a "cyclic" SCC might not really be a true SCC: When viewed without boot files, we have a single SCC ``` [REC main:T24275B [main:T24275B {-# SOURCE #-}, main:T24275A {-# SOURCE #-}] main:T24275A [main:T24275A {-# SOURCE #-}]] ``` But with boot files this turns into ``` [NONREC main:T24275B {-# SOURCE #-} [], REC main:T24275B [main:T24275B {-# SOURCE #-}, main:T24275A {-# SOURCE #-}] main:T24275A {-# SOURCE #-} [main:T24275B], NONREC main:T24275A [main:T24275A {-# SOURCE #-}]] ``` Note that this is truly not an SCC, as no nodes are reachable from T24275B.hs-boot. However, we treat this entire group as a single "SCC" because it seems so when we analyse the graph without taking boot files into account. Indeed, we must return a single ResolvedCycle element in the BuildPlan for this as described in Note [Upsweep]. However, since after resolving this is not a true SCC anymore, `findCycle` fails to find a cycle and we have a sub-optimal error message as a result. To handle this, I extended `findCycle` to not assume its input is an SCC, and to try harder to find cycles in its input. Fixes #24275 - - - - - b35dd613 by Zubin Duggal at 2024-02-06T10:13:17-05:00 GHCi: Lookup breakpoint CCs in the correct module We need to look up breakpoint CCs in the module that the breakpoint points to, and not the current module. Fixes #24327 - - - - - b09e6958 by Zubin Duggal at 2024-02-06T10:13:17-05:00 testsuite: Add test for #24327 - - - - - 569b4c10 by doyougnu at 2024-02-07T03:06:26-05:00 ts: add compile_artifact, ignore_extension flag In b521354216f2821e00d75f088d74081d8b236810 the testsuite gained the capability to collect generic metrics. But this assumed that the test was not linking and producing artifacts and we only wanted to track object files, interface files, or build artifacts from the compiler build. However, some backends, such as the JS backend, produce artifacts when compiling, such as the jsexe directory which we want to track. This patch: - tweaks the testsuite to collect generic metrics on any build artifact in the test directory. - expands the exe_extension function to consider windows and adds the ignore_extension flag. - Modifies certain tests to add the ignore_extension flag. Tests such as heaprof002 expect a .ps file, but on windows without ignore_extensions the testsuite will look for foo.exe.ps. Hence the flag. - adds the size_hello_artifact test - - - - - 75a31379 by doyougnu at 2024-02-07T03:06:26-05:00 ts: add wasm_arch, heapprof002 wasm extension - - - - - c9731d6d by Rodrigo Mesquita at 2024-02-07T03:07:03-05:00 Synchronize bindist configure for #24324 In cdddeb0f1280b40cc194028bbaef36e127175c4c, we set up a workaround for #24324 in the in-tree configure script, but forgot to update the bindist configure script accordingly. This updates it. - - - - - d309f4e7 by Matthew Pickering at 2024-02-07T03:07:38-05:00 distrib/configure: Fix typo in CONF_GCC_LINKER_OPTS_STAGE2 variable Instead we were setting CONF_GCC_LINK_OPTS_STAGE2 which meant that we were missing passing `--target` when invoking the linker. Fixes #24414 - - - - - 77db84ab by Ben Gamari at 2024-02-08T00:35:22-05:00 llvmGen: Adapt to allow use of new pass manager. We now must use `-passes` in place of `-O<n>` due to #21936. Closes #21936. - - - - - 3c9ddf97 by Matthew Pickering at 2024-02-08T00:35:59-05:00 testsuite: Mark length001 as fragile on javascript Modifying the timeout multiplier is not a robust way to get this test to reliably fail. Therefore we mark it as fragile until/if javascript ever supports the stack limit. - - - - - 20b702b5 by Matthew Pickering at 2024-02-08T00:35:59-05:00 Javascript: Don't filter out rtsDeps list This logic appears to be incorrect as it would drop any dependency which was not in a direct dependency of the package being linked. In the ghc-internals split this started to cause errors because `ghc-internal` is not a direct dependency of most packages, and hence important symbols to keep which are hard coded into the js runtime were getting dropped. - - - - - 2df96366 by Ben Gamari at 2024-02-08T00:35:59-05:00 base: Cleanup whitespace in cbits - - - - - 44f6557a by Ben Gamari at 2024-02-08T00:35:59-05:00 Move `base` to `ghc-internal` Here we move a good deal of the implementation of `base` into a new package, `ghc-internal` such that it can be evolved independently from the user-visible interfaces of `base`. While we want to isolate implementation from interfaces, naturally, we would like to avoid turning `base` into a mere set of module re-exports. However, this is a non-trivial undertaking for a variety of reasons: * `base` contains numerous known-key and wired-in things, requiring corresponding changes in the compiler * `base` contains a significant amount of C code and corresponding autoconf logic, which is very fragile and difficult to break apart * `base` has numerous import cycles, which are currently dealt with via carefully balanced `hs-boot` files * We must not break existing users To accomplish this migration, I tried the following approaches: * [Split-GHC.Base]: Break apart the GHC.Base knot to allow incremental migration of modules into ghc-internal: this knot is simply too intertwined to be easily pulled apart, especially given the rather tricky import cycles that it contains) * [Move-Core]: Moving the "core" connected component of base (roughly 150 modules) into ghc-internal. While the Haskell side of this seems tractable, the C dependencies are very subtle to break apart. * [Move-Incrementally]: 1. Move all of base into ghc-internal 2. Examine the module structure and begin moving obvious modules (e.g. leaves of the import graph) back into base 3. Examine the modules remaining in ghc-internal, refactor as necessary to facilitate further moves 4. Go to (2) iterate until the cost/benefit of further moves is insufficient to justify continuing 5. Rename the modules moved into ghc-internal to ensure that they don't overlap with those in base 6. For each module moved into ghc-internal, add a shim module to base with the declarations which should be exposed and any requisite Haddocks (thus guaranteeing that base will be insulated from changes in the export lists of modules in ghc-internal Here I am using the [Move-Incrementally] approach, which is empirically the least painful of the unpleasant options above Bumps haddock submodule. Metric Decrease: haddock.Cabal haddock.base Metric Increase: MultiComponentModulesRecomp T16875 size_hello_artifact - - - - - e8fb2451 by Vladislav Zavialov at 2024-02-08T00:36:36-05:00 Haddock comments on infix constructors (#24221) Rewrite the `HasHaddock` instance for `ConDecl GhcPs` to account for infix constructors. This change fixes a Haddock regression (introduced in 19e80b9af252) that affected leading comments on infix data constructor declarations: -- | Docs for infix constructor | Int :* Bool The comment should be associated with the data constructor (:*), not with its left-hand side Int. - - - - - 9060d55b by Ben Gamari at 2024-02-08T00:37:13-05:00 Add os-string as a boot package Introduces `os-string` submodule. This will be necessary for `filepath-1.5`. - - - - - 9d65235a by Ben Gamari at 2024-02-08T00:37:13-05:00 gitignore: Ignore .hadrian_ghci_multi/ - - - - - d7ee12ea by Ben Gamari at 2024-02-08T00:37:13-05:00 hadrian: Set -this-package-name When constructing the GHC flags for a package Hadrian must take care to set `-this-package-name` in addition to `-this-unit-id`. This hasn't broken until now as we have not had any uses of qualified package imports. However, this will change with `filepath-1.5` and the corresponding `unix` bump, breaking `hadrian/multi-ghci`. - - - - - f2dffd2e by Ben Gamari at 2024-02-08T00:37:13-05:00 Bump filepath to 1.5.0.0 Required bumps of the following submodules: * `directory` * `filepath` * `haskeline` * `process` * `unix` * `hsc2hs` * `Win32` * `semaphore-compat` and the addition of `os-string` as a boot package. - - - - - ab533e71 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Use specific clang assembler when compiling with -fllvm There are situations where LLVM will produce assembly which older gcc toolchains can't handle. For example on Deb10, it seems that LLVM >= 13 produces assembly which the default gcc doesn't support. A more robust solution in the long term is to require a specific LLVM compatible assembler when using -fllvm. Fixes #16354 - - - - - c32b6426 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Update CI images with LLVM 15, ghc-9.6.4 and cabal-install-3.10.2.0 - - - - - 5fcd58be by Matthew Pickering at 2024-02-08T00:37:50-05:00 Update bootstrap plans for 9.4.8 and 9.6.4 - - - - - 707a32f5 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Add alpine 3_18 release job This is mainly experimental and future proofing to enable a smooth transition to newer alpine releases once 3_12 is too old. - - - - - c37931b3 by John Ericson at 2024-02-08T06:39:05-05:00 Generate LLVM min/max bound policy via Hadrian Per #23966, I want the top-level configure to only generate configuration data for Hadrian, not do any "real" tasks on its own. This is part of that effort --- one less file generated by it. (It is still done with a `.in` file, so in a future world non-Hadrian also can easily create this file.) Split modules: - GHC.CmmToLlvm.Config - GHC.CmmToLlvm.Version - GHC.CmmToLlvm.Version.Bounds - GHC.CmmToLlvm.Version.Type This also means we can get rid of the silly `unused.h` introduced in !6803 / 7dfcab2f4bcb7206174ea48857df1883d05e97a2 as temporary kludge. Part of #23966 - - - - - 9f987235 by Apoorv Ingle at 2024-02-08T06:39:42-05:00 Enable mdo statements to use HsExpansions Fixes: #24411 Added test T24411 for regression - - - - - f8429266 by Jade at 2024-02-08T14:56:50+01:00 Adjust test for ghc MR !10993 - - - - - 762b2120 by Jade at 2024-02-08T15:17:15+00:00 Improve Monad, Functor & Applicative docs This patch aims to improve the documentation of Functor, Applicative, Monad and related symbols. The main goal is to make it more consistent and make accessible. See also: !10979 (closed) and !10985 (closed) Ticket #17929 Updates haddock submodule - - - - - 151770ca by Josh Meredith at 2024-02-10T14:28:15-05:00 JavaScript codegen: Use GHC's tag inference where JS backend-specific evaluation inference was previously used (#24309) - - - - - 2e880635 by Zubin Duggal at 2024-02-10T14:28:51-05:00 ci: Allow release-hackage-lint to fail Otherwise it blocks the ghcup metadata pipeline from running. - - - - - b0293f78 by Matthew Pickering at 2024-02-10T14:29:28-05:00 rts: eras profiling mode The eras profiling mode is useful for tracking the life-time of closures. When a closure is written, the current era is recorded in the profiling header. This records the era in which the closure was created. * Enable with -he * User mode: Use functions ghc-experimental module GHC.Profiling.Eras to modify the era * Automatically: --automatic-era-increment, increases the user era on major collections * The first era is era 1 * -he<era> can be used with other profiling modes to select a specific era If you just want to record the era but not to perform heap profiling you can use `-he --no-automatic-heap-samples`. https://well-typed.com/blog/2024/01/ghc-eras-profiling/ Fixes #24332 - - - - - be674a2c by Jade at 2024-02-10T14:30:04-05:00 Adjust error message for trailing whitespace in as-pattern. Fixes #22524 - - - - - 53ef83f9 by doyougnu at 2024-02-10T14:30:47-05:00 gitlab: js: add codeowners Fixes: - #24409 Follow on from: - #21078 and MR !9133 - When we added the JS backend this was forgotten. This patch adds the rightful codeowners. - - - - - 8bbe12f2 by Matthew Pickering at 2024-02-10T14:31:23-05:00 Bump CI images so that alpine3_18 image includes clang15 The only changes here are that clang15 is now installed on the alpine-3_18 image. - - - - - df9fd9f7 by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: handle stored null StablePtr Some Haskell codes unsafely cast StablePtr into ptr to compare against NULL. E.g. in direct-sqlite: if castStablePtrToPtr aggStPtr /= nullPtr then where `aggStPtr` is read (`peek`) from zeroed memory initially. We fix this by giving these StablePtr the same representation as other null pointers. It's safe because StablePtr at offset 0 is unused (for this exact reason). - - - - - 55346ede by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: disable MergeObjsMode test This isn't implemented for JS backend objects. - - - - - aef587f6 by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: add support for linking C sources Support linking C sources with JS output of the JavaScript backend. See the added documentation in the users guide. The implementation simply extends the JS linker to use the objects (.o) that were already produced by the emcc compiler and which were filtered out previously. I've also added some options to control the link with C functions (see the documentation about pragmas). With this change I've successfully compiled the direct-sqlite package which embeds the sqlite.c database code. Some wrappers are still required (see the documentation about wrappers) but everything generic enough to be reused for other libraries have been integrated into rts/js/mem.js. - - - - - b71b392f by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: avoid EMCC logging spurious failure emcc would sometime output messages like: cache:INFO: generating system asset: symbol_lists/424b44514e43d789148e69e4e7d1c7fdc0350b79.json... (this will be cached in "/emsdk/upstream/emscripten/cache/symbol_lists/424b44514e43d789148e69e4e7d1c7fdc0350b79.json" for subsequent builds) cache:INFO: - ok Cf https://github.com/emscripten-core/emscripten/issues/18607 This breaks our tests matching the stderr output. We avoid this by setting EMCC_LOGGING=0 - - - - - ff2c0cc9 by Simon Peyton Jones at 2024-02-12T12:19:17-05:00 Remove a dead comment Just remove an out of date block of commented-out code, and tidy up the relevant Notes. See #8317. - - - - - bedb4f0d by Teo Camarasu at 2024-02-12T18:50:33-05:00 nonmoving: Add support for heap profiling Add support for heap profiling while using the nonmoving collector. We greatly simply the implementation by disabling concurrent collection for GCs when heap profiling is enabled. This entails that the marked objects on the nonmoving heap are exactly the live objects. Note that we match the behaviour for live bytes accounting by taking the size of objects on the nonmoving heap to be that of the segment's block rather than the object itself. Resolves #22221 - - - - - d0d5acb5 by Teo Camarasu at 2024-02-12T18:51:09-05:00 doc: Add requires prof annotation to options that require it Resolves #24421 - - - - - 6d1e2386 by Alan Zimmerman at 2024-02-13T22:00:28+03:00 EPA: Match changes to HsParTy and HsFunTy - - - - - 57bb8c92 by Cheng Shao at 2024-02-13T14:07:49-05:00 deriveConstants: add needed constants for wasm backend This commit adds needed constants to deriveConstants. They are used by RTS code in the wasm backend to support the JSFFI logic. - - - - - 615eb855 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms The pure Haskell implementation causes i386 regression in unrelated work that can be fixed by using C-based atomic increment, see added comment for details. - - - - - a9918891 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: allow JSFFI for wasm32 This commit allows the javascript calling convention to be used when the target platform is wasm32. - - - - - 8771a53b by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: allow boxed JSVal as a foreign type This commit allows the boxed JSVal type to be used as a foreign argument/result type. - - - - - 053c92b3 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: ensure ctors have the right priority on wasm32 This commit fixes the priorities of ctors generated by GHC codegen on wasm32, see the referred note for details. - - - - - b7942e0a by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: add JSFFI desugar logic for wasm32 This commit adds JSFFI desugar logic for the wasm backend. - - - - - 2c1dca76 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: add JavaScriptFFI to supported extension list on wasm32 This commit adds JavaScriptFFI as a supported extension when the target platform is wasm32. - - - - - 9ad0e2b4 by Cheng Shao at 2024-02-13T14:07:49-05:00 rts/ghc-internal: add JSFFI support logic for wasm32 This commit adds rts/ghc-internal logic to support the wasm backend's JSFFI functionality. - - - - - e9ebea66 by Cheng Shao at 2024-02-13T14:07:49-05:00 ghc-internal: fix threadDelay for wasm in browsers This commit fixes broken threadDelay for wasm when it runs in browsers, see added note for detailed explanation. - - - - - f85f3fdb by Cheng Shao at 2024-02-13T14:07:49-05:00 utils: add JSFFI utility code This commit adds JavaScript util code to utils to support the wasm backend's JSFFI functionality: - jsffi/post-link.mjs, a post-linker to process the linked wasm module and emit a small complement JavaScript ESM module to be used with it at runtime - jsffi/prelude.js, a tiny bit of prelude code as the JavaScript side of runtime logic - jsffi/test-runner.mjs, run the jsffi test cases Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - 77e91500 by Cheng Shao at 2024-02-13T14:07:49-05:00 hadrian: distribute jsbits needed for wasm backend's JSFFI support The post-linker.mjs/prelude.js files are now distributed in the bindist libdir, so when using the wasm backend's JSFFI feature, the user wouldn't need to fetch them from a ghc checkout manually. - - - - - c47ba1c3 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: add opts.target_wrapper This commit adds opts.target_wrapper which allows overriding the target wrapper on a per test case basis when testing a cross target. This is used when testing the wasm backend's JSFFI functionality; the rest of the cases are tested using wasmtime, though the jsffi cases are tested using the node.js based test runner. - - - - - 8e048675 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: T22774 should work for wasm JSFFI T22774 works since the wasm backend now supports the JSFFI feature. - - - - - 1d07f9a6 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: add JSFFI test cases for wasm backend This commit adds a few test cases for the wasm backend's JSFFI functionality, as well as a simple README to instruct future contributors to add new test cases. - - - - - b8997080 by Cheng Shao at 2024-02-13T14:07:49-05:00 docs: add documentation for wasm backend JSFFI This commit adds changelog and user facing documentation for the wasm backend's JSFFI feature. - - - - - ffeb000d by David Binder at 2024-02-13T14:08:30-05:00 Add tests from libraries/process/tests and libraries/Win32/tests to GHC These tests were previously part of the libraries, which themselves are submodules of the GHC repository. This commit moves the tests directly to the GHC repository. - - - - - 5a932cf2 by David Binder at 2024-02-13T14:08:30-05:00 Do not execute win32 tests on non-windows runners - - - - - 500d8cb8 by Jade at 2024-02-13T14:09:07-05:00 prevent GHCi (and runghc) from suggesting other symbols when not finding main Fixes: #23996 - - - - - b19ec331 by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: update xxHash to v0.8.2 - - - - - 4a97bdb8 by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: use XXH3_64bits hash on all 64-bit platforms This commit enables XXH3_64bits hash to be used on all 64-bit platforms. Previously it was only enabled on x86_64, so platforms like aarch64 silently falls back to using XXH32 which degrades the hashing function quality. - - - - - ee01de7d by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: define XXH_INLINE_ALL This commit cleans up how we include the xxhash.h header and only define XXH_INLINE_ALL, which is sufficient to inline the xxHash functions without symbol collision. - - - - - 0e01e1db by Alan Zimmerman at 2024-02-14T02:13:22-05:00 EPA: Move EpAnn out of extension points Leaving a few that are too tricky, maybe some other time. Also - remove some unneeded helpers from Parser.y - reduce allocations with strictness annotations Updates haddock submodule Metric Decrease: parsing001 - - - - - de589554 by Andreas Klebinger at 2024-02-14T02:13:59-05:00 Fix ffi callbacks with >6 args and non-64bit args. Check for ptr/int arguments rather than 64-bit width arguments when counting integer register arguments. The old approach broke when we stopped using exclusively W64-sized types to represent sub-word sized integers. Fixes #24314 - - - - - 9c588f19 by Fendor at 2024-02-14T11:05:36+01:00 Adapt to GHC giving better Name's for linking - - - - - 325b7613 by Ben Gamari at 2024-02-14T14:27:45-05:00 rts/EventLog: Place eliminate duplicate strlens Previously many of the `post*` implementations would first compute the length of the event's strings in order to determine the event length. Later we would then end up computing the length yet again in `postString`. Now we instead pass the string length to `postStringLen`, avoiding the repeated work. - - - - - 8aafa51c by Ben Gamari at 2024-02-14T14:27:46-05:00 rts/eventlog: Place upper bound on IPE string field lengths The strings in IPE events may be of unbounded length. Limit the lengths of these fields to 64k characters to ensure that we don't exceed the maximum event length. - - - - - 0e60d52c by Zubin Duggal at 2024-02-14T14:27:46-05:00 rts: drop unused postString function - - - - - d8d1333a by Cheng Shao at 2024-02-14T14:28:23-05:00 compiler/rts: fix wasm unreg regression This commit fixes two wasm unreg regressions caught by a nightly pipeline: - Unknown stg_scheduler_loopzh symbol when compiling scheduler.cmm - Invalid _hs_constructor(101) function name when handling ctor - - - - - 264a4fa9 by Owen Shepherd at 2024-02-15T09:41:06-05:00 feat: Add sortOn to Data.List.NonEmpty Adds `sortOn` to `Data.List.NonEmpty`, and adds comments describing when to use it, compared to `sortWith` or `sortBy . comparing`. The aim is to smooth out the API between `Data.List`, and `Data.List.NonEmpty`. This change has been discussed in the [clc issue](https://github.com/haskell/core-libraries-committee/issues/227). - - - - - b57200de by Fendor at 2024-02-15T09:41:47-05:00 Prefer RdrName over OccName for looking up locations in doc renaming step Looking up by OccName only does not take into account when functions are only imported in a qualified way. Fixes issue #24294 Bump haddock submodule to include regression test - - - - - 8ad02724 by Luite Stegeman at 2024-02-15T17:33:32-05:00 JS: add simple optimizer The simple optimizer reduces the size of the code generated by the JavaScript backend without the complexity and performance penalty of the optimizer in GHCJS. Also see #22736 Metric Decrease: libdir size_hello_artifact - - - - - 20769b36 by Matthew Pickering at 2024-02-15T17:34:07-05:00 base: Expose `--no-automatic-time-samples` in `GHC.RTS.Flags` API This patch builds on 5077416e12cf480fb2048928aa51fa4c8fc22cf1 and modifies the base API to reflect the new RTS flag. CLC proposal #243 - https://github.com/haskell/core-libraries-committee/issues/243 Fixes #24337 - - - - - 778e1db3 by Andrei Borzenkov at 2024-02-16T16:12:07+03:00 Namespace specifiers for fixity signatures - - - - - 08031ada by Teo Camarasu at 2024-02-16T13:37:00-05:00 base: export System.Mem.performBlockingMajorGC The corresponding C function was introduced in ba73a807edbb444c49e0cf21ab2ce89226a77f2e. As part of #22264. Resolves #24228 The CLC proposal was disccused at: https://github.com/haskell/core-libraries-committee/issues/230 Co-authored-by: Ben Gamari <bgamari.foss at gmail.com> - - - - - 1f534c2e by Florian Weimer at 2024-02-16T13:37:42-05:00 Fix C output for modern C initiative GCC 14 on aarch64 rejects the C code written by GHC with this kind of error: error: assignment to ‘ffi_arg’ {aka ‘long unsigned int’} from ‘HsPtr’ {aka ‘void *’} makes integer from pointer without a cast [-Wint-conversion] 68 | *(ffi_arg*)resp = cret; | ^ Add the correct cast. For more information on this see: https://fedoraproject.org/wiki/Changes/PortingToModernC Tested-by: Richard W.M. Jones <rjones at redhat.com> - - - - - 5d3f7862 by Matthew Craven at 2024-02-16T13:38:18-05:00 Bump bytestring submodule to 0.12.1.0 - - - - - 902ebcc2 by Ian-Woo Kim at 2024-02-17T06:01:01-05:00 Add missing BCO handling in scavenge_one. - - - - - 97d26206 by Sylvain Henry at 2024-02-17T06:01:44-05:00 Make cast between words and floats real primops (#24331) First step towards fixing #24331. Replace foreign prim imports with real primops. - - - - - a40e4781 by Sylvain Henry at 2024-02-17T06:01:44-05:00 Perf: add constant folding for bitcast between float and word (#24331) - - - - - 5fd2c00f by Sylvain Henry at 2024-02-17T06:01:44-05:00 Perf: replace stack checks with assertions in casting primops There are RESERVED_STACK_WORDS free words (currently 21) on the stack, so omit the checks. Suggested by Cheng Shao. - - - - - 401dfe7b by Sylvain Henry at 2024-02-17T06:01:44-05:00 Reexport primops from GHC.Float + add deprecation - - - - - 4ab48edb by Ben Gamari at 2024-02-17T06:02:21-05:00 rts/Hash: Don't iterate over chunks if we don't need to free data When freeing a `HashTable` there is no reason to walk over the hash list before freeing it if the user has not given us a `dataFreeFun`. Noticed while looking at #24410. - - - - - bd5a1f91 by Cheng Shao at 2024-02-17T06:03:00-05:00 compiler: add SEQ_CST fence support In addition to existing Acquire/Release fences, this commit adds SEQ_CST fence support to GHC, allowing Cmm code to explicitly emit a fence that enforces total memory ordering. The following logic is added: - The MO_SeqCstFence callish MachOp - The %prim fence_seq_cst() Cmm syntax and the SEQ_CST_FENCE macro in Cmm.h - MO_SeqCstFence lowering logic in every single GHC codegen backend - - - - - 2ce2a493 by Cheng Shao at 2024-02-17T06:03:38-05:00 testsuite: fix hs_try_putmvar002 for targets without pthread.h hs_try_putmvar002 includes pthread.h and doesn't work on targets without this header (e.g. wasm32). It doesn't need to include this header at all. This was previously unnoticed by wasm CI, though recent toolchain upgrade brought in upstream changes that completely removes pthread.h in the single-threaded wasm32-wasi sysroot, therefore we need to handle that change. - - - - - 1fb3974e by Cheng Shao at 2024-02-17T06:03:38-05:00 ci: bump ci-images to use updated wasm image This commit bumps our ci-images revision to use updated wasm image. - - - - - 56e3f097 by Andrew Lelechenko at 2024-02-17T06:04:13-05:00 Bump submodule text to 2.1.1 T17123 allocates less because of improvements to Data.Text.concat in 1a6a06a. Metric Decrease: T17123 - - - - - a7569495 by Cheng Shao at 2024-02-17T06:04:51-05:00 rts: remove redundant rCCCS initialization This commit removes the redundant logic of initializing each Capability's rCCCS to CCS_SYSTEM in initProfiling(). Before initProfiling() is called during RTS startup, each Capability's rCCCS has already been assigned CCS_SYSTEM when they're first initialized. - - - - - 7a0293cc by Ben Gamari at 2024-02-19T07:11:00-05:00 Drop dependence on `touch` This drops GHC's dependence on the `touch` program, instead implementing it within GHC. This eliminates an external dependency and means that we have one fewer program to keep track of in the `configure` script - - - - - 0dbd729e by Andrei Borzenkov at 2024-02-19T07:11:37-05:00 Parser, renamer, type checker for @a-binders (#17594) GHC Proposal 448 introduces binders for invisible type arguments (@a-binders) in various contexts. This patch implements @-binders in lambda patterns and function equations: {-# LANGUAGE TypeAbstractions #-} id1 :: a -> a id1 @t x = x :: t -- @t-binder on the LHS of a function equation higherRank :: (forall a. (Num a, Bounded a) => a -> a) -> (Int8, Int16) higherRank f = (f 42, f 42) ex :: (Int8, Int16) ex = higherRank (\ @a x -> maxBound @a - x ) -- @a-binder in a lambda pattern in an argument -- to a higher-order function Syntax ------ To represent those @-binders in the AST, the list of patterns in Match now uses ArgPat instead of Pat: data Match p body = Match { ... - m_pats :: [LPat p], + m_pats :: [LArgPat p], ... } + data ArgPat pass + = VisPat (XVisPat pass) (LPat pass) + | InvisPat (XInvisPat pass) (HsTyPat (NoGhcTc pass)) + | XArgPat !(XXArgPat pass) The VisPat constructor represents patterns for visible arguments, which include ordinary value-level arguments and required type arguments (neither is prefixed with a @), while InvisPat represents invisible type arguments (prefixed with a @). Parser ------ In the grammar (Parser.y), the lambda and lambda-cases productions of aexp non-terminal were updated to accept argpats instead of apats: aexp : ... - | '\\' apats '->' exp + | '\\' argpats '->' exp ... - | '\\' 'lcases' altslist(apats) + | '\\' 'lcases' altslist(argpats) ... + argpat : apat + | PREFIX_AT atype Function left-hand sides did not require any changes to the grammar, as they were already parsed with productions capable of parsing @-binders. Those binders were being rejected in post-processing (isFunLhs), and now we accept them. In Parser.PostProcess, patterns are constructed with the help of PatBuilder, which is used as an intermediate data structure when disambiguating between FunBind and PatBind. In this patch we define ArgPatBuilder to accompany PatBuilder. ArgPatBuilder is a short-lived data structure produced in isFunLhs and consumed in checkFunBind. Renamer ------- Renaming of @-binders builds upon prior work on type patterns, implemented in 2afbddb0f24, which guarantees proper scoping and shadowing behavior of bound type variables. This patch merely defines rnLArgPatsAndThen to process a mix of visible and invisible patterns: + rnLArgPatsAndThen :: NameMaker -> [LArgPat GhcPs] -> CpsRn [LArgPat GhcRn] + rnLArgPatsAndThen mk = mapM (wrapSrcSpanCps rnArgPatAndThen) where + rnArgPatAndThen (VisPat x p) = ... rnLPatAndThen ... + rnArgPatAndThen (InvisPat _ tp) = ... rnHsTyPat ... Common logic between rnArgPats and rnPats is factored out into the rn_pats_general helper. Type checker ------------ Type-checking of @-binders builds upon prior work on lazy skolemisation, implemented in f5d3e03c56f. This patch extends tcMatchPats to handle @-binders. Now it takes and returns a list of LArgPat rather than LPat: tcMatchPats :: ... - -> [LPat GhcRn] + -> [LArgPat GhcRn] ... - -> TcM ([LPat GhcTc], a) + -> TcM ([LArgPat GhcTc], a) Invisible binders in the Match are matched up with invisible (Specified) foralls in the type. This is done with a new clause in the `loop` worker of tcMatchPats: loop :: [LArgPat GhcRn] -> [ExpPatType] -> TcM ([LArgPat GhcTc], a) loop (L l apat : pats) (ExpForAllPatTy (Bndr tv vis) : pat_tys) ... -- NEW CLAUSE: | InvisPat _ tp <- apat, isSpecifiedForAllTyFlag vis = ... In addition to that, tcMatchPats no longer discards type patterns. This is done by filterOutErasedPats in the desugarer instead. x86_64-linux-deb10-validate+debug_info Metric Increase: MultiLayerModulesTH_OneShot - - - - - 486979b0 by Jade at 2024-02-19T07:12:13-05:00 Add specialized sconcat implementation for Data.Monoid.First and Data.Semigroup.First Approved CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/246 Fixes: #24346 - - - - - 17e309d2 by John Ericson at 2024-02-19T07:12:49-05:00 Fix reST in users guide It appears that aef587f65de642142c1dcba0335a301711aab951 wasn't valid syntax. - - - - - 35b0ad90 by Brandon Chinn at 2024-02-19T07:13:25-05:00 Fix searching for errors in sphinx build - - - - - 4696b966 by Cheng Shao at 2024-02-19T07:14:02-05:00 hadrian: fix wasm backend post linker script permissions The post-link.mjs script was incorrectly copied and installed as a regular data file without executable permission, this commit fixes it. - - - - - a6142e0c by Cheng Shao at 2024-02-19T07:14:40-05:00 testsuite: mark T23540 as fragile on i386 See #24449 for details. - - - - - 249caf0d by Matthew Craven at 2024-02-19T20:36:09-05:00 Add @since annotation to Data.Data.mkConstrTag - - - - - cdd939e7 by Jade at 2024-02-19T20:36:46-05:00 Enhance documentation of Data.Complex - - - - - d04f384f by Ben Gamari at 2024-02-21T04:59:23-05:00 hadrian/bindist: Ensure that phony rules are marked as such Otherwise make may not run the rule if file with the same name as the rule happens to exist. - - - - - efcbad2d by Ben Gamari at 2024-02-21T04:59:23-05:00 hadrian: Generate HSC2HS_EXTRAS variable in bindist installation We must generate the hsc2hs wrapper at bindist installation time since it must contain `--lflag` and `--cflag` arguments which depend upon the installation path. The solution here is to substitute these variables in the configure script (see mk/hsc2hs.in). This is then copied over a dummy wrapper in the install rules. Fixes #24050. - - - - - c540559c by Matthew Pickering at 2024-02-21T04:59:23-05:00 ci: Show --info for installed compiler - - - - - ab9281a2 by Matthew Pickering at 2024-02-21T04:59:23-05:00 configure: Correctly set --target flag for linker opts Previously we were trying to use the FP_CC_SUPPORTS_TARGET with 4 arguments, when it only takes 3 arguments. Instead we need to use the `FP_PROG_CC_LINKER_TARGET` function in order to set the linker flags. Actually fixes #24414 - - - - - 9460d504 by Rodrigo Mesquita at 2024-02-21T04:59:59-05:00 configure: Do not override existing linker flags in FP_LD_NO_FIXUP_CHAINS - - - - - 77629e76 by Andrei Borzenkov at 2024-02-21T05:00:35-05:00 Namespacing for fixity signatures (#14032) Namespace specifiers were added to syntax of fixity signatures: - sigdecl ::= infix prec ops | ... + sigdecl ::= infix prec namespace_spec ops | ... To preserve namespace during renaming MiniFixityEnv type now has separate FastStringEnv fields for names that should be on the term level and for name that should be on the type level. makeMiniFixityEnv function was changed to fill MiniFixityEnv in the right way: - signatures without namespace specifiers fill both fields - signatures with 'data' specifier fill data field only - signatures with 'type' specifier fill type field only Was added helper function lookupMiniFixityEnv that takes care about looking for a name in an appropriate namespace. Updates haddock submodule. Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 84357d11 by Teo Camarasu at 2024-02-21T05:01:11-05:00 rts: only collect live words in nonmoving census when non-concurrent This avoids segfaults when the mutator modifies closures as we examine them. Resolves #24393 - - - - - 9ca56dd3 by Ian-Woo Kim at 2024-02-21T05:01:53-05:00 mutex wrap in refreshProfilingCCSs - - - - - 1387966a by Cheng Shao at 2024-02-21T05:02:32-05:00 rts: remove unused HAVE_C11_ATOMICS macro This commit removes the unused HAVE_C11_ATOMICS macro. We used to have a few places that have fallback paths when HAVE_C11_ATOMICS is not defined, but that is completely redundant, since the FP_CC_SUPPORTS__ATOMICS configure check will fail when the C compiler doesn't support C11 style atomics. There are also many places (e.g. in unreg backend, SMP.h, library cbits, etc) where we unconditionally use C11 style atomics anyway which work in even CentOS 7 (gcc 4.8), the oldest distro we test in our CI, so there's no value in keeping HAVE_C11_ATOMICS. - - - - - 0f40d68f by Andreas Klebinger at 2024-02-21T05:03:09-05:00 RTS: -Ds - make sure incall is non-zero before dereferencing it. Fixes #24445 - - - - - e5886de5 by Ben Gamari at 2024-02-21T05:03:44-05:00 rts/AdjustorPool: Use ExecPage abstraction This is just a minor cleanup I found while reviewing the implementation. - - - - - 826c5b47 by Torsten Schmits at 2024-02-21T13:17:05+01:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 09941666 by Adam Gundry at 2024-02-21T13:53:12+00:00 Define GHC2024 language edition (#24320) See https://github.com/ghc-proposals/ghc-proposals/pull/613. Also fixes #24343 and improves the documentation of language editions. Co-authored-by: Joachim Breitner <mail at joachim-breitner.de> - - - - - 2cff14d5 by Ben Gamari at 2024-02-22T09:35:56-05:00 Bump bounds - - - - - f49376b3 by Ben Gamari at 2024-02-22T09:35:56-05:00 Allow `@since` annotations in export lists Here we extend Haddock to admit `@since` annotations in export lists. These can be attached to most export list items (although not subordinate lists). These annotations supercede the declaration's `@since` annotation in produced Haddocks. - - - - - b5aa93df by Ben Gamari at 2024-02-22T12:09:06-05:00 Allow package-qualified @since declarations - - - - - 8f5957f2 by Ben Gamari at 2024-02-22T13:55:19-05:00 Documentation changes from ghc-internal restructuring Previously many declarations (e.g. `Int`) were declared to have a "home" in `Prelude`. However, now Haddock instead chooses to put these in more specific homes (e.g. `Data.Int`). Given that the "home" decision is driven by heuristics and in general these changes seem quite reasonable I am accepting them: * `Int` moved from `Prelude` to `Data.Int` * `(~)` moved from `Prelude` to `Data.Type.Equality` * `Type` moved from `GHC.Types` to `Data.Kind` * `Maybe` moved from `Prelude` to `Data.Maybe` * `Bool` moved from `Prelude` to `Data.Bool` * `Ordering` moved from `Prelude` to `Data.Ord` As well, more identifiers are now hyperlinked; it's not immediately clear *why*, but it is an improvement nevertheless. - - - - - ec33fec3 by Ben Gamari at 2024-02-22T20:36:24-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 5121a4ed by Ben Gamari at 2024-02-23T06:40:55-05:00 Allow docstrings after exports Here we extend the parser and AST to preserve docstrings following export items. We then extend Haddock to parse `@since` annotations in such docstrings, allowing changes in export structure to be properly documented. Bumps haddock submodule. - - - - - 30cfd251 by Torsten Schmits at 2024-02-24T13:00:42-05:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 0eb2265d by Hécate Moonlight at 2024-02-24T16:02:16-05:00 Improve the synopsis and description of base - - - - - 2e36f5d2 by Jade at 2024-02-24T16:02:51-05:00 Error Messages: Properly align cyclic module error Fixes: #24476 - - - - - bbfb051c by Ben Gamari at 2024-02-24T19:10:23-05:00 Allow docstrings after exports Here we extend the parser and AST to preserve docstrings following export items. We then extend Haddock to parse `@since` annotations in such docstrings, allowing changes in export structure to be properly documented. - - - - - d8d6ad8c by Ben Gamari at 2024-02-24T19:10:23-05:00 ghc-internal: Move modules into GHC.Internal.* namespace Bumps haddock submodule due to testsuite output changes. - - - - - a82af7cd by Ben Gamari at 2024-02-24T19:10:23-05:00 ghc-internal: Rewrite `@since ` to `@since base-` These will be incrementally moved to the export sites in `base` where possible. - - - - - ca3836e1 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Migrate Haddock `not-home` pragmas from `ghc-internal` This ensures that we do not use `base` stub modules as declarations' homes when not appropriate. - - - - - c8cf3e26 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Partially freeze exports of GHC.Base Sadly there are still a few module reexports. However, at least we have decoupled from the exports of `GHC.Internal.Base`. - - - - - 272573c6 by Ben Gamari at 2024-02-24T19:10:23-05:00 Move Haddock named chunks - - - - - 2d8a881d by Ben Gamari at 2024-02-24T19:10:23-05:00 Drop GHC.Internal.Data.Int - - - - - 55c4c385 by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler: Fix mention to `GHC....` modules in wasm desugaring Really, these references should be via known-key names anyways. I have fixed the proximate issue here but have opened #24472 to track the additional needed refactoring. - - - - - 64150911 by Ben Gamari at 2024-02-24T19:10:23-05:00 Accept performance shifts from ghc-internal restructure As expected, Haddock now does more work. Less expected is that some other testcases actually get faster, presumably due to less interface file loading. As well, the size_hello_artifact test regressed a bit when debug information is enabled due to debug information for the new stub symbols. Metric Decrease: T12227 T13056 Metric Increase: haddock.Cabal haddock.base MultiLayerModulesTH_OneShot size_hello_artifact - - - - - 317a915b by Ben Gamari at 2024-02-24T19:10:23-05:00 Expose GHC.Wasm.Prim from ghc-experimental Previously this was only exposed from `ghc-internal` which violates our agreement that users shall not rely on things exposed from that package. Fixes #24479. - - - - - 3bbd2bf2 by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler/tc: Small optimisation of evCallStack Don't lookupIds unless we actually need them. - - - - - 3e5c9e3c by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler/tc: Use toException instead of SomeException - - - - - 125714a6 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Factor out errorBelch This was useful when debugging - - - - - 3d6aae7c by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Clean up imports of GHC.Stack.CloneStack - - - - - 6900306e by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Move PrimMVar to GHC.Internal.MVar - - - - - 28f8a148 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Move prettyCallStack to GHC.Internal.Stack - - - - - 4892de47 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Explicit dependency to workaround #24436 Currently `ghc -M` fails to account for `.hs-boot` files correctly, leading to issues with cross-package one-shot builds failing. This currently manifests in `GHC.Exception` due to the boot file for `GHC.Internal.Stack`. Work around this by adding an explicit `import`, ensuring that `GHC.Internal.Stack` is built before `GHC.Exception`. See #24436. - - - - - 294c93a5 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Use displayException in top-level exception handler Happily this also allows us to eliminate a special case for Deadlock exceptions. Implements [CLC #198](https://github.com/haskell/core-libraries-committee/issues/198). - - - - - 732db81d by Ben Gamari at 2024-02-24T19:12:18-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - cf756a25 by Ben Gamari at 2024-02-24T22:11:53-05:00 rts: Fix symbol references in Wasm RTS - - - - - 4e4d47a0 by Jade at 2024-02-26T15:17:20-05:00 GHCi: Improve response to unloading, loading and reloading modules Fixes #13869 - - - - - f3de8a3c by Zubin Duggal at 2024-02-26T15:17:57-05:00 rel-eng/fetch-gitlab.py: Fix name of aarch64 alpine 3_18 release job - - - - - c71bfdff by Cheng Shao at 2024-02-26T15:18:35-05:00 hadrian/hie-bios: pass -j to hadrian This commit passes -j to hadrian in the hadrian/hie-bios scripts. When the user starts HLS in a fresh clone that has just been configured, it takes quite a while for hie-bios to pick up the ghc flags and start actual indexing, due to the fact that the hadrian build step defaulted to -j1, so -j speeds things up and improve HLS user experience in GHC. Also add -j flag to .ghcid to speed up ghcid, and sets the Windows build root to .hie-bios which also works and unifies with other platforms, the previous build root _hie-bios was missing from .gitignore anyway. - - - - - 50bfdb46 by Cheng Shao at 2024-02-26T15:18:35-05:00 ci: enable parallelism in hadrian/ghci scripts This commit enables parallelism when the hadrian/ghci scripts are called in CI. The time bottleneck is in the hadrian build step, but previously the build step wasn't parallelized. - - - - - 61a78231 by Felix Yan at 2024-02-26T15:19:14-05:00 m4: Correctly detect GCC version When calling as `cc`, GCC does not outputs lowercased "gcc" at least in 13.2.1 version here. ``` $ cc --version cc (GCC) 13.2.1 20230801 ... ``` This fails the check and outputs the confusing message: `configure: $CC is not gcc; assuming it's a reasonably new C compiler` This patch makes it check for upper-cased "GCC" too so that it works correctly: ``` checking version of gcc... 13.2.1 ``` - - - - - 001aa539 by Teo Camarasu at 2024-02-27T13:26:46-05:00 Fix formatting in whereFrom docstring Previously it used markdown syntax rather than Haddock syntax for code quotes - - - - - e8034d15 by Teo Camarasu at 2024-02-27T13:26:46-05:00 Move ClosureType type to ghc-internal - Use ClosureType for InfoProv.ipDesc. - Use ClosureType for CloneStack.closureType. - Now ghc-heap re-exports this type from ghc-internal. See the accompanying CLC proposal: https://github.com/haskell/core-libraries-committee/issues/210 Resolves #22600 - - - - - 3da0a551 by Matthew Craven at 2024-02-27T13:27:22-05:00 StgToJS: Simplify ExprInline constructor of ExprResult Its payload was used only for a small optimization in genAlts, avoiding a few assignments for programs of this form: case NormalDataCon arg1 arg2 of x { NormalDataCon x1 x2 -> ... ; } But when compiling with optimizations, this sort of code is generally eliminated by case-of-known-constructor in Core-to-Core. So it doesn't seem worth tracking and cleaning up again in StgToJS. - - - - - 61bc92cc by Cheng Shao at 2024-02-27T16:58:42-05:00 rts: add missing ccs_mutex guard to internal_dlopen See added comment for details. Closes #24423. - - - - - dd29d3b2 by doyougnu at 2024-02-27T16:59:23-05:00 cg: Remove GHC.Cmm.DataFlow.Collections In pursuit of #15560 and #17957 and generally removing redundancy. - - - - - d3a050d2 by Cheng Shao at 2024-02-27T17:00:00-05:00 utils: remove unused lndir from tree Ever since the removal of the make build system, the in tree lndir hasn't been actually built, so this patch removes it. - - - - - 86bf7010 by Ben Gamari at 2024-02-27T19:28:10-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 74b24a9b by Teo Camarasu at 2024-02-28T16:32:58+00:00 rts: avoid checking bdescr of value outside of Haskell heap In nonmovingTidyWeaks we want to check if the key of a weak pointer lives in the non-moving heap. We do this by checking the flags of the block the key lives in. But we need to be careful with values that live outside the Haskell heap, since they will lack a block descriptor and looking for one may lead to a segfault. In this case we should just accept that it isn't on the non-moving heap. Resolves #24492 - - - - - b4cae4ec by Simon Peyton Jones at 2024-02-29T02:10:08-05:00 In mkDataConRep, ensure the in-scope set is right A small change that fixes #24489 - - - - - 3836a110 by Cheng Shao at 2024-02-29T21:25:45-05:00 testsuite: fix T23540 fragility on 32-bit platforms T23540 is fragile on 32-bit platforms. The root cause is usage of `getEvidenceTreesAtPoint`, which internally relies on `Name`'s `Ord` instance, which is indeterministic. The solution is adding a deterministic `Ord` instance for `EvidenceInfo` and sorting the evidence trees before pretty printing. Fixes #24449. - - - - - 960c8d47 by Teo Camarasu at 2024-02-29T21:26:20-05:00 Reduce AtomicModifyIORef increment count This test leads to a lot of contention when N>2 and becomes very slow. Let's reduce the amount of work we do to compensate. Resolves #24490 - - - - - 2e46c8ad by Matthew Pickering at 2024-03-01T05:48:06-05:00 hadrian: Improve parallelism in binary-dist-dir rule I noticed that the "docs" target was needed after the libraries and executables were built. We can improve the parallelism by needing everything at once so that documentation can be built immediately after a library is built for example. - - - - - cb6c11fe by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: Bump windows and freebsd boot compilers to 9.6.4 We have previously bumped the docker images to use 9.6.4, but neglected to bump the windows images until now. - - - - - 30f06996 by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: darwin: Update to 9.6.2 for boot compiler 9.6.4 is currently broken due to #24050 Also update to use LLVM-15 rather than LLVM-11, which is out of date. - - - - - d9d69e12 by Matthew Pickering at 2024-03-01T05:48:07-05:00 Bump minimum bootstrap version to 9.6 - - - - - 67ace1c5 by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: Enable more documentation building Here we enable documentation building on 1. Darwin: The sphinx toolchain was already installed so we enable html and manpages. 2. Rocky8: Full documentation (toolchain already installed) 3. Alpine: Full documetnation (toolchain already installed) 4. Windows: HTML and manpages (toolchain already installed) Fixes #24465 - - - - - 39583c39 by Matthew Pickering at 2024-03-01T05:48:42-05:00 ci: Bump ci-images to allow updated aarch64-alpine image with llvm15 and clang15 - - - - - d91d00fc by Torsten Schmits at 2024-03-01T15:01:50-05:00 Introduce ListTuplePuns extension This implements Proposal 0475, introducing the `ListTuplePuns` extension which is enabled by default. Disabling this extension makes it invalid to refer to list, tuple and sum type constructors by using built-in syntax like `[Int]`, `(Int, Int)`, `(# Int#, Int# #)` or `(# Int | Int #)`. Instead, this syntax exclusively denotes data constructors for use with `DataKinds`. The conventional way of referring to these data constructors by prefixing them with a single quote (`'(Int, Int)`) is now a parser error. Tuple declarations have been moved to `GHC.Tuple.Prim` and the `Solo` data constructor has been renamed to `MkSolo` (in a previous commit). Unboxed tuples and sums now have real source declarations in `GHC.Types`. Unit and solo types for tuples are now called `Unit`, `Unit#`, `Solo` and `Solo#`. Constraint tuples now have the unambiguous type constructors `CTuple<n>` as well as `CUnit` and `CSolo`, defined in `GHC.Classes` like before. A new parser construct has been added for the unboxed sum data constructor declarations. The type families `Tuple`, `Sum#` etc. that were intended to provide nicer syntax have been omitted from this change set due to inference problems, to be implemented at a later time. See the MR discussion for more info. Updates the submodule utils/haddock. Updates the cabal submodule due to new language extension. Metric Increase: haddock.base Metric Decrease: MultiLayerModulesTH_OneShot size_hello_artifact Proposal document: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst Merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8820 Tracking ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/21294 - - - - - bbdb6286 by Sylvain Henry at 2024-03-01T15:01:50-05:00 JS linker: filter unboxed tuples - - - - - dec6d8d3 by Arnaud Spiwack at 2024-03-01T15:02:30-05:00 Improve error messages coming from non-linear patterns This enriched the `CtOrigin` for non-linear patterns to include data of the pattern that created the constraint (which can be quite useful if it occurs nested in a pattern) as well as an explanation why the pattern is non-restricted in (at least in some cases). - - - - - 6612388e by Arnaud Spiwack at 2024-03-01T15:02:30-05:00 Adjust documentation of linear lets according to committee decision - - - - - 1c064ef1 by Cheng Shao at 2024-03-02T17:11:19-05:00 compiler: start deprecating cmmToRawCmmHook cmmToRawCmmHook was added 4 years ago in d561c8f6244f8280a2483e8753c38e39d34c1f01. Its only user is the Asterius project, which has been archived and deprecated in favor of the ghc wasm backend. This patch starts deprecating cmmToRawCmmHook by placing a DEPRECATED pragma, and actual removal shall happen in a future GHC major release if no issue to oppose the deprecation has been raised in the meantime. - - - - - 9b74845f by Andrew Lelechenko at 2024-03-02T17:11:55-05:00 Data.List.NonEmpty.unzip: use WARNING with category instead of DEPRECATED CLC proposal: https://github.com/haskell/core-libraries-committee/issues/258 - - - - - 61bb5ff6 by Finley McIlwaine at 2024-03-04T09:01:40-08:00 add -fprof-late-overloaded and -fprof-late-overloaded-calls * Refactor late cost centre insertion for extensibility * Add two more late cost centre insertion methods that add SCCs to overloaded top level bindings and call sites with dictionary arguments. * Some tests for the basic functionality of the new insertion methods Resolves: #24500 - - - - - 82ccb801 by Andreas Klebinger at 2024-03-04T19:59:14-05:00 x86-ncg: Fix fma codegen when arguments are globals Fix a bug in the x86 ncg where results would be wrong when the desired output register and one of the input registers were the same global. Also adds a tiny optimization to make use of the memory addressing support when convenient. Fixes #24496 - - - - - 18ad1077 by Matthew Pickering at 2024-03-05T14:22:31-05:00 rel_eng: Update hackage docs upload scripts This adds the upload of ghc-internal and ghc-experimental to our scripts which upload packages to hackage. - - - - - bf47c9ba by Matthew Pickering at 2024-03-05T14:22:31-05:00 docs: Remove stray module comment from GHC.Profiling.Eras - - - - - 37d9b340 by Matthew Pickering at 2024-03-05T14:22:31-05:00 Fix ghc-internal cabal file The file mentioned some artifacts relating to the base library. I have renamed these to the new ghc-internal variants. - - - - - 23f2a478 by Matthew Pickering at 2024-03-05T14:22:31-05:00 Fix haddock source links and hyperlinked source There were a few issues with the hackage links: 1. We were using the package id rather than the package name for the package links. This is fixed by now allowing the template to mention %pkg% or %pkgid% and substituing both appropiatly. 2. The `--haddock-base-url` flag is renamed to `--haddock-for-hackage` as the new base link works on a local or remote hackage server. 3. The "src" path including too much stuff, so cross-package source links were broken as the template was getting double expanded. Fixes #24086 - - - - - 2fa336a9 by Ben Gamari at 2024-03-05T14:23:07-05:00 filepath: Bump submodule to 1.5.2.0 - - - - - 31217944 by Ben Gamari at 2024-03-05T14:23:07-05:00 os-string: Bump submodule to 2.0.2 - - - - - 4074a3f2 by Matthew Pickering at 2024-03-05T21:44:35-05:00 base: Reflect new era profiling RTS flags in GHC.RTS.Flags * -he profiling mode * -he profiling selector * --automatic-era-increment CLC proposal #254 - https://github.com/haskell/core-libraries-committee/issues/254 - - - - - a8c0e31b by Sylvain Henry at 2024-03-05T21:45:14-05:00 JS: faster implementation for some numeric primitives (#23597) Use faster implementations for the following primitives in the JS backend by not using JavaScript's BigInt: - plusInt64 - minusInt64 - minusWord64 - timesWord64 - timesInt64 Co-authored-by: Josh Meredith <joshmeredith2008 at gmail.com> - - - - - 21e3f325 by Cheng Shao at 2024-03-05T21:45:52-05:00 rts: add -xr option to control two step allocator reserved space size This patch adds a -xr RTS option to control the size of virtual memory address space reserved by the two step allocator on a 64-bit platform, see added documentation for explanation. Closes #24498. - - - - - dedcf102 by Cheng Shao at 2024-03-06T13:39:04-05:00 rts: expose HeapAlloc.h as public header This commit exposes HeapAlloc.h as a public header. The intention is to expose HEAP_ALLOCED/HEAP_ALLOCED_GC, so they can be used in assertions in other public headers, and they may also be useful for user code. - - - - - d19441d7 by Cheng Shao at 2024-03-06T13:39:04-05:00 rts: assert pointer is indeed heap allocated in Bdescr() This commit adds an assertion to Bdescr() to assert the pointer is indeed heap allocated. This is useful to rule out RTS bugs that attempt to access non-existent block descriptor of a static closure, #24492 being one such example. - - - - - 9a656a04 by Ben Gamari at 2024-03-06T13:39:39-05:00 ghc-experimental: Add dummy dependencies to work around #23942 This is a temporary measure to improve CI reliability until a proper solution is developed. Works around #23942. - - - - - 1e84b924 by Simon Peyton Jones at 2024-03-06T13:39:39-05:00 Three compile perf improvements with deep nesting These were changes are all triggered by #24471. 1. Make GHC.Core.Opt.SetLevels.lvlMFE behave better when there are many free variables. See Note [Large free-variable sets]. 2. Make GHC.Core.Opt.Arity.floatIn a bit lazier in its Cost argument. This benefits the common case where the ArityType turns out to be nullary. See Note [Care with nested expressions] 3. Make GHC.CoreToStg.Prep.cpeArg behave for deeply-nested expressions. See Note [Eta expansion of arguments in CorePrep] wrinkle (EA2). Compile times go down by up to 4.5%, and much more in artificial cases. (Geo mean of compiler/perf changes is -0.4%.) Metric Decrease: CoOpt_Read T10421 T12425 - - - - - c4b13113 by Hécate Moonlight at 2024-03-06T13:40:17-05:00 Use "module" instead of "library" when applicable in base haddocks - - - - - 9cd9efb4 by Vladislav Zavialov at 2024-03-07T13:01:54+03:00 Rephrase error message to say "visible arguments" (#24318) * Main change: make the error message generated by mkFunTysMsg more accurate by changing "value arguments" to "visible arguments". * Refactor: define a new type synonym VisArity and use it instead of Arity in a few places. It might be the case that there other places in the compiler that should talk about visible arguments rather than value arguments, but I haven't tried to find them all, focusing only on the error message reported in the ticket. - - - - - 4b6e76b5 by Patrick at 2024-03-07T22:09:30+08:00 fix haskell/haddock#24493, with module name introduced in hieAst The accompanies haddoc PR with GHC PR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12153 Two things have been done: 1. Link is introduced to every `X` in `module X where`, since we introduce the module name to HieAst, 2. `{-# LINE 4 "hypsrc-test/src/PositionPragmas.hs" #-}` is added before the `module PositionPragmas where` in ` hypsrc-test/ref/src/PositionPragmas.html `.It ensures only a single hieAst for file `hypsrc-test/src/PositionPragmas.hs` is generated. - - - - - d523a6a7 by Ben Gamari at 2024-03-07T19:40:45-05:00 Bump array submodule - - - - - 7e55003c by Ben Gamari at 2024-03-07T19:40:45-05:00 Bump stm submodule - - - - - 32d337ef by Ben Gamari at 2024-03-07T19:40:45-05:00 Introduce exception context Here we introduce the `ExceptionContext` type and `ExceptionAnnotation` class, allowing dynamically-typed user-defined annotations to be attached to exceptions. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/199 GHC Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/330 - - - - - 39f3d922 by Ben Gamari at 2024-03-07T19:40:46-05:00 testsuite/interface-stability: Update documentation - - - - - fdea7ada by Ben Gamari at 2024-03-07T19:40:46-05:00 ghc-internal: comment formatting - - - - - 4fba42ef by Ben Gamari at 2024-03-07T19:40:46-05:00 compiler: Default and warn ExceptionContext constraints - - - - - 3886a205 by Ben Gamari at 2024-03-07T19:40:46-05:00 base: Introduce exception backtraces Here we introduce the `Backtraces` type and associated machinery for attaching these via `ExceptionContext`. These has a few compile-time regressions (`T15703` and `T9872d`) due to the additional dependencies in the exception machinery. As well, there is a surprisingly large regression in the `size_hello_artifact` test. This appears to be due to various `Integer` and `Read` bits now being reachable at link-time. I believe it should be possible to avoid this but I have accepted the change for now to get the feature merged. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/199 GHC Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/330 Metric Increase: T15703 T9872d size_hello_artifact - - - - - 18c5409f by Ben Gamari at 2024-03-07T19:40:46-05:00 users guide: Release notes for exception backtrace work - - - - - f849c5fc by Ben Gamari at 2024-03-07T19:40:46-05:00 compiler: Don't show ExceptionContext of GhcExceptions Most GhcExceptions are user-facing errors and therefore the ExceptionContext has little value. Ideally we would enable it in the DEBUG compiler but I am leaving this for future work. - - - - - dc646e6f by Sylvain Henry at 2024-03-07T19:40:46-05:00 Disable T9930fail for the JS target (cf #19174) - - - - - bfc09760 by Alan Zimmerman at 2024-03-07T19:41:22-05:00 Update showAstData to honour blanking of AnnParen Also tweak rendering of SrcSpan to remove extra blank line. - - - - - 50454a29 by Ben Gamari at 2024-03-08T03:32:42-05:00 ghc-internal: Eliminate GHC.Internal.Data.Kind This was simply reexporting things from `ghc-prim`. Instead reexport these directly from `Data.Kind`. Also add build ordering dependency to work around #23942. - - - - - 38a4b6ab by Ben Gamari at 2024-03-08T03:33:18-05:00 rts: Fix SET_HDR initialization of retainer set This fixes a regression in retainer set profiling introduced by b0293f78cb6acf2540389e22bdda420d0ab874da. Prior to that commit the heap traversal word would be initialized by `SET_HDR` using `LDV_RECORD_CREATE`. However, the commit added a `doingLDVProfiling` check in `LDV_RECORD_CREATE`, meaning that this initialization no longer happened. Given that this initialization was awkwardly indirectly anyways, I have fixed this by explicitly initializating the heap traversal word to `NULL` in `SET_PROF_HDR`. This is equivalent to the previous behavior, but much more direct. Fixes #24513. - - - - - 635abccc by Ben Gamari at 2024-03-08T17:09:06-05:00 Bump ghc version to 9.10 - - - - - 2859a637 by Ben Gamari at 2024-03-08T18:26:47-05:00 base: Use strerror_r instead of strerror As noted by #24344, `strerror` is not necessarily thread-safe. Thankfully, POSIX.1-2001 has long offered `strerror_r`, which is safe to use. Fixes #24344. CLC discussion: https://github.com/haskell/core-libraries-committee/issues/249 - - - - - 5b934048 by Ben Gamari at 2024-03-08T18:50:12-05:00 Bump base upper bound - - - - - b30d134e by Ben Gamari at 2024-03-08T18:50:44-05:00 Testsuite output update - - - - - edb9bf77 by Jade at 2024-03-09T03:39:38-05:00 Error messages: Improve Error messages for Data constructors in type signatures. This patch improves the error messages from invalid type signatures by trying to guess what the user did and suggesting an appropriate fix. Partially fixes: #17879 - - - - - cfb197e3 by Patrick at 2024-03-09T03:40:15-05:00 HieAst: add module name #24493 The main purpose of this is to tuck the module name `xxx` in `module xxx where` into the hieAst. It should fix #24493. The following have been done: 1. Renamed and update the `tcg_doc_hdr :: Maybe (LHsDoc GhcRn)` to `tcg_hdr_info :: (Maybe (LHsDoc GhcRn), Maybe (XRec GhcRn ModuleName))` To store the located module name information. 2. update the `RenamedSource` and `RenamedStuff` with extra `Maybe (XRec GhcRn ModuleName)` located module name information. 3. add test `testsuite/tests/hiefile/should_compile/T24493.hs` to ensure the module name is added and update several relevent tests. 4. accompanied submodule haddoc test update MR in https://gitlab.haskell.org/ghc/haddock/-/merge_requests/53 - - - - - 2341d81e by Vaibhav Sagar at 2024-03-09T03:40:54-05:00 GHC.Utils.Binary: fix a couple of typos - - - - - 5580e1bd by Ben Gamari at 2024-03-09T03:41:30-05:00 rts: Drop .wasm suffix from .prof file names This replicates the behavior on Windows, where `Hi.exe` will produce profiling output named `Hi.prof` instead of `Hi.exe.prof`. While in the area I also fixed the extension-stripping logic, which incorrectly rewrote `Hi.exefoo` to `Hi.foo`. Closes #24515. - - - - - 259495ee by Cheng Shao at 2024-03-09T03:41:30-05:00 testsuite: drop exe extension from .hp & .prof filenames See #24515 for details. - - - - - c477a8d2 by Ben Gamari at 2024-03-09T03:42:05-05:00 rts/linker: Enable GOT support on all platforms There is nothing platform-dependent about our GOT implementation and GOT support is needed by `T24171` on i386. - - - - - 2e592857 by Vladislav Zavialov at 2024-03-09T03:42:41-05:00 Drop outdated comment on TcRnIllformedTypePattern This should have been done in 0f0c53a501b but I missed it. - - - - - c554b4da by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/CloneStack: Bounds check array write - - - - - 15c590a5 by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/CloneStack: Don't expose helper functions in header - - - - - e831ce31 by Ben Gamari at 2024-03-09T09:39:20-05:00 base: Move internals of GHC.InfoProv into GHC.InfoProv.Types Such that we can add new helpers into GHC.InfoProv.Types without breakage. - - - - - 6948e24d by Ben Gamari at 2024-03-09T09:39:20-05:00 rts: Lazily decode IPE tables Previously we would eagerly allocate `InfoTableEnt`s for each info table registered in the info table provenance map. However, this costs considerable memory and initialization time. Instead we now lazily decode these tables. This allows us to use one-third the memory *and* opens the door to taking advantage of sharing opportunities within a module. This required considerable reworking since lookupIPE now must be passed its result buffer. - - - - - 9204a04e by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/IPE: Don't expose helper in header - - - - - 308926ff by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/IPE: Share module_name within a Node This allows us to shave a 64-bit word off of the packed IPE entry size. - - - - - bebdea05 by Ben Gamari at 2024-03-09T09:39:20-05:00 IPE: Expose unit ID in InfoTableProv Here we add the unit ID to the info table provenance structure. - - - - - 6519c9ad by Ben Gamari at 2024-03-09T09:39:35-05:00 rts: Refactor GHC.Stack.CloneStack.decode Don't allocate a Ptr constructor per frame. - - - - - ed0b69dc by Ben Gamari at 2024-03-09T09:39:35-05:00 base: Do not expose whereFrom# from GHC.Exts - - - - - 2b1faea9 by Vladislav Zavialov at 2024-03-09T17:38:21-05:00 docs: Update info on TypeAbstractions * Mention TypeAbstractions in 9.10.1-notes.rst * Set the status to "Experimental". * Add a "Since: GHC 9.x" comment to each section. - - - - - f8b88918 by Ben Gamari at 2024-03-09T21:21:46-05:00 ci-images: Bump Alpine image to bootstrap with 9.8.2 - - - - - 705e6927 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Mark T24171 as fragile due to #24512 I will fix this but not in time for 9.10.1-alpha1 - - - - - c74196e1 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Mark linker_unload_native as fragile In particular this fails on platforms without `dlinfo`. I plan to address this but not before 9.10.1-alpha1. - - - - - f4d87f7a by Ben Gamari at 2024-03-09T21:21:46-05:00 configure: Bump version to 9.10 - - - - - 88df9a5f by Ben Gamari at 2024-03-09T21:21:46-05:00 Bump transformers submodule to 0.6.1.1 - - - - - 8176d5e8 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Increase ulimit for T18623 1 MByte was just too tight and failed intermittently on some platforms (e.g. CentOS 7). Bumping the limit to 8 MByte should provide sufficient headroom. Fixes #23139. - - - - - c74b38a3 by Ben Gamari at 2024-03-09T21:21:46-05:00 base: Bump version to 4.20.0.0 - - - - - b2937fc3 by Ben Gamari at 2024-03-09T21:21:46-05:00 ghc-internal: Set initial version at 9.1001.0 This provides PVP compliance while maintaining a clear correspondence between GHC releases and `ghc-internal` versions. - - - - - 4ae7d868 by Ben Gamari at 2024-03-09T21:21:46-05:00 ghc-prim: Bump version to 0.11.0 - - - - - 50798dc6 by Ben Gamari at 2024-03-09T21:21:46-05:00 template-haskell: Bump version to 2.22.0.0 - - - - - 8564f976 by Ben Gamari at 2024-03-09T21:21:46-05:00 base-exports: Accommodate spurious whitespace changes in 32-bit output It appears that this was - - - - - 9d4f0e98 by Ben Gamari at 2024-03-09T21:21:46-05:00 users-guide: Move exception backtrace relnotes to 9.10 This was previously mistakenly added to the GHC 9.8 release notes. - - - - - 145eae60 by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/rel_eng: Fix name of Rocky8 artifact - - - - - 39c2a630 by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/rel_eng: Fix path of generate_jobs_metadata - - - - - aed034de by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/upload: Rework recompression The old `combine` approach was quite fragile due to use of filename globbing. Moreover, it didn't parallelize well. This refactoring makes the goal more obvious, parallelizes better, and is more robust. - - - - - 9bdf3586 by Ben Gamari at 2024-03-09T21:37:44-05:00 Merge branch 'ghc-9.10' into ghc-head - - - - - cec76981 by Ben Gamari at 2024-03-09T21:54:00-05:00 Bump GHC version to 9.11 - - - - - 4c59feb7 by Ben Gamari at 2024-03-09T22:15:01-05:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - dc207d06 by Ben Gamari at 2024-03-10T08:56:08-04:00 configure: Bump GHC version to 9.11 Bumps haddock submodule. - - - - - 8b2513e8 by Ben Gamari at 2024-03-11T01:20:03-04:00 rts/linker: Don't unload code when profiling is enabled The heap census may contain references (e.g. `Counter.identity`) to static data which must be available when the census is reported at the end of execution. Fixes #24512. - - - - - 7810b4c3 by Ben Gamari at 2024-03-11T01:20:03-04:00 rts/linker: Don't unload native objects when dlinfo isn't available To do so is unsafe as we have no way of identifying references to symbols provided by the object. Fixes #24513. Fixes #23993. - - - - - 0590764c by Ben Gamari at 2024-03-11T01:20:39-04:00 rel_eng/upload: Purge both $rel_name/ and $ver/ This is necessary for prereleases, where GHCup accesses the release via `$ver/` - - - - - b85a4631 by Brandon Chinn at 2024-03-12T19:25:56-04:00 Remove duplicate code normalising slashes - - - - - c91946f9 by Brandon Chinn at 2024-03-12T19:25:56-04:00 Simplify regexes with raw strings - - - - - 1a5f53c6 by Brandon Chinn at 2024-03-12T19:25:57-04:00 Don't normalize backslashes in characters - - - - - 7ea971d3 by Andrei Borzenkov at 2024-03-12T19:26:32-04:00 Fix compiler crash caused by implicit RHS quantification in type synonyms (#24470) - - - - - 39f3ac3e by Cheng Shao at 2024-03-12T19:27:11-04:00 Revert "compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms" This reverts commit 615eb855416ce536e02ed935ecc5a6f25519ae16. It was originally intended to fix #24449, but it was merely sweeping the bug under the rug. 3836a110577b5c9343915fd96c1b2c64217e0082 has properly fixed the fragile test, and we no longer need the C version of genSym. Furthermore, the C implementation causes trouble when compiling with clang that targets i386 due to alignment warning and libatomic linking issue, so it makes sense to revert it. - - - - - e6bfb85c by Cheng Shao at 2024-03-12T19:27:11-04:00 compiler: fix out-of-bound memory access of genSym on 32-bit This commit fixes an unnoticed out-of-bound memory access of genSym on 32-bit. ghc_unique_inc is 32-bit sized/aligned on 32-bit platforms, but we mistakenly treat it as a Word64 pointer in genSym, and therefore will accidentally load 2 garbage higher bytes, or with a small but non-zero chance, overwrite something else in the data section depends on how the linker places the data segments. This regression was introduced in !11802 and fixed here. - - - - - 77171cd1 by Ben Orchard at 2024-03-14T09:00:40-04:00 Note mutability of array and address access primops Without an understanding of immutable vs. mutable memory, the index primop family have a potentially non-intuitive type signature: indexOffAddr :: Addr# -> Int# -> a readOffAddr :: Addr# -> Int# -> State# d -> (# State# d, a #) indexOffAddr# might seem like a free generality improvement, which it certainly is not! This change adds a brief note on mutability expectations for most index/read/write access primops. - - - - - 7da7f8f6 by Alan Zimmerman at 2024-03-14T09:01:15-04:00 EPA: Fix regression discarding comments in contexts Closes #24533 - - - - - 73be65ab by Fendor at 2024-03-19T01:42:53-04:00 Fix sharing of 'IfaceTyConInfo' during core to iface type translation During heap analysis, we noticed that during generation of 'mi_extra_decls' we have lots of duplicates for the instances: * `IfaceTyConInfo NotPromoted IfaceNormalTyCon` * `IfaceTyConInfo IsPromoted IfaceNormalTyCon` which should be shared instead of duplicated. This duplication increased the number of live bytes by around 200MB while loading the agda codebase into GHCi. These instances are created during `CoreToIface` translation, in particular `toIfaceTyCon`. The generated core looks like: toIfaceTyCon = \ tc_sjJw -> case $wtoIfaceTyCon tc_sjJw of { (# ww_sjJz, ww1_sjNL, ww2_sjNM #) -> IfaceTyCon ww_sjJz (IfaceTyConInfo ww1_sjNL ww2_sjNM) } whichs removes causes the sharing to work propery. Adding explicit sharing, with NOINLINE annotations, changes the core to: toIfaceTyCon = \ tc_sjJq -> case $wtoIfaceTyCon tc_sjJq of { (# ww_sjNB, ww1_sjNC #) -> IfaceTyCon ww_sjNB ww1_sjNC } which looks much more like sharing is happening. We confirmed via ghc-debug that all duplications were eliminated and the number of live bytes are noticeably reduced. - - - - - bd8209eb by Alan Zimmerman at 2024-03-19T01:43:28-04:00 EPA: Address more 9.10.1-alpha1 regressions from recent changes Closes #24533 Hopefully for good this time - - - - - 31bf85ee by Fendor at 2024-03-19T14:48:08-04:00 Escape multiple arguments in the settings file Uses responseFile syntax. The issue arises when GHC is installed on windows into a location that has a space, for example the user name is 'Fake User'. The $topdir will also contain a space, consequentially. When we resolve the top dir in the string `-I$topdir/mingw/include`, then `words` will turn this single argument into `-I/C/Users/Fake` and `User/.../mingw/include` which trips up the flag argument parser of various tools such as gcc or clang. We avoid this by escaping the $topdir before replacing it in `initSettngs`. Additionally, we allow to escape spaces and quotation marks for arguments in `settings` file. Add regression test case to count the number of options after variable expansion and argument escaping took place. Additionally, we check that escaped spaces and double quotation marks are correctly parsed. - - - - - f45f700e by Matthew Pickering at 2024-03-19T14:48:44-04:00 Read global package database from settings file Before this patch, the global package database was always assumed to be in libdir </> package.conf.d. This causes issues in GHC's build system because there are sometimes situations where the package database you need to use is not located in the same place as the settings file. * The stage1 compiler needs to use stage1 libraries, so we should set "Global Package DB" for the stage1 compiler to the stage1 package database. * Stage 2 cross compilers need to use stage2 libraries, so likewise, we should set the package database path to `_build/stage2/lib/` * The normal situation is where the stage2 compiler uses stage1 libraries. Then everything lines up. * When installing we have rearranged everything so that the settings file and package database line up properly, so then everything should continue to work as before. In this case we set the relative package db path to `package.conf.d`, so it resolves the same as before. * ghc-pkg needs to be modified as well to look in the settings file fo the package database rather than assuming the global package database location relative to the lib folder. * Cabal/cabal-install will work correctly because they query the global package database using `--print-global-package-db`. A reasonable question is why not generate the "right" settings files in the right places in GHC's build system. In order to do this you would need to engineer wrappers for all executables to point to a specific libdir. There are also situations where the same package db is used by two different compilers with two different settings files (think stage2 cross compiler and stage3 compiler). In short, this 10 line patch allows for some reasonable simplifications in Hadrian at very little cost to anything else. Fixes #24502 - - - - - 4c8f1794 by Matthew Pickering at 2024-03-19T14:48:44-04:00 hadrian: Remove stage1 testsuite wrappers logic Now instead of producing wrappers which pass the global package database argument to ghc and ghc-pkg, we write the location of the correct package database into the settings file so you can just use the intree compiler directly. - - - - - da0d8ba5 by Matthew Craven at 2024-03-19T14:49:20-04:00 Remove unused ghc-internal module "GHC.Internal.Constants" - - - - - b56d2761 by Matthew Craven at 2024-03-19T14:49:20-04:00 CorePrep: Rework lowering of BigNat# literals Don't use bigNatFromWord#, because that's terrible: * We shouldn't have to traverse a linked list at run-time to build a BigNat# literal. That's just silly! * The static List object we have to create is much larger than the actual BigNat#'s contents, bloating code size. * We have to read the corresponding interface file, which causes un-tracked implicit dependencies. (#23942) Instead, encode them into the appropriate platform-dependent sequence of bytes, and generate code that copies these bytes at run-time from an Addr# literal into a new ByteArray#. A ByteArray# literal would be the correct thing to generate, but these are not yet supported; see also #17747. Somewhat surprisingly, this change results in a slight reduction in compiler allocations, averaging around 0.5% on ghc's compiler performance tests, including when compiling programs that contain no bignum literals to begin with. The specific cause of this has not been investigated. Since this lowering no longer reads the interface file for GHC.Num.BigNat, the reasoning in Note [Depend on GHC.Num.Integer] is obsoleted. But the story of un-tracked built-in dependencies remains complex, and Note [Tracking dependencies on primitives] now exists to explain this complexity. Additionally, many empty imports have been modified to refer to this new note and comply with its guidance. Several empty imports necessary for other reasons have also been given brief explanations. Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 349ea330 by Fendor at 2024-03-19T14:50:00-04:00 Eliminate thunk in 'IfaceTyCon' Heap analysis showed that `IfaceTyCon` retains a thunk to `IfaceTyConInfo`, defeating the sharing of the most common instances of `IfaceTyConInfo`. We make sure the indirection is removed by adding bang patterns to `IfaceTyCon`. Experimental results on the agda code base, where the `mi_extra_decls` were read from disk: Before this change, we observe around 8654045 instances of: `IfaceTyCon[Name,THUNK_1_0]` But these thunks almost exclusively point to a shared value! Forcing the thunk a little bit more, leads to `ghc-debug` reporting: `IfaceTyCon[Name:Name,IfaceTyConInfo]` and a noticeable reduction of live bytes (on agda ~10%). - - - - - 594bee0b by Krzysztof Gogolewski at 2024-03-19T14:50:36-04:00 Minor misc cleanups - GHC.HsToCore.Foreign.JavaScript: remove dropRuntimeRepArgs; boxed tuples don't take RuntimeRep args - GHC.HsToCore.Foreign.Call: avoid partial pattern matching - GHC.Stg.Unarise: strengthen the assertion; we can assert that non-rubbish literals are unary rather than just non-void - GHC.Tc.Gen.HsType: make sure the fsLit "literal" rule fires - users_guide/using-warnings.rst: remove -Wforall-identifier, now deprecated and does nothing - users_guide/using.rst: fix formatting - andy_cherry/test.T: remove expect_broken_for(23272...), 23272 is fixed The rest are simple cleanups. - - - - - cf55a54b by Ben Gamari at 2024-03-19T14:51:12-04:00 mk/relpath: Fix quoting Previously there were two instances in this script which lacked proper quoting. This resulted in `relpath` invocations in the binary distribution Makefile producing incorrect results on Windows, leading to confusing failures from `sed` and the production of empty package registrations. Fixes #24538. - - - - - 5ff88389 by Bryan Richter at 2024-03-19T14:51:48-04:00 testsuite: Disable T21336a on wasm - - - - - 60023351 by Ben Gamari at 2024-03-19T22:33:10-04:00 hadrian/bindist: Eliminate extraneous `dirname` invocation Previously we would call `dirname` twice per installed library file. We now instead reuse this result. This helps appreciably on Windows, where processes are quite expensive. - - - - - 616ac300 by Ben Gamari at 2024-03-19T22:33:10-04:00 hadrian: Package mingw toolchain in expected location This fixes #24525, a regression due to 41cbaf44a6ab5eb9fa676d65d32df8377898dc89. Specifically, GHC expects to find the mingw32 toolchain in the binary distribution root. However, after this patch it was packaged in the `lib/` directory. - - - - - de9daade by Ben Gamari at 2024-03-19T22:33:11-04:00 gitlab/rel_eng: More upload.sh tweaks - - - - - 1dfe12db by Ben Gamari at 2024-03-19T22:33:11-04:00 rel_eng: Drop dead prepare_docs codepath - - - - - dd2d748b by Ben Gamari at 2024-03-19T22:33:11-04:00 rel_env/recompress_all: unxz before recompressing Previously we would rather compress the xz *again*, before in addition compressing it with the desired scheme. Fixes #24545. - - - - - 9d936c57 by Ben Gamari at 2024-03-19T22:33:11-04:00 mk-ghcup-metadata: Fix directory of testsuite tarball As reported in #24546, the `dlTest` artifact should be extracted into the `testsuite` directory. - - - - - 6d398066 by Ben Gamari at 2024-03-19T22:33:11-04:00 ghcup-metadata: Don't populate dlOutput unless necessary ghcup can apparently infer the output name of an artifact from its URL. Consequently, we should only include the `dlOutput` field when it would differ from the filename of `dlUri`. Fixes #24547. - - - - - 576f8b7e by Zubin Duggal at 2024-03-19T22:33:46-04:00 Revert "Apply shellcheck suggestion to SUBST_TOOLDIR" This reverts commit c82770f57977a2b5add6e1378f234f8dd6153392. The shellcheck suggestion is spurious and results in SUBST_TOOLDIR being a no-op. `set` sets positional arguments for bash, but we want to set the variable given as the first autoconf argument. Fixes #24542 Metric decreases because the paths in the settings file are now shorter, so we allocate less when we read the settings file. ------------------------- Metric Decrease: T12425 T13035 T9198 ------------------------- - - - - - cdfe6e01 by Fendor at 2024-03-19T22:34:22-04:00 Compact serialisation of IfaceAppArgs In #24563, we identified that IfaceAppArgs serialisation tags each cons cell element with a discriminator byte. These bytes add up quickly, blowing up interface files considerably when '-fwrite-if-simplified-core' is enabled. We compact the serialisation by writing out the length of 'IfaceAppArgs', followed by serialising the elements directly without any discriminator byte. This improvement can decrease the size of some interface files by up to 35%. - - - - - 97a2bb1c by Simon Peyton Jones at 2024-03-20T17:11:29+00:00 Expand untyped splices in tcPolyExprCheck Fixes #24559 - - - - - 5f275176 by Alan Zimmerman at 2024-03-20T22:44:12-04:00 EPA: Clean up Exactprint helper functions a bit - Introduce a helper lens to compose on `EpAnn a` vs `a` versions - Rename some prime versions of functions back to non-prime They were renamed during the rework - - - - - da2a10ce by Vladislav Zavialov at 2024-03-20T22:44:48-04:00 Type operators in promoteOccName (#24570) Type operators differ from term operators in that they are lexically classified as (type) constructors, not as (type) variables. Prior to this change, promoteOccName did not account for this difference, causing a scoping issue that affected RequiredTypeArguments. type (!@#) = Bool f = idee (!@#) -- Not in scope: ‘!@#’ (BUG) Now we have a special case in promoteOccName to account for this. - - - - - 247fc0fa by Preetham Gujjula at 2024-03-21T10:19:18-04:00 docs: Remove mention of non-existent Ord instance for Complex The documentation for Data.Complex says that the Ord instance for Complex Float is deficient, but there is no Ord instance for Complex a. The Eq instance for Complex Float is similarly deficient, so we use that as an example instead. - - - - - 6fafc51e by Andrei Borzenkov at 2024-03-21T10:19:54-04:00 Fix TH handling in `pat_to_type_pat` function (#24571) There was missing case for `SplicePat` in `pat_to_type_at` function, hence patterns with splicing that checked against `forall->` doesn't work properly because they fall into the "illegal pattern" case. Code example that is now accepted: g :: forall a -> () g $([p| a |]) = () - - - - - 52072f8e by Sylvain Henry at 2024-03-21T21:01:59-04:00 Type-check default declarations before deriving clauses (#24566) See added Note and #24566. Default declarations must be type-checked before deriving clauses. - - - - - 7dfdf3d9 by Sylvain Henry at 2024-03-21T21:02:40-04:00 Lexer: small perf changes - Use unsafeChr because we know our values to be valid - Remove some unnecessary use of `ord` (return Word8 values directly) - - - - - 864922ef by Sylvain Henry at 2024-03-21T21:02:40-04:00 JS: fix some comments - - - - - 3e0b2b1f by Sebastian Graf at 2024-03-21T21:03:16-04:00 Simplifier: Re-do dependency analysis in abstractFloats (#24551) In #24551, we abstracted a string literal binding over a type variable, triggering a CoreLint error when that binding floated to top-level. The solution implemented in this patch fixes this by re-doing dependency analysis on a simplified recursive let binding that is about to be type abstracted, in order to find the minimal set of type variables to abstract over. See wrinkle (AB5) of Note [Floating and type abstraction] for more details. Fixes #24551 - - - - - 8a8ac65a by Matthew Craven at 2024-03-23T00:20:52-04:00 Improve toInteger @Word32 on 64-bit platforms On 64-bit platforms, every Word32 fits in an Int, so we can convert to Int# without having to perform the overflow check integerFromWord# uses internally. - - - - - 0c48f2b9 by Apoorv Ingle at 2024-03-23T00:21:28-04:00 Fix for #24552 (see testcase T24552) Fixes for a bug in desugaring pattern synonyms matches, introduced while working on on expanding `do`-blocks in #18324 The `matchWrapper` unecessarily (and incorrectly) filtered out the default wild patterns in a match. Now the wild pattern alternative is simply ignored by the pm check as its origin is `Generated`. The current code now matches the expected semantics according to the language spec. - - - - - b72705e9 by Simon Peyton Jones at 2024-03-23T00:22:04-04:00 Print more info about kinds in error messages This fixes #24553, where GHC unhelpfully said error: [GHC-83865] • Expected kind ‘* -> * -> *’, but ‘Foo’ has kind ‘* -> * -> *’ See Note [Showing invisible bits of types in error messages] - - - - - 8f7cfc7e by Tristan Cacqueray at 2024-03-23T00:22:44-04:00 docs: remove the don't use float hint This hint is outdated, ``Complex Float`` are now specialised, and the heap space suggestion needs more nuance so it should be explained in the unboxed/storable array documentation. - - - - - 5bd8ed53 by Andreas Klebinger at 2024-03-23T16:18:33-04:00 NCG: Fix a bug in jump shortcutting. When checking if a jump has more than one destination account for the possibility of some jumps not being representable by a BlockId. We do so by having isJumpishInstr return a `Maybe BlockId` where Nothing represents non-BlockId jump destinations. Fixes #24507 - - - - - 8d67f247 by Ben Gamari at 2024-03-23T16:19:09-04:00 docs: Drop old release notes, add for 9.12.1 - - - - - 7db8c992 by Cheng Shao at 2024-03-25T13:45:46-04:00 rts: fix clang compilation on aarch64 This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h which causes "error: address argument to atomic operation must be a pointer to _Atomic type" when compiling with clang on aarch64. - - - - - 237194ce by Sylvain Henry at 2024-03-25T13:46:27-04:00 Lexer: fix imports for Alex 3.5.1 (#24583) - - - - - 810660b7 by Cheng Shao at 2024-03-25T22:19:16-04:00 libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6 This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which includes numerous upstream libffi fixes, especially https://github.com/libffi/libffi/issues/760. - - - - - d2ba41e8 by Alan Zimmerman at 2024-03-25T22:19:51-04:00 EPA: do not duplicate comments in signature RHS - - - - - 32a8103f by Rodrigo Mesquita at 2024-03-26T21:16:12-04:00 configure: Use LDFLAGS when trying linkers A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to check for a working linker. If either of these fail, we try the next in line. However, we were not considering the `$LDFLAGS` when checking if these linkers worked. So we would pick a linker that does not support the current $LDFLAGS and fail further down the line when we used that linker with those flags. Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not supported by `ld.gold` but that was being picked still. - - - - - bf65a7c3 by Rodrigo Mesquita at 2024-03-26T21:16:48-04:00 bindist: Clean xattrs of bin and lib at configure time For issue #21506, we started cleaning the extended attributes of binaries and libraries from the bindist *after* they were installed to workaround notarisation (#17418), as part of `make install`. However, the `ghc-toolchain` binary that is now shipped with the bindist must be run at `./configure` time. Since we only cleaned the xattributes of the binaries and libs after they were installed, in some situations users would be unable to run `ghc-toolchain` from the bindist, failing at configure time (#24554). In this commit we move the xattr cleaning logic to the configure script. Fixes #24554 - - - - - cfeb70d3 by Rodrigo Mesquita at 2024-03-26T21:17:24-04:00 Revert "NCG: Fix a bug in jump shortcutting." This reverts commit 5bd8ed53dcefe10b72acb5729789e19ceb22df66. Fixes #24586 - - - - - 13223f6d by Serge S. Gulin at 2024-03-27T07:28:51-04:00 JS: `h$rts_isProfiled` is removed from `profiling` and left its version at `rts/js/config.js` - - - - - 0acfe391 by Alan Zimmerman at 2024-03-27T07:29:27-04:00 EPA: Do not extend declaration range for trailine zero len semi The lexer inserts virtual semicolons having zero width. Do not use them to extend the list span of items in a list. - - - - - cd0fb82f by Alan Zimmerman at 2024-03-27T19:33:08+00:00 EPA: Fix FamDecl range The span was incorrect if opt_datafam_kind_sig was empty - - - - - f8f384a8 by Ben Gamari at 2024-03-29T01:23:03-04:00 Fix type of _get_osfhandle foreign import Fixes #24601. - - - - - 00d3ecf0 by Alan Zimmerman at 2024-03-29T12:19:10+00:00 EPA: Extend StringLiteral range to include trailing commas This goes slightly against the exact printing philosophy where trailing decorations should be in an annotation, but the practicalities of adding it to the WarningTxt environment, and the problems caused by deviating do not make a more principles approach worthwhile. - - - - - efab3649 by brandon s allbery kf8nh at 2024-03-31T20:04:01-04:00 clarify Note [Preproccesing invocations] - - - - - c8a4c050 by Ben Gamari at 2024-04-02T12:50:35-04:00 rts: Fix TSAN_ENABLED CPP guard This should be `#if defined(TSAN_ENABLED)`, not `#if TSAN_ENABLED`, lest we suffer warnings. - - - - - e91dad93 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix errors when compiling with TSAN This commit fixes rts compilation errors when compiling with TSAN: - xxx_FENCE macros are redefined and trigger CPP warnings. - Use SIZEOF_W. WORD_SIZE_IN_BITS is provided by MachDeps.h which Cmm.h doesn't include by default. - - - - - a9ab9455 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix clang-specific errors when compiling with TSAN This commit fixes clang-specific rts compilation errors when compiling with TSAN: - clang doesn't have -Wtsan flag - Fix prototype of ghc_tsan_* helper functions - __tsan_atomic_* functions aren't clang built-ins and sanitizer/tsan_interface_atomic.h needs to be included - On macOS, TSAN runtime library is libclang_rt.tsan_osx_dynamic.dylib, not libtsan. -fsanitize-thread as a link-time flag will take care of linking the TSAN runtime library anyway so remove tsan as an rts extra library - - - - - 865bd717 by Cheng Shao at 2024-04-02T12:50:35-04:00 compiler: fix github link to __tsan_memory_order in a comment - - - - - 07cb627c by Cheng Shao at 2024-04-02T12:50:35-04:00 ci: improve TSAN CI jobs - Run TSAN jobs with +thread_sanitizer_cmm which enables Cmm instrumentation as well. - Run TSAN jobs in deb12 which ships gcc-12, a reasonably recent gcc that @bgamari confirms he's using in #GHC:matrix.org. Ideally we should be using latest clang release for latest improvements in sanitizers, though that's left as future work. - Mark TSAN jobs as manual+allow_failure in validate pipelines. The purpose is to demonstrate that we have indeed at least fixed building of TSAN mode in CI without blocking the patch to land, and once merged other people can begin playing with TSAN using their own dev setups and feature branches. - - - - - a1c18c7b by Andrei Borzenkov at 2024-04-02T12:51:11-04:00 Merge tc_infer_hs_type and tc_hs_type into one function using ExpType philosophy (#24299, #23639) This patch implements refactoring which is a prerequisite to updating kind checking of type patterns. This is a huge simplification of the main worker that checks kind of HsType. It also fixes the issues caused by previous code duplication, e.g. that we didn't add module finalizers from splices in inference mode. - - - - - 817e8936 by Rodrigo Mesquita at 2024-04-02T20:13:05-04:00 th: Hide the Language.Haskell.TH.Lib.Internal module from haddock Fixes #24562 - - - - - b36ee57b by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: reenable h$appendToHsString optimization (#24495) The optimization introducing h$appendToHsString wasn't kicking in anymore (while it did in 9.8.1) because of the changes introduced in #23270 (7e0c8b3bab30). This patch reenables the optimization by matching on case-expression, as done in Cmm for unpackCString# standard thunks. The test is also T24495 added in the next commits (two commits for ease of backporting to 9.8). - - - - - 527616e9 by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: fix h$appendToHsString implementation (#24495) h$appendToHsString needs to wrap its argument in an updatable thunk to behave like unpackAppendCString#. Otherwise if a SingleEntry thunk is passed, it is stored as-is in a CONS cell, making the resulting list impossible to deepseq (forcing the thunk doesn't update the contents of the CONS cell)! The added test checks that the optimization kicks in and that h$appendToHsString works as intended. Fix #24495 - - - - - faa30b41 by Simon Peyton Jones at 2024-04-02T20:14:22-04:00 Deal with duplicate tyvars in type declarations GHC was outright crashing before this fix: #24604 - - - - - e0b0c717 by Simon Peyton Jones at 2024-04-02T20:14:58-04:00 Try using MCoercion in exprIsConApp_maybe This is just a simple refactor that makes exprIsConApp_maybe a little bit more direct, simple, and efficient. Metrics: compile_time/bytes allocated geo. mean -0.1% minimum -2.0% maximum -0.0% Not a big gain, but worthwhile given that the code is, if anything, easier to grok. - - - - - 15f4d867 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Initial ./configure support for selecting I/O managers In this patch we just define new CPP vars, but don't yet use them or replace the existing approach. That will follow. The intention here is that every I/O manager can be enabled/disabled at GHC build time (subject to some constraints). More than one I/O manager can be enabled to be built. At least one I/O manager supporting the non-threaded RTS must be enabled as well as at least one supporting the non-threaded RTS. The I/O managers enabled here will become the choices available at runtime at RTS startup (in later patches). The choice can be made with RTS flags. There are separate sets of choices for the threaded and non-threaded RTS ways, because most I/O managers are specific to these ways. Furthermore we must establish a default I/O manager for the threaded and non-threaded RTS. Most I/O managers are platform-specific so there are checks to ensure each one can be enabled on the platform. Such checks are also where (in future) any system dependencies (e.g. libraries) can be checked. The output is a set of CPP flags (in the mk/config.h file), with one flag per named I/O manager: * IOMGR_BUILD_<name> : which ones should be built (some) * IOMGR_DEFAULT_NON_THREADED_<name> : which one is default (exactly one) * IOMGR_DEFAULT_THREADED_<name> : which one is default (exactly one) and a set of derived flags in IOManager.h * IOMGR_ENABLED_<name> : enabled for the current RTS way Note that IOMGR_BUILD_<name> just says that an I/O manager will be built for _some_ RTS way (i.e. threaded or non-threaded). The derived flags IOMGR_ENABLED_<name> in IOManager.h say if each I/O manager is enabled in the "current" RTS way. These are the ones that can be used for conditional compilation of the I/O manager code. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - 85b0f87a by Duncan Coutts at 2024-04-03T01:27:17-04:00 Change the handling of the RTS flag --io-manager= Now instead of it being just used on Windows to select between the WinIO vs the MIO or Win32-legacy I/O managers, it is now used on all platforms for selecting the I/O manager to use. Right now it remains the case that there is only an actual choice on Windows, but that will change later. Document the --io-manager flag in the user guide. This change is also reflected in the RTS flags types in the base library. Deprecate the export of IoSubSystem from GHC.RTS.Flags with a message to import it from GHC.IO.Subsystem. The way the 'IoSubSystem' is detected also changes. Instead of looking at the RTS flag, there is now a C bool global var in the RTS which gets set on startup when the I/O manager is selected. This bool var says whether the selected I/O manager classifies as "native" on Windows, which in practice means the WinIO I/O manager has been selected. Similarly, the is_io_mng_native_p RTS helper function is re-implemented in terms of the selected I/O manager, rather than based on the RTS flags. We do however remove the ./configure --native-io-manager flag because we're bringing the WinIO/MIO/Win32-legacy choice under the new general scheme for selecting I/O managers, and that new scheme involves no ./configure time user choices, just runtime RTS flag choices. - - - - - 1a8f020f by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert {init,stop,exit}IOManager to switch style Rather than ad-hoc cpp conitionals on THREADED_RTS and mingw32_HOST_OS, we use a style where we switch on the I/O manager impl, with cases for each I/O manager impl. - - - - - a5bad3d2 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Split up the CapIOManager content by I/O manager Using the new IOMGR_ENABLED_<name> CPP defines. - - - - - 1d36e609 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert initIOManagerAfterFork and wakeupIOManager to switch style - - - - - c2f26f36 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of waitRead#/Write# from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. - - - - - 457705a8 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of the delay# impl from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. Uses a new IOManager API: syncDelay, following the naming convention of sync* for thread-synchronous I/O & timer/delay operations. As part of porting from cmm to C, we maintain the rule that the why_blocked gets accessed using load acquire and store release atomic memory operations. There was one exception to this rule: in the delay# primop cmm code on posix (not win32), the why_blocked was being updated using a store relaxed, not a store release. I've no idea why. In this convesion I'm playing it safe here and using store release consistently. - - - - - e93058e0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 insertIntoSleepingQueue is no longer public No longer defined in IOManager.h, just a private function in IOManager.c. Since it is no longer called from cmm code, just from syncDelay. It ought to get moved further into the select() I/O manager impl, rather than living in IOManager.c. On the other hand appendToIOBlockedQueue is still called from cmm code in the win32-legacy I/O manager primops async{Read,Write}#, and it is also used by the select() I/O manager. Update the CPP and comments to reflect this. - - - - - 60ce9910 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move anyPendingTimeoutsOrIO impl from .h to .c The implementation is eventually going to need to use more private things, which will drag in unwanted includes into IOManager.h, so it's better to move the impl out of the header file and into the .c file, at the slight cost of it no longer being inline. At the same time, change to the "switch (iomgr_type)" style. - - - - - f70b8108 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Take a simpler approach to gcc warnings in IOManager.c We have lots of functions with conditional implementations for different I/O managers. Some functions, for some I/O managers, naturally have implementations that do nothing or barf. When only one such I/O manager is enabled then the whole function implementation will have an implementation that does nothing or barfs. This then results in warnings from gcc that parameters are unused, or that the function should be marked with attribute noreturn (since barf does not return). The USED_IF_THREADS trick for fine-grained warning supression is fine for just two cases, but an equivalent here would need USED_IF_THE_ONLY_ENABLED_IOMGR_IS_X_OR_Y which would have combinitorial blowup. So we take a coarse grained approach and simply disable these two warnings for the whole file. So we use a GCC pragma, with its handy push/pop support: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" #pragma GCC diagnostic ignored "-Wunused-parameter" ... #pragma GCC diagnostic pop - - - - - b48805b9 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add a new trace class for the iomanager It makes sense now for it to be separate from the scheduler class of tracers. Enabled with +RTS -Do. Document the -Do debug flag in the user guide. - - - - - f0c1f862 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Have the throwTo impl go via (new) IOManager APIs rather than directly operating on the IO manager's data structures. Specifically, when thowing an async exception to a thread that is blocked waiting for I/O or waiting for a timer, then we want to cancel that I/O waiting or cancel the timer. Currently this is done directly in removeFromQueues() in RaiseAsync.c. We want it to go via proper APIs both for modularity but also to let us support multiple I/O managers. So add sync{IO,Delay}Cancel, which is the cancellation for the corresponding sync{IO,Delay}. The implementations of these use the usual "switch (iomgr_type)" style. - - - - - 4f9e9c4e by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move awaitEvent into a proper IOManager API and have the scheduler use it. Previously the scheduler calls awaitEvent directly, and awaitEvent is implemented directly in the RTS I/O managers (select, win32). This relies on the old scheme where there's a single active I/O manager for each platform and RTS way. We want to move that to go via an API in IOManager.{h,c} which can then call out to the active I/O manager. Also take the opportunity to split awaitEvent into two. The existing awaitEvent has a bool wait parameter, to say if the call should be blocking or non-blocking. We split this into two separate functions: pollCompletedTimeoutsOrIO and awaitCompletedTimeoutsOrIO. We split them for a few reasons: they have different post-conditions (specifically the await version is supposed to guarantee that there are threads runnable when it completes). Secondly, it is also anticipated that in future I/O managers the implementations of the two cases will be simpler if they are separated. - - - - - 5ad4b30f by Duncan Coutts at 2024-04-03T01:27:18-04:00 Rename awaitEvent in select and win32 I/O managers These are now just called from IOManager.c and are the per-I/O manager backend impls (whereas previously awaitEvent was the entry point). Follow the new naming convention in the IOManager.{h,c} of awaitCompletedTimeoutsOrIO, with the I/O manager's name as a suffix: so awaitCompletedTimeoutsOrIO{Select,Win32}. - - - - - d30c6bc6 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Tidy up a couple things in Select.{h,c} Use the standard #include {Begin,End}Private.h style rather than RTS_PRIVATE on individual decls. And conditionally build the code for the select I/O manager based on the new CPP IOMGR_ENABLED_SELECT rather than on THREADED_RTS. - - - - - 4161f516 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add an IOManager API for scavenging TSO blocked_info When the GC scavenges a TSO it needs to scavenge the tso->blocked_info but the blocked_info is a big union and what lives there depends on the two->why_blocked, which for I/O-related reasons is something that in principle is the responsibility of the I/O manager and not the GC. So the right thing to do is for the GC to ask the I/O manager to sscavenge the blocked_info if it encounters any I/O-related why_blocked reasons. So we add scavengeTSOIOManager in IOManager.{h,c} with the usual style. Now as it happens, right now, there is no special scavenging to do, so the implementation of scavengeTSOIOManager is a fancy no-op. That's because the select I/O manager uses only the fd and target members, which are not GC pointers, and the win32-legacy I/O manager _ought_ to be using GC-managed heap objects for the StgAsyncIOResult but it is actually usingthe C heap, so again no GC pointers. If the win32-legacy were doing this more sensibly, then scavengeTSOIOManager would be the right place to do the GC magic. Future I/O managers will need GC heap objects in the tso->blocked_info and will make use of this functionality. - - - - - 94a87d21 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add I/O manager API notifyIOManagerCapabilitiesChanged Used in setNumCapabilities. It only does anything for MIO on Posix. Previously it always invoked Haskell code, but that code only did anything on non-Windows (and non-JS), and only threaded. That currently effectively means the MIO I/O manager on Posix. So now it only invokes it for the MIO Posix case. - - - - - 3be6d591 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Select an I/O manager early in RTS startup We need to select the I/O manager to use during startup before the per-cap I/O manager initialisation. - - - - - aaa294d0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Make struct CapIOManager be fully opaque Provide an opaque (forward) definition in Capability.h (since the cap contains a *CapIOManager) and then only provide a full definition in a new file IOManagerInternals.h. This new file is only supposed to be included by the IOManager implementation, not by its users. So that means IOManager.c and individual I/O manager implementations. The posix/Signals.c still needs direct access, but that should be eliminated. Anything that needs direct access either needs to be clearly part of an I/O manager (e.g. the sleect() one) or go via a proper API. - - - - - 877a2a80 by Duncan Coutts at 2024-04-03T01:27:18-04:00 The select() I/O manager does have some global initialisation It's just to make sure an exception CAF is a GC root. - - - - - 9c51473b by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add tracing for the main I/O manager actions Using the new tracer class. Note: The unconditional definition of showIOManager should be compatible with the debugTrace change in 7c7d1f6. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - c7d3e3a3 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Include the default I/O manager in the +RTS --info output Document the extra +RTS --info output in the user guide - - - - - 8023bad4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 waitRead# / waitWrite# do not work for win32-legacy I/O manager Previously it was unclear that they did not work because the code path was shared with other I/O managers (in particular select()). Following the code carefully shows that what actually happens is that the calling thread would block forever: the thread will be put into the blocked queue, but no other action is scheduled that will ever result in it getting unblocked. It's better to just fail loudly in case anyone accidentally calls it, also it's less confusing code. - - - - - 83a74d20 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Conditionally ignore some GCC warnings Some GCC versions don't know about some warnings, and they complain that we're ignoring unknown warnings. So we try to ignore the warning based on the GCC version. - - - - - 1adc6fa4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept changes to base-exports All the changes are in fact not changes at all. Previously, the IoSubSystem data type was defined in GHC.RTS.Flags and exported from both GHC.RTS.Flags and GHC.IO.SubSystem. Now, the data type is defined in GHC.IO.SubSystem and still exported from both modules. Therefore, the same exports and same instances are still available from both modules. But the base-exports records only the defining module, and so it looks like a change when it is fully compatible. Related: we do add a deprecation to the export of the type via GHC.RTS.Flags, telling people to use the export from GHC.IO.SubSystem. Also the sort order for some unrelated Show instances changed. No idea why. The same changes apply in the other versions, with a few more changes due to sort order weirdness. - - - - - 8d950968 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept metric decrease in T12227 I can't think of any good reason that anything in this MR should have changed the number of allocations, up or down. (Yes this is an empty commit.) Metric Decrease: T12227 - - - - - e869605e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Several improvements to the handling of coercions * Make `mkSymCo` and `mkInstCo` smarter Fixes #23642 * Fix return role of `SelCo` in the coercion optimiser. Fixes #23617 * Make the coercion optimiser `opt_trans_rule` work better for newtypes Fixes #23619 - - - - - 1efd0714 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 FloatOut: improve floating for join point See the new Note [Floating join point bindings]. * Completely get rid of the complicated join_ceiling nonsense, which I have never understood. * Do not float join points at all, except perhaps to top level. * Some refactoring around wantToFloat, to treat Rec and NonRec more uniformly - - - - - 9c00154d by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve eta-expansion through call stacks See Note [Eta expanding through CallStacks] in GHC.Core.Opt.Arity This is a one-line change, that fixes an inconsistency - || isCallStackPredTy ty + || isCallStackPredTy ty || isCallStackTy ty - - - - - 95a9a172 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Spelling, layout, pretty-printing only - - - - - bdf1660f by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve exprIsConApp_maybe a little Eliminate a redundant case at birth. This sometimes reduces Simplifier iterations. See Note [Case elim in exprIsConApp_maybe]. - - - - - 609cd32c by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Inline GHC.HsToCore.Pmc.Solver.Types.trvVarInfo When exploring compile-time regressions after meddling with the Simplifier, I discovered that GHC.HsToCore.Pmc.Solver.Types.trvVarInfo was very delicately balanced. It's a small, heavily used, overloaded function and it's important that it inlines. By a fluke it was before, but at various times in my journey it stopped doing so. So I just added an INLINE pragma to it; no sense in depending on a delicately-balanced fluke. - - - - - ae24c9bc by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Slight improvement in WorkWrap Ensure that WorkWrap preserves lambda binders, in case of join points. Sadly I have forgotten why I made this change (it was while I was doing a lot of meddling in the Simplifier, but * it does no harm, * it is slightly more efficient, and * presumably it made something better! Anyway I have kept it in a separate commit. - - - - - e9297181 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Use named record fields for the CastIt { ... } data constructor This is a pure refactor - - - - - b4581e23 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Remove a long-commented-out line Pure refactoring - - - - - e026bdf2 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Simplifier improvements This MR started as: allow the simplifer to do more in one pass, arising from places I could see the simplifier taking two iterations where one would do. But it turned into a larger project, because these changes unexpectedly made inlining blow up, especially join points in deeply-nested cases. The main changes are below. There are also many new or rewritten Notes. Avoiding simplifying repeatedly ~~~~~~~~~~~~~~~ See Note [Avoiding simplifying repeatedly] * The SimplEnv now has a seInlineDepth field, which says how deep in unfoldings we are. See Note [Inline depth] in Simplify.Env. Currently used only for the next point: avoiding repeatedly simplifying coercions. * Avoid repeatedly simplifying coercions. see Note [Avoid re-simplifying coercions] in Simplify.Iteration As you'll see from the Note, this makes use of the seInlineDepth. * Allow Simplify.Iteration.simplAuxBind to inline used-once things. This is another part of Note [Post-inline for single-use things], and is really good for reducing simplifier iterations in situations like case K e of { K x -> blah } wher x is used once in blah. * Make GHC.Core.SimpleOpt.exprIsConApp_maybe do some simple case elimination. Note [Case elim in exprIsConApp_maybe] * Improve the case-merge transformation: - Move the main code to `GHC.Core.Utils.mergeCaseAlts`, to join `filterAlts` and friends. See Note [Merge Nested Cases] in GHC.Core.Utils. - Add a new case for `tagToEnum#`; see wrinkle (MC3). - Add a new case to look through join points: see wrinkle (MC4) postInlineUnconditionally ~~~~~~~~~~~~~~~~~~~~~~~~~ * Allow Simplify.Utils.postInlineUnconditionally to inline variables that are used exactly once. See Note [Post-inline for single-use things]. * Do not postInlineUnconditionally join point, ever. Doing so does not reduce allocation, which is the main point, and with join points that are used a lot it can bloat code. See point (1) of Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration. * Do not postInlineUnconditionally a strict (demanded) binding. It will not allocate a thunk (it'll turn into a case instead) so again the main point of inlining it doesn't hold. Better to check per-call-site. * Improve occurrence analyis for bottoming function calls, to help postInlineUnconditionally. See Note [Bottoming function calls] in GHC.Core.Opt.OccurAnal Inlining generally ~~~~~~~~~~~~~~~~~~ * In GHC.Core.Opt.Simplify.Utils.interestingCallContext, use RhsCtxt NonRecursive (not BoringCtxt) for a plain-seq case. See Note [Seq is boring] Also, wrinkle (SB1), inline in that `seq` context only for INLINE functions (UnfWhen guidance). * In GHC.Core.Opt.Simplify.Utils.interestingArg, - return ValueArg for OtherCon [c1,c2, ...], but - return NonTrivArg for OtherCon [] This makes a function a little less likely to inline if all we know is that the argument is evaluated, but nothing else. * isConLikeUnfolding is no longer true for OtherCon {}. This propagates to exprIsConLike. Con-like-ness has /positive/ information. Join points ~~~~~~~~~~~ * Be very careful about inlining join points. See these two long Notes Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline * When making join points, don't do so if the join point is so small it will immediately be inlined; check uncondInlineJoin. * In GHC.Core.Opt.Simplify.Inline.tryUnfolding, improve the inlining heuristics for join points. In general we /do not/ want to inline join points /even if they are small/. See Note [Duplicating join points] GHC.Core.Opt.Simplify.Iteration. But sometimes we do: see Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline; and the new `isBetterUnfoldingThan` function. * Do not add an unfolding to a join point at birth. This is a tricky one and has a long Note [Do not add unfoldings to join points at birth] It shows up in two places - In `mkDupableAlt` do not add an inlining - (trickier) In `simplLetUnfolding` don't add an unfolding for a fresh join point I am not fully satisifed with this, but it works and is well documented. * In GHC.Core.Unfold.sizeExpr, make jumps small, so that we don't penalise having a non-inlined join point. Performance changes ~~~~~~~~~~~~~~~~~~~ * Binary sizes fall by around 2.6%, according to nofib. * Compile times improve slightly. Here are the figures over 1%. I investiate the biggest differnce in T18304. It's a very small module, just a few hundred nodes. The large percentage difffence is due to a single function that didn't quite inline before, and does now, making code size a bit bigger. I decided gains outweighed the losses. Metrics: compile_time/bytes allocated (changes over +/- 1%) ------------------------------------------------ CoOpt_Singletons(normal) -9.2% GOOD LargeRecord(normal) -23.5% GOOD MultiComponentModulesRecomp(normal) +1.2% MultiLayerModulesTH_OneShot(normal) +4.1% BAD PmSeriesS(normal) -3.8% PmSeriesV(normal) -1.5% T11195(normal) -1.3% T12227(normal) -20.4% GOOD T12545(normal) -3.2% T12707(normal) -2.1% GOOD T13253(normal) -1.2% T13253-spj(normal) +8.1% BAD T13386(normal) -3.1% GOOD T14766(normal) -2.6% GOOD T15164(normal) -1.4% T15304(normal) +1.2% T15630(normal) -8.2% T15630a(normal) NEW T15703(normal) -14.7% GOOD T16577(normal) -2.3% GOOD T17516(normal) -39.7% GOOD T18140(normal) +1.2% T18223(normal) -17.1% GOOD T18282(normal) -5.0% GOOD T18304(normal) +10.8% BAD T18923(normal) -2.9% GOOD T1969(normal) +1.0% T19695(normal) -1.5% T20049(normal) -12.7% GOOD T21839c(normal) -4.1% GOOD T3064(normal) -1.5% T3294(normal) +1.2% BAD T4801(normal) +1.2% T5030(normal) -15.2% GOOD T5321Fun(normal) -2.2% GOOD T6048(optasm) -16.8% GOOD T783(normal) -1.2% T8095(normal) -6.0% GOOD T9630(normal) -4.7% GOOD T9961(normal) +1.9% BAD WWRec(normal) -1.4% info_table_map_perf(normal) -1.3% parsing001(normal) +1.5% geo. mean -2.0% minimum -39.7% maximum +10.8% * Runtimes generally improve. In the testsuite perf/should_run gives: Metrics: runtime/bytes allocated ------------------------------------------ Conversions(normal) -0.3% T13536a(optasm) -41.7% GOOD T4830(normal) -0.1% haddock.Cabal(normal) -0.1% haddock.base(normal) -0.1% haddock.compiler(normal) -0.1% geo. mean -0.8% minimum -41.7% maximum +0.0% * For runtime, nofib is a better test. The news is mostly good. Here are the number more than +/- 0.1%: # bytes allocated ==========================++========== imaginary/digits-of-e1 || -14.40% imaginary/digits-of-e2 || -4.41% imaginary/paraffins || -0.17% imaginary/rfib || -0.15% imaginary/wheel-sieve2 || -0.10% real/compress || -0.47% real/fluid || -0.10% real/fulsom || +0.14% real/gamteb || -1.47% real/gg || -0.20% real/infer || +0.24% real/pic || -0.23% real/prolog || -0.36% real/scs || -0.46% real/smallpt || +4.03% shootout/k-nucleotide || -20.23% shootout/n-body || -0.42% shootout/spectral-norm || -0.13% spectral/boyer2 || -3.80% spectral/constraints || -0.27% spectral/hartel/ida || -0.82% spectral/mate || -20.34% spectral/para || +0.46% spectral/rewrite || +1.30% spectral/sphere || -0.14% ==========================++========== geom mean || -0.59% real/smallpt has a huge nest of local definitions, and I could not pin down a reason for a regression. But there are three big wins! Metric Decrease: CoOpt_Singletons LargeRecord T12227 T12707 T13386 T13536a T14766 T15703 T16577 T17516 T18223 T18282 T18923 T21839c T20049 T5321Fun T5030 T6048 T8095 T9630 T783 Metric Increase: MultiLayerModulesTH_OneShot T13253-spj T18304 T18698a T9961 T3294 - - - - - 27db3c5e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Testsuite message changes from simplifier improvements - - - - - 271a7812 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Account for bottoming functions in OccurAnal This fixes #24582, a small but long-standing bug - - - - - 0fde229f by Ben Gamari at 2024-04-04T07:04:58-04:00 testsuite: Introduce template-haskell-exports test - - - - - 0c4a9686 by Luite Stegeman at 2024-04-04T07:05:39-04:00 Update correct counter in bumpTickyAllocd - - - - - 5f085d3a by Fendor at 2024-04-04T14:47:33-04:00 Replace `SizedSeq` with `FlatBag` for flattened structure LinkedLists are notoriously memory ineffiecient when all we do is traversing a structure. As 'UnlinkedBCO' has been identified as a data structure that impacts the overall memory usage of GHCi sessions, we avoid linked lists and prefer flattened structure for storing. We introduce a new memory efficient representation of sequential elements that has special support for the cases: * Empty * Singleton * Tuple Elements This improves sharing in the 'Empty' case and avoids the overhead of 'Array' until its constant overhead is justified. - - - - - 82cfe10c by Fendor at 2024-04-04T14:47:33-04:00 Compact FlatBag array representation `Array` contains three additional `Word`'s we do not need in `FlatBag`. Move `FlatBag` to `SmallArray`. Expand the API of SmallArray by `sizeofSmallArray` and add common traversal functions, such as `mapSmallArray` and `foldMapSmallArray`. Additionally, allow users to force the elements of a `SmallArray` via `rnfSmallArray`. - - - - - 36a75b80 by Andrei Borzenkov at 2024-04-04T14:48:10-04:00 Change how invisible patterns represented in haskell syntax and TH AST (#24557) Before this patch: data ArgPat p = InvisPat (LHsType p) | VisPat (LPat p) With this patch: data Pat p = ... | InvisPat (LHsType p) ... And the same transformation in the TH land. The rest of the changes is just updating code to handle new AST and writing tests to check if it is possible to create invalid states using TH. Metric Increase: MultiLayerModulesTH_OneShot - - - - - 28009fbc by Matthew Pickering at 2024-04-04T14:48:46-04:00 Fix off by one error in seekBinNoExpand and seekBin - - - - - 9b9e031b by Ben Gamari at 2024-04-04T21:30:08-04:00 compiler: Allow more types in GHCForeignImportPrim For many, many years `GHCForeignImportPrim` has suffered from the rather restrictive limitation of not allowing any non-trivial types in arguments or results. This limitation was justified by the code generator allegely barfing in the presence of such types. However, this restriction appears to originate well before the NCG rewrite and the new NCG does not appear to have any trouble with such types (see the added `T24598` test). Lift this restriction. Fixes #24598. - - - - - 1324b862 by Alan Zimmerman at 2024-04-04T21:30:44-04:00 EPA: Use EpaLocation not SrcSpan in ForeignDecls This allows us to update them for makeDeltaAst in ghc-exactprint - - - - - 19883a23 by Alan Zimmerman at 2024-04-05T16:58:17-04:00 EPA: Use EpaLocation for RecFieldsDotDot So we can update it to a delta position in makeDeltaAst if needed. - - - - - e8724327 by Matthew Pickering at 2024-04-05T16:58:53-04:00 Remove accidentally committed test.hs - - - - - 88cb3e10 by Fendor at 2024-04-08T09:03:34-04:00 Avoid UArray when indexing is not required `UnlinkedBCO`'s can occur many times in the heap. Each `UnlinkedBCO` references two `UArray`'s but never indexes them. They are only needed to encode the elements into a `ByteArray#`. The three words for the lower bound, upper bound and number of elements are essentially unused, thus we replace `UArray` with a wrapper around `ByteArray#`. This saves us up to three words for each `UnlinkedBCO`. Further, to avoid re-allocating these words for `ResolvedBCO`, we repeat the procedure for `ResolvedBCO` and add custom `Binary` and `Show` instances. For example, agda's repl session has around 360_000 UnlinkedBCO's, so avoiding these three words is already saving us around 8MB residency. - - - - - f2cc1107 by Fendor at 2024-04-08T09:04:11-04:00 Never UNPACK `FastMutInt` for counting z-encoded `FastString`s In `FastStringTable`, we count the number of z-encoded FastStrings that exist in a GHC session. We used to UNPACK the counters to not waste memory, but live retainer analysis showed that we allocate a lot of `FastMutInt`s, retained by `mkFastZString`. We lazily compute the `FastZString`, only incrementing the counter when the `FastZString` is forced. The function `mkFastStringWith` calls `mkZFastString` and boxes the `FastMutInt`, leading to the following core: mkFastStringWith = \ mk_fs _ -> = case stringTable of { FastStringTable _ n_zencs segments# _ -> ... case ((mk_fs (I# ...) (FastMutInt n_zencs)) `cast` <Co:2> :: ...) ... Marking this field as `NOUNPACK` avoids this reboxing, eliminating the allocation of a fresh `FastMutInt` on every `FastString` allocation. - - - - - c6def949 by Matthew Pickering at 2024-04-08T16:06:51-04:00 Force in_multi to avoid retaining entire hsc_env - - - - - fbb91a63 by Fendor at 2024-04-08T16:06:51-04:00 Eliminate name thunk in declaration fingerprinting Thunk analysis showed that we have about 100_000 thunks (in agda and `-fwrite-simplified-core`) pointing to the name of the name decl. Forcing this thunk fixes this issue. The thunk created here is retained by the thunk created by forkM, it is better to eagerly force this because the result (a `Name`) is already retained indirectly via the `IfaceDecl`. - - - - - 3b7b0c1c by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Use EpaLocation in WarningTxt This allows us to use an EpDelta if needed when using makeDeltaAst. - - - - - 12b997df by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Move DeltaPos and EpaLocation' into GHC.Types.SrcLoc This allows us to use a NoCommentsLocation for the possibly trailing comma location in a StringLiteral. This in turn allows us to correctly roundtrip via makeDeltaAst. - - - - - 868c8a78 by Fendor at 2024-04-09T08:51:50-04:00 Prefer packed representation for CompiledByteCode As there are many 'CompiledByteCode' objects alive during a GHCi session, representing its element in a more packed manner improves space behaviour at a minimal cost. When running GHCi on the agda codebase, we find around 380 live 'CompiledByteCode' objects. Packing their respective 'UnlinkedByteCode' can save quite some pointers. - - - - - be3bddde by Alan Zimmerman at 2024-04-09T08:52:26-04:00 EPA: Capture all comments in a ClassDecl Hopefully the final fix needed for #24533 - - - - - 3d0806fc by Jade at 2024-04-10T05:39:53-04:00 Validate -main-is flag using parseIdentifier Fixes #24368 - - - - - dd530bb7 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: free error message before returning Fixes a memory leak in rts/linker/PEi386.c - - - - - e008a19a by Alexis King at 2024-04-10T05:40:29-04:00 linker: Avoid linear search when looking up Haskell symbols via dlsym See the primary Note [Looking up symbols in the relevant objects] for a more in-depth explanation. When dynamically loading a Haskell symbol (typical when running a splice or GHCi expression), before this commit we would search for the symbol in all dynamic libraries that were loaded. However, this could be very inefficient when too many packages are loaded (which can happen if there are many package dependencies) because the time to lookup the would be linear in the number of packages loaded. This commit drastically improves symbol loading performance by introducing a mapping from units to the handles of corresponding loaded dlls. These handles are returned by dlopen when we load a dll, and can then be used to look up in a specific dynamic library. Looking up a given Name is now much more precise because we can get lookup its unit in the mapping and lookup the symbol solely in the handles of the dynamic libraries loaded for that unit. In one measurement, the wait time before the expression was executed went from +-38 seconds down to +-2s. This commit also includes Note [Symbols may not be found in pkgs_loaded], explaining the fallback to the old behaviour in case no dll can be found in the unit mapping for a given Name. Fixes #23415 Co-authored-by: Rodrigo Mesquita (@alt-romes) - - - - - dcfaa190 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: Make addDLL a wrapper around loadNativeObj Rewrite the implementation of `addDLL` as a wrapper around the more principled `loadNativeObj` rts linker function. The latter should be preferred while the former is preserved for backwards compatibility. `loadNativeObj` was previously only available on ELF platforms, so this commit further refactors the rts linker to transform loadNativeObj_ELF into loadNativeObj_POSIX, which is available in ELF and MachO platforms. The refactor made it possible to remove the `dl_mutex` mutex in favour of always using `linker_mutex` (rather than a combination of both). Lastly, we implement `loadNativeObj` for Windows too. - - - - - 12931698 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 Use symbol cache in internal interpreter too This commit makes the symbol cache that was used by the external interpreter available for the internal interpreter too. This follows from the analysis in #23415 that suggests the internal interpreter could benefit from this cache too, and that there is no good reason not to have the cache for it too. It also makes it a bit more uniform to have the symbol cache range over both the internal and external interpreter. This commit also refactors the cache into a function which is used by both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the caching logic to `lookupSymbolInDLL` too. - - - - - dccd3ea1 by Ben Gamari at 2024-04-10T05:40:29-04:00 testsuite: Add test for lookupSymbolInNativeObj - - - - - 1b1a92bd by Alan Zimmerman at 2024-04-10T05:41:05-04:00 EPA: Remove unnecessary XRec in CompleteMatchSig The XRec for [LIdP pass] is not needed for exact printing, remove it. - - - - - 6e18ce2b by Ben Gamari at 2024-04-12T08:16:09-04:00 users-guide: Clarify language extension documentation Over the years the users guide's language extension documentation has gone through quite a few refactorings. In the process some of the descriptions have been rendered non-sensical. For instance, the description of `NoImplicitPrelude` actually describes the semantics of `ImplicitPrelude`. To fix this we: * ensure that all extensions are named in their "positive" sense (e.g. `ImplicitPrelude` rather than `NoImplicitPrelude`). * rework the documentation to avoid flag-oriented wording like "enable" and "disable" * ensure that the polarity of the documentation is consistent with reality. Fixes #23895. - - - - - a933aff3 by Zubin Duggal at 2024-04-12T08:16:45-04:00 driver: Make `checkHomeUnitsClosed` faster The implementation of `checkHomeUnitsClosed` was traversing every single path in the unit dependency graph - this grows exponentially and quickly grows to be infeasible on larger unit dependency graphs. Instead we replace this with a faster implementation which follows from the specificiation of the closure property - there is a closure error if there are units which are both are both (transitively) depended upon by home units and (transitively) depend on home units, but are not themselves home units. To compute the set of units required for closure, we first compute the closure of the unit dependency graph, then the transpose of this closure, and find all units that are reachable from the home units in the transpose of the closure. - - - - - 23c3e624 by Andreas Klebinger at 2024-04-12T08:17:21-04:00 RTS: Emit warning when -M < -H Fixes #24487 - - - - - d23afb8c by Ben Gamari at 2024-04-12T08:17:56-04:00 testsuite: Add broken test for CApiFFI with -fprefer-bytecode See #24634. - - - - - a4bb3a51 by Ben Gamari at 2024-04-12T08:18:32-04:00 base: Deprecate GHC.Pack As proposed in #21461. Closes #21540. - - - - - 55eb8c98 by Ben Gamari at 2024-04-12T08:19:08-04:00 ghc-internal: Fix mentions of ghc-internal in deprecation warnings Closes #24609. - - - - - b0fbd181 by Ben Gamari at 2024-04-12T08:19:44-04:00 rts: Implement set_initial_registers for AArch64 Fixes #23680. - - - - - 14c9ec62 by Ben Gamari at 2024-04-12T08:20:20-04:00 ghcup-metadata: Use Debian 9 binaries on Ubuntu 16, 17 Closes #24646. - - - - - 35a1621e by Ben Gamari at 2024-04-12T08:20:55-04:00 Bump unix submodule to 2.8.5.1 Closes #24640. - - - - - a1c24df0 by Finley McIlwaine at 2024-04-12T08:21:31-04:00 Correct default -funfolding-use-threshold in docs - - - - - 0255d03c by Oleg Grenrus at 2024-04-12T08:22:07-04:00 FastString is a __Modified__ UTF-8 - - - - - c3489547 by Matthew Pickering at 2024-04-12T13:13:44-04:00 rts: Improve tracing message when nursery is resized It is sometimes more useful to know how much bigger or smaller the nursery got when it is resized. In particular I am trying to investigate situations where we end up with fragmentation due to the nursery (#24577) - - - - - 5e4f4ba8 by Simon Peyton Jones at 2024-04-12T13:14:20-04:00 Don't generate wrappers for `type data` constructors with StrictData Previously, the logic for checking if a data constructor needs a wrapper or not would take into account whether the constructor's fields have explicit strictness (e.g., `data T = MkT !Int`), but the logic would _not_ take into account whether `StrictData` was enabled. This meant that something like `type data T = MkT Int` would incorrectly generate a wrapper for `MkT` if `StrictData` was enabled, leading to the horrible errors seen in #24620. To fix this, we disable generating wrappers for `type data` constructors altogether. Fixes #24620. Co-authored-by: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - dbdf1995 by Alex Mason at 2024-04-15T15:28:26+10:00 Implements MO_S_Mul2 and MO_U_Mul2 using the UMULH, UMULL and SMULH instructions for AArch64 Also adds a test for MO_S_Mul2 - - - - - 42bd0407 by Teo Camarasu at 2024-04-16T20:06:39-04:00 Make template-haskell a stage1 package Promoting template-haskell from a stage0 to a stage1 package means that we can much more easily refactor template-haskell. We implement this by duplicating the in-tree `template-haskell`. A new `template-haskell-next` library is autogenerated to mirror `template-haskell` `stage1:ghc` to depend on the new interface of the library including the `Binary` instances without adding an explicit dependency on `template-haskell`. This is controlled by the `bootstrap-th` cabal flag When building `template-haskell` modules as part of this vendoring we do not have access to quote syntax, so we cannot use variable quote notation (`'Just`). So we either replace these with hand-written `Name`s or hide the code behind CPP. We can remove the `th_hack` from hadrian, which was required when building stage0 packages using the in-tree `template-haskell` library. For more details see Note [Bootstrapping Template Haskell]. Resolves #23536 Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> Co-Authored-By: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - 3d973e47 by Ben Gamari at 2024-04-16T20:07:15-04:00 Bump parsec submodule to 3.1.17.0 - - - - - 9d38bfa0 by Simon Peyton Jones at 2024-04-16T20:07:51-04:00 Clone CoVars in CorePrep This MR addresses #24463. It's all explained in the new Note [Cloning CoVars and TyVars] - - - - - 0fe2b410 by Andreas Klebinger at 2024-04-16T20:08:27-04:00 NCG: Fix a bug where we errounously removed a required jump instruction. Add a new method to the Instruction class to check if we can eliminate a jump in favour of fallthrough control flow. Fixes #24507 - - - - - 9f99126a by Teo Camarasu at 2024-04-16T20:09:04-04:00 Fix documentation preview from doc-tarball job - Include all the .html files and assets in the job artefacts - Include all the .pdf files in the job artefacts - Mark the artefact as an "exposed" artefact meaning it turns up in the UI. Resolves #24651 - - - - - 3a0642ea by Ben Gamari at 2024-04-16T20:09:39-04:00 rts: Ignore EINTR while polling in timerfd itimer implementation While the RTS does attempt to mask signals, it may be that a foreign library unmasks them. This previously caused benign warnings which we now ignore. See #24610. - - - - - 9a53cd3f by Alan Zimmerman at 2024-04-16T20:10:15-04:00 EPA: Add additional comments field to AnnsModule This is used in exact printing to store comments coming after the `where` keyword but before any comments allocated to imports or decls. It is used in ghc-exactprint, see https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195bf47c17d34fa7 - - - - - e5c43259 by Bryan Richter at 2024-04-16T20:10:51-04:00 Remove unrunnable FreeBSD CI jobs FreeBSD runner supply is inelastic. Currently there is only one, and it's unavailable because of a hardware issue. - - - - - 914eb49a by Ben Gamari at 2024-04-16T20:11:27-04:00 rel-eng: Fix mktemp usage in recompress-all We need a temporary directory, not a file. - - - - - f30e4984 by Teo Camarasu at 2024-04-16T20:12:03-04:00 Fix ghc API link in docs/index.html This was missing part of the unit ID meaning it would 404. Resolves #24674 - - - - - d7a3d6b5 by Ben Gamari at 2024-04-16T20:12:39-04:00 template-haskell: Declare TH.Lib.Internal as not-home Rather than `hide`. Closes #24659. - - - - - 5eaa46e7 by Matthew Pickering at 2024-04-19T02:14:55-04:00 testsuite: Rename isCross() predicate to needsTargetWrapper() isCross() was a misnamed because it assumed that all cross targets would provide a target wrapper, but the two most common cross targets (javascript, wasm) don't need a target wrapper. Therefore we rename this predicate to `needsTargetWrapper()` so situations in the testsuite where we can check whether running executables requires a target wrapper or not. - - - - - 55a9d699 by Simon Peyton Jones at 2024-04-19T02:15:32-04:00 Do not float HNFs out of lambdas This MR adjusts SetLevels so that it is less eager to float a HNF (lambda or constructor application) out of a lambda, unless it gets to top level. Data suggests that this change is a small net win: * nofib bytes-allocated falls by -0.09% (but a couple go up) * perf/should_compile bytes-allocated falls by -0.5% * perf/should_run bytes-allocated falls by -0.1% See !12410 for more detail. When fiddling elsewhere, I also found that this patch had a huge positive effect on the (very delicate) test perf/should_run/T21839r But that improvement doesn't show up in this MR by itself. Metric Decrease: MultiLayerModulesRecomp T15703 parsing001 - - - - - f0701585 by Alan Zimmerman at 2024-04-19T02:16:08-04:00 EPA: Fix comments in mkListSyntaxTy0 Also extend the test to confirm. Addresses #24669, 1 of 4 - - - - - b01c01d4 by Serge S. Gulin at 2024-04-19T02:16:51-04:00 JS: set image `x86_64-linux-deb11-emsdk-closure` for build - - - - - c90c6039 by Alan Zimmerman at 2024-04-19T02:17:27-04:00 EPA: Provide correct span for PatBind And remove unused parameter in checkPatBind Contributes to #24669 - - - - - bee54c24 by Krzysztof Gogolewski at 2024-04-19T11:13:00+02:00 Update quantification order following GHC haskell/haddock#23764 - - - - - 2814eb89 by Ben Gamari at 2024-04-19T18:57:05+02:00 hypsrc-test: Fix output of PositionPragmas.html - - - - - 26036f96 by Alan Zimmerman at 2024-04-19T13:11:08-04:00 EPA: Fix span for PatBuilderAppType Include the location of the prefix @ in the span for InVisPat. Also removes unnecessary annotations from HsTP. Contributes to #24669 - - - - - dba03aab by Matthew Craven at 2024-04-19T13:11:44-04:00 testsuite: Give the pre_cmd for mhu-perf more time - - - - - d31fbf6c by Krzysztof Gogolewski at 2024-04-19T21:04:09-04:00 Fix quantification order for a `op` b and a %m -> b Fixes #23764 Implements https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0640-tyop-quantification-order.rst Updates haddock submodule. - - - - - 385cd1c4 by Sebastian Graf at 2024-04-19T21:04:45-04:00 Make `seq#` a magic Id and inline it in CorePrep (#24124) We can save much code and explanation in Tag Inference and StgToCmm by making `seq#` a known-key Magic Id in `GHC.Internal.IO` and inline this definition in CorePrep. See the updated `Note [seq# magic]`. I also implemented a new `Note [Flatten case-bind]` to get better code for otherwise nested case scrutinees. I renamed the contructors of `ArgInfo` to use an `AI` prefix in order to resolve the clash between `type CpeApp = CoreExpr` and the data constructor of `ArgInfo`, as well as fixed typos in `Note [CorePrep invariants]`. Fixes #24252 and #24124. - - - - - 275e41a9 by Jade at 2024-04-20T11:10:40-04:00 Put the newline after errors instead of before them This mainly has consequences for GHCi but also slightly alters how the output of GHC on the commandline looks. Fixes: #22499 - - - - - dd339c7a by Teo Camarasu at 2024-04-20T11:11:16-04:00 Remove unecessary stage0 packages Historically quite a few packages had to be stage0 as they depended on `template-haskell` and that was stage0. In #23536 we made it so that was no longer the case. This allows us to remove a bunch of packages from this list. A few still remain. A new version of `Win32` is required by `semaphore-compat`. Including `Win32` in the stage0 set requires also including `filepath` because otherwise Hadrian's dependency logic gets confused. Once our boot compiler has a newer version of `Win32` all of these will be able to be dropped. Resolves #24652 - - - - - 2f8e3a25 by Alan Zimmerman at 2024-04-20T11:11:52-04:00 EPA: Avoid duplicated comments in splice decls Contributes to #24669 - - - - - c70b9ddb by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fix typos and namings (fixes #24602) You may noted that I've also changed term of ``` , global "h$vt_double" ||= toJExpr IntV ``` See "IntV" and ``` WaitReadOp -> \[] [fd] -> pure $ PRPrimCall $ returnS (app "h$waidRead" [fd]) ``` See "h$waidRead" - - - - - 3db54f9b by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: trivial checks for variable presence (fixes #24602) - - - - - 777f108f by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fs module imported twice (by emscripten and by ghc-internal). ghc-internal import wrapped in a closure to prevent conflict with emscripten (fixes #24602) Better solution is to use some JavaScript module system like AMD, CommonJS or even UMD. It will be investigated at other issues. At first glance we should try UMD (See https://github.com/umdjs/umd) - - - - - a45a5712 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: thread.js requires h$fds and h$fdReady to be declared for static code analysis, minimal code copied from GHCJS (fixes #24602) I've just copied some old pieces of GHCJS from publicly available sources (See https://github.com/Taneb/shims/blob/a6dd0202dcdb86ad63201495b8b5d9763483eb35/src/io.js#L607). Also I didn't put details to h$fds. I took minimal and left only its object initialization: `var h$fds = {};` - - - - - ad90bf12 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: heap and stack overflows reporting defined as js hard failure (fixes #24602) These errors were treated as a hard failure for browser application. The fix is trivial: just throw error. - - - - - 5962fa52 by Serge S. Gulin at 2024-04-21T16:33:44+03:00 JS: Stubs for code without actual implementation detected by Google Closure Compiler (fixes #24602) These errors were fixed just by introducing stubbed functions with throw for further implementation. - - - - - a0694298 by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add externs to linker (fixes #24602) After enabling jsdoc and built-in google closure compiler types I was needed to deal with the following: 1. Define NodeJS-environment types. I've just copied minimal set of externs from semi-official repo (see https://github.com/externs/nodejs/blob/6c6882c73efcdceecf42e7ba11f1e3e5c9c041f0/v8/nodejs.js#L8). 2. Define Emscripten-environment types: `HEAP8`. Emscripten already provides some externs in our code but it supposed to be run in some module system. And its definitions do not work well in plain bundle. 3. We have some functions which purpose is to add to functions some contextual information via function properties. These functions should be marked as `modifies` to let google closure compiler remove calls if these functions are not used actually by call graph. Such functions are: `h$o`, `h$sti`, `h$init_closure`, `h$setObjInfo`. 4. STG primitives such as registries and stuff from `GHC.StgToJS`. `dXX` properties were already present at externs generator function but they are started from `7`, not from `1`. This message is related: `// fixme does closure compiler bite us here?` - - - - - e58bb29f by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: added both tests: for size and for correctness (fixes #24602) By some reason MacOS builds add to stderr messages like: Ignoring unexpected archive entry: __.SYMDEF ... However I left stderr to `/dev/null` for compatibility with linux CI builds. - - - - - 909f3a9c by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Disable js linker warning for empty symbol table to make js tests running consistent across environments - - - - - 83eb10da by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add special preprocessor for js files due of needing to keep jsdoc comments (fixes #24602) Our js files have defined google closure compiler types at jsdoc entries but these jsdoc entries are removed by cpp preprocessor. I considered that reusing them in javascript-backend would be a nice thing. Right now haskell processor uses `-traditional` option to deal with comments and `//` operators. But now there are following compiler options: `-C` and `-CC`. You can read about them at GCC (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-CC) and CLang (see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-CC). It seems that `-CC` works better for javascript jsdoc than `-traditional`. At least it leaves `/* ... */` comments w/o changes. - - - - - e1cf8dc2 by brandon s allbery kf8nh at 2024-04-22T03:48:26-04:00 fix link in CODEOWNERS It seems that our local Gitlab no longer has documentation for the `CODEOWNERS` file, but the master documentation still does. Use that instead. - - - - - a27c6a49 by Fendor at 2024-04-22T10:13:03+02:00 Adapt to UserData split - - - - - 1efc5a7a by Fendor at 2024-04-22T10:13:03+02:00 Adapt to BinHandle split - - - - - 593f4e04 by Fendor at 2024-04-23T10:19:14-04:00 Add performance regression test for '-fwrite-simplified-core' - - - - - 1ba39b05 by Fendor at 2024-04-23T10:19:14-04:00 Typecheck corebindings lazily during bytecode generation This delays typechecking the corebindings until the bytecode generation happens. We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`. In general, we shouldn't retain values of the hydrated `Type`, as not evaluating the bytecode object keeps it alive. It is better if we retain the unhydrated `IfaceType`. See Note [Hydrating Modules] - - - - - e916fc92 by Alan Zimmerman at 2024-04-23T10:19:50-04:00 EPA: Keep comments in a CaseAlt match The comments now live in the surrounding location, not inside the Match. Make sure we keep them. Closes #24707 - - - - - d2b17f32 by Cheng Shao at 2024-04-23T15:01:22-04:00 driver: force merge objects when building dynamic objects This patch forces the driver to always merge objects when building dynamic objects even when ar -L is supported. It is an oversight of !8887: original rationale of that patch is favoring the relatively cheap ar -L operation over object merging when ar -L is supported, which makes sense but only if we are building static objects! Omitting check for whether we are building dynamic objects will result in broken .so files with undefined reference errors at executable link time when building GHC with llvm-ar. Fixes #22210. - - - - - 209d09f5 by Julian Ospald at 2024-04-23T15:02:03-04:00 Allow non-absolute values for bootstrap GHC variable Fixes #24682 - - - - - 3fff0977 by Matthew Pickering at 2024-04-23T15:02:38-04:00 Don't depend on registerPackage function in Cabal More recent versions of Cabal modify the behaviour of libAbiHash which breaks our usage of registerPackage. It is simpler to inline the part of registerPackage that we need and avoid any additional dependency and complication using the higher-level function introduces. - - - - - c62dc317 by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: remove obsolete ln script This commit removes an obsolete ln script in ghc-bignum/gmp. See 060251c24ad160264ae8553efecbb8bed2f06360 for its original intention, but it's been obsolete for a long time, especially since the removal of the make build system. Hence the house cleaning. - - - - - 6399d52b by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: update gmp to 6.3.0 This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0. The tarball format is now xz, and gmpsrc.patch has been patched into the tarball so hadrian no longer needs to deal with patching logic when building in-tree GMP. - - - - - 65b4b92f by Cheng Shao at 2024-04-25T01:32:02-04:00 hadrian: remove obsolete Patch logic This commit removes obsolete Patch logic from hadrian, given we no longer need to patch the gmp tarball when building in-tree GMP. - - - - - 71f28958 by Cheng Shao at 2024-04-25T01:32:02-04:00 autoconf: remove obsolete patch detection This commit removes obsolete deletection logic of the patch command from autoconf scripts, given we no longer need to patch anything in the GHC build process. - - - - - daeda834 by Sylvain Henry at 2024-04-25T01:32:43-04:00 JS: correctly handle RUBBISH literals (#24664) - - - - - 8a06ddf6 by Matthew Pickering at 2024-04-25T11:16:16-04:00 Linearise ghc-internal and base build This is achieved by requesting the final package database for ghc-internal, which mandates it is fully built as a dependency of configuring the `base` package. This is at the expense of cross-package parrallelism between ghc-internal and the base package. Fixes #24436 - - - - - 94da9365 by Andrei Borzenkov at 2024-04-25T11:16:54-04:00 Fix tuple puns renaming (24702) Move tuple renaming short cutter from `isBuiltInOcc_maybe` to `isPunOcc_maybe`, so we consider incoming module. I also fixed some hidden bugs that raised after the change was done. - - - - - fa03b1fb by Fendor at 2024-04-26T18:03:13-04:00 Refactor the Binary serialisation interface The goal is simplifiy adding deduplication tables to `ModIface` interface serialisation. We identify two main points of interest that make this difficult: 1. UserData hardcodes what `Binary` instances can have deduplication tables. Moreover, it heavily uses partial functions. 2. GHC.Iface.Binary hardcodes the deduplication tables for 'Name' and 'FastString', making it difficult to add more deduplication. Instead of having a single `UserData` record with fields for all the types that can have deduplication tables, we allow to provide custom serialisers for any `Typeable`. These are wrapped in existentials and stored in a `Map` indexed by their respective `TypeRep`. The `Binary` instance of the type to deduplicate still needs to explicitly look up the decoder via `findUserDataReader` and `findUserDataWriter`, which is no worse than the status-quo. `Map` was chosen as microbenchmarks indicate it is the fastest for a small number of keys (< 10). To generalise the deduplication table serialisation mechanism, we introduce the types `ReaderTable` and `WriterTable` which provide a simple interface that is sufficient to implement a general purpose deduplication mechanism for `writeBinIface` and `readBinIface`. This allows us to provide a list of deduplication tables for serialisation that can be extended more easily, for example for `IfaceTyCon`, see the issue https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for more motivation. In addition to this refactoring, we split `UserData` into `ReaderUserData` and `WriterUserData`, to avoid partial functions and reduce overall memory usage, as we need fewer mutable variables. Bump haddock submodule to accomodate for `UserData` split. ------------------------- Metric Increase: MultiLayerModulesTH_Make MultiLayerModulesRecomp T21839c ------------------------- - - - - - bac57298 by Fendor at 2024-04-26T18:03:13-04:00 Split `BinHandle` into `ReadBinHandle` and `WriteBinHandle` A `BinHandle` contains too much information for reading data. For example, it needs to keep a `FastMutInt` and a `IORef BinData`, when the non-mutable variants would suffice. Additionally, this change has the benefit that anyone can immediately tell whether the `BinHandle` is used for reading or writing. Bump haddock submodule BinHandle split. - - - - - 4d6394dd by Simon Peyton Jones at 2024-04-26T18:03:49-04:00 Fix missing escaping-kind check in tcPatSynSig Note [Escaping kind in type signatures] explains how we deal with escaping kinds in type signatures, e.g. f :: forall r (a :: TYPE r). a where the kind of the body is (TYPE r), but `r` is not in scope outside the forall-type. I had missed this subtlety in tcPatSynSig, leading to #24686. This MR fixes it; and a similar bug in tc_top_lhs_type. (The latter is tested by T24686a.) - - - - - 981c2c2c by Alan Zimmerman at 2024-04-26T18:04:25-04:00 EPA: check-exact: check that the roundtrip reproduces the source Closes #24670 - - - - - a8616747 by Andrew Lelechenko at 2024-04-26T18:05:01-04:00 Document that setEnv is not thread-safe - - - - - 1e41de83 by Bryan Richter at 2024-04-26T18:05:37-04:00 CI: Work around frequent Signal 9 errors - - - - - a6d5f9da by Naïm Favier at 2024-04-27T17:52:40-04:00 ghc-internal: add MonadFix instance for (,) Closes https://gitlab.haskell.org/ghc/ghc/-/issues/24288, implements CLC proposal https://github.com/haskell/core-libraries-committee/issues/238. Adds a MonadFix instance for tuples, permitting value recursion in the "native" writer monad and bringing consistency with the existing instance for transformers's WriterT (and, to a lesser extent, for Solo). - - - - - 64feadcd by Rodrigo Mesquita at 2024-04-27T17:53:16-04:00 bindist: Fix xattr cleaning The original fix (725343aa) was incorrect because it used the shell bracket syntax which is the quoting syntax in autoconf, making the test for existence be incorrect and therefore `xattr` was never run. Fixes #24554 - - - - - e2094df3 by damhiya at 2024-04-28T23:52:00+09:00 Make read accepts binary integer formats CLC proposal : https://github.com/haskell/core-libraries-committee/issues/177 - - - - - c62239b7 by Sylvain Henry at 2024-04-29T10:35:00+02:00 Fix tests for T22229 - - - - - 1c2fd963 by Alan Zimmerman at 2024-04-29T23:17:00-04:00 EPA: Preserve comments in Match Pats Closes #24708 Closes #24715 Closes #24734 - - - - - 4189d17e by Sylvain Henry at 2024-04-29T23:17:42-04:00 LLVM: better unreachable default destination in Switch (#24717) See added note. Co-authored-by: Siddharth Bhat <siddu.druid at gmail.com> - - - - - a3725c88 by Cheng Shao at 2024-04-29T23:18:20-04:00 ci: enable wasm jobs for MRs with wasm label This patch enables wasm jobs for MRs with wasm label. Previously the wasm label didn't actually have any effect on the CI pipeline, and full-ci needed to be applied to run wasm jobs which was a waste of runners when working on the wasm backend, hence the fix here. - - - - - 702f7964 by Matthew Pickering at 2024-04-29T23:18:56-04:00 Make interface files and object files depend on inplace .conf file A potential fix for #24737 - - - - - 728af21e by Cheng Shao at 2024-04-30T05:30:23-04:00 utils: remove obsolete vagrant scripts Vagrantfile has long been removed in !5288. This commit further removes the obsolete vagrant scripts in the tree. - - - - - 36f2c342 by Cheng Shao at 2024-04-30T05:31:00-04:00 Update autoconf scripts Scripts taken from autoconf 948ae97ca5703224bd3eada06b7a69f40dd15a02 - - - - - ecbf22a6 by Ben Gamari at 2024-04-30T05:31:36-04:00 ghcup-metadata: Drop output_name field This is entirely redundant to the filename of the URL. There is no compelling reason to name the downloaded file differently from its source. - - - - - c56d728e by Zubin Duggal at 2024-04-30T22:45:09-04:00 testsuite: Handle exceptions in framework_fail when testdir is not initialised When `framework_fail` is called before initialising testdir, it would fail with an exception reporting the testdir not being initialised instead of the actual failure. Ensure we report the actual reason for the failure instead of failing in this way. One way this can manifest is when trying to run a test that doesn't exist using `--only` - - - - - d5bea4d6 by Alan Zimmerman at 2024-04-30T22:45:45-04:00 EPA: Fix range for GADT decl with sig only Closes #24714 - - - - - 4d78c53c by Sylvain Henry at 2024-05-01T17:23:06-04:00 Fix TH dependencies (#22229) Add a dependency between Syntax and Internal (via module reexport). - - - - - 37e38db4 by Sylvain Henry at 2024-05-01T17:23:06-04:00 Bump haddock submodule - - - - - ca13075c by Sylvain Henry at 2024-05-01T17:23:47-04:00 JS: cleanup to prepare for #24743 - - - - - 40026ac3 by Alan Zimmerman at 2024-05-01T22:45:07-04:00 EPA: Preserve comments for PrefixCon Preserve comments in fun (Con {- c1 -} a b) = undefined Closes #24736 - - - - - 92134789 by Hécate Moonlight at 2024-05-01T22:45:42-04:00 Correct `@since` metadata in HpcFlags It was introduced in base-4.20, not 4.22. Fix #24721 - - - - - a580722e by Cheng Shao at 2024-05-02T08:18:45-04:00 testsuite: fix req_target_smp predicate - - - - - ac9c5f84 by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Remove (unused)coarse grained locking. The STM code had a coarse grained locking mode guarded by #defines that was unused. This commit removes the code. - - - - - 917ef81b by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Be more optimistic when validating in-flight transactions. * Don't lock tvars when performing non-committal validation. * If we encounter a locked tvar don't consider it a failure. This means in-flight validation will only fail if committing at the moment of validation is *guaranteed* to fail. This prevents in-flight validation from failing spuriously if it happens in parallel on multiple threads or parallel to thread comitting. - - - - - 167a56a0 by Alan Zimmerman at 2024-05-02T08:19:22-04:00 EPA: fix span for empty \case(s) In instance SDecide Nat where SZero %~ (SSucc _) = Disproved (\case) Ensure the span for the HsLam covers the full construct. Closes #24748 - - - - - 9bae34d8 by doyougnu at 2024-05-02T15:41:08-04:00 testsuite: expand size testing infrastructure - closes #24191 - adds windows_skip, wasm_skip, wasm_arch, find_so, _find_so - path_from_ghcPkg, collect_size_ghc_pkg, collect_object_size, find_non_inplace functions to testsuite - adds on_windows and req_dynamic_ghc predicate to testsuite The design is to not make the testsuite too smart and simply offload to ghc-pkg for locations of object files and directories. - - - - - b85b1199 by Sylvain Henry at 2024-05-02T15:41:49-04:00 GHCi: support inlining breakpoints (#24712) When a breakpoint is inlined, its context may change (e.g. tyvars in scope). We must take this into account and not used the breakpoint tick index as its sole identifier. Each instance of a breakpoint (even with the same tick index) now gets a different "info" index. We also need to distinguish modules: - tick module: module with the break array (tick counters, status, etc.) - info module: module having the CgBreakInfo (info at occurrence site) - - - - - 649c24b9 by Oleg Grenrus at 2024-05-03T20:45:42-04:00 Expose constructors of SNat, SChar and SSymbol in ghc-internal - - - - - d603f199 by Mikolaj Konarski at 2024-05-03T20:46:19-04:00 Add DCoVarSet to PluginProv (!12037) - - - - - ba480026 by Serge S. Gulin at 2024-05-03T20:47:01-04:00 JS: Enable more efficient packing of string data (fixes #24706) - - - - - be1e60ee by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Track in-scope variables in ruleCheckProgram This small patch fixes #24726, by tracking in-scope variables properly in -drule-check. Not hard to do! - - - - - 58408c77 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add a couple more HasCallStack constraints in SimpleOpt Just for debugging, no effect on normal code - - - - - 70e245e8 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add comments to Prep.hs This documentation patch fixes a TODO left over from !12364 - - - - - e5687186 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Use HasDebugCallStack, rather than HasCallStack - - - - - 631cefec by Cheng Shao at 2024-05-03T20:48:17-04:00 driver: always merge objects when possible This patch makes the driver always merge objects with `ld -r` when possible, and only fall back to calling `ar -L` when merge objects command is unavailable. This completely reverts !8887 and !12313, given more fixes in Cabal seems to be needed to avoid breaking certain configurations and the maintainence cost is exceeding the behefits in this case :/ - - - - - 1dacb506 by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump time submodule to 1.14 As requested in #24528. ------------------------- Metric Decrease: ghc_bignum_so rts_so Metric Increase: cabal_syntax_dir rts_so time_dir time_so ------------------------- - - - - - 4941b90e by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump terminfo submodule to current master - - - - - 43d48b44 by Cheng Shao at 2024-05-03T20:49:30-04:00 wasm: use scheduler.postTask() for context switch when available This patch makes use of scheduler.postTask() for JSFFI context switch when it's available. It's a more principled approach than our MessageChannel based setImmediate() implementation, and it's available in latest version of Chromium based browsers. - - - - - 08207501 by Cheng Shao at 2024-05-03T20:50:08-04:00 testsuite: give pre_cmd for mhu-perf 5x time - - - - - bf3d4db0 by Alan Zimmerman at 2024-05-03T20:50:43-04:00 EPA: Preserve comments for pattern synonym sig Closes #24749 - - - - - c49493f2 by Matthew Pickering at 2024-05-04T06:02:57-04:00 tests: Widen acceptance window for dir and so size tests These are testing things which are sometimes out the control of a GHC developer. Therefore we shouldn't fail CI if something about these dependencies change because we can't do anything about it. It is still useful to have these statistics for visualisation in grafana though. Ticket #24759 - - - - - 9562808d by Matthew Pickering at 2024-05-04T06:02:57-04:00 Disable rts_so test It has already manifested large fluctuations and destabilising CI Fixes #24762 - - - - - fc24c5cf by Ryan Scott at 2024-05-04T06:03:33-04:00 unboxedSum{Type,Data}Name: Use GHC.Types as the module Unboxed sum constructors are now defined in the `GHC.Types` module, so if you manually quote an unboxed sum (e.g., `''Sum2#`), you will get a `Name` like: ```hs GHC.Types.Sum2# ``` The `unboxedSumTypeName` function in `template-haskell`, however, mistakenly believes that unboxed sum constructors are defined in `GHC.Prim`, so `unboxedSumTypeName 2` would return an entirely different `Name`: ```hs GHC.Prim.(#|#) ``` This is a problem for Template Haskell users, as it means that they can't be sure which `Name` is the correct one. (Similarly for `unboxedSumDataName`.) This patch fixes the implementations of `unboxedSum{Type,Data}Name` to use `GHC.Types` as the module. For consistency with `unboxedTupleTypeName`, the `unboxedSumTypeName` function now uses the non-punned syntax for unboxed sums (`Sum<N>#`) as the `OccName`. Fixes #24750. - - - - - 7eab4e01 by Alan Zimmerman at 2024-05-04T16:14:55+01:00 EPA: Widen stmtslist to include last semicolon Closes #24754 - - - - - 06f7db40 by Teo Camarasu at 2024-05-05T00:19:38-04:00 doc: Fix type error in hs_try_putmvar example - - - - - af000532 by Moritz Schuler at 2024-05-05T06:30:58-04:00 Fix parsing of module names in CLI arguments closes issue #24732 - - - - - da74e9c9 by Ben Gamari at 2024-05-05T06:31:34-04:00 ghc-platform: Add Setup.hs The Hadrian bootstrapping script relies upon `Setup.hs` to drive its build. Addresses #24761. - - - - - 35d34fde by Alan Zimmerman at 2024-05-05T12:52:40-04:00 EPA: preserve comments in class and data decls Fix checkTyClHdr which was discarding comments. Closes #24755 - - - - - 03c5dfbf by Simon Peyton Jones at 2024-05-05T12:53:15-04:00 Fix a float-out error Ticket #24768 showed that the Simplifier was accidentally destroying a join point. It turned out to be that we were sending a bottoming join point to the top, accidentally abstracting over /other/ join points. Easily fixed. - - - - - adba68e7 by John Ericson at 2024-05-05T19:35:56-04:00 Substitute bindist files with Hadrian not configure The `ghc-toolchain` overhaul will eventually replace all this stuff with something much more cleaned up, but I think it is still worth making this sort of cleanup in the meantime so other untanglings and dead code cleaning can procede. I was able to delete a fair amount of dead code doing this too. `LLVMTarget_CPP` is renamed to / merged with `LLVMTarget` because it wasn't actually turned into a valid CPP identifier. (Original to 1345c7cc42c45e63ab1726a8fd24a7e4d4222467, actually.) Progress on #23966 Co-Authored-By: Sylvain Henry <hsyl20 at gmail.com> - - - - - 18f4ff84 by Alan Zimmerman at 2024-05-05T19:36:32-04:00 EPA: fix mkHsOpTyPV duplicating comments Closes #24753 - - - - - a19201d4 by Matthew Craven at 2024-05-06T19:54:29-04:00 Add test cases for #24664 ...since none are present in the original MR !12463 fixing this issue. - - - - - 46328a49 by Alan Zimmerman at 2024-05-06T19:55:05-04:00 EPA: preserve comments in data decls Closes #24771 - - - - - 3b51995c by Andrei Borzenkov at 2024-05-07T14:39:40-04:00 Rename Solo# data constructor to MkSolo# (#24673) - data Solo# a = (# a #) + data Solo# a = MkSolo# a And `(# foo #)` syntax now becomes just a syntactic sugar for `MkSolo# a`. - - - - - 4d59abf2 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Add the cmm_cpp_is_gcc predicate to the testsuite A future C-- test called T24474-cmm-override-g0 relies on the GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it emitting #defines past the preprocessing stage. Clang, at least, does not do this, so the test would fail if ran on Clang. As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of the workaround we apply as a fix for bug #24474, and the workaround was for GCC-specific behaviour, the test needs to be marked as fragile on other compilers. - - - - - 25b0b404 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Split out the C-- preprocessor, and make it pass -g0 Previously, C-- was processed with the C preprocessor program. This means that it inherited flags passed via -optc. A flag that is somewhat often passed through -optc is -g. At certain -g levels (>=2), GCC starts emitting defines *after* preprocessing, for the purposes of debug info generation. This is not useful for the C-- compiler, and, in fact, causes lexer errors. We can suppress this effect (safely, if supported) via -g0. As a workaround, in older versions of GCC (<=10), GCC only emitted defines if a certain set of -g*3 flags was passed. Newer versions check the debug level. For the former, we filter out those -g*3 flags and, for the latter, we specify -g0 on top of that. As a compatible and effective solution, this change adds a C-- preprocessor distinct from the C compiler and preprocessor, but that keeps its flags. The command line produced for C-- preprocessing now looks like: $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/24474 - - - - - 9b4129a5 by Andreas Klebinger at 2024-05-08T13:24:20-04:00 -fprof-late: Only insert cost centres on functions/non-workfree cafs. They are usually useless and doing so for data values comes with a large compile time/code size overhead. Fixes #24103 - - - - - 259b63d3 by Sebastian Graf at 2024-05-08T13:24:57-04:00 Simplifier: Preserve OccInfo on DataAlt fields when case binder is dead (#24770) See the adjusted `Note [DataAlt occ info]`. This change also has a positive repercussion on `Note [Combine case alts: awkward corner]`. Fixes #24770. We now try not to call `dataConRepStrictness` in `adjustFieldsIdInfo` when all fields are lazy anyway, leading to a 2% ghc/alloc decrease in T9675. Metric Decrease: T9675 - - - - - 31b28cdb by Sebastian Graf at 2024-05-08T13:24:57-04:00 Kill seqRule, discard dead seq# in Prep (#24334) Discarding seq#s in Core land via `seqRule` was problematic; see #24334. So instead we discard certain dead, discardable seq#s in Prep now. See the updated `Note [seq# magic]`. This fixes the symptoms of #24334. - - - - - b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00 Document NcgImpl methods Fixes #19914 - - - - - 4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00 Make renamer to be more flexible with parens in the LHS of the rules We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621 - - - - - ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00 IPE: Eliminate dependency on Read Instead of encoding the closure type as decimal string we now simply represent it as an integer, eliminating the need for `Read` in `GHC.Internal.InfoProv.Types.peekInfoProv`. Closes #24504. ------------------------- Metric Decrease: T24602_perf_size size_hello_artifact ------------------------- - - - - - a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00 testsuite: fix testwsdeque with recent clang This patch fixes compilation of testwsdeque.c with recent versions of clang, which will fail with the error below: ``` testwsdeque.c:95:33: error: warning: format specifies type 'long' but the argument has type 'void *' [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~~ ^ testwsdeque.c:95:39: error: warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~ ^~~ | %lu testwsdeque.c:133:42: error: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types] 133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); | ^~~~~ /workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error: note: passing argument to parameter 'startProc' here 193 | OSThreadProc *startProc, void *param); | ^ 2 warnings and 1 error generated. ``` - - - - - c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00 Rename pre-processor invocation args Small clean up. Uses proper names for the various groups of arguments that make up the pre-processor invocation. - - - - - 2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00 ghc-heap: fix typo in ghc-heap cbits - - - - - fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00 Improve performance of Data.List.sort(By) This patch improves the algorithm to sort lists in base. It does so using two strategies: 1) Use a four-way-merge instead of the 'default' two-way-merge. This is able to save comparisons and allocations. 2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization. This mainly benefits types with a fast (>). Note that this *may* break instances with a *malformed* Ord instance where `a > b` is *not* equal to `compare a b == GT`. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236 Fixes #24280 ------------------------- Metric Decrease: MultiLayerModulesTH_Make T10421 T13719 T15164 T18698a T18698b T1969 T9872a T9961 T18730 WWRec T12425 T15703 ------------------------- - - - - - 1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00 Revert "ghcup-metadata: Drop output_name field" This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f. This breaks the ghcup metadata generation on the nightly jobs. - - - - - daff1e30 by Jannis at 2024-05-12T13:38:35-04:00 Division by constants optimization - - - - - 413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00 Tidy: Add flag to expose unfoldings if they take dictionary arguments. Add the flag `-fexpose-overloaded-unfoldings` to be able to control this behaviour. For ghc's boot libraries file size grew by less than 1% when it was enabled. However I refrained from enabling it by default for now. I've also added a section on specialization more broadly to the users guide. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: T12425 T13386 hard_hole_fits ------------------------- - - - - - c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00 Don't store a GlobalRdrEnv in `mi_globals` for GHCi. GHCi only needs the `mi_globals` field for modules imported with :module +*SomeModule. It uses this field to make the top level environment in `SomeModule` available to the repl. By default, only the first target in the command line parameters is "star" loaded into GHCi. Other modules have to be manually "star" loaded into the repl. Storing the top level GlobalRdrEnv for each module is very wasteful, especially given that we will most likely never need most of these environments. Instead we store only the information needed to reconstruct the top level environment in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements as well as all top level symbols defined in the module (not taking export lists into account) When a particular module is "star-loaded" into GHCi (as the first commandline target, or via an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using the `IfaceTopEnv`. - - - - - d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00 Add perf regression test for `-fwrite-if-simplified-core` - - - - - 2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00 Improve pattern to type pattern transformation (23739) `pat_to_type_pat` function now can handle more patterns: - TuplePat - ListPat - LitPat - NPat - ConPat Allowing these new constructors in type patterns significantly increases possible shapes of type patterns without `type` keyword. This patch also changes how lookups in `lookupOccRnConstr` are performed, because we need to fall back into types when we didn't find a constructor on data level to perform `ConPat` to type transformation properly. - - - - - be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00 hadrian: fix hadrian building with ghc-9.10.1 - - - - - ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00 linters: fix lint-whitespace compilation with ghc-9.10.1 - - - - - a593f284 by Andreas Klebinger at 2024-05-15T07:32:10-04:00 Expand the `inline` rule to look through casts/ticks. Fixes #24808 - - - - - b1e0c313 by Cheng Shao at 2024-05-15T07:32:46-04:00 testsuite: bump PartialDownSweep timeout to 5x on wasm32 - - - - - b2227487 by Fendor at 2024-05-15T17:14:06-04:00 Add Eq and Ord instance to `IfaceType` We add an `Ord` instance so that we can store `IfaceType` in a `Data.Map` container. This is required to deduplicate `IfaceType` while writing `.hi` files to disk. Deduplication has many beneficial consequences to both file size and memory usage, as the deduplication enables implicit sharing of values. See issue #24540 for more motivation. The `Ord` instance would be unnecessary if we used a `TrieMap` instead of `Data.Map` for the deduplication process. While in theory this is clerarly the better option, experiments on the agda code base showed that a `TrieMap` implementation has worse run-time performance characteristics. To the change itself, we mostly derive `Eq` and `Ord`. This requires us to change occurrences of `FastString` with `LexicalFastString`, since `FastString` has no `Ord` instance. We change the definition of `IfLclName` to a newtype of `LexicalFastString`, to make such changes in the future easier. Bump haddock submodule for IfLclName changes - - - - - d368f9a6 by Fendor at 2024-05-15T17:14:06-04:00 Move out LiteralMap to avoid cyclic module dependencies - - - - - 2fcc09fd by Fendor at 2024-05-15T17:14:06-04:00 Add deduplication table for `IfaceType` The type `IfaceType` is a highly redundant, tree-like data structure. While benchmarking, we realised that the high redundancy of `IfaceType` causes high memory consumption in GHCi sessions when byte code is embedded into the `.hi` file via `-fwrite-if-simplified-core` or `-fbyte-code-and-object-code`. Loading such `.hi` files from disk introduces many duplicates of memory expensive values in `IfaceType`, such as `IfaceTyCon`, `IfaceTyConApp`, `IA_Arg` and many more. We improve the memory behaviour of GHCi by adding an additional deduplication table for `IfaceType` to the serialisation of `ModIface`, similar to how we deduplicate `Name`s and `FastString`s. When reading the interface file back, the table allows us to automatically share identical values of `IfaceType`. To provide some numbers, we evaluated this patch on the agda code base. We loaded the full library from the `.hi` files, which contained the embedded core expressions (`-fwrite-if-simplified-core`). Before this patch: * Load time: 11.7 s, 2.5 GB maximum residency. After this patch: * Load time: 7.3 s, 1.7 GB maximum residency. This deduplication has the beneficial side effect to additionally reduce the size of the on-disk interface files tremendously. For example, on agda, we reduce the size of `.hi` files (with `-fwrite-if-simplified-core`): * Before: 101 MB on disk * Now: 24 MB on disk This has even a beneficial side effect on the cabal store. We reduce the size of the store on disk: * Before: 341 MB on disk * Now: 310 MB on disk Note, none of the dependencies have been compiled with `-fwrite-if-simplified-core`, but `IfaceType` occurs in multiple locations in a `ModIface`. We also add IfaceType deduplication table to .hie serialisation and refactor .hie file serialisation to use the same infrastrucutre as `putWithTables`. Bump haddock submodule to accomodate for changes to the deduplication table layout and binary interface. - - - - - 36aa7cf1 by Fendor at 2024-05-15T17:14:06-04:00 Add run-time configurability of `.hi` file compression Introduce the flag `-fwrite-if-compression=<n>` which allows to configure the compression level of writing .hi files. The motivation is that some deduplication operations are too expensive for the average use case. Hence, we introduce multiple compression levels with variable impact on performance, but still reduce the memory residency and `.hi` file size on disk considerably. We introduce three compression levels: * `1`: `Normal` mode. This is the least amount of compression. It deduplicates only `Name` and `FastString`s, and is naturally the fastest compression mode. * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is marginally slower than `Normal` mode. In general, it should be safe to always use `Safe` mode. * `3`: `Full` deduplication mode. Deduplicate as much as we can, resulting in minimal .hi files, but at the cost of additional compilation time. Reading .hi files doesn't need to know the initial compression level, and can always deserialise a `ModIface`, as we write out a byte that indicates the next value has been deduplicated. This allows users to experiment with different compression levels for packages, without recompilation of dependencies. Note, the deduplication also has an additional side effect of reduced memory consumption to implicit sharing of deduplicated elements. See https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for example where that matters. ------------------------- Metric Decrease: MultiLayerModulesDefsGhciWithCore T16875 T21839c T24471 hard_hole_fits libdir ------------------------- - - - - - 1e63a6fb by Matthew Pickering at 2024-05-15T17:14:07-04:00 Introduce regression tests for `.hi` file sizes Add regression tests to track how `-fwrite-if-compression` levels affect the size of `.hi` files. - - - - - 639d742b by M Farkas-Dyck at 2024-05-15T17:14:49-04:00 TTG: ApplicativeStatement exist only in Rn and Tc Co-Authored-By: romes <rodrigo.m.mesquita at gmail.com> - - - - - aa7b336b by Jade at 2024-05-15T23:06:17-04:00 Documentation: Improve documentation for symbols exported from System.IO - - - - - c561de8f by Jade at 2024-05-15T23:06:54-04:00 Improve suggestions for language extensions - When suggesting Language extensions, also suggest Extensions which imply them - Suggest ExplicitForAll and GADTSyntax instead of more specific extensions - Rephrase suggestion to include the term 'Extension' - Also moves some flag specific definitions out of Session.hs into Flags.hs (#24478) Fixes: #24477 Fixes: #24448 Fixes: #10893 - - - - - 4c7ae2a1 by Andreas Klebinger at 2024-05-15T23:07:30-04:00 Testsuite: Check if llvm assembler is available for have_llvm - - - - - bc672166 by Torsten Schmits at 2024-05-15T23:08:06-04:00 refactor quadratic search in warnMissingHomeModules - - - - - 7875e8cb by Torsten Schmits at 2024-05-15T23:08:06-04:00 add test that runs MakeDepend on thousands of modules - - - - - b84b91f5 by Adam Gundry at 2024-05-16T15:32:06-04:00 Representation-polymorphic HasField (fixes #22156) This generalises the HasField class to support representation polymorphism, so that instead of type HasField :: forall {k} . k -> Type -> Type -> Constraint we have type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint - - - - - 05285090 by Matthew Pickering at 2024-05-16T15:32:43-04:00 Bump os-string submodule to 2.0.2.2 Closes #24786 - - - - - 886ab43a by Cheng Shao at 2024-05-17T01:34:50-04:00 rts: do not prefetch mark_closure bdescr in non-moving gc when ASSERTS_ENABLED This commit fixes a small an oversight in !12148: the prefetch logic in non-moving GC may trap in debug RTS because it calls Bdescr() for mark_closure which may be a static one. It's fine in non-debug RTS because even invalid bdescr addresses are prefetched, they will not cause segfaults, so this commit implements the most straightforward fix: don't prefetch mark_closure bdescr when assertions are enabled. - - - - - b38dcf39 by Teo Camarasu at 2024-05-17T01:34:50-04:00 rts: Allocate non-moving segments with megablocks Non-moving segments are 8 blocks long and need to be aligned. Previously we serviced allocations by grabbing 15 blocks, finding an aligned 8 block group in it and returning the rest. This proved to lead to high levels of fragmentation as a de-allocating a segment caused an 8 block gap to form, and this could not be reused for allocation. This patch introduces a segment allocator based around using entire megablocks to service segment allocations in bulk. When there are no free segments, we grab an entire megablock and fill it with aligned segments. As the megablock is free, we can easily guarantee alignment. Any unused segments are placed on a free list. It only makes sense to free segments in bulk when all of the segments in a megablock are freeable. After sweeping, we grab the free list, sort it, and find all groups of segments where they cover the megablock and free them. This introduces a period of time when free segments are not available to the mutator, but the risk that this would lead to excessive allocation is low. Right after sweep, we should have an abundance of partially full segments, and this pruning step is relatively quick. In implementing this we drop the logic that kept NONMOVING_MAX_FREE segments on the free list. We also introduce an eventlog event to log the amount of pruned/retained free segments. See Note [Segment allocation strategy] Resolves #24150 ------------------------- Metric Decrease: T13253 T19695 ------------------------- - - - - - 710665bd by Cheng Shao at 2024-05-17T01:35:30-04:00 rts: fix I/O manager compilation errors for win32 target This patch fixes I/O manager compilation errors for win32 target discovered when cross-compiling to win32 using recent clang: ``` rts/win32/ThrIOManager.c:117:7: error: error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | if (is_io_mng_native_p ()) { | ^ | 117 | if (is_io_mng_native_p ()) { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/fs.c:143:28: error: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 143 | int setErrNoFromWin32Error () { | ^ | void | 143 | int setErrNoFromWin32Error () { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:227:9: error: error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 227 | interruptIOManagerEvent (); | ^ | 227 | interruptIOManagerEvent (); | ^ rts/win32/ConsoleHandler.c:227:9: error: note: did you mean 'getIOManagerEvent'? | 227 | interruptIOManagerEvent (); | ^ rts/include/rts/IOInterface.h:27:10: error: note: 'getIOManagerEvent' declared here 27 | void * getIOManagerEvent (void); | ^ | 27 | void * getIOManagerEvent (void); | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:196:9: error: error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/win32/ConsoleHandler.c:196:9: error: note: did you mean 'postThreadLabel'? | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/eventlog/EventLog.h:118:6: error: note: 'postThreadLabel' declared here 118 | void postThreadLabel(Capability *cap, | ^ | 118 | void postThreadLabel(Capability *cap, | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) ``` - - - - - 28b9cee0 by Rodrigo Mesquita at 2024-05-17T01:36:05-04:00 configure: Check C99-compat for Cmm preprocessor Fixes #24815 - - - - - 8927e0c3 by Andreas Klebinger at 2024-05-17T01:36:41-04:00 Ensure `tcHasFixedRuntimeRep (# #)` returns True. - - - - - 04179044 by doyougnu at 2024-05-17T09:00:32-04:00 testsuite: make find_so regex less general Closes #24759 Background. In MR !12372 we began tracking shared object files and directories sizes for dependencies. However, this broke release builds because release builds alter the filenames swapping "in-place" for a hash. This was not considered in the MR and thus broke release pipelines. Furthermore, the rts_so test was found to be wildly varying and was therefore disabled in !12561. This commit fixes both of these issues: - fix the rts_so test by making the regex less general, now the rts_so test and all other foo.so tests must match "libHS<some-lib>-<version>-<hash|'in-place>-<ghc>". This prevents the rts_so test from accidentally matching different rts variants such as rts_threaded, which was the cause of the wild swings after !12372. - add logic to match either a hash or the string in-place. This should make the find_so function build agnostic. - - - - - 0962b50d by Andreas Klebinger at 2024-05-17T09:01:08-04:00 TagAnalysis: Treat all bottom ids as tagged during analysis. Ticket #24806 showed that we also need to treat dead end thunks as tagged during the analysis. - - - - - 7eb9f184 by Ben Gamari at 2024-05-17T11:23:37-04:00 Remove haddock submodule In preparation for merge into the GHC, as proposed in #23178. - - - - - 47b14dcc by Fendor at 2024-05-17T11:28:17-04:00 Adapt to `IfLclName` newtype changes (cherry picked from commit a711607e29b925f3d69e27c5fde4ba655c711ff1) - - - - - 6cc6681d by Fendor at 2024-05-17T11:28:17-04:00 Add IfaceType deduplication table to interface file serialisation Although we do not really need it in the interface file serialisation, as the deserialisation uses `getWithUserData`, we need to mirror the structure `getWithUserData` expects. Thus, we write essentially an empty `IfaceType` table at the end of the file, as the interface file doesn't reference `IfaceType`. (cherry picked from commit c9bc29c6a708483d2abc3d8ec9262510ce87ca61) - - - - - b9721206 by Ben Gamari at 2024-05-17T11:30:22-04:00 ghc-tags.yaml: Initial commit - - - - - 074e7d8f by Ben Gamari at 2024-05-17T11:31:29-04:00 fourmolu: Add configuration - - - - - 151b1736 by Ben Gamari at 2024-05-17T11:32:52-04:00 Makefile: Rework for use by haddock developers Previously the Makefile was present only for GHC's old make-based build system. Now since the make-based build system is gone we can use it for more useful ends. - - - - - a7dcf13b by Ben Gamari at 2024-05-17T11:36:14-04:00 Reformat with fourmolu Using previously-added configuration and `fourmolu -i .` Note that we exclude the test-cases (`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to formatting. - - - - - 0ea6017b by Ben Gamari at 2024-05-17T11:40:04-04:00 Add 'utils/haddock/' from commit 'a7dcf13bfbb97b20e75cc8ce650e2bb628db4660' git-subtree-dir: utils/haddock git-subtree-mainline: 7eb9f1849b1c72a1c61dee88462b4244550406f3 git-subtree-split: a7dcf13bfbb97b20e75cc8ce650e2bb628db4660 - - - - - aba1d304 by Hécate Moonlight at 2024-05-17T11:40:48-04:00 Add exceptions to the dangling notes list - - - - - 527bfbfb by Hécate Moonlight at 2024-05-17T11:40:52-04:00 Add haddock to the whitespace lint ignore list - - - - - 43274677 by Ben Gamari at 2024-05-17T11:41:20-04:00 git-blame-ignore-revs: Ignore haddock reformatting - - - - - 0e679e37 by Fendor at 2024-05-18T00:27:24-04:00 Pass cpp options to the CC builder in hadrian - - - - - bb40244e by Sylvain Henry at 2024-05-18T00:28:06-04:00 JS: fix allocation constant (fix #24746) - - - - - 646d30ab by Jade at 2024-05-18T19:23:31+02:00 Add highlighting for inline-code snippets in haddock - - - - - 64459a3e by Hécate Moonlight at 2024-05-19T08:42:27-04:00 haddock: Add a .readthedocs.yml file for online documentation - - - - - 7d3d9bbf by Serge S. Gulin at 2024-05-19T18:47:05+00:00 Unicode: General Category size test (related #24789) Added trivial size performance test which involves unicode general category usage via `read`. The `read` itself uses general category to detect spaces. The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789. - - - - - 8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00 EPA: Remove redundant code Remove unused epAnnAnns function various cases for showAstData that no longer exist - - - - - 071d7a1e by Rodrigo Mesquita at 2024-05-20T10:55:16-04:00 Improve docs on closed type families in hs-boots Fixes #24776 - - - - - d9e2c119 by Torsten Schmits at 2024-05-20T10:55:52-04:00 Use default deviation for large-project test This new performance test has the purpose of detecting regressions in complexity in relation to the number of modules in a project, so 1% deviation is way too small to avoid false positives. - - - - - 20b0136a by Ben Gamari at 2024-05-22T00:31:39-04:00 ghcup-metadata: Various fixes from 9.10.1 Use Debian 12/x86-64, Debian 10/aarch64, and Debian 11/aarch64 bindists where possible. - - - - - 6838a7c3 by Sylvain Henry at 2024-05-22T00:32:23-04:00 Reverse arguments to stgCallocBytes (fix #24828) - - - - - f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00 Add log messages for Iface serialisation compression level Fix the label of the number of 'IfaceType' entries in the log message. Add log message for the compression level that is used to serialise a an interface file. Adds `Outputable` instance for 'CompressionIFace'. - - - - - 3bad5d55 by Hécate Moonlight at 2024-05-22T00:33:40-04:00 base: Update doctests outputs ghc-internal: Update doctests outputs - - - - - 9317c6fb by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix the testsuites of the haddock-library - Apply all the metadata revisions from Hackage to the cabal file. - Fix the `ParserSpec.hs` file in the `spec` testsuite of haddock-library. - Make `CHANGES.md` an extra-doc-file instead of an extra-source-file. - - - - - 54073b02 by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix parser of @since pragma The testsuite contained tests for annotations of the form `@since foo-bar-0.5.0`, but the parser was written incorrectly. - - - - - ede6ede3 by Matthew Pickering at 2024-05-22T00:34:57-04:00 Fix nightly pages job It seems likely broken by 9f99126a which moved `index.html` from the root folder into `docs/` folder. Fixes #24840 - - - - - b7bcf729 by Cheng Shao at 2024-05-22T00:35:32-04:00 autoconf: remove unused context diff check This patch removes redundant autoconf check for the context diff program given it isn't actually been used anywhere, especially since make removal. - - - - - ea2fe66e by Hécate Moonlight at 2024-05-22T00:36:13-04:00 haddock: Rework the contributing guide - - - - - 0f302a94 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 haddock: Add module relationships diagrams of haddock-api and haddock-library - - - - - d1a9f34f by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add instructions - - - - - b880ee80 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add SVG outputs - - - - - 6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00 rts: Fix size of StgOrigThunkInfo frames Previously the entry code of the `stg_orig_thunk` frame failed to account for the size of the profiling header as it hard-coded the frame size. Fix this. Fixes #24809. - - - - - c645fe40 by Fendor at 2024-05-22T13:40:05-04:00 Add regression test T24809 for stg_orig_thunk_info_frame size - - - - - 4181aa40 by Andreas Klebinger at 2024-05-22T13:40:42-04:00 bindists: Check for existence of share folder before trying to copy it. This folder isn't distributed in windows bindists A lack of doing so resulted us copying loads of files twice. - - - - - d216510e by Matthew Pickering at 2024-05-22T13:40:42-04:00 Remove ad-hoc installation of mingw toolchain in relocatable bindists This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951 The choice about whether to install mingw is taken in the installation makefile. This is also broken on non-windows systems. The actual issue was the EnableDistroToolchain variable wasn't declared in mk/config.mk and therefore the check to install mingw was failing. - - - - - 7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04:00 testsuite: fix T17920 for wasm backend T17920 was marked as fragile on wasm before; it can be trivially fixed by avoiding calling variadic printf() in cmm. - - - - - c739383b by Cheng Shao at 2024-05-22T21:53:29-04:00 testsuite: bump T22744 timeout to 5x - - - - - c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00 testsuite: don't attempt to detect host cpu features when testing cross ghc The testsuite driver CPU feature detection logic only detects host CPU and only makes sense when we are not testing a cross GHC. - - - - - 3d9e4ce6 by Simon Peyton Jones at 2024-05-22T21:54:43-04:00 Better skolemisation As #24810 showed, it is (a little) better to skolemise en-bloc, so that Note [Let-bound skolems] fires more often. See Note [Skolemisation en bloc] in GHC.Tc.Utils.Instantiate. - - - - - a3cd3a1d by Ryan Scott at 2024-05-22T21:55:19-04:00 Add missing parenthesizePat in cvtp We need to ensure that the output of `cvtp` is parenthesized (at precedence `sigPrec`) so that any pattern signatures with a surrounding pattern signature can parse correctly. Fixes #24837. - - - - - 4bb2a7cc by Hécate Moonlight at 2024-05-22T21:55:59-04:00 [base] Document the memory overhead of ByteArray Add a diagram that shows the constituent parts of a ByteArray and their memory overhead. - - - - - 8b2a016a by Hécate Moonlight at 2024-05-22T21:56:38-04:00 Haddock: Add MR template for Haddock - - - - - ead75532 by Peter Trommler at 2024-05-23T02:28:05-04:00 PPC: Support ELF v2 on powerpc64 big-endian Detect ELF v2 on PowerPC 64-bit systems. Check for `_CALL_ELF` preprocessor macro. Fixes #21191 - - - - - 9d4c10f2 by Hécate Kleidukos at 2024-05-23T02:28:44-04:00 gitlab: Add @Kleidukos to CODEOWNERS for utils/haddock - - - - - 28e64170 by Preetham Gujjula at 2024-05-23T07:20:48-04:00 haddock: Add cabal-fmt to tools for `make style` - - - - - 00126a89 by Andrei Borzenkov at 2024-05-23T07:21:24-04:00 haddock: fix verbosity option parsing - - - - - a3e0b68b by Ryan Hendrickson at 2024-05-23T15:52:03-04:00 base: specify tie-breaking behavior of min, max, and related list/Foldable functions - - - - - bdcc0f37 by doyougnu at 2024-05-24T07:51:18-04:00 cmm: add word <-> double/float bitcast - closes: #25331 This is the last step in the project plan described in #25331. This commit: - adds bitcast operands for x86_64, LLVM, aarch64 - For PPC and i386 we resort to using the cmm implementations - renames conversion MachOps from Conv to Round|Truncate - - - - - f0d257f7 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor Some functions in StgToByteCode were filtering out void arguments. However, StgToByteCode is called after unarisation: the void arguments should have been removed earlier. Instead of filtering out, we assert that the args are non-void. - - - - - 03137fd2 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor `layoutNativeCall` was always called with a `primRepCmmType platform` callback. Hence we can put it inside of `layoutNativeCall` rather than repeat it. - - - - - 27c430f3 by David Binder at 2024-05-24T07:52:38-04:00 haddock: Remove compatibility shims for GHC < 8.4 from haddock-library - - - - - 8dd8a076 by Cheng Shao at 2024-05-24T07:53:14-04:00 compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs This patch makes the STG->Cmm backend avoid saving foreign call target to local when there are no caller-save GlobalRegs. Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a foreign call, we unconditionally save the foreign call target to a temporary local first, then rely on cmmSink to clean it up later, which only happens with -fcmm-sink (implied by -O) and not in unoptimized code. And this is troublesome for the wasm backend NCG, which needs to infer a foreign call target symbol's type signature from the Cmm call site. Previously, the NCG has been emitting incorrect type signatures for unoptimized code, which happens to work with `wasm-ld` most of the time, but this is never future-proof against upstream toolchain updates, and it causes horrible breakages when LTO objects are included in linker input. Hence this patch. - - - - - 986df1ab by Cheng Shao at 2024-05-24T07:53:14-04:00 testsuite: add callee-no-local regression test - - - - - 52d62e2a by Sylvain Henry at 2024-05-24T07:53:57-04:00 Fix HasCallStack leftovers from !12514 / #24726 - - - - - c5e00c35 by crumbtoo at 2024-05-24T07:54:38-04:00 user_guide: Fix typo in MultiWayIf chapter Close #24829 - - - - - bd323b0e by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Ensure that CHANGELOG is included in extra-source-files This was missed in the `ghc-internal` split. Closes #24831. - - - - - 1bfd32e8 by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Fix changelog reference to setBacktraceMechanismState (cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d) - - - - - 43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00 Float/double unboxed literal support for HexFloatLiterals (fix #22155) - - - - - 4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00 Improve test labels for binary interface file size tests Test labels for binary interface file sizes are hard to read and overly verbose at the same time. Extend the name for the metric title, but shorten it in the actual comparison table. - - - - - 14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00 Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present" This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa. - - - - - f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00 Fix default hyperlinked sources pattern Previously this didn't include the `%M` token which manifested as broken links to the hyperlinked sources of reexports of declarations defined in other packages. Fixes haddock#1628. (cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36) - - - - - 42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00 Make DocPaths a proper data type (cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c) - - - - - 53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00 haddock: Bump version to 2.30 (cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602) - - - - - e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00 haddock-api: allow base 4.20 and ghc 9.11 - - - - - e294f7a2 by PHO at 2024-05-24T12:17:55-04:00 Add a flag "threaded" for building haddock with the threaded RTS GHC isn't guaranteed to have a threaded RTS. There should be a way to build it with the vanilla one. (cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d) - - - - - 51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00 Update ticky counter event docs. Add the info about the info table address and json fields. Fixes #23200 - - - - - 98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00 Export extractPromotedList (#24866) This can be useful in plugins. - - - - - 228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00 template-haskell: Move wired-ins to ghc-internal Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so ------------------------- - - - - - 62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00 testsuite: mark tests broken by #24886 Now that `template-haskell` is no longer wired-in. These tests are triggering #24886, and so need to be marked broken. - - - - - 3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00 rts: fix missing function prototypes in ClosureMacros.h - - - - - e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00 UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful. - - - - - d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00 ci: Update ci-images commit for fedora38 image The fedora38 nightly job has been failing for quite a while because `diff` was no longer installed. The ci-images bump explicitly installs `diffutils` into these images so hopefully they now pass again. - - - - - 3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00 Update exactprint docs - - - - - 77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00 Incorporate review feedback - - - - - 87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00 Remove no longer relevant reference to comments - - - - - 05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00 Replace outdated code example - - - - - 45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00 Reword error resulting from missing -XBangPatterns. It can be the result of either a bang pattern or strict binding, so now we say so instead of claiming it must be a bang pattern. Fixes #21032 - - - - - e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00 testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x - - - - - 7a660042 by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: ensure gc_thread/gen_workspace is allocated with proper alignment gc_thread/gen_workspace are required to be aligned by 64 bytes. However, this property has not been properly enforced before, and numerous alignment violations at runtime has been caught by UndefinedBehaviorSanitizer that look like: ``` rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment 0x0000027a3390: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8 rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment 0x0000027a3450: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13 ``` This patch fixes the gc_thread/gen_workspace misalignment issue by explicitly allocating them with alignment constraint. - - - - - c77a48af by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: fix an unaligned load in nonmoving gc This patch fixes an unaligned load in nonmoving gc by ensuring the closure address is properly untagged first before attempting to prefetch its header. The unaligned load is reported by UndefinedBehaviorSanitizer: ``` rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment 0x0042005f3a71: note: pointer points here 00 00 00 98 43 13 8e 12 7f 00 00 50 3c 5f 00 42 00 00 00 58 17 b7 92 12 7f 00 00 89 cb 5e 00 42 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9 ``` This issue had previously gone unnoticed since it didn't really harm runtime correctness, the invalid header address directly loaded from a tagged pointer is only used as prefetch address and will not cause segfaults. However, it still should be corrected because the prefetch would be rendered useless by this issue, and untagging only involves a single bitwise operation without memory access so it's cheap enough to add. - - - - - 05c4fafb by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: use __builtin_offsetof to implement STG_FIELD_OFFSET This patch fixes the STG_FIELD_OFFSET macro definition by using __builtin_offsetof, which is what gcc/clang uses to implement offsetof in standard C. The previous definition that uses NULL pointer involves subtle undefined behavior in C and thus reported by UndefinedBehaviorSanitizer as well: ``` rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58 ``` - - - - - 5ff83bfc by Sylvain Henry at 2024-05-30T14:43:10-04:00 JS: remove useless h$CLOCK_REALTIME (#23202) - - - - - 95ef2d58 by Matthew Pickering at 2024-05-30T14:43:47-04:00 ghcup-metadata: Fix metadata generation There were some syntax errors in the generation script which were preventing it from running. I have tested this with: ``` nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525 ``` which completed successfully. - - - - - 1bc66ee4 by Jakob Bruenker at 2024-05-30T14:44:22-04:00 Add diagrams to Arrows documentation This adds diagrams to the documentation of Arrows, similar to the ones found on https://www.haskell.org/arrows/. It does not add diagrams for ArrowChoice for the time being, mainly because it's not clear to me how to visually distinguish them from the ones for Arrow. Ideally, you might want to do something like highlight the arrows belonging to the same tuple or same Either in common colors, but that's not really possible with unicode. - - - - - d10a1c65 by Matthew Craven at 2024-05-30T23:35:48-04:00 Make UnsafeSNat et al. into pattern synonyms ...so that they do not cause coerce to bypass the nominal role on the corresponding singleton types when they are imported. See Note [Preventing unsafe coercions for singleton types] and the discussion at #23478. This also introduces unsafeWithSNatCo (and analogues for Char and Symbol) so that users can still access the dangerous coercions that importing the real constructors would allow, but only in a very localized way. - - - - - 0958937e by Cheng Shao at 2024-05-30T23:36:25-04:00 hadrian: build C/C++ with split sections when enabled When split sections is enabled, ensure -fsplit-sections is passed to GHC as well when invoking GHC to compile C/C++; and pass -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++ with the hadrian Cc builder. Fixes #23381. - - - - - 02b1f91e by Cheng Shao at 2024-05-30T23:36:25-04:00 driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled When -fsplit-sections is passed to GHC, pass -ffunction-sections -fdata-sections to gcc/clang when building C/C++. Previously, -fsplit-sections was only respected by the NCG/LLVM backends, but not the unregisterised backend; the GHC driver did not pass -fdata-sections and -ffunction-sections to the C compiler, which resulted in excessive executable sizes. Fixes #23381. ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - fd47e2e3 by Cheng Shao at 2024-05-30T23:37:00-04:00 testsuite: mark process005 as fragile on JS - - - - - 34a04ea1 by Matthew Pickering at 2024-05-31T06:08:36-04:00 Add -Wderiving-typeable to -Wall Deriving `Typeable` does nothing, and it hasn't done for a long while. There has also been a warning for a long while which warns you about uselessly deriving it but it wasn't enabled in -Wall. Fixes #24784 - - - - - 75fa7b0b by Matthew Pickering at 2024-05-31T06:08:36-04:00 docs: Fix formatting of changelog entries - - - - - 303c4b33 by Preetham Gujjula at 2024-05-31T06:09:21-04:00 docs: Fix link to injective type families paper Closes #24863 - - - - - df97e9a6 by Ben Gamari at 2024-05-31T06:09:57-04:00 ghc-internal: Fix package description The previous description was inherited from `base` and was inappropriate for `ghc-internal`. Also fix the maintainer and bug reporting fields. Closes #24906. - - - - - bf0737c0 by Cheng Shao at 2024-05-31T06:10:33-04:00 compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans This patch removes special consideration for ArchWasm32 in cmmDoCmmSwitchPlans, which means the compiler will now disable cmmImplementSwitchPlans for wasm unreg backend, just like unreg backend of other targets. We enabled it in the past to workaround some compile-time panic in older versions of LLVM, but those panics are no longer present, hence no need to keep this workaround. - - - - - 7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00 utils: add hie.yaml config file for ghc-config Add hie.yaml to ghc-config project directory so it can be edited using HLS. - - - - - 1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00 hadrian: handle findExecutable "" gracefully hadrian may invoke findExecutable "" at run-time due to a certain program is not found by configure script. Which is fine and findExecutable is supposed to return Nothing in this case. However, on Windows there's a directory bug that throws an exception (see https://github.com/haskell/directory/issues/180), so we might as well use a wrapper for findExecutable and handle exceptions gracefully. - - - - - 4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00 configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails When configure fails to find LLC/OPT/LLVMAS within supported version range, it used to set "llc"/"opt"/"clang" as fallback values. This behavior is particularly troublesome when the user has llc/opt/clang with other versions in their PATH and run the testsuite, since hadrian will incorrectly assume have_llvm=True and pass that to the testsuite driver, resulting in annoying optllvm test failures (#23186). If configure determines llc/opt/clang wouldn't work, then we shouldn't pretend it'll work at all, and the bindist configure will invoke FIND_LLVM_PROG check again at install time anyway. - - - - - 5f1afdf7 by Sylvain Henry at 2024-05-31T15:52:52-04:00 Introduce UniqueSet and use it to replace 'UniqSet Unique' 'UniqSet Unique' represents a set of uniques as a 'Map Unique Unique', which is wasting space (associated key/value are always the same). Fix #23572 and #23605 - - - - - e0aa42b9 by crumbtoo at 2024-05-31T15:53:33-04:00 Improve template-haskell haddocks Closes #15822 - - - - - ae170155 by Olivier Benz at 2024-06-01T09:35:17-04:00 Bump max LLVM version to 19 (not inclusive) - - - - - 92aa65ea by Matthew Pickering at 2024-06-01T09:35:17-04:00 ci: Update CI images to test LLVM 18 The debian12 image in this commit has llvm 18 installed. - - - - - adb1fe42 by Serge S. Gulin at 2024-06-01T09:35:53-04:00 Unicode: make ucd2haskell build-able again ucd2haskell tool used streamly library which version in cabal was out of date. It is updated to the latest version at hackage with deprecated parts rewritten. Also following fixes were applied to existing code in suppose that from its last run the code structure was changed and now it was required to be up to date with actual folder structures: 1. Ghc module path environment got a suffix with `src`. 2. Generated code got 2.1 `GHC.Internal` prefix for `Data.*`. 2.2 `GHC.Unicode.Internal` swapped on `GHC.Internal.Unicode` according to actual structure. - - - - - ad56fd84 by Jade at 2024-06-01T09:36:29-04:00 Replace 'NB' with 'Note' in error messages - - - - - 6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00 compiler: fix -ddump-cmm-raw when compiling .cmm This patch fixes missing -ddump-cmm-raw output when compiling .cmm, which is useful for debugging cmm related codegen issues. - - - - - 1c834ad4 by Ryan Scott at 2024-06-01T09:37:40-04:00 Print namespace specifiers in FixitySig's Outputable instance For whatever reason, the `Outputable` instance for `FixitySig` simply did not print out namespace specifiers, leading to the confusing `-ddump-splices` output seen in #24911. This patch corrects this oversight. Fixes #24911. - - - - - cf49fb5f by Sylvain Henry at 2024-06-01T09:38:19-04:00 Configure: display C++ compiler path - - - - - f9c1ae12 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable PIC for in-tree GMP on wasm32 This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. - - - - - 1a32f828 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable in-tree gmp fft code path for wasm32 This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. - - - - - 06277d56 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: build in-tree GMP with malloc-notreentrant on wasm32 This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. - - - - - 9f614270 by ARATA Mizuki at 2024-06-02T14:02:35-04:00 Set package include paths when assembling .S files Fixes #24839. Co-authored-by: Sylvain Henry <hsyl20 at gmail.com> - - - - - 4998a6ed by Alex Mason at 2024-06-03T02:09:29-04:00 Improve performance of genericWordQuotRem2Op (#22966) Implements the algorithm from compiler-rt's udiv128by64to64default. This rewrite results in a roughly 24x improvement in runtime on AArch64 (and likely any other arch that uses it). - - - - - ae50a8eb by Cheng Shao at 2024-06-03T02:10:05-04:00 testsuite: mark T7773 as fragile on wasm - - - - - c8ece0df by Fendor at 2024-06-03T19:43:22-04:00 Migrate `Finder` component to `OsPath`, fixed #24616 For each module in a GHCi session, we keep alive one `ModLocation`. A `ModLocation` is fairly inefficiently packed, as `String`s are expensive in memory usage. While benchmarking the agda codebase, we concluded that we keep alive around 11MB of `FilePath`'s, solely retained by `ModLocation`. We provide a more densely packed encoding of `ModLocation`, by moving from `FilePath` to `OsPath`. Further, we migrate the full `Finder` component to `OsPath` to avoid unnecessary transformations. As the `Finder` component is well-encapsulated, this requires only a minimal amount of changes in other modules. We introduce pattern synonym for 'ModLocation' which maintains backwards compatibility and avoids breaking consumers of 'ModLocation'. - - - - - 0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00 compiler: emit NaturallyAligned when element type & index type are the same width This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. - - - - - 18f63970 by Sebastian Graf at 2024-06-04T05:05:27-04:00 Parser: Remove unused `apats` rule - - - - - 38757c30 by David Knothe at 2024-06-04T05:05:27-04:00 Implement Or Patterns (#22596) This commit introduces a new language extension, `-XOrPatterns`, as described in GHC Proposal 522. An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ..., `patk` succeed, in this order. See also the summary `Note [Implmentation of OrPatterns]`. Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> - - - - - 395412e8 by Cheng Shao at 2024-06-04T05:06:04-04:00 compiler/ghci/rts: remove stdcall support completely We have formally dropped i386 windows support (#18487) a long time ago. The stdcall foreign call convention is only used by i386 windows, and the legacy logic around it is a significant maintenance burden for future work that adds arm64 windows support (#24603). Therefore, this patch removes stdcall support completely from the compiler as well as the RTS (#24883): - stdcall is still recognized as a FFI calling convention in Haskell syntax. GHC will now unconditionally emit a warning (-Wunsupported-calling-conventions) and treat it as ccall. - Apart from minimum logic to support the parsing and warning logic, all other code paths related to stdcall has been completely stripped from the compiler. - ghci only supports FFI_DEFAULT_ABI and ccall convention from now on. - FFI foreign export adjustor code on all platforms no longer handles the stdcall case and only handles ccall from now on. - The Win32 specific parts of RTS no longer has special code paths for stdcall. This commit is the final nail on the coffin for i386 windows support. Further commits will perform more housecleaning to strip the legacy code paths and pave way for future arm64 windows support. - - - - - d1fe9ab6 by Cheng Shao at 2024-06-04T05:06:04-04:00 rts: remove legacy i386 windows code paths This commit removes some legacy i386 windows related code paths in the RTS, given this target is no longer supported. - - - - - a605e4b2 by Cheng Shao at 2024-06-04T05:06:04-04:00 autoconf: remove i386 windows related logic This commit removes legacy i386 windows logic in autoconf scripts. - - - - - 91e5ac5e by Cheng Shao at 2024-06-04T05:06:04-04:00 llvm-targets: remove i386 windows support This commit removes i386 windows from llvm-targets and the script to generate it. - - - - - 65fe75a4 by Cheng Shao at 2024-06-04T05:06:04-04:00 libraries/utils: remove stdcall related legacy logic This commit removes stdcall related legacy logic in libraries and utils. ccall should be used uniformly for all supported windows hosts from now on. - - - - - d2a83302 by Cheng Shao at 2024-06-04T05:06:04-04:00 testsuite: adapt the testsuite for stdcall removal This patch adjusts test cases to handle the stdcall removal: - Some stdcall usages are replaced with ccall since stdcall doesn't make sense anymore. - We also preserve some stdcall usages, and check in the expected warning messages to ensure GHC always warn about stdcall usages (-Wunsupported-calling-conventions) as expected. - Error code testsuite coverage is slightly improved, -Wunsupported-calling-conventions is now tested. - Obsolete code paths related to i386 windows are also removed. - - - - - cef8f47a by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: minor adjustments for stdcall removal This commit include minor adjustments of documentation related to stdcall removal. - - - - - 54332437 by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: mention i386 Windows removal in 9.12 changelog This commit mentions removal of i386 Windows support and stdcall related change in the 9.12 changelog. - - - - - 2aaea8a1 by Cheng Shao at 2024-06-04T05:06:40-04:00 hadrian: improve user settings documentation This patch adds minor improvements to hadrian user settings documentation: - Add missing `ghc.cpp.opts` case - Remove non-existent `cxx` case - Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't - Add example of passing configure argument to autoconf packages - - - - - 71010381 by Alex Mason at 2024-06-04T12:09:07-04:00 Add AArch64 CLZ, CTZ, RBIT primop implementations. Adds support for emitting the clz and rbit instructions, which are used by GHC.Prim.clz*#, GHC.Prim.ctz*# and GHC.Prim.bitReverse*#. - - - - - 44e2abfb by Cheng Shao at 2024-06-04T12:09:43-04:00 hadrian: add +text_simdutf flavour transformer to allow building text with simdutf This patch adds a +text_simdutf flavour transformer to hadrian to allow downstream packagers and users that build from source to opt-in simdutf support for text, in order to benefit from SIMD speedup at run-time. It's still disabled by default for the time being. - - - - - 077cb2e1 by Cheng Shao at 2024-06-04T12:09:43-04:00 ci: enable +text_simdutf flavour transformer for wasm jobs This commit enables +text_simdutf flavour transformer for wasm jobs, so text is now built with simdutf support for wasm. - - - - - b23746ad by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Use TemplateHaskellQuotes in instance Lift ByteArray Resolves #24852 - - - - - 3fd25743 by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Mark addrToByteArray as NOINLINE This function should never be inlined in order to keep code size small. - - - - - 98ad1ea5 by Cheng Shao at 2024-06-04T22:51:26-04:00 compiler: remove unused CompilerInfo/LinkerInfo types This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. - - - - - 11795244 by Cheng Shao at 2024-06-05T06:33:17-04:00 rts: remove unused PowerPC/IA64 native adjustor code This commit removes unused PowerPC/IA64 native adjustor code which is never actually enabled by autoconf/hadrian. Fixes #24920. - - - - - 5132754b by Sylvain Henry at 2024-06-05T06:33:57-04:00 RTS: fix warnings with doing*Profiling (#24918) - - - - - accc8c33 by Cheng Shao at 2024-06-05T11:35:36-04:00 hadrian: don't depend on inplace/mingw when --enable-distro-toolchain on Windows - - - - - 6ffbd678 by Cheng Shao at 2024-06-05T11:35:37-04:00 autoconf: normalize paths of some build-time dependencies on Windows This commit applies path normalization via cygpath -m to some build-time dependencies on Windows. Without this logic, the /clang64/bin prefixed msys2-style paths cause the build to fail with --enable-distro-toolchain. - - - - - 075dc6d4 by Cheng Shao at 2024-06-05T11:36:12-04:00 hadrian: remove OSDarwin mention from speedHack This commit removes mentioning of OSDarwin from speedHack, since speedHack is purely for i386 and we no longer support i386 darwin (#24921). - - - - - 83235c4c by Cheng Shao at 2024-06-05T11:36:12-04:00 compiler: remove 32-bit darwin logic This commit removes all 32-bit darwin logic from the compiler, given we no longer support 32-bit apple systems (#24921). Also contains a bit more cleanup of obsolete i386 windows logic. - - - - - 1eb99bc3 by Cheng Shao at 2024-06-05T11:36:12-04:00 rts: remove 32-bit darwin/ios logic This commit removes 32-bit darwin/ios related logic from the rts, given we no longer support them (#24921). - - - - - 24f65892 by Cheng Shao at 2024-06-05T11:36:12-04:00 llvm-targets: remove 32-bit darwin/ios targets This commit removes 32-bit darwin/ios targets from llvm-targets given we no longer support them (#24921). - - - - - ccdbd689 by Cheng Shao at 2024-06-05T11:36:12-04:00 testsuite: remove 32-bit darwin logic This commit removes 32-bit darwin logic from the testsuite given it's no longer supported (#24921). Also contains more cleanup of obsolete i386 windows logic. - - - - - 11d661c4 by Cheng Shao at 2024-06-05T11:36:13-04:00 docs: mention 32-bit darwin/ios removal in 9.12 changelog This commit mentions removal of 32-bit darwin/ios support (#24921) in the 9.12 changelog. - - - - - 7c173310 by Georgi Lyubenov at 2024-06-05T15:17:22-04:00 Add firstA and secondA to Data.Bitraversable Please see https://github.com/haskell/core-libraries-committee/issues/172 for related discussion - - - - - 3b6f9fd1 by Ben Gamari at 2024-06-05T15:17:59-04:00 base: Fix name of changelog Fixes #24899. Also place it under `extra-doc-files` to better reflect its nature and avoid triggering unnecessary recompilation if it changes. - - - - - 1f4d2ef7 by Sebastian Graf at 2024-06-05T15:18:34-04:00 Announce Or-patterns in the release notes for GHC 9.12 (#22596) Leftover from !9229. - - - - - 8650338d by Jan Hrček at 2024-06-06T10:39:24-04:00 Improve haddocks of Language.Haskell.Syntax.Pat.Pat - - - - - 2eee65e1 by Cheng Shao at 2024-06-06T10:40:00-04:00 testsuite: bump T7653 timeout for wasm - - - - - 990fed60 by Sylvain Henry at 2024-06-07T14:45:23-04:00 StgToCmm: refactor opTranslate and friends - Change arguments order to avoid `\args -> ...` lambdas - Fix documentation - Rename StgToCmm options ("big" doesn't mean anything) - - - - - 1afad514 by Sylvain Henry at 2024-06-07T14:45:23-04:00 NCG x86: remove dead code (#5444) Since 6755d833af8c21bbad6585144b10e20ac4a0a1ab this code is dead. - - - - - 595c0894 by Cheng Shao at 2024-06-07T14:45:58-04:00 testsuite: skip objc-hi/objcxx-hi when cross compiling objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. - - - - - edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 0307980c by Ben Gamari at 2024-11-12T11:55:20-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - 24 changed files: - .ghcid - + .git-blame-ignore-revs - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - − .gitlab/circle-ci-job.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - − .gitlab/gen-ci.cabal - − .gitlab/gen_ci.hs - + .gitlab/generate-ci/LICENSE - + .gitlab/generate-ci/README.mkd - + .gitlab/generate-ci/flake.lock - + .gitlab/generate-ci/flake.nix - + .gitlab/generate-ci/gen_ci.hs - + .gitlab/generate-ci/generate-ci.cabal - + .gitlab/generate-ci/generate-job-metadata - + .gitlab/generate-ci/generate-jobs - .gitlab/hie.yaml → .gitlab/generate-ci/hie.yaml - − .gitlab/generate_job_metadata - − .gitlab/generate_jobs - − .gitlab/issue_templates/bug.md - + .gitlab/issue_templates/default.md The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4a5e86b2f7d612bb2bb7b819ff80ec2fd97602d3...0307980c8fcedefd150e1186dd31ebc6d96e9e92 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4a5e86b2f7d612bb2bb7b819ff80ec2fd97602d3...0307980c8fcedefd150e1186dd31ebc6d96e9e92 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 17:20:23 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 12 Nov 2024 12:20:23 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T19574 Message-ID: <67338e57e0b25_3e7095b23428864b1@gitlab.mail> Ben Gamari pushed new branch wip/T19574 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T19574 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 12 22:11:29 2024 From: gitlab at gitlab.haskell.org (Alan Zimmerman (@alanz)) Date: Tue, 12 Nov 2024 17:11:29 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/az/T25467-epa-semi-in-letstmt Message-ID: <6733d291cb7a4_21dfff58730c330bb@gitlab.mail> Alan Zimmerman pushed new branch wip/az/T25467-epa-semi-in-letstmt at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/az/T25467-epa-semi-in-letstmt You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 01:32:00 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Tue, 12 Nov 2024 20:32:00 -0500 Subject: [Git][ghc/ghc][ghc-9.12] 75 commits: EPA: Remove [AddEpAnn] from IE, Pat and some Tys Message-ID: <6734019094e02_1445bebc93031114@gitlab.mail> Zubin pushed to branch ghc-9.12 at Glasgow Haskell Compiler / GHC Commits: 128d1b18 by Alan Zimmerman at 2024-10-30T16:52:57+05:30 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy (cherry picked from commit e9cc469954eb19c5c131f9cfc1f0ede6ea9e9848) - - - - - bc19b10c by Alan Zimmerman at 2024-10-30T16:53:14+05:30 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl (cherry picked from commit 5f67db48bdef51905132d990cfaaa0df6532ea99) - - - - - 96090209 by Cheng Shao at 2024-10-30T16:53:30+05:30 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. (cherry picked from commit 525d451e175c7d6acfa968ce99d8d3fc7a8af0c7) - - - - - ba012ad5 by Cheng Shao at 2024-10-30T16:53:44+05:30 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. (cherry picked from commit 5bcfefd5bb73c18a9bad63d1813968832b696f9a) - - - - - cb003daf by Alan Zimmerman at 2024-10-30T16:54:21+05:30 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings (cherry picked from commit 25edf84977fa15b9911ecbdf614789893ad0e108) - - - - - ef8096d9 by Daan Rijks at 2024-10-30T16:55:36+05:30 Expand the haddocks for Control.Category (cherry picked from commit fbbbd010c5537480deaedc812a235311e13ef767) - - - - - 57c0c460 by Andrew Lelechenko at 2024-10-30T16:55:46+05:30 documentation: more examples for Control.Category (cherry picked from commit 076c1a104f55750a49de03694786180bd78eb9b6) - - - - - 30d12c46 by Cheng Shao at 2024-10-30T16:58:18+05:30 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. (cherry picked from commit 90891962ad4d2c781e68062de01e25eea999ae1b) (cherry picked from commit 860596329a85295277aa21854f4aeae2b755c36f) - - - - - d256f923 by Cheng Shao at 2024-10-30T16:58:18+05:30 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. (cherry picked from commit 839ac52e94f8ecf878e522dba0575466af248267) (cherry picked from commit 9723a703e3fb53383d4afb49d012f9de43c4235b) - - - - - 50d5feec by Cheng Shao at 2024-10-30T16:58:18+05:30 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. (cherry picked from commit a998f69d2de062b7290e78221d55e8c49bf95bbc) (cherry picked from commit f95de54149e66627079d42cfa0b5b70286a3aae7) - - - - - 647752c8 by Cheng Shao at 2024-10-30T16:58:18+05:30 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. (cherry picked from commit 71a471e7495f1fbf6b44cfbe4e930c99131c583e) (cherry picked from commit 1d5a2ff899d9c6905a216b24d5c4fc5d54654166) - - - - - 3218f014 by Cheng Shao at 2024-10-30T16:58:18+05:30 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. (cherry picked from commit 33d9db17f31f59ef72d6d8dac033a84c45d3c216) (cherry picked from commit 151017ca9483b77a83f0bde4eb20af490816e62a) - - - - - 68e780b5 by Cheng Shao at 2024-10-30T16:58:18+05:30 rts: correct stale link in comment (cherry picked from commit 0d0a16a81b3875c0e21c0bbe9659edc6312c4846) (cherry picked from commit dfb3988f3b6a96282cbf4e7edf95f15191dc8c36) - - - - - 6c08d83c by Cheng Shao at 2024-10-30T16:58:18+05:30 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. (cherry picked from commit 90a35c41bb676b5e68212f63b187d2c50439714c) (cherry picked from commit 21dff5baafd20d2a796896c47c243b2c877e2ad4) - - - - - 319d4a46 by Cheng Shao at 2024-10-30T16:58:18+05:30 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. (cherry picked from commit 98a32ec551dd95534c1a8eaccb0f67dbe5f19648) (cherry picked from commit 70f75b0defd8c1c7941581cd333ca198046c3d15) - - - - - 1fa9b36b by Cheng Shao at 2024-10-30T16:58:18+05:30 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. (cherry picked from commit bef94bde53f07a1b0d7eb16d3d0eb1bd62f5f992) (cherry picked from commit b9b1a3a95588218b8b823f3315adad0fb7c2ed0c) - - - - - 92eed1ed by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. (cherry picked from commit a6a82cdb7162f32a1b73a2a6224d6d9cd208962c) (cherry picked from commit 7e1f1b0778f581d2b72cfb533c65918b199e6247) - - - - - 355ac972 by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. (cherry picked from commit f232c872c6adf4472b5a1c88812c57aa2aa76cbe) (cherry picked from commit ce1387a065033fc1b85faa314be52f61a9057778) - - - - - af73ef6d by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. (cherry picked from commit 577c1819ab4eb3369cafdaf24114b74da21ce4b4) (cherry picked from commit 37b3d585e3f0f5c97a2ab375b8ac4ec9c3c17661) - - - - - dcd550ab by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. (cherry picked from commit c247f2eef9e8450837cbaad1668c6178d094a8fb) (cherry picked from commit 18e5383329ca4a4bfe3a63f828a4f74f94031550) - - - - - 3d6f16cb by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. (cherry picked from commit 775410fdfc5d6faf287eecdaae170af9f8a59bb9) (cherry picked from commit b537609f4f399538ee9e65df4f3442922693d487) - - - - - 4f4f378a by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. (cherry picked from commit b45080a3e34200767b76faca495f5aea95bb94f5) (cherry picked from commit c12980bf63c23bb1cbf3e3b3c27a4278a38f97d8) - - - - - f69cf2a5 by Cheng Shao at 2024-10-30T16:58:18+05:30 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. (cherry picked from commit 5043507ca32e31d14869a0a11dd317529f616fc2) (cherry picked from commit cbf0b2757b60313f356d701d0857cce44afe8b69) - - - - - 66c473f2 by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). (cherry picked from commit 2956a3f7ecd58a6fda81447100404941c0ed837d) (cherry picked from commit 00fef7bcd722c86b5b65d5189d47b9197b0c05a5) - - - - - cd124d94 by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. (cherry picked from commit 8c74a0eda41255ead134f05598f5da70992a7054) (cherry picked from commit 9d2e02f911f42ffc6934f189b1d30e95ec47cc49) - - - - - 2daf1ddd by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. (cherry picked from commit b4c3c34090088378870a6705d30665aac6d5c455) (cherry picked from commit 17386f368a72bba5ed5b3a831e9e9cb744c2f989) - - - - - 0ab21132 by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. (cherry picked from commit 3c21b696abc9acf375307eb91ccc678965487843) (cherry picked from commit 78600342635c931131ebcabb0fc6584fa44b6bbe) - - - - - 53187cb7 by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. (cherry picked from commit 93b8af8009a6e174b8d75f766dba2dc4d9aa9119) (cherry picked from commit 2741e5cf30ae2450b84a53b3b1ac6583ece7de2b) - - - - - b4431854 by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: bump T17572 timeout (cherry picked from commit 94673d419a8cdf71d722c93da9860ad8807657e7) (cherry picked from commit c5d97b796f6167d44501cb2ac69ef01432d38c3e) - - - - - 980adc2e by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: bump T22744 pre_cmd timeout (cherry picked from commit 2b5efc2d6b0b051ab0458ea0e2a2747b23190827) (cherry picked from commit e3f42443852f73504b3854737c94a32534b4b3db) - - - - - 2be13ac4 by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: skip terminfo_so for cross ghc (cherry picked from commit 45102e2ad39d95c06887be036722f793df236a04) (cherry picked from commit c93876ff7cd01344dc356d66eaf9f80f661660a9) - - - - - 908d6621 by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. (cherry picked from commit 05e40406709fd325476a0fec89488a500094ecec) (cherry picked from commit d00c26a51a23e4fb7bc7d5c44033b9ee3e4f9149) - - - - - bd769e85 by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. (cherry picked from commit fa68f83355ecca1f72f4593a1ed0422fa8fcb6a6) (cherry picked from commit aa49631399728d6e25625205eedf66d27dc152cb) - - - - - 1e80537e by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm (cherry picked from commit 1241c04e72107e1648f9aba5e857b48ec3bac96f) (cherry picked from commit 689c9267e758f3381a098ae5de120d84741fb2eb) - - - - - d5e9623d by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. (cherry picked from commit 78c8b90006ac4d0a4de4e72295f8a57de4b9beca) (cherry picked from commit 6d0cdeedc42d6571e1cd17b862f09e8027baeb75) - - - - - b83ceaf4 by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: skip rdynamic on wasm (cherry picked from commit 47989ecc6ddfbe68ba2213c6c2b0d29ed958c330) (cherry picked from commit e220adb3dd370bae29e1f741bf5b4088d79f2599) - - - - - 838e9839 by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. (cherry picked from commit fefb4ea1dee945ace173b63c808c593fc167803f) (cherry picked from commit 39d746e16e235889e39a6a8faefaef34522af89e) - - - - - cb100a9c by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm (cherry picked from commit 77c797625483be968bb51c1518020895ca5ecb11) (cherry picked from commit 990addfc8ec7a4f13ed52f435e4f203fe60ff39b) - - - - - 59a3f31a by Cheng Shao at 2024-10-30T16:58:18+05:30 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. (cherry picked from commit 69bb4745218d2d54c82e33fa529ccf9ba3819fac) (cherry picked from commit ddff197541d5974bd8067362a6828c2361c69c33) - - - - - 66a0442d by Cheng Shao at 2024-10-30T16:58:18+05:30 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. (cherry picked from commit 621c753dee540be65208d1fdcd1728ba9f2b4320) (cherry picked from commit 4d38dc40506057c5a3449b1841414ea8378a9f42) - - - - - cb8d1184 by Cheng Shao at 2024-10-30T16:58:18+05:30 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. (cherry picked from commit 80aa89831c18162ce5591400c41b4cd8f77db0e4) (cherry picked from commit 1b30373da385f2931f77443e56156089d6218dcc) - - - - - 752677dc by Cheng Shao at 2024-10-30T16:58:18+05:30 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. (cherry picked from commit 744114618678ed1eac7a699c738ffa3223d1b41a) (cherry picked from commit 762933824140e5af24ea27c998fdca699b7b8c53) - - - - - 49fe20a4 by Cheng Shao at 2024-10-30T16:58:18+05:30 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. (cherry picked from commit f6abaf13c527e372edea2d70f9c012da8624e27c) (cherry picked from commit 9834ac3b086c7489084edef8a81ce1155d739f30) - - - - - ccff9bc6 by Cheng Shao at 2024-10-30T16:58:18+05:30 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. (cherry picked from commit 9745fcfbffb6434bacdec69082739c9e0229c6f2) (cherry picked from commit 5c94cee60e631e4f5b2458377a1179cc5ad680db) - - - - - 724a9240 by Cheng Shao at 2024-10-30T16:58:18+05:30 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. (cherry picked from commit 649aae00c34014fcb64244de59961635563bf06a) (cherry picked from commit 55d8b48d125fc92c5e7679c0be6202d002f8e3c1) - - - - - cec1a8a3 by Cheng Shao at 2024-10-30T16:58:18+05:30 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. (cherry picked from commit 47baa9044a786ab04b6b68cf008f1254471c3cc1) (cherry picked from commit 1638d829e8c4c34d1a430799ea6c1a762bad9b38) - - - - - 46f944be by Cheng Shao at 2024-10-30T16:58:18+05:30 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. (cherry picked from commit fc3a55917e9c6c64765f11e0703853b9eed230fe) (cherry picked from commit ba24a6bd70c06c8e02a29cc4ca5a39488c9edfe5) - - - - - 01684c08 by Cheng Shao at 2024-10-30T16:58:18+05:30 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. (cherry picked from commit 94ef949ef8b52cebaf8d4a81d7a169e100da2a73) (cherry picked from commit 38474be061ff58bc725a90b0994669d1477fe24e) - - - - - 205b8af3 by Cheng Shao at 2024-10-30T16:58:18+05:30 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. (cherry picked from commit 88e992489e1574b471a55ff9ddace2c81a09ba63) (cherry picked from commit 50dc1ac1f9ad3ba62558346ef44759794508c863) - - - - - fdf17574 by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. (cherry picked from commit 549582eff80da6a8c5b7449755eaa726c208c324) (cherry picked from commit 5b545e3c9a2ca3bdf82cc24de92c1d977c8fff57) - - - - - 8e1d564d by Cheng Shao at 2024-10-30T16:58:18+05:30 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. (cherry picked from commit b562e3a6fab87422f40997f84b11a05505df2fcb) (cherry picked from commit d3510168869357f78527df9cc0fa0197c8c2016c) - - - - - e7d3bf92 by Cheng Shao at 2024-10-30T16:58:18+05:30 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. (cherry picked from commit 2d6107dc0e461f6d339ea14712b6f0cb9a619680) (cherry picked from commit c07205fc70e17ffb228ca17f0eb239f2c858fe94) - - - - - c20a5175 by Cheng Shao at 2024-10-30T16:58:18+05:30 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. (cherry picked from commit 61f5baa5bd6e8d0daa20af4dc7c3213a48f99019) (cherry picked from commit 9f8b78240c438fd8c32727f8cbce3ee644d517be) - - - - - 7608bc46 by Cheng Shao at 2024-10-30T16:58:18+05:30 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. (cherry picked from commit 652e72394b715abc931b1104a4b683bb16909695) (cherry picked from commit e11dc80550084af2ea8aeba96e8a2a8a67468c03) - - - - - 07832d18 by Cheng Shao at 2024-10-30T16:58:19+05:30 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. (cherry picked from commit 74a1f6818d1592ebceab8e0fbb6be1973f38fe78) (cherry picked from commit 2e63876a44236bc67af1aa0ed71db0acf6ac04a3) - - - - - 89adaa88 by Luite Stegeman at 2024-10-30T16:58:53+05:30 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 (cherry picked from commit d5f420450e86cedca819ca401b184917c6478c1a) - - - - - 35922587 by Alan Zimmerman at 2024-10-30T16:59:07+05:30 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl (cherry picked from commit 7f61ed4e6f3b4d5933fa699ec2fc9dbab8052f7e) - - - - - 744fda1b by Daneel Yaitskov at 2024-10-30T16:59:45+05:30 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> (cherry picked from commit a04959b8964c8d09897cfae1fd7b06ac53ebee95) - - - - - 6509bb40 by Andrzej Rybczak at 2024-10-30T17:00:07+05:30 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. (cherry picked from commit 148059fea534aced44649c739cd0fad4c25a99f0) - - - - - db954955 by Cheng Shao at 2024-10-30T17:00:18+05:30 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. (cherry picked from commit edc02197b95488e8752c988e0e92ed6253c04b8c) - - - - - 508eb2db by Rodrigo Mesquita at 2024-10-30T17:00:58+05:30 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 (cherry picked from commit b3f7fb80781bac756efdd7fdde836bf4742a75fc) - - - - - 16cb5517 by Rodrigo Mesquita at 2024-10-30T17:00:58+05:30 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. (cherry picked from commit e39c8c993c1da534c5893ca418d1fa4cbb9e0a0a) - - - - - 678794cd by Alan Zimmerman at 2024-10-30T17:01:12+05:30 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. (cherry picked from commit 7b1b0c6deab87bfc4d2b4ddfda40ed735c28cd53) - - - - - e66de62b by Rodrigo Mesquita at 2024-10-30T17:01:25+05:30 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 (cherry picked from commit 4a00731eda964ec551f920b0319b24db2073687c) - - - - - f082e86e by Simon Peyton Jones at 2024-10-30T17:01:36+05:30 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) (cherry picked from commit 23ddcc0102b3b0c31829a8f67003f4f00fb52f9a) - - - - - da4402b0 by Cheng Shao at 2024-10-30T17:02:27+05:30 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. (cherry picked from commit b1eed26f10645e8d918402b7fc29b07e0b294757) - - - - - d5390862 by Hassan Al-Awwadi at 2024-10-31T17:13:29+05:30 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> (cherry picked from commit 1587cccfe7c3c1db3ccc48437b47ccb6ae215701) - - - - - c580b505 by Cheng Shao at 2024-10-31T17:13:29+05:30 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. (cherry picked from commit e70009bc5b388ed02db12ee7a99bca0e4c283c87) - - - - - 7202e2ac by Andrew Lelechenko at 2024-10-31T17:13:29+05:30 hadrian: allow -Wunused-imports for text package (cherry picked from commit 90746a591919fc51a0ec9dec58d8f1c8397040e3) - - - - - 4595620a by Andrew Lelechenko at 2024-10-31T17:13:29+05:30 Bump text submodule to 2.1.2 (cherry picked from commit 853050c386ff8634b950204edf4c7f8d973f9a89) - - - - - ccd4f869 by Zubin Duggal at 2024-10-31T17:13:29+05:30 configure: Set release version to 9.12.0 instead of 9.12. This means our alphas will be properly named. - - - - - ec2f40b4 by Zubin Duggal at 2024-10-31T17:13:29+05:30 Bump binary submodule to 0.8.9.2 (cherry picked from commit 7199869a52ab45e8856658248bf807954d58cc20) - - - - - d2a10e25 by Ben Gamari at 2024-10-31T17:13:29+05:30 Bump process submodule to v1.6.25.0 (cherry picked from commit 18f532f3ed021fff9529f50da2006b8a8d8b1df7) - - - - - c0eb35df by Zubin Duggal at 2024-10-31T17:13:29+05:30 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 (cherry picked from commit a23d8e73166725b699af88a36e97c63b2a0ede25) - - - - - 8de7406f by Zubin Duggal at 2024-11-12T13:42:19+05:30 testsuite: allow metric increase for TcPlugin_RewritePerf this is an empty commit to allow this backports batch to be merged. Metric Increase: TcPlugin_RewritePerf - - - - - 30 changed files: - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - CODEOWNERS - compiler/GHC.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot - compiler/GHC/Core/Coercion/Opt.hs - compiler/GHC/Core/TyCo/Subst.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Driver/Config/CmmToAsm.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Doc.hs - compiler/GHC/Hs/Dump.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/Extension.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Syn/Type.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ca2b21c3429a5ff780cb6c58c33c171a3c0af82b...8de7406f00c8db25fe93a1e612b2ac258aed4d3d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ca2b21c3429a5ff780cb6c58c33c171a3c0af82b...8de7406f00c8db25fe93a1e612b2ac258aed4d3d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 07:34:55 2024 From: gitlab at gitlab.haskell.org (Sebastian Graf (@sgraf812)) Date: Wed, 13 Nov 2024 02:34:55 -0500 Subject: [Git][ghc/ghc][wip/T25439] 27 commits: Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <6734569f348e4_1445be34b3cfc737a0@gitlab.mail> Sebastian Graf pushed to branch wip/T25439 at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 46d93c08 by Sebastian Graf at 2024-11-13T08:34:42+01:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/38ec8053e3c6c86e3271e9eff8e3aa0ba94e5b02...46d93c08e65bbf30da53795bd87b65be93a3fcf2 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/38ec8053e3c6c86e3271e9eff8e3aa0ba94e5b02...46d93c08e65bbf30da53795bd87b65be93a3fcf2 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 09:38:24 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 13 Nov 2024 04:38:24 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 11 commits: configure: Check version number validity Message-ID: <6734738fc1834_3c6915e6d4880048@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - e8e0a74f by Cheng Shao at 2024-11-13T04:38:13-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 36a66281 by Cheng Shao at 2024-11-13T04:38:14-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - c008da42 by Alan Zimmerman at 2024-11-13T04:38:14-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - − distrib/cross-port - hadrian/bindist/config.mk.in - libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs - m4/fp_setup_project_version.m4 - rts/IOManager.c - rts/Updates.h - testsuite/tests/bytecode/T24634/Makefile - testsuite/tests/bytecode/T25090/Makefile - testsuite/tests/driver/Makefile - testsuite/tests/driver/boot-target/Makefile - testsuite/tests/driver/fat-iface/Makefile - testsuite/tests/linters/Makefile - testsuite/tests/linters/regex-linters/check-cpp.py - testsuite/tests/linters/regex-linters/linter.py - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/perf/compiler/Makefile The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f0d185f80ecee7d767bd63089f32a66b0d330c15...c008da428280ff0be8067cac270cd3c6279b4a19 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f0d185f80ecee7d767bd63089f32a66b0d330c15...c008da428280ff0be8067cac270cd3c6279b4a19 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 13:48:47 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 13 Nov 2024 08:48:47 -0500 Subject: [Git][ghc/ghc][master] Remove obsolete cross-port script Message-ID: <6734ae3fc5d99_32d7bc1b150207698d@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 1 changed file: - − distrib/cross-port Changes: ===================================== distrib/cross-port deleted ===================================== @@ -1,75 +0,0 @@ -#!/usr/bin/env bash - -# This script can be used to generate some unregisterised .hc files -# for bootstrapping GHC on a new/unsupported platform. It involves a -# two-stage bootstrap: the first stage builds an unregisterised set of -# libraries & RTS, and the second stage builds an unregisterised -# compiler. - -# Take the .hc files from the libraries of stage 1, and the compiler -# of stage 2, to the target system and bootstrap from these to get a -# working (unregisterised) compiler. - -set -e - -base=`pwd` - -# set this to the location of your source tree -fptools_dir=$HOME/fptools - -if [ ! -f b1-stamp ]; then - mkdir b1 - cd b1 - lndir $fptools_dir - cd .. - - cd b1 - ./configure - - # For cross-compilation, at this stage you may want to set up a source - # tree on the target machine, run the configure script there, and bring - # the resulting rts/ghcautoconf.h.autoconf file back into this tree before building - # the libraries. - - touch mk/build.mk - echo "GhcUnregisterised = YES" >> mk/build.mk - echo "GhcLibHcOpts = -O -H32m -fvia-C -keep-hc-files" >> mk/build.mk - echo "GhcLibWays =" >> mk/build.mk - - # We could optimise slightly by not building hslibs here. Also, building - # the RTS is not necessary (and might not be desirable if we're using - # a ghcautoconf.h from the target system). - make stage1 - - cd .. - - touch b1-stamp -fi - -# exit 0 - -if [ ! -f b2-stamp ]; then - mkdir b2 - cd b2 - lndir $fptools_dir - cd .. - - cd b2 - ./configure --with-ghc=$base/b1/ghc/compiler/stage1/ghc-inplace - - touch mk/build.mk - # The bootstrapped compiler should probably generate unregisterised - # code too. If you don't want it to, then comment out this line: - echo "GhcUnregisterised = YES" >> mk/build.mk - echo "SRC_HC_OPTS += -keep-hc-file -fvia-C" >> mk/build.mk - echo "GhcWithInterpreter = NO" >> mk/build.mk - - # we just need to build the compiler and utils... - (cd glafp-utils && make boot && make) - (cd ghc && make boot) - (cd ghc/utils && make) - (cd ghc/compiler && make stage=1) - cd .. - - touch b2-stamp -fi View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/00d551bfac82d2974b09cf1c235dc56de49d257e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/00d551bfac82d2974b09cf1c235dc56de49d257e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 13:49:25 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 13 Nov 2024 08:49:25 -0500 Subject: [Git][ghc/ghc][master] hadrian: fix bindist makefile for wasm32-wasi target Message-ID: <6734ae654c285_32d7bc1cfc974797df@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 1 changed file: - hadrian/bindist/config.mk.in Changes: ===================================== hadrian/bindist/config.mk.in ===================================== @@ -147,8 +147,8 @@ endif # Whether to include GHCi in the compiler. Depends on whether the RTS linker # has support for this OS/ARCH combination. -OsSupportsGHCi=$(strip $(patsubst $(TargetOS_CPP), YES, $(findstring $(TargetOS_CPP), mingw32 linux solaris2 freebsd dragonfly netbsd openbsd darwin kfreebsdgnu))) -ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc powerpc64 powerpc64le sparc sparc64 arm aarch64 riscv64))) +OsSupportsGHCi=$(strip $(patsubst $(TargetOS_CPP), YES, $(findstring $(TargetOS_CPP), mingw32 linux solaris2 freebsd dragonfly netbsd openbsd darwin kfreebsdgnu wasi))) +ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc powerpc64 powerpc64le sparc sparc64 arm aarch64 riscv64 wasm32))) ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES" GhcWithInterpreter=YES View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/75a2eae4cab9ba94f7ba331f64a65fe3519f26dd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/75a2eae4cab9ba94f7ba331f64a65fe3519f26dd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 13:50:13 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 13 Nov 2024 08:50:13 -0500 Subject: [Git][ghc/ghc][master] EPA: Correctly capture leading semis in decl list Message-ID: <6734ae95c5907_32d7bc1debd9484333@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 7 changed files: - compiler/GHC/Parser.y - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/printer/Makefile - testsuite/tests/printer/Test20297.stdout - + testsuite/tests/printer/Test25467.hs - testsuite/tests/printer/all.T - utils/check-exact/Main.hs Changes: ===================================== compiler/GHC/Parser.y ===================================== @@ -1853,7 +1853,7 @@ where_inst :: { Located ((EpToken "where", (EpToken "{", EpToken "}", [EpToken " -- decls :: { Located (EpaLocation, [EpToken ";"], OrdList (LHsDecl GhcPs)) } : decls ';' decl {% if isNilOL (thdOf3 $ unLoc $1) - then return (sLL $1 $> (glEE $2 $3, (sndOf3 $ unLoc $1) ++ (msemiA $2) + then return (sLL $2 $> (glR $3, (sndOf3 $ unLoc $1) ++ (msemiA $2) , unitOL $3)) else case (thdOf3 $ unLoc $1) of SnocOL hs t -> do @@ -1862,7 +1862,7 @@ decls :: { Located (EpaLocation, [EpToken ";"], OrdList (LHsDecl GhcPs)) } rest = snocOL hs t'; these = rest `appOL` this } return (rest `seq` this `seq` these `seq` - (sLL $1 $> (glEE $1 $3, sndOf3 $ unLoc $1, these))) } + (sLL $1 $> (glEE (fstOf3 $ unLoc $1) $3, sndOf3 $ unLoc $1, these))) } | decls ';' {% if isNilOL (thdOf3 $ unLoc $1) then return (sLZ $1 $> (glR $2, (sndOf3 $ unLoc $1) ++ (msemiA $2) ,thdOf3 $ unLoc $1)) @@ -1876,7 +1876,7 @@ decls :: { Located (EpaLocation, [EpToken ";"], OrdList (LHsDecl GhcPs)) } decllist :: { Located (AnnList (),Located (OrdList (LHsDecl GhcPs))) } : '{' decls '}' { sLL $1 $> (AnnList (Just (fstOf3 $ unLoc $2)) (ListBraces (epTok $1) (epTok $3)) (sndOf3 $ unLoc $2) noAnn [] ,sL1 $2 $ thdOf3 $ unLoc $2) } - | vocurly decls close { L (getHasLoc $ fstOf3 $ unLoc $2) (AnnList (Just (glR $2)) ListNone (sndOf3 $ unLoc $2) noAnn [] + | vocurly decls close { sL1 $2 (AnnList (Just (fstOf3 $ unLoc $2)) ListNone (sndOf3 $ unLoc $2) noAnn [] ,sL1 $2 $ thdOf3 $ unLoc $2) } -- Binding groups other than those of class and instance declarations ===================================== testsuite/tests/parser/should_compile/DumpSemis.stderr ===================================== @@ -1971,7 +1971,7 @@ (EpaSpan { DumpSemis.hs:34:13-31 }) (AnnList (Just - (EpaSpan { DumpSemis.hs:34:14-30 })) + (EpaSpan { DumpSemis.hs:34:18-30 })) (ListBraces (EpTok (EpaSpan { DumpSemis.hs:34:13 })) (EpTok (EpaSpan { DumpSemis.hs:34:31 }))) ===================================== testsuite/tests/printer/Makefile ===================================== @@ -891,3 +891,8 @@ Test25132: Test25454: $(CHECK_PPR) $(LIBDIR) Test25454.hs $(CHECK_EXACT) $(LIBDIR) Test25454.hs + +.PHONY: Test25467 +Test25467: + $(CHECK_PPR) $(LIBDIR) Test25467.hs + $(CHECK_EXACT) $(LIBDIR) Test25467.hs ===================================== testsuite/tests/printer/Test20297.stdout ===================================== @@ -153,7 +153,7 @@ (EpaSpan { }) (AnnList (Just - (EpaSpan { })) + (EpaSpan { Test20297.hs:7:3-7 })) (ListNone) [] (EpTok @@ -582,7 +582,7 @@ (EpaSpan { }) (AnnList (Just - (EpaSpan { })) + (EpaSpan { Test20297.ppr.hs:5:3-7 })) (ListNone) [] (EpTok ===================================== testsuite/tests/printer/Test25467.hs ===================================== @@ -0,0 +1,21 @@ +module Test25467 where + +fff = do + let { + ; (a, b) = foo + } + pure () + +foo = do + let ;x =1 + +bar1 = do + let { + ; labels1 = getFieldLabels + ; argexprA = vhdlNameToVHDLExpr + } + +bar2 = do + let { + ; labels2 = getFieldLabels + } ===================================== testsuite/tests/printer/all.T ===================================== @@ -210,6 +210,7 @@ test('Test24753', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24753']) test('Test24771', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24771']) test('Test24159', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24159']) test('Test25132', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25132']) +test('Test25467', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25467']) test('T24237', normal, compile_fail, ['']) ===================================== utils/check-exact/Main.hs ===================================== @@ -213,10 +213,11 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/printer/Test16279.hs" Nothing -- "../../testsuite/tests/printer/HsDocTy.hs" Nothing -- "../../testsuite/tests/printer/Test21355.hs" Nothing --- "../../testsuite/tests/printer/Test22765.hs" Nothing + -- "../../testsuite/tests/printer/Test22765.hs" Nothing -- "../../testsuite/tests/printer/Test22771.hs" Nothing -- "../../testsuite/tests/printer/Test23465.hs" Nothing - "../../testsuite/tests/printer/Test25454.hs" Nothing + -- "../../testsuite/tests/printer/Test25454.hs" Nothing + "../../testsuite/tests/printer/Test25467.hs" Nothing -- cloneT does not need a test, function can be retired View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0614abef967c2ee9fb83955f18460715160a557a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0614abef967c2ee9fb83955f18460715160a557a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 13:50:50 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Wed, 13 Nov 2024 08:50:50 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/fix-wasm-dyld-finalization-registry Message-ID: <6734aeba900c_32d7bc1dde6948459d@gitlab.mail> Cheng Shao pushed new branch wip/fix-wasm-dyld-finalization-registry at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/fix-wasm-dyld-finalization-registry You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 14:32:49 2024 From: gitlab at gitlab.haskell.org (Ryan Scott (@RyanGlScott)) Date: Wed, 13 Nov 2024 09:32:49 -0500 Subject: [Git][ghc/ghc][wip/T16234] 138 commits: ghci: mitigate host/target word size mismatch in BCOByteArray serialization Message-ID: <6734b89113b49_32d7bc2371cc890413@gitlab.mail> Ryan Scott pushed to branch wip/T16234 at Glasgow Haskell Compiler / GHC Commits: 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 3024810c by Ryan Scott at 2024-11-13T14:32:42+00:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - 26 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - CODEOWNERS - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5f32d3bf0b6d0f2c11729efd85e5bf19fe05b5d9...3024810c136de313720a392c62773c09f292b8ea -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5f32d3bf0b6d0f2c11729efd85e5bf19fe05b5d9...3024810c136de313720a392c62773c09f292b8ea You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 15:12:17 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 10:12:17 -0500 Subject: [Git][ghc/ghc][wip/alpine-i386] 7788 commits: [haddock @ 2002-04-04 16:23:43 by simonmar] Message-ID: <6734c1d12b947_2a1b7a18badc9308f@gitlab.mail> Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC Commits: 2b39cd94 by Simon Marlow at 2002-04-04T16:23:43+00:00 [haddock @ 2002-04-04 16:23:43 by simonmar] This is Haddock, my stab at a Haskell documentation tool. It's not quite ready for release yet, but I'm putting it in the repository so others can take a look. It uses a locally modified version of the hssource parser, extended with support for GHC extensions and documentation annotations. - - - - - 99ede94f by Simon Marlow at 2002-04-04T16:24:10+00:00 [haddock @ 2002-04-04 16:24:10 by simonmar] forgot one file - - - - - 8363294c by Simon Marlow at 2002-04-05T13:58:15+00:00 [haddock @ 2002-04-05 13:58:15 by simonmar] Remap names in the exported declarations to be "closer" to the current module. eg. if an exported declaration mentions a type 'T' which is imported from module A then re-exported from the current module, then links from the type or indeed the documentation will point to the current module rather than module A. This is to support better hiding: module A won't be referred to in the generated output. - - - - - 1570cbc1 by Simon Marlow at 2002-04-05T13:58:23+00:00 [haddock @ 2002-04-05 13:58:23 by simonmar] update the TODO list - - - - - 3a62f96b by Simon Marlow at 2002-04-05T14:11:51+00:00 [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration - - - - - c5d9a471 by Simon Marlow at 2002-04-05T14:18:41+00:00 [haddock @ 2002-04-05 14:18:41 by simonmar] remove underlines on visited links - - - - - 97280525 by Simon Marlow at 2002-04-05T16:11:47+00:00 [haddock @ 2002-04-05 16:11:47 by simonmar] - Update to generate more correct HTML. - Use our own non-overloaded table combinators, as the overloaded versions were giving me a headache. The improved type safety caught several errors in the HTML generation. - - - - - 9acd3a4d by Simon Marlow at 2002-04-05T16:32:19+00:00 [haddock @ 2002-04-05 16:32:19 by simonmar] Add width property to the title, and add TD.children for the module contents page. - - - - - ec9a0847 by Simon Marlow at 2002-04-08T16:39:56+00:00 [haddock @ 2002-04-08 16:39:56 by simonmar] Fix a problem with exports of the form T(..). - - - - - e4627dc8 by Simon Marlow at 2002-04-08T16:41:38+00:00 [haddock @ 2002-04-08 16:41:37 by simonmar] - Add our own versions of Html & BlockTable for the time being. - Add support for generating an index to the HTML backend - - - - - 2d73fd75 by Simon Marlow at 2002-04-09T11:23:24+00:00 [haddock @ 2002-04-09 11:23:24 by simonmar] Add '-- /' as a synonym for '-- |', for compatibility with IDoc. - - - - - 3675464e by Simon Marlow at 2002-04-09T11:33:55+00:00 [haddock @ 2002-04-09 11:33:54 by simonmar] - add the <...> syntax for marking up URLs in documentation - Make the output for data & class declarations more compact when there aren't any documentation annotations on the individual methods or constructors respectively. - - - - - 5077f5b1 by Simon Marlow at 2002-04-09T11:36:04+00:00 [haddock @ 2002-04-09 11:36:04 by simonmar] Update the TODO list - - - - - 9e83c54d by Simon Marlow at 2002-04-10T10:50:06+00:00 [haddock @ 2002-04-10 10:50:06 by simonmar] Use explicit 'px' suffix on pixel sizes; IE seems to prefer them - - - - - 052de51c by Simon Marlow at 2002-04-10T13:23:13+00:00 [haddock @ 2002-04-10 13:23:13 by simonmar] Lex URLs as a single token to avoid having to escape special characters inside the URL string. - - - - - 47187edb by Simon Marlow at 2002-04-10T13:23:55+00:00 [haddock @ 2002-04-10 13:23:55 by simonmar] Not sure why I made the constructor name for a record declaration into a TyCls name, but change it back into a Var name anyhow. - - - - - 3dc6aa81 by Simon Marlow at 2002-04-10T13:26:10+00:00 [haddock @ 2002-04-10 13:26:09 by simonmar] Lots of changes, including: - add index support to the HTML backend - clean up the renamer, put it into a monad - propogate unresolved names to the top level and report them in a nicer way - various bugfixes - - - - - c2a70a72 by Simon Marlow at 2002-04-10T13:32:39+00:00 [haddock @ 2002-04-10 13:32:39 by simonmar] Skeleton documentation - - - - - 50c98d17 by Simon Marlow at 2002-04-10T13:37:23+00:00 [haddock @ 2002-04-10 13:37:23 by simonmar] Update the TODO list, separate into pre-1.0 and post-1.0 items - - - - - f3778be6 by Simon Marlow at 2002-04-10T14:30:58+00:00 [haddock @ 2002-04-10 14:30:58 by simonmar] Add an introduction - - - - - cfbaf9f7 by Simon Marlow at 2002-04-10T14:59:51+00:00 [haddock @ 2002-04-10 14:59:51 by simonmar] Sort the module tree - - - - - 76bd7b34 by Simon Marlow at 2002-04-10T15:50:11+00:00 [haddock @ 2002-04-10 15:50:10 by simonmar] Generate a little table of contents at the top of the module doc (only if the module actually contains some section headings, though). - - - - - bb8560a1 by Simon Marlow at 2002-04-10T16:10:26+00:00 [haddock @ 2002-04-10 16:10:26 by simonmar] Now we understand (or at least don't barf on) type signatures in patterns such as you might find when scoped type variables are in use. - - - - - 86c2a026 by Simon Marlow at 2002-04-10T16:10:49+00:00 [haddock @ 2002-04-10 16:10:49 by simonmar] more updates - - - - - 1c052b0e by Simon Marlow at 2002-04-10T16:28:05+00:00 [haddock @ 2002-04-10 16:28:05 by simonmar] Parse errors in doc strings are now reported as warnings rather that causing the whole thing to fall over. It still needs cleaning up (the warning is emitted with trace) but this will do for the time being. - - - - - ace03e8f by Simon Marlow at 2002-04-10T16:38:03+00:00 [haddock @ 2002-04-10 16:38:03 by simonmar] update again - - - - - 69006c3e by Simon Marlow at 2002-04-11T13:38:02+00:00 [haddock @ 2002-04-11 13:38:02 by simonmar] mention Opera - - - - - fe9b10f8 by Simon Marlow at 2002-04-11T13:40:31+00:00 [haddock @ 2002-04-11 13:40:30 by simonmar] - copy haddock.css into the same place as the generated HTML - new option: --css <file> specifies the style sheet to use - new option: -o <dir> specifies the directory in which to generate the output. - because Haddock now needs to know where to find its default stylesheet, we have to have a wrapper script and do the haddock-inplace thing (Makefile code copied largely from fptools/happy). - - - - - 106adbbe by Simon Marlow at 2002-04-24T15:12:41+00:00 [haddock @ 2002-04-24 15:12:41 by simonmar] Stop slurping comment lines when we see a row of dashes longer than length 2: these are useful as separators. - - - - - 995d3f9e by Simon Marlow at 2002-04-24T15:14:12+00:00 [haddock @ 2002-04-24 15:14:11 by simonmar] Grok the kind of module headers we use in fptools/libraries, and pass the "portability", "stability", and "maintainer" strings through into the generated HTML. If the module header doesn't match the pattern, then we don't include the info in the HTML. - - - - - e14da136 by Simon Marlow at 2002-04-24T15:16:57+00:00 [haddock @ 2002-04-24 15:16:57 by simonmar] Done module headers now. - - - - - 2ca8dfd4 by Simon Marlow at 2002-04-24T15:57:48+00:00 [haddock @ 2002-04-24 15:57:47 by simonmar] Handle gcons in export lists (a common extension). - - - - - 044cea81 by Simon Marlow at 2002-04-25T14:20:12+00:00 [haddock @ 2002-04-25 14:20:12 by simonmar] Add the little lambda icon - - - - - 63955027 by Simon Marlow at 2002-04-25T14:40:05+00:00 [haddock @ 2002-04-25 14:40:05 by simonmar] - Add support for named chunks of documentation which can be referenced from the export list. - Copy the icon from $libdir to the destination in HTML mode. - - - - - 36e3f913 by Simon Marlow at 2002-04-25T16:48:36+00:00 [haddock @ 2002-04-25 16:48:36 by simonmar] More keyboard bashing - - - - - 7ae18dd0 by Simon Marlow at 2002-04-26T08:43:33+00:00 [haddock @ 2002-04-26 08:43:33 by simonmar] Package util reqd. to compile with 4.08.2 - - - - - bbd5fbab by Simon Marlow at 2002-04-26T10:13:00+00:00 [haddock @ 2002-04-26 10:13:00 by simonmar] Include $(GHC_HAPPY_OPTS) when compiling HsParser - - - - - 31c53d79 by Simon Marlow at 2002-04-26T11:18:57+00:00 [haddock @ 2002-04-26 11:18:56 by simonmar] - support for fundeps (partially contributed by Brett Letner - thanks Brett). - make it build with GHC 4.08.2 - - - - - c415ce76 by Simon Marlow at 2002-04-26T13:15:02+00:00 [haddock @ 2002-04-26 13:15:02 by simonmar] Move the explicit formatting of the little table for the stability/portability/maintainer info from the HTML into the CSS, and remove the explicit table size (just right-align it). - - - - - 520ee21a by Simon Marlow at 2002-04-26T16:01:44+00:00 [haddock @ 2002-04-26 16:01:44 by simonmar] Yet more keyboard bashing - this is pretty much complete now. - - - - - 2ae37179 by Simon Marlow at 2002-04-26T16:02:14+00:00 [haddock @ 2002-04-26 16:02:14 by simonmar] Add a couple of things I forgot about - - - - - b7211e04 by Simon Marlow at 2002-04-29T15:28:12+00:00 [haddock @ 2002-04-29 15:28:12 by simonmar] bugfix for declBinders on a NewTypeDecl - - - - - 640c154a by Simon Marlow at 2002-04-29T15:28:54+00:00 [haddock @ 2002-04-29 15:28:54 by simonmar] Allow '-- |' style annotations on constructors and record fields. - - - - - 393f258a by Simon Marlow at 2002-04-29T15:37:32+00:00 [haddock @ 2002-04-29 15:37:32 by simonmar] syntax fix - - - - - 8a2c2549 by Simon Marlow at 2002-04-29T15:37:48+00:00 [haddock @ 2002-04-29 15:37:48 by simonmar] Add an example - - - - - db88f8a2 by Simon Marlow at 2002-04-29T15:55:46+00:00 [haddock @ 2002-04-29 15:55:46 by simonmar] remove a trace - - - - - 2b0248e0 by Simon Marlow at 2002-04-29T15:56:19+00:00 [haddock @ 2002-04-29 15:56:19 by simonmar] Fix for 'make install' - - - - - 120453a0 by Simon Marlow at 2002-04-29T15:56:39+00:00 [haddock @ 2002-04-29 15:56:39 by simonmar] Install the auxilliary bits - - - - - 950e6dbb by Simon Marlow at 2002-04-29T15:57:30+00:00 [haddock @ 2002-04-29 15:57:30 by simonmar] Add BinDist bits - - - - - 154b9d71 by Simon Marlow at 2002-05-01T11:02:52+00:00 [haddock @ 2002-05-01 11:02:52 by simonmar] update - - - - - ba6c39fa by Simon Marlow at 2002-05-01T11:03:26+00:00 [haddock @ 2002-05-01 11:03:26 by simonmar] Add another item - - - - - bacb5e33 by Simon Marlow at 2002-05-03T08:50:00+00:00 [haddock @ 2002-05-03 08:50:00 by simonmar] Fix some typos. - - - - - 54c87895 by Sven Panne at 2002-05-05T19:40:51+00:00 [haddock @ 2002-05-05 19:40:51 by panne] As a temporary hack/workaround for a bug in GHC's simplifier, don't pass Happy the -c option for generating the parsers in this subdir. Furthermore, disable -O for HaddocParse, too. - - - - - e6c08703 by Simon Marlow at 2002-05-06T09:51:10+00:00 [haddock @ 2002-05-06 09:51:10 by simonmar] Add RPM spec file (thanks to Tom Moertel <tom-rpms at moertel.com>) - - - - - 7b8fa8e7 by Simon Marlow at 2002-05-06T12:29:26+00:00 [haddock @ 2002-05-06 12:29:26 by simonmar] Add missing type signature (a different workaround for the bug in GHC's simplifier). - - - - - cd0e300d by Simon Marlow at 2002-05-06T12:30:09+00:00 [haddock @ 2002-05-06 12:30:09 by simonmar] Remove workaround for simplifier bug in previous revision. - - - - - 687e68fa by Simon Marlow at 2002-05-06T12:32:32+00:00 [haddock @ 2002-05-06 12:32:32 by simonmar] Allow empty data declarations (another GHC extension). - - - - - 8f29f696 by Simon Marlow at 2002-05-06T12:49:21+00:00 [haddock @ 2002-05-06 12:49:21 by simonmar] Fix silly bug in named documentation block lookup. - - - - - 8e0059af by Simon Marlow at 2002-05-06T13:02:42+00:00 [haddock @ 2002-05-06 13:02:42 by simonmar] Add another named chunk with a different name - - - - - 68f8a896 by Simon Marlow at 2002-05-06T13:32:32+00:00 [haddock @ 2002-05-06 13:32:32 by simonmar] Be more lenient about extra paragraph breaks - - - - - 65fc31db by Simon Marlow at 2002-05-07T15:36:36+00:00 [haddock @ 2002-05-07 15:36:36 by simonmar] DocEmpty is a right and left-unit of DocAppend (remove it in the smart constructor). - - - - - adc81078 by Simon Marlow at 2002-05-07T15:37:15+00:00 [haddock @ 2002-05-07 15:37:15 by simonmar] Allow code blocks to be denoted with bird-tracks in addition to [...]. - - - - - 1283a3c1 by Simon Marlow at 2002-05-08T11:21:56+00:00 [haddock @ 2002-05-08 11:21:56 by simonmar] Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak at cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace. - - - - - a2239cf5 by Simon Marlow at 2002-05-08T11:22:30+00:00 [haddock @ 2002-05-08 11:22:30 by simonmar] Update to test new features. - - - - - 6add955f by Simon Marlow at 2002-05-08T13:37:25+00:00 [haddock @ 2002-05-08 13:37:25 by simonmar] Change the markup for typewriter-font from [...] to @... at . The reasoning is that the '@' symbol is much less likely to be needed than square brackets, and we don't want to have to escape square brackets in code fragments. This will be mildly painful in the short term, but it's better to get the change out of the way as early as possible. - - - - - cda06447 by Simon Marlow at 2002-05-08T13:39:56+00:00 [haddock @ 2002-05-08 13:39:56 by simonmar] Allow nested-style comments to be used as documentation annotations too. eg. {-| ... -} is equivalent to -- | ... An extra space can also be left after the comment opener: {- | ... -}. The only version that isn't allowed is {-# ... -}, because this syntax overlaps with Haskell pragmas; use {- # ... -} instead. - - - - - db23f65e by Simon Marlow at 2002-05-08T14:48:41+00:00 [haddock @ 2002-05-08 14:48:39 by simonmar] Add support for existential quantifiers on constructors. - - - - - adce3794 by Simon Marlow at 2002-05-08T15:43:25+00:00 [haddock @ 2002-05-08 15:43:25 by simonmar] update - - - - - 62a1f436 by Simon Marlow at 2002-05-08T15:44:10+00:00 [haddock @ 2002-05-08 15:44:10 by simonmar] Update to version 0.2 - - - - - f6a24ba3 by Simon Marlow at 2002-05-09T08:48:29+00:00 [haddock @ 2002-05-09 08:48:29 by simonmar] typo - - - - - 9f9522a4 by Simon Marlow at 2002-05-09T10:33:14+00:00 [haddock @ 2002-05-09 10:33:14 by simonmar] oops, left out '/' from the special characters in the last change. - - - - - 14abcb39 by Simon Marlow at 2002-05-09T10:34:44+00:00 [haddock @ 2002-05-09 10:34:44 by simonmar] Fix buglet - - - - - b8d878be by Simon Marlow at 2002-05-09T10:35:00+00:00 [haddock @ 2002-05-09 10:35:00 by simonmar] Give a more useful instance of Show for Module. - - - - - f7bfd626 by Simon Marlow at 2002-05-09T10:37:07+00:00 [haddock @ 2002-05-09 10:37:07 by simonmar] The last commit to Main.lhs broke the delicate balance of laziness which was being used to avoid computing the dependency graph of modules. So I finally bit the bullet and did a proper topological sort of the module graph, which turned out to be easy (stealing the Digraph module from GHC - this really ought to be in the libraries somewhere). - - - - - b481c1d0 by Simon Marlow at 2002-05-09T10:37:25+00:00 [haddock @ 2002-05-09 10:37:25 by simonmar] another item done - - - - - 032e2b42 by Simon Marlow at 2002-05-09T10:44:15+00:00 [haddock @ 2002-05-09 10:44:15 by simonmar] Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not. - - - - - 5fb45e92 by Simon Marlow at 2002-05-09T11:10:55+00:00 [haddock @ 2002-05-09 11:10:55 by simonmar] Add a special case for list types in ppHsAType - - - - - 1937e428 by Simon Marlow at 2002-05-09T12:43:06+00:00 [haddock @ 2002-05-09 12:43:06 by simonmar] Type synonyms can accept a ctype on the RHS, to match GHC. - - - - - 0f16ce56 by Simon Marlow at 2002-05-09T12:45:19+00:00 [haddock @ 2002-05-09 12:45:19 by simonmar] Add 'stdcall' keyword - - - - - 29b0d7d2 by Simon Marlow at 2002-05-09T13:35:45+00:00 [haddock @ 2002-05-09 13:35:45 by simonmar] Add System Requirements section - - - - - bf14dddd by Simon Marlow at 2002-05-09T13:36:11+00:00 [haddock @ 2002-05-09 13:36:11 by simonmar] Test existential types, amongst other things - - - - - 502f8f6f by Simon Marlow at 2002-05-09T13:37:35+00:00 [haddock @ 2002-05-09 13:37:35 by simonmar] Print the module name in a doc-string parse error - - - - - ca1f8d49 by Simon Marlow at 2002-05-09T13:38:04+00:00 [haddock @ 2002-05-09 13:38:04 by simonmar] Add dependency - - - - - 8d3d91ff by Simon Marlow at 2002-05-09T15:37:57+00:00 [haddock @ 2002-05-09 15:37:57 by simonmar] Add the changelog/release notes - - - - - f3960959 by Simon Marlow at 2002-05-09T15:47:47+00:00 [haddock @ 2002-05-09 15:47:47 by simonmar] mention the backquote-style of markup - - - - - 089fb6e6 by Simon Marlow at 2002-05-09T15:59:45+00:00 [haddock @ 2002-05-09 15:59:45 by simonmar] update - - - - - bdd3be0b by Simon Marlow at 2002-05-09T15:59:56+00:00 [haddock @ 2002-05-09 15:59:56 by simonmar] Document changes since 0.1 - - - - - 00fc4af8 by Simon Marlow at 2002-05-10T08:22:48+00:00 [haddock @ 2002-05-10 08:22:48 by simonmar] oops, update to version 0.2 - - - - - a8a79041 by Simon Marlow at 2002-05-10T16:05:08+00:00 [haddock @ 2002-05-10 16:05:08 by simonmar] Only include a mini-contents if there are 2 or more sections - - - - - 06653319 by Simon Marlow at 2002-05-13T09:13:12+00:00 [haddock @ 2002-05-13 09:13:12 by simonmar] fix typos - - - - - 1402b19b by Simon Marlow at 2002-05-13T10:14:22+00:00 [haddock @ 2002-05-13 10:14:22 by simonmar] Allow backquote as the right-hand quote as well as the left-hand quote, as suggested by Dean Herrington. Clean up the grammar a litte. - - - - - dcd5320d by Simon Marlow at 2002-05-13T10:44:10+00:00 [haddock @ 2002-05-13 10:44:10 by simonmar] a couple more things, prioritise a bit - - - - - a90130c4 by Simon Marlow at 2002-05-13T15:19:03+00:00 [haddock @ 2002-05-13 15:19:03 by simonmar] Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs). - - - - - a774d432 by Simon Marlow at 2002-05-13T15:20:54+00:00 [haddock @ 2002-05-13 15:20:54 by simonmar] Fix one of the record examples - - - - - 2d1d5218 by Simon Marlow at 2002-05-15T12:44:35+00:00 [haddock @ 2002-05-15 12:44:35 by simonmar] Preserve the newline before a bird-track, but only within a paragraph. - - - - - 1554c09a by Simon Marlow at 2002-05-15T13:03:02+00:00 [haddock @ 2002-05-15 13:03:01 by simonmar] Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed. - - - - - 57344dc3 by Simon Marlow at 2002-05-15T13:03:19+00:00 [haddock @ 2002-05-15 13:03:19 by simonmar] Bump to version 0.3 - - - - - b2791812 by Simon Marlow at 2002-05-15T13:03:41+00:00 [haddock @ 2002-05-15 13:03:41 by simonmar] update - - - - - fead183e by Simon Marlow at 2002-05-15T13:10:15+00:00 [haddock @ 2002-05-15 13:10:15 by simonmar] Rename Foo.hs to Test.hs, and add a Makefile - - - - - b0b1f89f by Simon Marlow at 2002-05-15T13:16:07+00:00 [haddock @ 2002-05-15 13:16:07 by simonmar] - Remove the note about function argument docs not being implemented - Note that qualified identifiers can be used to point to entities that aren't in scope. - - - - - 5665f31a by Simon Marlow at 2002-05-15T13:28:46+00:00 [haddock @ 2002-05-15 13:28:46 by simonmar] Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson. - - - - - 0564505d by Simon Marlow at 2002-05-17T10:51:57+00:00 [haddock @ 2002-05-17 10:51:57 by simonmar] Fix bugs in qualified name handling (A.B.f was returned as B.f) - - - - - 10e7311c by Simon Marlow at 2002-05-21T10:24:52+00:00 [haddock @ 2002-05-21 10:24:52 by simonmar] - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation - - - - - 2f91c2a6 by Simon Marlow at 2002-05-21T10:27:40+00:00 [haddock @ 2002-05-21 10:27:40 by simonmar] add a few more test cases - - - - - 01c2ddd2 by Simon Marlow at 2002-05-21T10:28:33+00:00 [haddock @ 2002-05-21 10:28:33 by simonmar] Rearrange a bit, and add support for tabular datatype rendering - - - - - a4e4c5f8 by Simon Marlow at 2002-05-27T09:03:52+00:00 [haddock @ 2002-05-27 09:03:51 by simonmar] Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others) - - - - - 48722e68 by Simon Marlow at 2002-05-27T12:30:38+00:00 [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. - - - - - 657204d2 by Simon Marlow at 2002-05-27T13:19:49+00:00 [haddock @ 2002-05-27 13:19:49 by simonmar] Fix bug: we weren't renaming HsDocCommentNamed in renameDecl - - - - - 592aae66 by Simon Marlow at 2002-05-27T14:10:27+00:00 [haddock @ 2002-05-27 14:10:27 by simonmar] Fix some bugs in the rendering of qualified type signatures. - - - - - 69c8f763 by Simon Marlow at 2002-05-27T14:36:45+00:00 [haddock @ 2002-05-27 14:36:45 by simonmar] warning message tweak - - - - - 16e64e21 by Simon Marlow at 2002-05-27T14:53:53+00:00 [haddock @ 2002-05-27 14:53:53 by simonmar] hyperlinked identifiers should be in <tt> - - - - - 8d5e4783 by Simon Marlow at 2002-05-27T15:56:45+00:00 [haddock @ 2002-05-27 15:56:45 by simonmar] Do something sensible for modules which don't export anything (except instances). - - - - - 9d3ef811 by Simon Marlow at 2002-05-28T10:12:50+00:00 [haddock @ 2002-05-28 10:12:50 by simonmar] Rename the module documentation properly (bug reported by Sven Panne). - - - - - ef03a1cc by Simon Marlow at 2002-05-28T10:13:04+00:00 [haddock @ 2002-05-28 10:13:04 by simonmar] Add some more test cases - - - - - 92baa0e8 by Simon Marlow at 2002-05-28T11:17:55+00:00 [haddock @ 2002-05-28 11:17:55 by simonmar] If an identifier doesn't lex, then just replace it by a DocString. - - - - - a3156213 by Simon Marlow at 2002-05-28T16:16:19+00:00 [haddock @ 2002-05-28 16:16:19 by simonmar] Only link to names in the current module which are actually listed in the documentation. A name may be exported but not present in the documentation if it is exported as part of a 'module M' export specifier. - - - - - 31acf941 by Simon Marlow at 2002-05-28T16:17:11+00:00 [haddock @ 2002-05-28 16:17:11 by simonmar] update - - - - - 7e474ebf by Sigbjorn Finne at 2002-05-28T22:42:08+00:00 [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] - - - - - 093f7e53 by Simon Marlow at 2002-05-29T09:09:49+00:00 [haddock @ 2002-05-29 09:09:49 by simonmar] Back out previous change until we can find a better way to do this. - - - - - 9234389c by Simon Marlow at 2002-05-29T13:19:06+00:00 [haddock @ 2002-05-29 13:19:06 by simonmar] Make the markup syntax a little more friendly: - single quotes are now interpreted literally unless they surround a valid Haskell identifier. So for example now there's no need to escape a single quote used as an apostrophe. - text to the right of a bird track is now literal (if you want marked-up text in a code block, use @...@). - - - - - b3333526 by Simon Marlow at 2002-05-29T13:38:51+00:00 [haddock @ 2002-05-29 13:38:51 by simonmar] Document recent changes to markup syntax - - - - - f93641d6 by Simon Marlow at 2002-05-29T15:27:18+00:00 [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too - - - - - 613f21e3 by Simon Marlow at 2002-06-03T13:05:58+00:00 [haddock @ 2002-06-03 13:05:57 by simonmar] Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case). - - - - - 14b36807 by Simon Marlow at 2002-06-03T13:20:00+00:00 [haddock @ 2002-06-03 13:20:00 by simonmar] Fix linking to qualified names again (thanks to Sven Panne for pointing out the bug). - - - - - 95b10eac by Simon Marlow at 2002-06-03T13:46:48+00:00 [haddock @ 2002-06-03 13:46:48 by simonmar] Fix for exporting record selectors from a newtype declaration - - - - - 272f932e by Simon Marlow at 2002-06-03T13:56:38+00:00 [haddock @ 2002-06-03 13:56:38 by simonmar] update to version 0.3 - - - - - 1c0a3bed by Simon Marlow at 2002-06-03T14:05:07+00:00 [haddock @ 2002-06-03 14:05:07 by simonmar] Add changes in version 0.3 - - - - - 145b4626 by Simon Marlow at 2002-06-03T14:12:38+00:00 [haddock @ 2002-06-03 14:12:38 by simonmar] Render class names as proper binders - - - - - 052106b3 by Simon Marlow at 2002-06-03T14:15:10+00:00 [haddock @ 2002-06-03 14:15:10 by simonmar] update, and separate into bugs, features, and cosmetic items. - - - - - 854f4914 by Simon Marlow at 2002-06-03T14:16:13+00:00 [haddock @ 2002-06-03 14:16:13 by simonmar] More test cases - - - - - 466922c8 by Simon Marlow at 2002-06-03T14:16:56+00:00 [haddock @ 2002-06-03 14:16:56 by simonmar] Example from the paper - - - - - 9962a045 by Simon Marlow at 2002-06-03T14:17:49+00:00 [haddock @ 2002-06-03 14:17:49 by simonmar] A debugging version of the style-sheet, which gives some tables coloured backgrounds so we can see what's going on. - - - - - f16b79db by Simon Marlow at 2002-06-03T14:19:46+00:00 [haddock @ 2002-06-03 14:19:46 by simonmar] typo - - - - - 620db27b by Simon Marlow at 2002-06-03T14:48:32+00:00 [haddock @ 2002-06-03 14:48:32 by simonmar] oops, fix markup bugs - - - - - 53fd105c by Simon Marlow at 2002-06-05T09:05:07+00:00 [haddock @ 2002-06-05 09:05:07 by simonmar] Keep foreign imports when there is no export list (bug reported by Sven Panne). - - - - - 6d98989c by Simon Marlow at 2002-06-05T09:12:02+00:00 [haddock @ 2002-06-05 09:12:02 by simonmar] Identifiers in single quotes can be symbol names too (bug reported by Hal Daume). - - - - - 001811e5 by Sven Panne at 2002-06-08T14:03:36+00:00 [haddock @ 2002-06-08 14:03:36 by panne] Tiny workaround for the fact that Haddock currently ignores HsImportSpecs: Let the local_orig_env take precedence. This is no real solution at all, but improves things sometimes, e.g. in my GLUT documentation. :-) - - - - - 504d19c9 by Simon Marlow at 2002-06-11T09:23:25+00:00 [haddock @ 2002-06-11 09:23:25 by simonmar] portability nit - - - - - e13b5af4 by Simon Marlow at 2002-06-20T12:38:07+00:00 [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. - - - - - f467a9b6 by Simon Marlow at 2002-06-20T12:39:02+00:00 [haddock @ 2002-06-20 12:39:01 by simonmar] Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list. - - - - - b8dbfe20 by Simon Marlow at 2002-06-21T12:43:06+00:00 [haddock @ 2002-06-21 12:43:06 by simonmar] When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers. - - - - - 4831dbbd by Simon Marlow at 2002-06-21T15:50:42+00:00 [haddock @ 2002-06-21 15:50:42 by simonmar] Add support for reading and writing interface files(!) This turned out to be quite easy, and necessary to get decent hyperlinks between the documentation for separate packages in the libraries. The functionality isn't quite complete yet: for a given package of modules, you'd like to say "the HTML for these modules lives in directory <dir>" (currently they are assumed to be all in the same place). Two new flags: --dump-interface=FILE dump an interface file in FILE --read-interface=FILE read interface from FILE an interface file describes *all* the modules being processed. Only the exported names are kept in the interface: if you re-export a name from a module in another interface the signature won't be copied. This is a compromise to keep the size of the interfaces sensible. Also, I added another useful option: --no-implicit-prelude avoids trying to import the Prelude. Previously this was the default, but now importing the Prelude from elsewhere makes sense if you also read in an interface containing the Prelude module, so Haddock imports the Prelude implicitly according to the Haskell spec. - - - - - d3640a19 by Sven Panne at 2002-06-23T14:54:00+00:00 [haddock @ 2002-06-23 14:54:00 by panne] Make it compile with newer GHCs - - - - - 780c506b by Sven Panne at 2002-06-23T15:44:31+00:00 [haddock @ 2002-06-23 15:44:31 by panne] Cleaned up build root handling and added more docs - - - - - 45290d2e by Simon Marlow at 2002-06-24T14:37:43+00:00 [haddock @ 2002-06-24 14:37:42 by simonmar] When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface. - - - - - 4e2b9ae6 by Simon Marlow at 2002-07-03T16:01:08+00:00 [haddock @ 2002-07-03 16:01:07 by simonmar] Handle import specs properly, include 'hiding'. Haddock now has a complete implementation of the Haskell module system (more or less; I won't claim it's 100% correct). - - - - - 9a9aa1a8 by Simon Marlow at 2002-07-03T16:18:16+00:00 [haddock @ 2002-07-03 16:18:16 by simonmar] Update - - - - - 560c3026 by Simon Marlow at 2002-07-04T14:56:10+00:00 [haddock @ 2002-07-04 14:56:10 by simonmar] Clean up the code that constructs the exported declarations, and fix a couple of bugs along the way. Now if you import a class hiding one of the methods, then re-export the class, the version in the documentation will correctly have the appropriate method removed. - - - - - 2c26e77d by Simon Marlow at 2002-07-04T15:26:13+00:00 [haddock @ 2002-07-04 15:26:13 by simonmar] More bugfixes to the export handling - - - - - 03e0710d by Simon Marlow at 2002-07-09T10:12:10+00:00 [haddock @ 2002-07-09 10:12:10 by simonmar] Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base). - - - - - 44f3891a by Simon Marlow at 2002-07-09T10:12:51+00:00 [haddock @ 2002-07-09 10:12:51 by simonmar] commented-out debugging code - - - - - 97280873 by Krasimir Angelov at 2002-07-09T16:33:33+00:00 [haddock @ 2002-07-09 16:33:31 by krasimir] 'Microsoft HTML Help' support - - - - - 3dc04655 by Simon Marlow at 2002-07-10T09:40:56+00:00 [haddock @ 2002-07-10 09:40:56 by simonmar] Fix for rendering of the (->) type constructor, from Ross Paterson. - - - - - c9f149c6 by Simon Marlow at 2002-07-10T10:26:11+00:00 [haddock @ 2002-07-10 10:26:11 by simonmar] Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help). - - - - - e8acc1e6 by Simon Marlow at 2002-07-10T10:57:10+00:00 [haddock @ 2002-07-10 10:57:10 by simonmar] Document all the new options since 0.3 - - - - - 8bb85544 by Simon Marlow at 2002-07-10T10:58:31+00:00 [haddock @ 2002-07-10 10:58:31 by simonmar] Sort the options a bit - - - - - abc0dd59 by Simon Marlow at 2002-07-15T09:19:38+00:00 [haddock @ 2002-07-15 09:19:38 by simonmar] Fix a bug in mkExportItems when processing a module without an explicit export list. We were placing one copy of a declaration for each binder in the declaration, which for a data type would mean one copy of the whole declaration per constructor or record selector. - - - - - dde65bb9 by Simon Marlow at 2002-07-15T09:54:16+00:00 [haddock @ 2002-07-15 09:54:16 by simonmar] merge rev. 1.35 - - - - - bd7eb8c4 by Simon Marlow at 2002-07-15T10:14:31+00:00 [haddock @ 2002-07-15 10:14:30 by simonmar] Be a bit more liberal in the kind of commenting styles we allow, as suggested by Malcolm Wallace. Mostly this consists of allowing doc comments either side of a separator token. In an export list, a section heading is now allowed before the comma, as well as after it. eg. module M where ( T(..) -- * a section heading , f -- * another section heading , g ) In record fields, doc comments are allowed anywhere (previously a doc-next was allowed only after the comma, and a doc-before was allowed only before the comma). eg. data R = C { -- | describes 'f' f :: Int -- | describes 'g' , g :: Int } - - - - - 8f6dfe34 by Simon Marlow at 2002-07-15T10:21:56+00:00 [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. - - - - - fc515bb7 by Simon Marlow at 2002-07-15T16:16:50+00:00 [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). - - - - - 80a97e74 by Simon Marlow at 2002-07-19T09:13:10+00:00 [haddock @ 2002-07-19 09:13:10 by simonmar] Allow special id's ([], (), etc.) to be used in an import declaration. - - - - - a69d7378 by Simon Marlow at 2002-07-19T09:59:02+00:00 [haddock @ 2002-07-19 09:59:02 by simonmar] Allow special id's ([], (), etc.) to be used in an import declarations. - - - - - d205fa60 by Simon Marlow at 2002-07-19T10:00:16+00:00 [haddock @ 2002-07-19 10:00:16 by simonmar] Relax the restrictions which require doc comments to be followed by semi colons - in some cases this isn't necessary. Now you can write module M where { -- | some doc class C where {} } without needing to put a semicolon before the class declaration. - - - - - e9301e14 by Simon Marlow at 2002-07-23T08:24:09+00:00 [haddock @ 2002-07-23 08:24:09 by simonmar] A new TODO list item - - - - - e5d77586 by Simon Marlow at 2002-07-23T08:40:56+00:00 [haddock @ 2002-07-23 08:40:56 by simonmar] - update the acknowledgements - remove the paragraph that described how to use explicit layout with doc comments; it isn't relevant any more. - - - - - 78a94137 by Simon Marlow at 2002-07-23T08:43:02+00:00 [haddock @ 2002-07-23 08:43:02 by simonmar] more tests - - - - - 5c320927 by Simon Marlow at 2002-07-23T08:43:26+00:00 [haddock @ 2002-07-23 08:43:26 by simonmar] Updates for version 0.4 - - - - - 488e99ae by Simon Marlow at 2002-07-23T09:10:46+00:00 [haddock @ 2002-07-23 09:10:46 by simonmar] Fix the %changelog (rpm complained that it wasn't in the right order) - - - - - a77bb373 by Simon Marlow at 2002-07-23T09:12:38+00:00 [haddock @ 2002-07-23 09:12:38 by simonmar] Another item for the TODO list - - - - - f1ec1813 by Simon Marlow at 2002-07-23T10:18:46+00:00 [haddock @ 2002-07-23 10:18:46 by simonmar] Add a version banner when invoked with -v - - - - - 1d44cadf by Simon Marlow at 2002-07-24T09:28:19+00:00 [haddock @ 2002-07-24 09:28:19 by simonmar] Remove ^Ms - - - - - 4d8d5e94 by Simon Marlow at 2002-07-24T09:42:18+00:00 [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. - - - - - d6edc43e by Simon Marlow at 2002-07-25T14:37:29+00:00 [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. - - - - - b34d18fa by Simon Marlow at 2002-08-02T09:08:22+00:00 [haddock @ 2002-08-02 09:08:22 by simonmar] The <TT> and <PRE> environments seem to use a font that is a little too small in IE. Compensate. (suggestion from Daan Leijen). - - - - - 8106b086 by Simon Marlow at 2002-08-02T09:25:23+00:00 [haddock @ 2002-08-02 09:25:20 by simonmar] Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen). - - - - - c1acff8f by Simon Marlow at 2002-08-05T09:03:49+00:00 [haddock @ 2002-08-05 09:03:49 by simonmar] update - - - - - f968661c by Simon Marlow at 2002-11-11T09:32:57+00:00 [haddock @ 2002-11-11 09:32:57 by simonmar] Fix cut-n-pasto - - - - - 12d02619 by Simon Marlow at 2002-11-13T09:49:46+00:00 [haddock @ 2002-11-13 09:49:46 by simonmar] Small bugfix in the --read-interface option parsing from Brett Letner. - - - - - 30e32d5e by Ross Paterson at 2003-01-16T15:07:57+00:00 [haddock @ 2003-01-16 15:07:57 by ross] Adjust for the new exception libraries (as well as the old ones). - - - - - 871f65df by Sven Panne at 2003-02-20T21:31:40+00:00 [haddock @ 2003-02-20 21:31:40 by panne] * Add varsyms and consyms to index * Exclude empty entries from index - - - - - bc42cc87 by Sven Panne at 2003-02-24T21:26:29+00:00 [haddock @ 2003-02-24 21:26:29 by panne] Don't convert a "newtype" to a single-constructor "data" for non-abstractly exported types, they are quite different regarding strictness/pattern matching. Now a "data" without any constructors is only emitted for an abstractly exported type, regardless if it is actually a "newtype" or a "data". - - - - - 0c2a1d99 by Sven Panne at 2003-03-08T19:02:38+00:00 [haddock @ 2003-03-08 19:02:38 by panne] Fixed some broken/redirected/canonicalized links found by a very picky link checker. - - - - - 25459269 by Sven Panne at 2003-03-09T21:13:43+00:00 [haddock @ 2003-03-09 21:13:43 by panne] Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor. - - - - - 6be4db86 by Sven Panne at 2003-03-10T21:34:25+00:00 [haddock @ 2003-03-10 21:34:24 by panne] Escape fragments. This fixes e.g. links to operators. - - - - - eb12972c by Ross Paterson at 2003-04-25T10:50:06+00:00 [haddock @ 2003-04-25 10:50:05 by ross] An 80% solution to generating derived instances. A complete solution would duplicate the instance inference logic, but if a type variable occurs as a constructor argument, then we can just propagate the derived class to the variable. But we know nothing of the constraints on any type variables that occur elsewhere. For example, the declarations data Either a b = Left a | Right b deriving (Eq, Ord) data Ptr a = Ptr Addr# deriving (Eq, Ord) newtype IORef a = IORef (STRef RealWorld a) deriving Eq yield the instances (Eq a, Eq b) => Eq (Either a b) (Ord a, Ord b) => Ord (Either a b) Eq (Ptr a) Ord (Ptr a) (??? a) => Eq (IORef a) The last example shows the limits of this local analysis. Note that a type variable may be in both categories: then we know a constraint, but there may be more, or a stronger constraint, e.g. data Tree a = Node a [Tree a] deriving Eq yields (Eq a, ??? a) => Eq (Tree a) - - - - - de886f78 by Simon Marlow at 2003-04-25T11:17:55+00:00 [haddock @ 2003-04-25 11:17:55 by simonmar] Some updates, including moving the derived instance item down to the bottom of the list now that Ross has contributed some code that does the job for common cases. - - - - - 1b52cffd by Simon Marlow at 2003-04-30T14:02:32+00:00 [haddock @ 2003-04-30 14:02:32 by simonmar] When installing on Windows, run cygpath over $(HADDOCKLIB) so that haddock (a mingw program, built by GHC) can understand it. You still need to be in a cygwin environment to run Haddock, because of the shell script wrapper. - - - - - d4f638de by Simon Marlow at 2003-05-06T10:04:47+00:00 [haddock @ 2003-05-06 10:04:47 by simonmar] Catch another case of a paragraph containing just a DocMonospaced that should turn into a DocCodeBlock. - - - - - 4162b2b9 by Simon Marlow at 2003-05-06T10:11:44+00:00 [haddock @ 2003-05-06 10:11:44 by simonmar] Add some more code-block tests. - - - - - 4f5802c8 by Simon Marlow at 2003-05-06T10:14:52+00:00 [haddock @ 2003-05-06 10:14:52 by simonmar] Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code. - - - - - ef8c45f7 by Simon Marlow at 2003-05-21T15:07:21+00:00 [haddock @ 2003-05-21 15:07:21 by simonmar] Only omit the module contents when there are no section headings at all. - - - - - bcee1e75 by Sigbjorn Finne at 2003-05-30T16:50:45+00:00 [haddock @ 2003-05-30 16:50:45 by sof] cygpath: for now, steer clear of --mixed - - - - - 30567af3 by Sigbjorn Finne at 2003-05-30T17:59:28+00:00 [haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit - - - - - b0856e7d by Simon Marlow at 2003-06-03T09:55:26+00:00 [haddock @ 2003-06-03 09:55:26 by simonmar] Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems. - - - - - 70e137ea by Simon Marlow at 2003-07-28T13:30:35+00:00 [haddock @ 2003-07-28 13:30:35 by simonmar] Add tests for a couple of bugs. - - - - - 122bd578 by Simon Marlow at 2003-07-28T13:31:25+00:00 [haddock @ 2003-07-28 13:31:25 by simonmar] Add documentation for anchors. - - - - - 0bd27cb2 by Simon Marlow at 2003-07-28T13:31:46+00:00 [haddock @ 2003-07-28 13:31:46 by simonmar] Update - - - - - 08052d42 by Simon Marlow at 2003-07-28T13:32:12+00:00 [haddock @ 2003-07-28 13:32:12 by simonmar] layout tweak. - - - - - 13942749 by Simon Marlow at 2003-07-28T13:33:03+00:00 [haddock @ 2003-07-28 13:33:03 by simonmar] Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively). - - - - - d7f493b9 by Simon Marlow at 2003-07-28T13:35:17+00:00 [haddock @ 2003-07-28 13:35:16 by simonmar] When a module A exports another module's contents via 'module B', then modules which import entities from B re-exported by A should link to B.foo rather than A.foo. See examples/Bug2.hs. - - - - - d94cf705 by Simon Marlow at 2003-07-28T13:36:14+00:00 [haddock @ 2003-07-28 13:36:14 by simonmar] Update to version 0.5 - - - - - dbb776cd by Sven Panne at 2003-07-28T14:02:43+00:00 [haddock @ 2003-07-28 14:02:43 by panne] * Updated to version 0.5 * Automagically generate configure if it is not there - - - - - 6cfeee53 by Simon Marlow at 2003-07-28T14:32:43+00:00 [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 - - - - - a1ce838f by Simon Marlow at 2003-07-28T14:33:37+00:00 [haddock @ 2003-07-28 14:33:37 by simonmar] Update for 0.5 - - - - - c0fe6493 by Simon Marlow at 2003-07-28T14:53:22+00:00 [haddock @ 2003-07-28 14:53:22 by simonmar] Markup fix - - - - - 6ea31596 by Sven Panne at 2003-07-28T16:40:45+00:00 [haddock @ 2003-07-28 16:40:45 by panne] Make it compile with GHC >= 6.01 - - - - - afcd30fc by Simon Marlow at 2003-07-30T15:04:52+00:00 [haddock @ 2003-07-30 15:04:52 by simonmar] Pay attention to import specs when building the the import env, as well as the orig env. This may fix some wrong links in documentation when import specs are being used. - - - - - 17c3137f by Simon Marlow at 2003-07-30T16:05:41+00:00 [haddock @ 2003-07-30 16:05:40 by simonmar] Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup. - - - - - 3d3b5c87 by Sven Panne at 2003-08-04T10:18:24+00:00 [haddock @ 2003-08-04 10:18:24 by panne] Don't print parentheses around one-element contexts - - - - - 9e3f3f2d by Simon Marlow at 2003-08-04T12:59:47+00:00 [haddock @ 2003-08-04 12:59:47 by simonmar] A couple of TODOs. - - - - - e9d8085c by Simon Marlow at 2003-08-05T14:10:31+00:00 [haddock @ 2003-08-05 14:10:31 by simonmar] I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it. - - - - - ff5c7d6d by Simon Marlow at 2003-08-15T14:42:59+00:00 [haddock @ 2003-08-15 14:42:59 by simonmar] Convert the lexer to Alex, and fix a bug in the process. - - - - - 1aa077bf by Simon Marlow at 2003-08-15T15:00:18+00:00 [haddock @ 2003-08-15 15:00:18 by simonmar] Update - - - - - d3de1e38 by Simon Marlow at 2003-08-15T15:01:03+00:00 [haddock @ 2003-08-15 15:01:03 by simonmar] wibbles - - - - - b40ece3b by Simon Marlow at 2003-08-18T10:04:47+00:00 [haddock @ 2003-08-18 10:04:47 by simonmar] Lex the 'mdo' keyword as 'do'. - - - - - 8f9a1146 by Simon Marlow at 2003-08-18T11:48:24+00:00 [haddock @ 2003-08-18 11:48:24 by simonmar] Two bugs from Sven. - - - - - ea54ebc0 by Simon Marlow at 2003-08-18T11:48:46+00:00 [haddock @ 2003-08-18 11:48:46 by simonmar] Fixes to the new lexer. - - - - - d5f6a4b5 by Simon Marlow at 2003-08-19T09:09:03+00:00 [haddock @ 2003-08-19 09:09:03 by simonmar] Further wibbles to the syntax. - - - - - 6bbdadb7 by Sven Panne at 2003-08-26T18:45:35+00:00 [haddock @ 2003-08-26 18:45:35 by panne] Use autoreconf instead of autoconf - - - - - 32e889cb by Sven Panne at 2003-08-26T19:01:19+00:00 [haddock @ 2003-08-26 19:01:18 by panne] Made option handling a bit more consistent with other tools, in particular: Every program in fptools should output * version info on stdout and terminate successfully when -V or --version * usage info on stdout and terminate successfully when -? or --help * usage info on stderr and terminate unsuccessfully when an unknown option is given. - - - - - 5d156a91 by Sven Panne at 2003-08-26T19:20:55+00:00 [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag - - - - - e6577265 by Sven Panne at 2003-08-27T07:50:03+00:00 [haddock @ 2003-08-27 07:50:02 by panne] * Made -D a short option for --dump-interface. * Made -m a short option for --ms-help. * Made -n a short option for --no-implicit-prelude. * Made -c a short option for --css. * Removed DocBook options from executable (they didn't do anything), but mark them as reserved in the docs. Note that the short option for DocBook output is now -S (from SGML) instead of -d. The latter is now a short option for --debug. * The order of the Options in the documentation now matches the order printed by Haddock itself. Note: Although changing the names of options is often a bad idea, I'd really like to make the options for the programs in fptools more consistent and compatible to the ones used in common GNU programs. - - - - - d303ff98 by Simon Marlow at 2003-09-10T08:23:48+00:00 [haddock @ 2003-09-10 08:23:48 by simonmar] Add doc subdir. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 9a70e46a by Simon Marlow at 2003-09-10T08:24:32+00:00 [haddock @ 2003-09-10 08:24:32 by simonmar] Install these files in $(datadir), not $(libdir), since they're architecture independent. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - bbb87e7a by Simon Marlow at 2003-09-10T08:25:31+00:00 [haddock @ 2003-09-10 08:25:31 by simonmar] Haddock's supplementary HTML bits now live in $(datadir), not $(libdir). Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 3587c24b by Simon Marlow at 2003-09-22T10:34:38+00:00 [haddock @ 2003-09-22 10:34:38 by simonmar] Allow installing of docs. - - - - - d510b517 by Sven Panne at 2003-10-11T08:10:44+00:00 [haddock @ 2003-10-11 08:10:44 by panne] Include architecture-independent files in file list - - - - - 187d7618 by Sigbjorn Finne at 2003-10-20T17:19:24+00:00 [haddock @ 2003-10-20 17:19:22 by sof] support for i-parameters + zip comprehensions - - - - - b6c7a273 by Simon Marlow at 2003-11-03T14:24:24+00:00 [haddock @ 2003-11-03 14:24:24 by simonmar] Update TODO file. - - - - - 58513e33 by Simon Marlow at 2003-11-05T11:22:04+00:00 [haddock @ 2003-11-05 11:22:04 by simonmar] Remove the last of the uses of 'trace' to emit warnings, and tidy up a couple of places where duplicate warnings were being emitted. - - - - - 33a78846 by Simon Marlow at 2003-11-05T11:30:53+00:00 [haddock @ 2003-11-05 11:30:52 by simonmar] - Suppress warnings about unknown imported modules by default. - Add a -v/--verbose flag to re-enable these warnings. The general idea is to suppress the "Warning: unknown module: Prelude" warnings which most Haddock users will see every time, and which aren't terribly useful. - - - - - a969de7f by Simon Marlow at 2003-11-05T12:30:28+00:00 [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. - - - - - f14ea82a by Simon Marlow at 2003-11-05T15:15:59+00:00 [haddock @ 2003-11-05 15:15:59 by simonmar] Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this. - - - - - 01a25ca6 by Simon Marlow at 2003-11-05T15:16:38+00:00 [haddock @ 2003-11-05 15:16:38 by simonmar] Update - - - - - 1a7ccb86 by Simon Marlow at 2003-11-05T17:16:05+00:00 [haddock @ 2003-11-05 17:16:04 by simonmar] Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up. - - - - - a2bca16d by Simon Marlow at 2003-11-06T10:44:52+00:00 [haddock @ 2003-11-06 10:44:52 by simonmar] Include iface_reexported in the .haddock file. This unfortunately bloats the file (40% for base). If this gets to be a problem we can always apply the dictionary trick that GHC uses for squashing .hi files. - - - - - 0a09c293 by Simon Marlow at 2003-11-06T12:39:47+00:00 [haddock @ 2003-11-06 12:39:46 by simonmar] - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo at . -- -- [@bar@] The description of @bar at . Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added. - - - - - fe1b3460 by Simon Marlow at 2003-11-06T14:47:36+00:00 [haddock @ 2003-11-06 14:47:36 by simonmar] Remove the 'Parent' button - it is of dubious use, and often points into thin air. - - - - - db6d762f by Simon Marlow at 2003-11-06T16:48:14+00:00 [haddock @ 2003-11-06 16:48:11 by simonmar] - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page. - - - - - 7d71718b by Simon Marlow at 2003-11-06T16:50:28+00:00 [haddock @ 2003-11-06 16:50:28 by simonmar] Add -k/--package docs - - - - - ef43949d by Simon Marlow at 2003-11-06T16:51:23+00:00 [haddock @ 2003-11-06 16:51:23 by simonmar] Bump to 0.6 - - - - - 1c419e06 by Simon Marlow at 2003-11-06T16:51:50+00:00 [haddock @ 2003-11-06 16:51:50 by simonmar] update - - - - - 69422327 by Simon Marlow at 2003-11-10T14:41:06+00:00 [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. - - - - - 3c3fc433 by Simon Marlow at 2003-11-10T14:51:59+00:00 [haddock @ 2003-11-10 14:51:59 by simonmar] Fix for getReExports: take into account names which are not visible because they are re-exported from a different package. - - - - - 31c8437b by Simon Marlow at 2003-11-10T15:10:53+00:00 [haddock @ 2003-11-10 15:10:53 by simonmar] Version 0.6 changes - - - - - a7c2430b by Simon Marlow at 2003-11-10T15:15:58+00:00 [haddock @ 2003-11-10 15:15:58 by simonmar] getReExports: one error case that isn't - - - - - 00cc459c by Simon Marlow at 2003-11-10T16:15:19+00:00 [haddock @ 2003-11-10 16:15:18 by simonmar] copyright update - - - - - ca62408d by Simon Marlow at 2003-11-11T09:57:25+00:00 [haddock @ 2003-11-11 09:57:25 by simonmar] Version 0.6 - - - - - 3acbf818 by Simon Marlow at 2003-11-11T12:10:44+00:00 [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. - - - - - 6c90abc2 by Simon Marlow at 2003-11-12T10:03:39+00:00 [haddock @ 2003-11-12 10:03:39 by simonmar] 2002 -> 2003 - - - - - 090bbc4c by Simon Marlow at 2003-11-28T12:08:00+00:00 [haddock @ 2003-11-28 12:08:00 by simonmar] update - - - - - 8096a832 by Simon Marlow at 2003-11-28T12:09:58+00:00 [haddock @ 2003-11-28 12:09:58 by simonmar] Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it. - - - - - 35294929 by Sven Panne at 2003-12-29T17:16:31+00:00 [haddock @ 2003-12-29 17:16:31 by panne] Updated my email address - - - - - cdb697bf by Simon Marlow at 2004-01-08T10:14:24+00:00 [haddock @ 2004-01-08 10:14:24 by simonmar] Add instructions for using GHC to pre-process source for feeding to Haddock. - - - - - 8dfc491f by Simon Marlow at 2004-01-09T12:45:46+00:00 [haddock @ 2004-01-09 12:45:46 by simonmar] Add -optP-P to example ghc command line. - - - - - ac41b820 by Simon Marlow at 2004-02-03T11:02:03+00:00 [haddock @ 2004-02-03 11:02:03 by simonmar] Fix bug in index generation - - - - - f4e7edcb by Simon Marlow at 2004-02-10T11:51:16+00:00 [haddock @ 2004-02-10 11:51:16 by simonmar] Don't throw away whitespace at the beginning of a line (experimental fix). - - - - - 68e212d2 by Simon Marlow at 2004-02-10T12:10:08+00:00 [haddock @ 2004-02-10 12:10:08 by simonmar] Fix for previous commit: I now realise why the whitespace was stripped from the beginning of the line. Work around it. - - - - - e7d7f2df by Sven Panne at 2004-02-10T18:38:45+00:00 [haddock @ 2004-02-10 18:38:45 by panne] Make Haddock link with the latest relocated monad transformer package - - - - - 992d4225 by Simon Marlow at 2004-02-16T10:21:35+00:00 [haddock @ 2004-02-16 10:21:35 by simonmar] Add a TODO - - - - - 1ac55326 by Simon Marlow at 2004-03-12T11:33:39+00:00 [haddock @ 2004-03-12 11:33:39 by simonmar] Add an item. - - - - - 0478e903 by Simon Marlow at 2004-03-15T12:24:05+00:00 [haddock @ 2004-03-15 12:24:05 by simonmar] Add an item. - - - - - 6f26d21a by Simon Marlow at 2004-03-18T14:21:29+00:00 [haddock @ 2004-03-18 14:21:29 by simonmar] Fix URL - - - - - 19b6bb99 by Simon Marlow at 2004-03-22T14:09:03+00:00 [haddock @ 2004-03-22 14:09:03 by simonmar] getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me). - - - - - 5c756031 by Simon Marlow at 2004-03-24T09:42:11+00:00 [haddock @ 2004-03-24 09:42:10 by simonmar] hiding bug from Ross Paterson (fixed in rev 1.59 of Main.hs) - - - - - 1b692e6c by Simon Marlow at 2004-03-24T10:10:50+00:00 [haddock @ 2004-03-24 10:10:50 by simonmar] mkExportItems fix & simplification: we should be looking at the actual exported names (calculated earlier) to figure out which subordinates of a declaration are exported. This means that if you export a record, and name its fields separately in the export list, the fields will still be visible in the documentation for the constructor. - - - - - 90e5e294 by Simon Marlow at 2004-03-24T10:12:08+00:00 [haddock @ 2004-03-24 10:12:08 by simonmar] Make restrictCons take into account record field names too (removing a ToDo). - - - - - 2600efa4 by Simon Marlow at 2004-03-24T10:16:17+00:00 [haddock @ 2004-03-24 10:16:17 by simonmar] Record export tests. - - - - - 6a8575c7 by Simon Marlow at 2004-03-25T09:35:14+00:00 [haddock @ 2004-03-25 09:35:14 by simonmar] restrictTo: fix for restricting a newtype with a record field. - - - - - dcf55a8d by Simon Marlow at 2004-03-25T10:01:42+00:00 [haddock @ 2004-03-25 10:01:42 by simonmar] Fix duplicate instance bug - - - - - f49aa758 by Simon Marlow at 2004-03-25T10:02:41+00:00 [haddock @ 2004-03-25 10:02:41 by simonmar] Duplicate instance bug. - - - - - 7b87344c by Simon Marlow at 2004-03-25T10:29:56+00:00 [haddock @ 2004-03-25 10:29:56 by simonmar] If a name is imported from two places, one hidden and one not, choose the unhidden one to link to. Also, when there's only a hidden module to link to, don't try linking to it. - - - - - 40f44d7b by Simon Marlow at 2004-03-25T15:17:24+00:00 [haddock @ 2004-03-25 15:17:23 by simonmar] Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment. - - - - - 9b64dc0f by Simon Marlow at 2004-03-25T15:20:55+00:00 [haddock @ 2004-03-25 15:20:55 by simonmar] Update - - - - - c2fff7f2 by Simon Marlow at 2004-03-25T15:45:10+00:00 [haddock @ 2004-03-25 15:45:10 by simonmar] Eliminate some unnecessary spaces in the HTML rendering - - - - - b7948ff0 by Simon Marlow at 2004-03-25T16:00:37+00:00 [haddock @ 2004-03-25 16:00:36 by simonmar] Remove all that indentation in the generated HTML to keep the file sizes down. - - - - - da2bb4ca by Sven Panne at 2004-03-27T09:57:58+00:00 [haddock @ 2004-03-27 09:57:57 by panne] Added the new-born haddock.js to the build process and the documentation. - - - - - b99e6f8c by Sven Panne at 2004-03-27T10:32:20+00:00 [haddock @ 2004-03-27 10:32:20 by panne] "type" is a required attribute of the "script" element - - - - - 562b185a by Sven Panne at 2004-03-27T12:52:34+00:00 [haddock @ 2004-03-27 12:52:34 by panne] Add a doctype for the contents page, too. - - - - - f6a99c2d by Simon Marlow at 2004-04-14T10:03:25+00:00 [haddock @ 2004-04-14 10:03:25 by simonmar] fix for single-line comment syntax - - - - - de366303 by Simon Marlow at 2004-04-20T13:08:04+00:00 [haddock @ 2004-04-20 13:08:04 by simonmar] Allow a 'type' declaration to include documentation comments. These will be ignored by Haddock, but at least one user (Johannes Waldmann) finds this feature useful, and it's easy to add. - - - - - fd78f51e by Simon Marlow at 2004-05-07T15:14:56+00:00 [haddock @ 2004-05-07 15:14:56 by simonmar] - update copyright - add version to abstract - - - - - 59f53e32 by Sven Panne at 2004-05-09T14:39:53+00:00 [haddock @ 2004-05-09 14:39:53 by panne] Fix the fix for single-line comment syntax, ------------------------------------------- is now a valid comment line again. - - - - - 8b18f2fe by Simon Marlow at 2004-05-10T10:11:51+00:00 [haddock @ 2004-05-10 10:11:51 by simonmar] Update - - - - - 225a491d by Ross Paterson at 2004-05-19T13:10:23+00:00 [haddock @ 2004-05-19 13:10:23 by ross] Make the handling of "deriving" slightly smarter, by ignoring data constructor arguments that are identical to the lhs. Now handles things like data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ... - - - - - 37588686 by Mike Thomas at 2004-05-21T06:38:14+00:00 [haddock @ 2004-05-21 06:38:14 by mthomas] Windows exe extensions (bin remains for Unix). - - - - - cf2b9152 by Simon Marlow at 2004-05-25T09:34:54+00:00 [haddock @ 2004-05-25 09:34:54 by simonmar] Add some TODO items - - - - - 4d29cdfc by Simon Marlow at 2004-05-25T10:41:46+00:00 [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. - - - - - 2e0771e0 by Mike Thomas at 2004-05-28T20:17:55+00:00 [haddock @ 2004-05-28 20:17:55 by mthomas] Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg. - - - - - 8d10bde1 by Sven Panne at 2004-06-05T16:53:34+00:00 [haddock @ 2004-06-05 16:53:34 by panne] Misc. rpm spec file cleanup, including: * make BuildRoot handling more consistent * added default file attributes * consistent defines and tags - - - - - 59974349 by Sven Panne at 2004-06-05T18:01:00+00:00 [haddock @ 2004-06-05 18:01:00 by panne] More rpm spec file cleanup, including: * added some BuildRequires * changed packager to me, so people can complain at the right place :-] * consistently refer to haskell.org instead of www.haskell.org - - - - - b94d4903 by Simon Marlow at 2004-07-01T11:08:58+00:00 [haddock @ 2004-07-01 11:08:57 by simonmar] Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead. - - - - - d5278f67 by Sven Panne at 2004-07-04T15:15:55+00:00 [haddock @ 2004-07-04 15:15:55 by panne] Install pictures for +/- pictures, too (JPEG is a strange format for graphics like this, I would have expected GIF or PNG here.) Things look fine with Konqueror and Netscape on Linux now, the only downside is that the cursor doesn't change when positioned above the "button". - - - - - 46dec6c5 by Sven Panne at 2004-07-13T17:59:28+00:00 [haddock @ 2004-07-13 17:59:28 by panne] A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there. - - - - - 1d7bc432 by Simon Marlow at 2004-07-22T08:54:06+00:00 [haddock @ 2004-07-22 08:54:06 by simonmar] Add single quote to $ident, so you can say eg. 'foldl'' to refer to foldl' (the longest match rule is our friend). Bug reported by Adrian Hey <ahey at iee.org> - - - - - f183618b by Krasimir Angelov at 2004-07-27T22:59:35+00:00 [haddock @ 2004-07-27 22:58:23 by krasimir] Add basic support for Microsoft HTML Help 2.0 - - - - - d515d0c2 by Krasimir Angelov at 2004-07-27T23:02:36+00:00 [haddock @ 2004-07-27 23:02:36 by krasimir] escape names in the index - - - - - a5f1be23 by Krasimir Angelov at 2004-07-27T23:05:21+00:00 [haddock @ 2004-07-27 23:05:21 by krasimir] Add jsFile, plusFile and minusFile to the file list - - - - - c4fb4881 by Krasimir Angelov at 2004-07-28T22:12:10+00:00 [haddock @ 2004-07-28 22:12:09 by krasimir] bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs - - - - - 64d30b1d by Krasimir Angelov at 2004-07-30T22:15:47+00:00 [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug - - - - - 133c8c5c by Krasimir Angelov at 2004-07-31T12:04:38+00:00 [haddock @ 2004-07-31 12:04:37 by krasimir] make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful. - - - - - 79040963 by Krasimir Angelov at 2004-07-31T13:10:20+00:00 [haddock @ 2004-07-31 13:10:20 by krasimir] Make DHtmlTree compatible with Mozila browser - - - - - 1a55dc90 by Krasimir Angelov at 2004-07-31T14:52:55+00:00 [haddock @ 2004-07-31 14:52:55 by krasimir] fix - - - - - 85ce0237 by Krasimir Angelov at 2004-07-31T14:53:28+00:00 [haddock @ 2004-07-31 14:53:28 by krasimir] HtmlHelp 1.x - - - - - 3c0c53ba by Krasimir Angelov at 2004-07-31T20:35:21+00:00 [haddock @ 2004-07-31 20:35:21 by krasimir] Added support for DevHelp - - - - - d42b5af1 by Krasimir Angelov at 2004-07-31T21:17:51+00:00 [haddock @ 2004-07-31 21:17:51 by krasimir] Document new features in HtmlHelp - - - - - 790fe21e by Krasimir Angelov at 2004-08-01T15:14:02+00:00 [haddock @ 2004-08-01 15:14:02 by krasimir] add missing imports - - - - - fd7cc6bc by Krasimir Angelov at 2004-08-01T19:52:08+00:00 [haddock @ 2004-08-01 19:52:06 by krasimir] fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format. - - - - - 94ad7ac8 by Krasimir Angelov at 2004-08-01T19:53:50+00:00 [haddock @ 2004-08-01 19:53:50 by krasimir] I forgot to add the new +/- images - - - - - f0c65388 by Krasimir Angelov at 2004-08-02T16:25:53+00:00 [haddock @ 2004-08-02 16:25:53 by krasimir] Add root node to the table of contents. All modules in tree are not children of the root - - - - - f50bd85d by Sven Panne at 2004-08-02T18:17:46+00:00 [haddock @ 2004-08-02 18:17:46 by panne] Mainly DocBook fixes - - - - - 09527ce3 by Sven Panne at 2004-08-02T20:02:29+00:00 [haddock @ 2004-08-02 20:02:29 by panne] Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays... - - - - - c8fbacfa by Sven Panne at 2004-08-02T20:31:13+00:00 [haddock @ 2004-08-02 20:31:13 by panne] Warning police - - - - - 37830bff by Sven Panne at 2004-08-02T20:32:29+00:00 [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code - - - - - 13847171 by Sven Panne at 2004-08-02T21:12:27+00:00 [haddock @ 2004-08-02 21:12:25 by panne] Use pathJoin instead of low-level list-based manipulation for FilePaths - - - - - c711d61e by Sven Panne at 2004-08-02T21:16:02+00:00 [haddock @ 2004-08-02 21:16:02 by panne] Removed WinDoze CRs - - - - - b1f7dc88 by Sven Panne at 2004-08-03T19:35:59+00:00 [haddock @ 2004-08-03 19:35:59 by panne] Fixed spelling of "http-equiv" attribute - - - - - dd5f394e by Sven Panne at 2004-08-03T19:44:03+00:00 [haddock @ 2004-08-03 19:44:03 by panne] Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before) - - - - - 919c47c6 by Sigbjorn Finne at 2004-08-03T19:45:11+00:00 [haddock @ 2004-08-03 19:45:11 by sof] make it compile with <= ghc-6.1 - - - - - 4d6f01d8 by Sigbjorn Finne at 2004-08-03T19:45:30+00:00 [haddock @ 2004-08-03 19:45:30 by sof] ffi wibble - - - - - 4770643a by Sven Panne at 2004-08-03T20:47:46+00:00 [haddock @ 2004-08-03 20:47:46 by panne] Fixed CSS for button style. Note that only "0" is a valid measure without a unit! - - - - - 14aaf2e5 by Sven Panne at 2004-08-03T21:07:59+00:00 [haddock @ 2004-08-03 21:07:58 by panne] Improved spacing of dynamic module tree - - - - - 97c3579a by Simon Marlow at 2004-08-09T11:03:04+00:00 [haddock @ 2004-08-09 11:03:04 by simonmar] Add FormatVersion Patch submitted by: George Russell <ger at informatik.uni-bremen.de> - - - - - af7f8c03 by Simon Marlow at 2004-08-09T11:55:07+00:00 [haddock @ 2004-08-09 11:55:05 by simonmar] Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger at informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header. - - - - - 7b865ad3 by Simon Marlow at 2004-08-10T14:09:57+00:00 [haddock @ 2004-08-10 14:09:57 by simonmar] Fixes for DevHelp/HtmlHelp following introduction of short module description. - - - - - 814766cd by Simon Marlow at 2004-08-10T14:33:46+00:00 [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. - - - - - 39cf9ede by Simon Marlow at 2004-08-12T12:08:23+00:00 [haddock @ 2004-08-12 12:08:23 by simonmar] Avoid using string-gap tricks. - - - - - b6d78551 by Simon Marlow at 2004-08-13T10:53:21+00:00 [haddock @ 2004-08-13 10:53:21 by simonmar] Update - - - - - eaae7417 by Simon Marlow at 2004-08-13T10:53:50+00:00 [haddock @ 2004-08-13 10:53:50 by simonmar] Test for primes in quoted links - - - - - 68c34f06 by Sven Panne at 2004-08-16T19:59:38+00:00 [haddock @ 2004-08-16 19:59:36 by panne] XMLification - - - - - 7f45a6f9 by Sven Panne at 2004-08-18T16:42:54+00:00 [haddock @ 2004-08-18 16:42:54 by panne] Re-added indices + minor fixes - - - - - 8a5dd97c by Sigbjorn Finne at 2004-08-25T17:15:42+00:00 [haddock @ 2004-08-25 17:15:42 by sof] backquote HADDOCK_VERSION defn for <= ghc-6.0.x; believe this is only needed under mingw - - - - - 4b1b42ea by Sven Panne at 2004-08-26T20:08:50+00:00 [haddock @ 2004-08-26 20:08:49 by panne] SGML is dead, long live DocBook XML! Note: The BuildRequires tags in the spec files are still incomplete and the documentation about the DocBook tools needs to be updated, too. Stay tuned... - - - - - 8d52cedb by Sven Panne at 2004-08-26T21:03:19+00:00 [haddock @ 2004-08-26 21:03:19 by panne] Updated BuildRequires tags. Alas, there seems to be no real standard here, so your mileage may vary... At least the current specs should work on SuSE Linux. - - - - - e6982912 by Sigbjorn Finne at 2004-08-30T15:44:59+00:00 [haddock @ 2004-08-30 15:44:59 by sof] escape HADDOCK_VERSION double quotes on all platforms when compiling with <=6.0.x - - - - - b3fbc867 by Simon Marlow at 2004-08-31T13:09:42+00:00 [haddock @ 2004-08-31 13:09:42 by simonmar] Avoid GHC/shell versionitis and create Version.hs - - - - - c359e16a by Sven Panne at 2004-09-05T19:12:33+00:00 [haddock @ 2004-09-05 19:12:32 by panne] * HTML documentation for "foo.xml" goes into directory "foo" again, not "foo-html". This is nicer and consistent with the behaviour for building the docs from SGML. * Disabled building PostScript documentation in the spec files for now, there are some strange issues with the FO->PS conversion for some files which have to be clarified first. - - - - - c68b1eba by Sven Panne at 2004-09-24T07:04:38+00:00 [haddock @ 2004-09-24 07:04:38 by panne] Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable. - - - - - dfb32615 by Simon Marlow at 2004-09-30T08:21:29+00:00 [haddock @ 2004-09-30 08:21:29 by simonmar] Add a feature request - - - - - 45ff783c by Sven Panne at 2004-10-23T19:54:00+00:00 [haddock @ 2004-10-23 19:54:00 by panne] Improved the Cygwin/MinGW chaos a little bit. There is still confusion about host platform vs. target platform... - - - - - 5f644714 by Krasimir Angelov at 2004-10-28T16:01:51+00:00 [haddock @ 2004-10-28 16:01:51 by krasimir] update for ghc-6.3+ - - - - - 92d9753e by Sven Panne at 2004-11-01T16:39:01+00:00 [haddock @ 2004-11-01 16:39:01 by panne] Revert previous commit: It's Network.URI which should be changed, not Haddock. - - - - - 05f70f6e by Simon Marlow at 2005-01-04T16:15:51+00:00 [haddock @ 2005-01-04 16:15:51 by simonmar] parser fix: allow qualified specialids. - - - - - 47870837 by Simon Marlow at 2005-01-04T16:16:54+00:00 [haddock @ 2005-01-04 16:16:54 by simonmar] Add a test - - - - - ff11fc2c by Ross Paterson at 2005-01-10T19:18:22+00:00 [haddock @ 2005-01-10 19:18:22 by ross] Render non-ASCII characters using numeric character references, to simplify charset issues. There's a META tag saying the charset is UTF-8, but GHC outputs characters as raw bytes. Ideally we need an encoding on the input side too, primarily in comments, because source files containing non-ASCII characters aren't portable between locales. - - - - - eba2fc4e by Simon Marlow at 2005-01-11T10:44:37+00:00 [haddock @ 2005-01-11 10:44:37 by simonmar] Remove string gap - - - - - b899a381 by Ross Paterson at 2005-01-13T11:41:33+00:00 [haddock @ 2005-01-13 11:41:33 by ross] recognize SGML-style numeric character references &#ddd; or &#xhhhh; and translate them into Chars. - - - - - 106e3cf0 by Ross Paterson at 2005-01-13T14:43:41+00:00 [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) - - - - - e8f54f25 by Ross Paterson at 2005-01-13T14:44:24+00:00 [haddock @ 2005-01-13 14:44:24 by ross] Describe numeric character references. - - - - - 914ccdce by Sven Panne at 2005-01-15T18:44:48+00:00 [haddock @ 2005-01-15 18:44:45 by panne] Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later. - - - - - 6ab20e84 by Sven Panne at 2005-01-16T12:18:26+00:00 [haddock @ 2005-01-16 12:18:26 by panne] Trim imports - - - - - efb81da9 by Sven Panne at 2005-01-16T12:58:08+00:00 [haddock @ 2005-01-16 12:58:03 by panne] Correctly handle the new order of arguments for the combining function given to fromListWith. - - - - - e27b5834 by Sven Panne at 2005-01-16T14:14:41+00:00 [haddock @ 2005-01-16 14:14:39 by panne] Data.Map.unions is left-biased. - - - - - dae3cc3e by Sven Panne at 2005-01-16T14:22:44+00:00 [haddock @ 2005-01-16 14:22:44 by panne] Added the last missing "flip" to get identical HTML output as previous versions. - - - - - 951d8408 by Sven Panne at 2005-01-16T14:37:10+00:00 [haddock @ 2005-01-16 14:37:10 by panne] Refactored Text.PrettyPrint legacy hell into a separate module. - - - - - f1c4b892 by Sven Panne at 2005-01-16T15:41:25+00:00 [haddock @ 2005-01-16 15:41:21 by panne] Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway. - - - - - 60824c6e by Simon Marlow at 2005-01-18T10:02:48+00:00 [haddock @ 2005-01-18 10:02:48 by simonmar] Add a TODO - - - - - a8c82f23 by Krasimir Angelov at 2005-01-28T23:19:39+00:00 [haddock @ 2005-01-28 23:19:39 by krasimir] import Foreign/Foreign.C are required for Windows - - - - - d8450a23 by Simon Marlow at 2005-02-02T16:23:04+00:00 [haddock @ 2005-02-02 16:23:00 by simonmar] Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning. - - - - - 1cce71d0 by Simon Marlow at 2005-02-03T13:42:19+00:00 [haddock @ 2005-02-03 13:42:19 by simonmar] - add --ignore-all-exports flag, which behaves as if every module has the ignore-exports attribute (requested by Chris Ryder). - add --hide option to hide a module on the command line. - add --use-package option to get Haddock info for a package from ghc-pkg (largely untested). - remove reexports from the .haddock file, they aren't used any more. - - - - - 767123ef by Ross Paterson at 2005-02-03T16:17:37+00:00 [haddock @ 2005-02-03 16:17:37 by ross] fix typo for < 6.3 - - - - - 0c680c04 by Simon Marlow at 2005-02-04T12:03:31+00:00 [haddock @ 2005-02-04 12:03:31 by simonmar] Fix bug in renameExportItems that meant links in instances weren't being renamed properly. - - - - - ff7abe5f by Simon Marlow at 2005-02-04T12:15:53+00:00 [haddock @ 2005-02-04 12:15:52 by simonmar] Add attribute #not-home, to indicate that the current module should not be considered to be a home module for the each entity it exports, unless there is no other module that exports the entity. - - - - - fc2cfd27 by Simon Marlow at 2005-02-04T12:40:02+00:00 [haddock @ 2005-02-04 12:40:02 by simonmar] Update the documentation w.r.t. home modules and the not-home attribute. - - - - - 26b8ddf7 by Ross Paterson at 2005-02-04T13:36:06+00:00 [haddock @ 2005-02-04 13:36:05 by ross] sort lists of instances by - arity of the type constructors (so higher-kinded instances come first) - name of the class - argument types - - - - - 26bfb19c by Simon Marlow at 2005-02-23T15:57:12+00:00 [haddock @ 2005-02-23 15:57:12 by simonmar] Fix documentation regarding the module attributes. - - - - - 9c3afd02 by Simon Marlow at 2005-02-28T16:18:17+00:00 [haddock @ 2005-02-28 16:18:17 by simonmar] version 0.7 - - - - - a95fd63f by Simon Marlow at 2005-02-28T16:22:08+00:00 [haddock @ 2005-02-28 16:22:08 by simonmar] Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results. - - - - - 905d42f7 by Simon Marlow at 2005-03-01T17:16:42+00:00 [haddock @ 2005-03-01 17:16:40 by simonmar] Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case). - - - - - a0e1d178 by Wolfgang Thaller at 2005-03-09T08:28:39+00:00 [haddock @ 2005-03-09 08:28:39 by wolfgang] Hack haddock's lexer to accept the output from Apple's broken version of cpp (Apple's cpp leaves #pragma set_debug_pwd directives in it's output). - - - - - 9e1eb784 by Simon Marlow at 2005-04-22T14:27:15+00:00 [haddock @ 2005-04-22 14:27:15 by simonmar] Add a TODO item - - - - - 23281f78 by Ross Paterson at 2005-05-18T12:41:59+00:00 [haddock @ 2005-05-18 12:41:59 by ross] fix 3 bugs in --use-package, and document it. - - - - - 00074a68 by Sven Panne at 2005-05-21T12:35:29+00:00 [haddock @ 2005-05-21 12:35:29 by panne] Warning/versionitis police - - - - - 341fa822 by Simon Marlow at 2005-06-15T15:43:21+00:00 [haddock @ 2005-06-15 15:43:21 by simonmar] Allow "licence" as an alternate spelling of "license" - - - - - 3b953f8b by Simon Marlow at 2005-06-16T08:14:12+00:00 [haddock @ 2005-06-16 08:14:12 by simonmar] wibble - - - - - abfd9826 by Simon Marlow at 2005-06-27T14:46:40+00:00 [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The old way confused Apache because the extensions are sometimes interpreted as having special meanings. - - - - - a01eea00 by Simon Marlow at 2005-08-04T13:59:40+00:00 [haddock @ 2005-08-04 13:59:40 by simonmar] 0.7 changes - - - - - 170ef87e by Simon Marlow at 2005-08-04T15:08:03+00:00 [haddock @ 2005-08-04 15:08:03 by simonmar] spec file from Jens Peterson - - - - - 7621fde4 by Simon Marlow at 2005-08-04T15:59:30+00:00 [haddock @ 2005-08-04 15:59:30 by simonmar] replace mingw tests with $(Windows) - - - - - a20739bb by Sven Panne at 2005-08-05T07:01:12+00:00 [haddock @ 2005-08-05 07:01:12 by panne] Reverted to previous version (but with bumped version number), the last commit broke RPM building on SuSE systems due to differently named dependencies. As a clarification: All .spec files in the repository have to work at least on SuSE, because that's the system I'm using. And as "Mr. Building Police", I reserve me the right to keep them that way... >:-) It might very well be the case that we need different .spec files for different platforms, so packagers which are unhappy with the current .spec files should contact me, stating the actual problems. - - - - - 4afb15cf by Simon Marlow at 2005-10-05T10:51:45+00:00 [haddock @ 2005-10-05 10:51:45 by simonmar] Add a bug - - - - - 60f69f82 by Simon Marlow at 2005-10-05T12:52:03+00:00 [haddock @ 2005-10-05 12:52:03 by simonmar] Document new behaviour of -s option - - - - - f7e520ca by Simon Marlow at 2005-10-10T15:02:55+00:00 [haddock @ 2005-10-10 15:02:55 by simonmar] extractRecSel: ignore non-record constructors (fixes a crash when using datatypes with a mixture of record and non-record style constructors). - - - - - b2edbedb by Simon Marlow at 2005-10-14T09:44:21+00:00 Start CHANGES for 0.8 - - - - - 21c7ac8d by Simon Marlow at 2005-10-14T23:11:19+00:00 First cut of Cabal build system - - - - - 766cecdd by Simon Marlow at 2005-10-29T08:14:43+00:00 Add configure script and Makefile for the docs Add a separate configure script and build system for building the documentation. The configure and Makefile code is stolen from fptools. This is left as a separate build system so that the main Cabal setup doesn't require a Unix build environment or DocBook XML tools. - - - - - aa36c783 by Duncan Coutts at 2006-01-17T19:29:55+00:00 Add a --wiki=URL flag to add a per-module link to a correspondng wiki page. So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option. - - - - - e06e2da2 by Simon Marlow at 2006-01-18T09:28:15+00:00 TODO: documnet --wiki - - - - - 17adfda9 by Duncan Coutts at 2006-01-19T20:17:59+00:00 Add an optional wiki link for each top level exported name. In each module, for each "top level" exported entity we add a hyper link to a corresponding wiki page. The link url gets the name of the exported entity as a '#'-style anchor, so if there is an anchor in the page with that name then the users browser should jump directly to it. By "top level" we mean functions, classes, class members and data types (data, type, newtype), but not data constructors, class instances or data type class membership. The link is added at the right of the page and in a small font. Hopefully this is the right balance of visibility/distraction. We also include a link to the wiki base url in the contents and index pages. - - - - - f52324bb by Duncan Coutts at 2006-01-19T20:28:27+00:00 Rewrite pathJoin to only add a path separator when necessary. When the path ends in a file seperator there is no need to add another. Now using "--wiki=http://blah.com/foo/" should do the right thing. (Code snippet adapted from Isaac's FilePath package.) - - - - - 43bb89fa by Duncan Coutts at 2006-01-21T17:15:27+00:00 Teach haddock about line pragmas and add accurate source code links Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's source location tracking to include the file name as well as line/column. This way each AST item that is tagged with a SrcLoc gets the original file name too. Use this original file name to add source links to each exported item, in the same visual style as the wiki links. Note that the per-export source links are to the defining module rather than whichever module haddock pretends it is exported from. This is what we want for source code links. The source code link URL can also contain the name of the export so one could implement jumping to the actual location of the function in the file if it were linked to an html version of the source rather than just plain text. The name can be selected with the %N wild card. So for linking to the raw source code one might use: --source=http://darcs/haskell.org/foo/%F Or for linking to html syntax highlighted code: --source=http://darcs/haskell.org/foo/%M.html#%N - - - - - edd9f229 by Duncan Coutts at 2006-01-22T00:02:00+00:00 Extend URL variable expansion syntax and add source links to the contents page Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module. - - - - - eb3c6ada by Duncan Coutts at 2006-01-23T13:42:34+00:00 Remove the complex substitutions and add more command line flags instead. Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now use three seperate command line flags for the top level, per-module and per-entity source and wiki links. They are: --source-base, --source-module, --source-entity --comments-base, --comments-module, --comments-entity We leave -s, --source as an alias for --source-module which is how that option behaved previously. The long forms of the substitutions are still available, ${FILE} ${MODULE} etc and the only non-trivial substitution is ${MODULE/./c} to replace the '.' characters in the module name with any other character c. eg ${MODULE/./-} Seperating the source and wiki url flags has the added bonus that they can be turned on or off individually. So users can have per-module links for example without having to also have per-entity links.` - - - - - a2f0f2af by Duncan Coutts at 2006-01-23T13:54:52+00:00 Make the --help output fit in 80 columns. This is a purely cosmetic patch, feel free to ignore it. The only trickery going on is that we don't display the deprecated -s, --source flags in the help message, but we do still accept them. - - - - - 2d3a4b0c by Duncan Coutts at 2006-01-23T14:12:16+00:00 Add documentation for the new --source-* and --comments-* command line options - - - - - 1a82a297 by Simon Marlow at 2006-01-23T17:03:27+00:00 fix markup - - - - - 100d464a by Duncan Coutts at 2006-01-23T18:31:13+00:00 remove a couple TODO items that have been done The --wiki, or rather the --comment-* options are now documented. There is probably no need to have haddock invoke unlit or cpp itself since it can now pick up the line pragmas to get the source locations right. Tools like Cabal will arrange for preprocessors to be run so there is less of a need for tools like haddock to do it themselves. - - - - - 3162fa91 by Simon Marlow at 2006-01-24T14:21:56+00:00 add a test I had lying around - - - - - 98947063 by Simon Marlow at 2006-01-31T13:52:54+00:00 add scabal-version field - - - - - c41876e6 by Neil Mitchell at 2006-02-26T17:48:21+00:00 Add Hoogle output option - - - - - f86fb9c0 by Simon Marlow at 2006-03-08T09:15:20+00:00 add haskell.vim Contributed by Brad Bowman <bsb at bereft.net>, thanks! - - - - - 35d3c511 by benjamin.franksen at 2006-03-03T22:39:54+00:00 fixed libdir (/html was missing) - - - - - 4d08fd7d by Simon Marlow at 2006-03-10T11:13:31+00:00 add PatternGuards extension - - - - - 3f095e70 by Simon Marlow at 2006-03-13T11:40:42+00:00 bug fixes from Brad Bowman - - - - - 8610849d by Sven Panne at 2006-03-19T17:02:56+00:00 Fixed Cabal/RPM build - - - - - 34a994d6 by sven.panne at 2006-04-20T12:39:23+00:00 Avoid pattern guards Due to the use of pattern guards in Haddock, GHC was called with -fglasgow-exts. This in turn enables bang patterns, too, which broke the Haddock build. Removing some unnecessary pattern guards seemed to be the better way of fixing this instead of using a pragma to disable pattern guards. - - - - - bb523f51 by Ross Paterson at 2006-04-24T09:03:25+00:00 extend 'deriving' heuristic a little If an argument of a data constructor has a type variable head, it is irreducible and the same type class can be copied into the constraint. (Formerly we just did this for type variable arguments.) - - - - - dab9fe7a by Simon Marlow at 2006-04-26T10:02:31+00:00 record an idea - - - - - 748b7078 by Simon Marlow at 2006-05-08T08:28:53+00:00 add section about deriving - - - - - 11252ea1 by Simon Marlow at 2006-05-24T15:43:10+00:00 replace a fatal error in lexChar with a parseError - - - - - 382c9411 by Simon Marlow at 2006-05-24T15:45:47+00:00 add a bug - - - - - b79272f5 by Simon Marlow at 2006-05-24T15:46:29+00:00 add a bug report - - - - - 912edf65 by David Waern at 2006-07-10T19:09:23+00:00 Initial modifications -- doesn't compile - - - - - a3c7ba99 by David Waern at 2006-07-11T00:54:19+00:00 More porting work -- doesn't compile - - - - - 0a173d19 by David Waern at 2006-07-11T11:30:03+00:00 Make the repos temporarily compile and illustrate a problem - - - - - bad316de by David Waern at 2006-07-11T15:43:47+00:00 Progress on the porting process - - - - - bbf12d02 by David Waern at 2006-07-11T23:07:44+00:00 More progress on the porting -- first pass starting to shape up - - - - - de580ba2 by David Waern at 2006-07-20T17:48:30+00:00 More progress -- still on phase1 - - - - - 75a917a2 by David Waern at 2006-07-23T18:22:43+00:00 More work on pass1 -- mostly done - - - - - 6697b3f7 by David Waern at 2006-07-23T22:17:40+00:00 More work, started working on the renaming phase -- this code will need a cleanup soon :) - - - - - 82a5bcbb by David Waern at 2006-07-29T16:16:43+00:00 Add instances, build renaming environment, start on the renamer - - - - - c3f8f4f1 by David Waern at 2006-07-29T21:37:48+00:00 Complete the renamer - - - - - 7e00d464 by David Waern at 2006-07-30T21:01:57+00:00 Start porting the Html renderer - - - - - f04ce121 by David Waern at 2006-08-09T20:04:56+00:00 More Html rendering progress - - - - - 20c21b53 by David Waern at 2006-08-10T17:37:47+00:00 More progress - - - - - d7097e0d by David Waern at 2006-08-11T20:31:51+00:00 Cleanup - - - - - a7351e86 by David Waern at 2006-08-12T11:44:47+00:00 Render H98 Data declarations - - - - - 3fb2208e by David Waern at 2006-08-12T17:15:34+00:00 Perfect rendering of Test.hs - - - - - 454fd062 by David Waern at 2006-08-13T21:57:08+00:00 Misc fixes and interface load/save - - - - - 7ef7e7be by David Waern at 2006-08-14T00:56:07+00:00 Some refactoring - - - - - a7d3efef by David Waern at 2006-08-19T20:07:55+00:00 Adapt to latest GHC - - - - - 5fc3c0d7 by David Waern at 2006-08-20T21:28:11+00:00 Move interface read/write to its own module + some cleanup - - - - - 037e011c by David Waern at 2006-08-20T21:38:24+00:00 Small cleanup - - - - - da3a1023 by David Waern at 2006-09-03T16:05:22+00:00 Change mode to BatchCompile to avoid GHC API bug - - - - - 3cc9be3b by David Waern at 2006-09-03T16:06:59+00:00 Starting work on GADT rendering - - - - - 94506037 by David Waern at 2006-09-03T20:02:48+00:00 Compensate for change of export list order in GHC - - - - - c2cec4eb by David Waern at 2006-09-04T20:53:01+00:00 Rename a function - - - - - 9a9735ba by David Waern at 2006-09-05T15:51:21+00:00 Change version number to 2.0 - - - - - 3758a714 by David Waern at 2006-09-05T15:51:49+00:00 Align comment properly - - - - - 68478d9e by David Waern at 2006-09-15T18:03:00+00:00 Remove interface reading/writing code and use the GHC api for creating package environments instead - - - - - d2eedd95 by David Waern at 2006-09-15T18:05:29+00:00 Change the executable name to haddock-ghc-nolib - - - - - fcfbcf66 by David Waern at 2006-09-15T18:05:45+00:00 Small source code cleanup - - - - - d08eb017 by David Waern at 2006-09-15T18:06:21+00:00 Remove handling of --package flag - - - - - b8a4cf53 by David Waern at 2006-09-15T18:07:16+00:00 Remove commented-out code - - - - - bef0a684 by David Waern at 2006-09-15T18:37:57+00:00 Don't warn about missing links to () - - - - - e7d25fd7 by David Waern at 2006-09-15T19:50:49+00:00 Remove Interface and Binary2 modules - - - - - 9894f2a1 by David Waern at 2006-09-15T19:53:43+00:00 Remove debug printing from HaddockHtml - - - - - a0e7455d by David Waern at 2006-09-16T00:16:29+00:00 Comments only - - - - - d5b26fa7 by David Waern at 2006-09-16T00:16:57+00:00 Refactor PackageData creation code and start on building the doc env propery (unfinished) - - - - - 06aaa779 by David Waern at 2006-09-16T00:19:25+00:00 Better comments in Main.hs - - - - - 1a52d1b4 by David Waern at 2006-09-18T22:17:11+00:00 Comments and spacing change - - - - - e5a97767 by David Waern at 2006-09-21T17:02:45+00:00 Remove unnecessary fmapM import in Main - - - - - 9d0f9d3a by David Waern at 2006-09-22T18:07:07+00:00 Make import list in HaddockHtml prettier - - - - - 3452f662 by David Waern at 2006-09-22T18:08:47+00:00 Refactor context rendering - - - - - 12d0a6d0 by David Waern at 2006-09-22T18:09:52+00:00 Do proper HsType rendering (inser parentheses correctly) - - - - - 2c20c2f9 by David Waern at 2006-09-22T18:10:45+00:00 Fix a bug in Main.toHsType - - - - - c5396443 by David Waern at 2006-09-22T18:11:16+00:00 Skip external package modules sort for now - - - - - 3fb95547 by David Waern at 2006-09-22T20:35:40+00:00 Take away trailin "2" on all previously clashing type names - - - - - 2174755f by David Waern at 2006-09-22T20:51:43+00:00 Remove unused imports in Main - - - - - 1e9f7a39 by David Waern at 2006-09-22T20:52:11+00:00 Fix a comment in Main - - - - - 32d9e028 by David Waern at 2006-10-05T16:40:11+00:00 Merge with changes to ghc HEAD - - - - - 3058c8f5 by David Waern at 2006-10-05T16:41:02+00:00 Comment fixes - - - - - b9c217ec by David Waern at 2006-10-05T16:49:59+00:00 Filter out more builtin type constructors from warning messages - - - - - 67e7d252 by David Waern at 2006-10-05T19:38:22+00:00 Refactoring -- better structured pass1 - - - - - cd21c0c1 by David Waern at 2006-10-05T19:44:42+00:00 Remove read/dump interface flags - - - - - 313f9e69 by David Waern at 2006-10-05T19:49:26+00:00 Remove unused pretty printing - - - - - 480f09d1 by David Waern at 2006-12-28T13:22:24+00:00 Update to build with latest GHC HEAD - - - - - 63dccfcb by David Waern at 2007-01-05T01:38:45+00:00 Fixed a bug so that --ghc-flag works correctly - - - - - 3117dadc by David Waern at 2006-12-29T18:53:39+00:00 Automatically get the GHC lib dir - - - - - 9dc84a5c by David Waern at 2006-12-29T19:58:53+00:00 Comments - - - - - 0b0237cc by David Waern at 2007-01-05T16:48:30+00:00 Collect docs based on SrcLoc, syncing with removal of DeclEntity from GHC - - - - - a962c256 by David Waern at 2007-01-05T17:02:47+00:00 Add tabs in haddock.cabal - - - - - 0ca30c97 by David Waern at 2007-01-05T17:04:11+00:00 Add GHCUtils.hs - - - - - c0ab9abe by David Waern at 2007-01-10T11:43:08+00:00 Change package name to haddock-ghc, version 0.1 - - - - - 38e18b27 by David Waern at 2007-01-12T12:03:52+00:00 No binder name for foreign exports - - - - - d18587ab by David Waern at 2007-01-12T12:08:15+00:00 Temp record - - - - - ba6251a0 by David Waern at 2007-01-12T18:27:55+00:00 Remove read/dump-interface (again) - - - - - f4ba2b39 by David Waern at 2007-01-12T18:31:36+00:00 Remove DocOption, use the GHC type - - - - - 511be8bd by David Waern at 2007-01-12T18:32:41+00:00 Use exceptions instead of Either when loading package info - - - - - 0f2144d8 by David Waern at 2007-01-12T18:33:23+00:00 Small type change - - - - - 77507eb7 by David Waern at 2007-01-12T18:33:59+00:00 Remove interface file read/write - - - - - 0ea1e14f by David Waern at 2007-01-17T21:40:26+00:00 Add trace_ppr to GHCUtils - - - - - 3878b493 by David Waern at 2007-01-17T21:40:53+00:00 Sort external package modules and build a doc env - - - - - 8dc323fc by David Waern at 2007-01-17T21:42:41+00:00 Remove comment - - - - - f4c5b097 by David Waern at 2007-01-18T23:22:18+00:00 Add haddock-ghc.cabal and remove ghc option pragma in source file - - - - - da242b2c by David Waern at 2007-01-18T23:22:46+00:00 Remove some tabs - - - - - 288ed096 by David Waern at 2007-01-18T23:39:28+00:00 Moved the defaultErrorHandler to scope only over sortAndCheckModules for now - - - - - 4dd150fe by David Waern at 2007-02-03T21:23:56+00:00 Let restrictCons handle infix constructors - - - - - 97893442 by David Waern at 2007-02-04T16:26:00+00:00 Render infix data constructors - - - - - da89db72 by David Waern at 2007-02-04T16:26:33+00:00 CHange project name to Haddock-GHC - - - - - e93d48af by David Waern at 2007-02-04T16:59:08+00:00 Render infix type constructors properly - - - - - 357bc99b by David Waern at 2007-02-04T17:37:08+00:00 Insert spaces around infix function names - - - - - ab6cfc49 by David Waern at 2007-02-04T17:59:54+00:00 Do not list entities without documentation - - - - - 04249c7e by David Waern at 2007-02-04T19:16:25+00:00 Add GADT support (quite untested) - - - - - 2c223f8d by David Waern at 2007-02-04T19:25:10+00:00 Add package file write/save again! - - - - - b07ed218 by David Waern at 2007-02-04T19:33:02+00:00 Comment out minf_iface based stuff - - - - - 953d1fa7 by David Waern at 2007-02-05T00:12:23+00:00 Solve conflicts - - - - - 593247fc by David Waern at 2007-02-06T19:48:48+00:00 Remove -package flag, GHC's can be used instead - - - - - f658ded2 by David Waern at 2007-02-06T20:50:44+00:00 Start for support of ATs - - - - - 97f9e913 by David Waern at 2007-02-06T20:52:27+00:00 Wibble - - - - - 2ce8e4cf by David Waern at 2007-02-16T12:09:49+00:00 Add the DocOptions change - - - - - dee4a9b5 by David Waern at 2007-03-06T01:24:48+00:00 Wibble - - - - - 7cb99d18 by David Waern at 2007-03-06T01:24:58+00:00 Change version to 2.0 and executable name to haddock - - - - - c5aa02bc by David Waern at 2007-03-08T15:59:49+00:00 Go back to -B flag - - - - - 3a349201 by David Waern at 2007-03-09T13:31:59+00:00 Better exception handling and parsing of GHC flags - - - - - 05a69b71 by David Waern at 2007-03-09T17:45:44+00:00 Remove commented-out DocEntity printing - - - - - 755032cb by davve at dtek.chalmers.se at 2007-03-23T23:30:20+00:00 Remove a file that shouldn't be here - - - - - a7077e5f by davve at dtek.chalmers.se at 2007-03-24T03:58:48+00:00 Remove an import - - - - - 6f55aa8b by davve at dtek.chalmers.se at 2007-03-25T00:46:48+00:00 Start work on Haddock API - - - - - f0199480 by davve at dtek.chalmers.se at 2007-03-25T00:56:36+00:00 Prettify some comments - - - - - f952f9d1 by davve at dtek.chalmers.se at 2007-03-25T00:56:53+00:00 Remove ppr in HaddockTypes - - - - - bc594904 by davve at dtek.chalmers.se at 2007-03-25T00:57:53+00:00 Remove commented out doc env inference - - - - - 11ebf08d by davve at dtek.chalmers.se at 2007-03-25T01:23:25+00:00 De-flatten the namespace - - - - - f696b4bc by davve at dtek.chalmers.se at 2007-03-25T03:21:48+00:00 Add missing stuff to API - - - - - 9a2a04c3 by davve at dtek.chalmers.se at 2007-03-25T03:22:02+00:00 Wibble - - - - - 7d04a6d5 by davve at dtek.chalmers.se at 2007-03-25T03:22:08+00:00 Avoid a GHC bug with parseStaticFlags [] - - - - - 4d2820ba by davve at dtek.chalmers.se at 2007-03-26T04:57:01+00:00 Add fall-through case to mkExportItem - - - - - 6ebc8950 by Stefan O'Rear at 2007-03-26T04:14:53+00:00 Add shebang line to Setup.lhs - - - - - 80966ec5 by davve at dtek.chalmers.se at 2007-03-26T05:24:26+00:00 Fix stupid compile error - - - - - 1ea1385d by davve at dtek.chalmers.se at 2007-04-05T17:19:56+00:00 Do save/read of interface files properly - - - - - 0e4f6541 by David Waern at 2007-04-10T21:08:36+00:00 Add version to ghc dependency - - - - - b0499b63 by David Waern at 2007-04-10T21:37:08+00:00 Change package name to haddock - - - - - 9d50d27e by David Waern at 2007-04-24T00:22:14+00:00 Use filepath package instead of FilePath - - - - - 87c7fcdf by David Waern at 2007-07-10T21:03:04+00:00 Add new package dependencies - - - - - 4768709c by David Waern at 2007-07-11T20:37:11+00:00 Follow changes to record constructor representation - - - - - b9a02fee by Simon Marlow at 2007-05-30T14:00:48+00:00 update to compile with the latest GHC & Cabal - - - - - c0ebdc01 by David Waern at 2007-07-11T21:35:45+00:00 Fix conflicts - - - - - 97f7afd4 by David Waern at 2007-07-11T21:52:38+00:00 Follow changes to the GHC API - - - - - a5b7b58f by David Waern at 2007-07-12T20:36:48+00:00 Call parseStaticFlags before newSession - - - - - f7f50dbc by David Waern at 2007-08-01T21:52:58+00:00 Better indentation in haddock.cabal - - - - - d84e52ad by David Waern at 2007-08-02T00:08:18+00:00 Wibble - - - - - a23f494a by David Waern at 2007-08-02T00:08:24+00:00 Be better at trying to load all module dependencies (debugging) - - - - - ee917f13 by David Waern at 2007-08-03T18:48:08+00:00 Load all targets explicitly (checkModule doesn't chase dependencies anymore) - - - - - 5182d631 by David Waern at 2007-08-16T16:48:55+00:00 Finalize support for links to other packages - - - - - dfd1e3da by David Waern at 2007-08-16T16:51:11+00:00 Fix haddock comment errors in Haddock.Types - - - - - 50c0d83e by David Waern at 2007-08-16T16:51:37+00:00 Remove a debug import - - - - - d84b7c2b by David Waern at 2007-08-16T17:06:30+00:00 Rename PackageData to HaddockPackage - - - - - 3b52cb9f by David Waern at 2007-08-16T17:09:42+00:00 Simplify some comments - - - - - 66fa68d9 by David Waern at 2007-08-16T17:11:38+00:00 Comment the HaddockPackage definition - - - - - 8674c761 by David Waern at 2007-08-16T17:25:54+00:00 Improve code layout in Main - - - - - 571a3a0b by David Waern at 2007-08-16T17:32:13+00:00 Remove explict module imports in Main - - - - - d31b3cb0 by David Waern at 2007-08-16T17:36:23+00:00 Correct comments - - - - - 7f8a9f2b by David Waern at 2007-08-16T17:39:50+00:00 Fix layout problems in Haddock.Types - - - - - 9f421d7f by David Waern at 2007-08-17T11:16:48+00:00 Move options out of Main into Haddock.Options - - - - - 80042b63 by David Waern at 2007-08-17T11:26:59+00:00 Small comment/layout fixes - - - - - b141b982 by David Waern at 2007-08-17T11:28:28+00:00 Change project name from Haddock-GHC to Haddock - - - - - dbeb4a81 by David Waern at 2007-08-17T11:41:05+00:00 Add top module comment to all files - - - - - ce99cc9e by David Waern at 2007-08-17T14:53:04+00:00 Factor out typechecking phase into Haddock.Typecheck - - - - - 6bf75d9e by David Waern at 2007-08-17T16:55:35+00:00 Factor out package code to Haddock.Packages - - - - - b396db37 by David Waern at 2007-08-29T22:40:23+00:00 Major refactoring - - - - - 3d4f95ee by David Waern at 2007-08-29T23:26:24+00:00 Rename HaddockModule to Interface and a few more refactorings - - - - - c55326db by David Waern at 2007-08-29T23:48:03+00:00 Some comment cleanup - - - - - 9a84fc46 by David Waern at 2007-08-29T23:49:29+00:00 Add some modules that I forgot to add earlier - - - - - 4536dce2 by David Waern at 2007-08-29T23:55:24+00:00 Wibble - - - - - 9b7f0206 by David Waern at 2007-08-30T16:03:29+00:00 Wibble - - - - - c52c050a by David Waern at 2007-08-30T16:30:37+00:00 Rename HaddockModule to Interface - - - - - eae2995f by David Waern at 2007-08-30T16:42:59+00:00 Simplify createInterfaces - - - - - 53f99caa by David Waern at 2007-09-29T00:04:31+00:00 Add build-type: Simple to the cabal file - - - - - 0d3103a8 by David Waern at 2007-09-29T00:04:58+00:00 Add containers and array dependency - - - - - 6acf5f30 by David Waern at 2007-09-29T00:13:36+00:00 Prettify the cabal file - - - - - 87c1e378 by David Waern at 2007-09-29T13:16:39+00:00 FIX: consym data headers with more than two variables - - - - - b67fc16a by David Waern at 2007-09-29T14:01:32+00:00 FIX: prefix types used as operators should be quoted - - - - - a8f925bc by David Waern at 2007-09-29T14:02:26+00:00 Use isSymOcc from OccName instead of isConSym - - - - - fc330701 by David Waern at 2007-09-29T14:15:37+00:00 Use isLexConSym/isLexVarSym from OccName - - - - - e4f3dbad by David Waern at 2007-09-29T15:01:08+00:00 FIX: do not quote varsym type operators - - - - - 402207d2 by David Waern at 2007-09-29T15:01:50+00:00 Wibble - - - - - f9d89ef0 by David Waern at 2007-09-29T15:17:40+00:00 Take care when pp tyvars - add parens on syms - - - - - 849e2a77 by David Waern at 2007-10-01T21:56:39+00:00 Go back to using a ModuleMap instead of LookupMod - fixes a bug - - - - - 549dbac6 by David Waern at 2007-10-02T01:05:19+00:00 Improve parsing of doc options - - - - - a36021b8 by David Waern at 2007-10-02T23:05:00+00:00 FIX: double arrows in constructor contexts - - - - - d03bf347 by David Waern at 2007-10-09T16:14:05+00:00 Add a simple test suite - - - - - c252c140 by David Waern at 2007-10-17T16:02:28+00:00 Add --optghc=.. style flag passing to GHC - - - - - cce6c1b3 by David Waern at 2007-10-18T22:03:20+00:00 Add support for --read-interface again - - - - - 33d059c0 by David Waern at 2007-10-18T22:30:18+00:00 Refactoring -- get rid of Haddock.Packages - - - - - f9ed0a4c by David Waern at 2007-10-18T22:34:36+00:00 Name changes - - - - - 8a1c816f by David Waern at 2007-10-20T14:24:23+00:00 Add --ghc-version option - - - - - 4925aaa1 by David Waern at 2007-10-21T14:34:26+00:00 Add some Outputable utils - - - - - 69e7e47f by David Waern at 2007-10-21T14:35:49+00:00 FIX: Ord for OrdName was not comparing modules - - - - - 5a4ae535 by David Waern at 2007-10-21T21:18:48+00:00 Wibble - - - - - 03d48e20 by David Waern at 2007-10-24T15:52:56+00:00 Remove Main from "other modules" - - - - - c66f6d82 by David Waern at 2007-10-24T16:37:18+00:00 Make it possible to run haddock on itself - - - - - 21d156d8 by David Waern at 2007-10-25T14:02:14+00:00 Don't set boot modules as targets - - - - - f8bcf91c by David Waern at 2007-10-31T22:11:17+00:00 Add optimisation flags - - - - - 7ac758f2 by David Waern at 2007-11-04T09:48:28+00:00 Go back to loading only targets (seems to work now) - - - - - 4862aae1 by David Waern at 2007-11-05T22:24:57+00:00 Do full compilation of modules -- temporary fix for GHC API problem - - - - - 697e1517 by David Waern at 2007-11-05T22:25:50+00:00 Don't warn about not being able to link to wired/system/builtin-names - - - - - 892186da by David Waern at 2007-11-06T00:49:21+00:00 Filter out instances with TyCons that are not exported - - - - - 9548314c by David Waern at 2007-11-06T09:37:14+00:00 Wibble - - - - - 5cafd627 by David Waern at 2007-11-08T01:43:07+00:00 Filter out all non-vanilla type sigs - - - - - 04621830 by David Waern at 2007-11-08T01:45:13+00:00 Synch loading of names from .haddock files with GHC's name cache - - - - - 88d37f77 by David Waern at 2007-11-08T01:46:21+00:00 Remove commented-out code - - - - - 6409c911 by David Waern at 2007-11-08T01:56:00+00:00 Small bugfix and cleanup in getDeclFromTyCls - - - - - af59d9c2 by David Waern at 2007-11-08T02:08:44+00:00 Remove OrdName stuff - - - - - 3a615e2e by David Waern at 2007-11-08T02:13:41+00:00 Update runtests.hs following changes to haddock - - - - - 01f3314e by David Waern at 2007-11-08T02:33:01+00:00 Complain if we can't link to wired-in names - - - - - fcafb5d1 by David Waern at 2007-11-09T02:40:16+00:00 Don't exit when there are no file arguments - - - - - 194bc332 by David Waern at 2007-11-09T02:55:37+00:00 Wibble - - - - - dbe4cb55 by David Waern at 2007-11-09T02:56:14+00:00 Wibble - - - - - 82869fda by David Waern at 2007-11-10T17:01:43+00:00 Introduce InstalledInterface structure and add more stuff to the .haddock files We introduce InstalledInterface capturing the part of Interface that is stored in the interface files. We change the ppHtmlContents and ppHtmllIndex to take this structure instead of a partial Interface. We add stuff like the doc map and exported names to the .haddock file (via InstalledInterface). - - - - - d6bb57bf by David Waern at 2007-11-10T17:19:48+00:00 FIX: contents and index should include external package modules when --gen-contents/--gen-index - - - - - e8814716 by David Waern at 2007-11-11T00:29:27+00:00 Remove lDocLinkName and its use in Html backend - - - - - 6f9bd702 by David Waern at 2007-11-11T00:50:57+00:00 Do some refactoring in the html backend This also merges an old patch by Augustsson: Wed Jul 12 19:54:36 CEST 2006 lennart.augustsson at credit-suisse.com * Print type definitions like signatures if given arrows. - - - - - 09d0ce24 by Malcolm.Wallace at 2006-07-20T13:13:57+00:00 mention HsColour in the docs, next to option flags for linking to source code - - - - - 24da6c34 by Malcolm.Wallace at 2006-07-20T13:14:50+00:00 change doc references to CVS to give darcs repository location instead - - - - - 74d52cd6 by David Waern at 2007-11-11T00:55:33+00:00 Update copyright - - - - - fcaa3b4f by Duncan Coutts at 2006-09-08T13:41:00+00:00 Eliminate dep on network by doing a little cut'n'paste haddock depending on the network causes a circular dependency at least if you want to build the network lib with haddock docs. - - - - - 10cc9bda by David Waern at 2007-11-11T02:09:41+00:00 Fix conflicts - - - - - 4e3acd39 by David Waern at 2007-11-11T02:21:19+00:00 Manual merge of a patch from Duncan Coutts that removes the dependency on mtl - - - - - fa9070da by Neil Mitchell at 2006-09-29T15:52:03+00:00 Do not generate an empty table if there are no exports, this fixes a <table></table> tag being generated, which is not valid HTML 4.01 - - - - - d7431c85 by David Waern at 2007-11-11T02:28:50+00:00 Fix conflicts - - - - - f87e8f98 by Simon Marlow at 2006-10-10T11:37:16+00:00 changes for 0.8 - - - - - db929565 by Simon Marlow at 2006-10-10T12:07:12+00:00 fix the name of the source file - - - - - 8220aa4b by Simon Marlow at 2006-10-11T14:17:37+00:00 Rename haddock.js to haddock-util.js haddock.js will be run automatically by Windows when you type 'haddock' if it is found on the PATH, so rename to avoid confusion. Spotted by Adrian Hey. - - - - - 6bccdaa1 by sven.panne at 2006-10-12T15:28:23+00:00 Cabal's sdist does not generate "-src.tar.gz" files, but ".tar.gz" ones - - - - - d3f3fc19 by Simon Marlow at 2006-12-06T16:05:07+00:00 add todo item for --maintainer - - - - - 2da7e269 by Simon Marlow at 2006-12-15T15:52:00+00:00 TODO: do something better about re-exported symbols from another package - - - - - 42d85549 by David Waern at 2007-11-11T02:30:59+00:00 Fix conflicts - - - - - 5e7ef6e5 by Neil Mitchell at 2007-01-11T15:41:15+00:00 Never do spliting index files into many - - - - - f3d4aebe by Neil Mitchell at 2007-01-11T17:07:09+00:00 Add searching on the index page - - - - - bad3ab66 by Neil Mitchell at 2007-01-11T18:17:46+00:00 Delete dead code, now there is only one index page - - - - - cd09eedb by Neil Mitchell at 2007-01-11T18:21:19+00:00 Delete more stuff that is no longer required - - - - - e2806646 by David Waern at 2007-11-11T02:41:53+00:00 Fix conflicts - - - - - a872a823 by Neil Mitchell at 2007-01-11T18:51:43+00:00 Make the index be in case-insensitive alphabetic order - - - - - 8bddd9d7 by Neil Mitchell at 2007-02-06T17:49:12+00:00 Do not create empty tables for data declarations which don't have any constructors, instances or comments. Gets better HTML 4.01 compliance - - - - - 036b8120 by David Waern at 2007-11-11T02:56:58+00:00 Fix conflicts - - - - - f50c1639 by Conal Elliott at 2007-02-14T21:54:00+00:00 added substitution %{FILE///c} - - - - - 402e166a by David Waern at 2007-11-11T03:35:46+00:00 Manual merge of old patch: Sat Apr 21 04:36:43 CEST 2007 Roberto Zunino <zunrob at users.sf.net> * URL expansion for %%, %L, %{LINE} - - - - - 2f264fbd by David Waern at 2007-11-11T03:40:33+00:00 Manual merge of an old patch: Thu Apr 19 20:23:40 CEST 2007 Wolfgang Jeltsch <g9ks157k at acme.softbase.org> * bug fix When Haddock was invoked with the --ignore-all-exports flag but the ignore-exports module attribute wasn't used, hyperlinks weren't created for non-exported names. This fix might not be as clean as one would wish (since --ignore-all-exports now results in ignore_all_exports = True *and* an additional OptIgnoreExports option for every module) but at least the bug seems to be resolved now. - - - - - 7d7ae106 by sven.panne at 2007-09-02T12:18:02+00:00 Install LICENSE in the correct place - - - - - 66eaa924 by David Waern at 2007-11-11T19:02:46+00:00 Fix a bug that made haddock loop - - - - - 4ed47b58 by David Waern at 2007-11-11T19:03:09+00:00 Rename java-script file (this wasn't merge correctly) - - - - - d569534a by David Waern at 2007-11-11T19:06:44+00:00 Don't require -B <ghc-libdir> when no argument files Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B <ghc-libdir> to Haddock when there're no source files to process. This is nice when computing contents/index for external packages. - - - - - 373368bc by Neil Mitchell at 2007-01-11T18:22:44+00:00 Change from tabs to spaces in the ppHtmlIndex function - - - - - 6b063a77 by Neil Mitchell at 2007-01-12T12:17:46+00:00 Rewrite much of the index searching code, previously was too slow to execute on the base library with IE, the new version guarantees less than O(log n) operations be performed, where n is the number in the list (before was always O(n)) - - - - - bfad00b7 by David Waern at 2007-11-11T23:33:53+00:00 Fix conflicts - - - - - cd2dcc09 by Neil Mitchell at 2007-01-12T12:25:01+00:00 Make the max number of results 75 instead of 50, to allow map searching in the base library to work - - - - - 3ae74764 by Neil Mitchell at 2007-01-12T12:58:17+00:00 Make the search box in a form so that enter does the default search - - - - - 142103e5 by David Waern at 2007-11-12T00:03:18+00:00 Merge patch from the old branch: Fri Aug 31 13:21:45 CEST 2007 Duncan Coutts <duncan at haskell.org> * Add category: Development to .cabal file Otherwise it appears on the hackage website in the "Unclassified" category. - - - - - 22ec2ddb by David Waern at 2007-11-25T01:55:29+00:00 A a list of small improvements to the TODO file - - - - - eb0129f4 by Wolfgang Jeltsch at 2007-12-03T23:47:55+00:00 addition of type equality support (at least for HTML generation) - - - - - 816a7e22 by David Waern at 2007-12-08T15:46:26+00:00 Handle class operators correctly when rendering predicates - - - - - 68baaad2 by David Waern at 2007-12-08T16:15:54+00:00 Code layout changes - - - - - 09b77fb4 by David Waern at 2007-12-08T16:16:03+00:00 Handle infix operators correctly in the Type -> HsType translation - - - - - 31c36da2 by David Waern at 2007-12-08T16:24:27+00:00 Add ppLParendTypes/ppLParendType - - - - - b17cc818 by David Waern at 2007-12-08T16:26:12+00:00 Use ppParendType when printing types args in predicates - - - - - ffd1f2cf by David Waern at 2007-12-08T16:45:06+00:00 Fix rendering of instance heads to handle infix operators This is also a refactoring to share this code for rendering predicates. - - - - - ff886d45 by David Waern at 2007-12-08T17:27:46+00:00 Fix rendering of class operators - - - - - e2fcbb9e by David Waern at 2007-12-08T17:59:28+00:00 Fix a bug (use ppTyName instead of ppName to print names in type apps) - - - - - 79a1056e by David Waern at 2007-12-08T21:25:18+00:00 Update tests - - - - - 867741ac by David Waern at 2007-12-08T21:25:49+00:00 Give a diff on test failure - - - - - 7e5eb274 by David Waern at 2008-01-05T14:33:45+00:00 Add DrIFT commands - - - - - 3656454d by David Waern at 2008-01-05T20:26:00+00:00 Add "cabal-version: >= 1.2" to the cabal file - - - - - 77974efc by Simon Marlow at 2007-12-20T09:52:44+00:00 add an item - - - - - f6ac1708 by Simon Marlow at 2007-12-06T14:00:10+00:00 Source links must point to the original module, not the referring module - - - - - eda1d5c9 by David Waern at 2008-01-06T14:40:52+00:00 Manual merge of a patch to the 0.8 branch Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar at microsoft.com> * Source links must point to the original module, not the referring module - - - - - 378f4085 by David Waern at 2008-01-06T16:03:45+00:00 Change stability from stable to experimental - - - - - 8bdafe44 by David Waern at 2008-01-06T16:14:22+00:00 Add haskell.vim (it had been removed somehow) - - - - - ea34d02e by David Waern at 2008-01-06T16:36:57+00:00 Change version to 2.0.0.0 - - - - - 34631ac0 by David Waern at 2008-01-06T16:44:57+00:00 Add missing modules to the cabal file - - - - - 9e142935 by David Waern at 2008-01-06T17:25:42+00:00 Depend on ghc >= 6.8.2 && < 6.9 - - - - - 59f9eeaa by Simon Marlow at 2007-12-20T10:43:04+00:00 add build scripts - - - - - 1c29ae30 by Simon Marlow at 2007-12-20T10:47:07+00:00 update version number - - - - - fe16a3e4 by Simon Marlow at 2007-12-20T10:48:03+00:00 update version - - - - - f688530f by Simon Marlow at 2007-12-20T10:48:29+00:00 doc updates - - - - - ce71b611 by David Waern at 2008-01-07T13:46:32+00:00 Change version in docs and spec - - - - - 03ab8d6f by David Waern at 2008-01-07T13:47:38+00:00 Manually merge over changes to CHANGES for 0.9 - - - - - 39f1b042 by David Waern at 2008-01-07T15:17:41+00:00 Remove the -use-package flag, we don't support it anyway - - - - - 7274a544 by David Waern at 2008-01-07T15:33:05+00:00 Update CHANGES for 2.0.0.0 - - - - - 96594f5d by David Waern at 2008-01-07T15:46:49+00:00 Wibble - - - - - f4c5a4c4 by David Waern at 2008-01-07T15:55:36+00:00 Change url to repo in documentation - - - - - 8a4c77f0 by David Waern at 2008-01-07T16:00:54+00:00 Update CHANGES - - - - - cb3a9288 by David Waern at 2008-01-07T16:02:55+00:00 Documentation fix - - - - - d8e45539 by David Waern at 2008-01-07T16:12:00+00:00 Update docs to say that Haddock accets .lhs files and module names - - - - - 4b5ce824 by David Waern at 2008-01-07T16:12:25+00:00 Document -B option - - - - - 47274262 by David Waern at 2008-01-07T16:23:07+00:00 Update CHANGES - - - - - 7ff314a9 by David Waern at 2008-01-07T16:23:20+00:00 Remove --use-package, --package & --no-implicit.. flags from docs - - - - - 6c3819c0 by David Waern at 2008-01-07T16:23:52+00:00 Remove --no-implicit-prelide flag - - - - - 1b14ae40 by David Waern at 2008-01-07T16:32:26+00:00 Update the "Using literate or pre-processed source" section - - - - - 0117f620 by David Waern at 2008-01-07T16:41:55+00:00 Document the --optghc flag - - - - - 087ab1cf by David Waern at 2008-01-07T16:42:10+00:00 Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 - - - - - 7253951e by David Waern at 2008-01-07T16:48:40+00:00 Document OPTIONS_HADDOCK - - - - - 3b6bdcf6 by David Waern at 2008-01-07T16:56:54+00:00 Wibble - - - - - 3025adf9 by David Waern at 2008-01-07T17:08:14+00:00 Wibble - - - - - 5f30f1a0 by David Waern at 2008-01-07T17:15:44+00:00 Change synopsis field to description - - - - - 1673f54b by David Waern at 2008-01-07T17:18:21+00:00 Change my email address in the cabal file - - - - - 55aa9808 by David Waern at 2008-01-07T18:18:02+00:00 Add documentation for readInterfaceFile - - - - - eaea417f by David Waern at 2008-01-07T18:21:30+00:00 Export necessary stuff from Distribution.Haddock - - - - - 7ea18759 by David Waern at 2008-01-07T18:31:49+00:00 Remove dep on Cabal - - - - - 7b79c74e by David Waern at 2008-01-07T18:33:49+00:00 Remove dep on process - - - - - ce3054e6 by David Waern at 2008-01-16T23:01:21+00:00 Add feature-requsts from Henning Thielemann to TODO - - - - - 0c08f1ec by David Waern at 2008-01-16T23:03:02+00:00 Record a bug in TODO - - - - - b04605f3 by David Waern at 2008-01-23T16:59:06+00:00 Add a bug reported by Ross to TODO - - - - - 5b17c030 by David Waern at 2008-01-23T18:05:53+00:00 A a bug report to TODO - - - - - 1c993b0d by David Waern at 2008-01-25T16:30:25+00:00 Accept test output - - - - - c22fc0d0 by David Waern at 2008-01-25T16:34:49+00:00 Accept test output - - - - - 4b795811 by David Waern at 2008-01-25T16:38:37+00:00 Change Hidden.hs (test) to use OPTIONS_HADDOCK - - - - - c124dbd9 by David Waern at 2008-01-25T16:39:23+00:00 Accept test output - - - - - ec6f6eea by David Waern at 2008-01-25T16:42:08+00:00 Add Hidden.html.ref to tests - - - - - 1dc9610c by David Waern at 2008-02-02T20:50:51+00:00 Add a comment about UNPACK bug in TODO - - - - - 2d3f7081 by David Waern at 2008-02-09T22:33:24+00:00 Change the representation of DocNames Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented. - - - - - 0f28c921 by David Waern at 2008-02-09T23:00:36+00:00 H.GHC.Utils: remove unused imports/exports - - - - - 0c44cad5 by David Waern at 2008-02-10T00:28:13+00:00 H.GHC.Utils: add some functions that were removed by mistake - - - - - e3452f49 by David Waern at 2008-02-10T00:28:48+00:00 Fix some trivial warnings in H.InterfaceFile - - - - - a6d74644 by David Waern at 2008-02-10T00:48:06+00:00 Update the version message to fit in small terminals - - - - - 76c9cd3e by David Waern at 2008-02-10T14:47:39+00:00 Remove bugs from TODO that don't apply anymore since the port - - - - - 5e10e090 by David Waern at 2008-02-10T15:22:47+00:00 Remove bugs from TODO that weren't actual bugs - - - - - fef70878 by David Waern at 2008-02-10T15:23:44+00:00 Remove yet another item from TODO that was not an actual bug - - - - - e1af47b8 by David Waern at 2008-02-11T10:25:57+00:00 Bump the version number to 2.1.0 Since the exported datatype DocName has changed, we need to bump the major version number. Let's also drop the fourth version component, it's not that useful. - - - - - e3be7825 by David Waern at 2008-04-11T14:29:04+00:00 Add a bug to TODO - - - - - cb6574be by David Waern at 2008-04-11T16:00:45+00:00 Use the in-place haddock when running tests - - - - - c6d7af0d by David Waern at 2008-04-11T16:09:16+00:00 Turn off GHC warnings when running tests - - - - - 7f61b546 by David Waern at 2008-04-11T17:24:00+00:00 Add a flag for turning off all warnings - - - - - 883b8422 by David Waern at 2008-04-12T14:02:18+00:00 Fix printing of data binders - - - - - 2a0db8fc by David Waern at 2008-04-12T18:52:46+00:00 Fix missing parenthesis in constructor args bug - - - - - 1b3ac3f9 by David Waern at 2008-04-12T18:57:23+00:00 Simplify test suite and add tests I move all tests into one single directory to simplify things, and add a test for the last bug that was fixed. - - - - - 8f178376 by David Waern at 2008-04-12T19:00:15+00:00 Add a script for copying test output to "expected" output - - - - - 193e3a03 by David Waern at 2008-04-12T19:16:37+00:00 Remove two fixed bugs from TODO - - - - - ddc9130c by David Waern at 2008-04-12T19:37:06+00:00 Update test README - - - - - 956069c0 by David Waern at 2008-05-01T12:16:14+00:00 Update version number in spec and docs - - - - - 5478621c by David Waern at 2008-05-01T12:28:12+00:00 Remove claim of backwards compatibility from docs for readInterfaceFile - - - - - 4a16dea9 by David Waern at 2008-05-01T12:33:04+00:00 Update CHANGES - - - - - 804216fb by David Waern at 2008-05-01T12:43:16+00:00 Add a synopsis - - - - - fd0c84d5 by David Waern at 2008-05-01T12:44:44+00:00 Add Haddock.DocName to the cabal file - - - - - 9f4a7439 by David Waern at 2008-05-01T12:45:53+00:00 Remove -fglasgow-exts and -fasm - - - - - aee7c145 by David Waern at 2008-05-01T12:54:01+00:00 Add LANGUAGE pragmas to source files - - - - - 9a58428b by David Waern at 2008-05-01T12:54:19+00:00 Add extensions to cabal file - - - - - 494f1bee by David Waern at 2008-05-01T13:12:09+00:00 Export DocName in the API - - - - - c938196b by David Waern at 2008-05-01T13:12:19+00:00 Add hide options to some source files - - - - - 236e86af by Neil Mitchell at 2008-06-07T20:45:10+00:00 Rewrite the --hoogle flag support - - - - - 6d910950 by Neil Mitchell at 2008-06-14T10:56:50+00:00 Simplify the newtype/data outputting in Hoogle, as haddock does it automatically - - - - - f87a95a8 by Neil Mitchell at 2008-06-14T12:10:18+00:00 Add initial structure for outputting documentation as well, but does not yet output anything - - - - - 7c3bce54 by Neil Mitchell at 2008-06-14T12:27:07+00:00 Remove <document comment> from the Hoogle output - - - - - 9504a325 by Neil Mitchell at 2008-06-16T06:33:21+00:00 Default to "main" if there is no package, otherwise will clobber hoogle's hoogle info - - - - - 4a794a79 by Neil Mitchell at 2008-06-16T06:53:29+00:00 Change packageName to packageStr, as it better reflects the information stored in it - - - - - 7abc9baf by Neil Mitchell at 2008-06-16T07:09:49+00:00 Add modulePkgInfo to Haddock.GHC.Utils, which gives back package name and version info - - - - - 8ca11514 by Neil Mitchell at 2008-06-16T07:13:48+00:00 Change Hoogle to take the package name and package version separately - - - - - a6da452d by Neil Mitchell at 2008-06-18T11:29:46+00:00 In Hoogle do not list things that are not local to this module - - - - - 974b76b7 by David Waern at 2008-06-19T18:40:13+00:00 Be more consistent with GHC API naming in H.GHC.Utils - - - - - 2facb4eb by David Waern at 2008-06-19T19:03:03+00:00 Update test output - - - - - c501de72 by David Waern at 2008-06-26T20:26:49+00:00 Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. - - - - - ac4c6836 by David Waern at 2008-06-26T20:33:08+00:00 Update CHANGES - - - - - 9d21c60a by David Waern at 2008-06-26T20:34:53+00:00 Update README - - - - - 741448f0 by David Waern at 2008-06-26T21:12:57+00:00 Improve wording in the help message - - - - - b1b42b11 by David Waern at 2008-06-30T10:16:17+00:00 Rename ForeignType - - - - - 6d6c2b34 by David Waern at 2008-06-30T10:25:09+00:00 Rename TyFamily - - - - - 8d1125ed by David Waern at 2008-06-30T10:37:21+00:00 Rename type patterns - - - - - 7610a4cb by David Waern at 2008-06-30T10:45:07+00:00 Rename associated types - - - - - 8eeba14c by David Waern at 2008-06-30T10:47:41+00:00 Remove the TODO file now that we have a trac - - - - - 1af5b25b by David Waern at 2008-07-02T18:19:28+00:00 Render type family declarations (untested) - - - - - ceb99797 by David Waern at 2008-07-02T18:24:06+00:00 Remove redundant check for summary when rendering data types - - - - - b36a58e0 by David Waern at 2008-07-02T22:01:38+00:00 More support for type families and associated types Now we just need to render the instances - - - - - 78784879 by David Waern at 2008-07-07T22:13:58+00:00 Remove filtering of instances We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later. - - - - - 3e758dad by David Waern at 2008-06-30T18:50:30+00:00 Run haddock in-place during testing - - - - - d9dab0ce by David Waern at 2008-07-08T21:04:32+00:00 Remove index.html and doc-index.html from output, they should not be versioned - - - - - 3e6c4681 by David Waern at 2008-07-08T21:06:42+00:00 Update test output following change to instance filtering - - - - - e34a3f14 by David Waern at 2008-07-12T16:48:28+00:00 Stop using the map from exported names to declarations During creation of the interface, we were using two maps: one from exported names to declarations, and one from all defined names in the module to declarations. The first contained subordinate names while the second one didn't. The first map was never used to look up names not defined in the associated module, so if we add subordinate names to the second map, we could use it everywhere. That's that this patch does. This simplifies code because we don't have to pass around two maps everywhere. We now store the map from locally defined things in the interface structure instead of the one from exported names. - - - - - 2e1d2766 by David Waern at 2008-07-12T16:55:21+00:00 Get the all locally defined names from GHC API We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API. - - - - - bf637994 by David Waern at 2008-07-13T13:09:16+00:00 Refactoring in H.Interface.Create We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names). - - - - - 547e410e by David Waern at 2008-07-13T13:34:51+00:00 Remove FastString import and FSLIT macro in H.I.Create -- they were unused - - - - - 693759d1 by David Waern at 2008-07-13T13:36:23+00:00 Remove unused import from H.I.Create - - - - - cde6e7fb by David Waern at 2008-07-13T13:51:54+00:00 Small touches - - - - - 96de8f1d by David Waern at 2008-07-20T11:21:46+00:00 Preparation for rendering instances as separate declarations We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet. - - - - - b0f824fb by David Waern at 2008-07-20T15:53:08+00:00 Follow changes to ExportDecl in Hoogle - - - - - 1192eff3 by Neil Mitchell at 2008-06-26T00:28:10+00:00 Change how the Hoogle backend outputs classes, adding the context in - - - - - 7a0d1464 by Neil Mitchell at 2008-06-26T00:28:46+00:00 Remove the indent utility function from Hoogle backend - - - - - 3361241b by Neil Mitchell at 2008-06-26T09:45:09+00:00 Add support for Hoogle writing ForeignImport/ForeignExport properly - - - - - 795ad3bf by Neil Mitchell at 2008-06-26T12:15:25+00:00 Flesh out the Hoogle code to render documentation - - - - - 23277995 by Neil Mitchell at 2008-06-26T14:56:41+00:00 Fix a bug in the Hoogle backend, unordered lists were being written out <ul>...</u> - - - - - db739b27 by Neil Mitchell at 2008-06-26T15:09:54+00:00 Remove any white space around a <li> element - - - - - f2e6bb8c by Neil Mitchell at 2008-07-10T15:30:47+00:00 Remove the TODO in the Hoogle HTML generation, was already done - - - - - 693ec9a3 by Neil Mitchell at 2008-07-10T15:53:00+00:00 Put brackets round operators in more places in the Hoogle output - - - - - 842313aa by Neil Mitchell at 2008-07-10T16:01:25+00:00 Print type signatures with brackets around the name - - - - - cf93deb0 by David Waern at 2008-07-20T17:04:22+00:00 Bump version number to 2.2.0 - - - - - 30e6a8d1 by David Waern at 2008-07-20T17:04:41+00:00 Resolve conflicts in H.B.Hoogle - - - - - 1f0071c9 by David Waern at 2008-07-23T23:05:01+00:00 Add "all" command to runtests.hs that runs all tests despite failures - - - - - f2723023 by David Waern at 2008-07-23T23:08:39+00:00 Update tests/README - - - - - c0304a11 by David Waern at 2008-07-23T23:21:15+00:00 Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. - - - - - 88a5fe71 by David Waern at 2008-07-23T23:54:16+00:00 Depend on the currently available ghc-paths versions only - - - - - 8738d97b by David Waern at 2008-07-24T10:50:44+00:00 FIX haskell/haddock#44: Propagate parenthesis level when printing documented types - - - - - 05339119 by David Waern at 2008-07-24T16:06:18+00:00 Drop unnecessary parenthesis in types, put in by the user We were putting in parenthesis were the user did. Let's remove this since it just clutters up the types. The types are readable anyway since we print parens around infix operators and do not rely on fixity levels. When doing this I discovered that we were relying on user parenthesis when printin types like (a `O` b) c. This patchs fixes this problem so that parenthesis are always inserted around an infix op application in case it is applied to further arguments, or if it's an arguments to a type constructor. Tests are updated. - - - - - b3a99828 by David Waern at 2008-07-24T10:19:43+00:00 Print parenthesis around non-atomic banged types Fixes half of haskell/haddock#44 - - - - - ab5238e0 by David Waern at 2008-07-24T22:07:49+00:00 Add a reference file for the TypeFamilies test - - - - - 1941cc11 by David Waern at 2008-07-25T17:15:53+00:00 Simplify definition of pretty and trace_ppr - - - - - e3bfa33c by David Waern at 2008-07-25T17:18:27+00:00 Warning messages Output a warning when filtering out data/type instances and associated types in instances. We don't show these in the documentation yet, and we need to let the user know. - - - - - 9b85fc89 by David Waern at 2008-07-25T17:45:40+00:00 Doc: Mention Hoogle in the Introduction - - - - - afb2dd60 by David Waern at 2008-07-25T17:49:00+00:00 Doc: update -B description - - - - - 584c0c91 by David Waern at 2008-07-25T18:11:38+00:00 Doc: describe -w flag - - - - - 77619c24 by David Waern at 2008-07-28T12:29:07+00:00 Remove TODO from cabal file - - - - - 96717d5f by David Waern at 2008-07-28T12:29:27+00:00 Support type equality predicates - - - - - c2fd2330 by David Waern at 2008-07-29T19:45:14+00:00 Move unL from H.B.Hoogle to H.GHC.Utils I like Neil's shorter unL better than unLoc from the GHC API. - - - - - c4c3bf6a by David Waern at 2008-07-29T19:47:36+00:00 Do not export ATs when not in list of subitems - - - - - bf9a7b85 by David Waern at 2008-08-03T11:42:59+00:00 Filter out ForeignExports - - - - - df59fcb0 by David Waern at 2008-08-03T14:02:51+00:00 Filter out more declarations The previous refactorings in H.I.Create introduced a few bugs. Filtering of some types of declarations that we don't handle was removed. This patch fixes this. - - - - - 2f8a958b by David Waern at 2008-08-03T15:24:07+00:00 Move reL to H.GHC.Utils so we can use it everywhere - - - - - 8ec15efd by David Waern at 2008-08-03T15:25:00+00:00 Use isVanillaLSig from GHC API instead of home brewn function - - - - - 300f93a2 by David Waern at 2008-08-03T15:25:27+00:00 Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. - - - - - 8776d1ec by David Waern at 2008-08-03T16:21:21+00:00 Filter out more declarations and keep only vanilla type sigs in classes - - - - - ea07eada by David Waern at 2008-08-03T16:48:00+00:00 Fix layout - - - - - dd5e8199 by David Waern at 2008-08-03T16:50:52+00:00 Move some utility functions from H.I.Create to H.GHC.Utils - - - - - 4a1dbd72 by David Waern at 2008-08-03T17:39:55+00:00 Do not filter out doc declarations - - - - - 0bc8dca4 by David Waern at 2008-08-03T17:47:26+00:00 Filter out separately exported ATs (take two) - - - - - af970fe8 by David Waern at 2008-08-03T22:39:17+00:00 Update CHANGES - - - - - 5436ad24 by David Waern at 2008-08-03T22:40:20+00:00 Bump version number to 2.2.1 - - - - - d66de448 by David Waern at 2008-08-05T19:00:32+00:00 Remove version restriction on ghc-paths - - - - - 534b1364 by David Waern at 2008-08-05T19:04:35+00:00 Bump version to 2.2.2 and update CHANGES - - - - - 549188ff by David Waern at 2008-08-05T19:16:49+00:00 Fix CHANGES - - - - - 0d156bb4 by Luke Plant at 2008-08-11T15:20:59+00:00 invoking haddock clarification and help - - - - - 748295cc by David Waern at 2008-08-11T18:56:37+00:00 Doc: say that the --hoogle option is functional - - - - - 43301db4 by David Waern at 2008-08-05T19:26:08+00:00 Change ghc version dependency to >= 6.8.2 - - - - - 3e5a53b6 by David Waern at 2008-08-10T22:42:05+00:00 Make H.GHC.Utils build with GHC HEAD - - - - - 7568ace0 by David Waern at 2008-08-11T19:41:54+00:00 Import Control.OldException instead of C.Exception when using ghc >= 6.9 We should really test for base version instead, but I don't currently know which version to test for. - - - - - b71ae991 by David Waern at 2008-08-12T22:40:39+00:00 Make our .haddock file version number depend on the GHC version We need to do this, since our .haddock format can potentially change whenever GHC's version changes (even when only the patchlevel changes). - - - - - 6307ce3f by David Waern at 2008-08-12T22:49:57+00:00 Remove matching on NoteTy in AttachInstances, it has been removed - - - - - 2dbcfd5f by David Waern at 2008-08-12T23:02:02+00:00 Comment out H.GHC.loadPackages - it is unused and doesn't build with ghc >= 6.9 - - - - - c74db5c2 by David Waern at 2008-08-12T23:03:58+00:00 Hide <.> from GHC import in Hoogle only for ghc <= 6.8.3 - - - - - 69a44ebb by David Waern at 2008-08-12T23:11:12+00:00 Follow changes to parseDynamic/StaticFlags - - - - - 5881f3f0 by David Waern at 2008-08-13T21:43:58+00:00 Add __GHC_PATCHLEVEL__ symbol also when building the library - - - - - 8574dc11 by David Waern at 2008-08-13T21:44:17+00:00 Follow move of package string functions from PackageConfig to Module - - - - - c9baa77f by David Waern at 2008-08-13T21:45:29+00:00 Follow extensible exceptions changes - - - - - 9092de15 by David Waern at 2008-08-13T21:46:20+00:00 Update test following Haddock version change - - - - - ebe569a4 by David Waern at 2008-08-13T21:46:54+00:00 Follow changes to parseDynamic- parseStaticFlags in GHC - - - - - b8a5ffd3 by David Waern at 2008-08-13T21:47:36+00:00 Follow changes to Binary in GHC 6.9 - - - - - edfda1cc by David Waern at 2008-08-13T21:50:17+00:00 Change ghc version dependency to >= 6.8.2 && <= 6.9 - - - - - d59be1cf by Neil Mitchell at 2008-08-12T16:02:53+00:00 Output all items, even if they are not defined in this module - ensures map comes from Prelude, not just GHC.Base - - - - - dda93b9f by Neil Mitchell at 2008-08-12T21:37:32+00:00 Add support for type synonyms to Hoogle, was accidentally missing before (woops!) - - - - - b6ee795c by Neil Mitchell at 2008-08-13T14:03:24+00:00 Generalise Hoogle.doc and add a docWith - - - - - 415e1bb2 by Neil Mitchell at 2008-08-13T14:03:46+00:00 Make Hoogle add documentation to a package - - - - - 790a1202 by Neil Mitchell at 2008-08-18T12:52:43+00:00 Use the same method to put out signatures as class methods in the Hoogle backend - - - - - ded37eba by Neil Mitchell at 2008-08-18T12:53:04+00:00 Remove Explicit top-level forall's when pretty-printing signatures - - - - - 6468c722 by Neil Mitchell at 2008-08-20T07:59:13+00:00 Simplify the code by removing not-to-important use of <.> in the Hoogle back end - - - - - 788c3a8b by Neil Mitchell at 2008-08-21T18:20:24+00:00 In the hoogle back end, markup definition lists using <i>, not <b> - - - - - 77d4b000 by Ian Lynagh at 2008-08-14T10:49:14+00:00 Add a Makefile for GHC's build system. Still won't work yet, but we're closer - - - - - 920440d7 by Ian Lynagh at 2008-08-27T18:06:46+00:00 Add haddock.wrapper - - - - - bcda925f by Ian Lynagh at 2008-08-27T18:07:02+00:00 Add a manual Cabal flag to control the ghc-paths dependency - - - - - 04d194e2 by Ian Lynagh at 2008-08-27T20:41:27+00:00 Update extensions in Cabal file Use ScopedTypeVariables instead of PatternSignatures - - - - - 12480043 by Ian Lynagh at 2008-08-27T20:41:55+00:00 Increase the upper bound on the GHC version number - - - - - b1f809a5 by Ian Lynagh at 2008-08-27T21:32:22+00:00 Fix some warnings - - - - - aea0453d by Ian Lynagh at 2008-08-28T14:22:29+00:00 Fixes for using haddock in a GHC build tree - - - - - ad23bf86 by Ian Lynagh at 2008-08-28T21:14:27+00:00 Don't use Cabal wrappers on Windows - - - - - 35858e4c by Ian Lynagh at 2008-08-29T00:07:42+00:00 Fix in-tree haddock on Windows - - - - - c2642066 by Ian Lynagh at 2008-09-03T22:35:53+00:00 follow library changes - - - - - 2eb55d50 by Ian Lynagh at 2008-09-07T18:52:51+00:00 bindist fixes - - - - - 3daa5b59 by Ian Lynagh at 2008-09-10T16:58:18+00:00 We need to tell haddock that its datasubdir is . or it can't find package.conf - - - - - 388fd8c2 by Ian Lynagh at 2008-09-10T19:47:44+00:00 Fix haddock inplace on Windows - - - - - 70a641c1 by Ian Lynagh at 2008-09-10T22:15:44+00:00 Fix installed haddock on Windows - - - - - 83c1e997 by Neil Mitchell at 2008-09-11T10:48:55+00:00 Import GHC.Paths if not IN_GHC_TREE, seems to match the use of GHC.Paths functions much better - - - - - b452519b by Ian Lynagh at 2008-09-12T12:58:24+00:00 Add a LANGUAGE ForeignFunctionInterface pragma - - - - - afbd592c by Ian Lynagh at 2008-09-12T12:59:13+00:00 Wibble imports - - - - - 547ac4ad by Ian Lynagh at 2008-09-14T15:34:22+00:00 Add a "#!/bin/sh" to haddock.wrapper - - - - - f207a807 by Ian Lynagh at 2008-09-15T10:02:32+00:00 Use "exec" when calling haddock in the wrapper - - - - - 2ee68509 by Thomas Schilling at 2008-09-15T09:09:16+00:00 Port Haddock.Interface to new GHC API. This required one bigger change: 'readInterfaceFile' used to take an optional 'Session' argument. This was used to optionally update the name cache of an existing GHC session. This does not work with the new GHC API, because an active session requires the function to return a 'GhcMonad' action, but this is not possible if no session is provided. The solution is to use an argument of functions for reading and updating the name cache and to make the function work for any monad that embeds IO, so it's result type can adapt to the calling context. While refactoring, I tried to make the code a little more self-documenting, mostly turning comments into function names. - - - - - 3bb96431 by Thomas Schilling at 2008-09-15T09:09:37+00:00 Reflect GHC API changes. - - - - - 2e60f714 by Thomas Schilling at 2008-09-15T09:10:37+00:00 Port Haddock.GHC.Typecheck to new GHC API. - - - - - 9cfd4cff by Thomas Schilling at 2008-09-15T09:11:00+00:00 Port Haddock.GHC to new GHC API. - - - - - caffa003 by Thomas Schilling at 2008-09-15T09:11:25+00:00 Port Main to new GHC API. - - - - - 069a4608 by Ian Lynagh at 2008-09-21T11:19:00+00:00 Fix paths used on Windows frmo a GHC tree: There is no whare directory - - - - - 7ceee1f7 by Ian Lynagh at 2008-09-21T12:20:16+00:00 Fix the in-tree haddock on Windows - - - - - 0d486514 by Ian Lynagh at 2008-09-23T18:06:58+00:00 Increase the GHC upper bound from 6.11 to 6.13 - - - - - f092c414 by Neil Mitchell at 2008-09-11T14:56:07+00:00 Do not wrap __ in brackets - - - - - 036bdd13 by Ian Lynagh at 2008-09-28T01:42:35+00:00 Fix building haddock when GhcProfiled=YES - - - - - 01434a89 by David Waern at 2008-09-24T20:24:21+00:00 Add PatternSignatures LANGUAGE pragma to Main and Utils - - - - - 1671a750 by David Waern at 2008-10-02T22:57:25+00:00 For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). - - - - - a25dde99 by David Waern at 2008-10-02T22:59:57+00:00 Remove ifaceEnv from Interface - it's no longer used - - - - - 610993da by David Waern at 2008-10-02T23:04:58+00:00 Write a comment about source links for type instance declarations - - - - - 5a96b5d5 by Thomas Schilling at 2008-10-03T10:45:08+00:00 Follow GHC API change of parseModule. - - - - - 5a943ae5 by Ian Lynagh at 2008-10-03T15:56:58+00:00 TAG 2008-10-03 - - - - - 76cdd6ae by Thomas Schilling at 2008-10-08T12:29:50+00:00 Only load modules once when typechecking with GHC. This still doesn't fix the memory leak since the typechecked source is retained and then processed separately. To fix the leak, modules must be processed directly after typechecking. - - - - - 7074d251 by David Waern at 2008-10-09T23:53:54+00:00 Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. - - - - - 4b9b2b2d by David Waern at 2008-10-09T23:54:49+00:00 Add some strictness annotations in Interface We add some strictness annotations to the fields of Interface, so that less GHC data is hold on to during processing. - - - - - 22035628 by David Waern at 2008-10-10T20:02:31+00:00 Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck - - - - - be637ad3 by David Waern at 2008-10-10T20:33:38+00:00 Make Haddock build with GHC 6.8.2 - - - - - 523b3404 by David Waern at 2008-10-10T21:08:09+00:00 Fix documentation for createInterfaces - - - - - e1556702 by David Waern at 2008-10-10T21:26:19+00:00 Hide H.Utils in library - - - - - a8e751c3 by David Waern at 2008-10-10T21:34:59+00:00 Add back .haddock file versioning based on GHC version It was accidentally removed in the patch for GHC 6.8.2 compatibility - - - - - 06fb3c01 by David Waern at 2008-10-10T21:47:15+00:00 Bump version number to 2.3.0 - - - - - ff087fce by David Waern at 2008-10-10T22:35:49+00:00 Add support for DocPic The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix! - - - - - 3af85bf6 by David Waern at 2008-10-10T23:34:05+00:00 Update tests - - - - - 0966873c by Simon Marlow at 2008-10-10T14:43:04+00:00 no need for handleErrMsg now, we don't throw any ErrMsgs - - - - - f1870de3 by Clemens Fruhwirth at 2008-10-10T13:29:36+00:00 Compile with wrapper but remove it for dist-install - - - - - 7b440dc2 by David Waern at 2008-10-11T14:02:25+00:00 Remove interface from LinksInfo It was there to know the documentation home module when creating a wiki link, but we already know this since we have the DocName. - - - - - e5729e6a by David Waern at 2008-10-15T20:49:18+00:00 Wibble - - - - - b2a8e01a by David Waern at 2008-10-15T21:03:36+00:00 Use type synonyms for declarations and docs in H.I.Create - - - - - be71a15b by David Waern at 2008-10-15T21:12:17+00:00 Comment out unused type family stuff completely - - - - - 91aaf075 by David Waern at 2008-10-15T21:49:04+00:00 Wibble - - - - - 42ba4eb4 by David Waern at 2008-10-15T21:53:53+00:00 Move convenient type synonym to H.Types - - - - - db11b723 by David Waern at 2008-10-15T22:14:07+00:00 Add DeclInfo to H.Types - - - - - 193552b6 by David Waern at 2008-10-15T22:15:01+00:00 Add subordinates with docs to the declaration map The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate. - - - - - 31e6eebc by David Waern at 2008-10-16T17:18:47+00:00 Wibble - - - - - 0dcbd79f by David Waern at 2008-10-16T20:58:42+00:00 Fix haskell/haddock#61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. - - - - - de47f20a by David Waern at 2008-10-16T22:06:35+00:00 Document function and improve its layout - - - - - e74e625a by Thomas Schilling at 2008-10-20T11:12:57+00:00 Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). - - - - - b63ac9a1 by David Waern at 2008-10-20T20:25:50+00:00 Make renamer consistent Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name). - - - - - f6de0bb0 by Ian Lynagh at 2008-09-19T00:54:43+00:00 TAG GHC 6.10 fork - - - - - 74599cd0 by David Waern at 2008-10-20T21:13:24+00:00 Do not save hidden modules in the .haddock file We were saving interfaces of all processed modules including those hidden using {-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links when generating the index for the libraries that come with GHC. This patch excludes modules with hidden documentation when writing .haddock files. It should fix the above problem. - - - - - 7b6742e9 by David Waern at 2008-10-21T19:54:52+00:00 Do not save hidden modules in the .haddock file (also for ghc >= 6.9) When writing the first patch, I forgot to do the fix in both branches of an #if macro. - - - - - b99b1951 by David Waern at 2008-10-22T20:04:18+00:00 Remove subordinate map and its usage It is not needed now that we store subordinate names in the DeclInfo map. - - - - - da97cddc by David Waern at 2008-10-22T20:11:46+00:00 Tidy up code in H.I.Create a little Remove commented out half-done type instance support, and remove DeclWithDoc synonym. - - - - - 6afa76f3 by David Waern at 2008-10-22T21:17:29+00:00 Fix warnings in H.GHC.Utils - - - - - 171ea1e8 by David Waern at 2008-10-22T21:35:04+00:00 Fix warnings in H.Utils - - - - - c8cb3b91 by David Waern at 2008-10-22T21:36:49+00:00 Wibble - - - - - 767fa06a by David Waern at 2008-10-27T19:59:04+00:00 Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. - - - - - e638bbc6 by David Waern at 2008-11-02T22:21:10+00:00 Add HCAR entry - - - - - 92b4ffcf by David Waern at 2008-11-02T22:44:19+00:00 Update CHANGES - - - - - 84d4da6e by David Waern at 2008-11-03T11:25:04+00:00 Add failing test for template haskell crash - - - - - 2a9cd2b1 by David Waern at 2008-11-04T21:13:44+00:00 Add tests/TH.hs - - - - - 8a59348e by David Waern at 2008-11-04T21:30:26+00:00 TAG 2.3.0 - - - - - 54f70d31 by Thomas Schilling at 2008-10-24T17:04:08+00:00 Enable framed view of the HTML documentation. This patch introduces: - A page that displays the documentation in a framed view. The left side will show a full module index. Clicking a module name will show it in the right frame. If Javascript is enabled, the left side is split again to show the modules at the top and a very short synopsis for the module currently displayed on the right. - Code to generate the mini-synopsis for each module and the mini module index ("index-frames.html"). - CSS rules for the mini-synopsis. - A very small amount of javascript to update the mini-synopsis (but only if inside a frame.) Some perhaps controversial things: - Sharing code was very difficult, so there is a small amount of code duplication. - The amount of generated pages has been doubled, since every module now also gets a mini-synopsis. The overhead should not be too much, but I haven't checked. Alternatively, the mini-synopsis could also be generated using Javascript if we properly annotate the actual synopsis. - - - - - 5d7ea5a6 by David Waern at 2008-11-04T23:20:17+00:00 Follow change to ExportDecl in frames code - - - - - 60e16308 by David Waern at 2008-11-04T23:35:26+00:00 Update CHANGES - - - - - d63fd26d by David Waern at 2008-11-04T23:37:43+00:00 Bump version number - - - - - c1660c39 by David Waern at 2008-11-04T23:44:46+00:00 Update CHANGES - - - - - 995ab384 by David Waern at 2008-11-04T23:55:21+00:00 Remove .ref files from tests/output/ - - - - - 1abbbe75 by David Waern at 2008-11-04T23:57:41+00:00 Output version info before running tests - - - - - 649b182f by David Waern at 2008-11-05T22:45:37+00:00 Add ANNOUNCE message - - - - - c36ae0bb by David Waern at 2008-11-05T23:15:35+00:00 Update ANNOUNCE - - - - - 9c4f3d40 by David Waern at 2008-11-05T23:18:30+00:00 Wibble - - - - - 5aac87ce by David Waern at 2008-11-06T21:07:48+00:00 Depend on base 4.* when using GHC >= 6.9, otherwise 3.* - - - - - b9796a74 by David Waern at 2008-11-06T21:13:40+00:00 Bump version to 2.4.1 and update CHANGES - - - - - d4b26baa by David Waern at 2008-11-06T21:26:33+00:00 Depend on base 4.0.* instead of 4.* - - - - - 2cb0903c by David Waern at 2008-11-06T21:46:53+00:00 Fix warnings in H.B.HH and H.B.HH2 - - - - - e568e89a by David Waern at 2008-11-06T21:47:12+00:00 Fix warnings in Haddock.ModuleTree - - - - - 9dc14fbd by David Waern at 2008-11-06T21:47:52+00:00 Fix warnings in Haddock.Version - - - - - 02ac197c by David Waern at 2008-11-06T21:51:31+00:00 Fix warnings in H.InterfaceFile and H.Options - - - - - 63e7439a by David Waern at 2008-11-06T21:59:45+00:00 Fix warnings in H.GHC.Typecheck - - - - - 4bca5b68 by David Waern at 2008-11-08T13:43:42+00:00 Set HscTarget to HscNothing instead of HscAsm There used to be a bug in the GHC API that prevented us from setting this value. - - - - - 07357aec by David Waern at 2008-11-09T22:27:00+00:00 Re-export NameCache and friends from Distribution.Haddock - - - - - ea554b5a by David Waern at 2008-11-09T23:14:10+00:00 Add Haddock.GHC.Utils to other-modules in library - - - - - 74aecfd7 by David Waern at 2008-11-10T01:18:57+00:00 Export DocName in the library - - - - - 241a58b3 by David Waern at 2008-11-10T01:19:18+00:00 Document the functions in H.DocName - - - - - edc2ef1b by David Waern at 2008-11-10T01:20:52+00:00 Export H.DocName in the library - - - - - 4f588d55 by David Waern at 2008-11-10T01:29:14+00:00 Make DocName an instance of NamedThing - - - - - b4647244 by David Waern at 2008-11-15T22:58:18+00:00 Reflect version bump in test suite - - - - - 4bee8ce2 by David Waern at 2008-11-15T22:58:45+00:00 Update tests For unknown reasons, test output for Bug1 and Test has changed for the better. - - - - - 1690e2f9 by David Waern at 2008-11-15T22:59:33+00:00 Store hidden modules in .haddock files We store documentation for an entity in the 'InstalledInterface' of the definition site module, and never in the same structure for a module which re-exports the entity. So when a client of the Haddock library wants to look up some documentation, he/she might need to access a hidden module. But we currently don't store hidden modules in the .haddock files. So we add the hidden modules and the Haddock options to the .haddock files. The options will be used to filter the module list to obtain the visible modules only, which is necessary for generating the contents and index for installed packages. - - - - - 8add6435 by David Waern at 2008-11-16T14:35:50+00:00 Bump major version number due to .haddock file format change - - - - - 48bfcf82 by David Waern at 2008-11-23T14:32:52+00:00 Update tests to account for version number bump - - - - - 0bbd1738 by David Waern at 2008-11-23T14:33:31+00:00 HADDOCK_DATA_DIR changed to haddock_datadir - - - - - 5088b78c by David Waern at 2008-11-23T17:13:21+00:00 FIX haskell/haddock#45: generate two anchors for each name We generate two anchor tags for each name, one where we don't escape the name and one where we URI-encode it. This is for compatibility between IE and Opera. Test output is updated. - - - - - 5ee5ca3b by Neil Mitchell at 2008-11-27T14:38:11+00:00 Drop HsDocTy annotations, they mess up pretty printing and also have a bracketing bug (#2584) - - - - - 51c014e9 by Roman Cheplyaka at 2008-11-27T22:27:36+00:00 Allow referring to a specific section within a module in a module link Fixes haskell/haddock#65 - - - - - 4094bdc5 by David Waern at 2008-11-28T21:13:33+00:00 Update tests following anchor change - - - - - f89552dd by Thomas Schilling at 2008-11-29T16:16:20+00:00 Haddock really shouldn't try to overwrite files. - - - - - 98127499 by David Waern at 2008-12-07T14:09:15+00:00 Solve conflict - - - - - 319356c5 by David Waern at 2008-10-22T21:16:55+00:00 Add -Wall -Werror to ghc-options - - - - - 3c4968c9 by David Waern at 2008-11-04T23:38:56+00:00 TAG 2.4.0 - - - - - 4b21e003 by David Waern at 2008-11-06T21:14:04+00:00 TAG 2.4.1 - - - - - 8e0cad5c by David Waern at 2008-12-07T14:12:54+00:00 Remove -Werror - - - - - 299d6deb by David Waern at 2008-12-07T14:25:18+00:00 Remove -Wall, we'll focus on warnings after 6.10.2 is out - - - - - 5f4216b6 by David Waern at 2008-12-07T20:58:05+00:00 Resolve conflict properly - - - - - 67d774e7 by Neil Mitchell at 2008-12-15T11:44:26+00:00 Make forall's in constructors explicit, i.e. data Foo = Foo {foo :: Eq a => a} - - - - - 61851792 by Neil Mitchell at 2008-12-18T15:39:39+00:00 Try and find a better package name than "main" for Hoogle, goes wrong when working on an executable rather than a library - - - - - 2fab8554 by David Waern at 2008-12-08T23:19:48+00:00 Make visible names from ExportItems Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment. - - - - - 7caadd8c by Ian Lynagh at 2008-12-11T17:01:04+00:00 Wrap the GHC usage with defaultCleanupHandler This fixes a bug where haddock leaves /tmp/ghc* directories uncleaned. - - - - - 7c9fc9a5 by David Waern at 2009-01-02T21:38:27+00:00 Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. - - - - - 119e4e05 by David Waern at 2009-01-06T23:34:17+00:00 Do not process boot modules We should of course not try to produce documentation for boot modules! The reason this has worked in the past is that the output of "real" modules overwrites the output of boot modules later in the process. However, this causes a subtle link environment problem. So let's get rid of this stupid behaviour. We avoid processing boot modules, but we continue to typecheck them. - - - - - c285b9d2 by David Waern at 2009-01-08T18:03:36+00:00 Export modules also when coming from external packages This seems to have regressed since a refactoring that was part of the 2.3.0 release. - - - - - 24031c17 by David Waern at 2009-01-10T15:26:26+00:00 Change version to 2.4.2 - no need to go to 2.5.0 - - - - - 864d1c3f by David Waern at 2009-01-10T15:35:20+00:00 Update tests to account for version number change - - - - - 524ba886 by David Waern at 2009-01-10T18:29:17+00:00 Add test for Template Haskell splicing - - - - - 05e6e003 by David Waern at 2009-01-10T19:35:42+00:00 Fix Trac haskell/haddock#68: Turn on compilation via C for Template Haskell packages We can't use HscNothing if we need to run code coming from modules inside the processed package during typechecking, which is the case for some packages using Template Haskell. This could be improved, to e.g. use HscInterpreted and HscNothing where possible, instead of using HscC for all modules in the package. - - - - - 2b2bafa1 by David Waern at 2009-01-10T20:22:25+00:00 Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above - - - - - bedc3a93 by Ian Lynagh at 2009-01-11T14:58:41+00:00 Fix the location of INPLACE_PKG_CONF; fixes the build Spotted by Conal Elliott - - - - - 943107c8 by David Waern at 2009-01-20T19:27:39+00:00 Document H.I.Create.collectDocs better - - - - - c6252e37 by David Waern at 2009-01-20T19:29:51+00:00 Fix Trac haskell/haddock#59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). - - - - - 3568a6af by David Waern at 2009-01-21T21:41:48+00:00 Do not indicate that a constructor argument is unboxed We only show the strictness annotation for an unboxed constructor argument. The fact that it is unboxed is an implementation detail and should not be part of the module interface. - - - - - 562a4523 by David Waern at 2009-01-22T18:53:49+00:00 Fix Trac haskell/haddock#50: do not attach docs to pragmas or other kinds of non-declarations We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations. - - - - - 6fdf21c2 by David Waern at 2009-01-22T19:48:09+00:00 Add test for quasi quotation. No reference output yet. - - - - - dc4100fd by David Waern at 2009-01-22T19:57:47+00:00 Improve quasi-quotation test and add reference output - - - - - 908b74bb by David Waern at 2009-01-23T23:22:03+00:00 Filter out separately exported associated types in a smarter way - - - - - f6b42ecb by David Waern at 2009-01-24T16:54:39+00:00 Correct spelling mistake in error message - - - - - 24e4245d by David Waern at 2009-01-24T17:48:03+00:00 Correct comment - - - - - b5e8462f by David Waern at 2009-02-07T13:22:29+00:00 Do not show a subordinate at the top level if its parent is also exported See note in the source code for more info. - - - - - 4b09de57 by David Waern at 2009-02-07T13:53:53+00:00 Update test following change to top level subordinates - - - - - 76379896 by David Waern at 2009-02-07T13:58:04+00:00 Remove html files in the tests/output/ directory which have been accidentally added - - - - - 1a6d8b10 by Joachim Breitner at 2009-02-20T10:29:43+00:00 Typo in comment - - - - - fec367d0 by David Waern at 2009-02-24T20:21:17+00:00 Fix small bug The rule is to prefer type constructors to other things when an identifier in a doc string can refer to multiple things. This stopped working with newer GHC versions (due to a tiny change in the GHC renamer). We implement this rule in the HTML backend for now, instead of fixing it in GHC, since we will move renaming of doc strings to Haddock in the future anyway. - - - - - 9b4172eb by David Waern at 2009-02-25T20:04:38+00:00 Fix bad error handling with newer GHCs When support for GHC 6.10 was added, an error handler was installed only around the typechecking phase. This had the effect that errors thrown during dependency chasing were caught in the top-level exception handler and not printed with enough detail. With this patch we wrap the error handler around all our usage of the Ghc monad. - - - - - de2df363 by Simon Peyton Jones at 2009-02-02T16:47:42+00:00 Hide funTyConName, now exported by TypeRep - - - - - 4d40a29f by Ian Lynagh at 2009-02-12T18:57:49+00:00 Don't build the library when building in the GHC tree - - - - - 1cd0abe4 by Ian Lynagh at 2009-02-13T13:58:53+00:00 Add a ghc.mk - - - - - 3d814eeb by Ian Lynagh at 2009-02-13T18:50:28+00:00 do .depend generation for haddock with the stage1 compiler This is a bit of a hack. We mkdepend with stage1 as if .depend depends on the stage2 compiler then make goes wrong: haddock's .depend gets included, which means that make won't reload until it's built, but we can't build it without the stage2 compiler. We therefore build the stage2 compiler before its .depend file is available, and so compilation fails. - - - - - b55036a4 by Ian Lynagh at 2009-02-25T01:38:13+00:00 Give haddock a wrapper on unix in the new GHC build system - - - - - 9eabfe68 by Ian Lynagh at 2009-02-25T19:21:32+00:00 Create inplace/lib/html in the new GHC build system - - - - - 93af30c7 by Ian Lynagh at 2008-11-07T19:18:23+00:00 TAG GHC 6.10.1 release - - - - - 06e6e34a by Thomas Schilling at 2009-02-24T18:11:00+00:00 Define __GHC_PATCHLEVEL__ for recent version of GHC (stable). - - - - - 680e6ed8 by Thomas Schilling at 2009-02-24T18:12:26+00:00 'needsTemplateHaskell' is not defined in current stable GHC. - - - - - 6c5619df by David Waern at 2009-02-25T22:15:23+00:00 Hide fynTyConName only for recent GHC versions - - - - - 6b2344f1 by Ian Lynagh at 2009-02-26T00:49:56+00:00 Add the module to one of haddocks warnings - - - - - e5d11c70 by David Waern at 2009-02-27T21:37:20+00:00 Bug fix We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates. - - - - - 10a79a60 by David Waern at 2009-02-27T22:08:08+00:00 Fix error message conflict The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now. - - - - - c5055c7f by David Waern at 2009-02-27T22:15:17+00:00 Shorten warning message - - - - - a72fed3a by David Waern at 2009-02-28T00:53:55+00:00 Do not show package name in warning message - - - - - a5daccb2 by Ian Lynagh at 2009-03-01T14:59:35+00:00 Install haddock in the new GHC build system - - - - - dfdb025c by Ian Lynagh at 2009-03-07T23:56:29+00:00 Relax base dependency to < 4.2, not < 4.1 - - - - - 5769c8b4 by David Waern at 2009-03-21T14:58:52+00:00 Bump .haddock file version number (due to change of format) - - - - - f1b8f67b by David Waern at 2009-03-21T14:59:26+00:00 Define __GHC_PATCHLEVEL__=1 when using ghc-6.10.1 - - - - - 23f78831 by David Waern at 2009-03-21T16:40:52+00:00 Update CHANGES - - - - - 7d2735e9 by David Waern at 2009-03-21T16:50:33+00:00 Update ANNOUNCE - - - - - 0771e00a by David Waern at 2009-03-21T16:54:40+00:00 Update ANNOUNCE, again - - - - - 81a6942a by David Waern at 2009-03-21T17:50:06+00:00 Don't be too verbose in CHANGES - - - - - 29861dcf by David Waern at 2009-03-21T18:03:31+00:00 TAG 2.4.2 - - - - - a585f285 by David Waern at 2009-03-21T19:20:29+00:00 Require Cabal >= 1.2.3 - - - - - 7c611662 by David Waern at 2009-03-21T19:21:48+00:00 TAG 2.4.2 with cabal-version >= 1.2.3 - - - - - 23b7deff by Simon Marlow at 2009-03-20T15:43:42+00:00 new GHC build system: use shell-wrappers macro - - - - - 25f8afe7 by Ian Lynagh at 2009-03-21T19:13:53+00:00 Fix (with a hack?) haddock in teh new build system - - - - - 6a29a37e by David Waern at 2009-03-24T22:10:15+00:00 Remove unnecessary LANGUAGE pragma - - - - - 954da57d by David Waern at 2009-03-24T22:21:23+00:00 Fix warnings in H.B.DevHelp - - - - - 1619f1df by David Waern at 2009-03-26T23:20:44+00:00 -Wall police in H.B.Html - - - - - b211e13b by Simon Marlow at 2009-03-24T13:00:56+00:00 install Haddock's html stuff - - - - - 78e0b107 by David Waern at 2008-12-07T19:58:53+00:00 Add verbosity flag and utils, remove "verbose" flag - - - - - 913dae06 by David Waern at 2008-12-07T20:01:05+00:00 Add some basic "verbose" mode logging in H.Interface - - - - - 1cbff3bf by David Waern at 2009-03-27T00:07:26+00:00 Fix conflicts - - - - - 22f82032 by David Waern at 2009-03-27T21:15:11+00:00 Remove H.GHC.Typecheck - - - - - 81557804 by David Waern at 2009-03-27T21:19:22+00:00 Remove docNameOrig and use getName everywhere instead - - - - - d8267213 by David Waern at 2009-03-27T21:21:46+00:00 Use docNameOcc instead of nameOccName . getName - - - - - 5d55deab by David Waern at 2009-03-27T21:33:04+00:00 Remove H.DocName and put DocName in H.Types - - - - - 8ba72611 by David Waern at 2009-03-27T22:06:26+00:00 Document DocName - - - - - 605f8ca5 by David Waern at 2009-03-27T22:45:21+00:00 -Wall police - - - - - e4da93ae by David Waern at 2009-03-27T23:12:53+00:00 -Wall police in H.B.Hoogle - - - - - bb255519 by David Waern at 2009-03-27T23:41:28+00:00 Define Foldable and Traversable instances for Located - - - - - f1195cfe by David Waern at 2009-03-27T23:51:34+00:00 Wibble - - - - - 23818d7c by David Waern at 2009-03-28T00:03:55+00:00 -Wall police in H.I.Rename - - - - - 0f050d67 by David Waern at 2009-03-28T00:15:15+00:00 -Wall police in H.I.AttachInstances - - - - - 0f3fe038 by David Waern at 2009-03-28T21:09:41+00:00 Wibble - - - - - 275d4865 by David Waern at 2009-03-28T21:27:06+00:00 Layout fix - - - - - 54ff0ef8 by David Waern at 2009-03-28T21:59:07+00:00 -Wall police in H.I.Create - - - - - 7f58b117 by David Waern at 2009-03-28T22:10:19+00:00 -Wall police in H.Interface - - - - - f0c03b44 by David Waern at 2009-03-28T22:22:59+00:00 -Wall police in Main - - - - - 29da355c by David Waern at 2009-03-28T22:23:39+00:00 Turn on -Wall -Werror - - - - - 446d3060 by David Waern at 2009-04-01T20:40:30+00:00 hlint police - - - - - 3867c9fc by David Waern at 2009-04-01T20:48:42+00:00 hlint police - - - - - bd1f1600 by David Waern at 2009-04-01T20:58:02+00:00 hlint police - - - - - e0e90866 by David Waern at 2009-04-05T12:42:53+00:00 Move H.GHC.Utils to H.GhcUtils - - - - - 9cbd426b by David Waern at 2009-04-05T12:57:21+00:00 Remove Haddock.GHC and move its (small) contents to Main - - - - - b5c2cbfd by David Waern at 2009-04-05T13:07:04+00:00 Fix whitespace and stylistic issues in Main - - - - - 3c04aa56 by porges at 2008-12-07T08:22:19+00:00 add unicode output - - - - - 607918da by David Waern at 2009-04-26T15:09:43+00:00 Resolve conflict - - - - - 4bec6b6b by Simon Marlow at 2009-05-13T10:00:31+00:00 fix markup - - - - - 436ad6f4 by Simon Marlow at 2009-03-23T11:54:45+00:00 clean up - - - - - bdcd1398 by Simon Marlow at 2009-03-24T10:36:45+00:00 new GHC build system: add $(exeext) - - - - - 9c0972f3 by Simon Marlow at 2009-03-24T11:04:31+00:00 update for new GHC build system layout - - - - - d0f3f83a by Ian Lynagh at 2009-03-29T15:31:43+00:00 GHC new build system fixes - - - - - 5a8245c2 by Ian Lynagh at 2009-04-04T20:44:23+00:00 Tweak new build system - - - - - 9c6f2d7b by Simon Marlow at 2009-05-13T10:01:27+00:00 add build instructions for GHC - - - - - 66d07c76 by Ian Lynagh at 2009-05-31T00:37:53+00:00 Quote program paths in ghc.mk - - - - - bb7de2cd by Ian Lynagh at 2009-06-03T22:57:55+00:00 Use a bang pattern on an unlifted binding - - - - - 3ad283fc by Ian Lynagh at 2009-06-13T16:17:50+00:00 Include haddock in GHC bindists - - - - - ac447ff4 by David Waern at 2009-06-24T21:07:50+00:00 Delete Haddock.Exception and move contents to Haddock.Types Only a few lines of code that mainly declares a type - why not just put it in Haddock.Types. - - - - - 4464fb9b by David Waern at 2009-06-24T22:23:23+00:00 Add Haddock module headers Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock at projects.haskell.org. Next step is to add a brief description to each module. - - - - - 5f4c95dd by David Waern at 2009-06-24T22:39:44+00:00 Fix spelling error - - - - - 6d074cdb by David Waern at 2009-06-25T21:53:56+00:00 Document Interface and InstalledInterface better - - - - - d0cbd183 by David Waern at 2009-06-27T12:46:46+00:00 Remove misplaced whitespace in H.I.Rename - - - - - fa381c49 by David Waern at 2009-06-27T13:26:03+00:00 Fix haskell/haddock#104 - create output directory if missing - - - - - 91fb77ae by Ian Lynagh at 2009-06-25T15:59:50+00:00 TAG 2009-06-25 - - - - - 0d853f40 by Simon Peyton Jones at 2009-07-02T15:35:22+00:00 Follow extra field in ConDecl - - - - - b201735d by Ian Lynagh at 2009-07-05T16:50:35+00:00 Update Makefile for the new GHC build system - - - - - df6c0092 by Ian Lynagh at 2009-07-05T17:01:13+00:00 Resolve conflicts - - - - - 1066870a by Ian Lynagh at 2009-07-05T17:01:48+00:00 Remove the -Wwarn hack in the GHC build system - - - - - 7e856076 by Ian Lynagh at 2009-07-05T17:17:59+00:00 Fix warnings - - - - - 5d4cd958 by Ian Lynagh at 2009-07-05T19:35:40+00:00 Bump version number Cabal needs to distinguish between haddocks having a --verbose and --verbosity flag - - - - - 6ee07c99 by David Waern at 2009-07-06T20:14:57+00:00 Wibble - - - - - 2308b66f by David Waern at 2009-07-06T20:24:20+00:00 Clearer printing of versions by runtests.hs - - - - - d4b5d9ab by David Waern at 2009-07-06T21:22:42+00:00 Fix (invisible) bug introduced by unicode patch - - - - - 2caca8d8 by David Waern at 2009-07-06T21:44:10+00:00 Use HscAsm instead of HscC when using TH - - - - - 18f3b755 by David Waern at 2009-07-06T22:10:22+00:00 Update HCAR entry (by Janis) - - - - - a72ac9db by David Waern at 2009-07-06T23:01:35+00:00 Follow HsRecTy change with an #if __GLASGOW_HASKEL__ >= 611 - - - - - 549135d2 by David Waern at 2009-07-06T23:11:41+00:00 Remove unused functions from Haddock.Utils - - - - - b450134a by Isaac Dupree at 2009-07-11T14:59:00+00:00 revert to split-index for large indices - remove the search-box, because browsers have search-for-text abilities anyway. - pick 150 items in index as the arbitrary time at which to split it - notice the bug that identifiers starting with non-ASCII characters won't be listed in split-index, but don't bother to fix it yet (see ticket haskell/haddock#116, http://trac.haskell.org/haddock/ticket/116 ) - - - - - 78a5661e by Isaac Dupree at 2009-07-20T15:37:18+00:00 Implement GADT records in HTML backend - - - - - 4e163555 by Isaac Dupree at 2009-07-21T22:03:25+00:00 add test for GADT records - - - - - 79aa4d6e by David Waern at 2009-07-23T20:40:37+00:00 Update test suite following version bump - - - - - 5932c011 by David Waern at 2009-08-02T10:25:39+00:00 Fix documentation bug - - - - - a6970fca by David Waern at 2009-08-12T23:08:53+00:00 Remove support for ghc 6.8.* from .cabal file - - - - - c1695902 by Ian Lynagh at 2009-07-07T13:35:45+00:00 Fix unused import warnings - - - - - fb6df7f9 by Ian Lynagh at 2009-07-16T00:20:31+00:00 Use cProjectVersion directly rather than going through compilerInfo Fixes the build after changes in GHC - - - - - 548cdd66 by Simon Marlow at 2009-07-28T14:27:04+00:00 follow changes in GHC's ForeignType - - - - - 9395aaa0 by David Waern at 2009-08-13T22:17:33+00:00 Switch from PatternSignatures to ScopedTypeVariables in Main - - - - - eebf39bd by David Waern at 2009-08-14T17:14:28+00:00 Version .haddock files made with GHC 6.10.3/4 correclty - - - - - 58f3e735 by David Waern at 2009-08-14T17:19:37+00:00 Support GHC 6.10.* and 6.11.* only - - - - - 5f63cecc by David Waern at 2009-08-14T22:03:20+00:00 Do not version .haddock file based on GHC patchlevel version We require that the instances of Binary that we use from GHC will not change between patchlevel versions. - - - - - d519de9f by David Waern at 2009-08-14T23:50:00+00:00 Update CHANGES - - - - - 35dccf5c by David Waern at 2009-08-14T23:51:38+00:00 Update version number everywhere - - - - - 6d363fea by David Waern at 2009-08-15T09:46:49+00:00 Update ANNOUNCE - - - - - c7ee6bc2 by David Waern at 2009-08-15T09:47:13+00:00 Remove -Werror Forgot that Hackage doesn't like it. - - - - - a125c12b by David Waern at 2009-08-15T09:49:50+00:00 Require Cabal >= 1.6 - - - - - adb2f560 by Isaac Dupree at 2009-08-12T03:47:14+00:00 Cross-Package Documentation version 4 - - - - - 3d6dc04d by David Waern at 2009-08-15T23:42:57+00:00 Put all the IN_GHC_TREE stuff inside getGhcLibDir - - - - - 56624097 by David Waern at 2009-08-15T23:52:03+00:00 Add --print-ghc-libdir - - - - - f15d3ccb by David Waern at 2009-08-16T00:37:52+00:00 Read base.haddock when running tests We can now test cross-package docs. - - - - - 283f0fb9 by David Waern at 2009-08-16T00:50:59+00:00 Update test output - we now have more links - - - - - 673d1004 by David Waern at 2009-08-16T01:26:08+00:00 Read process.haddock when running tests - - - - - 0d127f82 by David Waern at 2009-08-16T01:43:04+00:00 Add a test for cross-package documentation - - - - - f94db967 by Ian Lynagh at 2009-08-16T18:42:44+00:00 Follow GHC build system changes - - - - - 5151278a by Isaac Dupree at 2009-08-16T19:58:05+00:00 make cross-package list types look nicer - - - - - c41e8228 by Isaac Dupree at 2009-08-18T01:47:47+00:00 Haddock.Convert: export more functions This lets us remove some code in Haddock.Interface.AttachInstances - - - - - 2e5fa398 by Isaac Dupree at 2009-08-18T02:11:05+00:00 switch AttachInstances to use synify code It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication! - - - - - b8b07123 by Isaac Dupree at 2009-08-18T02:23:31+00:00 Find instances using GHC, which is more complete. In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?) - - - - - 6959b451 by Isaac Dupree at 2009-08-17T00:37:18+00:00 fix preprocessor conditional sense - - - - - 942823af by Isaac Dupree at 2009-08-16T22:46:48+00:00 remove ghc 6.8 conditionals from Haddock.Interface - - - - - 4b3ad888 by Isaac Dupree at 2009-08-18T20:24:38+00:00 Fix GHC 6.11 build in Haddock.Convert - - - - - 0a89c5ab by Isaac Dupree at 2009-08-23T00:08:58+00:00 hacks to make it compile without fnArgDocsn - - - - - 7b3bed43 by Isaac Dupree at 2009-08-23T03:01:28+00:00 less big-Map-based proper extraction of constructor subdocs - - - - - b21c279a by Isaac Dupree at 2009-08-23T03:02:06+00:00 Html: remove unnecessary+troublesome GHC. qualifications - - - - - 96c97115 by Isaac Dupree at 2009-08-23T03:08:03+00:00 Move doc parsing/lexing into Haddock for ghc>=6.11 - - - - - e1cec02d by Isaac Dupree at 2009-08-23T05:08:14+00:00 get rid of unused DocMap parameter in Html - - - - - 66960c59 by Isaac Dupree at 2009-08-23T05:54:20+00:00 fix horrible named-docs-disappearing bug :-) - - - - - a9d7eff3 by Isaac Dupree at 2009-08-23T06:26:36+00:00 re-implement function-argument docs ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently. - - - - - 8bf6852c by Isaac Dupree at 2009-08-23T07:26:05+00:00 cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! - - - - - 30115a64 by Isaac Dupree at 2009-08-23T18:22:47+00:00 Improve behavior for unfindable .haddock - - - - - aa364bda by Isaac Dupree at 2009-08-23T18:28:16+00:00 add comment for FnArgsDoc type - - - - - 49b23a99 by Isaac Dupree at 2009-08-23T21:52:48+00:00 bugfix: restore fnArgDocs for type-synonyms - - - - - f65f9467 by Isaac Dupree at 2009-08-23T22:06:55+00:00 Backends.Hoogle: eliminate warnings - - - - - a292d216 by Isaac Dupree at 2009-08-23T22:10:24+00:00 Haddock.Convert: eliminate warnings - - - - - 5546cd20 by Isaac Dupree at 2009-08-23T22:12:31+00:00 Haddock.Interface.Rename: eliminate warnings - - - - - 0a9798b6 by Isaac Dupree at 2009-08-23T22:18:47+00:00 Main.hs: remove ghc<6.9 conditionals - - - - - e8f9867f by Isaac Dupree at 2009-08-23T22:27:46+00:00 Main.hs: eliminate warnings (except for OldException) - - - - - 61c64247 by Isaac Dupree at 2009-08-23T22:41:01+00:00 move get*LibDir code in Main.hs, to +consistent code, -duplication - - - - - 948f1e69 by Isaac Dupree at 2009-08-23T23:14:26+00:00 Main.hs: OldException->Exception: which eliminates warnings - - - - - 3d5d5e03 by Isaac Dupree at 2009-08-23T23:20:11+00:00 GhcUtils: ghc >= 6.10 - - - - - 2771d657 by Isaac Dupree at 2009-08-23T23:21:55+00:00 InterfaceFile: ghc >= 6.10 - - - - - d9f2b9d1 by Isaac Dupree at 2009-08-23T23:22:58+00:00 Types: ghc >= 6.10 - - - - - ca39210e by Isaac Dupree at 2009-08-23T23:23:26+00:00 ModuleTree: ghc >= 6.10 - - - - - 883c4e59 by Isaac Dupree at 2009-08-23T23:24:04+00:00 Backends.DevHelp: ghc >= 6.10 - - - - - 04667df5 by Isaac Dupree at 2009-08-23T23:24:37+00:00 Backends.Html: ghc >= 6.10 - - - - - a9f7f25f by Isaac Dupree at 2009-08-23T23:25:24+00:00 Utils: ghc >= 6.10 - - - - - b7105022 by Isaac Dupree at 2009-08-23T23:37:47+00:00 eliminate haskell98 dependency, following GHC's example It turns out I/we already had, and it was only a matter of deleting it from the cabal file. - - - - - 292e0911 by Isaac Dupree at 2009-08-24T01:22:44+00:00 refactor out subordinatesWithNoDocs dep of inferenced-decls fix - - - - - c2ed46a2 by Isaac Dupree at 2009-08-24T01:24:03+00:00 Eradicate wrong runtime warning for type-inferenced exported-functions see the long comment in the patch for why I did it this way :-) - - - - - 4ac0b57c by David Waern at 2009-09-04T22:56:20+00:00 Clean up tyThingToHsSynSig a little Factor out noLoc and use the case construct. Also rename the function to tyThingToLHsDecl, since it doesn't just create type signatures. - - - - - 28ab9201 by David Waern at 2009-09-04T22:58:50+00:00 Wibble - - - - - 0d9fe6d0 by David Waern at 2009-09-06T18:39:30+00:00 Add more copyright owners to H.I.AttachInstances - - - - - 122441b1 by David Waern at 2009-09-06T18:44:12+00:00 Style police - - - - - 1fa79463 by David Waern at 2009-09-06T18:57:45+00:00 Move toHsInstHead to Haddock.Convert and call it synifyInstHead - - - - - 0d42a8aa by David Waern at 2009-09-06T21:11:38+00:00 Use colordiff to display test results if available - - - - - ea9d8e03 by Simon Marlow at 2009-08-24T08:46:14+00:00 Follow changes in GHC's interface file format Word32 instead of Int for FastString and Name offsets - - - - - 537e051e by Simon Marlow at 2009-07-29T14:16:53+00:00 define unpackPackageId (it was removed from GHC) - - - - - 50c63aa7 by David Waern at 2009-09-09T23:18:03+00:00 Remove commented-out code - - - - - 511631fe by David Waern at 2009-09-09T23:19:05+00:00 Correct copyright in H.I.ParseModuleHeader - - - - - 898ec768 by David Waern at 2009-09-11T11:22:29+00:00 Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time. - - - - - 37bec0d5 by Simon Peyton Jones at 2009-09-11T08:28:04+00:00 Track change in HsType - - - - - eb3a97c3 by Ian Lynagh at 2009-09-11T16:07:09+00:00 Allow building with base 4.2 - - - - - bb4205ed by Ian Lynagh at 2009-09-22T13:50:02+00:00 Loosen the GHC dependency - - - - - 5c75deb2 by Ian Lynagh at 2009-09-22T14:08:39+00:00 Fix building with GHC >= 6.12 - - - - - fb131481 by David Waern at 2009-09-11T11:24:48+00:00 Update runtests.hs to work with GHC 6.11 - - - - - ac3a419d by David Waern at 2009-09-11T11:25:14+00:00 Update CrossPackageDocs test - - - - - ec65c3c6 by David Waern at 2009-09-11T11:25:40+00:00 Add reference output for CrossPackageDocs - - - - - 520c2758 by Ian Lynagh at 2009-10-25T17:26:40+00:00 Fix installation in the GHC build system - - - - - 28b3d7df by Ian Lynagh at 2009-11-05T15:57:27+00:00 GHC build system: Make *nix installation work in paths containing spaces - - - - - 5c9bb541 by David Waern at 2009-11-14T11:56:39+00:00 Track change in HsType for the right compiler version - - - - - 905097ce by David Waern at 2009-11-14T12:10:47+00:00 hlint police - - - - - 04920630 by Ian Lynagh at 2009-11-20T13:46:30+00:00 Use defaultObjectTarget rather than HscAsm This fixes haddock when we don't have a native code generator - - - - - 966eb079 by David Waern at 2009-11-15T12:32:21+00:00 Remove commented-out code - - - - - 37f00fc4 by David Waern at 2009-11-22T13:58:48+00:00 Make runtests.hs strip links before diffing Generates easier to read diffs when tests fail. The content of the links is not important anyway since it is not taken into account by the tests. - - - - - 3a9bb8ef by David Waern at 2009-11-22T14:05:06+00:00 Follow findProgramOnPath signature change in runtests.hs - - - - - b26b9e5a by David Waern at 2009-11-22T14:08:40+00:00 Follow removal of GHC.MVar from base in CrossPackageDocs - - - - - f4d90ae4 by David Waern at 2009-11-22T14:48:47+00:00 Make copy.hs strip link contents before copying No more updating of reference files when URLs in links changes. - - - - - 4c9c420d by David Waern at 2009-11-22T15:26:41+00:00 Update test reference output * More links (Int, Float etc) * Stripped link contents - - - - - a62b80e3 by David Waern at 2009-11-23T23:19:39+00:00 Update CrossPackageDocs reference output - Remove GHC.MVar import (removed from base) - Strip link contents - - - - - 43491394 by David Waern at 2009-11-23T23:20:00+00:00 Update test reference files with comments on instances - - - - - 0d370a0b by David Waern at 2009-11-23T23:25:16+00:00 Bump version number - - - - - 2293113e by David Waern at 2009-11-24T20:55:49+00:00 Comments on instances Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances - - - - - bf586f29 by David Waern at 2009-11-27T22:05:15+00:00 Whitespace police - - - - - b8f03afa by David Waern at 2009-11-27T22:11:46+00:00 Remove bad whitespace and commented-out pieces - - - - - 90b8ee90 by David Waern at 2009-11-27T22:15:04+00:00 Whitespace police - - - - - b5ede900 by David Waern at 2009-11-27T22:15:50+00:00 Whitespace police - - - - - e3fddbfe by David Waern at 2009-11-28T13:37:59+00:00 Remove Name from DocInstance It's not used. - - - - - 9502786c by David Waern at 2009-11-28T13:56:54+00:00 Require at least GHC 6.12 While regression testing Haddock, I found a bug that happens with GHC 6.10.3, but not with GHC 6.12-rc2 (haven't tried 6.10.4). I don't have time to track it down. I think we should just always require the latest major GHC version. The time spent on making Haddock work with older versions is too high compared to the time spent on bugfixing, refactoring and features. - - - - - 8fa688d8 by David Waern at 2009-11-28T15:05:03+00:00 Remove cruft due to compatibility with older GHCs - - - - - 46fbbe9d by David Waern at 2009-11-28T15:07:50+00:00 Add a documentation header to Haddock.Convert - - - - - c3d2cc4a by David Waern at 2009-11-28T15:10:14+00:00 Remove unused H.Utils.FastMutInt2 - - - - - 490aba80 by David Waern at 2009-11-28T15:36:36+00:00 Rename Distribution.Haddock into Documentation.Haddock - - - - - 33ee2397 by David Waern at 2009-11-28T15:36:47+00:00 Fix error message - - - - - a5a3b950 by David Waern at 2009-11-28T16:58:39+00:00 Add a test flag that brings in QuickCheck - - - - - fa049e13 by David Waern at 2009-11-28T19:32:18+00:00 Say that we want quickcheck 2 - - - - - f32b0d9b by David Waern at 2009-11-28T19:32:40+00:00 Add an Arbitrary instance for HsDoc - - - - - da9a8bd7 by David Waern at 2009-11-28T20:15:30+00:00 Rename HsDoc back into Doc - - - - - edb60101 by David Waern at 2009-11-28T22:16:16+00:00 Move H.Interface.Parse/Lex to H.Parse/Lex These are not just used to build Interfaces. - - - - - 0656a9b8 by David Waern at 2009-11-28T23:12:14+00:00 Update version number in test suite - - - - - 5e8c6f4a by David Waern at 2009-12-21T14:12:41+00:00 Improve doc of DocName - - - - - 7868e551 by Ian Lynagh at 2009-09-22T10:43:03+00:00 TAG GHC 6.12-branch created - - - - - 0452a3ea by Ian Lynagh at 2009-12-15T12:46:07+00:00 TAG GHC 6.12.1 release - - - - - 65e9be62 by David Waern at 2009-12-21T16:58:58+00:00 Update CHANGES - - - - - 145cee32 by David Waern at 2009-12-21T16:59:09+00:00 TAG 2.6.0 - - - - - 3c552008 by David Waern at 2009-12-22T17:11:14+00:00 Update ANNOUNCE - - - - - 931f9db4 by David Waern at 2010-01-22T19:57:17+00:00 Convert haddock.vim to use unix newlines - - - - - 4e56588f by David Waern at 2010-01-22T22:11:17+00:00 Remove unnecessary (and inexplicable) uses of nub - - - - - 744bb4d1 by David Waern at 2010-01-22T22:12:14+00:00 Follow move of parser and lexer - - - - - e34bab14 by David Waern at 2010-01-22T22:49:13+00:00 Use findProgramLocation instead of findProgramOnPath in runtests.hs - - - - - 8d39891b by Isaac Dupree at 2010-01-14T18:53:18+00:00 fix html arg-doc off-by-one and silliness - - - - - 9401f2e9 by David Waern at 2010-01-22T22:57:03+00:00 Create a test for function argument docs - - - - - 507a82d7 by David Waern at 2010-01-22T23:24:47+00:00 Put parenthesis around type signature arguments of function type - - - - - 8a305c28 by David Waern at 2010-01-23T17:26:59+00:00 Add reference file for the FunArgs test - - - - - 1309d5e1 by David Waern at 2010-01-24T16:05:08+00:00 Improve FunArg test and update Test.html.ref - - - - - 2990f055 by Yitzchak Gale at 2010-02-14T16:03:46+00:00 Do not generate illegal character in HTML ID attribute. - - - - - c5bcab7a by David Waern at 2010-02-22T22:10:30+00:00 Fix Haddock markup error in comment - - - - - c6416a73 by David Waern at 2010-02-24T22:55:08+00:00 Large additions to the Haddock API Also improved and added more doc comments. - - - - - 57d289d7 by David Waern at 2010-02-24T22:58:02+00:00 Remove unused ifaceLocals - - - - - 80528d93 by David Waern at 2010-02-25T21:05:09+00:00 Add HaddockModInfo to the API - - - - - 82806848 by David Waern at 2010-02-25T21:05:27+00:00 Wibble - - - - - 744cad4c by David Waern at 2010-02-25T23:30:59+00:00 Make it possible to run a single test - - - - - 6a806e4c by David Waern at 2010-03-14T14:19:39+00:00 Bump version number - - - - - a5a8e4a7 by David Waern at 2010-03-14T14:36:35+00:00 Update ANNOUNCE - - - - - 6f05435e by Simon Hengel at 2010-03-15T20:52:42+00:00 Add missing dependencies for 'library' in haddock.cabal - - - - - faefe2bd by David Waern at 2010-03-15T22:29:37+00:00 Solve conflicts - - - - - 9808ad52 by David Waern at 2010-03-15T22:51:21+00:00 Bump version number - - - - - eb0bf60b by David Waern at 2010-03-15T22:52:32+00:00 Update CHANGES - - - - - f95cd891 by David Waern at 2010-03-15T23:01:06+00:00 Add Paths_haddock to other-modules of library - - - - - 65997b0a by David Waern at 2010-03-15T23:14:59+00:00 Update CHANGES - - - - - 7e251731 by David Waern at 2010-03-15T23:15:30+00:00 Bump version number - - - - - c9cd0ddc by David Waern at 2010-03-16T00:28:34+00:00 Fix warning - - - - - 1cac2d93 by Simon Peyton Jones at 2010-01-04T15:22:16+00:00 Fix imports for new location of splitKindFunTys - - - - - 474f26f6 by Simon Peyton Jones at 2010-02-10T14:36:06+00:00 Update Haddock for quasiquotes - - - - - 0dcc06c0 by Simon Peyton Jones at 2010-02-10T10:59:45+00:00 Track changes in HsTyVarBndr - - - - - 2d84733a by Simon Peyton Jones at 2010-02-10T14:52:44+00:00 Track HsSyn chnages - - - - - 9e3adb8b by Ian Lynagh at 2010-02-20T17:09:42+00:00 Resolve conflicts - - - - - a3e72ff8 by Simon Peyton Jones at 2010-03-04T13:05:16+00:00 Track change in HsUtils; and use a nicer function not an internal one - - - - - 27994854 by David Waern at 2010-03-18T22:22:27+00:00 Fix build with GHC 6.12.1 - - - - - 11f6e488 by David Waern at 2010-03-18T22:24:09+00:00 Bump version in test reference files - - - - - 0ef2f11b by David Waern at 2010-03-20T00:56:30+00:00 Fix library part of cabal file when in ghc tree - - - - - 3f6146ff by Mark Lentczner at 2010-03-20T22:30:11+00:00 First, experimental XHTML rendering switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString) - - - - - b8ab329b by Mark Lentczner at 2010-03-20T22:54:01+00:00 apply changes to Html.hs to Xhtml/*.hs incorporate changes that were made between the time Html.hs was copied and split into Xhtml.hs and Xhtml/*.hs includes patchs after "Wibble" (!) through "Fix build with GHC 6.12.1" - - - - - 73df2433 by Ian Lynagh at 2010-03-20T21:56:37+00:00 Follow LazyUniqFM->UniqFM in GHC - - - - - db4f602b by David Waern at 2010-03-29T22:00:01+00:00 Fix build with GHC 6.12 - - - - - d8dca088 by Simon Hengel at 2010-04-02T16:39:55+00:00 Add missing dependencies to cabal file - - - - - e2adc437 by Simon Hengel at 2010-04-02T14:08:40+00:00 Add markup support for interactive examples - - - - - e882ac05 by Simon Hengel at 2010-04-02T14:11:53+00:00 Add tests for interactive examples - - - - - 5a07a6d3 by David Waern at 2010-04-07T17:05:20+00:00 Propagate source positions from Lex.x to Parse.y - - - - - 6493b46f by David Waern at 2010-04-07T21:48:57+00:00 Let runtests.hs die when haddock has not been built - - - - - 5e34423e by David Waern at 2010-04-07T22:01:13+00:00 Make runtests.hs slightly more readable - - - - - 321d59b3 by David Waern at 2010-04-07T22:13:27+00:00 Fix haskell/haddock#75 Add colons to the $ident character set. - - - - - 37b08b8d by David Waern at 2010-04-08T00:32:52+00:00 Fix haskell/haddock#118 Avoid being too greedy when lexing URL markup (<..>), in order to allow multiple URLs on the same line. Do the same thing with <<..>> and #..#. - - - - - df8feac9 by David Waern at 2010-04-08T00:57:33+00:00 Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. - - - - - 1ca6f84b by David Waern at 2010-04-08T01:03:06+00:00 Add ghc-prim to test suite deps - - - - - 27371e3a by Simon Hengel at 2010-04-08T19:26:34+00:00 Let parsing fails on paragraphs that are immediately followed by an example This is more consistent with the way we treat code blocks. - - - - - 83096e4a by David Waern at 2010-04-08T21:20:00+00:00 Improve function name - - - - - 439983ce by David Waern at 2010-04-10T10:46:14+00:00 Fix haskell/haddock#112 No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds. - - - - - 5c0d35d7 by David Waern at 2010-04-10T10:54:06+00:00 Rename startGhc into withGhc - - - - - dca081fa by Simon Hengel at 2010-04-12T19:09:16+00:00 Add documentation for interactive examples - - - - - c7f26bfa by David Waern at 2010-04-13T00:51:51+00:00 Slight fix to the documentation of examples - - - - - 06eb7c4c by David Waern at 2010-04-13T00:57:05+00:00 Rename Interactive Examples into Examples (and simplify explanation) - - - - - 264830cb by David Waern at 2010-05-10T20:07:27+00:00 Update CHANGES with info about 2.6.1 - - - - - 8e5d4514 by Simon Hengel at 2010-04-18T18:16:54+00:00 Add unit tests for parser - - - - - 68297f40 by David Waern at 2010-05-10T21:53:37+00:00 Improve testsuite README - - - - - f04eb6e4 by David Waern at 2010-05-11T19:14:31+00:00 Re-organise the testsuite structure - - - - - a360f710 by David Waern at 2010-05-11T19:18:03+00:00 Shorten function name - - - - - 1d5dd359 by David Waern at 2010-05-11T21:40:02+00:00 Update runtests.hs following testsuite re-organisation - - - - - ffebe217 by David Waern at 2010-05-11T21:40:10+00:00 Update runtests.hs to use base-4.2.0.1 - - - - - 635de402 by David Waern at 2010-05-11T21:41:11+00:00 Update runparsetests.hs following testsuite reorganisation - - - - - 72137910 by Ian Lynagh at 2010-05-06T20:43:06+00:00 Fix build - - - - - 1a80b76e by Ian Lynagh at 2010-05-06T22:25:29+00:00 Remove redundant import - - - - - 1031a80c by Simon Peyton Jones at 2010-05-07T13:21:09+00:00 Minor wibbles to HsBang stuff - - - - - dd8e7fe5 by Ian Lynagh at 2010-05-08T15:22:00+00:00 GHC build system: Follow "rm" variable changes - - - - - 7f5e6748 by David Waern at 2010-05-13T11:53:02+00:00 Fix build with GHC 6.12.2 - - - - - 7953d4d8 by David Waern at 2010-05-13T18:45:01+00:00 Fixes to comments only - - - - - 8ae8eb64 by David Waern at 2010-05-13T18:57:26+00:00 ModuleMap -> IfaceMap - - - - - 1c3eadc6 by David Waern at 2010-05-13T19:03:13+00:00 Fix whitespace style issues - - - - - e96783c0 by David Waern at 2010-05-13T19:08:53+00:00 Fix comment - - - - - c998a78b by David Waern at 2010-05-13T19:39:00+00:00 Position the module header the same way everywhere Silly, but nice with some consistency :-) - - - - - b48a714e by David Waern at 2010-05-13T19:41:32+00:00 Position of module header, this time in the HTML backends - - - - - f9bfb12e by David Waern at 2010-05-13T19:43:05+00:00 Two newlines between declarations in Main - - - - - 071d44c7 by David Waern at 2010-05-13T19:44:21+00:00 Newlines in Convert - - - - - 036346db by David Waern at 2010-05-13T19:46:47+00:00 Fix a few stylistic issues in H.InterfaceFile - - - - - f0b8379e by David Waern at 2010-05-13T19:47:53+00:00 Add newlines to H.ModuleTree - - - - - 27409f8e by David Waern at 2010-05-13T19:51:10+00:00 Fix stylistic issues in H.Utils - - - - - 24774a11 by David Waern at 2010-05-13T20:00:43+00:00 Structure H.Types better - - - - - 7b6f5e40 by David Waern at 2010-05-13T20:01:04+00:00 Remove bad Arbitrary instance - - - - - fac9f1f6 by David Waern at 2010-05-13T20:05:50+00:00 Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead - - - - - fe6d00c4 by David Waern at 2010-05-13T20:51:55+00:00 Export a couple of more types from the API - - - - - b2e33a5f by David Waern at 2010-05-13T21:27:51+00:00 Improve doc comment for Interface - - - - - c585f2ce by David Waern at 2010-05-13T21:30:14+00:00 Improve documentation of Haddock.Interface - - - - - e6791db2 by David Waern at 2010-05-13T22:07:35+00:00 Remove meaningless comments - - - - - 7801b390 by David Waern at 2010-05-14T17:53:33+00:00 Remove unused modules - - - - - f813e937 by David Waern at 2010-05-14T17:55:17+00:00 Re-direct compilation output to a temporary directory Also add a flag --no-tmp-comp-dir that can be used to get the old behaviour of writing compilation files to GHC's output directory (default "."). - - - - - e56737ec by David Waern at 2010-05-14T18:06:11+00:00 Wibble - - - - - e40b0447 by David Waern at 2010-05-14T19:01:52+00:00 Move flag evaluation code from Main to Haddock.Options Determining the value of "singular" flags (by e.g. taking the last occurrence of the flag) and other flag evaluation should done in Haddock.Options which is the module that is supposed to define the command line interface. This makes Main a bit easier on the eyes as well. - - - - - 27091f57 by David Waern at 2010-05-14T19:05:10+00:00 Wibble - - - - - c658cf61 by David Waern at 2010-05-14T19:06:49+00:00 Re-order things in Haddock.Options a bit - - - - - 8cfdd342 by David Waern at 2010-05-14T19:20:29+00:00 De-tabify Haddock.Options and fix other whitespace issues - - - - - 0df16b62 by David Waern at 2010-05-14T19:25:07+00:00 Improve comments - - - - - 80b38e2b by David Waern at 2010-05-14T19:26:42+00:00 Whitespace police - - - - - fe580255 by David Waern at 2010-05-14T19:31:23+00:00 Wibbles to comments - - - - - a2b43fad by David Waern at 2010-05-14T20:24:32+00:00 Move some more flag functions to Haddock.Options - - - - - 3f895547 by David Waern at 2010-05-14T20:37:12+00:00 Make renderStep a top-level function in Main - - - - - 5cdca11d by David Waern at 2010-05-14T20:39:27+00:00 Spelling in comment - - - - - ad98d14c by David Waern at 2010-05-14T20:40:26+00:00 Comment fixes - - - - - 0bb9218f by David Waern at 2010-05-14T20:49:01+00:00 Whitespace police - - - - - 0f0a533f by David Waern at 2010-05-15T16:42:29+00:00 Improve description of --dump-interface - - - - - 5b2833ac by David Waern at 2010-05-15T17:16:53+00:00 Document --no-tmp-comp-dir - - - - - 8160b170 by David Waern at 2010-05-15T17:18:59+00:00 Wibble - - - - - 570dbe33 by David Waern at 2010-05-18T21:15:38+00:00 HLint police - - - - - 204e425f by David Waern at 2010-05-18T21:16:30+00:00 HLint police - - - - - 6db657ac by David Waern at 2010-05-18T21:16:37+00:00 Wibble - - - - - b942ccd7 by Simon Marlow at 2010-06-02T08:27:30+00:00 Interrupted disappeared in GHC 6.13 (GHC ticket haskell/haddock#4100) - - - - - 3b94a819 by Simon Marlow at 2010-06-02T08:45:08+00:00 Allow base-4.3 - - - - - c5a1fb7c by Simon Marlow at 2010-06-02T09:03:04+00:00 Fix compilation with GHC 6.13 - - - - - 6181296c by David Waern at 2010-06-08T21:09:05+00:00 Display name of prologue file when parsing it fails - - - - - 7cbc6f60 by Ian Lynagh at 2010-06-13T16:20:25+00:00 Remove redundant imports - - - - - 980c804b by Simon Marlow at 2010-06-22T08:41:50+00:00 isLocalAndTypeInferenced: fix for local module names overlapping package modules - - - - - d74d4a12 by Simon Marlow at 2010-06-23T12:03:27+00:00 Unresolved identifiers in Doc get replaced with DocMonospaced rather than plain strings - - - - - d8546783 by Simon Marlow at 2010-06-30T12:45:17+00:00 LaTeX backend (new options: --latex, --latex-style=<style>) - - - - - 437afa9e by David Waern at 2010-07-01T12:02:44+00:00 Fix a few stylistic whitespace issues in LaTeX backend - - - - - 85bc1fae by David Waern at 2010-07-01T15:42:45+00:00 Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this) - - - - - 7d2eb86f by David Waern at 2010-07-01T15:43:33+00:00 Update test following Simon's patch to render unresolved names in monospaced font - - - - - 08fcbcd2 by David Waern at 2010-07-01T16:12:18+00:00 Warning police - - - - - d04a8d7a by David Waern at 2010-07-04T14:53:39+00:00 Fix a bug in attachInstances We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however. - - - - - d10344eb by Simon Hengel at 2010-07-10T09:19:04+00:00 Add missing dependencies to cabal file - - - - - 24090531 by Mark Lentczner at 2010-03-21T04:51:16+00:00 add exports to Xhtml modules - - - - - 84f9a333 by Mark Lentczner at 2010-04-03T19:14:22+00:00 clean up Doc formatting code - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up <pre> sections - - - - - bebccf52 by Mark Lentczner at 2010-04-04T04:51:08+00:00 tweak list css - - - - - 0c2aeb5e by Mark Lentczner at 2010-04-04T06:24:14+00:00 all decls now generate Html not HtmlTable - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code - - - - - dbf73e6e by Mark Lentczner at 2010-04-05T05:02:43+00:00 clean up processExport and place a div around each decl - - - - - e25b7e9f by Mark Lentczner at 2010-04-10T21:23:21+00:00 data decls are now a sequence of paragraphs, not a table - - - - - 89ee0294 by Mark Lentczner at 2010-04-10T21:29:16+00:00 removed commented out code that can't be maintained - - - - - d466f536 by Mark Lentczner at 2010-04-12T04:56:27+00:00 removed declWithDoc and cleaned up data decls in summary - - - - - ed755832 by Mark Lentczner at 2010-04-12T05:07:53+00:00 merge in markupExample changes - - - - - c36f51fd by Mark Lentczner at 2010-04-25T04:56:37+00:00 made record fields be an unordList, not a table - - - - - ed3a28d6 by Mark Lentczner at 2010-04-25T05:23:28+00:00 fixed surround of instance and constructor tables - - - - - 0e35bbc4 by Mark Lentczner at 2010-04-25T05:36:59+00:00 fix class member boxes in summary - - - - - 5041749b by Mark Lentczner at 2010-04-25T05:38:35+00:00 remove unused bodyBox - - - - - e91724db by Mark Lentczner at 2010-04-25T06:26:10+00:00 fixed javascript quoting/escpaing issue - - - - - f4abbb73 by Mark Lentczner at 2010-05-03T23:04:31+00:00 adjust css for current markup - - - - - e75fec4c by Mark Lentczner at 2010-05-04T06:14:34+00:00 added assoicated types and methods back into class decls - - - - - 84169323 by Mark Lentczner at 2010-05-24T13:13:42+00:00 merge in changes from the big-whitespace cleanup - - - - - 3c1c872e by Mark Lentczner at 2010-06-11T21:03:58+00:00 adjust synopsis and bottom bar spacing - - - - - 3c1f9ef7 by Mark Lentczner at 2010-06-11T21:14:44+00:00 fix missing space in "module" lines in synoposis - - - - - 9a137e6d by Mark Lentczner at 2010-06-11T21:34:08+00:00 changed tt elements to code elements - - - - - 50f71ef1 by Mark Lentczner at 2010-06-11T23:27:46+00:00 factored out ppInstances - - - - - 3b9a9de5 by Mark Lentczner at 2010-06-17T17:36:01+00:00 push single constructors (newtype) onto line with decl - - - - - e0f8f2ec by Mark Lentczner at 2010-06-17T22:20:56+00:00 remove <++> connector - - - - - 56c075dd by Mark Lentczner at 2010-07-13T05:26:21+00:00 change to new page structure - - - - - 04be6ca7 by Mark Lentczner at 2010-07-14T04:21:55+00:00 constructors and args as dl lists, built in Layout.hs - - - - - 65aeafc2 by Mark Lentczner at 2010-07-14T05:38:32+00:00 better interface to subDecls - - - - - 72032189 by Mark Lentczner at 2010-07-14T07:04:10+00:00 made subDecl tables looks just so - - - - - b782eca2 by Mark Lentczner at 2010-07-14T16:00:54+00:00 convert args to SubDecl format - - - - - cc75e98f by Mark Lentczner at 2010-07-14T16:28:53+00:00 convert instances to SubDecl - - - - - 34e2aa5a by Mark Lentczner at 2010-07-14T21:07:32+00:00 removing old table cruft from Layout.hs - - - - - d5810d95 by Mark Lentczner at 2010-07-14T21:54:58+00:00 methods and associated types in new layout scheme - - - - - 65ef9579 by Mark Lentczner at 2010-07-14T23:43:42+00:00 clean up synopsis lists - - - - - e523318f by Mark Lentczner at 2010-07-15T05:02:26+00:00 clean up of anchors - - - - - 1215dfc5 by Mark Lentczner at 2010-07-15T23:53:01+00:00 added two new themes and rough css switcher - - - - - 7f0fd36f by Mark Lentczner at 2010-07-16T04:57:38+00:00 fixed package catpion, added style menu - - - - - 0dd4999c by Mark Lentczner at 2010-07-16T20:12:39+00:00 new output for mini_ pages - - - - - 64b2810b by Mark Lentczner at 2010-07-16T20:58:41+00:00 reformat index-frames - - - - - 3173f555 by Mark Lentczner at 2010-07-16T22:41:53+00:00 convert index to new markup - - - - - b0a4b7c9 by Mark Lentczner at 2010-07-17T04:07:22+00:00 convert index.html to new markup, adjust module markup - - - - - 8261ae1e by Mark Lentczner at 2010-07-17T05:07:29+00:00 classing styling of ancillary pages - - - - - 2a4fb025 by Mark Lentczner at 2010-07-17T05:11:45+00:00 clean up Layout.hs: no more vanillaTable - - - - - 87eec685 by Mark Lentczner at 2010-07-17T05:35:16+00:00 clean up Util.hs - - - - - d304e9b0 by Mark Lentczner at 2010-07-17T05:38:50+00:00 qualify import of XHtml as XHtml - - - - - 7dc05807 by Mark Lentczner at 2010-07-17T06:17:53+00:00 factored out head element generation - - - - - 9cdaec9e by Mark Lentczner at 2010-07-17T06:44:54+00:00 refactored out main page body generation - - - - - 8a51019e by Mark Lentczner at 2010-07-17T06:48:20+00:00 moved footer into only place that used it - - - - - efa479da by Mark Lentczner at 2010-07-17T18:48:30+00:00 styling auxillary pages for tibbe and snappy themes - - - - - 81de5509 by Mark Lentczner at 2010-07-18T04:41:38+00:00 fixed alphabet on index page, and styling of it and packages in module lists - - - - - 20718c1a by Mark Lentczner at 2010-07-18T05:34:29+00:00 cleaned up div functions in Layout.hs - - - - - 60d50453 by Mark Lentczner at 2010-07-18T05:48:39+00:00 added content div to main pages - - - - - ed16561c by Mark Lentczner at 2010-07-18T06:12:22+00:00 add .doc class to documentation blocks - - - - - f5c781b0 by Mark Lentczner at 2010-07-19T05:20:53+00:00 refactoring of anchor ID and fragment handling - - - - - a69a93bf by Mark Lentczner at 2010-07-19T05:35:55+00:00 remove an explicit bold tag - replace with .def class - - - - - d76c7225 by Mark Lentczner at 2010-07-19T06:56:15+00:00 rename Haddock.Backends.Xhtml.Util to Utils - - - - - 5a58c0da by David Waern at 2010-07-21T13:30:54+00:00 Remove trailing whitespace in Haddock.Backends.Xhtml - - - - - 0652aa17 by David Waern at 2010-07-21T13:33:21+00:00 Align a few comments - - - - - 785776c3 by David Waern at 2010-07-21T13:39:04+00:00 Remove trailing whitespace in H.B.X.Decl - - - - - 71a30710 by David Waern at 2010-07-21T13:44:27+00:00 Remove more trailing whitespace - - - - - 38750394 by David Waern at 2010-07-21T13:50:43+00:00 Style police - - - - - 3023d940 by David Waern at 2010-07-21T14:01:22+00:00 Style police in H.B.X.Decl - - - - - df16e9e6 by David Waern at 2010-07-21T14:14:45+00:00 Style police in H.B.X.DocMarkup - - - - - 6020e321 by David Waern at 2010-07-21T14:17:32+00:00 More style police - - - - - 86ad8bf5 by David Waern at 2010-07-21T14:21:02+00:00 Style police in H.B.Xhtml - - - - - aea27d03 by David Waern at 2010-07-21T14:42:03+00:00 Fix warnings in LaTeX backend - - - - - 2aff34a9 by David Waern at 2010-07-21T14:50:46+00:00 Style police in LaTeX backend (mainly more newlines) - - - - - e517162d by David Waern at 2010-07-21T15:05:47+00:00 Doc sections in Main - - - - - b971aa0c by David Waern at 2010-07-21T15:06:17+00:00 Trailing whitespace in Documentation.Haddock - - - - - f11628fb by David Waern at 2010-07-21T15:07:06+00:00 Trailing whitespace in Haddock.Convert - - - - - cbaf284c by David Waern at 2010-07-21T15:08:11+00:00 Style police in Haddock.GhcUtils - - - - - 71feb77b by David Waern at 2010-07-21T15:09:06+00:00 Style police in Haddock.InterfaceFile - - - - - 0a9c80e6 by David Waern at 2010-07-21T15:11:33+00:00 Whitespace police - - - - - 6168376c by David Waern at 2010-07-21T15:16:35+00:00 Style police in Haddock.Utils - - - - - 9fe4dd90 by David Waern at 2010-07-21T15:19:31+00:00 Add -fwarn-tabs - - - - - a000d752 by Mark Lentczner at 2010-07-20T17:25:52+00:00 move CSS Theme functions into Themes.hs - - - - - b52b440f by Mark Lentczner at 2010-07-20T17:29:35+00:00 add Thomas Schilling's theme - - - - - e43fa7e8 by Mark Lentczner at 2010-07-21T04:49:34+00:00 correct icon used with Snappy theme - - - - - ba5092d3 by Mark Lentczner at 2010-07-21T04:56:47+00:00 apply Tibbe's updates to his theme - - - - - 7804eef6 by Mark Lentczner at 2010-07-21T05:15:49+00:00 space between "Style" and the downward triangle - - - - - 7131d4c6 by Mark Lentczner at 2010-07-21T17:43:35+00:00 merge with David's source cleanups - - - - - ee65f1cb by David Waern at 2010-07-22T16:50:46+00:00 Fix a bug where we allowed --hoogle, --latex, etc without input files - - - - - e413ff7a by David Waern at 2010-07-22T17:21:58+00:00 Improve function name - - - - - a0fd14f3 by Simon Marlow at 2010-06-30T15:34:32+00:00 fix warnings - - - - - 31f73d2a by David Waern at 2010-07-22T19:29:41+00:00 Solve conflicts - - - - - d563b4a5 by Simon Marlow at 2010-06-30T15:34:37+00:00 fix warning - - - - - 412b6469 by David Waern at 2010-07-22T19:31:28+00:00 Solve conflict - - - - - 35174b94 by Ian Lynagh at 2010-07-06T17:27:16+00:00 Follow mkPState argument order change - - - - - b5c3585c by Simon Marlow at 2010-07-14T08:49:21+00:00 common up code for instance rendering - - - - - d8009560 by Simon Marlow at 2010-07-14T12:37:11+00:00 fix warnings - - - - - a6d88695 by David Waern at 2010-07-24T15:33:33+00:00 Fix build with ghc < 6.13 - - - - - 94cf9de1 by David Waern at 2010-07-24T15:34:37+00:00 Remove conflict left-over - - - - - 313b15c0 by Mark Lentczner at 2010-07-21T22:09:04+00:00 reorganization of nhaddock.css with tibbe - - - - - 9defed80 by Mark Lentczner at 2010-07-21T22:42:14+00:00 further cleanup of nhaddock.css, float TOC, support aux. pages - - - - - 6d944c1b by Mark Lentczner at 2010-07-22T06:22:23+00:00 remove old HTML backend - - - - - b3e8cba5 by Mark Lentczner at 2010-07-22T06:43:32+00:00 remove --html-help support - it was old, out-of-date, and mostly missing - - - - - d2654a08 by Mark Lentczner at 2010-07-22T21:45:34+00:00 tweaks to nhaddock.css - - - - - f73b285c by Mark Lentczner at 2010-07-23T06:19:35+00:00 command like processing for theme selection The bulk of the change is threadnig the selected theme set through functions in Xhtml.hs so that the selected themes can be used when generating the page output. There isn't much going on in most of these changes, just passing it along. The real work is all done in Themes.hs. - - - - - 8bddc90d by Mark Lentczner at 2010-07-23T06:58:31+00:00 drop --themes support, add named theme support decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. - - - - - 20cafd4f by Mark Lentczner at 2010-07-23T17:44:29+00:00 rename --default-themes to --built-in-themes - - - - - 0fe41307 by Mark Lentczner at 2010-07-23T18:33:02+00:00 tweaks to theme for info table, headings, and tables - - - - - cba4fee0 by Mark Lentczner at 2010-07-23T19:13:59+00:00 tweaks for dl layout, though still not used - - - - - 463fa294 by Mark Lentczner at 2010-07-23T21:07:19+00:00 tweak look of mini pages, keywords, and preblocks - - - - - 5472fc02 by Mark Lentczner at 2010-07-24T05:36:15+00:00 slide out Synopsis drawer - - - - - 9d5d5de5 by Mark Lentczner at 2010-07-24T06:02:42+00:00 extend package header and footer to edges of page - - - - - a47c91a2 by Mark Lentczner at 2010-07-24T06:28:44+00:00 fields are def lists, tweak css for style menu, mini pages, arguments - - - - - ca20f23b by Mark Lentczner at 2010-07-24T16:55:22+00:00 excisting last vestiges of the --xhtml flag - - - - - 71fb012e by Mark Lentczner at 2010-07-25T18:47:49+00:00 change how collapsing sections are done make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags - - - - - c168c8d3 by Mark Lentczner at 2010-07-26T00:32:05+00:00 reorganize files in the html lib data dir - - - - - 93324301 by Mark Lentczner at 2010-07-26T01:27:42+00:00 cleaned up Themes.hs - - - - - ad3b5dd4 by Mark Lentczner at 2010-07-26T02:39:15+00:00 make module list use new collapsers - - - - - 1df9bfc6 by Mark Lentczner at 2010-07-27T19:09:25+00:00 remove Tibbe theme - - - - - 8b9b01b3 by Mark Lentczner at 2010-07-27T20:04:03+00:00 move themes into html dir with .theme and .std-theme extensions - - - - - a7beb965 by Mark Lentczner at 2010-07-27T21:06:34+00:00 give a class to empty dd elements so they can be hidden - - - - - a258c117 by Mark Lentczner at 2010-07-27T21:23:58+00:00 remove custom version of copyFile in Xhtml.hs - - - - - b70dba6e by Mark Lentczner at 2010-07-27T22:12:45+00:00 apply margin changes to pre and headings as per group decision, and small cleanups - - - - - e6f722a2 by Mark Lentczner at 2010-07-28T00:03:12+00:00 make info block and package bar links be floatable by placing them first in the dom tree - - - - - c8278867 by Mark Lentczner at 2010-07-28T19:01:18+00:00 styling source links on declarations - - - - - 88fdc399 by Mark Lentczner at 2010-07-29T01:12:46+00:00 styling tweaks don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers - - - - - 8a75b213 by Ian Lynagh at 2010-07-30T20:21:46+00:00 Fix build in GHC tree - - - - - ce8e18b3 by Simon Hengel at 2010-08-03T18:37:26+00:00 Adapt paths to data files in cabal file - - - - - 9701a455 by Simon Hengel at 2010-08-07T13:20:27+00:00 Add missing dependency to cabal file - - - - - 01b838d1 by Mark Lentczner at 2010-07-30T20:19:40+00:00 improved synopsis drawer: on click, not hover - - - - - 7b6f3e59 by Mark Lentczner at 2010-07-30T23:38:55+00:00 put the synopsis back in the other themes - - - - - 7b2904c9 by Mark Lentczner at 2010-08-11T11:11:26+00:00 close arrows on expanded synopsis drawer - - - - - ea19e177 by Mark Lentczner at 2010-08-12T21:16:45+00:00 width and font changes removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent - - - - - 5ced00c0 by Mark Lentczner at 2010-08-13T15:09:55+00:00 implemented YUI's CSS font approach - - - - - 2799c548 by Mark Lentczner at 2010-08-13T15:11:59+00:00 adjusted margin to 2em, 1 wasn't enough - - - - - 58f06893 by Mark Lentczner at 2010-08-13T15:48:44+00:00 removed underlining on hover for named anchors headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute - - - - - 7aced4c4 by Mark Lentczner at 2010-08-13T15:50:22+00:00 more space between elements - - - - - 5a3c1cce by Mark Lentczner at 2010-08-13T16:43:43+00:00 adjusted font sizes of auxilary pages per new scheme - - - - - 487539ef by Mark Lentczner at 2010-08-13T21:43:41+00:00 add Frames button and clean up frames.html - - - - - c1a140b6 by Mark Lentczner at 2010-08-13T22:17:48+00:00 move frames button to js - - - - - b0bdb68e by Mark Lentczner at 2010-08-14T03:44:46+00:00 build style menu in javascript moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page - - - - - 43ab7120 by Mark Lentczner at 2010-08-16T15:15:37+00:00 font size and margin tweaks - - - - - c0b68652 by Mark Lentczner at 2010-08-17T18:19:52+00:00 clean up collapser logics javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS - - - - - 5d573427 by Mark Lentczner at 2010-08-17T23:06:02+00:00 don't collapse entries in module list when clicking on links - - - - - 8c307c4a by Mark Lentczner at 2010-08-17T23:21:43+00:00 add missing data file to .cabal - - - - - 414bcfcf by Mark Lentczner at 2010-08-17T23:28:47+00:00 remove synopsis when in frames - - - - - ba0fa98a by Mark Lentczner at 2010-08-18T16:16:11+00:00 layout tweeks - mini page font size, toc color, etc. - - - - - 63c1bed1 by Mark Lentczner at 2010-08-18T19:50:02+00:00 margin fiddling - - - - - c311c094 by Mark Lentczner at 2010-08-20T01:37:55+00:00 better synopsis handling logic - no flashing - - - - - f1fe5fa8 by Mark Lentczner at 2010-08-20T01:41:06+00:00 fix small layout issues mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers - - - - - 0de84d77 by Mark Lentczner at 2010-08-20T02:13:09+00:00 made style changing and cookies storage robust - - - - - 1ef064f9 by Thomas Schilling at 2010-08-04T13:12:22+00:00 Make synopsis frame behave properly in Firefox. In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. - - - - - dd1c9a94 by Mark Lentczner at 2010-08-21T01:46:19+00:00 remove Snappy theme - - - - - 2353a90d by Mark Lentczner at 2010-08-25T05:16:19+00:00 fix occasional v.scroll bars on pre blocks (I think) - - - - - 459b8bf1 by Simon Hengel at 2010-08-08T10:12:45+00:00 Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API - - - - - b1b68675 by David Waern at 2010-08-26T20:31:58+00:00 Follow recent API additions with some refactorings Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. - - - - - 264d4d67 by David Waern at 2010-08-26T21:40:59+00:00 Get rid of GhcModule and related cruft We can get everything we need directly from TypecheckedModule. - - - - - 0feacec2 by Mark Lentczner at 2010-08-26T23:44:13+00:00 fixed CSS for ordered lists and def lists in doc blocks - - - - - 2997e0c2 by Mark Lentczner at 2010-08-26T23:45:03+00:00 support both kinds of enumerated lists in doc markup The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported - - - - - 5d4ddeec by Mark Lentczner at 2010-08-27T21:29:48+00:00 fix broken header link margins - - - - - 614456ba by Mark Lentczner at 2010-08-27T22:16:19+00:00 fix table of contents CSS - - - - - 03f329a2 by David Waern at 2010-08-28T16:36:09+00:00 Update tests following switch to the Xhtml backend - - - - - ca689fa2 by Mark Lentczner at 2010-08-28T18:25:16+00:00 fix def lists - - - - - 18e1d3d2 by Mark Lentczner at 2010-08-28T18:26:18+00:00 push footer to bottom of window - - - - - b0ab8d82 by David Waern at 2010-08-28T22:04:32+00:00 Whitespace police - - - - - 2d217977 by David Waern at 2010-08-29T12:44:45+00:00 Remove Snappy data files - - - - - 01e27d5f by David Waern at 2010-08-29T13:03:28+00:00 Add source entity path to --read-interface You can now use this flag like this: --read-interface=<html path>,<source entity path>,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. - - - - - 20bf4aaa by David Waern at 2010-08-29T13:11:03+00:00 Naming wibbles - - - - - ad22463f by Mark Lentczner at 2010-08-29T15:14:54+00:00 make portability block be a table - solves layout issues - - - - - 97bd1ae6 by Mark Lentczner at 2010-08-29T15:17:42+00:00 update golden test for Test due to portability box change - - - - - d37e139e by Mark Lentczner at 2010-08-29T17:07:17+00:00 move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs - - - - - acf52501 by David Waern at 2010-08-29T17:32:36+00:00 Allow building with ghc < 6.16 - - - - - 1cb34ed8 by Ian Lynagh at 2010-07-24T23:18:49+00:00 Flatten the dynflags before parsing - - - - - b36845b4 by Ian Lynagh at 2010-07-24T23:26:49+00:00 Follow flattenLanguageFlags -> flattenExtensionFlags rename - - - - - 7f7fcc7e by David Waern at 2010-08-29T17:46:23+00:00 Use flattenExtensionFlags with ghc >= 6.13 only - - - - - 13cf9411 by Ian Lynagh at 2010-08-01T18:09:54+00:00 Make the main haddock script versioned, and make plain "haddock" a symlink - - - - - 495cbff2 by Ian Lynagh at 2010-08-18T18:57:24+00:00 Fix installation in the GHC build system Data-files are now in subdirectories, so we need to handle that - - - - - 88ebab0a by Ian Lynagh at 2010-08-18T19:43:53+00:00 GHC build system: Add all the data files to BINDIST_EXTRAS - - - - - 65837172 by David Waern at 2010-08-29T20:12:34+00:00 Update Test - - - - - 094bbaa2 by David Waern at 2010-08-29T20:55:14+00:00 Revert update to Test - - - - - a881cfb3 by David Waern at 2010-08-31T18:24:15+00:00 Bump version number - - - - - 1fc8a3eb by David Waern at 2010-08-31T22:32:27+00:00 Update ANNOUNCE - - - - - ee1df9d0 by David Waern at 2010-08-31T22:33:11+00:00 Update CHANGES - - - - - 394cc854 by David Waern at 2010-08-31T22:33:23+00:00 Update interface file versioning to work with ghc 6.14/15 - - - - - 7d03b79b by David Waern at 2010-08-31T22:36:00+00:00 Update test output following version change - - - - - a48d82d1 by Mark Lentczner at 2010-09-01T04:29:35+00:00 sort options in doc to match --help output removed --html-help option, as it is no longer supported - - - - - 06561aeb by Mark Lentczner at 2010-09-01T05:29:32+00:00 update options documentation rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents - - - - - 57dea832 by Mark Lentczner at 2010-09-01T05:31:27+00:00 slight wording change about Frames mode - - - - - fa1f6da3 by David Waern at 2010-09-01T10:57:44+00:00 Update doc configure script to find docbook stylesheets on arch linux - - - - - addff770 by David Waern at 2010-09-01T11:02:29+00:00 Wibble - - - - - 8399006d by David Waern at 2010-09-01T11:19:21+00:00 Replace ghci> with >>> in example syntax - - - - - 35074cf8 by David Waern at 2010-09-01T19:03:27+00:00 Improve docs for --no-tmp-comp-dir - - - - - 0f8f8cfd by David Waern at 2010-09-02T11:22:27+00:00 Add a list of contributors to the user guide Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. - - - - - 42ccf099 by David Waern at 2010-09-02T11:29:22+00:00 Update copyright years in license - - - - - 0d560479 by David Waern at 2010-09-02T11:38:52+00:00 Update release instructions - - - - - 72ab7796 by David Waern at 2010-09-02T19:27:08+00:00 Add a note to ANNOUNCE - - - - - bf9d9c5d by David Waern at 2010-09-02T19:27:48+00:00 H.Utils needs FFI on Win+MinGW - - - - - 048ae44a by Mark Lentczner at 2010-09-04T23:19:47+00:00 make TOC group header identifiers validate - - - - - 8c6faf36 by Simon Michael at 2010-09-22T07:12:34+00:00 add hints for cleaner darcs show authors output - - - - - 9909bd17 by Simon Michael at 2010-09-22T17:58:06+00:00 print haddock coverage info on stdout when generating docs A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability. - - - - - 6da72171 by David Waern at 2010-10-03T21:31:24+00:00 Style wibble - - - - - 2f8d8e4d by Tobias Brandt at 2010-08-27T07:01:21+00:00 adding the option to fully qualify identifiers - - - - - 833be6c6 by Tobias Brandt at 2010-08-27T15:50:28+00:00 adding support for local and relative name qualification - - - - - df15c4e9 by Tobias Brandt at 2010-08-27T15:56:37+00:00 corrected qualification help message - - - - - 449e9ce1 by David Waern at 2010-10-16T17:34:30+00:00 Solve conflicts - - - - - 3469bda5 by David Waern at 2010-10-16T18:42:40+00:00 Use "qual" as an abbreviation for qualification instead of "quali" for consistency - - - - - 97c2d728 by David Waern at 2010-10-16T18:47:07+00:00 Style police - - - - - ce14fbea by David Waern at 2010-10-16T21:15:25+00:00 Style police - - - - - fdf29e9d by David Waern at 2010-10-17T00:30:44+00:00 Add a pointer to the style guide - - - - - 8e6b44e8 by rrnewton at 2010-10-24T03:19:28+00:00 Change to index pages: include an 'All' option even when subdividing A-Z. - - - - - 755b131c by David Waern at 2010-11-14T19:39:36+00:00 Bump version - - - - - d0345a04 by David Waern at 2010-11-14T19:41:59+00:00 TAG 2.8.1 - - - - - f6221508 by Simon Peyton Jones at 2010-09-13T09:53:00+00:00 Adapt to minor changes in internal GHC functions - - - - - 1290713d by Ian Lynagh at 2010-09-15T10:37:18+00:00 Remove duplicate Outputable instance for Data.Map.Map - - - - - 87f69eef by Ian Lynagh at 2010-09-21T15:01:10+00:00 Bump GHC dep upper bound - - - - - af36e087 by Ian Lynagh at 2010-09-21T15:12:02+00:00 Fix up __GLASGOW_HASKELL__ tests - - - - - ad67716c by Ian Lynagh at 2010-09-21T20:31:35+00:00 Don't build haddock is HADDOCK_DOCS is NO - - - - - 63b3f1f5 by Ian Lynagh at 2010-09-21T21:39:51+00:00 Fixes for when HADDOCK_DOCS=NO - - - - - e92bfa42 by Ian Lynagh at 2010-09-29T21:15:38+00:00 Fix URL creation on Windows: Use / not \ in URLs. Fixes haskell/haddock#4353 - - - - - 66c55e05 by Ian Lynagh at 2010-09-30T17:03:34+00:00 Tidy up haddock symlink installation In particular, it now doesn't get created if we aren't installing haddock. - - - - - 549b5556 by Ian Lynagh at 2010-10-23T21:17:14+00:00 Follow extension-flattening change in GHC - - - - - d7c2f72b by David Waern at 2010-11-14T20:17:55+00:00 Bump version to 2.8.2 - - - - - 6989a3a9 by David Waern at 2010-11-14T20:26:01+00:00 Solve conflict - - - - - 055c6910 by Ian Lynagh at 2010-09-22T15:36:20+00:00 Bump GHC dep - - - - - c96c0763 by Simon Marlow at 2010-10-27T11:09:44+00:00 follow changes in the GHC API - - - - - 45907129 by David Waern at 2010-11-07T14:00:58+00:00 Update the HCAR entry - - - - - 61940b95 by David Waern at 2010-11-07T14:07:34+00:00 Make the HCAR entry smaller - - - - - aa590b7d by David Waern at 2010-11-14T21:30:59+00:00 Update HCAR entry with November 2010 version - - - - - 587f9847 by David Waern at 2010-11-14T23:48:17+00:00 Require ghc >= 7.0 - - - - - ff5c647c by David Waern at 2010-11-14T23:49:09+00:00 TAG 2.8.2 - - - - - 937fcb4f by David Waern at 2010-11-14T23:49:45+00:00 Solve conflict - - - - - 8e5d0c1a by David Waern at 2010-11-15T21:09:50+00:00 Remove code for ghc < 7 - - - - - 3d47b70a by David Waern at 2010-11-15T21:11:06+00:00 Fix bad merge - - - - - 7f4a0d8a by David Waern at 2010-11-15T21:13:57+00:00 Remove more ghc < 7 code - - - - - 9ee34b50 by David Waern at 2010-11-15T21:31:25+00:00 Match all AsyncExceptions in exception handler - - - - - 42849c70 by David Waern at 2010-11-15T21:35:31+00:00 Just say "internal error" instead of "internal Haddock or GHC error" - - - - - c88c809b by David Waern at 2010-11-15T21:44:19+00:00 Remove docNameOcc under the motto "don't name compositions" - - - - - b798fc7c by David Waern at 2010-11-15T23:27:13+00:00 Wibble - - - - - 2228197e by David Waern at 2010-11-15T23:28:24+00:00 Rename the HCAR entry file - - - - - 8a3f9090 by David Waern at 2010-11-16T00:05:29+00:00 Remove Haskell 2010 extensions from .cabal file - - - - - c7a0c597 by David Waern at 2010-11-16T00:10:28+00:00 Style wibbles - - - - - cde707a5 by David Waern at 2010-11-16T00:12:00+00:00 Remove LANGUAGE ForeignFunctionInterface pragmas - - - - - 1dbda8ed by David Waern at 2010-11-16T00:17:21+00:00 Make a little more use of DoAndIfThenElse - - - - - 4c45ff6e by David Waern at 2010-11-16T00:59:41+00:00 hlint police - - - - - d2feaf09 by David Waern at 2010-11-16T01:14:15+00:00 hlint police - - - - - 99876e97 by David Waern at 2010-11-20T19:06:00+00:00 Haddock documentation updates - - - - - 65ce6987 by David Waern at 2010-11-20T19:42:51+00:00 Follow the style guide closer in Haddock.Types and improve docs - - - - - 28ca304a by tob.brandt at 2010-11-20T17:04:40+00:00 add full qualification for undocumented names - - - - - d61341e3 by David Waern at 2010-11-20T20:04:15+00:00 Re-structure qualification code a little - - - - - 0057e4d6 by David Waern at 2010-11-20T20:07:55+00:00 Re-order functions - - - - - d7279afd by David Waern at 2010-11-21T03:39:54+00:00 Add BangPatterns to alex and happy source files - - - - - 629fe60e by tob.brandt at 2010-11-23T23:35:11+00:00 documentation for qualification - - - - - 37031cee by David Waern at 2010-11-23T21:06:44+00:00 Update CHANGES - don't mention 2.8.2, we won't release it - - - - - f2489e19 by David Waern at 2010-12-01T21:57:11+00:00 Update deps of runtests.hs to work with ghc 7.0.1 - - - - - d3657e9a by David Waern at 2010-12-01T22:04:57+00:00 Make tests compile with ghc 7.0.1 - - - - - a2f09d9b by David Waern at 2010-12-01T22:06:59+00:00 Update tests following version bump - - - - - 50883ebb by David Waern at 2010-12-06T14:09:18+00:00 Update tests following recent changes - - - - - fc2fadeb by David Waern at 2010-12-06T14:17:29+00:00 Add a flag --pretty-html for rendering indented html with newlines - - - - - 30832ef2 by David Waern at 2010-12-06T14:17:35+00:00 Use --pretty-html when running the test suite. Makes it easier to compare output - - - - - a0b81b31 by David Waern at 2010-12-06T14:18:27+00:00 Wibble - - - - - 3aaa23fe by David Waern at 2010-12-06T14:19:29+00:00 Haddockify ppHtml comments - - - - - 24bb24f0 by David Waern at 2010-12-06T14:23:15+00:00 Remove --debug. It was't used, and --verbosity should take its place - - - - - 6bc076e5 by David Waern at 2010-12-06T14:25:37+00:00 Rename golden-tests into html-tests. "golden tests" sounds strange - - - - - 53301e55 by David Waern at 2010-12-06T14:26:26+00:00 QUALI -> QUAL in the description --qual for consistency - - - - - 98b6affb by David Waern at 2010-12-06T21:54:02+00:00 Bump version - - - - - 371bf1b3 by David Waern at 2010-12-06T22:08:55+00:00 Update tests following version bump - - - - - 25be762d by David Waern at 2010-12-06T22:21:03+00:00 Update CHANGES - - - - - 7c7dac71 by David Waern at 2010-12-06T22:33:43+00:00 Update ANNOUNCE - - - - - 30d7a5f2 by Simon Peyton Jones at 2010-11-15T08:38:38+00:00 Alex generates BangPatterns, so make Lex.x accept them (It'd be better for Alex to generate this pragma.) - - - - - 605e8018 by Simon Marlow at 2010-11-17T11:37:24+00:00 Add {-# LANGUAGE BangPatterns #-} to mollify GHC - - - - - a46607ba by David Waern at 2010-12-07T14:08:10+00:00 Solve conflicts - - - - - b28cda66 by David Waern at 2010-12-09T20:41:35+00:00 Docs: Mention that \ is a special character in markup - - - - - a435bfdd by Ian Lynagh at 2010-11-17T14:01:19+00:00 TAG GHC 7.0.1 release - - - - - 5a15a05a by David Waern at 2010-12-11T17:51:19+00:00 Fix indentation problem - - - - - 4232289a by Lennart Kolmodin at 2010-12-17T18:32:03+00:00 Revise haddock.cabal given that we now require ghc-7 default-language should be Haskell2010, slight new semantics for extensions. Rewrite into clearer dependencies of base and Cabal. - - - - - a36302dc by David Waern at 2010-12-19T17:12:37+00:00 Update CHANGES - - - - - 7c8b85b3 by David Waern at 2010-12-19T17:14:24+00:00 Bump version - - - - - cff22813 by Ian Lynagh at 2011-01-05T18:24:27+00:00 Write hoogle output in utf8; fixes GHC build on Windows - - - - - c7e762ea by David Waern at 2011-01-22T00:00:35+00:00 Put title outside doc div when HTML:fying title+prologue Avoids indenting the title, and makes more sense since the title is not a doc string anyway. - - - - - 5f639054 by David Waern at 2011-01-22T16:09:44+00:00 Fix spelling error - contributed by Marco Silva - - - - - c11dce78 by Ian Lynagh at 2011-01-07T02:33:11+00:00 Follow GHC build system changes - - - - - 101cfaf5 by David Waern at 2011-01-08T14:06:44+00:00 Bump version - - - - - af62348b by David Waern at 2011-01-08T14:07:07+00:00 TAG 2.9.2 - - - - - 4d1f6461 by Ian Lynagh at 2011-01-07T23:06:57+00:00 Name the haddock script haddock-ghc-7.0.2 instead of haddock-7.0.2; haskell/haddock#4882 "7.0.2" looked like a haddock version number before - - - - - 8ee4d5d3 by Simon Peyton Jones at 2011-01-10T17:31:12+00:00 Update Haddock to reflect change in hs_tyclds field of HsGroup - - - - - 06f3e3db by Ian Lynagh at 2011-03-03T15:02:37+00:00 TAG GHC 7.0.2 release - - - - - 7de0667d by David Waern at 2011-03-10T22:47:13+00:00 Update CHANGES - - - - - 33a9f1c8 by David Waern at 2011-03-10T22:47:31+00:00 Fix build with ghc 7.0.1 - - - - - 4616f861 by David Waern at 2011-03-10T22:47:50+00:00 TAG 2.9.2-actual - - - - - 0dab5e3c by Simon Hengel at 2011-04-08T15:53:01+00:00 Set shell script for unit tests back to work - - - - - 85c54dee by Simon Hengel at 2011-04-08T16:01:24+00:00 Set unit tests back to work Here "ghci>" was still used instead of ">>>". - - - - - 1cea9b78 by Simon Hengel at 2011-04-08T16:25:36+00:00 Update runtests.hs for GHC 7.0.2 - - - - - 8e5b3bbb by Simon Hengel at 2011-04-08T16:28:49+00:00 Update Haddock version in *.html.ref - - - - - 2545e955 by Simon Hengel at 2011-04-08T17:09:28+00:00 Add support for blank lines in the result of examples Result lines that only contain the string "<BLANKLINE>" are treated as a blank line. - - - - - adf64d2e by Simon Hengel at 2011-04-08T17:36:50+00:00 Add documentation for "support for blank lines in the result of examples" - - - - - c51352ca by David Waern at 2011-05-21T23:57:56+00:00 Improve a haddock comment - - - - - 7419cf2c by David Waern at 2011-05-22T15:41:52+00:00 Use cabal's test suite support to run the test suite This gives up proper dependency tracking of the test script. - - - - - 7770070c by David Waern at 2011-05-22T01:45:44+00:00 We don't need to send DocOptions nor a flag to mkExportItems - - - - - 9d95b7b6 by David Waern at 2011-05-22T21:39:03+00:00 Fix a bug - - - - - 1f93699b by David Waern at 2011-05-22T21:40:21+00:00 Break out fullContentsOf, give it a better name and some documentation The documentation describes how we want this function to eventually behave, once we have fixed a few problems with the current implementation. - - - - - 9a86432f by David Waern at 2011-05-22T21:53:52+00:00 Fix some stylistic issues in mkExportItems - - - - - c271ff0c by David Waern at 2011-05-22T22:09:11+00:00 Indentation - - - - - 93e602b1 by David Waern at 2011-06-10T01:35:31+00:00 Add git commits since switchover: darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower at hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo at earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm at cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo at earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC - - - - - 498da5ae by David Waern at 2011-06-11T00:33:33+00:00 * Merge in git patch from Michal Terepeta >From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001 From: Michal Terepeta <michal.terepeta at gmail.com> Date: Sat, 14 May 2011 19:18:22 +0200 Subject: [PATCH] Follow the change of TypeSig in GHC. This follows the change in GHC to make TypeSig take a list of names (instead of just one); GHC ticket haskell/haddock#1595. This should also improve the Haddock output in case the user writes a type signature that refers to many names: -- | Some comment.. foo, bar :: ... will now generate the expected output with one signature for both names. - - - - - 094607fe by Ian Lynagh at 2011-06-17T19:10:29+01:00 Fix build - - - - - 8fa35740 by Ian Lynagh at 2011-06-26T21:06:40+01:00 Bump GHC dep to allow 7.2 - - - - - e4d2ca3c by Ian Lynagh at 2011-07-07T23:06:28+01:00 Relax base dep - - - - - b948fde9 by Ian Lynagh at 2011-07-28T16:39:45+01:00 GHC build system: Don't install the datafiles twice - - - - - f82f6d70 by Simon Marlow at 2011-08-11T12:08:15+01:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - b341cc12 by Max Bolingbroke at 2011-08-22T20:25:27+01:00 Fix compilation with no-pred-ty GHC - - - - - 30494581 by Max Bolingbroke at 2011-08-23T10:20:54+01:00 Remaining fixes for PredTy removal - - - - - 0b197138 by Max Bolingbroke at 2011-08-26T08:27:45+01:00 Rename factKind to constraintKind - - - - - a379bec5 by Max Bolingbroke at 2011-09-04T12:54:47+01:00 Deal with change to IParam handling in GHC - - - - - f94e421b by Max Bolingbroke at 2011-09-06T17:34:31+01:00 Adapt Haddock for the ConstraintKind extension changes - - - - - 8821e5cc by Max Bolingbroke at 2011-09-09T08:24:59+01:00 Ignore associated type defaults (just as we ignore default methods) - - - - - 31a0afd4 by Max Bolingbroke at 2011-09-09T09:06:00+01:00 Merge branch 'no-pred-ty' of ssh://darcs.haskell.org/srv/darcs/haddock into no-pred-ty - - - - - dd3b530a by Max Bolingbroke at 2011-09-09T14:10:25+01:00 Merge branch 'no-pred-ty' Conflicts: src/Haddock/Convert.hs - - - - - 5f25ec96 by Max Bolingbroke at 2011-09-09T14:10:40+01:00 Replace FactTuple with ConstraintTuple - - - - - cd30b9cc by David Waern at 2011-09-26T02:17:55+02:00 Bump to version 2.9.3 - - - - - 4fbfd397 by Max Bolingbroke at 2011-09-27T14:55:21+01:00 Follow changes to BinIface Name serialization - - - - - 92257d90 by David Waern at 2011-09-30T23:45:07+02:00 Fix problem with test files not added to distribution tarball - - - - - 00255bda by David Waern at 2011-09-30T23:48:24+02:00 Merge branch 'development' - - - - - 5421264f by David Waern at 2011-10-01T01:25:39+02:00 Merge in darcs patch from Simon Meier: Wed Jun 1 19:41:16 CEST 2011 iridcode at gmail.com * prettier haddock coverage info The new coverage info rendering uses less horizontal space. This reduces the number of unnecessary line-wrappings. Moreover, the most important information, how much has been documented already, is now put up front. Hopefully, this makes it more likely that a library author is bothered by the low coverage of his modules and fixes that issue ;-) - - - - - 07d318ef by David Waern at 2011-10-01T01:34:10+02:00 Use printException instead of deprecated printExceptionAndWarnings - - - - - 40d52ee4 by David Waern at 2011-10-01T01:41:13+02:00 Merge in darcs pach: Mon Apr 11 18:09:54 JST 2011 Liyang HU <haddock at liyang.hu> * Remember collapsed sections in index.html / haddock-util.js - - - - - 279d6dd4 by David Waern at 2011-10-01T01:55:45+02:00 Merge in darcs patch: Joachim Breitner <mail at joachim-breitner.de>**20110619201645 Ignore-this: f6c51228205b0902ad5bfad5040b989a As reported on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578301, generating the global index takes much too long if type-level (with lots of auto-generated types) is installed. The patch avoids a quadratic runtime in the subfunction getIfaceIndex of ppHtmlIndex by using a temporary set. Runtime improvement observed here from 25.36s to 2.86s. - - - - - d1612383 by David Waern at 2011-10-01T01:56:48+02:00 Merge branch 'development' - - - - - 347520c1 by David Waern at 2011-10-01T01:56:54+02:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9a0c95e8 by David Waern at 2011-10-01T02:19:10+02:00 Improve .cabal file - - - - - 6967dc64 by Ian Lynagh at 2011-10-01T01:34:06+01:00 Follow changes to ForeignImport/ForeignExport in GHC - - - - - 565cb26b by Simon Marlow at 2011-10-04T00:15:04+02:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - 8b74f512 by David Waern at 2011-10-04T00:18:17+02:00 Requre ghc >= 7.2 - - - - - 271d360c by David Waern at 2011-10-04T00:22:50+02:00 Bump version to 2.9.4 - - - - - 37f3edb0 by David Waern at 2011-10-06T02:30:21+02:00 Add alex and happy to build-tools. - - - - - 7ac2bb6e by David Terei at 2011-10-12T14:02:55-07:00 Add safe haskell indication to haddock output - - - - - 42c91a47 by David Terei at 2011-10-12T14:06:03-07:00 Fix CSS issue with info table not being contained in module header - - - - - 0eddab6c by David Terei at 2011-10-12T14:06:58-07:00 Add safe haskell indication to haddock output - - - - - 3df058eb by David Terei at 2011-10-12T14:07:07-07:00 Fix CSS issue with info table not being contained in module header - - - - - a40a6c3f by David Waern at 2011-10-22T11:29:06+02:00 Bump .haddock file version since the format has changed recently - - - - - 8a6254be by David Waern at 2011-10-22T11:30:42+02:00 Merge branch 'development' - - - - - 642e3e02 by David Waern at 2011-10-23T21:23:39+02:00 Sort import list - - - - - 36371cf8 by David Waern at 2011-10-23T22:48:18+02:00 Remove NEW_GHC_LAYOUT conditional. - - - - - 5604b499 by David Waern at 2011-10-27T00:15:03+02:00 Add --print-ghc-path. - - - - - 463499fa by David Waern at 2011-10-27T00:16:22+02:00 Make testsuite able to find its dependencies automatically. - - - - - a3506172 by Ryan Newton at 2011-11-05T05:59:58-04:00 Improved declNames internal error. Added a case to handle DocD. - - - - - 001b8baf by David Waern at 2011-11-05T20:37:29+01:00 Rename copy.hs -> accept.hs. - - - - - 55d808d3 by David Waern at 2011-11-05T23:30:02+01:00 Fix build. - - - - - deb5c3be by David Waern at 2011-11-06T00:01:47+01:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9b663554 by David Waern at 2011-11-06T00:03:45+01:00 Merge https://github.com/rrnewton/haddock - - - - - 1abb0ff6 by David Waern at 2011-11-06T01:20:37+01:00 Use getDeclMainBinder instead of declNames. - - - - - 4b005c01 by David Waern at 2011-11-06T19:09:53+01:00 Fix build. - - - - - c2c51bc7 by Ian Lynagh at 2011-11-06T23:01:33+00:00 Remove -DNEW_GHC_LAYOUT in ghc.mk - - - - - f847d703 by Jose Pedro Magalhaes at 2011-11-11T09:07:39+00:00 New kind-polymorphic core This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds - - - - - 7d7c3b09 by Jose Pedro Magalhaes at 2011-11-16T21:42:22+01:00 Follow changes to tuple sorts in master - - - - - 8430e03e by Simon Peyton Jones at 2011-11-17T10:20:27+00:00 Remove redundant imports - - - - - d1b06832 by Ian Lynagh at 2011-11-19T01:33:21+00:00 Follow GHC build system change to the way we call rm - - - - - 9e2230ed by David Waern at 2011-11-24T15:00:24+01:00 Fix a bug in test runner and get rid of regex-compat dependency. - - - - - 52039b21 by David Waern at 2011-11-24T23:55:36+01:00 Avoid haskell98 dependency in test - - - - - 92e1220d by David Waern at 2011-11-25T00:03:33+01:00 Avoid depency on regex-compat also in accept.hs. - - - - - ddac6b6f by David Waern at 2011-11-25T02:13:38+01:00 Accept test output. - - - - - 5a720455 by David Waern at 2011-11-25T02:16:20+01:00 Some more changes to test scripts. - - - - - 170a9004 by David Waern at 2011-11-25T02:30:41+01:00 Add flag --interface-version. - - - - - d225576c by David Waern at 2011-11-25T02:39:26+01:00 Remove #ifs for older compiler versions. - - - - - f0d0a4f5 by David Waern at 2011-11-26T04:20:12+01:00 Give preference to type over data constructors for doc comment links at renaming time. Previously this was done in the backends. Also, warn when a doc comment refers to something that is in scope but which we don't have the .haddock file for. These changes mean we can make DocIdentifier [a] into DocIdentifier a. - - - - - eef0e776 by David Waern at 2011-11-26T17:01:06+01:00 Allow doc comments to link to out-of-scope things (#78). (A bug that should have been fixed long ago.) - - - - - 565ad529 by David Waern at 2011-11-26T19:56:21+01:00 Update tests. - - - - - fb3ce7b9 by David Waern at 2011-11-26T21:44:28+01:00 Cleanup. - - - - - d0328126 by David Waern at 2011-11-26T22:10:28+01:00 Fix module reference bug. - - - - - c03765f8 by David Waern at 2011-12-03T05:20:20+01:00 Slightly better behaviour on top-levels without type signatures. - Docs don't get attached to the next top-level with signature by mistake. - If there's an export list and the top-level is part of it, its doc comment shows up in the documentation. - - - - - 48461d31 by David Waern at 2011-12-03T05:38:10+01:00 Add a test for Unicode doc comments. - - - - - 549c4b4e by David Waern at 2011-12-03T19:07:55+01:00 Cleanup. - - - - - 7bfecf91 by David Waern at 2011-12-03T20:13:08+01:00 More cleanup. - - - - - 14fab722 by Ian Lynagh at 2011-12-12T21:21:35+00:00 Update dependencies and binaryInterfaceVersion - - - - - 469e6568 by Ian Lynagh at 2011-12-18T12:56:16+00:00 Fix (untested) building from source tarball without alex/happy haddock's .cabal file was declaring that it needed alex and happy to build, but in the GHC source tarballs it doesn't. - - - - - 895c9a8c by David Waern at 2011-12-27T12:57:43+01:00 Go back to having a doc, sub and decl map instead of one big decl map. This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer. - - - - - 736767d9 by David Waern at 2011-12-27T13:33:41+01:00 Merge ../../../haddock Conflicts: src/Haddock/InterfaceFile.hs - - - - - 20016f79 by David Waern at 2011-12-27T13:57:23+01:00 Bump version. - - - - - 31f276fb by David Waern at 2011-12-27T13:57:32+01:00 Merge ../ghc/utils/haddock - - - - - 95b367cd by David Waern at 2011-12-27T14:57:29+01:00 Update tests following version bump. - - - - - fa3c94cd by David Waern at 2011-12-27T14:57:51+01:00 Get rid of quite unnecessary use of different lists. - - - - - 9c4d3c54 by David Waern at 2011-12-27T15:26:42+01:00 Cleanup. - - - - - 2caf9f90 by David Waern at 2011-12-27T16:18:05+01:00 Wibbles. - - - - - 3757d09b by David Waern at 2011-12-27T20:50:26+01:00 Complete support for inferring types for top-level bindings. - - - - - 53418734 by David Waern at 2011-12-28T15:02:13+01:00 Minor fixes and cleanup. - - - - - 0c9d0385 by Ian Lynagh at 2012-01-03T18:31:29+00:00 Follow rename of Instance to ClsInst in GHC - - - - - c9bc969a by Simon Hengel at 2012-01-12T21:28:14+01:00 Make sure that generated xhtml is valid (close haskell/haddock#186) Thanks to Phyx. - - - - - 836a0b9a by David Waern at 2012-02-01T02:30:05+01:00 Fix bug introduced in my recent refactoring. - - - - - c7d733eb by David Waern at 2012-02-01T02:30:26+01:00 Cleanup mkMaps and avoid quadratic behaviour. - - - - - da3cda8f by David Waern at 2012-02-01T02:56:56+01:00 Require ghc >= 7.4. - - - - - 83a3287e by David Waern at 2012-02-01T02:57:36+01:00 Update CHANGES. - - - - - 93408f0b by Simon Hengel at 2012-02-04T00:48:04+01:00 Add reference renderings - - - - - 49d00d2c by Simon Hengel at 2012-02-04T00:48:25+01:00 Set unit tests for parser back to work - - - - - eb450980 by Simon Hengel at 2012-02-04T00:49:07+01:00 Add .gitignore - - - - - a841602c by Simon Hengel at 2012-02-04T00:49:16+01:00 Add .ghci file - - - - - 8861199d by Simon Hengel at 2012-02-04T00:49:29+01:00 tests/html-tests/copy.hs: Use mapM_ instead of mapM So we do net get a list of () on stdout when running with runhaskell. - - - - - b477d9b5 by Simon Hengel at 2012-02-04T00:49:46+01:00 Remove index files from golden tests - - - - - 9dbda34e by Simon Hengel at 2012-02-04T00:49:57+01:00 Add /tests/html-tests/tests/*index*.ref to .gitignore - - - - - a9434817 by Simon Hengel at 2012-02-04T00:50:04+01:00 Add DocWarning to Doc The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis. - - - - - de2fb6fa by Simon Hengel at 2012-02-04T00:50:13+01:00 Add support for module warnings - - - - - 0640920e by Simon Hengel at 2012-02-04T00:50:21+01:00 Add tests for module warnings - - - - - 30ce0d77 by Simon Hengel at 2012-02-04T00:50:29+01:00 Add support for warnings - - - - - bb367960 by Simon Hengel at 2012-02-04T00:50:37+01:00 Add tests for warnings - - - - - 6af1dc2d by Simon Hengel at 2012-02-04T00:50:50+01:00 Expand type signatures in export list (fixes haskell/haddock#192) - - - - - a06cbf25 by Simon Hengel at 2012-02-04T00:51:04+01:00 Expand type signatures for modules without explicit export list - - - - - 57dda796 by Simon Hengel at 2012-02-04T00:51:15+01:00 Remove obsolete TODO - - - - - 270c3253 by David Waern at 2012-02-04T00:51:24+01:00 Fix issues in support for warnings. * Match against local names only. * Simplify (it's OK to map over the warnings). - - - - - 683634bd by David Waern at 2012-02-04T00:55:11+01:00 Some cleanup and make sure we filter warnings through exports. - - - - - 210cb4ca by David Waern at 2012-02-04T03:01:30+01:00 Merge branch 'fix-for-186' of https://github.com/sol/haddock into ghc-7.4 - - - - - e8db9031 by David Waern at 2012-02-04T03:07:51+01:00 Style police. - - - - - 261f9462 by David Waern at 2012-02-04T03:20:16+01:00 Update tests. - - - - - 823cfc7c by David Waern at 2012-02-04T03:21:12+01:00 Use mapM_ in accept.hs as well. - - - - - 873dd619 by David Waern at 2012-02-04T03:21:33+01:00 Remove copy.hs - use accept.hs instead. - - - - - 0e31a14a by David Waern at 2012-02-04T03:47:33+01:00 Use <> instead of mappend. - - - - - 2ff7544f by David Waern at 2012-02-04T03:48:55+01:00 Remove code for older ghc versions. - - - - - dacf2786 by David Waern at 2012-02-04T15:52:51+01:00 Clean up some code from last SoC project. - - - - - 00cbb117 by David Waern at 2012-02-04T21:43:49+01:00 Mostly hlint-inspired cleanup. - - - - - 7dc86cc2 by Simon Peyton Jones at 2012-02-06T09:14:41+00:00 Track changes in HsDecls - - - - - f91f82fe by Ian Lynagh at 2012-02-16T13:40:11+00:00 Follow changes in GHC caused by the CAPI CTYPE pragma - - - - - a0ea6b0b by Ian Lynagh at 2012-02-22T02:26:12+00:00 Follow changes in GHC - - - - - b23b07d1 by Simon Peyton Jones at 2012-03-02T16:36:41+00:00 Follow changes in data representation from the big PolyKinds commit - - - - - 43406022 by Simon Hengel at 2012-03-05T11:18:34+01:00 Save/restore global state for static flags when running GHC actions This is necessary if we want to run createInterfaces (from Documentation.Haddock) multiple times in the same process. - - - - - 9fba16fe by Paolo Capriotti at 2012-03-06T10:57:33+00:00 Update .gitignore. - - - - - a9325044 by Simon Peyton Jones at 2012-03-14T17:35:42+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - fd48065a by Iavor Diatchki at 2012-03-15T22:43:35-07:00 Add support for type-level literals. - - - - - 2e8206dd by Simon Peyton Jones at 2012-03-16T14:18:22+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - 93e13319 by Simon Peyton Jones at 2012-03-17T01:04:05+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock Conflicts: src/Haddock/Convert.hs - - - - - d253fa71 by Iavor Diatchki at 2012-03-19T20:12:18-07:00 Merge remote-tracking branch 'origin/master' into type-nats - - - - - fc40acc8 by Iavor Diatchki at 2012-03-19T20:31:27-07:00 Add a missing case for type literals. - - - - - fd2ad699 by Iavor Diatchki at 2012-03-24T13:28:29-07:00 Rename variable to avoid shadowing warning. - - - - - 9369dd3c by Simon Peyton Jones at 2012-03-26T09:14:23+01:00 Follow refactoring of TyClDecl/HsTyDefn - - - - - 38825ca5 by Simon Peyton Jones at 2012-03-26T09:14:37+01:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - 4324ac0f by David Waern at 2012-04-01T01:51:19+02:00 Disable unicode test. - - - - - 3165b750 by David Waern at 2012-04-01T01:51:34+02:00 Take reader environment directly from TypecheckedSource. - - - - - 213b644c by David Waern at 2012-04-01T01:55:20+02:00 Cleanup. - - - - - 3118b4ba by David Waern at 2012-04-01T02:16:15+02:00 Don't filter out unexported names from the four maps - fixes a regression. - - - - - d6524e17 by David Waern at 2012-04-01T02:40:34+02:00 Fix crash when using --qual. Naughty GHC API! - - - - - ea3c43d8 by Henning Thielemann at 2012-04-01T13:03:07+02:00 add QualOption type for distinction between qualification argument given by the user and the actual qualification for a concrete module - - - - - 5422ff05 by Henning Thielemann at 2012-04-01T16:25:02+02:00 emit an error message when the --qual option is used incorrectly - - - - - 026e3404 by David Waern at 2012-04-01T18:10:30+02:00 Don't crash on unicode strings in doc comments. - - - - - ce006632 by David Waern at 2012-04-01T20:13:35+02:00 Add test for --ignore-all-exports flag/ignore-exports pragma. - - - - - 6e4dd33c by David Waern at 2012-04-01T20:21:03+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.4 - - - - - 734ae124 by Henning Thielemann at 2012-04-01T20:22:10+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - 622f9ba5 by David Waern at 2012-04-01T21:26:13+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 55ce17cb by Henning Thielemann at 2012-04-01T22:03:25+02:00 'abbreviate' qualification style - basic support Currently we ignore the package a module is imported from. This means that a module import would shadow another one with the same module name from a different package. - - - - - c85314ef by David Waern at 2012-04-01T22:05:12+02:00 Check qualification option before processing modules. - - - - - ae4b626c by Henning Thielemann at 2012-04-02T00:19:36+02:00 abbreviated qualification: use Packages.lookupModuleInAllPackages for finding the package that a module belongs to - - - - - 60bdbcf5 by Henning Thielemann at 2012-04-02T00:25:31+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - df44301d by Henning Thielemann at 2012-04-02T00:29:05+02:00 qualification style 'abbreviated' -> 'aliased' - - - - - f4192a64 by David Waern at 2012-04-02T01:05:47+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 7ba09067 by David Terei at 2012-04-04T15:08:21-07:00 Fix reporting of modules safe haskell mode (#5989) - - - - - d0cc33d0 by David Terei at 2012-04-06T15:50:41+01:00 Fix reporting of modules safe haskell mode (#5989) - - - - - 6e3434c5 by Simon Peyton Jones at 2012-04-20T18:37:46+01:00 Track changes in HsSyn - - - - - 22014ed0 by Simon Peyton Jones at 2012-05-11T22:45:15+01:00 Follow changes to LHsTyVarBndrs - - - - - d9a07b24 by David Waern at 2012-05-15T01:46:35+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - a6c4ebc6 by David Waern at 2012-05-16T02:18:32+02:00 Update CHANGES. - - - - - 8e181d29 by David Waern at 2012-05-16T02:27:56+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - e358210d by David Waern at 2012-05-16T02:35:33+02:00 Mention the new aliased --qual mode in CHANGES. - - - - - efd36a28 by David Waern at 2012-05-16T21:33:13+02:00 Bump version number. - - - - - d6b3af14 by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for deprecated record field - - - - - 927f800e by Simon Hengel at 2012-05-17T19:08:20+02:00 Use >>= instead of fmap and join - - - - - 048b41d5 by Simon Hengel at 2012-05-17T19:08:20+02:00 newtype-wrap Doc nodes for things that may have warnings attached - - - - - e3a89fc3 by Simon Hengel at 2012-05-17T19:08:20+02:00 Attach warnings to `Documentation` type - - - - - 5d4cc43d by Simon Hengel at 2012-05-17T19:08:20+02:00 Simplify lookupWarning - - - - - cf8ae69d by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for haskell/haddock#205 - - - - - cb409b19 by Simon Peyton Jones at 2012-05-25T08:30:11+01:00 Follow changes in LHsTyVarBndrs - - - - - 2d5f4179 by Simon Hengel at 2012-05-26T19:21:29+02:00 Add Applicative instance for (GenRnM a) - - - - - e4373060 by Simon Hengel at 2012-05-26T19:21:33+02:00 Use a map for warnings, as suggested by @waern - - - - - 597a68c7 by Simon Hengel at 2012-05-27T08:48:24+02:00 Add an optional label to URLs - - - - - ef1ac7fe by Simon Hengel at 2012-05-27T08:48:24+02:00 Add support for hyperlink labels to parser - - - - - 41f2adce by Simon Hengel at 2012-05-27T08:48:24+02:00 Add golden test for hyperlinks - - - - - 83d5e764 by Simon Hengel at 2012-05-27T08:50:02+02:00 Use LANGUAGE pragmas instead of default-extensions in cabal file - - - - - ddb755e5 by Simon Hengel at 2012-05-27T08:50:02+02:00 Fix typo in comment - - - - - 110676b4 by Simon Hengel at 2012-05-27T08:50:02+02:00 Add a type signature for a where-binding - - - - - 7d9ba2a0 by Ian Lynagh at 2012-06-12T14:38:01+01:00 Follow changes in GHC - - - - - 47c704f2 by Ian Lynagh at 2012-06-12T18:52:16+01:00 Follow changes in GHC - - - - - e1efe1ab by Simon Peyton Jones at 2012-06-13T17:25:29+01:00 Follow changes for the implementation of implicit parameters - - - - - 69abc81c by Ian Lynagh at 2012-06-19T22:52:58+01:00 Follow changes in base - - - - - 9d074a21 by Paolo Capriotti at 2012-06-22T18:26:47+01:00 Use right docMap to get decl documentation. - - - - - e3292ef6 by Ian Lynagh at 2012-07-15T01:31:19+01:00 Follow changes in GHC - - - - - ceae56b0 by Ian Lynagh at 2012-07-16T21:22:48+01:00 Fix haddock following some GHC changes Passing _|_ as the Settings for defaultDynFlags no longer works well enough - - - - - 9df72735 by Paolo Capriotti at 2012-07-19T16:49:32+01:00 Forward port changes from stable. - - - - - 572f5fcf by Ian Lynagh at 2012-07-19T20:38:26+01:00 Merge branch 'master' of darcs.haskell.org:/srv/darcs//haddock - - - - - 9195aca4 by Paolo Capriotti at 2012-07-20T10:27:28+01:00 Update dependencies. - - - - - 33db3923 by Ian Lynagh at 2012-07-20T17:54:43+01:00 Build with GHC 7.7 - - - - - 925a2cea by David Waern at 2012-07-23T16:50:40+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.6 Conflicts: src/Haddock/InterfaceFile.hs - - - - - d710ef97 by David Waern at 2012-07-23T16:52:07+02:00 Bump version number. - - - - - eb0c2f83 by David Waern at 2012-07-23T16:57:58+02:00 Update CHANGES. - - - - - b3f56943 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Hide "internal" instances This fixes haskell/haddock#37 (http://trac.haskell.org/haddock/ticket/37) Precisely, we show an instance iff its class and all the types are exported by non-hidden modules. - - - - - a70aa412 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Tests for hiding instances (#37) - - - - - c0f4aa58 by Simon Hengel at 2012-07-27T13:00:13+03:00 Add an other test for hiding instances (#37) - - - - - a7ed6268 by Ian Lynagh at 2012-08-07T14:48:13+01:00 Follow changes in GHC - - - - - 0ab30d38 by Ian Lynagh at 2012-08-13T22:12:27+01:00 Improve haddock memory usage - - - - - 0eaa4e30 by Ian Lynagh at 2012-08-13T23:58:46+01:00 Improve haddock memory usage - - - - - 659d26cf by Ian Lynagh at 2012-08-14T13:16:48+01:00 Remove some temporary pragmas I accidentally recorded - - - - - d97fceb6 by Simon Hengel at 2012-08-25T13:19:34+02:00 Add missing dependency to library - - - - - 4c910697 by Simon Hengel at 2012-08-28T07:39:14+02:00 Move .ghci to project root - - - - - fc3c601a by Simon Hengel at 2012-08-28T07:39:14+02:00 accept.hs: Ignore some files - - - - - 1af9b984 by Simon Hengel at 2012-08-28T07:40:04+02:00 Update reference renderings (bump version) - - - - - 980dc253 by Simon Hengel at 2012-08-28T07:40:32+02:00 Update reference renderings (remove links for ()) - - - - - 33651dbf by Simon Hengel at 2012-08-28T07:41:50+02:00 Update documentation of `runInteractiveProcess` in reference rendering - - - - - 7ab25078 by David Waern at 2012-09-07T10:38:50+02:00 Merge branch 'hiddenInstances2' of http://github.com/feuerbach/haddock into ghc-7.6 - - - - - c3de3a4b by David Waern at 2012-09-07T14:29:27+02:00 Follow changes in GHC. - - - - - 298c43ac by David Waern at 2012-09-07T14:59:24+02:00 Update CHANGES. - - - - - e797993a by David Waern at 2012-09-07T15:21:30+02:00 Update ANNOUNCE. - - - - - d0b44790 by David Waern at 2012-09-07T15:22:43+02:00 Merge branch 'hidden-instances' into ghc-7.6 - - - - - 41a4adc8 by Simon Hengel at 2012-09-08T12:08:37+02:00 Update doc/README - - - - - 71ad1040 by Simon Hengel at 2012-09-08T12:17:17+02:00 Add documentation for URL labels - - - - - 9bb41afd by Simon Peyton Jones at 2012-09-20T18:14:26+01:00 Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs - - - - - b8139bfa by Simon Hengel at 2012-09-21T14:24:16+02:00 Disable Unicode test for now - - - - - a5fafdd7 by Simon Hengel at 2012-09-21T14:35:45+02:00 Update TypeOperators test for GHC 7.6.1 Type operators can't be used as type variables anymore! - - - - - 6ccf0025 by Simon Hengel at 2012-09-21T16:02:24+02:00 Remove (Monad (Either e)) instance from ref. rendering of CrossPackageDocs I do not really understand why the behavior changed, so I'll open a ticket, so that we can further investigate. - - - - - b5c6c138 by Ian Lynagh at 2012-09-27T02:00:57+01:00 Follow changes in GHC build system - - - - - b98eded0 by David Waern at 2012-09-27T15:37:02+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 76cc2051 by David Waern at 2012-09-27T15:48:19+02:00 Update hidden instances tests. - - - - - aeaa1c59 by David Waern at 2012-09-28T10:21:32+02:00 Make API buildable with GHC 7.6. - - - - - d76be1b0 by Simon Peyton Jones at 2012-09-28T15:57:05+01:00 Merge remote-tracking branch 'origin/master' into tc-untouchables - - - - - a1922af8 by David Waern at 2012-09-28T19:50:20+02:00 Fix spurious superclass constraints bug. - - - - - bc41bdbb by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove old examples - - - - - bed7d3dd by Simon Hengel at 2012-10-01T11:30:51+02:00 Adapt parsetests for GHC 7.6.1 - - - - - dcdb22bb by Simon Hengel at 2012-10-01T11:30:51+02:00 Add test-suite section for parsetests to cabal file + get rid of HUnit dependency - - - - - 1e5263c9 by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove test flag from cabal file This was not really used. - - - - - 4beee98b by David Waern at 2012-09-28T23:42:28+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 11dd2256 by Ian Lynagh at 2012-10-03T16:17:35+01:00 Follow change in GHC build system - - - - - fbd77962 by Simon Hengel at 2012-10-03T18:49:40+02:00 Remove redundant dependency from cabal file - - - - - 09218989 by Simon Hengel at 2012-10-04T16:03:05+02:00 Fix typo - - - - - 93a2d5f9 by Simon Hengel at 2012-10-04T16:11:41+02:00 Remove trailing whitespace from cabal file - - - - - c8b46cd3 by Simon Hengel at 2012-10-04T16:12:17+02:00 Export Haddock's main entry point from library - - - - - b411e77b by Simon Hengel at 2012-10-04T16:29:46+02:00 Depend on library for executable The main motivation for this is to increase build speed. In GHC's source tree the library is not build, but all modules are now required for the executable, so that GHC's validate will now detect build failures for the library. - - - - - f8f0979f by Simon Hengel at 2012-10-05T00:32:57+02:00 Set executable flag for Setup.lhs - - - - - dd045998 by Simon Hengel at 2012-10-07T16:44:06+02:00 Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. - - - - - 7b39c3ae by Simon Hengel at 2012-10-07T17:05:45+02:00 cross-package test: re-export IsString instead of Monad There is a monad instance for Q, which is not available on platforms that do not have GHCi support. This caused CrossPackageDocs to fail on those platforms. Re-exporting IsString should test the same thing, but it works on all platforms. - - - - - 0700c605 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Fix some warnings - - - - - f78eca79 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Make -Wall proof - - - - - 6beec041 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Use listToMaybe/fromMaybe instead of safeHead/maybe - - - - - 44b8ce86 by Ian Lynagh at 2012-10-08T21:59:46+01:00 Follow changes in GHC - - - - - 6da5f702 by Simon Hengel at 2012-10-09T11:16:19+02:00 Update .ghci - - - - - 9ac1a1b9 by Kazu Yamamoto at 2012-10-09T12:45:31+02:00 Add markup support for properties - - - - - 1944cb42 by Simon Hengel at 2012-10-09T12:45:31+02:00 Simplify lexing/parsing of properties In contrast to what we do for examples, we do not really need to capture the "prompt" here. - - - - - bffd8e62 by Simon Hengel at 2012-10-09T13:40:14+02:00 Add HTML test for properties - - - - - 2fe9c5cb by Simon Hengel at 2012-10-09T13:40:21+02:00 Add unit tests for properties - - - - - 874e361b by Simon Hengel at 2012-10-09T13:40:33+02:00 Bump interface version - - - - - 2506cc37 by Simon Hengel at 2012-10-09T15:15:04+02:00 Fix parser bug - - - - - 743d2b7d by Simon Hengel at 2012-10-09T15:31:06+02:00 Allow to load interface files with compatible versions - - - - - 981a1660 by Simon Hengel at 2012-10-10T10:32:05+02:00 Export more types from Documentation.Haddock (fixes haskell/haddock#216) - - - - - dff7dc76 by Simon Hengel at 2012-10-10T11:15:19+02:00 Update ANNOUNCE and CHANGES - - - - - edd2bb01 by Simon Hengel at 2012-10-10T11:22:50+02:00 Bump version - - - - - 5039163b by Simon Hengel at 2012-10-10T13:56:04+02:00 Fix typo in documentation - - - - - e4ce34da by Simon Hengel at 2012-10-10T14:28:35+02:00 Add documentation for properties - - - - - 9555ebca by Simon Hengel at 2012-10-11T10:49:04+02:00 Remove redundant if-defs, more source documentation - - - - - 87aa67e1 by Simon Hengel at 2012-10-11T12:32:51+02:00 Adapt cabal file - - - - - c44c1dee by Simon Hengel at 2012-10-11T12:41:58+02:00 Require ghc 7.6 - - - - - 8383bc34 by Simon Hengel at 2012-10-11T12:50:24+02:00 Bump version - - - - - 1030eb38 by Simon Hengel at 2012-10-11T12:55:44+02:00 Update ANNOUNCE and CHANGES - - - - - 74955088 by Simon Hengel at 2012-10-12T09:49:31+02:00 Improve note about `binaryInterfaceVersion` (thanks David) - - - - - ee30f6b7 by Simon Hengel at 2012-10-13T13:40:59+02:00 Update version in html tests, rpm spec file, and user manual - - - - - f2861f18 by Simon Hengel at 2012-10-13T14:40:33+02:00 Remove unused MonadFix constraint - - - - - dfdf1a74 by Simon Hengel at 2012-10-13T15:15:38+02:00 Minor code simplification - - - - - 4ecd1e70 by Simon Hengel at 2012-10-13T15:33:43+02:00 Increase code locality - - - - - f7df5cc9 by Simon Hengel at 2012-10-13T16:03:12+02:00 Minor code simplification - - - - - e737eb6e by Simon Hengel at 2012-10-13T19:03:04+02:00 Handle HsExplicitListTy in renameer (fixes haskell/haddock#213) - - - - - c2dc8f17 by Simon Hengel at 2012-10-13T20:46:31+02:00 Better error messages - - - - - 14d48b4c by Simon Hengel at 2012-10-14T00:21:07+02:00 Simplify RnM type - - - - - 6c2cc547 by Simon Hengel at 2012-10-14T00:23:35+02:00 Simplify lookupRn - - - - - bc77ce85 by Simon Hengel at 2012-10-14T01:51:32+02:00 Organize unite tests hierarchically - - - - - 2306d117 by Simon Hengel at 2012-10-14T10:34:58+02:00 Handle more cases in renameType - - - - - 8a864203 by Simon Hengel at 2012-10-14T11:47:59+02:00 Add mini_HiddenInstances.html.ref and mini_HiddenInstancesB.html.ref - - - - - 3a978eca by Simon Hengel at 2012-10-14T11:49:28+02:00 Add /tests/html-tests/output/ to .gitignore - - - - - db18888a by Simon Hengel at 2012-10-14T13:38:21+02:00 Allow haddock markup in deprecation messages - - - - - e7cfee9f by Simon Hengel at 2012-10-14T14:00:23+02:00 If parsing of deprecation message fails, include it verbatim - - - - - 242a85be by Simon Hengel at 2012-10-14T14:13:24+02:00 Add description for PruneWithWarning test - - - - - 43d33df1 by Simon Hengel at 2012-10-14T15:40:53+02:00 Minor formatting change - - - - - 22768c44 by Simon Hengel at 2012-10-14T16:03:43+02:00 Properly handle deprecation messages for re-exported things (fixes haskell/haddock#220) - - - - - cb4b9111 by Simon Hengel at 2012-10-14T17:30:28+02:00 Add build artifacts for documentation to .gitignore - - - - - 854cd8de by Simon Hengel at 2012-10-14T23:34:51+02:00 unit-tests: Improve readability Add IsString instance for (Doc RdrName) + use <> instead of DocAppend. - - - - - c4446d54 by Simon Hengel at 2012-10-14T23:37:21+02:00 unit-tests: Minor refactoring Rename parse to parseParas. - - - - - 04f2703c by Simon Hengel at 2012-10-15T00:36:42+02:00 Fix typo - - - - - 3d109e44 by Simon Hengel at 2012-10-15T10:30:07+02:00 Add description for DeprecatedReExport test - - - - - 84f0985c by Simon Hengel at 2012-10-15T14:54:19+02:00 Move resources to /resources directory - - - - - a5de7ca6 by Simon Hengel at 2012-10-15T15:46:18+02:00 Move HTML tests to directory /html-test/ - - - - - e21f727d by Simon Hengel at 2012-10-15T19:32:42+02:00 Move HTML reference renderings to /html-test/ref/ - - - - - 3a3c6c75 by Simon Hengel at 2012-10-15T19:32:42+02:00 Copy css, images, etc. on accept - - - - - 40ead6dc by Simon Hengel at 2012-10-15T19:32:42+02:00 Move unit tests to /test directory - - - - - 99a28231 by Simon Hengel at 2012-10-15T19:32:42+02:00 Fix Setup.lhs /usr/bin/runhaskell is not installed on all systems. - - - - - 95faf45e by Simon Hengel at 2012-10-15T19:32:42+02:00 Make test management scripts more robust * They are now independent from the current directory, and hence can be called from everywhere * On UNIX/Linux they can now be run as scripts - - - - - 027aaa2d by Simon Hengel at 2012-10-15T19:53:40+02:00 Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. - - - - - e0266ede by Simon Hengel at 2012-10-15T20:03:43+02:00 Add test case for "spurious superclass constraints bug" - - - - - 52a2aa92 by Simon Hengel at 2012-10-15T20:28:55+02:00 Adapt accept.lhs, so that it ignores more index files - - - - - 53530781 by Simon Hengel at 2012-10-15T20:49:39+02:00 Rename html-test/runtests.lhs to html-test/run.lhs - - - - - 84518797 by Simon Hengel at 2012-10-15T20:49:39+02:00 Move source files for HTML tests to html-test/src - - - - - a911dc6c by Simon Hengel at 2012-10-15T20:49:39+02:00 Adapt output directory for HTML tests - - - - - d3c15857 by Ian Lynagh at 2012-10-16T16:54:43+01:00 Follow dopt->gopt rename - - - - - 956665a5 by Simon Hengel at 2012-10-18T08:42:48+02:00 Update html-test/README - - - - - 903b1029 by Simon Hengel at 2012-10-18T08:50:26+02:00 Use markdown for html-test/README - - - - - 150b4d63 by Ian Lynagh at 2012-10-18T16:36:00+01:00 Follow changes in GHC: 'flags' has been renamed 'generalFlags' - - - - - 41e04ff9 by Simon Hengel at 2012-11-28T09:54:35+01:00 Export missing types from Documentation.Haddock - - - - - 9be59237 by Ian Lynagh at 2012-11-30T23:20:47+00:00 Update dependencies - - - - - e06842f5 by Simon Hengel at 2012-12-07T20:58:05+01:00 Bump version - - - - - e3dbede0 by Simon Hengel at 2012-12-07T20:58:05+01:00 Add missing test files to cabal file (fixes haskell/haddock#230) - - - - - ee0dcca7 by Simon Hengel at 2012-12-07T20:58:05+01:00 Update CHANGES - - - - - 51601bdb by Simon Peyton Jones at 2012-12-19T17:28:35+00:00 Track changes in UNPACK pragma stuff - - - - - f2573bc1 by Richard Eisenberg at 2012-12-21T20:56:25-05:00 Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances. - - - - - f788d0fb by Simon Peyton Jones at 2012-12-23T15:49:58+00:00 Track changes in HsBang - - - - - ca460a0c by Simon Peyton Jones at 2012-12-23T15:50:28+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - f078fea6 by Simon Peyton Jones at 2013-01-02T08:33:13+00:00 Use InstEnv.instanceSig rather than instanceHead (name change) - - - - - 88e41305 by Simon Peyton Jones at 2013-01-14T17:10:27+00:00 Track change to HsBang type - - - - - e1ad4e19 by Kazu Yamamoto at 2013-02-01T11:59:24+09:00 Merge branch 'ghc-7.6' into ghc-7.6-merge-2 Conflicts: haddock.cabal src/Haddock/Interface/AttachInstances.hs src/Haddock/Interface/Create.hs src/Haddock/Interface/LexParseRn.hs src/Haddock/InterfaceFile.hs src/Haddock/Types.hs Only GHC HEAD can compile this. GHC 7.6.x cannot compile this. Some test fail. - - - - - 62bec012 by Kazu Yamamoto at 2013-02-06T11:12:28+09:00 Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.) - - - - - 013fd2e4 by Kazu Yamamoto at 2013-02-06T17:56:21+09:00 Refactoring instanceHead'. - - - - - 3148ce0e by Kazu Yamamoto at 2013-02-07T17:45:10+09:00 Using new syntax in html-test/src/GADTRecords.hs. - - - - - 626dabe7 by Gabor Greif at 2013-02-15T22:42:01+01:00 Typo - - - - - 1eb667ae by Ian Lynagh at 2013-02-16T17:02:07+00:00 Follow changes in base - - - - - 3ef8253a by Ian Lynagh at 2013-03-01T23:23:57+00:00 Follow changes in GHC's build system - - - - - 1a265a3c by Ian Lynagh at 2013-03-03T23:12:07+00:00 Follow changes in GHC build system - - - - - 69941c79 by Max Bolingbroke at 2013-03-10T09:38:28-07:00 Use Alex 3's Unicode support to properly lex source files as UTF-8 Signed-off-by: David Waern <david.waern at gmail.com> - - - - - ea687dad by Simon Peyton Jones at 2013-03-15T14:16:10+00:00 Adapt to tcRnGetInfo returning family instances too This API change was part of the fix to Trac haskell/haddock#4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays. - - - - - 971a30b0 by Andreas Voellmy at 2013-05-19T20:47:39+01:00 Fix for haskell/haddock#7879. Changed copy of utils/haddock/html/resources/html to use "cp -RL" rather than "cp -R". This allows users to run validate in a build tree, where the build tree was setup using lndir with a relative path to the source directory. - - - - - 31fb7694 by Ian Lynagh at 2013-05-19T20:47:49+01:00 Use "cp -L" when making $(INPLACE_LIB)/latex too - - - - - e9952233 by Simon Hengel at 2013-06-01T18:06:50+02:00 Add -itest to .ghci - - - - - b06873b3 by Mateusz Kowalczyk at 2013-06-01T18:06:50+02:00 Workaround for a failing build with --enable-tests. - - - - - e7858d16 by Simon Hengel at 2013-06-01T19:29:28+02:00 Fix broken test - - - - - 0690acb1 by Richard Eisenberg at 2013-06-21T14:08:25+01:00 Updates to reflect changes in HsDecls to support closed type families. - - - - - 7fd347ec by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 53ed81b6 by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 931c4f4f by Richard Eisenberg at 2013-07-24T13:15:59+01:00 Remove (error "synifyKind") to use WithinType, to allow haddock to process base. - - - - - 55a9c804 by Richard Eisenberg at 2013-08-02T15:54:55+01:00 Changes to reflect changes in GHC's type HsTyVarBndr - - - - - b6e9226c by Mathieu Boespflug at 2013-08-04T10:39:43-07:00 Output Copright and License keys in Xhtml backend. This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern at gmail.com> - - - - - 4c66028a by David Waern at 2013-08-04T15:27:36-07:00 Bump interface file version. - - - - - 67340163 by David Waern at 2013-08-09T16:12:51-07:00 Update tests. - - - - - 2087569b by Mateusz Kowalczyk at 2013-08-25T09:24:13+02:00 Add spec tests. This adds tests for all elements we can create during regular parsing. This also adds tests for text with unicode in it. - - - - - 97f36a11 by Mateusz Kowalczyk at 2013-08-27T06:59:12+01:00 Fix ticket haskell/haddock#247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. - - - - - 60681b4f by Mateusz Kowalczyk at 2013-08-27T21:22:48+02:00 LaTeX tests setup - - - - - fa4c27b2 by Mateusz Kowalczyk at 2013-09-02T23:21:43+01:00 Fixes haskell/haddock#253 - - - - - 1a202490 by Mateusz Kowalczyk at 2013-09-03T01:12:50+01:00 Use Hspec instead of nanospec This is motivated by the fact that Haddock tests are not ran by the GHC's ‘validate’ script so we're pretty liberal on dependencies in that area. Full Hspec gives us some nice features such as Quickcheck integration. - - - - - 8cde3b20 by David Luposchainsky at 2013-09-08T07:27:28-05:00 Fix AMP warnings Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - d10661f2 by Herbert Valerio Riedel at 2013-09-11T15:15:01+02:00 Update Git repo URL in `.cabal` file - - - - - 16a44eb5 by Richard Eisenberg at 2013-09-17T09:34:26-04:00 Revision to reflect new role annotation syntax in GHC. - - - - - 4b9833b9 by Herbert Valerio Riedel at 2013-09-18T10:15:28+02:00 Add missing `traverse` method for `GenLocated` As `Traversable` needs at least one of `traverse` or `sequenceA` to be overridden. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - b71fed5d by Simon Hengel at 2013-09-18T22:43:34+02:00 Add test helper - - - - - 4fc1ea86 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#231 - - - - - 435872f6 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#256 We inject -dynamic-too into flags before we run all our actions in the GHC monad. - - - - - b8b24abb by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Add new field to DynFlags - - - - - 49558795 by Simon Hengel at 2013-09-18T22:43:35+02:00 Fallback to ./resources when Cabal data is not found (so that themes are found during development) - - - - - bf79d05c by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Fixes haskell/haddock#5 - - - - - e1baebc2 by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Print missing documentation. Fixes haskell/haddock#258. - - - - - 02ea74de by Austin Seipp at 2013-10-09T10:52:22-05:00 Don't consider StaticFlags when parsing arguments. Instead, discard any static flags before parsing the command line using GHC's DynFlags parser. See http://ghc.haskell.org/trac/ghc/ticket/8276 Based off a patch from Simon Hengel. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 704fd5bb by Simon Hengel at 2013-11-09T00:15:13+01:00 Update HTML tests - - - - - f9fed49e by Simon Hengel at 2013-11-10T18:43:58+01:00 Bump version - - - - - 97ae1999 by Simon Peyton Jones at 2013-11-25T17:25:14+00:00 Track changes in HsSpliceTy data constructor - - - - - 59ad8268 by Simon Peyton Jones at 2014-01-10T18:17:43+00:00 Adapt to small change in Pretty's exports - - - - - 8b12e6aa by Simon Hengel at 2014-01-12T14:48:35-06:00 Some code simplification by using traverse - - - - - fc5ea9a2 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix warnings in test helper - - - - - 6dbb3ba5 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Add ByteString version of Attoparsec - - - - - 968d7774 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 One pass parser and tests. We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing. - - - - - 37a07c9c by Simon Hengel at 2014-01-12T14:48:35-06:00 Rename Haddock.ParseSpec to Haddock.ParserSpec - - - - - f0f68fe9 by Simon Hengel at 2014-01-12T14:48:35-06:00 Don't append newline to parseString input We also check that we have parsed everything with endOfInput. - - - - - 95d60093 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu at fuuzetsu.co.uk if you need the full commit history. - - - - - 7d99108c by Simon Hengel at 2014-01-12T14:48:35-06:00 Update acceptance tests - - - - - d1b59640 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Support for bold. Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs - - - - - 4b412b39 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Allow for headings inside function documentation. LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs - - - - - fdcca428 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Per-module extension flags and language listing. Any extensions that are not enabled by a used language (Haskell2010 &c) will be shown. Furthermore, any implicitly enabled are also going to be shown. While we could eliminate this either by using the GHC API or a dirty hack, I opted not to: if a user doesn't want the implied flags to show, they are recommended to use enable extensions more carefully or individually. Perhaps this will encourage users to not enable the most powerful flags needlessly. Enabled with show-extensions. Conflicts: src/Haddock/InterfaceFile.hs - - - - - 368942a2 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Bump interface version There were some breaking changes over the last few patches so we bump the interface version. This causes a big problem with testing: 1. To generate cross package docs, we first need to generate docs for the package used. 2. To generate package docs with new interface version, we need to use Haddock which has the version bumped. 3. To get Haddock with the version bump, we first need to test cross package docs 4. GOTO 1 So the problem is the chicken and the egg problem. It seems that the only solution would be to generate some interface files on the fly but it is non-trivial. To run this test, you'll have to: * build Haddock without the test (make sure everything else passes) * rebuild the packages used in the test with your shiny new binary making sure they are visible to Haddock * remove the ‘_hidden’ suffix and re-run the tests Note: because the packages currently used for this test are those provided by GHC, it's probably non-trivial to just re-build them. Preferably something less tedious to rebuild should be used and something that is not subject to change. - - - - - 124ae7a9 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow for nesting of paragraphs under lists. The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - c7913535 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow escaping in URLs and pictures. Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - 32326680 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update documentation. - - - - - fbef6406 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update maintainer - - - - - b40e82f4 by Mateusz Kowalczyk at 2014-01-13T02:39:25-06:00 Fixes haskell/haddock#271 Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - f4eafbf8 by Gergő Érdi at 2014-01-19T15:35:16-06:00 Support for -XPatternSynonyms Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - a8939591 by Austin Seipp at 2014-01-29T08:09:04-06:00 Update CPP check for __GLASGOW_HASKELL__ Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 30d7e9d5 by Gergő Érdi at 2014-01-31T00:15:01+08:00 <+>: Don't insert a space when concatenating empty nodes - - - - - a25ccd4d by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Fix @ code blocks In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. - - - - - 0f67305a by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Update tests This updates tests due to Haddock Trac haskell/haddock#271 fix and due to removal of TypeHoles as an extension from GHC. - - - - - 157322a7 by Gergő Érdi at 2014-01-31T01:03:17+08:00 Handle infix vs prefix names correctly everywhere, by explicitly specifying the context The basic idea is that "a" and "+" are either pretty-printed as "a" and "(+)" or "`a`" and "+" - - - - - aa6d9685 by Mateusz Kowalczyk at 2014-01-30T17:21:50+00:00 Correct whitespace in ‘hidden’ test for <+> change - - - - - 121872f0 by Mateusz Kowalczyk at 2014-02-09T17:59:12+00:00 Document module header. Fixes Haddock Trac haskell/haddock#270. - - - - - e3253746 by Mateusz Kowalczyk at 2014-02-10T21:37:48+00:00 Insert a space between module link and description Fixes Haddock Trac haskell/haddock#277. - - - - - 771d2384 by Mateusz Kowalczyk at 2014-02-10T23:27:21+00:00 Ensure a space between type signature and ‘Source’ This is briefly related to Haddock Trac haskell/haddock#249 and employs effectively the suggested fix _but_ it doesn't actually fix the reported issue. This commit simply makes copying the full line a bit less of a pain. - - - - - 8cda9eff by nand at 2014-02-11T15:48:30+00:00 Add support for type/data families This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 3f22c510 by nand at 2014-02-11T15:53:50+00:00 Improve display of poly-kinded type operators This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - effb2d6b by nand at 2014-02-11T15:56:50+00:00 Add test case for PatternSynonyms This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - b38faf0d by Niklas Haas at 2014-02-13T21:53:32+00:00 Get rid of re-implementation of sortBy I have no idea what this was doing lying around here, and due to the usage of tuples it's actually slower, too. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - ac1e0413 by Mateusz Kowalczyk at 2014-02-13T23:57:16+00:00 Only warn about missing docs when docs are missing This fixes the ‘Missing documentation for…’ message for modules with 100% coverage. - - - - - cae2e36a by Niklas Haas at 2014-02-15T21:56:18+00:00 Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 8bea5c3a by Mateusz Kowalczyk at 2014-02-19T05:11:34+00:00 Use a bespoke data type to indicate fixity This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment. - - - - - 5b52d57c by Niklas Haas at 2014-02-22T21:31:03+01:00 Strip a single leading space from bird tracks (#201) This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch. - - - - - 5a1315a5 by Simon Hengel at 2014-02-22T21:55:35+01:00 Turn a source code comment into specs - - - - - 784cfe58 by Mateusz Kowalczyk at 2014-02-23T05:02:22+00:00 Update test case for lifted GADT type rendering The parsing of these seems to have been fixed by GHC folk and it now renders differently. IMHO it now renders in a better way so I'm updating the test to reflect this. - - - - - c3c88c2f by Mateusz Kowalczyk at 2014-02-23T06:37:14+00:00 Don't shadow ‘strip’. -Wall complains - - - - - 293031d8 by Niklas Haas at 2014-02-23T15:21:52+01:00 Make ImplicitParams render correctly (#260) This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone) - - - - - 4200842d by Niklas Haas at 2014-02-23T15:37:13+01:00 Lower precedence of equality constraints This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC - - - - - b59e3227 by Niklas Haas at 2014-02-23T16:11:22+01:00 Add RankNTypes test case to ImplicitParams.hs This test actually tests what haskell/haddock#260 originally reported - I omitted the RankNTypes scenario from the original fix because I realized it's not relevant to the underlying issue and indeed, this renders as intended now. Still good to have more tests. - - - - - c373dbf7 by Mateusz Kowalczyk at 2014-02-24T06:09:54+00:00 Fix rendering of Contents when links are present Fixes Haddock Trac haskell/haddock#267. - - - - - 9ecb0e56 by Mateusz Kowalczyk at 2014-02-24T06:26:50+00:00 Fix wording in the docs - - - - - 4f4dcd8e by Mateusz Kowalczyk at 2014-02-27T03:00:33+00:00 Change rendering of duplicate record field docs See Haddock Trac haskell/haddock#195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this. - - - - - ad8aa609 by Niklas Haas at 2014-03-08T09:43:26+01:00 Render fixity information Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of. - - - - - 6a39c917 by Niklas Haas at 2014-03-09T07:43:39+01:00 Reorder topDeclElem to move the source/wiki links to the top They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom. - - - - - 2d34b3b4 by Niklas Haas at 2014-03-09T07:53:46+01:00 Use optLast instead of listToMaybe for sourceUrls/wikiUrls This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates. - - - - - 0eff4624 by Niklas Haas at 2014-03-09T07:53:46+01:00 Differentiate between TH splices (line-links) and regular names This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures. - - - - - 66d6f77b by Niklas Haas at 2014-03-09T20:02:43+01:00 Group similar fixities together Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <= - - - - - 6587f9f5 by Mateusz Kowalczyk at 2014-03-10T04:24:18+00:00 Update changelog - - - - - 7387ddad by Niklas Haas at 2014-03-11T10:26:04+01:00 Include fixity information in the Interface file This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly. - - - - - ab46ef44 by Niklas Haas at 2014-03-11T10:26:04+01:00 Update changelog - - - - - 565cab6f by Niklas Haas at 2014-03-11T10:26:04+01:00 Update appearance of fixity annotations This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present. - - - - - 5d7afd67 by Niklas Haas at 2014-03-11T10:26:05+01:00 Filter family instances of hidden types Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case. - - - - - ec291b0c by Niklas Haas at 2014-03-11T10:26:05+01:00 Add documentation for --source-entity-line - - - - - 0922e581 by Niklas Haas at 2014-03-11T10:37:32+01:00 Revert "Reorder topDeclElem to move the source/wiki links to the top" This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines. - - - - - 30618e8b by Mateusz Kowalczyk at 2014-03-11T09:41:07+00:00 Bump version to 2.15.0 - - - - - adf3f1bb by Mateusz Kowalczyk at 2014-03-11T09:41:09+00:00 Fix up some whitespace - - - - - 8905f57d by Niklas Haas at 2014-03-13T19:18:06+00:00 Hide RHS of TFs with non-exported right hand sides Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user. - - - - - 5c44d5c2 by Niklas Haas at 2014-03-13T19:18:08+00:00 Add UnicodeSyntax alternatives for * and -> I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting. - - - - - b04a63e6 by Niklas Haas at 2014-03-13T19:18:10+00:00 Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. - - - - - a4a20b16 by Niklas Haas at 2014-03-13T19:18:12+00:00 Strip links from recently added html tests These were accidentally left there when the tests were originally added - - - - - d624f315 by Mateusz Kowalczyk at 2014-03-13T19:19:31+00:00 Update changelog - - - - - d27a21ac by Mateusz Kowalczyk at 2014-03-13T21:19:07+00:00 Always read in prologue files as UTF8 (#286). - - - - - 54b2fd78 by Mateusz Kowalczyk at 2014-03-13T21:28:09+00:00 Style only - - - - - fa4fe650 by Simon Hengel at 2014-03-15T09:04:18+01:00 Add Fuuzetsu maintainers field in cabal file - - - - - f83484b7 by Niklas Haas at 2014-03-15T18:20:24+00:00 Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. - - - - - 0099d276 by Niklas Haas at 2014-03-15T18:20:26+00:00 Fix issue haskell/haddock#281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. - - - - - 1f9687bd by Mateusz Kowalczyk at 2014-03-21T17:48:37+00:00 Please cabal sdist - - - - - 75542693 by Mateusz Kowalczyk at 2014-03-22T16:36:16+00:00 Drop needless --split-objs which slows us down. Involves tiny cleanup of all the dynflag bindings. Fixes haskell/haddock#292. - - - - - 31214dc3 by Herbert Valerio Riedel at 2014-03-23T18:01:01+01:00 Fix a few typos Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 0b73e638 by Mateusz Kowalczyk at 2014-03-31T05:34:36+01:00 Print kind signatures on GADTs - - - - - 2bab42f3 by Mateusz Kowalczyk at 2014-03-31T16:53:25+01:00 Add default for new PlatformConstraints field - - - - - 42647c5f by Mateusz Kowalczyk at 2014-03-31T18:29:04+01:00 Drop leading whitespace in @-style blocks. Fixes haskell/haddock#201. - - - - - 98208294 by Niklas Haas at 2014-03-31T20:09:58+02:00 Crash when exporting record selectors of data family instances This fixes bug haskell/haddock#294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated. - - - - - 3832d171 by Mateusz Kowalczyk at 2014-04-01T19:07:33+01:00 Make CHANGES consistent with what's now in 2.14.2 - - - - - c386ae89 by Mateusz Kowalczyk at 2014-04-01T19:18:36+01:00 Actually bundle extra spec tests in sdist - - - - - bd57a6d3 by Mateusz Kowalczyk at 2014-04-03T21:13:48+01:00 Update test cases for GHC bug haskell/haddock#8945, Haddock haskell/haddock#188 The order of signature groups has been corrected upstream. Here we add a test case and update some existing test-cases to reflect this change. We remove grouped signature in test cases that we can (Minimal, BugDeprecated &c) so that the test is as self-contained as possible. - - - - - 708b88b1 by Mateusz Kowalczyk at 2014-04-03T21:16:07+01:00 Enforce strict GHC version in cabal file This stops people with 7.6.3 trying to install 2.15.x which clearly won't work. Unfortunately we shipped 2.14.x without realising this. - - - - - 60334f7c by Mateusz Kowalczyk at 2014-04-03T21:19:24+01:00 Initialise some new PlatformConstants fields - - - - - ea77f668 by Mateusz Kowalczyk at 2014-04-11T16:52:23+01:00 We don't actually want unicode here - - - - - 0b651cae by Mateusz Kowalczyk at 2014-04-11T18:13:30+01:00 Parse identifiers with ^ and ⋆ in them. Fixes haskell/haddock#298. - - - - - e8ad0f5f by Mateusz Kowalczyk at 2014-04-11T18:47:41+01:00 Ignore version string during HTML tests. - - - - - de489089 by Mateusz Kowalczyk at 2014-04-11T18:59:30+01:00 Update CHANGES to follow 2.14.3 - - - - - beb464a9 by Gergő Érdi at 2014-04-13T16:31:10+08:00 remove Origin flag from LHsBindsLR - - - - - cb16f07c by Herbert Valerio Riedel at 2014-04-21T17:16:50+02:00 Replace local `die` by new `System.Exit.die` Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 9b9b23c7 by Mateusz Kowalczyk at 2014-05-03T15:40:11+02:00 Disambiguate ‘die’ in test runners. - - - - - 5d28a2b8 by Mateusz Kowalczyk at 2014-05-05T09:19:49+02:00 Prepare modules for parser split. We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type. - - - - - d3967ff3 by Mateusz Kowalczyk at 2014-05-05T11:00:41+02:00 Move parser + parser tests out to own package. We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes. - - - - - 522a448d by Mateusz Kowalczyk at 2014-05-05T11:14:47+02:00 Move out Show and Eq instances to Types They are much more useful to the users here. - - - - - 11a6f0f2 by Mateusz Kowalczyk at 2014-05-06T13:50:31+02:00 Remove no longer necessary parser error handling. We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places. - - - - - 6992c924 by Mateusz Kowalczyk at 2014-05-14T02:23:55+02:00 Please the GHC build-system. As I can not figure out how to do this properly, if we're in GHC tree, we treat the library as being the same package. If we're not in the tree, we require that the library be installed separately. - - - - - 7a8ad763 by Mateusz Kowalczyk at 2014-05-14T14:50:25+02:00 Update issue tracker URL - - - - - f616c521 by Mateusz Kowalczyk at 2014-05-14T14:53:32+02:00 Update issue tracker URL for haddock-library - - - - - 66580ded by Gergő Érdi at 2014-05-25T14:24:16+08:00 Accomodate change in PatSyn representation - - - - - 0e43b988 by Mateusz Kowalczyk at 2014-05-29T03:15:29+02:00 Revert "Accomodate change in PatSyn representation" This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this. - - - - - e10d7ec8 by Mateusz Kowalczyk at 2014-05-29T03:24:11+02:00 Revert "Revert "Accomodate change in PatSyn representation"" This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me. - - - - - 5861aca9 by Mateusz Kowalczyk at 2014-06-05T19:49:27+02:00 Clear up highlighting of identifiers with ‘'’s. - - - - - d7cc420f by Simon Peyton Jones at 2014-06-06T12:41:09+01:00 Follow change in patSynSig - - - - - 938b4fd8 by Mateusz Kowalczyk at 2014-06-12T07:24:29+02:00 Slightly update the readme. Style-sheets are no longer a recent thing, dead links, old maintainers, different formats. - - - - - c7799dea by Mateusz Kowalczyk at 2014-06-18T00:05:56+02:00 Update cabal files Update repository urls, use subdir property for haddock-library and use a separate versioning scheme for haddock-library in preparation for release. - - - - - a2750b6a by Simon Hengel at 2014-06-18T11:01:18+08:00 Compatibility with older versions of base and bytestring - - - - - 009b4b03 by Simon Hengel at 2014-06-18T11:14:01+08:00 Enable travis-ci for haddock-library - - - - - 9b5862eb by Simon Hengel at 2014-06-18T11:14:01+08:00 haddock-library: Do not depend on haddock-library in test suite I think you either add src to hs-source-dirs or the library to build-depends. But doing both does not make sense (AFAICT). - - - - - fb1f3279 by Simon Hengel at 2014-06-18T11:49:05+08:00 haddock-library: Use -Wall for specs - - - - - 649340e1 by Mateusz Kowalczyk at 2014-06-18T06:58:54+02:00 Use Travis with multiple GHC versions When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project. - - - - - d7eeeec2 by Mateusz Kowalczyk at 2014-06-18T07:49:04+02:00 Comment improvements + few words in cabal file - - - - - 0f8db914 by Simon Hengel at 2014-06-18T13:52:23+08:00 Use doctest to check examples in documentation - - - - - 2888a8dc by Simon Hengel at 2014-06-18T14:16:48+08:00 Remove doctest dependency (so that we can use haddock-library with doctest) - - - - - 626d5e85 by Mateusz Kowalczyk at 2014-06-18T08:41:25+02:00 Travis tweaks - - - - - 41d4f9cc by Mateusz Kowalczyk at 2014-06-18T08:58:43+02:00 Don't actually forget to install specified GHC. - - - - - c6aa512a by John MacFarlane at 2014-06-18T10:43:57-07:00 Removed reliance on LambdaCase (which breaks build with ghc 7.4). - - - - - b9b93b6f by John MacFarlane at 2014-06-18T10:54:56-07:00 Fixed haddock warnings. - - - - - a41b0ab5 by Mateusz Kowalczyk at 2014-06-19T01:20:10+02:00 Update Travis, bump version - - - - - 864bf62a by Mateusz Kowalczyk at 2014-06-25T10:36:54+02:00 Fix anchors. Closes haskell/haddock#308. - - - - - 53df91bb by Mateusz Kowalczyk at 2014-06-25T15:04:49+02:00 Drop DocParagraph from front of headers I can not remember why they were wrapped in paragraphs to begin with and it seems unnecessary now that I test it. Closes haskell/haddock#307. - - - - - 29b5f2fa by Mateusz Kowalczyk at 2014-06-25T15:17:20+02:00 Don't mangle append order for nested lists. The benefit of this is that the ‘top-level’ element of such lists is properly wrapped in <p> tags so any CSS working with these will be applied properly. It also just makes more sense. Pointed out at jgm/pandoc#1346. - - - - - 05cb6e9c by Mateusz Kowalczyk at 2014-06-25T15:19:45+02:00 Bump haddock-library to 1.1.0 for release - - - - - 70feab15 by Iavor Diatchki at 2014-07-01T03:37:07-07:00 Propagate overloading-mode for instance declarations in haddock (#9242) - - - - - d4ca34a7 by Simon Peyton Jones at 2014-07-14T16:23:15+01:00 Adapt to new definition of HsDecls.TyFamEqn This is a knock-on from the refactoring from Trac haskell/haddock#9063. I'll push the corresponding changes to GHC shortly. - - - - - f91e2276 by Edward Z. Yang at 2014-07-21T08:14:19-07:00 Track GHC PackageId to PackageKey renaming. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - b010f9ef by Edward Z. Yang at 2014-07-25T16:28:46-07:00 Track changes for module reexports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - 8b85f9f9 by Mateusz Kowalczyk at 2014-07-28T13:25:43+02:00 Catch mid-line URLs. Fixes haskell/haddock#314. - - - - - 4c613a78 by Edward Z. Yang at 2014-08-05T03:11:00-07:00 Track type signature change of lookupModuleInAllPackages Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - e80b051c by Edward Z. Yang at 2014-08-05T17:34:26+01:00 If GhcProfiled, also build Haddock profiled. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f9cccd29 by Edward Z. Yang at 2014-08-07T14:23:35+01:00 Ignore TAGS files. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 00b3af52 by Mateusz Kowalczyk at 2014-08-08T04:58:19+02:00 Update to attoparsec-0.12.1.1 There seems to be memory and speed improvement. - - - - - 5457dc71 by Mateusz Kowalczyk at 2014-08-08T18:24:02+02:00 Fix forgotten src - - - - - 3520cb04 by Mateusz Kowalczyk at 2014-08-14T20:19:07+01:00 Bump down the version for master to 2.14.4 - - - - - dc98c21b by Mateusz Kowalczyk at 2014-08-14T20:23:27+01:00 Revert "Track type signature change of lookupModuleInAllPackages" This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f. - - - - - 3f2038c0 by Mateusz Kowalczyk at 2014-08-14T20:23:31+01:00 Revert "Track changes for module reexports." This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d. - - - - - 56d4e49e by Mateusz Kowalczyk at 2014-08-14T20:23:42+01:00 Revert "Track GHC PackageId to PackageKey renaming." This reverts commit 8ac42d3327473939c013551750425cac191ff0fd. - - - - - 726ea3cb by Mateusz Kowalczyk at 2014-08-14T20:23:47+01:00 Revert "Adapt to new definition of HsDecls.TyFamEqn" This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd. - - - - - 61a88ff0 by Mateusz Kowalczyk at 2014-08-14T20:23:52+01:00 Revert "Propagate overloading-mode for instance declarations in haddock (#9242)" This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c. - - - - - a32ba674 by Mateusz Kowalczyk at 2014-08-14T20:26:03+01:00 Revert "Disambiguate ‘die’ in test runners." This reverts commit dba02d6df32534aac5d257f2d28596238d248942. - - - - - f335820f by Mateusz Kowalczyk at 2014-08-14T20:26:09+01:00 Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. - - - - - 107078e4 by Mateusz Kowalczyk at 2014-08-14T20:27:34+01:00 Merge branch 'reverts' This reverts any changes that were made to have Haddock compile with 7.9. When 7.10 release comes, we can simply re-apply all the patches and any patches that occur on ghc-head branch from now on. This allows us to build master with 7.8.3 - - - - - b44b3871 by Mateusz Kowalczyk at 2014-08-15T02:47:40+01:00 Fix haskell/haddock#313 by doing some list munging. I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly. - - - - - e1a62cde by Mateusz Kowalczyk at 2014-08-15T02:52:56+01:00 Stop testing haskell/haddock#188. Because the change is in GHC 7.9 and we now work against 7.8.3, this test no longer makes sense. We revert it until 7.10 becomes the standard version. If anything, there should be a test for this in GHC itself. - - - - - 54e8286d by Mateusz Kowalczyk at 2014-08-15T05:31:57+01:00 Add haskell/haddock#313 to CHANGES - - - - - 9df7ad5d by Simon Hengel at 2014-08-20T11:25:32+08:00 Fix warning - - - - - ee2574d6 by Simon Hengel at 2014-08-20T12:07:01+08:00 Fix travis builds - - - - - 384cf2e6 by Simon Hengel at 2014-08-20T12:14:31+08:00 Require GHC 7.8.3 - - - - - d4779863 by Simon Hengel at 2014-08-22T12:14:16+08:00 Move Haddock API to a separate package - - - - - 80f3e0e1 by Simon Hengel at 2014-08-22T14:57:38+08:00 Bump version to 2.15.0 and add version constraints - - - - - 309a94ce by Simon Hengel at 2014-08-22T15:18:06+08:00 Add deprecated compatibility module - - - - - 4d1e4e3f by Luite Stegeman at 2014-08-22T20:46:45+02:00 export things to allow customizing how the Ghc session is run - - - - - 47884591 by Luite Stegeman at 2014-08-22T20:46:51+02:00 ghc 7.8.2 compatibility - - - - - 5ea94e2c by Luite Stegeman at 2014-08-22T22:08:58+02:00 install dependencies for haddock-api on travis - - - - - 9fb845b2 by Mateusz Kowalczyk at 2014-08-23T10:09:34+01:00 Move sources under haddock-api/src - - - - - 85817dc4 by Mateusz Kowalczyk at 2014-08-23T10:10:48+01:00 Remove compat stuff - - - - - 151c6169 by Niklas Haas at 2014-08-24T08:14:10+02:00 Fix extra whitespace on signatures and update all test cases This was long overdue, now running ./accept.lhs on a clean test from master will not generate a bunch of changes. - - - - - d320e0d2 by Niklas Haas at 2014-08-24T08:14:35+02:00 Omit unnecessary foralls and fix haskell/haddock#315 This also fixes haskell/haddock#86. - - - - - bdafe108 by Mateusz Kowalczyk at 2014-08-24T15:06:46+01:00 Update CHANGES - - - - - fafa6d6e by Mateusz Kowalczyk at 2014-08-24T15:14:23+01:00 Delete few unused/irrelevant/badly-place files. - - - - - 3634923d by Duncan Coutts at 2014-08-27T13:49:31+01:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. - - - - - 539a7e70 by Herbert Valerio Riedel at 2014-08-31T11:36:32+02:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 9e3a0e5b by Mateusz Kowalczyk at 2014-08-31T12:54:43+01:00 Bump version in doc - - - - - 4a177525 by Mateusz Kowalczyk at 2014-08-31T13:01:23+01:00 Bump haddock-library version - - - - - f99c1384 by Mateusz Kowalczyk at 2014-08-31T13:05:25+01:00 Remove references to deleted files - - - - - 5e51a247 by Mateusz Kowalczyk at 2014-08-31T14:18:44+01:00 Make the doc parser not complain - - - - - 2cedb49a by Mateusz Kowalczyk at 2014-09-03T03:33:15+01:00 CONTRIBUTING file for issues - - - - - 88027143 by Mateusz Kowalczyk at 2014-09-04T00:46:59+01:00 Mention --print-missing-docs - - - - - 42f6754f by Alan Zimmerman at 2014-09-05T18:13:24-05:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e712719e by Austin Seipp at 2014-09-09T01:03:27-05:00 Fix import of 'empty' due to AMP. Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 71c29755 by Herbert Valerio Riedel at 2014-09-09T17:35:20+02:00 Bump `base` constraint for AMP - - - - - 0bf9f3ed by Mateusz Kowalczyk at 2014-09-12T19:18:32+01:00 Delete stale ANNOUNCE - - - - - cac89ee6 by Krzysztof Gogolewski at 2014-09-14T17:17:09+02:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 4d683426 by Edward Z. Yang at 2014-09-18T13:38:11-07:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 80697fd5 by Herbert Valerio Riedel at 2014-09-19T00:07:52+02:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. - - - - - c015eb70 by Herbert Valerio Riedel at 2014-09-19T00:10:36+02:00 Revert "Followup changes to addition of -fwarn-context-quantification" This reverts commit 4023817d7c0e46db012ba2eea28022626841ca9b temporarily as the respective feature hasn't landed in GHC HEAD yet, but this commit blocks later commits from being referenced in GHC HEAD. - - - - - 38ded784 by Edward Z. Yang at 2014-09-18T15:32:15-07:00 Revert "Revert "Followup changes to addition of -fwarn-context-quantification"" This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now. - - - - - f55d59c9 by Herbert Valerio Riedel at 2014-09-26T19:18:28+02:00 Revert "Fix import of 'empty' due to AMP." This reverts commit 0cc5bc85e9fca92ab712b68a2ba2c0dd9d3d79f4 since it turns out we don't need to re-export `empty` from Control.Monad after all. - - - - - 467050f1 by David Feuer at 2014-10-09T20:07:36-04:00 Fix improper lazy IO use Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. - - - - - cc47b699 by Edward Z. Yang at 2014-10-09T21:38:19-07:00 Fix use-after-close lazy IO bug Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. Signed-off-by: David Feuer <David.Feuer at gmail.com> Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 87babcbe by Austin Seipp at 2014-10-20T20:05:27-05:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - ab259516 by Austin Seipp at 2014-10-20T20:07:01-05:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - b918093c by Mateusz Kowalczyk at 2014-10-29T03:59:39+00:00 Experimental support for collapsable headers Closes haskell/haddock#335 - - - - - 849db129 by Mateusz Kowalczyk at 2014-10-29T10:07:26+01:00 Experimental support for collapsable headers (cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc) - - - - - a4cc4789 by Herbert Valerio Riedel at 2014-10-31T11:08:26+01:00 Collapse user-defined section by default (re haskell/haddock#335) - - - - - 9da1b33e by Yuras Shumovich at 2014-10-31T16:11:04-05:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - c625aefc by Austin Seipp at 2014-10-31T19:34:10-05:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - c7738e5e by Simon Hengel at 2014-11-02T07:25:30+08:00 Remove -fobject-code from .ghci (this slows down reloads on modifications) - - - - - d4a86e95 by Simon Hengel at 2014-11-03T09:26:11+08:00 Get rid of StandaloneDeriving - - - - - a974e311 by Simon Hengel at 2014-11-03T09:26:11+08:00 Derive more instances - - - - - 8aa0c4d7 by Simon Hengel at 2014-11-03T09:27:08+08:00 Remove unused language extensions - - - - - 3052d46a by Simon Hengel at 2014-11-03T09:30:46+08:00 Minor refactoring - - - - - 4281d3cb by Simon Hengel at 2014-11-03T09:30:46+08:00 parser: Try to parse definition lists right before text paragraphs - - - - - 8ba12bf9 by Simon Hengel at 2014-11-03T09:34:19+08:00 Add support for markdown links (closes haskell/haddock#336) - - - - - a2f8d747 by Simon Hengel at 2014-11-03T09:34:19+08:00 Allow markdown links at the beginning of a paragraph - - - - - 53b11207 by Simon Hengel at 2014-11-03T09:34:20+08:00 Update documentation - - - - - 652267c6 by Simon Hengel at 2014-11-03T09:34:20+08:00 Add support for markdown images - - - - - 9d667502 by Simon Hengel at 2014-11-03T09:34:20+08:00 Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. - - - - - 8167fc32 by Mateusz Kowalczyk at 2014-11-04T01:16:51+00:00 whitespace only - - - - - 3da62981 by Mateusz Kowalczyk at 2014-11-04T01:17:31+00:00 Fix re-exports of built-in type families Fixes haskell/haddock#310 - - - - - edc76b34 by Mateusz Kowalczyk at 2014-11-04T02:54:28+00:00 Turn some uses of error into recoverable warnings This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end. - - - - - 0a137400 by Mateusz Kowalczyk at 2014-11-04T04:09:44+00:00 Fix warnings - - - - - d068fc21 by Mateusz Kowalczyk at 2014-11-04T21:04:07+00:00 Fix parsing of identifiers written in infix way - - - - - 1a9f2f3d by Simon Hengel at 2014-11-08T11:32:42+08:00 Minor code simplification - - - - - 6475e9b1 by Simon Hengel at 2014-11-08T17:28:33+08:00 newtype-wrap parser monad - - - - - dc1ea105 by Herbert Valerio Riedel at 2014-11-15T11:55:43+01:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - fbb1aca4 by Simon Hengel at 2014-11-16T08:51:38+08:00 State intention rather than implementation details in Haddock comment - - - - - 97851ab2 by Simon Hengel at 2014-11-16T10:20:19+08:00 (wip) Add support for @since (closes haskell/haddock#26) - - - - - 34bcd18e by Gergő Érdi at 2014-11-20T22:35:38+08:00 Update Haddock to new pattern synonym type signature syntax - - - - - 304b7dc3 by Jan Stolarek at 2014-11-20T17:48:43+01:00 Follow changes from haskell/haddock#9812 - - - - - 920f9b03 by Richard Eisenberg at 2014-11-20T16:52:50-05:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 0bfe4e78 by Alan Zimmerman at 2014-11-21T11:23:09-06:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 356ed45a by Thomas Winant at 2014-11-28T16:11:22-06:00 Support for PartialTypeSignatures - - - - - 5dc8f3b1 by Gergő Érdi at 2014-11-29T15:39:09+08:00 For pattern synonyms, render "pattern" as a keyword - - - - - fe704480 by Mateusz Kowalczyk at 2014-12-09T03:38:32+00:00 List new module in cabal file - - - - - b9ad5a29 by Mateusz Kowalczyk at 2014-12-10T00:58:24+00:00 Allow the parser to spit out meta-info Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes haskell/haddock#26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves. - - - - - 765af0e3 by Mateusz Kowalczyk at 2014-12-10T01:17:19+00:00 Update doctest parts of comments - - - - - 8670272b by jpmoresmau at 2014-12-10T01:35:31+00:00 header could contain several lines Closes haskell/haddock#348 - - - - - 4f9ae4f3 by Mateusz Kowalczyk at 2014-12-12T06:22:31+00:00 Revert "Merge branch 'reverts'" This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - e974ac94 by Duncan Coutts at 2014-12-12T06:26:11+00:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. Conflicts: haddock-api/src/Haddock.hs - - - - - 2f3a2365 by Herbert Valerio Riedel at 2014-12-12T06:26:51+00:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 1dbd6390 by Alan Zimmerman at 2014-12-12T06:32:07+00:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - bb6ff1f4 by Mateusz Kowalczyk at 2014-12-12T06:35:07+00:00 Bump ‘base’ constraint Follows the similar commit made on ghc-head branch - - - - - 466fe4ab by Krzysztof Gogolewski at 2014-12-12T06:37:42+00:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 97e080c9 by Edward Z. Yang at 2014-12-12T06:39:35+00:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs - - - - - 20b2af56 by Herbert Valerio Riedel at 2014-12-12T06:42:50+00:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. Conflicts: haddock-library/src/Documentation/Haddock/Parser.hs - - - - - b3ad269d by Austin Seipp at 2014-12-12T06:44:14+00:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 072df0dd by Austin Seipp at 2014-12-12T06:45:01+00:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - dbb9294a by Herbert Valerio Riedel at 2014-12-12T06:46:17+00:00 Collapse user-defined section by default (re haskell/haddock#335) Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - - - - - f23ab545 by Yuras Shumovich at 2014-12-12T06:46:41+00:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - 753a4b67 by Austin Seipp at 2014-12-12T06:46:51+00:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8954e8f5 by Herbert Valerio Riedel at 2014-12-12T06:50:53+00:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - d2b06d61 by Gergő Érdi at 2014-12-12T07:07:30+00:00 Update Haddock to new pattern synonym type signature syntax Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 1ff02426 by Jan Stolarek at 2014-12-12T07:13:24+00:00 Follow changes from haskell/haddock#9812 Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - 06ad7600 by Richard Eisenberg at 2014-12-12T07:13:43+00:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 8fd2aa8b by Alan Zimmerman at 2014-12-12T07:22:25+00:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Backends/LaTeX.hs haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 95c3db98 by Thomas Winant at 2014-12-12T07:35:49+00:00 Support for PartialTypeSignatures Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs haddock-api/src/Haddock/Interface/Create.hs - - - - - 45494428 by Gergő Érdi at 2014-12-12T07:36:18+00:00 For pattern synonyms, render "pattern" as a keyword - - - - - a237e3eb by Mateusz Kowalczyk at 2014-12-12T12:27:13+00:00 Various fixups and bumps for next release - - - - - 22918bcd by Herbert Valerio Riedel at 2014-12-14T10:11:47+01:00 Remove redundant wild-card pattern match (this would otherwise cause a build-failure with `-Werror`) - - - - - 1d6ce947 by Herbert Valerio Riedel at 2014-12-14T10:17:06+01:00 Treat GHC 7.10 the same as GHC 7.9 ...since the current GHC 7.9 is going to become GHC 7.10 real-soon-now anyway - - - - - f434ea89 by Herbert Valerio Riedel at 2014-12-14T18:26:50+01:00 Fixup ghc.mk (follow-up to 1739375eb23342) This makes the GHC build-system aware of the data-files to be copied into the bindist (as haddock.cabal doesn't list those anymore) - - - - - 6fb839eb by Mateusz Kowalczyk at 2014-12-17T09:28:59+00:00 Only keep one Version instead of blindly appending - - - - - 40645489 by Mateusz Kowalczyk at 2014-12-18T07:09:44+00:00 Fix dependency version - - - - - 8b3b927b by Mateusz Kowalczyk at 2014-12-18T07:14:23+00:00 Print missing docs by default Adds --no-print-missing-docs - - - - - 59666694 by Mateusz Kowalczyk at 2014-12-18T07:21:37+00:00 update changelog - - - - - aa6d168e by Mateusz Kowalczyk at 2014-12-18T07:30:58+00:00 Update docs for @since - - - - - 2d7043ee by Luite Stegeman at 2014-12-19T18:29:35-06:00 hide projectVersion from DynFlags since it clashes with Haddock.Version.projectVersion - - - - - aaa70fc0 by Luite Stegeman at 2014-12-22T15:58:43+01:00 Add missing import for standalone haddock-api package - - - - - 9ce01269 by Herbert Valerio Riedel at 2014-12-22T17:48:45+01:00 Reset ghc-head with master's tree (this is an overwriting git merge of master into ghc-head) - - - - - fcd6fec1 by Herbert Valerio Riedel at 2014-12-22T17:51:52+01:00 Bump versions for ghc-7.11 - - - - - 525ec900 by Mateusz Kowalczyk at 2014-12-23T13:36:24+00:00 travis-ci: test with HEAD - - - - - cbf494b5 by Simon Peyton Jones at 2014-12-23T15:22:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 50e01c99 by Mateusz Kowalczyk at 2014-12-29T15:28:47+00:00 Make travis use 7.10.x - - - - - 475e60b0 by Njagi Mwaniki at 2014-12-29T15:30:44+00:00 Turn the README into GitHub Markdown format. Closes haskell/haddock#354 - - - - - 8cacf48e by Luite Stegeman at 2015-01-05T16:25:37+01:00 bump haddock-api ghc dependency to allow release candidate and first release - - - - - 6ed6cf1f by Simon Peyton Jones at 2015-01-06T16:37:47+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 8b484f33 by Simon Peyton Jones at 2015-01-08T15:50:22+00:00 Track naming change in DataCon - - - - - 23c5c0b5 by Alan Zimmerman at 2015-01-16T10:15:11-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e7a5532c by JP Moresmau at 2015-01-22T17:19:03+00:00 Ignore warnings, install Cabal 1.22 - - - - - 86942c84 by jpmoresmau at 2015-01-22T17:19:04+00:00 solve dataDir ambiguity - - - - - 5ceb743e by jpmoresmau at 2015-01-22T19:17:32+00:00 support GHC 7.10: no Safe-Inferred, Foldable instance - - - - - 6a3b3fb5 by Mateusz Kowalczyk at 2015-01-22T19:32:10+00:00 Update test files Test: a correct behaviour for fields comma-separating values. I'm surprised we had no bug open for this. Maybe it affects how haskell/haddock#301 renders now but I doubt. Operators: Seems GHC is giving us a new order for operators, something must have changed on their side again. cc @haasn , this makes the fixity to the side not match the order on the LHS which is a bit unpleasant. Maybe the fixity can be made to match the GHC order? Bug335: We expand examples by default now. Bug310: Now inferred safe. - - - - - 708f8b2f by jpmoresmau at 2015-01-22T19:36:59+00:00 Links to source location of class instance definitions - - - - - 5cf8a6da by Vincent Berthoux at 2015-01-22T19:59:58+00:00 Filter '\r' from comments due to Windows problems. On Windows this was causing newline to be rendered twice in code blocks. Closes haskell/haddock#359, fixes haskell/haddock#356. - - - - - 1749e6f0 by Mateusz Kowalczyk at 2015-01-22T20:31:27+00:00 Changelog only - - - - - c8145f90 by Mateusz Kowalczyk at 2015-01-22T23:34:05+00:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. - - - - - 14248254 by Mateusz Kowalczyk at 2015-01-22T23:43:18+00:00 Sort out some module import warnings - - - - - d8a38989 by Simon Peyton Jones at 2015-01-23T07:10:16-06:00 Track naming change in DataCon (cherry picked from commit 04cf63d0195837ed52075ed7d2676e71831e8a0b) - - - - - d3ac6ae4 by Alan Zimmerman at 2015-01-23T07:17:19-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit d61bbc75890e4eb0ad508b9c2a27b91f691213e6) - - - - - 4c1ffeb0 by Simon Peyton Jones at 2015-02-10T12:10:33+00:00 Track changes in HsSyn for quasi-quotes - - - - - 775d20f7 by Mateusz Kowalczyk at 2015-03-15T08:11:48+01:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. (cherry picked from commit 8e06728afb0784128ab2df0be7a5d7a191d30ff4) - - - - - f9245e72 by Phil Ruffwind at 2015-03-16T04:32:01-04:00 Prevent Synopsis from using up too much horizontal space When long type signatures occur in the Synopsis, the element is stretched beyond the width of the window. Scrollbars don't appear, so it's impossible to read anything when this happens. - - - - - cd8fa415 by Mateusz Kowalczyk at 2015-03-17T21:59:39+00:00 Update changelog Closes haskell/haddock#151 due to 71170fc77962f10d7d001e3b8bc8b92bfeda99bc - - - - - b5248b47 by Ben Gamari at 2015-03-25T17:12:17+00:00 Make the error encountered when a package can't be found more user-friendly Closes haskell/haddock#369 - - - - - b756b772 by Mateusz Kowalczyk at 2015-03-26T16:31:40+00:00 Remove now redundant imports - - - - - 5ea5e8dd by Mateusz Kowalczyk at 2015-03-26T16:45:52+00:00 Update test to account for \r filtering - - - - - 6539bfb3 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Test for anchor defaulting I delete the old tests because it turns out that: * test runner would never put them in scope of each other even with imports so just one would suffice * test runner actually needed some hacking to keep links so in the end we would end up with no anchors making them useless - - - - - 1a01d950 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Clearly default to variables in out of scope case - - - - - 7943abe8 by Mateusz Kowalczyk at 2015-03-27T01:14:11+00:00 Fix Hoogle display of constructors Fixes haskell/haddock#361 - - - - - 6d6e587e by Mateusz Kowalczyk at 2015-03-27T01:45:18+00:00 Fully qualify names in Hoogle instances output Closes haskell/haddock#263 - - - - - 52dac365 by Mateusz Kowalczyk at 2015-03-27T01:55:01+00:00 Update changelog - - - - - ca5af9a8 by Mateusz Kowalczyk at 2015-03-27T02:43:55+00:00 Output method documentation in Hoogle backend One thing of note is that we no longer preserve grouping of methods and print each method on its own line. We could preserve it if no documentation is present for any methods in the group if someone asks for it though. Fixes haskell/haddock#259 - - - - - a33f0c10 by Mateusz Kowalczyk at 2015-03-27T03:04:21+00:00 Don't print instance safety information in Hoogle Fixes haskell/haddock#168 - - - - - df6c935a by Mateusz Kowalczyk at 2015-03-28T00:11:47+00:00 Post-release version bumps and changelog - - - - - dde8f7c0 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Loosen bounds on haddock-* - - - - - de93bf89 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Expand response files in arguments Closes haskell/haddock#285 - - - - - 1f0b0856 by Zejun Wu at 2015-04-26T16:35:35-07:00 Do not insert anchor for section headings in contents box - - - - - 860439d7 by Simon Peyton Jones at 2015-05-01T09:36:47+01:00 Track change in API of TyCon - - - - - a32f3e5f by Adam Gundry at 2015-05-04T15:32:59+01:00 Track API changes to support empty closed type familes - - - - - 77e98bee by Ben Gamari at 2015-05-06T20:17:08+01:00 Ignore doc/haddock.{ps,pdf} - - - - - 663d0204 by Murray Campbell at 2015-05-11T04:47:37-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8bb0dcf5 by Murray Campbell at 2015-05-11T06:35:06-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit 2380f07c430c525b205ce2eae6dab23c8388d899) - - - - - bad900ea by Adam Bergmark at 2015-05-11T15:29:39+01:00 haddock-library: require GHC >= 7.4 `Data.Monoid.<>` was added in base-4.5/GHC-7.4 Closes haskell/haddock#394 Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - daceff85 by Simon Peyton Jones at 2015-05-13T12:04:21+01:00 Track the new location of setRdrNameSpace - - - - - 1937d1c4 by Alan Zimmerman at 2015-05-25T21:27:15+02:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - ee0fb6c2 by Łukasz Hanuszczak at 2015-05-27T11:51:31+02:00 Create simple method for indentation parsing. - - - - - 7d6fcad5 by Łukasz Hanuszczak at 2015-05-27T21:36:13+02:00 Make nested lists count indentation according to first item. - - - - - d6819398 by Łukasz Hanuszczak at 2015-05-27T22:46:13+02:00 Add simple test case for arbitrary-depth list nesting. - - - - - 2929c54d by Łukasz Hanuszczak at 2015-06-03T02:11:31+02:00 Add arbitrary-indent spec test for parser. - - - - - 9a0a9bb0 by Mateusz Kowalczyk at 2015-06-03T05:25:29+01:00 Update docs with info on new list nesting rule Fixes haskell/haddock#278 through commits from PR haskell/haddock#401 - - - - - 12efc92c by Mateusz Kowalczyk at 2015-06-03T05:29:26+01:00 Update some meta data at the top of the docs - - - - - 765ee49f by Bartosz Nitka at 2015-06-07T08:40:59-07:00 Add some Hacking docs for getting started - - - - - 19aaf851 by Bartosz Nitka at 2015-06-07T08:44:30-07:00 Fix markdown - - - - - 2a90cb70 by Mateusz Kowalczyk at 2015-06-08T15:08:36+01:00 Refine hacking instructions slightly - - - - - 0894da6e by Thomas Winant at 2015-06-08T23:47:28-05:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 10a9bb76 by Emanuel Borsboom at 2015-06-12T02:46:23+01:00 Build executable with '-threaded' (fixes haskell/haddock#399) - - - - - 7696b94f by Mateusz Kowalczyk at 2015-06-12T02:59:19+01:00 Update changelog for -threaded Closes haskell/haddock#400 - - - - - d3c118ec by Bartosz Nitka at 2015-06-12T03:00:58+01:00 Fix haddock: internal error: spliceURL UnhelpfulSpan (#207) Inferred type signatures don't have SrcSpans, so let's use the one from the declaration. I've tested this manually on the test-case from haskell/haddock#207, but I got stuck at trying to run the test-suite. - - - - - b67e843b by Mateusz Kowalczyk at 2015-06-12T03:01:50+01:00 Changelog for haskell/haddock#207 Fixes haskell/haddock#207, closes haskell/haddock#402 - - - - - 841d785e by jpmoresmau at 2015-06-12T16:03:16+01:00 Attach to instance location the name that has the same location file Fixes haskell/haddock#383 - - - - - 98791cae by Mateusz Kowalczyk at 2015-06-12T16:08:27+01:00 Update changelog Closes haskell/haddock#398 - - - - - 7c0b5a87 by Phil Ruffwind at 2015-06-12T13:07:25-04:00 Fix alignment of Source links in instance table in Firefox Due to a Firefox bug [1], a combination of 'whitespace: nowrap' on the parent element with 'float: right' on the inner element can cause the floated element to be displaced downwards for no apparent reason. To work around this, the left side is wrapped in its own <span> and set to 'float: left'. As a precautionary measure to prevent the parent element from collapsing entirely, we also add the classic "clearfix" hack. The latter is not strictly needed but it helps prevent bugs if the layout is altered again in the future. Fixes haskell/haddock#384. Remark: line 159 of src/Haddock/Backends/Xhtml/Layout.hs was indented to prevent confusion over the operator precedence of (<+>) vs (<<). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=488725 - - - - - cfe86e73 by Mateusz Kowalczyk at 2015-06-14T10:49:01+01:00 Update tests for the CSS changes - - - - - 2d4983c1 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding for Haskell source parser module. - - - - - 29548785 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement function for tagging parsed chunks with source spans. - - - - - 6a5e4074 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement simple string chunking based on HsColour library. - - - - - 6e52291f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create basic token classification method. - - - - - da971a27 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Adapt source span tagging to work with current whitespace handling. - - - - - 4feb5a22 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add record accessors to exports of hyperlinker parser module. - - - - - a8cc4e39 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Make parser module export all types and associated accessors. - - - - - fb8d468f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple HTML renderer for parsed source file. - - - - - 80747822 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for specifying the CSS file path in HTML source renderer. - - - - - 994dc1f5 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix identifier recognition in Haskell source parser. - - - - - b1bd0430 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix comment recognition in Haskell source parser. - - - - - 11db85ae by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for recognizing compiler pragmas in source parser. - - - - - 736c7bd3 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding of module for associating tokens with AST names. - - - - - 7e149bc2 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement utility method for extracting variable identifiers from AST. - - - - - 32eb640a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple mechanism for associating tokens with AST names. - - - - - d4eba5bc by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add dummy support for hyperlinking named tokens. - - - - - 2b76141f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matcher bug causing wrong items being hyperlinked. - - - - - 2d48002e by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Constrain elements exported by hyperlinker modules. - - - - - 9715eec6 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for type token recognition. - - - - - 8fa401cb by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for binding token recognition. - - - - - d062400b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement go-to-definition mechanism for local bindings. - - - - - f4dc229b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement module export- and import-list item hyperlinking. - - - - - c9a46d58 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matching to allow parenthesized operators hyperlinking. - - - - - 03aad95a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix weird hyperlinking of parenthesized operators. - - - - - b4694a7d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for type declaration anchors. - - - - - 7358d2d2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for top-level function declaration anchors. - - - - - dfc24b24 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix external anchors to contain HTML file extension. - - - - - a045926c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Refactor the way AST names are handled within detailed tokens. - - - - - c76049b4 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement hyperlinking of imported module names. - - - - - 2d2a1572 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix parsing of single line comments with broken up newlines. - - - - - 11afdcf2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix bug with improper newline handling. - - - - - 8137f104 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issues with escaped newlines in comments. - - - - - 34759b19 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for parsing C preprocessor macros. - - - - - 09f0f847 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for parser module of source hyperlinker. - - - - - 709a8389 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for AST module of source hyperlinker. - - - - - 4df5c227 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add command line option for generating hyperlinked source. - - - - - 7a755ea2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Extend module interface with rich source token stream field. - - - - - 494f4ab1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement source tokenization during interface creation process. - - - - - 5f21c953 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create hyperlinker module and plug it into the Haddock pipeline. - - - - - 0cc8a216 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for providing custom CSS files for hyperlinked source. - - - - - a32bbdc1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for fancy highlighting upon hovering over identifier. - - - - - d16d642a by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make source hyperlinker generate output in apropriate directory. - - - - - ae12953d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create module with hyperlinker utility functions. - - - - - 6d4952c5 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make external hyperlinks point to locations specified by source URLs. - - - - - 8417555d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Rewrite source generation to fixed links and directory structure. - - - - - ce9cec01 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add basic support for cross-package hyperlink generation. - - - - - 7eaf025c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Disable generating hyperlinks for module references. - - - - - a50bf92e by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make Haddock generate source for all interfaces (also hidden ones). - - - - - f5ae2838 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Prevent source parser from throwing exception when lexing fails. - - - - - db9ffbe0 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement workaround for Chrome highlighting issues. - - - - - 0b6b453b by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate correct anchors for data constructors. - - - - - c86d38bc by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate anchors for record field declarations. - - - - - 063abf7f by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issue with hyperlink highlight styling in Chrome browser. - - - - - 880fc611 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking constructor names in patters. - - - - - c9e89b95 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record patterns. - - - - - 17a11996 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record expressions. - - - - - 0eef932d by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Make hyperlinker respect pretty-printer flag and add documentation. - - - - - f87c1776 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Unexpose hyperlinker modules in Cabal configuration. - - - - - 4c9e2b06 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Setup HSpec framework for Haddock API package. - - - - - 4b20cb30 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add basic tests related to comment parsing. - - - - - 6842e919 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add tests related to parsing basic language constructs. - - - - - 87bffb35 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add simple tests for do-notation parsing. - - - - - e7af1841 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add very simple QuickCheck properties for source parser spec. - - - - - c84efcf1 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Create simple test runner for hyperlinker tests. - - - - - 76b90447 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for basic identifier hyperlinking. - - - - - 0fbf4df6 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for operator hyperlinking. - - - - - 731aa039 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for constructor hyperlinking. - - - - - 995a78a2 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for record expressions and patterns hyperlinking. - - - - - 3566875a by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for literal syntax highlighting. - - - - - 68469a35 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add hyperlinker test runner to .cabal and .gitignore files. - - - - - aa946c93 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Adapt hyperlinker test runner to have the same interface as HTML one. - - - - - ce34da16 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Fix hyperlinker test runner file paths and add pretty-printing option. - - - - - 0d7dd65e by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add reference files for hyperlinker test cases. - - - - - efa4a1e0 by Łukasz Hanuszczak at 2015-07-01T00:47:32+02:00 Make hyperlinker test runner strip local links from generated source. - - - - - 3e96e584 by Łukasz Hanuszczak at 2015-07-01T01:14:59+02:00 Create simple script for accepting hyperlinker test case references. - - - - - 526fe610 by Łukasz Hanuszczak at 2015-07-01T01:16:41+02:00 Re-accept hyperlinker test cases with local references stripped out. - - - - - 892e2cb3 by Łukasz Hanuszczak at 2015-07-01T01:22:09+02:00 Fix bug with diffing wrong files in hyperlinker test runner. - - - - - 9ff46039 by Łukasz Hanuszczak at 2015-07-01T18:04:46+02:00 Remove unused dependencies in Haddock API spec configuration. - - - - - 47969c07 by Łukasz Hanuszczak at 2015-07-01T18:32:19+02:00 Add support for hyperlinking synonyms in patterns. - - - - - a73449e0 by Łukasz Hanuszczak at 2015-07-01T18:33:44+02:00 Create test case for hyperlinking @-patterns. - - - - - c2077ed8 by Łukasz Hanuszczak at 2015-07-01T19:06:04+02:00 Add support for hyperlinking universally quantified type variables. - - - - - 68017342 by Łukasz Hanuszczak at 2015-07-01T19:28:32+02:00 Create hyperlinker test case with quantified type variables. - - - - - 51c01a78 by Łukasz Hanuszczak at 2015-07-01T19:34:22+02:00 Add scoped type variables test for polymorphism test case. - - - - - 13181ae2 by Łukasz Hanuszczak at 2015-07-01T19:56:27+02:00 Add record wildcards test for records hyperlinking test case. - - - - - 991b81dd by Łukasz Hanuszczak at 2015-07-01T21:01:42+02:00 Document some functions in XHTML utlity module. - - - - - 98c8dfe5 by Łukasz Hanuszczak at 2015-07-01T22:25:21+02:00 Make hyperlinker render qualified names as one entity. - - - - - 75e13b9b by Łukasz Hanuszczak at 2015-07-01T22:27:38+02:00 Add qualified name test for identifiers hyperlinking test case. - - - - - de1e143f by Łukasz Hanuszczak at 2015-07-02T12:32:59+02:00 Fix crash happening when hyperlinking type family declarations. - - - - - 7a8fb175 by Łukasz Hanuszczak at 2015-07-02T12:47:03+02:00 Add support for anchoring data family constructor declarations. - - - - - 3b404e49 by Łukasz Hanuszczak at 2015-07-02T13:31:05+02:00 Improve support for hyperlinking type families. - - - - - 59eb7143 by Łukasz Hanuszczak at 2015-07-02T13:33:34+02:00 Add hyperlinker test case for checking type and type family declarations. - - - - - d1cda0c0 by Łukasz Hanuszczak at 2015-07-02T13:41:38+02:00 Fix issue with operators being recognized as preprocessor directives. - - - - - da206c9d by Łukasz Hanuszczak at 2015-07-02T17:18:12+02:00 Fix broken tests for parsing and hyperlinking hash operators. - - - - - 53750d1b by Łukasz Hanuszczak at 2015-07-02T18:53:28+02:00 Add support for anchoring signatures in type class declarations. - - - - - 1fa5bb10 by Łukasz Hanuszczak at 2015-07-02T19:04:47+02:00 Make hyperlinker generate anchors only to top-level value bindings. - - - - - a542305c by Łukasz Hanuszczak at 2015-07-02T19:05:58+02:00 Create hyperlinker test case for type classes. - - - - - b0dd4581 by Łukasz Hanuszczak at 2015-07-04T16:28:26+02:00 Update docs with information about source hyperlinking. - - - - - 9795302a by Łukasz Hanuszczak at 2015-07-04T16:52:15+02:00 Update docs on using `--read-interface` option. - - - - - 9acdc002 by Łukasz Hanuszczak at 2015-07-04T17:15:26+02:00 Remove potentially dangerous record access in hyperlinker AST module. - - - - - fb3ab7be by Łukasz Hanuszczak at 2015-07-04T17:40:10+02:00 Make Haddock generate warnings about potential misuse of hyperlinker. - - - - - a324c504 by Łukasz Hanuszczak at 2015-07-04T17:43:22+02:00 Fix incorrect specification of source style option in doc file. - - - - - 3f01a8e4 by Łukasz Hanuszczak at 2015-07-05T17:06:36+02:00 Refactor source path mapping to use modules as indices. - - - - - ac70f5b1 by Łukasz Hanuszczak at 2015-07-05T17:47:34+02:00 Fix bug where not all module interfaces were added to source mapping. - - - - - f5e57da9 by Łukasz Hanuszczak at 2015-07-06T16:39:57+02:00 Extract main hyperlinker types to separate module. - - - - - 43974905 by Łukasz Hanuszczak at 2015-07-06T16:52:13+02:00 Move source paths types to hyperlinker types module. - - - - - 3e236055 by Łukasz Hanuszczak at 2015-07-06T17:06:19+02:00 Add support for hyperlinking modules in import lists. - - - - - 58233d9f by Łukasz Hanuszczak at 2015-07-06T17:26:49+02:00 Add short documentation for hyperlinker source map type. - - - - - 14da016d by Łukasz Hanuszczak at 2015-07-06T18:07:20+02:00 Fix bug with module name being hyperlinked to `Prelude`. - - - - - 8f79db52 by Łukasz Hanuszczak at 2015-07-06T18:23:47+02:00 Fix problem with spec build in Haddock API configuration. - - - - - e7cc056c by Adam Sandberg Eriksson at 2015-07-07T23:22:21+01:00 StrictData: print correct strictness marks - - - - - e8253ca8 by Mateusz Kowalczyk at 2015-07-07T23:58:28+01:00 Update changelog - - - - - 0aba676b by Mateusz Kowalczyk at 2015-07-07T23:58:33+01:00 Relax upper bound on GHC a bit - - - - - 7a595381 by Mateusz Kowalczyk at 2015-07-07T23:58:52+01:00 Delete trailing whitespace - - - - - 50976d5e by Adam Sandberg Eriksson at 2015-07-08T15:03:04+02:00 StrictData: changes in HsBang type - - - - - 83b045fa by Mateusz Kowalczyk at 2015-07-11T14:35:18+01:00 Fix expansion icon for user-collapsible sections Closes haskell/haddock#412 - - - - - b2a3b0d1 by Mateusz Kowalczyk at 2015-07-22T22:03:21+01:00 Make some version changes after 2.16.1 release - - - - - a8294423 by Ben Gamari at 2015-07-27T13:16:07+02:00 Merge pull request haskell/haddock#422 from adamse/adamse-D1033 Merge for GHC D1033 - - - - - c0173f17 by randen at 2015-07-30T14:49:08-07:00 Break the response file by line termination rather than spaces, since spaces may be within the parameters. This simple approach avoids having the need for any quoting and/or escaping (although a newline char will not be possible in a parameter and has no escape mechanism to allow it). - - - - - 47c0ca14 by Alan Zimmerman at 2015-07-31T10:41:52+02:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - 45a9d770 by Mateusz Kowalczyk at 2015-07-31T09:47:43+01:00 Update changelog - - - - - 347a20a3 by Phil Ruffwind at 2015-08-02T23:15:26+01:00 Avoid JavaScript error during page load in non-frame mode In non-frame mode, parent.window.synopsis refers to the synopsis div rather than the nonexistent frame. Unfortunately, the script wrongly assumes that if it exists it must be a frame, leading to an error where it tries to access the nonexistent attribute 'replace' of an undefined value (synopsis.location). Closes haskell/haddock#406 - - - - - 54ebd519 by Phil Ruffwind at 2015-08-02T23:27:10+01:00 Link to the definitions to themselves Currently, the definitions already have an anchor tag that allows URLs with fragment identifiers to locate them, but it is rather inconvenient to obtain such a URL (so-called "permalink") as it would require finding the a link to the corresponding item in the Synopsis or elsewhere. This commit adds hyperlinks to the definitions themselves, allowing users to obtain links to them easily. To preserve the original aesthetics of the definitions, we alter the color of the link so as to be identical to what it was, except it now has a hover effect indicating that it is clickable. Additionally, the anchor now uses the 'id' attribute instead of the (obsolete) 'name' attribute. Closes haskell/haddock#407 - - - - - 02cc8bb7 by Phil Ruffwind at 2015-08-02T23:28:02+01:00 Fix typo in Haddock.Backends.Xhtml.Layout: divSynposis -> divSynopsis Closes haskell/haddock#408 - - - - - 2eb0a458 by Phil Ruffwind at 2015-08-02T23:30:07+01:00 Fix record field alignment when name is too long Change <dl> to <ul> and use display:table rather than floats to layout the record fields. This avoids bug haskell/haddock#301 that occurs whenever the field name gets too long. Slight aesthetic change: the entire cell of the field's source code is now shaded gray rather than just the area where text exists. Fixes haskell/haddock#301. Closes haskell/haddock#421 - - - - - 7abb3402 by Łukasz Hanuszczak at 2015-08-02T23:32:14+01:00 Add some utility definitions for generating line anchors. - - - - - e0b1d79b by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Make hyperlinked source renderer generate line anchors. - - - - - 24dd4c9f by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Re-accept test cases after adding line anchors for each of them. - - - - - 0372cfcb by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Override source line flags when source hyperlinker is enabled. - - - - - a81bcd07 by Mateusz Kowalczyk at 2015-08-02T23:58:25+01:00 Update tests to follow HTML changes - - - - - d2d7426f by Łukasz Hanuszczak at 2015-08-06T20:54:59+02:00 Fix quote syntax for promoted types. - - - - - 668cf029 by Łukasz Hanuszczak at 2015-08-06T21:12:00+02:00 Apply promoted type quoting to type-level consing. - - - - - 89f8e7c6 by Łukasz Hanuszczak at 2015-08-06T21:17:10+02:00 Extend advanced types test case with other examples. - - - - - 86494bca by Łukasz Hanuszczak at 2015-08-06T21:22:06+02:00 Rename advanced types test case and accept new output. - - - - - dbb7c7c0 by Adam Sandberg Eriksson at 2015-08-09T23:01:05+02:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 2a7704fa by Ben Gamari at 2015-08-10T13:18:05+02:00 Merge pull request haskell/haddock#433 from adamse/split-hsbang HsBang is split into HsSrcBang and HsImplBang - - - - - 891954bc by Thomas Miedema at 2015-08-15T14:51:18+02:00 Follow changes in GHC build system - - - - - b55d32ab by Mateusz Kowalczyk at 2015-08-21T18:06:09+01:00 Make Travis use 7.10.2 - - - - - 97348b51 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Move SYB utilities to standalone module. - - - - - 748ec081 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement `everywhere` transformation in SYB module. - - - - - 011cc543 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement generic transformation constructor. - - - - - b9510db2 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Create simple utility module for type specialization. - - - - - 43229fa6 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Make type of type specialization function more general. - - - - - fd844e90 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Add basic HTML test case for checking instance specialization. - - - - - 6ea0ad04 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Make HTML class instance printer take optional signature argument. - - - - - 65aa41b6 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Refactor instance head type to record instead of a meaningless tuple. - - - - - 3fc3bede by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add expandable method section for each class instance declaration. - - - - - 99ceb107 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Move dummy post-family instances for `DocName` to `Types` module. - - - - - e98f4708 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create convenience functions for type specialization module. - - - - - b947552f by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Hook type specialization logic with HTML pretty-printer. - - - - - dcaa8030 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create stub functions for sugaring specialized types. - - - - - fa84bc65 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement list syntax sugaring logic for specialized types. - - - - - e8b05b07 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement tuple syntax sugaring logic for specialized types. - - - - - 68a2e5bc by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Get rid of code duplication in type specialization module. - - - - - 4721c336 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create scaffolding of a framework for renaming specialized types. - - - - - 271b488d by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in missing cases in specialized type renaming function. - - - - - bfa5f2a4 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Remove code duplication in specialized type renamer. - - - - - ea6bd0e8 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Change state of the type renaming monad. - - - - - 77c5496e by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement simple mechanism for generating new type names. - - - - - 91bfb48b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in stub behaviour with actual environment renaming. - - - - - d244517b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix logic behind binder type renaming. - - - - - f3c5e360 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add SYB-like utility function for performing stateful queries. - - - - - eb3f9154 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create function for retrieving free variables from given type. - - - - - a94561d3 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix compilation error caused by incorrect type signature. - - - - - 8bb707cf by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Move `SetName` class definition to types module. - - - - - 5800b13b by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Hook type renamer with instance method HTML pretty-printer. - - - - - 6a480164 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some test cases for type renamer. - - - - - 839842f7 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized signatures refer to original signature declaration. - - - - - 4880f7c9 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized methods be nicely formatted again. - - - - - ab5a6a2e by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Attach source locations to the specialized class methods. - - - - - 43f8a559 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Extend instances test case to also test multi-name type signatures. - - - - - 59bc751c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix tab-based indentation in instances test case. - - - - - c2126815 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Improve placement of instance methods expander button. - - - - - 0a32e287 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add new data type declaration to instance specialization test case. - - - - - 5281af1f by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make type renamer first try single-letter names as alternatives. - - - - - 7d509475 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix type renamer bug with incorrect names being generated. - - - - - 0f35bf7c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some documentation and refactor type specialization module. - - - - - da1d0803 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix another bug where type renamer was generating incorrect names. - - - - - cd39b5cb by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Refactor type renamer to rebinding and pure renaming phases. - - - - - 850251f4 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix unwitting compilation bug. - - - - - e5e9fc01 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Integrate instance specification type into class instance definition. - - - - - 825b0ea0 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer neccessary instance specification type. - - - - - cdba44eb by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix declaration converter to use more appropriate mode for methods. - - - - - bc45c309 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug with types not being specialized at all. - - - - - 5d8e5d89 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug where instance expander was opening wrong section. - - - - - 6001ee41 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix another type renamer bug where not all names were rebound. - - - - - 5f58ce2a by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix yet another renamer bug where some names were not unique. - - - - - 8265e521 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split instance subsection layout method to top-level declarations. - - - - - e5e66298 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Rearrange layout of instance methods in generated documentation. - - - - - a50b4eea by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer used layout method. - - - - - 2ff36ec2 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach section title to the instance methods block. - - - - - 7ac15300 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Add basic tests for associated types in instances test case. - - - - - db0ea2f9 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach associated types information to instance header. - - - - - 71cad4d5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details section contain associated types information. - - - - - deee2809 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Improve look of rendered associated families in instance details. - - - - - 839d13a5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Introduce alternative type for family declarations. - - - - - d397f03f by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details record use new type for family declarations. - - - - - 2b23fe97 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split printer of type family header to separate functions. - - - - - c3498cdc by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Implement HTML renderer for pseudo-family declarations. - - - - - c12bbb04 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Apply type specializer to associated type family declarations. - - - - - 2fd69ff2 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Create helper method for specializing type signatures. - - - - - 475826e7 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Refactor specializer module to be independent from XHTML backend. - - - - - f00b431c by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add some documentation for instance head specializer. - - - - - a9fef2dc by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix bug with missing space in documentation for associated types. - - - - - 50e29056 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with incorrect instance details sections being expanded. - - - - - e6dfdd03 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by adding instance details section. - - - - - 75565b2a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make section identifier of instance details more GHC-independent. - - - - - add0c23e by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Re-accept tests after applying deterministic section identifiers. - - - - - 878f2534 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make identifier generation also architecture-independent. - - - - - 48be69f8 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with instance expander hijacking type hyperlink click. - - - - - 47830c1f by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Get rid of dreadful hashing function for generating identifiers. - - - - - 956cd5af by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Move `InstOrigin` type declaration to more appropriate module. - - - - - bf672ed3 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by changes related to instance expander. - - - - - 8f2a949a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add examples with type operators to the instances test case. - - - - - 64600a84 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add basic support for sugaring infix type operators. - - - - - 747d71b8 by Łukasz Hanuszczak at 2015-08-21T18:22:34+01:00 Add support for sugaring built-in function syntax. - - - - - d4696ffb by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Remove default methods from Hoogle class output. - - - - - bf0e09d7 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add fixity declarations in Hoogle backend output. - - - - - 90e91a51 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix bug with incorrect fixities being generated in Hoogle backend. - - - - - 48f11d35 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve class type family declarations output in Hoogle backend. - - - - - 661e8e8f by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add missing default family equations in Hoogle output. - - - - - e2d64103 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve formatting of class details output in Hoogle backend. - - - - - 490fc377 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix weird-looking Hoogle output for familyless classes. - - - - - ea115b64 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create script file for new HTML test runner. - - - - - 609913d3 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Set default behaviour if no arguments given. - - - - - dc115f67 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for providing optional arguments for test runner. - - - - - d93ec867 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve output of test runner error messages. - - - - - 0be9fe12 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for executing Haddock process in test runner. - - - - - 4e4d00d9 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add GHC path to test runner configuration. - - - - - d67a2086 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make GHC path a test runner command-line argument. - - - - - c810079a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Extend test runner configuration with Haddock arguments. - - - - - fee18845 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor test runner and create stub functions. - - - - - ff7c161f by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make test runner actually run Haddock executable. - - - - - 391f73e6 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with test runner not producing any output files. - - - - - 81a74e2d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Setup skeleton of framework for running tests. - - - - - f8a79ec4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with modules not being found in global search mode. - - - - - 7e700b4d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make Haddock standard output redirection be more configurable. - - - - - 53b4c17a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Incorporate old, ugly functions for comparing output files. - - - - - 8277c8aa by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor architecture of test runner output checking functions. - - - - - 587bb414 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement actual diffing mechanism. - - - - - 9ed2b5e4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve code style to match popular guidelines. - - - - - 14bffaf8 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make it possible to choose alternative diff tool. - - - - - 5cdfb005 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create stub methods for processing test output as XML documents. - - - - - 7ef8e12e by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement link-stripping logic as simple SYB transformation. - - - - - 8a1fcd4f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Incorporate link stripping to output diffing mechanism. - - - - - 37dba2bc by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement footer-stripping logic. - - - - - 9cd52120 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Add missing dependencies in Cabal configuration file. - - - - - e0f83c6e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix issue with output being printed in incorrect order. - - - - - 0a94fbb0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to run tests without generating diff. - - - - - 76a58c6f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor HTML test suite boilerplate to external package. - - - - - af41e6b0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utilities for storing directory configuration. - - - - - d8f0698f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move IO-dependent config of HTML test suite to test package. - - - - - 17369fa0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Enable all compiler warnings in Haddock test package configuration. - - - - - 9d03b47a by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move Haddock runner of HTML test suite to Haddock test package. - - - - - 4b3483c5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 03754194 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience wrappers to simplify in test entry points. - - - - - 27476ab7 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adjust module visibility and items they export. - - - - - c40002ba by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Remove no longer useful test option. - - - - - 55ab2541 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Change extension of test files used for diffing. - - - - - 136bf4e4 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor and simplify XHTML helper module of test package. - - - - - 69f7e3df by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix typo in link stripper of HTML test suite runner. - - - - - 0c3c1c6b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience script for running specific HTML tests. - - - - - 489e1b05 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement utility functions for conditional link stripping. - - - - - 0f985dc3 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt `hypsrc-test` module to work with new testing framework. - - - - - 927406f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement output accepting mechanism in test package. - - - - - 8545715e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utility function for recursive obtaining directory contents. - - - - - cb70381f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 019599b5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix path handling in test runner. - - - - - 399b985b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to specify ignored files for test output. - - - - - 41b3d93d by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt HTML test runner to use new ignoring functionality. - - - - - e2091c8b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix bug with not all test output files being checked. - - - - - b22134f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Specify ignored files for hyperlinker source test runner. - - - - - 3301dfa1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Copy test runner script for hyperlinked source case. - - - - - d39a6dfa by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner invoking Haddock in incorrect mode. - - - - - f32c8ff3 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix path handling in test module loader. - - - - - 10f94ee9 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make test runner ignore test packages with no modules. - - - - - 5dc4239c by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create test runner entry points for LaTeX test suite. - - - - - 58d1f7cf by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with unnecessary checking old test output. - - - - - c7ce76e1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Re-implement test acceptance functionality. - - - - - 13bbabe8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix warning about no longer needed definition. - - - - - 958a99b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Adapt Cabal configuration to execute LaTeX suite with new runner. - - - - - 550ff663 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Setup test suite for Hoogle backend. - - - - - 3aa969c4 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make Hoogle backend create output directory if needed. - - - - - eb085b02 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Add appropriate .gitignore entry and configure Hoogle test suite. - - - - - a50bf915 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner failing when run on multiple test packages. - - - - - bf5368b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create simple test cases for Hoogle backend. - - - - - 6121ba4b by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create helper function for conversion between XML and XHTML. - - - - - cb516061 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Refactor existing code to use XHTML printer instead of XML one. - - - - - e2de8c82 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Improve portability of test runner scripts. - - - - - 9563e774 by Łukasz Hanuszczak at 2015-08-22T23:43:16+02:00 Remove redundant import statement. - - - - - 55353df1 by Łukasz Hanuszczak at 2015-08-24T23:09:20+02:00 Fix bug with accepting to non-existing directory. - - - - - 00a334ca by Łukasz Hanuszczak at 2015-08-24T23:09:47+02:00 Accept output for Hoogle and LaTeX backends. - - - - - 29191d8b by Łukasz Hanuszczak at 2015-08-24T23:14:18+02:00 Get rid of obsolete testing utilities. - - - - - bbb25db3 by Łukasz Hanuszczak at 2015-08-24T23:18:50+02:00 Update sandbox setup guide to work with Haddock test package. - - - - - cfd45248 by Łukasz Hanuszczak at 2015-08-24T23:51:30+02:00 Make Travis aware of Haddock test package. - - - - - 74185b7a by Łukasz Hanuszczak at 2015-08-25T17:41:59+02:00 Fix test suite failure when used with Stack. - - - - - 18769697 by Łukasz Hanuszczak at 2015-08-25T18:02:09+02:00 Add sample Stack setup to the hacking guide. - - - - - 22715eeb by Łukasz Hanuszczak at 2015-08-25T18:04:47+02:00 Fix Markdown formatting of README file. - - - - - b49ec386 by Łukasz Hanuszczak at 2015-08-25T18:13:36+02:00 Setup Haddock executable path in Travis configuration. - - - - - 5d29eb03 by Eric Seidel at 2015-08-30T09:55:58-07:00 account for changes to ipClass - - - - - f111740a by Ben Gamari at 2015-09-02T13:20:37+02:00 Merge pull request haskell/haddock#443 from bgamari/ghc-head account for changes to ipClass - - - - - a2654bf6 by Jan Stolarek at 2015-09-03T01:32:57+02:00 Follow changes from haskell/haddock#6018 - - - - - 2678bafe by Richard Eisenberg at 2015-09-21T12:00:47-04:00 React to refactoring CoAxiom branch lists. - - - - - ebc56e24 by Edward Z. Yang at 2015-09-21T11:53:46-07:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4a8c4198 by Tamar Christina at 2015-09-27T13:59:08+02:00 Create Process: removed PhaseFailed - - - - - 7e99b790 by Oleg Grenrus at 2015-09-27T20:52:10+03:00 Generate docs for orphan instances - - - - - 32e932e2 by Oleg Grenrus at 2015-09-28T07:21:11+03:00 Have source links for orphan instances - - - - - c2eb9f4f by Oleg Grenrus at 2015-09-28T07:24:58+03:00 Print orphan instances header only if required - - - - - ff96f978 by Oleg Grenrus at 2015-09-28T07:40:54+03:00 Add orphan instances link to contents box - - - - - d72490a6 by Oleg Grenrus at 2015-09-28T16:37:44+03:00 Fix orphan instance collapsing - - - - - 25d3dfe5 by Ben Gamari at 2015-10-03T12:38:09+02:00 Merge pull request haskell/haddock#448 from Mistuke/fix-silent-death-of-runInteractive Remove PhaseFailed - - - - - 1e45e43b by Edward Z. Yang at 2015-10-11T13:10:10-07:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b1370ac1 by Adam Gundry at 2015-10-16T16:26:42+01:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 60bef421 by Simon Peyton Jones at 2015-10-26T12:52:36+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 4c1898ca by Simon Peyton Jones at 2015-10-27T14:24:56+00:00 Track change to PatSyn.patSynSig - - - - - 25108e85 by Simon Peyton Jones at 2015-10-27T17:34:18+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - 693643ac by Ben Gamari at 2015-10-28T14:33:06+01:00 Account for Typeable changes The treatment of type families changed. - - - - - cd7c2221 by Simon Peyton Jones at 2015-10-30T13:03:51+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - 712032cb by Herbert Valerio Riedel at 2015-10-31T11:01:45+01:00 Relax upper bound on `base` to allow base-4.9 - - - - - 0bfa0475 by Simon Peyton Jones at 2015-10-31T19:08:13+00:00 More adaption to wildcard-refactor - - - - - 0a3c0cb7 by Simon Peyton Jones at 2015-10-31T22:14:43+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - c4fd4ec9 by Alan Zimmerman at 2015-11-01T11:16:34+01:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 42cdd882 by Matthew Pickering at 2015-11-06T20:02:16+00:00 Change for IEThingWith - - - - - f368b7be by Ben Gamari at 2015-11-11T11:35:51+01:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - e32965b8 by Simon Peyton Jones at 2015-11-13T12:18:17+00:00 Merge with origin/head - - - - - ebcf795a by Edward Z. Yang at 2015-11-13T21:56:27-08:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4e23989f by Simon Peyton Jones at 2015-11-18T11:32:54+00:00 Wibbles to Haddock - - - - - 2289cd4a by Simon Peyton Jones at 2015-11-20T23:12:49+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor - - - - - 695975a6 by Alan Zimmerman at 2015-11-21T21:16:12+02:00 Update to match GHC wip/T11019 - - - - - bbba21e7 by Simon Peyton Jones at 2015-11-23T13:54:31+00:00 merge with origin/ghc-head - - - - - 3d664258 by Simon Peyton Jones at 2015-11-23T17:17:18+00:00 Wibble - - - - - e64cf586 by Herbert Valerio Riedel at 2015-12-05T00:29:55+01:00 Canonicalise Monad instances - - - - - a2de15a7 by Alan Zimmerman at 2015-12-05T17:33:52+02:00 Matching changes for haskell/haddock#11028 - - - - - cc29a3e4 by Alan Zimmerman at 2015-12-05T19:45:33+02:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 95dd15d1 by Richard Eisenberg at 2015-12-11T17:33:39-06:00 Update for type=kinds - - - - - cb5fd9ed by Herbert Valerio Riedel at 2015-12-14T15:07:30+00:00 Bump versions for ghc-7.11 - - - - - 4f286d96 by Simon Peyton Jones at 2015-12-14T15:10:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 13ea2733 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 098df8b8 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track changes in HsSyn for quasi-quotes - - - - - 716a64de by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track change in API of TyCon - - - - - 77a66bca by Adam Gundry at 2015-12-14T15:10:58+00:00 Track API changes to support empty closed type familes - - - - - f2808305 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track the new location of setRdrNameSpace - - - - - ba8b08a4 by Alan Zimmerman at 2015-12-14T15:10:59+00:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - a4ded87e by Thomas Winant at 2015-12-14T15:14:05+00:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 25c78107 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: print correct strictness marks - - - - - 6cbc41c4 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: changes in HsBang type - - - - - ad46821a by Alan Zimmerman at 2015-12-14T15:14:06+00:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - abc0ae5b by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 3308d06c by Thomas Miedema at 2015-12-14T15:14:07+00:00 Follow changes in GHC build system - - - - - 6c763deb by Eric Seidel at 2015-12-14T15:14:07+00:00 account for changes to ipClass - - - - - ae5b4eac by Jan Stolarek at 2015-12-14T15:17:00+00:00 Follow changes from haskell/haddock#6018 - - - - - ffbc40e0 by Richard Eisenberg at 2015-12-14T15:17:02+00:00 React to refactoring CoAxiom branch lists. - - - - - d1f531e9 by Edward Z. Yang at 2015-12-14T15:17:02+00:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 79f73754 by Tamar Christina at 2015-12-14T15:17:02+00:00 Create Process: removed PhaseFailed - - - - - 3d37bebb by Edward Z. Yang at 2015-12-14T15:20:46+00:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 5f8a9e44 by Adam Gundry at 2015-12-14T15:20:48+00:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 79dda70f by Simon Peyton Jones at 2015-12-14T15:26:02+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 959930fb by Simon Peyton Jones at 2015-12-14T15:37:50+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - e18a8df5 by Simon Peyton Jones at 2015-12-14T15:37:52+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - aa35ab52 by Simon Peyton Jones at 2015-12-14T15:40:18+00:00 More adaption to wildcard-refactor - - - - - 8ceef94b by Simon Peyton Jones at 2015-12-14T15:46:04+00:00 Track change to PatSyn.patSynSig - - - - - cd81e83d by Ben Gamari at 2015-12-14T15:46:06+00:00 Account for Typeable changes The treatment of type families changed. - - - - - 63c9117c by Herbert Valerio Riedel at 2015-12-14T15:46:34+00:00 Relax upper bound on `base` to allow base-4.9 - - - - - a484c613 by Alan Zimmerman at 2015-12-14T15:47:46+00:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 2c26fa51 by Matthew Pickering at 2015-12-14T15:47:47+00:00 Change for IEThingWith - - - - - 593baa0f by Ben Gamari at 2015-12-14T15:49:21+00:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - b6b5ca78 by Edward Z. Yang at 2015-12-14T15:49:54+00:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b5b0e072 by Alan Zimmerman at 2015-12-14T15:54:20+00:00 Update to match GHC wip/T11019 - - - - - 14ddeb68 by Simon Peyton Jones at 2015-12-14T15:54:22+00:00 Wibble - - - - - 10a90ad8 by Herbert Valerio Riedel at 2015-12-14T15:54:22+00:00 Canonicalise Monad instances - - - - - ed68ac50 by Alan Zimmerman at 2015-12-14T15:55:48+00:00 Matching changes for haskell/haddock#11028 - - - - - 3f7e5a2d by Alan Zimmerman at 2015-12-14T15:55:49+00:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 6543a73f by Richard Eisenberg at 2015-12-14T15:59:55+00:00 Update for type=kinds - - - - - 193a5c48 by Matthew Pickering at 2015-12-14T18:17:00+00:00 Changes to compile with 8.0 - - - - - add669ec by Matthew Pickering at 2015-12-14T18:47:12+00:00 Warnings - - - - - 223f3fb4 by Ben Gamari at 2015-12-15T23:45:05+01:00 Update for D1200 - - - - - d058388f by Ben Gamari at 2015-12-16T05:40:17-05:00 Types: Add Outputable[Bndr] DocName instances - - - - - 62ecd7fb by Ben Gamari at 2015-12-16T09:23:09-05:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ddbc187a by Ben Gamari at 2015-12-16T17:54:55+01:00 Update for D1200 - - - - - cec83b52 by Ben Gamari at 2015-12-16T17:54:55+01:00 Types: Add Outputable[Bndr] DocName instances - - - - - d12ecc98 by Ben Gamari at 2015-12-16T17:54:55+01:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ada1616f by Ben Gamari at 2015-12-16T17:54:58+01:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a4f0383d by Ben Gamari at 2015-12-16T23:32:38+01:00 Fix Hyperlinker GHC.con_names is now GHC.getConNames - - - - - a10e6849 by Ben Gamari at 2015-12-20T00:54:11+01:00 Merge remote-tracking branch 'mrhania/testing-framework-improvements' into ghc-head - - - - - f078b4fd by Ben Gamari at 2015-12-20T00:59:51+01:00 test: Compatibility with Cabal 1.23 - - - - - 88a511a9 by Ben Gamari at 2015-12-20T01:14:35+01:00 Merge remote-tracking branch 'phadej/orphans' into ghc-head - - - - - 4e250f36 by Ben Gamari at 2015-12-20T01:14:52+01:00 Add html-test for orphan instances output - - - - - 87fffbad by Alan Zimmerman at 2015-12-20T09:50:42+02:00 Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc - - - - - 6b7e51c9 by idontgetoutmuch at 2015-12-20T21:01:47+00:00 Merge pull request haskell/haddock#1 from haskell/ghc-head Ghc head - - - - - 229c1fb5 by Dominic Steinitz at 2015-12-21T07:19:16+00:00 Handle inline math with mathjax. - - - - - 57902d66 by Dominic Steinitz at 2015-12-21T08:07:11+00:00 Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs - - - - - 0e69f236 by Herbert Valerio Riedel at 2015-12-21T18:30:43+01:00 Fix-up left-over assumptions of GHC 7.12 into GHC 8.0 - - - - - c67f8444 by Simon Peyton Jones at 2015-12-22T16:26:56+00:00 Follow removal of NamedWildCard from HsType - - - - - da40327a by Ben Gamari at 2015-12-23T14:15:28+01:00 html-test/Operators: Clear up ambiguous types For reasons that aren't entirely clear a class with ambiguous types was accepted by GHC <8.0. I've added a functional dependency to clear up this ambiguity. - - - - - 541b7fa4 by Ben Gamari at 2015-12-23T14:18:51+01:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 0febc947 by Ben Gamari at 2015-12-24T00:30:20+01:00 hoogle-test/AssocTypes: Allow AmbiguousTypes GHC 8.0 complains otherwise - - - - - 25810841 by Ben Gamari at 2015-12-24T00:33:18+01:00 OrphanInstances: Accept test output - - - - - 841987f3 by Ben Gamari at 2015-12-25T11:03:11+01:00 Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head - - - - - 358391f0 by Ben Gamari at 2015-12-26T10:44:50+01:00 Add missing import - - - - - a8896885 by Ben Gamari at 2015-12-26T10:45:27+01:00 travis: Use Travis containers - - - - - 85e82134 by Herbert Valerio Riedel at 2015-12-30T17:25:39+01:00 tweak version bounds for GHC-8.1 - - - - - 672a5f75 by randen at 2016-01-01T23:45:25-08:00 The Haddock part for fully gcc-like response files " driver/Main.hs * Moved the response file handling into ResponseFile.hs, updating import section as appropriate. * driver/ResponseFile.hs * New file. In anticipation that maybe some day this could be provided by another library, and to make it possible to unit test, this functionality is pulled out of the Main.hs module, and expanded to support the style/format of response files which gcc uses. * The specification for the format of response files which gcc generates and consumes, seems to be best derived from the gcc code itself (libiberty/argv.c), so that is what has been done here. * This is intended to fix haskell/haddock#379 * driver-test/Main.hs * New file for testing code in the driver source tree * driver-test/ResponseFileSpec.hs * Tests, adapted/adopted from the same gcc code where the escaping/unescaping is from, in the hspec style of unit tests * haddock.cabal * Add the driver-test test-suite. Introduces a new library dependency (upon hspec) for the haddock driver target in the haddock.cabal file, but practically, this should not be a problem as the haddock-api tests already depend on hspec. - - - - - 498781df by Ben Gamari at 2016-01-06T13:41:04+01:00 Version bumps and changelog - - - - - 8451e46a by Ben Gamari at 2016-01-06T13:47:17+01:00 Merge remote-tracking branch 'randen/bug468' - - - - - fb2d9181 by Ben Gamari at 2016-01-06T08:14:42-05:00 Add ResponseFile to OtherModules - - - - - 2cb2d2e3 by Ben Gamari at 2016-01-06T14:35:00+01:00 Merge branch 'master' into ghc-head - - - - - 913477d4 by Eric Seidel at 2016-01-11T14:57:57-08:00 deal with un-wiring of IP class - - - - - c557a4b3 by Alan Zimmerman at 2016-01-15T11:14:35+02:00 Update to match wip/T11430 in GHC - - - - - 3e135093 by Alan Zimmerman at 2016-01-16T18:21:59+01:00 Update to match wip/T11430 in GHC - - - - - c48ef2f9 by Ben Gamari at 2016-01-18T09:50:06+01:00 Merge remote-tracking branch 'gridaphobe/ghc-head' into ghc-head - - - - - 9138a1b0 by Eric Seidel at 2016-01-18T12:50:15+01:00 deal with un-wiring of IP class (cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f) - - - - - b48c172e by Joachim Breitner at 2016-01-19T00:11:38+01:00 Make sure --mathjax affects all written HTML files This fixes haskell/haddock#475. - - - - - af61fe63 by Ryan Scott at 2016-02-07T23:25:57+01:00 Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes haskell/haddock#473) - - - - - b6458693 by Ben Gamari at 2016-02-07T23:29:27+01:00 Merge pull request haskell/haddock#477 from haskell/issue-475 Make sure --mathjax affects all written HTML files - - - - - adcc0071 by Ben Gamari at 2016-02-07T23:34:52+01:00 Merge branch 'master' into ghc-head - - - - - d0404e61 by Ben Gamari at 2016-02-08T12:46:49+01:00 doc: Switch to Sphinx - - - - - acb153b3 by Ben Gamari at 2016-02-08T12:46:56+01:00 Document --use-unicode flag - - - - - c20bdf1d by Ben Gamari at 2016-02-08T13:41:24+01:00 Fix GHC and haddock-library dependency bounds - - - - - 8d946801 by Ben Gamari at 2016-02-08T14:54:56+01:00 testsuite: Rework handling of output sanitization Previously un-cleaned artifacts were kept as reference output, making it difficult to tell what has changed and causing spurious changes in the version control history. Here we rework this, cleaning the output during acceptance. To accomplish this it was necessary to move to strict I/O to ensure the reference handle was closed before accept attempts to open the reference file. - - - - - c465705d by Ben Gamari at 2016-02-08T15:36:05+01:00 test: Compare on dump For reasons I don't understand the Xml representations differ despite their textual representations being identical. - - - - - 1ec0227a by Ben Gamari at 2016-02-08T15:36:05+01:00 html-test: Accept test output - - - - - eefbd63a by Ben Gamari at 2016-02-08T15:36:08+01:00 hypsrc-test: Accept test output And fix impredicative Polymorphism testcase. - - - - - d1df4372 by Ben Gamari at 2016-02-08T15:40:44+01:00 Merge branch 'fix-up-testsuite' - - - - - 206a3859 by Phil Ruffwind at 2016-02-08T17:51:21+01:00 Move the permalinks to "#" on the right side Since pull request haskell/haddock#407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). - - - - - 6c89fa03 by Phil Ruffwind at 2016-02-08T17:54:44+01:00 Update tests for previous commit - - - - - effaa832 by Ben Gamari at 2016-02-08T17:56:17+01:00 Merge branch 'anchors-redux' - - - - - 9a2bec90 by Ben Gamari at 2016-02-08T17:58:40+01:00 Use -fprint-unicode-syntax when --use-unicode is enabled This allows GHC to render `*` as its Unicode representation, among other things. - - - - - 28ecac5b by Ben Gamari at 2016-02-11T18:53:03+01:00 Merge pull request haskell/haddock#480 from bgamari/sphinx Move documentation to ReStructuredText - - - - - 222e5920 by Ryan Scott at 2016-02-11T15:42:42-05:00 Collapse type/data family instances by default - - - - - a80ac03b by Ryan Scott at 2016-02-11T20:17:09-05:00 Ensure expanded family instances render correctly - - - - - 7f985231 by Ben Gamari at 2016-02-12T10:04:22+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - d4eda086 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Various cleanups - - - - - 79bee48d by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show kind signatures for type family variables Addresses GHC haskell/haddock#11588. - - - - - b2981d98 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show 'where ...' after closed type family Seems like we should ideally show the actual equations as well but that seems like it would be a fair amount of work - - - - - cfc0e621 by Ben Gamari at 2016-02-18T22:48:12+01:00 Merge pull request haskell/haddock#483 from bgamari/T11588 Fix GHC haskell/haddock#11588 This fixes GHC haskell/haddock#11588: * Show where ... after closed type families * Show kind signatures on type family type variables - - - - - 256e8a0d by Ben Gamari at 2016-02-18T23:15:39+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 32402036 by Richard Eisenberg at 2016-02-24T13:21:44-05:00 Follow-on changes to support RuntimeRep - - - - - 2b1c572d by Matthew Pickering at 2016-03-04T21:04:02+00:00 Remove unused functions - - - - - eb906f50 by Richard Eisenberg at 2016-03-13T21:17:20+01:00 Follow-on changes to support RuntimeRep (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c) - - - - - 8c34ef34 by Richard Eisenberg at 2016-03-14T23:47:23-04:00 Changes due to fix for GHC#11648. - - - - - 0e022014 by Richard Eisenberg at 2016-03-15T14:06:45+01:00 Changes due to fix for GHC#11648. (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1) - - - - - ed3f78ab by Rik Steenkamp at 2016-04-02T22:20:36+01:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 - - - - - d3210042 by Rik Steenkamp at 2016-04-04T15:43:32+02:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb) - - - - - 236eec90 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 692ee7e0 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. - - - - - 79619f57 by Ben Gamari at 2016-04-10T23:46:22+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. (cherry picked from commit c6d6a18d85e5e2d9bb5904e6919e8a8d7e31c4c5) - - - - - 3358ccb4 by Ben Gamari at 2016-04-10T23:47:27+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 264949b1 by Ben Gamari at 2016-04-16T17:50:23+02:00 Merge pull request haskell/haddock#482 from RyanGlScott/ghc-head Collapse type/data family instances by default - - - - - 478c483a by Ben Gamari at 2016-04-16T17:51:09+02:00 Merge pull request haskell/haddock#489 from mpickering/unused-functions Remove some unused functions - - - - - c94e55f0 by Ryan Scott at 2016-04-16T17:57:54+02:00 Collapse type/data family instances by default (cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088) - - - - - 31e633d3 by Ryan Scott at 2016-04-16T17:58:06+02:00 Ensure expanded family instances render correctly (cherry picked from commit 1338b5d7c32939de6bbc31af0049477e4f847103) - - - - - 03e4d197 by Matthew Pickering at 2016-04-16T17:58:21+02:00 Remove unused functions (cherry picked from commit b89d1c2456bdb2d4208d94ded56155f7088a37d0) - - - - - ed4116f6 by Ben Gamari at 2016-04-20T10:46:57+02:00 ghc: Install files for needed --hyperlinked-source - - - - - 0be999c4 by Ben Gamari at 2016-04-20T11:37:54+02:00 ghc: Install files for needed --hyperlinked-source (cherry picked from commit 5c82c9fc2d21ddaae4a2470f1c375426968f19c6) - - - - - 4d17544c by Simon Peyton Jones at 2016-04-20T12:42:28+01:00 Track change to HsGroup This relates to a big GHC patch for Trac haskell/haddock#11348 - - - - - 1700a50d by Ben Gamari at 2016-05-01T13:19:27+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. - - - - - 0b7c8125 by Ben Gamari at 2016-05-01T13:21:43+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. (cherry picked from commit 609018dd09c4ffe27f9248b2d8b50f6196cd42b9) - - - - - af115ce0 by Ryan Scott at 2016-05-04T22:15:50-04:00 Render Haddocks for derived instances Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac haskell/haddock#11768. - - - - - 76fa1edc by Ben Gamari at 2016-05-10T18:13:25+02:00 haddock-test: A bit of refactoring for debuggability - - - - - 7d4c4b20 by Ben Gamari at 2016-05-10T18:13:25+02:00 Create: Mark a comment as TODO - - - - - 2a6d0c90 by Ben Gamari at 2016-05-10T18:13:25+02:00 html-test: Update reference output - - - - - bd60913d by Ben Gamari at 2016-05-10T18:13:25+02:00 hypsrc-test: Fix reference file path in cabal file It appears the haddock insists on prefixing --hyperlinked-sourcer output with directory which the source appeared in. - - - - - c1548057 by Ben Gamari at 2016-05-10T18:22:12+02:00 doc: Update extra-source-files in Cabal file - - - - - 41d5bae3 by Ben Gamari at 2016-05-10T18:29:21+02:00 Bump versions - - - - - ca75b779 by Ben Gamari at 2016-05-11T16:03:44+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 4e3cfd62 by Ben Gamari at 2016-05-11T16:06:45+02:00 Merge remote-tracking branch 'RyanGlScott/ghc-head' into ghc-head - - - - - a2379970 by Ben Gamari at 2016-05-11T23:15:11+02:00 doc: Add clean targets - - - - - f275212e by Ben Gamari at 2016-05-11T23:15:14+02:00 doc: Add html as an all-target for ghc Otherwise the html documentation won't be installed for binary-dist. - - - - - 388fc0af by Ben Gamari at 2016-05-12T09:49:12+02:00 Update CHANGES - - - - - bad81ad5 by Ben Gamari at 2016-05-12T09:49:38+02:00 Version bump - - - - - c01688a7 by Ben Gamari at 2016-05-12T10:04:58+02:00 Revert "Version bump" This bump was a bit premature. This reverts commit 7b238d9c5be9b07aa2d10df323b5c7b8d1634dc8. - - - - - 7ed05724 by Ben Gamari at 2016-05-12T10:05:33+02:00 doc: Fix GHC clean rule Apparently GHC's build system doesn't permit wildcards in clean paths. - - - - - 5d9611f4 by Ben Gamari at 2016-05-12T17:43:50+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 653566b2 by Ben Gamari at 2016-05-14T09:57:31+02:00 Version bump to 2.17.2 - - - - - b355c439 by Ben Gamari at 2016-05-14T09:57:51+02:00 doc: Use `$(MAKE)` instead of `make` This is necessary to ensure we use gmake. - - - - - 8a18537d by Ben Gamari at 2016-05-14T10:15:45+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - b3290ef1 by Sebastian Meric de Bellefon at 2016-05-14T11:29:47-04:00 Fix haskell/haddock#303. Hide footer when printing The "Produced by Haddock" footer was overlapping the page's body when printing. This patch hides the footer with a css media rule. - - - - - b4a76f89 by Sebastian Meric de Bellefon at 2016-05-15T02:12:46-04:00 Fix haskell/haddock#280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines - - - - - ba797c9e by Ben Gamari at 2016-05-16T14:53:46+02:00 doc: Vendorize alabaster Sphinx theme Alabaster is now the default sphinx theme and is a significant improvement over the previous default that it's worthproviding it when unavailable (e.g. Sphinx <1.3). - - - - - c9283e44 by Ben Gamari at 2016-05-16T14:55:17+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 1c9ea198 by Sebastian Méric de Bellefon at 2016-05-16T12:30:40-04:00 Merge pull request haskell/haddock#502 from Helkafen/master Fix haskell/haddock#303. Hide footer when printing - - - - - 33631016 by Ben Gamari at 2016-05-16T19:56:11+02:00 Revert "doc: Vendorize alabaster Sphinx theme" This ended up causes far too many issues to be worthwhile. We'll just have to live with inconsistent haddock documentation. This reverts commit cec21957001143794e71bcd9420283df18e7de40. - - - - - 93317d26 by Ben Gamari at 2016-05-16T19:56:11+02:00 cabal: Fix README path - - - - - c8695b22 by Ben Gamari at 2016-05-16T19:58:51+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 0b50eaaa by Ben Gamari at 2016-05-16T21:02:08+02:00 doc: Use whichever theme sphinx deems appropriate - - - - - 857c1c9c by Ben Gamari at 2016-05-16T21:07:08+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 15fc5637 by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Remove redundant imports - - - - - 132ddc6a by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Better debug output For tracking down haskell/haddock#505 - - - - - 2252a149 by Ben Gamari at 2016-05-22T12:43:59+02:00 Don't consider default class ops when looking for decls When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of haskell/haddock#505. - - - - - 4886b2ec by Oleg Grenrus at 2016-05-24T16:19:48+03:00 UnfelpfulSpan line number omitted Kind of resolves https://github.com/haskell/haddock/issues/508 - - - - - a4befd36 by Oleg Grenrus at 2016-05-24T16:53:35+03:00 Change Hyperlinked lexer to know about DataKinds ticks - - - - - f45cb52e by David Feuer at 2016-05-24T18:48:53-04:00 Make parser state a newtype Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day. - - - - - 05013dd7 by Sebastian Meric de Bellefon at 2016-05-24T22:03:55-04:00 remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) Frames are a bit broken, ignored by Hackage, and considered obsolete in general. This patch disables frames generation. The mini_*.html files are still used in the synopsis. - - - - - b8163a88 by Ben Gamari at 2016-05-25T14:44:15+02:00 Merge pull request haskell/haddock#507 from bgamari/T505 Fix haskell/haddock#505 - - - - - ea1b30c6 by Sebastian Meric de Bellefon at 2016-05-25T14:17:00-04:00 Update CHANGES - - - - - eddfc258 by Sebastian Méric de Bellefon at 2016-05-25T15:17:40-04:00 Merge pull request haskell/haddock#514 from Helkafen/frames remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) - - - - - 0e506818 by Alex Biehl at 2016-05-26T12:43:09+02:00 Remove misplaced haddock comment - - - - - a07d28c0 by Ben Gamari at 2016-05-27T11:34:59+02:00 Merge pull request haskell/haddock#515 from alexbiehl/master Remove misplaced haddock comment - - - - - 9001d267 by Ben Gamari at 2016-05-27T11:35:46+02:00 Merge pull request haskell/haddock#513 from treeowl/newtype-since Make parser state a newtype - - - - - 74e1a018 by Sebastian Méric de Bellefon at 2016-05-28T17:28:15-04:00 Merge pull request haskell/haddock#504 from Helkafen/issue-280 Fix haskell/haddock#280. Parsing of module header - - - - - 37557f4f by Alan Zimmerman at 2016-05-29T23:36:50+02:00 Matching changes for haskell/haddock#12105 - - - - - 7d09e5d6 by Sebastian Meric de Bellefon at 2016-06-03T18:07:48-04:00 Version bumps (2.17.3, 1.4.2) - - - - - 85b4bc15 by Sebastian Méric de Bellefon at 2016-06-06T18:35:13-04:00 Merge pull request haskell/haddock#521 from Helkafen/master Version bumps (2.17.3, 1.4.2) - - - - - e95f0dee by Sebastian Meric de Bellefon at 2016-06-06T19:11:35-04:00 publish haddock-test library - - - - - 4de40586 by Sebastian Méric de Bellefon at 2016-06-06T20:26:30-04:00 Merge pull request haskell/haddock#512 from phadej/oleg-fixes Fixes for haskell/haddock#508 and haskell/haddock#510 - - - - - ddfd0789 by Dominic Steinitz at 2016-06-09T09:27:28+01:00 Documentation for LaTeX markup. - - - - - 697a503a by Dominic Steinitz at 2016-06-09T09:33:59+01:00 Fix spelling mistake. - - - - - 246f6fff by Dominic Steinitz at 2016-06-09T09:37:15+01:00 Camel case MathJax. - - - - - 4684bd23 by Dominic Steinitz at 2016-06-09T09:44:53+01:00 Fix math typo and add link. - - - - - f20c037c by Simon Peyton Jones at 2016-06-13T18:26:03+01:00 Follow changes to LHsSigWcType - - - - - 0c58996d by Simon Peyton Jones at 2016-06-15T12:56:01+01:00 Follow GHC re-adding FunTy - - - - - 401b5ca7 by Sebastian Méric de Bellefon at 2016-06-15T12:16:47-04:00 Merge pull request haskell/haddock#525 from idontgetoutmuch/master Documentation for LaTeX markup. - - - - - 92d263b7 by Sebastian Méric de Bellefon at 2016-06-15T12:17:29-04:00 Merge pull request haskell/haddock#522 from Helkafen/master publish haddock-test library - - - - - 0953a2ca by Sebastian Meric de Bellefon at 2016-06-16T00:46:46-04:00 Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 65453e14 by Ben Gamari at 2016-06-16T11:16:32+02:00 ocean: Ensure that synopsis fully covers other content Previously MathJax content was being rendered on top of the synopsis due to ambiguous z-ordering. Here we explicitly give the synopsis block a higher z-index to ensure it is rendered on top. Fixes haskell/haddock#531. - - - - - 68e411a1 by Sebastian Méric de Bellefon at 2016-06-16T23:34:39-04:00 Merge pull request haskell/haddock#534 from bgamari/T531 ocean: Ensure that synopsis fully covers other content - - - - - fad6491b by Sebastian Méric de Bellefon at 2016-06-18T23:57:20-04:00 Merge pull request haskell/haddock#533 from Helkafen/master Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 6108e21b by Sebastian Meric de Bellefon at 2016-06-22T23:08:28-04:00 do not create empty src directory Fix haskell/haddock#536. - - - - - 1ef23823 by Sebastian Méric de Bellefon at 2016-06-24T00:04:48-04:00 Merge pull request haskell/haddock#537 from Helkafen/master do not create empty src directory - - - - - 966baa96 by Omari Norman at 2016-06-29T21:59:34-04:00 Add $ as a special character If this character is not escaped, documentation built with Haddock 2.17.2 will fail. This was not an issue with 2.16 series, which causes builds to fail and there is nothing in the docs or error message giving a clue about why builds that used to succeed now don't. - - - - - 324adb60 by Ben Gamari at 2016-07-01T12:18:51+02:00 GhcUtils: Changes for multi-pattern signatures - - - - - d7571675 by Ömer Sinan Ağacan at 2016-07-21T13:30:47+02:00 Add support for unboxed sums - - - - - 29d0907b by Simon Marlow at 2016-07-22T13:55:48+01:00 Disable NFData instances for GHC types when GHC >= 8.2 - - - - - 702d95f3 by Simon Marlow at 2016-08-02T15:57:30+02:00 Disable NFData instances for GHC types when GHC >= 8.0.2 (cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a) - - - - - f4fa79c3 by Ben Gamari at 2016-08-07T13:51:18+02:00 ghc.mk: Don't attempt to install html/frames.html The frames business has been removed. - - - - - 9cd63daf by Ben Gamari at 2016-08-07T13:51:40+02:00 Haddock.Types: More precise version guard This allows haddock to be built with GHC 8.0.2 pre-releases. - - - - - f3d7e03f by Mateusz Kowalczyk at 2016-08-29T20:47:45+01:00 Merge pull request haskell/haddock#538 from massysett/master Add $ as a special character - - - - - 16dbf7fd by Bartosz Nitka at 2016-09-20T19:44:04+01:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 - - - - - 7c31c1ff by Bartosz Nitka at 2016-09-27T17:32:22-04:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b) - - - - - 33a90dce by Ryan Scott at 2016-09-30T20:53:41-04:00 Haddock changes for T10598 See https://ghc.haskell.org/trac/ghc/ticket/10598 - - - - - 1f32f7cb by Ben Gamari at 2016-10-13T20:01:26-04:00 Update for refactoring of NameCache - - - - - 1678ff2e by Ben Gamari at 2016-11-15T17:42:48-05:00 Bump upper bound on base - - - - - 9262a7c5 by Alan Zimmerman at 2016-12-07T21:14:28+02:00 Match changes in GHC wip/T3384 branch - - - - - ac0eaf1a by Ben Gamari at 2016-12-09T09:48:41-05:00 haddock-api: Don't use stdcall calling convention on 64-bit Windows See GHC haskell/haddock#12890. - - - - - 04afe4f7 by Alan Zimmerman at 2016-12-12T20:07:21+02:00 Matching changes for GHC wip/T12942 - - - - - e1d1701d by Ben Gamari at 2016-12-13T16:50:41-05:00 Bump base upper bound - - - - - 3d3eacd1 by Alan Zimmerman at 2017-01-10T16:59:38+02:00 HsIParamTy now has a Located name - - - - - 7dbceefd by Kyrill Briantsev at 2017-01-12T13:23:50+03:00 Prevent GHC API from doing optimization passes. - - - - - d48d1e33 by Richard Eisenberg at 2017-01-19T08:41:41-05:00 Upstream changes re levity polymorphism - - - - - 40c25ed6 by Alan Zimmerman at 2017-01-26T15:16:18+02:00 Changes to match haskell/haddock#13163 in GHC - - - - - 504f586d by Ben Gamari at 2017-02-02T17:19:37-05:00 Kill remaining static flags - - - - - 49147ea0 by Justus Adam at 2017-03-02T15:33:34+01:00 Adding MDoc to exports of Documentation.Haddock - - - - - 1cfba9b4 by Justus Adam at 2017-03-09T11:41:44+01:00 Also exposing toInstalledIface - - - - - 53f0c0dd by Ben Gamari at 2017-03-09T13:10:08-05:00 Bump for GHC 8.3 - - - - - c7902d2e by Ben Gamari at 2017-03-09T23:46:02-05:00 Bump for GHC 8.2 - - - - - 4f3a74f8 by Ben Gamari at 2017-03-10T10:21:55-05:00 Merge branch 'ghc-head' - - - - - e273b72f by Richard Eisenberg at 2017-03-14T13:34:04-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - 6ec3d436 by Richard Eisenberg at 2017-03-14T15:15:52-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - eee3cda1 by Ben Gamari at 2017-03-15T15:19:59-04:00 Adapt to EnumSet - - - - - 017cf58e by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 736d6773 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 475f84a0 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 13240b53 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - cd16d529 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 3bea97ae by Edward Z. Yang at 2017-03-15T22:50:46-07:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b2b051ce by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 0f082795 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 20ef63c9 by Edward Z. Yang at 2017-03-22T13:48:12-07:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 45692dcb by Edward Z. Yang at 2017-03-22T14:11:25-07:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4eae8caf by Ben Gamari at 2017-03-23T09:25:33-04:00 Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEAD - - - - - 0bbe03f5 by Ben Gamari at 2017-03-23T09:27:28-04:00 haddock-api: Bump bound on GHC - - - - - 65f3ac9d by Alex Biehl at 2017-03-23T17:36:11+01:00 Merge pull request haskell/haddock#581 from JustusAdam/master Adding more exports to Documentation.Haddock - - - - - 37d49a47 by Alex Biehl at 2017-03-23T17:39:14+01:00 Merge pull request haskell/haddock#568 from awson/ghc-head Prevent GHC API from doing optimization passes. - - - - - 1ed047e4 by Brian Huffman at 2017-03-23T17:45:58+01:00 Print any user-supplied kind signatures on type parameters. This applies to type parameters on data, newtype, type, and class declarations, and also to forall-bound type vars in type signatures. - - - - - 1b78ca5c by Brian Huffman at 2017-03-23T17:45:58+01:00 Update test suite to expect kind annotations on type parameters. - - - - - a856b162 by Alex Biehl at 2017-03-23T17:49:32+01:00 Include travis build indication badge - - - - - 8e2e2c56 by Ben Gamari at 2017-03-23T17:20:08-04:00 haddock-api: Bump bound on GHC - - - - - 4d2d9995 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737) - - - - - a650e20f by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858) - - - - - caa282c2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 2067a2d0afa9cef381d26fb7140b67c62f433fc0) - - - - - 49684884 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc) - - - - - 4dcfeb1a by Edward Z. Yang at 2017-03-23T17:20:08-04:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a) - - - - - 74dd19d2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e) - - - - - a9b19a23 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3) - - - - - d3631064 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit bf3c4d72a0fda38561376eac7eda216158783267) - - - - - ef2148fc by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1) - - - - - 2f29518b by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 4eb765ca4205c79539d60b7afa9b7e261a4a49fe) - - - - - 37de047d by Phil Ruffwind at 2017-04-03T11:57:14+02:00 Update MathJax URL MathJax is shutting down their CDN: https://www.mathjax.org/cdn-shutting-down/ They recommend migrating to cdnjs. - - - - - e9d24ba8 by David C. Turner at 2017-04-03T14:58:01+02:00 Add highlight for :target to ocean.css - - - - - 4819a202 by Alex Biehl at 2017-04-11T19:36:48+02:00 Allow base-4.10 for haddock-test - - - - - 44cec69c by Alex Biehl at 2017-04-11T19:39:22+02:00 cabal.project for haddock-api, haddock-library and haddock-test - - - - - 935d0f6a by Alex Biehl at 2017-04-11T19:46:29+02:00 Move dist scripts to scripts/ - - - - - 128e150c by Alex Biehl at 2017-04-11T20:34:46+02:00 Add haddock to cabal.project - - - - - cc8e08ea by Alex Biehl at 2017-04-11T20:35:08+02:00 Read files for hyperlinker eagerly This also exposes Documentation.Haddock.Utf8 - - - - - 152dda78 by Alex Biehl at 2017-04-11T20:37:06+02:00 Explicit import list ofr Control.DeepSeq in Haddock.Interface.Create - - - - - 501b33c4 by Kyrill Briantsev at 2017-04-11T21:01:42+02:00 Prevent GHC API from doing optimization passes. - - - - - c9f3f5ff by Alexander Biehl at 2017-04-12T16:36:53+02:00 Add @alexbiehl as maintaner - - - - - 76f214cc by Alex Biehl at 2017-04-13T07:27:18+02:00 Disable doctest with ghc-8.3 Currently doctest doesn't support ghc-head - - - - - 46b4f5fc by Edward Z. Yang at 2017-04-22T20:38:26-07:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f0555235 by Alex Biehl at 2017-04-25T10:08:48+02:00 Travis: Use ghc-8.2.1 on master - - - - - 966ea348 by Alex Biehl at 2017-04-25T10:32:01+02:00 Travis: Verbose cabal output cf. https://travis-ci.org/haskell/haddock/jobs/225512194#L377 - - - - - 36972bcd by Alex Biehl at 2017-04-25T10:40:43+02:00 Use travis_retry for cabal invocations - - - - - b3a09d2c by Alex Biehl at 2017-04-25T17:02:20+02:00 Use new MathJax URL in html-test 18ed871afb82560d5433b2f53e31b4db9353a74e switched to a new MathJax URL but didn't update the tests. - - - - - ae331e5f by Alexander Biehl at 2017-04-25T17:02:20+02:00 Expand signatures for class declarations - - - - - e573c65a by Alexander Biehl at 2017-04-25T17:02:20+02:00 Hoogle: Correctly print classes with associated data types - - - - - 3fc6be9b by Edward Z. Yang at 2017-04-25T17:02:20+02:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9) - - - - - 6725c060 by Herbert Valerio Riedel at 2017-04-25T17:02:20+02:00 `html-test --accept` deltas to reference samples - - - - - 7d444d61 by Alex Biehl at 2017-04-26T07:13:50+02:00 Remove anything related to obsolete frames mode - - - - - b888972c by Alex Biehl at 2017-04-26T07:49:10+02:00 Cherry-picked remaining commits from haddock-2.17.4-release (#603) * Release haddock/haddock-api 2.17.4 and haddock-library 1.4.3 * Set version bounds for haddock-library NB: This allows GHC 8.2.1's base * Set version bounds for haddock & haddock-api The version bounds support GHC 8.2 * Merge (temporary) v2.17.3 branch into v2.17 This allows us to delete the v2.17.3 branch * Fixup changelog * Pin down haddock-api to a single version as otherwise `haddock`'s package version has no proper meaning * fix source-repo spec for haddock-api - - - - - 4161099b by Alex Biehl at 2017-04-26T11:11:20+02:00 Update changelog to reflect news in HEAD - - - - - eed72cb8 by Alex Biehl at 2017-04-26T11:11:20+02:00 Markdownify changelog - - - - - 5815cea1 by Alex Biehl at 2017-04-26T11:32:33+02:00 Bump to 2.18.0 (#605) - - - - - a551d558 by Alex Biehl at 2017-04-29T22:00:25+02:00 Update attoparsec-0.12.1.1 to attoparsec-0.13.1.0 - - - - - ea164a8d by Sergey Vinokurov at 2017-04-29T22:42:36+02:00 Improve error message - - - - - 2e10122f by Alex Biehl at 2017-04-30T10:07:46+02:00 Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. - - - - - f9b24d99 by Alex Biehl at 2017-05-01T17:40:36+02:00 Lazily decode docMap and argMap (#610) These are only used in case of a doc reexport so most of the time decoding these is wasted work. - - - - - 2372af62 by Alex Biehl at 2017-05-01T21:59:23+02:00 Fix Binary instance for InstalledInterface (#611) (#610) introduced lazy decoding for docs from InstalledInterface but forgot to remove the original calls to get and put_ - - - - - 6c633c13 by Nathan Collins at 2017-05-11T11:47:55+02:00 Improve documenation of Haddock markup (#614) * Improve documentation of Haddock markup. - document that Haddock supports inferring types top-level functions with without type signatures, but also explain why using this feature is discouraged. Looks like this feature has been around since version 2.0.0.0 in 2008! - rework the "Module description" section: - move the general discussion of field formatting to the section intro and add examples illustrating the prose for multiline fields. - mention that newlines are preserved in some multiline fields, but not in others (I also noticed that commas in the `Copyright` field are not preserved; I'll look into this bug later). - add a subsection for the module description fields documentation, and put the field keywords in code formatting (double back ticks) instead of double quotes, to be consistent with the typesetting of keywords in other parts of the documentation. - mention that "Named chunks" are not supported in the long-form "Module description" documentation. - fix formatting of keywords in the "Module attributes" section. Perhaps these errors were left over from an automatic translation to ReST from some other format as part of the transition to using Sphinx for Haddock documentation? Also, add a missing reference here; it just said "See ?"! - update footnote about special treatment for re-exporting partially imported modules not being implemented. In my tests it's not implemented at all -- I tried re-exporting both `import B hiding (f)` and `import B (a, b)` style partial imports, and in both cases got the same result as with full imports `import B`: I only get a module reference. * Rework the `Controlling the documentation structure` section. My main goal was to better explain how to use Haddock without an export list, since that's my most common use case, but I hope I improved the section overall: - remove the incomplete `Omitting the export list` section and fold it into the other sections. In particular, summarize the differences between using and not using an export list -- i.e. control over what and in what order is documented -- in the section lead. - add "realistic" examples that use the structure markup, both with and without an export list. I wanted a realistic example here to capture how it can be useful to explain the relationship between a group of functions in a section, in addition to documenting their individual APIs. - make it clear that you can associate documentation chunks with documentation sections when you aren't using an export list, and that doing it in the most obvious way -- i.e. with `-- |`, as you can in the export list -- doesn't work without an export list. It took me a while to figure this out the first time, since the docs didn't explain it at all before. - add a "no export list" example to the section header section. - add more cross references. * Add examples of gotchas for markup in `@...@`. I'm not sure this will help anyone, since I think most people first learn about `@...@` by reading other people's Haddocks, but I've documented the mistakes which I've made and then gotten confused by. * Use consistent Capitalization of Titles. Some titles were in usual title caps, and others only had the first word capitalized. I chose making them all use title caps because that seems to make the cross references look better. - - - - - d4734f45 by Ben Gamari at 2017-05-12T20:36:08+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 93883f37 by Alex Biehl at 2017-05-12T21:02:33+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 5b8f179c by Alex Biehl at 2017-05-13T12:48:10+02:00 Consequently use inClass and notInClass in haddock-library (#617) These allow attoparsec to do some clever lookup optimization - - - - - 77984b82 by Doug Wilson at 2017-05-27T17:37:38+02:00 Don't enable compilation for template haskell (#624) This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa - - - - - 5a3de2b4 by Doug Wilson at 2017-05-27T19:54:53+02:00 Improve Syb code (#621) Specialize.hs and Ast.hs are modified to have their Syb code not recurse into Name or Id in HsSyn types. Specialize.hs is refactored to have fewer calls to Syb functions. Syb.hs has some foldl calls replaced with foldl' calls. There is still a lot of performance on the floor of Ast.hs. The RenamedSource is traversed many times, and lookupBySpan is very inefficient. everywhereBut and lookupBySpan dominate the runtime whenever --hyperlinked-source is passed. - - - - - 3d35a949 by Alex Biehl at 2017-05-30T19:01:37+02:00 Clear fixme comment (#625) - - - - - 2a44bd0c by Alex Biehl at 2017-05-30T19:02:12+02:00 Make haddock-library and haddock-api warning free (#626) - - - - - bd1a0e42 by Alex Biehl at 2017-06-01T10:40:33+02:00 Include `driver-test/*.hs` sdist (#630) This lead to haskell/haddock#629. - - - - - 184a3ab6 by Doug Wilson at 2017-06-03T12:02:08+02:00 Disable pattern match warnings (#628) This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns - - - - - 0cf68004 by Alex Biehl at 2017-06-03T20:37:28+02:00 Allow user defined signatures for pattern synonyms (#631) - - - - - 7f51a58a by Alex Biehl at 2017-06-04T11:56:38+02:00 Use NameSet for isExported check (#632) - - - - - d8f044a9 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Match new AST as per GHC wip/new-tree-one-param See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow - - - - - da1254e3 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Rename extension index tags - - - - - 538c7514 by Christiaan Baaij at 2017-06-09T08:26:43+02:00 Haddock support for bundled pattern synonyms (#627) * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after haskell/haddock#631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case - - - - - a050bffd by Doug Wilson at 2017-06-21T09:27:33+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636) There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6 - - - - - 5d06b871 by Doug Wilson at 2017-06-22T20:23:29+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639) * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports - - - - - b11bb73a by Alex Biehl at 2017-06-23T14:44:41+02:00 Lookup fixities for reexports without subordinates (#642) So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In haskell/haddock#644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from haskell/haddock#642 top-level functions now started to fail reexporting their fixities. - - - - - d2a6dad6 by Alex Biehl at 2017-06-23T18:30:45+02:00 Don't include names with empty subordinates in maps (#644) These are unecessary anyway and just blow up interface size - - - - - 69c2aac4 by Alex Biehl at 2017-06-29T19:54:49+02:00 Make per-argument docs for class methods work again (#648) * Make per-argument docs for class methods work again * Test case - - - - - c9448d54 by Bartosz Nitka at 2017-07-02T12:12:01+02:00 Fix haddock: internal error: links: UnhelpfulSpan (#561) * Fix haddock: internal error: links: UnhelpfulSpan This fixes haskell/haddock#554 for me. I believe this is another fall out of `wildcard-refactor`, like haskell/haddock#549. * Comment to clarify why we take the methods name location - - - - - d4f29eb7 by Alex Biehl at 2017-07-03T19:43:04+02:00 Document record fields when DuplicateRecordFields is enabled (#649) - - - - - 9d6e3423 by Yuji Yamamoto at 2017-07-03T22:37:58+02:00 Fix test failures on Windows (#564) * Ignore .stack-work * Fix for windows: use nul instead of /dev/null * Fix for windows: canonicalize line separator * Also normalize osx line endings - - - - - 7d81e8b3 by Yuji Yamamoto at 2017-07-04T16:13:12+02:00 Avoid errors on non UTF-8 Windows (#566) * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1) - - - - - eded67d2 by Alex Biehl at 2017-07-07T19:17:15+02:00 Remove redudant import warning (#651) - - - - - 05114757 by Alex Biehl at 2017-07-08T00:33:12+02:00 Avoid missing home module warning (#652) * Avoid missing home module warning * Update haddock-library.cabal - - - - - e9cfc902 by Bryn Edwards at 2017-07-17T07:51:20+02:00 Fix haskell/haddock#249 (#655) - - - - - eb02792b by Herbert Valerio Riedel at 2017-07-20T09:09:15+02:00 Fix compilation of lib:haddock-library w/ GHC < 8 - - - - - 9200bfbc by Alex Biehl at 2017-07-20T09:20:38+02:00 Prepare 2.18.1 release (#657) - - - - - 46ddd22c by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Tweak haddock-api.cabal for pending release - - - - - 85e33d29 by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Avoid trivial use of LambdaCase otherwise we can't test w/ e.g. GHC 7.4.2 - - - - - 3afb4bfe by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Refactor .cabal to use sub-lib for vendored lib A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite. - - - - - e56a552e by Herbert Valerio Riedel at 2017-07-20T10:17:48+02:00 haddock-api: add changelog pointing to haddock's changelog This addresses https://github.com/haskell/haddock/issues/638#issuecomment-309283297 - - - - - 2222ff0d by Herbert Valerio Riedel at 2017-07-20T10:19:56+02:00 Drop obsolete/misleading `stability: experimental` This .cabal property has long been considered obsolete - - - - - 9b882905 by Alex Biehl at 2017-07-20T11:25:54+02:00 Beef up haddock description (#658) * Beef up haddock description * Handle empty lines - - - - - bb60e95c by Herbert Valerio Riedel at 2017-07-20T12:08:53+02:00 Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet - - - - - 0761e456 by Herbert Valerio Riedel at 2017-07-20T12:12:55+02:00 Add cheatsheet to haddock.cabal - - - - - 2ece0f0f by Herbert Valerio Riedel at 2017-07-20T12:18:38+02:00 Mention new-build in README - - - - - 947b7865 by Herbert Valerio Riedel at 2017-07-20T12:32:16+02:00 Update README Also improves markup and removes/fixes redundant/obsolete parts [skip ci] - - - - - 785e09ad by Alex Biehl at 2017-07-27T07:28:57+02:00 Bump haddock to 2.18.2, haddock-library to 1.4.5 - - - - - e3ff1ca3 by Alex Biehl at 2017-07-31T20:15:32+02:00 Move `DocMarkup` from haddock-api to haddock-library (#659) * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG - - - - - cda7c20c by Alex Biehl at 2017-07-31T20:35:49+02:00 Fixup haddock - - - - - 583b6812 by Alex Biehl at 2017-07-31T21:20:45+02:00 Changelog for haddock-library - - - - - bac6a0eb by Alex Biehl at 2017-07-31T21:50:24+02:00 Prepare haddock-library-1.4.5 release - - - - - 58ce6877 by Moritz Drexl at 2017-08-05T16:44:40+02:00 Fix renaming after instance signature specializing (#660) * rework rename * Add regression test for Bug 613 * update tests * update changelog - - - - - b8137ec8 by Tim Baumann at 2017-08-06T11:33:38+02:00 Fix: Generate pattern signatures for constructors exported as patterns (#663) * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes haskell/haddock#653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR haskell/haddock#663 * Fix extractPatternSyn error message - - - - - d037086b by Alex Biehl at 2017-08-06T12:43:25+02:00 Bump haddock-library - - - - - 99d7e792 by Alex Biehl at 2017-08-06T12:44:07+02:00 Bump haddock-library in haddock-api - - - - - 94802a5b by Alex Biehl at 2017-08-06T13:18:02+02:00 Provide --show-interface option to dump interfaces (#645) * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated. - - - - - c662e476 by Ryan Scott at 2017-08-14T21:00:21-04:00 Adapt to haskell/haddock#14060 - - - - - b891eb73 by Alex Biehl at 2017-08-16T08:24:48+02:00 Bifoldable and Bitraversable for DocH and MetaDoc - - - - - 021bb56c by Alex Biehl at 2017-08-16T09:06:40+02:00 Refactoring: Make doc renaming monadic This allows us to later throw warnings if can't find an identifier - - - - - 39fbf022 by Alex Biehl at 2017-08-19T20:35:27+02:00 Hyperlinker: Avoid linear lookup in enrichToken (#669) * Make Span strict in Position * Hyperlinker: Use a proper map to enrich tokens - - - - - e13baedd by Alex Biehl at 2017-08-21T20:05:42+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 27dd6e87 by Alex Biehl at 2017-08-21T22:06:35+02:00 Drop Avails from export list - - - - - 86b247e2 by Alex Biehl at 2017-08-22T08:44:22+02:00 Bump ghc version for haddock-api tests - - - - - d4607ca0 by Alex Biehl at 2017-08-22T08:45:17+02:00 Revert "Drop Avails from export list" This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def. - - - - - c9c54c30 by Alex Biehl at 2017-08-22T09:26:01+02:00 IntefaceFile version - - - - - a85b7c02 by Ben Gamari at 2017-08-22T09:29:52-04:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 34e976f5 by Ben Gamari at 2017-08-22T17:40:06+02:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 577abf06 by Ryan Scott at 2017-08-23T14:47:29-04:00 Update for haskell/haddock#14131 - - - - - da68fc55 by Florian Eggenhofer at 2017-08-27T18:21:56+02:00 Generate an index for package content search (#662) Generate an index for package content search - - - - - 39e62302 by Alex Biehl at 2017-08-27T18:50:16+02:00 Content search for haddock html doc - - - - - 91fd6fb2 by Alex Biehl at 2017-08-28T18:39:58+02:00 Fix tests for content search - - - - - b4a3798a by Alex Biehl at 2017-08-28T18:44:08+02:00 Add search button to #page-menu - - - - - 25a7ca65 by Alex Biehl at 2017-08-28T18:47:43+02:00 Load javascript below the fold - - - - - 8d323c1a by Alex Biehl at 2017-08-28T18:49:22+02:00 Accept tests - - - - - c5dac557 by Alex Biehl at 2017-08-28T19:14:55+02:00 Content search css - - - - - 89a5af57 by Paolo Veronelli at 2017-08-29T07:42:13+02:00 Removed `nowrap` for interface method sigs (#674) with nowrap the interfaces method sigs would expand at libitum - - - - - a505f6f7 by Alex Biehl at 2017-08-29T08:05:33+02:00 Include subordinates in content index - - - - - 4bb698c4 by Alexander Biehl at 2017-08-29T11:40:19+02:00 QuickNav: Make docbase configurable - - - - - c783bf44 by Alexander Biehl at 2017-08-29T11:48:36+02:00 QuickNav: Also use baseUrl for doc-index.json request - - - - - 47017510 by Alex Biehl at 2017-08-29T17:56:47+02:00 Fix test fallout (again) - - - - - 924fc318 by Alex Biehl at 2017-08-30T09:24:56+02:00 Write meta.json when generating html output (#676) - - - - - 717dea52 by Alex Biehl at 2017-09-01T09:20:34+02:00 Use relative URL when no docBaseUrl given - - - - - e5d85f3b by Alex Biehl at 2017-09-01T09:35:19+02:00 Add missing js files to data-files (#677) - - - - - 95b9231a by Alex Biehl at 2017-09-01T11:01:36+02:00 Rename "Search" tab to "Quick Jump" - - - - - da0ead0b by Alex Biehl at 2017-09-01T13:03:49+02:00 Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger - - - - - de7da594 by Ben Gamari at 2017-09-05T06:49:55-04:00 Account for "Remember the AvailInfo for each IE" As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building. - - - - - b05cd3b3 by Ben Gamari at 2017-09-14T07:55:07-04:00 Bump upper bound on base - - - - - 79db899e by Herbert Valerio Riedel at 2017-09-21T23:27:52+02:00 Make compatible with Prelude.<> export in GHC 8.4/base-4.11 - - - - - 3405dd52 by Tim Baumann at 2017-09-23T22:02:01+02:00 Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme - - - - - df0b5742 by Alex Biehl at 2017-09-29T21:15:40+02:00 Bump base for haddock-library and haddock-test - - - - - 62b12ea0 by Merijn Verstraaten at 2017-10-04T16:03:13+02:00 Inhibit output of coverage information for hidden modules. (#687) * Inhibit output of coverage information for hidden modules. * Add changelog entry. - - - - - 8daf8bc1 by Alexander Biehl at 2017-10-05T11:27:05+02:00 Don't use subMap in attachInstances - - - - - ad75114e by Alexander Biehl at 2017-10-05T11:27:58+02:00 Revert "Don't use subMap in attachInstances" This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9. - - - - - 7d4aa02f by Alex Biehl at 2017-10-08T15:32:28+02:00 Precise Haddock: Use Avails for export resolution (#688) * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting - - - - - b9b4faa8 by Alex Biehl at 2017-10-08T19:38:21+02:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 43325295 by Alex Biehl at 2017-10-08T20:18:46+02:00 Fix merge fallout - - - - - c6423cc0 by Alex Biehl at 2017-10-08T20:36:12+02:00 Copy QuickJump files over - - - - - 1db587c3 by Tim Baumann at 2017-10-09T18:33:09+02:00 Use <details> element for collapsibles (#690) * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes haskell/haddock#560. - - - - - 1b54c64b by Tim Baumann at 2017-10-10T09:50:59+02:00 Quick Jump: Show error when loading 'doc-index.json' failed (#691) - - - - - 910f716d by Veronika Romashkina at 2017-10-24T07:36:20+02:00 Fix tiny typo in docs (#693) - - - - - b21de7e5 by Ryan Scott at 2017-10-24T13:07:15+02:00 Overhaul Haddock's rendering of kind signatures (#681) * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC - - - - - 6704405c by Ryan Scott at 2017-10-28T07:10:27+02:00 Fix Haddock rendering of kind-indexed data family instances (#694) - - - - - 470f6b9c by Alex Biehl at 2017-10-30T08:45:51+01:00 Add QuickJump version to meta.json (#696) - - - - - b89eccdf by Alex Biehl at 2017-10-30T10:15:49+01:00 Put Quickjump behind --quickjump flag (#697) - - - - - 3095fb58 by Alex Biehl at 2017-10-30T19:09:06+01:00 Add build command to package.json - - - - - f223fda9 by Alex Biehl at 2017-10-30T19:10:39+01:00 Decrease threshold for fuzzy matching - - - - - 80245dda by Edward Z. Yang at 2017-10-31T20:35:05+01:00 Supported reexported-modules via --reexport flag. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 7e389742 by Alex Biehl at 2017-10-31T20:37:56+01:00 Correct missing title in changelog - - - - - 1a2a1c03 by Alex Biehl at 2017-10-31T20:59:07+01:00 Copy quickjump.css for nicer error messages - - - - - db234bb9 by Alex Biehl at 2017-10-31T21:31:18+01:00 Reexported modules: Report warnings if argument cannot be parsed or ... module cannot be found - - - - - eea8a205 by Carlo Hamalainen at 2017-10-31T21:43:14+01:00 More general type for nameCacheFromGhc. (#539) - - - - - 580eb42a by Alex Biehl at 2017-10-31T21:46:52+01:00 Remote tab - - - - - 0e599498 by Alex Biehl at 2017-10-31T21:48:55+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 7b8539bb by Alex Biehl at 2017-10-31T22:28:34+01:00 fullModuleContents traverses exports in declaration order - - - - - 0c91fbf2 by Alex Biehl at 2017-10-31T22:32:31+01:00 Remove excessive use of list comprehensions - - - - - f7356e02 by Alex Biehl at 2017-11-01T19:11:03+01:00 Make better use of AvailInfo - - - - - f3e512d5 by Alex Biehl at 2017-11-02T12:16:22+01:00 Always return documentation for exported subordinates ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks. - - - - - 7cf58898 by Alan Zimmerman at 2017-11-07T08:28:03+02:00 Match changes for Trees that Grow in GHC - - - - - e5105a41 by Alan Zimmerman at 2017-11-08T17:21:58+02:00 Match Trees That Grow - - - - - 55178266 by Alan Zimmerman at 2017-11-11T22:20:31+02:00 Match Trees that Grow in GHC for HsExpr - - - - - 2082ab02 by Ryan Scott at 2017-11-14T15:27:03+01:00 Actually render infix type operators as infix (#703) * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too - - - - - c52ab7d0 by Alan Zimmerman at 2017-11-14T23:14:26+02:00 Clean up use of PlaceHolder, to match TTG - - - - - 81cc9851 by Moritz Angermann at 2017-11-20T07:52:49+01:00 Declare use of `Paths_haddock` module in other-modules (#705) This was detected by `-Wmissing-home-modules` - - - - - f9d27598 by Moritz Angermann at 2017-11-20T12:47:34+01:00 Drop Paths_haddock from ghc.mk (#707) With haskell/haddock#705 and haskell/haddock#706, the custom addition should not be necessary any more. # Conflicts: # ghc.mk - - - - - f34818dc by Moritz Angermann at 2017-11-20T12:47:59+01:00 Add autogen-modules (#706) > Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail. # Conflicts: # haddock.cabal - - - - - bb43a0aa by Ben Gamari at 2017-11-21T15:50:12-05:00 Revert "Clean up use of PlaceHolder, to match TTG" This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049. - - - - - af9ebb2b by Ben Gamari at 2017-11-21T15:50:14-05:00 Revert "Match Trees that Grow in GHC for HsExpr" This reverts commit 9f054dc365379c66668de6719840918190ae6e44. - - - - - 5d35c3af by Ben Gamari at 2017-11-21T15:50:15-05:00 Revert "Match Trees That Grow" This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c. - - - - - 99a8e43b by Ben Gamari at 2017-11-21T16:36:06-05:00 Revert "Match changes for Trees that Grow in GHC" This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547. - - - - - c4d650c2 by Ben Gamari at 2017-12-04T15:06:07-05:00 Bump GHC version - - - - - 027b2274 by Ben Gamari at 2017-12-04T17:06:31-05:00 Bump GHC bound to 8.4.* - - - - - 58eaf755 by Alex Biehl at 2017-12-06T15:44:24+01:00 Update changelog - - - - - d68f5584 by Simon Peyton Jones at 2017-12-07T14:39:56+00:00 Track changes to follow Trac haskell/haddock#14529 This tracks the refactoring of HsDecl.ConDecl. - - - - - dc519d6b by Alec Theriault at 2018-01-06T08:20:43-08:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - 8285118c by Alec Theriault at 2018-01-13T12:12:37+01:00 Constructor and pattern synonym argument docs (#709) * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors. - - - - - ca4fabb4 by Alec Theriault at 2018-01-15T17:12:18-08:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 4c472fea by Ryan Scott at 2018-01-19T10:44:02+01:00 Fix haskell/haddock#732 (#733) - - - - - bff14dbd by Alex Biehl at 2018-01-19T15:33:30+01:00 extractDecl: Extract associated types correctly (#736) - - - - - a2a94a73 by Alex Biehl at 2018-01-19T15:34:40+01:00 extractDecl: Extract associated types correctly (#736) - - - - - 26df93dc by Alex Biehl at 2018-01-20T10:18:22+01:00 haddock-api: bump ghc to ^>= 8.4 - - - - - f65aeb1d by Alex Biehl at 2018-01-20T19:18:20+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - 0e721b97 by Alex Biehl at 2018-01-20T19:20:19+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - cb6234f6 by Ben Gamari at 2018-01-26T13:40:55-05:00 Merge remote-tracking branch 'harpocrates/fix/missing-orphan-instances' into ghc-head - - - - - 0fc28554 by Alec Theriault at 2018-02-01T14:58:18+01:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - b9123772 by Alec Theriault at 2018-02-01T14:58:18+01:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 0c12e274 by Ryan Scott at 2018-02-01T14:58:18+01:00 Fix haskell/haddock#548 by rendering datatype kinds more carefully (#702) - - - - - 8876d20b by Alec Theriault at 2018-02-01T14:58:18+01:00 Use the GHC lexer for the Hyperlinker backend (#714) * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog - - - - - 95c6a771 by Alec Theriault at 2018-02-01T14:58:18+01:00 Clickable anchors for headings (#716) See haskell/haddock#579. This just adds an <a> tag around the heading, pointing to the heading itself. - - - - - 21463d28 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump: Matches on function names weight more than matches in ... module names. - - - - - 8023af39 by Alex Biehl at 2018-02-01T14:58:18+01:00 Treat escaped \] better in definition lists (#717) This fixes haskell/haddock#546. - - - - - e4866dc1 by Alex Biehl at 2018-02-01T14:58:18+01:00 Remove scanner, takeWhile1_ already takes care of escaping - - - - - 9bcaa49d by Alex Biehl at 2018-02-01T14:58:18+01:00 Take until line feed - - - - - 01d2af93 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. - - - - - 31128417 by Alec Theriault at 2018-02-01T14:58:18+01:00 Patch flaky parser test (#720) * Patch flaky parser test This test was a great idea, but it doesn't port over too well to using the GHC lexer. GHC rewrites its input a bit - nothing surprising, but we need to guard against those cases for the test. * Change instance head * Change use site - - - - - 9704f214 by Herbert Valerio Riedel at 2018-02-01T14:58:18+01:00 Include secondary LICENSE file in source dist - - - - - 51f25074 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Grid Tables (#718) * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example - - - - - 670d6200 by Alex Biehl at 2018-02-01T14:58:18+01:00 Add grid table example to cheatsheet (pdf and svg need to be regenerated thought) - - - - - 4262dec9 by Alec Theriault at 2018-02-01T14:58:18+01:00 Fix infinite loop when specializing instance heads (#723) * Fix infinite loop when specializing instance heads The bug can only be triggered from TH, hence why it went un-noticed for so long. * Add test for haskell/haddock#679 and haskell/haddock#710 - - - - - 67ecd803 by Alec Theriault at 2018-02-01T14:58:18+01:00 Filter RTS arguments from 'ghc-options' arguments (#725) This fixes haskell/haddock#666. - - - - - 7db26992 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump Scrollable overlay - - - - - da9ff634 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Hyperlinker: Adjust parser to new PFailed constructor - - - - - 7b7cf8cb by Alexander Biehl at 2018-02-01T14:58:18+01:00 Specialize: Add missing IdP annotations - - - - - 78cd7231 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Convert: Correct pass type - - - - - a2d0f590 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Warning free compilation - - - - - cd861cf3 by Alexander Biehl at 2018-02-01T14:58:18+01:00 hadock-2.19.0 / haddock-api-2.19.0 / haddock-library-1.5.0 - - - - - c6651b72 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Adjust changelogs - - - - - 1e93da0b by Alexander Biehl at 2018-02-01T14:58:18+01:00 haddock-library: Info about breaking changes - - - - - f9b11db8 by Alec Theriault at 2018-02-02T12:36:02+01:00 Properly color pragma contents in hyperlinker The hyperlinker backend now classifies the content of pragmas as 'TkPragma'. That means that in something like '{-# INLINE foo #-}', 'foo' still gets classified as a pragma token. - - - - - c40b0043 by Alec Theriault at 2018-02-02T12:36:02+01:00 Support the new 'ITcolumn_prag' token - - - - - 4a2a4d39 by Alex Biehl at 2018-02-03T12:11:55+01:00 QuickJump: Mitigate encoding problems on Windows - - - - - bb34503a by Alex Biehl at 2018-02-04T18:39:31+01:00 Use withBinaryFile - - - - - 637605bf by Herbert Valerio Riedel at 2018-02-05T09:48:32+01:00 Try GHC 8.4.1 for Travis CI job - - - - - 7abb67e4 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 try harder to build w/ GHC 8.4.1 - - - - - 8255cc98 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 Add `SPDX-License-Identifier` as alised for "license" module header tokens C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from haskell/haddock#743 - - - - - 267cd23d by Herbert Valerio Riedel at 2018-02-05T10:24:34+01:00 Make test-suite SMP compatible - - - - - 95d4bf40 by Alec Theriault at 2018-02-05T22:01:04+01:00 Hyperlink pattern synonyms and 'module' imports (#744) Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes haskell/haddock#731. - - - - - 67838dcd by Alec Theriault at 2018-02-06T08:23:36+01:00 Don't warn about missing '~' (#746) This manually filters out '~' from the list of things to warn about. It truly makes no sense to warn on this since '~' has nothing it could link to - it is magical. This fixes haskell/haddock#532. - - - - - ab6c3f9f by Alec Theriault at 2018-02-06T08:24:47+01:00 Don't barf on 'HsSpliceTy' (#745) This handles 'HsSpliceTy's by replacing them with what they expand to. IIUC everything that is happening, 'renameHsSpliceTy' should not be able to fail for the inputs we feed it from GHC. This fixes haskell/haddock#574. - - - - - 92bf95ad by Alex Biehl at 2018-02-06T08:28:23+01:00 Rename: renameHsSpliceTy ttg - - - - - 3130b1e1 by Alex Biehl at 2018-02-06T09:02:14+01:00 Expand SigDs - - - - - c72adae5 by Alex Biehl at 2018-02-06T09:20:51+01:00 fullModuleContents: support named docs - - - - - de2e4dbf by Alex Biehl at 2018-02-06T13:56:17+01:00 Hyperlinker: Also link pattern synonym arguments - - - - - b7c98237 by Alex Biehl at 2018-02-09T18:44:23+01:00 Expand SigD in a better place In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place. - - - - - 8f598b27 by Alec Theriault at 2018-02-11T12:29:56+01:00 Add module tooltips to linked identifiers (#753) No more clicking to figure out whether your bytestring is strict or lazy! - - - - - d812e65d by Alec Theriault at 2018-02-11T12:31:44+01:00 Add 'show' option to complement 'hide' (#752) * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes haskell/haddock#751 and haskell/haddock#266. * Add a '--show-all' option - - - - - 6676cecb by Alex Biehl at 2018-02-18T11:07:15-05:00 QuickJump: Mitigate encoding problems on Windows (cherry picked from commit 86292c54bfee2343aee84559ec01f1fc68f52231) - - - - - e753dd88 by Alex Biehl at 2018-02-18T17:59:54+01:00 Use withBinaryFile - - - - - 724dc881 by Tamar Christina at 2018-02-19T05:34:49+01:00 Haddock: support splitted include paths. (#689) - - - - - 9b6d6f50 by Alex Biehl at 2018-02-19T05:57:02+01:00 Teach the HTML backend how to render methods with multiple names - - - - - a74aa754 by Alexander Biehl at 2018-02-19T10:04:34+01:00 Hoogle/Latex: Remove use of partial function - - - - - 66d8bb0e by Alec Theriault at 2018-02-25T16:04:01+01:00 Fix file handle leak (#763) (#764) Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137. - - - - - bb92d03d by Alex Biehl at 2018-03-02T14:21:23+01:00 Enable running test suite with stock haddock and ghc using ``` $ cabal new-run -- html-test --haddock-path=$(which haddock) --ghc-path=$(which ghc) ``` - - - - - dddb3cb2 by Alex Biehl at 2018-03-02T15:43:21+01:00 Make testsuite work with haddock-1.19.0 release (#766) - - - - - f38636ed by Alec Theriault at 2018-03-02T15:48:36+01:00 Support unicode operators, proper modules Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes haskell/haddock#458. - - - - - 09d89f7c by Alec Theriault at 2018-03-02T15:48:43+01:00 Remove bang pattern - - - - - d150a687 by Alex Biehl at 2018-03-02T15:48:48+01:00 fix test - - - - - d6fd71a5 by Alex Biehl at 2018-03-02T16:22:38+01:00 haddock-test: Be more explicit which packages to pass We now pass `-hide-all-packages` to haddock when invoking the testsuite. This ensures we don't accidentally pick up any dependencies up through ghc.env files. - - - - - 0932c78c by Alex Biehl at 2018-03-02T17:50:38+01:00 Revert "fix test" This reverts commit 1ac2f9569242f6cb074ba6e577285a4c33ae1197. - - - - - 52516029 by Alex Biehl at 2018-03-02T18:16:50+01:00 Fix Bug548 for real - - - - - 89df9eb5 by Alex Biehl at 2018-03-05T18:28:19+01:00 Hyperlinker: Links for TyOps, class methods and associated types - - - - - d019a4cb by Ryan Scott at 2018-03-06T13:43:56-05:00 Updates for haskell/haddock#13324 - - - - - 6d5a42ce by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump haddock-2.19.0.1, haddock-api-2.19.0.1, haddock-library-1.5.0.1 - - - - - c0e6f380 by Alex Biehl at 2018-03-10T18:25:57+01:00 Update changelogs for haddock-2.19.0.1 and haddock-library-1.5.0.1 - - - - - 500da489 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Update to QC 2.11 - - - - - ce8362e9 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Restore backward-compat with base-4.5 through base-4.8 - - - - - baae4435 by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump lower bound for haddock-library - - - - - 10b7a73e by Alex Biehl at 2018-03-10T18:25:57+01:00 Haddock: Straighten out base bound - - - - - a6096f7b by Alex Biehl at 2018-03-13T08:45:06+01:00 extractDecl: Extract constructor patterns from data family instances (#776) * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors - - - - - ba4a0744 by Simon Jakobi at 2018-03-14T08:26:42+01:00 Readme: Update GHC version (#778) - - - - - 8de157d4 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for definition lists - - - - - 425b46f9 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for links - - - - - d53945d8 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for inline links - - - - - f1dc7c99 by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Slightly unmangle output - - - - - 0879d31c by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Prevent stdout buffering - - - - - 1f9e5f1b by Simon Jakobi at 2018-03-14T20:39:29+01:00 haddock-library.cabal: Clean up GHC options - - - - - 066b891a by Simon Jakobi at 2018-03-14T20:39:29+01:00 Make a proper definition for the <link> parser - - - - - 573d6ba7 by Alec Theriault at 2018-03-21T09:16:57+01:00 Show where instances are defined (#748) * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests - - - - - 99b5d28b by Alex Biehl at 2018-03-21T09:20:36+01:00 Prepare changelog for next release - - - - - 482d3a93 by Alex Biehl at 2018-03-23T15:57:36+01:00 Useful cost centres, timers and allocation counters (#785) * Add some useful cost-centres for profiling * Add withTiming for each haddock phase Invoking haddock with `--optghc=-ddump-timings` now shows the amount of time spent and the number of allocated bytes for each phase. - - - - - 773b41bb by Alec Theriault at 2018-03-27T08:35:59+02:00 @since includes package name (#749) * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too. - - - - - e42c57bc by Alex Biehl at 2018-03-27T08:42:50+02:00 haddock-2.19.1, haddock-api-2.19.1, haddock-library-1.6.0 - - - - - 8373a529 by Alex Biehl at 2018-03-28T10:17:11+02:00 Bump haddock and haddock-api to 2.20.0 - - - - - 5038eddd by Jack Henahan at 2018-04-03T13:28:12+02:00 Clear search string on hide for haskell/haddock#781 (#789) - - - - - 920ca1eb by Alex Biehl at 2018-04-03T16:35:50+02:00 Travis: Build with ghc-8.4.2 (#793) - - - - - a232f0eb by Alan Zimmerman at 2018-04-07T14:14:32+02:00 Match changes in GHC for D4199 Removing HasSourceText and SourceTextX classes. - - - - - ab85060b by Alan Zimmerman at 2018-04-09T21:20:24+02:00 Match GHC changes for TTG - - - - - 739302b6 by Alan Zimmerman at 2018-04-13T13:31:44+02:00 Match GHC for TTG implemented on HsBinds, D4581 - - - - - 2f56d3cb by Ryan Scott at 2018-04-19T11:42:58-04:00 Bump upper bound on base to < 4.13 See https://ghc.haskell.org/trac/ghc/ticket/15018. - - - - - a49df92a by Alex Biehl at 2018-04-20T07:31:44+02:00 Don't treat fixity signatures like declarations - - - - - d02c103b by Ryan Scott at 2018-04-24T11:20:11-04:00 Add regression test for haskell/haddock#413 Fixes haskell/haddock#413. - - - - - c7577f52 by Ryan Scott at 2018-04-24T13:51:06-07:00 Improve the Hoogle backend's treatment of type families (#808) Fixes parts 1 and 2 of haskell/haddock#806. - - - - - d88f85b1 by Alec Theriault at 2018-04-25T11:24:07-07:00 Replace 'attoparsec' with 'parsec' (#799) * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments - - - - - fc25e2fe by Alan Zimmerman at 2018-04-27T15:36:53+02:00 Match changes in GHC for TTG - - - - - 06175f91 by Herbert Valerio Riedel at 2018-05-01T18:11:09+02:00 Merge branch 'ghc-head' with 'ghc-8.4' - - - - - 879caaa8 by Alec Theriault at 2018-05-07T18:53:15-07:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 3e0120cb by Simon Jakobi at 2018-05-07T19:00:18-07:00 Add docs for some DocH constructors (#814) - - - - - 0a32c6db by Alec Theriault at 2018-05-08T02:15:45-07:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 8816e783 by Simon Jakobi at 2018-05-08T10:48:11-07:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - ad60366f by Ryan Scott at 2018-05-10T11:19:47-04:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - 03b7cc3b by Ryan Scott at 2018-05-10T11:24:38-04:00 Wibbles - - - - - b03dd563 by Chaitanya Koparkar at 2018-05-10T11:44:58-04:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 9f298a40 by Ben Gamari at 2018-05-13T17:36:04-04:00 Account for refactoring of LitString - - - - - ea3dabe7 by Ryan Scott at 2018-05-16T09:21:43-04:00 Merge pull request haskell/haddock#826 from haskell/T825 Remove Hoogle backend hack that butchers infix datatype names - - - - - 0d234f7c by Alec Theriault at 2018-05-23T11:29:05+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 15fc9712 by Simon Jakobi at 2018-05-31T04:17:47+02:00 Adjust to new HsDocString internals - - - - - 6f1e19a8 by Ben Gamari at 2018-06-02T16:18:58-04:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 0d0355d9 by Ryan Scott at 2018-06-04T21:26:59-04:00 DerivingVia changes - - - - - 0d93475a by Simon Jakobi at 2018-06-05T19:47:05+02:00 Bump a few dependency bounds (#845) - - - - - 5cbef804 by Alec Theriault at 2018-06-05T19:47:16+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 9094c56f by Alec Theriault at 2018-06-05T22:53:25+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 70188719 by Simon Jakobi at 2018-06-08T22:20:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - 495cd1fc by Chaitanya Koparkar at 2018-06-13T23:01:34+02:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 81088732 by Ben Gamari at 2018-06-13T23:01:34+02:00 Account for refactoring of LitString - - - - - 7baf6587 by Simon Jakobi at 2018-06-13T23:05:08+02:00 Adjust to new HsDocString internals - - - - - bb61464d by Ben Gamari at 2018-06-13T23:05:22+02:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 5d8cb87f by Ryan Scott at 2018-06-13T23:39:30+02:00 DerivingVia changes - - - - - 73d373a3 by Alec Theriault at 2018-06-13T23:39:30+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 4865e254 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Remove `ITtildehsh` token - - - - - b867db54 by Alec Theriault at 2018-06-13T23:39:30+02:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 9598e392 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Add docs for some DocH constructors (#814) - - - - - 8a59035b by Alec Theriault at 2018-06-13T23:39:30+02:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 29350fc8 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - 2590bbd9 by Ryan Scott at 2018-06-13T23:39:30+02:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - a9939fdc by Ryan Scott at 2018-06-13T23:39:30+02:00 Wibbles - - - - - a22f7df4 by Alec Theriault at 2018-06-13T23:39:30+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 8741015d by Simon Jakobi at 2018-06-13T23:39:30+02:00 Bump a few dependency bounds (#845) - - - - - 4791e1cc by Alec Theriault at 2018-06-13T23:39:30+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 311d3216 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - d0577817 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Complete FixitySig and FamilyDecl pattern matches - - - - - 055b3aa7 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Fix redundant import warnings - - - - - f9ce19b1 by Simon Jakobi at 2018-06-13T23:49:52+02:00 html-test: Accept output - - - - - 04604ea7 by Simon Jakobi at 2018-06-13T23:54:37+02:00 Bump bounds on Cabal - - - - - 0713b692 by Simon Jakobi at 2018-06-14T00:00:12+02:00 Merge branch 'ghc-head' into ghc-head-update-3 - - - - - c6a56bfd by Simon Jakobi at 2018-06-14T02:33:27+02:00 Bump ghc bound for haddock-api spec test-suite - - - - - 119d04b2 by Simon Jakobi at 2018-06-14T12:37:48+02:00 Travis: `--allow-newer` for all packages - - - - - 0e876e2c by Alex Biehl at 2018-06-14T15:28:52+02:00 Merge pull request haskell/haddock#857 from sjakobi/ghc-head-update-3 Update ghc-head - - - - - 5be46454 by Alec Theriault at 2018-06-14T21:42:45+02:00 Improved handling of interfaces in 'haddock-test' (#851) This should now work with an inplace GHC where (for instance) HTML directories may not be properly recorded in the package DB. - - - - - 96ab1387 by Vladislav Zavialov at 2018-06-14T17:06:21-04:00 Handle -XStarIsType - - - - - e518f8c4 by Ben Gamari at 2018-06-14T17:48:00-04:00 Revert unintentional reversion of fix of haskell/haddock#548 - - - - - 01b9f96d by Alan Zimmerman at 2018-06-19T11:52:22+02:00 Match changes in GHC for haskell/haddock#14259 - - - - - 7f8c8298 by Ben Gamari at 2018-06-19T18:14:27-04:00 Bump GHC version to 8.6 - - - - - 11c6b5d2 by Ryan Scott at 2018-06-19T23:17:31-04:00 Remove HsEqTy and XEqTy - - - - - b33347c2 by Herbert Valerio Riedel at 2018-06-20T23:14:52+02:00 Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. - - - - - f0d2460e by Herbert Valerio Riedel at 2018-06-20T23:28:46+02:00 Update Travis CI job - - - - - ef239223 by Herbert Valerio Riedel at 2018-06-20T23:32:41+02:00 Drop GHC HEAD from CI and update GHC to 8.4.3 It's a waste of resource to even try to build this branch w/ ghc-head; so let's not do that... - - - - - 41c4a9fa by Ben Gamari at 2018-06-20T18:26:20-04:00 Bump GHC version to 8.7 - - - - - 8be593dc by Herbert Valerio Riedel at 2018-06-21T22:32:15+02:00 Update CI job to use GHC 8.7.* - - - - - b91d334a by Simon Jakobi at 2018-06-30T13:41:38+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section - - - - - f707d848 by Alec Theriault at 2018-07-05T10:43:35-04:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. - - - - - a6d2b8dc by Alec Theriault at 2018-07-06T10:06:32-04:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case - - - - - 13819f71 by Alan Zimmerman at 2018-07-15T19:33:51+02:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 - - - - - c346aa78 by Simon Jakobi at 2018-07-19T12:29:32+02:00 haddock-library: Bump bounds for containers - - - - - 722e733c by Simon Jakobi at 2018-07-19T13:36:45+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] - - - - - f0bd83fd by Alec Theriault at 2018-07-19T14:39:57+02:00 Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. - - - - - 394053a8 by Simon Jakobi at 2018-07-19T14:58:07+02:00 haddock-library: Bump bounds for containers - - - - - 1bda11a2 by Alec Theriault at 2018-07-20T09:04:03+02:00 Add HEAD.hackage overlay (#887) * Add HEAD.hackage overlay * Add HCPKG variable - - - - - c7b4ab45 by Alec Theriault at 2018-07-20T12:01:16+02:00 Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test - - - - - c05d32ad by Alec Theriault at 2018-07-20T12:01:49+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output - - - - - 24b39ee4 by Alec Theriault at 2018-07-20T12:02:16+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. - - - - - cb9d2099 by Simon Jakobi at 2018-07-20T13:39:29+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) - - - - - 133f24f5 by Alec Theriault at 2018-07-20T13:39:29+02:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) - - - - - 11024149 by Alec Theriault at 2018-07-20T13:39:29+02:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) - - - - - de0c139e by Simon Jakobi at 2018-07-20T13:39:29+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) - - - - - 6435e952 by Alec Theriault at 2018-07-20T13:39:29+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) - - - - - 1461af39 by Alec Theriault at 2018-07-20T13:39:29+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) - - - - - 69d3bde1 by Alec Theriault at 2018-07-20T13:49:47+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) - - - - - 6a5c73c7 by Alec Theriault at 2018-07-20T13:50:00+02:00 Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests - - - - - 92ca94c6 by Alec Theriault at 2018-07-20T13:55:36+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) - - - - - 981bc7fa by Simon Jakobi at 2018-07-20T15:06:06+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers - - - - - 27e7c0c5 by Simon Jakobi at 2018-07-20T15:09:05+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 49e1a415 by Simon Jakobi at 2018-07-20T16:02:02+02:00 Update the ghc-8.6 branch (#889) * Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. * README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) * Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) * Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) * tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) * Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. * Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test * Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) * Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) * Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) * Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests * Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 5ca14bed by Simon Jakobi at 2018-07-20T16:05:47+02:00 Revert "Revert "Bump GHC version to 8.6"" That commit didn't belong onto the ghc-8.6 branch. This reverts commit acbaef3b9daf1d2dea10017964bf886e77a8e967. - - - - - 2dd600dd by Simon Jakobi at 2018-07-20T16:18:21+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. - - - - - fceb2422 by Simon Jakobi at 2018-07-20T16:18:21+02:00 outOfScope: Recommend qualifying the identifier - - - - - acea5d23 by Simon Jakobi at 2018-07-20T16:19:35+02:00 outOfScope: Recommend qualifying the identifier (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7) - - - - - 1a83ca55 by Simon Jakobi at 2018-07-20T16:19:35+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f) - - - - - 48374451 by Masahiro Sakai at 2018-07-20T17:06:42+02:00 Add # as a special character (#884) '#' has special meaning used for anchors and can be escaped using backslash. Therefore it would be nice to be listed as special characters. - - - - - 5e1a5275 by Alec Theriault at 2018-07-20T23:37:24+02:00 Let `haddock-test` bypass interface version check (#890) This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to. - - - - - 27286754 by Yuji Yamamoto at 2018-07-23T08:16:01+02:00 Avoid "invalid argument (invalid character)" on non-unicode Windows (#892) Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566 - - - - - 6729d361 by Alec Theriault at 2018-07-23T13:52:56-07:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). - - - - - 8cf4e6b5 by Ryan Scott at 2018-07-27T11:28:03-04:00 eqTyCon_RDR now lives in TysWiredIn After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071 - - - - - 1ad251a6 by Alan Zimmerman at 2018-07-30T13:28:09-04:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 (cherry picked from commit e3926b50ab8a7269fd6904b06e881745f08bc5d6) - - - - - 8aea2492 by Richard Eisenberg at 2018-08-02T10:54:17-04:00 Update against new HsImplicitBndrs - - - - - e42cada9 by Alec Theriault at 2018-08-04T17:51:30+02:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 0e852512 by Alex Biehl at 2018-08-06T13:04:02+02:00 Make --package-version optional for --hoogle generation (#899) * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion - - - - - d2abd684 by Noel Bourke at 2018-08-21T09:34:18+02:00 Remove unnecessary backslashes from docs (#908) On https://haskell-haddock.readthedocs.io/en/latest/markup.html#special-characters the backslash and backtick special characters showed up with an extra backslash before them – I think the escaping is not (or no longer) needed for those characters in rst. - - - - - 7a578a9e by Matthew Pickering at 2018-08-21T09:34:50+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - aa3d4db3 by Matthew Pickering at 2018-08-21T09:37:34+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - ede91744 by Alec Theriault at 2018-08-21T09:42:52+02:00 Better test output when Haddock crashes on a test (#902) In particular: we report the tests that crashed seperately from the tests that produced incorrect output. In order for tests to pass (and exit 0), they must not crash and must produce the right output. - - - - - 4a872b84 by Guillaume Bouchard at 2018-08-21T09:45:57+02:00 Fix a typo (#878) - - - - - 4dbf7595 by Ben Sklaroff at 2018-08-21T12:04:09-04:00 Add ITcomment_line_prag token to Hyperlinker Parser This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935 - - - - - 9170b2a9 by Ben Gamari at 2018-08-21T17:55:15-04:00 Merge pull request haskell/haddock#893 from harpocrates/get-name-to-instances Accumulate explicitly which modules to load for 'attachInstances' - - - - - d57b57cc by Ben Gamari at 2018-08-21T17:59:13-04:00 Merge branch 'ghc-head' of github.com:haskell/haddock into ghc-head - - - - - 14601ca2 by Alec Theriault at 2018-08-21T19:09:37-04:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1) - - - - - 438c645e by Matthew Pickering at 2018-08-21T19:12:39-04:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d) - - - - - a80c5161 by Alec Theriault at 2018-08-21T22:06:40-07:00 Better rendering of unboxed sums/tuples * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType' - - - - - 88456cc1 by Alec Theriault at 2018-08-21T22:06:40-07:00 Handle promoted tuples in 'synifyType' When we have a fully applied promoted tuple, we can expand it out properly. - - - - - fd1c1094 by Alec Theriault at 2018-08-21T22:19:34-07:00 Accept test cases - - - - - 6e80d9e0 by Alec Theriault at 2018-08-21T22:24:03-07:00 Merge pull request haskell/haddock#914 from harpocrates/feature/unboxed-stuff Better rendering of unboxed sums, unboxed tuples, promoted tuples. - - - - - 181a23f1 by Ben Gamari at 2018-08-23T15:53:48-04:00 Merge remote-tracking branch 'origin/ghc-8.6' into ghc-8.6 - - - - - 3a18c1d8 by Alec Theriault at 2018-08-27T14:15:25-07:00 Properly synify promoted list types We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type])))) - - - - - b4794946 by Alec Theriault at 2018-09-03T07:19:55-07:00 Only look at visible types when synifying a 'HsListTy' The other types are still looked at when considering whether to make a kind signature or not. - - - - - a231fce2 by Alec Theriault at 2018-09-03T07:38:10-07:00 Merge pull request haskell/haddock#922 from harpocrates/promoted-lists Properly synify promoted list types - - - - - 0fdf044e by Ningning Xie at 2018-09-15T10:25:58-04:00 Update according to GHC Core changes - - - - - 7379b115 by Ningning Xie at 2018-09-15T15:40:18-04:00 update dataFullSig to work with Co Quantification This should have been in the previous patch, but wasn't. - - - - - cf84a046 by Alec Theriault at 2018-09-17T20:12:18-07:00 Fix/add to various docs * Add documentation for a bunch of previously undocumented options (fixes haskell/haddock#870) * Extend the documentation of `--hoogle` considerably (see haskell/haddock#807) * Describe how to add docs to `deriving` clauses (fixes haskell/haddock#912) * Fix inaccurate docs about hyperlinking infix identifiers (fixes haskell/haddock#780) - - - - - ae017935 by Alec Theriault at 2018-09-22T08:32:16-07:00 Update Travis - - - - - d95ae753 by Alec Theriault at 2018-09-22T09:34:10-07:00 Accept failing tests Also silence orphan warnings. - - - - - f3e67024 by Alec Theriault at 2018-09-22T09:41:23-07:00 Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README - - - - - 3f136d4a by Alec Theriault at 2018-09-22T10:53:31-07:00 Turn haddock-library into a minor release Fix some version bounds in haddock-library too. - - - - - b9def006 by Alec Theriault at 2018-09-22T13:07:35-07:00 keep cabal.project file - - - - - 4909aca7 by Alec Theriault at 2018-10-16T09:36:30-07:00 Build on 7.4 and 7.8 - - - - - 99d20a28 by Herbert Valerio Riedel at 2018-10-16T18:45:52+02:00 Minor tweak to package description - - - - - a8059618 by Herbert Valerio Riedel at 2018-10-16T18:47:24+02:00 Merge pull request haskell/haddock#945 haddock-api 2.21.0 and haddock-library 1.6.1 release - - - - - 2d9bdfc1 by Alec Theriault at 2018-10-16T10:54:21-07:00 Bump haddock-library to 1.7.0 The 1.6.1 release should've been a major bump, since types in the `Documentation.Haddock.Parser.Monad` module changed. This version makes that module internal (as it morally should be). - - - - - ed340cef by Alec Theriault at 2018-10-16T14:59:13-07:00 Merge branch 'ghc-8.4' into ghc-8.6 - - - - - 2821a8df by Alec Theriault at 2018-10-16T15:14:48-07:00 Merge branch 'ghc-8.6' into ghc-head - - - - - a722dc84 by Alec Theriault at 2018-10-16T16:28:55-07:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 63377496 by Alec Theriault at 2018-10-16T16:39:07-07:00 Update changelog - - - - - 099a0110 by Alec Theriault at 2018-10-16T16:49:28-07:00 Merge pull request haskell/haddock#942 from harpocrates/update-docs Fix & add to documentation - - - - - 0927416f by Alec Theriault at 2018-10-16T16:50:14-07:00 Set UTF-8 encoding before writing files (#934) This should fix haskell/haddock#929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8). - - - - - 83b7b017 by Alec Theriault at 2018-10-16T17:42:05-07:00 Output pattern synonyms in Hoogle backend (#947) * Output pattern synonyms in Hoogle backend We were previously weren't outputting _any_ pattern synonyms, bundled or not. Now, we output both. Fixes haskell/haddock#946. * Update changelog - - - - - 81e5033d by Alec Theriault at 2018-10-16T18:04:40-07:00 Release `haddock{,-api}-2.22.0` This version will accompany ghc-8.6.2 - - - - - 9661744e by Alex Biehl at 2018-10-18T08:14:32-07:00 Add NewOcean theme And make it the default theme. - - - - - 7ae6d722 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Improve appearance and readability These changes include: - use latest Haskell's logo colors - decrease #content width to improve readability - use nicer font - improve sizes and distances - - - - - 37f8703d by NunoAlexandre at 2018-10-18T08:14:32-07:00 Include custom font in the html head - - - - - 1d5e1d79 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Update html test reference files - - - - - 53b7651f by NunoAlexandre at 2018-10-18T08:14:32-07:00 Make it responsive - It makes small screens taking more space than larger ones - fixes a few issues present in small screens currently - make it look good across different screen sizes. - - - - - 6aa1aeb1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make the style consistent with hackage Several things are addressed here: - better responsive behaviour on the header - better space usage - consistent colors overall - other nit PR comments - - - - - 3a250c5c by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Place the package name before the menu links This supports the expected responsive menu design, where the package name appears above the menu links. - - - - - cae699b3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update html-test reference files The package name element in the package-header is now a div instead of a paragraph, and it is now above the menu ul.links instead of below. - - - - - 2ec7fd2d by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve synopsis style and code - Use CSS3 instead of loading pictures to show "+" and "-" symbols - Drop redundant code - - - - - 0c874c01 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Decrease space between code blocks There was too much space between code blocks as pointed out by reviewers. - - - - - 85568ce2 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Add an initial-scale property to all haddock pages This solves an issue reported about the content looking incredibly small on mobile devices. - - - - - c1538926 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Address several PR comments - Darken text color like done for hackage - Move synopsis to left side - Make table of contents stick to the left on wide screens - Wrap links to avoid page overflow - Improve expand/collapse buttons - Fix issue with content size on mobile devices - Fix issue with font-size on landscape mode - Increase width of the content - Change colors of table of contents and synopsis - Etc - - - - - e6639e5f by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make synopsis scrollable on wide screens When the synopsis is longer than the screen, you can’t see its end and you can't scroll down either, making the content unreachable. - - - - - 1f0591ff by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve information density - Reduce font size - Improve space between and within code blocks - Improve alignments - Improve spacing within sub-blocks - - - - - bf083097 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Minor adjustments Bring in some adjustments made to hackage: - link colors - page header show everything when package title is too long - - - - - 10375fc7 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix responsive triggers overlap issue The min and max width triggers have the same values, which caused the style resolution to take an intersection of both style declarations when the screen resolution had the size of the limts (say 1280px), causing an odd behaviour and look. - - - - - 95ff2f95 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix issue with menu alignment on firefox Reported and described here: https://github.com/haskell/haddock/pull/721#issuecomment-374668869 - - - - - dc86587e by Alex Biehl at 2018-10-18T08:14:32-07:00 Changelog entry for NewOcean - - - - - 27195e47 by Herbert Valerio Riedel at 2018-10-18T08:14:32-07:00 html-test --accept - - - - - 83f4f9c0 by Alex Biehl at 2018-10-18T08:14:32-07:00 Avoid name shadowing - - - - - 231487f1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font to PT Sans Also migrate some general text related changes from hackage. - - - - - 313db81a by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Use 'flex' to fix header alignment - - - - - 5087367b by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Misc of tweaks - Update link colors to hackage scheme - Tune spacing between content elements - Update footer style - Fix and improve code blocks identation - - - - - b08020df by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font in Xhtml.hs to PT Sans - - - - - 78ce06e3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve code blocks styling - Fix and improve spacing - Improve colors and borders - - - - - 81262d20 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make package-header caption backward-compatible The current html generator of this branch wraps the package-header caption as a div, which does not work (without style adjustments) with the old themes. Changing it from div to span does the trick, without needing to adjust the old stylesheets. - - - - - dc4475cb by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update test-suite reference html pages - - - - - 393d35d8 by Alec Theriault at 2018-10-18T08:25:36-07:00 Accept tests - - - - - a94484ba by Alec Theriault at 2018-10-21T10:29:29-07:00 Fix CHANGELOG - - - - - 8797eca3 by Alec Theriault at 2018-10-21T10:36:19-07:00 Update 'data-files' to include NewOcean stuff - - - - - 1ae51e4a by Simon Jakobi at 2018-10-23T11:29:14+02:00 Fix typo in a warning - - - - - 009ad8e8 by Alec Theriault at 2018-10-24T12:47:47-07:00 Update JS dependencies This was done via `npm audit fix`. I think this fixes haskell/haddock#903 along with some more serious vulnerabilities that nobody seems to have noticed. - - - - - 051994db by Alec Theriault at 2018-10-24T17:31:09-07:00 Resurrect the style-switcher This fixes haskell/haddock#810. Looks like things were broken during the quickjump refactor of the JS. For the (git) record: I do not think the style switcher is a good idea. I'm fixing it for the same reason @mzero added it; as an answer to "rumblings from some that they didn't want their pixels changed on bit" - - - - - 2a1d620f by Alec Theriault at 2018-10-24T17:38:07-07:00 Fix copy-pasta error in data-files - - - - - ed5bfb7f by Alec Theriault at 2018-10-24T20:42:14-07:00 Fix the synopsis button Here's these changes are supposed to do: * put the synopsis back on the right side * properly have it on the edge of the screen on wide screens * adjust the background of the synopsis to match the button (otherwise the grey blends in with what is underneath) * get rid of the dotted purple line * the synopsis contents are now scrollable even when in wide screens (this has been a long-standing bug) - - - - - 883fd74b by Alec Theriault at 2018-10-25T20:16:46-07:00 Avoid more conflicts in generated ids (#954) This fixes haskell/haddock#953 by passing more names into the generated ids. - - - - - ea54e331 by Alec Theriault at 2018-10-25T21:07:12-07:00 Don't hide bullets in method docs I think thst CSS was meant only to deal with fields and the effect on bullets was accidental. Fixes haskell/haddock#926. - - - - - 9a14ef4a by Alec Theriault at 2018-10-25T22:02:07-07:00 Indent more things + slightly smaller font - - - - - b9f17e29 by Alec Theriault at 2018-10-25T22:10:01-07:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 096a3cfa by Alec Theriault at 2018-10-25T22:24:38-07:00 Accept HTML output - - - - - 2669517d by Alec Theriault at 2018-10-26T09:02:35-07:00 User manual + stuff for building GHC docs - - - - - 46b27687 by Alec Theriault at 2018-10-26T09:10:59-07:00 Make 'Contents' in NewOcean scrollable This only happens if the contents block on the left is so big that it doesn't fit (vertically) on the page. If that happens, we want it to be scrollable. - - - - - 3443dd94 by Alec Theriault at 2018-10-26T09:36:46-07:00 Revert "Make 'Contents' in NewOcean scrollable" This reverts commit f909ffd8353d6463fd5dd184998a32aa98d5c922. I missed the fact this also forces the 'Contents' to always go down to the bottom of the page. - - - - - ed081424 by Alec Theriault at 2018-10-26T14:22:23-07:00 Avoid some partiality AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes haskell/haddock#569. - - - - - 6a5bec41 by Alec Theriault at 2018-10-27T10:05:04-07:00 Fix documentation in `haddock-api` (#957) * Fix misplaced Haddocks in Haddock itself Haddock should be able to generate documentation for 'haddock-api' again. * Make CI check that documentation can be built. * Add back a doc that is OK - - - - - 5100450a by Matthew Yacavone at 2018-10-27T14:51:38-04:00 More explicit foralls (GHC Proposal 0007) - - - - - 8771a6b0 by Alec Theriault at 2018-11-05T13:58:11-08:00 Only run MathJax on entities with "mathjax" class (#960) Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes haskell/haddock#959. - - - - - bd7ff5c5 by Alec Theriault at 2018-11-05T15:54:22-08:00 Deduplicate some work in 'AttachInstances' Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too - - - - - cf99fd8f by Alec Theriault at 2018-11-05T15:54:22-08:00 Specialize some SYB functions Perf only change: * Add a 'SPECIALIZE' pragma to help GHC optimize a 'Data a =>' constraint * Manually specialize the needlessly general type of 'specializeTyVarBndrs' - - - - - 4f91c473 by Alec Theriault at 2018-11-05T15:54:22-08:00 Improve perf of renaming Perf only change: * don't look up type variable names (they're never in the environment) * use a difference list for accumulating missing names * more efficient 'Functor'/'Applicative' instances for 'RnM' - - - - - 4bbab0d4 by Alec Theriault at 2018-11-05T15:54:22-08:00 Faster 'Text' driven parser combinators Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}' - - - - - fa430c02 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support hyperlink labels with inline markup The parser for pictures hasn't been properly adjusted yet. - - - - - c1431035 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support (and flatten) inline markup in image links Inline markup is supported in image links but, as per the [commonmark recommendation][0], it is stripped back to a plain text representation. [0]: https://spec.commonmark.org/0.28/#example-547 - - - - - d4ee1ba5 by Alec Theriault at 2018-11-06T12:03:24-08:00 Accept test case - - - - - 8088aeb1 by Alec Theriault at 2018-11-06T12:03:24-08:00 Fix/add to haddock-library test suite - - - - - e78f644d by Alec Theriault at 2018-11-06T13:26:31-08:00 Bump version bounds - - - - - 644335eb by Alec Theriault at 2018-11-06T13:53:30-08:00 Merge pull request haskell/haddock#875 from harpocrates/feature/markup-in-hyperlinks Inline markup in markdown-style links and images - - - - - e173ed0d by Alec Theriault at 2018-11-07T12:37:18-08:00 Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page - - - - - b2d92df7 by Alec Theriault at 2018-11-07T13:41:57-08:00 Allow "Contents" summary to scroll in a fixed div In the unfortunate event that the "Contents" summary doesn't fit vertically (like in the "Prelude"), it will be scrollable. - - - - - ca704c23 by Alec Theriault at 2018-11-07T13:45:15-08:00 Accept HTML output changes - - - - - 82c0ec6d by Alec Theriault at 2018-11-07T18:12:54-08:00 overflow-y 'scroll' -> 'auto' - - - - - 571d7657 by Alec Theriault at 2018-11-08T19:44:12-08:00 Clicking on "Contents" navigates to top of page - - - - - 8065a012 by Alec Theriault at 2018-11-08T19:44:17-08:00 Space out functions more Also, functions and data decls now have the same space before and after them. - - - - - cc650ede by Alec Theriault at 2018-11-09T08:13:35-08:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 65f8c17f by Alec Theriault at 2018-11-10T14:04:06-08:00 Update changelog - - - - - 20473847 by Alec Theriault at 2018-11-10T14:21:40-08:00 Replace oplus/ominus expander/collapser icons with triangles - - - - - 16592957 by Alec Theriault at 2018-11-10T14:35:10-08:00 Merge pull request haskell/haddock#949 from haskell/wip/new-ocean Introduce NewOcean theme. - - - - - 357cefe1 by Alec Theriault at 2018-11-10T16:02:13-08:00 Merge branch 'ghc-8.6' into ghc-head - - - - - de612267 by Alec Theriault at 2018-11-11T20:01:21-08:00 Rename 'NewOcean' theme to 'Linuwial' - - - - - 954b5baa by Alec Theriault at 2018-11-12T08:33:18-08:00 Add blockquote styling Matches b71da1feabf33efbbc517ac376bb690b5a604c2f from hackage-server. Fixes haskell/haddock#967. - - - - - d32c0b0b by Fangyi Zhou at 2018-11-12T10:24:13-08:00 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, osa1 Reviewed By: osa1 GHC Trac Issues: haskell/haddock#15733 Differential Revision: https://phabricator.haskell.org/D5262 - - - - - 41098b1f by Alp Mestanogullari at 2018-11-15T22:40:09+01:00 Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change It got introduced in ghc/ghc at ae2c9b40f5b6bf272251d1f4107c60003f541b62. - - - - - c5c1c7e0 by Alec Theriault at 2018-11-15T13:48:13-08:00 Merge pull request haskell/haddock#970 from alpmestan/alp/fix-promotionflag Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change - - - - - 6473d3a4 by Shayan-Najd at 2018-11-23T01:38:49+01:00 [TTG: Handling Source Locations] Foundation and Pat Trac Issues haskell/haddock#15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`) - - - - - 7a088dfe by Alec Theriault at 2018-11-26T11:11:28-08:00 More uniform handling of `forall`'s in HTML/LaTeX * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes haskell/haddock#973 - - - - - d735e570 by Alec Theriault at 2018-12-12T08:42:09-08:00 Fix warnings, accept output * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's - - - - - a3852f8a by Zejun Wu at 2018-12-14T09:37:47-05:00 Output better debug infromation on internal error in extractDecl This will make investigation of haskell/haddock#979 easier - - - - - 2eccb5b9 by Alec Theriault at 2018-12-17T09:25:10-05:00 Refactor names + unused functions (#982) This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions - - - - - e82e4df8 by Alec Theriault at 2018-12-20T16:16:30-05:00 Load plugins when compiling each module (#983) * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code - - - - - 96e86f38 by Alec Theriault at 2018-12-23T10:23:20-05:00 Properly synify and render promoted type variables (#985) * Synify and render properly promoted type variables Fixes haskell/haddock#923. * Accept output - - - - - 23343345 by Alec Theriault at 2018-12-27T16:39:38-05:00 Remove `haddock-test`'s dep. on `syb` (#987) The functionality is easily inlined into one short function: `gmapEverywhere`. This doesn't warrant pulling in another package. - - - - - d0734f21 by Alec Theriault at 2018-12-27T16:39:52-05:00 Address deprecation warnings in `haddock-test` (#988) Fixes haskell/haddock#885. - - - - - 4d9f144e by mynguyen at 2018-12-30T23:42:26-05:00 Visible kind application haddock update - - - - - ffe0e9ed by Alec Theriault at 2019-01-07T13:55:22-08:00 Print kinded tyvars in constructors for Hoogle (#993) Fixes haskell/haddock#992 - - - - - 2e18b55d by Alec Theriault at 2019-01-10T16:42:45-08:00 Accept new output `GHC.Maybe` -> `Data.Maybe` (#996) Since 53874834b779ad0dfbcde6650069c37926da1b79 in GHC, "GHC.Maybe" is marked as `not-home`. That changes around some test output. - - - - - 055da666 by Gabor Greif at 2019-01-22T14:41:51+01:00 Lone typofix - - - - - 01bb71c9 by Alec Theriault at 2019-01-23T11:46:46-08:00 Keep forall on H98 existential data constructors (#1003) The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes haskell/haddock#1002. - - - - - f9b9bc0e by Ryan Scott at 2019-01-27T09:28:12-08:00 Fix haskell/haddock#1004 with a pinch of dropForAlls - - - - - 5cfcdd0a by Alec Theriault at 2019-01-28T16:49:57-08:00 Loosen 'QuickCheck' and 'hspec' bounds It looks like the new versions don't cause any breakage and loosening the bounds helps deps fit in one stack resolver. - - - - - 3545d3dd by Alec Theriault at 2019-01-31T01:37:25-08:00 Use `.hie` files for the Hyperlinker backend (#977) # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see haskell/haddock#998) * restructure temporary folder logic for `.hi`/`.hie` model - - - - - 2ded3359 by Herbert Valerio Riedel at 2019-02-02T12:06:12+01:00 Update/modernise haddock-library.cabal file - - - - - 62b93451 by Herbert Valerio Riedel at 2019-02-02T12:19:31+01:00 Tentatively declare support for unreleased base-4.13/ghc-8.8 - - - - - 6041e767 by Herbert Valerio Riedel at 2019-02-02T16:04:32+01:00 Normalise LICENSE text w/ cabal's BSD2 template Also, correct the `.cabal` files to advertise `BSD2` instead of the incorrect `BSD3` license. - - - - - 0b459d7f by Alec Theriault at 2019-02-02T18:06:12-08:00 CI: fetch GHC from validate artifact Should help make CI be less broken - - - - - 6b5c07cf by Alec Theriault at 2019-02-02T18:06:12-08:00 Fix some Hyperlinker test suite fallout * Amend `ParserSpec` to match new Hyperlinker API - pass in compiler info - strip out null tokens * Make `hypsrc-test` pass reliably - strip out `local-*` ids - strip out `line-*` ids from the `ClangCppBug` test - re-accept output - - - - - ded34791 by Nathan Collins at 2019-02-02T18:31:23-08:00 Update README instructions for Stack No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock. - - - - - 723298c9 by Alec Theriault at 2019-02-03T09:11:05-08:00 Remove `Documentation.Haddock.Utf8` The circumstances under which this module appeared are completely gone. The Hyperlinker backend no longer needs this module (it uses the more efficient `Encoding` module from `ghc`). Why no deprecation? Because this module really shouldn't exist! - It isn't used in `haddock-library`/`haddock-api` anymore - It was copy pasted directly from `utf8-string` - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding` - - - - - 51050006 by Alec Theriault at 2019-02-03T22:58:58-08:00 Miscellaneous improvements to `Convert` (#1020) Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms - - - - - 841980c4 by Oleg Grenrus at 2019-02-04T08:44:25-08:00 Make a fixture of weird parsing of lists (#997) The second example is interesting. If there's a list directly after the header, and that list has deeper structure, the parser is confused: It finds two lists: - One with the first nested element, - everything after it I'm not trying to fix this, as I'm not even sure this is a bug, and not a feature. - - - - - 7315c0c8 by Ryan Scott at 2019-02-04T12:17:56-08:00 Fix haskell/haddock#1015 with dataConUserTyVars (#1022) The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes haskell/haddock#1015. - - - - - ee0b49a3 by Ryan Scott at 2019-02-04T15:25:17-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. - - - - - 1c850dc8 by Alan Zimmerman at 2019-02-05T21:54:18+02:00 Matching changes in GHC for haskell/haddock#16236 - - - - - ab03c38e by Simon Marlow at 2019-02-06T08:07:33+00:00 Merge pull request haskell/haddock#1014 from hvr/pr/bsd2-normalise Normalise LICENSE text w/ cabal's BSD2 template - - - - - 5a92ccae by Alec Theriault at 2019-02-10T06:21:55-05:00 Merge remote-tracking branch 'gitlab/wip/T16236-2' into ghc-head - - - - - c0485a1d by Alec Theriault at 2019-02-10T03:32:52-08:00 Removes `haddock-test`s dependency on `xml`/`xhtml` (#1027) This means that `html-test`, `latex-test`, `hoogle-test`, and `hypsrc-test` now only depend on GHC boot libs. So we should now be able to build and run these as part of GHC's testsuite. \o/ The reference output has changed very slightly, in three ways: * we don't convert quotes back into `&quot;` as the `xml` lib did * we don't add extra `&nbsp;` as the `xml` lib did * we now remove the entire footer `div` (instead of just emptying it) - - - - - 65a448e3 by Alec Theriault at 2019-02-11T12:27:41-05:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - 360ca937 by Alec Theriault at 2019-02-13T11:36:11-05:00 Clean up logic for guessing `-B` and `--lib` (#1026) Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works. - - - - - d583e364 by Alec Theriault at 2019-02-16T10:41:22-05:00 Fix tests broken by GHC Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings. - - - - - da0c42cc by Vladislav Zavialov at 2019-02-17T11:39:19+03:00 Parser changes to match !380 - - - - - ab96bed7 by Ryan Scott at 2019-02-18T04:44:08-05:00 Bump ghc version to 8.9 - - - - - 44b7c714 by Alec Theriault at 2019-02-22T05:49:43-08:00 Match GHC changes for T16185 `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock. - - - - - 2ee653b1 by Alec Theriault at 2019-02-24T18:53:33-08:00 Update .travis.yml Points to the new GHC CI artifact. - - - - - 90939d71 by Alec Theriault at 2019-02-25T00:42:41-08:00 Support value/type namespaces on identifier links Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity) - - - - - d6ed496c by Alec Theriault at 2019-02-25T00:42:46-08:00 Better identifier parsing * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental). - - - - - 3c3b404c by Alec Theriault at 2019-02-25T22:12:11-08:00 Fix standalone deriving docs Docs on standalone deriving decls for classes with associated types should be associated with the class instance, not the associated type instance. Fixes haskell/haddock#1033 - - - - - d51ef69e by Alec Theriault at 2019-02-26T19:14:59-08:00 Fix bogus identifier defaulting This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes haskell/haddock#1035. - - - - - 88cbbdc7 by Ryan Scott at 2019-02-27T10:14:03-05:00 Visible dependent quantification (#16326) changes - - - - - 0dcf6cee by Xia Li-yao at 2019-02-27T21:53:27-05:00 Menu item controlling which instances are expanded/collapsed (#1007) Adds a menu item (like "Quick Jump") for options related to displaying instances. This provides functionality for: * expanding/collapsing all instances on the currently opened page * controlling whether instances are expanded/collapsed by default * controlling whether the state of instances should be "remembered" This new functionality is implemented in Typescript in `details-helper`. The built-in-themes style switcher also got a revamp so that all three of QuickJump, the style switcher, and instance preferences now have the same style and implementation structure. See also: https://mail.haskell.org/pipermail/haskell-cafe/2019-January/130495.html Fixes haskell/haddock#698. Co-authored-by: Lysxia <lysxia at gmail.com> Co-authored-by: Nathan Collins <conathan at galois.com> - - - - - 3828c0fb by Alec Theriault at 2019-02-28T12:42:49-05:00 `--show-interface` should output to stdout. (#1040) Fixes haskell/haddock#864. - - - - - a50f4cda by gbaz at 2019-03-01T07:43:16-08:00 Increase contrast of Linuwal theme (#1037) This is to address the concern that, on less nice and older screens, some of the shades of grey blend in too easily with the white background. * darken the font slightly * darken slightly the grey behind type signatures and such * add a border and round the corners on code blocks * knock the font down by one point - - - - - ab4d41de by Alec Theriault at 2019-03-03T09:23:26-08:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 12f509eb by Ben Gamari at 2019-03-04T22:13:20-05:00 Remove reference to Opt_SplitObjs flag Split-objects has been removed. - - - - - 5b3e4c9a by Ryan Scott at 2019-03-06T19:16:24-05:00 Update html-test output to reflect haskell/haddock#16391 changes - - - - - fc228af1 by Alec Theriault at 2019-03-09T08:29:23-08:00 Match changes for "Stop inferring over-polymorphic kinds" The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock. - - - - - 6ac109eb by Alec Theriault at 2019-03-09T11:22:55-08:00 Add .hi, .dyn_hi, etc files to .gitignore Fixes haskell/haddock#1030. - - - - - b55f0c05 by Alec Theriault at 2019-03-09T11:22:55-08:00 Better support for default methods in classes * default methods now get rendered differently * default associated types get rendered * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend * LaTeX backend now renders default method signatures NB: there is still no way to document default class members and the NB: LaTeX backend still crashes on associated types - - - - - 10aea0cf by Alec Theriault at 2019-03-09T11:22:55-08:00 Avoid multi-line `emph` in LaTeX backend `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes haskell/haddock#936. - - - - - d22dc2c9 by Alec Theriault at 2019-03-09T11:22:55-08:00 Many LaTeX backend fixes After this commit, we can run with `--latex` on all boot libraries without crashing (although the generated LaTeX still fails to compile in a handful of larger packages like `ghc` and `base`). * Add newlines after all block elements in LaTeX. This is important to prevent the final output from being more an more indented. See the `latext-test/src/Example` test case for a sample of this. * Support associated types in class declarations (but not yet defaults) * Several small issues for producing compiling LaTeX; - avoid empy `\haddockbeginargs` lists (ex: `type family Any`) - properly escape identifiers depending on context (ex: `Int#`) - add `vbox` around `itemize`/`enumerate` (so they can be in tables) * Several spacing fixes: - limit the width of `Pretty`-arranged monospaced code - cut out extra space characters in export lists - only escape spaces if there are _multiple_ spaces - allow type signatures to be multiline (even without docs) * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files from `latex-test` test reference output. Fixes haskell/haddock#935, haskell/haddock#929 (LaTeX docs for `text` build & compile) Fixes haskell/haddock#727, haskell/haddock#930 (I think both are really about type families...) - - - - - 0e6cee00 by Alec Theriault at 2019-03-29T12:11:56-07:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - ce05434d by Alan Zimmerman at 2019-03-29T12:12:11-07:00 Matching changes in GHC for haskell/haddock#16236 (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576) - - - - - d85766b2 by Ben Gamari at 2019-03-29T12:14:04-07:00 Bump GHC to 8.8 - - - - - 5a82cbaf by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Redo ParseModuleHeader - - - - - b9033348 by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - bb55c8f4 by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove outdated `.ghci` files and `scripts` The `.ghci` files are actively annoying when trying to `cabal v2-repl`. As for the `scripts`, the distribution workflow is completely different. - - - - - 5ee244dc by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove obsolete arcanist files + STYLE Now that GHC is hosted on Gitlab, the arcanist files don't make sense anymore. The STYLE file contains nothing more than a dead link too. - - - - - d07c1928 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Redo ParseModuleHeader - - - - - 492762d2 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - af2ac773 by Ryan Scott at 2019-05-14T17:22:13-04:00 Changes for haskell/haddock#16110/#16356 - - - - - 6820ed0d by Alec Theriault at 2019-05-17T08:51:27-07:00 Unbreak haskell/haddock#1004 test case `fail` is no longer part of `Monad`. - - - - - 6bf7be98 by Alec Theriault at 2019-05-17T08:51:27-07:00 Fix haskell/haddock#1063 with better parenthesization logic for contexts The only other change in html/hoogle/hyperlinker output for the boot libraries that this caused is a fix to some Hoogle output for implicit params. ``` $ diff -r _build/docs/ old_docs diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt 13296c13296 < assertError :: (?callStack :: CallStack) => Bool -> a -> a --- > assertError :: ?callStack :: CallStack => Bool -> a -> a ``` - - - - - b5716b61 by Ryan Scott at 2019-05-22T17:24:32-04:00 Match changes with haskell/haddock#14332 - - - - - c115abf6 by Alec Theriault at 2019-05-26T16:01:58-04:00 Remove Haddock's dependency on `Cabal` At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries). - - - - - e5b2d4a3 by Alec Theriault at 2019-05-26T16:16:25-04:00 Regression test: promoted lists in associated types When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes haskell/haddock#466, - - - - - cc5ad5d3 by Alec Theriault at 2019-05-26T17:55:54-04:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 4b3301a6 by Alec Theriault at 2019-05-26T17:57:52-04:00 Release haddock-2.23, haddock-library-1.8.0 Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1. - - - - - 69c7cfce by Matthew Pickering at 2019-05-30T10:54:27+01:00 Update hyperlinker tests for new types in .hie files - - - - - 29b7e738 by Zubin Duggal at 2019-05-30T10:57:51+01:00 update for new way to store hiefile headers - - - - - aeca5d5f by Zubin Duggal at 2019-06-04T18:57:42-04:00 update for new way to store hiefile headers - - - - - ba2ca518 by Ben Gamari at 2019-06-07T23:11:14+00:00 Update test output for introduction of Safe-Inferred - - - - - 3a975a6c by Ryan Scott at 2019-07-03T12:06:27-04:00 Changes for haskell/haddock#15247 - - - - - 0df46555 by Zubin Duggal at 2019-07-22T10:52:50+01:00 Fix haddockHypsrcTest - - - - - 2688686b by Sylvain Henry at 2019-09-12T23:19:39+02:00 Fix for GHC module renaming - - - - - 9ec0f3fc by Alec Theriault at 2019-09-20T03:21:00-04:00 Fix Travis CI, loosen .cabal bounds (#1089) Tentatively for the 2.23 release: * updated Travis CI to work again * tweaked bounds in the `.cabal` files * adjusted `extra-source-files` to properly identify test files - - - - - ca559beb by Matthías Páll Gissurarson at 2019-09-28T12:14:40-04:00 Small change in to facilitate extended typed-holes (#1090) This change has no functional effect on haddock itself, it just changes one pattern to use `_ (` rather than `_(`, so that we may use `_(` as a token for extended typed-holes later. - - - - - 02e28976 by Vladislav Zavialov at 2019-09-28T12:17:45-04:00 Remove spaces around @-patterns (#1093) This is needed to compile `haddock` when [GHC Proposal haskell/haddock#229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented. - - - - - 83cbbf55 by Alexis King at 2019-09-30T21:12:42-04:00 Fix the ignore-exports option (#1082) The `ignore-exports` option has been broken since haskell/haddock#688, as mentioned in https://github.com/haskell/haddock/pull/766#issue-172505043. This PR fixes it. - - - - - e127e0ab by Ben Gamari at 2019-10-06T15:12:06-04:00 Fix a few haddock issues - - - - - 3a0f5c89 by Zubin Duggal at 2019-10-07T17:56:13-04:00 Fix crash when there are no srcspans in the file due to CPP - - - - - 339c5ff8 by Alec Theriault at 2019-10-07T17:56:13-04:00 Prefer un-hyperlinked sources to no sources It is possible to fail to extract an HIE ast. This is however not a reason to produce _no_ output - we should still make a colorized HTML page. - - - - - d47ef478 by Alec Theriault at 2019-10-07T17:56:13-04:00 Add a regression test for haskell/haddock#1091 Previously, this input would crash Haddock. - - - - - ed7c8b0f by Alec Theriault at 2019-10-07T20:56:48-04:00 Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. - - - - - d00436ab by Andreas Klebinger at 2019-10-21T15:53:03+02:00 Refactor for withTiming changes. - - - - - 4230e712 by Ben Gamari at 2019-10-22T09:36:37-04:00 Merge pull request haskell/haddock#1101 from AndreasPK/withTimingRefactor Refactor for withTiming changes. - - - - - d155c5f4 by Ryan Scott at 2019-10-23T10:37:17-04:00 Reify oversaturated data family instances correctly (#1103) This fixes haskell/haddock#1103 by adapting the corresponding patch for GHC (see https://gitlab.haskell.org/ghc/ghc/issues/17296 and https://gitlab.haskell.org/ghc/ghc/merge_requests/1877). - - - - - 331a5adf by Sebastian Graf at 2019-10-25T17:14:40+02:00 Refactor for OutputableBndrId changes - - - - - 48a490e0 by Ben Gamari at 2019-10-27T10:16:16-04:00 Merge pull request haskell/haddock#1105 from sgraf812/wip/flexible-outputable Refactor for OutputableBndrId changes - - - - - f62a7dfc by Sebastian Graf at 2019-11-01T11:54:16+00:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - d9b242ed by Ryan Scott at 2019-11-03T13:20:03-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. (cherry picked from commit cfd682c5fd03b099a3d78c44f9279faf56a0ac70) - - - - - dfd42406 by Sebastian Graf at 2019-11-04T07:02:14-05:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - 0b15be7c by Ben Gamari at 2019-11-09T13:21:33-05:00 Import isRuntimeRepVar from Type rather than TyCoRep isRuntimeRepVar is not longer exported from TyCoRep due to ghc#17441. - - - - - 091f7283 by Ben Gamari at 2019-11-10T12:47:06-05:00 Bump to GHC 8.10 - - - - - e88c71f2 by Ben Gamari at 2019-11-14T00:22:24-05:00 Merge pull request haskell/haddock#1110 from haskell/wip/T17441 Import isRuntimeRepVar from Type rather than TyCoRep - - - - - 4e0bbc17 by Ben Gamari at 2019-11-14T00:22:45-05:00 Version bumps for GHC 8.11 - - - - - 0e85ceb4 by Ben Gamari at 2019-11-15T11:59:45-05:00 Bump to GHC 8.10 - - - - - 00d6d68b by Ben Gamari at 2019-11-16T18:35:58-05:00 Bump ghc version to 8.11 - - - - - dde1fc3f by Ben Gamari at 2019-11-16T20:40:37-05:00 Drop support for base 4.13 - - - - - f52e331d by Vladislav Zavialov at 2019-11-24T13:02:28+03:00 Update Hyperlinker.Parser.classify to use ITdollar - - - - - 1ad96198 by Vladislav Zavialov at 2019-11-28T16:12:33+03:00 Remove HasSrcSpan (#17494) - - - - - 651afd70 by Herbert Valerio Riedel at 2019-12-08T12:08:16+01:00 Document error-prone conditional definition of instances This can easily trip up people if one isn't aware of it. Usually it's better to avoid this kind of conditionality especially for typeclasses for which there's an compat-package as conditional instances like these tend to fragment the ecosystem into those packages that go the extra mile to provide backward compat via those compat-packages and those that fail to do so. - - - - - b521af56 by Herbert Valerio Riedel at 2019-12-08T12:09:54+01:00 Fix build-failure regression for base < 4.7 The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses haskell/haddock#1119 - - - - - 556c375d by Sylvain Henry at 2020-01-02T19:01:55+01:00 Fix after Iface modules renaming - - - - - bd6c53e5 by Sylvain Henry at 2020-01-07T00:48:48+01:00 hsyl20-modules-renamer - - - - - fb23713b by Ryan Scott at 2020-01-08T07:41:13-05:00 Changes for GHC#17608 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2372 - - - - - 4a4dd382 by Ryan Scott at 2020-01-25T08:08:26-05:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - e782a44d by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename PackageConfig into UnitInfo - - - - - ba3c9f05 by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename lookupPackage - - - - - ab37f9b3 by Ben Gamari at 2020-01-29T13:00:44-05:00 Merge pull request haskell/haddock#1125 from haskell/wip/T17566-take-two Changes for GHC#17566 - - - - - 3ebd5ae0 by Ryan Scott at 2020-01-31T05:56:50-05:00 Merge branch 'wip-hsyl20-package-refactor' into ghc-head - - - - - 602a747e by Richard Eisenberg at 2020-02-04T09:05:43+00:00 Echo GHC's removal of PlaceHolder module This goes with GHC's !2083. - - - - - ccfe5679 by Sylvain Henry at 2020-02-10T10:13:56+01:00 Module hierarchy: runtime (cf haskell/haddock#13009) - - - - - 554914ce by Cale Gibbard at 2020-02-10T16:10:39-05:00 Fix build of haddock in stage1 We have to use the correct version of the GHC API, but the version of the compiler itself doesn't matter. - - - - - 5b6fa2a7 by John Ericson at 2020-02-10T16:18:07-05:00 Noramlize `tested-with` fields in cabal files - - - - - e6eb3ebe by Vladislav Zavialov at 2020-02-16T13:25:26+03:00 No MonadFail/Alternative for P - - - - - 90e181f7 by Ben Gamari at 2020-02-18T14:13:47-05:00 Merge pull request haskell/haddock#1129 from obsidiansystems/wip/fix-stage1-build Fix build of haddock in stage1 - - - - - 93b64636 by Sylvain Henry at 2020-02-19T11:20:27+01:00 Modules: Driver (#13009) - - - - - da4f6c7b by Vladislav Zavialov at 2020-02-22T15:33:02+03:00 Use RealSrcSpan in InstMap - - - - - 479b1b50 by Ben Gamari at 2020-02-23T10:28:13-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 55ecacf0 by Sylvain Henry at 2020-02-25T15:18:27+01:00 Modules: Core (#13009) - - - - - 60867b3b by Vladislav Zavialov at 2020-02-28T15:53:52+03:00 Ignore the BufLoc/BufSpan added in GHC's !2516 - - - - - 1e5506d3 by Sylvain Henry at 2020-03-02T12:32:43+01:00 Modules: Core (#13009) - - - - - 6fb53177 by Richard Eisenberg at 2020-03-09T14:49:40+00:00 Changes in GHC's !1913. - - - - - 30b792ea by Ben Gamari at 2020-03-16T12:45:02-04:00 Merge pull request haskell/haddock#1130 from hsyl20/wip/hsyl20-modules-core2 Modules: Core (#13009) - - - - - cd761ffa by Sylvain Henry at 2020-03-18T15:24:00+01:00 Modules: Types - - - - - b6646486 by Ben Gamari at 2020-03-18T14:42:43-04:00 Merge pull request haskell/haddock#1133 from hsyl20/wip/hsyl20/modules/types Modules: Types - - - - - 9325d734 by Kleidukos at 2020-03-19T12:38:31-04:00 Replace the 'caption' class so that the collapsible sections are shown - - - - - 5e2bb555 by Kleidukos at 2020-03-19T12:38:31-04:00 Force ghc-8.8.3 - - - - - c6fcd0aa by Kleidukos at 2020-03-19T12:38:31-04:00 Update test fixtures - - - - - 5c849cb1 by Sylvain Henry at 2020-03-20T09:34:39+01:00 Modules: Types - - - - - 7f439155 by Alec Theriault at 2020-03-20T20:17:01-04:00 Merge branch 'ghc-8.8' into ghc-8.10 - - - - - b7904e5c by Alina Banerjee at 2020-03-20T20:24:17-04:00 Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests - - - - - b9d60a59 by Alec Theriault at 2020-03-22T11:46:42-04:00 Clean up warnings * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal` - - - - - 0c317dbe by Alec Theriault at 2020-03-22T18:46:54-04:00 Fix NPM security warnings This was done by calling `npm audit fix`. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. - - - - - 6e306242 by Alec Theriault at 2020-03-22T20:10:52-04:00 Tentative 2.24 release Adjusted changelogs and versions in `.cabal` files in preparation for the upcoming release bundled with GHC 8.10. - - - - - 1bfb4645 by Ben Gamari at 2020-03-23T16:40:54-04:00 Merge commit '3c2944c037263b426c4fe60a3424c27b852ea71c' into HEAD More changes from the GHC types module refactoring. - - - - - be8c6f3d by Alec Theriault at 2020-03-26T20:10:53-04:00 Update `.travis.yml` to work with GHC 8.10.1 * Regenerated the Travis file with `haskell-ci` * Beef up `.cabal` files with more `tested-with` information - - - - - b025a9c6 by Alec Theriault at 2020-03-26T20:10:53-04:00 Update README Removed some out of date links/info, added some more useful links. * badge to Hackage * update old trac link * `ghc-head` => `ghc-8.10` * `cabal new-*` is now `cabal v2-*` and it should Just Work * `--test-option='--accept'` is the way to accept testsuite output - - - - - 564d889a by Alec Theriault at 2020-03-27T20:34:33-04:00 Fix crash in `haddock-library` on unicode space Our quickcheck tests for `haddock-library` stumbled across an edge case input that was causing Haddock to crash: it was a unicode space character. The root cause of the crash is that we were implicitly assuming that if a space character was not " \t\f\v\r", it would have to be "\n". We fix this by instead defining horizontal space as: any space character that is not '\n'. Fixes haskell/haddock#1142 - - - - - 2d360ba1 by Alec Theriault at 2020-03-27T21:57:32-04:00 Disallow qualified uses of reserved identifiers This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes haskell/haddock#952 - - - - - 47ae22ed by Alec Theriault at 2020-03-28T13:36:25-04:00 Remove unused `Haddock.Utils` functions * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils` - - - - - c0291245 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use TTG empty extensions to remove some `error`'s None of these error cases should ever have been reachable, so this is just a matter of leveraging the type system to assert this. * Use the `NoExtCon` and `noExtCon` to handle case matches for no extension constructors, instead of throwing an `error`. * Use the extension field of `HsSpliceTy` to ensure that this variant of `HsType` cannot exist in an `HsType DocNameI`. - - - - - 0aff8dc4 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` * `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes haskell/haddock#978 - - - - - bf6f2fb7 by Alec Theriault at 2020-03-28T13:36:25-04:00 Cleanup up GHC flags in `.cabal` files * enable more useful warning flags in `haddock-api`, handle the new warnings generated * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in `-Wall` for a while now) - - - - - c576fbf1 by Alec Theriault at 2020-03-28T13:36:25-04:00 `haddock-library` document header level Document the fact the header level is going to always be between 1 and 6 inclusive. Along the way, I also optimized the parsing code a bit. - - - - - 71bce0ee by Alec Theriault at 2020-03-28T14:26:27-04:00 Disallow links in section headers This is quite straightforward to implement, since we already had a function `docToHtmlNoAnchors` (which we used to generate the link in the sidebar "Contents"). This breaks test `Bug387`, but that test case has aged badly: we now automatically generate anchors for all headings, so manually adding an anchor in a section makes no sense. Nested anchors are, as pointed out in haskell/haddock#1054, disallowed by the HTML standard. Fixes haskell/haddock#1054 - - - - - b461b0ed by Sylvain Henry at 2020-03-30T10:34:23+02:00 Modules: type checker - - - - - cd8cd1ee by Ben Gamari at 2020-03-31T12:45:02-04:00 Merge pull request haskell/haddock#1152 from hsyl20/wip/hsyl20/modules/tc Module renaming - - - - - 5e8f8ea7 by Felix Yan at 2020-04-01T17:58:06-07:00 Allow QuickCheck 2.14 Builds fine and all tests pass. - - - - - dc6b1633 by Sylvain Henry at 2020-04-05T16:43:44+02:00 Module renaming: amend previous patch - - - - - eee2f4ae by Ryan Scott at 2020-04-05T09:04:43-07:00 Fix haskell/haddock#1050 by filtering out invisible AppTy arguments This makes the `synifyType` case for `AppTy` more intelligent by taking into consideration the visibilities of each `AppTy` argument and filtering out any invisible arguments, as they aren't intended to be displayed in the source code. (See haskell/haddock#1050 for an example of what can happen if you fail to filter these out.) Along the way, I noticed that a special `synifyType` case for `AppTy t1 (CoercionTy {})` could be consolidated with the case below it, so I took the opportunity to tidy this up. - - - - - 23eb99e8 by Ben Gamari at 2020-04-07T11:19:58-04:00 Merge pull request haskell/haddock#1154 from hsyl20/wip/hsyl20/modules/tc Module renaming: amend previous patch - - - - - 072d994d by Ryan Scott at 2020-04-07T19:32:47-04:00 Make NoExtCon fields strict These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992). - - - - - d8ebf6c8 by Ignat Insarov at 2020-04-09T21:15:01-04:00 Recode Doc to Json. (#1159) * Recode Doc to Json. * More descriptive field labels. - - - - - 52df4b4e by Sylvain Henry at 2020-04-10T12:39:18+02:00 Module renaming - - - - - d9ab8ec8 by Cale Gibbard at 2020-04-14T11:43:34-04:00 Add instance of XCollectPat for DocNameI - - - - - 323d221d by Cale Gibbard at 2020-04-14T11:43:34-04:00 Rename XCollectPat -> CollectPass - - - - - 2df80867 by Alec Theriault at 2020-04-15T07:30:51-07:00 Prune docstrings that are never rendered When first creating a Haddock interface, trim `ifaceDocMap` and `ifaceArgMap` to not include docstrings that can never appear in the final output. Besides checking with GHC which names are exported, we also need to keep all the docs attached to instance declarations (it is much tougher to detect when an instance is fully private). This change means: * slightly smaller interface files (7% reduction on boot libs) * slightly less work to do processing docstrings that aren't used * no warnings in Haddock's output about private docstrings (see haskell/haddock#1070) I've tested manually that this does not affect any of the boot library generated docs (the only change in output was some small re-ordering in a handful of instance lists). This should mean no docstrings have been incorrectly dropped. - - - - - f49c90cc by Alec Theriault at 2020-04-15T07:30:51-07:00 Don't warn about missing links in miminal sigs When renaming the Haddock interface, never emit warnings when renaming a minimal signature. Also added some documention around `renameInterface`. Minimal signatures intentionally include references to potentially un-exported methods (see the discussion in haskell/haddock#330), so it is expected that they will not always have a link destination. On the principle that warnings should always be resolvable, this shouldn't produce a warning. See haskell/haddock#1070. - - - - - a9eda64d by Ben Gamari at 2020-04-17T09:27:35-04:00 Merge pull request haskell/haddock#1160 from hsyl20/wip/hsyl20/modules/systools Module renaming - - - - - f40d7879 by Cale Gibbard at 2020-04-20T11:30:38-04:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ttg-con-pat - - - - - a50e7753 by Ben Gamari at 2020-04-20T11:36:10-04:00 Merge pull request haskell/haddock#1165 from obsidiansystems/wip/ttg-con-pat Trees that Grow refactor (GHC !2553) - - - - - 6a24795c by Alec Theriault at 2020-04-21T08:06:45-07:00 Fallback to `hiDecl` when `extractDecl` fails Sometimes, the declaration being exported is a subdecl (for instance, a record accessor getting exported at the top-level). For these cases, Haddock has to find a way to produce some synthetic sensible top-level declaration. This is done with `extractDecl`. As is shown by haskell/haddock#1067, this is sometimes impossible to do just at a syntactic level (for instance when the subdecl is re-exported). In these cases, the only sensible thing to do is to try to reify a declaration based on a GHC `TyThing` via `hiDecl`. - - - - - eee1a8b7 by Sylvain Henry at 2020-04-24T15:46:05+02:00 Module structure - - - - - 50b9259c by Iñaki at 2020-04-25T18:38:11-04:00 Add support for custom section anchors (#1179) This allows to have stable anchors for groups, even if the set of groups in the documentation is altered. The syntax for setting the anchor of a group is -- * Group name #desiredAnchor# Which will produce an html anchor of the form '#g:desiredAnchor' Co-authored-by: Iñaki García Etxebarria <git at inaki.blueleaf.cc> - - - - - 4003c97a by Ben Gamari at 2020-04-26T09:35:15-04:00 Merge pull request haskell/haddock#1166 from hsyl20/wip/hsyl20/modules/utils Module structure - - - - - 5206ab60 by Sylvain Henry at 2020-04-27T16:47:39+02:00 Renamed UnitInfo fields - - - - - c32c333b by Sylvain Henry at 2020-04-27T17:32:58+02:00 UnitId has been renamed into Unit - - - - - 3e87db64 by Sylvain Henry at 2020-04-27T17:36:00+02:00 Fix for GHC.Unit.* modules - - - - - ae3323a7 by Ben Gamari at 2020-04-29T12:36:37-04:00 Merge pull request haskell/haddock#1183 from hsyl20/wip/hsyl20/unitid Refactoring of Unit code - - - - - b105564a by Artem Pelenitsyn at 2020-05-03T08:14:10+01:00 add dependency on exceptions because GHC.Exception was boiled down (ghc haskell/haddock#18075) - - - - - 9857eff3 by Zubin Duggal at 2020-05-04T18:48:25+01:00 Atomic update of NameCache in readHieFile - - - - - 86bbb226 by Sylvain Henry at 2020-05-14T16:36:27+02:00 Fix after Config module renaming - - - - - a4bbdbc2 by Gert-Jan Bottu at 2020-05-15T22:09:44+02:00 Explicit Specificity Support for Haddock - - - - - 46199daf by Ben Gamari at 2020-05-19T09:59:56-04:00 Merge pull request haskell/haddock#1192 from hsyl20/hsyl20/modules-config Fix after Config module renaming - - - - - f9a9d2ba by Gert-Jan Bottu at 2020-05-20T16:48:38-04:00 Explicit Specificity Support for Haddock - - - - - 55c5b7ea by Ben Gamari at 2020-05-21T00:32:02-04:00 Merge commit 'a8d7e66da4dcc3b242103271875261604be42d6e' into ghc-head - - - - - a566557f by Cale Gibbard at 2020-05-21T16:02:06-04:00 isBootSummary now produces a result of type IsBootInterface - - - - - ea52f905 by Zubin Duggal at 2020-05-24T17:55:48+01:00 update for hiefile-typeclass-info - - - - - 49ba7a67 by Willem Van Onsem at 2020-05-25T12:23:01-04:00 Use floor over round to calculate the percentage (#1195) If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes haskell/haddock#1194 - - - - - c025ebf1 by Ben Gamari at 2020-05-29T14:32:42-04:00 Merge pull request haskell/haddock#1185 from obsidiansystems/boot-disambig isBootSummary now produces a result of type IsBootInterface - - - - - 74ab9415 by Ben Gamari at 2020-05-29T20:23:39-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - b40be944 by Ben Gamari at 2020-06-03T17:02:31-04:00 testsuite: Update expected output for simplified subsumption - - - - - 624be71c by Ryan Scott at 2020-06-05T12:43:23-04:00 Changes for GHC#18191 See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337. - - - - - fbd8f7ce by Sylvain Henry at 2020-06-08T15:31:47+02:00 Fix after unit refactoring - - - - - 743fda4d by Ben Gamari at 2020-06-09T12:09:58-04:00 Merge pull request haskell/haddock#1202 from hsyl20/wip/hsyl20/unitid-ii Fix after unit refactoring - - - - - d07a06a9 by Ryan Scott at 2020-06-13T07:16:55-04:00 Use HsForAllTelescope (GHC#18235) - - - - - 389bb60d by Ben Gamari at 2020-06-13T15:30:52-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - 7a377f5f by Ben Gamari at 2020-06-17T14:53:16-04:00 Merge pull request haskell/haddock#1199 from bgamari/wip/ghc-8.12 haddock: Bounds bumps for GHC 8.12 - - - - - 9fd9e586 by Krzysztof Gogolewski at 2020-06-17T16:09:07-04:00 Adapt Haddock to LinearTypes See ghc/ghc!852. - - - - - 46fe7636 by Ben Gamari at 2020-06-18T14:20:02-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 35a3c9e2 by Zubin Duggal at 2020-06-21T21:19:18+05:30 Use functions exported from HsToCore - - - - - 8abe3928 by Ben Gamari at 2020-06-24T13:53:39-04:00 Merge pull request haskell/haddock#1204 from wz1000/wip/haddock-hstocore Use functions exported from GHC.HsToCore.Docs - - - - - 22f2c937 by Matthías Páll Gissurarson at 2020-06-26T19:07:03+02:00 Adapt Haddock for QualifiedDo - - - - - 3f6208d7 by Vladislav Zavialov at 2020-06-28T14:28:16+03:00 Handle LexicalNegation's ITprefixminus - - - - - 03a19f41 by Sylvain Henry at 2020-07-02T09:37:38+02:00 Rename hsctarget into backend - - - - - ea17ff23 by Andreas Klebinger at 2020-07-02T17:44:18+02:00 Update for UniqFM changes. - - - - - 9872f2f3 by Ben Gamari at 2020-07-09T10:39:19-04:00 Merge pull request haskell/haddock#1209 from AndreasPK/wip/typed_uniqfm Update for UniqFM changes. - - - - - 68f7b668 by Krzysztof Gogolewski at 2020-07-12T18:16:57+02:00 Sync with GHC removing {-# CORE #-} pragma See ghc ticket haskell/haddock#18048 - - - - - eb372681 by Sylvain Henry at 2020-07-20T11:41:30+02:00 Rename hscTarget into backend - - - - - fb7f78bf by Ben Gamari at 2020-07-21T12:15:25-04:00 Merge pull request haskell/haddock#1214 from hsyl20/wip/hsyl20/hadrian/ncg Rename hscTarget into backend - - - - - 1e8f5b56 by Ben Gamari at 2020-07-23T09:11:50-04:00 Merge commit '904dce0cafe0a241dd3ef355775db47fc12f434d' into ghc-head - - - - - d8fd1775 by Zubin Duggal at 2020-07-23T18:46:40+05:30 Update for modular ping pong - - - - - 8416f872 by Ben Gamari at 2020-07-23T09:35:03-04:00 Merge pull request haskell/haddock#1200 from wz1000/wip/wz1000-modular-ping-pong Modular ping pong - - - - - a24a8577 by Ben Gamari at 2020-07-28T15:23:36-04:00 Bump GHC version to 9.0 - - - - - 6a51c9dd by Sylvain Henry at 2020-08-05T18:47:05+02:00 Fix after Outputable refactoring - - - - - c05e1c99 by Ben Gamari at 2020-08-10T14:41:41-04:00 Merge pull request haskell/haddock#1223 from hsyl20/wip/hsyl20/dynflags/exception Fix after Outputable refactoring - - - - - d964f15b by Sylvain Henry at 2020-08-12T11:58:49+02:00 Fix after HomeUnit - - - - - 8e6d5b23 by Ben Gamari at 2020-08-12T14:25:30-04:00 Merge pull request haskell/haddock#1225 from hsyl20/wip/hsyl20/plugins/homeunit Fix after HomeUnit - - - - - 8c7880fe by Sylvain Henry at 2020-08-17T14:13:29+02:00 Remove Ord FastString instance - - - - - 8ea410db by Alex Biehl at 2020-08-19T10:56:32+02:00 Another round of `npm audit fix` (#1228) This should shut down the warnings on Github. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. Last NPM dependency audit happend in d576b2327e2bc117f912fe0a9d595e9ae62614e0 Co-authored-by: Alex Biehl <alex.biehl at target.com> - - - - - 7af6e2a8 by Ben Gamari at 2020-08-31T13:59:34-04:00 Merge pull request haskell/haddock#1226 from hsyl20/wip/hsyl20/fs_ord Remove Ord FastString instance - - - - - ffbc8702 by Alan Zimmerman at 2020-09-07T21:47:41+01:00 Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - a93f1268 by Alan Zimmerman at 2020-09-07T23:11:38+01:00 Merge pull request haskell/haddock#1232 from haskell/wip/T18639-remove-generated-pragma, Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - 1f605d50 by Ben Gamari at 2020-09-14T18:30:01-04:00 Bump GHC version to 9.1 - - - - - 6599df62 by Vladislav Zavialov at 2020-09-18T14:05:15+03:00 Bump base upper bound to 4.16 - - - - - a01b3c43 by Ben Gamari at 2020-09-22T15:41:48-04:00 Update hypsrc-test for QuickLook This appears to be a spurious change. - - - - - e9cc6cac by Vladislav Zavialov at 2020-09-26T21:00:12+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 30e3ca7c by Sylvain Henry at 2020-09-29T11:18:32-04:00 Update for parser (#1234) - - - - - b172f3e3 by Vladislav Zavialov at 2020-09-30T01:01:30+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 0b9c08d3 by Sylvain Henry at 2020-09-30T11:02:33+02:00 Adapt to GHC parser changes - - - - - b9540b7a by Sylvain Henry at 2020-10-12T09:13:38-04:00 Don't pass the HomeUnitId (#1239) - - - - - 34762e80 by HaskellMouse at 2020-10-13T12:58:04+03:00 Changed tests due to unification of `Nat` and `Natural` in the follwing merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583 - - - - - 256f86b6 by Vladislav Zavialov at 2020-10-15T10:48:03+03:00 Add whitespace in: map ($ v) - - - - - 4a3f711b by Alan Zimmerman at 2020-10-19T08:57:27+01:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled - - - - - 072cdd21 by Alan Zimmerman at 2020-10-21T14:48:28-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 9e09a445 by Alan Zimmerman at 2020-10-21T23:53:34-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 636d7de3 by Sylvain Henry at 2020-10-26T14:31:54-04:00 GHC.Driver.Types refactoring (#1242) - - - - - a597f000 by Ryan Scott at 2020-10-29T04:18:05-04:00 Adapt to the removal of Hs{Boxed,Constraint}Tuple See ghc/ghc!4097 and GHC#18723. - - - - - b96660fb by Ryan Scott at 2020-10-30T04:53:05-04:00 Adapt to HsConDecl{H98,GADT}Details split Needed for GHC#18844. - - - - - c287d82c by Ryan Scott at 2020-10-30T19:35:59-04:00 Adapt to HsOuterTyVarBndrs These changes accompany ghc/ghc!4107, which aims to be a fix for haskell/haddock#16762. - - - - - a34c31a1 by Ryan Scott at 2020-11-13T13:38:34-05:00 Adapt to splitPiTysInvisible being renamed to splitInvisPiTys This is a part of !4434, a fix for GHC#18939. - - - - - 66ea459d by Sylvain Henry at 2020-11-16T10:59:30+01:00 Fix after Plugins moved into HscEnv - - - - - 508556d8 by Ben Gamari at 2020-11-18T15:47:40-05:00 Merge pull request haskell/haddock#1253 from hsyl20/wip/hsyl20/plugins/hscenv Fix after Plugins moved into HscEnv - - - - - 620fec1a by Andreas Klebinger at 2020-11-24T20:51:59+01:00 Update for changes in GHC's Pretty - - - - - 01cc13ab by Richard Eisenberg at 2020-11-25T23:18:35-05:00 Avoid GHC#18932. - - - - - 8d29ba21 by Cale Gibbard at 2020-11-25T23:18:35-05:00 Add type arguments to PrefixCon - - - - - 414d5f87 by Sylvain Henry at 2020-11-30T17:06:04+01:00 DynFlags's unit fields moved to HscEnv - - - - - e356668c by Ben Gamari at 2020-11-30T11:11:37-05:00 Merge pull request haskell/haddock#1258 from hsyl20/wip/hsyl20/hscenv/unitstate Unit fields moved from DynFlags to HscEnv - - - - - 7cf552f1 by Ben Gamari at 2020-12-03T10:31:27-05:00 Merge pull request haskell/haddock#1257 from AndreasPK/wip/andreask/opt_dumps Update for changes in GHC's Pretty - - - - - fc0871c3 by Veronika Romashkina at 2020-12-08T16:35:33+01:00 Fix docs links from Darcs to GitHub in intro (#1262) - - - - - 7059e808 by Veronika Romashkina at 2020-12-08T16:36:16+01:00 Use gender neutral word in docs (#1260) - - - - - 1b16e5ee by Maximilian Tagher at 2020-12-08T16:40:03+01:00 Allow scrolling search results (#1235) Closes https://github.com/haskell/haddock/issues/1231 - - - - - 8a118c01 by dependabot[bot] at 2020-12-08T16:40:25+01:00 Bump bl from 1.2.2 to 1.2.3 in /haddock-api/resources/html (#1255) Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - c89ff587 by Xia Li-yao at 2020-12-08T16:42:17+01:00 Allow more characters in anchor following module reference (#1220) - - - - - 14af7d64 by Xia Li-yao at 2020-12-08T16:43:05+01:00 Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243) * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt at mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem at users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard at tweag.io> Co-authored-by: Pepe Iborra <pepeiborra at gmail.com> - - - - - 89e3af13 by tomjaguarpaw at 2020-12-08T18:00:04+01:00 Enable two warnings (#1245) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - c3320f8d by Willem Van Onsem at 2020-12-08T18:26:55+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 685df308 by Alex Biehl at 2020-12-08T20:06:26+01:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - be3ec3c0 by Alex Biehl at 2020-12-08T20:06:26+01:00 Import intercalate - - - - - 32c33912 by Matthías Páll Gissurarson at 2020-12-08T21:15:30+01:00 Adapt Haddock for QualifiedDo - - - - - 31696088 by Alex Biehl at 2020-12-08T22:06:02+01:00 Fix haddock-library tests - - - - - fbc0998a by Alex Biehl at 2020-12-08T23:08:23+01:00 Move to GitHub CI (#1266) * Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell at v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up - - - - - 5b946b9a by tomjaguarpaw at 2020-12-10T19:01:41+01:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - bc5a408f by dependabot[bot] at 2020-12-10T19:02:16+01:00 Bump ini from 1.3.5 to 1.3.7 in /haddock-api/resources/html (#1269) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - d02995f1 by Andrew Martin at 2020-12-14T16:48:40-05:00 Update for boxed rep - - - - - a381aeff by Ben Gamari at 2020-12-15T15:13:30-05:00 Revert "Enable two warnings (#1245) (#1268)" As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce. - - - - - a63c0a9e by Ben Gamari at 2020-12-15T15:17:59-05:00 Revert "Update for boxed rep" This reverts commit 4ffb30d8b637ccebecc81ce610f0af451ac8088d. - - - - - 53bfbb29 by Ben Gamari at 2020-12-15T15:37:24-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - bae76a30 by Ben Gamari at 2020-12-16T02:44:42+00:00 Update output for nullary TyConApp optimisation (ghc/ghc!2952) - - - - - 4b733b57 by Krzysztof Gogolewski at 2020-12-16T20:03:14+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. - - - - - ee463bd3 by Ryan Scott at 2020-12-16T16:55:23-05:00 Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonym Needed for !4417, the fix for GHC#15706 and GHC#18914. - - - - - ed0b02f8 by tomjaguarpaw at 2020-12-19T10:17:19+00:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - d80bf8f5 by Sylvain Henry at 2020-12-21T10:09:25+01:00 Fix after binder collect changes - - - - - bf4c9d32 by Adam Gundry at 2020-12-23T21:35:01+00:00 Adapt to changes to GlobalRdrElt and AvailInfo Needed for ghc/ghc!4467 - - - - - 37736c4c by John Ericson at 2020-12-28T12:27:02-05:00 Support a new ghc --make node type for parallel backpack upsweep - - - - - 717bdeac by Vladislav Zavialov at 2020-12-29T10:50:02+03:00 Inline and fix getGADTConTypeG The getGADTConTypeG used HsRecTy, which is at odds with GHC issue haskell/haddock#18782. I noticed that getGADTConTypeG was only used in the Hoogle backend. Interestingly, when handling H98 constructors, Hoogle converts RecCon to PrefixCon (see Haddock.Backends.Hoogle.ppCtor). So I changed getGADTConTypeG to handle RecConGADT in the same manner as PrefixConGADT, and after this simplification moved it into the 'where' clause of ppCtor, to the only place where it is used. The practical effect of this change is as follows. Consider this example: data TestH98 = T98 { bar::Int } data TestGADT where TG :: { foo :: Int } -> TestGADT Before this patch, haddock --hoogle used to produce: T98 :: Int -> TestH98 [TG] :: {foo :: Int} -> TestGADT Notice how the record syntax was discarded in T98 but not TG. With this patch, we always produce signatures without record syntax: T98 :: Int -> TestH98 [TG] :: Int -> TestGADT I suspect this might also be a bugfix, as currently Hoogle doesn't seem to render GADT record constructors properly. - - - - - cb1b8c56 by Andreas Abel at 2020-12-30T21:12:37+01:00 Build instructions: haddock-library and -api first! - - - - - b947f6ad by Ben Gamari at 2020-12-31T13:04:19-05:00 Merge pull request haskell/haddock#1281 from obsidiansystems/wip/backpack-j Changes to support -j with backpack - - - - - 120e1cfd by Hécate Moonlight at 2021-01-04T19:54:58+01:00 Merge pull request haskell/haddock#1282 from andreasabel/master Build instructions: haddock-library and -api first! - - - - - fd45e41a by Ben Gamari at 2021-01-05T16:14:31-05:00 Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0 - - - - - b471bdec by Ben Gamari at 2021-01-05T16:23:02-05:00 Merge commit '1e56f63c3197e7ca1c1e506e083c2bad25d08793' into ghc-9.0 - - - - - 81cdbc41 by Alex Biehl at 2021-01-09T12:14:41+01:00 Prepare Haddock for being a GHC Plugin - - - - - b646d952 by Alex Biehl at 2021-01-09T12:14:41+01:00 Make Haddock a GHC Plugin - - - - - cc044674 by Alex Biehl at 2021-01-09T12:14:41+01:00 Add -j[n] CLI param to Haddock executable It translates to `--ghcopt=-j[n]` - - - - - 84a04073 by Alex Biehl at 2021-01-09T12:14:41+01:00 Abstract Monad for interface creation I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName. - - - - - 5be2c4f7 by Alex Biehl at 2021-01-09T12:14:41+01:00 Accept tests - - - - - 8cefee9d by Alex Biehl at 2021-01-09T16:10:47+01:00 Add missing dependency for mtl - - - - - 3681f919 by Ben Gamari at 2021-01-13T18:39:25-05:00 Merge remote-tracking branch 'origin/ghc-9.0' into ghc-head - - - - - 33c6b152 by Hécate Moonlight at 2021-01-14T16:04:20+01:00 Merge pull request haskell/haddock#1273 from hsyl20/wip/hsyl20/arrows Fix after binder collect changes - - - - - 70d13e8e by Joachim Breitner at 2021-01-22T19:03:45+01:00 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) - - - - - 7d6dd57a by John Ericson at 2021-01-22T22:02:02+00:00 Add `NoGhcTc` instance now that it's not closed - - - - - e5fdaf0a by Alan Zimmerman at 2021-01-23T22:57:44+00:00 Merge pull request haskell/haddock#1293 from obsidiansystems/wip/fix-18936 Add `NoGhcTc` instance now that it's not closed - - - - - 989a1e05 by Oleg Grenrus at 2021-01-24T16:11:46+03:00 Add import list to Data.List - - - - - 368e144a by Ben Gamari at 2021-01-28T22:15:48+01:00 Adapt to "Make PatSyn immutable" - - - - - abe66c21 by Alfredo Di Napoli at 2021-02-01T08:05:35+01:00 Rename pprLogErrMsg to new name - - - - - e600e75c by Hécate Moonlight at 2021-02-05T14:53:00+01:00 Move CI to ghc-9.0 - - - - - dd492961 by Vladislav Zavialov at 2021-02-05T14:53:00+01:00 Update cabal.project and README build instructions - - - - - 31bd292a by Hécate Moonlight at 2021-02-05T15:03:56+01:00 Merge pull request haskell/haddock#1296 from Kleidukos/ghc-9.0 Merge the late additions to ghc-8.10 into ghc-9.0 - - - - - 6388989e by Vladislav Zavialov at 2021-02-05T17:41:57+03:00 Cleanup: fix build warnings - - - - - f99407ef by Daniel Rogozin at 2021-02-05T18:11:48+03:00 type level characters support for haddock (required for haskell/haddock#11342) - - - - - d8c6b26f by Hécate Moonlight at 2021-02-05T17:44:50+01:00 Add a CONTRIBUTING.md file - - - - - 6a01ad98 by Hécate Moonlight at 2021-02-05T17:58:16+01:00 Merge pull request haskell/haddock#1312 from Kleidukos/proper-branch-etiquette Add a CONTRIBUTING.md file - - - - - 955eecc4 by Vladislav Zavialov at 2021-02-05T20:29:00+03:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into ghc-head - - - - - 47b3d6ab by Hécate Moonlight at 2021-02-05T19:09:38+01:00 Amend the CONTRIBUTING.md file - - - - - 23de6137 by Hécate Moonlight at 2021-02-05T19:16:49+01:00 Merge pull request haskell/haddock#1313 from Kleidukos/amend-contributing Amend the CONTRIBUTING.md file - - - - - 69026b59 by Krzysztof Gogolewski at 2021-02-05T23:05:56+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb) - - - - - ea026b78 by Oleg Grenrus at 2021-02-06T17:14:45+01:00 Add import list to Data.List - - - - - 5204326f by Hécate Moonlight at 2021-02-06T17:15:44+01:00 Merge pull request haskell/haddock#1316 from Kleidukos/explicit-imports-to-data-list Add import list to Data.List - - - - - 1f4d2136 by Ben Gamari at 2021-02-06T11:53:31-05:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge - - - - - 13f0d09a by Ben Gamari at 2021-02-06T11:53:45-05:00 Fix partial record selector warning - - - - - 5c115f7e by Ben Gamari at 2021-02-06T11:55:52-05:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into wip/ghc-head-merge - - - - - b6fd8b75 by Ben Gamari at 2021-02-06T12:01:31-05:00 Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-merge - - - - - a967194c by Ben Gamari at 2021-02-06T18:30:35-05:00 Merge branch 'wip/ghc-head-merge' into ghc-head - - - - - 1f4c3a91 by MorrowM at 2021-02-07T01:52:33+02:00 Fix search div not scrolling - - - - - 684b1287 by Iñaki García Etxebarria at 2021-02-07T16:13:04+01:00 Add support for labeled module references Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label". - - - - - bdb55a5d by Hécate Moonlight at 2021-02-07T16:18:10+01:00 Merge pull request haskell/haddock#1319 from alexbiehl/alex/compat Backward compat: Add support for labeled module references - - - - - 6ca70991 by Hécate Moonlight at 2021-02-07T16:21:29+01:00 Merge pull request haskell/haddock#1314 from tweag/show-linear-backport Backport haskell/haddock#1238 (linear types) to ghc-9.0 - - - - - d9d73298 by Alex Biehl at 2021-02-07T17:46:25+01:00 Remove dubious parseModLink Instead construct the ModLink value directly when parsing. - - - - - 33b4d020 by Hécate Moonlight at 2021-02-07T17:52:05+01:00 Merge pull request haskell/haddock#1320 from haskell/alex/fix Remove dubious parseModLink - - - - - 54211316 by Hécate Moonlight at 2021-02-07T18:12:07+01:00 Merge pull request haskell/haddock#1318 from MorrowM/ghc-9.0 Fix search div not scrolling - - - - - 19db679e by alexbiehl-gc at 2021-02-07T18:14:46+01:00 Merge pull request haskell/haddock#1317 from bgamari/wip/ghc-head-merge Merge ghc-8.10 into ghc-head - - - - - 6bc1e9e4 by Willem Van Onsem at 2021-02-07T18:25:30+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - c8537cf8 by alexbiehl-gc at 2021-02-07T18:30:40+01:00 Merge pull request haskell/haddock#1322 from haskell/alex/forward-port simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 2d47ae4e by alexbiehl-gc at 2021-02-07T18:39:59+01:00 Merge branch 'ghc-head' into ghc-9.0 - - - - - 849e4733 by Hécate Moonlight at 2021-02-07T18:43:19+01:00 Merge pull request haskell/haddock#1321 from Kleidukos/ghc-9.0 Merge ghc-9.0 into ghc-head - - - - - ee6095d7 by Sylvain Henry at 2021-02-08T11:36:38+01:00 Update for Logger - - - - - 4ad688c9 by Alex Biehl at 2021-02-08T18:11:24+01:00 Merge pull request haskell/haddock#1310 from hsyl20/wip/hsyl20/logger2 Logger refactoring - - - - - 922a9e0e by Ben Gamari at 2021-02-08T12:54:33-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - 991649d2 by Sylvain Henry at 2021-02-09T10:55:17+01:00 Fix to build with HEAD - - - - - a8348dc2 by Hécate Moonlight at 2021-02-09T10:58:51+01:00 Merge pull request haskell/haddock#1327 from hsyl20/wip/hsyl20/logger2 Fix to build with HEAD - - - - - 0abdbca6 by Fendor at 2021-02-09T20:06:15+01:00 Add UnitId to Target record - - - - - d5790a0e by Alex Biehl at 2021-02-11T10:32:32+01:00 Stable sort for (data/newtype) instances - - - - - 8e6036f5 by Alex Biehl at 2021-02-11T10:32:32+01:00 Also make TyLit deterministic - - - - - f76d2945 by Hécate Moonlight at 2021-02-11T11:00:31+01:00 Merge pull request haskell/haddock#1329 from hsyl20/hsyl20/stabe_iface Stable sort for instances - - - - - 5e0469ea by Oleg Grenrus at 2021-02-14T15:28:15+02:00 Add import list to Data.List in Haddock.Interface.Create - - - - - fa57cd24 by Hécate Moonlight at 2021-02-14T17:19:27+01:00 Merge pull request haskell/haddock#1331 from phadej/more-explicit-data-list-imports Add import list to Data.List in Haddock.Interface.Create - - - - - f0cd629c by Hécate Moonlight at 2021-02-21T00:22:01+01:00 Merge pull request haskell/haddock#1311 from fendor/wip/add-targetUnitId-to-target Add UnitId to Target record - - - - - 674ef723 by Joachim Breitner at 2021-02-22T10:39:18+01:00 html-test: Always set language from ghc-9.2 on, the “default” langauge of GHC is expected to change more wildly. To prepare for that (and unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4853), this sets the language for all the test files to `Haskell2010`. This should insolate this test suite against changes to the default. Cherry-picked from https://github.com/haskell/haddock/pull/1341 - - - - - f072d623 by Hécate Moonlight at 2021-02-22T10:56:51+01:00 Merge pull request haskell/haddock#1342 from nomeata/joachim/haskell2010-in-tests-ghc-head html-test: Always set language - - - - - caebbfca by Hécate Moonlight at 2021-02-22T11:53:07+01:00 Clean-up of Interface and Interface.Create's imports and pragmata - - - - - f6caa89d by Hécate Moonlight at 2021-02-22T11:54:58+01:00 Merge pull request haskell/haddock#1345 from Kleidukos/head/fix-interface-imports [ghc-head] Clean-up of Interface and Interface.Create's imports and pragmata - - - - - 7395c9cb by Hécate Moonlight at 2021-02-22T18:44:57+01:00 Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 6e9fb5d5 by Hécate Moonlight at 2021-02-22T18:45:28+01:00 Merge pull request haskell/haddock#1348 from Kleidukos/head/explicit-imports-interface Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 9198b118 by Alan Zimmerman at 2021-02-22T20:04:24+00:00 Context becomes a Maybe in the GHC AST This prevents noLoc's appearing in the ParsedSource. Match the change in GHC. - - - - - 0af20f64 by Hécate Moonlight at 2021-02-23T12:36:12+01:00 Fix the call-site of guessTarget in Interface.hs Explicit the imports from GHC.HsToCore.Docs - - - - - b7886885 by Hécate Moonlight at 2021-02-23T12:37:54+01:00 Merge pull request haskell/haddock#1349 from Kleidukos/fix-interface-guesstarget-call Fix the call-site of guessTarget in Interface.hs - - - - - 9cf041ba by Sylvain Henry at 2021-02-24T11:08:20+01:00 Fix haddockHypsrcTest output in ghc-head - - - - - b194182a by Hécate Moonlight at 2021-02-24T11:12:36+01:00 Merge pull request haskell/haddock#1351 from hsyl20/wip/hsyl20/fix-head Fix haddockHypsrcTest output in ghc-head - - - - - 3ce8b375 by Shayne Fletcher at 2021-03-06T09:55:03-05:00 Add ITproj to parser - - - - - d2abf762 by Ben Gamari at 2021-03-06T19:26:49-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a0f6047d by Andrew Martin at 2021-03-07T11:25:23-05:00 Update for boxed rep - - - - - 6f63c99e by Ben Gamari at 2021-03-10T13:20:21-05:00 Update for "FastString: Use FastMutInt instead of IORef Int" - - - - - e13f01df by Luke Lau at 2021-03-10T15:38:40-05:00 Implement template-haskell's putDoc This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int - - - - - 89263d94 by Alan Zimmerman at 2021-03-15T17:15:26+00:00 Match changes in GHC AST for in-tree API Annotations As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418 - - - - - 28db1934 by Alan Zimmerman at 2021-03-15T20:40:09+00:00 Change some type family test results. It is not clear to me whether the original was printing incorrectly (since we did not have the TopLevel flag before now), or if this behaviour is expected. For the time being I am assuming the former. - - - - - 7c11c989 by Sylvain Henry at 2021-03-22T10:05:19+01:00 Fix after NameCache changes - - - - - addbde15 by Sylvain Henry at 2021-03-22T10:05:19+01:00 NameCache doesn't store a UniqSupply anymore - - - - - 15ec6cec by Ben Gamari at 2021-03-22T17:53:44-04:00 Bump GHC version to 9.2 - - - - - dbd6aa63 by Hécate Moonlight at 2021-03-24T14:28:36+01:00 Merge pull request haskell/haddock#1365 from hsyl20/wip/hsyl20/iface1 NameCache refactoring - - - - - 2d32da7e by Oleg Grenrus at 2021-03-27T01:12:00+02:00 Specialization of Data.List - - - - - 32b84fa6 by Fendor at 2021-03-27T10:50:17+01:00 Add UnitId to Target record This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time. - - - - - 54bf9f0e by Hécate Moonlight at 2021-03-28T14:08:35+02:00 Merge pull request haskell/haddock#1368 from fendor/target-unit-id-revert Add UnitId to Target record - - - - - 7dea168a by Alan Zimmerman at 2021-03-29T08:45:52+01:00 EPA : Rename ApiAnn to EpAnn - - - - - 72967f65 by Alfredo Di Napoli at 2021-03-29T09:47:01+02:00 pprError changed name in GHC - - - - - 4bc61035 by Alan Zimmerman at 2021-03-29T16:16:27-04:00 EPA : Rename ApiAnn to EpAnn - - - - - 108d031d by Ben Gamari at 2021-03-29T18:49:36-04:00 Merge commit '36418c4f70d7d2b179a77925b3ad5caedb08c9b5' into HEAD - - - - - 1444f700 by Ben Gamari at 2021-03-31T09:18:39-04:00 Merge pull request haskell/haddock#1370 from adinapoli/wip/adinapoli-diag-reason-severity Rename pprError to mkParserErr - - - - - d3087b79 by Ben Gamari at 2021-03-31T11:34:17-04:00 Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head - - - - - 170b79e9 by Ben Gamari at 2021-03-31T12:24:56-04:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - db0d6bae by Ben Gamari at 2021-04-10T09:34:35-04:00 Bump GHC version to 9.3 - - - - - a9f2c421 by Alan Zimmerman at 2021-04-19T18:26:46-04:00 Update for EPA changes in GHC (cherry picked from commit cafb48118f7c111020663776845897e225607b41) - - - - - 1ee4b7c7 by Sylvain Henry at 2021-05-11T10:00:06+02:00 Removal of HsVersions.h (#1388) * Update for EPA changes in GHC * Account for HsVersions.h removal Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 79e819e9 by Hécate Moonlight at 2021-05-11T10:14:47+02:00 Revert "Removal of HsVersions.h (#1388)" This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6. - - - - - 3dbd3f8b by Alan Zimmerman at 2021-05-11T10:15:17+02:00 Update for EPA changes in GHC - - - - - 2ce80c17 by Sylvain Henry at 2021-05-11T10:15:19+02:00 Account for HsVersions.h removal - - - - - 00e4c918 by Christiaan Baaij at 2021-05-13T08:21:56+02:00 Add Haddock support for the OPAQUE pragma (#1380) - - - - - 8f9049b2 by Hécate Moonlight at 2021-05-13T08:40:22+02:00 fixup! Use GHC 9.2 in CI runner - - - - - 27ddec38 by Alan Zimmerman at 2021-05-13T22:51:20+01:00 EPA: match changes from GHC T19834 - - - - - f8a1d714 by Felix Yan at 2021-05-14T17:10:04+02:00 Allow hspec 2.8 (#1389) All tests are passing. - - - - - df44453b by Divam Narula at 2021-05-20T15:42:42+02:00 Update ref, the variables got renamed. (#1391) This is due to ghc/ghc!5555 which caused a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used. - - - - - e46bfc87 by Alan Zimmerman at 2021-05-20T19:05:09+01:00 Remove Maybe from HsQualTy Match changes in GHC for haskell/haddock#19845 - - - - - 79bd7b62 by Shayne Fletcher at 2021-05-22T08:20:39+10:00 FieldOcc: rename extFieldOcc to foExt - - - - - 6ed68c74 by Ben Gamari at 2021-05-21T22:29:30-04:00 Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head - - - - - f9a02d34 by Alfredo Di Napoli at 2021-05-24T13:53:00+02:00 New Parser diagnostics interface - - - - - 392807d0 by Ben Gamari at 2021-05-24T09:57:40-04:00 Merge pull request haskell/haddock#1394 from adinapoli/wip/adinapoli-align-ps-messages Align Haddock to use the new Parser diagnostics interface - - - - - 33023cd8 by Ben Gamari at 2021-05-24T11:19:16-04:00 Revert "Add Haddock support for the OPAQUE pragma (#1380)" This reverts commit a1337c599ef7720b0482a25c55f11794112496dc. The GHC patch associated with this change is not yet ready to be merged. - - - - - 8c005af7 by Ben Simms at 2021-05-28T07:56:20+02:00 CI configuration for ghc-head (#1395) - - - - - 1e947612 by Hécate Moonlight at 2021-05-28T12:27:35+02:00 Use GHC 9.2 in CI runner (#1378) - - - - - e6fa10ab by CGenie at 2021-05-31T09:02:13+02:00 Add page about common errors (#1396) * Update index.rst Common errors page * Create common-errors.rst * Update common-errors.rst * Use GHC 9.2 in CI runner (#1378) * [haddock-api] remove .hspec-failures Co-authored-by: Hécate Moonlight <Kleidukos at users.noreply.github.com> - - - - - abc72a8d by Sylvain Henry at 2021-06-01T10:02:06+02:00 Adapt Haddock to Logger and Parser changes (#1399) - - - - - 91373656 by Zubin Duggal at 2021-06-01T20:45:10+02:00 Update haddockHypSrc tests since we now compute slighly more type info (#1397) - - - - - ed712822 by Marcin Szamotulski at 2021-06-02T08:54:33+02:00 Added myself to contributors - - - - - 49fdbcb7 by Marcin Szamotulski at 2021-06-02T08:57:24+02:00 Document multi component support - - - - - 9ddc8d7d by Hécate Moonlight at 2021-06-02T09:35:55+02:00 Merge pull request haskell/haddock#1379 from coot/coot/document-multi-component-support Document multi component support - - - - - 585b5c5e by Ben Simms at 2021-06-02T19:46:54+02:00 Update CONTRIBUTING.md (#1402) - - - - - 1df4a605 by Ben Simms at 2021-06-02T19:47:14+02:00 Update CONTRIBUTING.md (#1403) - - - - - 58ea43d2 by sheaf at 2021-06-02T22:09:06+02:00 Update Haddock Bug873 to account for renaming - - - - - c5d0ab23 by Vladislav Zavialov at 2021-06-10T13:35:42+03:00 HsToken in FunTy, RecConGADT - - - - - 1ae2f40c by Hécate Moonlight at 2021-06-11T11:19:09+02:00 Update the CI badges - - - - - 6fdc4de2 by Sylvain Henry at 2021-06-28T19:21:17+02:00 Fix mkParserOpts (#1411) - - - - - 18201670 by Alfredo Di Napoli at 2021-07-05T07:55:12+02:00 Rename getErrorMessages Lexer import This commit renames the Lexer import in `Hyperlinker.Parser` from `getErrorMessages` to `getPsErrorMessages` to eliminate the ambiguity with the `getErrorMessages` function defined in `GHC.Types.Error`. - - - - - 23173ca3 by Ben Gamari at 2021-07-07T11:31:44-04:00 Merge pull request haskell/haddock#1413 from adinapoli/wip/adinapoli-issue-19920 Rename getErrorMessages Lexer import - - - - - b3dc4ed8 by Alan Zimmerman at 2021-07-28T22:30:59+01:00 EPA: match changes from GHC T19834 (cherry picked from commit 2fec1b44e0ee7e263286709aa528b4ecb99ac6c2) - - - - - 5f177278 by Ben Gamari at 2021-08-06T01:17:37-04:00 Merge commit '2a966c8ca37' into HEAD - - - - - cdd81d08 by Marcin Szamotulski at 2021-08-08T17:19:06+02:00 coot/multiple packages (ghc-9.2) (#1418) - - - - - be0d71f1 by Marcin Szamotulski at 2021-08-16T08:46:03+02:00 coot/multiple package (ghc-head) (#1419) * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".". - - - - - 3b09dbdf by Hécate Moonlight at 2021-10-07T23:26:03+02:00 Update GHC 9.2 to latest pre-release in CI - - - - - 7ac55417 by Zubin Duggal at 2021-10-11T12:10:19+02:00 Enable Haddock tests in GHC windows CI (#1428) * testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC - - - - - 1cb81f25 by Andrew Lelechenko at 2021-10-12T15:23:19+02:00 haddock-library does not depend on bytestring or transformers (#1426) - - - - - a890b9aa by sheaf at 2021-10-15T22:19:42+02:00 update haddockHypsrcTest for GHC MR !6705 (#1430) - - - - - 42a55c6c by Sylvain Henry at 2021-10-15T22:20:10+02:00 Fix after PkgQual refactoring (#1429) - - - - - 91659238 by Alan Zimmerman at 2021-10-28T18:57:10+01:00 Update for changes in GHC for branch wip/az/no-srcspan-anno-instances - - - - - acf23e60 by Vladislav Zavialov at 2021-11-05T02:09:47+03:00 Do not use forall as an identifier See GHC ticket haskell/haddock#20609 - - - - - c565db0e by Krzysztof Gogolewski at 2021-11-27T02:42:35+01:00 Update after NoExtCon -> DataConCantHappen rename - - - - - b5f55590 by Artem Pelenitsyn at 2021-11-27T11:14:17+01:00 fix CI for 9.2 (#1436) - - - - - 25cd621e by Matthew Pickering at 2021-12-02T11:46:54+00:00 Update html-test for Data.List revert - - - - - 1d5ff85f by malteneuss at 2021-12-15T07:56:55+01:00 Add hint about inline link issue (#1444) - - - - - 791fde81 by Sylvain Henry at 2021-12-16T09:29:51+01:00 Bump ghc-head (#1445) * Update after NoExtCon -> DataConCantHappen rename * Update html-test for Data.List revert * Fix for new Plugins datatype Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 44236317 by Sylvain Henry at 2021-12-17T09:39:00+01:00 Fix for new Plugins datatype - - - - - 80ada0fa by Hécate Moonlight at 2021-12-17T17:28:48+01:00 Remove ghc-head workflow (#1446) Contributions of GHC glue code are now done on the GHC gitlab, not in the GitHub repo anymore. - - - - - 49e171cd by Matthew Pickering at 2021-12-28T09:47:09+00:00 Remove use of ExtendedModSummary - - - - - 0e91b5ea by askeblad at 2022-01-04T09:18:35+01:00 update URLs - - - - - 9f13c212 by Hécate Moonlight at 2022-02-25T10:19:46+01:00 Fix solver for GHC 9.2 - - - - - 386751a1 by Meng Weng Wong at 2022-02-25T19:19:11+01:00 IDoc link has bitrotted; replaced with web.archive.org cache. (#1454) - - - - - d877cbe6 by Hécate Moonlight at 2022-02-25T19:21:58+01:00 Fix haddock user guide (#1456) - - - - - cc47f036 by Andrew Lelechenko at 2022-03-04T17:29:36+01:00 Allow text-2.0 in haddock-library (#1459) - - - - - 7b3685a3 by malteneuss at 2022-03-07T19:27:24+01:00 Add multi-line style hint to style section (#1460) - - - - - c51088b8 by John Ericson at 2022-03-11T16:46:26+01:00 Fix CollectPass instance to match TTG refactor Companion to GHC !7614 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7614) - - - - - b882195b by Vladislav Zavialov at 2022-03-14T20:32:30+01:00 Link to (~) - - - - - 877349b8 by Christiaan Baaij at 2022-03-16T09:20:43+01:00 Add Haddock support for the OPAQUE pragma - - - - - 0ea22721 by askeblad at 2022-03-16T09:44:27+01:00 typos (#1464) - - - - - a6d13da1 by Matthew Pickering at 2022-03-22T13:41:17+00:00 Minimum changes needed for compilation with hi-haddock With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC. - - - - - e7ac9129 by Matthew Pickering at 2022-03-22T21:17:50+00:00 Update test output - - - - - 6d916214 by Matthew Pickering at 2022-03-24T15:06:26+00:00 Merge branch 'wip/opaque_pragma' into 'ghc-head' Add Haddock support for the OPAQUE pragma See merge request ghc/haddock!2 - - - - - 42208183 by Steve Hart at 2022-03-25T20:43:50+01:00 Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. - - - - - 9676fd79 by Steve Hart at 2022-03-25T21:33:34+01:00 Make links in Synopsis functional again (#1458) Commit e41c1cbe9f0476997eac7b4a3f17cbc6b2262faf added a call to e.preventDefault() when handling click events that reach a toggle element. This prevents the browser from following hyperlinks within the Synopsis section when they are clicked by a user. This commit restores functioning hyperlinks within the Synopsis section by removing the call to e.preventDefault(), as it does not appear to be necessary, and removing it increases the flexibility of the details-helper code. - - - - - d1edd637 by sheaf at 2022-04-01T12:02:02+02:00 Keep track of promotion ticks in HsOpTy Keeping track of promotion ticks in HsOpTy allows us to properly pretty-print promoted constructors such as lists. - - - - - 9dcb2dfc by Jakob Brünker at 2022-04-01T15:46:22+00:00 Add support for \cases See merge request ghc/ghc!7873 - - - - - b0412ee5 by askeblad at 2022-04-06T17:47:57+02:00 spelling errors (#1471) - - - - - 6b18829b by Vladislav Zavialov at 2022-04-06T18:53:58+02:00 Rename [] to List - - - - - 2d046691 by Vladislav Zavialov at 2022-04-07T20:25:54+03:00 HsToken ConDeclGADT con_dcolon - - - - - 90b43da4 by Steve Hart at 2022-04-12T13:29:46+02:00 Parse Markdown links at beginning of line within a paragraph (#1470) * Catch Markdown links at beginning of line within paragraph Per Issue haskell/haddock#774, Markdown links were being parsed as ordinary text when they occurred at the beginning of a line other than the first line of the paragraph. This occurred because the parser was not interpreting a left square bracket as a special character that could delimit special markup. A space character was considered a special character, so, if a space occurred at the beginning of the new line, then the parser would interpret the space by itself and then continue parsing, thereby catching the Markdown link. '\n' was not treated as a special character, so the parser did not catch a Markdown link that may have followed. Note that this will allow for Markdown links that are not surrounded by spaces. For example, the following text includes a Markdown link that will be parsed: Hello, world[label](url) This is consistent with how the parser handles other types of markup. * Remove obsolete documentation hint Commit 6b9aeafddf20efc65d3725c16e3fc43a20aac343 should eliminate the need for the workaround suggested in the documentation. - - - - - 5b08312d by Hécate Moonlight at 2022-04-12T13:36:38+02:00 Force ghc-9.2 in the cabal.project - - - - - 0d0ea349 by dependabot[bot] at 2022-04-12T13:57:41+02:00 Bump path-parse from 1.0.5 to 1.0.7 in /haddock-api/resources/html (#1469) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 2b9fc65e by dependabot[bot] at 2022-04-12T13:57:54+02:00 Bump copy-props from 2.0.4 to 2.0.5 in /haddock-api/resources/html (#1468) Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - ea98a6fb by Ben Gamari at 2022-04-23T22:54:37-04:00 Update for GHC 9.4 - - - - - 9e11864f by Ben Gamari at 2022-04-25T16:24:31-04:00 Merge remote-tracking branch 'upstream/ghc-9.2' into ghc-head - - - - - f83cc506 by Ben Gamari at 2022-04-25T17:00:25-04:00 Bump ghc version to 9.5 - - - - - e01c2e7d by Ben Gamari at 2022-04-28T16:19:04-04:00 Revert "Bump ghc-head (#1445)" This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2. This should not have been merged. - - - - - a2b5ee8c by Ben Gamari at 2022-04-28T16:19:24-04:00 Merge commit '2627a86c' into ghc-head - - - - - 0c6fe4f9 by Ben Gamari at 2022-04-29T10:05:54-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-9.4 - - - - - b6e5cb0a by Ben Gamari at 2022-04-29T11:46:06-04:00 Revert "HsToken ConDeclGADT con_dcolon" This reverts commit 24208496649a02d5f87373052c430ea4a97842c5. - - - - - 15a62888 by Ben Gamari at 2022-04-29T15:12:55-04:00 Bump base upper bound - - - - - 165b9031 by Ben Gamari at 2022-04-29T23:58:38-04:00 Update test output - - - - - e0c3e5da by Phil de Joux at 2022-05-02T14:46:38+02:00 Add hlint action .hlint.yaml with ignores & CPP. (#1475) - - - - - ead1158d by Raphael Das Gupta at 2022-05-02T14:46:48+02:00 fix grammar in docs: "can the" → "can be" (#1477) - - - - - cff97944 by Ben Gamari at 2022-05-02T18:38:56-04:00 Allow base-4.17 - - - - - e4ecb201 by Phil de Joux at 2022-05-03T13:14:55+02:00 Remove unused imports that GHC warned about. (#1480) - - - - - 222890b1 by Phil de Joux at 2022-05-03T13:15:46+02:00 Follow hlint suggestion to remove redundant bang. (#1479) - - - - - 058b671f by Phil de Joux at 2022-05-03T13:34:04+02:00 Follow hlint, remove language pragmas in libs. (#1478) - - - - - 0a645049 by Ben Simms at 2022-05-03T14:19:24+02:00 Keep track of ordered list indexes and render them (#1407) * Keep track of ordered list indexes and render them * Rename some identifiers to clarify - - - - - f0433304 by Norman Ramsey at 2022-05-04T15:13:34-04:00 update for changes in GHC API - - - - - 3740cf71 by Emily Martins at 2022-05-06T18:23:48+02:00 Add link to the readthedocs in cabal description to show on hackage. (cherry picked from commit 52e2d40d47295c02d3181aac0c53028e730f1e3b) - - - - - 5d754f1e by Hécate Moonlight at 2022-05-06T18:44:57+02:00 remove Bug873 - - - - - 968fc267 by Hécate Moonlight at 2022-05-06T18:48:28+02:00 Ignore "Use second" HLint suggestion. It increases laziness. - - - - - 02d14e97 by Jade Lovelace at 2022-05-07T17:42:08+02:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` - - - - - b22b87ed by Artem Pelenitsyn at 2022-05-08T16:19:47+02:00 fix parsing trailing quotes in backticked identifiers (#1408) (#1483) - - - - - 80ae107b by Alex Biehl at 2022-05-08T16:37:16+02:00 Fix "Defined by not used" error (cherry picked from commit 6e02a620a26c3a44f98675dd1b93b08070c36c0a) - - - - - 4c838e84 by Hécate Moonlight at 2022-05-08T16:37:16+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - fc9827b4 by Hécate Moonlight at 2022-05-08T16:40:40+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - b153b555 by Xia Li-yao at 2022-05-20T17:52:42+02:00 Hide synopsis from search when hidden (#1486) Fix haskell/haddock#1451 - - - - - f3e38b85 by Marcin Szamotulski at 2022-05-21T23:32:31+02:00 Allow to hide interfaces when rendering multiple components (#1487) This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package. - - - - - f942863b by Marcin Szamotulski at 2022-05-24T08:29:59+02:00 Check if doc-index.json exists before reading it (#1488) - - - - - 31e92982 by Marcin Szamotulski at 2022-05-25T16:22:13+02:00 Version bump 2.26.1 (#1489) * Version bump 2.26.1 We extended format accepted by `--read-interface` option, which requires updating the minor version. * Update documentation of --read-interface option - - - - - 7cc873e0 by sheaf at 2022-05-25T16:42:31+02:00 Updated HaddockHypsrcTest output for record update changes (MR !7981) - - - - - cd196942 by Marcin Szamotulski at 2022-05-25T20:28:47+02:00 Use visibility to decide which interfaces are included in quickjump (#1490) This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision. - - - - - 00c713c5 by Hécate Moonlight at 2022-05-26T17:09:15+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 2f3039f1 by Hécate Moonlight at 2022-05-26T17:10:59+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 63a5650c by romes at 2022-05-31T12:43:22+01:00 TTG: Match new GHC AST - - - - - dd7d1617 by romes at 2022-06-02T16:11:00+01:00 Update for IE changes in !8228 - - - - - c23aaab7 by cydparser at 2022-06-06T08:48:14+02:00 Fix and improve CI (#1495) * Pin GHC version before creating the freeze file * Use newest action versions * Improve caching * Avoid unnecessarily reinstalling GHC * Use GHC 9.2.2 for CI Co-authored-by: Cyd Wise <cwise at tripshot.com> - - - - - c156fa77 by Hécate Moonlight at 2022-06-06T11:59:35+02:00 Add Mergify configuration (#1496) - - - - - 2dba4188 by Hécate Moonlight at 2022-06-06T16:12:50+02:00 Bump haddock's version in cabal file to 2.26.1 (#1497) - - - - - d7d4b8b9 by Marcin Szamotulski at 2022-06-07T06:09:40+00:00 Render module tree per package in the content page (#1492) * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version. - - - - - 77765665 by Mike Pilgrem at 2022-06-12T21:57:19+01:00 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - b0e079b0 by mergify[bot] at 2022-06-13T11:49:37+00:00 Merge pull request haskell/haddock#1108 from mpilgrem/fix783 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - 6c0292b1 by Hécate Moonlight at 2022-06-21T17:21:08+02:00 Update the contribution guide - - - - - e413b9fa by dependabot[bot] at 2022-06-21T23:38:19+02:00 Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 29d0ef70 by romes at 2022-07-06T11:29:39+02:00 TTG: AST Updates for !8308 - - - - - 1bae7c87 by Alan Zimmerman at 2022-07-06T22:50:43+01:00 Match GHC changes for T21805 This brings in a newtype for FieldLabelString - - - - - ad8f3e15 by Luite Stegeman at 2022-07-16T07:20:36-04:00 Change GHCi bytecode return convention for unlifted datatypes. This changes the bytecode return convention for unlifted algebraic datatypes to be the same as for lifted types, i.e. ENTER/PUSH_ALTS instead of RETURN_UNLIFTED/PUSH_ALTS_UNLIFTED Fixes #20849 - - - - - 5434d1a3 by Colten Webb at 2022-07-16T07:21:15-04:00 Compute record-dot-syntax types Ensures type information for record-dot-syntax is included in HieASTs. See #21797 - - - - - 89d169ec by Colten Webb at 2022-07-16T07:21:15-04:00 Add record-dot-syntax test - - - - - 4beb9f3c by Ben Gamari at 2022-07-16T07:21:51-04:00 Document RuntimeRep polymorphism limitations of catch#, et al As noted in #21868, several primops accepting continuations producing RuntimeRep-polymorphic results aren't nearly as polymorphic as their types suggest. Document this limitation and adapt the `UnliftedWeakPtr` test to avoid breaking this limitation in `keepAlive#`. - - - - - 4ef1c65d by Ben Gamari at 2022-07-16T07:21:51-04:00 Make keepAlive# out-of-line This is a naive approach to fixing the unsoundness noticed in #21708. Specifically, we remove the lowering of `keepAlive#` via CorePrep and instead turn it into an out-of-line primop. This is simple, inefficient (since the continuation must now be heap allocated), but good enough for 9.4.1. We will revisit this (particiularly via #16098) in a future release. Metric Increase: T4978 T7257 T9203 - - - - - 1bbff35d by Greg Steuck at 2022-07-16T07:22:29-04:00 Suppress extra output from configure check for c++ libraries - - - - - 3acbd7ad by Ben Gamari at 2022-07-16T07:23:04-04:00 rel-notes: Drop mention of #21745 fix Since we have backported the fix to 9.4.1. - - - - - b27c2774 by Dominik Peteler at 2022-07-16T07:23:43-04:00 Align the behaviour of `dopt` and `log_dopt` Before the behaviour of `dopt` and `logHasDumpFlag` (and the underlying function `log_dopt`) were different as the latter did not take the verbosity level into account. This led to problems during the refactoring as we cannot simply replace calls to `dopt` with calls to `logHasDumpFlag`. In addition to that a subtle bug in the GHC module was fixed: `setSessionDynFlags` did not update the logger and as a consequence the verbosity value of the logger was not set appropriately. Fixes #21861 - - - - - 28347d71 by Douglas Wilson at 2022-07-16T13:25:06-04:00 rts: forkOn context switches the target capability Fixes #21824 - - - - - f1c44991 by Ben Gamari at 2022-07-16T13:25:41-04:00 cmm: Eliminate orphan Outputable instances Here we reorganize `GHC.Cmm` to eliminate the orphan `Outputable` and `OutputableP` instances for the Cmm AST. This makes it significantly easier to use the Cmm pretty-printers in tracing output without incurring module import cycles. - - - - - f2e5e763 by Ben Gamari at 2022-07-16T13:25:41-04:00 cmm: Move toBlockList to GHC.Cmm - - - - - fa092745 by Ben Gamari at 2022-07-16T13:25:41-04:00 compiler: Add haddock sections to GHC.Utils.Panic - - - - - 097759f9 by Ben Gamari at 2022-07-16T13:26:17-04:00 configure: Don't override Windows CXXFLAGS At some point we used the clang distribution from msys2's `MINGW64` environment for our Windows toolchain. This defaulted to using libgcc and libstdc++ for its runtime library. However, we found for a variety of reasons that compiler-rt, libunwind, and libc++ were more reliable, consequently we explicitly overrode the CXXFLAGS to use these. However, since then we have switched to use the `CLANG64` packaging, which default to these already. Consequently we can drop these arguments, silencing some redundant argument warnings from clang. Fixes #21669. - - - - - 6fe8b988 by Phil de Joux at 2022-07-16T20:54:26+00:00 Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. - - - - - e38a2684 by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/Elf: Check that there are no NULL ctors - - - - - 616365b0 by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/Elf: Introduce support for invoking finalizers on unload Addresses #20494. - - - - - cdd3be20 by Ben Gamari at 2022-07-16T23:50:36-04:00 testsuite: Add T20494 - - - - - 03c69d8d by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/PEi386: Rename finit field to fini fini is short for "finalizer", which does not contain a "t". - - - - - 033580bc by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/PEi386: Refactor handling of oc->info Previously we would free oc->info after running initializers. However, we can't do this is we want to also run finalizers. Moreover, freeing oc->info so early was wrong for another reason: we will need it in order to unregister the exception tables (see the call to `RtlDeleteFunctionTable`). In service of #20494. - - - - - f17912e4 by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/PEi386: Add finalization support This implements #20494 for the PEi386 linker. Happily, this also appears to fix `T9405`, resolving #21361. - - - - - 2cd75550 by Ben Gamari at 2022-07-16T23:50:36-04:00 Loader: Implement gnu-style -l:$path syntax Gnu ld allows `-l` to be passed an absolute file path, signalled by a `:` prefix. Implement this in the GHC's loader search logic. - - - - - 5781a360 by Ben Gamari at 2022-07-16T23:50:36-04:00 Statically-link against libc++ on Windows Unfortunately on Windows we have no RPATH-like facility, making dynamic linking extremely fragile. Since we cannot assume that the user will add their GHC installation to `$PATH` (and therefore their DLL search path) we cannot assume that the loader will be able to locate our `libc++.dll`. To avoid this, we instead statically link against `libc++.a` on Windows. Fixes #21435. - - - - - 8e2e883b by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/PEi386: Ensure that all .ctors/.dtors sections are run It turns out that PE objects may have multiple `.ctors`/`.dtors` sections but the RTS linker had assumed that there was only one. Fix this. Fixes #21618. - - - - - fba04387 by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/PEi386: Respect dtor/ctor priority Previously we would run constructors and destructors in arbitrary order despite explicit priorities. Fixes #21847. - - - - - 1001952f by Ben Gamari at 2022-07-16T23:50:36-04:00 testsuite: Add test for #21618 and #21847 - - - - - 6f3816af by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/PEi386: Fix exception unwind unregistration RtlDeleteFunctionTable expects a pointer to the .pdata section yet we passed it the .xdata section. Happily, this fixes #21354. - - - - - d9bff44c by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/MachO: Drop dead code - - - - - d161e6bc by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/MachO: Use section flags to identify initializers - - - - - fbb17110 by Ben Gamari at 2022-07-16T23:50:36-04:00 rts/linker/MachO: Introduce finalizer support - - - - - 5b0ed8a8 by Ben Gamari at 2022-07-16T23:50:37-04:00 testsuite: Use system-cxx-std-lib instead of config.stdcxx_impl - - - - - 6c476e1a by Ben Gamari at 2022-07-16T23:50:37-04:00 rts/linker/Elf: Work around GCC 6 init/fini behavior It appears that GCC 6t (at least on i386) fails to give init_array/fini_array sections the correct SHT_INIT_ARRAY/SHT_FINI_ARRAY section types, instead marking them as SHT_PROGBITS. This caused T20494 to fail on Debian. - - - - - 5f8203b8 by Ben Gamari at 2022-07-16T23:50:37-04:00 testsuite: Mark T13366Cxx as unbroken on Darwin - - - - - 1fd2f851 by Ben Gamari at 2022-07-16T23:50:37-04:00 rts/linker: Fix resolution of __dso_handle on Darwin Darwin expects a leading underscore. - - - - - a2dc00f3 by Ben Gamari at 2022-07-16T23:50:37-04:00 rts/linker: Clean up section kinds - - - - - aeb1a7c3 by Ben Gamari at 2022-07-16T23:50:37-04:00 rts/linker: Ensure that __cxa_finalize is called on code unload - - - - - 028f081e by Ben Gamari at 2022-07-16T23:51:12-04:00 testsuite: Fix T11829 on Centos 7 It appears that Centos 7 has a more strict C++ compiler than most distributions since std::runtime_error is defined in <stdexcept> rather than <exception>. In T11829 we mistakenly imported the latter. - - - - - a10584e8 by Ben Gamari at 2022-07-17T22:30:32-04:00 hadrian: Rename documentation directories for consistency with make * Rename `docs` to `doc` * Place pdf documentation in `doc/` instead of `doc/pdfs/` Fixes #21164. - - - - - b27c5947 by Anselm Schüler at 2022-07-17T22:31:11-04:00 Fix incorrect proof of applyWhen’s properties - - - - - eb031a5b by Matthew Pickering at 2022-07-18T08:04:47-04:00 hadrian: Add multi:<pkg> and multi targets for starting a multi-repl This patch adds support to hadrian for starting a multi-repl containing all the packages which stage0 can build. In particular, there is the new user-facing command: ``` ./hadrian/ghci-multi ``` which when executed will start a multi-repl containing the `ghc` package and all it's dependencies. This is implemented by two new hadrian targets: ``` ./hadrian/build multi:<pkg> ``` Construct the arguments for a multi-repl session where the top-level package is <pkg>. For example, `./hadrian/ghci-multi` is implemented using `multi:ghc` target. There is also the `multi` command which constructs a repl for everything in stage0 which we can build. - - - - - 19e7cac9 by Eric Lindblad at 2022-07-18T08:05:27-04:00 changelog typo - - - - - af6731a4 by Eric Lindblad at 2022-07-18T08:05:27-04:00 typos - - - - - 415468fe by Simon Peyton Jones at 2022-07-18T16:36:54-04:00 Refactor SpecConstr to use treat bindings uniformly This patch, provoked by #21457, simplifies SpecConstr by treating top-level and nested bindings uniformly (see the new scBind). * Eliminates the mysterious scTopBindEnv * Refactors scBind to handle top-level and nested definitions uniformly. * But, for now at least, continues the status quo of not doing SpecConstr for top-level non-recursive bindings. (In contrast we do specialise nested non-recursive bindings, although the original paper did not; see Note [Local let bindings].) I tried the effect of specialising top-level non-recursive bindings (which is now dead easy to switch on, unlike before) but found some regressions, so I backed off. See !8135. It's a pure refactoring. I think it'll do a better job in a few cases, but there is no regression test. - - - - - d4d3fe6e by Andreas Klebinger at 2022-07-18T16:37:29-04:00 Rule matching: Don't compute the FVs if we don't look at them. - - - - - 5f907371 by Simon Peyton Jones at 2022-07-18T16:38:04-04:00 White space only in FamInstEnv - - - - - ae3b3b62 by Simon Peyton Jones at 2022-07-18T16:38:04-04:00 Make transferPolyIdInfo work for CPR I don't know why this hasn't bitten us before, but it was plain wrong. - - - - - 9bdfdd98 by Simon Peyton Jones at 2022-07-18T16:38:04-04:00 Inline mapAccumLM This function is called in inner loops in the compiler, and it's overloaded and higher order. Best just to inline it. This popped up when I was looking at something else. I think perhaps GHC is delicately balanced on the cusp of inlining this automatically. - - - - - d0b806ff by Simon Peyton Jones at 2022-07-18T16:38:04-04:00 Make SetLevels honour floatConsts This fix, in the definition of profitableFloat, is just for consistency. `floatConsts` should do what it says! I don't think it'll affect anything much, though. - - - - - d1c25a48 by Simon Peyton Jones at 2022-07-18T16:38:04-04:00 Refactor wantToUnboxArg a bit * Rename GHC.Core.Opt.WorkWrap.Utils.wantToUnboxArg to canUnboxArg and similarly wantToUnboxResult to canUnboxResult. * Add GHC.Core.Opt.DmdAnal.wantToUnboxArg as a wrapper for the (new) GHC.Core.Opt.WorkWrap.Utils.canUnboxArg, avoiding some yukky duplication. I decided it was clearer to give it a new data type for its return type, because I nedeed the FD_RecBox case which was not otherwise readiliy expressible. * Add dcpc_args to WorkWrap.Utils.DataConPatContext for the payload * Get rid of the Unlift constructor of UnboxingDecision, eliminate two panics, and two arguments to canUnboxArg (new name). Much nicer now. - - - - - 6d8a715e by Teo Camarasu at 2022-07-18T16:38:44-04:00 Allow running memInventory when the concurrent nonmoving gc is enabled If the nonmoving gc is enabled and we are using a threaded RTS, we now try to grab the collector mutex to avoid memInventory and the collection racing. Before memInventory was disabled. - - - - - aa75bbde by Ben Gamari at 2022-07-18T16:39:20-04:00 gitignore: don't ignore all aclocal.m4 files While GHC's own aclocal.m4 is generated by the aclocal tool, other packages' aclocal.m4 are committed in the repository. Previously `.gitignore` included an entry which covered *any* file named `aclocal.m4`, which lead to quite some confusion (e.g. see #21740). Fix this by modifying GHC's `.gitignore` to only cover GHC's own `aclocal.m4`. - - - - - 4b98c5ce by Boris Lykah at 2022-07-19T02:34:12-04:00 Add mapAccumM, forAccumM to Data.Traversable Approved by Core Libraries Committee in https://github.com/haskell/core-libraries-committee/issues/65#issuecomment-1186275433 - - - - - bd92182c by Ben Gamari at 2022-07-19T02:34:47-04:00 configure: Use AC_PATH_TOOL to detect tools Previously we used AC_PATH_PROG which, as noted by #21601, does not look for tools with a target prefix, breaking cross-compilation. Fixes #21601. - - - - - 48fb43af by Phil de Joux at 2022-07-19T09:32:55+02:00 Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. - - - - - e8c07aa9 by Matthew Pickering at 2022-07-19T10:07:53-04:00 driver: Fix implementation of -S We were failing to stop before running the assembler so the object file was also created. Fixes #21869 - - - - - e2f0094c by Ben Gamari at 2022-07-19T10:08:28-04:00 rts/ProfHeap: Ensure new Censuses are zeroed When growing the Census array ProfHeap previously neglected to zero the new part of the array. Consequently `freeEra` would attempt to free random words that often looked suspiciously like pointers. Fixes #21880. - - - - - 81d65f7f by sheaf at 2022-07-21T15:37:22+02:00 Make withDict opaque to the specialiser As pointed out in #21575, it is not sufficient to set withDict to inline after the typeclass specialiser, because we might inline withDict in one module and then import it in another, and we run into the same problem. This means we could still end up with incorrect runtime results because the typeclass specialiser would assume that distinct typeclass evidence terms at the same type are equal, when this is not necessarily the case when using withDict. Instead, this patch introduces a new magicId, 'nospec', which is only inlined in CorePrep. We make use of it in the definition of withDict to ensure that the typeclass specialiser does not common up distinct typeclass evidence terms. Fixes #21575 - - - - - 9a3e1f31 by Dominik Peteler at 2022-07-22T08:18:40-04:00 Refactored Simplify pass * Removed references to driver from GHC.Core.LateCC, GHC.Core.Simplify namespace and GHC.Core.Opt.Stats. Also removed services from configuration records. * Renamed GHC.Core.Opt.Simplify to GHC.Core.Opt.Simplify.Iteration. * Inlined `simplifyPgm` and renamed `simplifyPgmIO` to `simplifyPgm` and moved the Simplify driver to GHC.Core.Opt.Simplify. * Moved `SimplMode` and `FloatEnable` to GHC.Core.Opt.Simplify.Env. * Added a configuration record `TopEnvConfig` for the `SimplTopEnv` environment in GHC.Core.Opt.Simplify.Monad. * Added `SimplifyOpts` and `SimplifyExprOpts`. Provide initialization functions for those in a new module GHC.Driver.Config.Core.Opt.Simplify. Also added initialization functions for `SimplMode` to that module. * Moved `CoreToDo` and friends to a new module GHC.Core.Pipeline.Types and the counting types and functions (`SimplCount` and `Tick`) to new module GHC.Core.Opt.Stats. * Added getter functions for the fields of `SimplMode`. The pedantic bottoms option and the platform are retrieved from the ArityOpts and RuleOpts and the getter functions allow us to retrieve values from `SpecEnv` without the knowledge where the data is stored exactly. * Moved the coercion optimization options from the top environment to `SimplMode`. This way the values left in the top environment are those dealing with monadic functionality, namely logging, IO related stuff and counting. Added a note "The environments of the Simplify pass". * Removed `CoreToDo` from GHC.Core.Lint and GHC.CoreToStg.Prep and got rid of `CoreDoSimplify`. Pass `SimplifyOpts` in the `CoreToDo` type instead. * Prep work before removing `InteractiveContext` from `HscEnv`. - - - - - 2c5991cc by Simon Peyton Jones at 2022-07-22T08:18:41-04:00 Make the specialiser deal better with specialised methods This patch fixes #21848, by being more careful to update unfoldings in the type-class specialiser. See the new Note [Update unfolding after specialisation] Now that we are being so much more careful about unfoldings, it turned out that I could dispense with se_interesting, and all its tricky corners. Hooray. This fixes #21368. - - - - - ae166635 by Ben Gamari at 2022-07-22T08:18:41-04:00 ghc-boot: Clean up UTF-8 codecs In preparation for moving the UTF-8 codecs into `base`: * Move them to GHC.Utils.Encoding.UTF8 * Make names more consistent * Add some Haddocks - - - - - e8ac91db by Ben Gamari at 2022-07-22T08:18:41-04:00 base: Introduce GHC.Encoding.UTF8 Here we copy a subset of the UTF-8 implementation living in `ghc-boot` into `base`, with the intent of dropping the former in the future. For this reason, the `ghc-boot` copy is now CPP-guarded on `MIN_VERSION_base(4,18,0)`. Naturally, we can't copy *all* of the functions defined by `ghc-boot` as some depend upon `bytestring`; we rather just copy those which only depend upon `base` and `ghc-prim`. Further consolidation? ---------------------- Currently GHC ships with at least five UTF-8 implementations: * the implementation used by GHC in `ghc-boot:GHC.Utils.Encoding`; this can be used at a number of types including `Addr#`, `ByteArray#`, `ForeignPtr`, `Ptr`, `ShortByteString`, and `ByteString`. Most of this can be removed in GHC 9.6+2, when the copies in `base` will become available to `ghc-boot`. * the copy of the `ghc-boot` definition now exported by `base:GHC.Encoding.UTF8`. This can be used at `Addr#`, `Ptr`, `ByteArray#`, and `ForeignPtr` * the decoder used by `unpackCStringUtf8#` in `ghc-prim:GHC.CString`; this is specialised at `Addr#`. * the codec used by the IO subsystem in `base:GHC.IO.Encoding.UTF8`; this is specialised at `Addr#` but, unlike the above, supports recovery in the presence of partial codepoints (since in IO contexts codepoints may be broken across buffers) * the implementation provided by the `text` library This does seem a tad silly. On the other hand, these implementations *do* materially differ from one another (e.g. in the types they support, the detail in errors they can report, and the ability to recover from partial codepoints). Consequently, it's quite unclear that further consolidate would be worthwhile. - - - - - f9ad8025 by Ben Gamari at 2022-07-22T08:18:41-04:00 Add a Note summarising GHC's UTF-8 implementations GHC has a somewhat dizzying array of UTF-8 implementations. This note describes why this is the case. - - - - - 72dfad3d by Ben Gamari at 2022-07-22T08:18:42-04:00 upload_ghc_libs: Fix path to documentation The documentation was moved in a10584e8df9b346cecf700b23187044742ce0b35 but this one occurrence was note updated. Finally closes #21164. - - - - - a8b150e7 by sheaf at 2022-07-22T08:18:44-04:00 Add test for #21871 This adds a test for #21871, which was fixed by the No Skolem Info rework (MR !7105). Fixes #21871 - - - - - 6379f942 by sheaf at 2022-07-22T08:18:46-04:00 Add test for #21360 The way record updates are typechecked/desugared changed in MR !7981. Because we desugar in the typechecker to a simple case expression, the pattern match checker becomes able to spot the long-distance information and avoid emitting an incorrect pattern match warning. Fixes #21360 - - - - - ce0cd12c by sheaf at 2022-07-22T08:18:47-04:00 Hadrian: don't try to build "unix" on Windows - - - - - c1cf1fa7 by Phil de Joux at 2022-07-24T13:45:59+02:00 Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. - - - - - dc27e15a by Simon Peyton Jones at 2022-07-25T09:42:01-04:00 Implement DeepSubsumption This MR adds the language extension -XDeepSubsumption, implementing GHC proposal #511. This change mitigates the impact of GHC proposal The changes are highly localised, by design. See Note [Deep subsumption] in GHC.Tc.Utils.Unify. The main changes are: * Add -XDeepSubsumption, which is on by default in Haskell98 and Haskell2010, but off in Haskell2021. -XDeepSubsumption largely restores the behaviour before the "simple subsumption" change. -XDeepSubsumpition has a similar flavour as -XNoMonoLocalBinds: it makes type inference more complicated and less predictable, but it may be convenient in practice. * The main changes are in: * GHC.Tc.Utils.Unify.tcSubType, which does deep susumption and eta-expanansion * GHC.Tc.Utils.Unify.tcSkolemiseET, which does deep skolemisation * In GHC.Tc.Gen.App.tcApp we call tcSubTypeNC to match the result type. Without deep subsumption, unifyExpectedType would be sufficent. See Note [Deep subsumption] in GHC.Tc.Utils.Unify. * There are no changes to Quick Look at all. * The type of `withDict` becomes ambiguous; so add -XAllowAmbiguousTypes to GHC.Magic.Dict * I fixed a small but egregious bug in GHC.Core.FVs.varTypeTyCoFVs, where we'd forgotten to take the free vars of the multiplicity of an Id. * I also had to fix tcSplitNestedSigmaTys When I did the shallow-subsumption patch commit 2b792facab46f7cdd09d12e79499f4e0dcd4293f Date: Sun Feb 2 18:23:11 2020 +0000 Simple subsumption I changed tcSplitNestedSigmaTys to not look through function arrows any more. But that was actually an un-forced change. This function is used only in * Improving error messages in GHC.Tc.Gen.Head.addFunResCtxt * Validity checking for default methods: GHC.Tc.TyCl.checkValidClass * A couple of calls in the GHCi debugger: GHC.Runtime.Heap.Inspect All to do with validity checking and error messages. Acutally its fine to look under function arrows here, and quite useful a test DeepSubsumption05 (a test motivated by a build failure in the `lens` package) shows. The fix is easy. I added Note [tcSplitNestedSigmaTys]. - - - - - e31ead39 by Matthew Pickering at 2022-07-25T09:42:01-04:00 Add tests that -XHaskell98 and -XHaskell2010 enable DeepSubsumption - - - - - 67189985 by Matthew Pickering at 2022-07-25T09:42:01-04:00 Add DeepSubsumption08 - - - - - 5e93a952 by Simon Peyton Jones at 2022-07-25T09:42:01-04:00 Fix the interaction of operator sections and deep subsumption Fixes DeepSubsumption08 - - - - - 918620d9 by Zubin Duggal at 2022-07-25T09:42:01-04:00 Add DeepSubsumption09 - - - - - 2a773259 by Gabriella Gonzalez at 2022-07-25T09:42:40-04:00 Default implementation for mempty/(<>) Approved by: https://github.com/haskell/core-libraries-committee/issues/61 This adds a default implementation for `mempty` and `(<>)` along with a matching `MINIMAL` pragma so that `Semigroup` and `Monoid` instances can be defined in terms of `sconcat` / `mconcat`. The description for each class has also been updated to include the equivalent set of laws for the `sconcat`-only / `mconcat`-only instances. - - - - - 73836fc8 by Bryan Richter at 2022-07-25T09:43:16-04:00 ci: Disable (broken) perf-nofib See #21859 - - - - - c24ca5c3 by sheaf at 2022-07-25T09:43:58-04:00 Docs: clarify ConstraintKinds infelicity GHC doesn't consistently require the ConstraintKinds extension to be enabled, as it allows programs such as type families returning a constraint without this extension. MR !7784 fixes this infelicity, but breaking user programs was deemed to not be worth it, so we document it instead. Fixes #21061. - - - - - 5f2fbd5e by Simon Peyton Jones at 2022-07-25T09:44:34-04:00 More improvements to worker/wrapper This patch fixes #21888, and simplifies finaliseArgBoxities by eliminating the (recently introduced) data type FinalDecision. A delicate interaction meant that this patch commit d1c25a48154236861a413e058ea38d1b8320273f Date: Tue Jul 12 16:33:46 2022 +0100 Refactor wantToUnboxArg a bit make worker/wrapper go into an infinite loop. This patch fixes it by narrowing the handling of case (B) of Note [Boxity for bottoming functions], to deal only the arguemnts that are type variables. Only then do we drop the trimBoxity call, which is what caused the bug. I also * Added documentation of case (B), which was previously completely un-mentioned. And a regression test, T21888a, to test it. * Made unboxDeeplyDmd stop at lazy demands. It's rare anyway for a bottoming function to have a lazy argument (mainly when the data type is recursive and then we don't want to unbox deeply). Plus there is Note [No lazy, Unboxed demands in demand signature] * Refactored the Case equation for dmdAnal a bit, to do less redundant pattern matching. - - - - - b77d95f8 by Simon Peyton Jones at 2022-07-25T09:45:09-04:00 Fix a small buglet in tryEtaReduce Gergo points out (#21801) that GHC.Core.Opt.Arity.tryEtaReduce was making an ill-formed cast. It didn't matter, because the subsequent guard discarded it; but still worth fixing. Spurious warnings are distracting. - - - - - 3bbde957 by Zubin Duggal at 2022-07-25T09:45:45-04:00 Fix #21889, GHCi misbehaves with Ctrl-C on Windows On Windows, we create multiple levels of wrappers for GHCi which ultimately execute ghc --interactive. In order to handle console events properly, each of these wrappers must call FreeConsole() in order to hand off event processing to the child process. See #14150. In addition to this, FreeConsole must only be called from interactive processes (#13411). This commit makes two changes to fix this situation: 1. The hadrian wrappers generated using `hadrian/bindist/cwrappers/version-wrapper.c` call `FreeConsole` if the CPP flag INTERACTIVE_PROCESS is set, which is set when we are generating a wrapper for GHCi. 2. The GHCi wrapper in `driver/ghci/` calls the `ghc-$VER.exe` executable which is not wrapped rather than calling `ghc.exe` is is wrapped on windows (and usually non-interactive, so can't call `FreeConsole`: Before: ghci-$VER.exe calls ghci.exe which calls ghc.exe which calls ghc-$VER.exe After: ghci-$VER.exe calls ghci.exe which calls ghc-$VER.exe - - - - - 79f1b021 by Simon Jakobi at 2022-07-25T09:46:21-04:00 docs: Fix documentation of \cases Fixes #21902. - - - - - e4bf9592 by sternenseemann at 2022-07-25T09:47:01-04:00 ghc-cabal: allow Cabal 3.8 to unbreak make build When bootstrapping GHC 9.4.*, the build will fail when configuring ghc-cabal as part of the make based build system due to this upper bound, as Cabal has been updated to a 3.8 release. Reference #21914, see especially https://gitlab.haskell.org/ghc/ghc/-/issues/21914#note_444699 - - - - - 726d938e by Simon Peyton Jones at 2022-07-25T14:38:14-04:00 Fix isEvaldUnfolding and isValueUnfolding This fixes (1) in #21831. Easy, obviously correct. - - - - - 5d26c321 by Simon Peyton Jones at 2022-07-25T14:38:14-04:00 Switch off eta-expansion in rules and unfoldings I think this change will make little difference except to reduce clutter. But that's it -- if it causes problems we can switch it on again. - - - - - d4fe2f4e by Simon Peyton Jones at 2022-07-25T14:38:14-04:00 Teach SpecConstr about typeDeterminesValue This patch addresses #21831, point 2. See Note [generaliseDictPats] in SpecConstr I took the opportunity to refactor the construction of specialisation rules a bit, so that the rule name says what type we are specialising at. Surprisingly, there's a 20% decrease in compile time for test perf/compiler/T18223. I took a look at it, and the code size seems the same throughout. I did a quick ticky profile which seemed to show a bit less substitution going on. Hmm. Maybe it's the "don't do eta-expansion in stable unfoldings" patch, which is part of the same MR as this patch. Anyway, since it's a move in the right direction, I didn't think it was worth looking into further. Metric Decrease: T18223 - - - - - 65f7838a by Simon Peyton Jones at 2022-07-25T14:38:14-04:00 Add a 'notes' file in testsuite/tests/perf/compiler This file is just a place to accumlate notes about particular benchmarks, so that I don't keep re-inventing the wheel. - - - - - 61faff40 by Simon Peyton Jones at 2022-07-25T14:38:50-04:00 Get the in-scope set right in FamInstEnv.injectiveBranches There was an assert error, as Gergo pointed out in #21896. I fixed this by adding an InScopeSet argument to tcUnifyTyWithTFs. And also to GHC.Core.Unify.niFixTCvSubst. I also took the opportunity to get a couple more InScopeSets right, and to change some substTyUnchecked into substTy. This MR touches a lot of other files, but only because I also took the opportunity to introduce mkInScopeSetList, and use it. - - - - - 4a7256a7 by Cheng Shao at 2022-07-25T20:41:55+00:00 Add location to cc phase - - - - - 96811ba4 by Cheng Shao at 2022-07-25T20:41:55+00:00 Avoid as pipeline when compiling c - - - - - 2869b66d by Cheng Shao at 2022-07-25T20:42:20+00:00 testsuite: Skip test cases involving -S when testing unregisterised GHC We no longer generate .s files anyway. Metric Decrease: MultiLayerModules T10421 T13035 T13701 T14697 T16875 T18140 T18304 T18923 T9198 - - - - - 82a0991a by Ben Gamari at 2022-07-25T23:32:05-04:00 testsuite: introduce nonmoving_thread_sanity way (cherry picked from commit 19f8fce3659de3d72046bea9c61d1a82904bc4ae) - - - - - 4b087973 by Ben Gamari at 2022-07-25T23:32:06-04:00 rts/nonmoving: Track segment state It can often be useful during debugging to be able to determine the state of a nonmoving segment. Introduce some state, enabled by DEBUG, to track this. (cherry picked from commit 40e797ef591ae3122ccc98ab0cc3cfcf9d17bd7f) - - - - - 54a5c32d by Ben Gamari at 2022-07-25T23:32:06-04:00 rts/nonmoving: Don't scavenge objects which weren't evacuated This fixes a rather subtle bug in the logic responsible for scavenging objects evacuated to the non-moving generation. In particular, objects can be allocated into the non-moving generation by two ways: a. evacuation out of from-space by the garbage collector b. direct allocation by the mutator Like all evacuation, objects moved by (a) must be scavenged, since they may contain references to other objects located in from-space. To accomplish this we have the following scheme: * each nonmoving segment's block descriptor has a scan pointer which points to the first object which has yet to be scavenged * the GC tracks a set of "todo" segments which have pending scavenging work * to scavenge a segment, we scavenge each of the unmarked blocks between the scan pointer and segment's `next_free` pointer. We skip marked blocks since we know the allocator wouldn't have allocated into marked blocks (since they contain presumably live data). We can stop at `next_free` since, by definition, the GC could not have evacuated any objects to blocks above `next_free` (otherwise `next_free wouldn't be the first free block). However, this neglected to consider objects allocated by path (b). In short, the problem is that objects directly allocated by the mutator may become unreachable (but not swept, since the containing segment is not yet full), at which point they may contain references to swept objects. Specifically, we observed this in #21885 in the following way: 1. the mutator (specifically in #21885, a `lockCAF`) allocates an object (specifically a blackhole, which here we will call `blkh`; see Note [Static objects under the nonmoving collector] for the reason why) on the non-moving heap. The bitmap of the allocated block remains 0 (since allocation doesn't affect the bitmap) and the containing segment's (which we will call `blkh_seg`) `next_free` is advanced. 2. We enter the blackhole, evaluating the blackhole to produce a result (specificaly a cons cell) in the nursery 3. The blackhole gets updated into an indirection pointing to the cons cell; it is pushed to the generational remembered set 4. we perform a GC, the cons cell is evacuated into the nonmoving heap (into segment `cons_seg`) 5. the cons cell is marked 6. the GC concludes 7. the CAF and blackhole become unreachable 8. `cons_seg` is filled 9. we start another GC; the cons cell is swept 10. we start a new GC 11. something is evacuated into `blkh_seg`, adding it to the "todo" list 12. we attempt to scavenge `blkh_seg` (namely, all unmarked blocks between `scan` and `next_free`, which includes `blkh`). We attempt to evacuate `blkh`'s indirectee, which is the previously-swept cons cell. This is unsafe, since the indirectee is no longer a valid heap object. The problem here was that the scavenging logic *assumed* that (a) was the only source of allocations into the non-moving heap and therefore *all* unmarked blocks between `scan` and `next_free` were evacuated. However, due to (b) this is not true. The solution is to ensure that that the scanned region only encompasses the region of objects allocated during evacuation. We do this by updating `scan` as we push the segment to the todo-segment list to point to the block which was evacuated into. Doing this required changing the nonmoving scavenging implementation's update of the `scan` pointer to bump it *once*, instead of after scavenging each block as was done previously. This is because we may end up evacuating into the segment being scavenged as we scavenge it. This was quite tricky to discover but the result is quite simple, demonstrating yet again that global mutable state should be used exceedingly sparingly. Fixes #21885 (cherry picked from commit 0b27ea23efcb08639309293faf13fdfef03f1060) - - - - - 25c24535 by Ben Gamari at 2022-07-25T23:32:06-04:00 testsuite: Skip a few tests as in the nonmoving collector Residency monitoring under the non-moving collector is quite conservative (e.g. the reported value is larger than reality) since otherwise we would need to block on concurrent collection. Skip a few tests that are sensitive to residency. (cherry picked from commit 6880e4fbf728c04e8ce83e725bfc028fcb18cd70) - - - - - 42147534 by sternenseemann at 2022-07-26T16:26:53-04:00 hadrian: add flag disabling selftest rules which require QuickCheck The hadrian executable depends on QuickCheck for building, meaning this library (and its dependencies) will need to be built for bootstrapping GHC in the future. Building QuickCheck, however, can require TemplateHaskell. When building a statically linking GHC toolchain, TemplateHaskell can be tricky to get to work, and cross-compiling TemplateHaskell doesn't work at all without -fexternal-interpreter, so QuickCheck introduces an element of fragility to GHC's bootstrap. Since the selftest rules are the only part of hadrian that need QuickCheck, we can easily eliminate this bootstrap dependency when required by introducing a `selftest` flag guarding the rules' inclusion. Closes #8699. - - - - - 9ea29d47 by Simon Peyton Jones at 2022-07-26T16:27:28-04:00 Regression test for #21848 - - - - - ef30e215 by Matthew Pickering at 2022-07-28T13:56:59-04:00 driver: Don't create LinkNodes when -no-link is enabled Fixes #21866 - - - - - fc23b5ed by sheaf at 2022-07-28T13:57:38-04:00 Docs: fix mistaken claim about kind signatures This patch fixes #21806 by rectifying an incorrect claim about the usage of kind variables in the header of a data declaration with a standalone kind signature. It also adds some clarifications about the number of parameters expected in GADT declarations and in type family declarations. - - - - - 74777eb2 by Jade Lovelace at 2022-07-29T11:02:41+01:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` (cherry picked from commit ab53ccf089ea703b767581ac14be0f6c78a7678a) - - - - - faa4cfcf by Hécate Moonlight at 2022-07-29T20:31:20+02:00 Merge pull request haskell/haddock#1516 from duog/9-4-backport-fix-hyperlinks Backport 9-4: Fix hyperlinks to external items and modules (#1482) - - - - - 2df92ee1 by Matthew Pickering at 2022-08-02T05:20:01-04:00 testsuite: Correctly set withNativeCodeGen Fixes #21918 - - - - - f2912143 by Matthew Pickering at 2022-08-02T05:20:45-04:00 Fix since annotations in GHC.Stack.CloneStack Fixes #21894 - - - - - aeb8497d by Andreas Klebinger at 2022-08-02T19:26:51-04:00 Add -dsuppress-coercion-types to make coercions even smaller. Instead of `` `cast` <Co:11> :: (Some -> Really -> Large Type)`` simply print `` `cast` <Co:11> :: ... `` - - - - - 97655ad8 by sheaf at 2022-08-02T19:27:29-04:00 User's guide: fix typo in hasfield.rst Fixes #21950 - - - - - 35aef18d by Yiyun Liu at 2022-08-04T02:55:07-04:00 Remove TCvSubst and use Subst for both term and type-level subst This patch removes the TCvSubst data type and instead uses Subst as the environment for both term and type level substitution. This change is partially motivated by the existential type proposal, which will introduce types that contain expressions and therefore forces us to carry around an "IdSubstEnv" even when substituting for types. It also reduces the amount of code because "Subst" and "TCvSubst" share a lot of common operations. There isn't any noticeable impact on performance (geo. mean for ghc/alloc is around 0.0% but we have -94 loc and one less data type to worry abount). Currently, the "TCvSubst" data type for substitution on types is identical to the "Subst" data type except the former doesn't store "IdSubstEnv". Using "Subst" for type-level substitution means there will be a redundant field stored in the data type. However, in cases where the substitution starts from the expression, using "Subst" for type-level substitution saves us from having to project "Subst" into a "TCvSubst". This probably explains why the allocation is mostly even despite the redundant field. The patch deletes "TCvSubst" and moves "Subst" and its relevant functions from "GHC.Core.Subst" into "GHC.Core.TyCo.Subst". Substitution on expressions is still defined in "GHC.Core.Subst" so we don't have to expose the definition of "Expr" in the hs-boot file that "GHC.Core.TyCo.Subst" must import to refer to "IdSubstEnv" (whose codomain is "CoreExpr"). Most functions named fooTCvSubst are renamed into fooSubst with a few exceptions (e.g. "isEmptyTCvSubst" is a distinct function from "isEmptySubst"; the former ignores the emptiness of "IdSubstEnv"). These exceptions mainly exist for performance reasons and will go away when "Expr" and "Type" are mutually recursively defined (we won't be able to take those shortcuts if we can't make the assumption that expressions don't appear in types). - - - - - b99819bd by Krzysztof Gogolewski at 2022-08-04T02:55:43-04:00 Fix TH + defer-type-errors interaction (#21920) Previously, we had to disable defer-type-errors in splices because of #7276. But this fix is no longer necessary, the test T7276 no longer segfaults and is now correctly deferred. - - - - - fb529cae by Andreas Klebinger at 2022-08-04T13:57:25-04:00 Add a note about about W/W for unlifting strict arguments This fixes #21236. - - - - - fffc75a9 by Matthew Pickering at 2022-08-04T13:58:01-04:00 Force safeInferred to avoid retaining extra copy of DynFlags This will only have a (very) modest impact on memory but we don't want to retain old copies of DynFlags hanging around so best to force this value. - - - - - 0f43837f by Matthew Pickering at 2022-08-04T13:58:01-04:00 Force name selectors to ensure no reference to Ids enter the NameCache I observed some unforced thunks in the NameCache which were retaining a whole Id, which ends up retaining a Type.. which ends up retaining old copies of HscEnv containing stale HomeModInfo. - - - - - 0b1f5fd1 by Matthew Pickering at 2022-08-04T13:58:01-04:00 Fix leaks in --make mode when there are module loops This patch fixes quite a tricky leak where we would end up retaining stale ModDetails due to rehydrating modules against non-finalised interfaces. == Loops with multiple boot files It is possible for a module graph to have a loop (SCC, when ignoring boot files) which requires multiple boot files to break. In this case we must perform the necessary hydration steps before and after compiling modules which have boot files which are described above for corectness but also perform an additional hydration step at the end of the SCC to remove space leaks. Consider the following example: ┌───────┐ ┌───────┐ │ │ │ │ │ A │ │ B │ │ │ │ │ └─────┬─┘ └───┬───┘ │ │ ┌────▼─────────▼──┐ │ │ │ C │ └────┬─────────┬──┘ │ │ ┌────▼──┐ ┌───▼───┐ │ │ │ │ │ A-boot│ │ B-boot│ │ │ │ │ └───────┘ └───────┘ A, B and C live together in a SCC. Say we compile the modules in order A-boot, B-boot, C, A, B then when we compile A we will perform the hydration steps (because A has a boot file). Therefore C will be hydrated relative to A, and the ModDetails for A will reference C/A. Then when B is compiled C will be rehydrated again, and so B will reference C/A,B, its interface will be hydrated relative to both A and B. Now there is a space leak because say C is a very big module, there are now two different copies of ModDetails kept alive by modules A and B. The way to avoid this space leak is to rehydrate an entire SCC together at the end of compilation so that all the ModDetails point to interfaces for .hs files. In this example, when we hydrate A, B and C together then both A and B will refer to C/A,B. See #21900 for some more discussion. ------------------------------------------------------- In addition to this simple case, there is also the potential for a leak during parallel upsweep which is also fixed by this patch. Transcibed is Note [ModuleNameSet, efficiency and space leaks] Note [ModuleNameSet, efficiency and space leaks] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ During unsweep the results of compiling modules are placed into a MVar, to find the environment the module needs to compile itself in the MVar is consulted and the HomeUnitGraph is set accordingly. The reason we do this is that precisely tracking module dependencies and recreating the HUG from scratch each time is very expensive. In serial mode (-j1), this all works out fine because a module can only be compiled after its dependencies have finished compiling and not interleaved with compiling module loops. Therefore when we create the finalised or no loop interfaces, the HUG only contains finalised interfaces. In parallel mode, we have to be more careful because the HUG variable can contain non-finalised interfaces which have been started by another thread. In order to avoid a space leak where a finalised interface is compiled against a HPT which contains a non-finalised interface we have to restrict the HUG to only the visible modules. The visible modules is recording in the ModuleNameSet, this is propagated upwards whilst compiling and explains which transitive modules are visible from a certain point. This set is then used to restrict the HUG before the module is compiled to only the visible modules and thus avoiding this tricky space leak. Efficiency of the ModuleNameSet is of utmost importance because a union occurs for each edge in the module graph. Therefore the set is represented directly as an IntSet which provides suitable performance, even using a UniqSet (which is backed by an IntMap) is too slow. The crucial test of performance here is the time taken to a do a no-op build in --make mode. See test "jspace" for an example which used to trigger this problem. Fixes #21900 - - - - - 1d94a59f by Matthew Pickering at 2022-08-04T13:58:01-04:00 Store interfaces in ModIfaceCache more directly I realised hydration was completely irrelavant for this cache because the ModDetails are pruned from the result. So now it simplifies things a lot to just store the ModIface and Linkable, which we can put into the cache straight away rather than wait for the final version of a HomeModInfo to appear. - - - - - 6c7cd50f by Cheng Shao at 2022-08-04T23:01:45-04:00 cmm: Remove unused ReadOnlyData16 We don't actually emit rodata16 sections anywhere. - - - - - 16333ad7 by Andreas Klebinger at 2022-08-04T23:02:20-04:00 findExternalRules: Don't needlessly traverse the list of rules. - - - - - 52c15674 by Krzysztof Gogolewski at 2022-08-05T12:47:05-04:00 Remove backported items from 9.6 release notes They have been backported to 9.4 in commits 5423d84bd9a28f, 13c81cb6be95c5, 67ccbd6b2d4b9b. - - - - - 78d232f5 by Matthew Pickering at 2022-08-05T12:47:40-04:00 ci: Fix pages job The job has been failing because we don't bundle haddock docs anymore in the docs dist created by hadrian. Fixes #21789 - - - - - 5d2450f3 by Ben Gamari at 2022-08-05T17:41:15-04:00 Merge remote-tracking branch 'origin/ghc-9.4' - - - - - 63954f73 by Ben Gamari at 2022-08-05T19:08:36-04:00 Clean up build and testsuite for GHC 9.4 - - - - - d4568cb8 by Hécate Moonlight at 2022-08-05T19:10:49-04:00 Bump the versions - - - - - 037bc9c9 by Ben Gamari at 2022-08-05T22:00:29-04:00 codeGen/X86: Don't clobber switch variable in switch generation Previously ce8745952f99174ad9d3bdc7697fd086b47cdfb5 assumed that it was safe to clobber the switch variable when generating code for a jump table since we were at the end of a block. However, this assumption is wrong; the register could be live in the jump target. Fixes #21968. - - - - - 50c8e1c5 by Matthew Pickering at 2022-08-05T22:01:04-04:00 Fix equality operator in jspace test - - - - - e9c77a22 by Andreas Klebinger at 2022-08-06T06:13:17-04:00 Improve BUILD_PAP comments - - - - - 41234147 by Andreas Klebinger at 2022-08-06T06:13:17-04:00 Make dropTail comment a haddock comment - - - - - ff11d579 by Andreas Klebinger at 2022-08-06T06:13:17-04:00 Add one more sanity check in stg_restore_cccs - - - - - 1f6c56ae by Andreas Klebinger at 2022-08-06T06:13:17-04:00 StgToCmm: Fix isSimpleScrut when profiling is enabled. When profiling is enabled we must enter functions that might represent thunks in order for their sccs to show up in the profile. We might allocate even if the function is already evaluated in this case. So we can't consider any potential function thunk to be a simple scrut when profiling. Not doing so caused profiled binaries to segfault. - - - - - fab0ee93 by Andreas Klebinger at 2022-08-06T06:13:17-04:00 Change `-fprof-late` to insert cost centres after unfolding creation. The former behaviour of adding cost centres after optimization but before unfoldings are created is not available via the flag `prof-late-inline` instead. I also reduced the overhead of -fprof-late* by pushing the cost centres into lambdas. This means the cost centres will only account for execution of functions and not their partial application. Further I made LATE_CC cost centres it's own CC flavour so they now won't clash with user defined ones if a user uses the same string for a custom scc. LateCC: Don't put cost centres inside constructor workers. With -fprof-late they are rarely useful as the worker is usually inlined. Even if the worker is not inlined or we use -fprof-late-linline they are generally not helpful but bloat compile and run time significantly. So we just don't add sccs inside constructor workers. ------------------------- Metric Decrease: T13701 ------------------------- - - - - - f8bec4e3 by Ben Gamari at 2022-08-06T06:13:53-04:00 gitlab-ci: Fix hadrian bootstrapping of release pipelines Previously we would attempt to test hadrian bootstrapping in the `validate` build flavour. However, `ci.sh` refuses to run validation builds during release pipelines, resulting in job failures. Fix this by testing bootstrapping in the `release` flavour during release pipelines. We also attempted to record perf notes for these builds, which is redundant work and undesirable now since we no longer build in a consistent flavour. - - - - - c0348865 by Ben Gamari at 2022-08-06T11:45:17-04:00 compiler: Eliminate two uses of foldr in favor of foldl' These two uses constructed maps, which is a case where foldl' is generally more efficient since we avoid constructing an intermediate O(n)-depth stack. - - - - - d2e4e123 by Ben Gamari at 2022-08-06T11:45:17-04:00 rts: Fix code style - - - - - 57f530d3 by Ben Gamari at 2022-08-06T11:45:17-04:00 genprimopcode: Drop ArrayArray# references As ArrayArray# no longer exists - - - - - 7267cd52 by Ben Gamari at 2022-08-06T11:45:17-04:00 base: Organize Haddocks in GHC.Conc.Sync - - - - - aa818a9f by Ben Gamari at 2022-08-06T11:48:50-04:00 Add primop to list threads A user came to #ghc yesterday wondering how best to check whether they were leaking threads. We ended up using the eventlog but it seems to me like it would be generally useful if Haskell programs could query their own threads. - - - - - 6d1700b6 by Ben Gamari at 2022-08-06T11:51:35-04:00 rts: Move thread labels into TSO This eliminates the thread label HashTable and instead tracks this information in the TSO, allowing us to use proper StgArrBytes arrays for backing the label and greatly simplifying management of object lifetimes when we expose them to the user with the coming `threadLabel#` primop. - - - - - 1472044b by Ben Gamari at 2022-08-06T11:54:52-04:00 Add a primop to query the label of a thread - - - - - 43f2b271 by Ben Gamari at 2022-08-06T11:55:14-04:00 base: Share finalization thread label For efficiency's sake we float the thread label assigned to the finalization thread to the top-level, ensuring that we only need to encode the label once. - - - - - 1d63b4fb by Ben Gamari at 2022-08-06T11:57:11-04:00 users-guide: Add release notes entry for thread introspection support - - - - - 505583a4 by Ben Gamari at 2022-08-06T13:58:27-04:00 Merge pull request haskell/haddock#1518 from bgamari/wip/ghc-9.4-merge Merge GHC 9.4 into `main` - - - - - 5706f6a4 by Ben Gamari at 2022-08-06T22:57:21-04:00 html-test: Testsuite changes for GHC 9.4.1 - - - - - 09bca1de by Ben Gamari at 2022-08-07T01:19:35-04:00 hadrian: Fix binary distribution install attributes Previously we would use plain `cp` to install various parts of the binary distribution. However, `cp`'s behavior w.r.t. file attributes is quite unclear; for this reason it is much better to rather use `install`. Fixes #21965. - - - - - 2b8ea16d by Ben Gamari at 2022-08-07T01:19:35-04:00 hadrian: Fix installation of system-cxx-std-lib package conf - - - - - 7b514848 by Ben Gamari at 2022-08-07T01:20:10-04:00 gitlab-ci: Bump Docker images To give the ARMv7 job access to lld, fixing #21875. - - - - - afa584a3 by Ben Gamari at 2022-08-07T05:08:52-04:00 hadrian: Don't use mk/config.mk.in Ultimately we want to drop mk/config.mk so here I extract the bits needed by the Hadrian bindist installation logic into a Hadrian-specific file. While doing this I fixed binary distribution installation, #21901. - - - - - b9bb45d7 by Ben Gamari at 2022-08-07T05:08:52-04:00 hadrian: Fix naming of cross-compiler wrappers - - - - - 78d04cfa by Ben Gamari at 2022-08-07T11:44:58-04:00 hadrian: Extend xattr Darwin hack to cover /lib As noted in #21506, it is now necessary to remove extended attributes from `/lib` as well as `/bin` to avoid SIP issues on Darwin. Fixes #21506. - - - - - 20457d77 by Andreas Klebinger at 2022-08-08T14:42:26+02:00 NCG(x86): Compile add+shift as lea if possible. - - - - - 742292e4 by Andreas Klebinger at 2022-08-08T16:46:37-04:00 dataToTag#: Skip runtime tag check if argument is infered tagged This addresses one part of #21710. - - - - - 1504a93e by Cheng Shao at 2022-08-08T16:47:14-04:00 rts: remove redundant stg_traceCcszh This out-of-line primop has no Haskell wrapper and hasn't been used anywhere in the tree. Furthermore, the code gets in the way of !7632, so it should be garbage collected. - - - - - a52de3cb by Andreas Klebinger at 2022-08-08T16:47:50-04:00 Document a divergence from the report in parsing function lhss. GHC is happy to parse `(f) x y = x + y` when it should be a parse error based on the Haskell report. Seems harmless enough so we won't fix it but it's documented now. Fixes #19788 - - - - - 5765e133 by Ben Gamari at 2022-08-08T16:48:25-04:00 gitlab-ci: Add release job for aarch64/debian 11 - - - - - 5b26f324 by Ben Gamari at 2022-08-08T19:39:20-04:00 gitlab-ci: Introduce validation job for aarch64 cross-compilation Begins to address #11958. - - - - - e866625c by Ben Gamari at 2022-08-08T19:39:20-04:00 Bump process submodule - - - - - ae707762 by Ben Gamari at 2022-08-08T19:39:20-04:00 gitlab-ci: Add basic support for cross-compiler testiing Here we add a simple qemu-based test for cross-compilers. - - - - - 50912d68 by Ben Gamari at 2022-08-08T19:39:57-04:00 rts: Ensure that Array# card arrays are initialized In #19143 I noticed that newArray# failed to initialize the card table of newly-allocated arrays. However, embarrassingly, I then only fixed the issue in newArrayArray# and, in so doing, introduced the potential for an integer underflow on zero-length arrays (#21962). Here I fix the issue in newArray#, this time ensuring that we do not underflow in pathological cases. Fixes #19143. - - - - - e5ceff56 by Ben Gamari at 2022-08-08T19:39:57-04:00 testsuite: Add test for #21962 - - - - - c1c08bd8 by Ben Gamari at 2022-08-09T02:31:14-04:00 gitlab-ci: Don't use coreutils on Darwin In general we want to ensure that the tested environment is as similar as possible to the environment the user will use. In the case of Darwin, this means we want to use the system's BSD command-line utilities, not coreutils. This would have caught #21974. - - - - - 1c582f44 by Ben Gamari at 2022-08-09T02:31:14-04:00 hadrian: Fix bindist installation on Darwin It turns out that `cp -P` on Darwin does not always copy a symlink as a symlink. In order to get these semantics one must pass `-RP`. It's not entirely clear whether this is valid under POSIX, but it is nevertheless what Apple does. - - - - - 681aa076 by Ben Gamari at 2022-08-09T02:31:49-04:00 hadrian: Fix access mode of installed package registration files Previously hadrian's bindist Makefile would modify package registrations placed by `install` via a shell pipeline and `mv`. However, the use of `mv` means that if umask is set then the user may otherwise end up with package registrations which are inaccessible. Fix this by ensuring that the mode is 0644. - - - - - e9dfd26a by Krzysztof Gogolewski at 2022-08-09T02:32:24-04:00 Cleanups around pretty-printing * Remove hack when printing OccNames. No longer needed since e3dcc0d5 * Remove unused `pprCmms` and `instance Outputable Instr` * Simplify `pprCLabel` (no need to pass platform) * Remove evil `Show`/`Eq` instances for `SDoc`. They were needed by ImmLit, but that can take just a String instead. * Remove instance `Outputable CLabel` - proper output of labels needs a platform, and is done by the `OutputableP` instance - - - - - 66d2e927 by Ben Gamari at 2022-08-09T13:46:48-04:00 rts/linker: Resolve iconv_* on FreeBSD FreeBSD's libiconv includes an implementation of the iconv_* functions in libc. Unfortunately these can only be resolved using dlvsym, which is how the RTS linker usually resolves such functions. To fix this we include an ad-hoc special case for iconv_*. Fixes #20354. - - - - - 5d66a0ce by Ben Gamari at 2022-08-09T13:46:48-04:00 system-cxx-std-lib: Add support for FreeBSD libcxxrt - - - - - ea90e61d by Ben Gamari at 2022-08-09T13:46:48-04:00 gitlab-ci: Bump to use freebsd13 runners - - - - - d71a2051 by sheaf at 2022-08-09T13:47:28-04:00 Fix size_up_alloc to account for UnliftedDatatypes The size_up_alloc function mistakenly considered any type that isn't lifted to not allocate anything, which is wrong. What we want instead is to check the type isn't boxed. This accounts for (BoxedRep Unlifted). Fixes #21939 - - - - - 76b52cf0 by Douglas Wilson at 2022-08-10T06:01:53-04:00 testsuite: 21651 add test for closeFdWith + setNumCapabilities This bug does not affect windows, which does not use the base module GHC.Event.Thread. - - - - - 7589ee72 by Douglas Wilson at 2022-08-10T06:01:53-04:00 base: Fix races in IOManager (setNumCapabilities,closeFdWith) Fix for #21651 Fixes three bugs: - writes to eventManager should be atomic. It is accessed concurrently by ioManagerCapabilitiesChanged and closeFdWith. - The race in closeFdWith described in the ticket. - A race in getSystemEventManager where it accesses the 'IOArray' in 'eventManager' before 'ioManagerCapabilitiesChanged' has written to 'eventManager', causing an Array Index exception. The fix here is to 'yield' and retry. - - - - - dc76439d by Trevis Elser at 2022-08-10T06:02:28-04:00 Updates language extension documentation Adding a 'Status' field with a few values: - Deprecated - Experimental - InternalUseOnly - Noting if included in 'GHC2021', 'Haskell2010' or 'Haskell98' Those values are pulled from the existing descriptions or elsewhere in the documentation. While at it, include the :implied by: where appropriate, to provide more detail. Fixes #21475 - - - - - 823fe5b5 by Jens Petersen at 2022-08-10T06:03:07-04:00 hadrian RunRest: add type signature for stageNumber avoids warning seen on 9.4.1: src/Settings/Builders/RunTest.hs:264:53: warning: [-Wtype-defaults] • Defaulting the following constraints to type ‘Integer’ (Show a0) arising from a use of ‘show’ at src/Settings/Builders/RunTest.hs:264:53-84 (Num a0) arising from a use of ‘stageNumber’ at src/Settings/Builders/RunTest.hs:264:59-83 • In the second argument of ‘(++)’, namely ‘show (stageNumber (C.stage ctx))’ In the second argument of ‘($)’, namely ‘"config.stage=" ++ show (stageNumber (C.stage ctx))’ In the expression: arg $ "config.stage=" ++ show (stageNumber (C.stage ctx)) | 264 | , arg "-e", arg $ "config.stage=" ++ show (stageNumber (C.stage ctx)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ compilation tested locally - - - - - f95bbdca by Sylvain Henry at 2022-08-10T09:44:46-04:00 Add support for external static plugins (#20964) This patch adds a new command-line flag: -fplugin-library=<file-path>;<unit-id>;<module>;<args> used like this: -fplugin-library=path/to/plugin.so;package-123;Plugin.Module;["Argument","List"] It allows a plugin to be loaded directly from a shared library. With this approach, GHC doesn't compile anything for the plugin and doesn't load any .hi file for the plugin and its dependencies. As such GHC doesn't need to support two environments (one for plugins, one for target code), which was the more ambitious approach tracked in #14335. Fix #20964 Co-authored-by: Josh Meredith <joshmeredith2008 at gmail.com> - - - - - 5bc489ca by Ben Gamari at 2022-08-10T09:45:22-04:00 gitlab-ci: Fix ARMv7 build It appears that the CI refactoring carried out in 5ff690b8474c74e9c968ef31e568c1ad0fe719a1 failed to carry over some critical configuration: setting the build/host/target platforms and forcing use of a non-broken linker. - - - - - 596db9a5 by Ben Gamari at 2022-08-10T09:45:22-04:00 gitlab-ci: Run ARMv7 jobs when ~ARM label is used - - - - - 7cabea7c by Ben Gamari at 2022-08-10T15:37:58-04:00 hadrian: Don't attempt to install documentation if doc/ doesn't exist Previously we would attempt to install documentation even if the `doc` directory doesn't exist (e.g. due to `--docs=none`). This would result in the surprising side-effect of the entire contents of the bindist being installed in the destination documentation directory. Fix this. Fixes #21976. - - - - - 67575f20 by normalcoder at 2022-08-10T15:38:34-04:00 ncg/aarch64: Don't use x18 register on AArch64/Darwin Apple's ABI documentation [1] says: "The platforms reserve register x18. Don’t use this register." While this wasn't problematic in previous Darwin releases, macOS 13 appears to start zeroing this register periodically. See #21964. [1] https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms - - - - - 45eb4cbe by Andreas Klebinger at 2022-08-10T22:41:12-04:00 Note [Trimming auto-rules]: State that this improves compiler perf. - - - - - 5c24b1b3 by Andrew Lelechenko at 2022-08-10T22:41:50-04:00 Document that threadDelay / timeout are susceptible to overflows on 32-bit machines - - - - - ff67c79e by Alan Zimmerman at 2022-08-11T16:19:57-04:00 EPA: DotFieldOcc does not have exact print annotations For the code {-# LANGUAGE OverloadedRecordUpdate #-} operatorUpdate f = f{(+) = 1} There are no exact print annotations for the parens around the + symbol, nor does normal ppr print them. This MR fixes that. Closes #21805 Updates haddock submodule - - - - - dca43a04 by Matthew Pickering at 2022-08-11T16:20:33-04:00 Revert "gitlab-ci: Add release job for aarch64/debian 11" This reverts commit 5765e13370634979eb6a0d9f67aa9afa797bee46. The job was not tested before being merged and fails CI (https://gitlab.haskell.org/ghc/ghc/-/jobs/1139392) Ticket #22005 - - - - - 5f2a45a2 by Ben Gamari at 2022-08-15T14:33:05-04:00 doc: Fix a few minor ReST issues Sphinx was complaining about too-short title underlines. - - - - - 220e6410 by Ben Gamari at 2022-08-15T14:41:24-04:00 Merge branch 'main' into ghc-head - - - - - fbeb1b02 by Ben Gamari at 2022-08-15T14:45:16-04:00 Updates for GHC 9.5 - - - - - eee562eb by Vladislav Zavialov at 2022-08-15T14:46:13-04:00 HsToken ConDeclGADT con_dcolon - - - - - c5f073db by Ben Gamari at 2022-08-15T16:55:35-04:00 Updates for GHC 9.5 - - - - - 3f7ab242 by Vladislav Zavialov at 2022-08-15T16:55:35-04:00 HsToken ConDeclGADT con_dcolon - - - - - a18e473d by Ben Gamari at 2022-08-16T08:35:19-04:00 Merge branch 'wip/ghc-head-bump' into ghc-head - - - - - ffc9116e by Eric Lindblad at 2022-08-16T09:01:26-04:00 typo - - - - - cd6f5bfd by Ben Gamari at 2022-08-16T09:02:02-04:00 CmmToLlvm: Don't aliasify builtin LLVM variables Our aliasification logic would previously turn builtin LLVM variables into aliases, which apparently confuses LLVM. This manifested in initializers failing to be emitted, resulting in many profiling failures with the LLVM backend. Fixes #22019. - - - - - dc7da356 by Bryan Richter at 2022-08-16T09:02:38-04:00 run_ci: remove monoidal-containers Fixes #21492 MonoidalMap is inlined and used to implement Variables, as before. The top-level value "jobs" is reimplemented as a regular Map, since it doesn't use the monoidal union anyway. - - - - - 64110544 by Cheng Shao at 2022-08-16T09:03:15-04:00 CmmToAsm/AArch64: correct a typo - - - - - f6a5524a by Andreas Klebinger at 2022-08-16T14:34:11-04:00 Fix #21979 - compact-share failing with -O I don't have good reason to believe the optimization level should affect if sharing works or not here. So limit the test to the normal way. - - - - - 68154a9d by Ben Gamari at 2022-08-16T14:34:47-04:00 users-guide: Fix reference to dead llvm-version substitution Fixes #22052. - - - - - 28c60d26 by Ben Gamari at 2022-08-16T14:34:47-04:00 users-guide: Fix incorrect reference to `:extension: role - - - - - 71102c8f by Ben Gamari at 2022-08-16T14:34:47-04:00 users-guide: Add :ghc-flag: reference - - - - - 385f420b by Ben Gamari at 2022-08-16T14:34:47-04:00 hadrian: Place manpage in docroot This relocates it from docs/ to doc/ - - - - - 84598f2e by Ben Gamari at 2022-08-16T14:34:47-04:00 Bump haddock submodule Includes merge of `main` into `ghc-head` as well as some Haddock users guide fixes. - - - - - 59ce787c by Ben Gamari at 2022-08-16T14:34:47-04:00 base: Add changelog entries from ghc-9.2 Closes #21922. - - - - - a14e6ae3 by Ben Gamari at 2022-08-16T14:34:47-04:00 relnotes: Add "included libraries" section As noted in #21988, some users rely on this. - - - - - a4212edc by Ben Gamari at 2022-08-16T14:34:47-04:00 users-guide: Rephrase the rewrite rule documentation Previously the wording was a tad unclear. Fix this. Closes #21114. - - - - - 3e493dfd by Peter Becich at 2022-08-17T08:43:21+01:00 Implement Response File support for HPC This is an improvement to HPC authored by Richard Wallace (https://github.com/purefn) and myself. I have received permission from him to attempt to upstream it. This improvement was originally implemented as a patch to HPC via input-output-hk/haskell.nix: https://github.com/input-output-hk/haskell.nix/pull/1464 Paraphrasing Richard, HPC currently requires all inputs as command line arguments. With large projects this can result in an argument list too long error. I have only seen this error in Nix, but I assume it can occur is a plain Unix environment. This MR adds the standard response file syntax support to HPC. For example you can now pass a file to the command line which contains the arguments. ``` hpc @response_file_1 @response_file_2 ... The contents of a Response File must have this format: COMMAND ... example: report my_library.tix --include=ModuleA --include=ModuleB ``` Updates hpc submodule Co-authored-by: Richard Wallace <rwallace at thewallacepack.net> Fixes #22050 - - - - - 436867d6 by Matthew Pickering at 2022-08-18T09:24:08-04:00 ghc-heap: Fix decoding of TSO closures An extra field was added to the TSO structure in 6d1700b6 but the decoding logic in ghc-heap was not updated for this new field. Fixes #22046 - - - - - a740a4c5 by Matthew Pickering at 2022-08-18T09:24:44-04:00 driver: Honour -x option The -x option is used to manually specify which phase a file should be started to be compiled from (even if it lacks the correct extension). I just failed to implement this when refactoring the driver. In particular Cabal calls GHC with `-E -cpp -x hs Foo.cpphs` to preprocess source files using GHC. I added a test to exercise this case. Fixes #22044 - - - - - e293029d by Simon Peyton Jones at 2022-08-18T09:25:19-04:00 Be more careful in chooseInferredQuantifiers This fixes #22065. We were failing to retain a quantifier that was mentioned in the kind of another retained quantifier. Easy to fix. - - - - - 714c936f by Bryan Richter at 2022-08-18T18:37:21-04:00 testsuite: Add test for #21583 - - - - - 989b844d by Ben Gamari at 2022-08-18T18:37:57-04:00 compiler: Drop --build-id=none hack Since 2011 the object-joining implementation has had a hack to pass `--build-id=none` to `ld` when supported, seemingly to work around a linker bug. This hack is now unnecessary and may break downstream users who expect objects to have valid build-ids. Remove it. Closes #22060. - - - - - 519c712e by Matthew Pickering at 2022-08-19T00:09:11-04:00 Make ru_fn field strict to avoid retaining Ids It's better to perform this projection from Id to Name strictly so we don't retain an old Id (hence IdInfo, hence Unfolding, hence everything etc) - - - - - 7dda04b0 by Matthew Pickering at 2022-08-19T00:09:11-04:00 Force `getOccFS bndr` to avoid retaining reference to Bndr. This is another symptom of #19619 - - - - - 4303acba by Matthew Pickering at 2022-08-19T00:09:11-04:00 Force unfoldings when they are cleaned-up in Tidy and CorePrep If these thunks are not forced then the entire unfolding for the binding is live throughout the whole of CodeGen despite the fact it should have been discarded. Fixes #22071 - - - - - 2361b3bc by Matthew Pickering at 2022-08-19T00:09:47-04:00 haddock docs: Fix links from identifiers to dependent packages When implementing the base_url changes I made the pretty bad mistake of zipping together two lists which were in different orders. The simpler thing to do is just modify `haddockDependencies` to also return the package identifier so that everything stays in sync. Fixes #22001 - - - - - 9a7e2ea1 by Matthew Pickering at 2022-08-19T00:10:23-04:00 Revert "Refactor SpecConstr to use treat bindings uniformly" This reverts commit 415468fef8a3e9181b7eca86de0e05c0cce31729. This refactoring introduced quite a severe residency regression (900MB live from 650MB live when compiling mmark), see #21993 for a reproducer and more discussion. Ticket #21993 - - - - - 9789e845 by Zachary Wood at 2022-08-19T14:17:28-04:00 tc: warn about lazy annotations on unlifted arguments (fixes #21951) - - - - - e5567289 by Andreas Klebinger at 2022-08-19T14:18:03-04:00 Fix #22048 where we failed to drop rules for -fomit-interface-pragmas. Now we also filter the local rules (again) which fixes the issue. - - - - - 51ffd009 by Swann Moreau at 2022-08-19T18:29:21-04:00 Print constraints in quotes (#21167) This patch improves the uniformity of error message formatting by printing constraints in quotes, as we do for types. Fix #21167 - - - - - ab3e0f5a by Sasha Bogicevic at 2022-08-19T18:29:57-04:00 19217 Implicitly quantify type variables in :kind command - - - - - 9939e95f by MorrowM at 2022-08-21T16:51:38-04:00 Recognize file-header pragmas in GHCi (#21507) - - - - - fb7c2d99 by Matthew Pickering at 2022-08-21T16:52:13-04:00 hadrian: Fix bootstrapping with ghc-9.4 The error was that we were trying to link together containers from boot package library (which depends template-haskell in boot package library) template-haskell from in-tree package database So the fix is to build containers in stage0 (and link against template-haskell built in stage0). Fixes #21981 - - - - - b946232c by Mario Blažević at 2022-08-22T22:06:21-04:00 Added pprType with precedence argument, as a prerequisite to fix issues #21723 and #21942. * refines the precedence levels, adding `qualPrec` and `funPrec` to better control parenthesization * `pprParendType`, `pprFunArgType`, and `instance Ppr Type` all just call `pprType` with proper precedence * `ParensT` constructor is now always printed parenthesized * adds the precedence argument to `pprTyApp` as well, as it needs to keep track and pass it down * using `>=` instead of former `>` to match the Core type printing logic * some test outputs have changed, losing extraneous parentheses - - - - - fe4ff0f7 by Mario Blažević at 2022-08-22T22:06:21-04:00 Fix and test for issue #21723 - - - - - 33968354 by Mario Blažević at 2022-08-22T22:06:21-04:00 Test for issue #21942 - - - - - c9655251 by Mario Blažević at 2022-08-22T22:06:21-04:00 Updated the changelog - - - - - 80102356 by Ben Gamari at 2022-08-22T22:06:57-04:00 hadrian: Don't duplicate binaries on installation Previously we used `install` on symbolic links, which ended up copying the target file rather than installing a symbolic link. Fixes #22062. - - - - - b929063e by Matthew Farkas-Dyck at 2022-08-24T02:37:01-04:00 Unbreak Haddock comments in `GHC.Core.Opt.WorkWrap.Utils`. Closes #22092. - - - - - 112e4f9c by Cheng Shao at 2022-08-24T02:37:38-04:00 driver: don't actually merge objects when ar -L works - - - - - a9f0e68e by Ben Gamari at 2022-08-24T02:38:13-04:00 rts: Consistently use MiB in stats output Previously we would say `MB` even where we meant `MiB`. - - - - - a90298cc by Simon Peyton Jones at 2022-08-25T08:38:16+01:00 Fix arityType: -fpedantic-bottoms, join points, etc This MR fixes #21694, #21755. It also makes sure that #21948 and fix to #21694. * For #21694 the underlying problem was that we were calling arityType on an expression that had free join points. This is a Bad Bad Idea. See Note [No free join points in arityType]. * To make "no free join points in arityType" work out I had to avoid trying to use eta-expansion for runRW#. This entailed a few changes in the Simplifier's treatment of runRW#. See GHC.Core.Opt.Simplify.Iteration Note [No eta-expansion in runRW#] * I also made andArityType work correctly with -fpedantic-bottoms; see Note [Combining case branches: andWithTail]. * Rewrote Note [Combining case branches: optimistic one-shot-ness] * arityType previously treated join points differently to other let-bindings. This patch makes them unform; arityType analyses the RHS of all bindings to get its ArityType, and extends am_sigs. I realised that, now we have am_sigs giving the ArityType for let-bound Ids, we don't need the (pre-dating) special code in arityType for join points. But instead we need to extend the env for Rec bindings, which weren't doing before. More uniform now. See Note [arityType for let-bindings]. This meant we could get rid of ae_joins, and in fact get rid of EtaExpandArity altogether. Simpler. * And finally, it was the strange treatment of join-point Ids in arityType (involving a fake ABot type) that led to a serious bug: #21755. Fixed by this refactoring, which treats them uniformly; but without breaking #18328. In fact, the arity for recursive join bindings is pretty tricky; see the long Note [Arity for recursive join bindings] in GHC.Core.Opt.Simplify.Utils. That led to more refactoring, including deciding that an Id could have an Arity that is bigger than its JoinArity; see Note [Invariants on join points], item 2(b) in GHC.Core * Make sure that the "demand threshold" for join points in DmdAnal is no bigger than the join-arity. In GHC.Core.Opt.DmdAnal see Note [Demand signatures are computed for a threshold arity based on idArity] * I moved GHC.Core.Utils.exprIsDeadEnd into GHC.Core.Opt.Arity, where it more properly belongs. * Remove an old, redundant hack in FloatOut. The old Note was Note [Bottoming floats: eta expansion] in GHC.Core.Opt.SetLevels. Compile time improves very slightly on average: Metrics: compile_time/bytes allocated --------------------------------------------------------------------------------------- T18223(normal) ghc/alloc 725,808,720 747,839,216 +3.0% BAD T6048(optasm) ghc/alloc 105,006,104 101,599,472 -3.2% GOOD geo. mean -0.2% minimum -3.2% maximum +3.0% For some reason Windows was better T10421(normal) ghc/alloc 125,888,360 124,129,168 -1.4% GOOD T18140(normal) ghc/alloc 85,974,520 83,884,224 -2.4% GOOD T18698b(normal) ghc/alloc 236,764,568 234,077,288 -1.1% GOOD T18923(normal) ghc/alloc 75,660,528 73,994,512 -2.2% GOOD T6048(optasm) ghc/alloc 112,232,512 108,182,520 -3.6% GOOD geo. mean -0.6% I had a quick look at T18223 but it is knee deep in coercions and the size of everything looks similar before and after. I decided to accept that 3% increase in exchange for goodness elsewhere. Metric Decrease: T10421 T18140 T18698b T18923 T6048 Metric Increase: T18223 - - - - - 909edcfc by Ben Gamari at 2022-08-25T10:03:34-04:00 upload_ghc_libs: Add means of passing Hackage credentials - - - - - 28402eed by M Farkas-Dyck at 2022-08-25T10:04:17-04:00 Scrub some partiality in `CommonBlockElim`. - - - - - 54affbfa by Ben Gamari at 2022-08-25T20:05:31-04:00 hadrian: Fix whitespace Previously this region of Settings.Packages was incorrectly indented. - - - - - c4bba0f0 by Ben Gamari at 2022-08-25T20:05:31-04:00 validate: Drop --legacy flag In preparation for removal of the legacy `make`-based build system. - - - - - 822b0302 by Ben Gamari at 2022-08-25T20:05:31-04:00 gitlab-ci: Drop make build validation jobs In preparation for removal of the `make`-based build system - - - - - 6fd9b0a1 by Ben Gamari at 2022-08-25T20:05:31-04:00 Drop make build system Here we at long last remove the `make`-based build system, it having been replaced with the Shake-based Hadrian build system. Users are encouraged to refer to the documentation in `hadrian/doc` and this [1] blog post for details on using Hadrian. Closes #17527. [1] https://www.haskell.org/ghc/blog/20220805-make-to-hadrian.html - - - - - dbb004b0 by Ben Gamari at 2022-08-25T20:05:31-04:00 Remove testsuite/tests/perf/haddock/.gitignore As noted in #16802, this is no longer needed. Closes #16802. - - - - - fe9d824d by Ben Gamari at 2022-08-25T20:05:31-04:00 Drop hc-build script This has not worked for many, many years and relied on the now-removed `make`-based build system. - - - - - 659502bc by Ben Gamari at 2022-08-25T20:05:31-04:00 Drop mkdirhier This is only used by nofib's dead `dist` target - - - - - 4a426924 by Ben Gamari at 2022-08-25T20:05:31-04:00 Drop mk/{build,install,config}.mk.in - - - - - 46924b75 by Ben Gamari at 2022-08-25T20:05:31-04:00 compiler: Drop comment references to make - - - - - d387f687 by Harry Garrood at 2022-08-25T20:06:10-04:00 Add inits1 and tails1 to Data.List.NonEmpty See https://github.com/haskell/core-libraries-committee/issues/67 - - - - - 8603c921 by Harry Garrood at 2022-08-25T20:06:10-04:00 Add since annotations and changelog entries - - - - - 6b47aa1c by Krzysztof Gogolewski at 2022-08-25T20:06:46-04:00 Fix redundant import This fixes a build error on x86_64-linux-alpine3_12-validate. See the function 'loadExternalPlugins' defined in this file. - - - - - 4786acf7 by sheaf at 2022-08-26T15:05:23-04:00 Pmc: consider any 2 dicts of the same type equal This patch massages the keys used in the `TmOracle` `CoreMap` to ensure that dictionaries of coherent classes give the same key. That is, whenever we have an expression we want to insert or lookup in the `TmOracle` `CoreMap`, we first replace any dictionary `$dict_abcd :: ct` with a value of the form `error @ct`. This allows us to common-up view pattern functions with required constraints whose arguments differed only in the uniques of the dictionaries they were provided, thus fixing #21662. This is a rather ad-hoc change to the keys used in the `TmOracle` `CoreMap`. In the long run, we would probably want to use a different representation for the keys instead of simply using `CoreExpr` as-is. This more ambitious plan is outlined in #19272. Fixes #21662 Updates unix submodule - - - - - f5e0f086 by Krzysztof Gogolewski at 2022-08-26T15:06:01-04:00 Remove label style from printing context Previously, the SDocContext used for code generation contained information whether the labels should use Asm or C style. However, at every individual call site, this is known statically. This removes the parameter to 'PprCode' and replaces every 'pdoc' used to print a label in code style with 'pprCLabel' or 'pprAsmLabel'. The OutputableP instance is now used only for dumps. The output of T15155 changes, it now uses the Asm style (which is faithful to what actually happens). - - - - - 1007829b by Cheng Shao at 2022-08-26T15:06:40-04:00 boot: cleanup legacy args Cleanup legacy boot script args, following removal of the legacy make build system. - - - - - 95fe09da by Simon Peyton Jones at 2022-08-27T00:29:02-04:00 Improve SpecConstr for evals As #21763 showed, we were over-specialising in some cases, when the function involved was doing a simple 'eval', but not taking the value apart, or branching on it. This MR fixes the problem. See Note [Do not specialise evals]. Nofib barely budges, except that spectral/cichelli allocates about 3% less. Compiler bytes-allocated improves a bit geo. mean -0.1% minimum -0.5% maximum +0.0% The -0.5% is on T11303b, for what it's worth. - - - - - 565a8ec8 by Matthew Pickering at 2022-08-27T00:29:39-04:00 Revert "Revert "Refactor SpecConstr to use treat bindings uniformly"" This reverts commit 851d8dd89a7955864b66a3da8b25f1dd88a503f8. This commit was originally reverted due to an increase in space usage. This was diagnosed as because the SCE increased in size and that was being retained by another leak. See #22102 - - - - - 82ce1654 by Matthew Pickering at 2022-08-27T00:29:39-04:00 Avoid retaining bindings via ModGuts held on the stack It's better to overwrite the bindings fields of the ModGuts before starting an iteration as then all the old bindings can be collected as soon as the simplifier has processed them. Otherwise we end up with the old bindings being alive until right at the end of the simplifier pass as the mg_binds field is only modified right at the end. - - - - - 64779dcd by Matthew Pickering at 2022-08-27T00:29:39-04:00 Force imposs_deflt_cons in filterAlts This fixes a pretty serious space leak as the forced thunk would retain `Alt b` values which would then contain reference to a lot of old bindings and other simplifier gunk. The OtherCon unfolding was not forced on subsequent simplifier runs so more and more old stuff would be retained until the end of simplification. Fixing this has a drastic effect on maximum residency for the mmark package which goes from ``` 45,005,401,056 bytes allocated in the heap 17,227,721,856 bytes copied during GC 818,281,720 bytes maximum residency (33 sample(s)) 9,659,144 bytes maximum slop 2245 MiB total memory in use (0 MB lost due to fragmentation) ``` to ``` 45,039,453,304 bytes allocated in the heap 13,128,181,400 bytes copied during GC 331,546,608 bytes maximum residency (40 sample(s)) 7,471,120 bytes maximum slop 916 MiB total memory in use (0 MB lost due to fragmentation) ``` See #21993 for some more discussion. - - - - - a3b23a33 by Matthew Pickering at 2022-08-27T00:29:39-04:00 Use Solo to avoid retaining the SCE but to avoid performing the substitution The use of Solo here allows us to force the selection into the SCE to obtain the Subst but without forcing the substitution to be applied. The resulting thunk is placed into a lazy field which is rarely forced, so forcing it regresses peformance. - - - - - 161a6f1f by Simon Peyton Jones at 2022-08-27T00:30:14-04:00 Fix a nasty loop in Tidy As the remarkably-simple #22112 showed, we were making a black hole in the unfolding of a self-recursive binding. Boo! It's a bit tricky. Documented in GHC.Iface.Tidy, Note [tidyTopUnfolding: avoiding black holes] - - - - - 68e6786f by Giles Anderson at 2022-08-29T00:01:35+02:00 Use TcRnDiagnostic in GHC.Tc.TyCl.Class (#20117) The following `TcRnDiagnostic` messages have been introduced: TcRnIllegalHsigDefaultMethods TcRnBadGenericMethod TcRnWarningMinimalDefIncomplete TcRnDefaultMethodForPragmaLacksBinding TcRnIgnoreSpecialisePragmaOnDefMethod TcRnBadMethodErr TcRnNoExplicitAssocTypeOrDefaultDeclaration - - - - - cbe51ac5 by Simon Peyton Jones at 2022-08-29T04:18:57-04:00 Fix a bug in anyInRnEnvR This bug was a subtle error in anyInRnEnvR, introduced by commit d4d3fe6e02c0eb2117dbbc9df72ae394edf50f06 Author: Andreas Klebinger <klebinger.andreas at gmx.at> Date: Sat Jul 9 01:19:52 2022 +0200 Rule matching: Don't compute the FVs if we don't look at them. The net result was #22028, where a rewrite rule would wrongly match on a lambda. The fix to that function is easy. - - - - - 0154bc80 by sheaf at 2022-08-30T06:05:41-04:00 Various Hadrian bootstrapping fixes - Don't always produce a distribution archive (#21629) - Use correct executable names for ghc-pkg and hsc2hs on windows (we were missing the .exe file extension) - Fix a bug where we weren't using the right archive format on Windows when unpacking the bootstrap sources. Fixes #21629 - - - - - 451b1d90 by Matthew Pickering at 2022-08-30T06:06:16-04:00 ci: Attempt using normal submodule cloning strategy We do not use any recursively cloned submodules, and this protects us from flaky upstream remotes. Fixes #22121 - - - - - 9d5ad7c4 by Pi Delport at 2022-08-30T22:40:46+00:00 Fix typo in Any docs: stray "--" - - - - - 3a002632 by Pi Delport at 2022-08-30T22:40:46+00:00 Fix typo in Any docs: syntatic -> syntactic - - - - - 7f490b13 by Simon Peyton Jones at 2022-08-31T03:53:54-04:00 Add a missing trimArityType This buglet was exposed by #22114, a consequence of my earlier refactoring of arity for join points. - - - - - e6fc820f by Ben Gamari at 2022-08-31T13:16:01+01:00 Bump binary submodule to 0.8.9.1 - - - - - 4c1e7b22 by Ben Gamari at 2022-08-31T13:16:01+01:00 Bump stm submodule to 2.5.1.0 - - - - - 837472b4 by Ben Gamari at 2022-08-31T13:16:01+01:00 users-guide: Document system-cxx-std-lib - - - - - f7a9947a by Douglas Wilson at 2022-08-31T13:16:01+01:00 Update submodule containers to 0.6.6 - - - - - 4ab1c2ca by Douglas Wilson at 2022-08-31T13:16:02+01:00 Update submodule process to 1.6.15.0 - - - - - 1309ea1e by Ben Gamari at 2022-08-31T13:16:02+01:00 Bump directory submodule to 1.3.7.1 - - - - - 7962a33a by Douglas Wilson at 2022-08-31T13:16:02+01:00 Bump text submodule to 2.0.1 - - - - - fd8d80c3 by Ben Gamari at 2022-08-31T13:26:52+01:00 Bump deepseq submodule to 1.4.8.0 - - - - - a9baafac by Ben Gamari at 2022-08-31T13:26:52+01:00 Add dates to base, ghc-prim changelogs - - - - - 2cee323c by Ben Gamari at 2022-08-31T13:26:52+01:00 Update autoconf scripts Scripts taken from autoconf 02ba26b218d3d3db6c56e014655faf463cefa983 - - - - - e62705ff by Ben Gamari at 2022-08-31T13:26:53+01:00 Bump bytestring submodule to 0.11.3.1 - - - - - f7b4dcbd by Douglas Wilson at 2022-08-31T13:26:53+01:00 Update submodule Cabal to tag Cabal-v3.8.1.0 closes #21931 - - - - - e8eaf807 by Matthew Pickering at 2022-08-31T18:27:57-04:00 Refine in-tree compiler args for --test-compiler=stage1 Some of the logic to calculate in-tree arguments was not correct for the stage1 compiler. Namely we were not correctly reporting whether we were building static or dynamic executables and whether debug assertions were enabled. Fixes #22096 - - - - - 6b2f7ffe by Matthew Pickering at 2022-08-31T18:27:57-04:00 Make ghcDebugAssertions into a Stage predicate (Stage -> Bool) We also care whether we have debug assertions enabled for a stage one compiler, but the way which we turned on the assertions was quite different from the stage2 compiler. This makes the logic for turning on consistent across both and has the advantage of being able to correct determine in in-tree args whether a flavour enables assertions or not. Ticket #22096 - - - - - 15111af6 by Zubin Duggal at 2022-09-01T01:18:50-04:00 Add regression test for #21550 This was fixed by ca90ffa321a31842a32be1b5b6e26743cd677ec5 "Use local instances with least superclass depth" - - - - - 7d3a055d by Krzysztof Gogolewski at 2022-09-01T01:19:26-04:00 Minor cleanup - Remove mkHeteroCoercionType, sdocImpredicativeTypes, isStateType (unused), isCoVar_maybe (duplicated by getCoVar_maybe) - Replace a few occurrences of voidPrimId with (# #). void# is a deprecated synonym for the unboxed tuple. - Use showSDoc in :show linker. This makes it consistent with the other :show commands - - - - - 31a8989a by Tommy Bidne at 2022-09-01T12:01:20-04:00 Change Ord defaults per CLC proposal Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/24#issuecomment-1233331267 - - - - - 7f527f01 by Matthew Pickering at 2022-09-01T12:01:56-04:00 Fix bootstrap with ghc-9.0 It turns out Solo is a very recent addition to base, so for older GHC versions we just defined it inline here the one place we use it in the compiler. - - - - - d2be80fd by Sebastian Graf at 2022-09-05T23:12:14-04:00 DmdAnal: Don't panic in addCaseBndrDmd (#22039) Rather conservatively return Top. See Note [Untyped demand on case-alternative binders]. I also factored `addCaseBndrDmd` into two separate functions `scrutSubDmd` and `fieldBndrDmds`. Fixes #22039. - - - - - 25f68ace by Ben Gamari at 2022-09-05T23:12:50-04:00 gitlab-ci: Ensure that ghc derivation is in scope Previously the lint-ci job attempted to use cabal-install (specifically `cabal update`) without a GHC in PATH. However, cabal-install-3.8 appears to want GHC, even for `cabal update`. - - - - - f37b621f by sheaf at 2022-09-06T11:51:53+00:00 Update instances.rst, clarifying InstanceSigs Fixes #22103 - - - - - d4f908f7 by Jan Hrček at 2022-09-06T15:36:58-04:00 Fix :add docs in user guide - - - - - 808bb793 by Cheng Shao at 2022-09-06T15:37:35-04:00 ci: remove unused build_make/test_make in ci script - - - - - d0a2efb2 by Eric Lindblad at 2022-09-07T16:42:45-04:00 typo - - - - - fac0098b by Eric Lindblad at 2022-09-07T16:42:45-04:00 typos - - - - - a581186f by Eric Lindblad at 2022-09-07T16:42:45-04:00 whitespace - - - - - 04a738cb by Cheng Shao at 2022-09-07T16:43:22-04:00 CmmToAsm: remove unused ModLocation from NatM_State - - - - - ee1cfaa9 by Krzysztof Gogolewski at 2022-09-07T16:43:58-04:00 Minor SDoc cleanup Change calls to renderWithContext with showSDocOneLine; it's more efficient and explanatory. Remove polyPatSig (unused) - - - - - 7918265d by Krzysztof Gogolewski at 2022-09-07T16:43:58-04:00 Remove Outputable Char instance Use 'text' instead of 'ppr'. Using 'ppr' on the list "hello" rendered as "h,e,l,l,o". - - - - - 77209ab3 by Georgi Lyubenov at 2022-09-08T17:14:36+03:00 Export liftA2 from Prelude Changes: In order to be warning free and compatible, we hide Applicative(..) from Prelude in a few places and instead import it directly from Control.Applicative. Please see the migration guide at https://github.com/haskell/core-libraries-committee/blob/main/guides/export-lifta2-prelude.md for more details. This means that Applicative is now exported in its entirety from Prelude. Motivation: This change is motivated by a few things: * liftA2 is an often used function, even more so than (<*>) for some people. * When implementing Applicative, the compiler will prompt you for either an implementation of (<*>) or of liftA2, but trying to use the latter ends with an error, without further imports. This could be confusing for newbies. * For teaching, it is often times easier to introduce liftA2 first, as it is a natural generalisation of fmap. * This change seems to have been unanimously and enthusiastically accepted by the CLC members, possibly indicating a lot of love for it. * This change causes very limited breakage, see the linked issue below for an investigation on this. See https://github.com/haskell/core-libraries-committee/issues/50 for the surrounding discussion and more details. - - - - - 442a94e8 by Georgi Lyubenov at 2022-09-08T17:14:36+03:00 Add changelog entry for liftA2 export from Prelude - - - - - fb968680 by Georgi Lyubenov at 2022-09-08T17:14:36+03:00 Bump submodule containers to one with liftA2 warnings fixed - - - - - f54ff818 by Georgi Lyubenov at 2022-09-08T17:14:36+03:00 Bump submodule Cabal to one with liftA2 warnings fixed - - - - - a4b34808 by Georgi Lyubenov at 2022-09-08T17:14:36+03:00 Isolate some Applicative hidings to GHC.Prelude By reexporting the entirety of Applicative from GHC.Prelude, we can save ourselves some `hiding` and importing of `Applicative` in consumers of GHC.Prelude. This also has the benefit of isolating this type of change to GHC.Prelude, so that people in the future don't have to think about it. - - - - - 9c4ea90c by Cheng Shao at 2022-09-08T17:49:47-04:00 CmmToC: enable 64-bit CallishMachOp on 32-bit targets Normally, the unregisterised builds avoid generating 64-bit CallishMachOp in StgToCmm, so CmmToC doesn't support these. However, there do exist cases where we'd like to invoke cmmToC for other cmm inputs which may contain such CallishMachOps, and it's a rather low effort to add support for these since they only require calling into existing ghc-prim cbits. - - - - - 04062510 by Alexis King at 2022-09-11T11:30:32+02:00 Add native delimited continuations to the RTS This patch implements GHC proposal 313, "Delimited continuation primops", by adding native support for delimited continuations to the GHC RTS. All things considered, the patch is relatively small. It almost exclusively consists of changes to the RTS; the compiler itself is essentially unaffected. The primops come with fairly extensive Haddock documentation, and an overview of the implementation strategy is given in the Notes in rts/Continuation.c. This first stab at the implementation prioritizes simplicity over performance. Most notably, every continuation is always stored as a single, contiguous chunk of stack. If one of these chunks is particularly large, it can result in poor performance, as the current implementation does not attempt to cleverly squeeze a subset of the stack frames into the existing stack: it must fit all at once. If this proves to be a performance issue in practice, a cleverer strategy would be a worthwhile target for future improvements. - - - - - ee471dfb by Cheng Shao at 2022-09-12T07:07:33-04:00 rts: fix missing dirty_MVAR argument in stg_writeIOPortzh - - - - - a5f9c35f by Cheng Shao at 2022-09-12T13:29:05-04:00 ci: enable parallel compression for xz - - - - - 3a815f30 by Ryan Scott at 2022-09-12T13:29:41-04:00 Windows: Always define _UCRT when compiling C code As seen in #22159, this is required to ensure correct behavior when MinGW-w64 headers are in the `C_INCLUDE_PATH`. Fixes #22159. - - - - - 65a0bd69 by sheaf at 2022-09-13T10:27:52-04:00 Add diagnostic codes This MR adds diagnostic codes, assigning unique numeric codes to error and warnings, e.g. error: [GHC-53633] Pattern match is redundant This is achieved as follows: - a type family GhcDiagnosticCode that gives the diagnostic code for each diagnostic constructor, - a type family ConRecursInto that specifies whether to recur into an argument of the constructor to obtain a more fine-grained code (e.g. different error codes for different 'deriving' errors), - generics machinery to generate the value-level function assigning each diagnostic its error code; see Note [Diagnostic codes using generics] in GHC.Types.Error.Codes. The upshot is that, to add a new diagnostic code, contributors only need to modify the two type families mentioned above. All logic relating to diagnostic codes is thus contained to the GHC.Types.Error.Codes module, with no code duplication. This MR also refactors error message datatypes a bit, ensuring we can derive Generic for them, and cleans up the logic around constraint solver reports by splitting up 'TcSolverReportInfo' into separate datatypes (see #20772). Fixes #21684 - - - - - 362cca13 by sheaf at 2022-09-13T10:27:53-04:00 Diagnostic codes: acccept test changes The testsuite output now contains diagnostic codes, so many tests need to be updated at once. We decided it was best to keep the diagnostic codes in the testsuite output, so that contributors don't inadvertently make changes to the diagnostic codes. - - - - - 08f6730c by Adam Gundry at 2022-09-13T10:28:29-04:00 Allow imports to reference multiple fields with the same name (#21625) If a module `M` exports two fields `f` (using DuplicateRecordFields), we can still accept import M (f) import M hiding (f) and treat `f` as referencing both of them. This was accepted in GHC 9.0, but gave rise to an ambiguity error in GHC 9.2. See #21625. This patch also documents this behaviour in the user's guide, and updates the test for #16745 which is now treated differently. - - - - - c14370d7 by Cheng Shao at 2022-09-13T10:29:07-04:00 ci: remove unused appveyor config - - - - - dc6af9ed by Cheng Shao at 2022-09-13T10:29:45-04:00 compiler: remove unused lazy state monad - - - - - 646d15ad by Eric Lindblad at 2022-09-14T03:13:56-04:00 Fix typos This fixes various typos and spelling mistakes in the compiler. Fixes #21891 - - - - - 7d7e71b0 by Matthew Pickering at 2022-09-14T03:14:32-04:00 hadrian: Bump index state This bumps the index state so a build plan can also be found when booting with 9.4. Fixes #22165 - - - - - 98b62871 by Matthew Pickering at 2022-09-14T17:17:04-04:00 hadrian: Use a stamp file to record when a package is built in a certain way Before this patch which library ways we had built wasn't recorded directly. So you would run into issues if you build the .conf file with some library ways before switching the library ways which you wanted to build. Now there is one stamp file for each way, so in order to build a specific way you can need that specific stamp file rather than going indirectly via the .conf file. - - - - - b42cedbe by Matthew Pickering at 2022-09-14T17:17:04-04:00 hadrian: Inplace/Final package databases There are now two different package databases per stage. An inplace package database contains .conf files which point directly into the build directories. The final package database contains .conf files which point into the installed locations. The inplace .conf files are created before any building happens and have fake ABI hash values. The final .conf files are created after a package finished building and contains the proper ABI has. The motivation for this is to make the dependency structure more fine-grained when building modules. Now a module depends just depends directly on M.o from package p rather than the .conf file depend on the .conf file for package p. So when all of a modules direct dependencies have finished building we can start building it rather than waiting for the whole package to finish. The secondary motivation is that the multi-repl doesn't need to build everything before starting the multi-repl session. We can just configure the inplace package-db and use that in order to start the repl. - - - - - 6515c32b by Matthew Pickering at 2022-09-14T17:17:04-04:00 hadrian: Add some more packages to multi-cradle The main improvement here is to pass `-this-unit-id` for executables so that they can be added to the multi-cradle if desired as well as normal library packages. - - - - - e470e91f by Matthew Pickering at 2022-09-14T17:17:04-04:00 hadrian: Need builders needed by Cabal Configure in parallel Because of the use of withStaged (which needs the necessary builder) when configuring a package, the builds of stage1:exe:ghc-bin and stage1:exe:ghc-pkg where being linearised when building a specific target like `binary-dist-dir`. Thankfully the fix is quite local, to supply all the `withStaged` arguments together so the needs can be batched together and hence performed in parallel. Fixes #22093 - - - - - c4438347 by Matthew Pickering at 2022-09-14T17:17:04-04:00 Remove stage1:exe:ghc-bin pre-build from CI script CI builds stage1:exe:ghc-bin before the binary-dist target which introduces some quite bad linearisation (see #22093) because we don't build stage1 compiler in parallel with anything. Then when the binary-dist target is started we have to build stage1:exe:ghc-pkg before doing anything. Fixes #22094 - - - - - 71d8db86 by Matthew Pickering at 2022-09-14T17:17:04-04:00 hadrian: Add extra implicit dependencies from DeriveLift ghc -M should know that modules which use DeriveLift (or TemplateHaskellQuotes) need TH.Lib.Internal but until it does, we have to add these extra edges manually or the modules will be compiled before TH.Lib.Internal is compiled which leads to a desugarer error. - - - - - 43e574f0 by Greg Steuck at 2022-09-14T17:17:43-04:00 Repair c++ probing on OpenBSD Failure without this change: ``` checking C++ standard library flavour... libc++ checking for linkage against 'c++ c++abi'... failed checking for linkage against 'c++ cxxrt'... failed configure: error: Failed to find C++ standard library ``` - - - - - 534b39ee by Douglas Wilson at 2022-09-14T17:18:21-04:00 libraries: template-haskell: vendor filepath differently Vendoring with ../ in hs-source-dirs prevents upload to hackage. (cherry picked from commit 1446be7586ba70f9136496f9b67f792955447842) - - - - - bdd61cd6 by M Farkas-Dyck at 2022-09-14T22:39:34-04:00 Unbreak Hadrian with Cabal 3.8. - - - - - df04d6ec by Krzysztof Gogolewski at 2022-09-14T22:40:09-04:00 Fix typos - - - - - d6ea8356 by Andreas Klebinger at 2022-09-15T10:12:41+02:00 Tag inference: Fix #21954 by retaining tagsigs of vars in function position. For an expression like: case x of y Con z -> z If we also retain the tag sig for z we can generate code to immediately return it rather than calling out to stg_ap_0_fast. - - - - - 7cce7007 by Andreas Klebinger at 2022-09-15T10:12:42+02:00 Stg.InferTags.Rewrite - Avoid some thunks. - - - - - af0ff3a4 by M Farkas-Dyck at 2022-09-15T21:16:05+00:00 Disuse `mapLoc`. - - - - - 88c4cbdb by Cheng Shao at 2022-09-16T13:57:56-04:00 hadrian: enable -fprof-late only for profiling ways - - - - - d7235831 by Cheng Shao at 2022-09-16T13:57:56-04:00 hadrian: add late_ccs flavour transformer - - - - - ce203753 by Cheng Shao at 2022-09-16T13:58:34-04:00 configure: remove unused program checks - - - - - 9b4c1056 by Pierre Le Marre at 2022-09-16T13:59:16-04:00 Update to Unicode 15.0 - - - - - c6e9b89a by Andrew Lelechenko at 2022-09-16T13:59:55-04:00 Avoid partial head and tail in ghc-heap; replace with total pattern-matching - - - - - 616afde3 by Cheng Shao at 2022-09-16T14:00:33-04:00 hadrian: relax Cabal upper bound to allow building with Cabal-3.8 A follow up of !8910. - - - - - df35d994 by Alexis King at 2022-09-16T14:01:11-04:00 Add links to the continuations haddocks in the docs for each primop fixes #22176 - - - - - 383f7549 by Matthew Pickering at 2022-09-16T21:42:10-04:00 -Wunused-pattern-binds: Recurse into patterns to check whether there's a splice See the examples in #22057 which show we have to traverse deeply into a pattern to determine whether it contains a splice or not. The original implementation pointed this out but deemed this very shallow traversal "too expensive". Fixes #22057 I also fixed an oversight in !7821 which meant we lost a warning which was present in 9.2.2. Fixes #22067 - - - - - 5031bf49 by sheaf at 2022-09-16T21:42:49-04:00 Hadrian: Don't try to build terminfo on Windows Commit b42cedbe introduced a dependency on terminfo on Windows, but that package isn't available on Windows. - - - - - a748fc38 by Matthew Farkas-Dyck at 2022-09-17T10:44:18+00:00 Scrub partiality about `NewOrData`. - - - - - c9afe221 by M Farkas-Dyck at 2022-09-17T06:44:47-04:00 Clean up some. In particular: • Delete some dead code, largely under `GHC.Utils`. • Clean up a few definitions in `GHC.Utils.(Misc, Monad)`. • Clean up `GHC.Types.SrcLoc`. • Derive stock `Functor, Foldable, Traversable` for more types. • Derive more instances for newtypes. Bump haddock submodule. - - - - - 85431ac3 by Cheng Shao at 2022-09-17T06:45:25-04:00 driver: pass original Cmm filename in ModLocation When compiling Cmm, the ml_hs_file field is used to indicate Cmm filename when later generating DWARF information. We should pass the original filename here, otherwise for preprocessed Cmm files, the filename will be a temporary filename which is confusing. - - - - - 63aa0069 by Cheng Shao at 2022-09-17T06:46:04-04:00 rts: remove legacy logging cabal flag - - - - - bd0f4184 by Cheng Shao at 2022-09-17T06:46:04-04:00 rts: make threaded ways optional For certain targets (e.g. wasm32-wasi), the threaded rts is known not to work. This patch adds a "threaded" cabal flag to rts to make threaded rts ways optional. Hadrian enables this flag iff the flavour rtsWays contains threaded ways. - - - - - 2758fb6c by John Ericson at 2022-09-18T03:27:37+02:00 Test output changed because of change to `base` Spooky, but I guess that is intended? - - - - - 8a666ad2 by Ryan Scott at 2022-09-18T08:00:44-04:00 DeriveFunctor: Check for last type variables using dataConUnivTyVars Previously, derived instances of `Functor` (as well as the related classes `Foldable`, `Traversable`, and `Generic1`) would determine which constraints to infer by checking for fields that contain the last type variable. The problem was that this last type variable was taken from `tyConTyVars`. For GADTs, the type variables in each data constructor are _not_ the same type variables as in `tyConTyVars`, leading to #22167. This fixes the issue by instead checking for the last type variable using `dataConUnivTyVars`. (This is very similar in spirit to the fix for #21185, which also replaced an errant use of `tyConTyVars` with type variables from each data constructor.) Fixes #22167. - - - - - 78037167 by Vladislav Zavialov at 2022-09-18T08:01:20-04:00 Lexer: pass updated buffer to actions (#22201) In the lexer, predicates have the following type: { ... } :: user -- predicate state -> AlexInput -- input stream before the token -> Int -- length of the token -> AlexInput -- input stream after the token -> Bool -- True <=> accept the token This is documented in the Alex manual. There is access to the input stream both before and after the token. But when the time comes to construct the token, GHC passes only the initial string buffer to the lexer action. This patch fixes it: - type Action = PsSpan -> StringBuffer -> Int -> P (PsLocated Token) + type Action = PsSpan -> StringBuffer -> Int -> StringBuffer -> P (PsLocated Token) Now lexer actions have access to the string buffer both before and after the token, just like the predicates. It's just a matter of passing an additional function parameter throughout the lexer. - - - - - 75746594 by Vladislav Zavialov at 2022-09-18T08:01:20-04:00 Lexer: define varsym without predicates (#22201) Before this patch, the varsym lexing rules were defined as follows: <0> { @varsym / { precededByClosingToken `alexAndPred` followedByOpeningToken } { varsym_tight_infix } @varsym / { followedByOpeningToken } { varsym_prefix } @varsym / { precededByClosingToken } { varsym_suffix } @varsym { varsym_loose_infix } } Unfortunately, this meant that the predicates 'precededByClosingToken' and 'followedByOpeningToken' were recomputed several times before we could figure out the whitespace context. With this patch, we check for whitespace context directly in the lexer action: <0> { @varsym { with_op_ws varsym } } The checking for opening/closing tokens happens in 'with_op_ws' now, which is part of the lexer action rather than the lexer predicate. - - - - - c1f81b38 by Matthew Farkas-Dyck at 2022-09-19T09:07:05-04:00 Scrub partiality about `NewOrData`. Rather than a list of constructors and a `NewOrData` flag, we define `data DataDefnCons a = NewTypeCon a | DataTypeCons [a]`, which enforces a newtype to have exactly one constructor. Closes #22070. Bump haddock submodule. - - - - - 1e1ed8c5 by Cheng Shao at 2022-09-19T09:07:43-04:00 CmmToC: emit __builtin_unreachable() after noreturn ccalls Emit a __builtin_unreachable() call after a foreign call marked as CmmNeverReturns. This is crucial to generate correctly typed code for wasm; as for other archs, this is also beneficial for the C compiler optimizations. - - - - - 19f45a25 by Jan Hrček at 2022-09-20T03:49:29-04:00 Document :unadd GHCi command in user guide - - - - - 545ff490 by sheaf at 2022-09-20T03:50:06-04:00 Hadrian: merge archives even in stage 0 We now always merge .a archives when ar supports -L. This change is necessary in order to bootstrap GHC using GHC 9.4 on Windows, as nested archives aren't supported. Not doing so triggered bug #21990 when trying to use the Win32 package, with errors such as: Not a x86_64 PE+ file. Unknown COFF 4 type in getHeaderInfo. ld.lld: error: undefined symbol: Win32zm2zi12zi0zi0_SystemziWin32ziConsoleziCtrlHandler_withConsoleCtrlHandler1_info We have to be careful about which ar is meant: in stage 0, the check should be done on the system ar (system-ar in system.config). - - - - - 59fe128c by Vladislav Zavialov at 2022-09-20T03:50:42-04:00 Fix -Woperator-whitespace for consym (part of #19372) Due to an oversight, the initial specification and implementation of -Woperator-whitespace focused on varsym exclusively and completely ignored consym. This meant that expressions such as "x+ y" would produce a warning, while "x:+ y" would not. The specification was corrected in ghc-proposals pull request #404, and this patch updates the implementation accordingly. Regression test included. - - - - - c4c2cca0 by John Ericson at 2022-09-20T13:11:49-04:00 Add `Eq` and `Ord` instances for `Generically1` These are needed so the subsequent commit overhauling the `*1` classes type-checks. - - - - - 7beb356e by John Ericson at 2022-09-20T13:11:50-04:00 Relax instances for Functor combinators; put superclass on Class1 and Class2 to make non-breaking This change is approved by the Core Libraries commitee in https://github.com/haskell/core-libraries-committee/issues/10 The first change makes the `Eq`, `Ord`, `Show`, and `Read` instances for `Sum`, `Product`, and `Compose` match those for `:+:`, `:*:`, and `:.:`. These have the proper flexible contexts that are exactly what the instance needs: For example, instead of ```haskell instance (Eq1 f, Eq1 g, Eq a) => Eq (Compose f g a) where (==) = eq1 ``` we do ```haskell deriving instance Eq (f (g a)) => Eq (Compose f g a) ``` But, that change alone is rather breaking, because until now `Eq (f a)` and `Eq1 f` (and respectively the other classes and their `*1` equivalents too) are *incomparable* constraints. This has always been an annoyance of working with the `*1` classes, and now it would rear it's head one last time as an pesky migration. Instead, we give the `*1` classes superclasses, like so: ```haskell (forall a. Eq a => Eq (f a)) => Eq1 f ``` along with some laws that canonicity is preserved, like: ```haskell liftEq (==) = (==) ``` and likewise for `*2` classes: ```haskell (forall a. Eq a => Eq1 (f a)) => Eq2 f ``` and laws: ```haskell liftEq2 (==) = liftEq1 ``` The `*1` classes also have default methods using the `*2` classes where possible. What this means, as explained in the docs, is that `*1` classes really are generations of the regular classes, indicating that the methods can be split into a canonical lifting combined with a canonical inner, with the super class "witnessing" the laws[1] in a fashion. Circling back to the pragmatics of migrating, note that the superclass means evidence for the old `Sum`, `Product`, and `Compose` instances is (more than) sufficient, so breakage is less likely --- as long no instances are "missing", existing polymorphic code will continue to work. Breakage can occur when a datatype implements the `*1` class but not the corresponding regular class, but this is almost certainly an oversight. For example, containers made that mistake for `Tree` and `Ord`, which I fixed in https://github.com/haskell/containers/pull/761, but fixing the issue by adding `Ord1` was extremely *un*controversial. `Generically1` was also missing `Eq`, `Ord`, `Read,` and `Show` instances. It is unlikely this would have been caught without implementing this change. ----- [1]: In fact, someday, when the laws are part of the language and not only documentation, we might be able to drop the superclass field of the dictionary by using the laws to recover the superclass in an instance-agnostic manner, e.g. with a *non*-overloaded function with type: ```haskell DictEq1 f -> DictEq a -> DictEq (f a) ``` But I don't wish to get into optomizations now, just demonstrate the close relationship between the law and the superclass. Bump haddock submodule because of test output changing. - - - - - 6a8c6b5e by Tom Ellis at 2022-09-20T13:12:27-04:00 Add notes to ghc-prim Haddocks that users should not import it - - - - - ee9d0f5c by matoro at 2022-09-20T13:13:06-04:00 docs: clarify that LLVM codegen is not available in unregisterised mode The current docs are misleading and suggest that it is possible to use LLVM codegen from an unregisterised build. This is not the case; attempting to pass `-fllvm` to an unregisterised build warns: ``` when making flags consistent: warning: Target platform uses unregisterised ABI, so compiling via C ``` and uses the C codegen anyway. - - - - - 854224ed by Nicolas Trangez at 2022-09-20T20:14:29-04:00 rts: remove copy-paste error from `cabal.rts.in` This was, likely accidentally, introduced in 4bf542bf1c. See: 4bf542bf1cdf2fa468457fc0af21333478293476 - - - - - c8ae3add by Matthew Pickering at 2022-09-20T20:15:04-04:00 hadrian: Add extra_dependencies edges for all different ways The hack to add extra dependencies needed by DeriveLift extension missed the cases for profiles and dynamic ways. For the profiled way this leads to errors like: ``` GHC error in desugarer lookup in Data.IntSet.Internal: Failed to load interface for ‘Language.Haskell.TH.Lib.Internal’ Perhaps you haven't installed the profiling libraries for package ‘template-haskell’? Use -v (or `:set -v` in ghci) to see a list of the files searched for. ghc: panic! (the 'impossible' happened) GHC version 9.5.20220916: initDs ``` Therefore the fix is to add these extra edges in. Fixes #22197 - - - - - a971657d by Mon Aaraj at 2022-09-21T06:41:24+03:00 users-guide: fix incorrect ghcappdata folder for unix and windows - - - - - a7eec128 by Torsten Schmits at 2022-09-21T11:06:55+02:00 update tests for the move of tuples to GHC.Tuple.Prim - - - - - 06ccad0d by sheaf at 2022-09-21T08:28:49-04:00 Don't use isUnliftedType in isTagged The function GHC.Stg.InferTags.Rewrite.isTagged can be given the Id of a join point, which might be representation polymorphic. This would cause the call to isUnliftedType to crash. It's better to use typeLevity_maybe instead. Fixes #22212 - - - - - c0ba775d by Teo Camarasu at 2022-09-21T14:30:37-04:00 Add fragmentation statistic to GHC.Stats Implements #21537 - - - - - 2463df2f by Torsten Schmits at 2022-09-21T14:31:24-04:00 Rename Solo[constructor] to MkSolo Part of proposal 475 (https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst) Moves all tuples to GHC.Tuple.Prim Updates ghc-prim version (and bumps bounds in dependents) updates haddock submodule updates deepseq submodule updates text submodule - - - - - 9034fada by Matthew Pickering at 2022-09-22T09:25:29-04:00 Update filepath to filepath-1.4.100.0 Updates submodule * Always rely on vendored filepath * filepath must be built as stage0 dependency because it uses template-haskell. Towards #22098 - - - - - 615e2278 by Krzysztof Gogolewski at 2022-09-22T09:26:05-04:00 Minor refactor around Outputable * Replace 'text . show' and 'ppr' with 'int'. * Remove Outputable.hs-boot, no longer needed * Use pprWithCommas * Factor out instructions in AArch64 codegen - - - - - 461e7b9d by Ross Paterson at 2022-09-24T22:01:25+00:00 match implementation of GHC proposal haskell/haddock#106 (Define Kinds Without Promotion) - - - - - aeafdba5 by Sebastian Graf at 2022-09-27T15:14:54+02:00 Demand: Clear distinction between Call SubDmd and eval Dmd (#21717) In #21717 we saw a reportedly unsound strictness signature due to an unsound definition of plusSubDmd on Calls. This patch contains a description and the fix to the unsoundness as outlined in `Note [Call SubDemand vs. evaluation Demand]`. This fix means we also get rid of the special handling of `-fpedantic-bottoms` in eta-reduction. Thanks to less strict and actually sound strictness results, we will no longer eta-reduce the problematic cases in the first place, even without `-fpedantic-bottoms`. So fixing the unsoundness also makes our eta-reduction code simpler with less hacks to explain. But there is another, more unfortunate side-effect: We *unfix* #21085, but fortunately we have a new fix ready: See `Note [mkCall and plusSubDmd]`. There's another change: I decided to make `Note [SubDemand denotes at least one evaluation]` a lot simpler by using `plusSubDmd` (instead of `lubPlusSubDmd`) even if both argument demands are lazy. That leads to less precise results, but in turn rids ourselves from the need for 4 different `OpMode`s and the complication of `Note [Manual specialisation of lub*Dmd/plus*Dmd]`. The result is simpler code that is in line with the paper draft on Demand Analysis. I left the abandoned idea in `Note [Unrealised opportunity in plusDmd]` for posterity. The fallout in terms of regressions is negligible, as the testsuite and NoFib shows. ``` Program Allocs Instrs -------------------------------------------------------------------------------- hidden +0.2% -0.2% linear -0.0% -0.7% -------------------------------------------------------------------------------- Min -0.0% -0.7% Max +0.2% +0.0% Geometric Mean +0.0% -0.0% ``` Fixes #21717. - - - - - 9b1595c8 by Ross Paterson at 2022-09-27T14:12:01-04:00 implement proposal 106 (Define Kinds Without Promotion) (fixes #6024) includes corresponding changes to haddock submodule - - - - - c2d73cb4 by Andreas Klebinger at 2022-09-28T15:07:30-04:00 Apply some tricks to speed up core lint. Below are the noteworthy changes and if given their impact on compiler allocations for a type heavy module: * Use the oneShot trick on LintM * Use a unboxed tuple for the result of LintM: ~6% reduction * Avoid a thunk for the result of typeKind in lintType: ~5% reduction * lint_app: Don't allocate the error msg in the hot code path: ~4% reduction * lint_app: Eagerly force the in scope set: ~4% * nonDetCmpType: Try to short cut using reallyUnsafePtrEquality#: ~2% * lintM: Use a unboxed maybe for the `a` result: ~12% * lint_app: make go_app tail recursive to avoid allocating the go function as heap closure: ~7% * expandSynTyCon_maybe: Use a specialized data type For a less type heavy module like nofib/spectral/simple compiled with -O -dcore-lint allocations went down by ~24% and compile time by ~9%. ------------------------- Metric Decrease: T1969 ------------------------- - - - - - b74b6191 by sheaf at 2022-09-28T15:08:10-04:00 matchLocalInst: do domination analysis When multiple Given quantified constraints match a Wanted, and there is a quantified constraint that dominates all others, we now pick it to solve the Wanted. See Note [Use only the best matching quantified constraint]. For example: [G] d1: forall a b. ( Eq a, Num b, C a b ) => D a b [G] d2: forall a . C a Int => D a Int [W] {w}: D a Int When solving the Wanted, we find that both Givens match, but we pick the second, because it has a weaker precondition, C a Int, compared to (Eq a, Num Int, C a Int). We thus say that d2 dominates d1; see Note [When does a quantified instance dominate another?]. This domination test is done purely in terms of superclass expansion, in the function GHC.Tc.Solver.Interact.impliedBySCs. We don't attempt to do a full round of constraint solving; this simple check suffices for now. Fixes #22216 and #22223 - - - - - 2a53ac18 by Simon Peyton Jones at 2022-09-28T17:49:09-04:00 Improve aggressive specialisation This patch fixes #21286, by not unboxing dictionaries in worker/wrapper (ever). The main payload is tiny: * In `GHC.Core.Opt.DmdAnal.finaliseArgBoxities`, do not unbox dictionaries in `get_dmd`. See Note [Do not unbox class dictionaries] in that module * I also found that imported wrappers were being fruitlessly specialised, so I fixed that too, in canSpecImport. See Note [Specialising imported functions] point (2). In doing due diligence in the testsuite I fixed a number of other things: * Improve Note [Specialising unfoldings] in GHC.Core.Unfold.Make, and Note [Inline specialisations] in GHC.Core.Opt.Specialise, and remove duplication between the two. The new Note describes how we specialise functions with an INLINABLE pragma. And simplify the defn of `spec_unf` in `GHC.Core.Opt.Specialise.specCalls`. * Improve Note [Worker/wrapper for INLINABLE functions] in GHC.Core.Opt.WorkWrap. And (critially) make an actual change which is to propagate the user-written pragma from the original function to the wrapper; see `mkStrWrapperInlinePrag`. * Write new Note [Specialising imported functions] in GHC.Core.Opt.Specialise All this has a big effect on some compile times. This is compiler/perf, showing only changes over 1%: Metrics: compile_time/bytes allocated ------------------------------------- LargeRecord(normal) -50.2% GOOD ManyConstructors(normal) +1.0% MultiLayerModulesTH_OneShot(normal) +2.6% PmSeriesG(normal) -1.1% T10547(normal) -1.2% T11195(normal) -1.2% T11276(normal) -1.0% T11303b(normal) -1.6% T11545(normal) -1.4% T11822(normal) -1.3% T12150(optasm) -1.0% T12234(optasm) -1.2% T13056(optasm) -9.3% GOOD T13253(normal) -3.8% GOOD T15164(normal) -3.6% GOOD T16190(normal) -2.1% T16577(normal) -2.8% GOOD T16875(normal) -1.6% T17836(normal) +2.2% T17977b(normal) -1.0% T18223(normal) -33.3% GOOD T18282(normal) -3.4% GOOD T18304(normal) -1.4% T18698a(normal) -1.4% GOOD T18698b(normal) -1.3% GOOD T19695(normal) -2.5% GOOD T5837(normal) -2.3% T9630(normal) -33.0% GOOD WWRec(normal) -9.7% GOOD hard_hole_fits(normal) -2.1% GOOD hie002(normal) +1.6% geo. mean -2.2% minimum -50.2% maximum +2.6% I diligently investigated some of the big drops. * Caused by not doing w/w for dictionaries: T13056, T15164, WWRec, T18223 * Caused by not fruitlessly specialising wrappers LargeRecord, T9630 For runtimes, here is perf/should+_run: Metrics: runtime/bytes allocated -------------------------------- T12990(normal) -3.8% T5205(normal) -1.3% T9203(normal) -10.7% GOOD haddock.Cabal(normal) +0.1% haddock.base(normal) -1.1% haddock.compiler(normal) -0.3% lazy-bs-alloc(normal) -0.2% ------------------------------------------ geo. mean -0.3% minimum -10.7% maximum +0.1% I did not investigate exactly what happens in T9203. Nofib is a wash: +-------------------------------++--+-----------+-----------+ | || | tsv (rel) | std. err. | +===============================++==+===========+===========+ | real/anna || | -0.13% | 0.0% | | real/fem || | +0.13% | 0.0% | | real/fulsom || | -0.16% | 0.0% | | real/lift || | -1.55% | 0.0% | | real/reptile || | -0.11% | 0.0% | | real/smallpt || | +0.51% | 0.0% | | spectral/constraints || | +0.20% | 0.0% | | spectral/dom-lt || | +1.80% | 0.0% | | spectral/expert || | +0.33% | 0.0% | +===============================++==+===========+===========+ | geom mean || | | | +-------------------------------++--+-----------+-----------+ I spent quite some time investigating dom-lt, but it's pretty complicated. See my note on !7847. Conclusion: it's just a delicate inlining interaction, and we have plenty of those. Metric Decrease: LargeRecord T13056 T13253 T15164 T16577 T18223 T18282 T18698a T18698b T19695 T9630 WWRec hard_hole_fits T9203 - - - - - addeefc0 by Simon Peyton Jones at 2022-09-28T17:49:09-04:00 Refactor UnfoldingSource and IfaceUnfolding I finally got tired of the way that IfaceUnfolding reflected a previous structure of unfoldings, not the current one. This MR refactors UnfoldingSource and IfaceUnfolding to be simpler and more consistent. It's largely just a refactor, but in UnfoldingSource (which moves to GHC.Types.Basic, since it is now used in IfaceSyn too), I distinguish between /user-specified/ and /system-generated/ stable unfoldings. data UnfoldingSource = VanillaSrc | StableUserSrc -- From a user-specified pragma | StableSystemSrc -- From a system-generated unfolding | CompulsorySrc This has a minor effect in CSE (see the use of isisStableUserUnfolding in GHC.Core.Opt.CSE), which I tripped over when working on specialisation, but it seems like a Good Thing to know anyway. - - - - - 7be6f9a4 by Simon Peyton Jones at 2022-09-28T17:49:09-04:00 INLINE/INLINEABLE pragmas in Foreign.Marshal.Array Foreign.Marshal.Array contains many small functions, all of which are overloaded, and which are critical for performance. Yet none of them had pragmas, so it was a fluke whether or not they got inlined. This patch makes them all either INLINE (small ones) or INLINEABLE and hence specialisable (larger ones). See Note [Specialising array operations] in that module. - - - - - b0c89dfa by Jade Lovelace at 2022-09-28T17:49:49-04:00 Export OnOff from GHC.Driver.Session I was working on fixing an issue where HLS was trying to pass its DynFlags to HLint, but didn't pass any of the disabled language extensions, which HLint would then assume are on because of their default values. Currently it's not possible to get any of the "No" flags because the `DynFlags.extensions` field can't really be used since it is [OnOff Extension] and OnOff is not exported. So let's export it. - - - - - 2f050687 by Andrew Lelechenko at 2022-09-28T17:50:28-04:00 Avoid Data.List.group; prefer Data.List.NonEmpty.group This allows to avoid further partiality, e. g., map head . group is replaced by map NE.head . NE.group, and there are less panic calls. - - - - - bc0020fa by M Farkas-Dyck at 2022-09-28T22:51:59-04:00 Clean up `findWiredInUnit`. In particular, avoid `head`. - - - - - 6a2eec98 by Andrew Lelechenko at 2022-09-28T22:52:38-04:00 Eliminate headFS, use unconsFS instead A small step towards #22185 to avoid partial functions + safe implementation of `startsWithUnderscore`. - - - - - 5a535172 by Sebastian Graf at 2022-09-29T17:04:20+02:00 Demand: Format Call SubDemands `Cn(sd)` as `C(n,sd)` (#22231) Justification in #22231. Short form: In a demand like `1C1(C1(L))` it was too easy to confuse which `1` belongs to which `C`. Now that should be more obvious. Fixes #22231 - - - - - ea0083bf by Bryan Richter at 2022-09-29T15:48:38-04:00 Revert "ci: enable parallel compression for xz" Combined wxth XZ_OPT=9, this blew the memory capacity of CI runners. This reverts commit a5f9c35f5831ef5108e87813a96eac62803852ab. - - - - - f5e8f493 by Sebastian Graf at 2022-09-30T18:42:13+02:00 Boxity: Don't update Boxity unless worker/wrapper follows (#21754) A small refactoring in our Core Opt pipeline and some new functions for transfering argument boxities from one signature to another to facilitate `Note [Don't change boxity without worker/wrapper]`. Fixes #21754. - - - - - 4baf7b1c by M Farkas-Dyck at 2022-09-30T17:45:47-04:00 Scrub various partiality involving empty lists. Avoids some uses of `head` and `tail`, and some panics when an argument is null. - - - - - 95ead839 by Alexis King at 2022-10-01T00:37:43-04:00 Fix a bug in continuation capture across multiple stack chunks - - - - - 22096652 by Andrew Lelechenko at 2022-10-01T00:38:22-04:00 Enforce internal invariant of OrdList and fix bugs in viewCons / viewSnoc `viewCons` used to ignore `Many` constructor completely, returning `VNothing`. `viewSnoc` violated internal invariant of `Many` being a non-empty list. - - - - - 48ab9ca5 by Nicolas Trangez at 2022-10-04T20:34:10-04:00 chore: extend `.editorconfig` for C files - - - - - b8df5c72 by Brandon Chinn at 2022-10-04T20:34:46-04:00 Fix docs for pattern synonyms - - - - - 463ffe02 by Oleg Grenrus at 2022-10-04T20:35:24-04:00 Use sameByteArray# in sameByteArray - - - - - fbe1e86e by Pierre Le Marre at 2022-10-05T15:58:43+02:00 Minor fixes following Unicode 15.0.0 update - Fix changelog for Unicode 15.0.0 - Fix the checksums of the downloaded Unicode files, in base's tool: "ucd2haskell". - - - - - 8a31d02e by Cheng Shao at 2022-10-05T20:40:41-04:00 rts: don't enforce aligned((8)) on 32-bit targets We simply need to align to the word size for pointer tagging to work. On 32-bit targets, aligned((8)) is wasteful. - - - - - 532de368 by Ryan Scott at 2022-10-06T07:45:46-04:00 Export symbolSing, SSymbol, and friends (CLC#85) This implements this Core Libraries Proposal: https://github.com/haskell/core-libraries-committee/issues/85 In particular, it: 1. Exposes the `symbolSing` method of `KnownSymbol`, 2. Exports the abstract `SSymbol` type used in `symbolSing`, and 3. Defines an API for interacting with `SSymbol`. This also makes corresponding changes for `natSing`/`KnownNat`/`SNat` and `charSing`/`KnownChar`/`SChar`. This fixes #15183 and addresses part (2) of #21568. - - - - - d83a92e6 by sheaf at 2022-10-07T07:36:30-04:00 Remove mention of make from README.md - - - - - 945e8e49 by Andrew Lelechenko at 2022-10-10T17:13:31-04:00 Add a newline before since pragma in Data.Array.Byte - - - - - 44fcdb04 by Vladislav Zavialov at 2022-10-10T17:14:06-04:00 Parser/PostProcess: rename failOp* functions There are three functions named failOp* in the parser: failOpNotEnabledImportQualifiedPost failOpImportQualifiedTwice failOpFewArgs Only the last one has anything to do with operators. The other two were named this way either by mistake or due to a misunderstanding of what "op" stands for. This small patch corrects this. - - - - - 96d32ff2 by Simon Peyton Jones at 2022-10-10T22:30:21+01:00 Make rewrite rules "win" over inlining If a rewrite rule and a rewrite rule compete in the simplifier, this patch makes sure that the rewrite rule "win". That is, in general a bit fragile, but it's a huge help when making specialisation work reliably, as #21851 and #22097 showed. The change is fairly straightforwad, and documented in Note [Rewrite rules and inlining] in GHC.Core.Opt.Simplify.Iteration. Compile-times change, up and down a bit -- in some cases because we get better specialisation. But the payoff (more reliable specialisation) is large. Metrics: compile_time/bytes allocated ----------------------------------------------- T10421(normal) +3.7% BAD T10421a(normal) +5.5% T13253(normal) +1.3% T14052(ghci) +1.8% T15304(normal) -1.4% T16577(normal) +3.1% BAD T17516(normal) +2.3% T17836(normal) -1.9% T18223(normal) -1.8% T8095(normal) -1.3% T9961(normal) +2.5% BAD geo. mean +0.0% minimum -1.9% maximum +5.5% Nofib results are (bytes allocated) +-------------------------------++----------+ | ||tsv (rel) | +===============================++==========+ | imaginary/paraffins || +0.27% | | imaginary/rfib || -0.04% | | real/anna || +0.02% | | real/fem || -0.04% | | real/fluid || +1.68% | | real/gamteb || -0.34% | | real/gg || +1.54% | | real/hidden || -0.01% | | real/hpg || -0.03% | | real/infer || -0.03% | | real/prolog || +0.02% | | real/veritas || -0.47% | | shootout/fannkuch-redux || -0.03% | | shootout/k-nucleotide || -0.02% | | shootout/n-body || -0.06% | | shootout/spectral-norm || -0.01% | | spectral/cryptarithm2 || +1.25% | | spectral/fibheaps || +18.33% | | spectral/last-piece || -0.34% | +===============================++==========+ | geom mean || +0.17% | There are extensive notes in !8897 about the regressions. Briefly * fibheaps: there was a very delicately balanced inlining that tipped over the wrong way after this change. * cryptarithm2 and paraffins are caused by #22274, which is a separate issue really. (I.e. the right fix is *not* to make inlining "win" over rules.) So I'm accepting these changes Metric Increase: T10421 T16577 T9961 - - - - - ed4b5885 by Joachim Breitner at 2022-10-10T23:16:11-04:00 Utils.JSON: do not escapeJsonString in ToJson String instance as `escapeJsonString` is used in `renderJSON`, so the `JSString` constructor is meant to carry the unescaped string. - - - - - fbb88740 by Matthew Pickering at 2022-10-11T12:48:45-04:00 Tidy implicit binds We want to put implicit binds into fat interface files, so the easiest thing to do seems to be to treat them uniformly with other binders. - - - - - e058b138 by Matthew Pickering at 2022-10-11T12:48:45-04:00 Interface Files with Core Definitions This commit adds three new flags * -fwrite-if-simplified-core: Writes the whole core program into an interface file * -fbyte-code-and-object-code: Generate both byte code and object code when compiling a file * -fprefer-byte-code: Prefer to use byte-code if it's available when running TH splices. The goal for including the core bindings in an interface file is to be able to restart the compiler pipeline at the point just after simplification and before code generation. Once compilation is restarted then code can be created for the byte code backend. This can significantly speed up start-times for projects in GHCi. HLS already implements its own version of these extended interface files for this reason. Preferring to use byte-code means that we can avoid some potentially expensive code generation steps (see #21700) * Producing object code is much slower than producing bytecode, and normally you need to compile with `-dynamic-too` to produce code in the static and dynamic way, the dynamic way just for Template Haskell execution when using a dynamically linked compiler. * Linking many large object files, which happens once per splice, can be quite expensive compared to linking bytecode. And you can get GHC to compile the necessary byte code so `-fprefer-byte-code` has access to it by using `-fbyte-code-and-object-code`. Fixes #21067 - - - - - 9789ea8e by Matthew Pickering at 2022-10-11T12:48:45-04:00 Teach -fno-code about -fprefer-byte-code This patch teachs the code generation logic of -fno-code about -fprefer-byte-code, so that if we need to generate code for a module which prefers byte code, then we generate byte code rather than object code. We keep track separately which modules need object code and which byte code and then enable the relevant code generation for each. Typically the option will be enabled globally so one of these sets should be empty and we will just turn on byte code or object code generation. We also fix the bug where we would generate code for a module which enables Template Haskell despite the fact it was unecessary. Fixes #22016 - - - - - caced757 by Simon Peyton Jones at 2022-10-11T12:49:21-04:00 Don't keep exit join points so much We were religiously keeping exit join points throughout, which had some bad effects (#21148, #22084). This MR does two things: * Arranges that exit join points are inhibited from inlining only in /one/ Simplifier pass (right after Exitification). See Note [Be selective about not-inlining exit join points] in GHC.Core.Opt.Exitify It's not a big deal, but it shaves 0.1% off compile times. * Inline used-once non-recursive join points very aggressively Given join j x = rhs in joinrec k y = ....j x.... where this is the only occurrence of `j`, we want to inline `j`. (Unless sm_keep_exits is on.) See Note [Inline used-once non-recursive join points] in GHC.Core.Opt.Simplify.Utils This is just a tidy-up really. It doesn't change allocation, but getting rid of a binding is always good. Very effect on nofib -- some up and down. - - - - - 284cf387 by Simon Peyton Jones at 2022-10-11T12:49:21-04:00 Make SpecConstr bale out less often When doing performance debugging on #22084 / !8901, I found that the algorithm in SpecConstr.decreaseSpecCount was so aggressive that if there were /more/ specialisations available for an outer function, that could more or less kill off specialisation for an /inner/ function. (An example was in nofib/spectral/fibheaps.) This patch makes it a bit more aggressive, by dividing by 2, rather than by the number of outer specialisations. This makes the program bigger, temporarily: T19695(normal) ghc/alloc +11.3% BAD because we get more specialisation. But lots of other programs compile a bit faster and the geometric mean in perf/compiler is 0.0%. Metric Increase: T19695 - - - - - 66af1399 by Cheng Shao at 2022-10-11T12:49:59-04:00 CmmToC: emit explicit tail calls when the C compiler supports it Clang 13+ supports annotating a return statement using the musttail attribute, which guarantees that it lowers to a tail call if compilation succeeds. This patch takes advantage of that feature for the unregisterised code generator. The configure script tests availability of the musttail attribute, if it's available, the Cmm tail calls will become C tail calls that avoids the mini interpreter trampoline overhead. Nothing is affected if the musttail attribute is not supported. Clang documentation: https://clang.llvm.org/docs/AttributeReference.html#musttail - - - - - 7f0decd5 by Matthew Pickering at 2022-10-11T12:50:40-04:00 Don't include BufPos in interface files Ticket #22162 pointed out that the build directory was leaking into the ABI hash of a module because the BufPos depended on the location of the build tree. BufPos is only used in GHC.Parser.PostProcess.Haddock, and the information doesn't need to be propagated outside the context of a module. Fixes #22162 - - - - - dce9f320 by Cheng Shao at 2022-10-11T12:51:19-04:00 CLabel: fix isInfoTableLabel isInfoTableLabel does not take Cmm info table into account. This patch is required for data section layout of wasm32 NCG to work. - - - - - da679f2e by Andrew Lelechenko at 2022-10-11T18:02:59-04:00 Extend documentation for Data.List, mostly wrt infinite lists - - - - - 9c099387 by jwaldmann at 2022-10-11T18:02:59-04:00 Expand comment for Data.List.permutations - - - - - d3863cb7 by Andrew Lelechenko at 2022-10-11T18:03:37-04:00 ByteArray# is unlifted, not unboxed - - - - - f6260e8b by Ben Gamari at 2022-10-11T23:45:10-04:00 rts: Add missing declaration of stg_noDuplicate - - - - - 69ccec2c by Ben Gamari at 2022-10-11T23:45:10-04:00 base: Move CString, CStringLen to GHC.Foreign - - - - - f6e8feb4 by Ben Gamari at 2022-10-11T23:45:10-04:00 base: Move IPE helpers to GHC.InfoProv - - - - - 866c736e by Ben Gamari at 2022-10-11T23:45:10-04:00 rts: Refactor IPE tracing support - - - - - 6b0d2022 by Ben Gamari at 2022-10-11T23:45:10-04:00 Refactor IPE initialization Here we refactor the representation of info table provenance information in object code to significantly reduce its size and link-time impact. Specifically, we deduplicate strings and represent them as 32-bit offsets into a common string table. In addition, we rework the registration logic to eliminate allocation from the registration path, which is run from a static initializer where things like allocation are technically undefined behavior (although it did previously seem to work). For similar reasons we eliminate lock usage from registration path, instead relying on atomic CAS. Closes #22077. - - - - - 9b572d54 by Ben Gamari at 2022-10-11T23:45:10-04:00 Separate IPE source file from span The source file name can very often be shared across many IPE entries whereas the source coordinates are generally unique. Separate the two to exploit sharing of the former. - - - - - 27978ceb by Krzysztof Gogolewski at 2022-10-11T23:45:46-04:00 Make Cmm Lint messages use dump style Lint errors indicate an internal error in GHC, so it makes sense to use it instead of the user style. This is consistent with Core Lint and STG Lint: https://gitlab.haskell.org/ghc/ghc/-/blob/22096652/compiler/GHC/Core/Lint.hs#L429 https://gitlab.haskell.org/ghc/ghc/-/blob/22096652/compiler/GHC/Stg/Lint.hs#L144 Fixes #22218. - - - - - 64a390d9 by Bryan Richter at 2022-10-12T09:52:51+03:00 Mark T7919 as fragile On x86_64-linux, T7919 timed out ~30 times during July 2022. And again ~30 times in September 2022. - - - - - 481467a5 by Ben Gamari at 2022-10-12T08:08:37-04:00 rts: Don't hint inlining of appendToRunQueue These hints have resulted in compile-time warnings due to failed inlinings for quite some time. Moreover, it's quite unlikely that inlining them is all that beneficial given that they are rather sizeable functions. Resolves #22280. - - - - - 81915089 by Curran McConnell at 2022-10-12T16:32:26-04:00 remove name shadowing - - - - - 626652f7 by Tamar Christina at 2022-10-12T16:33:13-04:00 winio: do not re-translate input when handle is uncooked - - - - - 5172789a by Charles Taylor at 2022-10-12T16:33:57-04:00 Unrestricted OverloadedLabels (#11671) Implements GHC proposal: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0170-unrestricted-overloadedlabels.rst - - - - - ce293908 by Andreas Klebinger at 2022-10-13T05:58:19-04:00 Add a perf test for the generics code pattern from #21839. This code showed a strong shift between compile time (got worse) and run time (got a lot better) recently which is perfectly acceptable. However it wasn't clear why the compile time regression was happening initially so I'm adding this test to make it easier to track such changes in the future. - - - - - 78ab7afe by Ben Gamari at 2022-10-13T05:58:56-04:00 rts/linker: Consolidate initializer/finalizer handling Here we extend our treatment of initializer/finalizer priorities to include ELF and in so doing refactor things to share the implementation with PEi386. As well, I fix a subtle misconception of the ordering behavior for `.ctors`. Fixes #21847. - - - - - 44692713 by Ben Gamari at 2022-10-13T05:58:56-04:00 rts/linker: Add support for .fini sections - - - - - beebf546 by Simon Hengel at 2022-10-13T05:59:37-04:00 Update phases.rst (the name of the original source file is $1, not $2) - - - - - eda6c05e by Finley McIlwaine at 2022-10-13T06:00:17-04:00 Clearer error msg for newtype GADTs with defaulted kind When a newtype introduces GADT eq_specs due to a defaulted RuntimeRep, we detect this and print the error message with explicit kinds. This also refactors newtype type checking to use the new diagnostic infra. Fixes #21447 - - - - - 43ab435a by Pierre Le Marre at 2022-10-14T07:45:43-04:00 Add standard Unicode case predicates isUpperCase and isLowerCase. These predicates use the standard Unicode case properties and are more intuitive than isUpper and isLower. Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/90#issuecomment-1276649403. Fixes #14589 - - - - - aec5a443 by Andrew Lelechenko at 2022-10-14T07:46:21-04:00 Add type signatures in where-clause of Data.List.permutations The type of interleave' is very much revealing, otherwise it's extremely tough to decipher. - - - - - ee0deb80 by Ben Gamari at 2022-10-14T18:29:20-04:00 rts: Use pthread_setname_np correctly on Darwin As noted in #22206, pthread_setname_np on Darwin only supports setting the name of the calling thread. Consequently we must introduce a trampoline which first sets the thread name before entering the thread entrypoint. - - - - - 8eff62a4 by Ben Gamari at 2022-10-14T18:29:57-04:00 testsuite: Add test for #22282 This will complement mpickering's more general port of foundation's numerical testsuite, providing a test for the specific case found in #22282. - - - - - 62a55001 by Ben Gamari at 2022-10-14T18:29:57-04:00 ncg/aarch64: Fix sub-word sign extension yet again In adc7f108141a973b6dcb02a7836eed65d61230e8 we fixed a number of issues to do with sign extension in the AArch64 NCG found by ghc/test-primops>. However, this patch made a critical error, assuming that getSomeReg would allocate a fresh register for the result of its evaluation. However, this is not the case as `getSomeReg (CmmReg r) == r`. Consequently, any mutation of the register returned by `getSomeReg` may have unwanted side-effects on other expressions also mentioning `r`. In the fix listed above, this manifested as the registers containing the operands of binary arithmetic operations being incorrectly sign-extended. This resulted in #22282. Sadly, the rather simple structure of the tests generated by `test-primops` meant that this particular case was not exercised. Even more surprisingly, none of our testsuite caught this case. Here we fix this by ensuring that intermediate sign extension is performed in a fresh register. Fixes #22282. - - - - - 54e41b16 by Teo Camarasu at 2022-10-15T18:09:24+01:00 rts: ensure we are below maxHeapSize after returning megablocks When the heap is heavily block fragmented the live byte size might be low while the memory usage is high. We want to ensure that heap overflow triggers in these cases. We do so by checking that we can return enough megablocks to under maxHeapSize at the end of GC. - - - - - 29bb90db by Teo Camarasu at 2022-10-15T18:09:24+01:00 rts: trigger a major collection if megablock usage exceeds maxHeapSize When the heap is suffering from block fragmentation, live bytes might be low while megablock usage is high. If megablock usage exceeds maxHeapSize, we want to trigger a major GC to try to recover some memory otherwise we will die from a heapOverflow at the end of the GC. Fixes #21927 - - - - - 4a4641ca by Teo Camarasu at 2022-10-15T18:11:29+01:00 Add realease note for #21927 - - - - - f7fd77ef by sheaf at 2022-10-17T14:53:01+02:00 Update Haddock for GHC MR !8563 (configuration of diagnostics) - - - - - c1e5719a by Sebastian Graf at 2022-10-17T11:58:46-04:00 DmdAnal: Look through unfoldings of DataCon wrappers (#22241) Previously, the demand signature we computed upfront for a DataCon wrapper lacked boxity information and was much less precise than the demand transformer for the DataCon worker. In this patch we adopt the solution to look through unfoldings of DataCon wrappers during Demand Analysis, but still attach a demand signature for other passes such as the Simplifier. See `Note [DmdAnal for DataCon wrappers]` for more details. Fixes #22241. - - - - - 8c72411d by Gergő Érdi at 2022-10-17T19:20:04-04:00 Add `Enum (Down a)` instance that swaps `succ` and `pred` See https://github.com/haskell/core-libraries-committee/issues/51 for discussion. The key points driving the implementation are the following two ideas: * For the `Int` type, `comparing (complement @Int)` behaves exactly as an order-swapping `compare @Int`. * `enumFrom @(Down a)` can be implemented in terms of `enumFromThen @a`, if only the corner case of starting at the very end is handled specially - - - - - d80ad2f4 by Alan Zimmerman at 2022-10-17T19:20:40-04:00 Update the check-exact infrastructure to match ghc-exactprint GHC tests the exact print annotations using the contents of utils/check-exact. The same functionality is provided via https://github.com/alanz/ghc-exactprint The latter was updated to ensure it works with all of the files on hackage when 9.2 was released, as well as updated to ensure users of the library could work properly (apply-refact, retrie, etc). This commit brings the changes from ghc-exactprint into GHC/utils/check-exact, adapting for the changes to master. Once it lands, it will form the basis for the 9.4 version of ghc-exactprint. See also discussion around this process at #21355 - - - - - 08ab5419 by Andreas Klebinger at 2022-10-17T19:21:15-04:00 Avoid allocating intermediate lists for non recursive bindings. We do so by having an explicit folding function that doesn't need to allocate intermediate lists first. Fixes #22196 - - - - - ff6275ef by Andreas Klebinger at 2022-10-17T19:21:52-04:00 Testsuite: Add a new tables_next_to_code predicate. And use it to avoid T21710a failing on non-tntc archs. Fixes #22169 - - - - - abb82f38 by Eric Lindblad at 2022-10-17T19:22:33-04:00 example rewrite - - - - - 39beb801 by Eric Lindblad at 2022-10-17T19:22:33-04:00 remove redirect - - - - - 0d9fb651 by Eric Lindblad at 2022-10-17T19:22:33-04:00 use heredoc - - - - - 0fa2d185 by Matthew Pickering at 2022-10-17T19:23:10-04:00 testsuite: Fix typo when setting llvm_ways Since 2014 llvm_ways has been set to [] so none of the tests which use only_ways(llvm_ways) have worked as expected. Hopefully the tests still pass with this typo fix! - - - - - ced664a2 by Krzysztof Gogolewski at 2022-10-17T19:23:10-04:00 Fix T15155l not getting -fllvm - - - - - 0ac60423 by Andreas Klebinger at 2022-10-18T03:34:47-04:00 Fix GHCis interaction with tag inference. I had assumed that wrappers were not inlined in interactive mode. Meaning we would always execute the compiled wrapper which properly takes care of upholding the strict field invariant. This turned out to be wrong. So instead we now run tag inference even when we generate bytecode. In that case only for correctness not performance reasons although it will be still beneficial for runtime in some cases. I further fixed a bug where GHCi didn't tag nullary constructors properly when used as arguments. Which caused segfaults when calling into compiled functions which expect the strict field invariant to be upheld. Fixes #22042 and #21083 ------------------------- Metric Increase: T4801 Metric Decrease: T13035 ------------------------- - - - - - 9ecd1ac0 by M Farkas-Dyck at 2022-10-18T03:35:38-04:00 Make `Functor` a superclass of `TrieMap`, which lets us derive the `map` functions. - - - - - f60244d7 by Ben Gamari at 2022-10-18T03:36:15-04:00 configure: Bump minimum bootstrap GHC version Fixes #22245 - - - - - ba4bd4a4 by Matthew Pickering at 2022-10-18T03:36:55-04:00 Build System: Remove out-of-date comment about make build system Both make and hadrian interleave compilation of modules of different modules and don't respect the package boundaries. Therefore I just remove this comment which points out this "difference". Fixes #22253 - - - - - e1bbd368 by Matthew Pickering at 2022-10-18T16:15:49+02:00 Allow configuration of error message printing This MR implements the idea of #21731 that the printing of a diagnostic method should be configurable at the printing time. The interface of the `Diagnostic` class is modified from: ``` class Diagnostic a where diagnosticMessage :: a -> DecoratedSDoc diagnosticReason :: a -> DiagnosticReason diagnosticHints :: a -> [GhcHint] ``` to ``` class Diagnostic a where type DiagnosticOpts a defaultDiagnosticOpts :: DiagnosticOpts a diagnosticMessage :: DiagnosticOpts a -> a -> DecoratedSDoc diagnosticReason :: a -> DiagnosticReason diagnosticHints :: a -> [GhcHint] ``` and so each `Diagnostic` can implement their own configuration record which can then be supplied by a client in order to dictate how to print out the error message. At the moment this only allows us to implement #21722 nicely but in future it is more natural to separate the configuration of how much information we put into an error message and how much we decide to print out of it. Updates Haddock submodule - - - - - 99dc3e3d by Matthew Pickering at 2022-10-18T16:15:53+02:00 Add -fsuppress-error-contexts to disable printing error contexts in errors In many development environments, the source span is the primary means of seeing what an error message relates to, and the In the expression: and In an equation for: clauses are not particularly relevant. However, they can grow to be quite long, which can make the message itself both feel overwhelming and interact badly with limited-space areas. It's simple to implement this flag so we might as well do it and give the user control about how they see their messages. Fixes #21722 - - - - - 5b3a992f by Dai at 2022-10-19T10:45:45-04:00 Add VecSlot for unboxed sums of SIMD vectors This patch adds the missing `VecRep` case to `primRepSlot` function and all the necessary machinery to carry this new `VecSlot` through code generation. This allows programs involving unboxed sums of SIMD vectors to be written and compiled. Fixes #22187 - - - - - 6d7d9181 by sheaf at 2022-10-19T10:45:45-04:00 Remove SIMD conversions This patch makes it so that packing/unpacking SIMD vectors always uses the right sized types, e.g. unpacking a Word16X4# will give a tuple of Word16#s. As a result, we can get rid of the conversion instructions that were previously required. Fixes #22296 - - - - - 3be48877 by sheaf at 2022-10-19T10:45:45-04:00 Cmm Lint: relax SIMD register assignment check As noted in #22297, SIMD vector registers can be used to store different kinds of values, e.g. xmm1 can be used both to store integer and floating point values. The Cmm type system doesn't properly account for this, so we weaken the Cmm register assignment lint check to only compare widths when comparing a vector type with its allocated vector register. - - - - - f7b7a312 by sheaf at 2022-10-19T10:45:45-04:00 Disable some SIMD tests on non-X86 architectures - - - - - 83638dce by M Farkas-Dyck at 2022-10-19T10:46:29-04:00 Scrub various partiality involving lists (again). Lets us avoid some use of `head` and `tail`, and some panics. - - - - - c3732c62 by M Farkas-Dyck at 2022-10-19T10:47:13-04:00 Enforce invariant of `ListBag` constructor. - - - - - 488d3631 by Andrew Lelechenko at 2022-10-19T10:47:52-04:00 More precise types for fields of OverlappingInstances and UnsafeOverlap in TcSolverReportMsg It's clear from asserts in `GHC.Tc.Errors` that `overlappingInstances_matches` and `unsafeOverlapped` are supposed to be non-empty, and `unsafeOverlap_matches` contains a single instance, but these invariants are immediately lost afterwards and not encoded in types. This patch enforces the invariants by pattern matching and makes types more precise, avoiding asserts and partial functions such as `head`. - - - - - 607ce263 by sheaf at 2022-10-19T10:47:52-04:00 Rename unsafeOverlap_matches -> unsafeOverlap_match in UnsafeOverlap - - - - - 1fab9598 by Matthew Pickering at 2022-10-19T10:48:29-04:00 Add SpliceTypes test for hie files This test checks that typed splices and quotes get the right type information when used in hiefiles. See #21619 - - - - - a8b52786 by Jan Hrček at 2022-10-19T10:49:09-04:00 Small language fixes in 'Using GHC' - - - - - 1dab1167 by Gergő Érdi at 2022-10-19T10:49:51-04:00 Fix typo in `Opt_WriteIfSimplifiedCore`'s name - - - - - b17cfc9c by sheaf at 2022-10-19T10:50:37-04:00 TyEq:N assertion: only for saturated applications The assertion that checked TyEq:N in canEqCanLHSFinish incorrectly triggered in the case of an unsaturated newtype TyCon heading the RHS, even though we can't unwrap such an application. Now, we only trigger an assertion failure in case of a saturated application of a newtype TyCon. Fixes #22310 - - - - - ff6f2228 by M Farkas-Dyck at 2022-10-20T16:15:51-04:00 CoreToStg: purge `DynFlags`. - - - - - 1ebd521f by Matthew Pickering at 2022-10-20T16:16:27-04:00 ci: Make fat014 test robust For some reason I implemented this as a makefile test rather than a ghci_script test. Hopefully making it a ghci_script test makes it more robust. Fixes #22313 - - - - - 8cd6f435 by Curran McConnell at 2022-10-21T02:58:01-04:00 remove a no-warn directive from GHC.Cmm.ContFlowOpt This patch is motivated by the desire to remove the {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} directive at the top of GHC.Cmm.ContFlowOpt. (Based on the text in this coding standards doc, I understand it's a goal of the project to remove such directives.) I chose this task because I'm a new contributor to GHC, and it seemed like a good way to get acquainted with the patching process. In order to address the warning that arose when I removed the no-warn directive, I added a case to removeUnreachableBlocksProc to handle the CmmData constructor. Clearly, since this partial function has not been erroring out in the wild, its inputs are always in practice wrapped by the CmmProc constructor. Therefore the CmmData case is handled by a precise panic (which is an improvement over the partial pattern match from before). - - - - - a2af7c4c by Nicolas Trangez at 2022-10-21T02:58:39-04:00 build: get rid of `HAVE_TIME_H` As advertized by `autoreconf`: > All current systems provide time.h; it need not be checked for. Hence, remove the check for it in `configure.ac` and remove conditional inclusion of the header in `HAVE_TIME_H` blocks where applicable. The `time.h` header was being included in various source files without a `HAVE_TIME_H` guard already anyway. - - - - - 25cdc630 by Nicolas Trangez at 2022-10-21T02:58:39-04:00 rts: remove use of `TIME_WITH_SYS_TIME` `autoreconf` will insert an `m4_warning` when the obsolescent `AC_HEADER_TIME` macro is used: > Update your code to rely only on HAVE_SYS_TIME_H, > then remove this warning and the obsolete code below it. > All current systems provide time.h; it need not be checked for. > Not all systems provide sys/time.h, but those that do, all allow > you to include it and time.h simultaneously. Presence of `sys/time.h` was already checked in an earlier `AC_CHECK_HEADERS` invocation, so `AC_HEADER_TIME` can be dropped and guards relying on `TIME_WITH_SYS_TIME` can be reworked to (unconditionally) include `time.h` and include `sys/time.h` based on `HAVE_SYS_TIME_H`. Note the documentation of `AC_HEADER_TIME` in (at least) Autoconf 2.67 says > This macro is obsolescent, as current systems can include both files > when they exist. New programs need not use this macro. - - - - - 1fe7921c by Eric Lindblad at 2022-10-21T02:59:21-04:00 runhaskell - - - - - e3b3986e by David Feuer at 2022-10-21T03:00:00-04:00 Document how to quote certain names with spaces Quoting a name for Template Haskell is a bit tricky if the second character of that name is a single quote. The User's Guide falsely claimed that it was impossible. Document how to do it. Fixes #22236 - - - - - 0eba81e8 by Krzysztof Gogolewski at 2022-10-21T03:00:00-04:00 Fix syntax - - - - - a4dbd102 by Ben Gamari at 2022-10-21T09:11:12-04:00 Fix manifest filename when writing Windows .rc files As noted in #12971, we previously used `show` which resulted in inappropriate escaping of non-ASCII characters. - - - - - 30f0d9a9 by Ben Gamari at 2022-10-21T09:11:12-04:00 Write response files in UTF-8 on Windows This reverts the workaround introduced in f63c8ef33ec9666688163abe4ccf2d6c0428a7e7, which taught our response file logic to write response files with the `latin1` encoding to workaround `gcc`'s lacking Unicode support. This is now no longer necessary (and in fact actively unhelpful) since we rather use Clang. - - - - - b8304648 by Matthew Farkas-Dyck at 2022-10-21T09:11:56-04:00 Scrub some partiality in `GHC.Core.Opt.Simplify.Utils`. - - - - - 09ec7de2 by Teo Camarasu at 2022-10-21T13:23:07-04:00 template-haskell: Improve documentation of strictness annotation types Before it was undocumentated that DecidedLazy can be returned by reifyConStrictness for strict fields. This can happen when a field has an unlifted type or its the single field of a newtype constructor. Fixes #21380 - - - - - 88172069 by M Farkas-Dyck at 2022-10-21T13:23:51-04:00 Delete `eqExpr`, since GHC 9.4 has been released. - - - - - 86e6549e by Ömer Sinan Ağacan at 2022-10-22T07:41:30-04:00 Introduce a standard thunk for allocating strings Currently for a top-level closure in the form hey = unpackCString# x we generate code like this: Main.hey_entry() // [R1] { info_tbls: [(c2T4, label: Main.hey_info rep: HeapRep static { Thunk } srt: Nothing)] stack_info: arg_space: 8 updfr_space: Just 8 } {offset c2T4: // global _rqm::P64 = R1; if ((Sp + 8) - 24 < SpLim) (likely: False) goto c2T5; else goto c2T6; c2T5: // global R1 = _rqm::P64; call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8; c2T6: // global (_c2T1::I64) = call "ccall" arg hints: [PtrHint, PtrHint] result hints: [PtrHint] newCAF(BaseReg, _rqm::P64); if (_c2T1::I64 == 0) goto c2T3; else goto c2T2; c2T3: // global call (I64[_rqm::P64])() args: 8, res: 0, upd: 8; c2T2: // global I64[Sp - 16] = stg_bh_upd_frame_info; I64[Sp - 8] = _c2T1::I64; R2 = hey1_r2Gg_bytes; Sp = Sp - 16; call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24; } } This code is generated for every string literal. Only difference between top-level closures like this is the argument for the bytes of the string (hey1_r2Gg_bytes in the code above). With this patch we introduce a standard thunk in the RTS, called stg_MK_STRING_info, that does what `unpackCString# x` does, except it gets the bytes address from the payload. Using this, for the closure above, we generate this: Main.hey_closure" { Main.hey_closure: const stg_MK_STRING_info; const 0; // padding for indirectee const 0; // static link const 0; // saved info const hey1_r1Gg_bytes; // the payload } This is much smaller in code. Metric Decrease: T10421 T11195 T12150 T12425 T16577 T18282 T18698a T18698b Co-Authored By: Ben Gamari <ben at well-typed.com> - - - - - 1937016b by Andreas Klebinger at 2022-10-22T07:42:06-04:00 hadrian: Improve error for wrong key/value errors. - - - - - 3d3e85ab by Vladislav Zavialov at 2022-10-22T23:04:06+03:00 Class layout info - - - - - 11fe42d8 by Vladislav Zavialov at 2022-10-23T00:11:50+03:00 Class layout info (#19623) Updates the haddock submodule. - - - - - f0a90c11 by Sven Tennie at 2022-10-24T00:12:51-04:00 Pin used way for test cloneMyStack (#21977) cloneMyStack checks the order of closures on the cloned stack. This may change for different ways. Thus we limit this test to one way (normal). - - - - - 0614e74d by Aaron Allen at 2022-10-24T17:11:21+02:00 Convert Diagnostics in GHC.Tc.Gen.Splice (#20116) Replaces uses of `TcRnUnknownMessage` in `GHC.Tc.Gen.Splice` with structured diagnostics. closes #20116 - - - - - 8d2dbe2d by Andreas Klebinger at 2022-10-24T15:59:41-04:00 Improve stg lint for unboxed sums. It now properly lints cases where sums end up distributed over multiple args after unarise. Fixes #22026. - - - - - 41406da5 by Simon Peyton Jones at 2022-10-25T18:07:03-04:00 Fix binder-swap bug This patch fixes #21229 properly, by avoiding doing a binder-swap on dictionary Ids. This is pretty subtle, and explained in Note [Care with binder-swap on dictionaries]. Test is already in simplCore/should_run/T21229 This allows us to restore a feature to the specialiser that we had to revert: see Note [Specialising polymorphic dictionaries]. (This is done in a separate patch.) I also modularised things, using a new function scrutBinderSwap_maybe in all the places where we are (effectively) doing a binder-swap, notably * Simplify.Iteration.addAltUnfoldings * SpecConstr.extendCaseBndrs In Simplify.Iteration.addAltUnfoldings I also eliminated a guard Many <- idMult case_bndr because we concluded, in #22123, that it was doing no good. - - - - - 5a997e16 by Simon Peyton Jones at 2022-10-25T18:07:03-04:00 Make the specialiser handle polymorphic specialisation Ticket #13873 unexpectedly showed that a SPECIALISE pragma made a program run (a lot) slower, because less specialisation took place overall. It turned out that the specialiser was missing opportunities because of quantified type variables. It was quite easy to fix. The story is given in Note [Specialising polymorphic dictionaries] Two other minor fixes in the specialiser * There is no benefit in specialising data constructor /wrappers/. (They can appear overloaded because they are given a dictionary to store in the constructor.) Small guard in canSpecImport. * There was a buglet in the UnspecArg case of specHeader, in the case where there is a dead binder. We need a LitRubbish filler for the specUnfolding stuff. I expanded Note [Drop dead args from specialisations] to explain. There is a 4% increase in compile time for T15164, because we generate more specialised code. This seems OK. Metric Increase: T15164 - - - - - 7f203d00 by Sylvain Henry at 2022-10-25T18:07:43-04:00 Numeric exceptions: replace FFI calls with primops ghc-bignum needs a way to raise numerical exceptions defined in base package. At the time we used FFI calls into primops defined in the RTS. These FFI calls had to be wrapped into hacky bottoming functions because "foreign import prim" syntax doesn't support giving a bottoming demand to the foreign call (cf #16929). These hacky wrapper functions trip up the JavaScript backend (#21078) because they are polymorphic in their return type. This commit replaces them with primops very similar to raise# but raising predefined exceptions. - - - - - 0988a23d by Sylvain Henry at 2022-10-25T18:08:24-04:00 Enable popcount rewrite rule when cross-compiling The comment applies only when host's word size < target's word size. So we can relax the guard. - - - - - a2f53ac8 by Sylvain Henry at 2022-10-25T18:09:05-04:00 Add GHC.SysTools.Cpp module Move doCpp out of the driver to be able to use it in the upcoming JS backend. - - - - - 1fd7f201 by Ben Gamari at 2022-10-25T18:09:42-04:00 llvm-targets: Add datalayouts for big-endian AArch64 targets Fixes #22311. Thanks to @zeldin for the patch. - - - - - f5a486eb by Krzysztof Gogolewski at 2022-10-25T18:10:19-04:00 Cleanup String/FastString conversions Remove unused mkPtrString and isUnderscoreFS. We no longer use mkPtrString since 1d03d8bef96. Remove unnecessary conversions between FastString and String and back. - - - - - cbde4cb0 by Simon Peyton Jones at 2022-10-25T23:19:18+01:00 Adapt to Constraint-vs-Type See haskell/haddock#21623 and !8750 - - - - - f7bfb40c by Ryan Scott at 2022-10-26T00:01:24-04:00 Broaden the in-scope sets for liftEnvSubst and composeTCvSubst This patch fixes two distinct (but closely related) buglets that were uncovered in #22235: * `liftEnvSubst` used an empty in-scope set, which was not wide enough to cover the variables in the range of the substitution. This patch fixes this by populating the in-scope set from the free variables in the range of the substitution. * `composeTCvSubst` applied the first substitution argument to the range of the second substitution argument, but the first substitution's in-scope set was not wide enough to cover the range of the second substutition. We similarly fix this issue in this patch by widening the first substitution's in-scope set before applying it. Fixes #22235. - - - - - 0270cc54 by Vladislav Zavialov at 2022-10-26T00:02:01-04:00 Introduce TcRnWithHsDocContext (#22346) Before this patch, GHC used withHsDocContext to attach an HsDocContext to an error message: addErr $ mkTcRnUnknownMessage $ mkPlainError noHints (withHsDocContext ctxt msg) The problem with this approach is that it only works with TcRnUnknownMessage. But could we attach an HsDocContext to a structured error message in a generic way? This patch solves the problem by introducing a new constructor to TcRnMessage: data TcRnMessage where ... TcRnWithHsDocContext :: !HsDocContext -> !TcRnMessage -> TcRnMessage ... - - - - - 9ab31f42 by Sylvain Henry at 2022-10-26T09:32:20+02:00 Testsuite: more precise test options Necessary for newer cross-compiling backends (JS, Wasm) that don't support TH yet. - - - - - f60a1a62 by Vladislav Zavialov at 2022-10-26T12:17:14-04:00 Use TcRnVDQInTermType in noNestedForallsContextsErr (#20115) When faced with VDQ in the type of a term, GHC generates the following error message: Illegal visible, dependent quantification in the type of a term (GHC does not yet support this) Prior to this patch, there were two ways this message could have been generated and represented: 1. with the dedicated constructor TcRnVDQInTermType (see check_type in GHC.Tc.Validity) 2. with the transitional constructor TcRnUnknownMessage (see noNestedForallsContextsErr in GHC.Rename.Utils) Not only this led to duplication of code generating the final SDoc, it also made it tricky to track the origin of the error message. This patch fixes the problem by using TcRnVDQInTermType exclusively. - - - - - 223e159d by Owen Shepherd at 2022-10-27T13:54:33-04:00 Remove source location information from interface files This change aims to minimize source location information leaking into interface files, which makes ABI hashes dependent on the build location. The `Binary (Located a)` instance has been removed completely. It seems that the HIE interface still needs the ability to serialize SrcSpans, but by wrapping the instances, it should be a lot more difficult to inadvertently add source location information. - - - - - 22e3deb9 by Simon Peyton Jones at 2022-10-27T13:55:37-04:00 Add missing dict binds to specialiser I had forgotten to add the auxiliary dict bindings to the /unfolding/ of a specialised function. This caused #22358, which reports failures when compiling Hackage packages fixed-vector indexed-traversable Regression test T22357 is snarfed from indexed-traversable - - - - - a8ed36f9 by Evan Relf at 2022-10-27T13:56:36-04:00 Fix broken link to `async` package - - - - - 750846cd by Zubin Duggal at 2022-10-28T00:49:22-04:00 Pass correct package db when testing stage1. It used to pick the db for stage-2 which obviously didn't work. - - - - - ad612f55 by Krzysztof Gogolewski at 2022-10-28T00:50:00-04:00 Minor SDoc-related cleanup * Rename pprCLabel to pprCLabelStyle, and use the name pprCLabel for a function using CStyle (analogous to pprAsmLabel) * Move LabelStyle to the CLabel module, it no longer needs to be in Outputable. * Move calls to 'text' right next to literals, to make sure the text/str rule is triggered. * Remove FastString/String roundtrip in Tc.Deriv.Generate * Introduce showSDocForUser', which abstracts over a pattern in GHCi.UI - - - - - c2872f3f by Bryan Richter at 2022-10-28T11:36:34+03:00 CI: Don't run lint-submods on nightly Fixes #22325 - - - - - 270037fa by Hécate Moonlight at 2022-10-28T19:46:12-04:00 Start the deprecation process for GHC.Pack - - - - - d45d8cb3 by M Farkas-Dyck at 2022-11-01T12:47:21-04:00 Drop a kludge for binutils<2.17, which is now over 10 years old. - - - - - 8ee8b418 by Nicolas Trangez at 2022-11-01T12:47:58-04:00 rts: `name` argument of `createOSThread` can be `const` Since we don't intend to ever change the incoming string, declare this to be true. Also, in the POSIX implementation, the argument is no longer `STG_UNUSED` (since ee0deb8054da2a597fc5624469b4c44fd769ada2) in any code path. See: https://gitlab.haskell.org/ghc/ghc/-/commit/ee0deb8054da2a597fc5624469b4c44fd769ada2#note_460080 - - - - - 13b5f102 by Nicolas Trangez at 2022-11-01T12:47:58-04:00 rts: fix lifetime of `start_thread`s `name` value Since, unlike the code in ee0deb8054da2^, usage of the `name` value passed to `createOSThread` now outlives said function's lifetime, and could hence be released by the caller by the time the new thread runs `start_thread`, it needs to be copied. See: https://gitlab.haskell.org/ghc/ghc/-/commit/ee0deb8054da2a597fc5624469b4c44fd769ada2#note_460080 See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9066 - - - - - edd175c9 by Nicolas Trangez at 2022-11-01T12:47:58-04:00 rts: fix OS thread naming in ticker Since ee0deb805, the use of `pthread_setname_np` on Darwin was fixed when invoking `createOSThread`. However, the 'ticker' has some thread-creation code which doesn't rely on `createOSThread`, yet also uses `pthread_setname_np`. This patch enforces all thread creation to go through a single function, which uses the (correct) thread-naming code introduced in ee0deb805. See: https://gitlab.haskell.org/ghc/ghc/-/commit/ee0deb8054da2a597fc5624469b4c44fd769ada2 See: https://gitlab.haskell.org/ghc/ghc/-/issues/22206 See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9066 - - - - - b7a00113 by Krzysztof Gogolewski at 2022-11-01T12:48:35-04:00 Typo: rename -fwrite-if-simplfied-core to -fwrite-if-simplified-core - - - - - 30e625e6 by Vladislav Zavialov at 2022-11-01T12:49:10-04:00 ThToHs: fix overzealous parenthesization Before this patch, when converting from TH.Exp to LHsExpr GhcPs, the compiler inserted more parentheses than required: ((f a) (b + c)) d This was happening because the LHS of the function application was parenthesized as if it was the RHS. Now we use funPrec and appPrec appropriately and produce sensibly parenthesized expressions: f a (b + c) d I also took the opportunity to remove the special case for LamE, which was not special at all and simply duplicated code. - - - - - 0560821f by Simon Peyton Jones at 2022-11-01T12:49:47-04:00 Add accurate skolem info when quantifying Ticket #22379 revealed that skolemiseQuantifiedTyVar was dropping the passed-in skol_info on the floor when it encountered a SkolemTv. Bad! Several TyCons thereby share a single SkolemInfo on their binders, which lead to bogus error reports. - - - - - 38d19668 by Fendor at 2022-11-01T12:50:25-04:00 Expose UnitEnvGraphKey for user-code - - - - - 77e24902 by Simon Peyton Jones at 2022-11-01T12:51:00-04:00 Shrink test case for #22357 Ryan Scott offered a cut-down repro case (60 lines instead of more than 700 lines) - - - - - 4521f649 by Simon Peyton Jones at 2022-11-01T12:51:00-04:00 Add two tests for #17366 - - - - - 7108ba96 by Tom Smeding at 2022-11-01T22:33:23+01:00 Remove outdated footnote about module re-exports The footnote is invalid with GHC 9.2.4 (and possibly earlier): the described behaviour in the main text works fine. - - - - - 206c6bc7 by Hécate Moonlight at 2022-11-01T23:00:46+01:00 Merge pull request haskell/haddock#1534 from tomsmeding/patch-1 - - - - - 6b400d26 by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: introduce (and use) `STG_NORETURN` Instead of sprinkling the codebase with `GNU(C3)_ATTRIBUTE(__noreturn__)`, add a `STG_NORETURN` macro (for, basically, the same thing) similar to `STG_UNUSED` and others, and update the code to use this macro where applicable. - - - - - f9638654 by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: consistently use `STG_UNUSED` - - - - - 81a58433 by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: introduce (and use) `STG_USED` Similar to `STG_UNUSED`, have a specific macro for `__attribute__(used)`. - - - - - 41e1f748 by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: introduce (and use) `STG_MALLOC` Instead of using `GNUC3_ATTRIBUTE(__malloc__)`, provide a `STG_MALLOC` macro definition and use it instead. - - - - - 3a9a8bde by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: use `STG_UNUSED` - - - - - 9ab999de by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: specify deallocator of allocating functions This patch adds a new `STG_MALLOC1` macro (and its counterpart `STG_MALLOC2` for completeness) which allows to specify the deallocation function to be used with allocations of allocating functions, and applies it to `stg*allocBytes`. It also fixes a case where `free` was used to free up an `stgMallocBytes` allocation, found by the above change. See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381 - - - - - 81c0c7c9 by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: use `alloc_size` attribute This patch adds the `STG_ALLOC_SIZE1` and `STG_ALLOC_SIZE2` macros which allow to set the `alloc_size` attribute on functions, when available. See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381 - - - - - 99a1d896 by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: add and use `STG_RETURNS_NONNULL` See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-returns_005fnonnull-function-attribute See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381 - - - - - c235b399 by Nicolas Trangez at 2022-11-02T12:06:48-04:00 rts: tag `stgStrndup` as `STG_MALLOC` See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381 - - - - - ed81b448 by Oleg Grenrus at 2022-11-02T12:07:27-04:00 Move Symbol implementation note out of public haddock - - - - - 284fd39c by Ben Gamari at 2022-11-03T01:58:54-04:00 gen-dll: Drop it Currently it is only used by the make build system, which is soon to be retired, and it has not built since 41cf758b. We may need to reintroduce it when dynamic-linking support is introduced on Windows, but we will cross that bridge once we get there. Fixes #21753. - - - - - 24f4f54f by Matthew Pickering at 2022-11-03T01:59:30-04:00 Port foundation numeric tests to GHC testsuite This commit ports the numeric tests which found a regression in GHC-9.4. https://github.com/haskell-foundation/foundation/issues/571 Included in the commit is a simple random number generator and simplified QuickCheck implementation. In future these could be factored out of this standalone file and reused as a general purpose library which could be used for other QuickCheck style tests in the testsuite. See #22282 - - - - - d51bf7bd by M Farkas-Dyck at 2022-11-03T02:00:13-04:00 git: ignore HIE files. Cleans up git status if one sets -fwrite-ide-info in hadrian/ghci. - - - - - a9fc15b1 by Matthew Pickering at 2022-11-03T02:00:49-04:00 Clarify status of bindings in WholeCoreBindings Gergo points out that these bindings are tidied, rather than prepd as the variable claims. Therefore we update the name of the variable to reflect reality and add a comment to the data type to try to erase any future confusion. Fixes #22307 - - - - - 634da448 by Andrew Lelechenko at 2022-11-03T21:25:02+00:00 Fix haddocks for GHC.IORef - - - - - 31125154 by Andreas Klebinger at 2022-11-03T23:08:09-04:00 Export pprTrace and friends from GHC.Prelude. Introduces GHC.Prelude.Basic which can be used in modules which are a dependency of the ppr code. - - - - - bdc8cbb3 by Bryan Richter at 2022-11-04T10:27:37+02:00 CI: Allow hadrian-ghc-in-ghci to run in nightlies Since lint-submods doesn't run in nightlies, hadrian-ghc-in-ghci needs to mark it as "optional" so it can run if the job doesn't exist. Fixes #22396. - - - - - 3c0e3793 by Krzysztof Gogolewski at 2022-11-05T00:29:57-04:00 Minor refactor around FastStrings Pass FastStrings to functions directly, to make sure the rule for fsLit "literal" fires. Remove SDoc indirection in GHCi.UI.Tags and GHC.Unit.Module.Graph. - - - - - e41b2f55 by Matthew Pickering at 2022-11-05T14:18:10+00:00 Bump unix submodule to 2.8.0.0 Also bumps process and ghc-boot bounds on unix. For hadrian, when cross-compiling, we add -Wwarn=unused-imports -Wwarn=unused-top-binds to validation flavour. Further fixes in unix and/or hsc2hs is needed to make it completely free of warnings; for the time being, this change is needed to unblock other cross-compilation related work. - - - - - 42938a58 by Matthew Pickering at 2022-11-05T14:18:10+00:00 Bump Win32 submodule to 2.13.4.0 Fixes #22098 - - - - - e7372bc5 by Cheng Shao at 2022-11-06T13:15:22+00:00 Bump ci-images revision ci-images has recently been updated, including changes needed for wasm32-wasi CI. - - - - - 88cb9492 by Cheng Shao at 2022-11-06T13:15:22+00:00 Bump gmp-tarballs submodule Includes a fix for wasm support, doesn't impact other targets. - - - - - 69427ce9 by Cheng Shao at 2022-11-06T13:15:22+00:00 Bump haskeline submodule Includes a fix for wasm support, doesn't impact other targets. - - - - - 5fe11fe6 by Carter Schonwald at 2022-11-07T13:22:14-05:00 bump llvm upper bound - - - - - 68f49874 by M Farkas-Dyck at 2022-11-08T12:53:55-05:00 Define `Infinite` list and use where appropriate. Also add perf test for infinite list fusion. In particular, in `GHC.Core`, often we deal with infinite lists of roles. Also in a few locations we deal with infinite lists of names. Thanks to simonpj for helping to write the Note [Fusion for `Infinite` lists]. - - - - - ce726cd2 by Ross Paterson at 2022-11-08T12:54:34-05:00 Fix TypeData issues (fixes #22315 and #22332) There were two bugs here: 1. Treating type-level constructors as PromotedDataCon doesn't always work, in particular because constructors promoted via DataKinds are called both T and 'T. (Tests T22332a, T22332b, T22315a, T22315b) Fix: guard these cases with isDataKindsPromotedDataCon. 2. Type-level constructors were sent to the code generator, producing things like constructor wrappers. (Tests T22332a, T22332b) Fix: test for them in isDataTyCon. Other changes: * changed the marking of "type data" DataCon's as suggested by SPJ. * added a test TDGADT for a type-level GADT. * comment tweaks * change tcIfaceTyCon to ignore IfaceTyConInfo, so that IfaceTyConInfo is used only for pretty printing, not for typechecking. (SPJ) - - - - - 132f8908 by Jade Lovelace at 2022-11-08T12:55:18-05:00 Clarify msum/asum documentation - - - - - bb5888c5 by Jade Lovelace at 2022-11-08T12:55:18-05:00 Add example for (<$) - - - - - 080fffa1 by Jade Lovelace at 2022-11-08T12:55:18-05:00 Document what Alternative/MonadPlus instances actually do - - - - - 92ccb8de by Giles Anderson at 2022-11-09T09:27:52-05:00 Use TcRnDiagnostic in GHC.Tc.TyCl.Instance (#20117) The following `TcRnDiagnostic` messages have been introduced: TcRnWarnUnsatisfiedMinimalDefinition TcRnMisplacedInstSig TcRnBadBootFamInstDeclErr TcRnIllegalFamilyInstance TcRnAssocInClassErr TcRnBadFamInstDecl TcRnNotOpenFamily - - - - - 90c5abd4 by Hécate Moonlight at 2022-11-09T09:28:30-05:00 GHCi tags generation phase 2 see #19884 - - - - - f9f17b68 by Simon Peyton Jones at 2022-11-10T12:20:03+00:00 Fire RULES in the Specialiser The Specialiser has, for some time, fires class-op RULES in the specialiser itself: see Note [Specialisation modulo dictionary selectors] This MR beefs it up a bit, so that it fires /all/ RULES in the specialiser, not just class-op rules. See Note [Fire rules in the specialiser] The result is a bit more specialisation; see test simplCore/should_compile/T21851_2 This pushed me into a bit of refactoring. I made a new data types GHC.Core.Rules.RuleEnv, which combines - the several source of rules (local, home-package, external) - the orphan-module dependencies in a single record for `getRules` to consult. That drove a bunch of follow-on refactoring, including allowing me to remove cr_visible_orphan_mods from the CoreReader data type. I moved some of the RuleBase/RuleEnv stuff into GHC.Core.Rule. The reorganisation in the Simplifier improve compile times a bit (geom mean -0.1%), but T9961 is an outlier Metric Decrease: T9961 - - - - - 2b3d0bee by Simon Peyton Jones at 2022-11-10T12:21:13+00:00 Make indexError work better The problem here is described at some length in Note [Boxity for bottoming functions] and Note [Reboxed crud for bottoming calls] in GHC.Core.Opt.DmdAnal. This patch adds a SPECIALISE pragma for indexError, which makes it much less vulnerable to the problem described in these Notes. (This came up in another line of work, where a small change made indexError do reboxing (in nofib/spectral/simple/table_sort) that didn't happen before my change. I've opened #22404 to document the fagility. - - - - - 399e921b by Simon Peyton Jones at 2022-11-10T12:21:14+00:00 Fix DsUselessSpecialiseForClassMethodSelector msg The error message for DsUselessSpecialiseForClassMethodSelector was just wrong (a typo in some earlier work); trivial fix - - - - - dac0682a by Sebastian Graf at 2022-11-10T21:16:01-05:00 WorkWrap: Unboxing unboxed tuples is not always useful (#22388) See Note [Unboxing through unboxed tuples]. Fixes #22388. - - - - - 1230c268 by Sebastian Graf at 2022-11-10T21:16:01-05:00 Boxity: Handle argument budget of unboxed tuples correctly (#21737) Now Budget roughly tracks the combined width of all arguments after unarisation. See the changes to `Note [Worker argument budgets]`. Fixes #21737. - - - - - 2829fd92 by Cheng Shao at 2022-11-11T00:26:54-05:00 autoconf: check getpid getuid raise This patch adds checks for getpid, getuid and raise in autoconf. These functions are absent in wasm32-wasi and thus needs to be checked. - - - - - f5dfd1b4 by Cheng Shao at 2022-11-11T00:26:55-05:00 hadrian: add -Wwarn only for cross-compiling unix - - - - - 2e6ab453 by Cheng Shao at 2022-11-11T00:26:55-05:00 hadrian: add targetSupportsThreadedRts flag This patch adds a targetSupportsThreadedRts flag to indicate whether the target supports the threaded rts at all, different from existing targetSupportsSMP that checks whether -N is supported by the RTS. All existing flavours have also been updated accordingly to respect this flags. Some targets (e.g. wasm32-wasi) does not support the threaded rts, therefore this flag is needed for the default flavours to work. It makes more sense to have proper autoconf logic to check for threading support, but for the time being, we just set the flag to False iff the target is wasm32. - - - - - 8104f6f5 by Cheng Shao at 2022-11-11T00:26:55-05:00 Fix Cmm symbol kind - - - - - b2035823 by Norman Ramsey at 2022-11-11T00:26:55-05:00 add the two key graph modules from Martin Erwig's FGL Martin Erwig's FGL (Functional Graph Library) provides an "inductive" representation of graphs. A general graph has labeled nodes and labeled edges. The key operation on a graph is to decompose it by removing one node, together with the edges that connect the node to the rest of the graph. There is also an inverse composition operation. The decomposition and composition operations make this representation of graphs exceptionally well suited to implement graph algorithms in which the graph is continually changing, as alluded to in #21259. This commit adds `GHC.Data.Graph.Inductive.Graph`, which defines the interface, and `GHC.Data.Graph.Inductive.PatriciaTree`, which provides an implementation. Both modules are taken from `fgl-5.7.0.3` on Hackage, with these changes: - Copyright and license text have been copied into the files themselves, not stored separately. - Some calls to `error` have been replaced with calls to `panic`. - Conditional-compilation support for older versions of GHC, `containers`, and `base` has been removed. - - - - - 3633a5f5 by Norman Ramsey at 2022-11-11T00:26:55-05:00 add new modules for reducibility and WebAssembly translation - - - - - df7bfef8 by Cheng Shao at 2022-11-11T00:26:55-05:00 Add support for the wasm32-wasi target tuple This patch adds the wasm32-wasi tuple support to various places in the tree: autoconf, hadrian, ghc-boot and also the compiler. The codegen logic will come in subsequent commits. - - - - - 32ae62e6 by Cheng Shao at 2022-11-11T00:26:55-05:00 deriveConstants: parse .ll output for wasm32 due to broken nm This patch makes deriveConstants emit and parse an .ll file when targeting wasm. It's a necessary workaround for broken llvm-nm on wasm, which isn't capable of reporting correct constant values when parsing an object. - - - - - 07e92c92 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: workaround cmm's improper variadic ccall breaking wasm32 typechecking Unlike other targets, wasm requires the function signature of the call site and callee to strictly match. So in Cmm, when we call a C function that actually returns a value, we need to add an _unused local variable to receive it, otherwise type error awaits. An even bigger problem is calling variadic functions like barf() and such. Cmm doesn't support CAPI calling convention yet, so calls to variadic functions just happen to work in some cases with some target's ABI. But again, it doesn't work with wasm. Fortunately, the wasm C ABI lowers varargs to a stack pointer argument, and it can be passed NULL when no other arguments are expected to be passed. So we also add the additional unused NULL arguments to those functions, so to fix wasm, while not affecting behavior on other targets. - - - - - 00124d12 by Cheng Shao at 2022-11-11T00:26:55-05:00 testsuite: correct sleep() signature in T5611 In libc, sleep() returns an integer. The ccall type signature should match the libc definition, otherwise it causes linker error on wasm. - - - - - d72466a9 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: prefer ffi_type_void over FFI_TYPE_VOID This patch uses ffi_type_void instead of FFI_TYPE_VOID in the interpreter code, since the FFI_TYPE_* macros are not available in libffi-wasm32 yet. The libffi public documentation also only mentions the lower-case ffi_type_* symbols, so we should prefer the lower-case API here. - - - - - 4d36a1d3 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: don't define RTS_USER_SIGNALS when signal.h is not present In the rts, we have a RTS_USER_SIGNALS macro, and most signal-related logic is guarded with RTS_USER_SIGNALS. This patch extends the range of code guarded with RTS_USER_SIGNALS, and define RTS_USER_SIGNALS iff signal.h is actually detected by autoconf. This is required for wasm32-wasi to work, which lacks signals. - - - - - 3f1e164f by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: use HAVE_GETPID to guard subprocess related logic We've previously added detection of getpid() in autoconf. This patch uses HAVE_GETPID to guard some subprocess related logic in the RTS. This is required for certain targets like wasm32-wasi, where there isn't a process model at all. - - - - - 50bf5e77 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: IPE.c: don't do mutex stuff when THREADED_RTS is not defined This patch adds the missing THREADED_RTS CPP guard to mutex logic in IPE.c. - - - - - ed3b3da0 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: genericRaise: use exit() instead when not HAVE_RAISE We check existence of raise() in autoconf, and here, if not HAVE_RAISE, we should use exit() instead in genericRaise. - - - - - c0ba1547 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: checkSuid: don't do it when not HAVE_GETUID When getuid() is not present, don't do checkSuid since it doesn't make sense anyway on that target. - - - - - d2d6dfd2 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: wasm32 placeholder linker This patch adds minimal placeholder linker logic for wasm32, just enough to unblock compiling rts on wasm32. RTS linker functionality is not properly implemented yet for wasm32. - - - - - 65ba3285 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: RtsStartup: chdir to PWD on wasm32 This patch adds a wasm32-specific behavior to RtsStartup logic. When the PWD environment variable is present, we chdir() to it first. The point is to workaround an issue in wasi-libc: it's currently not possible to specify the initial working directory, it always defaults to / (in the virtual filesystem mapped from some host directory). For some use cases this is sufficient, but there are some other cases (e.g. in the testsuite) where the program needs to access files outside. - - - - - 65b82542 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: no timer for wasm32 Due to the lack of threads, on wasm32 there can't be a background timer that periodically resets the context switch flag. This patch disables timer for wasm32, and also makes the scheduler default to -C0 on wasm32 to avoid starving threads. - - - - - e007586f by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: RtsSymbols: empty RTS_POSIX_ONLY_SYMBOLS for wasm32 The default RTS_POSIX_ONLY_SYMBOLS doesn't make sense on wasm32. - - - - - 0e33f667 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: Schedule: no FORKPROCESS_PRIMOP_SUPPORTED on wasm32 On wasm32 there isn't a process model at all, so no FORKPROCESS_PRIMOP_SUPPORTED. - - - - - 88bbdb31 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: LibffiAdjustor: adapt to ffi_alloc_prep_closure interface for wasm32 libffi-wasm32 only supports non-standard libffi closure api via ffi_alloc_prep_closure(). This patch implements ffi_alloc_prep_closure() via standard libffi closure api on other targets, and uses it to implement adjustor functionality. - - - - - 15138746 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: don't return memory to OS on wasm32 This patch makes the storage manager not return any memory on wasm32. The detailed reason is described in Note [Megablock allocator on wasm]. - - - - - 631af3cc by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: make flushExec a no-op on wasm32 This patch makes flushExec a no-op on wasm32, since there's no such thing as executable memory on wasm32 in the first place. - - - - - 654a3d46 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: RtsStartup: don't call resetTerminalSettings, freeThreadingResources on wasm32 This patch prevents resetTerminalSettings and freeThreadingResources to be called on wasm32, since there is no TTY or threading on wasm32 at all. - - - - - f271e7ca by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: OSThreads.h: stub types for wasm32 This patch defines stub Condition/Mutex/OSThreadId/ThreadLocalKey types for wasm32, just enough to unblock compiling RTS. Any threading-related functionality has been patched to be disabled on wasm32. - - - - - a6ac67b0 by Cheng Shao at 2022-11-11T00:26:55-05:00 Add register mapping for wasm32 This patch adds register mapping logic for wasm32. See Note [Register mapping on WebAssembly] in wasm32 NCG for more description. - - - - - d7b33982 by Cheng Shao at 2022-11-11T00:26:55-05:00 rts: wasm32 specific logic This patch adds the rest of wasm32 specific logic in rts. - - - - - 7f59b0f3 by Cheng Shao at 2022-11-11T00:26:55-05:00 base: fall back to using monotonic clock to emulate cputime on wasm32 On wasm32, we have to fall back to using monotonic clock to emulate cputime, since there's no native support for cputime as a clock id. - - - - - 5fcbae0b by Cheng Shao at 2022-11-11T00:26:55-05:00 base: more autoconf checks for wasm32 This patch adds more autoconf checks to base, since those functions and headers may exist on other POSIX systems but don't exist on wasm32. - - - - - 00a9359f by Cheng Shao at 2022-11-11T00:26:55-05:00 base: avoid using unsupported posix functionality on wasm32 This base patch avoids using unsupported posix functionality on wasm32. - - - - - 34b8f611 by Cheng Shao at 2022-11-11T00:26:55-05:00 autoconf: set CrossCompiling=YES in cross bindist configure This patch fixes the bindist autoconf logic to properly set CrossCompiling=YES when it's a cross GHC bindist. - - - - - 5ebeaa45 by Cheng Shao at 2022-11-11T00:26:55-05:00 compiler: add util functions for UniqFM and UniqMap This patch adds addToUFM_L (backed by insertLookupWithKey), addToUniqMap_L and intersectUniqMap_C. These UniqFM/UniqMap util functions are used by the wasm32 NCG. - - - - - 177c56c1 by Cheng Shao at 2022-11-11T00:26:55-05:00 driver: avoid -Wl,--no-as-needed for wasm32 The driver used to pass -Wl,--no-as-needed for LLD linking. This is actually only supported for ELF targets, and must be avoided when linking for wasm32. - - - - - 06f01c74 by Cheng Shao at 2022-11-11T00:26:55-05:00 compiler: allow big arith for wasm32 This patch enables Cmm big arithmetic on wasm32, since 64-bit arithmetic can be efficiently lowered to wasm32 opcodes. - - - - - df6bb112 by Cheng Shao at 2022-11-11T00:26:55-05:00 driver: pass -Wa,--no-type-check for wasm32 when runAsPhase This patch passes -Wa,--no-type-check for wasm32 when compiling assembly. See the added note for more detailed explanation. - - - - - c1fe4ab6 by Cheng Shao at 2022-11-11T00:26:55-05:00 compiler: enforce cmm switch planning for wasm32 This patch forcibly enable Cmm switch planning for wasm32, since otherwise the switch tables we generate may exceed the br_table maximum allowed size. - - - - - a8adc71e by Cheng Shao at 2022-11-11T00:26:55-05:00 compiler: annotate CmmFileEmbed with blob length This patch adds the blob length field to CmmFileEmbed. The wasm32 NCG needs to know the precise size of each data segment. - - - - - 36340328 by Cheng Shao at 2022-11-11T00:26:55-05:00 compiler: wasm32 NCG This patch adds the wasm32 NCG. - - - - - 435f42ea by Cheng Shao at 2022-11-11T00:26:55-05:00 ci: add wasm32-wasi release bindist job - - - - - d8262fdc by Cheng Shao at 2022-11-11T00:26:55-05:00 ci: add a stronger test for cross bindists This commit adds a simple GHC API program that parses and reprints the original hello world program used for basic testing of cross bindists. Before there's full cross-compilation support in the test suite driver, this provides better coverage than the original test. - - - - - 8e6ae882 by Cheng Shao at 2022-11-11T00:26:55-05:00 CODEOWNERS: add wasm-specific maintainers - - - - - 707d5651 by Zubin Duggal at 2022-11-11T00:27:31-05:00 Clarify that LLVM upper bound is non-inclusive during configure (#22411) - - - - - 430eccef by Ben Gamari at 2022-11-11T13:16:45-05:00 rts: Check for program_invocation_short_name via autoconf Instead of assuming support on all Linuxes. - - - - - 6dab0046 by Matthew Pickering at 2022-11-11T13:17:22-05:00 driver: Fix -fdefer-diagnostics flag The `withDeferredDiagnostics` wrapper wasn't doing anything because the session it was modifying wasn't used in hsc_env. Therefore the fix is simple, just push the `getSession` call into the scope of `withDeferredDiagnostics`. Fixes #22391 - - - - - d0c691b6 by Simon Peyton Jones at 2022-11-11T13:18:07-05:00 Add a fast path for data constructor workers See Note [Fast path for data constructors] in GHC.Core.Opt.Simplify.Iteration This bypasses lots of expensive logic, in the special case of applications of data constructors. It is a surprisingly worthwhile improvement, as you can see in the figures below. Metrics: compile_time/bytes allocated ------------------------------------------------ CoOpt_Read(normal) -2.0% CoOpt_Singletons(normal) -2.0% ManyConstructors(normal) -1.3% T10421(normal) -1.9% GOOD T10421a(normal) -1.5% T10858(normal) -1.6% T11545(normal) -1.7% T12234(optasm) -1.3% T12425(optasm) -1.9% GOOD T13035(normal) -1.0% GOOD T13056(optasm) -1.8% T13253(normal) -3.3% GOOD T15164(normal) -1.7% T15304(normal) -3.4% T15630(normal) -2.8% T16577(normal) -4.3% GOOD T17096(normal) -1.1% T17516(normal) -3.1% T18282(normal) -1.9% T18304(normal) -1.2% T18698a(normal) -1.2% GOOD T18698b(normal) -1.5% GOOD T18923(normal) -1.3% T1969(normal) -1.3% GOOD T19695(normal) -4.4% GOOD T21839c(normal) -2.7% GOOD T21839r(normal) -2.7% GOOD T4801(normal) -3.8% GOOD T5642(normal) -3.1% GOOD T6048(optasm) -2.5% GOOD T9020(optasm) -2.7% GOOD T9630(normal) -2.1% GOOD T9961(normal) -11.7% GOOD WWRec(normal) -1.0% geo. mean -1.1% minimum -11.7% maximum +0.1% Metric Decrease: T10421 T12425 T13035 T13253 T16577 T18698a T18698b T1969 T19695 T21839c T21839r T4801 T5642 T6048 T9020 T9630 T9961 - - - - - 3c37d30b by Krzysztof Gogolewski at 2022-11-11T19:18:39+01:00 Use a more efficient printer for code generation (#21853) The changes in `GHC.Utils.Outputable` are the bulk of the patch and drive the rest. The types `HLine` and `HDoc` in Outputable can be used instead of `SDoc` and support printing directly to a handle with `bPutHDoc`. See Note [SDoc versus HDoc] and Note [HLine versus HDoc]. The classes `IsLine` and `IsDoc` are used to make the existing code polymorphic over `HLine`/`HDoc` and `SDoc`. This is done for X86, PPC, AArch64, DWARF and dependencies (printing module names, labels etc.). Co-authored-by: Alexis King <lexi.lambda at gmail.com> Metric Decrease: CoOpt_Read ManyAlternatives ManyConstructors T10421 T12425 T12707 T13035 T13056 T13253 T13379 T18140 T18282 T18698a T18698b T1969 T20049 T21839c T21839r T3064 T3294 T4801 T5321FD T5321Fun T5631 T6048 T783 T9198 T9233 - - - - - 6b92b47f by Matthew Craven at 2022-11-11T18:32:14-05:00 Weaken wrinkle 1 of Note [Scrutinee Constant Folding] Fixes #22375. Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - 154c70f6 by Simon Peyton Jones at 2022-11-11T23:40:10+00:00 Fix fragile RULE setup in GHC.Float In testing my type-vs-constraint patch I found that the handling of Natural literals was very fragile -- and I somehow tripped that fragility in my work. So this patch fixes the fragility. See Note [realToFrac natural-to-float] This made a big (9%) difference in one existing test in perf/should_run/T1-359 Metric Decrease: T10359 - - - - - 778c6adc by Simon Peyton Jones at 2022-11-11T23:40:10+00:00 Type vs Constraint: finally nailed This big patch addresses the rats-nest of issues that have plagued us for years, about the relationship between Type and Constraint. See #11715/#21623. The main payload of the patch is: * To introduce CONSTRAINT :: RuntimeRep -> Type * To make TYPE and CONSTRAINT distinct throughout the compiler Two overview Notes in GHC.Builtin.Types.Prim * Note [TYPE and CONSTRAINT] * Note [Type and Constraint are not apart] This is the main complication. The specifics * New primitive types (GHC.Builtin.Types.Prim) - CONSTRAINT - ctArrowTyCon (=>) - tcArrowTyCon (-=>) - ccArrowTyCon (==>) - funTyCon FUN -- Not new See Note [Function type constructors and FunTy] and Note [TYPE and CONSTRAINT] * GHC.Builtin.Types: - New type Constraint = CONSTRAINT LiftedRep - I also stopped nonEmptyTyCon being built-in; it only needs to be wired-in * Exploit the fact that Type and Constraint are distinct throughout GHC - Get rid of tcView in favour of coreView. - Many tcXX functions become XX functions. e.g. tcGetCastedTyVar --> getCastedTyVar * Kill off Note [ForAllTy and typechecker equality], in (old) GHC.Tc.Solver.Canonical. It said that typechecker-equality should ignore the specified/inferred distinction when comparein two ForAllTys. But that wsa only weakly supported and (worse) implies that we need a separate typechecker equality, different from core equality. No no no. * GHC.Core.TyCon: kill off FunTyCon in data TyCon. There was no need for it, and anyway now we have four of them! * GHC.Core.TyCo.Rep: add two FunTyFlags to FunCo See Note [FunCo] in that module. * GHC.Core.Type. Lots and lots of changes driven by adding CONSTRAINT. The key new function is sORTKind_maybe; most other changes are built on top of that. See also `funTyConAppTy_maybe` and `tyConAppFun_maybe`. * Fix a longstanding bug in GHC.Core.Type.typeKind, and Core Lint, in kinding ForAllTys. See new tules (FORALL1) and (FORALL2) in GHC.Core.Type. (The bug was that before (forall (cv::t1 ~# t2). blah), where blah::TYPE IntRep, would get kind (TYPE IntRep), but it should be (TYPE LiftedRep). See Note [Kinding rules for types] in GHC.Core.Type. * GHC.Core.TyCo.Compare is a new module in which we do eqType and cmpType. Of course, no tcEqType any more. * GHC.Core.TyCo.FVs. I moved some free-var-like function into this module: tyConsOfType, visVarsOfType, and occCheckExpand. Refactoring only. * GHC.Builtin.Types. Compiletely re-engineer boxingDataCon_maybe to have one for each /RuntimeRep/, rather than one for each /Type/. This dramatically widens the range of types we can auto-box. See Note [Boxing constructors] in GHC.Builtin.Types The boxing types themselves are declared in library ghc-prim:GHC.Types. GHC.Core.Make. Re-engineer the treatment of "big" tuples (mkBigCoreVarTup etc) GHC.Core.Make, so that it auto-boxes unboxed values and (crucially) types of kind Constraint. That allows the desugaring for arrows to work; it gathers up free variables (including dictionaries) into tuples. See Note [Big tuples] in GHC.Core.Make. There is still work to do here: #22336. But things are better than before. * GHC.Core.Make. We need two absent-error Ids, aBSENT_ERROR_ID for types of kind Type, and aBSENT_CONSTRAINT_ERROR_ID for vaues of kind Constraint. Ditto noInlineId vs noInlieConstraintId in GHC.Types.Id.Make; see Note [inlineId magic]. * GHC.Core.TyCo.Rep. Completely refactor the NthCo coercion. It is now called SelCo, and its fields are much more descriptive than the single Int we used to have. A great improvement. See Note [SelCo] in GHC.Core.TyCo.Rep. * GHC.Core.RoughMap.roughMatchTyConName. Collapse TYPE and CONSTRAINT to a single TyCon, so that the rough-map does not distinguish them. * GHC.Core.DataCon - Mainly just improve documentation * Some significant renamings: GHC.Core.Multiplicity: Many --> ManyTy (easier to grep for) One --> OneTy GHC.Core.TyCo.Rep TyCoBinder --> GHC.Core.Var.PiTyBinder GHC.Core.Var TyCoVarBinder --> ForAllTyBinder AnonArgFlag --> FunTyFlag ArgFlag --> ForAllTyFlag GHC.Core.TyCon TyConTyCoBinder --> TyConPiTyBinder Many functions are renamed in consequence e.g. isinvisibleArgFlag becomes isInvisibleForAllTyFlag, etc * I refactored FunTyFlag (was AnonArgFlag) into a simple, flat data type data FunTyFlag = FTF_T_T -- (->) Type -> Type | FTF_T_C -- (-=>) Type -> Constraint | FTF_C_T -- (=>) Constraint -> Type | FTF_C_C -- (==>) Constraint -> Constraint * GHC.Tc.Errors.Ppr. Some significant refactoring in the TypeEqMisMatch case of pprMismatchMsg. * I made the tyConUnique field of TyCon strict, because I saw code with lots of silly eval's. That revealed that GHC.Settings.Constants.mAX_SUM_SIZE can only be 63, because we pack the sum tag into a 6-bit field. (Lurking bug squashed.) Fixes * #21530 Updates haddock submodule slightly. Performance changes ~~~~~~~~~~~~~~~~~~~ I was worried that compile times would get worse, but after some careful profiling we are down to a geometric mean 0.1% increase in allocation (in perf/compiler). That seems fine. There is a big runtime improvement in T10359 Metric Decrease: LargeRecord MultiLayerModulesTH_OneShot T13386 T13719 Metric Increase: T8095 - - - - - 360f5fec by Simon Peyton Jones at 2022-11-11T23:40:11+00:00 Indent closing "#-}" to silence HLint - - - - - e160cf47 by Krzysztof Gogolewski at 2022-11-12T08:05:28-05:00 Fix merge conflict in T18355.stderr Fixes #22446 - - - - - 294f9073 by Simon Peyton Jones at 2022-11-12T23:14:13+00:00 Fix a trivial typo in dataConNonlinearType Fixes #22416 - - - - - 268a3ce9 by Ben Gamari at 2022-11-14T09:36:57-05:00 eventlog: Ensure that IPE output contains actual info table pointers The refactoring in 866c736e introduced a rather subtle change in the semantics of the IPE eventlog output, changing the eventlog field from encoding info table pointers to "TNTC pointers" (which point to entry code when tables-next-to-code is enabled). Fix this. Fixes #22452. - - - - - d91db679 by Matthew Pickering at 2022-11-14T16:48:10-05:00 testsuite: Add tests for T22347 These are fixed in recent versions but might as well add regression tests. See #22347 - - - - - 8f6c576b by Matthew Pickering at 2022-11-14T16:48:45-05:00 testsuite: Improve output from tests which have failing pre_cmd There are two changes: * If a pre_cmd fails, then don't attempt to run the test. * If a pre_cmd fails, then print the stdout and stderr from running that command (which hopefully has a nice error message). For example: ``` =====> 1 of 1 [0, 0, 0] *** framework failure for test-defaulting-plugin(normal) pre_cmd failed: 2 ** pre_cmd was "$MAKE -s --no-print-directory -C defaulting-plugin package.test-defaulting-plugin TOP={top}". stdout: stderr: DefaultLifted.hs:19:13: error: [GHC-76037] Not in scope: type constructor or class ‘Typ’ Suggested fix: Perhaps use one of these: ‘Type’ (imported from GHC.Tc.Utils.TcType), data constructor ‘Type’ (imported from GHC.Plugins) | 19 | instance Eq Typ where | ^^^ make: *** [Makefile:17: package.test-defaulting-plugin] Error 1 Performance Metrics (test environment: local): ``` Fixes #22329 - - - - - 2b7d5ccc by Madeline Haraj at 2022-11-14T22:44:17+00:00 Implement UNPACK support for sum types. This is based on osa's unpack_sums PR from ages past. The meat of the patch is implemented in dataConArgUnpackSum and described in Note [UNPACK for sum types]. - - - - - 78f7ecb0 by Andreas Klebinger at 2022-11-14T22:20:29-05:00 Expand on the need to clone local binders. Fixes #22402. - - - - - 65ce43cc by Krzysztof Gogolewski at 2022-11-14T22:21:05-05:00 Fix :i Constraint printing "type Constraint = Constraint" Since Constraint became a synonym for CONSTRAINT 'LiftedRep, we need the same code for handling printing as for the synonym Type = TYPE 'LiftedRep. This addresses the same bug as #18594, so I'm reusing the test. - - - - - 94549f8f by ARATA Mizuki at 2022-11-15T21:36:03-05:00 configure: Don't check for an unsupported version of LLVM The upper bound is not inclusive. Fixes #22449 - - - - - 02d3511b by Andrew Lelechenko at 2022-11-15T21:36:41-05:00 Fix capitalization in haddock for TestEquality - - - - - 08bf2881 by Cheng Shao at 2022-11-16T09:16:29+00:00 base: make Foreign.Marshal.Pool use RTS internal arena for allocation `Foreign.Marshal.Pool` used to call `malloc` once for each allocation request. Each `Pool` maintained a list of allocated pointers, and traverses the list to `free` each one of those pointers. The extra O(n) overhead is apparently bad for a `Pool` that serves a lot of small allocation requests. This patch uses the RTS internal arena to implement `Pool`, with these benefits: - Gets rid of the extra O(n) overhead. - The RTS arena is simply a bump allocator backed by the block allocator, each allocation request is likely faster than a libc `malloc` call. Closes #14762 #18338. - - - - - 37cfe3c0 by Krzysztof Gogolewski at 2022-11-16T14:50:06-05:00 Misc cleanup * Replace catMaybes . map f with mapMaybe f * Use concatFS to concatenate multiple FastStrings * Fix documentation of -exclude-module * Cleanup getIgnoreCount in GHCi.UI - - - - - b0ac3813 by Lawton Nichols at 2022-11-19T03:22:14-05:00 Give better errors for code corrupted by Unicode smart quotes (#21843) Previously, we emitted a generic and potentially confusing error during lexical analysis on programs containing smart quotes (“/”/‘/’). This commit adds smart quote-aware lexer errors. - - - - - cb8430f8 by Sebastian Graf at 2022-11-19T03:22:49-05:00 Make OpaqueNo* tests less noisy to unrelated changes - - - - - b1a8af69 by Sebastian Graf at 2022-11-19T03:22:49-05:00 Simplifier: Consider `seq` as a `BoringCtxt` (#22317) See `Note [Seq is boring]` for the rationale. Fixes #22317. - - - - - 9fd11585 by Sebastian Graf at 2022-11-19T03:22:49-05:00 Make T21839c's ghc/max threshold more forgiving - - - - - 4b6251ab by Simon Peyton Jones at 2022-11-19T03:23:24-05:00 Be more careful when reporting unbound RULE binders See Note [Variables unbound on the LHS] in GHC.HsToCore.Binds. Fixes #22471. - - - - - e8f2b80d by Peter Trommler at 2022-11-19T03:23:59-05:00 PPC NCG: Fix generating assembler code Fixes #22479 - - - - - f2f9ef07 by Andrew Lelechenko at 2022-11-20T18:39:30-05:00 Extend documentation for Data.IORef - - - - - ef511b23 by Simon Peyton Jones at 2022-11-20T18:40:05-05:00 Buglet in GHC.Tc.Module.checkBootTyCon This lurking bug used the wrong function to compare two types in GHC.Tc.Module.checkBootTyCon It's hard to trigger the bug, which only came up during !9343, so there's no regression test in this MR. - - - - - 451aeac3 by Andrew Lelechenko at 2022-11-20T18:40:44-05:00 Add since pragmas for c_interruptible_open and hostIsThreaded - - - - - a57b4c4b by Andrew Lelechenko at 2022-11-21T00:39:52+00:00 Support mtl-2.3 - - - - - 8d6aaa49 by Duncan Coutts at 2022-11-22T02:06:16-05:00 Introduce CapIOManager as the per-cap I/O mangager state Rather than each I/O manager adding things into the Capability structure ad-hoc, we should have a common CapIOManager iomgr member of the Capability structure, with a common interface to initialise etc. The content of the CapIOManager struct will be defined differently for each I/O manager implementation. Eventually we should be able to have the CapIOManager be opaque to the rest of the RTS, and known just to the I/O manager implementation. We plan for that by making the Capability contain a pointer to the CapIOManager rather than containing the structure directly. Initially just move the Unix threaded I/O manager's control FD. - - - - - 8901285e by Duncan Coutts at 2022-11-22T02:06:17-05:00 Add hook markCapabilityIOManager To allow I/O managers to have GC roots in the Capability, within the CapIOManager structure. Not yet used in this patch. - - - - - 5cf709c5 by Duncan Coutts at 2022-11-22T02:06:17-05:00 Move APPEND_TO_BLOCKED_QUEUE from cmm to C The I/O and delay blocking primitives for the non-threaded way currently access the blocked_queue and sleeping_queue directly. We want to move where those queues are to make their ownership clearer: to have them clearly belong to the I/O manager impls rather than to the scheduler. Ultimately we will want to change their representation too. It's inconvenient to do that if these queues are accessed directly from cmm code. So as a first step, replace the APPEND_TO_BLOCKED_QUEUE with a C version appendToIOBlockedQueue(), and replace the open-coded sleeping_queue insertion with insertIntoSleepingQueue(). - - - - - ced9acdb by Duncan Coutts at 2022-11-22T02:06:17-05:00 Move {blocked,sleeping}_queue from scheduler global vars to CapIOManager The blocked_queue_{hd,tl} and the sleeping_queue are currently cooperatively managed between the scheduler and (some but not all of) the non-threaded I/O manager implementations. They lived as global vars with the scheduler, but are poked by I/O primops and the I/O manager backends. This patch is a step on the path towards making the management of I/O or timer blocking belong to the I/O managers and not the scheduler. Specifically, this patch moves the {blocked,sleeping}_queue from being global vars in the scheduler to being members of the CapIOManager struct within each Capability. They are not yet exclusively used by the I/O managers: they are still poked from a couple other places, notably in the scheduler before calling awaitEvent. - - - - - 0f68919e by Duncan Coutts at 2022-11-22T02:06:17-05:00 Remove the now-unused markScheduler The global vars {blocked,sleeping}_queue are now in the Capability and so get marked there via markCapabilityIOManager. - - - - - 39a91f60 by Duncan Coutts at 2022-11-22T02:06:17-05:00 Move macros for checking for pending IO or timers from Schedule.h to Schedule.c and IOManager.h This is just moving, the next step will be to rejig them slightly. For the non-threaded RTS the scheduler needs to be able to test for there being pending I/O operation or pending timers. The implementation of these tests should really be considered to be part of the I/O managers and not part of the scheduler. - - - - - 664b034b by Duncan Coutts at 2022-11-22T02:06:17-05:00 Replace EMPTY_{BLOCKED,SLEEPING}_QUEUE macros by function These are the macros originaly from Scheduler.h, previously moved to IOManager.h, and now replaced with a single inline function anyPendingTimeoutsOrIO(). We can use a single function since the two macros were always checked together. Note that since anyPendingTimeoutsOrIO is defined for all IO manager cases, including threaded, we do not need to guard its use by cpp #if !defined(THREADED_RTS) - - - - - 32946220 by Duncan Coutts at 2022-11-22T02:06:17-05:00 Expand emptyThreadQueues inline for clarity It was not really adding anything. The name no longer meant anything since those I/O and timeout queues do not belong to the scheuler. In one of the two places it was used, the comments already had to explain what it did, whereas now the code matches the comment nicely. - - - - - 9943baf9 by Duncan Coutts at 2022-11-22T02:06:17-05:00 Move the awaitEvent declaration into IOManager.h And add or adjust comments at the use sites of awaitEvent. - - - - - 054dcc9d by Duncan Coutts at 2022-11-22T02:06:17-05:00 Pass the Capability *cap explicitly to awaitEvent It is currently only used in the non-threaded RTS so it works to use MainCapability, but it's a bit nicer to pass the cap anyway. It's certainly shorter. - - - - - 667fe5a4 by Duncan Coutts at 2022-11-22T02:06:17-05:00 Pass the Capability *cap explicitly to appendToIOBlockedQueue And to insertIntoSleepingQueue. Again, it's a bit cleaner and simpler though not strictly necessary given that these primops are currently only used in the non-threaded RTS. - - - - - 7181b074 by Duncan Coutts at 2022-11-22T02:06:17-05:00 Reveiew feedback: improve one of the TODO comments The one about the nonsense (const False) test on WinIO for there being any IO or timers pending, leading to unnecessary complication later in the scheduler. - - - - - e5b68183 by Andreas Klebinger at 2022-11-22T02:06:52-05:00 Optimize getLevity. Avoid the intermediate data structures allocated by splitTyConApp. This avoids ~0.5% of allocations for a build using -O2. Fixes #22254 - - - - - de5fb348 by Andreas Klebinger at 2022-11-22T02:07:28-05:00 hadrian:Set TNTC when running testsuite. - - - - - 9d61c182 by Oleg Grenrus at 2022-11-22T15:59:34-05:00 Add unsafePtrEquality# restricted to UnliftedTypes - - - - - e817c871 by Jonathan Dowland at 2022-11-22T16:00:14-05:00 utils/unlit: adjust parser to match Report spec The Haskell 2010 Report says that, for Latex-style Literate format, "Program code begins on the first line following a line that begins \begin{code}". (This is unchanged from the 98 Report) However the unlit.c implementation only matches a line that contains "\begin{code}" and nothing else. One consequence of this is that one cannot suffix Latex options to the code environment. I.e., this does not work: \begin{code}[label=foo,caption=Foo Code] Adjust the matcher to conform to the specification from the Report. The Haskell Wiki currently recommends suffixing a '%' to \begin{code} in order to deliberately hide a code block from Haskell. This is bad advice, as it's relying on an implementation quirk rather than specified behaviour. None-the-less, some people have tried to use it, c.f. <https://mail.haskell.org/pipermail/haskell-cafe/2009-September/066780.html> An alternative solution is to define a separate, equivalent Latex environment to "code", that is functionally identical in Latex but ignored by unlit. This should not be a burden: users are required to manually define the code environment anyway, as it is not provided by the Latex verbatim or lstlistings packages usually used for presenting code in documents. Fixes #3549. - - - - - 0b7fef11 by Teo Camarasu at 2022-11-23T12:44:33-05:00 Fix eventlog all option Previously it didn't enable/disable nonmoving_gc and ticky event types Fixes #21813 - - - - - 04d0618c by Arnaud Spiwack at 2022-11-23T12:45:14-05:00 Expand Note [Linear types] with the stance on linting linearity Per the discussion on #22123 - - - - - e1538516 by Lawton Nichols at 2022-11-23T12:45:55-05:00 Add documentation on custom Prelude modules (#22228) Specifically, custom Prelude modules that are named `Prelude`. - - - - - b5c71454 by Sylvain Henry at 2022-11-23T12:46:35-05:00 Don't let configure perform trivial substitutions (#21846) Hadrian now performs substitutions, especially to generate .cabal files from .cabal.in files. Two benefits: 1. We won't have to re-configure when we modify thing.cabal.in. Hadrian will take care of this for us. 2. It paves the way to allow the same package to be configured differently by Hadrian in the same session. This will be useful to fix #19174: we want to build a stage2 cross-compiler for the host platform and a stage1 compiler for the cross target platform in the same Hadrian session. - - - - - 99aca26b by nineonine at 2022-11-23T12:47:11-05:00 CApiFFI: add ConstPtr for encoding const-qualified pointer return types (#22043) Previously, when using `capi` calling convention in foreign declarations, code generator failed to handle const-cualified pointer return types. This resulted in CC toolchain throwing `-Wincompatible-pointer-types-discards-qualifiers` warning. `Foreign.C.Types.ConstPtr` newtype was introduced to handle these cases - special treatment was put in place to generate appropritetly qualified C wrapper that no longer triggers the above mentioned warning. Fixes #22043 - - - - - 040bfdc3 by M Farkas-Dyck at 2022-11-23T21:59:03-05:00 Scrub some no-warning pragmas. - - - - - 178c1fd8 by Vladislav Zavialov at 2022-11-23T21:59:39-05:00 Check if the SDoc starts with a single quote (#22488) This patch fixes pretty-printing of character literals inside promoted lists and tuples. When we pretty-print a promoted list or tuple whose first element starts with a single quote, we want to add a space between the opening bracket and the element: '[True] -- ok '[ 'True] -- ok '['True] -- not ok If we don't add the space, we accidentally produce a character literal '['. Before this patch, pprSpaceIfPromotedTyCon inspected the type as an AST and tried to guess if it would be rendered with a single quote. However, it missed the case when the inner type was itself a character literal: '[ 'x'] -- ok '['x'] -- not ok Instead of adding this particular case, I opted for a more future-proof solution: check the SDoc directly. This way we can detect if the single quote is actually there instead of trying to predict it from the AST. The new function is called spaceIfSingleQuote. - - - - - 11627c42 by Matthew Pickering at 2022-11-23T22:00:15-05:00 notes: Fix references to HPT space leak note Updating this note was missed when updating the HPT to the HUG. Fixes #22477 - - - - - 86ff1523 by Andrei Borzenkov at 2022-11-24T17:24:51-05:00 Convert diagnostics in GHC.Rename.Expr to proper TcRnMessage (#20115) Problem: avoid usage of TcRnMessageUnknown Solution: The following `TcRnMessage` messages has been introduced: TcRnNoRebindableSyntaxRecordDot TcRnNoFieldPunsRecordDot TcRnIllegalStaticExpression TcRnIllegalStaticFormInSplice TcRnListComprehensionDuplicateBinding TcRnEmptyStmtsGroup TcRnLastStmtNotExpr TcRnUnexpectedStatementInContext TcRnIllegalTupleSection TcRnIllegalImplicitParameterBindings TcRnSectionWithoutParentheses Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - d198a19a by Cheng Shao at 2022-11-24T17:25:29-05:00 rts: fix missing Arena.h symbols in RtsSymbols.c It was an unfortunate oversight in !8961 and broke devel2 builds. - - - - - 5943e739 by Andrew Lelechenko at 2022-11-25T04:38:28-05:00 Assorted fixes to avoid Data.List.{head,tail} - - - - - 1f1b99b8 by sheaf at 2022-11-25T04:38:28-05:00 Review suggestions for assorted fixes to avoid Data.List.{head,tail} - - - - - 13d627bb by Vladislav Zavialov at 2022-11-25T04:39:04-05:00 Print unticked promoted data constructors (#20531) Before this patch, GHC unconditionally printed ticks before promoted data constructors: ghci> type T = True -- unticked (user-written) ghci> :kind! T T :: Bool = 'True -- ticked (compiler output) After this patch, GHC prints ticks only when necessary: ghci> type F = False -- unticked (user-written) ghci> :kind! F F :: Bool = False -- unticked (compiler output) ghci> data False -- introduce ambiguity ghci> :kind! F F :: Bool = 'False -- ticked by necessity (compiler output) The old behavior can be enabled by -fprint-redundant-promotion-ticks. Summary of changes: * Rename PrintUnqualified to NamePprCtx * Add QueryPromotionTick to it * Consult the GlobalRdrEnv to decide whether to print a tick (see mkPromTick) * Introduce -fprint-redundant-promotion-ticks Co-authored-by: Artyom Kuznetsov <hi at wzrd.ht> - - - - - e9d62453 by Simon Peyton Jones at 2022-11-25T13:49:12+01:00 Track small API change in TyCon.hs - - - - - d10dc6bd by Simon Peyton Jones at 2022-11-25T22:31:27+00:00 Fix decomposition of TyConApps Ticket #22331 showed that we were being too eager to decompose a Wanted TyConApp, leading to incompleteness in the solver. To understand all this I ended up doing a substantial rewrite of the old Note [Decomposing equalities], now reborn as Note [Decomposing TyConApp equalities]. Plus rewrites of other related Notes. The actual fix is very minor and actually simplifies the code: in `can_decompose` in `GHC.Tc.Solver.Canonical.canTyConApp`, we now call `noMatchableIrreds`. A closely related refactor: we stop trying to use the same "no matchable givens" function here as in `matchClassInst`. Instead split into two much simpler functions. - - - - - 2da5c38a by Will Hawkins at 2022-11-26T04:05:04-05:00 Redirect output of musttail attribute test Compilation output from test for support of musttail attribute leaked to the console. - - - - - 0eb1c331 by Cheng Shao at 2022-11-28T08:55:53+00:00 Move hs_mulIntMayOflo cbits to ghc-prim It's only used by wasm NCG at the moment, but ghc-prim is a more reasonable place for hosting out-of-line primops. Also, we only need a single version of hs_mulIntMayOflo. - - - - - 36b53a9d by Cheng Shao at 2022-11-28T09:05:57+00:00 compiler: generate ccalls for clz/ctz/popcnt in wasm NCG We used to generate a single wasm clz/ctz/popcnt opcode, but it's wrong when it comes to subwords, so might as well generate ccalls for them. See #22470 for details. - - - - - d4134e92 by Cheng Shao at 2022-11-28T23:48:14-05:00 compiler: remove unused MO_U_MulMayOflo We actually only emit MO_S_MulMayOflo and never emit MO_U_MulMayOflo anywhere. - - - - - 8d15eadc by Apoorv Ingle at 2022-11-29T03:09:31-05:00 Killing cc_fundeps, streamlining kind equality orientation, and type equality processing order Fixes: #217093 Associated to #19415 This change * Flips the orientation of the the generated kind equality coercion in canEqLHSHetero; * Removes `cc_fundeps` in CDictCan as the check was incomplete; * Changes `canDecomposableTyConAppOk` to ensure we process kind equalities before type equalities and avoiding a call to `canEqLHSHetero` while processing wanted TyConApp equalities * Adds 2 new tests for validating the change - testsuites/typecheck/should_compile/T21703.hs and - testsuites/typecheck/should_fail/T19415b.hs (a simpler version of T19415.hs) * Misc: Due to the change in the equality direction some error messages now have flipped type mismatch errors * Changes in Notes: - Note [Fundeps with instances, and equality orientation] supercedes Note [Fundeps with instances] - Added Note [Kind Equality Orientation] to visualize the kind flipping - Added Note [Decomposing Dependent TyCons and Processing Wanted Equalties] - - - - - 646969d4 by Krzysztof Gogolewski at 2022-11-29T03:10:13-05:00 Change printing of sized literals to match the proposal Literals in Core were printed as e.g. 0xFF#16 :: Int16#. The proposal 451 now specifies syntax 0xFF#Int16. This change affects the Core printer only - more to be done later. Part of #21422. - - - - - 02e282ec by Simon Peyton Jones at 2022-11-29T03:10:48-05:00 Be a bit more selective about floating bottoming expressions This MR arranges to float a bottoming expression to the top only if it escapes a value lambda. See #22494 and Note [Floating to the top] in SetLevels. This has a generally beneficial effect in nofib +-------------------------------++----------+ | ||tsv (rel) | +===============================++==========+ | imaginary/paraffins || -0.93% | | imaginary/rfib || -0.05% | | real/fem || -0.03% | | real/fluid || -0.01% | | real/fulsom || +0.05% | | real/gamteb || -0.27% | | real/gg || -0.10% | | real/hidden || -0.01% | | real/hpg || -0.03% | | real/scs || -11.13% | | shootout/k-nucleotide || -0.01% | | shootout/n-body || -0.08% | | shootout/reverse-complement || -0.00% | | shootout/spectral-norm || -0.02% | | spectral/fibheaps || -0.20% | | spectral/hartel/fft || -1.04% | | spectral/hartel/solid || +0.33% | | spectral/hartel/wave4main || -0.35% | | spectral/mate || +0.76% | +===============================++==========+ | geom mean || -0.12% | The effect on compile time is generally slightly beneficial Metrics: compile_time/bytes allocated ---------------------------------------------- MultiLayerModulesTH_OneShot(normal) +0.3% PmSeriesG(normal) -0.2% PmSeriesT(normal) -0.1% T10421(normal) -0.1% T10421a(normal) -0.1% T10858(normal) -0.1% T11276(normal) -0.1% T11303b(normal) -0.2% T11545(normal) -0.1% T11822(normal) -0.1% T12150(optasm) -0.1% T12234(optasm) -0.3% T13035(normal) -0.2% T16190(normal) -0.1% T16875(normal) -0.4% T17836b(normal) -0.2% T17977(normal) -0.2% T17977b(normal) -0.2% T18140(normal) -0.1% T18282(normal) -0.1% T18304(normal) -0.2% T18698a(normal) -0.1% T18923(normal) -0.1% T20049(normal) -0.1% T21839r(normal) -0.1% T5837(normal) -0.4% T6048(optasm) +3.2% BAD T9198(normal) -0.2% T9630(normal) -0.1% TcPlugin_RewritePerf(normal) -0.4% hard_hole_fits(normal) -0.1% geo. mean -0.0% minimum -0.4% maximum +3.2% The T6048 outlier is hard to pin down, but it may be the effect of reading in more interface files definitions. It's a small program for which compile time is very short, so I'm not bothered about it. Metric Increase: T6048 - - - - - ab23dc5e by Ben Gamari at 2022-11-29T03:11:25-05:00 testsuite: Mark unpack_sums_6 as fragile due to #22504 This test is explicitly dependent upon runtime, which is generally not appropriate given that the testsuite is run in parallel and generally saturates the CPU. - - - - - def47dd3 by Ben Gamari at 2022-11-29T03:11:25-05:00 testsuite: Don't use grep -q in unpack_sums_7 `grep -q` closes stdin as soon as it finds the pattern it is looking for, resulting in #22484. - - - - - cc25d52e by Sylvain Henry at 2022-11-29T09:44:31+01:00 Add Javascript backend Add JS backend adapted from the GHCJS project by Luite Stegeman. Some features haven't been ported or implemented yet. Tests for these features have been disabled with an associated gitlab ticket. Bump array submodule Work funded by IOG. Co-authored-by: Jeffrey Young <jeffrey.young at iohk.io> Co-authored-by: Luite Stegeman <stegeman at gmail.com> Co-authored-by: Josh Meredith <joshmeredith2008 at gmail.com> - - - - - 68c966cd by sheaf at 2022-11-30T09:31:25-05:00 Fix @since annotations on WithDict and Coercible Fixes #22453 - - - - - a3a8e9e9 by Simon Peyton Jones at 2022-11-30T09:32:03-05:00 Be more careful in GHC.Tc.Solver.Interact.solveOneFromTheOther We were failing to account for the cc_pend_sc flag in this important function, with the result that we expanded superclasses forever. Fixes #22516. - - - - - a9d9b8c0 by Simon Peyton Jones at 2022-11-30T09:32:03-05:00 Use mkNakedFunTy in tcPatSynSig As #22521 showed, in tcPatSynSig we make a "fake type" to kind-generalise; and that type has unzonked type variables in it. So we must not use `mkFunTy` (which checks FunTy's invariants) via `mkPhiTy` when building this type. Instead we need to use `mkNakedFunTy`. Easy fix. - - - - - 31462d98 by Andreas Klebinger at 2022-11-30T14:50:58-05:00 Properly cast values when writing/reading unboxed sums. Unboxed sums might store a Int8# value as Int64#. This patch makes sure we keep track of the actual value type. See Note [Casting slot arguments] for the details. - - - - - 10a2a7de by Oleg Grenrus at 2022-11-30T14:51:39-05:00 Move Void to GHC.Base... This change would allow `Void` to be used deeper in module graph. For example exported from `Prelude` (though that might be already possible). Also this change includes a change `stimes @Void _ x = x`, https://github.com/haskell/core-libraries-committee/issues/95 While the above is not required, maintaining old stimes behavior would be tricky as `GHC.Base` doesn't know about `Num` or `Integral`, which would require more hs-boot files. - - - - - b4cfa8e2 by Sebastian Graf at 2022-11-30T14:52:24-05:00 DmdAnal: Reflect the `seq` of strict fields of a DataCon worker (#22475) See the updated `Note [Data-con worker strictness]` and the new `Note [Demand transformer for data constructors]`. Fixes #22475. - - - - - d87f28d8 by Baldur Blöndal at 2022-11-30T21:16:36+01:00 Make Functor a quantified superclass of Bifunctor. See https://github.com/haskell/core-libraries-committee/issues/91 for discussion. This change relates Bifunctor with Functor by requiring second = fmap. Moreover this change is a step towards unblocking the major version bump of bifunctors and profunctors to major version 6. This paves the way to move the Profunctor class into base. For that Functor first similarly becomes a superclass of Profunctor in the new major version 6. - - - - - 72cf4c5d by doyougnu at 2022-12-01T12:36:44-05:00 FastString: SAT bucket_match Metric Decrease: MultiLayerModulesTH_OneShot - - - - - afc2540d by Simon Peyton Jones at 2022-12-01T12:37:20-05:00 Add a missing varToCoreExpr in etaBodyForJoinPoint This subtle bug showed up when compiling a library with 9.4. See #22491. The bug is present in master, but it is hard to trigger; the new regression test T22491 fails in 9.4. The fix was easy: just add a missing varToCoreExpr in etaBodyForJoinPoint. The fix is definitely right though! I also did some other minor refatoring: * Moved the preInlineUnconditionally test in simplExprF1 to before the call to joinPointBinding_maybe, to avoid fruitless eta-expansion. * Added a boolean from_lam flag to simplNonRecE, to avoid two fruitless tests, and commented it a bit better. These refactorings seem to save 0.1% on compile-time allocation in perf/compiler; with a max saving of 1.4% in T9961 Metric Decrease: T9961 - - - - - 81eeec7f by M Farkas-Dyck at 2022-12-01T12:37:56-05:00 CI: Forbid the fully static build on Alpine to fail. To do so, we mark some tests broken in this configuration. - - - - - c5d1bf29 by Bryan Richter at 2022-12-01T12:37:56-05:00 CI: Remove ARMv7 jobs These jobs fail (and are allowed to fail) nearly every time. Soon they won't even be able to run at all, as we won't currently have runners that can run them. Fixing the latter problem is tracked in #22409. I went ahead and removed all settings and configurations. - - - - - d82992fd by Bryan Richter at 2022-12-01T12:37:56-05:00 CI: Fix CI lint Failure was introduced by conflicting changes to gen_ci.hs that did *not* trigger git conflicts. - - - - - ce126993 by Simon Peyton Jones at 2022-12-02T01:22:12-05:00 Refactor TyCon to have a top-level product This patch changes the representation of TyCon so that it has a top-level product type, with a field that gives the details (newtype, type family etc), #22458. Not much change in allocation, but execution seems to be a bit faster. Includes a change to the haddock submodule to adjust for API changes. - - - - - 74c767df by Matthew Pickering at 2022-12-02T01:22:48-05:00 ApplicativeDo: Set pattern location before running exhaustiveness checker This improves the error messages of the exhaustiveness checker when checking statements which have been moved around with ApplicativeDo. Before: Test.hs:2:3: warning: [GHC-62161] [-Wincomplete-uni-patterns] Pattern match(es) are non-exhaustive In a pattern binding: Patterns of type ‘Maybe ()’ not matched: Nothing | 2 | let x = () | ^^^^^^^^^^ After: Test.hs:4:3: warning: [GHC-62161] [-Wincomplete-uni-patterns] Pattern match(es) are non-exhaustive In a pattern binding: Patterns of type ‘Maybe ()’ not matched: Nothing | 4 | ~(Just res1) <- seq x (pure $ Nothing @()) | Fixes #22483 - - - - - 85ecc1a0 by Matthew Pickering at 2022-12-02T19:46:43-05:00 Add special case for :Main module in `GHC.IfaceToCore.mk_top_id` See Note [Root-main Id] The `:Main` special binding is actually defined in the current module (hence don't go looking for it externally) but the module name is rOOT_MAIN rather than the current module so we need this special case. There was already some similar logic in `GHC.Rename.Env` for External Core, but now the "External Core" is in interface files it needs to be moved here instead. Fixes #22405 - - - - - 108c319f by Krzysztof Gogolewski at 2022-12-02T19:47:18-05:00 Fix linearity checking in Lint Lint was not able to see that x*y <= x*y, because this inequality was decomposed to x <= x*y && y <= x*y, but there was no rule to see that x <= x*y. Fixes #22546. - - - - - bb674262 by Bryan Richter at 2022-12-03T04:38:46-05:00 Mark T16916 fragile See https://gitlab.haskell.org/ghc/ghc/-/issues/16966 - - - - - 5d267d46 by Vladislav Zavialov at 2022-12-03T04:39:22-05:00 Refactor: FreshOrReuse instead of addTyClTyVarBinds This is a refactoring that should have no effect on observable behavior. Prior to this change, GHC.HsToCore.Quote contained a few closely related functions to process type variable bindings: addSimpleTyVarBinds, addHsTyVarBinds, addQTyVarBinds, and addTyClTyVarBinds. We can classify them by their input type and name generation strategy: Fresh names only Reuse bound names +---------------------+-------------------+ [Name] | addSimpleTyVarBinds | | [LHsTyVarBndr flag GhcRn] | addHsTyVarBinds | | LHsQTyVars GhcRn | addQTyVarBinds | addTyClTyVarBinds | +---------------------+-------------------+ Note how two functions are missing. Because of this omission, there were two places where a LHsQTyVars value was constructed just to be able to pass it to addTyClTyVarBinds: 1. mk_qtvs in addHsOuterFamEqnTyVarBinds -- bad 2. mkHsQTvs in repFamilyDecl -- bad This prevented me from making other changes to LHsQTyVars, so the main goal of this refactoring is to get rid of those workarounds. The most direct solution would be to define the missing functions. But that would lead to a certain amount of code duplication. To avoid code duplication, I factored out the name generation strategy into a function parameter: data FreshOrReuse = FreshNamesOnly | ReuseBoundNames addSimpleTyVarBinds :: FreshOrReuse -> ... addHsTyVarBinds :: FreshOrReuse -> ... addQTyVarBinds :: FreshOrReuse -> ... - - - - - c189b831 by Vladislav Zavialov at 2022-12-03T04:39:22-05:00 addHsOuterFamEqnTyVarBinds: use FreshNamesOnly for explicit binders Consider this example: [d| instance forall a. C [a] where type forall b. G [a] b = Proxy b |] When we process "forall b." in the associated type instance, it is unambiguously the binding site for "b" and we want a fresh name for it. Therefore, FreshNamesOnly is more fitting than ReuseBoundNames. This should not have any observable effect but it avoids pointless lookups in the MetaEnv. - - - - - 42512264 by Ross Paterson at 2022-12-03T10:32:45+00:00 Handle type data declarations in Template Haskell quotations and splices (fixes #22500) This adds a TypeDataD constructor to the Template Haskell Dec type, and ensures that the constructors it contains go in the TyCls namespace. - - - - - 1a767fa3 by Vladislav Zavialov at 2022-12-05T05:18:50-05:00 Add BufSpan to EpaLocation (#22319, #22558) The key part of this patch is the change to mkTokenLocation: - mkTokenLocation (RealSrcSpan r _) = TokenLoc (EpaSpan r) + mkTokenLocation (RealSrcSpan r mb) = TokenLoc (EpaSpan r mb) mkTokenLocation used to discard the BufSpan, but now it is saved and can be retrieved from LHsToken or LHsUniToken. This is made possible by the following change to EpaLocation: - data EpaLocation = EpaSpan !RealSrcSpan + data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan) | ... The end goal is to make use of the BufSpan in Parser/PostProcess/Haddock. - - - - - cd31acad by sheaf at 2022-12-06T15:45:58-05:00 Hadrian: fix ghcDebugAssertions off-by-one error Commit 6b2f7ffe changed the logic that decided whether to enable debug assertions. However, it had an off-by-one error, as the stage parameter to the function inconsistently referred to the stage of the compiler being used to build or the stage of the compiler we are building. This patch makes it consistent. Now the parameter always refers to the the compiler which is being built. In particular, this patch re-enables assertions in the stage 2 compiler when building with devel2 flavour, and disables assertions in the stage 2 compiler when building with validate flavour. Some extra performance tests are now run in the "validate" jobs because the stage2 compiler no longer contains assertions. ------------------------- Metric Decrease: CoOpt_Singletons MultiComponentModules MultiComponentModulesRecomp MultiLayerModulesTH_OneShot T11374 T12227 T12234 T13253-spj T13701 T14683 T14697 T15703 T17096 T17516 T18304 T18478 T18923 T5030 T9872b TcPlugin_RewritePerf Metric Increase: MultiComponentModules MultiComponentModulesRecomp MultiLayerModules MultiLayerModulesRecomp MultiLayerModulesTH_Make T13386 T13719 T3294 T9233 T9675 parsing001 ------------------------- - - - - - 21d66db1 by mrkun at 2022-12-06T15:46:38-05:00 Push DynFlags out of runInstallNameTool - - - - - aaaaa79b by mrkun at 2022-12-06T15:46:38-05:00 Push DynFlags out of askOtool - - - - - 4e28f49e by mrkun at 2022-12-06T15:46:38-05:00 Push DynFlags out of runInjectRPaths - - - - - a7422580 by mrkun at 2022-12-06T15:46:38-05:00 Push DynFlags out of Linker.MacOS - - - - - eb1c73f7 by Ben Gamari at 2022-12-07T08:46:21-05:00 Update for GhC 9.6 - - - - - 063268dd by Ben Gamari at 2022-12-07T11:26:32-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - e902d771 by Matthew Craven at 2022-12-08T08:30:23-05:00 Fix bounds-checking buglet in Data.Array.Byte ...another manifestation of #20851 which I unfortunately missed in my first pass. - - - - - 8d36c0c6 by Gergő Érdi at 2022-12-08T08:31:03-05:00 Remove copy-pasted definitions of `graphFromEdgedVertices*` - - - - - c5d8ed3a by Gergő Érdi at 2022-12-08T08:31:03-05:00 Add version of `reachableGraph` that avoids loop for cyclic inputs by building its result connected component by component Fixes #22512 - - - - - 90cd5396 by Krzysztof Gogolewski at 2022-12-08T08:31:39-05:00 Mark Type.Reflection.Unsafe as Unsafe This module can be used to construct ill-formed TypeReps, so it should be Unsafe. - - - - - 2057c77d by Ian-Woo Kim at 2022-12-08T08:32:19-05:00 Truncate eventlog event for large payload (#20221) RTS eventlog events for postCapsetVecEvent are truncated if payload is larger than EVENT_PAYLOAD_SIZE_MAX Previously, postCapsetVecEvent records eventlog event with payload of variable size larger than EVENT_PAYLOAD_SIZE_MAX (2^16) without any validation, resulting in corrupted data. For example, this happens when a Haskell binary is invoked with very long command line arguments exceeding 2^16 bytes (see #20221). Now we check the size of accumulated payload messages incrementally, and truncate the message just before the payload size exceeds EVENT_PAYLOAD_SIZE_MAX. RTS will warn the user with a message showing how many arguments are truncated. - - - - - 9ec76f61 by Cheng Shao at 2022-12-08T08:32:59-05:00 hadrian: don't add debug info to non-debug ways of rts Hadrian used to pass -g when building all ways of rts. It makes output binaries larger (especially so for wasm backend), and isn't needed by most users out there, so this patch removes that flag. In case the debug info is desired, we still pass -g3 when building the debug way, and there's also the debug_info flavour transformer which ensures -g3 is passed for all rts ways. - - - - - 7658cdd4 by Krzysztof Gogolewski at 2022-12-08T08:33:36-05:00 Restore show (typeRep @[]) == "[]" The Show instance for TypeRep [] has changed in 9.5 to output "List" because the name of the type constructor changed. This seems to be accidental and is inconsistent with TypeReps of saturated lists, which are printed as e.g. "[Int]". For now, I'm restoring the old behavior; in the future, maybe we should show TypeReps without puns (List, Tuple, Type). - - - - - 4ca722fe by Ben Gamari at 2022-12-08T14:43:26-05:00 Bump bounds to accomodate base-4.18 - - - - - 216deefd by Matthew Pickering at 2022-12-08T22:45:27-05:00 Add test for #22162 - - - - - 5d0a311f by Matthew Pickering at 2022-12-08T22:45:27-05:00 ci: Add job to test interface file determinism guarantees In this job we can run on every commit we add a test which builds the Cabal library twice and checks that the ABI hash and interface hash is stable across the two builds. * We run the test 20 times to try to weed out any race conditions due to `-j` * We run the builds in different temporary directories to try to weed out anything related to build directory affecting ABI or interface file hash. Fixes #22180 - - - - - 0a76d7d4 by Matthew Pickering at 2022-12-08T22:45:27-05:00 ci: Add job for testing interface stability across builds The idea is that both the bindists should product libraries with the same ABI and interface hash. So the job checks with ghc-pkg to make sure the computed ABI is the same. In future this job can be extended to check for the other facets of interface determinism. Fixes #22180 - - - - - 74c9bf91 by Matthew Pickering at 2022-12-08T22:45:27-05:00 backpack: Be more careful when adding together ImportAvails There was some code in the signature merging logic which added together the ImportAvails of the signature and the signature which was merged into it. This had the side-effect of making the merged signature depend on the signature (via a normal module dependency). The intention was to propagate orphan instances through the merge but this also messed up recompilation logic because we shouldn't be attempting to load B.hi when mergeing it. The fix is to just combine the part of ImportAvails that we intended to (transitive info, orphan instances and type family instances) rather than the whole thing. - - - - - d122e022 by Matthew Pickering at 2022-12-08T22:45:27-05:00 Fix mk_mod_usage_info if the interface file is not already loaded In #22217 it was observed that the order modules are compiled in affects the contents of an interface file. This was because a module dependended on another module indirectly, via a re-export but the interface file for this module was never loaded because the symbol was never used in the file. If we decide that we depend on a module then we jolly well ought to record this fact in the interface file! Otherwise it could lead to very subtle recompilation bugs if the dependency is not tracked and the module is updated. Therefore the best thing to do is just to make sure the file is loaded by calling the `loadSysInterface` function. This first checks the caches (like we did before) but then actually goes to find the interface on disk if it wasn't loaded. Fixes #22217 - - - - - ea25088d by lrzlin at 2022-12-08T22:46:06-05:00 Add initial support for LoongArch Architecture. - - - - - 9eb9d2f4 by Andrew Lelechenko at 2022-12-08T22:46:47-05:00 Update submodule mtl to 2.3.1, parsec to 3.1.15.1, haddock and Cabal to HEAD - - - - - 08d8fe2a by Andrew Lelechenko at 2022-12-08T22:46:47-05:00 Allow mtl-2.3 in hadrian - - - - - 3807a46c by Andrew Lelechenko at 2022-12-08T22:46:47-05:00 Support mtl-2.3 in check-exact - - - - - ef702a18 by Andrew Lelechenko at 2022-12-08T22:46:47-05:00 Fix tests - - - - - 3144e8ff by Sebastian Graf at 2022-12-08T22:47:22-05:00 Make (^) INLINE (#22324) So that we get to cancel away the allocation for the lazily used base. We can move `powImpl` (which *is* strict in the base) to the top-level so that we don't duplicate too much code and move the SPECIALISATION pragmas onto `powImpl`. The net effect of this change is that `(^)` plays along much better with inlining thresholds and loopification (#22227), for example in `x2n1`. Fixes #22324. - - - - - 1d3a8b8e by Matthew Pickering at 2022-12-08T22:47:59-05:00 Typeable: Fix module locations of some definitions in GHC.Types There was some confusion in Data.Typeable about which module certain wired-in things were defined in. Just because something is wired-in doesn't mean it comes from GHC.Prim, in particular things like LiftedRep and RuntimeRep are defined in GHC.Types and that's the end of the story. Things like Int#, Float# etc are defined in GHC.Prim as they have no Haskell definition site at all so we need to generate type representations for them (which live in GHC.Types). Fixes #22510 - - - - - 0f7588b5 by Sebastian Graf at 2022-12-08T22:48:34-05:00 Make `drop` and `dropWhile` fuse (#18964) I copied the fusion framework we have in place for `take`. T18964 asserts that we regress neither when fusion fires nor when it doesn't. Fixes #18964. - - - - - 26e71562 by Sebastian Graf at 2022-12-08T22:49:10-05:00 Do not strictify a DFun's parameter dictionaries (#22549) ... thus fixing #22549. The details are in the refurbished and no longer dead `Note [Do not strictify a DFun's parameter dictionaries]`. There's a regression test in T22549. - - - - - 36093407 by John Ericson at 2022-12-08T22:49:45-05:00 Delete `rts/package.conf.in` It is a relic of the Make build system. The RTS now uses a `package.conf` file generated the usual way by Cabal. - - - - - b0cc2fcf by Krzysztof Gogolewski at 2022-12-08T22:50:21-05:00 Fixes around primitive literals * The SourceText of primitive characters 'a'# did not include the #, unlike for other primitive literals 1#, 1##, 1.0#, 1.0##, "a"#. We can now remove the function pp_st_suffix, which was a hack to add the # back. * Negative primitive literals shouldn't use parentheses, as described in Note [Printing of literals in Core]. Added a testcase to T14681. - - - - - aacf616d by Bryan Richter at 2022-12-08T22:50:56-05:00 testsuite: Mark conc024 fragile on Windows - - - - - ed239a24 by Ryan Scott at 2022-12-09T09:42:16-05:00 Document TH splices' interaction with INCOHERENT instances Top-level declaration splices can having surprising interactions with `INCOHERENT` instances, as observed in #22492. This patch resolves #22492 by documenting this strange interaction in the GHC User's Guide. [ci skip] - - - - - 1023b432 by Mike Pilgrem at 2022-12-09T09:42:56-05:00 Fix #22300 Document GHC's extensions to valid whitespace - - - - - 79b0cec0 by Luite Stegeman at 2022-12-09T09:43:38-05:00 Add support for environments that don't have setImmediate - - - - - 5b007ec5 by Luite Stegeman at 2022-12-09T09:43:38-05:00 Fix bound thread status - - - - - 65335d10 by Matthew Pickering at 2022-12-09T20:15:45-05:00 Update containers submodule This contains a fix necessary for the multi-repl to work on GHC's code base where we try to load containers and template-haskell into the same session. - - - - - 4937c0bb by Matthew Pickering at 2022-12-09T20:15:45-05:00 hadrian-multi: Put interface files in separate directories Before we were putting all the interface files in the same directory which was leading to collisions if the files were called the same thing. - - - - - 8acb5b7b by Matthew Pickering at 2022-12-09T20:15:45-05:00 hadrian-toolargs: Add filepath to allowed repl targets - - - - - 5949d927 by Matthew Pickering at 2022-12-09T20:15:45-05:00 driver: Set correct UnitId when rehydrating modules We were not setting the UnitId before rehydrating modules which just led to us attempting to find things in the wrong HPT. The test for this is the hadrian-multi command (which is now added as a CI job). Fixes #22222 - - - - - ab06c0f0 by Matthew Pickering at 2022-12-09T20:15:45-05:00 ci: Add job to test hadrian-multi command I am not sure this job is good because it requires booting HEAD with HEAD, but it should be fine. - - - - - fac3e568 by Matthew Pickering at 2022-12-09T20:16:20-05:00 hadrian: Update bootstrap plans to 9.2.* series and 9.4.* series. This updates the build plans for the most recent compiler versions, as well as fixing the hadrian-bootstrap-gen script to a specific GHC version. - - - - - 195b08b4 by Matthew Pickering at 2022-12-09T20:16:20-05:00 ci: Bump boot images to use ghc-9.4.3 Also updates the bootstrap jobs to test booting 9.2 and 9.4. - - - - - c658c580 by Matthew Pickering at 2022-12-09T20:16:20-05:00 hlint: Removed redundant UnboxedSums pragmas UnboxedSums is quite confusingly implied by UnboxedTuples, alas, just the way it is. See #22485 - - - - - 340b7511 by Vladislav Zavialov at 2022-12-10T12:31:28+00:00 HsToken in HsAppKindTy - - - - - b3e98a92 by Oleg Grenrus at 2022-12-11T12:26:17-05:00 Add heqT, a kind-heterogeneous variant of heq CLC proposal https://github.com/haskell/core-libraries-committee/issues/99 - - - - - bfd7c1e6 by Andrew Lelechenko at 2022-12-11T12:26:55-05:00 Document that Bifunctor instances for tuples are lawful only up to laziness - - - - - 5d1a1881 by Bryan Richter at 2022-12-12T16:22:36-05:00 Mark T21336a fragile - - - - - c30accc2 by Matthew Pickering at 2022-12-12T16:23:11-05:00 Add test for #21476 This issues seems to have been fixed since the ticket was made, so let's add a test and move on. Fixes #21476 - - - - - 946226ec by Ben Gamari at 2022-12-13T20:12:56-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - e9d74a3e by Sebastian Graf at 2022-12-13T22:18:39-05:00 Respect -XStrict in the pattern-match checker (#21761) We were missing a call to `decideBangHood` in the pattern-match checker. There is another call in `matchWrapper.mk_eqn_info` which seems redundant but really is not; see `Note [Desugaring -XStrict matches in Pmc]`. Fixes #21761. - - - - - 884790e2 by Gergő Érdi at 2022-12-13T22:19:14-05:00 Fix loop in the interface representation of some `Unfolding` fields As discovered in #22272, dehydration of the unfolding info of a recursive definition used to involve a traversal of the definition itself, which in turn involves traversing the unfolding info. Hence, a loop. Instead, we now store enough data in the interface that we can produce the unfolding info without this traversal. See Note [Tying the 'CoreUnfolding' knot] for details. Fixes #22272 Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - 9f301189 by Alan Zimmerman at 2022-12-13T22:19:50-05:00 EPA: When splitting out header comments, keep ones for first decl Any comments immediately preceding the first declaration are no longer kept as header comments, but attach to the first declaration instead. - - - - - 8b1f1b45 by Sylvain Henry at 2022-12-13T22:20:28-05:00 JS: fix object file name comparison (#22578) - - - - - e9e161bb by Bryan Richter at 2022-12-13T22:21:03-05:00 configure: Bump min bootstrap GHC version to 9.2 - - - - - 75855643 by Ben Gamari at 2022-12-15T03:54:02-05:00 hadrian: Don't enable TSAN in stage0 build - - - - - da7b51d8 by Ben Gamari at 2022-12-15T03:54:02-05:00 cmm: Introduce blockConcat - - - - - 34f6b09c by Ben Gamari at 2022-12-15T03:54:02-05:00 cmm: Introduce MemoryOrderings - - - - - 43beaa7b by Ben Gamari at 2022-12-15T03:54:02-05:00 llvm: Respect memory specified orderings - - - - - 8faf74fc by Ben Gamari at 2022-12-15T03:54:02-05:00 Codegen/x86: Eliminate barrier for relaxed accesses - - - - - 6cc3944a by Ben Gamari at 2022-12-15T03:54:02-05:00 cmm/Parser: Reduce some repetition - - - - - 6c9862c4 by Ben Gamari at 2022-12-15T03:54:02-05:00 cmm/Parser: Add syntax for ordered loads and stores - - - - - 748490d2 by Ben Gamari at 2022-12-15T03:54:02-05:00 cmm/Parser: Atomic load syntax Originally I had thought I would just use the `prim` call syntax instead of introducing new syntax for atomic loads. However, it turns out that `prim` call syntax tends to make things quite unreadable. This new syntax seems quite natural. - - - - - 28c6781a by Ben Gamari at 2022-12-15T03:54:02-05:00 codeGen: Introduce ThreadSanitizer instrumentation This introduces a new Cmm pass which instruments the program with ThreadSanitizer annotations, allowing full tracking of mutator memory accesses via TSAN. - - - - - d97aa311 by Ben Gamari at 2022-12-15T03:54:02-05:00 Hadrian: Drop TSAN_ENABLED define from flavour This is redundant since the TSANUtils.h already defines it. - - - - - 86974ef1 by Ben Gamari at 2022-12-15T03:54:02-05:00 hadrian: Enable Cmm instrumentation in TSAN flavour - - - - - 93723290 by Ben Gamari at 2022-12-15T03:54:02-05:00 rts: Ensure that global regs are never passed as fun call args This is in general unsafe as they may be clobbered if they are mapped to caller-saved machine registers. See Note [Register parameter passing]. - - - - - 2eb0fb87 by Matthew Pickering at 2022-12-15T03:54:39-05:00 Package Imports: Get candidate packages also from re-exported modules Previously we were just looking at the direct imports to try and work out what a package qualifier could apply to but #22333 pointed out we also needed to look for reexported modules. Fixes #22333 - - - - - 552b7908 by Ben Gamari at 2022-12-15T03:55:15-05:00 compiler: Ensure that MutVar operations have necessary barriers Here we add acquire and release barriers in readMutVar# and writeMutVar#, which are necessary for soundness. Fixes #22468. - - - - - 933d61a4 by Simon Peyton Jones at 2022-12-15T03:55:51-05:00 Fix bogus test in Lint The Lint check for branch compatiblity within an axiom, in GHC.Core.Lint.compatible_branches was subtly different to the check made when contructing an axiom, in GHC.Core.FamInstEnv.compatibleBranches. The latter is correct, so I killed the former and am now using the latter. On the way I did some improvements to pretty-printing and documentation. - - - - - 03ed0b95 by Ryan Scott at 2022-12-15T03:56:26-05:00 checkValidInst: Don't expand synonyms when splitting sigma types Previously, the `checkValidInst` function (used when checking that an instance declaration is headed by an actual type class, not a type synonym) was using `tcSplitSigmaTy` to split apart the `forall`s and instance context. This is incorrect, however, as `tcSplitSigmaTy` expands type synonyms, which can cause instances headed by quantified constraint type synonyms to be accepted erroneously. This patch introduces `splitInstTyForValidity`, a variant of `tcSplitSigmaTy` specialized for validity checking that does _not_ expand type synonyms, and uses it in `checkValidInst`. Fixes #22570. - - - - - ed056bc3 by Ben Gamari at 2022-12-16T16:12:44-05:00 rts/Messages: Refactor This doesn't change behavior but makes the code a bit easier to follow. - - - - - 7356f8e0 by Ben Gamari at 2022-12-16T16:12:44-05:00 rts/ThreadPaused: Ordering fixes - - - - - 914f0025 by Ben Gamari at 2022-12-16T16:12:44-05:00 eventlog: Silence spurious data race - - - - - fbc84244 by Ben Gamari at 2022-12-16T16:12:44-05:00 Introduce SET_INFO_RELEASE for Cmm - - - - - 821b5472 by Ben Gamari at 2022-12-16T16:12:44-05:00 rts: Use fences instead of explicit barriers - - - - - 2228c999 by Ben Gamari at 2022-12-16T16:12:44-05:00 rts/stm: Fix memory ordering in readTVarIO# See #22421. - - - - - 99269b9f by Ben Gamari at 2022-12-16T16:12:44-05:00 Improve heap memory barrier Note Also introduce MUT_FIELD marker in Closures.h to document mutable fields. - - - - - 70999283 by Ben Gamari at 2022-12-16T16:12:44-05:00 rts: Introduce getNumCapabilities And ensure accesses to n_capabilities are atomic (although with relaxed ordering). This is necessary as RTS API callers may concurrently call into the RTS without holding a capability. - - - - - 98689f77 by Ben Gamari at 2022-12-16T16:12:44-05:00 ghc: Fix data race in dump file handling Previously the dump filename cache would use a non-atomic update which could potentially result in lost dump contents. Note that this is still a bit racy since the first writer may lag behind a later appending writer. - - - - - 605d9547 by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Always use atomics for context_switch and interrupt Since these are modified by the timer handler. - - - - - 86f20258 by Ben Gamari at 2022-12-16T16:12:45-05:00 rts/Timer: Always use atomic operations As noted in #22447, the existence of the pthread-based ITimer implementation means that we cannot assume that the program is single-threaded. - - - - - f8e901dc by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Encapsulate recent_activity access This makes it easier to ensure that it is accessed using the necessary atomic operations. - - - - - e0affaa9 by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Encapsulate access to capabilities array - - - - - 7ca683e4 by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Encapsulate sched_state - - - - - 1cf13bd0 by Ben Gamari at 2022-12-16T16:12:45-05:00 PrimOps: Fix benign MutVar race Relaxed ordering is fine here since the later CAS implies a release. - - - - - 3d2a7e08 by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Style fix - - - - - 82c62074 by Ben Gamari at 2022-12-16T16:12:45-05:00 compiler: Use release store in eager blackholing - - - - - eb1a0136 by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Fix ordering of makeStableName - - - - - ad0e260a by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Use ordered accesses instead of explicit barriers - - - - - a3eccf06 by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Statically allocate capabilities This is a rather simplistic way of solving #17289. - - - - - 287fa3fb by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Ensure that all accesses to pending_sync are atomic - - - - - 351eae58 by Ben Gamari at 2022-12-16T16:12:45-05:00 rts: Note race with wakeBlockingQueue - - - - - 5acf33dd by Andrew Lelechenko at 2022-12-16T16:13:22-05:00 Bump submodule directory to 1.3.8.0 and hpc to HEAD - - - - - 0dd95421 by Andrew Lelechenko at 2022-12-16T16:13:22-05:00 Accept allocations increase on Windows This is because of `filepath-1.4.100.0` and AFPP, causing increasing round-trips between lists and ByteArray. See #22625 for discussion. Metric Increase: MultiComponentModules MultiComponentModulesRecomp MultiLayerModules MultiLayerModulesRecomp T10421 T10547 T12150 T12227 T12234 T12425 T13035 T13253 T13253-spj T13701 T13719 T15703 T16875 T18140 T18282 T18304 T18698a T18698b T18923 T20049 T21839c T21839r T5837 T6048 T9198 T9961 TcPlugin_RewritePerf hard_hole_fits - - - - - ef9ac9d2 by Cheng Shao at 2022-12-16T16:13:59-05:00 testsuite: Mark T9405 as fragile instead of broken on Windows It's starting to pass again, and the unexpected pass blocks CI. - - - - - 1f3abd85 by Cheng Shao at 2022-12-16T21:16:28+00:00 compiler: remove obsolete commented code in wasm NCG It was just a temporary hack to workaround a bug in the relooper, that bug has been fixed long before the wasm backend is merged. - - - - - e3104eab by Cheng Shao at 2022-12-16T21:16:28+00:00 compiler: add missing export list of GHC.CmmToAsm.Wasm.FromCmm Also removes some unreachable code here. - - - - - 1c6930bf by Cheng Shao at 2022-12-16T21:16:28+00:00 compiler: change fallback function signature to Cmm function signature in wasm NCG In the wasm NCG, when handling a `CLabel` of undefined function without knowing its function signature, we used to fallback to `() -> ()` which is accepted by `wasm-ld`. This patch changes it to the signature of Cmm functions, which equally works, but would be required when we emit tail call instructions. - - - - - 8a81d9d9 by Cheng Shao at 2022-12-16T21:16:28+00:00 compiler: add optional tail-call support in wasm NCG When the `-mtail-call` clang flag is passed at configure time, wasm tail-call extension is enabled, and the wasm NCG will emit `return_call`/`return_call_indirect` instructions to take advantage of it and avoid the `StgRun` trampoline overhead. Closes #22461. - - - - - d1431cc0 by Cheng Shao at 2022-12-17T08:07:15-05:00 base: add missing autoconf checks for waitpid/umask These are not present in wasi-libc. Required for fixing #22589 - - - - - da3f1e91 by Cheng Shao at 2022-12-17T08:07:51-05:00 compiler: make .wasm the default executable extension on wasm32 Following convention as in other wasm toolchains. Fixes #22594. - - - - - ad21f4ef by Cheng Shao at 2022-12-17T08:07:51-05:00 ci: support hello.wasm in ci.sh cross testing logic - - - - - 6fe2d778 by amesgen at 2022-12-18T19:33:49-05:00 Correct `exitWith` Haddocks The `IOError`-specific `catch` in the Prelude is long gone. - - - - - b3eacd64 by Ben Gamari at 2022-12-18T19:34:24-05:00 rts: Drop racy assertion 0e274c39bf836d5bb846f5fa08649c75f85326ac added an assertion in `dirty_MUT_VAR` checking that the MUT_VAR being dirtied was clean. However, this isn't necessarily the case since another thread may have raced us to dirty the object. - - - - - 761c1f49 by Ben Gamari at 2022-12-18T19:35:00-05:00 rts/libdw: Silence uninitialized usage warnings As noted in #22538, previously some GCC versions warned that various locals in Libdw.c may be used uninitialized. Although this wasn't strictly true (since they were initialized in an inline assembler block) we fix this by providing explicit empty initializers. Fixes #22538 - - - - - 5e047eff by Matthew Pickering at 2022-12-20T15:12:04+00:00 testsuite: Mark T16392 as fragile on windows See #22649 - - - - - 703a4665 by M Farkas-Dyck at 2022-12-20T21:14:46-05:00 Scrub some partiality in `GHC.Cmm.Info.Build`: `doSRTs` takes a `[(CAFSet, CmmDecl)]` but truly wants a `[(CAFSet, CmmStatics)]`. - - - - - 9736ab74 by Matthew Pickering at 2022-12-20T21:15:22-05:00 packaging: Fix upload_ghc_libs.py script This change reflects the changes where .cabal files are now generated by hadrian rather than ./configure. Fixes #22518 - - - - - 7c6de18d by Ben Gamari at 2022-12-20T21:15:57-05:00 configure: Drop uses of AC_PROG_CC_C99 As noted in #22566, this macro is deprecated as of autoconf-2.70 `AC_PROG_CC` now sets `ac_cv_prog_cc_c99` itself. Closes #22566. - - - - - 36c5d98e by Ben Gamari at 2022-12-20T21:15:57-05:00 configure: Use AS_HELP_STRING instead of AC_HELP_STRING The latter has been deprecated. See #22566. - - - - - befe6ff8 by Andrew Lelechenko at 2022-12-20T21:16:37-05:00 GHCi.UI: fix various usages of head and tail - - - - - 666d0ba7 by Andrew Lelechenko at 2022-12-20T21:16:37-05:00 GHCi.UI: avoid head and tail in parseCallEscape and around - - - - - 5d96fd50 by Andrew Lelechenko at 2022-12-20T21:16:37-05:00 Make GHC.Driver.Main.hscTcRnLookupRdrName to return NonEmpty - - - - - 3ce2ab94 by Andrew Lelechenko at 2022-12-21T06:17:56-05:00 Allow transformers-0.6 in ghc, ghci, ghc-bin and hadrian - - - - - 954de93a by Andrew Lelechenko at 2022-12-21T06:17:56-05:00 Update submodule haskeline to HEAD (to allow transformers-0.6) - - - - - cefbeec3 by Andrew Lelechenko at 2022-12-21T06:17:56-05:00 Update submodule transformers to 0.6.0.4 - - - - - b4730b62 by Andrew Lelechenko at 2022-12-21T06:17:56-05:00 Fix tests T13253 imports MonadTrans, which acquired a quantified constraint in transformers-0.6, thus increase in allocations Metric Increase: T13253 - - - - - 0be75261 by Simon Peyton Jones at 2022-12-21T06:18:32-05:00 Abstract over the right free vars Fix #22459, in two ways: (1) Make the Specialiser not create a bogus specialisation if it is presented by strangely polymorphic dictionary. See Note [Weird special case in SpecDict] in GHC.Core.Opt.Specialise (2) Be more careful in abstractFloats See Note [Which type variables to abstract over] in GHC.Core.Opt.Simplify.Utils. So (2) stops creating the excessively polymorphic dictionary in abstractFloats, while (1) stops crashing if some other pass should nevertheless create a weirdly polymorphic dictionary. - - - - - df7bc6b3 by Ying-Ruei Liang (TheKK) at 2022-12-21T14:31:54-05:00 rts: explicitly store return value of ccall checkClosure to prevent type error (#22617) - - - - - e193e537 by Simon Peyton Jones at 2022-12-21T14:32:30-05:00 Fix shadowing lacuna in OccurAnal Issue #22623 demonstrated another lacuna in the implementation of wrinkle (BS3) in Note [The binder-swap substitution] in the occurrence analyser. I was failing to add TyVar lambda binders using addInScope/addOneInScope and that led to a totally bogus binder-swap transformation. Very easy to fix. - - - - - 3d55d8ab by Simon Peyton Jones at 2022-12-21T14:32:30-05:00 Fix an assertion check in addToEqualCtList The old assertion saw that a constraint ct could rewrite itself (of course it can) and complained (stupid). Fixes #22645 - - - - - ceb2e9b9 by Ben Gamari at 2022-12-21T15:26:08-05:00 configure: Bump version to 9.6 - - - - - fb4d36c4 by Ben Gamari at 2022-12-21T15:27:49-05:00 base: Bump version to 4.18 Requires various submodule bumps. - - - - - 93ee7e90 by Ben Gamari at 2022-12-21T15:27:49-05:00 ghc-boot: Fix bootstrapping - - - - - fd8faa66 by Ben Gamari at 2022-12-22T13:44:28-05:00 Bump GHC version to 9.7 - - - - - fc3a2232 by Ben Gamari at 2022-12-22T13:45:06-05:00 Bump GHC version to 9.7 - - - - - 2958aa9c by Ben Gamari at 2022-12-22T14:49:16-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 914f7fe3 by Andreas Klebinger at 2022-12-22T23:36:10-05:00 Don't consider large byte arrays/compact regions pinned. Workaround for #22255 which showed how treating large/compact regions as pinned could cause segfaults. - - - - - 32b32d7f by Matthew Pickering at 2022-12-22T23:36:46-05:00 hadrian bindist: Install manpages to share/man/man1/ghc.1 When the installation makefile was copied over the manpages were no longer installed in the correct place. Now we install it into share/man/man1/ghc.1 as the make build system did. Fixes #22371 - - - - - b3ddf803 by Ben Gamari at 2022-12-22T23:37:23-05:00 rts: Drop paths from configure from cabal file A long time ago we would rely on substitutions from the configure script to inject paths of the include and library directories of libffi and libdw. However, now these are instead handled inside Hadrian when calling Cabal's `configure` (see the uses of `cabalExtraDirs` in Hadrian's `Settings.Packages.packageArgs`). While the occurrences in the cabal file were redundant, they did no harm. However, since b5c714545abc5f75a1ffdcc39b4bfdc7cd5e64b4 they have no longer been interpolated. @mpickering noticed the suspicious uninterpolated occurrence of `@FFIIncludeDir@` in #22595, prompting this commit to finally remove them. - - - - - b2c7523d by Ben Gamari at 2022-12-22T23:37:59-05:00 Bump libffi-tarballs submodule We will now use libffi-3.4.4. - - - - - 3699a554 by Alan Zimmerman at 2022-12-22T23:38:35-05:00 EPA: Make EOF position part of AnnsModule Closes #20951 Closes #19697 - - - - - 99757ce8 by Sylvain Henry at 2022-12-22T23:39:13-05:00 JS: fix support for -outputdir (#22641) The `-outputdir` option wasn't correctly handled with the JS backend because the same code path was used to handle both objects produced by the JS backend and foreign .js files. Now we clearly distinguish the two in the pipeline, fixing the bug. - - - - - 02ed7d78 by Simon Peyton Jones at 2022-12-22T23:39:49-05:00 Refactor mkRuntimeError This patch fixes #22634. Because we don't have TYPE/CONSTRAINT polymorphism, we need two error functions rather than one. I took the opportunity to rname runtimeError to impossibleError, to line up with mkImpossibleExpr, and avoid confusion with the genuine runtime-error-constructing functions. - - - - - 35267f07 by Ben Gamari at 2022-12-22T23:40:32-05:00 base: Fix event manager shutdown race on non-Linux platforms During shutdown it's possible that we will attempt to use a closed fd to wakeup another capability's event manager. On the Linux eventfd path we were careful to handle this. However on the non-Linux path we failed to do so. Fix this. - - - - - 317f45c1 by Simon Peyton Jones at 2022-12-22T23:41:07-05:00 Fix unifier bug: failing to decompose over-saturated type family This simple patch fixes #22647 - - - - - 14b2e3d3 by Ben Gamari at 2022-12-22T23:41:42-05:00 rts/m32: Fix sanity checking Previously we would attempt to clear pages which were marked as read-only. Fix this. - - - - - 16a1bcd1 by Matthew Pickering at 2022-12-23T09:15:24+00:00 ci: Move wasm pipelines into nightly rather than master See #22664 for the changes which need to be made to bring one of these back to the validate pipeline. - - - - - 18d2acd2 by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Fix race in marking of blackholes We must use an acquire-fence when marking to ensure that the indirectee is visible. - - - - - 11241efa by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Fix segment list races - - - - - 602455c9 by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Use atomic when looking at bd->gen Since it may have been mutated by a moving GC. - - - - - 9d63b160 by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Eliminate race in bump_static_flag To ensure that we don't race with a mutator entering a new CAF we take the SM mutex before touching static_flag. The other option here would be to instead modify newCAF to use a CAS but the present approach is a bit safer. - - - - - 26837523 by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Ensure that mutable fields have acquire barrier - - - - - 8093264a by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Fix races in collector status tracking Mark a number of accesses to do with tracking of the status of the concurrent collection thread as atomic. No interesting races here, merely necessary to satisfy TSAN. - - - - - 387d4fcc by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Make segment state updates atomic - - - - - 543cae00 by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Refactor update remembered set initialization This avoids a lock inversion between the storage manager mutex and the stable pointer table mutex by not dropping the SM_MUTEX in nonmovingCollect. This requires quite a bit of rejiggering but it does seem like a better strategy. - - - - - c9936718 by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Ensure that we aren't holding locks when closing them TSAN complains about this sort of thing. - - - - - 0cd31f7d by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Make bitmap accesses atomic This is a benign race on any sensible hard since these are byte accesses. Nevertheless, atomic accesses are necessary to satisfy TSAN. - - - - - d3fe110a by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Fix benign race in update remembered set check Relaxed load is fine here since we will take the lock before looking at the list. - - - - - ab6cf893 by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Fix race in shortcutting We must use an acquire load to read the info table pointer since if we find an indirection we must be certain that we see the indirectee. - - - - - 36c9f23c by Ben Gamari at 2022-12-23T19:09:30-05:00 nonmoving: Make free list counter accesses atomic Since these may race with the allocator(s). - - - - - aebef31c by doyougnu at 2022-12-23T19:10:09-05:00 add GHC.Utils.Binary.foldGet' and use for Iface A minor optimization to remove lazy IO and a lazy accumulator strictify foldGet' IFace.Binary: use strict foldGet' remove superfluous bang - - - - - 5eb357d9 by Ben Gamari at 2022-12-24T00:41:05-05:00 compiler: Ensure that GHC toolchain is first in search path As noted in #22561, it is important that GHC's toolchain look first for its own headers and libraries to ensure that the system's are not found instead. If this happens things can break in surprising ways (e.g. see #22561). - - - - - cbaebfb9 by Matthew Pickering at 2022-12-24T00:41:40-05:00 head.hackage: Use slow-validate bindist for linting jobs This enables the SLOW_VALIDATE env var for the linting head.hackage jobs, namely the jobs enabled manually, by the label or on the nightly build now use the deb10-numa-slow-validate bindist which has assertions enabled. See #22623 for a ticket which was found by using this configuration already! The head.hackage jobs triggered by upstream CI are now thusly: hackage-lint: Can be triggered on any MR, normal validate pipeline or nightly build. Runs head.hackage with -dlint and a slow-validate bindist hackage-label-lint: Trigged on MRs with "user-facing" label, runs the slow-validate head.hackage build with -dlint. nightly-hackage-lint: Runs automatically on nightly pipelines with slow-validate + dlint config. nightly-hackage-perf: Runs automaticaly on nightly pipelines with release build and eventlogging enabled. release-hackage-lint: Runs automatically on release pipelines with -dlint on a release bindist. - - - - - f4850f36 by Matthew Pickering at 2022-12-24T00:41:40-05:00 ci: Don't run abi-test-nightly on release jobs The test is not configured to get the correct dependencies for the release pipelines (and indeed stops the release pipeline being run at all) - - - - - c264b06b by Matthew Pickering at 2022-12-24T00:41:40-05:00 ci: Run head.hackage jobs on upstream-testing branch rather than master This change allows less priviledged users to trigger head.hackage jobs because less permissions are needed to trigger jobs on the upstream-testing branch, which is not protected. There is a CI job which updates upstream-testing each hour to the state of the master branch so it should always be relatively up-to-date. - - - - - 63b97430 by Ben Gamari at 2022-12-24T00:42:16-05:00 llvmGen: Fix relaxed ordering Previously I used LLVM's `unordered` ordering for the C11 `relaxed` ordering. However, this is wrong and should rather use the LLVM `monotonic` ordering. Fixes #22640 - - - - - f42ba88f by Ben Gamari at 2022-12-24T00:42:16-05:00 gitlab-ci: Introduce aarch64-linux-llvm job This nightly job will ensure that we don't break the LLVM backend on AArch64/Linux by bootstrapping GHC. This would have caught #22640. - - - - - 6d62f6bf by Matthew Pickering at 2022-12-24T00:42:51-05:00 Store RdrName rather than OccName in Holes In #20472 it was pointed out that you couldn't defer out of scope but the implementation collapsed a RdrName into an OccName to stuff it into a Hole. This leads to the error message for a deferred qualified name dropping the qualification which affects the quality of the error message. This commit adds a bit more structure to a hole, so a hole can replace a RdrName without losing information about what that RdrName was. This is important when printing error messages. I also added a test which checks the Template Haskell deferral of out of scope qualified names works properly. Fixes #22130 - - - - - 3c3060e4 by Richard Eisenberg at 2022-12-24T17:34:19+00:00 Drop support for kind constraints. This implements proposal 547 and closes ticket #22298. See the proposal and ticket for motivation. Compiler perf improves a bit Metrics: compile_time/bytes allocated ------------------------------------- CoOpt_Singletons(normal) -2.4% GOOD T12545(normal) +1.0% T13035(normal) -13.5% GOOD T18478(normal) +0.9% T9872d(normal) -2.2% GOOD geo. mean -0.2% minimum -13.5% maximum +1.0% Metric Decrease: CoOpt_Singletons T13035 T9872d - - - - - 6d7d4393 by Ben Gamari at 2022-12-24T21:09:56-05:00 hadrian: Ensure that linker scripts are used when merging objects In #22527 @rui314 inadvertantly pointed out a glaring bug in Hadrian's implementation of the object merging rules: unlike the old `make` build system we utterly failed to pass the needed linker scripts. Fix this. - - - - - a5bd0eb8 by Andrew Lelechenko at 2022-12-24T21:10:34-05:00 Document infelicities of instance Ord Double and workarounds - - - - - 62b9a7b2 by Zubin Duggal at 2023-01-03T12:22:11+00:00 Force the Docs structure to prevent leaks in GHCi with -haddock without -fwrite-interface Involves adding many new NFData instances. Without forcing Docs, references to the TcGblEnv for each module are retained by the Docs structure. Usually these are forced when the ModIface is serialised but not when we aren't writing the interface. - - - - - 21bedd84 by Facundo Domínguez at 2023-01-03T23:27:30-05:00 Explain the auxiliary functions of permutations - - - - - 32255d05 by Matthew Pickering at 2023-01-04T11:58:42+00:00 compiler: Add -f[no-]split-sections flags Here we add a `-fsplit-sections` flag which may some day replace `-split-sections`. This has the advantage of automatically providing a `-fno-split-sections` flag, which is useful for our packaging because we enable `-split-sections` by default but want to disable it in certain configurations. - - - - - e640940c by Matthew Pickering at 2023-01-04T11:58:42+00:00 hadrian: Fix computation of tables_next_to_code for outOfTreeCompiler This copy-pasto was introduced in de5fb3489f2a9bd6dc75d0cb8925a27fe9b9084b - - - - - 15bee123 by Matthew Pickering at 2023-01-04T11:58:42+00:00 hadrian: Add test:all_deps to build just testsuite dependencies Fixes #22534 - - - - - fec6638e by Matthew Pickering at 2023-01-04T11:58:42+00:00 hadrian: Add no_split_sections tranformer This transformer reverts the effect of `split_sections`, which we intend to use for platforms which don't support split sections. In order to achieve this we have to modify the implemntation of the split_sections transformer to store whether we are enabling split_sections directly in the `Flavour` definition. This is because otherwise there's no convenient way to turn off split_sections due to having to pass additional linker scripts when merging objects. - - - - - 3dc05726 by Matthew Pickering at 2023-01-04T11:58:42+00:00 check-exact: Fix build with -Werror - - - - - 53a6ae7a by Matthew Pickering at 2023-01-04T11:58:42+00:00 ci: Build all test dependencies with in-tree compiler This means that these executables will honour flavour transformers such as "werror". Fixes #22555 - - - - - 32e264c1 by Matthew Pickering at 2023-01-04T11:58:42+00:00 hadrian: Document using GHC environment variable to select boot compiler Fixes #22340 - - - - - be9dd9b0 by Matthew Pickering at 2023-01-04T11:58:42+00:00 packaging: Build perf builds with -split-sections In 8f71d958 the make build system was made to use split-sections on linux systems but it appears this logic never made it to hadrian. There is the split_sections flavour transformer but this doesn't appear to be used for perf builds on linux. This is disbled on deb9 and windows due to #21670 Closes #21135 - - - - - 00dc5106 by Matthew Pickering at 2023-01-04T14:32:45-05:00 sphinx: Use modern syntax for extlinks This fixes the following build error: ``` Command line: /opt/homebrew/opt/sphinx-doc/bin/sphinx-build -b man -d /private/tmp/extra-dir-55768274273/.doctrees-man -n -w /private/tmp/extra-dir-55768274273/.log docs/users_guide /private/tmp/extra-dir-55768274273 ===> Command failed with error code: 2 Exception occurred: File "/opt/homebrew/Cellar/sphinx-doc/6.0.0/libexec/lib/python3.11/site-packages/sphinx/ext/extlinks.py", line 101, in role title = caption % part ~~~~~~~~^~~~~~ TypeError: not all arguments converted during string formatting ``` I tested on Sphinx-5.1.1 and Sphinx-6.0.0 Thanks for sterni for providing instructions about how to test using sphinx-6.0.0. Fixes #22690 - - - - - 541aedcd by Krzysztof Gogolewski at 2023-01-05T10:48:34-05:00 Misc cleanup - Remove unused uniques and hs-boot declarations - Fix types of seq and unsafeCoerce# - Remove FastString/String roundtrip in JS - Use TTG to enforce totality - Remove enumeration in Heap/Inspect; the 'otherwise' clause serves the primitive types well. - - - - - 22bb8998 by Alan Zimmerman at 2023-01-05T10:49:09-05:00 EPA: Do not collect comments from end of file In Parser.y semis1 production triggers for the virtual semi at the end of the file. This is detected by it being zero length. In this case, do not extend the span being used to gather comments, so any final comments are allocated at the module level instead. - - - - - 9e077999 by Vladislav Zavialov at 2023-01-05T23:01:55-05:00 HsToken in TypeArg (#19623) Updates the haddock submodule. - - - - - b2a2db04 by Matthew Pickering at 2023-01-05T23:02:30-05:00 Revert "configure: Drop uses of AC_PROG_CC_C99" This reverts commit 7c6de18dd3151ead954c210336728e8686c91de6. Centos7 using a very old version of the toolchain (autotools-2.69) where the behaviour of these macros has not yet changed. I am reverting this without haste as it is blocking the 9.6 branch. Fixes #22704 - - - - - 28f8c0eb by Luite Stegeman at 2023-01-06T18:16:24+09:00 Add support for sized literals in the bytecode interpreter. The bytecode interpreter only has branching instructions for word-sized values. These are used for pattern matching. Branching instructions for other types (e.g. Int16# or Word8#) weren't needed, since unoptimized Core or STG never requires branching on types like this. It's now possible for optimized STG to reach the bytecode generator (e.g. fat interface files or certain compiler flag combinations), which requires dealing with various sized literals in branches. This patch improves support for generating bytecode from optimized STG by adding the following new bytecode instructions: TESTLT_I64 TESTEQ_I64 TESTLT_I32 TESTEQ_I32 TESTLT_I16 TESTEQ_I16 TESTLT_I8 TESTEQ_I8 TESTLT_W64 TESTEQ_W64 TESTLT_W32 TESTEQ_W32 TESTLT_W16 TESTEQ_W16 TESTLT_W8 TESTEQ_W8 Fixes #21945 - - - - - ac39e8e9 by Matthew Pickering at 2023-01-06T13:47:00-05:00 Only store Name in FunRhs rather than Id with knot-tied fields All the issues here have been caused by #18758. The goal of the ticket is to be able to talk about things like `LTyClDecl GhcTc`. In the case of HsMatchContext, the correct "context" is whatever we want, and in fact storing just a `Name` is sufficient and correct context, even if the rest of the AST is storing typechecker Ids. So this reverts (#20415, !5579) which intended to get closed to #18758 but didn't really and introduced a few subtle bugs. Printing of an error message in #22695 would just hang, because we would attempt to print the `Id` in debug mode to assertain whether it was empty or not. Printing the Name is fine for the error message. Another consequence is that when `-dppr-debug` was enabled the compiler would hang because the debug printing of the Id would try and print fields which were not populated yet. This also led to 32070e6c2e1b4b7c32530a9566fe14543791f9a6 having to add a workaround for the `checkArgs` function which was probably a very similar bug to #22695. Fixes #22695 - - - - - c306d939 by Matthew Pickering at 2023-01-06T22:08:53-05:00 ci: Upgrade darwin, windows and freebsd CI to use GHC-9.4.3 Fixes #22599 - - - - - 0db496ff by Matthew Pickering at 2023-01-06T22:08:53-05:00 darwin ci: Explicitly pass desired build triple to configure On the zw3rk machines for some reason the build machine was inferred to be arm64. Setting the build triple appropiately resolve this confusion and we produce x86 binaries. - - - - - 2459c358 by Ben Gamari at 2023-01-06T22:09:29-05:00 rts: MUT_VAR is not a StgMutArrPtrs There was previously a comment claiming that the MUT_VAR closure type had the layout of StgMutArrPtrs. - - - - - 6206cb92 by Simon Peyton Jones at 2023-01-07T12:14:40-05:00 Make FloatIn robust to shadowing This MR fixes #22622. See the new Note [Shadowing and name capture] I did a bit of refactoring in sepBindsByDropPoint too. The bug doesn't manifest in HEAD, but it did show up in 9.4, so we should backport this patch to 9.4 - - - - - a960ca81 by Matthew Pickering at 2023-01-07T12:15:15-05:00 T10955: Set DYLD_LIBRARY_PATH for darwin The correct path to direct the dynamic linker on darwin is DYLD_LIBRARY_PATH rather than LD_LIBRARY_PATH. On recent versions of OSX using LD_LIBRARY_PATH seems to have stopped working. For more reading see: https://stackoverflow.com/questions/3146274/is-it-ok-to-use-dyld-library-path-on-mac-os-x-and-whats-the-dynamic-library-s - - - - - 73484710 by Matthew Pickering at 2023-01-07T12:15:15-05:00 Skip T18623 on darwin (to add to the long list of OSs) On recent versions of OSX, running `ulimit -v` results in ``` ulimit: setrlimit failed: invalid argument ``` Time is too short to work out what random stuff Apple has been doing with ulimit, so just skip the test like we do for other platforms. - - - - - 8c0ea25f by Matthew Pickering at 2023-01-07T12:15:15-05:00 Pass -Wl,-no_fixup_chains to ld64 when appropiate Recent versions of MacOS use a version of ld where `-fixup_chains` is on by default. This is incompatible with our usage of `-undefined dynamic_lookup`. Therefore we explicitly disable `fixup-chains` by passing `-no_fixup_chains` to the linker on darwin. This results in a warning of the form: ld: warning: -undefined dynamic_lookup may not work with chained fixups The manual explains the incompatible nature of these two flags: -undefined treatment Specifies how undefined symbols are to be treated. Options are: error, warning, suppress, or dynamic_lookup. The default is error. Note: dynamic_lookup that depends on lazy binding will not work with chained fixups. A relevant ticket is #22429 Here are also a few other links which are relevant to the issue: Official comment: https://developer.apple.com/forums/thread/719961 More relevant links: https://openradar.appspot.com/radar?id=5536824084660224 https://github.com/python/cpython/issues/97524 Note in release notes: https://developer.apple.com/documentation/xcode-release-notes/xcode-13-releas e-notes - - - - - 365b3045 by Matthew Pickering at 2023-01-09T02:36:20-05:00 Disable split sections on aarch64-deb10 build See #22722 Failure on this job: https://gitlab.haskell.org/ghc/ghc/-/jobs/1287852 ``` Unexpected failures: /builds/ghc/ghc/tmp/ghctest-s3d8g1hj/test spaces/testsuite/tests/th/T10828.run T10828 [exit code non-0] (ext-interp) /builds/ghc/ghc/tmp/ghctest-s3d8g1hj/test spaces/testsuite/tests/th/T13123.run T13123 [exit code non-0] (ext-interp) /builds/ghc/ghc/tmp/ghctest-s3d8g1hj/test spaces/testsuite/tests/th/T20590.run T20590 [exit code non-0] (ext-interp) Appending 232 stats to file: /builds/ghc/ghc/performance-metrics.tsv ``` ``` Compile failed (exit code 1) errors were: data family D_0 a_1 :: * -> * data instance D_0 GHC.Types.Int GHC.Types.Bool :: * where DInt_2 :: D_0 GHC.Types.Int GHC.Types.Bool data E_3 where MkE_4 :: a_5 -> E_3 data Foo_6 a_7 b_8 where MkFoo_9, MkFoo'_10 :: a_11 -> Foo_6 a_11 b_12 newtype Bar_13 :: * -> GHC.Types.Bool -> * where MkBar_14 :: a_15 -> Bar_13 a_15 b_16 data T10828.T (a_0 :: *) where T10828.MkT :: forall (a_1 :: *) . a_1 -> a_1 -> T10828.T a_1 T10828.MkC :: forall (a_2 :: *) (b_3 :: *) . (GHC.Types.~) a_2 GHC.Types.Int => {T10828.foo :: a_2, T10828.bar :: b_3} -> T10828.T GHC.Types.Int T10828.hs:1:1: error: [GHC-87897] Exception when trying to run compile-time code: ghc-iserv terminated (-4) Code: (do TyConI dec <- runQ $ reify (mkName "T") runIO $ putStrLn (pprint dec) >> hFlush stdout d <- runQ $ [d| data T' a :: Type where MkT' :: a -> a -> T' a MkC' :: forall a b. (a ~ Int) => {foo :: a, bar :: b} -> T' Int |] runIO $ putStrLn (pprint d) >> hFlush stdout ....) *** unexpected failure for T10828(ext-interp) =====> 7000 of 9215 [0, 1, 0] =====> 7000 of 9215 [0, 1, 0] =====> 7000 of 9215 [0, 1, 0] =====> 7000 of 9215 [0, 1, 0] Compile failed (exit code 1) errors were: T13123.hs:1:1: error: [GHC-87897] Exception when trying to run compile-time code: ghc-iserv terminated (-4) Code: ([d| data GADT where MkGADT :: forall k proxy (a :: k). proxy a -> GADT |]) *** unexpected failure for T13123(ext-interp) =====> 7100 of 9215 [0, 2, 0] =====> 7100 of 9215 [0, 2, 0] =====> 7200 of 9215 [0, 2, 0] Compile failed (exit code 1) errors were: T20590.hs:1:1: error: [GHC-87897] Exception when trying to run compile-time code: ghc-iserv terminated (-4) Code: ([d| data T where MkT :: forall a. a -> T |]) *** unexpected failure for T20590(ext-interp) ``` Looks fairly worrying to me. - - - - - 965a2735 by Alan Zimmerman at 2023-01-09T02:36:20-05:00 EPA: exact print HsDocTy To match ghc-exactprint https://github.com/alanz/ghc-exactprint/pull/121 - - - - - 5d65773e by John Ericson at 2023-01-09T20:39:27-05:00 Remove RTS hack for configuring See the brand new Note [Undefined symbols in the RTS] for additional details. - - - - - e3fff751 by Sebastian Graf at 2023-01-09T20:40:02-05:00 Handle shadowing in DmdAnal (#22718) Previously, when we had a shadowing situation like ```hs f x = ... -- demand signature <1L><1L> main = ... \f -> f 1 ... ``` we'd happily use the shadowed demand signature at the call site inside the lambda. Of course, that's wrong and solution is simply to remove the demand signature from the `AnalEnv` when we enter the lambda. This patch does so for all binding constructs Core. In #22718 the issue was caused by LetUp not shadowing away the existing demand signature for the let binder in the let body. The resulting absent error is fickle to reproduce; hence no reproduction test case. #17478 would help. Fixes #22718. It appears that TcPlugin_Rewrite regresses by ~40% on Darwin. It is likely that DmdAnal was exploiting ill-scoped analysis results. Metric increase ['bytes allocated'] (test_env=x86_64-darwin-validate): TcPlugin_Rewrite - - - - - d53f6f4d by Oleg Grenrus at 2023-01-09T21:11:02-05:00 Add safe list indexing operator: !? With Joachim's amendments. Implements https://github.com/haskell/core-libraries-committee/issues/110 - - - - - cfaf1ad7 by Nicolas Trangez at 2023-01-09T21:11:03-05:00 rts, tests: limit thread name length to 15 bytes On Linux, `pthread_setname_np` (or rather, the kernel) only allows for thread names up to 16 bytes, including the terminating null byte. This commit adds a note pointing this out in `createOSThread`, and fixes up two instances where a thread name of more than 15 characters long was used (in the RTS, and in a test-case). Fixes: #22366 Fixes: https://gitlab.haskell.org/ghc/ghc/-/issues/22366 See: https://gitlab.haskell.org/ghc/ghc/-/issues/22366#note_460796 - - - - - 64286132 by Matthew Pickering at 2023-01-09T21:11:03-05:00 Store bootstrap_llvm_target and use it to set LlvmTarget in bindists This mirrors some existing logic for the bootstrap_target which influences how TargetPlatform is set. As described on #21970 not storing this led to `LlvmTarget` being set incorrectly and hence the wrong `--target` flag being passed to the C compiler. Towards #21970 - - - - - 4724e8d1 by Matthew Pickering at 2023-01-09T21:11:04-05:00 Check for FP_LD_NO_FIXUP_CHAINS in installation configure script Otherwise, when installing from a bindist the C flag isn't passed to the C compiler. This completes the fix for #22429 - - - - - 2e926b88 by Georgi Lyubenov at 2023-01-09T21:11:07-05:00 Fix outdated link to Happy section on sequences - - - - - 146a1458 by Matthew Pickering at 2023-01-09T21:11:07-05:00 Revert "NCG(x86): Compile add+shift as lea if possible." This reverts commit 20457d775885d6c3df020d204da9a7acfb3c2e5a. See #22666 and #21777 - - - - - 6e6adbe3 by Jade Lovelace at 2023-01-11T00:55:30-05:00 Fix tcPluginRewrite example - - - - - faa57138 by Jade Lovelace at 2023-01-11T00:55:31-05:00 fix missing haddock pipe - - - - - 0470ea7c by Florian Weimer at 2023-01-11T00:56:10-05:00 m4/fp_leading_underscore.m4: Avoid implicit exit function declaration And switch to a new-style function definition. Fixes build issues with compilers that do not accept implicit function declarations. - - - - - b2857df4 by HaskellMouse at 2023-01-11T00:56:52-05:00 Added a new warning about compatibility with RequiredTypeArguments This commit introduces a new warning that indicates code incompatible with future extension: RequiredTypeArguments. Enabling this extension may break some code and the warning will help to make it compatible in advance. - - - - - 5f17e21a by Ben Gamari at 2023-01-11T00:57:27-05:00 testsuite: Drop testheapalloced.c As noted in #22414, this file (which appears to be a benchmark for characterising the one-step allocator's MBlock cache) is currently unreferenced. Remove it. Closes #22414. - - - - - bc125775 by Vladislav Zavialov at 2023-01-11T00:58:03-05:00 Introduce the TypeAbstractions language flag GHC Proposals #448 "Modern scoped type variables" and #425 "Invisible binders in type declarations" introduce a new language extension flag: TypeAbstractions. Part of the functionality guarded by this flag has already been implemented, namely type abstractions in constructor patterns, but it was guarded by a combination of TypeApplications and ScopedTypeVariables instead of a dedicated language extension flag. This patch does the following: * introduces a new language extension flag TypeAbstractions * requires TypeAbstractions for @a-syntax in constructor patterns instead of TypeApplications and ScopedTypeVariables * creates a User's Guide page for TypeAbstractions and moves the "Type Applications in Patterns" section there To avoid a breaking change, the new flag is implied by ScopedTypeVariables and is retroactively added to GHC2021. Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 083f7015 by Krzysztof Gogolewski at 2023-01-11T00:58:38-05:00 Misc cleanup - Remove unused mkWildEvBinder - Use typeTypeOrConstraint - more symmetric and asserts that that the type is Type or Constraint - Fix escape sequences in Python; they raise a deprecation warning with -Wdefault - - - - - aed1974e by Richard Eisenberg at 2023-01-11T08:30:42+00:00 Refactor the treatment of loopy superclass dicts This patch completely re-engineers how we deal with loopy superclass dictionaries in instance declarations. It fixes #20666 and #19690 The highlights are * Recognise that the loopy-superclass business should use precisely the Paterson conditions. This is much much nicer. See Note [Recursive superclasses] in GHC.Tc.TyCl.Instance * With that in mind, define "Paterson-smaller" in Note [Paterson conditions] in GHC.Tc.Validity, and the new data type `PatersonSize` in GHC.Tc.Utils.TcType, along with functions to compute and compare PatsonSizes * Use the new PatersonSize stuff when solving superclass constraints See Note [Solving superclass constraints] in GHC.Tc.TyCl.Instance * In GHC.Tc.Solver.Monad.lookupInInerts, add a missing call to prohibitedSuperClassSolve. This was the original cause of #20666. * Treat (TypeError "stuff") as having PatersonSize zero. See Note [Paterson size for type family applications] in GHC.Tc.Utils.TcType. * Treat the head of a Wanted quantified constraint in the same way as the superclass of an instance decl; this is what fixes #19690. See GHC.Tc.Solver.Canonical Note [Solving a Wanted forall-constraint] (Thanks to Matthew Craven for this insight.) This entailed refactoring the GivenSc constructor of CtOrigin a bit, to say whether it comes from an instance decl or quantified constraint. * Some refactoring way in which redundant constraints are reported; we don't want to complain about the extra, apparently-redundant constraints that we must add to an instance decl because of the loopy-superclass thing. I moved some work from GHC.Tc.Errors to GHC.Tc.Solver. * Add a new section to the user manual to describe the loopy superclass issue and what rules it follows. - - - - - 300bcc15 by HaskellMouse at 2023-01-11T13:43:36-05:00 Parse qualified terms in type signatures This commit allows qualified terms in type signatures to pass the parser and to be cathced by renamer with more informative error message. Adds a few tests. Fixes #21605 - - - - - 964284fc by Simon Peyton Jones at 2023-01-11T13:44:12-05:00 Fix void-arg-adding mechanism for worker/wrapper As #22725 shows, in worker/wrapper we must add the void argument /last/, not first. See GHC.Core.Opt.WorkWrap.Utils Note [Worker/wrapper needs to add void arg last]. That led me to to study GHC.Core.Opt.SpecConstr Note [SpecConstr needs to add void args first] which suggests the opposite! And indeed I think it's the other way round for SpecConstr -- or more precisely the void arg must precede the "extra_bndrs". That led me to some refactoring of GHC.Core.Opt.SpecConstr.calcSpecInfo. - - - - - f7ceafc9 by Krzysztof Gogolewski at 2023-01-11T22:36:59-05:00 Add 'docWithStyle' to improve codegen This new combinator docWithStyle :: IsOutput doc => doc -> (PprStyle -> SDoc) -> doc let us remove the need for code to be polymorphic in HDoc when not used in code style. Metric Decrease: ManyConstructors T13035 T1969 - - - - - b3be0d18 by Simon Peyton Jones at 2023-01-11T22:37:35-05:00 Fix finaliseArgBoxities for OPAQUE function We never do worker wrapper for OPAQUE functions, so we must zap the unboxing info during strictness analysis. This patch fixes #22502 - - - - - db11f358 by Ben Gamari at 2023-01-12T07:49:04-05:00 Revert "rts: Drop racy assertion" The logic here was inverted. Reverting the commit to avoid confusion when examining the commit history. This reverts commit b3eacd64fb36724ed6c5d2d24a81211a161abef1. - - - - - 3242139f by Ben Gamari at 2023-01-12T07:49:04-05:00 rts: Drop racy assertion 0e274c39bf836d5bb846f5fa08649c75f85326ac added an assertion in `dirty_MUT_VAR` checking that the MUT_VAR being dirtied was clean. However, this isn't necessarily the case since another thread may have raced us to dirty the object. - - - - - 9ffd5d57 by Ben Gamari at 2023-01-12T07:49:41-05:00 configure: Fix escaping of `$tooldir` In !9547 I introduced `$tooldir` directories into GHC's default link and compilation flags to ensure that our C toolchain finds its own headers and libraries before others on the system. However, the patch was subtly wrong in the escaping of `$tooldir`. Fix this. Fixes #22561. - - - - - 905d0b6e by Sebastian Graf at 2023-01-12T15:51:47-05:00 Fix contification with stable unfoldings (#22428) Many functions now return a `TailUsageDetails` that adorns a `UsageDetails` with a `JoinArity` that reflects the number of join point binders around the body for which the `UsageDetails` was computed. `TailUsageDetails` is now returned by `occAnalLamTail` as well as `occAnalUnfolding` and `occAnalRules`. I adjusted `Note [Join points and unfoldings/rules]` and `Note [Adjusting right-hand sides]` to account for the new machinery. I also wrote a new `Note [Join arity prediction based on joinRhsArity]` and refer to it when we combine `TailUsageDetails` for a recursive RHS. I also renamed * `occAnalLam` to `occAnalLamTail` * `adjustRhsUsage` to `adjustTailUsage` * a few other less important functions and properly documented the that each call of `occAnalLamTail` must pair up with `adjustTailUsage`. I removed `Note [Unfoldings and join points]` because it was redundant with `Note [Occurrences in stable unfoldings]`. While in town, I refactored `mkLoopBreakerNodes` so that it returns a condensed `NodeDetails` called `SimpleNodeDetails`. Fixes #22428. The refactoring seems to have quite beneficial effect on ghc/alloc performance: ``` CoOpt_Read(normal) ghc/alloc 784,778,420 768,091,176 -2.1% GOOD T12150(optasm) ghc/alloc 77,762,270 75,986,720 -2.3% GOOD T12425(optasm) ghc/alloc 85,740,186 84,641,712 -1.3% GOOD T13056(optasm) ghc/alloc 306,104,656 299,811,632 -2.1% GOOD T13253(normal) ghc/alloc 350,233,952 346,004,008 -1.2% T14683(normal) ghc/alloc 2,800,514,792 2,754,651,360 -1.6% T15304(normal) ghc/alloc 1,230,883,318 1,215,978,336 -1.2% T15630(normal) ghc/alloc 153,379,590 151,796,488 -1.0% T16577(normal) ghc/alloc 7,356,797,056 7,244,194,416 -1.5% T17516(normal) ghc/alloc 1,718,941,448 1,692,157,288 -1.6% T19695(normal) ghc/alloc 1,485,794,632 1,458,022,112 -1.9% T21839c(normal) ghc/alloc 437,562,314 431,295,896 -1.4% GOOD T21839r(normal) ghc/alloc 446,927,580 440,615,776 -1.4% GOOD geo. mean -0.6% minimum -2.4% maximum -0.0% ``` Metric Decrease: CoOpt_Read T10421 T12150 T12425 T13056 T18698a T18698b T21839c T21839r T9961 - - - - - a1491c87 by Andreas Klebinger at 2023-01-12T15:52:23-05:00 Only gc sparks locally when we can ensure marking is done. When performing GC without work stealing there was no guarantee that spark pruning was happening after marking of the sparks. This could cause us to GC live sparks under certain circumstances. Fixes #22528. - - - - - 8acfe930 by Cheng Shao at 2023-01-12T15:53:00-05:00 Change MSYSTEM to CLANG64 uniformly - - - - - 73bc162b by M Farkas-Dyck at 2023-01-12T15:53:42-05:00 Make `GHC.Tc.Errors.Reporter` take `NonEmpty ErrorItem` rather than `[ErrorItem]`, which lets us drop some panics. Also use the `BasicMismatch` constructor rather than `mkBasicMismatchMsg`, which lets us drop the "-Wno-incomplete-record-updates" flag. - - - - - 1b812b69 by Oleg Grenrus at 2023-01-12T15:54:21-05:00 Fix #22728: Not all diagnostics in safe check are fatal Also add tests for the issue and -Winferred-safe-imports in general - - - - - c79b2b65 by Matthew Pickering at 2023-01-12T15:54:58-05:00 Don't run hadrian-multi on fast-ci label Fixes #22667 - - - - - 9a3d6add by Andrew Lelechenko at 2023-01-13T00:46:36-05:00 Bump submodule bytestring to 0.11.4.0 Metric Decrease: T21839c T21839r - - - - - df33c13c by Ben Gamari at 2023-01-13T00:47:12-05:00 gitlab-ci: Bump Darwin bootstrap toolchain This updates the bootstrap compiler on Darwin from 8.10.7 to 9.2.5, ensuring that we have the fix for #21964. - - - - - 756a66ec by Ben Gamari at 2023-01-13T00:47:12-05:00 gitlab-ci: Pass -w to cabal update Due to cabal#8447, cabal-install 3.8.1.0 requires a compiler to run `cabal update`. - - - - - 1142f858 by Cheng Shao at 2023-01-13T11:04:00+00:00 Bump hsc2hs submodule - - - - - d4686729 by Cheng Shao at 2023-01-13T11:04:00+00:00 Bump process submodule - - - - - 84ae6573 by Cheng Shao at 2023-01-13T11:06:58+00:00 ci: Bump DOCKER_REV - - - - - d53598c5 by Cheng Shao at 2023-01-13T11:06:58+00:00 ci: enable xz parallel compression for x64 jobs - - - - - d31fcbca by Cheng Shao at 2023-01-13T11:06:58+00:00 ci: use in-image emsdk for js jobs - - - - - 93b9bbc1 by Cheng Shao at 2023-01-13T11:47:17+00:00 ci: improve nix-shell for gen_ci.hs and fix some ghc/hlint warnings - Add a ghc environment including prebuilt dependencies to the nix-shell. Get rid of the ad hoc cabal cache and all dependencies are now downloaded from the nixos binary cache. - Make gen_ci.hs a cabal package with HLS integration, to make future hacking of gen_ci.hs easier. - Fix some ghc/hlint warnings after I got HLS to work. - For the lint-ci-config job, do a shallow clone to save a few minutes of unnecessary git checkout time. - - - - - 8acc56c7 by Cheng Shao at 2023-01-13T11:47:17+00:00 ci: source the toolchain env file in wasm jobs - - - - - 87194df0 by Cheng Shao at 2023-01-13T11:47:17+00:00 ci: add wasm ci jobs via gen_ci.hs - There is one regular wasm job run in validate pipelines - Additionally, int-native/unreg wasm jobs run in nightly/release pipelines Also, remove the legacy handwritten wasm ci jobs in .gitlab-ci.yml. - - - - - b6eb9bcc by Matthew Pickering at 2023-01-13T11:52:16+00:00 wasm ci: Remove wasm release jobs This removes the wasm release jobs, as we do not yet intend to distribute these binaries. - - - - - 496607fd by Simon Peyton Jones at 2023-01-13T16:52:07-05:00 Add a missing checkEscapingKind Ticket #22743 pointed out that there is a missing check, for type-inferred bindings, that the inferred type doesn't have an escaping kind. The fix is easy. - - - - - 7a9a1042 by Andreas Klebinger at 2023-01-16T20:48:19-05:00 Separate core inlining logic from `Unfolding` type. This seems like a good idea either way, but is mostly motivated by a patch where this avoids a module loop. - - - - - 33b58f77 by sheaf at 2023-01-16T20:48:57-05:00 Hadrian: generalise &%> to avoid warnings This patch introduces a more general version of &%> that works with general traversable shapes, instead of lists. This allows us to pass along the information that the length of the list of filepaths passed to the function exactly matches the length of the input list of filepath patterns, avoiding pattern match warnings. Fixes #22430 - - - - - 8c7a991c by Andreas Klebinger at 2023-01-16T20:49:34-05:00 Add regression test for #22611. A case were a function used to fail to specialize, but now does. - - - - - 6abea760 by Andreas Klebinger at 2023-01-16T20:50:10-05:00 Mark maximumBy/minimumBy as INLINE. The RHS was too large to inline which often prevented the overhead of the Maybe from being optimized away. By marking it as INLINE we can eliminate the overhead of both the maybe and are able to unpack the accumulator when possible. Fixes #22609 - - - - - 99d151bb by Matthew Pickering at 2023-01-16T20:50:50-05:00 ci: Bump CACHE_REV so that ghc-9.6 branch and HEAD have different caches Having the same CACHE_REV on both branches leads to issues where the darwin toolchain is different on ghc-9.6 and HEAD which leads to long darwin build times. In general we should ensure that each branch has a different CACHE_REV. - - - - - 6a5845fb by Matthew Pickering at 2023-01-16T20:51:25-05:00 ci: Change owner of files in source-tarball job This fixes errors of the form: ``` fatal: detected dubious ownership in repository at '/builds/ghc/ghc' To add an exception for this directory, call: git config --global --add safe.directory /builds/ghc/ghc inferred 9.7.20230113 checking for GHC Git commit id... fatal: detected dubious ownership in repository at '/builds/ghc/ghc' To add an exception for this directory, call: git config --global --add safe.directory /builds/ghc/ghc ``` - - - - - 4afb952c by Matthew Pickering at 2023-01-16T20:51:25-05:00 ci: Don't build aarch64-deb10-llvm job on release pipelines Closes #22721 - - - - - 8039feb9 by Matthew Pickering at 2023-01-16T20:51:25-05:00 ci: Change owner of files in test-bootstrap job - - - - - 0b358d0c by Matthew Pickering at 2023-01-16T20:51:25-05:00 rel_eng: Add release engineering scripts into ghc tree It is better to keep these scripts in the tree as they depend on the CI configuration and so on. By keeping them in tree we can keep them up-to-date as the CI config changes and also makes it easier to backport changes to the release script between release branches in future. The final motivation is that it makes generating GHCUp metadata possible. - - - - - 28cb2ed0 by Matthew Pickering at 2023-01-16T20:51:25-05:00 ci: Don't use complicated image or clone in not-interruptible job This job exists only for the meta-reason of not allowing nightly pipelines to be cancelled. It was taking two minutes to run as in order to run "true" we would also clone the whole GHC repo. - - - - - eeea59bb by Matthew Pickering at 2023-01-16T20:51:26-05:00 Add scripts to generate ghcup metadata on nightly and release pipelines 1. A python script in .gitlab/rel_eng/mk-ghcup-metadata which generates suitable metadata for consumption by GHCUp for the relevant pipelines. - The script generates the metadata just as the ghcup maintainers want, without taking into account platform/library combinations. It is updated manually when the mapping changes. - The script downloads the bindists which ghcup wants to distribute, calculates the hash and generates the yaml in the correct structure. - The script is documented in the .gitlab/rel_eng/mk-ghcup-metadata/README.mk file 1a. The script requires us to understand the mapping from platform -> job. To choose the preferred bindist for each platform the .gitlab/gen_ci.hs script is modified to allow outputting a metadata file which answers the question about which job produces the bindist which we want to distribute to users for a specific platform. 2. Pipelines to run on nightly and release jobs to generate metadata - ghcup-metadata-nightly: Generates metadata which points directly to artifacts in the nightly job. - ghcup-metadata-release: Generates metadata suitable for inclusion directly in ghcup by pointing to the downloads folder where the bindist will be uploaded to. 2a. Trigger jobs which test the generated metadata in the downstream `ghccup-ci` repo. See that repo for documentation about what is tested and how but essentially we test in a variety of clean images that ghcup can download and install the bindists we say exist in our metadata. - - - - - 97bd4d8c by Andrew Lelechenko at 2023-01-16T20:52:04-05:00 Bump submodule parsec to 3.1.16.1 - - - - - 97ac8230 by Alan Zimmerman at 2023-01-16T20:52:39-05:00 EPA: Add annotation for 'type' in DataDecl Closes #22765 - - - - - dbbab95d by Ben Gamari at 2023-01-17T06:36:06-05:00 compiler: Small optimisation of assertM In #22739 @AndreasK noticed that assertM performed the action to compute the asserted predicate regardless of whether DEBUG is enabled. This is inconsistent with the other assertion operations and general convention. Fix this. Closes #22739. - - - - - fc02f3bb by Viktor Dukhovni at 2023-01-17T06:36:47-05:00 Avoid unnecessary printf warnings in EventLog.c Fixes #22778 - - - - - 003b6d44 by Simon Peyton Jones at 2023-01-17T16:33:05-05:00 Document the semantics of pattern bindings a bit better This MR is in response to the discussion on #22719 - - - - - f4d50baf by Vladislav Zavialov at 2023-01-17T16:33:41-05:00 Hadrian: fix warnings (#22783) This change fixes the following warnings when building Hadrian: src/Hadrian/Expression.hs:38:10: warning: [-Wredundant-constraints] src/Hadrian/Expression.hs:84:13: warning: [-Wtype-equality-requires-operators] src/Hadrian/Expression.hs:84:21: warning: [-Wtype-equality-requires-operators] src/Hadrian/Haskell/Cabal/Parse.hs:67:1: warning: [-Wunused-imports] - - - - - 06036d93 by Sylvain Henry at 2023-01-18T01:55:10-05:00 testsuite: req_smp --> req_target_smp, req_ghc_smp See #22630 and !9552 This commit: - splits req_smp into req_target_smp and req_ghc_smp - changes the testsuite driver to calculate req_ghc_smp - changes a handful of tests to use req_target_smp instead of req_smp - changes a handful of tests to use req_host_smp when needed The problem: - the problem this solves is the ambiguity surrounding req_smp - on master req_smp was used to express the constraint that the program being compiled supports smp _and_ that the host RTS (i.e., the RTS used to compile the program) supported smp. Normally that is fine, but in cross compilation this is not always the case as was discovered in #22630. The solution: - Differentiate the two constraints: - use req_target_smp to say the RTS the compiled program is linked with (and the platform) supports smp - use req_host_smp to say the RTS the host is linked with supports smp WIP: fix req_smp (target vs ghc) add flag to separate bootstrapper split req_smp -> req_target_smp and req_ghc_smp update tests smp flags cleanup and add some docstrings only set ghc_with_smp to bootstrapper on S1 or CC Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1 and cross compiling test the RTS in config/ghc not hadrian re-add ghc_with_smp fix and align req names fix T11760 to use req_host_smp test the rts directly, avoid python 3.5 limitation test the compiler in a try block align out of tree and in tree withSMP flags mark failing tests as host req smp testsuite: req_host_smp --> req_ghc_smp Fix ghc vs host, fix ghc_with_smp leftover - - - - - ee9b78aa by Krzysztof Gogolewski at 2023-01-18T01:55:45-05:00 Use -Wdefault when running Python testdriver (#22727) - - - - - e9c0537c by Vladislav Zavialov at 2023-01-18T01:56:22-05:00 Enable -Wstar-is-type by default (#22759) Following the plan in GHC Proposal #143 "Remove the * kind syntax", which states: In the next release (or 3 years in), enable -fwarn-star-is-type by default. The "next release" happens to be 9.6.1 I also moved the T21583 test case from should_fail to should_compile, because the only reason it was failing was -Werror=compat in our test suite configuration. - - - - - 4efee43d by Ryan Scott at 2023-01-18T01:56:59-05:00 Add missing parenthesizeHsType in cvtSigTypeKind We need to ensure that the output of `cvtSigTypeKind` is parenthesized (at precedence `sigPrec`) so that any type signatures with an outermost, explicit kind signature can parse correctly. Fixes #22784. - - - - - f891a442 by Ben Gamari at 2023-01-18T07:28:00-05:00 Bump ghc-tarballs to fix #22497 It turns out that gmp 6.2.1 uses the platform-reserved `x18` register on AArch64/Darwin. This was fixed in upstream changeset 18164:5f32dbc41afc, which was merged in 2020. Here I backport this patch although I do hope that a new release is forthcoming soon. Bumps gmp-tarballs submodule. Fixes #22497. - - - - - b13c6ea5 by Ben Gamari at 2023-01-18T07:28:00-05:00 Bump gmp-tarballs submodule This backports the upstream fix for CVE-2021-43618, fixing #22789. - - - - - c45a5fff by Cheng Shao at 2023-01-18T07:28:37-05:00 Fix typo in recent darwin tests fix Corrects a typo in !9647. Otherwise T18623 will still fail on darwin and stall other people's work. - - - - - b4c14c4b by Luite Stegeman at 2023-01-18T14:21:42-05:00 Add PrimCallConv support to GHCi This adds support for calling Cmm code from bytecode using the native calling convention, allowing modules that use `foreign import prim` to be loaded and debugged in GHCi. This patch introduces a new `PRIMCALL` bytecode instruction and a helper stack frame `stg_primcall`. The code is based on the existing functionality for dealing with unboxed tuples in bytecode, which has been generalised to handle arbitrary calls. Fixes #22051 - - - - - d0a63ef8 by Adam Gundry at 2023-01-18T14:22:26-05:00 Refactor warning flag parsing to add missing flags This adds `-Werror=<group>` and `-fwarn-<group>` flags for warning groups as well as individual warnings. Previously these were defined on an ad hoc basis so for example we had `-Werror=compat` but not `-Werror=unused-binds`, whereas we had `-fwarn-unused-binds` but not `-fwarn-compat`. Fixes #22182. - - - - - 7ed1b8ef by Adam Gundry at 2023-01-18T14:22:26-05:00 Minor corrections to comments - - - - - 5389681e by Adam Gundry at 2023-01-18T14:22:26-05:00 Revise warnings documentation in user's guide - - - - - ab0d5cda by Adam Gundry at 2023-01-18T14:22:26-05:00 Move documentation of deferred type error flags out of warnings section - - - - - eb5a6b91 by John Ericson at 2023-01-18T22:24:10-05:00 Give the RTS it's own configure script Currently it doesn't do much anything, we are just trying to introduce it without breaking the build. Later, we will move functionality from the top-level configure script over to it. We need to bump Cabal for https://github.com/haskell/cabal/pull/8649; to facilitate and existing hack of skipping some configure checks for the RTS we now need to skip just *part* not *all* of the "post configure" hook, as running the configure script (which we definitely want to do) is also implemented as part of the "post configure" hook. But doing this requires exposing functionality that wasn't exposed before. - - - - - 32ab07bf by Andrew Lelechenko at 2023-01-18T22:24:51-05:00 ghc package does not have to depend on terminfo - - - - - 981ff7c4 by Andrew Lelechenko at 2023-01-18T22:24:51-05:00 ghc-pkg does not have to depend on terminfo - - - - - f058e367 by Ben Gamari at 2023-01-18T22:25:27-05:00 nativeGen/X86: MFENCE is unnecessary for release semantics In #22764 a user noticed that a program implementing a simple atomic counter via an STRef regressed significantly due to the introduction of necessary atomic operations in the MutVar# primops (#22468). This regression was caused by a bug in the NCG, which emitted an unnecessary MFENCE instruction for a release-ordered atomic write. MFENCE is rather only needed to achieve sequentially consistent ordering. Fixes #22764. - - - - - 154889db by Ryan Scott at 2023-01-18T22:26:03-05:00 Add regression test for #22151 Issue #22151 was coincidentally fixed in commit aed1974e92366ab8e117734f308505684f70cddf (`Refactor the treatment of loopy superclass dicts`). This adds a regression test to ensure that the issue remains fixed. Fixes #22151. - - - - - 14b5982a by Andrei Borzenkov at 2023-01-18T22:26:43-05:00 Fix printing of promoted MkSolo datacon (#22785) Problem: In 2463df2f, the Solo data constructor was renamed to MkSolo, and Solo was turned into a pattern synonym for backwards compatibility. Since pattern synonyms can not be promoted, the old code that pretty-printed promoted single-element tuples started producing ill-typed code: t :: Proxy ('Solo Int) This fails with "Pattern synonym ‘Solo’ used as a type" The solution is to track the distinction between type constructors and data constructors more carefully when printing single-element tuples. - - - - - 1fe806d3 by Cheng Shao at 2023-01-23T04:48:47-05:00 hadrian: add hi_core flavour transformer The hi_core flavour transformer enables -fwrite-if-simplified-core for stage1 libraries, which emit core into interface files to make it possible to restart code generation. Building boot libs with it makes it easier to use GHC API to prototype experimental backends that needs core/stg at link time. - - - - - 317cad26 by Cheng Shao at 2023-01-23T04:48:47-05:00 hadrian: add missing docs for recently added flavour transformers - - - - - 658f4446 by Ben Gamari at 2023-01-23T04:49:23-05:00 gitlab-ci: Add Rocky8 jobs Addresses #22268. - - - - - a83ec778 by Vladislav Zavialov at 2023-01-23T04:49:58-05:00 Set "since: 9.8" for TypeAbstractions and -Wterm-variable-capture These flags did not make it into the 9.6 release series, so the "since" annotations must be corrected. - - - - - fec7c2ea by Alan Zimmerman at 2023-01-23T04:50:33-05:00 EPA: Add SourceText to HsOverLabel To be able to capture string literals with possible escape codes as labels. Close #22771 - - - - - 3efd1e99 by Ben Gamari at 2023-01-23T04:51:08-05:00 template-haskell: Bump version to 2.20.0.0 Updates `text` and `exceptions` submodules for bounds bumps. Addresses #22767. - - - - - 0900b584 by Cheng Shao at 2023-01-23T04:51:45-05:00 hadrian: disable alloca for in-tree GMP on wasm32 When building in-tree GMP for wasm32, disable its alloca usage, since it may potentially cause stack overflow (e.g. #22602). - - - - - db0f1bfd by Cheng Shao at 2023-01-23T04:52:21-05:00 Bump process submodule Includes a critical fix for wasm32, see https://github.com/haskell/process/pull/272 for details. Also changes the existing cross test to include process stuff and avoid future regression here. - - - - - 9222b167 by Matthew Pickering at 2023-01-23T04:52:57-05:00 ghcup metadata: Fix subdir for windows bindist - - - - - 9a9bec57 by Matthew Pickering at 2023-01-23T04:52:57-05:00 ghcup metadata: Remove viPostRemove field from generated metadata This has been removed from the downstream metadata. - - - - - 82884ce0 by Simon Peyton Jones at 2023-01-23T04:53:32-05:00 Fix #22742 runtimeRepLevity_maybe was panicing unnecessarily; and the error printing code made use of the case when it should return Nothing rather than panicing. For some bizarre reason perf/compiler/T21839r shows a 10% bump in runtime peak-megagbytes-used, on a single architecture (alpine). See !9753 for commentary, but I'm going to accept it. Metric Increase: T21839r - - - - - 2c6deb18 by Bryan Richter at 2023-01-23T14:12:22+02:00 codeowners: Add Ben, Matt, and Bryan to CI - - - - - eee3bf05 by Matthew Craven at 2023-01-23T21:46:41-05:00 Do not collect compile-time metrics for T21839r ...the testsuite doesn't handle this properly since it also collects run-time metrics. Compile-time metrics for this test are already tracked via T21839c. Metric Decrease: T21839r - - - - - 1d1dd3fb by Matthew Pickering at 2023-01-24T05:37:52-05:00 Fix recompilation checking for multiple home units The key part of this change is to store a UnitId in the `UsageHomeModule` and `UsageHomeModuleInterface`. * Fine-grained dependency tracking is used if the dependency comes from any home unit. * We actually look up the right module when checking whether we need to recompile in the `UsageHomeModuleInterface` case. These scenarios are both checked by the new tests ( multipleHomeUnits_recomp and multipleHomeUnits_recomp_th ) Fixes #22675 - - - - - 7bfb30f9 by Matthew Pickering at 2023-01-24T05:37:52-05:00 Augment target filepath by working directory when checking if module satisfies target This fixes a spurious warning in -Wmissing-home-modules. This is a simple oversight where when looking for the target in the first place we augment the search by the -working-directory flag but then fail to do so when checking this warning. Fixes #22676 - - - - - 69500dd4 by Matthew Pickering at 2023-01-24T05:37:52-05:00 Use NodeKey rather than ModuleName in pruneCache The `pruneCache` function assumes that the list of `CachedInfo` all have unique `ModuleName`, this is not true: * In normal compilation, the same module name can appear for a file and it's boot file. * In multiple home unit compilation the same ModuleName can appear in different units The fix is to use a `NodeKey` as the actual key for the interfaces which includes `ModuleName`, `IsBoot` and `UnitId`. Fixes #22677 - - - - - 336b2b1c by Matthew Pickering at 2023-01-24T05:37:52-05:00 Recompilation checking: Don't try to find artefacts for Interactive & hs-boot combo In interactive mode we don't produce any linkables for hs-boot files. So we also need to not going looking for them when we check to see if we have all the right objects needed for recompilation. Ticket #22669 - - - - - 6469fea7 by Matthew Pickering at 2023-01-24T05:37:52-05:00 Don't write o-boot files in Interactive mode We should not be producing object files when in interactive mode but we still produced the dummy o-boot files. These never made it into a `Linkable` but then confused the recompilation checker. Fixes #22669 - - - - - 06cc0a95 by Matthew Pickering at 2023-01-24T05:37:52-05:00 Improve driver diagnostic messages by including UnitId in message Currently the driver diagnostics don't give any indication about which unit they correspond to. For example `-Wmissing-home-modules` can fire multiple times for each different home unit and gives no indication about which unit it's actually reporting about. Perhaps a longer term fix is to generalise the providence information away from a SrcSpan so that these kind of whole project errors can be reported with an accurate provenance. For now we can just include the `UnitId` in the error message. Fixes #22678 - - - - - 4fe9eaff by Matthew Pickering at 2023-01-24T05:37:52-05:00 Key ModSummary cache by UnitId as well as FilePath Multiple units can refer to the same files without any problem. Just another assumption which needs to be updated when we may have multiple home units. However, there is the invariant that within each unit each file only maps to one module, so as long as we also key the cache by UnitId then we are all good. This led to some confusing behaviour in GHCi when reloading, multipleHomeUnits_shared distils the essence of what can go wrong. Fixes #22679 - - - - - ada29f5c by Matthew Pickering at 2023-01-24T05:37:52-05:00 Finder: Look in current unit before looking in any home package dependencies In order to preserve existing behaviour it's important to look within the current component before consideirng a module might come from an external component. This already happened by accident in `downsweep`, (because roots are used to repopulated the cache) but in the `Finder` the logic was the wrong way around. Fixes #22680 ------------------------- Metric Decrease: MultiComponentModules MultiComponentModulesRecomp -------------------------p - - - - - be701cc6 by Matthew Pickering at 2023-01-24T05:37:52-05:00 Debug: Print full NodeKey when pretty printing ModuleGraphNode This is helpful when debugging multiple component issues. - - - - - 34d2d463 by Krzysztof Gogolewski at 2023-01-24T05:38:32-05:00 Fix Lint check for duplicate external names Lint was checking for duplicate external names by calling removeDups, which needs a comparison function that is passed to Data.List.sortBy. But the comparison was not a valid ordering - it returned LT if one of the names was not external. For example, the previous implementation won't find a duplicate in [M.x, y, M.x]. Instead, we filter out non-external names before looking for duplicates. - - - - - 1c050ed2 by Matthew Pickering at 2023-01-24T05:39:08-05:00 Add test for T22671 This was fixed by b13c6ea5 Closes #22671 - - - - - 05e6a2d9 by Tom Ellis at 2023-01-24T12:10:52-05:00 Clarify where `f` is defined - - - - - d151546e by Cheng Shao at 2023-01-24T12:11:29-05:00 CmmToC: fix CmmRegOff for 64-bit register on a 32-bit target We used to print the offset value to a platform word sized integer. This is incorrect when the offset is negative (e.g. output of cmm constant folding) and the register is 64-bit but on a 32-bit target, and may lead to incorrect runtime result (e.g. #22607). The fix is simple: just treat it as a proper MO_Add, with the correct width info inferred from the register itself. Metric Increase: T12707 T13379 T4801 T5321FD T5321Fun - - - - - e5383a29 by Wander Hillen at 2023-01-24T20:02:26-05:00 Allow waiting for timerfd to be interrupted during rts shutdown - - - - - 1957eda1 by Ryan Scott at 2023-01-24T20:03:01-05:00 Restore Compose's Read/Show behavior to match Read1/Show1 instances Fixes #22816. - - - - - 30972827 by Matthew Pickering at 2023-01-25T03:54:14-05:00 docs: Update INSTALL.md Removes references to make. Fixes #22480 - - - - - bc038c3b by Cheng Shao at 2023-01-25T03:54:50-05:00 compiler: fix handling of MO_F_Neg in wasm NCG In the wasm NCG, we used to compile MO_F_Neg to 0.0-x. It was an oversight, there actually exists f32.neg/f64.neg opcodes in the wasm spec and those should be used instead! The old behavior almost works, expect when GHC compiles the -0.0 literal, which will incorrectly become 0.0. - - - - - e987e345 by Sylvain Henry at 2023-01-25T14:47:41-05:00 Hadrian: correctly detect AR at-file support Stage0's ar may not support at-files. Take it into account. Found while cross-compiling from Darwin to Windows. - - - - - 48131ee2 by Sylvain Henry at 2023-01-25T14:47:41-05:00 Hadrian: fix Windows cross-compilation Decision to build either unix or Win32 package must be stage specific for cross-compilation to be supported. - - - - - 288fa017 by Sylvain Henry at 2023-01-25T14:47:41-05:00 Fix RTS build on Windows This change fixes a cross-compilation issue from ArchLinux to Windows because these symbols weren't found. - - - - - 2fdf22ae by Sylvain Henry at 2023-01-25T14:47:41-05:00 configure: support "windows" as an OS - - - - - 13a0566b by Simon Peyton Jones at 2023-01-25T14:48:16-05:00 Fix in-scope set in specImports Nothing deep here; I had failed to bring some floated dictionary binders into scope. Exposed by -fspecialise-aggressively Fixes #22715. - - - - - b7efdb24 by Matthew Pickering at 2023-01-25T14:48:51-05:00 ci: Disable HLint job due to excessive runtime The HLint jobs takes much longer to run (20 minutes) after "Give the RTS it's own configure script" eb5a6b91 Now the CI job will build the stage0 compiler before it generates the necessary RTS headers. We either need to: * Fix the linting rules so they take much less time * Revert the commit * Remove the linting of base from the hlint job * Remove the hlint job This is highest priority as it is affecting all CI pipelines. For now I am just disabling the job because there are many more pressing matters at hand. Ticket #22830 - - - - - 1bd32a35 by Sylvain Henry at 2023-01-26T12:34:21-05:00 Factorize hptModulesBelow Create and use moduleGraphModulesBelow in GHC.Unit.Module.Graph that doesn't need anything from the driver to be used. - - - - - 1262d3f8 by Matthew Pickering at 2023-01-26T12:34:56-05:00 Store dehydrated data structures in CgModBreaks This fixes a tricky leak in GHCi where we were retaining old copies of HscEnvs when reloading. If not all modules were recompiled then these hydrated fields in break points would retain a reference to the old HscEnv which could double memory usage. Fixes #22530 - - - - - e27eb80c by Matthew Pickering at 2023-01-26T12:34:56-05:00 Force more in NFData Name instance Doesn't force the lazy `OccName` field (#19619) which is already known as a really bad source of leaks. When we slam the hammer storing Names on disk (in interface files or the like), all this should be forced as otherwise a `Name` can easily retain an `Id` and hence the entire world. Fixes #22833 - - - - - 3d004d5a by Matthew Pickering at 2023-01-26T12:34:56-05:00 Force OccName in tidyTopName This occname has just been derived from an `Id`, so need to force it promptly so we can release the Id back to the world. Another symptom of the bug caused by #19619 - - - - - f2a0fea0 by Matthew Pickering at 2023-01-26T12:34:56-05:00 Strict fields in ModNodeKey (otherwise retains HomeModInfo) Towards #22530 - - - - - 5640cb1d by Sylvain Henry at 2023-01-26T12:35:36-05:00 Hadrian: fix doc generation Was missing dependencies on files generated by templates (e.g. ghc.cabal) - - - - - 3e827c3f by Richard Eisenberg at 2023-01-26T20:06:53-05:00 Do newtype unwrapping in the canonicaliser and rewriter See Note [Unwrap newtypes first], which has the details. Close #22519. - - - - - b3ef5c89 by doyougnu at 2023-01-26T20:07:48-05:00 tryFillBuffer: strictify more speculative bangs - - - - - d0d7ba0f by Vladislav Zavialov at 2023-01-26T20:08:25-05:00 base: NoImplicitPrelude in Data.Void and Data.Kind This change removes an unnecessary dependency on Prelude from two modules in the base package. - - - - - fa1db923 by Matthew Pickering at 2023-01-26T20:09:00-05:00 ci: Add ubuntu18_04 nightly and release jobs This adds release jobs for ubuntu18_04 which uses glibc 2.27 which is older than the 2.28 which is used by Rocky8 bindists. Ticket #22268 - - - - - 807310a1 by Matthew Pickering at 2023-01-26T20:09:00-05:00 rel-eng: Add missing rocky8 bindist We intend to release rocky8 bindist so the fetching script needs to know about them. - - - - - c7116b10 by Ben Gamari at 2023-01-26T20:09:35-05:00 base: Make changelog proposal references more consistent Addresses #22773. - - - - - 6932cfc7 by Sylvain Henry at 2023-01-26T20:10:27-05:00 Fix spurious change from !9568 - - - - - e480fbc2 by Ben Gamari at 2023-01-27T05:01:24-05:00 rts: Use C11-compliant static assertion syntax Previously we used `static_assert` which is only available in C23. By contrast, C11 only provides `_Static_assert`. Fixes #22777 - - - - - 2648c09c by Andrei Borzenkov at 2023-01-27T05:02:07-05:00 Replace errors from badOrigBinding with new one (#22839) Problem: in 02279a9c the type-level [] syntax was changed from a built-in name to an alias for the GHC.Types.List constructor. badOrigBinding assumes that if a name is not built-in then it must have come from TH quotation, but this is not necessarily the case with []. The outdated assumption in badOrigBinding leads to incorrect error messages. This code: data [] Fails with "Cannot redefine a Name retrieved by a Template Haskell quote: []" Unfortunately, there is not enough information in RdrName to directly determine if the name was constructed via TH or by the parser, so this patch changes the error message instead. It unifies TcRnIllegalBindingOfBuiltIn and TcRnNameByTemplateHaskellQuote into a new error TcRnBindingOfExistingName and changes its wording to avoid guessing the origin of the name. - - - - - 545bf8cf by Matthew Pickering at 2023-01-27T14:58:53+00:00 Revert "base: NoImplicitPrelude in Data.Void and Data.Kind" Fixes CI errors of the form. ``` ===> Command failed with error code: 1 ghc: panic! (the 'impossible' happened) GHC version 9.7.20230127: lookupGlobal Failed to load interface for ‘GHC.Num.BigNat’ There are files missing in the ‘ghc-bignum’ package, try running 'ghc-pkg check'. Use -v (or `:set -v` in ghci) to see a list of the files searched for. Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/GHC/Utils/Panic.hs:189:37 in ghc:GHC.Utils.Panic pprPanic, called at compiler/GHC/Tc/Utils/Env.hs:154:32 in ghc:GHC.Tc.Utils.Env CallStack (from HasCallStack): panic, called at compiler/GHC/Utils/Error.hs:454:29 in ghc:GHC.Utils.Error Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug ``` This reverts commit d0d7ba0fb053ebe7f919a5932066fbc776301ccd. The module now lacks a dependency on GHC.Num.BigNat which it implicitly depends on. It is causing all CI jobs to fail so we revert without haste whilst the patch can be fixed. Fixes #22848 - - - - - 638277ba by Simon Peyton Jones at 2023-01-27T23:54:55-05:00 Detect family instance orphans correctly We were treating a type-family instance as a non-orphan if there was a type constructor on its /right-hand side/ that was local. Boo! Utterly wrong. With this patch, we correctly check the /left-hand side/ instead! Fixes #22717 - - - - - 46a53bb2 by Simon Peyton Jones at 2023-01-27T23:54:55-05:00 Report family instance orphans correctly This fixes the fact that we were not reporting orphan family instances at all. The fix here is easy, but touches a bit of code. I refactored the code to be much more similar to the way that class instances are done: - Add a fi_orphan field to FamInst, like the is_orphan field in ClsInst - Make newFamInst initialise this field, just like newClsInst - And make newFamInst report a warning for an orphan, just like newClsInst - I moved newFamInst from GHC.Tc.Instance.Family to GHC.Tc.Utils.Instantiate, just like newClsInst. - I added mkLocalFamInst to FamInstEnv, just like mkLocalClsInst in InstEnv - TcRnOrphanInstance and SuggestFixOrphanInstance are now parametrised over class instances vs type/data family instances. Fixes #19773 - - - - - faa300fb by Simon Peyton Jones at 2023-01-27T23:54:55-05:00 Avoid orphans in STG This patch removes some orphan instances in the STG namespace by introducing the GHC.Stg.Lift.Types module, which allows various type family instances to be moved to GHC.Stg.Syntax, avoiding orphan instances. - - - - - 0f25a13b by Simon Peyton Jones at 2023-01-27T23:54:55-05:00 Avoid orphans in the parser This moves Anno instances for PatBuilder from GHC.Parser.PostProcess to GHC.Parser.Types to avoid orphans. - - - - - 15750d33 by Simon Peyton Jones at 2023-01-27T23:54:55-05:00 Accept an orphan declaration (sadly) This accepts the orphan type family instance type instance DsForeignHook = ... in GHC.HsToCore.Types. See Note [The Decoupling Abstract Data Hack] in GHC.Driver.Hooks - - - - - c9967d13 by Zubin Duggal at 2023-01-27T23:55:31-05:00 bindist configure: Fail if find not found (#22691) - - - - - ad8cfed4 by John Ericson at 2023-01-27T23:56:06-05:00 Put hadrian bootstrap plans through `jq` This makes it possible to review changes with conventional diffing tools. - - - - - d0ddc01b by Ben Gamari at 2023-01-27T23:56:42-05:00 testsuite: Introduce threaded2_sanity way Incredibly, we previously did not have a single way which would test the threaded RTS with multiple capabilities and the sanity-checker enabled. - - - - - 38ad8351 by Ben Gamari at 2023-01-27T23:56:42-05:00 rts: Relax Messages assertion `doneWithMsgThrowTo` was previously too strict in asserting that the `Message` is locked. Specifically, it failed to consider that the `Message` may not be locked if we are deleting all threads during RTS shutdown. - - - - - a9fe81af by Ben Gamari at 2023-01-27T23:56:42-05:00 testsuite: Fix race in UnliftedTVar2 Previously UnliftedTVar2 would fail when run with multiple capabilities (and possibly even with one capability) as it would assume that `killThread#` would immediately kill the "increment" thread. Also, refactor the the executable to now succeed with no output and fails with an exit code. - - - - - 8519af60 by Ben Gamari at 2023-01-27T23:56:42-05:00 testsuite: Make listThreads more robust Previously it was sensitive to the labels of threads which it did not create (e.g. the IO manager event loop threads). Fix this. - - - - - 55a81995 by Ben Gamari at 2023-01-27T23:56:43-05:00 rts: Fix non-atomic mutation of enabled_capabilities - - - - - b5c75f1d by Ben Gamari at 2023-01-27T23:56:43-05:00 rts: Fix C++ compilation issues Make the RTS compilable with a C++ compiler by inserting necessary casts. - - - - - c261b62f by Ben Gamari at 2023-01-27T23:56:43-05:00 rts: Fix typo "tracingAddCapabilities" was mis-named - - - - - 77fdbd3f by Ben Gamari at 2023-01-27T23:56:43-05:00 rts: Drop long-dead fallback definitions for INFINITY & NAN These are no longer necessary since we now compile as C99. - - - - - 56c1bd98 by Ben Gamari at 2023-01-28T02:57:59-05:00 Revert "CApiFFI: add ConstPtr for encoding const-qualified pointer return types (#22043)" This reverts commit 99aca26b652603bc62953157a48e419f737d352d. - - - - - b3a3534b by nineonine at 2023-01-28T02:57:59-05:00 CApiFFI: add ConstPtr for encoding const-qualified pointer return types Previously, when using `capi` calling convention in foreign declarations, code generator failed to handle const-cualified pointer return types. This resulted in CC toolchain throwing `-Wincompatible-pointer-types-discards-qualifiers` warning. `Foreign.C.Types.ConstPtr` newtype was introduced to handle these cases - special treatment was put in place to generate appropritetly qualified C wrapper that no longer triggers the above mentioned warning. Fixes #22043. - - - - - 082b7d43 by Oleg Grenrus at 2023-01-28T02:58:38-05:00 Add Foldable1 Solo instance - - - - - 50b1e2e8 by Andrei Borzenkov at 2023-01-28T02:59:18-05:00 Convert diagnostics in GHC.Rename.Bind to proper TcRnMessage (#20115) I removed all occurrences of TcRnUnknownMessage in GHC.Rename.Bind module. Instead, these TcRnMessage messages were introduced: TcRnMultipleFixityDecls TcRnIllegalPatternSynonymDecl TcRnIllegalClassBiding TcRnOrphanCompletePragma TcRnEmptyCase TcRnNonStdGuards TcRnDuplicateSigDecl TcRnMisplacedSigDecl TcRnUnexpectedDefaultSig TcRnBindInBootFile TcRnDuplicateMinimalSig - - - - - 3330b819 by Matthew Pickering at 2023-01-28T02:59:54-05:00 hadrian: Fix library-dirs, dynamic-library-dirs and static-library-dirs in inplace .conf files Previously we were just throwing away the contents of the library-dirs fields but really we have to do the same thing as for include-dirs, relativise the paths into the current working directory and maintain any extra libraries the user has specified. Now the relevant section of the rts.conf file looks like: ``` library-dirs: ${pkgroot}/../rts/build ${pkgroot}/../../..//_build/stage1/rts/build /nix/store/av4c0fib4rkmb6sa1074z0rb1ciria5b-gperftools-2.10/lib /nix/store/2infxahfp9lj084xn3q9ib5ajks8447i-libffi-3.4.4/lib library-dirs-static: ${pkgroot}/../rts/build ${pkgroot}/../../..//_build/stage1/rts/build /nix/store/av4c0fib4rkmb6sa1074z0rb1ciria5b-gperftools-2.10/lib /nix/store/2infxahfp9lj084xn3q9ib5ajks8447i-libffi-3.4.4/lib dynamic-library-dirs: ${pkgroot}/../rts/build ${pkgroot}/../../..//_build/stage1/rts/build /nix/store/av4c0fib4rkmb6sa1074z0rb1ciria5b-gperftools-2.10/lib /nix/store/2infxahfp9lj084xn3q9ib5ajks8447i-libffi-3.4.4/lib ``` Fixes #22209 - - - - - c9ad8852 by Andrew Lelechenko at 2023-01-28T03:00:33-05:00 Document differences between Data.{Monoid,Semigroup}.{First,Last} - - - - - 7e11c6dc by Cheng Shao at 2023-01-28T03:01:09-05:00 compiler: fix subword literal narrowing logic in the wasm NCG This patch fixes the W8/W16 literal narrowing logic in the wasm NCG, which used to lower it to something like i32.const -1, without properly zeroing-out the unused higher bits. Fixes #22608. - - - - - 6ea2aa02 by Cheng Shao at 2023-01-28T03:01:46-05:00 compiler: fix lowering of CmmBlock in the wasm NCG The CmmBlock datacon was not handled in lower_CmmLit, since I thought it would have been eliminated after proc-point splitting. Turns out it still occurs in very rare occasions, and this patch is needed to fix T9329 for wasm. - - - - - 2b62739d by Andrew Lelechenko at 2023-01-28T17:16:11-05:00 Assorted changes to avoid Data.List.{head,tail} - - - - - 78c07219 by Cheng Shao at 2023-01-28T17:16:48-05:00 compiler: properly handle ForeignHints in the wasm NCG Properly handle ForeignHints of ccall arguments/return value, insert sign extends and truncations when handling signed subwords. Fixes #22852. - - - - - 9e0fefd8 by Andrei Borzenkov at 2023-01-30T14:02:04+04:00 Rename () to Unit, Rename (,,...,,) to Tuple<n> - - - - - 8bed166b by Ben Gamari at 2023-01-30T05:06:26-05:00 nativeGen: Disable asm-shortcutting on Darwin Asm-shortcutting may produce relative references to symbols defined in other compilation units. This is not something that MachO relocations support (see #21972). For this reason we disable the optimisation on Darwin. We do so without a warning since this flag is enabled by `-O2`. Another way to address this issue would be to rather implement a PLT-relocatable jump-table strategy. However, this would only benefit Darwin and does not seem worth the effort. Closes #21972. - - - - - da468391 by Cheng Shao at 2023-01-30T05:07:03-05:00 compiler: fix data section alignment in the wasm NCG Previously we tried to lower the alignment requirement as far as possible, based on the section kind inferred from the CLabel. For info tables, .p2align 1 was applied given the GC should only need the lowest bit to tag forwarding pointers. But this would lead to unaligned loads/stores, which has a performance penalty even if the wasm spec permits it. Furthermore, the test suite has shown memory corruption in a few cases when compacting gc is used. This patch takes a more conservative approach: all data sections except C strings align to word size. - - - - - 08ba8720 by Andreas Klebinger at 2023-01-30T21:18:45-05:00 ghc-the-library: Retain cafs in both static in dynamic builds. We use keepCAFsForGHCi.c to force -fkeep-cafs behaviour by using a __attribute__((constructor)) function. This broke for static builds where the linker discarded the object file since it was not reverenced from any exported code. We fix this by asserting that the flag is enabled using a function in the same module as the constructor. Which causes the object file to be retained by the linker, which in turn causes the constructor the be run in static builds. This changes nothing for dynamic builds using the ghc library. But causes static to also retain CAFs (as we expect them to). Fixes #22417. ------------------------- Metric Decrease: T21839r ------------------------- - - - - - 20598ef6 by Ryan Scott at 2023-01-30T21:19:20-05:00 Handle `type data` properly in tyThingParent_maybe Unlike most other data constructors, data constructors declared with `type data` are represented in `TyThing`s as `ATyCon` rather than `ADataCon`. The `ATyCon` case in `tyThingParent_maybe` previously did not consider the possibility of the underlying `TyCon` being a promoted data constructor, which led to the oddities observed in #22817. This patch adds a dedicated special case in `tyThingParent_maybe`'s `ATyCon` case for `type data` data constructors to fix these oddities. Fixes #22817. - - - - - 2f145052 by Ryan Scott at 2023-01-30T21:19:56-05:00 Fix two bugs in TypeData TH reification This patch fixes two issues in the way that `type data` declarations were reified with Template Haskell: * `type data` data constructors are now properly reified using `DataConI`. This is accomplished with a special case in `reifyTyCon`. Fixes #22818. * `type data` type constructors are now reified in `reifyTyCon` using `TypeDataD` instead of `DataD`. Fixes #22819. - - - - - d0f34f25 by Simon Peyton Jones at 2023-01-30T21:20:35-05:00 Take account of loop breakers in specLookupRule The key change is that in GHC.Core.Opt.Specialise.specLookupRule we were using realIdUnfolding, which ignores the loop-breaker flag. When given a loop breaker, rule matching therefore looped infinitely -- #22802. In fixing this I refactored a bit. * Define GHC.Core.InScopeEnv as a data type, and use it. (Previously it was a pair: hard to grep for.) * Put several functions returning an IdUnfoldingFun into GHC.Types.Id, namely idUnfolding alwaysActiveUnfoldingFun, whenActiveUnfoldingFun, noUnfoldingFun and use them. (The are all loop-breaker aware.) - - - - - de963cb6 by Matthew Pickering at 2023-01-30T21:21:11-05:00 ci: Remove FreeBSD job from release pipelines We no longer attempt to build or distribute this release - - - - - f26d27ec by Matthew Pickering at 2023-01-30T21:21:11-05:00 rel_eng: Add check to make sure that release jobs are downloaded by fetch-gitlab This check makes sure that if a job is a prefixed by "release-" then the script downloads it and understands how to map the job name to the platform. - - - - - 7619c0b4 by Matthew Pickering at 2023-01-30T21:21:11-05:00 rel_eng: Fix the name of the ubuntu-* jobs These were not uploaded for alpha1 Fixes #22844 - - - - - 68eb8877 by Matthew Pickering at 2023-01-30T21:21:11-05:00 gen_ci: Only consider release jobs for job metadata In particular we do not have a release job for FreeBSD so the generation of the platform mapping was failing. - - - - - b69461a0 by Jason Shipman at 2023-01-30T21:21:50-05:00 User's guide: Clarify overlapping instance candidate elimination This commit updates the user's guide section on overlapping instance candidate elimination to use "or" verbiage instead of "either/or" in regards to the current pair of candidates' being overlappable or overlapping. "Either IX is overlappable, or IY is overlapping" can cause confusion as it suggests "Either IX is overlappable, or IY is overlapping, but not both". This was initially discussed on this Discourse topic: https://discourse.haskell.org/t/clarification-on-overlapping-instance-candidate-elimination/5677 - - - - - 7cbdaad0 by Matthew Pickering at 2023-01-31T07:53:53-05:00 Fixes for cabal-reinstall CI job * Allow filepath to be reinstalled * Bump some version bounds to allow newer versions of libraries * Rework testing logic to avoid "install --lib" and package env files Fixes #22344 - - - - - fd8f32bf by Cheng Shao at 2023-01-31T07:54:29-05:00 rts: prevent potential divide-by-zero when tickInterval=0 This patch fixes a few places in RtsFlags.c that may result in divide-by-zero error when tickInterval=0, which is the default on wasm. Fixes #22603. - - - - - 085a6db6 by Joachim Breitner at 2023-01-31T07:55:05-05:00 Update note at beginning of GHC.Builtin.NAmes some things have been renamed since it was written, it seems. - - - - - 7716cbe6 by Cheng Shao at 2023-01-31T07:55:41-05:00 testsuite: use tgamma for cg007 gamma is a glibc-only deprecated function, use tgamma instead. It's required for fixing cg007 when testing the wasm unregisterised codegen. - - - - - 19c1fbcd by doyougnu at 2023-01-31T13:08:03-05:00 InfoTableProv: ShortText --> ShortByteString - - - - - 765fab98 by doyougnu at 2023-01-31T13:08:03-05:00 FastString: add fastStringToShorText - - - - - a83c810d by Simon Peyton Jones at 2023-01-31T13:08:38-05:00 Improve exprOkForSpeculation for classops This patch fixes #22745 and #15205, which are about GHC's failure to discard unnecessary superclass selections that yield coercions. See GHC.Core.Utils Note [exprOkForSpeculation and type classes] The main changes are: * Write new Note [NON-BOTTOM_DICTS invariant] in GHC.Core, and refer to it * Define new function isTerminatingType, to identify those guaranteed-terminating dictionary types. * exprOkForSpeculation has a new (very simple) case for ClassOpId * ClassOpId has a new field that says if the return type is an unlifted type, or a terminating type. This was surprisingly tricky to get right. In particular note that unlifted types are not terminating types; you can write an expression of unlifted type, that diverges. Not so for dictionaries (or, more precisely, for the dictionaries that GHC constructs). Metric Decrease: LargeRecord - - - - - f83374f8 by Krzysztof Gogolewski at 2023-01-31T13:09:14-05:00 Support "unusable UNPACK pragma" warning with -O0 Fixes #11270 - - - - - a2d814dc by Ben Gamari at 2023-01-31T13:09:50-05:00 configure: Always create the VERSION file Teach the `configure` script to create the `VERSION` file. This will serve as the stable interface to allow the user to determine the version number of a working tree. Fixes #22322. - - - - - 5618fc21 by sheaf at 2023-01-31T15:51:06-05:00 Cmm: track the type of global registers This patch tracks the type of Cmm global registers. This is needed in order to lint uses of polymorphic registers, such as SIMD vector registers that can be used both for floating-point and integer values. This changes allows us to refactor VanillaReg to not store VGcPtr, as that information is instead stored in the type of the usage of the register. Fixes #22297 - - - - - 78b99430 by sheaf at 2023-01-31T15:51:06-05:00 Revert "Cmm Lint: relax SIMD register assignment check" This reverts commit 3be48877, which weakened a Cmm Lint check involving SIMD vectors. Now that we keep track of the type a global register is used at, we can restore the original stronger check. - - - - - be417a47 by Ben Gamari at 2023-01-31T15:51:45-05:00 nativeGen/AArch64: Fix debugging output Previously various panics would rely on a half-written Show instance, leading to very unhelpful errors. Fix this. See #22798. - - - - - 30989d13 by Ben Gamari at 2023-01-31T15:51:45-05:00 nativeGen: Teach graph-colouring allocator that x18 is unusable Previously trivColourable for AArch64 claimed that at 18 registers were trivially-colourable. This is incorrect as x18 is reserved by the platform on AArch64/Darwin. See #22798. - - - - - 7566fd9d by Ben Gamari at 2023-01-31T15:51:45-05:00 nativeGen/AArch64: Fix graph-colouring allocator Previously various `Instr` queries used by the graph-colouring allocator failed to handle a few pseudo-instructions. This manifested in compiler panicks while compiling `SHA`, which uses `-fregs-graph`. Fixes #22798. - - - - - 2cb500a5 by Ben Gamari at 2023-01-31T15:51:45-05:00 testsuite: Add regression test for #22798 - - - - - 03d693b2 by Ben Gamari at 2023-01-31T15:52:32-05:00 Revert "Hadrian: fix doc generation" This is too large of a hammer. This reverts commit 5640cb1d84d3cce4ce0a9e90d29b2b20d2b38c2f. - - - - - f838815c by Ben Gamari at 2023-01-31T15:52:32-05:00 hadrian: Sphinx docs require templated cabal files The package-version discovery logic in `doc/users_guide/package_versions.py` uses packages' cabal files to determine package versions. Teach Sphinx about these dependencies in cases where the cabal files are generated by templates. - - - - - 2e48c19a by Ben Gamari at 2023-01-31T15:52:32-05:00 hadrian: Refactor templating logic This refactors Hadrian's autoconf-style templating logic to be explicit about which interpolation variables should be substituted in which files. This clears the way to fix #22714 without incurring rule cycles. - - - - - 93f0e3c4 by Ben Gamari at 2023-01-31T15:52:33-05:00 hadrian: Substitute LIBRARY_*_VERSION variables This teaches Hadrian to substitute the `LIBRARY_*_VERSION` variables in `libraries/prologue.txt`, fixing #22714. Fixes #22714. - - - - - 22089f69 by Ben Gamari at 2023-01-31T20:46:27-05:00 Bump transformers submodule to 0.6.0.6 Fixes #22862. - - - - - f0eefa3c by Cheng Shao at 2023-01-31T20:47:03-05:00 compiler: properly handle non-word-sized CmmSwitch scrutinees in the wasm NCG Currently, the wasm NCG has an implicit assumption: all CmmSwitch scrutinees are 32-bit integers. This is not always true; #22864 is one counter-example with a 64-bit scrutinee. This patch fixes the logic by explicitly converting the scrutinee to a word that can be used as a br_table operand. Fixes #22871. Also includes a regression test. - - - - - 9f95db54 by Simon Peyton Jones at 2023-02-01T08:55:08+00:00 Improve treatment of type applications in patterns This patch fixes a subtle bug in the typechecking of type applications in patterns, e.g. f (MkT @Int @a x y) = ... See Note [Type applications in patterns] in GHC.Tc.Gen.Pat. This fixes #19847, #22383, #19577, #21501 - - - - - 955a99ea by Simon Peyton Jones at 2023-02-01T12:31:23-05:00 Treat existentials correctly in dubiousDataConInstArgTys Consider (#22849) data T a where MkT :: forall k (t::k->*) (ix::k). t ix -> T @k a Then dubiousDataConInstArgTys MkT [Type, Foo] should return [Foo (ix::Type)] NOT [Foo (ix::k)] A bit of an obscure case, but it's an outright bug, and the fix is easy. - - - - - 0cc16aaf by Matthew Pickering at 2023-02-01T12:31:58-05:00 Bump supported LLVM range from 10 through 15 to 11 through 16 LLVM 15 turns on the new pass manager by default, which we have yet to migrate to so for new we pass the `-enable-new-pm-0` flag in our llvm-passes flag. LLVM 11 was the first version to support the `-enable-new-pm` flag so we bump the lowest supported version to 11. Our CI jobs are using LLVM 12 so they should continue to work despite this bump to the lower bound. Fixes #21936 - - - - - f94f1450 by Matthew Pickering at 2023-02-01T12:31:58-05:00 Bump DOCKER_REV to use alpine image without LLVM installed alpine_3_12 only supports LLVM 10, which is now outside the supported version range. - - - - - 083e26ed by Matthew Pickering at 2023-02-01T17:43:21-05:00 Remove tracing OPTIONS_GHC These were accidentally left over from !9542 - - - - - 354aa47d by Teo Camarasu at 2023-02-01T17:44:00-05:00 doc: fix gcdetails_block_fragmentation_bytes since annotation - - - - - 61ce5bf6 by Jaro Reinders at 2023-02-02T00:15:30-05:00 compiler: Implement higher order patterns in the rule matcher This implements proposal 555 and closes ticket #22465. See the proposal and ticket for motivation. The core changes of this patch are in the GHC.Core.Rules.match function and they are explained in the Note [Matching higher order patterns]. - - - - - 394b91ce by doyougnu at 2023-02-02T00:16:10-05:00 CI: JavaScript backend runs testsuite This MR runs the testsuite for the JS backend. Note that this is a temporary solution until !9515 is merged. Key point: The CI runs hadrian on the built cross compiler _but not_ on the bindist. Other Highlights: - stm submodule gets a bump to mark tests as broken - several tests are marked as broken or are fixed by adding more - conditions to their test runner instance. List of working commit messages: CI: test cross target _and_ emulator CI: JS: Try run testsuite with hadrian JS.CI: cleanup and simplify hadrian invocation use single bracket, print info JS CI: remove call to test_compiler from hadrian don't build haddock JS: mark more tests as broken Tracked in https://gitlab.haskell.org/ghc/ghc/-/issues/22576 JS testsuite: don't skip sum_mod test Its expected to fail, yet we skipped it which automatically makes it succeed leading to an unexpected success, JS testsuite: don't mark T12035j as skip leads to an unexpected pass JS testsuite: remove broken on T14075 leads to unexpected pass JS testsuite: mark more tests as broken JS testsuite: mark T11760 in base as broken JS testsuite: mark ManyUnbSums broken submodules: bump process and hpc for JS tests Both submodules has needed tests skipped or marked broken for th JS backend. This commit now adds these changes to GHC. See: HPC: https://gitlab.haskell.org/hpc/hpc/-/merge_requests/21 Process: https://github.com/haskell/process/pull/268 remove js_broken on now passing tests separate wasm and js backend ci test: T11760: add threaded, non-moving only_ways test: T10296a add req_c T13894: skip for JS backend tests: jspace, T22333: mark as js_broken(22573) test: T22513i mark as req_th stm submodule: mark stm055, T16707 broken for JS tests: js_broken(22374) on unpack_sums_6, T12010 dont run diff on JS CI, cleanup fixup: More CI cleanup fix: align text to master fix: align exceptions submodule to master CI: Bump DOCKER_REV Bump to ci-images commit that has a deb11 build with node. Required for !9552 testsuite: mark T22669 as js_skip See #22669 This test tests that .o-boot files aren't created when run in using the interpreter backend. Thus this is not relevant for the JS backend. testsuite: mark T22671 as broken on JS See #22835 base.testsuite: mark Chan002 fragile for JS see #22836 revert: submodule process bump bump stm submodule New hash includes skips for the JS backend. testsuite: mark RnPatternSynonymFail broken on JS Requires TH: - see !9779 - and #22261 compiler: GHC.hs ifdef import Utils.Panic.Plain - - - - - 1ffe770c by Cheng Shao at 2023-02-02T09:40:38+00:00 docs: 9.6 release notes for wasm backend - - - - - 0ada4547 by Matthew Pickering at 2023-02-02T11:39:44-05:00 Disable unfolding sharing for interface files with core definitions Ticket #22807 pointed out that the RHS sharing was not compatible with -fignore-interface-pragmas because the flag would remove unfoldings from identifiers before the `extra-decls` field was populated. For the 9.6 timescale the only solution is to disable this sharing, which will make interface files bigger but this is acceptable for the first release of `-fwrite-if-simplified-core`. For 9.8 it would be good to fix this by implementing #20056 due to the large number of other bugs that would fix. I also improved the error message in tc_iface_binding to avoid the "no match in record selector" error but it should never happen now as the entire sharing logic is disabled. Also added the currently broken test for #22807 which could be fixed by !6080 Fixes #22807 - - - - - 7e2d3eb5 by lrzlin at 2023-02-03T05:23:27-05:00 Enable tables next to code for LoongArch64 - - - - - 2931712a by Wander Hillen at 2023-02-03T05:24:06-05:00 Move pthread and timerfd ticker implementations to separate files - - - - - 41c4baf8 by Ben Gamari at 2023-02-03T05:24:44-05:00 base: Fix Note references in GHC.IO.Handle.Types - - - - - 31358198 by Andrew Lelechenko at 2023-02-03T05:25:22-05:00 Bump submodule containers to 0.6.7 Metric Decrease: ManyConstructors T10421 T12425 T12707 T13035 T13379 T15164 T1969 T783 T9198 T9961 WWRec - - - - - 8feb9301 by Ben Gamari at 2023-02-03T05:25:59-05:00 gitlab-ci: Eliminate redundant ghc --info output Previously ci.sh would emit the output of `ghc --info` every time it ran when using the nix toolchain. This produced a significant amount of noise. See #22861. - - - - - de1d1512 by Ryan Scott at 2023-02-03T14:07:30-05:00 Windows: Remove mingwex dependency The clang based toolchain uses ucrt as its math library and so mingwex is no longer needed. In fact using mingwex will cause incompatibilities as the default routines in both have differing ULPs and string formatting modifiers. ``` $ LIBRARY_PATH=/mingw64/lib ghc/_build/stage1/bin/ghc Bug.hs -fforce-recomp && ./Bug.exe [1 of 2] Compiling Main ( Bug.hs, Bug.o ) ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__imp___p__environ' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `__hscore_get_errno' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziError_errnoToIOError_info' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziWindows_failIf2_closure' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePageziAPI_mkCodePageEncoding_info' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncodingziCodePage_currentCodePage_closure' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziEncoding_getForeignEncoding_closure' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_ForeignziCziString_withCStringLen1_info' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziInternals_zdwflushCharReadBuffer_info' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziIOziHandleziText_hGetBuf1_info' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziFingerprint_fingerprintString_closure' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_DataziTypeableziInternal_mkTrCon_closure' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziException_errorCallWithCallStackException_closure' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\base-4.17.0.0\libHSbase-4.17.0.0.a: unknown symbol `base_GHCziErr_error_info' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `base_DataziMaybe_fromJust1_info' ghc.exe: | C:\Users\winferno\Software\ghc\_build\stage1\lib\x86_64-windows-ghc-9.5.20220908\template-haskell-2.19.0.0\libHStemplate-haskell-2.19.0.0.a: unknown symbol `templatezmhaskell_LanguageziHaskellziTHziSyntax_IntPrimL_con_info' ghc.exe: ^^ Could not load 'templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure', dependency unresolved. See top entry above. <no location info>: error: GHC.ByteCode.Linker.lookupCE During interactive linking, GHCi couldn't find the following symbol: templatezmhaskell_LanguageziHaskellziTHziLibziInternal_stringL_closure This may be due to you not asking GHCi to load extra object files, archives or DLLs needed by your current session. Restart GHCi, specifying the missing library using the -L/path/to/object/dir and -lmissinglibname flags, or simply by naming the relevant files on the GHCi command line. Alternatively, this link failure might indicate a bug in GHCi. If you suspect the latter, please report this as a GHC bug: https://www.haskell.org/ghc/reportabug ``` - - - - - 48e39195 by Tamar Christina at 2023-02-03T14:07:30-05:00 linker: Fix BFD import libraries This commit fixes the BFD style import library support in the runtime linker. This was accidentally broken during the refactoring to clang and went unnoticed because clang itself is unable to generate the BFD style import libraries. With this change we can not link against both GCC or Clang produced libraries again and intermix code produced by both compilers. - - - - - b2bb3e62 by Ben Gamari at 2023-02-03T14:07:30-05:00 Bump Windows toolchain Updates to LLVM 14, hopefully fixing #21964. - - - - - bf3f88a1 by Andreas Klebinger at 2023-02-03T14:08:07-05:00 Fix CallerCC potentially shadowing other cost centres. Add a CallerCC cost centre flavour for cost centres added by the CallerCC pass. This avoids potential accidental shadowing between CCs added by user annotations and ones added by CallerCC. - - - - - faea4bcd by j at 2023-02-03T14:08:47-05:00 Disable several ignore-warning flags in genapply. - - - - - 25537dfd by Ben Gamari at 2023-02-04T04:12:57-05:00 Revert "Use fix-sized bit-fiddling primops for fixed size boxed types" This reverts commit 4512ad2d6a8e65ea43c86c816411cb13b822f674. This was never applied to master/9.6 originally. (cherry picked from commit a44bdc2720015c03d57f470b759ece7fab29a57a) - - - - - 7612dc71 by Krzysztof Gogolewski at 2023-02-04T04:13:34-05:00 Minor refactor * Introduce refactorDupsOn f = refactorDups (comparing f) * Make mkBigTupleCase and coreCaseTuple monadic. Every call to those functions was preceded by calling newUniqueSupply. * Use mkUserLocalOrCoVar, which is equivalent to combining mkLocalIdOrCoVar with mkInternalName. - - - - - 5a54ac0b by Andrew Lelechenko at 2023-02-04T18:48:32-05:00 Fix colors in emacs terminal - - - - - 3c0f0c6d by Andrew Lelechenko at 2023-02-04T18:49:11-05:00 base changelog: move entries which were not backported to ghc-9.6 to base-4.19 section - - - - - b18fbf52 by Josh Meredith at 2023-02-06T07:47:57+00:00 Update JavaScript fileStat to match Emscripten layout - - - - - 6636b670 by Sylvain Henry at 2023-02-06T09:43:21-05:00 JS: replace "js" architecture with "javascript" Despite Cabal supporting any architecture name, `cabal --check` only supports a few built-in ones. Sadly `cabal --check` is used by Hackage hence using any non built-in name in a package (e.g. `arch(js)`) is rejected and the package is prevented from being uploaded on Hackage. Luckily built-in support for the `javascript` architecture was added for GHCJS a while ago. In order to allow newer `base` to be uploaded on Hackage we make the switch from `js` to `javascript` architecture. Fixes #22740. Co-authored-by: Ben Gamari <ben at smart-cactus.org> - - - - - 77a8234c by Luite Stegeman at 2023-02-06T09:43:59-05:00 Fix marking async exceptions in the JS backend Async exceptions are posted as a pair of the exception and the thread object. This fixes the marking pass to correctly follow the two elements of the pair. Potentially fixes #22836 - - - - - 3e09cf82 by Jan Hrček at 2023-02-06T09:44:38-05:00 Remove extraneous word in Roles user guide - - - - - b17fb3d9 by sheaf at 2023-02-07T10:51:33-05:00 Don't allow . in overloaded labels This patch removes . from the list of allowed characters in a non-quoted overloaded label, as it was realised this steals syntax, e.g. (#.). Users who want this functionality will have to add quotes around the label, e.g. `#"17.28"`. Fixes #22821 - - - - - 5dce04ee by romes at 2023-02-07T10:52:10-05:00 Update kinds in comments in GHC.Core.TyCon Use `Type` instead of star kind (*) Fix comment with incorrect kind * to have kind `Constraint` - - - - - 92916194 by Ben Gamari at 2023-02-07T10:52:48-05:00 Revert "Use fix-sized equality primops for fixed size boxed types" This reverts commit 024020c38126f3ce326ff56906d53525bc71690c. This was never applied to master/9.6 originally. See #20405 for why using these primops is a bad idea. (cherry picked from commit b1d109ad542e4c37ae5af6ace71baf2cb509d865) - - - - - c1670c6b by Sylvain Henry at 2023-02-07T21:25:18-05:00 JS: avoid head/tail and unpackFS - - - - - a9912de7 by Krzysztof Gogolewski at 2023-02-07T21:25:53-05:00 testsuite: Fix Python warnings (#22856) - - - - - 9ee761bf by sheaf at 2023-02-08T14:40:40-05:00 Fix tyvar scoping within class SPECIALISE pragmas Type variables from class/instance headers scope over class/instance method type signatures, but DO NOT scope over the type signatures in SPECIALISE and SPECIALISE instance pragmas. The logic in GHC.Rename.Bind.rnMethodBinds correctly accounted for SPECIALISE inline pragmas, but forgot to apply the same treatment to method SPECIALISE pragmas, which lead to a Core Lint failure with an out-of-scope type variable. This patch makes sure we apply the same logic for both cases. Fixes #22913 - - - - - 7eac2468 by Matthew Pickering at 2023-02-08T14:41:17-05:00 Revert "Don't keep exit join points so much" This reverts commit caced75765472a1a94453f2e5a439dba0d04a265. It seems the patch "Don't keep exit join points so much" is causing wide-spread regressions in the bytestring library benchmarks. If I revert it then the 9.6 numbers are better on average than 9.4. See https://gitlab.haskell.org/ghc/ghc/-/issues/22893#note_479525 ------------------------- Metric Decrease: MultiComponentModules MultiComponentModulesRecomp MultiLayerModules MultiLayerModulesRecomp MultiLayerModulesTH_Make T12150 T13386 T13719 T21839c T3294 parsing001 ------------------------- - - - - - 633f2799 by Cheng Shao at 2023-02-08T18:42:16-05:00 testsuite: remove config.use_threads This patch simplifies the testsuite driver by removing the use_threads config field. It's just a degenerate case of threads=1. - - - - - ca6673e3 by Cheng Shao at 2023-02-08T18:42:16-05:00 testsuite: use concurrent.futures.ThreadPoolExecutor in the driver The testsuite driver used to create one thread per test case, and explicitly use semaphore and locks for rate limiting and synchronization. This is a bad practice in any language, and occasionally may result in livelock conditions (e.g. #22889). This patch uses concurrent.futures.ThreadPoolExecutor for scheduling test case runs, which is simpler and more robust. - - - - - f22cce70 by Alan Zimmerman at 2023-02-08T18:42:51-05:00 EPA: Comment between module and where should be in header comments Do not apply the heuristic to associate a comment with a prior declaration for the first declaration in the file. Closes #22919 - - - - - d69ecac2 by Josh Meredith at 2023-02-09T03:24:05-05:00 JS generated refs: update testsuite conditions - - - - - 2ea1a6bc by sheaf at 2023-02-09T03:24:44-05:00 Bump transformers to 0.6.1.0 This allows us to avoid orphans for Foldable1 instances, fixing #22898. Updates transformers submodule. - - - - - d9d0c28d by konsumlamm at 2023-02-09T14:07:48-05:00 Update `Data.List.singleton` doc comment - - - - - fe9cd6ef by Ben Gamari at 2023-02-09T14:08:23-05:00 gitlab-template: Emphasize `user facing` label My sense is that the current mention of the ~"user facing" label is overlooked by many MR authors. Let's move this point up in the list to make it more likely that it is seen. Also rephrase some of the points. - - - - - e45eb828 by Simon Peyton Jones at 2023-02-10T06:51:28-05:00 Refactor the simplifier a bit to fix #22761 The core change in this commit, which fixes #22761, is that * In a Core rule, ru_rhs is always occ-analysed. This means adding a couple of calls to occurAnalyseExpr when building a Rule, in * GHC.Core.Rules.mkRule * GHC.Core.Opt.Simplify.Iteration.simplRules But diagosing the bug made me stare carefully at the code of the Simplifier, and I ended up doing some only-loosely-related refactoring. * I think that RULES could be lost because not every code path did addBndrRules * The code around lambdas was very convoluted It's mainly moving deck chairs around, but I like it more now. - - - - - 11e0cacb by Rebecca Turner at 2023-02-10T06:52:09-05:00 Detect the `mold` linker Enables support for the `mold` linker by rui314. - - - - - 59556235 by parsonsmatt at 2023-02-10T09:53:11-05:00 Add Lift instance for Fixed - - - - - c44e5f30 by Sylvain Henry at 2023-02-10T09:53:51-05:00 Testsuite: decrease length001 timeout for JS (#22921) - - - - - 133516af by Zubin Duggal at 2023-02-10T09:54:27-05:00 compiler: Use NamedFieldPuns for `ModIface_` and `ModIfaceBackend` `NFData` instances This is a minor refactor that makes it easy to add and remove fields from `ModIface_` and `ModIfaceBackend`. Also change the formatting to make it clear exactly which fields are fully forced with `rnf` - - - - - 1e9eac1c by Matthew Pickering at 2023-02-13T11:36:41+01:00 Refresh profiling docs I went through the whole of the profiling docs and tried to amend them to reflect current best practices and tooling. In particular I removed some old references to tools such as hp2any and replaced them with references to eventlog2html. - - - - - da208b9a by Matthew Pickering at 2023-02-13T11:36:41+01:00 docs: Add section about profiling and foreign calls Previously there was no documentation for how foreign calls interacted with the profiler. This can be quite confusing for users so getting it into the user guide is the first step to a potentially better solution. See the ticket for more insightful discussion. Fixes #21764 - - - - - 081640f1 by Andrew Lelechenko at 2023-02-13T12:51:52-05:00 Document that -fproc-alignment was introduced only in GHC 8.6 - - - - - 16adc349 by Sven Tennie at 2023-02-14T11:26:31-05:00 Add clangd flag to include generated header files This enables clangd to correctly check C files that import Rts.h. (The added include directory contains ghcautoconf.h et. al.) - - - - - c399ccd9 by amesgen at 2023-02-14T11:27:14-05:00 Mention new `Foreign.Marshal.Pool` implementation in User's Guide - - - - - b9282cf7 by Ben Gamari at 2023-02-14T11:27:50-05:00 upload_ghc_libs: More control over which packages to operate on Here we add a `--skip` flag to `upload_ghc_libs`, making it easier to limit which packages to upload. This is often necessary when one package is not uploadable (e.g. see #22740). - - - - - aa3a262d by PHO at 2023-02-14T11:28:29-05:00 Assume platforms support rpaths if they use either ELF or Mach-O Not only Linux, Darwin, and FreeBSD support rpaths. Determine the usability of rpaths based on the object format, not on OS. - - - - - 47716024 by PHO at 2023-02-14T11:29:09-05:00 RTS linker: Improve compatibility with NetBSD 1. Hint address to NetBSD mmap(2) has a different semantics from that of Linux. When a hint address is provided, mmap(2) searches for a free region at or below the hint but *never* above it. This means we can't reliably search for free regions incrementally on the userland, especially when ASLR is enabled. Let the kernel do it for us if we don't care where the mapped address is going to be. 2. NetBSD not only hates to map pages as rwx, but also disallows to switch pages from rw- to r-x unless the intention is declared when pages are initially requested. This means we need a new MemoryAccess mode for pages that are going to be changed to r-x. - - - - - 11de324a by Li-yao Xia at 2023-02-14T11:29:49-05:00 base: Move changelog entry to its place - - - - - 75930424 by Ben Gamari at 2023-02-14T11:30:27-05:00 nativeGen/AArch64: Emit Atomic{Read,Write} inline Previously the AtomicRead and AtomicWrite operations were emitted as out-of-line calls. However, these tend to be very important for performance, especially the RELAXED case (which only exists for ThreadSanitizer checking). Fixes #22115. - - - - - d6411d6c by Andreas Klebinger at 2023-02-14T11:31:04-05:00 Fix some correctness issues around tag inference when targeting the bytecode generator. * Let binders are now always assumed untagged for bytecode. * Imported referenced are now always assumed to be untagged for bytecode. Fixes #22840 - - - - - 9fb4ca89 by sheaf at 2023-02-14T11:31:49-05:00 Introduce warning for loopy superclass solve Commit aed1974e completely re-engineered the treatment of loopy superclass dictionaries in instance declarations. Unfortunately, it has the potential to break (albeit in a rather minor way) user code. To alleviate migration concerns, this commit re-introduces the old behaviour. Any reliance on this old behaviour triggers a warning, controlled by `-Wloopy-superclass-solve`. The warning text explains that GHC might produce bottoming evidence, and provides a migration strategy. This allows us to provide a graceful migration period, alerting users when they are relying on this unsound behaviour. Fixes #22912 #22891 #20666 #22894 #22905 - - - - - 1928c7f3 by Cheng Shao at 2023-02-14T11:32:26-05:00 rts: make it possible to change mblock size on 32-bit targets The MBLOCK_SHIFT macro must be the single source of truth for defining the mblock size, and changing it should only affect performance, not correctness. This patch makes it truly possible to reconfigure mblock size, at least on 32-bit targets, by fixing places which implicitly relied on the previous MBLOCK_SHIFT constant. Fixes #22901. - - - - - 78aa3b39 by Simon Hengel at 2023-02-14T11:33:06-05:00 Update outdated references to notes - - - - - e8baecd2 by meooow25 at 2023-02-14T11:33:49-05:00 Documentation: Improve Foldable1 documentation * 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 - - - - - 85a1a575 by romes at 2023-02-14T11:34:25-05:00 fix: Mark ghci Prelude import as implicit Fixes #22829 In GHCi, we were creating an import declaration for Prelude but we were not setting it as an implicit declaration. Therefore, ghci's import of Prelude triggered -Wmissing-import-lists. Adds regression test T22829 to testsuite - - - - - 3b019a7a by Cheng Shao at 2023-02-14T11:35:03-05:00 compiler: fix generateCgIPEStub for no-tables-next-to-code builds generateCgIPEStub already correctly implements the CmmTick finding logic for when tables-next-to-code is on/off, but it used the wrong predicate to decide when to switch between the two. Previously it switches based on whether the codegen is unregisterised, but there do exist registerised builds that disable tables-next-to-code! This patch corrects that problem. Fixes #22896. - - - - - 08c0822c by doyougnu at 2023-02-15T00:16:39-05:00 docs: release notes, user guide: add js backend Follow up from #21078 - - - - - 79d8fd65 by Bryan Richter at 2023-02-15T00:17:15-05:00 Allow failure in nightly-x86_64-linux-deb10-no_tntc-validate See #22343 - - - - - 9ca51f9e by Cheng Shao at 2023-02-15T00:17:53-05:00 rts: add the rts_clearMemory function This patch adds the rts_clearMemory function that does its best to zero out unused RTS memory for a wasm backend use case. See the comment above rts_clearMemory() prototype declaration for more detailed explanation. Closes #22920. - - - - - 26df73fb by Oleg Grenrus at 2023-02-15T22:20:57-05:00 Add -single-threaded flag to force single threaded rts This is the small part of implementing https://github.com/ghc-proposals/ghc-proposals/pull/240 - - - - - 631c6c72 by Cheng Shao at 2023-02-16T06:43:09-05:00 docs: add a section for the wasm backend Fixes #22658 - - - - - 1878e0bd by Bryan Richter at 2023-02-16T06:43:47-05:00 tests: Mark T12903 fragile everywhere See #21184 - - - - - b9420eac by Bryan Richter at 2023-02-16T06:43:47-05:00 Mark all T5435 variants as fragile See #22970. - - - - - df3d94bd by Sylvain Henry at 2023-02-16T06:44:33-05:00 Testsuite: mark T13167 as fragile for JS (#22921) - - - - - 324e925b by Sylvain Henry at 2023-02-16T06:45:15-05:00 JS: disable debugging info for heap objects - - - - - 518af814 by Josh Meredith at 2023-02-16T10:16:32-05:00 Factor JS Rts generation for h$c{_,0,1,2} into h$c{n} and improve name caching - - - - - 34cd308e by Ben Gamari at 2023-02-16T10:17:08-05:00 base: Note move of GHC.Stack.CCS.whereFrom to GHC.InfoProv in changelog Fixes #22883. - - - - - 12965aba by Simon Peyton Jones at 2023-02-16T10:17:46-05:00 Narrow the dont-decompose-newtype test Following #22924 this patch narrows the test that stops us decomposing newtypes. The key change is the use of noGivenNewtypeReprEqs in GHC.Tc.Solver.Canonical.canTyConApp. We went to and fro on the solution, as you can see in #22924. The result is carefully documented in Note [Decomoposing newtype equalities] On the way I had revert most of commit 3e827c3f74ef76d90d79ab6c4e71aa954a1a6b90 Author: Richard Eisenberg <rae at cs.brynmawr.edu> Date: Mon Dec 5 10:14:02 2022 -0500 Do newtype unwrapping in the canonicaliser and rewriter See Note [Unwrap newtypes first], which has the details. It turns out that (a) 3e827c3f makes GHC behave worse on some recursive newtypes (see one of the tests on this commit) (b) the finer-grained test (namely noGivenNewtypeReprEqs) renders 3e827c3f unnecessary - - - - - 5b038888 by Andrew Lelechenko at 2023-02-16T10:18:24-05:00 Documentation: add an example of SPEC usage - - - - - 681e0e8c by sheaf at 2023-02-16T14:09:56-05:00 No default finalizer exception handler 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 - - - - - b3ac17ad by Matthew Pickering at 2023-02-16T14:10:31-05:00 unicode: Don't inline bitmap in generalCategory 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 ------------------------- - - - - - 8988eeef by sheaf at 2023-02-16T20:32:27-05:00 Expand synonyms in RoughMap We were failing to expand type synonyms in the function GHC.Core.RoughMap.typeToRoughMatchLookupTc, even though the RoughMap infrastructure crucially relies on type synonym expansion to work. This patch adds the missing type-synonym expansion. Fixes #22985 - - - - - 3dd50e2f by Matthew Pickering at 2023-02-16T20:33:03-05:00 ghcup-metadata: Add test artifact Add the released testsuite tarball to the generated ghcup metadata. - - - - - c6a967d9 by Matthew Pickering at 2023-02-16T20:33:03-05:00 ghcup-metadata: Use Ubuntu and Rocky bindists Prefer to use the Ubuntu 20.04 and 18.04 binary distributions on Ubuntu and Linux Mint. Prefer to use the Rocky 8 binary distribution on unknown distributions. - - - - - be0b7209 by Matthew Pickering at 2023-02-17T09:37:16+00:00 Add INLINABLE pragmas to `generic*` functions in Data.OldList 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 - - - - - a203ad85 by Sylvain Henry at 2023-02-17T15:59:16-05:00 Merge libiserv with ghci `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). - - - - - 7080a93f by Simon Peyton Jones at 2023-02-20T12:06:32+01:00 Improve GHC.Tc.Gen.App.tcInstFun It wasn't behaving right when inst_final=False, and the function had no type variables f :: Foo => Int Rather a corner case, but we might as well do it right. Fixes #22908 Unexpectedly, three test cases (all using :type in GHCi) got slightly better output as a result: T17403, T14796, T12447 - - - - - 2592ab69 by Cheng Shao at 2023-02-20T10:35:30-05:00 compiler: fix cost centre profiling breakage in wasm NCG due to incorrect register mapping The wasm NCG used to map CCCS to a wasm global, based on the observation that CCCS is a transient register that's already handled by thread state load/store logic, so it doesn't need to be backed by the rCCCS field in the register table. Unfortunately, this is wrong, since even when Cmm execution hasn't yielded back to the scheduler, the Cmm code may call enterFunCCS, which does use rCCCS. This breaks cost centre profiling in a subtle way, resulting in inaccurate stack traces in some test cases. The fix is simple though: just remove the CCCS mapping. - - - - - 26243de1 by Alexis King at 2023-02-20T15:27:17-05:00 Handle top-level Addr# literals in the bytecode compiler Fixes #22376. - - - - - 0196cc2b by romes at 2023-02-20T15:27:52-05:00 fix: Explicitly flush stdout on plugin Because of #20791, the plugins tests often fail. This is a temporary fix to stop the tests from failing due to unflushed outputs on windows and the explicit flush should be removed when #20791 is fixed. - - - - - 4327d635 by Ryan Scott at 2023-02-20T20:44:34-05:00 Don't generate datacon wrappers for `type data` declarations Data constructor wrappers only make sense for _value_-level data constructors, but data constructors for `type data` declarations only exist at the _type_ level. This patch does the following: * The criteria in `GHC.Types.Id.Make.mkDataConRep` for whether a data constructor receives a wrapper now consider whether or not its parent data type was declared with `type data`, omitting a wrapper if this is the case. * Now that `type data` data constructors no longer receive wrappers, there is a spot of code in `refineDefaultAlt` that panics when it encounters a value headed by a `type data` type constructor. I've fixed this with a special case in `refineDefaultAlt` and expanded `Note [Refine DEFAULT case alternatives]` to explain why we do this. Fixes #22948. - - - - - 96dc58b9 by Ryan Scott at 2023-02-20T20:44:35-05:00 Treat type data declarations as empty when checking pattern-matching coverage The data constructors for a `type data` declaration don't exist at the value level, so we don't want GHC to warn users to match on them. Fixes #22964. - - - - - ff8e99f6 by Ryan Scott at 2023-02-20T20:44:35-05:00 Disallow `tagToEnum#` on `type data` types We don't want to allow users to conjure up values of a `type data` type using `tagToEnum#`, as these simply don't exist at the value level. - - - - - 8e765aff by Andrew Lelechenko at 2023-02-21T12:03:24-05:00 Bump submodule text to 2.0.2 - - - - - 172ff88f by Georgi Lyubenov at 2023-02-21T18:35:56-05:00 GHC proposal 496 - Nullary record wildcards This patch implements GHC proposal 496, which allows record wildcards to be used for nullary constructors, e.g. data A = MkA1 | MkA2 { fld1 :: Int } f :: A -> Int f (MkA1 {..}) = 0 f (MkA2 {..}) = fld1 To achieve this, we add arity information to the record field environment, so that we can accept a constructor which has no fields while continuing to reject non-record constructors with more than 1 field. See Note [Nullary constructors and empty record wildcards], as well as the more general overview in Note [Local constructor info in the renamer], both in the newly introduced GHC.Types.ConInfo module. Fixes #22161 - - - - - f70a0239 by sheaf at 2023-02-21T18:36:35-05:00 ghc-prim: levity-polymorphic array equality ops 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 - - - - - 9296660b by Andreas Klebinger at 2023-02-21T23:58:05-05:00 base: Correct @since annotation for FP<->Integral bit cast operations. Fixes #22708 - - - - - f11d9c27 by romes at 2023-02-21T23:58:42-05:00 fix: Update documentation links Closes #23008 Additionally batches some fixes to pointers to the Note [Wired-in units], and a typo in said note. - - - - - fb60339f by Bryan Richter at 2023-02-23T14:45:17+02:00 Propagate failure if unable to push notes - - - - - 8e170f86 by Alexis King at 2023-02-23T16:59:22-05:00 rts: Fix `prompt#` when profiling is enabled This commit also adds a new -Dk RTS option to the debug RTS to assist debugging continuation captures. Currently, the printed information is quite minimal, but more can be added in the future if it proves to be useful when debugging future issues. fixes #23001 - - - - - e9e7a00d by sheaf at 2023-02-23T17:00:01-05:00 Explicit migration timeline for loopy SC solving This patch updates the warning message introduced in commit 9fb4ca89bff9873e5f6a6849fa22a349c94deaae to specify an explicit migration timeline: GHC will no longer support this constraint solving mechanism starting from GHC 9.10. Fixes #22912 - - - - - 4eb9c234 by Sylvain Henry at 2023-02-24T17:27:45-05:00 JS: make some arithmetic primops faster (#22835) Don't use BigInt for wordAdd2, mulWord32, and timesInt32. Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - 92e76483 by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump terminfo submodule to 0.4.1.6 - - - - - f229db14 by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump unix submodule to 2.8.1.0 - - - - - 47bd48c1 by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump deepseq submodule to 1.4.8.1 - - - - - d2012594 by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump directory submodule to 1.3.8.1 - - - - - df6f70d1 by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump process submodule to v1.6.17.0 - - - - - 4c869e48 by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump hsc2hs submodule to 0.68.8 - - - - - 81d96642 by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump array submodule to 0.5.4.0 - - - - - 6361f771 by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump Cabal submodule to 3.9 pre-release - - - - - 4085fb6c by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump filepath submodule to 1.4.100.1 - - - - - 2bfad50f by Ben Gamari at 2023-02-24T17:28:20-05:00 Bump haskeline submodule to 0.8.2.1 - - - - - fdc89a8d by Ben Gamari at 2023-02-24T21:29:32-05:00 gitlab-ci: Run nix-build with -v0 This significantly cuts down on the amount of noise in the job log. Addresses #22861. - - - - - 69fb0b13 by Aaron Allen at 2023-02-24T21:30:10-05:00 Fix ParallelListComp out of scope suggestion This patch makes it so vars from one block of a parallel list comprehension are not in scope in a subsequent block during type checking. This was causing GHC to emit a faulty suggestion when an out of scope variable shared the occ name of a var from a different block. Fixes #22940 - - - - - ece092d0 by Simon Peyton Jones at 2023-02-24T21:30:45-05:00 Fix shadowing bug in prepareAlts As #23012 showed, GHC.Core.Opt.Simplify.Utils.prepareAlts was using an OutType to construct an InAlt. When shadowing is in play, this is outright wrong. See Note [Shadowing in prepareAlts]. - - - - - 7825fef9 by Sylvain Henry at 2023-02-24T21:31:25-05:00 JS: Store CI perf results (fix #22923) - - - - - b56025f4 by Gergő Érdi at 2023-02-27T13:34:22+00:00 Don't specialise incoherent instance applications Using incoherent instances, there can be situations where two occurrences of the same overloaded function at the same type use two different instances (see #22448). For incoherently resolved instances, we must mark them with `nospec` to avoid the specialiser rewriting one to the other. This marking is done during the desugaring of the `WpEvApp` wrapper. Fixes #22448 Metric Increase: T15304 - - - - - d0c7bbed by Tom Ellis at 2023-02-27T20:04:07-05:00 Fix SCC grouping example - - - - - f84a8cd4 by Bryan Richter at 2023-02-28T05:58:37-05:00 Mark setnumcapabilities001 fragile - - - - - 29a04d6e by Bryan Richter at 2023-02-28T05:58:37-05:00 Allow nightly-x86_64-linux-deb10-validate+thread_sanitizer to fail See #22520 - - - - - 9fa54572 by Cheng Shao at 2023-02-28T05:59:15-05:00 ghc-prim: fix hs_cmpxchg64 function prototype 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. - - - - - 0c200ab7 by Simon Peyton Jones at 2023-02-28T11:10:31-05:00 Account for local rules in specImports As #23024 showed, in GHC.Core.Opt.Specialise.specImports, we were generating specialisations (a locally-define function) for imported functions; and then generating specialisations for those locally-defined functions. The RULE for the latter should be attached to the local Id, not put in the rules-for-imported-ids set. Fix is easy; similar to what happens in GHC.HsToCore.addExportFlagsAndRules - - - - - 8b77f9bf by Sylvain Henry at 2023-02-28T11:11:21-05:00 JS: fix for overlap with copyMutableByteArray# (#23033) The code wasn't taking into account some kind of overlap. cgrun070 has been extended to test the missing case. - - - - - 239202a2 by Sylvain Henry at 2023-02-28T11:12:03-05:00 Testsuite: replace some js_skip with req_cmm req_cmm is more informative than js_skip - - - - - 7192ef91 by Simon Peyton Jones at 2023-02-28T18:54:59-05:00 Take more care with unlifted bindings in the specialiser As #22998 showed, we were floating an unlifted binding to top level, which breaks a Core invariant. The fix is easy, albeit a little bit conservative. See Note [Care with unlifted bindings] in GHC.Core.Opt.Specialise - - - - - bb500e2a by Simon Peyton Jones at 2023-02-28T18:55:35-05:00 Account for TYPE vs CONSTRAINT in mkSelCo As #23018 showed, in mkRuntimeRepCo we need to account for coercions between TYPE and COERCION. See Note [mkRuntimeRepCo] in GHC.Core.Coercion. - - - - - 79ffa170 by Ben Gamari at 2023-03-01T04:17:20-05:00 hadrian: Add dependency from lib/settings to mk/config.mk In 81975ef375de07a0ea5a69596b2077d7f5959182 we attempted to fix #20253 by adding logic to the bindist Makefile to regenerate the `settings` file from information gleaned by the bindist `configure` script. However, this fix had no effect as `lib/settings` is shipped in the binary distribution (to allow in-place use of the binary distribution). As `lib/settings` already existed and its rule declared no dependencies, `make` would fail to use the added rule to regenerate it. Fix this by explicitly declaring a dependency from `lib/settings` on `mk/config.mk`. Fixes #22982. - - - - - a2a1a1c0 by Sebastian Graf at 2023-03-01T04:17:56-05:00 Revert the main payload of "Make `drop` and `dropWhile` fuse (#18964)" 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 - - - - - cf118e2f by Simon Peyton Jones at 2023-03-01T04:18:33-05:00 Refine the test for naughty record selectors The test for naughtiness in record selectors is surprisingly subtle. See the revised Note [Naughty record selectors] in GHC.Tc.TyCl.Utils. Fixes #23038. - - - - - 86f240ca by romes at 2023-03-01T04:19:10-05:00 fix: Consider strictness annotation in rep_bind Fixes #23036 - - - - - 1ed573a5 by Richard Eisenberg at 2023-03-02T22:42:06-05:00 Don't suppress *all* Wanteds Code in GHC.Tc.Errors.reportWanteds suppresses a Wanted if its rewriters have unfilled coercion holes; see Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint. But if we thereby suppress *all* errors that's really confusing, and as #22707 shows, GHC goes on without even realising that the program is broken. Disaster. This MR arranges to un-suppress them all if they all get suppressed. Close #22707 - - - - - 8919f341 by Luite Stegeman at 2023-03-02T22:42:45-05:00 Check for platform support for JavaScript foreign imports GHC was accepting `foreign import javascript` declarations on non-JavaScript platforms. This adds a check so that these are only supported on an platform that supports the JavaScript calling convention. Fixes #22774 - - - - - db83f8bb by Ben Gamari at 2023-03-02T22:43:22-05:00 rts: Statically assert alignment of Capability In #22965 we noticed that changes in the size of `Capability` can result in unsound behavior due to the `align` pragma claiming an alignment which we don't in practice observe. Avoid this by statically asserting that the size is a multiple of the alignment. - - - - - 5f7a4a6d by Ben Gamari at 2023-03-02T22:43:22-05:00 rts: Introduce stgMallocAlignedBytes - - - - - 8a6f745d by Ben Gamari at 2023-03-02T22:43:22-05:00 rts: Correctly align Capability allocations Previously we failed to tell the C allocator that `Capability`s needed to be aligned, resulting in #22965. Fixes #22965. Fixes #22975. - - - - - 5464c73f by Ben Gamari at 2023-03-02T22:43:22-05:00 rts: Drop no-alignment special case for Windows For reasons that aren't clear, we were previously not giving Capability the same favorable alignment on Windows that we provided on other platforms. Fix this. - - - - - a86aae8b by Matthew Pickering at 2023-03-02T22:43:59-05:00 constant folding: Correct type of decodeDouble_Int64 rule The first argument is Int64# unconditionally, so we better produce something of that type. This fixes a core lint error found in the ad package. Fixes #23019 - - - - - 68dd64ff by Zubin Duggal at 2023-03-02T22:44:35-05:00 ncg/aarch64: Handle MULTILINE_COMMENT identically as COMMENTs Commit 7566fd9de38c67360c090f828923d41587af519c with the fix for #22798 was incomplete as it failed to handle MULTILINE_COMMENT pseudo-instructions, and didn't completly fix the compiler panics when compiling with `-fregs-graph`. Fixes #23002 - - - - - 2f97c861 by Simon Peyton Jones at 2023-03-02T22:45:11-05:00 Get the right in-scope set in etaBodyForJoinPoint Fixes #23026 - - - - - 45af8482 by David Feuer at 2023-03-03T11:40:47-05:00 Export getSolo from Data.Tuple 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) - - - - - 0c694895 by David Feuer at 2023-03-03T11:40:47-05:00 Document getSolo - - - - - bd0536af by Simon Peyton Jones at 2023-03-03T11:41:23-05:00 More fixes for `type data` declarations This MR fixes #23022 and #23023. Specifically * Beef up Note [Type data declarations] in GHC.Rename.Module, to make invariant (I1) explicit, and to name the several wrinkles. And add references to these specific wrinkles. * Add a Lint check for invariant (I1) above. See GHC.Core.Lint.checkTypeDataConOcc * Disable the `caseRules` for dataToTag# for `type data` values. See Wrinkle (W2c) in the Note above. Fixes #23023. * Refine the assertion in dataConRepArgTys, so that it does not complain about the absence of a wrapper for a `type data` constructor Fixes #23022. Acked-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - 858f34d5 by Oleg Grenrus at 2023-03-04T01:13:55+02:00 Add decideSymbol, decideChar, decideNat, decTypeRep, decT and hdecT These all type-level equality decision procedures. Implementes a CLC proposal https://github.com/haskell/core-libraries-committee/issues/98 - - - - - bf43ba92 by Simon Peyton Jones at 2023-03-04T01:18:23-05:00 Add test for T22793 - - - - - c6e1f3cd by Chris Wendt at 2023-03-04T03:35:18-07:00 Fix typo in docs referring to threadLabel - - - - - 232cfc24 by Simon Peyton Jones at 2023-03-05T19:57:30-05:00 Add regression test for #22328 - - - - - 5ed77deb by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00 Enable response files for linker if supported - - - - - 1e0f6c89 by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00 Synchronize `configure.ac` and `distrib/configure.ac.in` - - - - - 70560952 by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00 Fix `hadrian/bindist/config.mk.in` … as suggested by @bgamari - - - - - b042b125 by sheaf at 2023-03-06T17:06:50-05:00 Apply 1 suggestion(s) to 1 file(s) - - - - - 674b6b81 by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00 Try to create somewhat portable `ld` command I cannot figure out a good way to generate an `ld` command that works on both Linux and macOS. Normally you'd use something like `AC_LINK_IFELSE` for this purpose (I think), but that won't let us test response file support. - - - - - 83b0177e by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00 Quote variables … as suggested by @bgamari - - - - - 845f404d by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00 Fix configure failure on alpine linux - - - - - c56a3ae6 by Gabriella Gonzalez at 2023-03-06T17:06:50-05:00 Small fixes to configure script - - - - - cad5c576 by Andrei Borzenkov at 2023-03-06T17:07:33-05:00 Convert diagnostics in GHC.Rename.Module to proper TcRnMessage (#20115) I've turned almost all occurrences of TcRnUnknownMessage in GHC.Rename.Module module into a proper TcRnMessage. Instead, these TcRnMessage messages were introduced: TcRnIllegalInstanceHeadDecl TcRnUnexpectedStandaloneDerivingDecl TcRnUnusedVariableInRuleDecl TcRnUnexpectedStandaloneKindSig TcRnIllegalRuleLhs TcRnBadAssocRhs TcRnDuplicateRoleAnnot TcRnDuplicateKindSig TcRnIllegalDerivStrategy TcRnIllegalMultipleDerivClauses TcRnNoDerivStratSpecified TcRnStupidThetaInGadt TcRnBadImplicitSplice TcRnShadowedTyVarNameInFamResult TcRnIncorrectTyVarOnLhsOfInjCond TcRnUnknownTyVarsOnRhsOfInjCond Was introduced one helper type: RuleLhsErrReason - - - - - c6432eac by Apoorv Ingle at 2023-03-06T23:26:12+00:00 Constraint simplification loop now depends on `ExpansionFuel` instead of a boolean flag for `CDictCan.cc_pend_sc`. Pending givens get a fuel of 3 while Wanted and quantified constraints get a fuel of 1. This helps pending given constraints to keep up with pending wanted constraints in case of `UndecidableSuperClasses` and superclass expansions while simplifying the infered type. Adds 3 dynamic flags for controlling the fuels for each type of constraints `-fgivens-expansion-fuel` for givens `-fwanteds-expansion-fuel` for wanteds and `-fqcs-expansion-fuel` for quantified constraints Fixes #21909 Added Tests T21909, T21909b Added Note [Expanding Recursive Superclasses and ExpansionFuel] - - - - - a5afc8ab by Andrew Lelechenko at 2023-03-06T22:51:01-05:00 Documentation: describe laziness of several function from Data.List - - - - - fa559c28 by Ollie Charles at 2023-03-07T20:56:21+00:00 Add `Data.Functor.unzip` 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. - - - - - 2aa07708 by MorrowM at 2023-03-07T21:22:22-05:00 Fix documentation for traceWith and friends - - - - - f3ff7cb1 by David Binder at 2023-03-08T01:24:17-05:00 Remove utils/hpc subdirectory and its contents - - - - - cf98e286 by David Binder at 2023-03-08T01:24:17-05:00 Add git submodule for utils/hpc - - - - - 605fbbb2 by David Binder at 2023-03-08T01:24:18-05:00 Update commit for utils/hpc git submodule - - - - - 606793d4 by David Binder at 2023-03-08T01:24:18-05:00 Update commit for utils/hpc git submodule - - - - - 4158722a by Sylvain Henry at 2023-03-08T01:24:58-05:00 linker: fix linking with aligned sections (#23066) Take section alignment into account instead of assuming 16 bytes (which is wrong when the section requires 32 bytes, cf #23066). - - - - - 1e0d8fdb by Greg Steuck at 2023-03-08T08:59:05-05:00 Change hostSupportsRPaths to report False on OpenBSD OpenBSD does support -rpath but ghc build process relies on some related features that don't work there. See ghc/ghc#23011 - - - - - bed3a292 by Alexis King at 2023-03-08T08:59:53-05:00 bytecode: Fix bitmaps for BCOs used to tag tuples and prim call args fixes #23068 - - - - - 321d46d9 by Ben Gamari at 2023-03-08T15:02:30-05:00 rts: Drop redundant prototype - - - - - abb6070f by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Fix style - - - - - be278901 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Deduplicate assertion - - - - - b9034639 by Ben Gamari at 2023-03-08T15:02:30-05:00 rts: Fix type issues in Sparks.h Adds explicit casts to satisfy a C++ compiler. - - - - - da7b2b94 by Ben Gamari at 2023-03-08T15:02:30-05:00 rts: Use release ordering when storing thread labels Since this makes the ByteArray# visible from other cores. - - - - - 5b7f6576 by Ben Gamari at 2023-03-08T15:02:30-05:00 rts/BlockAlloc: Allow disabling of internal assertions These can be quite expensive and it is sometimes useful to compile a DEBUG RTS without them. - - - - - 6283144f by Ben Gamari at 2023-03-08T15:02:30-05:00 rts/Sanity: Mark pinned_object_blocks - - - - - 9b528404 by Ben Gamari at 2023-03-08T15:02:30-05:00 rts/Sanity: Look at nonmoving saved_filled lists - - - - - 0edc5438 by Ben Gamari at 2023-03-08T15:02:30-05:00 Evac: Squash data race in eval_selector_chain - - - - - 7eab831a by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Clarify implementation This makes the intent of this implementation a bit clearer. - - - - - 532262b9 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Clarify comment - - - - - bd9cd84b by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Add missing no-op in busy-wait loop - - - - - c4e6bfc8 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Don't push empty arrays to update remembered set Previously the write barrier of resizeSmallArray# incorrectly handled resizing of zero-sized arrays, pushing an invalid pointer to the update remembered set. Fixes #22931. - - - - - 92227b60 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Fix handling of weak pointers This fixes an interaction between aging and weak pointer handling which prevented the finalization of some weak pointers. In particular, weak pointers could have their keys incorrectly marked by the preparatory collector, preventing their finalization by the subsequent concurrent collection. While in the area, we also significantly improve the assertions regarding weak pointers. Fixes #22327. - - - - - ba7e7972 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Sanity check nonmoving large objects and compacts - - - - - 71b038a1 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Sanity check mutable list Assert that entries in the nonmoving generation's generational remembered set (a.k.a. mutable list) live in nonmoving generation. - - - - - 99d144d5 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Don't show occupancy if we didn't collect live words - - - - - 81d6cc55 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Fix tracking of FILLED_SWEEPING segments Previously we only updated the state of the segment at the head of each allocator's filled list. - - - - - 58e53bc4 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Assert state of swept segments - - - - - 2db92e01 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Handle new closures in nonmovingIsNowAlive We must conservatively assume that new closures are reachable since we are not guaranteed to mark such blocks. - - - - - e4c3249f by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Don't clobber update rem sets of old capabilities Previously `storageAddCapabilities` (called by `setNumCapabilities`) would clobber the update remembered sets of existing capabilities when increasing the capability count. Fix this by only initializing the update remembered sets of the newly-created capabilities. Fixes #22927. - - - - - 1b069671 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Add missing write barriers in selector optimisation This fixes the selector optimisation, adding a few write barriers which are necessary for soundness. See the inline comments for details. Fixes #22930. - - - - - d4032690 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Post-sweep sanity checking - - - - - 0baa8752 by Ben Gamari at 2023-03-08T15:02:30-05:00 nonmoving: Avoid n_caps race - - - - - 5d3232ba by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Don't push if nonmoving collector isn't enabled - - - - - 0a7eb0aa by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Be more paranoid in segment tracking Previously we left various segment link pointers dangling. None of this wrong per se, but it did make it harder than necessary to debug. - - - - - 7c817c0a by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Sync-phase mark budgeting Here we significantly improve the bound on sync phase pause times by imposing a limit on the amount of work that we can perform during the sync. If we find that we have exceeded our marking budget then we allow the mutators to resume, return to concurrent marking, and try synchronizing again later. Fixes #22929. - - - - - ce22a3e2 by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Allow pinned gen0 objects to be WEAK keys - - - - - 78746906 by Ben Gamari at 2023-03-08T15:02:31-05:00 rts: Reenable assertion - - - - - b500867a by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Move current segment array into Capability The current segments are conceptually owned by the mutator, not the collector. Consequently, it was quite tricky to prove that the mutator would not race with the collect due to this shared state. It turns out that such races are possible: when resizing the current segment array we may concurrently try to take a heap census. This will attempt to walk the current segment array, causing a data race. Fix this by moving the current segment array into `Capability`, where it belongs. Fixes #22926. - - - - - 56e669c1 by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Fix Note references Some references to Note [Deadlock detection under the non-moving collector] were missing an article. - - - - - 4a7650d7 by Ben Gamari at 2023-03-08T15:02:31-05:00 rts/Sanity: Fix block count assertion with non-moving collector The nonmoving collector does not use `oldest_gen->blocks` to track its block list. However, it nevertheless updates `oldest_gen->n_blocks` to ensure that its size is accounted for by the storage manager. Consequently, we must not attempt to assert consistency between the two. - - - - - 96a5aaed by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Don't call prepareUnloadCheck When the nonmoving GC is in use we do not call `checkUnload` (since we don't unload code) and therefore should not call `prepareUnloadCheck`, lest we run into assertions. - - - - - 6c6674ca by Ben Gamari at 2023-03-08T15:02:31-05:00 rts: Encapsulate block allocator spinlock This makes it a bit easier to add instrumentation on this spinlock while debugging. - - - - - e84f7167 by Ben Gamari at 2023-03-08T15:02:31-05:00 testsuite: Skip some tests when sanity checking is enabled - - - - - 3ae0f368 by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Fix unregisterised build - - - - - 4eb9d06b by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Ensure that sanity checker accounts for saved_filled segments - - - - - f0cf384d by Ben Gamari at 2023-03-08T15:02:31-05:00 hadrian: Add +boot_nonmoving_gc flavour transformer For using GHC bootstrapping to validate the non-moving GC. - - - - - 581e58ac by Ben Gamari at 2023-03-08T15:02:31-05:00 gitlab-ci: Add job bootstrapping with nonmoving GC - - - - - 487a8b58 by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Move allocator into new source file - - - - - 8f374139 by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Split out nonmovingAllocateGC - - - - - 662b6166 by Ben Gamari at 2023-03-08T15:02:31-05:00 testsuite: Only run T22795* in the normal way It doesn't make sense to run these in multiple ways as they merely test whether `-threaded`/`-single-threaded` flags. - - - - - 0af21dfa by Ben Gamari at 2023-03-08T15:02:31-05:00 rts: Rename clear_segment(_free_blocks)? To reflect the fact that these are to do with the nonmoving collector, now since they are exposed no longer static. - - - - - 7bcb192b by Ben Gamari at 2023-03-08T15:02:31-05:00 rts: Fix incorrect STATIC_INLINE This should be INLINE_HEADER lest we get unused declaration warnings. - - - - - f1fd3ffb by Ben Gamari at 2023-03-08T15:02:31-05:00 testsuite: Mark ffi023 as broken due to #23089 - - - - - a57f12b3 by Ben Gamari at 2023-03-08T15:02:31-05:00 testsuite: Skip T7160 in the nonmoving way Finalization order is different under the nonmoving collector. - - - - - f6f12a36 by Ben Gamari at 2023-03-08T15:02:31-05:00 rts: Capture GC configuration in a struct The number of distinct arguments passed to GarbageCollect was getting a bit out of hand. - - - - - ba73a807 by Ben Gamari at 2023-03-08T15:02:31-05:00 nonmoving: Non-concurrent collection - - - - - 7c813d06 by Alexis King at 2023-03-08T15:03:10-05:00 hadrian: Fix flavour compiler stage options off-by-one error !9193 pointed out that ghcDebugAssertions was supposed to be a predicate on the stage of the built compiler, but in practice it was a predicate on the stage of the compiler used to build. Unfortunately, while it fixed that issue for ghcDebugAssertions, it documented every other similar option as behaving the same way when in fact they all used the old behavior. The new behavior of ghcDebugAssertions seems more intuitive, so this commit changes the interpretation of every other option to match. It also improves the enableProfiledGhc and debugGhc flavour transformers by making them more selective about which stages in which they build additional library/RTS ways. - - - - - f97c7f6d by Luite Stegeman at 2023-03-09T09:52:09-05:00 Delete created temporary subdirectories at end of session. This patch adds temporary subdirectories to the list of paths do clean up at the end of the GHC session. This fixes warnings about non-empty temporary directories. Fixes #22952 - - - - - 9ea719f2 by Apoorv Ingle at 2023-03-09T09:52:45-05:00 Fixes #19627. Previously the solver failed with an unhelpful "solver reached too may iterations" error. With the fix for #21909 in place we no longer have the possibility of generating such an error if we have `-fconstraint-solver-iteration` > `-fgivens-fuel > `-fwanteds-fuel`. This is true by default, and the said fix also gives programmers a knob to control how hard the solver should try before giving up. This commit adds: * Reference to ticket #19627 in the Note [Expanding Recursive Superclasses and ExpansionFuel] * Test `typecheck/should_fail/T19627.hs` for regression purposes - - - - - eb3968b5 by Ben Gamari at 2023-03-10T02:32:43-05:00 Bump versions for ghc-9.6 release - - - - - ec2d93eb by Sebastian Graf at 2023-03-10T10:18:54-05:00 DmdAnal: Fix a panic on OPAQUE and trivial/PAP RHS (#22997) We should not panic in `add_demands` (now `set_lam_dmds`), because that code path is legimitely taken for OPAQUE PAP bindings, as in T22997. Fixes #22997. - - - - - 5b4628ae by Sylvain Henry at 2023-03-10T10:19:34-05:00 JS: remove dead code for old integer-gmp - - - - - bab23279 by Josh Meredith at 2023-03-10T23:24:49-05:00 JS: Fix implementation of MK_JSVAL - - - - - ec263a59 by Sebastian Graf at 2023-03-10T23:25:25-05:00 Simplify: Move `wantEtaExpansion` before expensive `do_eta_expand` check There is no need to run arity analysis and what not if we are not in a Simplifier phase that eta-expands or if we don't want to eta-expand the expression in the first place. Purely a refactoring with the goal of improving compiler perf. - - - - - 047e9d4f by Josh Meredith at 2023-03-13T03:56:03+00:00 JS: fix implementation of forceBool to use JS backend syntax - - - - - 559a4804 by Sebastian Graf at 2023-03-13T07:31:23-04:00 Simplifier: `countValArgs` should not count Type args (#23102) I observed miscompilations while working on !10088 caused by this. Fixes #23102. Metric Decrease: T10421 - - - - - 536d1f90 by Matthew Pickering at 2023-03-13T14:04:49+00:00 Bump Win32 to 2.13.4.0 Updates Win32 submodule - - - - - ee17001e by Ben Gamari at 2023-03-13T21:18:24-04:00 ghc-bignum: Drop redundant include-dirs field - - - - - c9c26cd6 by Teo Camarasu at 2023-03-16T12:17:50-04:00 Fix BCO creation setting caps when -j > -N * Remove calls to 'setNumCapabilities' in 'createBCOs' These calls exist to ensure that 'createBCOs' can benefit from parallelism. But this is not the right place to call `setNumCapabilities`. Furthermore the logic differs from that in the driver causing the capability count to be raised and lowered at each TH call if -j > -N. * Remove 'BCOOpts' No longer needed as it was only used to thread the job count down to `createBCOs` Resolves #23049 - - - - - 5ddbf5ed by Teo Camarasu at 2023-03-16T12:17:50-04:00 Add changelog entry for #23049 - - - - - 6e3ce9a4 by Ben Gamari at 2023-03-16T12:18:26-04:00 configure: Fix FIND_CXX_STD_LIB test on Darwin Annoyingly, Darwin's <cstddef> includes <version> and APFS is case-insensitive. Consequently, it will end up #including the `VERSION` file generated by the `configure` script on the second and subsequent runs of the `configure` script. See #23116. - - - - - 19d6d039 by sheaf at 2023-03-16T21:31:22+01:00 ghci: only keep the GlobalRdrEnv in ModInfo The datatype GHC.UI.Info.ModInfo used to store a ModuleInfo, which includes a TypeEnv. This can easily cause space leaks as we have no way of forcing everything in a type environment. In GHC, we only use the GlobalRdrEnv, which we can force completely. So we only store that instead of a fully-fledged ModuleInfo. - - - - - 73d07c6e by Torsten Schmits at 2023-03-17T14:36:49-04:00 Add structured error messages for GHC.Tc.Utils.Backpack Tracking ticket: #20119 MR: !10127 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. One occurrence, when handing a nested error from the interface loading machinery, was omitted. It will be handled by a subsequent changeset that addresses interface errors. - - - - - a13affce by Andrei Borzenkov at 2023-03-21T11:17:17-04:00 Rename () into Unit, (,,...,,) into Tuple<n> (#21294) 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 at gmail.com> - - - - - 23642bf6 by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00 docs: fix some wrongs in the eventlog format documentation - - - - - 90159773 by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00 docs: explain the BLOCK_MARKER event - - - - - ab1c25e8 by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00 docs: add BlockedOnMVarRead thread status in eventlog encodings - - - - - 898afaef by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00 docs: add TASK_DELETE event in eventlog encodings - - - - - bb05b4cc by Adam Sandberg Ericsson at 2023-03-21T11:17:53-04:00 docs: add WALL_CLOCK_TIME event in eventlog encodings - - - - - eeea0343 by Torsten Schmits at 2023-03-21T11:18:34-04:00 Add structured error messages for GHC.Tc.Utils.Env Tracking ticket: #20119 MR: !10129 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. - - - - - be1d4be8 by Andrew Lelechenko at 2023-03-21T11:19:13-04:00 Document pdep / pext primops - - - - - e8b4aac4 by Alex Mason at 2023-03-21T18:11:04-04:00 Allow LLVM backend to use HDoc for faster file generation. Also remove the MetaStmt constructor from LlvmStatement and places the annotations into the Store statement. Includes “Implement a workaround for -no-asm-shortcutting bug“ (https://gitlab.haskell.org/ghc/ghc/-/commit/2fda9e0df886cc551e2cd6b9c2a384192bdc3045) - - - - - ea24360d by Luite Stegeman at 2023-03-21T18:11:44-04:00 Compute LambdaFormInfo when using JavaScript backend. CmmCgInfos is needed to write interface files, but the JavaScript backend does not generate it, causing "Name without LFInfo" warnings. This patch adds a conservative but always correct CmmCgInfos when the JavaScript backend is used. Fixes #23053 - - - - - 926ad6de by Simon Peyton Jones at 2023-03-22T01:03:08-04:00 Be more careful about quantification This MR is driven by #23051. It does several things: * It is guided by the generalisation plan described in #20686. But it is still far from a complete implementation of that plan. * Add Note [Inferred type with escaping kind] to GHC.Tc.Gen.Bind. This explains that we don't (yet, pending #20686) directly prevent generalising over escaping kinds. * In `GHC.Tc.Utils.TcMType.defaultTyVar` we default RuntimeRep and Multiplicity variables, beause we don't want to quantify over them. We want to do the same for a Concrete tyvar, but there is nothing sensible to default it to (unless it has kind RuntimeRep, in which case it'll be caught by an earlier case). So we promote instead. * Pure refactoring in GHC.Tc.Solver: * Rename decideMonoTyVars to decidePromotedTyVars, since that's what it does. * Move the actual promotion of the tyvars-to-promote from `defaultTyVarsAndSimplify` to `decidePromotedTyVars`. This is a no-op; just tidies up the code. E.g then we don't need to return the promoted tyvars from `decidePromotedTyVars`. * A little refactoring in `defaultTyVarsAndSimplify`, but no change in behaviour. * When making a TauTv unification variable into a ConcreteTv (in GHC.Tc.Utils.Concrete.makeTypeConcrete), preserve the occ-name of the type variable. This just improves error messages. * Kill off dead code: GHC.Tc.Utils.TcMType.newConcreteHole - - - - - 0ab0cc11 by Sylvain Henry at 2023-03-22T01:03:48-04:00 Testsuite: use appropriate predicate for ManyUbxSums test (#22576) - - - - - 048c881e by romes at 2023-03-22T01:04:24-04:00 fix: Incorrect @since annotations in GHC.TypeError Fixes #23128 - - - - - a1528b68 by Sylvain Henry at 2023-03-22T01:05:04-04:00 Testsuite: use req_interp predicate for T16318 (#22370) - - - - - ad765b6f by Sylvain Henry at 2023-03-22T01:05:04-04:00 Testsuite: use req_interp predicate for T20214 - - - - - e0b8eaf3 by Simon Peyton Jones at 2023-03-22T09:50:13+00:00 Refactor the constraint solver pipeline The big change is to put the entire type-equality solver into GHC.Tc.Solver.Equality, rather than scattering it over Canonical and Interact. Other changes * EqCt becomes its own data type, a bit like QCInst. This is great because EqualCtList is then just [EqCt] * New module GHC.Tc.Solver.Dict has come of the class-contraint solver. In due course it will be all. One step at a time. This MR is intended to have zero change in behaviour: it is a pure refactor. It opens the way to subsequent tidying up, we believe. - - - - - cedf9a3b by Torsten Schmits at 2023-03-22T15:31:18-04:00 Add structured error messages for GHC.Tc.Utils.TcMType Tracking ticket: #20119 MR: !10138 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. - - - - - 30d45e97 by Sylvain Henry at 2023-03-22T15:32:01-04:00 Testsuite: use js_skip for T2615 (#22374) - - - - - 4aeead36 by Adam Gundry at 2023-03-23T13:53:47+01:00 Adapt to warning categories changes - - - - - 8c98deba by Armando Ramirez at 2023-03-23T09:19:32-04:00 Optimized Foldable methods for Data.Functor.Compose Explicitly define length, elem, etc. in Foldable instance for Data.Functor.Compose Implementation of https://github.com/haskell/core-libraries-committee/issues/57 - - - - - bc066108 by Armando Ramirez at 2023-03-23T09:19:32-04:00 Additional optimized versions - - - - - 80fce576 by Andrew Lelechenko at 2023-03-23T09:19:32-04:00 Simplify minimum/maximum in instance Foldable (Compose f g) - - - - - 8cb88a5a by Andrew Lelechenko at 2023-03-23T09:19:32-04:00 Update changelog to mention changes to instance Foldable (Compose f g) - - - - - e1c8c41d by Torsten Schmits at 2023-03-23T09:20:13-04:00 Add structured error messages for GHC.Tc.TyCl.PatSyn Tracking ticket: #20117 MR: !10158 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. - - - - - f932c589 by Adam Gundry at 2023-03-24T02:36:09-04:00 Allow WARNING pragmas to be controlled with custom categories Closes #17209. This implements GHC Proposal 541, allowing a WARNING pragma to be annotated with a category like so: {-# WARNING in "x-partial" head "This function is undefined on empty lists." #-} The user can then enable, disable and set the severity of such warnings using command-line flags `-Wx-partial`, `-Werror=x-partial` and so on. There is a new warning group `-Wextended-warnings` containing all these warnings. Warnings without a category are treated as if the category was `deprecations`, and are (still) controlled by the flags `-Wdeprecations` and `-Wwarnings-deprecations`. Updates Haddock submodule. - - - - - 0426515b by Adam Gundry at 2023-03-24T02:36:09-04:00 Move mention of warning groups change to 9.8.1 release notes - - - - - b8d783d2 by Ben Gamari at 2023-03-24T02:36:45-04:00 nativeGen/AArch64: Fix bitmask immediate predicate Previously the predicate for determining whether a logical instruction operand could be encoded as a bitmask immediate was far too conservative. This meant that, e.g., pointer untagged required five instructions whereas it should only require one. Fixes #23030. - - - - - 46120bb6 by Joachim Breitner at 2023-03-24T13:09:43-04:00 User's guide: Improve docs for -Wall previously it would list the warnings _not_ enabled by -Wall. That’s unnecessary round-about and was out of date. So let's just name the relevant warnings (based on `compiler/GHC/Driver/Flags.hs`). - - - - - 509d1f11 by Ben Gamari at 2023-03-24T13:10:20-04:00 codeGen/tsan: Disable instrumentation of unaligned stores There is some disagreement regarding the prototype of `__tsan_unaligned_write` (specifically whether it takes just the written address, or the address and the value as an argument). Moreover, I have observed crashes which appear to be due to it. Disable instrumentation of unaligned stores as a temporary mitigation. Fixes #23096. - - - - - 6a73655f by Li-yao Xia at 2023-03-25T00:02:44-04:00 base: Document GHC versions associated with past base versions in the changelog - - - - - 43bd7694 by Teo Camarasu at 2023-03-25T00:03:24-04:00 Add regression test for #17574 This test currently fails in the nonmoving way - - - - - f2d56bf7 by Teo Camarasu at 2023-03-25T00:03:24-04:00 fix: account for large and compact object stats with nonmoving gc Make sure that we keep track of the size of large and compact objects that have been moved onto the nonmoving heap. We keep track of their size and add it to the amount of live bytes in nonmoving segments to get the total size of the live nonmoving heap. Resolves #17574 - - - - - 7131b705 by David Feuer at 2023-03-25T00:04:04-04:00 Modify ThreadId documentation and comments 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. - - - - - c421bbbb by Ben Gamari at 2023-03-25T00:04:41-04:00 rts: Fix barriers of IND and IND_STATIC Previously IND and IND_STATIC lacked the acquire barriers enjoyed by BLACKHOLE. As noted in the (now updated) Note [Heap memory barriers], this barrier is critical to ensure that the indirectee is visible to the entering core. Fixes #22872. - - - - - 62fa7faa by Andrew Lelechenko at 2023-03-25T00:05:22-04:00 Improve documentation of atomicModifyMutVar2# - - - - - b2d14d0b by Cheng Shao at 2023-03-25T03:46:43-04:00 rts: use performBlockingMajorGC in hs_perform_gc and fix ffi023 This patch does a few things: - Add the missing RtsSymbols.c entry of performBlockingMajorGC - Make hs_perform_gc call performBlockingMajorGC, which restores previous behavior - Use hs_perform_gc in ffi023 - Remove rts_clearMemory() call in ffi023, it now works again in some test ways previously marked as broken. Fixes #23089 - - - - - d9ae24ad by Cheng Shao at 2023-03-25T03:46:44-04:00 testsuite: add the rts_clearMemory test case This patch adds a standalone test case for rts_clearMemory that mimics how it's typically used by wasm backend users and ensures this RTS API isn't broken by future RTS refactorings. Fixes #23901. - - - - - 80729d96 by Andrew Lelechenko at 2023-03-25T03:47:22-04:00 Improve documentation for resizing of byte arrays - - - - - c6ec4cd1 by Ben Gamari at 2023-03-25T20:23:47-04:00 rts: Don't rely on EXTERN_INLINE for slop-zeroing logic Previously we relied on calling EXTERN_INLINE functions defined in ClosureMacros.h from Cmm to zero slop. However, as far as I can tell, this is no longer safe to do in C99 as EXTERN_INLINE definitions may be emitted in each compilation unit. Fix this by explicitly declaring a new set of non-inline functions in ZeroSlop.c which can be called from Cmm and marking the ClosureMacros.h definitions as INLINE_HEADER. In the future we should try to eliminate EXTERN_INLINE. - - - - - c32abd4b by Ben Gamari at 2023-03-25T20:23:48-04:00 rts: Fix capability-count check in zeroSlop Previously `zeroSlop` examined `RtsFlags` to determine whether the program was single-threaded. This is wrong; a program may be started with `+RTS -N1` yet the process may later increase the capability count with `setNumCapabilities`. This lead to quite subtle and rare crashes. Fixes #23088. - - - - - 656d4cb3 by Ryan Scott at 2023-03-25T20:24:23-04:00 Add Eq/Ord instances for SSymbol, SChar, and SNat This implements [CLC proposal #148](https://github.com/haskell/core-libraries-committee/issues/148). - - - - - 4f93de88 by David Feuer at 2023-03-26T15:33:02-04:00 Update and expand atomic modification Haddocks * 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`. - - - - - e1fb56b2 by David Feuer at 2023-03-26T15:33:41-04:00 Document the constructor name for lists 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 - - - - - c1f755c4 by Simon Peyton Jones at 2023-03-27T22:09:41+01:00 Make exprIsConApp_maybe a bit cleverer Addresses #23159. See Note Note [Exploit occ-info in exprIsConApp_maybe] in GHC.Core.SimpleOpt. Compile times go down very slightly, but always go down, never up. Good! Metrics: compile_time/bytes allocated ------------------------------------------------ CoOpt_Singletons(normal) -1.8% T15703(normal) -1.2% GOOD geo. mean -0.1% minimum -1.8% maximum +0.0% Metric Decrease: CoOpt_Singletons T15703 - - - - - 76bb4c58 by Ryan Scott at 2023-03-28T08:12:08-04:00 Add COMPLETE pragmas to TypeRep, SSymbol, SChar, and SNat This implements [CLC proposal #149](https://github.com/haskell/core-libraries-committee/issues/149). - - - - - 642d8d60 by sheaf at 2023-03-29T13:35:56+02:00 Adapt to record field refactor This commit adapts to the changes in GHC MR !8686, which overhauls the treatment of record fields in the renamer, adding separate record field namespaces and entirely removing the GreName datatype. - - - - - 3f374399 by sheaf at 2023-03-29T13:57:33+02:00 Handle records in the renamer 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 ------------------------- - - - - - 4f1940f0 by sheaf at 2023-03-29T13:57:33+02:00 Avoid repeatedly shadowing in shadowNames This commit refactors GHC.Type.Name.Reader.shadowNames to first accumulate all the shadowing arising from the introduction of a new set of GREs, and then applies all the shadowing to the old GlobalRdrEnv in one go. - - - - - d246049c by sheaf at 2023-03-29T13:57:34+02:00 igre_prompt_env: discard "only-qualified" names We were unnecessarily carrying around names only available qualified in igre_prompt_env, violating the icReaderEnv invariant. We now get rid of these, as they aren't needed for the shadowing computation that igre_prompt_env exists for. Fixes #23177 ------------------------- Metric Decrease: T14052 T14052Type ------------------------- - - - - - ac8d4333 by doyougnu at 2023-03-29T11:11:44-04:00 Update UniqMap API - - - - - 41a572f6 by Matthew Pickering at 2023-03-29T16:17:21-04:00 hadrian: Fix path to HpcParser.y The source for this project has been moved into a src/ folder so we also need to update this path. Fixes #23187 - - - - - b159e0e9 by doyougnu at 2023-03-30T01:40:08-04:00 js: split JMacro into JS eDSL and JS syntax This commit: Splits JExpr and JStat into two nearly identical DSLs: - GHC.JS.Syntax is the JMacro based DSL without unsaturation, i.e., a value cannot be unsaturated, or, a value of this DSL is a witness that a value of GHC.JS.Unsat has been saturated - GHC.JS.Unsat is the JMacro DSL from GHCJS with Unsaturation. Then all binary and outputable instances are changed to use GHC.JS.Syntax. This moves us closer to closing out #22736 and #22352. See #22736 for roadmap. ------------------------- Metric Increase: CoOpt_Read LargeRecord ManyAlternatives PmSeriesS PmSeriesT PmSeriesV T10421 T10858 T11195 T11374 T11822 T12227 T12707 T13035 T13253 T13253-spj T13379 T14683 T15164 T15703 T16577 T17096 T17516 T17836 T18140 T18282 T18304 T18478 T18698a T18698b T18923 T1969 T19695 T20049 T21839c T3064 T4801 T5321FD T5321Fun T5631 T5642 T783 T9198 T9233 T9630 TcPlugin_RewritePerf WWRec ------------------------- - - - - - f4f1f14f by Sylvain Henry at 2023-03-30T01:40:49-04:00 ghc-heap: remove wrong Addr# coercion (#23181) Conversion from Addr# to I# isn't correct with the JS backend. Also used the opportunity to reenable 64-bit Word/Int tests - - - - - a5360490 by Ben Gamari at 2023-03-30T01:41:25-04:00 testsuite: Fix racing prints in T21465 As noted in #23155, we previously failed to add flushes necessary to ensure predictable output. Fixes #23155. - - - - - 98b5cf67 by Matthew Pickering at 2023-03-30T09:58:40+01:00 Revert "ghc-heap: remove wrong Addr# coercion (#23181)" This reverts commit f4f1f14f8009c3c120b8b963ec130cbbc774ec02. This fails to build with GHC-9.2 as a boot compiler. See #23195 for tracking this issue. - - - - - 61a2dfaa by Andrew Lelechenko at 2023-03-30T14:35:57-04:00 Add {-# WARNING #-} to Data.List.{head,tail} - - - - - 8f15c47c by Andrew Lelechenko at 2023-03-30T14:35:57-04:00 Fixes to accomodate Data.List.{head,tail} with {-# WARNING #-} - - - - - 7c7dbade by Andrew Lelechenko at 2023-03-30T14:35:57-04:00 Bump submodules - - - - - d2d8251b by Andrew Lelechenko at 2023-03-30T14:35:57-04:00 Fix tests - - - - - 3d38dcb6 by sheaf at 2023-03-30T14:35:57-04:00 Proxies for head and tail: review suggestions - - - - - 930edcfd by sheaf at 2023-03-30T14:36:33-04:00 docs: move RecordUpd changelog entry to 9.8 This was accidentally included in the 9.6 changelog instead of the 9.6 changelog. - - - - - 6f885e65 by sheaf at 2023-03-30T14:37:09-04:00 Add LANGUAGE GADTs to GHC.Rename.Env We need to enable this extension for the file to compile with ghc 9.2, as we are pattern matching on a GADT and this required the GADT extension to be enabled until 9.4. - - - - - 6d6a37a8 by Cheng Shao at 2023-03-30T18:42:56+00:00 ci: make lint-ci-config job fast again We don't pin our nixpkgs revision and tracks the default nixpkgs-unstable channel anyway. Instead of using haskell.packages.ghc924, we should be using haskell.packages.ghc92 to maximize the binary cache hit rate and make lint-ci-config job fast again. Also bumps the nix docker image to the latest revision. - - - - - ef1548c4 by Cheng Shao at 2023-03-30T18:42:56+00:00 ci: ensure that all non-i386 pipelines do parallel xz compression We can safely enable parallel xz compression for non-i386 pipelines. However, previously we didn't export XZ_OPT, so the xz process won't see it if XZ_OPT hasn't already been set in the current job. - - - - - 20432d16 by Cheng Shao at 2023-03-30T18:42:56+00:00 ci: unset CROSS_EMULATOR for js job - - - - - 4a24dbbe by Cheng Shao at 2023-03-30T18:42:56+00:00 ci: fix lint-testsuite job The list_broken make target will transitively depend on the calibrate.out target, which used STAGE1_GHC instead of TEST_HC. It really should be TEST_HC since that's what get passed in the gitlab CI config. - - - - - cea56ccc by Cheng Shao at 2023-03-30T18:42:56+00:00 ci: use alpine3_17-wasm image for wasm jobs Bump the ci-images dependency and use the new alpine3_17-wasm docker image for wasm jobs. - - - - - 79d0cb32 by Ben Gamari at 2023-03-30T18:43:53+00:00 testsuite/driver: Add basic support for testing cross-compilers - - - - - e7392b4e by Ben Gamari at 2023-03-30T18:43:53+00:00 testsuite/driver: Normalize away differences in ghc executable name - - - - - ee160d06 by Ben Gamari at 2023-03-30T18:43:53+00:00 hadrian: Pass CROSS_EMULATOR to runtests.py - - - - - 30c84511 by Cheng Shao at 2023-03-30T18:43:53+00:00 testsuite: don't add optllvm way for wasm32 - - - - - f1beee36 by Cheng Shao at 2023-03-30T18:43:53+00:00 testsuite: normalize the .wasm extension - - - - - a984a103 by Cheng Shao at 2023-03-30T18:43:53+00:00 testsuite: strip the cross ghc prefix in output and error message - - - - - f7478d95 by Cheng Shao at 2023-03-30T18:43:53+00:00 testsuite: handle target executable extension - - - - - 8fe8b653 by Cheng Shao at 2023-03-30T18:43:53+00:00 testsuite: mypy typing error fixes This patch fixes some mypy typing errors which weren't caught in previous linting jobs. - - - - - 0149f32f by Cheng Shao at 2023-03-30T18:43:53+00:00 testsuite: use context variable instead of thread-local variable This patch changes a thread-local variable to context variable instead, which works as intended when the testsuite transitions to use asyncio & coroutines instead of multi-threading to concurrently run test cases. Note that this also raises the minimum Python version to 3.7. - - - - - ea853ff0 by Cheng Shao at 2023-03-30T18:43:53+00:00 testsuite: asyncify the testsuite driver This patch refactors the testsuite driver, gets rid of multi-threading logic for running test cases concurrently, and uses asyncio & coroutines instead. This is not yak shaving for its own sake; the previous multi-threading logic is prone to livelock/deadlock conditions for some reason, even if the total number of threads is bounded to a thread pool's capacity. The asyncify change is an internal implementation detail of the testsuite driver and does not impact most GHC maintainers out there. The patch does not touch the .T files, test cases can be added/modified the exact same way as before. - - - - - 0077cb22 by Matthew Pickering at 2023-03-31T21:28:28-04:00 Add test for T23184 There was an outright bug, which Simon fixed in July 2021, as a little side-fix on a complicated patch: ``` commit 6656f0165a30fc2a22208532ba384fc8e2f11b46 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Fri Jul 23 23:57:01 2021 +0100 A bunch of changes related to eta reduction This is a large collection of changes all relating to eta reduction, originally triggered by #18993, but there followed a long saga. Specifics: ...lots of lines omitted... Other incidental changes * Fix a fairly long-standing outright bug in the ApplyToVal case of GHC.Core.Opt.Simplify.mkDupableContWithDmds. I was failing to take the tail of 'dmds' in the recursive call, which meant the demands were All Wrong. I have no idea why this has not caused problems before now. ``` Note this "Fix a fairly longstanding outright bug". This is the specific fix ``` @@ -3552,8 +3556,8 @@ mkDupableContWithDmds env dmds -- let a = ...arg... -- in [...hole...] a -- NB: sc_dup /= OkToDup; that is caught earlier by contIsDupable - do { let (dmd:_) = dmds -- Never fails - ; (floats1, cont') <- mkDupableContWithDmds env dmds cont + do { let (dmd:cont_dmds) = dmds -- Never fails + ; (floats1, cont') <- mkDupableContWithDmds env cont_dmds cont ; let env' = env `setInScopeFromF` floats1 ; (_, se', arg') <- simplArg env' dup se arg ; (let_floats2, arg'') <- makeTrivial env NotTopLevel dmd (fsLit "karg") arg' ``` Ticket #23184 is a report of the bug that this diff fixes. - - - - - 62d25071 by mangoiv at 2023-04-01T04:20:01-04:00 [feat] make ($) representation polymorphic - this change was approved by the CLC in [1] following a CLC proposal [2] - make ($) representation polymorphic (adjust the type signature) - change ($) implementation to allow additional polymorphism - adjust the haddock of ($) to reflect these changes - add additional documentation to document these changes - add changelog entry - adjust tests (move now succeeding tests and adjust stdout of some tests) [1] https://github.com/haskell/core-libraries-committee/issues/132#issuecomment-1487456854 [2] https://github.com/haskell/core-libraries-committee/issues/132 - - - - - 77c33fb9 by Artem Pelenitsyn at 2023-04-01T04:20:41-04:00 User Guide: update copyright year: 2020->2023 - - - - - 3b5be05a by doyougnu at 2023-04-01T09:42:31-04:00 driver: Unit State Data.Map -> GHC.Unique.UniqMap In pursuit of #22426. The driver and unit state are major contributors. This commit also bumps the haddock submodule to reflect the API changes in UniqMap. ------------------------- Metric Decrease: MultiComponentModules MultiComponentModulesRecomp T10421 T10547 T12150 T12234 T12425 T13035 T16875 T18140 T18304 T18698a T18698b T18923 T20049 T5837 T6048 T9198 ------------------------- - - - - - a84fba6e by Torsten Schmits at 2023-04-01T09:43:12-04:00 Add structured error messages for GHC.Tc.TyCl Tracking ticket: #20117 MR: !10183 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. - - - - - 6e2eb275 by doyougnu at 2023-04-01T18:27:56-04:00 JS: Linker: use saturated JExpr Follow on to MR!10142 in pursuit of #22736 - - - - - 3da69346 by sheaf at 2023-04-01T18:28:37-04:00 Improve haddocks of template-haskell Con datatype This adds a bit more information, in particular about the lists of constructors in the GadtC and RecGadtC cases. - - - - - 3b7bbb39 by sheaf at 2023-04-01T18:28:37-04:00 TH: revert changes to GadtC & RecGadtC Commit 3f374399 included a breaking-change to the template-haskell library when it made the GadtC and RecGadtC constructors take non-empty lists of names. As this has the potential to break many users' packages, we decided to revert these changes for now. - - - - - f60f6110 by Andrew Lelechenko at 2023-04-02T18:59:30-04:00 Rework documentation for data Char - - - - - 43ebd5dc by Andrew Lelechenko at 2023-04-02T19:00:09-04:00 cmm: implement parsing of MO_AtomicRMW from hand-written CMM files Fixes #23206 - - - - - ab9cd52d by Sylvain Henry at 2023-04-03T08:15:21-04:00 ghc-heap: remove wrong Addr# coercion (#23181) Conversion from Addr# to I# isn't correct with the JS backend. - - - - - 2b2afff3 by Matthew Pickering at 2023-04-03T08:15:58-04:00 hadrian: Update bootstrap plans for 9.2.6, 9.2.7, 9.4.4, 9.4.5, 9.6.1 Also fixes the ./generate_bootstrap_plans script which was recently broken We can hopefully drop the 9.2 plans soon but they still work so kept them around for now. - - - - - c2605e25 by Matthew Pickering at 2023-04-03T08:15:58-04:00 ci: Add job to test 9.6 bootstrapping - - - - - 53e4d513 by Krzysztof Gogolewski at 2023-04-03T08:16:35-04:00 hadrian: Improve option parsing Several options in Hadrian had their argument marked as optional (`OptArg`), but if the argument wasn't there they were just giving an error. It's more idiomatic to mark the argument as required instead; the code uses less Maybes, the parser can enforce that the argument is present, --help gives better output. - - - - - a8e36892 by Sylvain Henry at 2023-04-03T08:17:16-04:00 JS: fix issues with FD api support - Add missing implementations for fcntl_read/write/lock - Fix fdGetMode These were found while implementing TH in !9779. These functions must be used somehow by the external interpreter code. - - - - - 8b092910 by Haskell-mouse at 2023-04-03T19:31:26-04:00 Convert diagnostics in GHC.Rename.HsType to proper TcRnMessage I've turned all occurrences of TcRnUnknownMessage in GHC.Rename.HsType module into a proper TcRnMessage. Instead, these TcRnMessage messages were introduced: TcRnDataKindsError TcRnUnusedQuantifiedTypeVar TcRnIllegalKindSignature TcRnUnexpectedPatSigType TcRnSectionPrecedenceError TcRnPrecedenceParsingError TcRnIllegalKind TcRnNegativeNumTypeLiteral TcRnUnexpectedKindVar TcRnBindMultipleVariables TcRnBindVarAlreadyInScope - - - - - 220a7a48 by Krzysztof Gogolewski at 2023-04-03T19:32:02-04:00 Fixes around unsafeCoerce# 1. `unsafeCoerce#` was documented in `GHC.Prim`. But since the overhaul in 74ad75e87317, `unsafeCoerce#` is no longer defined there. I've combined the documentation in `GHC.Prim` with the `Unsafe.Coerce` module. 2. The documentation of `unsafeCoerce#` stated that you should not cast a function to an algebraic type, even if you later cast it back before applying it. But ghci was doing that type of cast, as can be seen with 'ghci -ddump-ds' and typing 'x = not'. I've changed it to use Any following the documentation. - - - - - 9095e297 by Matthew Craven at 2023-04-04T01:04:10-04:00 Add a few more memcpy-ish primops * copyMutableByteArrayNonOverlapping# * copyAddrToAddr# * copyAddrToAddrNonOverlapping# * setAddrRange# The implementations of copyBytes, moveBytes, and fillBytes in base:Foreign.Marshal.Utils now use these new primops, which can cause us to work a bit harder generating code for them, resulting in the metric increase in T21839c observed by CI on some architectures. But in exchange, we get better code! Metric Increase: T21839c - - - - - f7da530c by Matthew Craven at 2023-04-04T01:04:10-04:00 StgToCmm: Upgrade -fcheck-prim-bounds behavior Fixes #21054. Additionally, we can now check for range overlap when generating Cmm for primops that use memcpy internally. - - - - - cd00e321 by sheaf at 2023-04-04T01:04:50-04:00 Relax assertion in varToRecFieldOcc When using Template Haskell, it is possible to re-parent a field OccName belonging to one data constructor to another data constructor. The lsp-types package did this in order to "extend" a data constructor with additional fields. This ran into an assertion in 'varToRecFieldOcc'. This assertion can simply be relaxed, as the resulting splices are perfectly sound. Fixes #23220 - - - - - eed0d930 by Sylvain Henry at 2023-04-04T11:09:15-04:00 GHCi.RemoteTypes: fix doc and avoid unsafeCoerce (#23201) - - - - - 071139c3 by Ryan Scott at 2023-04-04T11:09:51-04:00 Make INLINE pragmas for pattern synonyms work with TH Previously, the code for converting `INLINE <name>` pragmas from TH splices used `vNameN`, which assumed that `<name>` must live in the variable namespace. Pattern synonyms, on the other hand, live in the constructor namespace. I've fixed the issue by switching to `vcNameN` instead, which works for both the variable and constructor namespaces. Fixes #23203. - - - - - 7c16f3be by Krzysztof Gogolewski at 2023-04-04T17:13:00-04:00 Fix unification with oversaturated type families unify_ty was incorrectly saying that F x y ~ T x are surely apart, where F x y is an oversaturated type family and T x is a tyconapp. As a result, the simplifier dropped a live case alternative (#23134). - - - - - c165f079 by sheaf at 2023-04-04T17:13:40-04:00 Add testcase for #23192 This issue around solving of constraints arising from superclass expansion using other constraints also borned from superclass expansion was the topic of commit aed1974e. That commit made sure we don't emit a "redundant constraint" warning in a situation in which removing the constraint would cause errors. Fixes #23192 - - - - - d1bb16ed by Ben Gamari at 2023-04-06T03:40:45-04:00 nonmoving: Disable slop-zeroing As noted in #23170, the nonmoving GC can race with a mutator zeroing the slop of an updated thunk (in much the same way that two mutators would race). Consequently, we must disable slop-zeroing when the nonmoving GC is in use. Closes #23170 - - - - - 04b80850 by Brandon Chinn at 2023-04-06T03:41:21-04:00 Fix reverse flag for -Wunsupported-llvm-version - - - - - 0c990e13 by Pierre Le Marre at 2023-04-06T10:16:29+00:00 Add release note for GHC.Unicode refactor in base-4.18. Also merge CLC proposal 130 in base-4.19 with CLC proposal 59 in base-4.18 and add proper release date. - - - - - cbbfb283 by Alex Dixon at 2023-04-07T18:27:45-04:00 Improve documentation for ($) (#22963) - - - - - 5193c2b0 by Alex Dixon at 2023-04-07T18:27:45-04:00 Remove trailing whitespace from ($) commentary - - - - - b384523b by Sebastian Graf at 2023-04-07T18:27:45-04:00 Adjust wording wrt representation polymorphism of ($) - - - - - 6a788f0a by Torsten Schmits at 2023-04-07T22:29:28-04:00 Add structured error messages for GHC.Tc.TyCl.Utils Tracking ticket: #20117 MR: !10251 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. - - - - - 3ba77b36 by sheaf at 2023-04-07T22:30:07-04:00 Renamer: don't call addUsedGRE on an exact Name When looking up a record field in GHC.Rename.Env.lookupRecFieldOcc, we could end up calling addUsedGRE on an exact Name, which would then lead to a panic in the bestImport function: it would be incapable of processing a GRE which is not local but also not brought into scope by any imports (as it is referred to by its unique instead). Fixes #23240 - - - - - bc4795d2 by Krzysztof Gogolewski at 2023-04-11T19:24:54-04:00 Add support for -debug in the testsuite Confusingly, GhcDebugged referred to GhcDebugAssertions. - - - - - b7474b57 by Krzysztof Gogolewski at 2023-04-11T19:24:54-04:00 Add missing cases in -Di prettyprinter Fixes #23142 - - - - - 6c392616 by Cheng Shao at 2023-04-11T19:25:31-04:00 compiler: make WasmCodeGenM an instance of MonadUnique - - - - - 05d26a65 by Cheng Shao at 2023-04-11T19:25:31-04:00 compiler: apply cmm node-splitting for wasm backend This patch applies cmm node-splitting for wasm32 NCG, which is required when handling irreducible CFGs. Fixes #23237. - - - - - f1892cc0 by Andrew Lelechenko at 2023-04-11T19:26:09-04:00 Set base 'maintainer' field to CLC - - - - - ecf22da3 by Simon Peyton Jones at 2023-04-11T19:26:45-04:00 Clarify a couple of Notes about 'nospec' - - - - - ebd8918b by Oleg Grenrus at 2023-04-12T12:32:57-04:00 Allow generation of TTH syntax with TH In other words allow generation of typed splices and brackets with Untyped Template Haskell. That is useful in cases where a library is build with TTH in mind, but we still want to generate some auxiliary declarations, where TTH cannot help us, but untyped TH can. Such example is e.g. `staged-sop` which works with TTH, but we would like to derive `Generic` declarations with TH. An alternative approach is to use `unsafeCodeCoerce`, but then the derived `Generic` instances would be type-checked only at use sites, i.e. much later. Also `-ddump-splices` output is quite ugly: user-written instances would use TTH brackets, not `unsafeCodeCoerce`. This commit doesn't allow generating of untyped template splices and brackets with untyped TH, as I don't know why one would want to do that (instead of merging the splices, e.g.) - - - - - 690d0225 by Rodrigo Mesquita at 2023-04-12T12:33:33-04:00 Add regression test for #23229 - - - - - 59321879 by Sylvain Henry at 2023-04-13T08:50:33-04:00 Add quotRem rules (#22152) case quotRemInt# x y of (# q, _ #) -> body ====> case quotInt# x y of q -> body case quotRemInt# x y of (# _, r #) -> body ====> case remInt# x y of r -> body - - - - - 4dd02122 by Sylvain Henry at 2023-04-13T08:50:33-04:00 Add quot folding rule (#22152) (x / l1) / l2 l1 and l2 /= 0 l1*l2 doesn't overflow ==> x / (l1 * l2) - - - - - 1148ac72 by Sylvain Henry at 2023-04-13T08:50:33-04:00 Make Int64/Word64 division ok for speculation too. Only when the divisor is definitely non-zero. - - - - - 8af401cc by Sylvain Henry at 2023-04-13T08:50:33-04:00 Make WordQuotRem2Op ok-for-speculation too - - - - - 27d2978e by Josh Meredith at 2023-04-13T08:51:09-04:00 Base/JS: GHC.JS.Foreign.Callback module (issue 23126) * Add the Callback module for "exporting" Haskell functions to be available to plain JavaScript code * Fix some primitives defined in GHC.JS.Prim * Add a JavaScript section to the user guide with instructions on how to use the JavaScript FFI, building up to using Callbacks to interact with the browser * Add tests for the JavaScript FFI and Callbacks - - - - - a34aa8da by Adam Sandberg Ericsson at 2023-04-14T04:17:52-04:00 rts: improve memory ordering and add some comments in the StablePtr implementation - - - - - d7a768a4 by Matthew Pickering at 2023-04-14T04:18:28-04:00 docs: Generate docs/index.html with version number * Generate docs/index.html to include the version of the ghc library * This also fixes the packageVersions interpolations which were - Missing an interpolation for `LIBRARY_ghc_VERSION` - Double quoting the version so that "9.7" was being inserted. Fixes #23121 - - - - - d48fbfea by Simon Peyton Jones at 2023-04-14T04:19:05-04:00 Stop if type constructors have kind errors Otherwise we get knock-on errors, such as #23252. This makes GHC fail a bit sooner, and I have not attempted to add recovery code, to add a fake TyCon place of the erroneous one, in an attempt to get more type errors in one pass. We could do that (perhaps) if there was a call for it. - - - - - 2371d6b2 by Simon Peyton Jones at 2023-04-14T20:01:02+02:00 Major refactor in the handling of equality constraints This MR substantially refactors the way in which the constraint solver deals with equality constraints. The big thing is: * Intead of a pipeline in which we /first/ canonicalise and /then/ interact (the latter including performing unification) the two steps are more closely integreated into one. That avoids the current rather indirect communication between the two steps. The proximate cause for this refactoring is fixing #22194, which involve solving [W] alpha[2] ~ Maybe (F beta[4]) by doing this: alpha[2] := Maybe delta[2] [W] delta[2] ~ F beta[4] That is, we don't promote beta[4]! This is very like introducing a cycle breaker, and was very awkward to do before, but now it is all nice. See GHC.Tc.Utils.Unify Note [Promotion and level-checking] and Note [Family applications in canonical constraints]. The big change is this: * Several canonicalisation checks (occurs-check, cycle-breaking, checking for concreteness) are combined into one new function: GHC.Tc.Utils.Unify.checkTyEqRhs This function is controlled by `TyEqFlags`, which says what to do for foralls, type families etc. * `canEqCanLHSFinish` now sees if unification is possible, and if so, actually does it: see `canEqCanLHSFinish_try_unification`. There are loads of smaller changes: * The on-the-fly unifier `GHC.Tc.Utils.Unify.unifyType` has a cheap-and-cheerful version of `checkTyEqRhs`, called `simpleUnifyCheck`. If `simpleUnifyCheck` succeeds, it can unify, otherwise it defers by emitting a constraint. This is simpler than before. * I simplified the swapping code in `GHC.Tc.Solver.Equality.canEqCanLHS`. Especially the nasty stuff involving `swap_for_occurs` and `canEqTyVarFunEq`. Much nicer now. See Note [Orienting TyVarLHS/TyFamLHS] Note [Orienting TyFamLHS/TyFamLHS] * Added `cteSkolemOccurs`, `cteConcrete`, and `cteCoercionHole` to the problems that can be discovered by `checkTyEqRhs`. * I fixed #23199 `pickQuantifiablePreds`, which actually allows GHC to to accept both cases in #22194 rather than rejecting both. Yet smaller: * Added a `synIsConcrete` flag to `SynonymTyCon` (alongside `synIsFamFree`) to reduce the need for synonym expansion when checking concreteness. Use it in `isConcreteType`. * Renamed `isConcrete` to `isConcreteType` * Defined `GHC.Core.TyCo.FVs.isInjectiveInType` as a more efficient way to find if a particular type variable is used injectively than finding all the injective variables. It is called in `GHC.Tc.Utils.Unify.definitely_poly`, which in turn is used quite a lot. * Moved `rewriterView` to `GHC.Core.Type`, so we can use it from the constraint solver. Fixes #22194, #23199 Compile times decrease by an average of 0.1%; but there is a 7.4% drop in compiler allocation on T15703. Metric Decrease: T15703 - - - - - 99b2734b by Simon Peyton Jones at 2023-04-14T20:01:02+02:00 Add some documentation about redundant constraints - - - - - 3f2d0eb8 by Simon Peyton Jones at 2023-04-14T20:01:02+02:00 Improve partial signatures This MR fixes #23223. The changes are in two places: * GHC.Tc.Bind.checkMonomorphismRestriction See the new `Note [When the MR applies]` We now no longer stupidly attempt to apply the MR when the user specifies a context, e.g. f :: Eq a => _ -> _ * GHC.Tc.Solver.decideQuantification See rewritten `Note [Constraints in partial type signatures]` Fixing this bug apparently breaks three tests: * partial-sigs/should_compile/T11192 * partial-sigs/should_fail/Defaulting1MROff * partial-sigs/should_fail/T11122 However they are all symptoms of #23232, so I'm marking them as expect_broken(23232). I feel happy about this MR. Nice. - - - - - 23e2a8a0 by Simon Peyton Jones at 2023-04-14T20:01:02+02:00 Make approximateWC a bit cleverer This MR fixes #23224: making approximateWC more clever See the long `Note [ApproximateWC]` in GHC.Tc.Solver All this is delicate and ad-hoc -- but it /has/ to be: we are talking about inferring a type for a binding in the presence of GADTs, type families and whatnot: known difficult territory. We just try as hard as we can. - - - - - 2c040246 by Matthew Pickering at 2023-04-15T00:57:14-04:00 docs: Update template-haskell docs to use Code Q a rather than Q (TExp a) Since GHC Proposal #195, the type of [|| ... ||] has been Code Q a rather than Q (TExp a). The documentation in the `template-haskell` library wasn't updated to reflect this change. Fixes #23148 - - - - - 0da18eb7 by Krzysztof Gogolewski at 2023-04-15T14:35:53+02:00 Show an error when we cannot default a concrete tyvar Fixes #23153 - - - - - bad2f8b8 by sheaf at 2023-04-15T15:14:36+02:00 Handle ConcreteTvs in inferResultToType inferResultToType was discarding the ir_frr information, which meant some metavariables ended up being MetaTvs instead of ConcreteTvs. This function now creates new ConcreteTvs as necessary, instead of always creating MetaTvs. Fixes #23154 - - - - - 3b0ea480 by Simon Peyton Jones at 2023-04-16T18:12:20-04:00 Transfer DFunId_ness onto specialised bindings Whether a binding is a DFunId or not has consequences for the `-fdicts-strict` flag, essentially if we are doing demand analysis for a DFunId then `-fdicts-strict` does not apply because the constraint solver can create recursive groups of dictionaries. In #22549 this was fixed for the "normal" case, see Note [Do not strictify the argument dictionaries of a dfun]. However the loop still existed if the DFunId was being specialised. The problem was that the specialiser would specialise a DFunId and turn it into a VanillaId and so the demand analyser didn't know to apply special treatment to the binding anymore and the whole recursive group was optimised to bottom. The solution is to transfer over the DFunId-ness of the binding in the specialiser so that the demand analyser knows not to apply the `-fstrict-dicts`. Fixes #22549 - - - - - a1371ebb by Oleg Grenrus at 2023-04-16T18:12:59-04:00 Add import lists to few GHC.Driver.Session imports Related to https://gitlab.haskell.org/ghc/ghc/-/issues/23261. There are a lot of GHC.Driver.Session which only use DynFlags, but not the parsing code. - - - - - 51479ceb by Matthew Pickering at 2023-04-17T08:08:48-04:00 Account for special GHC.Prim import in warnUnusedPackages The GHC.Prim import is treated quite specially primarily because there isn't an interface file for GHC.Prim. Therefore we record separately in the ModSummary if it's imported or not so we don't go looking for it. This logic hasn't made it's way to `-Wunused-packages` so if you imported GHC.Prim then the warning would complain you didn't use `-package ghc-prim`. Fixes #23212 - - - - - 1532a8b2 by Simon Peyton Jones at 2023-04-17T08:09:24-04:00 Add regression test for #23199 - - - - - 0158c5f1 by Ryan Scott at 2023-04-17T18:43:27-04:00 validDerivPred: Reject exotic constraints in IrredPreds This brings the `IrredPred` case in sync with the treatment of `ClassPred`s as described in `Note [Valid 'deriving' predicate]` in `GHC.Tc.Validity`. Namely, we should reject `IrredPred`s that are inferred from `deriving` clauses whose arguments contain other type constructors, as described in `(VD2) Reject exotic constraints` of that Note. This has the nice property that `deriving` clauses whose inferred instance context mention `TypeError` will now emit the type error in the resulting error message, which better matches existing intuitions about how `TypeError` should work. While I was in town, I noticed that much of `Note [Valid 'deriving' predicate]` was duplicated in a separate `Note [Exotic derived instance contexts]` in `GHC.Tc.Deriv.Infer`. I decided to fold the latter Note into the former so that there is a single authority on describing the conditions under which an inferred `deriving` constraint can be considered valid. This changes the behavior of `deriving` in a way that existing code might break, so I have made a mention of this in the GHC User's Guide. It seems very, very unlikely that much code is relying on this strange behavior, however, and even if there is, there is a clear, backwards-compatible migration path using `StandaloneDeriving`. Fixes #22696. - - - - - 10364818 by Krzysztof Gogolewski at 2023-04-17T18:44:03-04:00 Misc cleanup - Use dedicated list functions - Make cloneBndrs and cloneRecIdBndrs monadic - Fix invalid haddock comments in libraries/base - - - - - 5e1d33d7 by Matthew Pickering at 2023-04-18T10:31:02-04:00 Convert interface file loading errors into proper diagnostics This patch converts all the errors to do with loading interface files into proper structured diagnostics. * DriverMessage: Sometimes in the driver we attempt to load an interface file so we embed the IfaceMessage into the DriverMessage. * TcRnMessage: Most the time we are loading interface files during typechecking, so we embed the IfaceMessage This patch also removes the TcRnInterfaceLookupError constructor which is superceded by the IfaceMessage, which is now structured compared to just storing an SDoc before. - - - - - df1a5811 by sheaf at 2023-04-18T10:31:43-04:00 Don't panic in ltPatersonSize The function GHC.Tc.Utils.TcType.ltPatersonSize would panic when it encountered a type family on the RHS, as usually these are not allowed (type families are not allowed on the RHS of class instances or of quantified constraints). However, it is possible to still encounter type families on the RHS after doing a bit of constraint solving, as seen in test case T23171. This could trigger the panic in the call to ltPatersonSize in GHC.Tc.Solver.Canonical.mk_strict_superclasses, which is involved in avoiding loopy superclass constraints. This patch simply changes ltPatersonSize to return "I don't know, because there's a type family involved" in these cases. Fixes #23171 - - - - - d442ac05 by Sylvain Henry at 2023-04-19T20:04:35-04:00 JS: fix thread-related primops - - - - - 7a96f90b by Bryan Richter at 2023-04-19T20:05:11-04:00 CI: Disable abi-test-nightly See #23269 - - - - - ab6c1d29 by Sylvain Henry at 2023-04-19T20:05:50-04:00 Testsuite: don't use obsolescent egrep (#22351) Recent egrep displays the following message, breaking golden tests: egrep: warning: egrep is obsolescent; using grep -E Switch to using "grep -E" instead - - - - - 7866fc86 by Ben Orchard at 2023-04-20T11:29:33+02:00 update classify with new tokens - - - - - f15b0ce5 by Matthew Pickering at 2023-04-20T11:01:06-04:00 hadrian: Pass haddock file arguments in a response file In !10119 CI was failing on windows because the command line was too long. We can mitigate this by passing the file arguments to haddock in a response file. We can't easily pass all the arguments in a response file because the `+RTS` arguments can't be placed in the response file. Fixes #23273 - - - - - 7012ec2f by tocic at 2023-04-20T11:01:42-04:00 Fix doc typo in GHC.Read.readList - - - - - 5c873124 by sheaf at 2023-04-20T18:33:34-04:00 Implement -jsem: parallelism controlled by semaphores See https://github.com/ghc-proposals/ghc-proposals/pull/540/ for a complete description for the motivation for this feature. The `-jsem` option allows a build tool to pass a semaphore to GHC which GHC can use in order to control how much parallelism it requests. GHC itself acts as a client in the GHC jobserver protocol. ``` GHC Jobserver Protocol ~~~~~~~~~~~~~~~~~~~~~~ This proposal introduces the GHC Jobserver Protocol. This protocol allows a server to dynamically invoke many instances of a client process, while restricting all of those instances to use no more than <n> capabilities. This is achieved by coordination over a system semaphore (either a POSIX semaphore [6]_ in the case of Linux and Darwin, or a Win32 semaphore [7]_ in the case of Windows platforms). There are two kinds of participants in the GHC Jobserver protocol: - The *jobserver* creates a system semaphore with a certain number of available tokens. Each time the jobserver wants to spawn a new jobclient subprocess, it **must** first acquire a single token from the semaphore, before spawning the subprocess. This token **must** be released once the subprocess terminates. Once work is finished, the jobserver **must** destroy the semaphore it created. - A *jobclient* is a subprocess spawned by the jobserver or another jobclient. Each jobclient starts with one available token (its *implicit token*, which was acquired by the parent which spawned it), and can request more tokens through the Jobserver Protocol by waiting on the semaphore. Each time a jobclient wants to spawn a new jobclient subprocess, it **must** pass on a single token to the child jobclient. This token can either be the jobclient's implicit token, or another token which the jobclient acquired from the semaphore. Each jobclient **must** release exactly as many tokens as it has acquired from the semaphore (this does not include the implicit tokens). ``` Build tools such as cabal act as jobservers in the protocol and are responsibile for correctly creating, cleaning up and managing the semaphore. Adds a new submodule (semaphore-compat) for managing and interacting with semaphores in a cross-platform way. Fixes #19349 - - - - - 52d3e9b4 by Ben Gamari at 2023-04-20T18:34:11-04:00 rts: Initialize Array# header in listThreads# Previously the implementation of listThreads# failed to initialize the header of the created array, leading to various nastiness. Fixes #23071 - - - - - 1db30fe1 by Ben Gamari at 2023-04-20T18:34:11-04:00 testsuite: Add test for #23071 - - - - - dae514f9 by tocic at 2023-04-21T13:31:21-04:00 Fix doc typos in libraries/base/GHC - - - - - 113e21d7 by Sylvain Henry at 2023-04-21T13:32:01-04:00 Testsuite: replace some js_broken/js_skip predicates with req_c Using req_c is more precise. - - - - - 038bb031 by Krzysztof Gogolewski at 2023-04-21T18:03:04-04:00 Minor doc fixes - Add docs/index.html to .gitignore. It is created by ./hadrian/build docs, and it was the only file in Hadrian's templateRules not present in .gitignore. - Mention that MultiWayIf supports non-boolean guards - Remove documentation of optdll - removed in 2007, 763daed95 - Fix markdown syntax - - - - - e826cdb2 by amesgen at 2023-04-21T18:03:44-04:00 User's guide: DeepSubsumption is implied by Haskell{98,2010} - - - - - 499a1c20 by PHO at 2023-04-23T13:39:32-04:00 Implement executablePath for Solaris and make getBaseDir less platform-dependent Use base-4.17 executablePath when possible, and fall back on getExecutablePath when it's not available. The sole reason why getBaseDir had #ifdef's was apparently that getExecutablePath wasn't reliable, and we could reduce the number of CPP conditionals by making use of executablePath instead. Also export executablePath on js_HOST_ARCH. - - - - - 97a6f7bc by tocic at 2023-04-23T13:40:08-04:00 Fix doc typos in libraries/base - - - - - ffcdd683 by Finley McIlwaine at 2023-04-24T09:36:18-06:00 Remove index-state - - - - - 787c6e8c by Ben Gamari at 2023-04-24T12:19:06-04:00 testsuite/T20137: Avoid impl.-defined behavior Previously we would cast pointers to uint64_t. However, implementations are allowed to either zero- or sign-extend such casts. Instead cast to uintptr_t to avoid this. Fixes #23247. - - - - - 87095f6a by Cheng Shao at 2023-04-24T12:19:44-04:00 rts: always build 64-bit atomic ops This patch does a few things: - Always build 64-bit atomic ops in rts/ghc-prim, even on 32-bit platforms - Remove legacy "64bit" cabal flag of rts package - Fix hs_xchg64 function prototype for 32-bit platforms - Fix AtomicFetch test for wasm32 - - - - - 2685a12d by Cheng Shao at 2023-04-24T12:20:21-04:00 compiler: don't install signal handlers when the host platform doesn't have signals Previously, large parts of GHC API will transitively invoke withSignalHandlers, which doesn't work on host platforms without signal functionality at all (e.g. wasm32-wasi). By making withSignalHandlers a no-op on those platforms, we can make more parts of GHC API work out of the box when signals aren't supported. - - - - - 1338b7a3 by Cheng Shao at 2023-04-24T16:21:30-04:00 hadrian: fix non-ghc program paths passed to testsuite driver when testing cross GHC - - - - - 1a10f556 by Andrew Lelechenko at 2023-04-24T16:22:09-04:00 Add since pragma to Data.Functor.unzip - - - - - 0da9e882 by Soham Chowdhury at 2023-04-25T00:15:22-04:00 More informative errors for bad imports (#21826) - - - - - ebd5b078 by Josh Meredith at 2023-04-25T00:15:58-04:00 JS/base: provide implementation for mkdir (issue 22374) - - - - - 8f656188 by Josh Meredith at 2023-04-25T18:12:38-04:00 JS: Fix h$base_access implementation (issue 22576) - - - - - 74c55712 by Andrei Borzenkov at 2023-04-25T18:13:19-04:00 Give more guarntees about ImplicitParams (#23289) - Added new section in the GHC user's guide that legends behavior of nested implicit parameter bindings in these two cases: let ?f = 1 in let ?f = 2 in ?f and data T where MkT :: (?f :: Int) => T f :: T -> T -> Int f MkT MkT = ?f - Added new test case to examine this behavior. - - - - - 05b70982 by Finley McIlwaine at 2023-04-26T08:16:31-06:00 `renameInterface` space leak fixes - Change logic for accumulation of names for which link warnings will be generated - Change handling of `--ignore-link-symbol` to allow qualified and unqualified names. Added to CHANGES.md - Some formatting changes and comments here and there - - - - - c30ac25f by Sebastian Graf at 2023-04-26T14:50:51-04:00 DmdAnal: Unleash demand signatures of free RULE and unfolding binders (#23208) In #23208 we observed that the demand signature of a binder occuring in a RULE wasn't unleashed, leading to a transitively used binder being discarded as absent. The solution was to use the same code path that we already use for handling exported bindings. See the changes to `Note [Absence analysis for stable unfoldings and RULES]` for more details. I took the chance to factor out the old notion of a `PlusDmdArg` (a pair of a `VarEnv Demand` and a `Divergence`) into `DmdEnv`, which fits nicely into our existing framework. As a result, I had to touch quite a few places in the code. This refactoring exposed a few small bugs around correct handling of bottoming demand environments. As a result, some strictness signatures now mention uniques that weren't there before which caused test output changes to T13143, T19969 and T22112. But these tests compared whole -ddump-simpl listings which is a very fragile thing to begin with. I changed what exactly they test for based on the symptoms in the corresponding issues. There is a single regression in T18894 because we are more conservative around stable unfoldings now. Unfortunately it is not easily fixed; let's wait until there is a concrete motivation before invest more time. Fixes #23208. - - - - - 77f506b8 by Josh Meredith at 2023-04-26T14:51:28-04:00 Refactor GenStgRhs to include the Type in both constructors (#23280, #22576, #22364) Carry the actual type of an expression through the PreStgRhs and into GenStgRhs for use in later stages. Currently this is used in the JavaScript backend to fix some tests from the above mentioned issues: EtaExpandLevPoly, RepPolyWrappedVar2, T13822, T14749. - - - - - 052e2bb6 by Alan Zimmerman at 2023-04-26T14:52:05-04:00 EPA: Use ExplicitBraces only in HsModule !9018 brought in exact print annotations in LayoutInfo for open and close braces at the top level. But it retained them in the HsModule annotations too. Remove the originals, so exact printing uses LayoutInfo - - - - - d5c4629b by Cheng Shao at 2023-04-27T16:00:35-04:00 ci: update ci.sh to actually run the entire testsuite for wasm backend For the time being, we still need to use in-tree mode and can't test the bindist yet. - - - - - 533d075e by Cheng Shao at 2023-04-27T16:00:35-04:00 ci: additional wasm32 manual jobs in validate pipelines This patch enables bignum native & unregisterised wasm32 jobs as manual jobs in validate pipelines, which can be useful to prevent breakage when working on wasm32 related patches. - - - - - b5f00811 by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: fix cross prefix stripping This patch fixes cross prefix stripping in the testsuite driver. The normalization logic used to only handle prefixes of the triple form <arch>-<vendor>-<os>, now it's relaxed to allow any number of tokens in the prefix tuple, so the cross prefix stripping logic would work when ghc is configured with something like --target=wasm32-wasi. - - - - - 6f511c36 by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: include target exe extension in heap profile filenames This patch fixes hp2ps related framework failures when testing the wasm backend by including target exe extension in heap profile filenames. - - - - - e6416b10 by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: exclude ghci ways if no rts linker is present This patch implements logic to automatically exclude ghci ways when there is no rts linker. It's way better than having to annotate individual test cases. - - - - - 791cce64 by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: fix permission bits in copy_files When the testsuite driver copy files instead of symlinking them, it should also copy the permission bits, otherwise there'll be permission denied errors. Also, enforce file copying when testing wasm32, since wasmtime doesn't handle host symlinks quite well (https://github.com/bytecodealliance/wasmtime/issues/6227). - - - - - aa6afe8a by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: add the req_ghc_with_threaded_rts predicate This patch adds the req_ghc_with_threaded_rts predicate to the testsuite to assert the platform has threaded RTS, and mark some tests as req_ghc_with_threaded_rts. Also makes ghc_with_threaded_rts a config field instead of a global variable. - - - - - ce580426 by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: add the req_process predicate This patch adds the req_process predicate to the testsuite to assert the platform has a process model, also marking tests that involve spawning processes as req_process. Also bumps hpc & process submodule. - - - - - cb933665 by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: add the req_host_target_ghc predicate This patch adds the req_host_target_ghc predicate to the testsuite to assert the ghc compiler being tested can compile both host/target code. When testing cross GHCs this is not supported yet, but it may change in the future. - - - - - b174a110 by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: add missing annotations for some tests This patch adds missing annotations (req_th, req_dynamic_lib_support, req_rts_linker) to some tests. They were discovered when testing wasm32, though it's better to be explicit about what features they require, rather than simply adding when(arch('wasm32'), skip). - - - - - bd2bfdec by Cheng Shao at 2023-04-27T16:00:35-04:00 testsuite: wasm32-specific fixes This patch includes all wasm32-specific testsuite fixes. - - - - - 4eaf2c2a by Josh Meredith at 2023-04-27T16:01:11-04:00 JS: change GHC.JS.Transform.identsS/E/V to take a saturated IR (#23304) - - - - - e5697d7c by Finley McIlwaine at 2023-04-27T18:46:36-06:00 Messy things - ghc-debug dependency and instrumentation - cabal.project custom with-compiler - hie.yaml files - traces and such - - - - - 57277662 by sheaf at 2023-04-29T20:23:06+02:00 Add the Unsatisfiable class This commit implements GHC proposal #433, adding the Unsatisfiable class to the GHC.TypeError module. This provides an alternative to TypeError for which error reporting is more predictable: we report it when we are reporting unsolved Wanted constraints. Fixes #14983 #16249 #16906 #18310 #20835 - - - - - 00a8a5ff by Torsten Schmits at 2023-04-30T03:45:09-04:00 Add structured error messages for GHC.Rename.Names Tracking ticket: #20115 MR: !10336 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. - - - - - 0b8ef80b by Finley McIlwaine at 2023-05-02T18:08:52-06:00 Stop retaining GRE closures GRE closures should never be necessary to Haddock, so we never want to keep them on the heap. Despite that, they are retained by a lot of the data structures that Haddock makes use of. - Attempt to fix that situation by adding strictness to various computations and pruning the `ifaceInstances` field of `Interface` to a much thinner data type. - Removes the `ifaceFamInstances` field, as it was never used. - Move some of the attach instances types (e.g. `SimpleType`) to the types module - - - - - 931c8d82 by Ben Orchard at 2023-05-03T20:16:18-04:00 Add sized primitive literal syntax Adds a new LANGUAGE pragma ExtendedLiterals, which enables defining unboxed numeric literals such as `0xFF#Word8 :: Word8#`. Implements GHC proposal 0451: https://github.com/ghc-proposals/ghc-proposals/blob/b384a538b34f79d18a0201455b7b3c473bc8c936/proposals/0451-sized-literals.rst Fixes #21422. Bumps haddock submodule. Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> - - - - - f3460845 by Andrew Lelechenko at 2023-05-03T20:16:57-04:00 Document instances of Double - - - - - 1e9caa1a by Sylvain Henry at 2023-05-03T20:17:37-04:00 Bump Cabal submodule (#22356) - - - - - 4eafb52a by sheaf at 2023-05-03T20:18:16-04:00 Don't forget to check the parent in an export list Commit 3f374399 introduced a bug which caused us to forget to include the parent of an export item of the form T(..) (that is, IEThingAll) when checking for duplicate exports. Fixes #23318 - - - - - 8fde4ac8 by amesgen at 2023-05-03T20:18:57-04:00 Fix unlit path in cross bindists - - - - - 8cc9a534 by Matthew Pickering at 2023-05-04T14:58:14-04:00 hadrian: Flavour: Change args -> extraArgs Previously in a flavour definition you could override all the flags which were passed to GHC. This causes issues when needed to compute a package hash because we need to know what these extra arguments are going to be before computing the hash. The solution is to modify flavour so that the arguments you pass here are just extra ones rather than all the arguments that you need to compile something. This makes things work more like how cabal.project files work when you give extra arguments to a package and also means that flavour transformers correctly affect the hash. - - - - - 3fdb18f8 by romes at 2023-05-04T14:58:14-04:00 Hardwire a better unit-id for ghc Previously, the unit-id of ghc-the-library was fixed as `ghc`. This was done primarily because the compiler must know the unit-id of some packages (including ghc) a-priori to define wired-in names. However, as seen in #20742, a reinstallable `ghc` whose unit-id is fixed to `ghc` might result in subtle bugs when different ghc's interact. A good example of this is having GHC_A load a plugin compiled by GHC_B, where GHC_A and GHC_B are linked to ghc-libraries that are ABI incompatible. Without a distinction between the unit-id of the ghc library GHC_A is linked against and the ghc library the plugin it is loading was compiled against, we can't check compatibility. This patch gives a slightly better unit-id to ghc (ghc-version) by (1) Not setting -this-unit-id to ghc, but rather to the new unit-id (modulo stage0) (2) Adding a definition to `GHC.Settings.Config` whose value is the new unit-id. (2.1) `GHC.Settings.Config` is generated by Hadrian (2.2) and also by cabal through `compiler/Setup.hs` This unit-id definition is imported by `GHC.Unit.Types` and used to set the wired-in unit-id of "ghc", which was previously fixed to "ghc" The commits following this one will improve the unit-id with a cabal-style package hash and check compatibility when loading plugins. Note that we also ensure that ghc's unit key matches unit id both when hadrian or cabal builds ghc, and in this way we no longer need to add `ghc` to the WiringMap. - - - - - 6689c9c6 by romes at 2023-05-04T14:58:14-04:00 Validate compatibility of ghcs when loading plugins Ensure, when loading plugins, that the ghc the plugin depends on is the ghc loading the plugin -- otherwise fail to load the plugin. Progress towards #20742. - - - - - db4be339 by romes at 2023-05-04T14:58:14-04:00 Add hashes to unit-ids created by hadrian This commit adds support for computing an inputs hash for packages compiled by hadrian. The result is that ABI incompatible packages should be given different hashes and therefore be distinct in a cabal store. Hashing is enabled by the `--flag`, and is off by default as the hash contains a hash of the source files. We enable it when we produce release builds so that the artifacts we distribute have the right unit ids. - - - - - 944a9b94 by Matthew Pickering at 2023-05-04T14:58:14-04:00 Use hash-unit-ids in release jobs Includes fix upload_ghc_libs glob - - - - - 116d7312 by Josh Meredith at 2023-05-04T14:58:51-04:00 JS: fix bounds checking (Issue 23123) * For ByteArray-based bounds-checking, the JavaScript backend must use the `len` field, instead of the inbuild JavaScript `length` field. * Range-based operations must also check both the start and end of the range for bounds * All indicies are valid for ranges of size zero, since they are essentially no-ops * For cases of ByteArray accesses (e.g. read as Int), the end index is (i * sizeof(type) + sizeof(type) - 1), while the previous implementation uses (i + sizeof(type) - 1). In the Int32 example, this is (i * 4 + 3) * IndexByteArrayOp_Word8As* primitives use byte array indicies (unlike the previous point), but now check both start and end indicies * Byte array copies now check if the arrays are the same by identity and then if the ranges overlap. - - - - - 2d5c1dde by Sylvain Henry at 2023-05-04T14:58:51-04:00 Fix remaining issues with bound checking (#23123) While fixing these I've also changed the way we store addresses into ByteArray#. Addr# are composed of two parts: a JavaScript array and an offset (32-bit number). Suppose we want to store an Addr# in a ByteArray# foo at offset i. Before this patch, we were storing both fields as a tuple in the "arr" array field: foo.arr[i] = [addr_arr, addr_offset]; Now we only store the array part in the "arr" field and the offset directly in the array: foo.dv.setInt32(i, addr_offset): foo.arr[i] = addr_arr; It avoids wasting space for the tuple. - - - - - 98c5ee45 by Luite Stegeman at 2023-05-04T14:59:31-04:00 JavaScript: Correct arguments to h$appendToHsStringA fixes #23278 - - - - - ca611447 by Josh Meredith at 2023-05-04T15:00:07-04:00 base/encoding: add an allocations performance test (#22946) - - - - - e3ddf58d by Krzysztof Gogolewski at 2023-05-04T15:00:44-04:00 linear types: Don't add external names to the usage env This has no observable effect, but avoids storing useless data. - - - - - b3226616 by Andrei Borzenkov at 2023-05-04T15:01:25-04:00 Improved documentation for the Data.OldList.nub function There was recomentation to use map head . group . sort instead of nub function, but containers library has more suitable and efficient analogue - - - - - e8b72ff6 by Ryan Scott at 2023-05-04T15:02:02-04:00 Fix type variable substitution in gen_Newtype_fam_insts Previously, `gen_Newtype_fam_insts` was substituting the type variable binders of a type family instance using `substTyVars`, which failed to take type variable dependencies into account. There is similar code in `GHC.Tc.TyCl.Class.tcATDefault` that _does_ perform this substitution properly, so this patch: 1. Factors out this code into a top-level `substATBndrs` function, and 2. Uses `substATBndrs` in `gen_Newtype_fam_insts`. Fixes #23329. - - - - - 275836d2 by Torsten Schmits at 2023-05-05T08:43:02+00:00 Add structured error messages for GHC.Rename.Utils Tracking ticket: #20115 MR: !10350 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. - - - - - 983ce558 by Oleg Grenrus at 2023-05-05T13:11:29-04:00 Use TemplateHaskellQuotes in TH.Syntax to construct Names - - - - - a5174a59 by Matthew Pickering at 2023-05-05T18:42:31-04:00 driver: Use hooks from plugin_hsc_env This fixes a bug in oneshot mode where hooks modified in a plugin wouldn't be used in oneshot mode because we neglected to use the right hsc_env. This was observed by @csabahruska. - - - - - 18a7d03d by Aaron Allen at 2023-05-05T18:42:31-04:00 Rework plugin initialisation points In general this patch pushes plugin initialisation points to earlier in the pipeline. As plugins can modify the `HscEnv`, it's imperative that the plugins are initialised as soon as possible and used thereafter. For example, there are some new tests which modify hsc_logger and other hooks which failed to fire before (and now do) One consequence of this change is that the error for specifying the usage of a HPT plugin from the command line has changed, because it's now attempted to be loaded at initialisation rather than causing a cyclic module import. Closes #21279 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 6e776ed3 by Matthew Pickering at 2023-05-05T18:42:31-04:00 docs: Add Note [Timing of plugin initialization] - - - - - e1df8511 by Matthew Pickering at 2023-05-05T18:43:07-04:00 Incrementally update ghcup metadata in ghc/ghcup-metadata This job paves the way for distributing nightly builds * A new repo https://gitlab.haskell.org/ghc/ghcup-metadata stores the metadata on the "updates" branch. * Each night this metadata is downloaded and the nightly builds are appended to the end of the metadata. * The update job only runs on the scheduled nightly pipeline, not just when NIGHTLY=1. Things which are not done yet * Modify the retention policy for nightly jobs * Think about building release flavour compilers to distribute nightly. Fixes #23334 - - - - - 8f303d27 by Rodrigo Mesquita at 2023-05-05T22:04:31-04:00 docs: Remove mentions of ArrayArray# from unlifted FFI section Fixes #23277 - - - - - 994bda56 by Torsten Schmits at 2023-05-05T22:05:12-04:00 Add structured error messages for GHC.Rename.Module Tracking ticket: #20115 MR: !10361 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. Only addresses the single warning missing from the previous MR. - - - - - 3e3a6be4 by Ben Gamari at 2023-05-08T12:15:19+00:00 rts: Fix data-race in hs_init_ghc As noticed by @Terrorjack, `hs_init_ghc` previously used non-atomic increment/decrement on the RTS's initialization count. This may go wrong in a multithreaded program which initializes the runtime multiple times. Closes #22756. - - - - - 8bda991b by Finley McIlwaine at 2023-05-08T16:07:51-06:00 Memory usage fixes - Refactor `ifaceDeclMap` to drastically reduce memory footprint. We no longer store all declarations associated with a given name, since we only cared to determine if the only declaration associated with a name was a value declaration. Change the `DeclMap` type to better reflect this. - Drop pre-renaming export items after the renaming step. Since the Hoogle backend used the pre-renamed export items, this isn't trivial. We now generate Hoogle output for exported declarations during the renaming step (if Hoogle output /should/ be generated), and store that with the renamed export item. - Slightly refactor Hoogle backend to handle the above change and allow for early generation of Hoogle output. - Remove the `ifaceRnDocMap` and `ifaceRnArgMap` fields of the `Interface` type, as they were never used. - Remove some unnecessary strictness - Remove a lot of dead code from `Syb` module - - - - - 78c8dc50 by Torsten Schmits at 2023-05-08T21:41:51-04:00 Add structured error messages for GHC.IfaceToCore Tracking ticket: #20114 MR: !10390 This converts uses of `mkTcRnUnknownMessage` to newly added constructors of `TcRnMessage`. - - - - - 0e2df4c9 by Bryan Richter at 2023-05-09T12:03:35+03:00 Fix up rules for ghcup-metadata-nightly-push - - - - - b970e64f by Ben Gamari at 2023-05-09T08:41:33-04:00 testsuite: Add test for atomicSwapIORef - - - - - 81cfefd2 by Ben Gamari at 2023-05-09T08:41:53-04:00 compiler: Implement atomicSwapIORef with xchg As requested by @treeowl in CLC#139. - - - - - 6b29154d by Ben Gamari at 2023-05-09T08:41:53-04:00 Make atomicSwapMutVar# an inline primop - - - - - 1611ac0c by Finley McIlwaine at 2023-05-09T11:51:57-06:00 Unify ErrMsgM and IfM - Delete ErrMsgM, stop accumulating warnings in a writer - Make IfM a state monad, print warnings directly to stdout, move IfM type into types module - Drop ErrMsg = String synonym - Unset IORefs from plugin after they are read, preventing unnecessary retention of interfaces - - - - - 64064cfe by doyougnu at 2023-05-09T18:40:01-04:00 JS: add GHC.JS.Optimizer, remove RTS.Printer, add Linker.Opt This MR changes some simple optimizations and is a first step in re-architecting the JS backend pipeline to add the optimizer. In particular it: - removes simple peep hole optimizations from `GHC.StgToJS.Printer` and removes that module - adds module `GHC.JS.Optimizer` - defines the same peep hole opts that were removed only now they are `Syntax -> Syntax` transformations rather than `Syntax -> JS code` optimizations - hooks the optimizer into code gen - adds FuncStat and ForStat constructors to the backend. Working Ticket: - #22736 Related MRs: - MR !10142 - MR !10000 ------------------------- Metric Decrease: CoOpt_Read ManyAlternatives PmSeriesS PmSeriesT PmSeriesV T10421 T12707 T13253 T13253-spj T15164 T17516 T18140 T18282 T18698a T18698b T18923 T1969 T19695 T20049 T3064 T5321FD T5321Fun T783 T9198 T9233 T9630 ------------------------- - - - - - 6738c01d by Krzysztof Gogolewski at 2023-05-09T18:40:38-04:00 Add a regression test for #21050 - - - - - b2cdb7da by Ben Gamari at 2023-05-09T18:41:14-04:00 nonmoving: Account for mutator allocations in bytes_allocated Previously we failed to account direct mutator allocations into the nonmoving heap against the mutator's allocation limit and `cap->total_allocated`. This only manifests during CAF evaluation (since we allocate the CAF's blackhole directly into the nonmoving heap). Fixes #23312. - - - - - 0657b482 by Sven Tennie at 2023-05-09T22:22:42-04:00 Adjust AArch64 stackFrameHeaderSize The prologue of each stack frame are the saved LR and FP registers, 8 byte each. I.e. the size of the stack frame header is 2 * 8 byte. - - - - - 7788c09c by konsumlamm at 2023-05-09T22:23:23-04:00 Make `(&)` representation polymorphic in the return type - - - - - b3195922 by Ben Gamari at 2023-05-10T05:06:45-04:00 ghc-prim: Generalize keepAlive#/touch# in state token type Closes #23163. - - - - - 1e6861dd by Cheng Shao at 2023-05-10T05:07:25-04:00 Bump hsc2hs submodule Fixes #22981. - - - - - 0a513952 by Ben Gamari at 2023-05-11T04:10:17-04:00 base: Export GHC.Conc.Sync.fromThreadId Closes #22706. - - - - - 29be39ba by Matthew Pickering at 2023-05-11T04:10:54-04:00 Build vanilla alpine bindists We currently attempt to build and distribute fully static alpine bindists (ones which could be used on any linux platform) but most people who use the alpine bindists want to use alpine to build their own static applications (for which a fully static bindist is not necessary). We should build and distribute these bindists for these users whilst the fully-static bindist is still unusable. Fixes #23349 - - - - - 40c7daed by Simon Peyton Jones at 2023-05-11T04:11:30-04:00 Look both ways when looking for quantified equalities When looking up (t1 ~# t2) in the quantified constraints, check both orientations. Forgetting this led to #23333. - - - - - c17bb82f by Rodrigo Mesquita at 2023-05-11T04:12:07-04:00 Move "target has RTS linker" out of settings We move the "target has RTS linker" information out of configure into a predicate in GHC, and remove this option from the settings file where it is unnecessary -- it's information statically known from the platform. Note that previously we would consider `powerpc`s and `s390x`s other than `powerpc-ibm-aix*` and `s390x-ibm-linux` to have an RTS linker, but the RTS linker supports neither platform. Closes #23361 - - - - - bd0b056e by Krzysztof Gogolewski at 2023-05-11T04:12:44-04:00 Add a test for #17284 Since !10123 we now reject this program. - - - - - 630b1fea by Andrew Lelechenko at 2023-05-11T04:13:24-04:00 Document unlawfulness of instance Num Fixed Fixes #22712 - - - - - 87eebf98 by sheaf at 2023-05-11T11:55:22-04:00 Add fused multiply-add instructions This patch adds eight new primops that fuse a multiplication and an addition or subtraction: - `{fmadd,fmsub,fnmadd,fnmsub}{Float,Double}#` fmadd x y z is x * y + z, computed with a single rounding step. This patch implements code generation for these primops in the following backends: - X86, AArch64 and PowerPC NCG, - LLVM - C WASM uses the C implementation. The primops are unsupported in the JavaScript backend. The following constant folding rules are also provided: - compute a * b + c when a, b, c are all literals, - x * y + 0 ==> x * y, - ±1 * y + z ==> z ± y and x * ±1 + z ==> z ± x. NB: the constant folding rules incorrectly handle signed zero. This is a known limitation with GHC's floating-point constant folding rules (#21227), which we hope to resolve in the future. - - - - - ad16a066 by Krzysztof Gogolewski at 2023-05-11T11:55:59-04:00 Add a test for #21278 - - - - - 05cea68c by Matthew Pickering at 2023-05-11T11:56:36-04:00 rts: Refine memory retention behaviour to account for pinned/compacted objects When using the copying collector there is still a lot of data which isn't copied (such as pinned, compacted, large objects etc). The logic to decide how much memory to retain didn't take into account that these wouldn't be copied. Therefore we pessimistically retained 2* the amount of memory for these blocks even though they wouldn't be copied by the collector. The solution is to split up the heap into two parts, the parts which will be copied and the parts which won't be copied. Then the appropiate factor is applied to each part individually (2 * for copying and 1.2 * for not copying). The T23221 test demonstrates this improvement with a program which first allocates many unpinned ByteArray# followed by many pinned ByteArray# and observes the difference in the ultimate memory baseline between the two. There are some charts on #23221. Fixes #23221 - - - - - 1bb24432 by Cheng Shao at 2023-05-11T11:57:15-04:00 hadrian: fix no_dynamic_libs flavour transformer This patch fixes the no_dynamic_libs flavour transformer and make fully_static reuse it. Previously building with no_dynamic_libs fails since ghc program is still dynamic and transitively brings in dyn ways of rts which are produced by no rules. - - - - - 42d696ab by Finley McIlwaine at 2023-05-11T15:52:07-06:00 Thunk leak fixes The strictness introduced in this commit was motivated by observing thunk leaks in the eventlog2html output. - Refactor attach instances list comprehension to avoid large intermediate thunks - Refactor some HTML backend list comprehensions to avoid large intermediate thunks - Avoid thunks accumulating in documentation types or documentation parser - A lot of orphan NFData instances to allow us to force documentation values - - - - - 68561cf6 by Finley McIlwaine at 2023-05-11T17:02:10-06:00 Remove GHC debug dep - - - - - 0ed493a3 by Josh Meredith at 2023-05-11T23:08:27-04:00 JS: refactor jsSaturate to return a saturated JStat (#23328) - - - - - a856d98e by Pierre Le Marre at 2023-05-11T23:09:08-04:00 Doc: Fix out-of-sync using-optimisation page - Make explicit that default flag values correspond to their -O0 value. - Fix -fignore-interface-pragmas, -fstg-cse, -fdo-eta-reduction, -fcross-module-specialise, -fsolve-constant-dicts, -fworker-wrapper. - - - - - c176ad18 by sheaf at 2023-05-12T06:10:57-04:00 Don't panic in mkNewTyConRhs This function could come across invalid newtype constructors, as we only perform validity checking of newtypes once we are outside the knot-tied typechecking loop. This patch changes this function to fake up a stub type in the case of an invalid newtype, instead of panicking. This patch also changes "checkNewDataCon" so that it reports as many errors as possible at once. Fixes #23308 - - - - - ab63daac by Krzysztof Gogolewski at 2023-05-12T06:11:38-04:00 Allow Core optimizations when interpreting bytecode Tracking ticket: #23056 MR: !10399 This adds the flag `-funoptimized-core-for-interpreter`, permitting use of the `-O` flag to enable optimizations when compiling with the interpreter backend, like in ghci. - - - - - c6cf9433 by Ben Gamari at 2023-05-12T06:12:14-04:00 hadrian: Fix mention of non-existent removeFiles function Previously Hadrian's bindist Makefile referred to a `removeFiles` function that was previously defined by the `make` build system. Since the `make` build system is no longer around, this function is now undefined. Naturally, make being make, this appears to be silently ignored instead of producing an error. Fix this by rewriting it to `rm -f`. Closes #23373. - - - - - eb60ec18 by Andrew Lelechenko at 2023-05-12T06:12:54-04:00 Mention new implementation of GHC.IORef.atomicSwapIORef in the changelog - - - - - aa84cff4 by Teo Camarasu at 2023-05-12T19:27:23-04:00 rts: Ensure non-moving gc is not running when pausing - - - - - 5ad776ab by Teo Camarasu at 2023-05-12T19:27:23-04:00 rts: Teach listAllBlocks about nonmoving heap List all blocks on the non-moving heap. Resolves #22627 - - - - - d683b2e5 by Krzysztof Gogolewski at 2023-05-12T19:28:00-04:00 Fix coercion optimisation for SelCo (#23362) setNominalRole_maybe is supposed to output a nominal coercion. In the SelCo case, it was not updating the stored role to Nominal, causing #23362. - - - - - 59aa4676 by Alexis King at 2023-05-12T19:28:47-04:00 hadrian: Fix linker script flag for MergeObjects builder This fixes what appears to have been a typo in !9530. The `-t` flag just enables tracing on all versions of `ld` I’ve looked at, while `-T` is used to specify a linker script. It seems that this worked anyway for some reason on some `ld` implementations (perhaps because they automatically detect linker scripts), but the missing `-T` argument causes `gold` to complain. - - - - - 4bf9fa0f by Adam Gundry at 2023-05-12T23:49:49-04:00 Less coercion optimization for non-newtype axioms See Note [Push transitivity inside newtype axioms only] for an explanation of the change here. This change substantially improves the performance of coercion optimization for programs involving transitive type family reductions. ------------------------- Metric Decrease: CoOpt_Singletons LargeRecord T12227 T12545 T13386 T15703 T5030 T8095 ------------------------- - - - - - dc0c9574 by Adam Gundry at 2023-05-12T23:49:49-04:00 Move checkAxInstCo to GHC.Core.Lint A consequence of the previous change is that checkAxInstCo is no longer called during coercion optimization, so it can be moved back where it belongs. Also includes some edits to Note [Conflict checking with AxiomInstCo] as suggested by @simonpj. - - - - - 8b9b7dbc by Simon Peyton Jones at 2023-05-12T23:50:25-04:00 Use the eager unifier in the constraint solver This patch continues the refactoring of the constraint solver described in #23070. The Big Deal in this patch is to call the regular, eager unifier from the constraint solver, when we want to create new equalities. This replaces the existing, unifyWanted which amounted to yet-another-unifier, so it reduces duplication of a rather subtle piece of technology. See * Note [The eager unifier] in GHC.Tc.Utils.Unify * GHC.Tc.Solver.Monad.wrapUnifierTcS I did lots of other refactoring along the way * I simplified the treatment of right hand sides that contain CoercionHoles. Now, a constraint that contains a hetero-kind CoercionHole is non-canonical, and cannot be used for rewriting or unification alike. This required me to add the ch_hertero_kind flag to CoercionHole, with consequent knock-on effects. See wrinkle (2) of `Note [Equalities with incompatible kinds]` in GHC.Tc.Solver.Equality. * I refactored the StopOrContinue type to add StartAgain, so that after a fundep improvement (for example) we can simply start the pipeline again. * I got rid of the unpleasant (and inefficient) rewriterSetFromType/Co functions. With Richard I concluded that they are never needed. * I discovered Wrinkle (W1) in Note [Wanteds rewrite Wanteds] in GHC.Tc.Types.Constraint, and therefore now prioritise non-rewritten equalities. Quite a few error messages change, I think always for the better. Compiler runtime stays about the same, with one outlier: a 17% improvement in T17836 Metric Decrease: T17836 T18223 - - - - - 5cad28e7 by Bartłomiej Cieślar at 2023-05-12T23:51:06-04:00 Cleanup of dynflags override in export renaming The deprecation warnings are normally emitted whenever the name's GRE is being looked up, which calls the GHC.Rename.Env.addUsedGRE function. We do not want those warnings to be emitted when renaming export lists, so they are artificially turned off by removing all warning categories from DynFlags at the beginning of GHC.Tc.Gen.Export.rnExports. This commit removes that dependency by unifying the function used for GRE lookup in lookup_ie to lookupGreAvailRn and disabling the call to addUsedGRE in said function (the warnings are also disabled in a call to lookupSubBndrOcc_helper in lookupChildrenExport), as per #17957. This commit also changes the setting for whether to warn about deprecated names in addUsedGREs to be an explicit enum instead of a boolean. - - - - - d85ed900 by Alexis King at 2023-05-13T08:45:18-04:00 Use a uniform return convention in bytecode for unary results fixes #22958 - - - - - 8a0d45f7 by Andrew Lelechenko at 2023-05-13T08:45:58-04:00 Add more instances for Compose: Enum, Bounded, Num, Real, Integral See https://github.com/haskell/core-libraries-committee/issues/160 for discussion - - - - - 902f0730 by Simon Peyton Jones at 2023-05-13T14:58:34-04:00 Make GHC.Types.Id.Make.shouldUnpackTy a bit more clever As #23307, GHC.Types.Id.Make.shouldUnpackTy was leaving money on the table, failing to unpack arguments that are perfectly unpackable. The fix is pretty easy; see Note [Recursive unboxing] - - - - - a5451438 by sheaf at 2023-05-13T14:59:13-04:00 Fix bad multiplicity role in tyConAppFunCo_maybe The function tyConAppFunCo_maybe produces a multiplicity coercion for the multiplicity argument of the function arrow, except that it could be at the wrong role if asked to produce a representational coercion. We fix this by using the 'funRole' function, which computes the right roles for arguments to the function arrow TyCon. Fixes #23386 - - - - - 5b9e9300 by sheaf at 2023-05-15T11:26:59-04:00 Turn "ambiguous import" error into a panic This error should never occur, as a lookup of a type or data constructor should never be ambiguous. This is because a single module cannot export multiple Names with the same OccName, as per item (1) of Note [Exporting duplicate declarations] in GHC.Tc.Gen.Export. This code path was intended to handle duplicate record fields, but the rest of the code had since been refactored to handle those in a different way. We also remove the AmbiguousImport constructor of IELookupError, as it is no longer used. Fixes #23302 - - - - - e305e60c by M Farkas-Dyck at 2023-05-15T11:27:41-04:00 Unbreak some tests with latest GNU grep, which now warns about stray '\'. Confusingly, the testsuite mangled the error to say "stray /". We also migrate some tests from grep to grep -E, as it seems the author actually wanted an "POSIX extended" (a.k.a. sane) regex. Background: POSIX specifies 2 "regex" syntaxen: "basic" and "extended". Of these, only "extended" syntax is actually a regular expression. Furthermore, "basic" syntax is inconsistent in its use of the '\' character — sometimes it escapes a regex metacharacter, but sometimes it unescapes it, i.e. it makes an otherwise normal character become a metacharacter. This baffles me and it seems also the authors of these tests. Also, the regex(7) man page (at least on Linux) says "basic" syntax is obsolete. Nearly all modern tools and libraries are consistent in this use of the '\' character (of which many use "extended" syntax by default). - - - - - 10519e3d by Finley McIlwaine at 2023-05-15T12:40:48-06:00 Force HIE file path Removes a potential retainer of `ModSummary`s - - - - - 5ae81842 by sheaf at 2023-05-15T14:49:17-04:00 Improve "ambiguous occurrence" error messages This error was sometimes a bit confusing, especially when data families were involved. This commit improves the general presentation of the "ambiguous occurrence" error, and adds a bit of extra context in the case of data families. Fixes #23301 - - - - - 2f571afe by Sylvain Henry at 2023-05-15T14:50:07-04:00 Fix GHCJS OS platform (fix #23346) - - - - - 86aae570 by Oleg Grenrus at 2023-05-15T14:50:43-04:00 Split DynFlags structure into own module This will allow to make command line parsing to depend on diagnostic system (which depends on dynflags) - - - - - 1e4a6ec6 by Finley McIlwaine at 2023-05-15T14:20:34-06:00 Re-add index-state, with-compiler, delete hie.yamls - - - - - a2363fe9 by Hécate Moonlight at 2023-05-15T22:45:16+02:00 Merge pull request haskell/haddock#1594 from FinleyMcIlwaine/finley/ghc-9.6-mem-fixes Reduce memory usage - - - - - fbe3fe00 by Josh Meredith at 2023-05-15T18:01:43-04:00 Replace the implementation of CodeBuffers with unboxed types - - - - - 21f3aae7 by Josh Meredith at 2023-05-15T18:01:43-04:00 Use unboxed codebuffers in base Metric Decrease: encodingAllocations - - - - - 18ea2295 by Ben Gamari at 2023-05-15T18:02:20-04:00 rts: Weak pointer cleanups Various stylistic cleanups. No functional changes. - - - - - c343112f by Ben Gamari at 2023-05-15T18:02:20-04:00 rts: Don't force debug output to stderr Previously `+RTS -Dw -l` would emit debug output to the eventlog while `+RTS -l -Dw` would emit it to stderr. This was because the parser for `-D` would unconditionally override the debug output target. Now we instead only do so if no it is currently `TRACE_NONE`. - - - - - a5f5f067 by Ben Gamari at 2023-05-15T18:02:20-04:00 rts: Forcibly flush eventlog on barf Previously we would attempt to flush via `endEventLogging` which can easily deadlock, e.g., if `barf` fails during GC. Using `flushEventLog` directly may result in slightly less consistent eventlog output (since we don't take all capabilities before flushing) but avoids deadlocking. - - - - - 73b1e87c by Ben Gamari at 2023-05-15T18:02:20-04:00 rts: Assert that pointers aren't cleared by -DZ This turns many segmentation faults into much easier-to-debug assertion failures by ensuring that LOOKS_LIKE_*_PTR checks recognize bit-patterns produced by `+RTS -DZ` clearing as invalid pointers. This is a bit ad-hoc but this is the debug runtime. - - - - - 37fb61d8 by Ben Gamari at 2023-05-15T18:02:20-04:00 rts: Introduce printGlobalThreads - - - - - 451d65a6 by Ben Gamari at 2023-05-15T18:02:20-04:00 rts: Don't sanity-check StgTSO.global_link See Note [Avoid dangling global_link pointers]. Fixes #19146. - - - - - d69cbd78 by sheaf at 2023-05-15T18:03:00-04:00 Split up tyThingToIfaceDecl from GHC.Iface.Make This commit moves tyThingToIfaceDecl and coAxiomToIfaceDecl from GHC.Iface.Make into GHC.Iface.Decl. This avoids GHC.Types.TyThing.Ppr, which needs tyThingToIfaceDecl, transitively depending on e.g. GHC.Iface.Load and GHC.Tc.Utils.Monad. - - - - - 4d29ecdf by sheaf at 2023-05-15T18:03:00-04:00 Migrate errors to diagnostics in GHC.Tc.Module This commit migrates the errors in GHC.Tc.Module to use the new diagnostic infrastructure. It required a significant overhaul of the compatibility checks between an hs-boot or signature module and its implementation; we now use a Writer monad to accumulate errors; see the BootMismatch datatype in GHC.Tc.Errors.Types, with its panoply of subtypes. For the sake of readability, several local functions inside the 'checkBootTyCon' function were split off into top-level functions. We split off GHC.Types.HscSource into a "boot or sig" vs "normal hs file" datatype, as this mirrors the logic in several other places where we want to treat hs-boot and hsig files in a similar fashion. This commit also refactors the Backpack checks for type synonyms implementing abstract data, to correctly reject implementations that contain qualified or quantified types (this fixes #23342 and #23344). - - - - - d986c98e by Rodrigo Mesquita at 2023-05-16T00:14:04-04:00 configure: Drop unused AC_PROG_CPP In configure, we were calling `AC_PROG_CPP` but never making use of the $CPP variable it sets or reads. The issue is $CPP will show up in the --help output of configure, falsely advertising a configuration option that does nothing. The reason we don't use the $CPP variable is because HS_CPP_CMD is expected to be a single command (without flags), but AC_PROG_CPP, when CPP is unset, will set said variable to something like `/usr/bin/gcc -E`. Instead, we configure HS_CPP_CMD through $CC. - - - - - a8f0435f by Cheng Shao at 2023-05-16T00:14:42-04:00 rts: fix --disable-large-address-space This patch moves ACQUIRE_ALLOC_BLOCK_SPIN_LOCK/RELEASE_ALLOC_BLOCK_SPIN_LOCK from Storage.h to HeapAlloc.h. When --disable-large-address-space is passed to configure, the code in HeapAlloc.h makes use of these two macros. Fixes #23385. - - - - - bdb93cd2 by Oleg Grenrus at 2023-05-16T07:59:21+03:00 Add -Wmissing-role-annotations Implements #22702 - - - - - 41ecfc34 by Ben Gamari at 2023-05-16T07:28:15-04:00 base: Export {get,set}ExceptionFinalizer from System.Mem.Weak As proposed in CLC Proposal #126 [1]. [1]: https://github.com/haskell/core-libraries-committee/issues/126 - - - - - 67330303 by Ben Gamari at 2023-05-16T07:28:16-04:00 base: Introduce printToHandleFinalizerExceptionHandler - - - - - 5e3f9bb5 by Josh Meredith at 2023-05-16T13:59:22-04:00 JS: Implement h$clock_gettime in the JavaScript RTS (#23360) - - - - - 90e69d5d by Zubin Duggal at 2023-05-16T14:00:00-04:00 compiler: Use compact representation for SourceText SourceText is serialized along with INLINE pragmas into interface files. Many of these SourceTexts are identical, for example "{-# INLINE#". When deserialized, each such SourceText was previously expanded out into a [Char], which is highly wasteful of memory, and each such instance of the text would allocate an independent list with its contents as deserializing breaks any sharing that might have existed. Instead, we use a `FastString` to represent these, so that each instance unique text will be interned and stored in a memory efficient manner. - - - - - b70bc690 by Zubin Duggal at 2023-05-16T14:00:00-04:00 compiler: Use compact representation/FastStrings for `SourceNote`s `SourceNote`s should not be stored as [Char] as this is highly wasteful and in certain scenarios can be highly duplicated. Metric Decrease: hard_hole_fits - - - - - 6231a126 by Zubin Duggal at 2023-05-16T14:00:00-04:00 compiler: Use compact representation for UsageFile (#22744) Use FastString to store filepaths in interface files, as this data is highly redundant so we want to share all instances of filepaths in the compiler session. - - - - - 47a58150 by Zubin Duggal at 2023-05-16T14:00:00-04:00 testsuite: add test for T22744 This test checks for #22744 by compiling 100 modules which each have a dependency on 1000 distinct external files. Previously, when loading these interfaces from disk, each individual instance of a filepath in the interface will would be allocated as an individual object on the heap, meaning we have heap objects for 100*1000 files, when there are only 1000 distinct files we care about. This test checks this by first compiling the module normally, then measuring the peak memory usage in a no-op recompile, as the recompilation checking will force the allocation of all these filepaths. - - - - - 0451bdc9 by Ben Gamari at 2023-05-16T21:31:40-04:00 users guide: Add glossary Currently this merely explains the meaning of "technology preview" in the context of released features. - - - - - 0ba52e4e by Ben Gamari at 2023-05-16T21:31:40-04:00 Update glossary.rst - - - - - 3d23060c by Ben Gamari at 2023-05-16T21:31:40-04:00 Use glossary directive - - - - - 2972fd66 by Sylvain Henry at 2023-05-16T21:32:20-04:00 JS: fix getpid (fix #23399) - - - - - e8a78383 by Finley McIlwaine at 2023-05-17T12:19:16-06:00 Merge branch ghc-9.6 into ghc-head - - - - - 22e25581 by Finley McIlwaine at 2023-05-17T12:20:23-06:00 Merge branch 'ghc-head' of gitlab.haskell.org:ghc/haddock into ghc-head - - - - - 5fe1d3e6 by Matthew Pickering at 2023-05-17T21:42:00-04:00 Use setSrcSpan rather than setLclEnv in solveForAll In subsequent MRs (#23409) we want to remove the TcLclEnv argument from a CtLoc. This MR prepares us for that by removing the one place where the entire TcLclEnv is used, by using it more precisely to just set the contexts source location. Fixes #23390 - - - - - 385edb65 by Torsten Schmits at 2023-05-17T21:42:40-04:00 Update the users guide paragraph on -O in GHCi In relation to #23056 - - - - - 87626ef0 by Ben Gamari at 2023-05-18T15:18:53-04:00 base: Add test for #13660 - - - - - 9eef53b1 by Ben Gamari at 2023-05-18T15:18:53-04:00 base: Move implementation of GHC.Foreign to GHC.Internal - - - - - 174ea2fa by Ben Gamari at 2023-05-18T15:18:53-04:00 base: Introduce {new,with}CStringLen0 These are useful helpers for implementing the internal-NUL code unit check needed to fix #13660. - - - - - a46ced16 by Ben Gamari at 2023-05-18T15:18:53-04:00 base: Clean up documentation - - - - - b98d99cc by Ben Gamari at 2023-05-18T15:18:53-04:00 base: Ensure that FilePaths don't contain NULs POSIX filepaths may not contain the NUL octet but previously we did not reject such paths. This could be exploited by untrusted input to cause discrepancies between various `FilePath` queries and the opened filename. For instance, `readFile "hello.so\x00.txt"` would open the file `"hello.so"` yet `takeFileExtension` would return `".txt"`. The same argument applies to Windows FilePaths Fixes #13660. - - - - - 7ae45459 by Simon Peyton Jones at 2023-05-18T15:19:29-04:00 Allow the demand analyser to unpack tuple and equality dictionaries Addresses #23398. The demand analyser usually does not unpack class dictionaries: see Note [Do not unbox class dictionaries] in GHC.Core.Opt.DmdAnal. This patch makes an exception for tuple dictionaries and equality dictionaries, for reasons explained in wrinkles (DNB1) and (DNB2) of the above Note. Compile times fall by 0.1% for some reason (max 0.7% on T18698b). - - - - - b53a9086 by Greg Steuck at 2023-05-18T15:20:08-04:00 Use a simpler and more portable construct in ld.ldd check printf '%q\n' is a bash extension which led to incorrectly failing an ld.lld test on OpenBSD which uses pdksh as /bin/sh - - - - - dd5710af by Torsten Schmits at 2023-05-18T15:20:50-04:00 Update the warning about interpreter optimizations to reflect that they're not incompatible anymore, but guarded by a flag - - - - - 4f6dd999 by Matthew Pickering at 2023-05-18T15:21:26-04:00 Remove stray dump flags in GHC.Rename.Names - - - - - 4bca0486 by Oleg Grenrus at 2023-05-19T11:51:33+03:00 Make Warn = Located DriverMessage This change makes command line argument parsing use diagnostic framework for producing warnings. - - - - - 525ed554 by Simon Peyton Jones at 2023-05-19T10:09:15-04:00 Type inference for data family newtype instances This patch addresses #23408, a tricky case with data family newtype instances. Consider type family TF a where TF Char = Bool data family DF a newtype instance DF Bool = MkDF Int and [W] Int ~R# DF (TF a), with a Given (a ~# Char). We must fully rewrite the Wanted so the tpye family can fire; that wasn't happening. - - - - - c6fb6690 by Peter Trommler at 2023-05-20T03:16:08-04:00 testsuite: fix predicate on rdynamic test Test rdynamic requires dynamic linking support, which is orthogonal to RTS linker support. Change the predicate accordingly. Fixes #23316 - - - - - 735d504e by Matthew Pickering at 2023-05-20T03:16:44-04:00 docs: Use ghc-ticket directive where appropiate in users guide Using the directive automatically formats and links the ticket appropiately. - - - - - b56d7379 by Sylvain Henry at 2023-05-22T14:21:22-04:00 NCG: remove useless .align directive (#20758) - - - - - 15b93d2f by Simon Peyton Jones at 2023-05-22T14:21:58-04:00 Add test for #23156 This program had exponential typechecking time in GHC 9.4 and 9.6 - - - - - 2b53f206 by Greg Steuck at 2023-05-22T20:23:11-04:00 Revert "Change hostSupportsRPaths to report False on OpenBSD" This reverts commit 1e0d8fdb55a38ece34fa6cf214e1d2d46f5f5bf2. - - - - - 882e43b7 by Greg Steuck at 2023-05-22T20:23:11-04:00 Disable T17414 on OpenBSD Like on other systems it's not guaranteed that there's sufficient space in /tmp to write 2G out. - - - - - 9d531f9a by Greg Steuck at 2023-05-22T20:23:11-04:00 Bring back getExecutablePath to getBaseDir on OpenBSD Fix #18173 - - - - - 9db0eadd by Krzysztof Gogolewski at 2023-05-22T20:23:47-04:00 Add an error origin for impedance matching (#23427) - - - - - 33cf4659 by Ben Gamari at 2023-05-23T03:46:20-04:00 testsuite: Add tests for #23146 Both lifted and unlifted variants. - - - - - 76727617 by Ben Gamari at 2023-05-23T03:46:21-04:00 codeGen: Fix some Haddocks - - - - - 33a8c348 by Ben Gamari at 2023-05-23T03:46:21-04:00 codeGen: Give proper LFInfo to datacon wrappers As noted in `Note [Conveying CAF-info and LFInfo between modules]`, when importing a binding from another module we must ensure that it gets the appropriate `LambdaFormInfo` if it is in WHNF to ensure that references to it are tagged correctly. However, the implementation responsible for doing this, `GHC.StgToCmm.Closure.mkLFImported`, only dealt with datacon workers and not wrappers. This lead to the crash of this program in #23146: module B where type NP :: [UnliftedType] -> UnliftedType data NP xs where UNil :: NP '[] module A where import B fieldsSam :: NP xs -> NP xs -> Bool fieldsSam UNil UNil = True x = fieldsSam UNil UNil Due to its GADT nature, `UNil` produces a trivial wrapper $WUNil :: NP '[] $WUNil = UNil @'[] @~(<co:1>) which is referenced in the RHS of `A.x`. Due to the above-mentioned bug in `mkLFImported`, the references to `$WUNil` passed to `fieldsSam` were not tagged. This is problematic as `fieldsSam` expected its arguments to be tagged as they are unlifted. The fix is straightforward: extend the logic in `mkLFImported` to cover (nullary) datacon wrappers as well as workers. This is safe because we know that the wrapper of a nullary datacon will be in WHNF, even if it includes equalities evidence (since such equalities are not runtime relevant). Thanks to @MangoIV for the great ticket and @alt-romes for his minimization and help debugging. Fixes #23146. - - - - - 2fc18e9e by Rodrigo Mesquita at 2023-05-23T03:46:21-04:00 codeGen: Fix LFInfo of imported datacon wrappers As noted in #23231 and in the previous commit, we were failing to give a an LFInfo of LFCon to a nullary datacon wrapper from another module, failing to properly tag pointers which ultimately led to the segmentation fault in #23146. On top of the previous commit which now considers wrappers where we previously only considered workers, we change the order of the guards so that we check for the arity of the binding before we check whether it is a constructor. This allows us to (1) Correctly assign `LFReEntrant` to imported wrappers whose worker was nullary, which we previously would fail to do (2) Remove the `isNullaryRepDataCon` predicate: (a) which was previously wrong, since it considered wrappers whose workers had zero-width arguments to be non-nullary and would fail to give `LFCon` to them (b) is now unnecessary, since arity == 0 guarantees - that the worker takes no arguments at all - and the wrapper takes no arguments and its RHS must be an application of the worker to zero-width-args only. - we lint these two items with an assertion that the datacon `hasNoNonZeroWidthArgs` We also update `isTagged` to use the new logic in determining the LFInfos of imported Ids. The creation of LFInfos for imported Ids and this detail are explained in Note [The LFInfo of Imported Ids]. Note that before the patch to those issues we would already consider these nullary wrappers to have `LFCon` lambda form info; but failed to re-construct that information in `mkLFImported` Closes #23231, #23146 (I've additionally batched some fixes to documentation I found while investigating this issue) - - - - - 0598f7f0 by Rodrigo Mesquita at 2023-05-23T03:46:21-04:00 Make LFInfos for DataCons on construction As a result of the discussion in !10165, we decided to amend the previous commit which fixed the logic of `mkLFImported` with regard to datacon workers and wrappers. Instead of having the logic for the LFInfo of datacons be in `mkLFImported`, we now construct an LFInfo for all data constructors on GHC.Types.Id.Make and store it in the `lfInfo` field. See the new Note [LFInfo of DataCon workers and wrappers] and ammendments to Note [The LFInfo of Imported Ids] - - - - - 12294b22 by Rodrigo Mesquita at 2023-05-23T03:46:21-04:00 Update Note [Core letrec invariant] Authored by @simonpj - - - - - e93ab972 by Rodrigo Mesquita at 2023-05-23T03:46:21-04:00 Rename mkLFImported to importedIdLFInfo The `mkLFImported` sounded too much like a constructor of sorts, when really it got the `LFInfo` of an imported Id from its `lf_info` field when this existed, and otherwise returned a conservative estimate of that imported Id's LFInfo. This in contrast to functions such as `mkLFReEntrant` which really are about constructing an `LFInfo`. - - - - - e54d9259 by Rodrigo Mesquita at 2023-05-23T03:46:21-04:00 Enforce invariant on typePrimRepArgs in the types As part of the documentation effort in !10165 I came across this invariant on 'typePrimRepArgs' which is easily expressed at the type-level through a NonEmpty list. It allowed us to remove one panic. - - - - - b8fe6a0c by Rodrigo Mesquita at 2023-05-23T03:46:21-04:00 Merge outdated Note [Data con representation] into Note [Data constructor representation] Introduce new Note [Constructor applications in STG] to better support the merge, and reference it from the relevant bits in the STG syntax. - - - - - e1590ddc by Simon Peyton Jones at 2023-05-23T03:46:57-04:00 Add the SolverStage monad This refactoring makes a substantial improvement in the structure of the type-checker's constraint solver: #23070. Specifically: * Introduced the SolverStage monad. See GHC.Tc.Solver.Monad Note [The SolverStage monad] * Make each solver pipeline (equalities, dictionaries, irreds etc) deal with updating the inert set, as a separate SolverStage. There is sometimes special stuff to do, and it means that each full pipeline can have type SolverStage Void, indicating that they never return anything. * Made GHC.Tc.Solver.Equality.zonkEqTypes into a SolverStage. Much nicer. * Combined the remnants of GHC.Tc.Solver.Canonical and GHC.Tc.Solver.Interact into a new module GHC.Tc.Solver.Solve. (Interact and Canonical are removed.) * Gave the same treatment to dictionary and irred constraints as I have already done for equality constraints: * New types (akin to EqCt): IrredCt and DictCt * Ct is now just a simple sum type data Ct = CDictCan DictCt | CIrredCan IrredCt | CEqCan EqCt | CQuantCan QCInst | CNonCanonical CtEvidence * inert_dicts can now have the better type DictMap DictCt, instead of DictMap Ct; and similarly inert_irreds. * Significantly simplified the treatment of implicit parameters. Previously we had a number of special cases * interactGivenIP, an entire function * special case in maybeKickOut * special case in findDict, when looking up dictionaries But actually it's simpler than that. When adding a new Given, implicit parameter constraint to the InertSet, we just need to kick out any existing inert constraints that mention that implicit parameter. The main work is done in GHC.Tc.Solver.InertSet.delIPDict, along with its auxiliary GHC.Core.Predicate.mentionsIP. See Note [Shadowing of implicit parameters] in GHC.Tc.Solver.Dict. * Add a new fast-path in GHC.Tc.Errors.Hole.tcCheckHoleFit. See Note [Fast path for tcCheckHoleFit]. This is a big win in some cases: test hard_hole_fits gets nearly 40% faster (at compile time). * Add a new fast-path for solving /boxed/ equality constraints (t1 ~ t2). See Note [Solving equality classes] in GHC.Tc.Solver.Dict. This makes a big difference too: test T17836 compiles 40% faster. * Implement the PermissivePlan of #23413, which concerns what happens with insoluble Givens. Our previous treatment was wildly inconsistent as that ticket pointed out. A part of this, I simplified GHC.Tc.Validity.checkAmbiguity: now we simply don't run the ambiguity check at all if -XAllowAmbiguousTypes is on. Smaller points: * In `GHC.Tc.Errors.misMatchOrCND` instead of having a special case for insoluble /occurs/ checks, broaden in to all insouluble constraints. Just generally better. See Note [Insoluble mis-match] in that module. As noted above, compile time perf gets better. Here are the changes over 0.5% on Fedora. (The figures are slightly larger on Windows for some reason.) Metrics: compile_time/bytes allocated ------------------------------------- LargeRecord(normal) -0.9% MultiLayerModulesTH_OneShot(normal) +0.5% T11822(normal) -0.6% T12227(normal) -1.8% GOOD T12545(normal) -0.5% T13035(normal) -0.6% T15703(normal) -1.4% GOOD T16875(normal) -0.5% T17836(normal) -40.7% GOOD T17836b(normal) -12.3% GOOD T17977b(normal) -0.5% T5837(normal) -1.1% T8095(normal) -2.7% GOOD T9020(optasm) -1.1% hard_hole_fits(normal) -37.0% GOOD geo. mean -1.3% minimum -40.7% maximum +0.5% Metric Decrease: T12227 T15703 T17836 T17836b T8095 hard_hole_fits LargeRecord T9198 T13035 - - - - - 6abf3648 by Simon Peyton Jones at 2023-05-23T03:46:57-04:00 Avoid an assertion failure in abstractFloats The function GHC.Core.Opt.Simplify.Utils.abstractFloats was carelessly calling lookupIdSubst_maybe on a CoVar; but a precondition of the latter is being given an Id. In fact it's harmless to call it on a CoVar, but still, the precondition on lookupIdSubst_maybe makes sense, so I added a test for CoVars. This avoids a crash in a DEBUG compiler, but otherwise has no effect. Fixes #23426. - - - - - 41bbf0df by Bartłomiej Cieślar at 2023-05-24T08:57:58+02:00 changes to the WarningTxt cases Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 838aaf4b by hainq at 2023-05-24T12:41:19-04:00 Migrate errors in GHC.Tc.Validity This patch migrates the error messages in GHC.Tc.Validity to use the new diagnostic infrastructure. It adds the constructors: - TcRnSimplifiableConstraint - TcRnArityMismatch - TcRnIllegalInstanceDecl, with sub-datatypes for HasField errors and fundep coverage condition errors. - - - - - 8539764b by Krzysztof Gogolewski at 2023-05-24T12:41:56-04:00 linear lint: Add missing processing of DEFAULT In this correct program f :: a %1 -> a f x = case x of x { _DEFAULT -> x } after checking the alternative we weren't popping the case binder 'x' from the usage environment, which meant that the lambda-bound 'x' was counted twice: in the scrutinee and (incorrectly) in the alternative. In fact, we weren't checking the usage of 'x' at all. Now the code for handling _DEFAULT is similar to the one handling data constructors. Fixes #23025. - - - - - ae683454 by Matthew Pickering at 2023-05-24T12:42:32-04:00 Remove outdated "Don't check hs-boot type family instances too early" note This note was introduced in 25b70a29f623 which delayed performing some consistency checks for type families. However, the change was reverted later in 6998772043a7f0b0360116eb5ffcbaa5630b21fb but the note was not removed. I found it confusing when reading to code to try and work out what special behaviour there was for hs-boot files (when in-fact there isn't any). - - - - - 44af57de by Matthew Pickering at 2023-05-24T12:43:08-04:00 rts: Define ticky macro stubs These macros have long been undefined which has meant we were missing reporting these allocations in ticky profiles. The most critical missing definition was TICK_ALLOC_HEAP_NOCTR which was missing all the RTS calls to allocate, this leads to a the overall ALLOC_RTS_tot number to be severaly underreported. Of particular interest though is the ALLOC_STACK_ctr and ALLOC_STACK_tot counters which are useful to tracking stack allocations. Fixes #23421 - - - - - b2dabe3a by Matthew Pickering at 2023-05-24T12:43:08-04:00 rts: ticky: Rename TICK_ALLOC_HEAP_NOCTR to TICK_ALLOC_RTS This macro increments the ALLOC_HEAP_tot and ALLOC_HEAP_ctr so it makes more sense to name it after that rather than the suffix NOCTR, whose meaning has been lost to the mists of time. - - - - - eac4420a by Ben Gamari at 2023-05-24T12:43:45-04:00 users guide: A few small mark-up fixes - - - - - a320ca76 by Rodrigo Mesquita at 2023-05-24T12:44:20-04:00 configure: Fix support check for response files. In failing to escape the '-o' in '-o\nconftest\nconftest.o\n' argument to printf, the writing of the arguments response file always failed. The fix is to pass the arguments after `--` so that they are treated positional arguments rather than flags to printf. Closes #23435 - - - - - f21ce0e4 by mangoiv at 2023-05-24T12:45:00-04:00 [feat] add .direnv to the .gitignore file - - - - - 36d5944d by Andrew Lelechenko at 2023-05-24T20:58:34-04:00 Add Data.List.unsnoc See https://github.com/haskell/core-libraries-committee/issues/165 for discussion - - - - - c0f2f9e3 by Bartłomiej Cieślar at 2023-05-24T20:59:14-04:00 Fix crash in backpack signature merging with -ddump-rn-trace In some cases, backpack signature merging could crash in addUsedGRE when -ddump-rn-trace was enabled, as pretty-printing the GREInfo would cause unavailable interfaces to be loaded. This commit fixes that issue by not pretty-printing the GREInfo in addUsedGRE when -ddump-rn-trace is enabled. Fixes #23424 Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 5a07d94a by Krzysztof Gogolewski at 2023-05-25T03:30:20-04:00 Add a regression test for #13981 The panic was fixed by 6998772043a7f0b. Fixes #13981. - - - - - 182df90e by Krzysztof Gogolewski at 2023-05-25T03:30:57-04:00 Add a test for #23355 It was fixed by !10061, so I'm adding it in the same group. - - - - - 1b31b039 by uhbif19 at 2023-05-25T12:08:28+02:00 Migrate errors in GHC.Rename.Splice GHC.Rename.Pat This commit migrates the errors in GHC.Rename.Splice and GHC.Rename.Pat to use the new diagnostic infrastructure. - - - - - 56abe494 by sheaf at 2023-05-25T12:09:55+02:00 Common up Template Haskell errors in TcRnMessage This commit commons up the various Template Haskell errors into a single constructor, TcRnTHError, of TcRnMessage. - - - - - a487ba9e by Krzysztof Gogolewski at 2023-05-25T14:35:56-04:00 Enable ghci tests for unboxed tuples The tests were originally skipped because ghci used not to support unboxed tuples/sums. - - - - - dc3422d4 by Matthew Pickering at 2023-05-25T18:57:19-04:00 rts: Build ticky GHC with single-threaded RTS The threaded RTS allows you to use ticky profiling but only for the counters in the generated code. The counters used in the C portion of the RTS are disabled. Updating the counters is also racy using the threaded RTS which can lead to misleading or incorrect ticky results. Therefore we change the hadrian flavour to build using the single-threaded RTS (mainly in order to get accurate C code counter increments) Fixes #23430 - - - - - fbc8e04e by sheaf at 2023-05-25T18:58:00-04:00 Propagate long-distance info in generated code When desugaring generated pattern matches, we skip pattern match checks. However, this ended up also discarding long-distance information, which might be needed for user-written sub-expressions. Example: ```haskell okay (GADT di) cd = let sr_field :: () sr_field = case getFooBar di of { Foo -> () } in case cd of { SomeRec _ -> SomeRec sr_field } ``` With sr_field a generated FunBind, we still want to propagate the outer long-distance information from the GADT pattern match into the checks for the user-written RHS of sr_field. Fixes #23445 - - - - - f8ced241 by Matthew Pickering at 2023-05-26T15:26:21-04:00 Introduce GHCiMessage to wrap GhcMessage By introducing a wrapped message type we can control how certain messages are printed in GHCi (to add extra information for example) - - - - - 58e554c1 by Matthew Pickering at 2023-05-26T15:26:22-04:00 Generalise UnknownDiagnostic to allow embedded diagnostics to access parent diagnostic options. * Split default diagnostic options from Diagnostic class into HasDefaultDiagnosticOpts class. * Generalise UnknownDiagnostic to allow embedded diagnostics to access options. The principle idea here is that when wrapping an error message (such as GHCMessage to make GHCiMessage) then we need to also be able to lift the configuration when overriding how messages are printed (see load' for an example). - - - - - b112546a by Matthew Pickering at 2023-05-26T15:26:22-04:00 Allow API users to wrap error messages created during 'load' This allows API users to configure how messages are rendered when they are emitted from the load function. For an example see how 'loadWithCache' is used in GHCi. - - - - - 2e4cf0ee by Matthew Pickering at 2023-05-26T15:26:22-04:00 Abstract cantFindError and turn Opt_BuildingCabal into a print-time option * cantFindError is abstracted so that the parts which mention specific things about ghc/ghci are parameters. The intention being that GHC/GHCi can specify the right values to put here but otherwise display the same error message. * The BuildingCabalPackage argument from GenericMissing is removed and turned into a print-time option. The reason for the error is not dependent on whether `-fbuilding-cabal-package` is passed, so we don't want to store that in the error message. - - - - - 34b44f7d by Matthew Pickering at 2023-05-26T15:26:22-04:00 error messages: Don't display ghci specific hints for missing packages Tickets like #22884 suggest that it is confusing that GHC used on the command line can suggest options which only work in GHCi. This ticket uses the error message infrastructure to override certain error messages which displayed GHCi specific information so that this information is only showed when using GHCi. The main annoyance is that we mostly want to display errors in the same way as before, but with some additional information. This means that the error rendering code has to be exported from the Iface/Errors/Ppr.hs module. I am unsure about whether the approach taken here is the best or most maintainable solution. Fixes #22884 - - - - - 05a1b626 by Matthew Pickering at 2023-05-26T15:26:58-04:00 ghcup-metadata: Don't override existing metadata if version already exists. If a nightly pipeline runs twice for some reason for the same version then we really don't want to override an existing entry with new bindists. This could cause ABI compatability issues for users or break ghcup's caching logic. - - - - - fcbcb3cc by Matthew Pickering at 2023-05-26T15:26:58-04:00 ghcup-metadata: Use proper API url for bindist download Previously we were using links from the web interface, but it's more robust and future-proof to use the documented links to the artifacts. https://docs.gitlab.com/ee/api/job_artifacts.html - - - - - 5b59c8fe by Matthew Pickering at 2023-05-26T15:26:58-04:00 ghcup-metadata: Set Nightly and LatestNightly tags The latest nightly release needs the LatestNightly tag, and all other nightly releases need the Nightly tag. Therefore when the metadata is updated we need to replace all LatestNightly with Nightly.` - - - - - 914e1468 by Matthew Pickering at 2023-05-26T15:26:58-04:00 ghcup-metadata: Download nightly metadata for correct date The metadata now lives in https://gitlab.haskell.org/ghc/ghcup-metadata with one metadata file per year. When we update the metadata we download and update the right file for the current year. - - - - - 16cf7d2e by Matthew Pickering at 2023-05-26T15:26:58-04:00 ghcup-metadata: Download metadata and update for correct year something about pipeline date - - - - - 14792c4b by Matthew Pickering at 2023-05-26T15:26:58-04:00 ghcup-metadata: Don't skip CI On a push we now have a CI job which updates gitlab pages with the metadata files. - - - - - 1121bdd8 by Matthew Pickering at 2023-05-26T15:26:59-04:00 ghcup-metadata: Add --date flag to specify the release date The ghcup-metadata now has a viReleaseDay field which needs to be populated with the day of the release. - - - - - bc478bee by Matthew Pickering at 2023-05-26T15:26:59-04:00 ghcup-metadata: Add dlOutput field ghcup now requires us to add this field which specifies where it should download the bindist to. See https://gitlab.haskell.org/ghc/ghcup-metadata/-/issues/1 for some more discussion. - - - - - 2bdbd9da by Josh Meredith at 2023-05-26T15:27:35-04:00 JS: Convert rendering to use HLine instead of SDoc (#22455) - - - - - abd9e37c by Norman Ramsey at 2023-05-26T15:28:12-04:00 testsuite: add WasmControlFlow test This patch adds the WasmControlFlow test to test the wasm backend's relooper component. - - - - - 07f858eb by Sylvain Henry at 2023-05-26T15:28:53-04:00 Factorize getLinkDeps Prepare reuse of getLinkDeps for TH implementation in the JS backend (cf #22261 and review of !9779). - - - - - fad9d092 by Oleg Grenrus at 2023-05-27T13:38:08-04:00 Change GHC.Driver.Session import to .DynFlags Also move targetPlatform selector Plenty of GHC needs just DynFlags. Even more can be made to use .DynFlags if more selectors is migrated. This is a low hanging fruit. - - - - - 69fdbece by Alan Zimmerman at 2023-05-27T13:38:45-04:00 EPA: Better fix for #22919 The original fix for #22919 simply removed the ability to match up prior comments with the first declaration in the file. Restore it, but add a check that the comment is on a single line, by ensuring that it comes immediately prior to the next thing (comment or start of declaration), and that the token preceding it is not on the same line. closes #22919 - - - - - 0350b186 by Josh Meredith at 2023-05-29T12:46:27+00:00 Remove JavaScriptFFI from --supported-extensions for non-JS targets (#11214) - - - - - b4816919 by Matthew Pickering at 2023-05-30T17:07:43-04:00 testsuite: Pass -kb16k -kc128k for performance tests Setting a larger stack chunk size gives a greater protection from stack thrashing (where the repeated overflow/underflow allocates a lot of stack chunks which sigificantly impact allocations). This stabilises some tests against differences cause by more things being pushed onto the stack. The performance tests are generally testing work done by the compiler, using allocation as a proxy, so removing/stabilising the allocations due to the stack gives us more stable tests which are also more sensitive to actual changes in compiler performance. The tests which increase are ones where we compile a lot of modules, and for each module we spawn a thread to compile the module in. Therefore increasing these numbers has a multiplying effect on these tests because there are many more stacks which we can increase in size. The most significant improvements though are cases such as T8095 which reduce significantly in allocations (30%). This isn't a performance improvement really but just helps stabilise the test against this threshold set by the defaults. Fixes #23439 ------------------------- Metric Decrease: InstanceMatching T14683 T8095 T9872b_defer T9872d T9961 hie002 T19695 T3064 Metric Increase: MultiLayerModules T13701 T14697 ------------------------- - - - - - 6629f1c5 by Ben Gamari at 2023-05-30T17:08:20-04:00 Move via-C flags into GHC These were previously hardcoded in configure (with no option for overriding them) and simply passed onto ghc through the settings file. Since configure already guarantees gcc supports those flags, we simply move them into GHC. - - - - - 981e5e11 by Arnaud Spiwack at 2023-05-31T08:34:33-04:00 Allow CPR on unrestricted constructors Per the new `Note [Linting linearity]`, we want optimisations over trying to preserve linearity. This will allow CPR to handle `Ur`, in particular. - - - - - bf9344d2 by Arnaud Spiwack at 2023-05-31T08:34:33-04:00 Push coercions across multiplicity boundaries Per the new `Note [Linting linearity]`, we want optimisations over trying to preserve linearity. This will avoid preventing inlinings and reductions and make linear programs more efficient. - - - - - d56dd695 by sheaf at 2023-05-31T11:37:12-04:00 Data.Bag: add INLINEABLE to polymorphic functions This commit allows polymorphic methods in GHC.Data.Bag to be specialised, avoiding having to pass explicit dictionaries when they are instantiated with e.g. a known monad. - - - - - 5366cd35 by sheaf at 2023-05-31T11:37:12-04:00 Split off TcBinderStack into its own module This commit splits off TcBinderStack into its own module, to avoid module cycles: we might want to refer to it without also pulling in the TcM monad. - - - - - 09d4d307 by sheaf at 2023-05-31T11:37:12-04:00 Split off TcRef into its own module This helps avoid pull in the full TcM monad when we just want access to mutable references in the typechecker. This facilitates later patches which introduce a slimmed down TcM monad for zonking. - - - - - 88cc19b3 by sheaf at 2023-05-31T11:37:12-04:00 Introduce Codensity monad The Codensity monad is useful to write state-passing computations in continuation-passing style, e.g. to implement a State monad as continuation-passing style over a Reader monad. - - - - - f62d8195 by sheaf at 2023-05-31T11:37:12-04:00 Restructure the zonker This commit splits up the zonker into a few separate components, described in Note [The structure of the zonker] in `GHC.Tc.Zonk.Type`. 1. `GHC.Tc.Zonk.Monad` introduces a pared-down `TcM` monad, `ZonkM`, which has enough information for zonking types. This allows us to refactor `ErrCtxt` to use `ZonkM` instead of `TcM`, which guarantees we don't throw an error while reporting an error. 2. `GHC.Tc.Zonk.Env` is the new home of `ZonkEnv`, and also defines two zonking monad transformers, `ZonkT` and `ZonkBndrT`. `ZonkT` is a reader monad transformer over `ZonkEnv`. `ZonkBndrT m` is the codensity monad over `ZonkT m`. `ZonkBndrT` is used for computations that accumulate binders in the `ZonkEnv`. 3. `GHC.Tc.Zonk.TcType` contains the code for zonking types, for use in the typechecker. It uses the `ZonkM` monad. 4. `GHC.Tc.Zonk.Type` contains the code for final zonking to `Type`, which has been refactored to use `ZonkTcM = ZonkT TcM` and `ZonkBndrTcM = ZonkBndrT TcM`. Allocations slightly decrease on the whole due to using continuation-passing style instead of manual state passing of ZonkEnv in the final zonking to Type. ------------------------- Metric Decrease: T4029 T8095 T14766 T15304 hard_hole_fits RecordUpdPerf Metric Increase: T10421 ------------------------- - - - - - 70526f5b by mimi.vx at 2023-05-31T11:37:53-04:00 Update rdt-theme to latest upstream version Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/23444 - - - - - f3556d6c by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Restructure IPE buffer layout Reference ticket #21766 This commit restructures IPE buffer list entries to not contain references to their corresponding info tables. IPE buffer list nodes now point to two lists of equal length, one holding the list of info table pointers and one holding the corresponding entries for each info table. This will allow the entry data to be compressed without losing the references to the info tables. - - - - - 5d1f2411 by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Add IPE compression to configure Reference ticket #21766 Adds an `--enable-ipe-data-compreesion` flag to the configure script which will check for libzstd and set the appropriate flags to allow for IPE data compression in the compiler - - - - - b7a640ac by Finley McIlwaine at 2023-06-01T04:53:12-04:00 IPE data compression Reference ticket #21766 When IPE data compression is enabled, compress the emitted IPE buffer entries and decompress them in the RTS. - - - - - 5aef5658 by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Fix libzstd detection in configure and RTS Ensure that `HAVE_LIBZSTD` gets defined to either 0 or 1 in all cases and properly check that before IPE data decompression in the RTS. See ticket #21766. - - - - - 69563c97 by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Add note describing IPE data compression See ticket #21766 - - - - - 7872e2b6 by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Fix byte order of IPE data, fix IPE tests Make sure byte order of written IPE buffer entries matches target. Make sure the IPE-related tests properly access the fields of IPE buffer entry nodes with the new IPE layout. This commit also introduces checks to avoid importing modules if IPE compression is not enabled. See ticket #21766. - - - - - 0e85099b by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Fix IPE data decompression buffer allocation Capacity of buffers allocated for decompressed IPE data was incorrect due to a misuse of the `ZSTD_findFrameCompressedSize` function. Fix by always storing decompressed size of IPE data in IPE buffer list nodes and using `ZSTD_findFrameCompressedSize` to determine the size of the compressed data. See ticket #21766 - - - - - a0048866 by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Add optional dependencies to ./configure output Changes the configure script to indicate whether libnuma, libzstd, or libdw are being used as dependencies due to their optional features being enabled. - - - - - 09d93bd0 by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Add IPE-enabled builds to CI - Adds an IPE job to the CI pipeline which is triggered by the ~IPE label - Introduces CI logic to enable IPE data compression - Enables uncompressed IPE data on debug CI job - Regenerates jobs.yaml MR https://gitlab.haskell.org/ghc/ci-images/-/merge_requests/112 on the images repository is meant to ensure that the proper images have libzstd-dev installed. - - - - - 3ded9a1c by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Update user's guide and release notes, small fixes Add mention of IPE data compression to user's guide and the release notes for 9.8.1. Also note the impact compression has on binary size in both places. Change IpeBufferListNode compression check so only the value `1` indicates compression. See ticket #21766 - - - - - 41b41577 by Finley McIlwaine at 2023-06-01T04:53:12-04:00 Remove IPE enabled builds from CI We don't need to explicitly specify the +ipe transformer to test IPE data since there are tests which manually enable IPE information. This commit does leave zstd IPE data compression enabled on the debian CI jobs. - - - - - 982bef3a by Krzysztof Gogolewski at 2023-06-01T04:53:49-04:00 Fix build with 9.2 GHC.Tc.Zonk.Type uses an equality constraint. ghc.nix currently provides 9.2. - - - - - 1c96bc3d by Krzysztof Gogolewski at 2023-06-01T10:56:11-04:00 Output Lint errors to stderr instead of stdout This is a continuation of 7b095b99, which fixed warnings but not errors. Refs #13342 - - - - - 8e81f140 by sheaf at 2023-06-01T10:56:51-04:00 Refactor lookupExactOrOrig & friends This refactors the panoply of renamer lookup functions relating to lookupExactOrOrig to more graciously handle Exact and Orig names. In particular, we avoid the situation in which we would add Exact/Orig GREs to the tcg_used_gres field, which could cause a panic in bestImport like in #23240. Fixes #23428 - - - - - 5d415bfd by Krzysztof Gogolewski at 2023-06-01T10:57:31-04:00 Use the one-shot trick for UM and RewriteM functors As described in Note [The one-shot state monad trick], we shouldn't use derived Functor instances for monads using one-shot. This was done for most of them, but UM and RewriteM were missed. - - - - - 2c38551e by Krzysztof Gogolewski at 2023-06-01T10:58:08-04:00 Fix testsuite skipping Lint setTestOpts() is used to modify the test options for an entire .T file, rather than a single test. If there was a test using collect_compiler_stats, all of the tests in the same file had lint disabled. Fixes #21247 - - - - - 00a1e50b by Krzysztof Gogolewski at 2023-06-01T10:58:44-04:00 Add testcases for already fixed #16432 They were fixed by 40c7daed0. Fixes #16432 - - - - - c686ba9b by Hécate Moonlight at 2023-06-01T14:03:02-06:00 Port the remains of Hi-Haddock - - - - - 9d8a85fd by Hécate Moonlight at 2023-06-01T14:03:06-06:00 Stdout for tests - - - - - 36331d07 by Finley McIlwaine at 2023-06-01T14:06:02-06:00 Formatting, organize imports - - - - - a06059b1 by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix empty context confusion in Convert module - - - - - 379346ae by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix associated type families in Hoogle output - - - - - fc6ea7ed by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix test refs Accept several changes in Hoogle tests: Pretty printing logic no longer prints the `(Proxy (Proxy (...))` chain in Bug806 with parentheses. Since this test was only meant to verify that line breaks do not occur, accept the change. `tyThingToLHsDecl` is called for class and data declarations, which ends up "synifying" the type variables and giving unlifted types kind signatures. As a result, type variables of kind `Type -> Type` are now printed with kind signatures in Hoogle output. This could be changed by manually drop kind signatures from class variables in the Hoogle backend if the behavior is deemed unacceptable. Sometimes subordinate declarations are exported separate from their parent declarations (e.g. record selectors). In this case, a type signature is cobbled together for the export item in `extractDecl`. Since this type signature is very manually constructed, it may lack kind signatures of decls constructed from `tyThingToLHsDecl`. An example of this is the `type-sigs` Hoogle test. Change `*` to `Type` in Hoogle test refs. I don't think this will break Hoogle behavior, since it appears to not consider type signatures in search. I have not fully verified this. - - - - - e14b7e58 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix LaTeX backend test refs Changes to GHC pretty printing code have resulted in some differences to Haddock's LaTeX output. - Type variables are printed explicitly quantified in the LinearTypes test - Wildcard types in type family equations are now printed numbered, e.g. _1 _2, in the TypeFamilies3 test - Combined signatures in DefaultSignatures test are now documented as separate signatures - - - - - 41b5b296 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and test source updates - Stop using kind `*` in html test sources - Add TypeOperators where necessary to avoid warnings and future errors - Rename some test modules to match their module names - - - - - c640e2a2 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix missing deprecation warnings on record fields `lookupOccEnv` was used to resolve `OccNames` with warnings attached, but it doesn't look in the record field namespace. Thus, if a record field had a warning attached, it would not resolve and the warning map would not include it. This commit fixes by using `lookupOccEnv_WithFields` instead. - - - - - fad0c462 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and some comments - - - - - 751fd023 by Finley McIlwaine at 2023-06-01T14:11:41-06:00 Accept HTML test diffs All diffs now boil down to the expected differences resulting from declarations being reified from TyThings in hi-haddock. Surface syntax now has much less control over the syntax used in the documentation. - - - - - d835c845 by Finley McIlwaine at 2023-06-01T14:11:45-06:00 Adapt to new load' type - - - - - dcf776c4 by Finley McIlwaine at 2023-06-01T14:13:13-06:00 Update mkWarningMap and moduleWarning - - - - - 8e8432fd by Finley McIlwaine at 2023-06-01T14:28:54-06:00 Revert load' changes - - - - - aeb2982c by Finley McIlwaine at 2023-06-01T14:40:24-06:00 Accept change to Instances test in html-test Link to Data.Tuple instead of GHC.Tuple.Prim - - - - - 8adfdbac by Finley McIlwaine at 2023-06-01T15:53:17-06:00 Reset ghc dep to ^>= 9.6 - - - - - f6e060cc by Krzysztof Gogolewski at 2023-06-02T09:07:25-04:00 cleanup: Remove unused field from SelfBoot It is no longer needed since Note [Extra dependencies from .hs-boot files] was deleted in 6998772043. I've also added tildes to Note headers, otherwise they're not detected by the linter. - - - - - 82eacab6 by sheaf at 2023-06-02T09:08:01-04:00 Delete GHC.Tc.Utils.Zonk This module was split up into GHC.Tc.Zonk.Type and GHC.Tc.Zonk.TcType in commit f62d8195, but I forgot to delete the original module - - - - - 4a4eb761 by Ben Gamari at 2023-06-02T23:53:21-04:00 base: Add build-order import of GHC.Types in GHC.IO.Handle.Types For reasons similar to those described in Note [Depend on GHC.Num.Integer]. Fixes #23411. - - - - - f53ac0ae by Sylvain Henry at 2023-06-02T23:54:01-04:00 JS: fix and enhance non-minimized code generation (#22455) Flag -ddisable-js-minimizer was producing invalid code. Fix that and also a few other things to generate nicer JS code for debugging. The added test checks that we don't regress when using the flag. - - - - - f7744e8e by Andrey Mokhov at 2023-06-03T16:49:44-04:00 [hadrian] Fix multiline synopsis rendering - - - - - b2c745db by Andrew Lelechenko at 2023-06-03T16:50:23-04:00 Elaborate on performance properties of Data.List.++ - - - - - 7cd8a61e by Matthew Pickering at 2023-06-05T11:46:23+01:00 Big TcLclEnv and CtLoc refactoring The overall goal of this refactoring is to reduce the dependency footprint of the parser and syntax tree. Good reasons include: - Better module graph parallelisability - Make it easier to migrate error messages without introducing module loops - Philosophically, there's not reason for the AST to depend on half the compiler. One of the key edges which added this dependency was > GHC.Hs.Expr -> GHC.Tc.Types (TcLclEnv) As this in turn depending on TcM which depends on HscEnv and so on. Therefore the goal of this patch is to move `TcLclEnv` out of `GHC.Tc.Types` so that `GHC.Hs.Expr` can import TcLclEnv without incurring a huge dependency chain. The changes in this patch are: * Move TcLclEnv from GHC.Tc.Types to GHC.Tc.Types.LclEnv * Create new smaller modules for the types used in TcLclEnv New Modules: - GHC.Tc.Types.ErrCtxt - GHC.Tc.Types.BasicTypes - GHC.Tc.Types.TH - GHC.Tc.Types.LclEnv - GHC.Tc.Types.CtLocEnv - GHC.Tc.Errors.Types.PromotionErr Removed Boot File: - {-# SOURCE #-} GHC.Tc.Types * Introduce TcLclCtxt, the part of the TcLclEnv which doesn't participate in restoreLclEnv. * Replace TcLclEnv in CtLoc with specific CtLocEnv which is defined in GHC.Tc.Types.CtLocEnv. Use CtLocEnv in Implic and CtLoc to record the location of the implication and constraint. By splitting up TcLclEnv from GHC.Tc.Types we allow GHC.Hs.Expr to no longer depend on the TcM monad and all that entails. Fixes #23389 #23409 - - - - - 3d8d39d1 by Matthew Pickering at 2023-06-05T11:46:23+01:00 Remove dependency of GHC.Tc.Utils.TcType on GHC.Driver.Session This removes the usage of DynFlags from Tc.Utils.TcType so that it no longer depends on GHC.Driver.Session. In general we don't want anything which is a dependency of Language.Haskell.Syntax to depend on GHC.Driver.Session and removing this edge gets us closer to that goal. - - - - - 18db5ada by Matthew Pickering at 2023-06-05T11:46:23+01:00 Move isIrrefutableHsPat to GHC.Rename.Utils and rename to isIrrefutableHsPatRn This removes edge from GHC.Hs.Pat to GHC.Driver.Session, which makes Language.Haskell.Syntax end up depending on GHC.Driver.Session. - - - - - 12919dd5 by Matthew Pickering at 2023-06-05T11:46:23+01:00 Remove dependency of GHC.Tc.Types.Constraint on GHC.Driver.Session - - - - - eb852371 by Matthew Pickering at 2023-06-05T11:46:24+01:00 hole fit plugins: Split definition into own module The hole fit plugins are defined in terms of TcM, a type we want to avoid depending on from `GHC.Tc.Errors.Types`. By moving it into its own module we can remove this dependency. It also simplifies the necessary boot file. - - - - - 9e5246d7 by Matthew Pickering at 2023-06-05T11:46:24+01:00 Move GHC.Core.Opt.CallerCC Types into separate module This allows `GHC.Driver.DynFlags` to depend on these types without depending on CoreM and hence the entire simplifier pipeline. We can also remove a hs-boot file with this change. - - - - - 52d6a7d7 by Matthew Pickering at 2023-06-05T11:46:24+01:00 Remove unecessary SOURCE import - - - - - 698d160c by Matthew Pickering at 2023-06-05T11:46:24+01:00 testsuite: Accept new output for CountDepsAst and CountDepsParser tests These are in a separate commit as the improvement to these tests is the cumulative effect of the previous set of patches rather than just the responsibility of the last one in the patchset. - - - - - 58ccf02e by sheaf at 2023-06-05T16:00:47-04:00 TTG: only allow VarBind at GhcTc The VarBind constructor of HsBind is only used at the GhcTc stage. This commit makes that explicit by setting the extension field of VarBind to be DataConCantHappen at all other stages. This allows us to delete a dead code path in GHC.HsToCore.Quote.rep_bind, and remove some panics. - - - - - 2b1ce93d by Finley McIlwaine at 2023-06-06T07:50:04-06:00 Update CHANGES.md, user guide, recomp avoidance * Add --trace-args flag for tracing arguments received to standard output * Avoid recompiling due to changes in optimization flags * Update users guide and changes.md - - - - - 54b83253 by Matthew Craven at 2023-06-06T12:59:25-04:00 Generate Addr# access ops programmatically The existing utils/genprimopcode/gen_bytearray_ops.py was relocated and extended for this purpose. Additionally, hadrian now knows about this script and uses it when generating primops.txt - - - - - ecadbc7e by Matthew Pickering at 2023-06-06T13:00:01-04:00 ghcup-metadata: Only add Nightly tag when replacing LatestNightly Previously we were always adding the Nightly tag, but this led to all the previous builds getting an increasing number of nightly tags over time. Now we just add it once, when we remove the LatestNightly tag. - - - - - f3da6676 by Finley McIlwaine at 2023-06-06T14:12:56-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - bf36c467 by Matthew Pickering at 2023-06-07T10:16:09+01:00 Revert back to e16e20d592a6f5d9ed1af17b77fafd6495242345 Neither of these MRs are ready to land yet which causes issues with other MRs which are ready to land and need haddock changes. - - - - - 421510a9 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 atSign has no unicode variant Prior to this change, atSign was defined as follows: atSign unicode = text (if unicode then "@" else "@") Yes, this is the same symbol '\64' and not your font playing tricks on you. Now we define: atSign = char '@' Both the LaTeX and the Xhtml backend are updated accordingly. - - - - - 3785c276 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 LaTeX: fix printing of type variable bindings Consider this type signature: kindOf :: forall {k} (a :: k). Proxy a -> Proxy k Prior to this fix, the LaTeX backend rendered it like this: kindOf :: forall k a. Proxy a -> Proxy k Now we preserve explicit specificity and kind annotations. - - - - - 0febf3a8 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 Add support for invisible binders in type declarations - - - - - 4aea0a72 by Vladislav Zavialov at 2023-06-07T12:06:46+02:00 Invisible binders in type declarations (#22560) This patch implements @k-binders introduced in GHC Proposal #425 and guarded behind the TypeAbstractions extension: type D :: forall k j. k -> j -> Type data D @k @j a b = ... ^^ ^^ To represent the new syntax, we modify LHsQTyVars as follows: - hsq_explicit :: [LHsTyVarBndr () pass] + hsq_explicit :: [LHsTyVarBndr (HsBndrVis pass) pass] HsBndrVis is a new data type that records the distinction between type variable binders written with and without the @ sign: data HsBndrVis pass = HsBndrRequired | HsBndrInvisible (LHsToken "@" pass) The rest of the patch updates GHC, template-haskell, and haddock to handle the new syntax. Parser: The PsErrUnexpectedTypeAppInDecl error message is removed. The syntax it used to reject is now permitted. Renamer: The @ sign does not affect the scope of a binder, so the changes to the renamer are minimal. See rnLHsTyVarBndrVisFlag. Type checker: There are three code paths that were updated to deal with the newly introduced invisible type variable binders: 1. checking SAKS: see kcCheckDeclHeader_sig, matchUpSigWithDecl 2. checking CUSK: see kcCheckDeclHeader_cusk 3. inference: see kcInferDeclHeader, rejectInvisibleBinders Helper functions bindExplicitTKBndrs_Q_Skol and bindExplicitTKBndrs_Q_Tv are generalized to work with HsBndrVis. Updates the haddock submodule. Metric Increase: MultiLayerModulesTH_OneShot Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - b7600997 by Josh Meredith at 2023-06-07T13:10:21-04:00 JS: clean up FFI 'fat arrow' calls in base:System.Posix.Internals (#23481) - - - - - e5d3940d by Sebastian Graf at 2023-06-07T18:01:28-04:00 Update CODEOWNERS - - - - - 960ef111 by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Remove IPE enabled builds from CI" This reverts commit 41b41577c8a28c236fa37e8f73aa1c6dc368d951. - - - - - bad1c8cc by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Update user's guide and release notes, small fixes" This reverts commit 3ded9a1cd22f9083f31bc2f37ee1b37f9d25dab7. - - - - - 12726d90 by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Add IPE-enabled builds to CI" This reverts commit 09d93bd0305b0f73422ce7edb67168c71d32c15f. - - - - - dbdd989d by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Add optional dependencies to ./configure output" This reverts commit a00488665cd890a26a5564a64ba23ff12c9bec58. - - - - - 240483af by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Fix IPE data decompression buffer allocation" This reverts commit 0e85099b9316ee24565084d5586bb7290669b43a. - - - - - 9b8c7dd8 by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Fix byte order of IPE data, fix IPE tests" This reverts commit 7872e2b6f08ea40d19a251c4822a384d0b397327. - - - - - 3364379b by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Add note describing IPE data compression" This reverts commit 69563c97396b8fde91678fae7d2feafb7ab9a8b0. - - - - - fda30670 by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Fix libzstd detection in configure and RTS" This reverts commit 5aef5658ad5fb96bac7719710e0ea008bf7b62e0. - - - - - 1cbcda9a by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "IPE data compression" This reverts commit b7a640acf7adc2880e5600d69bcf2918fee85553. - - - - - fb5e99aa by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Add IPE compression to configure" This reverts commit 5d1f2411f4becea8650d12d168e989241edee186. - - - - - 2cdcb3a5 by Matthew Pickering at 2023-06-07T18:02:04-04:00 Revert "Restructure IPE buffer layout" This reverts commit f3556d6cefd3d923b36bfcda0c8185abb1d11a91. - - - - - 2b0c9f5e by Simon Peyton Jones at 2023-06-08T07:52:34+00:00 Don't report redundant Givens from quantified constraints This fixes #23323 See (RC4) in Note [Tracking redundant constraints] - - - - - 13e33bb3 by Finley McIlwaine at 2023-06-08T07:51:59-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - 3e5340ce by Finley McIlwaine at 2023-06-08T07:54:27-06:00 Add note about stubdir to recompilation docs - - - - - db7e84dc by Finley at 2023-06-08T08:11:03-06:00 Merge pull request haskell/haddock#1597 from haskell/finley/hi-haddock-9.6 hi-haddock for ghc 9.6 - - - - - 567b32e1 by David Binder at 2023-06-08T18:41:29-04:00 Update the outdated instructions in HACKING.md on how to compile GHC - - - - - 2b1a4abe by Ryan Scott at 2023-06-09T07:56:58-04:00 Restore mingwex dependency on Windows This partially reverts some of the changes in !9475 to make `base` and `ghc-prim` depend on the `mingwex` library on Windows. It also restores the RTS's stubs for `mingwex`-specific symbols such as `_lock_file`. This is done because the C runtime provides `libmingwex` nowadays, and moreoever, not linking against `mingwex` requires downstream users to link against it explicitly in difficult-to-predict circumstances. Better to always link against `mingwex` and prevent users from having to do the guesswork themselves. See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10360#note_495873 for the discussion that led to this. - - - - - 28954758 by Ryan Scott at 2023-06-09T07:56:58-04:00 RtsSymbols.c: Remove mingwex symbol stubs As of !9475, the RTS now links against `ucrt` instead of `msvcrt` on Windows, which means that the RTS no longer needs to declare stubs for the `__mingw_*` family of symbols. Let's remove these stubs to avoid confusion. Fixes #23309. - - - - - 3ab0155b by Ryan Scott at 2023-06-09T07:57:35-04:00 Consistently use validity checks for TH conversion of data constructors We were checking that TH-spliced data declarations do not look like this: ```hs data D :: Type = MkD Int ``` But we were only doing so for `data` declarations' data constructors, not for `newtype`s, `data instance`s, or `newtype instance`s. This patch factors out the necessary validity checks into its own `cvtDataDefnCons` function and uses it in all of the places where it needs to be. Fixes #22559. - - - - - a24b83dd by Matthew Pickering at 2023-06-09T15:19:00-04:00 Fix behaviour of -keep-tmp-files when used in OPTIONS_GHC pragma This fixes the behaviour of -keep-tmp-files when used in an OPTIONS_GHC pragma for files with module level scope. Instead of simple not deleting the files, we also need to remove them from the TmpFs so they are not deleted later on when all the other files are deleted. There are additional complications because you also need to remove the directory where these files live from the TmpFs so we don't try to delete those later either. I added two tests. 1. Tests simply that -keep-tmp-files works at all with a single module and --make mode. 2. The other tests that temporary files are deleted for other modules which don't enable -keep-tmp-files. Fixes #23339 - - - - - dcf32882 by Matthew Pickering at 2023-06-09T15:19:00-04:00 withDeferredDiagnostics: When debugIsOn, write landmine into IORef to catch use-after-free. Ticket #23305 reports an error where we were attempting to use the logger which was created by withDeferredDiagnostics after its scope had ended. This problem would have been caught by this patch and a validate build: ``` +*** Exception: Use after free +CallStack (from HasCallStack): + error, called at compiler/GHC/Driver/Make.hs:<line>:<column> in <package-id>:GHC.Driver.Make ``` This general issue is tracked by #20981 - - - - - 432c736c by Matthew Pickering at 2023-06-09T15:19:00-04:00 Don't return complete HscEnv from upsweep By returning a complete HscEnv from upsweep the logger (as introduced by withDeferredDiagnostics) was escaping the scope of withDeferredDiagnostics and hence we were losing error messages. This is reminiscent of #20981, which also talks about writing errors into messages after their scope has ended. See #23305 for details. - - - - - 26013cdc by Alexander McKenna at 2023-06-09T15:19:41-04:00 Dump `SpecConstr` specialisations separately Introduce a `-ddump-spec-constr` flag which debugs specialisations from `SpecConstr`. These are no longer shown when you use `-ddump-spec`. - - - - - 4639100b by Matthew Pickering at 2023-06-09T18:50:43-04:00 Add role annotations to SNat, SSymbol and SChar Ticket #23454 explained it was possible to implement unsafeCoerce because SNat was lacking a role annotation. As these are supposed to be singleton types but backed by an efficient representation the correct annotation is nominal to ensure these kinds of coerces are forbidden. These annotations were missed from https://github.com/haskell/core-libraries-committee/issues/85 which was implemented in 532de36870ed9e880d5f146a478453701e9db25d. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/170 Fixes #23454 - - - - - 9c0dcff7 by Matthew Pickering at 2023-06-09T18:51:19-04:00 Remove non-existant bytearray-ops.txt.pp file from ghc.cabal.in This broke the sdist generation. Fixes #23489 - - - - - 273ff0c7 by David Binder at 2023-06-09T18:52:00-04:00 Regression test T13438 is no longer marked as "expect_broken" in the testsuite driver. - - - - - b84a2900 by Andrei Borzenkov at 2023-06-10T08:27:28-04:00 Fix -Wterm-variable-capture scope (#23434) -Wterm-variable-capture wasn't accordant with type variable scoping in associated types, in type classes. For example, this code produced the warning: k = 12 class C k a where type AT a :: k -> Type I solved this issue by reusing machinery of newTyVarNameRn function that is accordand with associated types: it does lookup for each free type variable when we are in the type class context. And in this patch I use result of this work to make sure that -Wterm-variable-capture warns only on implicitly quantified type variables. - - - - - 9d1a8d87 by Jorge Mendes at 2023-06-10T08:28:10-04:00 Remove redundant case statement in rts/js/mem.js. - - - - - a1f350e2 by Oleg Grenrus at 2023-06-13T09:42:16-04:00 Change WarningWithFlag to plural WarningWithFlags Resolves #22825 Now each diagnostic can name multiple different warning flags for its reason. There is currently one use case: missing signatures. Currently we need to check which warning flags are enabled when generating the diagnostic, which is against the declarative nature of the diagnostic framework. This patch allows a warning diagnostic to have multiple warning flags, which makes setup more declarative. The WarningWithFlag pattern synonym is added for backwards compatibility The 'msgEnvReason' field is added to MsgEnvelope to store the `ResolvedDiagnosticReason`, which accounts for the enabled flags, and then that is used for pretty printing the diagnostic. - - - - - ec01f0ec by Matthew Pickering at 2023-06-13T09:42:59-04:00 Add a test Way for running ghci with Core optimizations Tracking ticket: #23059 This runs compile_and_run tests with optimised code with bytecode interpreter Changed submodules: hpc, process Co-authored-by: Torsten Schmits <git at tryp.io> - - - - - c6741e72 by Rodrigo Mesquita at 2023-06-13T09:43:38-04:00 Configure -Qunused-arguments instead of hardcoding it When GHC invokes clang, it currently passes -Qunused-arguments to discard warnings resulting from GHC using multiple options that aren't used. In this commit, we configure -Qunused-arguments into the Cc options instead of checking if the compiler is clang at runtime and hardcoding the flag into GHC. This is part of the effort to centralise toolchain information in toolchain target files at configure time with the end goal of a runtime retargetable GHC. This also means we don't need to call getCompilerInfo ever, which improves performance considerably (see !10589). Metric Decrease: PmSeriesG T10421 T11303b T12150 T12227 T12234 T12425 T13035 T13253-spj T13386 T15703 T16875 T17836b T17977 T17977b T18140 T18282 T18304 T18698a T18698b T18923 T20049 T21839c T3064 T5030 T5321FD T5321Fun T5837 T6048 T9020 T9198 T9872d T9961 - - - - - 0128db87 by Victor Cacciari Miraldo at 2023-06-13T09:44:18-04:00 Improve docs for Data.Fixed; adds 'realToFrac' as an option for conversion between different precisions. - - - - - 95b69cfb by Ryan Scott at 2023-06-13T09:44:55-04:00 Add regression test for #23143 !10541, the fix for #23323, also fixes #23143. Let's add a regression test to ensure that it stays fixed. Fixes #23143. - - - - - ed2dbdca by Emily Martins at 2023-06-13T09:45:37-04:00 delete GHCi.UI.Tags module and remove remaining references Co-authored-by: Tilde Rose <t1lde at protonmail.com> - - - - - c90d96e4 by Victor Cacciari Miraldo at 2023-06-13T09:46:26-04:00 Add regression test for 17328 - - - - - de58080c by Victor Cacciari Miraldo at 2023-06-13T09:46:26-04:00 Skip checking whether constructors are in scope when deriving newtype instances. Fixes #17328 - - - - - 5e3c2b05 by Philip Hazelden at 2023-06-13T09:47:07-04:00 Don't suggest `DeriveAnyClass` when instance can't be derived. Fixes #19692. Prototypical cases: class C1 a where x1 :: a -> Int data G1 = G1 deriving C1 class C2 a where x2 :: a -> Int x2 _ = 0 data G2 = G2 deriving C2 Both of these used to give this suggestion, but for C1 the suggestion would have failed (generated code with undefined methods, which compiles but warns). Now C2 still gives the suggestion but C1 doesn't. - - - - - 80a0b099 by David Binder at 2023-06-13T09:47:49-04:00 Add testcase for error GHC-00711 to testsuite - - - - - e4b33a1d by Oleg Grenrus at 2023-06-14T07:01:21-04:00 Add -Wmissing-poly-kind-signatures Implements #22826 This is a restricted version of -Wmissing-kind-signatures shown only for polykinded types. - - - - - f8395b94 by doyougnu at 2023-06-14T07:02:01-04:00 ci: special case in req_host_target_ghc for JS - - - - - b852a5b6 by Gergő Érdi at 2023-06-14T07:02:42-04:00 When forcing a `ModIface`, force the `MINIMAL` pragmas in class definitions Fixes #23486 - - - - - c29b45ee by Krzysztof Gogolewski at 2023-06-14T07:03:19-04:00 Add a testcase for #20076 Remove 'recursive' in the error message, since the error can arise without recursion. - - - - - b80ef202 by Krzysztof Gogolewski at 2023-06-14T07:03:56-04:00 Use tcInferFRR to prevent bad generalisation Fixes #23176 - - - - - bd8ef37d by Matthew Pickering at 2023-06-14T07:04:31-04:00 ci: Add dependenices on necessary aarch64 jobs for head.hackage ci These need to be added since we started testing aarch64 on head.hackage CI. The jobs will sometimes fail because they will start before the relevant aarch64 job has finished. Fixes #23511 - - - - - a0c27cee by Vladislav Zavialov at 2023-06-14T07:05:08-04:00 Add standalone kind signatures for Code and TExp CodeQ and TExpQ already had standalone kind signatures even before this change: type TExpQ :: TYPE r -> Kind.Type type CodeQ :: TYPE r -> Kind.Type Now Code and TExp have signatures too: type TExp :: TYPE r -> Kind.Type type Code :: (Kind.Type -> Kind.Type) -> TYPE r -> Kind.Type This is a stylistic change. - - - - - e70c1245 by Tom Ellis at 2023-06-14T07:05:48-04:00 Warn that GHC.TypeLits.Internal should not be used - - - - - 100650e3 by Tom Ellis at 2023-06-14T07:05:48-04:00 Warn that GHC.TypeNats.Internal should not be used - - - - - 4e085d17 by Finley McIlwaine at 2023-06-14T13:41:06-06:00 Replace SYB traversals - - - - - 7b39aec5 by Finley McIlwaine at 2023-06-14T14:20:17-06:00 Test ref accepts, remove unused HaddockClsInst - - - - - 078250ef by Jacco Krijnen at 2023-06-14T17:17:53-04:00 Add more flags for dumping core passes (#23491) - - - - - 1b7604af by Jacco Krijnen at 2023-06-14T17:17:53-04:00 Add tests for dumping flags (#23491) - - - - - 42000000 by Sebastian Graf at 2023-06-14T17:18:29-04:00 Provide a demand signature for atomicModifyMutVar.# (#23047) Fixes #23047 - - - - - 8f27023b by Ben Gamari at 2023-06-15T03:10:24-04:00 compiler: Cross-reference Note [StgToJS design] In particular, the numeric representations are quite useful context in a few places. - - - - - a71b60e9 by Andrei Borzenkov at 2023-06-15T03:11:00-04:00 Implement the -Wimplicit-rhs-quantification warning (#23510) GHC Proposal #425 "Invisible binders in type declarations" forbids implicit quantification of type variables that occur free on the right-hand side of a type synonym but are not mentioned on the left-hand side. The users are expected to rewrite this using invisible binders: type T1 :: forall a . Maybe a type T1 = 'Nothing :: Maybe a -- old type T1 @a = 'Nothing :: Maybe a -- new Since the @k-binders are a new feature, we need to wait for three releases before we require the use of the new syntax. In the meantime, we ought to provide users with a new warning, -Wimplicit-rhs-quantification, that would detect when such implicit quantification takes place, and include it in -Wcompat. - - - - - 0078dd00 by Sven Tennie at 2023-06-15T03:11:36-04:00 Minor refactorings to mkSpillInstr and mkLoadInstr Better error messages. And, use the existing `off` constant to reduce duplication. - - - - - 1792b57a by doyougnu at 2023-06-15T03:12:17-04:00 JS: merge util modules Merge Core and StgUtil modules for StgToJS pass. Closes: #23473 - - - - - 469ff08b by Vladislav Zavialov at 2023-06-15T03:12:57-04:00 Check visibility of nested foralls in can_eq_nc (#18863) Prior to this change, `can_eq_nc` checked the visibility of the outermost layer of foralls: forall a. forall b. forall c. phi1 forall x. forall y. forall z. phi2 ^^ up to here Then it delegated the rest of the work to `can_eq_nc_forall`, which split off all foralls: forall a. forall b. forall c. phi1 forall x. forall y. forall z. phi2 ^^ up to here This meant that some visibility flags were completely ignored. We fix this oversight by moving the check to `can_eq_nc_forall`. - - - - - 59c9065b by Luite Stegeman at 2023-06-15T03:13:37-04:00 JS: use regular mask for blocking IO Blocking IO used uninterruptibleMask which should make any thread blocked on IO unreachable by async exceptions (such as those from timeout). This changes it to a regular mask. It's important to note that the nodejs runtime does not actually interrupt the blocking IO when the Haskell thread receives an async exception, and that file positions may be updated and buffers may be written after the Haskell thread has already resumed. Any file descriptor affected by an async exception interruption should therefore be used with caution. - - - - - 907c06c3 by Luite Stegeman at 2023-06-15T03:13:37-04:00 JS: nodejs: do not set 'readable' handler on stdin at startup The Haskell runtime used to install a 'readable' handler on stdin at startup in nodejs. This would cause the nodejs system to start buffering the stream, causing data loss if the stdin file descriptor is passed to another process. This change delays installation of the 'readable' handler until the first read of stdin by Haskell code. - - - - - a54b40a9 by Luite Stegeman at 2023-06-15T03:13:37-04:00 JS: reserve one more virtual (negative) file descriptor This is needed for upcoming support of the process package - - - - - 78cd1132 by Andrei Borzenkov at 2023-06-15T11:16:11+04:00 Report scoped kind variables at the type-checking phase (#16635) This patch modifies the renamer to respect ScopedTypeVariables in kind signatures. This means that kind variables bound by the outermost `forall` now scope over the type: type F = '[Right @a @() () :: forall a. Either a ()] -- ^^^^^^^^^^^^^^^ ^^^ -- in scope here bound here However, any use of such variables is a type error, because we don't have type-level lambdas to bind them in Core. This is described in the new Note [Type variable scoping errors during type check] in GHC.Tc.Types. - - - - - df9c2090 by Finley McIlwaine at 2023-06-15T08:02:51-06:00 Use batchMsg for progress reporting during load With hi-haddock as is, there is an awkward silence during the load operation. This commit makes haddock use the default `batchMsg` Messager for progress reporting, and makes the default GHC verbosity level 1, so the user can see what GHC is doing. - - - - - f23679a8 by Hécate Moonlight at 2023-06-15T20:31:53+02:00 Merge pull request haskell/haddock#1600 from haskell/finley/hi-haddock-optim - - - - - a7982192 by Finley McIlwaine at 2023-06-15T15:02:16-06:00 hi-haddock squashed - - - - - 4a41ba75 by Sylvain Henry at 2023-06-15T18:09:15-04:00 JS: testsuite: use correct ticket number Replace #22356 with #22349 for these tests because #22356 has been fixed but now these tests fail because of #22349. - - - - - 15f150c8 by Sylvain Henry at 2023-06-15T18:09:16-04:00 JS: testsuite: update ticket numbers - - - - - 08d8e9ef by Sylvain Henry at 2023-06-15T18:09:16-04:00 JS: more triage - - - - - e8752e12 by Krzysztof Gogolewski at 2023-06-15T18:09:52-04:00 Fix test T18522-deb-ppr Fixes #23509 - - - - - c34f0c8d by Finley McIlwaine at 2023-06-15T16:22:03-06:00 Merge remote-tracking branch 'origin/ghc-9.6' into finley/hi-haddock-squashed - - - - - 62c56416 by Ben Price at 2023-06-16T05:52:39-04:00 Lint: more details on "Occurrence is GlobalId, but binding is LocalId" This is helpful when debugging a pass which accidentally shadowed a binder. - - - - - d4c10238 by Ryan Hendrickson at 2023-06-16T05:53:22-04:00 Clean a stray bit of text in user guide - - - - - 93647b5c by Vladislav Zavialov at 2023-06-16T05:54:02-04:00 testsuite: Add forall visibility test cases The added tests ensure that the type checker does not confuse visible and invisible foralls. VisFlag1: kind-checking type applications and inferred type variable instantiations VisFlag1_ql: kind-checking Quick Look instantiations VisFlag2: kind-checking type family instances VisFlag3: checking kind annotations on type parameters of associated type families VisFlag4: checking kind annotations on type parameters in type declarations with SAKS VisFlag5: checking the result kind annotation of data family instances - - - - - 40452797 by Bartłomiej Cieślar at 2023-06-16T12:26:04+02:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - e58673bf by Ben Gamari at 2023-06-16T09:33:35-04:00 Bump GHC version to 9.8 - - - - - 74bdf972 by Ben Gamari at 2023-06-16T09:36:18-04:00 Merge commit 'fcaaad06770a26d35d4aafd65772dedadf17669c' into ghc-head - - - - - a5f0c00e by Sylvain Henry at 2023-06-16T12:25:40-04:00 JS: factorize SaneDouble into its own module Follow-up of b159e0e9 whose ticket is #22736 - - - - - 0baf9e7c by Krzysztof Gogolewski at 2023-06-16T12:26:17-04:00 Add tests for #21973 - - - - - 640ea90e by Diego Diverio at 2023-06-16T23:07:55-04:00 Update documentation for `<**>` - - - - - 2469a813 by Diego Diverio at 2023-06-16T23:07:55-04:00 Update text - - - - - 1f515bbb by Diego Diverio at 2023-06-16T23:07:55-04:00 Update examples - - - - - 7af99a0d by Diego Diverio at 2023-06-16T23:07:55-04:00 Update documentation to actually display code correctly - - - - - 800aad7e by Andrei Borzenkov at 2023-06-16T23:08:32-04:00 Type/data instances: require that variables on the RHS are mentioned on the LHS (#23512) GHC Proposal #425 "Invisible binders in type declarations" restricts the scope of type and data family instances as follows: In type family and data family instances, require that every variable mentioned on the RHS must also occur on the LHS. For example, here are three equivalent type instance definitions accepted before this patch: type family F1 a :: k type instance F1 Int = Any :: j -> j type family F2 a :: k type instance F2 @(j -> j) Int = Any :: j -> j type family F3 a :: k type instance forall j. F3 Int = Any :: j -> j - In F1, j is implicitly quantified and it occurs only on the RHS; - In F2, j is implicitly quantified and it occurs both on the LHS and the RHS; - In F3, j is explicitly quantified. Now F1 is rejected with an out-of-scope error, while F2 and F3 continue to be accepted. - - - - - 9132d529 by Sylvain Henry at 2023-06-18T02:50:34-04:00 JS: testsuite: use correct ticket numbers - - - - - c3a1274c by Sylvain Henry at 2023-06-18T02:50:34-04:00 JS: don't dump eventlog to stderr by default Fix T16707 Bump stm submodule - - - - - 89bb8ad8 by Ryan Hendrickson at 2023-06-18T02:51:14-04:00 Fix TH name lookup for symbolic tycons (#23525) - - - - - cb9e1ce4 by Finley McIlwaine at 2023-06-18T21:16:45-06:00 IPE data compression IPE data resulting from the `-finfo-table-map` flag may now be compressed by configuring the GHC build with the `--enable-ipe-data-compression` flag. This results in about a 20% reduction in the size of IPE-enabled build results. The compression library, zstd, may optionally be statically linked by configuring with the `--enabled-static-libzstd` flag (on non-darwin platforms) libzstd version 1.4.0 or greater is required. - - - - - 0cbc3ae0 by Gergő Érdi at 2023-06-19T09:11:38-04:00 Add `IfaceWarnings` to represent the `ModIface`-storable parts of a `Warnings GhcRn`. Fixes #23516 - - - - - 3e80c2b4 by Arnaud Spiwack at 2023-06-20T03:19:41-04:00 Avoid desugaring non-recursive lets into recursive lets This prepares for having linear let expressions in the frontend. When desugaring lets, SPECIALISE statements create more copies of a let binding. Because of the rewrite rules attached to the bindings, there are dependencies between the generated binds. Before this commit, we simply wrapped all these in a mutually recursive let block, and left it to the simplified to sort it out. With this commit: we are careful to generate the bindings in dependency order, so that we can wrap them in consecutive lets (if the source is non-recursive). - - - - - 9fad49e0 by Ben Gamari at 2023-06-20T03:20:19-04:00 rts: Do not call exit() from SIGINT handler Previously `shutdown_handler` would call `stg_exit` if the scheduler was Oalready found to be in `SCHED_INTERRUPTING` state (or higher). However, `stg_exit` is not signal-safe as it calls `exit` (which calls `atexit` handlers). The only safe thing to do in this situation is to call `_exit`, which terminates with minimal cleanup. Fixes #23417. - - - - - 7485f848 by Andrew Lelechenko at 2023-06-20T03:20:57-04:00 Bump Cabal submodule This requires changing the recomp007 test because now cabal passes `this-unit-id` to executable components, and that unit-id contains a hash which includes the ABI of the dependencies. Therefore changing the dependencies means that -this-unit-id changes and recompilation is triggered. The spririt of the test is to test GHC's recompilation logic assuming that `-this-unit-id` is constant, so we explicitly pass `-ipid` to `./configure` rather than letting `Cabal` work it out. - - - - - 1464a2a8 by mangoiv at 2023-06-20T03:21:34-04:00 [feat] add a hint to `HasField` error message - add a hint that indicates that the record that the record dot is used on might just be missing a field - as the intention of the programmer is not entirely clear, it is only shown if the type is known - This addresses in part issue #22382 - - - - - 418ee3dc by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Remove NFData SourceText, IfaceWarnings updates The NFData SourceText instance is now available in GHC Handle mod_iface mi_warns now being IfaceWarnings - - - - - 62f31380 by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Accept Instances.hs test output Due to ghc!10469. - - - - - a8f2fc0e by Ben Gamari at 2023-06-20T15:48:08-04:00 Test fixes for "Fix associated data family doc structure items" Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - b65e78dd by Ben Gamari at 2023-06-20T16:56:43-04:00 rts/ipe: Fix unused lock warning - - - - - 6086effd by Ben Gamari at 2023-06-20T16:56:44-04:00 rts/ProfilerReportJson: Fix memory leak - - - - - 1e48c434 by Ben Gamari at 2023-06-20T16:56:44-04:00 rts: Various warnings fixes - - - - - 471486b9 by Ben Gamari at 2023-06-20T16:56:44-04:00 rts: Fix printf format mismatch - - - - - 80603fb3 by Ben Gamari at 2023-06-20T16:56:44-04:00 rts: Fix incorrect #include <sys/poll.h> According to Alpine's warnings and poll(2), <poll.h> should be preferred. - - - - - ff18e6fd by Ben Gamari at 2023-06-20T16:56:44-04:00 nonmoving: Fix unused definition warrnings - - - - - 6e7fe8ee by Ben Gamari at 2023-06-20T16:56:44-04:00 Disable futimens on Darwin. See #22938 - - - - - b7706508 by Ben Gamari at 2023-06-20T16:56:44-04:00 rts: Fix incorrect CPP guard - - - - - 94f00e9b by Ben Gamari at 2023-06-20T16:56:44-04:00 hadrian: Ensure that -Werror is passed when compiling the RTS. Previously the `+werror` transformer would only pass `-Werror` to GHC, which does not ensure that the same is passed to the C compiler when building the RTS. Arguably this is itself a bug but for now we will just work around this by passing `-optc-Werror` to GHC. I tried to enable `-Werror` in all C compilations but the boot libraries are something of a portability nightmare. - - - - - 5fb54bf8 by Ben Gamari at 2023-06-20T16:56:44-04:00 rts: Disable `#pragma GCC`s on clang compilers Otherwise the build fails due to warnings. See #23530. - - - - - cf87f380 by Ben Gamari at 2023-06-20T16:56:44-04:00 rts: Fix capitalization of prototype - - - - - 17f250d7 by Ben Gamari at 2023-06-20T16:56:44-04:00 rts: Fix incorrect format specifier - - - - - 0ff1c501 by Josh Meredith at 2023-06-20T16:57:20-04:00 JS: remove js_broken(22576) in favour of the pre-existing wordsize(32) condition (#22576) - - - - - 3d1d42b7 by Finley McIlwaine at 2023-06-21T12:04:58-04:00 Memory usage fixes for Haddock - Do not include `mi_globals` in the `NoBackend` backend. It was only included for Haddock, but Haddock does not actually need it. This causes a 200MB reduction in max residency when generating haddocks on the Agda codebase (roughly 1GB to 800MB). - Make haddock_{parser,renamer}_perf tests more accurate by forcing docs to be written to interface files using `-fwrite-interface` Bumps haddock submodule. Metric Decrease: haddock.base - - - - - 8185b1c2 by Finley McIlwaine at 2023-06-21T12:04:58-04:00 Fix associated data family doc structure items Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - 4d356ea3 by Sylvain Henry at 2023-06-21T12:04:59-04:00 JS: implement TH support - Add ghc-interp.js bootstrap script for the JS interpreter - Interactively link and execute iserv code from the ghci package - Incrementally load and run JS code for splices into the running iserv Co-authored-by: Luite Stegeman <stegeman at gmail.com> - - - - - 3249cf12 by Sylvain Henry at 2023-06-21T12:04:59-04:00 Don't use getKey - - - - - f84ff161 by Sylvain Henry at 2023-06-21T12:04:59-04:00 Stg: return imported FVs This is used to determine what to link when using the interpreter. For now it's only used by the JS interpreter but it could easily be used by the native interpreter too (instead of extracting names from compiled BCOs). - - - - - fab2ad23 by Sylvain Henry at 2023-06-21T12:04:59-04:00 Fix some recompilation avoidance tests - - - - - a897dc13 by Sylvain Henry at 2023-06-21T12:04:59-04:00 TH_import_loop is now broken as expected - - - - - dbb4ad51 by Sylvain Henry at 2023-06-21T12:04:59-04:00 JS: always recompile when TH is enabled (cf #23013) - - - - - cb1ac33e by Bartłomiej Cieślar at 2023-06-21T12:56:02-04:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 9933e10b by Ben Gamari at 2023-06-21T12:56:02-04:00 Bump GHC version to 9.8 - - - - - 711b1d24 by Bartłomiej Cieślar at 2023-06-21T12:59:27-04:00 Add support for deprecating exported items (proposal #134) This is an implementation of the deprecated exports proposal #134. The proposal introduces an ability to introduce warnings to exports. This allows for deprecating a name only when it is exported from a specific module, rather than always depreacting its usage. In this example: module A ({-# DEPRECATED "do not use" #-} x) where x = undefined --- module B where import A(x) `x` will emit a warning when it is explicitly imported. Like the declaration warnings, export warnings are first accumulated within the `Warnings` struct, then passed into the ModIface, from which they are then looked up and warned about in the importing module in the `lookup_ie` helpers of the `filterImports` function (for the explicitly imported names) and in the `addUsedGRE(s)` functions where they warn about regular usages of the imported name. In terms of the AST information, the custom warning is stored in the extension field of the variants of the `IE` type (see Trees that Grow for more information). The commit includes a bump to the haddock submodule added in MR #28 Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - c1865854 by Ben Gamari at 2023-06-21T12:59:30-04:00 configure: Bump version to 9.8 Bumps Haddock submodule - - - - - fe8c18b6 by Ben Gamari at 2023-06-21T15:36:29-04:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - c61a0d5b by Ben Gamari at 2023-06-21T16:10:51-04:00 Bump GHC version to 9.9 - - - - - 4e1de71c by Ben Gamari at 2023-06-21T21:07:48-04:00 configure: Bump version to 9.9 Bumps haddock submodule. - - - - - 5b6612bc by Ben Gamari at 2023-06-23T03:56:49-04:00 rts: Work around missing prototypes errors Darwin's toolchain inexpliciably claims that `write_barrier` and friends have declarations without prototypes, despite the fact that (a) they are definitions, and (b) the prototypes appear only a few lines above. Work around this by making the definitions proper prototypes. - - - - - 43b66a13 by Matthew Pickering at 2023-06-23T03:57:26-04:00 ghcup-metadata: Fix date modifier (M = minutes, m = month) Fixes #23552 - - - - - 564164ef by Luite Stegeman at 2023-06-24T10:27:29+09:00 Support large stack frames/offsets in GHCi bytecode interpreter Bytecode instructions like PUSH_L (push a local variable) contain an operand that refers to the stack slot. Before this patch, the operand type was SmallOp (Word16), limiting the maximum stack offset to 65535 words. This could cause compiler panics in some cases (See #22888). This patch changes the operand type for stack offsets from SmallOp to Op, removing the stack offset limit. Fixes #22888 - - - - - 8d6574bc by Sylvain Henry at 2023-06-26T13:15:06-04:00 JS: support levity-polymorphic datatypes (#22360,#22291) - thread knowledge about levity into PrimRep instead of panicking - JS: remove assumption that unlifted heap objects are rts objects (TVar#, etc.) Doing this also fixes #22291 (test added). There is a small performance hit (~1% more allocations). Metric Increase: T18698a T18698b - - - - - 5578bbad by Matthew Pickering at 2023-06-26T13:15:43-04:00 MR Review Template: Mention "Blocked on Review" label In order to improve our MR review processes we now have the label "Blocked on Review" which allows people to signal that a MR is waiting on a review to happen. See: https://mail.haskell.org/pipermail/ghc-devs/2023-June/021255.html - - - - - 4427e9cf by Matthew Pickering at 2023-06-26T13:15:43-04:00 Move MR template to Default.md This makes it more obvious what you have to modify to affect the default template rather than looking in the project settings. - - - - - 522bd584 by Arnaud Spiwack at 2023-06-26T13:16:33-04:00 Revert "Avoid desugaring non-recursive lets into recursive lets" This (temporary) reverts commit 3e80c2b40213bebe302b1bd239af48b33f1b30ef. Fixes #23550 - - - - - c59fbb0b by Torsten Schmits at 2023-06-26T19:34:20+02:00 Propagate breakpoint information when inlining across modules Tracking ticket: #23394 MR: !10448 * Add constructor `IfaceBreakpoint` to `IfaceTickish` * Store breakpoint data in interface files * Store `BreakArray` for the breakpoint's module, not the current module, in BCOs * Store module name in BCOs instead of `Unique`, since the `Unique` from an `Iface` doesn't match the modules in GHCi's state * Allocate module name in `ModBreaks`, like `BreakArray` * Lookup breakpoint by module name in GHCi * Skip creating breakpoint instructions when no `ModBreaks` are available, rather than injecting `ModBreaks` in the linker when breakpoints are enabled, and panicking when `ModBreaks` is missing - - - - - 6f904808 by Greg Steuck at 2023-06-27T16:53:07-04:00 Remove undefined FP_PROG_LD_BUILD_ID from configure.ac's - - - - - e89aa072 by Andrei Borzenkov at 2023-06-27T16:53:44-04:00 Remove arity inference in type declarations (#23514) Arity inference in type declarations was introduced as a workaround for the lack of @k-binders. They were added in 4aea0a72040, so I simplified all of this by simply removing arity inference altogether. This is part of GHC Proposal #425 "Invisible binders in type declarations". - - - - - 459dee1b by Torsten Schmits at 2023-06-27T16:54:20-04:00 Relax defaulting of RuntimeRep/Levity when printing Fixes #16468 MR: !10702 Only default RuntimeRep to LiftedRep when variables are bound by the toplevel forall - - - - - 151f8f18 by Torsten Schmits at 2023-06-27T16:54:57-04:00 Remove duplicate link label in linear types docs - - - - - ecdc4353 by Rodrigo Mesquita at 2023-06-28T12:24:57-04:00 Stop configuring unused Ld command in `settings` GHC has no direct dependence on the linker. Rather, we depend upon the C compiler for linking and an object-merging program (which is typically `ld`) for production of GHCi objects and merging of C stubs into final object files. Despite this, for historical reasons we still recorded information about the linker into `settings`. Remove these entries from `settings`, `hadrian/cfg/system.config`, as well as the `configure` logic responsible for this information. Closes #23566. - - - - - bf9ec3e4 by Bryan Richter at 2023-06-28T12:25:33-04:00 Remove extraneous debug output - - - - - 7eb68dd6 by Bryan Richter at 2023-06-28T12:25:33-04:00 Work with unset vars in -e mode - - - - - 49c27936 by Bryan Richter at 2023-06-28T12:25:33-04:00 Pass positional arguments in their positions By quoting $cmd, the default "bash -i" is a single argument to run, and no file named "bash -i" actually exists to be run. - - - - - 887dc4fc by Bryan Richter at 2023-06-28T12:25:33-04:00 Handle unset value in -e context - - - - - 5ffc7d7b by Rodrigo Mesquita at 2023-06-28T21:07:36-04:00 Configure CPP into settings There is a distinction to be made between the Haskell Preprocessor and the C preprocessor. The former is used to preprocess Haskell files, while the latter is used in C preprocessing such as Cmm files. In practice, they are both the same program (usually the C compiler) but invoked with different flags. Previously we would, at configure time, configure the haskell preprocessor and save the configuration in the settings file, but, instead of doing the same for CPP, we had hardcoded in GHC that the CPP program was either `cc -E` or `cpp`. This commit fixes that asymmetry by also configuring CPP at configure time, and tries to make more explicit the difference between HsCpp and Cpp (see Note [Preprocessing invocations]). Note that we don't use the standard CPP and CPPFLAGS to configure Cpp, but instead use the non-standard --with-cpp and --with-cpp-flags. The reason is that autoconf sets CPP to "$CC -E", whereas we expect the CPP command to be configured as a standalone executable rather than a command. These are symmetrical with --with-hs-cpp and --with-hs-cpp-flags. Cleanup: Hadrian no longer needs to pass the CPP configuration for CPP to be C99 compatible through -optP, since we now configure that into settings. Closes #23422 - - - - - 5efa9ca5 by Ben Gamari at 2023-06-28T21:08:13-04:00 hadrian: Always canonicalize topDirectory Hadrian's `topDirectory` is intended to provide an absolute path to the root of the GHC tree. However, if the tree is reached via a symlink this One question here is whether the `canonicalizePath` call is expensive enough to warrant caching. In a quick microbenchmark I observed that `canonicalizePath "."` takes around 10us per call; this seems sufficiently low not to worry. Alternatively, another approach here would have been to rather move the canonicalization into `m4/fp_find_root.m4`. This would have avoided repeated canonicalization but sadly path canonicalization is a hard problem in POSIX shell. Addresses #22451. - - - - - b3e1436f by aadaa_fgtaa at 2023-06-28T21:08:53-04:00 Optimise ELF linker (#23464) - cache last elements of `relTable`, `relaTable` and `symbolTables` in `ocInit_ELF` - cache shndx table in ObjectCode - run `checkProddableBlock` only with debug rts - - - - - 30525b00 by Ben Gamari at 2023-06-28T21:09:30-04:00 compiler: Introduce MO_{ACQUIRE,RELEASE}_FENCE - - - - - b787e259 by Ben Gamari at 2023-06-28T21:09:30-04:00 compiler: Drop MO_WriteBarrier rts: Drop write_barrier - - - - - 7550b4a5 by Ben Gamari at 2023-06-28T21:09:30-04:00 rts: Drop load_store_barrier() This is no longer used. - - - - - d5f2875e by Ben Gamari at 2023-06-28T21:09:31-04:00 rts: Drop last instances of prim_{write,read}_barrier - - - - - 965ac2ba by Ben Gamari at 2023-06-28T21:09:31-04:00 rts: Eliminate remaining uses of load_load_barrier - - - - - 0fc5cb97 by Sven Tennie at 2023-06-28T21:09:31-04:00 compiler: Drop MO_ReadBarrier - - - - - 7a7d326c by Ben Gamari at 2023-06-28T21:09:31-04:00 rts: Drop load_load_barrier This is no longer used. - - - - - 9f63da66 by Sven Tennie at 2023-06-28T21:09:31-04:00 Delete write_barrier function - - - - - bb0ed354 by Ben Gamari at 2023-06-28T21:09:31-04:00 rts: Make collectFreshWeakPtrs definition a prototype x86-64/Darwin's toolchain inexplicably warns that collectFreshWeakPtrs needs to be a prototype. - - - - - ef81a1eb by Sven Tennie at 2023-06-28T21:10:08-04:00 Fix number of free double regs D1..D4 are defined for aarch64 and thus not free. - - - - - c335fb7c by Ryan Scott at 2023-06-28T21:10:44-04:00 Fix typechecking of promoted empty lists The `'[]` case in `tc_infer_hs_type` is smart enough to handle arity-0 uses of `'[]` (see the newly added `T23543` test case for an example), but the `'[]` case in `tc_hs_type` was not. We fix this by changing the `tc_hs_type` case to invoke `tc_infer_hs_type`, as prescribed in `Note [Future-proofing the type checker]`. There are some benign changes to test cases' expected output due to the new code path using `forall a. [a]` as the kind of `'[]` rather than `[k]`. Fixes #23543. - - - - - fcf310e7 by Rodrigo Mesquita at 2023-06-28T21:11:21-04:00 Configure MergeObjs supports response files rather than Ld The previous configuration script to test whether Ld supported response files was * Incorrect (see #23542) * Used, in practice, to check if the *merge objects tool* supported response files. This commit modifies the macro to run the merge objects tool (rather than Ld), using a response file, and checking the result with $NM Fixes #23542 - - - - - 78b2f3cc by Sylvain Henry at 2023-06-28T21:12:02-04:00 JS: fix JS stack printing (#23565) - - - - - 9f01d14b by Matthew Pickering at 2023-06-29T04:13:41-04:00 Add -fpolymorphic-specialisation flag (off by default at all optimisation levels) Polymorphic specialisation has led to a number of hard to diagnose incorrect runtime result bugs (see #23469, #23109, #21229, #23445) so this commit introduces a flag `-fpolymorhphic-specialisation` which allows users to turn on this experimental optimisation if they are willing to buy into things going very wrong. Ticket #23469 - - - - - b1e611d5 by Ben Gamari at 2023-06-29T04:14:17-04:00 Rip out runtime linker/compiler checks We used to choose flags to pass to the toolchain at runtime based on the platform running GHC, and in this commit we drop all of those runtime linker checks Ultimately, this represents a change in policy: We no longer adapt at runtime to the toolchain being used, but rather make final decisions about the toolchain used at /configure time/ (we have deleted Note [Run-time linker info] altogether!). This works towards the goal of having all toolchain configuration logic living in the same place, which facilities the work towards a runtime-retargetable GHC (see #19877). As of this commit, the runtime linker/compiler logic was moved to autoconf, but soon it, and the rest of the existing toolchain configuration logic, will live in the standalone ghc-toolchain program (see !9263) In particular, what used to be done at runtime is now as follows: * The flags -Wl,--no-as-needed for needed shared libs are configured into settings * The flag -fstack-check is configured into settings * The check for broken tables-next-to-code was outdated * We use the configured c compiler by default as the assembler program * We drop `asmOpts` because we already configure -Qunused-arguments flag into settings (see !10589) Fixes #23562 Co-author: Rodrigo Mesquita (@alt-romes) - - - - - 8b35e8ca by Ben Gamari at 2023-06-29T18:46:12-04:00 Define FFI_GO_CLOSURES The libffi shipped with Apple's XCode toolchain does not contain a definition of the FFI_GO_CLOSURES macro, despite containing references to said macro. Work around this by defining the macro, following the model of a similar workaround in OpenJDK [1]. [1] https://github.com/openjdk/jdk17u-dev/pull/741/files - - - - - d7ef1704 by Ben Gamari at 2023-06-29T18:46:12-04:00 base: Fix incorrect CPP guard This was guarded on `darwin_HOST_OS` instead of `defined(darwin_HOST_OS)`. - - - - - 7c7d1f66 by Ben Gamari at 2023-06-29T18:46:48-04:00 rts/Trace: Ensure that debugTrace arguments are used As debugTrace is a macro we must take care to ensure that the fact is clear to the compiler lest we see warnings. - - - - - cb92051e by Ben Gamari at 2023-06-29T18:46:48-04:00 rts: Various warnings fixes - - - - - dec81dd1 by Ben Gamari at 2023-06-29T18:46:48-04:00 hadrian: Ignore warnings in unix and semaphore-compat - - - - - d7f6448a by Matthew Pickering at 2023-06-30T12:38:43-04:00 hadrian: Fix dependencies of docs:* rule For the docs:* rule we need to actually build the package rather than just the haddocks for the dependent packages. Therefore we depend on the .conf files of the packages we are trying to build documentation for as well as the .haddock files. Fixes #23472 - - - - - cec90389 by sheaf at 2023-06-30T12:39:27-04:00 Add tests for #22106 Fixes #22106 - - - - - 083794b1 by Torsten Schmits at 2023-07-03T03:27:27-04:00 Add -fbreak-points to control breakpoint insertion Rather than statically enabling breakpoints only for the interpreter, this adds a new flag. Tracking ticket: #23057 MR: !10466 - - - - - fd8c5769 by Ben Gamari at 2023-07-03T03:28:04-04:00 rts: Ensure that pinned allocations respect block size Previously, it was possible for pinned, aligned allocation requests to allocate beyond the end of the pinned accumulator block. Specifically, we failed to account for the padding needed to achieve the requested alignment in the "large object" check. With large alignment requests, this can result in the allocator using the capability's pinned object accumulator block to service a request which is larger than `PINNED_EMPTY_SIZE`. To fix this we reorganize `allocatePinned` to consistently account for the alignment padding in all large object checks. This is a bit subtle as we must handle the case of a small allocation request filling the accumulator block, as well as large requests. Fixes #23400. - - - - - 98185d52 by Ben Gamari at 2023-07-03T03:28:05-04:00 testsuite: Add test for #23400 - - - - - 4aac0540 by Ben Gamari at 2023-07-03T03:28:42-04:00 ghc-heap: Support for BLOCKING_QUEUE closures - - - - - 03f941f4 by Ben Bellick at 2023-07-03T03:29:29-04:00 Add some structured diagnostics in Tc/Validity.hs This addresses the work of ticket #20118 Created the following constructors for TcRnMessage - TcRnInaccessibleCoAxBranch - TcRnPatersonCondFailure - - - - - 6074cc3c by Moisés Ackerman at 2023-07-03T03:30:13-04:00 Add failing test case for #23492 - - - - - 356a2692 by Moisés Ackerman at 2023-07-03T03:30:13-04:00 Use generated src span for catch-all case of record selector functions This fixes #23492. The problem was that we used the real source span of the field declaration for the generated catch-all case in the selector function, in particular in the generated call to `recSelError`, which meant it was included in the HIE output. Using `generatedSrcSpan` instead means that it is not included. - - - - - 3efe7f39 by Moisés Ackerman at 2023-07-03T03:30:13-04:00 Introduce genLHsApp and genLHsLit helpers in GHC.Rename.Utils - - - - - dd782343 by Moisés Ackerman at 2023-07-03T03:30:13-04:00 Construct catch-all default case using helpers GHC.Rename.Utils concrete helpers instead of wrapGenSpan + HS AST constructors - - - - - 0e09c38e by Ryan Hendrickson at 2023-07-03T03:30:56-04:00 Add regression test for #23549 - - - - - 32741743 by Alexis King at 2023-07-03T03:31:36-04:00 perf tests: Increase default stack size for MultiLayerModules An unhelpfully small stack size appears to have been the real culprit behind the metric fluctuations in #19293. Debugging metric decreases triggered by !10729 helped to finally identify the problem. Metric Decrease: MultiLayerModules MultiLayerModulesTH_Make T13701 T14697 - - - - - 82ac6bf1 by Bryan Richter at 2023-07-03T03:32:15-04:00 Add missing void prototypes to rts functions See #23561. - - - - - 6078b429 by Ben Gamari at 2023-07-03T03:32:51-04:00 gitlab-ci: Refactor compilation of gen_ci Flakify and document it, making it far less sensitive to the build environment. - - - - - aa2db0ae by Ben Gamari at 2023-07-03T03:33:29-04:00 testsuite: Update documentation - - - - - 924a2362 by Gregory Gerasev at 2023-07-03T03:34:10-04:00 Better error for data deriving of type synonym/family. Closes #23522 - - - - - 4457da2a by Dave Barton at 2023-07-03T03:34:51-04:00 Fix some broken links and typos - - - - - de5830d0 by Ben Gamari at 2023-07-04T22:03:59-04:00 configure: Rip out Solaris dyld check Solaris 11 was released over a decade ago and, moreover, I doubt we have any Solaris users - - - - - 59c5fe1d by doyougnu at 2023-07-04T22:04:56-04:00 CI: add JS release and debug builds, regen CI jobs - - - - - 679bbc97 by Vladislav Zavialov at 2023-07-04T22:05:32-04:00 testsuite: Do not require CUSKs Numerous tests make use of CUSKs (complete user-supplied kinds), a legacy feature scheduled for deprecation. In order to proceed with the said deprecation, the tests have been updated to use SAKS instead (standalone kind signatures). This also allows us to remove the Haskell2010 language pragmas that were added in 115cd3c85a8 to work around the lack of CUSKs in GHC2021. - - - - - 945d3599 by Ben Gamari at 2023-07-04T22:06:08-04:00 gitlab: Drop backport-for-8.8 MR template Its usefulness has long passed. - - - - - 66c721d3 by Alan Zimmerman at 2023-07-04T22:06:44-04:00 EPA: Simplify GHC/Parser.y comb2 Use the HasLoc instance from Ast.hs to allow comb2 to work with anything with a SrcSpan This gets rid of the custom comb2A, comb2Al, comb2N functions, and removes various reLoc calls. - - - - - 2be99b7e by Matthew Pickering at 2023-07-04T22:07:21-04:00 Fix deprecation warning when deprecated identifier is from another module A stray 'Just' was being printed in the deprecation message. Fixes #23573 - - - - - 46c9bcd6 by Ben Gamari at 2023-07-04T22:07:58-04:00 rts: Don't rely on initializers for sigaction_t As noted in #23577, CentOS's ancient toolchain throws spurious missing-field-initializer warnings. - - - - - ec55035f by Ben Gamari at 2023-07-04T22:07:58-04:00 hadrian: Don't treat -Winline warnings as fatal Such warnings are highly dependent upon the toolchain, platform, and build configuration. It's simply too fragile to rely on these. - - - - - 3a09b789 by Ben Gamari at 2023-07-04T22:07:58-04:00 hadrian: Only pass -Wno-nonportable-include-path on Darwin This flag, which was introduced due to #17798, is only understood by Clang and consequently throws warnings on platforms using gcc. Sadly, there is no good way to treat such warnings as non-fatal with `-Werror` so for now we simply make this flag specific to platforms known to use Clang and case-insensitive filesystems (Darwin and Windows). See #23577. - - - - - 4af7eac2 by Mario Blažević at 2023-07-04T22:08:38-04:00 Fixed ticket #23571, TH.Ppr.pprLit hanging on large numeric literals - - - - - 2304c697 by Ben Gamari at 2023-07-04T22:09:15-04:00 compiler: Make OccSet opaque - - - - - cf735db8 by Andrei Borzenkov at 2023-07-04T22:09:51-04:00 Add Note about why we need forall in Code to be on the right - - - - - fb140f82 by Hécate Moonlight at 2023-07-04T22:10:34-04:00 Relax the constraint about the foreign function's calling convention of FinalizerPtr to capi as well as ccall. - - - - - 9ce44336 by meooow25 at 2023-07-05T11:42:37-04:00 Improve the situation with the stimes cycle Currently the Semigroup stimes cycle is resolved in GHC.Base by importing stimes implementations from a hs-boot file. Resolve the cycle using hs-boot files for required classes (Num, Integral) instead. Now stimes can be defined directly in GHC.Base, making inlining and specialization possible. This leads to some new boot files for `GHC.Num` and `GHC.Real`, the methods for those are only used to implement `stimes` so it doesn't appear that these boot files will introduce any new performance traps. Metric Decrease: T13386 T8095 Metric Increase: T13253 T13386 T18698a T18698b T19695 T8095 - - - - - 9edcb1fb by Jaro Reinders at 2023-07-05T11:43:24-04:00 Refactor Unique to be represented by Word64 In #22010 we established that Int was not always sufficient to store all the uniques we generate during compilation on 32-bit platforms. This commit addresses that problem by using Word64 instead of Int for uniques. The core of the change is in GHC.Core.Types.Unique and GHC.Core.Types.Unique.Supply. However, the representation of uniques is used in many other places, so those needed changes too. Additionally, the RTS has been extended with an atomic_inc64 operation. One major change from this commit is the introduction of the Word64Set and Word64Map data types. These are adapted versions of IntSet and IntMap from the containers package. These are planned to be upstreamed in the future. As a natural consequence of these changes, the compiler will be a bit slower and take more space on 32-bit platforms. Our CI tests indicate around a 5% residency increase. Metric Increase: CoOpt_Read CoOpt_Singletons LargeRecord ManyAlternatives ManyConstructors MultiComponentModules MultiComponentModulesRecomp MultiLayerModulesTH_OneShot RecordUpdPerf T10421 T10547 T12150 T12227 T12234 T12425 T12707 T13035 T13056 T13253 T13253-spj T13379 T13386 T13719 T14683 T14697 T14766 T15164 T15703 T16577 T16875 T17516 T18140 T18223 T18282 T18304 T18698a T18698b T18923 T1969 T19695 T20049 T21839c T3064 T3294 T4801 T5030 T5321FD T5321Fun T5631 T5642 T5837 T6048 T783 T8095 T9020 T9198 T9233 T9630 T9675 T9872a T9872b T9872b_defer T9872c T9872d T9961 TcPlugin_RewritePerf UniqLoop WWRec hard_hole_fits - - - - - 6b9db7d4 by Brandon Chinn at 2023-07-05T11:44:03-04:00 Fix docs for __GLASGOW_HASKELL_FULL_VERSION__ macro - - - - - 40f4ef7c by Torsten Schmits at 2023-07-05T18:06:19-04:00 Substitute free variables captured by breakpoints in SpecConstr Fixes #23267 - - - - - 2b55cb5f by sheaf at 2023-07-05T18:07:07-04:00 Reinstate untouchable variable error messages This extra bit of information was accidentally being discarded after a refactoring of the way we reported problems when unifying a type variable with another type. This patch rectifies that. - - - - - 53ed21c5 by Rodrigo Mesquita at 2023-07-05T18:07:47-04:00 configure: Drop Clang command from settings Due to 01542cb7227614a93508b97ecad5b16dddeb6486 we no longer use the `runClang` function, and no longer need to configure into settings the Clang command. We used to determine options at runtime to pass clang when it was used as an assembler, but now that we configure at configure time we no longer need to. - - - - - 6fdcf969 by Torsten Schmits at 2023-07-06T12:12:09-04:00 Filter out nontrivial substituted expressions in substTickish Fixes #23272 - - - - - 41968fd6 by Sylvain Henry at 2023-07-06T12:13:02-04:00 JS: testsuite: use req_c predicate instead of js_broken - - - - - 74a4dd2e by Sylvain Henry at 2023-07-06T12:13:02-04:00 JS: implement some file primitives (lstat,rmdir) (#22374) - Implement lstat and rmdir. - Implement base_c_s_is* functions (testing a file type) - Enable passing tests - - - - - 7e759914 by Sylvain Henry at 2023-07-07T02:39:38-04:00 JS: cleanup utils (#23314) - Removed unused code - Don't export unused functions - Move toTypeList to Closure module - - - - - f617655c by Sylvain Henry at 2023-07-07T02:39:38-04:00 JS: rename VarType/Vt into JSRep - - - - - 19216ca5 by Sylvain Henry at 2023-07-07T02:39:38-04:00 JS: remove custom PrimRep conversion (#23314) We use the usual conversion to PrimRep and then we convert these PrimReps to JSReps. - - - - - d3de8668 by Sylvain Henry at 2023-07-07T02:39:38-04:00 JS: don't use isRuntimeRepKindedTy in JS FFI - - - - - 8d1b75cb by Matthew Pickering at 2023-07-07T02:40:15-04:00 ghcup-metadata: Also updates ghcup-nightlies-0.0.7.yaml file Fixes #23600 - - - - - e524fa7f by Matthew Pickering at 2023-07-07T02:40:15-04:00 ghcup-metadata: Use dynamically linked alpine bindists In theory these will work much better on alpine to allow people to build statically linked applications there. We don't need to distribute a statically linked application ourselves in order to allow that. Fixes #23602 - - - - - 0c2a756e by sheaf at 2023-07-07T13:45:12+02:00 Avoid incomplete record update in Haddock Hoogle This commit avoids running into an incomplete record update warning in the Hoogle backend of Haddock. This was only noticed now, because incomplete record updates were broken in GHC 9.6. Now that they are fixed, we have to avoid running into them! - - - - - b9e7beb9 by Ben Gamari at 2023-07-07T11:32:22-04:00 Drop circle-ci-job.sh - - - - - 9955eead by Ben Gamari at 2023-07-07T11:32:22-04:00 testsuite: Allow preservation of unexpected output Here we introduce a new flag to the testsuite driver, --unexpected-output-dir=<dir>, which allows the user to ask the driver to preserve unexpected output from tests. The intent is for this to be used in CI to allow users to more easily fix unexpected platform-dependent output. - - - - - 48f80968 by Ben Gamari at 2023-07-07T11:32:22-04:00 gitlab-ci: Preserve unexpected output Here we enable use of the testsuite driver's `--unexpected-output-dir` flag by CI, preserving the result as an artifact for use by users. - - - - - 76983a0d by Matthew Pickering at 2023-07-07T11:32:58-04:00 driver: Fix -S with .cmm files There was an oversight in the driver which assumed that you would always produce a `.o` file when compiling a .cmm file. Fixes #23610 - - - - - 6df15e93 by Mike Pilgrem at 2023-07-07T11:33:40-04:00 Update Hadrian's stack.yaml - - - - - 1dff43cf by Ben Gamari at 2023-07-08T05:05:37-04:00 compiler: Rework ShowSome Previously the field used to filter the sub-declarations to show was rather ad-hoc and was only able to show at most one sub-declaration. - - - - - 8165404b by Ben Gamari at 2023-07-08T05:05:37-04:00 testsuite: Add test to catch changes in core libraries This adds testing infrastructure to ensure that changes in core libraries (e.g. `base` and `ghc-prim`) are caught in CI. - - - - - ec1c32e2 by Melanie Phoenix at 2023-07-08T05:06:14-04:00 Deprecate Data.List.NonEmpty.unzip - - - - - 5d2442b8 by Ben Gamari at 2023-07-08T05:06:51-04:00 Drop latent mentions of -split-objs Closes #21134. - - - - - a9bc20cb by Oleg Grenrus at 2023-07-08T05:07:31-04:00 Add warn_and_run test kind This is a compile_and_run variant which also captures the GHC's stderr. The warn_and_run name is best I can come up with, as compile_and_run is taken. This is useful specifically for testing warnings. We want to test that when warning triggers, and it's not a false positive, i.e. that the runtime behaviour is indeed "incorrect". As an example a single test is altered to use warn_and_run - - - - - c7026962 by Ben Gamari at 2023-07-08T05:08:11-04:00 configure: Don't use ld.gold on i386 ld.gold appears to produce invalid static constructor tables on i386. While ideally we would add an autoconf check to check for this brokenness, sadly such a check isn't easy to compose. Instead to summarily reject such linkers on i386. Somewhat hackily closes #23579. - - - - - 054261dd by Andrew Lelechenko at 2023-07-08T19:32:47-04:00 Add since annotations for Data.Foldable1 - - - - - 550af505 by Sylvain Henry at 2023-07-08T19:33:28-04:00 JS: support -this-unit-id for programs in the linker (#23613) - - - - - d284470a by Andrew Lelechenko at 2023-07-08T19:34:08-04:00 Bump text submodule - - - - - 8e11630e by jade at 2023-07-10T16:58:40-04:00 Add a hint to enable ExplicitNamespaces for type operator imports (Fixes/Enhances #20007) As suggested in #20007 and implemented in !8895, trying to import type operators will suggest a fix to use the 'type' keyword, without considering whether ExplicitNamespaces is enabled. This patch will query whether ExplicitNamespaces is enabled and add a hint to suggest enabling ExplicitNamespaces if it isn't enabled, alongside the suggestion of adding the 'type' keyword. - - - - - 61b1932e by sheaf at 2023-07-10T16:59:26-04:00 tyThingLocalGREs: include all DataCons for RecFlds The GREInfo for a record field should include the collection of all the data constructors of the parent TyCon that have this record field. This information was being incorrectly computed in the tyThingLocalGREs function for a DataCon, as we were not taking into account other DataCons with the same parent TyCon. Fixes #23546 - - - - - e6627cbd by Alan Zimmerman at 2023-07-10T17:00:05-04:00 EPA: Simplify GHC/Parser.y comb3 A follow up to !10743 - - - - - ee20da34 by Andrew Lelechenko at 2023-07-10T17:01:01-04:00 Document that compareByteArrays# is available since ghc-prim-0.5.2.0 - - - - - 4926af7b by Matthew Pickering at 2023-07-10T17:01:38-04:00 Revert "Bump text submodule" This reverts commit d284470a77042e6bc17bdb0ab0d740011196958a. This commit requires that we bootstrap with ghc-9.4, which we do not require until #23195 has been completed. Subsequently this has broken nighty jobs such as the rocky8 job which in turn has broken nightly releases. - - - - - d1c92bf3 by Ben Gamari at 2023-07-11T08:07:02-04:00 compiler: Fingerprint more code generation flags Previously our recompilation check was quite inconsistent in its coverage of non-optimisation code generation flags. Specifically, we failed to account for most flags that would affect the behavior of generated code in ways that might affect the result of a program's execution (e.g. `-feager-blackholing`, `-fstrict-dicts`) Closes #23369. - - - - - eb623149 by Ben Gamari at 2023-07-11T08:07:02-04:00 compiler: Record original thunk info tables on stack Here we introduce a new code generation option, `-forig-thunk-info`, which ensures that an `stg_orig_thunk_info` frame is pushed before every update frame. This can be invaluable when debugging thunk cycles and similar. See Note [Original thunk info table frames] for details. Closes #23255. - - - - - 4731f44e by Jaro Reinders at 2023-07-11T08:07:40-04:00 Fix wrong MIN_VERSION_GLASGOW_HASKELL macros I forgot to change these after rebasing. - - - - - dd38aca9 by Andreas Schwab at 2023-07-11T13:55:56+00:00 Hadrian: enable GHCi support on riscv64 - - - - - 09a5c6cc by Josh Meredith at 2023-07-12T11:25:13-04:00 JavaScript: support unicode code points > 2^16 in toJSString using String.fromCodePoint (#23628) - - - - - 29fbbd4e by Matthew Pickering at 2023-07-12T11:25:49-04:00 Remove references to make build system in mk/build.mk Fixes #23636 - - - - - 630e3026 by sheaf at 2023-07-12T11:26:43-04:00 Valid hole fits: don't panic on a Given The function GHC.Tc.Errors.validHoleFits would end up panicking when encountering a Given constraint. To fix this, it suffices to filter out the Givens before continuing. Fixes #22684 - - - - - c39f279b by Matthew Pickering at 2023-07-12T23:18:38-04:00 Use deb10 for i386 bindists deb9 is now EOL so it's time to upgrade the i386 bindist to use deb10 Fixes #23585 - - - - - bf9b9de0 by Krzysztof Gogolewski at 2023-07-12T23:19:15-04:00 Fix #23567, a specializer bug Found by Simon in https://gitlab.haskell.org/ghc/ghc/-/issues/23567#note_507834 The testcase isn't ideal because it doesn't detect the bug in master, unless doNotUnbox is removed as in https://gitlab.haskell.org/ghc/ghc/-/issues/23567#note_507692. But I have confirmed that with that modification, it fails before and passes afterwards. - - - - - 84c1a4a2 by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00 Comments - - - - - b2846cb5 by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00 updates to comments - - - - - 2af23f0e by Bartłomiej Cieślar at 2023-07-12T23:20:08-04:00 changes - - - - - 6143838a by sheaf at 2023-07-13T08:02:17-04:00 Fix deprecation of record fields Commit 3f374399 inadvertently broke the deprecation/warning mechanism for record fields due to its introduction of record field namespaces. This patch ensures that, when a top-level deprecation is applied to an identifier, it applies to all the record fields as well. This is achieved by refactoring GHC.Rename.Env.lookupLocalTcNames, and GHC.Rename.Env.lookupBindGroupOcc, to not look up a fixed number of NameSpaces but to look up all NameSpaces and filter out the irrelevant ones. - - - - - 6fd8f566 by sheaf at 2023-07-13T08:02:17-04:00 Introduce greInfo, greParent These are simple helper functions that wrap the internal field names gre_info, gre_par. - - - - - 7f0a86ed by sheaf at 2023-07-13T08:02:17-04:00 Refactor lookupGRE_... functions This commit consolidates all the logic for looking up something in the Global Reader Environment into the single function lookupGRE. This allows us to declaratively specify all the different modes of looking up in the GlobalRdrEnv, and avoids manually passing around filtering functions as was the case in e.g. the function GHC.Rename.Env.lookupSubBndrOcc_helper. ------------------------- Metric Decrease: T8095 ------------------------- ------------------------- Metric Increase: T8095 ------------------------- - - - - - 5e951395 by Rodrigo Mesquita at 2023-07-13T08:02:54-04:00 configure: Drop DllWrap command We used to configure into settings a DllWrap command for windows builds and distributions, however, we no longer do, and dllwrap is effectively unused. This simplification is motivated in part by the larger toolchain-selection project (#19877, !9263) - - - - - e10556b6 by Teo Camarasu at 2023-07-14T16:28:46-04:00 base: fix haddock syntax in GHC.Profiling - - - - - 0f3fda81 by Matthew Pickering at 2023-07-14T16:29:23-04:00 Revert "CI: add JS release and debug builds, regen CI jobs" This reverts commit 59c5fe1d4b624423b1c37891710f2757bb58d6af. This commit added two duplicate jobs on all validate pipelines, so we are reverting for now whilst we work out what the best way forward is. Ticket #23618 - - - - - 54bca324 by Alan Zimmerman at 2023-07-15T03:23:26-04:00 EPA: Simplify GHC/Parser.y sLL Follow up to !10743 - - - - - c8863828 by sheaf at 2023-07-15T03:24:06-04:00 Configure: canonicalise PythonCmd on Windows This change makes PythonCmd resolve to a canonical absolute path on Windows, which prevents HLS getting confused (now that we have a build-time dependency on python). fixes #23652 - - - - - ca1e636a by Rodrigo Mesquita at 2023-07-15T03:24:42-04:00 Improve Note [Binder-swap during float-out] - - - - - cf86f3ec by Matthew Craven at 2023-07-16T01:42:09+02:00 Equality of forall-types is visibility aware This patch finally (I hope) nails the question of whether (forall a. ty) and (forall a -> ty) are `eqType`: they aren't! There is a long discussion in #22762, plus useful Notes: * Note [ForAllTy and type equality] in GHC.Core.TyCo.Compare * Note [Comparing visiblities] in GHC.Core.TyCo.Compare * Note [ForAllCo] in GHC.Core.TyCo.Rep It also establishes a helpful new invariant for ForAllCo, and ForAllTy, when the bound variable is a CoVar:in that case the visibility must be coreTyLamForAllTyFlag. All this is well documented in revised Notes. - - - - - 7f13acbf by Vladislav Zavialov at 2023-07-16T01:56:27-04:00 List and Tuple<n>: update documentation Add the missing changelog.md entries and @since-annotations. - - - - - 2afbddb0 by Andrei Borzenkov at 2023-07-16T10:21:24+04:00 Type patterns (#22478, #18986) Improved name resolution and type checking of type patterns in constructors: 1. HsTyPat: a new dedicated data type that represents type patterns in HsConPatDetails instead of reusing HsPatSigType 2. rnHsTyPat: a new function that renames a type pattern and collects its binders into three groups: - explicitly bound type variables, excluding locally bound variables - implicitly bound type variables from kind signatures (only if ScopedTypeVariables are enabled) - named wildcards (only from kind signatures) 2a. rnHsPatSigTypeBindingVars: removed in favour of rnHsTyPat 2b. rnImplcitTvBndrs: removed because no longer needed 3. collect_pat: updated to collect type variable binders from type patterns (this means that types and terms use the same infrastructure to detect conflicting bindings, unused variables and name shadowing) 3a. CollVarTyVarBinders: a new CollectFlag constructor that enables collection of type variables 4. tcHsTyPat: a new function that typechecks type patterns, capable of handling polymorphic kinds. See Note [Type patterns: binders and unifiers] Examples of code that is now accepted: f = \(P @a) -> \(P @a) -> ... -- triggers -Wname-shadowing g :: forall a. Proxy a -> ... g (P @a) = ... -- also triggers -Wname-shadowing h (P @($(TH.varT (TH.mkName "t")))) = ... -- t is bound at splice time j (P @(a :: (x,x))) = ... -- (x,x) is no longer rejected data T where MkT :: forall (f :: forall k. k -> Type). f Int -> f Maybe -> T k :: T -> () k (MkT @f (x :: f Int) (y :: f Maybe)) = () -- f :: forall k. k -> Type Examples of code that is rejected with better error messages: f (Left @a @a _) = ... -- new message: -- • Conflicting definitions for ‘a’ -- Bound at: Test.hs:1:11 -- Test.hs:1:14 Examples of code that is now rejected: {-# OPTIONS_GHC -Werror=unused-matches #-} f (P @a) = () -- Defined but not used: type variable ‘a’ - - - - - eb1a6ab1 by sheaf at 2023-07-16T09:20:45-04:00 Don't use substTyUnchecked in newMetaTyVar There were some comments that explained that we needed to use an unchecked substitution function because of issue #12931, but that has since been fixed, so we should be able to use substTy instead now. - - - - - c7bbad9a by sheaf at 2023-07-17T02:48:19-04:00 rnImports: var shouldn't import NoFldSelectors In an import declaration such as import M ( var ) the import of the variable "var" should **not** bring into scope record fields named "var" which are defined with NoFieldSelectors. Doing so can cause spurious "unused import" warnings, as reported in ticket #23557. Fixes #23557 - - - - - 1af2e773 by sheaf at 2023-07-17T02:48:19-04:00 Suggest similar names in imports This commit adds similar name suggestions when importing. For example module A where { spelling = 'o' } module B where { import B ( speling ) } will give rise to the error message: Module ‘A’ does not export ‘speling’. Suggested fix: Perhaps use ‘spelling’ This also provides hints when users try to import record fields defined with NoFieldSelectors. - - - - - 654fdb98 by Alan Zimmerman at 2023-07-17T02:48:55-04:00 EPA: Store leading AnnSemi for decllist in al_rest This simplifies the markAnnListA implementation in ExactPrint - - - - - 22565506 by sheaf at 2023-07-17T21:12:59-04:00 base: add COMPLETE pragma to BufferCodec PatSyn This implements CLC proposal #178, rectifying an oversight in the implementation of CLC proposal #134 which could lead to spurious pattern match warnings. https://github.com/haskell/core-libraries-committee/issues/178 https://github.com/haskell/core-libraries-committee/issues/134 - - - - - 860f6269 by sheaf at 2023-07-17T21:13:00-04:00 exactprint: silence incomplete record update warnings - - - - - df706de3 by sheaf at 2023-07-17T21:13:00-04:00 Re-instate -Wincomplete-record-updates Commit e74fc066 refactored the handling of record updates to use the HsExpanded mechanism. This meant that the pattern matching inherent to a record update was considered to be "generated code", and thus we stopped emitting "incomplete record update" warnings entirely. This commit changes the "data Origin = Source | Generated" datatype, adding a field to the Generated constructor to indicate whether we still want to perform pattern-match checking. We also have to do a bit of plumbing with HsCase, to record that the HsCase arose from an HsExpansion of a RecUpd, so that the error message continues to mention record updates as opposed to a generic "incomplete pattern matches in case" error. Finally, this patch also changes the way we handle inaccessible code warnings. Commit e74fc066 was also a regression in this regard, as we were emitting "inaccessible code" warnings for case statements spuriously generated when desugaring a record update (remember: the desugaring mechanism happens before typechecking; it thus can't take into account e.g. GADT information in order to decide which constructors to include in the RHS of the desugaring of the record update). We fix this by changing the mechanism through which we disable inaccessible code warnings: we now check whether we are in generated code in GHC.Tc.Utils.TcMType.newImplication in order to determine whether to emit inaccessible code warnings. Fixes #23520 Updates haddock submodule, to avoid incomplete record update warnings - - - - - 1d05971e by sheaf at 2023-07-17T21:13:00-04:00 Propagate long-distance information in do-notation The preceding commit re-enabled pattern-match checking inside record updates. This revealed that #21360 was in fact NOT fixed by e74fc066. This commit makes sure we correctly propagate long-distance information in do blocks, e.g. in ```haskell data T = A { fld :: Int } | B f :: T -> Maybe T f r = do a at A{} <- Just r Just $ case a of { A _ -> A 9 } ``` we need to propagate the fact that "a" is headed by the constructor "A" to see that the case expression "case a of { A _ -> A 9 }" cannot fail. Fixes #21360 - - - - - bea0e323 by sheaf at 2023-07-17T21:13:00-04:00 Skip PMC for boring patterns Some patterns introduce no new information to the pattern-match checker (such as plain variable or wildcard patterns). We can thus skip doing any pattern-match checking on them when the sole purpose for doing so was introducing new long-distance information. See Note [Boring patterns] in GHC.Hs.Pat. Doing this avoids regressing in performance now that we do additional pattern-match checking inside do notation. - - - - - ddcdd88c by Rodrigo Mesquita at 2023-07-17T21:13:36-04:00 Split GHC.Platform.ArchOS from ghc-boot into ghc-platform Split off the `GHC.Platform.ArchOS` module from the `ghc-boot` package into this reinstallable standalone package which abides by the PVP, in part motivated by the ongoing work on `ghc-toolchain` towards runtime retargetability. - - - - - b55a8ea7 by Sylvain Henry at 2023-07-17T21:14:27-04:00 JS: better implementation for plusWord64 (#23597) - - - - - 889c2bbb by sheaf at 2023-07-18T06:37:32-04:00 Do primop rep-poly checks when instantiating This patch changes how we perform representation-polymorphism checking for primops (and other wired-in Ids such as coerce). When instantiating the primop, we check whether each type variable is required to instantiated to a concrete type, and if so we create a new concrete metavariable (a ConcreteTv) instead of a simple MetaTv. (A little subtlety is the need to apply the substitution obtained from instantiating to the ConcreteTvOrigins, see Note [substConcreteTvOrigin] in GHC.Tc.Utils.TcMType.) This allows us to prevent representation-polymorphism in non-argument position, as that is required for some of these primops. We can also remove the logic in tcRemainingValArgs, except for the part concerning representation-polymorphic unlifted newtypes. The function has been renamed rejectRepPolyNewtypes; all it does now is reject unsaturated occurrences of representation-polymorphic newtype constructors when the representation of its argument isn't a concrete RuntimeRep (i.e. still a PHASE 1 FixedRuntimeRep check). The Note [Eta-expanding rep-poly unlifted newtypes] in GHC.Tc.Gen.Head gives more explanation about a possible path to PHASE 2, which would be in line with the treatment for primops taken in this patch. We also update the Core Lint check to handle this new framework. This means Core Lint now checks representation-polymorphism in continuation position like needed for catch#. Fixes #21906 ------------------------- Metric Increase: LargeRecord ------------------------- - - - - - 00648e5d by Krzysztof Gogolewski at 2023-07-18T06:38:10-04:00 Core Lint: distinguish let and letrec in locations Lint messages were saying "in the body of letrec" even for non-recursive let. I've also renamed BodyOfLetRec to BodyOfLet in stg, since there's no separate letrec. - - - - - 787bae96 by Krzysztof Gogolewski at 2023-07-18T06:38:50-04:00 Use extended literals when deriving Show This implements GHC proposal https://github.com/ghc-proposals/ghc-proposals/pull/596 Also add support for Int64# and Word64#; see testcase ShowPrim. - - - - - 257f1567 by Jaro Reinders at 2023-07-18T06:39:29-04:00 Add StgFromCore and StgCodeGen linting - - - - - 34d08a20 by Ben Gamari at 2023-07-19T03:33:22-04:00 Reg.Liveness: Strictness - - - - - c5deaa27 by Ben Gamari at 2023-07-19T03:33:22-04:00 Reg.Liveness: Don't repeatedly construct UniqSets - - - - - b947250b by Ben Gamari at 2023-07-19T03:33:22-04:00 compiler/Types: Ensure that fromList-type operations can fuse In #20740 I noticed that mkUniqSet does not fuse. In practice, allowing it to do so makes a considerable difference in allocations due to the backend. Metric Decrease: T12707 T13379 T3294 T4801 T5321FD T5321Fun T783 - - - - - 6c88c2ba by Sven Tennie at 2023-07-19T03:33:59-04:00 x86 Codegen: Implement MO_S_MulMayOflo for W16 - - - - - 5f1154e0 by Sven Tennie at 2023-07-19T03:33:59-04:00 x86 CodeGen: MO_S_MulMayOflo better error message for rep > W64 It's useful to see which value made the pattern match fail. (If it ever occurs.) - - - - - e8c9a95f by Sven Tennie at 2023-07-19T03:33:59-04:00 x86 CodeGen: Implement MO_S_MulMayOflo for W8 This case wasn't handled before. But, the test-primops test suite showed that it actually might appear. - - - - - a36f9dc9 by Sven Tennie at 2023-07-19T03:33:59-04:00 Add test for %mulmayoflo primop The test expects a perfect implementation with no false positives. - - - - - 38a36248 by Matthew Pickering at 2023-07-19T03:34:36-04:00 lint-ci-config: Generate jobs-metadata.json We also now save the jobs-metadata.json and jobs.yaml file as artifacts as: * It might be useful for someone who is modifying CI to copy jobs.yaml if they are having trouble regenerating locally. * jobs-metadata.json is very useful for downstream pipelines to work out the right job to download. Fixes #23654 - - - - - 1535a671 by Vladislav Zavialov at 2023-07-19T03:35:12-04:00 Initialize 9.10.1-notes.rst Create new release notes for the next GHC release (GHC 9.10) - - - - - 3bd4d5b5 by sheaf at 2023-07-19T03:35:53-04:00 Prioritise Parent when looking up class sub-binder When we look up children GlobalRdrElts of a given Parent, we sometimes would rather prioritise those GlobalRdrElts which have the right Parent, and sometimes prioritise those that have the right NameSpace: - in export lists, we should prioritise NameSpace - for class/instance binders, we should prioritise Parent See Note [childGREPriority] in GHC.Types.Name.Reader. fixes #23664 - - - - - 9c8fdda3 by Alan Zimmerman at 2023-07-19T03:36:29-04:00 EPA: Improve annotation management in getMonoBind Ensure the LHsDecl for a FunBind has the correct leading comments and trailing annotations. See the added note for details. - - - - - ff884b77 by Matthew Pickering at 2023-07-19T11:42:02+01:00 Remove unused files in .gitlab These were left over after 6078b429 - - - - - 29ef590c by Matthew Pickering at 2023-07-19T11:42:52+01:00 gen_ci: Add hie.yaml file This allows you to load `gen_ci.hs` into HLS, and now it is a huge module, that is quite useful. - - - - - 808b55cf by Matthew Pickering at 2023-07-19T12:24:41+01:00 ci: Make "fast-ci" the default validate configuration We are trying out a lighter weight validation pipeline where by default we just test on 5 platforms: * x86_64-deb10-slow-validate * windows * x86_64-fedora33-release * aarch64-darwin * aarch64-linux-deb10 In order to enable the "full" validation pipeline you can apply the `full-ci` label which will enable all the validation pipelines. All the validation jobs are still run on a marge batch. The goal is to reduce the overall CI capacity so that pipelines start faster for MRs and marge bot batches are faster. Fixes #23694 - - - - - 0b23db03 by Alan Zimmerman at 2023-07-20T05:28:47-04:00 EPA: Simplify GHC/Parser.y sL1 This is the next patch in a series simplifying location management in GHC/Parser.y This one simplifies sL1, to use the HasLoc instances introduced in !10743 (closed) - - - - - 3ece9856 by Ben Gamari at 2023-07-21T07:30:45-04:00 nativeGen: Explicitly set flags of text sections on Windows The binutils documentation (for COFF) claims, > If no flags are specified, the default flags depend upon the section > name. If the section name is not recognized, the default will be for the > section to be loaded and writable. We previously assumed that this would do the right thing for split sections (e.g. a section named `.text$foo` would be correctly inferred to be a text section). However, we have observed that this is not the case (at least under the clang toolchain used on Windows): when split-sections is enabled, text sections are treated by the assembler as data (matching the "default" behavior specified by the documentation). Avoid this by setting section flags explicitly. This should fix split sections on Windows. Fixes #22834. - - - - - db7f7240 by Ben Gamari at 2023-07-21T07:30:45-04:00 nativeGen: Set explicit section types on all platforms - - - - - b444c16f by Finley McIlwaine at 2023-07-21T07:31:28-04:00 Insert documentation into parsed signature modules Causes haddock comments in signature modules to be properly inserted into the AST (just as they are for regular modules) if the `-haddock` flag is given. Also adds a test that compares `-ddump-parsed-ast` output for a signature module to prevent further regressions. Fixes #23315 - - - - - f9b952a7 by Ben Gamari at 2023-07-21T11:58:05-04:00 Bump base bound to <4.20 For GHC 9.8. - - - - - c30cea53 by Ben Gamari at 2023-07-21T23:23:49-04:00 primops: Introduce unsafeThawByteArray# This addresses an odd asymmetry in the ByteArray# primops, which previously provided unsafeFreezeByteArray# but no corresponding thaw operation. Closes #22710 - - - - - 87f9bd47 by Ben Gamari at 2023-07-21T23:23:49-04:00 testsuite: Elaborate in interface stability README This discussion didn't make it into the original MR. - - - - - e4350b41 by Matthew Pickering at 2023-07-21T23:24:25-04:00 Allow users to override non-essential haddock options in a Flavour We now supply the non-essential options to haddock using the `extraArgs` field, which can be specified in a Flavour so that if an advanced user wants to change how documentation is generated then they can use something other than the `defaultHaddockExtraArgs`. This does have the potential to regress some packaging if a user has overridden `extraArgs` themselves, because now they also need to add the haddock options to extraArgs. This can easily be done by appending `defaultHaddockExtraArgs` to their extraArgs invocation but someone might not notice this behaviour has changed. In any case, I think passing the non-essential options in this manner is the right thing to do and matches what we do for the "ghc" builder, which by default doesn't pass any optmisation levels, and would likewise be very bad if someone didn't pass suitable `-O` levels for builds. Fixes #23625 - - - - - fc186b0c by Ilias Tsitsimpis at 2023-07-21T23:25:03-04:00 ghc-prim: Link against libatomic Commit b4d39adbb58 made 'hs_cmpxchg64()' available to all architectures. Unfortunately this made GHC to fail to build on armel, since armel needs libatomic to support atomic operations on 64-bit word sizes. Configure libraries/ghc-prim/ghc-prim.cabal to link against libatomic, the same way as we do in rts/rts.cabal. - - - - - 4f5538a8 by Matthew Pickering at 2023-07-21T23:25:39-04:00 simplifier: Correct InScopeSet in rule matching The in-scope set passedto the `exprIsLambda_maybe` call lacked all the in-scope binders. @simonpj suggests this fix where we augment the in-scope set with the free variables of expression which fixes this failure mode in quite a direct way. Fixes #23630 - - - - - 5ad8d597 by Krzysztof Gogolewski at 2023-07-21T23:26:17-04:00 Add a test for #23413 It was fixed by commit e1590ddc661d6: Add the SolverStage monad. - - - - - 7e05f6df by sheaf at 2023-07-21T23:26:56-04:00 Finish migration of diagnostics in GHC.Tc.Validity This patch finishes migrating the error messages in GHC.Tc.Validity to use the new diagnostic infrastructure. It also refactors the error message datatypes for class and family instances, to common them up under a single datatype as much as possible. - - - - - 4876fddc by Matthew Pickering at 2023-07-21T23:27:33-04:00 ci: Enable some more jobs to run in a marge batch In !10907 I made the majority of jobs not run on a validate pipeline but then forgot to renable a select few jobs on the marge batch MR. - - - - - 026991d7 by Jens Petersen at 2023-07-21T23:28:13-04:00 user_guide/flags.py: python-3.12 no longer includes distutils packaging.version seems able to handle this fine - - - - - b91bbc2b by Matthew Pickering at 2023-07-21T23:28:50-04:00 ci: Mention ~full-ci label in MR template We mention that if you need a full validation pipeline then you can apply the ~full-ci label to your MR in order to test against the full validation pipeline (like we do for marge). - - - - - 42b05e9b by sheaf at 2023-07-22T12:36:00-04:00 RTS: declare setKeepCAFs symbol Commit 08ba8720 failed to declare the dependency of keepCAFsForGHCi on the symbol setKeepCAFs in the RTS, which led to undefined symbol errors on Windows, as exhibited by the testcase frontend001. Thanks to Moritz Angermann and Ryan Scott for the diagnosis and fix. Fixes #22961 - - - - - a72015d6 by sheaf at 2023-07-22T12:36:01-04:00 Mark plugins-external as broken on Windows This test is broken on Windows, so we explicitly mark it as such now that we stop skipping plugin tests on Windows. - - - - - cb9c93d7 by sheaf at 2023-07-22T12:36:01-04:00 Stop marking plugin tests as fragile on Windows Now that b2bb3e62 has landed we are in a better situation with regards to plugins on Windows, allowing us to unmark many plugin tests as fragile. Fixes #16405 - - - - - a7349217 by Krzysztof Gogolewski at 2023-07-22T12:36:37-04:00 Misc cleanup - Remove unused RDR names - Fix typos in comments - Deriving: simplify boxConTbl and remove unused litConTbl - chmod -x GHC/Exts.hs, this seems accidental - - - - - 33b6850a by Vladislav Zavialov at 2023-07-23T10:27:37-04:00 Visible forall in types of terms: Part 1 (#22326) This patch implements part 1 of GHC Proposal #281, introducing explicit `type` patterns and `type` arguments. Summary of the changes: 1. New extension flag: RequiredTypeArguments 2. New user-facing syntax: `type p` patterns (represented by EmbTyPat) `type e` expressions (represented by HsEmbTy) 3. Functions with required type arguments (visible forall) can now be defined and applied: idv :: forall a -> a -> a -- signature (relevant change: checkVdqOK in GHC/Tc/Validity.hs) idv (type a) (x :: a) = x -- definition (relevant change: tcPats in GHC/Tc/Gen/Pat.hs) x = idv (type Int) 42 -- usage (relevant change: tcInstFun in GHC/Tc/Gen/App.hs) 4. template-haskell support: TH.TypeE corresponds to HsEmbTy TH.TypeP corresponds to EmbTyPat 5. Test cases and a new User's Guide section Changes *not* included here are the t2t (term-to-type) transformation and term variable capture; those belong to part 2. - - - - - 73b5c7ce by sheaf at 2023-07-23T10:28:18-04:00 Add test for #22424 This is a simple Template Haskell test in which we refer to record selectors by their exact Names, in two different ways. Fixes #22424 - - - - - 83cbc672 by Ben Gamari at 2023-07-24T07:40:49+00:00 ghc-toolchain: Initial commit - - - - - 31dcd26c by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00 ghc-toolchain: Toolchain Selection This commit integrates ghc-toolchain, the brand new way of configuring toolchains for GHC, with the Hadrian build system, with configure, and extends and improves the first iteration of ghc-toolchain. The general overview is * We introduce a program invoked `ghc-toolchain --triple=...` which, when run, produces a file with a `Target`. A `GHC.Toolchain.Target.Target` describes the properties of a target and the toolchain (executables and configured flags) to produce code for that target * Hadrian was modified to read Target files, and will both * Invoke the toolchain configured in the Target file as needed * Produce a `settings` file for GHC based on the Target file for that stage * `./configure` will invoke ghc-toolchain to generate target files, but it will also generate target files based on the flags configure itself configured (through `.in` files that are substituted) * By default, the Targets generated by configure are still (for now) the ones used by Hadrian * But we additionally validate the Target files generated by ghc-toolchain against the ones generated by configure, to get a head start on catching configuration bugs before we transition completely. * When we make that transition, we will want to drop a lot of the toolchain configuration logic from configure, but keep it otherwise. * For each compiler stage we should have 1 target file (up to a stage compiler we can't run in our machine) * We just have a HOST target file, which we use as the target for stage0 * And a TARGET target file, which we use for stage1 (and later stages, if not cross compiling) * Note there is no BUILD target file, because we only support cross compilation where BUILD=HOST * (for more details on cross-compilation see discussion on !9263) See also * Note [How we configure the bundled windows toolchain] * Note [ghc-toolchain consistency checking] * Note [ghc-toolchain overview] Ticket: #19877 MR: !9263 - - - - - a732b6d3 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00 Add flag to enable/disable ghc-toolchain based configurations This flag is disabled by default, and we'll use the configure-generated-toolchains by default until we remove the toolchain configuration logic from configure. - - - - - 61eea240 by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00 Split ghc-toolchain executable to new packge In light of #23690, we split the ghc-toolchain executable out of the library package to be able to ship it in the bindist using Hadrian. Ideally, we eventually revert this commit. - - - - - 38e795ff by Rodrigo Mesquita at 2023-07-24T07:40:49+00:00 Ship ghc-toolchain in the bindist Add the ghc-toolchain binary to the binary distribution we ship to users, and teach the bindist configure to use the existing ghc-toolchain. - - - - - 32cae784 by Matthew Craven at 2023-07-24T16:48:24-04:00 Kill off gen_bytearray_addr_access_ops.py The relevant primop descriptions are now generated directly by genprimopcode. This makes progress toward fixing #23490, but it is not a complete fix since there is more than one way in which cabal-reinstall (hadrian/build build-cabal) is broken. - - - - - 02e6a6ce by Matthew Pickering at 2023-07-24T16:49:00-04:00 compiler: Remove unused `containers.h` include Fixes #23712 - - - - - 822ef66b by Matthew Pickering at 2023-07-25T08:44:50-04:00 Fix pretty printing of WARNING pragmas There is still something quite unsavoury going on with WARNING pragma printing because the printing relies on the fact that for decl deprecations the SourceText of WarningTxt is empty. However, I let that lion sleep and just fixed things directly. Fixes #23465 - - - - - e7b38ede by Matthew Pickering at 2023-07-25T08:45:28-04:00 ci-images: Bump to commit which has 9.6 image The test-bootstrap job has been failing for 9.6 because we accidentally used a non-master commit. - - - - - bb408936 by Matthew Pickering at 2023-07-25T08:45:28-04:00 Update bootstrap plans for 9.6.2 and 9.4.5 - - - - - 355e1792 by Alan Zimmerman at 2023-07-26T10:17:32-04:00 EPA: Simplify GHC/Parser.y comb4/comb5 Use the HasLoc instance from Ast.hs to allow comb4/comb5 to work with anything with a SrcSpan Also get rid of some more now unnecessary reLoc calls. - - - - - 9393df83 by Gavin Zhao at 2023-07-26T10:18:16-04:00 compiler: make -ddump-asm work with wasm backend NCG Fixes #23503. Now the `-ddump-asm` flag is respected in the wasm backend NCG, so developers can directly view the generated ASM instead of needing to pass `-S` or `-keep-tmp-files` and manually find & open the assembly file. Ideally, we should be able to output the assembly files in smaller chunks like in other NCG backends. This would also make dumping assembly stats easier. However, this would require a large refactoring, so for short-term debugging purposes I think the current approach works fine. Signed-off-by: Gavin Zhao <git at gzgz.dev> - - - - - 79463036 by Krzysztof Gogolewski at 2023-07-26T10:18:54-04:00 llvm: Restore accidentally deleted code in 0fc5cb97 Fixes #23711 - - - - - 20db7e26 by Rodrigo Mesquita at 2023-07-26T10:19:33-04:00 configure: Default missing options to False when preparing ghc-toolchain Targets This commit fixes building ghc with 9.2 as the boostrap compiler. The ghc-toolchain patch assumed all _STAGE0 options were available, and forgot to account for this missing information in 9.2. Ghc 9.2 does not have in settings whether ar supports -l, hence can't report it with --info (unliked 9.4 upwards). The fix is to default the missing information (we default "ar supports -l" and other missing options to False) - - - - - fac9e84e by Naïm Favier at 2023-07-26T10:20:16-04:00 docs: Fix typo - - - - - 503fd647 by Bartłomiej Cieślar at 2023-07-26T17:23:10-04:00 This MR is an implementation of the proposal #516. It adds a warning -Wincomplete-record-selectors for usages of a record field access function (either a record selector or getField @"rec"), while trying to silence the warning whenever it can be sure that a constructor without the record field would not be invoked (which would otherwise cause the program to fail). For example: data T = T1 | T2 {x :: Bool} f a = x a -- this would throw an error g T1 = True g a = x a -- this would not throw an error h :: HasField "x" r Bool => r -> Bool h = getField @"x" j :: T -> Bool j = h -- this would throw an error because of the `HasField` -- constraint being solved See the tests DsIncompleteRecSel* and TcIncompleteRecSel for more examples of the warning. See Note [Detecting incomplete record selectors] in GHC.HsToCore.Expr for implementation details - - - - - af6fdf42 by Arnaud Spiwack at 2023-07-26T17:23:52-04:00 Fix user-facing label in MR template - - - - - 5d45b92a by Matthew Pickering at 2023-07-27T05:46:46-04:00 ci: Test bootstrapping configurations with full-ci and on marge batches There have been two incidents recently where bootstrapping has been broken by removing support for building with 9.2.*. The process for bumping the minimum required version starts with bumping the configure version and then other CI jobs such as the bootstrap jobs have to be updated. We must not silently bump the minimum required version. Now we are running a slimmed down validate pipeline it seems worthwile to test these bootstrap configurations in the full-ci pipeline. - - - - - 25d4fee7 by Matthew Pickering at 2023-07-27T05:46:46-04:00 bootstrap: Remove ghc-9_2_* plans We are anticipating shortly making it necessary to use ghc-9.4 to boot the compiler. - - - - - 2f66da16 by Matthew Pickering at 2023-07-27T05:46:46-04:00 Update bootstrap plans for ghc-platform and ghc-toolchain dependencies Fixes #23735 - - - - - c8c6eab1 by Matthew Pickering at 2023-07-27T05:46:46-04:00 bootstrap: Disable -selftest flag from bootstrap plans This saves on building one dependency (QuickCheck) which is unecessary for bootstrapping. - - - - - a80ca086 by Andrew Lelechenko at 2023-07-27T05:47:26-04:00 Link reference paper and package from System.Mem.{StableName,Weak} - - - - - a5319358 by David Knothe at 2023-07-28T13:13:10-04:00 Update Match Datatype EquationInfo currently contains a list of the equation's patterns together with a CoreExpr that is to be evaluated after a successful match on this equation. All the match-functions only operate on the first pattern of an equation - after successfully matching it, match is called recursively on the tail of the pattern list. We can express this more clearly and make the code a little more elegant by updating the datatype of EquationInfo as follows: data EquationInfo = EqnMatch { eqn_pat = Pat GhcTc, eqn_rest = EquationInfo } | EqnDone { eqn_rhs = MatchResult CoreExpr } An EquationInfo now explicitly exposes its first pattern which most functions operate on, and exposes the equation that remains after processing the first pattern. An EqnDone signifies an empty equation where the CoreExpr can now be evaluated. - - - - - 86ad1af9 by David Binder at 2023-07-28T13:13:53-04:00 Improve documentation for Data.Fixed - - - - - f8fa1d08 by Ben Gamari at 2023-07-28T13:14:31-04:00 ghc-prim: Use C11 atomics Previously `ghc-prim`'s atomic wrappers used the legacy `__sync_*` family of C builtins. Here we refactor these to rather use the appropriate C11 atomic equivalents, allowing us to be more explicit about the expected ordering semantics. - - - - - 0bfc8908 by Finley McIlwaine at 2023-07-28T18:46:26-04:00 Include -haddock in DynFlags fingerprint The -haddock flag determines whether or not the resulting .hi files contain haddock documentation strings. If the existing .hi files do not contain haddock documentation strings and the user requests them, we should recompile. - - - - - 40425c50 by Andreas Klebinger at 2023-07-28T18:47:02-04:00 Aarch64 NCG: Use encoded immediates for literals. Try to generate instr x2, <imm> instead of mov x1, lit instr x2, x1 When possible. This get's rid if quite a few redundant mov instructions. I believe this causes a metric decrease for LargeRecords as we reduce register pressure. ------------------------- Metric Decrease: LargeRecord ------------------------- - - - - - e9a0fa3f by Andrew Lelechenko at 2023-07-28T18:47:42-04:00 Bump filepath submodule to 1.4.100.4 Resolves #23741 Metric Decrease: MultiComponentModules MultiComponentModulesRecomp MultiLayerModules MultiLayerModulesRecomp T10421 T12234 T12425 T13035 T13701 T13719 T16875 T18304 T18698a T18698b T21839c T9198 TcPlugin_RewritePerf hard_hole_fits Metric decrease on Windows can be probably attributed to https://github.com/haskell/filepath/pull/183 - - - - - ee93edfd by Andrew Lelechenko at 2023-07-28T18:48:21-04:00 Add since pragmas to GHC.IO.Handle.FD - - - - - d0369802 by Simon Peyton Jones at 2023-07-30T09:24:48+01:00 Make the occurrence analyser smarter about join points This MR addresses #22404. There is a big Note Note [Occurrence analysis for join points] that explains it all. Significant changes * New field occ_join_points in OccEnv * The NonRec case of occAnalBind splits into two cases: one for existing join points (which does the special magic for Note [Occurrence analysis for join points], and one for other bindings. * mkOneOcc adds in info from occ_join_points. * All "bring into scope" activity is centralised in the new function `addInScope`. * I made a local data type LocalOcc for use inside the occurrence analyser It is like OccInfo, but lacks IAmDead and IAmALoopBreaker, which in turn makes computationns over it simpler and more efficient. * I found quite a bit of allocation in GHC.Core.Rules.getRules so I optimised it a bit. More minor changes * I found I was using (Maybe Arity) a lot, so I defined a new data type JoinPointHood and used it everwhere. This touches a lot of non-occ-anal files, but it makes everything more perspicuous. * Renamed data constructor WithUsageDetails to WUD, and WithTailUsageDetails to WTUD This also fixes #21128, on the way. --------- Compiler perf ----------- I spent quite a time on performance tuning, so even though it does more than before, the occurrence analyser runs slightly faster on average. Here are the compile-time allocation changes over 0.5% CoOpt_Read(normal) ghc/alloc 766,025,520 754,561,992 -1.5% CoOpt_Singletons(normal) ghc/alloc 759,436,840 762,925,512 +0.5% LargeRecord(normal) ghc/alloc 1,814,482,440 1,799,530,456 -0.8% PmSeriesT(normal) ghc/alloc 68,159,272 67,519,720 -0.9% T10858(normal) ghc/alloc 120,805,224 118,746,968 -1.7% T11374(normal) ghc/alloc 164,901,104 164,070,624 -0.5% T11545(normal) ghc/alloc 79,851,808 78,964,704 -1.1% T12150(optasm) ghc/alloc 73,903,664 71,237,544 -3.6% GOOD T12227(normal) ghc/alloc 333,663,200 331,625,864 -0.6% T12234(optasm) ghc/alloc 52,583,224 52,340,344 -0.5% T12425(optasm) ghc/alloc 81,943,216 81,566,720 -0.5% T13056(optasm) ghc/alloc 294,517,928 289,642,512 -1.7% T13253-spj(normal) ghc/alloc 118,271,264 59,859,040 -49.4% GOOD T15164(normal) ghc/alloc 1,102,630,352 1,091,841,296 -1.0% T15304(normal) ghc/alloc 1,196,084,000 1,166,733,000 -2.5% T15630(normal) ghc/alloc 148,729,632 147,261,064 -1.0% T15703(normal) ghc/alloc 379,366,664 377,600,008 -0.5% T16875(normal) ghc/alloc 32,907,120 32,670,976 -0.7% T17516(normal) ghc/alloc 1,658,001,888 1,627,863,848 -1.8% T17836(normal) ghc/alloc 395,329,400 393,080,248 -0.6% T18140(normal) ghc/alloc 71,968,824 73,243,040 +1.8% T18223(normal) ghc/alloc 456,852,568 453,059,088 -0.8% T18282(normal) ghc/alloc 129,105,576 131,397,064 +1.8% T18304(normal) ghc/alloc 71,311,712 70,722,720 -0.8% T18698a(normal) ghc/alloc 208,795,112 210,102,904 +0.6% T18698b(normal) ghc/alloc 230,320,736 232,697,976 +1.0% BAD T19695(normal) ghc/alloc 1,483,648,128 1,504,702,976 +1.4% T20049(normal) ghc/alloc 85,612,024 85,114,376 -0.6% T21839c(normal) ghc/alloc 415,080,992 410,906,216 -1.0% GOOD T4801(normal) ghc/alloc 247,590,920 250,726,272 +1.3% T6048(optasm) ghc/alloc 95,699,416 95,080,680 -0.6% T783(normal) ghc/alloc 335,323,384 332,988,120 -0.7% T9233(normal) ghc/alloc 709,641,224 685,947,008 -3.3% GOOD T9630(normal) ghc/alloc 965,635,712 948,356,120 -1.8% T9675(optasm) ghc/alloc 444,604,152 428,987,216 -3.5% GOOD T9961(normal) ghc/alloc 303,064,592 308,798,800 +1.9% BAD WWRec(normal) ghc/alloc 503,728,832 498,102,272 -1.1% geo. mean -1.0% minimum -49.4% maximum +1.9% In fact these figures seem to vary between platforms; generally worse on i386 for some reason. The Windows numbers vary by 1% espec in benchmarks where the total allocation is low. But the geom mean stays solidly negative, which is good. The "increase/decrease" list below covers all platforms. The big win on T13253-spj comes because it has a big nest of join points, each occurring twice in the next one. The new occ-anal takes only one iteration of the simplifier to do the inlining; the old one took four. Moreover, we get much smaller code with the new one: New: Result size of Tidy Core = {terms: 429, types: 84, coercions: 0, joins: 14/14} Old: Result size of Tidy Core = {terms: 2,437, types: 304, coercions: 0, joins: 10/10} --------- Runtime perf ----------- No significant changes in nofib results, except a 1% reduction in compiler allocation. Metric Decrease: CoOpt_Read T13253-spj T9233 T9630 T9675 T12150 T21839c LargeRecord MultiComponentModulesRecomp T10421 T13701 T10421 T13701 T12425 Metric Increase: T18140 T9961 T18282 T18698a T18698b T19695 - - - - - 42aa7fbd by Julian Ospald at 2023-07-30T17:22:01-04:00 Improve documentation around IOException and ioe_filename See: * https://github.com/haskell/core-libraries-committee/issues/189 * https://github.com/haskell/unix/pull/279 * https://github.com/haskell/unix/pull/289 - - - - - 33598ecb by Sylvain Henry at 2023-08-01T14:45:54-04:00 JS: implement getMonotonicTime (fix #23687) - - - - - d2bedffd by Bartłomiej Cieślar at 2023-08-01T14:46:40-04:00 Implementation of the Deprecated Instances proposal #575 This commit implements the ability to deprecate certain instances, which causes the compiler to emit the desired deprecation message whenever they are instantiated. For example: module A where class C t where instance {-# DEPRECATED "dont use" #-} C Int where module B where import A f :: C t => t f = undefined g :: Int g = f -- "dont use" emitted here The implementation is as follows: - In the parser, we parse deprecations/warnings attached to instances: instance {-# DEPRECATED "msg" #-} Show X deriving instance {-# WARNING "msg2" #-} Eq Y (Note that non-standalone deriving instance declarations do not support this mechanism.) - We store the resulting warning message in `ClsInstDecl` (respectively, `DerivDecl`). In `GHC.Tc.TyCl.Instance.tcClsInstDecl` (respectively, `GHC.Tc.Deriv.Utils.newDerivClsInst`), we pass on that information to `ClsInst` (and eventually store it in `IfaceClsInst` too). - Finally, when we solve a constraint using such an instance, in `GHC.Tc.Instance.Class.matchInstEnv`, we emit the appropriate warning that was stored in `ClsInst`. Note that we only emit a warning when the instance is used in a different module than it is defined, which keeps the behaviour in line with the deprecation of top-level identifiers. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - d5a65af6 by Ben Gamari at 2023-08-01T14:47:18-04:00 compiler: Style fixes - - - - - 7218c80a by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Fix implicit cast This ensures that Task.h can be built with a C++ compiler. - - - - - d6d5aafc by Ben Gamari at 2023-08-01T14:47:19-04:00 testsuite: Fix warning in hs_try_putmvar001 - - - - - d9eddf7a by Ben Gamari at 2023-08-01T14:47:19-04:00 testsuite: Add AtomicModifyIORef test - - - - - f9eea4ba by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Introduce NO_WARN macro This allows fine-grained ignoring of warnings. - - - - - 497b24ec by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Simplify atomicModifyMutVar2# implementation Previously we would perform a redundant load in the non-threaded RTS in atomicModifyMutVar2# implementation for the benefit of the non-moving GC's write barrier. Eliminate this. - - - - - 52ee082b by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Introduce more principled fence operations - - - - - cd3c0377 by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Introduce SET_INFO_RELAXED - - - - - 6df2352a by Ben Gamari at 2023-08-01T14:47:19-04:00 rts: Style fixes - - - - - 4ef6f319 by Ben Gamari at 2023-08-01T14:47:19-04:00 codeGen/tsan: Rework handling of spilling - - - - - f9ca7e27 by Ben Gamari at 2023-08-01T14:47:19-04:00 hadrian: More debug information - - - - - df4153ac by Ben Gamari at 2023-08-01T14:47:19-04:00 Improve TSAN documentation - - - - - fecae988 by Ben Gamari at 2023-08-01T14:47:19-04:00 hadrian: More selective TSAN instrumentation - - - - - 465a9a0b by Alan Zimmerman at 2023-08-01T14:47:56-04:00 EPA: Provide correct annotation span for ImportDecl Use the whole declaration, rather than just the span of the 'import' keyword. Metric Decrease: T9961 T5205 Metric Increase: T13035 - - - - - ae63d0fa by Bartłomiej Cieślar at 2023-08-01T14:48:40-04:00 Add cases to T23279: HasField for deprecated record fields This commit adds additional tests from ticket #23279 to ensure that we don't regress on reporting deprecated record fields in conjunction with HasField, either when using overloaded record dot syntax or directly through `getField`. Fixes #23279 - - - - - 00fb6e6b by Andreas Klebinger at 2023-08-01T14:49:17-04:00 AArch NCG: Pure refactor Combine some alternatives. Add some line breaks for overly long lines - - - - - 8f3b3b78 by Andreas Klebinger at 2023-08-01T14:49:54-04:00 Aarch ncg: Optimize immediate use for address calculations When the offset doesn't fit into the immediate we now just reuse the general getRegister' code path which is well optimized to compute the offset into a register instead of a special case for CmmRegOff. This means we generate a lot less code under certain conditions which is why performance metrics for these improve. ------------------------- Metric Decrease: T4801 T5321FD T5321Fun ------------------------- - - - - - 74a882dc by MorrowM at 2023-08-02T06:00:03-04:00 Add a RULE to make lookup fuse See https://github.com/haskell/core-libraries-committee/issues/175 Metric Increase: T18282 - - - - - cca74dab by Ben Gamari at 2023-08-02T06:00:39-04:00 hadrian: Ensure that way-flags are passed to CC Previously the way-specific compilation flags (e.g. `-DDEBUG`, `-DTHREADED_RTS`) would not be passed to the CC invocations. This meant that C dependency files would not correctly reflect dependencies predicated on the way, resulting in the rather painful #23554. Closes #23554. - - - - - 622b483c by Jaro Reinders at 2023-08-02T06:01:20-04:00 Native 32-bit Enum Int64/Word64 instances This commits adds more performant Enum Int64 and Enum Word64 instances for 32-bit platforms, replacing the Integer-based implementation. These instances are a copy of the Enum Int and Enum Word instances with minimal changes to manipulate Int64 and Word64 instead. On i386 this yields a 1.5x performance increase and for the JavaScript back end it even yields a 5.6x speedup. Metric Decrease: T18964 - - - - - c8bd7fa4 by Sylvain Henry at 2023-08-02T06:02:03-04:00 JS: fix typos in constants (#23650) - - - - - b9d5bfe9 by Josh Meredith at 2023-08-02T06:02:40-04:00 JavaScript: update MK_TUP macros to use current tuple constructors (#23659) - - - - - 28211215 by Matthew Pickering at 2023-08-02T06:03:19-04:00 ci: Pass -Werror when building hadrian in hadrian-ghc-in-ghci job Warnings when building Hadrian can end up cluttering the output of HLS, and we've had bug reports in the past about these warnings when building Hadrian. It would be nice to turn on -Werror on at least one build of Hadrian in CI to avoid a patch introducing warnings when building Hadrian. Fixes #23638 - - - - - aca20a5d by Ben Gamari at 2023-08-02T06:03:55-04:00 codeGen: Ensure that TSAN is aware of writeArray# write barriers By using a proper release store instead of a fence. - - - - - 453c0531 by Ben Gamari at 2023-08-02T06:03:55-04:00 codeGen: Ensure that array reads have necessary barriers This was the cause of #23541. - - - - - 93a0d089 by Arnaud Spiwack at 2023-08-02T06:04:37-04:00 Add test for #23550 - - - - - 6a2f4a20 by Arnaud Spiwack at 2023-08-02T06:04:37-04:00 Desugar non-recursive lets to non-recursive lets (take 2) This reverts commit 522bd584f71ddeda21efdf0917606ce3d81ec6cc. And takes care of the case that I missed in my previous attempt. Namely the case of an AbsBinds with no type variables and no dictionary variable. Ironically, the comment explaining why non-recursive lets were desugared to recursive lets were pointing specifically at this case as the reason. I just failed to understand that it was until Simon PJ pointed it out to me. See #23550 for more discussion. - - - - - ff81d53f by jade at 2023-08-02T06:05:20-04:00 Expand documentation of List & Data.List This commit aims to improve the documentation and examples of symbols exported from Data.List - - - - - fa4e5913 by Jade at 2023-08-02T06:06:03-04:00 Improve documentation of Semigroup & Monoid This commit aims to improve the documentation of various symbols exported from Data.Semigroup and Data.Monoid - - - - - 1b27e151 by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Check for puns (see ghc#23368) - - - - - 457341fd by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Remove fake exports for (~), List, and Tuple<n> The old reasoning no longer applies, nowadays those names can be mentioned in export lists. - - - - - bf3dcddf by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Fix pretty-printing of Solo and MkSolo - - - - - e2c91bff by Gergő Érdi at 2023-08-03T02:55:46+01:00 Desugar bindings in the context of their evidence Closes #23172 - - - - - 481f4a46 by Gergő Érdi at 2023-08-03T07:48:43+01:00 Add flag to `-f{no-}specialise-incoherents` to enable/disable specialisation of incoherent instances Fixes #23287 - - - - - d751c583 by Profpatsch at 2023-08-04T12:24:26-04:00 base: Improve String & IsString documentation - - - - - 01db1117 by Ben Gamari at 2023-08-04T12:25:02-04:00 rts/win32: Ensure reliability of IO manager shutdown When the Win32 threaded IO manager shuts down, `ioManagerDie` sends an `IO_MANAGER_DIE` event to the IO manager thread using the `io_manager_event` event object. Finally, it will closes the event object, and invalidate `io_manager_event`. Previously, `readIOManagerEvent` would see that `io_manager_event` is invalid and return `0`, suggesting that everything is right with the world. This meant that if `ioManagerDie` invalidated the handle before the event manager was blocked on the event we would end up in a situation where the event manager would never realize it was asked to shut down. Fix this by ensuring that `readIOManagerEvent` instead returns `IO_MANAGER_DIE` when we detect that the event object has been invalidated by `ioManagerDie`. Fixes #23691. - - - - - fdef003a by Ryan Scott at 2023-08-04T12:25:39-04:00 Look through TH splices in splitHsApps This modifies `splitHsApps` (a key function used in typechecking function applications) to look through untyped TH splices and quasiquotes. Not doing so was the cause of #21077. This builds on !7821 by making `splitHsApps` match on `HsUntypedSpliceTop`, which contains the `ThModFinalizers` that must be run as part of invoking the TH splice. See the new `Note [Looking through Template Haskell splices in splitHsApps]` in `GHC.Tc.Gen.Head`. Along the way, I needed to make the type of `splitHsApps.set` slightly more general to accommodate the fact that the location attached to a quasiquote is a `SrcAnn NoEpAnns` rather than a `SrcSpanAnnA`. Fixes #21077. - - - - - e77a0b41 by Ben Gamari at 2023-08-04T12:26:15-04:00 Bump deepseq submodule to 1.5. And bump bounds (cherry picked from commit 1228d3a4a08d30eaf0138a52d1be25b38339ef0b) - - - - - cebb5819 by Ben Gamari at 2023-08-04T12:26:15-04:00 configure: Bump minimal boot GHC version to 9.4 (cherry picked from commit d3ffdaf9137705894d15ccc3feff569d64163e8e) - - - - - 83766dbf by Ben Gamari at 2023-08-04T12:26:15-04:00 template-haskell: Bump version to 2.21.0.0 Bumps exceptions submodule. (cherry picked from commit bf57fc9aea1196f97f5adb72c8b56434ca4b87cb) - - - - - 1211112a by Ben Gamari at 2023-08-04T12:26:15-04:00 base: Bump version to 4.19 Updates all boot library submodules. (cherry picked from commit 433d99a3c24a55b14ec09099395e9b9641430143) - - - - - 3ab5efd9 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Normalise versions more aggressively In backpack hashes can contain `+` characters. (cherry picked from commit 024861af51aee807d800e01e122897166a65ea93) - - - - - d52be957 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Declare bkpcabal08 as fragile Due to spurious output changes described in #23648. (cherry picked from commit c046a2382420f2be2c4a657c56f8d95f914ea47b) - - - - - e75a58d1 by Ben Gamari at 2023-08-04T12:26:15-04:00 gitlab-ci: Only mark linker_unload_native as broken in static jobs This test passes on dynamically-linked Alpine. (cherry picked from commit f356a7e8ec8ec3d6b2b30fd175598b9b80065d87) - - - - - 8b176514 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Update base-exports - - - - - 4b647936 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite/interface-stability: normalise versions This eliminates spurious changes from version bumps. - - - - - 0eb54c05 by Ben Gamari at 2023-08-04T12:26:51-04:00 linker/PEi386: Don't sign-extend symbol section number Previously we incorrectly interpreted PE section numbers as signed values. However, this isn't the case; rather, it's an unsigned 16-bit number with a few special bit-patterns (0xffff and 0xfffe). This resulted in #22941 as the linker would conclude that the sections were invalid. Fixing this required quite a bit of refactoring. Closes #22941. - - - - - fd7ce39c by Ben Gamari at 2023-08-04T12:27:28-04:00 testsuite: Mark MulMayOflo_full as broken rather than skipping To ensure that we don't accidentally fix it. See #23742. - - - - - 824092f2 by Ben Gamari at 2023-08-04T12:27:28-04:00 nativeGen/AArch64: Fix sign extension in MulMayOflo Previously the 32-bit implementations of MulMayOflo would use the a non-sensical sign-extension mode. Rewrite these to reflect what gcc 11 produces. Also similarly rework the 16- and 8-bit cases. This now passes the MulMayOflo tests in ghc/test-primops> in all four widths, including the precision tests. Fixes #23721. - - - - - 1b15dbc4 by Jan Hrček at 2023-08-04T12:28:08-04:00 Fix haddock markup in code example for coerce - - - - - 46fd8ced by Vladislav Zavialov at 2023-08-04T12:28:44-04:00 Fix (~) and (@) infix operators in TH splices (#23748) 8168b42a "Whitespace-sensitive bang patterns" allows GHC to accept the following infix operators: a ~ b = () a @ b = () But not if TH is used to generate those declarations: $([d| a ~ b = () a @ b = () |]) -- Test.hs:5:2: error: [GHC-55017] -- Illegal variable name: ‘~’ -- When splicing a TH declaration: (~_0) a_1 b_2 = GHC.Tuple.Prim.() This is easily fixed by modifying `reservedOps` in GHC.Utils.Lexeme - - - - - a1899d8f by Aaron Allen at 2023-08-04T12:29:24-04:00 [#23663] Show Flag Suggestions in GHCi Makes suggestions when using `:set` in GHCi with a misspelled flag. This mirrors how invalid flags are handled when passed to GHC directly. Logic for producing flag suggestions was moved to GHC.Driver.Sesssion so it can be shared. resolves #23663 - - - - - 03f2debd by Rodrigo Mesquita at 2023-08-04T12:30:00-04:00 Improve ghc-toolchain validation configure warning Fixes the layout of the ghc-toolchain validation warning produced by configure. - - - - - de25487d by Alan Zimmerman at 2023-08-04T12:30:36-04:00 EPA make getLocA a synonym for getHasLoc This is basically a no-op change, but allows us to make future changes that can rely on the HasLoc instances And I presume this means we can use more precise functions based on class resolution, so the Windows CI build reports Metric Decrease: T12234 T13035 - - - - - 3ac423b9 by Ben Gamari at 2023-08-04T12:31:13-04:00 ghc-platform: Add upper bound on base Hackage upload requires this. - - - - - 8ba20b21 by Matthew Craven at 2023-08-04T17:22:59-04:00 Adjust and clarify handling of primop effects Fixes #17900; fixes #20195. The existing "can_fail" and "has_side_effects" primop attributes that previously governed this were used in inconsistent and confusingly-documented ways, especially with regard to raising exceptions. This patch replaces them with a single "effect" attribute, which has four possible values: NoEffect, CanFail, ThrowsException, and ReadWriteEffect. These are described in Note [Classifying primop effects]. A substantial amount of related documentation has been re-drafted for clarity and accuracy. In the process of making this attribute format change for literally every primop, several existing mis-classifications were detected and corrected. One of these mis-classifications was tagToEnum#, which is now considered CanFail; this particular fix is known to cause a regression in performance for derived Enum instances. (See #23782.) Fixing this is left as future work. New primop attributes "cheap" and "work_free" were also added, and used in the corresponding parts of GHC.Core.Utils. In view of their actual meaning and uses, `primOpOkForSideEffects` and `exprOkForSideEffects` have been renamed to `primOpOkToDiscard` and `exprOkToDiscard`, respectively. Metric Increase: T21839c - - - - - 41bf2c09 by sheaf at 2023-08-04T17:23:42-04:00 Update inert_solved_dicts for ImplicitParams When adding an implicit parameter dictionary to the inert set, we must make sure that it replaces any previous implicit parameter dictionaries that overlap, in order to get the appropriate shadowing behaviour, as in let ?x = 1 in let ?x = 2 in ?x We were already doing this for inert_cans, but we weren't doing the same thing for inert_solved_dicts, which lead to the bug reported in #23761. The fix is thus to make sure that, when handling an implicit parameter dictionary in updInertDicts, we update **both** inert_cans and inert_solved_dicts to ensure a new implicit parameter dictionary correctly shadows old ones. Fixes #23761 - - - - - 43578d60 by Matthew Craven at 2023-08-05T01:05:36-04:00 Bump bytestring submodule to 0.11.5.1 - - - - - 91353622 by Ben Gamari at 2023-08-05T01:06:13-04:00 Initial commit of Note [Thunks, blackholes, and indirections] This Note attempts to summarize the treatment of thunks, thunk update, and indirections. This fell out of work on #23185. - - - - - 8d686854 by sheaf at 2023-08-05T01:06:54-04:00 Remove zonk in tcVTA This removes the zonk in GHC.Tc.Gen.App.tc_inst_forall_arg and its accompanying Note [Visible type application zonk]. Indeed, this zonk is no longer necessary, as we no longer maintain the invariant that types are well-kinded without zonking; only that typeKind does not crash; see Note [The Purely Kinded Type Invariant (PKTI)]. This commit removes this zonking step (as well as a secondary zonk), and replaces the aforementioned Note with the explanatory Note [Type application substitution], which justifies why the substitution performed in tc_inst_forall_arg remains valid without this zonking step. Fixes #23661 - - - - - 19dea673 by Ben Gamari at 2023-08-05T01:07:30-04:00 Bump nofib submodule Ensuring that nofib can be build using the same range of bootstrap compilers as GHC itself. - - - - - aa07402e by Luite Stegeman at 2023-08-05T23:15:55+09:00 JS: Improve compatibility with recent emsdk The JavaScript code in libraries/base/jsbits/base.js had some hardcoded offsets for fields in structs, because we expected the layout of the data structures to remain unchanged. Emsdk 3.1.42 changed the layout of the stat struct, breaking this assumption, and causing code in .hsc files accessing the stat struct to fail. This patch improves compatibility with recent emsdk by removing the assumption that data layouts stay unchanged: 1. offsets of fields in structs used by JavaScript code are now computed by the configure script, so both the .js and .hsc files will automatically use the new layout if anything changes. 2. the distrib/configure script checks that the emsdk version on a user's system is the same version that a bindist was booted with, to avoid data layout inconsistencies See #23641 - - - - - b938950d by Luite Stegeman at 2023-08-07T06:27:51-04:00 JS: Fix missing local variable declarations This fixes some missing local variable declarations that were found by running the testsuite in strict mode. Fixes #23775 - - - - - 6c0e2247 by sheaf at 2023-08-07T13:31:21-04:00 Update Haddock submodule to fix #23368 This submodule update adds the following three commits: bbf1c8ae - Check for puns 0550694e - Remove fake exports for (~), List, and Tuple<n> 5877bceb - Fix pretty-printing of Solo and MkSolo These commits fix the issues with Haddock HTML rendering reported in ticket #23368. Fixes #23368 - - - - - 5b5be3ea by Matthew Pickering at 2023-08-07T13:32:00-04:00 Revert "Bump bytestring submodule to 0.11.5.1" This reverts commit 43578d60bfc478e7277dcd892463cec305400025. Fixes #23789 - - - - - 01961be3 by Ben Gamari at 2023-08-08T02:47:14-04:00 configure: Derive library version from ghc-prim.cabal.in Since ghc-prim.cabal is now generated by Hadrian, we cannot depend upon it. Closes #23726. - - - - - 3b373838 by Ryan Scott at 2023-08-08T02:47:49-04:00 tcExpr: Push expected types for untyped TH splices inwards In !10911, I deleted a `tcExpr` case for `HsUntypedSplice` in favor of a much simpler case that simply delegates to `tcApp`. Although this passed the test suite at the time, this was actually an error, as the previous `tcExpr` case was critically pushing the expected type inwards. This actually matters for programs like the one in #23796, which GHC would not accept with type inference alone—we need full-blown type _checking_ to accept these. I have added back the previous `tcExpr` case for `HsUntypedSplice` and now explain why we have two different `HsUntypedSplice` cases (one in `tcExpr` and another in `splitHsApps`) in `Note [Looking through Template Haskell splices in splitHsApps]` in `GHC.Tc.Gen.Head`. Fixes #23796. - - - - - 0ef1d8ae by sheaf at 2023-08-08T21:26:51-04:00 Compute all emitted diagnostic codes This commit introduces in GHC.Types.Error.Codes the function constructorCodes :: forall diag. (...) => Map DiagnosticCode String which computes a collection of all the diagnostic codes that correspond to a particular type. In particular, we can compute the collection of all diagnostic codes emitted by GHC using the invocation constructorCodes @GhcMessage We then make use of this functionality in the new "codes" test which checks consistency and coverage of GHC diagnostic codes. It performs three checks: - check 1: all non-outdated GhcDiagnosticCode equations are statically used. - check 2: all outdated GhcDiagnosticCode equations are statically unused. - check 3: all statically used diagnostic codes are covered by the testsuite (modulo accepted exceptions). - - - - - 4bc7b1e5 by Fraser Tweedale at 2023-08-08T21:27:32-04:00 numberToRangedRational: fix edge cases for exp ≈ (maxBound :: Int) Currently a negative exponent less than `minBound :: Int` results in Infinity, which is very surprising and obviously wrong. ``` λ> read "1e-9223372036854775808" :: Double 0.0 λ> read "1e-9223372036854775809" :: Double Infinity ``` There is a further edge case where the exponent can overflow when increased by the number of tens places in the integer part, or underflow when decreased by the number of leading zeros in the fractional part if the integer part is zero: ``` λ> read "10e9223372036854775807" :: Double 0.0 λ> read "0.01e-9223372036854775808" :: Double Infinity ``` To resolve both of these issues, perform all arithmetic and comparisons involving the exponent in type `Integer`. This approach also eliminates the need to explicitly check the exponent against `maxBound :: Int` and `minBound :: Int`, because the allowed range of the exponent (i.e. the result of `floatRange` for the target floating point type) is certainly within those bounds. This change implements CLC proposal 192: https://github.com/haskell/core-libraries-committee/issues/192 - - - - - 6eab07b2 by Alan Zimmerman at 2023-08-08T21:28:10-04:00 EPA: Remove Location from WarningTxt source This is not needed. - - - - - 1a98d673 by Sebastian Graf at 2023-08-09T16:24:29-04:00 Cleanup a TODO introduced in 1f94e0f7 The change must have slipped through review of !4412 - - - - - 2274abc8 by Sebastian Graf at 2023-08-09T16:24:29-04:00 More explicit strictness in GHC.Real - - - - - ce8aa54c by Sebastian Graf at 2023-08-09T16:24:30-04:00 exprIsTrivial: Factor out shared implementation The duplication between `exprIsTrivial` and `getIdFromTrivialExpr_maybe` has been bugging me for a long time. This patch introduces an inlinable worker function `trivial_expr_fold` acting as the single, shared decision procedure of triviality. It "returns" a Church-encoded `Maybe (Maybe Id)`, so when it is inlined, it fuses to similar code as before. (Better code, even, in the case of `getIdFromTrivialExpr` which presently allocates a `Just` constructor that cancels away after this patch.) - - - - - d004a36d by Sebastian Graf at 2023-08-09T16:24:30-04:00 Simplify: Simplification of arguments in a single function The Simplifier had a function `simplArg` that wasn't called in `rebuildCall`, which seems to be the main way to simplify args. Hence I consolidated the code path to call `simplArg`, too, renaming to `simplLazyArg`. - - - - - 8c73505e by Sebastian Graf at 2023-08-09T16:24:30-04:00 Core.Ppr: Omit case binder for empty case alternatives A minor improvement to pretty-printing - - - - - d8d993f1 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Disable tests RepPolyWrappedVar2 and RepPolyUnsafeCoerce1 in JS backend ... because those coerce between incompatible/unknown PrimReps. - - - - - f06e87e4 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Inlining literals into boring contexts is OK - - - - - 4a6b7c87 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Clarify floating of unsafeEqualityProofs (#23754) - - - - - b0f4752e by Sebastian Graf at 2023-08-09T16:24:30-04:00 Kill SetLevel.notWorthFloating.is_triv (#23270) We have had it since b84ba676034, when it operated on annotated expressions. Nowadays it operates on vanilla `CoreExpr` though, so we should just call `exprIsTrivial`; thus handling empty cases and string literals correctly. - - - - - 7e0c8b3b by Sebastian Graf at 2023-08-09T16:24:30-04:00 ANFise string literal arguments (#23270) This instates the invariant that a trivial CoreExpr translates to an atomic StgExpr. Nice. Annoyingly, in -O0 we sometimes generate ``` foo = case "blah"# of sat { __DEFAULT -> unpackCString# sat } ``` which makes it a bit harder to spot that we can emit a standard `stg_unpack_cstring` thunk. Fixes #23270. - - - - - 357f2738 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Deactivate -fcatch-nonexhaustive-cases in ghc-bignum (#23345) - - - - - 59202c80 by Sebastian Graf at 2023-08-09T16:24:30-04:00 CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now. The main reason is that it plays far better in conjunction with eta expansion (as we aim to do for arguments in CorePrep, #23083), because we can discard any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta` it's impossible to discard the argument. We do also give the same treatment to unsafeCoerce proofs and treat them as trivial iff their RHS is trivial. It is also both much simpler to describe than the previous mechanism of emitting an unsafe coercion and simpler to implement, removing quite a bit of commentary and `CorePrepProv`. In the ghc/alloc perf test `LargeRecord`, we introduce an additional Simplifier iteration due to #17910. E.g., FloatOut produces a binding ``` lvl_s6uK [Occ=Once1] :: GHC.Types.Int [LclId] lvl_s6uK = GHC.Types.I# 2# lvl_s6uL [Occ=Once1] :: GHC.Types.Any [LclId] lvl_s6uL = case Unsafe.Coerce.unsafeEqualityProof ... of { Unsafe.Coerce.UnsafeRefl v2_i6tr -> lvl_s6uK `cast` (... v2_i6tr ...) } ``` That occurs once and hence is pre-inlined unconditionally in the next Simplifier pass. It's non-trivial to find a way around that, but not really harmful otherwise. Hence we accept a 1.2% increase on some architectures. Metric Increase: LargeRecord - - - - - 00d31188 by Sebastian Graf at 2023-08-09T16:24:30-04:00 CorePrep: Eta expand arguments (#23083) Previously, we'd only eta expand let bindings and lambdas, now we'll also eta expand arguments such as in T23083: ```hs g f h = f (h `seq` (h $)) ``` Unless `-fpedantic-bottoms` is set, we'll now transform to ```hs g f h = f (\eta -> h eta) ``` in CorePrep. See the new `Note [Eta expansion of arguments in CorePrep]` for the details. We only do this optimisation with -O2 because we saw 2-3% ghc/alloc regressions in T4801 and T5321FD. Fixes #23083. - - - - - bf885d7a by Matthew Craven at 2023-08-09T16:25:07-04:00 Bump bytestring submodule to 0.11.5, again Fixes #23789. The bytestring commit used here is unreleased; a release can be made when necessary. - - - - - 7acbf0fd by Sven Tennie at 2023-08-10T19:17:11-04:00 Serialize CmmRetInfo in .rodata The handling of case was missing. - - - - - 0c3136f2 by Sven Tennie at 2023-08-10T19:17:11-04:00 Reference StgRetFun payload by its struct field address This is easier to grasp than relative pointer offsets. - - - - - f68ff313 by Sven Tennie at 2023-08-10T19:17:11-04:00 Better variable name: u -> frame The 'u' was likely introduced by copy'n'paste. - - - - - 0131bb7f by Sven Tennie at 2023-08-10T19:17:11-04:00 Make checkSTACK() public Such that it can also be used in tests. - - - - - 7b6e1e53 by Sven Tennie at 2023-08-10T19:17:11-04:00 Publish stack related fields in DerivedConstants.h These will be used in ghc-heap to decode these parts of the stack. - - - - - 907ed054 by Sven Tennie at 2023-08-10T19:17:11-04:00 ghc-heap: Decode StgStack and its stack frames Previously, ghc-heap could only decode heap closures. The approach is explained in detail in note [Decoding the stack]. - - - - - 6beb6ac2 by Sven Tennie at 2023-08-10T19:17:11-04:00 Remove RetFunType from RetFun stack frame representation It's a technical detail. The single usage is replaced by a predicate. - - - - - 006bb4f3 by Sven Tennie at 2023-08-10T19:17:11-04:00 Better parameter name The call-site uses the term "offset", too. - - - - - d4c2c1af by Sven Tennie at 2023-08-10T19:17:11-04:00 Make closure boxing pure There seems to be no need to do something complicated. However, the strictness of the closure pointer matters, otherwise a thunk gets decoded. - - - - - 8d8426c9 by Sven Tennie at 2023-08-10T19:17:11-04:00 Document entertainGC in test It wasn't obvious why it's there and what its role is. Also, increase the "entertainment level" a bit. I checked in STG and Cmm dumps that this really generates closures (and is not e.g. constant folded away.) - - - - - cc52c358 by Finley McIlwaine at 2023-08-10T19:17:47-04:00 Add -dipe-stats flag This is useful for seeing which info tables have information. - - - - - 261c4acb by Finley McIlwaine at 2023-08-10T19:17:47-04:00 Add -finfo-table-map-with-fallback -finfo-table-map-with-stack The -fno-info-table-map-with-stack flag omits STACK info tables from the info table map, and the -fno-info-table-map-with-fallback flag omits info tables with defaulted source locations from the map. In a test on the Agda codebase the build results were about 7% smaller when both of those types of tables were omitted. Adds a test that verifies that passing each combination of these flags results in the correct output for -dipe-stats, which is disabled for the js backend since profiling is not implemented. This commit also refactors a lot of the logic around extracting info tables from the Cmm results and building the info table map. This commit also fixes some issues in the users guide rst source to fix warnings that were noticed while debugging the documentation for these flags. Fixes #23702 - - - - - d7047e0d by Jaro Reinders at 2023-08-14T04:41:42-04:00 Add changelog entry for specialised Enum Int64/Word64 instances - - - - - 52f5e8fb by cydparser at 2023-08-14T04:42:20-04:00 Fix -ddump-to-file and -ddump-timings interaction (#20316) - - - - - 1274c5d6 by cydparser at 2023-08-14T04:42:20-04:00 Update release notes (#20316) - - - - - 8e699b23 by Matthew Pickering at 2023-08-14T10:44:47-04:00 base: Add changelog entry for CLC #188 This proposal modified the implementations of copyBytes, moveBytes and fillBytes (as detailed in the proposal) https://github.com/haskell/core-libraries-committee/issues/188 - - - - - 026f040a by Matthew Pickering at 2023-08-14T10:45:23-04:00 packaging: Build manpage in separate directory to other documentation We were installing two copies of the manpage: * One useless one in the `share/doc` folder, because we copy the doc/ folder into share/ * The one we deliberately installed into `share/man` etc The solution is to build the manpage into the `manpage` directory when building the bindist, and then just install it separately. Fixes #23707 - - - - - 524c60c8 by Bartłomiej Cieślar at 2023-08-14T13:46:33-04:00 Report deprecated fields bound by record wildcards when used This commit ensures that we emit the appropriate warnings when a deprecated record field bound by a record wildcard is used. For example: module A where data Foo = Foo {x :: Int, y :: Bool, z :: Char} {-# DEPRECATED x "Don't use x" #-} {-# WARNING y "Don't use y" #-} module B where import A foo (Foo {..}) = x This will cause us to emit a "Don't use x" warning, with location the location of the record wildcard. Note that we don't warn about `y`, because it is unused in the RHS of `foo`. Fixes #23382 - - - - - d6130065 by Matthew Pickering at 2023-08-14T13:47:11-04:00 Add zstd suffix to jobs which rely on zstd This was causing some confusion as the job was named simply "x86_64-linux-deb10-validate", which implies a standard configuration rather than any dependency on libzstd. - - - - - e24e44fc by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: Always run project-version job This is needed for the downstream test-primops pipeline to workout what the version of a bindist produced by a pipeline is. - - - - - f17b9d62 by Matthew Pickering at 2023-08-14T13:47:11-04:00 gen_ci: Rework how jobs-metadata.json is generated * We now represent a job group a triple of Maybes, which makes it easier to work out when jobs are enabled/disabled on certain pipelines. ``` data JobGroup a = StandardTriple { v :: Maybe (NamedJob a) , n :: Maybe (NamedJob a) , r :: Maybe (NamedJob a) } ``` * `jobs-metadata.json` generation is reworked using the following algorithm. - For each pipeline type, find all the platforms we are doing builds for. - Select one build per platform - Zip together the results This way we can choose different pipelines for validate/nightly/release which makes the metadata also useful for validate pipelines. This feature is used by the test-primops downstream CI in order to select the right bindist for testing validate pipelines. This makes it easier to inspect which jobs are going to be enabled on a particular pipeline. - - - - - f9a5563d by Matthew Pickering at 2023-08-14T13:47:11-04:00 gen_ci: Rules rework In particular we now distinguish between whether we are dealing with a Nightly/Release pipeline (which labels don't matter for) and a validate pipeline where labels do matter. The overall goal here is to allow a disjunction of labels for validate pipelines, for example, > Run a job if we have the full-ci label or test-primops label Therefore the "ValidateOnly" rules are treated as a set of disjunctions rather than conjunctions like before. What this means in particular is that if we want to ONLY run a job if a label is set, for example, "FreeBSD" label then we have to override the whole label set. Fixes #23772 - - - - - d54b0c1d by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: set -e for lint-ci-config scripts - - - - - 994a9b35 by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: Fix job metadata generation - - - - - e194ed2b by Ben Gamari at 2023-08-15T00:58:09-04:00 users-guide: Note that GHC2021 doesn't include ExplicitNamespaces As noted in #23801. - - - - - d814bda9 by Ben Gamari at 2023-08-15T05:43:53-04:00 users-guide: Support both distutils and packaging As noted in #23818, some old distributions (e.g. Debian 9) only include `distutils` while newer distributions only include `packaging`. Fixes #23818. - - - - - 1726db3f by Ben Gamari at 2023-08-15T05:43:53-04:00 users-guide: Ensure extlinks is compatible with Sphinx <4 The semantics of the `extlinks` attribute annoyingly changed in Sphinx 4. Reflect this in our configuration. See #22690. Fixes #23807. - - - - - 173338cf by Matthew Pickering at 2023-08-15T22:00:24-04:00 ci: Run full-ci on master and release branches Fixes #23737 - - - - - bdab6898 by Andrew Lelechenko at 2023-08-15T22:01:03-04:00 Add @since pragmas for Data.Ord.clamp and GHC.Float.clamp - - - - - 662d351b by Matthew Pickering at 2023-08-16T09:35:04-04:00 ghc-toolchain: Match CPP args with configure script At the moment we need ghc-toolchain to precisely match the output as provided by the normal configure script. The normal configure script (FP_HSCPP_CMD_WITH_ARGS) branches on whether we are using clang or gcc so we match that logic exactly in ghc-toolchain. The old implementation (which checks if certain flags are supported) is better but for now we have to match to catch any potential errors in the configuration. Ticket: #23720 - - - - - 09c6759e by Matthew Pickering at 2023-08-16T09:35:04-04:00 configure: Fix `-Wl,--no-as-needed` check The check was failing because the args supplied by $$1 were quoted which failed because then the C compiler thought they were an input file. Fixes #23720 - - - - - 2129678b by Matthew Pickering at 2023-08-16T09:35:04-04:00 configure: Add flag which turns ghc-toolchain check into error We want to catch these errors in CI, but first we need to a flag which turns this check into an error. - - - - - 6e2aa8e0 by Matthew Pickering at 2023-08-16T09:35:04-04:00 ci: Enable --enable-strict-ghc-toolchain-check for all CI jobs This will cause any CI job to fail if we have a mismatch between what ghc-toolchain reports and what ./configure natively reports. Fixing these kinds of issues is highest priority for 9.10 release. - - - - - 12d39e24 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 Pass user-specified options to ghc-toolchain The current user interface to configuring target toolchains is `./configure`. In !9263 we added a new tool to configure target toolchains called `ghc-toolchain`, but the blessed way of creating these toolchains is still through configure. However, we were not passing the user-specified options given with the `./configure` invocation to the ghc-toolchain tool. This commit remedies that by storing the user options and environment variables in USER_* variables, which then get passed to GHC-toolchain. The exception to the rule is the windows bundled toolchain, which overrides the USER_* variables with whatever flags the windows bundled toolchain requires to work. We consider the bundled toolchain to be effectively the user specifying options, since the actual user delegated that configuration work. Closes #23678 - - - - - f7b3c3a0 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 ghc-toolchain: Parse javascript and ghcjs as a Arch and OS - - - - - 8a0ae4ee by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 ghc-toolchain: Fix ranlib option - - - - - 31e9ec96 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 Check Link Works with -Werror - - - - - bc1998b3 by Matthew Pickering at 2023-08-16T09:35:04-04:00 Only check for no_compact_unwind support on darwin While writing ghc-toolchain we noticed that the FP_PROG_LD_NO_COMPACT_UNWIND check is subtly wrong. Specifically, we pass -Wl,-no_compact_unwind to cc. However, ld.gold interprets this as -n o_compact_unwind, which is a valid argument. Fixes #23676 - - - - - 0283f36e by Matthew Pickering at 2023-08-16T09:35:04-04:00 Add some javascript special cases to ghc-toolchain On javascript there isn't a choice of toolchain but some of the configure checks were not accurately providing the correct answer. 1. The linker was reported as gnu LD because the --version output mentioned gnu LD. 2. The --target flag makes no sense on javascript but it was just ignored by the linker, so we add a special case to stop ghc-toolchain thinking that emcc supports --target when used as a linker. - - - - - a48ec5f8 by Matthew Pickering at 2023-08-16T09:35:04-04:00 check for emcc in gnu_LD check - - - - - 50df2e69 by Matthew Pickering at 2023-08-16T09:35:04-04:00 Add ldOverrideWhitelist to only default to ldOverride on windows/linux On some platforms - ie darwin, javascript etc we really do not want to allow the user to use any linker other than the default one as this leads to all kinds of bugs. Therefore it is a bit more prudant to add a whitelist which specifies on which platforms it might be possible to use a different linker. - - - - - a669a39c by Matthew Pickering at 2023-08-16T09:35:04-04:00 Fix plaform glob in FPTOOLS_SET_C_LD_FLAGS A normal triple may look like x86_64-unknown-linux but when cross-compiling you get $target set to a quad such as.. aarch64-unknown-linux-gnu Which should also match this check. - - - - - c52b6769 by Matthew Pickering at 2023-08-16T09:35:04-04:00 ghc-toolchain: Pass ld-override onto ghc-toolchain - - - - - 039b484f by Matthew Pickering at 2023-08-16T09:35:04-04:00 ld override: Make whitelist override user given option - - - - - d2b63cbc by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: Add format mode to normalise differences before diffing. The "format" mode takes an "--input" and "--ouput" target file and formats it. This is intended to be useful on windows where the configure/ghc-toolchain target files can't be diffed very easily because the path separators are different. - - - - - f2b39e4a by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: Bump ci-images commit to get new ghc-wasm-meta We needed to remove -Wno-unused-command-line-argument from the arguments passed in order for the configure check to report correctly. See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10976#note_516335 - - - - - 92103830 by Matthew Pickering at 2023-08-16T09:35:05-04:00 configure: MergeObjsCmd - distinguish between empty string and unset variable If `MergeObjsCmd` is explicitly set to the empty string then we should assume that MergeObjs is just not supported. This is especially important for windows where we set MergeObjsCmd to "" in m4/fp_setup_windows_toolchain.m4. - - - - - 3500bb2c by Matthew Pickering at 2023-08-16T09:35:05-04:00 configure: Add proper check to see if object merging works - - - - - 08c9a014 by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: If MergeObjsCmd is not set, replace setting with Nothing If the user explicitly chooses to not set a MergeObjsCmd then it is correct to use Nothing for tgtMergeObjs field in the Target file. - - - - - c9071d94 by Matthew Pickering at 2023-08-16T09:35:05-04:00 HsCppArgs: Augment the HsCppOptions This is important when we pass -I when setting up the windows toolchain. - - - - - 294a6d80 by Matthew Pickering at 2023-08-16T09:35:05-04:00 Set USER_CPP_ARGS when setting up windows toolchain - - - - - bde4b5d4 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00 Improve handling of Cc as a fallback - - - - - f4c1c3a3 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00 ghc-toolchain: Configure Cpp and HsCpp correctly when user specifies flags In ghc-toolchain, we were only /not/ configuring required flags when the user specified any flags at all for the of the HsCpp and Cpp tools. Otherwise, the linker takes into consideration the user specified flags to determine whether to search for a better linker implementation, but already configured the remaining GHC and platform-specific flags regardless of the user options. Other Tools consider the user options as a baseline for further configuration (see `findProgram`), so #23689 is not applicable. Closes #23689 - - - - - bfe4ffac by Matthew Pickering at 2023-08-16T09:35:05-04:00 CPP_ARGS: Put new options after user specified options This matches up with the behaviour of ghc-toolchain, so that the output of both matches. - - - - - a6828173 by Gergő Érdi at 2023-08-16T09:35:41-04:00 If a defaulting plugin made progress, re-zonk wanteds before built-in defaulting Fixes #23821. - - - - - e2b38115 by Sylvain Henry at 2023-08-17T07:54:06-04:00 JS: implement openat(AT_FDCWD...) (#23697) Use `openSync` to implement `openat(AT_FDCWD...)`. - - - - - a975c663 by sheaf at 2023-08-17T07:54:47-04:00 Use unsatisfiable for missing methods w/ defaults When a class instance has an Unsatisfiable constraint in its context and the user has not explicitly provided an implementation of a method, we now always provide a RHS of the form `unsatisfiable @msg`, even if the method has a default definition available. This ensures that, when deferring type errors, users get the appropriate error message instead of a possible runtime loop, if class default methods were defined recursively. Fixes #23816 - - - - - 45ca51e5 by Ben Gamari at 2023-08-17T15:16:41-04:00 ghc-internal: Initial commit of the skeleton - - - - - 88bbf8c5 by Ben Gamari at 2023-08-17T15:16:41-04:00 ghc-experimental: Initial commit - - - - - 664468c0 by Ben Gamari at 2023-08-17T15:17:17-04:00 testsuite/cloneStackLib: Fix incorrect format specifiers - - - - - eaa835bb by Ben Gamari at 2023-08-17T15:17:17-04:00 rts/ipe: Fix const-correctness of IpeBufferListNode Both info tables and the string table should be `const` - - - - - 78f6f6fd by Ben Gamari at 2023-08-17T15:17:17-04:00 nonmoving: Drop dead debugging utilities These are largely superceded by support in the ghc-utils GDB extension. - - - - - 3f6e8f42 by Ben Gamari at 2023-08-17T15:17:17-04:00 nonmoving: Refactor management of mark thread Here we refactor that treatment of the worker thread used by the nonmoving GC for concurrent marking, avoiding creating a new thread with every major GC cycle. As well, the new scheme is considerably easier to reason about, consolidating all state in one place, accessed via a small set of accessors with clear semantics. - - - - - 88c32b7d by Ben Gamari at 2023-08-17T15:17:17-04:00 testsuite: Skip T23221 in nonmoving GC ways This test is very dependent upon GC behavior. - - - - - 381cfaed by Ben Gamari at 2023-08-17T15:17:17-04:00 ghc-heap: Don't expose stack dirty and marking fields These are GC metadata and are not relevant to the end-user. Moreover, they are unstable which makes ghc-heap harder to test than necessary. - - - - - 16828ca5 by Luite Stegeman at 2023-08-21T18:42:53-04:00 bump process submodule to include macOS fix and JS support - - - - - b4d5f6ed by Matthew Pickering at 2023-08-21T18:43:29-04:00 ci: Add support for triggering test-primops pipelines This commit adds 4 ways to trigger testing with test-primops. 1. Applying the ~test-primops label to a validate pipeline. 2. A manually triggered job on a validate pipeline 3. A nightly pipeline job 4. A release pipeline job Fixes #23695 - - - - - 32c50daa by Matthew Pickering at 2023-08-21T18:43:29-04:00 Add test-primops label support The test-primops CI job requires some additional builds in the validation pipeline, so we make sure to enable these jobs when test-primops label is set. - - - - - 73ca8340 by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "Aarch ncg: Optimize immediate use for address calculations" This reverts commit 8f3b3b78a8cce3bd463ed175ee933c2aabffc631. See #23793 - - - - - 5546ad9e by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "AArch NCG: Pure refactor" This reverts commit 00fb6e6b06598752414a0b9a92840fb6ca61338d. See #23793 - - - - - 02dfcdc2 by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "Aarch64 NCG: Use encoded immediates for literals." This reverts commit 40425c5021a9d8eb5e1c1046e2d5fa0a2918f96c. See #23793 ------------------------- Metric Increase: T4801 T5321FD T5321Fun ------------------------- - - - - - 7be4a272 by Matthew Pickering at 2023-08-22T08:55:20+01:00 ci: Remove manually triggered test-ci job This doesn't work on slimmed down pipelines as the needed jobs don't exist. If you want to run test-primops then apply the label. - - - - - 76a4d11b by Jaro Reinders at 2023-08-22T08:08:13-04:00 Remove Ptr example from roles docs - - - - - 069729d3 by Bryan Richter at 2023-08-22T08:08:49-04:00 Guard against duplicate pipelines in forks - - - - - f861423b by Rune K. Svendsen at 2023-08-22T08:09:35-04:00 dump-decls: fix "Ambiguous module name"-error Fixes errors of the following kind, which happen when dump-decls is run on a package that contains a module name that clashes with that of another package. ``` dump-decls: <no location info>: error: Ambiguous module name `System.Console.ANSI.Types': it was found in multiple packages: ansi-terminal-0.11.4 ansi-terminal-types-0.11.5 ``` - - - - - edd8bc43 by Krzysztof Gogolewski at 2023-08-22T12:31:20-04:00 Fix MultiWayIf linearity checking (#23814) Co-authored-by: Thomas BAGREL <thomas.bagrel at tweag.io> - - - - - 4ba088d1 by konsumlamm at 2023-08-22T12:32:02-04:00 Update `Control.Concurrent.*` documentation - - - - - 015886ec by ARATA Mizuki at 2023-08-22T15:13:13-04:00 Support 128-bit SIMD on AArch64 via LLVM backend - - - - - 52a6d868 by Krzysztof Gogolewski at 2023-08-22T15:13:51-04:00 Testsuite cleanup - Remove misleading help text in perf_notes, ways are not metrics - Remove no_print_summary - this was used for Phabricator - In linters tests, run 'git ls-files' just once. Previously, it was called on each has_ls_files() - Add ghc-prim.cabal to gitignore, noticed in #23726 - Remove ghc-prim.cabal, it was accidentally committed in 524c60c8cd - - - - - ab40aa52 by Alan Zimmerman at 2023-08-22T15:14:28-04:00 EPA: Use Introduce [DeclTag] in AnnSortKey The AnnSortKey is used to keep track of the order of declarations for printing when the container has split them apart. This applies to HsValBinds and ClassDecl, ClsInstDecl. When making modifications to the list of declarations, the new order must be captured for when it must be printed. For each list of declarations (binds and sigs for a HsValBind) we can just store the list in order. To recreate the list when printing, we must merge them, and this is what the AnnSortKey records. It used to be indexed by SrcSpan, we now simply index by a marker as to which list to take the next item from. - - - - - e7db36c1 by sheaf at 2023-08-23T08:41:28-04:00 Don't attempt pattern synonym error recovery This commit gets rid of the pattern synonym error recovery mechanism (recoverPSB). The rationale is that the fake pattern synonym binding that the recovery mechanism introduced could lead to undesirable knock-on errors, and it isn't really feasible to conjure up a satisfactory binding as pattern synonyms can be used both in expressions and patterns. See Note [Pattern synonym error recovery] in GHC.Tc.TyCl.PatSyn. It isn't such a big deal to eagerly fail compilation on a pattern synonym that doesn't typecheck anyway. Fixes #23467 - - - - - 6ccd9d65 by Ben Gamari at 2023-08-23T08:42:05-04:00 base: Don't use Data.ByteString.Internals.memcpy This function is now deprecated from `bytestring`. Use `Foreign.Marshal.Utils.copyBytes` instead. Fixes #23880. - - - - - 0bfa0031 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Uniformly pass buildOptions to all builders in runBuilder In Builder.hs, runBuilderWith mostly ignores the buildOptions in BuildInfo. This leads to hard to diagnose bugs as any build options you pass with runBuilderWithCmdOptions are ignored for many builders. Solution: Uniformly pass buildOptions to the invocation of cmd. Fixes #23845 - - - - - 9cac8f11 by Matthew Pickering at 2023-08-23T13:43:48-04:00 Abstract windows toolchain setup This commit splits up the windows toolchain setup logic into two functions. * FP_INSTALL_WINDOWS_TOOLCHAIN - deals with downloading the toolchain if it isn't already downloaded * FP_SETUP_WINDOWS_TOOLCHAIN - sets the environment variables to point to the correct place FP_SETUP_WINDOWS_TOOLCHAIN is abstracted from the location of the mingw toolchain and also the eventual location where we will install the toolchain in the installed bindist. This is the first step towards #23608 - - - - - 6c043187 by Matthew Pickering at 2023-08-23T13:43:48-04:00 Generate build.mk for bindists The config.mk.in script was relying on some variables which were supposed to be set by build.mk but therefore never were when used to install a bindist. Specifically * BUILD_PROF_LIBS to determine whether we had profiled libraries or not * DYNAMIC_GHC_PROGRAMS to determine whether we had shared libraries or not Not only were these never set but also not really accurate because you could have shared libaries but still statically linked ghc executable. In addition variables like GhcLibWays were just never used, so those have been deleted from the script. Now instead we generate a build.mk file which just directly specifies which RtsWays we have supplied in the bindist and whether we have DYNAMIC_GHC_PROGRAMS. - - - - - fe23629b by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Add reloc-binary-dist-* targets This adds a command line option to build a "relocatable" bindist. The bindist is created by first creating a normal bindist and then installing it using the `RelocatableBuild=YES` option. This creates a bindist without any wrapper scripts pointing to the libdir. The motivation for this feature is that we want to ship relocatable bindists on windows and this method is more uniform than the ad-hoc method which lead to bugs such as #23608 and #23476 The relocatable bindist can be built with the "reloc-binary-dist" target and supports the same suffixes as the normal "binary-dist" command to specify the compression style. - - - - - 41cbaf44 by Matthew Pickering at 2023-08-23T13:43:48-04:00 packaging: Fix installation scripts on windows/RelocatableBuild case This includes quite a lot of small fixes which fix the installation makefile to work on windows properly. This also required fixing the RelocatableBuild variable which seemed to have been broken for a long while. Sam helped me a lot writing this patch by providing a windows machine to test the changes. Without him it would have taken ages to tweak everything. Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 03474456 by Matthew Pickering at 2023-08-23T13:43:48-04:00 ci: Build relocatable bindist on windows We now build the relocatable bindist target on windows, which means we test and distribute the new method of creating a relocatable bindist. - - - - - d0b48113 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Add error when trying to build binary-dist target on windows The binary dist produced by `binary-dist` target doesn't work on windows because of the wrapper script the makefile installs. In order to not surprise any packagers we just give an error if someone tries to build the old binary-dist target rather than the reloc-binary-dist target. - - - - - 7cbf9361 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Remove query' logic to use tooldir - - - - - 03fad42e by Matthew Pickering at 2023-08-23T13:43:48-04:00 configure: Set WindresCmd directly and removed unused variables For some reason there was an indirection via the Windres variable before setting WindresCmd. That indirection led to #23855. I then also noticed that these other variables were just not used anywhere when trying to work out what the correct condition was for this bit of the configure script. - - - - - c82770f5 by sheaf at 2023-08-23T13:43:48-04:00 Apply shellcheck suggestion to SUBST_TOOLDIR - - - - - 896e35e5 by sheaf at 2023-08-23T13:44:34-04:00 Compute hints from TcSolverReportMsg This commit changes how hints are handled in conjunction with constraint solver report messages. Instead of storing `[GhcHint]` in the TcRnSolverReport error constructor, we compute the hints depending on the underlying TcSolverReportMsg. This disentangles the logic and makes it easier to add new hints for certain errors. - - - - - a05cdaf0 by Alexander Esgen at 2023-08-23T13:45:16-04:00 users-guide: remove note about fatal Haddock parse failures - - - - - 4908d798 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Introduce Data.Enum - - - - - f59707c7 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num.Integer - - - - - b1054053 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num - - - - - 6baa481d by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num.Natural - - - - - 2ac15233 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Float - - - - - f3c489de by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Real - - - - - 94f59eaa by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Eliminate module reexport in GHC.Exception The metric increase here isn't strictly due to this commit but it's a rather small, incidental change. Metric Increase: T8095 T13386 Metric Decrease: T8095 T13386 T18304 - - - - - be1fc7df by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add disclaimers in internal modules To warn users that these modules are internal and their interfaces may change with little warning. As proposed in Core Libraries Committee #146 [CLC146]. [CLC146]: https://github.com/haskell/core-libraries-committee/issues/146 - - - - - 0326f3f4 by sheaf at 2023-08-23T17:37:29-04:00 Bump Cabal submodule We need to bump the Cabal submodule to include commit ec75950 which fixes an issue with a dodgy import Rep(..) which relied on GHC bug #23570 - - - - - 0504cd08 by Facundo Domínguez at 2023-08-23T17:38:11-04:00 Fix typos in the documentation of Data.OldList.permutations - - - - - 1420b8cb by Antoine Leblanc at 2023-08-24T16:18:17-04:00 Be more eager in TyCon boot validity checking This commit performs boot-file consistency checking for TyCons into checkValidTyCl. This ensures that we eagerly catch any mismatches, which prevents the compiler from seeing these inconsistencies and panicking as a result. See Note [TyCon boot consistency checking] in GHC.Tc.TyCl. Fixes #16127 - - - - - d99c816f by Finley McIlwaine at 2023-08-24T16:18:55-04:00 Refactor estimation of stack info table provenance This commit greatly refactors the way we compute estimated provenance for stack info tables. Previously, this process was done using an entirely separate traversal of the whole Cmm code stream to build the map from info tables to source locations. The separate traversal is now fused with the Cmm code generation pipeline in GHC.Driver.Main. This results in very significant code generation speed ups when -finfo-table-map is enabled. In testing, this patch reduces code generation times by almost 30% with -finfo-table-map and -O0, and 60% with -finfo-table-map and -O1 or -O2 . Fixes #23103 - - - - - d3e0124c by Finley McIlwaine at 2023-08-24T16:18:55-04:00 Add a test checking overhead of -finfo-table-map We want to make sure we don't end up with poor codegen performance resulting from -finfo-table-map again as in #23103. This test adds a performance test tracking total allocations while compiling ExactPrint with -finfo-table-map. - - - - - fcfc1777 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Add export list to GHC.Llvm.MetaData - - - - - 5880fff6 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Allow LlvmLits in MetaExprs This omission appears to be an oversight. - - - - - 86ce92a2 by Ben Gamari at 2023-08-25T10:58:16-04:00 compiler: Move platform feature predicates to GHC.Driver.DynFlags These are useful in `GHC.Driver.Config.*`. - - - - - a6a38742 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Introduce infrastructure for module flag metadata - - - - - e9af2cf3 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Don't pass stack alignment via command line As of https://reviews.llvm.org/D103048 LLVM no longer supports the `-stack-alignment=...` flag. Instead this information is passed via a module flag metadata node. This requires dropping support for LLVM 11 and 12. Fixes #23870 - - - - - a936f244 by Alan Zimmerman at 2023-08-25T10:58:56-04:00 EPA: Keep track of "in" token for WarningTxt category A warning can now be written with a category, e.g. {-# WARNInG in "x-c" e "d" #-} Keep track of the location of the 'in' keyword and string, as well as the original SourceText of the label, in case it uses character escapes. - - - - - 3df8a653 by Matthew Pickering at 2023-08-25T17:42:18-04:00 Remove redundant import in InfoTableProv The copyBytes function is provided by the import of Foreign. Fixes #23889 - - - - - d6f807ec by Ben Gamari at 2023-08-25T17:42:54-04:00 gitlab/issue-template: Mention report-a-bug - - - - - 50b9f75d by Artin Ghasivand at 2023-08-26T20:02:50+03:30 Added StandaloneKindSignature examples to replace CUSKs ones - - - - - 2f6309a4 by Vladislav Zavialov at 2023-08-27T03:47:37-04:00 Remove outdated CPP in compiler/* and template-haskell/* The boot compiler was bumped to 9.4 in cebb5819b43. There is no point supporting older GHC versions with CPP. - - - - - 5248fdf7 by Zubin Duggal at 2023-08-28T15:01:09+05:30 testsuite: Add regression test for #23861 Simon says this was fixed by commit 8d68685468d0b6e922332a3ee8c7541efbe46137 Author: sheaf <sam.derbyshire at gmail.com> Date: Fri Aug 4 15:28:45 2023 +0200 Remove zonk in tcVTA - - - - - b6903f4d by Zubin Duggal at 2023-08-28T12:33:58-04:00 testsuite: Add regression test for #23864 Simon says this was fixed by commit 59202c800f2c97c16906120ab2561f6e1556e4af Author: Sebastian Graf <sebastian.graf at kit.edu> Date: Fri Mar 31 17:35:22 2023 +0200 CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now. The main reason is that it plays far better in conjunction with eta expansion (as we aim to do for arguments in CorePrep, #23083), because we can discard any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta` it's impossible to discard the argument. - - - - - 9eecdf33 by sheaf at 2023-08-28T18:54:06+00:00 Remove ScopedTypeVariables => TypeAbstractions This commit implements [amendment 604](https://github.com/ghc-proposals/ghc-proposals/pull/604/) to [GHC proposal 448](https://github.com/ghc-proposals/ghc-proposals/pull/448) by removing the implication of language extensions ScopedTypeVariables => TypeAbstractions To limit breakage, we now allow type arguments in constructor patterns when both ScopedTypeVariables and TypeApplications are enabled, but we emit a warning notifying the user that this is deprecated behaviour that will go away starting in GHC 9.12. Fixes #23776 - - - - - fadd5b4d by sheaf at 2023-08-28T18:54:06+00:00 .stderr: ScopedTypeVariables =/> TypeAbstractions This commit accepts testsuite changes for the changes in the previous commit, which mean that TypeAbstractions is no longer implied by ScopedTypeVariables. - - - - - 4f5fb500 by Greg Steuck at 2023-08-29T07:55:13-04:00 Repair `codes` test on OpenBSD by explicitly requesting extended RE - - - - - 6bbde581 by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Add test for #23540 `T23540.hs` makes use of `explainEv` from `HieQueries.hs`, so `explainEv` has been moved to `TestUtils.hs`. - - - - - 257bb3bd by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Add test for #23120 - - - - - 4f192947 by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Make some evidence uses reachable by toHie Resolves #23540, #23120 This adds spans to certain expressions in the typechecker and renamer, and lets 'toHie' make use of those spans. Therefore the relevant evidence uses for the following syntax will now show up under the expected nodes in 'HieAst's: - Overloaded literals ('IsString', 'Num', 'Fractional') - Natural patterns and N+k patterns ('Eq', 'Ord', and instances from the overloaded literals being matched on) - Arithmetic sequences ('Enum') - Monadic bind statements ('Monad') - Monadic body statements ('Monad', 'Alternative') - ApplicativeDo ('Applicative', 'Functor') - Overloaded lists ('IsList') Also see Note [Source locations for implicit function calls] In the process of handling overloaded lists I added an extra 'SrcSpan' field to 'VAExpansion' - this allows us to more accurately reconstruct the locations from the renamer in 'rebuildHsApps'. This also happens to fix #23120. See the additions to Note [Looking through HsExpanded] - - - - - fe9fcf9d by Sylvain Henry at 2023-08-29T12:07:50-04:00 ghc-heap: rename C file (fix #23898) - - - - - b60d6576 by Krzysztof Gogolewski at 2023-08-29T12:08:29-04:00 Misc cleanup - Builtin.PrimOps: ReturnsAlg was used only for unboxed tuples. Rename to ReturnsTuple. - Builtin.Utils: use SDoc for a panic message. The comment about <<details unavailable>> was obsoleted by e8d356773b56. - TagCheck: fix wrong logic. It was zipping a list 'args' with its version 'args_cmm' after filtering. - Core.Type: remove an outdated 1999 comment about unlifted polymorphic types - hadrian: remove leftover debugging print - - - - - 3054fd6d by Krzysztof Gogolewski at 2023-08-29T12:09:08-04:00 Add a regression test for #23903 The bug has been fixed by commit bad2f8b8aa8424. - - - - - 21584b12 by Ben Gamari at 2023-08-29T19:52:02-04:00 README: Refer to ghc-hq repository for contributor and governance information - - - - - e542d590 by sheaf at 2023-08-29T19:52:40-04:00 Export setInertSet from GHC.Tc.Solver.Monad We used to export getTcSInerts and setTcSInerts from GHC.Tc.Solver.Monad. These got renamed to getInertSet/setInertSet in e1590ddc. That commit also removed the export of setInertSet, but that function is useful for the GHC API. - - - - - 694ec5b1 by sheaf at 2023-08-30T10:18:32-04:00 Don't bundle children for non-parent Avails We used to bundle all children of the parent Avail with things that aren't the parent, e.g. with class C a where type T a meth :: .. we would bundle the whole Avail (C, T, meth) with all of C, T and meth, instead of only with C. Avoiding this fixes #23570 - - - - - d926380d by Krzysztof Gogolewski at 2023-08-30T10:19:08-04:00 Fix typos - - - - - d07080d2 by Josh Meredith at 2023-08-30T19:42:32-04:00 JS: Implement missing C functions `rename`, `realpath`, and `getcwd` (#23806) - - - - - e2940272 by David Binder at 2023-08-30T19:43:08-04:00 Bump submodules of hpc and hpc-bin to version 0.7.0.0 hpc 0.7.0.0 dropped SafeHaskell safety guarantees in order to simplify compatibility with newer versions of the directory package which dropped all SafeHaskell guarantees. - - - - - 5d56d05c by David Binder at 2023-08-30T19:43:08-04:00 Bump hpc bound in ghc.cabal.in - - - - - 99fff496 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 ghc classes documentation: rm redundant comment - - - - - fe021bab by Dominik Schrempf at 2023-08-31T00:04:46-04:00 prelude documentation: various nits - - - - - 48c84547 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 integer documentation: minor corrections - - - - - 20cd12f4 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 real documentation: nits - - - - - dd39bdc0 by sheaf at 2023-08-31T00:05:27-04:00 Add a test for #21765 This issue (of reporting a constraint as being redundant even though removing it causes typechecking to fail) was fixed in aed1974e. This commit simply adds a regression test. Fixes #21765 - - - - - f1ec3628 by Andrew Lelechenko at 2023-08-31T23:53:30-04:00 Export foldl' from Prelude and bump submodules See https://github.com/haskell/core-libraries-committee/issues/167 for discussion Metric Decrease: T8095 T13386 Metric Increase: T13386 T8095 T8095 ghc/alloc decreased on x86_64, but increased on aarch64. T13386 ghc/alloc decreased on x86_64-windows, but increased on other platforms. Neither has anything to do with `foldl'`, so I conclude that both are flaky. - - - - - 3181b97d by Gergő Érdi at 2023-08-31T23:54:06-04:00 Allow cross-tyvar defaulting proposals from plugins Fixes #23832. - - - - - 495b2241 by Matthew Pickering at 2023-09-01T13:02:07+02:00 Fix issue with duplicate reexported definitions (T23616) When a class method was reexported, it's default methods were also showing up in the generated html page. The simplest and most non-invasive fix is to not look for the default method if we are just exporting the class method.. because the backends are just showing default methods when the whole class is exported. In general it would be worthwhile to rewrite this bit of code I think as the logic and what gets included is split over `lookupDocs` and `availExportDecl` it would be clearer to combine the two. The result of lookupDocs is always just passed to availExportDecl so it seems simpler and more obvious to just write the function directly. - - - - - e4af506e by Sebastian Graf at 2023-09-01T14:29:12-04:00 Clarify Note [GlobalId/LocalId] after CorePrep (#23797) Fixes #23797. - - - - - ac29787c by Sylvain Henry at 2023-09-01T14:30:02-04:00 Fix warning with UNPACK on sum type (#23921) - - - - - 9765ac7b by Zubin Duggal at 2023-09-05T00:37:45-04:00 hadrian: track python dependencies in doc rules - - - - - 1578215f by sheaf at 2023-09-05T00:38:26-04:00 Bump Haddock to fix #23616 This commit updates the Haddock submodule to include the fix to #23616. Fixes #23616 - - - - - 5a2fe35a by David Binder at 2023-09-05T00:39:07-04:00 Fix example in GHC user guide in SafeHaskell section The example given in the SafeHaskell section uses an implementation of Monad which no longer works. This MR removes the non-canonical return instance and adds the necessary instances of Functor and Applicative. - - - - - 291d81ae by Matthew Pickering at 2023-09-05T14:03:10-04:00 driver: Check transitive closure of haskell package dependencies when deciding whether to relink We were previously just checking whether direct package dependencies had been modified. This caused issues when compiling without optimisations as we wouldn't relink the direct dependency if one of its dependenices changed. Fixes #23724 - - - - - 35da0775 by Krzysztof Gogolewski at 2023-09-05T14:03:47-04:00 Re-export GHC.Utils.Panic.Plain from GHC.Utils.Panic Fixes #23930 - - - - - 6551824d by Finley McIlwaine at 2023-09-05T13:06:57-07:00 Remove fake export of `FUN` from Prelude This prevents `data FUN` from being shown at the top of the Prelude docs. Fixes \#23920 on GHC. - - - - - 3930d793 by Jaro Reinders at 2023-09-06T18:42:55-04:00 Make STG rewriter produce updatable closures - - - - - 0104221a by Krzysztof Gogolewski at 2023-09-06T18:43:32-04:00 configure: update message to use hadrian (#22616) - - - - - b34f8586 by Alan Zimmerman at 2023-09-07T10:58:38-04:00 EPA: Incorrect locations for UserTyVar with '@' In T13343.hs, the location for the @ is not within the span of the surrounding UserTyVar. type Bad @v = (forall (v1 :: RuntimeRep) (a1 :: TYPE v). a1) :: TYPE v Widen it so it is captured. Closes #23887 - - - - - 8046f020 by Finley McIlwaine at 2023-09-07T10:59:15-04:00 Bump haddock submodule to fix #23920 Removes the fake export of `FUN` from Prelude. Fixes #23920. Bumps haddock submodule. - - - - - e0aa8c6e by Krzysztof Gogolewski at 2023-09-07T11:00:03-04:00 Fix wrong role in mkSelCo_maybe In the Lint failure in #23938, we start with a coercion Refl :: T a ~R T a, and call mkSelCo (SelTyCon 1 nominal) Refl. The function incorrectly returned Refl :: a ~R a. The returned role should be nominal, according to the SelCo rule: co : (T s1..sn) ~r0 (T t1..tn) r = tyConRole tc r0 i ---------------------------------- SelCo (SelTyCon i r) : si ~r ti In this test case, r is nominal while r0 is representational. - - - - - 1d92f2df by Gergő Érdi at 2023-09-08T04:04:30-04:00 If we have multiple defaulting plugins, then we should zonk in between them after any defaulting has taken place, to avoid a defaulting plugin seeing a metavariable that has already been filled. Fixes #23821. - - - - - eaee4d29 by Gergő Érdi at 2023-09-08T04:04:30-04:00 Improvements to the documentation of defaulting plugins Based on @simonpj's draft and comments in !11117 - - - - - ede3df27 by Alan Zimmerman at 2023-09-08T04:05:06-04:00 EPA: Incorrect span for LWarnDec GhcPs The code (from T23465.hs) {-# WARNInG in "x-c" e "d" #-} e = e gives an incorrect span for the LWarnDecl GhcPs Closes #23892 It also fixes the Test23465/Test23464 mixup - - - - - a0ccef7a by Krzysztof Gogolewski at 2023-09-08T04:05:42-04:00 Valid hole fits: don't suggest unsafeCoerce (#17940) - - - - - 9ab5a448 by Alan Zimmerman at 2023-09-08T18:26:53+01:00 Match changes in wip/az/T23885-unicode-funtycon - - - - - 88b942c4 by Oleg Grenrus at 2023-09-08T19:58:42-04:00 Add warning for badly staged types. Resolves #23829. The stage violation results in out-of-bound names in splices. Technically this is an error, but someone might rely on this!? Internal changes: - we now track stages for TyVars. - thLevel (RunSplice _) = 0, instead of panic, as reifyInstances does in fact rename its argument type, and it can contain variables. - - - - - 9861f787 by Ben Gamari at 2023-09-08T19:59:19-04:00 rts: Fix invalid symbol type I suspect this code is dead since we haven't observed this failing despite the obviously incorrect macro name. - - - - - 03ed6a9a by Ben Gamari at 2023-09-08T19:59:19-04:00 testsuite: Add simple test exercising C11 atomics in GHCi See #22012. - - - - - 1aa5733a by Ben Gamari at 2023-09-08T19:59:19-04:00 rts/RtsSymbols: Add AArch64 outline atomic operations Fixes #22012 by adding the symbols described in https://github.com/llvm/llvm-project/blob/main/llvm/docs/Atomics.rst#libcalls-atomic. Ultimately this would be better addressed by #22011, but this is a first step in the right direction and fixes the immediate symptom. Note that we dropped the `__arch64_cas16` operations as these provided by all platforms's compilers. Also, we don't link directly against the libgcc/compiler-rt definitions but rather provide our own wrappers to work around broken toolchains (e.g. https://bugs.gentoo.org/868018). Generated via https://gitlab.haskell.org/ghc/ghc/-/snippets/5733. - - - - - 8f7d3041 by Matthew Pickering at 2023-09-08T19:59:55-04:00 ci: Build debian12 and fedora38 bindists This adds builds for the latest releases for fedora and debian We build these bindists in nightly and release pipelines. - - - - - a1f0d55c by Felix Leitz at 2023-09-08T20:00:37-04:00 Fix documentation around extension implication for MultiParamTypeClasses/ConstrainedClassMethods. - - - - - 98166389 by Teo Camarasu at 2023-09-12T04:30:54-04:00 docs: move -xn flag beside --nonmoving-gc It makes sense to have these beside each other as they are aliases. - - - - - f367835c by Teo Camarasu at 2023-09-12T04:30:55-04:00 nonmoving: introduce a family of dense allocators Supplement the existing power 2 sized nonmoving allocators with a family of dense allocators up to a configurable threshold. This should reduce waste from rounding up block sizes while keeping the amount of allocator sizes manageable. This patch: - Adds a new configuration option `--nonmoving-dense-allocator-count` to control the amount of these new dense allocators. - Adds some constants to `NonmovingAllocator` in order to keep marking fast with the new allocators. Resolves #23340 - - - - - 2b07bf2e by Teo Camarasu at 2023-09-12T04:30:55-04:00 Add changelog entry for #23340 - - - - - f96fe681 by sheaf at 2023-09-12T04:31:44-04:00 Use printGhciException in run{Stmt, Decls} When evaluating statements in GHCi, we need to use printGhciException instead of the printException function that GHC provides in order to get the appropriate error messages that are customised for ghci use. - - - - - d09b932b by psilospore at 2023-09-12T04:31:44-04:00 T23686: Suggest how to enable Language Extension when in ghci Fixes #23686 - - - - - da30f0be by Matthew Craven at 2023-09-12T04:32:24-04:00 Unarise: Split Rubbish literals in function args Fixes #23914. Also adds a check to STG lint that these args are properly unary or nullary after unarisation - - - - - 261b6747 by Matthew Pickering at 2023-09-12T04:33:04-04:00 darwin: Bump MAXOSX_DEPLOYMENT_TARGET to 10.13 This bumps the minumum supported version to 10.13 (High Sierra) which is 6 years old at this point. Fixes #22938 - - - - - f418f919 by Mario Blažević at 2023-09-12T04:33:45-04:00 Fix TH pretty-printing of nested GADTs, issue #23937 This commit fixes `Language.Haskell.TH.Ppr.pprint` so that it correctly pretty-prints GADTs declarations contained within data family instances. Fixes #23937 - - - - - d7a64753 by John Ericson at 2023-09-12T04:34:20-04:00 Put hadrian non-bootstrap plans through `jq` This makes it possible to review changes with conventional diffing tools. This is picking up where ad8cfed4195b1bbfc15b841f010e75e71f63157d left off. - - - - - ff0a709a by Sylvain Henry at 2023-09-12T08:46:28-04:00 JS: fix some tests - Tests using Setup programs need to pass --with-hc-pkg - Several other fixes See https://gitlab.haskell.org/ghc/ghc/-/wikis/javascript-backend/bug_triage for the current status - - - - - fc86f0e7 by Krzysztof Gogolewski at 2023-09-12T08:47:04-04:00 Fix in-scope set assertion failure (#23918) Patch by Simon - - - - - 21a906c2 by Matthew Pickering at 2023-09-12T17:21:04+02:00 Add -Winconsistent-flags warning The warning fires when inconsistent command line flags are passed. For example: * -dynamic-too and -dynamic * -dynamic-too on windows * -O and --interactive * etc This is on by default and allows users to control whether the warning is displayed and whether it should be an error or not. Fixes #22572 - - - - - dfc4f426 by Krzysztof Gogolewski at 2023-09-12T20:31:35-04:00 Avoid serializing BCOs with the internal interpreter Refs #23919 - - - - - 9217950b by Finley McIlwaine at 2023-09-13T08:06:03-04:00 Fix numa auto configure - - - - - 98e7c1cf by Simon Peyton Jones at 2023-09-13T08:06:40-04:00 Add -fno-cse to T15426 and T18964 This -fno-cse change is to avoid these performance tests depending on flukey CSE stuff. Each contains several independent tests, and we don't want them to interact. See #23925. By killing CSE we expect a 400% increase in T15426, and 100% in T18964. Metric Increase: T15426 T18964 - - - - - 236a134e by Simon Peyton Jones at 2023-09-13T08:06:40-04:00 Tiny refactor canEtaReduceToArity was only called internally, and always with two arguments equal to zero. This patch just specialises the function, and renames it to cantEtaReduceFun. No change in behaviour. - - - - - 56b403c9 by Ben Gamari at 2023-09-13T19:21:36-04:00 spec-constr: Lift argument limit for SPEC-marked functions When the user adds a SPEC argument to a function, they are informing us that they expect the function to be specialised. However, previously this instruction could be preempted by the specialised-argument limit (sc_max_args). Fix this. This fixes #14003. - - - - - 6840012e by Simon Peyton Jones at 2023-09-13T19:22:13-04:00 Fix eta reduction Issue #23922 showed that GHC was bogusly eta-reducing a join point. We should never eta-reduce (\x -> j x) to j, if j is a join point. It is extremly difficult to trigger this bug. It took me 45 mins of trying to make a small tests case, here immortalised as T23922a. - - - - - e5c00092 by Andreas Klebinger at 2023-09-14T08:57:43-04:00 Profiling: Properly escape characters when using `-pj`. There are some ways in which unusual characters like quotes or others can make it into cost centre names. So properly escape these. Fixes #23924 - - - - - ec490578 by Ellie Hermaszewska at 2023-09-14T08:58:24-04:00 Use clearer example variable names for bool eliminator - - - - - 5126a2fe by Sylvain Henry at 2023-09-15T11:18:02-04:00 Add missing int64/word64-to-double/float rules (#23907) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/203 - - - - - 566ef411 by Mario Blažević at 2023-09-15T11:18:43-04:00 Fix and test TH pretty-printing of type operator role declarations This commit fixes and tests `Language.Haskell.TH.Ppr.pprint` so that it correctly pretty-prints `type role` declarations for operator names. Fixes #23954 - - - - - 8e05c54a by Simon Peyton Jones at 2023-09-16T01:42:33-04:00 Use correct FunTyFlag in adjustJoinPointType As the Lint error in #23952 showed, the function adjustJoinPointType was failing to adjust the FunTyFlag when adjusting the type. I don't think this caused the seg-fault reported in the ticket, but it is definitely. This patch fixes it. It is tricky to come up a small test case; Krzysztof came up with this one, but it only triggers a failure in GHC 9.6. - - - - - 778c84b6 by Pierre Le Marre at 2023-09-16T01:43:15-04:00 Update to Unicode 15.1.0 See: https://www.unicode.org/versions/Unicode15.1.0/ - - - - - f9d79a6c by Alan Zimmerman at 2023-09-18T00:00:14-04:00 EPA: track unicode version for unrestrictedFunTyCon Closes #23885 Updates haddock submodule - - - - - 9374f116 by Andrew Lelechenko at 2023-09-18T00:00:54-04:00 Bump parsec submodule to allow text-2.1 and bytestring-0.12 - - - - - 7ca0240e by Ben Gamari at 2023-09-18T15:16:48-04:00 base: Advertise linear time of readFloat As noted in #23538, `readFloat` has runtime that scales nonlinearly in the size of its input. Consequently, its use on untrusted input can be exploited as a denial-of-service vector. Point this out and suggest use of `read` instead. See #23538. - - - - - f3f58f13 by Simon Peyton Jones at 2023-09-18T15:17:24-04:00 Remove dead code GHC.CoreToStg.Prep.canFloat This function never fires, so we can delete it: #23965. - - - - - ccab5b15 by Ben Gamari at 2023-09-18T15:18:02-04:00 base/changelog: Move fix for #23907 to 9.8.1 section Since the fix was backported to 9.8.1 - - - - - 51b57d65 by Matthew Pickering at 2023-09-19T08:44:31-04:00 Add aarch64 alpine bindist This is dynamically linked and makes creating statically linked executables more straightforward. Fixes #23482 - - - - - 02c87213 by Matthew Pickering at 2023-09-19T08:44:31-04:00 Add aarch64-deb11 bindist This adds a debian 11 release job for aarch64. Fixes #22005 - - - - - 8b61dfd6 by Alexis King at 2023-09-19T08:45:13-04:00 Don’t store the async exception masking state in CATCH frames - - - - - 86d2971e by doyougnu at 2023-09-19T19:08:19-04:00 compiler,ghci: error codes link to HF error index closes: #23259 - adds -fprint-error-index-links={auto|always|never} flag - - - - - 5f826c18 by sheaf at 2023-09-19T19:09:03-04:00 Pass quantified tyvars in tcDefaultAssocDecl This commit passes the correct set of quantified type variables written by the user in associated type default declarations for validity checking. This ensures that validity checking of associated type defaults mirrors that of standalone type family instances. Fixes #23768 (see testcase T23734 in subsequent commit) - - - - - aba18424 by sheaf at 2023-09-19T19:09:03-04:00 Avoid panic in mkGADTVars This commit avoids panicking in mkGADTVars when we encounter a type variable as in #23784 that is bound by a user-written forall but not actually used. Fixes #23784 - - - - - a525a92a by sheaf at 2023-09-19T19:09:03-04:00 Adjust reporting of unused tyvars in data FamInsts This commit adjusts the validity checking of data family instances to improve the reporting of unused type variables. See Note [Out of scope tvs in data family instances] in GHC.Tc.Validity. The problem was that, in a situation such as data family D :: Type data instance forall (d :: Type). D = MkD the RHS passed to 'checkFamPatBinders' would be the TyCon app R:D d which mentions the type variable 'd' quantified in the user-written forall. Thus, when computing the set of unused type variables in the RHS of the data family instance, we would find that 'd' is used, and report a strange error message that would say that 'd' is not bound on the LHS. To fix this, we special-case the data-family instance case, manually extracting all the type variables that appear in the arguments of all the data constructores of the data family instance. Fixes #23778 - - - - - 28dd52ee by sheaf at 2023-09-19T19:09:03-04:00 Unused tyvars in FamInst: only report user tyvars This commit changes how we perform some validity checking for coercion axioms to mirror how we handle default declarations for associated type families. This allows us to keep track of whether type variables in type and data family instances were user-written or not, in order to only report the user-written ones in "unused type variable" error messages. Consider for example: {-# LANGUAGE PolyKinds #-} type family F type instance forall a. F = () In this case, we get two quantified type variables, (k :: Type) and (a :: k); the second being user-written, but the first is introduced by the typechecker. We should only report 'a' as being unused, as the user has no idea what 'k' is. Fixes #23734 - - - - - 1eed645c by sheaf at 2023-09-19T19:09:03-04:00 Validity: refactor treatment of data families This commit refactors the reporting of unused type variables in type and data family instances to be more principled. This avoids ad-hoc logic in the treatment of data family instances. - - - - - 35bc506b by John Ericson at 2023-09-19T19:09:40-04:00 Remove `ghc-cabal` It is dead code since the Make build system was removed. I tried to go over every match of `git grep -i ghc-cabal` to find other stray bits. Some of those might be workarounds that can be further removed. - - - - - 665ca116 by John Paul Adrian Glaubitz at 2023-09-19T19:10:39-04:00 Re-add unregisterised build support for sparc and sparc64 Closes #23959 - - - - - 142f8740 by Matthew Pickering at 2023-09-19T19:11:16-04:00 Bump ci-images to use updated version of Alex Fixes #23977 - - - - - fa977034 by John Ericson at 2023-09-21T12:55:25-04:00 Use Cabal 3.10 for Hadrian We need the newer version for `CABAL_FLAG_*` env vars for #17191. - - - - - a5d22cab by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: `need` any `configure` script we will call When the script is changed, we should reconfigure. - - - - - db882b57 by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: Make it easier to debug Cabal configure Right now, output is squashed. This make per-package configure scripts extremely hard to maintain, because we get vague "library is missing" errors when the actually probably is usually completely unrelated except for also involving the C/C++ toolchain. (I can always pass `-VVV` to Hadrian locally, but these errors are subtle and I often cannot reproduce them locally!) `--disable-option-checking` was added back in 75c6e0684dda585c37b4ac254cd7a13537a59a91 but seems to be a bit overkill; if other flags are passed that are not recognized behind the two from Cabal mentioned in the former comment, we *do* want to know about it. - - - - - 7ed65f5a by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: Increase verbosity of certain cabal commands This is a hack to get around the cabal function we're calling *decreasing* the verbosity it passes to another function, which is the stuff we often actually care about. Sigh. Keeping this a separate commit so if this makes things too verbose it is easy to revert. - - - - - a4fde569 by John Ericson at 2023-09-21T12:55:25-04:00 rts: Move most external symbols logic to the configure script This is much more terse because we are programmatically handling the leading underscore. `findPtr` however is still handled in the Cabal file because we need a newer Cabal to pass flags to the configure script automatically. Co-Authored-By: Ben Gamari <ben at well-typed.com> - - - - - 56cc85fb by Andrew Lelechenko at 2023-09-21T12:56:21-04:00 Bump Cabal submodule to allow text-2.1 and bytestring-0.12 - - - - - 0cd6148c by Matthew Pickering at 2023-09-21T12:56:21-04:00 hadrian: Generate Distribution/Fields/Lexer.x before creating a source-dist - - - - - b10ba6a3 by Andrew Lelechenko at 2023-09-21T12:56:21-04:00 Bump hadrian's index-state to upgrade alex at least to 3.2.7.3 - - - - - 11ecc37b by Luite Stegeman at 2023-09-21T12:57:03-04:00 JS: correct file size and times Programs produced by the JavaScript backend were returning incorrect file sizes and modification times, causing cabal related tests to fail. This fixes the problem and adds an additional test that verifies basic file information operations. fixes #23980 - - - - - b35fd2cd by Ben Gamari at 2023-09-21T12:57:39-04:00 gitlab-ci: Drop libiserv from upload_ghc_libs libiserv has been merged into the ghci package. - - - - - 37ad04e8 by Ben Gamari at 2023-09-21T12:58:15-04:00 testsuite: Fix Windows line endings - - - - - 5795b365 by Ben Gamari at 2023-09-21T12:58:15-04:00 testsuite: Use makefile_test - - - - - 15118740 by Ben Gamari at 2023-09-21T12:58:55-04:00 system-cxx-std-lib: Add license and description - - - - - 0208f1d5 by Ben Gamari at 2023-09-21T12:59:33-04:00 gitlab/issue-templates: Rename bug.md -> default.md So that it is visible by default. - - - - - 23cc3f21 by Andrew Lelechenko at 2023-09-21T20:18:11+01:00 Bump submodule text to 2.1 - - - - - b8e4fe23 by Andrew Lelechenko at 2023-09-22T20:05:05-04:00 Bump submodule unix to 2.8.2.1 - - - - - 54b2016e by John Ericson at 2023-09-23T11:40:41-04:00 Move lib{numa,dw} defines to RTS configure Clean up the m4 to handle the auto case always and be more consistent. Also simplify the CPP --- we should always have both headers if we are using libnuma. "side effects" (AC_DEFINE, and AC_SUBST) are removed from the macros to better separate searching from actions taken based on search results. This might seem overkill now, but will make shuffling logic between configure scripts easier later. The macro comments are converted from `dnl` to `#` following the recomendation in https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Macro-Definitions.html - - - - - d51b601b by John Ericson at 2023-09-23T11:40:50-04:00 Shuffle libzstd configuring between scripts Like the prior commit for libdw and libnuma, `AC_DEFINE` to RTS configure, `AC_SUBST` goes to the top-level configure script, and the documentation of the m4 macro is improved. - - - - - d1425af0 by John Ericson at 2023-09-23T11:41:03-04:00 Move `FP_ARM_OUTLINE_ATOMICS` to RTS configure It is just `AC_DEFINE` it belongs there instead. - - - - - 18de37e4 by John Ericson at 2023-09-23T11:41:03-04:00 Move mmap in the runtime linker check to the RTS configure `AC_DEFINE` should go there instead. - - - - - 74132c2b by Andrew Lelechenko at 2023-09-25T21:56:54-04:00 Elaborate comment on GHC_NO_UNICODE - - - - - de142aa2 by Ben Gamari at 2023-09-26T15:25:03-04:00 gitlab-ci: Mark T22012 as broken on CentOS 7 Due to #23979. - - - - - 6a896ce8 by Teo Camarasu at 2023-09-26T15:25:39-04:00 hadrian: better error for failing to find file's dependencies Resolves #24004 - - - - - d697a6c2 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Refactor uses of `partitionEithers . map` This patch changes occurences of the idiom `partitionEithers (map f xs)` by the simpler form `partitionWith f xs` where `partitionWith` is the utility function defined in `GHC.Utils.Misc`. Resolves: #23953 - - - - - 8a2968b7 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Refactor uses of `partitionEithers <$> mapM f xs` This patch changes occurences of the idiom `partitionEithers <$> mapM f xs` by the simpler form `partitionWithM f xs` where `partitionWithM` is a utility function newly added to `GHC.Utils.Misc`. - - - - - 6a27eb97 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Mark `GHC.Utils.Misc.partitionWithM` as inlineable This patch adds an `INLINEABLE` pragma for `partitionWithM` to ensure that the right-hand side of the definition of this function remains available for specialisation at call sites. - - - - - f1e5245a by David Binder at 2023-09-27T01:19:00-04:00 Add RTS option to supress tix file - - - - - 1f43124f by David Binder at 2023-09-27T01:19:00-04:00 Add expected output to testsuite in test interface-stability/base-exports - - - - - b9d2c354 by David Binder at 2023-09-27T01:19:00-04:00 Expose HpcFlags and getHpcFlags from GHC.RTS.Flags - - - - - 345675c6 by David Binder at 2023-09-27T01:19:00-04:00 Fix expected output of interface-stability test - - - - - 146e1c39 by David Binder at 2023-09-27T01:19:00-04:00 Implement getHpcFlags - - - - - 61ba8e20 by David Binder at 2023-09-27T01:19:00-04:00 Add section in user guide - - - - - ea05f890 by David Binder at 2023-09-27T01:19:01-04:00 Rename --emit-tix-file to --write-tix-file - - - - - cabce2ce by David Binder at 2023-09-27T01:19:01-04:00 Update the golden files for interface stability - - - - - 1dbdb9d0 by Krzysztof Gogolewski at 2023-09-27T01:19:37-04:00 Refactor: introduce stgArgRep The function 'stgArgType' returns the type in STG. But this violates the abstraction: in STG we're supposed to operate on PrimReps. This introduces stgArgRep ty = typePrimRep (stgArgType ty) stgArgRep1 ty = typePrimRep1 (stgArgType ty) stgArgRep_maybe ty = typePrimRep_maybe (stgArgType ty) stgArgType is still directly used for unboxed tuples (should be fixable), FFI and in ticky. - - - - - b02f8042 by Mario Blažević at 2023-09-27T17:33:28-04:00 Fix TH pretty-printer's parenthesization This PR Fixes `Language.Haskell.TH.Ppr.pprint` so it correctly emits parentheses where needed. Fixes #23962, #23968, #23971, and #23986 - - - - - 79104334 by Krzysztof Gogolewski at 2023-09-27T17:34:04-04:00 Add a testcase for #17564 The code in the ticket relied on the behaviour of Derived constraints. Derived constraints were removed in GHC 9.4 and now the code works as expected. - - - - - d7a80143 by sheaf at 2023-09-28T03:25:53-04:00 lint-codes: add new modes of operation This commit adds two new modes of operation to the lint-codes utility: list - list all statically used diagnostic codes outdated - list all outdated diagnostic codes The previous behaviour is now: test - test consistency and coverage of diagnostic codes - - - - - 477d223c by sheaf at 2023-09-28T03:25:53-04:00 lint codes: avoid using git-grep We manually traverse through the filesystem to find the diagnostic codes embedded in .stdout and .stderr files, to avoid any issues with old versions of grep. Fixes #23843 - - - - - a38ae69a by sheaf at 2023-09-28T03:25:53-04:00 lint-codes: add Hadrian targets This commit adds new Hadrian targets: codes, codes:used - list all used diagnostic codes codes:outdated - list outdated diagnostic codes This allows users to easily query GHC for used and outdated diagnostic codes, e.g. hadrian/build -j --flavour=<..> codes will list all used diagnostic codes in the command line by running the lint-codes utility in the "list codes" mode of operation. The diagnostic code consistency and coverage test is still run as usual, through the testsuite: hadrian/build test --only="codes" - - - - - 9cdd629b by Ben Gamari at 2023-09-28T03:26:29-04:00 hadrian: Install LICENSE files in bindists Fixes #23548. - - - - - b8ebf876 by Matthew Craven at 2023-09-28T03:27:05-04:00 Fix visibility when eta-reducing a type lambda Fixes #24014. - - - - - d3874407 by Torsten Schmits at 2023-09-30T16:08:10-04:00 Fix several mistakes around free variables in iface breakpoints Fixes #23612 , #23607, #23998 and #23666. MR: !11026 The fingerprinting logic in `Iface.Recomp` failed lookups when processing decls containing breakpoints for two reasons: * IfaceBreakpoint created binders for free variables instead of expressions * When collecting free names for the dependency analysis for fingerprinting, breakpoint FVs were skipped - - - - - ef5342cd by Simon Peyton Jones at 2023-09-30T16:08:48-04:00 Refactor to combine HsLam and HsLamCase This MR is pure refactoring (#23916): * Combine `HsLam` and `HsLamCase` * Combine `HsCmdLam` and `HsCmdLamCase` This just arranges to treat uniformly \x -> e \case pi -> ei \cases pis -> ie In the exising code base the first is treated differently to the latter two. No change in behaviour. More specifics: * Combine `HsLam` and `HsLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsExpr`) into one data construtor covering * Lambda * `\case` * `\cases` * The new `HsLam` has an argument of type `HsLamVariant` to distinguish the three cases. * Similarly, combine `HsCmdLam` and `HsCmdLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsCmd` ) into one. * Similarly, combine `mkHsLamPV` and `mkHsLamCasePV` (methods of class `DisambECP`) into one. (Thank you Alan Zimmerman.) * Similarly, combine `LambdaExpr` and `LamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsMatchContext`) into one: `LamAlt` with a `HsLamVariant` argument. * Similarly, combine `KappaExpr` and `ArrowLamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsArrowMatchContext`) into one: `ArrowLamAlt` with a `HsLamVariant` argument. * Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one. * Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one. * In the same `PsError` data type, combine `PsErrLambdaCmdInFunAppCmd` and `PsErrLambdaCaseCmdInFunAppCmd` into one. * In the same `PsError` data tpye, combine `PsErrLambdaInFunAppExpr` and `PsErrLambdaCaseInFunAppExpr` into one. p* Smilarly combine `ExpectedFunTyLam` and `ExpectedFunTyLamCase` (constructors of `GHC.Tc.Types.Origin.ExpectedFunTyOrigin`) into one. Phew! - - - - - b048bea0 by Andreas Klebinger at 2023-09-30T16:09:24-04:00 Arm: Make ppr methods easier to use by not requiring NCGConfig - - - - - 2adc0508 by Andreas Klebinger at 2023-09-30T16:09:24-04:00 AArch64: Fix broken conditional jumps for offsets >= 1MB Rewrite conditional jump instructions with offsets >= 1MB to use unconditional jumps to avoid overflowing the immediate. Fixes #23746 - - - - - 1424f790 by Alan Zimmerman at 2023-09-30T16:10:00-04:00 EPA: Replace Monoid with NoAnn We currently use the Monoid class as a constraint on Exact Print Annotation functions, so we can use mempty. But this leads to requiring Semigroup instances too, which do not always make sense. Instead, introduce a class NoAnn, with a function noAnn analogous to mempty. Closes #20372 Updates haddock submodule - - - - - c1a3ecde by Ben Gamari at 2023-09-30T16:10:36-04:00 users-guide: Refactor handling of :base-ref: et al. - - - - - bc204783 by Richard Eisenberg at 2023-10-02T14:50:52+02:00 Simplify and correct nasty case in coercion opt This fixes #21062. No test case, because triggering this code seems challenging. - - - - - 9c9ca67e by Andrew Lelechenko at 2023-10-04T05:42:28-04:00 Bump bytestring submodule to 0.12.0.2 - - - - - 4e46dc2b by Andrew Lelechenko at 2023-10-04T05:42:28-04:00 Inline bucket_match - - - - - f6b2751f by Ben Gamari at 2023-10-04T05:43:05-04:00 configure: Fix #21712 again This is a bit of a shot in the dark to fix #24033, which appears to be another instance of #21712. For some reason the ld-override logic *still* appears to be active on Darwin targets (or at least one). Consequently, on misconfigured systems we may choose a non-`ld64` linker. It's a bit unclear exactly what happened in #24033 but ultimately the check added for #21712 was not quite right, checking for the `ghc_host_os` (the value of which depends upon the bootstrap compiler) instead of the target platform. Fix this. Fixes #24033. - - - - - 2f0a101d by Krzysztof Gogolewski at 2023-10-04T05:43:42-04:00 Add a regression test for #24029 - - - - - 8cee3fd7 by sheaf at 2023-10-04T05:44:22-04:00 Fix non-symbolic children lookup of fixity decl The fix for #23664 did not correctly account for non-symbolic names when looking up children of a given parent. This one-line fix changes that. Fixes #24037 - - - - - a4785b33 by Cheng Shao at 2023-10-04T05:44:59-04:00 rts: fix incorrect ticket reference - - - - - e037f459 by Ben Gamari at 2023-10-04T05:45:35-04:00 users-guide: Fix discussion of -Wpartial-fields * fix a few typos * add a new example showing when the warning fires * clarify the existing example * point out -Wincomplete-record-selects Fixes #24049. - - - - - 8ff3134e by Matthew Pickering at 2023-10-05T05:34:58-04:00 Revert "Pass preprocessor options to C compiler when building foreign C files (#16737)" This reverts commit 1c18d3b41f897f34a93669edaebe6069f319f9e2. `-optP` should pass options to the preprocessor, that might be a very different program to the C compiler, so passing the options to the C compiler is likely to result in `-optP` being useless. Fixes #17185 and #21291 - - - - - 8f6010b9 by Ben Gamari at 2023-10-05T05:35:36-04:00 rts/nonmoving: Fix on LLP64 platforms Previously `NONMOVING_SEGMENT_MASK` and friends were defined with the `UL` size suffix. However, this is wrong on LLP64 platforms like Windows, where `long` is 32-bits. Fixes #23003. Fixes #24042. - - - - - f20d02f8 by Andreas Klebinger at 2023-10-05T05:36:14-04:00 Fix isAArch64Bitmask for 32bit immediates. Fixes #23802 - - - - - 63afb701 by Bryan Richter at 2023-10-05T05:36:49-04:00 Work around perf note fetch failure Addresses #24055. - - - - - 242102f4 by Krzysztof Gogolewski at 2023-10-05T05:37:26-04:00 Add a test for #21348 - - - - - 7d390bce by Rewbert at 2023-10-05T05:38:08-04:00 Fixes #24046 - - - - - 69abb171 by Finley McIlwaine at 2023-10-06T14:06:28-07:00 Ensure unconstrained instance dictionaries get IPE info In the `StgRhsCon` case of `GHC.Stg.Debug.collectStgRhs`, we were not coming up with an initial source span based on the span of the binder, which was causing instance dictionaries without dynamic superclass constraints to not have source locations in their IPE info. Now they do. Resolves #24005 - - - - - 390443b7 by Andreas Klebinger at 2023-10-07T10:00:20-04:00 rts: Split up rts/include/stg/MachRegs.h by arch - - - - - 3685942f by Bryan Richter at 2023-10-07T10:00:56-04:00 Actually set hackage index state Or at least, use a version of the cabal command that *claims* to set the index state. Time will tell. - - - - - 46a0e5be by Bryan Richter at 2023-10-07T10:00:56-04:00 Update hackage index state - - - - - d4b037de by Bryan Richter at 2023-10-07T10:00:56-04:00 Ensure hadrian uses CI's hackage index state - - - - - e206be64 by Andrew Lelechenko at 2023-10-08T15:06:14-04:00 Do not use O_NONBLOCK on regular files or block devices CLC proposal https://github.com/haskell/core-libraries-committee/issues/166 - - - - - a06197c4 by David Binder at 2023-10-08T15:06:55-04:00 Update hpc-bin submodule to 0.69 - - - - - ed6785b6 by David Binder at 2023-10-08T15:06:55-04:00 Update Hadrian with correct path to happy file for hpc-bin - - - - - 94066d58 by Alan Zimmerman at 2023-10-09T21:35:53-04:00 EPA: Introduce HasAnnotation class The class is defined as class HasAnnotation e where noAnnSrcSpan :: SrcSpan -> e This generalises noAnnSrcSpan, and allows noLocA :: (HasAnnotation e) => a -> GenLocated e a noLocA = L (noAnnSrcSpan noSrcSpan) - - - - - 8792a1bc by Ben Gamari at 2023-10-09T21:36:29-04:00 Bump unix submodule to v2.8.3.0 - - - - - e96c51cb by Andreas Klebinger at 2023-10-10T16:44:27+01:00 Add a flag -fkeep-auto-rules to optionally keep auto-generated rules around. The motivation for the flag is given in #21917. - - - - - 3ed58cef by Matthew Pickering at 2023-10-10T19:01:22-04:00 hadrian: Add ghcToolchain to tool args list This allows you to load ghc-toolchain and ghc-toolchain-bin into HLS. - - - - - 476c02d4 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Normalise triple via config.sub We were not normalising the target triple anymore like we did with the old make build system. Fixes #23856 - - - - - 303dd237 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add missing vendor normalisation This is copied from m4/ghc_convert_vendor.m4 Towards #23868 - - - - - 838026c9 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add loongarch64 to parseArch Towards #23868 - - - - - 1a5bc0b5 by Matthew Pickering at 2023-10-10T19:01:22-04:00 Add same LD hack to ghc-toolchain In the ./configure script, if you pass the `LD` variable then this has the effect of stopping use searching for a linker and hence passing `-fuse-ld=...`. We want to emulate this logic in ghc-toolchain, if a use explicilty specifies `LD` variable then don't add `-fuse-ld=..` with the goal of making ./configure and ghc-toolchain agree on which flags to use when using the C compiler as a linker. This is quite unsavoury as we don't bake the choice of LD into the configuration anywhere but what's important for now is making ghc-toolchain and ./configure agree as much as possible. See #23857 for more discussion - - - - - 42d50b5a by Ben Gamari at 2023-10-10T19:01:22-04:00 ghc-toolchain: Check for C99 support with -std=c99 Previously we failed to try enabling C99 support with `-std=c99`, as `autoconf` attempts. This broke on older compilers (e.g. CentOS 7) which don't enable C99 by default. Fixes #23879. - - - - - da2961af by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add endianess check using __BYTE_ORDER__ macro In very old toolchains the BYTE_ORDER macro is not set but thankfully the __BYTE_ORDER__ macro can be used instead. - - - - - d8da73cd by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: AC_PATH_TARGET_TOOL for LD We want to make sure that LD is set to an absolute path in order to be consistent with the `LD=$(command -v ld)` call. The AC_PATH_TARGET_TOOL macro uses the absolute path rather than AC_CHECK_TARGET_TOOL which might use a relative path. - - - - - 171f93cc by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Check whether we need -std=gnu99 for CPP as well In ./configure the C99 flag is passed to the C compiler when used as a C preprocessor. So we also check the same thing in ghc-toolchain. - - - - - 89a0918d by Matthew Pickering at 2023-10-10T19:01:22-04:00 Check for --target linker flag separately to C compiler There are situations where the C compiler doesn't accept `--target` but when used as a linker it does (but doesn't do anything most likely) In particular with old gcc toolchains, the C compiler doesn't support --target but when used as a linker it does. - - - - - 37218329 by Matthew Pickering at 2023-10-10T19:01:22-04:00 Use Cc to compile test file in nopie check We were attempting to use the C compiler, as a linker, to compile a file in the nopie check, but that won't work in general as the flags we pass to the linker might not be compatible with the ones we pass when using the C compiler. - - - - - 9b2dfd21 by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: Error when ghc-toolchain fails to compile This is a small QOL change as if you are working on ghc-toolchain and it fails to compile then configure will continue and can give you outdated results. - - - - - 1f0de49a by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: Check whether -no-pie works when the C compiler is used as a linker `-no-pie` is a flag we pass when using the C compiler as a linker (see pieCCLDOpts in GHC.Driver.Session) so we should test whether the C compiler used as a linker supports the flag, rather than just the C compiler. - - - - - 62cd2579 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Remove javascript special case for --target detection emcc when used as a linker seems to ignore the --target flag, and for consistency with configure which now tests for --target, we remove this special case. - - - - - 0720fde7 by Ben Gamari at 2023-10-10T19:01:22-04:00 toolchain: Don't pass --target to emscripten toolchain As noted in `Note [Don't pass --target to emscripten toolchain]`, emscripten's `emcc` is rather inconsistent with respect to its treatment of the `--target` flag. Avoid this by special-casing this toolchain in the `configure` script and `ghc-toolchain`. Fixes on aspect of #23744. - - - - - 6354e1da by Matthew Pickering at 2023-10-10T19:01:22-04:00 hadrian: Don't pass `--gcc-options` as a --configure-arg to cabal configure Stop passing -gcc-options which mixed together linker flags and non-linker flags. There's no guarantee the C compiler will accept both of these in each mode. - - - - - c00a4bd6 by Ben Gamari at 2023-10-10T19:01:22-04:00 configure: Probe stage0 link flags For consistency with later stages and CC. - - - - - 1f11e7c4 by Sebastian Graf at 2023-10-10T19:01:58-04:00 Stricter Binary.get in GHC.Types.Unit (#23964) I noticed some thunking while looking at Core. This change has very modest, but throughout positive ghc/alloc effect: ``` hard_hole_fits(normal) ghc/alloc 283,057,664 281,620,872 -0.5% geo. mean -0.1% minimum -0.5% maximum +0.0% ``` Fixes #23964. - - - - - a4f1a181 by Bryan Richter at 2023-10-10T19:02:37-04:00 rel_eng/upload.sh cleanups - - - - - 80705335 by doyougnu at 2023-10-10T19:03:18-04:00 ci: add javascript label rule This adds a rule which triggers the javascript job when the "javascript" label is assigned to an MR. - - - - - a2c0fff6 by Matthew Craven at 2023-10-10T19:03:54-04:00 Make 'wWarningFlagsDeps' include every WarningFlag Fixes #24071. - - - - - d055f099 by Jan Hrček at 2023-10-10T19:04:33-04:00 Fix pretty printing of overlap pragmas in TH splices (fixes #24074) - - - - - 0746b868 by Andreas Klebinger at 2023-10-10T19:05:09-04:00 Aarch64 NCG: Use encoded immediates for literals. Try to generate instr x2, <imm> instead of mov x1, lit instr x2, x1 When possible. This get's rid if quite a few redundant mov instructions. I believe this causes a metric decrease for LargeRecords as we reduce register pressure. ------------------------- Metric Decrease: LargeRecord ------------------------- - - - - - 739f4e6f by Andreas Klebinger at 2023-10-10T19:05:09-04:00 AArch NCG: Refactor getRegister' Remove some special cases which can be handled just as well by the generic case. This increases code re-use while also fixing #23749. Since some of the special case wasn't upholding Note [Signed arithmetic on AArch64]. - - - - - 1b213d33 by Andreas Klebinger at 2023-10-10T19:05:09-04:00 Aarch ncg: Optimize immediate use for address calculations When the offset doesn't fit into the immediate we now just reuse the general getRegister' code path which is well optimized to compute the offset into a register instead of a special case for CmmRegOff. This means we generate a lot less code under certain conditions which is why performance metrics for these improve. ------------------------- Metric Decrease: T4801 T5321FD T5321Fun ------------------------- - - - - - b7df0732 by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over mem management checks These are for heap allocation, a strictly RTS concern. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. The RTS configure one has a new ``` AC_CHECK_SIZEOF([void *]) ``` that the top-level configure version didn't have, so that `ac_cv_sizeof_void_p` is defined. Once more code is moved over in latter commits, that can go away. Progress towards #17191 - - - - - 41130a65 by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over `__thread` check This used by (@bgamari thinks) the `GCThread` abstraction in the RTS. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - cc5ec2bd by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over misc function checks These are for general use in the RTS. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - 809e7c2d by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over `eventfd` check This check is for the RTS part of the event manager and has a corresponding part in `base`. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - 58f3babf by John Ericson at 2023-10-11T16:02:48-04:00 Split `FP_CHECK_PTHREADS` and move part to RTS configure `NEED_PTHREAD_LIB` is unused since 3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the make build system), and so is no longer defined. Progress towards #17191 - - - - - e99cf237 by Moritz Angermann at 2023-10-11T16:03:24-04:00 nativeGen: section flags for .text$foo only Commit 3ece9856d157c85511d59f9f862ab351bbd9b38b, was supposed to fix #22834 in !9810. It does however add "xr" indiscriminatly to .text sections even if splitSections is disabled. This leads to the assembler saying: ghc_1.s:7849:0: error: Warning: Ignoring changed section attributes for .text | 7849 | .section .text,"xr" | ^ - - - - - f383a242 by Sylvain Henry at 2023-10-11T16:04:04-04:00 Modularity: pass TempDir instead of DynFlags (#17957) - - - - - 34fc28b0 by John Ericson at 2023-10-12T06:48:28-04:00 Test that functions from `mingwex` are available Ryan wrote these two minimizations, but they never got added to the test suite. See #23309, #23378 Co-Authored-By: Ben Gamari <bgamari.foss at gmail.com> Co-Authored-By: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - bdb54a0e by John Ericson at 2023-10-12T06:48:28-04:00 Do not check for the `mingwex` library in `/configure` See the recent discussion in !10360 --- Cabal will itself check for the library for the packages that need it, and while the autoconf check additionally does some other things like define a `HAS_LIBMINGWEX` C Preprocessor macro, those other things are also unused and unneeded. Progress towards #17191, which aims to get rid of `/configure` entirely. - - - - - 43e814e1 by Ben Gamari at 2023-10-12T06:49:40-04:00 base: Introduce move modules into src The only non-move changes here are whitespace changes to pass the `whitespace` test and a few testsuite adaptations. - - - - - df81536f by Moritz Angermann at 2023-10-12T06:50:16-04:00 [PEi386 linker] Bounds check and null-deref guard We should resonably be able to expect that we won't exceed the number of sections if we assume to be dealing with legal object files. We can however not guarantee that we get some negative values, and while we try to special case most, we should exclude negative indexing into the sections array. We also need to ensure that we do not try to derefences targetSection, if it is NULL, due to the switch statement. - - - - - c74c4f00 by John Ericson at 2023-10-12T10:31:13-04:00 Move apple compat check to RTS configure - - - - - c80778ea by John Ericson at 2023-10-12T10:31:13-04:00 Move clock/timer fun checks to RTS configure Actual library check (which will set the Cabal flag) is left in the top-level configure for now. Progress towards #17191 - - - - - 7f9f2686 by John Ericson at 2023-10-12T10:31:13-04:00 Move visibility and "musttail" annotation checks to the RTS configure All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - ffb3efe6 by John Ericson at 2023-10-12T10:31:13-04:00 Move leading underscore checks to RTS configure `CabalLeadingUnderscore` is done via Hadrian already, so we can stop `AC_SUBST`ing it completely. - - - - - 25fa4b02 by John Ericson at 2023-10-12T10:31:13-04:00 Move alloca, fork, const, and big endian checks to RTS configure All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. - - - - - 5170f42a by John Ericson at 2023-10-12T10:31:13-04:00 Move libdl check to RTS configure - - - - - ea7a1447 by John Ericson at 2023-10-12T10:31:13-04:00 Adjust `FP_FIND_LIBFFI` Just set vars, and `AC_SUBST` in top-level configure. Don't define `HAVE_SYSTEM_LIBFFI` because nothing is using it. It hasn't be in used since 3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the make build system). - - - - - f399812c by John Ericson at 2023-10-12T10:31:13-04:00 Split BFD support to RTS configure The flag is still in the top-level configure, but the other checks (which define various macros --- important) are in the RTS configure. - - - - - f64f44e9 by John Ericson at 2023-10-12T10:31:13-04:00 Split libm check between top level and RTS - - - - - dafc4709 by Moritz Angermann at 2023-10-12T10:31:49-04:00 CgUtils.fixStgRegStmt respect register width This change ensure that the reg + offset computation is always of the same size. Before this we could end up with a 64bit register, and then add a 32bit offset (on 32bit platforms). This not only would fail type sanity checking, but also incorrectly truncate 64bit values into 32bit values silently on 32bit architectures. - - - - - 9e6ef7ba by Matthew Pickering at 2023-10-12T20:35:00-04:00 hadrian: Decrease verbosity of cabal commands In Normal, most tools do not produce output to stdout unless there are error conditions. Reverts 7ed65f5a1bc8e040e318ccff395f53a9bbfd8217 - - - - - 08fc27af by John Ericson at 2023-10-12T20:35:36-04:00 Do not substitute `@...@` for stage-specific values in cabal files `rts` and `ghc-prim` now no longer have a `*.cabal.in` to set Cabal flag defaults; instead manual choices are passed to configure in the usual way. The old way was fundamentally broken, because it meant we were baking these Cabal files for a specific stage. Now we only do stage-agnostic @...@ substitution in cabal files (the GHC version), and so all stage-specific configuration is properly confined to `_build` and the right stage dir. Also `include-ghc-prim` is a flag that no longer exists for `ghc-prim` (it was removed in 835d8ddbbfb11796ea8a03d1806b7cee38ba17a6) so I got rid of it. Co-Authored-By: Matthew Pickering <matthewtpickering at gmail.com> - - - - - a0ac8785 by Sebastian Graf at 2023-10-14T19:17:12-04:00 Fix restarts in .ghcid Using the whole of `hadrian/` restarted in a loop for me. - - - - - fea9ecdb by Sebastian Graf at 2023-10-14T19:17:12-04:00 CorePrep: Refactor FloatingBind (#23442) A drastically improved architecture for local floating in CorePrep that decouples the decision of whether a float is going to be let- or case-bound from how far it can float (out of strict contexts, out of lazy contexts, to top-level). There are a couple of new Notes describing the effort: * `Note [Floating in CorePrep]` for the overview * `Note [BindInfo and FloatInfo]` for the new classification of floats * `Note [Floats and FloatDecision]` for how FloatInfo is used to inform floating decisions This is necessary ground work for proper treatment of Strict fields and unlifted values at top-level. Fixes #23442. NoFib results (omitted = 0.0%): ``` -------------------------------------------------------------------------------- Program Allocs Instrs -------------------------------------------------------------------------------- pretty 0.0% -1.6% scc 0.0% -1.7% -------------------------------------------------------------------------------- Min 0.0% -1.7% Max 0.0% -0.0% Geometric Mean -0.0% -0.0% ``` - - - - - 32523713 by Matthew Pickering at 2023-10-14T19:17:49-04:00 hadrian: Move ghcBinDeps into ghcLibDeps This completes a5227080b57cb51ac34d4c9de1accdf6360b818b, the `ghc-usage.txt` and `ghci-usage.txt` file are also used by the `ghc` library so need to make sure they are present in the libdir even if we are not going to build `ghc-bin`. This also fixes things for cross compilers because the stage2 cross-compiler requires the ghc-usage.txt file, but we are using the stage2 lib folder but not building stage3:exe:ghc-bin so ghc-usage.txt was not being generated. - - - - - ec3c4488 by sheaf at 2023-10-14T19:18:29-04:00 Combine GREs when combining in mkImportOccEnv In `GHC.Rename.Names.mkImportOccEnv`, we sometimes discard one import item in favour of another, as explained in Note [Dealing with imports] in `GHC.Rename.Names`. However, this can cause us to lose track of important parent information. Consider for example #24084: module M1 where { class C a where { type T a } } module M2 ( module M1 ) where { import M1 } module M3 where { import M2 ( C, T ); instance C () where T () = () } When processing the import list of `M3`, we start off (for reasons that are not relevant right now) with two `Avail`s attached to `T`, namely `C(C, T)` and `T(T)`. We combine them in the `combine` function of `mkImportOccEnv`; as described in Note [Dealing with imports] we discard `C(C, T)` in favour of `T(T)`. However, in doing so, we **must not** discard the information want that `C` is the parent of `T`. Indeed, losing track of this information can cause errors when importing, as we could get an error of the form ‘T’ is not a (visible) associated type of class ‘C’ We fix this by combining the two GREs for `T` using `plusGRE`. Fixes #24084 - - - - - 257c2807 by Ilias Tsitsimpis at 2023-10-14T19:19:07-04:00 hadrian: Pass -DNOSMP to C compiler when needed Hadrian passes the -DNOSMP flag to GHC when the target doesn't support SMP, but doesn't pass it to CC as well, leading to the following compilation error on mips64el: | Run Cc (FindCDependencies CDep) Stage1: rts/sm/NonMovingScav.c => _build/stage1/rts/build/c/sm/NonMovingScav.o.d Command line: /usr/bin/mips64el-linux-gnuabi64-gcc -E -MM -MG -MF _build/stage1/rts/build/c/hooks/FlagDefaults.thr_debug_p_o.d -MT _build/stage1/rts/build/c/hooks/FlagDefaults.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -x c rts/hooks/FlagDefaults.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -DTHREADED_RTS -DDEBUG -fomit-frame-pointer -O2 -g -Irts -I_build/stage1/rts/build -DDEBUG -fno-omit-frame-pointer -g3 -O0 ===> Command failed with error code: 1 In file included from rts/include/Stg.h:348, from rts/include/Rts.h:38, from rts/hooks/FlagDefaults.c:8: rts/include/stg/SMP.h:416:2: error: #error memory barriers unimplemented on this architecture 416 | #error memory barriers unimplemented on this architecture | ^~~~~ rts/include/stg/SMP.h:440:2: error: #error memory barriers unimplemented on this architecture 440 | #error memory barriers unimplemented on this architecture | ^~~~~ rts/include/stg/SMP.h:464:2: error: #error memory barriers unimplemented on this architecture 464 | #error memory barriers unimplemented on this architecture | ^~~~~ The old make system correctly passed this flag to both GHC and CC [1]. Fix this error by passing -DNOSMP to CC as well. [1] https://gitlab.haskell.org/ghc/ghc/-/blob/00920f176b0235d5bb52a8e054d89a664f8938fe/rts/ghc.mk#L407 Closes #24082 - - - - - 13d3c613 by John Ericson at 2023-10-14T19:19:42-04:00 Users Guide: Drop dead code for Haddock refs to `parallel` I noticed while working on !11451 that `@LIBRARY_parallel_UNIT_ID@` was not substituted. It is dead code -- there is no `parallel-ref` usages and it doesn't look like there ever was (going back to 3e5d0f188d6c8633e55e9ba6c8941c07e459fa4b), so let's delete it. - - - - - fe067577 by Sylvain Henry at 2023-10-18T19:40:25-04:00 Avoid out-of-bound array access in bigNatIsPowerOf2 (fix #24066) bigNatIndex# in the `where` clause wasn't guarded by "bigNatIsZero a". - - - - - cc1625b1 by Sylvain Henry at 2023-10-18T19:40:25-04:00 Bignum: fix right shift of negative BigNat with native backend - - - - - cbe4400d by Sylvain Henry at 2023-10-18T19:40:25-04:00 Rts: expose rtsOutOfBoundsAccess symbol - - - - - 72c7380c by Sylvain Henry at 2023-10-18T19:40:25-04:00 Hadrian: enable `-fcheck-prim-bounds` in validate flavour This allows T24066 to fail when the bug is present. Otherwise the out-of-bound access isn't detected as it happens in ghc-bignum which wasn't compiled with the bounds check. - - - - - f9436990 by John Ericson at 2023-10-18T19:41:01-04:00 Make Hadrian solely responsible for substituting `docs/users_guide/ghc_config.py.in` Fixes #24091 Progress on #23966 Issue #24091 reports that `@ProjectVersion@` is no longer being substituted in the GHC user's guide. I assume this is a recent issue, but I am not sure how it's worked since c1a3ecde720b3bddc2c8616daaa06ee324e602ab; it looks like both Hadrian and configure are trying to substitute the same `.in` file! Now only Hadrian does. That is better anyways; already something that issue #23966 requested. It seems like we were missing some dependencies in Hadrian. (I really, really hate that this is possible!) Hopefully it is fixed now. - - - - - b12df0bb by John Ericson at 2023-10-18T19:41:37-04:00 `ghcversion.h`: No need to cope with undefined `ProjectPatchLevel*` Since 4e6c80197f1cc46dfdef0300de46847c7cfbdcb0, these are guaranteed to be defined. (Guaranteed including a test in the testsuite.) - - - - - 0295375a by John Ericson at 2023-10-18T19:41:37-04:00 Generate `ghcversion.h` from a `.in` file Now that there are no conditional sections (see the previous commit), we can just a do simple substitution rather than pasting it together line by line. Progress on #23966 - - - - - 740a1b85 by Krzysztof Gogolewski at 2023-10-19T11:37:20-04:00 Add a regression test for #24064 - - - - - 921fbf2f by Hécate Moonlight at 2023-10-19T11:37:59-04:00 CLC Proposal #182: Export List from Data.List Proposal link: https://github.com/haskell/core-libraries-committee/issues/182 - - - - - 4f02d3c1 by Sylvain Henry at 2023-10-20T04:01:32-04:00 rts: fix small argument passing on big-endian arch (fix #23387) - - - - - b86243b4 by Sylvain Henry at 2023-10-20T04:02:13-04:00 Interpreter: fix literal alignment on big-endian architectures (fix #19261) Literals weren't correctly aligned on big-endian, despite what the comment said. - - - - - a4b2ec47 by Sylvain Henry at 2023-10-20T04:02:54-04:00 Testsuite: recomp011 and recomp015 are fixed on powerpc These tests have been fixed but not tested and re-enabled on big-endian powerpc (see comments in #11260 and #11323) - - - - - fded7dd4 by Sebastian Graf at 2023-10-20T04:03:30-04:00 CorePrep: Allow floating dictionary applications in -O0 into a Rec (#24102) - - - - - 02efc181 by John Ericson at 2023-10-22T02:48:55-04:00 Move function checks to RTS configure Some of these functions are used in `base` too, but we can copy the checks over to its configure if that's an issue. - - - - - 5f4bccab by John Ericson at 2023-10-22T02:48:55-04:00 Move over a number of C-style checks to RTS configure - - - - - 5cf04f58 by John Ericson at 2023-10-22T02:48:55-04:00 Move/Copy more `AC_DEFINE` to RTS config Only exception is the LLVM version macros, which are used for GHC itself. - - - - - b8ce5dfe by John Ericson at 2023-10-22T02:48:55-04:00 Define `TABLES_NEXT_TO_CODE` in the RTS configure We create a new cabal flag to facilitate this. - - - - - 4a40271e by John Ericson at 2023-10-22T02:48:55-04:00 Configure scripts: `checkOS`: Make a bit more robust `mingw64` and `mingw32` are now both accepted for `OSMinGW32`. This allows us to cope with configs/triples that we haven't normalized extra being what GNU `config.sub` does. - - - - - 16bec0a0 by John Ericson at 2023-10-22T02:48:55-04:00 Generate `ghcplatform.h` from RTS configure We create a new cabal flag to facilitate this. - - - - - 7dfcab2f by John Ericson at 2023-10-22T02:48:55-04:00 Get rid of all mention of `mk/config.h` The RTS configure script is now solely responsible for managing its headers; the top level configure script does not help. - - - - - c1e3719c by Cheng Shao at 2023-10-22T02:49:33-04:00 rts: drop stale mentions of MIN_UPD_SIZE We used to have MIN_UPD_SIZE macro that describes the minimum reserved size for thunks, so that the thunk can be overwritten in place as indirections or blackholes. However, this macro has not been actually defined or used anywhere since a long time ago; StgThunkHeader already reserves a padding word for this purpose. Hence this patch which drops stale mentions of MIN_UPD_SIZE. - - - - - d24b0d85 by Andrew Lelechenko at 2023-10-22T02:50:11-04:00 base changelog: move non-backported entries from 4.19 section to 4.20 Neither !10933 (check https://hackage.haskell.org/package/base-4.19.0.0/docs/src/Text.Read.Lex.html#numberToRangedRational) nor !10189 (check https://hackage.haskell.org/package/base-4.19.0.0/docs/src/Data.List.NonEmpty.html#unzip) were backported to `base-4.19.0.0`. Moving them to `base-4.20.0.0` section. Also minor stylistic changes to other entries, bringing them to a uniform form. - - - - - de78b32a by Alan Zimmerman at 2023-10-23T09:09:41-04:00 EPA Some tweaks to annotations - Fix span for GRHS - Move TrailingAnns from last match to FunBind - Fix GADT 'where' clause span - Capture full range for a CaseAlt Match - - - - - d5a8780d by Simon Hengel at 2023-10-23T09:10:23-04:00 Update primitives.rst - - - - - 4d075924 by Josh Meredith at 2023-10-24T23:04:12+11:00 JS/userguide: add explanation of writing jsbits - - - - - 07ab5cc1 by Cheng Shao at 2023-10-24T15:40:32-04:00 testsuite: increase timeout of ghc-api tests for wasm32 ghc-api tests for wasm32 are more likely to timeout due to the large wasm module sizes, especially when testing with wasm native tail calls, given wasmtime's handling of tail call opcodes are suboptimal at the moment. It makes sense to increase timeout specifically for these tests on wasm32. This doesn't affect other targets, and for wasm32 we don't increase timeout for all tests, so not to risk letting major performance regressions slip through the testsuite. - - - - - 0d6acca5 by Greg Steuck at 2023-10-26T08:44:23-04:00 Explicitly require RLIMIT_AS before use in OSMem.c This is done elsewhere in the source tree. It also suddenly is required on OpenBSD. - - - - - 9408b086 by Sylvain Henry at 2023-10-26T08:45:03-04:00 Modularity: modularize external linker Decouple runLink from DynFlags to allow calling runLink more easily. This is preliminary work for calling Emscripten's linker (emcc) from our JavaScript linker. - - - - - e0f35030 by doyougnu at 2023-10-27T08:41:12-04:00 js: add JStg IR, remove unsaturated constructor - Major step towards #22736 and adding the optimizer in #22261 - - - - - 35587eba by Simon Peyton Jones at 2023-10-27T08:41:48-04:00 Fix a bug in tail calls with ticks See #24078 for the diagnosis. The change affects only the Tick case of occurrence analysis. It's a bit hard to test, so no regression test (yet anyway). - - - - - 9bc5cb92 by Matthew Craven at 2023-10-28T07:06:17-04:00 Teach tag-inference about SeqOp/seq# Fixes the STG/tag-inference analogue of #15226. Co-Authored-By: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - 34f06334 by Moritz Angermann at 2023-10-28T07:06:53-04:00 [PEi386] Mask SYM_TYPE_DUP_DISCARD in makeSymbolExtra 48e391952c17ff7eab10b0b1456e3f2a2af28a9b introduced `SYM_TYPE_DUP_DISCARD` to the bitfield. The linker however, failed to mask the `SYM_TYPE_DUP_DISCARD` value. Thus `== SYM_TYPE_CODE` comparisons easily failed. This lead to us relocating DATA lookups (GOT) into E8 (call) and E9 (jump) instructions. - - - - - 5b51b2a2 by Mario Blažević at 2023-10-28T07:07:33-04:00 Fix and test for issue #24111, TH.Ppr output of pattern synonyms - - - - - 723bc352 by Alan Zimmerman at 2023-10-30T20:36:41-04:00 EPA: print doc comments as normal comments And ignore the ones allocated in haddock processing. It does not guarantee that every original haddock-like comment appears in the output, as it discards ones that have no legal attachment point. closes #23459 - - - - - 21b76843 by Simon Peyton Jones at 2023-10-30T20:37:17-04:00 Fix non-termination bug in equality solver constraint left-to-right then right to left, forever. Easily fixed. - - - - - 270867ac by Sebastian Graf at 2023-10-30T20:37:52-04:00 ghc-toolchain: build with `-package-env=-` (#24131) Otherwise globally installed libraries (via `cabal install --lib`) break the build. Fixes #24131. - - - - - 4d08364e by Alan Zimmerman at 2023-10-31T19:46:45+00:00 EPA: match changes in GHC - EPA: Comments in AnchorOperation - EPA: Remove EpaEofComment - - - - - 7a90020f by Krzysztof Gogolewski at 2023-10-31T20:03:37-04:00 docs: fix ScopedTypeVariables example (#24101) The previous example didn't compile. Furthermore, it wasn't demonstrating the point properly. I have changed it to an example which shows that 'a' in the signature must be the same 'a' as in the instance head. - - - - - 49f69f50 by Krzysztof Gogolewski at 2023-10-31T20:04:13-04:00 Fix pretty-printing of type family dependencies "where" should be after the injectivity annotation. - - - - - 73c191c0 by Ben Gamari at 2023-10-31T20:04:49-04:00 gitlab-ci: Bump LLVM bootstrap jobs to Debian 12 As the Debian 10 images have too old an LLVM. Addresses #24056. - - - - - 5b0392e0 by Matthew Pickering at 2023-10-31T20:04:49-04:00 ci: Run aarch64 llvm backend job with "LLVM backend" label This brings it into line with the x86 LLVM backend job. - - - - - 9f9c9227 by Ryan Scott at 2023-11-01T09:19:12-04:00 More robust checking for DataKinds As observed in #22141, GHC was not doing its due diligence in catching code that should require `DataKinds` in order to use. Most notably, it was allowing the use of arbitrary data types in kind contexts without `DataKinds`, e.g., ```hs data Vector :: Nat -> Type -> Type where ``` This patch revamps how GHC tracks `DataKinds`. The full specification is written out in the `DataKinds` section of the GHC User's Guide, and the implementation thereof is described in `Note [Checking for DataKinds]` in `GHC.Tc.Validity`. In brief: * We catch _type_-level `DataKinds` violations in the renamer. See `checkDataKinds` in `GHC.Rename.HsType` and `check_data_kinds` in `GHC.Rename.Pat`. * We catch _kind_-level `DataKinds` violations in the typechecker, as this allows us to catch things that appear beneath type synonyms. (We do *not* want to do this in type-level contexts, as it is perfectly fine for a type synonym to mention something that requires DataKinds while still using the type synonym in a module that doesn't enable DataKinds.) See `checkValidType` in `GHC.Tc.Validity`. * There is now a single `TcRnDataKindsError` that classifies all manner of `DataKinds` violations, both in the renamer and the typechecker. The `NoDataKindsDC` error has been removed, as it has been subsumed by `TcRnDataKindsError`. * I have added `CONSTRAINT` is `isKindTyCon`, which is what checks for illicit uses of data types at the kind level without `DataKinds`. Previously, `isKindTyCon` checked for `Constraint` but not `CONSTRAINT`. This is inconsistent, given that both `Type` and `TYPE` were checked by `isKindTyCon`. Moreover, it thwarted the implementation of the `DataKinds` check in `checkValidType`, since we would expand `Constraint` (which was OK without `DataKinds`) to `CONSTRAINT` (which was _not_ OK without `DataKinds`) and reject it. Now both are allowed. * I have added a flurry of additional test cases that test various corners of `DataKinds` checking. Fixes #22141. - - - - - 575d7690 by Sylvain Henry at 2023-11-01T09:19:53-04:00 JS: fix FFI "wrapper" and "dynamic" Fix codegen and helper functions for "wrapper" and "dynamic" foreign imports. Fix tests: - ffi006 - ffi011 - T2469 - T4038 Related to #22363 - - - - - 81fb8885 by Alan Zimmerman at 2023-11-01T22:23:56-04:00 EPA: Use full range for Anchor This change requires a series of related changes, which must all land at the same time, otherwise all the EPA tests break. * Use the current Anchor end as prior end Use the original anchor location end as the source of truth for calculating print deltas. This allows original spacing to apply in most cases, only changed AST items need initial delta positions. * Add DArrow to TrailingAnn * EPA Introduce HasTrailing in ExactPrint Use [TrailingAnn] in enterAnn and remove it from ExactPrint (LocatedN RdrName) * In HsDo, put TrailingAnns at top of LastStmt * EPA: do not convert comments to deltas when balancing. * EPA: deal with fallout from getMonoBind * EPA fix captureLineSpacing * EPA print any comments in the span before exiting it * EPA: Add comments to AnchorOperation * EPA: remove AnnEofComment, it is no longer used Updates Haddock submodule - - - - - 03e82511 by Rodrigo Mesquita at 2023-11-01T22:24:32-04:00 Fix in docs regarding SSymbol, SNat, SChar (#24119) - - - - - 362cc693 by Matthew Pickering at 2023-11-01T22:25:08-04:00 hadrian: Update bootstrap plans (9.4.6, 9.4.7, 9.6.2, 9.6.3, 9.8.1) Updating the bootstrap plans with more recent GHC versions. - - - - - 00b9b8d3 by Matthew Pickering at 2023-11-01T22:25:08-04:00 ci: Add 9.8.1 bootstrap testing job - - - - - ef3d20f8 by Matthew Pickering at 2023-11-01T22:25:08-04:00 Compatibility with 9.8.1 as boot compiler This fixes several compatability issues when using 9.8.1 as the boot compiler. * An incorrect version guard on the stack decoding logic in ghc-heap * Some ghc-prim bounds need relaxing * ghc is no longer wired in, so we have to remove the -this-unit-id ghc call. Fixes #24077 - - - - - 6755d833 by Jaro Reinders at 2023-11-03T10:54:42+01:00 Add NCG support for common 64bit operations to the x86 backend. These used to be implemented via C calls which was obviously quite bad for performance for operations like simple addition. Co-authored-by: Andreas Klebinger - - - - - 0dfb1fa7 by Vladislav Zavialov at 2023-11-03T14:08:41-04:00 T2T in Expressions (#23738) This patch implements the T2T (term-to-type) transformation in expressions. Given a function with a required type argument vfun :: forall a -> ... the user can now call it as vfun (Maybe Int) instead of vfun (type (Maybe Int)) The Maybe Int argument is parsed and renamed as a term (HsExpr), but then undergoes a conversion to a type (HsType). See the new function expr_to_type in compiler/GHC/Tc/Gen/App.hs and Note [RequiredTypeArguments and the T2T mapping] Left as future work: checking for puns. - - - - - cc1c7c54 by Duncan Coutts at 2023-11-05T00:23:44-04:00 Add a test for I/O managers It tries to cover the cases of multiple threads waiting on the same fd for reading and multiple threads waiting for writing, including wait cancellation by async exceptions. It should work for any I/O manager, in-RTS or in-Haskell. Unfortunately it will not currently work for Windows because it relies on anonymous unix sockets. It could in principle be ported to use Windows named pipes. - - - - - 2e448f98 by Cheng Shao at 2023-11-05T00:23:44-04:00 Skip the IOManager test on wasm32 arch. The test relies on the sockets API which are not (yet) available. - - - - - fe50eb35 by Cheng Shao at 2023-11-05T00:24:20-04:00 compiler: fix eager blackhole symbol in wasm32 NCG - - - - - af771148 by Cheng Shao at 2023-11-05T00:24:20-04:00 testsuite: fix optasm tests for wasm32 - - - - - 1b90735c by Matthew Pickering at 2023-11-05T00:24:20-04:00 testsuite: Add wasm32 to testsuite arches with NCG The compiler --info reports that wasm32 compilers have a NCG, so we should agree with that here. - - - - - db9a6496 by Alan Zimmerman at 2023-11-05T00:24:55-04:00 EPA: make locA a function, not a field name And use it to generalise reLoc The following for the windows pipeline one. 5.5% Metric Increase: T5205 - - - - - 833e250c by Simon Peyton Jones at 2023-11-05T00:25:31-04:00 Update the unification count in wrapUnifierX Omitting this caused type inference to fail in #24146. This was an accidental omision in my refactoring of the equality solver. - - - - - e451139f by Andreas Klebinger at 2023-11-05T00:26:07-04:00 Remove an accidental git conflict marker from a comment. - - - - - e7da0d25 by Alan Zimmerman at 2023-11-05T11:20:31+00:00 EPA: match changes in GHC, l2l cleanup - - - - - 30baac7a by Tobias Haslop at 2023-11-06T10:50:32+00:00 Add laws relating between Foldable/Traversable with their Bi- superclasses See https://github.com/haskell/core-libraries-committee/issues/205 for discussion. This commit also documents that the tuple instances only satisfy the laws up to lazyness, similar to the documentation added in !9512. - - - - - df626f00 by Tobias Haslop at 2023-11-07T02:20:37-05:00 Elaborate on the quantified superclass of Bifunctor This was requested in the comment https://github.com/haskell/core-libraries-committee/issues/93#issuecomment-1597271700 for when Traversable becomes a superclass of Bitraversable, but similarly applies to Functor/Bifunctor, which already are in a superclass relationship. - - - - - 8217acb8 by Alan Zimmerman at 2023-11-07T02:21:12-05:00 EPA: get rid of l2l and friends Replace them with l2l to convert the location la2la to convert a GenLocated thing Updates haddock submodule - - - - - dd88a260 by Luite Stegeman at 2023-11-07T02:21:53-05:00 JS: remove broken newIdents from JStg Monad GHC.JS.JStg.Monad.newIdents was broken, resulting in duplicate identifiers being generated in h$c1, h$c2, ... . This change removes the broken newIdents. - - - - - 455524a2 by Matthew Craven at 2023-11-09T08:41:59-05:00 Create specially-solved DataToTag class Closes #20532. This implements CLC proposal 104: https://github.com/haskell/core-libraries-committee/issues/104 The design is explained in Note [DataToTag overview] in GHC.Tc.Instance.Class. This replaces the existing `dataToTag#` primop. These metric changes are not "real"; they represent Unique-related flukes triggering on a different set of jobs than they did previously. See also #19414. Metric Decrease: T13386 T8095 Metric Increase: T13386 T8095 Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - a05f4554 by Alan Zimmerman at 2023-11-09T08:42:35-05:00 EPA: get rid of glRR and friends in GHC/Parser.y With the HasLoc and HasAnnotation classes, we can replace a number of type-specific helper functions in the parser with polymorphic ones instead Metric Decrease: MultiLayerModulesTH_Make - - - - - 18498538 by Cheng Shao at 2023-11-09T16:58:12+00:00 ci: bump ci-images for wasi-sdk upgrade - - - - - 52c0fc69 by PHO at 2023-11-09T19:16:22-05:00 Don't assume the current locale is *.UTF-8, set the encoding explicitly primops.txt contains Unicode characters: > LC_ALL=C ./genprimopcode --data-decl < ./primops.txt > genprimopcode: <stdin>: hGetContents: invalid argument (cannot decode byte sequence starting from 226) Hadrian must also avoid using readFile' to read primops.txt because it tries to decode the file with a locale-specific encoding. - - - - - 7233b3b1 by PHO at 2023-11-09T19:17:01-05:00 Use '[' instead of '[[' because the latter is a Bash-ism It doesn't work on platforms where /bin/sh is something other than Bash. - - - - - 6dbab180 by Simon Peyton Jones at 2023-11-09T19:17:36-05:00 Add an extra check in kcCheckDeclHeader_sig Fix #24083 by checking for a implicitly-scoped type variable that is not actually bound. See Note [Disconnected type variables] in GHC.Tc.Gen.HsType For some reason, on aarch64-darwin we saw a 2.8% decrease in compiler allocations for MultiLayerModulesTH_Make; but 0.0% on other architectures. Metric Decrease: MultiLayerModulesTH_Make - - - - - 22551364 by Sven Tennie at 2023-11-11T06:35:22-05:00 AArch64: Delete unused LDATA pseudo-instruction Though there were consuming functions for LDATA, there were no producers. Thus, the removed code was "dead". - - - - - 2a0ec8eb by Alan Zimmerman at 2023-11-11T06:35:59-05:00 EPA: harmonise acsa and acsA in GHC/Parser.y With the HasLoc class, we can remove the acsa helper function, using acsA instead. - - - - - 4ceac14d by Alan Zimmerman at 2023-11-11T15:16:41+00:00 EPA: Replace Anchor with EpaLocation Match GHC - - - - - 7ae517a0 by Teo Camarasu at 2023-11-12T08:04:12-05:00 nofib: bump submodule This includes changes that: - fix building a benchmark with HEAD - remove a Makefile-ism that causes errors in bash scripts Resolves #24178 - - - - - 3f0036ec by Alan Zimmerman at 2023-11-12T08:04:47-05:00 EPA: Replace Anchor with EpaLocation An Anchor has a location and an operation, which is either that it is unchanged or that it has moved with a DeltaPos data Anchor = Anchor { anchor :: RealSrcSpan , anchor_op :: AnchorOperation } An EpaLocation also has either a location or a DeltaPos data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan) | EpaDelta !DeltaPos ![LEpaComment] Now that we do not care about always having a location in the anchor, we remove Anchor and replace it with EpaLocation We do this with a type alias initially, to ease the transition. The alias will be removed in time. We also have helpers to reconstruct the AnchorOperation from an EpaLocation. This is also temporary. Updates Haddock submodule - - - - - a7492048 by Alan Zimmerman at 2023-11-12T13:43:07+00:00 EPA: get rid of AnchorOperation Now that the Anchor type is an alias for EpaLocation, remove AnchorOperation. Updates haddock submodule - - - - - 0745c34d by Andrew Lelechenko at 2023-11-13T16:25:07-05:00 Add since annotation for showHFloat - - - - - e98051a5 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 Suppress duplicate librares linker warning of new macOS linker Fixes #24167 XCode 15 introduced a new linker which warns on duplicate libraries being linked. To disable this warning, we pass -Wl,-no_warn_duplicate_libraries as suggested by Brad King in CMake issue #25297. This flag isn't necessarily available to other linkers on darwin, so we must only configure it into the CC linker arguments if valid. - - - - - c411c431 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Encoding test witnesses recent iconv bug is fragile A regression in the new iconv() distributed with XCode 15 and MacOS Sonoma causes the test 'encoding004' to fail in the CP936 roundrip. We mark this test as fragile until this is fixed upstream (rather than broken, since previous versions of iconv pass the test) See #24161 - - - - - ce7fe5a9 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Update to LC_ALL=C no longer being ignored in darwin MacOS seems to have fixed an issue where it used to ignore the variable `LC_ALL` in program invocations and default to using Unicode. Since the behaviour seems to be fixed to account for the locale variable, we mark tests that were previously broken in spite of it as fragile (since they now pass in recent macOS distributions) See #24161 - - - - - e6c803f7 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 darwin: Fix single_module is obsolete warning In XCode 15's linker, -single_module is the default and otherwise passing it as a flag results in a warning being raised: ld: warning: -single_module is obsolete This patch fixes this warning by, at configure time, determining whether the linker supports -single_module (which is likely false for all non-darwin linkers, and true for darwin linkers in previous versions of macOS), and using that information at runtime to decide to pass or not the flag in the invocation. Fixes #24168 - - - - - 929ba2f9 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Skip MultiLayerModulesTH_Make on darwin The recent toolchain upgrade on darwin machines resulted in the MultiLayerModulesTH_Make test metrics varying too much from the baseline, ultimately blocking the CI pipelines. This commit skips the test on darwin to temporarily avoid failures due to the environment change in the runners. However, the metrics divergence is being investigated still (tracked in #24177) - - - - - af261ccd by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 configure: check target (not build) understands -no_compact_unwind Previously, we were branching on whether the build system was darwin to shortcut this check, but we really want to branch on whether the target system (which is what we are configuring ld_prog for) is darwin. - - - - - 2125c176 by Luite Stegeman at 2023-11-15T13:19:38-05:00 JS: Fix missing variable declarations The JStg IR update was missing some local variable declarations that were present earlier, causing global variables to be used implicitly (or an error in JavaScript strict mode). This adds the local variable declarations again. - - - - - 99ced73b by Krzysztof Gogolewski at 2023-11-15T13:20:14-05:00 Remove loopy superclass solve mechanism Programs with a -Wloopy-superclass-solve warning will now fail with an error. Fixes #23017 - - - - - 2aff2361 by Zubin Duggal at 2023-11-15T13:20:50-05:00 users-guide: Fix links to libraries from the users-guide. The unit-ids generated in c1a3ecde720b3bddc2c8616daaa06ee324e602ab include the package name, so we don't need to explicitly add it to the links. Fixes #24151 - - - - - 27981fac by Alan Zimmerman at 2023-11-15T13:21:25-05:00 EPA: splitLHsForAllTyInvis does not return ann We did not use the annotations returned from splitLHsForAllTyInvis, so do not return them. - - - - - a6467834 by Krzysztof Gogolewski at 2023-11-15T22:22:59-05:00 Document defaulting of RuntimeReps Fixes #24099 - - - - - 2776920e by Simon Peyton Jones at 2023-11-15T22:23:35-05:00 Second fix to #24083 My earlier fix turns out to be too aggressive for data/type families See wrinkle (DTV1) in Note [Disconnected type variables] - - - - - cee81370 by Sylvain Henry at 2023-11-16T09:57:46-05:00 Fix unusable units and module reexport interaction (#21097) This commit fixes an issue with ModUnusable introduced in df0f148feae. In mkUnusableModuleNameProvidersMap we traverse the list of unusable units and generate ModUnusable origin for all the modules they contain: exposed modules, hidden modules, and also re-exported modules. To do this we have a two-level map: ModuleName -> Unit:ModuleName (aka Module) -> ModuleOrigin So for each module name "M" in broken unit "u" we have: "M" -> u:M -> ModUnusable reason However in the case of module reexports we were using the *target* module as a key. E.g. if "u:M" is a reexport for "X" from unit "o": "M" -> o:X -> ModUnusable reason Case 1: suppose a reexport without module renaming (u:M -> o:M) from unusable unit u: "M" -> o:M -> ModUnusable reason Here it's claiming that the import of M is unusable because a reexport from u is unusable. But if unit o isn't unusable we could also have in the map: "M" -> o:M -> ModOrigin ... Issue: the Semigroup instance of ModuleOrigin doesn't handle the case (ModUnusable <> ModOrigin) Case 2: similarly we could have 2 unusable units reexporting the same module without renaming, say (u:M -> o:M) and (v:M -> o:M) with u and v unusable. It gives: "M" -> o:M -> ModUnusable ... (for u) "M" -> o:M -> ModUnusable ... (for v) Issue: the Semigroup instance of ModuleOrigin doesn't handle the case (ModUnusable <> ModUnusable). This led to #21097, #16996, #11050. To fix this, in this commit we make ModUnusable track whether the module used as key is a reexport or not (for better error messages) and we use the re-export module as key. E.g. if "u:M" is a reexport for "o:X" and u is unusable, we now record: "M" -> u:M -> ModUnusable reason reexported=True So now, we have two cases for a reexport u:M -> o:X: - u unusable: "M" -> u:M -> ModUnusable ... reexported=True - u usable: "M" -> o:X -> ModOrigin ... reexportedFrom=u:M The second case is indexed with o:X because in this case the Semigroup instance of ModOrigin is used to combine valid expositions of a module (directly or via reexports). Note that module lookup functions select usable modules first (those who have a ModOrigin value), so it doesn't matter if we add new ModUnusable entries in the map like this: "M" -> { u:M -> ModUnusable ... reexported=True o:M -> ModOrigin ... } The ModOrigin one will be used. Only if there is no ModOrigin or ModHidden entry will the ModUnusable error be printed. See T21097 for an example printing several reasons why an import is unusable. - - - - - 3e606230 by Krzysztof Gogolewski at 2023-11-16T09:58:22-05:00 Fix IPE test A helper function was defined in a different module than used. To reproduce: ./hadrian/build test --test-root-dirs=testsuite/tests/rts/ipe - - - - - 49f5264b by Andreas Klebinger at 2023-11-16T20:52:11-05:00 Properly compute unpacked sizes for -funpack-small-strict-fields. Use rep size rather than rep count to compute the size. Fixes #22309 - - - - - b4f84e4b by James Henri Haydon at 2023-11-16T20:52:53-05:00 Explicit methods for Alternative Compose Explicitly define some and many in Alternative instance for Data.Functor.Compose Implementation of https://github.com/haskell/core-libraries-committee/issues/181 - - - - - 9bc0dd1f by Ignat Insarov at 2023-11-16T20:53:34-05:00 Add permutations for non-empty lists. Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/68#issuecomment-1221409837 - - - - - 5643ecf9 by Andrew Lelechenko at 2023-11-16T20:53:34-05:00 Update changelog and since annotations for Data.List.NonEmpty.permutations Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/68#issuecomment-1221409837 - - - - - 94ff2134 by Oleg Alexander at 2023-11-16T20:54:15-05:00 Update doc string for traceShow Updated doc string for traceShow. - - - - - faff671a by Luite Stegeman at 2023-11-17T14:12:51+01:00 JS: clean up some foreign imports - - - - - 856e0a4e by Sven Tennie at 2023-11-18T06:54:11-05:00 AArch64: Remove unused instructions As these aren't ever emitted, we don't even know if they work or will ever be used. If one of them is needed in future, we may easily re-add it. Deleted instructions are: - CMN - ANDS - BIC - BICS - EON - ORN - ROR - TST - STP - LDP - DMBSY - - - - - 615441ef by Alan Zimmerman at 2023-11-18T06:54:46-05:00 EPA: Replace Monoid with NoAnn Remove the final Monoid instances in the exact print infrastructure. For Windows CI Metric Decrease: T5205 - - - - - 5a6c49d4 by David Feuer at 2023-11-20T18:53:18-05:00 Speed up stimes in instance Semigroup Endo As discussed at https://github.com/haskell/core-libraries-committee/issues/4 - - - - - cf9da4b3 by Andrew Lelechenko at 2023-11-20T18:53:18-05:00 base: reflect latest changes in the changelog - - - - - 48bf364e by Alan Zimmerman at 2023-11-20T18:53:54-05:00 EPA: Use SrcSpan in EpaSpan This is more natural, since we already need to deal with invalid RealSrcSpans, and that is exactly what SrcSpan.UnhelpfulSpan is for. Updates haddock submodule. - - - - - 97ec37cc by Sebastian Graf at 2023-11-20T18:54:31-05:00 Add regression test for #6070 Fixes #6070. - - - - - e9d5ae41 by Owen Shepherd at 2023-11-21T18:32:23-05:00 chore: Correct typo in the gitlab MR template [skip ci] - - - - - f158a8d0 by Rodrigo Mesquita at 2023-11-21T18:32:59-05:00 Improve error message when reading invalid `.target` files A `.target` file generated by ghc-toolchain or by configure can become invalid if the target representation (`Toolchain.Target`) is changed while the files are not re-generated by calling `./configure` or `ghc-toolchain` again. There is also the issue of hadrian caching the dependencies on `.target` files, which makes parsing fail when reading reading the cached value if the representation has been updated. This patch provides a better error message in both situations, moving away from a terrible `Prelude.read: no parse` error that you would get otherwise. Fixes #24199 - - - - - 955520c6 by Ben Gamari at 2023-11-21T18:33:34-05:00 users guide: Note that QuantifiedConstraints implies ExplicitForAll Fixes #24025. - - - - - 17ec3e97 by Owen Shepherd at 2023-11-22T09:37:28+01:00 fix: Change type signatures in NonEmpty export comments to reflect reality This fixes several typos in the comments of Data.List.NonEmpty export list items. - - - - - 2fd78f9f by Samuel Thibault at 2023-11-22T11:49:13-05:00 Fix the platform string for GNU/Hurd As commited in Cargo https://github.com/haskell/cabal/pull/9434 there is confusion between "gnu" and "hurd". This got fixed in Cargo, we need the converse in Hadrian. Fixes #24180 - - - - - a79960fe by Alan Zimmerman at 2023-11-22T11:49:48-05:00 EPA: Tuple Present no longer has annotation The Present constructor for a Tuple argument will never have an exact print annotation. So make this impossible. - - - - - 121c9ab7 by David Binder at 2023-11-22T21:12:29-05:00 Unify the hpc testsuites The hpc testsuite was split between testsuite/tests/hpc and the submodule libraries/hpc/test. This commit unifies the two testsuites in the GHC repository in the directory testsuite/tests/hpc. - - - - - d2733a05 by Alan Zimmerman at 2023-11-22T21:13:05-05:00 EPA: empty tup_tail has noAnn In Parser.y, the tup_tail rule had the following option | {- empty -} %shift { return [Left noAnn] } Once this works through PostProcess.hs, it means we add an extra Missing constructor if the last item was a comma. Change the annotation type to a Bool to indicate this, and use the EpAnn Anchor for the print location for the others. - - - - - fa576eb8 by Andreas Klebinger at 2023-11-24T08:29:13-05:00 Fix FMA primops generating broken assembly on x86. `genFMA3Code` assumed that we had to take extra precations to avoid overwriting the result of `getNonClobberedReg`. One of these special cases caused a bug resulting in broken assembly. I believe we don't need to hadle these cases specially at all, which means this MR simply deletes the special cases to fix the bug. Fixes #24160 - - - - - 34d86315 by Alan Zimmerman at 2023-11-24T08:29:49-05:00 EPA: Remove parenthesizeHsType This is called from PostProcess.hs, and adds spurious parens. With the looser version of exact printing we had before we could tolerate this, as they would be swallowed by the original at the same place. But with the next change (remove EpAnnNotUsed) they result in duplicates in the output. For Darwin build: Metric Increase: MultiLayerModulesTH_OneShot - - - - - 3ede659d by Vladislav Zavialov at 2023-11-26T06:43:32-05:00 Add name for -Wdeprecated-type-abstractions (#24154) This warning had no name or flag and was triggered unconditionally. Now it is part of -Wcompat. - - - - - 7902ebf8 by Alan Zimmerman at 2023-11-26T06:44:08-05:00 EPA: Remove EpAnnNotUsed We no longer need the EpAnnNotUsed constructor for EpAnn, as we can represent an unused annotation with an anchor having a EpaDelta of zero, and empty comments and annotations. This simplifies code handling annotations considerably. Updates haddock submodule Metric Increase: parsing001 - - - - - 471b2672 by Mario Blažević at 2023-11-26T06:44:48-05:00 Bumped the upper bound of text to <2.2 - - - - - d1bf25c7 by Vladislav Zavialov at 2023-11-26T11:45:49-05:00 Term variable capture (#23740) This patch changes type variable lookup rules (lookupTypeOccRn) and implicit quantification rules (filterInScope) so that variables bound in the term namespace can be captured at the type level {-# LANGUAGE RequiredTypeArguments #-} f1 x = g1 @x -- `x` used in a type application f2 x = g2 (undefined :: x) -- `x` used in a type annotation f3 x = g3 (type x) -- `x` used in an embedded type f4 x = ... where g4 :: x -> x -- `x` used in a type signature g4 = ... This change alone does not allow us to accept examples shown above, but at least it gets them past the renamer. - - - - - da863d15 by Vladislav Zavialov at 2023-11-26T11:46:26-05:00 Update Note [hsScopedTvs and visible foralls] The Note was written before GHC gained support for visible forall in types of terms. Rewrite a few sentences and use a better example. - - - - - b5213542 by Matthew Pickering at 2023-11-27T12:53:59-05:00 testsuite: Add mechanism to collect generic metrics * Generalise the metric logic by adding an additional field which allows you to specify how to query for the actual value. Previously the method of querying the baseline value was abstracted (but always set to the same thing). * This requires rejigging how the stat collection works slightly but now it's more uniform and hopefully simpler. * Introduce some new "generic" helper functions for writing generic stats tests. - collect_size ( deviation, path ) Record the size of the file as a metric - stat_from_file ( metric, deviation, path ) Read a value from the given path, and store that as a metric - collect_generic_stat ( metric, deviation, get_stat) Provide your own `get_stat` function, `lambda way: <Int>`, which can be used to establish the current value of the metric. - collect_generic_stats ( metric_info ): Like collect_generic_stat but provide the whole dictionary of metric definitions. { metric: { deviation: <Int> current: lambda way: <Int> } } * Introduce two new "size" metrics for keeping track of build products. - `size_hello_obj` - The size of `hello.o` from compiling hello.hs - `libdir` - The total size of the `libdir` folder. * Track the number of modules in the AST tests - CountDepsAst - CountDepsParser This lays the infrastructure for #24191 #22256 #17129 - - - - - 7d9a2e44 by ARATA Mizuki at 2023-11-27T12:54:39-05:00 x86: Don't require -mavx2 when using 256-bit floating-point SIMD primitives Fixes #24222 - - - - - 4e5ff6a4 by Alan Zimmerman at 2023-11-27T12:55:15-05:00 EPA: Remove SrcSpanAnn Now that we only have a single constructor for EpAnn, And it uses a SrcSpan for its location, we can do away with SrcSpanAnn completely. It only existed to wrap the original SrcSpan in a location, and provide a place for the exact print annotation. For darwin only: Metric Increase: MultiLayerModulesTH_OneShot Updates haddock submodule - - - - - e05bca39 by Krzysztof Gogolewski at 2023-11-28T08:00:55-05:00 testsuite: don't initialize testdir to '.' The test directory is removed during cleanup, if there's an interrupt that could remove the entire repository. Fixes #24219 - - - - - af881674 by Alan Zimmerman at 2023-11-28T08:01:30-05:00 EPA: Clean up mkScope in Ast.hs Now that we have HasLoc we can get rid of all the custom variants of mkScope For deb10-numa Metric Increase: libdir - - - - - 292983c8 by Ben Gamari at 2023-11-28T22:44:28-05:00 distrib: Rediscover otool and install_name_tool on Darwin In the bindist configure script we must rediscover the `otool` and `install_name_tool`s since they may be different from the build environment. Fixes #24211. - - - - - dfe1c354 by Stefan Schulze Frielinghaus at 2023-11-28T22:45:04-05:00 llvmGen: Align objects in the data section Objects in the data section may be referenced via tagged pointers. Thus, align those objects to a 4- or 8-byte boundary for 32- or 64-bit platforms, respectively. Note, this may need to be reconsidered if objects with a greater natural alignment requirement are emitted as e.g. 128-bit atomics. Fixes #24163. - - - - - f6c486c3 by Matthew Pickering at 2023-11-29T11:08:13-05:00 metrics: Widen libdir and size_hello_obj acceptance window af8816740d9b8759be1a22af8adcb5f13edeb61d shows that the libdir size can fluctuate quite significantly even when the change is quite small. Therefore we widen the acceptance window to 10%. - - - - - 99a6a49c by Alan Zimmerman at 2023-11-29T11:08:49-05:00 EPA: Clean up TC Monad Utils We no longer need the alternative variant of addLocM (addLocMA) nor wrapLocAM, wrapLocSndMA. aarch64-darwin Metric Increase: MultiLayerModulesTH_OneShot deb10-numa-slow Metric Decrease: libdir - - - - - 94fb8d47 by Alan Zimmerman at 2023-11-29T18:10:26+00:00 Match GHC, No comments in EpaDelta for comments - - - - - cbc03fa0 by Sebastian Graf at 2023-11-30T12:37:21-05:00 perf tests: Move comments into new `Note [Sensitivity to unique increment]` (#19414) And additionally to T12545, link from T8095, T13386 to this new Note. - - - - - c7623b22 by Alan Zimmerman at 2023-11-30T12:37:56-05:00 EPA: EpaDelta for comment has no comments EpaLocation is used to position things. It has two constructors, EpaSpan holding a SrcSpan, and EpaDelta with a delta position and a possible list of comments. The comment list is needed because the location in EpaDelta has no absolute information to decide which comments should be emitted before them when printing. But it is also used for specifying the position of a comment. To prevent the absurdity of a comment position having a list of comments in it, we make EpaLocation parameterisable, using comments for the normal case and a constant for within comments. Updates haddock submodule. aarch64-darwin Metric Decrease: MultiLayerModulesTH_OneShot - - - - - bd8acc0c by Krzysztof Gogolewski at 2023-11-30T12:38:32-05:00 Kind-check body of a required forall We now require that in 'forall a -> ty', ty has kind TYPE r for some r. Fixes #24176 - - - - - 010fb784 by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Remove incorrect haddock link quotes in code block - - - - - cda9c12d by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Remove cycle from group haddock example - - - - - 495265b9 by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Use repl haddock syntax in group docs - - - - - d134d1de by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Use list [] notation in group haddock - - - - - dfcf629c by Owen Shepherd at 2023-12-03T00:10:10-05:00 docs(NonEmpty/group): Specify final property of group function in haddock - - - - - cad3b734 by Owen Shepherd at 2023-12-03T00:10:10-05:00 fix: Add missing property of List.group - - - - - bad37656 by Matthew Pickering at 2023-12-03T00:10:46-05:00 testsuite: Fix T21097b test with make 4.1 (deb9) cee81370cd6ef256f66035e3116878d4cb82e28b recently added a test which failed on deb9 because the version of make was emitting the recipe failure to stdout rather than stderr. One way to fix this is to be more precise in the test about which part of the output we care about inspecting. - - - - - 5efdf421 by Matthew Pickering at 2023-12-03T00:11:21-05:00 testsuite: Track size of libdir in bytes For consistency it's better if we track all size metrics in bytes. Metric Increase: libdir - - - - - f5eb0f29 by Matthew Pickering at 2023-12-03T00:11:22-05:00 testsuite: Remove rogue trace in testsuite I accidentally left a trace in the generics metric patch. - - - - - d5610737 by Claudio Bley at 2023-12-06T16:13:33-05:00 Only exit ghci in -e mode when :add command fails Previously, when running `ghci -e ':add Sample.hs'` the process would exit with exit code 1 if the file exists and could be loaded. Fixes #24115 - - - - - 0f0c53a5 by Vladislav Zavialov at 2023-12-06T16:14:09-05:00 T2T in Patterns (#23739) This patch implements the T2T (term-to-type) transformation in patterns. Patterns that are checked against a visible forall can now be written without the `type` keyword: \(type t) (x :: t) -> ... -- old \t (x :: t) -> ... -- new The `t` binder is parsed and renamed as a term pattern (Pat), but then undergoes a conversion to a type pattern (HsTyPat). See the new function pat_to_type_pat in compiler/GHC/Tc/Gen/Pat.hs - - - - - 10a1a6c6 by Sebastian Graf at 2023-12-06T16:14:45-05:00 Pmc: Fix SrcLoc and warning for incomplete irrefutable pats (#24234) Before, the source location would point at the surrounding function definition, causing the confusion in #24234. I also took the opportunity to introduce a new `LazyPatCtx :: HsMatchContext _` to make the warning message say "irrefutable pattern" instead of "pattern binding". - - - - - 36b9a38c by Matthew Pickering at 2023-12-06T16:15:21-05:00 libraries: Bump filepath to 1.4.200.1 and unix to 2.8.4.0 Updates filepath submodule Updates unix submodule Fixes #24240 - - - - - 91ff0971 by Matthew Pickering at 2023-12-06T16:15:21-05:00 Submodule linter: Allow references to tags We modify the submodule linter so that if the bumped commit is a specific tag then the commit is accepted. Fixes #24241 - - - - - 86f652dc by Zubin Duggal at 2023-12-06T16:15:21-05:00 hadrian: set -Wno-deprecations for directory and Win32 The filepath bump to 1.4.200.1 introduces a deprecation warning. See https://gitlab.haskell.org/ghc/ghc/-/issues/24240 https://github.com/haskell/filepath/pull/206 - - - - - 7ac6006e by Sylvain Henry at 2023-12-06T16:16:02-05:00 Zap OccInfo on case binders during StgCse #14895 #24233 StgCse can revive dead binders: case foo of dead { Foo x y -> Foo x y; ... } ===> case foo of dead { Foo x y -> dead; ... } -- dead is no longer dead So we must zap occurrence information on case binders. Fix #14895 and #24233 - - - - - 57c391c4 by Sebastian Graf at 2023-12-06T16:16:37-05:00 Cpr: Turn an assertion into a check to deal with some dead code (#23862) See the new `Note [Dead code may contain type confusions]`. Fixes #23862. - - - - - c1c8abf8 by Zubin Duggal at 2023-12-08T02:25:07-05:00 testsuite: add test for #23944 - - - - - 6329d308 by Zubin Duggal at 2023-12-08T02:25:07-05:00 driver: Only run a dynamic-too pipeline if object files are going to be generated Otherwise we run into a panic in hscMaybeWriteIface: "Unexpected DT_Dyn state when writing simple interface" when dynamic-too is enabled We could remove the panic and just write the interface even if the state is `DT_Dyn`, but it seems pointless to run the pipeline twice when `hscMaybeWriteIface` is already designed to write both `hi` and `dyn_hi` files if dynamic-too is enabled. Fixes #23944. - - - - - 28811f88 by Simon Peyton Jones at 2023-12-08T05:47:18-05:00 Improve duplicate elimination in SpecConstr This partially fixes #24229. See the new Note [Pattern duplicate elimination] in SpecConstr - - - - - fec7894f by Simon Peyton Jones at 2023-12-08T05:47:18-05:00 Make SpecConstr deal with casts better This patch does two things, to fix #23209: * It improves SpecConstr so that it no longer quantifies over coercion variables. See Note [SpecConstr and casts] * It improves the rule matcher to deal nicely with the case where the rule does not quantify over coercion variables, but the the template has a cast in it. See Note [Casts in the template] - - - - - 8db8d2fd by Zubin Duggal at 2023-12-08T05:47:54-05:00 driver: Don't lose track of nodes when we fail to resolve cycles The nodes that take part in a cycle should include both hs-boot and hs files, but when we fail to resolve a cycle, we were only counting the nodes from the graph without boot files. Fixes #24196 - - - - - c5b4efd3 by Zubin Duggal at 2023-12-08T05:48:30-05:00 testsuite: Skip MultiLayerModulesTH_OneShot on darwin See #24177 - - - - - fae472a9 by Wendao Lee at 2023-12-08T05:49:12-05:00 docs(Data.Char):Add more detailed descriptions for some functions Related changed function's docs: -GHC.Unicode.isAlpha -GHC.Unicode.isPrint -GHC.Unicode.isAlphaNum Add more details for what the function will return. Co-authored-by: Bodigrim <andrew.lelechenko at gmail.com> - - - - - ca7510e4 by Malik Ammar Faisal at 2023-12-08T05:49:55-05:00 Fix float parsing in GHC Cmm Lexer Add test case for bug #24224 - - - - - d8baa1bd by Simon Peyton Jones at 2023-12-08T15:40:37+00:00 Take care when simplifying unfoldings This MR fixes a very subtle bug exposed by #24242. See Note [Environment for simplLetUnfolding]. I also updated a bunch of Notes on shadowing - - - - - 03ca551d by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Comments only in FloatIn Relevant to #3458 - - - - - 50c78779 by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Comments only in SpecConstr - - - - - 9431e195 by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Add test for #22238 - - - - - d9e4c597 by Vladislav Zavialov at 2023-12-11T04:19:34-05:00 Make forall a keyword (#23719) Before this change, GHC used to accept `forall` as a term-level identifier: -- from constraints-0.13 forall :: forall p. (forall a. Dict (p a)) -> Dict (Forall p) forall d = ... Now it is a parse error. The -Wforall-identifier warning has served its purpose and is now a deprecated no-op. - - - - - 58d56644 by Zubin Duggal at 2023-12-11T04:20:10-05:00 driver: Ensure we actually clear the interactive context before reloading Previously we called discardIC, but immediately after set the session back to an old HscEnv that still contained the IC Partially addresses #24107 Fixes #23405 - - - - - 8e5745a0 by Zubin Duggal at 2023-12-11T04:20:10-05:00 driver: Ensure we force the lookup of old build artifacts before returning the build plan This prevents us from retaining all previous build artifacts in memory until a recompile finishes, instead only retaining the exact artifacts we need. Fixes #24118 - - - - - 105c370c by Zubin Duggal at 2023-12-11T04:20:10-05:00 testsuite: add test for #24118 and #24107 MultiLayerModulesDefsGhci was not able to catch the leak because it uses :l which discards the previous environment. Using :r catches both of these leaks - - - - - e822ff88 by Zubin Duggal at 2023-12-11T04:20:10-05:00 compiler: Add some strictness annotations to ImportSpec and related constructors This prevents us from retaining entire HscEnvs. Force these ImportSpecs when forcing the GlobalRdrEltX Adds an NFData instance for Bag Fixes #24107 - - - - - 522c12a4 by Zubin Duggal at 2023-12-11T04:20:10-05:00 compiler: Force IfGlobalRdrEnv in NFData instance. - - - - - 188b280d by Arnaud Spiwack at 2023-12-11T15:33:31+01:00 LinearTypes => MonoLocalBinds - - - - - 8e0446df by Arnaud Spiwack at 2023-12-11T15:44:28+01:00 Linear let and where bindings For expediency, the initial implementation of linear types in GHC made it so that let and where binders would always be considered unrestricted. This was rather unpleasant, and probably a big obstacle to adoption. At any rate, this was not how the proposal was designed. This patch fixes this infelicity. It was surprisingly difficult to build, which explains, in part, why it took so long to materialise. As of this patch, let or where bindings marked with %1 will be linear (respectively %p for an arbitrary multiplicity p). Unmarked let will infer their multiplicity. Here is a prototypical example of program that used to be rejected and is accepted with this patch: ```haskell f :: A %1 -> B g :: B %1 -> C h :: A %1 -> C h x = g y where y = f x ``` Exceptions: - Recursive let are unrestricted, as there isn't a clear semantics of what a linear recursive binding would be. - Destructive lets with lazy bindings are unrestricted, as their desugaring isn't linear (see also #23461). - (Strict) destructive lets with inferred polymorphic type are unrestricted. Because the desugaring isn't linear (See #18461 down-thread). Closes #18461 and #18739 Co-authored-by: @jackohughes - - - - - effa7e2d by Matthew Craven at 2023-12-12T04:37:20-05:00 Introduce `dataToTagSmall#` primop (closes #21710) ...and use it to generate slightly better code when dataToTag# is used at a "small data type" where there is no need to mess with "is_too_big_tag" or potentially look at an info table. Metric Decrease: T18304 - - - - - 35c7aef6 by Matthew Craven at 2023-12-12T04:37:20-05:00 Fix formatting of Note [alg-alt heap check] - - - - - 7397c784 by Oleg Grenrus at 2023-12-12T04:37:56-05:00 Allow untyped brackets in typed splices and vice versa. Resolves #24190 Apparently the check was essentially always (as far as I can trace back: d0d47ba76f8f0501cf3c4966bc83966ab38cac27), and while it does catch some mismatches, the type-checker will catch them too. OTOH, it prevents writing completely reasonable programs. - - - - - 32d208e1 by Vladislav Zavialov at 2023-12-12T20:41:36+03:00 EPA: Match changes to LHsToken removal - - - - - a3ee3b99 by Moritz Angermann at 2023-12-12T19:50:58-05:00 Drop hard Xcode dependency XCODE_VERSION calls out to `xcodebuild`, which is only available when having `Xcode` installed. The CommandLineTools are not sufficient. To install Xcode, you must have an apple id to download the Xcode.xip from apple. We do not use xcodebuild anywhere in our build explicilty. At best it appears to be a proxy for checking the linker or the compiler. These should rather be done with ``` xcrun ld -version ``` or similar, and not by proxy through Xcode. The CLR should be sufficient for building software on macOS. - - - - - 1c9496e0 by Vladislav Zavialov at 2023-12-12T19:51:34-05:00 docs: update information on RequiredTypeArguments Update the User's Guide and Release Notes to account for the recent progress in the implementation of RequiredTypeArguments. - - - - - d0b17576 by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Fix off-by-one in assertion Previously we failed to account for the NULL terminator `postString` asserted that there is enough room in the buffer for the string. - - - - - a10f9b9b by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Honor result of ensureRoomForVariableEvent is Previously we would keep plugging along, even if isn't enough room for the event. - - - - - 0e0f41c0 by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Avoid truncating event sizes Previously ensureRoomForVariableEvent would truncate the desired size to 16-bits, resulting in #24197. Fixes #24197. - - - - - 64e724c8 by Artin Ghasivand at 2023-12-13T06:34:20-05:00 Remove the "Derived Constraint" argument of TcPluginSolver, docs - - - - - fe6d97dd by Vladislav Zavialov at 2023-12-13T06:34:56-05:00 EPA: Move tokens into GhcPs extension fields (#23447) Summary of changes * Remove Language.Haskell.Syntax.Concrete * Move all tokens into GhcPs extension fields (LHsToken -> EpToken) * Create new TTG extension fields as needed * Drop the MultAnn wrapper Updates the haddock submodule. Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 8106e695 by Zubin Duggal at 2023-12-13T06:35:34-05:00 testsuite: use copy_files in T23405 This prevents the tree from being dirtied when the file is modified. - - - - - ed0e4099 by Bryan Richter at 2023-12-14T04:30:53-05:00 Document ghc package's PVP-noncompliance This changes nothing, it just makes the status quo explicit. - - - - - 8bef8d9f by Luite Stegeman at 2023-12-14T04:31:33-05:00 JS: Mark spurious CI failures js_fragile(24259) This marks the spurious test failures on the JS platform as js_fragile(24259), so we don't hold up merge requests while fixing the underlying issues. See #24259 - - - - - 1c79526a by Finley McIlwaine at 2023-12-15T12:24:40-08:00 Late plugins - - - - - 000c3302 by Finley McIlwaine at 2023-12-15T12:24:40-08:00 withTiming on LateCCs and late plugins - - - - - be4551ac by Finley McIlwaine at 2023-12-15T12:24:40-08:00 add test for late plugins - - - - - 7c29da9f by Finley McIlwaine at 2023-12-15T12:24:40-08:00 Document late plugins - - - - - 9a52ae46 by Ben Gamari at 2023-12-20T07:07:26-05:00 Fix thunk update ordering Previously we attempted to ensure soundness of concurrent thunk update by synchronizing on the access of the thunk's info table pointer field. This was believed to be sufficient since the indirectee (which may expose a closure allocated by another core) would not be examined until the info table pointer update is complete. However, it turns out that this can result in data races in the presence of multiple threads racing a update a single thunk. For instance, consider this interleaving under the old scheme: Thread A Thread B --------- --------- t=0 Enter t 1 Push update frame 2 Begin evaluation 4 Pause thread 5 t.indirectee=tso 6 Release t.info=BLACKHOLE 7 ... (e.g. GC) 8 Resume thread 9 Finish evaluation 10 Relaxed t.indirectee=x 11 Load t.info 12 Acquire fence 13 Inspect t.indirectee 14 Release t.info=BLACKHOLE Here Thread A enters thunk `t` but is soon paused, resulting in `t` being lazily blackholed at t=6. Then, at t=10 Thread A finishes evaluation and updates `t.indirectee` with a relaxed store. Meanwhile, Thread B enters the blackhole. Under the old scheme this would introduce an acquire-fence but this would only synchronize with Thread A at t=6. Consequently, the result of the evaluation, `x`, is not visible to Thread B, introducing a data race. We fix this by treating the `indirectee` field as we do all other mutable fields. This means we must always access this field with acquire-loads and release-stores. See #23185. - - - - - f4b53538 by Vladislav Zavialov at 2023-12-20T07:08:02-05:00 docs: Fix link to 051-ghc-base-libraries.rst The proposal is no longer available at the previous URL. - - - - - f7e21fab by Matthew Pickering at 2023-12-21T14:57:40+00:00 hadrian: Build all executables in bin/ folder In the end the bindist creation logic copies them all into the bin folder. There is no benefit to building a specific few binaries in the lib/bin folder anymore. This also removes the ad-hoc logic to copy the touchy and unlit executables from stage0 into stage1. It takes <1s to build so we might as well just build it. - - - - - 0038d052 by Zubin Duggal at 2023-12-22T23:28:00-05:00 testsuite: mark jspace as fragile on i386. This test has been flaky for some time and has been failing consistently on i386-linux since 8e0446df landed. See #24261 - - - - - dfd670a0 by Ben Bellick at 2023-12-24T10:10:31-05:00 Deprecate -ddump-json and introduce -fdiagnostics-as-json Addresses #19278 This commit deprecates the underspecified -ddump-json flag and introduces a newer, well-specified flag -fdiagnostics-as-json. Also included is a JSON schema as part of the documentation. The -ddump-json flag will be slated for removal shortly after this merge. - - - - - 609e6225 by Ben Bellick at 2023-12-24T10:10:31-05:00 Deprecate -ddump-json and introduce -fdiagnostics-as-json Addresses #19278 This commit deprecates the underspecified -ddump-json flag and introduces a newer, well-specified flag -fdiagnostics-as-json. Also included is a JSON schema as part of the documentation. The -ddump-json flag will be slated for removal shortly after this merge. - - - - - 865513b2 by Ömer Sinan Ağacan at 2023-12-24T10:11:13-05:00 Fix BNF in user manual 6.6.8.2: formal syntax for instance declarations - - - - - c247b6be by Zubin Duggal at 2023-12-25T16:01:23-05:00 docs: document permissibility of -XOverloadedLabels (#24249) Document the permissibility introduced by https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0170-unrestricted-overloadedlabels.rst - - - - - e5b7eb59 by Ömer Sinan Ağacan at 2023-12-25T16:02:03-05:00 Fix a code block syntax in user manual sec. 6.8.8.6 - - - - - 2db11c08 by Ben Gamari at 2023-12-29T15:35:48-05:00 genSym: Reimplement via CAS on 32-bit platforms Previously the remaining use of the C implementation on 32-bit platforms resulted in a subtle bug, #24261. This was due to the C object (which used the RTS's `atomic_inc64` macro) being compiled without `-threaded` yet later being used in a threaded compiler. Side-step this issue by using the pure Haskell `genSym` implementation on all platforms. This required implementing `fetchAddWord64Addr#` in terms of CAS on 64-bit platforms. - - - - - 19328a8c by Xiaoyan Ren at 2023-12-29T15:36:30-05:00 Do not color the diagnostic code in error messages (#24172) - - - - - 685b467c by Krzysztof Gogolewski at 2023-12-29T15:37:06-05:00 Enforce that bindings of implicit parameters are lifted Fixes #24298 - - - - - bc4d67b7 by Matthew Craven at 2023-12-31T06:15:42-05:00 StgToCmm: Detect some no-op case-continuations ...and generate no code for them. Fixes #24264. - - - - - 5b603139 by Krzysztof Gogolewski at 2023-12-31T06:16:18-05:00 Revert "testsuite: mark jspace as fragile on i386." This reverts commit 0038d052c8c80b4b430bb2aa1c66d5280be1aa95. The atomicity bug should be fixed by !11802. - - - - - d55216ad by Krzysztof Gogolewski at 2024-01-01T12:05:49-05:00 Refactor: store [[PrimRep]] rather than [Type] in STG StgConApp stored a list of types. This list was used exclusively during unarisation of unboxed sums (mkUbxSum). However, this is at a wrong level of abstraction: STG shouldn't be concerned with Haskell types, only PrimReps. Update the code to store a [[PrimRep]]. Also, there's no point in storing this list when we're not dealing with an unboxed sum. - - - - - 8b340bc7 by Ömer Sinan Ağacan at 2024-01-01T12:06:29-05:00 Kind signatures docs: mention that they're allowed in newtypes - - - - - 989bf8e5 by Zubin Duggal at 2024-01-03T20:08:47-05:00 ci: Ensure we use the correct bindist name for the test artifact when generating release ghcup metadata Fixes #24268 - - - - - 89299a89 by Krzysztof Gogolewski at 2024-01-03T20:09:23-05:00 Refactor: remove calls to typePrimRepArgs The function typePrimRepArgs is just a thin wrapper around typePrimRep, adding a VoidRep if the list is empty. However, in StgToByteCode, we were discarding that VoidRep anyway, so there's no point in calling it. - - - - - c7be0c68 by mmzk1526 at 2024-01-03T20:10:07-05:00 Use "-V" for alex version check for better backward compatibility Fixes #24302. In recent versions of alex, "-v" is used for "--verbose" instead of "-version". - - - - - 67dbcc0a by Krzysztof Gogolewski at 2024-01-05T02:07:18-05:00 Fix VoidRep handling in ghci debugger 'go' inside extractSubTerms was giving a bad result given a VoidRep, attempting to round towards the next multiple of 0. I don't understand much about the debugger but the code should be better than it was. Fixes #24306 - - - - - 90ea574e by Krzysztof Gogolewski at 2024-01-05T02:07:54-05:00 VoidRep-related refactor * In GHC.StgToByteCode, replace bcIdPrimId with idPrimRep, bcIdArgRep with idArgRep, atomPrimRep with stgArgRep1. All of them were duplicates. * In GHC.Stg.Unarise, we were converting a PrimRep to a Type and back to PrimRep. Remove the calls to primRepToType and typePrimRep1 which cancel out. * In GHC.STG.Lint, GHC.StgToCmm, GHC.Types.RepType we were filtering out VoidRep from the result of typePrimRep. But typePrimRep never returns VoidRep - remove the filtering. - - - - - eaf72479 by brian at 2024-01-06T23:03:09-05:00 Add unaligned Addr# primops Implements CLC proposal #154: https://github.com/haskell/core-libraries-committee/issues/154 * add unaligned addr primops * add tests * accept tests * add documentation * fix js primops * uncomment in access ops * use Word64 in tests * apply suggestions * remove extra file * move docs * remove random options * use setByteArray# primop * better naming * update base-exports test * add base-exports for other architectures - - - - - d471d445 by Krzysztof Gogolewski at 2024-01-06T23:03:47-05:00 Remove VoidRep from PrimRep, introduce PrimOrVoidRep This introduces data PrimOrVoidRep = VoidRep | NVRep PrimRep changes typePrimRep1 to return PrimOrVoidRep, and adds a new function typePrimRepU to be used when the argument is definitely non-void. Details in Note [VoidRep] in GHC.Types.RepType. Fixes #19520 - - - - - 48720a07 by Matthew Craven at 2024-01-08T18:57:36-05:00 Apply Note [Sensitivity to unique increment] to LargeRecord - - - - - 9e2e180f by Sebastian Graf at 2024-01-08T18:58:13-05:00 Debugging: Add diffUFM for convenient diffing between UniqFMs - - - - - 948f3e35 by Sebastian Graf at 2024-01-08T18:58:13-05:00 Rename Opt_D_dump_stranal to Opt_D_dump_dmdanal ... and Opt_D_dump_str_signatures to Opt_D_dump_dmd_signatures - - - - - 4e217e3e by Sebastian Graf at 2024-01-08T18:58:13-05:00 Deprecate -ddump-stranal and -ddump-str-signatures ... and suggest -ddump-dmdanal and -ddump-dmd-signatures instead - - - - - 6c613c90 by Sebastian Graf at 2024-01-08T18:58:13-05:00 Move testsuite/tests/stranal to testsuite/tests/dmdanal A separate commit so that the rename is obvious to Git(Lab) - - - - - c929f02b by Sebastian Graf at 2024-01-08T18:58:13-05:00 CoreSubst: Stricten `substBndr` and `cloneBndr` Doing so reduced allocations of `cloneBndr` by about 25%. ``` T9233(normal) ghc/alloc 672,488,656 663,083,216 -1.4% GOOD T9675(optasm) ghc/alloc 423,029,256 415,812,200 -1.7% geo. mean -0.1% minimum -1.7% maximum +0.1% ``` Metric Decrease: T9233 - - - - - e3ca78f3 by Krzysztof Gogolewski at 2024-01-10T17:35:59-05:00 Deprecate -Wsemigroup This warning was used to prepare for Semigroup becoming a superclass of Monoid, and for (<>) being exported from Prelude. This happened in GHC 8.4 in 8ae263ceb3566 and feac0a3bc69fd3. The leftover logic for (<>) has been removed in GHC 9.8, 4d29ecdfcc79. Now the warning does nothing at all and can be deprecated. - - - - - 08d14925 by amesgen at 2024-01-10T17:36:42-05:00 WASM metadata: use correct GHC version - - - - - 7a808419 by Xiaoyan Ren at 2024-01-10T17:37:24-05:00 Allow SCC declarations in TH (#24081) - - - - - 28827c51 by Xiaoyan Ren at 2024-01-10T17:37:24-05:00 Fix prettyprinting of SCC pragmas - - - - - ae9cc1a8 by Matthew Craven at 2024-01-10T17:38:01-05:00 Fix loopification in the presence of void arguments This also removes Note [Void arguments in self-recursive tail calls], which was just misleading. It's important to count void args both in the function's arity and at the call site. Fixes #24295. - - - - - b718b145 by Zubin Duggal at 2024-01-10T17:38:36-05:00 testsuite: Teach testsuite driver about c++ sources - - - - - 09cb57ad by Zubin Duggal at 2024-01-10T17:38:36-05:00 driver: Set -DPROFILING when compiling C++ sources with profiling Earlier, we used to pass all preprocessor flags to the c++ compiler. This meant that -DPROFILING was passed to the c++ compiler because it was a part of C++ flags However, this was incorrect and the behaviour was changed in 8ff3134ed4aa323b0199ad683f72165e51a59ab6. See #21291. But that commit exposed this bug where -DPROFILING was no longer being passed when compiling c++ sources. The fix is to explicitly include -DPROFILING in `opt_cxx` when profiling is enabled to ensure we pass the correct options for the way to both C and C++ compilers Fixes #24286 - - - - - 2cf9dd96 by Zubin Duggal at 2024-01-10T17:38:36-05:00 testsuite: rename objcpp -> objcxx To avoid confusion with C Pre Processsor - - - - - af6932d6 by Simon Peyton Jones at 2024-01-10T17:39:12-05:00 Make TYPE and CONSTRAINT not-apart Issue #24279 showed up a bug in the logic in GHC.Core.Unify.unify_ty which is supposed to make TYPE and CONSTRAINT be not-apart. Easily fixed. - - - - - 4a39b5ff by Zubin Duggal at 2024-01-10T17:39:48-05:00 ci: Fix typo in mk_ghcup_metadata.py There was a missing colon in the fix to #24268 in 989bf8e53c08eb22de716901b914b3607bc8dd08 - - - - - 13503451 by Zubin Duggal at 2024-01-10T17:40:24-05:00 release-ci: remove release-x86_64-linux-deb11-release+boot_nonmoving_gc job There is no reason to have this release build or distribute this variation. This configuration is for testing purposes only. - - - - - afca46a4 by Sebastian Graf at 2024-01-10T17:41:00-05:00 Parser: Add a Note detailing why we need happy's `error` to implement layout - - - - - eaf8a06d by Krzysztof Gogolewski at 2024-01-11T00:43:17+01:00 Turn -Wtype-equality-out-of-scope on by default Also remove -Wnoncanonical-{monoid,monad}-instances from -Wcompat, since they are enabled by default. Refresh wcompat-warnings/ test with new -Wcompat warnings. Part of #24267 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 42bee5aa by Sebastian Graf at 2024-01-12T21:16:21-05:00 Arity: Require called *exactly once* for eta exp with -fpedantic-bottoms (#24296) In #24296, we had a program in which we eta expanded away an error despite the presence of `-fpedantic-bottoms`. This was caused by turning called *at least once* lambdas into one-shot lambdas, while with `-fpedantic-bottoms` it is only sound to eta expand over lambdas that are called *exactly* once. An example can be found in `Note [Combining arity type with demand info]`. Fixes #24296. - - - - - 7e95f738 by Andreas Klebinger at 2024-01-12T21:16:57-05:00 Aarch64: Enable -mfma by default. Fixes #24311 - - - - - e43788d0 by Jason Shipman at 2024-01-14T12:47:38-05:00 Add more instances for Compose: Fractional, RealFrac, Floating, RealFloat CLC proposal #226 https://github.com/haskell/core-libraries-committee/issues/226 - - - - - ae6d8cd2 by Sebastian Graf at 2024-01-14T12:48:15-05:00 Pmc: COMPLETE pragmas associated with Family TyCons should apply to representation TyCons as well (#24326) Fixes #24326. - - - - - c5fc7304 by sheaf at 2024-01-15T14:15:29-05:00 Use lookupOccRn_maybe in TH.lookupName When looking up a value, we want to be able to find both variables and record fields. So we should not use the lookupSameOccRn_maybe function, as we can't know ahead of time which record field namespace a record field with the given textual name will belong to. Fixes #24293 - - - - - da908790 by Krzysztof Gogolewski at 2024-01-15T14:16:05-05:00 Make the build more strict on documentation errors * Detect undefined labels. This can be tested by adding :ref:`nonexistent` to a documentation rst file; attempting to build docs will fail. Fixed the undefined label in `9.8.1-notes.rst`. * Detect errors. While we have plenty of warnings, we can at least enforce that Sphinx does not report errors. Fixed the error in `required_type_arguments.rst`. Unrelated change: I have documented that the `-dlint` enables `-fcatch-nonexhaustive-cases`, as can be verified by checking `enableDLint`. - - - - - 5077416e by Javier Sagredo at 2024-01-16T15:40:06-05:00 Profiling: Adds an option to not start time profiling at startup Using the functionality provided by d89deeba47ce04a5198a71fa4cbc203fe2c90794, this patch creates a new rts flag `--no-automatic-time-samples` which disables the time profiling when starting a program. It is then expected that the user starts it whenever it is needed. Fixes #24337 - - - - - 5776008c by Matthew Pickering at 2024-01-16T15:40:42-05:00 eventlog: Fix off-by-one error in postIPE We were missing the extra_comma from the calculation of the size of the payload of postIPE. This was causing assertion failures when the event would overflow the buffer by one byte, as ensureRoomForVariable event would report there was enough space for `n` bytes but then we would write `n + 1` bytes into the buffer. Fixes #24287 - - - - - 66dc09b1 by Simon Peyton Jones at 2024-01-16T15:41:18-05:00 Improve SpecConstr (esp nofib/spectral/ansi) This MR makes three improvements to SpecConstr: see #24282 * It fixes an outright (and recently-introduced) bug in `betterPat`, which was wrongly forgetting to compare the lengths of the argument lists. * It enhances ConVal to inclue a boolean for work-free-ness, so that the envt can contain non-work-free constructor applications, so that we can do more: see Note [ConVal work-free-ness] * It rejigs `subsumePats` so that it doesn't reverse the list. This can make a difference because, when patterns overlap, we arbitrarily pick the first. There is no "right" way, but this retains the old pre-subsumePats behaviour, thereby "fixing" the regression in #24282. Nofib results +======================================== | spectral/ansi -21.14% | spectral/hartel/comp_lab_zift -0.12% | spectral/hartel/parstof +0.09% | spectral/last-piece -2.32% | spectral/multiplier +6.03% | spectral/para +0.60% | spectral/simple -0.26% +======================================== | geom mean -0.18% +---------------------------------------- The regression in `multiplier` is sad, but it simply replicates GHC's previous behaviour (e.g. GHC 9.6). - - - - - 65da79b3 by Matthew Pickering at 2024-01-16T15:41:54-05:00 hadrian: Reduce Cabal verbosity The comment claims that `simpleUserHooks` decrease verbosity, and it does, but only for the `postConf` phase. The other phases are too verbose with `-V`. At the moment > 5000 lines of the build log are devoted to output from `cabal copy`. So I take the simple approach and just decrease the verbosity level again. If the output of `postConf` is essential then it would be better to implement our own `UserHooks` which doesn't decrease the verbosity for `postConf`. Fixes #24338 - - - - - 16414d7d by Matthew Pickering at 2024-01-17T10:54:59-05:00 Stop retaining old ModGuts throughout subsequent simplifier phases Each phase of the simplifier typically rewrites the majority of ModGuts, so we want to be able to release the old ModGuts as soon as possible. `name_ppr_ctxt` lives throught the whole optimiser phase and it was retaining a reference to `ModGuts`, so we were failing to release the old `ModGuts` until the end of the phase (potentially doubling peak memory usage for that particular phase). This was discovered using eras profiling (#24332) Fixes #24328 - - - - - 7f0879e1 by Matthew Pickering at 2024-01-17T10:55:35-05:00 Update nofib submodule - - - - - 320454d3 by Cheng Shao at 2024-01-17T23:02:40+00:00 ci: bump ci-images for updated wasm image - - - - - 2eca52b4 by Cheng Shao at 2024-01-17T23:06:44+00:00 base: treat all FDs as "nonblocking" on wasm On posix platforms, when performing read/write on FDs, we check the nonblocking flag first. For FDs without this flag (e.g. stdout), we call fdReady() first, which in turn calls poll() to wait for I/O to be available on that FD. This is problematic for wasm32-wasi: although select()/poll() is supported via the poll_oneoff() wasi syscall, that syscall is rather heavyweight and runtime behavior differs in different wasi implementations. The issue is even worse when targeting browsers, given there's no satisfactory way to implement async I/O as a synchronous syscall, so existing JS polyfills for wasi often give up and simply return ENOSYS. Before we have a proper I/O manager that avoids poll_oneoff() for async I/O on wasm, this patch improves the status quo a lot by merely pretending all FDs are "nonblocking". Read/write on FDs will directly invoke read()/write(), which are much more reliably handled in existing wasi implementations, especially those in browsers. Fixes #23275 and the following test cases: T7773 isEOF001 openFile009 T4808 cgrun025 Approved by CLC proposal #234: https://github.com/haskell/core-libraries-committee/issues/234 - - - - - 83c6c710 by Andrew Lelechenko at 2024-01-18T05:21:49-05:00 base: clarify how to disable warnings about partiality of Data.List.{head,tail} - - - - - c4078f2f by Simon Peyton Jones at 2024-01-18T05:22:25-05:00 Fix four bug in handling of (forall cv. body_ty) These bugs are all described in #24335 It's not easy to provoke the bug, hence no test case. - - - - - 119586ea by Alexis King at 2024-01-19T00:08:00-05:00 Always refresh profiling CCSes after running pending initializers Fixes #24171. - - - - - 9718d970 by Oleg Grenrus at 2024-01-19T00:08:36-05:00 Set default-language: GHC2021 in ghc library Go through compiler/ sources, and remove all BangPatterns (and other GHC2021 enabled extensions in these files). - - - - - 3ef71669 by Matthew Pickering at 2024-01-19T21:55:16-05:00 testsuite: Remove unused have_library function Also remove the hence unused testsuite option `--test-package-db`. Fixes #24342 - - - - - 5b7fa20c by Jade at 2024-01-19T21:55:53-05:00 Fix Spelling in the compiler Tracking: #16591 - - - - - 09875f48 by Matthew Pickering at 2024-01-20T12:20:44-05:00 testsuite: Implement `isInTreeCompiler` in a more robust way Just a small refactoring to avoid redundantly specifying the same strings in two different places. - - - - - 0d12b987 by Jade at 2024-01-20T12:21:20-05:00 Change maintainer email from cvs-ghc at haskell.org to ghc-devs at haskell.org. Fixes #22142 - - - - - eebdd316 by Apoorv Ingle at 2024-01-23T13:49:12+00:00 Changes for haskell/haddock#18324 - - - - - 1fa1c00c by Jade at 2024-01-23T19:17:03-05:00 Enhance Documentation of functions exported by Data.Function This patch aims to improve the documentation of functions exported in Data.Function Tracking: #17929 Fixes: #10065 - - - - - ab47a43d by Jade at 2024-01-23T19:17:39-05:00 Improve documentation of hGetLine. - Add explanation for whether a newline is returned - Add examples Fixes #14804 - - - - - dd4af0e5 by Cheng Shao at 2024-01-23T19:18:17-05:00 Fix genapply for cross-compilation by nuking fragile CPP logic This commit fixes incorrectly built genapply when cross compiling (#24347) by nuking all fragile CPP logic in it from the orbit. All target-specific info are now read from DerivedConstants.h at runtime, see added note for details. Also removes a legacy Makefile and adds haskell language server support for genapply. - - - - - 0cda2b8b by Cheng Shao at 2024-01-23T19:18:17-05:00 rts: enable wasm32 register mapping The wasm backend didn't properly make use of all Cmm global registers due to #24347. Now that it is fixed, this patch re-enables full register mapping for wasm32, and we can now generate smaller & faster wasm modules that doesn't always spill arguments onto the stack. Fixes #22460 #24152. - - - - - 0325a6e5 by Greg Steuck at 2024-01-24T01:29:44-05:00 Avoid utf8 in primops.txt.pp comments They don't make it through readFile' without explicitly setting the encoding. See https://gitlab.haskell.org/ghc/ghc/-/issues/17755 - - - - - 1aaf0bd8 by David Binder at 2024-01-24T01:30:20-05:00 Bump hpc and hpc-bin submodule Bump hpc to 0.7.0.1 Bump hpc-bin to commit d1780eb2 - - - - - e693a4e8 by Ben Gamari at 2024-01-24T01:30:56-05:00 testsuite: Ignore stderr in T8089 Otherwise spurious "Killed: 9" messages to stderr may cause the test to fail. Fixes #24361. - - - - - a40f4ab2 by sheaf at 2024-01-24T14:04:33-05:00 Fix FMA instruction on LLVM We were emitting the wrong instructions for fused multiply-add operations on LLVM: - the instruction name is "llvm.fma.f32" or "llvm.fma.f64", not "fmadd" - LLVM does not support other instructions such as "fmsub"; instead we implement these by flipping signs of some arguments - the instruction is an LLVM intrinsic, which requires handling it like a normal function call instead of a machine instruction Fixes #24223 - - - - - 69abc786 by Andrei Borzenkov at 2024-01-24T14:05:09-05:00 Add changelog entry for renaming tuples from (,,...,,) to Tuple<n> (24291) - - - - - 0ac8f385 by Cheng Shao at 2024-01-25T00:27:48-05:00 compiler: remove unused GHC.Linker module The GHC.Linker module is empty and unused, other than as a hack for the make build system. We can remove it now that make is long gone; the note is moved to GHC.Linker.Loader instead. - - - - - 699da01b by Hécate Moonlight at 2024-01-25T00:28:27-05:00 Clarification for newtype constructors when using `coerce` - - - - - b2d8cd85 by Matt Walker at 2024-01-26T09:50:08-05:00 Fix #24308 Add tests for semicolon separated where clauses - - - - - 0da490a1 by Ben Gamari at 2024-01-26T17:34:41-05:00 hsc2hs: Bump submodule - - - - - 3f442fd2 by Ben Gamari at 2024-01-26T17:34:41-05:00 Bump containers submodule to 0.7 - - - - - 82a1c656 by Sebastian Nagel at 2024-01-29T02:32:40-05:00 base: with{Binary}File{Blocking} only annotates own exceptions Fixes #20886 This ensures that inner, unrelated exceptions are not misleadingly annotated with the opened file. - - - - - 9294a086 by Andreas Klebinger at 2024-01-29T02:33:15-05:00 Fix fma warning when using llvm on aarch64. On aarch64 fma is always on so the +fma flag doesn't exist for that target. Hence no need to try and pass +fma to llvm. Fixes #24379 - - - - - ced2e731 by sheaf at 2024-01-29T17:27:12-05:00 No shadowing warnings for NoFieldSelector fields This commit ensures we don't emit shadowing warnings when a user shadows a field defined with NoFieldSelectors. Fixes #24381 - - - - - 8eeadfad by Patrick at 2024-01-29T17:27:51-05:00 Fix bug wrong span of nested_doc_comment #24378 close #24378 1. Update the start position of span in `nested_doc_comment` correctly. and hence the spans of identifiers of haddoc can be computed correctly. 2. add test `HaddockSpanIssueT24378`. - - - - - a557580f by Alexey Radkov at 2024-01-30T19:41:52-05:00 Fix irrelevant dodgy-foreign-imports warning on import f-pointers by value A test *сс018* is attached (not sure about the naming convention though). Note that without the fix, the test fails with the *dodgy-foreign-imports* warning passed to stderr. The warning disappears after the fix. GHC shouldn't warn on imports of natural function pointers from C by value (which is feasible with CApiFFI), such as ```haskell foreign import capi "cc018.h value f" f :: FunPtr (Int -> IO ()) ``` where ```c void (*f)(int); ``` See a related real-world use-case [here](https://gitlab.com/daniel-casanueva/pcre-light/-/merge_requests/17). There, GHC warns on import of C function pointer `pcre_free`. - - - - - ca99efaf by Alexey Radkov at 2024-01-30T19:41:53-05:00 Rename test cc018 -> T24034 - - - - - 88c38dd5 by Ben Gamari at 2024-01-30T19:42:28-05:00 rts/TraverseHeap.c: Ensure that PosixSource.h is included first - - - - - ca2e919e by Simon Peyton Jones at 2024-01-31T09:29:45+00:00 Make decomposeRuleLhs a bit more clever This fixes #24370 by making decomposeRuleLhs undertand dictionary /functions/ as well as plain /dictionaries/ - - - - - 94ce031d by Teo Camarasu at 2024-02-01T05:49:49-05:00 doc: Add -Dn flag to user guide Resolves #24394 - - - - - 31553b11 by Ben Gamari at 2024-02-01T12:21:29-05:00 cmm: Introduce MO_RelaxedRead In hand-written Cmm it can sometimes be necessary to atomically load from memory deep within an expression (e.g. see the `CHECK_GC` macro). This MachOp provides a convenient way to do so without breaking the expression into multiple statements. - - - - - 0785cf81 by Ben Gamari at 2024-02-01T12:21:29-05:00 codeGen: Use relaxed accesses in ticky bumping - - - - - be423dda by Ben Gamari at 2024-02-01T12:21:29-05:00 base: use atomic write when updating timer manager - - - - - 8a310e35 by Ben Gamari at 2024-02-01T12:21:29-05:00 Use relaxed atomics to manipulate TSO status fields - - - - - d6809ee4 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Add necessary barriers when manipulating TSO owner - - - - - 39e3ac5d by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Use `switch` to branch on why_blocked This is a semantics-preserving refactoring. - - - - - 515eb33d by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix synchronization on thread blocking state We now use a release barrier whenever we update a thread's blocking state. This required widening StgTSO.why_blocked as AArch64 does not support atomic writes on 16-bit values. - - - - - eb38812e by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in threadPaused This only affects an assertion in the debug RTS and only needs relaxed ordering. - - - - - 26c48dd6 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in threadStatus# - - - - - 6af43ab4 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in Interpreter's preemption check - - - - - 9502ad3c by Ben Gamari at 2024-02-01T12:21:29-05:00 rts/Messages: Fix data race - - - - - 60802db5 by Ben Gamari at 2024-02-01T12:21:30-05:00 rts/Prof: Fix data race - - - - - ef8ccef5 by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Use relaxed ordering on dirty/clean info tables updates When changing the dirty/clean state of a mutable object we needn't have any particular ordering. - - - - - 76fe2b75 by Ben Gamari at 2024-02-01T12:21:30-05:00 codeGen: Use relaxed-read in closureInfoPtr - - - - - a6316eb4 by Ben Gamari at 2024-02-01T12:21:30-05:00 STM: Use acquire loads when possible Full sequential consistency is not needed here. - - - - - 6bddfd3d by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Use fence rather than redundant load Previously we would use an atomic load to ensure acquire ordering. However, we now have `ACQUIRE_FENCE_ON`, which allows us to express this more directly. - - - - - 55c65dbc by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Fix data races in profiling timer - - - - - 856b5e75 by Ben Gamari at 2024-02-01T12:21:30-05:00 Add Note [C11 memory model] - - - - - 6534da24 by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: move generic cmm optimization logic in NCG to a standalone module This commit moves GHC.CmmToAsm.cmmToCmm to a standalone module, GHC.Cmm.GenericOpt. The main motivation is enabling this logic to be run in the wasm backend NCG code, which is defined in other modules that's imported by GHC.CmmToAsm, causing a cyclic dependency issue. - - - - - 87e34888 by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: explicitly disable PIC in wasm32 NCG This commit explicitly disables the ncgPIC flag for the wasm32 target. The wasm backend doesn't support PIC for the time being. - - - - - c6ce242e by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: enable generic cmm optimizations in wasm backend NCG This commit enables the generic cmm optimizations in other NCGs to be run in the wasm backend as well, followed by a late cmm control-flow optimization pass. The added optimizations do catch some corner cases not handled by the pre-NCG cmm pipeline and are useful in generating smaller CFGs. - - - - - 151dda4e by Andrei Borzenkov at 2024-02-01T12:22:43-05:00 Namespacing for WARNING/DEPRECATED pragmas (#24396) New syntax for WARNING and DEPRECATED pragmas was added, namely namespace specifierss: namespace_spec ::= 'type' | 'data' | {- empty -} warning ::= warning_category namespace_spec namelist strings deprecation ::= namespace_spec namelist strings A new data type was introduced to represent these namespace specifiers: data NamespaceSpecifier = NoSpecifier | TypeNamespaceSpecifier (EpToken "type") | DataNamespaceSpecifier (EpToken "data") Extension field XWarning now contains this NamespaceSpecifier. lookupBindGroupOcc function was changed: it now takes NamespaceSpecifier and checks that the namespace of the found names matches the passed flag. With this change {-# WARNING data D "..." #-} pragma will only affect value namespace and {-# WARNING type D "..." #-} will only affect type namespace. The same logic is applicable to DEPRECATED pragmas. Finding duplicated warnings inside rnSrcWarnDecls now takes into consideration NamespaceSpecifier flag to allow warnings with the same names that refer to different namespaces. - - - - - 38c3afb6 by Bryan Richter at 2024-02-01T12:23:19-05:00 CI: Disable the test-cabal-reinstall job Fixes #24363 - - - - - 27020458 by Matthew Craven at 2024-02-03T01:53:26-05:00 Bump bytestring submodule to something closer to 0.12.1 ...mostly so that 16d6b7e835ffdcf9b894e79f933dd52348dedd0c (which reworks unaligned writes in Builder) and the stuff in https://github.com/haskell/bytestring/pull/631 can see wider testing. The less-terrible code for unaligned writes used in Builder on hosts not known to be ulaigned-friendly also takes less effort for GHC to compile, resulting in a metric decrease for T21839c on some platforms. The metric increase on T21839r is caused by the unrelated commit 750dac33465e7b59100698a330b44de7049a345c. It perhaps warrants further analysis and discussion (see #23822) but is not critical. Metric Decrease: T21839c Metric Increase: T21839r - - - - - cdddeb0f by Rodrigo Mesquita at 2024-02-03T01:54:02-05:00 Work around autotools setting C11 standard in CC/CXX In autoconf >=2.70, C11 is set by default for $CC and $CXX via the -std=...11 flag. In this patch, we split the "-std" flag out of the $CC and $CXX variables, which we traditionally assume to be just the executable name/path, and move it to $CFLAGS/$CXXFLAGS instead. Fixes #24324 - - - - - 5ff7cc26 by Apoorv Ingle at 2024-02-03T13:14:46-06:00 Expand `do` blocks right before typechecking using the `HsExpansion` philosophy. - Fixes #18324 #20020 #23147 #22788 #15598 #22086 #21206 - The change is detailed in - Note [Expanding HsDo with HsExpansion] in `GHC.Tc.Gen.Do` - Note [Doing HsExpansion in the Renamer vs Typechecker] in `GHC.Rename.Expr` expains the rational of doing expansions in type checker as opposed to in the renamer - Adds new datatypes: - `GHC.Hs.Expr.XXExprGhcRn`: new datatype makes this expansion work easier 1. Expansion bits for Expressions, Statements and Patterns in (`ExpandedThingRn`) 2. `PopErrCtxt` a special GhcRn Phase only artifcat to pop the previous error message in the error context stack - `GHC.Basic.Origin` now tracks the reason for expansion in case of Generated This is useful for type checking cf. `GHC.Tc.Gen.Expr.tcExpr` case for `HsLam` - Kills `HsExpansion` and `HsExpanded` as we have inlined them in `XXExprGhcRn` and `XXExprGhcTc` - Ensures warnings such as 1. Pattern match checks 2. Failable patterns 3. non-() return in body statements are preserved - Kill `HsMatchCtxt` in favor of `TcMatchAltChecker` - Testcases: * T18324 T20020 T23147 T22788 T15598 T22086 * T23147b (error message check), * DoubleMatch (match inside a match for pmc check) * pattern-fails (check pattern match with non-refutable pattern, eg. newtype) * Simple-rec (rec statements inside do statment) * T22788 (code snippet from #22788) * DoExpanion1 (Error messages for body statments) * DoExpansion2 (Error messages for bind statements) * DoExpansion3 (Error messages for let statements) Also repoint haddock to the right submodule so that the test (haddockHypsrcTest) pass Metric Increase 'compile_time/bytes allocated': T9020 The testcase is a pathalogical example of a `do`-block with many statements that do nothing. Given that we are expanding the statements into function binds, we will have to bear a (small) 2% cost upfront in the compiler to unroll the statements. - - - - - 0df8ce27 by Vladislav Zavialov at 2024-02-04T03:55:14-05:00 Reduce parser allocations in allocateCommentsP In the most common case, the comment queue is empty, so we can skip the work of processing it. This reduces allocations by about 10% in the parsing001 test. Metric Decrease: MultiLayerModulesRecomp parsing001 - - - - - ae856a82 by Matthew Pickering at 2024-02-05T12:22:39+00:00 ghc-internals fallout - - - - - cfd68290 by Simon Peyton Jones at 2024-02-05T17:58:33-05:00 Stop dropping a case whose binder is demanded This MR fixes #24251. See Note [Case-to-let for strictly-used binders] in GHC.Core.Opt.Simplify.Iteration, plus #24251, for lots of discussion. Final Nofib changes over 0.1%: +----------------------------------------- | imaginary/digits-of-e2 -2.16% | imaginary/rfib -0.15% | real/fluid -0.10% | real/gamteb -1.47% | real/gg -0.20% | real/maillist +0.19% | real/pic -0.23% | real/scs -0.43% | shootout/n-body -0.41% | shootout/spectral-norm -0.12% +======================================== | geom mean -0.05% Pleasingly, overall executable size is down by just over 1%. Compile times (in perf/compiler) wobble around a bit +/- 0.5%, but the geometric mean is -0.1% which seems good. - - - - - e4d137bb by Simon Peyton Jones at 2024-02-05T17:58:33-05:00 Add Note [Bangs in Integer functions] ...to document the bangs in the functions in GHC.Num.Integer - - - - - ce90f12f by Andrei Borzenkov at 2024-02-05T17:59:09-05:00 Hide WARNING/DEPRECATED namespacing under -XExplicitNamespaces (#24396) - - - - - e2ea933f by Simon Peyton Jones at 2024-02-06T10:12:04-05:00 Refactoring in preparation for lazy skolemisation * Make HsMatchContext and HsStmtContext be parameterised over the function name itself, rather than over the pass. See [mc_fun field of FunRhs] in Language.Haskell.Syntax.Expr - Replace types HsMatchContext GhcPs --> HsMatchContextPs HsMatchContext GhcRn --> HsMatchContextRn HsMatchContext GhcTc --> HsMatchContextRn (sic! not Tc) HsStmtContext GhcRn --> HsStmtContextRn - Kill off convertHsMatchCtxt * Split GHC.Tc.Type.BasicTypes.TcSigInfo so that TcCompleteSig (describing a complete user-supplied signature) is its own data type. - Split TcIdSigInfo(CompleteSig, PartialSig) into TcCompleteSig(CSig) TcPartialSig(PSig) - Use TcCompleteSig in tcPolyCheck, CheckGen - Rename types and data constructors: TcIdSigInfo --> TcIdSig TcPatSynInfo(TPSI) --> TcPatSynSig(PatSig) - Shuffle around helper functions: tcSigInfoName (moved to GHC.Tc.Types.BasicTypes) completeSigPolyId_maybe (moved to GHC.Tc.Types.BasicTypes) tcIdSigName (inlined and removed) tcIdSigLoc (introduced) - Rearrange the pattern match in chooseInferredQuantifiers * Rename functions and types: tcMatchesCase --> tcCaseMatches tcMatchesFun --> tcFunBindMatches tcMatchLambda --> tcLambdaMatches tcPats --> tcMatchPats matchActualFunTysRho --> matchActualFunTys matchActualFunTySigma --> matchActualFunTy * Add HasDebugCallStack constraints to: mkBigCoreVarTupTy, mkBigCoreTupTy, boxTy, mkPiTy, mkPiTys, splitAppTys, splitTyConAppNoView_maybe * Use `penv` from the outer context in the inner loop of GHC.Tc.Gen.Pat.tcMultiple * Move tcMkVisFunTy, tcMkInvisFunTy, tcMkScaledFunTys down the file, factor out and export tcMkScaledFunTy. * Move isPatSigCtxt down the file. * Formatting and comments Co-authored-by: Vladislav Zavialov <vlad.z.4096 at gmail.com> - - - - - f5d3e03c by Andrei Borzenkov at 2024-02-06T10:12:04-05:00 Lazy skolemisation for @a-binders (#17594) This patch is a preparation for @a-binders implementation. The main changes are: * Skolemisation is now prepared to deal with @binders. See Note [Skolemisation overview] in GHC.Tc.Utils.Unify. Most of the action is in - Utils.Unify.matchExpectedFunTys - Gen.Pat.tcMatchPats - Gen.Expr.tcPolyExprCheck - Gen.Binds.tcPolyCheck Some accompanying refactoring: * I found that funTyConAppTy_maybe was doing a lot of allocation, and rejigged userTypeError_maybe to avoid calling it. - - - - - 532993c8 by Zubin Duggal at 2024-02-06T10:12:41-05:00 driver: Really don't lose track of nodes when we fail to resolve cycles This fixes a bug in 8db8d2fd1c881032b1b360c032b6d9d072c11723, where we could lose track of acyclic components at the start of an unresolved cycle. We now ensure we never loose track of any of these components. As T24275 demonstrates, a "cyclic" SCC might not really be a true SCC: When viewed without boot files, we have a single SCC ``` [REC main:T24275B [main:T24275B {-# SOURCE #-}, main:T24275A {-# SOURCE #-}] main:T24275A [main:T24275A {-# SOURCE #-}]] ``` But with boot files this turns into ``` [NONREC main:T24275B {-# SOURCE #-} [], REC main:T24275B [main:T24275B {-# SOURCE #-}, main:T24275A {-# SOURCE #-}] main:T24275A {-# SOURCE #-} [main:T24275B], NONREC main:T24275A [main:T24275A {-# SOURCE #-}]] ``` Note that this is truly not an SCC, as no nodes are reachable from T24275B.hs-boot. However, we treat this entire group as a single "SCC" because it seems so when we analyse the graph without taking boot files into account. Indeed, we must return a single ResolvedCycle element in the BuildPlan for this as described in Note [Upsweep]. However, since after resolving this is not a true SCC anymore, `findCycle` fails to find a cycle and we have a sub-optimal error message as a result. To handle this, I extended `findCycle` to not assume its input is an SCC, and to try harder to find cycles in its input. Fixes #24275 - - - - - b35dd613 by Zubin Duggal at 2024-02-06T10:13:17-05:00 GHCi: Lookup breakpoint CCs in the correct module We need to look up breakpoint CCs in the module that the breakpoint points to, and not the current module. Fixes #24327 - - - - - b09e6958 by Zubin Duggal at 2024-02-06T10:13:17-05:00 testsuite: Add test for #24327 - - - - - 569b4c10 by doyougnu at 2024-02-07T03:06:26-05:00 ts: add compile_artifact, ignore_extension flag In b521354216f2821e00d75f088d74081d8b236810 the testsuite gained the capability to collect generic metrics. But this assumed that the test was not linking and producing artifacts and we only wanted to track object files, interface files, or build artifacts from the compiler build. However, some backends, such as the JS backend, produce artifacts when compiling, such as the jsexe directory which we want to track. This patch: - tweaks the testsuite to collect generic metrics on any build artifact in the test directory. - expands the exe_extension function to consider windows and adds the ignore_extension flag. - Modifies certain tests to add the ignore_extension flag. Tests such as heaprof002 expect a .ps file, but on windows without ignore_extensions the testsuite will look for foo.exe.ps. Hence the flag. - adds the size_hello_artifact test - - - - - 75a31379 by doyougnu at 2024-02-07T03:06:26-05:00 ts: add wasm_arch, heapprof002 wasm extension - - - - - c9731d6d by Rodrigo Mesquita at 2024-02-07T03:07:03-05:00 Synchronize bindist configure for #24324 In cdddeb0f1280b40cc194028bbaef36e127175c4c, we set up a workaround for #24324 in the in-tree configure script, but forgot to update the bindist configure script accordingly. This updates it. - - - - - d309f4e7 by Matthew Pickering at 2024-02-07T03:07:38-05:00 distrib/configure: Fix typo in CONF_GCC_LINKER_OPTS_STAGE2 variable Instead we were setting CONF_GCC_LINK_OPTS_STAGE2 which meant that we were missing passing `--target` when invoking the linker. Fixes #24414 - - - - - 77db84ab by Ben Gamari at 2024-02-08T00:35:22-05:00 llvmGen: Adapt to allow use of new pass manager. We now must use `-passes` in place of `-O<n>` due to #21936. Closes #21936. - - - - - 3c9ddf97 by Matthew Pickering at 2024-02-08T00:35:59-05:00 testsuite: Mark length001 as fragile on javascript Modifying the timeout multiplier is not a robust way to get this test to reliably fail. Therefore we mark it as fragile until/if javascript ever supports the stack limit. - - - - - 20b702b5 by Matthew Pickering at 2024-02-08T00:35:59-05:00 Javascript: Don't filter out rtsDeps list This logic appears to be incorrect as it would drop any dependency which was not in a direct dependency of the package being linked. In the ghc-internals split this started to cause errors because `ghc-internal` is not a direct dependency of most packages, and hence important symbols to keep which are hard coded into the js runtime were getting dropped. - - - - - 2df96366 by Ben Gamari at 2024-02-08T00:35:59-05:00 base: Cleanup whitespace in cbits - - - - - 44f6557a by Ben Gamari at 2024-02-08T00:35:59-05:00 Move `base` to `ghc-internal` Here we move a good deal of the implementation of `base` into a new package, `ghc-internal` such that it can be evolved independently from the user-visible interfaces of `base`. While we want to isolate implementation from interfaces, naturally, we would like to avoid turning `base` into a mere set of module re-exports. However, this is a non-trivial undertaking for a variety of reasons: * `base` contains numerous known-key and wired-in things, requiring corresponding changes in the compiler * `base` contains a significant amount of C code and corresponding autoconf logic, which is very fragile and difficult to break apart * `base` has numerous import cycles, which are currently dealt with via carefully balanced `hs-boot` files * We must not break existing users To accomplish this migration, I tried the following approaches: * [Split-GHC.Base]: Break apart the GHC.Base knot to allow incremental migration of modules into ghc-internal: this knot is simply too intertwined to be easily pulled apart, especially given the rather tricky import cycles that it contains) * [Move-Core]: Moving the "core" connected component of base (roughly 150 modules) into ghc-internal. While the Haskell side of this seems tractable, the C dependencies are very subtle to break apart. * [Move-Incrementally]: 1. Move all of base into ghc-internal 2. Examine the module structure and begin moving obvious modules (e.g. leaves of the import graph) back into base 3. Examine the modules remaining in ghc-internal, refactor as necessary to facilitate further moves 4. Go to (2) iterate until the cost/benefit of further moves is insufficient to justify continuing 5. Rename the modules moved into ghc-internal to ensure that they don't overlap with those in base 6. For each module moved into ghc-internal, add a shim module to base with the declarations which should be exposed and any requisite Haddocks (thus guaranteeing that base will be insulated from changes in the export lists of modules in ghc-internal Here I am using the [Move-Incrementally] approach, which is empirically the least painful of the unpleasant options above Bumps haddock submodule. Metric Decrease: haddock.Cabal haddock.base Metric Increase: MultiComponentModulesRecomp T16875 size_hello_artifact - - - - - e8fb2451 by Vladislav Zavialov at 2024-02-08T00:36:36-05:00 Haddock comments on infix constructors (#24221) Rewrite the `HasHaddock` instance for `ConDecl GhcPs` to account for infix constructors. This change fixes a Haddock regression (introduced in 19e80b9af252) that affected leading comments on infix data constructor declarations: -- | Docs for infix constructor | Int :* Bool The comment should be associated with the data constructor (:*), not with its left-hand side Int. - - - - - 9060d55b by Ben Gamari at 2024-02-08T00:37:13-05:00 Add os-string as a boot package Introduces `os-string` submodule. This will be necessary for `filepath-1.5`. - - - - - 9d65235a by Ben Gamari at 2024-02-08T00:37:13-05:00 gitignore: Ignore .hadrian_ghci_multi/ - - - - - d7ee12ea by Ben Gamari at 2024-02-08T00:37:13-05:00 hadrian: Set -this-package-name When constructing the GHC flags for a package Hadrian must take care to set `-this-package-name` in addition to `-this-unit-id`. This hasn't broken until now as we have not had any uses of qualified package imports. However, this will change with `filepath-1.5` and the corresponding `unix` bump, breaking `hadrian/multi-ghci`. - - - - - f2dffd2e by Ben Gamari at 2024-02-08T00:37:13-05:00 Bump filepath to 1.5.0.0 Required bumps of the following submodules: * `directory` * `filepath` * `haskeline` * `process` * `unix` * `hsc2hs` * `Win32` * `semaphore-compat` and the addition of `os-string` as a boot package. - - - - - ab533e71 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Use specific clang assembler when compiling with -fllvm There are situations where LLVM will produce assembly which older gcc toolchains can't handle. For example on Deb10, it seems that LLVM >= 13 produces assembly which the default gcc doesn't support. A more robust solution in the long term is to require a specific LLVM compatible assembler when using -fllvm. Fixes #16354 - - - - - c32b6426 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Update CI images with LLVM 15, ghc-9.6.4 and cabal-install-3.10.2.0 - - - - - 5fcd58be by Matthew Pickering at 2024-02-08T00:37:50-05:00 Update bootstrap plans for 9.4.8 and 9.6.4 - - - - - 707a32f5 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Add alpine 3_18 release job This is mainly experimental and future proofing to enable a smooth transition to newer alpine releases once 3_12 is too old. - - - - - c37931b3 by John Ericson at 2024-02-08T06:39:05-05:00 Generate LLVM min/max bound policy via Hadrian Per #23966, I want the top-level configure to only generate configuration data for Hadrian, not do any "real" tasks on its own. This is part of that effort --- one less file generated by it. (It is still done with a `.in` file, so in a future world non-Hadrian also can easily create this file.) Split modules: - GHC.CmmToLlvm.Config - GHC.CmmToLlvm.Version - GHC.CmmToLlvm.Version.Bounds - GHC.CmmToLlvm.Version.Type This also means we can get rid of the silly `unused.h` introduced in !6803 / 7dfcab2f4bcb7206174ea48857df1883d05e97a2 as temporary kludge. Part of #23966 - - - - - 9f987235 by Apoorv Ingle at 2024-02-08T06:39:42-05:00 Enable mdo statements to use HsExpansions Fixes: #24411 Added test T24411 for regression - - - - - f8429266 by Jade at 2024-02-08T14:56:50+01:00 Adjust test for ghc MR !10993 - - - - - 762b2120 by Jade at 2024-02-08T15:17:15+00:00 Improve Monad, Functor & Applicative docs This patch aims to improve the documentation of Functor, Applicative, Monad and related symbols. The main goal is to make it more consistent and make accessible. See also: !10979 (closed) and !10985 (closed) Ticket #17929 Updates haddock submodule - - - - - 151770ca by Josh Meredith at 2024-02-10T14:28:15-05:00 JavaScript codegen: Use GHC's tag inference where JS backend-specific evaluation inference was previously used (#24309) - - - - - 2e880635 by Zubin Duggal at 2024-02-10T14:28:51-05:00 ci: Allow release-hackage-lint to fail Otherwise it blocks the ghcup metadata pipeline from running. - - - - - b0293f78 by Matthew Pickering at 2024-02-10T14:29:28-05:00 rts: eras profiling mode The eras profiling mode is useful for tracking the life-time of closures. When a closure is written, the current era is recorded in the profiling header. This records the era in which the closure was created. * Enable with -he * User mode: Use functions ghc-experimental module GHC.Profiling.Eras to modify the era * Automatically: --automatic-era-increment, increases the user era on major collections * The first era is era 1 * -he<era> can be used with other profiling modes to select a specific era If you just want to record the era but not to perform heap profiling you can use `-he --no-automatic-heap-samples`. https://well-typed.com/blog/2024/01/ghc-eras-profiling/ Fixes #24332 - - - - - be674a2c by Jade at 2024-02-10T14:30:04-05:00 Adjust error message for trailing whitespace in as-pattern. Fixes #22524 - - - - - 53ef83f9 by doyougnu at 2024-02-10T14:30:47-05:00 gitlab: js: add codeowners Fixes: - #24409 Follow on from: - #21078 and MR !9133 - When we added the JS backend this was forgotten. This patch adds the rightful codeowners. - - - - - 8bbe12f2 by Matthew Pickering at 2024-02-10T14:31:23-05:00 Bump CI images so that alpine3_18 image includes clang15 The only changes here are that clang15 is now installed on the alpine-3_18 image. - - - - - df9fd9f7 by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: handle stored null StablePtr Some Haskell codes unsafely cast StablePtr into ptr to compare against NULL. E.g. in direct-sqlite: if castStablePtrToPtr aggStPtr /= nullPtr then where `aggStPtr` is read (`peek`) from zeroed memory initially. We fix this by giving these StablePtr the same representation as other null pointers. It's safe because StablePtr at offset 0 is unused (for this exact reason). - - - - - 55346ede by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: disable MergeObjsMode test This isn't implemented for JS backend objects. - - - - - aef587f6 by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: add support for linking C sources Support linking C sources with JS output of the JavaScript backend. See the added documentation in the users guide. The implementation simply extends the JS linker to use the objects (.o) that were already produced by the emcc compiler and which were filtered out previously. I've also added some options to control the link with C functions (see the documentation about pragmas). With this change I've successfully compiled the direct-sqlite package which embeds the sqlite.c database code. Some wrappers are still required (see the documentation about wrappers) but everything generic enough to be reused for other libraries have been integrated into rts/js/mem.js. - - - - - b71b392f by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: avoid EMCC logging spurious failure emcc would sometime output messages like: cache:INFO: generating system asset: symbol_lists/424b44514e43d789148e69e4e7d1c7fdc0350b79.json... (this will be cached in "/emsdk/upstream/emscripten/cache/symbol_lists/424b44514e43d789148e69e4e7d1c7fdc0350b79.json" for subsequent builds) cache:INFO: - ok Cf https://github.com/emscripten-core/emscripten/issues/18607 This breaks our tests matching the stderr output. We avoid this by setting EMCC_LOGGING=0 - - - - - ff2c0cc9 by Simon Peyton Jones at 2024-02-12T12:19:17-05:00 Remove a dead comment Just remove an out of date block of commented-out code, and tidy up the relevant Notes. See #8317. - - - - - bedb4f0d by Teo Camarasu at 2024-02-12T18:50:33-05:00 nonmoving: Add support for heap profiling Add support for heap profiling while using the nonmoving collector. We greatly simply the implementation by disabling concurrent collection for GCs when heap profiling is enabled. This entails that the marked objects on the nonmoving heap are exactly the live objects. Note that we match the behaviour for live bytes accounting by taking the size of objects on the nonmoving heap to be that of the segment's block rather than the object itself. Resolves #22221 - - - - - d0d5acb5 by Teo Camarasu at 2024-02-12T18:51:09-05:00 doc: Add requires prof annotation to options that require it Resolves #24421 - - - - - 6d1e2386 by Alan Zimmerman at 2024-02-13T22:00:28+03:00 EPA: Match changes to HsParTy and HsFunTy - - - - - 57bb8c92 by Cheng Shao at 2024-02-13T14:07:49-05:00 deriveConstants: add needed constants for wasm backend This commit adds needed constants to deriveConstants. They are used by RTS code in the wasm backend to support the JSFFI logic. - - - - - 615eb855 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms The pure Haskell implementation causes i386 regression in unrelated work that can be fixed by using C-based atomic increment, see added comment for details. - - - - - a9918891 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: allow JSFFI for wasm32 This commit allows the javascript calling convention to be used when the target platform is wasm32. - - - - - 8771a53b by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: allow boxed JSVal as a foreign type This commit allows the boxed JSVal type to be used as a foreign argument/result type. - - - - - 053c92b3 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: ensure ctors have the right priority on wasm32 This commit fixes the priorities of ctors generated by GHC codegen on wasm32, see the referred note for details. - - - - - b7942e0a by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: add JSFFI desugar logic for wasm32 This commit adds JSFFI desugar logic for the wasm backend. - - - - - 2c1dca76 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: add JavaScriptFFI to supported extension list on wasm32 This commit adds JavaScriptFFI as a supported extension when the target platform is wasm32. - - - - - 9ad0e2b4 by Cheng Shao at 2024-02-13T14:07:49-05:00 rts/ghc-internal: add JSFFI support logic for wasm32 This commit adds rts/ghc-internal logic to support the wasm backend's JSFFI functionality. - - - - - e9ebea66 by Cheng Shao at 2024-02-13T14:07:49-05:00 ghc-internal: fix threadDelay for wasm in browsers This commit fixes broken threadDelay for wasm when it runs in browsers, see added note for detailed explanation. - - - - - f85f3fdb by Cheng Shao at 2024-02-13T14:07:49-05:00 utils: add JSFFI utility code This commit adds JavaScript util code to utils to support the wasm backend's JSFFI functionality: - jsffi/post-link.mjs, a post-linker to process the linked wasm module and emit a small complement JavaScript ESM module to be used with it at runtime - jsffi/prelude.js, a tiny bit of prelude code as the JavaScript side of runtime logic - jsffi/test-runner.mjs, run the jsffi test cases Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - 77e91500 by Cheng Shao at 2024-02-13T14:07:49-05:00 hadrian: distribute jsbits needed for wasm backend's JSFFI support The post-linker.mjs/prelude.js files are now distributed in the bindist libdir, so when using the wasm backend's JSFFI feature, the user wouldn't need to fetch them from a ghc checkout manually. - - - - - c47ba1c3 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: add opts.target_wrapper This commit adds opts.target_wrapper which allows overriding the target wrapper on a per test case basis when testing a cross target. This is used when testing the wasm backend's JSFFI functionality; the rest of the cases are tested using wasmtime, though the jsffi cases are tested using the node.js based test runner. - - - - - 8e048675 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: T22774 should work for wasm JSFFI T22774 works since the wasm backend now supports the JSFFI feature. - - - - - 1d07f9a6 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: add JSFFI test cases for wasm backend This commit adds a few test cases for the wasm backend's JSFFI functionality, as well as a simple README to instruct future contributors to add new test cases. - - - - - b8997080 by Cheng Shao at 2024-02-13T14:07:49-05:00 docs: add documentation for wasm backend JSFFI This commit adds changelog and user facing documentation for the wasm backend's JSFFI feature. - - - - - ffeb000d by David Binder at 2024-02-13T14:08:30-05:00 Add tests from libraries/process/tests and libraries/Win32/tests to GHC These tests were previously part of the libraries, which themselves are submodules of the GHC repository. This commit moves the tests directly to the GHC repository. - - - - - 5a932cf2 by David Binder at 2024-02-13T14:08:30-05:00 Do not execute win32 tests on non-windows runners - - - - - 500d8cb8 by Jade at 2024-02-13T14:09:07-05:00 prevent GHCi (and runghc) from suggesting other symbols when not finding main Fixes: #23996 - - - - - b19ec331 by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: update xxHash to v0.8.2 - - - - - 4a97bdb8 by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: use XXH3_64bits hash on all 64-bit platforms This commit enables XXH3_64bits hash to be used on all 64-bit platforms. Previously it was only enabled on x86_64, so platforms like aarch64 silently falls back to using XXH32 which degrades the hashing function quality. - - - - - ee01de7d by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: define XXH_INLINE_ALL This commit cleans up how we include the xxhash.h header and only define XXH_INLINE_ALL, which is sufficient to inline the xxHash functions without symbol collision. - - - - - 0e01e1db by Alan Zimmerman at 2024-02-14T02:13:22-05:00 EPA: Move EpAnn out of extension points Leaving a few that are too tricky, maybe some other time. Also - remove some unneeded helpers from Parser.y - reduce allocations with strictness annotations Updates haddock submodule Metric Decrease: parsing001 - - - - - de589554 by Andreas Klebinger at 2024-02-14T02:13:59-05:00 Fix ffi callbacks with >6 args and non-64bit args. Check for ptr/int arguments rather than 64-bit width arguments when counting integer register arguments. The old approach broke when we stopped using exclusively W64-sized types to represent sub-word sized integers. Fixes #24314 - - - - - 9c588f19 by Fendor at 2024-02-14T11:05:36+01:00 Adapt to GHC giving better Name's for linking - - - - - 325b7613 by Ben Gamari at 2024-02-14T14:27:45-05:00 rts/EventLog: Place eliminate duplicate strlens Previously many of the `post*` implementations would first compute the length of the event's strings in order to determine the event length. Later we would then end up computing the length yet again in `postString`. Now we instead pass the string length to `postStringLen`, avoiding the repeated work. - - - - - 8aafa51c by Ben Gamari at 2024-02-14T14:27:46-05:00 rts/eventlog: Place upper bound on IPE string field lengths The strings in IPE events may be of unbounded length. Limit the lengths of these fields to 64k characters to ensure that we don't exceed the maximum event length. - - - - - 0e60d52c by Zubin Duggal at 2024-02-14T14:27:46-05:00 rts: drop unused postString function - - - - - d8d1333a by Cheng Shao at 2024-02-14T14:28:23-05:00 compiler/rts: fix wasm unreg regression This commit fixes two wasm unreg regressions caught by a nightly pipeline: - Unknown stg_scheduler_loopzh symbol when compiling scheduler.cmm - Invalid _hs_constructor(101) function name when handling ctor - - - - - 264a4fa9 by Owen Shepherd at 2024-02-15T09:41:06-05:00 feat: Add sortOn to Data.List.NonEmpty Adds `sortOn` to `Data.List.NonEmpty`, and adds comments describing when to use it, compared to `sortWith` or `sortBy . comparing`. The aim is to smooth out the API between `Data.List`, and `Data.List.NonEmpty`. This change has been discussed in the [clc issue](https://github.com/haskell/core-libraries-committee/issues/227). - - - - - b57200de by Fendor at 2024-02-15T09:41:47-05:00 Prefer RdrName over OccName for looking up locations in doc renaming step Looking up by OccName only does not take into account when functions are only imported in a qualified way. Fixes issue #24294 Bump haddock submodule to include regression test - - - - - 8ad02724 by Luite Stegeman at 2024-02-15T17:33:32-05:00 JS: add simple optimizer The simple optimizer reduces the size of the code generated by the JavaScript backend without the complexity and performance penalty of the optimizer in GHCJS. Also see #22736 Metric Decrease: libdir size_hello_artifact - - - - - 20769b36 by Matthew Pickering at 2024-02-15T17:34:07-05:00 base: Expose `--no-automatic-time-samples` in `GHC.RTS.Flags` API This patch builds on 5077416e12cf480fb2048928aa51fa4c8fc22cf1 and modifies the base API to reflect the new RTS flag. CLC proposal #243 - https://github.com/haskell/core-libraries-committee/issues/243 Fixes #24337 - - - - - 778e1db3 by Andrei Borzenkov at 2024-02-16T16:12:07+03:00 Namespace specifiers for fixity signatures - - - - - 08031ada by Teo Camarasu at 2024-02-16T13:37:00-05:00 base: export System.Mem.performBlockingMajorGC The corresponding C function was introduced in ba73a807edbb444c49e0cf21ab2ce89226a77f2e. As part of #22264. Resolves #24228 The CLC proposal was disccused at: https://github.com/haskell/core-libraries-committee/issues/230 Co-authored-by: Ben Gamari <bgamari.foss at gmail.com> - - - - - 1f534c2e by Florian Weimer at 2024-02-16T13:37:42-05:00 Fix C output for modern C initiative GCC 14 on aarch64 rejects the C code written by GHC with this kind of error: error: assignment to ‘ffi_arg’ {aka ‘long unsigned int’} from ‘HsPtr’ {aka ‘void *’} makes integer from pointer without a cast [-Wint-conversion] 68 | *(ffi_arg*)resp = cret; | ^ Add the correct cast. For more information on this see: https://fedoraproject.org/wiki/Changes/PortingToModernC Tested-by: Richard W.M. Jones <rjones at redhat.com> - - - - - 5d3f7862 by Matthew Craven at 2024-02-16T13:38:18-05:00 Bump bytestring submodule to 0.12.1.0 - - - - - 902ebcc2 by Ian-Woo Kim at 2024-02-17T06:01:01-05:00 Add missing BCO handling in scavenge_one. - - - - - 97d26206 by Sylvain Henry at 2024-02-17T06:01:44-05:00 Make cast between words and floats real primops (#24331) First step towards fixing #24331. Replace foreign prim imports with real primops. - - - - - a40e4781 by Sylvain Henry at 2024-02-17T06:01:44-05:00 Perf: add constant folding for bitcast between float and word (#24331) - - - - - 5fd2c00f by Sylvain Henry at 2024-02-17T06:01:44-05:00 Perf: replace stack checks with assertions in casting primops There are RESERVED_STACK_WORDS free words (currently 21) on the stack, so omit the checks. Suggested by Cheng Shao. - - - - - 401dfe7b by Sylvain Henry at 2024-02-17T06:01:44-05:00 Reexport primops from GHC.Float + add deprecation - - - - - 4ab48edb by Ben Gamari at 2024-02-17T06:02:21-05:00 rts/Hash: Don't iterate over chunks if we don't need to free data When freeing a `HashTable` there is no reason to walk over the hash list before freeing it if the user has not given us a `dataFreeFun`. Noticed while looking at #24410. - - - - - bd5a1f91 by Cheng Shao at 2024-02-17T06:03:00-05:00 compiler: add SEQ_CST fence support In addition to existing Acquire/Release fences, this commit adds SEQ_CST fence support to GHC, allowing Cmm code to explicitly emit a fence that enforces total memory ordering. The following logic is added: - The MO_SeqCstFence callish MachOp - The %prim fence_seq_cst() Cmm syntax and the SEQ_CST_FENCE macro in Cmm.h - MO_SeqCstFence lowering logic in every single GHC codegen backend - - - - - 2ce2a493 by Cheng Shao at 2024-02-17T06:03:38-05:00 testsuite: fix hs_try_putmvar002 for targets without pthread.h hs_try_putmvar002 includes pthread.h and doesn't work on targets without this header (e.g. wasm32). It doesn't need to include this header at all. This was previously unnoticed by wasm CI, though recent toolchain upgrade brought in upstream changes that completely removes pthread.h in the single-threaded wasm32-wasi sysroot, therefore we need to handle that change. - - - - - 1fb3974e by Cheng Shao at 2024-02-17T06:03:38-05:00 ci: bump ci-images to use updated wasm image This commit bumps our ci-images revision to use updated wasm image. - - - - - 56e3f097 by Andrew Lelechenko at 2024-02-17T06:04:13-05:00 Bump submodule text to 2.1.1 T17123 allocates less because of improvements to Data.Text.concat in 1a6a06a. Metric Decrease: T17123 - - - - - a7569495 by Cheng Shao at 2024-02-17T06:04:51-05:00 rts: remove redundant rCCCS initialization This commit removes the redundant logic of initializing each Capability's rCCCS to CCS_SYSTEM in initProfiling(). Before initProfiling() is called during RTS startup, each Capability's rCCCS has already been assigned CCS_SYSTEM when they're first initialized. - - - - - 7a0293cc by Ben Gamari at 2024-02-19T07:11:00-05:00 Drop dependence on `touch` This drops GHC's dependence on the `touch` program, instead implementing it within GHC. This eliminates an external dependency and means that we have one fewer program to keep track of in the `configure` script - - - - - 0dbd729e by Andrei Borzenkov at 2024-02-19T07:11:37-05:00 Parser, renamer, type checker for @a-binders (#17594) GHC Proposal 448 introduces binders for invisible type arguments (@a-binders) in various contexts. This patch implements @-binders in lambda patterns and function equations: {-# LANGUAGE TypeAbstractions #-} id1 :: a -> a id1 @t x = x :: t -- @t-binder on the LHS of a function equation higherRank :: (forall a. (Num a, Bounded a) => a -> a) -> (Int8, Int16) higherRank f = (f 42, f 42) ex :: (Int8, Int16) ex = higherRank (\ @a x -> maxBound @a - x ) -- @a-binder in a lambda pattern in an argument -- to a higher-order function Syntax ------ To represent those @-binders in the AST, the list of patterns in Match now uses ArgPat instead of Pat: data Match p body = Match { ... - m_pats :: [LPat p], + m_pats :: [LArgPat p], ... } + data ArgPat pass + = VisPat (XVisPat pass) (LPat pass) + | InvisPat (XInvisPat pass) (HsTyPat (NoGhcTc pass)) + | XArgPat !(XXArgPat pass) The VisPat constructor represents patterns for visible arguments, which include ordinary value-level arguments and required type arguments (neither is prefixed with a @), while InvisPat represents invisible type arguments (prefixed with a @). Parser ------ In the grammar (Parser.y), the lambda and lambda-cases productions of aexp non-terminal were updated to accept argpats instead of apats: aexp : ... - | '\\' apats '->' exp + | '\\' argpats '->' exp ... - | '\\' 'lcases' altslist(apats) + | '\\' 'lcases' altslist(argpats) ... + argpat : apat + | PREFIX_AT atype Function left-hand sides did not require any changes to the grammar, as they were already parsed with productions capable of parsing @-binders. Those binders were being rejected in post-processing (isFunLhs), and now we accept them. In Parser.PostProcess, patterns are constructed with the help of PatBuilder, which is used as an intermediate data structure when disambiguating between FunBind and PatBind. In this patch we define ArgPatBuilder to accompany PatBuilder. ArgPatBuilder is a short-lived data structure produced in isFunLhs and consumed in checkFunBind. Renamer ------- Renaming of @-binders builds upon prior work on type patterns, implemented in 2afbddb0f24, which guarantees proper scoping and shadowing behavior of bound type variables. This patch merely defines rnLArgPatsAndThen to process a mix of visible and invisible patterns: + rnLArgPatsAndThen :: NameMaker -> [LArgPat GhcPs] -> CpsRn [LArgPat GhcRn] + rnLArgPatsAndThen mk = mapM (wrapSrcSpanCps rnArgPatAndThen) where + rnArgPatAndThen (VisPat x p) = ... rnLPatAndThen ... + rnArgPatAndThen (InvisPat _ tp) = ... rnHsTyPat ... Common logic between rnArgPats and rnPats is factored out into the rn_pats_general helper. Type checker ------------ Type-checking of @-binders builds upon prior work on lazy skolemisation, implemented in f5d3e03c56f. This patch extends tcMatchPats to handle @-binders. Now it takes and returns a list of LArgPat rather than LPat: tcMatchPats :: ... - -> [LPat GhcRn] + -> [LArgPat GhcRn] ... - -> TcM ([LPat GhcTc], a) + -> TcM ([LArgPat GhcTc], a) Invisible binders in the Match are matched up with invisible (Specified) foralls in the type. This is done with a new clause in the `loop` worker of tcMatchPats: loop :: [LArgPat GhcRn] -> [ExpPatType] -> TcM ([LArgPat GhcTc], a) loop (L l apat : pats) (ExpForAllPatTy (Bndr tv vis) : pat_tys) ... -- NEW CLAUSE: | InvisPat _ tp <- apat, isSpecifiedForAllTyFlag vis = ... In addition to that, tcMatchPats no longer discards type patterns. This is done by filterOutErasedPats in the desugarer instead. x86_64-linux-deb10-validate+debug_info Metric Increase: MultiLayerModulesTH_OneShot - - - - - 486979b0 by Jade at 2024-02-19T07:12:13-05:00 Add specialized sconcat implementation for Data.Monoid.First and Data.Semigroup.First Approved CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/246 Fixes: #24346 - - - - - 17e309d2 by John Ericson at 2024-02-19T07:12:49-05:00 Fix reST in users guide It appears that aef587f65de642142c1dcba0335a301711aab951 wasn't valid syntax. - - - - - 35b0ad90 by Brandon Chinn at 2024-02-19T07:13:25-05:00 Fix searching for errors in sphinx build - - - - - 4696b966 by Cheng Shao at 2024-02-19T07:14:02-05:00 hadrian: fix wasm backend post linker script permissions The post-link.mjs script was incorrectly copied and installed as a regular data file without executable permission, this commit fixes it. - - - - - a6142e0c by Cheng Shao at 2024-02-19T07:14:40-05:00 testsuite: mark T23540 as fragile on i386 See #24449 for details. - - - - - 249caf0d by Matthew Craven at 2024-02-19T20:36:09-05:00 Add @since annotation to Data.Data.mkConstrTag - - - - - cdd939e7 by Jade at 2024-02-19T20:36:46-05:00 Enhance documentation of Data.Complex - - - - - d04f384f by Ben Gamari at 2024-02-21T04:59:23-05:00 hadrian/bindist: Ensure that phony rules are marked as such Otherwise make may not run the rule if file with the same name as the rule happens to exist. - - - - - efcbad2d by Ben Gamari at 2024-02-21T04:59:23-05:00 hadrian: Generate HSC2HS_EXTRAS variable in bindist installation We must generate the hsc2hs wrapper at bindist installation time since it must contain `--lflag` and `--cflag` arguments which depend upon the installation path. The solution here is to substitute these variables in the configure script (see mk/hsc2hs.in). This is then copied over a dummy wrapper in the install rules. Fixes #24050. - - - - - c540559c by Matthew Pickering at 2024-02-21T04:59:23-05:00 ci: Show --info for installed compiler - - - - - ab9281a2 by Matthew Pickering at 2024-02-21T04:59:23-05:00 configure: Correctly set --target flag for linker opts Previously we were trying to use the FP_CC_SUPPORTS_TARGET with 4 arguments, when it only takes 3 arguments. Instead we need to use the `FP_PROG_CC_LINKER_TARGET` function in order to set the linker flags. Actually fixes #24414 - - - - - 9460d504 by Rodrigo Mesquita at 2024-02-21T04:59:59-05:00 configure: Do not override existing linker flags in FP_LD_NO_FIXUP_CHAINS - - - - - 77629e76 by Andrei Borzenkov at 2024-02-21T05:00:35-05:00 Namespacing for fixity signatures (#14032) Namespace specifiers were added to syntax of fixity signatures: - sigdecl ::= infix prec ops | ... + sigdecl ::= infix prec namespace_spec ops | ... To preserve namespace during renaming MiniFixityEnv type now has separate FastStringEnv fields for names that should be on the term level and for name that should be on the type level. makeMiniFixityEnv function was changed to fill MiniFixityEnv in the right way: - signatures without namespace specifiers fill both fields - signatures with 'data' specifier fill data field only - signatures with 'type' specifier fill type field only Was added helper function lookupMiniFixityEnv that takes care about looking for a name in an appropriate namespace. Updates haddock submodule. Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 84357d11 by Teo Camarasu at 2024-02-21T05:01:11-05:00 rts: only collect live words in nonmoving census when non-concurrent This avoids segfaults when the mutator modifies closures as we examine them. Resolves #24393 - - - - - 9ca56dd3 by Ian-Woo Kim at 2024-02-21T05:01:53-05:00 mutex wrap in refreshProfilingCCSs - - - - - 1387966a by Cheng Shao at 2024-02-21T05:02:32-05:00 rts: remove unused HAVE_C11_ATOMICS macro This commit removes the unused HAVE_C11_ATOMICS macro. We used to have a few places that have fallback paths when HAVE_C11_ATOMICS is not defined, but that is completely redundant, since the FP_CC_SUPPORTS__ATOMICS configure check will fail when the C compiler doesn't support C11 style atomics. There are also many places (e.g. in unreg backend, SMP.h, library cbits, etc) where we unconditionally use C11 style atomics anyway which work in even CentOS 7 (gcc 4.8), the oldest distro we test in our CI, so there's no value in keeping HAVE_C11_ATOMICS. - - - - - 0f40d68f by Andreas Klebinger at 2024-02-21T05:03:09-05:00 RTS: -Ds - make sure incall is non-zero before dereferencing it. Fixes #24445 - - - - - e5886de5 by Ben Gamari at 2024-02-21T05:03:44-05:00 rts/AdjustorPool: Use ExecPage abstraction This is just a minor cleanup I found while reviewing the implementation. - - - - - 826c5b47 by Torsten Schmits at 2024-02-21T13:17:05+01:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 09941666 by Adam Gundry at 2024-02-21T13:53:12+00:00 Define GHC2024 language edition (#24320) See https://github.com/ghc-proposals/ghc-proposals/pull/613. Also fixes #24343 and improves the documentation of language editions. Co-authored-by: Joachim Breitner <mail at joachim-breitner.de> - - - - - 2cff14d5 by Ben Gamari at 2024-02-22T09:35:56-05:00 Bump bounds - - - - - f49376b3 by Ben Gamari at 2024-02-22T09:35:56-05:00 Allow `@since` annotations in export lists Here we extend Haddock to admit `@since` annotations in export lists. These can be attached to most export list items (although not subordinate lists). These annotations supercede the declaration's `@since` annotation in produced Haddocks. - - - - - b5aa93df by Ben Gamari at 2024-02-22T12:09:06-05:00 Allow package-qualified @since declarations - - - - - 8f5957f2 by Ben Gamari at 2024-02-22T13:55:19-05:00 Documentation changes from ghc-internal restructuring Previously many declarations (e.g. `Int`) were declared to have a "home" in `Prelude`. However, now Haddock instead chooses to put these in more specific homes (e.g. `Data.Int`). Given that the "home" decision is driven by heuristics and in general these changes seem quite reasonable I am accepting them: * `Int` moved from `Prelude` to `Data.Int` * `(~)` moved from `Prelude` to `Data.Type.Equality` * `Type` moved from `GHC.Types` to `Data.Kind` * `Maybe` moved from `Prelude` to `Data.Maybe` * `Bool` moved from `Prelude` to `Data.Bool` * `Ordering` moved from `Prelude` to `Data.Ord` As well, more identifiers are now hyperlinked; it's not immediately clear *why*, but it is an improvement nevertheless. - - - - - ec33fec3 by Ben Gamari at 2024-02-22T20:36:24-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 5121a4ed by Ben Gamari at 2024-02-23T06:40:55-05:00 Allow docstrings after exports Here we extend the parser and AST to preserve docstrings following export items. We then extend Haddock to parse `@since` annotations in such docstrings, allowing changes in export structure to be properly documented. Bumps haddock submodule. - - - - - 30cfd251 by Torsten Schmits at 2024-02-24T13:00:42-05:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 0eb2265d by Hécate Moonlight at 2024-02-24T16:02:16-05:00 Improve the synopsis and description of base - - - - - 2e36f5d2 by Jade at 2024-02-24T16:02:51-05:00 Error Messages: Properly align cyclic module error Fixes: #24476 - - - - - bbfb051c by Ben Gamari at 2024-02-24T19:10:23-05:00 Allow docstrings after exports Here we extend the parser and AST to preserve docstrings following export items. We then extend Haddock to parse `@since` annotations in such docstrings, allowing changes in export structure to be properly documented. - - - - - d8d6ad8c by Ben Gamari at 2024-02-24T19:10:23-05:00 ghc-internal: Move modules into GHC.Internal.* namespace Bumps haddock submodule due to testsuite output changes. - - - - - a82af7cd by Ben Gamari at 2024-02-24T19:10:23-05:00 ghc-internal: Rewrite `@since ` to `@since base-` These will be incrementally moved to the export sites in `base` where possible. - - - - - ca3836e1 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Migrate Haddock `not-home` pragmas from `ghc-internal` This ensures that we do not use `base` stub modules as declarations' homes when not appropriate. - - - - - c8cf3e26 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Partially freeze exports of GHC.Base Sadly there are still a few module reexports. However, at least we have decoupled from the exports of `GHC.Internal.Base`. - - - - - 272573c6 by Ben Gamari at 2024-02-24T19:10:23-05:00 Move Haddock named chunks - - - - - 2d8a881d by Ben Gamari at 2024-02-24T19:10:23-05:00 Drop GHC.Internal.Data.Int - - - - - 55c4c385 by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler: Fix mention to `GHC....` modules in wasm desugaring Really, these references should be via known-key names anyways. I have fixed the proximate issue here but have opened #24472 to track the additional needed refactoring. - - - - - 64150911 by Ben Gamari at 2024-02-24T19:10:23-05:00 Accept performance shifts from ghc-internal restructure As expected, Haddock now does more work. Less expected is that some other testcases actually get faster, presumably due to less interface file loading. As well, the size_hello_artifact test regressed a bit when debug information is enabled due to debug information for the new stub symbols. Metric Decrease: T12227 T13056 Metric Increase: haddock.Cabal haddock.base MultiLayerModulesTH_OneShot size_hello_artifact - - - - - 317a915b by Ben Gamari at 2024-02-24T19:10:23-05:00 Expose GHC.Wasm.Prim from ghc-experimental Previously this was only exposed from `ghc-internal` which violates our agreement that users shall not rely on things exposed from that package. Fixes #24479. - - - - - 3bbd2bf2 by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler/tc: Small optimisation of evCallStack Don't lookupIds unless we actually need them. - - - - - 3e5c9e3c by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler/tc: Use toException instead of SomeException - - - - - 125714a6 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Factor out errorBelch This was useful when debugging - - - - - 3d6aae7c by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Clean up imports of GHC.Stack.CloneStack - - - - - 6900306e by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Move PrimMVar to GHC.Internal.MVar - - - - - 28f8a148 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Move prettyCallStack to GHC.Internal.Stack - - - - - 4892de47 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Explicit dependency to workaround #24436 Currently `ghc -M` fails to account for `.hs-boot` files correctly, leading to issues with cross-package one-shot builds failing. This currently manifests in `GHC.Exception` due to the boot file for `GHC.Internal.Stack`. Work around this by adding an explicit `import`, ensuring that `GHC.Internal.Stack` is built before `GHC.Exception`. See #24436. - - - - - 294c93a5 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Use displayException in top-level exception handler Happily this also allows us to eliminate a special case for Deadlock exceptions. Implements [CLC #198](https://github.com/haskell/core-libraries-committee/issues/198). - - - - - 732db81d by Ben Gamari at 2024-02-24T19:12:18-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - cf756a25 by Ben Gamari at 2024-02-24T22:11:53-05:00 rts: Fix symbol references in Wasm RTS - - - - - 4e4d47a0 by Jade at 2024-02-26T15:17:20-05:00 GHCi: Improve response to unloading, loading and reloading modules Fixes #13869 - - - - - f3de8a3c by Zubin Duggal at 2024-02-26T15:17:57-05:00 rel-eng/fetch-gitlab.py: Fix name of aarch64 alpine 3_18 release job - - - - - c71bfdff by Cheng Shao at 2024-02-26T15:18:35-05:00 hadrian/hie-bios: pass -j to hadrian This commit passes -j to hadrian in the hadrian/hie-bios scripts. When the user starts HLS in a fresh clone that has just been configured, it takes quite a while for hie-bios to pick up the ghc flags and start actual indexing, due to the fact that the hadrian build step defaulted to -j1, so -j speeds things up and improve HLS user experience in GHC. Also add -j flag to .ghcid to speed up ghcid, and sets the Windows build root to .hie-bios which also works and unifies with other platforms, the previous build root _hie-bios was missing from .gitignore anyway. - - - - - 50bfdb46 by Cheng Shao at 2024-02-26T15:18:35-05:00 ci: enable parallelism in hadrian/ghci scripts This commit enables parallelism when the hadrian/ghci scripts are called in CI. The time bottleneck is in the hadrian build step, but previously the build step wasn't parallelized. - - - - - 61a78231 by Felix Yan at 2024-02-26T15:19:14-05:00 m4: Correctly detect GCC version When calling as `cc`, GCC does not outputs lowercased "gcc" at least in 13.2.1 version here. ``` $ cc --version cc (GCC) 13.2.1 20230801 ... ``` This fails the check and outputs the confusing message: `configure: $CC is not gcc; assuming it's a reasonably new C compiler` This patch makes it check for upper-cased "GCC" too so that it works correctly: ``` checking version of gcc... 13.2.1 ``` - - - - - 001aa539 by Teo Camarasu at 2024-02-27T13:26:46-05:00 Fix formatting in whereFrom docstring Previously it used markdown syntax rather than Haddock syntax for code quotes - - - - - e8034d15 by Teo Camarasu at 2024-02-27T13:26:46-05:00 Move ClosureType type to ghc-internal - Use ClosureType for InfoProv.ipDesc. - Use ClosureType for CloneStack.closureType. - Now ghc-heap re-exports this type from ghc-internal. See the accompanying CLC proposal: https://github.com/haskell/core-libraries-committee/issues/210 Resolves #22600 - - - - - 3da0a551 by Matthew Craven at 2024-02-27T13:27:22-05:00 StgToJS: Simplify ExprInline constructor of ExprResult Its payload was used only for a small optimization in genAlts, avoiding a few assignments for programs of this form: case NormalDataCon arg1 arg2 of x { NormalDataCon x1 x2 -> ... ; } But when compiling with optimizations, this sort of code is generally eliminated by case-of-known-constructor in Core-to-Core. So it doesn't seem worth tracking and cleaning up again in StgToJS. - - - - - 61bc92cc by Cheng Shao at 2024-02-27T16:58:42-05:00 rts: add missing ccs_mutex guard to internal_dlopen See added comment for details. Closes #24423. - - - - - dd29d3b2 by doyougnu at 2024-02-27T16:59:23-05:00 cg: Remove GHC.Cmm.DataFlow.Collections In pursuit of #15560 and #17957 and generally removing redundancy. - - - - - d3a050d2 by Cheng Shao at 2024-02-27T17:00:00-05:00 utils: remove unused lndir from tree Ever since the removal of the make build system, the in tree lndir hasn't been actually built, so this patch removes it. - - - - - 86bf7010 by Ben Gamari at 2024-02-27T19:28:10-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 74b24a9b by Teo Camarasu at 2024-02-28T16:32:58+00:00 rts: avoid checking bdescr of value outside of Haskell heap In nonmovingTidyWeaks we want to check if the key of a weak pointer lives in the non-moving heap. We do this by checking the flags of the block the key lives in. But we need to be careful with values that live outside the Haskell heap, since they will lack a block descriptor and looking for one may lead to a segfault. In this case we should just accept that it isn't on the non-moving heap. Resolves #24492 - - - - - b4cae4ec by Simon Peyton Jones at 2024-02-29T02:10:08-05:00 In mkDataConRep, ensure the in-scope set is right A small change that fixes #24489 - - - - - 3836a110 by Cheng Shao at 2024-02-29T21:25:45-05:00 testsuite: fix T23540 fragility on 32-bit platforms T23540 is fragile on 32-bit platforms. The root cause is usage of `getEvidenceTreesAtPoint`, which internally relies on `Name`'s `Ord` instance, which is indeterministic. The solution is adding a deterministic `Ord` instance for `EvidenceInfo` and sorting the evidence trees before pretty printing. Fixes #24449. - - - - - 960c8d47 by Teo Camarasu at 2024-02-29T21:26:20-05:00 Reduce AtomicModifyIORef increment count This test leads to a lot of contention when N>2 and becomes very slow. Let's reduce the amount of work we do to compensate. Resolves #24490 - - - - - 2e46c8ad by Matthew Pickering at 2024-03-01T05:48:06-05:00 hadrian: Improve parallelism in binary-dist-dir rule I noticed that the "docs" target was needed after the libraries and executables were built. We can improve the parallelism by needing everything at once so that documentation can be built immediately after a library is built for example. - - - - - cb6c11fe by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: Bump windows and freebsd boot compilers to 9.6.4 We have previously bumped the docker images to use 9.6.4, but neglected to bump the windows images until now. - - - - - 30f06996 by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: darwin: Update to 9.6.2 for boot compiler 9.6.4 is currently broken due to #24050 Also update to use LLVM-15 rather than LLVM-11, which is out of date. - - - - - d9d69e12 by Matthew Pickering at 2024-03-01T05:48:07-05:00 Bump minimum bootstrap version to 9.6 - - - - - 67ace1c5 by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: Enable more documentation building Here we enable documentation building on 1. Darwin: The sphinx toolchain was already installed so we enable html and manpages. 2. Rocky8: Full documentation (toolchain already installed) 3. Alpine: Full documetnation (toolchain already installed) 4. Windows: HTML and manpages (toolchain already installed) Fixes #24465 - - - - - 39583c39 by Matthew Pickering at 2024-03-01T05:48:42-05:00 ci: Bump ci-images to allow updated aarch64-alpine image with llvm15 and clang15 - - - - - d91d00fc by Torsten Schmits at 2024-03-01T15:01:50-05:00 Introduce ListTuplePuns extension This implements Proposal 0475, introducing the `ListTuplePuns` extension which is enabled by default. Disabling this extension makes it invalid to refer to list, tuple and sum type constructors by using built-in syntax like `[Int]`, `(Int, Int)`, `(# Int#, Int# #)` or `(# Int | Int #)`. Instead, this syntax exclusively denotes data constructors for use with `DataKinds`. The conventional way of referring to these data constructors by prefixing them with a single quote (`'(Int, Int)`) is now a parser error. Tuple declarations have been moved to `GHC.Tuple.Prim` and the `Solo` data constructor has been renamed to `MkSolo` (in a previous commit). Unboxed tuples and sums now have real source declarations in `GHC.Types`. Unit and solo types for tuples are now called `Unit`, `Unit#`, `Solo` and `Solo#`. Constraint tuples now have the unambiguous type constructors `CTuple<n>` as well as `CUnit` and `CSolo`, defined in `GHC.Classes` like before. A new parser construct has been added for the unboxed sum data constructor declarations. The type families `Tuple`, `Sum#` etc. that were intended to provide nicer syntax have been omitted from this change set due to inference problems, to be implemented at a later time. See the MR discussion for more info. Updates the submodule utils/haddock. Updates the cabal submodule due to new language extension. Metric Increase: haddock.base Metric Decrease: MultiLayerModulesTH_OneShot size_hello_artifact Proposal document: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst Merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8820 Tracking ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/21294 - - - - - bbdb6286 by Sylvain Henry at 2024-03-01T15:01:50-05:00 JS linker: filter unboxed tuples - - - - - dec6d8d3 by Arnaud Spiwack at 2024-03-01T15:02:30-05:00 Improve error messages coming from non-linear patterns This enriched the `CtOrigin` for non-linear patterns to include data of the pattern that created the constraint (which can be quite useful if it occurs nested in a pattern) as well as an explanation why the pattern is non-restricted in (at least in some cases). - - - - - 6612388e by Arnaud Spiwack at 2024-03-01T15:02:30-05:00 Adjust documentation of linear lets according to committee decision - - - - - 1c064ef1 by Cheng Shao at 2024-03-02T17:11:19-05:00 compiler: start deprecating cmmToRawCmmHook cmmToRawCmmHook was added 4 years ago in d561c8f6244f8280a2483e8753c38e39d34c1f01. Its only user is the Asterius project, which has been archived and deprecated in favor of the ghc wasm backend. This patch starts deprecating cmmToRawCmmHook by placing a DEPRECATED pragma, and actual removal shall happen in a future GHC major release if no issue to oppose the deprecation has been raised in the meantime. - - - - - 9b74845f by Andrew Lelechenko at 2024-03-02T17:11:55-05:00 Data.List.NonEmpty.unzip: use WARNING with category instead of DEPRECATED CLC proposal: https://github.com/haskell/core-libraries-committee/issues/258 - - - - - 61bb5ff6 by Finley McIlwaine at 2024-03-04T09:01:40-08:00 add -fprof-late-overloaded and -fprof-late-overloaded-calls * Refactor late cost centre insertion for extensibility * Add two more late cost centre insertion methods that add SCCs to overloaded top level bindings and call sites with dictionary arguments. * Some tests for the basic functionality of the new insertion methods Resolves: #24500 - - - - - 82ccb801 by Andreas Klebinger at 2024-03-04T19:59:14-05:00 x86-ncg: Fix fma codegen when arguments are globals Fix a bug in the x86 ncg where results would be wrong when the desired output register and one of the input registers were the same global. Also adds a tiny optimization to make use of the memory addressing support when convenient. Fixes #24496 - - - - - 18ad1077 by Matthew Pickering at 2024-03-05T14:22:31-05:00 rel_eng: Update hackage docs upload scripts This adds the upload of ghc-internal and ghc-experimental to our scripts which upload packages to hackage. - - - - - bf47c9ba by Matthew Pickering at 2024-03-05T14:22:31-05:00 docs: Remove stray module comment from GHC.Profiling.Eras - - - - - 37d9b340 by Matthew Pickering at 2024-03-05T14:22:31-05:00 Fix ghc-internal cabal file The file mentioned some artifacts relating to the base library. I have renamed these to the new ghc-internal variants. - - - - - 23f2a478 by Matthew Pickering at 2024-03-05T14:22:31-05:00 Fix haddock source links and hyperlinked source There were a few issues with the hackage links: 1. We were using the package id rather than the package name for the package links. This is fixed by now allowing the template to mention %pkg% or %pkgid% and substituing both appropiatly. 2. The `--haddock-base-url` flag is renamed to `--haddock-for-hackage` as the new base link works on a local or remote hackage server. 3. The "src" path including too much stuff, so cross-package source links were broken as the template was getting double expanded. Fixes #24086 - - - - - 2fa336a9 by Ben Gamari at 2024-03-05T14:23:07-05:00 filepath: Bump submodule to 1.5.2.0 - - - - - 31217944 by Ben Gamari at 2024-03-05T14:23:07-05:00 os-string: Bump submodule to 2.0.2 - - - - - 4074a3f2 by Matthew Pickering at 2024-03-05T21:44:35-05:00 base: Reflect new era profiling RTS flags in GHC.RTS.Flags * -he profiling mode * -he profiling selector * --automatic-era-increment CLC proposal #254 - https://github.com/haskell/core-libraries-committee/issues/254 - - - - - a8c0e31b by Sylvain Henry at 2024-03-05T21:45:14-05:00 JS: faster implementation for some numeric primitives (#23597) Use faster implementations for the following primitives in the JS backend by not using JavaScript's BigInt: - plusInt64 - minusInt64 - minusWord64 - timesWord64 - timesInt64 Co-authored-by: Josh Meredith <joshmeredith2008 at gmail.com> - - - - - 21e3f325 by Cheng Shao at 2024-03-05T21:45:52-05:00 rts: add -xr option to control two step allocator reserved space size This patch adds a -xr RTS option to control the size of virtual memory address space reserved by the two step allocator on a 64-bit platform, see added documentation for explanation. Closes #24498. - - - - - dedcf102 by Cheng Shao at 2024-03-06T13:39:04-05:00 rts: expose HeapAlloc.h as public header This commit exposes HeapAlloc.h as a public header. The intention is to expose HEAP_ALLOCED/HEAP_ALLOCED_GC, so they can be used in assertions in other public headers, and they may also be useful for user code. - - - - - d19441d7 by Cheng Shao at 2024-03-06T13:39:04-05:00 rts: assert pointer is indeed heap allocated in Bdescr() This commit adds an assertion to Bdescr() to assert the pointer is indeed heap allocated. This is useful to rule out RTS bugs that attempt to access non-existent block descriptor of a static closure, #24492 being one such example. - - - - - 9a656a04 by Ben Gamari at 2024-03-06T13:39:39-05:00 ghc-experimental: Add dummy dependencies to work around #23942 This is a temporary measure to improve CI reliability until a proper solution is developed. Works around #23942. - - - - - 1e84b924 by Simon Peyton Jones at 2024-03-06T13:39:39-05:00 Three compile perf improvements with deep nesting These were changes are all triggered by #24471. 1. Make GHC.Core.Opt.SetLevels.lvlMFE behave better when there are many free variables. See Note [Large free-variable sets]. 2. Make GHC.Core.Opt.Arity.floatIn a bit lazier in its Cost argument. This benefits the common case where the ArityType turns out to be nullary. See Note [Care with nested expressions] 3. Make GHC.CoreToStg.Prep.cpeArg behave for deeply-nested expressions. See Note [Eta expansion of arguments in CorePrep] wrinkle (EA2). Compile times go down by up to 4.5%, and much more in artificial cases. (Geo mean of compiler/perf changes is -0.4%.) Metric Decrease: CoOpt_Read T10421 T12425 - - - - - c4b13113 by Hécate Moonlight at 2024-03-06T13:40:17-05:00 Use "module" instead of "library" when applicable in base haddocks - - - - - 9cd9efb4 by Vladislav Zavialov at 2024-03-07T13:01:54+03:00 Rephrase error message to say "visible arguments" (#24318) * Main change: make the error message generated by mkFunTysMsg more accurate by changing "value arguments" to "visible arguments". * Refactor: define a new type synonym VisArity and use it instead of Arity in a few places. It might be the case that there other places in the compiler that should talk about visible arguments rather than value arguments, but I haven't tried to find them all, focusing only on the error message reported in the ticket. - - - - - 4b6e76b5 by Patrick at 2024-03-07T22:09:30+08:00 fix haskell/haddock#24493, with module name introduced in hieAst The accompanies haddoc PR with GHC PR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12153 Two things have been done: 1. Link is introduced to every `X` in `module X where`, since we introduce the module name to HieAst, 2. `{-# LINE 4 "hypsrc-test/src/PositionPragmas.hs" #-}` is added before the `module PositionPragmas where` in ` hypsrc-test/ref/src/PositionPragmas.html `.It ensures only a single hieAst for file `hypsrc-test/src/PositionPragmas.hs` is generated. - - - - - d523a6a7 by Ben Gamari at 2024-03-07T19:40:45-05:00 Bump array submodule - - - - - 7e55003c by Ben Gamari at 2024-03-07T19:40:45-05:00 Bump stm submodule - - - - - 32d337ef by Ben Gamari at 2024-03-07T19:40:45-05:00 Introduce exception context Here we introduce the `ExceptionContext` type and `ExceptionAnnotation` class, allowing dynamically-typed user-defined annotations to be attached to exceptions. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/199 GHC Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/330 - - - - - 39f3d922 by Ben Gamari at 2024-03-07T19:40:46-05:00 testsuite/interface-stability: Update documentation - - - - - fdea7ada by Ben Gamari at 2024-03-07T19:40:46-05:00 ghc-internal: comment formatting - - - - - 4fba42ef by Ben Gamari at 2024-03-07T19:40:46-05:00 compiler: Default and warn ExceptionContext constraints - - - - - 3886a205 by Ben Gamari at 2024-03-07T19:40:46-05:00 base: Introduce exception backtraces Here we introduce the `Backtraces` type and associated machinery for attaching these via `ExceptionContext`. These has a few compile-time regressions (`T15703` and `T9872d`) due to the additional dependencies in the exception machinery. As well, there is a surprisingly large regression in the `size_hello_artifact` test. This appears to be due to various `Integer` and `Read` bits now being reachable at link-time. I believe it should be possible to avoid this but I have accepted the change for now to get the feature merged. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/199 GHC Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/330 Metric Increase: T15703 T9872d size_hello_artifact - - - - - 18c5409f by Ben Gamari at 2024-03-07T19:40:46-05:00 users guide: Release notes for exception backtrace work - - - - - f849c5fc by Ben Gamari at 2024-03-07T19:40:46-05:00 compiler: Don't show ExceptionContext of GhcExceptions Most GhcExceptions are user-facing errors and therefore the ExceptionContext has little value. Ideally we would enable it in the DEBUG compiler but I am leaving this for future work. - - - - - dc646e6f by Sylvain Henry at 2024-03-07T19:40:46-05:00 Disable T9930fail for the JS target (cf #19174) - - - - - bfc09760 by Alan Zimmerman at 2024-03-07T19:41:22-05:00 Update showAstData to honour blanking of AnnParen Also tweak rendering of SrcSpan to remove extra blank line. - - - - - 50454a29 by Ben Gamari at 2024-03-08T03:32:42-05:00 ghc-internal: Eliminate GHC.Internal.Data.Kind This was simply reexporting things from `ghc-prim`. Instead reexport these directly from `Data.Kind`. Also add build ordering dependency to work around #23942. - - - - - 38a4b6ab by Ben Gamari at 2024-03-08T03:33:18-05:00 rts: Fix SET_HDR initialization of retainer set This fixes a regression in retainer set profiling introduced by b0293f78cb6acf2540389e22bdda420d0ab874da. Prior to that commit the heap traversal word would be initialized by `SET_HDR` using `LDV_RECORD_CREATE`. However, the commit added a `doingLDVProfiling` check in `LDV_RECORD_CREATE`, meaning that this initialization no longer happened. Given that this initialization was awkwardly indirectly anyways, I have fixed this by explicitly initializating the heap traversal word to `NULL` in `SET_PROF_HDR`. This is equivalent to the previous behavior, but much more direct. Fixes #24513. - - - - - 635abccc by Ben Gamari at 2024-03-08T17:09:06-05:00 Bump ghc version to 9.10 - - - - - 2859a637 by Ben Gamari at 2024-03-08T18:26:47-05:00 base: Use strerror_r instead of strerror As noted by #24344, `strerror` is not necessarily thread-safe. Thankfully, POSIX.1-2001 has long offered `strerror_r`, which is safe to use. Fixes #24344. CLC discussion: https://github.com/haskell/core-libraries-committee/issues/249 - - - - - 5b934048 by Ben Gamari at 2024-03-08T18:50:12-05:00 Bump base upper bound - - - - - b30d134e by Ben Gamari at 2024-03-08T18:50:44-05:00 Testsuite output update - - - - - edb9bf77 by Jade at 2024-03-09T03:39:38-05:00 Error messages: Improve Error messages for Data constructors in type signatures. This patch improves the error messages from invalid type signatures by trying to guess what the user did and suggesting an appropriate fix. Partially fixes: #17879 - - - - - cfb197e3 by Patrick at 2024-03-09T03:40:15-05:00 HieAst: add module name #24493 The main purpose of this is to tuck the module name `xxx` in `module xxx where` into the hieAst. It should fix #24493. The following have been done: 1. Renamed and update the `tcg_doc_hdr :: Maybe (LHsDoc GhcRn)` to `tcg_hdr_info :: (Maybe (LHsDoc GhcRn), Maybe (XRec GhcRn ModuleName))` To store the located module name information. 2. update the `RenamedSource` and `RenamedStuff` with extra `Maybe (XRec GhcRn ModuleName)` located module name information. 3. add test `testsuite/tests/hiefile/should_compile/T24493.hs` to ensure the module name is added and update several relevent tests. 4. accompanied submodule haddoc test update MR in https://gitlab.haskell.org/ghc/haddock/-/merge_requests/53 - - - - - 2341d81e by Vaibhav Sagar at 2024-03-09T03:40:54-05:00 GHC.Utils.Binary: fix a couple of typos - - - - - 5580e1bd by Ben Gamari at 2024-03-09T03:41:30-05:00 rts: Drop .wasm suffix from .prof file names This replicates the behavior on Windows, where `Hi.exe` will produce profiling output named `Hi.prof` instead of `Hi.exe.prof`. While in the area I also fixed the extension-stripping logic, which incorrectly rewrote `Hi.exefoo` to `Hi.foo`. Closes #24515. - - - - - 259495ee by Cheng Shao at 2024-03-09T03:41:30-05:00 testsuite: drop exe extension from .hp & .prof filenames See #24515 for details. - - - - - c477a8d2 by Ben Gamari at 2024-03-09T03:42:05-05:00 rts/linker: Enable GOT support on all platforms There is nothing platform-dependent about our GOT implementation and GOT support is needed by `T24171` on i386. - - - - - 2e592857 by Vladislav Zavialov at 2024-03-09T03:42:41-05:00 Drop outdated comment on TcRnIllformedTypePattern This should have been done in 0f0c53a501b but I missed it. - - - - - c554b4da by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/CloneStack: Bounds check array write - - - - - 15c590a5 by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/CloneStack: Don't expose helper functions in header - - - - - e831ce31 by Ben Gamari at 2024-03-09T09:39:20-05:00 base: Move internals of GHC.InfoProv into GHC.InfoProv.Types Such that we can add new helpers into GHC.InfoProv.Types without breakage. - - - - - 6948e24d by Ben Gamari at 2024-03-09T09:39:20-05:00 rts: Lazily decode IPE tables Previously we would eagerly allocate `InfoTableEnt`s for each info table registered in the info table provenance map. However, this costs considerable memory and initialization time. Instead we now lazily decode these tables. This allows us to use one-third the memory *and* opens the door to taking advantage of sharing opportunities within a module. This required considerable reworking since lookupIPE now must be passed its result buffer. - - - - - 9204a04e by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/IPE: Don't expose helper in header - - - - - 308926ff by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/IPE: Share module_name within a Node This allows us to shave a 64-bit word off of the packed IPE entry size. - - - - - bebdea05 by Ben Gamari at 2024-03-09T09:39:20-05:00 IPE: Expose unit ID in InfoTableProv Here we add the unit ID to the info table provenance structure. - - - - - 6519c9ad by Ben Gamari at 2024-03-09T09:39:35-05:00 rts: Refactor GHC.Stack.CloneStack.decode Don't allocate a Ptr constructor per frame. - - - - - ed0b69dc by Ben Gamari at 2024-03-09T09:39:35-05:00 base: Do not expose whereFrom# from GHC.Exts - - - - - 2b1faea9 by Vladislav Zavialov at 2024-03-09T17:38:21-05:00 docs: Update info on TypeAbstractions * Mention TypeAbstractions in 9.10.1-notes.rst * Set the status to "Experimental". * Add a "Since: GHC 9.x" comment to each section. - - - - - f8b88918 by Ben Gamari at 2024-03-09T21:21:46-05:00 ci-images: Bump Alpine image to bootstrap with 9.8.2 - - - - - 705e6927 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Mark T24171 as fragile due to #24512 I will fix this but not in time for 9.10.1-alpha1 - - - - - c74196e1 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Mark linker_unload_native as fragile In particular this fails on platforms without `dlinfo`. I plan to address this but not before 9.10.1-alpha1. - - - - - f4d87f7a by Ben Gamari at 2024-03-09T21:21:46-05:00 configure: Bump version to 9.10 - - - - - 88df9a5f by Ben Gamari at 2024-03-09T21:21:46-05:00 Bump transformers submodule to 0.6.1.1 - - - - - 8176d5e8 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Increase ulimit for T18623 1 MByte was just too tight and failed intermittently on some platforms (e.g. CentOS 7). Bumping the limit to 8 MByte should provide sufficient headroom. Fixes #23139. - - - - - c74b38a3 by Ben Gamari at 2024-03-09T21:21:46-05:00 base: Bump version to 4.20.0.0 - - - - - b2937fc3 by Ben Gamari at 2024-03-09T21:21:46-05:00 ghc-internal: Set initial version at 9.1001.0 This provides PVP compliance while maintaining a clear correspondence between GHC releases and `ghc-internal` versions. - - - - - 4ae7d868 by Ben Gamari at 2024-03-09T21:21:46-05:00 ghc-prim: Bump version to 0.11.0 - - - - - 50798dc6 by Ben Gamari at 2024-03-09T21:21:46-05:00 template-haskell: Bump version to 2.22.0.0 - - - - - 8564f976 by Ben Gamari at 2024-03-09T21:21:46-05:00 base-exports: Accommodate spurious whitespace changes in 32-bit output It appears that this was - - - - - 9d4f0e98 by Ben Gamari at 2024-03-09T21:21:46-05:00 users-guide: Move exception backtrace relnotes to 9.10 This was previously mistakenly added to the GHC 9.8 release notes. - - - - - 145eae60 by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/rel_eng: Fix name of Rocky8 artifact - - - - - 39c2a630 by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/rel_eng: Fix path of generate_jobs_metadata - - - - - aed034de by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/upload: Rework recompression The old `combine` approach was quite fragile due to use of filename globbing. Moreover, it didn't parallelize well. This refactoring makes the goal more obvious, parallelizes better, and is more robust. - - - - - 9bdf3586 by Ben Gamari at 2024-03-09T21:37:44-05:00 Merge branch 'ghc-9.10' into ghc-head - - - - - cec76981 by Ben Gamari at 2024-03-09T21:54:00-05:00 Bump GHC version to 9.11 - - - - - 4c59feb7 by Ben Gamari at 2024-03-09T22:15:01-05:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - dc207d06 by Ben Gamari at 2024-03-10T08:56:08-04:00 configure: Bump GHC version to 9.11 Bumps haddock submodule. - - - - - 8b2513e8 by Ben Gamari at 2024-03-11T01:20:03-04:00 rts/linker: Don't unload code when profiling is enabled The heap census may contain references (e.g. `Counter.identity`) to static data which must be available when the census is reported at the end of execution. Fixes #24512. - - - - - 7810b4c3 by Ben Gamari at 2024-03-11T01:20:03-04:00 rts/linker: Don't unload native objects when dlinfo isn't available To do so is unsafe as we have no way of identifying references to symbols provided by the object. Fixes #24513. Fixes #23993. - - - - - 0590764c by Ben Gamari at 2024-03-11T01:20:39-04:00 rel_eng/upload: Purge both $rel_name/ and $ver/ This is necessary for prereleases, where GHCup accesses the release via `$ver/` - - - - - b85a4631 by Brandon Chinn at 2024-03-12T19:25:56-04:00 Remove duplicate code normalising slashes - - - - - c91946f9 by Brandon Chinn at 2024-03-12T19:25:56-04:00 Simplify regexes with raw strings - - - - - 1a5f53c6 by Brandon Chinn at 2024-03-12T19:25:57-04:00 Don't normalize backslashes in characters - - - - - 7ea971d3 by Andrei Borzenkov at 2024-03-12T19:26:32-04:00 Fix compiler crash caused by implicit RHS quantification in type synonyms (#24470) - - - - - 39f3ac3e by Cheng Shao at 2024-03-12T19:27:11-04:00 Revert "compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms" This reverts commit 615eb855416ce536e02ed935ecc5a6f25519ae16. It was originally intended to fix #24449, but it was merely sweeping the bug under the rug. 3836a110577b5c9343915fd96c1b2c64217e0082 has properly fixed the fragile test, and we no longer need the C version of genSym. Furthermore, the C implementation causes trouble when compiling with clang that targets i386 due to alignment warning and libatomic linking issue, so it makes sense to revert it. - - - - - e6bfb85c by Cheng Shao at 2024-03-12T19:27:11-04:00 compiler: fix out-of-bound memory access of genSym on 32-bit This commit fixes an unnoticed out-of-bound memory access of genSym on 32-bit. ghc_unique_inc is 32-bit sized/aligned on 32-bit platforms, but we mistakenly treat it as a Word64 pointer in genSym, and therefore will accidentally load 2 garbage higher bytes, or with a small but non-zero chance, overwrite something else in the data section depends on how the linker places the data segments. This regression was introduced in !11802 and fixed here. - - - - - 77171cd1 by Ben Orchard at 2024-03-14T09:00:40-04:00 Note mutability of array and address access primops Without an understanding of immutable vs. mutable memory, the index primop family have a potentially non-intuitive type signature: indexOffAddr :: Addr# -> Int# -> a readOffAddr :: Addr# -> Int# -> State# d -> (# State# d, a #) indexOffAddr# might seem like a free generality improvement, which it certainly is not! This change adds a brief note on mutability expectations for most index/read/write access primops. - - - - - 7da7f8f6 by Alan Zimmerman at 2024-03-14T09:01:15-04:00 EPA: Fix regression discarding comments in contexts Closes #24533 - - - - - 73be65ab by Fendor at 2024-03-19T01:42:53-04:00 Fix sharing of 'IfaceTyConInfo' during core to iface type translation During heap analysis, we noticed that during generation of 'mi_extra_decls' we have lots of duplicates for the instances: * `IfaceTyConInfo NotPromoted IfaceNormalTyCon` * `IfaceTyConInfo IsPromoted IfaceNormalTyCon` which should be shared instead of duplicated. This duplication increased the number of live bytes by around 200MB while loading the agda codebase into GHCi. These instances are created during `CoreToIface` translation, in particular `toIfaceTyCon`. The generated core looks like: toIfaceTyCon = \ tc_sjJw -> case $wtoIfaceTyCon tc_sjJw of { (# ww_sjJz, ww1_sjNL, ww2_sjNM #) -> IfaceTyCon ww_sjJz (IfaceTyConInfo ww1_sjNL ww2_sjNM) } whichs removes causes the sharing to work propery. Adding explicit sharing, with NOINLINE annotations, changes the core to: toIfaceTyCon = \ tc_sjJq -> case $wtoIfaceTyCon tc_sjJq of { (# ww_sjNB, ww1_sjNC #) -> IfaceTyCon ww_sjNB ww1_sjNC } which looks much more like sharing is happening. We confirmed via ghc-debug that all duplications were eliminated and the number of live bytes are noticeably reduced. - - - - - bd8209eb by Alan Zimmerman at 2024-03-19T01:43:28-04:00 EPA: Address more 9.10.1-alpha1 regressions from recent changes Closes #24533 Hopefully for good this time - - - - - 31bf85ee by Fendor at 2024-03-19T14:48:08-04:00 Escape multiple arguments in the settings file Uses responseFile syntax. The issue arises when GHC is installed on windows into a location that has a space, for example the user name is 'Fake User'. The $topdir will also contain a space, consequentially. When we resolve the top dir in the string `-I$topdir/mingw/include`, then `words` will turn this single argument into `-I/C/Users/Fake` and `User/.../mingw/include` which trips up the flag argument parser of various tools such as gcc or clang. We avoid this by escaping the $topdir before replacing it in `initSettngs`. Additionally, we allow to escape spaces and quotation marks for arguments in `settings` file. Add regression test case to count the number of options after variable expansion and argument escaping took place. Additionally, we check that escaped spaces and double quotation marks are correctly parsed. - - - - - f45f700e by Matthew Pickering at 2024-03-19T14:48:44-04:00 Read global package database from settings file Before this patch, the global package database was always assumed to be in libdir </> package.conf.d. This causes issues in GHC's build system because there are sometimes situations where the package database you need to use is not located in the same place as the settings file. * The stage1 compiler needs to use stage1 libraries, so we should set "Global Package DB" for the stage1 compiler to the stage1 package database. * Stage 2 cross compilers need to use stage2 libraries, so likewise, we should set the package database path to `_build/stage2/lib/` * The normal situation is where the stage2 compiler uses stage1 libraries. Then everything lines up. * When installing we have rearranged everything so that the settings file and package database line up properly, so then everything should continue to work as before. In this case we set the relative package db path to `package.conf.d`, so it resolves the same as before. * ghc-pkg needs to be modified as well to look in the settings file fo the package database rather than assuming the global package database location relative to the lib folder. * Cabal/cabal-install will work correctly because they query the global package database using `--print-global-package-db`. A reasonable question is why not generate the "right" settings files in the right places in GHC's build system. In order to do this you would need to engineer wrappers for all executables to point to a specific libdir. There are also situations where the same package db is used by two different compilers with two different settings files (think stage2 cross compiler and stage3 compiler). In short, this 10 line patch allows for some reasonable simplifications in Hadrian at very little cost to anything else. Fixes #24502 - - - - - 4c8f1794 by Matthew Pickering at 2024-03-19T14:48:44-04:00 hadrian: Remove stage1 testsuite wrappers logic Now instead of producing wrappers which pass the global package database argument to ghc and ghc-pkg, we write the location of the correct package database into the settings file so you can just use the intree compiler directly. - - - - - da0d8ba5 by Matthew Craven at 2024-03-19T14:49:20-04:00 Remove unused ghc-internal module "GHC.Internal.Constants" - - - - - b56d2761 by Matthew Craven at 2024-03-19T14:49:20-04:00 CorePrep: Rework lowering of BigNat# literals Don't use bigNatFromWord#, because that's terrible: * We shouldn't have to traverse a linked list at run-time to build a BigNat# literal. That's just silly! * The static List object we have to create is much larger than the actual BigNat#'s contents, bloating code size. * We have to read the corresponding interface file, which causes un-tracked implicit dependencies. (#23942) Instead, encode them into the appropriate platform-dependent sequence of bytes, and generate code that copies these bytes at run-time from an Addr# literal into a new ByteArray#. A ByteArray# literal would be the correct thing to generate, but these are not yet supported; see also #17747. Somewhat surprisingly, this change results in a slight reduction in compiler allocations, averaging around 0.5% on ghc's compiler performance tests, including when compiling programs that contain no bignum literals to begin with. The specific cause of this has not been investigated. Since this lowering no longer reads the interface file for GHC.Num.BigNat, the reasoning in Note [Depend on GHC.Num.Integer] is obsoleted. But the story of un-tracked built-in dependencies remains complex, and Note [Tracking dependencies on primitives] now exists to explain this complexity. Additionally, many empty imports have been modified to refer to this new note and comply with its guidance. Several empty imports necessary for other reasons have also been given brief explanations. Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 349ea330 by Fendor at 2024-03-19T14:50:00-04:00 Eliminate thunk in 'IfaceTyCon' Heap analysis showed that `IfaceTyCon` retains a thunk to `IfaceTyConInfo`, defeating the sharing of the most common instances of `IfaceTyConInfo`. We make sure the indirection is removed by adding bang patterns to `IfaceTyCon`. Experimental results on the agda code base, where the `mi_extra_decls` were read from disk: Before this change, we observe around 8654045 instances of: `IfaceTyCon[Name,THUNK_1_0]` But these thunks almost exclusively point to a shared value! Forcing the thunk a little bit more, leads to `ghc-debug` reporting: `IfaceTyCon[Name:Name,IfaceTyConInfo]` and a noticeable reduction of live bytes (on agda ~10%). - - - - - 594bee0b by Krzysztof Gogolewski at 2024-03-19T14:50:36-04:00 Minor misc cleanups - GHC.HsToCore.Foreign.JavaScript: remove dropRuntimeRepArgs; boxed tuples don't take RuntimeRep args - GHC.HsToCore.Foreign.Call: avoid partial pattern matching - GHC.Stg.Unarise: strengthen the assertion; we can assert that non-rubbish literals are unary rather than just non-void - GHC.Tc.Gen.HsType: make sure the fsLit "literal" rule fires - users_guide/using-warnings.rst: remove -Wforall-identifier, now deprecated and does nothing - users_guide/using.rst: fix formatting - andy_cherry/test.T: remove expect_broken_for(23272...), 23272 is fixed The rest are simple cleanups. - - - - - cf55a54b by Ben Gamari at 2024-03-19T14:51:12-04:00 mk/relpath: Fix quoting Previously there were two instances in this script which lacked proper quoting. This resulted in `relpath` invocations in the binary distribution Makefile producing incorrect results on Windows, leading to confusing failures from `sed` and the production of empty package registrations. Fixes #24538. - - - - - 5ff88389 by Bryan Richter at 2024-03-19T14:51:48-04:00 testsuite: Disable T21336a on wasm - - - - - 60023351 by Ben Gamari at 2024-03-19T22:33:10-04:00 hadrian/bindist: Eliminate extraneous `dirname` invocation Previously we would call `dirname` twice per installed library file. We now instead reuse this result. This helps appreciably on Windows, where processes are quite expensive. - - - - - 616ac300 by Ben Gamari at 2024-03-19T22:33:10-04:00 hadrian: Package mingw toolchain in expected location This fixes #24525, a regression due to 41cbaf44a6ab5eb9fa676d65d32df8377898dc89. Specifically, GHC expects to find the mingw32 toolchain in the binary distribution root. However, after this patch it was packaged in the `lib/` directory. - - - - - de9daade by Ben Gamari at 2024-03-19T22:33:11-04:00 gitlab/rel_eng: More upload.sh tweaks - - - - - 1dfe12db by Ben Gamari at 2024-03-19T22:33:11-04:00 rel_eng: Drop dead prepare_docs codepath - - - - - dd2d748b by Ben Gamari at 2024-03-19T22:33:11-04:00 rel_env/recompress_all: unxz before recompressing Previously we would rather compress the xz *again*, before in addition compressing it with the desired scheme. Fixes #24545. - - - - - 9d936c57 by Ben Gamari at 2024-03-19T22:33:11-04:00 mk-ghcup-metadata: Fix directory of testsuite tarball As reported in #24546, the `dlTest` artifact should be extracted into the `testsuite` directory. - - - - - 6d398066 by Ben Gamari at 2024-03-19T22:33:11-04:00 ghcup-metadata: Don't populate dlOutput unless necessary ghcup can apparently infer the output name of an artifact from its URL. Consequently, we should only include the `dlOutput` field when it would differ from the filename of `dlUri`. Fixes #24547. - - - - - 576f8b7e by Zubin Duggal at 2024-03-19T22:33:46-04:00 Revert "Apply shellcheck suggestion to SUBST_TOOLDIR" This reverts commit c82770f57977a2b5add6e1378f234f8dd6153392. The shellcheck suggestion is spurious and results in SUBST_TOOLDIR being a no-op. `set` sets positional arguments for bash, but we want to set the variable given as the first autoconf argument. Fixes #24542 Metric decreases because the paths in the settings file are now shorter, so we allocate less when we read the settings file. ------------------------- Metric Decrease: T12425 T13035 T9198 ------------------------- - - - - - cdfe6e01 by Fendor at 2024-03-19T22:34:22-04:00 Compact serialisation of IfaceAppArgs In #24563, we identified that IfaceAppArgs serialisation tags each cons cell element with a discriminator byte. These bytes add up quickly, blowing up interface files considerably when '-fwrite-if-simplified-core' is enabled. We compact the serialisation by writing out the length of 'IfaceAppArgs', followed by serialising the elements directly without any discriminator byte. This improvement can decrease the size of some interface files by up to 35%. - - - - - 97a2bb1c by Simon Peyton Jones at 2024-03-20T17:11:29+00:00 Expand untyped splices in tcPolyExprCheck Fixes #24559 - - - - - 5f275176 by Alan Zimmerman at 2024-03-20T22:44:12-04:00 EPA: Clean up Exactprint helper functions a bit - Introduce a helper lens to compose on `EpAnn a` vs `a` versions - Rename some prime versions of functions back to non-prime They were renamed during the rework - - - - - da2a10ce by Vladislav Zavialov at 2024-03-20T22:44:48-04:00 Type operators in promoteOccName (#24570) Type operators differ from term operators in that they are lexically classified as (type) constructors, not as (type) variables. Prior to this change, promoteOccName did not account for this difference, causing a scoping issue that affected RequiredTypeArguments. type (!@#) = Bool f = idee (!@#) -- Not in scope: ‘!@#’ (BUG) Now we have a special case in promoteOccName to account for this. - - - - - 247fc0fa by Preetham Gujjula at 2024-03-21T10:19:18-04:00 docs: Remove mention of non-existent Ord instance for Complex The documentation for Data.Complex says that the Ord instance for Complex Float is deficient, but there is no Ord instance for Complex a. The Eq instance for Complex Float is similarly deficient, so we use that as an example instead. - - - - - 6fafc51e by Andrei Borzenkov at 2024-03-21T10:19:54-04:00 Fix TH handling in `pat_to_type_pat` function (#24571) There was missing case for `SplicePat` in `pat_to_type_at` function, hence patterns with splicing that checked against `forall->` doesn't work properly because they fall into the "illegal pattern" case. Code example that is now accepted: g :: forall a -> () g $([p| a |]) = () - - - - - 52072f8e by Sylvain Henry at 2024-03-21T21:01:59-04:00 Type-check default declarations before deriving clauses (#24566) See added Note and #24566. Default declarations must be type-checked before deriving clauses. - - - - - 7dfdf3d9 by Sylvain Henry at 2024-03-21T21:02:40-04:00 Lexer: small perf changes - Use unsafeChr because we know our values to be valid - Remove some unnecessary use of `ord` (return Word8 values directly) - - - - - 864922ef by Sylvain Henry at 2024-03-21T21:02:40-04:00 JS: fix some comments - - - - - 3e0b2b1f by Sebastian Graf at 2024-03-21T21:03:16-04:00 Simplifier: Re-do dependency analysis in abstractFloats (#24551) In #24551, we abstracted a string literal binding over a type variable, triggering a CoreLint error when that binding floated to top-level. The solution implemented in this patch fixes this by re-doing dependency analysis on a simplified recursive let binding that is about to be type abstracted, in order to find the minimal set of type variables to abstract over. See wrinkle (AB5) of Note [Floating and type abstraction] for more details. Fixes #24551 - - - - - 8a8ac65a by Matthew Craven at 2024-03-23T00:20:52-04:00 Improve toInteger @Word32 on 64-bit platforms On 64-bit platforms, every Word32 fits in an Int, so we can convert to Int# without having to perform the overflow check integerFromWord# uses internally. - - - - - 0c48f2b9 by Apoorv Ingle at 2024-03-23T00:21:28-04:00 Fix for #24552 (see testcase T24552) Fixes for a bug in desugaring pattern synonyms matches, introduced while working on on expanding `do`-blocks in #18324 The `matchWrapper` unecessarily (and incorrectly) filtered out the default wild patterns in a match. Now the wild pattern alternative is simply ignored by the pm check as its origin is `Generated`. The current code now matches the expected semantics according to the language spec. - - - - - b72705e9 by Simon Peyton Jones at 2024-03-23T00:22:04-04:00 Print more info about kinds in error messages This fixes #24553, where GHC unhelpfully said error: [GHC-83865] • Expected kind ‘* -> * -> *’, but ‘Foo’ has kind ‘* -> * -> *’ See Note [Showing invisible bits of types in error messages] - - - - - 8f7cfc7e by Tristan Cacqueray at 2024-03-23T00:22:44-04:00 docs: remove the don't use float hint This hint is outdated, ``Complex Float`` are now specialised, and the heap space suggestion needs more nuance so it should be explained in the unboxed/storable array documentation. - - - - - 5bd8ed53 by Andreas Klebinger at 2024-03-23T16:18:33-04:00 NCG: Fix a bug in jump shortcutting. When checking if a jump has more than one destination account for the possibility of some jumps not being representable by a BlockId. We do so by having isJumpishInstr return a `Maybe BlockId` where Nothing represents non-BlockId jump destinations. Fixes #24507 - - - - - 8d67f247 by Ben Gamari at 2024-03-23T16:19:09-04:00 docs: Drop old release notes, add for 9.12.1 - - - - - 7db8c992 by Cheng Shao at 2024-03-25T13:45:46-04:00 rts: fix clang compilation on aarch64 This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h which causes "error: address argument to atomic operation must be a pointer to _Atomic type" when compiling with clang on aarch64. - - - - - 237194ce by Sylvain Henry at 2024-03-25T13:46:27-04:00 Lexer: fix imports for Alex 3.5.1 (#24583) - - - - - 810660b7 by Cheng Shao at 2024-03-25T22:19:16-04:00 libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6 This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which includes numerous upstream libffi fixes, especially https://github.com/libffi/libffi/issues/760. - - - - - d2ba41e8 by Alan Zimmerman at 2024-03-25T22:19:51-04:00 EPA: do not duplicate comments in signature RHS - - - - - 32a8103f by Rodrigo Mesquita at 2024-03-26T21:16:12-04:00 configure: Use LDFLAGS when trying linkers A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to check for a working linker. If either of these fail, we try the next in line. However, we were not considering the `$LDFLAGS` when checking if these linkers worked. So we would pick a linker that does not support the current $LDFLAGS and fail further down the line when we used that linker with those flags. Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not supported by `ld.gold` but that was being picked still. - - - - - bf65a7c3 by Rodrigo Mesquita at 2024-03-26T21:16:48-04:00 bindist: Clean xattrs of bin and lib at configure time For issue #21506, we started cleaning the extended attributes of binaries and libraries from the bindist *after* they were installed to workaround notarisation (#17418), as part of `make install`. However, the `ghc-toolchain` binary that is now shipped with the bindist must be run at `./configure` time. Since we only cleaned the xattributes of the binaries and libs after they were installed, in some situations users would be unable to run `ghc-toolchain` from the bindist, failing at configure time (#24554). In this commit we move the xattr cleaning logic to the configure script. Fixes #24554 - - - - - cfeb70d3 by Rodrigo Mesquita at 2024-03-26T21:17:24-04:00 Revert "NCG: Fix a bug in jump shortcutting." This reverts commit 5bd8ed53dcefe10b72acb5729789e19ceb22df66. Fixes #24586 - - - - - 13223f6d by Serge S. Gulin at 2024-03-27T07:28:51-04:00 JS: `h$rts_isProfiled` is removed from `profiling` and left its version at `rts/js/config.js` - - - - - 0acfe391 by Alan Zimmerman at 2024-03-27T07:29:27-04:00 EPA: Do not extend declaration range for trailine zero len semi The lexer inserts virtual semicolons having zero width. Do not use them to extend the list span of items in a list. - - - - - cd0fb82f by Alan Zimmerman at 2024-03-27T19:33:08+00:00 EPA: Fix FamDecl range The span was incorrect if opt_datafam_kind_sig was empty - - - - - f8f384a8 by Ben Gamari at 2024-03-29T01:23:03-04:00 Fix type of _get_osfhandle foreign import Fixes #24601. - - - - - 00d3ecf0 by Alan Zimmerman at 2024-03-29T12:19:10+00:00 EPA: Extend StringLiteral range to include trailing commas This goes slightly against the exact printing philosophy where trailing decorations should be in an annotation, but the practicalities of adding it to the WarningTxt environment, and the problems caused by deviating do not make a more principles approach worthwhile. - - - - - efab3649 by brandon s allbery kf8nh at 2024-03-31T20:04:01-04:00 clarify Note [Preproccesing invocations] - - - - - c8a4c050 by Ben Gamari at 2024-04-02T12:50:35-04:00 rts: Fix TSAN_ENABLED CPP guard This should be `#if defined(TSAN_ENABLED)`, not `#if TSAN_ENABLED`, lest we suffer warnings. - - - - - e91dad93 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix errors when compiling with TSAN This commit fixes rts compilation errors when compiling with TSAN: - xxx_FENCE macros are redefined and trigger CPP warnings. - Use SIZEOF_W. WORD_SIZE_IN_BITS is provided by MachDeps.h which Cmm.h doesn't include by default. - - - - - a9ab9455 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix clang-specific errors when compiling with TSAN This commit fixes clang-specific rts compilation errors when compiling with TSAN: - clang doesn't have -Wtsan flag - Fix prototype of ghc_tsan_* helper functions - __tsan_atomic_* functions aren't clang built-ins and sanitizer/tsan_interface_atomic.h needs to be included - On macOS, TSAN runtime library is libclang_rt.tsan_osx_dynamic.dylib, not libtsan. -fsanitize-thread as a link-time flag will take care of linking the TSAN runtime library anyway so remove tsan as an rts extra library - - - - - 865bd717 by Cheng Shao at 2024-04-02T12:50:35-04:00 compiler: fix github link to __tsan_memory_order in a comment - - - - - 07cb627c by Cheng Shao at 2024-04-02T12:50:35-04:00 ci: improve TSAN CI jobs - Run TSAN jobs with +thread_sanitizer_cmm which enables Cmm instrumentation as well. - Run TSAN jobs in deb12 which ships gcc-12, a reasonably recent gcc that @bgamari confirms he's using in #GHC:matrix.org. Ideally we should be using latest clang release for latest improvements in sanitizers, though that's left as future work. - Mark TSAN jobs as manual+allow_failure in validate pipelines. The purpose is to demonstrate that we have indeed at least fixed building of TSAN mode in CI without blocking the patch to land, and once merged other people can begin playing with TSAN using their own dev setups and feature branches. - - - - - a1c18c7b by Andrei Borzenkov at 2024-04-02T12:51:11-04:00 Merge tc_infer_hs_type and tc_hs_type into one function using ExpType philosophy (#24299, #23639) This patch implements refactoring which is a prerequisite to updating kind checking of type patterns. This is a huge simplification of the main worker that checks kind of HsType. It also fixes the issues caused by previous code duplication, e.g. that we didn't add module finalizers from splices in inference mode. - - - - - 817e8936 by Rodrigo Mesquita at 2024-04-02T20:13:05-04:00 th: Hide the Language.Haskell.TH.Lib.Internal module from haddock Fixes #24562 - - - - - b36ee57b by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: reenable h$appendToHsString optimization (#24495) The optimization introducing h$appendToHsString wasn't kicking in anymore (while it did in 9.8.1) because of the changes introduced in #23270 (7e0c8b3bab30). This patch reenables the optimization by matching on case-expression, as done in Cmm for unpackCString# standard thunks. The test is also T24495 added in the next commits (two commits for ease of backporting to 9.8). - - - - - 527616e9 by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: fix h$appendToHsString implementation (#24495) h$appendToHsString needs to wrap its argument in an updatable thunk to behave like unpackAppendCString#. Otherwise if a SingleEntry thunk is passed, it is stored as-is in a CONS cell, making the resulting list impossible to deepseq (forcing the thunk doesn't update the contents of the CONS cell)! The added test checks that the optimization kicks in and that h$appendToHsString works as intended. Fix #24495 - - - - - faa30b41 by Simon Peyton Jones at 2024-04-02T20:14:22-04:00 Deal with duplicate tyvars in type declarations GHC was outright crashing before this fix: #24604 - - - - - e0b0c717 by Simon Peyton Jones at 2024-04-02T20:14:58-04:00 Try using MCoercion in exprIsConApp_maybe This is just a simple refactor that makes exprIsConApp_maybe a little bit more direct, simple, and efficient. Metrics: compile_time/bytes allocated geo. mean -0.1% minimum -2.0% maximum -0.0% Not a big gain, but worthwhile given that the code is, if anything, easier to grok. - - - - - 15f4d867 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Initial ./configure support for selecting I/O managers In this patch we just define new CPP vars, but don't yet use them or replace the existing approach. That will follow. The intention here is that every I/O manager can be enabled/disabled at GHC build time (subject to some constraints). More than one I/O manager can be enabled to be built. At least one I/O manager supporting the non-threaded RTS must be enabled as well as at least one supporting the non-threaded RTS. The I/O managers enabled here will become the choices available at runtime at RTS startup (in later patches). The choice can be made with RTS flags. There are separate sets of choices for the threaded and non-threaded RTS ways, because most I/O managers are specific to these ways. Furthermore we must establish a default I/O manager for the threaded and non-threaded RTS. Most I/O managers are platform-specific so there are checks to ensure each one can be enabled on the platform. Such checks are also where (in future) any system dependencies (e.g. libraries) can be checked. The output is a set of CPP flags (in the mk/config.h file), with one flag per named I/O manager: * IOMGR_BUILD_<name> : which ones should be built (some) * IOMGR_DEFAULT_NON_THREADED_<name> : which one is default (exactly one) * IOMGR_DEFAULT_THREADED_<name> : which one is default (exactly one) and a set of derived flags in IOManager.h * IOMGR_ENABLED_<name> : enabled for the current RTS way Note that IOMGR_BUILD_<name> just says that an I/O manager will be built for _some_ RTS way (i.e. threaded or non-threaded). The derived flags IOMGR_ENABLED_<name> in IOManager.h say if each I/O manager is enabled in the "current" RTS way. These are the ones that can be used for conditional compilation of the I/O manager code. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - 85b0f87a by Duncan Coutts at 2024-04-03T01:27:17-04:00 Change the handling of the RTS flag --io-manager= Now instead of it being just used on Windows to select between the WinIO vs the MIO or Win32-legacy I/O managers, it is now used on all platforms for selecting the I/O manager to use. Right now it remains the case that there is only an actual choice on Windows, but that will change later. Document the --io-manager flag in the user guide. This change is also reflected in the RTS flags types in the base library. Deprecate the export of IoSubSystem from GHC.RTS.Flags with a message to import it from GHC.IO.Subsystem. The way the 'IoSubSystem' is detected also changes. Instead of looking at the RTS flag, there is now a C bool global var in the RTS which gets set on startup when the I/O manager is selected. This bool var says whether the selected I/O manager classifies as "native" on Windows, which in practice means the WinIO I/O manager has been selected. Similarly, the is_io_mng_native_p RTS helper function is re-implemented in terms of the selected I/O manager, rather than based on the RTS flags. We do however remove the ./configure --native-io-manager flag because we're bringing the WinIO/MIO/Win32-legacy choice under the new general scheme for selecting I/O managers, and that new scheme involves no ./configure time user choices, just runtime RTS flag choices. - - - - - 1a8f020f by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert {init,stop,exit}IOManager to switch style Rather than ad-hoc cpp conitionals on THREADED_RTS and mingw32_HOST_OS, we use a style where we switch on the I/O manager impl, with cases for each I/O manager impl. - - - - - a5bad3d2 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Split up the CapIOManager content by I/O manager Using the new IOMGR_ENABLED_<name> CPP defines. - - - - - 1d36e609 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert initIOManagerAfterFork and wakeupIOManager to switch style - - - - - c2f26f36 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of waitRead#/Write# from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. - - - - - 457705a8 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of the delay# impl from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. Uses a new IOManager API: syncDelay, following the naming convention of sync* for thread-synchronous I/O & timer/delay operations. As part of porting from cmm to C, we maintain the rule that the why_blocked gets accessed using load acquire and store release atomic memory operations. There was one exception to this rule: in the delay# primop cmm code on posix (not win32), the why_blocked was being updated using a store relaxed, not a store release. I've no idea why. In this convesion I'm playing it safe here and using store release consistently. - - - - - e93058e0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 insertIntoSleepingQueue is no longer public No longer defined in IOManager.h, just a private function in IOManager.c. Since it is no longer called from cmm code, just from syncDelay. It ought to get moved further into the select() I/O manager impl, rather than living in IOManager.c. On the other hand appendToIOBlockedQueue is still called from cmm code in the win32-legacy I/O manager primops async{Read,Write}#, and it is also used by the select() I/O manager. Update the CPP and comments to reflect this. - - - - - 60ce9910 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move anyPendingTimeoutsOrIO impl from .h to .c The implementation is eventually going to need to use more private things, which will drag in unwanted includes into IOManager.h, so it's better to move the impl out of the header file and into the .c file, at the slight cost of it no longer being inline. At the same time, change to the "switch (iomgr_type)" style. - - - - - f70b8108 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Take a simpler approach to gcc warnings in IOManager.c We have lots of functions with conditional implementations for different I/O managers. Some functions, for some I/O managers, naturally have implementations that do nothing or barf. When only one such I/O manager is enabled then the whole function implementation will have an implementation that does nothing or barfs. This then results in warnings from gcc that parameters are unused, or that the function should be marked with attribute noreturn (since barf does not return). The USED_IF_THREADS trick for fine-grained warning supression is fine for just two cases, but an equivalent here would need USED_IF_THE_ONLY_ENABLED_IOMGR_IS_X_OR_Y which would have combinitorial blowup. So we take a coarse grained approach and simply disable these two warnings for the whole file. So we use a GCC pragma, with its handy push/pop support: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" #pragma GCC diagnostic ignored "-Wunused-parameter" ... #pragma GCC diagnostic pop - - - - - b48805b9 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add a new trace class for the iomanager It makes sense now for it to be separate from the scheduler class of tracers. Enabled with +RTS -Do. Document the -Do debug flag in the user guide. - - - - - f0c1f862 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Have the throwTo impl go via (new) IOManager APIs rather than directly operating on the IO manager's data structures. Specifically, when thowing an async exception to a thread that is blocked waiting for I/O or waiting for a timer, then we want to cancel that I/O waiting or cancel the timer. Currently this is done directly in removeFromQueues() in RaiseAsync.c. We want it to go via proper APIs both for modularity but also to let us support multiple I/O managers. So add sync{IO,Delay}Cancel, which is the cancellation for the corresponding sync{IO,Delay}. The implementations of these use the usual "switch (iomgr_type)" style. - - - - - 4f9e9c4e by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move awaitEvent into a proper IOManager API and have the scheduler use it. Previously the scheduler calls awaitEvent directly, and awaitEvent is implemented directly in the RTS I/O managers (select, win32). This relies on the old scheme where there's a single active I/O manager for each platform and RTS way. We want to move that to go via an API in IOManager.{h,c} which can then call out to the active I/O manager. Also take the opportunity to split awaitEvent into two. The existing awaitEvent has a bool wait parameter, to say if the call should be blocking or non-blocking. We split this into two separate functions: pollCompletedTimeoutsOrIO and awaitCompletedTimeoutsOrIO. We split them for a few reasons: they have different post-conditions (specifically the await version is supposed to guarantee that there are threads runnable when it completes). Secondly, it is also anticipated that in future I/O managers the implementations of the two cases will be simpler if they are separated. - - - - - 5ad4b30f by Duncan Coutts at 2024-04-03T01:27:18-04:00 Rename awaitEvent in select and win32 I/O managers These are now just called from IOManager.c and are the per-I/O manager backend impls (whereas previously awaitEvent was the entry point). Follow the new naming convention in the IOManager.{h,c} of awaitCompletedTimeoutsOrIO, with the I/O manager's name as a suffix: so awaitCompletedTimeoutsOrIO{Select,Win32}. - - - - - d30c6bc6 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Tidy up a couple things in Select.{h,c} Use the standard #include {Begin,End}Private.h style rather than RTS_PRIVATE on individual decls. And conditionally build the code for the select I/O manager based on the new CPP IOMGR_ENABLED_SELECT rather than on THREADED_RTS. - - - - - 4161f516 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add an IOManager API for scavenging TSO blocked_info When the GC scavenges a TSO it needs to scavenge the tso->blocked_info but the blocked_info is a big union and what lives there depends on the two->why_blocked, which for I/O-related reasons is something that in principle is the responsibility of the I/O manager and not the GC. So the right thing to do is for the GC to ask the I/O manager to sscavenge the blocked_info if it encounters any I/O-related why_blocked reasons. So we add scavengeTSOIOManager in IOManager.{h,c} with the usual style. Now as it happens, right now, there is no special scavenging to do, so the implementation of scavengeTSOIOManager is a fancy no-op. That's because the select I/O manager uses only the fd and target members, which are not GC pointers, and the win32-legacy I/O manager _ought_ to be using GC-managed heap objects for the StgAsyncIOResult but it is actually usingthe C heap, so again no GC pointers. If the win32-legacy were doing this more sensibly, then scavengeTSOIOManager would be the right place to do the GC magic. Future I/O managers will need GC heap objects in the tso->blocked_info and will make use of this functionality. - - - - - 94a87d21 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add I/O manager API notifyIOManagerCapabilitiesChanged Used in setNumCapabilities. It only does anything for MIO on Posix. Previously it always invoked Haskell code, but that code only did anything on non-Windows (and non-JS), and only threaded. That currently effectively means the MIO I/O manager on Posix. So now it only invokes it for the MIO Posix case. - - - - - 3be6d591 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Select an I/O manager early in RTS startup We need to select the I/O manager to use during startup before the per-cap I/O manager initialisation. - - - - - aaa294d0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Make struct CapIOManager be fully opaque Provide an opaque (forward) definition in Capability.h (since the cap contains a *CapIOManager) and then only provide a full definition in a new file IOManagerInternals.h. This new file is only supposed to be included by the IOManager implementation, not by its users. So that means IOManager.c and individual I/O manager implementations. The posix/Signals.c still needs direct access, but that should be eliminated. Anything that needs direct access either needs to be clearly part of an I/O manager (e.g. the sleect() one) or go via a proper API. - - - - - 877a2a80 by Duncan Coutts at 2024-04-03T01:27:18-04:00 The select() I/O manager does have some global initialisation It's just to make sure an exception CAF is a GC root. - - - - - 9c51473b by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add tracing for the main I/O manager actions Using the new tracer class. Note: The unconditional definition of showIOManager should be compatible with the debugTrace change in 7c7d1f6. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - c7d3e3a3 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Include the default I/O manager in the +RTS --info output Document the extra +RTS --info output in the user guide - - - - - 8023bad4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 waitRead# / waitWrite# do not work for win32-legacy I/O manager Previously it was unclear that they did not work because the code path was shared with other I/O managers (in particular select()). Following the code carefully shows that what actually happens is that the calling thread would block forever: the thread will be put into the blocked queue, but no other action is scheduled that will ever result in it getting unblocked. It's better to just fail loudly in case anyone accidentally calls it, also it's less confusing code. - - - - - 83a74d20 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Conditionally ignore some GCC warnings Some GCC versions don't know about some warnings, and they complain that we're ignoring unknown warnings. So we try to ignore the warning based on the GCC version. - - - - - 1adc6fa4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept changes to base-exports All the changes are in fact not changes at all. Previously, the IoSubSystem data type was defined in GHC.RTS.Flags and exported from both GHC.RTS.Flags and GHC.IO.SubSystem. Now, the data type is defined in GHC.IO.SubSystem and still exported from both modules. Therefore, the same exports and same instances are still available from both modules. But the base-exports records only the defining module, and so it looks like a change when it is fully compatible. Related: we do add a deprecation to the export of the type via GHC.RTS.Flags, telling people to use the export from GHC.IO.SubSystem. Also the sort order for some unrelated Show instances changed. No idea why. The same changes apply in the other versions, with a few more changes due to sort order weirdness. - - - - - 8d950968 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept metric decrease in T12227 I can't think of any good reason that anything in this MR should have changed the number of allocations, up or down. (Yes this is an empty commit.) Metric Decrease: T12227 - - - - - e869605e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Several improvements to the handling of coercions * Make `mkSymCo` and `mkInstCo` smarter Fixes #23642 * Fix return role of `SelCo` in the coercion optimiser. Fixes #23617 * Make the coercion optimiser `opt_trans_rule` work better for newtypes Fixes #23619 - - - - - 1efd0714 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 FloatOut: improve floating for join point See the new Note [Floating join point bindings]. * Completely get rid of the complicated join_ceiling nonsense, which I have never understood. * Do not float join points at all, except perhaps to top level. * Some refactoring around wantToFloat, to treat Rec and NonRec more uniformly - - - - - 9c00154d by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve eta-expansion through call stacks See Note [Eta expanding through CallStacks] in GHC.Core.Opt.Arity This is a one-line change, that fixes an inconsistency - || isCallStackPredTy ty + || isCallStackPredTy ty || isCallStackTy ty - - - - - 95a9a172 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Spelling, layout, pretty-printing only - - - - - bdf1660f by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve exprIsConApp_maybe a little Eliminate a redundant case at birth. This sometimes reduces Simplifier iterations. See Note [Case elim in exprIsConApp_maybe]. - - - - - 609cd32c by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Inline GHC.HsToCore.Pmc.Solver.Types.trvVarInfo When exploring compile-time regressions after meddling with the Simplifier, I discovered that GHC.HsToCore.Pmc.Solver.Types.trvVarInfo was very delicately balanced. It's a small, heavily used, overloaded function and it's important that it inlines. By a fluke it was before, but at various times in my journey it stopped doing so. So I just added an INLINE pragma to it; no sense in depending on a delicately-balanced fluke. - - - - - ae24c9bc by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Slight improvement in WorkWrap Ensure that WorkWrap preserves lambda binders, in case of join points. Sadly I have forgotten why I made this change (it was while I was doing a lot of meddling in the Simplifier, but * it does no harm, * it is slightly more efficient, and * presumably it made something better! Anyway I have kept it in a separate commit. - - - - - e9297181 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Use named record fields for the CastIt { ... } data constructor This is a pure refactor - - - - - b4581e23 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Remove a long-commented-out line Pure refactoring - - - - - e026bdf2 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Simplifier improvements This MR started as: allow the simplifer to do more in one pass, arising from places I could see the simplifier taking two iterations where one would do. But it turned into a larger project, because these changes unexpectedly made inlining blow up, especially join points in deeply-nested cases. The main changes are below. There are also many new or rewritten Notes. Avoiding simplifying repeatedly ~~~~~~~~~~~~~~~ See Note [Avoiding simplifying repeatedly] * The SimplEnv now has a seInlineDepth field, which says how deep in unfoldings we are. See Note [Inline depth] in Simplify.Env. Currently used only for the next point: avoiding repeatedly simplifying coercions. * Avoid repeatedly simplifying coercions. see Note [Avoid re-simplifying coercions] in Simplify.Iteration As you'll see from the Note, this makes use of the seInlineDepth. * Allow Simplify.Iteration.simplAuxBind to inline used-once things. This is another part of Note [Post-inline for single-use things], and is really good for reducing simplifier iterations in situations like case K e of { K x -> blah } wher x is used once in blah. * Make GHC.Core.SimpleOpt.exprIsConApp_maybe do some simple case elimination. Note [Case elim in exprIsConApp_maybe] * Improve the case-merge transformation: - Move the main code to `GHC.Core.Utils.mergeCaseAlts`, to join `filterAlts` and friends. See Note [Merge Nested Cases] in GHC.Core.Utils. - Add a new case for `tagToEnum#`; see wrinkle (MC3). - Add a new case to look through join points: see wrinkle (MC4) postInlineUnconditionally ~~~~~~~~~~~~~~~~~~~~~~~~~ * Allow Simplify.Utils.postInlineUnconditionally to inline variables that are used exactly once. See Note [Post-inline for single-use things]. * Do not postInlineUnconditionally join point, ever. Doing so does not reduce allocation, which is the main point, and with join points that are used a lot it can bloat code. See point (1) of Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration. * Do not postInlineUnconditionally a strict (demanded) binding. It will not allocate a thunk (it'll turn into a case instead) so again the main point of inlining it doesn't hold. Better to check per-call-site. * Improve occurrence analyis for bottoming function calls, to help postInlineUnconditionally. See Note [Bottoming function calls] in GHC.Core.Opt.OccurAnal Inlining generally ~~~~~~~~~~~~~~~~~~ * In GHC.Core.Opt.Simplify.Utils.interestingCallContext, use RhsCtxt NonRecursive (not BoringCtxt) for a plain-seq case. See Note [Seq is boring] Also, wrinkle (SB1), inline in that `seq` context only for INLINE functions (UnfWhen guidance). * In GHC.Core.Opt.Simplify.Utils.interestingArg, - return ValueArg for OtherCon [c1,c2, ...], but - return NonTrivArg for OtherCon [] This makes a function a little less likely to inline if all we know is that the argument is evaluated, but nothing else. * isConLikeUnfolding is no longer true for OtherCon {}. This propagates to exprIsConLike. Con-like-ness has /positive/ information. Join points ~~~~~~~~~~~ * Be very careful about inlining join points. See these two long Notes Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline * When making join points, don't do so if the join point is so small it will immediately be inlined; check uncondInlineJoin. * In GHC.Core.Opt.Simplify.Inline.tryUnfolding, improve the inlining heuristics for join points. In general we /do not/ want to inline join points /even if they are small/. See Note [Duplicating join points] GHC.Core.Opt.Simplify.Iteration. But sometimes we do: see Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline; and the new `isBetterUnfoldingThan` function. * Do not add an unfolding to a join point at birth. This is a tricky one and has a long Note [Do not add unfoldings to join points at birth] It shows up in two places - In `mkDupableAlt` do not add an inlining - (trickier) In `simplLetUnfolding` don't add an unfolding for a fresh join point I am not fully satisifed with this, but it works and is well documented. * In GHC.Core.Unfold.sizeExpr, make jumps small, so that we don't penalise having a non-inlined join point. Performance changes ~~~~~~~~~~~~~~~~~~~ * Binary sizes fall by around 2.6%, according to nofib. * Compile times improve slightly. Here are the figures over 1%. I investiate the biggest differnce in T18304. It's a very small module, just a few hundred nodes. The large percentage difffence is due to a single function that didn't quite inline before, and does now, making code size a bit bigger. I decided gains outweighed the losses. Metrics: compile_time/bytes allocated (changes over +/- 1%) ------------------------------------------------ CoOpt_Singletons(normal) -9.2% GOOD LargeRecord(normal) -23.5% GOOD MultiComponentModulesRecomp(normal) +1.2% MultiLayerModulesTH_OneShot(normal) +4.1% BAD PmSeriesS(normal) -3.8% PmSeriesV(normal) -1.5% T11195(normal) -1.3% T12227(normal) -20.4% GOOD T12545(normal) -3.2% T12707(normal) -2.1% GOOD T13253(normal) -1.2% T13253-spj(normal) +8.1% BAD T13386(normal) -3.1% GOOD T14766(normal) -2.6% GOOD T15164(normal) -1.4% T15304(normal) +1.2% T15630(normal) -8.2% T15630a(normal) NEW T15703(normal) -14.7% GOOD T16577(normal) -2.3% GOOD T17516(normal) -39.7% GOOD T18140(normal) +1.2% T18223(normal) -17.1% GOOD T18282(normal) -5.0% GOOD T18304(normal) +10.8% BAD T18923(normal) -2.9% GOOD T1969(normal) +1.0% T19695(normal) -1.5% T20049(normal) -12.7% GOOD T21839c(normal) -4.1% GOOD T3064(normal) -1.5% T3294(normal) +1.2% BAD T4801(normal) +1.2% T5030(normal) -15.2% GOOD T5321Fun(normal) -2.2% GOOD T6048(optasm) -16.8% GOOD T783(normal) -1.2% T8095(normal) -6.0% GOOD T9630(normal) -4.7% GOOD T9961(normal) +1.9% BAD WWRec(normal) -1.4% info_table_map_perf(normal) -1.3% parsing001(normal) +1.5% geo. mean -2.0% minimum -39.7% maximum +10.8% * Runtimes generally improve. In the testsuite perf/should_run gives: Metrics: runtime/bytes allocated ------------------------------------------ Conversions(normal) -0.3% T13536a(optasm) -41.7% GOOD T4830(normal) -0.1% haddock.Cabal(normal) -0.1% haddock.base(normal) -0.1% haddock.compiler(normal) -0.1% geo. mean -0.8% minimum -41.7% maximum +0.0% * For runtime, nofib is a better test. The news is mostly good. Here are the number more than +/- 0.1%: # bytes allocated ==========================++========== imaginary/digits-of-e1 || -14.40% imaginary/digits-of-e2 || -4.41% imaginary/paraffins || -0.17% imaginary/rfib || -0.15% imaginary/wheel-sieve2 || -0.10% real/compress || -0.47% real/fluid || -0.10% real/fulsom || +0.14% real/gamteb || -1.47% real/gg || -0.20% real/infer || +0.24% real/pic || -0.23% real/prolog || -0.36% real/scs || -0.46% real/smallpt || +4.03% shootout/k-nucleotide || -20.23% shootout/n-body || -0.42% shootout/spectral-norm || -0.13% spectral/boyer2 || -3.80% spectral/constraints || -0.27% spectral/hartel/ida || -0.82% spectral/mate || -20.34% spectral/para || +0.46% spectral/rewrite || +1.30% spectral/sphere || -0.14% ==========================++========== geom mean || -0.59% real/smallpt has a huge nest of local definitions, and I could not pin down a reason for a regression. But there are three big wins! Metric Decrease: CoOpt_Singletons LargeRecord T12227 T12707 T13386 T13536a T14766 T15703 T16577 T17516 T18223 T18282 T18923 T21839c T20049 T5321Fun T5030 T6048 T8095 T9630 T783 Metric Increase: MultiLayerModulesTH_OneShot T13253-spj T18304 T18698a T9961 T3294 - - - - - 27db3c5e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Testsuite message changes from simplifier improvements - - - - - 271a7812 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Account for bottoming functions in OccurAnal This fixes #24582, a small but long-standing bug - - - - - 0fde229f by Ben Gamari at 2024-04-04T07:04:58-04:00 testsuite: Introduce template-haskell-exports test - - - - - 0c4a9686 by Luite Stegeman at 2024-04-04T07:05:39-04:00 Update correct counter in bumpTickyAllocd - - - - - 5f085d3a by Fendor at 2024-04-04T14:47:33-04:00 Replace `SizedSeq` with `FlatBag` for flattened structure LinkedLists are notoriously memory ineffiecient when all we do is traversing a structure. As 'UnlinkedBCO' has been identified as a data structure that impacts the overall memory usage of GHCi sessions, we avoid linked lists and prefer flattened structure for storing. We introduce a new memory efficient representation of sequential elements that has special support for the cases: * Empty * Singleton * Tuple Elements This improves sharing in the 'Empty' case and avoids the overhead of 'Array' until its constant overhead is justified. - - - - - 82cfe10c by Fendor at 2024-04-04T14:47:33-04:00 Compact FlatBag array representation `Array` contains three additional `Word`'s we do not need in `FlatBag`. Move `FlatBag` to `SmallArray`. Expand the API of SmallArray by `sizeofSmallArray` and add common traversal functions, such as `mapSmallArray` and `foldMapSmallArray`. Additionally, allow users to force the elements of a `SmallArray` via `rnfSmallArray`. - - - - - 36a75b80 by Andrei Borzenkov at 2024-04-04T14:48:10-04:00 Change how invisible patterns represented in haskell syntax and TH AST (#24557) Before this patch: data ArgPat p = InvisPat (LHsType p) | VisPat (LPat p) With this patch: data Pat p = ... | InvisPat (LHsType p) ... And the same transformation in the TH land. The rest of the changes is just updating code to handle new AST and writing tests to check if it is possible to create invalid states using TH. Metric Increase: MultiLayerModulesTH_OneShot - - - - - 28009fbc by Matthew Pickering at 2024-04-04T14:48:46-04:00 Fix off by one error in seekBinNoExpand and seekBin - - - - - 9b9e031b by Ben Gamari at 2024-04-04T21:30:08-04:00 compiler: Allow more types in GHCForeignImportPrim For many, many years `GHCForeignImportPrim` has suffered from the rather restrictive limitation of not allowing any non-trivial types in arguments or results. This limitation was justified by the code generator allegely barfing in the presence of such types. However, this restriction appears to originate well before the NCG rewrite and the new NCG does not appear to have any trouble with such types (see the added `T24598` test). Lift this restriction. Fixes #24598. - - - - - 1324b862 by Alan Zimmerman at 2024-04-04T21:30:44-04:00 EPA: Use EpaLocation not SrcSpan in ForeignDecls This allows us to update them for makeDeltaAst in ghc-exactprint - - - - - 19883a23 by Alan Zimmerman at 2024-04-05T16:58:17-04:00 EPA: Use EpaLocation for RecFieldsDotDot So we can update it to a delta position in makeDeltaAst if needed. - - - - - e8724327 by Matthew Pickering at 2024-04-05T16:58:53-04:00 Remove accidentally committed test.hs - - - - - 88cb3e10 by Fendor at 2024-04-08T09:03:34-04:00 Avoid UArray when indexing is not required `UnlinkedBCO`'s can occur many times in the heap. Each `UnlinkedBCO` references two `UArray`'s but never indexes them. They are only needed to encode the elements into a `ByteArray#`. The three words for the lower bound, upper bound and number of elements are essentially unused, thus we replace `UArray` with a wrapper around `ByteArray#`. This saves us up to three words for each `UnlinkedBCO`. Further, to avoid re-allocating these words for `ResolvedBCO`, we repeat the procedure for `ResolvedBCO` and add custom `Binary` and `Show` instances. For example, agda's repl session has around 360_000 UnlinkedBCO's, so avoiding these three words is already saving us around 8MB residency. - - - - - f2cc1107 by Fendor at 2024-04-08T09:04:11-04:00 Never UNPACK `FastMutInt` for counting z-encoded `FastString`s In `FastStringTable`, we count the number of z-encoded FastStrings that exist in a GHC session. We used to UNPACK the counters to not waste memory, but live retainer analysis showed that we allocate a lot of `FastMutInt`s, retained by `mkFastZString`. We lazily compute the `FastZString`, only incrementing the counter when the `FastZString` is forced. The function `mkFastStringWith` calls `mkZFastString` and boxes the `FastMutInt`, leading to the following core: mkFastStringWith = \ mk_fs _ -> = case stringTable of { FastStringTable _ n_zencs segments# _ -> ... case ((mk_fs (I# ...) (FastMutInt n_zencs)) `cast` <Co:2> :: ...) ... Marking this field as `NOUNPACK` avoids this reboxing, eliminating the allocation of a fresh `FastMutInt` on every `FastString` allocation. - - - - - c6def949 by Matthew Pickering at 2024-04-08T16:06:51-04:00 Force in_multi to avoid retaining entire hsc_env - - - - - fbb91a63 by Fendor at 2024-04-08T16:06:51-04:00 Eliminate name thunk in declaration fingerprinting Thunk analysis showed that we have about 100_000 thunks (in agda and `-fwrite-simplified-core`) pointing to the name of the name decl. Forcing this thunk fixes this issue. The thunk created here is retained by the thunk created by forkM, it is better to eagerly force this because the result (a `Name`) is already retained indirectly via the `IfaceDecl`. - - - - - 3b7b0c1c by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Use EpaLocation in WarningTxt This allows us to use an EpDelta if needed when using makeDeltaAst. - - - - - 12b997df by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Move DeltaPos and EpaLocation' into GHC.Types.SrcLoc This allows us to use a NoCommentsLocation for the possibly trailing comma location in a StringLiteral. This in turn allows us to correctly roundtrip via makeDeltaAst. - - - - - 868c8a78 by Fendor at 2024-04-09T08:51:50-04:00 Prefer packed representation for CompiledByteCode As there are many 'CompiledByteCode' objects alive during a GHCi session, representing its element in a more packed manner improves space behaviour at a minimal cost. When running GHCi on the agda codebase, we find around 380 live 'CompiledByteCode' objects. Packing their respective 'UnlinkedByteCode' can save quite some pointers. - - - - - be3bddde by Alan Zimmerman at 2024-04-09T08:52:26-04:00 EPA: Capture all comments in a ClassDecl Hopefully the final fix needed for #24533 - - - - - 3d0806fc by Jade at 2024-04-10T05:39:53-04:00 Validate -main-is flag using parseIdentifier Fixes #24368 - - - - - dd530bb7 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: free error message before returning Fixes a memory leak in rts/linker/PEi386.c - - - - - e008a19a by Alexis King at 2024-04-10T05:40:29-04:00 linker: Avoid linear search when looking up Haskell symbols via dlsym See the primary Note [Looking up symbols in the relevant objects] for a more in-depth explanation. When dynamically loading a Haskell symbol (typical when running a splice or GHCi expression), before this commit we would search for the symbol in all dynamic libraries that were loaded. However, this could be very inefficient when too many packages are loaded (which can happen if there are many package dependencies) because the time to lookup the would be linear in the number of packages loaded. This commit drastically improves symbol loading performance by introducing a mapping from units to the handles of corresponding loaded dlls. These handles are returned by dlopen when we load a dll, and can then be used to look up in a specific dynamic library. Looking up a given Name is now much more precise because we can get lookup its unit in the mapping and lookup the symbol solely in the handles of the dynamic libraries loaded for that unit. In one measurement, the wait time before the expression was executed went from +-38 seconds down to +-2s. This commit also includes Note [Symbols may not be found in pkgs_loaded], explaining the fallback to the old behaviour in case no dll can be found in the unit mapping for a given Name. Fixes #23415 Co-authored-by: Rodrigo Mesquita (@alt-romes) - - - - - dcfaa190 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: Make addDLL a wrapper around loadNativeObj Rewrite the implementation of `addDLL` as a wrapper around the more principled `loadNativeObj` rts linker function. The latter should be preferred while the former is preserved for backwards compatibility. `loadNativeObj` was previously only available on ELF platforms, so this commit further refactors the rts linker to transform loadNativeObj_ELF into loadNativeObj_POSIX, which is available in ELF and MachO platforms. The refactor made it possible to remove the `dl_mutex` mutex in favour of always using `linker_mutex` (rather than a combination of both). Lastly, we implement `loadNativeObj` for Windows too. - - - - - 12931698 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 Use symbol cache in internal interpreter too This commit makes the symbol cache that was used by the external interpreter available for the internal interpreter too. This follows from the analysis in #23415 that suggests the internal interpreter could benefit from this cache too, and that there is no good reason not to have the cache for it too. It also makes it a bit more uniform to have the symbol cache range over both the internal and external interpreter. This commit also refactors the cache into a function which is used by both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the caching logic to `lookupSymbolInDLL` too. - - - - - dccd3ea1 by Ben Gamari at 2024-04-10T05:40:29-04:00 testsuite: Add test for lookupSymbolInNativeObj - - - - - 1b1a92bd by Alan Zimmerman at 2024-04-10T05:41:05-04:00 EPA: Remove unnecessary XRec in CompleteMatchSig The XRec for [LIdP pass] is not needed for exact printing, remove it. - - - - - 6e18ce2b by Ben Gamari at 2024-04-12T08:16:09-04:00 users-guide: Clarify language extension documentation Over the years the users guide's language extension documentation has gone through quite a few refactorings. In the process some of the descriptions have been rendered non-sensical. For instance, the description of `NoImplicitPrelude` actually describes the semantics of `ImplicitPrelude`. To fix this we: * ensure that all extensions are named in their "positive" sense (e.g. `ImplicitPrelude` rather than `NoImplicitPrelude`). * rework the documentation to avoid flag-oriented wording like "enable" and "disable" * ensure that the polarity of the documentation is consistent with reality. Fixes #23895. - - - - - a933aff3 by Zubin Duggal at 2024-04-12T08:16:45-04:00 driver: Make `checkHomeUnitsClosed` faster The implementation of `checkHomeUnitsClosed` was traversing every single path in the unit dependency graph - this grows exponentially and quickly grows to be infeasible on larger unit dependency graphs. Instead we replace this with a faster implementation which follows from the specificiation of the closure property - there is a closure error if there are units which are both are both (transitively) depended upon by home units and (transitively) depend on home units, but are not themselves home units. To compute the set of units required for closure, we first compute the closure of the unit dependency graph, then the transpose of this closure, and find all units that are reachable from the home units in the transpose of the closure. - - - - - 23c3e624 by Andreas Klebinger at 2024-04-12T08:17:21-04:00 RTS: Emit warning when -M < -H Fixes #24487 - - - - - d23afb8c by Ben Gamari at 2024-04-12T08:17:56-04:00 testsuite: Add broken test for CApiFFI with -fprefer-bytecode See #24634. - - - - - a4bb3a51 by Ben Gamari at 2024-04-12T08:18:32-04:00 base: Deprecate GHC.Pack As proposed in #21461. Closes #21540. - - - - - 55eb8c98 by Ben Gamari at 2024-04-12T08:19:08-04:00 ghc-internal: Fix mentions of ghc-internal in deprecation warnings Closes #24609. - - - - - b0fbd181 by Ben Gamari at 2024-04-12T08:19:44-04:00 rts: Implement set_initial_registers for AArch64 Fixes #23680. - - - - - 14c9ec62 by Ben Gamari at 2024-04-12T08:20:20-04:00 ghcup-metadata: Use Debian 9 binaries on Ubuntu 16, 17 Closes #24646. - - - - - 35a1621e by Ben Gamari at 2024-04-12T08:20:55-04:00 Bump unix submodule to 2.8.5.1 Closes #24640. - - - - - a1c24df0 by Finley McIlwaine at 2024-04-12T08:21:31-04:00 Correct default -funfolding-use-threshold in docs - - - - - 0255d03c by Oleg Grenrus at 2024-04-12T08:22:07-04:00 FastString is a __Modified__ UTF-8 - - - - - c3489547 by Matthew Pickering at 2024-04-12T13:13:44-04:00 rts: Improve tracing message when nursery is resized It is sometimes more useful to know how much bigger or smaller the nursery got when it is resized. In particular I am trying to investigate situations where we end up with fragmentation due to the nursery (#24577) - - - - - 5e4f4ba8 by Simon Peyton Jones at 2024-04-12T13:14:20-04:00 Don't generate wrappers for `type data` constructors with StrictData Previously, the logic for checking if a data constructor needs a wrapper or not would take into account whether the constructor's fields have explicit strictness (e.g., `data T = MkT !Int`), but the logic would _not_ take into account whether `StrictData` was enabled. This meant that something like `type data T = MkT Int` would incorrectly generate a wrapper for `MkT` if `StrictData` was enabled, leading to the horrible errors seen in #24620. To fix this, we disable generating wrappers for `type data` constructors altogether. Fixes #24620. Co-authored-by: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - dbdf1995 by Alex Mason at 2024-04-15T15:28:26+10:00 Implements MO_S_Mul2 and MO_U_Mul2 using the UMULH, UMULL and SMULH instructions for AArch64 Also adds a test for MO_S_Mul2 - - - - - 42bd0407 by Teo Camarasu at 2024-04-16T20:06:39-04:00 Make template-haskell a stage1 package Promoting template-haskell from a stage0 to a stage1 package means that we can much more easily refactor template-haskell. We implement this by duplicating the in-tree `template-haskell`. A new `template-haskell-next` library is autogenerated to mirror `template-haskell` `stage1:ghc` to depend on the new interface of the library including the `Binary` instances without adding an explicit dependency on `template-haskell`. This is controlled by the `bootstrap-th` cabal flag When building `template-haskell` modules as part of this vendoring we do not have access to quote syntax, so we cannot use variable quote notation (`'Just`). So we either replace these with hand-written `Name`s or hide the code behind CPP. We can remove the `th_hack` from hadrian, which was required when building stage0 packages using the in-tree `template-haskell` library. For more details see Note [Bootstrapping Template Haskell]. Resolves #23536 Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> Co-Authored-By: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - 3d973e47 by Ben Gamari at 2024-04-16T20:07:15-04:00 Bump parsec submodule to 3.1.17.0 - - - - - 9d38bfa0 by Simon Peyton Jones at 2024-04-16T20:07:51-04:00 Clone CoVars in CorePrep This MR addresses #24463. It's all explained in the new Note [Cloning CoVars and TyVars] - - - - - 0fe2b410 by Andreas Klebinger at 2024-04-16T20:08:27-04:00 NCG: Fix a bug where we errounously removed a required jump instruction. Add a new method to the Instruction class to check if we can eliminate a jump in favour of fallthrough control flow. Fixes #24507 - - - - - 9f99126a by Teo Camarasu at 2024-04-16T20:09:04-04:00 Fix documentation preview from doc-tarball job - Include all the .html files and assets in the job artefacts - Include all the .pdf files in the job artefacts - Mark the artefact as an "exposed" artefact meaning it turns up in the UI. Resolves #24651 - - - - - 3a0642ea by Ben Gamari at 2024-04-16T20:09:39-04:00 rts: Ignore EINTR while polling in timerfd itimer implementation While the RTS does attempt to mask signals, it may be that a foreign library unmasks them. This previously caused benign warnings which we now ignore. See #24610. - - - - - 9a53cd3f by Alan Zimmerman at 2024-04-16T20:10:15-04:00 EPA: Add additional comments field to AnnsModule This is used in exact printing to store comments coming after the `where` keyword but before any comments allocated to imports or decls. It is used in ghc-exactprint, see https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195bf47c17d34fa7 - - - - - e5c43259 by Bryan Richter at 2024-04-16T20:10:51-04:00 Remove unrunnable FreeBSD CI jobs FreeBSD runner supply is inelastic. Currently there is only one, and it's unavailable because of a hardware issue. - - - - - 914eb49a by Ben Gamari at 2024-04-16T20:11:27-04:00 rel-eng: Fix mktemp usage in recompress-all We need a temporary directory, not a file. - - - - - f30e4984 by Teo Camarasu at 2024-04-16T20:12:03-04:00 Fix ghc API link in docs/index.html This was missing part of the unit ID meaning it would 404. Resolves #24674 - - - - - d7a3d6b5 by Ben Gamari at 2024-04-16T20:12:39-04:00 template-haskell: Declare TH.Lib.Internal as not-home Rather than `hide`. Closes #24659. - - - - - 5eaa46e7 by Matthew Pickering at 2024-04-19T02:14:55-04:00 testsuite: Rename isCross() predicate to needsTargetWrapper() isCross() was a misnamed because it assumed that all cross targets would provide a target wrapper, but the two most common cross targets (javascript, wasm) don't need a target wrapper. Therefore we rename this predicate to `needsTargetWrapper()` so situations in the testsuite where we can check whether running executables requires a target wrapper or not. - - - - - 55a9d699 by Simon Peyton Jones at 2024-04-19T02:15:32-04:00 Do not float HNFs out of lambdas This MR adjusts SetLevels so that it is less eager to float a HNF (lambda or constructor application) out of a lambda, unless it gets to top level. Data suggests that this change is a small net win: * nofib bytes-allocated falls by -0.09% (but a couple go up) * perf/should_compile bytes-allocated falls by -0.5% * perf/should_run bytes-allocated falls by -0.1% See !12410 for more detail. When fiddling elsewhere, I also found that this patch had a huge positive effect on the (very delicate) test perf/should_run/T21839r But that improvement doesn't show up in this MR by itself. Metric Decrease: MultiLayerModulesRecomp T15703 parsing001 - - - - - f0701585 by Alan Zimmerman at 2024-04-19T02:16:08-04:00 EPA: Fix comments in mkListSyntaxTy0 Also extend the test to confirm. Addresses #24669, 1 of 4 - - - - - b01c01d4 by Serge S. Gulin at 2024-04-19T02:16:51-04:00 JS: set image `x86_64-linux-deb11-emsdk-closure` for build - - - - - c90c6039 by Alan Zimmerman at 2024-04-19T02:17:27-04:00 EPA: Provide correct span for PatBind And remove unused parameter in checkPatBind Contributes to #24669 - - - - - bee54c24 by Krzysztof Gogolewski at 2024-04-19T11:13:00+02:00 Update quantification order following GHC haskell/haddock#23764 - - - - - 2814eb89 by Ben Gamari at 2024-04-19T18:57:05+02:00 hypsrc-test: Fix output of PositionPragmas.html - - - - - 26036f96 by Alan Zimmerman at 2024-04-19T13:11:08-04:00 EPA: Fix span for PatBuilderAppType Include the location of the prefix @ in the span for InVisPat. Also removes unnecessary annotations from HsTP. Contributes to #24669 - - - - - dba03aab by Matthew Craven at 2024-04-19T13:11:44-04:00 testsuite: Give the pre_cmd for mhu-perf more time - - - - - d31fbf6c by Krzysztof Gogolewski at 2024-04-19T21:04:09-04:00 Fix quantification order for a `op` b and a %m -> b Fixes #23764 Implements https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0640-tyop-quantification-order.rst Updates haddock submodule. - - - - - 385cd1c4 by Sebastian Graf at 2024-04-19T21:04:45-04:00 Make `seq#` a magic Id and inline it in CorePrep (#24124) We can save much code and explanation in Tag Inference and StgToCmm by making `seq#` a known-key Magic Id in `GHC.Internal.IO` and inline this definition in CorePrep. See the updated `Note [seq# magic]`. I also implemented a new `Note [Flatten case-bind]` to get better code for otherwise nested case scrutinees. I renamed the contructors of `ArgInfo` to use an `AI` prefix in order to resolve the clash between `type CpeApp = CoreExpr` and the data constructor of `ArgInfo`, as well as fixed typos in `Note [CorePrep invariants]`. Fixes #24252 and #24124. - - - - - 275e41a9 by Jade at 2024-04-20T11:10:40-04:00 Put the newline after errors instead of before them This mainly has consequences for GHCi but also slightly alters how the output of GHC on the commandline looks. Fixes: #22499 - - - - - dd339c7a by Teo Camarasu at 2024-04-20T11:11:16-04:00 Remove unecessary stage0 packages Historically quite a few packages had to be stage0 as they depended on `template-haskell` and that was stage0. In #23536 we made it so that was no longer the case. This allows us to remove a bunch of packages from this list. A few still remain. A new version of `Win32` is required by `semaphore-compat`. Including `Win32` in the stage0 set requires also including `filepath` because otherwise Hadrian's dependency logic gets confused. Once our boot compiler has a newer version of `Win32` all of these will be able to be dropped. Resolves #24652 - - - - - 2f8e3a25 by Alan Zimmerman at 2024-04-20T11:11:52-04:00 EPA: Avoid duplicated comments in splice decls Contributes to #24669 - - - - - c70b9ddb by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fix typos and namings (fixes #24602) You may noted that I've also changed term of ``` , global "h$vt_double" ||= toJExpr IntV ``` See "IntV" and ``` WaitReadOp -> \[] [fd] -> pure $ PRPrimCall $ returnS (app "h$waidRead" [fd]) ``` See "h$waidRead" - - - - - 3db54f9b by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: trivial checks for variable presence (fixes #24602) - - - - - 777f108f by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fs module imported twice (by emscripten and by ghc-internal). ghc-internal import wrapped in a closure to prevent conflict with emscripten (fixes #24602) Better solution is to use some JavaScript module system like AMD, CommonJS or even UMD. It will be investigated at other issues. At first glance we should try UMD (See https://github.com/umdjs/umd) - - - - - a45a5712 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: thread.js requires h$fds and h$fdReady to be declared for static code analysis, minimal code copied from GHCJS (fixes #24602) I've just copied some old pieces of GHCJS from publicly available sources (See https://github.com/Taneb/shims/blob/a6dd0202dcdb86ad63201495b8b5d9763483eb35/src/io.js#L607). Also I didn't put details to h$fds. I took minimal and left only its object initialization: `var h$fds = {};` - - - - - ad90bf12 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: heap and stack overflows reporting defined as js hard failure (fixes #24602) These errors were treated as a hard failure for browser application. The fix is trivial: just throw error. - - - - - 5962fa52 by Serge S. Gulin at 2024-04-21T16:33:44+03:00 JS: Stubs for code without actual implementation detected by Google Closure Compiler (fixes #24602) These errors were fixed just by introducing stubbed functions with throw for further implementation. - - - - - a0694298 by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add externs to linker (fixes #24602) After enabling jsdoc and built-in google closure compiler types I was needed to deal with the following: 1. Define NodeJS-environment types. I've just copied minimal set of externs from semi-official repo (see https://github.com/externs/nodejs/blob/6c6882c73efcdceecf42e7ba11f1e3e5c9c041f0/v8/nodejs.js#L8). 2. Define Emscripten-environment types: `HEAP8`. Emscripten already provides some externs in our code but it supposed to be run in some module system. And its definitions do not work well in plain bundle. 3. We have some functions which purpose is to add to functions some contextual information via function properties. These functions should be marked as `modifies` to let google closure compiler remove calls if these functions are not used actually by call graph. Such functions are: `h$o`, `h$sti`, `h$init_closure`, `h$setObjInfo`. 4. STG primitives such as registries and stuff from `GHC.StgToJS`. `dXX` properties were already present at externs generator function but they are started from `7`, not from `1`. This message is related: `// fixme does closure compiler bite us here?` - - - - - e58bb29f by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: added both tests: for size and for correctness (fixes #24602) By some reason MacOS builds add to stderr messages like: Ignoring unexpected archive entry: __.SYMDEF ... However I left stderr to `/dev/null` for compatibility with linux CI builds. - - - - - 909f3a9c by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Disable js linker warning for empty symbol table to make js tests running consistent across environments - - - - - 83eb10da by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add special preprocessor for js files due of needing to keep jsdoc comments (fixes #24602) Our js files have defined google closure compiler types at jsdoc entries but these jsdoc entries are removed by cpp preprocessor. I considered that reusing them in javascript-backend would be a nice thing. Right now haskell processor uses `-traditional` option to deal with comments and `//` operators. But now there are following compiler options: `-C` and `-CC`. You can read about them at GCC (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-CC) and CLang (see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-CC). It seems that `-CC` works better for javascript jsdoc than `-traditional`. At least it leaves `/* ... */` comments w/o changes. - - - - - e1cf8dc2 by brandon s allbery kf8nh at 2024-04-22T03:48:26-04:00 fix link in CODEOWNERS It seems that our local Gitlab no longer has documentation for the `CODEOWNERS` file, but the master documentation still does. Use that instead. - - - - - a27c6a49 by Fendor at 2024-04-22T10:13:03+02:00 Adapt to UserData split - - - - - 1efc5a7a by Fendor at 2024-04-22T10:13:03+02:00 Adapt to BinHandle split - - - - - 593f4e04 by Fendor at 2024-04-23T10:19:14-04:00 Add performance regression test for '-fwrite-simplified-core' - - - - - 1ba39b05 by Fendor at 2024-04-23T10:19:14-04:00 Typecheck corebindings lazily during bytecode generation This delays typechecking the corebindings until the bytecode generation happens. We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`. In general, we shouldn't retain values of the hydrated `Type`, as not evaluating the bytecode object keeps it alive. It is better if we retain the unhydrated `IfaceType`. See Note [Hydrating Modules] - - - - - e916fc92 by Alan Zimmerman at 2024-04-23T10:19:50-04:00 EPA: Keep comments in a CaseAlt match The comments now live in the surrounding location, not inside the Match. Make sure we keep them. Closes #24707 - - - - - d2b17f32 by Cheng Shao at 2024-04-23T15:01:22-04:00 driver: force merge objects when building dynamic objects This patch forces the driver to always merge objects when building dynamic objects even when ar -L is supported. It is an oversight of !8887: original rationale of that patch is favoring the relatively cheap ar -L operation over object merging when ar -L is supported, which makes sense but only if we are building static objects! Omitting check for whether we are building dynamic objects will result in broken .so files with undefined reference errors at executable link time when building GHC with llvm-ar. Fixes #22210. - - - - - 209d09f5 by Julian Ospald at 2024-04-23T15:02:03-04:00 Allow non-absolute values for bootstrap GHC variable Fixes #24682 - - - - - 3fff0977 by Matthew Pickering at 2024-04-23T15:02:38-04:00 Don't depend on registerPackage function in Cabal More recent versions of Cabal modify the behaviour of libAbiHash which breaks our usage of registerPackage. It is simpler to inline the part of registerPackage that we need and avoid any additional dependency and complication using the higher-level function introduces. - - - - - c62dc317 by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: remove obsolete ln script This commit removes an obsolete ln script in ghc-bignum/gmp. See 060251c24ad160264ae8553efecbb8bed2f06360 for its original intention, but it's been obsolete for a long time, especially since the removal of the make build system. Hence the house cleaning. - - - - - 6399d52b by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: update gmp to 6.3.0 This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0. The tarball format is now xz, and gmpsrc.patch has been patched into the tarball so hadrian no longer needs to deal with patching logic when building in-tree GMP. - - - - - 65b4b92f by Cheng Shao at 2024-04-25T01:32:02-04:00 hadrian: remove obsolete Patch logic This commit removes obsolete Patch logic from hadrian, given we no longer need to patch the gmp tarball when building in-tree GMP. - - - - - 71f28958 by Cheng Shao at 2024-04-25T01:32:02-04:00 autoconf: remove obsolete patch detection This commit removes obsolete deletection logic of the patch command from autoconf scripts, given we no longer need to patch anything in the GHC build process. - - - - - daeda834 by Sylvain Henry at 2024-04-25T01:32:43-04:00 JS: correctly handle RUBBISH literals (#24664) - - - - - 8a06ddf6 by Matthew Pickering at 2024-04-25T11:16:16-04:00 Linearise ghc-internal and base build This is achieved by requesting the final package database for ghc-internal, which mandates it is fully built as a dependency of configuring the `base` package. This is at the expense of cross-package parrallelism between ghc-internal and the base package. Fixes #24436 - - - - - 94da9365 by Andrei Borzenkov at 2024-04-25T11:16:54-04:00 Fix tuple puns renaming (24702) Move tuple renaming short cutter from `isBuiltInOcc_maybe` to `isPunOcc_maybe`, so we consider incoming module. I also fixed some hidden bugs that raised after the change was done. - - - - - fa03b1fb by Fendor at 2024-04-26T18:03:13-04:00 Refactor the Binary serialisation interface The goal is simplifiy adding deduplication tables to `ModIface` interface serialisation. We identify two main points of interest that make this difficult: 1. UserData hardcodes what `Binary` instances can have deduplication tables. Moreover, it heavily uses partial functions. 2. GHC.Iface.Binary hardcodes the deduplication tables for 'Name' and 'FastString', making it difficult to add more deduplication. Instead of having a single `UserData` record with fields for all the types that can have deduplication tables, we allow to provide custom serialisers for any `Typeable`. These are wrapped in existentials and stored in a `Map` indexed by their respective `TypeRep`. The `Binary` instance of the type to deduplicate still needs to explicitly look up the decoder via `findUserDataReader` and `findUserDataWriter`, which is no worse than the status-quo. `Map` was chosen as microbenchmarks indicate it is the fastest for a small number of keys (< 10). To generalise the deduplication table serialisation mechanism, we introduce the types `ReaderTable` and `WriterTable` which provide a simple interface that is sufficient to implement a general purpose deduplication mechanism for `writeBinIface` and `readBinIface`. This allows us to provide a list of deduplication tables for serialisation that can be extended more easily, for example for `IfaceTyCon`, see the issue https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for more motivation. In addition to this refactoring, we split `UserData` into `ReaderUserData` and `WriterUserData`, to avoid partial functions and reduce overall memory usage, as we need fewer mutable variables. Bump haddock submodule to accomodate for `UserData` split. ------------------------- Metric Increase: MultiLayerModulesTH_Make MultiLayerModulesRecomp T21839c ------------------------- - - - - - bac57298 by Fendor at 2024-04-26T18:03:13-04:00 Split `BinHandle` into `ReadBinHandle` and `WriteBinHandle` A `BinHandle` contains too much information for reading data. For example, it needs to keep a `FastMutInt` and a `IORef BinData`, when the non-mutable variants would suffice. Additionally, this change has the benefit that anyone can immediately tell whether the `BinHandle` is used for reading or writing. Bump haddock submodule BinHandle split. - - - - - 4d6394dd by Simon Peyton Jones at 2024-04-26T18:03:49-04:00 Fix missing escaping-kind check in tcPatSynSig Note [Escaping kind in type signatures] explains how we deal with escaping kinds in type signatures, e.g. f :: forall r (a :: TYPE r). a where the kind of the body is (TYPE r), but `r` is not in scope outside the forall-type. I had missed this subtlety in tcPatSynSig, leading to #24686. This MR fixes it; and a similar bug in tc_top_lhs_type. (The latter is tested by T24686a.) - - - - - 981c2c2c by Alan Zimmerman at 2024-04-26T18:04:25-04:00 EPA: check-exact: check that the roundtrip reproduces the source Closes #24670 - - - - - a8616747 by Andrew Lelechenko at 2024-04-26T18:05:01-04:00 Document that setEnv is not thread-safe - - - - - 1e41de83 by Bryan Richter at 2024-04-26T18:05:37-04:00 CI: Work around frequent Signal 9 errors - - - - - a6d5f9da by Naïm Favier at 2024-04-27T17:52:40-04:00 ghc-internal: add MonadFix instance for (,) Closes https://gitlab.haskell.org/ghc/ghc/-/issues/24288, implements CLC proposal https://github.com/haskell/core-libraries-committee/issues/238. Adds a MonadFix instance for tuples, permitting value recursion in the "native" writer monad and bringing consistency with the existing instance for transformers's WriterT (and, to a lesser extent, for Solo). - - - - - 64feadcd by Rodrigo Mesquita at 2024-04-27T17:53:16-04:00 bindist: Fix xattr cleaning The original fix (725343aa) was incorrect because it used the shell bracket syntax which is the quoting syntax in autoconf, making the test for existence be incorrect and therefore `xattr` was never run. Fixes #24554 - - - - - e2094df3 by damhiya at 2024-04-28T23:52:00+09:00 Make read accepts binary integer formats CLC proposal : https://github.com/haskell/core-libraries-committee/issues/177 - - - - - c62239b7 by Sylvain Henry at 2024-04-29T10:35:00+02:00 Fix tests for T22229 - - - - - 1c2fd963 by Alan Zimmerman at 2024-04-29T23:17:00-04:00 EPA: Preserve comments in Match Pats Closes #24708 Closes #24715 Closes #24734 - - - - - 4189d17e by Sylvain Henry at 2024-04-29T23:17:42-04:00 LLVM: better unreachable default destination in Switch (#24717) See added note. Co-authored-by: Siddharth Bhat <siddu.druid at gmail.com> - - - - - a3725c88 by Cheng Shao at 2024-04-29T23:18:20-04:00 ci: enable wasm jobs for MRs with wasm label This patch enables wasm jobs for MRs with wasm label. Previously the wasm label didn't actually have any effect on the CI pipeline, and full-ci needed to be applied to run wasm jobs which was a waste of runners when working on the wasm backend, hence the fix here. - - - - - 702f7964 by Matthew Pickering at 2024-04-29T23:18:56-04:00 Make interface files and object files depend on inplace .conf file A potential fix for #24737 - - - - - 728af21e by Cheng Shao at 2024-04-30T05:30:23-04:00 utils: remove obsolete vagrant scripts Vagrantfile has long been removed in !5288. This commit further removes the obsolete vagrant scripts in the tree. - - - - - 36f2c342 by Cheng Shao at 2024-04-30T05:31:00-04:00 Update autoconf scripts Scripts taken from autoconf 948ae97ca5703224bd3eada06b7a69f40dd15a02 - - - - - ecbf22a6 by Ben Gamari at 2024-04-30T05:31:36-04:00 ghcup-metadata: Drop output_name field This is entirely redundant to the filename of the URL. There is no compelling reason to name the downloaded file differently from its source. - - - - - c56d728e by Zubin Duggal at 2024-04-30T22:45:09-04:00 testsuite: Handle exceptions in framework_fail when testdir is not initialised When `framework_fail` is called before initialising testdir, it would fail with an exception reporting the testdir not being initialised instead of the actual failure. Ensure we report the actual reason for the failure instead of failing in this way. One way this can manifest is when trying to run a test that doesn't exist using `--only` - - - - - d5bea4d6 by Alan Zimmerman at 2024-04-30T22:45:45-04:00 EPA: Fix range for GADT decl with sig only Closes #24714 - - - - - 4d78c53c by Sylvain Henry at 2024-05-01T17:23:06-04:00 Fix TH dependencies (#22229) Add a dependency between Syntax and Internal (via module reexport). - - - - - 37e38db4 by Sylvain Henry at 2024-05-01T17:23:06-04:00 Bump haddock submodule - - - - - ca13075c by Sylvain Henry at 2024-05-01T17:23:47-04:00 JS: cleanup to prepare for #24743 - - - - - 40026ac3 by Alan Zimmerman at 2024-05-01T22:45:07-04:00 EPA: Preserve comments for PrefixCon Preserve comments in fun (Con {- c1 -} a b) = undefined Closes #24736 - - - - - 92134789 by Hécate Moonlight at 2024-05-01T22:45:42-04:00 Correct `@since` metadata in HpcFlags It was introduced in base-4.20, not 4.22. Fix #24721 - - - - - a580722e by Cheng Shao at 2024-05-02T08:18:45-04:00 testsuite: fix req_target_smp predicate - - - - - ac9c5f84 by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Remove (unused)coarse grained locking. The STM code had a coarse grained locking mode guarded by #defines that was unused. This commit removes the code. - - - - - 917ef81b by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Be more optimistic when validating in-flight transactions. * Don't lock tvars when performing non-committal validation. * If we encounter a locked tvar don't consider it a failure. This means in-flight validation will only fail if committing at the moment of validation is *guaranteed* to fail. This prevents in-flight validation from failing spuriously if it happens in parallel on multiple threads or parallel to thread comitting. - - - - - 167a56a0 by Alan Zimmerman at 2024-05-02T08:19:22-04:00 EPA: fix span for empty \case(s) In instance SDecide Nat where SZero %~ (SSucc _) = Disproved (\case) Ensure the span for the HsLam covers the full construct. Closes #24748 - - - - - 9bae34d8 by doyougnu at 2024-05-02T15:41:08-04:00 testsuite: expand size testing infrastructure - closes #24191 - adds windows_skip, wasm_skip, wasm_arch, find_so, _find_so - path_from_ghcPkg, collect_size_ghc_pkg, collect_object_size, find_non_inplace functions to testsuite - adds on_windows and req_dynamic_ghc predicate to testsuite The design is to not make the testsuite too smart and simply offload to ghc-pkg for locations of object files and directories. - - - - - b85b1199 by Sylvain Henry at 2024-05-02T15:41:49-04:00 GHCi: support inlining breakpoints (#24712) When a breakpoint is inlined, its context may change (e.g. tyvars in scope). We must take this into account and not used the breakpoint tick index as its sole identifier. Each instance of a breakpoint (even with the same tick index) now gets a different "info" index. We also need to distinguish modules: - tick module: module with the break array (tick counters, status, etc.) - info module: module having the CgBreakInfo (info at occurrence site) - - - - - 649c24b9 by Oleg Grenrus at 2024-05-03T20:45:42-04:00 Expose constructors of SNat, SChar and SSymbol in ghc-internal - - - - - d603f199 by Mikolaj Konarski at 2024-05-03T20:46:19-04:00 Add DCoVarSet to PluginProv (!12037) - - - - - ba480026 by Serge S. Gulin at 2024-05-03T20:47:01-04:00 JS: Enable more efficient packing of string data (fixes #24706) - - - - - be1e60ee by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Track in-scope variables in ruleCheckProgram This small patch fixes #24726, by tracking in-scope variables properly in -drule-check. Not hard to do! - - - - - 58408c77 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add a couple more HasCallStack constraints in SimpleOpt Just for debugging, no effect on normal code - - - - - 70e245e8 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add comments to Prep.hs This documentation patch fixes a TODO left over from !12364 - - - - - e5687186 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Use HasDebugCallStack, rather than HasCallStack - - - - - 631cefec by Cheng Shao at 2024-05-03T20:48:17-04:00 driver: always merge objects when possible This patch makes the driver always merge objects with `ld -r` when possible, and only fall back to calling `ar -L` when merge objects command is unavailable. This completely reverts !8887 and !12313, given more fixes in Cabal seems to be needed to avoid breaking certain configurations and the maintainence cost is exceeding the behefits in this case :/ - - - - - 1dacb506 by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump time submodule to 1.14 As requested in #24528. ------------------------- Metric Decrease: ghc_bignum_so rts_so Metric Increase: cabal_syntax_dir rts_so time_dir time_so ------------------------- - - - - - 4941b90e by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump terminfo submodule to current master - - - - - 43d48b44 by Cheng Shao at 2024-05-03T20:49:30-04:00 wasm: use scheduler.postTask() for context switch when available This patch makes use of scheduler.postTask() for JSFFI context switch when it's available. It's a more principled approach than our MessageChannel based setImmediate() implementation, and it's available in latest version of Chromium based browsers. - - - - - 08207501 by Cheng Shao at 2024-05-03T20:50:08-04:00 testsuite: give pre_cmd for mhu-perf 5x time - - - - - bf3d4db0 by Alan Zimmerman at 2024-05-03T20:50:43-04:00 EPA: Preserve comments for pattern synonym sig Closes #24749 - - - - - c49493f2 by Matthew Pickering at 2024-05-04T06:02:57-04:00 tests: Widen acceptance window for dir and so size tests These are testing things which are sometimes out the control of a GHC developer. Therefore we shouldn't fail CI if something about these dependencies change because we can't do anything about it. It is still useful to have these statistics for visualisation in grafana though. Ticket #24759 - - - - - 9562808d by Matthew Pickering at 2024-05-04T06:02:57-04:00 Disable rts_so test It has already manifested large fluctuations and destabilising CI Fixes #24762 - - - - - fc24c5cf by Ryan Scott at 2024-05-04T06:03:33-04:00 unboxedSum{Type,Data}Name: Use GHC.Types as the module Unboxed sum constructors are now defined in the `GHC.Types` module, so if you manually quote an unboxed sum (e.g., `''Sum2#`), you will get a `Name` like: ```hs GHC.Types.Sum2# ``` The `unboxedSumTypeName` function in `template-haskell`, however, mistakenly believes that unboxed sum constructors are defined in `GHC.Prim`, so `unboxedSumTypeName 2` would return an entirely different `Name`: ```hs GHC.Prim.(#|#) ``` This is a problem for Template Haskell users, as it means that they can't be sure which `Name` is the correct one. (Similarly for `unboxedSumDataName`.) This patch fixes the implementations of `unboxedSum{Type,Data}Name` to use `GHC.Types` as the module. For consistency with `unboxedTupleTypeName`, the `unboxedSumTypeName` function now uses the non-punned syntax for unboxed sums (`Sum<N>#`) as the `OccName`. Fixes #24750. - - - - - 7eab4e01 by Alan Zimmerman at 2024-05-04T16:14:55+01:00 EPA: Widen stmtslist to include last semicolon Closes #24754 - - - - - 06f7db40 by Teo Camarasu at 2024-05-05T00:19:38-04:00 doc: Fix type error in hs_try_putmvar example - - - - - af000532 by Moritz Schuler at 2024-05-05T06:30:58-04:00 Fix parsing of module names in CLI arguments closes issue #24732 - - - - - da74e9c9 by Ben Gamari at 2024-05-05T06:31:34-04:00 ghc-platform: Add Setup.hs The Hadrian bootstrapping script relies upon `Setup.hs` to drive its build. Addresses #24761. - - - - - 35d34fde by Alan Zimmerman at 2024-05-05T12:52:40-04:00 EPA: preserve comments in class and data decls Fix checkTyClHdr which was discarding comments. Closes #24755 - - - - - 03c5dfbf by Simon Peyton Jones at 2024-05-05T12:53:15-04:00 Fix a float-out error Ticket #24768 showed that the Simplifier was accidentally destroying a join point. It turned out to be that we were sending a bottoming join point to the top, accidentally abstracting over /other/ join points. Easily fixed. - - - - - adba68e7 by John Ericson at 2024-05-05T19:35:56-04:00 Substitute bindist files with Hadrian not configure The `ghc-toolchain` overhaul will eventually replace all this stuff with something much more cleaned up, but I think it is still worth making this sort of cleanup in the meantime so other untanglings and dead code cleaning can procede. I was able to delete a fair amount of dead code doing this too. `LLVMTarget_CPP` is renamed to / merged with `LLVMTarget` because it wasn't actually turned into a valid CPP identifier. (Original to 1345c7cc42c45e63ab1726a8fd24a7e4d4222467, actually.) Progress on #23966 Co-Authored-By: Sylvain Henry <hsyl20 at gmail.com> - - - - - 18f4ff84 by Alan Zimmerman at 2024-05-05T19:36:32-04:00 EPA: fix mkHsOpTyPV duplicating comments Closes #24753 - - - - - a19201d4 by Matthew Craven at 2024-05-06T19:54:29-04:00 Add test cases for #24664 ...since none are present in the original MR !12463 fixing this issue. - - - - - 46328a49 by Alan Zimmerman at 2024-05-06T19:55:05-04:00 EPA: preserve comments in data decls Closes #24771 - - - - - 3b51995c by Andrei Borzenkov at 2024-05-07T14:39:40-04:00 Rename Solo# data constructor to MkSolo# (#24673) - data Solo# a = (# a #) + data Solo# a = MkSolo# a And `(# foo #)` syntax now becomes just a syntactic sugar for `MkSolo# a`. - - - - - 4d59abf2 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Add the cmm_cpp_is_gcc predicate to the testsuite A future C-- test called T24474-cmm-override-g0 relies on the GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it emitting #defines past the preprocessing stage. Clang, at least, does not do this, so the test would fail if ran on Clang. As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of the workaround we apply as a fix for bug #24474, and the workaround was for GCC-specific behaviour, the test needs to be marked as fragile on other compilers. - - - - - 25b0b404 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Split out the C-- preprocessor, and make it pass -g0 Previously, C-- was processed with the C preprocessor program. This means that it inherited flags passed via -optc. A flag that is somewhat often passed through -optc is -g. At certain -g levels (>=2), GCC starts emitting defines *after* preprocessing, for the purposes of debug info generation. This is not useful for the C-- compiler, and, in fact, causes lexer errors. We can suppress this effect (safely, if supported) via -g0. As a workaround, in older versions of GCC (<=10), GCC only emitted defines if a certain set of -g*3 flags was passed. Newer versions check the debug level. For the former, we filter out those -g*3 flags and, for the latter, we specify -g0 on top of that. As a compatible and effective solution, this change adds a C-- preprocessor distinct from the C compiler and preprocessor, but that keeps its flags. The command line produced for C-- preprocessing now looks like: $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/24474 - - - - - 9b4129a5 by Andreas Klebinger at 2024-05-08T13:24:20-04:00 -fprof-late: Only insert cost centres on functions/non-workfree cafs. They are usually useless and doing so for data values comes with a large compile time/code size overhead. Fixes #24103 - - - - - 259b63d3 by Sebastian Graf at 2024-05-08T13:24:57-04:00 Simplifier: Preserve OccInfo on DataAlt fields when case binder is dead (#24770) See the adjusted `Note [DataAlt occ info]`. This change also has a positive repercussion on `Note [Combine case alts: awkward corner]`. Fixes #24770. We now try not to call `dataConRepStrictness` in `adjustFieldsIdInfo` when all fields are lazy anyway, leading to a 2% ghc/alloc decrease in T9675. Metric Decrease: T9675 - - - - - 31b28cdb by Sebastian Graf at 2024-05-08T13:24:57-04:00 Kill seqRule, discard dead seq# in Prep (#24334) Discarding seq#s in Core land via `seqRule` was problematic; see #24334. So instead we discard certain dead, discardable seq#s in Prep now. See the updated `Note [seq# magic]`. This fixes the symptoms of #24334. - - - - - b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00 Document NcgImpl methods Fixes #19914 - - - - - 4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00 Make renamer to be more flexible with parens in the LHS of the rules We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621 - - - - - ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00 IPE: Eliminate dependency on Read Instead of encoding the closure type as decimal string we now simply represent it as an integer, eliminating the need for `Read` in `GHC.Internal.InfoProv.Types.peekInfoProv`. Closes #24504. ------------------------- Metric Decrease: T24602_perf_size size_hello_artifact ------------------------- - - - - - a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00 testsuite: fix testwsdeque with recent clang This patch fixes compilation of testwsdeque.c with recent versions of clang, which will fail with the error below: ``` testwsdeque.c:95:33: error: warning: format specifies type 'long' but the argument has type 'void *' [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~~ ^ testwsdeque.c:95:39: error: warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~ ^~~ | %lu testwsdeque.c:133:42: error: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types] 133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); | ^~~~~ /workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error: note: passing argument to parameter 'startProc' here 193 | OSThreadProc *startProc, void *param); | ^ 2 warnings and 1 error generated. ``` - - - - - c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00 Rename pre-processor invocation args Small clean up. Uses proper names for the various groups of arguments that make up the pre-processor invocation. - - - - - 2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00 ghc-heap: fix typo in ghc-heap cbits - - - - - fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00 Improve performance of Data.List.sort(By) This patch improves the algorithm to sort lists in base. It does so using two strategies: 1) Use a four-way-merge instead of the 'default' two-way-merge. This is able to save comparisons and allocations. 2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization. This mainly benefits types with a fast (>). Note that this *may* break instances with a *malformed* Ord instance where `a > b` is *not* equal to `compare a b == GT`. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236 Fixes #24280 ------------------------- Metric Decrease: MultiLayerModulesTH_Make T10421 T13719 T15164 T18698a T18698b T1969 T9872a T9961 T18730 WWRec T12425 T15703 ------------------------- - - - - - 1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00 Revert "ghcup-metadata: Drop output_name field" This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f. This breaks the ghcup metadata generation on the nightly jobs. - - - - - daff1e30 by Jannis at 2024-05-12T13:38:35-04:00 Division by constants optimization - - - - - 413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00 Tidy: Add flag to expose unfoldings if they take dictionary arguments. Add the flag `-fexpose-overloaded-unfoldings` to be able to control this behaviour. For ghc's boot libraries file size grew by less than 1% when it was enabled. However I refrained from enabling it by default for now. I've also added a section on specialization more broadly to the users guide. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: T12425 T13386 hard_hole_fits ------------------------- - - - - - c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00 Don't store a GlobalRdrEnv in `mi_globals` for GHCi. GHCi only needs the `mi_globals` field for modules imported with :module +*SomeModule. It uses this field to make the top level environment in `SomeModule` available to the repl. By default, only the first target in the command line parameters is "star" loaded into GHCi. Other modules have to be manually "star" loaded into the repl. Storing the top level GlobalRdrEnv for each module is very wasteful, especially given that we will most likely never need most of these environments. Instead we store only the information needed to reconstruct the top level environment in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements as well as all top level symbols defined in the module (not taking export lists into account) When a particular module is "star-loaded" into GHCi (as the first commandline target, or via an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using the `IfaceTopEnv`. - - - - - d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00 Add perf regression test for `-fwrite-if-simplified-core` - - - - - 2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00 Improve pattern to type pattern transformation (23739) `pat_to_type_pat` function now can handle more patterns: - TuplePat - ListPat - LitPat - NPat - ConPat Allowing these new constructors in type patterns significantly increases possible shapes of type patterns without `type` keyword. This patch also changes how lookups in `lookupOccRnConstr` are performed, because we need to fall back into types when we didn't find a constructor on data level to perform `ConPat` to type transformation properly. - - - - - be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00 hadrian: fix hadrian building with ghc-9.10.1 - - - - - ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00 linters: fix lint-whitespace compilation with ghc-9.10.1 - - - - - a593f284 by Andreas Klebinger at 2024-05-15T07:32:10-04:00 Expand the `inline` rule to look through casts/ticks. Fixes #24808 - - - - - b1e0c313 by Cheng Shao at 2024-05-15T07:32:46-04:00 testsuite: bump PartialDownSweep timeout to 5x on wasm32 - - - - - b2227487 by Fendor at 2024-05-15T17:14:06-04:00 Add Eq and Ord instance to `IfaceType` We add an `Ord` instance so that we can store `IfaceType` in a `Data.Map` container. This is required to deduplicate `IfaceType` while writing `.hi` files to disk. Deduplication has many beneficial consequences to both file size and memory usage, as the deduplication enables implicit sharing of values. See issue #24540 for more motivation. The `Ord` instance would be unnecessary if we used a `TrieMap` instead of `Data.Map` for the deduplication process. While in theory this is clerarly the better option, experiments on the agda code base showed that a `TrieMap` implementation has worse run-time performance characteristics. To the change itself, we mostly derive `Eq` and `Ord`. This requires us to change occurrences of `FastString` with `LexicalFastString`, since `FastString` has no `Ord` instance. We change the definition of `IfLclName` to a newtype of `LexicalFastString`, to make such changes in the future easier. Bump haddock submodule for IfLclName changes - - - - - d368f9a6 by Fendor at 2024-05-15T17:14:06-04:00 Move out LiteralMap to avoid cyclic module dependencies - - - - - 2fcc09fd by Fendor at 2024-05-15T17:14:06-04:00 Add deduplication table for `IfaceType` The type `IfaceType` is a highly redundant, tree-like data structure. While benchmarking, we realised that the high redundancy of `IfaceType` causes high memory consumption in GHCi sessions when byte code is embedded into the `.hi` file via `-fwrite-if-simplified-core` or `-fbyte-code-and-object-code`. Loading such `.hi` files from disk introduces many duplicates of memory expensive values in `IfaceType`, such as `IfaceTyCon`, `IfaceTyConApp`, `IA_Arg` and many more. We improve the memory behaviour of GHCi by adding an additional deduplication table for `IfaceType` to the serialisation of `ModIface`, similar to how we deduplicate `Name`s and `FastString`s. When reading the interface file back, the table allows us to automatically share identical values of `IfaceType`. To provide some numbers, we evaluated this patch on the agda code base. We loaded the full library from the `.hi` files, which contained the embedded core expressions (`-fwrite-if-simplified-core`). Before this patch: * Load time: 11.7 s, 2.5 GB maximum residency. After this patch: * Load time: 7.3 s, 1.7 GB maximum residency. This deduplication has the beneficial side effect to additionally reduce the size of the on-disk interface files tremendously. For example, on agda, we reduce the size of `.hi` files (with `-fwrite-if-simplified-core`): * Before: 101 MB on disk * Now: 24 MB on disk This has even a beneficial side effect on the cabal store. We reduce the size of the store on disk: * Before: 341 MB on disk * Now: 310 MB on disk Note, none of the dependencies have been compiled with `-fwrite-if-simplified-core`, but `IfaceType` occurs in multiple locations in a `ModIface`. We also add IfaceType deduplication table to .hie serialisation and refactor .hie file serialisation to use the same infrastrucutre as `putWithTables`. Bump haddock submodule to accomodate for changes to the deduplication table layout and binary interface. - - - - - 36aa7cf1 by Fendor at 2024-05-15T17:14:06-04:00 Add run-time configurability of `.hi` file compression Introduce the flag `-fwrite-if-compression=<n>` which allows to configure the compression level of writing .hi files. The motivation is that some deduplication operations are too expensive for the average use case. Hence, we introduce multiple compression levels with variable impact on performance, but still reduce the memory residency and `.hi` file size on disk considerably. We introduce three compression levels: * `1`: `Normal` mode. This is the least amount of compression. It deduplicates only `Name` and `FastString`s, and is naturally the fastest compression mode. * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is marginally slower than `Normal` mode. In general, it should be safe to always use `Safe` mode. * `3`: `Full` deduplication mode. Deduplicate as much as we can, resulting in minimal .hi files, but at the cost of additional compilation time. Reading .hi files doesn't need to know the initial compression level, and can always deserialise a `ModIface`, as we write out a byte that indicates the next value has been deduplicated. This allows users to experiment with different compression levels for packages, without recompilation of dependencies. Note, the deduplication also has an additional side effect of reduced memory consumption to implicit sharing of deduplicated elements. See https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for example where that matters. ------------------------- Metric Decrease: MultiLayerModulesDefsGhciWithCore T16875 T21839c T24471 hard_hole_fits libdir ------------------------- - - - - - 1e63a6fb by Matthew Pickering at 2024-05-15T17:14:07-04:00 Introduce regression tests for `.hi` file sizes Add regression tests to track how `-fwrite-if-compression` levels affect the size of `.hi` files. - - - - - 639d742b by M Farkas-Dyck at 2024-05-15T17:14:49-04:00 TTG: ApplicativeStatement exist only in Rn and Tc Co-Authored-By: romes <rodrigo.m.mesquita at gmail.com> - - - - - aa7b336b by Jade at 2024-05-15T23:06:17-04:00 Documentation: Improve documentation for symbols exported from System.IO - - - - - c561de8f by Jade at 2024-05-15T23:06:54-04:00 Improve suggestions for language extensions - When suggesting Language extensions, also suggest Extensions which imply them - Suggest ExplicitForAll and GADTSyntax instead of more specific extensions - Rephrase suggestion to include the term 'Extension' - Also moves some flag specific definitions out of Session.hs into Flags.hs (#24478) Fixes: #24477 Fixes: #24448 Fixes: #10893 - - - - - 4c7ae2a1 by Andreas Klebinger at 2024-05-15T23:07:30-04:00 Testsuite: Check if llvm assembler is available for have_llvm - - - - - bc672166 by Torsten Schmits at 2024-05-15T23:08:06-04:00 refactor quadratic search in warnMissingHomeModules - - - - - 7875e8cb by Torsten Schmits at 2024-05-15T23:08:06-04:00 add test that runs MakeDepend on thousands of modules - - - - - b84b91f5 by Adam Gundry at 2024-05-16T15:32:06-04:00 Representation-polymorphic HasField (fixes #22156) This generalises the HasField class to support representation polymorphism, so that instead of type HasField :: forall {k} . k -> Type -> Type -> Constraint we have type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint - - - - - 05285090 by Matthew Pickering at 2024-05-16T15:32:43-04:00 Bump os-string submodule to 2.0.2.2 Closes #24786 - - - - - 886ab43a by Cheng Shao at 2024-05-17T01:34:50-04:00 rts: do not prefetch mark_closure bdescr in non-moving gc when ASSERTS_ENABLED This commit fixes a small an oversight in !12148: the prefetch logic in non-moving GC may trap in debug RTS because it calls Bdescr() for mark_closure which may be a static one. It's fine in non-debug RTS because even invalid bdescr addresses are prefetched, they will not cause segfaults, so this commit implements the most straightforward fix: don't prefetch mark_closure bdescr when assertions are enabled. - - - - - b38dcf39 by Teo Camarasu at 2024-05-17T01:34:50-04:00 rts: Allocate non-moving segments with megablocks Non-moving segments are 8 blocks long and need to be aligned. Previously we serviced allocations by grabbing 15 blocks, finding an aligned 8 block group in it and returning the rest. This proved to lead to high levels of fragmentation as a de-allocating a segment caused an 8 block gap to form, and this could not be reused for allocation. This patch introduces a segment allocator based around using entire megablocks to service segment allocations in bulk. When there are no free segments, we grab an entire megablock and fill it with aligned segments. As the megablock is free, we can easily guarantee alignment. Any unused segments are placed on a free list. It only makes sense to free segments in bulk when all of the segments in a megablock are freeable. After sweeping, we grab the free list, sort it, and find all groups of segments where they cover the megablock and free them. This introduces a period of time when free segments are not available to the mutator, but the risk that this would lead to excessive allocation is low. Right after sweep, we should have an abundance of partially full segments, and this pruning step is relatively quick. In implementing this we drop the logic that kept NONMOVING_MAX_FREE segments on the free list. We also introduce an eventlog event to log the amount of pruned/retained free segments. See Note [Segment allocation strategy] Resolves #24150 ------------------------- Metric Decrease: T13253 T19695 ------------------------- - - - - - 710665bd by Cheng Shao at 2024-05-17T01:35:30-04:00 rts: fix I/O manager compilation errors for win32 target This patch fixes I/O manager compilation errors for win32 target discovered when cross-compiling to win32 using recent clang: ``` rts/win32/ThrIOManager.c:117:7: error: error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | if (is_io_mng_native_p ()) { | ^ | 117 | if (is_io_mng_native_p ()) { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/fs.c:143:28: error: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 143 | int setErrNoFromWin32Error () { | ^ | void | 143 | int setErrNoFromWin32Error () { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:227:9: error: error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 227 | interruptIOManagerEvent (); | ^ | 227 | interruptIOManagerEvent (); | ^ rts/win32/ConsoleHandler.c:227:9: error: note: did you mean 'getIOManagerEvent'? | 227 | interruptIOManagerEvent (); | ^ rts/include/rts/IOInterface.h:27:10: error: note: 'getIOManagerEvent' declared here 27 | void * getIOManagerEvent (void); | ^ | 27 | void * getIOManagerEvent (void); | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:196:9: error: error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/win32/ConsoleHandler.c:196:9: error: note: did you mean 'postThreadLabel'? | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/eventlog/EventLog.h:118:6: error: note: 'postThreadLabel' declared here 118 | void postThreadLabel(Capability *cap, | ^ | 118 | void postThreadLabel(Capability *cap, | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) ``` - - - - - 28b9cee0 by Rodrigo Mesquita at 2024-05-17T01:36:05-04:00 configure: Check C99-compat for Cmm preprocessor Fixes #24815 - - - - - 8927e0c3 by Andreas Klebinger at 2024-05-17T01:36:41-04:00 Ensure `tcHasFixedRuntimeRep (# #)` returns True. - - - - - 04179044 by doyougnu at 2024-05-17T09:00:32-04:00 testsuite: make find_so regex less general Closes #24759 Background. In MR !12372 we began tracking shared object files and directories sizes for dependencies. However, this broke release builds because release builds alter the filenames swapping "in-place" for a hash. This was not considered in the MR and thus broke release pipelines. Furthermore, the rts_so test was found to be wildly varying and was therefore disabled in !12561. This commit fixes both of these issues: - fix the rts_so test by making the regex less general, now the rts_so test and all other foo.so tests must match "libHS<some-lib>-<version>-<hash|'in-place>-<ghc>". This prevents the rts_so test from accidentally matching different rts variants such as rts_threaded, which was the cause of the wild swings after !12372. - add logic to match either a hash or the string in-place. This should make the find_so function build agnostic. - - - - - 0962b50d by Andreas Klebinger at 2024-05-17T09:01:08-04:00 TagAnalysis: Treat all bottom ids as tagged during analysis. Ticket #24806 showed that we also need to treat dead end thunks as tagged during the analysis. - - - - - 7eb9f184 by Ben Gamari at 2024-05-17T11:23:37-04:00 Remove haddock submodule In preparation for merge into the GHC, as proposed in #23178. - - - - - 47b14dcc by Fendor at 2024-05-17T11:28:17-04:00 Adapt to `IfLclName` newtype changes (cherry picked from commit a711607e29b925f3d69e27c5fde4ba655c711ff1) - - - - - 6cc6681d by Fendor at 2024-05-17T11:28:17-04:00 Add IfaceType deduplication table to interface file serialisation Although we do not really need it in the interface file serialisation, as the deserialisation uses `getWithUserData`, we need to mirror the structure `getWithUserData` expects. Thus, we write essentially an empty `IfaceType` table at the end of the file, as the interface file doesn't reference `IfaceType`. (cherry picked from commit c9bc29c6a708483d2abc3d8ec9262510ce87ca61) - - - - - b9721206 by Ben Gamari at 2024-05-17T11:30:22-04:00 ghc-tags.yaml: Initial commit - - - - - 074e7d8f by Ben Gamari at 2024-05-17T11:31:29-04:00 fourmolu: Add configuration - - - - - 151b1736 by Ben Gamari at 2024-05-17T11:32:52-04:00 Makefile: Rework for use by haddock developers Previously the Makefile was present only for GHC's old make-based build system. Now since the make-based build system is gone we can use it for more useful ends. - - - - - a7dcf13b by Ben Gamari at 2024-05-17T11:36:14-04:00 Reformat with fourmolu Using previously-added configuration and `fourmolu -i .` Note that we exclude the test-cases (`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to formatting. - - - - - 0ea6017b by Ben Gamari at 2024-05-17T11:40:04-04:00 Add 'utils/haddock/' from commit 'a7dcf13bfbb97b20e75cc8ce650e2bb628db4660' git-subtree-dir: utils/haddock git-subtree-mainline: 7eb9f1849b1c72a1c61dee88462b4244550406f3 git-subtree-split: a7dcf13bfbb97b20e75cc8ce650e2bb628db4660 - - - - - aba1d304 by Hécate Moonlight at 2024-05-17T11:40:48-04:00 Add exceptions to the dangling notes list - - - - - 527bfbfb by Hécate Moonlight at 2024-05-17T11:40:52-04:00 Add haddock to the whitespace lint ignore list - - - - - 43274677 by Ben Gamari at 2024-05-17T11:41:20-04:00 git-blame-ignore-revs: Ignore haddock reformatting - - - - - 0e679e37 by Fendor at 2024-05-18T00:27:24-04:00 Pass cpp options to the CC builder in hadrian - - - - - bb40244e by Sylvain Henry at 2024-05-18T00:28:06-04:00 JS: fix allocation constant (fix #24746) - - - - - 646d30ab by Jade at 2024-05-18T19:23:31+02:00 Add highlighting for inline-code snippets in haddock - - - - - 64459a3e by Hécate Moonlight at 2024-05-19T08:42:27-04:00 haddock: Add a .readthedocs.yml file for online documentation - - - - - 7d3d9bbf by Serge S. Gulin at 2024-05-19T18:47:05+00:00 Unicode: General Category size test (related #24789) Added trivial size performance test which involves unicode general category usage via `read`. The `read` itself uses general category to detect spaces. The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789. - - - - - 8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00 EPA: Remove redundant code Remove unused epAnnAnns function various cases for showAstData that no longer exist - - - - - 071d7a1e by Rodrigo Mesquita at 2024-05-20T10:55:16-04:00 Improve docs on closed type families in hs-boots Fixes #24776 - - - - - d9e2c119 by Torsten Schmits at 2024-05-20T10:55:52-04:00 Use default deviation for large-project test This new performance test has the purpose of detecting regressions in complexity in relation to the number of modules in a project, so 1% deviation is way too small to avoid false positives. - - - - - 20b0136a by Ben Gamari at 2024-05-22T00:31:39-04:00 ghcup-metadata: Various fixes from 9.10.1 Use Debian 12/x86-64, Debian 10/aarch64, and Debian 11/aarch64 bindists where possible. - - - - - 6838a7c3 by Sylvain Henry at 2024-05-22T00:32:23-04:00 Reverse arguments to stgCallocBytes (fix #24828) - - - - - f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00 Add log messages for Iface serialisation compression level Fix the label of the number of 'IfaceType' entries in the log message. Add log message for the compression level that is used to serialise a an interface file. Adds `Outputable` instance for 'CompressionIFace'. - - - - - 3bad5d55 by Hécate Moonlight at 2024-05-22T00:33:40-04:00 base: Update doctests outputs ghc-internal: Update doctests outputs - - - - - 9317c6fb by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix the testsuites of the haddock-library - Apply all the metadata revisions from Hackage to the cabal file. - Fix the `ParserSpec.hs` file in the `spec` testsuite of haddock-library. - Make `CHANGES.md` an extra-doc-file instead of an extra-source-file. - - - - - 54073b02 by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix parser of @since pragma The testsuite contained tests for annotations of the form `@since foo-bar-0.5.0`, but the parser was written incorrectly. - - - - - ede6ede3 by Matthew Pickering at 2024-05-22T00:34:57-04:00 Fix nightly pages job It seems likely broken by 9f99126a which moved `index.html` from the root folder into `docs/` folder. Fixes #24840 - - - - - b7bcf729 by Cheng Shao at 2024-05-22T00:35:32-04:00 autoconf: remove unused context diff check This patch removes redundant autoconf check for the context diff program given it isn't actually been used anywhere, especially since make removal. - - - - - ea2fe66e by Hécate Moonlight at 2024-05-22T00:36:13-04:00 haddock: Rework the contributing guide - - - - - 0f302a94 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 haddock: Add module relationships diagrams of haddock-api and haddock-library - - - - - d1a9f34f by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add instructions - - - - - b880ee80 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add SVG outputs - - - - - 6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00 rts: Fix size of StgOrigThunkInfo frames Previously the entry code of the `stg_orig_thunk` frame failed to account for the size of the profiling header as it hard-coded the frame size. Fix this. Fixes #24809. - - - - - c645fe40 by Fendor at 2024-05-22T13:40:05-04:00 Add regression test T24809 for stg_orig_thunk_info_frame size - - - - - 4181aa40 by Andreas Klebinger at 2024-05-22T13:40:42-04:00 bindists: Check for existence of share folder before trying to copy it. This folder isn't distributed in windows bindists A lack of doing so resulted us copying loads of files twice. - - - - - d216510e by Matthew Pickering at 2024-05-22T13:40:42-04:00 Remove ad-hoc installation of mingw toolchain in relocatable bindists This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951 The choice about whether to install mingw is taken in the installation makefile. This is also broken on non-windows systems. The actual issue was the EnableDistroToolchain variable wasn't declared in mk/config.mk and therefore the check to install mingw was failing. - - - - - 7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04:00 testsuite: fix T17920 for wasm backend T17920 was marked as fragile on wasm before; it can be trivially fixed by avoiding calling variadic printf() in cmm. - - - - - c739383b by Cheng Shao at 2024-05-22T21:53:29-04:00 testsuite: bump T22744 timeout to 5x - - - - - c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00 testsuite: don't attempt to detect host cpu features when testing cross ghc The testsuite driver CPU feature detection logic only detects host CPU and only makes sense when we are not testing a cross GHC. - - - - - 3d9e4ce6 by Simon Peyton Jones at 2024-05-22T21:54:43-04:00 Better skolemisation As #24810 showed, it is (a little) better to skolemise en-bloc, so that Note [Let-bound skolems] fires more often. See Note [Skolemisation en bloc] in GHC.Tc.Utils.Instantiate. - - - - - a3cd3a1d by Ryan Scott at 2024-05-22T21:55:19-04:00 Add missing parenthesizePat in cvtp We need to ensure that the output of `cvtp` is parenthesized (at precedence `sigPrec`) so that any pattern signatures with a surrounding pattern signature can parse correctly. Fixes #24837. - - - - - 4bb2a7cc by Hécate Moonlight at 2024-05-22T21:55:59-04:00 [base] Document the memory overhead of ByteArray Add a diagram that shows the constituent parts of a ByteArray and their memory overhead. - - - - - 8b2a016a by Hécate Moonlight at 2024-05-22T21:56:38-04:00 Haddock: Add MR template for Haddock - - - - - ead75532 by Peter Trommler at 2024-05-23T02:28:05-04:00 PPC: Support ELF v2 on powerpc64 big-endian Detect ELF v2 on PowerPC 64-bit systems. Check for `_CALL_ELF` preprocessor macro. Fixes #21191 - - - - - 9d4c10f2 by Hécate Kleidukos at 2024-05-23T02:28:44-04:00 gitlab: Add @Kleidukos to CODEOWNERS for utils/haddock - - - - - 28e64170 by Preetham Gujjula at 2024-05-23T07:20:48-04:00 haddock: Add cabal-fmt to tools for `make style` - - - - - 00126a89 by Andrei Borzenkov at 2024-05-23T07:21:24-04:00 haddock: fix verbosity option parsing - - - - - a3e0b68b by Ryan Hendrickson at 2024-05-23T15:52:03-04:00 base: specify tie-breaking behavior of min, max, and related list/Foldable functions - - - - - bdcc0f37 by doyougnu at 2024-05-24T07:51:18-04:00 cmm: add word <-> double/float bitcast - closes: #25331 This is the last step in the project plan described in #25331. This commit: - adds bitcast operands for x86_64, LLVM, aarch64 - For PPC and i386 we resort to using the cmm implementations - renames conversion MachOps from Conv to Round|Truncate - - - - - f0d257f7 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor Some functions in StgToByteCode were filtering out void arguments. However, StgToByteCode is called after unarisation: the void arguments should have been removed earlier. Instead of filtering out, we assert that the args are non-void. - - - - - 03137fd2 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor `layoutNativeCall` was always called with a `primRepCmmType platform` callback. Hence we can put it inside of `layoutNativeCall` rather than repeat it. - - - - - 27c430f3 by David Binder at 2024-05-24T07:52:38-04:00 haddock: Remove compatibility shims for GHC < 8.4 from haddock-library - - - - - 8dd8a076 by Cheng Shao at 2024-05-24T07:53:14-04:00 compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs This patch makes the STG->Cmm backend avoid saving foreign call target to local when there are no caller-save GlobalRegs. Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a foreign call, we unconditionally save the foreign call target to a temporary local first, then rely on cmmSink to clean it up later, which only happens with -fcmm-sink (implied by -O) and not in unoptimized code. And this is troublesome for the wasm backend NCG, which needs to infer a foreign call target symbol's type signature from the Cmm call site. Previously, the NCG has been emitting incorrect type signatures for unoptimized code, which happens to work with `wasm-ld` most of the time, but this is never future-proof against upstream toolchain updates, and it causes horrible breakages when LTO objects are included in linker input. Hence this patch. - - - - - 986df1ab by Cheng Shao at 2024-05-24T07:53:14-04:00 testsuite: add callee-no-local regression test - - - - - 52d62e2a by Sylvain Henry at 2024-05-24T07:53:57-04:00 Fix HasCallStack leftovers from !12514 / #24726 - - - - - c5e00c35 by crumbtoo at 2024-05-24T07:54:38-04:00 user_guide: Fix typo in MultiWayIf chapter Close #24829 - - - - - bd323b0e by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Ensure that CHANGELOG is included in extra-source-files This was missed in the `ghc-internal` split. Closes #24831. - - - - - 1bfd32e8 by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Fix changelog reference to setBacktraceMechanismState (cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d) - - - - - 43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00 Float/double unboxed literal support for HexFloatLiterals (fix #22155) - - - - - 4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00 Improve test labels for binary interface file size tests Test labels for binary interface file sizes are hard to read and overly verbose at the same time. Extend the name for the metric title, but shorten it in the actual comparison table. - - - - - 14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00 Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present" This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa. - - - - - f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00 Fix default hyperlinked sources pattern Previously this didn't include the `%M` token which manifested as broken links to the hyperlinked sources of reexports of declarations defined in other packages. Fixes haddock#1628. (cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36) - - - - - 42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00 Make DocPaths a proper data type (cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c) - - - - - 53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00 haddock: Bump version to 2.30 (cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602) - - - - - e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00 haddock-api: allow base 4.20 and ghc 9.11 - - - - - e294f7a2 by PHO at 2024-05-24T12:17:55-04:00 Add a flag "threaded" for building haddock with the threaded RTS GHC isn't guaranteed to have a threaded RTS. There should be a way to build it with the vanilla one. (cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d) - - - - - 51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00 Update ticky counter event docs. Add the info about the info table address and json fields. Fixes #23200 - - - - - 98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00 Export extractPromotedList (#24866) This can be useful in plugins. - - - - - 228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00 template-haskell: Move wired-ins to ghc-internal Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so ------------------------- - - - - - 62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00 testsuite: mark tests broken by #24886 Now that `template-haskell` is no longer wired-in. These tests are triggering #24886, and so need to be marked broken. - - - - - 3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00 rts: fix missing function prototypes in ClosureMacros.h - - - - - e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00 UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful. - - - - - d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00 ci: Update ci-images commit for fedora38 image The fedora38 nightly job has been failing for quite a while because `diff` was no longer installed. The ci-images bump explicitly installs `diffutils` into these images so hopefully they now pass again. - - - - - 3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00 Update exactprint docs - - - - - 77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00 Incorporate review feedback - - - - - 87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00 Remove no longer relevant reference to comments - - - - - 05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00 Replace outdated code example - - - - - 45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00 Reword error resulting from missing -XBangPatterns. It can be the result of either a bang pattern or strict binding, so now we say so instead of claiming it must be a bang pattern. Fixes #21032 - - - - - e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00 testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x - - - - - 7a660042 by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: ensure gc_thread/gen_workspace is allocated with proper alignment gc_thread/gen_workspace are required to be aligned by 64 bytes. However, this property has not been properly enforced before, and numerous alignment violations at runtime has been caught by UndefinedBehaviorSanitizer that look like: ``` rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment 0x0000027a3390: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8 rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment 0x0000027a3450: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13 ``` This patch fixes the gc_thread/gen_workspace misalignment issue by explicitly allocating them with alignment constraint. - - - - - c77a48af by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: fix an unaligned load in nonmoving gc This patch fixes an unaligned load in nonmoving gc by ensuring the closure address is properly untagged first before attempting to prefetch its header. The unaligned load is reported by UndefinedBehaviorSanitizer: ``` rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment 0x0042005f3a71: note: pointer points here 00 00 00 98 43 13 8e 12 7f 00 00 50 3c 5f 00 42 00 00 00 58 17 b7 92 12 7f 00 00 89 cb 5e 00 42 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9 ``` This issue had previously gone unnoticed since it didn't really harm runtime correctness, the invalid header address directly loaded from a tagged pointer is only used as prefetch address and will not cause segfaults. However, it still should be corrected because the prefetch would be rendered useless by this issue, and untagging only involves a single bitwise operation without memory access so it's cheap enough to add. - - - - - 05c4fafb by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: use __builtin_offsetof to implement STG_FIELD_OFFSET This patch fixes the STG_FIELD_OFFSET macro definition by using __builtin_offsetof, which is what gcc/clang uses to implement offsetof in standard C. The previous definition that uses NULL pointer involves subtle undefined behavior in C and thus reported by UndefinedBehaviorSanitizer as well: ``` rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58 ``` - - - - - 5ff83bfc by Sylvain Henry at 2024-05-30T14:43:10-04:00 JS: remove useless h$CLOCK_REALTIME (#23202) - - - - - 95ef2d58 by Matthew Pickering at 2024-05-30T14:43:47-04:00 ghcup-metadata: Fix metadata generation There were some syntax errors in the generation script which were preventing it from running. I have tested this with: ``` nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525 ``` which completed successfully. - - - - - 1bc66ee4 by Jakob Bruenker at 2024-05-30T14:44:22-04:00 Add diagrams to Arrows documentation This adds diagrams to the documentation of Arrows, similar to the ones found on https://www.haskell.org/arrows/. It does not add diagrams for ArrowChoice for the time being, mainly because it's not clear to me how to visually distinguish them from the ones for Arrow. Ideally, you might want to do something like highlight the arrows belonging to the same tuple or same Either in common colors, but that's not really possible with unicode. - - - - - d10a1c65 by Matthew Craven at 2024-05-30T23:35:48-04:00 Make UnsafeSNat et al. into pattern synonyms ...so that they do not cause coerce to bypass the nominal role on the corresponding singleton types when they are imported. See Note [Preventing unsafe coercions for singleton types] and the discussion at #23478. This also introduces unsafeWithSNatCo (and analogues for Char and Symbol) so that users can still access the dangerous coercions that importing the real constructors would allow, but only in a very localized way. - - - - - 0958937e by Cheng Shao at 2024-05-30T23:36:25-04:00 hadrian: build C/C++ with split sections when enabled When split sections is enabled, ensure -fsplit-sections is passed to GHC as well when invoking GHC to compile C/C++; and pass -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++ with the hadrian Cc builder. Fixes #23381. - - - - - 02b1f91e by Cheng Shao at 2024-05-30T23:36:25-04:00 driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled When -fsplit-sections is passed to GHC, pass -ffunction-sections -fdata-sections to gcc/clang when building C/C++. Previously, -fsplit-sections was only respected by the NCG/LLVM backends, but not the unregisterised backend; the GHC driver did not pass -fdata-sections and -ffunction-sections to the C compiler, which resulted in excessive executable sizes. Fixes #23381. ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - fd47e2e3 by Cheng Shao at 2024-05-30T23:37:00-04:00 testsuite: mark process005 as fragile on JS - - - - - 34a04ea1 by Matthew Pickering at 2024-05-31T06:08:36-04:00 Add -Wderiving-typeable to -Wall Deriving `Typeable` does nothing, and it hasn't done for a long while. There has also been a warning for a long while which warns you about uselessly deriving it but it wasn't enabled in -Wall. Fixes #24784 - - - - - 75fa7b0b by Matthew Pickering at 2024-05-31T06:08:36-04:00 docs: Fix formatting of changelog entries - - - - - 303c4b33 by Preetham Gujjula at 2024-05-31T06:09:21-04:00 docs: Fix link to injective type families paper Closes #24863 - - - - - df97e9a6 by Ben Gamari at 2024-05-31T06:09:57-04:00 ghc-internal: Fix package description The previous description was inherited from `base` and was inappropriate for `ghc-internal`. Also fix the maintainer and bug reporting fields. Closes #24906. - - - - - bf0737c0 by Cheng Shao at 2024-05-31T06:10:33-04:00 compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans This patch removes special consideration for ArchWasm32 in cmmDoCmmSwitchPlans, which means the compiler will now disable cmmImplementSwitchPlans for wasm unreg backend, just like unreg backend of other targets. We enabled it in the past to workaround some compile-time panic in older versions of LLVM, but those panics are no longer present, hence no need to keep this workaround. - - - - - 7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00 utils: add hie.yaml config file for ghc-config Add hie.yaml to ghc-config project directory so it can be edited using HLS. - - - - - 1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00 hadrian: handle findExecutable "" gracefully hadrian may invoke findExecutable "" at run-time due to a certain program is not found by configure script. Which is fine and findExecutable is supposed to return Nothing in this case. However, on Windows there's a directory bug that throws an exception (see https://github.com/haskell/directory/issues/180), so we might as well use a wrapper for findExecutable and handle exceptions gracefully. - - - - - 4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00 configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails When configure fails to find LLC/OPT/LLVMAS within supported version range, it used to set "llc"/"opt"/"clang" as fallback values. This behavior is particularly troublesome when the user has llc/opt/clang with other versions in their PATH and run the testsuite, since hadrian will incorrectly assume have_llvm=True and pass that to the testsuite driver, resulting in annoying optllvm test failures (#23186). If configure determines llc/opt/clang wouldn't work, then we shouldn't pretend it'll work at all, and the bindist configure will invoke FIND_LLVM_PROG check again at install time anyway. - - - - - 5f1afdf7 by Sylvain Henry at 2024-05-31T15:52:52-04:00 Introduce UniqueSet and use it to replace 'UniqSet Unique' 'UniqSet Unique' represents a set of uniques as a 'Map Unique Unique', which is wasting space (associated key/value are always the same). Fix #23572 and #23605 - - - - - e0aa42b9 by crumbtoo at 2024-05-31T15:53:33-04:00 Improve template-haskell haddocks Closes #15822 - - - - - ae170155 by Olivier Benz at 2024-06-01T09:35:17-04:00 Bump max LLVM version to 19 (not inclusive) - - - - - 92aa65ea by Matthew Pickering at 2024-06-01T09:35:17-04:00 ci: Update CI images to test LLVM 18 The debian12 image in this commit has llvm 18 installed. - - - - - adb1fe42 by Serge S. Gulin at 2024-06-01T09:35:53-04:00 Unicode: make ucd2haskell build-able again ucd2haskell tool used streamly library which version in cabal was out of date. It is updated to the latest version at hackage with deprecated parts rewritten. Also following fixes were applied to existing code in suppose that from its last run the code structure was changed and now it was required to be up to date with actual folder structures: 1. Ghc module path environment got a suffix with `src`. 2. Generated code got 2.1 `GHC.Internal` prefix for `Data.*`. 2.2 `GHC.Unicode.Internal` swapped on `GHC.Internal.Unicode` according to actual structure. - - - - - ad56fd84 by Jade at 2024-06-01T09:36:29-04:00 Replace 'NB' with 'Note' in error messages - - - - - 6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00 compiler: fix -ddump-cmm-raw when compiling .cmm This patch fixes missing -ddump-cmm-raw output when compiling .cmm, which is useful for debugging cmm related codegen issues. - - - - - 1c834ad4 by Ryan Scott at 2024-06-01T09:37:40-04:00 Print namespace specifiers in FixitySig's Outputable instance For whatever reason, the `Outputable` instance for `FixitySig` simply did not print out namespace specifiers, leading to the confusing `-ddump-splices` output seen in #24911. This patch corrects this oversight. Fixes #24911. - - - - - cf49fb5f by Sylvain Henry at 2024-06-01T09:38:19-04:00 Configure: display C++ compiler path - - - - - f9c1ae12 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable PIC for in-tree GMP on wasm32 This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. - - - - - 1a32f828 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable in-tree gmp fft code path for wasm32 This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. - - - - - 06277d56 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: build in-tree GMP with malloc-notreentrant on wasm32 This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. - - - - - 9f614270 by ARATA Mizuki at 2024-06-02T14:02:35-04:00 Set package include paths when assembling .S files Fixes #24839. Co-authored-by: Sylvain Henry <hsyl20 at gmail.com> - - - - - 4998a6ed by Alex Mason at 2024-06-03T02:09:29-04:00 Improve performance of genericWordQuotRem2Op (#22966) Implements the algorithm from compiler-rt's udiv128by64to64default. This rewrite results in a roughly 24x improvement in runtime on AArch64 (and likely any other arch that uses it). - - - - - ae50a8eb by Cheng Shao at 2024-06-03T02:10:05-04:00 testsuite: mark T7773 as fragile on wasm - - - - - c8ece0df by Fendor at 2024-06-03T19:43:22-04:00 Migrate `Finder` component to `OsPath`, fixed #24616 For each module in a GHCi session, we keep alive one `ModLocation`. A `ModLocation` is fairly inefficiently packed, as `String`s are expensive in memory usage. While benchmarking the agda codebase, we concluded that we keep alive around 11MB of `FilePath`'s, solely retained by `ModLocation`. We provide a more densely packed encoding of `ModLocation`, by moving from `FilePath` to `OsPath`. Further, we migrate the full `Finder` component to `OsPath` to avoid unnecessary transformations. As the `Finder` component is well-encapsulated, this requires only a minimal amount of changes in other modules. We introduce pattern synonym for 'ModLocation' which maintains backwards compatibility and avoids breaking consumers of 'ModLocation'. - - - - - 0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00 compiler: emit NaturallyAligned when element type & index type are the same width This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. - - - - - 18f63970 by Sebastian Graf at 2024-06-04T05:05:27-04:00 Parser: Remove unused `apats` rule - - - - - 38757c30 by David Knothe at 2024-06-04T05:05:27-04:00 Implement Or Patterns (#22596) This commit introduces a new language extension, `-XOrPatterns`, as described in GHC Proposal 522. An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ..., `patk` succeed, in this order. See also the summary `Note [Implmentation of OrPatterns]`. Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> - - - - - 395412e8 by Cheng Shao at 2024-06-04T05:06:04-04:00 compiler/ghci/rts: remove stdcall support completely We have formally dropped i386 windows support (#18487) a long time ago. The stdcall foreign call convention is only used by i386 windows, and the legacy logic around it is a significant maintenance burden for future work that adds arm64 windows support (#24603). Therefore, this patch removes stdcall support completely from the compiler as well as the RTS (#24883): - stdcall is still recognized as a FFI calling convention in Haskell syntax. GHC will now unconditionally emit a warning (-Wunsupported-calling-conventions) and treat it as ccall. - Apart from minimum logic to support the parsing and warning logic, all other code paths related to stdcall has been completely stripped from the compiler. - ghci only supports FFI_DEFAULT_ABI and ccall convention from now on. - FFI foreign export adjustor code on all platforms no longer handles the stdcall case and only handles ccall from now on. - The Win32 specific parts of RTS no longer has special code paths for stdcall. This commit is the final nail on the coffin for i386 windows support. Further commits will perform more housecleaning to strip the legacy code paths and pave way for future arm64 windows support. - - - - - d1fe9ab6 by Cheng Shao at 2024-06-04T05:06:04-04:00 rts: remove legacy i386 windows code paths This commit removes some legacy i386 windows related code paths in the RTS, given this target is no longer supported. - - - - - a605e4b2 by Cheng Shao at 2024-06-04T05:06:04-04:00 autoconf: remove i386 windows related logic This commit removes legacy i386 windows logic in autoconf scripts. - - - - - 91e5ac5e by Cheng Shao at 2024-06-04T05:06:04-04:00 llvm-targets: remove i386 windows support This commit removes i386 windows from llvm-targets and the script to generate it. - - - - - 65fe75a4 by Cheng Shao at 2024-06-04T05:06:04-04:00 libraries/utils: remove stdcall related legacy logic This commit removes stdcall related legacy logic in libraries and utils. ccall should be used uniformly for all supported windows hosts from now on. - - - - - d2a83302 by Cheng Shao at 2024-06-04T05:06:04-04:00 testsuite: adapt the testsuite for stdcall removal This patch adjusts test cases to handle the stdcall removal: - Some stdcall usages are replaced with ccall since stdcall doesn't make sense anymore. - We also preserve some stdcall usages, and check in the expected warning messages to ensure GHC always warn about stdcall usages (-Wunsupported-calling-conventions) as expected. - Error code testsuite coverage is slightly improved, -Wunsupported-calling-conventions is now tested. - Obsolete code paths related to i386 windows are also removed. - - - - - cef8f47a by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: minor adjustments for stdcall removal This commit include minor adjustments of documentation related to stdcall removal. - - - - - 54332437 by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: mention i386 Windows removal in 9.12 changelog This commit mentions removal of i386 Windows support and stdcall related change in the 9.12 changelog. - - - - - 2aaea8a1 by Cheng Shao at 2024-06-04T05:06:40-04:00 hadrian: improve user settings documentation This patch adds minor improvements to hadrian user settings documentation: - Add missing `ghc.cpp.opts` case - Remove non-existent `cxx` case - Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't - Add example of passing configure argument to autoconf packages - - - - - 71010381 by Alex Mason at 2024-06-04T12:09:07-04:00 Add AArch64 CLZ, CTZ, RBIT primop implementations. Adds support for emitting the clz and rbit instructions, which are used by GHC.Prim.clz*#, GHC.Prim.ctz*# and GHC.Prim.bitReverse*#. - - - - - 44e2abfb by Cheng Shao at 2024-06-04T12:09:43-04:00 hadrian: add +text_simdutf flavour transformer to allow building text with simdutf This patch adds a +text_simdutf flavour transformer to hadrian to allow downstream packagers and users that build from source to opt-in simdutf support for text, in order to benefit from SIMD speedup at run-time. It's still disabled by default for the time being. - - - - - 077cb2e1 by Cheng Shao at 2024-06-04T12:09:43-04:00 ci: enable +text_simdutf flavour transformer for wasm jobs This commit enables +text_simdutf flavour transformer for wasm jobs, so text is now built with simdutf support for wasm. - - - - - b23746ad by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Use TemplateHaskellQuotes in instance Lift ByteArray Resolves #24852 - - - - - 3fd25743 by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Mark addrToByteArray as NOINLINE This function should never be inlined in order to keep code size small. - - - - - 98ad1ea5 by Cheng Shao at 2024-06-04T22:51:26-04:00 compiler: remove unused CompilerInfo/LinkerInfo types This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. - - - - - 11795244 by Cheng Shao at 2024-06-05T06:33:17-04:00 rts: remove unused PowerPC/IA64 native adjustor code This commit removes unused PowerPC/IA64 native adjustor code which is never actually enabled by autoconf/hadrian. Fixes #24920. - - - - - 5132754b by Sylvain Henry at 2024-06-05T06:33:57-04:00 RTS: fix warnings with doing*Profiling (#24918) - - - - - accc8c33 by Cheng Shao at 2024-06-05T11:35:36-04:00 hadrian: don't depend on inplace/mingw when --enable-distro-toolchain on Windows - - - - - 6ffbd678 by Cheng Shao at 2024-06-05T11:35:37-04:00 autoconf: normalize paths of some build-time dependencies on Windows This commit applies path normalization via cygpath -m to some build-time dependencies on Windows. Without this logic, the /clang64/bin prefixed msys2-style paths cause the build to fail with --enable-distro-toolchain. - - - - - 075dc6d4 by Cheng Shao at 2024-06-05T11:36:12-04:00 hadrian: remove OSDarwin mention from speedHack This commit removes mentioning of OSDarwin from speedHack, since speedHack is purely for i386 and we no longer support i386 darwin (#24921). - - - - - 83235c4c by Cheng Shao at 2024-06-05T11:36:12-04:00 compiler: remove 32-bit darwin logic This commit removes all 32-bit darwin logic from the compiler, given we no longer support 32-bit apple systems (#24921). Also contains a bit more cleanup of obsolete i386 windows logic. - - - - - 1eb99bc3 by Cheng Shao at 2024-06-05T11:36:12-04:00 rts: remove 32-bit darwin/ios logic This commit removes 32-bit darwin/ios related logic from the rts, given we no longer support them (#24921). - - - - - 24f65892 by Cheng Shao at 2024-06-05T11:36:12-04:00 llvm-targets: remove 32-bit darwin/ios targets This commit removes 32-bit darwin/ios targets from llvm-targets given we no longer support them (#24921). - - - - - ccdbd689 by Cheng Shao at 2024-06-05T11:36:12-04:00 testsuite: remove 32-bit darwin logic This commit removes 32-bit darwin logic from the testsuite given it's no longer supported (#24921). Also contains more cleanup of obsolete i386 windows logic. - - - - - 11d661c4 by Cheng Shao at 2024-06-05T11:36:13-04:00 docs: mention 32-bit darwin/ios removal in 9.12 changelog This commit mentions removal of 32-bit darwin/ios support (#24921) in the 9.12 changelog. - - - - - 7c173310 by Georgi Lyubenov at 2024-06-05T15:17:22-04:00 Add firstA and secondA to Data.Bitraversable Please see https://github.com/haskell/core-libraries-committee/issues/172 for related discussion - - - - - 3b6f9fd1 by Ben Gamari at 2024-06-05T15:17:59-04:00 base: Fix name of changelog Fixes #24899. Also place it under `extra-doc-files` to better reflect its nature and avoid triggering unnecessary recompilation if it changes. - - - - - 1f4d2ef7 by Sebastian Graf at 2024-06-05T15:18:34-04:00 Announce Or-patterns in the release notes for GHC 9.12 (#22596) Leftover from !9229. - - - - - 8650338d by Jan Hrček at 2024-06-06T10:39:24-04:00 Improve haddocks of Language.Haskell.Syntax.Pat.Pat - - - - - 2eee65e1 by Cheng Shao at 2024-06-06T10:40:00-04:00 testsuite: bump T7653 timeout for wasm - - - - - 990fed60 by Sylvain Henry at 2024-06-07T14:45:23-04:00 StgToCmm: refactor opTranslate and friends - Change arguments order to avoid `\args -> ...` lambdas - Fix documentation - Rename StgToCmm options ("big" doesn't mean anything) - - - - - 1afad514 by Sylvain Henry at 2024-06-07T14:45:23-04:00 NCG x86: remove dead code (#5444) Since 6755d833af8c21bbad6585144b10e20ac4a0a1ab this code is dead. - - - - - 595c0894 by Cheng Shao at 2024-06-07T14:45:58-04:00 testsuite: skip objc-hi/objcxx-hi when cross compiling objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. - - - - - edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - ec5e9a58 by Ben Gamari at 2024-11-13T10:10:30-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Julian and Mikolaj. - - - - - 34316d4b by Ben Gamari at 2024-11-13T10:10:53-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 737a50d6 by Ben Gamari at 2024-11-13T10:10:53-05:00 rts: Eliminate platform-dependent casting Previously serialiseTaskId had some superfluous platform-dependent logic to determine whether or not TaskId OsThreadId is an integer. However, this is unnecessary; we now just unconditionally cast through uintptr_t. - - - - - 16 changed files: - − .appveyor.sh - .editorconfig - .ghcid - + .git-blame-ignore-revs - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - − .gitlab/circle-ci-job.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - − .gitlab/gen_ci.hs - + .gitlab/generate-ci/LICENSE - + .gitlab/generate-ci/README.mkd - + .gitlab/generate-ci/flake.lock - + .gitlab/generate-ci/flake.nix The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/13147361a65435c267610511953d68396722e865...737a50d69d5a6747a1610f33cd7c5d88cffb95a1 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/13147361a65435c267610511953d68396722e865...737a50d69d5a6747a1610f33cd7c5d88cffb95a1 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 15:21:29 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 13 Nov 2024 10:21:29 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Remove obsolete cross-port script Message-ID: <6734c3f9c9388_2a1b7a5c587895983@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - a876f9e1 by Sebastian Graf at 2024-11-13T10:21:14-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - a1da8094 by Ben Gamari at 2024-11-13T10:21:16-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 14 changed files: - boot - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/Parser.y - − distrib/cross-port - hadrian/bindist/config.mk.in - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/printer/Makefile - testsuite/tests/printer/Test20297.stdout - + testsuite/tests/printer/Test25467.hs - testsuite/tests/printer/all.T - utils/check-exact/Main.hs Changes: ===================================== boot ===================================== @@ -66,9 +66,6 @@ def autoreconf(): for dir_ in ['.', 'rts'] + glob.glob('libraries/*/'): if os.path.isfile(os.path.join(dir_, 'configure.ac')): print("Booting %s" % dir_) - # Update config.sub in submodules - if dir_ != '.' and os.path.isfile(os.path.join(dir_, 'config.sub')): - shutil.copyfile('config.sub', os.path.join(dir_, 'config.sub')) processes[dir_] = subprocess.Popen(['sh', '-c', reconf_cmd], cwd=dir_) # Wait for all child processes to finish. ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we give their first arg lazyApply1Dmd and not +-- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that +-- the call forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often (but not always) choose to use a wrapper around +-- catch# that is head-strict in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2772,6 +2799,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2814,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +3000,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3029,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3058,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3070,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3731,6 +3760,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] effect = ReadWriteEffect -- The invoked computation may have side effects ===================================== compiler/GHC/Parser.y ===================================== @@ -1853,7 +1853,7 @@ where_inst :: { Located ((EpToken "where", (EpToken "{", EpToken "}", [EpToken " -- decls :: { Located (EpaLocation, [EpToken ";"], OrdList (LHsDecl GhcPs)) } : decls ';' decl {% if isNilOL (thdOf3 $ unLoc $1) - then return (sLL $1 $> (glEE $2 $3, (sndOf3 $ unLoc $1) ++ (msemiA $2) + then return (sLL $2 $> (glR $3, (sndOf3 $ unLoc $1) ++ (msemiA $2) , unitOL $3)) else case (thdOf3 $ unLoc $1) of SnocOL hs t -> do @@ -1862,7 +1862,7 @@ decls :: { Located (EpaLocation, [EpToken ";"], OrdList (LHsDecl GhcPs)) } rest = snocOL hs t'; these = rest `appOL` this } return (rest `seq` this `seq` these `seq` - (sLL $1 $> (glEE $1 $3, sndOf3 $ unLoc $1, these))) } + (sLL $1 $> (glEE (fstOf3 $ unLoc $1) $3, sndOf3 $ unLoc $1, these))) } | decls ';' {% if isNilOL (thdOf3 $ unLoc $1) then return (sLZ $1 $> (glR $2, (sndOf3 $ unLoc $1) ++ (msemiA $2) ,thdOf3 $ unLoc $1)) @@ -1876,7 +1876,7 @@ decls :: { Located (EpaLocation, [EpToken ";"], OrdList (LHsDecl GhcPs)) } decllist :: { Located (AnnList (),Located (OrdList (LHsDecl GhcPs))) } : '{' decls '}' { sLL $1 $> (AnnList (Just (fstOf3 $ unLoc $2)) (ListBraces (epTok $1) (epTok $3)) (sndOf3 $ unLoc $2) noAnn [] ,sL1 $2 $ thdOf3 $ unLoc $2) } - | vocurly decls close { L (getHasLoc $ fstOf3 $ unLoc $2) (AnnList (Just (glR $2)) ListNone (sndOf3 $ unLoc $2) noAnn [] + | vocurly decls close { sL1 $2 (AnnList (Just (fstOf3 $ unLoc $2)) ListNone (sndOf3 $ unLoc $2) noAnn [] ,sL1 $2 $ thdOf3 $ unLoc $2) } -- Binding groups other than those of class and instance declarations ===================================== distrib/cross-port deleted ===================================== @@ -1,75 +0,0 @@ -#!/usr/bin/env bash - -# This script can be used to generate some unregisterised .hc files -# for bootstrapping GHC on a new/unsupported platform. It involves a -# two-stage bootstrap: the first stage builds an unregisterised set of -# libraries & RTS, and the second stage builds an unregisterised -# compiler. - -# Take the .hc files from the libraries of stage 1, and the compiler -# of stage 2, to the target system and bootstrap from these to get a -# working (unregisterised) compiler. - -set -e - -base=`pwd` - -# set this to the location of your source tree -fptools_dir=$HOME/fptools - -if [ ! -f b1-stamp ]; then - mkdir b1 - cd b1 - lndir $fptools_dir - cd .. - - cd b1 - ./configure - - # For cross-compilation, at this stage you may want to set up a source - # tree on the target machine, run the configure script there, and bring - # the resulting rts/ghcautoconf.h.autoconf file back into this tree before building - # the libraries. - - touch mk/build.mk - echo "GhcUnregisterised = YES" >> mk/build.mk - echo "GhcLibHcOpts = -O -H32m -fvia-C -keep-hc-files" >> mk/build.mk - echo "GhcLibWays =" >> mk/build.mk - - # We could optimise slightly by not building hslibs here. Also, building - # the RTS is not necessary (and might not be desirable if we're using - # a ghcautoconf.h from the target system). - make stage1 - - cd .. - - touch b1-stamp -fi - -# exit 0 - -if [ ! -f b2-stamp ]; then - mkdir b2 - cd b2 - lndir $fptools_dir - cd .. - - cd b2 - ./configure --with-ghc=$base/b1/ghc/compiler/stage1/ghc-inplace - - touch mk/build.mk - # The bootstrapped compiler should probably generate unregisterised - # code too. If you don't want it to, then comment out this line: - echo "GhcUnregisterised = YES" >> mk/build.mk - echo "SRC_HC_OPTS += -keep-hc-file -fvia-C" >> mk/build.mk - echo "GhcWithInterpreter = NO" >> mk/build.mk - - # we just need to build the compiler and utils... - (cd glafp-utils && make boot && make) - (cd ghc && make boot) - (cd ghc/utils && make) - (cd ghc/compiler && make stage=1) - cd .. - - touch b2-stamp -fi ===================================== hadrian/bindist/config.mk.in ===================================== @@ -147,8 +147,8 @@ endif # Whether to include GHCi in the compiler. Depends on whether the RTS linker # has support for this OS/ARCH combination. -OsSupportsGHCi=$(strip $(patsubst $(TargetOS_CPP), YES, $(findstring $(TargetOS_CPP), mingw32 linux solaris2 freebsd dragonfly netbsd openbsd darwin kfreebsdgnu))) -ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc powerpc64 powerpc64le sparc sparc64 arm aarch64 riscv64))) +OsSupportsGHCi=$(strip $(patsubst $(TargetOS_CPP), YES, $(findstring $(TargetOS_CPP), mingw32 linux solaris2 freebsd dragonfly netbsd openbsd darwin kfreebsdgnu wasi))) +ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc powerpc64 powerpc64le sparc sparc64 arm aarch64 riscv64 wasm32))) ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES" GhcWithInterpreter=YES ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) ===================================== testsuite/tests/parser/should_compile/DumpSemis.stderr ===================================== @@ -1971,7 +1971,7 @@ (EpaSpan { DumpSemis.hs:34:13-31 }) (AnnList (Just - (EpaSpan { DumpSemis.hs:34:14-30 })) + (EpaSpan { DumpSemis.hs:34:18-30 })) (ListBraces (EpTok (EpaSpan { DumpSemis.hs:34:13 })) (EpTok (EpaSpan { DumpSemis.hs:34:31 }))) ===================================== testsuite/tests/printer/Makefile ===================================== @@ -891,3 +891,8 @@ Test25132: Test25454: $(CHECK_PPR) $(LIBDIR) Test25454.hs $(CHECK_EXACT) $(LIBDIR) Test25454.hs + +.PHONY: Test25467 +Test25467: + $(CHECK_PPR) $(LIBDIR) Test25467.hs + $(CHECK_EXACT) $(LIBDIR) Test25467.hs ===================================== testsuite/tests/printer/Test20297.stdout ===================================== @@ -153,7 +153,7 @@ (EpaSpan { }) (AnnList (Just - (EpaSpan { })) + (EpaSpan { Test20297.hs:7:3-7 })) (ListNone) [] (EpTok @@ -582,7 +582,7 @@ (EpaSpan { }) (AnnList (Just - (EpaSpan { })) + (EpaSpan { Test20297.ppr.hs:5:3-7 })) (ListNone) [] (EpTok ===================================== testsuite/tests/printer/Test25467.hs ===================================== @@ -0,0 +1,21 @@ +module Test25467 where + +fff = do + let { + ; (a, b) = foo + } + pure () + +foo = do + let ;x =1 + +bar1 = do + let { + ; labels1 = getFieldLabels + ; argexprA = vhdlNameToVHDLExpr + } + +bar2 = do + let { + ; labels2 = getFieldLabels + } ===================================== testsuite/tests/printer/all.T ===================================== @@ -210,6 +210,7 @@ test('Test24753', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24753']) test('Test24771', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24771']) test('Test24159', [ignore_stderr, req_ppr_deps], makefile_test, ['Test24159']) test('Test25132', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25132']) +test('Test25467', [ignore_stderr, req_ppr_deps], makefile_test, ['Test25467']) test('T24237', normal, compile_fail, ['']) ===================================== utils/check-exact/Main.hs ===================================== @@ -213,10 +213,11 @@ _tt = testOneFile changers "/home/alanz/mysrc/git.haskell.org/worktree/epw/_buil -- "../../testsuite/tests/printer/Test16279.hs" Nothing -- "../../testsuite/tests/printer/HsDocTy.hs" Nothing -- "../../testsuite/tests/printer/Test21355.hs" Nothing --- "../../testsuite/tests/printer/Test22765.hs" Nothing + -- "../../testsuite/tests/printer/Test22765.hs" Nothing -- "../../testsuite/tests/printer/Test22771.hs" Nothing -- "../../testsuite/tests/printer/Test23465.hs" Nothing - "../../testsuite/tests/printer/Test25454.hs" Nothing + -- "../../testsuite/tests/printer/Test25454.hs" Nothing + "../../testsuite/tests/printer/Test25467.hs" Nothing -- cloneT does not need a test, function can be retired View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c008da428280ff0be8067cac270cd3c6279b4a19...a1da8094757146c215b86bbe029b65a34151154a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c008da428280ff0be8067cac270cd3c6279b4a19...a1da8094757146c215b86bbe029b65a34151154a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 15:26:17 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 10:26:17 -0500 Subject: [Git][ghc/ghc][ghc-9.8] 4 commits: Bump filepath submodule to v1.4.300.2 Message-ID: <6734c51994462_2a1b7a5c588c104525@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: 85dd5c10 by Ben Gamari at 2024-11-09T11:29:04-05:00 Bump filepath submodule to v1.4.300.2 This includes a fix for filepath#219. Fixes #24597. - - - - - da9912f3 by Matthew Pickering at 2024-11-11T12:07:22-05:00 ci: Enable more documentation building Here we enable documentation building on 1. Darwin: The sphinx toolchain was already installed so we enable html and manpages. 2. Rocky8: Full documentation (toolchain already installed) 3. Alpine: Full documetnation (toolchain already installed) 4. Windows: HTML and manpages (toolchain already installed) Fixes #24465 (cherry picked from commit 67ace1c59dd582919bceb4fdadbefc1d98d3449a) - - - - - 90c7d9a6 by Zubin Duggal at 2024-11-11T20:10:03-05:00 testsuite: Skip MultiLayerModulesTH_OneShot on darwin See #24177 (cherry picked from commit 1bf7ce0e3ec4be3bacea015c42a2a218c33bea43) - - - - - 4603513b by Zubin Duggal at 2024-11-12T10:42:36-05:00 release: Sign .gz bindists too Fixes #25447 (cherry picked from commit bbdbe2254df1bfc9157cfb409afc93f8157712cd) - - - - - 6 changed files: - .gitlab/ci.sh - .gitlab/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/upload.sh - libraries/filepath - testsuite/tests/perf/compiler/all.T Changes: ===================================== .gitlab/ci.sh ===================================== @@ -160,6 +160,8 @@ function mingw_init() { # We always use mingw64 Python to avoid path length issues like #17483. export PYTHON="/mingw64/bin/python3" + # And need to use sphinx-build from the environment + export SPHINXBUILD="/mingw64/bin/sphinx-build.exe" } # This will contain GHC's local native toolchain @@ -315,7 +317,7 @@ function fetch_cabal() { fail "neither CABAL nor CABAL_INSTALL_VERSION are not set" fi - start_section "fetch GHC" + start_section "fetch cabal" case "$(uname)" in # N.B. Windows uses zip whereas all others use .tar.xz MSYS_*|MINGW*) @@ -342,7 +344,7 @@ function fetch_cabal() { mv cabal "$toolchain/bin" ;; esac - end_section "fetch GHC" + end_section "fetch cabal" fi } ===================================== .gitlab/gen_ci.hs ===================================== @@ -408,7 +408,7 @@ opsysVariables AArch64 (Darwin {}) = , "LANG" =: "en_US.UTF-8" , "CONFIGURE_ARGS" =: "--with-intree-gmp --with-system-libffi" -- Fonts can't be installed on darwin - , "HADRIAN_ARGS" =: "--docs=no-sphinx" + , "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs" ] opsysVariables Amd64 (Darwin {}) = mconcat [ "NIX_SYSTEM" =: "x86_64-darwin" @@ -422,12 +422,12 @@ opsysVariables Amd64 (Darwin {}) = , "LANG" =: "en_US.UTF-8" , "CONFIGURE_ARGS" =: "--with-intree-gmp --with-system-libffi" -- Fonts can't be installed on darwin - , "HADRIAN_ARGS" =: "--docs=no-sphinx" + , "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs" ] opsysVariables _ (Windows {}) = mconcat [ "MSYSTEM" =: "CLANG64" - , "HADRIAN_ARGS" =: "--docs=no-sphinx" + , "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs" , "LANG" =: "en_US.UTF-8" , "CABAL_INSTALL_VERSION" =: "3.8.1.0" , "GHC_VERSION" =: "9.4.3" ] @@ -437,7 +437,6 @@ alpineVariables = mconcat [ -- Due to #20266 "CONFIGURE_ARGS" =: "--disable-ld-override" , "INSTALL_CONFIGURE_ARGS" =: "--disable-ld-override" - , "HADRIAN_ARGS" =: "--docs=no-sphinx" -- encoding004: due to lack of locale support -- T10458, ghcilink002: due to #17869 -- linker_unload_native: due to lack of dlinfo() support @@ -452,9 +451,6 @@ distroVariables Centos7 = mconcat [ "HADRIAN_ARGS" =: "--docs=no-sphinx" , "BROKEN_TESTS" =: "T22012" -- due to #23979 ] -distroVariables Rocky8 = mconcat [ - "HADRIAN_ARGS" =: "--docs=no-sphinx" - ] distroVariables Fedora33 = mconcat -- LLC/OPT do not work for some reason in our fedora images -- These tests fail with this error: T11649 T5681 T7571 T8131b ===================================== .gitlab/jobs.yaml ===================================== @@ -55,7 +55,7 @@ "BIN_DIST_NAME": "ghc-aarch64-darwin-validate", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "LANG": "en_US.UTF-8", "MACOSX_DEPLOYMENT_TARGET": "11.0", "NIX_SYSTEM": "aarch64-darwin", @@ -233,7 +233,7 @@ "BIN_DIST_NAME": "ghc-aarch64-darwin-validate", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "LANG": "en_US.UTF-8", "MACOSX_DEPLOYMENT_TARGET": "11.0", "NIX_SYSTEM": "aarch64-darwin", @@ -297,7 +297,6 @@ "BROKEN_TESTS": "encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--docs=no-sphinx", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "aarch64-linux-alpine3_18-validate", "XZ_OPT": "-9" @@ -594,7 +593,7 @@ "BIN_DIST_NAME": "ghc-x86_64-darwin-validate", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "LANG": "en_US.UTF-8", "MACOSX_DEPLOYMENT_TARGET": "10.13", "NIX_SYSTEM": "x86_64-darwin", @@ -722,7 +721,6 @@ "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "validate+fully_static", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--docs=no-sphinx", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "x86_64-linux-alpine3_12-int_native-validate+fully_static", "XZ_OPT": "-9" @@ -784,7 +782,6 @@ "BROKEN_TESTS": "encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--docs=no-sphinx", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "x86_64-linux-alpine3_12-validate", "XZ_OPT": "-9" @@ -846,7 +843,6 @@ "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "validate+fully_static", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--docs=no-sphinx", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static", "XZ_OPT": "-9" @@ -2229,7 +2225,6 @@ "BIN_DIST_NAME": "ghc-x86_64-linux-rocky8-validate", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "", - "HADRIAN_ARGS": "--docs=no-sphinx", "TEST_ENV": "x86_64-linux-rocky8-validate", "XZ_OPT": "-9" } @@ -2404,7 +2399,7 @@ "CABAL_INSTALL_VERSION": "3.8.1.0", "CONFIGURE_ARGS": "", "GHC_VERSION": "9.4.3", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "LANG": "en_US.UTF-8", "MSYSTEM": "CLANG64", "TEST_ENV": "x86_64-windows-int_native-validate", @@ -2463,7 +2458,7 @@ "CABAL_INSTALL_VERSION": "3.8.1.0", "CONFIGURE_ARGS": "", "GHC_VERSION": "9.4.3", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "LANG": "en_US.UTF-8", "MSYSTEM": "CLANG64", "TEST_ENV": "x86_64-windows-validate", @@ -2525,7 +2520,7 @@ "BIN_DIST_NAME": "ghc-aarch64-darwin-release", "BUILD_FLAVOUR": "release", "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs", "IGNORE_PERF_FAILURES": "all", "LANG": "en_US.UTF-8", "MACOSX_DEPLOYMENT_TARGET": "11.0", @@ -2590,7 +2585,7 @@ "BROKEN_TESTS": "encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "release+no_split_sections", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids", "IGNORE_PERF_FAILURES": "all", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "aarch64-linux-alpine3_18-release+no_split_sections", @@ -2835,7 +2830,7 @@ "BIN_DIST_NAME": "ghc-x86_64-darwin-release", "BUILD_FLAVOUR": "release", "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs", "IGNORE_PERF_FAILURES": "all", "LANG": "en_US.UTF-8", "MACOSX_DEPLOYMENT_TARGET": "10.13", @@ -2903,7 +2898,7 @@ "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "release+fully_static", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids", "IGNORE_PERF_FAILURES": "all", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "x86_64-linux-alpine3_12-int_native-release+fully_static", @@ -2966,7 +2961,7 @@ "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "release+fully_static+no_split_sections", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids", "IGNORE_PERF_FAILURES": "all", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "x86_64-linux-alpine3_12-release+fully_static+no_split_sections", @@ -3029,7 +3024,7 @@ "BROKEN_TESTS": "encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "release+no_split_sections", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids", "IGNORE_PERF_FAILURES": "all", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "x86_64-linux-alpine3_12-release+no_split_sections", @@ -3708,7 +3703,7 @@ "BIN_DIST_NAME": "ghc-x86_64-linux-rocky8-release", "BUILD_FLAVOUR": "release", "CONFIGURE_ARGS": "", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids", "IGNORE_PERF_FAILURES": "all", "TEST_ENV": "x86_64-linux-rocky8-release", "XZ_OPT": "-9" @@ -3888,7 +3883,7 @@ "CABAL_INSTALL_VERSION": "3.8.1.0", "CONFIGURE_ARGS": "", "GHC_VERSION": "9.4.3", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs", "IGNORE_PERF_FAILURES": "all", "LANG": "en_US.UTF-8", "MSYSTEM": "CLANG64", @@ -3948,7 +3943,7 @@ "CABAL_INSTALL_VERSION": "3.8.1.0", "CONFIGURE_ARGS": "", "GHC_VERSION": "9.4.3", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs", "IGNORE_PERF_FAILURES": "all", "LANG": "en_US.UTF-8", "MSYSTEM": "CLANG64", @@ -4011,7 +4006,7 @@ "BIN_DIST_NAME": "ghc-x86_64-darwin-validate", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "LANG": "en_US.UTF-8", "MACOSX_DEPLOYMENT_TARGET": "10.13", "NIX_SYSTEM": "x86_64-darwin", @@ -4137,7 +4132,6 @@ "BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native", "BUILD_FLAVOUR": "validate+fully_static", "CONFIGURE_ARGS": "--disable-ld-override ", - "HADRIAN_ARGS": "--docs=no-sphinx", "INSTALL_CONFIGURE_ARGS": "--disable-ld-override", "TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static" } @@ -5085,7 +5079,7 @@ "CABAL_INSTALL_VERSION": "3.8.1.0", "CONFIGURE_ARGS": "", "GHC_VERSION": "9.4.3", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "LANG": "en_US.UTF-8", "MSYSTEM": "CLANG64", "TEST_ENV": "x86_64-windows-validate" ===================================== .gitlab/rel_eng/upload.sh ===================================== @@ -83,6 +83,7 @@ function hash_files() { echo $(find -maxdepth 1 \ -iname '*.xz' \ -o -iname '*.lz' \ + -o -iname '*.gz' \ -o -iname '*.bz2' \ -o -iname '*.zip' \ ) ===================================== libraries/filepath ===================================== @@ -1 +1 @@ -Subproject commit cdb5171f7774569b1a8028a78392cfa79f732b5c +Subproject commit 9b7803e33950774399aaeec7c4420fe634a6240a ===================================== testsuite/tests/perf/compiler/all.T ===================================== @@ -366,7 +366,10 @@ test('MultiLayerModulesTH_OneShot', pre_cmd('$MAKE -s --no-print-directory MultiLayerModulesTH_OneShot_Prep'), extra_files(['genMultiLayerModulesTH']), unless(have_dynamic(),skip), - compile_timeout_multiplier(5) + compile_timeout_multiplier(5), + # We skip the test on darwin due to recent regression due to toolchain + # upgrade (tracked in #24177) + when(opsys('darwin'), skip) ], compile_fail, ['-v0']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b6639a64c30c5d3a3783507eca998be659e3ebf7...4603513b7706fc6ab8b9648907c14fb91d5c1239 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b6639a64c30c5d3a3783507eca998be659e3ebf7...4603513b7706fc6ab8b9648907c14fb91d5c1239 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 15:26:47 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 10:26:47 -0500 Subject: [Git][ghc/ghc][wip/bytecode-improvements] 39 commits: ghc-internal: strict, unboxed src loc ranges Message-ID: <6734c5376ddcc_2a1b7a5c588c10493e@gitlab.mail> Ben Gamari pushed to branch wip/bytecode-improvements at Glasgow Haskell Compiler / GHC Commits: ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 83470895 by Ben Gamari at 2024-11-13T10:26:34-05:00 rts: Tighten up invariants of PACK - - - - - c9b167fe by Ben Gamari at 2024-11-13T10:26:34-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 411ed07e by Ben Gamari at 2024-11-13T10:26:34-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 1b84813f by Ben Gamari at 2024-11-13T10:26:34-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 8f878104 by Ben Gamari at 2024-11-13T10:26:34-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4d7afaaa7f376c0f59e7ddd53bf9086c733da3b5...8f878104e6e20f46d77c1b07e6b02319b5e8b1dc -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4d7afaaa7f376c0f59e7ddd53bf9086c733da3b5...8f878104e6e20f46d77c1b07e6b02319b5e8b1dc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 17:09:36 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 12:09:36 -0500 Subject: [Git][ghc/ghc][ghc-9.8] Bump version to 9.8.4 Message-ID: <6734dd505b911_e18424354cc68576@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: e7b2a216 by Ben Gamari at 2024-11-13T10:25:00-05:00 Bump version to 9.8.4 - - - - - 1 changed file: - configure.ac Changes: ===================================== configure.ac ===================================== @@ -13,7 +13,7 @@ dnl # see what flags are available. (Better yet, read the documentation!) # -AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.8.3], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) +AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.8.4], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION]) # Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable # to be useful (cf #19058). However, the version must have three components # (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e7b2a21605750fb2c6613fde84e4337d08a2d13b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e7b2a21605750fb2c6613fde84e4337d08a2d13b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 18:02:34 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 13:02:34 -0500 Subject: [Git][ghc/ghc][wip/T25452] 39 commits: ghc-internal: strict, unboxed src loc ranges Message-ID: <6734e9bac8462_e18428c053c71361@gitlab.mail> Ben Gamari pushed to branch wip/T25452 at Glasgow Haskell Compiler / GHC Commits: ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 43a93977 by Ben Gamari at 2024-11-13T13:02:23-05:00 base: Label threads forked by IO operations Addresses part of #25452. - - - - - 5fb2135b by Ben Gamari at 2024-11-13T13:02:23-05:00 base: Label threads forked by System.Timeout Addresses part of #25452. - - - - - 6d28c54a by Ben Gamari at 2024-11-13T13:02:23-05:00 base: Label signal handling threads Addresses part of #25452. - - - - - e8ae5414 by Ben Gamari at 2024-11-13T13:02:23-05:00 base: Label Windows console event handling threads Addresses part of #25452. - - - - - 810101b2 by Ben Gamari at 2024-11-13T13:02:23-05:00 ghci: Label evaluation sandbox thread Addresses part of #25452. - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/34460bbc772d5c8c20e5775e884f0cac525ee5b4...810101b28e70c93f47be015ad6cc5968ad8dc793 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/34460bbc772d5c8c20e5775e884f0cac525ee5b4...810101b28e70c93f47be015ad6cc5968ad8dc793 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 18:42:37 2024 From: gitlab at gitlab.haskell.org (Peter Trommler (@trommler)) Date: Wed, 13 Nov 2024 13:42:37 -0500 Subject: [Git][ghc/ghc][wip/ppc64-fix-T25155-T25240] 31 commits: Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <6734f31db7447_349dd2f3304788e5@gitlab.mail> Peter Trommler pushed to branch wip/ppc64-fix-T25155-T25240 at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 1bcc443c by Peter Trommler at 2024-11-13T18:59:43+01:00 Fix requirements on T25240 T25240 doesn't need RTS linker, GHCi is sufficient and GHCi can also be dynamically linked. - - - - - 106cb457 by Peter Trommler at 2024-11-13T18:59:43+01:00 Fix requirements for T25155 Loading C objects requires RTS linker. - - - - - 30 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/IfaceToCore.hs - compiler/GHC/JS/Make.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f8cb9cf15c40d1d7d1f70966f4392d1151c29769...106cb457e38b2ad751e008be43aa77ae80a5b18b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f8cb9cf15c40d1d7d1f70966f4392d1151c29769...106cb457e38b2ad751e008be43aa77ae80a5b18b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 19:26:01 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 14:26:01 -0500 Subject: [Git][ghc/ghc][ghc-9.8] driver: Fix -Wmissing-home-modules when multiple units have the same module name Message-ID: <6734fd49aa866_349dd2306bf083156@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: 81cee582 by Matthew Pickering at 2024-11-13T14:25:24-05:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 (cherry picked from commit 951ce3d5904a1d34d49787d444f99e251e24d4e7) - - - - - 5 changed files: - compiler/GHC/Driver/Make.hs - + testsuite/tests/driver/multipleHomeUnits/T25122/T25122.hs - testsuite/tests/driver/multipleHomeUnits/all.T - + testsuite/tests/driver/multipleHomeUnits/unitSame1 - + testsuite/tests/driver/multipleHomeUnits/unitSame2 Changes: ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -340,10 +340,12 @@ warnMissingHomeModules dflags targets mod_graph = -- Note also that we can't always infer the associated module name -- directly from the filename argument. See #13727. is_known_module mod = - (Map.lookup (moduleName (ms_mod mod)) mod_targets == Just (ms_unitid mod)) + is_module_target mod || maybe False is_file_target (ml_hs_file (ms_location mod)) + is_module_target mod = (moduleName (ms_mod mod), ms_unitid mod) `Set.member` mod_targets + is_file_target file = Set.member (withoutExt file) file_targets file_targets = Set.fromList (mapMaybe file_target targets) @@ -354,7 +356,7 @@ warnMissingHomeModules dflags targets mod_graph = TargetFile file _ -> Just (withoutExt (augmentByWorkingDirectory dflags file)) - mod_targets = Map.fromList (mod_target <$> targets) + mod_targets = Set.fromList (mod_target <$> targets) mod_target Target {targetUnitId, targetId} = case targetId of ===================================== testsuite/tests/driver/multipleHomeUnits/T25122/T25122.hs ===================================== @@ -0,0 +1 @@ +module T25122 where ===================================== testsuite/tests/driver/multipleHomeUnits/all.T ===================================== @@ -71,6 +71,11 @@ test('multipleHomeUnits_shared', [extra_files([ 'A.hs', 'unitShared1', 'unitShar test('multipleHomeUnits_shared_ghci', [extra_files([ 'shared.script', 'A.hs', 'unitShared1', 'unitShared2']), extra_run_opts('-unit @unitShared1 -unit @unitShared2')], ghci_script, ['shared.script']) +test('T25122', + [ extra_files( + [ 'T25122', 'unitSame1', 'unitSame2']) + ], multiunit_compile, [['unitSame1', 'unitSame2'], '-v0 -fhide-source-paths -Werror -Wmissing-home-modules']) + ===================================== testsuite/tests/driver/multipleHomeUnits/unitSame1 ===================================== @@ -0,0 +1,3 @@ +T25122 +-iT25122 +-this-unit-id=s1 ===================================== testsuite/tests/driver/multipleHomeUnits/unitSame2 ===================================== @@ -0,0 +1,3 @@ +T25122 +-iT25122 +-this-unit-id=u2 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81cee5822feceefe13982a87ed48c8ff5165d332 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81cee5822feceefe13982a87ed48c8ff5165d332 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 20:21:52 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 13 Nov 2024 15:21:52 -0500 Subject: [Git][ghc/ghc][master] DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <67350a60ecf1f_349dd2a7d730922c0@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 4 changed files: - compiler/GHC/Builtin/primops.txt.pp - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we give their first arg lazyApply1Dmd and not +-- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that +-- the call forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often (but not always) choose to use a wrapper around +-- catch# that is head-strict in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2772,6 +2799,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2814,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +3000,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3029,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3058,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3070,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3731,6 +3760,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] effect = ReadWriteEffect -- The invoked computation may have side effects ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/00d58ae18a7ce8db6b2d57261a08ba8c1c2549b5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/00d58ae18a7ce8db6b2d57261a08ba8c1c2549b5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 20:22:26 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 13 Nov 2024 15:22:26 -0500 Subject: [Git][ghc/ghc][master] boot: Do not attempt to update config.sub Message-ID: <67350a82c95c0_349dd2915ec4971a9@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 1 changed file: - boot Changes: ===================================== boot ===================================== @@ -66,9 +66,6 @@ def autoreconf(): for dir_ in ['.', 'rts'] + glob.glob('libraries/*/'): if os.path.isfile(os.path.join(dir_, 'configure.ac')): print("Booting %s" % dir_) - # Update config.sub in submodules - if dir_ != '.' and os.path.isfile(os.path.join(dir_, 'config.sub')): - shutil.copyfile('config.sub', os.path.join(dir_, 'config.sub')) processes[dir_] = subprocess.Popen(['sh', '-c', reconf_cmd], cwd=dir_) # Wait for all child processes to finish. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/93233a667220eae4b0da375c14208f449bb2f95d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/93233a667220eae4b0da375c14208f449bb2f95d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 20:33:56 2024 From: gitlab at gitlab.haskell.org (Alan Zimmerman (@alanz)) Date: Wed, 13 Nov 2024 15:33:56 -0500 Subject: [Git][ghc/ghc][wip/az/ghc-9.12-epa-backports] 9 commits: testsuite: allow metric increase for TcPlugin_RewritePerf Message-ID: <67350d3466f2_349dd2cfabd4977a0@gitlab.mail> Alan Zimmerman pushed to branch wip/az/ghc-9.12-epa-backports at Glasgow Haskell Compiler / GHC Commits: 8de7406f by Zubin Duggal at 2024-11-12T13:42:19+05:30 testsuite: allow metric increase for TcPlugin_RewritePerf this is an empty commit to allow this backports batch to be merged. Metric Increase: TcPlugin_RewritePerf - - - - - bdeac4aa by Alan Zimmerman at 2024-11-13T18:12:29+00:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp (cherry picked from commit dbc77ce804c0f410f3f2894a158d0ee899ce64f5) - - - - - 44c1ee09 by Alan Zimmerman at 2024-11-13T18:12:29+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure (cherry picked from commit 8a6691c3a947a21c7dcc9772d6cc396894c4756f) - - - - - 2ad51490 by Alan Zimmerman at 2024-11-13T18:12:29+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. (cherry picked from commit d5e7990ca9637ebee2293b22815fa0c393231baf) - - - - - 0259bda6 by Alan Zimmerman at 2024-11-13T18:12:29+00:00 EPA: Remove some unused functions (cherry picked from commit b349fd1b92ddab6dad968fe731b84a16d9d2de51) - - - - - 12606f6b by Alan Zimmerman at 2024-11-13T18:12:29+00:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat (cherry picked from commit f859d61c4832b16ae3b4dd14aad5cb41b0051de3) - - - - - 280c4516 by Alan Zimmerman at 2024-11-13T18:12:29+00:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. (cherry picked from commit 0bc94360908011167284ee4c283c343350cbba78) - - - - - 2ef0074d by Alan Zimmerman at 2024-11-13T18:19:00+00:00 EPA: Correctly capture leading semis in decl list Closes #25467 (cherry picked from commit 0614abef967c2ee9fb83955f18460715160a557a) - - - - - d72c5615 by Alan Zimmerman at 2024-11-13T20:06:07+00:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 (cherry picked from commit 9ad9ac63abed33aa48d4df40142d2809bdfd1ff0) - - - - - 17 changed files: - compiler/GHC.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Hs.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Dump.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/Lexer.x The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b047af9fc0f98fe5b68c6b9f4523b08d8501a486...d72c56156715b5775b32a2c2ad795e7bb81382e4 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b047af9fc0f98fe5b68c6b9f4523b08d8501a486...d72c56156715b5775b32a2c2ad795e7bb81382e4 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 20:53:09 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 13 Nov 2024 15:53:09 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <673511b5617dc_349dd2f2817c9984f@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 330f3301 by Ryan Scott at 2024-11-13T15:52:54-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - ea9e0879 by Cheng Shao at 2024-11-13T15:52:55-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - 40e356c1 by Cheng Shao at 2024-11-13T15:52:55-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - 58c591e4 by Cheng Shao at 2024-11-13T15:52:55-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - 21 changed files: - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - libraries/ghci/GHCi/ObjLink.hs - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T - + testsuite/tests/th/wasm/T25473A.hs - + testsuite/tests/th/wasm/T25473B.hs - + testsuite/tests/th/wasm/all.T - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClasses.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesCore.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesEffects.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesReader.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesState.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadPrimitive.hs - + testsuite/tests/typecheck/should_compile/T16234/DataPeano.hs - + testsuite/tests/typecheck/should_compile/T16234/Main.hs - + testsuite/tests/typecheck/should_compile/T16234/Makefile - + testsuite/tests/typecheck/should_compile/T16234/all.T - utils/jsffi/dyld.mjs Changes: ===================================== boot ===================================== @@ -66,9 +66,6 @@ def autoreconf(): for dir_ in ['.', 'rts'] + glob.glob('libraries/*/'): if os.path.isfile(os.path.join(dir_, 'configure.ac')): print("Booting %s" % dir_) - # Update config.sub in submodules - if dir_ != '.' and os.path.isfile(os.path.join(dir_, 'config.sub')): - shutil.copyfile('config.sub', os.path.join(dir_, 'config.sub')) processes[dir_] = subprocess.Popen(['sh', '-c', reconf_cmd], cwd=dir_) # Wait for all child processes to finish. ===================================== compile_flags.txt ===================================== @@ -1,5 +1,29 @@ --xc --Irts +-Wimplicit +-include +rts/include/ghcversion.h -Irts/include --I.hie-bios/stage0/lib --I_build/stage1/rts/build/include/ +-I_build/stage1/rts/build +-I_build/stage1/rts/build/include +-Irts +-Ilibraries/ghc-internal/include +-I_build/stage1/libraries/ghc-internal/build/include +-Ilibraries/ghc-bignum/include +-I_build/stage1/libraries/ghc-bignum/build/include +-Wno-unknown-pragmas +-Wall +-Wextra +-Wstrict-prototypes +-Wmissing-prototypes +-Wmissing-declarations +-Winline +-Wpointer-arith +-Wmissing-noreturn +-Wnested-externs +-Wredundant-decls +-Wundef +-DFS_NAMESPACE=rts +-DCOMPILING_RTS +-DTHREADED_RTS +-DDEBUG +-DDYNAMIC +-DPROFILING ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we give their first arg lazyApply1Dmd and not +-- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that +-- the call forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often (but not always) choose to use a wrapper around +-- catch# that is head-strict in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2772,6 +2799,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2814,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +3000,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3029,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3058,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3070,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3731,6 +3760,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] effect = ReadWriteEffect -- The invoked computation may have side effects ===================================== libraries/ghci/GHCi/ObjLink.hs ===================================== @@ -76,7 +76,7 @@ loadDLL f = evaluate =<< js_loadDLL (toJSString f) pure $ Right nullPtr -foreign import javascript safe "__exports.__dyld.loadDLL($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.loadDLL($1)" js_loadDLL :: JSString -> IO () loadArchive :: String -> IO () @@ -96,7 +96,7 @@ lookupSymbol sym = do r <- js_lookupSymbol $ toJSString sym evaluate $ if r == nullPtr then Nothing else Just r -foreign import javascript unsafe "__exports.__dyld.lookupSymbol($1)" +foreign import javascript unsafe "__ghc_wasm_jsffi_dyld.lookupSymbol($1)" js_lookupSymbol :: JSString -> IO (Ptr a) lookupSymbolInDLL :: Ptr LoadedDLL -> String -> IO (Maybe (Ptr a)) @@ -114,7 +114,7 @@ addLibrarySearchPath p = do evaluate =<< js_addLibrarySearchPath (toJSString p) pure nullPtr -foreign import javascript safe "__exports.__dyld.addLibrarySearchPath($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.addLibrarySearchPath($1)" js_addLibrarySearchPath :: JSString -> IO () removeLibrarySearchPath :: Ptr () -> IO Bool @@ -128,7 +128,7 @@ findSystemLibrary f = m `catch` \(_ :: JSException) -> pure Nothing p <- evaluate $ fromJSString p' pure $ Just p -foreign import javascript safe "__exports.__dyld.findSystemLibrary($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.findSystemLibrary($1)" js_findSystemLibrary :: JSString -> IO JSString #else ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) ===================================== testsuite/tests/th/wasm/T25473A.hs ===================================== @@ -0,0 +1,8 @@ +module T25473A where + +import GHC.Wasm.Prim + +type BinOp a = a -> a -> a + +foreign import javascript "wrapper" + mkJSBinOp :: BinOp Int -> IO JSVal ===================================== testsuite/tests/th/wasm/T25473B.hs ===================================== @@ -0,0 +1,10 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T25473B where + +import Language.Haskell.TH +import T25473A + +$(runIO $ do + _ <- mkJSBinOp (+) + pure []) ===================================== testsuite/tests/th/wasm/all.T ===================================== @@ -0,0 +1,5 @@ +setTestOpts([ + unless(arch('wasm32'), skip) +]) + +test('T25473', [], multimod_compile, ['T25473B', '-v0']) ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClasses.hs ===================================== @@ -0,0 +1,7 @@ +module ControlMonadClasses + ( -- * Reader + MonadReader + ) where + +import ControlMonadClassesReader +import ControlMonadClassesState () ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesCore.hs ===================================== @@ -0,0 +1,23 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UndecidableInstances #-} +module ControlMonadClassesCore where + +import Data.Kind (Type) +import DataPeano + +type family CanDo (m :: Type -> Type) (eff :: k) :: Bool + +type family MapCanDo (eff :: k) (stack :: Type -> Type) :: [Bool] where + MapCanDo eff (t m) = CanDo (t m) eff ': MapCanDo eff m + MapCanDo eff m = '[ CanDo m eff ] + +type family FindTrue + (bs :: [Bool]) + :: Peano + where + FindTrue ('True ': t) = 'Zero + FindTrue ('False ': t) = 'Succ (FindTrue t) + +type Find eff (m :: Type -> Type) = + FindTrue (MapCanDo eff m) ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesEffects.hs ===================================== @@ -0,0 +1,5 @@ +module ControlMonadClassesEffects where + +import Data.Kind (Type) + +data EffReader (e :: Type) ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesReader.hs ===================================== @@ -0,0 +1,17 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +module ControlMonadClassesReader where + +import qualified Control.Monad.Trans.State.Lazy as SL +import ControlMonadClassesCore +import ControlMonadClassesEffects +import Control.Monad.Trans.Class +import Data.Kind (Type) +import DataPeano + +class Monad m => MonadReaderN (n :: Peano) (r :: Type) m +instance Monad m => MonadReaderN 'Zero r (SL.StateT r m) +instance (MonadTrans t, Monad (t m), MonadReaderN n r m, Monad m) + => MonadReaderN ('Succ n) r (t m) + +type MonadReader e m = MonadReaderN (Find (EffReader e) m) e m ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesState.hs ===================================== @@ -0,0 +1,13 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +module ControlMonadClassesState where + +import qualified Control.Monad.Trans.State.Lazy as SL +import ControlMonadClassesCore +import ControlMonadClassesEffects + +type instance CanDo (SL.StateT s m) eff = StateCanDo s eff + +type family StateCanDo s eff where + StateCanDo s (EffReader s) = 'True + StateCanDo s eff = 'False ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadPrimitive.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module ControlMonadPrimitive (PrimMonad(..)) where + +import Control.Monad.Trans.State (StateT) + +class Monad m => PrimMonad m where + type PrimState m +instance PrimMonad m => PrimMonad (StateT s m) where + type PrimState (StateT s m) = PrimState m ===================================== testsuite/tests/typecheck/should_compile/T16234/DataPeano.hs ===================================== @@ -0,0 +1,3 @@ +module DataPeano where + +data Peano = Zero | Succ Peano ===================================== testsuite/tests/typecheck/should_compile/T16234/Main.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module Main where + +import ControlMonadClasses (MonadReader) +--import ControlMonadPrimitive () +import Control.Monad.Trans.State.Lazy (StateT) + +main :: (n ~ StateT () IO, MonadReader () n) => IO () +main = undefined ===================================== testsuite/tests/typecheck/should_compile/T16234/Makefile ===================================== @@ -0,0 +1,17 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +clean: + rm -f *.o *.hi + +T16234: + $(MAKE) -s --no-print-directory clean + '$(TEST_HC)' $(TEST_HC_OPTS) -c DataPeano.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadPrimitive.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesCore.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesEffects.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesReader.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesState.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClasses.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c Main.hs ===================================== testsuite/tests/typecheck/should_compile/T16234/all.T ===================================== @@ -0,0 +1 @@ +test('T16234', [extra_files(['DataPeano.hs', 'ControlMonadPrimitive.hs', 'ControlMonadClassesCore.hs', 'ControlMonadClassesEffects.hs', 'ControlMonadClassesReader.hs', 'ControlMonadClassesState.hs', 'ControlMonadClasses.hs', 'Main.hs'])], makefile_test, ['T16234']) ===================================== utils/jsffi/dyld.mjs ===================================== @@ -293,9 +293,13 @@ class DyLD { #loadedSos = new Set(); // Mapping from export names to export funcs. It's also passed as - // __exports in JSFFI code, hence the "memory" special field. __dyld - // is used by ghci to call into here. - exportFuncs = { memory: this.#memory, __dyld: this }; + // __exports in JSFFI code, hence the "memory" special field. + exportFuncs = { memory: this.#memory }; + + // The FinalizationRegistry used by JSFFI. + #finalizationRegistry = new FinalizationRegistry((sp) => + this.exportFuncs.rts_freeStablePtr(sp) + ); // The GOT.func table. #gotFunc = {}; @@ -623,17 +627,22 @@ class DyLD { const mod = await modp; - // Fulfill the ghc_wasm_jsffi imports + // Fulfill the ghc_wasm_jsffi imports. Use new Function() + // instead of eval() to prevent bindings in this local scope to + // be accessed by JSFFI code snippets. Object.assign( import_obj.ghc_wasm_jsffi, new Function( - "return (__exports) => ({".concat( + "__exports", + "__ghc_wasm_jsffi_dyld", + "__ghc_wasm_jsffi_finalization_registry", + "return {".concat( ...parseSections(mod).map( (rec) => `${rec[0]}: ${parseRecord(rec)}, ` ), - "});" + "};" ) - )()(this.exportFuncs) + )(this.exportFuncs, this, this.#finalizationRegistry) ); // Fulfill the rest of the imports View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a1da8094757146c215b86bbe029b65a34151154a...58c591e44e5bc22c151a9a5b08881c45cd44ffb0 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a1da8094757146c215b86bbe029b65a34151154a...58c591e44e5bc22c151a9a5b08881c45cd44ffb0 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 21:43:07 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 16:43:07 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/fix-warnings Message-ID: <67351d6b20234_349dd21300dbc1106a4@gitlab.mail> Ben Gamari pushed new branch wip/fix-warnings at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/fix-warnings You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 21:46:08 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 16:46:08 -0500 Subject: [Git][ghc/ghc][wip/T20201] 4818 commits: [haddock @ 2002-04-04 16:23:43 by simonmar] Message-ID: <67351e206faac_349dd213cb404113877@gitlab.mail> Ben Gamari pushed to branch wip/T20201 at Glasgow Haskell Compiler / GHC Commits: 2b39cd94 by Simon Marlow at 2002-04-04T16:23:43+00:00 [haddock @ 2002-04-04 16:23:43 by simonmar] This is Haddock, my stab at a Haskell documentation tool. It's not quite ready for release yet, but I'm putting it in the repository so others can take a look. It uses a locally modified version of the hssource parser, extended with support for GHC extensions and documentation annotations. - - - - - 99ede94f by Simon Marlow at 2002-04-04T16:24:10+00:00 [haddock @ 2002-04-04 16:24:10 by simonmar] forgot one file - - - - - 8363294c by Simon Marlow at 2002-04-05T13:58:15+00:00 [haddock @ 2002-04-05 13:58:15 by simonmar] Remap names in the exported declarations to be "closer" to the current module. eg. if an exported declaration mentions a type 'T' which is imported from module A then re-exported from the current module, then links from the type or indeed the documentation will point to the current module rather than module A. This is to support better hiding: module A won't be referred to in the generated output. - - - - - 1570cbc1 by Simon Marlow at 2002-04-05T13:58:23+00:00 [haddock @ 2002-04-05 13:58:23 by simonmar] update the TODO list - - - - - 3a62f96b by Simon Marlow at 2002-04-05T14:11:51+00:00 [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration - - - - - c5d9a471 by Simon Marlow at 2002-04-05T14:18:41+00:00 [haddock @ 2002-04-05 14:18:41 by simonmar] remove underlines on visited links - - - - - 97280525 by Simon Marlow at 2002-04-05T16:11:47+00:00 [haddock @ 2002-04-05 16:11:47 by simonmar] - Update to generate more correct HTML. - Use our own non-overloaded table combinators, as the overloaded versions were giving me a headache. The improved type safety caught several errors in the HTML generation. - - - - - 9acd3a4d by Simon Marlow at 2002-04-05T16:32:19+00:00 [haddock @ 2002-04-05 16:32:19 by simonmar] Add width property to the title, and add TD.children for the module contents page. - - - - - ec9a0847 by Simon Marlow at 2002-04-08T16:39:56+00:00 [haddock @ 2002-04-08 16:39:56 by simonmar] Fix a problem with exports of the form T(..). - - - - - e4627dc8 by Simon Marlow at 2002-04-08T16:41:38+00:00 [haddock @ 2002-04-08 16:41:37 by simonmar] - Add our own versions of Html & BlockTable for the time being. - Add support for generating an index to the HTML backend - - - - - 2d73fd75 by Simon Marlow at 2002-04-09T11:23:24+00:00 [haddock @ 2002-04-09 11:23:24 by simonmar] Add '-- /' as a synonym for '-- |', for compatibility with IDoc. - - - - - 3675464e by Simon Marlow at 2002-04-09T11:33:55+00:00 [haddock @ 2002-04-09 11:33:54 by simonmar] - add the <...> syntax for marking up URLs in documentation - Make the output for data & class declarations more compact when there aren't any documentation annotations on the individual methods or constructors respectively. - - - - - 5077f5b1 by Simon Marlow at 2002-04-09T11:36:04+00:00 [haddock @ 2002-04-09 11:36:04 by simonmar] Update the TODO list - - - - - 9e83c54d by Simon Marlow at 2002-04-10T10:50:06+00:00 [haddock @ 2002-04-10 10:50:06 by simonmar] Use explicit 'px' suffix on pixel sizes; IE seems to prefer them - - - - - 052de51c by Simon Marlow at 2002-04-10T13:23:13+00:00 [haddock @ 2002-04-10 13:23:13 by simonmar] Lex URLs as a single token to avoid having to escape special characters inside the URL string. - - - - - 47187edb by Simon Marlow at 2002-04-10T13:23:55+00:00 [haddock @ 2002-04-10 13:23:55 by simonmar] Not sure why I made the constructor name for a record declaration into a TyCls name, but change it back into a Var name anyhow. - - - - - 3dc6aa81 by Simon Marlow at 2002-04-10T13:26:10+00:00 [haddock @ 2002-04-10 13:26:09 by simonmar] Lots of changes, including: - add index support to the HTML backend - clean up the renamer, put it into a monad - propogate unresolved names to the top level and report them in a nicer way - various bugfixes - - - - - c2a70a72 by Simon Marlow at 2002-04-10T13:32:39+00:00 [haddock @ 2002-04-10 13:32:39 by simonmar] Skeleton documentation - - - - - 50c98d17 by Simon Marlow at 2002-04-10T13:37:23+00:00 [haddock @ 2002-04-10 13:37:23 by simonmar] Update the TODO list, separate into pre-1.0 and post-1.0 items - - - - - f3778be6 by Simon Marlow at 2002-04-10T14:30:58+00:00 [haddock @ 2002-04-10 14:30:58 by simonmar] Add an introduction - - - - - cfbaf9f7 by Simon Marlow at 2002-04-10T14:59:51+00:00 [haddock @ 2002-04-10 14:59:51 by simonmar] Sort the module tree - - - - - 76bd7b34 by Simon Marlow at 2002-04-10T15:50:11+00:00 [haddock @ 2002-04-10 15:50:10 by simonmar] Generate a little table of contents at the top of the module doc (only if the module actually contains some section headings, though). - - - - - bb8560a1 by Simon Marlow at 2002-04-10T16:10:26+00:00 [haddock @ 2002-04-10 16:10:26 by simonmar] Now we understand (or at least don't barf on) type signatures in patterns such as you might find when scoped type variables are in use. - - - - - 86c2a026 by Simon Marlow at 2002-04-10T16:10:49+00:00 [haddock @ 2002-04-10 16:10:49 by simonmar] more updates - - - - - 1c052b0e by Simon Marlow at 2002-04-10T16:28:05+00:00 [haddock @ 2002-04-10 16:28:05 by simonmar] Parse errors in doc strings are now reported as warnings rather that causing the whole thing to fall over. It still needs cleaning up (the warning is emitted with trace) but this will do for the time being. - - - - - ace03e8f by Simon Marlow at 2002-04-10T16:38:03+00:00 [haddock @ 2002-04-10 16:38:03 by simonmar] update again - - - - - 69006c3e by Simon Marlow at 2002-04-11T13:38:02+00:00 [haddock @ 2002-04-11 13:38:02 by simonmar] mention Opera - - - - - fe9b10f8 by Simon Marlow at 2002-04-11T13:40:31+00:00 [haddock @ 2002-04-11 13:40:30 by simonmar] - copy haddock.css into the same place as the generated HTML - new option: --css <file> specifies the style sheet to use - new option: -o <dir> specifies the directory in which to generate the output. - because Haddock now needs to know where to find its default stylesheet, we have to have a wrapper script and do the haddock-inplace thing (Makefile code copied largely from fptools/happy). - - - - - 106adbbe by Simon Marlow at 2002-04-24T15:12:41+00:00 [haddock @ 2002-04-24 15:12:41 by simonmar] Stop slurping comment lines when we see a row of dashes longer than length 2: these are useful as separators. - - - - - 995d3f9e by Simon Marlow at 2002-04-24T15:14:12+00:00 [haddock @ 2002-04-24 15:14:11 by simonmar] Grok the kind of module headers we use in fptools/libraries, and pass the "portability", "stability", and "maintainer" strings through into the generated HTML. If the module header doesn't match the pattern, then we don't include the info in the HTML. - - - - - e14da136 by Simon Marlow at 2002-04-24T15:16:57+00:00 [haddock @ 2002-04-24 15:16:57 by simonmar] Done module headers now. - - - - - 2ca8dfd4 by Simon Marlow at 2002-04-24T15:57:48+00:00 [haddock @ 2002-04-24 15:57:47 by simonmar] Handle gcons in export lists (a common extension). - - - - - 044cea81 by Simon Marlow at 2002-04-25T14:20:12+00:00 [haddock @ 2002-04-25 14:20:12 by simonmar] Add the little lambda icon - - - - - 63955027 by Simon Marlow at 2002-04-25T14:40:05+00:00 [haddock @ 2002-04-25 14:40:05 by simonmar] - Add support for named chunks of documentation which can be referenced from the export list. - Copy the icon from $libdir to the destination in HTML mode. - - - - - 36e3f913 by Simon Marlow at 2002-04-25T16:48:36+00:00 [haddock @ 2002-04-25 16:48:36 by simonmar] More keyboard bashing - - - - - 7ae18dd0 by Simon Marlow at 2002-04-26T08:43:33+00:00 [haddock @ 2002-04-26 08:43:33 by simonmar] Package util reqd. to compile with 4.08.2 - - - - - bbd5fbab by Simon Marlow at 2002-04-26T10:13:00+00:00 [haddock @ 2002-04-26 10:13:00 by simonmar] Include $(GHC_HAPPY_OPTS) when compiling HsParser - - - - - 31c53d79 by Simon Marlow at 2002-04-26T11:18:57+00:00 [haddock @ 2002-04-26 11:18:56 by simonmar] - support for fundeps (partially contributed by Brett Letner - thanks Brett). - make it build with GHC 4.08.2 - - - - - c415ce76 by Simon Marlow at 2002-04-26T13:15:02+00:00 [haddock @ 2002-04-26 13:15:02 by simonmar] Move the explicit formatting of the little table for the stability/portability/maintainer info from the HTML into the CSS, and remove the explicit table size (just right-align it). - - - - - 520ee21a by Simon Marlow at 2002-04-26T16:01:44+00:00 [haddock @ 2002-04-26 16:01:44 by simonmar] Yet more keyboard bashing - this is pretty much complete now. - - - - - 2ae37179 by Simon Marlow at 2002-04-26T16:02:14+00:00 [haddock @ 2002-04-26 16:02:14 by simonmar] Add a couple of things I forgot about - - - - - b7211e04 by Simon Marlow at 2002-04-29T15:28:12+00:00 [haddock @ 2002-04-29 15:28:12 by simonmar] bugfix for declBinders on a NewTypeDecl - - - - - 640c154a by Simon Marlow at 2002-04-29T15:28:54+00:00 [haddock @ 2002-04-29 15:28:54 by simonmar] Allow '-- |' style annotations on constructors and record fields. - - - - - 393f258a by Simon Marlow at 2002-04-29T15:37:32+00:00 [haddock @ 2002-04-29 15:37:32 by simonmar] syntax fix - - - - - 8a2c2549 by Simon Marlow at 2002-04-29T15:37:48+00:00 [haddock @ 2002-04-29 15:37:48 by simonmar] Add an example - - - - - db88f8a2 by Simon Marlow at 2002-04-29T15:55:46+00:00 [haddock @ 2002-04-29 15:55:46 by simonmar] remove a trace - - - - - 2b0248e0 by Simon Marlow at 2002-04-29T15:56:19+00:00 [haddock @ 2002-04-29 15:56:19 by simonmar] Fix for 'make install' - - - - - 120453a0 by Simon Marlow at 2002-04-29T15:56:39+00:00 [haddock @ 2002-04-29 15:56:39 by simonmar] Install the auxilliary bits - - - - - 950e6dbb by Simon Marlow at 2002-04-29T15:57:30+00:00 [haddock @ 2002-04-29 15:57:30 by simonmar] Add BinDist bits - - - - - 154b9d71 by Simon Marlow at 2002-05-01T11:02:52+00:00 [haddock @ 2002-05-01 11:02:52 by simonmar] update - - - - - ba6c39fa by Simon Marlow at 2002-05-01T11:03:26+00:00 [haddock @ 2002-05-01 11:03:26 by simonmar] Add another item - - - - - bacb5e33 by Simon Marlow at 2002-05-03T08:50:00+00:00 [haddock @ 2002-05-03 08:50:00 by simonmar] Fix some typos. - - - - - 54c87895 by Sven Panne at 2002-05-05T19:40:51+00:00 [haddock @ 2002-05-05 19:40:51 by panne] As a temporary hack/workaround for a bug in GHC's simplifier, don't pass Happy the -c option for generating the parsers in this subdir. Furthermore, disable -O for HaddocParse, too. - - - - - e6c08703 by Simon Marlow at 2002-05-06T09:51:10+00:00 [haddock @ 2002-05-06 09:51:10 by simonmar] Add RPM spec file (thanks to Tom Moertel <tom-rpms at moertel.com>) - - - - - 7b8fa8e7 by Simon Marlow at 2002-05-06T12:29:26+00:00 [haddock @ 2002-05-06 12:29:26 by simonmar] Add missing type signature (a different workaround for the bug in GHC's simplifier). - - - - - cd0e300d by Simon Marlow at 2002-05-06T12:30:09+00:00 [haddock @ 2002-05-06 12:30:09 by simonmar] Remove workaround for simplifier bug in previous revision. - - - - - 687e68fa by Simon Marlow at 2002-05-06T12:32:32+00:00 [haddock @ 2002-05-06 12:32:32 by simonmar] Allow empty data declarations (another GHC extension). - - - - - 8f29f696 by Simon Marlow at 2002-05-06T12:49:21+00:00 [haddock @ 2002-05-06 12:49:21 by simonmar] Fix silly bug in named documentation block lookup. - - - - - 8e0059af by Simon Marlow at 2002-05-06T13:02:42+00:00 [haddock @ 2002-05-06 13:02:42 by simonmar] Add another named chunk with a different name - - - - - 68f8a896 by Simon Marlow at 2002-05-06T13:32:32+00:00 [haddock @ 2002-05-06 13:32:32 by simonmar] Be more lenient about extra paragraph breaks - - - - - 65fc31db by Simon Marlow at 2002-05-07T15:36:36+00:00 [haddock @ 2002-05-07 15:36:36 by simonmar] DocEmpty is a right and left-unit of DocAppend (remove it in the smart constructor). - - - - - adc81078 by Simon Marlow at 2002-05-07T15:37:15+00:00 [haddock @ 2002-05-07 15:37:15 by simonmar] Allow code blocks to be denoted with bird-tracks in addition to [...]. - - - - - 1283a3c1 by Simon Marlow at 2002-05-08T11:21:56+00:00 [haddock @ 2002-05-08 11:21:56 by simonmar] Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak at cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace. - - - - - a2239cf5 by Simon Marlow at 2002-05-08T11:22:30+00:00 [haddock @ 2002-05-08 11:22:30 by simonmar] Update to test new features. - - - - - 6add955f by Simon Marlow at 2002-05-08T13:37:25+00:00 [haddock @ 2002-05-08 13:37:25 by simonmar] Change the markup for typewriter-font from [...] to @... at . The reasoning is that the '@' symbol is much less likely to be needed than square brackets, and we don't want to have to escape square brackets in code fragments. This will be mildly painful in the short term, but it's better to get the change out of the way as early as possible. - - - - - cda06447 by Simon Marlow at 2002-05-08T13:39:56+00:00 [haddock @ 2002-05-08 13:39:56 by simonmar] Allow nested-style comments to be used as documentation annotations too. eg. {-| ... -} is equivalent to -- | ... An extra space can also be left after the comment opener: {- | ... -}. The only version that isn't allowed is {-# ... -}, because this syntax overlaps with Haskell pragmas; use {- # ... -} instead. - - - - - db23f65e by Simon Marlow at 2002-05-08T14:48:41+00:00 [haddock @ 2002-05-08 14:48:39 by simonmar] Add support for existential quantifiers on constructors. - - - - - adce3794 by Simon Marlow at 2002-05-08T15:43:25+00:00 [haddock @ 2002-05-08 15:43:25 by simonmar] update - - - - - 62a1f436 by Simon Marlow at 2002-05-08T15:44:10+00:00 [haddock @ 2002-05-08 15:44:10 by simonmar] Update to version 0.2 - - - - - f6a24ba3 by Simon Marlow at 2002-05-09T08:48:29+00:00 [haddock @ 2002-05-09 08:48:29 by simonmar] typo - - - - - 9f9522a4 by Simon Marlow at 2002-05-09T10:33:14+00:00 [haddock @ 2002-05-09 10:33:14 by simonmar] oops, left out '/' from the special characters in the last change. - - - - - 14abcb39 by Simon Marlow at 2002-05-09T10:34:44+00:00 [haddock @ 2002-05-09 10:34:44 by simonmar] Fix buglet - - - - - b8d878be by Simon Marlow at 2002-05-09T10:35:00+00:00 [haddock @ 2002-05-09 10:35:00 by simonmar] Give a more useful instance of Show for Module. - - - - - f7bfd626 by Simon Marlow at 2002-05-09T10:37:07+00:00 [haddock @ 2002-05-09 10:37:07 by simonmar] The last commit to Main.lhs broke the delicate balance of laziness which was being used to avoid computing the dependency graph of modules. So I finally bit the bullet and did a proper topological sort of the module graph, which turned out to be easy (stealing the Digraph module from GHC - this really ought to be in the libraries somewhere). - - - - - b481c1d0 by Simon Marlow at 2002-05-09T10:37:25+00:00 [haddock @ 2002-05-09 10:37:25 by simonmar] another item done - - - - - 032e2b42 by Simon Marlow at 2002-05-09T10:44:15+00:00 [haddock @ 2002-05-09 10:44:15 by simonmar] Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not. - - - - - 5fb45e92 by Simon Marlow at 2002-05-09T11:10:55+00:00 [haddock @ 2002-05-09 11:10:55 by simonmar] Add a special case for list types in ppHsAType - - - - - 1937e428 by Simon Marlow at 2002-05-09T12:43:06+00:00 [haddock @ 2002-05-09 12:43:06 by simonmar] Type synonyms can accept a ctype on the RHS, to match GHC. - - - - - 0f16ce56 by Simon Marlow at 2002-05-09T12:45:19+00:00 [haddock @ 2002-05-09 12:45:19 by simonmar] Add 'stdcall' keyword - - - - - 29b0d7d2 by Simon Marlow at 2002-05-09T13:35:45+00:00 [haddock @ 2002-05-09 13:35:45 by simonmar] Add System Requirements section - - - - - bf14dddd by Simon Marlow at 2002-05-09T13:36:11+00:00 [haddock @ 2002-05-09 13:36:11 by simonmar] Test existential types, amongst other things - - - - - 502f8f6f by Simon Marlow at 2002-05-09T13:37:35+00:00 [haddock @ 2002-05-09 13:37:35 by simonmar] Print the module name in a doc-string parse error - - - - - ca1f8d49 by Simon Marlow at 2002-05-09T13:38:04+00:00 [haddock @ 2002-05-09 13:38:04 by simonmar] Add dependency - - - - - 8d3d91ff by Simon Marlow at 2002-05-09T15:37:57+00:00 [haddock @ 2002-05-09 15:37:57 by simonmar] Add the changelog/release notes - - - - - f3960959 by Simon Marlow at 2002-05-09T15:47:47+00:00 [haddock @ 2002-05-09 15:47:47 by simonmar] mention the backquote-style of markup - - - - - 089fb6e6 by Simon Marlow at 2002-05-09T15:59:45+00:00 [haddock @ 2002-05-09 15:59:45 by simonmar] update - - - - - bdd3be0b by Simon Marlow at 2002-05-09T15:59:56+00:00 [haddock @ 2002-05-09 15:59:56 by simonmar] Document changes since 0.1 - - - - - 00fc4af8 by Simon Marlow at 2002-05-10T08:22:48+00:00 [haddock @ 2002-05-10 08:22:48 by simonmar] oops, update to version 0.2 - - - - - a8a79041 by Simon Marlow at 2002-05-10T16:05:08+00:00 [haddock @ 2002-05-10 16:05:08 by simonmar] Only include a mini-contents if there are 2 or more sections - - - - - 06653319 by Simon Marlow at 2002-05-13T09:13:12+00:00 [haddock @ 2002-05-13 09:13:12 by simonmar] fix typos - - - - - 1402b19b by Simon Marlow at 2002-05-13T10:14:22+00:00 [haddock @ 2002-05-13 10:14:22 by simonmar] Allow backquote as the right-hand quote as well as the left-hand quote, as suggested by Dean Herrington. Clean up the grammar a litte. - - - - - dcd5320d by Simon Marlow at 2002-05-13T10:44:10+00:00 [haddock @ 2002-05-13 10:44:10 by simonmar] a couple more things, prioritise a bit - - - - - a90130c4 by Simon Marlow at 2002-05-13T15:19:03+00:00 [haddock @ 2002-05-13 15:19:03 by simonmar] Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs). - - - - - a774d432 by Simon Marlow at 2002-05-13T15:20:54+00:00 [haddock @ 2002-05-13 15:20:54 by simonmar] Fix one of the record examples - - - - - 2d1d5218 by Simon Marlow at 2002-05-15T12:44:35+00:00 [haddock @ 2002-05-15 12:44:35 by simonmar] Preserve the newline before a bird-track, but only within a paragraph. - - - - - 1554c09a by Simon Marlow at 2002-05-15T13:03:02+00:00 [haddock @ 2002-05-15 13:03:01 by simonmar] Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed. - - - - - 57344dc3 by Simon Marlow at 2002-05-15T13:03:19+00:00 [haddock @ 2002-05-15 13:03:19 by simonmar] Bump to version 0.3 - - - - - b2791812 by Simon Marlow at 2002-05-15T13:03:41+00:00 [haddock @ 2002-05-15 13:03:41 by simonmar] update - - - - - fead183e by Simon Marlow at 2002-05-15T13:10:15+00:00 [haddock @ 2002-05-15 13:10:15 by simonmar] Rename Foo.hs to Test.hs, and add a Makefile - - - - - b0b1f89f by Simon Marlow at 2002-05-15T13:16:07+00:00 [haddock @ 2002-05-15 13:16:07 by simonmar] - Remove the note about function argument docs not being implemented - Note that qualified identifiers can be used to point to entities that aren't in scope. - - - - - 5665f31a by Simon Marlow at 2002-05-15T13:28:46+00:00 [haddock @ 2002-05-15 13:28:46 by simonmar] Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson. - - - - - 0564505d by Simon Marlow at 2002-05-17T10:51:57+00:00 [haddock @ 2002-05-17 10:51:57 by simonmar] Fix bugs in qualified name handling (A.B.f was returned as B.f) - - - - - 10e7311c by Simon Marlow at 2002-05-21T10:24:52+00:00 [haddock @ 2002-05-21 10:24:52 by simonmar] - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation - - - - - 2f91c2a6 by Simon Marlow at 2002-05-21T10:27:40+00:00 [haddock @ 2002-05-21 10:27:40 by simonmar] add a few more test cases - - - - - 01c2ddd2 by Simon Marlow at 2002-05-21T10:28:33+00:00 [haddock @ 2002-05-21 10:28:33 by simonmar] Rearrange a bit, and add support for tabular datatype rendering - - - - - a4e4c5f8 by Simon Marlow at 2002-05-27T09:03:52+00:00 [haddock @ 2002-05-27 09:03:51 by simonmar] Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others) - - - - - 48722e68 by Simon Marlow at 2002-05-27T12:30:38+00:00 [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. - - - - - 657204d2 by Simon Marlow at 2002-05-27T13:19:49+00:00 [haddock @ 2002-05-27 13:19:49 by simonmar] Fix bug: we weren't renaming HsDocCommentNamed in renameDecl - - - - - 592aae66 by Simon Marlow at 2002-05-27T14:10:27+00:00 [haddock @ 2002-05-27 14:10:27 by simonmar] Fix some bugs in the rendering of qualified type signatures. - - - - - 69c8f763 by Simon Marlow at 2002-05-27T14:36:45+00:00 [haddock @ 2002-05-27 14:36:45 by simonmar] warning message tweak - - - - - 16e64e21 by Simon Marlow at 2002-05-27T14:53:53+00:00 [haddock @ 2002-05-27 14:53:53 by simonmar] hyperlinked identifiers should be in <tt> - - - - - 8d5e4783 by Simon Marlow at 2002-05-27T15:56:45+00:00 [haddock @ 2002-05-27 15:56:45 by simonmar] Do something sensible for modules which don't export anything (except instances). - - - - - 9d3ef811 by Simon Marlow at 2002-05-28T10:12:50+00:00 [haddock @ 2002-05-28 10:12:50 by simonmar] Rename the module documentation properly (bug reported by Sven Panne). - - - - - ef03a1cc by Simon Marlow at 2002-05-28T10:13:04+00:00 [haddock @ 2002-05-28 10:13:04 by simonmar] Add some more test cases - - - - - 92baa0e8 by Simon Marlow at 2002-05-28T11:17:55+00:00 [haddock @ 2002-05-28 11:17:55 by simonmar] If an identifier doesn't lex, then just replace it by a DocString. - - - - - a3156213 by Simon Marlow at 2002-05-28T16:16:19+00:00 [haddock @ 2002-05-28 16:16:19 by simonmar] Only link to names in the current module which are actually listed in the documentation. A name may be exported but not present in the documentation if it is exported as part of a 'module M' export specifier. - - - - - 31acf941 by Simon Marlow at 2002-05-28T16:17:11+00:00 [haddock @ 2002-05-28 16:17:11 by simonmar] update - - - - - 7e474ebf by Sigbjorn Finne at 2002-05-28T22:42:08+00:00 [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] - - - - - 093f7e53 by Simon Marlow at 2002-05-29T09:09:49+00:00 [haddock @ 2002-05-29 09:09:49 by simonmar] Back out previous change until we can find a better way to do this. - - - - - 9234389c by Simon Marlow at 2002-05-29T13:19:06+00:00 [haddock @ 2002-05-29 13:19:06 by simonmar] Make the markup syntax a little more friendly: - single quotes are now interpreted literally unless they surround a valid Haskell identifier. So for example now there's no need to escape a single quote used as an apostrophe. - text to the right of a bird track is now literal (if you want marked-up text in a code block, use @...@). - - - - - b3333526 by Simon Marlow at 2002-05-29T13:38:51+00:00 [haddock @ 2002-05-29 13:38:51 by simonmar] Document recent changes to markup syntax - - - - - f93641d6 by Simon Marlow at 2002-05-29T15:27:18+00:00 [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too - - - - - 613f21e3 by Simon Marlow at 2002-06-03T13:05:58+00:00 [haddock @ 2002-06-03 13:05:57 by simonmar] Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case). - - - - - 14b36807 by Simon Marlow at 2002-06-03T13:20:00+00:00 [haddock @ 2002-06-03 13:20:00 by simonmar] Fix linking to qualified names again (thanks to Sven Panne for pointing out the bug). - - - - - 95b10eac by Simon Marlow at 2002-06-03T13:46:48+00:00 [haddock @ 2002-06-03 13:46:48 by simonmar] Fix for exporting record selectors from a newtype declaration - - - - - 272f932e by Simon Marlow at 2002-06-03T13:56:38+00:00 [haddock @ 2002-06-03 13:56:38 by simonmar] update to version 0.3 - - - - - 1c0a3bed by Simon Marlow at 2002-06-03T14:05:07+00:00 [haddock @ 2002-06-03 14:05:07 by simonmar] Add changes in version 0.3 - - - - - 145b4626 by Simon Marlow at 2002-06-03T14:12:38+00:00 [haddock @ 2002-06-03 14:12:38 by simonmar] Render class names as proper binders - - - - - 052106b3 by Simon Marlow at 2002-06-03T14:15:10+00:00 [haddock @ 2002-06-03 14:15:10 by simonmar] update, and separate into bugs, features, and cosmetic items. - - - - - 854f4914 by Simon Marlow at 2002-06-03T14:16:13+00:00 [haddock @ 2002-06-03 14:16:13 by simonmar] More test cases - - - - - 466922c8 by Simon Marlow at 2002-06-03T14:16:56+00:00 [haddock @ 2002-06-03 14:16:56 by simonmar] Example from the paper - - - - - 9962a045 by Simon Marlow at 2002-06-03T14:17:49+00:00 [haddock @ 2002-06-03 14:17:49 by simonmar] A debugging version of the style-sheet, which gives some tables coloured backgrounds so we can see what's going on. - - - - - f16b79db by Simon Marlow at 2002-06-03T14:19:46+00:00 [haddock @ 2002-06-03 14:19:46 by simonmar] typo - - - - - 620db27b by Simon Marlow at 2002-06-03T14:48:32+00:00 [haddock @ 2002-06-03 14:48:32 by simonmar] oops, fix markup bugs - - - - - 53fd105c by Simon Marlow at 2002-06-05T09:05:07+00:00 [haddock @ 2002-06-05 09:05:07 by simonmar] Keep foreign imports when there is no export list (bug reported by Sven Panne). - - - - - 6d98989c by Simon Marlow at 2002-06-05T09:12:02+00:00 [haddock @ 2002-06-05 09:12:02 by simonmar] Identifiers in single quotes can be symbol names too (bug reported by Hal Daume). - - - - - 001811e5 by Sven Panne at 2002-06-08T14:03:36+00:00 [haddock @ 2002-06-08 14:03:36 by panne] Tiny workaround for the fact that Haddock currently ignores HsImportSpecs: Let the local_orig_env take precedence. This is no real solution at all, but improves things sometimes, e.g. in my GLUT documentation. :-) - - - - - 504d19c9 by Simon Marlow at 2002-06-11T09:23:25+00:00 [haddock @ 2002-06-11 09:23:25 by simonmar] portability nit - - - - - e13b5af4 by Simon Marlow at 2002-06-20T12:38:07+00:00 [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. - - - - - f467a9b6 by Simon Marlow at 2002-06-20T12:39:02+00:00 [haddock @ 2002-06-20 12:39:01 by simonmar] Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list. - - - - - b8dbfe20 by Simon Marlow at 2002-06-21T12:43:06+00:00 [haddock @ 2002-06-21 12:43:06 by simonmar] When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers. - - - - - 4831dbbd by Simon Marlow at 2002-06-21T15:50:42+00:00 [haddock @ 2002-06-21 15:50:42 by simonmar] Add support for reading and writing interface files(!) This turned out to be quite easy, and necessary to get decent hyperlinks between the documentation for separate packages in the libraries. The functionality isn't quite complete yet: for a given package of modules, you'd like to say "the HTML for these modules lives in directory <dir>" (currently they are assumed to be all in the same place). Two new flags: --dump-interface=FILE dump an interface file in FILE --read-interface=FILE read interface from FILE an interface file describes *all* the modules being processed. Only the exported names are kept in the interface: if you re-export a name from a module in another interface the signature won't be copied. This is a compromise to keep the size of the interfaces sensible. Also, I added another useful option: --no-implicit-prelude avoids trying to import the Prelude. Previously this was the default, but now importing the Prelude from elsewhere makes sense if you also read in an interface containing the Prelude module, so Haddock imports the Prelude implicitly according to the Haskell spec. - - - - - d3640a19 by Sven Panne at 2002-06-23T14:54:00+00:00 [haddock @ 2002-06-23 14:54:00 by panne] Make it compile with newer GHCs - - - - - 780c506b by Sven Panne at 2002-06-23T15:44:31+00:00 [haddock @ 2002-06-23 15:44:31 by panne] Cleaned up build root handling and added more docs - - - - - 45290d2e by Simon Marlow at 2002-06-24T14:37:43+00:00 [haddock @ 2002-06-24 14:37:42 by simonmar] When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface. - - - - - 4e2b9ae6 by Simon Marlow at 2002-07-03T16:01:08+00:00 [haddock @ 2002-07-03 16:01:07 by simonmar] Handle import specs properly, include 'hiding'. Haddock now has a complete implementation of the Haskell module system (more or less; I won't claim it's 100% correct). - - - - - 9a9aa1a8 by Simon Marlow at 2002-07-03T16:18:16+00:00 [haddock @ 2002-07-03 16:18:16 by simonmar] Update - - - - - 560c3026 by Simon Marlow at 2002-07-04T14:56:10+00:00 [haddock @ 2002-07-04 14:56:10 by simonmar] Clean up the code that constructs the exported declarations, and fix a couple of bugs along the way. Now if you import a class hiding one of the methods, then re-export the class, the version in the documentation will correctly have the appropriate method removed. - - - - - 2c26e77d by Simon Marlow at 2002-07-04T15:26:13+00:00 [haddock @ 2002-07-04 15:26:13 by simonmar] More bugfixes to the export handling - - - - - 03e0710d by Simon Marlow at 2002-07-09T10:12:10+00:00 [haddock @ 2002-07-09 10:12:10 by simonmar] Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base). - - - - - 44f3891a by Simon Marlow at 2002-07-09T10:12:51+00:00 [haddock @ 2002-07-09 10:12:51 by simonmar] commented-out debugging code - - - - - 97280873 by Krasimir Angelov at 2002-07-09T16:33:33+00:00 [haddock @ 2002-07-09 16:33:31 by krasimir] 'Microsoft HTML Help' support - - - - - 3dc04655 by Simon Marlow at 2002-07-10T09:40:56+00:00 [haddock @ 2002-07-10 09:40:56 by simonmar] Fix for rendering of the (->) type constructor, from Ross Paterson. - - - - - c9f149c6 by Simon Marlow at 2002-07-10T10:26:11+00:00 [haddock @ 2002-07-10 10:26:11 by simonmar] Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help). - - - - - e8acc1e6 by Simon Marlow at 2002-07-10T10:57:10+00:00 [haddock @ 2002-07-10 10:57:10 by simonmar] Document all the new options since 0.3 - - - - - 8bb85544 by Simon Marlow at 2002-07-10T10:58:31+00:00 [haddock @ 2002-07-10 10:58:31 by simonmar] Sort the options a bit - - - - - abc0dd59 by Simon Marlow at 2002-07-15T09:19:38+00:00 [haddock @ 2002-07-15 09:19:38 by simonmar] Fix a bug in mkExportItems when processing a module without an explicit export list. We were placing one copy of a declaration for each binder in the declaration, which for a data type would mean one copy of the whole declaration per constructor or record selector. - - - - - dde65bb9 by Simon Marlow at 2002-07-15T09:54:16+00:00 [haddock @ 2002-07-15 09:54:16 by simonmar] merge rev. 1.35 - - - - - bd7eb8c4 by Simon Marlow at 2002-07-15T10:14:31+00:00 [haddock @ 2002-07-15 10:14:30 by simonmar] Be a bit more liberal in the kind of commenting styles we allow, as suggested by Malcolm Wallace. Mostly this consists of allowing doc comments either side of a separator token. In an export list, a section heading is now allowed before the comma, as well as after it. eg. module M where ( T(..) -- * a section heading , f -- * another section heading , g ) In record fields, doc comments are allowed anywhere (previously a doc-next was allowed only after the comma, and a doc-before was allowed only before the comma). eg. data R = C { -- | describes 'f' f :: Int -- | describes 'g' , g :: Int } - - - - - 8f6dfe34 by Simon Marlow at 2002-07-15T10:21:56+00:00 [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. - - - - - fc515bb7 by Simon Marlow at 2002-07-15T16:16:50+00:00 [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). - - - - - 80a97e74 by Simon Marlow at 2002-07-19T09:13:10+00:00 [haddock @ 2002-07-19 09:13:10 by simonmar] Allow special id's ([], (), etc.) to be used in an import declaration. - - - - - a69d7378 by Simon Marlow at 2002-07-19T09:59:02+00:00 [haddock @ 2002-07-19 09:59:02 by simonmar] Allow special id's ([], (), etc.) to be used in an import declarations. - - - - - d205fa60 by Simon Marlow at 2002-07-19T10:00:16+00:00 [haddock @ 2002-07-19 10:00:16 by simonmar] Relax the restrictions which require doc comments to be followed by semi colons - in some cases this isn't necessary. Now you can write module M where { -- | some doc class C where {} } without needing to put a semicolon before the class declaration. - - - - - e9301e14 by Simon Marlow at 2002-07-23T08:24:09+00:00 [haddock @ 2002-07-23 08:24:09 by simonmar] A new TODO list item - - - - - e5d77586 by Simon Marlow at 2002-07-23T08:40:56+00:00 [haddock @ 2002-07-23 08:40:56 by simonmar] - update the acknowledgements - remove the paragraph that described how to use explicit layout with doc comments; it isn't relevant any more. - - - - - 78a94137 by Simon Marlow at 2002-07-23T08:43:02+00:00 [haddock @ 2002-07-23 08:43:02 by simonmar] more tests - - - - - 5c320927 by Simon Marlow at 2002-07-23T08:43:26+00:00 [haddock @ 2002-07-23 08:43:26 by simonmar] Updates for version 0.4 - - - - - 488e99ae by Simon Marlow at 2002-07-23T09:10:46+00:00 [haddock @ 2002-07-23 09:10:46 by simonmar] Fix the %changelog (rpm complained that it wasn't in the right order) - - - - - a77bb373 by Simon Marlow at 2002-07-23T09:12:38+00:00 [haddock @ 2002-07-23 09:12:38 by simonmar] Another item for the TODO list - - - - - f1ec1813 by Simon Marlow at 2002-07-23T10:18:46+00:00 [haddock @ 2002-07-23 10:18:46 by simonmar] Add a version banner when invoked with -v - - - - - 1d44cadf by Simon Marlow at 2002-07-24T09:28:19+00:00 [haddock @ 2002-07-24 09:28:19 by simonmar] Remove ^Ms - - - - - 4d8d5e94 by Simon Marlow at 2002-07-24T09:42:18+00:00 [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. - - - - - d6edc43e by Simon Marlow at 2002-07-25T14:37:29+00:00 [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. - - - - - b34d18fa by Simon Marlow at 2002-08-02T09:08:22+00:00 [haddock @ 2002-08-02 09:08:22 by simonmar] The <TT> and <PRE> environments seem to use a font that is a little too small in IE. Compensate. (suggestion from Daan Leijen). - - - - - 8106b086 by Simon Marlow at 2002-08-02T09:25:23+00:00 [haddock @ 2002-08-02 09:25:20 by simonmar] Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen). - - - - - c1acff8f by Simon Marlow at 2002-08-05T09:03:49+00:00 [haddock @ 2002-08-05 09:03:49 by simonmar] update - - - - - f968661c by Simon Marlow at 2002-11-11T09:32:57+00:00 [haddock @ 2002-11-11 09:32:57 by simonmar] Fix cut-n-pasto - - - - - 12d02619 by Simon Marlow at 2002-11-13T09:49:46+00:00 [haddock @ 2002-11-13 09:49:46 by simonmar] Small bugfix in the --read-interface option parsing from Brett Letner. - - - - - 30e32d5e by Ross Paterson at 2003-01-16T15:07:57+00:00 [haddock @ 2003-01-16 15:07:57 by ross] Adjust for the new exception libraries (as well as the old ones). - - - - - 871f65df by Sven Panne at 2003-02-20T21:31:40+00:00 [haddock @ 2003-02-20 21:31:40 by panne] * Add varsyms and consyms to index * Exclude empty entries from index - - - - - bc42cc87 by Sven Panne at 2003-02-24T21:26:29+00:00 [haddock @ 2003-02-24 21:26:29 by panne] Don't convert a "newtype" to a single-constructor "data" for non-abstractly exported types, they are quite different regarding strictness/pattern matching. Now a "data" without any constructors is only emitted for an abstractly exported type, regardless if it is actually a "newtype" or a "data". - - - - - 0c2a1d99 by Sven Panne at 2003-03-08T19:02:38+00:00 [haddock @ 2003-03-08 19:02:38 by panne] Fixed some broken/redirected/canonicalized links found by a very picky link checker. - - - - - 25459269 by Sven Panne at 2003-03-09T21:13:43+00:00 [haddock @ 2003-03-09 21:13:43 by panne] Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor. - - - - - 6be4db86 by Sven Panne at 2003-03-10T21:34:25+00:00 [haddock @ 2003-03-10 21:34:24 by panne] Escape fragments. This fixes e.g. links to operators. - - - - - eb12972c by Ross Paterson at 2003-04-25T10:50:06+00:00 [haddock @ 2003-04-25 10:50:05 by ross] An 80% solution to generating derived instances. A complete solution would duplicate the instance inference logic, but if a type variable occurs as a constructor argument, then we can just propagate the derived class to the variable. But we know nothing of the constraints on any type variables that occur elsewhere. For example, the declarations data Either a b = Left a | Right b deriving (Eq, Ord) data Ptr a = Ptr Addr# deriving (Eq, Ord) newtype IORef a = IORef (STRef RealWorld a) deriving Eq yield the instances (Eq a, Eq b) => Eq (Either a b) (Ord a, Ord b) => Ord (Either a b) Eq (Ptr a) Ord (Ptr a) (??? a) => Eq (IORef a) The last example shows the limits of this local analysis. Note that a type variable may be in both categories: then we know a constraint, but there may be more, or a stronger constraint, e.g. data Tree a = Node a [Tree a] deriving Eq yields (Eq a, ??? a) => Eq (Tree a) - - - - - de886f78 by Simon Marlow at 2003-04-25T11:17:55+00:00 [haddock @ 2003-04-25 11:17:55 by simonmar] Some updates, including moving the derived instance item down to the bottom of the list now that Ross has contributed some code that does the job for common cases. - - - - - 1b52cffd by Simon Marlow at 2003-04-30T14:02:32+00:00 [haddock @ 2003-04-30 14:02:32 by simonmar] When installing on Windows, run cygpath over $(HADDOCKLIB) so that haddock (a mingw program, built by GHC) can understand it. You still need to be in a cygwin environment to run Haddock, because of the shell script wrapper. - - - - - d4f638de by Simon Marlow at 2003-05-06T10:04:47+00:00 [haddock @ 2003-05-06 10:04:47 by simonmar] Catch another case of a paragraph containing just a DocMonospaced that should turn into a DocCodeBlock. - - - - - 4162b2b9 by Simon Marlow at 2003-05-06T10:11:44+00:00 [haddock @ 2003-05-06 10:11:44 by simonmar] Add some more code-block tests. - - - - - 4f5802c8 by Simon Marlow at 2003-05-06T10:14:52+00:00 [haddock @ 2003-05-06 10:14:52 by simonmar] Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code. - - - - - ef8c45f7 by Simon Marlow at 2003-05-21T15:07:21+00:00 [haddock @ 2003-05-21 15:07:21 by simonmar] Only omit the module contents when there are no section headings at all. - - - - - bcee1e75 by Sigbjorn Finne at 2003-05-30T16:50:45+00:00 [haddock @ 2003-05-30 16:50:45 by sof] cygpath: for now, steer clear of --mixed - - - - - 30567af3 by Sigbjorn Finne at 2003-05-30T17:59:28+00:00 [haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit - - - - - b0856e7d by Simon Marlow at 2003-06-03T09:55:26+00:00 [haddock @ 2003-06-03 09:55:26 by simonmar] Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems. - - - - - 70e137ea by Simon Marlow at 2003-07-28T13:30:35+00:00 [haddock @ 2003-07-28 13:30:35 by simonmar] Add tests for a couple of bugs. - - - - - 122bd578 by Simon Marlow at 2003-07-28T13:31:25+00:00 [haddock @ 2003-07-28 13:31:25 by simonmar] Add documentation for anchors. - - - - - 0bd27cb2 by Simon Marlow at 2003-07-28T13:31:46+00:00 [haddock @ 2003-07-28 13:31:46 by simonmar] Update - - - - - 08052d42 by Simon Marlow at 2003-07-28T13:32:12+00:00 [haddock @ 2003-07-28 13:32:12 by simonmar] layout tweak. - - - - - 13942749 by Simon Marlow at 2003-07-28T13:33:03+00:00 [haddock @ 2003-07-28 13:33:03 by simonmar] Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively). - - - - - d7f493b9 by Simon Marlow at 2003-07-28T13:35:17+00:00 [haddock @ 2003-07-28 13:35:16 by simonmar] When a module A exports another module's contents via 'module B', then modules which import entities from B re-exported by A should link to B.foo rather than A.foo. See examples/Bug2.hs. - - - - - d94cf705 by Simon Marlow at 2003-07-28T13:36:14+00:00 [haddock @ 2003-07-28 13:36:14 by simonmar] Update to version 0.5 - - - - - dbb776cd by Sven Panne at 2003-07-28T14:02:43+00:00 [haddock @ 2003-07-28 14:02:43 by panne] * Updated to version 0.5 * Automagically generate configure if it is not there - - - - - 6cfeee53 by Simon Marlow at 2003-07-28T14:32:43+00:00 [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 - - - - - a1ce838f by Simon Marlow at 2003-07-28T14:33:37+00:00 [haddock @ 2003-07-28 14:33:37 by simonmar] Update for 0.5 - - - - - c0fe6493 by Simon Marlow at 2003-07-28T14:53:22+00:00 [haddock @ 2003-07-28 14:53:22 by simonmar] Markup fix - - - - - 6ea31596 by Sven Panne at 2003-07-28T16:40:45+00:00 [haddock @ 2003-07-28 16:40:45 by panne] Make it compile with GHC >= 6.01 - - - - - afcd30fc by Simon Marlow at 2003-07-30T15:04:52+00:00 [haddock @ 2003-07-30 15:04:52 by simonmar] Pay attention to import specs when building the the import env, as well as the orig env. This may fix some wrong links in documentation when import specs are being used. - - - - - 17c3137f by Simon Marlow at 2003-07-30T16:05:41+00:00 [haddock @ 2003-07-30 16:05:40 by simonmar] Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup. - - - - - 3d3b5c87 by Sven Panne at 2003-08-04T10:18:24+00:00 [haddock @ 2003-08-04 10:18:24 by panne] Don't print parentheses around one-element contexts - - - - - 9e3f3f2d by Simon Marlow at 2003-08-04T12:59:47+00:00 [haddock @ 2003-08-04 12:59:47 by simonmar] A couple of TODOs. - - - - - e9d8085c by Simon Marlow at 2003-08-05T14:10:31+00:00 [haddock @ 2003-08-05 14:10:31 by simonmar] I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it. - - - - - ff5c7d6d by Simon Marlow at 2003-08-15T14:42:59+00:00 [haddock @ 2003-08-15 14:42:59 by simonmar] Convert the lexer to Alex, and fix a bug in the process. - - - - - 1aa077bf by Simon Marlow at 2003-08-15T15:00:18+00:00 [haddock @ 2003-08-15 15:00:18 by simonmar] Update - - - - - d3de1e38 by Simon Marlow at 2003-08-15T15:01:03+00:00 [haddock @ 2003-08-15 15:01:03 by simonmar] wibbles - - - - - b40ece3b by Simon Marlow at 2003-08-18T10:04:47+00:00 [haddock @ 2003-08-18 10:04:47 by simonmar] Lex the 'mdo' keyword as 'do'. - - - - - 8f9a1146 by Simon Marlow at 2003-08-18T11:48:24+00:00 [haddock @ 2003-08-18 11:48:24 by simonmar] Two bugs from Sven. - - - - - ea54ebc0 by Simon Marlow at 2003-08-18T11:48:46+00:00 [haddock @ 2003-08-18 11:48:46 by simonmar] Fixes to the new lexer. - - - - - d5f6a4b5 by Simon Marlow at 2003-08-19T09:09:03+00:00 [haddock @ 2003-08-19 09:09:03 by simonmar] Further wibbles to the syntax. - - - - - 6bbdadb7 by Sven Panne at 2003-08-26T18:45:35+00:00 [haddock @ 2003-08-26 18:45:35 by panne] Use autoreconf instead of autoconf - - - - - 32e889cb by Sven Panne at 2003-08-26T19:01:19+00:00 [haddock @ 2003-08-26 19:01:18 by panne] Made option handling a bit more consistent with other tools, in particular: Every program in fptools should output * version info on stdout and terminate successfully when -V or --version * usage info on stdout and terminate successfully when -? or --help * usage info on stderr and terminate unsuccessfully when an unknown option is given. - - - - - 5d156a91 by Sven Panne at 2003-08-26T19:20:55+00:00 [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag - - - - - e6577265 by Sven Panne at 2003-08-27T07:50:03+00:00 [haddock @ 2003-08-27 07:50:02 by panne] * Made -D a short option for --dump-interface. * Made -m a short option for --ms-help. * Made -n a short option for --no-implicit-prelude. * Made -c a short option for --css. * Removed DocBook options from executable (they didn't do anything), but mark them as reserved in the docs. Note that the short option for DocBook output is now -S (from SGML) instead of -d. The latter is now a short option for --debug. * The order of the Options in the documentation now matches the order printed by Haddock itself. Note: Although changing the names of options is often a bad idea, I'd really like to make the options for the programs in fptools more consistent and compatible to the ones used in common GNU programs. - - - - - d303ff98 by Simon Marlow at 2003-09-10T08:23:48+00:00 [haddock @ 2003-09-10 08:23:48 by simonmar] Add doc subdir. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 9a70e46a by Simon Marlow at 2003-09-10T08:24:32+00:00 [haddock @ 2003-09-10 08:24:32 by simonmar] Install these files in $(datadir), not $(libdir), since they're architecture independent. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - bbb87e7a by Simon Marlow at 2003-09-10T08:25:31+00:00 [haddock @ 2003-09-10 08:25:31 by simonmar] Haddock's supplementary HTML bits now live in $(datadir), not $(libdir). Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 3587c24b by Simon Marlow at 2003-09-22T10:34:38+00:00 [haddock @ 2003-09-22 10:34:38 by simonmar] Allow installing of docs. - - - - - d510b517 by Sven Panne at 2003-10-11T08:10:44+00:00 [haddock @ 2003-10-11 08:10:44 by panne] Include architecture-independent files in file list - - - - - 187d7618 by Sigbjorn Finne at 2003-10-20T17:19:24+00:00 [haddock @ 2003-10-20 17:19:22 by sof] support for i-parameters + zip comprehensions - - - - - b6c7a273 by Simon Marlow at 2003-11-03T14:24:24+00:00 [haddock @ 2003-11-03 14:24:24 by simonmar] Update TODO file. - - - - - 58513e33 by Simon Marlow at 2003-11-05T11:22:04+00:00 [haddock @ 2003-11-05 11:22:04 by simonmar] Remove the last of the uses of 'trace' to emit warnings, and tidy up a couple of places where duplicate warnings were being emitted. - - - - - 33a78846 by Simon Marlow at 2003-11-05T11:30:53+00:00 [haddock @ 2003-11-05 11:30:52 by simonmar] - Suppress warnings about unknown imported modules by default. - Add a -v/--verbose flag to re-enable these warnings. The general idea is to suppress the "Warning: unknown module: Prelude" warnings which most Haddock users will see every time, and which aren't terribly useful. - - - - - a969de7f by Simon Marlow at 2003-11-05T12:30:28+00:00 [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. - - - - - f14ea82a by Simon Marlow at 2003-11-05T15:15:59+00:00 [haddock @ 2003-11-05 15:15:59 by simonmar] Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this. - - - - - 01a25ca6 by Simon Marlow at 2003-11-05T15:16:38+00:00 [haddock @ 2003-11-05 15:16:38 by simonmar] Update - - - - - 1a7ccb86 by Simon Marlow at 2003-11-05T17:16:05+00:00 [haddock @ 2003-11-05 17:16:04 by simonmar] Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up. - - - - - a2bca16d by Simon Marlow at 2003-11-06T10:44:52+00:00 [haddock @ 2003-11-06 10:44:52 by simonmar] Include iface_reexported in the .haddock file. This unfortunately bloats the file (40% for base). If this gets to be a problem we can always apply the dictionary trick that GHC uses for squashing .hi files. - - - - - 0a09c293 by Simon Marlow at 2003-11-06T12:39:47+00:00 [haddock @ 2003-11-06 12:39:46 by simonmar] - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo at . -- -- [@bar@] The description of @bar at . Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added. - - - - - fe1b3460 by Simon Marlow at 2003-11-06T14:47:36+00:00 [haddock @ 2003-11-06 14:47:36 by simonmar] Remove the 'Parent' button - it is of dubious use, and often points into thin air. - - - - - db6d762f by Simon Marlow at 2003-11-06T16:48:14+00:00 [haddock @ 2003-11-06 16:48:11 by simonmar] - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page. - - - - - 7d71718b by Simon Marlow at 2003-11-06T16:50:28+00:00 [haddock @ 2003-11-06 16:50:28 by simonmar] Add -k/--package docs - - - - - ef43949d by Simon Marlow at 2003-11-06T16:51:23+00:00 [haddock @ 2003-11-06 16:51:23 by simonmar] Bump to 0.6 - - - - - 1c419e06 by Simon Marlow at 2003-11-06T16:51:50+00:00 [haddock @ 2003-11-06 16:51:50 by simonmar] update - - - - - 69422327 by Simon Marlow at 2003-11-10T14:41:06+00:00 [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. - - - - - 3c3fc433 by Simon Marlow at 2003-11-10T14:51:59+00:00 [haddock @ 2003-11-10 14:51:59 by simonmar] Fix for getReExports: take into account names which are not visible because they are re-exported from a different package. - - - - - 31c8437b by Simon Marlow at 2003-11-10T15:10:53+00:00 [haddock @ 2003-11-10 15:10:53 by simonmar] Version 0.6 changes - - - - - a7c2430b by Simon Marlow at 2003-11-10T15:15:58+00:00 [haddock @ 2003-11-10 15:15:58 by simonmar] getReExports: one error case that isn't - - - - - 00cc459c by Simon Marlow at 2003-11-10T16:15:19+00:00 [haddock @ 2003-11-10 16:15:18 by simonmar] copyright update - - - - - ca62408d by Simon Marlow at 2003-11-11T09:57:25+00:00 [haddock @ 2003-11-11 09:57:25 by simonmar] Version 0.6 - - - - - 3acbf818 by Simon Marlow at 2003-11-11T12:10:44+00:00 [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. - - - - - 6c90abc2 by Simon Marlow at 2003-11-12T10:03:39+00:00 [haddock @ 2003-11-12 10:03:39 by simonmar] 2002 -> 2003 - - - - - 090bbc4c by Simon Marlow at 2003-11-28T12:08:00+00:00 [haddock @ 2003-11-28 12:08:00 by simonmar] update - - - - - 8096a832 by Simon Marlow at 2003-11-28T12:09:58+00:00 [haddock @ 2003-11-28 12:09:58 by simonmar] Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it. - - - - - 35294929 by Sven Panne at 2003-12-29T17:16:31+00:00 [haddock @ 2003-12-29 17:16:31 by panne] Updated my email address - - - - - cdb697bf by Simon Marlow at 2004-01-08T10:14:24+00:00 [haddock @ 2004-01-08 10:14:24 by simonmar] Add instructions for using GHC to pre-process source for feeding to Haddock. - - - - - 8dfc491f by Simon Marlow at 2004-01-09T12:45:46+00:00 [haddock @ 2004-01-09 12:45:46 by simonmar] Add -optP-P to example ghc command line. - - - - - ac41b820 by Simon Marlow at 2004-02-03T11:02:03+00:00 [haddock @ 2004-02-03 11:02:03 by simonmar] Fix bug in index generation - - - - - f4e7edcb by Simon Marlow at 2004-02-10T11:51:16+00:00 [haddock @ 2004-02-10 11:51:16 by simonmar] Don't throw away whitespace at the beginning of a line (experimental fix). - - - - - 68e212d2 by Simon Marlow at 2004-02-10T12:10:08+00:00 [haddock @ 2004-02-10 12:10:08 by simonmar] Fix for previous commit: I now realise why the whitespace was stripped from the beginning of the line. Work around it. - - - - - e7d7f2df by Sven Panne at 2004-02-10T18:38:45+00:00 [haddock @ 2004-02-10 18:38:45 by panne] Make Haddock link with the latest relocated monad transformer package - - - - - 992d4225 by Simon Marlow at 2004-02-16T10:21:35+00:00 [haddock @ 2004-02-16 10:21:35 by simonmar] Add a TODO - - - - - 1ac55326 by Simon Marlow at 2004-03-12T11:33:39+00:00 [haddock @ 2004-03-12 11:33:39 by simonmar] Add an item. - - - - - 0478e903 by Simon Marlow at 2004-03-15T12:24:05+00:00 [haddock @ 2004-03-15 12:24:05 by simonmar] Add an item. - - - - - 6f26d21a by Simon Marlow at 2004-03-18T14:21:29+00:00 [haddock @ 2004-03-18 14:21:29 by simonmar] Fix URL - - - - - 19b6bb99 by Simon Marlow at 2004-03-22T14:09:03+00:00 [haddock @ 2004-03-22 14:09:03 by simonmar] getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me). - - - - - 5c756031 by Simon Marlow at 2004-03-24T09:42:11+00:00 [haddock @ 2004-03-24 09:42:10 by simonmar] hiding bug from Ross Paterson (fixed in rev 1.59 of Main.hs) - - - - - 1b692e6c by Simon Marlow at 2004-03-24T10:10:50+00:00 [haddock @ 2004-03-24 10:10:50 by simonmar] mkExportItems fix & simplification: we should be looking at the actual exported names (calculated earlier) to figure out which subordinates of a declaration are exported. This means that if you export a record, and name its fields separately in the export list, the fields will still be visible in the documentation for the constructor. - - - - - 90e5e294 by Simon Marlow at 2004-03-24T10:12:08+00:00 [haddock @ 2004-03-24 10:12:08 by simonmar] Make restrictCons take into account record field names too (removing a ToDo). - - - - - 2600efa4 by Simon Marlow at 2004-03-24T10:16:17+00:00 [haddock @ 2004-03-24 10:16:17 by simonmar] Record export tests. - - - - - 6a8575c7 by Simon Marlow at 2004-03-25T09:35:14+00:00 [haddock @ 2004-03-25 09:35:14 by simonmar] restrictTo: fix for restricting a newtype with a record field. - - - - - dcf55a8d by Simon Marlow at 2004-03-25T10:01:42+00:00 [haddock @ 2004-03-25 10:01:42 by simonmar] Fix duplicate instance bug - - - - - f49aa758 by Simon Marlow at 2004-03-25T10:02:41+00:00 [haddock @ 2004-03-25 10:02:41 by simonmar] Duplicate instance bug. - - - - - 7b87344c by Simon Marlow at 2004-03-25T10:29:56+00:00 [haddock @ 2004-03-25 10:29:56 by simonmar] If a name is imported from two places, one hidden and one not, choose the unhidden one to link to. Also, when there's only a hidden module to link to, don't try linking to it. - - - - - 40f44d7b by Simon Marlow at 2004-03-25T15:17:24+00:00 [haddock @ 2004-03-25 15:17:23 by simonmar] Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment. - - - - - 9b64dc0f by Simon Marlow at 2004-03-25T15:20:55+00:00 [haddock @ 2004-03-25 15:20:55 by simonmar] Update - - - - - c2fff7f2 by Simon Marlow at 2004-03-25T15:45:10+00:00 [haddock @ 2004-03-25 15:45:10 by simonmar] Eliminate some unnecessary spaces in the HTML rendering - - - - - b7948ff0 by Simon Marlow at 2004-03-25T16:00:37+00:00 [haddock @ 2004-03-25 16:00:36 by simonmar] Remove all that indentation in the generated HTML to keep the file sizes down. - - - - - da2bb4ca by Sven Panne at 2004-03-27T09:57:58+00:00 [haddock @ 2004-03-27 09:57:57 by panne] Added the new-born haddock.js to the build process and the documentation. - - - - - b99e6f8c by Sven Panne at 2004-03-27T10:32:20+00:00 [haddock @ 2004-03-27 10:32:20 by panne] "type" is a required attribute of the "script" element - - - - - 562b185a by Sven Panne at 2004-03-27T12:52:34+00:00 [haddock @ 2004-03-27 12:52:34 by panne] Add a doctype for the contents page, too. - - - - - f6a99c2d by Simon Marlow at 2004-04-14T10:03:25+00:00 [haddock @ 2004-04-14 10:03:25 by simonmar] fix for single-line comment syntax - - - - - de366303 by Simon Marlow at 2004-04-20T13:08:04+00:00 [haddock @ 2004-04-20 13:08:04 by simonmar] Allow a 'type' declaration to include documentation comments. These will be ignored by Haddock, but at least one user (Johannes Waldmann) finds this feature useful, and it's easy to add. - - - - - fd78f51e by Simon Marlow at 2004-05-07T15:14:56+00:00 [haddock @ 2004-05-07 15:14:56 by simonmar] - update copyright - add version to abstract - - - - - 59f53e32 by Sven Panne at 2004-05-09T14:39:53+00:00 [haddock @ 2004-05-09 14:39:53 by panne] Fix the fix for single-line comment syntax, ------------------------------------------- is now a valid comment line again. - - - - - 8b18f2fe by Simon Marlow at 2004-05-10T10:11:51+00:00 [haddock @ 2004-05-10 10:11:51 by simonmar] Update - - - - - 225a491d by Ross Paterson at 2004-05-19T13:10:23+00:00 [haddock @ 2004-05-19 13:10:23 by ross] Make the handling of "deriving" slightly smarter, by ignoring data constructor arguments that are identical to the lhs. Now handles things like data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ... - - - - - 37588686 by Mike Thomas at 2004-05-21T06:38:14+00:00 [haddock @ 2004-05-21 06:38:14 by mthomas] Windows exe extensions (bin remains for Unix). - - - - - cf2b9152 by Simon Marlow at 2004-05-25T09:34:54+00:00 [haddock @ 2004-05-25 09:34:54 by simonmar] Add some TODO items - - - - - 4d29cdfc by Simon Marlow at 2004-05-25T10:41:46+00:00 [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. - - - - - 2e0771e0 by Mike Thomas at 2004-05-28T20:17:55+00:00 [haddock @ 2004-05-28 20:17:55 by mthomas] Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg. - - - - - 8d10bde1 by Sven Panne at 2004-06-05T16:53:34+00:00 [haddock @ 2004-06-05 16:53:34 by panne] Misc. rpm spec file cleanup, including: * make BuildRoot handling more consistent * added default file attributes * consistent defines and tags - - - - - 59974349 by Sven Panne at 2004-06-05T18:01:00+00:00 [haddock @ 2004-06-05 18:01:00 by panne] More rpm spec file cleanup, including: * added some BuildRequires * changed packager to me, so people can complain at the right place :-] * consistently refer to haskell.org instead of www.haskell.org - - - - - b94d4903 by Simon Marlow at 2004-07-01T11:08:58+00:00 [haddock @ 2004-07-01 11:08:57 by simonmar] Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead. - - - - - d5278f67 by Sven Panne at 2004-07-04T15:15:55+00:00 [haddock @ 2004-07-04 15:15:55 by panne] Install pictures for +/- pictures, too (JPEG is a strange format for graphics like this, I would have expected GIF or PNG here.) Things look fine with Konqueror and Netscape on Linux now, the only downside is that the cursor doesn't change when positioned above the "button". - - - - - 46dec6c5 by Sven Panne at 2004-07-13T17:59:28+00:00 [haddock @ 2004-07-13 17:59:28 by panne] A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there. - - - - - 1d7bc432 by Simon Marlow at 2004-07-22T08:54:06+00:00 [haddock @ 2004-07-22 08:54:06 by simonmar] Add single quote to $ident, so you can say eg. 'foldl'' to refer to foldl' (the longest match rule is our friend). Bug reported by Adrian Hey <ahey at iee.org> - - - - - f183618b by Krasimir Angelov at 2004-07-27T22:59:35+00:00 [haddock @ 2004-07-27 22:58:23 by krasimir] Add basic support for Microsoft HTML Help 2.0 - - - - - d515d0c2 by Krasimir Angelov at 2004-07-27T23:02:36+00:00 [haddock @ 2004-07-27 23:02:36 by krasimir] escape names in the index - - - - - a5f1be23 by Krasimir Angelov at 2004-07-27T23:05:21+00:00 [haddock @ 2004-07-27 23:05:21 by krasimir] Add jsFile, plusFile and minusFile to the file list - - - - - c4fb4881 by Krasimir Angelov at 2004-07-28T22:12:10+00:00 [haddock @ 2004-07-28 22:12:09 by krasimir] bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs - - - - - 64d30b1d by Krasimir Angelov at 2004-07-30T22:15:47+00:00 [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug - - - - - 133c8c5c by Krasimir Angelov at 2004-07-31T12:04:38+00:00 [haddock @ 2004-07-31 12:04:37 by krasimir] make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful. - - - - - 79040963 by Krasimir Angelov at 2004-07-31T13:10:20+00:00 [haddock @ 2004-07-31 13:10:20 by krasimir] Make DHtmlTree compatible with Mozila browser - - - - - 1a55dc90 by Krasimir Angelov at 2004-07-31T14:52:55+00:00 [haddock @ 2004-07-31 14:52:55 by krasimir] fix - - - - - 85ce0237 by Krasimir Angelov at 2004-07-31T14:53:28+00:00 [haddock @ 2004-07-31 14:53:28 by krasimir] HtmlHelp 1.x - - - - - 3c0c53ba by Krasimir Angelov at 2004-07-31T20:35:21+00:00 [haddock @ 2004-07-31 20:35:21 by krasimir] Added support for DevHelp - - - - - d42b5af1 by Krasimir Angelov at 2004-07-31T21:17:51+00:00 [haddock @ 2004-07-31 21:17:51 by krasimir] Document new features in HtmlHelp - - - - - 790fe21e by Krasimir Angelov at 2004-08-01T15:14:02+00:00 [haddock @ 2004-08-01 15:14:02 by krasimir] add missing imports - - - - - fd7cc6bc by Krasimir Angelov at 2004-08-01T19:52:08+00:00 [haddock @ 2004-08-01 19:52:06 by krasimir] fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format. - - - - - 94ad7ac8 by Krasimir Angelov at 2004-08-01T19:53:50+00:00 [haddock @ 2004-08-01 19:53:50 by krasimir] I forgot to add the new +/- images - - - - - f0c65388 by Krasimir Angelov at 2004-08-02T16:25:53+00:00 [haddock @ 2004-08-02 16:25:53 by krasimir] Add root node to the table of contents. All modules in tree are not children of the root - - - - - f50bd85d by Sven Panne at 2004-08-02T18:17:46+00:00 [haddock @ 2004-08-02 18:17:46 by panne] Mainly DocBook fixes - - - - - 09527ce3 by Sven Panne at 2004-08-02T20:02:29+00:00 [haddock @ 2004-08-02 20:02:29 by panne] Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays... - - - - - c8fbacfa by Sven Panne at 2004-08-02T20:31:13+00:00 [haddock @ 2004-08-02 20:31:13 by panne] Warning police - - - - - 37830bff by Sven Panne at 2004-08-02T20:32:29+00:00 [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code - - - - - 13847171 by Sven Panne at 2004-08-02T21:12:27+00:00 [haddock @ 2004-08-02 21:12:25 by panne] Use pathJoin instead of low-level list-based manipulation for FilePaths - - - - - c711d61e by Sven Panne at 2004-08-02T21:16:02+00:00 [haddock @ 2004-08-02 21:16:02 by panne] Removed WinDoze CRs - - - - - b1f7dc88 by Sven Panne at 2004-08-03T19:35:59+00:00 [haddock @ 2004-08-03 19:35:59 by panne] Fixed spelling of "http-equiv" attribute - - - - - dd5f394e by Sven Panne at 2004-08-03T19:44:03+00:00 [haddock @ 2004-08-03 19:44:03 by panne] Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before) - - - - - 919c47c6 by Sigbjorn Finne at 2004-08-03T19:45:11+00:00 [haddock @ 2004-08-03 19:45:11 by sof] make it compile with <= ghc-6.1 - - - - - 4d6f01d8 by Sigbjorn Finne at 2004-08-03T19:45:30+00:00 [haddock @ 2004-08-03 19:45:30 by sof] ffi wibble - - - - - 4770643a by Sven Panne at 2004-08-03T20:47:46+00:00 [haddock @ 2004-08-03 20:47:46 by panne] Fixed CSS for button style. Note that only "0" is a valid measure without a unit! - - - - - 14aaf2e5 by Sven Panne at 2004-08-03T21:07:59+00:00 [haddock @ 2004-08-03 21:07:58 by panne] Improved spacing of dynamic module tree - - - - - 97c3579a by Simon Marlow at 2004-08-09T11:03:04+00:00 [haddock @ 2004-08-09 11:03:04 by simonmar] Add FormatVersion Patch submitted by: George Russell <ger at informatik.uni-bremen.de> - - - - - af7f8c03 by Simon Marlow at 2004-08-09T11:55:07+00:00 [haddock @ 2004-08-09 11:55:05 by simonmar] Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger at informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header. - - - - - 7b865ad3 by Simon Marlow at 2004-08-10T14:09:57+00:00 [haddock @ 2004-08-10 14:09:57 by simonmar] Fixes for DevHelp/HtmlHelp following introduction of short module description. - - - - - 814766cd by Simon Marlow at 2004-08-10T14:33:46+00:00 [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. - - - - - 39cf9ede by Simon Marlow at 2004-08-12T12:08:23+00:00 [haddock @ 2004-08-12 12:08:23 by simonmar] Avoid using string-gap tricks. - - - - - b6d78551 by Simon Marlow at 2004-08-13T10:53:21+00:00 [haddock @ 2004-08-13 10:53:21 by simonmar] Update - - - - - eaae7417 by Simon Marlow at 2004-08-13T10:53:50+00:00 [haddock @ 2004-08-13 10:53:50 by simonmar] Test for primes in quoted links - - - - - 68c34f06 by Sven Panne at 2004-08-16T19:59:38+00:00 [haddock @ 2004-08-16 19:59:36 by panne] XMLification - - - - - 7f45a6f9 by Sven Panne at 2004-08-18T16:42:54+00:00 [haddock @ 2004-08-18 16:42:54 by panne] Re-added indices + minor fixes - - - - - 8a5dd97c by Sigbjorn Finne at 2004-08-25T17:15:42+00:00 [haddock @ 2004-08-25 17:15:42 by sof] backquote HADDOCK_VERSION defn for <= ghc-6.0.x; believe this is only needed under mingw - - - - - 4b1b42ea by Sven Panne at 2004-08-26T20:08:50+00:00 [haddock @ 2004-08-26 20:08:49 by panne] SGML is dead, long live DocBook XML! Note: The BuildRequires tags in the spec files are still incomplete and the documentation about the DocBook tools needs to be updated, too. Stay tuned... - - - - - 8d52cedb by Sven Panne at 2004-08-26T21:03:19+00:00 [haddock @ 2004-08-26 21:03:19 by panne] Updated BuildRequires tags. Alas, there seems to be no real standard here, so your mileage may vary... At least the current specs should work on SuSE Linux. - - - - - e6982912 by Sigbjorn Finne at 2004-08-30T15:44:59+00:00 [haddock @ 2004-08-30 15:44:59 by sof] escape HADDOCK_VERSION double quotes on all platforms when compiling with <=6.0.x - - - - - b3fbc867 by Simon Marlow at 2004-08-31T13:09:42+00:00 [haddock @ 2004-08-31 13:09:42 by simonmar] Avoid GHC/shell versionitis and create Version.hs - - - - - c359e16a by Sven Panne at 2004-09-05T19:12:33+00:00 [haddock @ 2004-09-05 19:12:32 by panne] * HTML documentation for "foo.xml" goes into directory "foo" again, not "foo-html". This is nicer and consistent with the behaviour for building the docs from SGML. * Disabled building PostScript documentation in the spec files for now, there are some strange issues with the FO->PS conversion for some files which have to be clarified first. - - - - - c68b1eba by Sven Panne at 2004-09-24T07:04:38+00:00 [haddock @ 2004-09-24 07:04:38 by panne] Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable. - - - - - dfb32615 by Simon Marlow at 2004-09-30T08:21:29+00:00 [haddock @ 2004-09-30 08:21:29 by simonmar] Add a feature request - - - - - 45ff783c by Sven Panne at 2004-10-23T19:54:00+00:00 [haddock @ 2004-10-23 19:54:00 by panne] Improved the Cygwin/MinGW chaos a little bit. There is still confusion about host platform vs. target platform... - - - - - 5f644714 by Krasimir Angelov at 2004-10-28T16:01:51+00:00 [haddock @ 2004-10-28 16:01:51 by krasimir] update for ghc-6.3+ - - - - - 92d9753e by Sven Panne at 2004-11-01T16:39:01+00:00 [haddock @ 2004-11-01 16:39:01 by panne] Revert previous commit: It's Network.URI which should be changed, not Haddock. - - - - - 05f70f6e by Simon Marlow at 2005-01-04T16:15:51+00:00 [haddock @ 2005-01-04 16:15:51 by simonmar] parser fix: allow qualified specialids. - - - - - 47870837 by Simon Marlow at 2005-01-04T16:16:54+00:00 [haddock @ 2005-01-04 16:16:54 by simonmar] Add a test - - - - - ff11fc2c by Ross Paterson at 2005-01-10T19:18:22+00:00 [haddock @ 2005-01-10 19:18:22 by ross] Render non-ASCII characters using numeric character references, to simplify charset issues. There's a META tag saying the charset is UTF-8, but GHC outputs characters as raw bytes. Ideally we need an encoding on the input side too, primarily in comments, because source files containing non-ASCII characters aren't portable between locales. - - - - - eba2fc4e by Simon Marlow at 2005-01-11T10:44:37+00:00 [haddock @ 2005-01-11 10:44:37 by simonmar] Remove string gap - - - - - b899a381 by Ross Paterson at 2005-01-13T11:41:33+00:00 [haddock @ 2005-01-13 11:41:33 by ross] recognize SGML-style numeric character references &#ddd; or &#xhhhh; and translate them into Chars. - - - - - 106e3cf0 by Ross Paterson at 2005-01-13T14:43:41+00:00 [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) - - - - - e8f54f25 by Ross Paterson at 2005-01-13T14:44:24+00:00 [haddock @ 2005-01-13 14:44:24 by ross] Describe numeric character references. - - - - - 914ccdce by Sven Panne at 2005-01-15T18:44:48+00:00 [haddock @ 2005-01-15 18:44:45 by panne] Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later. - - - - - 6ab20e84 by Sven Panne at 2005-01-16T12:18:26+00:00 [haddock @ 2005-01-16 12:18:26 by panne] Trim imports - - - - - efb81da9 by Sven Panne at 2005-01-16T12:58:08+00:00 [haddock @ 2005-01-16 12:58:03 by panne] Correctly handle the new order of arguments for the combining function given to fromListWith. - - - - - e27b5834 by Sven Panne at 2005-01-16T14:14:41+00:00 [haddock @ 2005-01-16 14:14:39 by panne] Data.Map.unions is left-biased. - - - - - dae3cc3e by Sven Panne at 2005-01-16T14:22:44+00:00 [haddock @ 2005-01-16 14:22:44 by panne] Added the last missing "flip" to get identical HTML output as previous versions. - - - - - 951d8408 by Sven Panne at 2005-01-16T14:37:10+00:00 [haddock @ 2005-01-16 14:37:10 by panne] Refactored Text.PrettyPrint legacy hell into a separate module. - - - - - f1c4b892 by Sven Panne at 2005-01-16T15:41:25+00:00 [haddock @ 2005-01-16 15:41:21 by panne] Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway. - - - - - 60824c6e by Simon Marlow at 2005-01-18T10:02:48+00:00 [haddock @ 2005-01-18 10:02:48 by simonmar] Add a TODO - - - - - a8c82f23 by Krasimir Angelov at 2005-01-28T23:19:39+00:00 [haddock @ 2005-01-28 23:19:39 by krasimir] import Foreign/Foreign.C are required for Windows - - - - - d8450a23 by Simon Marlow at 2005-02-02T16:23:04+00:00 [haddock @ 2005-02-02 16:23:00 by simonmar] Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning. - - - - - 1cce71d0 by Simon Marlow at 2005-02-03T13:42:19+00:00 [haddock @ 2005-02-03 13:42:19 by simonmar] - add --ignore-all-exports flag, which behaves as if every module has the ignore-exports attribute (requested by Chris Ryder). - add --hide option to hide a module on the command line. - add --use-package option to get Haddock info for a package from ghc-pkg (largely untested). - remove reexports from the .haddock file, they aren't used any more. - - - - - 767123ef by Ross Paterson at 2005-02-03T16:17:37+00:00 [haddock @ 2005-02-03 16:17:37 by ross] fix typo for < 6.3 - - - - - 0c680c04 by Simon Marlow at 2005-02-04T12:03:31+00:00 [haddock @ 2005-02-04 12:03:31 by simonmar] Fix bug in renameExportItems that meant links in instances weren't being renamed properly. - - - - - ff7abe5f by Simon Marlow at 2005-02-04T12:15:53+00:00 [haddock @ 2005-02-04 12:15:52 by simonmar] Add attribute #not-home, to indicate that the current module should not be considered to be a home module for the each entity it exports, unless there is no other module that exports the entity. - - - - - fc2cfd27 by Simon Marlow at 2005-02-04T12:40:02+00:00 [haddock @ 2005-02-04 12:40:02 by simonmar] Update the documentation w.r.t. home modules and the not-home attribute. - - - - - 26b8ddf7 by Ross Paterson at 2005-02-04T13:36:06+00:00 [haddock @ 2005-02-04 13:36:05 by ross] sort lists of instances by - arity of the type constructors (so higher-kinded instances come first) - name of the class - argument types - - - - - 26bfb19c by Simon Marlow at 2005-02-23T15:57:12+00:00 [haddock @ 2005-02-23 15:57:12 by simonmar] Fix documentation regarding the module attributes. - - - - - 9c3afd02 by Simon Marlow at 2005-02-28T16:18:17+00:00 [haddock @ 2005-02-28 16:18:17 by simonmar] version 0.7 - - - - - a95fd63f by Simon Marlow at 2005-02-28T16:22:08+00:00 [haddock @ 2005-02-28 16:22:08 by simonmar] Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results. - - - - - 905d42f7 by Simon Marlow at 2005-03-01T17:16:42+00:00 [haddock @ 2005-03-01 17:16:40 by simonmar] Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case). - - - - - a0e1d178 by Wolfgang Thaller at 2005-03-09T08:28:39+00:00 [haddock @ 2005-03-09 08:28:39 by wolfgang] Hack haddock's lexer to accept the output from Apple's broken version of cpp (Apple's cpp leaves #pragma set_debug_pwd directives in it's output). - - - - - 9e1eb784 by Simon Marlow at 2005-04-22T14:27:15+00:00 [haddock @ 2005-04-22 14:27:15 by simonmar] Add a TODO item - - - - - 23281f78 by Ross Paterson at 2005-05-18T12:41:59+00:00 [haddock @ 2005-05-18 12:41:59 by ross] fix 3 bugs in --use-package, and document it. - - - - - 00074a68 by Sven Panne at 2005-05-21T12:35:29+00:00 [haddock @ 2005-05-21 12:35:29 by panne] Warning/versionitis police - - - - - 341fa822 by Simon Marlow at 2005-06-15T15:43:21+00:00 [haddock @ 2005-06-15 15:43:21 by simonmar] Allow "licence" as an alternate spelling of "license" - - - - - 3b953f8b by Simon Marlow at 2005-06-16T08:14:12+00:00 [haddock @ 2005-06-16 08:14:12 by simonmar] wibble - - - - - abfd9826 by Simon Marlow at 2005-06-27T14:46:40+00:00 [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The old way confused Apache because the extensions are sometimes interpreted as having special meanings. - - - - - a01eea00 by Simon Marlow at 2005-08-04T13:59:40+00:00 [haddock @ 2005-08-04 13:59:40 by simonmar] 0.7 changes - - - - - 170ef87e by Simon Marlow at 2005-08-04T15:08:03+00:00 [haddock @ 2005-08-04 15:08:03 by simonmar] spec file from Jens Peterson - - - - - 7621fde4 by Simon Marlow at 2005-08-04T15:59:30+00:00 [haddock @ 2005-08-04 15:59:30 by simonmar] replace mingw tests with $(Windows) - - - - - a20739bb by Sven Panne at 2005-08-05T07:01:12+00:00 [haddock @ 2005-08-05 07:01:12 by panne] Reverted to previous version (but with bumped version number), the last commit broke RPM building on SuSE systems due to differently named dependencies. As a clarification: All .spec files in the repository have to work at least on SuSE, because that's the system I'm using. And as "Mr. Building Police", I reserve me the right to keep them that way... >:-) It might very well be the case that we need different .spec files for different platforms, so packagers which are unhappy with the current .spec files should contact me, stating the actual problems. - - - - - 4afb15cf by Simon Marlow at 2005-10-05T10:51:45+00:00 [haddock @ 2005-10-05 10:51:45 by simonmar] Add a bug - - - - - 60f69f82 by Simon Marlow at 2005-10-05T12:52:03+00:00 [haddock @ 2005-10-05 12:52:03 by simonmar] Document new behaviour of -s option - - - - - f7e520ca by Simon Marlow at 2005-10-10T15:02:55+00:00 [haddock @ 2005-10-10 15:02:55 by simonmar] extractRecSel: ignore non-record constructors (fixes a crash when using datatypes with a mixture of record and non-record style constructors). - - - - - b2edbedb by Simon Marlow at 2005-10-14T09:44:21+00:00 Start CHANGES for 0.8 - - - - - 21c7ac8d by Simon Marlow at 2005-10-14T23:11:19+00:00 First cut of Cabal build system - - - - - 766cecdd by Simon Marlow at 2005-10-29T08:14:43+00:00 Add configure script and Makefile for the docs Add a separate configure script and build system for building the documentation. The configure and Makefile code is stolen from fptools. This is left as a separate build system so that the main Cabal setup doesn't require a Unix build environment or DocBook XML tools. - - - - - aa36c783 by Duncan Coutts at 2006-01-17T19:29:55+00:00 Add a --wiki=URL flag to add a per-module link to a correspondng wiki page. So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option. - - - - - e06e2da2 by Simon Marlow at 2006-01-18T09:28:15+00:00 TODO: documnet --wiki - - - - - 17adfda9 by Duncan Coutts at 2006-01-19T20:17:59+00:00 Add an optional wiki link for each top level exported name. In each module, for each "top level" exported entity we add a hyper link to a corresponding wiki page. The link url gets the name of the exported entity as a '#'-style anchor, so if there is an anchor in the page with that name then the users browser should jump directly to it. By "top level" we mean functions, classes, class members and data types (data, type, newtype), but not data constructors, class instances or data type class membership. The link is added at the right of the page and in a small font. Hopefully this is the right balance of visibility/distraction. We also include a link to the wiki base url in the contents and index pages. - - - - - f52324bb by Duncan Coutts at 2006-01-19T20:28:27+00:00 Rewrite pathJoin to only add a path separator when necessary. When the path ends in a file seperator there is no need to add another. Now using "--wiki=http://blah.com/foo/" should do the right thing. (Code snippet adapted from Isaac's FilePath package.) - - - - - 43bb89fa by Duncan Coutts at 2006-01-21T17:15:27+00:00 Teach haddock about line pragmas and add accurate source code links Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's source location tracking to include the file name as well as line/column. This way each AST item that is tagged with a SrcLoc gets the original file name too. Use this original file name to add source links to each exported item, in the same visual style as the wiki links. Note that the per-export source links are to the defining module rather than whichever module haddock pretends it is exported from. This is what we want for source code links. The source code link URL can also contain the name of the export so one could implement jumping to the actual location of the function in the file if it were linked to an html version of the source rather than just plain text. The name can be selected with the %N wild card. So for linking to the raw source code one might use: --source=http://darcs/haskell.org/foo/%F Or for linking to html syntax highlighted code: --source=http://darcs/haskell.org/foo/%M.html#%N - - - - - edd9f229 by Duncan Coutts at 2006-01-22T00:02:00+00:00 Extend URL variable expansion syntax and add source links to the contents page Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module. - - - - - eb3c6ada by Duncan Coutts at 2006-01-23T13:42:34+00:00 Remove the complex substitutions and add more command line flags instead. Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now use three seperate command line flags for the top level, per-module and per-entity source and wiki links. They are: --source-base, --source-module, --source-entity --comments-base, --comments-module, --comments-entity We leave -s, --source as an alias for --source-module which is how that option behaved previously. The long forms of the substitutions are still available, ${FILE} ${MODULE} etc and the only non-trivial substitution is ${MODULE/./c} to replace the '.' characters in the module name with any other character c. eg ${MODULE/./-} Seperating the source and wiki url flags has the added bonus that they can be turned on or off individually. So users can have per-module links for example without having to also have per-entity links.` - - - - - a2f0f2af by Duncan Coutts at 2006-01-23T13:54:52+00:00 Make the --help output fit in 80 columns. This is a purely cosmetic patch, feel free to ignore it. The only trickery going on is that we don't display the deprecated -s, --source flags in the help message, but we do still accept them. - - - - - 2d3a4b0c by Duncan Coutts at 2006-01-23T14:12:16+00:00 Add documentation for the new --source-* and --comments-* command line options - - - - - 1a82a297 by Simon Marlow at 2006-01-23T17:03:27+00:00 fix markup - - - - - 100d464a by Duncan Coutts at 2006-01-23T18:31:13+00:00 remove a couple TODO items that have been done The --wiki, or rather the --comment-* options are now documented. There is probably no need to have haddock invoke unlit or cpp itself since it can now pick up the line pragmas to get the source locations right. Tools like Cabal will arrange for preprocessors to be run so there is less of a need for tools like haddock to do it themselves. - - - - - 3162fa91 by Simon Marlow at 2006-01-24T14:21:56+00:00 add a test I had lying around - - - - - 98947063 by Simon Marlow at 2006-01-31T13:52:54+00:00 add scabal-version field - - - - - c41876e6 by Neil Mitchell at 2006-02-26T17:48:21+00:00 Add Hoogle output option - - - - - f86fb9c0 by Simon Marlow at 2006-03-08T09:15:20+00:00 add haskell.vim Contributed by Brad Bowman <bsb at bereft.net>, thanks! - - - - - 35d3c511 by benjamin.franksen at 2006-03-03T22:39:54+00:00 fixed libdir (/html was missing) - - - - - 4d08fd7d by Simon Marlow at 2006-03-10T11:13:31+00:00 add PatternGuards extension - - - - - 3f095e70 by Simon Marlow at 2006-03-13T11:40:42+00:00 bug fixes from Brad Bowman - - - - - 8610849d by Sven Panne at 2006-03-19T17:02:56+00:00 Fixed Cabal/RPM build - - - - - 34a994d6 by sven.panne at 2006-04-20T12:39:23+00:00 Avoid pattern guards Due to the use of pattern guards in Haddock, GHC was called with -fglasgow-exts. This in turn enables bang patterns, too, which broke the Haddock build. Removing some unnecessary pattern guards seemed to be the better way of fixing this instead of using a pragma to disable pattern guards. - - - - - bb523f51 by Ross Paterson at 2006-04-24T09:03:25+00:00 extend 'deriving' heuristic a little If an argument of a data constructor has a type variable head, it is irreducible and the same type class can be copied into the constraint. (Formerly we just did this for type variable arguments.) - - - - - dab9fe7a by Simon Marlow at 2006-04-26T10:02:31+00:00 record an idea - - - - - 748b7078 by Simon Marlow at 2006-05-08T08:28:53+00:00 add section about deriving - - - - - 11252ea1 by Simon Marlow at 2006-05-24T15:43:10+00:00 replace a fatal error in lexChar with a parseError - - - - - 382c9411 by Simon Marlow at 2006-05-24T15:45:47+00:00 add a bug - - - - - b79272f5 by Simon Marlow at 2006-05-24T15:46:29+00:00 add a bug report - - - - - 912edf65 by David Waern at 2006-07-10T19:09:23+00:00 Initial modifications -- doesn't compile - - - - - a3c7ba99 by David Waern at 2006-07-11T00:54:19+00:00 More porting work -- doesn't compile - - - - - 0a173d19 by David Waern at 2006-07-11T11:30:03+00:00 Make the repos temporarily compile and illustrate a problem - - - - - bad316de by David Waern at 2006-07-11T15:43:47+00:00 Progress on the porting process - - - - - bbf12d02 by David Waern at 2006-07-11T23:07:44+00:00 More progress on the porting -- first pass starting to shape up - - - - - de580ba2 by David Waern at 2006-07-20T17:48:30+00:00 More progress -- still on phase1 - - - - - 75a917a2 by David Waern at 2006-07-23T18:22:43+00:00 More work on pass1 -- mostly done - - - - - 6697b3f7 by David Waern at 2006-07-23T22:17:40+00:00 More work, started working on the renaming phase -- this code will need a cleanup soon :) - - - - - 82a5bcbb by David Waern at 2006-07-29T16:16:43+00:00 Add instances, build renaming environment, start on the renamer - - - - - c3f8f4f1 by David Waern at 2006-07-29T21:37:48+00:00 Complete the renamer - - - - - 7e00d464 by David Waern at 2006-07-30T21:01:57+00:00 Start porting the Html renderer - - - - - f04ce121 by David Waern at 2006-08-09T20:04:56+00:00 More Html rendering progress - - - - - 20c21b53 by David Waern at 2006-08-10T17:37:47+00:00 More progress - - - - - d7097e0d by David Waern at 2006-08-11T20:31:51+00:00 Cleanup - - - - - a7351e86 by David Waern at 2006-08-12T11:44:47+00:00 Render H98 Data declarations - - - - - 3fb2208e by David Waern at 2006-08-12T17:15:34+00:00 Perfect rendering of Test.hs - - - - - 454fd062 by David Waern at 2006-08-13T21:57:08+00:00 Misc fixes and interface load/save - - - - - 7ef7e7be by David Waern at 2006-08-14T00:56:07+00:00 Some refactoring - - - - - a7d3efef by David Waern at 2006-08-19T20:07:55+00:00 Adapt to latest GHC - - - - - 5fc3c0d7 by David Waern at 2006-08-20T21:28:11+00:00 Move interface read/write to its own module + some cleanup - - - - - 037e011c by David Waern at 2006-08-20T21:38:24+00:00 Small cleanup - - - - - da3a1023 by David Waern at 2006-09-03T16:05:22+00:00 Change mode to BatchCompile to avoid GHC API bug - - - - - 3cc9be3b by David Waern at 2006-09-03T16:06:59+00:00 Starting work on GADT rendering - - - - - 94506037 by David Waern at 2006-09-03T20:02:48+00:00 Compensate for change of export list order in GHC - - - - - c2cec4eb by David Waern at 2006-09-04T20:53:01+00:00 Rename a function - - - - - 9a9735ba by David Waern at 2006-09-05T15:51:21+00:00 Change version number to 2.0 - - - - - 3758a714 by David Waern at 2006-09-05T15:51:49+00:00 Align comment properly - - - - - 68478d9e by David Waern at 2006-09-15T18:03:00+00:00 Remove interface reading/writing code and use the GHC api for creating package environments instead - - - - - d2eedd95 by David Waern at 2006-09-15T18:05:29+00:00 Change the executable name to haddock-ghc-nolib - - - - - fcfbcf66 by David Waern at 2006-09-15T18:05:45+00:00 Small source code cleanup - - - - - d08eb017 by David Waern at 2006-09-15T18:06:21+00:00 Remove handling of --package flag - - - - - b8a4cf53 by David Waern at 2006-09-15T18:07:16+00:00 Remove commented-out code - - - - - bef0a684 by David Waern at 2006-09-15T18:37:57+00:00 Don't warn about missing links to () - - - - - e7d25fd7 by David Waern at 2006-09-15T19:50:49+00:00 Remove Interface and Binary2 modules - - - - - 9894f2a1 by David Waern at 2006-09-15T19:53:43+00:00 Remove debug printing from HaddockHtml - - - - - a0e7455d by David Waern at 2006-09-16T00:16:29+00:00 Comments only - - - - - d5b26fa7 by David Waern at 2006-09-16T00:16:57+00:00 Refactor PackageData creation code and start on building the doc env propery (unfinished) - - - - - 06aaa779 by David Waern at 2006-09-16T00:19:25+00:00 Better comments in Main.hs - - - - - 1a52d1b4 by David Waern at 2006-09-18T22:17:11+00:00 Comments and spacing change - - - - - e5a97767 by David Waern at 2006-09-21T17:02:45+00:00 Remove unnecessary fmapM import in Main - - - - - 9d0f9d3a by David Waern at 2006-09-22T18:07:07+00:00 Make import list in HaddockHtml prettier - - - - - 3452f662 by David Waern at 2006-09-22T18:08:47+00:00 Refactor context rendering - - - - - 12d0a6d0 by David Waern at 2006-09-22T18:09:52+00:00 Do proper HsType rendering (inser parentheses correctly) - - - - - 2c20c2f9 by David Waern at 2006-09-22T18:10:45+00:00 Fix a bug in Main.toHsType - - - - - c5396443 by David Waern at 2006-09-22T18:11:16+00:00 Skip external package modules sort for now - - - - - 3fb95547 by David Waern at 2006-09-22T20:35:40+00:00 Take away trailin "2" on all previously clashing type names - - - - - 2174755f by David Waern at 2006-09-22T20:51:43+00:00 Remove unused imports in Main - - - - - 1e9f7a39 by David Waern at 2006-09-22T20:52:11+00:00 Fix a comment in Main - - - - - 32d9e028 by David Waern at 2006-10-05T16:40:11+00:00 Merge with changes to ghc HEAD - - - - - 3058c8f5 by David Waern at 2006-10-05T16:41:02+00:00 Comment fixes - - - - - b9c217ec by David Waern at 2006-10-05T16:49:59+00:00 Filter out more builtin type constructors from warning messages - - - - - 67e7d252 by David Waern at 2006-10-05T19:38:22+00:00 Refactoring -- better structured pass1 - - - - - cd21c0c1 by David Waern at 2006-10-05T19:44:42+00:00 Remove read/dump interface flags - - - - - 313f9e69 by David Waern at 2006-10-05T19:49:26+00:00 Remove unused pretty printing - - - - - 480f09d1 by David Waern at 2006-12-28T13:22:24+00:00 Update to build with latest GHC HEAD - - - - - 63dccfcb by David Waern at 2007-01-05T01:38:45+00:00 Fixed a bug so that --ghc-flag works correctly - - - - - 3117dadc by David Waern at 2006-12-29T18:53:39+00:00 Automatically get the GHC lib dir - - - - - 9dc84a5c by David Waern at 2006-12-29T19:58:53+00:00 Comments - - - - - 0b0237cc by David Waern at 2007-01-05T16:48:30+00:00 Collect docs based on SrcLoc, syncing with removal of DeclEntity from GHC - - - - - a962c256 by David Waern at 2007-01-05T17:02:47+00:00 Add tabs in haddock.cabal - - - - - 0ca30c97 by David Waern at 2007-01-05T17:04:11+00:00 Add GHCUtils.hs - - - - - c0ab9abe by David Waern at 2007-01-10T11:43:08+00:00 Change package name to haddock-ghc, version 0.1 - - - - - 38e18b27 by David Waern at 2007-01-12T12:03:52+00:00 No binder name for foreign exports - - - - - d18587ab by David Waern at 2007-01-12T12:08:15+00:00 Temp record - - - - - ba6251a0 by David Waern at 2007-01-12T18:27:55+00:00 Remove read/dump-interface (again) - - - - - f4ba2b39 by David Waern at 2007-01-12T18:31:36+00:00 Remove DocOption, use the GHC type - - - - - 511be8bd by David Waern at 2007-01-12T18:32:41+00:00 Use exceptions instead of Either when loading package info - - - - - 0f2144d8 by David Waern at 2007-01-12T18:33:23+00:00 Small type change - - - - - 77507eb7 by David Waern at 2007-01-12T18:33:59+00:00 Remove interface file read/write - - - - - 0ea1e14f by David Waern at 2007-01-17T21:40:26+00:00 Add trace_ppr to GHCUtils - - - - - 3878b493 by David Waern at 2007-01-17T21:40:53+00:00 Sort external package modules and build a doc env - - - - - 8dc323fc by David Waern at 2007-01-17T21:42:41+00:00 Remove comment - - - - - f4c5b097 by David Waern at 2007-01-18T23:22:18+00:00 Add haddock-ghc.cabal and remove ghc option pragma in source file - - - - - da242b2c by David Waern at 2007-01-18T23:22:46+00:00 Remove some tabs - - - - - 288ed096 by David Waern at 2007-01-18T23:39:28+00:00 Moved the defaultErrorHandler to scope only over sortAndCheckModules for now - - - - - 4dd150fe by David Waern at 2007-02-03T21:23:56+00:00 Let restrictCons handle infix constructors - - - - - 97893442 by David Waern at 2007-02-04T16:26:00+00:00 Render infix data constructors - - - - - da89db72 by David Waern at 2007-02-04T16:26:33+00:00 CHange project name to Haddock-GHC - - - - - e93d48af by David Waern at 2007-02-04T16:59:08+00:00 Render infix type constructors properly - - - - - 357bc99b by David Waern at 2007-02-04T17:37:08+00:00 Insert spaces around infix function names - - - - - ab6cfc49 by David Waern at 2007-02-04T17:59:54+00:00 Do not list entities without documentation - - - - - 04249c7e by David Waern at 2007-02-04T19:16:25+00:00 Add GADT support (quite untested) - - - - - 2c223f8d by David Waern at 2007-02-04T19:25:10+00:00 Add package file write/save again! - - - - - b07ed218 by David Waern at 2007-02-04T19:33:02+00:00 Comment out minf_iface based stuff - - - - - 953d1fa7 by David Waern at 2007-02-05T00:12:23+00:00 Solve conflicts - - - - - 593247fc by David Waern at 2007-02-06T19:48:48+00:00 Remove -package flag, GHC's can be used instead - - - - - f658ded2 by David Waern at 2007-02-06T20:50:44+00:00 Start for support of ATs - - - - - 97f9e913 by David Waern at 2007-02-06T20:52:27+00:00 Wibble - - - - - 2ce8e4cf by David Waern at 2007-02-16T12:09:49+00:00 Add the DocOptions change - - - - - dee4a9b5 by David Waern at 2007-03-06T01:24:48+00:00 Wibble - - - - - 7cb99d18 by David Waern at 2007-03-06T01:24:58+00:00 Change version to 2.0 and executable name to haddock - - - - - c5aa02bc by David Waern at 2007-03-08T15:59:49+00:00 Go back to -B flag - - - - - 3a349201 by David Waern at 2007-03-09T13:31:59+00:00 Better exception handling and parsing of GHC flags - - - - - 05a69b71 by David Waern at 2007-03-09T17:45:44+00:00 Remove commented-out DocEntity printing - - - - - 755032cb by davve at dtek.chalmers.se at 2007-03-23T23:30:20+00:00 Remove a file that shouldn't be here - - - - - a7077e5f by davve at dtek.chalmers.se at 2007-03-24T03:58:48+00:00 Remove an import - - - - - 6f55aa8b by davve at dtek.chalmers.se at 2007-03-25T00:46:48+00:00 Start work on Haddock API - - - - - f0199480 by davve at dtek.chalmers.se at 2007-03-25T00:56:36+00:00 Prettify some comments - - - - - f952f9d1 by davve at dtek.chalmers.se at 2007-03-25T00:56:53+00:00 Remove ppr in HaddockTypes - - - - - bc594904 by davve at dtek.chalmers.se at 2007-03-25T00:57:53+00:00 Remove commented out doc env inference - - - - - 11ebf08d by davve at dtek.chalmers.se at 2007-03-25T01:23:25+00:00 De-flatten the namespace - - - - - f696b4bc by davve at dtek.chalmers.se at 2007-03-25T03:21:48+00:00 Add missing stuff to API - - - - - 9a2a04c3 by davve at dtek.chalmers.se at 2007-03-25T03:22:02+00:00 Wibble - - - - - 7d04a6d5 by davve at dtek.chalmers.se at 2007-03-25T03:22:08+00:00 Avoid a GHC bug with parseStaticFlags [] - - - - - 4d2820ba by davve at dtek.chalmers.se at 2007-03-26T04:57:01+00:00 Add fall-through case to mkExportItem - - - - - 6ebc8950 by Stefan O'Rear at 2007-03-26T04:14:53+00:00 Add shebang line to Setup.lhs - - - - - 80966ec5 by davve at dtek.chalmers.se at 2007-03-26T05:24:26+00:00 Fix stupid compile error - - - - - 1ea1385d by davve at dtek.chalmers.se at 2007-04-05T17:19:56+00:00 Do save/read of interface files properly - - - - - 0e4f6541 by David Waern at 2007-04-10T21:08:36+00:00 Add version to ghc dependency - - - - - b0499b63 by David Waern at 2007-04-10T21:37:08+00:00 Change package name to haddock - - - - - 9d50d27e by David Waern at 2007-04-24T00:22:14+00:00 Use filepath package instead of FilePath - - - - - 87c7fcdf by David Waern at 2007-07-10T21:03:04+00:00 Add new package dependencies - - - - - 4768709c by David Waern at 2007-07-11T20:37:11+00:00 Follow changes to record constructor representation - - - - - b9a02fee by Simon Marlow at 2007-05-30T14:00:48+00:00 update to compile with the latest GHC & Cabal - - - - - c0ebdc01 by David Waern at 2007-07-11T21:35:45+00:00 Fix conflicts - - - - - 97f7afd4 by David Waern at 2007-07-11T21:52:38+00:00 Follow changes to the GHC API - - - - - a5b7b58f by David Waern at 2007-07-12T20:36:48+00:00 Call parseStaticFlags before newSession - - - - - f7f50dbc by David Waern at 2007-08-01T21:52:58+00:00 Better indentation in haddock.cabal - - - - - d84e52ad by David Waern at 2007-08-02T00:08:18+00:00 Wibble - - - - - a23f494a by David Waern at 2007-08-02T00:08:24+00:00 Be better at trying to load all module dependencies (debugging) - - - - - ee917f13 by David Waern at 2007-08-03T18:48:08+00:00 Load all targets explicitly (checkModule doesn't chase dependencies anymore) - - - - - 5182d631 by David Waern at 2007-08-16T16:48:55+00:00 Finalize support for links to other packages - - - - - dfd1e3da by David Waern at 2007-08-16T16:51:11+00:00 Fix haddock comment errors in Haddock.Types - - - - - 50c0d83e by David Waern at 2007-08-16T16:51:37+00:00 Remove a debug import - - - - - d84b7c2b by David Waern at 2007-08-16T17:06:30+00:00 Rename PackageData to HaddockPackage - - - - - 3b52cb9f by David Waern at 2007-08-16T17:09:42+00:00 Simplify some comments - - - - - 66fa68d9 by David Waern at 2007-08-16T17:11:38+00:00 Comment the HaddockPackage definition - - - - - 8674c761 by David Waern at 2007-08-16T17:25:54+00:00 Improve code layout in Main - - - - - 571a3a0b by David Waern at 2007-08-16T17:32:13+00:00 Remove explict module imports in Main - - - - - d31b3cb0 by David Waern at 2007-08-16T17:36:23+00:00 Correct comments - - - - - 7f8a9f2b by David Waern at 2007-08-16T17:39:50+00:00 Fix layout problems in Haddock.Types - - - - - 9f421d7f by David Waern at 2007-08-17T11:16:48+00:00 Move options out of Main into Haddock.Options - - - - - 80042b63 by David Waern at 2007-08-17T11:26:59+00:00 Small comment/layout fixes - - - - - b141b982 by David Waern at 2007-08-17T11:28:28+00:00 Change project name from Haddock-GHC to Haddock - - - - - dbeb4a81 by David Waern at 2007-08-17T11:41:05+00:00 Add top module comment to all files - - - - - ce99cc9e by David Waern at 2007-08-17T14:53:04+00:00 Factor out typechecking phase into Haddock.Typecheck - - - - - 6bf75d9e by David Waern at 2007-08-17T16:55:35+00:00 Factor out package code to Haddock.Packages - - - - - b396db37 by David Waern at 2007-08-29T22:40:23+00:00 Major refactoring - - - - - 3d4f95ee by David Waern at 2007-08-29T23:26:24+00:00 Rename HaddockModule to Interface and a few more refactorings - - - - - c55326db by David Waern at 2007-08-29T23:48:03+00:00 Some comment cleanup - - - - - 9a84fc46 by David Waern at 2007-08-29T23:49:29+00:00 Add some modules that I forgot to add earlier - - - - - 4536dce2 by David Waern at 2007-08-29T23:55:24+00:00 Wibble - - - - - 9b7f0206 by David Waern at 2007-08-30T16:03:29+00:00 Wibble - - - - - c52c050a by David Waern at 2007-08-30T16:30:37+00:00 Rename HaddockModule to Interface - - - - - eae2995f by David Waern at 2007-08-30T16:42:59+00:00 Simplify createInterfaces - - - - - 53f99caa by David Waern at 2007-09-29T00:04:31+00:00 Add build-type: Simple to the cabal file - - - - - 0d3103a8 by David Waern at 2007-09-29T00:04:58+00:00 Add containers and array dependency - - - - - 6acf5f30 by David Waern at 2007-09-29T00:13:36+00:00 Prettify the cabal file - - - - - 87c1e378 by David Waern at 2007-09-29T13:16:39+00:00 FIX: consym data headers with more than two variables - - - - - b67fc16a by David Waern at 2007-09-29T14:01:32+00:00 FIX: prefix types used as operators should be quoted - - - - - a8f925bc by David Waern at 2007-09-29T14:02:26+00:00 Use isSymOcc from OccName instead of isConSym - - - - - fc330701 by David Waern at 2007-09-29T14:15:37+00:00 Use isLexConSym/isLexVarSym from OccName - - - - - e4f3dbad by David Waern at 2007-09-29T15:01:08+00:00 FIX: do not quote varsym type operators - - - - - 402207d2 by David Waern at 2007-09-29T15:01:50+00:00 Wibble - - - - - f9d89ef0 by David Waern at 2007-09-29T15:17:40+00:00 Take care when pp tyvars - add parens on syms - - - - - 849e2a77 by David Waern at 2007-10-01T21:56:39+00:00 Go back to using a ModuleMap instead of LookupMod - fixes a bug - - - - - 549dbac6 by David Waern at 2007-10-02T01:05:19+00:00 Improve parsing of doc options - - - - - a36021b8 by David Waern at 2007-10-02T23:05:00+00:00 FIX: double arrows in constructor contexts - - - - - d03bf347 by David Waern at 2007-10-09T16:14:05+00:00 Add a simple test suite - - - - - c252c140 by David Waern at 2007-10-17T16:02:28+00:00 Add --optghc=.. style flag passing to GHC - - - - - cce6c1b3 by David Waern at 2007-10-18T22:03:20+00:00 Add support for --read-interface again - - - - - 33d059c0 by David Waern at 2007-10-18T22:30:18+00:00 Refactoring -- get rid of Haddock.Packages - - - - - f9ed0a4c by David Waern at 2007-10-18T22:34:36+00:00 Name changes - - - - - 8a1c816f by David Waern at 2007-10-20T14:24:23+00:00 Add --ghc-version option - - - - - 4925aaa1 by David Waern at 2007-10-21T14:34:26+00:00 Add some Outputable utils - - - - - 69e7e47f by David Waern at 2007-10-21T14:35:49+00:00 FIX: Ord for OrdName was not comparing modules - - - - - 5a4ae535 by David Waern at 2007-10-21T21:18:48+00:00 Wibble - - - - - 03d48e20 by David Waern at 2007-10-24T15:52:56+00:00 Remove Main from "other modules" - - - - - c66f6d82 by David Waern at 2007-10-24T16:37:18+00:00 Make it possible to run haddock on itself - - - - - 21d156d8 by David Waern at 2007-10-25T14:02:14+00:00 Don't set boot modules as targets - - - - - f8bcf91c by David Waern at 2007-10-31T22:11:17+00:00 Add optimisation flags - - - - - 7ac758f2 by David Waern at 2007-11-04T09:48:28+00:00 Go back to loading only targets (seems to work now) - - - - - 4862aae1 by David Waern at 2007-11-05T22:24:57+00:00 Do full compilation of modules -- temporary fix for GHC API problem - - - - - 697e1517 by David Waern at 2007-11-05T22:25:50+00:00 Don't warn about not being able to link to wired/system/builtin-names - - - - - 892186da by David Waern at 2007-11-06T00:49:21+00:00 Filter out instances with TyCons that are not exported - - - - - 9548314c by David Waern at 2007-11-06T09:37:14+00:00 Wibble - - - - - 5cafd627 by David Waern at 2007-11-08T01:43:07+00:00 Filter out all non-vanilla type sigs - - - - - 04621830 by David Waern at 2007-11-08T01:45:13+00:00 Synch loading of names from .haddock files with GHC's name cache - - - - - 88d37f77 by David Waern at 2007-11-08T01:46:21+00:00 Remove commented-out code - - - - - 6409c911 by David Waern at 2007-11-08T01:56:00+00:00 Small bugfix and cleanup in getDeclFromTyCls - - - - - af59d9c2 by David Waern at 2007-11-08T02:08:44+00:00 Remove OrdName stuff - - - - - 3a615e2e by David Waern at 2007-11-08T02:13:41+00:00 Update runtests.hs following changes to haddock - - - - - 01f3314e by David Waern at 2007-11-08T02:33:01+00:00 Complain if we can't link to wired-in names - - - - - fcafb5d1 by David Waern at 2007-11-09T02:40:16+00:00 Don't exit when there are no file arguments - - - - - 194bc332 by David Waern at 2007-11-09T02:55:37+00:00 Wibble - - - - - dbe4cb55 by David Waern at 2007-11-09T02:56:14+00:00 Wibble - - - - - 82869fda by David Waern at 2007-11-10T17:01:43+00:00 Introduce InstalledInterface structure and add more stuff to the .haddock files We introduce InstalledInterface capturing the part of Interface that is stored in the interface files. We change the ppHtmlContents and ppHtmllIndex to take this structure instead of a partial Interface. We add stuff like the doc map and exported names to the .haddock file (via InstalledInterface). - - - - - d6bb57bf by David Waern at 2007-11-10T17:19:48+00:00 FIX: contents and index should include external package modules when --gen-contents/--gen-index - - - - - e8814716 by David Waern at 2007-11-11T00:29:27+00:00 Remove lDocLinkName and its use in Html backend - - - - - 6f9bd702 by David Waern at 2007-11-11T00:50:57+00:00 Do some refactoring in the html backend This also merges an old patch by Augustsson: Wed Jul 12 19:54:36 CEST 2006 lennart.augustsson at credit-suisse.com * Print type definitions like signatures if given arrows. - - - - - 09d0ce24 by Malcolm.Wallace at 2006-07-20T13:13:57+00:00 mention HsColour in the docs, next to option flags for linking to source code - - - - - 24da6c34 by Malcolm.Wallace at 2006-07-20T13:14:50+00:00 change doc references to CVS to give darcs repository location instead - - - - - 74d52cd6 by David Waern at 2007-11-11T00:55:33+00:00 Update copyright - - - - - fcaa3b4f by Duncan Coutts at 2006-09-08T13:41:00+00:00 Eliminate dep on network by doing a little cut'n'paste haddock depending on the network causes a circular dependency at least if you want to build the network lib with haddock docs. - - - - - 10cc9bda by David Waern at 2007-11-11T02:09:41+00:00 Fix conflicts - - - - - 4e3acd39 by David Waern at 2007-11-11T02:21:19+00:00 Manual merge of a patch from Duncan Coutts that removes the dependency on mtl - - - - - fa9070da by Neil Mitchell at 2006-09-29T15:52:03+00:00 Do not generate an empty table if there are no exports, this fixes a <table></table> tag being generated, which is not valid HTML 4.01 - - - - - d7431c85 by David Waern at 2007-11-11T02:28:50+00:00 Fix conflicts - - - - - f87e8f98 by Simon Marlow at 2006-10-10T11:37:16+00:00 changes for 0.8 - - - - - db929565 by Simon Marlow at 2006-10-10T12:07:12+00:00 fix the name of the source file - - - - - 8220aa4b by Simon Marlow at 2006-10-11T14:17:37+00:00 Rename haddock.js to haddock-util.js haddock.js will be run automatically by Windows when you type 'haddock' if it is found on the PATH, so rename to avoid confusion. Spotted by Adrian Hey. - - - - - 6bccdaa1 by sven.panne at 2006-10-12T15:28:23+00:00 Cabal's sdist does not generate "-src.tar.gz" files, but ".tar.gz" ones - - - - - d3f3fc19 by Simon Marlow at 2006-12-06T16:05:07+00:00 add todo item for --maintainer - - - - - 2da7e269 by Simon Marlow at 2006-12-15T15:52:00+00:00 TODO: do something better about re-exported symbols from another package - - - - - 42d85549 by David Waern at 2007-11-11T02:30:59+00:00 Fix conflicts - - - - - 5e7ef6e5 by Neil Mitchell at 2007-01-11T15:41:15+00:00 Never do spliting index files into many - - - - - f3d4aebe by Neil Mitchell at 2007-01-11T17:07:09+00:00 Add searching on the index page - - - - - bad3ab66 by Neil Mitchell at 2007-01-11T18:17:46+00:00 Delete dead code, now there is only one index page - - - - - cd09eedb by Neil Mitchell at 2007-01-11T18:21:19+00:00 Delete more stuff that is no longer required - - - - - e2806646 by David Waern at 2007-11-11T02:41:53+00:00 Fix conflicts - - - - - a872a823 by Neil Mitchell at 2007-01-11T18:51:43+00:00 Make the index be in case-insensitive alphabetic order - - - - - 8bddd9d7 by Neil Mitchell at 2007-02-06T17:49:12+00:00 Do not create empty tables for data declarations which don't have any constructors, instances or comments. Gets better HTML 4.01 compliance - - - - - 036b8120 by David Waern at 2007-11-11T02:56:58+00:00 Fix conflicts - - - - - f50c1639 by Conal Elliott at 2007-02-14T21:54:00+00:00 added substitution %{FILE///c} - - - - - 402e166a by David Waern at 2007-11-11T03:35:46+00:00 Manual merge of old patch: Sat Apr 21 04:36:43 CEST 2007 Roberto Zunino <zunrob at users.sf.net> * URL expansion for %%, %L, %{LINE} - - - - - 2f264fbd by David Waern at 2007-11-11T03:40:33+00:00 Manual merge of an old patch: Thu Apr 19 20:23:40 CEST 2007 Wolfgang Jeltsch <g9ks157k at acme.softbase.org> * bug fix When Haddock was invoked with the --ignore-all-exports flag but the ignore-exports module attribute wasn't used, hyperlinks weren't created for non-exported names. This fix might not be as clean as one would wish (since --ignore-all-exports now results in ignore_all_exports = True *and* an additional OptIgnoreExports option for every module) but at least the bug seems to be resolved now. - - - - - 7d7ae106 by sven.panne at 2007-09-02T12:18:02+00:00 Install LICENSE in the correct place - - - - - 66eaa924 by David Waern at 2007-11-11T19:02:46+00:00 Fix a bug that made haddock loop - - - - - 4ed47b58 by David Waern at 2007-11-11T19:03:09+00:00 Rename java-script file (this wasn't merge correctly) - - - - - d569534a by David Waern at 2007-11-11T19:06:44+00:00 Don't require -B <ghc-libdir> when no argument files Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B <ghc-libdir> to Haddock when there're no source files to process. This is nice when computing contents/index for external packages. - - - - - 373368bc by Neil Mitchell at 2007-01-11T18:22:44+00:00 Change from tabs to spaces in the ppHtmlIndex function - - - - - 6b063a77 by Neil Mitchell at 2007-01-12T12:17:46+00:00 Rewrite much of the index searching code, previously was too slow to execute on the base library with IE, the new version guarantees less than O(log n) operations be performed, where n is the number in the list (before was always O(n)) - - - - - bfad00b7 by David Waern at 2007-11-11T23:33:53+00:00 Fix conflicts - - - - - cd2dcc09 by Neil Mitchell at 2007-01-12T12:25:01+00:00 Make the max number of results 75 instead of 50, to allow map searching in the base library to work - - - - - 3ae74764 by Neil Mitchell at 2007-01-12T12:58:17+00:00 Make the search box in a form so that enter does the default search - - - - - 142103e5 by David Waern at 2007-11-12T00:03:18+00:00 Merge patch from the old branch: Fri Aug 31 13:21:45 CEST 2007 Duncan Coutts <duncan at haskell.org> * Add category: Development to .cabal file Otherwise it appears on the hackage website in the "Unclassified" category. - - - - - 22ec2ddb by David Waern at 2007-11-25T01:55:29+00:00 A a list of small improvements to the TODO file - - - - - eb0129f4 by Wolfgang Jeltsch at 2007-12-03T23:47:55+00:00 addition of type equality support (at least for HTML generation) - - - - - 816a7e22 by David Waern at 2007-12-08T15:46:26+00:00 Handle class operators correctly when rendering predicates - - - - - 68baaad2 by David Waern at 2007-12-08T16:15:54+00:00 Code layout changes - - - - - 09b77fb4 by David Waern at 2007-12-08T16:16:03+00:00 Handle infix operators correctly in the Type -> HsType translation - - - - - 31c36da2 by David Waern at 2007-12-08T16:24:27+00:00 Add ppLParendTypes/ppLParendType - - - - - b17cc818 by David Waern at 2007-12-08T16:26:12+00:00 Use ppParendType when printing types args in predicates - - - - - ffd1f2cf by David Waern at 2007-12-08T16:45:06+00:00 Fix rendering of instance heads to handle infix operators This is also a refactoring to share this code for rendering predicates. - - - - - ff886d45 by David Waern at 2007-12-08T17:27:46+00:00 Fix rendering of class operators - - - - - e2fcbb9e by David Waern at 2007-12-08T17:59:28+00:00 Fix a bug (use ppTyName instead of ppName to print names in type apps) - - - - - 79a1056e by David Waern at 2007-12-08T21:25:18+00:00 Update tests - - - - - 867741ac by David Waern at 2007-12-08T21:25:49+00:00 Give a diff on test failure - - - - - 7e5eb274 by David Waern at 2008-01-05T14:33:45+00:00 Add DrIFT commands - - - - - 3656454d by David Waern at 2008-01-05T20:26:00+00:00 Add "cabal-version: >= 1.2" to the cabal file - - - - - 77974efc by Simon Marlow at 2007-12-20T09:52:44+00:00 add an item - - - - - f6ac1708 by Simon Marlow at 2007-12-06T14:00:10+00:00 Source links must point to the original module, not the referring module - - - - - eda1d5c9 by David Waern at 2008-01-06T14:40:52+00:00 Manual merge of a patch to the 0.8 branch Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar at microsoft.com> * Source links must point to the original module, not the referring module - - - - - 378f4085 by David Waern at 2008-01-06T16:03:45+00:00 Change stability from stable to experimental - - - - - 8bdafe44 by David Waern at 2008-01-06T16:14:22+00:00 Add haskell.vim (it had been removed somehow) - - - - - ea34d02e by David Waern at 2008-01-06T16:36:57+00:00 Change version to 2.0.0.0 - - - - - 34631ac0 by David Waern at 2008-01-06T16:44:57+00:00 Add missing modules to the cabal file - - - - - 9e142935 by David Waern at 2008-01-06T17:25:42+00:00 Depend on ghc >= 6.8.2 && < 6.9 - - - - - 59f9eeaa by Simon Marlow at 2007-12-20T10:43:04+00:00 add build scripts - - - - - 1c29ae30 by Simon Marlow at 2007-12-20T10:47:07+00:00 update version number - - - - - fe16a3e4 by Simon Marlow at 2007-12-20T10:48:03+00:00 update version - - - - - f688530f by Simon Marlow at 2007-12-20T10:48:29+00:00 doc updates - - - - - ce71b611 by David Waern at 2008-01-07T13:46:32+00:00 Change version in docs and spec - - - - - 03ab8d6f by David Waern at 2008-01-07T13:47:38+00:00 Manually merge over changes to CHANGES for 0.9 - - - - - 39f1b042 by David Waern at 2008-01-07T15:17:41+00:00 Remove the -use-package flag, we don't support it anyway - - - - - 7274a544 by David Waern at 2008-01-07T15:33:05+00:00 Update CHANGES for 2.0.0.0 - - - - - 96594f5d by David Waern at 2008-01-07T15:46:49+00:00 Wibble - - - - - f4c5a4c4 by David Waern at 2008-01-07T15:55:36+00:00 Change url to repo in documentation - - - - - 8a4c77f0 by David Waern at 2008-01-07T16:00:54+00:00 Update CHANGES - - - - - cb3a9288 by David Waern at 2008-01-07T16:02:55+00:00 Documentation fix - - - - - d8e45539 by David Waern at 2008-01-07T16:12:00+00:00 Update docs to say that Haddock accets .lhs files and module names - - - - - 4b5ce824 by David Waern at 2008-01-07T16:12:25+00:00 Document -B option - - - - - 47274262 by David Waern at 2008-01-07T16:23:07+00:00 Update CHANGES - - - - - 7ff314a9 by David Waern at 2008-01-07T16:23:20+00:00 Remove --use-package, --package & --no-implicit.. flags from docs - - - - - 6c3819c0 by David Waern at 2008-01-07T16:23:52+00:00 Remove --no-implicit-prelide flag - - - - - 1b14ae40 by David Waern at 2008-01-07T16:32:26+00:00 Update the "Using literate or pre-processed source" section - - - - - 0117f620 by David Waern at 2008-01-07T16:41:55+00:00 Document the --optghc flag - - - - - 087ab1cf by David Waern at 2008-01-07T16:42:10+00:00 Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 - - - - - 7253951e by David Waern at 2008-01-07T16:48:40+00:00 Document OPTIONS_HADDOCK - - - - - 3b6bdcf6 by David Waern at 2008-01-07T16:56:54+00:00 Wibble - - - - - 3025adf9 by David Waern at 2008-01-07T17:08:14+00:00 Wibble - - - - - 5f30f1a0 by David Waern at 2008-01-07T17:15:44+00:00 Change synopsis field to description - - - - - 1673f54b by David Waern at 2008-01-07T17:18:21+00:00 Change my email address in the cabal file - - - - - 55aa9808 by David Waern at 2008-01-07T18:18:02+00:00 Add documentation for readInterfaceFile - - - - - eaea417f by David Waern at 2008-01-07T18:21:30+00:00 Export necessary stuff from Distribution.Haddock - - - - - 7ea18759 by David Waern at 2008-01-07T18:31:49+00:00 Remove dep on Cabal - - - - - 7b79c74e by David Waern at 2008-01-07T18:33:49+00:00 Remove dep on process - - - - - ce3054e6 by David Waern at 2008-01-16T23:01:21+00:00 Add feature-requsts from Henning Thielemann to TODO - - - - - 0c08f1ec by David Waern at 2008-01-16T23:03:02+00:00 Record a bug in TODO - - - - - b04605f3 by David Waern at 2008-01-23T16:59:06+00:00 Add a bug reported by Ross to TODO - - - - - 5b17c030 by David Waern at 2008-01-23T18:05:53+00:00 A a bug report to TODO - - - - - 1c993b0d by David Waern at 2008-01-25T16:30:25+00:00 Accept test output - - - - - c22fc0d0 by David Waern at 2008-01-25T16:34:49+00:00 Accept test output - - - - - 4b795811 by David Waern at 2008-01-25T16:38:37+00:00 Change Hidden.hs (test) to use OPTIONS_HADDOCK - - - - - c124dbd9 by David Waern at 2008-01-25T16:39:23+00:00 Accept test output - - - - - ec6f6eea by David Waern at 2008-01-25T16:42:08+00:00 Add Hidden.html.ref to tests - - - - - 1dc9610c by David Waern at 2008-02-02T20:50:51+00:00 Add a comment about UNPACK bug in TODO - - - - - 2d3f7081 by David Waern at 2008-02-09T22:33:24+00:00 Change the representation of DocNames Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented. - - - - - 0f28c921 by David Waern at 2008-02-09T23:00:36+00:00 H.GHC.Utils: remove unused imports/exports - - - - - 0c44cad5 by David Waern at 2008-02-10T00:28:13+00:00 H.GHC.Utils: add some functions that were removed by mistake - - - - - e3452f49 by David Waern at 2008-02-10T00:28:48+00:00 Fix some trivial warnings in H.InterfaceFile - - - - - a6d74644 by David Waern at 2008-02-10T00:48:06+00:00 Update the version message to fit in small terminals - - - - - 76c9cd3e by David Waern at 2008-02-10T14:47:39+00:00 Remove bugs from TODO that don't apply anymore since the port - - - - - 5e10e090 by David Waern at 2008-02-10T15:22:47+00:00 Remove bugs from TODO that weren't actual bugs - - - - - fef70878 by David Waern at 2008-02-10T15:23:44+00:00 Remove yet another item from TODO that was not an actual bug - - - - - e1af47b8 by David Waern at 2008-02-11T10:25:57+00:00 Bump the version number to 2.1.0 Since the exported datatype DocName has changed, we need to bump the major version number. Let's also drop the fourth version component, it's not that useful. - - - - - e3be7825 by David Waern at 2008-04-11T14:29:04+00:00 Add a bug to TODO - - - - - cb6574be by David Waern at 2008-04-11T16:00:45+00:00 Use the in-place haddock when running tests - - - - - c6d7af0d by David Waern at 2008-04-11T16:09:16+00:00 Turn off GHC warnings when running tests - - - - - 7f61b546 by David Waern at 2008-04-11T17:24:00+00:00 Add a flag for turning off all warnings - - - - - 883b8422 by David Waern at 2008-04-12T14:02:18+00:00 Fix printing of data binders - - - - - 2a0db8fc by David Waern at 2008-04-12T18:52:46+00:00 Fix missing parenthesis in constructor args bug - - - - - 1b3ac3f9 by David Waern at 2008-04-12T18:57:23+00:00 Simplify test suite and add tests I move all tests into one single directory to simplify things, and add a test for the last bug that was fixed. - - - - - 8f178376 by David Waern at 2008-04-12T19:00:15+00:00 Add a script for copying test output to "expected" output - - - - - 193e3a03 by David Waern at 2008-04-12T19:16:37+00:00 Remove two fixed bugs from TODO - - - - - ddc9130c by David Waern at 2008-04-12T19:37:06+00:00 Update test README - - - - - 956069c0 by David Waern at 2008-05-01T12:16:14+00:00 Update version number in spec and docs - - - - - 5478621c by David Waern at 2008-05-01T12:28:12+00:00 Remove claim of backwards compatibility from docs for readInterfaceFile - - - - - 4a16dea9 by David Waern at 2008-05-01T12:33:04+00:00 Update CHANGES - - - - - 804216fb by David Waern at 2008-05-01T12:43:16+00:00 Add a synopsis - - - - - fd0c84d5 by David Waern at 2008-05-01T12:44:44+00:00 Add Haddock.DocName to the cabal file - - - - - 9f4a7439 by David Waern at 2008-05-01T12:45:53+00:00 Remove -fglasgow-exts and -fasm - - - - - aee7c145 by David Waern at 2008-05-01T12:54:01+00:00 Add LANGUAGE pragmas to source files - - - - - 9a58428b by David Waern at 2008-05-01T12:54:19+00:00 Add extensions to cabal file - - - - - 494f1bee by David Waern at 2008-05-01T13:12:09+00:00 Export DocName in the API - - - - - c938196b by David Waern at 2008-05-01T13:12:19+00:00 Add hide options to some source files - - - - - 236e86af by Neil Mitchell at 2008-06-07T20:45:10+00:00 Rewrite the --hoogle flag support - - - - - 6d910950 by Neil Mitchell at 2008-06-14T10:56:50+00:00 Simplify the newtype/data outputting in Hoogle, as haddock does it automatically - - - - - f87a95a8 by Neil Mitchell at 2008-06-14T12:10:18+00:00 Add initial structure for outputting documentation as well, but does not yet output anything - - - - - 7c3bce54 by Neil Mitchell at 2008-06-14T12:27:07+00:00 Remove <document comment> from the Hoogle output - - - - - 9504a325 by Neil Mitchell at 2008-06-16T06:33:21+00:00 Default to "main" if there is no package, otherwise will clobber hoogle's hoogle info - - - - - 4a794a79 by Neil Mitchell at 2008-06-16T06:53:29+00:00 Change packageName to packageStr, as it better reflects the information stored in it - - - - - 7abc9baf by Neil Mitchell at 2008-06-16T07:09:49+00:00 Add modulePkgInfo to Haddock.GHC.Utils, which gives back package name and version info - - - - - 8ca11514 by Neil Mitchell at 2008-06-16T07:13:48+00:00 Change Hoogle to take the package name and package version separately - - - - - a6da452d by Neil Mitchell at 2008-06-18T11:29:46+00:00 In Hoogle do not list things that are not local to this module - - - - - 974b76b7 by David Waern at 2008-06-19T18:40:13+00:00 Be more consistent with GHC API naming in H.GHC.Utils - - - - - 2facb4eb by David Waern at 2008-06-19T19:03:03+00:00 Update test output - - - - - c501de72 by David Waern at 2008-06-26T20:26:49+00:00 Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. - - - - - ac4c6836 by David Waern at 2008-06-26T20:33:08+00:00 Update CHANGES - - - - - 9d21c60a by David Waern at 2008-06-26T20:34:53+00:00 Update README - - - - - 741448f0 by David Waern at 2008-06-26T21:12:57+00:00 Improve wording in the help message - - - - - b1b42b11 by David Waern at 2008-06-30T10:16:17+00:00 Rename ForeignType - - - - - 6d6c2b34 by David Waern at 2008-06-30T10:25:09+00:00 Rename TyFamily - - - - - 8d1125ed by David Waern at 2008-06-30T10:37:21+00:00 Rename type patterns - - - - - 7610a4cb by David Waern at 2008-06-30T10:45:07+00:00 Rename associated types - - - - - 8eeba14c by David Waern at 2008-06-30T10:47:41+00:00 Remove the TODO file now that we have a trac - - - - - 1af5b25b by David Waern at 2008-07-02T18:19:28+00:00 Render type family declarations (untested) - - - - - ceb99797 by David Waern at 2008-07-02T18:24:06+00:00 Remove redundant check for summary when rendering data types - - - - - b36a58e0 by David Waern at 2008-07-02T22:01:38+00:00 More support for type families and associated types Now we just need to render the instances - - - - - 78784879 by David Waern at 2008-07-07T22:13:58+00:00 Remove filtering of instances We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later. - - - - - 3e758dad by David Waern at 2008-06-30T18:50:30+00:00 Run haddock in-place during testing - - - - - d9dab0ce by David Waern at 2008-07-08T21:04:32+00:00 Remove index.html and doc-index.html from output, they should not be versioned - - - - - 3e6c4681 by David Waern at 2008-07-08T21:06:42+00:00 Update test output following change to instance filtering - - - - - e34a3f14 by David Waern at 2008-07-12T16:48:28+00:00 Stop using the map from exported names to declarations During creation of the interface, we were using two maps: one from exported names to declarations, and one from all defined names in the module to declarations. The first contained subordinate names while the second one didn't. The first map was never used to look up names not defined in the associated module, so if we add subordinate names to the second map, we could use it everywhere. That's that this patch does. This simplifies code because we don't have to pass around two maps everywhere. We now store the map from locally defined things in the interface structure instead of the one from exported names. - - - - - 2e1d2766 by David Waern at 2008-07-12T16:55:21+00:00 Get the all locally defined names from GHC API We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API. - - - - - bf637994 by David Waern at 2008-07-13T13:09:16+00:00 Refactoring in H.Interface.Create We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names). - - - - - 547e410e by David Waern at 2008-07-13T13:34:51+00:00 Remove FastString import and FSLIT macro in H.I.Create -- they were unused - - - - - 693759d1 by David Waern at 2008-07-13T13:36:23+00:00 Remove unused import from H.I.Create - - - - - cde6e7fb by David Waern at 2008-07-13T13:51:54+00:00 Small touches - - - - - 96de8f1d by David Waern at 2008-07-20T11:21:46+00:00 Preparation for rendering instances as separate declarations We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet. - - - - - b0f824fb by David Waern at 2008-07-20T15:53:08+00:00 Follow changes to ExportDecl in Hoogle - - - - - 1192eff3 by Neil Mitchell at 2008-06-26T00:28:10+00:00 Change how the Hoogle backend outputs classes, adding the context in - - - - - 7a0d1464 by Neil Mitchell at 2008-06-26T00:28:46+00:00 Remove the indent utility function from Hoogle backend - - - - - 3361241b by Neil Mitchell at 2008-06-26T09:45:09+00:00 Add support for Hoogle writing ForeignImport/ForeignExport properly - - - - - 795ad3bf by Neil Mitchell at 2008-06-26T12:15:25+00:00 Flesh out the Hoogle code to render documentation - - - - - 23277995 by Neil Mitchell at 2008-06-26T14:56:41+00:00 Fix a bug in the Hoogle backend, unordered lists were being written out <ul>...</u> - - - - - db739b27 by Neil Mitchell at 2008-06-26T15:09:54+00:00 Remove any white space around a <li> element - - - - - f2e6bb8c by Neil Mitchell at 2008-07-10T15:30:47+00:00 Remove the TODO in the Hoogle HTML generation, was already done - - - - - 693ec9a3 by Neil Mitchell at 2008-07-10T15:53:00+00:00 Put brackets round operators in more places in the Hoogle output - - - - - 842313aa by Neil Mitchell at 2008-07-10T16:01:25+00:00 Print type signatures with brackets around the name - - - - - cf93deb0 by David Waern at 2008-07-20T17:04:22+00:00 Bump version number to 2.2.0 - - - - - 30e6a8d1 by David Waern at 2008-07-20T17:04:41+00:00 Resolve conflicts in H.B.Hoogle - - - - - 1f0071c9 by David Waern at 2008-07-23T23:05:01+00:00 Add "all" command to runtests.hs that runs all tests despite failures - - - - - f2723023 by David Waern at 2008-07-23T23:08:39+00:00 Update tests/README - - - - - c0304a11 by David Waern at 2008-07-23T23:21:15+00:00 Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. - - - - - 88a5fe71 by David Waern at 2008-07-23T23:54:16+00:00 Depend on the currently available ghc-paths versions only - - - - - 8738d97b by David Waern at 2008-07-24T10:50:44+00:00 FIX haskell/haddock#44: Propagate parenthesis level when printing documented types - - - - - 05339119 by David Waern at 2008-07-24T16:06:18+00:00 Drop unnecessary parenthesis in types, put in by the user We were putting in parenthesis were the user did. Let's remove this since it just clutters up the types. The types are readable anyway since we print parens around infix operators and do not rely on fixity levels. When doing this I discovered that we were relying on user parenthesis when printin types like (a `O` b) c. This patchs fixes this problem so that parenthesis are always inserted around an infix op application in case it is applied to further arguments, or if it's an arguments to a type constructor. Tests are updated. - - - - - b3a99828 by David Waern at 2008-07-24T10:19:43+00:00 Print parenthesis around non-atomic banged types Fixes half of haskell/haddock#44 - - - - - ab5238e0 by David Waern at 2008-07-24T22:07:49+00:00 Add a reference file for the TypeFamilies test - - - - - 1941cc11 by David Waern at 2008-07-25T17:15:53+00:00 Simplify definition of pretty and trace_ppr - - - - - e3bfa33c by David Waern at 2008-07-25T17:18:27+00:00 Warning messages Output a warning when filtering out data/type instances and associated types in instances. We don't show these in the documentation yet, and we need to let the user know. - - - - - 9b85fc89 by David Waern at 2008-07-25T17:45:40+00:00 Doc: Mention Hoogle in the Introduction - - - - - afb2dd60 by David Waern at 2008-07-25T17:49:00+00:00 Doc: update -B description - - - - - 584c0c91 by David Waern at 2008-07-25T18:11:38+00:00 Doc: describe -w flag - - - - - 77619c24 by David Waern at 2008-07-28T12:29:07+00:00 Remove TODO from cabal file - - - - - 96717d5f by David Waern at 2008-07-28T12:29:27+00:00 Support type equality predicates - - - - - c2fd2330 by David Waern at 2008-07-29T19:45:14+00:00 Move unL from H.B.Hoogle to H.GHC.Utils I like Neil's shorter unL better than unLoc from the GHC API. - - - - - c4c3bf6a by David Waern at 2008-07-29T19:47:36+00:00 Do not export ATs when not in list of subitems - - - - - bf9a7b85 by David Waern at 2008-08-03T11:42:59+00:00 Filter out ForeignExports - - - - - df59fcb0 by David Waern at 2008-08-03T14:02:51+00:00 Filter out more declarations The previous refactorings in H.I.Create introduced a few bugs. Filtering of some types of declarations that we don't handle was removed. This patch fixes this. - - - - - 2f8a958b by David Waern at 2008-08-03T15:24:07+00:00 Move reL to H.GHC.Utils so we can use it everywhere - - - - - 8ec15efd by David Waern at 2008-08-03T15:25:00+00:00 Use isVanillaLSig from GHC API instead of home brewn function - - - - - 300f93a2 by David Waern at 2008-08-03T15:25:27+00:00 Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. - - - - - 8776d1ec by David Waern at 2008-08-03T16:21:21+00:00 Filter out more declarations and keep only vanilla type sigs in classes - - - - - ea07eada by David Waern at 2008-08-03T16:48:00+00:00 Fix layout - - - - - dd5e8199 by David Waern at 2008-08-03T16:50:52+00:00 Move some utility functions from H.I.Create to H.GHC.Utils - - - - - 4a1dbd72 by David Waern at 2008-08-03T17:39:55+00:00 Do not filter out doc declarations - - - - - 0bc8dca4 by David Waern at 2008-08-03T17:47:26+00:00 Filter out separately exported ATs (take two) - - - - - af970fe8 by David Waern at 2008-08-03T22:39:17+00:00 Update CHANGES - - - - - 5436ad24 by David Waern at 2008-08-03T22:40:20+00:00 Bump version number to 2.2.1 - - - - - d66de448 by David Waern at 2008-08-05T19:00:32+00:00 Remove version restriction on ghc-paths - - - - - 534b1364 by David Waern at 2008-08-05T19:04:35+00:00 Bump version to 2.2.2 and update CHANGES - - - - - 549188ff by David Waern at 2008-08-05T19:16:49+00:00 Fix CHANGES - - - - - 0d156bb4 by Luke Plant at 2008-08-11T15:20:59+00:00 invoking haddock clarification and help - - - - - 748295cc by David Waern at 2008-08-11T18:56:37+00:00 Doc: say that the --hoogle option is functional - - - - - 43301db4 by David Waern at 2008-08-05T19:26:08+00:00 Change ghc version dependency to >= 6.8.2 - - - - - 3e5a53b6 by David Waern at 2008-08-10T22:42:05+00:00 Make H.GHC.Utils build with GHC HEAD - - - - - 7568ace0 by David Waern at 2008-08-11T19:41:54+00:00 Import Control.OldException instead of C.Exception when using ghc >= 6.9 We should really test for base version instead, but I don't currently know which version to test for. - - - - - b71ae991 by David Waern at 2008-08-12T22:40:39+00:00 Make our .haddock file version number depend on the GHC version We need to do this, since our .haddock format can potentially change whenever GHC's version changes (even when only the patchlevel changes). - - - - - 6307ce3f by David Waern at 2008-08-12T22:49:57+00:00 Remove matching on NoteTy in AttachInstances, it has been removed - - - - - 2dbcfd5f by David Waern at 2008-08-12T23:02:02+00:00 Comment out H.GHC.loadPackages - it is unused and doesn't build with ghc >= 6.9 - - - - - c74db5c2 by David Waern at 2008-08-12T23:03:58+00:00 Hide <.> from GHC import in Hoogle only for ghc <= 6.8.3 - - - - - 69a44ebb by David Waern at 2008-08-12T23:11:12+00:00 Follow changes to parseDynamic/StaticFlags - - - - - 5881f3f0 by David Waern at 2008-08-13T21:43:58+00:00 Add __GHC_PATCHLEVEL__ symbol also when building the library - - - - - 8574dc11 by David Waern at 2008-08-13T21:44:17+00:00 Follow move of package string functions from PackageConfig to Module - - - - - c9baa77f by David Waern at 2008-08-13T21:45:29+00:00 Follow extensible exceptions changes - - - - - 9092de15 by David Waern at 2008-08-13T21:46:20+00:00 Update test following Haddock version change - - - - - ebe569a4 by David Waern at 2008-08-13T21:46:54+00:00 Follow changes to parseDynamic- parseStaticFlags in GHC - - - - - b8a5ffd3 by David Waern at 2008-08-13T21:47:36+00:00 Follow changes to Binary in GHC 6.9 - - - - - edfda1cc by David Waern at 2008-08-13T21:50:17+00:00 Change ghc version dependency to >= 6.8.2 && <= 6.9 - - - - - d59be1cf by Neil Mitchell at 2008-08-12T16:02:53+00:00 Output all items, even if they are not defined in this module - ensures map comes from Prelude, not just GHC.Base - - - - - dda93b9f by Neil Mitchell at 2008-08-12T21:37:32+00:00 Add support for type synonyms to Hoogle, was accidentally missing before (woops!) - - - - - b6ee795c by Neil Mitchell at 2008-08-13T14:03:24+00:00 Generalise Hoogle.doc and add a docWith - - - - - 415e1bb2 by Neil Mitchell at 2008-08-13T14:03:46+00:00 Make Hoogle add documentation to a package - - - - - 790a1202 by Neil Mitchell at 2008-08-18T12:52:43+00:00 Use the same method to put out signatures as class methods in the Hoogle backend - - - - - ded37eba by Neil Mitchell at 2008-08-18T12:53:04+00:00 Remove Explicit top-level forall's when pretty-printing signatures - - - - - 6468c722 by Neil Mitchell at 2008-08-20T07:59:13+00:00 Simplify the code by removing not-to-important use of <.> in the Hoogle back end - - - - - 788c3a8b by Neil Mitchell at 2008-08-21T18:20:24+00:00 In the hoogle back end, markup definition lists using <i>, not <b> - - - - - 77d4b000 by Ian Lynagh at 2008-08-14T10:49:14+00:00 Add a Makefile for GHC's build system. Still won't work yet, but we're closer - - - - - 920440d7 by Ian Lynagh at 2008-08-27T18:06:46+00:00 Add haddock.wrapper - - - - - bcda925f by Ian Lynagh at 2008-08-27T18:07:02+00:00 Add a manual Cabal flag to control the ghc-paths dependency - - - - - 04d194e2 by Ian Lynagh at 2008-08-27T20:41:27+00:00 Update extensions in Cabal file Use ScopedTypeVariables instead of PatternSignatures - - - - - 12480043 by Ian Lynagh at 2008-08-27T20:41:55+00:00 Increase the upper bound on the GHC version number - - - - - b1f809a5 by Ian Lynagh at 2008-08-27T21:32:22+00:00 Fix some warnings - - - - - aea0453d by Ian Lynagh at 2008-08-28T14:22:29+00:00 Fixes for using haddock in a GHC build tree - - - - - ad23bf86 by Ian Lynagh at 2008-08-28T21:14:27+00:00 Don't use Cabal wrappers on Windows - - - - - 35858e4c by Ian Lynagh at 2008-08-29T00:07:42+00:00 Fix in-tree haddock on Windows - - - - - c2642066 by Ian Lynagh at 2008-09-03T22:35:53+00:00 follow library changes - - - - - 2eb55d50 by Ian Lynagh at 2008-09-07T18:52:51+00:00 bindist fixes - - - - - 3daa5b59 by Ian Lynagh at 2008-09-10T16:58:18+00:00 We need to tell haddock that its datasubdir is . or it can't find package.conf - - - - - 388fd8c2 by Ian Lynagh at 2008-09-10T19:47:44+00:00 Fix haddock inplace on Windows - - - - - 70a641c1 by Ian Lynagh at 2008-09-10T22:15:44+00:00 Fix installed haddock on Windows - - - - - 83c1e997 by Neil Mitchell at 2008-09-11T10:48:55+00:00 Import GHC.Paths if not IN_GHC_TREE, seems to match the use of GHC.Paths functions much better - - - - - b452519b by Ian Lynagh at 2008-09-12T12:58:24+00:00 Add a LANGUAGE ForeignFunctionInterface pragma - - - - - afbd592c by Ian Lynagh at 2008-09-12T12:59:13+00:00 Wibble imports - - - - - 547ac4ad by Ian Lynagh at 2008-09-14T15:34:22+00:00 Add a "#!/bin/sh" to haddock.wrapper - - - - - f207a807 by Ian Lynagh at 2008-09-15T10:02:32+00:00 Use "exec" when calling haddock in the wrapper - - - - - 2ee68509 by Thomas Schilling at 2008-09-15T09:09:16+00:00 Port Haddock.Interface to new GHC API. This required one bigger change: 'readInterfaceFile' used to take an optional 'Session' argument. This was used to optionally update the name cache of an existing GHC session. This does not work with the new GHC API, because an active session requires the function to return a 'GhcMonad' action, but this is not possible if no session is provided. The solution is to use an argument of functions for reading and updating the name cache and to make the function work for any monad that embeds IO, so it's result type can adapt to the calling context. While refactoring, I tried to make the code a little more self-documenting, mostly turning comments into function names. - - - - - 3bb96431 by Thomas Schilling at 2008-09-15T09:09:37+00:00 Reflect GHC API changes. - - - - - 2e60f714 by Thomas Schilling at 2008-09-15T09:10:37+00:00 Port Haddock.GHC.Typecheck to new GHC API. - - - - - 9cfd4cff by Thomas Schilling at 2008-09-15T09:11:00+00:00 Port Haddock.GHC to new GHC API. - - - - - caffa003 by Thomas Schilling at 2008-09-15T09:11:25+00:00 Port Main to new GHC API. - - - - - 069a4608 by Ian Lynagh at 2008-09-21T11:19:00+00:00 Fix paths used on Windows frmo a GHC tree: There is no whare directory - - - - - 7ceee1f7 by Ian Lynagh at 2008-09-21T12:20:16+00:00 Fix the in-tree haddock on Windows - - - - - 0d486514 by Ian Lynagh at 2008-09-23T18:06:58+00:00 Increase the GHC upper bound from 6.11 to 6.13 - - - - - f092c414 by Neil Mitchell at 2008-09-11T14:56:07+00:00 Do not wrap __ in brackets - - - - - 036bdd13 by Ian Lynagh at 2008-09-28T01:42:35+00:00 Fix building haddock when GhcProfiled=YES - - - - - 01434a89 by David Waern at 2008-09-24T20:24:21+00:00 Add PatternSignatures LANGUAGE pragma to Main and Utils - - - - - 1671a750 by David Waern at 2008-10-02T22:57:25+00:00 For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). - - - - - a25dde99 by David Waern at 2008-10-02T22:59:57+00:00 Remove ifaceEnv from Interface - it's no longer used - - - - - 610993da by David Waern at 2008-10-02T23:04:58+00:00 Write a comment about source links for type instance declarations - - - - - 5a96b5d5 by Thomas Schilling at 2008-10-03T10:45:08+00:00 Follow GHC API change of parseModule. - - - - - 5a943ae5 by Ian Lynagh at 2008-10-03T15:56:58+00:00 TAG 2008-10-03 - - - - - 76cdd6ae by Thomas Schilling at 2008-10-08T12:29:50+00:00 Only load modules once when typechecking with GHC. This still doesn't fix the memory leak since the typechecked source is retained and then processed separately. To fix the leak, modules must be processed directly after typechecking. - - - - - 7074d251 by David Waern at 2008-10-09T23:53:54+00:00 Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. - - - - - 4b9b2b2d by David Waern at 2008-10-09T23:54:49+00:00 Add some strictness annotations in Interface We add some strictness annotations to the fields of Interface, so that less GHC data is hold on to during processing. - - - - - 22035628 by David Waern at 2008-10-10T20:02:31+00:00 Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck - - - - - be637ad3 by David Waern at 2008-10-10T20:33:38+00:00 Make Haddock build with GHC 6.8.2 - - - - - 523b3404 by David Waern at 2008-10-10T21:08:09+00:00 Fix documentation for createInterfaces - - - - - e1556702 by David Waern at 2008-10-10T21:26:19+00:00 Hide H.Utils in library - - - - - a8e751c3 by David Waern at 2008-10-10T21:34:59+00:00 Add back .haddock file versioning based on GHC version It was accidentally removed in the patch for GHC 6.8.2 compatibility - - - - - 06fb3c01 by David Waern at 2008-10-10T21:47:15+00:00 Bump version number to 2.3.0 - - - - - ff087fce by David Waern at 2008-10-10T22:35:49+00:00 Add support for DocPic The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix! - - - - - 3af85bf6 by David Waern at 2008-10-10T23:34:05+00:00 Update tests - - - - - 0966873c by Simon Marlow at 2008-10-10T14:43:04+00:00 no need for handleErrMsg now, we don't throw any ErrMsgs - - - - - f1870de3 by Clemens Fruhwirth at 2008-10-10T13:29:36+00:00 Compile with wrapper but remove it for dist-install - - - - - 7b440dc2 by David Waern at 2008-10-11T14:02:25+00:00 Remove interface from LinksInfo It was there to know the documentation home module when creating a wiki link, but we already know this since we have the DocName. - - - - - e5729e6a by David Waern at 2008-10-15T20:49:18+00:00 Wibble - - - - - b2a8e01a by David Waern at 2008-10-15T21:03:36+00:00 Use type synonyms for declarations and docs in H.I.Create - - - - - be71a15b by David Waern at 2008-10-15T21:12:17+00:00 Comment out unused type family stuff completely - - - - - 91aaf075 by David Waern at 2008-10-15T21:49:04+00:00 Wibble - - - - - 42ba4eb4 by David Waern at 2008-10-15T21:53:53+00:00 Move convenient type synonym to H.Types - - - - - db11b723 by David Waern at 2008-10-15T22:14:07+00:00 Add DeclInfo to H.Types - - - - - 193552b6 by David Waern at 2008-10-15T22:15:01+00:00 Add subordinates with docs to the declaration map The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate. - - - - - 31e6eebc by David Waern at 2008-10-16T17:18:47+00:00 Wibble - - - - - 0dcbd79f by David Waern at 2008-10-16T20:58:42+00:00 Fix haskell/haddock#61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. - - - - - de47f20a by David Waern at 2008-10-16T22:06:35+00:00 Document function and improve its layout - - - - - e74e625a by Thomas Schilling at 2008-10-20T11:12:57+00:00 Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). - - - - - b63ac9a1 by David Waern at 2008-10-20T20:25:50+00:00 Make renamer consistent Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name). - - - - - f6de0bb0 by Ian Lynagh at 2008-09-19T00:54:43+00:00 TAG GHC 6.10 fork - - - - - 74599cd0 by David Waern at 2008-10-20T21:13:24+00:00 Do not save hidden modules in the .haddock file We were saving interfaces of all processed modules including those hidden using {-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links when generating the index for the libraries that come with GHC. This patch excludes modules with hidden documentation when writing .haddock files. It should fix the above problem. - - - - - 7b6742e9 by David Waern at 2008-10-21T19:54:52+00:00 Do not save hidden modules in the .haddock file (also for ghc >= 6.9) When writing the first patch, I forgot to do the fix in both branches of an #if macro. - - - - - b99b1951 by David Waern at 2008-10-22T20:04:18+00:00 Remove subordinate map and its usage It is not needed now that we store subordinate names in the DeclInfo map. - - - - - da97cddc by David Waern at 2008-10-22T20:11:46+00:00 Tidy up code in H.I.Create a little Remove commented out half-done type instance support, and remove DeclWithDoc synonym. - - - - - 6afa76f3 by David Waern at 2008-10-22T21:17:29+00:00 Fix warnings in H.GHC.Utils - - - - - 171ea1e8 by David Waern at 2008-10-22T21:35:04+00:00 Fix warnings in H.Utils - - - - - c8cb3b91 by David Waern at 2008-10-22T21:36:49+00:00 Wibble - - - - - 767fa06a by David Waern at 2008-10-27T19:59:04+00:00 Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. - - - - - e638bbc6 by David Waern at 2008-11-02T22:21:10+00:00 Add HCAR entry - - - - - 92b4ffcf by David Waern at 2008-11-02T22:44:19+00:00 Update CHANGES - - - - - 84d4da6e by David Waern at 2008-11-03T11:25:04+00:00 Add failing test for template haskell crash - - - - - 2a9cd2b1 by David Waern at 2008-11-04T21:13:44+00:00 Add tests/TH.hs - - - - - 8a59348e by David Waern at 2008-11-04T21:30:26+00:00 TAG 2.3.0 - - - - - 54f70d31 by Thomas Schilling at 2008-10-24T17:04:08+00:00 Enable framed view of the HTML documentation. This patch introduces: - A page that displays the documentation in a framed view. The left side will show a full module index. Clicking a module name will show it in the right frame. If Javascript is enabled, the left side is split again to show the modules at the top and a very short synopsis for the module currently displayed on the right. - Code to generate the mini-synopsis for each module and the mini module index ("index-frames.html"). - CSS rules for the mini-synopsis. - A very small amount of javascript to update the mini-synopsis (but only if inside a frame.) Some perhaps controversial things: - Sharing code was very difficult, so there is a small amount of code duplication. - The amount of generated pages has been doubled, since every module now also gets a mini-synopsis. The overhead should not be too much, but I haven't checked. Alternatively, the mini-synopsis could also be generated using Javascript if we properly annotate the actual synopsis. - - - - - 5d7ea5a6 by David Waern at 2008-11-04T23:20:17+00:00 Follow change to ExportDecl in frames code - - - - - 60e16308 by David Waern at 2008-11-04T23:35:26+00:00 Update CHANGES - - - - - d63fd26d by David Waern at 2008-11-04T23:37:43+00:00 Bump version number - - - - - c1660c39 by David Waern at 2008-11-04T23:44:46+00:00 Update CHANGES - - - - - 995ab384 by David Waern at 2008-11-04T23:55:21+00:00 Remove .ref files from tests/output/ - - - - - 1abbbe75 by David Waern at 2008-11-04T23:57:41+00:00 Output version info before running tests - - - - - 649b182f by David Waern at 2008-11-05T22:45:37+00:00 Add ANNOUNCE message - - - - - c36ae0bb by David Waern at 2008-11-05T23:15:35+00:00 Update ANNOUNCE - - - - - 9c4f3d40 by David Waern at 2008-11-05T23:18:30+00:00 Wibble - - - - - 5aac87ce by David Waern at 2008-11-06T21:07:48+00:00 Depend on base 4.* when using GHC >= 6.9, otherwise 3.* - - - - - b9796a74 by David Waern at 2008-11-06T21:13:40+00:00 Bump version to 2.4.1 and update CHANGES - - - - - d4b26baa by David Waern at 2008-11-06T21:26:33+00:00 Depend on base 4.0.* instead of 4.* - - - - - 2cb0903c by David Waern at 2008-11-06T21:46:53+00:00 Fix warnings in H.B.HH and H.B.HH2 - - - - - e568e89a by David Waern at 2008-11-06T21:47:12+00:00 Fix warnings in Haddock.ModuleTree - - - - - 9dc14fbd by David Waern at 2008-11-06T21:47:52+00:00 Fix warnings in Haddock.Version - - - - - 02ac197c by David Waern at 2008-11-06T21:51:31+00:00 Fix warnings in H.InterfaceFile and H.Options - - - - - 63e7439a by David Waern at 2008-11-06T21:59:45+00:00 Fix warnings in H.GHC.Typecheck - - - - - 4bca5b68 by David Waern at 2008-11-08T13:43:42+00:00 Set HscTarget to HscNothing instead of HscAsm There used to be a bug in the GHC API that prevented us from setting this value. - - - - - 07357aec by David Waern at 2008-11-09T22:27:00+00:00 Re-export NameCache and friends from Distribution.Haddock - - - - - ea554b5a by David Waern at 2008-11-09T23:14:10+00:00 Add Haddock.GHC.Utils to other-modules in library - - - - - 74aecfd7 by David Waern at 2008-11-10T01:18:57+00:00 Export DocName in the library - - - - - 241a58b3 by David Waern at 2008-11-10T01:19:18+00:00 Document the functions in H.DocName - - - - - edc2ef1b by David Waern at 2008-11-10T01:20:52+00:00 Export H.DocName in the library - - - - - 4f588d55 by David Waern at 2008-11-10T01:29:14+00:00 Make DocName an instance of NamedThing - - - - - b4647244 by David Waern at 2008-11-15T22:58:18+00:00 Reflect version bump in test suite - - - - - 4bee8ce2 by David Waern at 2008-11-15T22:58:45+00:00 Update tests For unknown reasons, test output for Bug1 and Test has changed for the better. - - - - - 1690e2f9 by David Waern at 2008-11-15T22:59:33+00:00 Store hidden modules in .haddock files We store documentation for an entity in the 'InstalledInterface' of the definition site module, and never in the same structure for a module which re-exports the entity. So when a client of the Haddock library wants to look up some documentation, he/she might need to access a hidden module. But we currently don't store hidden modules in the .haddock files. So we add the hidden modules and the Haddock options to the .haddock files. The options will be used to filter the module list to obtain the visible modules only, which is necessary for generating the contents and index for installed packages. - - - - - 8add6435 by David Waern at 2008-11-16T14:35:50+00:00 Bump major version number due to .haddock file format change - - - - - 48bfcf82 by David Waern at 2008-11-23T14:32:52+00:00 Update tests to account for version number bump - - - - - 0bbd1738 by David Waern at 2008-11-23T14:33:31+00:00 HADDOCK_DATA_DIR changed to haddock_datadir - - - - - 5088b78c by David Waern at 2008-11-23T17:13:21+00:00 FIX haskell/haddock#45: generate two anchors for each name We generate two anchor tags for each name, one where we don't escape the name and one where we URI-encode it. This is for compatibility between IE and Opera. Test output is updated. - - - - - 5ee5ca3b by Neil Mitchell at 2008-11-27T14:38:11+00:00 Drop HsDocTy annotations, they mess up pretty printing and also have a bracketing bug (#2584) - - - - - 51c014e9 by Roman Cheplyaka at 2008-11-27T22:27:36+00:00 Allow referring to a specific section within a module in a module link Fixes haskell/haddock#65 - - - - - 4094bdc5 by David Waern at 2008-11-28T21:13:33+00:00 Update tests following anchor change - - - - - f89552dd by Thomas Schilling at 2008-11-29T16:16:20+00:00 Haddock really shouldn't try to overwrite files. - - - - - 98127499 by David Waern at 2008-12-07T14:09:15+00:00 Solve conflict - - - - - 319356c5 by David Waern at 2008-10-22T21:16:55+00:00 Add -Wall -Werror to ghc-options - - - - - 3c4968c9 by David Waern at 2008-11-04T23:38:56+00:00 TAG 2.4.0 - - - - - 4b21e003 by David Waern at 2008-11-06T21:14:04+00:00 TAG 2.4.1 - - - - - 8e0cad5c by David Waern at 2008-12-07T14:12:54+00:00 Remove -Werror - - - - - 299d6deb by David Waern at 2008-12-07T14:25:18+00:00 Remove -Wall, we'll focus on warnings after 6.10.2 is out - - - - - 5f4216b6 by David Waern at 2008-12-07T20:58:05+00:00 Resolve conflict properly - - - - - 67d774e7 by Neil Mitchell at 2008-12-15T11:44:26+00:00 Make forall's in constructors explicit, i.e. data Foo = Foo {foo :: Eq a => a} - - - - - 61851792 by Neil Mitchell at 2008-12-18T15:39:39+00:00 Try and find a better package name than "main" for Hoogle, goes wrong when working on an executable rather than a library - - - - - 2fab8554 by David Waern at 2008-12-08T23:19:48+00:00 Make visible names from ExportItems Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment. - - - - - 7caadd8c by Ian Lynagh at 2008-12-11T17:01:04+00:00 Wrap the GHC usage with defaultCleanupHandler This fixes a bug where haddock leaves /tmp/ghc* directories uncleaned. - - - - - 7c9fc9a5 by David Waern at 2009-01-02T21:38:27+00:00 Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. - - - - - 119e4e05 by David Waern at 2009-01-06T23:34:17+00:00 Do not process boot modules We should of course not try to produce documentation for boot modules! The reason this has worked in the past is that the output of "real" modules overwrites the output of boot modules later in the process. However, this causes a subtle link environment problem. So let's get rid of this stupid behaviour. We avoid processing boot modules, but we continue to typecheck them. - - - - - c285b9d2 by David Waern at 2009-01-08T18:03:36+00:00 Export modules also when coming from external packages This seems to have regressed since a refactoring that was part of the 2.3.0 release. - - - - - 24031c17 by David Waern at 2009-01-10T15:26:26+00:00 Change version to 2.4.2 - no need to go to 2.5.0 - - - - - 864d1c3f by David Waern at 2009-01-10T15:35:20+00:00 Update tests to account for version number change - - - - - 524ba886 by David Waern at 2009-01-10T18:29:17+00:00 Add test for Template Haskell splicing - - - - - 05e6e003 by David Waern at 2009-01-10T19:35:42+00:00 Fix Trac haskell/haddock#68: Turn on compilation via C for Template Haskell packages We can't use HscNothing if we need to run code coming from modules inside the processed package during typechecking, which is the case for some packages using Template Haskell. This could be improved, to e.g. use HscInterpreted and HscNothing where possible, instead of using HscC for all modules in the package. - - - - - 2b2bafa1 by David Waern at 2009-01-10T20:22:25+00:00 Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above - - - - - bedc3a93 by Ian Lynagh at 2009-01-11T14:58:41+00:00 Fix the location of INPLACE_PKG_CONF; fixes the build Spotted by Conal Elliott - - - - - 943107c8 by David Waern at 2009-01-20T19:27:39+00:00 Document H.I.Create.collectDocs better - - - - - c6252e37 by David Waern at 2009-01-20T19:29:51+00:00 Fix Trac haskell/haddock#59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). - - - - - 3568a6af by David Waern at 2009-01-21T21:41:48+00:00 Do not indicate that a constructor argument is unboxed We only show the strictness annotation for an unboxed constructor argument. The fact that it is unboxed is an implementation detail and should not be part of the module interface. - - - - - 562a4523 by David Waern at 2009-01-22T18:53:49+00:00 Fix Trac haskell/haddock#50: do not attach docs to pragmas or other kinds of non-declarations We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations. - - - - - 6fdf21c2 by David Waern at 2009-01-22T19:48:09+00:00 Add test for quasi quotation. No reference output yet. - - - - - dc4100fd by David Waern at 2009-01-22T19:57:47+00:00 Improve quasi-quotation test and add reference output - - - - - 908b74bb by David Waern at 2009-01-23T23:22:03+00:00 Filter out separately exported associated types in a smarter way - - - - - f6b42ecb by David Waern at 2009-01-24T16:54:39+00:00 Correct spelling mistake in error message - - - - - 24e4245d by David Waern at 2009-01-24T17:48:03+00:00 Correct comment - - - - - b5e8462f by David Waern at 2009-02-07T13:22:29+00:00 Do not show a subordinate at the top level if its parent is also exported See note in the source code for more info. - - - - - 4b09de57 by David Waern at 2009-02-07T13:53:53+00:00 Update test following change to top level subordinates - - - - - 76379896 by David Waern at 2009-02-07T13:58:04+00:00 Remove html files in the tests/output/ directory which have been accidentally added - - - - - 1a6d8b10 by Joachim Breitner at 2009-02-20T10:29:43+00:00 Typo in comment - - - - - fec367d0 by David Waern at 2009-02-24T20:21:17+00:00 Fix small bug The rule is to prefer type constructors to other things when an identifier in a doc string can refer to multiple things. This stopped working with newer GHC versions (due to a tiny change in the GHC renamer). We implement this rule in the HTML backend for now, instead of fixing it in GHC, since we will move renaming of doc strings to Haddock in the future anyway. - - - - - 9b4172eb by David Waern at 2009-02-25T20:04:38+00:00 Fix bad error handling with newer GHCs When support for GHC 6.10 was added, an error handler was installed only around the typechecking phase. This had the effect that errors thrown during dependency chasing were caught in the top-level exception handler and not printed with enough detail. With this patch we wrap the error handler around all our usage of the Ghc monad. - - - - - de2df363 by Simon Peyton Jones at 2009-02-02T16:47:42+00:00 Hide funTyConName, now exported by TypeRep - - - - - 4d40a29f by Ian Lynagh at 2009-02-12T18:57:49+00:00 Don't build the library when building in the GHC tree - - - - - 1cd0abe4 by Ian Lynagh at 2009-02-13T13:58:53+00:00 Add a ghc.mk - - - - - 3d814eeb by Ian Lynagh at 2009-02-13T18:50:28+00:00 do .depend generation for haddock with the stage1 compiler This is a bit of a hack. We mkdepend with stage1 as if .depend depends on the stage2 compiler then make goes wrong: haddock's .depend gets included, which means that make won't reload until it's built, but we can't build it without the stage2 compiler. We therefore build the stage2 compiler before its .depend file is available, and so compilation fails. - - - - - b55036a4 by Ian Lynagh at 2009-02-25T01:38:13+00:00 Give haddock a wrapper on unix in the new GHC build system - - - - - 9eabfe68 by Ian Lynagh at 2009-02-25T19:21:32+00:00 Create inplace/lib/html in the new GHC build system - - - - - 93af30c7 by Ian Lynagh at 2008-11-07T19:18:23+00:00 TAG GHC 6.10.1 release - - - - - 06e6e34a by Thomas Schilling at 2009-02-24T18:11:00+00:00 Define __GHC_PATCHLEVEL__ for recent version of GHC (stable). - - - - - 680e6ed8 by Thomas Schilling at 2009-02-24T18:12:26+00:00 'needsTemplateHaskell' is not defined in current stable GHC. - - - - - 6c5619df by David Waern at 2009-02-25T22:15:23+00:00 Hide fynTyConName only for recent GHC versions - - - - - 6b2344f1 by Ian Lynagh at 2009-02-26T00:49:56+00:00 Add the module to one of haddocks warnings - - - - - e5d11c70 by David Waern at 2009-02-27T21:37:20+00:00 Bug fix We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates. - - - - - 10a79a60 by David Waern at 2009-02-27T22:08:08+00:00 Fix error message conflict The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now. - - - - - c5055c7f by David Waern at 2009-02-27T22:15:17+00:00 Shorten warning message - - - - - a72fed3a by David Waern at 2009-02-28T00:53:55+00:00 Do not show package name in warning message - - - - - a5daccb2 by Ian Lynagh at 2009-03-01T14:59:35+00:00 Install haddock in the new GHC build system - - - - - dfdb025c by Ian Lynagh at 2009-03-07T23:56:29+00:00 Relax base dependency to < 4.2, not < 4.1 - - - - - 5769c8b4 by David Waern at 2009-03-21T14:58:52+00:00 Bump .haddock file version number (due to change of format) - - - - - f1b8f67b by David Waern at 2009-03-21T14:59:26+00:00 Define __GHC_PATCHLEVEL__=1 when using ghc-6.10.1 - - - - - 23f78831 by David Waern at 2009-03-21T16:40:52+00:00 Update CHANGES - - - - - 7d2735e9 by David Waern at 2009-03-21T16:50:33+00:00 Update ANNOUNCE - - - - - 0771e00a by David Waern at 2009-03-21T16:54:40+00:00 Update ANNOUNCE, again - - - - - 81a6942a by David Waern at 2009-03-21T17:50:06+00:00 Don't be too verbose in CHANGES - - - - - 29861dcf by David Waern at 2009-03-21T18:03:31+00:00 TAG 2.4.2 - - - - - a585f285 by David Waern at 2009-03-21T19:20:29+00:00 Require Cabal >= 1.2.3 - - - - - 7c611662 by David Waern at 2009-03-21T19:21:48+00:00 TAG 2.4.2 with cabal-version >= 1.2.3 - - - - - 23b7deff by Simon Marlow at 2009-03-20T15:43:42+00:00 new GHC build system: use shell-wrappers macro - - - - - 25f8afe7 by Ian Lynagh at 2009-03-21T19:13:53+00:00 Fix (with a hack?) haddock in teh new build system - - - - - 6a29a37e by David Waern at 2009-03-24T22:10:15+00:00 Remove unnecessary LANGUAGE pragma - - - - - 954da57d by David Waern at 2009-03-24T22:21:23+00:00 Fix warnings in H.B.DevHelp - - - - - 1619f1df by David Waern at 2009-03-26T23:20:44+00:00 -Wall police in H.B.Html - - - - - b211e13b by Simon Marlow at 2009-03-24T13:00:56+00:00 install Haddock's html stuff - - - - - 78e0b107 by David Waern at 2008-12-07T19:58:53+00:00 Add verbosity flag and utils, remove "verbose" flag - - - - - 913dae06 by David Waern at 2008-12-07T20:01:05+00:00 Add some basic "verbose" mode logging in H.Interface - - - - - 1cbff3bf by David Waern at 2009-03-27T00:07:26+00:00 Fix conflicts - - - - - 22f82032 by David Waern at 2009-03-27T21:15:11+00:00 Remove H.GHC.Typecheck - - - - - 81557804 by David Waern at 2009-03-27T21:19:22+00:00 Remove docNameOrig and use getName everywhere instead - - - - - d8267213 by David Waern at 2009-03-27T21:21:46+00:00 Use docNameOcc instead of nameOccName . getName - - - - - 5d55deab by David Waern at 2009-03-27T21:33:04+00:00 Remove H.DocName and put DocName in H.Types - - - - - 8ba72611 by David Waern at 2009-03-27T22:06:26+00:00 Document DocName - - - - - 605f8ca5 by David Waern at 2009-03-27T22:45:21+00:00 -Wall police - - - - - e4da93ae by David Waern at 2009-03-27T23:12:53+00:00 -Wall police in H.B.Hoogle - - - - - bb255519 by David Waern at 2009-03-27T23:41:28+00:00 Define Foldable and Traversable instances for Located - - - - - f1195cfe by David Waern at 2009-03-27T23:51:34+00:00 Wibble - - - - - 23818d7c by David Waern at 2009-03-28T00:03:55+00:00 -Wall police in H.I.Rename - - - - - 0f050d67 by David Waern at 2009-03-28T00:15:15+00:00 -Wall police in H.I.AttachInstances - - - - - 0f3fe038 by David Waern at 2009-03-28T21:09:41+00:00 Wibble - - - - - 275d4865 by David Waern at 2009-03-28T21:27:06+00:00 Layout fix - - - - - 54ff0ef8 by David Waern at 2009-03-28T21:59:07+00:00 -Wall police in H.I.Create - - - - - 7f58b117 by David Waern at 2009-03-28T22:10:19+00:00 -Wall police in H.Interface - - - - - f0c03b44 by David Waern at 2009-03-28T22:22:59+00:00 -Wall police in Main - - - - - 29da355c by David Waern at 2009-03-28T22:23:39+00:00 Turn on -Wall -Werror - - - - - 446d3060 by David Waern at 2009-04-01T20:40:30+00:00 hlint police - - - - - 3867c9fc by David Waern at 2009-04-01T20:48:42+00:00 hlint police - - - - - bd1f1600 by David Waern at 2009-04-01T20:58:02+00:00 hlint police - - - - - e0e90866 by David Waern at 2009-04-05T12:42:53+00:00 Move H.GHC.Utils to H.GhcUtils - - - - - 9cbd426b by David Waern at 2009-04-05T12:57:21+00:00 Remove Haddock.GHC and move its (small) contents to Main - - - - - b5c2cbfd by David Waern at 2009-04-05T13:07:04+00:00 Fix whitespace and stylistic issues in Main - - - - - 3c04aa56 by porges at 2008-12-07T08:22:19+00:00 add unicode output - - - - - 607918da by David Waern at 2009-04-26T15:09:43+00:00 Resolve conflict - - - - - 4bec6b6b by Simon Marlow at 2009-05-13T10:00:31+00:00 fix markup - - - - - 436ad6f4 by Simon Marlow at 2009-03-23T11:54:45+00:00 clean up - - - - - bdcd1398 by Simon Marlow at 2009-03-24T10:36:45+00:00 new GHC build system: add $(exeext) - - - - - 9c0972f3 by Simon Marlow at 2009-03-24T11:04:31+00:00 update for new GHC build system layout - - - - - d0f3f83a by Ian Lynagh at 2009-03-29T15:31:43+00:00 GHC new build system fixes - - - - - 5a8245c2 by Ian Lynagh at 2009-04-04T20:44:23+00:00 Tweak new build system - - - - - 9c6f2d7b by Simon Marlow at 2009-05-13T10:01:27+00:00 add build instructions for GHC - - - - - 66d07c76 by Ian Lynagh at 2009-05-31T00:37:53+00:00 Quote program paths in ghc.mk - - - - - bb7de2cd by Ian Lynagh at 2009-06-03T22:57:55+00:00 Use a bang pattern on an unlifted binding - - - - - 3ad283fc by Ian Lynagh at 2009-06-13T16:17:50+00:00 Include haddock in GHC bindists - - - - - ac447ff4 by David Waern at 2009-06-24T21:07:50+00:00 Delete Haddock.Exception and move contents to Haddock.Types Only a few lines of code that mainly declares a type - why not just put it in Haddock.Types. - - - - - 4464fb9b by David Waern at 2009-06-24T22:23:23+00:00 Add Haddock module headers Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock at projects.haskell.org. Next step is to add a brief description to each module. - - - - - 5f4c95dd by David Waern at 2009-06-24T22:39:44+00:00 Fix spelling error - - - - - 6d074cdb by David Waern at 2009-06-25T21:53:56+00:00 Document Interface and InstalledInterface better - - - - - d0cbd183 by David Waern at 2009-06-27T12:46:46+00:00 Remove misplaced whitespace in H.I.Rename - - - - - fa381c49 by David Waern at 2009-06-27T13:26:03+00:00 Fix haskell/haddock#104 - create output directory if missing - - - - - 91fb77ae by Ian Lynagh at 2009-06-25T15:59:50+00:00 TAG 2009-06-25 - - - - - 0d853f40 by Simon Peyton Jones at 2009-07-02T15:35:22+00:00 Follow extra field in ConDecl - - - - - b201735d by Ian Lynagh at 2009-07-05T16:50:35+00:00 Update Makefile for the new GHC build system - - - - - df6c0092 by Ian Lynagh at 2009-07-05T17:01:13+00:00 Resolve conflicts - - - - - 1066870a by Ian Lynagh at 2009-07-05T17:01:48+00:00 Remove the -Wwarn hack in the GHC build system - - - - - 7e856076 by Ian Lynagh at 2009-07-05T17:17:59+00:00 Fix warnings - - - - - 5d4cd958 by Ian Lynagh at 2009-07-05T19:35:40+00:00 Bump version number Cabal needs to distinguish between haddocks having a --verbose and --verbosity flag - - - - - 6ee07c99 by David Waern at 2009-07-06T20:14:57+00:00 Wibble - - - - - 2308b66f by David Waern at 2009-07-06T20:24:20+00:00 Clearer printing of versions by runtests.hs - - - - - d4b5d9ab by David Waern at 2009-07-06T21:22:42+00:00 Fix (invisible) bug introduced by unicode patch - - - - - 2caca8d8 by David Waern at 2009-07-06T21:44:10+00:00 Use HscAsm instead of HscC when using TH - - - - - 18f3b755 by David Waern at 2009-07-06T22:10:22+00:00 Update HCAR entry (by Janis) - - - - - a72ac9db by David Waern at 2009-07-06T23:01:35+00:00 Follow HsRecTy change with an #if __GLASGOW_HASKEL__ >= 611 - - - - - 549135d2 by David Waern at 2009-07-06T23:11:41+00:00 Remove unused functions from Haddock.Utils - - - - - b450134a by Isaac Dupree at 2009-07-11T14:59:00+00:00 revert to split-index for large indices - remove the search-box, because browsers have search-for-text abilities anyway. - pick 150 items in index as the arbitrary time at which to split it - notice the bug that identifiers starting with non-ASCII characters won't be listed in split-index, but don't bother to fix it yet (see ticket haskell/haddock#116, http://trac.haskell.org/haddock/ticket/116 ) - - - - - 78a5661e by Isaac Dupree at 2009-07-20T15:37:18+00:00 Implement GADT records in HTML backend - - - - - 4e163555 by Isaac Dupree at 2009-07-21T22:03:25+00:00 add test for GADT records - - - - - 79aa4d6e by David Waern at 2009-07-23T20:40:37+00:00 Update test suite following version bump - - - - - 5932c011 by David Waern at 2009-08-02T10:25:39+00:00 Fix documentation bug - - - - - a6970fca by David Waern at 2009-08-12T23:08:53+00:00 Remove support for ghc 6.8.* from .cabal file - - - - - c1695902 by Ian Lynagh at 2009-07-07T13:35:45+00:00 Fix unused import warnings - - - - - fb6df7f9 by Ian Lynagh at 2009-07-16T00:20:31+00:00 Use cProjectVersion directly rather than going through compilerInfo Fixes the build after changes in GHC - - - - - 548cdd66 by Simon Marlow at 2009-07-28T14:27:04+00:00 follow changes in GHC's ForeignType - - - - - 9395aaa0 by David Waern at 2009-08-13T22:17:33+00:00 Switch from PatternSignatures to ScopedTypeVariables in Main - - - - - eebf39bd by David Waern at 2009-08-14T17:14:28+00:00 Version .haddock files made with GHC 6.10.3/4 correclty - - - - - 58f3e735 by David Waern at 2009-08-14T17:19:37+00:00 Support GHC 6.10.* and 6.11.* only - - - - - 5f63cecc by David Waern at 2009-08-14T22:03:20+00:00 Do not version .haddock file based on GHC patchlevel version We require that the instances of Binary that we use from GHC will not change between patchlevel versions. - - - - - d519de9f by David Waern at 2009-08-14T23:50:00+00:00 Update CHANGES - - - - - 35dccf5c by David Waern at 2009-08-14T23:51:38+00:00 Update version number everywhere - - - - - 6d363fea by David Waern at 2009-08-15T09:46:49+00:00 Update ANNOUNCE - - - - - c7ee6bc2 by David Waern at 2009-08-15T09:47:13+00:00 Remove -Werror Forgot that Hackage doesn't like it. - - - - - a125c12b by David Waern at 2009-08-15T09:49:50+00:00 Require Cabal >= 1.6 - - - - - adb2f560 by Isaac Dupree at 2009-08-12T03:47:14+00:00 Cross-Package Documentation version 4 - - - - - 3d6dc04d by David Waern at 2009-08-15T23:42:57+00:00 Put all the IN_GHC_TREE stuff inside getGhcLibDir - - - - - 56624097 by David Waern at 2009-08-15T23:52:03+00:00 Add --print-ghc-libdir - - - - - f15d3ccb by David Waern at 2009-08-16T00:37:52+00:00 Read base.haddock when running tests We can now test cross-package docs. - - - - - 283f0fb9 by David Waern at 2009-08-16T00:50:59+00:00 Update test output - we now have more links - - - - - 673d1004 by David Waern at 2009-08-16T01:26:08+00:00 Read process.haddock when running tests - - - - - 0d127f82 by David Waern at 2009-08-16T01:43:04+00:00 Add a test for cross-package documentation - - - - - f94db967 by Ian Lynagh at 2009-08-16T18:42:44+00:00 Follow GHC build system changes - - - - - 5151278a by Isaac Dupree at 2009-08-16T19:58:05+00:00 make cross-package list types look nicer - - - - - c41e8228 by Isaac Dupree at 2009-08-18T01:47:47+00:00 Haddock.Convert: export more functions This lets us remove some code in Haddock.Interface.AttachInstances - - - - - 2e5fa398 by Isaac Dupree at 2009-08-18T02:11:05+00:00 switch AttachInstances to use synify code It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication! - - - - - b8b07123 by Isaac Dupree at 2009-08-18T02:23:31+00:00 Find instances using GHC, which is more complete. In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?) - - - - - 6959b451 by Isaac Dupree at 2009-08-17T00:37:18+00:00 fix preprocessor conditional sense - - - - - 942823af by Isaac Dupree at 2009-08-16T22:46:48+00:00 remove ghc 6.8 conditionals from Haddock.Interface - - - - - 4b3ad888 by Isaac Dupree at 2009-08-18T20:24:38+00:00 Fix GHC 6.11 build in Haddock.Convert - - - - - 0a89c5ab by Isaac Dupree at 2009-08-23T00:08:58+00:00 hacks to make it compile without fnArgDocsn - - - - - 7b3bed43 by Isaac Dupree at 2009-08-23T03:01:28+00:00 less big-Map-based proper extraction of constructor subdocs - - - - - b21c279a by Isaac Dupree at 2009-08-23T03:02:06+00:00 Html: remove unnecessary+troublesome GHC. qualifications - - - - - 96c97115 by Isaac Dupree at 2009-08-23T03:08:03+00:00 Move doc parsing/lexing into Haddock for ghc>=6.11 - - - - - e1cec02d by Isaac Dupree at 2009-08-23T05:08:14+00:00 get rid of unused DocMap parameter in Html - - - - - 66960c59 by Isaac Dupree at 2009-08-23T05:54:20+00:00 fix horrible named-docs-disappearing bug :-) - - - - - a9d7eff3 by Isaac Dupree at 2009-08-23T06:26:36+00:00 re-implement function-argument docs ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently. - - - - - 8bf6852c by Isaac Dupree at 2009-08-23T07:26:05+00:00 cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! - - - - - 30115a64 by Isaac Dupree at 2009-08-23T18:22:47+00:00 Improve behavior for unfindable .haddock - - - - - aa364bda by Isaac Dupree at 2009-08-23T18:28:16+00:00 add comment for FnArgsDoc type - - - - - 49b23a99 by Isaac Dupree at 2009-08-23T21:52:48+00:00 bugfix: restore fnArgDocs for type-synonyms - - - - - f65f9467 by Isaac Dupree at 2009-08-23T22:06:55+00:00 Backends.Hoogle: eliminate warnings - - - - - a292d216 by Isaac Dupree at 2009-08-23T22:10:24+00:00 Haddock.Convert: eliminate warnings - - - - - 5546cd20 by Isaac Dupree at 2009-08-23T22:12:31+00:00 Haddock.Interface.Rename: eliminate warnings - - - - - 0a9798b6 by Isaac Dupree at 2009-08-23T22:18:47+00:00 Main.hs: remove ghc<6.9 conditionals - - - - - e8f9867f by Isaac Dupree at 2009-08-23T22:27:46+00:00 Main.hs: eliminate warnings (except for OldException) - - - - - 61c64247 by Isaac Dupree at 2009-08-23T22:41:01+00:00 move get*LibDir code in Main.hs, to +consistent code, -duplication - - - - - 948f1e69 by Isaac Dupree at 2009-08-23T23:14:26+00:00 Main.hs: OldException->Exception: which eliminates warnings - - - - - 3d5d5e03 by Isaac Dupree at 2009-08-23T23:20:11+00:00 GhcUtils: ghc >= 6.10 - - - - - 2771d657 by Isaac Dupree at 2009-08-23T23:21:55+00:00 InterfaceFile: ghc >= 6.10 - - - - - d9f2b9d1 by Isaac Dupree at 2009-08-23T23:22:58+00:00 Types: ghc >= 6.10 - - - - - ca39210e by Isaac Dupree at 2009-08-23T23:23:26+00:00 ModuleTree: ghc >= 6.10 - - - - - 883c4e59 by Isaac Dupree at 2009-08-23T23:24:04+00:00 Backends.DevHelp: ghc >= 6.10 - - - - - 04667df5 by Isaac Dupree at 2009-08-23T23:24:37+00:00 Backends.Html: ghc >= 6.10 - - - - - a9f7f25f by Isaac Dupree at 2009-08-23T23:25:24+00:00 Utils: ghc >= 6.10 - - - - - b7105022 by Isaac Dupree at 2009-08-23T23:37:47+00:00 eliminate haskell98 dependency, following GHC's example It turns out I/we already had, and it was only a matter of deleting it from the cabal file. - - - - - 292e0911 by Isaac Dupree at 2009-08-24T01:22:44+00:00 refactor out subordinatesWithNoDocs dep of inferenced-decls fix - - - - - c2ed46a2 by Isaac Dupree at 2009-08-24T01:24:03+00:00 Eradicate wrong runtime warning for type-inferenced exported-functions see the long comment in the patch for why I did it this way :-) - - - - - 4ac0b57c by David Waern at 2009-09-04T22:56:20+00:00 Clean up tyThingToHsSynSig a little Factor out noLoc and use the case construct. Also rename the function to tyThingToLHsDecl, since it doesn't just create type signatures. - - - - - 28ab9201 by David Waern at 2009-09-04T22:58:50+00:00 Wibble - - - - - 0d9fe6d0 by David Waern at 2009-09-06T18:39:30+00:00 Add more copyright owners to H.I.AttachInstances - - - - - 122441b1 by David Waern at 2009-09-06T18:44:12+00:00 Style police - - - - - 1fa79463 by David Waern at 2009-09-06T18:57:45+00:00 Move toHsInstHead to Haddock.Convert and call it synifyInstHead - - - - - 0d42a8aa by David Waern at 2009-09-06T21:11:38+00:00 Use colordiff to display test results if available - - - - - ea9d8e03 by Simon Marlow at 2009-08-24T08:46:14+00:00 Follow changes in GHC's interface file format Word32 instead of Int for FastString and Name offsets - - - - - 537e051e by Simon Marlow at 2009-07-29T14:16:53+00:00 define unpackPackageId (it was removed from GHC) - - - - - 50c63aa7 by David Waern at 2009-09-09T23:18:03+00:00 Remove commented-out code - - - - - 511631fe by David Waern at 2009-09-09T23:19:05+00:00 Correct copyright in H.I.ParseModuleHeader - - - - - 898ec768 by David Waern at 2009-09-11T11:22:29+00:00 Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time. - - - - - 37bec0d5 by Simon Peyton Jones at 2009-09-11T08:28:04+00:00 Track change in HsType - - - - - eb3a97c3 by Ian Lynagh at 2009-09-11T16:07:09+00:00 Allow building with base 4.2 - - - - - bb4205ed by Ian Lynagh at 2009-09-22T13:50:02+00:00 Loosen the GHC dependency - - - - - 5c75deb2 by Ian Lynagh at 2009-09-22T14:08:39+00:00 Fix building with GHC >= 6.12 - - - - - fb131481 by David Waern at 2009-09-11T11:24:48+00:00 Update runtests.hs to work with GHC 6.11 - - - - - ac3a419d by David Waern at 2009-09-11T11:25:14+00:00 Update CrossPackageDocs test - - - - - ec65c3c6 by David Waern at 2009-09-11T11:25:40+00:00 Add reference output for CrossPackageDocs - - - - - 520c2758 by Ian Lynagh at 2009-10-25T17:26:40+00:00 Fix installation in the GHC build system - - - - - 28b3d7df by Ian Lynagh at 2009-11-05T15:57:27+00:00 GHC build system: Make *nix installation work in paths containing spaces - - - - - 5c9bb541 by David Waern at 2009-11-14T11:56:39+00:00 Track change in HsType for the right compiler version - - - - - 905097ce by David Waern at 2009-11-14T12:10:47+00:00 hlint police - - - - - 04920630 by Ian Lynagh at 2009-11-20T13:46:30+00:00 Use defaultObjectTarget rather than HscAsm This fixes haddock when we don't have a native code generator - - - - - 966eb079 by David Waern at 2009-11-15T12:32:21+00:00 Remove commented-out code - - - - - 37f00fc4 by David Waern at 2009-11-22T13:58:48+00:00 Make runtests.hs strip links before diffing Generates easier to read diffs when tests fail. The content of the links is not important anyway since it is not taken into account by the tests. - - - - - 3a9bb8ef by David Waern at 2009-11-22T14:05:06+00:00 Follow findProgramOnPath signature change in runtests.hs - - - - - b26b9e5a by David Waern at 2009-11-22T14:08:40+00:00 Follow removal of GHC.MVar from base in CrossPackageDocs - - - - - f4d90ae4 by David Waern at 2009-11-22T14:48:47+00:00 Make copy.hs strip link contents before copying No more updating of reference files when URLs in links changes. - - - - - 4c9c420d by David Waern at 2009-11-22T15:26:41+00:00 Update test reference output * More links (Int, Float etc) * Stripped link contents - - - - - a62b80e3 by David Waern at 2009-11-23T23:19:39+00:00 Update CrossPackageDocs reference output - Remove GHC.MVar import (removed from base) - Strip link contents - - - - - 43491394 by David Waern at 2009-11-23T23:20:00+00:00 Update test reference files with comments on instances - - - - - 0d370a0b by David Waern at 2009-11-23T23:25:16+00:00 Bump version number - - - - - 2293113e by David Waern at 2009-11-24T20:55:49+00:00 Comments on instances Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances - - - - - bf586f29 by David Waern at 2009-11-27T22:05:15+00:00 Whitespace police - - - - - b8f03afa by David Waern at 2009-11-27T22:11:46+00:00 Remove bad whitespace and commented-out pieces - - - - - 90b8ee90 by David Waern at 2009-11-27T22:15:04+00:00 Whitespace police - - - - - b5ede900 by David Waern at 2009-11-27T22:15:50+00:00 Whitespace police - - - - - e3fddbfe by David Waern at 2009-11-28T13:37:59+00:00 Remove Name from DocInstance It's not used. - - - - - 9502786c by David Waern at 2009-11-28T13:56:54+00:00 Require at least GHC 6.12 While regression testing Haddock, I found a bug that happens with GHC 6.10.3, but not with GHC 6.12-rc2 (haven't tried 6.10.4). I don't have time to track it down. I think we should just always require the latest major GHC version. The time spent on making Haddock work with older versions is too high compared to the time spent on bugfixing, refactoring and features. - - - - - 8fa688d8 by David Waern at 2009-11-28T15:05:03+00:00 Remove cruft due to compatibility with older GHCs - - - - - 46fbbe9d by David Waern at 2009-11-28T15:07:50+00:00 Add a documentation header to Haddock.Convert - - - - - c3d2cc4a by David Waern at 2009-11-28T15:10:14+00:00 Remove unused H.Utils.FastMutInt2 - - - - - 490aba80 by David Waern at 2009-11-28T15:36:36+00:00 Rename Distribution.Haddock into Documentation.Haddock - - - - - 33ee2397 by David Waern at 2009-11-28T15:36:47+00:00 Fix error message - - - - - a5a3b950 by David Waern at 2009-11-28T16:58:39+00:00 Add a test flag that brings in QuickCheck - - - - - fa049e13 by David Waern at 2009-11-28T19:32:18+00:00 Say that we want quickcheck 2 - - - - - f32b0d9b by David Waern at 2009-11-28T19:32:40+00:00 Add an Arbitrary instance for HsDoc - - - - - da9a8bd7 by David Waern at 2009-11-28T20:15:30+00:00 Rename HsDoc back into Doc - - - - - edb60101 by David Waern at 2009-11-28T22:16:16+00:00 Move H.Interface.Parse/Lex to H.Parse/Lex These are not just used to build Interfaces. - - - - - 0656a9b8 by David Waern at 2009-11-28T23:12:14+00:00 Update version number in test suite - - - - - 5e8c6f4a by David Waern at 2009-12-21T14:12:41+00:00 Improve doc of DocName - - - - - 7868e551 by Ian Lynagh at 2009-09-22T10:43:03+00:00 TAG GHC 6.12-branch created - - - - - 0452a3ea by Ian Lynagh at 2009-12-15T12:46:07+00:00 TAG GHC 6.12.1 release - - - - - 65e9be62 by David Waern at 2009-12-21T16:58:58+00:00 Update CHANGES - - - - - 145cee32 by David Waern at 2009-12-21T16:59:09+00:00 TAG 2.6.0 - - - - - 3c552008 by David Waern at 2009-12-22T17:11:14+00:00 Update ANNOUNCE - - - - - 931f9db4 by David Waern at 2010-01-22T19:57:17+00:00 Convert haddock.vim to use unix newlines - - - - - 4e56588f by David Waern at 2010-01-22T22:11:17+00:00 Remove unnecessary (and inexplicable) uses of nub - - - - - 744bb4d1 by David Waern at 2010-01-22T22:12:14+00:00 Follow move of parser and lexer - - - - - e34bab14 by David Waern at 2010-01-22T22:49:13+00:00 Use findProgramLocation instead of findProgramOnPath in runtests.hs - - - - - 8d39891b by Isaac Dupree at 2010-01-14T18:53:18+00:00 fix html arg-doc off-by-one and silliness - - - - - 9401f2e9 by David Waern at 2010-01-22T22:57:03+00:00 Create a test for function argument docs - - - - - 507a82d7 by David Waern at 2010-01-22T23:24:47+00:00 Put parenthesis around type signature arguments of function type - - - - - 8a305c28 by David Waern at 2010-01-23T17:26:59+00:00 Add reference file for the FunArgs test - - - - - 1309d5e1 by David Waern at 2010-01-24T16:05:08+00:00 Improve FunArg test and update Test.html.ref - - - - - 2990f055 by Yitzchak Gale at 2010-02-14T16:03:46+00:00 Do not generate illegal character in HTML ID attribute. - - - - - c5bcab7a by David Waern at 2010-02-22T22:10:30+00:00 Fix Haddock markup error in comment - - - - - c6416a73 by David Waern at 2010-02-24T22:55:08+00:00 Large additions to the Haddock API Also improved and added more doc comments. - - - - - 57d289d7 by David Waern at 2010-02-24T22:58:02+00:00 Remove unused ifaceLocals - - - - - 80528d93 by David Waern at 2010-02-25T21:05:09+00:00 Add HaddockModInfo to the API - - - - - 82806848 by David Waern at 2010-02-25T21:05:27+00:00 Wibble - - - - - 744cad4c by David Waern at 2010-02-25T23:30:59+00:00 Make it possible to run a single test - - - - - 6a806e4c by David Waern at 2010-03-14T14:19:39+00:00 Bump version number - - - - - a5a8e4a7 by David Waern at 2010-03-14T14:36:35+00:00 Update ANNOUNCE - - - - - 6f05435e by Simon Hengel at 2010-03-15T20:52:42+00:00 Add missing dependencies for 'library' in haddock.cabal - - - - - faefe2bd by David Waern at 2010-03-15T22:29:37+00:00 Solve conflicts - - - - - 9808ad52 by David Waern at 2010-03-15T22:51:21+00:00 Bump version number - - - - - eb0bf60b by David Waern at 2010-03-15T22:52:32+00:00 Update CHANGES - - - - - f95cd891 by David Waern at 2010-03-15T23:01:06+00:00 Add Paths_haddock to other-modules of library - - - - - 65997b0a by David Waern at 2010-03-15T23:14:59+00:00 Update CHANGES - - - - - 7e251731 by David Waern at 2010-03-15T23:15:30+00:00 Bump version number - - - - - c9cd0ddc by David Waern at 2010-03-16T00:28:34+00:00 Fix warning - - - - - 1cac2d93 by Simon Peyton Jones at 2010-01-04T15:22:16+00:00 Fix imports for new location of splitKindFunTys - - - - - 474f26f6 by Simon Peyton Jones at 2010-02-10T14:36:06+00:00 Update Haddock for quasiquotes - - - - - 0dcc06c0 by Simon Peyton Jones at 2010-02-10T10:59:45+00:00 Track changes in HsTyVarBndr - - - - - 2d84733a by Simon Peyton Jones at 2010-02-10T14:52:44+00:00 Track HsSyn chnages - - - - - 9e3adb8b by Ian Lynagh at 2010-02-20T17:09:42+00:00 Resolve conflicts - - - - - a3e72ff8 by Simon Peyton Jones at 2010-03-04T13:05:16+00:00 Track change in HsUtils; and use a nicer function not an internal one - - - - - 27994854 by David Waern at 2010-03-18T22:22:27+00:00 Fix build with GHC 6.12.1 - - - - - 11f6e488 by David Waern at 2010-03-18T22:24:09+00:00 Bump version in test reference files - - - - - 0ef2f11b by David Waern at 2010-03-20T00:56:30+00:00 Fix library part of cabal file when in ghc tree - - - - - 3f6146ff by Mark Lentczner at 2010-03-20T22:30:11+00:00 First, experimental XHTML rendering switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString) - - - - - b8ab329b by Mark Lentczner at 2010-03-20T22:54:01+00:00 apply changes to Html.hs to Xhtml/*.hs incorporate changes that were made between the time Html.hs was copied and split into Xhtml.hs and Xhtml/*.hs includes patchs after "Wibble" (!) through "Fix build with GHC 6.12.1" - - - - - 73df2433 by Ian Lynagh at 2010-03-20T21:56:37+00:00 Follow LazyUniqFM->UniqFM in GHC - - - - - db4f602b by David Waern at 2010-03-29T22:00:01+00:00 Fix build with GHC 6.12 - - - - - d8dca088 by Simon Hengel at 2010-04-02T16:39:55+00:00 Add missing dependencies to cabal file - - - - - e2adc437 by Simon Hengel at 2010-04-02T14:08:40+00:00 Add markup support for interactive examples - - - - - e882ac05 by Simon Hengel at 2010-04-02T14:11:53+00:00 Add tests for interactive examples - - - - - 5a07a6d3 by David Waern at 2010-04-07T17:05:20+00:00 Propagate source positions from Lex.x to Parse.y - - - - - 6493b46f by David Waern at 2010-04-07T21:48:57+00:00 Let runtests.hs die when haddock has not been built - - - - - 5e34423e by David Waern at 2010-04-07T22:01:13+00:00 Make runtests.hs slightly more readable - - - - - 321d59b3 by David Waern at 2010-04-07T22:13:27+00:00 Fix haskell/haddock#75 Add colons to the $ident character set. - - - - - 37b08b8d by David Waern at 2010-04-08T00:32:52+00:00 Fix haskell/haddock#118 Avoid being too greedy when lexing URL markup (<..>), in order to allow multiple URLs on the same line. Do the same thing with <<..>> and #..#. - - - - - df8feac9 by David Waern at 2010-04-08T00:57:33+00:00 Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. - - - - - 1ca6f84b by David Waern at 2010-04-08T01:03:06+00:00 Add ghc-prim to test suite deps - - - - - 27371e3a by Simon Hengel at 2010-04-08T19:26:34+00:00 Let parsing fails on paragraphs that are immediately followed by an example This is more consistent with the way we treat code blocks. - - - - - 83096e4a by David Waern at 2010-04-08T21:20:00+00:00 Improve function name - - - - - 439983ce by David Waern at 2010-04-10T10:46:14+00:00 Fix haskell/haddock#112 No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds. - - - - - 5c0d35d7 by David Waern at 2010-04-10T10:54:06+00:00 Rename startGhc into withGhc - - - - - dca081fa by Simon Hengel at 2010-04-12T19:09:16+00:00 Add documentation for interactive examples - - - - - c7f26bfa by David Waern at 2010-04-13T00:51:51+00:00 Slight fix to the documentation of examples - - - - - 06eb7c4c by David Waern at 2010-04-13T00:57:05+00:00 Rename Interactive Examples into Examples (and simplify explanation) - - - - - 264830cb by David Waern at 2010-05-10T20:07:27+00:00 Update CHANGES with info about 2.6.1 - - - - - 8e5d4514 by Simon Hengel at 2010-04-18T18:16:54+00:00 Add unit tests for parser - - - - - 68297f40 by David Waern at 2010-05-10T21:53:37+00:00 Improve testsuite README - - - - - f04eb6e4 by David Waern at 2010-05-11T19:14:31+00:00 Re-organise the testsuite structure - - - - - a360f710 by David Waern at 2010-05-11T19:18:03+00:00 Shorten function name - - - - - 1d5dd359 by David Waern at 2010-05-11T21:40:02+00:00 Update runtests.hs following testsuite re-organisation - - - - - ffebe217 by David Waern at 2010-05-11T21:40:10+00:00 Update runtests.hs to use base-4.2.0.1 - - - - - 635de402 by David Waern at 2010-05-11T21:41:11+00:00 Update runparsetests.hs following testsuite reorganisation - - - - - 72137910 by Ian Lynagh at 2010-05-06T20:43:06+00:00 Fix build - - - - - 1a80b76e by Ian Lynagh at 2010-05-06T22:25:29+00:00 Remove redundant import - - - - - 1031a80c by Simon Peyton Jones at 2010-05-07T13:21:09+00:00 Minor wibbles to HsBang stuff - - - - - dd8e7fe5 by Ian Lynagh at 2010-05-08T15:22:00+00:00 GHC build system: Follow "rm" variable changes - - - - - 7f5e6748 by David Waern at 2010-05-13T11:53:02+00:00 Fix build with GHC 6.12.2 - - - - - 7953d4d8 by David Waern at 2010-05-13T18:45:01+00:00 Fixes to comments only - - - - - 8ae8eb64 by David Waern at 2010-05-13T18:57:26+00:00 ModuleMap -> IfaceMap - - - - - 1c3eadc6 by David Waern at 2010-05-13T19:03:13+00:00 Fix whitespace style issues - - - - - e96783c0 by David Waern at 2010-05-13T19:08:53+00:00 Fix comment - - - - - c998a78b by David Waern at 2010-05-13T19:39:00+00:00 Position the module header the same way everywhere Silly, but nice with some consistency :-) - - - - - b48a714e by David Waern at 2010-05-13T19:41:32+00:00 Position of module header, this time in the HTML backends - - - - - f9bfb12e by David Waern at 2010-05-13T19:43:05+00:00 Two newlines between declarations in Main - - - - - 071d44c7 by David Waern at 2010-05-13T19:44:21+00:00 Newlines in Convert - - - - - 036346db by David Waern at 2010-05-13T19:46:47+00:00 Fix a few stylistic issues in H.InterfaceFile - - - - - f0b8379e by David Waern at 2010-05-13T19:47:53+00:00 Add newlines to H.ModuleTree - - - - - 27409f8e by David Waern at 2010-05-13T19:51:10+00:00 Fix stylistic issues in H.Utils - - - - - 24774a11 by David Waern at 2010-05-13T20:00:43+00:00 Structure H.Types better - - - - - 7b6f5e40 by David Waern at 2010-05-13T20:01:04+00:00 Remove bad Arbitrary instance - - - - - fac9f1f6 by David Waern at 2010-05-13T20:05:50+00:00 Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead - - - - - fe6d00c4 by David Waern at 2010-05-13T20:51:55+00:00 Export a couple of more types from the API - - - - - b2e33a5f by David Waern at 2010-05-13T21:27:51+00:00 Improve doc comment for Interface - - - - - c585f2ce by David Waern at 2010-05-13T21:30:14+00:00 Improve documentation of Haddock.Interface - - - - - e6791db2 by David Waern at 2010-05-13T22:07:35+00:00 Remove meaningless comments - - - - - 7801b390 by David Waern at 2010-05-14T17:53:33+00:00 Remove unused modules - - - - - f813e937 by David Waern at 2010-05-14T17:55:17+00:00 Re-direct compilation output to a temporary directory Also add a flag --no-tmp-comp-dir that can be used to get the old behaviour of writing compilation files to GHC's output directory (default "."). - - - - - e56737ec by David Waern at 2010-05-14T18:06:11+00:00 Wibble - - - - - e40b0447 by David Waern at 2010-05-14T19:01:52+00:00 Move flag evaluation code from Main to Haddock.Options Determining the value of "singular" flags (by e.g. taking the last occurrence of the flag) and other flag evaluation should done in Haddock.Options which is the module that is supposed to define the command line interface. This makes Main a bit easier on the eyes as well. - - - - - 27091f57 by David Waern at 2010-05-14T19:05:10+00:00 Wibble - - - - - c658cf61 by David Waern at 2010-05-14T19:06:49+00:00 Re-order things in Haddock.Options a bit - - - - - 8cfdd342 by David Waern at 2010-05-14T19:20:29+00:00 De-tabify Haddock.Options and fix other whitespace issues - - - - - 0df16b62 by David Waern at 2010-05-14T19:25:07+00:00 Improve comments - - - - - 80b38e2b by David Waern at 2010-05-14T19:26:42+00:00 Whitespace police - - - - - fe580255 by David Waern at 2010-05-14T19:31:23+00:00 Wibbles to comments - - - - - a2b43fad by David Waern at 2010-05-14T20:24:32+00:00 Move some more flag functions to Haddock.Options - - - - - 3f895547 by David Waern at 2010-05-14T20:37:12+00:00 Make renderStep a top-level function in Main - - - - - 5cdca11d by David Waern at 2010-05-14T20:39:27+00:00 Spelling in comment - - - - - ad98d14c by David Waern at 2010-05-14T20:40:26+00:00 Comment fixes - - - - - 0bb9218f by David Waern at 2010-05-14T20:49:01+00:00 Whitespace police - - - - - 0f0a533f by David Waern at 2010-05-15T16:42:29+00:00 Improve description of --dump-interface - - - - - 5b2833ac by David Waern at 2010-05-15T17:16:53+00:00 Document --no-tmp-comp-dir - - - - - 8160b170 by David Waern at 2010-05-15T17:18:59+00:00 Wibble - - - - - 570dbe33 by David Waern at 2010-05-18T21:15:38+00:00 HLint police - - - - - 204e425f by David Waern at 2010-05-18T21:16:30+00:00 HLint police - - - - - 6db657ac by David Waern at 2010-05-18T21:16:37+00:00 Wibble - - - - - b942ccd7 by Simon Marlow at 2010-06-02T08:27:30+00:00 Interrupted disappeared in GHC 6.13 (GHC ticket haskell/haddock#4100) - - - - - 3b94a819 by Simon Marlow at 2010-06-02T08:45:08+00:00 Allow base-4.3 - - - - - c5a1fb7c by Simon Marlow at 2010-06-02T09:03:04+00:00 Fix compilation with GHC 6.13 - - - - - 6181296c by David Waern at 2010-06-08T21:09:05+00:00 Display name of prologue file when parsing it fails - - - - - 7cbc6f60 by Ian Lynagh at 2010-06-13T16:20:25+00:00 Remove redundant imports - - - - - 980c804b by Simon Marlow at 2010-06-22T08:41:50+00:00 isLocalAndTypeInferenced: fix for local module names overlapping package modules - - - - - d74d4a12 by Simon Marlow at 2010-06-23T12:03:27+00:00 Unresolved identifiers in Doc get replaced with DocMonospaced rather than plain strings - - - - - d8546783 by Simon Marlow at 2010-06-30T12:45:17+00:00 LaTeX backend (new options: --latex, --latex-style=<style>) - - - - - 437afa9e by David Waern at 2010-07-01T12:02:44+00:00 Fix a few stylistic whitespace issues in LaTeX backend - - - - - 85bc1fae by David Waern at 2010-07-01T15:42:45+00:00 Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this) - - - - - 7d2eb86f by David Waern at 2010-07-01T15:43:33+00:00 Update test following Simon's patch to render unresolved names in monospaced font - - - - - 08fcbcd2 by David Waern at 2010-07-01T16:12:18+00:00 Warning police - - - - - d04a8d7a by David Waern at 2010-07-04T14:53:39+00:00 Fix a bug in attachInstances We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however. - - - - - d10344eb by Simon Hengel at 2010-07-10T09:19:04+00:00 Add missing dependencies to cabal file - - - - - 24090531 by Mark Lentczner at 2010-03-21T04:51:16+00:00 add exports to Xhtml modules - - - - - 84f9a333 by Mark Lentczner at 2010-04-03T19:14:22+00:00 clean up Doc formatting code - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up <pre> sections - - - - - bebccf52 by Mark Lentczner at 2010-04-04T04:51:08+00:00 tweak list css - - - - - 0c2aeb5e by Mark Lentczner at 2010-04-04T06:24:14+00:00 all decls now generate Html not HtmlTable - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code - - - - - dbf73e6e by Mark Lentczner at 2010-04-05T05:02:43+00:00 clean up processExport and place a div around each decl - - - - - e25b7e9f by Mark Lentczner at 2010-04-10T21:23:21+00:00 data decls are now a sequence of paragraphs, not a table - - - - - 89ee0294 by Mark Lentczner at 2010-04-10T21:29:16+00:00 removed commented out code that can't be maintained - - - - - d466f536 by Mark Lentczner at 2010-04-12T04:56:27+00:00 removed declWithDoc and cleaned up data decls in summary - - - - - ed755832 by Mark Lentczner at 2010-04-12T05:07:53+00:00 merge in markupExample changes - - - - - c36f51fd by Mark Lentczner at 2010-04-25T04:56:37+00:00 made record fields be an unordList, not a table - - - - - ed3a28d6 by Mark Lentczner at 2010-04-25T05:23:28+00:00 fixed surround of instance and constructor tables - - - - - 0e35bbc4 by Mark Lentczner at 2010-04-25T05:36:59+00:00 fix class member boxes in summary - - - - - 5041749b by Mark Lentczner at 2010-04-25T05:38:35+00:00 remove unused bodyBox - - - - - e91724db by Mark Lentczner at 2010-04-25T06:26:10+00:00 fixed javascript quoting/escpaing issue - - - - - f4abbb73 by Mark Lentczner at 2010-05-03T23:04:31+00:00 adjust css for current markup - - - - - e75fec4c by Mark Lentczner at 2010-05-04T06:14:34+00:00 added assoicated types and methods back into class decls - - - - - 84169323 by Mark Lentczner at 2010-05-24T13:13:42+00:00 merge in changes from the big-whitespace cleanup - - - - - 3c1c872e by Mark Lentczner at 2010-06-11T21:03:58+00:00 adjust synopsis and bottom bar spacing - - - - - 3c1f9ef7 by Mark Lentczner at 2010-06-11T21:14:44+00:00 fix missing space in "module" lines in synoposis - - - - - 9a137e6d by Mark Lentczner at 2010-06-11T21:34:08+00:00 changed tt elements to code elements - - - - - 50f71ef1 by Mark Lentczner at 2010-06-11T23:27:46+00:00 factored out ppInstances - - - - - 3b9a9de5 by Mark Lentczner at 2010-06-17T17:36:01+00:00 push single constructors (newtype) onto line with decl - - - - - e0f8f2ec by Mark Lentczner at 2010-06-17T22:20:56+00:00 remove <++> connector - - - - - 56c075dd by Mark Lentczner at 2010-07-13T05:26:21+00:00 change to new page structure - - - - - 04be6ca7 by Mark Lentczner at 2010-07-14T04:21:55+00:00 constructors and args as dl lists, built in Layout.hs - - - - - 65aeafc2 by Mark Lentczner at 2010-07-14T05:38:32+00:00 better interface to subDecls - - - - - 72032189 by Mark Lentczner at 2010-07-14T07:04:10+00:00 made subDecl tables looks just so - - - - - b782eca2 by Mark Lentczner at 2010-07-14T16:00:54+00:00 convert args to SubDecl format - - - - - cc75e98f by Mark Lentczner at 2010-07-14T16:28:53+00:00 convert instances to SubDecl - - - - - 34e2aa5a by Mark Lentczner at 2010-07-14T21:07:32+00:00 removing old table cruft from Layout.hs - - - - - d5810d95 by Mark Lentczner at 2010-07-14T21:54:58+00:00 methods and associated types in new layout scheme - - - - - 65ef9579 by Mark Lentczner at 2010-07-14T23:43:42+00:00 clean up synopsis lists - - - - - e523318f by Mark Lentczner at 2010-07-15T05:02:26+00:00 clean up of anchors - - - - - 1215dfc5 by Mark Lentczner at 2010-07-15T23:53:01+00:00 added two new themes and rough css switcher - - - - - 7f0fd36f by Mark Lentczner at 2010-07-16T04:57:38+00:00 fixed package catpion, added style menu - - - - - 0dd4999c by Mark Lentczner at 2010-07-16T20:12:39+00:00 new output for mini_ pages - - - - - 64b2810b by Mark Lentczner at 2010-07-16T20:58:41+00:00 reformat index-frames - - - - - 3173f555 by Mark Lentczner at 2010-07-16T22:41:53+00:00 convert index to new markup - - - - - b0a4b7c9 by Mark Lentczner at 2010-07-17T04:07:22+00:00 convert index.html to new markup, adjust module markup - - - - - 8261ae1e by Mark Lentczner at 2010-07-17T05:07:29+00:00 classing styling of ancillary pages - - - - - 2a4fb025 by Mark Lentczner at 2010-07-17T05:11:45+00:00 clean up Layout.hs: no more vanillaTable - - - - - 87eec685 by Mark Lentczner at 2010-07-17T05:35:16+00:00 clean up Util.hs - - - - - d304e9b0 by Mark Lentczner at 2010-07-17T05:38:50+00:00 qualify import of XHtml as XHtml - - - - - 7dc05807 by Mark Lentczner at 2010-07-17T06:17:53+00:00 factored out head element generation - - - - - 9cdaec9e by Mark Lentczner at 2010-07-17T06:44:54+00:00 refactored out main page body generation - - - - - 8a51019e by Mark Lentczner at 2010-07-17T06:48:20+00:00 moved footer into only place that used it - - - - - efa479da by Mark Lentczner at 2010-07-17T18:48:30+00:00 styling auxillary pages for tibbe and snappy themes - - - - - 81de5509 by Mark Lentczner at 2010-07-18T04:41:38+00:00 fixed alphabet on index page, and styling of it and packages in module lists - - - - - 20718c1a by Mark Lentczner at 2010-07-18T05:34:29+00:00 cleaned up div functions in Layout.hs - - - - - 60d50453 by Mark Lentczner at 2010-07-18T05:48:39+00:00 added content div to main pages - - - - - ed16561c by Mark Lentczner at 2010-07-18T06:12:22+00:00 add .doc class to documentation blocks - - - - - f5c781b0 by Mark Lentczner at 2010-07-19T05:20:53+00:00 refactoring of anchor ID and fragment handling - - - - - a69a93bf by Mark Lentczner at 2010-07-19T05:35:55+00:00 remove an explicit bold tag - replace with .def class - - - - - d76c7225 by Mark Lentczner at 2010-07-19T06:56:15+00:00 rename Haddock.Backends.Xhtml.Util to Utils - - - - - 5a58c0da by David Waern at 2010-07-21T13:30:54+00:00 Remove trailing whitespace in Haddock.Backends.Xhtml - - - - - 0652aa17 by David Waern at 2010-07-21T13:33:21+00:00 Align a few comments - - - - - 785776c3 by David Waern at 2010-07-21T13:39:04+00:00 Remove trailing whitespace in H.B.X.Decl - - - - - 71a30710 by David Waern at 2010-07-21T13:44:27+00:00 Remove more trailing whitespace - - - - - 38750394 by David Waern at 2010-07-21T13:50:43+00:00 Style police - - - - - 3023d940 by David Waern at 2010-07-21T14:01:22+00:00 Style police in H.B.X.Decl - - - - - df16e9e6 by David Waern at 2010-07-21T14:14:45+00:00 Style police in H.B.X.DocMarkup - - - - - 6020e321 by David Waern at 2010-07-21T14:17:32+00:00 More style police - - - - - 86ad8bf5 by David Waern at 2010-07-21T14:21:02+00:00 Style police in H.B.Xhtml - - - - - aea27d03 by David Waern at 2010-07-21T14:42:03+00:00 Fix warnings in LaTeX backend - - - - - 2aff34a9 by David Waern at 2010-07-21T14:50:46+00:00 Style police in LaTeX backend (mainly more newlines) - - - - - e517162d by David Waern at 2010-07-21T15:05:47+00:00 Doc sections in Main - - - - - b971aa0c by David Waern at 2010-07-21T15:06:17+00:00 Trailing whitespace in Documentation.Haddock - - - - - f11628fb by David Waern at 2010-07-21T15:07:06+00:00 Trailing whitespace in Haddock.Convert - - - - - cbaf284c by David Waern at 2010-07-21T15:08:11+00:00 Style police in Haddock.GhcUtils - - - - - 71feb77b by David Waern at 2010-07-21T15:09:06+00:00 Style police in Haddock.InterfaceFile - - - - - 0a9c80e6 by David Waern at 2010-07-21T15:11:33+00:00 Whitespace police - - - - - 6168376c by David Waern at 2010-07-21T15:16:35+00:00 Style police in Haddock.Utils - - - - - 9fe4dd90 by David Waern at 2010-07-21T15:19:31+00:00 Add -fwarn-tabs - - - - - a000d752 by Mark Lentczner at 2010-07-20T17:25:52+00:00 move CSS Theme functions into Themes.hs - - - - - b52b440f by Mark Lentczner at 2010-07-20T17:29:35+00:00 add Thomas Schilling's theme - - - - - e43fa7e8 by Mark Lentczner at 2010-07-21T04:49:34+00:00 correct icon used with Snappy theme - - - - - ba5092d3 by Mark Lentczner at 2010-07-21T04:56:47+00:00 apply Tibbe's updates to his theme - - - - - 7804eef6 by Mark Lentczner at 2010-07-21T05:15:49+00:00 space between "Style" and the downward triangle - - - - - 7131d4c6 by Mark Lentczner at 2010-07-21T17:43:35+00:00 merge with David's source cleanups - - - - - ee65f1cb by David Waern at 2010-07-22T16:50:46+00:00 Fix a bug where we allowed --hoogle, --latex, etc without input files - - - - - e413ff7a by David Waern at 2010-07-22T17:21:58+00:00 Improve function name - - - - - a0fd14f3 by Simon Marlow at 2010-06-30T15:34:32+00:00 fix warnings - - - - - 31f73d2a by David Waern at 2010-07-22T19:29:41+00:00 Solve conflicts - - - - - d563b4a5 by Simon Marlow at 2010-06-30T15:34:37+00:00 fix warning - - - - - 412b6469 by David Waern at 2010-07-22T19:31:28+00:00 Solve conflict - - - - - 35174b94 by Ian Lynagh at 2010-07-06T17:27:16+00:00 Follow mkPState argument order change - - - - - b5c3585c by Simon Marlow at 2010-07-14T08:49:21+00:00 common up code for instance rendering - - - - - d8009560 by Simon Marlow at 2010-07-14T12:37:11+00:00 fix warnings - - - - - a6d88695 by David Waern at 2010-07-24T15:33:33+00:00 Fix build with ghc < 6.13 - - - - - 94cf9de1 by David Waern at 2010-07-24T15:34:37+00:00 Remove conflict left-over - - - - - 313b15c0 by Mark Lentczner at 2010-07-21T22:09:04+00:00 reorganization of nhaddock.css with tibbe - - - - - 9defed80 by Mark Lentczner at 2010-07-21T22:42:14+00:00 further cleanup of nhaddock.css, float TOC, support aux. pages - - - - - 6d944c1b by Mark Lentczner at 2010-07-22T06:22:23+00:00 remove old HTML backend - - - - - b3e8cba5 by Mark Lentczner at 2010-07-22T06:43:32+00:00 remove --html-help support - it was old, out-of-date, and mostly missing - - - - - d2654a08 by Mark Lentczner at 2010-07-22T21:45:34+00:00 tweaks to nhaddock.css - - - - - f73b285c by Mark Lentczner at 2010-07-23T06:19:35+00:00 command like processing for theme selection The bulk of the change is threadnig the selected theme set through functions in Xhtml.hs so that the selected themes can be used when generating the page output. There isn't much going on in most of these changes, just passing it along. The real work is all done in Themes.hs. - - - - - 8bddc90d by Mark Lentczner at 2010-07-23T06:58:31+00:00 drop --themes support, add named theme support decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. - - - - - 20cafd4f by Mark Lentczner at 2010-07-23T17:44:29+00:00 rename --default-themes to --built-in-themes - - - - - 0fe41307 by Mark Lentczner at 2010-07-23T18:33:02+00:00 tweaks to theme for info table, headings, and tables - - - - - cba4fee0 by Mark Lentczner at 2010-07-23T19:13:59+00:00 tweaks for dl layout, though still not used - - - - - 463fa294 by Mark Lentczner at 2010-07-23T21:07:19+00:00 tweak look of mini pages, keywords, and preblocks - - - - - 5472fc02 by Mark Lentczner at 2010-07-24T05:36:15+00:00 slide out Synopsis drawer - - - - - 9d5d5de5 by Mark Lentczner at 2010-07-24T06:02:42+00:00 extend package header and footer to edges of page - - - - - a47c91a2 by Mark Lentczner at 2010-07-24T06:28:44+00:00 fields are def lists, tweak css for style menu, mini pages, arguments - - - - - ca20f23b by Mark Lentczner at 2010-07-24T16:55:22+00:00 excisting last vestiges of the --xhtml flag - - - - - 71fb012e by Mark Lentczner at 2010-07-25T18:47:49+00:00 change how collapsing sections are done make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags - - - - - c168c8d3 by Mark Lentczner at 2010-07-26T00:32:05+00:00 reorganize files in the html lib data dir - - - - - 93324301 by Mark Lentczner at 2010-07-26T01:27:42+00:00 cleaned up Themes.hs - - - - - ad3b5dd4 by Mark Lentczner at 2010-07-26T02:39:15+00:00 make module list use new collapsers - - - - - 1df9bfc6 by Mark Lentczner at 2010-07-27T19:09:25+00:00 remove Tibbe theme - - - - - 8b9b01b3 by Mark Lentczner at 2010-07-27T20:04:03+00:00 move themes into html dir with .theme and .std-theme extensions - - - - - a7beb965 by Mark Lentczner at 2010-07-27T21:06:34+00:00 give a class to empty dd elements so they can be hidden - - - - - a258c117 by Mark Lentczner at 2010-07-27T21:23:58+00:00 remove custom version of copyFile in Xhtml.hs - - - - - b70dba6e by Mark Lentczner at 2010-07-27T22:12:45+00:00 apply margin changes to pre and headings as per group decision, and small cleanups - - - - - e6f722a2 by Mark Lentczner at 2010-07-28T00:03:12+00:00 make info block and package bar links be floatable by placing them first in the dom tree - - - - - c8278867 by Mark Lentczner at 2010-07-28T19:01:18+00:00 styling source links on declarations - - - - - 88fdc399 by Mark Lentczner at 2010-07-29T01:12:46+00:00 styling tweaks don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers - - - - - 8a75b213 by Ian Lynagh at 2010-07-30T20:21:46+00:00 Fix build in GHC tree - - - - - ce8e18b3 by Simon Hengel at 2010-08-03T18:37:26+00:00 Adapt paths to data files in cabal file - - - - - 9701a455 by Simon Hengel at 2010-08-07T13:20:27+00:00 Add missing dependency to cabal file - - - - - 01b838d1 by Mark Lentczner at 2010-07-30T20:19:40+00:00 improved synopsis drawer: on click, not hover - - - - - 7b6f3e59 by Mark Lentczner at 2010-07-30T23:38:55+00:00 put the synopsis back in the other themes - - - - - 7b2904c9 by Mark Lentczner at 2010-08-11T11:11:26+00:00 close arrows on expanded synopsis drawer - - - - - ea19e177 by Mark Lentczner at 2010-08-12T21:16:45+00:00 width and font changes removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent - - - - - 5ced00c0 by Mark Lentczner at 2010-08-13T15:09:55+00:00 implemented YUI's CSS font approach - - - - - 2799c548 by Mark Lentczner at 2010-08-13T15:11:59+00:00 adjusted margin to 2em, 1 wasn't enough - - - - - 58f06893 by Mark Lentczner at 2010-08-13T15:48:44+00:00 removed underlining on hover for named anchors headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute - - - - - 7aced4c4 by Mark Lentczner at 2010-08-13T15:50:22+00:00 more space between elements - - - - - 5a3c1cce by Mark Lentczner at 2010-08-13T16:43:43+00:00 adjusted font sizes of auxilary pages per new scheme - - - - - 487539ef by Mark Lentczner at 2010-08-13T21:43:41+00:00 add Frames button and clean up frames.html - - - - - c1a140b6 by Mark Lentczner at 2010-08-13T22:17:48+00:00 move frames button to js - - - - - b0bdb68e by Mark Lentczner at 2010-08-14T03:44:46+00:00 build style menu in javascript moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page - - - - - 43ab7120 by Mark Lentczner at 2010-08-16T15:15:37+00:00 font size and margin tweaks - - - - - c0b68652 by Mark Lentczner at 2010-08-17T18:19:52+00:00 clean up collapser logics javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS - - - - - 5d573427 by Mark Lentczner at 2010-08-17T23:06:02+00:00 don't collapse entries in module list when clicking on links - - - - - 8c307c4a by Mark Lentczner at 2010-08-17T23:21:43+00:00 add missing data file to .cabal - - - - - 414bcfcf by Mark Lentczner at 2010-08-17T23:28:47+00:00 remove synopsis when in frames - - - - - ba0fa98a by Mark Lentczner at 2010-08-18T16:16:11+00:00 layout tweeks - mini page font size, toc color, etc. - - - - - 63c1bed1 by Mark Lentczner at 2010-08-18T19:50:02+00:00 margin fiddling - - - - - c311c094 by Mark Lentczner at 2010-08-20T01:37:55+00:00 better synopsis handling logic - no flashing - - - - - f1fe5fa8 by Mark Lentczner at 2010-08-20T01:41:06+00:00 fix small layout issues mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers - - - - - 0de84d77 by Mark Lentczner at 2010-08-20T02:13:09+00:00 made style changing and cookies storage robust - - - - - 1ef064f9 by Thomas Schilling at 2010-08-04T13:12:22+00:00 Make synopsis frame behave properly in Firefox. In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. - - - - - dd1c9a94 by Mark Lentczner at 2010-08-21T01:46:19+00:00 remove Snappy theme - - - - - 2353a90d by Mark Lentczner at 2010-08-25T05:16:19+00:00 fix occasional v.scroll bars on pre blocks (I think) - - - - - 459b8bf1 by Simon Hengel at 2010-08-08T10:12:45+00:00 Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API - - - - - b1b68675 by David Waern at 2010-08-26T20:31:58+00:00 Follow recent API additions with some refactorings Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. - - - - - 264d4d67 by David Waern at 2010-08-26T21:40:59+00:00 Get rid of GhcModule and related cruft We can get everything we need directly from TypecheckedModule. - - - - - 0feacec2 by Mark Lentczner at 2010-08-26T23:44:13+00:00 fixed CSS for ordered lists and def lists in doc blocks - - - - - 2997e0c2 by Mark Lentczner at 2010-08-26T23:45:03+00:00 support both kinds of enumerated lists in doc markup The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported - - - - - 5d4ddeec by Mark Lentczner at 2010-08-27T21:29:48+00:00 fix broken header link margins - - - - - 614456ba by Mark Lentczner at 2010-08-27T22:16:19+00:00 fix table of contents CSS - - - - - 03f329a2 by David Waern at 2010-08-28T16:36:09+00:00 Update tests following switch to the Xhtml backend - - - - - ca689fa2 by Mark Lentczner at 2010-08-28T18:25:16+00:00 fix def lists - - - - - 18e1d3d2 by Mark Lentczner at 2010-08-28T18:26:18+00:00 push footer to bottom of window - - - - - b0ab8d82 by David Waern at 2010-08-28T22:04:32+00:00 Whitespace police - - - - - 2d217977 by David Waern at 2010-08-29T12:44:45+00:00 Remove Snappy data files - - - - - 01e27d5f by David Waern at 2010-08-29T13:03:28+00:00 Add source entity path to --read-interface You can now use this flag like this: --read-interface=<html path>,<source entity path>,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. - - - - - 20bf4aaa by David Waern at 2010-08-29T13:11:03+00:00 Naming wibbles - - - - - ad22463f by Mark Lentczner at 2010-08-29T15:14:54+00:00 make portability block be a table - solves layout issues - - - - - 97bd1ae6 by Mark Lentczner at 2010-08-29T15:17:42+00:00 update golden test for Test due to portability box change - - - - - d37e139e by Mark Lentczner at 2010-08-29T17:07:17+00:00 move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs - - - - - acf52501 by David Waern at 2010-08-29T17:32:36+00:00 Allow building with ghc < 6.16 - - - - - 1cb34ed8 by Ian Lynagh at 2010-07-24T23:18:49+00:00 Flatten the dynflags before parsing - - - - - b36845b4 by Ian Lynagh at 2010-07-24T23:26:49+00:00 Follow flattenLanguageFlags -> flattenExtensionFlags rename - - - - - 7f7fcc7e by David Waern at 2010-08-29T17:46:23+00:00 Use flattenExtensionFlags with ghc >= 6.13 only - - - - - 13cf9411 by Ian Lynagh at 2010-08-01T18:09:54+00:00 Make the main haddock script versioned, and make plain "haddock" a symlink - - - - - 495cbff2 by Ian Lynagh at 2010-08-18T18:57:24+00:00 Fix installation in the GHC build system Data-files are now in subdirectories, so we need to handle that - - - - - 88ebab0a by Ian Lynagh at 2010-08-18T19:43:53+00:00 GHC build system: Add all the data files to BINDIST_EXTRAS - - - - - 65837172 by David Waern at 2010-08-29T20:12:34+00:00 Update Test - - - - - 094bbaa2 by David Waern at 2010-08-29T20:55:14+00:00 Revert update to Test - - - - - a881cfb3 by David Waern at 2010-08-31T18:24:15+00:00 Bump version number - - - - - 1fc8a3eb by David Waern at 2010-08-31T22:32:27+00:00 Update ANNOUNCE - - - - - ee1df9d0 by David Waern at 2010-08-31T22:33:11+00:00 Update CHANGES - - - - - 394cc854 by David Waern at 2010-08-31T22:33:23+00:00 Update interface file versioning to work with ghc 6.14/15 - - - - - 7d03b79b by David Waern at 2010-08-31T22:36:00+00:00 Update test output following version change - - - - - a48d82d1 by Mark Lentczner at 2010-09-01T04:29:35+00:00 sort options in doc to match --help output removed --html-help option, as it is no longer supported - - - - - 06561aeb by Mark Lentczner at 2010-09-01T05:29:32+00:00 update options documentation rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents - - - - - 57dea832 by Mark Lentczner at 2010-09-01T05:31:27+00:00 slight wording change about Frames mode - - - - - fa1f6da3 by David Waern at 2010-09-01T10:57:44+00:00 Update doc configure script to find docbook stylesheets on arch linux - - - - - addff770 by David Waern at 2010-09-01T11:02:29+00:00 Wibble - - - - - 8399006d by David Waern at 2010-09-01T11:19:21+00:00 Replace ghci> with >>> in example syntax - - - - - 35074cf8 by David Waern at 2010-09-01T19:03:27+00:00 Improve docs for --no-tmp-comp-dir - - - - - 0f8f8cfd by David Waern at 2010-09-02T11:22:27+00:00 Add a list of contributors to the user guide Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. - - - - - 42ccf099 by David Waern at 2010-09-02T11:29:22+00:00 Update copyright years in license - - - - - 0d560479 by David Waern at 2010-09-02T11:38:52+00:00 Update release instructions - - - - - 72ab7796 by David Waern at 2010-09-02T19:27:08+00:00 Add a note to ANNOUNCE - - - - - bf9d9c5d by David Waern at 2010-09-02T19:27:48+00:00 H.Utils needs FFI on Win+MinGW - - - - - 048ae44a by Mark Lentczner at 2010-09-04T23:19:47+00:00 make TOC group header identifiers validate - - - - - 8c6faf36 by Simon Michael at 2010-09-22T07:12:34+00:00 add hints for cleaner darcs show authors output - - - - - 9909bd17 by Simon Michael at 2010-09-22T17:58:06+00:00 print haddock coverage info on stdout when generating docs A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability. - - - - - 6da72171 by David Waern at 2010-10-03T21:31:24+00:00 Style wibble - - - - - 2f8d8e4d by Tobias Brandt at 2010-08-27T07:01:21+00:00 adding the option to fully qualify identifiers - - - - - 833be6c6 by Tobias Brandt at 2010-08-27T15:50:28+00:00 adding support for local and relative name qualification - - - - - df15c4e9 by Tobias Brandt at 2010-08-27T15:56:37+00:00 corrected qualification help message - - - - - 449e9ce1 by David Waern at 2010-10-16T17:34:30+00:00 Solve conflicts - - - - - 3469bda5 by David Waern at 2010-10-16T18:42:40+00:00 Use "qual" as an abbreviation for qualification instead of "quali" for consistency - - - - - 97c2d728 by David Waern at 2010-10-16T18:47:07+00:00 Style police - - - - - ce14fbea by David Waern at 2010-10-16T21:15:25+00:00 Style police - - - - - fdf29e9d by David Waern at 2010-10-17T00:30:44+00:00 Add a pointer to the style guide - - - - - 8e6b44e8 by rrnewton at 2010-10-24T03:19:28+00:00 Change to index pages: include an 'All' option even when subdividing A-Z. - - - - - 755b131c by David Waern at 2010-11-14T19:39:36+00:00 Bump version - - - - - d0345a04 by David Waern at 2010-11-14T19:41:59+00:00 TAG 2.8.1 - - - - - f6221508 by Simon Peyton Jones at 2010-09-13T09:53:00+00:00 Adapt to minor changes in internal GHC functions - - - - - 1290713d by Ian Lynagh at 2010-09-15T10:37:18+00:00 Remove duplicate Outputable instance for Data.Map.Map - - - - - 87f69eef by Ian Lynagh at 2010-09-21T15:01:10+00:00 Bump GHC dep upper bound - - - - - af36e087 by Ian Lynagh at 2010-09-21T15:12:02+00:00 Fix up __GLASGOW_HASKELL__ tests - - - - - ad67716c by Ian Lynagh at 2010-09-21T20:31:35+00:00 Don't build haddock is HADDOCK_DOCS is NO - - - - - 63b3f1f5 by Ian Lynagh at 2010-09-21T21:39:51+00:00 Fixes for when HADDOCK_DOCS=NO - - - - - e92bfa42 by Ian Lynagh at 2010-09-29T21:15:38+00:00 Fix URL creation on Windows: Use / not \ in URLs. Fixes haskell/haddock#4353 - - - - - 66c55e05 by Ian Lynagh at 2010-09-30T17:03:34+00:00 Tidy up haddock symlink installation In particular, it now doesn't get created if we aren't installing haddock. - - - - - 549b5556 by Ian Lynagh at 2010-10-23T21:17:14+00:00 Follow extension-flattening change in GHC - - - - - d7c2f72b by David Waern at 2010-11-14T20:17:55+00:00 Bump version to 2.8.2 - - - - - 6989a3a9 by David Waern at 2010-11-14T20:26:01+00:00 Solve conflict - - - - - 055c6910 by Ian Lynagh at 2010-09-22T15:36:20+00:00 Bump GHC dep - - - - - c96c0763 by Simon Marlow at 2010-10-27T11:09:44+00:00 follow changes in the GHC API - - - - - 45907129 by David Waern at 2010-11-07T14:00:58+00:00 Update the HCAR entry - - - - - 61940b95 by David Waern at 2010-11-07T14:07:34+00:00 Make the HCAR entry smaller - - - - - aa590b7d by David Waern at 2010-11-14T21:30:59+00:00 Update HCAR entry with November 2010 version - - - - - 587f9847 by David Waern at 2010-11-14T23:48:17+00:00 Require ghc >= 7.0 - - - - - ff5c647c by David Waern at 2010-11-14T23:49:09+00:00 TAG 2.8.2 - - - - - 937fcb4f by David Waern at 2010-11-14T23:49:45+00:00 Solve conflict - - - - - 8e5d0c1a by David Waern at 2010-11-15T21:09:50+00:00 Remove code for ghc < 7 - - - - - 3d47b70a by David Waern at 2010-11-15T21:11:06+00:00 Fix bad merge - - - - - 7f4a0d8a by David Waern at 2010-11-15T21:13:57+00:00 Remove more ghc < 7 code - - - - - 9ee34b50 by David Waern at 2010-11-15T21:31:25+00:00 Match all AsyncExceptions in exception handler - - - - - 42849c70 by David Waern at 2010-11-15T21:35:31+00:00 Just say "internal error" instead of "internal Haddock or GHC error" - - - - - c88c809b by David Waern at 2010-11-15T21:44:19+00:00 Remove docNameOcc under the motto "don't name compositions" - - - - - b798fc7c by David Waern at 2010-11-15T23:27:13+00:00 Wibble - - - - - 2228197e by David Waern at 2010-11-15T23:28:24+00:00 Rename the HCAR entry file - - - - - 8a3f9090 by David Waern at 2010-11-16T00:05:29+00:00 Remove Haskell 2010 extensions from .cabal file - - - - - c7a0c597 by David Waern at 2010-11-16T00:10:28+00:00 Style wibbles - - - - - cde707a5 by David Waern at 2010-11-16T00:12:00+00:00 Remove LANGUAGE ForeignFunctionInterface pragmas - - - - - 1dbda8ed by David Waern at 2010-11-16T00:17:21+00:00 Make a little more use of DoAndIfThenElse - - - - - 4c45ff6e by David Waern at 2010-11-16T00:59:41+00:00 hlint police - - - - - d2feaf09 by David Waern at 2010-11-16T01:14:15+00:00 hlint police - - - - - 99876e97 by David Waern at 2010-11-20T19:06:00+00:00 Haddock documentation updates - - - - - 65ce6987 by David Waern at 2010-11-20T19:42:51+00:00 Follow the style guide closer in Haddock.Types and improve docs - - - - - 28ca304a by tob.brandt at 2010-11-20T17:04:40+00:00 add full qualification for undocumented names - - - - - d61341e3 by David Waern at 2010-11-20T20:04:15+00:00 Re-structure qualification code a little - - - - - 0057e4d6 by David Waern at 2010-11-20T20:07:55+00:00 Re-order functions - - - - - d7279afd by David Waern at 2010-11-21T03:39:54+00:00 Add BangPatterns to alex and happy source files - - - - - 629fe60e by tob.brandt at 2010-11-23T23:35:11+00:00 documentation for qualification - - - - - 37031cee by David Waern at 2010-11-23T21:06:44+00:00 Update CHANGES - don't mention 2.8.2, we won't release it - - - - - f2489e19 by David Waern at 2010-12-01T21:57:11+00:00 Update deps of runtests.hs to work with ghc 7.0.1 - - - - - d3657e9a by David Waern at 2010-12-01T22:04:57+00:00 Make tests compile with ghc 7.0.1 - - - - - a2f09d9b by David Waern at 2010-12-01T22:06:59+00:00 Update tests following version bump - - - - - 50883ebb by David Waern at 2010-12-06T14:09:18+00:00 Update tests following recent changes - - - - - fc2fadeb by David Waern at 2010-12-06T14:17:29+00:00 Add a flag --pretty-html for rendering indented html with newlines - - - - - 30832ef2 by David Waern at 2010-12-06T14:17:35+00:00 Use --pretty-html when running the test suite. Makes it easier to compare output - - - - - a0b81b31 by David Waern at 2010-12-06T14:18:27+00:00 Wibble - - - - - 3aaa23fe by David Waern at 2010-12-06T14:19:29+00:00 Haddockify ppHtml comments - - - - - 24bb24f0 by David Waern at 2010-12-06T14:23:15+00:00 Remove --debug. It was't used, and --verbosity should take its place - - - - - 6bc076e5 by David Waern at 2010-12-06T14:25:37+00:00 Rename golden-tests into html-tests. "golden tests" sounds strange - - - - - 53301e55 by David Waern at 2010-12-06T14:26:26+00:00 QUALI -> QUAL in the description --qual for consistency - - - - - 98b6affb by David Waern at 2010-12-06T21:54:02+00:00 Bump version - - - - - 371bf1b3 by David Waern at 2010-12-06T22:08:55+00:00 Update tests following version bump - - - - - 25be762d by David Waern at 2010-12-06T22:21:03+00:00 Update CHANGES - - - - - 7c7dac71 by David Waern at 2010-12-06T22:33:43+00:00 Update ANNOUNCE - - - - - 30d7a5f2 by Simon Peyton Jones at 2010-11-15T08:38:38+00:00 Alex generates BangPatterns, so make Lex.x accept them (It'd be better for Alex to generate this pragma.) - - - - - 605e8018 by Simon Marlow at 2010-11-17T11:37:24+00:00 Add {-# LANGUAGE BangPatterns #-} to mollify GHC - - - - - a46607ba by David Waern at 2010-12-07T14:08:10+00:00 Solve conflicts - - - - - b28cda66 by David Waern at 2010-12-09T20:41:35+00:00 Docs: Mention that \ is a special character in markup - - - - - a435bfdd by Ian Lynagh at 2010-11-17T14:01:19+00:00 TAG GHC 7.0.1 release - - - - - 5a15a05a by David Waern at 2010-12-11T17:51:19+00:00 Fix indentation problem - - - - - 4232289a by Lennart Kolmodin at 2010-12-17T18:32:03+00:00 Revise haddock.cabal given that we now require ghc-7 default-language should be Haskell2010, slight new semantics for extensions. Rewrite into clearer dependencies of base and Cabal. - - - - - a36302dc by David Waern at 2010-12-19T17:12:37+00:00 Update CHANGES - - - - - 7c8b85b3 by David Waern at 2010-12-19T17:14:24+00:00 Bump version - - - - - cff22813 by Ian Lynagh at 2011-01-05T18:24:27+00:00 Write hoogle output in utf8; fixes GHC build on Windows - - - - - c7e762ea by David Waern at 2011-01-22T00:00:35+00:00 Put title outside doc div when HTML:fying title+prologue Avoids indenting the title, and makes more sense since the title is not a doc string anyway. - - - - - 5f639054 by David Waern at 2011-01-22T16:09:44+00:00 Fix spelling error - contributed by Marco Silva - - - - - c11dce78 by Ian Lynagh at 2011-01-07T02:33:11+00:00 Follow GHC build system changes - - - - - 101cfaf5 by David Waern at 2011-01-08T14:06:44+00:00 Bump version - - - - - af62348b by David Waern at 2011-01-08T14:07:07+00:00 TAG 2.9.2 - - - - - 4d1f6461 by Ian Lynagh at 2011-01-07T23:06:57+00:00 Name the haddock script haddock-ghc-7.0.2 instead of haddock-7.0.2; haskell/haddock#4882 "7.0.2" looked like a haddock version number before - - - - - 8ee4d5d3 by Simon Peyton Jones at 2011-01-10T17:31:12+00:00 Update Haddock to reflect change in hs_tyclds field of HsGroup - - - - - 06f3e3db by Ian Lynagh at 2011-03-03T15:02:37+00:00 TAG GHC 7.0.2 release - - - - - 7de0667d by David Waern at 2011-03-10T22:47:13+00:00 Update CHANGES - - - - - 33a9f1c8 by David Waern at 2011-03-10T22:47:31+00:00 Fix build with ghc 7.0.1 - - - - - 4616f861 by David Waern at 2011-03-10T22:47:50+00:00 TAG 2.9.2-actual - - - - - 0dab5e3c by Simon Hengel at 2011-04-08T15:53:01+00:00 Set shell script for unit tests back to work - - - - - 85c54dee by Simon Hengel at 2011-04-08T16:01:24+00:00 Set unit tests back to work Here "ghci>" was still used instead of ">>>". - - - - - 1cea9b78 by Simon Hengel at 2011-04-08T16:25:36+00:00 Update runtests.hs for GHC 7.0.2 - - - - - 8e5b3bbb by Simon Hengel at 2011-04-08T16:28:49+00:00 Update Haddock version in *.html.ref - - - - - 2545e955 by Simon Hengel at 2011-04-08T17:09:28+00:00 Add support for blank lines in the result of examples Result lines that only contain the string "<BLANKLINE>" are treated as a blank line. - - - - - adf64d2e by Simon Hengel at 2011-04-08T17:36:50+00:00 Add documentation for "support for blank lines in the result of examples" - - - - - c51352ca by David Waern at 2011-05-21T23:57:56+00:00 Improve a haddock comment - - - - - 7419cf2c by David Waern at 2011-05-22T15:41:52+00:00 Use cabal's test suite support to run the test suite This gives up proper dependency tracking of the test script. - - - - - 7770070c by David Waern at 2011-05-22T01:45:44+00:00 We don't need to send DocOptions nor a flag to mkExportItems - - - - - 9d95b7b6 by David Waern at 2011-05-22T21:39:03+00:00 Fix a bug - - - - - 1f93699b by David Waern at 2011-05-22T21:40:21+00:00 Break out fullContentsOf, give it a better name and some documentation The documentation describes how we want this function to eventually behave, once we have fixed a few problems with the current implementation. - - - - - 9a86432f by David Waern at 2011-05-22T21:53:52+00:00 Fix some stylistic issues in mkExportItems - - - - - c271ff0c by David Waern at 2011-05-22T22:09:11+00:00 Indentation - - - - - 93e602b1 by David Waern at 2011-06-10T01:35:31+00:00 Add git commits since switchover: darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower at hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo at earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm at cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo at earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC - - - - - 498da5ae by David Waern at 2011-06-11T00:33:33+00:00 * Merge in git patch from Michal Terepeta >From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001 From: Michal Terepeta <michal.terepeta at gmail.com> Date: Sat, 14 May 2011 19:18:22 +0200 Subject: [PATCH] Follow the change of TypeSig in GHC. This follows the change in GHC to make TypeSig take a list of names (instead of just one); GHC ticket haskell/haddock#1595. This should also improve the Haddock output in case the user writes a type signature that refers to many names: -- | Some comment.. foo, bar :: ... will now generate the expected output with one signature for both names. - - - - - 094607fe by Ian Lynagh at 2011-06-17T19:10:29+01:00 Fix build - - - - - 8fa35740 by Ian Lynagh at 2011-06-26T21:06:40+01:00 Bump GHC dep to allow 7.2 - - - - - e4d2ca3c by Ian Lynagh at 2011-07-07T23:06:28+01:00 Relax base dep - - - - - b948fde9 by Ian Lynagh at 2011-07-28T16:39:45+01:00 GHC build system: Don't install the datafiles twice - - - - - f82f6d70 by Simon Marlow at 2011-08-11T12:08:15+01:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - b341cc12 by Max Bolingbroke at 2011-08-22T20:25:27+01:00 Fix compilation with no-pred-ty GHC - - - - - 30494581 by Max Bolingbroke at 2011-08-23T10:20:54+01:00 Remaining fixes for PredTy removal - - - - - 0b197138 by Max Bolingbroke at 2011-08-26T08:27:45+01:00 Rename factKind to constraintKind - - - - - a379bec5 by Max Bolingbroke at 2011-09-04T12:54:47+01:00 Deal with change to IParam handling in GHC - - - - - f94e421b by Max Bolingbroke at 2011-09-06T17:34:31+01:00 Adapt Haddock for the ConstraintKind extension changes - - - - - 8821e5cc by Max Bolingbroke at 2011-09-09T08:24:59+01:00 Ignore associated type defaults (just as we ignore default methods) - - - - - 31a0afd4 by Max Bolingbroke at 2011-09-09T09:06:00+01:00 Merge branch 'no-pred-ty' of ssh://darcs.haskell.org/srv/darcs/haddock into no-pred-ty - - - - - dd3b530a by Max Bolingbroke at 2011-09-09T14:10:25+01:00 Merge branch 'no-pred-ty' Conflicts: src/Haddock/Convert.hs - - - - - 5f25ec96 by Max Bolingbroke at 2011-09-09T14:10:40+01:00 Replace FactTuple with ConstraintTuple - - - - - cd30b9cc by David Waern at 2011-09-26T02:17:55+02:00 Bump to version 2.9.3 - - - - - 4fbfd397 by Max Bolingbroke at 2011-09-27T14:55:21+01:00 Follow changes to BinIface Name serialization - - - - - 92257d90 by David Waern at 2011-09-30T23:45:07+02:00 Fix problem with test files not added to distribution tarball - - - - - 00255bda by David Waern at 2011-09-30T23:48:24+02:00 Merge branch 'development' - - - - - 5421264f by David Waern at 2011-10-01T01:25:39+02:00 Merge in darcs patch from Simon Meier: Wed Jun 1 19:41:16 CEST 2011 iridcode at gmail.com * prettier haddock coverage info The new coverage info rendering uses less horizontal space. This reduces the number of unnecessary line-wrappings. Moreover, the most important information, how much has been documented already, is now put up front. Hopefully, this makes it more likely that a library author is bothered by the low coverage of his modules and fixes that issue ;-) - - - - - 07d318ef by David Waern at 2011-10-01T01:34:10+02:00 Use printException instead of deprecated printExceptionAndWarnings - - - - - 40d52ee4 by David Waern at 2011-10-01T01:41:13+02:00 Merge in darcs pach: Mon Apr 11 18:09:54 JST 2011 Liyang HU <haddock at liyang.hu> * Remember collapsed sections in index.html / haddock-util.js - - - - - 279d6dd4 by David Waern at 2011-10-01T01:55:45+02:00 Merge in darcs patch: Joachim Breitner <mail at joachim-breitner.de>**20110619201645 Ignore-this: f6c51228205b0902ad5bfad5040b989a As reported on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578301, generating the global index takes much too long if type-level (with lots of auto-generated types) is installed. The patch avoids a quadratic runtime in the subfunction getIfaceIndex of ppHtmlIndex by using a temporary set. Runtime improvement observed here from 25.36s to 2.86s. - - - - - d1612383 by David Waern at 2011-10-01T01:56:48+02:00 Merge branch 'development' - - - - - 347520c1 by David Waern at 2011-10-01T01:56:54+02:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9a0c95e8 by David Waern at 2011-10-01T02:19:10+02:00 Improve .cabal file - - - - - 6967dc64 by Ian Lynagh at 2011-10-01T01:34:06+01:00 Follow changes to ForeignImport/ForeignExport in GHC - - - - - 565cb26b by Simon Marlow at 2011-10-04T00:15:04+02:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - 8b74f512 by David Waern at 2011-10-04T00:18:17+02:00 Requre ghc >= 7.2 - - - - - 271d360c by David Waern at 2011-10-04T00:22:50+02:00 Bump version to 2.9.4 - - - - - 37f3edb0 by David Waern at 2011-10-06T02:30:21+02:00 Add alex and happy to build-tools. - - - - - 7ac2bb6e by David Terei at 2011-10-12T14:02:55-07:00 Add safe haskell indication to haddock output - - - - - 42c91a47 by David Terei at 2011-10-12T14:06:03-07:00 Fix CSS issue with info table not being contained in module header - - - - - 0eddab6c by David Terei at 2011-10-12T14:06:58-07:00 Add safe haskell indication to haddock output - - - - - 3df058eb by David Terei at 2011-10-12T14:07:07-07:00 Fix CSS issue with info table not being contained in module header - - - - - a40a6c3f by David Waern at 2011-10-22T11:29:06+02:00 Bump .haddock file version since the format has changed recently - - - - - 8a6254be by David Waern at 2011-10-22T11:30:42+02:00 Merge branch 'development' - - - - - 642e3e02 by David Waern at 2011-10-23T21:23:39+02:00 Sort import list - - - - - 36371cf8 by David Waern at 2011-10-23T22:48:18+02:00 Remove NEW_GHC_LAYOUT conditional. - - - - - 5604b499 by David Waern at 2011-10-27T00:15:03+02:00 Add --print-ghc-path. - - - - - 463499fa by David Waern at 2011-10-27T00:16:22+02:00 Make testsuite able to find its dependencies automatically. - - - - - a3506172 by Ryan Newton at 2011-11-05T05:59:58-04:00 Improved declNames internal error. Added a case to handle DocD. - - - - - 001b8baf by David Waern at 2011-11-05T20:37:29+01:00 Rename copy.hs -> accept.hs. - - - - - 55d808d3 by David Waern at 2011-11-05T23:30:02+01:00 Fix build. - - - - - deb5c3be by David Waern at 2011-11-06T00:01:47+01:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9b663554 by David Waern at 2011-11-06T00:03:45+01:00 Merge https://github.com/rrnewton/haddock - - - - - 1abb0ff6 by David Waern at 2011-11-06T01:20:37+01:00 Use getDeclMainBinder instead of declNames. - - - - - 4b005c01 by David Waern at 2011-11-06T19:09:53+01:00 Fix build. - - - - - c2c51bc7 by Ian Lynagh at 2011-11-06T23:01:33+00:00 Remove -DNEW_GHC_LAYOUT in ghc.mk - - - - - f847d703 by Jose Pedro Magalhaes at 2011-11-11T09:07:39+00:00 New kind-polymorphic core This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds - - - - - 7d7c3b09 by Jose Pedro Magalhaes at 2011-11-16T21:42:22+01:00 Follow changes to tuple sorts in master - - - - - 8430e03e by Simon Peyton Jones at 2011-11-17T10:20:27+00:00 Remove redundant imports - - - - - d1b06832 by Ian Lynagh at 2011-11-19T01:33:21+00:00 Follow GHC build system change to the way we call rm - - - - - 9e2230ed by David Waern at 2011-11-24T15:00:24+01:00 Fix a bug in test runner and get rid of regex-compat dependency. - - - - - 52039b21 by David Waern at 2011-11-24T23:55:36+01:00 Avoid haskell98 dependency in test - - - - - 92e1220d by David Waern at 2011-11-25T00:03:33+01:00 Avoid depency on regex-compat also in accept.hs. - - - - - ddac6b6f by David Waern at 2011-11-25T02:13:38+01:00 Accept test output. - - - - - 5a720455 by David Waern at 2011-11-25T02:16:20+01:00 Some more changes to test scripts. - - - - - 170a9004 by David Waern at 2011-11-25T02:30:41+01:00 Add flag --interface-version. - - - - - d225576c by David Waern at 2011-11-25T02:39:26+01:00 Remove #ifs for older compiler versions. - - - - - f0d0a4f5 by David Waern at 2011-11-26T04:20:12+01:00 Give preference to type over data constructors for doc comment links at renaming time. Previously this was done in the backends. Also, warn when a doc comment refers to something that is in scope but which we don't have the .haddock file for. These changes mean we can make DocIdentifier [a] into DocIdentifier a. - - - - - eef0e776 by David Waern at 2011-11-26T17:01:06+01:00 Allow doc comments to link to out-of-scope things (#78). (A bug that should have been fixed long ago.) - - - - - 565ad529 by David Waern at 2011-11-26T19:56:21+01:00 Update tests. - - - - - fb3ce7b9 by David Waern at 2011-11-26T21:44:28+01:00 Cleanup. - - - - - d0328126 by David Waern at 2011-11-26T22:10:28+01:00 Fix module reference bug. - - - - - c03765f8 by David Waern at 2011-12-03T05:20:20+01:00 Slightly better behaviour on top-levels without type signatures. - Docs don't get attached to the next top-level with signature by mistake. - If there's an export list and the top-level is part of it, its doc comment shows up in the documentation. - - - - - 48461d31 by David Waern at 2011-12-03T05:38:10+01:00 Add a test for Unicode doc comments. - - - - - 549c4b4e by David Waern at 2011-12-03T19:07:55+01:00 Cleanup. - - - - - 7bfecf91 by David Waern at 2011-12-03T20:13:08+01:00 More cleanup. - - - - - 14fab722 by Ian Lynagh at 2011-12-12T21:21:35+00:00 Update dependencies and binaryInterfaceVersion - - - - - 469e6568 by Ian Lynagh at 2011-12-18T12:56:16+00:00 Fix (untested) building from source tarball without alex/happy haddock's .cabal file was declaring that it needed alex and happy to build, but in the GHC source tarballs it doesn't. - - - - - 895c9a8c by David Waern at 2011-12-27T12:57:43+01:00 Go back to having a doc, sub and decl map instead of one big decl map. This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer. - - - - - 736767d9 by David Waern at 2011-12-27T13:33:41+01:00 Merge ../../../haddock Conflicts: src/Haddock/InterfaceFile.hs - - - - - 20016f79 by David Waern at 2011-12-27T13:57:23+01:00 Bump version. - - - - - 31f276fb by David Waern at 2011-12-27T13:57:32+01:00 Merge ../ghc/utils/haddock - - - - - 95b367cd by David Waern at 2011-12-27T14:57:29+01:00 Update tests following version bump. - - - - - fa3c94cd by David Waern at 2011-12-27T14:57:51+01:00 Get rid of quite unnecessary use of different lists. - - - - - 9c4d3c54 by David Waern at 2011-12-27T15:26:42+01:00 Cleanup. - - - - - 2caf9f90 by David Waern at 2011-12-27T16:18:05+01:00 Wibbles. - - - - - 3757d09b by David Waern at 2011-12-27T20:50:26+01:00 Complete support for inferring types for top-level bindings. - - - - - 53418734 by David Waern at 2011-12-28T15:02:13+01:00 Minor fixes and cleanup. - - - - - 0c9d0385 by Ian Lynagh at 2012-01-03T18:31:29+00:00 Follow rename of Instance to ClsInst in GHC - - - - - c9bc969a by Simon Hengel at 2012-01-12T21:28:14+01:00 Make sure that generated xhtml is valid (close haskell/haddock#186) Thanks to Phyx. - - - - - 836a0b9a by David Waern at 2012-02-01T02:30:05+01:00 Fix bug introduced in my recent refactoring. - - - - - c7d733eb by David Waern at 2012-02-01T02:30:26+01:00 Cleanup mkMaps and avoid quadratic behaviour. - - - - - da3cda8f by David Waern at 2012-02-01T02:56:56+01:00 Require ghc >= 7.4. - - - - - 83a3287e by David Waern at 2012-02-01T02:57:36+01:00 Update CHANGES. - - - - - 93408f0b by Simon Hengel at 2012-02-04T00:48:04+01:00 Add reference renderings - - - - - 49d00d2c by Simon Hengel at 2012-02-04T00:48:25+01:00 Set unit tests for parser back to work - - - - - eb450980 by Simon Hengel at 2012-02-04T00:49:07+01:00 Add .gitignore - - - - - a841602c by Simon Hengel at 2012-02-04T00:49:16+01:00 Add .ghci file - - - - - 8861199d by Simon Hengel at 2012-02-04T00:49:29+01:00 tests/html-tests/copy.hs: Use mapM_ instead of mapM So we do net get a list of () on stdout when running with runhaskell. - - - - - b477d9b5 by Simon Hengel at 2012-02-04T00:49:46+01:00 Remove index files from golden tests - - - - - 9dbda34e by Simon Hengel at 2012-02-04T00:49:57+01:00 Add /tests/html-tests/tests/*index*.ref to .gitignore - - - - - a9434817 by Simon Hengel at 2012-02-04T00:50:04+01:00 Add DocWarning to Doc The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis. - - - - - de2fb6fa by Simon Hengel at 2012-02-04T00:50:13+01:00 Add support for module warnings - - - - - 0640920e by Simon Hengel at 2012-02-04T00:50:21+01:00 Add tests for module warnings - - - - - 30ce0d77 by Simon Hengel at 2012-02-04T00:50:29+01:00 Add support for warnings - - - - - bb367960 by Simon Hengel at 2012-02-04T00:50:37+01:00 Add tests for warnings - - - - - 6af1dc2d by Simon Hengel at 2012-02-04T00:50:50+01:00 Expand type signatures in export list (fixes haskell/haddock#192) - - - - - a06cbf25 by Simon Hengel at 2012-02-04T00:51:04+01:00 Expand type signatures for modules without explicit export list - - - - - 57dda796 by Simon Hengel at 2012-02-04T00:51:15+01:00 Remove obsolete TODO - - - - - 270c3253 by David Waern at 2012-02-04T00:51:24+01:00 Fix issues in support for warnings. * Match against local names only. * Simplify (it's OK to map over the warnings). - - - - - 683634bd by David Waern at 2012-02-04T00:55:11+01:00 Some cleanup and make sure we filter warnings through exports. - - - - - 210cb4ca by David Waern at 2012-02-04T03:01:30+01:00 Merge branch 'fix-for-186' of https://github.com/sol/haddock into ghc-7.4 - - - - - e8db9031 by David Waern at 2012-02-04T03:07:51+01:00 Style police. - - - - - 261f9462 by David Waern at 2012-02-04T03:20:16+01:00 Update tests. - - - - - 823cfc7c by David Waern at 2012-02-04T03:21:12+01:00 Use mapM_ in accept.hs as well. - - - - - 873dd619 by David Waern at 2012-02-04T03:21:33+01:00 Remove copy.hs - use accept.hs instead. - - - - - 0e31a14a by David Waern at 2012-02-04T03:47:33+01:00 Use <> instead of mappend. - - - - - 2ff7544f by David Waern at 2012-02-04T03:48:55+01:00 Remove code for older ghc versions. - - - - - dacf2786 by David Waern at 2012-02-04T15:52:51+01:00 Clean up some code from last SoC project. - - - - - 00cbb117 by David Waern at 2012-02-04T21:43:49+01:00 Mostly hlint-inspired cleanup. - - - - - 7dc86cc2 by Simon Peyton Jones at 2012-02-06T09:14:41+00:00 Track changes in HsDecls - - - - - f91f82fe by Ian Lynagh at 2012-02-16T13:40:11+00:00 Follow changes in GHC caused by the CAPI CTYPE pragma - - - - - a0ea6b0b by Ian Lynagh at 2012-02-22T02:26:12+00:00 Follow changes in GHC - - - - - b23b07d1 by Simon Peyton Jones at 2012-03-02T16:36:41+00:00 Follow changes in data representation from the big PolyKinds commit - - - - - 43406022 by Simon Hengel at 2012-03-05T11:18:34+01:00 Save/restore global state for static flags when running GHC actions This is necessary if we want to run createInterfaces (from Documentation.Haddock) multiple times in the same process. - - - - - 9fba16fe by Paolo Capriotti at 2012-03-06T10:57:33+00:00 Update .gitignore. - - - - - a9325044 by Simon Peyton Jones at 2012-03-14T17:35:42+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - fd48065a by Iavor Diatchki at 2012-03-15T22:43:35-07:00 Add support for type-level literals. - - - - - 2e8206dd by Simon Peyton Jones at 2012-03-16T14:18:22+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - 93e13319 by Simon Peyton Jones at 2012-03-17T01:04:05+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock Conflicts: src/Haddock/Convert.hs - - - - - d253fa71 by Iavor Diatchki at 2012-03-19T20:12:18-07:00 Merge remote-tracking branch 'origin/master' into type-nats - - - - - fc40acc8 by Iavor Diatchki at 2012-03-19T20:31:27-07:00 Add a missing case for type literals. - - - - - fd2ad699 by Iavor Diatchki at 2012-03-24T13:28:29-07:00 Rename variable to avoid shadowing warning. - - - - - 9369dd3c by Simon Peyton Jones at 2012-03-26T09:14:23+01:00 Follow refactoring of TyClDecl/HsTyDefn - - - - - 38825ca5 by Simon Peyton Jones at 2012-03-26T09:14:37+01:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - 4324ac0f by David Waern at 2012-04-01T01:51:19+02:00 Disable unicode test. - - - - - 3165b750 by David Waern at 2012-04-01T01:51:34+02:00 Take reader environment directly from TypecheckedSource. - - - - - 213b644c by David Waern at 2012-04-01T01:55:20+02:00 Cleanup. - - - - - 3118b4ba by David Waern at 2012-04-01T02:16:15+02:00 Don't filter out unexported names from the four maps - fixes a regression. - - - - - d6524e17 by David Waern at 2012-04-01T02:40:34+02:00 Fix crash when using --qual. Naughty GHC API! - - - - - ea3c43d8 by Henning Thielemann at 2012-04-01T13:03:07+02:00 add QualOption type for distinction between qualification argument given by the user and the actual qualification for a concrete module - - - - - 5422ff05 by Henning Thielemann at 2012-04-01T16:25:02+02:00 emit an error message when the --qual option is used incorrectly - - - - - 026e3404 by David Waern at 2012-04-01T18:10:30+02:00 Don't crash on unicode strings in doc comments. - - - - - ce006632 by David Waern at 2012-04-01T20:13:35+02:00 Add test for --ignore-all-exports flag/ignore-exports pragma. - - - - - 6e4dd33c by David Waern at 2012-04-01T20:21:03+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.4 - - - - - 734ae124 by Henning Thielemann at 2012-04-01T20:22:10+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - 622f9ba5 by David Waern at 2012-04-01T21:26:13+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 55ce17cb by Henning Thielemann at 2012-04-01T22:03:25+02:00 'abbreviate' qualification style - basic support Currently we ignore the package a module is imported from. This means that a module import would shadow another one with the same module name from a different package. - - - - - c85314ef by David Waern at 2012-04-01T22:05:12+02:00 Check qualification option before processing modules. - - - - - ae4b626c by Henning Thielemann at 2012-04-02T00:19:36+02:00 abbreviated qualification: use Packages.lookupModuleInAllPackages for finding the package that a module belongs to - - - - - 60bdbcf5 by Henning Thielemann at 2012-04-02T00:25:31+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - df44301d by Henning Thielemann at 2012-04-02T00:29:05+02:00 qualification style 'abbreviated' -> 'aliased' - - - - - f4192a64 by David Waern at 2012-04-02T01:05:47+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 7ba09067 by David Terei at 2012-04-04T15:08:21-07:00 Fix reporting of modules safe haskell mode (#5989) - - - - - d0cc33d0 by David Terei at 2012-04-06T15:50:41+01:00 Fix reporting of modules safe haskell mode (#5989) - - - - - 6e3434c5 by Simon Peyton Jones at 2012-04-20T18:37:46+01:00 Track changes in HsSyn - - - - - 22014ed0 by Simon Peyton Jones at 2012-05-11T22:45:15+01:00 Follow changes to LHsTyVarBndrs - - - - - d9a07b24 by David Waern at 2012-05-15T01:46:35+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - a6c4ebc6 by David Waern at 2012-05-16T02:18:32+02:00 Update CHANGES. - - - - - 8e181d29 by David Waern at 2012-05-16T02:27:56+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - e358210d by David Waern at 2012-05-16T02:35:33+02:00 Mention the new aliased --qual mode in CHANGES. - - - - - efd36a28 by David Waern at 2012-05-16T21:33:13+02:00 Bump version number. - - - - - d6b3af14 by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for deprecated record field - - - - - 927f800e by Simon Hengel at 2012-05-17T19:08:20+02:00 Use >>= instead of fmap and join - - - - - 048b41d5 by Simon Hengel at 2012-05-17T19:08:20+02:00 newtype-wrap Doc nodes for things that may have warnings attached - - - - - e3a89fc3 by Simon Hengel at 2012-05-17T19:08:20+02:00 Attach warnings to `Documentation` type - - - - - 5d4cc43d by Simon Hengel at 2012-05-17T19:08:20+02:00 Simplify lookupWarning - - - - - cf8ae69d by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for haskell/haddock#205 - - - - - cb409b19 by Simon Peyton Jones at 2012-05-25T08:30:11+01:00 Follow changes in LHsTyVarBndrs - - - - - 2d5f4179 by Simon Hengel at 2012-05-26T19:21:29+02:00 Add Applicative instance for (GenRnM a) - - - - - e4373060 by Simon Hengel at 2012-05-26T19:21:33+02:00 Use a map for warnings, as suggested by @waern - - - - - 597a68c7 by Simon Hengel at 2012-05-27T08:48:24+02:00 Add an optional label to URLs - - - - - ef1ac7fe by Simon Hengel at 2012-05-27T08:48:24+02:00 Add support for hyperlink labels to parser - - - - - 41f2adce by Simon Hengel at 2012-05-27T08:48:24+02:00 Add golden test for hyperlinks - - - - - 83d5e764 by Simon Hengel at 2012-05-27T08:50:02+02:00 Use LANGUAGE pragmas instead of default-extensions in cabal file - - - - - ddb755e5 by Simon Hengel at 2012-05-27T08:50:02+02:00 Fix typo in comment - - - - - 110676b4 by Simon Hengel at 2012-05-27T08:50:02+02:00 Add a type signature for a where-binding - - - - - 7d9ba2a0 by Ian Lynagh at 2012-06-12T14:38:01+01:00 Follow changes in GHC - - - - - 47c704f2 by Ian Lynagh at 2012-06-12T18:52:16+01:00 Follow changes in GHC - - - - - e1efe1ab by Simon Peyton Jones at 2012-06-13T17:25:29+01:00 Follow changes for the implementation of implicit parameters - - - - - 69abc81c by Ian Lynagh at 2012-06-19T22:52:58+01:00 Follow changes in base - - - - - 9d074a21 by Paolo Capriotti at 2012-06-22T18:26:47+01:00 Use right docMap to get decl documentation. - - - - - e3292ef6 by Ian Lynagh at 2012-07-15T01:31:19+01:00 Follow changes in GHC - - - - - ceae56b0 by Ian Lynagh at 2012-07-16T21:22:48+01:00 Fix haddock following some GHC changes Passing _|_ as the Settings for defaultDynFlags no longer works well enough - - - - - 9df72735 by Paolo Capriotti at 2012-07-19T16:49:32+01:00 Forward port changes from stable. - - - - - 572f5fcf by Ian Lynagh at 2012-07-19T20:38:26+01:00 Merge branch 'master' of darcs.haskell.org:/srv/darcs//haddock - - - - - 9195aca4 by Paolo Capriotti at 2012-07-20T10:27:28+01:00 Update dependencies. - - - - - 33db3923 by Ian Lynagh at 2012-07-20T17:54:43+01:00 Build with GHC 7.7 - - - - - 925a2cea by David Waern at 2012-07-23T16:50:40+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.6 Conflicts: src/Haddock/InterfaceFile.hs - - - - - d710ef97 by David Waern at 2012-07-23T16:52:07+02:00 Bump version number. - - - - - eb0c2f83 by David Waern at 2012-07-23T16:57:58+02:00 Update CHANGES. - - - - - b3f56943 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Hide "internal" instances This fixes haskell/haddock#37 (http://trac.haskell.org/haddock/ticket/37) Precisely, we show an instance iff its class and all the types are exported by non-hidden modules. - - - - - a70aa412 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Tests for hiding instances (#37) - - - - - c0f4aa58 by Simon Hengel at 2012-07-27T13:00:13+03:00 Add an other test for hiding instances (#37) - - - - - a7ed6268 by Ian Lynagh at 2012-08-07T14:48:13+01:00 Follow changes in GHC - - - - - 0ab30d38 by Ian Lynagh at 2012-08-13T22:12:27+01:00 Improve haddock memory usage - - - - - 0eaa4e30 by Ian Lynagh at 2012-08-13T23:58:46+01:00 Improve haddock memory usage - - - - - 659d26cf by Ian Lynagh at 2012-08-14T13:16:48+01:00 Remove some temporary pragmas I accidentally recorded - - - - - d97fceb6 by Simon Hengel at 2012-08-25T13:19:34+02:00 Add missing dependency to library - - - - - 4c910697 by Simon Hengel at 2012-08-28T07:39:14+02:00 Move .ghci to project root - - - - - fc3c601a by Simon Hengel at 2012-08-28T07:39:14+02:00 accept.hs: Ignore some files - - - - - 1af9b984 by Simon Hengel at 2012-08-28T07:40:04+02:00 Update reference renderings (bump version) - - - - - 980dc253 by Simon Hengel at 2012-08-28T07:40:32+02:00 Update reference renderings (remove links for ()) - - - - - 33651dbf by Simon Hengel at 2012-08-28T07:41:50+02:00 Update documentation of `runInteractiveProcess` in reference rendering - - - - - 7ab25078 by David Waern at 2012-09-07T10:38:50+02:00 Merge branch 'hiddenInstances2' of http://github.com/feuerbach/haddock into ghc-7.6 - - - - - c3de3a4b by David Waern at 2012-09-07T14:29:27+02:00 Follow changes in GHC. - - - - - 298c43ac by David Waern at 2012-09-07T14:59:24+02:00 Update CHANGES. - - - - - e797993a by David Waern at 2012-09-07T15:21:30+02:00 Update ANNOUNCE. - - - - - d0b44790 by David Waern at 2012-09-07T15:22:43+02:00 Merge branch 'hidden-instances' into ghc-7.6 - - - - - 41a4adc8 by Simon Hengel at 2012-09-08T12:08:37+02:00 Update doc/README - - - - - 71ad1040 by Simon Hengel at 2012-09-08T12:17:17+02:00 Add documentation for URL labels - - - - - 9bb41afd by Simon Peyton Jones at 2012-09-20T18:14:26+01:00 Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs - - - - - b8139bfa by Simon Hengel at 2012-09-21T14:24:16+02:00 Disable Unicode test for now - - - - - a5fafdd7 by Simon Hengel at 2012-09-21T14:35:45+02:00 Update TypeOperators test for GHC 7.6.1 Type operators can't be used as type variables anymore! - - - - - 6ccf0025 by Simon Hengel at 2012-09-21T16:02:24+02:00 Remove (Monad (Either e)) instance from ref. rendering of CrossPackageDocs I do not really understand why the behavior changed, so I'll open a ticket, so that we can further investigate. - - - - - b5c6c138 by Ian Lynagh at 2012-09-27T02:00:57+01:00 Follow changes in GHC build system - - - - - b98eded0 by David Waern at 2012-09-27T15:37:02+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 76cc2051 by David Waern at 2012-09-27T15:48:19+02:00 Update hidden instances tests. - - - - - aeaa1c59 by David Waern at 2012-09-28T10:21:32+02:00 Make API buildable with GHC 7.6. - - - - - d76be1b0 by Simon Peyton Jones at 2012-09-28T15:57:05+01:00 Merge remote-tracking branch 'origin/master' into tc-untouchables - - - - - a1922af8 by David Waern at 2012-09-28T19:50:20+02:00 Fix spurious superclass constraints bug. - - - - - bc41bdbb by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove old examples - - - - - bed7d3dd by Simon Hengel at 2012-10-01T11:30:51+02:00 Adapt parsetests for GHC 7.6.1 - - - - - dcdb22bb by Simon Hengel at 2012-10-01T11:30:51+02:00 Add test-suite section for parsetests to cabal file + get rid of HUnit dependency - - - - - 1e5263c9 by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove test flag from cabal file This was not really used. - - - - - 4beee98b by David Waern at 2012-09-28T23:42:28+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 11dd2256 by Ian Lynagh at 2012-10-03T16:17:35+01:00 Follow change in GHC build system - - - - - fbd77962 by Simon Hengel at 2012-10-03T18:49:40+02:00 Remove redundant dependency from cabal file - - - - - 09218989 by Simon Hengel at 2012-10-04T16:03:05+02:00 Fix typo - - - - - 93a2d5f9 by Simon Hengel at 2012-10-04T16:11:41+02:00 Remove trailing whitespace from cabal file - - - - - c8b46cd3 by Simon Hengel at 2012-10-04T16:12:17+02:00 Export Haddock's main entry point from library - - - - - b411e77b by Simon Hengel at 2012-10-04T16:29:46+02:00 Depend on library for executable The main motivation for this is to increase build speed. In GHC's source tree the library is not build, but all modules are now required for the executable, so that GHC's validate will now detect build failures for the library. - - - - - f8f0979f by Simon Hengel at 2012-10-05T00:32:57+02:00 Set executable flag for Setup.lhs - - - - - dd045998 by Simon Hengel at 2012-10-07T16:44:06+02:00 Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. - - - - - 7b39c3ae by Simon Hengel at 2012-10-07T17:05:45+02:00 cross-package test: re-export IsString instead of Monad There is a monad instance for Q, which is not available on platforms that do not have GHCi support. This caused CrossPackageDocs to fail on those platforms. Re-exporting IsString should test the same thing, but it works on all platforms. - - - - - 0700c605 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Fix some warnings - - - - - f78eca79 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Make -Wall proof - - - - - 6beec041 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Use listToMaybe/fromMaybe instead of safeHead/maybe - - - - - 44b8ce86 by Ian Lynagh at 2012-10-08T21:59:46+01:00 Follow changes in GHC - - - - - 6da5f702 by Simon Hengel at 2012-10-09T11:16:19+02:00 Update .ghci - - - - - 9ac1a1b9 by Kazu Yamamoto at 2012-10-09T12:45:31+02:00 Add markup support for properties - - - - - 1944cb42 by Simon Hengel at 2012-10-09T12:45:31+02:00 Simplify lexing/parsing of properties In contrast to what we do for examples, we do not really need to capture the "prompt" here. - - - - - bffd8e62 by Simon Hengel at 2012-10-09T13:40:14+02:00 Add HTML test for properties - - - - - 2fe9c5cb by Simon Hengel at 2012-10-09T13:40:21+02:00 Add unit tests for properties - - - - - 874e361b by Simon Hengel at 2012-10-09T13:40:33+02:00 Bump interface version - - - - - 2506cc37 by Simon Hengel at 2012-10-09T15:15:04+02:00 Fix parser bug - - - - - 743d2b7d by Simon Hengel at 2012-10-09T15:31:06+02:00 Allow to load interface files with compatible versions - - - - - 981a1660 by Simon Hengel at 2012-10-10T10:32:05+02:00 Export more types from Documentation.Haddock (fixes haskell/haddock#216) - - - - - dff7dc76 by Simon Hengel at 2012-10-10T11:15:19+02:00 Update ANNOUNCE and CHANGES - - - - - edd2bb01 by Simon Hengel at 2012-10-10T11:22:50+02:00 Bump version - - - - - 5039163b by Simon Hengel at 2012-10-10T13:56:04+02:00 Fix typo in documentation - - - - - e4ce34da by Simon Hengel at 2012-10-10T14:28:35+02:00 Add documentation for properties - - - - - 9555ebca by Simon Hengel at 2012-10-11T10:49:04+02:00 Remove redundant if-defs, more source documentation - - - - - 87aa67e1 by Simon Hengel at 2012-10-11T12:32:51+02:00 Adapt cabal file - - - - - c44c1dee by Simon Hengel at 2012-10-11T12:41:58+02:00 Require ghc 7.6 - - - - - 8383bc34 by Simon Hengel at 2012-10-11T12:50:24+02:00 Bump version - - - - - 1030eb38 by Simon Hengel at 2012-10-11T12:55:44+02:00 Update ANNOUNCE and CHANGES - - - - - 74955088 by Simon Hengel at 2012-10-12T09:49:31+02:00 Improve note about `binaryInterfaceVersion` (thanks David) - - - - - ee30f6b7 by Simon Hengel at 2012-10-13T13:40:59+02:00 Update version in html tests, rpm spec file, and user manual - - - - - f2861f18 by Simon Hengel at 2012-10-13T14:40:33+02:00 Remove unused MonadFix constraint - - - - - dfdf1a74 by Simon Hengel at 2012-10-13T15:15:38+02:00 Minor code simplification - - - - - 4ecd1e70 by Simon Hengel at 2012-10-13T15:33:43+02:00 Increase code locality - - - - - f7df5cc9 by Simon Hengel at 2012-10-13T16:03:12+02:00 Minor code simplification - - - - - e737eb6e by Simon Hengel at 2012-10-13T19:03:04+02:00 Handle HsExplicitListTy in renameer (fixes haskell/haddock#213) - - - - - c2dc8f17 by Simon Hengel at 2012-10-13T20:46:31+02:00 Better error messages - - - - - 14d48b4c by Simon Hengel at 2012-10-14T00:21:07+02:00 Simplify RnM type - - - - - 6c2cc547 by Simon Hengel at 2012-10-14T00:23:35+02:00 Simplify lookupRn - - - - - bc77ce85 by Simon Hengel at 2012-10-14T01:51:32+02:00 Organize unite tests hierarchically - - - - - 2306d117 by Simon Hengel at 2012-10-14T10:34:58+02:00 Handle more cases in renameType - - - - - 8a864203 by Simon Hengel at 2012-10-14T11:47:59+02:00 Add mini_HiddenInstances.html.ref and mini_HiddenInstancesB.html.ref - - - - - 3a978eca by Simon Hengel at 2012-10-14T11:49:28+02:00 Add /tests/html-tests/output/ to .gitignore - - - - - db18888a by Simon Hengel at 2012-10-14T13:38:21+02:00 Allow haddock markup in deprecation messages - - - - - e7cfee9f by Simon Hengel at 2012-10-14T14:00:23+02:00 If parsing of deprecation message fails, include it verbatim - - - - - 242a85be by Simon Hengel at 2012-10-14T14:13:24+02:00 Add description for PruneWithWarning test - - - - - 43d33df1 by Simon Hengel at 2012-10-14T15:40:53+02:00 Minor formatting change - - - - - 22768c44 by Simon Hengel at 2012-10-14T16:03:43+02:00 Properly handle deprecation messages for re-exported things (fixes haskell/haddock#220) - - - - - cb4b9111 by Simon Hengel at 2012-10-14T17:30:28+02:00 Add build artifacts for documentation to .gitignore - - - - - 854cd8de by Simon Hengel at 2012-10-14T23:34:51+02:00 unit-tests: Improve readability Add IsString instance for (Doc RdrName) + use <> instead of DocAppend. - - - - - c4446d54 by Simon Hengel at 2012-10-14T23:37:21+02:00 unit-tests: Minor refactoring Rename parse to parseParas. - - - - - 04f2703c by Simon Hengel at 2012-10-15T00:36:42+02:00 Fix typo - - - - - 3d109e44 by Simon Hengel at 2012-10-15T10:30:07+02:00 Add description for DeprecatedReExport test - - - - - 84f0985c by Simon Hengel at 2012-10-15T14:54:19+02:00 Move resources to /resources directory - - - - - a5de7ca6 by Simon Hengel at 2012-10-15T15:46:18+02:00 Move HTML tests to directory /html-test/ - - - - - e21f727d by Simon Hengel at 2012-10-15T19:32:42+02:00 Move HTML reference renderings to /html-test/ref/ - - - - - 3a3c6c75 by Simon Hengel at 2012-10-15T19:32:42+02:00 Copy css, images, etc. on accept - - - - - 40ead6dc by Simon Hengel at 2012-10-15T19:32:42+02:00 Move unit tests to /test directory - - - - - 99a28231 by Simon Hengel at 2012-10-15T19:32:42+02:00 Fix Setup.lhs /usr/bin/runhaskell is not installed on all systems. - - - - - 95faf45e by Simon Hengel at 2012-10-15T19:32:42+02:00 Make test management scripts more robust * They are now independent from the current directory, and hence can be called from everywhere * On UNIX/Linux they can now be run as scripts - - - - - 027aaa2d by Simon Hengel at 2012-10-15T19:53:40+02:00 Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. - - - - - e0266ede by Simon Hengel at 2012-10-15T20:03:43+02:00 Add test case for "spurious superclass constraints bug" - - - - - 52a2aa92 by Simon Hengel at 2012-10-15T20:28:55+02:00 Adapt accept.lhs, so that it ignores more index files - - - - - 53530781 by Simon Hengel at 2012-10-15T20:49:39+02:00 Rename html-test/runtests.lhs to html-test/run.lhs - - - - - 84518797 by Simon Hengel at 2012-10-15T20:49:39+02:00 Move source files for HTML tests to html-test/src - - - - - a911dc6c by Simon Hengel at 2012-10-15T20:49:39+02:00 Adapt output directory for HTML tests - - - - - d3c15857 by Ian Lynagh at 2012-10-16T16:54:43+01:00 Follow dopt->gopt rename - - - - - 956665a5 by Simon Hengel at 2012-10-18T08:42:48+02:00 Update html-test/README - - - - - 903b1029 by Simon Hengel at 2012-10-18T08:50:26+02:00 Use markdown for html-test/README - - - - - 150b4d63 by Ian Lynagh at 2012-10-18T16:36:00+01:00 Follow changes in GHC: 'flags' has been renamed 'generalFlags' - - - - - 41e04ff9 by Simon Hengel at 2012-11-28T09:54:35+01:00 Export missing types from Documentation.Haddock - - - - - 9be59237 by Ian Lynagh at 2012-11-30T23:20:47+00:00 Update dependencies - - - - - e06842f5 by Simon Hengel at 2012-12-07T20:58:05+01:00 Bump version - - - - - e3dbede0 by Simon Hengel at 2012-12-07T20:58:05+01:00 Add missing test files to cabal file (fixes haskell/haddock#230) - - - - - ee0dcca7 by Simon Hengel at 2012-12-07T20:58:05+01:00 Update CHANGES - - - - - 51601bdb by Simon Peyton Jones at 2012-12-19T17:28:35+00:00 Track changes in UNPACK pragma stuff - - - - - f2573bc1 by Richard Eisenberg at 2012-12-21T20:56:25-05:00 Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances. - - - - - f788d0fb by Simon Peyton Jones at 2012-12-23T15:49:58+00:00 Track changes in HsBang - - - - - ca460a0c by Simon Peyton Jones at 2012-12-23T15:50:28+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - f078fea6 by Simon Peyton Jones at 2013-01-02T08:33:13+00:00 Use InstEnv.instanceSig rather than instanceHead (name change) - - - - - 88e41305 by Simon Peyton Jones at 2013-01-14T17:10:27+00:00 Track change to HsBang type - - - - - e1ad4e19 by Kazu Yamamoto at 2013-02-01T11:59:24+09:00 Merge branch 'ghc-7.6' into ghc-7.6-merge-2 Conflicts: haddock.cabal src/Haddock/Interface/AttachInstances.hs src/Haddock/Interface/Create.hs src/Haddock/Interface/LexParseRn.hs src/Haddock/InterfaceFile.hs src/Haddock/Types.hs Only GHC HEAD can compile this. GHC 7.6.x cannot compile this. Some test fail. - - - - - 62bec012 by Kazu Yamamoto at 2013-02-06T11:12:28+09:00 Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.) - - - - - 013fd2e4 by Kazu Yamamoto at 2013-02-06T17:56:21+09:00 Refactoring instanceHead'. - - - - - 3148ce0e by Kazu Yamamoto at 2013-02-07T17:45:10+09:00 Using new syntax in html-test/src/GADTRecords.hs. - - - - - 626dabe7 by Gabor Greif at 2013-02-15T22:42:01+01:00 Typo - - - - - 1eb667ae by Ian Lynagh at 2013-02-16T17:02:07+00:00 Follow changes in base - - - - - 3ef8253a by Ian Lynagh at 2013-03-01T23:23:57+00:00 Follow changes in GHC's build system - - - - - 1a265a3c by Ian Lynagh at 2013-03-03T23:12:07+00:00 Follow changes in GHC build system - - - - - 69941c79 by Max Bolingbroke at 2013-03-10T09:38:28-07:00 Use Alex 3's Unicode support to properly lex source files as UTF-8 Signed-off-by: David Waern <david.waern at gmail.com> - - - - - ea687dad by Simon Peyton Jones at 2013-03-15T14:16:10+00:00 Adapt to tcRnGetInfo returning family instances too This API change was part of the fix to Trac haskell/haddock#4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays. - - - - - 971a30b0 by Andreas Voellmy at 2013-05-19T20:47:39+01:00 Fix for haskell/haddock#7879. Changed copy of utils/haddock/html/resources/html to use "cp -RL" rather than "cp -R". This allows users to run validate in a build tree, where the build tree was setup using lndir with a relative path to the source directory. - - - - - 31fb7694 by Ian Lynagh at 2013-05-19T20:47:49+01:00 Use "cp -L" when making $(INPLACE_LIB)/latex too - - - - - e9952233 by Simon Hengel at 2013-06-01T18:06:50+02:00 Add -itest to .ghci - - - - - b06873b3 by Mateusz Kowalczyk at 2013-06-01T18:06:50+02:00 Workaround for a failing build with --enable-tests. - - - - - e7858d16 by Simon Hengel at 2013-06-01T19:29:28+02:00 Fix broken test - - - - - 0690acb1 by Richard Eisenberg at 2013-06-21T14:08:25+01:00 Updates to reflect changes in HsDecls to support closed type families. - - - - - 7fd347ec by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 53ed81b6 by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 931c4f4f by Richard Eisenberg at 2013-07-24T13:15:59+01:00 Remove (error "synifyKind") to use WithinType, to allow haddock to process base. - - - - - 55a9c804 by Richard Eisenberg at 2013-08-02T15:54:55+01:00 Changes to reflect changes in GHC's type HsTyVarBndr - - - - - b6e9226c by Mathieu Boespflug at 2013-08-04T10:39:43-07:00 Output Copright and License keys in Xhtml backend. This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern at gmail.com> - - - - - 4c66028a by David Waern at 2013-08-04T15:27:36-07:00 Bump interface file version. - - - - - 67340163 by David Waern at 2013-08-09T16:12:51-07:00 Update tests. - - - - - 2087569b by Mateusz Kowalczyk at 2013-08-25T09:24:13+02:00 Add spec tests. This adds tests for all elements we can create during regular parsing. This also adds tests for text with unicode in it. - - - - - 97f36a11 by Mateusz Kowalczyk at 2013-08-27T06:59:12+01:00 Fix ticket haskell/haddock#247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. - - - - - 60681b4f by Mateusz Kowalczyk at 2013-08-27T21:22:48+02:00 LaTeX tests setup - - - - - fa4c27b2 by Mateusz Kowalczyk at 2013-09-02T23:21:43+01:00 Fixes haskell/haddock#253 - - - - - 1a202490 by Mateusz Kowalczyk at 2013-09-03T01:12:50+01:00 Use Hspec instead of nanospec This is motivated by the fact that Haddock tests are not ran by the GHC's ‘validate’ script so we're pretty liberal on dependencies in that area. Full Hspec gives us some nice features such as Quickcheck integration. - - - - - 8cde3b20 by David Luposchainsky at 2013-09-08T07:27:28-05:00 Fix AMP warnings Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - d10661f2 by Herbert Valerio Riedel at 2013-09-11T15:15:01+02:00 Update Git repo URL in `.cabal` file - - - - - 16a44eb5 by Richard Eisenberg at 2013-09-17T09:34:26-04:00 Revision to reflect new role annotation syntax in GHC. - - - - - 4b9833b9 by Herbert Valerio Riedel at 2013-09-18T10:15:28+02:00 Add missing `traverse` method for `GenLocated` As `Traversable` needs at least one of `traverse` or `sequenceA` to be overridden. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - b71fed5d by Simon Hengel at 2013-09-18T22:43:34+02:00 Add test helper - - - - - 4fc1ea86 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#231 - - - - - 435872f6 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#256 We inject -dynamic-too into flags before we run all our actions in the GHC monad. - - - - - b8b24abb by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Add new field to DynFlags - - - - - 49558795 by Simon Hengel at 2013-09-18T22:43:35+02:00 Fallback to ./resources when Cabal data is not found (so that themes are found during development) - - - - - bf79d05c by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Fixes haskell/haddock#5 - - - - - e1baebc2 by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Print missing documentation. Fixes haskell/haddock#258. - - - - - 02ea74de by Austin Seipp at 2013-10-09T10:52:22-05:00 Don't consider StaticFlags when parsing arguments. Instead, discard any static flags before parsing the command line using GHC's DynFlags parser. See http://ghc.haskell.org/trac/ghc/ticket/8276 Based off a patch from Simon Hengel. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 704fd5bb by Simon Hengel at 2013-11-09T00:15:13+01:00 Update HTML tests - - - - - f9fed49e by Simon Hengel at 2013-11-10T18:43:58+01:00 Bump version - - - - - 97ae1999 by Simon Peyton Jones at 2013-11-25T17:25:14+00:00 Track changes in HsSpliceTy data constructor - - - - - 59ad8268 by Simon Peyton Jones at 2014-01-10T18:17:43+00:00 Adapt to small change in Pretty's exports - - - - - 8b12e6aa by Simon Hengel at 2014-01-12T14:48:35-06:00 Some code simplification by using traverse - - - - - fc5ea9a2 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix warnings in test helper - - - - - 6dbb3ba5 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Add ByteString version of Attoparsec - - - - - 968d7774 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 One pass parser and tests. We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing. - - - - - 37a07c9c by Simon Hengel at 2014-01-12T14:48:35-06:00 Rename Haddock.ParseSpec to Haddock.ParserSpec - - - - - f0f68fe9 by Simon Hengel at 2014-01-12T14:48:35-06:00 Don't append newline to parseString input We also check that we have parsed everything with endOfInput. - - - - - 95d60093 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu at fuuzetsu.co.uk if you need the full commit history. - - - - - 7d99108c by Simon Hengel at 2014-01-12T14:48:35-06:00 Update acceptance tests - - - - - d1b59640 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Support for bold. Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs - - - - - 4b412b39 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Allow for headings inside function documentation. LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs - - - - - fdcca428 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Per-module extension flags and language listing. Any extensions that are not enabled by a used language (Haskell2010 &c) will be shown. Furthermore, any implicitly enabled are also going to be shown. While we could eliminate this either by using the GHC API or a dirty hack, I opted not to: if a user doesn't want the implied flags to show, they are recommended to use enable extensions more carefully or individually. Perhaps this will encourage users to not enable the most powerful flags needlessly. Enabled with show-extensions. Conflicts: src/Haddock/InterfaceFile.hs - - - - - 368942a2 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Bump interface version There were some breaking changes over the last few patches so we bump the interface version. This causes a big problem with testing: 1. To generate cross package docs, we first need to generate docs for the package used. 2. To generate package docs with new interface version, we need to use Haddock which has the version bumped. 3. To get Haddock with the version bump, we first need to test cross package docs 4. GOTO 1 So the problem is the chicken and the egg problem. It seems that the only solution would be to generate some interface files on the fly but it is non-trivial. To run this test, you'll have to: * build Haddock without the test (make sure everything else passes) * rebuild the packages used in the test with your shiny new binary making sure they are visible to Haddock * remove the ‘_hidden’ suffix and re-run the tests Note: because the packages currently used for this test are those provided by GHC, it's probably non-trivial to just re-build them. Preferably something less tedious to rebuild should be used and something that is not subject to change. - - - - - 124ae7a9 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow for nesting of paragraphs under lists. The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - c7913535 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow escaping in URLs and pictures. Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - 32326680 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update documentation. - - - - - fbef6406 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update maintainer - - - - - b40e82f4 by Mateusz Kowalczyk at 2014-01-13T02:39:25-06:00 Fixes haskell/haddock#271 Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - f4eafbf8 by Gergő Érdi at 2014-01-19T15:35:16-06:00 Support for -XPatternSynonyms Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - a8939591 by Austin Seipp at 2014-01-29T08:09:04-06:00 Update CPP check for __GLASGOW_HASKELL__ Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 30d7e9d5 by Gergő Érdi at 2014-01-31T00:15:01+08:00 <+>: Don't insert a space when concatenating empty nodes - - - - - a25ccd4d by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Fix @ code blocks In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. - - - - - 0f67305a by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Update tests This updates tests due to Haddock Trac haskell/haddock#271 fix and due to removal of TypeHoles as an extension from GHC. - - - - - 157322a7 by Gergő Érdi at 2014-01-31T01:03:17+08:00 Handle infix vs prefix names correctly everywhere, by explicitly specifying the context The basic idea is that "a" and "+" are either pretty-printed as "a" and "(+)" or "`a`" and "+" - - - - - aa6d9685 by Mateusz Kowalczyk at 2014-01-30T17:21:50+00:00 Correct whitespace in ‘hidden’ test for <+> change - - - - - 121872f0 by Mateusz Kowalczyk at 2014-02-09T17:59:12+00:00 Document module header. Fixes Haddock Trac haskell/haddock#270. - - - - - e3253746 by Mateusz Kowalczyk at 2014-02-10T21:37:48+00:00 Insert a space between module link and description Fixes Haddock Trac haskell/haddock#277. - - - - - 771d2384 by Mateusz Kowalczyk at 2014-02-10T23:27:21+00:00 Ensure a space between type signature and ‘Source’ This is briefly related to Haddock Trac haskell/haddock#249 and employs effectively the suggested fix _but_ it doesn't actually fix the reported issue. This commit simply makes copying the full line a bit less of a pain. - - - - - 8cda9eff by nand at 2014-02-11T15:48:30+00:00 Add support for type/data families This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 3f22c510 by nand at 2014-02-11T15:53:50+00:00 Improve display of poly-kinded type operators This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - effb2d6b by nand at 2014-02-11T15:56:50+00:00 Add test case for PatternSynonyms This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - b38faf0d by Niklas Haas at 2014-02-13T21:53:32+00:00 Get rid of re-implementation of sortBy I have no idea what this was doing lying around here, and due to the usage of tuples it's actually slower, too. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - ac1e0413 by Mateusz Kowalczyk at 2014-02-13T23:57:16+00:00 Only warn about missing docs when docs are missing This fixes the ‘Missing documentation for…’ message for modules with 100% coverage. - - - - - cae2e36a by Niklas Haas at 2014-02-15T21:56:18+00:00 Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 8bea5c3a by Mateusz Kowalczyk at 2014-02-19T05:11:34+00:00 Use a bespoke data type to indicate fixity This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment. - - - - - 5b52d57c by Niklas Haas at 2014-02-22T21:31:03+01:00 Strip a single leading space from bird tracks (#201) This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch. - - - - - 5a1315a5 by Simon Hengel at 2014-02-22T21:55:35+01:00 Turn a source code comment into specs - - - - - 784cfe58 by Mateusz Kowalczyk at 2014-02-23T05:02:22+00:00 Update test case for lifted GADT type rendering The parsing of these seems to have been fixed by GHC folk and it now renders differently. IMHO it now renders in a better way so I'm updating the test to reflect this. - - - - - c3c88c2f by Mateusz Kowalczyk at 2014-02-23T06:37:14+00:00 Don't shadow ‘strip’. -Wall complains - - - - - 293031d8 by Niklas Haas at 2014-02-23T15:21:52+01:00 Make ImplicitParams render correctly (#260) This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone) - - - - - 4200842d by Niklas Haas at 2014-02-23T15:37:13+01:00 Lower precedence of equality constraints This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC - - - - - b59e3227 by Niklas Haas at 2014-02-23T16:11:22+01:00 Add RankNTypes test case to ImplicitParams.hs This test actually tests what haskell/haddock#260 originally reported - I omitted the RankNTypes scenario from the original fix because I realized it's not relevant to the underlying issue and indeed, this renders as intended now. Still good to have more tests. - - - - - c373dbf7 by Mateusz Kowalczyk at 2014-02-24T06:09:54+00:00 Fix rendering of Contents when links are present Fixes Haddock Trac haskell/haddock#267. - - - - - 9ecb0e56 by Mateusz Kowalczyk at 2014-02-24T06:26:50+00:00 Fix wording in the docs - - - - - 4f4dcd8e by Mateusz Kowalczyk at 2014-02-27T03:00:33+00:00 Change rendering of duplicate record field docs See Haddock Trac haskell/haddock#195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this. - - - - - ad8aa609 by Niklas Haas at 2014-03-08T09:43:26+01:00 Render fixity information Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of. - - - - - 6a39c917 by Niklas Haas at 2014-03-09T07:43:39+01:00 Reorder topDeclElem to move the source/wiki links to the top They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom. - - - - - 2d34b3b4 by Niklas Haas at 2014-03-09T07:53:46+01:00 Use optLast instead of listToMaybe for sourceUrls/wikiUrls This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates. - - - - - 0eff4624 by Niklas Haas at 2014-03-09T07:53:46+01:00 Differentiate between TH splices (line-links) and regular names This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures. - - - - - 66d6f77b by Niklas Haas at 2014-03-09T20:02:43+01:00 Group similar fixities together Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <= - - - - - 6587f9f5 by Mateusz Kowalczyk at 2014-03-10T04:24:18+00:00 Update changelog - - - - - 7387ddad by Niklas Haas at 2014-03-11T10:26:04+01:00 Include fixity information in the Interface file This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly. - - - - - ab46ef44 by Niklas Haas at 2014-03-11T10:26:04+01:00 Update changelog - - - - - 565cab6f by Niklas Haas at 2014-03-11T10:26:04+01:00 Update appearance of fixity annotations This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present. - - - - - 5d7afd67 by Niklas Haas at 2014-03-11T10:26:05+01:00 Filter family instances of hidden types Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case. - - - - - ec291b0c by Niklas Haas at 2014-03-11T10:26:05+01:00 Add documentation for --source-entity-line - - - - - 0922e581 by Niklas Haas at 2014-03-11T10:37:32+01:00 Revert "Reorder topDeclElem to move the source/wiki links to the top" This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines. - - - - - 30618e8b by Mateusz Kowalczyk at 2014-03-11T09:41:07+00:00 Bump version to 2.15.0 - - - - - adf3f1bb by Mateusz Kowalczyk at 2014-03-11T09:41:09+00:00 Fix up some whitespace - - - - - 8905f57d by Niklas Haas at 2014-03-13T19:18:06+00:00 Hide RHS of TFs with non-exported right hand sides Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user. - - - - - 5c44d5c2 by Niklas Haas at 2014-03-13T19:18:08+00:00 Add UnicodeSyntax alternatives for * and -> I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting. - - - - - b04a63e6 by Niklas Haas at 2014-03-13T19:18:10+00:00 Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. - - - - - a4a20b16 by Niklas Haas at 2014-03-13T19:18:12+00:00 Strip links from recently added html tests These were accidentally left there when the tests were originally added - - - - - d624f315 by Mateusz Kowalczyk at 2014-03-13T19:19:31+00:00 Update changelog - - - - - d27a21ac by Mateusz Kowalczyk at 2014-03-13T21:19:07+00:00 Always read in prologue files as UTF8 (#286). - - - - - 54b2fd78 by Mateusz Kowalczyk at 2014-03-13T21:28:09+00:00 Style only - - - - - fa4fe650 by Simon Hengel at 2014-03-15T09:04:18+01:00 Add Fuuzetsu maintainers field in cabal file - - - - - f83484b7 by Niklas Haas at 2014-03-15T18:20:24+00:00 Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. - - - - - 0099d276 by Niklas Haas at 2014-03-15T18:20:26+00:00 Fix issue haskell/haddock#281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. - - - - - 1f9687bd by Mateusz Kowalczyk at 2014-03-21T17:48:37+00:00 Please cabal sdist - - - - - 75542693 by Mateusz Kowalczyk at 2014-03-22T16:36:16+00:00 Drop needless --split-objs which slows us down. Involves tiny cleanup of all the dynflag bindings. Fixes haskell/haddock#292. - - - - - 31214dc3 by Herbert Valerio Riedel at 2014-03-23T18:01:01+01:00 Fix a few typos Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 0b73e638 by Mateusz Kowalczyk at 2014-03-31T05:34:36+01:00 Print kind signatures on GADTs - - - - - 2bab42f3 by Mateusz Kowalczyk at 2014-03-31T16:53:25+01:00 Add default for new PlatformConstraints field - - - - - 42647c5f by Mateusz Kowalczyk at 2014-03-31T18:29:04+01:00 Drop leading whitespace in @-style blocks. Fixes haskell/haddock#201. - - - - - 98208294 by Niklas Haas at 2014-03-31T20:09:58+02:00 Crash when exporting record selectors of data family instances This fixes bug haskell/haddock#294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated. - - - - - 3832d171 by Mateusz Kowalczyk at 2014-04-01T19:07:33+01:00 Make CHANGES consistent with what's now in 2.14.2 - - - - - c386ae89 by Mateusz Kowalczyk at 2014-04-01T19:18:36+01:00 Actually bundle extra spec tests in sdist - - - - - bd57a6d3 by Mateusz Kowalczyk at 2014-04-03T21:13:48+01:00 Update test cases for GHC bug haskell/haddock#8945, Haddock haskell/haddock#188 The order of signature groups has been corrected upstream. Here we add a test case and update some existing test-cases to reflect this change. We remove grouped signature in test cases that we can (Minimal, BugDeprecated &c) so that the test is as self-contained as possible. - - - - - 708b88b1 by Mateusz Kowalczyk at 2014-04-03T21:16:07+01:00 Enforce strict GHC version in cabal file This stops people with 7.6.3 trying to install 2.15.x which clearly won't work. Unfortunately we shipped 2.14.x without realising this. - - - - - 60334f7c by Mateusz Kowalczyk at 2014-04-03T21:19:24+01:00 Initialise some new PlatformConstants fields - - - - - ea77f668 by Mateusz Kowalczyk at 2014-04-11T16:52:23+01:00 We don't actually want unicode here - - - - - 0b651cae by Mateusz Kowalczyk at 2014-04-11T18:13:30+01:00 Parse identifiers with ^ and ⋆ in them. Fixes haskell/haddock#298. - - - - - e8ad0f5f by Mateusz Kowalczyk at 2014-04-11T18:47:41+01:00 Ignore version string during HTML tests. - - - - - de489089 by Mateusz Kowalczyk at 2014-04-11T18:59:30+01:00 Update CHANGES to follow 2.14.3 - - - - - beb464a9 by Gergő Érdi at 2014-04-13T16:31:10+08:00 remove Origin flag from LHsBindsLR - - - - - cb16f07c by Herbert Valerio Riedel at 2014-04-21T17:16:50+02:00 Replace local `die` by new `System.Exit.die` Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 9b9b23c7 by Mateusz Kowalczyk at 2014-05-03T15:40:11+02:00 Disambiguate ‘die’ in test runners. - - - - - 5d28a2b8 by Mateusz Kowalczyk at 2014-05-05T09:19:49+02:00 Prepare modules for parser split. We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type. - - - - - d3967ff3 by Mateusz Kowalczyk at 2014-05-05T11:00:41+02:00 Move parser + parser tests out to own package. We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes. - - - - - 522a448d by Mateusz Kowalczyk at 2014-05-05T11:14:47+02:00 Move out Show and Eq instances to Types They are much more useful to the users here. - - - - - 11a6f0f2 by Mateusz Kowalczyk at 2014-05-06T13:50:31+02:00 Remove no longer necessary parser error handling. We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places. - - - - - 6992c924 by Mateusz Kowalczyk at 2014-05-14T02:23:55+02:00 Please the GHC build-system. As I can not figure out how to do this properly, if we're in GHC tree, we treat the library as being the same package. If we're not in the tree, we require that the library be installed separately. - - - - - 7a8ad763 by Mateusz Kowalczyk at 2014-05-14T14:50:25+02:00 Update issue tracker URL - - - - - f616c521 by Mateusz Kowalczyk at 2014-05-14T14:53:32+02:00 Update issue tracker URL for haddock-library - - - - - 66580ded by Gergő Érdi at 2014-05-25T14:24:16+08:00 Accomodate change in PatSyn representation - - - - - 0e43b988 by Mateusz Kowalczyk at 2014-05-29T03:15:29+02:00 Revert "Accomodate change in PatSyn representation" This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this. - - - - - e10d7ec8 by Mateusz Kowalczyk at 2014-05-29T03:24:11+02:00 Revert "Revert "Accomodate change in PatSyn representation"" This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me. - - - - - 5861aca9 by Mateusz Kowalczyk at 2014-06-05T19:49:27+02:00 Clear up highlighting of identifiers with ‘'’s. - - - - - d7cc420f by Simon Peyton Jones at 2014-06-06T12:41:09+01:00 Follow change in patSynSig - - - - - 938b4fd8 by Mateusz Kowalczyk at 2014-06-12T07:24:29+02:00 Slightly update the readme. Style-sheets are no longer a recent thing, dead links, old maintainers, different formats. - - - - - c7799dea by Mateusz Kowalczyk at 2014-06-18T00:05:56+02:00 Update cabal files Update repository urls, use subdir property for haddock-library and use a separate versioning scheme for haddock-library in preparation for release. - - - - - a2750b6a by Simon Hengel at 2014-06-18T11:01:18+08:00 Compatibility with older versions of base and bytestring - - - - - 009b4b03 by Simon Hengel at 2014-06-18T11:14:01+08:00 Enable travis-ci for haddock-library - - - - - 9b5862eb by Simon Hengel at 2014-06-18T11:14:01+08:00 haddock-library: Do not depend on haddock-library in test suite I think you either add src to hs-source-dirs or the library to build-depends. But doing both does not make sense (AFAICT). - - - - - fb1f3279 by Simon Hengel at 2014-06-18T11:49:05+08:00 haddock-library: Use -Wall for specs - - - - - 649340e1 by Mateusz Kowalczyk at 2014-06-18T06:58:54+02:00 Use Travis with multiple GHC versions When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project. - - - - - d7eeeec2 by Mateusz Kowalczyk at 2014-06-18T07:49:04+02:00 Comment improvements + few words in cabal file - - - - - 0f8db914 by Simon Hengel at 2014-06-18T13:52:23+08:00 Use doctest to check examples in documentation - - - - - 2888a8dc by Simon Hengel at 2014-06-18T14:16:48+08:00 Remove doctest dependency (so that we can use haddock-library with doctest) - - - - - 626d5e85 by Mateusz Kowalczyk at 2014-06-18T08:41:25+02:00 Travis tweaks - - - - - 41d4f9cc by Mateusz Kowalczyk at 2014-06-18T08:58:43+02:00 Don't actually forget to install specified GHC. - - - - - c6aa512a by John MacFarlane at 2014-06-18T10:43:57-07:00 Removed reliance on LambdaCase (which breaks build with ghc 7.4). - - - - - b9b93b6f by John MacFarlane at 2014-06-18T10:54:56-07:00 Fixed haddock warnings. - - - - - a41b0ab5 by Mateusz Kowalczyk at 2014-06-19T01:20:10+02:00 Update Travis, bump version - - - - - 864bf62a by Mateusz Kowalczyk at 2014-06-25T10:36:54+02:00 Fix anchors. Closes haskell/haddock#308. - - - - - 53df91bb by Mateusz Kowalczyk at 2014-06-25T15:04:49+02:00 Drop DocParagraph from front of headers I can not remember why they were wrapped in paragraphs to begin with and it seems unnecessary now that I test it. Closes haskell/haddock#307. - - - - - 29b5f2fa by Mateusz Kowalczyk at 2014-06-25T15:17:20+02:00 Don't mangle append order for nested lists. The benefit of this is that the ‘top-level’ element of such lists is properly wrapped in <p> tags so any CSS working with these will be applied properly. It also just makes more sense. Pointed out at jgm/pandoc#1346. - - - - - 05cb6e9c by Mateusz Kowalczyk at 2014-06-25T15:19:45+02:00 Bump haddock-library to 1.1.0 for release - - - - - 70feab15 by Iavor Diatchki at 2014-07-01T03:37:07-07:00 Propagate overloading-mode for instance declarations in haddock (#9242) - - - - - d4ca34a7 by Simon Peyton Jones at 2014-07-14T16:23:15+01:00 Adapt to new definition of HsDecls.TyFamEqn This is a knock-on from the refactoring from Trac haskell/haddock#9063. I'll push the corresponding changes to GHC shortly. - - - - - f91e2276 by Edward Z. Yang at 2014-07-21T08:14:19-07:00 Track GHC PackageId to PackageKey renaming. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - b010f9ef by Edward Z. Yang at 2014-07-25T16:28:46-07:00 Track changes for module reexports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - 8b85f9f9 by Mateusz Kowalczyk at 2014-07-28T13:25:43+02:00 Catch mid-line URLs. Fixes haskell/haddock#314. - - - - - 4c613a78 by Edward Z. Yang at 2014-08-05T03:11:00-07:00 Track type signature change of lookupModuleInAllPackages Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - e80b051c by Edward Z. Yang at 2014-08-05T17:34:26+01:00 If GhcProfiled, also build Haddock profiled. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f9cccd29 by Edward Z. Yang at 2014-08-07T14:23:35+01:00 Ignore TAGS files. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 00b3af52 by Mateusz Kowalczyk at 2014-08-08T04:58:19+02:00 Update to attoparsec-0.12.1.1 There seems to be memory and speed improvement. - - - - - 5457dc71 by Mateusz Kowalczyk at 2014-08-08T18:24:02+02:00 Fix forgotten src - - - - - 3520cb04 by Mateusz Kowalczyk at 2014-08-14T20:19:07+01:00 Bump down the version for master to 2.14.4 - - - - - dc98c21b by Mateusz Kowalczyk at 2014-08-14T20:23:27+01:00 Revert "Track type signature change of lookupModuleInAllPackages" This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f. - - - - - 3f2038c0 by Mateusz Kowalczyk at 2014-08-14T20:23:31+01:00 Revert "Track changes for module reexports." This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d. - - - - - 56d4e49e by Mateusz Kowalczyk at 2014-08-14T20:23:42+01:00 Revert "Track GHC PackageId to PackageKey renaming." This reverts commit 8ac42d3327473939c013551750425cac191ff0fd. - - - - - 726ea3cb by Mateusz Kowalczyk at 2014-08-14T20:23:47+01:00 Revert "Adapt to new definition of HsDecls.TyFamEqn" This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd. - - - - - 61a88ff0 by Mateusz Kowalczyk at 2014-08-14T20:23:52+01:00 Revert "Propagate overloading-mode for instance declarations in haddock (#9242)" This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c. - - - - - a32ba674 by Mateusz Kowalczyk at 2014-08-14T20:26:03+01:00 Revert "Disambiguate ‘die’ in test runners." This reverts commit dba02d6df32534aac5d257f2d28596238d248942. - - - - - f335820f by Mateusz Kowalczyk at 2014-08-14T20:26:09+01:00 Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. - - - - - 107078e4 by Mateusz Kowalczyk at 2014-08-14T20:27:34+01:00 Merge branch 'reverts' This reverts any changes that were made to have Haddock compile with 7.9. When 7.10 release comes, we can simply re-apply all the patches and any patches that occur on ghc-head branch from now on. This allows us to build master with 7.8.3 - - - - - b44b3871 by Mateusz Kowalczyk at 2014-08-15T02:47:40+01:00 Fix haskell/haddock#313 by doing some list munging. I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly. - - - - - e1a62cde by Mateusz Kowalczyk at 2014-08-15T02:52:56+01:00 Stop testing haskell/haddock#188. Because the change is in GHC 7.9 and we now work against 7.8.3, this test no longer makes sense. We revert it until 7.10 becomes the standard version. If anything, there should be a test for this in GHC itself. - - - - - 54e8286d by Mateusz Kowalczyk at 2014-08-15T05:31:57+01:00 Add haskell/haddock#313 to CHANGES - - - - - 9df7ad5d by Simon Hengel at 2014-08-20T11:25:32+08:00 Fix warning - - - - - ee2574d6 by Simon Hengel at 2014-08-20T12:07:01+08:00 Fix travis builds - - - - - 384cf2e6 by Simon Hengel at 2014-08-20T12:14:31+08:00 Require GHC 7.8.3 - - - - - d4779863 by Simon Hengel at 2014-08-22T12:14:16+08:00 Move Haddock API to a separate package - - - - - 80f3e0e1 by Simon Hengel at 2014-08-22T14:57:38+08:00 Bump version to 2.15.0 and add version constraints - - - - - 309a94ce by Simon Hengel at 2014-08-22T15:18:06+08:00 Add deprecated compatibility module - - - - - 4d1e4e3f by Luite Stegeman at 2014-08-22T20:46:45+02:00 export things to allow customizing how the Ghc session is run - - - - - 47884591 by Luite Stegeman at 2014-08-22T20:46:51+02:00 ghc 7.8.2 compatibility - - - - - 5ea94e2c by Luite Stegeman at 2014-08-22T22:08:58+02:00 install dependencies for haddock-api on travis - - - - - 9fb845b2 by Mateusz Kowalczyk at 2014-08-23T10:09:34+01:00 Move sources under haddock-api/src - - - - - 85817dc4 by Mateusz Kowalczyk at 2014-08-23T10:10:48+01:00 Remove compat stuff - - - - - 151c6169 by Niklas Haas at 2014-08-24T08:14:10+02:00 Fix extra whitespace on signatures and update all test cases This was long overdue, now running ./accept.lhs on a clean test from master will not generate a bunch of changes. - - - - - d320e0d2 by Niklas Haas at 2014-08-24T08:14:35+02:00 Omit unnecessary foralls and fix haskell/haddock#315 This also fixes haskell/haddock#86. - - - - - bdafe108 by Mateusz Kowalczyk at 2014-08-24T15:06:46+01:00 Update CHANGES - - - - - fafa6d6e by Mateusz Kowalczyk at 2014-08-24T15:14:23+01:00 Delete few unused/irrelevant/badly-place files. - - - - - 3634923d by Duncan Coutts at 2014-08-27T13:49:31+01:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. - - - - - 539a7e70 by Herbert Valerio Riedel at 2014-08-31T11:36:32+02:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 9e3a0e5b by Mateusz Kowalczyk at 2014-08-31T12:54:43+01:00 Bump version in doc - - - - - 4a177525 by Mateusz Kowalczyk at 2014-08-31T13:01:23+01:00 Bump haddock-library version - - - - - f99c1384 by Mateusz Kowalczyk at 2014-08-31T13:05:25+01:00 Remove references to deleted files - - - - - 5e51a247 by Mateusz Kowalczyk at 2014-08-31T14:18:44+01:00 Make the doc parser not complain - - - - - 2cedb49a by Mateusz Kowalczyk at 2014-09-03T03:33:15+01:00 CONTRIBUTING file for issues - - - - - 88027143 by Mateusz Kowalczyk at 2014-09-04T00:46:59+01:00 Mention --print-missing-docs - - - - - 42f6754f by Alan Zimmerman at 2014-09-05T18:13:24-05:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e712719e by Austin Seipp at 2014-09-09T01:03:27-05:00 Fix import of 'empty' due to AMP. Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 71c29755 by Herbert Valerio Riedel at 2014-09-09T17:35:20+02:00 Bump `base` constraint for AMP - - - - - 0bf9f3ed by Mateusz Kowalczyk at 2014-09-12T19:18:32+01:00 Delete stale ANNOUNCE - - - - - cac89ee6 by Krzysztof Gogolewski at 2014-09-14T17:17:09+02:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 4d683426 by Edward Z. Yang at 2014-09-18T13:38:11-07:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 80697fd5 by Herbert Valerio Riedel at 2014-09-19T00:07:52+02:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. - - - - - c015eb70 by Herbert Valerio Riedel at 2014-09-19T00:10:36+02:00 Revert "Followup changes to addition of -fwarn-context-quantification" This reverts commit 4023817d7c0e46db012ba2eea28022626841ca9b temporarily as the respective feature hasn't landed in GHC HEAD yet, but this commit blocks later commits from being referenced in GHC HEAD. - - - - - 38ded784 by Edward Z. Yang at 2014-09-18T15:32:15-07:00 Revert "Revert "Followup changes to addition of -fwarn-context-quantification"" This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now. - - - - - f55d59c9 by Herbert Valerio Riedel at 2014-09-26T19:18:28+02:00 Revert "Fix import of 'empty' due to AMP." This reverts commit 0cc5bc85e9fca92ab712b68a2ba2c0dd9d3d79f4 since it turns out we don't need to re-export `empty` from Control.Monad after all. - - - - - 467050f1 by David Feuer at 2014-10-09T20:07:36-04:00 Fix improper lazy IO use Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. - - - - - cc47b699 by Edward Z. Yang at 2014-10-09T21:38:19-07:00 Fix use-after-close lazy IO bug Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. Signed-off-by: David Feuer <David.Feuer at gmail.com> Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 87babcbe by Austin Seipp at 2014-10-20T20:05:27-05:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - ab259516 by Austin Seipp at 2014-10-20T20:07:01-05:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - b918093c by Mateusz Kowalczyk at 2014-10-29T03:59:39+00:00 Experimental support for collapsable headers Closes haskell/haddock#335 - - - - - 849db129 by Mateusz Kowalczyk at 2014-10-29T10:07:26+01:00 Experimental support for collapsable headers (cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc) - - - - - a4cc4789 by Herbert Valerio Riedel at 2014-10-31T11:08:26+01:00 Collapse user-defined section by default (re haskell/haddock#335) - - - - - 9da1b33e by Yuras Shumovich at 2014-10-31T16:11:04-05:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - c625aefc by Austin Seipp at 2014-10-31T19:34:10-05:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - c7738e5e by Simon Hengel at 2014-11-02T07:25:30+08:00 Remove -fobject-code from .ghci (this slows down reloads on modifications) - - - - - d4a86e95 by Simon Hengel at 2014-11-03T09:26:11+08:00 Get rid of StandaloneDeriving - - - - - a974e311 by Simon Hengel at 2014-11-03T09:26:11+08:00 Derive more instances - - - - - 8aa0c4d7 by Simon Hengel at 2014-11-03T09:27:08+08:00 Remove unused language extensions - - - - - 3052d46a by Simon Hengel at 2014-11-03T09:30:46+08:00 Minor refactoring - - - - - 4281d3cb by Simon Hengel at 2014-11-03T09:30:46+08:00 parser: Try to parse definition lists right before text paragraphs - - - - - 8ba12bf9 by Simon Hengel at 2014-11-03T09:34:19+08:00 Add support for markdown links (closes haskell/haddock#336) - - - - - a2f8d747 by Simon Hengel at 2014-11-03T09:34:19+08:00 Allow markdown links at the beginning of a paragraph - - - - - 53b11207 by Simon Hengel at 2014-11-03T09:34:20+08:00 Update documentation - - - - - 652267c6 by Simon Hengel at 2014-11-03T09:34:20+08:00 Add support for markdown images - - - - - 9d667502 by Simon Hengel at 2014-11-03T09:34:20+08:00 Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. - - - - - 8167fc32 by Mateusz Kowalczyk at 2014-11-04T01:16:51+00:00 whitespace only - - - - - 3da62981 by Mateusz Kowalczyk at 2014-11-04T01:17:31+00:00 Fix re-exports of built-in type families Fixes haskell/haddock#310 - - - - - edc76b34 by Mateusz Kowalczyk at 2014-11-04T02:54:28+00:00 Turn some uses of error into recoverable warnings This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end. - - - - - 0a137400 by Mateusz Kowalczyk at 2014-11-04T04:09:44+00:00 Fix warnings - - - - - d068fc21 by Mateusz Kowalczyk at 2014-11-04T21:04:07+00:00 Fix parsing of identifiers written in infix way - - - - - 1a9f2f3d by Simon Hengel at 2014-11-08T11:32:42+08:00 Minor code simplification - - - - - 6475e9b1 by Simon Hengel at 2014-11-08T17:28:33+08:00 newtype-wrap parser monad - - - - - dc1ea105 by Herbert Valerio Riedel at 2014-11-15T11:55:43+01:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - fbb1aca4 by Simon Hengel at 2014-11-16T08:51:38+08:00 State intention rather than implementation details in Haddock comment - - - - - 97851ab2 by Simon Hengel at 2014-11-16T10:20:19+08:00 (wip) Add support for @since (closes haskell/haddock#26) - - - - - 34bcd18e by Gergő Érdi at 2014-11-20T22:35:38+08:00 Update Haddock to new pattern synonym type signature syntax - - - - - 304b7dc3 by Jan Stolarek at 2014-11-20T17:48:43+01:00 Follow changes from haskell/haddock#9812 - - - - - 920f9b03 by Richard Eisenberg at 2014-11-20T16:52:50-05:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 0bfe4e78 by Alan Zimmerman at 2014-11-21T11:23:09-06:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 356ed45a by Thomas Winant at 2014-11-28T16:11:22-06:00 Support for PartialTypeSignatures - - - - - 5dc8f3b1 by Gergő Érdi at 2014-11-29T15:39:09+08:00 For pattern synonyms, render "pattern" as a keyword - - - - - fe704480 by Mateusz Kowalczyk at 2014-12-09T03:38:32+00:00 List new module in cabal file - - - - - b9ad5a29 by Mateusz Kowalczyk at 2014-12-10T00:58:24+00:00 Allow the parser to spit out meta-info Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes haskell/haddock#26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves. - - - - - 765af0e3 by Mateusz Kowalczyk at 2014-12-10T01:17:19+00:00 Update doctest parts of comments - - - - - 8670272b by jpmoresmau at 2014-12-10T01:35:31+00:00 header could contain several lines Closes haskell/haddock#348 - - - - - 4f9ae4f3 by Mateusz Kowalczyk at 2014-12-12T06:22:31+00:00 Revert "Merge branch 'reverts'" This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - e974ac94 by Duncan Coutts at 2014-12-12T06:26:11+00:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. Conflicts: haddock-api/src/Haddock.hs - - - - - 2f3a2365 by Herbert Valerio Riedel at 2014-12-12T06:26:51+00:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 1dbd6390 by Alan Zimmerman at 2014-12-12T06:32:07+00:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - bb6ff1f4 by Mateusz Kowalczyk at 2014-12-12T06:35:07+00:00 Bump ‘base’ constraint Follows the similar commit made on ghc-head branch - - - - - 466fe4ab by Krzysztof Gogolewski at 2014-12-12T06:37:42+00:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 97e080c9 by Edward Z. Yang at 2014-12-12T06:39:35+00:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs - - - - - 20b2af56 by Herbert Valerio Riedel at 2014-12-12T06:42:50+00:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. Conflicts: haddock-library/src/Documentation/Haddock/Parser.hs - - - - - b3ad269d by Austin Seipp at 2014-12-12T06:44:14+00:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 072df0dd by Austin Seipp at 2014-12-12T06:45:01+00:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - dbb9294a by Herbert Valerio Riedel at 2014-12-12T06:46:17+00:00 Collapse user-defined section by default (re haskell/haddock#335) Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - - - - - f23ab545 by Yuras Shumovich at 2014-12-12T06:46:41+00:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - 753a4b67 by Austin Seipp at 2014-12-12T06:46:51+00:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8954e8f5 by Herbert Valerio Riedel at 2014-12-12T06:50:53+00:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - d2b06d61 by Gergő Érdi at 2014-12-12T07:07:30+00:00 Update Haddock to new pattern synonym type signature syntax Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 1ff02426 by Jan Stolarek at 2014-12-12T07:13:24+00:00 Follow changes from haskell/haddock#9812 Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - 06ad7600 by Richard Eisenberg at 2014-12-12T07:13:43+00:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 8fd2aa8b by Alan Zimmerman at 2014-12-12T07:22:25+00:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Backends/LaTeX.hs haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 95c3db98 by Thomas Winant at 2014-12-12T07:35:49+00:00 Support for PartialTypeSignatures Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs haddock-api/src/Haddock/Interface/Create.hs - - - - - 45494428 by Gergő Érdi at 2014-12-12T07:36:18+00:00 For pattern synonyms, render "pattern" as a keyword - - - - - a237e3eb by Mateusz Kowalczyk at 2014-12-12T12:27:13+00:00 Various fixups and bumps for next release - - - - - 22918bcd by Herbert Valerio Riedel at 2014-12-14T10:11:47+01:00 Remove redundant wild-card pattern match (this would otherwise cause a build-failure with `-Werror`) - - - - - 1d6ce947 by Herbert Valerio Riedel at 2014-12-14T10:17:06+01:00 Treat GHC 7.10 the same as GHC 7.9 ...since the current GHC 7.9 is going to become GHC 7.10 real-soon-now anyway - - - - - f434ea89 by Herbert Valerio Riedel at 2014-12-14T18:26:50+01:00 Fixup ghc.mk (follow-up to 1739375eb23342) This makes the GHC build-system aware of the data-files to be copied into the bindist (as haddock.cabal doesn't list those anymore) - - - - - 6fb839eb by Mateusz Kowalczyk at 2014-12-17T09:28:59+00:00 Only keep one Version instead of blindly appending - - - - - 40645489 by Mateusz Kowalczyk at 2014-12-18T07:09:44+00:00 Fix dependency version - - - - - 8b3b927b by Mateusz Kowalczyk at 2014-12-18T07:14:23+00:00 Print missing docs by default Adds --no-print-missing-docs - - - - - 59666694 by Mateusz Kowalczyk at 2014-12-18T07:21:37+00:00 update changelog - - - - - aa6d168e by Mateusz Kowalczyk at 2014-12-18T07:30:58+00:00 Update docs for @since - - - - - 2d7043ee by Luite Stegeman at 2014-12-19T18:29:35-06:00 hide projectVersion from DynFlags since it clashes with Haddock.Version.projectVersion - - - - - aaa70fc0 by Luite Stegeman at 2014-12-22T15:58:43+01:00 Add missing import for standalone haddock-api package - - - - - 9ce01269 by Herbert Valerio Riedel at 2014-12-22T17:48:45+01:00 Reset ghc-head with master's tree (this is an overwriting git merge of master into ghc-head) - - - - - fcd6fec1 by Herbert Valerio Riedel at 2014-12-22T17:51:52+01:00 Bump versions for ghc-7.11 - - - - - 525ec900 by Mateusz Kowalczyk at 2014-12-23T13:36:24+00:00 travis-ci: test with HEAD - - - - - cbf494b5 by Simon Peyton Jones at 2014-12-23T15:22:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 50e01c99 by Mateusz Kowalczyk at 2014-12-29T15:28:47+00:00 Make travis use 7.10.x - - - - - 475e60b0 by Njagi Mwaniki at 2014-12-29T15:30:44+00:00 Turn the README into GitHub Markdown format. Closes haskell/haddock#354 - - - - - 8cacf48e by Luite Stegeman at 2015-01-05T16:25:37+01:00 bump haddock-api ghc dependency to allow release candidate and first release - - - - - 6ed6cf1f by Simon Peyton Jones at 2015-01-06T16:37:47+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 8b484f33 by Simon Peyton Jones at 2015-01-08T15:50:22+00:00 Track naming change in DataCon - - - - - 23c5c0b5 by Alan Zimmerman at 2015-01-16T10:15:11-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e7a5532c by JP Moresmau at 2015-01-22T17:19:03+00:00 Ignore warnings, install Cabal 1.22 - - - - - 86942c84 by jpmoresmau at 2015-01-22T17:19:04+00:00 solve dataDir ambiguity - - - - - 5ceb743e by jpmoresmau at 2015-01-22T19:17:32+00:00 support GHC 7.10: no Safe-Inferred, Foldable instance - - - - - 6a3b3fb5 by Mateusz Kowalczyk at 2015-01-22T19:32:10+00:00 Update test files Test: a correct behaviour for fields comma-separating values. I'm surprised we had no bug open for this. Maybe it affects how haskell/haddock#301 renders now but I doubt. Operators: Seems GHC is giving us a new order for operators, something must have changed on their side again. cc @haasn , this makes the fixity to the side not match the order on the LHS which is a bit unpleasant. Maybe the fixity can be made to match the GHC order? Bug335: We expand examples by default now. Bug310: Now inferred safe. - - - - - 708f8b2f by jpmoresmau at 2015-01-22T19:36:59+00:00 Links to source location of class instance definitions - - - - - 5cf8a6da by Vincent Berthoux at 2015-01-22T19:59:58+00:00 Filter '\r' from comments due to Windows problems. On Windows this was causing newline to be rendered twice in code blocks. Closes haskell/haddock#359, fixes haskell/haddock#356. - - - - - 1749e6f0 by Mateusz Kowalczyk at 2015-01-22T20:31:27+00:00 Changelog only - - - - - c8145f90 by Mateusz Kowalczyk at 2015-01-22T23:34:05+00:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. - - - - - 14248254 by Mateusz Kowalczyk at 2015-01-22T23:43:18+00:00 Sort out some module import warnings - - - - - d8a38989 by Simon Peyton Jones at 2015-01-23T07:10:16-06:00 Track naming change in DataCon (cherry picked from commit 04cf63d0195837ed52075ed7d2676e71831e8a0b) - - - - - d3ac6ae4 by Alan Zimmerman at 2015-01-23T07:17:19-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit d61bbc75890e4eb0ad508b9c2a27b91f691213e6) - - - - - 4c1ffeb0 by Simon Peyton Jones at 2015-02-10T12:10:33+00:00 Track changes in HsSyn for quasi-quotes - - - - - 775d20f7 by Mateusz Kowalczyk at 2015-03-15T08:11:48+01:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. (cherry picked from commit 8e06728afb0784128ab2df0be7a5d7a191d30ff4) - - - - - f9245e72 by Phil Ruffwind at 2015-03-16T04:32:01-04:00 Prevent Synopsis from using up too much horizontal space When long type signatures occur in the Synopsis, the element is stretched beyond the width of the window. Scrollbars don't appear, so it's impossible to read anything when this happens. - - - - - cd8fa415 by Mateusz Kowalczyk at 2015-03-17T21:59:39+00:00 Update changelog Closes haskell/haddock#151 due to 71170fc77962f10d7d001e3b8bc8b92bfeda99bc - - - - - b5248b47 by Ben Gamari at 2015-03-25T17:12:17+00:00 Make the error encountered when a package can't be found more user-friendly Closes haskell/haddock#369 - - - - - b756b772 by Mateusz Kowalczyk at 2015-03-26T16:31:40+00:00 Remove now redundant imports - - - - - 5ea5e8dd by Mateusz Kowalczyk at 2015-03-26T16:45:52+00:00 Update test to account for \r filtering - - - - - 6539bfb3 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Test for anchor defaulting I delete the old tests because it turns out that: * test runner would never put them in scope of each other even with imports so just one would suffice * test runner actually needed some hacking to keep links so in the end we would end up with no anchors making them useless - - - - - 1a01d950 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Clearly default to variables in out of scope case - - - - - 7943abe8 by Mateusz Kowalczyk at 2015-03-27T01:14:11+00:00 Fix Hoogle display of constructors Fixes haskell/haddock#361 - - - - - 6d6e587e by Mateusz Kowalczyk at 2015-03-27T01:45:18+00:00 Fully qualify names in Hoogle instances output Closes haskell/haddock#263 - - - - - 52dac365 by Mateusz Kowalczyk at 2015-03-27T01:55:01+00:00 Update changelog - - - - - ca5af9a8 by Mateusz Kowalczyk at 2015-03-27T02:43:55+00:00 Output method documentation in Hoogle backend One thing of note is that we no longer preserve grouping of methods and print each method on its own line. We could preserve it if no documentation is present for any methods in the group if someone asks for it though. Fixes haskell/haddock#259 - - - - - a33f0c10 by Mateusz Kowalczyk at 2015-03-27T03:04:21+00:00 Don't print instance safety information in Hoogle Fixes haskell/haddock#168 - - - - - df6c935a by Mateusz Kowalczyk at 2015-03-28T00:11:47+00:00 Post-release version bumps and changelog - - - - - dde8f7c0 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Loosen bounds on haddock-* - - - - - de93bf89 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Expand response files in arguments Closes haskell/haddock#285 - - - - - 1f0b0856 by Zejun Wu at 2015-04-26T16:35:35-07:00 Do not insert anchor for section headings in contents box - - - - - 860439d7 by Simon Peyton Jones at 2015-05-01T09:36:47+01:00 Track change in API of TyCon - - - - - a32f3e5f by Adam Gundry at 2015-05-04T15:32:59+01:00 Track API changes to support empty closed type familes - - - - - 77e98bee by Ben Gamari at 2015-05-06T20:17:08+01:00 Ignore doc/haddock.{ps,pdf} - - - - - 663d0204 by Murray Campbell at 2015-05-11T04:47:37-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8bb0dcf5 by Murray Campbell at 2015-05-11T06:35:06-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit 2380f07c430c525b205ce2eae6dab23c8388d899) - - - - - bad900ea by Adam Bergmark at 2015-05-11T15:29:39+01:00 haddock-library: require GHC >= 7.4 `Data.Monoid.<>` was added in base-4.5/GHC-7.4 Closes haskell/haddock#394 Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - daceff85 by Simon Peyton Jones at 2015-05-13T12:04:21+01:00 Track the new location of setRdrNameSpace - - - - - 1937d1c4 by Alan Zimmerman at 2015-05-25T21:27:15+02:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - ee0fb6c2 by Łukasz Hanuszczak at 2015-05-27T11:51:31+02:00 Create simple method for indentation parsing. - - - - - 7d6fcad5 by Łukasz Hanuszczak at 2015-05-27T21:36:13+02:00 Make nested lists count indentation according to first item. - - - - - d6819398 by Łukasz Hanuszczak at 2015-05-27T22:46:13+02:00 Add simple test case for arbitrary-depth list nesting. - - - - - 2929c54d by Łukasz Hanuszczak at 2015-06-03T02:11:31+02:00 Add arbitrary-indent spec test for parser. - - - - - 9a0a9bb0 by Mateusz Kowalczyk at 2015-06-03T05:25:29+01:00 Update docs with info on new list nesting rule Fixes haskell/haddock#278 through commits from PR haskell/haddock#401 - - - - - 12efc92c by Mateusz Kowalczyk at 2015-06-03T05:29:26+01:00 Update some meta data at the top of the docs - - - - - 765ee49f by Bartosz Nitka at 2015-06-07T08:40:59-07:00 Add some Hacking docs for getting started - - - - - 19aaf851 by Bartosz Nitka at 2015-06-07T08:44:30-07:00 Fix markdown - - - - - 2a90cb70 by Mateusz Kowalczyk at 2015-06-08T15:08:36+01:00 Refine hacking instructions slightly - - - - - 0894da6e by Thomas Winant at 2015-06-08T23:47:28-05:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 10a9bb76 by Emanuel Borsboom at 2015-06-12T02:46:23+01:00 Build executable with '-threaded' (fixes haskell/haddock#399) - - - - - 7696b94f by Mateusz Kowalczyk at 2015-06-12T02:59:19+01:00 Update changelog for -threaded Closes haskell/haddock#400 - - - - - d3c118ec by Bartosz Nitka at 2015-06-12T03:00:58+01:00 Fix haddock: internal error: spliceURL UnhelpfulSpan (#207) Inferred type signatures don't have SrcSpans, so let's use the one from the declaration. I've tested this manually on the test-case from haskell/haddock#207, but I got stuck at trying to run the test-suite. - - - - - b67e843b by Mateusz Kowalczyk at 2015-06-12T03:01:50+01:00 Changelog for haskell/haddock#207 Fixes haskell/haddock#207, closes haskell/haddock#402 - - - - - 841d785e by jpmoresmau at 2015-06-12T16:03:16+01:00 Attach to instance location the name that has the same location file Fixes haskell/haddock#383 - - - - - 98791cae by Mateusz Kowalczyk at 2015-06-12T16:08:27+01:00 Update changelog Closes haskell/haddock#398 - - - - - 7c0b5a87 by Phil Ruffwind at 2015-06-12T13:07:25-04:00 Fix alignment of Source links in instance table in Firefox Due to a Firefox bug [1], a combination of 'whitespace: nowrap' on the parent element with 'float: right' on the inner element can cause the floated element to be displaced downwards for no apparent reason. To work around this, the left side is wrapped in its own <span> and set to 'float: left'. As a precautionary measure to prevent the parent element from collapsing entirely, we also add the classic "clearfix" hack. The latter is not strictly needed but it helps prevent bugs if the layout is altered again in the future. Fixes haskell/haddock#384. Remark: line 159 of src/Haddock/Backends/Xhtml/Layout.hs was indented to prevent confusion over the operator precedence of (<+>) vs (<<). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=488725 - - - - - cfe86e73 by Mateusz Kowalczyk at 2015-06-14T10:49:01+01:00 Update tests for the CSS changes - - - - - 2d4983c1 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding for Haskell source parser module. - - - - - 29548785 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement function for tagging parsed chunks with source spans. - - - - - 6a5e4074 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement simple string chunking based on HsColour library. - - - - - 6e52291f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create basic token classification method. - - - - - da971a27 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Adapt source span tagging to work with current whitespace handling. - - - - - 4feb5a22 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add record accessors to exports of hyperlinker parser module. - - - - - a8cc4e39 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Make parser module export all types and associated accessors. - - - - - fb8d468f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple HTML renderer for parsed source file. - - - - - 80747822 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for specifying the CSS file path in HTML source renderer. - - - - - 994dc1f5 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix identifier recognition in Haskell source parser. - - - - - b1bd0430 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix comment recognition in Haskell source parser. - - - - - 11db85ae by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for recognizing compiler pragmas in source parser. - - - - - 736c7bd3 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding of module for associating tokens with AST names. - - - - - 7e149bc2 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement utility method for extracting variable identifiers from AST. - - - - - 32eb640a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple mechanism for associating tokens with AST names. - - - - - d4eba5bc by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add dummy support for hyperlinking named tokens. - - - - - 2b76141f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matcher bug causing wrong items being hyperlinked. - - - - - 2d48002e by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Constrain elements exported by hyperlinker modules. - - - - - 9715eec6 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for type token recognition. - - - - - 8fa401cb by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for binding token recognition. - - - - - d062400b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement go-to-definition mechanism for local bindings. - - - - - f4dc229b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement module export- and import-list item hyperlinking. - - - - - c9a46d58 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matching to allow parenthesized operators hyperlinking. - - - - - 03aad95a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix weird hyperlinking of parenthesized operators. - - - - - b4694a7d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for type declaration anchors. - - - - - 7358d2d2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for top-level function declaration anchors. - - - - - dfc24b24 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix external anchors to contain HTML file extension. - - - - - a045926c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Refactor the way AST names are handled within detailed tokens. - - - - - c76049b4 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement hyperlinking of imported module names. - - - - - 2d2a1572 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix parsing of single line comments with broken up newlines. - - - - - 11afdcf2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix bug with improper newline handling. - - - - - 8137f104 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issues with escaped newlines in comments. - - - - - 34759b19 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for parsing C preprocessor macros. - - - - - 09f0f847 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for parser module of source hyperlinker. - - - - - 709a8389 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for AST module of source hyperlinker. - - - - - 4df5c227 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add command line option for generating hyperlinked source. - - - - - 7a755ea2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Extend module interface with rich source token stream field. - - - - - 494f4ab1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement source tokenization during interface creation process. - - - - - 5f21c953 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create hyperlinker module and plug it into the Haddock pipeline. - - - - - 0cc8a216 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for providing custom CSS files for hyperlinked source. - - - - - a32bbdc1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for fancy highlighting upon hovering over identifier. - - - - - d16d642a by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make source hyperlinker generate output in apropriate directory. - - - - - ae12953d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create module with hyperlinker utility functions. - - - - - 6d4952c5 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make external hyperlinks point to locations specified by source URLs. - - - - - 8417555d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Rewrite source generation to fixed links and directory structure. - - - - - ce9cec01 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add basic support for cross-package hyperlink generation. - - - - - 7eaf025c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Disable generating hyperlinks for module references. - - - - - a50bf92e by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make Haddock generate source for all interfaces (also hidden ones). - - - - - f5ae2838 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Prevent source parser from throwing exception when lexing fails. - - - - - db9ffbe0 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement workaround for Chrome highlighting issues. - - - - - 0b6b453b by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate correct anchors for data constructors. - - - - - c86d38bc by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate anchors for record field declarations. - - - - - 063abf7f by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issue with hyperlink highlight styling in Chrome browser. - - - - - 880fc611 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking constructor names in patters. - - - - - c9e89b95 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record patterns. - - - - - 17a11996 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record expressions. - - - - - 0eef932d by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Make hyperlinker respect pretty-printer flag and add documentation. - - - - - f87c1776 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Unexpose hyperlinker modules in Cabal configuration. - - - - - 4c9e2b06 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Setup HSpec framework for Haddock API package. - - - - - 4b20cb30 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add basic tests related to comment parsing. - - - - - 6842e919 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add tests related to parsing basic language constructs. - - - - - 87bffb35 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add simple tests for do-notation parsing. - - - - - e7af1841 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add very simple QuickCheck properties for source parser spec. - - - - - c84efcf1 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Create simple test runner for hyperlinker tests. - - - - - 76b90447 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for basic identifier hyperlinking. - - - - - 0fbf4df6 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for operator hyperlinking. - - - - - 731aa039 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for constructor hyperlinking. - - - - - 995a78a2 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for record expressions and patterns hyperlinking. - - - - - 3566875a by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for literal syntax highlighting. - - - - - 68469a35 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add hyperlinker test runner to .cabal and .gitignore files. - - - - - aa946c93 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Adapt hyperlinker test runner to have the same interface as HTML one. - - - - - ce34da16 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Fix hyperlinker test runner file paths and add pretty-printing option. - - - - - 0d7dd65e by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add reference files for hyperlinker test cases. - - - - - efa4a1e0 by Łukasz Hanuszczak at 2015-07-01T00:47:32+02:00 Make hyperlinker test runner strip local links from generated source. - - - - - 3e96e584 by Łukasz Hanuszczak at 2015-07-01T01:14:59+02:00 Create simple script for accepting hyperlinker test case references. - - - - - 526fe610 by Łukasz Hanuszczak at 2015-07-01T01:16:41+02:00 Re-accept hyperlinker test cases with local references stripped out. - - - - - 892e2cb3 by Łukasz Hanuszczak at 2015-07-01T01:22:09+02:00 Fix bug with diffing wrong files in hyperlinker test runner. - - - - - 9ff46039 by Łukasz Hanuszczak at 2015-07-01T18:04:46+02:00 Remove unused dependencies in Haddock API spec configuration. - - - - - 47969c07 by Łukasz Hanuszczak at 2015-07-01T18:32:19+02:00 Add support for hyperlinking synonyms in patterns. - - - - - a73449e0 by Łukasz Hanuszczak at 2015-07-01T18:33:44+02:00 Create test case for hyperlinking @-patterns. - - - - - c2077ed8 by Łukasz Hanuszczak at 2015-07-01T19:06:04+02:00 Add support for hyperlinking universally quantified type variables. - - - - - 68017342 by Łukasz Hanuszczak at 2015-07-01T19:28:32+02:00 Create hyperlinker test case with quantified type variables. - - - - - 51c01a78 by Łukasz Hanuszczak at 2015-07-01T19:34:22+02:00 Add scoped type variables test for polymorphism test case. - - - - - 13181ae2 by Łukasz Hanuszczak at 2015-07-01T19:56:27+02:00 Add record wildcards test for records hyperlinking test case. - - - - - 991b81dd by Łukasz Hanuszczak at 2015-07-01T21:01:42+02:00 Document some functions in XHTML utlity module. - - - - - 98c8dfe5 by Łukasz Hanuszczak at 2015-07-01T22:25:21+02:00 Make hyperlinker render qualified names as one entity. - - - - - 75e13b9b by Łukasz Hanuszczak at 2015-07-01T22:27:38+02:00 Add qualified name test for identifiers hyperlinking test case. - - - - - de1e143f by Łukasz Hanuszczak at 2015-07-02T12:32:59+02:00 Fix crash happening when hyperlinking type family declarations. - - - - - 7a8fb175 by Łukasz Hanuszczak at 2015-07-02T12:47:03+02:00 Add support for anchoring data family constructor declarations. - - - - - 3b404e49 by Łukasz Hanuszczak at 2015-07-02T13:31:05+02:00 Improve support for hyperlinking type families. - - - - - 59eb7143 by Łukasz Hanuszczak at 2015-07-02T13:33:34+02:00 Add hyperlinker test case for checking type and type family declarations. - - - - - d1cda0c0 by Łukasz Hanuszczak at 2015-07-02T13:41:38+02:00 Fix issue with operators being recognized as preprocessor directives. - - - - - da206c9d by Łukasz Hanuszczak at 2015-07-02T17:18:12+02:00 Fix broken tests for parsing and hyperlinking hash operators. - - - - - 53750d1b by Łukasz Hanuszczak at 2015-07-02T18:53:28+02:00 Add support for anchoring signatures in type class declarations. - - - - - 1fa5bb10 by Łukasz Hanuszczak at 2015-07-02T19:04:47+02:00 Make hyperlinker generate anchors only to top-level value bindings. - - - - - a542305c by Łukasz Hanuszczak at 2015-07-02T19:05:58+02:00 Create hyperlinker test case for type classes. - - - - - b0dd4581 by Łukasz Hanuszczak at 2015-07-04T16:28:26+02:00 Update docs with information about source hyperlinking. - - - - - 9795302a by Łukasz Hanuszczak at 2015-07-04T16:52:15+02:00 Update docs on using `--read-interface` option. - - - - - 9acdc002 by Łukasz Hanuszczak at 2015-07-04T17:15:26+02:00 Remove potentially dangerous record access in hyperlinker AST module. - - - - - fb3ab7be by Łukasz Hanuszczak at 2015-07-04T17:40:10+02:00 Make Haddock generate warnings about potential misuse of hyperlinker. - - - - - a324c504 by Łukasz Hanuszczak at 2015-07-04T17:43:22+02:00 Fix incorrect specification of source style option in doc file. - - - - - 3f01a8e4 by Łukasz Hanuszczak at 2015-07-05T17:06:36+02:00 Refactor source path mapping to use modules as indices. - - - - - ac70f5b1 by Łukasz Hanuszczak at 2015-07-05T17:47:34+02:00 Fix bug where not all module interfaces were added to source mapping. - - - - - f5e57da9 by Łukasz Hanuszczak at 2015-07-06T16:39:57+02:00 Extract main hyperlinker types to separate module. - - - - - 43974905 by Łukasz Hanuszczak at 2015-07-06T16:52:13+02:00 Move source paths types to hyperlinker types module. - - - - - 3e236055 by Łukasz Hanuszczak at 2015-07-06T17:06:19+02:00 Add support for hyperlinking modules in import lists. - - - - - 58233d9f by Łukasz Hanuszczak at 2015-07-06T17:26:49+02:00 Add short documentation for hyperlinker source map type. - - - - - 14da016d by Łukasz Hanuszczak at 2015-07-06T18:07:20+02:00 Fix bug with module name being hyperlinked to `Prelude`. - - - - - 8f79db52 by Łukasz Hanuszczak at 2015-07-06T18:23:47+02:00 Fix problem with spec build in Haddock API configuration. - - - - - e7cc056c by Adam Sandberg Eriksson at 2015-07-07T23:22:21+01:00 StrictData: print correct strictness marks - - - - - e8253ca8 by Mateusz Kowalczyk at 2015-07-07T23:58:28+01:00 Update changelog - - - - - 0aba676b by Mateusz Kowalczyk at 2015-07-07T23:58:33+01:00 Relax upper bound on GHC a bit - - - - - 7a595381 by Mateusz Kowalczyk at 2015-07-07T23:58:52+01:00 Delete trailing whitespace - - - - - 50976d5e by Adam Sandberg Eriksson at 2015-07-08T15:03:04+02:00 StrictData: changes in HsBang type - - - - - 83b045fa by Mateusz Kowalczyk at 2015-07-11T14:35:18+01:00 Fix expansion icon for user-collapsible sections Closes haskell/haddock#412 - - - - - b2a3b0d1 by Mateusz Kowalczyk at 2015-07-22T22:03:21+01:00 Make some version changes after 2.16.1 release - - - - - a8294423 by Ben Gamari at 2015-07-27T13:16:07+02:00 Merge pull request haskell/haddock#422 from adamse/adamse-D1033 Merge for GHC D1033 - - - - - c0173f17 by randen at 2015-07-30T14:49:08-07:00 Break the response file by line termination rather than spaces, since spaces may be within the parameters. This simple approach avoids having the need for any quoting and/or escaping (although a newline char will not be possible in a parameter and has no escape mechanism to allow it). - - - - - 47c0ca14 by Alan Zimmerman at 2015-07-31T10:41:52+02:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - 45a9d770 by Mateusz Kowalczyk at 2015-07-31T09:47:43+01:00 Update changelog - - - - - 347a20a3 by Phil Ruffwind at 2015-08-02T23:15:26+01:00 Avoid JavaScript error during page load in non-frame mode In non-frame mode, parent.window.synopsis refers to the synopsis div rather than the nonexistent frame. Unfortunately, the script wrongly assumes that if it exists it must be a frame, leading to an error where it tries to access the nonexistent attribute 'replace' of an undefined value (synopsis.location). Closes haskell/haddock#406 - - - - - 54ebd519 by Phil Ruffwind at 2015-08-02T23:27:10+01:00 Link to the definitions to themselves Currently, the definitions already have an anchor tag that allows URLs with fragment identifiers to locate them, but it is rather inconvenient to obtain such a URL (so-called "permalink") as it would require finding the a link to the corresponding item in the Synopsis or elsewhere. This commit adds hyperlinks to the definitions themselves, allowing users to obtain links to them easily. To preserve the original aesthetics of the definitions, we alter the color of the link so as to be identical to what it was, except it now has a hover effect indicating that it is clickable. Additionally, the anchor now uses the 'id' attribute instead of the (obsolete) 'name' attribute. Closes haskell/haddock#407 - - - - - 02cc8bb7 by Phil Ruffwind at 2015-08-02T23:28:02+01:00 Fix typo in Haddock.Backends.Xhtml.Layout: divSynposis -> divSynopsis Closes haskell/haddock#408 - - - - - 2eb0a458 by Phil Ruffwind at 2015-08-02T23:30:07+01:00 Fix record field alignment when name is too long Change <dl> to <ul> and use display:table rather than floats to layout the record fields. This avoids bug haskell/haddock#301 that occurs whenever the field name gets too long. Slight aesthetic change: the entire cell of the field's source code is now shaded gray rather than just the area where text exists. Fixes haskell/haddock#301. Closes haskell/haddock#421 - - - - - 7abb3402 by Łukasz Hanuszczak at 2015-08-02T23:32:14+01:00 Add some utility definitions for generating line anchors. - - - - - e0b1d79b by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Make hyperlinked source renderer generate line anchors. - - - - - 24dd4c9f by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Re-accept test cases after adding line anchors for each of them. - - - - - 0372cfcb by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Override source line flags when source hyperlinker is enabled. - - - - - a81bcd07 by Mateusz Kowalczyk at 2015-08-02T23:58:25+01:00 Update tests to follow HTML changes - - - - - d2d7426f by Łukasz Hanuszczak at 2015-08-06T20:54:59+02:00 Fix quote syntax for promoted types. - - - - - 668cf029 by Łukasz Hanuszczak at 2015-08-06T21:12:00+02:00 Apply promoted type quoting to type-level consing. - - - - - 89f8e7c6 by Łukasz Hanuszczak at 2015-08-06T21:17:10+02:00 Extend advanced types test case with other examples. - - - - - 86494bca by Łukasz Hanuszczak at 2015-08-06T21:22:06+02:00 Rename advanced types test case and accept new output. - - - - - dbb7c7c0 by Adam Sandberg Eriksson at 2015-08-09T23:01:05+02:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 2a7704fa by Ben Gamari at 2015-08-10T13:18:05+02:00 Merge pull request haskell/haddock#433 from adamse/split-hsbang HsBang is split into HsSrcBang and HsImplBang - - - - - 891954bc by Thomas Miedema at 2015-08-15T14:51:18+02:00 Follow changes in GHC build system - - - - - b55d32ab by Mateusz Kowalczyk at 2015-08-21T18:06:09+01:00 Make Travis use 7.10.2 - - - - - 97348b51 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Move SYB utilities to standalone module. - - - - - 748ec081 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement `everywhere` transformation in SYB module. - - - - - 011cc543 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement generic transformation constructor. - - - - - b9510db2 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Create simple utility module for type specialization. - - - - - 43229fa6 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Make type of type specialization function more general. - - - - - fd844e90 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Add basic HTML test case for checking instance specialization. - - - - - 6ea0ad04 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Make HTML class instance printer take optional signature argument. - - - - - 65aa41b6 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Refactor instance head type to record instead of a meaningless tuple. - - - - - 3fc3bede by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add expandable method section for each class instance declaration. - - - - - 99ceb107 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Move dummy post-family instances for `DocName` to `Types` module. - - - - - e98f4708 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create convenience functions for type specialization module. - - - - - b947552f by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Hook type specialization logic with HTML pretty-printer. - - - - - dcaa8030 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create stub functions for sugaring specialized types. - - - - - fa84bc65 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement list syntax sugaring logic for specialized types. - - - - - e8b05b07 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement tuple syntax sugaring logic for specialized types. - - - - - 68a2e5bc by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Get rid of code duplication in type specialization module. - - - - - 4721c336 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create scaffolding of a framework for renaming specialized types. - - - - - 271b488d by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in missing cases in specialized type renaming function. - - - - - bfa5f2a4 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Remove code duplication in specialized type renamer. - - - - - ea6bd0e8 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Change state of the type renaming monad. - - - - - 77c5496e by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement simple mechanism for generating new type names. - - - - - 91bfb48b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in stub behaviour with actual environment renaming. - - - - - d244517b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix logic behind binder type renaming. - - - - - f3c5e360 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add SYB-like utility function for performing stateful queries. - - - - - eb3f9154 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create function for retrieving free variables from given type. - - - - - a94561d3 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix compilation error caused by incorrect type signature. - - - - - 8bb707cf by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Move `SetName` class definition to types module. - - - - - 5800b13b by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Hook type renamer with instance method HTML pretty-printer. - - - - - 6a480164 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some test cases for type renamer. - - - - - 839842f7 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized signatures refer to original signature declaration. - - - - - 4880f7c9 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized methods be nicely formatted again. - - - - - ab5a6a2e by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Attach source locations to the specialized class methods. - - - - - 43f8a559 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Extend instances test case to also test multi-name type signatures. - - - - - 59bc751c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix tab-based indentation in instances test case. - - - - - c2126815 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Improve placement of instance methods expander button. - - - - - 0a32e287 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add new data type declaration to instance specialization test case. - - - - - 5281af1f by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make type renamer first try single-letter names as alternatives. - - - - - 7d509475 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix type renamer bug with incorrect names being generated. - - - - - 0f35bf7c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some documentation and refactor type specialization module. - - - - - da1d0803 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix another bug where type renamer was generating incorrect names. - - - - - cd39b5cb by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Refactor type renamer to rebinding and pure renaming phases. - - - - - 850251f4 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix unwitting compilation bug. - - - - - e5e9fc01 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Integrate instance specification type into class instance definition. - - - - - 825b0ea0 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer neccessary instance specification type. - - - - - cdba44eb by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix declaration converter to use more appropriate mode for methods. - - - - - bc45c309 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug with types not being specialized at all. - - - - - 5d8e5d89 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug where instance expander was opening wrong section. - - - - - 6001ee41 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix another type renamer bug where not all names were rebound. - - - - - 5f58ce2a by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix yet another renamer bug where some names were not unique. - - - - - 8265e521 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split instance subsection layout method to top-level declarations. - - - - - e5e66298 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Rearrange layout of instance methods in generated documentation. - - - - - a50b4eea by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer used layout method. - - - - - 2ff36ec2 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach section title to the instance methods block. - - - - - 7ac15300 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Add basic tests for associated types in instances test case. - - - - - db0ea2f9 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach associated types information to instance header. - - - - - 71cad4d5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details section contain associated types information. - - - - - deee2809 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Improve look of rendered associated families in instance details. - - - - - 839d13a5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Introduce alternative type for family declarations. - - - - - d397f03f by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details record use new type for family declarations. - - - - - 2b23fe97 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split printer of type family header to separate functions. - - - - - c3498cdc by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Implement HTML renderer for pseudo-family declarations. - - - - - c12bbb04 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Apply type specializer to associated type family declarations. - - - - - 2fd69ff2 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Create helper method for specializing type signatures. - - - - - 475826e7 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Refactor specializer module to be independent from XHTML backend. - - - - - f00b431c by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add some documentation for instance head specializer. - - - - - a9fef2dc by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix bug with missing space in documentation for associated types. - - - - - 50e29056 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with incorrect instance details sections being expanded. - - - - - e6dfdd03 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by adding instance details section. - - - - - 75565b2a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make section identifier of instance details more GHC-independent. - - - - - add0c23e by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Re-accept tests after applying deterministic section identifiers. - - - - - 878f2534 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make identifier generation also architecture-independent. - - - - - 48be69f8 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with instance expander hijacking type hyperlink click. - - - - - 47830c1f by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Get rid of dreadful hashing function for generating identifiers. - - - - - 956cd5af by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Move `InstOrigin` type declaration to more appropriate module. - - - - - bf672ed3 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by changes related to instance expander. - - - - - 8f2a949a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add examples with type operators to the instances test case. - - - - - 64600a84 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add basic support for sugaring infix type operators. - - - - - 747d71b8 by Łukasz Hanuszczak at 2015-08-21T18:22:34+01:00 Add support for sugaring built-in function syntax. - - - - - d4696ffb by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Remove default methods from Hoogle class output. - - - - - bf0e09d7 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add fixity declarations in Hoogle backend output. - - - - - 90e91a51 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix bug with incorrect fixities being generated in Hoogle backend. - - - - - 48f11d35 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve class type family declarations output in Hoogle backend. - - - - - 661e8e8f by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add missing default family equations in Hoogle output. - - - - - e2d64103 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve formatting of class details output in Hoogle backend. - - - - - 490fc377 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix weird-looking Hoogle output for familyless classes. - - - - - ea115b64 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create script file for new HTML test runner. - - - - - 609913d3 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Set default behaviour if no arguments given. - - - - - dc115f67 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for providing optional arguments for test runner. - - - - - d93ec867 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve output of test runner error messages. - - - - - 0be9fe12 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for executing Haddock process in test runner. - - - - - 4e4d00d9 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add GHC path to test runner configuration. - - - - - d67a2086 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make GHC path a test runner command-line argument. - - - - - c810079a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Extend test runner configuration with Haddock arguments. - - - - - fee18845 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor test runner and create stub functions. - - - - - ff7c161f by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make test runner actually run Haddock executable. - - - - - 391f73e6 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with test runner not producing any output files. - - - - - 81a74e2d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Setup skeleton of framework for running tests. - - - - - f8a79ec4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with modules not being found in global search mode. - - - - - 7e700b4d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make Haddock standard output redirection be more configurable. - - - - - 53b4c17a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Incorporate old, ugly functions for comparing output files. - - - - - 8277c8aa by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor architecture of test runner output checking functions. - - - - - 587bb414 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement actual diffing mechanism. - - - - - 9ed2b5e4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve code style to match popular guidelines. - - - - - 14bffaf8 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make it possible to choose alternative diff tool. - - - - - 5cdfb005 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create stub methods for processing test output as XML documents. - - - - - 7ef8e12e by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement link-stripping logic as simple SYB transformation. - - - - - 8a1fcd4f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Incorporate link stripping to output diffing mechanism. - - - - - 37dba2bc by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement footer-stripping logic. - - - - - 9cd52120 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Add missing dependencies in Cabal configuration file. - - - - - e0f83c6e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix issue with output being printed in incorrect order. - - - - - 0a94fbb0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to run tests without generating diff. - - - - - 76a58c6f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor HTML test suite boilerplate to external package. - - - - - af41e6b0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utilities for storing directory configuration. - - - - - d8f0698f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move IO-dependent config of HTML test suite to test package. - - - - - 17369fa0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Enable all compiler warnings in Haddock test package configuration. - - - - - 9d03b47a by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move Haddock runner of HTML test suite to Haddock test package. - - - - - 4b3483c5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 03754194 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience wrappers to simplify in test entry points. - - - - - 27476ab7 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adjust module visibility and items they export. - - - - - c40002ba by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Remove no longer useful test option. - - - - - 55ab2541 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Change extension of test files used for diffing. - - - - - 136bf4e4 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor and simplify XHTML helper module of test package. - - - - - 69f7e3df by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix typo in link stripper of HTML test suite runner. - - - - - 0c3c1c6b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience script for running specific HTML tests. - - - - - 489e1b05 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement utility functions for conditional link stripping. - - - - - 0f985dc3 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt `hypsrc-test` module to work with new testing framework. - - - - - 927406f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement output accepting mechanism in test package. - - - - - 8545715e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utility function for recursive obtaining directory contents. - - - - - cb70381f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 019599b5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix path handling in test runner. - - - - - 399b985b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to specify ignored files for test output. - - - - - 41b3d93d by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt HTML test runner to use new ignoring functionality. - - - - - e2091c8b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix bug with not all test output files being checked. - - - - - b22134f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Specify ignored files for hyperlinker source test runner. - - - - - 3301dfa1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Copy test runner script for hyperlinked source case. - - - - - d39a6dfa by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner invoking Haddock in incorrect mode. - - - - - f32c8ff3 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix path handling in test module loader. - - - - - 10f94ee9 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make test runner ignore test packages with no modules. - - - - - 5dc4239c by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create test runner entry points for LaTeX test suite. - - - - - 58d1f7cf by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with unnecessary checking old test output. - - - - - c7ce76e1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Re-implement test acceptance functionality. - - - - - 13bbabe8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix warning about no longer needed definition. - - - - - 958a99b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Adapt Cabal configuration to execute LaTeX suite with new runner. - - - - - 550ff663 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Setup test suite for Hoogle backend. - - - - - 3aa969c4 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make Hoogle backend create output directory if needed. - - - - - eb085b02 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Add appropriate .gitignore entry and configure Hoogle test suite. - - - - - a50bf915 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner failing when run on multiple test packages. - - - - - bf5368b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create simple test cases for Hoogle backend. - - - - - 6121ba4b by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create helper function for conversion between XML and XHTML. - - - - - cb516061 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Refactor existing code to use XHTML printer instead of XML one. - - - - - e2de8c82 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Improve portability of test runner scripts. - - - - - 9563e774 by Łukasz Hanuszczak at 2015-08-22T23:43:16+02:00 Remove redundant import statement. - - - - - 55353df1 by Łukasz Hanuszczak at 2015-08-24T23:09:20+02:00 Fix bug with accepting to non-existing directory. - - - - - 00a334ca by Łukasz Hanuszczak at 2015-08-24T23:09:47+02:00 Accept output for Hoogle and LaTeX backends. - - - - - 29191d8b by Łukasz Hanuszczak at 2015-08-24T23:14:18+02:00 Get rid of obsolete testing utilities. - - - - - bbb25db3 by Łukasz Hanuszczak at 2015-08-24T23:18:50+02:00 Update sandbox setup guide to work with Haddock test package. - - - - - cfd45248 by Łukasz Hanuszczak at 2015-08-24T23:51:30+02:00 Make Travis aware of Haddock test package. - - - - - 74185b7a by Łukasz Hanuszczak at 2015-08-25T17:41:59+02:00 Fix test suite failure when used with Stack. - - - - - 18769697 by Łukasz Hanuszczak at 2015-08-25T18:02:09+02:00 Add sample Stack setup to the hacking guide. - - - - - 22715eeb by Łukasz Hanuszczak at 2015-08-25T18:04:47+02:00 Fix Markdown formatting of README file. - - - - - b49ec386 by Łukasz Hanuszczak at 2015-08-25T18:13:36+02:00 Setup Haddock executable path in Travis configuration. - - - - - 5d29eb03 by Eric Seidel at 2015-08-30T09:55:58-07:00 account for changes to ipClass - - - - - f111740a by Ben Gamari at 2015-09-02T13:20:37+02:00 Merge pull request haskell/haddock#443 from bgamari/ghc-head account for changes to ipClass - - - - - a2654bf6 by Jan Stolarek at 2015-09-03T01:32:57+02:00 Follow changes from haskell/haddock#6018 - - - - - 2678bafe by Richard Eisenberg at 2015-09-21T12:00:47-04:00 React to refactoring CoAxiom branch lists. - - - - - ebc56e24 by Edward Z. Yang at 2015-09-21T11:53:46-07:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4a8c4198 by Tamar Christina at 2015-09-27T13:59:08+02:00 Create Process: removed PhaseFailed - - - - - 7e99b790 by Oleg Grenrus at 2015-09-27T20:52:10+03:00 Generate docs for orphan instances - - - - - 32e932e2 by Oleg Grenrus at 2015-09-28T07:21:11+03:00 Have source links for orphan instances - - - - - c2eb9f4f by Oleg Grenrus at 2015-09-28T07:24:58+03:00 Print orphan instances header only if required - - - - - ff96f978 by Oleg Grenrus at 2015-09-28T07:40:54+03:00 Add orphan instances link to contents box - - - - - d72490a6 by Oleg Grenrus at 2015-09-28T16:37:44+03:00 Fix orphan instance collapsing - - - - - 25d3dfe5 by Ben Gamari at 2015-10-03T12:38:09+02:00 Merge pull request haskell/haddock#448 from Mistuke/fix-silent-death-of-runInteractive Remove PhaseFailed - - - - - 1e45e43b by Edward Z. Yang at 2015-10-11T13:10:10-07:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b1370ac1 by Adam Gundry at 2015-10-16T16:26:42+01:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 60bef421 by Simon Peyton Jones at 2015-10-26T12:52:36+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 4c1898ca by Simon Peyton Jones at 2015-10-27T14:24:56+00:00 Track change to PatSyn.patSynSig - - - - - 25108e85 by Simon Peyton Jones at 2015-10-27T17:34:18+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - 693643ac by Ben Gamari at 2015-10-28T14:33:06+01:00 Account for Typeable changes The treatment of type families changed. - - - - - cd7c2221 by Simon Peyton Jones at 2015-10-30T13:03:51+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - 712032cb by Herbert Valerio Riedel at 2015-10-31T11:01:45+01:00 Relax upper bound on `base` to allow base-4.9 - - - - - 0bfa0475 by Simon Peyton Jones at 2015-10-31T19:08:13+00:00 More adaption to wildcard-refactor - - - - - 0a3c0cb7 by Simon Peyton Jones at 2015-10-31T22:14:43+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - c4fd4ec9 by Alan Zimmerman at 2015-11-01T11:16:34+01:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 42cdd882 by Matthew Pickering at 2015-11-06T20:02:16+00:00 Change for IEThingWith - - - - - f368b7be by Ben Gamari at 2015-11-11T11:35:51+01:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - e32965b8 by Simon Peyton Jones at 2015-11-13T12:18:17+00:00 Merge with origin/head - - - - - ebcf795a by Edward Z. Yang at 2015-11-13T21:56:27-08:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4e23989f by Simon Peyton Jones at 2015-11-18T11:32:54+00:00 Wibbles to Haddock - - - - - 2289cd4a by Simon Peyton Jones at 2015-11-20T23:12:49+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor - - - - - 695975a6 by Alan Zimmerman at 2015-11-21T21:16:12+02:00 Update to match GHC wip/T11019 - - - - - bbba21e7 by Simon Peyton Jones at 2015-11-23T13:54:31+00:00 merge with origin/ghc-head - - - - - 3d664258 by Simon Peyton Jones at 2015-11-23T17:17:18+00:00 Wibble - - - - - e64cf586 by Herbert Valerio Riedel at 2015-12-05T00:29:55+01:00 Canonicalise Monad instances - - - - - a2de15a7 by Alan Zimmerman at 2015-12-05T17:33:52+02:00 Matching changes for haskell/haddock#11028 - - - - - cc29a3e4 by Alan Zimmerman at 2015-12-05T19:45:33+02:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 95dd15d1 by Richard Eisenberg at 2015-12-11T17:33:39-06:00 Update for type=kinds - - - - - cb5fd9ed by Herbert Valerio Riedel at 2015-12-14T15:07:30+00:00 Bump versions for ghc-7.11 - - - - - 4f286d96 by Simon Peyton Jones at 2015-12-14T15:10:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 13ea2733 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 098df8b8 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track changes in HsSyn for quasi-quotes - - - - - 716a64de by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track change in API of TyCon - - - - - 77a66bca by Adam Gundry at 2015-12-14T15:10:58+00:00 Track API changes to support empty closed type familes - - - - - f2808305 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track the new location of setRdrNameSpace - - - - - ba8b08a4 by Alan Zimmerman at 2015-12-14T15:10:59+00:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - a4ded87e by Thomas Winant at 2015-12-14T15:14:05+00:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 25c78107 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: print correct strictness marks - - - - - 6cbc41c4 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: changes in HsBang type - - - - - ad46821a by Alan Zimmerman at 2015-12-14T15:14:06+00:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - abc0ae5b by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 3308d06c by Thomas Miedema at 2015-12-14T15:14:07+00:00 Follow changes in GHC build system - - - - - 6c763deb by Eric Seidel at 2015-12-14T15:14:07+00:00 account for changes to ipClass - - - - - ae5b4eac by Jan Stolarek at 2015-12-14T15:17:00+00:00 Follow changes from haskell/haddock#6018 - - - - - ffbc40e0 by Richard Eisenberg at 2015-12-14T15:17:02+00:00 React to refactoring CoAxiom branch lists. - - - - - d1f531e9 by Edward Z. Yang at 2015-12-14T15:17:02+00:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 79f73754 by Tamar Christina at 2015-12-14T15:17:02+00:00 Create Process: removed PhaseFailed - - - - - 3d37bebb by Edward Z. Yang at 2015-12-14T15:20:46+00:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 5f8a9e44 by Adam Gundry at 2015-12-14T15:20:48+00:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 79dda70f by Simon Peyton Jones at 2015-12-14T15:26:02+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 959930fb by Simon Peyton Jones at 2015-12-14T15:37:50+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - e18a8df5 by Simon Peyton Jones at 2015-12-14T15:37:52+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - aa35ab52 by Simon Peyton Jones at 2015-12-14T15:40:18+00:00 More adaption to wildcard-refactor - - - - - 8ceef94b by Simon Peyton Jones at 2015-12-14T15:46:04+00:00 Track change to PatSyn.patSynSig - - - - - cd81e83d by Ben Gamari at 2015-12-14T15:46:06+00:00 Account for Typeable changes The treatment of type families changed. - - - - - 63c9117c by Herbert Valerio Riedel at 2015-12-14T15:46:34+00:00 Relax upper bound on `base` to allow base-4.9 - - - - - a484c613 by Alan Zimmerman at 2015-12-14T15:47:46+00:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 2c26fa51 by Matthew Pickering at 2015-12-14T15:47:47+00:00 Change for IEThingWith - - - - - 593baa0f by Ben Gamari at 2015-12-14T15:49:21+00:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - b6b5ca78 by Edward Z. Yang at 2015-12-14T15:49:54+00:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b5b0e072 by Alan Zimmerman at 2015-12-14T15:54:20+00:00 Update to match GHC wip/T11019 - - - - - 14ddeb68 by Simon Peyton Jones at 2015-12-14T15:54:22+00:00 Wibble - - - - - 10a90ad8 by Herbert Valerio Riedel at 2015-12-14T15:54:22+00:00 Canonicalise Monad instances - - - - - ed68ac50 by Alan Zimmerman at 2015-12-14T15:55:48+00:00 Matching changes for haskell/haddock#11028 - - - - - 3f7e5a2d by Alan Zimmerman at 2015-12-14T15:55:49+00:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 6543a73f by Richard Eisenberg at 2015-12-14T15:59:55+00:00 Update for type=kinds - - - - - 193a5c48 by Matthew Pickering at 2015-12-14T18:17:00+00:00 Changes to compile with 8.0 - - - - - add669ec by Matthew Pickering at 2015-12-14T18:47:12+00:00 Warnings - - - - - 223f3fb4 by Ben Gamari at 2015-12-15T23:45:05+01:00 Update for D1200 - - - - - d058388f by Ben Gamari at 2015-12-16T05:40:17-05:00 Types: Add Outputable[Bndr] DocName instances - - - - - 62ecd7fb by Ben Gamari at 2015-12-16T09:23:09-05:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ddbc187a by Ben Gamari at 2015-12-16T17:54:55+01:00 Update for D1200 - - - - - cec83b52 by Ben Gamari at 2015-12-16T17:54:55+01:00 Types: Add Outputable[Bndr] DocName instances - - - - - d12ecc98 by Ben Gamari at 2015-12-16T17:54:55+01:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ada1616f by Ben Gamari at 2015-12-16T17:54:58+01:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a4f0383d by Ben Gamari at 2015-12-16T23:32:38+01:00 Fix Hyperlinker GHC.con_names is now GHC.getConNames - - - - - a10e6849 by Ben Gamari at 2015-12-20T00:54:11+01:00 Merge remote-tracking branch 'mrhania/testing-framework-improvements' into ghc-head - - - - - f078b4fd by Ben Gamari at 2015-12-20T00:59:51+01:00 test: Compatibility with Cabal 1.23 - - - - - 88a511a9 by Ben Gamari at 2015-12-20T01:14:35+01:00 Merge remote-tracking branch 'phadej/orphans' into ghc-head - - - - - 4e250f36 by Ben Gamari at 2015-12-20T01:14:52+01:00 Add html-test for orphan instances output - - - - - 87fffbad by Alan Zimmerman at 2015-12-20T09:50:42+02:00 Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc - - - - - 6b7e51c9 by idontgetoutmuch at 2015-12-20T21:01:47+00:00 Merge pull request haskell/haddock#1 from haskell/ghc-head Ghc head - - - - - 229c1fb5 by Dominic Steinitz at 2015-12-21T07:19:16+00:00 Handle inline math with mathjax. - - - - - 57902d66 by Dominic Steinitz at 2015-12-21T08:07:11+00:00 Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs - - - - - 0e69f236 by Herbert Valerio Riedel at 2015-12-21T18:30:43+01:00 Fix-up left-over assumptions of GHC 7.12 into GHC 8.0 - - - - - c67f8444 by Simon Peyton Jones at 2015-12-22T16:26:56+00:00 Follow removal of NamedWildCard from HsType - - - - - da40327a by Ben Gamari at 2015-12-23T14:15:28+01:00 html-test/Operators: Clear up ambiguous types For reasons that aren't entirely clear a class with ambiguous types was accepted by GHC <8.0. I've added a functional dependency to clear up this ambiguity. - - - - - 541b7fa4 by Ben Gamari at 2015-12-23T14:18:51+01:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 0febc947 by Ben Gamari at 2015-12-24T00:30:20+01:00 hoogle-test/AssocTypes: Allow AmbiguousTypes GHC 8.0 complains otherwise - - - - - 25810841 by Ben Gamari at 2015-12-24T00:33:18+01:00 OrphanInstances: Accept test output - - - - - 841987f3 by Ben Gamari at 2015-12-25T11:03:11+01:00 Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head - - - - - 358391f0 by Ben Gamari at 2015-12-26T10:44:50+01:00 Add missing import - - - - - a8896885 by Ben Gamari at 2015-12-26T10:45:27+01:00 travis: Use Travis containers - - - - - 85e82134 by Herbert Valerio Riedel at 2015-12-30T17:25:39+01:00 tweak version bounds for GHC-8.1 - - - - - 672a5f75 by randen at 2016-01-01T23:45:25-08:00 The Haddock part for fully gcc-like response files " driver/Main.hs * Moved the response file handling into ResponseFile.hs, updating import section as appropriate. * driver/ResponseFile.hs * New file. In anticipation that maybe some day this could be provided by another library, and to make it possible to unit test, this functionality is pulled out of the Main.hs module, and expanded to support the style/format of response files which gcc uses. * The specification for the format of response files which gcc generates and consumes, seems to be best derived from the gcc code itself (libiberty/argv.c), so that is what has been done here. * This is intended to fix haskell/haddock#379 * driver-test/Main.hs * New file for testing code in the driver source tree * driver-test/ResponseFileSpec.hs * Tests, adapted/adopted from the same gcc code where the escaping/unescaping is from, in the hspec style of unit tests * haddock.cabal * Add the driver-test test-suite. Introduces a new library dependency (upon hspec) for the haddock driver target in the haddock.cabal file, but practically, this should not be a problem as the haddock-api tests already depend on hspec. - - - - - 498781df by Ben Gamari at 2016-01-06T13:41:04+01:00 Version bumps and changelog - - - - - 8451e46a by Ben Gamari at 2016-01-06T13:47:17+01:00 Merge remote-tracking branch 'randen/bug468' - - - - - fb2d9181 by Ben Gamari at 2016-01-06T08:14:42-05:00 Add ResponseFile to OtherModules - - - - - 2cb2d2e3 by Ben Gamari at 2016-01-06T14:35:00+01:00 Merge branch 'master' into ghc-head - - - - - 913477d4 by Eric Seidel at 2016-01-11T14:57:57-08:00 deal with un-wiring of IP class - - - - - c557a4b3 by Alan Zimmerman at 2016-01-15T11:14:35+02:00 Update to match wip/T11430 in GHC - - - - - 3e135093 by Alan Zimmerman at 2016-01-16T18:21:59+01:00 Update to match wip/T11430 in GHC - - - - - c48ef2f9 by Ben Gamari at 2016-01-18T09:50:06+01:00 Merge remote-tracking branch 'gridaphobe/ghc-head' into ghc-head - - - - - 9138a1b0 by Eric Seidel at 2016-01-18T12:50:15+01:00 deal with un-wiring of IP class (cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f) - - - - - b48c172e by Joachim Breitner at 2016-01-19T00:11:38+01:00 Make sure --mathjax affects all written HTML files This fixes haskell/haddock#475. - - - - - af61fe63 by Ryan Scott at 2016-02-07T23:25:57+01:00 Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes haskell/haddock#473) - - - - - b6458693 by Ben Gamari at 2016-02-07T23:29:27+01:00 Merge pull request haskell/haddock#477 from haskell/issue-475 Make sure --mathjax affects all written HTML files - - - - - adcc0071 by Ben Gamari at 2016-02-07T23:34:52+01:00 Merge branch 'master' into ghc-head - - - - - d0404e61 by Ben Gamari at 2016-02-08T12:46:49+01:00 doc: Switch to Sphinx - - - - - acb153b3 by Ben Gamari at 2016-02-08T12:46:56+01:00 Document --use-unicode flag - - - - - c20bdf1d by Ben Gamari at 2016-02-08T13:41:24+01:00 Fix GHC and haddock-library dependency bounds - - - - - 8d946801 by Ben Gamari at 2016-02-08T14:54:56+01:00 testsuite: Rework handling of output sanitization Previously un-cleaned artifacts were kept as reference output, making it difficult to tell what has changed and causing spurious changes in the version control history. Here we rework this, cleaning the output during acceptance. To accomplish this it was necessary to move to strict I/O to ensure the reference handle was closed before accept attempts to open the reference file. - - - - - c465705d by Ben Gamari at 2016-02-08T15:36:05+01:00 test: Compare on dump For reasons I don't understand the Xml representations differ despite their textual representations being identical. - - - - - 1ec0227a by Ben Gamari at 2016-02-08T15:36:05+01:00 html-test: Accept test output - - - - - eefbd63a by Ben Gamari at 2016-02-08T15:36:08+01:00 hypsrc-test: Accept test output And fix impredicative Polymorphism testcase. - - - - - d1df4372 by Ben Gamari at 2016-02-08T15:40:44+01:00 Merge branch 'fix-up-testsuite' - - - - - 206a3859 by Phil Ruffwind at 2016-02-08T17:51:21+01:00 Move the permalinks to "#" on the right side Since pull request haskell/haddock#407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). - - - - - 6c89fa03 by Phil Ruffwind at 2016-02-08T17:54:44+01:00 Update tests for previous commit - - - - - effaa832 by Ben Gamari at 2016-02-08T17:56:17+01:00 Merge branch 'anchors-redux' - - - - - 9a2bec90 by Ben Gamari at 2016-02-08T17:58:40+01:00 Use -fprint-unicode-syntax when --use-unicode is enabled This allows GHC to render `*` as its Unicode representation, among other things. - - - - - 28ecac5b by Ben Gamari at 2016-02-11T18:53:03+01:00 Merge pull request haskell/haddock#480 from bgamari/sphinx Move documentation to ReStructuredText - - - - - 222e5920 by Ryan Scott at 2016-02-11T15:42:42-05:00 Collapse type/data family instances by default - - - - - a80ac03b by Ryan Scott at 2016-02-11T20:17:09-05:00 Ensure expanded family instances render correctly - - - - - 7f985231 by Ben Gamari at 2016-02-12T10:04:22+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - d4eda086 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Various cleanups - - - - - 79bee48d by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show kind signatures for type family variables Addresses GHC haskell/haddock#11588. - - - - - b2981d98 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show 'where ...' after closed type family Seems like we should ideally show the actual equations as well but that seems like it would be a fair amount of work - - - - - cfc0e621 by Ben Gamari at 2016-02-18T22:48:12+01:00 Merge pull request haskell/haddock#483 from bgamari/T11588 Fix GHC haskell/haddock#11588 This fixes GHC haskell/haddock#11588: * Show where ... after closed type families * Show kind signatures on type family type variables - - - - - 256e8a0d by Ben Gamari at 2016-02-18T23:15:39+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 32402036 by Richard Eisenberg at 2016-02-24T13:21:44-05:00 Follow-on changes to support RuntimeRep - - - - - 2b1c572d by Matthew Pickering at 2016-03-04T21:04:02+00:00 Remove unused functions - - - - - eb906f50 by Richard Eisenberg at 2016-03-13T21:17:20+01:00 Follow-on changes to support RuntimeRep (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c) - - - - - 8c34ef34 by Richard Eisenberg at 2016-03-14T23:47:23-04:00 Changes due to fix for GHC#11648. - - - - - 0e022014 by Richard Eisenberg at 2016-03-15T14:06:45+01:00 Changes due to fix for GHC#11648. (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1) - - - - - ed3f78ab by Rik Steenkamp at 2016-04-02T22:20:36+01:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 - - - - - d3210042 by Rik Steenkamp at 2016-04-04T15:43:32+02:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb) - - - - - 236eec90 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 692ee7e0 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. - - - - - 79619f57 by Ben Gamari at 2016-04-10T23:46:22+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. (cherry picked from commit c6d6a18d85e5e2d9bb5904e6919e8a8d7e31c4c5) - - - - - 3358ccb4 by Ben Gamari at 2016-04-10T23:47:27+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 264949b1 by Ben Gamari at 2016-04-16T17:50:23+02:00 Merge pull request haskell/haddock#482 from RyanGlScott/ghc-head Collapse type/data family instances by default - - - - - 478c483a by Ben Gamari at 2016-04-16T17:51:09+02:00 Merge pull request haskell/haddock#489 from mpickering/unused-functions Remove some unused functions - - - - - c94e55f0 by Ryan Scott at 2016-04-16T17:57:54+02:00 Collapse type/data family instances by default (cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088) - - - - - 31e633d3 by Ryan Scott at 2016-04-16T17:58:06+02:00 Ensure expanded family instances render correctly (cherry picked from commit 1338b5d7c32939de6bbc31af0049477e4f847103) - - - - - 03e4d197 by Matthew Pickering at 2016-04-16T17:58:21+02:00 Remove unused functions (cherry picked from commit b89d1c2456bdb2d4208d94ded56155f7088a37d0) - - - - - ed4116f6 by Ben Gamari at 2016-04-20T10:46:57+02:00 ghc: Install files for needed --hyperlinked-source - - - - - 0be999c4 by Ben Gamari at 2016-04-20T11:37:54+02:00 ghc: Install files for needed --hyperlinked-source (cherry picked from commit 5c82c9fc2d21ddaae4a2470f1c375426968f19c6) - - - - - 4d17544c by Simon Peyton Jones at 2016-04-20T12:42:28+01:00 Track change to HsGroup This relates to a big GHC patch for Trac haskell/haddock#11348 - - - - - 1700a50d by Ben Gamari at 2016-05-01T13:19:27+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. - - - - - 0b7c8125 by Ben Gamari at 2016-05-01T13:21:43+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. (cherry picked from commit 609018dd09c4ffe27f9248b2d8b50f6196cd42b9) - - - - - af115ce0 by Ryan Scott at 2016-05-04T22:15:50-04:00 Render Haddocks for derived instances Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac haskell/haddock#11768. - - - - - 76fa1edc by Ben Gamari at 2016-05-10T18:13:25+02:00 haddock-test: A bit of refactoring for debuggability - - - - - 7d4c4b20 by Ben Gamari at 2016-05-10T18:13:25+02:00 Create: Mark a comment as TODO - - - - - 2a6d0c90 by Ben Gamari at 2016-05-10T18:13:25+02:00 html-test: Update reference output - - - - - bd60913d by Ben Gamari at 2016-05-10T18:13:25+02:00 hypsrc-test: Fix reference file path in cabal file It appears the haddock insists on prefixing --hyperlinked-sourcer output with directory which the source appeared in. - - - - - c1548057 by Ben Gamari at 2016-05-10T18:22:12+02:00 doc: Update extra-source-files in Cabal file - - - - - 41d5bae3 by Ben Gamari at 2016-05-10T18:29:21+02:00 Bump versions - - - - - ca75b779 by Ben Gamari at 2016-05-11T16:03:44+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 4e3cfd62 by Ben Gamari at 2016-05-11T16:06:45+02:00 Merge remote-tracking branch 'RyanGlScott/ghc-head' into ghc-head - - - - - a2379970 by Ben Gamari at 2016-05-11T23:15:11+02:00 doc: Add clean targets - - - - - f275212e by Ben Gamari at 2016-05-11T23:15:14+02:00 doc: Add html as an all-target for ghc Otherwise the html documentation won't be installed for binary-dist. - - - - - 388fc0af by Ben Gamari at 2016-05-12T09:49:12+02:00 Update CHANGES - - - - - bad81ad5 by Ben Gamari at 2016-05-12T09:49:38+02:00 Version bump - - - - - c01688a7 by Ben Gamari at 2016-05-12T10:04:58+02:00 Revert "Version bump" This bump was a bit premature. This reverts commit 7b238d9c5be9b07aa2d10df323b5c7b8d1634dc8. - - - - - 7ed05724 by Ben Gamari at 2016-05-12T10:05:33+02:00 doc: Fix GHC clean rule Apparently GHC's build system doesn't permit wildcards in clean paths. - - - - - 5d9611f4 by Ben Gamari at 2016-05-12T17:43:50+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 653566b2 by Ben Gamari at 2016-05-14T09:57:31+02:00 Version bump to 2.17.2 - - - - - b355c439 by Ben Gamari at 2016-05-14T09:57:51+02:00 doc: Use `$(MAKE)` instead of `make` This is necessary to ensure we use gmake. - - - - - 8a18537d by Ben Gamari at 2016-05-14T10:15:45+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - b3290ef1 by Sebastian Meric de Bellefon at 2016-05-14T11:29:47-04:00 Fix haskell/haddock#303. Hide footer when printing The "Produced by Haddock" footer was overlapping the page's body when printing. This patch hides the footer with a css media rule. - - - - - b4a76f89 by Sebastian Meric de Bellefon at 2016-05-15T02:12:46-04:00 Fix haskell/haddock#280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines - - - - - ba797c9e by Ben Gamari at 2016-05-16T14:53:46+02:00 doc: Vendorize alabaster Sphinx theme Alabaster is now the default sphinx theme and is a significant improvement over the previous default that it's worthproviding it when unavailable (e.g. Sphinx <1.3). - - - - - c9283e44 by Ben Gamari at 2016-05-16T14:55:17+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 1c9ea198 by Sebastian Méric de Bellefon at 2016-05-16T12:30:40-04:00 Merge pull request haskell/haddock#502 from Helkafen/master Fix haskell/haddock#303. Hide footer when printing - - - - - 33631016 by Ben Gamari at 2016-05-16T19:56:11+02:00 Revert "doc: Vendorize alabaster Sphinx theme" This ended up causes far too many issues to be worthwhile. We'll just have to live with inconsistent haddock documentation. This reverts commit cec21957001143794e71bcd9420283df18e7de40. - - - - - 93317d26 by Ben Gamari at 2016-05-16T19:56:11+02:00 cabal: Fix README path - - - - - c8695b22 by Ben Gamari at 2016-05-16T19:58:51+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 0b50eaaa by Ben Gamari at 2016-05-16T21:02:08+02:00 doc: Use whichever theme sphinx deems appropriate - - - - - 857c1c9c by Ben Gamari at 2016-05-16T21:07:08+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 15fc5637 by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Remove redundant imports - - - - - 132ddc6a by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Better debug output For tracking down haskell/haddock#505 - - - - - 2252a149 by Ben Gamari at 2016-05-22T12:43:59+02:00 Don't consider default class ops when looking for decls When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of haskell/haddock#505. - - - - - 4886b2ec by Oleg Grenrus at 2016-05-24T16:19:48+03:00 UnfelpfulSpan line number omitted Kind of resolves https://github.com/haskell/haddock/issues/508 - - - - - a4befd36 by Oleg Grenrus at 2016-05-24T16:53:35+03:00 Change Hyperlinked lexer to know about DataKinds ticks - - - - - f45cb52e by David Feuer at 2016-05-24T18:48:53-04:00 Make parser state a newtype Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day. - - - - - 05013dd7 by Sebastian Meric de Bellefon at 2016-05-24T22:03:55-04:00 remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) Frames are a bit broken, ignored by Hackage, and considered obsolete in general. This patch disables frames generation. The mini_*.html files are still used in the synopsis. - - - - - b8163a88 by Ben Gamari at 2016-05-25T14:44:15+02:00 Merge pull request haskell/haddock#507 from bgamari/T505 Fix haskell/haddock#505 - - - - - ea1b30c6 by Sebastian Meric de Bellefon at 2016-05-25T14:17:00-04:00 Update CHANGES - - - - - eddfc258 by Sebastian Méric de Bellefon at 2016-05-25T15:17:40-04:00 Merge pull request haskell/haddock#514 from Helkafen/frames remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) - - - - - 0e506818 by Alex Biehl at 2016-05-26T12:43:09+02:00 Remove misplaced haddock comment - - - - - a07d28c0 by Ben Gamari at 2016-05-27T11:34:59+02:00 Merge pull request haskell/haddock#515 from alexbiehl/master Remove misplaced haddock comment - - - - - 9001d267 by Ben Gamari at 2016-05-27T11:35:46+02:00 Merge pull request haskell/haddock#513 from treeowl/newtype-since Make parser state a newtype - - - - - 74e1a018 by Sebastian Méric de Bellefon at 2016-05-28T17:28:15-04:00 Merge pull request haskell/haddock#504 from Helkafen/issue-280 Fix haskell/haddock#280. Parsing of module header - - - - - 37557f4f by Alan Zimmerman at 2016-05-29T23:36:50+02:00 Matching changes for haskell/haddock#12105 - - - - - 7d09e5d6 by Sebastian Meric de Bellefon at 2016-06-03T18:07:48-04:00 Version bumps (2.17.3, 1.4.2) - - - - - 85b4bc15 by Sebastian Méric de Bellefon at 2016-06-06T18:35:13-04:00 Merge pull request haskell/haddock#521 from Helkafen/master Version bumps (2.17.3, 1.4.2) - - - - - e95f0dee by Sebastian Meric de Bellefon at 2016-06-06T19:11:35-04:00 publish haddock-test library - - - - - 4de40586 by Sebastian Méric de Bellefon at 2016-06-06T20:26:30-04:00 Merge pull request haskell/haddock#512 from phadej/oleg-fixes Fixes for haskell/haddock#508 and haskell/haddock#510 - - - - - ddfd0789 by Dominic Steinitz at 2016-06-09T09:27:28+01:00 Documentation for LaTeX markup. - - - - - 697a503a by Dominic Steinitz at 2016-06-09T09:33:59+01:00 Fix spelling mistake. - - - - - 246f6fff by Dominic Steinitz at 2016-06-09T09:37:15+01:00 Camel case MathJax. - - - - - 4684bd23 by Dominic Steinitz at 2016-06-09T09:44:53+01:00 Fix math typo and add link. - - - - - f20c037c by Simon Peyton Jones at 2016-06-13T18:26:03+01:00 Follow changes to LHsSigWcType - - - - - 0c58996d by Simon Peyton Jones at 2016-06-15T12:56:01+01:00 Follow GHC re-adding FunTy - - - - - 401b5ca7 by Sebastian Méric de Bellefon at 2016-06-15T12:16:47-04:00 Merge pull request haskell/haddock#525 from idontgetoutmuch/master Documentation for LaTeX markup. - - - - - 92d263b7 by Sebastian Méric de Bellefon at 2016-06-15T12:17:29-04:00 Merge pull request haskell/haddock#522 from Helkafen/master publish haddock-test library - - - - - 0953a2ca by Sebastian Meric de Bellefon at 2016-06-16T00:46:46-04:00 Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 65453e14 by Ben Gamari at 2016-06-16T11:16:32+02:00 ocean: Ensure that synopsis fully covers other content Previously MathJax content was being rendered on top of the synopsis due to ambiguous z-ordering. Here we explicitly give the synopsis block a higher z-index to ensure it is rendered on top. Fixes haskell/haddock#531. - - - - - 68e411a1 by Sebastian Méric de Bellefon at 2016-06-16T23:34:39-04:00 Merge pull request haskell/haddock#534 from bgamari/T531 ocean: Ensure that synopsis fully covers other content - - - - - fad6491b by Sebastian Méric de Bellefon at 2016-06-18T23:57:20-04:00 Merge pull request haskell/haddock#533 from Helkafen/master Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 6108e21b by Sebastian Meric de Bellefon at 2016-06-22T23:08:28-04:00 do not create empty src directory Fix haskell/haddock#536. - - - - - 1ef23823 by Sebastian Méric de Bellefon at 2016-06-24T00:04:48-04:00 Merge pull request haskell/haddock#537 from Helkafen/master do not create empty src directory - - - - - 966baa96 by Omari Norman at 2016-06-29T21:59:34-04:00 Add $ as a special character If this character is not escaped, documentation built with Haddock 2.17.2 will fail. This was not an issue with 2.16 series, which causes builds to fail and there is nothing in the docs or error message giving a clue about why builds that used to succeed now don't. - - - - - 324adb60 by Ben Gamari at 2016-07-01T12:18:51+02:00 GhcUtils: Changes for multi-pattern signatures - - - - - d7571675 by Ömer Sinan Ağacan at 2016-07-21T13:30:47+02:00 Add support for unboxed sums - - - - - 29d0907b by Simon Marlow at 2016-07-22T13:55:48+01:00 Disable NFData instances for GHC types when GHC >= 8.2 - - - - - 702d95f3 by Simon Marlow at 2016-08-02T15:57:30+02:00 Disable NFData instances for GHC types when GHC >= 8.0.2 (cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a) - - - - - f4fa79c3 by Ben Gamari at 2016-08-07T13:51:18+02:00 ghc.mk: Don't attempt to install html/frames.html The frames business has been removed. - - - - - 9cd63daf by Ben Gamari at 2016-08-07T13:51:40+02:00 Haddock.Types: More precise version guard This allows haddock to be built with GHC 8.0.2 pre-releases. - - - - - f3d7e03f by Mateusz Kowalczyk at 2016-08-29T20:47:45+01:00 Merge pull request haskell/haddock#538 from massysett/master Add $ as a special character - - - - - 16dbf7fd by Bartosz Nitka at 2016-09-20T19:44:04+01:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 - - - - - 7c31c1ff by Bartosz Nitka at 2016-09-27T17:32:22-04:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b) - - - - - 33a90dce by Ryan Scott at 2016-09-30T20:53:41-04:00 Haddock changes for T10598 See https://ghc.haskell.org/trac/ghc/ticket/10598 - - - - - 1f32f7cb by Ben Gamari at 2016-10-13T20:01:26-04:00 Update for refactoring of NameCache - - - - - 1678ff2e by Ben Gamari at 2016-11-15T17:42:48-05:00 Bump upper bound on base - - - - - 9262a7c5 by Alan Zimmerman at 2016-12-07T21:14:28+02:00 Match changes in GHC wip/T3384 branch - - - - - ac0eaf1a by Ben Gamari at 2016-12-09T09:48:41-05:00 haddock-api: Don't use stdcall calling convention on 64-bit Windows See GHC haskell/haddock#12890. - - - - - 04afe4f7 by Alan Zimmerman at 2016-12-12T20:07:21+02:00 Matching changes for GHC wip/T12942 - - - - - e1d1701d by Ben Gamari at 2016-12-13T16:50:41-05:00 Bump base upper bound - - - - - 3d3eacd1 by Alan Zimmerman at 2017-01-10T16:59:38+02:00 HsIParamTy now has a Located name - - - - - 7dbceefd by Kyrill Briantsev at 2017-01-12T13:23:50+03:00 Prevent GHC API from doing optimization passes. - - - - - d48d1e33 by Richard Eisenberg at 2017-01-19T08:41:41-05:00 Upstream changes re levity polymorphism - - - - - 40c25ed6 by Alan Zimmerman at 2017-01-26T15:16:18+02:00 Changes to match haskell/haddock#13163 in GHC - - - - - 504f586d by Ben Gamari at 2017-02-02T17:19:37-05:00 Kill remaining static flags - - - - - 49147ea0 by Justus Adam at 2017-03-02T15:33:34+01:00 Adding MDoc to exports of Documentation.Haddock - - - - - 1cfba9b4 by Justus Adam at 2017-03-09T11:41:44+01:00 Also exposing toInstalledIface - - - - - 53f0c0dd by Ben Gamari at 2017-03-09T13:10:08-05:00 Bump for GHC 8.3 - - - - - c7902d2e by Ben Gamari at 2017-03-09T23:46:02-05:00 Bump for GHC 8.2 - - - - - 4f3a74f8 by Ben Gamari at 2017-03-10T10:21:55-05:00 Merge branch 'ghc-head' - - - - - e273b72f by Richard Eisenberg at 2017-03-14T13:34:04-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - 6ec3d436 by Richard Eisenberg at 2017-03-14T15:15:52-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - eee3cda1 by Ben Gamari at 2017-03-15T15:19:59-04:00 Adapt to EnumSet - - - - - 017cf58e by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 736d6773 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 475f84a0 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 13240b53 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - cd16d529 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 3bea97ae by Edward Z. Yang at 2017-03-15T22:50:46-07:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b2b051ce by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 0f082795 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 20ef63c9 by Edward Z. Yang at 2017-03-22T13:48:12-07:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 45692dcb by Edward Z. Yang at 2017-03-22T14:11:25-07:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4eae8caf by Ben Gamari at 2017-03-23T09:25:33-04:00 Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEAD - - - - - 0bbe03f5 by Ben Gamari at 2017-03-23T09:27:28-04:00 haddock-api: Bump bound on GHC - - - - - 65f3ac9d by Alex Biehl at 2017-03-23T17:36:11+01:00 Merge pull request haskell/haddock#581 from JustusAdam/master Adding more exports to Documentation.Haddock - - - - - 37d49a47 by Alex Biehl at 2017-03-23T17:39:14+01:00 Merge pull request haskell/haddock#568 from awson/ghc-head Prevent GHC API from doing optimization passes. - - - - - 1ed047e4 by Brian Huffman at 2017-03-23T17:45:58+01:00 Print any user-supplied kind signatures on type parameters. This applies to type parameters on data, newtype, type, and class declarations, and also to forall-bound type vars in type signatures. - - - - - 1b78ca5c by Brian Huffman at 2017-03-23T17:45:58+01:00 Update test suite to expect kind annotations on type parameters. - - - - - a856b162 by Alex Biehl at 2017-03-23T17:49:32+01:00 Include travis build indication badge - - - - - 8e2e2c56 by Ben Gamari at 2017-03-23T17:20:08-04:00 haddock-api: Bump bound on GHC - - - - - 4d2d9995 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737) - - - - - a650e20f by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858) - - - - - caa282c2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 2067a2d0afa9cef381d26fb7140b67c62f433fc0) - - - - - 49684884 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc) - - - - - 4dcfeb1a by Edward Z. Yang at 2017-03-23T17:20:08-04:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a) - - - - - 74dd19d2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e) - - - - - a9b19a23 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3) - - - - - d3631064 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit bf3c4d72a0fda38561376eac7eda216158783267) - - - - - ef2148fc by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1) - - - - - 2f29518b by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 4eb765ca4205c79539d60b7afa9b7e261a4a49fe) - - - - - 37de047d by Phil Ruffwind at 2017-04-03T11:57:14+02:00 Update MathJax URL MathJax is shutting down their CDN: https://www.mathjax.org/cdn-shutting-down/ They recommend migrating to cdnjs. - - - - - e9d24ba8 by David C. Turner at 2017-04-03T14:58:01+02:00 Add highlight for :target to ocean.css - - - - - 4819a202 by Alex Biehl at 2017-04-11T19:36:48+02:00 Allow base-4.10 for haddock-test - - - - - 44cec69c by Alex Biehl at 2017-04-11T19:39:22+02:00 cabal.project for haddock-api, haddock-library and haddock-test - - - - - 935d0f6a by Alex Biehl at 2017-04-11T19:46:29+02:00 Move dist scripts to scripts/ - - - - - 128e150c by Alex Biehl at 2017-04-11T20:34:46+02:00 Add haddock to cabal.project - - - - - cc8e08ea by Alex Biehl at 2017-04-11T20:35:08+02:00 Read files for hyperlinker eagerly This also exposes Documentation.Haddock.Utf8 - - - - - 152dda78 by Alex Biehl at 2017-04-11T20:37:06+02:00 Explicit import list ofr Control.DeepSeq in Haddock.Interface.Create - - - - - 501b33c4 by Kyrill Briantsev at 2017-04-11T21:01:42+02:00 Prevent GHC API from doing optimization passes. - - - - - c9f3f5ff by Alexander Biehl at 2017-04-12T16:36:53+02:00 Add @alexbiehl as maintaner - - - - - 76f214cc by Alex Biehl at 2017-04-13T07:27:18+02:00 Disable doctest with ghc-8.3 Currently doctest doesn't support ghc-head - - - - - 46b4f5fc by Edward Z. Yang at 2017-04-22T20:38:26-07:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f0555235 by Alex Biehl at 2017-04-25T10:08:48+02:00 Travis: Use ghc-8.2.1 on master - - - - - 966ea348 by Alex Biehl at 2017-04-25T10:32:01+02:00 Travis: Verbose cabal output cf. https://travis-ci.org/haskell/haddock/jobs/225512194#L377 - - - - - 36972bcd by Alex Biehl at 2017-04-25T10:40:43+02:00 Use travis_retry for cabal invocations - - - - - b3a09d2c by Alex Biehl at 2017-04-25T17:02:20+02:00 Use new MathJax URL in html-test 18ed871afb82560d5433b2f53e31b4db9353a74e switched to a new MathJax URL but didn't update the tests. - - - - - ae331e5f by Alexander Biehl at 2017-04-25T17:02:20+02:00 Expand signatures for class declarations - - - - - e573c65a by Alexander Biehl at 2017-04-25T17:02:20+02:00 Hoogle: Correctly print classes with associated data types - - - - - 3fc6be9b by Edward Z. Yang at 2017-04-25T17:02:20+02:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9) - - - - - 6725c060 by Herbert Valerio Riedel at 2017-04-25T17:02:20+02:00 `html-test --accept` deltas to reference samples - - - - - 7d444d61 by Alex Biehl at 2017-04-26T07:13:50+02:00 Remove anything related to obsolete frames mode - - - - - b888972c by Alex Biehl at 2017-04-26T07:49:10+02:00 Cherry-picked remaining commits from haddock-2.17.4-release (#603) * Release haddock/haddock-api 2.17.4 and haddock-library 1.4.3 * Set version bounds for haddock-library NB: This allows GHC 8.2.1's base * Set version bounds for haddock & haddock-api The version bounds support GHC 8.2 * Merge (temporary) v2.17.3 branch into v2.17 This allows us to delete the v2.17.3 branch * Fixup changelog * Pin down haddock-api to a single version as otherwise `haddock`'s package version has no proper meaning * fix source-repo spec for haddock-api - - - - - 4161099b by Alex Biehl at 2017-04-26T11:11:20+02:00 Update changelog to reflect news in HEAD - - - - - eed72cb8 by Alex Biehl at 2017-04-26T11:11:20+02:00 Markdownify changelog - - - - - 5815cea1 by Alex Biehl at 2017-04-26T11:32:33+02:00 Bump to 2.18.0 (#605) - - - - - a551d558 by Alex Biehl at 2017-04-29T22:00:25+02:00 Update attoparsec-0.12.1.1 to attoparsec-0.13.1.0 - - - - - ea164a8d by Sergey Vinokurov at 2017-04-29T22:42:36+02:00 Improve error message - - - - - 2e10122f by Alex Biehl at 2017-04-30T10:07:46+02:00 Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. - - - - - f9b24d99 by Alex Biehl at 2017-05-01T17:40:36+02:00 Lazily decode docMap and argMap (#610) These are only used in case of a doc reexport so most of the time decoding these is wasted work. - - - - - 2372af62 by Alex Biehl at 2017-05-01T21:59:23+02:00 Fix Binary instance for InstalledInterface (#611) (#610) introduced lazy decoding for docs from InstalledInterface but forgot to remove the original calls to get and put_ - - - - - 6c633c13 by Nathan Collins at 2017-05-11T11:47:55+02:00 Improve documenation of Haddock markup (#614) * Improve documentation of Haddock markup. - document that Haddock supports inferring types top-level functions with without type signatures, but also explain why using this feature is discouraged. Looks like this feature has been around since version 2.0.0.0 in 2008! - rework the "Module description" section: - move the general discussion of field formatting to the section intro and add examples illustrating the prose for multiline fields. - mention that newlines are preserved in some multiline fields, but not in others (I also noticed that commas in the `Copyright` field are not preserved; I'll look into this bug later). - add a subsection for the module description fields documentation, and put the field keywords in code formatting (double back ticks) instead of double quotes, to be consistent with the typesetting of keywords in other parts of the documentation. - mention that "Named chunks" are not supported in the long-form "Module description" documentation. - fix formatting of keywords in the "Module attributes" section. Perhaps these errors were left over from an automatic translation to ReST from some other format as part of the transition to using Sphinx for Haddock documentation? Also, add a missing reference here; it just said "See ?"! - update footnote about special treatment for re-exporting partially imported modules not being implemented. In my tests it's not implemented at all -- I tried re-exporting both `import B hiding (f)` and `import B (a, b)` style partial imports, and in both cases got the same result as with full imports `import B`: I only get a module reference. * Rework the `Controlling the documentation structure` section. My main goal was to better explain how to use Haddock without an export list, since that's my most common use case, but I hope I improved the section overall: - remove the incomplete `Omitting the export list` section and fold it into the other sections. In particular, summarize the differences between using and not using an export list -- i.e. control over what and in what order is documented -- in the section lead. - add "realistic" examples that use the structure markup, both with and without an export list. I wanted a realistic example here to capture how it can be useful to explain the relationship between a group of functions in a section, in addition to documenting their individual APIs. - make it clear that you can associate documentation chunks with documentation sections when you aren't using an export list, and that doing it in the most obvious way -- i.e. with `-- |`, as you can in the export list -- doesn't work without an export list. It took me a while to figure this out the first time, since the docs didn't explain it at all before. - add a "no export list" example to the section header section. - add more cross references. * Add examples of gotchas for markup in `@...@`. I'm not sure this will help anyone, since I think most people first learn about `@...@` by reading other people's Haddocks, but I've documented the mistakes which I've made and then gotten confused by. * Use consistent Capitalization of Titles. Some titles were in usual title caps, and others only had the first word capitalized. I chose making them all use title caps because that seems to make the cross references look better. - - - - - d4734f45 by Ben Gamari at 2017-05-12T20:36:08+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 93883f37 by Alex Biehl at 2017-05-12T21:02:33+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 5b8f179c by Alex Biehl at 2017-05-13T12:48:10+02:00 Consequently use inClass and notInClass in haddock-library (#617) These allow attoparsec to do some clever lookup optimization - - - - - 77984b82 by Doug Wilson at 2017-05-27T17:37:38+02:00 Don't enable compilation for template haskell (#624) This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa - - - - - 5a3de2b4 by Doug Wilson at 2017-05-27T19:54:53+02:00 Improve Syb code (#621) Specialize.hs and Ast.hs are modified to have their Syb code not recurse into Name or Id in HsSyn types. Specialize.hs is refactored to have fewer calls to Syb functions. Syb.hs has some foldl calls replaced with foldl' calls. There is still a lot of performance on the floor of Ast.hs. The RenamedSource is traversed many times, and lookupBySpan is very inefficient. everywhereBut and lookupBySpan dominate the runtime whenever --hyperlinked-source is passed. - - - - - 3d35a949 by Alex Biehl at 2017-05-30T19:01:37+02:00 Clear fixme comment (#625) - - - - - 2a44bd0c by Alex Biehl at 2017-05-30T19:02:12+02:00 Make haddock-library and haddock-api warning free (#626) - - - - - bd1a0e42 by Alex Biehl at 2017-06-01T10:40:33+02:00 Include `driver-test/*.hs` sdist (#630) This lead to haskell/haddock#629. - - - - - 184a3ab6 by Doug Wilson at 2017-06-03T12:02:08+02:00 Disable pattern match warnings (#628) This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns - - - - - 0cf68004 by Alex Biehl at 2017-06-03T20:37:28+02:00 Allow user defined signatures for pattern synonyms (#631) - - - - - 7f51a58a by Alex Biehl at 2017-06-04T11:56:38+02:00 Use NameSet for isExported check (#632) - - - - - d8f044a9 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Match new AST as per GHC wip/new-tree-one-param See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow - - - - - da1254e3 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Rename extension index tags - - - - - 538c7514 by Christiaan Baaij at 2017-06-09T08:26:43+02:00 Haddock support for bundled pattern synonyms (#627) * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after haskell/haddock#631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case - - - - - a050bffd by Doug Wilson at 2017-06-21T09:27:33+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636) There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6 - - - - - 5d06b871 by Doug Wilson at 2017-06-22T20:23:29+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639) * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports - - - - - b11bb73a by Alex Biehl at 2017-06-23T14:44:41+02:00 Lookup fixities for reexports without subordinates (#642) So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In haskell/haddock#644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from haskell/haddock#642 top-level functions now started to fail reexporting their fixities. - - - - - d2a6dad6 by Alex Biehl at 2017-06-23T18:30:45+02:00 Don't include names with empty subordinates in maps (#644) These are unecessary anyway and just blow up interface size - - - - - 69c2aac4 by Alex Biehl at 2017-06-29T19:54:49+02:00 Make per-argument docs for class methods work again (#648) * Make per-argument docs for class methods work again * Test case - - - - - c9448d54 by Bartosz Nitka at 2017-07-02T12:12:01+02:00 Fix haddock: internal error: links: UnhelpfulSpan (#561) * Fix haddock: internal error: links: UnhelpfulSpan This fixes haskell/haddock#554 for me. I believe this is another fall out of `wildcard-refactor`, like haskell/haddock#549. * Comment to clarify why we take the methods name location - - - - - d4f29eb7 by Alex Biehl at 2017-07-03T19:43:04+02:00 Document record fields when DuplicateRecordFields is enabled (#649) - - - - - 9d6e3423 by Yuji Yamamoto at 2017-07-03T22:37:58+02:00 Fix test failures on Windows (#564) * Ignore .stack-work * Fix for windows: use nul instead of /dev/null * Fix for windows: canonicalize line separator * Also normalize osx line endings - - - - - 7d81e8b3 by Yuji Yamamoto at 2017-07-04T16:13:12+02:00 Avoid errors on non UTF-8 Windows (#566) * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1) - - - - - eded67d2 by Alex Biehl at 2017-07-07T19:17:15+02:00 Remove redudant import warning (#651) - - - - - 05114757 by Alex Biehl at 2017-07-08T00:33:12+02:00 Avoid missing home module warning (#652) * Avoid missing home module warning * Update haddock-library.cabal - - - - - e9cfc902 by Bryn Edwards at 2017-07-17T07:51:20+02:00 Fix haskell/haddock#249 (#655) - - - - - eb02792b by Herbert Valerio Riedel at 2017-07-20T09:09:15+02:00 Fix compilation of lib:haddock-library w/ GHC < 8 - - - - - 9200bfbc by Alex Biehl at 2017-07-20T09:20:38+02:00 Prepare 2.18.1 release (#657) - - - - - 46ddd22c by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Tweak haddock-api.cabal for pending release - - - - - 85e33d29 by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Avoid trivial use of LambdaCase otherwise we can't test w/ e.g. GHC 7.4.2 - - - - - 3afb4bfe by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Refactor .cabal to use sub-lib for vendored lib A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite. - - - - - e56a552e by Herbert Valerio Riedel at 2017-07-20T10:17:48+02:00 haddock-api: add changelog pointing to haddock's changelog This addresses https://github.com/haskell/haddock/issues/638#issuecomment-309283297 - - - - - 2222ff0d by Herbert Valerio Riedel at 2017-07-20T10:19:56+02:00 Drop obsolete/misleading `stability: experimental` This .cabal property has long been considered obsolete - - - - - 9b882905 by Alex Biehl at 2017-07-20T11:25:54+02:00 Beef up haddock description (#658) * Beef up haddock description * Handle empty lines - - - - - bb60e95c by Herbert Valerio Riedel at 2017-07-20T12:08:53+02:00 Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet - - - - - 0761e456 by Herbert Valerio Riedel at 2017-07-20T12:12:55+02:00 Add cheatsheet to haddock.cabal - - - - - 2ece0f0f by Herbert Valerio Riedel at 2017-07-20T12:18:38+02:00 Mention new-build in README - - - - - 947b7865 by Herbert Valerio Riedel at 2017-07-20T12:32:16+02:00 Update README Also improves markup and removes/fixes redundant/obsolete parts [skip ci] - - - - - 785e09ad by Alex Biehl at 2017-07-27T07:28:57+02:00 Bump haddock to 2.18.2, haddock-library to 1.4.5 - - - - - e3ff1ca3 by Alex Biehl at 2017-07-31T20:15:32+02:00 Move `DocMarkup` from haddock-api to haddock-library (#659) * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG - - - - - cda7c20c by Alex Biehl at 2017-07-31T20:35:49+02:00 Fixup haddock - - - - - 583b6812 by Alex Biehl at 2017-07-31T21:20:45+02:00 Changelog for haddock-library - - - - - bac6a0eb by Alex Biehl at 2017-07-31T21:50:24+02:00 Prepare haddock-library-1.4.5 release - - - - - 58ce6877 by Moritz Drexl at 2017-08-05T16:44:40+02:00 Fix renaming after instance signature specializing (#660) * rework rename * Add regression test for Bug 613 * update tests * update changelog - - - - - b8137ec8 by Tim Baumann at 2017-08-06T11:33:38+02:00 Fix: Generate pattern signatures for constructors exported as patterns (#663) * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes haskell/haddock#653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR haskell/haddock#663 * Fix extractPatternSyn error message - - - - - d037086b by Alex Biehl at 2017-08-06T12:43:25+02:00 Bump haddock-library - - - - - 99d7e792 by Alex Biehl at 2017-08-06T12:44:07+02:00 Bump haddock-library in haddock-api - - - - - 94802a5b by Alex Biehl at 2017-08-06T13:18:02+02:00 Provide --show-interface option to dump interfaces (#645) * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated. - - - - - c662e476 by Ryan Scott at 2017-08-14T21:00:21-04:00 Adapt to haskell/haddock#14060 - - - - - b891eb73 by Alex Biehl at 2017-08-16T08:24:48+02:00 Bifoldable and Bitraversable for DocH and MetaDoc - - - - - 021bb56c by Alex Biehl at 2017-08-16T09:06:40+02:00 Refactoring: Make doc renaming monadic This allows us to later throw warnings if can't find an identifier - - - - - 39fbf022 by Alex Biehl at 2017-08-19T20:35:27+02:00 Hyperlinker: Avoid linear lookup in enrichToken (#669) * Make Span strict in Position * Hyperlinker: Use a proper map to enrich tokens - - - - - e13baedd by Alex Biehl at 2017-08-21T20:05:42+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 27dd6e87 by Alex Biehl at 2017-08-21T22:06:35+02:00 Drop Avails from export list - - - - - 86b247e2 by Alex Biehl at 2017-08-22T08:44:22+02:00 Bump ghc version for haddock-api tests - - - - - d4607ca0 by Alex Biehl at 2017-08-22T08:45:17+02:00 Revert "Drop Avails from export list" This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def. - - - - - c9c54c30 by Alex Biehl at 2017-08-22T09:26:01+02:00 IntefaceFile version - - - - - a85b7c02 by Ben Gamari at 2017-08-22T09:29:52-04:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 34e976f5 by Ben Gamari at 2017-08-22T17:40:06+02:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 577abf06 by Ryan Scott at 2017-08-23T14:47:29-04:00 Update for haskell/haddock#14131 - - - - - da68fc55 by Florian Eggenhofer at 2017-08-27T18:21:56+02:00 Generate an index for package content search (#662) Generate an index for package content search - - - - - 39e62302 by Alex Biehl at 2017-08-27T18:50:16+02:00 Content search for haddock html doc - - - - - 91fd6fb2 by Alex Biehl at 2017-08-28T18:39:58+02:00 Fix tests for content search - - - - - b4a3798a by Alex Biehl at 2017-08-28T18:44:08+02:00 Add search button to #page-menu - - - - - 25a7ca65 by Alex Biehl at 2017-08-28T18:47:43+02:00 Load javascript below the fold - - - - - 8d323c1a by Alex Biehl at 2017-08-28T18:49:22+02:00 Accept tests - - - - - c5dac557 by Alex Biehl at 2017-08-28T19:14:55+02:00 Content search css - - - - - 89a5af57 by Paolo Veronelli at 2017-08-29T07:42:13+02:00 Removed `nowrap` for interface method sigs (#674) with nowrap the interfaces method sigs would expand at libitum - - - - - a505f6f7 by Alex Biehl at 2017-08-29T08:05:33+02:00 Include subordinates in content index - - - - - 4bb698c4 by Alexander Biehl at 2017-08-29T11:40:19+02:00 QuickNav: Make docbase configurable - - - - - c783bf44 by Alexander Biehl at 2017-08-29T11:48:36+02:00 QuickNav: Also use baseUrl for doc-index.json request - - - - - 47017510 by Alex Biehl at 2017-08-29T17:56:47+02:00 Fix test fallout (again) - - - - - 924fc318 by Alex Biehl at 2017-08-30T09:24:56+02:00 Write meta.json when generating html output (#676) - - - - - 717dea52 by Alex Biehl at 2017-09-01T09:20:34+02:00 Use relative URL when no docBaseUrl given - - - - - e5d85f3b by Alex Biehl at 2017-09-01T09:35:19+02:00 Add missing js files to data-files (#677) - - - - - 95b9231a by Alex Biehl at 2017-09-01T11:01:36+02:00 Rename "Search" tab to "Quick Jump" - - - - - da0ead0b by Alex Biehl at 2017-09-01T13:03:49+02:00 Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger - - - - - de7da594 by Ben Gamari at 2017-09-05T06:49:55-04:00 Account for "Remember the AvailInfo for each IE" As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building. - - - - - b05cd3b3 by Ben Gamari at 2017-09-14T07:55:07-04:00 Bump upper bound on base - - - - - 79db899e by Herbert Valerio Riedel at 2017-09-21T23:27:52+02:00 Make compatible with Prelude.<> export in GHC 8.4/base-4.11 - - - - - 3405dd52 by Tim Baumann at 2017-09-23T22:02:01+02:00 Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme - - - - - df0b5742 by Alex Biehl at 2017-09-29T21:15:40+02:00 Bump base for haddock-library and haddock-test - - - - - 62b12ea0 by Merijn Verstraaten at 2017-10-04T16:03:13+02:00 Inhibit output of coverage information for hidden modules. (#687) * Inhibit output of coverage information for hidden modules. * Add changelog entry. - - - - - 8daf8bc1 by Alexander Biehl at 2017-10-05T11:27:05+02:00 Don't use subMap in attachInstances - - - - - ad75114e by Alexander Biehl at 2017-10-05T11:27:58+02:00 Revert "Don't use subMap in attachInstances" This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9. - - - - - 7d4aa02f by Alex Biehl at 2017-10-08T15:32:28+02:00 Precise Haddock: Use Avails for export resolution (#688) * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting - - - - - b9b4faa8 by Alex Biehl at 2017-10-08T19:38:21+02:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 43325295 by Alex Biehl at 2017-10-08T20:18:46+02:00 Fix merge fallout - - - - - c6423cc0 by Alex Biehl at 2017-10-08T20:36:12+02:00 Copy QuickJump files over - - - - - 1db587c3 by Tim Baumann at 2017-10-09T18:33:09+02:00 Use <details> element for collapsibles (#690) * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes haskell/haddock#560. - - - - - 1b54c64b by Tim Baumann at 2017-10-10T09:50:59+02:00 Quick Jump: Show error when loading 'doc-index.json' failed (#691) - - - - - 910f716d by Veronika Romashkina at 2017-10-24T07:36:20+02:00 Fix tiny typo in docs (#693) - - - - - b21de7e5 by Ryan Scott at 2017-10-24T13:07:15+02:00 Overhaul Haddock's rendering of kind signatures (#681) * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC - - - - - 6704405c by Ryan Scott at 2017-10-28T07:10:27+02:00 Fix Haddock rendering of kind-indexed data family instances (#694) - - - - - 470f6b9c by Alex Biehl at 2017-10-30T08:45:51+01:00 Add QuickJump version to meta.json (#696) - - - - - b89eccdf by Alex Biehl at 2017-10-30T10:15:49+01:00 Put Quickjump behind --quickjump flag (#697) - - - - - 3095fb58 by Alex Biehl at 2017-10-30T19:09:06+01:00 Add build command to package.json - - - - - f223fda9 by Alex Biehl at 2017-10-30T19:10:39+01:00 Decrease threshold for fuzzy matching - - - - - 80245dda by Edward Z. Yang at 2017-10-31T20:35:05+01:00 Supported reexported-modules via --reexport flag. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 7e389742 by Alex Biehl at 2017-10-31T20:37:56+01:00 Correct missing title in changelog - - - - - 1a2a1c03 by Alex Biehl at 2017-10-31T20:59:07+01:00 Copy quickjump.css for nicer error messages - - - - - db234bb9 by Alex Biehl at 2017-10-31T21:31:18+01:00 Reexported modules: Report warnings if argument cannot be parsed or ... module cannot be found - - - - - eea8a205 by Carlo Hamalainen at 2017-10-31T21:43:14+01:00 More general type for nameCacheFromGhc. (#539) - - - - - 580eb42a by Alex Biehl at 2017-10-31T21:46:52+01:00 Remote tab - - - - - 0e599498 by Alex Biehl at 2017-10-31T21:48:55+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 7b8539bb by Alex Biehl at 2017-10-31T22:28:34+01:00 fullModuleContents traverses exports in declaration order - - - - - 0c91fbf2 by Alex Biehl at 2017-10-31T22:32:31+01:00 Remove excessive use of list comprehensions - - - - - f7356e02 by Alex Biehl at 2017-11-01T19:11:03+01:00 Make better use of AvailInfo - - - - - f3e512d5 by Alex Biehl at 2017-11-02T12:16:22+01:00 Always return documentation for exported subordinates ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks. - - - - - 7cf58898 by Alan Zimmerman at 2017-11-07T08:28:03+02:00 Match changes for Trees that Grow in GHC - - - - - e5105a41 by Alan Zimmerman at 2017-11-08T17:21:58+02:00 Match Trees That Grow - - - - - 55178266 by Alan Zimmerman at 2017-11-11T22:20:31+02:00 Match Trees that Grow in GHC for HsExpr - - - - - 2082ab02 by Ryan Scott at 2017-11-14T15:27:03+01:00 Actually render infix type operators as infix (#703) * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too - - - - - c52ab7d0 by Alan Zimmerman at 2017-11-14T23:14:26+02:00 Clean up use of PlaceHolder, to match TTG - - - - - 81cc9851 by Moritz Angermann at 2017-11-20T07:52:49+01:00 Declare use of `Paths_haddock` module in other-modules (#705) This was detected by `-Wmissing-home-modules` - - - - - f9d27598 by Moritz Angermann at 2017-11-20T12:47:34+01:00 Drop Paths_haddock from ghc.mk (#707) With haskell/haddock#705 and haskell/haddock#706, the custom addition should not be necessary any more. # Conflicts: # ghc.mk - - - - - f34818dc by Moritz Angermann at 2017-11-20T12:47:59+01:00 Add autogen-modules (#706) > Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail. # Conflicts: # haddock.cabal - - - - - bb43a0aa by Ben Gamari at 2017-11-21T15:50:12-05:00 Revert "Clean up use of PlaceHolder, to match TTG" This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049. - - - - - af9ebb2b by Ben Gamari at 2017-11-21T15:50:14-05:00 Revert "Match Trees that Grow in GHC for HsExpr" This reverts commit 9f054dc365379c66668de6719840918190ae6e44. - - - - - 5d35c3af by Ben Gamari at 2017-11-21T15:50:15-05:00 Revert "Match Trees That Grow" This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c. - - - - - 99a8e43b by Ben Gamari at 2017-11-21T16:36:06-05:00 Revert "Match changes for Trees that Grow in GHC" This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547. - - - - - c4d650c2 by Ben Gamari at 2017-12-04T15:06:07-05:00 Bump GHC version - - - - - 027b2274 by Ben Gamari at 2017-12-04T17:06:31-05:00 Bump GHC bound to 8.4.* - - - - - 58eaf755 by Alex Biehl at 2017-12-06T15:44:24+01:00 Update changelog - - - - - d68f5584 by Simon Peyton Jones at 2017-12-07T14:39:56+00:00 Track changes to follow Trac haskell/haddock#14529 This tracks the refactoring of HsDecl.ConDecl. - - - - - dc519d6b by Alec Theriault at 2018-01-06T08:20:43-08:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - 8285118c by Alec Theriault at 2018-01-13T12:12:37+01:00 Constructor and pattern synonym argument docs (#709) * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors. - - - - - ca4fabb4 by Alec Theriault at 2018-01-15T17:12:18-08:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 4c472fea by Ryan Scott at 2018-01-19T10:44:02+01:00 Fix haskell/haddock#732 (#733) - - - - - bff14dbd by Alex Biehl at 2018-01-19T15:33:30+01:00 extractDecl: Extract associated types correctly (#736) - - - - - a2a94a73 by Alex Biehl at 2018-01-19T15:34:40+01:00 extractDecl: Extract associated types correctly (#736) - - - - - 26df93dc by Alex Biehl at 2018-01-20T10:18:22+01:00 haddock-api: bump ghc to ^>= 8.4 - - - - - f65aeb1d by Alex Biehl at 2018-01-20T19:18:20+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - 0e721b97 by Alex Biehl at 2018-01-20T19:20:19+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - cb6234f6 by Ben Gamari at 2018-01-26T13:40:55-05:00 Merge remote-tracking branch 'harpocrates/fix/missing-orphan-instances' into ghc-head - - - - - 0fc28554 by Alec Theriault at 2018-02-01T14:58:18+01:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - b9123772 by Alec Theriault at 2018-02-01T14:58:18+01:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 0c12e274 by Ryan Scott at 2018-02-01T14:58:18+01:00 Fix haskell/haddock#548 by rendering datatype kinds more carefully (#702) - - - - - 8876d20b by Alec Theriault at 2018-02-01T14:58:18+01:00 Use the GHC lexer for the Hyperlinker backend (#714) * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog - - - - - 95c6a771 by Alec Theriault at 2018-02-01T14:58:18+01:00 Clickable anchors for headings (#716) See haskell/haddock#579. This just adds an <a> tag around the heading, pointing to the heading itself. - - - - - 21463d28 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump: Matches on function names weight more than matches in ... module names. - - - - - 8023af39 by Alex Biehl at 2018-02-01T14:58:18+01:00 Treat escaped \] better in definition lists (#717) This fixes haskell/haddock#546. - - - - - e4866dc1 by Alex Biehl at 2018-02-01T14:58:18+01:00 Remove scanner, takeWhile1_ already takes care of escaping - - - - - 9bcaa49d by Alex Biehl at 2018-02-01T14:58:18+01:00 Take until line feed - - - - - 01d2af93 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. - - - - - 31128417 by Alec Theriault at 2018-02-01T14:58:18+01:00 Patch flaky parser test (#720) * Patch flaky parser test This test was a great idea, but it doesn't port over too well to using the GHC lexer. GHC rewrites its input a bit - nothing surprising, but we need to guard against those cases for the test. * Change instance head * Change use site - - - - - 9704f214 by Herbert Valerio Riedel at 2018-02-01T14:58:18+01:00 Include secondary LICENSE file in source dist - - - - - 51f25074 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Grid Tables (#718) * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example - - - - - 670d6200 by Alex Biehl at 2018-02-01T14:58:18+01:00 Add grid table example to cheatsheet (pdf and svg need to be regenerated thought) - - - - - 4262dec9 by Alec Theriault at 2018-02-01T14:58:18+01:00 Fix infinite loop when specializing instance heads (#723) * Fix infinite loop when specializing instance heads The bug can only be triggered from TH, hence why it went un-noticed for so long. * Add test for haskell/haddock#679 and haskell/haddock#710 - - - - - 67ecd803 by Alec Theriault at 2018-02-01T14:58:18+01:00 Filter RTS arguments from 'ghc-options' arguments (#725) This fixes haskell/haddock#666. - - - - - 7db26992 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump Scrollable overlay - - - - - da9ff634 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Hyperlinker: Adjust parser to new PFailed constructor - - - - - 7b7cf8cb by Alexander Biehl at 2018-02-01T14:58:18+01:00 Specialize: Add missing IdP annotations - - - - - 78cd7231 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Convert: Correct pass type - - - - - a2d0f590 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Warning free compilation - - - - - cd861cf3 by Alexander Biehl at 2018-02-01T14:58:18+01:00 hadock-2.19.0 / haddock-api-2.19.0 / haddock-library-1.5.0 - - - - - c6651b72 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Adjust changelogs - - - - - 1e93da0b by Alexander Biehl at 2018-02-01T14:58:18+01:00 haddock-library: Info about breaking changes - - - - - f9b11db8 by Alec Theriault at 2018-02-02T12:36:02+01:00 Properly color pragma contents in hyperlinker The hyperlinker backend now classifies the content of pragmas as 'TkPragma'. That means that in something like '{-# INLINE foo #-}', 'foo' still gets classified as a pragma token. - - - - - c40b0043 by Alec Theriault at 2018-02-02T12:36:02+01:00 Support the new 'ITcolumn_prag' token - - - - - 4a2a4d39 by Alex Biehl at 2018-02-03T12:11:55+01:00 QuickJump: Mitigate encoding problems on Windows - - - - - bb34503a by Alex Biehl at 2018-02-04T18:39:31+01:00 Use withBinaryFile - - - - - 637605bf by Herbert Valerio Riedel at 2018-02-05T09:48:32+01:00 Try GHC 8.4.1 for Travis CI job - - - - - 7abb67e4 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 try harder to build w/ GHC 8.4.1 - - - - - 8255cc98 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 Add `SPDX-License-Identifier` as alised for "license" module header tokens C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from haskell/haddock#743 - - - - - 267cd23d by Herbert Valerio Riedel at 2018-02-05T10:24:34+01:00 Make test-suite SMP compatible - - - - - 95d4bf40 by Alec Theriault at 2018-02-05T22:01:04+01:00 Hyperlink pattern synonyms and 'module' imports (#744) Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes haskell/haddock#731. - - - - - 67838dcd by Alec Theriault at 2018-02-06T08:23:36+01:00 Don't warn about missing '~' (#746) This manually filters out '~' from the list of things to warn about. It truly makes no sense to warn on this since '~' has nothing it could link to - it is magical. This fixes haskell/haddock#532. - - - - - ab6c3f9f by Alec Theriault at 2018-02-06T08:24:47+01:00 Don't barf on 'HsSpliceTy' (#745) This handles 'HsSpliceTy's by replacing them with what they expand to. IIUC everything that is happening, 'renameHsSpliceTy' should not be able to fail for the inputs we feed it from GHC. This fixes haskell/haddock#574. - - - - - 92bf95ad by Alex Biehl at 2018-02-06T08:28:23+01:00 Rename: renameHsSpliceTy ttg - - - - - 3130b1e1 by Alex Biehl at 2018-02-06T09:02:14+01:00 Expand SigDs - - - - - c72adae5 by Alex Biehl at 2018-02-06T09:20:51+01:00 fullModuleContents: support named docs - - - - - de2e4dbf by Alex Biehl at 2018-02-06T13:56:17+01:00 Hyperlinker: Also link pattern synonym arguments - - - - - b7c98237 by Alex Biehl at 2018-02-09T18:44:23+01:00 Expand SigD in a better place In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place. - - - - - 8f598b27 by Alec Theriault at 2018-02-11T12:29:56+01:00 Add module tooltips to linked identifiers (#753) No more clicking to figure out whether your bytestring is strict or lazy! - - - - - d812e65d by Alec Theriault at 2018-02-11T12:31:44+01:00 Add 'show' option to complement 'hide' (#752) * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes haskell/haddock#751 and haskell/haddock#266. * Add a '--show-all' option - - - - - 6676cecb by Alex Biehl at 2018-02-18T11:07:15-05:00 QuickJump: Mitigate encoding problems on Windows (cherry picked from commit 86292c54bfee2343aee84559ec01f1fc68f52231) - - - - - e753dd88 by Alex Biehl at 2018-02-18T17:59:54+01:00 Use withBinaryFile - - - - - 724dc881 by Tamar Christina at 2018-02-19T05:34:49+01:00 Haddock: support splitted include paths. (#689) - - - - - 9b6d6f50 by Alex Biehl at 2018-02-19T05:57:02+01:00 Teach the HTML backend how to render methods with multiple names - - - - - a74aa754 by Alexander Biehl at 2018-02-19T10:04:34+01:00 Hoogle/Latex: Remove use of partial function - - - - - 66d8bb0e by Alec Theriault at 2018-02-25T16:04:01+01:00 Fix file handle leak (#763) (#764) Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137. - - - - - bb92d03d by Alex Biehl at 2018-03-02T14:21:23+01:00 Enable running test suite with stock haddock and ghc using ``` $ cabal new-run -- html-test --haddock-path=$(which haddock) --ghc-path=$(which ghc) ``` - - - - - dddb3cb2 by Alex Biehl at 2018-03-02T15:43:21+01:00 Make testsuite work with haddock-1.19.0 release (#766) - - - - - f38636ed by Alec Theriault at 2018-03-02T15:48:36+01:00 Support unicode operators, proper modules Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes haskell/haddock#458. - - - - - 09d89f7c by Alec Theriault at 2018-03-02T15:48:43+01:00 Remove bang pattern - - - - - d150a687 by Alex Biehl at 2018-03-02T15:48:48+01:00 fix test - - - - - d6fd71a5 by Alex Biehl at 2018-03-02T16:22:38+01:00 haddock-test: Be more explicit which packages to pass We now pass `-hide-all-packages` to haddock when invoking the testsuite. This ensures we don't accidentally pick up any dependencies up through ghc.env files. - - - - - 0932c78c by Alex Biehl at 2018-03-02T17:50:38+01:00 Revert "fix test" This reverts commit 1ac2f9569242f6cb074ba6e577285a4c33ae1197. - - - - - 52516029 by Alex Biehl at 2018-03-02T18:16:50+01:00 Fix Bug548 for real - - - - - 89df9eb5 by Alex Biehl at 2018-03-05T18:28:19+01:00 Hyperlinker: Links for TyOps, class methods and associated types - - - - - d019a4cb by Ryan Scott at 2018-03-06T13:43:56-05:00 Updates for haskell/haddock#13324 - - - - - 6d5a42ce by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump haddock-2.19.0.1, haddock-api-2.19.0.1, haddock-library-1.5.0.1 - - - - - c0e6f380 by Alex Biehl at 2018-03-10T18:25:57+01:00 Update changelogs for haddock-2.19.0.1 and haddock-library-1.5.0.1 - - - - - 500da489 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Update to QC 2.11 - - - - - ce8362e9 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Restore backward-compat with base-4.5 through base-4.8 - - - - - baae4435 by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump lower bound for haddock-library - - - - - 10b7a73e by Alex Biehl at 2018-03-10T18:25:57+01:00 Haddock: Straighten out base bound - - - - - a6096f7b by Alex Biehl at 2018-03-13T08:45:06+01:00 extractDecl: Extract constructor patterns from data family instances (#776) * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors - - - - - ba4a0744 by Simon Jakobi at 2018-03-14T08:26:42+01:00 Readme: Update GHC version (#778) - - - - - 8de157d4 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for definition lists - - - - - 425b46f9 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for links - - - - - d53945d8 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for inline links - - - - - f1dc7c99 by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Slightly unmangle output - - - - - 0879d31c by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Prevent stdout buffering - - - - - 1f9e5f1b by Simon Jakobi at 2018-03-14T20:39:29+01:00 haddock-library.cabal: Clean up GHC options - - - - - 066b891a by Simon Jakobi at 2018-03-14T20:39:29+01:00 Make a proper definition for the <link> parser - - - - - 573d6ba7 by Alec Theriault at 2018-03-21T09:16:57+01:00 Show where instances are defined (#748) * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests - - - - - 99b5d28b by Alex Biehl at 2018-03-21T09:20:36+01:00 Prepare changelog for next release - - - - - 482d3a93 by Alex Biehl at 2018-03-23T15:57:36+01:00 Useful cost centres, timers and allocation counters (#785) * Add some useful cost-centres for profiling * Add withTiming for each haddock phase Invoking haddock with `--optghc=-ddump-timings` now shows the amount of time spent and the number of allocated bytes for each phase. - - - - - 773b41bb by Alec Theriault at 2018-03-27T08:35:59+02:00 @since includes package name (#749) * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too. - - - - - e42c57bc by Alex Biehl at 2018-03-27T08:42:50+02:00 haddock-2.19.1, haddock-api-2.19.1, haddock-library-1.6.0 - - - - - 8373a529 by Alex Biehl at 2018-03-28T10:17:11+02:00 Bump haddock and haddock-api to 2.20.0 - - - - - 5038eddd by Jack Henahan at 2018-04-03T13:28:12+02:00 Clear search string on hide for haskell/haddock#781 (#789) - - - - - 920ca1eb by Alex Biehl at 2018-04-03T16:35:50+02:00 Travis: Build with ghc-8.4.2 (#793) - - - - - a232f0eb by Alan Zimmerman at 2018-04-07T14:14:32+02:00 Match changes in GHC for D4199 Removing HasSourceText and SourceTextX classes. - - - - - ab85060b by Alan Zimmerman at 2018-04-09T21:20:24+02:00 Match GHC changes for TTG - - - - - 739302b6 by Alan Zimmerman at 2018-04-13T13:31:44+02:00 Match GHC for TTG implemented on HsBinds, D4581 - - - - - 2f56d3cb by Ryan Scott at 2018-04-19T11:42:58-04:00 Bump upper bound on base to < 4.13 See https://ghc.haskell.org/trac/ghc/ticket/15018. - - - - - a49df92a by Alex Biehl at 2018-04-20T07:31:44+02:00 Don't treat fixity signatures like declarations - - - - - d02c103b by Ryan Scott at 2018-04-24T11:20:11-04:00 Add regression test for haskell/haddock#413 Fixes haskell/haddock#413. - - - - - c7577f52 by Ryan Scott at 2018-04-24T13:51:06-07:00 Improve the Hoogle backend's treatment of type families (#808) Fixes parts 1 and 2 of haskell/haddock#806. - - - - - d88f85b1 by Alec Theriault at 2018-04-25T11:24:07-07:00 Replace 'attoparsec' with 'parsec' (#799) * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments - - - - - fc25e2fe by Alan Zimmerman at 2018-04-27T15:36:53+02:00 Match changes in GHC for TTG - - - - - 06175f91 by Herbert Valerio Riedel at 2018-05-01T18:11:09+02:00 Merge branch 'ghc-head' with 'ghc-8.4' - - - - - 879caaa8 by Alec Theriault at 2018-05-07T18:53:15-07:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 3e0120cb by Simon Jakobi at 2018-05-07T19:00:18-07:00 Add docs for some DocH constructors (#814) - - - - - 0a32c6db by Alec Theriault at 2018-05-08T02:15:45-07:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 8816e783 by Simon Jakobi at 2018-05-08T10:48:11-07:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - ad60366f by Ryan Scott at 2018-05-10T11:19:47-04:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - 03b7cc3b by Ryan Scott at 2018-05-10T11:24:38-04:00 Wibbles - - - - - b03dd563 by Chaitanya Koparkar at 2018-05-10T11:44:58-04:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 9f298a40 by Ben Gamari at 2018-05-13T17:36:04-04:00 Account for refactoring of LitString - - - - - ea3dabe7 by Ryan Scott at 2018-05-16T09:21:43-04:00 Merge pull request haskell/haddock#826 from haskell/T825 Remove Hoogle backend hack that butchers infix datatype names - - - - - 0d234f7c by Alec Theriault at 2018-05-23T11:29:05+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 15fc9712 by Simon Jakobi at 2018-05-31T04:17:47+02:00 Adjust to new HsDocString internals - - - - - 6f1e19a8 by Ben Gamari at 2018-06-02T16:18:58-04:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 0d0355d9 by Ryan Scott at 2018-06-04T21:26:59-04:00 DerivingVia changes - - - - - 0d93475a by Simon Jakobi at 2018-06-05T19:47:05+02:00 Bump a few dependency bounds (#845) - - - - - 5cbef804 by Alec Theriault at 2018-06-05T19:47:16+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 9094c56f by Alec Theriault at 2018-06-05T22:53:25+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 70188719 by Simon Jakobi at 2018-06-08T22:20:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - 495cd1fc by Chaitanya Koparkar at 2018-06-13T23:01:34+02:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 81088732 by Ben Gamari at 2018-06-13T23:01:34+02:00 Account for refactoring of LitString - - - - - 7baf6587 by Simon Jakobi at 2018-06-13T23:05:08+02:00 Adjust to new HsDocString internals - - - - - bb61464d by Ben Gamari at 2018-06-13T23:05:22+02:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 5d8cb87f by Ryan Scott at 2018-06-13T23:39:30+02:00 DerivingVia changes - - - - - 73d373a3 by Alec Theriault at 2018-06-13T23:39:30+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 4865e254 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Remove `ITtildehsh` token - - - - - b867db54 by Alec Theriault at 2018-06-13T23:39:30+02:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 9598e392 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Add docs for some DocH constructors (#814) - - - - - 8a59035b by Alec Theriault at 2018-06-13T23:39:30+02:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 29350fc8 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - 2590bbd9 by Ryan Scott at 2018-06-13T23:39:30+02:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - a9939fdc by Ryan Scott at 2018-06-13T23:39:30+02:00 Wibbles - - - - - a22f7df4 by Alec Theriault at 2018-06-13T23:39:30+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 8741015d by Simon Jakobi at 2018-06-13T23:39:30+02:00 Bump a few dependency bounds (#845) - - - - - 4791e1cc by Alec Theriault at 2018-06-13T23:39:30+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 311d3216 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - d0577817 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Complete FixitySig and FamilyDecl pattern matches - - - - - 055b3aa7 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Fix redundant import warnings - - - - - f9ce19b1 by Simon Jakobi at 2018-06-13T23:49:52+02:00 html-test: Accept output - - - - - 04604ea7 by Simon Jakobi at 2018-06-13T23:54:37+02:00 Bump bounds on Cabal - - - - - 0713b692 by Simon Jakobi at 2018-06-14T00:00:12+02:00 Merge branch 'ghc-head' into ghc-head-update-3 - - - - - c6a56bfd by Simon Jakobi at 2018-06-14T02:33:27+02:00 Bump ghc bound for haddock-api spec test-suite - - - - - 119d04b2 by Simon Jakobi at 2018-06-14T12:37:48+02:00 Travis: `--allow-newer` for all packages - - - - - 0e876e2c by Alex Biehl at 2018-06-14T15:28:52+02:00 Merge pull request haskell/haddock#857 from sjakobi/ghc-head-update-3 Update ghc-head - - - - - 5be46454 by Alec Theriault at 2018-06-14T21:42:45+02:00 Improved handling of interfaces in 'haddock-test' (#851) This should now work with an inplace GHC where (for instance) HTML directories may not be properly recorded in the package DB. - - - - - 96ab1387 by Vladislav Zavialov at 2018-06-14T17:06:21-04:00 Handle -XStarIsType - - - - - e518f8c4 by Ben Gamari at 2018-06-14T17:48:00-04:00 Revert unintentional reversion of fix of haskell/haddock#548 - - - - - 01b9f96d by Alan Zimmerman at 2018-06-19T11:52:22+02:00 Match changes in GHC for haskell/haddock#14259 - - - - - 7f8c8298 by Ben Gamari at 2018-06-19T18:14:27-04:00 Bump GHC version to 8.6 - - - - - 11c6b5d2 by Ryan Scott at 2018-06-19T23:17:31-04:00 Remove HsEqTy and XEqTy - - - - - b33347c2 by Herbert Valerio Riedel at 2018-06-20T23:14:52+02:00 Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. - - - - - f0d2460e by Herbert Valerio Riedel at 2018-06-20T23:28:46+02:00 Update Travis CI job - - - - - ef239223 by Herbert Valerio Riedel at 2018-06-20T23:32:41+02:00 Drop GHC HEAD from CI and update GHC to 8.4.3 It's a waste of resource to even try to build this branch w/ ghc-head; so let's not do that... - - - - - 41c4a9fa by Ben Gamari at 2018-06-20T18:26:20-04:00 Bump GHC version to 8.7 - - - - - 8be593dc by Herbert Valerio Riedel at 2018-06-21T22:32:15+02:00 Update CI job to use GHC 8.7.* - - - - - b91d334a by Simon Jakobi at 2018-06-30T13:41:38+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section - - - - - f707d848 by Alec Theriault at 2018-07-05T10:43:35-04:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. - - - - - a6d2b8dc by Alec Theriault at 2018-07-06T10:06:32-04:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case - - - - - 13819f71 by Alan Zimmerman at 2018-07-15T19:33:51+02:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 - - - - - c346aa78 by Simon Jakobi at 2018-07-19T12:29:32+02:00 haddock-library: Bump bounds for containers - - - - - 722e733c by Simon Jakobi at 2018-07-19T13:36:45+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] - - - - - f0bd83fd by Alec Theriault at 2018-07-19T14:39:57+02:00 Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. - - - - - 394053a8 by Simon Jakobi at 2018-07-19T14:58:07+02:00 haddock-library: Bump bounds for containers - - - - - 1bda11a2 by Alec Theriault at 2018-07-20T09:04:03+02:00 Add HEAD.hackage overlay (#887) * Add HEAD.hackage overlay * Add HCPKG variable - - - - - c7b4ab45 by Alec Theriault at 2018-07-20T12:01:16+02:00 Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test - - - - - c05d32ad by Alec Theriault at 2018-07-20T12:01:49+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output - - - - - 24b39ee4 by Alec Theriault at 2018-07-20T12:02:16+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. - - - - - cb9d2099 by Simon Jakobi at 2018-07-20T13:39:29+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) - - - - - 133f24f5 by Alec Theriault at 2018-07-20T13:39:29+02:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) - - - - - 11024149 by Alec Theriault at 2018-07-20T13:39:29+02:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) - - - - - de0c139e by Simon Jakobi at 2018-07-20T13:39:29+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) - - - - - 6435e952 by Alec Theriault at 2018-07-20T13:39:29+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) - - - - - 1461af39 by Alec Theriault at 2018-07-20T13:39:29+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) - - - - - 69d3bde1 by Alec Theriault at 2018-07-20T13:49:47+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) - - - - - 6a5c73c7 by Alec Theriault at 2018-07-20T13:50:00+02:00 Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests - - - - - 92ca94c6 by Alec Theriault at 2018-07-20T13:55:36+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) - - - - - 981bc7fa by Simon Jakobi at 2018-07-20T15:06:06+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers - - - - - 27e7c0c5 by Simon Jakobi at 2018-07-20T15:09:05+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 49e1a415 by Simon Jakobi at 2018-07-20T16:02:02+02:00 Update the ghc-8.6 branch (#889) * Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. * README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) * Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) * Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) * tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) * Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. * Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test * Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) * Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) * Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) * Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests * Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 5ca14bed by Simon Jakobi at 2018-07-20T16:05:47+02:00 Revert "Revert "Bump GHC version to 8.6"" That commit didn't belong onto the ghc-8.6 branch. This reverts commit acbaef3b9daf1d2dea10017964bf886e77a8e967. - - - - - 2dd600dd by Simon Jakobi at 2018-07-20T16:18:21+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. - - - - - fceb2422 by Simon Jakobi at 2018-07-20T16:18:21+02:00 outOfScope: Recommend qualifying the identifier - - - - - acea5d23 by Simon Jakobi at 2018-07-20T16:19:35+02:00 outOfScope: Recommend qualifying the identifier (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7) - - - - - 1a83ca55 by Simon Jakobi at 2018-07-20T16:19:35+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f) - - - - - 48374451 by Masahiro Sakai at 2018-07-20T17:06:42+02:00 Add # as a special character (#884) '#' has special meaning used for anchors and can be escaped using backslash. Therefore it would be nice to be listed as special characters. - - - - - 5e1a5275 by Alec Theriault at 2018-07-20T23:37:24+02:00 Let `haddock-test` bypass interface version check (#890) This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to. - - - - - 27286754 by Yuji Yamamoto at 2018-07-23T08:16:01+02:00 Avoid "invalid argument (invalid character)" on non-unicode Windows (#892) Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566 - - - - - 6729d361 by Alec Theriault at 2018-07-23T13:52:56-07:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). - - - - - 8cf4e6b5 by Ryan Scott at 2018-07-27T11:28:03-04:00 eqTyCon_RDR now lives in TysWiredIn After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071 - - - - - 1ad251a6 by Alan Zimmerman at 2018-07-30T13:28:09-04:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 (cherry picked from commit e3926b50ab8a7269fd6904b06e881745f08bc5d6) - - - - - 8aea2492 by Richard Eisenberg at 2018-08-02T10:54:17-04:00 Update against new HsImplicitBndrs - - - - - e42cada9 by Alec Theriault at 2018-08-04T17:51:30+02:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 0e852512 by Alex Biehl at 2018-08-06T13:04:02+02:00 Make --package-version optional for --hoogle generation (#899) * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion - - - - - d2abd684 by Noel Bourke at 2018-08-21T09:34:18+02:00 Remove unnecessary backslashes from docs (#908) On https://haskell-haddock.readthedocs.io/en/latest/markup.html#special-characters the backslash and backtick special characters showed up with an extra backslash before them – I think the escaping is not (or no longer) needed for those characters in rst. - - - - - 7a578a9e by Matthew Pickering at 2018-08-21T09:34:50+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - aa3d4db3 by Matthew Pickering at 2018-08-21T09:37:34+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - ede91744 by Alec Theriault at 2018-08-21T09:42:52+02:00 Better test output when Haddock crashes on a test (#902) In particular: we report the tests that crashed seperately from the tests that produced incorrect output. In order for tests to pass (and exit 0), they must not crash and must produce the right output. - - - - - 4a872b84 by Guillaume Bouchard at 2018-08-21T09:45:57+02:00 Fix a typo (#878) - - - - - 4dbf7595 by Ben Sklaroff at 2018-08-21T12:04:09-04:00 Add ITcomment_line_prag token to Hyperlinker Parser This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935 - - - - - 9170b2a9 by Ben Gamari at 2018-08-21T17:55:15-04:00 Merge pull request haskell/haddock#893 from harpocrates/get-name-to-instances Accumulate explicitly which modules to load for 'attachInstances' - - - - - d57b57cc by Ben Gamari at 2018-08-21T17:59:13-04:00 Merge branch 'ghc-head' of github.com:haskell/haddock into ghc-head - - - - - 14601ca2 by Alec Theriault at 2018-08-21T19:09:37-04:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1) - - - - - 438c645e by Matthew Pickering at 2018-08-21T19:12:39-04:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d) - - - - - a80c5161 by Alec Theriault at 2018-08-21T22:06:40-07:00 Better rendering of unboxed sums/tuples * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType' - - - - - 88456cc1 by Alec Theriault at 2018-08-21T22:06:40-07:00 Handle promoted tuples in 'synifyType' When we have a fully applied promoted tuple, we can expand it out properly. - - - - - fd1c1094 by Alec Theriault at 2018-08-21T22:19:34-07:00 Accept test cases - - - - - 6e80d9e0 by Alec Theriault at 2018-08-21T22:24:03-07:00 Merge pull request haskell/haddock#914 from harpocrates/feature/unboxed-stuff Better rendering of unboxed sums, unboxed tuples, promoted tuples. - - - - - 181a23f1 by Ben Gamari at 2018-08-23T15:53:48-04:00 Merge remote-tracking branch 'origin/ghc-8.6' into ghc-8.6 - - - - - 3a18c1d8 by Alec Theriault at 2018-08-27T14:15:25-07:00 Properly synify promoted list types We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type])))) - - - - - b4794946 by Alec Theriault at 2018-09-03T07:19:55-07:00 Only look at visible types when synifying a 'HsListTy' The other types are still looked at when considering whether to make a kind signature or not. - - - - - a231fce2 by Alec Theriault at 2018-09-03T07:38:10-07:00 Merge pull request haskell/haddock#922 from harpocrates/promoted-lists Properly synify promoted list types - - - - - 0fdf044e by Ningning Xie at 2018-09-15T10:25:58-04:00 Update according to GHC Core changes - - - - - 7379b115 by Ningning Xie at 2018-09-15T15:40:18-04:00 update dataFullSig to work with Co Quantification This should have been in the previous patch, but wasn't. - - - - - cf84a046 by Alec Theriault at 2018-09-17T20:12:18-07:00 Fix/add to various docs * Add documentation for a bunch of previously undocumented options (fixes haskell/haddock#870) * Extend the documentation of `--hoogle` considerably (see haskell/haddock#807) * Describe how to add docs to `deriving` clauses (fixes haskell/haddock#912) * Fix inaccurate docs about hyperlinking infix identifiers (fixes haskell/haddock#780) - - - - - ae017935 by Alec Theriault at 2018-09-22T08:32:16-07:00 Update Travis - - - - - d95ae753 by Alec Theriault at 2018-09-22T09:34:10-07:00 Accept failing tests Also silence orphan warnings. - - - - - f3e67024 by Alec Theriault at 2018-09-22T09:41:23-07:00 Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README - - - - - 3f136d4a by Alec Theriault at 2018-09-22T10:53:31-07:00 Turn haddock-library into a minor release Fix some version bounds in haddock-library too. - - - - - b9def006 by Alec Theriault at 2018-09-22T13:07:35-07:00 keep cabal.project file - - - - - 4909aca7 by Alec Theriault at 2018-10-16T09:36:30-07:00 Build on 7.4 and 7.8 - - - - - 99d20a28 by Herbert Valerio Riedel at 2018-10-16T18:45:52+02:00 Minor tweak to package description - - - - - a8059618 by Herbert Valerio Riedel at 2018-10-16T18:47:24+02:00 Merge pull request haskell/haddock#945 haddock-api 2.21.0 and haddock-library 1.6.1 release - - - - - 2d9bdfc1 by Alec Theriault at 2018-10-16T10:54:21-07:00 Bump haddock-library to 1.7.0 The 1.6.1 release should've been a major bump, since types in the `Documentation.Haddock.Parser.Monad` module changed. This version makes that module internal (as it morally should be). - - - - - ed340cef by Alec Theriault at 2018-10-16T14:59:13-07:00 Merge branch 'ghc-8.4' into ghc-8.6 - - - - - 2821a8df by Alec Theriault at 2018-10-16T15:14:48-07:00 Merge branch 'ghc-8.6' into ghc-head - - - - - a722dc84 by Alec Theriault at 2018-10-16T16:28:55-07:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 63377496 by Alec Theriault at 2018-10-16T16:39:07-07:00 Update changelog - - - - - 099a0110 by Alec Theriault at 2018-10-16T16:49:28-07:00 Merge pull request haskell/haddock#942 from harpocrates/update-docs Fix & add to documentation - - - - - 0927416f by Alec Theriault at 2018-10-16T16:50:14-07:00 Set UTF-8 encoding before writing files (#934) This should fix haskell/haddock#929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8). - - - - - 83b7b017 by Alec Theriault at 2018-10-16T17:42:05-07:00 Output pattern synonyms in Hoogle backend (#947) * Output pattern synonyms in Hoogle backend We were previously weren't outputting _any_ pattern synonyms, bundled or not. Now, we output both. Fixes haskell/haddock#946. * Update changelog - - - - - 81e5033d by Alec Theriault at 2018-10-16T18:04:40-07:00 Release `haddock{,-api}-2.22.0` This version will accompany ghc-8.6.2 - - - - - 9661744e by Alex Biehl at 2018-10-18T08:14:32-07:00 Add NewOcean theme And make it the default theme. - - - - - 7ae6d722 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Improve appearance and readability These changes include: - use latest Haskell's logo colors - decrease #content width to improve readability - use nicer font - improve sizes and distances - - - - - 37f8703d by NunoAlexandre at 2018-10-18T08:14:32-07:00 Include custom font in the html head - - - - - 1d5e1d79 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Update html test reference files - - - - - 53b7651f by NunoAlexandre at 2018-10-18T08:14:32-07:00 Make it responsive - It makes small screens taking more space than larger ones - fixes a few issues present in small screens currently - make it look good across different screen sizes. - - - - - 6aa1aeb1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make the style consistent with hackage Several things are addressed here: - better responsive behaviour on the header - better space usage - consistent colors overall - other nit PR comments - - - - - 3a250c5c by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Place the package name before the menu links This supports the expected responsive menu design, where the package name appears above the menu links. - - - - - cae699b3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update html-test reference files The package name element in the package-header is now a div instead of a paragraph, and it is now above the menu ul.links instead of below. - - - - - 2ec7fd2d by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve synopsis style and code - Use CSS3 instead of loading pictures to show "+" and "-" symbols - Drop redundant code - - - - - 0c874c01 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Decrease space between code blocks There was too much space between code blocks as pointed out by reviewers. - - - - - 85568ce2 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Add an initial-scale property to all haddock pages This solves an issue reported about the content looking incredibly small on mobile devices. - - - - - c1538926 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Address several PR comments - Darken text color like done for hackage - Move synopsis to left side - Make table of contents stick to the left on wide screens - Wrap links to avoid page overflow - Improve expand/collapse buttons - Fix issue with content size on mobile devices - Fix issue with font-size on landscape mode - Increase width of the content - Change colors of table of contents and synopsis - Etc - - - - - e6639e5f by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make synopsis scrollable on wide screens When the synopsis is longer than the screen, you can’t see its end and you can't scroll down either, making the content unreachable. - - - - - 1f0591ff by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve information density - Reduce font size - Improve space between and within code blocks - Improve alignments - Improve spacing within sub-blocks - - - - - bf083097 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Minor adjustments Bring in some adjustments made to hackage: - link colors - page header show everything when package title is too long - - - - - 10375fc7 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix responsive triggers overlap issue The min and max width triggers have the same values, which caused the style resolution to take an intersection of both style declarations when the screen resolution had the size of the limts (say 1280px), causing an odd behaviour and look. - - - - - 95ff2f95 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix issue with menu alignment on firefox Reported and described here: https://github.com/haskell/haddock/pull/721#issuecomment-374668869 - - - - - dc86587e by Alex Biehl at 2018-10-18T08:14:32-07:00 Changelog entry for NewOcean - - - - - 27195e47 by Herbert Valerio Riedel at 2018-10-18T08:14:32-07:00 html-test --accept - - - - - 83f4f9c0 by Alex Biehl at 2018-10-18T08:14:32-07:00 Avoid name shadowing - - - - - 231487f1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font to PT Sans Also migrate some general text related changes from hackage. - - - - - 313db81a by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Use 'flex' to fix header alignment - - - - - 5087367b by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Misc of tweaks - Update link colors to hackage scheme - Tune spacing between content elements - Update footer style - Fix and improve code blocks identation - - - - - b08020df by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font in Xhtml.hs to PT Sans - - - - - 78ce06e3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve code blocks styling - Fix and improve spacing - Improve colors and borders - - - - - 81262d20 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make package-header caption backward-compatible The current html generator of this branch wraps the package-header caption as a div, which does not work (without style adjustments) with the old themes. Changing it from div to span does the trick, without needing to adjust the old stylesheets. - - - - - dc4475cb by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update test-suite reference html pages - - - - - 393d35d8 by Alec Theriault at 2018-10-18T08:25:36-07:00 Accept tests - - - - - a94484ba by Alec Theriault at 2018-10-21T10:29:29-07:00 Fix CHANGELOG - - - - - 8797eca3 by Alec Theriault at 2018-10-21T10:36:19-07:00 Update 'data-files' to include NewOcean stuff - - - - - 1ae51e4a by Simon Jakobi at 2018-10-23T11:29:14+02:00 Fix typo in a warning - - - - - 009ad8e8 by Alec Theriault at 2018-10-24T12:47:47-07:00 Update JS dependencies This was done via `npm audit fix`. I think this fixes haskell/haddock#903 along with some more serious vulnerabilities that nobody seems to have noticed. - - - - - 051994db by Alec Theriault at 2018-10-24T17:31:09-07:00 Resurrect the style-switcher This fixes haskell/haddock#810. Looks like things were broken during the quickjump refactor of the JS. For the (git) record: I do not think the style switcher is a good idea. I'm fixing it for the same reason @mzero added it; as an answer to "rumblings from some that they didn't want their pixels changed on bit" - - - - - 2a1d620f by Alec Theriault at 2018-10-24T17:38:07-07:00 Fix copy-pasta error in data-files - - - - - ed5bfb7f by Alec Theriault at 2018-10-24T20:42:14-07:00 Fix the synopsis button Here's these changes are supposed to do: * put the synopsis back on the right side * properly have it on the edge of the screen on wide screens * adjust the background of the synopsis to match the button (otherwise the grey blends in with what is underneath) * get rid of the dotted purple line * the synopsis contents are now scrollable even when in wide screens (this has been a long-standing bug) - - - - - 883fd74b by Alec Theriault at 2018-10-25T20:16:46-07:00 Avoid more conflicts in generated ids (#954) This fixes haskell/haddock#953 by passing more names into the generated ids. - - - - - ea54e331 by Alec Theriault at 2018-10-25T21:07:12-07:00 Don't hide bullets in method docs I think thst CSS was meant only to deal with fields and the effect on bullets was accidental. Fixes haskell/haddock#926. - - - - - 9a14ef4a by Alec Theriault at 2018-10-25T22:02:07-07:00 Indent more things + slightly smaller font - - - - - b9f17e29 by Alec Theriault at 2018-10-25T22:10:01-07:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 096a3cfa by Alec Theriault at 2018-10-25T22:24:38-07:00 Accept HTML output - - - - - 2669517d by Alec Theriault at 2018-10-26T09:02:35-07:00 User manual + stuff for building GHC docs - - - - - 46b27687 by Alec Theriault at 2018-10-26T09:10:59-07:00 Make 'Contents' in NewOcean scrollable This only happens if the contents block on the left is so big that it doesn't fit (vertically) on the page. If that happens, we want it to be scrollable. - - - - - 3443dd94 by Alec Theriault at 2018-10-26T09:36:46-07:00 Revert "Make 'Contents' in NewOcean scrollable" This reverts commit f909ffd8353d6463fd5dd184998a32aa98d5c922. I missed the fact this also forces the 'Contents' to always go down to the bottom of the page. - - - - - ed081424 by Alec Theriault at 2018-10-26T14:22:23-07:00 Avoid some partiality AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes haskell/haddock#569. - - - - - 6a5bec41 by Alec Theriault at 2018-10-27T10:05:04-07:00 Fix documentation in `haddock-api` (#957) * Fix misplaced Haddocks in Haddock itself Haddock should be able to generate documentation for 'haddock-api' again. * Make CI check that documentation can be built. * Add back a doc that is OK - - - - - 5100450a by Matthew Yacavone at 2018-10-27T14:51:38-04:00 More explicit foralls (GHC Proposal 0007) - - - - - 8771a6b0 by Alec Theriault at 2018-11-05T13:58:11-08:00 Only run MathJax on entities with "mathjax" class (#960) Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes haskell/haddock#959. - - - - - bd7ff5c5 by Alec Theriault at 2018-11-05T15:54:22-08:00 Deduplicate some work in 'AttachInstances' Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too - - - - - cf99fd8f by Alec Theriault at 2018-11-05T15:54:22-08:00 Specialize some SYB functions Perf only change: * Add a 'SPECIALIZE' pragma to help GHC optimize a 'Data a =>' constraint * Manually specialize the needlessly general type of 'specializeTyVarBndrs' - - - - - 4f91c473 by Alec Theriault at 2018-11-05T15:54:22-08:00 Improve perf of renaming Perf only change: * don't look up type variable names (they're never in the environment) * use a difference list for accumulating missing names * more efficient 'Functor'/'Applicative' instances for 'RnM' - - - - - 4bbab0d4 by Alec Theriault at 2018-11-05T15:54:22-08:00 Faster 'Text' driven parser combinators Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}' - - - - - fa430c02 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support hyperlink labels with inline markup The parser for pictures hasn't been properly adjusted yet. - - - - - c1431035 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support (and flatten) inline markup in image links Inline markup is supported in image links but, as per the [commonmark recommendation][0], it is stripped back to a plain text representation. [0]: https://spec.commonmark.org/0.28/#example-547 - - - - - d4ee1ba5 by Alec Theriault at 2018-11-06T12:03:24-08:00 Accept test case - - - - - 8088aeb1 by Alec Theriault at 2018-11-06T12:03:24-08:00 Fix/add to haddock-library test suite - - - - - e78f644d by Alec Theriault at 2018-11-06T13:26:31-08:00 Bump version bounds - - - - - 644335eb by Alec Theriault at 2018-11-06T13:53:30-08:00 Merge pull request haskell/haddock#875 from harpocrates/feature/markup-in-hyperlinks Inline markup in markdown-style links and images - - - - - e173ed0d by Alec Theriault at 2018-11-07T12:37:18-08:00 Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page - - - - - b2d92df7 by Alec Theriault at 2018-11-07T13:41:57-08:00 Allow "Contents" summary to scroll in a fixed div In the unfortunate event that the "Contents" summary doesn't fit vertically (like in the "Prelude"), it will be scrollable. - - - - - ca704c23 by Alec Theriault at 2018-11-07T13:45:15-08:00 Accept HTML output changes - - - - - 82c0ec6d by Alec Theriault at 2018-11-07T18:12:54-08:00 overflow-y 'scroll' -> 'auto' - - - - - 571d7657 by Alec Theriault at 2018-11-08T19:44:12-08:00 Clicking on "Contents" navigates to top of page - - - - - 8065a012 by Alec Theriault at 2018-11-08T19:44:17-08:00 Space out functions more Also, functions and data decls now have the same space before and after them. - - - - - cc650ede by Alec Theriault at 2018-11-09T08:13:35-08:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 65f8c17f by Alec Theriault at 2018-11-10T14:04:06-08:00 Update changelog - - - - - 20473847 by Alec Theriault at 2018-11-10T14:21:40-08:00 Replace oplus/ominus expander/collapser icons with triangles - - - - - 16592957 by Alec Theriault at 2018-11-10T14:35:10-08:00 Merge pull request haskell/haddock#949 from haskell/wip/new-ocean Introduce NewOcean theme. - - - - - 357cefe1 by Alec Theriault at 2018-11-10T16:02:13-08:00 Merge branch 'ghc-8.6' into ghc-head - - - - - de612267 by Alec Theriault at 2018-11-11T20:01:21-08:00 Rename 'NewOcean' theme to 'Linuwial' - - - - - 954b5baa by Alec Theriault at 2018-11-12T08:33:18-08:00 Add blockquote styling Matches b71da1feabf33efbbc517ac376bb690b5a604c2f from hackage-server. Fixes haskell/haddock#967. - - - - - d32c0b0b by Fangyi Zhou at 2018-11-12T10:24:13-08:00 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, osa1 Reviewed By: osa1 GHC Trac Issues: haskell/haddock#15733 Differential Revision: https://phabricator.haskell.org/D5262 - - - - - 41098b1f by Alp Mestanogullari at 2018-11-15T22:40:09+01:00 Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change It got introduced in ghc/ghc at ae2c9b40f5b6bf272251d1f4107c60003f541b62. - - - - - c5c1c7e0 by Alec Theriault at 2018-11-15T13:48:13-08:00 Merge pull request haskell/haddock#970 from alpmestan/alp/fix-promotionflag Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change - - - - - 6473d3a4 by Shayan-Najd at 2018-11-23T01:38:49+01:00 [TTG: Handling Source Locations] Foundation and Pat Trac Issues haskell/haddock#15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`) - - - - - 7a088dfe by Alec Theriault at 2018-11-26T11:11:28-08:00 More uniform handling of `forall`'s in HTML/LaTeX * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes haskell/haddock#973 - - - - - d735e570 by Alec Theriault at 2018-12-12T08:42:09-08:00 Fix warnings, accept output * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's - - - - - a3852f8a by Zejun Wu at 2018-12-14T09:37:47-05:00 Output better debug infromation on internal error in extractDecl This will make investigation of haskell/haddock#979 easier - - - - - 2eccb5b9 by Alec Theriault at 2018-12-17T09:25:10-05:00 Refactor names + unused functions (#982) This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions - - - - - e82e4df8 by Alec Theriault at 2018-12-20T16:16:30-05:00 Load plugins when compiling each module (#983) * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code - - - - - 96e86f38 by Alec Theriault at 2018-12-23T10:23:20-05:00 Properly synify and render promoted type variables (#985) * Synify and render properly promoted type variables Fixes haskell/haddock#923. * Accept output - - - - - 23343345 by Alec Theriault at 2018-12-27T16:39:38-05:00 Remove `haddock-test`'s dep. on `syb` (#987) The functionality is easily inlined into one short function: `gmapEverywhere`. This doesn't warrant pulling in another package. - - - - - d0734f21 by Alec Theriault at 2018-12-27T16:39:52-05:00 Address deprecation warnings in `haddock-test` (#988) Fixes haskell/haddock#885. - - - - - 4d9f144e by mynguyen at 2018-12-30T23:42:26-05:00 Visible kind application haddock update - - - - - ffe0e9ed by Alec Theriault at 2019-01-07T13:55:22-08:00 Print kinded tyvars in constructors for Hoogle (#993) Fixes haskell/haddock#992 - - - - - 2e18b55d by Alec Theriault at 2019-01-10T16:42:45-08:00 Accept new output `GHC.Maybe` -> `Data.Maybe` (#996) Since 53874834b779ad0dfbcde6650069c37926da1b79 in GHC, "GHC.Maybe" is marked as `not-home`. That changes around some test output. - - - - - 055da666 by Gabor Greif at 2019-01-22T14:41:51+01:00 Lone typofix - - - - - 01bb71c9 by Alec Theriault at 2019-01-23T11:46:46-08:00 Keep forall on H98 existential data constructors (#1003) The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes haskell/haddock#1002. - - - - - f9b9bc0e by Ryan Scott at 2019-01-27T09:28:12-08:00 Fix haskell/haddock#1004 with a pinch of dropForAlls - - - - - 5cfcdd0a by Alec Theriault at 2019-01-28T16:49:57-08:00 Loosen 'QuickCheck' and 'hspec' bounds It looks like the new versions don't cause any breakage and loosening the bounds helps deps fit in one stack resolver. - - - - - 3545d3dd by Alec Theriault at 2019-01-31T01:37:25-08:00 Use `.hie` files for the Hyperlinker backend (#977) # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see haskell/haddock#998) * restructure temporary folder logic for `.hi`/`.hie` model - - - - - 2ded3359 by Herbert Valerio Riedel at 2019-02-02T12:06:12+01:00 Update/modernise haddock-library.cabal file - - - - - 62b93451 by Herbert Valerio Riedel at 2019-02-02T12:19:31+01:00 Tentatively declare support for unreleased base-4.13/ghc-8.8 - - - - - 6041e767 by Herbert Valerio Riedel at 2019-02-02T16:04:32+01:00 Normalise LICENSE text w/ cabal's BSD2 template Also, correct the `.cabal` files to advertise `BSD2` instead of the incorrect `BSD3` license. - - - - - 0b459d7f by Alec Theriault at 2019-02-02T18:06:12-08:00 CI: fetch GHC from validate artifact Should help make CI be less broken - - - - - 6b5c07cf by Alec Theriault at 2019-02-02T18:06:12-08:00 Fix some Hyperlinker test suite fallout * Amend `ParserSpec` to match new Hyperlinker API - pass in compiler info - strip out null tokens * Make `hypsrc-test` pass reliably - strip out `local-*` ids - strip out `line-*` ids from the `ClangCppBug` test - re-accept output - - - - - ded34791 by Nathan Collins at 2019-02-02T18:31:23-08:00 Update README instructions for Stack No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock. - - - - - 723298c9 by Alec Theriault at 2019-02-03T09:11:05-08:00 Remove `Documentation.Haddock.Utf8` The circumstances under which this module appeared are completely gone. The Hyperlinker backend no longer needs this module (it uses the more efficient `Encoding` module from `ghc`). Why no deprecation? Because this module really shouldn't exist! - It isn't used in `haddock-library`/`haddock-api` anymore - It was copy pasted directly from `utf8-string` - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding` - - - - - 51050006 by Alec Theriault at 2019-02-03T22:58:58-08:00 Miscellaneous improvements to `Convert` (#1020) Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms - - - - - 841980c4 by Oleg Grenrus at 2019-02-04T08:44:25-08:00 Make a fixture of weird parsing of lists (#997) The second example is interesting. If there's a list directly after the header, and that list has deeper structure, the parser is confused: It finds two lists: - One with the first nested element, - everything after it I'm not trying to fix this, as I'm not even sure this is a bug, and not a feature. - - - - - 7315c0c8 by Ryan Scott at 2019-02-04T12:17:56-08:00 Fix haskell/haddock#1015 with dataConUserTyVars (#1022) The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes haskell/haddock#1015. - - - - - ee0b49a3 by Ryan Scott at 2019-02-04T15:25:17-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. - - - - - 1c850dc8 by Alan Zimmerman at 2019-02-05T21:54:18+02:00 Matching changes in GHC for haskell/haddock#16236 - - - - - ab03c38e by Simon Marlow at 2019-02-06T08:07:33+00:00 Merge pull request haskell/haddock#1014 from hvr/pr/bsd2-normalise Normalise LICENSE text w/ cabal's BSD2 template - - - - - 5a92ccae by Alec Theriault at 2019-02-10T06:21:55-05:00 Merge remote-tracking branch 'gitlab/wip/T16236-2' into ghc-head - - - - - c0485a1d by Alec Theriault at 2019-02-10T03:32:52-08:00 Removes `haddock-test`s dependency on `xml`/`xhtml` (#1027) This means that `html-test`, `latex-test`, `hoogle-test`, and `hypsrc-test` now only depend on GHC boot libs. So we should now be able to build and run these as part of GHC's testsuite. \o/ The reference output has changed very slightly, in three ways: * we don't convert quotes back into `&quot;` as the `xml` lib did * we don't add extra `&nbsp;` as the `xml` lib did * we now remove the entire footer `div` (instead of just emptying it) - - - - - 65a448e3 by Alec Theriault at 2019-02-11T12:27:41-05:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - 360ca937 by Alec Theriault at 2019-02-13T11:36:11-05:00 Clean up logic for guessing `-B` and `--lib` (#1026) Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works. - - - - - d583e364 by Alec Theriault at 2019-02-16T10:41:22-05:00 Fix tests broken by GHC Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings. - - - - - da0c42cc by Vladislav Zavialov at 2019-02-17T11:39:19+03:00 Parser changes to match !380 - - - - - ab96bed7 by Ryan Scott at 2019-02-18T04:44:08-05:00 Bump ghc version to 8.9 - - - - - 44b7c714 by Alec Theriault at 2019-02-22T05:49:43-08:00 Match GHC changes for T16185 `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock. - - - - - 2ee653b1 by Alec Theriault at 2019-02-24T18:53:33-08:00 Update .travis.yml Points to the new GHC CI artifact. - - - - - 90939d71 by Alec Theriault at 2019-02-25T00:42:41-08:00 Support value/type namespaces on identifier links Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity) - - - - - d6ed496c by Alec Theriault at 2019-02-25T00:42:46-08:00 Better identifier parsing * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental). - - - - - 3c3b404c by Alec Theriault at 2019-02-25T22:12:11-08:00 Fix standalone deriving docs Docs on standalone deriving decls for classes with associated types should be associated with the class instance, not the associated type instance. Fixes haskell/haddock#1033 - - - - - d51ef69e by Alec Theriault at 2019-02-26T19:14:59-08:00 Fix bogus identifier defaulting This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes haskell/haddock#1035. - - - - - 88cbbdc7 by Ryan Scott at 2019-02-27T10:14:03-05:00 Visible dependent quantification (#16326) changes - - - - - 0dcf6cee by Xia Li-yao at 2019-02-27T21:53:27-05:00 Menu item controlling which instances are expanded/collapsed (#1007) Adds a menu item (like "Quick Jump") for options related to displaying instances. This provides functionality for: * expanding/collapsing all instances on the currently opened page * controlling whether instances are expanded/collapsed by default * controlling whether the state of instances should be "remembered" This new functionality is implemented in Typescript in `details-helper`. The built-in-themes style switcher also got a revamp so that all three of QuickJump, the style switcher, and instance preferences now have the same style and implementation structure. See also: https://mail.haskell.org/pipermail/haskell-cafe/2019-January/130495.html Fixes haskell/haddock#698. Co-authored-by: Lysxia <lysxia at gmail.com> Co-authored-by: Nathan Collins <conathan at galois.com> - - - - - 3828c0fb by Alec Theriault at 2019-02-28T12:42:49-05:00 `--show-interface` should output to stdout. (#1040) Fixes haskell/haddock#864. - - - - - a50f4cda by gbaz at 2019-03-01T07:43:16-08:00 Increase contrast of Linuwal theme (#1037) This is to address the concern that, on less nice and older screens, some of the shades of grey blend in too easily with the white background. * darken the font slightly * darken slightly the grey behind type signatures and such * add a border and round the corners on code blocks * knock the font down by one point - - - - - ab4d41de by Alec Theriault at 2019-03-03T09:23:26-08:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 12f509eb by Ben Gamari at 2019-03-04T22:13:20-05:00 Remove reference to Opt_SplitObjs flag Split-objects has been removed. - - - - - 5b3e4c9a by Ryan Scott at 2019-03-06T19:16:24-05:00 Update html-test output to reflect haskell/haddock#16391 changes - - - - - fc228af1 by Alec Theriault at 2019-03-09T08:29:23-08:00 Match changes for "Stop inferring over-polymorphic kinds" The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock. - - - - - 6ac109eb by Alec Theriault at 2019-03-09T11:22:55-08:00 Add .hi, .dyn_hi, etc files to .gitignore Fixes haskell/haddock#1030. - - - - - b55f0c05 by Alec Theriault at 2019-03-09T11:22:55-08:00 Better support for default methods in classes * default methods now get rendered differently * default associated types get rendered * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend * LaTeX backend now renders default method signatures NB: there is still no way to document default class members and the NB: LaTeX backend still crashes on associated types - - - - - 10aea0cf by Alec Theriault at 2019-03-09T11:22:55-08:00 Avoid multi-line `emph` in LaTeX backend `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes haskell/haddock#936. - - - - - d22dc2c9 by Alec Theriault at 2019-03-09T11:22:55-08:00 Many LaTeX backend fixes After this commit, we can run with `--latex` on all boot libraries without crashing (although the generated LaTeX still fails to compile in a handful of larger packages like `ghc` and `base`). * Add newlines after all block elements in LaTeX. This is important to prevent the final output from being more an more indented. See the `latext-test/src/Example` test case for a sample of this. * Support associated types in class declarations (but not yet defaults) * Several small issues for producing compiling LaTeX; - avoid empy `\haddockbeginargs` lists (ex: `type family Any`) - properly escape identifiers depending on context (ex: `Int#`) - add `vbox` around `itemize`/`enumerate` (so they can be in tables) * Several spacing fixes: - limit the width of `Pretty`-arranged monospaced code - cut out extra space characters in export lists - only escape spaces if there are _multiple_ spaces - allow type signatures to be multiline (even without docs) * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files from `latex-test` test reference output. Fixes haskell/haddock#935, haskell/haddock#929 (LaTeX docs for `text` build & compile) Fixes haskell/haddock#727, haskell/haddock#930 (I think both are really about type families...) - - - - - 0e6cee00 by Alec Theriault at 2019-03-29T12:11:56-07:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - ce05434d by Alan Zimmerman at 2019-03-29T12:12:11-07:00 Matching changes in GHC for haskell/haddock#16236 (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576) - - - - - d85766b2 by Ben Gamari at 2019-03-29T12:14:04-07:00 Bump GHC to 8.8 - - - - - 5a82cbaf by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Redo ParseModuleHeader - - - - - b9033348 by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - bb55c8f4 by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove outdated `.ghci` files and `scripts` The `.ghci` files are actively annoying when trying to `cabal v2-repl`. As for the `scripts`, the distribution workflow is completely different. - - - - - 5ee244dc by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove obsolete arcanist files + STYLE Now that GHC is hosted on Gitlab, the arcanist files don't make sense anymore. The STYLE file contains nothing more than a dead link too. - - - - - d07c1928 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Redo ParseModuleHeader - - - - - 492762d2 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - af2ac773 by Ryan Scott at 2019-05-14T17:22:13-04:00 Changes for haskell/haddock#16110/#16356 - - - - - 6820ed0d by Alec Theriault at 2019-05-17T08:51:27-07:00 Unbreak haskell/haddock#1004 test case `fail` is no longer part of `Monad`. - - - - - 6bf7be98 by Alec Theriault at 2019-05-17T08:51:27-07:00 Fix haskell/haddock#1063 with better parenthesization logic for contexts The only other change in html/hoogle/hyperlinker output for the boot libraries that this caused is a fix to some Hoogle output for implicit params. ``` $ diff -r _build/docs/ old_docs diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt 13296c13296 < assertError :: (?callStack :: CallStack) => Bool -> a -> a --- > assertError :: ?callStack :: CallStack => Bool -> a -> a ``` - - - - - b5716b61 by Ryan Scott at 2019-05-22T17:24:32-04:00 Match changes with haskell/haddock#14332 - - - - - c115abf6 by Alec Theriault at 2019-05-26T16:01:58-04:00 Remove Haddock's dependency on `Cabal` At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries). - - - - - e5b2d4a3 by Alec Theriault at 2019-05-26T16:16:25-04:00 Regression test: promoted lists in associated types When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes haskell/haddock#466, - - - - - cc5ad5d3 by Alec Theriault at 2019-05-26T17:55:54-04:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 4b3301a6 by Alec Theriault at 2019-05-26T17:57:52-04:00 Release haddock-2.23, haddock-library-1.8.0 Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1. - - - - - 69c7cfce by Matthew Pickering at 2019-05-30T10:54:27+01:00 Update hyperlinker tests for new types in .hie files - - - - - 29b7e738 by Zubin Duggal at 2019-05-30T10:57:51+01:00 update for new way to store hiefile headers - - - - - aeca5d5f by Zubin Duggal at 2019-06-04T18:57:42-04:00 update for new way to store hiefile headers - - - - - ba2ca518 by Ben Gamari at 2019-06-07T23:11:14+00:00 Update test output for introduction of Safe-Inferred - - - - - 3a975a6c by Ryan Scott at 2019-07-03T12:06:27-04:00 Changes for haskell/haddock#15247 - - - - - 0df46555 by Zubin Duggal at 2019-07-22T10:52:50+01:00 Fix haddockHypsrcTest - - - - - 2688686b by Sylvain Henry at 2019-09-12T23:19:39+02:00 Fix for GHC module renaming - - - - - 9ec0f3fc by Alec Theriault at 2019-09-20T03:21:00-04:00 Fix Travis CI, loosen .cabal bounds (#1089) Tentatively for the 2.23 release: * updated Travis CI to work again * tweaked bounds in the `.cabal` files * adjusted `extra-source-files` to properly identify test files - - - - - ca559beb by Matthías Páll Gissurarson at 2019-09-28T12:14:40-04:00 Small change in to facilitate extended typed-holes (#1090) This change has no functional effect on haddock itself, it just changes one pattern to use `_ (` rather than `_(`, so that we may use `_(` as a token for extended typed-holes later. - - - - - 02e28976 by Vladislav Zavialov at 2019-09-28T12:17:45-04:00 Remove spaces around @-patterns (#1093) This is needed to compile `haddock` when [GHC Proposal haskell/haddock#229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented. - - - - - 83cbbf55 by Alexis King at 2019-09-30T21:12:42-04:00 Fix the ignore-exports option (#1082) The `ignore-exports` option has been broken since haskell/haddock#688, as mentioned in https://github.com/haskell/haddock/pull/766#issue-172505043. This PR fixes it. - - - - - e127e0ab by Ben Gamari at 2019-10-06T15:12:06-04:00 Fix a few haddock issues - - - - - 3a0f5c89 by Zubin Duggal at 2019-10-07T17:56:13-04:00 Fix crash when there are no srcspans in the file due to CPP - - - - - 339c5ff8 by Alec Theriault at 2019-10-07T17:56:13-04:00 Prefer un-hyperlinked sources to no sources It is possible to fail to extract an HIE ast. This is however not a reason to produce _no_ output - we should still make a colorized HTML page. - - - - - d47ef478 by Alec Theriault at 2019-10-07T17:56:13-04:00 Add a regression test for haskell/haddock#1091 Previously, this input would crash Haddock. - - - - - ed7c8b0f by Alec Theriault at 2019-10-07T20:56:48-04:00 Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. - - - - - d00436ab by Andreas Klebinger at 2019-10-21T15:53:03+02:00 Refactor for withTiming changes. - - - - - 4230e712 by Ben Gamari at 2019-10-22T09:36:37-04:00 Merge pull request haskell/haddock#1101 from AndreasPK/withTimingRefactor Refactor for withTiming changes. - - - - - d155c5f4 by Ryan Scott at 2019-10-23T10:37:17-04:00 Reify oversaturated data family instances correctly (#1103) This fixes haskell/haddock#1103 by adapting the corresponding patch for GHC (see https://gitlab.haskell.org/ghc/ghc/issues/17296 and https://gitlab.haskell.org/ghc/ghc/merge_requests/1877). - - - - - 331a5adf by Sebastian Graf at 2019-10-25T17:14:40+02:00 Refactor for OutputableBndrId changes - - - - - 48a490e0 by Ben Gamari at 2019-10-27T10:16:16-04:00 Merge pull request haskell/haddock#1105 from sgraf812/wip/flexible-outputable Refactor for OutputableBndrId changes - - - - - f62a7dfc by Sebastian Graf at 2019-11-01T11:54:16+00:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - d9b242ed by Ryan Scott at 2019-11-03T13:20:03-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. (cherry picked from commit cfd682c5fd03b099a3d78c44f9279faf56a0ac70) - - - - - dfd42406 by Sebastian Graf at 2019-11-04T07:02:14-05:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - 0b15be7c by Ben Gamari at 2019-11-09T13:21:33-05:00 Import isRuntimeRepVar from Type rather than TyCoRep isRuntimeRepVar is not longer exported from TyCoRep due to ghc#17441. - - - - - 091f7283 by Ben Gamari at 2019-11-10T12:47:06-05:00 Bump to GHC 8.10 - - - - - e88c71f2 by Ben Gamari at 2019-11-14T00:22:24-05:00 Merge pull request haskell/haddock#1110 from haskell/wip/T17441 Import isRuntimeRepVar from Type rather than TyCoRep - - - - - 4e0bbc17 by Ben Gamari at 2019-11-14T00:22:45-05:00 Version bumps for GHC 8.11 - - - - - 0e85ceb4 by Ben Gamari at 2019-11-15T11:59:45-05:00 Bump to GHC 8.10 - - - - - 00d6d68b by Ben Gamari at 2019-11-16T18:35:58-05:00 Bump ghc version to 8.11 - - - - - dde1fc3f by Ben Gamari at 2019-11-16T20:40:37-05:00 Drop support for base 4.13 - - - - - f52e331d by Vladislav Zavialov at 2019-11-24T13:02:28+03:00 Update Hyperlinker.Parser.classify to use ITdollar - - - - - 1ad96198 by Vladislav Zavialov at 2019-11-28T16:12:33+03:00 Remove HasSrcSpan (#17494) - - - - - 651afd70 by Herbert Valerio Riedel at 2019-12-08T12:08:16+01:00 Document error-prone conditional definition of instances This can easily trip up people if one isn't aware of it. Usually it's better to avoid this kind of conditionality especially for typeclasses for which there's an compat-package as conditional instances like these tend to fragment the ecosystem into those packages that go the extra mile to provide backward compat via those compat-packages and those that fail to do so. - - - - - b521af56 by Herbert Valerio Riedel at 2019-12-08T12:09:54+01:00 Fix build-failure regression for base < 4.7 The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses haskell/haddock#1119 - - - - - 556c375d by Sylvain Henry at 2020-01-02T19:01:55+01:00 Fix after Iface modules renaming - - - - - bd6c53e5 by Sylvain Henry at 2020-01-07T00:48:48+01:00 hsyl20-modules-renamer - - - - - fb23713b by Ryan Scott at 2020-01-08T07:41:13-05:00 Changes for GHC#17608 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2372 - - - - - 4a4dd382 by Ryan Scott at 2020-01-25T08:08:26-05:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - e782a44d by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename PackageConfig into UnitInfo - - - - - ba3c9f05 by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename lookupPackage - - - - - ab37f9b3 by Ben Gamari at 2020-01-29T13:00:44-05:00 Merge pull request haskell/haddock#1125 from haskell/wip/T17566-take-two Changes for GHC#17566 - - - - - 3ebd5ae0 by Ryan Scott at 2020-01-31T05:56:50-05:00 Merge branch 'wip-hsyl20-package-refactor' into ghc-head - - - - - 602a747e by Richard Eisenberg at 2020-02-04T09:05:43+00:00 Echo GHC's removal of PlaceHolder module This goes with GHC's !2083. - - - - - ccfe5679 by Sylvain Henry at 2020-02-10T10:13:56+01:00 Module hierarchy: runtime (cf haskell/haddock#13009) - - - - - 554914ce by Cale Gibbard at 2020-02-10T16:10:39-05:00 Fix build of haddock in stage1 We have to use the correct version of the GHC API, but the version of the compiler itself doesn't matter. - - - - - 5b6fa2a7 by John Ericson at 2020-02-10T16:18:07-05:00 Noramlize `tested-with` fields in cabal files - - - - - e6eb3ebe by Vladislav Zavialov at 2020-02-16T13:25:26+03:00 No MonadFail/Alternative for P - - - - - 90e181f7 by Ben Gamari at 2020-02-18T14:13:47-05:00 Merge pull request haskell/haddock#1129 from obsidiansystems/wip/fix-stage1-build Fix build of haddock in stage1 - - - - - 93b64636 by Sylvain Henry at 2020-02-19T11:20:27+01:00 Modules: Driver (#13009) - - - - - da4f6c7b by Vladislav Zavialov at 2020-02-22T15:33:02+03:00 Use RealSrcSpan in InstMap - - - - - 479b1b50 by Ben Gamari at 2020-02-23T10:28:13-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 55ecacf0 by Sylvain Henry at 2020-02-25T15:18:27+01:00 Modules: Core (#13009) - - - - - 60867b3b by Vladislav Zavialov at 2020-02-28T15:53:52+03:00 Ignore the BufLoc/BufSpan added in GHC's !2516 - - - - - 1e5506d3 by Sylvain Henry at 2020-03-02T12:32:43+01:00 Modules: Core (#13009) - - - - - 6fb53177 by Richard Eisenberg at 2020-03-09T14:49:40+00:00 Changes in GHC's !1913. - - - - - 30b792ea by Ben Gamari at 2020-03-16T12:45:02-04:00 Merge pull request haskell/haddock#1130 from hsyl20/wip/hsyl20-modules-core2 Modules: Core (#13009) - - - - - cd761ffa by Sylvain Henry at 2020-03-18T15:24:00+01:00 Modules: Types - - - - - b6646486 by Ben Gamari at 2020-03-18T14:42:43-04:00 Merge pull request haskell/haddock#1133 from hsyl20/wip/hsyl20/modules/types Modules: Types - - - - - 9325d734 by Kleidukos at 2020-03-19T12:38:31-04:00 Replace the 'caption' class so that the collapsible sections are shown - - - - - 5e2bb555 by Kleidukos at 2020-03-19T12:38:31-04:00 Force ghc-8.8.3 - - - - - c6fcd0aa by Kleidukos at 2020-03-19T12:38:31-04:00 Update test fixtures - - - - - 5c849cb1 by Sylvain Henry at 2020-03-20T09:34:39+01:00 Modules: Types - - - - - 7f439155 by Alec Theriault at 2020-03-20T20:17:01-04:00 Merge branch 'ghc-8.8' into ghc-8.10 - - - - - b7904e5c by Alina Banerjee at 2020-03-20T20:24:17-04:00 Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests - - - - - b9d60a59 by Alec Theriault at 2020-03-22T11:46:42-04:00 Clean up warnings * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal` - - - - - 0c317dbe by Alec Theriault at 2020-03-22T18:46:54-04:00 Fix NPM security warnings This was done by calling `npm audit fix`. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. - - - - - 6e306242 by Alec Theriault at 2020-03-22T20:10:52-04:00 Tentative 2.24 release Adjusted changelogs and versions in `.cabal` files in preparation for the upcoming release bundled with GHC 8.10. - - - - - 1bfb4645 by Ben Gamari at 2020-03-23T16:40:54-04:00 Merge commit '3c2944c037263b426c4fe60a3424c27b852ea71c' into HEAD More changes from the GHC types module refactoring. - - - - - be8c6f3d by Alec Theriault at 2020-03-26T20:10:53-04:00 Update `.travis.yml` to work with GHC 8.10.1 * Regenerated the Travis file with `haskell-ci` * Beef up `.cabal` files with more `tested-with` information - - - - - b025a9c6 by Alec Theriault at 2020-03-26T20:10:53-04:00 Update README Removed some out of date links/info, added some more useful links. * badge to Hackage * update old trac link * `ghc-head` => `ghc-8.10` * `cabal new-*` is now `cabal v2-*` and it should Just Work * `--test-option='--accept'` is the way to accept testsuite output - - - - - 564d889a by Alec Theriault at 2020-03-27T20:34:33-04:00 Fix crash in `haddock-library` on unicode space Our quickcheck tests for `haddock-library` stumbled across an edge case input that was causing Haddock to crash: it was a unicode space character. The root cause of the crash is that we were implicitly assuming that if a space character was not " \t\f\v\r", it would have to be "\n". We fix this by instead defining horizontal space as: any space character that is not '\n'. Fixes haskell/haddock#1142 - - - - - 2d360ba1 by Alec Theriault at 2020-03-27T21:57:32-04:00 Disallow qualified uses of reserved identifiers This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes haskell/haddock#952 - - - - - 47ae22ed by Alec Theriault at 2020-03-28T13:36:25-04:00 Remove unused `Haddock.Utils` functions * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils` - - - - - c0291245 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use TTG empty extensions to remove some `error`'s None of these error cases should ever have been reachable, so this is just a matter of leveraging the type system to assert this. * Use the `NoExtCon` and `noExtCon` to handle case matches for no extension constructors, instead of throwing an `error`. * Use the extension field of `HsSpliceTy` to ensure that this variant of `HsType` cannot exist in an `HsType DocNameI`. - - - - - 0aff8dc4 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` * `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes haskell/haddock#978 - - - - - bf6f2fb7 by Alec Theriault at 2020-03-28T13:36:25-04:00 Cleanup up GHC flags in `.cabal` files * enable more useful warning flags in `haddock-api`, handle the new warnings generated * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in `-Wall` for a while now) - - - - - c576fbf1 by Alec Theriault at 2020-03-28T13:36:25-04:00 `haddock-library` document header level Document the fact the header level is going to always be between 1 and 6 inclusive. Along the way, I also optimized the parsing code a bit. - - - - - 71bce0ee by Alec Theriault at 2020-03-28T14:26:27-04:00 Disallow links in section headers This is quite straightforward to implement, since we already had a function `docToHtmlNoAnchors` (which we used to generate the link in the sidebar "Contents"). This breaks test `Bug387`, but that test case has aged badly: we now automatically generate anchors for all headings, so manually adding an anchor in a section makes no sense. Nested anchors are, as pointed out in haskell/haddock#1054, disallowed by the HTML standard. Fixes haskell/haddock#1054 - - - - - b461b0ed by Sylvain Henry at 2020-03-30T10:34:23+02:00 Modules: type checker - - - - - cd8cd1ee by Ben Gamari at 2020-03-31T12:45:02-04:00 Merge pull request haskell/haddock#1152 from hsyl20/wip/hsyl20/modules/tc Module renaming - - - - - 5e8f8ea7 by Felix Yan at 2020-04-01T17:58:06-07:00 Allow QuickCheck 2.14 Builds fine and all tests pass. - - - - - dc6b1633 by Sylvain Henry at 2020-04-05T16:43:44+02:00 Module renaming: amend previous patch - - - - - eee2f4ae by Ryan Scott at 2020-04-05T09:04:43-07:00 Fix haskell/haddock#1050 by filtering out invisible AppTy arguments This makes the `synifyType` case for `AppTy` more intelligent by taking into consideration the visibilities of each `AppTy` argument and filtering out any invisible arguments, as they aren't intended to be displayed in the source code. (See haskell/haddock#1050 for an example of what can happen if you fail to filter these out.) Along the way, I noticed that a special `synifyType` case for `AppTy t1 (CoercionTy {})` could be consolidated with the case below it, so I took the opportunity to tidy this up. - - - - - 23eb99e8 by Ben Gamari at 2020-04-07T11:19:58-04:00 Merge pull request haskell/haddock#1154 from hsyl20/wip/hsyl20/modules/tc Module renaming: amend previous patch - - - - - 072d994d by Ryan Scott at 2020-04-07T19:32:47-04:00 Make NoExtCon fields strict These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992). - - - - - d8ebf6c8 by Ignat Insarov at 2020-04-09T21:15:01-04:00 Recode Doc to Json. (#1159) * Recode Doc to Json. * More descriptive field labels. - - - - - 52df4b4e by Sylvain Henry at 2020-04-10T12:39:18+02:00 Module renaming - - - - - d9ab8ec8 by Cale Gibbard at 2020-04-14T11:43:34-04:00 Add instance of XCollectPat for DocNameI - - - - - 323d221d by Cale Gibbard at 2020-04-14T11:43:34-04:00 Rename XCollectPat -> CollectPass - - - - - 2df80867 by Alec Theriault at 2020-04-15T07:30:51-07:00 Prune docstrings that are never rendered When first creating a Haddock interface, trim `ifaceDocMap` and `ifaceArgMap` to not include docstrings that can never appear in the final output. Besides checking with GHC which names are exported, we also need to keep all the docs attached to instance declarations (it is much tougher to detect when an instance is fully private). This change means: * slightly smaller interface files (7% reduction on boot libs) * slightly less work to do processing docstrings that aren't used * no warnings in Haddock's output about private docstrings (see haskell/haddock#1070) I've tested manually that this does not affect any of the boot library generated docs (the only change in output was some small re-ordering in a handful of instance lists). This should mean no docstrings have been incorrectly dropped. - - - - - f49c90cc by Alec Theriault at 2020-04-15T07:30:51-07:00 Don't warn about missing links in miminal sigs When renaming the Haddock interface, never emit warnings when renaming a minimal signature. Also added some documention around `renameInterface`. Minimal signatures intentionally include references to potentially un-exported methods (see the discussion in haskell/haddock#330), so it is expected that they will not always have a link destination. On the principle that warnings should always be resolvable, this shouldn't produce a warning. See haskell/haddock#1070. - - - - - a9eda64d by Ben Gamari at 2020-04-17T09:27:35-04:00 Merge pull request haskell/haddock#1160 from hsyl20/wip/hsyl20/modules/systools Module renaming - - - - - f40d7879 by Cale Gibbard at 2020-04-20T11:30:38-04:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ttg-con-pat - - - - - a50e7753 by Ben Gamari at 2020-04-20T11:36:10-04:00 Merge pull request haskell/haddock#1165 from obsidiansystems/wip/ttg-con-pat Trees that Grow refactor (GHC !2553) - - - - - 6a24795c by Alec Theriault at 2020-04-21T08:06:45-07:00 Fallback to `hiDecl` when `extractDecl` fails Sometimes, the declaration being exported is a subdecl (for instance, a record accessor getting exported at the top-level). For these cases, Haddock has to find a way to produce some synthetic sensible top-level declaration. This is done with `extractDecl`. As is shown by haskell/haddock#1067, this is sometimes impossible to do just at a syntactic level (for instance when the subdecl is re-exported). In these cases, the only sensible thing to do is to try to reify a declaration based on a GHC `TyThing` via `hiDecl`. - - - - - eee1a8b7 by Sylvain Henry at 2020-04-24T15:46:05+02:00 Module structure - - - - - 50b9259c by Iñaki at 2020-04-25T18:38:11-04:00 Add support for custom section anchors (#1179) This allows to have stable anchors for groups, even if the set of groups in the documentation is altered. The syntax for setting the anchor of a group is -- * Group name #desiredAnchor# Which will produce an html anchor of the form '#g:desiredAnchor' Co-authored-by: Iñaki García Etxebarria <git at inaki.blueleaf.cc> - - - - - 4003c97a by Ben Gamari at 2020-04-26T09:35:15-04:00 Merge pull request haskell/haddock#1166 from hsyl20/wip/hsyl20/modules/utils Module structure - - - - - 5206ab60 by Sylvain Henry at 2020-04-27T16:47:39+02:00 Renamed UnitInfo fields - - - - - c32c333b by Sylvain Henry at 2020-04-27T17:32:58+02:00 UnitId has been renamed into Unit - - - - - 3e87db64 by Sylvain Henry at 2020-04-27T17:36:00+02:00 Fix for GHC.Unit.* modules - - - - - ae3323a7 by Ben Gamari at 2020-04-29T12:36:37-04:00 Merge pull request haskell/haddock#1183 from hsyl20/wip/hsyl20/unitid Refactoring of Unit code - - - - - b105564a by Artem Pelenitsyn at 2020-05-03T08:14:10+01:00 add dependency on exceptions because GHC.Exception was boiled down (ghc haskell/haddock#18075) - - - - - 9857eff3 by Zubin Duggal at 2020-05-04T18:48:25+01:00 Atomic update of NameCache in readHieFile - - - - - 86bbb226 by Sylvain Henry at 2020-05-14T16:36:27+02:00 Fix after Config module renaming - - - - - a4bbdbc2 by Gert-Jan Bottu at 2020-05-15T22:09:44+02:00 Explicit Specificity Support for Haddock - - - - - 46199daf by Ben Gamari at 2020-05-19T09:59:56-04:00 Merge pull request haskell/haddock#1192 from hsyl20/hsyl20/modules-config Fix after Config module renaming - - - - - f9a9d2ba by Gert-Jan Bottu at 2020-05-20T16:48:38-04:00 Explicit Specificity Support for Haddock - - - - - 55c5b7ea by Ben Gamari at 2020-05-21T00:32:02-04:00 Merge commit 'a8d7e66da4dcc3b242103271875261604be42d6e' into ghc-head - - - - - a566557f by Cale Gibbard at 2020-05-21T16:02:06-04:00 isBootSummary now produces a result of type IsBootInterface - - - - - ea52f905 by Zubin Duggal at 2020-05-24T17:55:48+01:00 update for hiefile-typeclass-info - - - - - 49ba7a67 by Willem Van Onsem at 2020-05-25T12:23:01-04:00 Use floor over round to calculate the percentage (#1195) If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes haskell/haddock#1194 - - - - - c025ebf1 by Ben Gamari at 2020-05-29T14:32:42-04:00 Merge pull request haskell/haddock#1185 from obsidiansystems/boot-disambig isBootSummary now produces a result of type IsBootInterface - - - - - 74ab9415 by Ben Gamari at 2020-05-29T20:23:39-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - b40be944 by Ben Gamari at 2020-06-03T17:02:31-04:00 testsuite: Update expected output for simplified subsumption - - - - - 624be71c by Ryan Scott at 2020-06-05T12:43:23-04:00 Changes for GHC#18191 See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337. - - - - - fbd8f7ce by Sylvain Henry at 2020-06-08T15:31:47+02:00 Fix after unit refactoring - - - - - 743fda4d by Ben Gamari at 2020-06-09T12:09:58-04:00 Merge pull request haskell/haddock#1202 from hsyl20/wip/hsyl20/unitid-ii Fix after unit refactoring - - - - - d07a06a9 by Ryan Scott at 2020-06-13T07:16:55-04:00 Use HsForAllTelescope (GHC#18235) - - - - - 389bb60d by Ben Gamari at 2020-06-13T15:30:52-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - 7a377f5f by Ben Gamari at 2020-06-17T14:53:16-04:00 Merge pull request haskell/haddock#1199 from bgamari/wip/ghc-8.12 haddock: Bounds bumps for GHC 8.12 - - - - - 9fd9e586 by Krzysztof Gogolewski at 2020-06-17T16:09:07-04:00 Adapt Haddock to LinearTypes See ghc/ghc!852. - - - - - 46fe7636 by Ben Gamari at 2020-06-18T14:20:02-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 35a3c9e2 by Zubin Duggal at 2020-06-21T21:19:18+05:30 Use functions exported from HsToCore - - - - - 8abe3928 by Ben Gamari at 2020-06-24T13:53:39-04:00 Merge pull request haskell/haddock#1204 from wz1000/wip/haddock-hstocore Use functions exported from GHC.HsToCore.Docs - - - - - 22f2c937 by Matthías Páll Gissurarson at 2020-06-26T19:07:03+02:00 Adapt Haddock for QualifiedDo - - - - - 3f6208d7 by Vladislav Zavialov at 2020-06-28T14:28:16+03:00 Handle LexicalNegation's ITprefixminus - - - - - 03a19f41 by Sylvain Henry at 2020-07-02T09:37:38+02:00 Rename hsctarget into backend - - - - - ea17ff23 by Andreas Klebinger at 2020-07-02T17:44:18+02:00 Update for UniqFM changes. - - - - - 9872f2f3 by Ben Gamari at 2020-07-09T10:39:19-04:00 Merge pull request haskell/haddock#1209 from AndreasPK/wip/typed_uniqfm Update for UniqFM changes. - - - - - 68f7b668 by Krzysztof Gogolewski at 2020-07-12T18:16:57+02:00 Sync with GHC removing {-# CORE #-} pragma See ghc ticket haskell/haddock#18048 - - - - - eb372681 by Sylvain Henry at 2020-07-20T11:41:30+02:00 Rename hscTarget into backend - - - - - fb7f78bf by Ben Gamari at 2020-07-21T12:15:25-04:00 Merge pull request haskell/haddock#1214 from hsyl20/wip/hsyl20/hadrian/ncg Rename hscTarget into backend - - - - - 1e8f5b56 by Ben Gamari at 2020-07-23T09:11:50-04:00 Merge commit '904dce0cafe0a241dd3ef355775db47fc12f434d' into ghc-head - - - - - d8fd1775 by Zubin Duggal at 2020-07-23T18:46:40+05:30 Update for modular ping pong - - - - - 8416f872 by Ben Gamari at 2020-07-23T09:35:03-04:00 Merge pull request haskell/haddock#1200 from wz1000/wip/wz1000-modular-ping-pong Modular ping pong - - - - - a24a8577 by Ben Gamari at 2020-07-28T15:23:36-04:00 Bump GHC version to 9.0 - - - - - 6a51c9dd by Sylvain Henry at 2020-08-05T18:47:05+02:00 Fix after Outputable refactoring - - - - - c05e1c99 by Ben Gamari at 2020-08-10T14:41:41-04:00 Merge pull request haskell/haddock#1223 from hsyl20/wip/hsyl20/dynflags/exception Fix after Outputable refactoring - - - - - d964f15b by Sylvain Henry at 2020-08-12T11:58:49+02:00 Fix after HomeUnit - - - - - 8e6d5b23 by Ben Gamari at 2020-08-12T14:25:30-04:00 Merge pull request haskell/haddock#1225 from hsyl20/wip/hsyl20/plugins/homeunit Fix after HomeUnit - - - - - 8c7880fe by Sylvain Henry at 2020-08-17T14:13:29+02:00 Remove Ord FastString instance - - - - - 8ea410db by Alex Biehl at 2020-08-19T10:56:32+02:00 Another round of `npm audit fix` (#1228) This should shut down the warnings on Github. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. Last NPM dependency audit happend in d576b2327e2bc117f912fe0a9d595e9ae62614e0 Co-authored-by: Alex Biehl <alex.biehl at target.com> - - - - - 7af6e2a8 by Ben Gamari at 2020-08-31T13:59:34-04:00 Merge pull request haskell/haddock#1226 from hsyl20/wip/hsyl20/fs_ord Remove Ord FastString instance - - - - - ffbc8702 by Alan Zimmerman at 2020-09-07T21:47:41+01:00 Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - a93f1268 by Alan Zimmerman at 2020-09-07T23:11:38+01:00 Merge pull request haskell/haddock#1232 from haskell/wip/T18639-remove-generated-pragma, Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - 1f605d50 by Ben Gamari at 2020-09-14T18:30:01-04:00 Bump GHC version to 9.1 - - - - - 6599df62 by Vladislav Zavialov at 2020-09-18T14:05:15+03:00 Bump base upper bound to 4.16 - - - - - a01b3c43 by Ben Gamari at 2020-09-22T15:41:48-04:00 Update hypsrc-test for QuickLook This appears to be a spurious change. - - - - - e9cc6cac by Vladislav Zavialov at 2020-09-26T21:00:12+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 30e3ca7c by Sylvain Henry at 2020-09-29T11:18:32-04:00 Update for parser (#1234) - - - - - b172f3e3 by Vladislav Zavialov at 2020-09-30T01:01:30+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 0b9c08d3 by Sylvain Henry at 2020-09-30T11:02:33+02:00 Adapt to GHC parser changes - - - - - b9540b7a by Sylvain Henry at 2020-10-12T09:13:38-04:00 Don't pass the HomeUnitId (#1239) - - - - - 34762e80 by HaskellMouse at 2020-10-13T12:58:04+03:00 Changed tests due to unification of `Nat` and `Natural` in the follwing merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583 - - - - - 256f86b6 by Vladislav Zavialov at 2020-10-15T10:48:03+03:00 Add whitespace in: map ($ v) - - - - - 4a3f711b by Alan Zimmerman at 2020-10-19T08:57:27+01:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled - - - - - 072cdd21 by Alan Zimmerman at 2020-10-21T14:48:28-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 9e09a445 by Alan Zimmerman at 2020-10-21T23:53:34-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 636d7de3 by Sylvain Henry at 2020-10-26T14:31:54-04:00 GHC.Driver.Types refactoring (#1242) - - - - - a597f000 by Ryan Scott at 2020-10-29T04:18:05-04:00 Adapt to the removal of Hs{Boxed,Constraint}Tuple See ghc/ghc!4097 and GHC#18723. - - - - - b96660fb by Ryan Scott at 2020-10-30T04:53:05-04:00 Adapt to HsConDecl{H98,GADT}Details split Needed for GHC#18844. - - - - - c287d82c by Ryan Scott at 2020-10-30T19:35:59-04:00 Adapt to HsOuterTyVarBndrs These changes accompany ghc/ghc!4107, which aims to be a fix for haskell/haddock#16762. - - - - - a34c31a1 by Ryan Scott at 2020-11-13T13:38:34-05:00 Adapt to splitPiTysInvisible being renamed to splitInvisPiTys This is a part of !4434, a fix for GHC#18939. - - - - - 66ea459d by Sylvain Henry at 2020-11-16T10:59:30+01:00 Fix after Plugins moved into HscEnv - - - - - 508556d8 by Ben Gamari at 2020-11-18T15:47:40-05:00 Merge pull request haskell/haddock#1253 from hsyl20/wip/hsyl20/plugins/hscenv Fix after Plugins moved into HscEnv - - - - - 620fec1a by Andreas Klebinger at 2020-11-24T20:51:59+01:00 Update for changes in GHC's Pretty - - - - - 01cc13ab by Richard Eisenberg at 2020-11-25T23:18:35-05:00 Avoid GHC#18932. - - - - - 8d29ba21 by Cale Gibbard at 2020-11-25T23:18:35-05:00 Add type arguments to PrefixCon - - - - - 414d5f87 by Sylvain Henry at 2020-11-30T17:06:04+01:00 DynFlags's unit fields moved to HscEnv - - - - - e356668c by Ben Gamari at 2020-11-30T11:11:37-05:00 Merge pull request haskell/haddock#1258 from hsyl20/wip/hsyl20/hscenv/unitstate Unit fields moved from DynFlags to HscEnv - - - - - 7cf552f1 by Ben Gamari at 2020-12-03T10:31:27-05:00 Merge pull request haskell/haddock#1257 from AndreasPK/wip/andreask/opt_dumps Update for changes in GHC's Pretty - - - - - fc0871c3 by Veronika Romashkina at 2020-12-08T16:35:33+01:00 Fix docs links from Darcs to GitHub in intro (#1262) - - - - - 7059e808 by Veronika Romashkina at 2020-12-08T16:36:16+01:00 Use gender neutral word in docs (#1260) - - - - - 1b16e5ee by Maximilian Tagher at 2020-12-08T16:40:03+01:00 Allow scrolling search results (#1235) Closes https://github.com/haskell/haddock/issues/1231 - - - - - 8a118c01 by dependabot[bot] at 2020-12-08T16:40:25+01:00 Bump bl from 1.2.2 to 1.2.3 in /haddock-api/resources/html (#1255) Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - c89ff587 by Xia Li-yao at 2020-12-08T16:42:17+01:00 Allow more characters in anchor following module reference (#1220) - - - - - 14af7d64 by Xia Li-yao at 2020-12-08T16:43:05+01:00 Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243) * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt at mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem at users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard at tweag.io> Co-authored-by: Pepe Iborra <pepeiborra at gmail.com> - - - - - 89e3af13 by tomjaguarpaw at 2020-12-08T18:00:04+01:00 Enable two warnings (#1245) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - c3320f8d by Willem Van Onsem at 2020-12-08T18:26:55+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 685df308 by Alex Biehl at 2020-12-08T20:06:26+01:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - be3ec3c0 by Alex Biehl at 2020-12-08T20:06:26+01:00 Import intercalate - - - - - 32c33912 by Matthías Páll Gissurarson at 2020-12-08T21:15:30+01:00 Adapt Haddock for QualifiedDo - - - - - 31696088 by Alex Biehl at 2020-12-08T22:06:02+01:00 Fix haddock-library tests - - - - - fbc0998a by Alex Biehl at 2020-12-08T23:08:23+01:00 Move to GitHub CI (#1266) * Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell at v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up - - - - - 5b946b9a by tomjaguarpaw at 2020-12-10T19:01:41+01:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - bc5a408f by dependabot[bot] at 2020-12-10T19:02:16+01:00 Bump ini from 1.3.5 to 1.3.7 in /haddock-api/resources/html (#1269) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - d02995f1 by Andrew Martin at 2020-12-14T16:48:40-05:00 Update for boxed rep - - - - - a381aeff by Ben Gamari at 2020-12-15T15:13:30-05:00 Revert "Enable two warnings (#1245) (#1268)" As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce. - - - - - a63c0a9e by Ben Gamari at 2020-12-15T15:17:59-05:00 Revert "Update for boxed rep" This reverts commit 4ffb30d8b637ccebecc81ce610f0af451ac8088d. - - - - - 53bfbb29 by Ben Gamari at 2020-12-15T15:37:24-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - bae76a30 by Ben Gamari at 2020-12-16T02:44:42+00:00 Update output for nullary TyConApp optimisation (ghc/ghc!2952) - - - - - 4b733b57 by Krzysztof Gogolewski at 2020-12-16T20:03:14+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. - - - - - ee463bd3 by Ryan Scott at 2020-12-16T16:55:23-05:00 Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonym Needed for !4417, the fix for GHC#15706 and GHC#18914. - - - - - ed0b02f8 by tomjaguarpaw at 2020-12-19T10:17:19+00:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - d80bf8f5 by Sylvain Henry at 2020-12-21T10:09:25+01:00 Fix after binder collect changes - - - - - bf4c9d32 by Adam Gundry at 2020-12-23T21:35:01+00:00 Adapt to changes to GlobalRdrElt and AvailInfo Needed for ghc/ghc!4467 - - - - - 37736c4c by John Ericson at 2020-12-28T12:27:02-05:00 Support a new ghc --make node type for parallel backpack upsweep - - - - - 717bdeac by Vladislav Zavialov at 2020-12-29T10:50:02+03:00 Inline and fix getGADTConTypeG The getGADTConTypeG used HsRecTy, which is at odds with GHC issue haskell/haddock#18782. I noticed that getGADTConTypeG was only used in the Hoogle backend. Interestingly, when handling H98 constructors, Hoogle converts RecCon to PrefixCon (see Haddock.Backends.Hoogle.ppCtor). So I changed getGADTConTypeG to handle RecConGADT in the same manner as PrefixConGADT, and after this simplification moved it into the 'where' clause of ppCtor, to the only place where it is used. The practical effect of this change is as follows. Consider this example: data TestH98 = T98 { bar::Int } data TestGADT where TG :: { foo :: Int } -> TestGADT Before this patch, haddock --hoogle used to produce: T98 :: Int -> TestH98 [TG] :: {foo :: Int} -> TestGADT Notice how the record syntax was discarded in T98 but not TG. With this patch, we always produce signatures without record syntax: T98 :: Int -> TestH98 [TG] :: Int -> TestGADT I suspect this might also be a bugfix, as currently Hoogle doesn't seem to render GADT record constructors properly. - - - - - cb1b8c56 by Andreas Abel at 2020-12-30T21:12:37+01:00 Build instructions: haddock-library and -api first! - - - - - b947f6ad by Ben Gamari at 2020-12-31T13:04:19-05:00 Merge pull request haskell/haddock#1281 from obsidiansystems/wip/backpack-j Changes to support -j with backpack - - - - - 120e1cfd by Hécate Moonlight at 2021-01-04T19:54:58+01:00 Merge pull request haskell/haddock#1282 from andreasabel/master Build instructions: haddock-library and -api first! - - - - - fd45e41a by Ben Gamari at 2021-01-05T16:14:31-05:00 Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0 - - - - - b471bdec by Ben Gamari at 2021-01-05T16:23:02-05:00 Merge commit '1e56f63c3197e7ca1c1e506e083c2bad25d08793' into ghc-9.0 - - - - - 81cdbc41 by Alex Biehl at 2021-01-09T12:14:41+01:00 Prepare Haddock for being a GHC Plugin - - - - - b646d952 by Alex Biehl at 2021-01-09T12:14:41+01:00 Make Haddock a GHC Plugin - - - - - cc044674 by Alex Biehl at 2021-01-09T12:14:41+01:00 Add -j[n] CLI param to Haddock executable It translates to `--ghcopt=-j[n]` - - - - - 84a04073 by Alex Biehl at 2021-01-09T12:14:41+01:00 Abstract Monad for interface creation I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName. - - - - - 5be2c4f7 by Alex Biehl at 2021-01-09T12:14:41+01:00 Accept tests - - - - - 8cefee9d by Alex Biehl at 2021-01-09T16:10:47+01:00 Add missing dependency for mtl - - - - - 3681f919 by Ben Gamari at 2021-01-13T18:39:25-05:00 Merge remote-tracking branch 'origin/ghc-9.0' into ghc-head - - - - - 33c6b152 by Hécate Moonlight at 2021-01-14T16:04:20+01:00 Merge pull request haskell/haddock#1273 from hsyl20/wip/hsyl20/arrows Fix after binder collect changes - - - - - 70d13e8e by Joachim Breitner at 2021-01-22T19:03:45+01:00 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) - - - - - 7d6dd57a by John Ericson at 2021-01-22T22:02:02+00:00 Add `NoGhcTc` instance now that it's not closed - - - - - e5fdaf0a by Alan Zimmerman at 2021-01-23T22:57:44+00:00 Merge pull request haskell/haddock#1293 from obsidiansystems/wip/fix-18936 Add `NoGhcTc` instance now that it's not closed - - - - - 989a1e05 by Oleg Grenrus at 2021-01-24T16:11:46+03:00 Add import list to Data.List - - - - - 368e144a by Ben Gamari at 2021-01-28T22:15:48+01:00 Adapt to "Make PatSyn immutable" - - - - - abe66c21 by Alfredo Di Napoli at 2021-02-01T08:05:35+01:00 Rename pprLogErrMsg to new name - - - - - e600e75c by Hécate Moonlight at 2021-02-05T14:53:00+01:00 Move CI to ghc-9.0 - - - - - dd492961 by Vladislav Zavialov at 2021-02-05T14:53:00+01:00 Update cabal.project and README build instructions - - - - - 31bd292a by Hécate Moonlight at 2021-02-05T15:03:56+01:00 Merge pull request haskell/haddock#1296 from Kleidukos/ghc-9.0 Merge the late additions to ghc-8.10 into ghc-9.0 - - - - - 6388989e by Vladislav Zavialov at 2021-02-05T17:41:57+03:00 Cleanup: fix build warnings - - - - - f99407ef by Daniel Rogozin at 2021-02-05T18:11:48+03:00 type level characters support for haddock (required for haskell/haddock#11342) - - - - - d8c6b26f by Hécate Moonlight at 2021-02-05T17:44:50+01:00 Add a CONTRIBUTING.md file - - - - - 6a01ad98 by Hécate Moonlight at 2021-02-05T17:58:16+01:00 Merge pull request haskell/haddock#1312 from Kleidukos/proper-branch-etiquette Add a CONTRIBUTING.md file - - - - - 955eecc4 by Vladislav Zavialov at 2021-02-05T20:29:00+03:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into ghc-head - - - - - 47b3d6ab by Hécate Moonlight at 2021-02-05T19:09:38+01:00 Amend the CONTRIBUTING.md file - - - - - 23de6137 by Hécate Moonlight at 2021-02-05T19:16:49+01:00 Merge pull request haskell/haddock#1313 from Kleidukos/amend-contributing Amend the CONTRIBUTING.md file - - - - - 69026b59 by Krzysztof Gogolewski at 2021-02-05T23:05:56+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb) - - - - - ea026b78 by Oleg Grenrus at 2021-02-06T17:14:45+01:00 Add import list to Data.List - - - - - 5204326f by Hécate Moonlight at 2021-02-06T17:15:44+01:00 Merge pull request haskell/haddock#1316 from Kleidukos/explicit-imports-to-data-list Add import list to Data.List - - - - - 1f4d2136 by Ben Gamari at 2021-02-06T11:53:31-05:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge - - - - - 13f0d09a by Ben Gamari at 2021-02-06T11:53:45-05:00 Fix partial record selector warning - - - - - 5c115f7e by Ben Gamari at 2021-02-06T11:55:52-05:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into wip/ghc-head-merge - - - - - b6fd8b75 by Ben Gamari at 2021-02-06T12:01:31-05:00 Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-merge - - - - - a967194c by Ben Gamari at 2021-02-06T18:30:35-05:00 Merge branch 'wip/ghc-head-merge' into ghc-head - - - - - 1f4c3a91 by MorrowM at 2021-02-07T01:52:33+02:00 Fix search div not scrolling - - - - - 684b1287 by Iñaki García Etxebarria at 2021-02-07T16:13:04+01:00 Add support for labeled module references Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label". - - - - - bdb55a5d by Hécate Moonlight at 2021-02-07T16:18:10+01:00 Merge pull request haskell/haddock#1319 from alexbiehl/alex/compat Backward compat: Add support for labeled module references - - - - - 6ca70991 by Hécate Moonlight at 2021-02-07T16:21:29+01:00 Merge pull request haskell/haddock#1314 from tweag/show-linear-backport Backport haskell/haddock#1238 (linear types) to ghc-9.0 - - - - - d9d73298 by Alex Biehl at 2021-02-07T17:46:25+01:00 Remove dubious parseModLink Instead construct the ModLink value directly when parsing. - - - - - 33b4d020 by Hécate Moonlight at 2021-02-07T17:52:05+01:00 Merge pull request haskell/haddock#1320 from haskell/alex/fix Remove dubious parseModLink - - - - - 54211316 by Hécate Moonlight at 2021-02-07T18:12:07+01:00 Merge pull request haskell/haddock#1318 from MorrowM/ghc-9.0 Fix search div not scrolling - - - - - 19db679e by alexbiehl-gc at 2021-02-07T18:14:46+01:00 Merge pull request haskell/haddock#1317 from bgamari/wip/ghc-head-merge Merge ghc-8.10 into ghc-head - - - - - 6bc1e9e4 by Willem Van Onsem at 2021-02-07T18:25:30+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - c8537cf8 by alexbiehl-gc at 2021-02-07T18:30:40+01:00 Merge pull request haskell/haddock#1322 from haskell/alex/forward-port simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 2d47ae4e by alexbiehl-gc at 2021-02-07T18:39:59+01:00 Merge branch 'ghc-head' into ghc-9.0 - - - - - 849e4733 by Hécate Moonlight at 2021-02-07T18:43:19+01:00 Merge pull request haskell/haddock#1321 from Kleidukos/ghc-9.0 Merge ghc-9.0 into ghc-head - - - - - ee6095d7 by Sylvain Henry at 2021-02-08T11:36:38+01:00 Update for Logger - - - - - 4ad688c9 by Alex Biehl at 2021-02-08T18:11:24+01:00 Merge pull request haskell/haddock#1310 from hsyl20/wip/hsyl20/logger2 Logger refactoring - - - - - 922a9e0e by Ben Gamari at 2021-02-08T12:54:33-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - 991649d2 by Sylvain Henry at 2021-02-09T10:55:17+01:00 Fix to build with HEAD - - - - - a8348dc2 by Hécate Moonlight at 2021-02-09T10:58:51+01:00 Merge pull request haskell/haddock#1327 from hsyl20/wip/hsyl20/logger2 Fix to build with HEAD - - - - - 0abdbca6 by Fendor at 2021-02-09T20:06:15+01:00 Add UnitId to Target record - - - - - d5790a0e by Alex Biehl at 2021-02-11T10:32:32+01:00 Stable sort for (data/newtype) instances - - - - - 8e6036f5 by Alex Biehl at 2021-02-11T10:32:32+01:00 Also make TyLit deterministic - - - - - f76d2945 by Hécate Moonlight at 2021-02-11T11:00:31+01:00 Merge pull request haskell/haddock#1329 from hsyl20/hsyl20/stabe_iface Stable sort for instances - - - - - 5e0469ea by Oleg Grenrus at 2021-02-14T15:28:15+02:00 Add import list to Data.List in Haddock.Interface.Create - - - - - fa57cd24 by Hécate Moonlight at 2021-02-14T17:19:27+01:00 Merge pull request haskell/haddock#1331 from phadej/more-explicit-data-list-imports Add import list to Data.List in Haddock.Interface.Create - - - - - f0cd629c by Hécate Moonlight at 2021-02-21T00:22:01+01:00 Merge pull request haskell/haddock#1311 from fendor/wip/add-targetUnitId-to-target Add UnitId to Target record - - - - - 674ef723 by Joachim Breitner at 2021-02-22T10:39:18+01:00 html-test: Always set language from ghc-9.2 on, the “default” langauge of GHC is expected to change more wildly. To prepare for that (and unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4853), this sets the language for all the test files to `Haskell2010`. This should insolate this test suite against changes to the default. Cherry-picked from https://github.com/haskell/haddock/pull/1341 - - - - - f072d623 by Hécate Moonlight at 2021-02-22T10:56:51+01:00 Merge pull request haskell/haddock#1342 from nomeata/joachim/haskell2010-in-tests-ghc-head html-test: Always set language - - - - - caebbfca by Hécate Moonlight at 2021-02-22T11:53:07+01:00 Clean-up of Interface and Interface.Create's imports and pragmata - - - - - f6caa89d by Hécate Moonlight at 2021-02-22T11:54:58+01:00 Merge pull request haskell/haddock#1345 from Kleidukos/head/fix-interface-imports [ghc-head] Clean-up of Interface and Interface.Create's imports and pragmata - - - - - 7395c9cb by Hécate Moonlight at 2021-02-22T18:44:57+01:00 Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 6e9fb5d5 by Hécate Moonlight at 2021-02-22T18:45:28+01:00 Merge pull request haskell/haddock#1348 from Kleidukos/head/explicit-imports-interface Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 9198b118 by Alan Zimmerman at 2021-02-22T20:04:24+00:00 Context becomes a Maybe in the GHC AST This prevents noLoc's appearing in the ParsedSource. Match the change in GHC. - - - - - 0af20f64 by Hécate Moonlight at 2021-02-23T12:36:12+01:00 Fix the call-site of guessTarget in Interface.hs Explicit the imports from GHC.HsToCore.Docs - - - - - b7886885 by Hécate Moonlight at 2021-02-23T12:37:54+01:00 Merge pull request haskell/haddock#1349 from Kleidukos/fix-interface-guesstarget-call Fix the call-site of guessTarget in Interface.hs - - - - - 9cf041ba by Sylvain Henry at 2021-02-24T11:08:20+01:00 Fix haddockHypsrcTest output in ghc-head - - - - - b194182a by Hécate Moonlight at 2021-02-24T11:12:36+01:00 Merge pull request haskell/haddock#1351 from hsyl20/wip/hsyl20/fix-head Fix haddockHypsrcTest output in ghc-head - - - - - 3ce8b375 by Shayne Fletcher at 2021-03-06T09:55:03-05:00 Add ITproj to parser - - - - - d2abf762 by Ben Gamari at 2021-03-06T19:26:49-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a0f6047d by Andrew Martin at 2021-03-07T11:25:23-05:00 Update for boxed rep - - - - - 6f63c99e by Ben Gamari at 2021-03-10T13:20:21-05:00 Update for "FastString: Use FastMutInt instead of IORef Int" - - - - - e13f01df by Luke Lau at 2021-03-10T15:38:40-05:00 Implement template-haskell's putDoc This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int - - - - - 89263d94 by Alan Zimmerman at 2021-03-15T17:15:26+00:00 Match changes in GHC AST for in-tree API Annotations As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418 - - - - - 28db1934 by Alan Zimmerman at 2021-03-15T20:40:09+00:00 Change some type family test results. It is not clear to me whether the original was printing incorrectly (since we did not have the TopLevel flag before now), or if this behaviour is expected. For the time being I am assuming the former. - - - - - 7c11c989 by Sylvain Henry at 2021-03-22T10:05:19+01:00 Fix after NameCache changes - - - - - addbde15 by Sylvain Henry at 2021-03-22T10:05:19+01:00 NameCache doesn't store a UniqSupply anymore - - - - - 15ec6cec by Ben Gamari at 2021-03-22T17:53:44-04:00 Bump GHC version to 9.2 - - - - - dbd6aa63 by Hécate Moonlight at 2021-03-24T14:28:36+01:00 Merge pull request haskell/haddock#1365 from hsyl20/wip/hsyl20/iface1 NameCache refactoring - - - - - 2d32da7e by Oleg Grenrus at 2021-03-27T01:12:00+02:00 Specialization of Data.List - - - - - 32b84fa6 by Fendor at 2021-03-27T10:50:17+01:00 Add UnitId to Target record This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time. - - - - - 54bf9f0e by Hécate Moonlight at 2021-03-28T14:08:35+02:00 Merge pull request haskell/haddock#1368 from fendor/target-unit-id-revert Add UnitId to Target record - - - - - 7dea168a by Alan Zimmerman at 2021-03-29T08:45:52+01:00 EPA : Rename ApiAnn to EpAnn - - - - - 72967f65 by Alfredo Di Napoli at 2021-03-29T09:47:01+02:00 pprError changed name in GHC - - - - - 4bc61035 by Alan Zimmerman at 2021-03-29T16:16:27-04:00 EPA : Rename ApiAnn to EpAnn - - - - - 108d031d by Ben Gamari at 2021-03-29T18:49:36-04:00 Merge commit '36418c4f70d7d2b179a77925b3ad5caedb08c9b5' into HEAD - - - - - 1444f700 by Ben Gamari at 2021-03-31T09:18:39-04:00 Merge pull request haskell/haddock#1370 from adinapoli/wip/adinapoli-diag-reason-severity Rename pprError to mkParserErr - - - - - d3087b79 by Ben Gamari at 2021-03-31T11:34:17-04:00 Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head - - - - - 170b79e9 by Ben Gamari at 2021-03-31T12:24:56-04:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - db0d6bae by Ben Gamari at 2021-04-10T09:34:35-04:00 Bump GHC version to 9.3 - - - - - a9f2c421 by Alan Zimmerman at 2021-04-19T18:26:46-04:00 Update for EPA changes in GHC (cherry picked from commit cafb48118f7c111020663776845897e225607b41) - - - - - 1ee4b7c7 by Sylvain Henry at 2021-05-11T10:00:06+02:00 Removal of HsVersions.h (#1388) * Update for EPA changes in GHC * Account for HsVersions.h removal Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 79e819e9 by Hécate Moonlight at 2021-05-11T10:14:47+02:00 Revert "Removal of HsVersions.h (#1388)" This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6. - - - - - 3dbd3f8b by Alan Zimmerman at 2021-05-11T10:15:17+02:00 Update for EPA changes in GHC - - - - - 2ce80c17 by Sylvain Henry at 2021-05-11T10:15:19+02:00 Account for HsVersions.h removal - - - - - 00e4c918 by Christiaan Baaij at 2021-05-13T08:21:56+02:00 Add Haddock support for the OPAQUE pragma (#1380) - - - - - 8f9049b2 by Hécate Moonlight at 2021-05-13T08:40:22+02:00 fixup! Use GHC 9.2 in CI runner - - - - - 27ddec38 by Alan Zimmerman at 2021-05-13T22:51:20+01:00 EPA: match changes from GHC T19834 - - - - - f8a1d714 by Felix Yan at 2021-05-14T17:10:04+02:00 Allow hspec 2.8 (#1389) All tests are passing. - - - - - df44453b by Divam Narula at 2021-05-20T15:42:42+02:00 Update ref, the variables got renamed. (#1391) This is due to ghc/ghc!5555 which caused a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used. - - - - - e46bfc87 by Alan Zimmerman at 2021-05-20T19:05:09+01:00 Remove Maybe from HsQualTy Match changes in GHC for haskell/haddock#19845 - - - - - 79bd7b62 by Shayne Fletcher at 2021-05-22T08:20:39+10:00 FieldOcc: rename extFieldOcc to foExt - - - - - 6ed68c74 by Ben Gamari at 2021-05-21T22:29:30-04:00 Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head - - - - - f9a02d34 by Alfredo Di Napoli at 2021-05-24T13:53:00+02:00 New Parser diagnostics interface - - - - - 392807d0 by Ben Gamari at 2021-05-24T09:57:40-04:00 Merge pull request haskell/haddock#1394 from adinapoli/wip/adinapoli-align-ps-messages Align Haddock to use the new Parser diagnostics interface - - - - - 33023cd8 by Ben Gamari at 2021-05-24T11:19:16-04:00 Revert "Add Haddock support for the OPAQUE pragma (#1380)" This reverts commit a1337c599ef7720b0482a25c55f11794112496dc. The GHC patch associated with this change is not yet ready to be merged. - - - - - 8c005af7 by Ben Simms at 2021-05-28T07:56:20+02:00 CI configuration for ghc-head (#1395) - - - - - 1e947612 by Hécate Moonlight at 2021-05-28T12:27:35+02:00 Use GHC 9.2 in CI runner (#1378) - - - - - e6fa10ab by CGenie at 2021-05-31T09:02:13+02:00 Add page about common errors (#1396) * Update index.rst Common errors page * Create common-errors.rst * Update common-errors.rst * Use GHC 9.2 in CI runner (#1378) * [haddock-api] remove .hspec-failures Co-authored-by: Hécate Moonlight <Kleidukos at users.noreply.github.com> - - - - - abc72a8d by Sylvain Henry at 2021-06-01T10:02:06+02:00 Adapt Haddock to Logger and Parser changes (#1399) - - - - - 91373656 by Zubin Duggal at 2021-06-01T20:45:10+02:00 Update haddockHypSrc tests since we now compute slighly more type info (#1397) - - - - - ed712822 by Marcin Szamotulski at 2021-06-02T08:54:33+02:00 Added myself to contributors - - - - - 49fdbcb7 by Marcin Szamotulski at 2021-06-02T08:57:24+02:00 Document multi component support - - - - - 9ddc8d7d by Hécate Moonlight at 2021-06-02T09:35:55+02:00 Merge pull request haskell/haddock#1379 from coot/coot/document-multi-component-support Document multi component support - - - - - 585b5c5e by Ben Simms at 2021-06-02T19:46:54+02:00 Update CONTRIBUTING.md (#1402) - - - - - 1df4a605 by Ben Simms at 2021-06-02T19:47:14+02:00 Update CONTRIBUTING.md (#1403) - - - - - 58ea43d2 by sheaf at 2021-06-02T22:09:06+02:00 Update Haddock Bug873 to account for renaming - - - - - c5d0ab23 by Vladislav Zavialov at 2021-06-10T13:35:42+03:00 HsToken in FunTy, RecConGADT - - - - - 1ae2f40c by Hécate Moonlight at 2021-06-11T11:19:09+02:00 Update the CI badges - - - - - 6fdc4de2 by Sylvain Henry at 2021-06-28T19:21:17+02:00 Fix mkParserOpts (#1411) - - - - - 18201670 by Alfredo Di Napoli at 2021-07-05T07:55:12+02:00 Rename getErrorMessages Lexer import This commit renames the Lexer import in `Hyperlinker.Parser` from `getErrorMessages` to `getPsErrorMessages` to eliminate the ambiguity with the `getErrorMessages` function defined in `GHC.Types.Error`. - - - - - 23173ca3 by Ben Gamari at 2021-07-07T11:31:44-04:00 Merge pull request haskell/haddock#1413 from adinapoli/wip/adinapoli-issue-19920 Rename getErrorMessages Lexer import - - - - - b3dc4ed8 by Alan Zimmerman at 2021-07-28T22:30:59+01:00 EPA: match changes from GHC T19834 (cherry picked from commit 2fec1b44e0ee7e263286709aa528b4ecb99ac6c2) - - - - - 5f177278 by Ben Gamari at 2021-08-06T01:17:37-04:00 Merge commit '2a966c8ca37' into HEAD - - - - - cdd81d08 by Marcin Szamotulski at 2021-08-08T17:19:06+02:00 coot/multiple packages (ghc-9.2) (#1418) - - - - - be0d71f1 by Marcin Szamotulski at 2021-08-16T08:46:03+02:00 coot/multiple package (ghc-head) (#1419) * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".". - - - - - 3b09dbdf by Hécate Moonlight at 2021-10-07T23:26:03+02:00 Update GHC 9.2 to latest pre-release in CI - - - - - 7ac55417 by Zubin Duggal at 2021-10-11T12:10:19+02:00 Enable Haddock tests in GHC windows CI (#1428) * testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC - - - - - 1cb81f25 by Andrew Lelechenko at 2021-10-12T15:23:19+02:00 haddock-library does not depend on bytestring or transformers (#1426) - - - - - a890b9aa by sheaf at 2021-10-15T22:19:42+02:00 update haddockHypsrcTest for GHC MR !6705 (#1430) - - - - - 42a55c6c by Sylvain Henry at 2021-10-15T22:20:10+02:00 Fix after PkgQual refactoring (#1429) - - - - - 91659238 by Alan Zimmerman at 2021-10-28T18:57:10+01:00 Update for changes in GHC for branch wip/az/no-srcspan-anno-instances - - - - - acf23e60 by Vladislav Zavialov at 2021-11-05T02:09:47+03:00 Do not use forall as an identifier See GHC ticket haskell/haddock#20609 - - - - - c565db0e by Krzysztof Gogolewski at 2021-11-27T02:42:35+01:00 Update after NoExtCon -> DataConCantHappen rename - - - - - b5f55590 by Artem Pelenitsyn at 2021-11-27T11:14:17+01:00 fix CI for 9.2 (#1436) - - - - - 25cd621e by Matthew Pickering at 2021-12-02T11:46:54+00:00 Update html-test for Data.List revert - - - - - 1d5ff85f by malteneuss at 2021-12-15T07:56:55+01:00 Add hint about inline link issue (#1444) - - - - - 791fde81 by Sylvain Henry at 2021-12-16T09:29:51+01:00 Bump ghc-head (#1445) * Update after NoExtCon -> DataConCantHappen rename * Update html-test for Data.List revert * Fix for new Plugins datatype Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 44236317 by Sylvain Henry at 2021-12-17T09:39:00+01:00 Fix for new Plugins datatype - - - - - 80ada0fa by Hécate Moonlight at 2021-12-17T17:28:48+01:00 Remove ghc-head workflow (#1446) Contributions of GHC glue code are now done on the GHC gitlab, not in the GitHub repo anymore. - - - - - 49e171cd by Matthew Pickering at 2021-12-28T09:47:09+00:00 Remove use of ExtendedModSummary - - - - - 0e91b5ea by askeblad at 2022-01-04T09:18:35+01:00 update URLs - - - - - 9f13c212 by Hécate Moonlight at 2022-02-25T10:19:46+01:00 Fix solver for GHC 9.2 - - - - - 386751a1 by Meng Weng Wong at 2022-02-25T19:19:11+01:00 IDoc link has bitrotted; replaced with web.archive.org cache. (#1454) - - - - - d877cbe6 by Hécate Moonlight at 2022-02-25T19:21:58+01:00 Fix haddock user guide (#1456) - - - - - cc47f036 by Andrew Lelechenko at 2022-03-04T17:29:36+01:00 Allow text-2.0 in haddock-library (#1459) - - - - - 7b3685a3 by malteneuss at 2022-03-07T19:27:24+01:00 Add multi-line style hint to style section (#1460) - - - - - c51088b8 by John Ericson at 2022-03-11T16:46:26+01:00 Fix CollectPass instance to match TTG refactor Companion to GHC !7614 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7614) - - - - - b882195b by Vladislav Zavialov at 2022-03-14T20:32:30+01:00 Link to (~) - - - - - 877349b8 by Christiaan Baaij at 2022-03-16T09:20:43+01:00 Add Haddock support for the OPAQUE pragma - - - - - 0ea22721 by askeblad at 2022-03-16T09:44:27+01:00 typos (#1464) - - - - - a6d13da1 by Matthew Pickering at 2022-03-22T13:41:17+00:00 Minimum changes needed for compilation with hi-haddock With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC. - - - - - e7ac9129 by Matthew Pickering at 2022-03-22T21:17:50+00:00 Update test output - - - - - 6d916214 by Matthew Pickering at 2022-03-24T15:06:26+00:00 Merge branch 'wip/opaque_pragma' into 'ghc-head' Add Haddock support for the OPAQUE pragma See merge request ghc/haddock!2 - - - - - 42208183 by Steve Hart at 2022-03-25T20:43:50+01:00 Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. - - - - - 9676fd79 by Steve Hart at 2022-03-25T21:33:34+01:00 Make links in Synopsis functional again (#1458) Commit e41c1cbe9f0476997eac7b4a3f17cbc6b2262faf added a call to e.preventDefault() when handling click events that reach a toggle element. This prevents the browser from following hyperlinks within the Synopsis section when they are clicked by a user. This commit restores functioning hyperlinks within the Synopsis section by removing the call to e.preventDefault(), as it does not appear to be necessary, and removing it increases the flexibility of the details-helper code. - - - - - d1edd637 by sheaf at 2022-04-01T12:02:02+02:00 Keep track of promotion ticks in HsOpTy Keeping track of promotion ticks in HsOpTy allows us to properly pretty-print promoted constructors such as lists. - - - - - 9dcb2dfc by Jakob Brünker at 2022-04-01T15:46:22+00:00 Add support for \cases See merge request ghc/ghc!7873 - - - - - b0412ee5 by askeblad at 2022-04-06T17:47:57+02:00 spelling errors (#1471) - - - - - 6b18829b by Vladislav Zavialov at 2022-04-06T18:53:58+02:00 Rename [] to List - - - - - 2d046691 by Vladislav Zavialov at 2022-04-07T20:25:54+03:00 HsToken ConDeclGADT con_dcolon - - - - - 90b43da4 by Steve Hart at 2022-04-12T13:29:46+02:00 Parse Markdown links at beginning of line within a paragraph (#1470) * Catch Markdown links at beginning of line within paragraph Per Issue haskell/haddock#774, Markdown links were being parsed as ordinary text when they occurred at the beginning of a line other than the first line of the paragraph. This occurred because the parser was not interpreting a left square bracket as a special character that could delimit special markup. A space character was considered a special character, so, if a space occurred at the beginning of the new line, then the parser would interpret the space by itself and then continue parsing, thereby catching the Markdown link. '\n' was not treated as a special character, so the parser did not catch a Markdown link that may have followed. Note that this will allow for Markdown links that are not surrounded by spaces. For example, the following text includes a Markdown link that will be parsed: Hello, world[label](url) This is consistent with how the parser handles other types of markup. * Remove obsolete documentation hint Commit 6b9aeafddf20efc65d3725c16e3fc43a20aac343 should eliminate the need for the workaround suggested in the documentation. - - - - - 5b08312d by Hécate Moonlight at 2022-04-12T13:36:38+02:00 Force ghc-9.2 in the cabal.project - - - - - 0d0ea349 by dependabot[bot] at 2022-04-12T13:57:41+02:00 Bump path-parse from 1.0.5 to 1.0.7 in /haddock-api/resources/html (#1469) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 2b9fc65e by dependabot[bot] at 2022-04-12T13:57:54+02:00 Bump copy-props from 2.0.4 to 2.0.5 in /haddock-api/resources/html (#1468) Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - ea98a6fb by Ben Gamari at 2022-04-23T22:54:37-04:00 Update for GHC 9.4 - - - - - 9e11864f by Ben Gamari at 2022-04-25T16:24:31-04:00 Merge remote-tracking branch 'upstream/ghc-9.2' into ghc-head - - - - - f83cc506 by Ben Gamari at 2022-04-25T17:00:25-04:00 Bump ghc version to 9.5 - - - - - e01c2e7d by Ben Gamari at 2022-04-28T16:19:04-04:00 Revert "Bump ghc-head (#1445)" This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2. This should not have been merged. - - - - - a2b5ee8c by Ben Gamari at 2022-04-28T16:19:24-04:00 Merge commit '2627a86c' into ghc-head - - - - - 0c6fe4f9 by Ben Gamari at 2022-04-29T10:05:54-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-9.4 - - - - - b6e5cb0a by Ben Gamari at 2022-04-29T11:46:06-04:00 Revert "HsToken ConDeclGADT con_dcolon" This reverts commit 24208496649a02d5f87373052c430ea4a97842c5. - - - - - 15a62888 by Ben Gamari at 2022-04-29T15:12:55-04:00 Bump base upper bound - - - - - 165b9031 by Ben Gamari at 2022-04-29T23:58:38-04:00 Update test output - - - - - e0c3e5da by Phil de Joux at 2022-05-02T14:46:38+02:00 Add hlint action .hlint.yaml with ignores & CPP. (#1475) - - - - - ead1158d by Raphael Das Gupta at 2022-05-02T14:46:48+02:00 fix grammar in docs: "can the" → "can be" (#1477) - - - - - cff97944 by Ben Gamari at 2022-05-02T18:38:56-04:00 Allow base-4.17 - - - - - e4ecb201 by Phil de Joux at 2022-05-03T13:14:55+02:00 Remove unused imports that GHC warned about. (#1480) - - - - - 222890b1 by Phil de Joux at 2022-05-03T13:15:46+02:00 Follow hlint suggestion to remove redundant bang. (#1479) - - - - - 058b671f by Phil de Joux at 2022-05-03T13:34:04+02:00 Follow hlint, remove language pragmas in libs. (#1478) - - - - - 0a645049 by Ben Simms at 2022-05-03T14:19:24+02:00 Keep track of ordered list indexes and render them (#1407) * Keep track of ordered list indexes and render them * Rename some identifiers to clarify - - - - - f0433304 by Norman Ramsey at 2022-05-04T15:13:34-04:00 update for changes in GHC API - - - - - 3740cf71 by Emily Martins at 2022-05-06T18:23:48+02:00 Add link to the readthedocs in cabal description to show on hackage. (cherry picked from commit 52e2d40d47295c02d3181aac0c53028e730f1e3b) - - - - - 5d754f1e by Hécate Moonlight at 2022-05-06T18:44:57+02:00 remove Bug873 - - - - - 968fc267 by Hécate Moonlight at 2022-05-06T18:48:28+02:00 Ignore "Use second" HLint suggestion. It increases laziness. - - - - - 02d14e97 by Jade Lovelace at 2022-05-07T17:42:08+02:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` - - - - - b22b87ed by Artem Pelenitsyn at 2022-05-08T16:19:47+02:00 fix parsing trailing quotes in backticked identifiers (#1408) (#1483) - - - - - 80ae107b by Alex Biehl at 2022-05-08T16:37:16+02:00 Fix "Defined by not used" error (cherry picked from commit 6e02a620a26c3a44f98675dd1b93b08070c36c0a) - - - - - 4c838e84 by Hécate Moonlight at 2022-05-08T16:37:16+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - fc9827b4 by Hécate Moonlight at 2022-05-08T16:40:40+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - b153b555 by Xia Li-yao at 2022-05-20T17:52:42+02:00 Hide synopsis from search when hidden (#1486) Fix haskell/haddock#1451 - - - - - f3e38b85 by Marcin Szamotulski at 2022-05-21T23:32:31+02:00 Allow to hide interfaces when rendering multiple components (#1487) This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package. - - - - - f942863b by Marcin Szamotulski at 2022-05-24T08:29:59+02:00 Check if doc-index.json exists before reading it (#1488) - - - - - 31e92982 by Marcin Szamotulski at 2022-05-25T16:22:13+02:00 Version bump 2.26.1 (#1489) * Version bump 2.26.1 We extended format accepted by `--read-interface` option, which requires updating the minor version. * Update documentation of --read-interface option - - - - - 7cc873e0 by sheaf at 2022-05-25T16:42:31+02:00 Updated HaddockHypsrcTest output for record update changes (MR !7981) - - - - - cd196942 by Marcin Szamotulski at 2022-05-25T20:28:47+02:00 Use visibility to decide which interfaces are included in quickjump (#1490) This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision. - - - - - 00c713c5 by Hécate Moonlight at 2022-05-26T17:09:15+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 2f3039f1 by Hécate Moonlight at 2022-05-26T17:10:59+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 63a5650c by romes at 2022-05-31T12:43:22+01:00 TTG: Match new GHC AST - - - - - dd7d1617 by romes at 2022-06-02T16:11:00+01:00 Update for IE changes in !8228 - - - - - c23aaab7 by cydparser at 2022-06-06T08:48:14+02:00 Fix and improve CI (#1495) * Pin GHC version before creating the freeze file * Use newest action versions * Improve caching * Avoid unnecessarily reinstalling GHC * Use GHC 9.2.2 for CI Co-authored-by: Cyd Wise <cwise at tripshot.com> - - - - - c156fa77 by Hécate Moonlight at 2022-06-06T11:59:35+02:00 Add Mergify configuration (#1496) - - - - - 2dba4188 by Hécate Moonlight at 2022-06-06T16:12:50+02:00 Bump haddock's version in cabal file to 2.26.1 (#1497) - - - - - d7d4b8b9 by Marcin Szamotulski at 2022-06-07T06:09:40+00:00 Render module tree per package in the content page (#1492) * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version. - - - - - 77765665 by Mike Pilgrem at 2022-06-12T21:57:19+01:00 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - b0e079b0 by mergify[bot] at 2022-06-13T11:49:37+00:00 Merge pull request haskell/haddock#1108 from mpilgrem/fix783 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - 6c0292b1 by Hécate Moonlight at 2022-06-21T17:21:08+02:00 Update the contribution guide - - - - - e413b9fa by dependabot[bot] at 2022-06-21T23:38:19+02:00 Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 29d0ef70 by romes at 2022-07-06T11:29:39+02:00 TTG: AST Updates for !8308 - - - - - 1bae7c87 by Alan Zimmerman at 2022-07-06T22:50:43+01:00 Match GHC changes for T21805 This brings in a newtype for FieldLabelString - - - - - 6fe8b988 by Phil de Joux at 2022-07-16T20:54:26+00:00 Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. - - - - - 48fb43af by Phil de Joux at 2022-07-19T09:32:55+02:00 Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. - - - - - c1cf1fa7 by Phil de Joux at 2022-07-24T13:45:59+02:00 Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. - - - - - 74777eb2 by Jade Lovelace at 2022-07-29T11:02:41+01:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` (cherry picked from commit ab53ccf089ea703b767581ac14be0f6c78a7678a) - - - - - faa4cfcf by Hécate Moonlight at 2022-07-29T20:31:20+02:00 Merge pull request haskell/haddock#1516 from duog/9-4-backport-fix-hyperlinks Backport 9-4: Fix hyperlinks to external items and modules (#1482) - - - - - 5d2450f3 by Ben Gamari at 2022-08-05T17:41:15-04:00 Merge remote-tracking branch 'origin/ghc-9.4' - - - - - 63954f73 by Ben Gamari at 2022-08-05T19:08:36-04:00 Clean up build and testsuite for GHC 9.4 - - - - - d4568cb8 by Hécate Moonlight at 2022-08-05T19:10:49-04:00 Bump the versions - - - - - 505583a4 by Ben Gamari at 2022-08-06T13:58:27-04:00 Merge pull request haskell/haddock#1518 from bgamari/wip/ghc-9.4-merge Merge GHC 9.4 into `main` - - - - - 5706f6a4 by Ben Gamari at 2022-08-06T22:57:21-04:00 html-test: Testsuite changes for GHC 9.4.1 - - - - - 5f2a45a2 by Ben Gamari at 2022-08-15T14:33:05-04:00 doc: Fix a few minor ReST issues Sphinx was complaining about too-short title underlines. - - - - - 220e6410 by Ben Gamari at 2022-08-15T14:41:24-04:00 Merge branch 'main' into ghc-head - - - - - fbeb1b02 by Ben Gamari at 2022-08-15T14:45:16-04:00 Updates for GHC 9.5 - - - - - eee562eb by Vladislav Zavialov at 2022-08-15T14:46:13-04:00 HsToken ConDeclGADT con_dcolon - - - - - c5f073db by Ben Gamari at 2022-08-15T16:55:35-04:00 Updates for GHC 9.5 - - - - - 3f7ab242 by Vladislav Zavialov at 2022-08-15T16:55:35-04:00 HsToken ConDeclGADT con_dcolon - - - - - a18e473d by Ben Gamari at 2022-08-16T08:35:19-04:00 Merge branch 'wip/ghc-head-bump' into ghc-head - - - - - af0ff3a4 by M Farkas-Dyck at 2022-09-15T21:16:05+00:00 Disuse `mapLoc`. - - - - - a748fc38 by Matthew Farkas-Dyck at 2022-09-17T10:44:18+00:00 Scrub partiality about `NewOrData`. - - - - - 2758fb6c by John Ericson at 2022-09-18T03:27:37+02:00 Test output changed because of change to `base` Spooky, but I guess that is intended? - - - - - a7eec128 by Torsten Schmits at 2022-09-21T11:06:55+02:00 update tests for the move of tuples to GHC.Tuple.Prim - - - - - 461e7b9d by Ross Paterson at 2022-09-24T22:01:25+00:00 match implementation of GHC proposal haskell/haddock#106 (Define Kinds Without Promotion) - - - - - f7fd77ef by sheaf at 2022-10-17T14:53:01+02:00 Update Haddock for GHC MR !8563 (configuration of diagnostics) - - - - - 3d3e85ab by Vladislav Zavialov at 2022-10-22T23:04:06+03:00 Class layout info - - - - - cbde4cb0 by Simon Peyton Jones at 2022-10-25T23:19:18+01:00 Adapt to Constraint-vs-Type See haskell/haddock#21623 and !8750 - - - - - 7108ba96 by Tom Smeding at 2022-11-01T22:33:23+01:00 Remove outdated footnote about module re-exports The footnote is invalid with GHC 9.2.4 (and possibly earlier): the described behaviour in the main text works fine. - - - - - 206c6bc7 by Hécate Moonlight at 2022-11-01T23:00:46+01:00 Merge pull request haskell/haddock#1534 from tomsmeding/patch-1 - - - - - a57b4c4b by Andrew Lelechenko at 2022-11-21T00:39:52+00:00 Support mtl-2.3 - - - - - e9d62453 by Simon Peyton Jones at 2022-11-25T13:49:12+01:00 Track small API change in TyCon.hs - - - - - eb1c73f7 by Ben Gamari at 2022-12-07T08:46:21-05:00 Update for GhC 9.6 - - - - - 063268dd by Ben Gamari at 2022-12-07T11:26:32-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 4ca722fe by Ben Gamari at 2022-12-08T14:43:26-05:00 Bump bounds to accomodate base-4.18 - - - - - 340b7511 by Vladislav Zavialov at 2022-12-10T12:31:28+00:00 HsToken in HsAppKindTy - - - - - 946226ec by Ben Gamari at 2022-12-13T20:12:56-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - fd8faa66 by Ben Gamari at 2022-12-22T13:44:28-05:00 Bump GHC version to 9.7 - - - - - 2958aa9c by Ben Gamari at 2022-12-22T14:49:16-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 9e0fefd8 by Andrei Borzenkov at 2023-01-30T14:02:04+04:00 Rename () to Unit, Rename (,,...,,) to Tuple<n> - - - - - eb3968b5 by Ben Gamari at 2023-03-10T02:32:43-05:00 Bump versions for ghc-9.6 release - - - - - 4aeead36 by Adam Gundry at 2023-03-23T13:53:47+01:00 Adapt to warning categories changes - - - - - 642d8d60 by sheaf at 2023-03-29T13:35:56+02:00 Adapt to record field refactor This commit adapts to the changes in GHC MR !8686, which overhauls the treatment of record fields in the renamer, adding separate record field namespaces and entirely removing the GreName datatype. - - - - - ac8d4333 by doyougnu at 2023-03-29T11:11:44-04:00 Update UniqMap API - - - - - 7866fc86 by Ben Orchard at 2023-04-20T11:29:33+02:00 update classify with new tokens - - - - - ffcdd683 by Finley McIlwaine at 2023-04-24T09:36:18-06:00 Remove index-state - - - - - 05b70982 by Finley McIlwaine at 2023-04-26T08:16:31-06:00 `renameInterface` space leak fixes - Change logic for accumulation of names for which link warnings will be generated - Change handling of `--ignore-link-symbol` to allow qualified and unqualified names. Added to CHANGES.md - Some formatting changes and comments here and there - - - - - e5697d7c by Finley McIlwaine at 2023-04-27T18:46:36-06:00 Messy things - ghc-debug dependency and instrumentation - cabal.project custom with-compiler - hie.yaml files - traces and such - - - - - 0b8ef80b by Finley McIlwaine at 2023-05-02T18:08:52-06:00 Stop retaining GRE closures GRE closures should never be necessary to Haddock, so we never want to keep them on the heap. Despite that, they are retained by a lot of the data structures that Haddock makes use of. - Attempt to fix that situation by adding strictness to various computations and pruning the `ifaceInstances` field of `Interface` to a much thinner data type. - Removes the `ifaceFamInstances` field, as it was never used. - Move some of the attach instances types (e.g. `SimpleType`) to the types module - - - - - 8bda991b by Finley McIlwaine at 2023-05-08T16:07:51-06:00 Memory usage fixes - Refactor `ifaceDeclMap` to drastically reduce memory footprint. We no longer store all declarations associated with a given name, since we only cared to determine if the only declaration associated with a name was a value declaration. Change the `DeclMap` type to better reflect this. - Drop pre-renaming export items after the renaming step. Since the Hoogle backend used the pre-renamed export items, this isn't trivial. We now generate Hoogle output for exported declarations during the renaming step (if Hoogle output /should/ be generated), and store that with the renamed export item. - Slightly refactor Hoogle backend to handle the above change and allow for early generation of Hoogle output. - Remove the `ifaceRnDocMap` and `ifaceRnArgMap` fields of the `Interface` type, as they were never used. - Remove some unnecessary strictness - Remove a lot of dead code from `Syb` module - - - - - 1611ac0c by Finley McIlwaine at 2023-05-09T11:51:57-06:00 Unify ErrMsgM and IfM - Delete ErrMsgM, stop accumulating warnings in a writer - Make IfM a state monad, print warnings directly to stdout, move IfM type into types module - Drop ErrMsg = String synonym - Unset IORefs from plugin after they are read, preventing unnecessary retention of interfaces - - - - - 42d696ab by Finley McIlwaine at 2023-05-11T15:52:07-06:00 Thunk leak fixes The strictness introduced in this commit was motivated by observing thunk leaks in the eventlog2html output. - Refactor attach instances list comprehension to avoid large intermediate thunks - Refactor some HTML backend list comprehensions to avoid large intermediate thunks - Avoid thunks accumulating in documentation types or documentation parser - A lot of orphan NFData instances to allow us to force documentation values - - - - - 68561cf6 by Finley McIlwaine at 2023-05-11T17:02:10-06:00 Remove GHC debug dep - - - - - 10519e3d by Finley McIlwaine at 2023-05-15T12:40:48-06:00 Force HIE file path Removes a potential retainer of `ModSummary`s - - - - - 1e4a6ec6 by Finley McIlwaine at 2023-05-15T14:20:34-06:00 Re-add index-state, with-compiler, delete hie.yamls - - - - - a2363fe9 by Hécate Moonlight at 2023-05-15T22:45:16+02:00 Merge pull request haskell/haddock#1594 from FinleyMcIlwaine/finley/ghc-9.6-mem-fixes Reduce memory usage - - - - - e8a78383 by Finley McIlwaine at 2023-05-17T12:19:16-06:00 Merge branch ghc-9.6 into ghc-head - - - - - 22e25581 by Finley McIlwaine at 2023-05-17T12:20:23-06:00 Merge branch 'ghc-head' of gitlab.haskell.org:ghc/haddock into ghc-head - - - - - 41bbf0df by Bartłomiej Cieślar at 2023-05-24T08:57:58+02:00 changes to the WarningTxt cases Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - c686ba9b by Hécate Moonlight at 2023-06-01T14:03:02-06:00 Port the remains of Hi-Haddock - - - - - 9d8a85fd by Hécate Moonlight at 2023-06-01T14:03:06-06:00 Stdout for tests - - - - - 36331d07 by Finley McIlwaine at 2023-06-01T14:06:02-06:00 Formatting, organize imports - - - - - a06059b1 by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix empty context confusion in Convert module - - - - - 379346ae by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix associated type families in Hoogle output - - - - - fc6ea7ed by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix test refs Accept several changes in Hoogle tests: Pretty printing logic no longer prints the `(Proxy (Proxy (...))` chain in Bug806 with parentheses. Since this test was only meant to verify that line breaks do not occur, accept the change. `tyThingToLHsDecl` is called for class and data declarations, which ends up "synifying" the type variables and giving unlifted types kind signatures. As a result, type variables of kind `Type -> Type` are now printed with kind signatures in Hoogle output. This could be changed by manually drop kind signatures from class variables in the Hoogle backend if the behavior is deemed unacceptable. Sometimes subordinate declarations are exported separate from their parent declarations (e.g. record selectors). In this case, a type signature is cobbled together for the export item in `extractDecl`. Since this type signature is very manually constructed, it may lack kind signatures of decls constructed from `tyThingToLHsDecl`. An example of this is the `type-sigs` Hoogle test. Change `*` to `Type` in Hoogle test refs. I don't think this will break Hoogle behavior, since it appears to not consider type signatures in search. I have not fully verified this. - - - - - e14b7e58 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix LaTeX backend test refs Changes to GHC pretty printing code have resulted in some differences to Haddock's LaTeX output. - Type variables are printed explicitly quantified in the LinearTypes test - Wildcard types in type family equations are now printed numbered, e.g. _1 _2, in the TypeFamilies3 test - Combined signatures in DefaultSignatures test are now documented as separate signatures - - - - - 41b5b296 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and test source updates - Stop using kind `*` in html test sources - Add TypeOperators where necessary to avoid warnings and future errors - Rename some test modules to match their module names - - - - - c640e2a2 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix missing deprecation warnings on record fields `lookupOccEnv` was used to resolve `OccNames` with warnings attached, but it doesn't look in the record field namespace. Thus, if a record field had a warning attached, it would not resolve and the warning map would not include it. This commit fixes by using `lookupOccEnv_WithFields` instead. - - - - - fad0c462 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and some comments - - - - - 751fd023 by Finley McIlwaine at 2023-06-01T14:11:41-06:00 Accept HTML test diffs All diffs now boil down to the expected differences resulting from declarations being reified from TyThings in hi-haddock. Surface syntax now has much less control over the syntax used in the documentation. - - - - - d835c845 by Finley McIlwaine at 2023-06-01T14:11:45-06:00 Adapt to new load' type - - - - - dcf776c4 by Finley McIlwaine at 2023-06-01T14:13:13-06:00 Update mkWarningMap and moduleWarning - - - - - 8e8432fd by Finley McIlwaine at 2023-06-01T14:28:54-06:00 Revert load' changes - - - - - aeb2982c by Finley McIlwaine at 2023-06-01T14:40:24-06:00 Accept change to Instances test in html-test Link to Data.Tuple instead of GHC.Tuple.Prim - - - - - 8adfdbac by Finley McIlwaine at 2023-06-01T15:53:17-06:00 Reset ghc dep to ^>= 9.6 - - - - - 2b1ce93d by Finley McIlwaine at 2023-06-06T07:50:04-06:00 Update CHANGES.md, user guide, recomp avoidance * Add --trace-args flag for tracing arguments received to standard output * Avoid recompiling due to changes in optimization flags * Update users guide and changes.md - - - - - f3da6676 by Finley McIlwaine at 2023-06-06T14:12:56-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - bf36c467 by Matthew Pickering at 2023-06-07T10:16:09+01:00 Revert back to e16e20d592a6f5d9ed1af17b77fafd6495242345 Neither of these MRs are ready to land yet which causes issues with other MRs which are ready to land and need haddock changes. - - - - - 421510a9 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 atSign has no unicode variant Prior to this change, atSign was defined as follows: atSign unicode = text (if unicode then "@" else "@") Yes, this is the same symbol '\64' and not your font playing tricks on you. Now we define: atSign = char '@' Both the LaTeX and the Xhtml backend are updated accordingly. - - - - - 3785c276 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 LaTeX: fix printing of type variable bindings Consider this type signature: kindOf :: forall {k} (a :: k). Proxy a -> Proxy k Prior to this fix, the LaTeX backend rendered it like this: kindOf :: forall k a. Proxy a -> Proxy k Now we preserve explicit specificity and kind annotations. - - - - - 0febf3a8 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 Add support for invisible binders in type declarations - - - - - 13e33bb3 by Finley McIlwaine at 2023-06-08T07:51:59-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - 3e5340ce by Finley McIlwaine at 2023-06-08T07:54:27-06:00 Add note about stubdir to recompilation docs - - - - - db7e84dc by Finley at 2023-06-08T08:11:03-06:00 Merge pull request haskell/haddock#1597 from haskell/finley/hi-haddock-9.6 hi-haddock for ghc 9.6 - - - - - 4e085d17 by Finley McIlwaine at 2023-06-14T13:41:06-06:00 Replace SYB traversals - - - - - 7b39aec5 by Finley McIlwaine at 2023-06-14T14:20:17-06:00 Test ref accepts, remove unused HaddockClsInst - - - - - df9c2090 by Finley McIlwaine at 2023-06-15T08:02:51-06:00 Use batchMsg for progress reporting during load With hi-haddock as is, there is an awkward silence during the load operation. This commit makes haddock use the default `batchMsg` Messager for progress reporting, and makes the default GHC verbosity level 1, so the user can see what GHC is doing. - - - - - f23679a8 by Hécate Moonlight at 2023-06-15T20:31:53+02:00 Merge pull request haskell/haddock#1600 from haskell/finley/hi-haddock-optim - - - - - a7982192 by Finley McIlwaine at 2023-06-15T15:02:16-06:00 hi-haddock squashed - - - - - c34f0c8d by Finley McIlwaine at 2023-06-15T16:22:03-06:00 Merge remote-tracking branch 'origin/ghc-9.6' into finley/hi-haddock-squashed - - - - - 40452797 by Bartłomiej Cieślar at 2023-06-16T12:26:04+02:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - e58673bf by Ben Gamari at 2023-06-16T09:33:35-04:00 Bump GHC version to 9.8 - - - - - 74bdf972 by Ben Gamari at 2023-06-16T09:36:18-04:00 Merge commit 'fcaaad06770a26d35d4aafd65772dedadf17669c' into ghc-head - - - - - 418ee3dc by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Remove NFData SourceText, IfaceWarnings updates The NFData SourceText instance is now available in GHC Handle mod_iface mi_warns now being IfaceWarnings - - - - - 62f31380 by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Accept Instances.hs test output Due to ghc!10469. - - - - - a8f2fc0e by Ben Gamari at 2023-06-20T15:48:08-04:00 Test fixes for "Fix associated data family doc structure items" Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - cb1ac33e by Bartłomiej Cieślar at 2023-06-21T12:56:02-04:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 9933e10b by Ben Gamari at 2023-06-21T12:56:02-04:00 Bump GHC version to 9.8 - - - - - fe8c18b6 by Ben Gamari at 2023-06-21T15:36:29-04:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - c61a0d5b by Ben Gamari at 2023-06-21T16:10:51-04:00 Bump GHC version to 9.9 - - - - - 0c2a756e by sheaf at 2023-07-07T13:45:12+02:00 Avoid incomplete record update in Haddock Hoogle This commit avoids running into an incomplete record update warning in the Hoogle backend of Haddock. This was only noticed now, because incomplete record updates were broken in GHC 9.6. Now that they are fixed, we have to avoid running into them! - - - - - f9b952a7 by Ben Gamari at 2023-07-21T11:58:05-04:00 Bump base bound to <4.20 For GHC 9.8. - - - - - 1b27e151 by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Check for puns (see ghc#23368) - - - - - 457341fd by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Remove fake exports for (~), List, and Tuple<n> The old reasoning no longer applies, nowadays those names can be mentioned in export lists. - - - - - bf3dcddf by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Fix pretty-printing of Solo and MkSolo - - - - - 495b2241 by Matthew Pickering at 2023-09-01T13:02:07+02:00 Fix issue with duplicate reexported definitions (T23616) When a class method was reexported, it's default methods were also showing up in the generated html page. The simplest and most non-invasive fix is to not look for the default method if we are just exporting the class method.. because the backends are just showing default methods when the whole class is exported. In general it would be worthwhile to rewrite this bit of code I think as the logic and what gets included is split over `lookupDocs` and `availExportDecl` it would be clearer to combine the two. The result of lookupDocs is always just passed to availExportDecl so it seems simpler and more obvious to just write the function directly. - - - - - 6551824d by Finley McIlwaine at 2023-09-05T13:06:57-07:00 Remove fake export of `FUN` from Prelude This prevents `data FUN` from being shown at the top of the Prelude docs. Fixes \#23920 on GHC. - - - - - 9ab5a448 by Alan Zimmerman at 2023-09-08T18:26:53+01:00 Match changes in wip/az/T23885-unicode-funtycon - - - - - 4d08364e by Alan Zimmerman at 2023-10-31T19:46:45+00:00 EPA: match changes in GHC - EPA: Comments in AnchorOperation - EPA: Remove EpaEofComment - - - - - e7da0d25 by Alan Zimmerman at 2023-11-05T11:20:31+00:00 EPA: match changes in GHC, l2l cleanup - - - - - 4ceac14d by Alan Zimmerman at 2023-11-11T15:16:41+00:00 EPA: Replace Anchor with EpaLocation Match GHC - - - - - 94fb8d47 by Alan Zimmerman at 2023-11-29T18:10:26+00:00 Match GHC, No comments in EpaDelta for comments - - - - - 32d208e1 by Vladislav Zavialov at 2023-12-12T20:41:36+03:00 EPA: Match changes to LHsToken removal - - - - - eebdd316 by Apoorv Ingle at 2024-01-23T13:49:12+00:00 Changes for haskell/haddock#18324 - - - - - ae856a82 by Matthew Pickering at 2024-02-05T12:22:39+00:00 ghc-internals fallout - - - - - f8429266 by Jade at 2024-02-08T14:56:50+01:00 Adjust test for ghc MR !10993 - - - - - 6d1e2386 by Alan Zimmerman at 2024-02-13T22:00:28+03:00 EPA: Match changes to HsParTy and HsFunTy - - - - - 9c588f19 by Fendor at 2024-02-14T11:05:36+01:00 Adapt to GHC giving better Name's for linking - - - - - 778e1db3 by Andrei Borzenkov at 2024-02-16T16:12:07+03:00 Namespace specifiers for fixity signatures - - - - - 826c5b47 by Torsten Schmits at 2024-02-21T13:17:05+01:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 2cff14d5 by Ben Gamari at 2024-02-22T09:35:56-05:00 Bump bounds - - - - - f49376b3 by Ben Gamari at 2024-02-22T09:35:56-05:00 Allow `@since` annotations in export lists Here we extend Haddock to admit `@since` annotations in export lists. These can be attached to most export list items (although not subordinate lists). These annotations supercede the declaration's `@since` annotation in produced Haddocks. - - - - - b5aa93df by Ben Gamari at 2024-02-22T12:09:06-05:00 Allow package-qualified @since declarations - - - - - 8f5957f2 by Ben Gamari at 2024-02-22T13:55:19-05:00 Documentation changes from ghc-internal restructuring Previously many declarations (e.g. `Int`) were declared to have a "home" in `Prelude`. However, now Haddock instead chooses to put these in more specific homes (e.g. `Data.Int`). Given that the "home" decision is driven by heuristics and in general these changes seem quite reasonable I am accepting them: * `Int` moved from `Prelude` to `Data.Int` * `(~)` moved from `Prelude` to `Data.Type.Equality` * `Type` moved from `GHC.Types` to `Data.Kind` * `Maybe` moved from `Prelude` to `Data.Maybe` * `Bool` moved from `Prelude` to `Data.Bool` * `Ordering` moved from `Prelude` to `Data.Ord` As well, more identifiers are now hyperlinked; it's not immediately clear *why*, but it is an improvement nevertheless. - - - - - ec33fec3 by Ben Gamari at 2024-02-22T20:36:24-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 30cfd251 by Torsten Schmits at 2024-02-24T13:00:42-05:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 732db81d by Ben Gamari at 2024-02-24T19:12:18-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 86bf7010 by Ben Gamari at 2024-02-27T19:28:10-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 4b6e76b5 by Patrick at 2024-03-07T22:09:30+08:00 fix haskell/haddock#24493, with module name introduced in hieAst The accompanies haddoc PR with GHC PR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12153 Two things have been done: 1. Link is introduced to every `X` in `module X where`, since we introduce the module name to HieAst, 2. `{-# LINE 4 "hypsrc-test/src/PositionPragmas.hs" #-}` is added before the `module PositionPragmas where` in ` hypsrc-test/ref/src/PositionPragmas.html `.It ensures only a single hieAst for file `hypsrc-test/src/PositionPragmas.hs` is generated. - - - - - 635abccc by Ben Gamari at 2024-03-08T17:09:06-05:00 Bump ghc version to 9.10 - - - - - 5b934048 by Ben Gamari at 2024-03-08T18:50:12-05:00 Bump base upper bound - - - - - b30d134e by Ben Gamari at 2024-03-08T18:50:44-05:00 Testsuite output update - - - - - 9bdf3586 by Ben Gamari at 2024-03-09T21:37:44-05:00 Merge branch 'ghc-9.10' into ghc-head - - - - - cec76981 by Ben Gamari at 2024-03-09T21:54:00-05:00 Bump GHC version to 9.11 - - - - - 4c59feb7 by Ben Gamari at 2024-03-09T22:15:01-05:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 6e18ce2b by Ben Gamari at 2024-04-12T08:16:09-04:00 users-guide: Clarify language extension documentation Over the years the users guide's language extension documentation has gone through quite a few refactorings. In the process some of the descriptions have been rendered non-sensical. For instance, the description of `NoImplicitPrelude` actually describes the semantics of `ImplicitPrelude`. To fix this we: * ensure that all extensions are named in their "positive" sense (e.g. `ImplicitPrelude` rather than `NoImplicitPrelude`). * rework the documentation to avoid flag-oriented wording like "enable" and "disable" * ensure that the polarity of the documentation is consistent with reality. Fixes #23895. - - - - - a933aff3 by Zubin Duggal at 2024-04-12T08:16:45-04:00 driver: Make `checkHomeUnitsClosed` faster The implementation of `checkHomeUnitsClosed` was traversing every single path in the unit dependency graph - this grows exponentially and quickly grows to be infeasible on larger unit dependency graphs. Instead we replace this with a faster implementation which follows from the specificiation of the closure property - there is a closure error if there are units which are both are both (transitively) depended upon by home units and (transitively) depend on home units, but are not themselves home units. To compute the set of units required for closure, we first compute the closure of the unit dependency graph, then the transpose of this closure, and find all units that are reachable from the home units in the transpose of the closure. - - - - - 23c3e624 by Andreas Klebinger at 2024-04-12T08:17:21-04:00 RTS: Emit warning when -M < -H Fixes #24487 - - - - - d23afb8c by Ben Gamari at 2024-04-12T08:17:56-04:00 testsuite: Add broken test for CApiFFI with -fprefer-bytecode See #24634. - - - - - a4bb3a51 by Ben Gamari at 2024-04-12T08:18:32-04:00 base: Deprecate GHC.Pack As proposed in #21461. Closes #21540. - - - - - 55eb8c98 by Ben Gamari at 2024-04-12T08:19:08-04:00 ghc-internal: Fix mentions of ghc-internal in deprecation warnings Closes #24609. - - - - - b0fbd181 by Ben Gamari at 2024-04-12T08:19:44-04:00 rts: Implement set_initial_registers for AArch64 Fixes #23680. - - - - - 14c9ec62 by Ben Gamari at 2024-04-12T08:20:20-04:00 ghcup-metadata: Use Debian 9 binaries on Ubuntu 16, 17 Closes #24646. - - - - - 35a1621e by Ben Gamari at 2024-04-12T08:20:55-04:00 Bump unix submodule to 2.8.5.1 Closes #24640. - - - - - a1c24df0 by Finley McIlwaine at 2024-04-12T08:21:31-04:00 Correct default -funfolding-use-threshold in docs - - - - - 0255d03c by Oleg Grenrus at 2024-04-12T08:22:07-04:00 FastString is a __Modified__ UTF-8 - - - - - c3489547 by Matthew Pickering at 2024-04-12T13:13:44-04:00 rts: Improve tracing message when nursery is resized It is sometimes more useful to know how much bigger or smaller the nursery got when it is resized. In particular I am trying to investigate situations where we end up with fragmentation due to the nursery (#24577) - - - - - 5e4f4ba8 by Simon Peyton Jones at 2024-04-12T13:14:20-04:00 Don't generate wrappers for `type data` constructors with StrictData Previously, the logic for checking if a data constructor needs a wrapper or not would take into account whether the constructor's fields have explicit strictness (e.g., `data T = MkT !Int`), but the logic would _not_ take into account whether `StrictData` was enabled. This meant that something like `type data T = MkT Int` would incorrectly generate a wrapper for `MkT` if `StrictData` was enabled, leading to the horrible errors seen in #24620. To fix this, we disable generating wrappers for `type data` constructors altogether. Fixes #24620. Co-authored-by: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - dbdf1995 by Alex Mason at 2024-04-15T15:28:26+10:00 Implements MO_S_Mul2 and MO_U_Mul2 using the UMULH, UMULL and SMULH instructions for AArch64 Also adds a test for MO_S_Mul2 - - - - - 42bd0407 by Teo Camarasu at 2024-04-16T20:06:39-04:00 Make template-haskell a stage1 package Promoting template-haskell from a stage0 to a stage1 package means that we can much more easily refactor template-haskell. We implement this by duplicating the in-tree `template-haskell`. A new `template-haskell-next` library is autogenerated to mirror `template-haskell` `stage1:ghc` to depend on the new interface of the library including the `Binary` instances without adding an explicit dependency on `template-haskell`. This is controlled by the `bootstrap-th` cabal flag When building `template-haskell` modules as part of this vendoring we do not have access to quote syntax, so we cannot use variable quote notation (`'Just`). So we either replace these with hand-written `Name`s or hide the code behind CPP. We can remove the `th_hack` from hadrian, which was required when building stage0 packages using the in-tree `template-haskell` library. For more details see Note [Bootstrapping Template Haskell]. Resolves #23536 Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> Co-Authored-By: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - 3d973e47 by Ben Gamari at 2024-04-16T20:07:15-04:00 Bump parsec submodule to 3.1.17.0 - - - - - 9d38bfa0 by Simon Peyton Jones at 2024-04-16T20:07:51-04:00 Clone CoVars in CorePrep This MR addresses #24463. It's all explained in the new Note [Cloning CoVars and TyVars] - - - - - 0fe2b410 by Andreas Klebinger at 2024-04-16T20:08:27-04:00 NCG: Fix a bug where we errounously removed a required jump instruction. Add a new method to the Instruction class to check if we can eliminate a jump in favour of fallthrough control flow. Fixes #24507 - - - - - 9f99126a by Teo Camarasu at 2024-04-16T20:09:04-04:00 Fix documentation preview from doc-tarball job - Include all the .html files and assets in the job artefacts - Include all the .pdf files in the job artefacts - Mark the artefact as an "exposed" artefact meaning it turns up in the UI. Resolves #24651 - - - - - 3a0642ea by Ben Gamari at 2024-04-16T20:09:39-04:00 rts: Ignore EINTR while polling in timerfd itimer implementation While the RTS does attempt to mask signals, it may be that a foreign library unmasks them. This previously caused benign warnings which we now ignore. See #24610. - - - - - 9a53cd3f by Alan Zimmerman at 2024-04-16T20:10:15-04:00 EPA: Add additional comments field to AnnsModule This is used in exact printing to store comments coming after the `where` keyword but before any comments allocated to imports or decls. It is used in ghc-exactprint, see https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195bf47c17d34fa7 - - - - - e5c43259 by Bryan Richter at 2024-04-16T20:10:51-04:00 Remove unrunnable FreeBSD CI jobs FreeBSD runner supply is inelastic. Currently there is only one, and it's unavailable because of a hardware issue. - - - - - 914eb49a by Ben Gamari at 2024-04-16T20:11:27-04:00 rel-eng: Fix mktemp usage in recompress-all We need a temporary directory, not a file. - - - - - f30e4984 by Teo Camarasu at 2024-04-16T20:12:03-04:00 Fix ghc API link in docs/index.html This was missing part of the unit ID meaning it would 404. Resolves #24674 - - - - - d7a3d6b5 by Ben Gamari at 2024-04-16T20:12:39-04:00 template-haskell: Declare TH.Lib.Internal as not-home Rather than `hide`. Closes #24659. - - - - - 5eaa46e7 by Matthew Pickering at 2024-04-19T02:14:55-04:00 testsuite: Rename isCross() predicate to needsTargetWrapper() isCross() was a misnamed because it assumed that all cross targets would provide a target wrapper, but the two most common cross targets (javascript, wasm) don't need a target wrapper. Therefore we rename this predicate to `needsTargetWrapper()` so situations in the testsuite where we can check whether running executables requires a target wrapper or not. - - - - - 55a9d699 by Simon Peyton Jones at 2024-04-19T02:15:32-04:00 Do not float HNFs out of lambdas This MR adjusts SetLevels so that it is less eager to float a HNF (lambda or constructor application) out of a lambda, unless it gets to top level. Data suggests that this change is a small net win: * nofib bytes-allocated falls by -0.09% (but a couple go up) * perf/should_compile bytes-allocated falls by -0.5% * perf/should_run bytes-allocated falls by -0.1% See !12410 for more detail. When fiddling elsewhere, I also found that this patch had a huge positive effect on the (very delicate) test perf/should_run/T21839r But that improvement doesn't show up in this MR by itself. Metric Decrease: MultiLayerModulesRecomp T15703 parsing001 - - - - - f0701585 by Alan Zimmerman at 2024-04-19T02:16:08-04:00 EPA: Fix comments in mkListSyntaxTy0 Also extend the test to confirm. Addresses #24669, 1 of 4 - - - - - b01c01d4 by Serge S. Gulin at 2024-04-19T02:16:51-04:00 JS: set image `x86_64-linux-deb11-emsdk-closure` for build - - - - - c90c6039 by Alan Zimmerman at 2024-04-19T02:17:27-04:00 EPA: Provide correct span for PatBind And remove unused parameter in checkPatBind Contributes to #24669 - - - - - bee54c24 by Krzysztof Gogolewski at 2024-04-19T11:13:00+02:00 Update quantification order following GHC haskell/haddock#23764 - - - - - 2814eb89 by Ben Gamari at 2024-04-19T18:57:05+02:00 hypsrc-test: Fix output of PositionPragmas.html - - - - - 26036f96 by Alan Zimmerman at 2024-04-19T13:11:08-04:00 EPA: Fix span for PatBuilderAppType Include the location of the prefix @ in the span for InVisPat. Also removes unnecessary annotations from HsTP. Contributes to #24669 - - - - - dba03aab by Matthew Craven at 2024-04-19T13:11:44-04:00 testsuite: Give the pre_cmd for mhu-perf more time - - - - - d31fbf6c by Krzysztof Gogolewski at 2024-04-19T21:04:09-04:00 Fix quantification order for a `op` b and a %m -> b Fixes #23764 Implements https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0640-tyop-quantification-order.rst Updates haddock submodule. - - - - - 385cd1c4 by Sebastian Graf at 2024-04-19T21:04:45-04:00 Make `seq#` a magic Id and inline it in CorePrep (#24124) We can save much code and explanation in Tag Inference and StgToCmm by making `seq#` a known-key Magic Id in `GHC.Internal.IO` and inline this definition in CorePrep. See the updated `Note [seq# magic]`. I also implemented a new `Note [Flatten case-bind]` to get better code for otherwise nested case scrutinees. I renamed the contructors of `ArgInfo` to use an `AI` prefix in order to resolve the clash between `type CpeApp = CoreExpr` and the data constructor of `ArgInfo`, as well as fixed typos in `Note [CorePrep invariants]`. Fixes #24252 and #24124. - - - - - 275e41a9 by Jade at 2024-04-20T11:10:40-04:00 Put the newline after errors instead of before them This mainly has consequences for GHCi but also slightly alters how the output of GHC on the commandline looks. Fixes: #22499 - - - - - dd339c7a by Teo Camarasu at 2024-04-20T11:11:16-04:00 Remove unecessary stage0 packages Historically quite a few packages had to be stage0 as they depended on `template-haskell` and that was stage0. In #23536 we made it so that was no longer the case. This allows us to remove a bunch of packages from this list. A few still remain. A new version of `Win32` is required by `semaphore-compat`. Including `Win32` in the stage0 set requires also including `filepath` because otherwise Hadrian's dependency logic gets confused. Once our boot compiler has a newer version of `Win32` all of these will be able to be dropped. Resolves #24652 - - - - - 2f8e3a25 by Alan Zimmerman at 2024-04-20T11:11:52-04:00 EPA: Avoid duplicated comments in splice decls Contributes to #24669 - - - - - c70b9ddb by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fix typos and namings (fixes #24602) You may noted that I've also changed term of ``` , global "h$vt_double" ||= toJExpr IntV ``` See "IntV" and ``` WaitReadOp -> \[] [fd] -> pure $ PRPrimCall $ returnS (app "h$waidRead" [fd]) ``` See "h$waidRead" - - - - - 3db54f9b by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: trivial checks for variable presence (fixes #24602) - - - - - 777f108f by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fs module imported twice (by emscripten and by ghc-internal). ghc-internal import wrapped in a closure to prevent conflict with emscripten (fixes #24602) Better solution is to use some JavaScript module system like AMD, CommonJS or even UMD. It will be investigated at other issues. At first glance we should try UMD (See https://github.com/umdjs/umd) - - - - - a45a5712 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: thread.js requires h$fds and h$fdReady to be declared for static code analysis, minimal code copied from GHCJS (fixes #24602) I've just copied some old pieces of GHCJS from publicly available sources (See https://github.com/Taneb/shims/blob/a6dd0202dcdb86ad63201495b8b5d9763483eb35/src/io.js#L607). Also I didn't put details to h$fds. I took minimal and left only its object initialization: `var h$fds = {};` - - - - - ad90bf12 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: heap and stack overflows reporting defined as js hard failure (fixes #24602) These errors were treated as a hard failure for browser application. The fix is trivial: just throw error. - - - - - 5962fa52 by Serge S. Gulin at 2024-04-21T16:33:44+03:00 JS: Stubs for code without actual implementation detected by Google Closure Compiler (fixes #24602) These errors were fixed just by introducing stubbed functions with throw for further implementation. - - - - - a0694298 by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add externs to linker (fixes #24602) After enabling jsdoc and built-in google closure compiler types I was needed to deal with the following: 1. Define NodeJS-environment types. I've just copied minimal set of externs from semi-official repo (see https://github.com/externs/nodejs/blob/6c6882c73efcdceecf42e7ba11f1e3e5c9c041f0/v8/nodejs.js#L8). 2. Define Emscripten-environment types: `HEAP8`. Emscripten already provides some externs in our code but it supposed to be run in some module system. And its definitions do not work well in plain bundle. 3. We have some functions which purpose is to add to functions some contextual information via function properties. These functions should be marked as `modifies` to let google closure compiler remove calls if these functions are not used actually by call graph. Such functions are: `h$o`, `h$sti`, `h$init_closure`, `h$setObjInfo`. 4. STG primitives such as registries and stuff from `GHC.StgToJS`. `dXX` properties were already present at externs generator function but they are started from `7`, not from `1`. This message is related: `// fixme does closure compiler bite us here?` - - - - - e58bb29f by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: added both tests: for size and for correctness (fixes #24602) By some reason MacOS builds add to stderr messages like: Ignoring unexpected archive entry: __.SYMDEF ... However I left stderr to `/dev/null` for compatibility with linux CI builds. - - - - - 909f3a9c by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Disable js linker warning for empty symbol table to make js tests running consistent across environments - - - - - 83eb10da by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add special preprocessor for js files due of needing to keep jsdoc comments (fixes #24602) Our js files have defined google closure compiler types at jsdoc entries but these jsdoc entries are removed by cpp preprocessor. I considered that reusing them in javascript-backend would be a nice thing. Right now haskell processor uses `-traditional` option to deal with comments and `//` operators. But now there are following compiler options: `-C` and `-CC`. You can read about them at GCC (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-CC) and CLang (see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-CC). It seems that `-CC` works better for javascript jsdoc than `-traditional`. At least it leaves `/* ... */` comments w/o changes. - - - - - e1cf8dc2 by brandon s allbery kf8nh at 2024-04-22T03:48:26-04:00 fix link in CODEOWNERS It seems that our local Gitlab no longer has documentation for the `CODEOWNERS` file, but the master documentation still does. Use that instead. - - - - - a27c6a49 by Fendor at 2024-04-22T10:13:03+02:00 Adapt to UserData split - - - - - 1efc5a7a by Fendor at 2024-04-22T10:13:03+02:00 Adapt to BinHandle split - - - - - 593f4e04 by Fendor at 2024-04-23T10:19:14-04:00 Add performance regression test for '-fwrite-simplified-core' - - - - - 1ba39b05 by Fendor at 2024-04-23T10:19:14-04:00 Typecheck corebindings lazily during bytecode generation This delays typechecking the corebindings until the bytecode generation happens. We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`. In general, we shouldn't retain values of the hydrated `Type`, as not evaluating the bytecode object keeps it alive. It is better if we retain the unhydrated `IfaceType`. See Note [Hydrating Modules] - - - - - e916fc92 by Alan Zimmerman at 2024-04-23T10:19:50-04:00 EPA: Keep comments in a CaseAlt match The comments now live in the surrounding location, not inside the Match. Make sure we keep them. Closes #24707 - - - - - d2b17f32 by Cheng Shao at 2024-04-23T15:01:22-04:00 driver: force merge objects when building dynamic objects This patch forces the driver to always merge objects when building dynamic objects even when ar -L is supported. It is an oversight of !8887: original rationale of that patch is favoring the relatively cheap ar -L operation over object merging when ar -L is supported, which makes sense but only if we are building static objects! Omitting check for whether we are building dynamic objects will result in broken .so files with undefined reference errors at executable link time when building GHC with llvm-ar. Fixes #22210. - - - - - 209d09f5 by Julian Ospald at 2024-04-23T15:02:03-04:00 Allow non-absolute values for bootstrap GHC variable Fixes #24682 - - - - - 3fff0977 by Matthew Pickering at 2024-04-23T15:02:38-04:00 Don't depend on registerPackage function in Cabal More recent versions of Cabal modify the behaviour of libAbiHash which breaks our usage of registerPackage. It is simpler to inline the part of registerPackage that we need and avoid any additional dependency and complication using the higher-level function introduces. - - - - - c62dc317 by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: remove obsolete ln script This commit removes an obsolete ln script in ghc-bignum/gmp. See 060251c24ad160264ae8553efecbb8bed2f06360 for its original intention, but it's been obsolete for a long time, especially since the removal of the make build system. Hence the house cleaning. - - - - - 6399d52b by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: update gmp to 6.3.0 This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0. The tarball format is now xz, and gmpsrc.patch has been patched into the tarball so hadrian no longer needs to deal with patching logic when building in-tree GMP. - - - - - 65b4b92f by Cheng Shao at 2024-04-25T01:32:02-04:00 hadrian: remove obsolete Patch logic This commit removes obsolete Patch logic from hadrian, given we no longer need to patch the gmp tarball when building in-tree GMP. - - - - - 71f28958 by Cheng Shao at 2024-04-25T01:32:02-04:00 autoconf: remove obsolete patch detection This commit removes obsolete deletection logic of the patch command from autoconf scripts, given we no longer need to patch anything in the GHC build process. - - - - - daeda834 by Sylvain Henry at 2024-04-25T01:32:43-04:00 JS: correctly handle RUBBISH literals (#24664) - - - - - 8a06ddf6 by Matthew Pickering at 2024-04-25T11:16:16-04:00 Linearise ghc-internal and base build This is achieved by requesting the final package database for ghc-internal, which mandates it is fully built as a dependency of configuring the `base` package. This is at the expense of cross-package parrallelism between ghc-internal and the base package. Fixes #24436 - - - - - 94da9365 by Andrei Borzenkov at 2024-04-25T11:16:54-04:00 Fix tuple puns renaming (24702) Move tuple renaming short cutter from `isBuiltInOcc_maybe` to `isPunOcc_maybe`, so we consider incoming module. I also fixed some hidden bugs that raised after the change was done. - - - - - fa03b1fb by Fendor at 2024-04-26T18:03:13-04:00 Refactor the Binary serialisation interface The goal is simplifiy adding deduplication tables to `ModIface` interface serialisation. We identify two main points of interest that make this difficult: 1. UserData hardcodes what `Binary` instances can have deduplication tables. Moreover, it heavily uses partial functions. 2. GHC.Iface.Binary hardcodes the deduplication tables for 'Name' and 'FastString', making it difficult to add more deduplication. Instead of having a single `UserData` record with fields for all the types that can have deduplication tables, we allow to provide custom serialisers for any `Typeable`. These are wrapped in existentials and stored in a `Map` indexed by their respective `TypeRep`. The `Binary` instance of the type to deduplicate still needs to explicitly look up the decoder via `findUserDataReader` and `findUserDataWriter`, which is no worse than the status-quo. `Map` was chosen as microbenchmarks indicate it is the fastest for a small number of keys (< 10). To generalise the deduplication table serialisation mechanism, we introduce the types `ReaderTable` and `WriterTable` which provide a simple interface that is sufficient to implement a general purpose deduplication mechanism for `writeBinIface` and `readBinIface`. This allows us to provide a list of deduplication tables for serialisation that can be extended more easily, for example for `IfaceTyCon`, see the issue https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for more motivation. In addition to this refactoring, we split `UserData` into `ReaderUserData` and `WriterUserData`, to avoid partial functions and reduce overall memory usage, as we need fewer mutable variables. Bump haddock submodule to accomodate for `UserData` split. ------------------------- Metric Increase: MultiLayerModulesTH_Make MultiLayerModulesRecomp T21839c ------------------------- - - - - - bac57298 by Fendor at 2024-04-26T18:03:13-04:00 Split `BinHandle` into `ReadBinHandle` and `WriteBinHandle` A `BinHandle` contains too much information for reading data. For example, it needs to keep a `FastMutInt` and a `IORef BinData`, when the non-mutable variants would suffice. Additionally, this change has the benefit that anyone can immediately tell whether the `BinHandle` is used for reading or writing. Bump haddock submodule BinHandle split. - - - - - 4d6394dd by Simon Peyton Jones at 2024-04-26T18:03:49-04:00 Fix missing escaping-kind check in tcPatSynSig Note [Escaping kind in type signatures] explains how we deal with escaping kinds in type signatures, e.g. f :: forall r (a :: TYPE r). a where the kind of the body is (TYPE r), but `r` is not in scope outside the forall-type. I had missed this subtlety in tcPatSynSig, leading to #24686. This MR fixes it; and a similar bug in tc_top_lhs_type. (The latter is tested by T24686a.) - - - - - 981c2c2c by Alan Zimmerman at 2024-04-26T18:04:25-04:00 EPA: check-exact: check that the roundtrip reproduces the source Closes #24670 - - - - - a8616747 by Andrew Lelechenko at 2024-04-26T18:05:01-04:00 Document that setEnv is not thread-safe - - - - - 1e41de83 by Bryan Richter at 2024-04-26T18:05:37-04:00 CI: Work around frequent Signal 9 errors - - - - - a6d5f9da by Naïm Favier at 2024-04-27T17:52:40-04:00 ghc-internal: add MonadFix instance for (,) Closes https://gitlab.haskell.org/ghc/ghc/-/issues/24288, implements CLC proposal https://github.com/haskell/core-libraries-committee/issues/238. Adds a MonadFix instance for tuples, permitting value recursion in the "native" writer monad and bringing consistency with the existing instance for transformers's WriterT (and, to a lesser extent, for Solo). - - - - - 64feadcd by Rodrigo Mesquita at 2024-04-27T17:53:16-04:00 bindist: Fix xattr cleaning The original fix (725343aa) was incorrect because it used the shell bracket syntax which is the quoting syntax in autoconf, making the test for existence be incorrect and therefore `xattr` was never run. Fixes #24554 - - - - - e2094df3 by damhiya at 2024-04-28T23:52:00+09:00 Make read accepts binary integer formats CLC proposal : https://github.com/haskell/core-libraries-committee/issues/177 - - - - - c62239b7 by Sylvain Henry at 2024-04-29T10:35:00+02:00 Fix tests for T22229 - - - - - 1c2fd963 by Alan Zimmerman at 2024-04-29T23:17:00-04:00 EPA: Preserve comments in Match Pats Closes #24708 Closes #24715 Closes #24734 - - - - - 4189d17e by Sylvain Henry at 2024-04-29T23:17:42-04:00 LLVM: better unreachable default destination in Switch (#24717) See added note. Co-authored-by: Siddharth Bhat <siddu.druid at gmail.com> - - - - - a3725c88 by Cheng Shao at 2024-04-29T23:18:20-04:00 ci: enable wasm jobs for MRs with wasm label This patch enables wasm jobs for MRs with wasm label. Previously the wasm label didn't actually have any effect on the CI pipeline, and full-ci needed to be applied to run wasm jobs which was a waste of runners when working on the wasm backend, hence the fix here. - - - - - 702f7964 by Matthew Pickering at 2024-04-29T23:18:56-04:00 Make interface files and object files depend on inplace .conf file A potential fix for #24737 - - - - - 728af21e by Cheng Shao at 2024-04-30T05:30:23-04:00 utils: remove obsolete vagrant scripts Vagrantfile has long been removed in !5288. This commit further removes the obsolete vagrant scripts in the tree. - - - - - 36f2c342 by Cheng Shao at 2024-04-30T05:31:00-04:00 Update autoconf scripts Scripts taken from autoconf 948ae97ca5703224bd3eada06b7a69f40dd15a02 - - - - - ecbf22a6 by Ben Gamari at 2024-04-30T05:31:36-04:00 ghcup-metadata: Drop output_name field This is entirely redundant to the filename of the URL. There is no compelling reason to name the downloaded file differently from its source. - - - - - c56d728e by Zubin Duggal at 2024-04-30T22:45:09-04:00 testsuite: Handle exceptions in framework_fail when testdir is not initialised When `framework_fail` is called before initialising testdir, it would fail with an exception reporting the testdir not being initialised instead of the actual failure. Ensure we report the actual reason for the failure instead of failing in this way. One way this can manifest is when trying to run a test that doesn't exist using `--only` - - - - - d5bea4d6 by Alan Zimmerman at 2024-04-30T22:45:45-04:00 EPA: Fix range for GADT decl with sig only Closes #24714 - - - - - 4d78c53c by Sylvain Henry at 2024-05-01T17:23:06-04:00 Fix TH dependencies (#22229) Add a dependency between Syntax and Internal (via module reexport). - - - - - 37e38db4 by Sylvain Henry at 2024-05-01T17:23:06-04:00 Bump haddock submodule - - - - - ca13075c by Sylvain Henry at 2024-05-01T17:23:47-04:00 JS: cleanup to prepare for #24743 - - - - - 40026ac3 by Alan Zimmerman at 2024-05-01T22:45:07-04:00 EPA: Preserve comments for PrefixCon Preserve comments in fun (Con {- c1 -} a b) = undefined Closes #24736 - - - - - 92134789 by Hécate Moonlight at 2024-05-01T22:45:42-04:00 Correct `@since` metadata in HpcFlags It was introduced in base-4.20, not 4.22. Fix #24721 - - - - - a580722e by Cheng Shao at 2024-05-02T08:18:45-04:00 testsuite: fix req_target_smp predicate - - - - - ac9c5f84 by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Remove (unused)coarse grained locking. The STM code had a coarse grained locking mode guarded by #defines that was unused. This commit removes the code. - - - - - 917ef81b by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Be more optimistic when validating in-flight transactions. * Don't lock tvars when performing non-committal validation. * If we encounter a locked tvar don't consider it a failure. This means in-flight validation will only fail if committing at the moment of validation is *guaranteed* to fail. This prevents in-flight validation from failing spuriously if it happens in parallel on multiple threads or parallel to thread comitting. - - - - - 167a56a0 by Alan Zimmerman at 2024-05-02T08:19:22-04:00 EPA: fix span for empty \case(s) In instance SDecide Nat where SZero %~ (SSucc _) = Disproved (\case) Ensure the span for the HsLam covers the full construct. Closes #24748 - - - - - 9bae34d8 by doyougnu at 2024-05-02T15:41:08-04:00 testsuite: expand size testing infrastructure - closes #24191 - adds windows_skip, wasm_skip, wasm_arch, find_so, _find_so - path_from_ghcPkg, collect_size_ghc_pkg, collect_object_size, find_non_inplace functions to testsuite - adds on_windows and req_dynamic_ghc predicate to testsuite The design is to not make the testsuite too smart and simply offload to ghc-pkg for locations of object files and directories. - - - - - b85b1199 by Sylvain Henry at 2024-05-02T15:41:49-04:00 GHCi: support inlining breakpoints (#24712) When a breakpoint is inlined, its context may change (e.g. tyvars in scope). We must take this into account and not used the breakpoint tick index as its sole identifier. Each instance of a breakpoint (even with the same tick index) now gets a different "info" index. We also need to distinguish modules: - tick module: module with the break array (tick counters, status, etc.) - info module: module having the CgBreakInfo (info at occurrence site) - - - - - 649c24b9 by Oleg Grenrus at 2024-05-03T20:45:42-04:00 Expose constructors of SNat, SChar and SSymbol in ghc-internal - - - - - d603f199 by Mikolaj Konarski at 2024-05-03T20:46:19-04:00 Add DCoVarSet to PluginProv (!12037) - - - - - ba480026 by Serge S. Gulin at 2024-05-03T20:47:01-04:00 JS: Enable more efficient packing of string data (fixes #24706) - - - - - be1e60ee by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Track in-scope variables in ruleCheckProgram This small patch fixes #24726, by tracking in-scope variables properly in -drule-check. Not hard to do! - - - - - 58408c77 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add a couple more HasCallStack constraints in SimpleOpt Just for debugging, no effect on normal code - - - - - 70e245e8 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add comments to Prep.hs This documentation patch fixes a TODO left over from !12364 - - - - - e5687186 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Use HasDebugCallStack, rather than HasCallStack - - - - - 631cefec by Cheng Shao at 2024-05-03T20:48:17-04:00 driver: always merge objects when possible This patch makes the driver always merge objects with `ld -r` when possible, and only fall back to calling `ar -L` when merge objects command is unavailable. This completely reverts !8887 and !12313, given more fixes in Cabal seems to be needed to avoid breaking certain configurations and the maintainence cost is exceeding the behefits in this case :/ - - - - - 1dacb506 by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump time submodule to 1.14 As requested in #24528. ------------------------- Metric Decrease: ghc_bignum_so rts_so Metric Increase: cabal_syntax_dir rts_so time_dir time_so ------------------------- - - - - - 4941b90e by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump terminfo submodule to current master - - - - - 43d48b44 by Cheng Shao at 2024-05-03T20:49:30-04:00 wasm: use scheduler.postTask() for context switch when available This patch makes use of scheduler.postTask() for JSFFI context switch when it's available. It's a more principled approach than our MessageChannel based setImmediate() implementation, and it's available in latest version of Chromium based browsers. - - - - - 08207501 by Cheng Shao at 2024-05-03T20:50:08-04:00 testsuite: give pre_cmd for mhu-perf 5x time - - - - - bf3d4db0 by Alan Zimmerman at 2024-05-03T20:50:43-04:00 EPA: Preserve comments for pattern synonym sig Closes #24749 - - - - - c49493f2 by Matthew Pickering at 2024-05-04T06:02:57-04:00 tests: Widen acceptance window for dir and so size tests These are testing things which are sometimes out the control of a GHC developer. Therefore we shouldn't fail CI if something about these dependencies change because we can't do anything about it. It is still useful to have these statistics for visualisation in grafana though. Ticket #24759 - - - - - 9562808d by Matthew Pickering at 2024-05-04T06:02:57-04:00 Disable rts_so test It has already manifested large fluctuations and destabilising CI Fixes #24762 - - - - - fc24c5cf by Ryan Scott at 2024-05-04T06:03:33-04:00 unboxedSum{Type,Data}Name: Use GHC.Types as the module Unboxed sum constructors are now defined in the `GHC.Types` module, so if you manually quote an unboxed sum (e.g., `''Sum2#`), you will get a `Name` like: ```hs GHC.Types.Sum2# ``` The `unboxedSumTypeName` function in `template-haskell`, however, mistakenly believes that unboxed sum constructors are defined in `GHC.Prim`, so `unboxedSumTypeName 2` would return an entirely different `Name`: ```hs GHC.Prim.(#|#) ``` This is a problem for Template Haskell users, as it means that they can't be sure which `Name` is the correct one. (Similarly for `unboxedSumDataName`.) This patch fixes the implementations of `unboxedSum{Type,Data}Name` to use `GHC.Types` as the module. For consistency with `unboxedTupleTypeName`, the `unboxedSumTypeName` function now uses the non-punned syntax for unboxed sums (`Sum<N>#`) as the `OccName`. Fixes #24750. - - - - - 7eab4e01 by Alan Zimmerman at 2024-05-04T16:14:55+01:00 EPA: Widen stmtslist to include last semicolon Closes #24754 - - - - - 06f7db40 by Teo Camarasu at 2024-05-05T00:19:38-04:00 doc: Fix type error in hs_try_putmvar example - - - - - af000532 by Moritz Schuler at 2024-05-05T06:30:58-04:00 Fix parsing of module names in CLI arguments closes issue #24732 - - - - - da74e9c9 by Ben Gamari at 2024-05-05T06:31:34-04:00 ghc-platform: Add Setup.hs The Hadrian bootstrapping script relies upon `Setup.hs` to drive its build. Addresses #24761. - - - - - 35d34fde by Alan Zimmerman at 2024-05-05T12:52:40-04:00 EPA: preserve comments in class and data decls Fix checkTyClHdr which was discarding comments. Closes #24755 - - - - - 03c5dfbf by Simon Peyton Jones at 2024-05-05T12:53:15-04:00 Fix a float-out error Ticket #24768 showed that the Simplifier was accidentally destroying a join point. It turned out to be that we were sending a bottoming join point to the top, accidentally abstracting over /other/ join points. Easily fixed. - - - - - adba68e7 by John Ericson at 2024-05-05T19:35:56-04:00 Substitute bindist files with Hadrian not configure The `ghc-toolchain` overhaul will eventually replace all this stuff with something much more cleaned up, but I think it is still worth making this sort of cleanup in the meantime so other untanglings and dead code cleaning can procede. I was able to delete a fair amount of dead code doing this too. `LLVMTarget_CPP` is renamed to / merged with `LLVMTarget` because it wasn't actually turned into a valid CPP identifier. (Original to 1345c7cc42c45e63ab1726a8fd24a7e4d4222467, actually.) Progress on #23966 Co-Authored-By: Sylvain Henry <hsyl20 at gmail.com> - - - - - 18f4ff84 by Alan Zimmerman at 2024-05-05T19:36:32-04:00 EPA: fix mkHsOpTyPV duplicating comments Closes #24753 - - - - - a19201d4 by Matthew Craven at 2024-05-06T19:54:29-04:00 Add test cases for #24664 ...since none are present in the original MR !12463 fixing this issue. - - - - - 46328a49 by Alan Zimmerman at 2024-05-06T19:55:05-04:00 EPA: preserve comments in data decls Closes #24771 - - - - - 3b51995c by Andrei Borzenkov at 2024-05-07T14:39:40-04:00 Rename Solo# data constructor to MkSolo# (#24673) - data Solo# a = (# a #) + data Solo# a = MkSolo# a And `(# foo #)` syntax now becomes just a syntactic sugar for `MkSolo# a`. - - - - - 4d59abf2 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Add the cmm_cpp_is_gcc predicate to the testsuite A future C-- test called T24474-cmm-override-g0 relies on the GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it emitting #defines past the preprocessing stage. Clang, at least, does not do this, so the test would fail if ran on Clang. As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of the workaround we apply as a fix for bug #24474, and the workaround was for GCC-specific behaviour, the test needs to be marked as fragile on other compilers. - - - - - 25b0b404 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Split out the C-- preprocessor, and make it pass -g0 Previously, C-- was processed with the C preprocessor program. This means that it inherited flags passed via -optc. A flag that is somewhat often passed through -optc is -g. At certain -g levels (>=2), GCC starts emitting defines *after* preprocessing, for the purposes of debug info generation. This is not useful for the C-- compiler, and, in fact, causes lexer errors. We can suppress this effect (safely, if supported) via -g0. As a workaround, in older versions of GCC (<=10), GCC only emitted defines if a certain set of -g*3 flags was passed. Newer versions check the debug level. For the former, we filter out those -g*3 flags and, for the latter, we specify -g0 on top of that. As a compatible and effective solution, this change adds a C-- preprocessor distinct from the C compiler and preprocessor, but that keeps its flags. The command line produced for C-- preprocessing now looks like: $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/24474 - - - - - 9b4129a5 by Andreas Klebinger at 2024-05-08T13:24:20-04:00 -fprof-late: Only insert cost centres on functions/non-workfree cafs. They are usually useless and doing so for data values comes with a large compile time/code size overhead. Fixes #24103 - - - - - 259b63d3 by Sebastian Graf at 2024-05-08T13:24:57-04:00 Simplifier: Preserve OccInfo on DataAlt fields when case binder is dead (#24770) See the adjusted `Note [DataAlt occ info]`. This change also has a positive repercussion on `Note [Combine case alts: awkward corner]`. Fixes #24770. We now try not to call `dataConRepStrictness` in `adjustFieldsIdInfo` when all fields are lazy anyway, leading to a 2% ghc/alloc decrease in T9675. Metric Decrease: T9675 - - - - - 31b28cdb by Sebastian Graf at 2024-05-08T13:24:57-04:00 Kill seqRule, discard dead seq# in Prep (#24334) Discarding seq#s in Core land via `seqRule` was problematic; see #24334. So instead we discard certain dead, discardable seq#s in Prep now. See the updated `Note [seq# magic]`. This fixes the symptoms of #24334. - - - - - b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00 Document NcgImpl methods Fixes #19914 - - - - - 4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00 Make renamer to be more flexible with parens in the LHS of the rules We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621 - - - - - ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00 IPE: Eliminate dependency on Read Instead of encoding the closure type as decimal string we now simply represent it as an integer, eliminating the need for `Read` in `GHC.Internal.InfoProv.Types.peekInfoProv`. Closes #24504. ------------------------- Metric Decrease: T24602_perf_size size_hello_artifact ------------------------- - - - - - a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00 testsuite: fix testwsdeque with recent clang This patch fixes compilation of testwsdeque.c with recent versions of clang, which will fail with the error below: ``` testwsdeque.c:95:33: error: warning: format specifies type 'long' but the argument has type 'void *' [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~~ ^ testwsdeque.c:95:39: error: warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~ ^~~ | %lu testwsdeque.c:133:42: error: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types] 133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); | ^~~~~ /workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error: note: passing argument to parameter 'startProc' here 193 | OSThreadProc *startProc, void *param); | ^ 2 warnings and 1 error generated. ``` - - - - - c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00 Rename pre-processor invocation args Small clean up. Uses proper names for the various groups of arguments that make up the pre-processor invocation. - - - - - 2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00 ghc-heap: fix typo in ghc-heap cbits - - - - - fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00 Improve performance of Data.List.sort(By) This patch improves the algorithm to sort lists in base. It does so using two strategies: 1) Use a four-way-merge instead of the 'default' two-way-merge. This is able to save comparisons and allocations. 2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization. This mainly benefits types with a fast (>). Note that this *may* break instances with a *malformed* Ord instance where `a > b` is *not* equal to `compare a b == GT`. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236 Fixes #24280 ------------------------- Metric Decrease: MultiLayerModulesTH_Make T10421 T13719 T15164 T18698a T18698b T1969 T9872a T9961 T18730 WWRec T12425 T15703 ------------------------- - - - - - 1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00 Revert "ghcup-metadata: Drop output_name field" This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f. This breaks the ghcup metadata generation on the nightly jobs. - - - - - daff1e30 by Jannis at 2024-05-12T13:38:35-04:00 Division by constants optimization - - - - - 413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00 Tidy: Add flag to expose unfoldings if they take dictionary arguments. Add the flag `-fexpose-overloaded-unfoldings` to be able to control this behaviour. For ghc's boot libraries file size grew by less than 1% when it was enabled. However I refrained from enabling it by default for now. I've also added a section on specialization more broadly to the users guide. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: T12425 T13386 hard_hole_fits ------------------------- - - - - - c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00 Don't store a GlobalRdrEnv in `mi_globals` for GHCi. GHCi only needs the `mi_globals` field for modules imported with :module +*SomeModule. It uses this field to make the top level environment in `SomeModule` available to the repl. By default, only the first target in the command line parameters is "star" loaded into GHCi. Other modules have to be manually "star" loaded into the repl. Storing the top level GlobalRdrEnv for each module is very wasteful, especially given that we will most likely never need most of these environments. Instead we store only the information needed to reconstruct the top level environment in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements as well as all top level symbols defined in the module (not taking export lists into account) When a particular module is "star-loaded" into GHCi (as the first commandline target, or via an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using the `IfaceTopEnv`. - - - - - d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00 Add perf regression test for `-fwrite-if-simplified-core` - - - - - 2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00 Improve pattern to type pattern transformation (23739) `pat_to_type_pat` function now can handle more patterns: - TuplePat - ListPat - LitPat - NPat - ConPat Allowing these new constructors in type patterns significantly increases possible shapes of type patterns without `type` keyword. This patch also changes how lookups in `lookupOccRnConstr` are performed, because we need to fall back into types when we didn't find a constructor on data level to perform `ConPat` to type transformation properly. - - - - - be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00 hadrian: fix hadrian building with ghc-9.10.1 - - - - - ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00 linters: fix lint-whitespace compilation with ghc-9.10.1 - - - - - a593f284 by Andreas Klebinger at 2024-05-15T07:32:10-04:00 Expand the `inline` rule to look through casts/ticks. Fixes #24808 - - - - - b1e0c313 by Cheng Shao at 2024-05-15T07:32:46-04:00 testsuite: bump PartialDownSweep timeout to 5x on wasm32 - - - - - b2227487 by Fendor at 2024-05-15T17:14:06-04:00 Add Eq and Ord instance to `IfaceType` We add an `Ord` instance so that we can store `IfaceType` in a `Data.Map` container. This is required to deduplicate `IfaceType` while writing `.hi` files to disk. Deduplication has many beneficial consequences to both file size and memory usage, as the deduplication enables implicit sharing of values. See issue #24540 for more motivation. The `Ord` instance would be unnecessary if we used a `TrieMap` instead of `Data.Map` for the deduplication process. While in theory this is clerarly the better option, experiments on the agda code base showed that a `TrieMap` implementation has worse run-time performance characteristics. To the change itself, we mostly derive `Eq` and `Ord`. This requires us to change occurrences of `FastString` with `LexicalFastString`, since `FastString` has no `Ord` instance. We change the definition of `IfLclName` to a newtype of `LexicalFastString`, to make such changes in the future easier. Bump haddock submodule for IfLclName changes - - - - - d368f9a6 by Fendor at 2024-05-15T17:14:06-04:00 Move out LiteralMap to avoid cyclic module dependencies - - - - - 2fcc09fd by Fendor at 2024-05-15T17:14:06-04:00 Add deduplication table for `IfaceType` The type `IfaceType` is a highly redundant, tree-like data structure. While benchmarking, we realised that the high redundancy of `IfaceType` causes high memory consumption in GHCi sessions when byte code is embedded into the `.hi` file via `-fwrite-if-simplified-core` or `-fbyte-code-and-object-code`. Loading such `.hi` files from disk introduces many duplicates of memory expensive values in `IfaceType`, such as `IfaceTyCon`, `IfaceTyConApp`, `IA_Arg` and many more. We improve the memory behaviour of GHCi by adding an additional deduplication table for `IfaceType` to the serialisation of `ModIface`, similar to how we deduplicate `Name`s and `FastString`s. When reading the interface file back, the table allows us to automatically share identical values of `IfaceType`. To provide some numbers, we evaluated this patch on the agda code base. We loaded the full library from the `.hi` files, which contained the embedded core expressions (`-fwrite-if-simplified-core`). Before this patch: * Load time: 11.7 s, 2.5 GB maximum residency. After this patch: * Load time: 7.3 s, 1.7 GB maximum residency. This deduplication has the beneficial side effect to additionally reduce the size of the on-disk interface files tremendously. For example, on agda, we reduce the size of `.hi` files (with `-fwrite-if-simplified-core`): * Before: 101 MB on disk * Now: 24 MB on disk This has even a beneficial side effect on the cabal store. We reduce the size of the store on disk: * Before: 341 MB on disk * Now: 310 MB on disk Note, none of the dependencies have been compiled with `-fwrite-if-simplified-core`, but `IfaceType` occurs in multiple locations in a `ModIface`. We also add IfaceType deduplication table to .hie serialisation and refactor .hie file serialisation to use the same infrastrucutre as `putWithTables`. Bump haddock submodule to accomodate for changes to the deduplication table layout and binary interface. - - - - - 36aa7cf1 by Fendor at 2024-05-15T17:14:06-04:00 Add run-time configurability of `.hi` file compression Introduce the flag `-fwrite-if-compression=<n>` which allows to configure the compression level of writing .hi files. The motivation is that some deduplication operations are too expensive for the average use case. Hence, we introduce multiple compression levels with variable impact on performance, but still reduce the memory residency and `.hi` file size on disk considerably. We introduce three compression levels: * `1`: `Normal` mode. This is the least amount of compression. It deduplicates only `Name` and `FastString`s, and is naturally the fastest compression mode. * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is marginally slower than `Normal` mode. In general, it should be safe to always use `Safe` mode. * `3`: `Full` deduplication mode. Deduplicate as much as we can, resulting in minimal .hi files, but at the cost of additional compilation time. Reading .hi files doesn't need to know the initial compression level, and can always deserialise a `ModIface`, as we write out a byte that indicates the next value has been deduplicated. This allows users to experiment with different compression levels for packages, without recompilation of dependencies. Note, the deduplication also has an additional side effect of reduced memory consumption to implicit sharing of deduplicated elements. See https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for example where that matters. ------------------------- Metric Decrease: MultiLayerModulesDefsGhciWithCore T16875 T21839c T24471 hard_hole_fits libdir ------------------------- - - - - - 1e63a6fb by Matthew Pickering at 2024-05-15T17:14:07-04:00 Introduce regression tests for `.hi` file sizes Add regression tests to track how `-fwrite-if-compression` levels affect the size of `.hi` files. - - - - - 639d742b by M Farkas-Dyck at 2024-05-15T17:14:49-04:00 TTG: ApplicativeStatement exist only in Rn and Tc Co-Authored-By: romes <rodrigo.m.mesquita at gmail.com> - - - - - aa7b336b by Jade at 2024-05-15T23:06:17-04:00 Documentation: Improve documentation for symbols exported from System.IO - - - - - c561de8f by Jade at 2024-05-15T23:06:54-04:00 Improve suggestions for language extensions - When suggesting Language extensions, also suggest Extensions which imply them - Suggest ExplicitForAll and GADTSyntax instead of more specific extensions - Rephrase suggestion to include the term 'Extension' - Also moves some flag specific definitions out of Session.hs into Flags.hs (#24478) Fixes: #24477 Fixes: #24448 Fixes: #10893 - - - - - 4c7ae2a1 by Andreas Klebinger at 2024-05-15T23:07:30-04:00 Testsuite: Check if llvm assembler is available for have_llvm - - - - - bc672166 by Torsten Schmits at 2024-05-15T23:08:06-04:00 refactor quadratic search in warnMissingHomeModules - - - - - 7875e8cb by Torsten Schmits at 2024-05-15T23:08:06-04:00 add test that runs MakeDepend on thousands of modules - - - - - b84b91f5 by Adam Gundry at 2024-05-16T15:32:06-04:00 Representation-polymorphic HasField (fixes #22156) This generalises the HasField class to support representation polymorphism, so that instead of type HasField :: forall {k} . k -> Type -> Type -> Constraint we have type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint - - - - - 05285090 by Matthew Pickering at 2024-05-16T15:32:43-04:00 Bump os-string submodule to 2.0.2.2 Closes #24786 - - - - - 886ab43a by Cheng Shao at 2024-05-17T01:34:50-04:00 rts: do not prefetch mark_closure bdescr in non-moving gc when ASSERTS_ENABLED This commit fixes a small an oversight in !12148: the prefetch logic in non-moving GC may trap in debug RTS because it calls Bdescr() for mark_closure which may be a static one. It's fine in non-debug RTS because even invalid bdescr addresses are prefetched, they will not cause segfaults, so this commit implements the most straightforward fix: don't prefetch mark_closure bdescr when assertions are enabled. - - - - - b38dcf39 by Teo Camarasu at 2024-05-17T01:34:50-04:00 rts: Allocate non-moving segments with megablocks Non-moving segments are 8 blocks long and need to be aligned. Previously we serviced allocations by grabbing 15 blocks, finding an aligned 8 block group in it and returning the rest. This proved to lead to high levels of fragmentation as a de-allocating a segment caused an 8 block gap to form, and this could not be reused for allocation. This patch introduces a segment allocator based around using entire megablocks to service segment allocations in bulk. When there are no free segments, we grab an entire megablock and fill it with aligned segments. As the megablock is free, we can easily guarantee alignment. Any unused segments are placed on a free list. It only makes sense to free segments in bulk when all of the segments in a megablock are freeable. After sweeping, we grab the free list, sort it, and find all groups of segments where they cover the megablock and free them. This introduces a period of time when free segments are not available to the mutator, but the risk that this would lead to excessive allocation is low. Right after sweep, we should have an abundance of partially full segments, and this pruning step is relatively quick. In implementing this we drop the logic that kept NONMOVING_MAX_FREE segments on the free list. We also introduce an eventlog event to log the amount of pruned/retained free segments. See Note [Segment allocation strategy] Resolves #24150 ------------------------- Metric Decrease: T13253 T19695 ------------------------- - - - - - 710665bd by Cheng Shao at 2024-05-17T01:35:30-04:00 rts: fix I/O manager compilation errors for win32 target This patch fixes I/O manager compilation errors for win32 target discovered when cross-compiling to win32 using recent clang: ``` rts/win32/ThrIOManager.c:117:7: error: error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | if (is_io_mng_native_p ()) { | ^ | 117 | if (is_io_mng_native_p ()) { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/fs.c:143:28: error: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 143 | int setErrNoFromWin32Error () { | ^ | void | 143 | int setErrNoFromWin32Error () { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:227:9: error: error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 227 | interruptIOManagerEvent (); | ^ | 227 | interruptIOManagerEvent (); | ^ rts/win32/ConsoleHandler.c:227:9: error: note: did you mean 'getIOManagerEvent'? | 227 | interruptIOManagerEvent (); | ^ rts/include/rts/IOInterface.h:27:10: error: note: 'getIOManagerEvent' declared here 27 | void * getIOManagerEvent (void); | ^ | 27 | void * getIOManagerEvent (void); | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:196:9: error: error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/win32/ConsoleHandler.c:196:9: error: note: did you mean 'postThreadLabel'? | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/eventlog/EventLog.h:118:6: error: note: 'postThreadLabel' declared here 118 | void postThreadLabel(Capability *cap, | ^ | 118 | void postThreadLabel(Capability *cap, | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) ``` - - - - - 28b9cee0 by Rodrigo Mesquita at 2024-05-17T01:36:05-04:00 configure: Check C99-compat for Cmm preprocessor Fixes #24815 - - - - - 8927e0c3 by Andreas Klebinger at 2024-05-17T01:36:41-04:00 Ensure `tcHasFixedRuntimeRep (# #)` returns True. - - - - - 04179044 by doyougnu at 2024-05-17T09:00:32-04:00 testsuite: make find_so regex less general Closes #24759 Background. In MR !12372 we began tracking shared object files and directories sizes for dependencies. However, this broke release builds because release builds alter the filenames swapping "in-place" for a hash. This was not considered in the MR and thus broke release pipelines. Furthermore, the rts_so test was found to be wildly varying and was therefore disabled in !12561. This commit fixes both of these issues: - fix the rts_so test by making the regex less general, now the rts_so test and all other foo.so tests must match "libHS<some-lib>-<version>-<hash|'in-place>-<ghc>". This prevents the rts_so test from accidentally matching different rts variants such as rts_threaded, which was the cause of the wild swings after !12372. - add logic to match either a hash or the string in-place. This should make the find_so function build agnostic. - - - - - 0962b50d by Andreas Klebinger at 2024-05-17T09:01:08-04:00 TagAnalysis: Treat all bottom ids as tagged during analysis. Ticket #24806 showed that we also need to treat dead end thunks as tagged during the analysis. - - - - - 7eb9f184 by Ben Gamari at 2024-05-17T11:23:37-04:00 Remove haddock submodule In preparation for merge into the GHC, as proposed in #23178. - - - - - 47b14dcc by Fendor at 2024-05-17T11:28:17-04:00 Adapt to `IfLclName` newtype changes (cherry picked from commit a711607e29b925f3d69e27c5fde4ba655c711ff1) - - - - - 6cc6681d by Fendor at 2024-05-17T11:28:17-04:00 Add IfaceType deduplication table to interface file serialisation Although we do not really need it in the interface file serialisation, as the deserialisation uses `getWithUserData`, we need to mirror the structure `getWithUserData` expects. Thus, we write essentially an empty `IfaceType` table at the end of the file, as the interface file doesn't reference `IfaceType`. (cherry picked from commit c9bc29c6a708483d2abc3d8ec9262510ce87ca61) - - - - - b9721206 by Ben Gamari at 2024-05-17T11:30:22-04:00 ghc-tags.yaml: Initial commit - - - - - 074e7d8f by Ben Gamari at 2024-05-17T11:31:29-04:00 fourmolu: Add configuration - - - - - 151b1736 by Ben Gamari at 2024-05-17T11:32:52-04:00 Makefile: Rework for use by haddock developers Previously the Makefile was present only for GHC's old make-based build system. Now since the make-based build system is gone we can use it for more useful ends. - - - - - a7dcf13b by Ben Gamari at 2024-05-17T11:36:14-04:00 Reformat with fourmolu Using previously-added configuration and `fourmolu -i .` Note that we exclude the test-cases (`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to formatting. - - - - - 0ea6017b by Ben Gamari at 2024-05-17T11:40:04-04:00 Add 'utils/haddock/' from commit 'a7dcf13bfbb97b20e75cc8ce650e2bb628db4660' git-subtree-dir: utils/haddock git-subtree-mainline: 7eb9f1849b1c72a1c61dee88462b4244550406f3 git-subtree-split: a7dcf13bfbb97b20e75cc8ce650e2bb628db4660 - - - - - aba1d304 by Hécate Moonlight at 2024-05-17T11:40:48-04:00 Add exceptions to the dangling notes list - - - - - 527bfbfb by Hécate Moonlight at 2024-05-17T11:40:52-04:00 Add haddock to the whitespace lint ignore list - - - - - 43274677 by Ben Gamari at 2024-05-17T11:41:20-04:00 git-blame-ignore-revs: Ignore haddock reformatting - - - - - 0e679e37 by Fendor at 2024-05-18T00:27:24-04:00 Pass cpp options to the CC builder in hadrian - - - - - bb40244e by Sylvain Henry at 2024-05-18T00:28:06-04:00 JS: fix allocation constant (fix #24746) - - - - - 646d30ab by Jade at 2024-05-18T19:23:31+02:00 Add highlighting for inline-code snippets in haddock - - - - - 64459a3e by Hécate Moonlight at 2024-05-19T08:42:27-04:00 haddock: Add a .readthedocs.yml file for online documentation - - - - - 7d3d9bbf by Serge S. Gulin at 2024-05-19T18:47:05+00:00 Unicode: General Category size test (related #24789) Added trivial size performance test which involves unicode general category usage via `read`. The `read` itself uses general category to detect spaces. The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789. - - - - - 8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00 EPA: Remove redundant code Remove unused epAnnAnns function various cases for showAstData that no longer exist - - - - - 071d7a1e by Rodrigo Mesquita at 2024-05-20T10:55:16-04:00 Improve docs on closed type families in hs-boots Fixes #24776 - - - - - d9e2c119 by Torsten Schmits at 2024-05-20T10:55:52-04:00 Use default deviation for large-project test This new performance test has the purpose of detecting regressions in complexity in relation to the number of modules in a project, so 1% deviation is way too small to avoid false positives. - - - - - 20b0136a by Ben Gamari at 2024-05-22T00:31:39-04:00 ghcup-metadata: Various fixes from 9.10.1 Use Debian 12/x86-64, Debian 10/aarch64, and Debian 11/aarch64 bindists where possible. - - - - - 6838a7c3 by Sylvain Henry at 2024-05-22T00:32:23-04:00 Reverse arguments to stgCallocBytes (fix #24828) - - - - - f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00 Add log messages for Iface serialisation compression level Fix the label of the number of 'IfaceType' entries in the log message. Add log message for the compression level that is used to serialise a an interface file. Adds `Outputable` instance for 'CompressionIFace'. - - - - - 3bad5d55 by Hécate Moonlight at 2024-05-22T00:33:40-04:00 base: Update doctests outputs ghc-internal: Update doctests outputs - - - - - 9317c6fb by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix the testsuites of the haddock-library - Apply all the metadata revisions from Hackage to the cabal file. - Fix the `ParserSpec.hs` file in the `spec` testsuite of haddock-library. - Make `CHANGES.md` an extra-doc-file instead of an extra-source-file. - - - - - 54073b02 by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix parser of @since pragma The testsuite contained tests for annotations of the form `@since foo-bar-0.5.0`, but the parser was written incorrectly. - - - - - ede6ede3 by Matthew Pickering at 2024-05-22T00:34:57-04:00 Fix nightly pages job It seems likely broken by 9f99126a which moved `index.html` from the root folder into `docs/` folder. Fixes #24840 - - - - - b7bcf729 by Cheng Shao at 2024-05-22T00:35:32-04:00 autoconf: remove unused context diff check This patch removes redundant autoconf check for the context diff program given it isn't actually been used anywhere, especially since make removal. - - - - - ea2fe66e by Hécate Moonlight at 2024-05-22T00:36:13-04:00 haddock: Rework the contributing guide - - - - - 0f302a94 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 haddock: Add module relationships diagrams of haddock-api and haddock-library - - - - - d1a9f34f by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add instructions - - - - - b880ee80 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add SVG outputs - - - - - 6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00 rts: Fix size of StgOrigThunkInfo frames Previously the entry code of the `stg_orig_thunk` frame failed to account for the size of the profiling header as it hard-coded the frame size. Fix this. Fixes #24809. - - - - - c645fe40 by Fendor at 2024-05-22T13:40:05-04:00 Add regression test T24809 for stg_orig_thunk_info_frame size - - - - - 4181aa40 by Andreas Klebinger at 2024-05-22T13:40:42-04:00 bindists: Check for existence of share folder before trying to copy it. This folder isn't distributed in windows bindists A lack of doing so resulted us copying loads of files twice. - - - - - d216510e by Matthew Pickering at 2024-05-22T13:40:42-04:00 Remove ad-hoc installation of mingw toolchain in relocatable bindists This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951 The choice about whether to install mingw is taken in the installation makefile. This is also broken on non-windows systems. The actual issue was the EnableDistroToolchain variable wasn't declared in mk/config.mk and therefore the check to install mingw was failing. - - - - - 7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04:00 testsuite: fix T17920 for wasm backend T17920 was marked as fragile on wasm before; it can be trivially fixed by avoiding calling variadic printf() in cmm. - - - - - c739383b by Cheng Shao at 2024-05-22T21:53:29-04:00 testsuite: bump T22744 timeout to 5x - - - - - c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00 testsuite: don't attempt to detect host cpu features when testing cross ghc The testsuite driver CPU feature detection logic only detects host CPU and only makes sense when we are not testing a cross GHC. - - - - - 3d9e4ce6 by Simon Peyton Jones at 2024-05-22T21:54:43-04:00 Better skolemisation As #24810 showed, it is (a little) better to skolemise en-bloc, so that Note [Let-bound skolems] fires more often. See Note [Skolemisation en bloc] in GHC.Tc.Utils.Instantiate. - - - - - a3cd3a1d by Ryan Scott at 2024-05-22T21:55:19-04:00 Add missing parenthesizePat in cvtp We need to ensure that the output of `cvtp` is parenthesized (at precedence `sigPrec`) so that any pattern signatures with a surrounding pattern signature can parse correctly. Fixes #24837. - - - - - 4bb2a7cc by Hécate Moonlight at 2024-05-22T21:55:59-04:00 [base] Document the memory overhead of ByteArray Add a diagram that shows the constituent parts of a ByteArray and their memory overhead. - - - - - 8b2a016a by Hécate Moonlight at 2024-05-22T21:56:38-04:00 Haddock: Add MR template for Haddock - - - - - ead75532 by Peter Trommler at 2024-05-23T02:28:05-04:00 PPC: Support ELF v2 on powerpc64 big-endian Detect ELF v2 on PowerPC 64-bit systems. Check for `_CALL_ELF` preprocessor macro. Fixes #21191 - - - - - 9d4c10f2 by Hécate Kleidukos at 2024-05-23T02:28:44-04:00 gitlab: Add @Kleidukos to CODEOWNERS for utils/haddock - - - - - 28e64170 by Preetham Gujjula at 2024-05-23T07:20:48-04:00 haddock: Add cabal-fmt to tools for `make style` - - - - - 00126a89 by Andrei Borzenkov at 2024-05-23T07:21:24-04:00 haddock: fix verbosity option parsing - - - - - a3e0b68b by Ryan Hendrickson at 2024-05-23T15:52:03-04:00 base: specify tie-breaking behavior of min, max, and related list/Foldable functions - - - - - bdcc0f37 by doyougnu at 2024-05-24T07:51:18-04:00 cmm: add word <-> double/float bitcast - closes: #25331 This is the last step in the project plan described in #25331. This commit: - adds bitcast operands for x86_64, LLVM, aarch64 - For PPC and i386 we resort to using the cmm implementations - renames conversion MachOps from Conv to Round|Truncate - - - - - f0d257f7 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor Some functions in StgToByteCode were filtering out void arguments. However, StgToByteCode is called after unarisation: the void arguments should have been removed earlier. Instead of filtering out, we assert that the args are non-void. - - - - - 03137fd2 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor `layoutNativeCall` was always called with a `primRepCmmType platform` callback. Hence we can put it inside of `layoutNativeCall` rather than repeat it. - - - - - 27c430f3 by David Binder at 2024-05-24T07:52:38-04:00 haddock: Remove compatibility shims for GHC < 8.4 from haddock-library - - - - - 8dd8a076 by Cheng Shao at 2024-05-24T07:53:14-04:00 compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs This patch makes the STG->Cmm backend avoid saving foreign call target to local when there are no caller-save GlobalRegs. Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a foreign call, we unconditionally save the foreign call target to a temporary local first, then rely on cmmSink to clean it up later, which only happens with -fcmm-sink (implied by -O) and not in unoptimized code. And this is troublesome for the wasm backend NCG, which needs to infer a foreign call target symbol's type signature from the Cmm call site. Previously, the NCG has been emitting incorrect type signatures for unoptimized code, which happens to work with `wasm-ld` most of the time, but this is never future-proof against upstream toolchain updates, and it causes horrible breakages when LTO objects are included in linker input. Hence this patch. - - - - - 986df1ab by Cheng Shao at 2024-05-24T07:53:14-04:00 testsuite: add callee-no-local regression test - - - - - 52d62e2a by Sylvain Henry at 2024-05-24T07:53:57-04:00 Fix HasCallStack leftovers from !12514 / #24726 - - - - - c5e00c35 by crumbtoo at 2024-05-24T07:54:38-04:00 user_guide: Fix typo in MultiWayIf chapter Close #24829 - - - - - bd323b0e by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Ensure that CHANGELOG is included in extra-source-files This was missed in the `ghc-internal` split. Closes #24831. - - - - - 1bfd32e8 by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Fix changelog reference to setBacktraceMechanismState (cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d) - - - - - 43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00 Float/double unboxed literal support for HexFloatLiterals (fix #22155) - - - - - 4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00 Improve test labels for binary interface file size tests Test labels for binary interface file sizes are hard to read and overly verbose at the same time. Extend the name for the metric title, but shorten it in the actual comparison table. - - - - - 14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00 Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present" This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa. - - - - - f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00 Fix default hyperlinked sources pattern Previously this didn't include the `%M` token which manifested as broken links to the hyperlinked sources of reexports of declarations defined in other packages. Fixes haddock#1628. (cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36) - - - - - 42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00 Make DocPaths a proper data type (cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c) - - - - - 53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00 haddock: Bump version to 2.30 (cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602) - - - - - e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00 haddock-api: allow base 4.20 and ghc 9.11 - - - - - e294f7a2 by PHO at 2024-05-24T12:17:55-04:00 Add a flag "threaded" for building haddock with the threaded RTS GHC isn't guaranteed to have a threaded RTS. There should be a way to build it with the vanilla one. (cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d) - - - - - 51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00 Update ticky counter event docs. Add the info about the info table address and json fields. Fixes #23200 - - - - - 98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00 Export extractPromotedList (#24866) This can be useful in plugins. - - - - - 228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00 template-haskell: Move wired-ins to ghc-internal Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so ------------------------- - - - - - 62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00 testsuite: mark tests broken by #24886 Now that `template-haskell` is no longer wired-in. These tests are triggering #24886, and so need to be marked broken. - - - - - 3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00 rts: fix missing function prototypes in ClosureMacros.h - - - - - e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00 UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful. - - - - - d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00 ci: Update ci-images commit for fedora38 image The fedora38 nightly job has been failing for quite a while because `diff` was no longer installed. The ci-images bump explicitly installs `diffutils` into these images so hopefully they now pass again. - - - - - 3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00 Update exactprint docs - - - - - 77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00 Incorporate review feedback - - - - - 87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00 Remove no longer relevant reference to comments - - - - - 05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00 Replace outdated code example - - - - - 45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00 Reword error resulting from missing -XBangPatterns. It can be the result of either a bang pattern or strict binding, so now we say so instead of claiming it must be a bang pattern. Fixes #21032 - - - - - e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00 testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x - - - - - 7a660042 by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: ensure gc_thread/gen_workspace is allocated with proper alignment gc_thread/gen_workspace are required to be aligned by 64 bytes. However, this property has not been properly enforced before, and numerous alignment violations at runtime has been caught by UndefinedBehaviorSanitizer that look like: ``` rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment 0x0000027a3390: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8 rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment 0x0000027a3450: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13 ``` This patch fixes the gc_thread/gen_workspace misalignment issue by explicitly allocating them with alignment constraint. - - - - - c77a48af by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: fix an unaligned load in nonmoving gc This patch fixes an unaligned load in nonmoving gc by ensuring the closure address is properly untagged first before attempting to prefetch its header. The unaligned load is reported by UndefinedBehaviorSanitizer: ``` rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment 0x0042005f3a71: note: pointer points here 00 00 00 98 43 13 8e 12 7f 00 00 50 3c 5f 00 42 00 00 00 58 17 b7 92 12 7f 00 00 89 cb 5e 00 42 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9 ``` This issue had previously gone unnoticed since it didn't really harm runtime correctness, the invalid header address directly loaded from a tagged pointer is only used as prefetch address and will not cause segfaults. However, it still should be corrected because the prefetch would be rendered useless by this issue, and untagging only involves a single bitwise operation without memory access so it's cheap enough to add. - - - - - 05c4fafb by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: use __builtin_offsetof to implement STG_FIELD_OFFSET This patch fixes the STG_FIELD_OFFSET macro definition by using __builtin_offsetof, which is what gcc/clang uses to implement offsetof in standard C. The previous definition that uses NULL pointer involves subtle undefined behavior in C and thus reported by UndefinedBehaviorSanitizer as well: ``` rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58 ``` - - - - - 5ff83bfc by Sylvain Henry at 2024-05-30T14:43:10-04:00 JS: remove useless h$CLOCK_REALTIME (#23202) - - - - - 95ef2d58 by Matthew Pickering at 2024-05-30T14:43:47-04:00 ghcup-metadata: Fix metadata generation There were some syntax errors in the generation script which were preventing it from running. I have tested this with: ``` nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525 ``` which completed successfully. - - - - - 1bc66ee4 by Jakob Bruenker at 2024-05-30T14:44:22-04:00 Add diagrams to Arrows documentation This adds diagrams to the documentation of Arrows, similar to the ones found on https://www.haskell.org/arrows/. It does not add diagrams for ArrowChoice for the time being, mainly because it's not clear to me how to visually distinguish them from the ones for Arrow. Ideally, you might want to do something like highlight the arrows belonging to the same tuple or same Either in common colors, but that's not really possible with unicode. - - - - - d10a1c65 by Matthew Craven at 2024-05-30T23:35:48-04:00 Make UnsafeSNat et al. into pattern synonyms ...so that they do not cause coerce to bypass the nominal role on the corresponding singleton types when they are imported. See Note [Preventing unsafe coercions for singleton types] and the discussion at #23478. This also introduces unsafeWithSNatCo (and analogues for Char and Symbol) so that users can still access the dangerous coercions that importing the real constructors would allow, but only in a very localized way. - - - - - 0958937e by Cheng Shao at 2024-05-30T23:36:25-04:00 hadrian: build C/C++ with split sections when enabled When split sections is enabled, ensure -fsplit-sections is passed to GHC as well when invoking GHC to compile C/C++; and pass -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++ with the hadrian Cc builder. Fixes #23381. - - - - - 02b1f91e by Cheng Shao at 2024-05-30T23:36:25-04:00 driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled When -fsplit-sections is passed to GHC, pass -ffunction-sections -fdata-sections to gcc/clang when building C/C++. Previously, -fsplit-sections was only respected by the NCG/LLVM backends, but not the unregisterised backend; the GHC driver did not pass -fdata-sections and -ffunction-sections to the C compiler, which resulted in excessive executable sizes. Fixes #23381. ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - fd47e2e3 by Cheng Shao at 2024-05-30T23:37:00-04:00 testsuite: mark process005 as fragile on JS - - - - - 34a04ea1 by Matthew Pickering at 2024-05-31T06:08:36-04:00 Add -Wderiving-typeable to -Wall Deriving `Typeable` does nothing, and it hasn't done for a long while. There has also been a warning for a long while which warns you about uselessly deriving it but it wasn't enabled in -Wall. Fixes #24784 - - - - - 75fa7b0b by Matthew Pickering at 2024-05-31T06:08:36-04:00 docs: Fix formatting of changelog entries - - - - - 303c4b33 by Preetham Gujjula at 2024-05-31T06:09:21-04:00 docs: Fix link to injective type families paper Closes #24863 - - - - - df97e9a6 by Ben Gamari at 2024-05-31T06:09:57-04:00 ghc-internal: Fix package description The previous description was inherited from `base` and was inappropriate for `ghc-internal`. Also fix the maintainer and bug reporting fields. Closes #24906. - - - - - bf0737c0 by Cheng Shao at 2024-05-31T06:10:33-04:00 compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans This patch removes special consideration for ArchWasm32 in cmmDoCmmSwitchPlans, which means the compiler will now disable cmmImplementSwitchPlans for wasm unreg backend, just like unreg backend of other targets. We enabled it in the past to workaround some compile-time panic in older versions of LLVM, but those panics are no longer present, hence no need to keep this workaround. - - - - - 7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00 utils: add hie.yaml config file for ghc-config Add hie.yaml to ghc-config project directory so it can be edited using HLS. - - - - - 1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00 hadrian: handle findExecutable "" gracefully hadrian may invoke findExecutable "" at run-time due to a certain program is not found by configure script. Which is fine and findExecutable is supposed to return Nothing in this case. However, on Windows there's a directory bug that throws an exception (see https://github.com/haskell/directory/issues/180), so we might as well use a wrapper for findExecutable and handle exceptions gracefully. - - - - - 4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00 configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails When configure fails to find LLC/OPT/LLVMAS within supported version range, it used to set "llc"/"opt"/"clang" as fallback values. This behavior is particularly troublesome when the user has llc/opt/clang with other versions in their PATH and run the testsuite, since hadrian will incorrectly assume have_llvm=True and pass that to the testsuite driver, resulting in annoying optllvm test failures (#23186). If configure determines llc/opt/clang wouldn't work, then we shouldn't pretend it'll work at all, and the bindist configure will invoke FIND_LLVM_PROG check again at install time anyway. - - - - - 5f1afdf7 by Sylvain Henry at 2024-05-31T15:52:52-04:00 Introduce UniqueSet and use it to replace 'UniqSet Unique' 'UniqSet Unique' represents a set of uniques as a 'Map Unique Unique', which is wasting space (associated key/value are always the same). Fix #23572 and #23605 - - - - - e0aa42b9 by crumbtoo at 2024-05-31T15:53:33-04:00 Improve template-haskell haddocks Closes #15822 - - - - - ae170155 by Olivier Benz at 2024-06-01T09:35:17-04:00 Bump max LLVM version to 19 (not inclusive) - - - - - 92aa65ea by Matthew Pickering at 2024-06-01T09:35:17-04:00 ci: Update CI images to test LLVM 18 The debian12 image in this commit has llvm 18 installed. - - - - - adb1fe42 by Serge S. Gulin at 2024-06-01T09:35:53-04:00 Unicode: make ucd2haskell build-able again ucd2haskell tool used streamly library which version in cabal was out of date. It is updated to the latest version at hackage with deprecated parts rewritten. Also following fixes were applied to existing code in suppose that from its last run the code structure was changed and now it was required to be up to date with actual folder structures: 1. Ghc module path environment got a suffix with `src`. 2. Generated code got 2.1 `GHC.Internal` prefix for `Data.*`. 2.2 `GHC.Unicode.Internal` swapped on `GHC.Internal.Unicode` according to actual structure. - - - - - ad56fd84 by Jade at 2024-06-01T09:36:29-04:00 Replace 'NB' with 'Note' in error messages - - - - - 6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00 compiler: fix -ddump-cmm-raw when compiling .cmm This patch fixes missing -ddump-cmm-raw output when compiling .cmm, which is useful for debugging cmm related codegen issues. - - - - - 1c834ad4 by Ryan Scott at 2024-06-01T09:37:40-04:00 Print namespace specifiers in FixitySig's Outputable instance For whatever reason, the `Outputable` instance for `FixitySig` simply did not print out namespace specifiers, leading to the confusing `-ddump-splices` output seen in #24911. This patch corrects this oversight. Fixes #24911. - - - - - cf49fb5f by Sylvain Henry at 2024-06-01T09:38:19-04:00 Configure: display C++ compiler path - - - - - f9c1ae12 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable PIC for in-tree GMP on wasm32 This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. - - - - - 1a32f828 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable in-tree gmp fft code path for wasm32 This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. - - - - - 06277d56 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: build in-tree GMP with malloc-notreentrant on wasm32 This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. - - - - - 9f614270 by ARATA Mizuki at 2024-06-02T14:02:35-04:00 Set package include paths when assembling .S files Fixes #24839. Co-authored-by: Sylvain Henry <hsyl20 at gmail.com> - - - - - 4998a6ed by Alex Mason at 2024-06-03T02:09:29-04:00 Improve performance of genericWordQuotRem2Op (#22966) Implements the algorithm from compiler-rt's udiv128by64to64default. This rewrite results in a roughly 24x improvement in runtime on AArch64 (and likely any other arch that uses it). - - - - - ae50a8eb by Cheng Shao at 2024-06-03T02:10:05-04:00 testsuite: mark T7773 as fragile on wasm - - - - - c8ece0df by Fendor at 2024-06-03T19:43:22-04:00 Migrate `Finder` component to `OsPath`, fixed #24616 For each module in a GHCi session, we keep alive one `ModLocation`. A `ModLocation` is fairly inefficiently packed, as `String`s are expensive in memory usage. While benchmarking the agda codebase, we concluded that we keep alive around 11MB of `FilePath`'s, solely retained by `ModLocation`. We provide a more densely packed encoding of `ModLocation`, by moving from `FilePath` to `OsPath`. Further, we migrate the full `Finder` component to `OsPath` to avoid unnecessary transformations. As the `Finder` component is well-encapsulated, this requires only a minimal amount of changes in other modules. We introduce pattern synonym for 'ModLocation' which maintains backwards compatibility and avoids breaking consumers of 'ModLocation'. - - - - - 0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00 compiler: emit NaturallyAligned when element type & index type are the same width This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. - - - - - 18f63970 by Sebastian Graf at 2024-06-04T05:05:27-04:00 Parser: Remove unused `apats` rule - - - - - 38757c30 by David Knothe at 2024-06-04T05:05:27-04:00 Implement Or Patterns (#22596) This commit introduces a new language extension, `-XOrPatterns`, as described in GHC Proposal 522. An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ..., `patk` succeed, in this order. See also the summary `Note [Implmentation of OrPatterns]`. Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> - - - - - 395412e8 by Cheng Shao at 2024-06-04T05:06:04-04:00 compiler/ghci/rts: remove stdcall support completely We have formally dropped i386 windows support (#18487) a long time ago. The stdcall foreign call convention is only used by i386 windows, and the legacy logic around it is a significant maintenance burden for future work that adds arm64 windows support (#24603). Therefore, this patch removes stdcall support completely from the compiler as well as the RTS (#24883): - stdcall is still recognized as a FFI calling convention in Haskell syntax. GHC will now unconditionally emit a warning (-Wunsupported-calling-conventions) and treat it as ccall. - Apart from minimum logic to support the parsing and warning logic, all other code paths related to stdcall has been completely stripped from the compiler. - ghci only supports FFI_DEFAULT_ABI and ccall convention from now on. - FFI foreign export adjustor code on all platforms no longer handles the stdcall case and only handles ccall from now on. - The Win32 specific parts of RTS no longer has special code paths for stdcall. This commit is the final nail on the coffin for i386 windows support. Further commits will perform more housecleaning to strip the legacy code paths and pave way for future arm64 windows support. - - - - - d1fe9ab6 by Cheng Shao at 2024-06-04T05:06:04-04:00 rts: remove legacy i386 windows code paths This commit removes some legacy i386 windows related code paths in the RTS, given this target is no longer supported. - - - - - a605e4b2 by Cheng Shao at 2024-06-04T05:06:04-04:00 autoconf: remove i386 windows related logic This commit removes legacy i386 windows logic in autoconf scripts. - - - - - 91e5ac5e by Cheng Shao at 2024-06-04T05:06:04-04:00 llvm-targets: remove i386 windows support This commit removes i386 windows from llvm-targets and the script to generate it. - - - - - 65fe75a4 by Cheng Shao at 2024-06-04T05:06:04-04:00 libraries/utils: remove stdcall related legacy logic This commit removes stdcall related legacy logic in libraries and utils. ccall should be used uniformly for all supported windows hosts from now on. - - - - - d2a83302 by Cheng Shao at 2024-06-04T05:06:04-04:00 testsuite: adapt the testsuite for stdcall removal This patch adjusts test cases to handle the stdcall removal: - Some stdcall usages are replaced with ccall since stdcall doesn't make sense anymore. - We also preserve some stdcall usages, and check in the expected warning messages to ensure GHC always warn about stdcall usages (-Wunsupported-calling-conventions) as expected. - Error code testsuite coverage is slightly improved, -Wunsupported-calling-conventions is now tested. - Obsolete code paths related to i386 windows are also removed. - - - - - cef8f47a by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: minor adjustments for stdcall removal This commit include minor adjustments of documentation related to stdcall removal. - - - - - 54332437 by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: mention i386 Windows removal in 9.12 changelog This commit mentions removal of i386 Windows support and stdcall related change in the 9.12 changelog. - - - - - 2aaea8a1 by Cheng Shao at 2024-06-04T05:06:40-04:00 hadrian: improve user settings documentation This patch adds minor improvements to hadrian user settings documentation: - Add missing `ghc.cpp.opts` case - Remove non-existent `cxx` case - Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't - Add example of passing configure argument to autoconf packages - - - - - 71010381 by Alex Mason at 2024-06-04T12:09:07-04:00 Add AArch64 CLZ, CTZ, RBIT primop implementations. Adds support for emitting the clz and rbit instructions, which are used by GHC.Prim.clz*#, GHC.Prim.ctz*# and GHC.Prim.bitReverse*#. - - - - - 44e2abfb by Cheng Shao at 2024-06-04T12:09:43-04:00 hadrian: add +text_simdutf flavour transformer to allow building text with simdutf This patch adds a +text_simdutf flavour transformer to hadrian to allow downstream packagers and users that build from source to opt-in simdutf support for text, in order to benefit from SIMD speedup at run-time. It's still disabled by default for the time being. - - - - - 077cb2e1 by Cheng Shao at 2024-06-04T12:09:43-04:00 ci: enable +text_simdutf flavour transformer for wasm jobs This commit enables +text_simdutf flavour transformer for wasm jobs, so text is now built with simdutf support for wasm. - - - - - b23746ad by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Use TemplateHaskellQuotes in instance Lift ByteArray Resolves #24852 - - - - - 3fd25743 by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Mark addrToByteArray as NOINLINE This function should never be inlined in order to keep code size small. - - - - - 98ad1ea5 by Cheng Shao at 2024-06-04T22:51:26-04:00 compiler: remove unused CompilerInfo/LinkerInfo types This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. - - - - - 11795244 by Cheng Shao at 2024-06-05T06:33:17-04:00 rts: remove unused PowerPC/IA64 native adjustor code This commit removes unused PowerPC/IA64 native adjustor code which is never actually enabled by autoconf/hadrian. Fixes #24920. - - - - - 5132754b by Sylvain Henry at 2024-06-05T06:33:57-04:00 RTS: fix warnings with doing*Profiling (#24918) - - - - - accc8c33 by Cheng Shao at 2024-06-05T11:35:36-04:00 hadrian: don't depend on inplace/mingw when --enable-distro-toolchain on Windows - - - - - 6ffbd678 by Cheng Shao at 2024-06-05T11:35:37-04:00 autoconf: normalize paths of some build-time dependencies on Windows This commit applies path normalization via cygpath -m to some build-time dependencies on Windows. Without this logic, the /clang64/bin prefixed msys2-style paths cause the build to fail with --enable-distro-toolchain. - - - - - 075dc6d4 by Cheng Shao at 2024-06-05T11:36:12-04:00 hadrian: remove OSDarwin mention from speedHack This commit removes mentioning of OSDarwin from speedHack, since speedHack is purely for i386 and we no longer support i386 darwin (#24921). - - - - - 83235c4c by Cheng Shao at 2024-06-05T11:36:12-04:00 compiler: remove 32-bit darwin logic This commit removes all 32-bit darwin logic from the compiler, given we no longer support 32-bit apple systems (#24921). Also contains a bit more cleanup of obsolete i386 windows logic. - - - - - 1eb99bc3 by Cheng Shao at 2024-06-05T11:36:12-04:00 rts: remove 32-bit darwin/ios logic This commit removes 32-bit darwin/ios related logic from the rts, given we no longer support them (#24921). - - - - - 24f65892 by Cheng Shao at 2024-06-05T11:36:12-04:00 llvm-targets: remove 32-bit darwin/ios targets This commit removes 32-bit darwin/ios targets from llvm-targets given we no longer support them (#24921). - - - - - ccdbd689 by Cheng Shao at 2024-06-05T11:36:12-04:00 testsuite: remove 32-bit darwin logic This commit removes 32-bit darwin logic from the testsuite given it's no longer supported (#24921). Also contains more cleanup of obsolete i386 windows logic. - - - - - 11d661c4 by Cheng Shao at 2024-06-05T11:36:13-04:00 docs: mention 32-bit darwin/ios removal in 9.12 changelog This commit mentions removal of 32-bit darwin/ios support (#24921) in the 9.12 changelog. - - - - - 7c173310 by Georgi Lyubenov at 2024-06-05T15:17:22-04:00 Add firstA and secondA to Data.Bitraversable Please see https://github.com/haskell/core-libraries-committee/issues/172 for related discussion - - - - - 3b6f9fd1 by Ben Gamari at 2024-06-05T15:17:59-04:00 base: Fix name of changelog Fixes #24899. Also place it under `extra-doc-files` to better reflect its nature and avoid triggering unnecessary recompilation if it changes. - - - - - 1f4d2ef7 by Sebastian Graf at 2024-06-05T15:18:34-04:00 Announce Or-patterns in the release notes for GHC 9.12 (#22596) Leftover from !9229. - - - - - 8650338d by Jan Hrček at 2024-06-06T10:39:24-04:00 Improve haddocks of Language.Haskell.Syntax.Pat.Pat - - - - - 2eee65e1 by Cheng Shao at 2024-06-06T10:40:00-04:00 testsuite: bump T7653 timeout for wasm - - - - - 990fed60 by Sylvain Henry at 2024-06-07T14:45:23-04:00 StgToCmm: refactor opTranslate and friends - Change arguments order to avoid `\args -> ...` lambdas - Fix documentation - Rename StgToCmm options ("big" doesn't mean anything) - - - - - 1afad514 by Sylvain Henry at 2024-06-07T14:45:23-04:00 NCG x86: remove dead code (#5444) Since 6755d833af8c21bbad6585144b10e20ac4a0a1ab this code is dead. - - - - - 595c0894 by Cheng Shao at 2024-06-07T14:45:58-04:00 testsuite: skip objc-hi/objcxx-hi when cross compiling objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. - - - - - edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 794d3571 by Ben Gamari at 2024-11-13T16:44:43-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - 93c0abe0 by Ben Gamari at 2024-11-13T16:45:20-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - 10 changed files: - .ghcid - + .git-blame-ignore-revs - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3efedac6eba6a81f6116e2eea540d34fb17cdf3a...93c0abe0b87d9037d6e24f55e2465783b12517db -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3efedac6eba6a81f6116e2eea540d34fb17cdf3a...93c0abe0b87d9037d6e24f55e2465783b12517db You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 21:46:59 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 16:46:59 -0500 Subject: [Git][ghc/ghc][wip/T24127] 396 commits: testsuite: extend size performance tests with gzip (fixes #25046) Message-ID: <67351e52eb8d3_349dd21300d301154ca@gitlab.mail> Ben Gamari pushed to branch wip/T24127 at Glasgow Haskell Compiler / GHC Commits: eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 9b332792 by Ben Gamari at 2024-11-13T16:46:43-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 17 changed files: - .ghcid - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - .gitmodules - CODEOWNERS - cabal.project-reinstall - compiler/CodeGen.Platform.h - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/50a2283663786b4292bac3304b4f642baa3d2725...9b3327927cb12ca5b04f1aa4b2e54ab839bdae62 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/50a2283663786b4292bac3304b4f642baa3d2725...9b3327927cb12ca5b04f1aa4b2e54ab839bdae62 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 23:54:43 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 18:54:43 -0500 Subject: [Git][ghc/ghc][ghc-9.8] Release notes for 9.8.4 Message-ID: <67353c43a9f6e_16c849529ae0942e6@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: 4e14b9f8 by Ben Gamari at 2024-11-13T18:53:42-05:00 Release notes for 9.8.4 - - - - - 2 changed files: - + docs/users_guide/9.8.4-notes.rst - docs/users_guide/release-notes.rst Changes: ===================================== docs/users_guide/9.8.4-notes.rst ===================================== @@ -0,0 +1,76 @@ +.. _release-9-8-4: + +Version 9.8.4 +============== + +The :ghc-flag:`LLVM backend <-fllvm>` of this release is to be used with LLVM +11, 12, 13, 14 or 15. + +Significant Changes +~~~~~~~~~~~~~~~~~~~~ + +Issues fixed in this release include: + +Compiler +-------- + +- :ghc-flag:`-Wmissing-home-modules` now behaves correctly when multiple units + have expose the same module name (:ghc-ticket:`25122`). + +Packaging +--------- + +- Manual pages are now included in all binary distributions (:ghc-ticket:`24465`). + +Other Core Libraries +-------------------- + +- The `filepath` library has been upgraded to 1.4.300.2, fixing a potentially + exploitable behavior with `splitFileName` on Windows (:ghc-ticket:`24597`). + +Included libraries +------------------ + +The package database provided with this distribution also contains a number of +packages other than GHC itself. See the changelogs provided with these packages +for further change information. + +.. ghc-package-list:: + + libraries/array/array.cabal: Dependency of ``ghc`` library + libraries/base/base.cabal: Core library + libraries/binary/binary.cabal: Dependency of ``ghc`` library + libraries/bytestring/bytestring.cabal: Dependency of ``ghc`` library + libraries/Cabal/Cabal/Cabal.cabal: Dependency of ``ghc-pkg`` utility + libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal: Dependency of ``ghc-pkg`` utility + libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library + libraries/deepseq/deepseq.cabal: Dependency of ``ghc`` library + libraries/directory/directory.cabal: Dependency of ``ghc`` library + libraries/exceptions/exceptions.cabal: Dependency of ``ghc`` and ``haskeline`` library + libraries/filepath/filepath.cabal: Dependency of ``ghc`` library + compiler/ghc.cabal: The compiler itself + libraries/ghci/ghci.cabal: The REPL interface + libraries/ghc-boot/ghc-boot.cabal: Internal compiler library + libraries/ghc-boot-th/ghc-boot-th.cabal: Internal compiler library + libraries/ghc-compact/ghc-compact.cabal: Core library + libraries/ghc-heap/ghc-heap.cabal: GHC heap-walking library + libraries/ghc-prim/ghc-prim.cabal: Core library + libraries/haskeline/haskeline.cabal: Dependency of ``ghci`` executable + libraries/hpc/hpc.cabal: Dependency of ``hpc`` executable + libraries/integer-gmp/integer-gmp.cabal: Core library + libraries/mtl/mtl.cabal: Dependency of ``Cabal`` library + libraries/parsec/parsec.cabal: Dependency of ``Cabal`` library + libraries/pretty/pretty.cabal: Dependency of ``ghc`` library + libraries/process/process.cabal: Dependency of ``ghc`` library + libraries/semaphore-compat/semaphore-compat.cabal: Dependency of ``ghc`` library + libraries/stm/stm.cabal: Dependency of ``haskeline`` library + libraries/template-haskell/template-haskell.cabal: Core library + libraries/terminfo/terminfo.cabal: Dependency of ``haskeline`` library + libraries/text/text.cabal: Dependency of ``Cabal`` library + libraries/time/time.cabal: Dependency of ``ghc`` library + libraries/transformers/transformers.cabal: Dependency of ``ghc`` library + libraries/unix/unix.cabal: Dependency of ``ghc`` library + libraries/Win32/Win32.cabal: Dependency of ``ghc`` library + libraries/xhtml/xhtml.cabal: Dependency of ``haddock`` executable + + ===================================== docs/users_guide/release-notes.rst ===================================== @@ -7,3 +7,4 @@ Release notes 9.8.1-notes 9.8.2-notes 9.8.3-notes + 9.8.4-notes View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4e14b9f88135758054672c8773f5a5c451608f7b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4e14b9f88135758054672c8773f5a5c451608f7b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 13 23:59:10 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 18:59:10 -0500 Subject: [Git][ghc/ghc][wip/T24382] hadrian: Bump directory bound to >=1.3.9 Message-ID: <67353d4eeb55e_16c8494f86709822c@gitlab.mail> Ben Gamari pushed to branch wip/T24382 at Glasgow Haskell Compiler / GHC Commits: 63d557da by Ben Gamari at 2024-11-13T18:59:01-05:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Fixes #24382. - - - - - 4 changed files: - .gitlab/ci.sh - hadrian/cabal.project - hadrian/hadrian.cabal - hadrian/stack.yaml Changes: ===================================== .gitlab/ci.sh ===================================== @@ -7,7 +7,8 @@ set -Eeuo pipefail # Configuration: -HACKAGE_INDEX_STATE="2024-09-17T22:56:00Z" +# N.B. You may want to also update the index-state in hadrian/cabal.project. +HACKAGE_INDEX_STATE="2024-10-30T22:56:00Z" MIN_HAPPY_VERSION="1.20" MIN_ALEX_VERSION="3.2.6" ===================================== hadrian/cabal.project ===================================== @@ -3,8 +3,8 @@ packages: ./ ../libraries/ghc-platform/ -- This essentially freezes the build plan for hadrian --- It would be wise to keep this up to date with the state set in ci.sh -index-state: 2024-09-17T22:56:00Z +-- It would be wise to keep this up to date with the state set in .gitlab/ci.sh. +index-state: 2024-10-30T22:56:00Z -- unordered-containers-0.2.20-r1 requires template-haskell < 2.22 -- ghc-9.10 has template-haskell-2.22.0.0 ===================================== hadrian/hadrian.cabal ===================================== @@ -157,7 +157,9 @@ executable hadrian , base >= 4.11 && < 5 , bytestring >= 0.10 && < 0.13 , containers >= 0.5 && < 0.8 - , directory >= 1.3.1.0 && < 1.4 + -- N.B. directory >=1.3.9 as earlier versions are + -- afflicted by #24382. + , directory >= 1.3.9.0 && < 1.4 , extra >= 1.4.7 , filepath , time ===================================== hadrian/stack.yaml ===================================== @@ -21,3 +21,4 @@ nix: extra-deps: - Cabal-3.14.0.0 - Cabal-syntax-3.14.0.0 +- directory-1.3.9.0 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/63d557daa6e5baf2edce8a9516802497c2a36288 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/63d557daa6e5baf2edce8a9516802497c2a36288 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 00:20:09 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 19:20:09 -0500 Subject: [Git][ghc/ghc][wip/T25452] 7 commits: DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <67354238ef094_16c8499a036c104536@gitlab.mail> Ben Gamari pushed to branch wip/T25452 at Glasgow Haskell Compiler / GHC Commits: 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 1dea1376 by Ben Gamari at 2024-11-13T19:17:12-05:00 base: Label threads forked by IO operations Addresses part of #25452. - - - - - 0c0db09a by Ben Gamari at 2024-11-13T19:19:49-05:00 base: Label threads forked by System.Timeout Addresses part of #25452. - - - - - 2aeab937 by Ben Gamari at 2024-11-13T19:19:52-05:00 base: Label signal handling threads Addresses part of #25452. - - - - - 16a1af1f by Ben Gamari at 2024-11-13T19:19:52-05:00 base: Label Windows console event handling threads Addresses part of #25452. - - - - - bade7f85 by Ben Gamari at 2024-11-13T19:19:52-05:00 ghci: Label evaluation sandbox thread Addresses part of #25452. - - - - - 14 changed files: - boot - compiler/GHC/Builtin/primops.txt.pp - libraries/base/src/Control/Concurrent.hs - libraries/base/src/System/Timeout.hs - libraries/ghc-internal/src/GHC/Internal/Conc/Signal.hs - libraries/ghc-internal/src/GHC/Internal/Event/Windows/ConsoleEvent.hsc - libraries/ghci/GHCi/Run.hs - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== boot ===================================== @@ -66,9 +66,6 @@ def autoreconf(): for dir_ in ['.', 'rts'] + glob.glob('libraries/*/'): if os.path.isfile(os.path.join(dir_, 'configure.ac')): print("Booting %s" % dir_) - # Update config.sub in submodules - if dir_ != '.' and os.path.isfile(os.path.join(dir_, 'config.sub')): - shutil.copyfile('config.sub', os.path.join(dir_, 'config.sub')) processes[dir_] = subprocess.Popen(['sh', '-c', reconf_cmd], cwd=dir_) # Wait for all child processes to finish. ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we give their first arg lazyApply1Dmd and not +-- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that +-- the call forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often (but not always) choose to use a wrapper around +-- catch# that is head-strict in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2772,6 +2799,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2814,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +3000,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3029,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3058,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3070,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3731,6 +3760,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] effect = ReadWriteEffect -- The invoked computation may have side effects ===================================== libraries/base/src/Control/Concurrent.hs ===================================== @@ -265,7 +265,7 @@ threadWaitRead fd -- fdReady does the right thing, but we have to call it in a -- separate thread, otherwise threadWaitRead won't be interruptible, -- and this only works with -threaded. - | threaded = withThread (waitFd fd False) + | threaded = withThread "threadWaitRead worker" (waitFd fd False) | otherwise = case fd of 0 -> do _ <- hWaitForInput stdin (-1) return () @@ -286,7 +286,7 @@ threadWaitRead fd threadWaitWrite :: Fd -> IO () threadWaitWrite fd #if defined(mingw32_HOST_OS) - | threaded = withThread (waitFd fd True) + | threaded = withThread "threadWaitWrite worker" (waitFd fd True) | otherwise = errorWithoutStackTrace "threadWaitWrite requires -threaded on Windows" #else = Conc.threadWaitWrite fd @@ -302,8 +302,11 @@ threadWaitReadSTM :: Fd -> IO (STM (), IO ()) threadWaitReadSTM fd #if defined(mingw32_HOST_OS) | threaded = do v <- newTVarIO Nothing - mask_ $ void $ forkIO $ do result <- try (waitFd fd False) - atomically (writeTVar v $ Just result) + mask_ $ void $ forkIO $ do + tid <- myThreadId + labelThread tid "threadWaitReadSTM worker" + result <- try (waitFd fd False) + atomically (writeTVar v $ Just result) let waitAction = do result <- readTVar v case result of Nothing -> retry @@ -326,8 +329,11 @@ threadWaitWriteSTM :: Fd -> IO (STM (), IO ()) threadWaitWriteSTM fd #if defined(mingw32_HOST_OS) | threaded = do v <- newTVarIO Nothing - mask_ $ void $ forkIO $ do result <- try (waitFd fd True) - atomically (writeTVar v $ Just result) + mask_ $ void $ forkIO $ do + tid <- myThreadId + labelThread tid "threadWaitWriteSTM worker" + result <- try (waitFd fd True) + atomically (writeTVar v $ Just result) let waitAction = do result <- readTVar v case result of Nothing -> retry @@ -343,10 +349,14 @@ threadWaitWriteSTM fd #if defined(mingw32_HOST_OS) foreign import ccall unsafe "rtsSupportsBoundThreads" threaded :: Bool -withThread :: IO a -> IO a -withThread io = do +withThread :: String -> IO a -> IO a +withThread label io = do m <- newEmptyMVar - _ <- mask_ $ forkIO $ try io >>= putMVar m + _ <- mask_ $ forkIO $ do + tid <- myThreadId + labelThread tid label + result <- try io + putMVar m result x <- takeMVar m case x of Right a -> return a ===================================== libraries/base/src/System/Timeout.hs ===================================== @@ -1,5 +1,5 @@ {-# LANGUAGE CPP #-} -{-# LANGUAGE Safe #-} +{-# LANGUAGE Trustworthy #-} ------------------------------------------------------------------------------- -- | @@ -29,6 +29,7 @@ import GHC.Internal.Control.Exception (Exception(..), handleJust, bracket, asyncExceptionToException, asyncExceptionFromException) import GHC.Internal.Data.Unique (Unique, newUnique) +import GHC.Conc (labelThread) import Prelude -- $setup @@ -119,7 +120,9 @@ timeout n f let handleTimeout = do v <- isEmptyMVar lock when v $ void $ forkIOWithUnmask $ \unmask -> unmask $ do - v2 <- tryPutMVar lock =<< myThreadId + tid <- myThreadId + labelThread tid "timeout worker" + v2 <- tryPutMVar lock tid when v2 $ throwTo pid ex cleanupTimeout key = uninterruptibleMask_ $ do v <- tryPutMVar lock undefined @@ -136,7 +139,9 @@ timeout n f ex <- fmap Timeout newUnique handleJust (\e -> if e == ex then Just () else Nothing) (\_ -> return Nothing) - (bracket (forkIOWithUnmask $ \unmask -> + (bracket (forkIOWithUnmask $ \unmask -> do + tid <- myThreadId + labelThread tid "timeout worker" unmask $ threadDelay n >> throwTo pid ex) (uninterruptibleMask_ . killThread) (\_ -> fmap Just f)) ===================================== libraries/ghc-internal/src/GHC/Internal/Conc/Signal.hs ===================================== @@ -19,7 +19,7 @@ import GHC.Internal.Foreign.Ptr (Ptr, castPtr) import GHC.Internal.Foreign.Marshal.Alloc (finalizerFree) import GHC.Internal.Arr (inRange) import GHC.Internal.Base -import GHC.Internal.Conc.Sync (forkIO) +import GHC.Internal.Conc.Sync (myThreadId, labelThread, forkIO) import GHC.Internal.IO (mask_, unsafePerformIO) import GHC.Internal.IOArray (IOArray, boundsIOArray, newIOArray, unsafeReadIOArray, unsafeWriteIOArray) @@ -69,7 +69,10 @@ runHandlers p_info sig = do else do handler <- unsafeReadIOArray arr int case handler of Nothing -> return () - Just (f,_) -> do _ <- forkIO (f p_info) + Just (f,_) -> do _ <- forkIO $ do + tid <- myThreadId + labelThread tid "signal handler" + f p_info return () -- It is our responsibility to free the memory buffer, so we create a ===================================== libraries/ghc-internal/src/GHC/Internal/Event/Windows/ConsoleEvent.hsc ===================================== @@ -53,7 +53,10 @@ start_console_handler :: Word32 -> IO () start_console_handler r = case toWin32ConsoleEvent r of Just x -> withMVar win32ConsoleHandler $ \handler -> do - _ <- forkIO (handler x) + _ <- forkIO $ do + tid <- myThreadId + labelThread tid "console event handler" + handler x return () Nothing -> return () ===================================== libraries/ghci/GHCi/Run.hs ===================================== @@ -226,7 +226,10 @@ sandboxIO opts io = do let runIt = measureAlloc $ tryEval $ rethrow opts $ clearCCS io if useSandboxThread opts then do - tid <- forkIO $ do unsafeUnmask runIt >>= putMVar statusMVar + tid <- forkIO $ do + tid <- myThreadId + labelThread tid "GHCi sandbox" + unsafeUnmask runIt >>= putMVar statusMVar -- empty: can't block redirectInterrupts tid $ unsafeUnmask $ takeMVar statusMVar else ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -10612,7 +10612,7 @@ module System.Posix.Types where module System.Timeout where - -- Safety: Safe + -- Safety: Trustworthy type Timeout :: * newtype Timeout = ... timeout :: forall a. GHC.Types.Int -> GHC.Types.IO a -> GHC.Types.IO (GHC.Internal.Maybe.Maybe a) @@ -11728,7 +11728,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba instance GHC.Internal.Exception.Type.Exception GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1300.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ -instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance forall a k (b :: k). GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.Floating (Data.Complex.Complex a) -- Defined in ‘Data.Complex’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Float.Floating (f (g a)) => GHC.Internal.Float.Floating (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ @@ -12541,7 +12541,7 @@ instance forall (c :: GHC.Types.Char). GHC.Internal.Show.Show (GHC.Internal.Type instance forall (s :: GHC.Types.Symbol). GHC.Internal.Show.Show (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’ -instance [safe] GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Internal.StaticPtr.IsStatic GHC.Internal.StaticPtr.StaticPtr -- Defined in ‘GHC.Internal.StaticPtr’ @@ -12741,7 +12741,7 @@ instance forall (c :: GHC.Types.Char). GHC.Classes.Eq (GHC.Internal.TypeLits.SCh instance forall (s :: GHC.Types.Symbol). GHC.Classes.Eq (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Classes.Eq GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Classes.Eq GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’ -instance [safe] GHC.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance GHC.Classes.Eq GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Classes.Eq GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance forall a. GHC.Classes.Ord a => GHC.Classes.Ord (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -13653,7 +13653,7 @@ module System.Posix.Types where module System.Timeout where - -- Safety: Safe + -- Safety: Trustworthy type Timeout :: * newtype Timeout = ... timeout :: forall a. GHC.Types.Int -> GHC.Types.IO a -> GHC.Types.IO (GHC.Internal.Maybe.Maybe a) @@ -14765,7 +14765,7 @@ instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1100.0:GHC. instance GHC.Internal.Exception.Type.Exception GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.JS.Prim.JSException -- Defined in ‘GHC.Internal.JS.Prim’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.JS.Prim.WouldBlockException -- Defined in ‘GHC.Internal.JS.Prim’ -instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance forall a k (b :: k). GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.Floating (Data.Complex.Complex a) -- Defined in ‘Data.Complex’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Float.Floating (f (g a)) => GHC.Internal.Float.Floating (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ @@ -15573,7 +15573,7 @@ instance forall (c :: GHC.Types.Char). GHC.Internal.Show.Show (GHC.Internal.Type instance forall (s :: GHC.Types.Symbol). GHC.Internal.Show.Show (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’ -instance [safe] GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Internal.StaticPtr.IsStatic GHC.Internal.StaticPtr.StaticPtr -- Defined in ‘GHC.Internal.StaticPtr’ @@ -15768,7 +15768,7 @@ instance forall (c :: GHC.Types.Char). GHC.Classes.Eq (GHC.Internal.TypeLits.SCh instance forall (s :: GHC.Types.Symbol). GHC.Classes.Eq (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Classes.Eq GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Classes.Eq GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’ -instance [safe] GHC.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance GHC.Classes.Eq GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Classes.Eq GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance forall a. GHC.Classes.Ord a => GHC.Classes.Ord (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -10880,7 +10880,7 @@ module System.Posix.Types where module System.Timeout where - -- Safety: Safe + -- Safety: Trustworthy type Timeout :: * newtype Timeout = ... timeout :: forall a. GHC.Types.Int -> GHC.Types.IO a -> GHC.Types.IO (GHC.Internal.Maybe.Maybe a) @@ -11993,7 +11993,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba instance GHC.Internal.Exception.Type.Exception GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ -instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance forall a k (b :: k). GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.Floating (Data.Complex.Complex a) -- Defined in ‘Data.Complex’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Float.Floating (f (g a)) => GHC.Internal.Float.Floating (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ @@ -12819,7 +12819,7 @@ instance forall (c :: GHC.Types.Char). GHC.Internal.Show.Show (GHC.Internal.Type instance forall (s :: GHC.Types.Symbol). GHC.Internal.Show.Show (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’ -instance [safe] GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Internal.StaticPtr.IsStatic GHC.Internal.StaticPtr.StaticPtr -- Defined in ‘GHC.Internal.StaticPtr’ @@ -13017,7 +13017,7 @@ instance forall (c :: GHC.Types.Char). GHC.Classes.Eq (GHC.Internal.TypeLits.SCh instance forall (s :: GHC.Types.Symbol). GHC.Classes.Eq (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Classes.Eq GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Classes.Eq GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’ -instance [safe] GHC.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance GHC.Classes.Eq GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Classes.Eq GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance forall a. GHC.Classes.Ord a => GHC.Classes.Ord (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -10612,7 +10612,7 @@ module System.Posix.Types where module System.Timeout where - -- Safety: Safe + -- Safety: Trustworthy type Timeout :: * newtype Timeout = ... timeout :: forall a. GHC.Types.Int -> GHC.Types.IO a -> GHC.Types.IO (GHC.Internal.Maybe.Maybe a) @@ -11728,7 +11728,7 @@ instance GHC.Internal.Exception.Type.Exception GHC.Internal.Control.Exception.Ba instance GHC.Internal.Exception.Type.Exception GHC.Internal.Data.Dynamic.Dynamic -- Defined in ‘GHC.Internal.Data.Dynamic’ instance [safe] GHC.Internal.Exception.Type.Exception ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common.FileLockingNotSupported -- Defined in ‘ghc-internal-9.1100.0:GHC.Internal.IO.Handle.Lock.Common’ instance GHC.Internal.Exception.Type.Exception GHC.Internal.IOPort.IOPortException -- Defined in ‘GHC.Internal.IOPort’ -instance [safe] GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Internal.Exception.Type.Exception System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance forall a k (b :: k). GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Functor.Const.Const a b) -- Defined in ‘GHC.Internal.Data.Functor.Const’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.Floating (Data.Complex.Complex a) -- Defined in ‘Data.Complex’ instance forall k1 k2 (f :: k1 -> *) (g :: k2 -> k1) (a :: k2). GHC.Internal.Float.Floating (f (g a)) => GHC.Internal.Float.Floating (Data.Functor.Compose.Compose f g a) -- Defined in ‘Data.Functor.Compose’ @@ -12541,7 +12541,7 @@ instance forall (c :: GHC.Types.Char). GHC.Internal.Show.Show (GHC.Internal.Type instance forall (s :: GHC.Types.Symbol). GHC.Internal.Show.Show (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Internal.Show.Show GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’ -instance [safe] GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Internal.Show.Show System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Internal.Show.Show GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Internal.StaticPtr.IsStatic GHC.Internal.StaticPtr.StaticPtr -- Defined in ‘GHC.Internal.StaticPtr’ @@ -12741,7 +12741,7 @@ instance forall (c :: GHC.Types.Char). GHC.Classes.Eq (GHC.Internal.TypeLits.SCh instance forall (s :: GHC.Types.Symbol). GHC.Classes.Eq (GHC.Internal.TypeLits.SSymbol s) -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Classes.Eq GHC.Internal.TypeLits.SomeChar -- Defined in ‘GHC.Internal.TypeLits’ instance GHC.Classes.Eq GHC.Internal.TypeLits.SomeSymbol -- Defined in ‘GHC.Internal.TypeLits’ -instance [safe] GHC.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’ +instance GHC.Classes.Eq System.Timeout.Timeout -- Defined in ‘System.Timeout’ instance GHC.Classes.Eq GHC.Internal.Text.Read.Lex.Lexeme -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance GHC.Classes.Eq GHC.Internal.Text.Read.Lex.Number -- Defined in ‘GHC.Internal.Text.Read.Lex’ instance forall a. GHC.Classes.Ord a => GHC.Classes.Ord (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/810101b28e70c93f47be015ad6cc5968ad8dc793...bade7f85e1fcc71c5d8e30ac2d068eeef3bd833e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/810101b28e70c93f47be015ad6cc5968ad8dc793...bade7f85e1fcc71c5d8e30ac2d068eeef3bd833e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 00:53:18 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 19:53:18 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/25475 Message-ID: <673549fe19c79_6ddd010df102996d@gitlab.mail> Ben Gamari pushed new branch wip/25475 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/25475 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 00:53:35 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 19:53:35 -0500 Subject: [Git][ghc/ghc] Deleted branch wip/25475 Message-ID: <67354a0f9386b_6ddd0177424301fb@gitlab.mail> Ben Gamari deleted branch wip/25475 at Glasgow Haskell Compiler / GHC -- You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 00:53:41 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 19:53:41 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25475 Message-ID: <67354a155def1_6ddd01216c8303a7@gitlab.mail> Ben Gamari pushed new branch wip/T25475 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25475 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 00:58:54 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 19:58:54 -0500 Subject: [Git][ghc/ghc][ghc-9.8] 2 commits: DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <67354b4df165b_6ddd02b54e43345f@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: 74437b9a by Sebastian Graf at 2024-11-13T19:06:12-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. (cherry picked from commit 00d58ae18a7ce8db6b2d57261a08ba8c1c2549b5) - - - - - 68cd09f6 by Ben Gamari at 2024-11-13T19:23:35-05:00 Mention fix of #25439 in release notes - - - - - 5 changed files: - compiler/GHC/Builtin/primops.txt.pp - docs/users_guide/9.8.4-notes.rst - + testsuite/tests/stranal/should_run/T25439.hs - + testsuite/tests/stranal/should_run/T25439.stdout - testsuite/tests/stranal/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2535,18 +2535,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we give their first arg lazyApply1Dmd and not +-- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that +-- the call forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often (but not always) choose to use a wrapper around +-- catch# that is head-strict in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, o #) ) @@ -2563,7 +2590,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True has_side_effects = True @@ -2628,7 +2655,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True has_side_effects = True @@ -2643,6 +2670,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True has_side_effects = True @@ -2657,7 +2685,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True has_side_effects = True @@ -2843,7 +2871,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True has_side_effects = True @@ -2870,7 +2899,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, v #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True has_side_effects = True @@ -2899,7 +2928,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True has_side_effects = True @@ -2911,7 +2940,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True has_side_effects = True @@ -3586,6 +3615,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] ------------------------------------------------------------------------ ===================================== docs/users_guide/9.8.4-notes.rst ===================================== @@ -16,6 +16,8 @@ Compiler - :ghc-flag:`-Wmissing-home-modules` now behaves correctly when multiple units have expose the same module name (:ghc-ticket:`25122`). +- Adjust the demand signature of the ``prompt#`` to avoid invalid optimisation of + non-terminating programs (:ghc-ticket:`25439`). Packaging --------- ===================================== testsuite/tests/stranal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/stranal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/stranal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4e14b9f88135758054672c8773f5a5c451608f7b...68cd09f64448f2b1f9af7ca22ce6c26954bce643 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4e14b9f88135758054672c8773f5a5c451608f7b...68cd09f64448f2b1f9af7ca22ce6c26954bce643 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 01:55:20 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 20:55:20 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25477 Message-ID: <67355888acfa8_6ddd06406b8433dc@gitlab.mail> Ben Gamari pushed new branch wip/T25477 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25477 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 01:55:45 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 13 Nov 2024 20:55:45 -0500 Subject: [Git][ghc/ghc][wip/T25477] 21 commits: testsuite: normalise some versions in callstacks Message-ID: <673558a19ce7b_6ddd0632d3843587@gitlab.mail> Ben Gamari pushed to branch wip/T25477 at Glasgow Haskell Compiler / GHC Commits: e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa729825 by Ben Gamari at 2024-11-13T20:55:39-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally positive. Fixes #25477. - - - - - 30 changed files: - boot - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - − distrib/cross-port - hadrian/bindist/config.mk.in - libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs - m4/fp_setup_project_version.m4 - rts/IOManager.c - rts/Updates.h - rts/posix/ticker/TimerFd.c - testsuite/driver/testlib.py - testsuite/tests/backpack/should_compile/all.T - testsuite/tests/backpack/should_compile/bkp16.stderr - testsuite/tests/backpack/should_fail/all.T - testsuite/tests/backpack/should_fail/bkpfail17.stderr - testsuite/tests/backpack/should_fail/bkpfail19.stderr - testsuite/tests/bytecode/T24634/Makefile - testsuite/tests/bytecode/T25090/Makefile The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/95f4287044cc4f76ca5b3887cce6487def74dbfc...fa7298250444468eb41153ee49d5c0beddb05d76 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/95f4287044cc4f76ca5b3887cce6487def74dbfc...fa7298250444468eb41153ee49d5c0beddb05d76 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 07:44:21 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 02:44:21 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: rts/RtsFlags: Refactor size parsing Message-ID: <6735aa555a57_6ddd0136feb07329b@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 63467c3c by Ben Gamari at 2024-11-14T02:44:00-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - 550b99a5 by Ben Gamari at 2024-11-14T02:44:00-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - 646d2e4c by Ryan Scott at 2024-11-14T02:44:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - a3cf00d4 by Ben Gamari at 2024-11-14T02:44:01-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - 7bb9a5e7 by Cheng Shao at 2024-11-14T02:44:02-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - 3381649b by Cheng Shao at 2024-11-14T02:44:02-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - 31ff157f by Cheng Shao at 2024-11-14T02:44:02-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - 23 changed files: - compile_flags.txt - libraries/ghci/GHCi/ObjLink.hs - m4/fptools_happy.m4 - rts/RtsFlags.c - + testsuite/tests/rts/T20201a.hs - + testsuite/tests/rts/T20201a.stderr - + testsuite/tests/rts/T20201b.hs - + testsuite/tests/rts/T20201b.stderr - testsuite/tests/rts/all.T - + testsuite/tests/th/wasm/T25473A.hs - + testsuite/tests/th/wasm/T25473B.hs - + testsuite/tests/th/wasm/all.T - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClasses.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesCore.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesEffects.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesReader.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesState.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadPrimitive.hs - + testsuite/tests/typecheck/should_compile/T16234/DataPeano.hs - + testsuite/tests/typecheck/should_compile/T16234/Main.hs - + testsuite/tests/typecheck/should_compile/T16234/Makefile - + testsuite/tests/typecheck/should_compile/T16234/all.T - utils/jsffi/dyld.mjs Changes: ===================================== compile_flags.txt ===================================== @@ -1,5 +1,29 @@ --xc --Irts +-Wimplicit +-include +rts/include/ghcversion.h -Irts/include --I.hie-bios/stage0/lib --I_build/stage1/rts/build/include/ +-I_build/stage1/rts/build +-I_build/stage1/rts/build/include +-Irts +-Ilibraries/ghc-internal/include +-I_build/stage1/libraries/ghc-internal/build/include +-Ilibraries/ghc-bignum/include +-I_build/stage1/libraries/ghc-bignum/build/include +-Wno-unknown-pragmas +-Wall +-Wextra +-Wstrict-prototypes +-Wmissing-prototypes +-Wmissing-declarations +-Winline +-Wpointer-arith +-Wmissing-noreturn +-Wnested-externs +-Wredundant-decls +-Wundef +-DFS_NAMESPACE=rts +-DCOMPILING_RTS +-DTHREADED_RTS +-DDEBUG +-DDYNAMIC +-DPROFILING ===================================== libraries/ghci/GHCi/ObjLink.hs ===================================== @@ -76,7 +76,7 @@ loadDLL f = evaluate =<< js_loadDLL (toJSString f) pure $ Right nullPtr -foreign import javascript safe "__exports.__dyld.loadDLL($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.loadDLL($1)" js_loadDLL :: JSString -> IO () loadArchive :: String -> IO () @@ -96,7 +96,7 @@ lookupSymbol sym = do r <- js_lookupSymbol $ toJSString sym evaluate $ if r == nullPtr then Nothing else Just r -foreign import javascript unsafe "__exports.__dyld.lookupSymbol($1)" +foreign import javascript unsafe "__ghc_wasm_jsffi_dyld.lookupSymbol($1)" js_lookupSymbol :: JSString -> IO (Ptr a) lookupSymbolInDLL :: Ptr LoadedDLL -> String -> IO (Maybe (Ptr a)) @@ -114,7 +114,7 @@ addLibrarySearchPath p = do evaluate =<< js_addLibrarySearchPath (toJSString p) pure nullPtr -foreign import javascript safe "__exports.__dyld.addLibrarySearchPath($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.addLibrarySearchPath($1)" js_addLibrarySearchPath :: JSString -> IO () removeLibrarySearchPath :: Ptr () -> IO Bool @@ -128,7 +128,7 @@ findSystemLibrary f = m `catch` \(_ :: JSException) -> pure Nothing p <- evaluate $ fromJSString p' pure $ Just p -foreign import javascript safe "__exports.__dyld.findSystemLibrary($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.findSystemLibrary($1)" js_findSystemLibrary :: JSString -> IO JSString #else ===================================== m4/fptools_happy.m4 ===================================== @@ -24,13 +24,13 @@ changequote([, ])dnl ]) if test ! -f compiler/GHC/Parser.hs || test ! -f compiler/GHC/Cmm/Parser.hs then - failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.1 is required to compile GHC" + failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.2 is required to compile GHC" FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.20.0], [AC_MSG_ERROR([$failure_msg])])[] FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[1.21.0], FP_COMPARE_VERSIONS([$fptools_cv_happy_version], [-le], [2.0.1], [AC_MSG_ERROR([$failure_msg])])[])[] - FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.1.0], + FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.2.0], [AC_MSG_ERROR([$failure_msg])])[] fi ===================================== rts/RtsFlags.c ===================================== @@ -2148,7 +2148,6 @@ static void initStatsFile (FILE *f) static StgWord64 decodeSize(const char *flag, uint32_t offset, StgWord64 min, StgWord64 max) { - char c; const char *s; StgDouble m; StgWord64 val; @@ -2161,19 +2160,47 @@ decodeSize(const char *flag, uint32_t offset, StgWord64 min, StgWord64 max) } else { - m = atof(s); - c = s[strlen(s)-1]; - - if (c == 't' || c == 'T') - m *= (StgWord64)1024*1024*1024*1024; - else if (c == 'g' || c == 'G') - m *= 1024*1024*1024; - else if (c == 'm' || c == 'M') - m *= 1024*1024; - else if (c == 'k' || c == 'K') - m *= 1024; - else if (c == 'w' || c == 'W') - m *= sizeof(W_); + char *end; + m = strtod(s, &end); + + if (end == s) { + errorBelch("error in RTS option %s: unable to parse number '%s'", flag, s); + stg_exit(EXIT_FAILURE); + } + + StgWord64 unit; + switch (*end) { + case 't': + case 'T': + unit = (StgWord64)1024*1024*1024*1024; + break; + case 'g': + case 'G': + unit = 1024*1024*1024; + break; + case 'm': + case 'M': + unit = 1024*1024; + break; + case 'k': + case 'K': + unit = 1024; + break; + case 'w': + case 'W': + unit = sizeof(W_); + break; + case 'b': + case 'B': + case '\0': + unit = 1; + break; + default: + errorBelch("error in RTS option %s: unknown unit suffix '%c'", flag, *end); + stg_exit(EXIT_FAILURE); + } + + m *= unit; } val = (StgWord64)m; ===================================== testsuite/tests/rts/T20201a.hs ===================================== @@ -0,0 +1 @@ +main = putStrLn "hi" ===================================== testsuite/tests/rts/T20201a.stderr ===================================== @@ -0,0 +1 @@ +T20201a: error in RTS option -AturtlesM: unable to parse number 'turtlesM' ===================================== testsuite/tests/rts/T20201b.hs ===================================== @@ -0,0 +1,2 @@ +main = putStrLn "hi" + ===================================== testsuite/tests/rts/T20201b.stderr ===================================== @@ -0,0 +1 @@ +T20201b: error in RTS option -A64z: unknown unit suffix 'z' ===================================== testsuite/tests/rts/all.T ===================================== @@ -587,6 +587,9 @@ test('decodeMyStack_emptyListForMissingFlag', , js_broken(22261) # cloneMyStack# not yet implemented ], compile_and_run, ['']) +test('T20201a', exit_code(1), compile_and_run, ['-with-rtsopts -AturtlesM']) +test('T20201b', exit_code(1), compile_and_run, ['-with-rtsopts -A64z']) + test('T22012', [js_skip, extra_ways(['ghci'])], compile_and_run, ['T22012_c.c']) # Skip for JS platform as the JS RTS is always single threaded ===================================== testsuite/tests/th/wasm/T25473A.hs ===================================== @@ -0,0 +1,8 @@ +module T25473A where + +import GHC.Wasm.Prim + +type BinOp a = a -> a -> a + +foreign import javascript "wrapper" + mkJSBinOp :: BinOp Int -> IO JSVal ===================================== testsuite/tests/th/wasm/T25473B.hs ===================================== @@ -0,0 +1,10 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T25473B where + +import Language.Haskell.TH +import T25473A + +$(runIO $ do + _ <- mkJSBinOp (+) + pure []) ===================================== testsuite/tests/th/wasm/all.T ===================================== @@ -0,0 +1,5 @@ +setTestOpts([ + unless(arch('wasm32'), skip) +]) + +test('T25473', [], multimod_compile, ['T25473B', '-v0']) ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClasses.hs ===================================== @@ -0,0 +1,7 @@ +module ControlMonadClasses + ( -- * Reader + MonadReader + ) where + +import ControlMonadClassesReader +import ControlMonadClassesState () ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesCore.hs ===================================== @@ -0,0 +1,23 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UndecidableInstances #-} +module ControlMonadClassesCore where + +import Data.Kind (Type) +import DataPeano + +type family CanDo (m :: Type -> Type) (eff :: k) :: Bool + +type family MapCanDo (eff :: k) (stack :: Type -> Type) :: [Bool] where + MapCanDo eff (t m) = CanDo (t m) eff ': MapCanDo eff m + MapCanDo eff m = '[ CanDo m eff ] + +type family FindTrue + (bs :: [Bool]) + :: Peano + where + FindTrue ('True ': t) = 'Zero + FindTrue ('False ': t) = 'Succ (FindTrue t) + +type Find eff (m :: Type -> Type) = + FindTrue (MapCanDo eff m) ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesEffects.hs ===================================== @@ -0,0 +1,5 @@ +module ControlMonadClassesEffects where + +import Data.Kind (Type) + +data EffReader (e :: Type) ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesReader.hs ===================================== @@ -0,0 +1,17 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +module ControlMonadClassesReader where + +import qualified Control.Monad.Trans.State.Lazy as SL +import ControlMonadClassesCore +import ControlMonadClassesEffects +import Control.Monad.Trans.Class +import Data.Kind (Type) +import DataPeano + +class Monad m => MonadReaderN (n :: Peano) (r :: Type) m +instance Monad m => MonadReaderN 'Zero r (SL.StateT r m) +instance (MonadTrans t, Monad (t m), MonadReaderN n r m, Monad m) + => MonadReaderN ('Succ n) r (t m) + +type MonadReader e m = MonadReaderN (Find (EffReader e) m) e m ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesState.hs ===================================== @@ -0,0 +1,13 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +module ControlMonadClassesState where + +import qualified Control.Monad.Trans.State.Lazy as SL +import ControlMonadClassesCore +import ControlMonadClassesEffects + +type instance CanDo (SL.StateT s m) eff = StateCanDo s eff + +type family StateCanDo s eff where + StateCanDo s (EffReader s) = 'True + StateCanDo s eff = 'False ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadPrimitive.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module ControlMonadPrimitive (PrimMonad(..)) where + +import Control.Monad.Trans.State (StateT) + +class Monad m => PrimMonad m where + type PrimState m +instance PrimMonad m => PrimMonad (StateT s m) where + type PrimState (StateT s m) = PrimState m ===================================== testsuite/tests/typecheck/should_compile/T16234/DataPeano.hs ===================================== @@ -0,0 +1,3 @@ +module DataPeano where + +data Peano = Zero | Succ Peano ===================================== testsuite/tests/typecheck/should_compile/T16234/Main.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module Main where + +import ControlMonadClasses (MonadReader) +--import ControlMonadPrimitive () +import Control.Monad.Trans.State.Lazy (StateT) + +main :: (n ~ StateT () IO, MonadReader () n) => IO () +main = undefined ===================================== testsuite/tests/typecheck/should_compile/T16234/Makefile ===================================== @@ -0,0 +1,17 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +clean: + rm -f *.o *.hi + +T16234: + $(MAKE) -s --no-print-directory clean + '$(TEST_HC)' $(TEST_HC_OPTS) -c DataPeano.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadPrimitive.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesCore.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesEffects.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesReader.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesState.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClasses.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c Main.hs ===================================== testsuite/tests/typecheck/should_compile/T16234/all.T ===================================== @@ -0,0 +1 @@ +test('T16234', [extra_files(['DataPeano.hs', 'ControlMonadPrimitive.hs', 'ControlMonadClassesCore.hs', 'ControlMonadClassesEffects.hs', 'ControlMonadClassesReader.hs', 'ControlMonadClassesState.hs', 'ControlMonadClasses.hs', 'Main.hs'])], makefile_test, ['T16234']) ===================================== utils/jsffi/dyld.mjs ===================================== @@ -293,9 +293,13 @@ class DyLD { #loadedSos = new Set(); // Mapping from export names to export funcs. It's also passed as - // __exports in JSFFI code, hence the "memory" special field. __dyld - // is used by ghci to call into here. - exportFuncs = { memory: this.#memory, __dyld: this }; + // __exports in JSFFI code, hence the "memory" special field. + exportFuncs = { memory: this.#memory }; + + // The FinalizationRegistry used by JSFFI. + #finalizationRegistry = new FinalizationRegistry((sp) => + this.exportFuncs.rts_freeStablePtr(sp) + ); // The GOT.func table. #gotFunc = {}; @@ -623,17 +627,22 @@ class DyLD { const mod = await modp; - // Fulfill the ghc_wasm_jsffi imports + // Fulfill the ghc_wasm_jsffi imports. Use new Function() + // instead of eval() to prevent bindings in this local scope to + // be accessed by JSFFI code snippets. Object.assign( import_obj.ghc_wasm_jsffi, new Function( - "return (__exports) => ({".concat( + "__exports", + "__ghc_wasm_jsffi_dyld", + "__ghc_wasm_jsffi_finalization_registry", + "return {".concat( ...parseSections(mod).map( (rec) => `${rec[0]}: ${parseRecord(rec)}, ` ), - "});" + "};" ) - )()(this.exportFuncs) + )(this.exportFuncs, this, this.#finalizationRegistry) ); // Fulfill the rest of the imports View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/58c591e44e5bc22c151a9a5b08881c45cd44ffb0...31ff157fc624bd8e0442f5fecfdd10a93346a525 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/58c591e44e5bc22c151a9a5b08881c45cd44ffb0...31ff157fc624bd8e0442f5fecfdd10a93346a525 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 10:58:10 2024 From: gitlab at gitlab.haskell.org (Peter Trommler (@trommler)) Date: Thu, 14 Nov 2024 05:58:10 -0500 Subject: [Git][ghc/ghc][wip/ppc64-fix-T25155-T25240] 4 commits: DmdAnal: Make `prompt#` lazy (#25439) Message-ID: <6735d7c21585e_1c2809649b3c7475@gitlab.mail> Peter Trommler pushed to branch wip/ppc64-fix-T25155-T25240 at Glasgow Haskell Compiler / GHC Commits: 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 0b29d063 by Peter Trommler at 2024-11-14T10:58:01+00:00 Fix requirements on T25240 T25240 doesn't need RTS linker, GHCi is sufficient and GHCi can also be dynamically linked. - - - - - c1e137c3 by Peter Trommler at 2024-11-14T10:58:01+00:00 Fix requirements for T25155 Loading C objects requires RTS linker. - - - - - 7 changed files: - boot - compiler/GHC/Builtin/primops.txt.pp - + testsuite/tests/dmdanal/should_run/T25439.hs - + testsuite/tests/dmdanal/should_run/T25439.stdout - testsuite/tests/dmdanal/should_run/all.T - testsuite/tests/ghci/linking/T25240/all.T - testsuite/tests/ghci/linking/all.T Changes: ===================================== boot ===================================== @@ -66,9 +66,6 @@ def autoreconf(): for dir_ in ['.', 'rts'] + glob.glob('libraries/*/'): if os.path.isfile(os.path.join(dir_, 'configure.ac')): print("Booting %s" % dir_) - # Update config.sub in submodules - if dir_ != '.' and os.path.isfile(os.path.join(dir_, 'config.sub')): - shutil.copyfile('config.sub', os.path.join(dir_, 'config.sub')) processes[dir_] = subprocess.Popen(['sh', '-c', reconf_cmd], cwd=dir_) # Wait for all child processes to finish. ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -2663,18 +2663,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp section "Exceptions" ------------------------------------------------------------------------ --- Note [Strictness for mask/unmask/catch] --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- Note [Strict IO wrappers] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~ -- Consider this example, which comes from GHC.IO.Handle.Internals: --- wantReadableHandle3 f ma b st +-- wantReadableHandle3 f mv b st -- = case ... of --- DEFAULT -> case ma of MVar a -> ... --- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...) +-- DEFAULT -> case mv of MVar a -> ... +-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...) -- The outer case just decides whether to mask exceptions, but we don't want --- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd --- in mask and unmask. But catch really is lazy in its first argument, see --- #11555. So for IO actions 'ma' we often use a wrapper around it that is --- head-strict in 'ma': GHC.IO.catchException. +-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd +-- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect +-- that it potentially calls its action multiple times). +-- +-- Note [Strictness for catch-style primops] +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- The catch#-style primops always call their action, just like outlined +-- in Note [Strict IO wrappers]. +-- However, it is important that we give their first arg lazyApply1Dmd and not +-- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call +-- +-- catch# act handler s +-- +-- If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that +-- the call forwards the dead-end flag from `act` (see Note [Dead ends] and +-- Note [Precise exceptions and strictness analysis]). +-- This would cause dead code elimination to discard the continuation of the +-- catch# call, among other things. This first came up in #11555. +-- +-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag +-- from `act`. (This is a bit brutal, but the language of strictness types is +-- not expressive enough to give it a more precise semantics that is still +-- sound.) +-- For perf reasons we often (but not always) choose to use a wrapper around +-- catch# that is head-strict in `act`: GHC.IO.catchException. +-- +-- A similar caveat applies to prompt#, which can be seen as a +-- generalisation of catch# as explained in GHC.Prim#continuations#. +-- The reason is that even if `act` appears dead-ending (e.g., looping) +-- `prompt# tag ma s` might return alright due to a (higher-order) use of +-- `control0#` in `act`. This came up in #25439. primop CatchOp "catch#" GenPrimOp (State# RealWorld -> (# State# RealWorld, a_reppoly #) ) @@ -2691,7 +2718,7 @@ primop CatchOp "catch#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect -- Either inner computation might potentially raise an unchecked exception, @@ -2757,7 +2784,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2772,6 +2799,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2786,7 +2814,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp in continuation-style primops\" for details. } with strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -2972,7 +3000,8 @@ primop PromptOp "prompt#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a #) { See "GHC.Prim#continuations". } with - strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv } + strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv } + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3000,7 +3029,7 @@ primop AtomicallyOp "atomically#" GenPrimOp -> State# RealWorld -> (# State# RealWorld, a_levpoly #) with strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strict IO wrappers] out_of_line = True effect = ReadWriteEffect @@ -3029,7 +3058,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply1Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3041,7 +3070,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd , lazyApply2Dmd , topDmd ] topDiv } - -- See Note [Strictness for mask/unmask/catch] + -- See Note [Strictness for catch-style primops] out_of_line = True effect = ReadWriteEffect @@ -3731,6 +3760,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp with out_of_line = True strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv } + -- See Note [Strict IO wrappers] effect = ReadWriteEffect -- The invoked computation may have side effects ===================================== testsuite/tests/dmdanal/should_run/T25439.hs ===================================== @@ -0,0 +1,25 @@ +{-# LANGUAGE MagicHash, UnboxedTuples, BlockArguments #-} + +import Prelude hiding (break) +import GHC.Exts (PromptTag#, newPromptTag#, prompt#, control0#) +import GHC.IO (IO(..), unIO) +import Control.Monad (forever) + +main :: IO () +main = do + putStrLn "before" + broken >>= putStrLn + putStrLn "after" + +broken :: IO String +broken = do + loop \l -> do + break l "broken" + +{-# NOINLINE loop #-} +loop :: (PromptTag# a -> IO ()) -> IO a +loop f = IO \rw0 -> case newPromptTag# rw0 of + (# rw1, tag #) -> prompt# tag (unIO (forever (f tag))) rw1 + +break :: PromptTag# a -> a -> IO b +break tag x = IO (control0# tag \_ rw1 -> (# rw1, x #)) ===================================== testsuite/tests/dmdanal/should_run/T25439.stdout ===================================== @@ -0,0 +1,3 @@ +before +broken +after ===================================== testsuite/tests/dmdanal/should_run/all.T ===================================== @@ -33,3 +33,4 @@ test('T22475b', normal, compile_and_run, ['']) # T22549: Do not strictify DFuns, otherwise we will <> test('T22549', normal, compile_and_run, ['-fdicts-strict -fno-specialise']) test('T23208', exit_code(1), multimod_compile_and_run, ['T23208_Lib', 'T23208']) +test('T25439', normal, compile_and_run, ['']) ===================================== testsuite/tests/ghci/linking/T25240/all.T ===================================== @@ -1,3 +1,3 @@ # skip on darwin because the leading underscores will make the test fail -test('T25240', [when(leading_underscore(),skip), req_rts_linker, extra_files(['T25240a.hs'])], +test('T25240', [when(leading_underscore(),skip), req_interp, extra_files(['T25240a.hs'])], makefile_test, ['T25240']) ===================================== testsuite/tests/ghci/linking/all.T ===================================== @@ -76,4 +76,4 @@ test('big-obj', [extra_files(['big-obj-c.c', 'big-obj.hs']), unless(doing_ghci, skip), unless(opsys('mingw32'), skip)], makefile_test, ['big-obj']) -test('T25155', [req_c, req_th, req_interp, extra_files(['T25155_iserv_main.c', 'T25155_iserv.hs', 'T25155_TH.hs'])], makefile_test, []) +test('T25155', [req_c, req_th, req_interp, req_rts_linker, extra_files(['T25155_iserv_main.c', 'T25155_iserv.hs', 'T25155_TH.hs'])], makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/106cb457e38b2ad751e008be43aa77ae80a5b18b...c1e137c3665fe592ffd787bbd2238a4eddd65d52 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/106cb457e38b2ad751e008be43aa77ae80a5b18b...c1e137c3665fe592ffd787bbd2238a4eddd65d52 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 11:35:44 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 14 Nov 2024 06:35:44 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/romes/25170-5 Message-ID: <6735e090b47b7_12b910f50a08137f@gitlab.mail> Rodrigo Mesquita pushed new branch wip/romes/25170-5 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/romes/25170-5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 14:13:04 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 14 Nov 2024 09:13:04 -0500 Subject: [Git][ghc/ghc][wip/romes/exceptions-propagate] 155 commits: Changed import from Ghc. module to L.H.S module Message-ID: <67360570728ea_30077b26a04888520@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/exceptions-propagate at Glasgow Haskell Compiler / GHC Commits: e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - cc2af938 by Matthew Pickering at 2024-11-14T14:03:51+00:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - 903fc84b by Rodrigo Mesquita at 2024-11-14T14:06:42+00:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 73dea8dc by Rodrigo Mesquita at 2024-11-14T14:06:44+00:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 47405de2 by Rodrigo Mesquita at 2024-11-14T14:06:45+00:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 9f599e30 by Rodrigo Mesquita at 2024-11-14T14:06:45+00:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - aae22bd1 by Rodrigo Mesquita at 2024-11-14T14:06:45+00:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - 3d69dd26 by Rodrigo Mesquita at 2024-11-14T14:06:46+00:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 9256c2f8 by Rodrigo Mesquita at 2024-11-14T14:06:46+00:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModulesRecomp: ------------------------- Metric Decrease: MultiLayerModulesRecomp ------------------------- - - - - - 74051188 by Rodrigo Mesquita at 2024-11-14T14:07:13+00:00 base: Add to changelog.md CLC #285 - - - - - 2bf0d4f2 by Rodrigo Mesquita at 2024-11-14T14:12:03+00:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 28 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - CODEOWNERS - boot - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/27a207643d6aa19aa526be75cb1935ff310690b0...2bf0d4f23c5f7de979279d14053fbf95689b2c93 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/27a207643d6aa19aa526be75cb1935ff310690b0...2bf0d4f23c5f7de979279d14053fbf95689b2c93 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 14:26:21 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Thu, 14 Nov 2024 09:26:21 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/ghc-9.12-alpha3 Message-ID: <6736088d5ae9b_30077b4f93e010954c@gitlab.mail> Zubin pushed new branch wip/ghc-9.12-alpha3 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/ghc-9.12-alpha3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 14:27:05 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Thu, 14 Nov 2024 09:27:05 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-alpha3] 6 commits: Bump file-io submodule to 0.1.4 Message-ID: <673608b9d2fd5_30077b4f8fa810979f@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-alpha3 at Glasgow Haskell Compiler / GHC Commits: ba786681 by Zubin Duggal at 2024-11-14T19:56:41+05:30 Bump file-io submodule to 0.1.4 - - - - - 3a7ffdbb by Zubin Duggal at 2024-11-14T19:56:41+05:30 bump os-string submodule to 2.0.6 - - - - - 53b46fd4 by Zubin Duggal at 2024-11-14T19:56:41+05:30 bump transformers submodule to 0.6.1.2 - - - - - 27dc2664 by Zubin Duggal at 2024-11-14T19:56:41+05:30 Bump directory submodule to v1.3.9.0 - - - - - 80df8808 by Zubin Duggal at 2024-11-14T19:56:41+05:30 Bump Win32 submodule to v2.14.1.0 - - - - - 29bfae2c by Zubin Duggal at 2024-11-14T19:56:41+05:30 Bump filepath submodule to 1.5.3.0 - - - - - 7 changed files: - hadrian/src/Settings/Warnings.hs - libraries/Win32 - libraries/directory - libraries/file-io - libraries/filepath - libraries/os-string - libraries/transformers Changes: ===================================== hadrian/src/Settings/Warnings.hs ===================================== @@ -47,6 +47,7 @@ ghcWarningsArgs = do , package directory ? pure [ "-Wno-unused-imports" , "-Wno-deprecations" -- https://gitlab.haskell.org/ghc/ghc/-/issues/24240 ] + , package fileio ? pure [ "-Wno-unused-imports" ] -- https://github.com/haskell/file-io/issues/30 , package ghc ? pure [ "-Wcpp-undef" , "-Wincomplete-uni-patterns" , "-Wincomplete-record-updates" ===================================== libraries/Win32 ===================================== @@ -1 +1 @@ -Subproject commit 350ebd43f9a8d9e1ca767b0000f95bdfb42a5471 +Subproject commit 027cbcf0de25d681823ea92fb545a2604c3a6a8b ===================================== libraries/directory ===================================== @@ -1 +1 @@ -Subproject commit 0c88ffff883d33df96b50879d1983a67e9dfeb81 +Subproject commit 005fa061171a55d35ce8dfe936cf3703525a8616 ===================================== libraries/file-io ===================================== @@ -1 +1 @@ -Subproject commit a4a0464ccd38e8380c202949a90b21d9e592aeef +Subproject commit f0b7bf70160c447a7960945b5316db9f8f299eb7 ===================================== libraries/filepath ===================================== @@ -1 +1 @@ -Subproject commit bf2374ddfd7b2e5ba4e69d5ffbf4ebf6286c9c22 +Subproject commit a9c3f18976b643cf698e60fed4fdfb869df3eef3 ===================================== libraries/os-string ===================================== @@ -1 +1 @@ -Subproject commit 1d0553e20499d4bbaefe30d0489a08bc3523d331 +Subproject commit 2cb0a50fa6fe9ed775e59b58f6c304b00ec6cf84 ===================================== libraries/transformers ===================================== @@ -1 +1 @@ -Subproject commit ba3503905dec072acc6515323c884706efd4dbb4 +Subproject commit cee47cca7705edafe0a5839439e679edbd61890a View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/85a1cb1e200c431f60d6a88901d3544392756b6b...29bfae2c58a7303a081a6e7956b9f55e5faf3eeb -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/85a1cb1e200c431f60d6a88901d3544392756b6b...29bfae2c58a7303a081a6e7956b9f55e5faf3eeb You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 14:45:01 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 09:45:01 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 15 commits: Add regression test for #16234 Message-ID: <67360ced6095a_2bacd1fac58870cd@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 272658fe by Ryan Scott at 2024-11-14T09:44:40-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - 98f16475 by Matthew Pickering at 2024-11-14T09:44:42-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 7e3c1e10 by Ben Gamari at 2024-11-14T09:44:42-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - 817e19ab by Ben Gamari at 2024-11-14T09:44:43-05:00 rts: Tighten up invariants of PACK - - - - - 745bffa0 by Ben Gamari at 2024-11-14T09:44:43-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 3daf48b8 by Ben Gamari at 2024-11-14T09:44:43-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 6df6f288 by Ben Gamari at 2024-11-14T09:44:43-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - a209a321 by Ben Gamari at 2024-11-14T09:44:43-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - f18020f8 by Cheng Shao at 2024-11-14T09:44:43-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - 967f4f67 by Ben Gamari at 2024-11-14T09:44:45-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - a00da2e0 by Cheng Shao at 2024-11-14T09:44:46-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - 81f844f9 by Cheng Shao at 2024-11-14T09:44:46-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - ba37d98a by Ben Gamari at 2024-11-14T09:44:46-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - a3a7cde2 by Ben Gamari at 2024-11-14T09:44:46-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 22b9e54e by Ben Gamari at 2024-11-14T09:44:46-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 8 changed files: - compile_flags.txt - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/Runtime/Heap/Inspect.hs - libraries/base/tests/unicode002.stdout - libraries/base/tests/unicode003.hs - libraries/base/tests/unicode003.stdout - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/DerivedCoreProperties.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/31ff157fc624bd8e0442f5fecfdd10a93346a525...22b9e54eaea48c536573ebeda13d79d480cabc2a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/31ff157fc624bd8e0442f5fecfdd10a93346a525...22b9e54eaea48c536573ebeda13d79d480cabc2a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 15:06:50 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 14 Nov 2024 10:06:50 -0500 Subject: [Git][ghc/ghc][wip/romes/exceptions-propagate] 3 commits: Fix exception backtraces from GHCi Message-ID: <6736120a17f23_2bacd143858c1013bc@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/exceptions-propagate at Glasgow Haskell Compiler / GHC Commits: 1cf79254 by Rodrigo Mesquita at 2024-11-14T15:06:38+00:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModulesRecomp: ------------------------- Metric Decrease: MultiLayerModulesRecomp ------------------------- - - - - - adc56739 by Rodrigo Mesquita at 2024-11-14T15:06:38+00:00 base: Add to changelog.md CLC #285 - - - - - b90841fb by Rodrigo Mesquita at 2024-11-14T15:06:38+00:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 18 changed files: - ghc/GHCi/UI/Monad.hs - libraries/array - libraries/base/changelog.md - libraries/ghci/GHCi/Message.hs - libraries/ghci/GHCi/Run.hs - libraries/stm - testsuite/tests/ghc-e/should_run/ghc-e005.stderr - testsuite/tests/ghci.debugger/scripts/break009.stdout - testsuite/tests/ghci.debugger/scripts/break011.stdout - testsuite/tests/ghci.debugger/scripts/break017.stdout - testsuite/tests/ghci.debugger/scripts/break024.stdout - testsuite/tests/ghci/scripts/Defer02.stderr - testsuite/tests/ghci/scripts/T10501.stderr - testsuite/tests/ghci/scripts/T15325.stderr - testsuite/tests/ghci/scripts/T5557.stdout - testsuite/tests/ghci/scripts/ghci055.stdout - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/patsyn/should_run/ghci.stderr Changes: ===================================== ghc/GHCi/UI/Monad.hs ===================================== @@ -212,7 +212,9 @@ data CommandResult deriving Show cmdSuccess :: MonadThrow m => CommandResult -> m (Maybe Bool) -cmdSuccess CommandComplete{ cmdResult = Left e } = throwM e +cmdSuccess CommandComplete{ cmdResult = Left e } = + {- Don't add a backtrace from ghci/ghc to the exception from the user program! -} + throwM (NoBacktrace e) cmdSuccess CommandComplete{ cmdResult = Right r } = return r cmdSuccess CommandIncomplete = return $ Just True ===================================== libraries/array ===================================== @@ -1 +1 @@ -Subproject commit c9cb2c1e8762aa83b6e77af82c87a55e03e990e4 +Subproject commit c86635e25d6292f8f8248c426e8a4bfbc802dbc9 ===================================== libraries/base/changelog.md ===================================== @@ -39,6 +39,17 @@ `onException`, such as `base`, or the `exceptions` package. * Move `Lift ByteArray` and `Lift Fixed` instances into `base` from `template-haskell`. See [CLC proposal #287](https://github.com/haskell/core-libraries-committee/issues/287). * Make `Debug.Trace.{traceEventIO,traceMarkerIO}` faster when tracing is disabled. See [CLC proposal #291](https://github.com/haskell/core-libraries-committee/issues/291). + * The exception messages were improved according to [CLC proposal #285](https://github.com/haskell/core-libraries-committee/issues/285). In particular: + * Improve the message of the uncaught exception handler + * Make `displayException (SomeException e) = displayException e`. The + additional information that is printed when exceptions are surfaced to + the top-level is added by `uncaughtExceptionHandler`. + * Get rid of the HasCallStack mechanism manually propagated by `ErrorCall` + in favour of the more general HasCallStack exception backtrace + mechanism, to remove duplicate call stacks for uncaught exceptions. + * Freeze the callstack of `error`, `undefined`, `throwIO`, `ioException`, + `ioError` to prevent leaking the implementation of these error functions + into the callstack. ## 4.20.0.0 May 2024 * Shipped with GHC 9.10.1 ===================================== libraries/ghci/GHCi/Message.hs ===================================== @@ -1,6 +1,6 @@ {-# LANGUAGE GADTs, DeriveGeneric, StandaloneDeriving, ScopedTypeVariables, - GeneralizedNewtypeDeriving, ExistentialQuantification, RecordWildCards - #-} + GeneralizedNewtypeDeriving, ExistentialQuantification, RecordWildCards, + CPP #-} {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-orphans #-} -- | @@ -40,6 +40,9 @@ import GHC.Fingerprint import GHC.Conc (pseq, par) import Control.Concurrent import Control.Exception +#if MIN_VERSION_base(4,20,0) +import Control.Exception.Context +#endif import Data.Binary import Data.Binary.Get import Data.Binary.Put @@ -442,7 +445,15 @@ toSerializableException :: SomeException -> SerializableException toSerializableException ex | Just UserInterrupt <- fromException ex = EUserInterrupt | Just (ec::ExitCode) <- fromException ex = (EExitCode ec) - | otherwise = EOtherException (show (ex :: SomeException)) + | otherwise = EOtherException $ +#if MIN_VERSION_base(4,20,0) + -- Exception plus backtrace as seen in `displayExceptionWithInfo` + case displayExceptionContext (someExceptionContext ex) of + "" -> displayException (ex :: SomeException) + cx -> displayException (ex :: SomeException) ++ "\n\n" ++ cx +#else + show (ex :: SomeException) +#endif fromSerializableException :: SerializableException -> SomeException fromSerializableException EUserInterrupt = toException UserInterrupt ===================================== libraries/ghci/GHCi/Run.hs ===================================== @@ -252,7 +252,7 @@ sandboxIO opts io = do -- rethrow :: EvalOpts -> IO a -> IO a rethrow EvalOpts{..} io = - catch io $ \se -> do + catchNoPropagate io $ \(ExceptionWithContext cx se) -> do -- If -fbreak-on-error, we break unconditionally, -- but with care of not breaking twice if breakOnError && not breakOnException @@ -263,7 +263,7 @@ rethrow EvalOpts{..} io = Just UserInterrupt -> return () -- In any other case, we don't want to break _ -> poke exceptionFlag 0 - throwIO se + rethrowIO (ExceptionWithContext cx se) -- -- While we're waiting for the sandbox thread to return a result, if ===================================== libraries/stm ===================================== @@ -1 +1 @@ -Subproject commit cb861ea10065f229bbc5b6a1e2b9bde998f18184 +Subproject commit 07df1050ab5d45244f718eee8a512bb18e7066f6 ===================================== testsuite/tests/ghc-e/should_run/ghc-e005.stderr ===================================== @@ -3,16 +3,5 @@ ghc-e005-prog: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall: foo HasCallStack backtrace: - throwIO, called at libraries/exceptions/src/Control/Monad/Catch.hs:371:12 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at compiler/GHC/Driver/Monad.hs:167:54 in ghc-9.13-inplace:GHC.Driver.Monad - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at ghc/GHCi/UI/Monad.hs:288:15 in ghc-bin-9.13.20240930-inplace:GHCi.UI.Monad - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/haskeline/System/Console/Haskeline/InputT.hs:53:39 in haskeline-0.8.2.1-inplace:System.Console.Haskeline.InputT - throwM, called at ghc/GHCi/UI/Monad.hs:215:52 in ghc-bin-9.13.20240930-inplace:GHCi.UI.Monad + error, called at ghc-e005.hs:12:10 in main:Main ===================================== testsuite/tests/ghci.debugger/scripts/break009.stdout ===================================== @@ -2,3 +2,10 @@ Breakpoint 0 activated at Test6.hs:5:8-11 Stopped in Main.main, Test6.hs:5:8-11 _result :: a = _ *** Exception: Prelude.head: empty list + +HasCallStack backtrace: + error, called at libraries/ghc-internal/src/GHC/Internal/List.hs:2036:3 in ghc-internal:GHC.Internal.List + errorEmptyList, called at libraries/ghc-internal/src/GHC/Internal/List.hs:96:11 in ghc-internal:GHC.Internal.List + badHead, called at libraries/ghc-internal/src/GHC/Internal/List.hs:90:28 in ghc-internal:GHC.Internal.List + head, called at Test6.hs:1:8 in main:Main + ===================================== testsuite/tests/ghci.debugger/scripts/break011.stdout ===================================== @@ -1,4 +1,8 @@ *** Exception: foo + +HasCallStack backtrace: + error, called at :2:1 in interactive:Ghci1 + Stopped in , _exception :: e = _ Stopped in , @@ -20,8 +24,16 @@ _exception = SomeException (ErrorCall "foo") _result :: a = _ _exception :: SomeException = SomeException (ErrorCall "foo") *** Exception: foo + +HasCallStack backtrace: + error, called at Test7.hs:2:18 in main:Main + Stopped in , _exception :: e = _ Stopped in , _exception :: e = _ *** Exception: foo + +HasCallStack backtrace: + error, called at Test7.hs:2:18 in main:Main + ===================================== testsuite/tests/ghci.debugger/scripts/break017.stdout ===================================== @@ -11,5 +11,9 @@ Printing 1 as = 'b' : 'c' : (_t1::[Char]) Forcing *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :3:17 in interactive:Ghci1 + Printing 2 as = 'b' : 'c' : (_t2::[Char]) ===================================== testsuite/tests/ghci.debugger/scripts/break024.stdout ===================================== @@ -6,6 +6,10 @@ _exception = SomeException Nothing GHC.Internal.IO.Exception.UserError [] "error" Nothing Nothing) *** Exception: user error (error) + +HasCallStack backtrace: + ioError, called at break024.hs:3:22 in main:Main + Stopped in , _exception :: e = _ _exception = SomeException ===================================== testsuite/tests/ghci/scripts/Defer02.stderr ===================================== @@ -1,4 +1,3 @@ - Defer01.hs:10:40: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] • Couldn't match type ‘Char’ with ‘[Char]’ Expected: String @@ -61,6 +60,7 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] In the first argument of ‘(>>)’, namely ‘putChar’ In the expression: putChar >> putChar 'p' In an equation for ‘l’: l = putChar >> putChar 'p' + *** Exception: Defer01.hs:10:40: error: [GHC-83865] • Couldn't match type ‘Char’ with ‘[Char]’ Expected: String @@ -69,17 +69,34 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] In the second argument of ‘(>>)’, namely ‘putStr ','’ In the expression: putStr "Hello World" >> putStr ',' (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:13:5: error: [GHC-83865] • Couldn't match expected type ‘Int’ with actual type ‘Char’ • In the expression: 'p' In an equation for ‘a’: a = 'p' (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:17:9: error: [GHC-39999] • No instance for ‘Eq B’ arising from a use of ‘==’ • In the expression: x == x In an equation for ‘b’: b x = x == x (deferred type error) +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + :10:11: error: [GHC-83865] • Couldn't match type ‘Bool’ with ‘Int’ Expected: C Int @@ -87,12 +104,19 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] • In the first argument of ‘c’, namely ‘(C2 True)’ In the first argument of ‘print’, namely ‘(c (C2 True))’ In the expression: print (c (C2 True)) + *** Exception: Defer01.hs:27:5: error: [GHC-39999] • No instance for ‘Num (a -> a)’ arising from the literal ‘1’ (maybe you haven't applied a function to enough arguments?) • In the expression: 1 In an equation for ‘d’: d = 1 (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:30:5: error: [GHC-83865] • Couldn't match expected type ‘Char -> t’ with actual type ‘Char’ • The function ‘e’ is applied to one visible argument, @@ -101,6 +125,12 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] In an equation for ‘f’: f = e 'q' • Relevant bindings include f :: t (bound at Defer01.hs:30:1) (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:33:8: error: [GHC-25897] • Couldn't match expected type ‘Char’ with actual type ‘a’ ‘a’ is a rigid type variable bound by @@ -114,6 +144,12 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] x :: a (bound at Defer01.hs:33:3) h :: a -> (Char, Char) (bound at Defer01.hs:33:1) (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:38:17: error: [GHC-83865] • Couldn't match expected type ‘Bool’ with actual type ‘T a’ • In the first argument of ‘not’, namely ‘(K a)’ @@ -123,17 +159,29 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] a :: a (bound at Defer01.hs:38:3) i :: a -> () (bound at Defer01.hs:38:1) (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:42:5: error: [GHC-39999] • No instance for ‘MyClass a1’ arising from a use of ‘myOp’ • In the expression: myOp 23 In an equation for ‘j’: j = myOp 23 (deferred type error) +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + :16:8: error: [GHC-18872] • Couldn't match type ‘Int’ with ‘Bool’ arising from a use of ‘k’ • In the first argument of ‘print’, namely ‘(k 2)’ In the expression: print (k 2) In an equation for ‘it’: it = print (k 2) + *** Exception: Defer01.hs:49:5: error: [GHC-83865] • Couldn't match expected type: IO a0 with actual type: Char -> IO () @@ -142,3 +190,9 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] In the expression: putChar >> putChar 'p' In an equation for ‘l’: l = putChar >> putChar 'p' (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + ===================================== testsuite/tests/ghci/scripts/T10501.stderr ===================================== @@ -1,2 +1,13 @@ *** Exception: Prelude.head: empty list + +HasCallStack backtrace: + error, called at libraries/ghc-internal/src/GHC/Internal/List.hs:2036:3 in ghc-internal:GHC.Internal.List + errorEmptyList, called at libraries/ghc-internal/src/GHC/Internal/List.hs:96:11 in ghc-internal:GHC.Internal.List + badHead, called at libraries/ghc-internal/src/GHC/Internal/List.hs:90:28 in ghc-internal:GHC.Internal.List + head, called at :1:10 in interactive:Ghci1 + *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :1:17 in interactive:Ghci1 + ===================================== testsuite/tests/ghci/scripts/T15325.stderr ===================================== @@ -1,4 +1,3 @@ - T15325.hs:11:7: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)] • No instance for ‘PolyList e0’ arising from a use of ‘f’ • In the expression: f 0 @@ -17,8 +16,15 @@ T15325.hs:11:9: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)] • In the first argument of ‘f’, namely ‘0’ In the expression: f 0 In an equation for ‘plh’: plh = f 0 + *** Exception: T15325.hs:11:7: error: [GHC-39999] • No instance for ‘PolyList e0’ arising from a use of ‘f’ • In the expression: f 0 In an equation for ‘plh’: plh = f 0 (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + ===================================== testsuite/tests/ghci/scripts/T5557.stdout ===================================== @@ -1,2 +1,10 @@ *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :2:12 in interactive:Ghci1 + *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :3:12 in interactive:Ghci1 + ===================================== testsuite/tests/ghci/scripts/ghci055.stdout ===================================== @@ -1,3 +1,7 @@ *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :1:7 in interactive:Ghci1 + x :: a = _ y :: Int = 3 ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -249,6 +249,8 @@ module Control.Exception where data MaskingState = Unmasked | MaskedInterruptible | MaskedUninterruptible type NestedAtomically :: * data NestedAtomically = NestedAtomically + type NoBacktrace :: * -> * + newtype NoBacktrace e = NoBacktrace e type NoMethodError :: * newtype NoMethodError = NoMethodError GHC.Internal.Base.String type NonTermination :: * ===================================== testsuite/tests/patsyn/should_run/ghci.stderr ===================================== @@ -1,2 +1,8 @@ *** Exception: :5:5-35: Non-exhaustive patterns in function foo + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2bf0d4f23c5f7de979279d14053fbf95689b2c93...b90841fb2d8e9a00394db75e762440194d3549e8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2bf0d4f23c5f7de979279d14053fbf95689b2c93...b90841fb2d8e9a00394db75e762440194d3549e8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 17:08:01 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Thu, 14 Nov 2024 12:08:01 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-alpha3] Bump file-io submodule to avoid usage of QuasiQuotes Message-ID: <67362e718c7ec_286935840788629a4@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-alpha3 at Glasgow Haskell Compiler / GHC Commits: 15b48b9a by Zubin Duggal at 2024-11-14T22:37:40+05:30 Bump file-io submodule to avoid usage of QuasiQuotes - - - - - 1 changed file: - libraries/file-io Changes: ===================================== libraries/file-io ===================================== @@ -1 +1 @@ -Subproject commit f0b7bf70160c447a7960945b5316db9f8f299eb7 +Subproject commit c04f2b0746c9115b4db0e605a968e86226637c87 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/15b48b9a8b774d56f70c52300ee44035844f4350 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/15b48b9a8b774d56f70c52300ee44035844f4350 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 17:19:18 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Thu, 14 Nov 2024 12:19:18 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-alpha3] Bump file-io submodule to avoid usage of QuasiQuotes Message-ID: <673631162a744_2869359d7a4c63546@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-alpha3 at Glasgow Haskell Compiler / GHC Commits: 9fdb8331 by Zubin Duggal at 2024-11-14T22:49:00+05:30 Bump file-io submodule to avoid usage of QuasiQuotes - - - - - 1 changed file: - libraries/file-io Changes: ===================================== libraries/file-io ===================================== @@ -1 +1 @@ -Subproject commit f0b7bf70160c447a7960945b5316db9f8f299eb7 +Subproject commit 9457d3a60d9292c81e7ac4078d6912f135ce9fbe View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9fdb83316e550220541c199cd3871f0860429c8f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9fdb83316e550220541c199cd3871f0860429c8f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 17:30:33 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Thu, 14 Nov 2024 12:30:33 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-alpha3] Bump file-io submodule to avoid usage of QuasiQuotes Message-ID: <673633b999c4a_286935ca6e3065997@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-alpha3 at Glasgow Haskell Compiler / GHC Commits: 97b0dff2 by Zubin Duggal at 2024-11-14T23:00:10+05:30 Bump file-io submodule to avoid usage of QuasiQuotes - - - - - 1 changed file: - libraries/file-io Changes: ===================================== libraries/file-io ===================================== @@ -1 +1 @@ -Subproject commit f0b7bf70160c447a7960945b5316db9f8f299eb7 +Subproject commit a5d9e1cad53736e0f95a7a1dce53637eef30eda0 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97b0dff223a6c4cc003adec448104c277f214645 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/97b0dff223a6c4cc003adec448104c277f214645 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 18:01:01 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 14 Nov 2024 13:01:01 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/romes/graph-compact-easy Message-ID: <67363addb5486_286935fd1f9c7216d@gitlab.mail> Rodrigo Mesquita pushed new branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/romes/graph-compact-easy You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 14 19:45:27 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Thu, 14 Nov 2024 14:45:27 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25459 Message-ID: <673653574a787_2869351548d40957e9@gitlab.mail> Ben Gamari pushed new branch wip/T25459 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25459 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:05:45 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:05:45 -0500 Subject: [Git][ghc/ghc][master] Add regression test for #16234 Message-ID: <67369059c5b8_8fbc150fdac119256@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - 10 changed files: - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClasses.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesCore.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesEffects.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesReader.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesState.hs - + testsuite/tests/typecheck/should_compile/T16234/ControlMonadPrimitive.hs - + testsuite/tests/typecheck/should_compile/T16234/DataPeano.hs - + testsuite/tests/typecheck/should_compile/T16234/Main.hs - + testsuite/tests/typecheck/should_compile/T16234/Makefile - + testsuite/tests/typecheck/should_compile/T16234/all.T Changes: ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClasses.hs ===================================== @@ -0,0 +1,7 @@ +module ControlMonadClasses + ( -- * Reader + MonadReader + ) where + +import ControlMonadClassesReader +import ControlMonadClassesState () ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesCore.hs ===================================== @@ -0,0 +1,23 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UndecidableInstances #-} +module ControlMonadClassesCore where + +import Data.Kind (Type) +import DataPeano + +type family CanDo (m :: Type -> Type) (eff :: k) :: Bool + +type family MapCanDo (eff :: k) (stack :: Type -> Type) :: [Bool] where + MapCanDo eff (t m) = CanDo (t m) eff ': MapCanDo eff m + MapCanDo eff m = '[ CanDo m eff ] + +type family FindTrue + (bs :: [Bool]) + :: Peano + where + FindTrue ('True ': t) = 'Zero + FindTrue ('False ': t) = 'Succ (FindTrue t) + +type Find eff (m :: Type -> Type) = + FindTrue (MapCanDo eff m) ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesEffects.hs ===================================== @@ -0,0 +1,5 @@ +module ControlMonadClassesEffects where + +import Data.Kind (Type) + +data EffReader (e :: Type) ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesReader.hs ===================================== @@ -0,0 +1,17 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +module ControlMonadClassesReader where + +import qualified Control.Monad.Trans.State.Lazy as SL +import ControlMonadClassesCore +import ControlMonadClassesEffects +import Control.Monad.Trans.Class +import Data.Kind (Type) +import DataPeano + +class Monad m => MonadReaderN (n :: Peano) (r :: Type) m +instance Monad m => MonadReaderN 'Zero r (SL.StateT r m) +instance (MonadTrans t, Monad (t m), MonadReaderN n r m, Monad m) + => MonadReaderN ('Succ n) r (t m) + +type MonadReader e m = MonadReaderN (Find (EffReader e) m) e m ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadClassesState.hs ===================================== @@ -0,0 +1,13 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE TypeFamilies #-} +module ControlMonadClassesState where + +import qualified Control.Monad.Trans.State.Lazy as SL +import ControlMonadClassesCore +import ControlMonadClassesEffects + +type instance CanDo (SL.StateT s m) eff = StateCanDo s eff + +type family StateCanDo s eff where + StateCanDo s (EffReader s) = 'True + StateCanDo s eff = 'False ===================================== testsuite/tests/typecheck/should_compile/T16234/ControlMonadPrimitive.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module ControlMonadPrimitive (PrimMonad(..)) where + +import Control.Monad.Trans.State (StateT) + +class Monad m => PrimMonad m where + type PrimState m +instance PrimMonad m => PrimMonad (StateT s m) where + type PrimState (StateT s m) = PrimState m ===================================== testsuite/tests/typecheck/should_compile/T16234/DataPeano.hs ===================================== @@ -0,0 +1,3 @@ +module DataPeano where + +data Peano = Zero | Succ Peano ===================================== testsuite/tests/typecheck/should_compile/T16234/Main.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE TypeFamilies #-} +module Main where + +import ControlMonadClasses (MonadReader) +--import ControlMonadPrimitive () +import Control.Monad.Trans.State.Lazy (StateT) + +main :: (n ~ StateT () IO, MonadReader () n) => IO () +main = undefined ===================================== testsuite/tests/typecheck/should_compile/T16234/Makefile ===================================== @@ -0,0 +1,17 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +clean: + rm -f *.o *.hi + +T16234: + $(MAKE) -s --no-print-directory clean + '$(TEST_HC)' $(TEST_HC_OPTS) -c DataPeano.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadPrimitive.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesCore.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesEffects.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesReader.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClassesState.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c ControlMonadClasses.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c Main.hs ===================================== testsuite/tests/typecheck/should_compile/T16234/all.T ===================================== @@ -0,0 +1 @@ +test('T16234', [extra_files(['DataPeano.hs', 'ControlMonadPrimitive.hs', 'ControlMonadClassesCore.hs', 'ControlMonadClassesEffects.hs', 'ControlMonadClassesReader.hs', 'ControlMonadClassesState.hs', 'ControlMonadClasses.hs', 'Main.hs'])], makefile_test, ['T16234']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fa66fa64f27c6069a618dada0b4414f31d37a575 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fa66fa64f27c6069a618dada0b4414f31d37a575 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:06:28 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:06:28 -0500 Subject: [Git][ghc/ghc][master] ghc-internal: Update to Unicode 16 Message-ID: <673690845bf09_8fbc177efd412527@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 4 changed files: - libraries/base/tests/unicode002.stdout - libraries/base/tests/unicode003.hs - libraries/base/tests/unicode003.stdout - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/DerivedCoreProperties.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bfe64df85683d63ccfa438fed0999193b703d48c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bfe64df85683d63ccfa438fed0999193b703d48c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:07:16 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:07:16 -0500 Subject: [Git][ghc/ghc][master] configure: Accept happy-2.1.2 Message-ID: <673690b4ec855_8fbc1c3a3d4131247@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - 1 changed file: - m4/fptools_happy.m4 Changes: ===================================== m4/fptools_happy.m4 ===================================== @@ -24,13 +24,13 @@ changequote([, ])dnl ]) if test ! -f compiler/GHC/Parser.hs || test ! -f compiler/GHC/Cmm/Parser.hs then - failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.1 is required to compile GHC" + failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.2 is required to compile GHC" FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.20.0], [AC_MSG_ERROR([$failure_msg])])[] FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[1.21.0], FP_COMPARE_VERSIONS([$fptools_cv_happy_version], [-le], [2.0.1], [AC_MSG_ERROR([$failure_msg])])[])[] - FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.1.0], + FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.2.0], [AC_MSG_ERROR([$failure_msg])])[] fi View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1fd83f865ffb620f4f7c4c59787710206dcadb90 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1fd83f865ffb620f4f7c4c59787710206dcadb90 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:07:53 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:07:53 -0500 Subject: [Git][ghc/ghc][master] 5 commits: rts: Tighten up invariants of PACK Message-ID: <673690d8eaa79_8fbc1cdaab41344d9@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 4 changed files: - compiler/GHC/ByteCode/Instr.hs - rts/Interpreter.c - rts/include/rts/storage/InfoTables.h - testsuite/driver/testlib.py Changes: ===================================== compiler/GHC/ByteCode/Instr.hs ===================================== @@ -130,7 +130,18 @@ data BCInstr | PUSH_APPLY_PPPPP | PUSH_APPLY_PPPPPP - | SLIDE !WordOff{-this many-} !WordOff{-down by this much-} + -- | Drop entries @(n, n+by]@ entries from the stack. Graphically: + -- @ + -- a_1 ← top + -- ... + -- a_n + -- b_1 => a_1 ← top + -- ... ... + -- b_by a_n + -- k k + -- @ + | SLIDE !WordOff -- ^ n = this many + !WordOff -- ^ by = down by this much -- To do with the heap | ALLOC_AP !HalfWord {- make an AP with this many payload words. @@ -175,7 +186,12 @@ data BCInstr -- The Word16 value is a constructor number and therefore -- stored in the insn stream rather than as an offset into -- the literal pool. + + -- | Test whether the tag of a closure pointer is less than the given value. + -- If not, jump to the given label. | TESTLT_P !Word16 LocalLabel + -- | Test whether the tag of a closure pointer is equal to the given value. + -- If not, jump to the given label. | TESTEQ_P !Word16 LocalLabel | CASEFAIL ===================================== rts/Interpreter.c ===================================== @@ -1630,7 +1630,11 @@ run_BCO: case bci_SLIDE: { W_ n = BCO_GET_LARGE_ARG; W_ by = BCO_GET_LARGE_ARG; - /* a_1, .. a_n, b_1, .. b_by, s => a_1, .. a_n, s */ + /* + * a_1 ... a_n, b_1 ... b_by, k + * => + * a_1 ... a_n, k + */ while(n-- > 0) { SpW(n+by) = SpW(n); } @@ -1744,23 +1748,29 @@ run_BCO: } case bci_PACK: { - W_ i; W_ o_itbl = BCO_GET_LARGE_ARG; W_ n_words = BCO_GET_LARGE_ARG; - StgInfoTable* itbl = INFO_PTR_TO_STRUCT((StgInfoTable *)BCO_LIT(o_itbl)); - int request = CONSTR_sizeW( itbl->layout.payload.ptrs, - itbl->layout.payload.nptrs ); + StgConInfoTable* itbl = CON_INFO_PTR_TO_STRUCT((StgInfoTable *)BCO_LIT(o_itbl)); + W_ n_ptrs = itbl->i.layout.payload.ptrs; + W_ n_nptrs = itbl->i.layout.payload.nptrs; + W_ request = CONSTR_sizeW( n_ptrs, n_nptrs ); StgClosure* con = (StgClosure*)allocate_NONUPD(cap,request); - ASSERT( itbl->layout.payload.ptrs + itbl->layout.payload.nptrs > 0); - for (i = 0; i < n_words; i++) { + ASSERT(ip_HNF(&itbl->i)); // We don't have a CON flag, HNF is a good approximation + // N. + // N.B. we may have a nullary datacon with padding, in which case + // n_nptrs=1, n_ptrs=0. + ASSERT(n_ptrs + n_nptrs == n_words || (n_nptrs == 1 && n_ptrs == 0)); + ASSERT(n_ptrs + n_nptrs > 0); + //ASSERT(n_words > 0); // We shouldn't ever need to allocate nullary constructors + for (W_ i = 0; i < n_words; i++) { con->payload[i] = (StgClosure*)SpW(i); } Sp_addW(n_words); Sp_subW(1); // No write barrier is needed here as this is a new allocation // visible only from our stack - StgInfoTable *con_itbl = (StgInfoTable*) BCO_LIT(o_itbl); - SET_HDR(con, con_itbl, cap->r.rCCCS); + StgInfoTable *con_ptr = (StgInfoTable*) BCO_LIT(o_itbl); + SET_HDR(con, con_ptr, cap->r.rCCCS); StgClosure* tagged_con = tagConstr(con); SpW(0) = (W_)tagged_con; @@ -1775,6 +1785,7 @@ run_BCO: case bci_TESTLT_P: { unsigned int discr = BCO_NEXT; int failto = BCO_GET_LARGE_ARG; + ASSERT(discr <= TAG_MASK); StgClosure* con = UNTAG_CLOSURE((StgClosure*)SpW(0)); if (GET_TAG(con) >= discr) { bciPtr = failto; @@ -1785,6 +1796,7 @@ run_BCO: case bci_TESTEQ_P: { unsigned int discr = BCO_NEXT; int failto = BCO_GET_LARGE_ARG; + ASSERT(discr <= TAG_MASK); StgClosure* con = UNTAG_CLOSURE((StgClosure*)SpW(0)); if (GET_TAG(con) != discr) { bciPtr = failto; ===================================== rts/include/rts/storage/InfoTables.h ===================================== @@ -86,7 +86,7 @@ extern const StgWord16 closure_flags[]; #define closure_IND(c) ( closureFlags(c) & _IND) /* same as above but for info-ptr rather than closure */ -#define ipFlags(ip) (closure_flags[ip->type]) +#define ipFlags(ip) (closure_flags[(ip)->type]) #define ip_HNF(ip) ( ipFlags(ip) & _HNF) #define ip_BITMAP(ip) ( ipFlags(ip) & _BTM) ===================================== testsuite/driver/testlib.py ===================================== @@ -3000,12 +3000,12 @@ def normalise_prof (s: str) -> str: # Source locations from internal libraries, remove the source location # > libraries/ghc-internal/src/path/Foo.hs:204:1-18 # => ghc-internal/src/path/Foo.hs - s = re.sub('\slibraries/(\S+)(:\S+){2}\s',' \\1 ', s) + s = re.sub(r'\slibraries/(\S+)(:\S+){2}\s', r' \1 ', s) # Source locations from internal libraries, remove the source location # > libraries/ghc-internal/src/path/Foo.hs::(2,1)-(5,38) # => ghc-internal/src/path/Foo.hs - s = re.sub('\slibraries/(\S+)(:\S+){1}\s',' \\1 ', s) + s = re.sub(r'\slibraries/(\S+)(:\S+){1}\s', r' \1 ', s) # We have something like this: # View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1fd83f865ffb620f4f7c4c59787710206dcadb90...1f668511ff18cba9439c6ad1c77467f61f8e3b82 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1fd83f865ffb620f4f7c4c59787710206dcadb90...1f668511ff18cba9439c6ad1c77467f61f8e3b82 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:08:27 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:08:27 -0500 Subject: [Git][ghc/ghc][master] misc: improve clangd compile_flags.txt flags Message-ID: <673690fb87ae8_8fbc1a701e813725a@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - 1 changed file: - compile_flags.txt Changes: ===================================== compile_flags.txt ===================================== @@ -1,5 +1,29 @@ --xc --Irts +-Wimplicit +-include +rts/include/ghcversion.h -Irts/include --I.hie-bios/stage0/lib --I_build/stage1/rts/build/include/ +-I_build/stage1/rts/build +-I_build/stage1/rts/build/include +-Irts +-Ilibraries/ghc-internal/include +-I_build/stage1/libraries/ghc-internal/build/include +-Ilibraries/ghc-bignum/include +-I_build/stage1/libraries/ghc-bignum/build/include +-Wno-unknown-pragmas +-Wall +-Wextra +-Wstrict-prototypes +-Wmissing-prototypes +-Wmissing-declarations +-Winline +-Wpointer-arith +-Wmissing-noreturn +-Wnested-externs +-Wredundant-decls +-Wundef +-DFS_NAMESPACE=rts +-DCOMPILING_RTS +-DTHREADED_RTS +-DDEBUG +-DDYNAMIC +-DPROFILING View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/59e0a77021e26c550fde39bf3b67a03dda497633 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/59e0a77021e26c550fde39bf3b67a03dda497633 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:09:08 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:09:08 -0500 Subject: [Git][ghc/ghc][master] testsuite: Don't consider untracked files in dirtiness check Message-ID: <67369124221a2_8fbc1e47258141590@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - 1 changed file: - testsuite/driver/perf_notes.py Changes: ===================================== testsuite/driver/perf_notes.py ===================================== @@ -43,7 +43,7 @@ def inside_git_repo() -> bool: # Check if the worktree is dirty. def is_worktree_dirty() -> bool: - return subprocess.check_output(['git', 'status', '--porcelain']) != b'' + return subprocess.check_output(['git', 'status', '--porcelain', '--untracked-files=no']) != b'' # Get length of abbreviated git commit hash def get_abbrev_hash_length() -> int: View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c2c562e04b44079f622cf7748b0e21af443b6a49 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c2c562e04b44079f622cf7748b0e21af443b6a49 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:09:50 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:09:50 -0500 Subject: [Git][ghc/ghc][master] 2 commits: testsuite: add regression test T25473 Message-ID: <6736914e1aa8a_8fbc1f97c2014554b@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - 5 changed files: - libraries/ghci/GHCi/ObjLink.hs - + testsuite/tests/th/wasm/T25473A.hs - + testsuite/tests/th/wasm/T25473B.hs - + testsuite/tests/th/wasm/all.T - utils/jsffi/dyld.mjs Changes: ===================================== libraries/ghci/GHCi/ObjLink.hs ===================================== @@ -76,7 +76,7 @@ loadDLL f = evaluate =<< js_loadDLL (toJSString f) pure $ Right nullPtr -foreign import javascript safe "__exports.__dyld.loadDLL($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.loadDLL($1)" js_loadDLL :: JSString -> IO () loadArchive :: String -> IO () @@ -96,7 +96,7 @@ lookupSymbol sym = do r <- js_lookupSymbol $ toJSString sym evaluate $ if r == nullPtr then Nothing else Just r -foreign import javascript unsafe "__exports.__dyld.lookupSymbol($1)" +foreign import javascript unsafe "__ghc_wasm_jsffi_dyld.lookupSymbol($1)" js_lookupSymbol :: JSString -> IO (Ptr a) lookupSymbolInDLL :: Ptr LoadedDLL -> String -> IO (Maybe (Ptr a)) @@ -114,7 +114,7 @@ addLibrarySearchPath p = do evaluate =<< js_addLibrarySearchPath (toJSString p) pure nullPtr -foreign import javascript safe "__exports.__dyld.addLibrarySearchPath($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.addLibrarySearchPath($1)" js_addLibrarySearchPath :: JSString -> IO () removeLibrarySearchPath :: Ptr () -> IO Bool @@ -128,7 +128,7 @@ findSystemLibrary f = m `catch` \(_ :: JSException) -> pure Nothing p <- evaluate $ fromJSString p' pure $ Just p -foreign import javascript safe "__exports.__dyld.findSystemLibrary($1)" +foreign import javascript safe "__ghc_wasm_jsffi_dyld.findSystemLibrary($1)" js_findSystemLibrary :: JSString -> IO JSString #else ===================================== testsuite/tests/th/wasm/T25473A.hs ===================================== @@ -0,0 +1,8 @@ +module T25473A where + +import GHC.Wasm.Prim + +type BinOp a = a -> a -> a + +foreign import javascript "wrapper" + mkJSBinOp :: BinOp Int -> IO JSVal ===================================== testsuite/tests/th/wasm/T25473B.hs ===================================== @@ -0,0 +1,10 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T25473B where + +import Language.Haskell.TH +import T25473A + +$(runIO $ do + _ <- mkJSBinOp (+) + pure []) ===================================== testsuite/tests/th/wasm/all.T ===================================== @@ -0,0 +1,5 @@ +setTestOpts([ + unless(arch('wasm32'), skip) +]) + +test('T25473', [], multimod_compile, ['T25473B', '-v0']) ===================================== utils/jsffi/dyld.mjs ===================================== @@ -293,9 +293,13 @@ class DyLD { #loadedSos = new Set(); // Mapping from export names to export funcs. It's also passed as - // __exports in JSFFI code, hence the "memory" special field. __dyld - // is used by ghci to call into here. - exportFuncs = { memory: this.#memory, __dyld: this }; + // __exports in JSFFI code, hence the "memory" special field. + exportFuncs = { memory: this.#memory }; + + // The FinalizationRegistry used by JSFFI. + #finalizationRegistry = new FinalizationRegistry((sp) => + this.exportFuncs.rts_freeStablePtr(sp) + ); // The GOT.func table. #gotFunc = {}; @@ -623,17 +627,22 @@ class DyLD { const mod = await modp; - // Fulfill the ghc_wasm_jsffi imports + // Fulfill the ghc_wasm_jsffi imports. Use new Function() + // instead of eval() to prevent bindings in this local scope to + // be accessed by JSFFI code snippets. Object.assign( import_obj.ghc_wasm_jsffi, new Function( - "return (__exports) => ({".concat( + "__exports", + "__ghc_wasm_jsffi_dyld", + "__ghc_wasm_jsffi_finalization_registry", + "return {".concat( ...parseSections(mod).map( (rec) => `${rec[0]}: ${parseRecord(rec)}, ` ), - "});" + "};" ) - )()(this.exportFuncs) + )(this.exportFuncs, this, this.#finalizationRegistry) ); // Fulfill the rest of the imports View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c2c562e04b44079f622cf7748b0e21af443b6a49...bd0a8b7e7537499f7dc703f78ac96f34e4c40554 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c2c562e04b44079f622cf7748b0e21af443b6a49...bd0a8b7e7537499f7dc703f78ac96f34e4c40554 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:10:31 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:10:31 -0500 Subject: [Git][ghc/ghc][master] 3 commits: rts/linker: Make FreeBSD declarations proper prototypes Message-ID: <67369177c96b1_8fbc1cd2f30145737@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 3 changed files: - compiler/GHC/Runtime/Heap/Inspect.hs - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc - rts/Linker.c Changes: ===================================== compiler/GHC/Runtime/Heap/Inspect.hs ===================================== @@ -892,8 +892,6 @@ extractSubTerms :: (Type -> ForeignHValue -> TcM Term) -> GenClosure ForeignHValue -> [Type] -> TcM [Term] extractSubTerms recurse clos = liftM thdOf3 . go 0 0 where - array = dataArgs clos - go ptr_i arr_i [] = return (ptr_i, arr_i, []) go ptr_i arr_i (ty:tys) | Just (tc, elem_tys) <- tcSplitTyConApp_maybe ty @@ -944,7 +942,7 @@ extractSubTerms recurse clos = liftM thdOf3 . go 0 0 | otherwise = let (q, r) = size_b `quotRem` word_size in assert (r == 0 ) - [ array!!i + [ dataArgs clos !! i | o <- [0.. q - 1] , let i = (aligned_idx `quot` word_size) + o ] @@ -967,7 +965,7 @@ extractSubTerms recurse clos = liftM thdOf3 . go 0 0 LittleEndian -> (word `shiftR` moveBits) `shiftL` zeroOutBits `shiftR` zeroOutBits where (q, r) = aligned_idx `quotRem` word_size - word = array!!q + word = dataArgs clos !! q moveBits = r * 8 zeroOutBits = (word_size - size_b) * 8 ===================================== libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc ===================================== @@ -73,7 +73,6 @@ import GHC.Internal.Control.Exception (catch, throw) import GHC.Internal.Data.Functor import GHC.Internal.Foreign.C.Types import GHC.Internal.Foreign.C.Error -import GHC.Internal.Foreign.C.String import GHC.Internal.Foreign.Marshal.Alloc import GHC.Internal.Foreign.Marshal.Array import GHC.Internal.Foreign.Ptr ===================================== rts/Linker.c ===================================== @@ -105,12 +105,12 @@ */ #if defined(freebsd_HOST_OS) -extern void iconvctl(); -extern void iconv_open_into(); -extern void iconv_open(); -extern void iconv_close(); -extern void iconv_canonicalize(); -extern void iconv(); +extern void iconvctl(void); +extern void iconv_open_into(void); +extern void iconv_open(void); +extern void iconv_close(void); +extern void iconv_canonicalize(void); +extern void iconv(void); #endif /* View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bd0a8b7e7537499f7dc703f78ac96f34e4c40554...79ecd19949a276b17c7a646ed35ee9e437452ca9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bd0a8b7e7537499f7dc703f78ac96f34e4c40554...79ecd19949a276b17c7a646ed35ee9e437452ca9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 00:42:26 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 14 Nov 2024 19:42:26 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 17 commits: Add regression test for #16234 Message-ID: <673698f277427_30eac3bc46c212dd@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 44b74b89 by Andrew Lelechenko at 2024-11-14T19:40:33-05:00 gitlab: mention CLC in MR template - - - - - 16efa143 by Ben Gamari at 2024-11-14T19:40:34-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 9 changed files: - .gitlab/merge_request_templates/Default.md - compile_flags.txt - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/Runtime/Heap/Inspect.hs - libraries/base/tests/unicode002.stdout - libraries/base/tests/unicode003.hs - libraries/base/tests/unicode003.stdout - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/DerivedCoreProperties.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/22b9e54eaea48c536573ebeda13d79d480cabc2a...16efa1439b7a415f5e3d1cb32bc3b70cf65ab8ed -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/22b9e54eaea48c536573ebeda13d79d480cabc2a...16efa1439b7a415f5e3d1cb32bc3b70cf65ab8ed You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 03:37:24 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Thu, 14 Nov 2024 22:37:24 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/add-jsffi-magic-vars-note Message-ID: <6736c1f471478_30eac39d8cd044879@gitlab.mail> Cheng Shao pushed new branch wip/add-jsffi-magic-vars-note at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/add-jsffi-magic-vars-note You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 05:43:34 2024 From: gitlab at gitlab.haskell.org (Peter Trommler (@trommler)) Date: Fri, 15 Nov 2024 00:43:34 -0500 Subject: [Git][ghc/ghc][wip/ppc64-fix-T25155-T25240] 17 commits: Add regression test for #16234 Message-ID: <6736df86b68b_170ce9bcbec64038@gitlab.mail> Peter Trommler pushed to branch wip/ppc64-fix-T25155-T25240 at Glasgow Haskell Compiler / GHC Commits: fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 6e81fa20 by Peter Trommler at 2024-11-15T05:43:28+00:00 Fix requirements on T25240 T25240 doesn't need RTS linker, GHCi is sufficient and GHCi can also be dynamically linked. - - - - - 60868f41 by Peter Trommler at 2024-11-15T05:43:28+00:00 Fix requirements for T25155 Loading C objects requires RTS linker. - - - - - 8 changed files: - compile_flags.txt - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/Runtime/Heap/Inspect.hs - libraries/base/tests/unicode002.stdout - libraries/base/tests/unicode003.hs - libraries/base/tests/unicode003.stdout - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc - libraries/ghc-internal/src/GHC/Internal/Unicode/Char/DerivedCoreProperties.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c1e137c3665fe592ffd787bbd2238a4eddd65d52...60868f41249eb4ab744ceeab0c5a61d6cc79061c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c1e137c3665fe592ffd787bbd2238a4eddd65d52...60868f41249eb4ab744ceeab0c5a61d6cc79061c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 11:11:13 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 15 Nov 2024 06:11:13 -0500 Subject: [Git][ghc/ghc][master] gitlab: mention CLC in MR template Message-ID: <67372c5148e1e_11069e1350386282c@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 1 changed file: - .gitlab/merge_request_templates/Default.md Changes: ===================================== .gitlab/merge_request_templates/Default.md ===================================== @@ -7,7 +7,12 @@ expectations. Also please answer the following question in your MR description:* Please take a few moments to address the following points: - * [ ] if your MR may break existing programs (e.g. touches `base` or causes the + * [ ] if your MR touches `base` (or touches parts of `ghc-internal` used + or re-exported by `base`) more substantially than just amending comments + or documentation, you likely need to raise a + [CLC proposal](https://github.com/haskell/core-libraries-committee#base-package) + before merging it. + * [ ] if your MR may break existing programs (e.g. causes the compiler to reject programs), please describe the expected breakage and add the ~"user-facing" label. This will run ghc/head.hackage> to characterise the effect of your change on Hackage. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1acb73bfa043119f1a4464617390da574570669f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1acb73bfa043119f1a4464617390da574570669f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 11:11:50 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 15 Nov 2024 06:11:50 -0500 Subject: [Git][ghc/ghc][master] rts: Allow use of GNU-stack notes on FreeBSD Message-ID: <67372c7639188_11069e1311046696a@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 5 changed files: - rts/StgCRunAsm.S - rts/adjustor/NativeAmd64Asm.S - rts/adjustor/NativeAmd64MingwAsm.S - rts/adjustor/Nativei386Asm.S - rts/configure.ac Changes: ===================================== rts/StgCRunAsm.S ===================================== @@ -497,6 +497,6 @@ StgReturn: #endif /* !USE_MINIINTERPRETER */ /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/NativeAmd64Asm.S ===================================== @@ -113,6 +113,6 @@ complex_ccall_ret_code: ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/NativeAmd64MingwAsm.S ===================================== @@ -135,6 +135,6 @@ complex_ccall_ret_code: ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/Nativei386Asm.S ===================================== @@ -52,6 +52,6 @@ DECLARE_CSYM(ccall_adjustor) ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/configure.ac ===================================== @@ -83,6 +83,10 @@ AS_IF([test x"${TargetHasSubsectionsViaSymbols}" = x"YES"], [AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1], [Define to 1 if Apple-style dead-stripping is supported.])]) +GHC_GNU_NONEXEC_STACK +AS_IF([test x"$TargetHasGnuNonexecStack" = x"YES"], + [AC_DEFINE([HAVE_GNU_NONEXEC_STACK], [1], [Define (to 1) if GNU-style non-executable stack note is supported])]) + dnl -------------------------------------------------- dnl * Platform header file and syscall feature tests dnl ### checking the state of the local header files and syscalls ### View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8f2e08320f846ed72ef0306ebbe75bdb3752226a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8f2e08320f846ed72ef0306ebbe75bdb3752226a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 13:14:21 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 15 Nov 2024 08:14:21 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25445b Message-ID: <6737492db53c4_29ef2d3602b8793f8@gitlab.mail> Simon Peyton Jones pushed new branch wip/T25445b at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25445b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 14:51:15 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Fri, 15 Nov 2024 09:51:15 -0500 Subject: [Git][ghc/ghc] Pushed new tag ghc-9.12.1-alpha3 Message-ID: <67375fe3acb8f_29ef2d8af64c92078@gitlab.mail> Zubin pushed new tag ghc-9.12.1-alpha3 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/ghc-9.12.1-alpha3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 15:40:55 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Fri, 15 Nov 2024 10:40:55 -0500 Subject: [Git][ghc/ghc][wip/romes/exceptions-propagate] 27 commits: Add regression test for #16234 Message-ID: <67376b8761897_1dbbef1286f818938@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/exceptions-propagate at Glasgow Haskell Compiler / GHC Commits: fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - eafc5693 by Matthew Pickering at 2024-11-15T11:50:41+00:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - 9e9d84d7 by Rodrigo Mesquita at 2024-11-15T11:50:41+00:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 27f026eb by Rodrigo Mesquita at 2024-11-15T11:50:41+00:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 7377abb3 by Rodrigo Mesquita at 2024-11-15T11:50:41+00:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - d6fe906f by Rodrigo Mesquita at 2024-11-15T11:50:41+00:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 9769c661 by Rodrigo Mesquita at 2024-11-15T11:50:42+00:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - 306943c0 by Rodrigo Mesquita at 2024-11-15T11:50:42+00:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 2e42f3a5 by Rodrigo Mesquita at 2024-11-15T15:40:13+00:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot ------------------------- - - - - - a6f5a400 by Rodrigo Mesquita at 2024-11-15T15:40:13+00:00 base: Add to changelog.md CLC #285 - - - - - 27e03dfd by Rodrigo Mesquita at 2024-11-15T15:40:13+00:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 30 changed files: - .gitlab/merge_request_templates/Default.md - compile_flags.txt - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Utils/Panic/Plain.hs - ghc/GHCi/UI/Monad.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr - libraries/base/tests/T24807.stderr - libraries/base/tests/all.T - libraries/base/tests/assert.stderr - libraries/base/tests/readFloat.stderr - − libraries/base/tests/topHandler04.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b90841fb2d8e9a00394db75e762440194d3549e8...27e03dfd2f6c5c9442a1518ce8c1ed1a78daa833 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b90841fb2d8e9a00394db75e762440194d3549e8...27e03dfd2f6c5c9442a1518ce8c1ed1a78daa833 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 15:47:51 2024 From: gitlab at gitlab.haskell.org (Peter Trommler (@trommler)) Date: Fri, 15 Nov 2024 10:47:51 -0500 Subject: [Git][ghc/ghc][wip/ppc64-fix-T25155-T25240] 4 commits: gitlab: mention CLC in MR template Message-ID: <67376d27c1cde_1dbbef2bb98423799@gitlab.mail> Peter Trommler pushed to branch wip/ppc64-fix-T25155-T25240 at Glasgow Haskell Compiler / GHC Commits: 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - ffd4a8a7 by Peter Trommler at 2024-11-15T15:47:49+00:00 Fix requirements on T25240 T25240 doesn't need RTS linker, GHCi is sufficient and GHCi can also be dynamically linked. - - - - - 9c5112c9 by Peter Trommler at 2024-11-15T15:47:49+00:00 Fix requirements for T25155 Loading C objects requires RTS linker. - - - - - 8 changed files: - .gitlab/merge_request_templates/Default.md - rts/StgCRunAsm.S - rts/adjustor/NativeAmd64Asm.S - rts/adjustor/NativeAmd64MingwAsm.S - rts/adjustor/Nativei386Asm.S - rts/configure.ac - testsuite/tests/ghci/linking/T25240/all.T - testsuite/tests/ghci/linking/all.T Changes: ===================================== .gitlab/merge_request_templates/Default.md ===================================== @@ -7,7 +7,12 @@ expectations. Also please answer the following question in your MR description:* Please take a few moments to address the following points: - * [ ] if your MR may break existing programs (e.g. touches `base` or causes the + * [ ] if your MR touches `base` (or touches parts of `ghc-internal` used + or re-exported by `base`) more substantially than just amending comments + or documentation, you likely need to raise a + [CLC proposal](https://github.com/haskell/core-libraries-committee#base-package) + before merging it. + * [ ] if your MR may break existing programs (e.g. causes the compiler to reject programs), please describe the expected breakage and add the ~"user-facing" label. This will run ghc/head.hackage> to characterise the effect of your change on Hackage. ===================================== rts/StgCRunAsm.S ===================================== @@ -497,6 +497,6 @@ StgReturn: #endif /* !USE_MINIINTERPRETER */ /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/NativeAmd64Asm.S ===================================== @@ -113,6 +113,6 @@ complex_ccall_ret_code: ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/NativeAmd64MingwAsm.S ===================================== @@ -135,6 +135,6 @@ complex_ccall_ret_code: ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/Nativei386Asm.S ===================================== @@ -52,6 +52,6 @@ DECLARE_CSYM(ccall_adjustor) ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/configure.ac ===================================== @@ -83,6 +83,10 @@ AS_IF([test x"${TargetHasSubsectionsViaSymbols}" = x"YES"], [AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1], [Define to 1 if Apple-style dead-stripping is supported.])]) +GHC_GNU_NONEXEC_STACK +AS_IF([test x"$TargetHasGnuNonexecStack" = x"YES"], + [AC_DEFINE([HAVE_GNU_NONEXEC_STACK], [1], [Define (to 1) if GNU-style non-executable stack note is supported])]) + dnl -------------------------------------------------- dnl * Platform header file and syscall feature tests dnl ### checking the state of the local header files and syscalls ### ===================================== testsuite/tests/ghci/linking/T25240/all.T ===================================== @@ -1,3 +1,3 @@ # skip on darwin because the leading underscores will make the test fail -test('T25240', [when(leading_underscore(),skip), req_rts_linker, extra_files(['T25240a.hs'])], +test('T25240', [when(leading_underscore(),skip), req_interp, extra_files(['T25240a.hs'])], makefile_test, ['T25240']) ===================================== testsuite/tests/ghci/linking/all.T ===================================== @@ -76,4 +76,4 @@ test('big-obj', [extra_files(['big-obj-c.c', 'big-obj.hs']), unless(doing_ghci, skip), unless(opsys('mingw32'), skip)], makefile_test, ['big-obj']) -test('T25155', [req_c, req_th, req_interp, extra_files(['T25155_iserv_main.c', 'T25155_iserv.hs', 'T25155_TH.hs'])], makefile_test, []) +test('T25155', [req_c, req_th, req_interp, req_rts_linker, extra_files(['T25155_iserv_main.c', 'T25155_iserv.hs', 'T25155_TH.hs'])], makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/60868f41249eb4ab744ceeab0c5a61d6cc79061c...9c5112c99ef0a16ca8340ecabda02f8dc9a8f4ee -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/60868f41249eb4ab744ceeab0c5a61d6cc79061c...9c5112c99ef0a16ca8340ecabda02f8dc9a8f4ee You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 15:51:58 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 10:51:58 -0500 Subject: [Git][ghc/ghc][wip/T25459] rts: Increase gen_workspace alignment to 128 bytes on AArch64 Message-ID: <67376e1ed627_1dbbef3ef9cc2852d@gitlab.mail> Ben Gamari pushed to branch wip/T25459 at Glasgow Haskell Compiler / GHC Commits: 6e07238e by Ben Gamari at 2024-11-15T10:51:15-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 6 changed files: - rts/Capability.h - rts/Task.h - rts/include/rts/Config.h - rts/include/rts/storage/HeapAlloc.h - rts/sm/GC.c - rts/sm/GCThread.h Changes: ===================================== rts/Capability.h ===================================== @@ -29,11 +29,7 @@ // We never want a Capability to overlap a cache line with // anything else, so round it up to a cache line size: -#if defined(s390x_HOST_ARCH) -#define CAPABILITY_ALIGNMENT 256 -#else -#define CAPABILITY_ALIGNMENT 64 -#endif +#define CAPABILITY_ALIGNMENT CACHELINE_SIZE /* A forward declaration of the per-capability data structures belonging to * the I/O manager. It is opaque and only passed by pointer, so the full ===================================== rts/Task.h ===================================== @@ -314,18 +314,12 @@ typedef StgWord64 TaskId; // #if defined(THREADED_RTS) INLINE_HEADER TaskId serialiseTaskId (OSThreadId taskID) { -#if defined(freebsd_HOST_OS) || defined(darwin_HOST_OS) - // Here OSThreadId is a pthread_t and pthread_t is a pointer, but within + // Here OSThreadId may be a pthread_t and pthread_t is a pointer, but within // the process we can still use that pointer value as a unique id. - return (TaskId) (size_t) taskID; -#else - // On Windows, Linux and others it's an integral type to start with. - return (TaskId) taskID; -#endif + return (TaskId) (uintptr_t) taskID; } #endif -// // Get a serialisable Id for the Task's OS thread // Needed mainly for logging since the OSThreadId is an opaque type INLINE_HEADER TaskId @@ -334,7 +328,7 @@ serialisableTaskId (Task *task) #if defined(THREADED_RTS) return serialiseTaskId(task->id); #else - return (TaskId) (size_t) task; + return (TaskId) (uintptr_t) task; #endif } ===================================== rts/include/rts/Config.h ===================================== @@ -82,3 +82,19 @@ code. #else #define MAX_N_CAPABILITIES 1 #endif + +// The host's cacheline size. +// We use 128-bytes here on AArch64 as this is the cache-line size of new Apple +// ARMv8 platforms. +// +// At some point we may want to determine this via `configure`. +#if defined(s390x_HOST_ARCH) +#define CACHELINE_SIZE 256 +#elif defined(aarch64_HOST_ARCH) +#define CACHELINE_SIZE 128 +#elif defined(x86_64_HOST_ARCH) +#define CACHELINE_SIZE 64 +#else +#define CACHELINE_SIZE 64 +#endif + ===================================== rts/include/rts/storage/HeapAlloc.h ===================================== @@ -59,7 +59,7 @@ extern SpinLock gc_alloc_block_sync; struct mblock_address_range { W_ begin, end; W_ padding[6]; // ensure nothing else inhabits this cache line -} ATTRIBUTE_ALIGNED(64); +} ATTRIBUTE_ALIGNED(CACHELINE_SIZE); extern struct mblock_address_range mblock_address_space; # define HEAP_ALLOCED(p) ((W_)(p) >= mblock_address_space.begin && \ ===================================== rts/sm/GC.c ===================================== @@ -153,9 +153,9 @@ static Condition gc_exit_arrived_cv; static Condition gc_exit_leave_now_cv; #else // THREADED_RTS -// Must be aligned to 64-bytes to meet stated 64-byte alignment of gen_workspace +// Must match the alignment of gen_workspace. StgWord8 the_gc_thread[sizeof(gc_thread) + 64 * sizeof(gen_workspace)] - ATTRIBUTE_ALIGNED(64); + ATTRIBUTE_ALIGNED(GEN_WORKSPACE_ALIGNMENT); #endif // THREADED_RTS /* Note [n_gc_threads] ===================================== rts/sm/GCThread.h ===================================== @@ -75,6 +75,14 @@ ------------------------------------------------------------------------- */ +// align so that: +// * no two threads' workspaces fall in the same cache-line +// * computing gct->gens[n] is a shift, not a multiply +// fails if the size is <64, which is why we need the pad above +// We use 128-bytes here as this is the cache-line size of new Apple ARMv8 +// platforms. +#define GEN_WORKSPACE_ALIGNMENT CACHELINE_SIZE + typedef struct gen_workspace_ { generation * gen; // the gen for this workspace struct gc_thread_ * my_gct; // the gc_thread that contains this workspace @@ -101,9 +109,7 @@ typedef struct gen_workspace_ { bdescr * part_list; StgWord n_part_blocks; // count of above StgWord n_part_words; -} gen_workspace ATTRIBUTE_ALIGNED(64); -// align so that computing gct->gens[n] is a shift, not a multiply -// fails if the size is <64, which is why we need the pad above +} gen_workspace ATTRIBUTE_ALIGNED(GEN_WORKSPACE_ALIGNMENT); /* ---------------------------------------------------------------------------- GC thread object View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6e07238e75fd702c68ea7139cc5389ffe27c72ae -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6e07238e75fd702c68ea7139cc5389ffe27c72ae You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 15:53:17 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 10:53:17 -0500 Subject: [Git][ghc/ghc][wip/T25459] rts: Increase gen_workspace alignment to 128 bytes on AArch64 Message-ID: <67376e6d8a1b9_1dbbef3e5c10291c8@gitlab.mail> Ben Gamari pushed to branch wip/T25459 at Glasgow Haskell Compiler / GHC Commits: 3da67f40 by Ben Gamari at 2024-11-15T10:53:09-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 5 changed files: - rts/Capability.h - rts/include/rts/Config.h - rts/include/rts/storage/HeapAlloc.h - rts/sm/GC.c - rts/sm/GCThread.h Changes: ===================================== rts/Capability.h ===================================== @@ -29,11 +29,7 @@ // We never want a Capability to overlap a cache line with // anything else, so round it up to a cache line size: -#if defined(s390x_HOST_ARCH) -#define CAPABILITY_ALIGNMENT 256 -#else -#define CAPABILITY_ALIGNMENT 64 -#endif +#define CAPABILITY_ALIGNMENT CACHELINE_SIZE /* A forward declaration of the per-capability data structures belonging to * the I/O manager. It is opaque and only passed by pointer, so the full ===================================== rts/include/rts/Config.h ===================================== @@ -82,3 +82,19 @@ code. #else #define MAX_N_CAPABILITIES 1 #endif + +// The host's cacheline size. +// We use 128-bytes here on AArch64 as this is the cache-line size of new Apple +// ARMv8 platforms. +// +// At some point we may want to determine this via `configure`. +#if defined(s390x_HOST_ARCH) +#define CACHELINE_SIZE 256 +#elif defined(aarch64_HOST_ARCH) +#define CACHELINE_SIZE 128 +#elif defined(x86_64_HOST_ARCH) +#define CACHELINE_SIZE 64 +#else +#define CACHELINE_SIZE 64 +#endif + ===================================== rts/include/rts/storage/HeapAlloc.h ===================================== @@ -59,7 +59,7 @@ extern SpinLock gc_alloc_block_sync; struct mblock_address_range { W_ begin, end; W_ padding[6]; // ensure nothing else inhabits this cache line -} ATTRIBUTE_ALIGNED(64); +} ATTRIBUTE_ALIGNED(CACHELINE_SIZE); extern struct mblock_address_range mblock_address_space; # define HEAP_ALLOCED(p) ((W_)(p) >= mblock_address_space.begin && \ ===================================== rts/sm/GC.c ===================================== @@ -153,9 +153,9 @@ static Condition gc_exit_arrived_cv; static Condition gc_exit_leave_now_cv; #else // THREADED_RTS -// Must be aligned to 64-bytes to meet stated 64-byte alignment of gen_workspace +// Must match the alignment of gen_workspace. StgWord8 the_gc_thread[sizeof(gc_thread) + 64 * sizeof(gen_workspace)] - ATTRIBUTE_ALIGNED(64); + ATTRIBUTE_ALIGNED(GEN_WORKSPACE_ALIGNMENT); #endif // THREADED_RTS /* Note [n_gc_threads] ===================================== rts/sm/GCThread.h ===================================== @@ -75,6 +75,14 @@ ------------------------------------------------------------------------- */ +// align so that: +// * no two threads' workspaces fall in the same cache-line +// * computing gct->gens[n] is a shift, not a multiply +// fails if the size is <64, which is why we need the pad above +// We use 128-bytes here as this is the cache-line size of new Apple ARMv8 +// platforms. +#define GEN_WORKSPACE_ALIGNMENT CACHELINE_SIZE + typedef struct gen_workspace_ { generation * gen; // the gen for this workspace struct gc_thread_ * my_gct; // the gc_thread that contains this workspace @@ -101,9 +109,7 @@ typedef struct gen_workspace_ { bdescr * part_list; StgWord n_part_blocks; // count of above StgWord n_part_words; -} gen_workspace ATTRIBUTE_ALIGNED(64); -// align so that computing gct->gens[n] is a shift, not a multiply -// fails if the size is <64, which is why we need the pad above +} gen_workspace ATTRIBUTE_ALIGNED(GEN_WORKSPACE_ALIGNMENT); /* ---------------------------------------------------------------------------- GC thread object View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3da67f403eef8e3316e3bbcb4fe5639436312301 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3da67f403eef8e3316e3bbcb4fe5639436312301 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 15:56:08 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 10:56:08 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/task-casts Message-ID: <67376f18f2de_1dbbef3e5c1029786@gitlab.mail> Ben Gamari pushed new branch wip/task-casts at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/task-casts You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 15:59:56 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 10:59:56 -0500 Subject: [Git][ghc/ghc][wip/T25477] rts: Fix EINTR check in timerfd ticker Message-ID: <67376ffc565_1dbbef1174e83473@gitlab.mail> Ben Gamari pushed to branch wip/T25477 at Glasgow Haskell Compiler / GHC Commits: a8bf3b75 by Ben Gamari at 2024-11-15T10:59:16-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - 1 changed file: - rts/posix/ticker/TimerFd.c Changes: ===================================== rts/posix/ticker/TimerFd.c ===================================== @@ -115,7 +115,7 @@ static void *itimer_thread_func(void *_handle_tick) // While the RTS attempts to mask signals, some foreign libraries // may rely on signal delivery may unmask them. Consequently we may // see EINTR. See #24610. - if (errno != -EINTR) { + if (errno != EINTR) { sysErrorBelch("Ticker: poll failed: %s", strerror(errno)); } } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a8bf3b75b362011885b9966cfa696798bea27950 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a8bf3b75b362011885b9966cfa696798bea27950 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 16:14:17 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 11:14:17 -0500 Subject: [Git][ghc/ghc][wip/T24127] 4 commits: users guide: Mention language extensions in equality constraints discussion Message-ID: <67377359c476e_1dbbef7fd21c523d0@gitlab.mail> Ben Gamari pushed to branch wip/T24127 at Glasgow Haskell Compiler / GHC Commits: 01faa387 by Ben Gamari at 2024-11-15T11:09:11-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - b0ccda11 by Ben Gamari at 2024-11-15T11:12:08-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - ca3cc13b by Ben Gamari at 2024-11-15T11:12:29-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - 4c67e3c3 by Ben Gamari at 2024-11-15T11:13:51-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 4 changed files: - docs/users_guide/9.14.1-notes.rst - docs/users_guide/debug-info.rst - docs/users_guide/exts/equality_constraints.rst - docs/users_guide/release-notes.rst Changes: ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -51,7 +51,7 @@ Cmm ~~~~~~~~~~~~~~~~~~~~ * The functions `getClosureInfoTbl_maybe`, `getClosureInfoTbl`, - `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow + `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow reading of the relevant Closure attributes without reliance on incomplete selectors. ===================================== docs/users_guide/debug-info.rst ===================================== @@ -395,18 +395,6 @@ to a source location. This lookup table is generated by using the ``-finfo-table :implies: :ghc-flag:`-finfo-table-map-with-stack` :implies: :ghc-flag:`-finfo-table-map-with-fallback` -.. ghc-flag:: -finfo-table-map-with-stack - :shortdesc: Include info tables for ``STACK`` closures in the info table - map. - :type: dynamic - :reverse: -fno-info-table-map-with-stack - :category: debugging - - :since: 9.10 - - Include info tables for ``STACK`` closures in the info table map. Note that - this flag is implied by :ghc-flag:`-finfo-table-map`. - .. ghc-flag:: -fno-info-table-map-with-stack :shortdesc: Omit info tables for ``STACK`` closures from the info table map. @@ -423,6 +411,9 @@ to a source location. This lookup table is generated by using the ``-finfo-table ``STACK`` info tables from the info table map and decrease the size of executables with info table profiling information. + Note that :ghc-flag:`-finfo-table-map-with-stack` is implied by + :ghc-flag:`-finfo-table-map`. + .. ghc-flag:: -finfo-table-map-with-fallback :shortdesc: Include info tables with no source location information in the info table map. ===================================== docs/users_guide/exts/equality_constraints.rst ===================================== @@ -6,11 +6,11 @@ Equality constraints and Coercible constraint Equality constraints -------------------- -A type context can include equality constraints of the form ``t1 ~ t2``, -which denote that the types ``t1`` and ``t2`` need to be the same. In -the presence of type families, whether two types are equal cannot -generally be decided locally. Hence, the contexts of function signatures -may include equality constraints, as in the following example: :: +When :extension:`TypeOperators` are enabled, a type context can include equality +constraints of the form ``t1 ~ t2``, which denote that the types ``t1`` and +``t2`` need to be the same. In the presence of type families, whether two types +are equal cannot generally be decided locally. Hence, the contexts of function +signatures may include equality constraints, as in the following example: :: sumCollects :: (Collects c1, Collects c2, Elem c1 ~ Elem c2) => c1 -> c2 -> c2 ===================================== docs/users_guide/release-notes.rst ===================================== @@ -4,4 +4,4 @@ Release notes .. toctree:: :maxdepth: 1 - 9.12.1-notes + 9.14.1-notes View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9b3327927cb12ca5b04f1aa4b2e54ab839bdae62...4c67e3c324a05f85ff74776a4028bf79878cb42a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9b3327927cb12ca5b04f1aa4b2e54ab839bdae62...4c67e3c324a05f85ff74776a4028bf79878cb42a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 16:15:45 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 11:15:45 -0500 Subject: [Git][ghc/ghc][wip/T24382] hadrian: Bump directory bound to >=1.3.9 Message-ID: <673773b13082b_1dbbef88d5ec53399@gitlab.mail> Ben Gamari pushed to branch wip/T24382 at Glasgow Haskell Compiler / GHC Commits: 5ab2a01d by Ben Gamari at 2024-11-15T11:15:37-05:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Fixes #24382. - - - - - 4 changed files: - .gitlab/ci.sh - hadrian/cabal.project - hadrian/hadrian.cabal - hadrian/stack.yaml Changes: ===================================== .gitlab/ci.sh ===================================== @@ -7,7 +7,8 @@ set -Eeuo pipefail # Configuration: -HACKAGE_INDEX_STATE="2024-09-17T22:56:00Z" +# N.B. You may want to also update the index-state in hadrian/cabal.project. +HACKAGE_INDEX_STATE="2024-10-30T22:56:00Z" MIN_HAPPY_VERSION="1.20" MIN_ALEX_VERSION="3.2.6" ===================================== hadrian/cabal.project ===================================== @@ -3,8 +3,8 @@ packages: ./ ../libraries/ghc-platform/ -- This essentially freezes the build plan for hadrian --- It would be wise to keep this up to date with the state set in ci.sh -index-state: 2024-09-17T22:56:00Z +-- It would be wise to keep this up to date with the state set in .gitlab/ci.sh. +index-state: 2024-10-30T22:56:00Z -- unordered-containers-0.2.20-r1 requires template-haskell < 2.22 -- ghc-9.10 has template-haskell-2.22.0.0 ===================================== hadrian/hadrian.cabal ===================================== @@ -157,7 +157,9 @@ executable hadrian , base >= 4.11 && < 5 , bytestring >= 0.10 && < 0.13 , containers >= 0.5 && < 0.8 - , directory >= 1.3.1.0 && < 1.4 + -- N.B. directory >=1.3.9 as earlier versions are + -- afflicted by #24382. + , directory >= 1.3.9.0 && < 1.4 , extra >= 1.4.7 , filepath , time ===================================== hadrian/stack.yaml ===================================== @@ -21,3 +21,10 @@ nix: extra-deps: - Cabal-3.14.0.0 - Cabal-syntax-3.14.0.0 + +# needed due to Hadrian's lower bound on directory +- directory-1.3.9.0 +- file-io-0.1.4 +- filepath-1.4.300.2 +- process-1.6.25.0 +- unix-2.8.5.1 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5ab2a01dcdfd56832aa0c2b60325e1740c02c0e1 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5ab2a01dcdfd56832aa0c2b60325e1740c02c0e1 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 16:19:21 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Fri, 15 Nov 2024 11:19:21 -0500 Subject: [Git][ghc/ghc][wip/splice-imports-2024] 3 commits: updates Message-ID: <67377489394d_1dbbef7fcf745387e@gitlab.mail> Matthew Pickering pushed to branch wip/splice-imports-2024 at Glasgow Haskell Compiler / GHC Commits: a1911613 by Matthew Pickering at 2024-11-12T12:19:54+00:00 updates - - - - - d568b6f2 by Matthew Pickering at 2024-11-13T09:11:30+00:00 Resolve confusion about level vs stage - - - - - eaf0f1b0 by Matthew Pickering at 2024-11-15T16:18:43+00:00 nubORd - - - - - 24 changed files: - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Env.hs - compiler/GHC/Driver/Errors/Ppr.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Parser.y - compiler/GHC/Rename/Expr.hs - compiler/GHC/Rename/Expr.hs-boot - compiler/GHC/Rename/Splice.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Utils/Env.hs - compiler/GHC/Unit/Module/Graph.hs - ghc/GHCi/UI.hs - + testsuite/tests/splice-imports/SI22.stderr - + testsuite/tests/splice-imports/SI23.hs - + testsuite/tests/splice-imports/SI23A.hs - + testsuite/tests/splice-imports/SI24.hs - testsuite/tests/splice-imports/all.T - utils/haddock/haddock-api/src/Haddock/Interface.hs Changes: ===================================== compiler/GHC/Driver/Backpack.hs ===================================== @@ -589,6 +589,7 @@ mkBackpackMsg = do MustCompile -> empty RecompBecause reason -> text " [" <> pprWithUnitState state (ppr reason) <> text "]" LinkNode _ _ -> showMsg (text "Linking ") empty + UnitNode _ _ uid -> showMsg (text "Existing dependency" <+> ppr uid) empty -- | 'PprStyle' for Backpack messages; here we usually want the module to -- be qualified (so we can tell how it was instantiated.) But we try not @@ -742,7 +743,7 @@ hsunitModuleGraph do_link unit = do -- requirement. let hsig_set = Set.fromList [ ms_mod_name ms - | ModuleNode _ _ _ ms <- nodes + | ModuleNode _ _ ms <- nodes , ms_hsc_src ms == HsigFile ] req_nodes <- fmap catMaybes . forM (homeUnitInstantiations home_unit) $ \(mod_name, _) -> @@ -816,8 +817,8 @@ summariseRequirement pn mod_name = do ms_hspp_opts = dflags, ms_hspp_buf = Nothing } - let nodes = [NodeKey_Module (ModNodeKeyWithUid (GWIB mn NotBoot) todoStage (homeUnitId home_unit)) | mn <- extra_sig_imports ] - return (ModuleNode nodes [] todoStage ms) + let nodes = [(NormalStage, NodeKey_Module (ModNodeKeyWithUid (GWIB mn NotBoot) todoStage (homeUnitId home_unit))) | mn <- extra_sig_imports ] + return (ModuleNode nodes todoStage ms) summariseDecl :: PackageName -> HscSource @@ -935,7 +936,7 @@ hsModuleToModSummary home_keys pn hsc_src modname [k | (_, _, mnwib) <- msDeps ms, let k = NodeKey_Module (ModNodeKeyWithUid (fmap unLoc mnwib) todoStage (moduleUnitId this_mod)), k `elem` home_keys] - return (ModuleNode (mod_nodes ++ inst_nodes) [] todoStage ms) + return (ModuleNode (map (NormalStage,) (mod_nodes ++ inst_nodes)) todoStage ms) -- | Create a new, externally provided hashed unit id from -- a hash. ===================================== compiler/GHC/Driver/Env.hs ===================================== @@ -81,7 +81,6 @@ import GHC.Utils.Panic import GHC.Utils.Misc import GHC.Utils.Logger -import GHC.Tc.Types.TH import Data.List @@ -236,18 +235,17 @@ hptAllInstances hsc_env in (foldl' unionInstEnv emptyInstEnv insts, concat famInsts) -- | Find instances visible from the given set of imports -hptInstancesBelow :: HscEnv -> UnitId -> ModuleStage -> ModuleNameWithIsBoot -> (NameEnv (Set.Set ThLevel), InstEnv, [FamInst]) +hptInstancesBelow :: HscEnv -> UnitId -> ModuleStage -> ModuleNameWithIsBoot -> (InstEnv, [FamInst]) hptInstancesBelow hsc_env uid lvl mnwib = let - mk_bind_env clvl ie = mkNameEnv $ flip zip (repeat (Set.singleton (moduleStageToThLevel clvl))) $ map is_dfun_name (instEnvElts ie) mn = gwib_mod mnwib - (bind_env, insts, famInsts) = - unzip3 $ hptSomeThingsBelowUs (\mlvl mod_info -> + (insts, famInsts) = + unzip $ hptSomeThingsBelowUs (\_mlvl mod_info -> let details = hm_details mod_info -- Don't include instances for the current module in if moduleName (mi_module (hm_iface mod_info)) == mn then [] - else [(mk_bind_env mlvl (md_insts details), md_insts details, md_fam_insts details)]) + else [(md_insts details, md_fam_insts details)]) True -- Include -hi-boot hsc_env uid @@ -255,7 +253,7 @@ hptInstancesBelow hsc_env uid lvl mnwib = mnwib -- Horrible horrible hack = mkInstEnv (nubBy (\c1 c2 -> instanceDFunId c1 == instanceDFunId c2) (concatMap instEnvElts insts)) - in ((foldl' (plusNameEnv_C Set.union) emptyNameEnv bind_env), hack, concat famInsts) + in (hack, concat famInsts) -- | Get rules from modules "below" this one (in the dependency sense) hptRules :: HscEnv -> UnitId -> ModuleStage -> ModuleNameWithIsBoot -> [CoreRule] ===================================== compiler/GHC/Driver/Errors/Ppr.hs ===================================== @@ -258,10 +258,11 @@ instance Diagnostic DriverMessage where go (m:ms) = (text "which imports" <+> ppr_node m) : go ms ppr_node :: ModuleGraphNode -> SDoc - ppr_node (ModuleNode _deps _uids lvl m) + ppr_node (ModuleNode _deps lvl m) = text "module" <+> ppr_ms m <+> if lvl == zeroStage then empty else (text "@" <> ppr lvl) ppr_node (InstantiationNode _uid u) = text "instantiated unit" <+> ppr u ppr_node (LinkNode uid _) = pprPanic "LinkNode should not be in a cycle" (ppr uid) + ppr_node (UnitNode _ _ uid) = pprPanic "UnitNode not in cycle" (ppr uid) ppr_ms :: ModSummary -> SDoc ppr_ms ms = quotes (ppr (moduleName (ms_mod ms))) <+> ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -831,7 +831,7 @@ hscRecompStatus = do let msg what = case mHscMessage of - Just hscMessage -> hscMessage hsc_env mod_index what (ModuleNode [] [] lvl mod_summary) + Just hscMessage -> hscMessage hsc_env mod_index what (ModuleNode [] lvl mod_summary) Nothing -> return () -- First check to see if the interface file agrees with the @@ -1469,6 +1469,7 @@ batchMsgWith extra hsc_env_start mod_index recomp node = LinkNode {} -> "Linking" InstantiationNode {} -> "Instantiating" ModuleNode {} -> "Compiling" + UnitNode {} -> "Using" hsc_env = hscSetActiveUnitId (moduleGraphNodeUnitId node) hsc_env_start dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -611,12 +611,11 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) + (trans_deps_map, lookup_node) = mgTransDeps mod_graph -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + map (expectJust "toNode" . lookup_node) $ Set.toList $ -- Don't include the boot module itself Set.delete (NodeKey_Module (key IsBoot)) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are @@ -631,13 +630,13 @@ createBuildPlan mod_graph maybe_top_mod = -- An environment mapping a module to its hs-boot file and all nodes on the path between the two, if one exists boot_modules = mkModuleEnv - [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) | m@(ModuleNode _ _ _lvl ms) <- (mgModSummaries' mod_graph), isBootSummary ms == IsBoot] + [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) | m@(ModuleNode _ _lvl ms) <- (mgModSummaries' mod_graph), isBootSummary ms == IsBoot] select_boot_modules :: [ModuleGraphNode] -> [ModuleGraphNode] select_boot_modules = mapMaybe (fmap fst . get_boot_module) get_boot_module :: ModuleGraphNode -> Maybe (ModuleGraphNode, [ModuleGraphNode]) - get_boot_module m = case m of ModuleNode _ _ _lvl ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing + get_boot_module m = case m of ModuleNode _ _lvl ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing -- Any cycles should be resolved now collapseSCC :: [SCC ModuleGraphNode] -> Either [ModuleGraphNode] [(Either ModuleGraphNode ModuleGraphNodeWithBootFile)] @@ -1153,7 +1152,7 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do (hug, deps) <- wait_deps_hug hug_var build_deps executeInstantiationNode mod_idx n_mods hug uid iu return (Nothing, deps) - ModuleNode _build_deps _uids lvl ms -> + ModuleNode _build_deps lvl ms -> let !old_hmi = M.lookup (msKey lvl ms) old_hpt rehydrate_mods = mapMaybe nodeKeyModName <$> rehydrate_nodes in withCurrentUnit (moduleGraphNodeUnitId mod) $ do @@ -1171,6 +1170,9 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do (hug, deps) <- wait_deps_hug hug_var build_deps executeLinkNode hug (mod_idx, n_mods) uid direct_deps return (Nothing, deps) + UnitNode {} -> + -- TODO: Perhaps can prelink in these units here + return (Nothing, M.empty) res_var <- liftIO newEmptyMVar @@ -1478,14 +1480,14 @@ topSortModuleGraph topSortModuleGraph drop_hs_boot_nodes module_graph mb_root_mod = -- stronglyConnCompG flips the original order, so if we reverse -- the summaries we get a stable topological sort. - topSortModules drop_hs_boot_nodes (reverse $ collapseModuleGraphNodes $ mgModSummaries' module_graph) mb_root_mod + topSortModules drop_hs_boot_nodes (reverse $ mgModSummaries' module_graph) mb_root_mod topSortModules :: Bool -> [ModuleGraphNode] -> Maybe HomeUnitModule -> [SCC ModuleGraphNode] topSortModules drop_hs_boot_nodes summaries mb_root_mod = map (fmap summaryNodeSummary) $ stronglyConnCompG initial_graph where (graph, lookup_node) = - moduleGraphNodes drop_hs_boot_nodes summaries + moduleGraphNodes drop_hs_boot_nodes CollapseToZero summaries initial_graph = case mb_root_mod of Nothing -> graph @@ -1617,7 +1619,7 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro -- for dependencies of modules that have -XTemplateHaskell, -- otherwise those modules will fail to compile. -- See Note [-fno-code mode] #8025 - th_enabled_nodes <- enableCodeGenForTH logger tmpfs unit_env (hsc_units hsc_env) all_nodes + th_enabled_nodes <- enableCodeGenForTH logger tmpfs unit_env all_nodes if null all_root_errs then return (all_errs, th_enabled_nodes) else pure $ (all_root_errs, []) @@ -1633,11 +1635,9 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro -- Add a dependency on the HsBoot file if it exists -- This gets passed to the loopImports function which just ignores it if it -- can't be found. - [(ms_unitid ms, lvl, NoPkgQual, GWIB (noLoc $ ms_mod_name ms) IsBoot) | NotBoot <- [isBootSummary ms] ] ++ - [(ms_unitid ms, offsetStage lvl st, b, c) | (st, b, c) <- msDeps ms ] + [(ms_unitid ms, NormalStage, lvl, NoPkgQual, GWIB (noLoc $ ms_mod_name ms) IsBoot) | NotBoot <- [isBootSummary ms] ] ++ + [(ms_unitid ms, st, offsetStage lvl st, b, c) | (st, b, c) <- msDeps ms ] - -- Hacky.. - offsetStage lvl _ | lvl >= ModuleStage 10 || lvl <= ModuleStage (-10) = lvl offsetStage lvl NormalStage = lvl offsetStage lvl QuoteStage = incModuleStage lvl offsetStage lvl SpliceStage = decModuleStage lvl @@ -1670,10 +1670,10 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro = loopSummaries next (done, summarised) -- Didn't work out what the imports mean yet, now do that. | otherwise = do - (final_deps, uids, done', summarised') <- loopImports (calcDeps lvl ms) done summarised + (final_deps, done', summarised') <- loopImports (calcDeps lvl ms) done summarised -- This has the effect of finding a .hs file if we are looking at the .hs-boot file. - (_, _, done'', summarised'') <- loopImports (maybeToList hs_file_for_boot) done' summarised' - loopSummaries (maybeToList zero ++ next) (M.insert k (ModuleNode final_deps (ordNub uids) lvl ms) done'', summarised'') + (_, done'', summarised'') <- loopImports (maybeToList hs_file_for_boot) done' summarised' + loopSummaries (maybeToList zero ++ next) (M.insert k (ModuleNode final_deps lvl ms) done'', summarised'') where k = NodeKey_Module (msKey lvl ms) @@ -1683,31 +1683,31 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro hs_file_for_boot | HsBootFile <- ms_hsc_src ms - = Just $ ((ms_unitid ms), lvl, NoPkgQual, (GWIB (noLoc $ ms_mod_name ms) NotBoot)) + = Just $ ((ms_unitid ms), NormalStage, lvl, NoPkgQual, (GWIB (noLoc $ ms_mod_name ms) NotBoot)) | otherwise = Nothing -- This loops over each import in each summary. It is mutually recursive with loopSummaries if we discover -- a new module by doing this. - loopImports :: [(UnitId, ModuleStage, PkgQual, GenWithIsBoot (Located ModuleName))] + loopImports :: [(UnitId, ImportStage, ModuleStage, PkgQual, GenWithIsBoot (Located ModuleName))] -- Work list: process these modules -> M.Map NodeKey ModuleGraphNode -> DownsweepCache -- Visited set; the range is a list because -- the roots can have the same module names -- if allow_dup_roots is True - -> IO ([NodeKey], [(ModuleStage, UnitId)], + -> IO ([(ImportStage, NodeKey)], M.Map NodeKey ModuleGraphNode, DownsweepCache) -- The result is the completed NodeMap - loopImports [] done summarised = return ([], [], done, summarised) - loopImports ((home_uid, lvl, mb_pkg, gwib) : ss) done summarised + loopImports [] done summarised = return ([], done, summarised) + loopImports ((home_uid, imp, lvl, mb_pkg, gwib) : ss) done summarised | Just summs <- M.lookup cache_key summarised = case summs of [Right ms] -> do - let nk = NodeKey_Module (msKey lvl ms) - (rest, uids, summarised', done') <- loopImports ss done summarised - return (nk: rest, uids, summarised', done') + let nk = (imp, NodeKey_Module (msKey lvl ms)) + (rest, summarised', done') <- loopImports ss done summarised + return (nk: rest, summarised', done') [Left _err] -> loopImports ss done summarised _errs -> do @@ -1720,25 +1720,36 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro case mb_s of NotThere -> loopImports ss done summarised External uid -> do - (other_deps, uids, done', summarised') <- loopImports ss done summarised - return (other_deps, (lvl, uid):uids, done', summarised') + let done' = loopUnit done [(lvl, uid)] + (other_deps, done'', summarised') <- loopImports ss done' summarised + return ((imp, NodeKey_ExternalUnit lvl uid) : other_deps, done'', summarised') FoundInstantiation iud -> do - (other_deps, uids, done', summarised') <- loopImports ss done summarised - return (NodeKey_Unit iud : other_deps, uids, done', summarised') + (other_deps, done', summarised') <- loopImports ss done summarised + return ((imp, NodeKey_Unit iud) : other_deps, done', summarised') FoundHomeWithError (_uid, e) -> loopImports ss done (Map.insert cache_key [(Left e)] summarised) FoundHome s -> do (done', summarised') <- loopSummaries [(lvl, s)] (done, Map.insert cache_key [Right s] summarised) - (other_deps, uids, final_done, final_summarised) <- loopImports ss done' summarised' + (other_deps, final_done, final_summarised) <- loopImports ss done' summarised' -- MP: This assumes that we can only instantiate non home units, which is probably fair enough for now. - return (NodeKey_Module (msKey lvl s) : other_deps, uids, final_done, final_summarised) + return ((imp, NodeKey_Module (msKey lvl s)) : other_deps, final_done, final_summarised) where cache_key = (home_uid, lvl, mb_pkg, unLoc <$> gwib) home_unit = ue_unitHomeUnit home_uid (hsc_unit_env hsc_env) GWIB { gwib_mod = L loc mod, gwib_isBoot = is_boot } = gwib wanted_mod = L loc mod + loopUnit :: Map.Map NodeKey ModuleGraphNode -> [(ModuleStage, UnitId)] -> Map.Map NodeKey ModuleGraphNode + loopUnit cache [] = cache + loopUnit cache ((lvl, u):uxs) = do + let nk = (NodeKey_ExternalUnit lvl u) + case Map.lookup nk cache of + Just {} -> loopUnit cache uxs + Nothing -> case unitDepends <$> lookupUnitId (hsc_units hsc_env) u of + Just us -> loopUnit (loopUnit (Map.insert nk (UnitNode us lvl u) cache) (zip (repeat lvl) us)) uxs + Nothing -> panic "bad" + getRootSummary :: [ModuleName] -> M.Map (UnitId, FilePath) ModSummary -> @@ -1884,11 +1895,10 @@ enableCodeGenForTH :: Logger -> TmpFs -> UnitEnv - -> UnitState -> [ModuleGraphNode] -> IO [ModuleGraphNode] -enableCodeGenForTH logger tmpfs unit_env unit_state = - enableCodeGenWhen logger tmpfs TFL_CurrentModule TFL_GhcSession unit_env unit_state +enableCodeGenForTH logger tmpfs unit_env = + enableCodeGenWhen logger tmpfs TFL_CurrentModule TFL_GhcSession unit_env data CodeGenEnable = EnableByteCode | EnableObject | EnableByteCodeAndObject deriving (Eq, Show, Ord) @@ -1908,15 +1918,14 @@ enableCodeGenWhen -> TempFileLifetime -> TempFileLifetime -> UnitEnv - -> UnitState -> [ModuleGraphNode] -> IO [ModuleGraphNode] -enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph = +enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = mapM enable_code_gen mod_graph where defaultBackendOf ms = platformDefaultBackend (targetPlatform $ ue_unitFlags (ms_unitid ms) unit_env) enable_code_gen :: ModuleGraphNode -> IO ModuleGraphNode - enable_code_gen n@(ModuleNode deps uids lvl ms) + enable_code_gen n@(ModuleNode deps lvl ms) | ModSummary { ms_location = ms_location , ms_hsc_src = HsSrcFile @@ -1954,7 +1963,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph , ms_hspp_opts = updOptLevel 0 $ new_dflags } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps uids lvl ms') + enable_code_gen (ModuleNode deps lvl ms') -- If -fprefer-byte-code then satisfy dependency by enabling bytecode (if normal object not enough) -- we only get to this case if the default backend is already generating object files, but we need dynamic @@ -1964,19 +1973,19 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ByteCodeAndObjectCode } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps uids lvl ms') + enable_code_gen (ModuleNode deps lvl ms') | dynamic_too_enable enable_spec ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_BuildDynamicToo } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps uids lvl ms') + enable_code_gen (ModuleNode deps lvl ms') | ext_interp_enable ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ExternalInterpreter } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps uids lvl ms') + enable_code_gen (ModuleNode deps lvl ms') | otherwise -> return n @@ -2031,7 +2040,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph lcl_dflags = ms_hspp_opts ms internalInterpreter = not (gopt Opt_ExternalInterpreter lcl_dflags) - (mg, lookup_node) = moduleGraphNodesZero unit_state mod_graph + (mg, lookup_node) = moduleGraphNodesZero mod_graph mk_needed_set roots = Set.fromList $ map fst $ lefts $ map node_payload $ reachablesG2 mg (map (expectJust "needs_th" . lookup_node) (map Left roots)) @@ -2057,7 +2066,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph -- Note we don't need object code for a module if it uses TemplateHaskell itself. Only -- it's dependencies. [ (msKey lvl ms, code_stage ms) - | (ModuleNode _deps _uids lvl ms) <- mod_graph + | (ModuleNode _deps lvl ms) <- mod_graph , isTemplateHaskellOrQQNonBoot ms , not (gopt Opt_UseBytecodeRatherThanObjects (ms_hspp_opts ms)) ] @@ -2065,7 +2074,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env unit_state mod_graph -- The direct dependencies of modules which require byte code need_bc_set = [ (msKey lvl ms, code_stage ms) - | (ModuleNode _deps _uids lvl ms) <- mod_graph + | (ModuleNode _deps lvl ms) <- mod_graph , isTemplateHaskellOrQQNonBoot ms , gopt Opt_UseBytecodeRatherThanObjects (ms_hspp_opts ms) ] ===================================== compiler/GHC/Driver/MakeFile.hs ===================================== @@ -221,8 +221,9 @@ processDeps _ _ _ _ _ (AcyclicSCC (InstantiationNode _uid node)) GhcDriverMessage $ DriverInstantiationNodeInDependencyGeneration node processDeps _dflags _ _ _ _ (AcyclicSCC (LinkNode {})) = return () +processDeps _ _ _ _ _ (AcyclicSCC (UnitNode {})) = return () -processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC (ModuleNode _ _ _ node)) +processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC (ModuleNode _ _ node)) = do { let extra_suffixes = depSuffixes dflags include_pkg_deps = depIncludePkgDeps dflags src_file = msHsFilePath node @@ -404,10 +405,10 @@ pprCycle :: [ModuleGraphNode] -> SDoc pprCycle summaries = pp_group (CyclicSCC summaries) where cycle_mods :: [ModuleName] -- The modules in this cycle - cycle_mods = map (moduleName . ms_mod) [ms | ModuleNode _ _ _ ms <- summaries] + cycle_mods = map (moduleName . ms_mod) [ms | ModuleNode _ _ ms <- summaries] pp_group :: SCC ModuleGraphNode -> SDoc - pp_group (AcyclicSCC (ModuleNode _ _ _ ms)) = pp_ms ms + pp_group (AcyclicSCC (ModuleNode _ _ ms)) = pp_ms ms pp_group (AcyclicSCC _) = empty pp_group (CyclicSCC mss) = assert (not (null boot_only)) $ @@ -417,12 +418,12 @@ pprCycle summaries = pp_group (CyclicSCC summaries) pp_ms loop_breaker $$ vcat (map pp_group groups) where (boot_only, others) = partition is_boot_only mss - is_boot_only (ModuleNode _ _ _ ms) = not (any in_group (map (\(_, _, m) -> m) (ms_imps ms))) + is_boot_only (ModuleNode _ _ ms) = not (any in_group (map (\(_, _, m) -> m) (ms_imps ms))) is_boot_only _ = False in_group (L _ m) = m `elem` group_mods - group_mods = map (moduleName . ms_mod) [ms | ModuleNode _ _ _ ms <- mss] + group_mods = map (moduleName . ms_mod) [ms | ModuleNode _ _ ms <- mss] - loop_breaker = head ([ms | ModuleNode _ _ _ ms <- boot_only]) + loop_breaker = head ([ms | ModuleNode _ _ ms <- boot_only]) all_others = tail boot_only ++ others groups = GHC.topSortModuleGraph True (mkModuleGraph all_others) Nothing ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -165,7 +165,7 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of + case M.lookup (NodeKey_Module nk) (fst $ mgTransDeps mod_graph) of Just trans_deps -> let deps = Set.insert (NodeKey_Module nk) trans_deps -- See #936 and the ghci.prog007 test for why we have to continue traversing through ===================================== compiler/GHC/Linker/Loader.hs ===================================== @@ -111,7 +111,6 @@ import System.Win32.Info (getSystemDirectory) #endif import GHC.Utils.Exception -import GHC.Unit.Module.Graph -- Note [Linkers and loaders] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -644,7 +643,7 @@ initLinkDepsOpts hsc_env = opts -- MP: This is very inefficient as it destroys sharing of -- calculating transitive dependencies. it would be better if we -- were explicit about requesting modules at a specific stage. - , ldModuleGraph = collapseModuleGraph $ hsc_mod_graph hsc_env + , ldModuleGraph = hsc_mod_graph hsc_env , ldUnitEnv = hsc_unit_env hsc_env , ldPprOpts = initSDocContext dflags defaultUserStyle , ldFinderCache = hsc_FC hsc_env ===================================== compiler/GHC/Parser.y ===================================== @@ -4045,6 +4045,9 @@ special_id | 'unit' { sL1 $1 (fsLit "unit") } | 'dependency' { sL1 $1 (fsLit "dependency") } | 'signature' { sL1 $1 (fsLit "signature") } + | 'quote' { sL1 $1 (fsLit "quote") } + | 'splice' { sL1 $1 (fsLit "splice") } + special_sym :: { Located FastString } special_sym : '.' { sL1 $1 (fsLit ".") } ===================================== compiler/GHC/Rename/Expr.hs ===================================== @@ -304,16 +304,7 @@ rnExprs ls = rnExprs' ls emptyUniqSet rnLExpr :: LHsExpr GhcPs -> RnM (LHsExpr GhcRn, FreeVars) rnLExpr = wrapLocFstMA rnExpr -rnExpr :: HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) - -finishHsVar :: LocatedA Name -> RnM (HsExpr GhcRn, FreeVars) --- Separated from rnExpr because it's also used --- when renaming infix expressions -finishHsVar (L l name) - = do { --this_mod <- getModule --- ; when (nameIsLocalOrFrom this_mod name) $ - ; checkThLocalName name - ; return (HsVar noExtField (L (l2l l) name), unitFV name) } +rnExpr :: HasCallStack=>HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) rnUnboundVar :: RdrName -> RnM (HsExpr GhcRn, FreeVars) rnUnboundVar v = do @@ -336,9 +327,7 @@ rnExpr (HsVar _ (L l v)) -- matching GRE and add a name clash error -- (see lookupGlobalOccRn_overloaded, called by lookupExprOccRn). -> do { let sel_name = flSelector $ recFieldLabel fld_info - ; this_mod <- getModule - ; when (nameIsLocalOrFrom this_mod sel_name) $ - checkThLocalName sel_name + ; unless (isExact v || isOrig v) $ checkThLocalName sel_name ; return (XExpr (HsRecSelRn (FieldOcc v (L l sel_name))), unitFV sel_name) } | nm == nilDataConName @@ -349,9 +338,13 @@ rnExpr (HsVar _ (L l v)) -> rnExpr (ExplicitList noAnn []) | otherwise - -> finishHsVar (L (l2l l) nm) + -> do { --pprTraceM "name" (ppr v $$ ppr (isOrig v) $$ ppr (isExact v)) + ; unless (isExact v || isOrig v) (checkThLocalName nm) + ; return (HsVar noExtField (L (l2l l) nm), unitFV nm) } + }}} + rnExpr (HsIPVar x v) = return (HsIPVar x v, emptyFVs) ===================================== compiler/GHC/Rename/Expr.hs-boot ===================================== @@ -6,8 +6,9 @@ import GHC.Hs import GHC.Types.Name.Set ( FreeVars ) import GHC.Tc.Types import GHC.Utils.Outputable ( Outputable ) +import GHC.Stack -rnExpr :: HsExpr GhcPs +rnExpr :: HasCallStack => HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) rnLExpr :: LHsExpr GhcPs ===================================== compiler/GHC/Rename/Splice.hs ===================================== @@ -71,6 +71,7 @@ import qualified GHC.Internal.TH.Syntax as TH (Q) import qualified GHC.LanguageExtensions as LangExt import qualified Data.Set as Set +import GHC.Stack {- ************************************************************************ @@ -525,7 +526,7 @@ rnUntypedSpliceExpr splice -- mod_finalizers: See Note [Delaying modFinalizers in untyped splices]. -- Rename the expanded expression - ; (L l expr_rn, fvs) <- setXOptM LangExt.PathCrossStagedPersistence $ checkNoErrs (rnLExpr expr_ps) + ; (L l expr_rn, fvs) <- checkNoErrs (rnLExpr expr_ps) -- rn_splice :: HsUntypedSplice GhcRn is the original TH expression, -- before expansion @@ -911,7 +912,7 @@ data SpliceInfo -- Note that 'spliceSource' is *renamed* but not *typechecked* -- Reason (a) less typechecking crap -- (b) data constructors after type checking have been - -- changed to their *wrappers*, and that makes them + -- changed to their *wrapp----------------ers*, and that makes them -- print always fully qualified -- | outputs splice information for 2 flags which have different output formats: @@ -973,8 +974,9 @@ checkThLocalTyName name ; dflags <- getDynFlags ; checkCrossStageLiftingTy dflags top_lvl bind_lvl use_stage use_lvl name } } } -checkThLocalName :: Name -> RnM () +checkThLocalName :: HasCallStack => Name -> RnM () checkThLocalName name +-- | pprTrace "checkTh" (ppr name $$ callStackDoc) False = undefined | isUnboundName name -- Do not report two errors for = return () -- $(not_in_scope args) @@ -1032,7 +1034,7 @@ checkCrossStageLifting dflags reason top_lvl is_local bind_lvl use_stage use_lvl , xopt LangExt.PathCrossStagedPersistence dflags = return () | not is_local , xopt LangExt.PathCrossStagedPersistence dflags = return () - | otherwise = failWithTc (TcRnBadlyStaged reason bind_lvl use_lvl) + | otherwise = addErrTc (TcRnBadlyStaged reason bind_lvl use_lvl) check_cross_stage_lifting :: TcRnMessage -> DynFlags -> TopLevelFlag -> Name -> TcRef [PendingRnSplice] -> TcM () check_cross_stage_lifting reason dflags top_lvl name ps_var ===================================== compiler/GHC/Runtime/Eval.hs ===================================== @@ -1276,7 +1276,7 @@ showModule mod_summary = case lookupHug (hsc_HUG hsc_env) (ms_unitid mod_summary) (ms_mod_name mod_summary) of Nothing -> panic "missing linkable" Just mod_info -> isJust (homeModInfoByteCode mod_info) && isNothing (homeModInfoObject mod_info) - return (showSDoc dflags $ showModMsg dflags interpreted (ModuleNode [] [] todoStage mod_summary)) + return (showSDoc dflags $ showModMsg dflags interpreted (ModuleNode [] todoStage mod_summary)) moduleIsBootOrNotObjectLinkable :: GhcMonad m => ModSummary -> m Bool moduleIsBootOrNotObjectLinkable mod_summary = withSession $ \hsc_env -> ===================================== compiler/GHC/Tc/Module.hs ===================================== @@ -462,7 +462,7 @@ tcRnImports hsc_env import_decls -- modules batch (@--make@) compiled before this one, but -- which are not below this one. - ; (home_inst_bind_env, home_insts, home_fam_insts) = + ; (home_insts, home_fam_insts) = hptInstancesBelow hsc_env unitId zeroStage mnwib @@ -481,7 +481,7 @@ tcRnImports hsc_env import_decls ; updGblEnv ( \ gbl -> gbl { tcg_rdr_env = tcg_rdr_env gbl `plusGlobalRdrEnv` rdr_env, - tcg_bind_env = tcg_bind_env gbl `plusNameEnv` home_inst_bind_env, + tcg_bind_env = tcg_bind_env gbl, tcg_imports = tcg_imports gbl `plusImportAvails` imports, tcg_import_decls = imp_user_spec, tcg_rn_imports = rn_imports, ===================================== compiler/GHC/Tc/Solver/Monad.hs ===================================== @@ -217,8 +217,8 @@ import qualified Data.Set as Set import GHC.Unit.Module.Graph import Data.Bifunctor (bimap) -import GHC.Data.Graph.Directed import GHC.Data.Maybe +import qualified Data.Map as Map {- ********************************************************************* * * @@ -1458,10 +1458,13 @@ checkWellStagedInstanceWhat what = do cur_mod <- extractModule <$> getGblEnv hsc_env <- getTopEnv - let (mg, lookup_node) = moduleGraphNodesZero (hsc_units hsc_env) (mgModSummaries' $ hsc_mod_graph hsc_env) + let mg = mgTransDepsZero (hsc_mod_graph hsc_env) let lkup :: ImportStage -> Set.Set (Either Module UnitId) - lkup s = Set.fromList $ map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id . node_payload) $ reachablesG2 mg (map (expectJust "needs_th" . lookup_node) [Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)]) + lkup s = + let l1 = expectJust "checkWell" $ Map.lookup (Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)) mg + in Set.map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id) l1 + --Set.fromList $ map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id . node_payload) $ -- let lkup s = Set.map (bimap (\(ModNodeKeyWithUid mn _ u,_) -> mkModule (RealUnit (Definite u)) (gwib_mod mn)) id) $ flip (Map.!) (Left (ModNodeKeyWithUid (GWIB (moduleName cur_mod) NotBoot) zeroStage (moduleUnitId cur_mod), s)) tg let splice_lvl = lkup SpliceStage normal_lvl = lkup NormalStage ===================================== compiler/GHC/Tc/Utils/Env.hs ===================================== @@ -60,7 +60,7 @@ module GHC.Tc.Utils.Env( -- Template Haskell stuff StageCheckReason(..), - checkWellStaged, tcMetaTy, thLevel, + tcMetaTy, thLevel, topIdLvl, isBrackStage, -- New Ids @@ -139,7 +139,6 @@ import Control.Monad import GHC.Iface.Errors.Types import GHC.Types.Error import GHC.Rename.Unbound ( unknownNameSuggestions, WhatLooking(..) ) -import qualified Data.Set as Set {- ********************************************************************* * * @@ -850,22 +849,6 @@ tcExtendRules lcl_rules thing_inside ************************************************************************ -} --- MP: This whole function needs rewriting -checkWellStaged :: StageCheckReason -- What the stage check is for - -> Set.Set ThLevel -- Binding level (increases inside brackets) - -> ThLevel -- Use stage - -> TcM () -- Fail if badly staged, adding an error -checkWellStaged pp_thing bind_lvl use_lvl - | any (use_lvl >=) (Set.toList bind_lvl) -- OK! Used later than bound - = return () -- E.g. \x -> [| $(f x) |] - - -- | bind_lvl == outerLevel -- GHC restriction on top level splices - -- = failWithTc (TcRnStageRestriction pp_thing) - - | otherwise -- Badly staged - = failWithTc $ -- E.g. \x -> $(f x) - TcRnBadlyStaged pp_thing bind_lvl use_lvl - topIdLvl :: Id -> ThLevel -- Globals may either be imported, or may be from an earlier "chunk" -- (separated by declaration splices) of this module. The former ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -8,9 +8,8 @@ module GHC.Unit.Module.Graph , nodeDependencies , emptyMG , mkModuleGraph - , extendMG , extendMGInst - , extendMG' + , extendModGraph , unionMG , isTemplateHaskellOrQQNonBoot , isExplicitStageMS @@ -20,6 +19,8 @@ module GHC.Unit.Module.Graph , mgModSummaries' , mgLookupModule , mgTransDeps + , CollapseToZero(..) + , mgTransDepsZero , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum @@ -46,10 +47,11 @@ module GHC.Unit.Module.Graph , ModNodeKeyWithUid(..) - , ModuleStage(..) + , ModuleStage + , minStage + , maxStage , zeroStage , todoStage - , moduleStageToThLevel , incModuleStage , decModuleStage , collapseModuleGraph @@ -85,12 +87,11 @@ import GHC.Linker.Static.Utils import Data.Bifunctor import Data.Function -import Data.List (sort, nub) +import Data.List (sort) import GHC.Data.List.SetOps import GHC.Stack -import GHC.Utils.Panic -import GHC.Unit.State import Language.Haskell.Syntax.ImpExp +import Data.Containers.ListUtils -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -100,9 +101,11 @@ data ModuleGraphNode -- (backpack dependencies) with the holes (signatures) of the current package. = InstantiationNode UnitId InstantiatedUnit -- | There is a module summary node for each module, signature, and boot module being built. - | ModuleNode [NodeKey] [(ModuleStage, UnitId)] ModuleStage ModSummary + | ModuleNode [(ImportStage, NodeKey)] ModuleStage ModSummary -- | Link nodes are whether are are creating a linked product (ie executable/shared object etc) for a unit. | LinkNode [NodeKey] UnitId + -- Unit nodes are already built, but show the structure of packages + | UnitNode [UnitId] ModuleStage UnitId moduleGraphNodeModule :: ModuleGraphNode -> Maybe ModuleName moduleGraphNodeModule mgn = ms_mod_name <$> (moduleGraphNodeModSum mgn) @@ -110,20 +113,23 @@ moduleGraphNodeModule mgn = ms_mod_name <$> (moduleGraphNodeModSum mgn) moduleGraphNodeModSum :: ModuleGraphNode -> Maybe ModSummary moduleGraphNodeModSum (InstantiationNode {}) = Nothing moduleGraphNodeModSum (LinkNode {}) = Nothing -moduleGraphNodeModSum (ModuleNode _ _ _ ms) = Just ms +moduleGraphNodeModSum (ModuleNode _ _ ms) = Just ms +moduleGraphNodeModSum (UnitNode {}) = Nothing moduleGraphNodeUnitId :: ModuleGraphNode -> UnitId moduleGraphNodeUnitId mgn = case mgn of InstantiationNode uid _iud -> uid - ModuleNode _ _lvl _ ms -> toUnitId (moduleUnit (ms_mod ms)) + ModuleNode _ _lvl ms -> toUnitId (moduleUnit (ms_mod ms)) LinkNode _ uid -> uid + UnitNode _ _ uid -> uid instance Outputable ModuleGraphNode where ppr = \case InstantiationNode _ iuid -> ppr iuid - ModuleNode nks uids lvl ms -> ppr (msKey lvl ms) <+> ppr nks <+> ppr uids + ModuleNode nks lvl ms -> ppr (msKey lvl ms) <+> ppr nks LinkNode uid _ -> text "LN:" <+> ppr uid + UnitNode uids st uid -> text "UN:" <+> ppr st <+> ppr uid <+> text "depends on" <+> ppr uids instance Eq ModuleGraphNode where (==) = (==) `on` mkNodeKey @@ -134,6 +140,7 @@ instance Ord ModuleGraphNode where data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid | NodeKey_Link !UnitId + | NodeKey_ExternalUnit !ModuleStage !UnitId deriving (Eq, Ord) instance Outputable NodeKey where @@ -143,39 +150,51 @@ pprNodeKey :: NodeKey -> SDoc pprNodeKey (NodeKey_Unit iu) = ppr iu pprNodeKey (NodeKey_Module mk) = ppr mk pprNodeKey (NodeKey_Link uid) = ppr uid +pprNodeKey (NodeKey_ExternalUnit _ uid) = text "E:" <+> ppr uid nodeKeyUnitId :: NodeKey -> UnitId nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk nodeKeyUnitId (NodeKey_Link uid) = uid +nodeKeyUnitId (NodeKey_ExternalUnit _ uid) = uid nodeKeyLevel :: NodeKey -> ModuleStage nodeKeyLevel (NodeKey_Unit {}) = zeroStage nodeKeyLevel (NodeKey_Module mk) = mnkLevel mk nodeKeyLevel (NodeKey_Link {}) = zeroStage +nodeKeyLevel (NodeKey_ExternalUnit {}) = zeroStage nodeKeyModName :: NodeKey -> Maybe ModuleName nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) nodeKeyModName _ = Nothing -newtype ModuleStage = ModuleStage Int deriving (Eq, Ord) +data ModuleStage = RunStage | CompileStage deriving (Eq, Ord) + +minStage :: ModuleStage +minStage = RunStage +maxStage :: ModuleStage +maxStage = CompileStage instance Outputable ModuleStage where - ppr (ModuleStage p) = ppr p + ppr CompileStage = text "compile" + ppr RunStage = text "run" zeroStage :: ModuleStage -zeroStage = ModuleStage 1 +zeroStage = RunStage todoStage :: HasCallStack => ModuleStage todoStage -- = pprTrace "todoStage" callStackDoc = zeroStage -moduleStageToThLevel :: ModuleStage -> Int -moduleStageToThLevel (ModuleStage m) = m +--moduleStageToThLevel :: ModuleStage -> Int +--moduleStageToThLevel (ModuleStage m) = m decModuleStage, incModuleStage :: ModuleStage -> ModuleStage -incModuleStage (ModuleStage m) = ModuleStage (m + 1) -decModuleStage (ModuleStage m) = ModuleStage (m - 1) +incModuleStage RunStage = RunStage +incModuleStage CompileStage = RunStage + +decModuleStage RunStage = CompileStage +decModuleStage CompileStage = RunStage data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot , mnkLevel :: !ModuleStage @@ -199,7 +218,8 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_trans_deps :: (Map.Map NodeKey (Set.Set NodeKey), NodeKey -> Maybe ModuleGraphNode) + , mg_trans_deps_zero :: TDZ -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -211,7 +231,8 @@ mapMG f mg at ModuleGraph{..} = mg { mg_mss = flip fmap mg_mss $ \case InstantiationNode uid iuid -> InstantiationNode uid iuid LinkNode uid nks -> LinkNode uid nks - ModuleNode deps uid lvl ms -> ModuleNode deps uid lvl (f ms) + ModuleNode deps lvl ms -> ModuleNode deps lvl (f ms) + UnitNode uids st uid -> UnitNode uids st uid } unionMG :: ModuleGraph -> ModuleGraph -> ModuleGraph @@ -220,14 +241,18 @@ unionMG a b = in ModuleGraph { mg_mss = new_mss , mg_trans_deps = mkTransDeps new_mss + , mg_trans_deps_zero = mkTransDepsZero new_mss } -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) +mgTransDeps :: ModuleGraph -> (Map.Map NodeKey (Set.Set NodeKey), NodeKey -> Maybe ModuleGraphNode) mgTransDeps = mg_trans_deps +mgTransDepsZero :: ModuleGraph -> TDZ +mgTransDepsZero = mg_trans_deps_zero + mgModSummaries :: ModuleGraph -> [ModSummary] -mgModSummaries mg = [ m | ModuleNode _ _ _lvl m <- mgModSummaries' mg ] +mgModSummaries mg = [ m | ModuleNode _ _lvl m <- mgModSummaries' mg ] mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] mgModSummaries' = mg_mss @@ -239,14 +264,14 @@ mgModSummaries' = mg_mss mgLookupModule :: ModuleGraph -> Module -> Maybe ModSummary mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss where - go (ModuleNode _ _ _lvl ms) + go (ModuleNode _ _lvl ms) | NotBoot <- isBootSummary ms , ms_mod ms == m = Just ms go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (Map.empty, const Nothing) Map.empty isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -257,22 +282,27 @@ isTemplateHaskellOrQQNonBoot ms = isExplicitStageMS :: ModSummary -> Bool isExplicitStageMS ms = xopt LangExt.StagedImports (ms_hspp_opts ms) --- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is --- not an element of the ModuleGraph. -extendMG :: ModuleGraph -> [NodeKey] -> [(ModuleStage, UnitId)] -> ModuleStage -> ModSummary -> ModuleGraph -extendMG ModuleGraph{..} deps uid lvl ms = ModuleGraph - { mg_mss = ModuleNode deps uid lvl ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps uid lvl ms : mg_mss) - } - -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) +extendModGraph :: ModuleGraph -> ModuleGraphNode -> ModuleGraph +extendModGraph mg mgn = + let res = + ModuleGraph { + mg_mss = mgn : mg_mss mg + , mg_trans_deps = mkTransDeps (mg_mss res) + , mg_trans_deps_zero = mkTransDepsZero (mg_mss res) + } + in res + +-- This collapses to zero. +mkTransDeps :: [ModuleGraphNode] -> (Map.Map NodeKey (Set.Set NodeKey), NodeKey -> Maybe ModuleGraphNode) mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) + let (gg, lookup_node) = moduleGraphNodes False CollapseToZero mss + in (allReachable gg (mkNodeKey . node_payload), fmap summaryNodeSummary . lookup_node) -mkTransDepsZero :: UnitState -> [ModuleGraphNode] -> Map.Map (Either (ModNodeKeyWithUid, ImportStage) UnitId) (Set.Set (Either (ModNodeKeyWithUid, ImportStage) UnitId)) -mkTransDepsZero us mss = - let (gg, _lookup_node) = moduleGraphNodesZero us mss +type TDZ = Map.Map (Either (ModNodeKeyWithUid, ImportStage) UnitId) (Set.Set (Either (ModNodeKeyWithUid, ImportStage) UnitId)) + +mkTransDepsZero :: [ModuleGraphNode] -> TDZ +mkTransDepsZero mss = + let (gg, _lookup_node) = moduleGraphNodesZero mss in allReachable gg node_payload extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph @@ -280,14 +310,8 @@ extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg } -extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph -extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } - extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph -extendMG' mg = \case - InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId - ModuleNode deps uid lvl ms -> extendMG mg deps uid lvl ms - LinkNode deps uid -> extendMGLink mg uid deps +extendMG' = extendModGraph mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph mkModuleGraph = foldr (flip extendMG') emptyMG @@ -297,11 +321,12 @@ collapseModuleGraph = mkModuleGraph . collapseModuleGraphNodes . mgModSummaries' -- Collapse information about levels and map everything to level 0 collapseModuleGraphNodes :: [ModuleGraphNode] -> [ModuleGraphNode] -collapseModuleGraphNodes m = nub $ map go m +collapseModuleGraphNodes m = nubOrd $ map go m where - go (ModuleNode deps uid _lvl ms) = ModuleNode (nub $ map collapseNodeKey deps) uid zeroStage ms - go (LinkNode deps uid) = LinkNode (nub $ map collapseNodeKey deps) uid + go (ModuleNode deps _lvl ms) = ModuleNode (nubOrd $ map (bimap (const NormalStage) collapseNodeKey) deps) zeroStage ms + go (LinkNode deps uid) = LinkNode (nubOrd $ map collapseNodeKey deps) uid go (InstantiationNode uid iuid) = InstantiationNode uid iuid + go (UnitNode uids st uid) = UnitNode uids st uid collapseNodeKey :: NodeKey -> NodeKey collapseNodeKey (NodeKey_Module (ModNodeKeyWithUid mn _lvl uid)) @@ -320,7 +345,8 @@ filterToposortToModules filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case InstantiationNode _ _ -> Nothing LinkNode{} -> Nothing - ModuleNode _deps _uid _lvl node -> Just node + UnitNode {} -> Nothing + ModuleNode _deps _lvl node -> Just node where -- This higher order function is somewhat bogus, -- as the definition of "strongly connected component" @@ -334,6 +360,7 @@ filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case as -> Just $ CyclicSCC as showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc +showModMsg _ _ (UnitNode _ st uid) = ppr uid <+> text "at" <+> ppr st showModMsg dflags _ (LinkNode {}) = let staticLink = case ghcLink dflags of LinkStaticLib -> True @@ -345,7 +372,7 @@ showModMsg dflags _ (LinkNode {}) = in text exe_file showModMsg _ _ (InstantiationNode _uid indef_unit) = ppr $ instUnitInstanceOf indef_unit -showModMsg dflags recomp (ModuleNode _ _ lvl mod_summary) = +showModMsg dflags recomp (ModuleNode _ lvl mod_summary) = if gopt Opt_HideSourcePaths dflags then text mod_str else hsep $ @@ -391,23 +418,31 @@ nodeDependencies drop_hs_boot_nodes = \case LinkNode deps _uid -> deps InstantiationNode uid iuid -> NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) zeroStage uid) <$> uniqDSetToList (instUnitHoles iuid) - ModuleNode deps _ _lvl _ms -> + ModuleNode deps _lvl _ms -> map drop_hs_boot deps + UnitNode uids st _ -> map (NodeKey_ExternalUnit st) uids where -- Drop hs-boot nodes by using HsSrcFile as the key hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature | otherwise = IsBoot - drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) lvl uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) lvl uid)) - drop_hs_boot x = x + drop_hs_boot (i, (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) lvl uid))) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) lvl uid)) + drop_hs_boot (_, x) = x + + +data CollapseToZero = CollapseToZero | UseStages -- | Turn a list of graph nodes into an efficient queriable graph. -- The first boolean parameter indicates whether nodes corresponding to hs-boot files -- should be collapsed into their relevant hs nodes. + +-- The CollapseToZero parameter +-- For example, traversals which find type class instances are ignorant to levels. moduleGraphNodes :: Bool + -> CollapseToZero -> [ModuleGraphNode] -> (Graph SummaryNode, NodeKey -> Maybe SummaryNode) -moduleGraphNodes drop_hs_boot_nodes summaries = +moduleGraphNodes drop_hs_boot_nodes collapse_to_zero summaries = (graphFromEdgedVerticesUniq nodes, lookup_node) where -- Map from module to extra boot summary dependencies which need to be merged in @@ -416,7 +451,7 @@ moduleGraphNodes drop_hs_boot_nodes summaries = where go (s, key) = case s of - ModuleNode __deps _uid _lvl ms | isBootSummary ms == IsBoot, drop_hs_boot_nodes + ModuleNode __deps _lvl ms | isBootSummary ms == IsBoot, drop_hs_boot_nodes -- Using nodeDependencies here converts dependencies on other -- boot files to dependencies on dependencies on non-boot files. -> Left (ms_mod ms, nodeDependencies drop_hs_boot_nodes s) @@ -430,7 +465,11 @@ moduleGraphNodes drop_hs_boot_nodes summaries = (fromMaybe [] extra ++ nodeDependencies drop_hs_boot_nodes s) - numbered_summaries = zip summaries [1..] + collapsed_summaries = case collapse_to_zero of + CollapseToZero -> collapseModuleGraphNodes summaries + UseStages -> summaries + + numbered_summaries = zip collapsed_summaries [1..] lookup_node :: NodeKey -> Maybe SummaryNode lookup_node key = Map.lookup key (unNodeMap node_map) @@ -472,54 +511,33 @@ zeroSummaryNodeSummary = node_payload -- If you are looking at level -1 then the reachable modules are those imported at splice and -- then any modules those modules import at zero. (Ie the zero scope for those modules) moduleGraphNodesZero :: - UnitState - -> [ModuleGraphNode] + [ModuleGraphNode] -> (Graph ZeroSummaryNode, Either (ModNodeKeyWithUid, ImportStage) UnitId -> Maybe ZeroSummaryNode) -moduleGraphNodesZero us summaries = +moduleGraphNodesZero summaries = (graphFromEdgedVerticesUniq nodes, lookup_node) where -- Map from module to extra boot summary dependencies which need to be merged in (nodes) = mapMaybe go numbered_summaries where - go :: ((Either (ModuleGraphNode, ImportStage) (UnitId, [UnitId])), Int) -> Maybe ZeroSummaryNode + go :: (((ModuleGraphNode, ImportStage)), Int) -> Maybe ZeroSummaryNode go (s, key) = normal_case s where - normal_case :: Either (ModuleGraphNode, ImportStage) (UnitId, [UnitId]) -> Maybe ZeroSummaryNode - normal_case (Left ((ModuleNode nks uids lvl ms), s)) = Just $ - DigraphNode (Left (msKey lvl ms, s)) key $ out_edge_keys (jimmy_lvl lvl s) $ - ((map Left $ only_module_deps nks) - ++ (map Right uids)) - normal_case (Right (u, us)) = - Just $ DigraphNode (Right u) key (mapMaybe lookup_key $ map Right us) + normal_case :: (ModuleGraphNode, ImportStage) -> Maybe ZeroSummaryNode + normal_case (((ModuleNode nks lvl ms), s)) = Just $ + DigraphNode (Left (msKey lvl ms, s)) key $ out_edge_keys $ + mapMaybe (classifyDeps s) nks + normal_case ((UnitNode uids _lvl uid), _s) = + Just $ DigraphNode (Right uid) key (mapMaybe lookup_key $ map Right uids) normal_case _ = Nothing - only_module_deps ds = [ k | NodeKey_Module k <- ds ] - - jimmy_lvl l s = case s of - NormalStage -> l - QuoteStage -> incModuleStage l - SpliceStage -> decModuleStage l - - numbered_summaries :: [(Either (ModuleGraphNode, ImportStage) (UnitId, [UnitId]), Int)] - numbered_summaries = zip (([Left (s, l) | s <- summaries, l <- [SpliceStage, QuoteStage, NormalStage]]) ++ map Right (Map.toList all_unit_depends)) [1..] - - all_unit_depends :: Map.Map UnitId [UnitId] - all_unit_depends = foldr (\m cache -> go cache (unit_depends m)) Map.empty summaries - where - - go cache [] = cache - go cache (u:uxs) = - case Map.lookup u cache of - Just {} -> go cache uxs - Nothing -> case unitDepends <$> lookupUnitId us u of - Just us -> go (go (Map.insert u us cache) us) uxs - Nothing -> panic "bad" + classifyDeps s (il, (NodeKey_Module k)) | s == il = Just (Left k) + classifyDeps s (il, (NodeKey_ExternalUnit lvl u)) | s == il = Just (Right (lvl, u)) + classifyDeps _ _ = Nothing - unit_depends :: ModuleGraphNode -> [UnitId] - unit_depends (ModuleNode _ uids _ _) = map snd $ filter ((== zeroStage) . fst) uids - unit_depends _ = [] + numbered_summaries :: [((ModuleGraphNode, ImportStage), Int)] + numbered_summaries = zip (([(s, l) | s <- summaries, l <- [SpliceStage, QuoteStage, NormalStage]])) [0..] lookup_node :: Either (ModNodeKeyWithUid, ImportStage) UnitId -> Maybe ZeroSummaryNode lookup_node key = Map.lookup key node_map @@ -534,8 +552,8 @@ moduleGraphNodesZero us summaries = , let s = zeroSummaryNodeSummary node ] - out_edge_keys :: ModuleStage -> [Either ModNodeKeyWithUid (ModuleStage, UnitId)] -> [Int] - out_edge_keys m = mapMaybe lookup_key . map (bimap (, NormalStage) snd) . filter (either (\nk -> mnkLevel nk == m) ((== m) . fst)) + out_edge_keys :: [Either ModNodeKeyWithUid (ModuleStage, UnitId)] -> [Int] + out_edge_keys = mapMaybe lookup_key . map (bimap (, NormalStage) snd) -- If we want keep_hi_boot_nodes, then we do lookup_key with -- IsBoot; else False @@ -545,8 +563,9 @@ newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } mkNodeKey :: ModuleGraphNode -> NodeKey mkNodeKey = \case InstantiationNode _ iu -> NodeKey_Unit iu - ModuleNode _ _ lvl x -> NodeKey_Module $ msKey lvl x + ModuleNode _ lvl x -> NodeKey_Module $ msKey lvl x LinkNode _ uid -> NodeKey_Link uid + UnitNode _ st uid -> NodeKey_ExternalUnit st uid msKey :: ModuleStage -> ModSummary -> ModNodeKeyWithUid msKey l ms = ModNodeKeyWithUid (ms_mnwib ms) l (ms_unitid ms) @@ -561,7 +580,7 @@ type ModNodeKey = ModuleNameWithIsBoot moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleStage -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid moduleGraphModulesBelow mg uid lvl mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] where - td_map = mgTransDeps mg + (td_map, _) = mgTransDeps mg modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn lvl uid)) td_map ===================================== ghc/GHCi/UI.hs ===================================== @@ -1748,7 +1748,7 @@ editFile str = -- of those. chooseEditFile :: GHC.GhcMonad m => m String chooseEditFile = - do let hasFailed (GHC.ModuleNode _deps _ _ x) = fmap not $ isLoadedModSummary x + do let hasFailed (GHC.ModuleNode _deps _ x) = fmap not $ isLoadedModSummary x hasFailed _ = return False graph <- GHC.getModuleGraph @@ -2200,7 +2200,7 @@ setContextAfterLoad keep_ctxt (Just graph) = do (m:_) -> load_this m where - is_loaded (GHC.ModuleNode _ _ _ ms) = isLoadedModSummary ms + is_loaded (GHC.ModuleNode _ _ ms) = isLoadedModSummary ms is_loaded _ = return False findTarget mds t @@ -2208,9 +2208,9 @@ setContextAfterLoad keep_ctxt (Just graph) = do [] -> Nothing (m:_) -> Just m - (GHC.ModuleNode _ _ _ summary) `matches` Target { targetId = TargetModule m } + (GHC.ModuleNode _ _ summary) `matches` Target { targetId = TargetModule m } = if GHC.ms_mod_name summary == m then Just summary else Nothing - (GHC.ModuleNode _ _ _ summary) `matches` Target { targetId = TargetFile f _ } + (GHC.ModuleNode _ _ summary) `matches` Target { targetId = TargetFile f _ } | Just f' <- GHC.ml_hs_file (GHC.ms_location summary) = if f == f' then Just summary else Nothing _ `matches` _ = Nothing ===================================== testsuite/tests/splice-imports/SI22.stderr ===================================== @@ -0,0 +1,4 @@ +SI22.hs: error: [GHC-92213] + Module graph contains a cycle: + module ‘SI22’ (SI22.hs) imports itself + ===================================== testsuite/tests/splice-imports/SI23.hs ===================================== @@ -0,0 +1,9 @@ +{-# LANGUAGE ExplicitStageImports #-} +{-# LANGUAGE TemplateHaskell #-} +module SI23 where + +import splice SI23A +import splice Language.Haskell.TH.Syntax +import SI23A + +main = print $(lift B) ===================================== testsuite/tests/splice-imports/SI23A.hs ===================================== @@ -0,0 +1,5 @@ +module SI23A where + +import Language.Haskell.TH.Syntax + +data B = B deriving (Lift, Show) ===================================== testsuite/tests/splice-imports/SI24.hs ===================================== @@ -0,0 +1,8 @@ +{-# LANGUAGE ExplicitStageImports #-} +module SI24 where + +-- Identifiers can be used in variables + +splice = quote + +quote = splice ===================================== testsuite/tests/splice-imports/all.T ===================================== @@ -27,4 +27,5 @@ test('SI20', extra_files(["SI19A.hs"]), multimod_compile_fail, ['SI20', '-v0']) test('SI21', normal, multimod_compile_fail, ['SI21', '-v0']) test('SI22', normal, multimod_compile_fail, ['SI22', '-v0']) test('SI23', extra_files(["SI23A.hs"]), multimod_compile, ['SI23', '-v0']) +test('SI24', normal, compile, ['']) ===================================== utils/haddock/haddock-api/src/Haddock/Interface.hs ===================================== @@ -223,7 +223,7 @@ createIfaces verbosity modules flags instIfaceMap = do -- but if module A {-# SOURCE #-} imports B, then we can't say the same. -- let - go (AcyclicSCC (ModuleNode _ _ _ ms)) + go (AcyclicSCC (ModuleNode _ _ ms)) | NotBoot <- isBootSummary ms = [ms] | otherwise = [] go (AcyclicSCC _) = [] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ce8950bc98b5bcde029664c503a55deeec3abe01...eaf0f1b0c0ad240e011e44941bf2190c47a3b866 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ce8950bc98b5bcde029664c503a55deeec3abe01...eaf0f1b0c0ad240e011e44941bf2190c47a3b866 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 16:25:03 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 11:25:03 -0500 Subject: [Git][ghc/ghc][wip/T24594] 4905 commits: [haddock @ 2002-04-04 16:23:43 by simonmar] Message-ID: <673775df6fb7c_1dbbef80f99454487@gitlab.mail> Ben Gamari pushed to branch wip/T24594 at Glasgow Haskell Compiler / GHC Commits: 2b39cd94 by Simon Marlow at 2002-04-04T16:23:43+00:00 [haddock @ 2002-04-04 16:23:43 by simonmar] This is Haddock, my stab at a Haskell documentation tool. It's not quite ready for release yet, but I'm putting it in the repository so others can take a look. It uses a locally modified version of the hssource parser, extended with support for GHC extensions and documentation annotations. - - - - - 99ede94f by Simon Marlow at 2002-04-04T16:24:10+00:00 [haddock @ 2002-04-04 16:24:10 by simonmar] forgot one file - - - - - 8363294c by Simon Marlow at 2002-04-05T13:58:15+00:00 [haddock @ 2002-04-05 13:58:15 by simonmar] Remap names in the exported declarations to be "closer" to the current module. eg. if an exported declaration mentions a type 'T' which is imported from module A then re-exported from the current module, then links from the type or indeed the documentation will point to the current module rather than module A. This is to support better hiding: module A won't be referred to in the generated output. - - - - - 1570cbc1 by Simon Marlow at 2002-04-05T13:58:23+00:00 [haddock @ 2002-04-05 13:58:23 by simonmar] update the TODO list - - - - - 3a62f96b by Simon Marlow at 2002-04-05T14:11:51+00:00 [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration - - - - - c5d9a471 by Simon Marlow at 2002-04-05T14:18:41+00:00 [haddock @ 2002-04-05 14:18:41 by simonmar] remove underlines on visited links - - - - - 97280525 by Simon Marlow at 2002-04-05T16:11:47+00:00 [haddock @ 2002-04-05 16:11:47 by simonmar] - Update to generate more correct HTML. - Use our own non-overloaded table combinators, as the overloaded versions were giving me a headache. The improved type safety caught several errors in the HTML generation. - - - - - 9acd3a4d by Simon Marlow at 2002-04-05T16:32:19+00:00 [haddock @ 2002-04-05 16:32:19 by simonmar] Add width property to the title, and add TD.children for the module contents page. - - - - - ec9a0847 by Simon Marlow at 2002-04-08T16:39:56+00:00 [haddock @ 2002-04-08 16:39:56 by simonmar] Fix a problem with exports of the form T(..). - - - - - e4627dc8 by Simon Marlow at 2002-04-08T16:41:38+00:00 [haddock @ 2002-04-08 16:41:37 by simonmar] - Add our own versions of Html & BlockTable for the time being. - Add support for generating an index to the HTML backend - - - - - 2d73fd75 by Simon Marlow at 2002-04-09T11:23:24+00:00 [haddock @ 2002-04-09 11:23:24 by simonmar] Add '-- /' as a synonym for '-- |', for compatibility with IDoc. - - - - - 3675464e by Simon Marlow at 2002-04-09T11:33:55+00:00 [haddock @ 2002-04-09 11:33:54 by simonmar] - add the <...> syntax for marking up URLs in documentation - Make the output for data & class declarations more compact when there aren't any documentation annotations on the individual methods or constructors respectively. - - - - - 5077f5b1 by Simon Marlow at 2002-04-09T11:36:04+00:00 [haddock @ 2002-04-09 11:36:04 by simonmar] Update the TODO list - - - - - 9e83c54d by Simon Marlow at 2002-04-10T10:50:06+00:00 [haddock @ 2002-04-10 10:50:06 by simonmar] Use explicit 'px' suffix on pixel sizes; IE seems to prefer them - - - - - 052de51c by Simon Marlow at 2002-04-10T13:23:13+00:00 [haddock @ 2002-04-10 13:23:13 by simonmar] Lex URLs as a single token to avoid having to escape special characters inside the URL string. - - - - - 47187edb by Simon Marlow at 2002-04-10T13:23:55+00:00 [haddock @ 2002-04-10 13:23:55 by simonmar] Not sure why I made the constructor name for a record declaration into a TyCls name, but change it back into a Var name anyhow. - - - - - 3dc6aa81 by Simon Marlow at 2002-04-10T13:26:10+00:00 [haddock @ 2002-04-10 13:26:09 by simonmar] Lots of changes, including: - add index support to the HTML backend - clean up the renamer, put it into a monad - propogate unresolved names to the top level and report them in a nicer way - various bugfixes - - - - - c2a70a72 by Simon Marlow at 2002-04-10T13:32:39+00:00 [haddock @ 2002-04-10 13:32:39 by simonmar] Skeleton documentation - - - - - 50c98d17 by Simon Marlow at 2002-04-10T13:37:23+00:00 [haddock @ 2002-04-10 13:37:23 by simonmar] Update the TODO list, separate into pre-1.0 and post-1.0 items - - - - - f3778be6 by Simon Marlow at 2002-04-10T14:30:58+00:00 [haddock @ 2002-04-10 14:30:58 by simonmar] Add an introduction - - - - - cfbaf9f7 by Simon Marlow at 2002-04-10T14:59:51+00:00 [haddock @ 2002-04-10 14:59:51 by simonmar] Sort the module tree - - - - - 76bd7b34 by Simon Marlow at 2002-04-10T15:50:11+00:00 [haddock @ 2002-04-10 15:50:10 by simonmar] Generate a little table of contents at the top of the module doc (only if the module actually contains some section headings, though). - - - - - bb8560a1 by Simon Marlow at 2002-04-10T16:10:26+00:00 [haddock @ 2002-04-10 16:10:26 by simonmar] Now we understand (or at least don't barf on) type signatures in patterns such as you might find when scoped type variables are in use. - - - - - 86c2a026 by Simon Marlow at 2002-04-10T16:10:49+00:00 [haddock @ 2002-04-10 16:10:49 by simonmar] more updates - - - - - 1c052b0e by Simon Marlow at 2002-04-10T16:28:05+00:00 [haddock @ 2002-04-10 16:28:05 by simonmar] Parse errors in doc strings are now reported as warnings rather that causing the whole thing to fall over. It still needs cleaning up (the warning is emitted with trace) but this will do for the time being. - - - - - ace03e8f by Simon Marlow at 2002-04-10T16:38:03+00:00 [haddock @ 2002-04-10 16:38:03 by simonmar] update again - - - - - 69006c3e by Simon Marlow at 2002-04-11T13:38:02+00:00 [haddock @ 2002-04-11 13:38:02 by simonmar] mention Opera - - - - - fe9b10f8 by Simon Marlow at 2002-04-11T13:40:31+00:00 [haddock @ 2002-04-11 13:40:30 by simonmar] - copy haddock.css into the same place as the generated HTML - new option: --css <file> specifies the style sheet to use - new option: -o <dir> specifies the directory in which to generate the output. - because Haddock now needs to know where to find its default stylesheet, we have to have a wrapper script and do the haddock-inplace thing (Makefile code copied largely from fptools/happy). - - - - - 106adbbe by Simon Marlow at 2002-04-24T15:12:41+00:00 [haddock @ 2002-04-24 15:12:41 by simonmar] Stop slurping comment lines when we see a row of dashes longer than length 2: these are useful as separators. - - - - - 995d3f9e by Simon Marlow at 2002-04-24T15:14:12+00:00 [haddock @ 2002-04-24 15:14:11 by simonmar] Grok the kind of module headers we use in fptools/libraries, and pass the "portability", "stability", and "maintainer" strings through into the generated HTML. If the module header doesn't match the pattern, then we don't include the info in the HTML. - - - - - e14da136 by Simon Marlow at 2002-04-24T15:16:57+00:00 [haddock @ 2002-04-24 15:16:57 by simonmar] Done module headers now. - - - - - 2ca8dfd4 by Simon Marlow at 2002-04-24T15:57:48+00:00 [haddock @ 2002-04-24 15:57:47 by simonmar] Handle gcons in export lists (a common extension). - - - - - 044cea81 by Simon Marlow at 2002-04-25T14:20:12+00:00 [haddock @ 2002-04-25 14:20:12 by simonmar] Add the little lambda icon - - - - - 63955027 by Simon Marlow at 2002-04-25T14:40:05+00:00 [haddock @ 2002-04-25 14:40:05 by simonmar] - Add support for named chunks of documentation which can be referenced from the export list. - Copy the icon from $libdir to the destination in HTML mode. - - - - - 36e3f913 by Simon Marlow at 2002-04-25T16:48:36+00:00 [haddock @ 2002-04-25 16:48:36 by simonmar] More keyboard bashing - - - - - 7ae18dd0 by Simon Marlow at 2002-04-26T08:43:33+00:00 [haddock @ 2002-04-26 08:43:33 by simonmar] Package util reqd. to compile with 4.08.2 - - - - - bbd5fbab by Simon Marlow at 2002-04-26T10:13:00+00:00 [haddock @ 2002-04-26 10:13:00 by simonmar] Include $(GHC_HAPPY_OPTS) when compiling HsParser - - - - - 31c53d79 by Simon Marlow at 2002-04-26T11:18:57+00:00 [haddock @ 2002-04-26 11:18:56 by simonmar] - support for fundeps (partially contributed by Brett Letner - thanks Brett). - make it build with GHC 4.08.2 - - - - - c415ce76 by Simon Marlow at 2002-04-26T13:15:02+00:00 [haddock @ 2002-04-26 13:15:02 by simonmar] Move the explicit formatting of the little table for the stability/portability/maintainer info from the HTML into the CSS, and remove the explicit table size (just right-align it). - - - - - 520ee21a by Simon Marlow at 2002-04-26T16:01:44+00:00 [haddock @ 2002-04-26 16:01:44 by simonmar] Yet more keyboard bashing - this is pretty much complete now. - - - - - 2ae37179 by Simon Marlow at 2002-04-26T16:02:14+00:00 [haddock @ 2002-04-26 16:02:14 by simonmar] Add a couple of things I forgot about - - - - - b7211e04 by Simon Marlow at 2002-04-29T15:28:12+00:00 [haddock @ 2002-04-29 15:28:12 by simonmar] bugfix for declBinders on a NewTypeDecl - - - - - 640c154a by Simon Marlow at 2002-04-29T15:28:54+00:00 [haddock @ 2002-04-29 15:28:54 by simonmar] Allow '-- |' style annotations on constructors and record fields. - - - - - 393f258a by Simon Marlow at 2002-04-29T15:37:32+00:00 [haddock @ 2002-04-29 15:37:32 by simonmar] syntax fix - - - - - 8a2c2549 by Simon Marlow at 2002-04-29T15:37:48+00:00 [haddock @ 2002-04-29 15:37:48 by simonmar] Add an example - - - - - db88f8a2 by Simon Marlow at 2002-04-29T15:55:46+00:00 [haddock @ 2002-04-29 15:55:46 by simonmar] remove a trace - - - - - 2b0248e0 by Simon Marlow at 2002-04-29T15:56:19+00:00 [haddock @ 2002-04-29 15:56:19 by simonmar] Fix for 'make install' - - - - - 120453a0 by Simon Marlow at 2002-04-29T15:56:39+00:00 [haddock @ 2002-04-29 15:56:39 by simonmar] Install the auxilliary bits - - - - - 950e6dbb by Simon Marlow at 2002-04-29T15:57:30+00:00 [haddock @ 2002-04-29 15:57:30 by simonmar] Add BinDist bits - - - - - 154b9d71 by Simon Marlow at 2002-05-01T11:02:52+00:00 [haddock @ 2002-05-01 11:02:52 by simonmar] update - - - - - ba6c39fa by Simon Marlow at 2002-05-01T11:03:26+00:00 [haddock @ 2002-05-01 11:03:26 by simonmar] Add another item - - - - - bacb5e33 by Simon Marlow at 2002-05-03T08:50:00+00:00 [haddock @ 2002-05-03 08:50:00 by simonmar] Fix some typos. - - - - - 54c87895 by Sven Panne at 2002-05-05T19:40:51+00:00 [haddock @ 2002-05-05 19:40:51 by panne] As a temporary hack/workaround for a bug in GHC's simplifier, don't pass Happy the -c option for generating the parsers in this subdir. Furthermore, disable -O for HaddocParse, too. - - - - - e6c08703 by Simon Marlow at 2002-05-06T09:51:10+00:00 [haddock @ 2002-05-06 09:51:10 by simonmar] Add RPM spec file (thanks to Tom Moertel <tom-rpms at moertel.com>) - - - - - 7b8fa8e7 by Simon Marlow at 2002-05-06T12:29:26+00:00 [haddock @ 2002-05-06 12:29:26 by simonmar] Add missing type signature (a different workaround for the bug in GHC's simplifier). - - - - - cd0e300d by Simon Marlow at 2002-05-06T12:30:09+00:00 [haddock @ 2002-05-06 12:30:09 by simonmar] Remove workaround for simplifier bug in previous revision. - - - - - 687e68fa by Simon Marlow at 2002-05-06T12:32:32+00:00 [haddock @ 2002-05-06 12:32:32 by simonmar] Allow empty data declarations (another GHC extension). - - - - - 8f29f696 by Simon Marlow at 2002-05-06T12:49:21+00:00 [haddock @ 2002-05-06 12:49:21 by simonmar] Fix silly bug in named documentation block lookup. - - - - - 8e0059af by Simon Marlow at 2002-05-06T13:02:42+00:00 [haddock @ 2002-05-06 13:02:42 by simonmar] Add another named chunk with a different name - - - - - 68f8a896 by Simon Marlow at 2002-05-06T13:32:32+00:00 [haddock @ 2002-05-06 13:32:32 by simonmar] Be more lenient about extra paragraph breaks - - - - - 65fc31db by Simon Marlow at 2002-05-07T15:36:36+00:00 [haddock @ 2002-05-07 15:36:36 by simonmar] DocEmpty is a right and left-unit of DocAppend (remove it in the smart constructor). - - - - - adc81078 by Simon Marlow at 2002-05-07T15:37:15+00:00 [haddock @ 2002-05-07 15:37:15 by simonmar] Allow code blocks to be denoted with bird-tracks in addition to [...]. - - - - - 1283a3c1 by Simon Marlow at 2002-05-08T11:21:56+00:00 [haddock @ 2002-05-08 11:21:56 by simonmar] Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak at cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace. - - - - - a2239cf5 by Simon Marlow at 2002-05-08T11:22:30+00:00 [haddock @ 2002-05-08 11:22:30 by simonmar] Update to test new features. - - - - - 6add955f by Simon Marlow at 2002-05-08T13:37:25+00:00 [haddock @ 2002-05-08 13:37:25 by simonmar] Change the markup for typewriter-font from [...] to @... at . The reasoning is that the '@' symbol is much less likely to be needed than square brackets, and we don't want to have to escape square brackets in code fragments. This will be mildly painful in the short term, but it's better to get the change out of the way as early as possible. - - - - - cda06447 by Simon Marlow at 2002-05-08T13:39:56+00:00 [haddock @ 2002-05-08 13:39:56 by simonmar] Allow nested-style comments to be used as documentation annotations too. eg. {-| ... -} is equivalent to -- | ... An extra space can also be left after the comment opener: {- | ... -}. The only version that isn't allowed is {-# ... -}, because this syntax overlaps with Haskell pragmas; use {- # ... -} instead. - - - - - db23f65e by Simon Marlow at 2002-05-08T14:48:41+00:00 [haddock @ 2002-05-08 14:48:39 by simonmar] Add support for existential quantifiers on constructors. - - - - - adce3794 by Simon Marlow at 2002-05-08T15:43:25+00:00 [haddock @ 2002-05-08 15:43:25 by simonmar] update - - - - - 62a1f436 by Simon Marlow at 2002-05-08T15:44:10+00:00 [haddock @ 2002-05-08 15:44:10 by simonmar] Update to version 0.2 - - - - - f6a24ba3 by Simon Marlow at 2002-05-09T08:48:29+00:00 [haddock @ 2002-05-09 08:48:29 by simonmar] typo - - - - - 9f9522a4 by Simon Marlow at 2002-05-09T10:33:14+00:00 [haddock @ 2002-05-09 10:33:14 by simonmar] oops, left out '/' from the special characters in the last change. - - - - - 14abcb39 by Simon Marlow at 2002-05-09T10:34:44+00:00 [haddock @ 2002-05-09 10:34:44 by simonmar] Fix buglet - - - - - b8d878be by Simon Marlow at 2002-05-09T10:35:00+00:00 [haddock @ 2002-05-09 10:35:00 by simonmar] Give a more useful instance of Show for Module. - - - - - f7bfd626 by Simon Marlow at 2002-05-09T10:37:07+00:00 [haddock @ 2002-05-09 10:37:07 by simonmar] The last commit to Main.lhs broke the delicate balance of laziness which was being used to avoid computing the dependency graph of modules. So I finally bit the bullet and did a proper topological sort of the module graph, which turned out to be easy (stealing the Digraph module from GHC - this really ought to be in the libraries somewhere). - - - - - b481c1d0 by Simon Marlow at 2002-05-09T10:37:25+00:00 [haddock @ 2002-05-09 10:37:25 by simonmar] another item done - - - - - 032e2b42 by Simon Marlow at 2002-05-09T10:44:15+00:00 [haddock @ 2002-05-09 10:44:15 by simonmar] Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not. - - - - - 5fb45e92 by Simon Marlow at 2002-05-09T11:10:55+00:00 [haddock @ 2002-05-09 11:10:55 by simonmar] Add a special case for list types in ppHsAType - - - - - 1937e428 by Simon Marlow at 2002-05-09T12:43:06+00:00 [haddock @ 2002-05-09 12:43:06 by simonmar] Type synonyms can accept a ctype on the RHS, to match GHC. - - - - - 0f16ce56 by Simon Marlow at 2002-05-09T12:45:19+00:00 [haddock @ 2002-05-09 12:45:19 by simonmar] Add 'stdcall' keyword - - - - - 29b0d7d2 by Simon Marlow at 2002-05-09T13:35:45+00:00 [haddock @ 2002-05-09 13:35:45 by simonmar] Add System Requirements section - - - - - bf14dddd by Simon Marlow at 2002-05-09T13:36:11+00:00 [haddock @ 2002-05-09 13:36:11 by simonmar] Test existential types, amongst other things - - - - - 502f8f6f by Simon Marlow at 2002-05-09T13:37:35+00:00 [haddock @ 2002-05-09 13:37:35 by simonmar] Print the module name in a doc-string parse error - - - - - ca1f8d49 by Simon Marlow at 2002-05-09T13:38:04+00:00 [haddock @ 2002-05-09 13:38:04 by simonmar] Add dependency - - - - - 8d3d91ff by Simon Marlow at 2002-05-09T15:37:57+00:00 [haddock @ 2002-05-09 15:37:57 by simonmar] Add the changelog/release notes - - - - - f3960959 by Simon Marlow at 2002-05-09T15:47:47+00:00 [haddock @ 2002-05-09 15:47:47 by simonmar] mention the backquote-style of markup - - - - - 089fb6e6 by Simon Marlow at 2002-05-09T15:59:45+00:00 [haddock @ 2002-05-09 15:59:45 by simonmar] update - - - - - bdd3be0b by Simon Marlow at 2002-05-09T15:59:56+00:00 [haddock @ 2002-05-09 15:59:56 by simonmar] Document changes since 0.1 - - - - - 00fc4af8 by Simon Marlow at 2002-05-10T08:22:48+00:00 [haddock @ 2002-05-10 08:22:48 by simonmar] oops, update to version 0.2 - - - - - a8a79041 by Simon Marlow at 2002-05-10T16:05:08+00:00 [haddock @ 2002-05-10 16:05:08 by simonmar] Only include a mini-contents if there are 2 or more sections - - - - - 06653319 by Simon Marlow at 2002-05-13T09:13:12+00:00 [haddock @ 2002-05-13 09:13:12 by simonmar] fix typos - - - - - 1402b19b by Simon Marlow at 2002-05-13T10:14:22+00:00 [haddock @ 2002-05-13 10:14:22 by simonmar] Allow backquote as the right-hand quote as well as the left-hand quote, as suggested by Dean Herrington. Clean up the grammar a litte. - - - - - dcd5320d by Simon Marlow at 2002-05-13T10:44:10+00:00 [haddock @ 2002-05-13 10:44:10 by simonmar] a couple more things, prioritise a bit - - - - - a90130c4 by Simon Marlow at 2002-05-13T15:19:03+00:00 [haddock @ 2002-05-13 15:19:03 by simonmar] Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs). - - - - - a774d432 by Simon Marlow at 2002-05-13T15:20:54+00:00 [haddock @ 2002-05-13 15:20:54 by simonmar] Fix one of the record examples - - - - - 2d1d5218 by Simon Marlow at 2002-05-15T12:44:35+00:00 [haddock @ 2002-05-15 12:44:35 by simonmar] Preserve the newline before a bird-track, but only within a paragraph. - - - - - 1554c09a by Simon Marlow at 2002-05-15T13:03:02+00:00 [haddock @ 2002-05-15 13:03:01 by simonmar] Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed. - - - - - 57344dc3 by Simon Marlow at 2002-05-15T13:03:19+00:00 [haddock @ 2002-05-15 13:03:19 by simonmar] Bump to version 0.3 - - - - - b2791812 by Simon Marlow at 2002-05-15T13:03:41+00:00 [haddock @ 2002-05-15 13:03:41 by simonmar] update - - - - - fead183e by Simon Marlow at 2002-05-15T13:10:15+00:00 [haddock @ 2002-05-15 13:10:15 by simonmar] Rename Foo.hs to Test.hs, and add a Makefile - - - - - b0b1f89f by Simon Marlow at 2002-05-15T13:16:07+00:00 [haddock @ 2002-05-15 13:16:07 by simonmar] - Remove the note about function argument docs not being implemented - Note that qualified identifiers can be used to point to entities that aren't in scope. - - - - - 5665f31a by Simon Marlow at 2002-05-15T13:28:46+00:00 [haddock @ 2002-05-15 13:28:46 by simonmar] Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson. - - - - - 0564505d by Simon Marlow at 2002-05-17T10:51:57+00:00 [haddock @ 2002-05-17 10:51:57 by simonmar] Fix bugs in qualified name handling (A.B.f was returned as B.f) - - - - - 10e7311c by Simon Marlow at 2002-05-21T10:24:52+00:00 [haddock @ 2002-05-21 10:24:52 by simonmar] - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation - - - - - 2f91c2a6 by Simon Marlow at 2002-05-21T10:27:40+00:00 [haddock @ 2002-05-21 10:27:40 by simonmar] add a few more test cases - - - - - 01c2ddd2 by Simon Marlow at 2002-05-21T10:28:33+00:00 [haddock @ 2002-05-21 10:28:33 by simonmar] Rearrange a bit, and add support for tabular datatype rendering - - - - - a4e4c5f8 by Simon Marlow at 2002-05-27T09:03:52+00:00 [haddock @ 2002-05-27 09:03:51 by simonmar] Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others) - - - - - 48722e68 by Simon Marlow at 2002-05-27T12:30:38+00:00 [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. - - - - - 657204d2 by Simon Marlow at 2002-05-27T13:19:49+00:00 [haddock @ 2002-05-27 13:19:49 by simonmar] Fix bug: we weren't renaming HsDocCommentNamed in renameDecl - - - - - 592aae66 by Simon Marlow at 2002-05-27T14:10:27+00:00 [haddock @ 2002-05-27 14:10:27 by simonmar] Fix some bugs in the rendering of qualified type signatures. - - - - - 69c8f763 by Simon Marlow at 2002-05-27T14:36:45+00:00 [haddock @ 2002-05-27 14:36:45 by simonmar] warning message tweak - - - - - 16e64e21 by Simon Marlow at 2002-05-27T14:53:53+00:00 [haddock @ 2002-05-27 14:53:53 by simonmar] hyperlinked identifiers should be in <tt> - - - - - 8d5e4783 by Simon Marlow at 2002-05-27T15:56:45+00:00 [haddock @ 2002-05-27 15:56:45 by simonmar] Do something sensible for modules which don't export anything (except instances). - - - - - 9d3ef811 by Simon Marlow at 2002-05-28T10:12:50+00:00 [haddock @ 2002-05-28 10:12:50 by simonmar] Rename the module documentation properly (bug reported by Sven Panne). - - - - - ef03a1cc by Simon Marlow at 2002-05-28T10:13:04+00:00 [haddock @ 2002-05-28 10:13:04 by simonmar] Add some more test cases - - - - - 92baa0e8 by Simon Marlow at 2002-05-28T11:17:55+00:00 [haddock @ 2002-05-28 11:17:55 by simonmar] If an identifier doesn't lex, then just replace it by a DocString. - - - - - a3156213 by Simon Marlow at 2002-05-28T16:16:19+00:00 [haddock @ 2002-05-28 16:16:19 by simonmar] Only link to names in the current module which are actually listed in the documentation. A name may be exported but not present in the documentation if it is exported as part of a 'module M' export specifier. - - - - - 31acf941 by Simon Marlow at 2002-05-28T16:17:11+00:00 [haddock @ 2002-05-28 16:17:11 by simonmar] update - - - - - 7e474ebf by Sigbjorn Finne at 2002-05-28T22:42:08+00:00 [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] - - - - - 093f7e53 by Simon Marlow at 2002-05-29T09:09:49+00:00 [haddock @ 2002-05-29 09:09:49 by simonmar] Back out previous change until we can find a better way to do this. - - - - - 9234389c by Simon Marlow at 2002-05-29T13:19:06+00:00 [haddock @ 2002-05-29 13:19:06 by simonmar] Make the markup syntax a little more friendly: - single quotes are now interpreted literally unless they surround a valid Haskell identifier. So for example now there's no need to escape a single quote used as an apostrophe. - text to the right of a bird track is now literal (if you want marked-up text in a code block, use @...@). - - - - - b3333526 by Simon Marlow at 2002-05-29T13:38:51+00:00 [haddock @ 2002-05-29 13:38:51 by simonmar] Document recent changes to markup syntax - - - - - f93641d6 by Simon Marlow at 2002-05-29T15:27:18+00:00 [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too - - - - - 613f21e3 by Simon Marlow at 2002-06-03T13:05:58+00:00 [haddock @ 2002-06-03 13:05:57 by simonmar] Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case). - - - - - 14b36807 by Simon Marlow at 2002-06-03T13:20:00+00:00 [haddock @ 2002-06-03 13:20:00 by simonmar] Fix linking to qualified names again (thanks to Sven Panne for pointing out the bug). - - - - - 95b10eac by Simon Marlow at 2002-06-03T13:46:48+00:00 [haddock @ 2002-06-03 13:46:48 by simonmar] Fix for exporting record selectors from a newtype declaration - - - - - 272f932e by Simon Marlow at 2002-06-03T13:56:38+00:00 [haddock @ 2002-06-03 13:56:38 by simonmar] update to version 0.3 - - - - - 1c0a3bed by Simon Marlow at 2002-06-03T14:05:07+00:00 [haddock @ 2002-06-03 14:05:07 by simonmar] Add changes in version 0.3 - - - - - 145b4626 by Simon Marlow at 2002-06-03T14:12:38+00:00 [haddock @ 2002-06-03 14:12:38 by simonmar] Render class names as proper binders - - - - - 052106b3 by Simon Marlow at 2002-06-03T14:15:10+00:00 [haddock @ 2002-06-03 14:15:10 by simonmar] update, and separate into bugs, features, and cosmetic items. - - - - - 854f4914 by Simon Marlow at 2002-06-03T14:16:13+00:00 [haddock @ 2002-06-03 14:16:13 by simonmar] More test cases - - - - - 466922c8 by Simon Marlow at 2002-06-03T14:16:56+00:00 [haddock @ 2002-06-03 14:16:56 by simonmar] Example from the paper - - - - - 9962a045 by Simon Marlow at 2002-06-03T14:17:49+00:00 [haddock @ 2002-06-03 14:17:49 by simonmar] A debugging version of the style-sheet, which gives some tables coloured backgrounds so we can see what's going on. - - - - - f16b79db by Simon Marlow at 2002-06-03T14:19:46+00:00 [haddock @ 2002-06-03 14:19:46 by simonmar] typo - - - - - 620db27b by Simon Marlow at 2002-06-03T14:48:32+00:00 [haddock @ 2002-06-03 14:48:32 by simonmar] oops, fix markup bugs - - - - - 53fd105c by Simon Marlow at 2002-06-05T09:05:07+00:00 [haddock @ 2002-06-05 09:05:07 by simonmar] Keep foreign imports when there is no export list (bug reported by Sven Panne). - - - - - 6d98989c by Simon Marlow at 2002-06-05T09:12:02+00:00 [haddock @ 2002-06-05 09:12:02 by simonmar] Identifiers in single quotes can be symbol names too (bug reported by Hal Daume). - - - - - 001811e5 by Sven Panne at 2002-06-08T14:03:36+00:00 [haddock @ 2002-06-08 14:03:36 by panne] Tiny workaround for the fact that Haddock currently ignores HsImportSpecs: Let the local_orig_env take precedence. This is no real solution at all, but improves things sometimes, e.g. in my GLUT documentation. :-) - - - - - 504d19c9 by Simon Marlow at 2002-06-11T09:23:25+00:00 [haddock @ 2002-06-11 09:23:25 by simonmar] portability nit - - - - - e13b5af4 by Simon Marlow at 2002-06-20T12:38:07+00:00 [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. - - - - - f467a9b6 by Simon Marlow at 2002-06-20T12:39:02+00:00 [haddock @ 2002-06-20 12:39:01 by simonmar] Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list. - - - - - b8dbfe20 by Simon Marlow at 2002-06-21T12:43:06+00:00 [haddock @ 2002-06-21 12:43:06 by simonmar] When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers. - - - - - 4831dbbd by Simon Marlow at 2002-06-21T15:50:42+00:00 [haddock @ 2002-06-21 15:50:42 by simonmar] Add support for reading and writing interface files(!) This turned out to be quite easy, and necessary to get decent hyperlinks between the documentation for separate packages in the libraries. The functionality isn't quite complete yet: for a given package of modules, you'd like to say "the HTML for these modules lives in directory <dir>" (currently they are assumed to be all in the same place). Two new flags: --dump-interface=FILE dump an interface file in FILE --read-interface=FILE read interface from FILE an interface file describes *all* the modules being processed. Only the exported names are kept in the interface: if you re-export a name from a module in another interface the signature won't be copied. This is a compromise to keep the size of the interfaces sensible. Also, I added another useful option: --no-implicit-prelude avoids trying to import the Prelude. Previously this was the default, but now importing the Prelude from elsewhere makes sense if you also read in an interface containing the Prelude module, so Haddock imports the Prelude implicitly according to the Haskell spec. - - - - - d3640a19 by Sven Panne at 2002-06-23T14:54:00+00:00 [haddock @ 2002-06-23 14:54:00 by panne] Make it compile with newer GHCs - - - - - 780c506b by Sven Panne at 2002-06-23T15:44:31+00:00 [haddock @ 2002-06-23 15:44:31 by panne] Cleaned up build root handling and added more docs - - - - - 45290d2e by Simon Marlow at 2002-06-24T14:37:43+00:00 [haddock @ 2002-06-24 14:37:42 by simonmar] When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface. - - - - - 4e2b9ae6 by Simon Marlow at 2002-07-03T16:01:08+00:00 [haddock @ 2002-07-03 16:01:07 by simonmar] Handle import specs properly, include 'hiding'. Haddock now has a complete implementation of the Haskell module system (more or less; I won't claim it's 100% correct). - - - - - 9a9aa1a8 by Simon Marlow at 2002-07-03T16:18:16+00:00 [haddock @ 2002-07-03 16:18:16 by simonmar] Update - - - - - 560c3026 by Simon Marlow at 2002-07-04T14:56:10+00:00 [haddock @ 2002-07-04 14:56:10 by simonmar] Clean up the code that constructs the exported declarations, and fix a couple of bugs along the way. Now if you import a class hiding one of the methods, then re-export the class, the version in the documentation will correctly have the appropriate method removed. - - - - - 2c26e77d by Simon Marlow at 2002-07-04T15:26:13+00:00 [haddock @ 2002-07-04 15:26:13 by simonmar] More bugfixes to the export handling - - - - - 03e0710d by Simon Marlow at 2002-07-09T10:12:10+00:00 [haddock @ 2002-07-09 10:12:10 by simonmar] Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base). - - - - - 44f3891a by Simon Marlow at 2002-07-09T10:12:51+00:00 [haddock @ 2002-07-09 10:12:51 by simonmar] commented-out debugging code - - - - - 97280873 by Krasimir Angelov at 2002-07-09T16:33:33+00:00 [haddock @ 2002-07-09 16:33:31 by krasimir] 'Microsoft HTML Help' support - - - - - 3dc04655 by Simon Marlow at 2002-07-10T09:40:56+00:00 [haddock @ 2002-07-10 09:40:56 by simonmar] Fix for rendering of the (->) type constructor, from Ross Paterson. - - - - - c9f149c6 by Simon Marlow at 2002-07-10T10:26:11+00:00 [haddock @ 2002-07-10 10:26:11 by simonmar] Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help). - - - - - e8acc1e6 by Simon Marlow at 2002-07-10T10:57:10+00:00 [haddock @ 2002-07-10 10:57:10 by simonmar] Document all the new options since 0.3 - - - - - 8bb85544 by Simon Marlow at 2002-07-10T10:58:31+00:00 [haddock @ 2002-07-10 10:58:31 by simonmar] Sort the options a bit - - - - - abc0dd59 by Simon Marlow at 2002-07-15T09:19:38+00:00 [haddock @ 2002-07-15 09:19:38 by simonmar] Fix a bug in mkExportItems when processing a module without an explicit export list. We were placing one copy of a declaration for each binder in the declaration, which for a data type would mean one copy of the whole declaration per constructor or record selector. - - - - - dde65bb9 by Simon Marlow at 2002-07-15T09:54:16+00:00 [haddock @ 2002-07-15 09:54:16 by simonmar] merge rev. 1.35 - - - - - bd7eb8c4 by Simon Marlow at 2002-07-15T10:14:31+00:00 [haddock @ 2002-07-15 10:14:30 by simonmar] Be a bit more liberal in the kind of commenting styles we allow, as suggested by Malcolm Wallace. Mostly this consists of allowing doc comments either side of a separator token. In an export list, a section heading is now allowed before the comma, as well as after it. eg. module M where ( T(..) -- * a section heading , f -- * another section heading , g ) In record fields, doc comments are allowed anywhere (previously a doc-next was allowed only after the comma, and a doc-before was allowed only before the comma). eg. data R = C { -- | describes 'f' f :: Int -- | describes 'g' , g :: Int } - - - - - 8f6dfe34 by Simon Marlow at 2002-07-15T10:21:56+00:00 [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. - - - - - fc515bb7 by Simon Marlow at 2002-07-15T16:16:50+00:00 [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). - - - - - 80a97e74 by Simon Marlow at 2002-07-19T09:13:10+00:00 [haddock @ 2002-07-19 09:13:10 by simonmar] Allow special id's ([], (), etc.) to be used in an import declaration. - - - - - a69d7378 by Simon Marlow at 2002-07-19T09:59:02+00:00 [haddock @ 2002-07-19 09:59:02 by simonmar] Allow special id's ([], (), etc.) to be used in an import declarations. - - - - - d205fa60 by Simon Marlow at 2002-07-19T10:00:16+00:00 [haddock @ 2002-07-19 10:00:16 by simonmar] Relax the restrictions which require doc comments to be followed by semi colons - in some cases this isn't necessary. Now you can write module M where { -- | some doc class C where {} } without needing to put a semicolon before the class declaration. - - - - - e9301e14 by Simon Marlow at 2002-07-23T08:24:09+00:00 [haddock @ 2002-07-23 08:24:09 by simonmar] A new TODO list item - - - - - e5d77586 by Simon Marlow at 2002-07-23T08:40:56+00:00 [haddock @ 2002-07-23 08:40:56 by simonmar] - update the acknowledgements - remove the paragraph that described how to use explicit layout with doc comments; it isn't relevant any more. - - - - - 78a94137 by Simon Marlow at 2002-07-23T08:43:02+00:00 [haddock @ 2002-07-23 08:43:02 by simonmar] more tests - - - - - 5c320927 by Simon Marlow at 2002-07-23T08:43:26+00:00 [haddock @ 2002-07-23 08:43:26 by simonmar] Updates for version 0.4 - - - - - 488e99ae by Simon Marlow at 2002-07-23T09:10:46+00:00 [haddock @ 2002-07-23 09:10:46 by simonmar] Fix the %changelog (rpm complained that it wasn't in the right order) - - - - - a77bb373 by Simon Marlow at 2002-07-23T09:12:38+00:00 [haddock @ 2002-07-23 09:12:38 by simonmar] Another item for the TODO list - - - - - f1ec1813 by Simon Marlow at 2002-07-23T10:18:46+00:00 [haddock @ 2002-07-23 10:18:46 by simonmar] Add a version banner when invoked with -v - - - - - 1d44cadf by Simon Marlow at 2002-07-24T09:28:19+00:00 [haddock @ 2002-07-24 09:28:19 by simonmar] Remove ^Ms - - - - - 4d8d5e94 by Simon Marlow at 2002-07-24T09:42:18+00:00 [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. - - - - - d6edc43e by Simon Marlow at 2002-07-25T14:37:29+00:00 [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. - - - - - b34d18fa by Simon Marlow at 2002-08-02T09:08:22+00:00 [haddock @ 2002-08-02 09:08:22 by simonmar] The <TT> and <PRE> environments seem to use a font that is a little too small in IE. Compensate. (suggestion from Daan Leijen). - - - - - 8106b086 by Simon Marlow at 2002-08-02T09:25:23+00:00 [haddock @ 2002-08-02 09:25:20 by simonmar] Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen). - - - - - c1acff8f by Simon Marlow at 2002-08-05T09:03:49+00:00 [haddock @ 2002-08-05 09:03:49 by simonmar] update - - - - - f968661c by Simon Marlow at 2002-11-11T09:32:57+00:00 [haddock @ 2002-11-11 09:32:57 by simonmar] Fix cut-n-pasto - - - - - 12d02619 by Simon Marlow at 2002-11-13T09:49:46+00:00 [haddock @ 2002-11-13 09:49:46 by simonmar] Small bugfix in the --read-interface option parsing from Brett Letner. - - - - - 30e32d5e by Ross Paterson at 2003-01-16T15:07:57+00:00 [haddock @ 2003-01-16 15:07:57 by ross] Adjust for the new exception libraries (as well as the old ones). - - - - - 871f65df by Sven Panne at 2003-02-20T21:31:40+00:00 [haddock @ 2003-02-20 21:31:40 by panne] * Add varsyms and consyms to index * Exclude empty entries from index - - - - - bc42cc87 by Sven Panne at 2003-02-24T21:26:29+00:00 [haddock @ 2003-02-24 21:26:29 by panne] Don't convert a "newtype" to a single-constructor "data" for non-abstractly exported types, they are quite different regarding strictness/pattern matching. Now a "data" without any constructors is only emitted for an abstractly exported type, regardless if it is actually a "newtype" or a "data". - - - - - 0c2a1d99 by Sven Panne at 2003-03-08T19:02:38+00:00 [haddock @ 2003-03-08 19:02:38 by panne] Fixed some broken/redirected/canonicalized links found by a very picky link checker. - - - - - 25459269 by Sven Panne at 2003-03-09T21:13:43+00:00 [haddock @ 2003-03-09 21:13:43 by panne] Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor. - - - - - 6be4db86 by Sven Panne at 2003-03-10T21:34:25+00:00 [haddock @ 2003-03-10 21:34:24 by panne] Escape fragments. This fixes e.g. links to operators. - - - - - eb12972c by Ross Paterson at 2003-04-25T10:50:06+00:00 [haddock @ 2003-04-25 10:50:05 by ross] An 80% solution to generating derived instances. A complete solution would duplicate the instance inference logic, but if a type variable occurs as a constructor argument, then we can just propagate the derived class to the variable. But we know nothing of the constraints on any type variables that occur elsewhere. For example, the declarations data Either a b = Left a | Right b deriving (Eq, Ord) data Ptr a = Ptr Addr# deriving (Eq, Ord) newtype IORef a = IORef (STRef RealWorld a) deriving Eq yield the instances (Eq a, Eq b) => Eq (Either a b) (Ord a, Ord b) => Ord (Either a b) Eq (Ptr a) Ord (Ptr a) (??? a) => Eq (IORef a) The last example shows the limits of this local analysis. Note that a type variable may be in both categories: then we know a constraint, but there may be more, or a stronger constraint, e.g. data Tree a = Node a [Tree a] deriving Eq yields (Eq a, ??? a) => Eq (Tree a) - - - - - de886f78 by Simon Marlow at 2003-04-25T11:17:55+00:00 [haddock @ 2003-04-25 11:17:55 by simonmar] Some updates, including moving the derived instance item down to the bottom of the list now that Ross has contributed some code that does the job for common cases. - - - - - 1b52cffd by Simon Marlow at 2003-04-30T14:02:32+00:00 [haddock @ 2003-04-30 14:02:32 by simonmar] When installing on Windows, run cygpath over $(HADDOCKLIB) so that haddock (a mingw program, built by GHC) can understand it. You still need to be in a cygwin environment to run Haddock, because of the shell script wrapper. - - - - - d4f638de by Simon Marlow at 2003-05-06T10:04:47+00:00 [haddock @ 2003-05-06 10:04:47 by simonmar] Catch another case of a paragraph containing just a DocMonospaced that should turn into a DocCodeBlock. - - - - - 4162b2b9 by Simon Marlow at 2003-05-06T10:11:44+00:00 [haddock @ 2003-05-06 10:11:44 by simonmar] Add some more code-block tests. - - - - - 4f5802c8 by Simon Marlow at 2003-05-06T10:14:52+00:00 [haddock @ 2003-05-06 10:14:52 by simonmar] Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code. - - - - - ef8c45f7 by Simon Marlow at 2003-05-21T15:07:21+00:00 [haddock @ 2003-05-21 15:07:21 by simonmar] Only omit the module contents when there are no section headings at all. - - - - - bcee1e75 by Sigbjorn Finne at 2003-05-30T16:50:45+00:00 [haddock @ 2003-05-30 16:50:45 by sof] cygpath: for now, steer clear of --mixed - - - - - 30567af3 by Sigbjorn Finne at 2003-05-30T17:59:28+00:00 [haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit - - - - - b0856e7d by Simon Marlow at 2003-06-03T09:55:26+00:00 [haddock @ 2003-06-03 09:55:26 by simonmar] Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems. - - - - - 70e137ea by Simon Marlow at 2003-07-28T13:30:35+00:00 [haddock @ 2003-07-28 13:30:35 by simonmar] Add tests for a couple of bugs. - - - - - 122bd578 by Simon Marlow at 2003-07-28T13:31:25+00:00 [haddock @ 2003-07-28 13:31:25 by simonmar] Add documentation for anchors. - - - - - 0bd27cb2 by Simon Marlow at 2003-07-28T13:31:46+00:00 [haddock @ 2003-07-28 13:31:46 by simonmar] Update - - - - - 08052d42 by Simon Marlow at 2003-07-28T13:32:12+00:00 [haddock @ 2003-07-28 13:32:12 by simonmar] layout tweak. - - - - - 13942749 by Simon Marlow at 2003-07-28T13:33:03+00:00 [haddock @ 2003-07-28 13:33:03 by simonmar] Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively). - - - - - d7f493b9 by Simon Marlow at 2003-07-28T13:35:17+00:00 [haddock @ 2003-07-28 13:35:16 by simonmar] When a module A exports another module's contents via 'module B', then modules which import entities from B re-exported by A should link to B.foo rather than A.foo. See examples/Bug2.hs. - - - - - d94cf705 by Simon Marlow at 2003-07-28T13:36:14+00:00 [haddock @ 2003-07-28 13:36:14 by simonmar] Update to version 0.5 - - - - - dbb776cd by Sven Panne at 2003-07-28T14:02:43+00:00 [haddock @ 2003-07-28 14:02:43 by panne] * Updated to version 0.5 * Automagically generate configure if it is not there - - - - - 6cfeee53 by Simon Marlow at 2003-07-28T14:32:43+00:00 [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 - - - - - a1ce838f by Simon Marlow at 2003-07-28T14:33:37+00:00 [haddock @ 2003-07-28 14:33:37 by simonmar] Update for 0.5 - - - - - c0fe6493 by Simon Marlow at 2003-07-28T14:53:22+00:00 [haddock @ 2003-07-28 14:53:22 by simonmar] Markup fix - - - - - 6ea31596 by Sven Panne at 2003-07-28T16:40:45+00:00 [haddock @ 2003-07-28 16:40:45 by panne] Make it compile with GHC >= 6.01 - - - - - afcd30fc by Simon Marlow at 2003-07-30T15:04:52+00:00 [haddock @ 2003-07-30 15:04:52 by simonmar] Pay attention to import specs when building the the import env, as well as the orig env. This may fix some wrong links in documentation when import specs are being used. - - - - - 17c3137f by Simon Marlow at 2003-07-30T16:05:41+00:00 [haddock @ 2003-07-30 16:05:40 by simonmar] Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup. - - - - - 3d3b5c87 by Sven Panne at 2003-08-04T10:18:24+00:00 [haddock @ 2003-08-04 10:18:24 by panne] Don't print parentheses around one-element contexts - - - - - 9e3f3f2d by Simon Marlow at 2003-08-04T12:59:47+00:00 [haddock @ 2003-08-04 12:59:47 by simonmar] A couple of TODOs. - - - - - e9d8085c by Simon Marlow at 2003-08-05T14:10:31+00:00 [haddock @ 2003-08-05 14:10:31 by simonmar] I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it. - - - - - ff5c7d6d by Simon Marlow at 2003-08-15T14:42:59+00:00 [haddock @ 2003-08-15 14:42:59 by simonmar] Convert the lexer to Alex, and fix a bug in the process. - - - - - 1aa077bf by Simon Marlow at 2003-08-15T15:00:18+00:00 [haddock @ 2003-08-15 15:00:18 by simonmar] Update - - - - - d3de1e38 by Simon Marlow at 2003-08-15T15:01:03+00:00 [haddock @ 2003-08-15 15:01:03 by simonmar] wibbles - - - - - b40ece3b by Simon Marlow at 2003-08-18T10:04:47+00:00 [haddock @ 2003-08-18 10:04:47 by simonmar] Lex the 'mdo' keyword as 'do'. - - - - - 8f9a1146 by Simon Marlow at 2003-08-18T11:48:24+00:00 [haddock @ 2003-08-18 11:48:24 by simonmar] Two bugs from Sven. - - - - - ea54ebc0 by Simon Marlow at 2003-08-18T11:48:46+00:00 [haddock @ 2003-08-18 11:48:46 by simonmar] Fixes to the new lexer. - - - - - d5f6a4b5 by Simon Marlow at 2003-08-19T09:09:03+00:00 [haddock @ 2003-08-19 09:09:03 by simonmar] Further wibbles to the syntax. - - - - - 6bbdadb7 by Sven Panne at 2003-08-26T18:45:35+00:00 [haddock @ 2003-08-26 18:45:35 by panne] Use autoreconf instead of autoconf - - - - - 32e889cb by Sven Panne at 2003-08-26T19:01:19+00:00 [haddock @ 2003-08-26 19:01:18 by panne] Made option handling a bit more consistent with other tools, in particular: Every program in fptools should output * version info on stdout and terminate successfully when -V or --version * usage info on stdout and terminate successfully when -? or --help * usage info on stderr and terminate unsuccessfully when an unknown option is given. - - - - - 5d156a91 by Sven Panne at 2003-08-26T19:20:55+00:00 [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag - - - - - e6577265 by Sven Panne at 2003-08-27T07:50:03+00:00 [haddock @ 2003-08-27 07:50:02 by panne] * Made -D a short option for --dump-interface. * Made -m a short option for --ms-help. * Made -n a short option for --no-implicit-prelude. * Made -c a short option for --css. * Removed DocBook options from executable (they didn't do anything), but mark them as reserved in the docs. Note that the short option for DocBook output is now -S (from SGML) instead of -d. The latter is now a short option for --debug. * The order of the Options in the documentation now matches the order printed by Haddock itself. Note: Although changing the names of options is often a bad idea, I'd really like to make the options for the programs in fptools more consistent and compatible to the ones used in common GNU programs. - - - - - d303ff98 by Simon Marlow at 2003-09-10T08:23:48+00:00 [haddock @ 2003-09-10 08:23:48 by simonmar] Add doc subdir. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 9a70e46a by Simon Marlow at 2003-09-10T08:24:32+00:00 [haddock @ 2003-09-10 08:24:32 by simonmar] Install these files in $(datadir), not $(libdir), since they're architecture independent. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - bbb87e7a by Simon Marlow at 2003-09-10T08:25:31+00:00 [haddock @ 2003-09-10 08:25:31 by simonmar] Haddock's supplementary HTML bits now live in $(datadir), not $(libdir). Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 3587c24b by Simon Marlow at 2003-09-22T10:34:38+00:00 [haddock @ 2003-09-22 10:34:38 by simonmar] Allow installing of docs. - - - - - d510b517 by Sven Panne at 2003-10-11T08:10:44+00:00 [haddock @ 2003-10-11 08:10:44 by panne] Include architecture-independent files in file list - - - - - 187d7618 by Sigbjorn Finne at 2003-10-20T17:19:24+00:00 [haddock @ 2003-10-20 17:19:22 by sof] support for i-parameters + zip comprehensions - - - - - b6c7a273 by Simon Marlow at 2003-11-03T14:24:24+00:00 [haddock @ 2003-11-03 14:24:24 by simonmar] Update TODO file. - - - - - 58513e33 by Simon Marlow at 2003-11-05T11:22:04+00:00 [haddock @ 2003-11-05 11:22:04 by simonmar] Remove the last of the uses of 'trace' to emit warnings, and tidy up a couple of places where duplicate warnings were being emitted. - - - - - 33a78846 by Simon Marlow at 2003-11-05T11:30:53+00:00 [haddock @ 2003-11-05 11:30:52 by simonmar] - Suppress warnings about unknown imported modules by default. - Add a -v/--verbose flag to re-enable these warnings. The general idea is to suppress the "Warning: unknown module: Prelude" warnings which most Haddock users will see every time, and which aren't terribly useful. - - - - - a969de7f by Simon Marlow at 2003-11-05T12:30:28+00:00 [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. - - - - - f14ea82a by Simon Marlow at 2003-11-05T15:15:59+00:00 [haddock @ 2003-11-05 15:15:59 by simonmar] Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this. - - - - - 01a25ca6 by Simon Marlow at 2003-11-05T15:16:38+00:00 [haddock @ 2003-11-05 15:16:38 by simonmar] Update - - - - - 1a7ccb86 by Simon Marlow at 2003-11-05T17:16:05+00:00 [haddock @ 2003-11-05 17:16:04 by simonmar] Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up. - - - - - a2bca16d by Simon Marlow at 2003-11-06T10:44:52+00:00 [haddock @ 2003-11-06 10:44:52 by simonmar] Include iface_reexported in the .haddock file. This unfortunately bloats the file (40% for base). If this gets to be a problem we can always apply the dictionary trick that GHC uses for squashing .hi files. - - - - - 0a09c293 by Simon Marlow at 2003-11-06T12:39:47+00:00 [haddock @ 2003-11-06 12:39:46 by simonmar] - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo at . -- -- [@bar@] The description of @bar at . Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added. - - - - - fe1b3460 by Simon Marlow at 2003-11-06T14:47:36+00:00 [haddock @ 2003-11-06 14:47:36 by simonmar] Remove the 'Parent' button - it is of dubious use, and often points into thin air. - - - - - db6d762f by Simon Marlow at 2003-11-06T16:48:14+00:00 [haddock @ 2003-11-06 16:48:11 by simonmar] - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page. - - - - - 7d71718b by Simon Marlow at 2003-11-06T16:50:28+00:00 [haddock @ 2003-11-06 16:50:28 by simonmar] Add -k/--package docs - - - - - ef43949d by Simon Marlow at 2003-11-06T16:51:23+00:00 [haddock @ 2003-11-06 16:51:23 by simonmar] Bump to 0.6 - - - - - 1c419e06 by Simon Marlow at 2003-11-06T16:51:50+00:00 [haddock @ 2003-11-06 16:51:50 by simonmar] update - - - - - 69422327 by Simon Marlow at 2003-11-10T14:41:06+00:00 [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. - - - - - 3c3fc433 by Simon Marlow at 2003-11-10T14:51:59+00:00 [haddock @ 2003-11-10 14:51:59 by simonmar] Fix for getReExports: take into account names which are not visible because they are re-exported from a different package. - - - - - 31c8437b by Simon Marlow at 2003-11-10T15:10:53+00:00 [haddock @ 2003-11-10 15:10:53 by simonmar] Version 0.6 changes - - - - - a7c2430b by Simon Marlow at 2003-11-10T15:15:58+00:00 [haddock @ 2003-11-10 15:15:58 by simonmar] getReExports: one error case that isn't - - - - - 00cc459c by Simon Marlow at 2003-11-10T16:15:19+00:00 [haddock @ 2003-11-10 16:15:18 by simonmar] copyright update - - - - - ca62408d by Simon Marlow at 2003-11-11T09:57:25+00:00 [haddock @ 2003-11-11 09:57:25 by simonmar] Version 0.6 - - - - - 3acbf818 by Simon Marlow at 2003-11-11T12:10:44+00:00 [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. - - - - - 6c90abc2 by Simon Marlow at 2003-11-12T10:03:39+00:00 [haddock @ 2003-11-12 10:03:39 by simonmar] 2002 -> 2003 - - - - - 090bbc4c by Simon Marlow at 2003-11-28T12:08:00+00:00 [haddock @ 2003-11-28 12:08:00 by simonmar] update - - - - - 8096a832 by Simon Marlow at 2003-11-28T12:09:58+00:00 [haddock @ 2003-11-28 12:09:58 by simonmar] Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it. - - - - - 35294929 by Sven Panne at 2003-12-29T17:16:31+00:00 [haddock @ 2003-12-29 17:16:31 by panne] Updated my email address - - - - - cdb697bf by Simon Marlow at 2004-01-08T10:14:24+00:00 [haddock @ 2004-01-08 10:14:24 by simonmar] Add instructions for using GHC to pre-process source for feeding to Haddock. - - - - - 8dfc491f by Simon Marlow at 2004-01-09T12:45:46+00:00 [haddock @ 2004-01-09 12:45:46 by simonmar] Add -optP-P to example ghc command line. - - - - - ac41b820 by Simon Marlow at 2004-02-03T11:02:03+00:00 [haddock @ 2004-02-03 11:02:03 by simonmar] Fix bug in index generation - - - - - f4e7edcb by Simon Marlow at 2004-02-10T11:51:16+00:00 [haddock @ 2004-02-10 11:51:16 by simonmar] Don't throw away whitespace at the beginning of a line (experimental fix). - - - - - 68e212d2 by Simon Marlow at 2004-02-10T12:10:08+00:00 [haddock @ 2004-02-10 12:10:08 by simonmar] Fix for previous commit: I now realise why the whitespace was stripped from the beginning of the line. Work around it. - - - - - e7d7f2df by Sven Panne at 2004-02-10T18:38:45+00:00 [haddock @ 2004-02-10 18:38:45 by panne] Make Haddock link with the latest relocated monad transformer package - - - - - 992d4225 by Simon Marlow at 2004-02-16T10:21:35+00:00 [haddock @ 2004-02-16 10:21:35 by simonmar] Add a TODO - - - - - 1ac55326 by Simon Marlow at 2004-03-12T11:33:39+00:00 [haddock @ 2004-03-12 11:33:39 by simonmar] Add an item. - - - - - 0478e903 by Simon Marlow at 2004-03-15T12:24:05+00:00 [haddock @ 2004-03-15 12:24:05 by simonmar] Add an item. - - - - - 6f26d21a by Simon Marlow at 2004-03-18T14:21:29+00:00 [haddock @ 2004-03-18 14:21:29 by simonmar] Fix URL - - - - - 19b6bb99 by Simon Marlow at 2004-03-22T14:09:03+00:00 [haddock @ 2004-03-22 14:09:03 by simonmar] getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me). - - - - - 5c756031 by Simon Marlow at 2004-03-24T09:42:11+00:00 [haddock @ 2004-03-24 09:42:10 by simonmar] hiding bug from Ross Paterson (fixed in rev 1.59 of Main.hs) - - - - - 1b692e6c by Simon Marlow at 2004-03-24T10:10:50+00:00 [haddock @ 2004-03-24 10:10:50 by simonmar] mkExportItems fix & simplification: we should be looking at the actual exported names (calculated earlier) to figure out which subordinates of a declaration are exported. This means that if you export a record, and name its fields separately in the export list, the fields will still be visible in the documentation for the constructor. - - - - - 90e5e294 by Simon Marlow at 2004-03-24T10:12:08+00:00 [haddock @ 2004-03-24 10:12:08 by simonmar] Make restrictCons take into account record field names too (removing a ToDo). - - - - - 2600efa4 by Simon Marlow at 2004-03-24T10:16:17+00:00 [haddock @ 2004-03-24 10:16:17 by simonmar] Record export tests. - - - - - 6a8575c7 by Simon Marlow at 2004-03-25T09:35:14+00:00 [haddock @ 2004-03-25 09:35:14 by simonmar] restrictTo: fix for restricting a newtype with a record field. - - - - - dcf55a8d by Simon Marlow at 2004-03-25T10:01:42+00:00 [haddock @ 2004-03-25 10:01:42 by simonmar] Fix duplicate instance bug - - - - - f49aa758 by Simon Marlow at 2004-03-25T10:02:41+00:00 [haddock @ 2004-03-25 10:02:41 by simonmar] Duplicate instance bug. - - - - - 7b87344c by Simon Marlow at 2004-03-25T10:29:56+00:00 [haddock @ 2004-03-25 10:29:56 by simonmar] If a name is imported from two places, one hidden and one not, choose the unhidden one to link to. Also, when there's only a hidden module to link to, don't try linking to it. - - - - - 40f44d7b by Simon Marlow at 2004-03-25T15:17:24+00:00 [haddock @ 2004-03-25 15:17:23 by simonmar] Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment. - - - - - 9b64dc0f by Simon Marlow at 2004-03-25T15:20:55+00:00 [haddock @ 2004-03-25 15:20:55 by simonmar] Update - - - - - c2fff7f2 by Simon Marlow at 2004-03-25T15:45:10+00:00 [haddock @ 2004-03-25 15:45:10 by simonmar] Eliminate some unnecessary spaces in the HTML rendering - - - - - b7948ff0 by Simon Marlow at 2004-03-25T16:00:37+00:00 [haddock @ 2004-03-25 16:00:36 by simonmar] Remove all that indentation in the generated HTML to keep the file sizes down. - - - - - da2bb4ca by Sven Panne at 2004-03-27T09:57:58+00:00 [haddock @ 2004-03-27 09:57:57 by panne] Added the new-born haddock.js to the build process and the documentation. - - - - - b99e6f8c by Sven Panne at 2004-03-27T10:32:20+00:00 [haddock @ 2004-03-27 10:32:20 by panne] "type" is a required attribute of the "script" element - - - - - 562b185a by Sven Panne at 2004-03-27T12:52:34+00:00 [haddock @ 2004-03-27 12:52:34 by panne] Add a doctype for the contents page, too. - - - - - f6a99c2d by Simon Marlow at 2004-04-14T10:03:25+00:00 [haddock @ 2004-04-14 10:03:25 by simonmar] fix for single-line comment syntax - - - - - de366303 by Simon Marlow at 2004-04-20T13:08:04+00:00 [haddock @ 2004-04-20 13:08:04 by simonmar] Allow a 'type' declaration to include documentation comments. These will be ignored by Haddock, but at least one user (Johannes Waldmann) finds this feature useful, and it's easy to add. - - - - - fd78f51e by Simon Marlow at 2004-05-07T15:14:56+00:00 [haddock @ 2004-05-07 15:14:56 by simonmar] - update copyright - add version to abstract - - - - - 59f53e32 by Sven Panne at 2004-05-09T14:39:53+00:00 [haddock @ 2004-05-09 14:39:53 by panne] Fix the fix for single-line comment syntax, ------------------------------------------- is now a valid comment line again. - - - - - 8b18f2fe by Simon Marlow at 2004-05-10T10:11:51+00:00 [haddock @ 2004-05-10 10:11:51 by simonmar] Update - - - - - 225a491d by Ross Paterson at 2004-05-19T13:10:23+00:00 [haddock @ 2004-05-19 13:10:23 by ross] Make the handling of "deriving" slightly smarter, by ignoring data constructor arguments that are identical to the lhs. Now handles things like data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ... - - - - - 37588686 by Mike Thomas at 2004-05-21T06:38:14+00:00 [haddock @ 2004-05-21 06:38:14 by mthomas] Windows exe extensions (bin remains for Unix). - - - - - cf2b9152 by Simon Marlow at 2004-05-25T09:34:54+00:00 [haddock @ 2004-05-25 09:34:54 by simonmar] Add some TODO items - - - - - 4d29cdfc by Simon Marlow at 2004-05-25T10:41:46+00:00 [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. - - - - - 2e0771e0 by Mike Thomas at 2004-05-28T20:17:55+00:00 [haddock @ 2004-05-28 20:17:55 by mthomas] Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg. - - - - - 8d10bde1 by Sven Panne at 2004-06-05T16:53:34+00:00 [haddock @ 2004-06-05 16:53:34 by panne] Misc. rpm spec file cleanup, including: * make BuildRoot handling more consistent * added default file attributes * consistent defines and tags - - - - - 59974349 by Sven Panne at 2004-06-05T18:01:00+00:00 [haddock @ 2004-06-05 18:01:00 by panne] More rpm spec file cleanup, including: * added some BuildRequires * changed packager to me, so people can complain at the right place :-] * consistently refer to haskell.org instead of www.haskell.org - - - - - b94d4903 by Simon Marlow at 2004-07-01T11:08:58+00:00 [haddock @ 2004-07-01 11:08:57 by simonmar] Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead. - - - - - d5278f67 by Sven Panne at 2004-07-04T15:15:55+00:00 [haddock @ 2004-07-04 15:15:55 by panne] Install pictures for +/- pictures, too (JPEG is a strange format for graphics like this, I would have expected GIF or PNG here.) Things look fine with Konqueror and Netscape on Linux now, the only downside is that the cursor doesn't change when positioned above the "button". - - - - - 46dec6c5 by Sven Panne at 2004-07-13T17:59:28+00:00 [haddock @ 2004-07-13 17:59:28 by panne] A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there. - - - - - 1d7bc432 by Simon Marlow at 2004-07-22T08:54:06+00:00 [haddock @ 2004-07-22 08:54:06 by simonmar] Add single quote to $ident, so you can say eg. 'foldl'' to refer to foldl' (the longest match rule is our friend). Bug reported by Adrian Hey <ahey at iee.org> - - - - - f183618b by Krasimir Angelov at 2004-07-27T22:59:35+00:00 [haddock @ 2004-07-27 22:58:23 by krasimir] Add basic support for Microsoft HTML Help 2.0 - - - - - d515d0c2 by Krasimir Angelov at 2004-07-27T23:02:36+00:00 [haddock @ 2004-07-27 23:02:36 by krasimir] escape names in the index - - - - - a5f1be23 by Krasimir Angelov at 2004-07-27T23:05:21+00:00 [haddock @ 2004-07-27 23:05:21 by krasimir] Add jsFile, plusFile and minusFile to the file list - - - - - c4fb4881 by Krasimir Angelov at 2004-07-28T22:12:10+00:00 [haddock @ 2004-07-28 22:12:09 by krasimir] bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs - - - - - 64d30b1d by Krasimir Angelov at 2004-07-30T22:15:47+00:00 [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug - - - - - 133c8c5c by Krasimir Angelov at 2004-07-31T12:04:38+00:00 [haddock @ 2004-07-31 12:04:37 by krasimir] make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful. - - - - - 79040963 by Krasimir Angelov at 2004-07-31T13:10:20+00:00 [haddock @ 2004-07-31 13:10:20 by krasimir] Make DHtmlTree compatible with Mozila browser - - - - - 1a55dc90 by Krasimir Angelov at 2004-07-31T14:52:55+00:00 [haddock @ 2004-07-31 14:52:55 by krasimir] fix - - - - - 85ce0237 by Krasimir Angelov at 2004-07-31T14:53:28+00:00 [haddock @ 2004-07-31 14:53:28 by krasimir] HtmlHelp 1.x - - - - - 3c0c53ba by Krasimir Angelov at 2004-07-31T20:35:21+00:00 [haddock @ 2004-07-31 20:35:21 by krasimir] Added support for DevHelp - - - - - d42b5af1 by Krasimir Angelov at 2004-07-31T21:17:51+00:00 [haddock @ 2004-07-31 21:17:51 by krasimir] Document new features in HtmlHelp - - - - - 790fe21e by Krasimir Angelov at 2004-08-01T15:14:02+00:00 [haddock @ 2004-08-01 15:14:02 by krasimir] add missing imports - - - - - fd7cc6bc by Krasimir Angelov at 2004-08-01T19:52:08+00:00 [haddock @ 2004-08-01 19:52:06 by krasimir] fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format. - - - - - 94ad7ac8 by Krasimir Angelov at 2004-08-01T19:53:50+00:00 [haddock @ 2004-08-01 19:53:50 by krasimir] I forgot to add the new +/- images - - - - - f0c65388 by Krasimir Angelov at 2004-08-02T16:25:53+00:00 [haddock @ 2004-08-02 16:25:53 by krasimir] Add root node to the table of contents. All modules in tree are not children of the root - - - - - f50bd85d by Sven Panne at 2004-08-02T18:17:46+00:00 [haddock @ 2004-08-02 18:17:46 by panne] Mainly DocBook fixes - - - - - 09527ce3 by Sven Panne at 2004-08-02T20:02:29+00:00 [haddock @ 2004-08-02 20:02:29 by panne] Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays... - - - - - c8fbacfa by Sven Panne at 2004-08-02T20:31:13+00:00 [haddock @ 2004-08-02 20:31:13 by panne] Warning police - - - - - 37830bff by Sven Panne at 2004-08-02T20:32:29+00:00 [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code - - - - - 13847171 by Sven Panne at 2004-08-02T21:12:27+00:00 [haddock @ 2004-08-02 21:12:25 by panne] Use pathJoin instead of low-level list-based manipulation for FilePaths - - - - - c711d61e by Sven Panne at 2004-08-02T21:16:02+00:00 [haddock @ 2004-08-02 21:16:02 by panne] Removed WinDoze CRs - - - - - b1f7dc88 by Sven Panne at 2004-08-03T19:35:59+00:00 [haddock @ 2004-08-03 19:35:59 by panne] Fixed spelling of "http-equiv" attribute - - - - - dd5f394e by Sven Panne at 2004-08-03T19:44:03+00:00 [haddock @ 2004-08-03 19:44:03 by panne] Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before) - - - - - 919c47c6 by Sigbjorn Finne at 2004-08-03T19:45:11+00:00 [haddock @ 2004-08-03 19:45:11 by sof] make it compile with <= ghc-6.1 - - - - - 4d6f01d8 by Sigbjorn Finne at 2004-08-03T19:45:30+00:00 [haddock @ 2004-08-03 19:45:30 by sof] ffi wibble - - - - - 4770643a by Sven Panne at 2004-08-03T20:47:46+00:00 [haddock @ 2004-08-03 20:47:46 by panne] Fixed CSS for button style. Note that only "0" is a valid measure without a unit! - - - - - 14aaf2e5 by Sven Panne at 2004-08-03T21:07:59+00:00 [haddock @ 2004-08-03 21:07:58 by panne] Improved spacing of dynamic module tree - - - - - 97c3579a by Simon Marlow at 2004-08-09T11:03:04+00:00 [haddock @ 2004-08-09 11:03:04 by simonmar] Add FormatVersion Patch submitted by: George Russell <ger at informatik.uni-bremen.de> - - - - - af7f8c03 by Simon Marlow at 2004-08-09T11:55:07+00:00 [haddock @ 2004-08-09 11:55:05 by simonmar] Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger at informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header. - - - - - 7b865ad3 by Simon Marlow at 2004-08-10T14:09:57+00:00 [haddock @ 2004-08-10 14:09:57 by simonmar] Fixes for DevHelp/HtmlHelp following introduction of short module description. - - - - - 814766cd by Simon Marlow at 2004-08-10T14:33:46+00:00 [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. - - - - - 39cf9ede by Simon Marlow at 2004-08-12T12:08:23+00:00 [haddock @ 2004-08-12 12:08:23 by simonmar] Avoid using string-gap tricks. - - - - - b6d78551 by Simon Marlow at 2004-08-13T10:53:21+00:00 [haddock @ 2004-08-13 10:53:21 by simonmar] Update - - - - - eaae7417 by Simon Marlow at 2004-08-13T10:53:50+00:00 [haddock @ 2004-08-13 10:53:50 by simonmar] Test for primes in quoted links - - - - - 68c34f06 by Sven Panne at 2004-08-16T19:59:38+00:00 [haddock @ 2004-08-16 19:59:36 by panne] XMLification - - - - - 7f45a6f9 by Sven Panne at 2004-08-18T16:42:54+00:00 [haddock @ 2004-08-18 16:42:54 by panne] Re-added indices + minor fixes - - - - - 8a5dd97c by Sigbjorn Finne at 2004-08-25T17:15:42+00:00 [haddock @ 2004-08-25 17:15:42 by sof] backquote HADDOCK_VERSION defn for <= ghc-6.0.x; believe this is only needed under mingw - - - - - 4b1b42ea by Sven Panne at 2004-08-26T20:08:50+00:00 [haddock @ 2004-08-26 20:08:49 by panne] SGML is dead, long live DocBook XML! Note: The BuildRequires tags in the spec files are still incomplete and the documentation about the DocBook tools needs to be updated, too. Stay tuned... - - - - - 8d52cedb by Sven Panne at 2004-08-26T21:03:19+00:00 [haddock @ 2004-08-26 21:03:19 by panne] Updated BuildRequires tags. Alas, there seems to be no real standard here, so your mileage may vary... At least the current specs should work on SuSE Linux. - - - - - e6982912 by Sigbjorn Finne at 2004-08-30T15:44:59+00:00 [haddock @ 2004-08-30 15:44:59 by sof] escape HADDOCK_VERSION double quotes on all platforms when compiling with <=6.0.x - - - - - b3fbc867 by Simon Marlow at 2004-08-31T13:09:42+00:00 [haddock @ 2004-08-31 13:09:42 by simonmar] Avoid GHC/shell versionitis and create Version.hs - - - - - c359e16a by Sven Panne at 2004-09-05T19:12:33+00:00 [haddock @ 2004-09-05 19:12:32 by panne] * HTML documentation for "foo.xml" goes into directory "foo" again, not "foo-html". This is nicer and consistent with the behaviour for building the docs from SGML. * Disabled building PostScript documentation in the spec files for now, there are some strange issues with the FO->PS conversion for some files which have to be clarified first. - - - - - c68b1eba by Sven Panne at 2004-09-24T07:04:38+00:00 [haddock @ 2004-09-24 07:04:38 by panne] Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable. - - - - - dfb32615 by Simon Marlow at 2004-09-30T08:21:29+00:00 [haddock @ 2004-09-30 08:21:29 by simonmar] Add a feature request - - - - - 45ff783c by Sven Panne at 2004-10-23T19:54:00+00:00 [haddock @ 2004-10-23 19:54:00 by panne] Improved the Cygwin/MinGW chaos a little bit. There is still confusion about host platform vs. target platform... - - - - - 5f644714 by Krasimir Angelov at 2004-10-28T16:01:51+00:00 [haddock @ 2004-10-28 16:01:51 by krasimir] update for ghc-6.3+ - - - - - 92d9753e by Sven Panne at 2004-11-01T16:39:01+00:00 [haddock @ 2004-11-01 16:39:01 by panne] Revert previous commit: It's Network.URI which should be changed, not Haddock. - - - - - 05f70f6e by Simon Marlow at 2005-01-04T16:15:51+00:00 [haddock @ 2005-01-04 16:15:51 by simonmar] parser fix: allow qualified specialids. - - - - - 47870837 by Simon Marlow at 2005-01-04T16:16:54+00:00 [haddock @ 2005-01-04 16:16:54 by simonmar] Add a test - - - - - ff11fc2c by Ross Paterson at 2005-01-10T19:18:22+00:00 [haddock @ 2005-01-10 19:18:22 by ross] Render non-ASCII characters using numeric character references, to simplify charset issues. There's a META tag saying the charset is UTF-8, but GHC outputs characters as raw bytes. Ideally we need an encoding on the input side too, primarily in comments, because source files containing non-ASCII characters aren't portable between locales. - - - - - eba2fc4e by Simon Marlow at 2005-01-11T10:44:37+00:00 [haddock @ 2005-01-11 10:44:37 by simonmar] Remove string gap - - - - - b899a381 by Ross Paterson at 2005-01-13T11:41:33+00:00 [haddock @ 2005-01-13 11:41:33 by ross] recognize SGML-style numeric character references &#ddd; or &#xhhhh; and translate them into Chars. - - - - - 106e3cf0 by Ross Paterson at 2005-01-13T14:43:41+00:00 [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) - - - - - e8f54f25 by Ross Paterson at 2005-01-13T14:44:24+00:00 [haddock @ 2005-01-13 14:44:24 by ross] Describe numeric character references. - - - - - 914ccdce by Sven Panne at 2005-01-15T18:44:48+00:00 [haddock @ 2005-01-15 18:44:45 by panne] Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later. - - - - - 6ab20e84 by Sven Panne at 2005-01-16T12:18:26+00:00 [haddock @ 2005-01-16 12:18:26 by panne] Trim imports - - - - - efb81da9 by Sven Panne at 2005-01-16T12:58:08+00:00 [haddock @ 2005-01-16 12:58:03 by panne] Correctly handle the new order of arguments for the combining function given to fromListWith. - - - - - e27b5834 by Sven Panne at 2005-01-16T14:14:41+00:00 [haddock @ 2005-01-16 14:14:39 by panne] Data.Map.unions is left-biased. - - - - - dae3cc3e by Sven Panne at 2005-01-16T14:22:44+00:00 [haddock @ 2005-01-16 14:22:44 by panne] Added the last missing "flip" to get identical HTML output as previous versions. - - - - - 951d8408 by Sven Panne at 2005-01-16T14:37:10+00:00 [haddock @ 2005-01-16 14:37:10 by panne] Refactored Text.PrettyPrint legacy hell into a separate module. - - - - - f1c4b892 by Sven Panne at 2005-01-16T15:41:25+00:00 [haddock @ 2005-01-16 15:41:21 by panne] Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway. - - - - - 60824c6e by Simon Marlow at 2005-01-18T10:02:48+00:00 [haddock @ 2005-01-18 10:02:48 by simonmar] Add a TODO - - - - - a8c82f23 by Krasimir Angelov at 2005-01-28T23:19:39+00:00 [haddock @ 2005-01-28 23:19:39 by krasimir] import Foreign/Foreign.C are required for Windows - - - - - d8450a23 by Simon Marlow at 2005-02-02T16:23:04+00:00 [haddock @ 2005-02-02 16:23:00 by simonmar] Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning. - - - - - 1cce71d0 by Simon Marlow at 2005-02-03T13:42:19+00:00 [haddock @ 2005-02-03 13:42:19 by simonmar] - add --ignore-all-exports flag, which behaves as if every module has the ignore-exports attribute (requested by Chris Ryder). - add --hide option to hide a module on the command line. - add --use-package option to get Haddock info for a package from ghc-pkg (largely untested). - remove reexports from the .haddock file, they aren't used any more. - - - - - 767123ef by Ross Paterson at 2005-02-03T16:17:37+00:00 [haddock @ 2005-02-03 16:17:37 by ross] fix typo for < 6.3 - - - - - 0c680c04 by Simon Marlow at 2005-02-04T12:03:31+00:00 [haddock @ 2005-02-04 12:03:31 by simonmar] Fix bug in renameExportItems that meant links in instances weren't being renamed properly. - - - - - ff7abe5f by Simon Marlow at 2005-02-04T12:15:53+00:00 [haddock @ 2005-02-04 12:15:52 by simonmar] Add attribute #not-home, to indicate that the current module should not be considered to be a home module for the each entity it exports, unless there is no other module that exports the entity. - - - - - fc2cfd27 by Simon Marlow at 2005-02-04T12:40:02+00:00 [haddock @ 2005-02-04 12:40:02 by simonmar] Update the documentation w.r.t. home modules and the not-home attribute. - - - - - 26b8ddf7 by Ross Paterson at 2005-02-04T13:36:06+00:00 [haddock @ 2005-02-04 13:36:05 by ross] sort lists of instances by - arity of the type constructors (so higher-kinded instances come first) - name of the class - argument types - - - - - 26bfb19c by Simon Marlow at 2005-02-23T15:57:12+00:00 [haddock @ 2005-02-23 15:57:12 by simonmar] Fix documentation regarding the module attributes. - - - - - 9c3afd02 by Simon Marlow at 2005-02-28T16:18:17+00:00 [haddock @ 2005-02-28 16:18:17 by simonmar] version 0.7 - - - - - a95fd63f by Simon Marlow at 2005-02-28T16:22:08+00:00 [haddock @ 2005-02-28 16:22:08 by simonmar] Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results. - - - - - 905d42f7 by Simon Marlow at 2005-03-01T17:16:42+00:00 [haddock @ 2005-03-01 17:16:40 by simonmar] Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case). - - - - - a0e1d178 by Wolfgang Thaller at 2005-03-09T08:28:39+00:00 [haddock @ 2005-03-09 08:28:39 by wolfgang] Hack haddock's lexer to accept the output from Apple's broken version of cpp (Apple's cpp leaves #pragma set_debug_pwd directives in it's output). - - - - - 9e1eb784 by Simon Marlow at 2005-04-22T14:27:15+00:00 [haddock @ 2005-04-22 14:27:15 by simonmar] Add a TODO item - - - - - 23281f78 by Ross Paterson at 2005-05-18T12:41:59+00:00 [haddock @ 2005-05-18 12:41:59 by ross] fix 3 bugs in --use-package, and document it. - - - - - 00074a68 by Sven Panne at 2005-05-21T12:35:29+00:00 [haddock @ 2005-05-21 12:35:29 by panne] Warning/versionitis police - - - - - 341fa822 by Simon Marlow at 2005-06-15T15:43:21+00:00 [haddock @ 2005-06-15 15:43:21 by simonmar] Allow "licence" as an alternate spelling of "license" - - - - - 3b953f8b by Simon Marlow at 2005-06-16T08:14:12+00:00 [haddock @ 2005-06-16 08:14:12 by simonmar] wibble - - - - - abfd9826 by Simon Marlow at 2005-06-27T14:46:40+00:00 [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The old way confused Apache because the extensions are sometimes interpreted as having special meanings. - - - - - a01eea00 by Simon Marlow at 2005-08-04T13:59:40+00:00 [haddock @ 2005-08-04 13:59:40 by simonmar] 0.7 changes - - - - - 170ef87e by Simon Marlow at 2005-08-04T15:08:03+00:00 [haddock @ 2005-08-04 15:08:03 by simonmar] spec file from Jens Peterson - - - - - 7621fde4 by Simon Marlow at 2005-08-04T15:59:30+00:00 [haddock @ 2005-08-04 15:59:30 by simonmar] replace mingw tests with $(Windows) - - - - - a20739bb by Sven Panne at 2005-08-05T07:01:12+00:00 [haddock @ 2005-08-05 07:01:12 by panne] Reverted to previous version (but with bumped version number), the last commit broke RPM building on SuSE systems due to differently named dependencies. As a clarification: All .spec files in the repository have to work at least on SuSE, because that's the system I'm using. And as "Mr. Building Police", I reserve me the right to keep them that way... >:-) It might very well be the case that we need different .spec files for different platforms, so packagers which are unhappy with the current .spec files should contact me, stating the actual problems. - - - - - 4afb15cf by Simon Marlow at 2005-10-05T10:51:45+00:00 [haddock @ 2005-10-05 10:51:45 by simonmar] Add a bug - - - - - 60f69f82 by Simon Marlow at 2005-10-05T12:52:03+00:00 [haddock @ 2005-10-05 12:52:03 by simonmar] Document new behaviour of -s option - - - - - f7e520ca by Simon Marlow at 2005-10-10T15:02:55+00:00 [haddock @ 2005-10-10 15:02:55 by simonmar] extractRecSel: ignore non-record constructors (fixes a crash when using datatypes with a mixture of record and non-record style constructors). - - - - - b2edbedb by Simon Marlow at 2005-10-14T09:44:21+00:00 Start CHANGES for 0.8 - - - - - 21c7ac8d by Simon Marlow at 2005-10-14T23:11:19+00:00 First cut of Cabal build system - - - - - 766cecdd by Simon Marlow at 2005-10-29T08:14:43+00:00 Add configure script and Makefile for the docs Add a separate configure script and build system for building the documentation. The configure and Makefile code is stolen from fptools. This is left as a separate build system so that the main Cabal setup doesn't require a Unix build environment or DocBook XML tools. - - - - - aa36c783 by Duncan Coutts at 2006-01-17T19:29:55+00:00 Add a --wiki=URL flag to add a per-module link to a correspondng wiki page. So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option. - - - - - e06e2da2 by Simon Marlow at 2006-01-18T09:28:15+00:00 TODO: documnet --wiki - - - - - 17adfda9 by Duncan Coutts at 2006-01-19T20:17:59+00:00 Add an optional wiki link for each top level exported name. In each module, for each "top level" exported entity we add a hyper link to a corresponding wiki page. The link url gets the name of the exported entity as a '#'-style anchor, so if there is an anchor in the page with that name then the users browser should jump directly to it. By "top level" we mean functions, classes, class members and data types (data, type, newtype), but not data constructors, class instances or data type class membership. The link is added at the right of the page and in a small font. Hopefully this is the right balance of visibility/distraction. We also include a link to the wiki base url in the contents and index pages. - - - - - f52324bb by Duncan Coutts at 2006-01-19T20:28:27+00:00 Rewrite pathJoin to only add a path separator when necessary. When the path ends in a file seperator there is no need to add another. Now using "--wiki=http://blah.com/foo/" should do the right thing. (Code snippet adapted from Isaac's FilePath package.) - - - - - 43bb89fa by Duncan Coutts at 2006-01-21T17:15:27+00:00 Teach haddock about line pragmas and add accurate source code links Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's source location tracking to include the file name as well as line/column. This way each AST item that is tagged with a SrcLoc gets the original file name too. Use this original file name to add source links to each exported item, in the same visual style as the wiki links. Note that the per-export source links are to the defining module rather than whichever module haddock pretends it is exported from. This is what we want for source code links. The source code link URL can also contain the name of the export so one could implement jumping to the actual location of the function in the file if it were linked to an html version of the source rather than just plain text. The name can be selected with the %N wild card. So for linking to the raw source code one might use: --source=http://darcs/haskell.org/foo/%F Or for linking to html syntax highlighted code: --source=http://darcs/haskell.org/foo/%M.html#%N - - - - - edd9f229 by Duncan Coutts at 2006-01-22T00:02:00+00:00 Extend URL variable expansion syntax and add source links to the contents page Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module. - - - - - eb3c6ada by Duncan Coutts at 2006-01-23T13:42:34+00:00 Remove the complex substitutions and add more command line flags instead. Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now use three seperate command line flags for the top level, per-module and per-entity source and wiki links. They are: --source-base, --source-module, --source-entity --comments-base, --comments-module, --comments-entity We leave -s, --source as an alias for --source-module which is how that option behaved previously. The long forms of the substitutions are still available, ${FILE} ${MODULE} etc and the only non-trivial substitution is ${MODULE/./c} to replace the '.' characters in the module name with any other character c. eg ${MODULE/./-} Seperating the source and wiki url flags has the added bonus that they can be turned on or off individually. So users can have per-module links for example without having to also have per-entity links.` - - - - - a2f0f2af by Duncan Coutts at 2006-01-23T13:54:52+00:00 Make the --help output fit in 80 columns. This is a purely cosmetic patch, feel free to ignore it. The only trickery going on is that we don't display the deprecated -s, --source flags in the help message, but we do still accept them. - - - - - 2d3a4b0c by Duncan Coutts at 2006-01-23T14:12:16+00:00 Add documentation for the new --source-* and --comments-* command line options - - - - - 1a82a297 by Simon Marlow at 2006-01-23T17:03:27+00:00 fix markup - - - - - 100d464a by Duncan Coutts at 2006-01-23T18:31:13+00:00 remove a couple TODO items that have been done The --wiki, or rather the --comment-* options are now documented. There is probably no need to have haddock invoke unlit or cpp itself since it can now pick up the line pragmas to get the source locations right. Tools like Cabal will arrange for preprocessors to be run so there is less of a need for tools like haddock to do it themselves. - - - - - 3162fa91 by Simon Marlow at 2006-01-24T14:21:56+00:00 add a test I had lying around - - - - - 98947063 by Simon Marlow at 2006-01-31T13:52:54+00:00 add scabal-version field - - - - - c41876e6 by Neil Mitchell at 2006-02-26T17:48:21+00:00 Add Hoogle output option - - - - - f86fb9c0 by Simon Marlow at 2006-03-08T09:15:20+00:00 add haskell.vim Contributed by Brad Bowman <bsb at bereft.net>, thanks! - - - - - 35d3c511 by benjamin.franksen at 2006-03-03T22:39:54+00:00 fixed libdir (/html was missing) - - - - - 4d08fd7d by Simon Marlow at 2006-03-10T11:13:31+00:00 add PatternGuards extension - - - - - 3f095e70 by Simon Marlow at 2006-03-13T11:40:42+00:00 bug fixes from Brad Bowman - - - - - 8610849d by Sven Panne at 2006-03-19T17:02:56+00:00 Fixed Cabal/RPM build - - - - - 34a994d6 by sven.panne at 2006-04-20T12:39:23+00:00 Avoid pattern guards Due to the use of pattern guards in Haddock, GHC was called with -fglasgow-exts. This in turn enables bang patterns, too, which broke the Haddock build. Removing some unnecessary pattern guards seemed to be the better way of fixing this instead of using a pragma to disable pattern guards. - - - - - bb523f51 by Ross Paterson at 2006-04-24T09:03:25+00:00 extend 'deriving' heuristic a little If an argument of a data constructor has a type variable head, it is irreducible and the same type class can be copied into the constraint. (Formerly we just did this for type variable arguments.) - - - - - dab9fe7a by Simon Marlow at 2006-04-26T10:02:31+00:00 record an idea - - - - - 748b7078 by Simon Marlow at 2006-05-08T08:28:53+00:00 add section about deriving - - - - - 11252ea1 by Simon Marlow at 2006-05-24T15:43:10+00:00 replace a fatal error in lexChar with a parseError - - - - - 382c9411 by Simon Marlow at 2006-05-24T15:45:47+00:00 add a bug - - - - - b79272f5 by Simon Marlow at 2006-05-24T15:46:29+00:00 add a bug report - - - - - 912edf65 by David Waern at 2006-07-10T19:09:23+00:00 Initial modifications -- doesn't compile - - - - - a3c7ba99 by David Waern at 2006-07-11T00:54:19+00:00 More porting work -- doesn't compile - - - - - 0a173d19 by David Waern at 2006-07-11T11:30:03+00:00 Make the repos temporarily compile and illustrate a problem - - - - - bad316de by David Waern at 2006-07-11T15:43:47+00:00 Progress on the porting process - - - - - bbf12d02 by David Waern at 2006-07-11T23:07:44+00:00 More progress on the porting -- first pass starting to shape up - - - - - de580ba2 by David Waern at 2006-07-20T17:48:30+00:00 More progress -- still on phase1 - - - - - 75a917a2 by David Waern at 2006-07-23T18:22:43+00:00 More work on pass1 -- mostly done - - - - - 6697b3f7 by David Waern at 2006-07-23T22:17:40+00:00 More work, started working on the renaming phase -- this code will need a cleanup soon :) - - - - - 82a5bcbb by David Waern at 2006-07-29T16:16:43+00:00 Add instances, build renaming environment, start on the renamer - - - - - c3f8f4f1 by David Waern at 2006-07-29T21:37:48+00:00 Complete the renamer - - - - - 7e00d464 by David Waern at 2006-07-30T21:01:57+00:00 Start porting the Html renderer - - - - - f04ce121 by David Waern at 2006-08-09T20:04:56+00:00 More Html rendering progress - - - - - 20c21b53 by David Waern at 2006-08-10T17:37:47+00:00 More progress - - - - - d7097e0d by David Waern at 2006-08-11T20:31:51+00:00 Cleanup - - - - - a7351e86 by David Waern at 2006-08-12T11:44:47+00:00 Render H98 Data declarations - - - - - 3fb2208e by David Waern at 2006-08-12T17:15:34+00:00 Perfect rendering of Test.hs - - - - - 454fd062 by David Waern at 2006-08-13T21:57:08+00:00 Misc fixes and interface load/save - - - - - 7ef7e7be by David Waern at 2006-08-14T00:56:07+00:00 Some refactoring - - - - - a7d3efef by David Waern at 2006-08-19T20:07:55+00:00 Adapt to latest GHC - - - - - 5fc3c0d7 by David Waern at 2006-08-20T21:28:11+00:00 Move interface read/write to its own module + some cleanup - - - - - 037e011c by David Waern at 2006-08-20T21:38:24+00:00 Small cleanup - - - - - da3a1023 by David Waern at 2006-09-03T16:05:22+00:00 Change mode to BatchCompile to avoid GHC API bug - - - - - 3cc9be3b by David Waern at 2006-09-03T16:06:59+00:00 Starting work on GADT rendering - - - - - 94506037 by David Waern at 2006-09-03T20:02:48+00:00 Compensate for change of export list order in GHC - - - - - c2cec4eb by David Waern at 2006-09-04T20:53:01+00:00 Rename a function - - - - - 9a9735ba by David Waern at 2006-09-05T15:51:21+00:00 Change version number to 2.0 - - - - - 3758a714 by David Waern at 2006-09-05T15:51:49+00:00 Align comment properly - - - - - 68478d9e by David Waern at 2006-09-15T18:03:00+00:00 Remove interface reading/writing code and use the GHC api for creating package environments instead - - - - - d2eedd95 by David Waern at 2006-09-15T18:05:29+00:00 Change the executable name to haddock-ghc-nolib - - - - - fcfbcf66 by David Waern at 2006-09-15T18:05:45+00:00 Small source code cleanup - - - - - d08eb017 by David Waern at 2006-09-15T18:06:21+00:00 Remove handling of --package flag - - - - - b8a4cf53 by David Waern at 2006-09-15T18:07:16+00:00 Remove commented-out code - - - - - bef0a684 by David Waern at 2006-09-15T18:37:57+00:00 Don't warn about missing links to () - - - - - e7d25fd7 by David Waern at 2006-09-15T19:50:49+00:00 Remove Interface and Binary2 modules - - - - - 9894f2a1 by David Waern at 2006-09-15T19:53:43+00:00 Remove debug printing from HaddockHtml - - - - - a0e7455d by David Waern at 2006-09-16T00:16:29+00:00 Comments only - - - - - d5b26fa7 by David Waern at 2006-09-16T00:16:57+00:00 Refactor PackageData creation code and start on building the doc env propery (unfinished) - - - - - 06aaa779 by David Waern at 2006-09-16T00:19:25+00:00 Better comments in Main.hs - - - - - 1a52d1b4 by David Waern at 2006-09-18T22:17:11+00:00 Comments and spacing change - - - - - e5a97767 by David Waern at 2006-09-21T17:02:45+00:00 Remove unnecessary fmapM import in Main - - - - - 9d0f9d3a by David Waern at 2006-09-22T18:07:07+00:00 Make import list in HaddockHtml prettier - - - - - 3452f662 by David Waern at 2006-09-22T18:08:47+00:00 Refactor context rendering - - - - - 12d0a6d0 by David Waern at 2006-09-22T18:09:52+00:00 Do proper HsType rendering (inser parentheses correctly) - - - - - 2c20c2f9 by David Waern at 2006-09-22T18:10:45+00:00 Fix a bug in Main.toHsType - - - - - c5396443 by David Waern at 2006-09-22T18:11:16+00:00 Skip external package modules sort for now - - - - - 3fb95547 by David Waern at 2006-09-22T20:35:40+00:00 Take away trailin "2" on all previously clashing type names - - - - - 2174755f by David Waern at 2006-09-22T20:51:43+00:00 Remove unused imports in Main - - - - - 1e9f7a39 by David Waern at 2006-09-22T20:52:11+00:00 Fix a comment in Main - - - - - 32d9e028 by David Waern at 2006-10-05T16:40:11+00:00 Merge with changes to ghc HEAD - - - - - 3058c8f5 by David Waern at 2006-10-05T16:41:02+00:00 Comment fixes - - - - - b9c217ec by David Waern at 2006-10-05T16:49:59+00:00 Filter out more builtin type constructors from warning messages - - - - - 67e7d252 by David Waern at 2006-10-05T19:38:22+00:00 Refactoring -- better structured pass1 - - - - - cd21c0c1 by David Waern at 2006-10-05T19:44:42+00:00 Remove read/dump interface flags - - - - - 313f9e69 by David Waern at 2006-10-05T19:49:26+00:00 Remove unused pretty printing - - - - - 480f09d1 by David Waern at 2006-12-28T13:22:24+00:00 Update to build with latest GHC HEAD - - - - - 63dccfcb by David Waern at 2007-01-05T01:38:45+00:00 Fixed a bug so that --ghc-flag works correctly - - - - - 3117dadc by David Waern at 2006-12-29T18:53:39+00:00 Automatically get the GHC lib dir - - - - - 9dc84a5c by David Waern at 2006-12-29T19:58:53+00:00 Comments - - - - - 0b0237cc by David Waern at 2007-01-05T16:48:30+00:00 Collect docs based on SrcLoc, syncing with removal of DeclEntity from GHC - - - - - a962c256 by David Waern at 2007-01-05T17:02:47+00:00 Add tabs in haddock.cabal - - - - - 0ca30c97 by David Waern at 2007-01-05T17:04:11+00:00 Add GHCUtils.hs - - - - - c0ab9abe by David Waern at 2007-01-10T11:43:08+00:00 Change package name to haddock-ghc, version 0.1 - - - - - 38e18b27 by David Waern at 2007-01-12T12:03:52+00:00 No binder name for foreign exports - - - - - d18587ab by David Waern at 2007-01-12T12:08:15+00:00 Temp record - - - - - ba6251a0 by David Waern at 2007-01-12T18:27:55+00:00 Remove read/dump-interface (again) - - - - - f4ba2b39 by David Waern at 2007-01-12T18:31:36+00:00 Remove DocOption, use the GHC type - - - - - 511be8bd by David Waern at 2007-01-12T18:32:41+00:00 Use exceptions instead of Either when loading package info - - - - - 0f2144d8 by David Waern at 2007-01-12T18:33:23+00:00 Small type change - - - - - 77507eb7 by David Waern at 2007-01-12T18:33:59+00:00 Remove interface file read/write - - - - - 0ea1e14f by David Waern at 2007-01-17T21:40:26+00:00 Add trace_ppr to GHCUtils - - - - - 3878b493 by David Waern at 2007-01-17T21:40:53+00:00 Sort external package modules and build a doc env - - - - - 8dc323fc by David Waern at 2007-01-17T21:42:41+00:00 Remove comment - - - - - f4c5b097 by David Waern at 2007-01-18T23:22:18+00:00 Add haddock-ghc.cabal and remove ghc option pragma in source file - - - - - da242b2c by David Waern at 2007-01-18T23:22:46+00:00 Remove some tabs - - - - - 288ed096 by David Waern at 2007-01-18T23:39:28+00:00 Moved the defaultErrorHandler to scope only over sortAndCheckModules for now - - - - - 4dd150fe by David Waern at 2007-02-03T21:23:56+00:00 Let restrictCons handle infix constructors - - - - - 97893442 by David Waern at 2007-02-04T16:26:00+00:00 Render infix data constructors - - - - - da89db72 by David Waern at 2007-02-04T16:26:33+00:00 CHange project name to Haddock-GHC - - - - - e93d48af by David Waern at 2007-02-04T16:59:08+00:00 Render infix type constructors properly - - - - - 357bc99b by David Waern at 2007-02-04T17:37:08+00:00 Insert spaces around infix function names - - - - - ab6cfc49 by David Waern at 2007-02-04T17:59:54+00:00 Do not list entities without documentation - - - - - 04249c7e by David Waern at 2007-02-04T19:16:25+00:00 Add GADT support (quite untested) - - - - - 2c223f8d by David Waern at 2007-02-04T19:25:10+00:00 Add package file write/save again! - - - - - b07ed218 by David Waern at 2007-02-04T19:33:02+00:00 Comment out minf_iface based stuff - - - - - 953d1fa7 by David Waern at 2007-02-05T00:12:23+00:00 Solve conflicts - - - - - 593247fc by David Waern at 2007-02-06T19:48:48+00:00 Remove -package flag, GHC's can be used instead - - - - - f658ded2 by David Waern at 2007-02-06T20:50:44+00:00 Start for support of ATs - - - - - 97f9e913 by David Waern at 2007-02-06T20:52:27+00:00 Wibble - - - - - 2ce8e4cf by David Waern at 2007-02-16T12:09:49+00:00 Add the DocOptions change - - - - - dee4a9b5 by David Waern at 2007-03-06T01:24:48+00:00 Wibble - - - - - 7cb99d18 by David Waern at 2007-03-06T01:24:58+00:00 Change version to 2.0 and executable name to haddock - - - - - c5aa02bc by David Waern at 2007-03-08T15:59:49+00:00 Go back to -B flag - - - - - 3a349201 by David Waern at 2007-03-09T13:31:59+00:00 Better exception handling and parsing of GHC flags - - - - - 05a69b71 by David Waern at 2007-03-09T17:45:44+00:00 Remove commented-out DocEntity printing - - - - - 755032cb by davve at dtek.chalmers.se at 2007-03-23T23:30:20+00:00 Remove a file that shouldn't be here - - - - - a7077e5f by davve at dtek.chalmers.se at 2007-03-24T03:58:48+00:00 Remove an import - - - - - 6f55aa8b by davve at dtek.chalmers.se at 2007-03-25T00:46:48+00:00 Start work on Haddock API - - - - - f0199480 by davve at dtek.chalmers.se at 2007-03-25T00:56:36+00:00 Prettify some comments - - - - - f952f9d1 by davve at dtek.chalmers.se at 2007-03-25T00:56:53+00:00 Remove ppr in HaddockTypes - - - - - bc594904 by davve at dtek.chalmers.se at 2007-03-25T00:57:53+00:00 Remove commented out doc env inference - - - - - 11ebf08d by davve at dtek.chalmers.se at 2007-03-25T01:23:25+00:00 De-flatten the namespace - - - - - f696b4bc by davve at dtek.chalmers.se at 2007-03-25T03:21:48+00:00 Add missing stuff to API - - - - - 9a2a04c3 by davve at dtek.chalmers.se at 2007-03-25T03:22:02+00:00 Wibble - - - - - 7d04a6d5 by davve at dtek.chalmers.se at 2007-03-25T03:22:08+00:00 Avoid a GHC bug with parseStaticFlags [] - - - - - 4d2820ba by davve at dtek.chalmers.se at 2007-03-26T04:57:01+00:00 Add fall-through case to mkExportItem - - - - - 6ebc8950 by Stefan O'Rear at 2007-03-26T04:14:53+00:00 Add shebang line to Setup.lhs - - - - - 80966ec5 by davve at dtek.chalmers.se at 2007-03-26T05:24:26+00:00 Fix stupid compile error - - - - - 1ea1385d by davve at dtek.chalmers.se at 2007-04-05T17:19:56+00:00 Do save/read of interface files properly - - - - - 0e4f6541 by David Waern at 2007-04-10T21:08:36+00:00 Add version to ghc dependency - - - - - b0499b63 by David Waern at 2007-04-10T21:37:08+00:00 Change package name to haddock - - - - - 9d50d27e by David Waern at 2007-04-24T00:22:14+00:00 Use filepath package instead of FilePath - - - - - 87c7fcdf by David Waern at 2007-07-10T21:03:04+00:00 Add new package dependencies - - - - - 4768709c by David Waern at 2007-07-11T20:37:11+00:00 Follow changes to record constructor representation - - - - - b9a02fee by Simon Marlow at 2007-05-30T14:00:48+00:00 update to compile with the latest GHC & Cabal - - - - - c0ebdc01 by David Waern at 2007-07-11T21:35:45+00:00 Fix conflicts - - - - - 97f7afd4 by David Waern at 2007-07-11T21:52:38+00:00 Follow changes to the GHC API - - - - - a5b7b58f by David Waern at 2007-07-12T20:36:48+00:00 Call parseStaticFlags before newSession - - - - - f7f50dbc by David Waern at 2007-08-01T21:52:58+00:00 Better indentation in haddock.cabal - - - - - d84e52ad by David Waern at 2007-08-02T00:08:18+00:00 Wibble - - - - - a23f494a by David Waern at 2007-08-02T00:08:24+00:00 Be better at trying to load all module dependencies (debugging) - - - - - ee917f13 by David Waern at 2007-08-03T18:48:08+00:00 Load all targets explicitly (checkModule doesn't chase dependencies anymore) - - - - - 5182d631 by David Waern at 2007-08-16T16:48:55+00:00 Finalize support for links to other packages - - - - - dfd1e3da by David Waern at 2007-08-16T16:51:11+00:00 Fix haddock comment errors in Haddock.Types - - - - - 50c0d83e by David Waern at 2007-08-16T16:51:37+00:00 Remove a debug import - - - - - d84b7c2b by David Waern at 2007-08-16T17:06:30+00:00 Rename PackageData to HaddockPackage - - - - - 3b52cb9f by David Waern at 2007-08-16T17:09:42+00:00 Simplify some comments - - - - - 66fa68d9 by David Waern at 2007-08-16T17:11:38+00:00 Comment the HaddockPackage definition - - - - - 8674c761 by David Waern at 2007-08-16T17:25:54+00:00 Improve code layout in Main - - - - - 571a3a0b by David Waern at 2007-08-16T17:32:13+00:00 Remove explict module imports in Main - - - - - d31b3cb0 by David Waern at 2007-08-16T17:36:23+00:00 Correct comments - - - - - 7f8a9f2b by David Waern at 2007-08-16T17:39:50+00:00 Fix layout problems in Haddock.Types - - - - - 9f421d7f by David Waern at 2007-08-17T11:16:48+00:00 Move options out of Main into Haddock.Options - - - - - 80042b63 by David Waern at 2007-08-17T11:26:59+00:00 Small comment/layout fixes - - - - - b141b982 by David Waern at 2007-08-17T11:28:28+00:00 Change project name from Haddock-GHC to Haddock - - - - - dbeb4a81 by David Waern at 2007-08-17T11:41:05+00:00 Add top module comment to all files - - - - - ce99cc9e by David Waern at 2007-08-17T14:53:04+00:00 Factor out typechecking phase into Haddock.Typecheck - - - - - 6bf75d9e by David Waern at 2007-08-17T16:55:35+00:00 Factor out package code to Haddock.Packages - - - - - b396db37 by David Waern at 2007-08-29T22:40:23+00:00 Major refactoring - - - - - 3d4f95ee by David Waern at 2007-08-29T23:26:24+00:00 Rename HaddockModule to Interface and a few more refactorings - - - - - c55326db by David Waern at 2007-08-29T23:48:03+00:00 Some comment cleanup - - - - - 9a84fc46 by David Waern at 2007-08-29T23:49:29+00:00 Add some modules that I forgot to add earlier - - - - - 4536dce2 by David Waern at 2007-08-29T23:55:24+00:00 Wibble - - - - - 9b7f0206 by David Waern at 2007-08-30T16:03:29+00:00 Wibble - - - - - c52c050a by David Waern at 2007-08-30T16:30:37+00:00 Rename HaddockModule to Interface - - - - - eae2995f by David Waern at 2007-08-30T16:42:59+00:00 Simplify createInterfaces - - - - - 53f99caa by David Waern at 2007-09-29T00:04:31+00:00 Add build-type: Simple to the cabal file - - - - - 0d3103a8 by David Waern at 2007-09-29T00:04:58+00:00 Add containers and array dependency - - - - - 6acf5f30 by David Waern at 2007-09-29T00:13:36+00:00 Prettify the cabal file - - - - - 87c1e378 by David Waern at 2007-09-29T13:16:39+00:00 FIX: consym data headers with more than two variables - - - - - b67fc16a by David Waern at 2007-09-29T14:01:32+00:00 FIX: prefix types used as operators should be quoted - - - - - a8f925bc by David Waern at 2007-09-29T14:02:26+00:00 Use isSymOcc from OccName instead of isConSym - - - - - fc330701 by David Waern at 2007-09-29T14:15:37+00:00 Use isLexConSym/isLexVarSym from OccName - - - - - e4f3dbad by David Waern at 2007-09-29T15:01:08+00:00 FIX: do not quote varsym type operators - - - - - 402207d2 by David Waern at 2007-09-29T15:01:50+00:00 Wibble - - - - - f9d89ef0 by David Waern at 2007-09-29T15:17:40+00:00 Take care when pp tyvars - add parens on syms - - - - - 849e2a77 by David Waern at 2007-10-01T21:56:39+00:00 Go back to using a ModuleMap instead of LookupMod - fixes a bug - - - - - 549dbac6 by David Waern at 2007-10-02T01:05:19+00:00 Improve parsing of doc options - - - - - a36021b8 by David Waern at 2007-10-02T23:05:00+00:00 FIX: double arrows in constructor contexts - - - - - d03bf347 by David Waern at 2007-10-09T16:14:05+00:00 Add a simple test suite - - - - - c252c140 by David Waern at 2007-10-17T16:02:28+00:00 Add --optghc=.. style flag passing to GHC - - - - - cce6c1b3 by David Waern at 2007-10-18T22:03:20+00:00 Add support for --read-interface again - - - - - 33d059c0 by David Waern at 2007-10-18T22:30:18+00:00 Refactoring -- get rid of Haddock.Packages - - - - - f9ed0a4c by David Waern at 2007-10-18T22:34:36+00:00 Name changes - - - - - 8a1c816f by David Waern at 2007-10-20T14:24:23+00:00 Add --ghc-version option - - - - - 4925aaa1 by David Waern at 2007-10-21T14:34:26+00:00 Add some Outputable utils - - - - - 69e7e47f by David Waern at 2007-10-21T14:35:49+00:00 FIX: Ord for OrdName was not comparing modules - - - - - 5a4ae535 by David Waern at 2007-10-21T21:18:48+00:00 Wibble - - - - - 03d48e20 by David Waern at 2007-10-24T15:52:56+00:00 Remove Main from "other modules" - - - - - c66f6d82 by David Waern at 2007-10-24T16:37:18+00:00 Make it possible to run haddock on itself - - - - - 21d156d8 by David Waern at 2007-10-25T14:02:14+00:00 Don't set boot modules as targets - - - - - f8bcf91c by David Waern at 2007-10-31T22:11:17+00:00 Add optimisation flags - - - - - 7ac758f2 by David Waern at 2007-11-04T09:48:28+00:00 Go back to loading only targets (seems to work now) - - - - - 4862aae1 by David Waern at 2007-11-05T22:24:57+00:00 Do full compilation of modules -- temporary fix for GHC API problem - - - - - 697e1517 by David Waern at 2007-11-05T22:25:50+00:00 Don't warn about not being able to link to wired/system/builtin-names - - - - - 892186da by David Waern at 2007-11-06T00:49:21+00:00 Filter out instances with TyCons that are not exported - - - - - 9548314c by David Waern at 2007-11-06T09:37:14+00:00 Wibble - - - - - 5cafd627 by David Waern at 2007-11-08T01:43:07+00:00 Filter out all non-vanilla type sigs - - - - - 04621830 by David Waern at 2007-11-08T01:45:13+00:00 Synch loading of names from .haddock files with GHC's name cache - - - - - 88d37f77 by David Waern at 2007-11-08T01:46:21+00:00 Remove commented-out code - - - - - 6409c911 by David Waern at 2007-11-08T01:56:00+00:00 Small bugfix and cleanup in getDeclFromTyCls - - - - - af59d9c2 by David Waern at 2007-11-08T02:08:44+00:00 Remove OrdName stuff - - - - - 3a615e2e by David Waern at 2007-11-08T02:13:41+00:00 Update runtests.hs following changes to haddock - - - - - 01f3314e by David Waern at 2007-11-08T02:33:01+00:00 Complain if we can't link to wired-in names - - - - - fcafb5d1 by David Waern at 2007-11-09T02:40:16+00:00 Don't exit when there are no file arguments - - - - - 194bc332 by David Waern at 2007-11-09T02:55:37+00:00 Wibble - - - - - dbe4cb55 by David Waern at 2007-11-09T02:56:14+00:00 Wibble - - - - - 82869fda by David Waern at 2007-11-10T17:01:43+00:00 Introduce InstalledInterface structure and add more stuff to the .haddock files We introduce InstalledInterface capturing the part of Interface that is stored in the interface files. We change the ppHtmlContents and ppHtmllIndex to take this structure instead of a partial Interface. We add stuff like the doc map and exported names to the .haddock file (via InstalledInterface). - - - - - d6bb57bf by David Waern at 2007-11-10T17:19:48+00:00 FIX: contents and index should include external package modules when --gen-contents/--gen-index - - - - - e8814716 by David Waern at 2007-11-11T00:29:27+00:00 Remove lDocLinkName and its use in Html backend - - - - - 6f9bd702 by David Waern at 2007-11-11T00:50:57+00:00 Do some refactoring in the html backend This also merges an old patch by Augustsson: Wed Jul 12 19:54:36 CEST 2006 lennart.augustsson at credit-suisse.com * Print type definitions like signatures if given arrows. - - - - - 09d0ce24 by Malcolm.Wallace at 2006-07-20T13:13:57+00:00 mention HsColour in the docs, next to option flags for linking to source code - - - - - 24da6c34 by Malcolm.Wallace at 2006-07-20T13:14:50+00:00 change doc references to CVS to give darcs repository location instead - - - - - 74d52cd6 by David Waern at 2007-11-11T00:55:33+00:00 Update copyright - - - - - fcaa3b4f by Duncan Coutts at 2006-09-08T13:41:00+00:00 Eliminate dep on network by doing a little cut'n'paste haddock depending on the network causes a circular dependency at least if you want to build the network lib with haddock docs. - - - - - 10cc9bda by David Waern at 2007-11-11T02:09:41+00:00 Fix conflicts - - - - - 4e3acd39 by David Waern at 2007-11-11T02:21:19+00:00 Manual merge of a patch from Duncan Coutts that removes the dependency on mtl - - - - - fa9070da by Neil Mitchell at 2006-09-29T15:52:03+00:00 Do not generate an empty table if there are no exports, this fixes a <table></table> tag being generated, which is not valid HTML 4.01 - - - - - d7431c85 by David Waern at 2007-11-11T02:28:50+00:00 Fix conflicts - - - - - f87e8f98 by Simon Marlow at 2006-10-10T11:37:16+00:00 changes for 0.8 - - - - - db929565 by Simon Marlow at 2006-10-10T12:07:12+00:00 fix the name of the source file - - - - - 8220aa4b by Simon Marlow at 2006-10-11T14:17:37+00:00 Rename haddock.js to haddock-util.js haddock.js will be run automatically by Windows when you type 'haddock' if it is found on the PATH, so rename to avoid confusion. Spotted by Adrian Hey. - - - - - 6bccdaa1 by sven.panne at 2006-10-12T15:28:23+00:00 Cabal's sdist does not generate "-src.tar.gz" files, but ".tar.gz" ones - - - - - d3f3fc19 by Simon Marlow at 2006-12-06T16:05:07+00:00 add todo item for --maintainer - - - - - 2da7e269 by Simon Marlow at 2006-12-15T15:52:00+00:00 TODO: do something better about re-exported symbols from another package - - - - - 42d85549 by David Waern at 2007-11-11T02:30:59+00:00 Fix conflicts - - - - - 5e7ef6e5 by Neil Mitchell at 2007-01-11T15:41:15+00:00 Never do spliting index files into many - - - - - f3d4aebe by Neil Mitchell at 2007-01-11T17:07:09+00:00 Add searching on the index page - - - - - bad3ab66 by Neil Mitchell at 2007-01-11T18:17:46+00:00 Delete dead code, now there is only one index page - - - - - cd09eedb by Neil Mitchell at 2007-01-11T18:21:19+00:00 Delete more stuff that is no longer required - - - - - e2806646 by David Waern at 2007-11-11T02:41:53+00:00 Fix conflicts - - - - - a872a823 by Neil Mitchell at 2007-01-11T18:51:43+00:00 Make the index be in case-insensitive alphabetic order - - - - - 8bddd9d7 by Neil Mitchell at 2007-02-06T17:49:12+00:00 Do not create empty tables for data declarations which don't have any constructors, instances or comments. Gets better HTML 4.01 compliance - - - - - 036b8120 by David Waern at 2007-11-11T02:56:58+00:00 Fix conflicts - - - - - f50c1639 by Conal Elliott at 2007-02-14T21:54:00+00:00 added substitution %{FILE///c} - - - - - 402e166a by David Waern at 2007-11-11T03:35:46+00:00 Manual merge of old patch: Sat Apr 21 04:36:43 CEST 2007 Roberto Zunino <zunrob at users.sf.net> * URL expansion for %%, %L, %{LINE} - - - - - 2f264fbd by David Waern at 2007-11-11T03:40:33+00:00 Manual merge of an old patch: Thu Apr 19 20:23:40 CEST 2007 Wolfgang Jeltsch <g9ks157k at acme.softbase.org> * bug fix When Haddock was invoked with the --ignore-all-exports flag but the ignore-exports module attribute wasn't used, hyperlinks weren't created for non-exported names. This fix might not be as clean as one would wish (since --ignore-all-exports now results in ignore_all_exports = True *and* an additional OptIgnoreExports option for every module) but at least the bug seems to be resolved now. - - - - - 7d7ae106 by sven.panne at 2007-09-02T12:18:02+00:00 Install LICENSE in the correct place - - - - - 66eaa924 by David Waern at 2007-11-11T19:02:46+00:00 Fix a bug that made haddock loop - - - - - 4ed47b58 by David Waern at 2007-11-11T19:03:09+00:00 Rename java-script file (this wasn't merge correctly) - - - - - d569534a by David Waern at 2007-11-11T19:06:44+00:00 Don't require -B <ghc-libdir> when no argument files Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B <ghc-libdir> to Haddock when there're no source files to process. This is nice when computing contents/index for external packages. - - - - - 373368bc by Neil Mitchell at 2007-01-11T18:22:44+00:00 Change from tabs to spaces in the ppHtmlIndex function - - - - - 6b063a77 by Neil Mitchell at 2007-01-12T12:17:46+00:00 Rewrite much of the index searching code, previously was too slow to execute on the base library with IE, the new version guarantees less than O(log n) operations be performed, where n is the number in the list (before was always O(n)) - - - - - bfad00b7 by David Waern at 2007-11-11T23:33:53+00:00 Fix conflicts - - - - - cd2dcc09 by Neil Mitchell at 2007-01-12T12:25:01+00:00 Make the max number of results 75 instead of 50, to allow map searching in the base library to work - - - - - 3ae74764 by Neil Mitchell at 2007-01-12T12:58:17+00:00 Make the search box in a form so that enter does the default search - - - - - 142103e5 by David Waern at 2007-11-12T00:03:18+00:00 Merge patch from the old branch: Fri Aug 31 13:21:45 CEST 2007 Duncan Coutts <duncan at haskell.org> * Add category: Development to .cabal file Otherwise it appears on the hackage website in the "Unclassified" category. - - - - - 22ec2ddb by David Waern at 2007-11-25T01:55:29+00:00 A a list of small improvements to the TODO file - - - - - eb0129f4 by Wolfgang Jeltsch at 2007-12-03T23:47:55+00:00 addition of type equality support (at least for HTML generation) - - - - - 816a7e22 by David Waern at 2007-12-08T15:46:26+00:00 Handle class operators correctly when rendering predicates - - - - - 68baaad2 by David Waern at 2007-12-08T16:15:54+00:00 Code layout changes - - - - - 09b77fb4 by David Waern at 2007-12-08T16:16:03+00:00 Handle infix operators correctly in the Type -> HsType translation - - - - - 31c36da2 by David Waern at 2007-12-08T16:24:27+00:00 Add ppLParendTypes/ppLParendType - - - - - b17cc818 by David Waern at 2007-12-08T16:26:12+00:00 Use ppParendType when printing types args in predicates - - - - - ffd1f2cf by David Waern at 2007-12-08T16:45:06+00:00 Fix rendering of instance heads to handle infix operators This is also a refactoring to share this code for rendering predicates. - - - - - ff886d45 by David Waern at 2007-12-08T17:27:46+00:00 Fix rendering of class operators - - - - - e2fcbb9e by David Waern at 2007-12-08T17:59:28+00:00 Fix a bug (use ppTyName instead of ppName to print names in type apps) - - - - - 79a1056e by David Waern at 2007-12-08T21:25:18+00:00 Update tests - - - - - 867741ac by David Waern at 2007-12-08T21:25:49+00:00 Give a diff on test failure - - - - - 7e5eb274 by David Waern at 2008-01-05T14:33:45+00:00 Add DrIFT commands - - - - - 3656454d by David Waern at 2008-01-05T20:26:00+00:00 Add "cabal-version: >= 1.2" to the cabal file - - - - - 77974efc by Simon Marlow at 2007-12-20T09:52:44+00:00 add an item - - - - - f6ac1708 by Simon Marlow at 2007-12-06T14:00:10+00:00 Source links must point to the original module, not the referring module - - - - - eda1d5c9 by David Waern at 2008-01-06T14:40:52+00:00 Manual merge of a patch to the 0.8 branch Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar at microsoft.com> * Source links must point to the original module, not the referring module - - - - - 378f4085 by David Waern at 2008-01-06T16:03:45+00:00 Change stability from stable to experimental - - - - - 8bdafe44 by David Waern at 2008-01-06T16:14:22+00:00 Add haskell.vim (it had been removed somehow) - - - - - ea34d02e by David Waern at 2008-01-06T16:36:57+00:00 Change version to 2.0.0.0 - - - - - 34631ac0 by David Waern at 2008-01-06T16:44:57+00:00 Add missing modules to the cabal file - - - - - 9e142935 by David Waern at 2008-01-06T17:25:42+00:00 Depend on ghc >= 6.8.2 && < 6.9 - - - - - 59f9eeaa by Simon Marlow at 2007-12-20T10:43:04+00:00 add build scripts - - - - - 1c29ae30 by Simon Marlow at 2007-12-20T10:47:07+00:00 update version number - - - - - fe16a3e4 by Simon Marlow at 2007-12-20T10:48:03+00:00 update version - - - - - f688530f by Simon Marlow at 2007-12-20T10:48:29+00:00 doc updates - - - - - ce71b611 by David Waern at 2008-01-07T13:46:32+00:00 Change version in docs and spec - - - - - 03ab8d6f by David Waern at 2008-01-07T13:47:38+00:00 Manually merge over changes to CHANGES for 0.9 - - - - - 39f1b042 by David Waern at 2008-01-07T15:17:41+00:00 Remove the -use-package flag, we don't support it anyway - - - - - 7274a544 by David Waern at 2008-01-07T15:33:05+00:00 Update CHANGES for 2.0.0.0 - - - - - 96594f5d by David Waern at 2008-01-07T15:46:49+00:00 Wibble - - - - - f4c5a4c4 by David Waern at 2008-01-07T15:55:36+00:00 Change url to repo in documentation - - - - - 8a4c77f0 by David Waern at 2008-01-07T16:00:54+00:00 Update CHANGES - - - - - cb3a9288 by David Waern at 2008-01-07T16:02:55+00:00 Documentation fix - - - - - d8e45539 by David Waern at 2008-01-07T16:12:00+00:00 Update docs to say that Haddock accets .lhs files and module names - - - - - 4b5ce824 by David Waern at 2008-01-07T16:12:25+00:00 Document -B option - - - - - 47274262 by David Waern at 2008-01-07T16:23:07+00:00 Update CHANGES - - - - - 7ff314a9 by David Waern at 2008-01-07T16:23:20+00:00 Remove --use-package, --package & --no-implicit.. flags from docs - - - - - 6c3819c0 by David Waern at 2008-01-07T16:23:52+00:00 Remove --no-implicit-prelide flag - - - - - 1b14ae40 by David Waern at 2008-01-07T16:32:26+00:00 Update the "Using literate or pre-processed source" section - - - - - 0117f620 by David Waern at 2008-01-07T16:41:55+00:00 Document the --optghc flag - - - - - 087ab1cf by David Waern at 2008-01-07T16:42:10+00:00 Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 - - - - - 7253951e by David Waern at 2008-01-07T16:48:40+00:00 Document OPTIONS_HADDOCK - - - - - 3b6bdcf6 by David Waern at 2008-01-07T16:56:54+00:00 Wibble - - - - - 3025adf9 by David Waern at 2008-01-07T17:08:14+00:00 Wibble - - - - - 5f30f1a0 by David Waern at 2008-01-07T17:15:44+00:00 Change synopsis field to description - - - - - 1673f54b by David Waern at 2008-01-07T17:18:21+00:00 Change my email address in the cabal file - - - - - 55aa9808 by David Waern at 2008-01-07T18:18:02+00:00 Add documentation for readInterfaceFile - - - - - eaea417f by David Waern at 2008-01-07T18:21:30+00:00 Export necessary stuff from Distribution.Haddock - - - - - 7ea18759 by David Waern at 2008-01-07T18:31:49+00:00 Remove dep on Cabal - - - - - 7b79c74e by David Waern at 2008-01-07T18:33:49+00:00 Remove dep on process - - - - - ce3054e6 by David Waern at 2008-01-16T23:01:21+00:00 Add feature-requsts from Henning Thielemann to TODO - - - - - 0c08f1ec by David Waern at 2008-01-16T23:03:02+00:00 Record a bug in TODO - - - - - b04605f3 by David Waern at 2008-01-23T16:59:06+00:00 Add a bug reported by Ross to TODO - - - - - 5b17c030 by David Waern at 2008-01-23T18:05:53+00:00 A a bug report to TODO - - - - - 1c993b0d by David Waern at 2008-01-25T16:30:25+00:00 Accept test output - - - - - c22fc0d0 by David Waern at 2008-01-25T16:34:49+00:00 Accept test output - - - - - 4b795811 by David Waern at 2008-01-25T16:38:37+00:00 Change Hidden.hs (test) to use OPTIONS_HADDOCK - - - - - c124dbd9 by David Waern at 2008-01-25T16:39:23+00:00 Accept test output - - - - - ec6f6eea by David Waern at 2008-01-25T16:42:08+00:00 Add Hidden.html.ref to tests - - - - - 1dc9610c by David Waern at 2008-02-02T20:50:51+00:00 Add a comment about UNPACK bug in TODO - - - - - 2d3f7081 by David Waern at 2008-02-09T22:33:24+00:00 Change the representation of DocNames Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented. - - - - - 0f28c921 by David Waern at 2008-02-09T23:00:36+00:00 H.GHC.Utils: remove unused imports/exports - - - - - 0c44cad5 by David Waern at 2008-02-10T00:28:13+00:00 H.GHC.Utils: add some functions that were removed by mistake - - - - - e3452f49 by David Waern at 2008-02-10T00:28:48+00:00 Fix some trivial warnings in H.InterfaceFile - - - - - a6d74644 by David Waern at 2008-02-10T00:48:06+00:00 Update the version message to fit in small terminals - - - - - 76c9cd3e by David Waern at 2008-02-10T14:47:39+00:00 Remove bugs from TODO that don't apply anymore since the port - - - - - 5e10e090 by David Waern at 2008-02-10T15:22:47+00:00 Remove bugs from TODO that weren't actual bugs - - - - - fef70878 by David Waern at 2008-02-10T15:23:44+00:00 Remove yet another item from TODO that was not an actual bug - - - - - e1af47b8 by David Waern at 2008-02-11T10:25:57+00:00 Bump the version number to 2.1.0 Since the exported datatype DocName has changed, we need to bump the major version number. Let's also drop the fourth version component, it's not that useful. - - - - - e3be7825 by David Waern at 2008-04-11T14:29:04+00:00 Add a bug to TODO - - - - - cb6574be by David Waern at 2008-04-11T16:00:45+00:00 Use the in-place haddock when running tests - - - - - c6d7af0d by David Waern at 2008-04-11T16:09:16+00:00 Turn off GHC warnings when running tests - - - - - 7f61b546 by David Waern at 2008-04-11T17:24:00+00:00 Add a flag for turning off all warnings - - - - - 883b8422 by David Waern at 2008-04-12T14:02:18+00:00 Fix printing of data binders - - - - - 2a0db8fc by David Waern at 2008-04-12T18:52:46+00:00 Fix missing parenthesis in constructor args bug - - - - - 1b3ac3f9 by David Waern at 2008-04-12T18:57:23+00:00 Simplify test suite and add tests I move all tests into one single directory to simplify things, and add a test for the last bug that was fixed. - - - - - 8f178376 by David Waern at 2008-04-12T19:00:15+00:00 Add a script for copying test output to "expected" output - - - - - 193e3a03 by David Waern at 2008-04-12T19:16:37+00:00 Remove two fixed bugs from TODO - - - - - ddc9130c by David Waern at 2008-04-12T19:37:06+00:00 Update test README - - - - - 956069c0 by David Waern at 2008-05-01T12:16:14+00:00 Update version number in spec and docs - - - - - 5478621c by David Waern at 2008-05-01T12:28:12+00:00 Remove claim of backwards compatibility from docs for readInterfaceFile - - - - - 4a16dea9 by David Waern at 2008-05-01T12:33:04+00:00 Update CHANGES - - - - - 804216fb by David Waern at 2008-05-01T12:43:16+00:00 Add a synopsis - - - - - fd0c84d5 by David Waern at 2008-05-01T12:44:44+00:00 Add Haddock.DocName to the cabal file - - - - - 9f4a7439 by David Waern at 2008-05-01T12:45:53+00:00 Remove -fglasgow-exts and -fasm - - - - - aee7c145 by David Waern at 2008-05-01T12:54:01+00:00 Add LANGUAGE pragmas to source files - - - - - 9a58428b by David Waern at 2008-05-01T12:54:19+00:00 Add extensions to cabal file - - - - - 494f1bee by David Waern at 2008-05-01T13:12:09+00:00 Export DocName in the API - - - - - c938196b by David Waern at 2008-05-01T13:12:19+00:00 Add hide options to some source files - - - - - 236e86af by Neil Mitchell at 2008-06-07T20:45:10+00:00 Rewrite the --hoogle flag support - - - - - 6d910950 by Neil Mitchell at 2008-06-14T10:56:50+00:00 Simplify the newtype/data outputting in Hoogle, as haddock does it automatically - - - - - f87a95a8 by Neil Mitchell at 2008-06-14T12:10:18+00:00 Add initial structure for outputting documentation as well, but does not yet output anything - - - - - 7c3bce54 by Neil Mitchell at 2008-06-14T12:27:07+00:00 Remove <document comment> from the Hoogle output - - - - - 9504a325 by Neil Mitchell at 2008-06-16T06:33:21+00:00 Default to "main" if there is no package, otherwise will clobber hoogle's hoogle info - - - - - 4a794a79 by Neil Mitchell at 2008-06-16T06:53:29+00:00 Change packageName to packageStr, as it better reflects the information stored in it - - - - - 7abc9baf by Neil Mitchell at 2008-06-16T07:09:49+00:00 Add modulePkgInfo to Haddock.GHC.Utils, which gives back package name and version info - - - - - 8ca11514 by Neil Mitchell at 2008-06-16T07:13:48+00:00 Change Hoogle to take the package name and package version separately - - - - - a6da452d by Neil Mitchell at 2008-06-18T11:29:46+00:00 In Hoogle do not list things that are not local to this module - - - - - 974b76b7 by David Waern at 2008-06-19T18:40:13+00:00 Be more consistent with GHC API naming in H.GHC.Utils - - - - - 2facb4eb by David Waern at 2008-06-19T19:03:03+00:00 Update test output - - - - - c501de72 by David Waern at 2008-06-26T20:26:49+00:00 Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. - - - - - ac4c6836 by David Waern at 2008-06-26T20:33:08+00:00 Update CHANGES - - - - - 9d21c60a by David Waern at 2008-06-26T20:34:53+00:00 Update README - - - - - 741448f0 by David Waern at 2008-06-26T21:12:57+00:00 Improve wording in the help message - - - - - b1b42b11 by David Waern at 2008-06-30T10:16:17+00:00 Rename ForeignType - - - - - 6d6c2b34 by David Waern at 2008-06-30T10:25:09+00:00 Rename TyFamily - - - - - 8d1125ed by David Waern at 2008-06-30T10:37:21+00:00 Rename type patterns - - - - - 7610a4cb by David Waern at 2008-06-30T10:45:07+00:00 Rename associated types - - - - - 8eeba14c by David Waern at 2008-06-30T10:47:41+00:00 Remove the TODO file now that we have a trac - - - - - 1af5b25b by David Waern at 2008-07-02T18:19:28+00:00 Render type family declarations (untested) - - - - - ceb99797 by David Waern at 2008-07-02T18:24:06+00:00 Remove redundant check for summary when rendering data types - - - - - b36a58e0 by David Waern at 2008-07-02T22:01:38+00:00 More support for type families and associated types Now we just need to render the instances - - - - - 78784879 by David Waern at 2008-07-07T22:13:58+00:00 Remove filtering of instances We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later. - - - - - 3e758dad by David Waern at 2008-06-30T18:50:30+00:00 Run haddock in-place during testing - - - - - d9dab0ce by David Waern at 2008-07-08T21:04:32+00:00 Remove index.html and doc-index.html from output, they should not be versioned - - - - - 3e6c4681 by David Waern at 2008-07-08T21:06:42+00:00 Update test output following change to instance filtering - - - - - e34a3f14 by David Waern at 2008-07-12T16:48:28+00:00 Stop using the map from exported names to declarations During creation of the interface, we were using two maps: one from exported names to declarations, and one from all defined names in the module to declarations. The first contained subordinate names while the second one didn't. The first map was never used to look up names not defined in the associated module, so if we add subordinate names to the second map, we could use it everywhere. That's that this patch does. This simplifies code because we don't have to pass around two maps everywhere. We now store the map from locally defined things in the interface structure instead of the one from exported names. - - - - - 2e1d2766 by David Waern at 2008-07-12T16:55:21+00:00 Get the all locally defined names from GHC API We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API. - - - - - bf637994 by David Waern at 2008-07-13T13:09:16+00:00 Refactoring in H.Interface.Create We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names). - - - - - 547e410e by David Waern at 2008-07-13T13:34:51+00:00 Remove FastString import and FSLIT macro in H.I.Create -- they were unused - - - - - 693759d1 by David Waern at 2008-07-13T13:36:23+00:00 Remove unused import from H.I.Create - - - - - cde6e7fb by David Waern at 2008-07-13T13:51:54+00:00 Small touches - - - - - 96de8f1d by David Waern at 2008-07-20T11:21:46+00:00 Preparation for rendering instances as separate declarations We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet. - - - - - b0f824fb by David Waern at 2008-07-20T15:53:08+00:00 Follow changes to ExportDecl in Hoogle - - - - - 1192eff3 by Neil Mitchell at 2008-06-26T00:28:10+00:00 Change how the Hoogle backend outputs classes, adding the context in - - - - - 7a0d1464 by Neil Mitchell at 2008-06-26T00:28:46+00:00 Remove the indent utility function from Hoogle backend - - - - - 3361241b by Neil Mitchell at 2008-06-26T09:45:09+00:00 Add support for Hoogle writing ForeignImport/ForeignExport properly - - - - - 795ad3bf by Neil Mitchell at 2008-06-26T12:15:25+00:00 Flesh out the Hoogle code to render documentation - - - - - 23277995 by Neil Mitchell at 2008-06-26T14:56:41+00:00 Fix a bug in the Hoogle backend, unordered lists were being written out <ul>...</u> - - - - - db739b27 by Neil Mitchell at 2008-06-26T15:09:54+00:00 Remove any white space around a <li> element - - - - - f2e6bb8c by Neil Mitchell at 2008-07-10T15:30:47+00:00 Remove the TODO in the Hoogle HTML generation, was already done - - - - - 693ec9a3 by Neil Mitchell at 2008-07-10T15:53:00+00:00 Put brackets round operators in more places in the Hoogle output - - - - - 842313aa by Neil Mitchell at 2008-07-10T16:01:25+00:00 Print type signatures with brackets around the name - - - - - cf93deb0 by David Waern at 2008-07-20T17:04:22+00:00 Bump version number to 2.2.0 - - - - - 30e6a8d1 by David Waern at 2008-07-20T17:04:41+00:00 Resolve conflicts in H.B.Hoogle - - - - - 1f0071c9 by David Waern at 2008-07-23T23:05:01+00:00 Add "all" command to runtests.hs that runs all tests despite failures - - - - - f2723023 by David Waern at 2008-07-23T23:08:39+00:00 Update tests/README - - - - - c0304a11 by David Waern at 2008-07-23T23:21:15+00:00 Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. - - - - - 88a5fe71 by David Waern at 2008-07-23T23:54:16+00:00 Depend on the currently available ghc-paths versions only - - - - - 8738d97b by David Waern at 2008-07-24T10:50:44+00:00 FIX haskell/haddock#44: Propagate parenthesis level when printing documented types - - - - - 05339119 by David Waern at 2008-07-24T16:06:18+00:00 Drop unnecessary parenthesis in types, put in by the user We were putting in parenthesis were the user did. Let's remove this since it just clutters up the types. The types are readable anyway since we print parens around infix operators and do not rely on fixity levels. When doing this I discovered that we were relying on user parenthesis when printin types like (a `O` b) c. This patchs fixes this problem so that parenthesis are always inserted around an infix op application in case it is applied to further arguments, or if it's an arguments to a type constructor. Tests are updated. - - - - - b3a99828 by David Waern at 2008-07-24T10:19:43+00:00 Print parenthesis around non-atomic banged types Fixes half of haskell/haddock#44 - - - - - ab5238e0 by David Waern at 2008-07-24T22:07:49+00:00 Add a reference file for the TypeFamilies test - - - - - 1941cc11 by David Waern at 2008-07-25T17:15:53+00:00 Simplify definition of pretty and trace_ppr - - - - - e3bfa33c by David Waern at 2008-07-25T17:18:27+00:00 Warning messages Output a warning when filtering out data/type instances and associated types in instances. We don't show these in the documentation yet, and we need to let the user know. - - - - - 9b85fc89 by David Waern at 2008-07-25T17:45:40+00:00 Doc: Mention Hoogle in the Introduction - - - - - afb2dd60 by David Waern at 2008-07-25T17:49:00+00:00 Doc: update -B description - - - - - 584c0c91 by David Waern at 2008-07-25T18:11:38+00:00 Doc: describe -w flag - - - - - 77619c24 by David Waern at 2008-07-28T12:29:07+00:00 Remove TODO from cabal file - - - - - 96717d5f by David Waern at 2008-07-28T12:29:27+00:00 Support type equality predicates - - - - - c2fd2330 by David Waern at 2008-07-29T19:45:14+00:00 Move unL from H.B.Hoogle to H.GHC.Utils I like Neil's shorter unL better than unLoc from the GHC API. - - - - - c4c3bf6a by David Waern at 2008-07-29T19:47:36+00:00 Do not export ATs when not in list of subitems - - - - - bf9a7b85 by David Waern at 2008-08-03T11:42:59+00:00 Filter out ForeignExports - - - - - df59fcb0 by David Waern at 2008-08-03T14:02:51+00:00 Filter out more declarations The previous refactorings in H.I.Create introduced a few bugs. Filtering of some types of declarations that we don't handle was removed. This patch fixes this. - - - - - 2f8a958b by David Waern at 2008-08-03T15:24:07+00:00 Move reL to H.GHC.Utils so we can use it everywhere - - - - - 8ec15efd by David Waern at 2008-08-03T15:25:00+00:00 Use isVanillaLSig from GHC API instead of home brewn function - - - - - 300f93a2 by David Waern at 2008-08-03T15:25:27+00:00 Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. - - - - - 8776d1ec by David Waern at 2008-08-03T16:21:21+00:00 Filter out more declarations and keep only vanilla type sigs in classes - - - - - ea07eada by David Waern at 2008-08-03T16:48:00+00:00 Fix layout - - - - - dd5e8199 by David Waern at 2008-08-03T16:50:52+00:00 Move some utility functions from H.I.Create to H.GHC.Utils - - - - - 4a1dbd72 by David Waern at 2008-08-03T17:39:55+00:00 Do not filter out doc declarations - - - - - 0bc8dca4 by David Waern at 2008-08-03T17:47:26+00:00 Filter out separately exported ATs (take two) - - - - - af970fe8 by David Waern at 2008-08-03T22:39:17+00:00 Update CHANGES - - - - - 5436ad24 by David Waern at 2008-08-03T22:40:20+00:00 Bump version number to 2.2.1 - - - - - d66de448 by David Waern at 2008-08-05T19:00:32+00:00 Remove version restriction on ghc-paths - - - - - 534b1364 by David Waern at 2008-08-05T19:04:35+00:00 Bump version to 2.2.2 and update CHANGES - - - - - 549188ff by David Waern at 2008-08-05T19:16:49+00:00 Fix CHANGES - - - - - 0d156bb4 by Luke Plant at 2008-08-11T15:20:59+00:00 invoking haddock clarification and help - - - - - 748295cc by David Waern at 2008-08-11T18:56:37+00:00 Doc: say that the --hoogle option is functional - - - - - 43301db4 by David Waern at 2008-08-05T19:26:08+00:00 Change ghc version dependency to >= 6.8.2 - - - - - 3e5a53b6 by David Waern at 2008-08-10T22:42:05+00:00 Make H.GHC.Utils build with GHC HEAD - - - - - 7568ace0 by David Waern at 2008-08-11T19:41:54+00:00 Import Control.OldException instead of C.Exception when using ghc >= 6.9 We should really test for base version instead, but I don't currently know which version to test for. - - - - - b71ae991 by David Waern at 2008-08-12T22:40:39+00:00 Make our .haddock file version number depend on the GHC version We need to do this, since our .haddock format can potentially change whenever GHC's version changes (even when only the patchlevel changes). - - - - - 6307ce3f by David Waern at 2008-08-12T22:49:57+00:00 Remove matching on NoteTy in AttachInstances, it has been removed - - - - - 2dbcfd5f by David Waern at 2008-08-12T23:02:02+00:00 Comment out H.GHC.loadPackages - it is unused and doesn't build with ghc >= 6.9 - - - - - c74db5c2 by David Waern at 2008-08-12T23:03:58+00:00 Hide <.> from GHC import in Hoogle only for ghc <= 6.8.3 - - - - - 69a44ebb by David Waern at 2008-08-12T23:11:12+00:00 Follow changes to parseDynamic/StaticFlags - - - - - 5881f3f0 by David Waern at 2008-08-13T21:43:58+00:00 Add __GHC_PATCHLEVEL__ symbol also when building the library - - - - - 8574dc11 by David Waern at 2008-08-13T21:44:17+00:00 Follow move of package string functions from PackageConfig to Module - - - - - c9baa77f by David Waern at 2008-08-13T21:45:29+00:00 Follow extensible exceptions changes - - - - - 9092de15 by David Waern at 2008-08-13T21:46:20+00:00 Update test following Haddock version change - - - - - ebe569a4 by David Waern at 2008-08-13T21:46:54+00:00 Follow changes to parseDynamic- parseStaticFlags in GHC - - - - - b8a5ffd3 by David Waern at 2008-08-13T21:47:36+00:00 Follow changes to Binary in GHC 6.9 - - - - - edfda1cc by David Waern at 2008-08-13T21:50:17+00:00 Change ghc version dependency to >= 6.8.2 && <= 6.9 - - - - - d59be1cf by Neil Mitchell at 2008-08-12T16:02:53+00:00 Output all items, even if they are not defined in this module - ensures map comes from Prelude, not just GHC.Base - - - - - dda93b9f by Neil Mitchell at 2008-08-12T21:37:32+00:00 Add support for type synonyms to Hoogle, was accidentally missing before (woops!) - - - - - b6ee795c by Neil Mitchell at 2008-08-13T14:03:24+00:00 Generalise Hoogle.doc and add a docWith - - - - - 415e1bb2 by Neil Mitchell at 2008-08-13T14:03:46+00:00 Make Hoogle add documentation to a package - - - - - 790a1202 by Neil Mitchell at 2008-08-18T12:52:43+00:00 Use the same method to put out signatures as class methods in the Hoogle backend - - - - - ded37eba by Neil Mitchell at 2008-08-18T12:53:04+00:00 Remove Explicit top-level forall's when pretty-printing signatures - - - - - 6468c722 by Neil Mitchell at 2008-08-20T07:59:13+00:00 Simplify the code by removing not-to-important use of <.> in the Hoogle back end - - - - - 788c3a8b by Neil Mitchell at 2008-08-21T18:20:24+00:00 In the hoogle back end, markup definition lists using <i>, not <b> - - - - - 77d4b000 by Ian Lynagh at 2008-08-14T10:49:14+00:00 Add a Makefile for GHC's build system. Still won't work yet, but we're closer - - - - - 920440d7 by Ian Lynagh at 2008-08-27T18:06:46+00:00 Add haddock.wrapper - - - - - bcda925f by Ian Lynagh at 2008-08-27T18:07:02+00:00 Add a manual Cabal flag to control the ghc-paths dependency - - - - - 04d194e2 by Ian Lynagh at 2008-08-27T20:41:27+00:00 Update extensions in Cabal file Use ScopedTypeVariables instead of PatternSignatures - - - - - 12480043 by Ian Lynagh at 2008-08-27T20:41:55+00:00 Increase the upper bound on the GHC version number - - - - - b1f809a5 by Ian Lynagh at 2008-08-27T21:32:22+00:00 Fix some warnings - - - - - aea0453d by Ian Lynagh at 2008-08-28T14:22:29+00:00 Fixes for using haddock in a GHC build tree - - - - - ad23bf86 by Ian Lynagh at 2008-08-28T21:14:27+00:00 Don't use Cabal wrappers on Windows - - - - - 35858e4c by Ian Lynagh at 2008-08-29T00:07:42+00:00 Fix in-tree haddock on Windows - - - - - c2642066 by Ian Lynagh at 2008-09-03T22:35:53+00:00 follow library changes - - - - - 2eb55d50 by Ian Lynagh at 2008-09-07T18:52:51+00:00 bindist fixes - - - - - 3daa5b59 by Ian Lynagh at 2008-09-10T16:58:18+00:00 We need to tell haddock that its datasubdir is . or it can't find package.conf - - - - - 388fd8c2 by Ian Lynagh at 2008-09-10T19:47:44+00:00 Fix haddock inplace on Windows - - - - - 70a641c1 by Ian Lynagh at 2008-09-10T22:15:44+00:00 Fix installed haddock on Windows - - - - - 83c1e997 by Neil Mitchell at 2008-09-11T10:48:55+00:00 Import GHC.Paths if not IN_GHC_TREE, seems to match the use of GHC.Paths functions much better - - - - - b452519b by Ian Lynagh at 2008-09-12T12:58:24+00:00 Add a LANGUAGE ForeignFunctionInterface pragma - - - - - afbd592c by Ian Lynagh at 2008-09-12T12:59:13+00:00 Wibble imports - - - - - 547ac4ad by Ian Lynagh at 2008-09-14T15:34:22+00:00 Add a "#!/bin/sh" to haddock.wrapper - - - - - f207a807 by Ian Lynagh at 2008-09-15T10:02:32+00:00 Use "exec" when calling haddock in the wrapper - - - - - 2ee68509 by Thomas Schilling at 2008-09-15T09:09:16+00:00 Port Haddock.Interface to new GHC API. This required one bigger change: 'readInterfaceFile' used to take an optional 'Session' argument. This was used to optionally update the name cache of an existing GHC session. This does not work with the new GHC API, because an active session requires the function to return a 'GhcMonad' action, but this is not possible if no session is provided. The solution is to use an argument of functions for reading and updating the name cache and to make the function work for any monad that embeds IO, so it's result type can adapt to the calling context. While refactoring, I tried to make the code a little more self-documenting, mostly turning comments into function names. - - - - - 3bb96431 by Thomas Schilling at 2008-09-15T09:09:37+00:00 Reflect GHC API changes. - - - - - 2e60f714 by Thomas Schilling at 2008-09-15T09:10:37+00:00 Port Haddock.GHC.Typecheck to new GHC API. - - - - - 9cfd4cff by Thomas Schilling at 2008-09-15T09:11:00+00:00 Port Haddock.GHC to new GHC API. - - - - - caffa003 by Thomas Schilling at 2008-09-15T09:11:25+00:00 Port Main to new GHC API. - - - - - 069a4608 by Ian Lynagh at 2008-09-21T11:19:00+00:00 Fix paths used on Windows frmo a GHC tree: There is no whare directory - - - - - 7ceee1f7 by Ian Lynagh at 2008-09-21T12:20:16+00:00 Fix the in-tree haddock on Windows - - - - - 0d486514 by Ian Lynagh at 2008-09-23T18:06:58+00:00 Increase the GHC upper bound from 6.11 to 6.13 - - - - - f092c414 by Neil Mitchell at 2008-09-11T14:56:07+00:00 Do not wrap __ in brackets - - - - - 036bdd13 by Ian Lynagh at 2008-09-28T01:42:35+00:00 Fix building haddock when GhcProfiled=YES - - - - - 01434a89 by David Waern at 2008-09-24T20:24:21+00:00 Add PatternSignatures LANGUAGE pragma to Main and Utils - - - - - 1671a750 by David Waern at 2008-10-02T22:57:25+00:00 For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). - - - - - a25dde99 by David Waern at 2008-10-02T22:59:57+00:00 Remove ifaceEnv from Interface - it's no longer used - - - - - 610993da by David Waern at 2008-10-02T23:04:58+00:00 Write a comment about source links for type instance declarations - - - - - 5a96b5d5 by Thomas Schilling at 2008-10-03T10:45:08+00:00 Follow GHC API change of parseModule. - - - - - 5a943ae5 by Ian Lynagh at 2008-10-03T15:56:58+00:00 TAG 2008-10-03 - - - - - 76cdd6ae by Thomas Schilling at 2008-10-08T12:29:50+00:00 Only load modules once when typechecking with GHC. This still doesn't fix the memory leak since the typechecked source is retained and then processed separately. To fix the leak, modules must be processed directly after typechecking. - - - - - 7074d251 by David Waern at 2008-10-09T23:53:54+00:00 Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. - - - - - 4b9b2b2d by David Waern at 2008-10-09T23:54:49+00:00 Add some strictness annotations in Interface We add some strictness annotations to the fields of Interface, so that less GHC data is hold on to during processing. - - - - - 22035628 by David Waern at 2008-10-10T20:02:31+00:00 Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck - - - - - be637ad3 by David Waern at 2008-10-10T20:33:38+00:00 Make Haddock build with GHC 6.8.2 - - - - - 523b3404 by David Waern at 2008-10-10T21:08:09+00:00 Fix documentation for createInterfaces - - - - - e1556702 by David Waern at 2008-10-10T21:26:19+00:00 Hide H.Utils in library - - - - - a8e751c3 by David Waern at 2008-10-10T21:34:59+00:00 Add back .haddock file versioning based on GHC version It was accidentally removed in the patch for GHC 6.8.2 compatibility - - - - - 06fb3c01 by David Waern at 2008-10-10T21:47:15+00:00 Bump version number to 2.3.0 - - - - - ff087fce by David Waern at 2008-10-10T22:35:49+00:00 Add support for DocPic The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix! - - - - - 3af85bf6 by David Waern at 2008-10-10T23:34:05+00:00 Update tests - - - - - 0966873c by Simon Marlow at 2008-10-10T14:43:04+00:00 no need for handleErrMsg now, we don't throw any ErrMsgs - - - - - f1870de3 by Clemens Fruhwirth at 2008-10-10T13:29:36+00:00 Compile with wrapper but remove it for dist-install - - - - - 7b440dc2 by David Waern at 2008-10-11T14:02:25+00:00 Remove interface from LinksInfo It was there to know the documentation home module when creating a wiki link, but we already know this since we have the DocName. - - - - - e5729e6a by David Waern at 2008-10-15T20:49:18+00:00 Wibble - - - - - b2a8e01a by David Waern at 2008-10-15T21:03:36+00:00 Use type synonyms for declarations and docs in H.I.Create - - - - - be71a15b by David Waern at 2008-10-15T21:12:17+00:00 Comment out unused type family stuff completely - - - - - 91aaf075 by David Waern at 2008-10-15T21:49:04+00:00 Wibble - - - - - 42ba4eb4 by David Waern at 2008-10-15T21:53:53+00:00 Move convenient type synonym to H.Types - - - - - db11b723 by David Waern at 2008-10-15T22:14:07+00:00 Add DeclInfo to H.Types - - - - - 193552b6 by David Waern at 2008-10-15T22:15:01+00:00 Add subordinates with docs to the declaration map The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate. - - - - - 31e6eebc by David Waern at 2008-10-16T17:18:47+00:00 Wibble - - - - - 0dcbd79f by David Waern at 2008-10-16T20:58:42+00:00 Fix haskell/haddock#61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. - - - - - de47f20a by David Waern at 2008-10-16T22:06:35+00:00 Document function and improve its layout - - - - - e74e625a by Thomas Schilling at 2008-10-20T11:12:57+00:00 Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). - - - - - b63ac9a1 by David Waern at 2008-10-20T20:25:50+00:00 Make renamer consistent Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name). - - - - - f6de0bb0 by Ian Lynagh at 2008-09-19T00:54:43+00:00 TAG GHC 6.10 fork - - - - - 74599cd0 by David Waern at 2008-10-20T21:13:24+00:00 Do not save hidden modules in the .haddock file We were saving interfaces of all processed modules including those hidden using {-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links when generating the index for the libraries that come with GHC. This patch excludes modules with hidden documentation when writing .haddock files. It should fix the above problem. - - - - - 7b6742e9 by David Waern at 2008-10-21T19:54:52+00:00 Do not save hidden modules in the .haddock file (also for ghc >= 6.9) When writing the first patch, I forgot to do the fix in both branches of an #if macro. - - - - - b99b1951 by David Waern at 2008-10-22T20:04:18+00:00 Remove subordinate map and its usage It is not needed now that we store subordinate names in the DeclInfo map. - - - - - da97cddc by David Waern at 2008-10-22T20:11:46+00:00 Tidy up code in H.I.Create a little Remove commented out half-done type instance support, and remove DeclWithDoc synonym. - - - - - 6afa76f3 by David Waern at 2008-10-22T21:17:29+00:00 Fix warnings in H.GHC.Utils - - - - - 171ea1e8 by David Waern at 2008-10-22T21:35:04+00:00 Fix warnings in H.Utils - - - - - c8cb3b91 by David Waern at 2008-10-22T21:36:49+00:00 Wibble - - - - - 767fa06a by David Waern at 2008-10-27T19:59:04+00:00 Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. - - - - - e638bbc6 by David Waern at 2008-11-02T22:21:10+00:00 Add HCAR entry - - - - - 92b4ffcf by David Waern at 2008-11-02T22:44:19+00:00 Update CHANGES - - - - - 84d4da6e by David Waern at 2008-11-03T11:25:04+00:00 Add failing test for template haskell crash - - - - - 2a9cd2b1 by David Waern at 2008-11-04T21:13:44+00:00 Add tests/TH.hs - - - - - 8a59348e by David Waern at 2008-11-04T21:30:26+00:00 TAG 2.3.0 - - - - - 54f70d31 by Thomas Schilling at 2008-10-24T17:04:08+00:00 Enable framed view of the HTML documentation. This patch introduces: - A page that displays the documentation in a framed view. The left side will show a full module index. Clicking a module name will show it in the right frame. If Javascript is enabled, the left side is split again to show the modules at the top and a very short synopsis for the module currently displayed on the right. - Code to generate the mini-synopsis for each module and the mini module index ("index-frames.html"). - CSS rules for the mini-synopsis. - A very small amount of javascript to update the mini-synopsis (but only if inside a frame.) Some perhaps controversial things: - Sharing code was very difficult, so there is a small amount of code duplication. - The amount of generated pages has been doubled, since every module now also gets a mini-synopsis. The overhead should not be too much, but I haven't checked. Alternatively, the mini-synopsis could also be generated using Javascript if we properly annotate the actual synopsis. - - - - - 5d7ea5a6 by David Waern at 2008-11-04T23:20:17+00:00 Follow change to ExportDecl in frames code - - - - - 60e16308 by David Waern at 2008-11-04T23:35:26+00:00 Update CHANGES - - - - - d63fd26d by David Waern at 2008-11-04T23:37:43+00:00 Bump version number - - - - - c1660c39 by David Waern at 2008-11-04T23:44:46+00:00 Update CHANGES - - - - - 995ab384 by David Waern at 2008-11-04T23:55:21+00:00 Remove .ref files from tests/output/ - - - - - 1abbbe75 by David Waern at 2008-11-04T23:57:41+00:00 Output version info before running tests - - - - - 649b182f by David Waern at 2008-11-05T22:45:37+00:00 Add ANNOUNCE message - - - - - c36ae0bb by David Waern at 2008-11-05T23:15:35+00:00 Update ANNOUNCE - - - - - 9c4f3d40 by David Waern at 2008-11-05T23:18:30+00:00 Wibble - - - - - 5aac87ce by David Waern at 2008-11-06T21:07:48+00:00 Depend on base 4.* when using GHC >= 6.9, otherwise 3.* - - - - - b9796a74 by David Waern at 2008-11-06T21:13:40+00:00 Bump version to 2.4.1 and update CHANGES - - - - - d4b26baa by David Waern at 2008-11-06T21:26:33+00:00 Depend on base 4.0.* instead of 4.* - - - - - 2cb0903c by David Waern at 2008-11-06T21:46:53+00:00 Fix warnings in H.B.HH and H.B.HH2 - - - - - e568e89a by David Waern at 2008-11-06T21:47:12+00:00 Fix warnings in Haddock.ModuleTree - - - - - 9dc14fbd by David Waern at 2008-11-06T21:47:52+00:00 Fix warnings in Haddock.Version - - - - - 02ac197c by David Waern at 2008-11-06T21:51:31+00:00 Fix warnings in H.InterfaceFile and H.Options - - - - - 63e7439a by David Waern at 2008-11-06T21:59:45+00:00 Fix warnings in H.GHC.Typecheck - - - - - 4bca5b68 by David Waern at 2008-11-08T13:43:42+00:00 Set HscTarget to HscNothing instead of HscAsm There used to be a bug in the GHC API that prevented us from setting this value. - - - - - 07357aec by David Waern at 2008-11-09T22:27:00+00:00 Re-export NameCache and friends from Distribution.Haddock - - - - - ea554b5a by David Waern at 2008-11-09T23:14:10+00:00 Add Haddock.GHC.Utils to other-modules in library - - - - - 74aecfd7 by David Waern at 2008-11-10T01:18:57+00:00 Export DocName in the library - - - - - 241a58b3 by David Waern at 2008-11-10T01:19:18+00:00 Document the functions in H.DocName - - - - - edc2ef1b by David Waern at 2008-11-10T01:20:52+00:00 Export H.DocName in the library - - - - - 4f588d55 by David Waern at 2008-11-10T01:29:14+00:00 Make DocName an instance of NamedThing - - - - - b4647244 by David Waern at 2008-11-15T22:58:18+00:00 Reflect version bump in test suite - - - - - 4bee8ce2 by David Waern at 2008-11-15T22:58:45+00:00 Update tests For unknown reasons, test output for Bug1 and Test has changed for the better. - - - - - 1690e2f9 by David Waern at 2008-11-15T22:59:33+00:00 Store hidden modules in .haddock files We store documentation for an entity in the 'InstalledInterface' of the definition site module, and never in the same structure for a module which re-exports the entity. So when a client of the Haddock library wants to look up some documentation, he/she might need to access a hidden module. But we currently don't store hidden modules in the .haddock files. So we add the hidden modules and the Haddock options to the .haddock files. The options will be used to filter the module list to obtain the visible modules only, which is necessary for generating the contents and index for installed packages. - - - - - 8add6435 by David Waern at 2008-11-16T14:35:50+00:00 Bump major version number due to .haddock file format change - - - - - 48bfcf82 by David Waern at 2008-11-23T14:32:52+00:00 Update tests to account for version number bump - - - - - 0bbd1738 by David Waern at 2008-11-23T14:33:31+00:00 HADDOCK_DATA_DIR changed to haddock_datadir - - - - - 5088b78c by David Waern at 2008-11-23T17:13:21+00:00 FIX haskell/haddock#45: generate two anchors for each name We generate two anchor tags for each name, one where we don't escape the name and one where we URI-encode it. This is for compatibility between IE and Opera. Test output is updated. - - - - - 5ee5ca3b by Neil Mitchell at 2008-11-27T14:38:11+00:00 Drop HsDocTy annotations, they mess up pretty printing and also have a bracketing bug (#2584) - - - - - 51c014e9 by Roman Cheplyaka at 2008-11-27T22:27:36+00:00 Allow referring to a specific section within a module in a module link Fixes haskell/haddock#65 - - - - - 4094bdc5 by David Waern at 2008-11-28T21:13:33+00:00 Update tests following anchor change - - - - - f89552dd by Thomas Schilling at 2008-11-29T16:16:20+00:00 Haddock really shouldn't try to overwrite files. - - - - - 98127499 by David Waern at 2008-12-07T14:09:15+00:00 Solve conflict - - - - - 319356c5 by David Waern at 2008-10-22T21:16:55+00:00 Add -Wall -Werror to ghc-options - - - - - 3c4968c9 by David Waern at 2008-11-04T23:38:56+00:00 TAG 2.4.0 - - - - - 4b21e003 by David Waern at 2008-11-06T21:14:04+00:00 TAG 2.4.1 - - - - - 8e0cad5c by David Waern at 2008-12-07T14:12:54+00:00 Remove -Werror - - - - - 299d6deb by David Waern at 2008-12-07T14:25:18+00:00 Remove -Wall, we'll focus on warnings after 6.10.2 is out - - - - - 5f4216b6 by David Waern at 2008-12-07T20:58:05+00:00 Resolve conflict properly - - - - - 67d774e7 by Neil Mitchell at 2008-12-15T11:44:26+00:00 Make forall's in constructors explicit, i.e. data Foo = Foo {foo :: Eq a => a} - - - - - 61851792 by Neil Mitchell at 2008-12-18T15:39:39+00:00 Try and find a better package name than "main" for Hoogle, goes wrong when working on an executable rather than a library - - - - - 2fab8554 by David Waern at 2008-12-08T23:19:48+00:00 Make visible names from ExportItems Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment. - - - - - 7caadd8c by Ian Lynagh at 2008-12-11T17:01:04+00:00 Wrap the GHC usage with defaultCleanupHandler This fixes a bug where haddock leaves /tmp/ghc* directories uncleaned. - - - - - 7c9fc9a5 by David Waern at 2009-01-02T21:38:27+00:00 Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. - - - - - 119e4e05 by David Waern at 2009-01-06T23:34:17+00:00 Do not process boot modules We should of course not try to produce documentation for boot modules! The reason this has worked in the past is that the output of "real" modules overwrites the output of boot modules later in the process. However, this causes a subtle link environment problem. So let's get rid of this stupid behaviour. We avoid processing boot modules, but we continue to typecheck them. - - - - - c285b9d2 by David Waern at 2009-01-08T18:03:36+00:00 Export modules also when coming from external packages This seems to have regressed since a refactoring that was part of the 2.3.0 release. - - - - - 24031c17 by David Waern at 2009-01-10T15:26:26+00:00 Change version to 2.4.2 - no need to go to 2.5.0 - - - - - 864d1c3f by David Waern at 2009-01-10T15:35:20+00:00 Update tests to account for version number change - - - - - 524ba886 by David Waern at 2009-01-10T18:29:17+00:00 Add test for Template Haskell splicing - - - - - 05e6e003 by David Waern at 2009-01-10T19:35:42+00:00 Fix Trac haskell/haddock#68: Turn on compilation via C for Template Haskell packages We can't use HscNothing if we need to run code coming from modules inside the processed package during typechecking, which is the case for some packages using Template Haskell. This could be improved, to e.g. use HscInterpreted and HscNothing where possible, instead of using HscC for all modules in the package. - - - - - 2b2bafa1 by David Waern at 2009-01-10T20:22:25+00:00 Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above - - - - - bedc3a93 by Ian Lynagh at 2009-01-11T14:58:41+00:00 Fix the location of INPLACE_PKG_CONF; fixes the build Spotted by Conal Elliott - - - - - 943107c8 by David Waern at 2009-01-20T19:27:39+00:00 Document H.I.Create.collectDocs better - - - - - c6252e37 by David Waern at 2009-01-20T19:29:51+00:00 Fix Trac haskell/haddock#59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). - - - - - 3568a6af by David Waern at 2009-01-21T21:41:48+00:00 Do not indicate that a constructor argument is unboxed We only show the strictness annotation for an unboxed constructor argument. The fact that it is unboxed is an implementation detail and should not be part of the module interface. - - - - - 562a4523 by David Waern at 2009-01-22T18:53:49+00:00 Fix Trac haskell/haddock#50: do not attach docs to pragmas or other kinds of non-declarations We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations. - - - - - 6fdf21c2 by David Waern at 2009-01-22T19:48:09+00:00 Add test for quasi quotation. No reference output yet. - - - - - dc4100fd by David Waern at 2009-01-22T19:57:47+00:00 Improve quasi-quotation test and add reference output - - - - - 908b74bb by David Waern at 2009-01-23T23:22:03+00:00 Filter out separately exported associated types in a smarter way - - - - - f6b42ecb by David Waern at 2009-01-24T16:54:39+00:00 Correct spelling mistake in error message - - - - - 24e4245d by David Waern at 2009-01-24T17:48:03+00:00 Correct comment - - - - - b5e8462f by David Waern at 2009-02-07T13:22:29+00:00 Do not show a subordinate at the top level if its parent is also exported See note in the source code for more info. - - - - - 4b09de57 by David Waern at 2009-02-07T13:53:53+00:00 Update test following change to top level subordinates - - - - - 76379896 by David Waern at 2009-02-07T13:58:04+00:00 Remove html files in the tests/output/ directory which have been accidentally added - - - - - 1a6d8b10 by Joachim Breitner at 2009-02-20T10:29:43+00:00 Typo in comment - - - - - fec367d0 by David Waern at 2009-02-24T20:21:17+00:00 Fix small bug The rule is to prefer type constructors to other things when an identifier in a doc string can refer to multiple things. This stopped working with newer GHC versions (due to a tiny change in the GHC renamer). We implement this rule in the HTML backend for now, instead of fixing it in GHC, since we will move renaming of doc strings to Haddock in the future anyway. - - - - - 9b4172eb by David Waern at 2009-02-25T20:04:38+00:00 Fix bad error handling with newer GHCs When support for GHC 6.10 was added, an error handler was installed only around the typechecking phase. This had the effect that errors thrown during dependency chasing were caught in the top-level exception handler and not printed with enough detail. With this patch we wrap the error handler around all our usage of the Ghc monad. - - - - - de2df363 by Simon Peyton Jones at 2009-02-02T16:47:42+00:00 Hide funTyConName, now exported by TypeRep - - - - - 4d40a29f by Ian Lynagh at 2009-02-12T18:57:49+00:00 Don't build the library when building in the GHC tree - - - - - 1cd0abe4 by Ian Lynagh at 2009-02-13T13:58:53+00:00 Add a ghc.mk - - - - - 3d814eeb by Ian Lynagh at 2009-02-13T18:50:28+00:00 do .depend generation for haddock with the stage1 compiler This is a bit of a hack. We mkdepend with stage1 as if .depend depends on the stage2 compiler then make goes wrong: haddock's .depend gets included, which means that make won't reload until it's built, but we can't build it without the stage2 compiler. We therefore build the stage2 compiler before its .depend file is available, and so compilation fails. - - - - - b55036a4 by Ian Lynagh at 2009-02-25T01:38:13+00:00 Give haddock a wrapper on unix in the new GHC build system - - - - - 9eabfe68 by Ian Lynagh at 2009-02-25T19:21:32+00:00 Create inplace/lib/html in the new GHC build system - - - - - 93af30c7 by Ian Lynagh at 2008-11-07T19:18:23+00:00 TAG GHC 6.10.1 release - - - - - 06e6e34a by Thomas Schilling at 2009-02-24T18:11:00+00:00 Define __GHC_PATCHLEVEL__ for recent version of GHC (stable). - - - - - 680e6ed8 by Thomas Schilling at 2009-02-24T18:12:26+00:00 'needsTemplateHaskell' is not defined in current stable GHC. - - - - - 6c5619df by David Waern at 2009-02-25T22:15:23+00:00 Hide fynTyConName only for recent GHC versions - - - - - 6b2344f1 by Ian Lynagh at 2009-02-26T00:49:56+00:00 Add the module to one of haddocks warnings - - - - - e5d11c70 by David Waern at 2009-02-27T21:37:20+00:00 Bug fix We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates. - - - - - 10a79a60 by David Waern at 2009-02-27T22:08:08+00:00 Fix error message conflict The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now. - - - - - c5055c7f by David Waern at 2009-02-27T22:15:17+00:00 Shorten warning message - - - - - a72fed3a by David Waern at 2009-02-28T00:53:55+00:00 Do not show package name in warning message - - - - - a5daccb2 by Ian Lynagh at 2009-03-01T14:59:35+00:00 Install haddock in the new GHC build system - - - - - dfdb025c by Ian Lynagh at 2009-03-07T23:56:29+00:00 Relax base dependency to < 4.2, not < 4.1 - - - - - 5769c8b4 by David Waern at 2009-03-21T14:58:52+00:00 Bump .haddock file version number (due to change of format) - - - - - f1b8f67b by David Waern at 2009-03-21T14:59:26+00:00 Define __GHC_PATCHLEVEL__=1 when using ghc-6.10.1 - - - - - 23f78831 by David Waern at 2009-03-21T16:40:52+00:00 Update CHANGES - - - - - 7d2735e9 by David Waern at 2009-03-21T16:50:33+00:00 Update ANNOUNCE - - - - - 0771e00a by David Waern at 2009-03-21T16:54:40+00:00 Update ANNOUNCE, again - - - - - 81a6942a by David Waern at 2009-03-21T17:50:06+00:00 Don't be too verbose in CHANGES - - - - - 29861dcf by David Waern at 2009-03-21T18:03:31+00:00 TAG 2.4.2 - - - - - a585f285 by David Waern at 2009-03-21T19:20:29+00:00 Require Cabal >= 1.2.3 - - - - - 7c611662 by David Waern at 2009-03-21T19:21:48+00:00 TAG 2.4.2 with cabal-version >= 1.2.3 - - - - - 23b7deff by Simon Marlow at 2009-03-20T15:43:42+00:00 new GHC build system: use shell-wrappers macro - - - - - 25f8afe7 by Ian Lynagh at 2009-03-21T19:13:53+00:00 Fix (with a hack?) haddock in teh new build system - - - - - 6a29a37e by David Waern at 2009-03-24T22:10:15+00:00 Remove unnecessary LANGUAGE pragma - - - - - 954da57d by David Waern at 2009-03-24T22:21:23+00:00 Fix warnings in H.B.DevHelp - - - - - 1619f1df by David Waern at 2009-03-26T23:20:44+00:00 -Wall police in H.B.Html - - - - - b211e13b by Simon Marlow at 2009-03-24T13:00:56+00:00 install Haddock's html stuff - - - - - 78e0b107 by David Waern at 2008-12-07T19:58:53+00:00 Add verbosity flag and utils, remove "verbose" flag - - - - - 913dae06 by David Waern at 2008-12-07T20:01:05+00:00 Add some basic "verbose" mode logging in H.Interface - - - - - 1cbff3bf by David Waern at 2009-03-27T00:07:26+00:00 Fix conflicts - - - - - 22f82032 by David Waern at 2009-03-27T21:15:11+00:00 Remove H.GHC.Typecheck - - - - - 81557804 by David Waern at 2009-03-27T21:19:22+00:00 Remove docNameOrig and use getName everywhere instead - - - - - d8267213 by David Waern at 2009-03-27T21:21:46+00:00 Use docNameOcc instead of nameOccName . getName - - - - - 5d55deab by David Waern at 2009-03-27T21:33:04+00:00 Remove H.DocName and put DocName in H.Types - - - - - 8ba72611 by David Waern at 2009-03-27T22:06:26+00:00 Document DocName - - - - - 605f8ca5 by David Waern at 2009-03-27T22:45:21+00:00 -Wall police - - - - - e4da93ae by David Waern at 2009-03-27T23:12:53+00:00 -Wall police in H.B.Hoogle - - - - - bb255519 by David Waern at 2009-03-27T23:41:28+00:00 Define Foldable and Traversable instances for Located - - - - - f1195cfe by David Waern at 2009-03-27T23:51:34+00:00 Wibble - - - - - 23818d7c by David Waern at 2009-03-28T00:03:55+00:00 -Wall police in H.I.Rename - - - - - 0f050d67 by David Waern at 2009-03-28T00:15:15+00:00 -Wall police in H.I.AttachInstances - - - - - 0f3fe038 by David Waern at 2009-03-28T21:09:41+00:00 Wibble - - - - - 275d4865 by David Waern at 2009-03-28T21:27:06+00:00 Layout fix - - - - - 54ff0ef8 by David Waern at 2009-03-28T21:59:07+00:00 -Wall police in H.I.Create - - - - - 7f58b117 by David Waern at 2009-03-28T22:10:19+00:00 -Wall police in H.Interface - - - - - f0c03b44 by David Waern at 2009-03-28T22:22:59+00:00 -Wall police in Main - - - - - 29da355c by David Waern at 2009-03-28T22:23:39+00:00 Turn on -Wall -Werror - - - - - 446d3060 by David Waern at 2009-04-01T20:40:30+00:00 hlint police - - - - - 3867c9fc by David Waern at 2009-04-01T20:48:42+00:00 hlint police - - - - - bd1f1600 by David Waern at 2009-04-01T20:58:02+00:00 hlint police - - - - - e0e90866 by David Waern at 2009-04-05T12:42:53+00:00 Move H.GHC.Utils to H.GhcUtils - - - - - 9cbd426b by David Waern at 2009-04-05T12:57:21+00:00 Remove Haddock.GHC and move its (small) contents to Main - - - - - b5c2cbfd by David Waern at 2009-04-05T13:07:04+00:00 Fix whitespace and stylistic issues in Main - - - - - 3c04aa56 by porges at 2008-12-07T08:22:19+00:00 add unicode output - - - - - 607918da by David Waern at 2009-04-26T15:09:43+00:00 Resolve conflict - - - - - 4bec6b6b by Simon Marlow at 2009-05-13T10:00:31+00:00 fix markup - - - - - 436ad6f4 by Simon Marlow at 2009-03-23T11:54:45+00:00 clean up - - - - - bdcd1398 by Simon Marlow at 2009-03-24T10:36:45+00:00 new GHC build system: add $(exeext) - - - - - 9c0972f3 by Simon Marlow at 2009-03-24T11:04:31+00:00 update for new GHC build system layout - - - - - d0f3f83a by Ian Lynagh at 2009-03-29T15:31:43+00:00 GHC new build system fixes - - - - - 5a8245c2 by Ian Lynagh at 2009-04-04T20:44:23+00:00 Tweak new build system - - - - - 9c6f2d7b by Simon Marlow at 2009-05-13T10:01:27+00:00 add build instructions for GHC - - - - - 66d07c76 by Ian Lynagh at 2009-05-31T00:37:53+00:00 Quote program paths in ghc.mk - - - - - bb7de2cd by Ian Lynagh at 2009-06-03T22:57:55+00:00 Use a bang pattern on an unlifted binding - - - - - 3ad283fc by Ian Lynagh at 2009-06-13T16:17:50+00:00 Include haddock in GHC bindists - - - - - ac447ff4 by David Waern at 2009-06-24T21:07:50+00:00 Delete Haddock.Exception and move contents to Haddock.Types Only a few lines of code that mainly declares a type - why not just put it in Haddock.Types. - - - - - 4464fb9b by David Waern at 2009-06-24T22:23:23+00:00 Add Haddock module headers Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock at projects.haskell.org. Next step is to add a brief description to each module. - - - - - 5f4c95dd by David Waern at 2009-06-24T22:39:44+00:00 Fix spelling error - - - - - 6d074cdb by David Waern at 2009-06-25T21:53:56+00:00 Document Interface and InstalledInterface better - - - - - d0cbd183 by David Waern at 2009-06-27T12:46:46+00:00 Remove misplaced whitespace in H.I.Rename - - - - - fa381c49 by David Waern at 2009-06-27T13:26:03+00:00 Fix haskell/haddock#104 - create output directory if missing - - - - - 91fb77ae by Ian Lynagh at 2009-06-25T15:59:50+00:00 TAG 2009-06-25 - - - - - 0d853f40 by Simon Peyton Jones at 2009-07-02T15:35:22+00:00 Follow extra field in ConDecl - - - - - b201735d by Ian Lynagh at 2009-07-05T16:50:35+00:00 Update Makefile for the new GHC build system - - - - - df6c0092 by Ian Lynagh at 2009-07-05T17:01:13+00:00 Resolve conflicts - - - - - 1066870a by Ian Lynagh at 2009-07-05T17:01:48+00:00 Remove the -Wwarn hack in the GHC build system - - - - - 7e856076 by Ian Lynagh at 2009-07-05T17:17:59+00:00 Fix warnings - - - - - 5d4cd958 by Ian Lynagh at 2009-07-05T19:35:40+00:00 Bump version number Cabal needs to distinguish between haddocks having a --verbose and --verbosity flag - - - - - 6ee07c99 by David Waern at 2009-07-06T20:14:57+00:00 Wibble - - - - - 2308b66f by David Waern at 2009-07-06T20:24:20+00:00 Clearer printing of versions by runtests.hs - - - - - d4b5d9ab by David Waern at 2009-07-06T21:22:42+00:00 Fix (invisible) bug introduced by unicode patch - - - - - 2caca8d8 by David Waern at 2009-07-06T21:44:10+00:00 Use HscAsm instead of HscC when using TH - - - - - 18f3b755 by David Waern at 2009-07-06T22:10:22+00:00 Update HCAR entry (by Janis) - - - - - a72ac9db by David Waern at 2009-07-06T23:01:35+00:00 Follow HsRecTy change with an #if __GLASGOW_HASKEL__ >= 611 - - - - - 549135d2 by David Waern at 2009-07-06T23:11:41+00:00 Remove unused functions from Haddock.Utils - - - - - b450134a by Isaac Dupree at 2009-07-11T14:59:00+00:00 revert to split-index for large indices - remove the search-box, because browsers have search-for-text abilities anyway. - pick 150 items in index as the arbitrary time at which to split it - notice the bug that identifiers starting with non-ASCII characters won't be listed in split-index, but don't bother to fix it yet (see ticket haskell/haddock#116, http://trac.haskell.org/haddock/ticket/116 ) - - - - - 78a5661e by Isaac Dupree at 2009-07-20T15:37:18+00:00 Implement GADT records in HTML backend - - - - - 4e163555 by Isaac Dupree at 2009-07-21T22:03:25+00:00 add test for GADT records - - - - - 79aa4d6e by David Waern at 2009-07-23T20:40:37+00:00 Update test suite following version bump - - - - - 5932c011 by David Waern at 2009-08-02T10:25:39+00:00 Fix documentation bug - - - - - a6970fca by David Waern at 2009-08-12T23:08:53+00:00 Remove support for ghc 6.8.* from .cabal file - - - - - c1695902 by Ian Lynagh at 2009-07-07T13:35:45+00:00 Fix unused import warnings - - - - - fb6df7f9 by Ian Lynagh at 2009-07-16T00:20:31+00:00 Use cProjectVersion directly rather than going through compilerInfo Fixes the build after changes in GHC - - - - - 548cdd66 by Simon Marlow at 2009-07-28T14:27:04+00:00 follow changes in GHC's ForeignType - - - - - 9395aaa0 by David Waern at 2009-08-13T22:17:33+00:00 Switch from PatternSignatures to ScopedTypeVariables in Main - - - - - eebf39bd by David Waern at 2009-08-14T17:14:28+00:00 Version .haddock files made with GHC 6.10.3/4 correclty - - - - - 58f3e735 by David Waern at 2009-08-14T17:19:37+00:00 Support GHC 6.10.* and 6.11.* only - - - - - 5f63cecc by David Waern at 2009-08-14T22:03:20+00:00 Do not version .haddock file based on GHC patchlevel version We require that the instances of Binary that we use from GHC will not change between patchlevel versions. - - - - - d519de9f by David Waern at 2009-08-14T23:50:00+00:00 Update CHANGES - - - - - 35dccf5c by David Waern at 2009-08-14T23:51:38+00:00 Update version number everywhere - - - - - 6d363fea by David Waern at 2009-08-15T09:46:49+00:00 Update ANNOUNCE - - - - - c7ee6bc2 by David Waern at 2009-08-15T09:47:13+00:00 Remove -Werror Forgot that Hackage doesn't like it. - - - - - a125c12b by David Waern at 2009-08-15T09:49:50+00:00 Require Cabal >= 1.6 - - - - - adb2f560 by Isaac Dupree at 2009-08-12T03:47:14+00:00 Cross-Package Documentation version 4 - - - - - 3d6dc04d by David Waern at 2009-08-15T23:42:57+00:00 Put all the IN_GHC_TREE stuff inside getGhcLibDir - - - - - 56624097 by David Waern at 2009-08-15T23:52:03+00:00 Add --print-ghc-libdir - - - - - f15d3ccb by David Waern at 2009-08-16T00:37:52+00:00 Read base.haddock when running tests We can now test cross-package docs. - - - - - 283f0fb9 by David Waern at 2009-08-16T00:50:59+00:00 Update test output - we now have more links - - - - - 673d1004 by David Waern at 2009-08-16T01:26:08+00:00 Read process.haddock when running tests - - - - - 0d127f82 by David Waern at 2009-08-16T01:43:04+00:00 Add a test for cross-package documentation - - - - - f94db967 by Ian Lynagh at 2009-08-16T18:42:44+00:00 Follow GHC build system changes - - - - - 5151278a by Isaac Dupree at 2009-08-16T19:58:05+00:00 make cross-package list types look nicer - - - - - c41e8228 by Isaac Dupree at 2009-08-18T01:47:47+00:00 Haddock.Convert: export more functions This lets us remove some code in Haddock.Interface.AttachInstances - - - - - 2e5fa398 by Isaac Dupree at 2009-08-18T02:11:05+00:00 switch AttachInstances to use synify code It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication! - - - - - b8b07123 by Isaac Dupree at 2009-08-18T02:23:31+00:00 Find instances using GHC, which is more complete. In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?) - - - - - 6959b451 by Isaac Dupree at 2009-08-17T00:37:18+00:00 fix preprocessor conditional sense - - - - - 942823af by Isaac Dupree at 2009-08-16T22:46:48+00:00 remove ghc 6.8 conditionals from Haddock.Interface - - - - - 4b3ad888 by Isaac Dupree at 2009-08-18T20:24:38+00:00 Fix GHC 6.11 build in Haddock.Convert - - - - - 0a89c5ab by Isaac Dupree at 2009-08-23T00:08:58+00:00 hacks to make it compile without fnArgDocsn - - - - - 7b3bed43 by Isaac Dupree at 2009-08-23T03:01:28+00:00 less big-Map-based proper extraction of constructor subdocs - - - - - b21c279a by Isaac Dupree at 2009-08-23T03:02:06+00:00 Html: remove unnecessary+troublesome GHC. qualifications - - - - - 96c97115 by Isaac Dupree at 2009-08-23T03:08:03+00:00 Move doc parsing/lexing into Haddock for ghc>=6.11 - - - - - e1cec02d by Isaac Dupree at 2009-08-23T05:08:14+00:00 get rid of unused DocMap parameter in Html - - - - - 66960c59 by Isaac Dupree at 2009-08-23T05:54:20+00:00 fix horrible named-docs-disappearing bug :-) - - - - - a9d7eff3 by Isaac Dupree at 2009-08-23T06:26:36+00:00 re-implement function-argument docs ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently. - - - - - 8bf6852c by Isaac Dupree at 2009-08-23T07:26:05+00:00 cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! - - - - - 30115a64 by Isaac Dupree at 2009-08-23T18:22:47+00:00 Improve behavior for unfindable .haddock - - - - - aa364bda by Isaac Dupree at 2009-08-23T18:28:16+00:00 add comment for FnArgsDoc type - - - - - 49b23a99 by Isaac Dupree at 2009-08-23T21:52:48+00:00 bugfix: restore fnArgDocs for type-synonyms - - - - - f65f9467 by Isaac Dupree at 2009-08-23T22:06:55+00:00 Backends.Hoogle: eliminate warnings - - - - - a292d216 by Isaac Dupree at 2009-08-23T22:10:24+00:00 Haddock.Convert: eliminate warnings - - - - - 5546cd20 by Isaac Dupree at 2009-08-23T22:12:31+00:00 Haddock.Interface.Rename: eliminate warnings - - - - - 0a9798b6 by Isaac Dupree at 2009-08-23T22:18:47+00:00 Main.hs: remove ghc<6.9 conditionals - - - - - e8f9867f by Isaac Dupree at 2009-08-23T22:27:46+00:00 Main.hs: eliminate warnings (except for OldException) - - - - - 61c64247 by Isaac Dupree at 2009-08-23T22:41:01+00:00 move get*LibDir code in Main.hs, to +consistent code, -duplication - - - - - 948f1e69 by Isaac Dupree at 2009-08-23T23:14:26+00:00 Main.hs: OldException->Exception: which eliminates warnings - - - - - 3d5d5e03 by Isaac Dupree at 2009-08-23T23:20:11+00:00 GhcUtils: ghc >= 6.10 - - - - - 2771d657 by Isaac Dupree at 2009-08-23T23:21:55+00:00 InterfaceFile: ghc >= 6.10 - - - - - d9f2b9d1 by Isaac Dupree at 2009-08-23T23:22:58+00:00 Types: ghc >= 6.10 - - - - - ca39210e by Isaac Dupree at 2009-08-23T23:23:26+00:00 ModuleTree: ghc >= 6.10 - - - - - 883c4e59 by Isaac Dupree at 2009-08-23T23:24:04+00:00 Backends.DevHelp: ghc >= 6.10 - - - - - 04667df5 by Isaac Dupree at 2009-08-23T23:24:37+00:00 Backends.Html: ghc >= 6.10 - - - - - a9f7f25f by Isaac Dupree at 2009-08-23T23:25:24+00:00 Utils: ghc >= 6.10 - - - - - b7105022 by Isaac Dupree at 2009-08-23T23:37:47+00:00 eliminate haskell98 dependency, following GHC's example It turns out I/we already had, and it was only a matter of deleting it from the cabal file. - - - - - 292e0911 by Isaac Dupree at 2009-08-24T01:22:44+00:00 refactor out subordinatesWithNoDocs dep of inferenced-decls fix - - - - - c2ed46a2 by Isaac Dupree at 2009-08-24T01:24:03+00:00 Eradicate wrong runtime warning for type-inferenced exported-functions see the long comment in the patch for why I did it this way :-) - - - - - 4ac0b57c by David Waern at 2009-09-04T22:56:20+00:00 Clean up tyThingToHsSynSig a little Factor out noLoc and use the case construct. Also rename the function to tyThingToLHsDecl, since it doesn't just create type signatures. - - - - - 28ab9201 by David Waern at 2009-09-04T22:58:50+00:00 Wibble - - - - - 0d9fe6d0 by David Waern at 2009-09-06T18:39:30+00:00 Add more copyright owners to H.I.AttachInstances - - - - - 122441b1 by David Waern at 2009-09-06T18:44:12+00:00 Style police - - - - - 1fa79463 by David Waern at 2009-09-06T18:57:45+00:00 Move toHsInstHead to Haddock.Convert and call it synifyInstHead - - - - - 0d42a8aa by David Waern at 2009-09-06T21:11:38+00:00 Use colordiff to display test results if available - - - - - ea9d8e03 by Simon Marlow at 2009-08-24T08:46:14+00:00 Follow changes in GHC's interface file format Word32 instead of Int for FastString and Name offsets - - - - - 537e051e by Simon Marlow at 2009-07-29T14:16:53+00:00 define unpackPackageId (it was removed from GHC) - - - - - 50c63aa7 by David Waern at 2009-09-09T23:18:03+00:00 Remove commented-out code - - - - - 511631fe by David Waern at 2009-09-09T23:19:05+00:00 Correct copyright in H.I.ParseModuleHeader - - - - - 898ec768 by David Waern at 2009-09-11T11:22:29+00:00 Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time. - - - - - 37bec0d5 by Simon Peyton Jones at 2009-09-11T08:28:04+00:00 Track change in HsType - - - - - eb3a97c3 by Ian Lynagh at 2009-09-11T16:07:09+00:00 Allow building with base 4.2 - - - - - bb4205ed by Ian Lynagh at 2009-09-22T13:50:02+00:00 Loosen the GHC dependency - - - - - 5c75deb2 by Ian Lynagh at 2009-09-22T14:08:39+00:00 Fix building with GHC >= 6.12 - - - - - fb131481 by David Waern at 2009-09-11T11:24:48+00:00 Update runtests.hs to work with GHC 6.11 - - - - - ac3a419d by David Waern at 2009-09-11T11:25:14+00:00 Update CrossPackageDocs test - - - - - ec65c3c6 by David Waern at 2009-09-11T11:25:40+00:00 Add reference output for CrossPackageDocs - - - - - 520c2758 by Ian Lynagh at 2009-10-25T17:26:40+00:00 Fix installation in the GHC build system - - - - - 28b3d7df by Ian Lynagh at 2009-11-05T15:57:27+00:00 GHC build system: Make *nix installation work in paths containing spaces - - - - - 5c9bb541 by David Waern at 2009-11-14T11:56:39+00:00 Track change in HsType for the right compiler version - - - - - 905097ce by David Waern at 2009-11-14T12:10:47+00:00 hlint police - - - - - 04920630 by Ian Lynagh at 2009-11-20T13:46:30+00:00 Use defaultObjectTarget rather than HscAsm This fixes haddock when we don't have a native code generator - - - - - 966eb079 by David Waern at 2009-11-15T12:32:21+00:00 Remove commented-out code - - - - - 37f00fc4 by David Waern at 2009-11-22T13:58:48+00:00 Make runtests.hs strip links before diffing Generates easier to read diffs when tests fail. The content of the links is not important anyway since it is not taken into account by the tests. - - - - - 3a9bb8ef by David Waern at 2009-11-22T14:05:06+00:00 Follow findProgramOnPath signature change in runtests.hs - - - - - b26b9e5a by David Waern at 2009-11-22T14:08:40+00:00 Follow removal of GHC.MVar from base in CrossPackageDocs - - - - - f4d90ae4 by David Waern at 2009-11-22T14:48:47+00:00 Make copy.hs strip link contents before copying No more updating of reference files when URLs in links changes. - - - - - 4c9c420d by David Waern at 2009-11-22T15:26:41+00:00 Update test reference output * More links (Int, Float etc) * Stripped link contents - - - - - a62b80e3 by David Waern at 2009-11-23T23:19:39+00:00 Update CrossPackageDocs reference output - Remove GHC.MVar import (removed from base) - Strip link contents - - - - - 43491394 by David Waern at 2009-11-23T23:20:00+00:00 Update test reference files with comments on instances - - - - - 0d370a0b by David Waern at 2009-11-23T23:25:16+00:00 Bump version number - - - - - 2293113e by David Waern at 2009-11-24T20:55:49+00:00 Comments on instances Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances - - - - - bf586f29 by David Waern at 2009-11-27T22:05:15+00:00 Whitespace police - - - - - b8f03afa by David Waern at 2009-11-27T22:11:46+00:00 Remove bad whitespace and commented-out pieces - - - - - 90b8ee90 by David Waern at 2009-11-27T22:15:04+00:00 Whitespace police - - - - - b5ede900 by David Waern at 2009-11-27T22:15:50+00:00 Whitespace police - - - - - e3fddbfe by David Waern at 2009-11-28T13:37:59+00:00 Remove Name from DocInstance It's not used. - - - - - 9502786c by David Waern at 2009-11-28T13:56:54+00:00 Require at least GHC 6.12 While regression testing Haddock, I found a bug that happens with GHC 6.10.3, but not with GHC 6.12-rc2 (haven't tried 6.10.4). I don't have time to track it down. I think we should just always require the latest major GHC version. The time spent on making Haddock work with older versions is too high compared to the time spent on bugfixing, refactoring and features. - - - - - 8fa688d8 by David Waern at 2009-11-28T15:05:03+00:00 Remove cruft due to compatibility with older GHCs - - - - - 46fbbe9d by David Waern at 2009-11-28T15:07:50+00:00 Add a documentation header to Haddock.Convert - - - - - c3d2cc4a by David Waern at 2009-11-28T15:10:14+00:00 Remove unused H.Utils.FastMutInt2 - - - - - 490aba80 by David Waern at 2009-11-28T15:36:36+00:00 Rename Distribution.Haddock into Documentation.Haddock - - - - - 33ee2397 by David Waern at 2009-11-28T15:36:47+00:00 Fix error message - - - - - a5a3b950 by David Waern at 2009-11-28T16:58:39+00:00 Add a test flag that brings in QuickCheck - - - - - fa049e13 by David Waern at 2009-11-28T19:32:18+00:00 Say that we want quickcheck 2 - - - - - f32b0d9b by David Waern at 2009-11-28T19:32:40+00:00 Add an Arbitrary instance for HsDoc - - - - - da9a8bd7 by David Waern at 2009-11-28T20:15:30+00:00 Rename HsDoc back into Doc - - - - - edb60101 by David Waern at 2009-11-28T22:16:16+00:00 Move H.Interface.Parse/Lex to H.Parse/Lex These are not just used to build Interfaces. - - - - - 0656a9b8 by David Waern at 2009-11-28T23:12:14+00:00 Update version number in test suite - - - - - 5e8c6f4a by David Waern at 2009-12-21T14:12:41+00:00 Improve doc of DocName - - - - - 7868e551 by Ian Lynagh at 2009-09-22T10:43:03+00:00 TAG GHC 6.12-branch created - - - - - 0452a3ea by Ian Lynagh at 2009-12-15T12:46:07+00:00 TAG GHC 6.12.1 release - - - - - 65e9be62 by David Waern at 2009-12-21T16:58:58+00:00 Update CHANGES - - - - - 145cee32 by David Waern at 2009-12-21T16:59:09+00:00 TAG 2.6.0 - - - - - 3c552008 by David Waern at 2009-12-22T17:11:14+00:00 Update ANNOUNCE - - - - - 931f9db4 by David Waern at 2010-01-22T19:57:17+00:00 Convert haddock.vim to use unix newlines - - - - - 4e56588f by David Waern at 2010-01-22T22:11:17+00:00 Remove unnecessary (and inexplicable) uses of nub - - - - - 744bb4d1 by David Waern at 2010-01-22T22:12:14+00:00 Follow move of parser and lexer - - - - - e34bab14 by David Waern at 2010-01-22T22:49:13+00:00 Use findProgramLocation instead of findProgramOnPath in runtests.hs - - - - - 8d39891b by Isaac Dupree at 2010-01-14T18:53:18+00:00 fix html arg-doc off-by-one and silliness - - - - - 9401f2e9 by David Waern at 2010-01-22T22:57:03+00:00 Create a test for function argument docs - - - - - 507a82d7 by David Waern at 2010-01-22T23:24:47+00:00 Put parenthesis around type signature arguments of function type - - - - - 8a305c28 by David Waern at 2010-01-23T17:26:59+00:00 Add reference file for the FunArgs test - - - - - 1309d5e1 by David Waern at 2010-01-24T16:05:08+00:00 Improve FunArg test and update Test.html.ref - - - - - 2990f055 by Yitzchak Gale at 2010-02-14T16:03:46+00:00 Do not generate illegal character in HTML ID attribute. - - - - - c5bcab7a by David Waern at 2010-02-22T22:10:30+00:00 Fix Haddock markup error in comment - - - - - c6416a73 by David Waern at 2010-02-24T22:55:08+00:00 Large additions to the Haddock API Also improved and added more doc comments. - - - - - 57d289d7 by David Waern at 2010-02-24T22:58:02+00:00 Remove unused ifaceLocals - - - - - 80528d93 by David Waern at 2010-02-25T21:05:09+00:00 Add HaddockModInfo to the API - - - - - 82806848 by David Waern at 2010-02-25T21:05:27+00:00 Wibble - - - - - 744cad4c by David Waern at 2010-02-25T23:30:59+00:00 Make it possible to run a single test - - - - - 6a806e4c by David Waern at 2010-03-14T14:19:39+00:00 Bump version number - - - - - a5a8e4a7 by David Waern at 2010-03-14T14:36:35+00:00 Update ANNOUNCE - - - - - 6f05435e by Simon Hengel at 2010-03-15T20:52:42+00:00 Add missing dependencies for 'library' in haddock.cabal - - - - - faefe2bd by David Waern at 2010-03-15T22:29:37+00:00 Solve conflicts - - - - - 9808ad52 by David Waern at 2010-03-15T22:51:21+00:00 Bump version number - - - - - eb0bf60b by David Waern at 2010-03-15T22:52:32+00:00 Update CHANGES - - - - - f95cd891 by David Waern at 2010-03-15T23:01:06+00:00 Add Paths_haddock to other-modules of library - - - - - 65997b0a by David Waern at 2010-03-15T23:14:59+00:00 Update CHANGES - - - - - 7e251731 by David Waern at 2010-03-15T23:15:30+00:00 Bump version number - - - - - c9cd0ddc by David Waern at 2010-03-16T00:28:34+00:00 Fix warning - - - - - 1cac2d93 by Simon Peyton Jones at 2010-01-04T15:22:16+00:00 Fix imports for new location of splitKindFunTys - - - - - 474f26f6 by Simon Peyton Jones at 2010-02-10T14:36:06+00:00 Update Haddock for quasiquotes - - - - - 0dcc06c0 by Simon Peyton Jones at 2010-02-10T10:59:45+00:00 Track changes in HsTyVarBndr - - - - - 2d84733a by Simon Peyton Jones at 2010-02-10T14:52:44+00:00 Track HsSyn chnages - - - - - 9e3adb8b by Ian Lynagh at 2010-02-20T17:09:42+00:00 Resolve conflicts - - - - - a3e72ff8 by Simon Peyton Jones at 2010-03-04T13:05:16+00:00 Track change in HsUtils; and use a nicer function not an internal one - - - - - 27994854 by David Waern at 2010-03-18T22:22:27+00:00 Fix build with GHC 6.12.1 - - - - - 11f6e488 by David Waern at 2010-03-18T22:24:09+00:00 Bump version in test reference files - - - - - 0ef2f11b by David Waern at 2010-03-20T00:56:30+00:00 Fix library part of cabal file when in ghc tree - - - - - 3f6146ff by Mark Lentczner at 2010-03-20T22:30:11+00:00 First, experimental XHTML rendering switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString) - - - - - b8ab329b by Mark Lentczner at 2010-03-20T22:54:01+00:00 apply changes to Html.hs to Xhtml/*.hs incorporate changes that were made between the time Html.hs was copied and split into Xhtml.hs and Xhtml/*.hs includes patchs after "Wibble" (!) through "Fix build with GHC 6.12.1" - - - - - 73df2433 by Ian Lynagh at 2010-03-20T21:56:37+00:00 Follow LazyUniqFM->UniqFM in GHC - - - - - db4f602b by David Waern at 2010-03-29T22:00:01+00:00 Fix build with GHC 6.12 - - - - - d8dca088 by Simon Hengel at 2010-04-02T16:39:55+00:00 Add missing dependencies to cabal file - - - - - e2adc437 by Simon Hengel at 2010-04-02T14:08:40+00:00 Add markup support for interactive examples - - - - - e882ac05 by Simon Hengel at 2010-04-02T14:11:53+00:00 Add tests for interactive examples - - - - - 5a07a6d3 by David Waern at 2010-04-07T17:05:20+00:00 Propagate source positions from Lex.x to Parse.y - - - - - 6493b46f by David Waern at 2010-04-07T21:48:57+00:00 Let runtests.hs die when haddock has not been built - - - - - 5e34423e by David Waern at 2010-04-07T22:01:13+00:00 Make runtests.hs slightly more readable - - - - - 321d59b3 by David Waern at 2010-04-07T22:13:27+00:00 Fix haskell/haddock#75 Add colons to the $ident character set. - - - - - 37b08b8d by David Waern at 2010-04-08T00:32:52+00:00 Fix haskell/haddock#118 Avoid being too greedy when lexing URL markup (<..>), in order to allow multiple URLs on the same line. Do the same thing with <<..>> and #..#. - - - - - df8feac9 by David Waern at 2010-04-08T00:57:33+00:00 Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. - - - - - 1ca6f84b by David Waern at 2010-04-08T01:03:06+00:00 Add ghc-prim to test suite deps - - - - - 27371e3a by Simon Hengel at 2010-04-08T19:26:34+00:00 Let parsing fails on paragraphs that are immediately followed by an example This is more consistent with the way we treat code blocks. - - - - - 83096e4a by David Waern at 2010-04-08T21:20:00+00:00 Improve function name - - - - - 439983ce by David Waern at 2010-04-10T10:46:14+00:00 Fix haskell/haddock#112 No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds. - - - - - 5c0d35d7 by David Waern at 2010-04-10T10:54:06+00:00 Rename startGhc into withGhc - - - - - dca081fa by Simon Hengel at 2010-04-12T19:09:16+00:00 Add documentation for interactive examples - - - - - c7f26bfa by David Waern at 2010-04-13T00:51:51+00:00 Slight fix to the documentation of examples - - - - - 06eb7c4c by David Waern at 2010-04-13T00:57:05+00:00 Rename Interactive Examples into Examples (and simplify explanation) - - - - - 264830cb by David Waern at 2010-05-10T20:07:27+00:00 Update CHANGES with info about 2.6.1 - - - - - 8e5d4514 by Simon Hengel at 2010-04-18T18:16:54+00:00 Add unit tests for parser - - - - - 68297f40 by David Waern at 2010-05-10T21:53:37+00:00 Improve testsuite README - - - - - f04eb6e4 by David Waern at 2010-05-11T19:14:31+00:00 Re-organise the testsuite structure - - - - - a360f710 by David Waern at 2010-05-11T19:18:03+00:00 Shorten function name - - - - - 1d5dd359 by David Waern at 2010-05-11T21:40:02+00:00 Update runtests.hs following testsuite re-organisation - - - - - ffebe217 by David Waern at 2010-05-11T21:40:10+00:00 Update runtests.hs to use base-4.2.0.1 - - - - - 635de402 by David Waern at 2010-05-11T21:41:11+00:00 Update runparsetests.hs following testsuite reorganisation - - - - - 72137910 by Ian Lynagh at 2010-05-06T20:43:06+00:00 Fix build - - - - - 1a80b76e by Ian Lynagh at 2010-05-06T22:25:29+00:00 Remove redundant import - - - - - 1031a80c by Simon Peyton Jones at 2010-05-07T13:21:09+00:00 Minor wibbles to HsBang stuff - - - - - dd8e7fe5 by Ian Lynagh at 2010-05-08T15:22:00+00:00 GHC build system: Follow "rm" variable changes - - - - - 7f5e6748 by David Waern at 2010-05-13T11:53:02+00:00 Fix build with GHC 6.12.2 - - - - - 7953d4d8 by David Waern at 2010-05-13T18:45:01+00:00 Fixes to comments only - - - - - 8ae8eb64 by David Waern at 2010-05-13T18:57:26+00:00 ModuleMap -> IfaceMap - - - - - 1c3eadc6 by David Waern at 2010-05-13T19:03:13+00:00 Fix whitespace style issues - - - - - e96783c0 by David Waern at 2010-05-13T19:08:53+00:00 Fix comment - - - - - c998a78b by David Waern at 2010-05-13T19:39:00+00:00 Position the module header the same way everywhere Silly, but nice with some consistency :-) - - - - - b48a714e by David Waern at 2010-05-13T19:41:32+00:00 Position of module header, this time in the HTML backends - - - - - f9bfb12e by David Waern at 2010-05-13T19:43:05+00:00 Two newlines between declarations in Main - - - - - 071d44c7 by David Waern at 2010-05-13T19:44:21+00:00 Newlines in Convert - - - - - 036346db by David Waern at 2010-05-13T19:46:47+00:00 Fix a few stylistic issues in H.InterfaceFile - - - - - f0b8379e by David Waern at 2010-05-13T19:47:53+00:00 Add newlines to H.ModuleTree - - - - - 27409f8e by David Waern at 2010-05-13T19:51:10+00:00 Fix stylistic issues in H.Utils - - - - - 24774a11 by David Waern at 2010-05-13T20:00:43+00:00 Structure H.Types better - - - - - 7b6f5e40 by David Waern at 2010-05-13T20:01:04+00:00 Remove bad Arbitrary instance - - - - - fac9f1f6 by David Waern at 2010-05-13T20:05:50+00:00 Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead - - - - - fe6d00c4 by David Waern at 2010-05-13T20:51:55+00:00 Export a couple of more types from the API - - - - - b2e33a5f by David Waern at 2010-05-13T21:27:51+00:00 Improve doc comment for Interface - - - - - c585f2ce by David Waern at 2010-05-13T21:30:14+00:00 Improve documentation of Haddock.Interface - - - - - e6791db2 by David Waern at 2010-05-13T22:07:35+00:00 Remove meaningless comments - - - - - 7801b390 by David Waern at 2010-05-14T17:53:33+00:00 Remove unused modules - - - - - f813e937 by David Waern at 2010-05-14T17:55:17+00:00 Re-direct compilation output to a temporary directory Also add a flag --no-tmp-comp-dir that can be used to get the old behaviour of writing compilation files to GHC's output directory (default "."). - - - - - e56737ec by David Waern at 2010-05-14T18:06:11+00:00 Wibble - - - - - e40b0447 by David Waern at 2010-05-14T19:01:52+00:00 Move flag evaluation code from Main to Haddock.Options Determining the value of "singular" flags (by e.g. taking the last occurrence of the flag) and other flag evaluation should done in Haddock.Options which is the module that is supposed to define the command line interface. This makes Main a bit easier on the eyes as well. - - - - - 27091f57 by David Waern at 2010-05-14T19:05:10+00:00 Wibble - - - - - c658cf61 by David Waern at 2010-05-14T19:06:49+00:00 Re-order things in Haddock.Options a bit - - - - - 8cfdd342 by David Waern at 2010-05-14T19:20:29+00:00 De-tabify Haddock.Options and fix other whitespace issues - - - - - 0df16b62 by David Waern at 2010-05-14T19:25:07+00:00 Improve comments - - - - - 80b38e2b by David Waern at 2010-05-14T19:26:42+00:00 Whitespace police - - - - - fe580255 by David Waern at 2010-05-14T19:31:23+00:00 Wibbles to comments - - - - - a2b43fad by David Waern at 2010-05-14T20:24:32+00:00 Move some more flag functions to Haddock.Options - - - - - 3f895547 by David Waern at 2010-05-14T20:37:12+00:00 Make renderStep a top-level function in Main - - - - - 5cdca11d by David Waern at 2010-05-14T20:39:27+00:00 Spelling in comment - - - - - ad98d14c by David Waern at 2010-05-14T20:40:26+00:00 Comment fixes - - - - - 0bb9218f by David Waern at 2010-05-14T20:49:01+00:00 Whitespace police - - - - - 0f0a533f by David Waern at 2010-05-15T16:42:29+00:00 Improve description of --dump-interface - - - - - 5b2833ac by David Waern at 2010-05-15T17:16:53+00:00 Document --no-tmp-comp-dir - - - - - 8160b170 by David Waern at 2010-05-15T17:18:59+00:00 Wibble - - - - - 570dbe33 by David Waern at 2010-05-18T21:15:38+00:00 HLint police - - - - - 204e425f by David Waern at 2010-05-18T21:16:30+00:00 HLint police - - - - - 6db657ac by David Waern at 2010-05-18T21:16:37+00:00 Wibble - - - - - b942ccd7 by Simon Marlow at 2010-06-02T08:27:30+00:00 Interrupted disappeared in GHC 6.13 (GHC ticket haskell/haddock#4100) - - - - - 3b94a819 by Simon Marlow at 2010-06-02T08:45:08+00:00 Allow base-4.3 - - - - - c5a1fb7c by Simon Marlow at 2010-06-02T09:03:04+00:00 Fix compilation with GHC 6.13 - - - - - 6181296c by David Waern at 2010-06-08T21:09:05+00:00 Display name of prologue file when parsing it fails - - - - - 7cbc6f60 by Ian Lynagh at 2010-06-13T16:20:25+00:00 Remove redundant imports - - - - - 980c804b by Simon Marlow at 2010-06-22T08:41:50+00:00 isLocalAndTypeInferenced: fix for local module names overlapping package modules - - - - - d74d4a12 by Simon Marlow at 2010-06-23T12:03:27+00:00 Unresolved identifiers in Doc get replaced with DocMonospaced rather than plain strings - - - - - d8546783 by Simon Marlow at 2010-06-30T12:45:17+00:00 LaTeX backend (new options: --latex, --latex-style=<style>) - - - - - 437afa9e by David Waern at 2010-07-01T12:02:44+00:00 Fix a few stylistic whitespace issues in LaTeX backend - - - - - 85bc1fae by David Waern at 2010-07-01T15:42:45+00:00 Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this) - - - - - 7d2eb86f by David Waern at 2010-07-01T15:43:33+00:00 Update test following Simon's patch to render unresolved names in monospaced font - - - - - 08fcbcd2 by David Waern at 2010-07-01T16:12:18+00:00 Warning police - - - - - d04a8d7a by David Waern at 2010-07-04T14:53:39+00:00 Fix a bug in attachInstances We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however. - - - - - d10344eb by Simon Hengel at 2010-07-10T09:19:04+00:00 Add missing dependencies to cabal file - - - - - 24090531 by Mark Lentczner at 2010-03-21T04:51:16+00:00 add exports to Xhtml modules - - - - - 84f9a333 by Mark Lentczner at 2010-04-03T19:14:22+00:00 clean up Doc formatting code - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up <pre> sections - - - - - bebccf52 by Mark Lentczner at 2010-04-04T04:51:08+00:00 tweak list css - - - - - 0c2aeb5e by Mark Lentczner at 2010-04-04T06:24:14+00:00 all decls now generate Html not HtmlTable - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code - - - - - dbf73e6e by Mark Lentczner at 2010-04-05T05:02:43+00:00 clean up processExport and place a div around each decl - - - - - e25b7e9f by Mark Lentczner at 2010-04-10T21:23:21+00:00 data decls are now a sequence of paragraphs, not a table - - - - - 89ee0294 by Mark Lentczner at 2010-04-10T21:29:16+00:00 removed commented out code that can't be maintained - - - - - d466f536 by Mark Lentczner at 2010-04-12T04:56:27+00:00 removed declWithDoc and cleaned up data decls in summary - - - - - ed755832 by Mark Lentczner at 2010-04-12T05:07:53+00:00 merge in markupExample changes - - - - - c36f51fd by Mark Lentczner at 2010-04-25T04:56:37+00:00 made record fields be an unordList, not a table - - - - - ed3a28d6 by Mark Lentczner at 2010-04-25T05:23:28+00:00 fixed surround of instance and constructor tables - - - - - 0e35bbc4 by Mark Lentczner at 2010-04-25T05:36:59+00:00 fix class member boxes in summary - - - - - 5041749b by Mark Lentczner at 2010-04-25T05:38:35+00:00 remove unused bodyBox - - - - - e91724db by Mark Lentczner at 2010-04-25T06:26:10+00:00 fixed javascript quoting/escpaing issue - - - - - f4abbb73 by Mark Lentczner at 2010-05-03T23:04:31+00:00 adjust css for current markup - - - - - e75fec4c by Mark Lentczner at 2010-05-04T06:14:34+00:00 added assoicated types and methods back into class decls - - - - - 84169323 by Mark Lentczner at 2010-05-24T13:13:42+00:00 merge in changes from the big-whitespace cleanup - - - - - 3c1c872e by Mark Lentczner at 2010-06-11T21:03:58+00:00 adjust synopsis and bottom bar spacing - - - - - 3c1f9ef7 by Mark Lentczner at 2010-06-11T21:14:44+00:00 fix missing space in "module" lines in synoposis - - - - - 9a137e6d by Mark Lentczner at 2010-06-11T21:34:08+00:00 changed tt elements to code elements - - - - - 50f71ef1 by Mark Lentczner at 2010-06-11T23:27:46+00:00 factored out ppInstances - - - - - 3b9a9de5 by Mark Lentczner at 2010-06-17T17:36:01+00:00 push single constructors (newtype) onto line with decl - - - - - e0f8f2ec by Mark Lentczner at 2010-06-17T22:20:56+00:00 remove <++> connector - - - - - 56c075dd by Mark Lentczner at 2010-07-13T05:26:21+00:00 change to new page structure - - - - - 04be6ca7 by Mark Lentczner at 2010-07-14T04:21:55+00:00 constructors and args as dl lists, built in Layout.hs - - - - - 65aeafc2 by Mark Lentczner at 2010-07-14T05:38:32+00:00 better interface to subDecls - - - - - 72032189 by Mark Lentczner at 2010-07-14T07:04:10+00:00 made subDecl tables looks just so - - - - - b782eca2 by Mark Lentczner at 2010-07-14T16:00:54+00:00 convert args to SubDecl format - - - - - cc75e98f by Mark Lentczner at 2010-07-14T16:28:53+00:00 convert instances to SubDecl - - - - - 34e2aa5a by Mark Lentczner at 2010-07-14T21:07:32+00:00 removing old table cruft from Layout.hs - - - - - d5810d95 by Mark Lentczner at 2010-07-14T21:54:58+00:00 methods and associated types in new layout scheme - - - - - 65ef9579 by Mark Lentczner at 2010-07-14T23:43:42+00:00 clean up synopsis lists - - - - - e523318f by Mark Lentczner at 2010-07-15T05:02:26+00:00 clean up of anchors - - - - - 1215dfc5 by Mark Lentczner at 2010-07-15T23:53:01+00:00 added two new themes and rough css switcher - - - - - 7f0fd36f by Mark Lentczner at 2010-07-16T04:57:38+00:00 fixed package catpion, added style menu - - - - - 0dd4999c by Mark Lentczner at 2010-07-16T20:12:39+00:00 new output for mini_ pages - - - - - 64b2810b by Mark Lentczner at 2010-07-16T20:58:41+00:00 reformat index-frames - - - - - 3173f555 by Mark Lentczner at 2010-07-16T22:41:53+00:00 convert index to new markup - - - - - b0a4b7c9 by Mark Lentczner at 2010-07-17T04:07:22+00:00 convert index.html to new markup, adjust module markup - - - - - 8261ae1e by Mark Lentczner at 2010-07-17T05:07:29+00:00 classing styling of ancillary pages - - - - - 2a4fb025 by Mark Lentczner at 2010-07-17T05:11:45+00:00 clean up Layout.hs: no more vanillaTable - - - - - 87eec685 by Mark Lentczner at 2010-07-17T05:35:16+00:00 clean up Util.hs - - - - - d304e9b0 by Mark Lentczner at 2010-07-17T05:38:50+00:00 qualify import of XHtml as XHtml - - - - - 7dc05807 by Mark Lentczner at 2010-07-17T06:17:53+00:00 factored out head element generation - - - - - 9cdaec9e by Mark Lentczner at 2010-07-17T06:44:54+00:00 refactored out main page body generation - - - - - 8a51019e by Mark Lentczner at 2010-07-17T06:48:20+00:00 moved footer into only place that used it - - - - - efa479da by Mark Lentczner at 2010-07-17T18:48:30+00:00 styling auxillary pages for tibbe and snappy themes - - - - - 81de5509 by Mark Lentczner at 2010-07-18T04:41:38+00:00 fixed alphabet on index page, and styling of it and packages in module lists - - - - - 20718c1a by Mark Lentczner at 2010-07-18T05:34:29+00:00 cleaned up div functions in Layout.hs - - - - - 60d50453 by Mark Lentczner at 2010-07-18T05:48:39+00:00 added content div to main pages - - - - - ed16561c by Mark Lentczner at 2010-07-18T06:12:22+00:00 add .doc class to documentation blocks - - - - - f5c781b0 by Mark Lentczner at 2010-07-19T05:20:53+00:00 refactoring of anchor ID and fragment handling - - - - - a69a93bf by Mark Lentczner at 2010-07-19T05:35:55+00:00 remove an explicit bold tag - replace with .def class - - - - - d76c7225 by Mark Lentczner at 2010-07-19T06:56:15+00:00 rename Haddock.Backends.Xhtml.Util to Utils - - - - - 5a58c0da by David Waern at 2010-07-21T13:30:54+00:00 Remove trailing whitespace in Haddock.Backends.Xhtml - - - - - 0652aa17 by David Waern at 2010-07-21T13:33:21+00:00 Align a few comments - - - - - 785776c3 by David Waern at 2010-07-21T13:39:04+00:00 Remove trailing whitespace in H.B.X.Decl - - - - - 71a30710 by David Waern at 2010-07-21T13:44:27+00:00 Remove more trailing whitespace - - - - - 38750394 by David Waern at 2010-07-21T13:50:43+00:00 Style police - - - - - 3023d940 by David Waern at 2010-07-21T14:01:22+00:00 Style police in H.B.X.Decl - - - - - df16e9e6 by David Waern at 2010-07-21T14:14:45+00:00 Style police in H.B.X.DocMarkup - - - - - 6020e321 by David Waern at 2010-07-21T14:17:32+00:00 More style police - - - - - 86ad8bf5 by David Waern at 2010-07-21T14:21:02+00:00 Style police in H.B.Xhtml - - - - - aea27d03 by David Waern at 2010-07-21T14:42:03+00:00 Fix warnings in LaTeX backend - - - - - 2aff34a9 by David Waern at 2010-07-21T14:50:46+00:00 Style police in LaTeX backend (mainly more newlines) - - - - - e517162d by David Waern at 2010-07-21T15:05:47+00:00 Doc sections in Main - - - - - b971aa0c by David Waern at 2010-07-21T15:06:17+00:00 Trailing whitespace in Documentation.Haddock - - - - - f11628fb by David Waern at 2010-07-21T15:07:06+00:00 Trailing whitespace in Haddock.Convert - - - - - cbaf284c by David Waern at 2010-07-21T15:08:11+00:00 Style police in Haddock.GhcUtils - - - - - 71feb77b by David Waern at 2010-07-21T15:09:06+00:00 Style police in Haddock.InterfaceFile - - - - - 0a9c80e6 by David Waern at 2010-07-21T15:11:33+00:00 Whitespace police - - - - - 6168376c by David Waern at 2010-07-21T15:16:35+00:00 Style police in Haddock.Utils - - - - - 9fe4dd90 by David Waern at 2010-07-21T15:19:31+00:00 Add -fwarn-tabs - - - - - a000d752 by Mark Lentczner at 2010-07-20T17:25:52+00:00 move CSS Theme functions into Themes.hs - - - - - b52b440f by Mark Lentczner at 2010-07-20T17:29:35+00:00 add Thomas Schilling's theme - - - - - e43fa7e8 by Mark Lentczner at 2010-07-21T04:49:34+00:00 correct icon used with Snappy theme - - - - - ba5092d3 by Mark Lentczner at 2010-07-21T04:56:47+00:00 apply Tibbe's updates to his theme - - - - - 7804eef6 by Mark Lentczner at 2010-07-21T05:15:49+00:00 space between "Style" and the downward triangle - - - - - 7131d4c6 by Mark Lentczner at 2010-07-21T17:43:35+00:00 merge with David's source cleanups - - - - - ee65f1cb by David Waern at 2010-07-22T16:50:46+00:00 Fix a bug where we allowed --hoogle, --latex, etc without input files - - - - - e413ff7a by David Waern at 2010-07-22T17:21:58+00:00 Improve function name - - - - - a0fd14f3 by Simon Marlow at 2010-06-30T15:34:32+00:00 fix warnings - - - - - 31f73d2a by David Waern at 2010-07-22T19:29:41+00:00 Solve conflicts - - - - - d563b4a5 by Simon Marlow at 2010-06-30T15:34:37+00:00 fix warning - - - - - 412b6469 by David Waern at 2010-07-22T19:31:28+00:00 Solve conflict - - - - - 35174b94 by Ian Lynagh at 2010-07-06T17:27:16+00:00 Follow mkPState argument order change - - - - - b5c3585c by Simon Marlow at 2010-07-14T08:49:21+00:00 common up code for instance rendering - - - - - d8009560 by Simon Marlow at 2010-07-14T12:37:11+00:00 fix warnings - - - - - a6d88695 by David Waern at 2010-07-24T15:33:33+00:00 Fix build with ghc < 6.13 - - - - - 94cf9de1 by David Waern at 2010-07-24T15:34:37+00:00 Remove conflict left-over - - - - - 313b15c0 by Mark Lentczner at 2010-07-21T22:09:04+00:00 reorganization of nhaddock.css with tibbe - - - - - 9defed80 by Mark Lentczner at 2010-07-21T22:42:14+00:00 further cleanup of nhaddock.css, float TOC, support aux. pages - - - - - 6d944c1b by Mark Lentczner at 2010-07-22T06:22:23+00:00 remove old HTML backend - - - - - b3e8cba5 by Mark Lentczner at 2010-07-22T06:43:32+00:00 remove --html-help support - it was old, out-of-date, and mostly missing - - - - - d2654a08 by Mark Lentczner at 2010-07-22T21:45:34+00:00 tweaks to nhaddock.css - - - - - f73b285c by Mark Lentczner at 2010-07-23T06:19:35+00:00 command like processing for theme selection The bulk of the change is threadnig the selected theme set through functions in Xhtml.hs so that the selected themes can be used when generating the page output. There isn't much going on in most of these changes, just passing it along. The real work is all done in Themes.hs. - - - - - 8bddc90d by Mark Lentczner at 2010-07-23T06:58:31+00:00 drop --themes support, add named theme support decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. - - - - - 20cafd4f by Mark Lentczner at 2010-07-23T17:44:29+00:00 rename --default-themes to --built-in-themes - - - - - 0fe41307 by Mark Lentczner at 2010-07-23T18:33:02+00:00 tweaks to theme for info table, headings, and tables - - - - - cba4fee0 by Mark Lentczner at 2010-07-23T19:13:59+00:00 tweaks for dl layout, though still not used - - - - - 463fa294 by Mark Lentczner at 2010-07-23T21:07:19+00:00 tweak look of mini pages, keywords, and preblocks - - - - - 5472fc02 by Mark Lentczner at 2010-07-24T05:36:15+00:00 slide out Synopsis drawer - - - - - 9d5d5de5 by Mark Lentczner at 2010-07-24T06:02:42+00:00 extend package header and footer to edges of page - - - - - a47c91a2 by Mark Lentczner at 2010-07-24T06:28:44+00:00 fields are def lists, tweak css for style menu, mini pages, arguments - - - - - ca20f23b by Mark Lentczner at 2010-07-24T16:55:22+00:00 excisting last vestiges of the --xhtml flag - - - - - 71fb012e by Mark Lentczner at 2010-07-25T18:47:49+00:00 change how collapsing sections are done make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags - - - - - c168c8d3 by Mark Lentczner at 2010-07-26T00:32:05+00:00 reorganize files in the html lib data dir - - - - - 93324301 by Mark Lentczner at 2010-07-26T01:27:42+00:00 cleaned up Themes.hs - - - - - ad3b5dd4 by Mark Lentczner at 2010-07-26T02:39:15+00:00 make module list use new collapsers - - - - - 1df9bfc6 by Mark Lentczner at 2010-07-27T19:09:25+00:00 remove Tibbe theme - - - - - 8b9b01b3 by Mark Lentczner at 2010-07-27T20:04:03+00:00 move themes into html dir with .theme and .std-theme extensions - - - - - a7beb965 by Mark Lentczner at 2010-07-27T21:06:34+00:00 give a class to empty dd elements so they can be hidden - - - - - a258c117 by Mark Lentczner at 2010-07-27T21:23:58+00:00 remove custom version of copyFile in Xhtml.hs - - - - - b70dba6e by Mark Lentczner at 2010-07-27T22:12:45+00:00 apply margin changes to pre and headings as per group decision, and small cleanups - - - - - e6f722a2 by Mark Lentczner at 2010-07-28T00:03:12+00:00 make info block and package bar links be floatable by placing them first in the dom tree - - - - - c8278867 by Mark Lentczner at 2010-07-28T19:01:18+00:00 styling source links on declarations - - - - - 88fdc399 by Mark Lentczner at 2010-07-29T01:12:46+00:00 styling tweaks don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers - - - - - 8a75b213 by Ian Lynagh at 2010-07-30T20:21:46+00:00 Fix build in GHC tree - - - - - ce8e18b3 by Simon Hengel at 2010-08-03T18:37:26+00:00 Adapt paths to data files in cabal file - - - - - 9701a455 by Simon Hengel at 2010-08-07T13:20:27+00:00 Add missing dependency to cabal file - - - - - 01b838d1 by Mark Lentczner at 2010-07-30T20:19:40+00:00 improved synopsis drawer: on click, not hover - - - - - 7b6f3e59 by Mark Lentczner at 2010-07-30T23:38:55+00:00 put the synopsis back in the other themes - - - - - 7b2904c9 by Mark Lentczner at 2010-08-11T11:11:26+00:00 close arrows on expanded synopsis drawer - - - - - ea19e177 by Mark Lentczner at 2010-08-12T21:16:45+00:00 width and font changes removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent - - - - - 5ced00c0 by Mark Lentczner at 2010-08-13T15:09:55+00:00 implemented YUI's CSS font approach - - - - - 2799c548 by Mark Lentczner at 2010-08-13T15:11:59+00:00 adjusted margin to 2em, 1 wasn't enough - - - - - 58f06893 by Mark Lentczner at 2010-08-13T15:48:44+00:00 removed underlining on hover for named anchors headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute - - - - - 7aced4c4 by Mark Lentczner at 2010-08-13T15:50:22+00:00 more space between elements - - - - - 5a3c1cce by Mark Lentczner at 2010-08-13T16:43:43+00:00 adjusted font sizes of auxilary pages per new scheme - - - - - 487539ef by Mark Lentczner at 2010-08-13T21:43:41+00:00 add Frames button and clean up frames.html - - - - - c1a140b6 by Mark Lentczner at 2010-08-13T22:17:48+00:00 move frames button to js - - - - - b0bdb68e by Mark Lentczner at 2010-08-14T03:44:46+00:00 build style menu in javascript moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page - - - - - 43ab7120 by Mark Lentczner at 2010-08-16T15:15:37+00:00 font size and margin tweaks - - - - - c0b68652 by Mark Lentczner at 2010-08-17T18:19:52+00:00 clean up collapser logics javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS - - - - - 5d573427 by Mark Lentczner at 2010-08-17T23:06:02+00:00 don't collapse entries in module list when clicking on links - - - - - 8c307c4a by Mark Lentczner at 2010-08-17T23:21:43+00:00 add missing data file to .cabal - - - - - 414bcfcf by Mark Lentczner at 2010-08-17T23:28:47+00:00 remove synopsis when in frames - - - - - ba0fa98a by Mark Lentczner at 2010-08-18T16:16:11+00:00 layout tweeks - mini page font size, toc color, etc. - - - - - 63c1bed1 by Mark Lentczner at 2010-08-18T19:50:02+00:00 margin fiddling - - - - - c311c094 by Mark Lentczner at 2010-08-20T01:37:55+00:00 better synopsis handling logic - no flashing - - - - - f1fe5fa8 by Mark Lentczner at 2010-08-20T01:41:06+00:00 fix small layout issues mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers - - - - - 0de84d77 by Mark Lentczner at 2010-08-20T02:13:09+00:00 made style changing and cookies storage robust - - - - - 1ef064f9 by Thomas Schilling at 2010-08-04T13:12:22+00:00 Make synopsis frame behave properly in Firefox. In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. - - - - - dd1c9a94 by Mark Lentczner at 2010-08-21T01:46:19+00:00 remove Snappy theme - - - - - 2353a90d by Mark Lentczner at 2010-08-25T05:16:19+00:00 fix occasional v.scroll bars on pre blocks (I think) - - - - - 459b8bf1 by Simon Hengel at 2010-08-08T10:12:45+00:00 Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API - - - - - b1b68675 by David Waern at 2010-08-26T20:31:58+00:00 Follow recent API additions with some refactorings Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. - - - - - 264d4d67 by David Waern at 2010-08-26T21:40:59+00:00 Get rid of GhcModule and related cruft We can get everything we need directly from TypecheckedModule. - - - - - 0feacec2 by Mark Lentczner at 2010-08-26T23:44:13+00:00 fixed CSS for ordered lists and def lists in doc blocks - - - - - 2997e0c2 by Mark Lentczner at 2010-08-26T23:45:03+00:00 support both kinds of enumerated lists in doc markup The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported - - - - - 5d4ddeec by Mark Lentczner at 2010-08-27T21:29:48+00:00 fix broken header link margins - - - - - 614456ba by Mark Lentczner at 2010-08-27T22:16:19+00:00 fix table of contents CSS - - - - - 03f329a2 by David Waern at 2010-08-28T16:36:09+00:00 Update tests following switch to the Xhtml backend - - - - - ca689fa2 by Mark Lentczner at 2010-08-28T18:25:16+00:00 fix def lists - - - - - 18e1d3d2 by Mark Lentczner at 2010-08-28T18:26:18+00:00 push footer to bottom of window - - - - - b0ab8d82 by David Waern at 2010-08-28T22:04:32+00:00 Whitespace police - - - - - 2d217977 by David Waern at 2010-08-29T12:44:45+00:00 Remove Snappy data files - - - - - 01e27d5f by David Waern at 2010-08-29T13:03:28+00:00 Add source entity path to --read-interface You can now use this flag like this: --read-interface=<html path>,<source entity path>,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. - - - - - 20bf4aaa by David Waern at 2010-08-29T13:11:03+00:00 Naming wibbles - - - - - ad22463f by Mark Lentczner at 2010-08-29T15:14:54+00:00 make portability block be a table - solves layout issues - - - - - 97bd1ae6 by Mark Lentczner at 2010-08-29T15:17:42+00:00 update golden test for Test due to portability box change - - - - - d37e139e by Mark Lentczner at 2010-08-29T17:07:17+00:00 move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs - - - - - acf52501 by David Waern at 2010-08-29T17:32:36+00:00 Allow building with ghc < 6.16 - - - - - 1cb34ed8 by Ian Lynagh at 2010-07-24T23:18:49+00:00 Flatten the dynflags before parsing - - - - - b36845b4 by Ian Lynagh at 2010-07-24T23:26:49+00:00 Follow flattenLanguageFlags -> flattenExtensionFlags rename - - - - - 7f7fcc7e by David Waern at 2010-08-29T17:46:23+00:00 Use flattenExtensionFlags with ghc >= 6.13 only - - - - - 13cf9411 by Ian Lynagh at 2010-08-01T18:09:54+00:00 Make the main haddock script versioned, and make plain "haddock" a symlink - - - - - 495cbff2 by Ian Lynagh at 2010-08-18T18:57:24+00:00 Fix installation in the GHC build system Data-files are now in subdirectories, so we need to handle that - - - - - 88ebab0a by Ian Lynagh at 2010-08-18T19:43:53+00:00 GHC build system: Add all the data files to BINDIST_EXTRAS - - - - - 65837172 by David Waern at 2010-08-29T20:12:34+00:00 Update Test - - - - - 094bbaa2 by David Waern at 2010-08-29T20:55:14+00:00 Revert update to Test - - - - - a881cfb3 by David Waern at 2010-08-31T18:24:15+00:00 Bump version number - - - - - 1fc8a3eb by David Waern at 2010-08-31T22:32:27+00:00 Update ANNOUNCE - - - - - ee1df9d0 by David Waern at 2010-08-31T22:33:11+00:00 Update CHANGES - - - - - 394cc854 by David Waern at 2010-08-31T22:33:23+00:00 Update interface file versioning to work with ghc 6.14/15 - - - - - 7d03b79b by David Waern at 2010-08-31T22:36:00+00:00 Update test output following version change - - - - - a48d82d1 by Mark Lentczner at 2010-09-01T04:29:35+00:00 sort options in doc to match --help output removed --html-help option, as it is no longer supported - - - - - 06561aeb by Mark Lentczner at 2010-09-01T05:29:32+00:00 update options documentation rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents - - - - - 57dea832 by Mark Lentczner at 2010-09-01T05:31:27+00:00 slight wording change about Frames mode - - - - - fa1f6da3 by David Waern at 2010-09-01T10:57:44+00:00 Update doc configure script to find docbook stylesheets on arch linux - - - - - addff770 by David Waern at 2010-09-01T11:02:29+00:00 Wibble - - - - - 8399006d by David Waern at 2010-09-01T11:19:21+00:00 Replace ghci> with >>> in example syntax - - - - - 35074cf8 by David Waern at 2010-09-01T19:03:27+00:00 Improve docs for --no-tmp-comp-dir - - - - - 0f8f8cfd by David Waern at 2010-09-02T11:22:27+00:00 Add a list of contributors to the user guide Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. - - - - - 42ccf099 by David Waern at 2010-09-02T11:29:22+00:00 Update copyright years in license - - - - - 0d560479 by David Waern at 2010-09-02T11:38:52+00:00 Update release instructions - - - - - 72ab7796 by David Waern at 2010-09-02T19:27:08+00:00 Add a note to ANNOUNCE - - - - - bf9d9c5d by David Waern at 2010-09-02T19:27:48+00:00 H.Utils needs FFI on Win+MinGW - - - - - 048ae44a by Mark Lentczner at 2010-09-04T23:19:47+00:00 make TOC group header identifiers validate - - - - - 8c6faf36 by Simon Michael at 2010-09-22T07:12:34+00:00 add hints for cleaner darcs show authors output - - - - - 9909bd17 by Simon Michael at 2010-09-22T17:58:06+00:00 print haddock coverage info on stdout when generating docs A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability. - - - - - 6da72171 by David Waern at 2010-10-03T21:31:24+00:00 Style wibble - - - - - 2f8d8e4d by Tobias Brandt at 2010-08-27T07:01:21+00:00 adding the option to fully qualify identifiers - - - - - 833be6c6 by Tobias Brandt at 2010-08-27T15:50:28+00:00 adding support for local and relative name qualification - - - - - df15c4e9 by Tobias Brandt at 2010-08-27T15:56:37+00:00 corrected qualification help message - - - - - 449e9ce1 by David Waern at 2010-10-16T17:34:30+00:00 Solve conflicts - - - - - 3469bda5 by David Waern at 2010-10-16T18:42:40+00:00 Use "qual" as an abbreviation for qualification instead of "quali" for consistency - - - - - 97c2d728 by David Waern at 2010-10-16T18:47:07+00:00 Style police - - - - - ce14fbea by David Waern at 2010-10-16T21:15:25+00:00 Style police - - - - - fdf29e9d by David Waern at 2010-10-17T00:30:44+00:00 Add a pointer to the style guide - - - - - 8e6b44e8 by rrnewton at 2010-10-24T03:19:28+00:00 Change to index pages: include an 'All' option even when subdividing A-Z. - - - - - 755b131c by David Waern at 2010-11-14T19:39:36+00:00 Bump version - - - - - d0345a04 by David Waern at 2010-11-14T19:41:59+00:00 TAG 2.8.1 - - - - - f6221508 by Simon Peyton Jones at 2010-09-13T09:53:00+00:00 Adapt to minor changes in internal GHC functions - - - - - 1290713d by Ian Lynagh at 2010-09-15T10:37:18+00:00 Remove duplicate Outputable instance for Data.Map.Map - - - - - 87f69eef by Ian Lynagh at 2010-09-21T15:01:10+00:00 Bump GHC dep upper bound - - - - - af36e087 by Ian Lynagh at 2010-09-21T15:12:02+00:00 Fix up __GLASGOW_HASKELL__ tests - - - - - ad67716c by Ian Lynagh at 2010-09-21T20:31:35+00:00 Don't build haddock is HADDOCK_DOCS is NO - - - - - 63b3f1f5 by Ian Lynagh at 2010-09-21T21:39:51+00:00 Fixes for when HADDOCK_DOCS=NO - - - - - e92bfa42 by Ian Lynagh at 2010-09-29T21:15:38+00:00 Fix URL creation on Windows: Use / not \ in URLs. Fixes haskell/haddock#4353 - - - - - 66c55e05 by Ian Lynagh at 2010-09-30T17:03:34+00:00 Tidy up haddock symlink installation In particular, it now doesn't get created if we aren't installing haddock. - - - - - 549b5556 by Ian Lynagh at 2010-10-23T21:17:14+00:00 Follow extension-flattening change in GHC - - - - - d7c2f72b by David Waern at 2010-11-14T20:17:55+00:00 Bump version to 2.8.2 - - - - - 6989a3a9 by David Waern at 2010-11-14T20:26:01+00:00 Solve conflict - - - - - 055c6910 by Ian Lynagh at 2010-09-22T15:36:20+00:00 Bump GHC dep - - - - - c96c0763 by Simon Marlow at 2010-10-27T11:09:44+00:00 follow changes in the GHC API - - - - - 45907129 by David Waern at 2010-11-07T14:00:58+00:00 Update the HCAR entry - - - - - 61940b95 by David Waern at 2010-11-07T14:07:34+00:00 Make the HCAR entry smaller - - - - - aa590b7d by David Waern at 2010-11-14T21:30:59+00:00 Update HCAR entry with November 2010 version - - - - - 587f9847 by David Waern at 2010-11-14T23:48:17+00:00 Require ghc >= 7.0 - - - - - ff5c647c by David Waern at 2010-11-14T23:49:09+00:00 TAG 2.8.2 - - - - - 937fcb4f by David Waern at 2010-11-14T23:49:45+00:00 Solve conflict - - - - - 8e5d0c1a by David Waern at 2010-11-15T21:09:50+00:00 Remove code for ghc < 7 - - - - - 3d47b70a by David Waern at 2010-11-15T21:11:06+00:00 Fix bad merge - - - - - 7f4a0d8a by David Waern at 2010-11-15T21:13:57+00:00 Remove more ghc < 7 code - - - - - 9ee34b50 by David Waern at 2010-11-15T21:31:25+00:00 Match all AsyncExceptions in exception handler - - - - - 42849c70 by David Waern at 2010-11-15T21:35:31+00:00 Just say "internal error" instead of "internal Haddock or GHC error" - - - - - c88c809b by David Waern at 2010-11-15T21:44:19+00:00 Remove docNameOcc under the motto "don't name compositions" - - - - - b798fc7c by David Waern at 2010-11-15T23:27:13+00:00 Wibble - - - - - 2228197e by David Waern at 2010-11-15T23:28:24+00:00 Rename the HCAR entry file - - - - - 8a3f9090 by David Waern at 2010-11-16T00:05:29+00:00 Remove Haskell 2010 extensions from .cabal file - - - - - c7a0c597 by David Waern at 2010-11-16T00:10:28+00:00 Style wibbles - - - - - cde707a5 by David Waern at 2010-11-16T00:12:00+00:00 Remove LANGUAGE ForeignFunctionInterface pragmas - - - - - 1dbda8ed by David Waern at 2010-11-16T00:17:21+00:00 Make a little more use of DoAndIfThenElse - - - - - 4c45ff6e by David Waern at 2010-11-16T00:59:41+00:00 hlint police - - - - - d2feaf09 by David Waern at 2010-11-16T01:14:15+00:00 hlint police - - - - - 99876e97 by David Waern at 2010-11-20T19:06:00+00:00 Haddock documentation updates - - - - - 65ce6987 by David Waern at 2010-11-20T19:42:51+00:00 Follow the style guide closer in Haddock.Types and improve docs - - - - - 28ca304a by tob.brandt at 2010-11-20T17:04:40+00:00 add full qualification for undocumented names - - - - - d61341e3 by David Waern at 2010-11-20T20:04:15+00:00 Re-structure qualification code a little - - - - - 0057e4d6 by David Waern at 2010-11-20T20:07:55+00:00 Re-order functions - - - - - d7279afd by David Waern at 2010-11-21T03:39:54+00:00 Add BangPatterns to alex and happy source files - - - - - 629fe60e by tob.brandt at 2010-11-23T23:35:11+00:00 documentation for qualification - - - - - 37031cee by David Waern at 2010-11-23T21:06:44+00:00 Update CHANGES - don't mention 2.8.2, we won't release it - - - - - f2489e19 by David Waern at 2010-12-01T21:57:11+00:00 Update deps of runtests.hs to work with ghc 7.0.1 - - - - - d3657e9a by David Waern at 2010-12-01T22:04:57+00:00 Make tests compile with ghc 7.0.1 - - - - - a2f09d9b by David Waern at 2010-12-01T22:06:59+00:00 Update tests following version bump - - - - - 50883ebb by David Waern at 2010-12-06T14:09:18+00:00 Update tests following recent changes - - - - - fc2fadeb by David Waern at 2010-12-06T14:17:29+00:00 Add a flag --pretty-html for rendering indented html with newlines - - - - - 30832ef2 by David Waern at 2010-12-06T14:17:35+00:00 Use --pretty-html when running the test suite. Makes it easier to compare output - - - - - a0b81b31 by David Waern at 2010-12-06T14:18:27+00:00 Wibble - - - - - 3aaa23fe by David Waern at 2010-12-06T14:19:29+00:00 Haddockify ppHtml comments - - - - - 24bb24f0 by David Waern at 2010-12-06T14:23:15+00:00 Remove --debug. It was't used, and --verbosity should take its place - - - - - 6bc076e5 by David Waern at 2010-12-06T14:25:37+00:00 Rename golden-tests into html-tests. "golden tests" sounds strange - - - - - 53301e55 by David Waern at 2010-12-06T14:26:26+00:00 QUALI -> QUAL in the description --qual for consistency - - - - - 98b6affb by David Waern at 2010-12-06T21:54:02+00:00 Bump version - - - - - 371bf1b3 by David Waern at 2010-12-06T22:08:55+00:00 Update tests following version bump - - - - - 25be762d by David Waern at 2010-12-06T22:21:03+00:00 Update CHANGES - - - - - 7c7dac71 by David Waern at 2010-12-06T22:33:43+00:00 Update ANNOUNCE - - - - - 30d7a5f2 by Simon Peyton Jones at 2010-11-15T08:38:38+00:00 Alex generates BangPatterns, so make Lex.x accept them (It'd be better for Alex to generate this pragma.) - - - - - 605e8018 by Simon Marlow at 2010-11-17T11:37:24+00:00 Add {-# LANGUAGE BangPatterns #-} to mollify GHC - - - - - a46607ba by David Waern at 2010-12-07T14:08:10+00:00 Solve conflicts - - - - - b28cda66 by David Waern at 2010-12-09T20:41:35+00:00 Docs: Mention that \ is a special character in markup - - - - - a435bfdd by Ian Lynagh at 2010-11-17T14:01:19+00:00 TAG GHC 7.0.1 release - - - - - 5a15a05a by David Waern at 2010-12-11T17:51:19+00:00 Fix indentation problem - - - - - 4232289a by Lennart Kolmodin at 2010-12-17T18:32:03+00:00 Revise haddock.cabal given that we now require ghc-7 default-language should be Haskell2010, slight new semantics for extensions. Rewrite into clearer dependencies of base and Cabal. - - - - - a36302dc by David Waern at 2010-12-19T17:12:37+00:00 Update CHANGES - - - - - 7c8b85b3 by David Waern at 2010-12-19T17:14:24+00:00 Bump version - - - - - cff22813 by Ian Lynagh at 2011-01-05T18:24:27+00:00 Write hoogle output in utf8; fixes GHC build on Windows - - - - - c7e762ea by David Waern at 2011-01-22T00:00:35+00:00 Put title outside doc div when HTML:fying title+prologue Avoids indenting the title, and makes more sense since the title is not a doc string anyway. - - - - - 5f639054 by David Waern at 2011-01-22T16:09:44+00:00 Fix spelling error - contributed by Marco Silva - - - - - c11dce78 by Ian Lynagh at 2011-01-07T02:33:11+00:00 Follow GHC build system changes - - - - - 101cfaf5 by David Waern at 2011-01-08T14:06:44+00:00 Bump version - - - - - af62348b by David Waern at 2011-01-08T14:07:07+00:00 TAG 2.9.2 - - - - - 4d1f6461 by Ian Lynagh at 2011-01-07T23:06:57+00:00 Name the haddock script haddock-ghc-7.0.2 instead of haddock-7.0.2; haskell/haddock#4882 "7.0.2" looked like a haddock version number before - - - - - 8ee4d5d3 by Simon Peyton Jones at 2011-01-10T17:31:12+00:00 Update Haddock to reflect change in hs_tyclds field of HsGroup - - - - - 06f3e3db by Ian Lynagh at 2011-03-03T15:02:37+00:00 TAG GHC 7.0.2 release - - - - - 7de0667d by David Waern at 2011-03-10T22:47:13+00:00 Update CHANGES - - - - - 33a9f1c8 by David Waern at 2011-03-10T22:47:31+00:00 Fix build with ghc 7.0.1 - - - - - 4616f861 by David Waern at 2011-03-10T22:47:50+00:00 TAG 2.9.2-actual - - - - - 0dab5e3c by Simon Hengel at 2011-04-08T15:53:01+00:00 Set shell script for unit tests back to work - - - - - 85c54dee by Simon Hengel at 2011-04-08T16:01:24+00:00 Set unit tests back to work Here "ghci>" was still used instead of ">>>". - - - - - 1cea9b78 by Simon Hengel at 2011-04-08T16:25:36+00:00 Update runtests.hs for GHC 7.0.2 - - - - - 8e5b3bbb by Simon Hengel at 2011-04-08T16:28:49+00:00 Update Haddock version in *.html.ref - - - - - 2545e955 by Simon Hengel at 2011-04-08T17:09:28+00:00 Add support for blank lines in the result of examples Result lines that only contain the string "<BLANKLINE>" are treated as a blank line. - - - - - adf64d2e by Simon Hengel at 2011-04-08T17:36:50+00:00 Add documentation for "support for blank lines in the result of examples" - - - - - c51352ca by David Waern at 2011-05-21T23:57:56+00:00 Improve a haddock comment - - - - - 7419cf2c by David Waern at 2011-05-22T15:41:52+00:00 Use cabal's test suite support to run the test suite This gives up proper dependency tracking of the test script. - - - - - 7770070c by David Waern at 2011-05-22T01:45:44+00:00 We don't need to send DocOptions nor a flag to mkExportItems - - - - - 9d95b7b6 by David Waern at 2011-05-22T21:39:03+00:00 Fix a bug - - - - - 1f93699b by David Waern at 2011-05-22T21:40:21+00:00 Break out fullContentsOf, give it a better name and some documentation The documentation describes how we want this function to eventually behave, once we have fixed a few problems with the current implementation. - - - - - 9a86432f by David Waern at 2011-05-22T21:53:52+00:00 Fix some stylistic issues in mkExportItems - - - - - c271ff0c by David Waern at 2011-05-22T22:09:11+00:00 Indentation - - - - - 93e602b1 by David Waern at 2011-06-10T01:35:31+00:00 Add git commits since switchover: darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower at hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo at earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm at cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo at earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC - - - - - 498da5ae by David Waern at 2011-06-11T00:33:33+00:00 * Merge in git patch from Michal Terepeta >From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001 From: Michal Terepeta <michal.terepeta at gmail.com> Date: Sat, 14 May 2011 19:18:22 +0200 Subject: [PATCH] Follow the change of TypeSig in GHC. This follows the change in GHC to make TypeSig take a list of names (instead of just one); GHC ticket haskell/haddock#1595. This should also improve the Haddock output in case the user writes a type signature that refers to many names: -- | Some comment.. foo, bar :: ... will now generate the expected output with one signature for both names. - - - - - 094607fe by Ian Lynagh at 2011-06-17T19:10:29+01:00 Fix build - - - - - 8fa35740 by Ian Lynagh at 2011-06-26T21:06:40+01:00 Bump GHC dep to allow 7.2 - - - - - e4d2ca3c by Ian Lynagh at 2011-07-07T23:06:28+01:00 Relax base dep - - - - - b948fde9 by Ian Lynagh at 2011-07-28T16:39:45+01:00 GHC build system: Don't install the datafiles twice - - - - - f82f6d70 by Simon Marlow at 2011-08-11T12:08:15+01:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - b341cc12 by Max Bolingbroke at 2011-08-22T20:25:27+01:00 Fix compilation with no-pred-ty GHC - - - - - 30494581 by Max Bolingbroke at 2011-08-23T10:20:54+01:00 Remaining fixes for PredTy removal - - - - - 0b197138 by Max Bolingbroke at 2011-08-26T08:27:45+01:00 Rename factKind to constraintKind - - - - - a379bec5 by Max Bolingbroke at 2011-09-04T12:54:47+01:00 Deal with change to IParam handling in GHC - - - - - f94e421b by Max Bolingbroke at 2011-09-06T17:34:31+01:00 Adapt Haddock for the ConstraintKind extension changes - - - - - 8821e5cc by Max Bolingbroke at 2011-09-09T08:24:59+01:00 Ignore associated type defaults (just as we ignore default methods) - - - - - 31a0afd4 by Max Bolingbroke at 2011-09-09T09:06:00+01:00 Merge branch 'no-pred-ty' of ssh://darcs.haskell.org/srv/darcs/haddock into no-pred-ty - - - - - dd3b530a by Max Bolingbroke at 2011-09-09T14:10:25+01:00 Merge branch 'no-pred-ty' Conflicts: src/Haddock/Convert.hs - - - - - 5f25ec96 by Max Bolingbroke at 2011-09-09T14:10:40+01:00 Replace FactTuple with ConstraintTuple - - - - - cd30b9cc by David Waern at 2011-09-26T02:17:55+02:00 Bump to version 2.9.3 - - - - - 4fbfd397 by Max Bolingbroke at 2011-09-27T14:55:21+01:00 Follow changes to BinIface Name serialization - - - - - 92257d90 by David Waern at 2011-09-30T23:45:07+02:00 Fix problem with test files not added to distribution tarball - - - - - 00255bda by David Waern at 2011-09-30T23:48:24+02:00 Merge branch 'development' - - - - - 5421264f by David Waern at 2011-10-01T01:25:39+02:00 Merge in darcs patch from Simon Meier: Wed Jun 1 19:41:16 CEST 2011 iridcode at gmail.com * prettier haddock coverage info The new coverage info rendering uses less horizontal space. This reduces the number of unnecessary line-wrappings. Moreover, the most important information, how much has been documented already, is now put up front. Hopefully, this makes it more likely that a library author is bothered by the low coverage of his modules and fixes that issue ;-) - - - - - 07d318ef by David Waern at 2011-10-01T01:34:10+02:00 Use printException instead of deprecated printExceptionAndWarnings - - - - - 40d52ee4 by David Waern at 2011-10-01T01:41:13+02:00 Merge in darcs pach: Mon Apr 11 18:09:54 JST 2011 Liyang HU <haddock at liyang.hu> * Remember collapsed sections in index.html / haddock-util.js - - - - - 279d6dd4 by David Waern at 2011-10-01T01:55:45+02:00 Merge in darcs patch: Joachim Breitner <mail at joachim-breitner.de>**20110619201645 Ignore-this: f6c51228205b0902ad5bfad5040b989a As reported on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578301, generating the global index takes much too long if type-level (with lots of auto-generated types) is installed. The patch avoids a quadratic runtime in the subfunction getIfaceIndex of ppHtmlIndex by using a temporary set. Runtime improvement observed here from 25.36s to 2.86s. - - - - - d1612383 by David Waern at 2011-10-01T01:56:48+02:00 Merge branch 'development' - - - - - 347520c1 by David Waern at 2011-10-01T01:56:54+02:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9a0c95e8 by David Waern at 2011-10-01T02:19:10+02:00 Improve .cabal file - - - - - 6967dc64 by Ian Lynagh at 2011-10-01T01:34:06+01:00 Follow changes to ForeignImport/ForeignExport in GHC - - - - - 565cb26b by Simon Marlow at 2011-10-04T00:15:04+02:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - 8b74f512 by David Waern at 2011-10-04T00:18:17+02:00 Requre ghc >= 7.2 - - - - - 271d360c by David Waern at 2011-10-04T00:22:50+02:00 Bump version to 2.9.4 - - - - - 37f3edb0 by David Waern at 2011-10-06T02:30:21+02:00 Add alex and happy to build-tools. - - - - - 7ac2bb6e by David Terei at 2011-10-12T14:02:55-07:00 Add safe haskell indication to haddock output - - - - - 42c91a47 by David Terei at 2011-10-12T14:06:03-07:00 Fix CSS issue with info table not being contained in module header - - - - - 0eddab6c by David Terei at 2011-10-12T14:06:58-07:00 Add safe haskell indication to haddock output - - - - - 3df058eb by David Terei at 2011-10-12T14:07:07-07:00 Fix CSS issue with info table not being contained in module header - - - - - a40a6c3f by David Waern at 2011-10-22T11:29:06+02:00 Bump .haddock file version since the format has changed recently - - - - - 8a6254be by David Waern at 2011-10-22T11:30:42+02:00 Merge branch 'development' - - - - - 642e3e02 by David Waern at 2011-10-23T21:23:39+02:00 Sort import list - - - - - 36371cf8 by David Waern at 2011-10-23T22:48:18+02:00 Remove NEW_GHC_LAYOUT conditional. - - - - - 5604b499 by David Waern at 2011-10-27T00:15:03+02:00 Add --print-ghc-path. - - - - - 463499fa by David Waern at 2011-10-27T00:16:22+02:00 Make testsuite able to find its dependencies automatically. - - - - - a3506172 by Ryan Newton at 2011-11-05T05:59:58-04:00 Improved declNames internal error. Added a case to handle DocD. - - - - - 001b8baf by David Waern at 2011-11-05T20:37:29+01:00 Rename copy.hs -> accept.hs. - - - - - 55d808d3 by David Waern at 2011-11-05T23:30:02+01:00 Fix build. - - - - - deb5c3be by David Waern at 2011-11-06T00:01:47+01:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9b663554 by David Waern at 2011-11-06T00:03:45+01:00 Merge https://github.com/rrnewton/haddock - - - - - 1abb0ff6 by David Waern at 2011-11-06T01:20:37+01:00 Use getDeclMainBinder instead of declNames. - - - - - 4b005c01 by David Waern at 2011-11-06T19:09:53+01:00 Fix build. - - - - - c2c51bc7 by Ian Lynagh at 2011-11-06T23:01:33+00:00 Remove -DNEW_GHC_LAYOUT in ghc.mk - - - - - f847d703 by Jose Pedro Magalhaes at 2011-11-11T09:07:39+00:00 New kind-polymorphic core This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds - - - - - 7d7c3b09 by Jose Pedro Magalhaes at 2011-11-16T21:42:22+01:00 Follow changes to tuple sorts in master - - - - - 8430e03e by Simon Peyton Jones at 2011-11-17T10:20:27+00:00 Remove redundant imports - - - - - d1b06832 by Ian Lynagh at 2011-11-19T01:33:21+00:00 Follow GHC build system change to the way we call rm - - - - - 9e2230ed by David Waern at 2011-11-24T15:00:24+01:00 Fix a bug in test runner and get rid of regex-compat dependency. - - - - - 52039b21 by David Waern at 2011-11-24T23:55:36+01:00 Avoid haskell98 dependency in test - - - - - 92e1220d by David Waern at 2011-11-25T00:03:33+01:00 Avoid depency on regex-compat also in accept.hs. - - - - - ddac6b6f by David Waern at 2011-11-25T02:13:38+01:00 Accept test output. - - - - - 5a720455 by David Waern at 2011-11-25T02:16:20+01:00 Some more changes to test scripts. - - - - - 170a9004 by David Waern at 2011-11-25T02:30:41+01:00 Add flag --interface-version. - - - - - d225576c by David Waern at 2011-11-25T02:39:26+01:00 Remove #ifs for older compiler versions. - - - - - f0d0a4f5 by David Waern at 2011-11-26T04:20:12+01:00 Give preference to type over data constructors for doc comment links at renaming time. Previously this was done in the backends. Also, warn when a doc comment refers to something that is in scope but which we don't have the .haddock file for. These changes mean we can make DocIdentifier [a] into DocIdentifier a. - - - - - eef0e776 by David Waern at 2011-11-26T17:01:06+01:00 Allow doc comments to link to out-of-scope things (#78). (A bug that should have been fixed long ago.) - - - - - 565ad529 by David Waern at 2011-11-26T19:56:21+01:00 Update tests. - - - - - fb3ce7b9 by David Waern at 2011-11-26T21:44:28+01:00 Cleanup. - - - - - d0328126 by David Waern at 2011-11-26T22:10:28+01:00 Fix module reference bug. - - - - - c03765f8 by David Waern at 2011-12-03T05:20:20+01:00 Slightly better behaviour on top-levels without type signatures. - Docs don't get attached to the next top-level with signature by mistake. - If there's an export list and the top-level is part of it, its doc comment shows up in the documentation. - - - - - 48461d31 by David Waern at 2011-12-03T05:38:10+01:00 Add a test for Unicode doc comments. - - - - - 549c4b4e by David Waern at 2011-12-03T19:07:55+01:00 Cleanup. - - - - - 7bfecf91 by David Waern at 2011-12-03T20:13:08+01:00 More cleanup. - - - - - 14fab722 by Ian Lynagh at 2011-12-12T21:21:35+00:00 Update dependencies and binaryInterfaceVersion - - - - - 469e6568 by Ian Lynagh at 2011-12-18T12:56:16+00:00 Fix (untested) building from source tarball without alex/happy haddock's .cabal file was declaring that it needed alex and happy to build, but in the GHC source tarballs it doesn't. - - - - - 895c9a8c by David Waern at 2011-12-27T12:57:43+01:00 Go back to having a doc, sub and decl map instead of one big decl map. This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer. - - - - - 736767d9 by David Waern at 2011-12-27T13:33:41+01:00 Merge ../../../haddock Conflicts: src/Haddock/InterfaceFile.hs - - - - - 20016f79 by David Waern at 2011-12-27T13:57:23+01:00 Bump version. - - - - - 31f276fb by David Waern at 2011-12-27T13:57:32+01:00 Merge ../ghc/utils/haddock - - - - - 95b367cd by David Waern at 2011-12-27T14:57:29+01:00 Update tests following version bump. - - - - - fa3c94cd by David Waern at 2011-12-27T14:57:51+01:00 Get rid of quite unnecessary use of different lists. - - - - - 9c4d3c54 by David Waern at 2011-12-27T15:26:42+01:00 Cleanup. - - - - - 2caf9f90 by David Waern at 2011-12-27T16:18:05+01:00 Wibbles. - - - - - 3757d09b by David Waern at 2011-12-27T20:50:26+01:00 Complete support for inferring types for top-level bindings. - - - - - 53418734 by David Waern at 2011-12-28T15:02:13+01:00 Minor fixes and cleanup. - - - - - 0c9d0385 by Ian Lynagh at 2012-01-03T18:31:29+00:00 Follow rename of Instance to ClsInst in GHC - - - - - c9bc969a by Simon Hengel at 2012-01-12T21:28:14+01:00 Make sure that generated xhtml is valid (close haskell/haddock#186) Thanks to Phyx. - - - - - 836a0b9a by David Waern at 2012-02-01T02:30:05+01:00 Fix bug introduced in my recent refactoring. - - - - - c7d733eb by David Waern at 2012-02-01T02:30:26+01:00 Cleanup mkMaps and avoid quadratic behaviour. - - - - - da3cda8f by David Waern at 2012-02-01T02:56:56+01:00 Require ghc >= 7.4. - - - - - 83a3287e by David Waern at 2012-02-01T02:57:36+01:00 Update CHANGES. - - - - - 93408f0b by Simon Hengel at 2012-02-04T00:48:04+01:00 Add reference renderings - - - - - 49d00d2c by Simon Hengel at 2012-02-04T00:48:25+01:00 Set unit tests for parser back to work - - - - - eb450980 by Simon Hengel at 2012-02-04T00:49:07+01:00 Add .gitignore - - - - - a841602c by Simon Hengel at 2012-02-04T00:49:16+01:00 Add .ghci file - - - - - 8861199d by Simon Hengel at 2012-02-04T00:49:29+01:00 tests/html-tests/copy.hs: Use mapM_ instead of mapM So we do net get a list of () on stdout when running with runhaskell. - - - - - b477d9b5 by Simon Hengel at 2012-02-04T00:49:46+01:00 Remove index files from golden tests - - - - - 9dbda34e by Simon Hengel at 2012-02-04T00:49:57+01:00 Add /tests/html-tests/tests/*index*.ref to .gitignore - - - - - a9434817 by Simon Hengel at 2012-02-04T00:50:04+01:00 Add DocWarning to Doc The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis. - - - - - de2fb6fa by Simon Hengel at 2012-02-04T00:50:13+01:00 Add support for module warnings - - - - - 0640920e by Simon Hengel at 2012-02-04T00:50:21+01:00 Add tests for module warnings - - - - - 30ce0d77 by Simon Hengel at 2012-02-04T00:50:29+01:00 Add support for warnings - - - - - bb367960 by Simon Hengel at 2012-02-04T00:50:37+01:00 Add tests for warnings - - - - - 6af1dc2d by Simon Hengel at 2012-02-04T00:50:50+01:00 Expand type signatures in export list (fixes haskell/haddock#192) - - - - - a06cbf25 by Simon Hengel at 2012-02-04T00:51:04+01:00 Expand type signatures for modules without explicit export list - - - - - 57dda796 by Simon Hengel at 2012-02-04T00:51:15+01:00 Remove obsolete TODO - - - - - 270c3253 by David Waern at 2012-02-04T00:51:24+01:00 Fix issues in support for warnings. * Match against local names only. * Simplify (it's OK to map over the warnings). - - - - - 683634bd by David Waern at 2012-02-04T00:55:11+01:00 Some cleanup and make sure we filter warnings through exports. - - - - - 210cb4ca by David Waern at 2012-02-04T03:01:30+01:00 Merge branch 'fix-for-186' of https://github.com/sol/haddock into ghc-7.4 - - - - - e8db9031 by David Waern at 2012-02-04T03:07:51+01:00 Style police. - - - - - 261f9462 by David Waern at 2012-02-04T03:20:16+01:00 Update tests. - - - - - 823cfc7c by David Waern at 2012-02-04T03:21:12+01:00 Use mapM_ in accept.hs as well. - - - - - 873dd619 by David Waern at 2012-02-04T03:21:33+01:00 Remove copy.hs - use accept.hs instead. - - - - - 0e31a14a by David Waern at 2012-02-04T03:47:33+01:00 Use <> instead of mappend. - - - - - 2ff7544f by David Waern at 2012-02-04T03:48:55+01:00 Remove code for older ghc versions. - - - - - dacf2786 by David Waern at 2012-02-04T15:52:51+01:00 Clean up some code from last SoC project. - - - - - 00cbb117 by David Waern at 2012-02-04T21:43:49+01:00 Mostly hlint-inspired cleanup. - - - - - 7dc86cc2 by Simon Peyton Jones at 2012-02-06T09:14:41+00:00 Track changes in HsDecls - - - - - f91f82fe by Ian Lynagh at 2012-02-16T13:40:11+00:00 Follow changes in GHC caused by the CAPI CTYPE pragma - - - - - a0ea6b0b by Ian Lynagh at 2012-02-22T02:26:12+00:00 Follow changes in GHC - - - - - b23b07d1 by Simon Peyton Jones at 2012-03-02T16:36:41+00:00 Follow changes in data representation from the big PolyKinds commit - - - - - 43406022 by Simon Hengel at 2012-03-05T11:18:34+01:00 Save/restore global state for static flags when running GHC actions This is necessary if we want to run createInterfaces (from Documentation.Haddock) multiple times in the same process. - - - - - 9fba16fe by Paolo Capriotti at 2012-03-06T10:57:33+00:00 Update .gitignore. - - - - - a9325044 by Simon Peyton Jones at 2012-03-14T17:35:42+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - fd48065a by Iavor Diatchki at 2012-03-15T22:43:35-07:00 Add support for type-level literals. - - - - - 2e8206dd by Simon Peyton Jones at 2012-03-16T14:18:22+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - 93e13319 by Simon Peyton Jones at 2012-03-17T01:04:05+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock Conflicts: src/Haddock/Convert.hs - - - - - d253fa71 by Iavor Diatchki at 2012-03-19T20:12:18-07:00 Merge remote-tracking branch 'origin/master' into type-nats - - - - - fc40acc8 by Iavor Diatchki at 2012-03-19T20:31:27-07:00 Add a missing case for type literals. - - - - - fd2ad699 by Iavor Diatchki at 2012-03-24T13:28:29-07:00 Rename variable to avoid shadowing warning. - - - - - 9369dd3c by Simon Peyton Jones at 2012-03-26T09:14:23+01:00 Follow refactoring of TyClDecl/HsTyDefn - - - - - 38825ca5 by Simon Peyton Jones at 2012-03-26T09:14:37+01:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - 4324ac0f by David Waern at 2012-04-01T01:51:19+02:00 Disable unicode test. - - - - - 3165b750 by David Waern at 2012-04-01T01:51:34+02:00 Take reader environment directly from TypecheckedSource. - - - - - 213b644c by David Waern at 2012-04-01T01:55:20+02:00 Cleanup. - - - - - 3118b4ba by David Waern at 2012-04-01T02:16:15+02:00 Don't filter out unexported names from the four maps - fixes a regression. - - - - - d6524e17 by David Waern at 2012-04-01T02:40:34+02:00 Fix crash when using --qual. Naughty GHC API! - - - - - ea3c43d8 by Henning Thielemann at 2012-04-01T13:03:07+02:00 add QualOption type for distinction between qualification argument given by the user and the actual qualification for a concrete module - - - - - 5422ff05 by Henning Thielemann at 2012-04-01T16:25:02+02:00 emit an error message when the --qual option is used incorrectly - - - - - 026e3404 by David Waern at 2012-04-01T18:10:30+02:00 Don't crash on unicode strings in doc comments. - - - - - ce006632 by David Waern at 2012-04-01T20:13:35+02:00 Add test for --ignore-all-exports flag/ignore-exports pragma. - - - - - 6e4dd33c by David Waern at 2012-04-01T20:21:03+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.4 - - - - - 734ae124 by Henning Thielemann at 2012-04-01T20:22:10+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - 622f9ba5 by David Waern at 2012-04-01T21:26:13+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 55ce17cb by Henning Thielemann at 2012-04-01T22:03:25+02:00 'abbreviate' qualification style - basic support Currently we ignore the package a module is imported from. This means that a module import would shadow another one with the same module name from a different package. - - - - - c85314ef by David Waern at 2012-04-01T22:05:12+02:00 Check qualification option before processing modules. - - - - - ae4b626c by Henning Thielemann at 2012-04-02T00:19:36+02:00 abbreviated qualification: use Packages.lookupModuleInAllPackages for finding the package that a module belongs to - - - - - 60bdbcf5 by Henning Thielemann at 2012-04-02T00:25:31+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - df44301d by Henning Thielemann at 2012-04-02T00:29:05+02:00 qualification style 'abbreviated' -> 'aliased' - - - - - f4192a64 by David Waern at 2012-04-02T01:05:47+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 7ba09067 by David Terei at 2012-04-04T15:08:21-07:00 Fix reporting of modules safe haskell mode (#5989) - - - - - d0cc33d0 by David Terei at 2012-04-06T15:50:41+01:00 Fix reporting of modules safe haskell mode (#5989) - - - - - 6e3434c5 by Simon Peyton Jones at 2012-04-20T18:37:46+01:00 Track changes in HsSyn - - - - - 22014ed0 by Simon Peyton Jones at 2012-05-11T22:45:15+01:00 Follow changes to LHsTyVarBndrs - - - - - d9a07b24 by David Waern at 2012-05-15T01:46:35+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - a6c4ebc6 by David Waern at 2012-05-16T02:18:32+02:00 Update CHANGES. - - - - - 8e181d29 by David Waern at 2012-05-16T02:27:56+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - e358210d by David Waern at 2012-05-16T02:35:33+02:00 Mention the new aliased --qual mode in CHANGES. - - - - - efd36a28 by David Waern at 2012-05-16T21:33:13+02:00 Bump version number. - - - - - d6b3af14 by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for deprecated record field - - - - - 927f800e by Simon Hengel at 2012-05-17T19:08:20+02:00 Use >>= instead of fmap and join - - - - - 048b41d5 by Simon Hengel at 2012-05-17T19:08:20+02:00 newtype-wrap Doc nodes for things that may have warnings attached - - - - - e3a89fc3 by Simon Hengel at 2012-05-17T19:08:20+02:00 Attach warnings to `Documentation` type - - - - - 5d4cc43d by Simon Hengel at 2012-05-17T19:08:20+02:00 Simplify lookupWarning - - - - - cf8ae69d by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for haskell/haddock#205 - - - - - cb409b19 by Simon Peyton Jones at 2012-05-25T08:30:11+01:00 Follow changes in LHsTyVarBndrs - - - - - 2d5f4179 by Simon Hengel at 2012-05-26T19:21:29+02:00 Add Applicative instance for (GenRnM a) - - - - - e4373060 by Simon Hengel at 2012-05-26T19:21:33+02:00 Use a map for warnings, as suggested by @waern - - - - - 597a68c7 by Simon Hengel at 2012-05-27T08:48:24+02:00 Add an optional label to URLs - - - - - ef1ac7fe by Simon Hengel at 2012-05-27T08:48:24+02:00 Add support for hyperlink labels to parser - - - - - 41f2adce by Simon Hengel at 2012-05-27T08:48:24+02:00 Add golden test for hyperlinks - - - - - 83d5e764 by Simon Hengel at 2012-05-27T08:50:02+02:00 Use LANGUAGE pragmas instead of default-extensions in cabal file - - - - - ddb755e5 by Simon Hengel at 2012-05-27T08:50:02+02:00 Fix typo in comment - - - - - 110676b4 by Simon Hengel at 2012-05-27T08:50:02+02:00 Add a type signature for a where-binding - - - - - 7d9ba2a0 by Ian Lynagh at 2012-06-12T14:38:01+01:00 Follow changes in GHC - - - - - 47c704f2 by Ian Lynagh at 2012-06-12T18:52:16+01:00 Follow changes in GHC - - - - - e1efe1ab by Simon Peyton Jones at 2012-06-13T17:25:29+01:00 Follow changes for the implementation of implicit parameters - - - - - 69abc81c by Ian Lynagh at 2012-06-19T22:52:58+01:00 Follow changes in base - - - - - 9d074a21 by Paolo Capriotti at 2012-06-22T18:26:47+01:00 Use right docMap to get decl documentation. - - - - - e3292ef6 by Ian Lynagh at 2012-07-15T01:31:19+01:00 Follow changes in GHC - - - - - ceae56b0 by Ian Lynagh at 2012-07-16T21:22:48+01:00 Fix haddock following some GHC changes Passing _|_ as the Settings for defaultDynFlags no longer works well enough - - - - - 9df72735 by Paolo Capriotti at 2012-07-19T16:49:32+01:00 Forward port changes from stable. - - - - - 572f5fcf by Ian Lynagh at 2012-07-19T20:38:26+01:00 Merge branch 'master' of darcs.haskell.org:/srv/darcs//haddock - - - - - 9195aca4 by Paolo Capriotti at 2012-07-20T10:27:28+01:00 Update dependencies. - - - - - 33db3923 by Ian Lynagh at 2012-07-20T17:54:43+01:00 Build with GHC 7.7 - - - - - 925a2cea by David Waern at 2012-07-23T16:50:40+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.6 Conflicts: src/Haddock/InterfaceFile.hs - - - - - d710ef97 by David Waern at 2012-07-23T16:52:07+02:00 Bump version number. - - - - - eb0c2f83 by David Waern at 2012-07-23T16:57:58+02:00 Update CHANGES. - - - - - b3f56943 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Hide "internal" instances This fixes haskell/haddock#37 (http://trac.haskell.org/haddock/ticket/37) Precisely, we show an instance iff its class and all the types are exported by non-hidden modules. - - - - - a70aa412 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Tests for hiding instances (#37) - - - - - c0f4aa58 by Simon Hengel at 2012-07-27T13:00:13+03:00 Add an other test for hiding instances (#37) - - - - - a7ed6268 by Ian Lynagh at 2012-08-07T14:48:13+01:00 Follow changes in GHC - - - - - 0ab30d38 by Ian Lynagh at 2012-08-13T22:12:27+01:00 Improve haddock memory usage - - - - - 0eaa4e30 by Ian Lynagh at 2012-08-13T23:58:46+01:00 Improve haddock memory usage - - - - - 659d26cf by Ian Lynagh at 2012-08-14T13:16:48+01:00 Remove some temporary pragmas I accidentally recorded - - - - - d97fceb6 by Simon Hengel at 2012-08-25T13:19:34+02:00 Add missing dependency to library - - - - - 4c910697 by Simon Hengel at 2012-08-28T07:39:14+02:00 Move .ghci to project root - - - - - fc3c601a by Simon Hengel at 2012-08-28T07:39:14+02:00 accept.hs: Ignore some files - - - - - 1af9b984 by Simon Hengel at 2012-08-28T07:40:04+02:00 Update reference renderings (bump version) - - - - - 980dc253 by Simon Hengel at 2012-08-28T07:40:32+02:00 Update reference renderings (remove links for ()) - - - - - 33651dbf by Simon Hengel at 2012-08-28T07:41:50+02:00 Update documentation of `runInteractiveProcess` in reference rendering - - - - - 7ab25078 by David Waern at 2012-09-07T10:38:50+02:00 Merge branch 'hiddenInstances2' of http://github.com/feuerbach/haddock into ghc-7.6 - - - - - c3de3a4b by David Waern at 2012-09-07T14:29:27+02:00 Follow changes in GHC. - - - - - 298c43ac by David Waern at 2012-09-07T14:59:24+02:00 Update CHANGES. - - - - - e797993a by David Waern at 2012-09-07T15:21:30+02:00 Update ANNOUNCE. - - - - - d0b44790 by David Waern at 2012-09-07T15:22:43+02:00 Merge branch 'hidden-instances' into ghc-7.6 - - - - - 41a4adc8 by Simon Hengel at 2012-09-08T12:08:37+02:00 Update doc/README - - - - - 71ad1040 by Simon Hengel at 2012-09-08T12:17:17+02:00 Add documentation for URL labels - - - - - 9bb41afd by Simon Peyton Jones at 2012-09-20T18:14:26+01:00 Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs - - - - - b8139bfa by Simon Hengel at 2012-09-21T14:24:16+02:00 Disable Unicode test for now - - - - - a5fafdd7 by Simon Hengel at 2012-09-21T14:35:45+02:00 Update TypeOperators test for GHC 7.6.1 Type operators can't be used as type variables anymore! - - - - - 6ccf0025 by Simon Hengel at 2012-09-21T16:02:24+02:00 Remove (Monad (Either e)) instance from ref. rendering of CrossPackageDocs I do not really understand why the behavior changed, so I'll open a ticket, so that we can further investigate. - - - - - b5c6c138 by Ian Lynagh at 2012-09-27T02:00:57+01:00 Follow changes in GHC build system - - - - - b98eded0 by David Waern at 2012-09-27T15:37:02+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 76cc2051 by David Waern at 2012-09-27T15:48:19+02:00 Update hidden instances tests. - - - - - aeaa1c59 by David Waern at 2012-09-28T10:21:32+02:00 Make API buildable with GHC 7.6. - - - - - d76be1b0 by Simon Peyton Jones at 2012-09-28T15:57:05+01:00 Merge remote-tracking branch 'origin/master' into tc-untouchables - - - - - a1922af8 by David Waern at 2012-09-28T19:50:20+02:00 Fix spurious superclass constraints bug. - - - - - bc41bdbb by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove old examples - - - - - bed7d3dd by Simon Hengel at 2012-10-01T11:30:51+02:00 Adapt parsetests for GHC 7.6.1 - - - - - dcdb22bb by Simon Hengel at 2012-10-01T11:30:51+02:00 Add test-suite section for parsetests to cabal file + get rid of HUnit dependency - - - - - 1e5263c9 by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove test flag from cabal file This was not really used. - - - - - 4beee98b by David Waern at 2012-09-28T23:42:28+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 11dd2256 by Ian Lynagh at 2012-10-03T16:17:35+01:00 Follow change in GHC build system - - - - - fbd77962 by Simon Hengel at 2012-10-03T18:49:40+02:00 Remove redundant dependency from cabal file - - - - - 09218989 by Simon Hengel at 2012-10-04T16:03:05+02:00 Fix typo - - - - - 93a2d5f9 by Simon Hengel at 2012-10-04T16:11:41+02:00 Remove trailing whitespace from cabal file - - - - - c8b46cd3 by Simon Hengel at 2012-10-04T16:12:17+02:00 Export Haddock's main entry point from library - - - - - b411e77b by Simon Hengel at 2012-10-04T16:29:46+02:00 Depend on library for executable The main motivation for this is to increase build speed. In GHC's source tree the library is not build, but all modules are now required for the executable, so that GHC's validate will now detect build failures for the library. - - - - - f8f0979f by Simon Hengel at 2012-10-05T00:32:57+02:00 Set executable flag for Setup.lhs - - - - - dd045998 by Simon Hengel at 2012-10-07T16:44:06+02:00 Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. - - - - - 7b39c3ae by Simon Hengel at 2012-10-07T17:05:45+02:00 cross-package test: re-export IsString instead of Monad There is a monad instance for Q, which is not available on platforms that do not have GHCi support. This caused CrossPackageDocs to fail on those platforms. Re-exporting IsString should test the same thing, but it works on all platforms. - - - - - 0700c605 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Fix some warnings - - - - - f78eca79 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Make -Wall proof - - - - - 6beec041 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Use listToMaybe/fromMaybe instead of safeHead/maybe - - - - - 44b8ce86 by Ian Lynagh at 2012-10-08T21:59:46+01:00 Follow changes in GHC - - - - - 6da5f702 by Simon Hengel at 2012-10-09T11:16:19+02:00 Update .ghci - - - - - 9ac1a1b9 by Kazu Yamamoto at 2012-10-09T12:45:31+02:00 Add markup support for properties - - - - - 1944cb42 by Simon Hengel at 2012-10-09T12:45:31+02:00 Simplify lexing/parsing of properties In contrast to what we do for examples, we do not really need to capture the "prompt" here. - - - - - bffd8e62 by Simon Hengel at 2012-10-09T13:40:14+02:00 Add HTML test for properties - - - - - 2fe9c5cb by Simon Hengel at 2012-10-09T13:40:21+02:00 Add unit tests for properties - - - - - 874e361b by Simon Hengel at 2012-10-09T13:40:33+02:00 Bump interface version - - - - - 2506cc37 by Simon Hengel at 2012-10-09T15:15:04+02:00 Fix parser bug - - - - - 743d2b7d by Simon Hengel at 2012-10-09T15:31:06+02:00 Allow to load interface files with compatible versions - - - - - 981a1660 by Simon Hengel at 2012-10-10T10:32:05+02:00 Export more types from Documentation.Haddock (fixes haskell/haddock#216) - - - - - dff7dc76 by Simon Hengel at 2012-10-10T11:15:19+02:00 Update ANNOUNCE and CHANGES - - - - - edd2bb01 by Simon Hengel at 2012-10-10T11:22:50+02:00 Bump version - - - - - 5039163b by Simon Hengel at 2012-10-10T13:56:04+02:00 Fix typo in documentation - - - - - e4ce34da by Simon Hengel at 2012-10-10T14:28:35+02:00 Add documentation for properties - - - - - 9555ebca by Simon Hengel at 2012-10-11T10:49:04+02:00 Remove redundant if-defs, more source documentation - - - - - 87aa67e1 by Simon Hengel at 2012-10-11T12:32:51+02:00 Adapt cabal file - - - - - c44c1dee by Simon Hengel at 2012-10-11T12:41:58+02:00 Require ghc 7.6 - - - - - 8383bc34 by Simon Hengel at 2012-10-11T12:50:24+02:00 Bump version - - - - - 1030eb38 by Simon Hengel at 2012-10-11T12:55:44+02:00 Update ANNOUNCE and CHANGES - - - - - 74955088 by Simon Hengel at 2012-10-12T09:49:31+02:00 Improve note about `binaryInterfaceVersion` (thanks David) - - - - - ee30f6b7 by Simon Hengel at 2012-10-13T13:40:59+02:00 Update version in html tests, rpm spec file, and user manual - - - - - f2861f18 by Simon Hengel at 2012-10-13T14:40:33+02:00 Remove unused MonadFix constraint - - - - - dfdf1a74 by Simon Hengel at 2012-10-13T15:15:38+02:00 Minor code simplification - - - - - 4ecd1e70 by Simon Hengel at 2012-10-13T15:33:43+02:00 Increase code locality - - - - - f7df5cc9 by Simon Hengel at 2012-10-13T16:03:12+02:00 Minor code simplification - - - - - e737eb6e by Simon Hengel at 2012-10-13T19:03:04+02:00 Handle HsExplicitListTy in renameer (fixes haskell/haddock#213) - - - - - c2dc8f17 by Simon Hengel at 2012-10-13T20:46:31+02:00 Better error messages - - - - - 14d48b4c by Simon Hengel at 2012-10-14T00:21:07+02:00 Simplify RnM type - - - - - 6c2cc547 by Simon Hengel at 2012-10-14T00:23:35+02:00 Simplify lookupRn - - - - - bc77ce85 by Simon Hengel at 2012-10-14T01:51:32+02:00 Organize unite tests hierarchically - - - - - 2306d117 by Simon Hengel at 2012-10-14T10:34:58+02:00 Handle more cases in renameType - - - - - 8a864203 by Simon Hengel at 2012-10-14T11:47:59+02:00 Add mini_HiddenInstances.html.ref and mini_HiddenInstancesB.html.ref - - - - - 3a978eca by Simon Hengel at 2012-10-14T11:49:28+02:00 Add /tests/html-tests/output/ to .gitignore - - - - - db18888a by Simon Hengel at 2012-10-14T13:38:21+02:00 Allow haddock markup in deprecation messages - - - - - e7cfee9f by Simon Hengel at 2012-10-14T14:00:23+02:00 If parsing of deprecation message fails, include it verbatim - - - - - 242a85be by Simon Hengel at 2012-10-14T14:13:24+02:00 Add description for PruneWithWarning test - - - - - 43d33df1 by Simon Hengel at 2012-10-14T15:40:53+02:00 Minor formatting change - - - - - 22768c44 by Simon Hengel at 2012-10-14T16:03:43+02:00 Properly handle deprecation messages for re-exported things (fixes haskell/haddock#220) - - - - - cb4b9111 by Simon Hengel at 2012-10-14T17:30:28+02:00 Add build artifacts for documentation to .gitignore - - - - - 854cd8de by Simon Hengel at 2012-10-14T23:34:51+02:00 unit-tests: Improve readability Add IsString instance for (Doc RdrName) + use <> instead of DocAppend. - - - - - c4446d54 by Simon Hengel at 2012-10-14T23:37:21+02:00 unit-tests: Minor refactoring Rename parse to parseParas. - - - - - 04f2703c by Simon Hengel at 2012-10-15T00:36:42+02:00 Fix typo - - - - - 3d109e44 by Simon Hengel at 2012-10-15T10:30:07+02:00 Add description for DeprecatedReExport test - - - - - 84f0985c by Simon Hengel at 2012-10-15T14:54:19+02:00 Move resources to /resources directory - - - - - a5de7ca6 by Simon Hengel at 2012-10-15T15:46:18+02:00 Move HTML tests to directory /html-test/ - - - - - e21f727d by Simon Hengel at 2012-10-15T19:32:42+02:00 Move HTML reference renderings to /html-test/ref/ - - - - - 3a3c6c75 by Simon Hengel at 2012-10-15T19:32:42+02:00 Copy css, images, etc. on accept - - - - - 40ead6dc by Simon Hengel at 2012-10-15T19:32:42+02:00 Move unit tests to /test directory - - - - - 99a28231 by Simon Hengel at 2012-10-15T19:32:42+02:00 Fix Setup.lhs /usr/bin/runhaskell is not installed on all systems. - - - - - 95faf45e by Simon Hengel at 2012-10-15T19:32:42+02:00 Make test management scripts more robust * They are now independent from the current directory, and hence can be called from everywhere * On UNIX/Linux they can now be run as scripts - - - - - 027aaa2d by Simon Hengel at 2012-10-15T19:53:40+02:00 Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. - - - - - e0266ede by Simon Hengel at 2012-10-15T20:03:43+02:00 Add test case for "spurious superclass constraints bug" - - - - - 52a2aa92 by Simon Hengel at 2012-10-15T20:28:55+02:00 Adapt accept.lhs, so that it ignores more index files - - - - - 53530781 by Simon Hengel at 2012-10-15T20:49:39+02:00 Rename html-test/runtests.lhs to html-test/run.lhs - - - - - 84518797 by Simon Hengel at 2012-10-15T20:49:39+02:00 Move source files for HTML tests to html-test/src - - - - - a911dc6c by Simon Hengel at 2012-10-15T20:49:39+02:00 Adapt output directory for HTML tests - - - - - d3c15857 by Ian Lynagh at 2012-10-16T16:54:43+01:00 Follow dopt->gopt rename - - - - - 956665a5 by Simon Hengel at 2012-10-18T08:42:48+02:00 Update html-test/README - - - - - 903b1029 by Simon Hengel at 2012-10-18T08:50:26+02:00 Use markdown for html-test/README - - - - - 150b4d63 by Ian Lynagh at 2012-10-18T16:36:00+01:00 Follow changes in GHC: 'flags' has been renamed 'generalFlags' - - - - - 41e04ff9 by Simon Hengel at 2012-11-28T09:54:35+01:00 Export missing types from Documentation.Haddock - - - - - 9be59237 by Ian Lynagh at 2012-11-30T23:20:47+00:00 Update dependencies - - - - - e06842f5 by Simon Hengel at 2012-12-07T20:58:05+01:00 Bump version - - - - - e3dbede0 by Simon Hengel at 2012-12-07T20:58:05+01:00 Add missing test files to cabal file (fixes haskell/haddock#230) - - - - - ee0dcca7 by Simon Hengel at 2012-12-07T20:58:05+01:00 Update CHANGES - - - - - 51601bdb by Simon Peyton Jones at 2012-12-19T17:28:35+00:00 Track changes in UNPACK pragma stuff - - - - - f2573bc1 by Richard Eisenberg at 2012-12-21T20:56:25-05:00 Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances. - - - - - f788d0fb by Simon Peyton Jones at 2012-12-23T15:49:58+00:00 Track changes in HsBang - - - - - ca460a0c by Simon Peyton Jones at 2012-12-23T15:50:28+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - f078fea6 by Simon Peyton Jones at 2013-01-02T08:33:13+00:00 Use InstEnv.instanceSig rather than instanceHead (name change) - - - - - 88e41305 by Simon Peyton Jones at 2013-01-14T17:10:27+00:00 Track change to HsBang type - - - - - e1ad4e19 by Kazu Yamamoto at 2013-02-01T11:59:24+09:00 Merge branch 'ghc-7.6' into ghc-7.6-merge-2 Conflicts: haddock.cabal src/Haddock/Interface/AttachInstances.hs src/Haddock/Interface/Create.hs src/Haddock/Interface/LexParseRn.hs src/Haddock/InterfaceFile.hs src/Haddock/Types.hs Only GHC HEAD can compile this. GHC 7.6.x cannot compile this. Some test fail. - - - - - 62bec012 by Kazu Yamamoto at 2013-02-06T11:12:28+09:00 Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.) - - - - - 013fd2e4 by Kazu Yamamoto at 2013-02-06T17:56:21+09:00 Refactoring instanceHead'. - - - - - 3148ce0e by Kazu Yamamoto at 2013-02-07T17:45:10+09:00 Using new syntax in html-test/src/GADTRecords.hs. - - - - - 626dabe7 by Gabor Greif at 2013-02-15T22:42:01+01:00 Typo - - - - - 1eb667ae by Ian Lynagh at 2013-02-16T17:02:07+00:00 Follow changes in base - - - - - 3ef8253a by Ian Lynagh at 2013-03-01T23:23:57+00:00 Follow changes in GHC's build system - - - - - 1a265a3c by Ian Lynagh at 2013-03-03T23:12:07+00:00 Follow changes in GHC build system - - - - - 69941c79 by Max Bolingbroke at 2013-03-10T09:38:28-07:00 Use Alex 3's Unicode support to properly lex source files as UTF-8 Signed-off-by: David Waern <david.waern at gmail.com> - - - - - ea687dad by Simon Peyton Jones at 2013-03-15T14:16:10+00:00 Adapt to tcRnGetInfo returning family instances too This API change was part of the fix to Trac haskell/haddock#4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays. - - - - - 971a30b0 by Andreas Voellmy at 2013-05-19T20:47:39+01:00 Fix for haskell/haddock#7879. Changed copy of utils/haddock/html/resources/html to use "cp -RL" rather than "cp -R". This allows users to run validate in a build tree, where the build tree was setup using lndir with a relative path to the source directory. - - - - - 31fb7694 by Ian Lynagh at 2013-05-19T20:47:49+01:00 Use "cp -L" when making $(INPLACE_LIB)/latex too - - - - - e9952233 by Simon Hengel at 2013-06-01T18:06:50+02:00 Add -itest to .ghci - - - - - b06873b3 by Mateusz Kowalczyk at 2013-06-01T18:06:50+02:00 Workaround for a failing build with --enable-tests. - - - - - e7858d16 by Simon Hengel at 2013-06-01T19:29:28+02:00 Fix broken test - - - - - 0690acb1 by Richard Eisenberg at 2013-06-21T14:08:25+01:00 Updates to reflect changes in HsDecls to support closed type families. - - - - - 7fd347ec by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 53ed81b6 by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 931c4f4f by Richard Eisenberg at 2013-07-24T13:15:59+01:00 Remove (error "synifyKind") to use WithinType, to allow haddock to process base. - - - - - 55a9c804 by Richard Eisenberg at 2013-08-02T15:54:55+01:00 Changes to reflect changes in GHC's type HsTyVarBndr - - - - - b6e9226c by Mathieu Boespflug at 2013-08-04T10:39:43-07:00 Output Copright and License keys in Xhtml backend. This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern at gmail.com> - - - - - 4c66028a by David Waern at 2013-08-04T15:27:36-07:00 Bump interface file version. - - - - - 67340163 by David Waern at 2013-08-09T16:12:51-07:00 Update tests. - - - - - 2087569b by Mateusz Kowalczyk at 2013-08-25T09:24:13+02:00 Add spec tests. This adds tests for all elements we can create during regular parsing. This also adds tests for text with unicode in it. - - - - - 97f36a11 by Mateusz Kowalczyk at 2013-08-27T06:59:12+01:00 Fix ticket haskell/haddock#247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. - - - - - 60681b4f by Mateusz Kowalczyk at 2013-08-27T21:22:48+02:00 LaTeX tests setup - - - - - fa4c27b2 by Mateusz Kowalczyk at 2013-09-02T23:21:43+01:00 Fixes haskell/haddock#253 - - - - - 1a202490 by Mateusz Kowalczyk at 2013-09-03T01:12:50+01:00 Use Hspec instead of nanospec This is motivated by the fact that Haddock tests are not ran by the GHC's ‘validate’ script so we're pretty liberal on dependencies in that area. Full Hspec gives us some nice features such as Quickcheck integration. - - - - - 8cde3b20 by David Luposchainsky at 2013-09-08T07:27:28-05:00 Fix AMP warnings Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - d10661f2 by Herbert Valerio Riedel at 2013-09-11T15:15:01+02:00 Update Git repo URL in `.cabal` file - - - - - 16a44eb5 by Richard Eisenberg at 2013-09-17T09:34:26-04:00 Revision to reflect new role annotation syntax in GHC. - - - - - 4b9833b9 by Herbert Valerio Riedel at 2013-09-18T10:15:28+02:00 Add missing `traverse` method for `GenLocated` As `Traversable` needs at least one of `traverse` or `sequenceA` to be overridden. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - b71fed5d by Simon Hengel at 2013-09-18T22:43:34+02:00 Add test helper - - - - - 4fc1ea86 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#231 - - - - - 435872f6 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#256 We inject -dynamic-too into flags before we run all our actions in the GHC monad. - - - - - b8b24abb by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Add new field to DynFlags - - - - - 49558795 by Simon Hengel at 2013-09-18T22:43:35+02:00 Fallback to ./resources when Cabal data is not found (so that themes are found during development) - - - - - bf79d05c by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Fixes haskell/haddock#5 - - - - - e1baebc2 by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Print missing documentation. Fixes haskell/haddock#258. - - - - - 02ea74de by Austin Seipp at 2013-10-09T10:52:22-05:00 Don't consider StaticFlags when parsing arguments. Instead, discard any static flags before parsing the command line using GHC's DynFlags parser. See http://ghc.haskell.org/trac/ghc/ticket/8276 Based off a patch from Simon Hengel. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 704fd5bb by Simon Hengel at 2013-11-09T00:15:13+01:00 Update HTML tests - - - - - f9fed49e by Simon Hengel at 2013-11-10T18:43:58+01:00 Bump version - - - - - 97ae1999 by Simon Peyton Jones at 2013-11-25T17:25:14+00:00 Track changes in HsSpliceTy data constructor - - - - - 59ad8268 by Simon Peyton Jones at 2014-01-10T18:17:43+00:00 Adapt to small change in Pretty's exports - - - - - 8b12e6aa by Simon Hengel at 2014-01-12T14:48:35-06:00 Some code simplification by using traverse - - - - - fc5ea9a2 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix warnings in test helper - - - - - 6dbb3ba5 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Add ByteString version of Attoparsec - - - - - 968d7774 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 One pass parser and tests. We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing. - - - - - 37a07c9c by Simon Hengel at 2014-01-12T14:48:35-06:00 Rename Haddock.ParseSpec to Haddock.ParserSpec - - - - - f0f68fe9 by Simon Hengel at 2014-01-12T14:48:35-06:00 Don't append newline to parseString input We also check that we have parsed everything with endOfInput. - - - - - 95d60093 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu at fuuzetsu.co.uk if you need the full commit history. - - - - - 7d99108c by Simon Hengel at 2014-01-12T14:48:35-06:00 Update acceptance tests - - - - - d1b59640 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Support for bold. Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs - - - - - 4b412b39 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Allow for headings inside function documentation. LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs - - - - - fdcca428 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Per-module extension flags and language listing. Any extensions that are not enabled by a used language (Haskell2010 &c) will be shown. Furthermore, any implicitly enabled are also going to be shown. While we could eliminate this either by using the GHC API or a dirty hack, I opted not to: if a user doesn't want the implied flags to show, they are recommended to use enable extensions more carefully or individually. Perhaps this will encourage users to not enable the most powerful flags needlessly. Enabled with show-extensions. Conflicts: src/Haddock/InterfaceFile.hs - - - - - 368942a2 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Bump interface version There were some breaking changes over the last few patches so we bump the interface version. This causes a big problem with testing: 1. To generate cross package docs, we first need to generate docs for the package used. 2. To generate package docs with new interface version, we need to use Haddock which has the version bumped. 3. To get Haddock with the version bump, we first need to test cross package docs 4. GOTO 1 So the problem is the chicken and the egg problem. It seems that the only solution would be to generate some interface files on the fly but it is non-trivial. To run this test, you'll have to: * build Haddock without the test (make sure everything else passes) * rebuild the packages used in the test with your shiny new binary making sure they are visible to Haddock * remove the ‘_hidden’ suffix and re-run the tests Note: because the packages currently used for this test are those provided by GHC, it's probably non-trivial to just re-build them. Preferably something less tedious to rebuild should be used and something that is not subject to change. - - - - - 124ae7a9 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow for nesting of paragraphs under lists. The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - c7913535 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow escaping in URLs and pictures. Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - 32326680 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update documentation. - - - - - fbef6406 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update maintainer - - - - - b40e82f4 by Mateusz Kowalczyk at 2014-01-13T02:39:25-06:00 Fixes haskell/haddock#271 Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - f4eafbf8 by Gergő Érdi at 2014-01-19T15:35:16-06:00 Support for -XPatternSynonyms Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - a8939591 by Austin Seipp at 2014-01-29T08:09:04-06:00 Update CPP check for __GLASGOW_HASKELL__ Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 30d7e9d5 by Gergő Érdi at 2014-01-31T00:15:01+08:00 <+>: Don't insert a space when concatenating empty nodes - - - - - a25ccd4d by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Fix @ code blocks In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. - - - - - 0f67305a by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Update tests This updates tests due to Haddock Trac haskell/haddock#271 fix and due to removal of TypeHoles as an extension from GHC. - - - - - 157322a7 by Gergő Érdi at 2014-01-31T01:03:17+08:00 Handle infix vs prefix names correctly everywhere, by explicitly specifying the context The basic idea is that "a" and "+" are either pretty-printed as "a" and "(+)" or "`a`" and "+" - - - - - aa6d9685 by Mateusz Kowalczyk at 2014-01-30T17:21:50+00:00 Correct whitespace in ‘hidden’ test for <+> change - - - - - 121872f0 by Mateusz Kowalczyk at 2014-02-09T17:59:12+00:00 Document module header. Fixes Haddock Trac haskell/haddock#270. - - - - - e3253746 by Mateusz Kowalczyk at 2014-02-10T21:37:48+00:00 Insert a space between module link and description Fixes Haddock Trac haskell/haddock#277. - - - - - 771d2384 by Mateusz Kowalczyk at 2014-02-10T23:27:21+00:00 Ensure a space between type signature and ‘Source’ This is briefly related to Haddock Trac haskell/haddock#249 and employs effectively the suggested fix _but_ it doesn't actually fix the reported issue. This commit simply makes copying the full line a bit less of a pain. - - - - - 8cda9eff by nand at 2014-02-11T15:48:30+00:00 Add support for type/data families This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 3f22c510 by nand at 2014-02-11T15:53:50+00:00 Improve display of poly-kinded type operators This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - effb2d6b by nand at 2014-02-11T15:56:50+00:00 Add test case for PatternSynonyms This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - b38faf0d by Niklas Haas at 2014-02-13T21:53:32+00:00 Get rid of re-implementation of sortBy I have no idea what this was doing lying around here, and due to the usage of tuples it's actually slower, too. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - ac1e0413 by Mateusz Kowalczyk at 2014-02-13T23:57:16+00:00 Only warn about missing docs when docs are missing This fixes the ‘Missing documentation for…’ message for modules with 100% coverage. - - - - - cae2e36a by Niklas Haas at 2014-02-15T21:56:18+00:00 Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 8bea5c3a by Mateusz Kowalczyk at 2014-02-19T05:11:34+00:00 Use a bespoke data type to indicate fixity This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment. - - - - - 5b52d57c by Niklas Haas at 2014-02-22T21:31:03+01:00 Strip a single leading space from bird tracks (#201) This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch. - - - - - 5a1315a5 by Simon Hengel at 2014-02-22T21:55:35+01:00 Turn a source code comment into specs - - - - - 784cfe58 by Mateusz Kowalczyk at 2014-02-23T05:02:22+00:00 Update test case for lifted GADT type rendering The parsing of these seems to have been fixed by GHC folk and it now renders differently. IMHO it now renders in a better way so I'm updating the test to reflect this. - - - - - c3c88c2f by Mateusz Kowalczyk at 2014-02-23T06:37:14+00:00 Don't shadow ‘strip’. -Wall complains - - - - - 293031d8 by Niklas Haas at 2014-02-23T15:21:52+01:00 Make ImplicitParams render correctly (#260) This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone) - - - - - 4200842d by Niklas Haas at 2014-02-23T15:37:13+01:00 Lower precedence of equality constraints This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC - - - - - b59e3227 by Niklas Haas at 2014-02-23T16:11:22+01:00 Add RankNTypes test case to ImplicitParams.hs This test actually tests what haskell/haddock#260 originally reported - I omitted the RankNTypes scenario from the original fix because I realized it's not relevant to the underlying issue and indeed, this renders as intended now. Still good to have more tests. - - - - - c373dbf7 by Mateusz Kowalczyk at 2014-02-24T06:09:54+00:00 Fix rendering of Contents when links are present Fixes Haddock Trac haskell/haddock#267. - - - - - 9ecb0e56 by Mateusz Kowalczyk at 2014-02-24T06:26:50+00:00 Fix wording in the docs - - - - - 4f4dcd8e by Mateusz Kowalczyk at 2014-02-27T03:00:33+00:00 Change rendering of duplicate record field docs See Haddock Trac haskell/haddock#195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this. - - - - - ad8aa609 by Niklas Haas at 2014-03-08T09:43:26+01:00 Render fixity information Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of. - - - - - 6a39c917 by Niklas Haas at 2014-03-09T07:43:39+01:00 Reorder topDeclElem to move the source/wiki links to the top They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom. - - - - - 2d34b3b4 by Niklas Haas at 2014-03-09T07:53:46+01:00 Use optLast instead of listToMaybe for sourceUrls/wikiUrls This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates. - - - - - 0eff4624 by Niklas Haas at 2014-03-09T07:53:46+01:00 Differentiate between TH splices (line-links) and regular names This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures. - - - - - 66d6f77b by Niklas Haas at 2014-03-09T20:02:43+01:00 Group similar fixities together Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <= - - - - - 6587f9f5 by Mateusz Kowalczyk at 2014-03-10T04:24:18+00:00 Update changelog - - - - - 7387ddad by Niklas Haas at 2014-03-11T10:26:04+01:00 Include fixity information in the Interface file This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly. - - - - - ab46ef44 by Niklas Haas at 2014-03-11T10:26:04+01:00 Update changelog - - - - - 565cab6f by Niklas Haas at 2014-03-11T10:26:04+01:00 Update appearance of fixity annotations This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present. - - - - - 5d7afd67 by Niklas Haas at 2014-03-11T10:26:05+01:00 Filter family instances of hidden types Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case. - - - - - ec291b0c by Niklas Haas at 2014-03-11T10:26:05+01:00 Add documentation for --source-entity-line - - - - - 0922e581 by Niklas Haas at 2014-03-11T10:37:32+01:00 Revert "Reorder topDeclElem to move the source/wiki links to the top" This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines. - - - - - 30618e8b by Mateusz Kowalczyk at 2014-03-11T09:41:07+00:00 Bump version to 2.15.0 - - - - - adf3f1bb by Mateusz Kowalczyk at 2014-03-11T09:41:09+00:00 Fix up some whitespace - - - - - 8905f57d by Niklas Haas at 2014-03-13T19:18:06+00:00 Hide RHS of TFs with non-exported right hand sides Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user. - - - - - 5c44d5c2 by Niklas Haas at 2014-03-13T19:18:08+00:00 Add UnicodeSyntax alternatives for * and -> I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting. - - - - - b04a63e6 by Niklas Haas at 2014-03-13T19:18:10+00:00 Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. - - - - - a4a20b16 by Niklas Haas at 2014-03-13T19:18:12+00:00 Strip links from recently added html tests These were accidentally left there when the tests were originally added - - - - - d624f315 by Mateusz Kowalczyk at 2014-03-13T19:19:31+00:00 Update changelog - - - - - d27a21ac by Mateusz Kowalczyk at 2014-03-13T21:19:07+00:00 Always read in prologue files as UTF8 (#286). - - - - - 54b2fd78 by Mateusz Kowalczyk at 2014-03-13T21:28:09+00:00 Style only - - - - - fa4fe650 by Simon Hengel at 2014-03-15T09:04:18+01:00 Add Fuuzetsu maintainers field in cabal file - - - - - f83484b7 by Niklas Haas at 2014-03-15T18:20:24+00:00 Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. - - - - - 0099d276 by Niklas Haas at 2014-03-15T18:20:26+00:00 Fix issue haskell/haddock#281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. - - - - - 1f9687bd by Mateusz Kowalczyk at 2014-03-21T17:48:37+00:00 Please cabal sdist - - - - - 75542693 by Mateusz Kowalczyk at 2014-03-22T16:36:16+00:00 Drop needless --split-objs which slows us down. Involves tiny cleanup of all the dynflag bindings. Fixes haskell/haddock#292. - - - - - 31214dc3 by Herbert Valerio Riedel at 2014-03-23T18:01:01+01:00 Fix a few typos Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 0b73e638 by Mateusz Kowalczyk at 2014-03-31T05:34:36+01:00 Print kind signatures on GADTs - - - - - 2bab42f3 by Mateusz Kowalczyk at 2014-03-31T16:53:25+01:00 Add default for new PlatformConstraints field - - - - - 42647c5f by Mateusz Kowalczyk at 2014-03-31T18:29:04+01:00 Drop leading whitespace in @-style blocks. Fixes haskell/haddock#201. - - - - - 98208294 by Niklas Haas at 2014-03-31T20:09:58+02:00 Crash when exporting record selectors of data family instances This fixes bug haskell/haddock#294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated. - - - - - 3832d171 by Mateusz Kowalczyk at 2014-04-01T19:07:33+01:00 Make CHANGES consistent with what's now in 2.14.2 - - - - - c386ae89 by Mateusz Kowalczyk at 2014-04-01T19:18:36+01:00 Actually bundle extra spec tests in sdist - - - - - bd57a6d3 by Mateusz Kowalczyk at 2014-04-03T21:13:48+01:00 Update test cases for GHC bug haskell/haddock#8945, Haddock haskell/haddock#188 The order of signature groups has been corrected upstream. Here we add a test case and update some existing test-cases to reflect this change. We remove grouped signature in test cases that we can (Minimal, BugDeprecated &c) so that the test is as self-contained as possible. - - - - - 708b88b1 by Mateusz Kowalczyk at 2014-04-03T21:16:07+01:00 Enforce strict GHC version in cabal file This stops people with 7.6.3 trying to install 2.15.x which clearly won't work. Unfortunately we shipped 2.14.x without realising this. - - - - - 60334f7c by Mateusz Kowalczyk at 2014-04-03T21:19:24+01:00 Initialise some new PlatformConstants fields - - - - - ea77f668 by Mateusz Kowalczyk at 2014-04-11T16:52:23+01:00 We don't actually want unicode here - - - - - 0b651cae by Mateusz Kowalczyk at 2014-04-11T18:13:30+01:00 Parse identifiers with ^ and ⋆ in them. Fixes haskell/haddock#298. - - - - - e8ad0f5f by Mateusz Kowalczyk at 2014-04-11T18:47:41+01:00 Ignore version string during HTML tests. - - - - - de489089 by Mateusz Kowalczyk at 2014-04-11T18:59:30+01:00 Update CHANGES to follow 2.14.3 - - - - - beb464a9 by Gergő Érdi at 2014-04-13T16:31:10+08:00 remove Origin flag from LHsBindsLR - - - - - cb16f07c by Herbert Valerio Riedel at 2014-04-21T17:16:50+02:00 Replace local `die` by new `System.Exit.die` Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 9b9b23c7 by Mateusz Kowalczyk at 2014-05-03T15:40:11+02:00 Disambiguate ‘die’ in test runners. - - - - - 5d28a2b8 by Mateusz Kowalczyk at 2014-05-05T09:19:49+02:00 Prepare modules for parser split. We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type. - - - - - d3967ff3 by Mateusz Kowalczyk at 2014-05-05T11:00:41+02:00 Move parser + parser tests out to own package. We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes. - - - - - 522a448d by Mateusz Kowalczyk at 2014-05-05T11:14:47+02:00 Move out Show and Eq instances to Types They are much more useful to the users here. - - - - - 11a6f0f2 by Mateusz Kowalczyk at 2014-05-06T13:50:31+02:00 Remove no longer necessary parser error handling. We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places. - - - - - 6992c924 by Mateusz Kowalczyk at 2014-05-14T02:23:55+02:00 Please the GHC build-system. As I can not figure out how to do this properly, if we're in GHC tree, we treat the library as being the same package. If we're not in the tree, we require that the library be installed separately. - - - - - 7a8ad763 by Mateusz Kowalczyk at 2014-05-14T14:50:25+02:00 Update issue tracker URL - - - - - f616c521 by Mateusz Kowalczyk at 2014-05-14T14:53:32+02:00 Update issue tracker URL for haddock-library - - - - - 66580ded by Gergő Érdi at 2014-05-25T14:24:16+08:00 Accomodate change in PatSyn representation - - - - - 0e43b988 by Mateusz Kowalczyk at 2014-05-29T03:15:29+02:00 Revert "Accomodate change in PatSyn representation" This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this. - - - - - e10d7ec8 by Mateusz Kowalczyk at 2014-05-29T03:24:11+02:00 Revert "Revert "Accomodate change in PatSyn representation"" This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me. - - - - - 5861aca9 by Mateusz Kowalczyk at 2014-06-05T19:49:27+02:00 Clear up highlighting of identifiers with ‘'’s. - - - - - d7cc420f by Simon Peyton Jones at 2014-06-06T12:41:09+01:00 Follow change in patSynSig - - - - - 938b4fd8 by Mateusz Kowalczyk at 2014-06-12T07:24:29+02:00 Slightly update the readme. Style-sheets are no longer a recent thing, dead links, old maintainers, different formats. - - - - - c7799dea by Mateusz Kowalczyk at 2014-06-18T00:05:56+02:00 Update cabal files Update repository urls, use subdir property for haddock-library and use a separate versioning scheme for haddock-library in preparation for release. - - - - - a2750b6a by Simon Hengel at 2014-06-18T11:01:18+08:00 Compatibility with older versions of base and bytestring - - - - - 009b4b03 by Simon Hengel at 2014-06-18T11:14:01+08:00 Enable travis-ci for haddock-library - - - - - 9b5862eb by Simon Hengel at 2014-06-18T11:14:01+08:00 haddock-library: Do not depend on haddock-library in test suite I think you either add src to hs-source-dirs or the library to build-depends. But doing both does not make sense (AFAICT). - - - - - fb1f3279 by Simon Hengel at 2014-06-18T11:49:05+08:00 haddock-library: Use -Wall for specs - - - - - 649340e1 by Mateusz Kowalczyk at 2014-06-18T06:58:54+02:00 Use Travis with multiple GHC versions When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project. - - - - - d7eeeec2 by Mateusz Kowalczyk at 2014-06-18T07:49:04+02:00 Comment improvements + few words in cabal file - - - - - 0f8db914 by Simon Hengel at 2014-06-18T13:52:23+08:00 Use doctest to check examples in documentation - - - - - 2888a8dc by Simon Hengel at 2014-06-18T14:16:48+08:00 Remove doctest dependency (so that we can use haddock-library with doctest) - - - - - 626d5e85 by Mateusz Kowalczyk at 2014-06-18T08:41:25+02:00 Travis tweaks - - - - - 41d4f9cc by Mateusz Kowalczyk at 2014-06-18T08:58:43+02:00 Don't actually forget to install specified GHC. - - - - - c6aa512a by John MacFarlane at 2014-06-18T10:43:57-07:00 Removed reliance on LambdaCase (which breaks build with ghc 7.4). - - - - - b9b93b6f by John MacFarlane at 2014-06-18T10:54:56-07:00 Fixed haddock warnings. - - - - - a41b0ab5 by Mateusz Kowalczyk at 2014-06-19T01:20:10+02:00 Update Travis, bump version - - - - - 864bf62a by Mateusz Kowalczyk at 2014-06-25T10:36:54+02:00 Fix anchors. Closes haskell/haddock#308. - - - - - 53df91bb by Mateusz Kowalczyk at 2014-06-25T15:04:49+02:00 Drop DocParagraph from front of headers I can not remember why they were wrapped in paragraphs to begin with and it seems unnecessary now that I test it. Closes haskell/haddock#307. - - - - - 29b5f2fa by Mateusz Kowalczyk at 2014-06-25T15:17:20+02:00 Don't mangle append order for nested lists. The benefit of this is that the ‘top-level’ element of such lists is properly wrapped in <p> tags so any CSS working with these will be applied properly. It also just makes more sense. Pointed out at jgm/pandoc#1346. - - - - - 05cb6e9c by Mateusz Kowalczyk at 2014-06-25T15:19:45+02:00 Bump haddock-library to 1.1.0 for release - - - - - 70feab15 by Iavor Diatchki at 2014-07-01T03:37:07-07:00 Propagate overloading-mode for instance declarations in haddock (#9242) - - - - - d4ca34a7 by Simon Peyton Jones at 2014-07-14T16:23:15+01:00 Adapt to new definition of HsDecls.TyFamEqn This is a knock-on from the refactoring from Trac haskell/haddock#9063. I'll push the corresponding changes to GHC shortly. - - - - - f91e2276 by Edward Z. Yang at 2014-07-21T08:14:19-07:00 Track GHC PackageId to PackageKey renaming. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - b010f9ef by Edward Z. Yang at 2014-07-25T16:28:46-07:00 Track changes for module reexports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - 8b85f9f9 by Mateusz Kowalczyk at 2014-07-28T13:25:43+02:00 Catch mid-line URLs. Fixes haskell/haddock#314. - - - - - 4c613a78 by Edward Z. Yang at 2014-08-05T03:11:00-07:00 Track type signature change of lookupModuleInAllPackages Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - e80b051c by Edward Z. Yang at 2014-08-05T17:34:26+01:00 If GhcProfiled, also build Haddock profiled. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f9cccd29 by Edward Z. Yang at 2014-08-07T14:23:35+01:00 Ignore TAGS files. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 00b3af52 by Mateusz Kowalczyk at 2014-08-08T04:58:19+02:00 Update to attoparsec-0.12.1.1 There seems to be memory and speed improvement. - - - - - 5457dc71 by Mateusz Kowalczyk at 2014-08-08T18:24:02+02:00 Fix forgotten src - - - - - 3520cb04 by Mateusz Kowalczyk at 2014-08-14T20:19:07+01:00 Bump down the version for master to 2.14.4 - - - - - dc98c21b by Mateusz Kowalczyk at 2014-08-14T20:23:27+01:00 Revert "Track type signature change of lookupModuleInAllPackages" This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f. - - - - - 3f2038c0 by Mateusz Kowalczyk at 2014-08-14T20:23:31+01:00 Revert "Track changes for module reexports." This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d. - - - - - 56d4e49e by Mateusz Kowalczyk at 2014-08-14T20:23:42+01:00 Revert "Track GHC PackageId to PackageKey renaming." This reverts commit 8ac42d3327473939c013551750425cac191ff0fd. - - - - - 726ea3cb by Mateusz Kowalczyk at 2014-08-14T20:23:47+01:00 Revert "Adapt to new definition of HsDecls.TyFamEqn" This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd. - - - - - 61a88ff0 by Mateusz Kowalczyk at 2014-08-14T20:23:52+01:00 Revert "Propagate overloading-mode for instance declarations in haddock (#9242)" This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c. - - - - - a32ba674 by Mateusz Kowalczyk at 2014-08-14T20:26:03+01:00 Revert "Disambiguate ‘die’ in test runners." This reverts commit dba02d6df32534aac5d257f2d28596238d248942. - - - - - f335820f by Mateusz Kowalczyk at 2014-08-14T20:26:09+01:00 Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. - - - - - 107078e4 by Mateusz Kowalczyk at 2014-08-14T20:27:34+01:00 Merge branch 'reverts' This reverts any changes that were made to have Haddock compile with 7.9. When 7.10 release comes, we can simply re-apply all the patches and any patches that occur on ghc-head branch from now on. This allows us to build master with 7.8.3 - - - - - b44b3871 by Mateusz Kowalczyk at 2014-08-15T02:47:40+01:00 Fix haskell/haddock#313 by doing some list munging. I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly. - - - - - e1a62cde by Mateusz Kowalczyk at 2014-08-15T02:52:56+01:00 Stop testing haskell/haddock#188. Because the change is in GHC 7.9 and we now work against 7.8.3, this test no longer makes sense. We revert it until 7.10 becomes the standard version. If anything, there should be a test for this in GHC itself. - - - - - 54e8286d by Mateusz Kowalczyk at 2014-08-15T05:31:57+01:00 Add haskell/haddock#313 to CHANGES - - - - - 9df7ad5d by Simon Hengel at 2014-08-20T11:25:32+08:00 Fix warning - - - - - ee2574d6 by Simon Hengel at 2014-08-20T12:07:01+08:00 Fix travis builds - - - - - 384cf2e6 by Simon Hengel at 2014-08-20T12:14:31+08:00 Require GHC 7.8.3 - - - - - d4779863 by Simon Hengel at 2014-08-22T12:14:16+08:00 Move Haddock API to a separate package - - - - - 80f3e0e1 by Simon Hengel at 2014-08-22T14:57:38+08:00 Bump version to 2.15.0 and add version constraints - - - - - 309a94ce by Simon Hengel at 2014-08-22T15:18:06+08:00 Add deprecated compatibility module - - - - - 4d1e4e3f by Luite Stegeman at 2014-08-22T20:46:45+02:00 export things to allow customizing how the Ghc session is run - - - - - 47884591 by Luite Stegeman at 2014-08-22T20:46:51+02:00 ghc 7.8.2 compatibility - - - - - 5ea94e2c by Luite Stegeman at 2014-08-22T22:08:58+02:00 install dependencies for haddock-api on travis - - - - - 9fb845b2 by Mateusz Kowalczyk at 2014-08-23T10:09:34+01:00 Move sources under haddock-api/src - - - - - 85817dc4 by Mateusz Kowalczyk at 2014-08-23T10:10:48+01:00 Remove compat stuff - - - - - 151c6169 by Niklas Haas at 2014-08-24T08:14:10+02:00 Fix extra whitespace on signatures and update all test cases This was long overdue, now running ./accept.lhs on a clean test from master will not generate a bunch of changes. - - - - - d320e0d2 by Niklas Haas at 2014-08-24T08:14:35+02:00 Omit unnecessary foralls and fix haskell/haddock#315 This also fixes haskell/haddock#86. - - - - - bdafe108 by Mateusz Kowalczyk at 2014-08-24T15:06:46+01:00 Update CHANGES - - - - - fafa6d6e by Mateusz Kowalczyk at 2014-08-24T15:14:23+01:00 Delete few unused/irrelevant/badly-place files. - - - - - 3634923d by Duncan Coutts at 2014-08-27T13:49:31+01:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. - - - - - 539a7e70 by Herbert Valerio Riedel at 2014-08-31T11:36:32+02:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 9e3a0e5b by Mateusz Kowalczyk at 2014-08-31T12:54:43+01:00 Bump version in doc - - - - - 4a177525 by Mateusz Kowalczyk at 2014-08-31T13:01:23+01:00 Bump haddock-library version - - - - - f99c1384 by Mateusz Kowalczyk at 2014-08-31T13:05:25+01:00 Remove references to deleted files - - - - - 5e51a247 by Mateusz Kowalczyk at 2014-08-31T14:18:44+01:00 Make the doc parser not complain - - - - - 2cedb49a by Mateusz Kowalczyk at 2014-09-03T03:33:15+01:00 CONTRIBUTING file for issues - - - - - 88027143 by Mateusz Kowalczyk at 2014-09-04T00:46:59+01:00 Mention --print-missing-docs - - - - - 42f6754f by Alan Zimmerman at 2014-09-05T18:13:24-05:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e712719e by Austin Seipp at 2014-09-09T01:03:27-05:00 Fix import of 'empty' due to AMP. Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 71c29755 by Herbert Valerio Riedel at 2014-09-09T17:35:20+02:00 Bump `base` constraint for AMP - - - - - 0bf9f3ed by Mateusz Kowalczyk at 2014-09-12T19:18:32+01:00 Delete stale ANNOUNCE - - - - - cac89ee6 by Krzysztof Gogolewski at 2014-09-14T17:17:09+02:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 4d683426 by Edward Z. Yang at 2014-09-18T13:38:11-07:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 80697fd5 by Herbert Valerio Riedel at 2014-09-19T00:07:52+02:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. - - - - - c015eb70 by Herbert Valerio Riedel at 2014-09-19T00:10:36+02:00 Revert "Followup changes to addition of -fwarn-context-quantification" This reverts commit 4023817d7c0e46db012ba2eea28022626841ca9b temporarily as the respective feature hasn't landed in GHC HEAD yet, but this commit blocks later commits from being referenced in GHC HEAD. - - - - - 38ded784 by Edward Z. Yang at 2014-09-18T15:32:15-07:00 Revert "Revert "Followup changes to addition of -fwarn-context-quantification"" This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now. - - - - - f55d59c9 by Herbert Valerio Riedel at 2014-09-26T19:18:28+02:00 Revert "Fix import of 'empty' due to AMP." This reverts commit 0cc5bc85e9fca92ab712b68a2ba2c0dd9d3d79f4 since it turns out we don't need to re-export `empty` from Control.Monad after all. - - - - - 467050f1 by David Feuer at 2014-10-09T20:07:36-04:00 Fix improper lazy IO use Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. - - - - - cc47b699 by Edward Z. Yang at 2014-10-09T21:38:19-07:00 Fix use-after-close lazy IO bug Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. Signed-off-by: David Feuer <David.Feuer at gmail.com> Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 87babcbe by Austin Seipp at 2014-10-20T20:05:27-05:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - ab259516 by Austin Seipp at 2014-10-20T20:07:01-05:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - b918093c by Mateusz Kowalczyk at 2014-10-29T03:59:39+00:00 Experimental support for collapsable headers Closes haskell/haddock#335 - - - - - 849db129 by Mateusz Kowalczyk at 2014-10-29T10:07:26+01:00 Experimental support for collapsable headers (cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc) - - - - - a4cc4789 by Herbert Valerio Riedel at 2014-10-31T11:08:26+01:00 Collapse user-defined section by default (re haskell/haddock#335) - - - - - 9da1b33e by Yuras Shumovich at 2014-10-31T16:11:04-05:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - c625aefc by Austin Seipp at 2014-10-31T19:34:10-05:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - c7738e5e by Simon Hengel at 2014-11-02T07:25:30+08:00 Remove -fobject-code from .ghci (this slows down reloads on modifications) - - - - - d4a86e95 by Simon Hengel at 2014-11-03T09:26:11+08:00 Get rid of StandaloneDeriving - - - - - a974e311 by Simon Hengel at 2014-11-03T09:26:11+08:00 Derive more instances - - - - - 8aa0c4d7 by Simon Hengel at 2014-11-03T09:27:08+08:00 Remove unused language extensions - - - - - 3052d46a by Simon Hengel at 2014-11-03T09:30:46+08:00 Minor refactoring - - - - - 4281d3cb by Simon Hengel at 2014-11-03T09:30:46+08:00 parser: Try to parse definition lists right before text paragraphs - - - - - 8ba12bf9 by Simon Hengel at 2014-11-03T09:34:19+08:00 Add support for markdown links (closes haskell/haddock#336) - - - - - a2f8d747 by Simon Hengel at 2014-11-03T09:34:19+08:00 Allow markdown links at the beginning of a paragraph - - - - - 53b11207 by Simon Hengel at 2014-11-03T09:34:20+08:00 Update documentation - - - - - 652267c6 by Simon Hengel at 2014-11-03T09:34:20+08:00 Add support for markdown images - - - - - 9d667502 by Simon Hengel at 2014-11-03T09:34:20+08:00 Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. - - - - - 8167fc32 by Mateusz Kowalczyk at 2014-11-04T01:16:51+00:00 whitespace only - - - - - 3da62981 by Mateusz Kowalczyk at 2014-11-04T01:17:31+00:00 Fix re-exports of built-in type families Fixes haskell/haddock#310 - - - - - edc76b34 by Mateusz Kowalczyk at 2014-11-04T02:54:28+00:00 Turn some uses of error into recoverable warnings This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end. - - - - - 0a137400 by Mateusz Kowalczyk at 2014-11-04T04:09:44+00:00 Fix warnings - - - - - d068fc21 by Mateusz Kowalczyk at 2014-11-04T21:04:07+00:00 Fix parsing of identifiers written in infix way - - - - - 1a9f2f3d by Simon Hengel at 2014-11-08T11:32:42+08:00 Minor code simplification - - - - - 6475e9b1 by Simon Hengel at 2014-11-08T17:28:33+08:00 newtype-wrap parser monad - - - - - dc1ea105 by Herbert Valerio Riedel at 2014-11-15T11:55:43+01:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - fbb1aca4 by Simon Hengel at 2014-11-16T08:51:38+08:00 State intention rather than implementation details in Haddock comment - - - - - 97851ab2 by Simon Hengel at 2014-11-16T10:20:19+08:00 (wip) Add support for @since (closes haskell/haddock#26) - - - - - 34bcd18e by Gergő Érdi at 2014-11-20T22:35:38+08:00 Update Haddock to new pattern synonym type signature syntax - - - - - 304b7dc3 by Jan Stolarek at 2014-11-20T17:48:43+01:00 Follow changes from haskell/haddock#9812 - - - - - 920f9b03 by Richard Eisenberg at 2014-11-20T16:52:50-05:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 0bfe4e78 by Alan Zimmerman at 2014-11-21T11:23:09-06:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 356ed45a by Thomas Winant at 2014-11-28T16:11:22-06:00 Support for PartialTypeSignatures - - - - - 5dc8f3b1 by Gergő Érdi at 2014-11-29T15:39:09+08:00 For pattern synonyms, render "pattern" as a keyword - - - - - fe704480 by Mateusz Kowalczyk at 2014-12-09T03:38:32+00:00 List new module in cabal file - - - - - b9ad5a29 by Mateusz Kowalczyk at 2014-12-10T00:58:24+00:00 Allow the parser to spit out meta-info Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes haskell/haddock#26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves. - - - - - 765af0e3 by Mateusz Kowalczyk at 2014-12-10T01:17:19+00:00 Update doctest parts of comments - - - - - 8670272b by jpmoresmau at 2014-12-10T01:35:31+00:00 header could contain several lines Closes haskell/haddock#348 - - - - - 4f9ae4f3 by Mateusz Kowalczyk at 2014-12-12T06:22:31+00:00 Revert "Merge branch 'reverts'" This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - e974ac94 by Duncan Coutts at 2014-12-12T06:26:11+00:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. Conflicts: haddock-api/src/Haddock.hs - - - - - 2f3a2365 by Herbert Valerio Riedel at 2014-12-12T06:26:51+00:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 1dbd6390 by Alan Zimmerman at 2014-12-12T06:32:07+00:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - bb6ff1f4 by Mateusz Kowalczyk at 2014-12-12T06:35:07+00:00 Bump ‘base’ constraint Follows the similar commit made on ghc-head branch - - - - - 466fe4ab by Krzysztof Gogolewski at 2014-12-12T06:37:42+00:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 97e080c9 by Edward Z. Yang at 2014-12-12T06:39:35+00:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs - - - - - 20b2af56 by Herbert Valerio Riedel at 2014-12-12T06:42:50+00:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. Conflicts: haddock-library/src/Documentation/Haddock/Parser.hs - - - - - b3ad269d by Austin Seipp at 2014-12-12T06:44:14+00:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 072df0dd by Austin Seipp at 2014-12-12T06:45:01+00:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - dbb9294a by Herbert Valerio Riedel at 2014-12-12T06:46:17+00:00 Collapse user-defined section by default (re haskell/haddock#335) Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - - - - - f23ab545 by Yuras Shumovich at 2014-12-12T06:46:41+00:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - 753a4b67 by Austin Seipp at 2014-12-12T06:46:51+00:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8954e8f5 by Herbert Valerio Riedel at 2014-12-12T06:50:53+00:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - d2b06d61 by Gergő Érdi at 2014-12-12T07:07:30+00:00 Update Haddock to new pattern synonym type signature syntax Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 1ff02426 by Jan Stolarek at 2014-12-12T07:13:24+00:00 Follow changes from haskell/haddock#9812 Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - 06ad7600 by Richard Eisenberg at 2014-12-12T07:13:43+00:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 8fd2aa8b by Alan Zimmerman at 2014-12-12T07:22:25+00:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Backends/LaTeX.hs haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 95c3db98 by Thomas Winant at 2014-12-12T07:35:49+00:00 Support for PartialTypeSignatures Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs haddock-api/src/Haddock/Interface/Create.hs - - - - - 45494428 by Gergő Érdi at 2014-12-12T07:36:18+00:00 For pattern synonyms, render "pattern" as a keyword - - - - - a237e3eb by Mateusz Kowalczyk at 2014-12-12T12:27:13+00:00 Various fixups and bumps for next release - - - - - 22918bcd by Herbert Valerio Riedel at 2014-12-14T10:11:47+01:00 Remove redundant wild-card pattern match (this would otherwise cause a build-failure with `-Werror`) - - - - - 1d6ce947 by Herbert Valerio Riedel at 2014-12-14T10:17:06+01:00 Treat GHC 7.10 the same as GHC 7.9 ...since the current GHC 7.9 is going to become GHC 7.10 real-soon-now anyway - - - - - f434ea89 by Herbert Valerio Riedel at 2014-12-14T18:26:50+01:00 Fixup ghc.mk (follow-up to 1739375eb23342) This makes the GHC build-system aware of the data-files to be copied into the bindist (as haddock.cabal doesn't list those anymore) - - - - - 6fb839eb by Mateusz Kowalczyk at 2014-12-17T09:28:59+00:00 Only keep one Version instead of blindly appending - - - - - 40645489 by Mateusz Kowalczyk at 2014-12-18T07:09:44+00:00 Fix dependency version - - - - - 8b3b927b by Mateusz Kowalczyk at 2014-12-18T07:14:23+00:00 Print missing docs by default Adds --no-print-missing-docs - - - - - 59666694 by Mateusz Kowalczyk at 2014-12-18T07:21:37+00:00 update changelog - - - - - aa6d168e by Mateusz Kowalczyk at 2014-12-18T07:30:58+00:00 Update docs for @since - - - - - 2d7043ee by Luite Stegeman at 2014-12-19T18:29:35-06:00 hide projectVersion from DynFlags since it clashes with Haddock.Version.projectVersion - - - - - aaa70fc0 by Luite Stegeman at 2014-12-22T15:58:43+01:00 Add missing import for standalone haddock-api package - - - - - 9ce01269 by Herbert Valerio Riedel at 2014-12-22T17:48:45+01:00 Reset ghc-head with master's tree (this is an overwriting git merge of master into ghc-head) - - - - - fcd6fec1 by Herbert Valerio Riedel at 2014-12-22T17:51:52+01:00 Bump versions for ghc-7.11 - - - - - 525ec900 by Mateusz Kowalczyk at 2014-12-23T13:36:24+00:00 travis-ci: test with HEAD - - - - - cbf494b5 by Simon Peyton Jones at 2014-12-23T15:22:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 50e01c99 by Mateusz Kowalczyk at 2014-12-29T15:28:47+00:00 Make travis use 7.10.x - - - - - 475e60b0 by Njagi Mwaniki at 2014-12-29T15:30:44+00:00 Turn the README into GitHub Markdown format. Closes haskell/haddock#354 - - - - - 8cacf48e by Luite Stegeman at 2015-01-05T16:25:37+01:00 bump haddock-api ghc dependency to allow release candidate and first release - - - - - 6ed6cf1f by Simon Peyton Jones at 2015-01-06T16:37:47+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 8b484f33 by Simon Peyton Jones at 2015-01-08T15:50:22+00:00 Track naming change in DataCon - - - - - 23c5c0b5 by Alan Zimmerman at 2015-01-16T10:15:11-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e7a5532c by JP Moresmau at 2015-01-22T17:19:03+00:00 Ignore warnings, install Cabal 1.22 - - - - - 86942c84 by jpmoresmau at 2015-01-22T17:19:04+00:00 solve dataDir ambiguity - - - - - 5ceb743e by jpmoresmau at 2015-01-22T19:17:32+00:00 support GHC 7.10: no Safe-Inferred, Foldable instance - - - - - 6a3b3fb5 by Mateusz Kowalczyk at 2015-01-22T19:32:10+00:00 Update test files Test: a correct behaviour for fields comma-separating values. I'm surprised we had no bug open for this. Maybe it affects how haskell/haddock#301 renders now but I doubt. Operators: Seems GHC is giving us a new order for operators, something must have changed on their side again. cc @haasn , this makes the fixity to the side not match the order on the LHS which is a bit unpleasant. Maybe the fixity can be made to match the GHC order? Bug335: We expand examples by default now. Bug310: Now inferred safe. - - - - - 708f8b2f by jpmoresmau at 2015-01-22T19:36:59+00:00 Links to source location of class instance definitions - - - - - 5cf8a6da by Vincent Berthoux at 2015-01-22T19:59:58+00:00 Filter '\r' from comments due to Windows problems. On Windows this was causing newline to be rendered twice in code blocks. Closes haskell/haddock#359, fixes haskell/haddock#356. - - - - - 1749e6f0 by Mateusz Kowalczyk at 2015-01-22T20:31:27+00:00 Changelog only - - - - - c8145f90 by Mateusz Kowalczyk at 2015-01-22T23:34:05+00:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. - - - - - 14248254 by Mateusz Kowalczyk at 2015-01-22T23:43:18+00:00 Sort out some module import warnings - - - - - d8a38989 by Simon Peyton Jones at 2015-01-23T07:10:16-06:00 Track naming change in DataCon (cherry picked from commit 04cf63d0195837ed52075ed7d2676e71831e8a0b) - - - - - d3ac6ae4 by Alan Zimmerman at 2015-01-23T07:17:19-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit d61bbc75890e4eb0ad508b9c2a27b91f691213e6) - - - - - 4c1ffeb0 by Simon Peyton Jones at 2015-02-10T12:10:33+00:00 Track changes in HsSyn for quasi-quotes - - - - - 775d20f7 by Mateusz Kowalczyk at 2015-03-15T08:11:48+01:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. (cherry picked from commit 8e06728afb0784128ab2df0be7a5d7a191d30ff4) - - - - - f9245e72 by Phil Ruffwind at 2015-03-16T04:32:01-04:00 Prevent Synopsis from using up too much horizontal space When long type signatures occur in the Synopsis, the element is stretched beyond the width of the window. Scrollbars don't appear, so it's impossible to read anything when this happens. - - - - - cd8fa415 by Mateusz Kowalczyk at 2015-03-17T21:59:39+00:00 Update changelog Closes haskell/haddock#151 due to 71170fc77962f10d7d001e3b8bc8b92bfeda99bc - - - - - b5248b47 by Ben Gamari at 2015-03-25T17:12:17+00:00 Make the error encountered when a package can't be found more user-friendly Closes haskell/haddock#369 - - - - - b756b772 by Mateusz Kowalczyk at 2015-03-26T16:31:40+00:00 Remove now redundant imports - - - - - 5ea5e8dd by Mateusz Kowalczyk at 2015-03-26T16:45:52+00:00 Update test to account for \r filtering - - - - - 6539bfb3 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Test for anchor defaulting I delete the old tests because it turns out that: * test runner would never put them in scope of each other even with imports so just one would suffice * test runner actually needed some hacking to keep links so in the end we would end up with no anchors making them useless - - - - - 1a01d950 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Clearly default to variables in out of scope case - - - - - 7943abe8 by Mateusz Kowalczyk at 2015-03-27T01:14:11+00:00 Fix Hoogle display of constructors Fixes haskell/haddock#361 - - - - - 6d6e587e by Mateusz Kowalczyk at 2015-03-27T01:45:18+00:00 Fully qualify names in Hoogle instances output Closes haskell/haddock#263 - - - - - 52dac365 by Mateusz Kowalczyk at 2015-03-27T01:55:01+00:00 Update changelog - - - - - ca5af9a8 by Mateusz Kowalczyk at 2015-03-27T02:43:55+00:00 Output method documentation in Hoogle backend One thing of note is that we no longer preserve grouping of methods and print each method on its own line. We could preserve it if no documentation is present for any methods in the group if someone asks for it though. Fixes haskell/haddock#259 - - - - - a33f0c10 by Mateusz Kowalczyk at 2015-03-27T03:04:21+00:00 Don't print instance safety information in Hoogle Fixes haskell/haddock#168 - - - - - df6c935a by Mateusz Kowalczyk at 2015-03-28T00:11:47+00:00 Post-release version bumps and changelog - - - - - dde8f7c0 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Loosen bounds on haddock-* - - - - - de93bf89 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Expand response files in arguments Closes haskell/haddock#285 - - - - - 1f0b0856 by Zejun Wu at 2015-04-26T16:35:35-07:00 Do not insert anchor for section headings in contents box - - - - - 860439d7 by Simon Peyton Jones at 2015-05-01T09:36:47+01:00 Track change in API of TyCon - - - - - a32f3e5f by Adam Gundry at 2015-05-04T15:32:59+01:00 Track API changes to support empty closed type familes - - - - - 77e98bee by Ben Gamari at 2015-05-06T20:17:08+01:00 Ignore doc/haddock.{ps,pdf} - - - - - 663d0204 by Murray Campbell at 2015-05-11T04:47:37-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8bb0dcf5 by Murray Campbell at 2015-05-11T06:35:06-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit 2380f07c430c525b205ce2eae6dab23c8388d899) - - - - - bad900ea by Adam Bergmark at 2015-05-11T15:29:39+01:00 haddock-library: require GHC >= 7.4 `Data.Monoid.<>` was added in base-4.5/GHC-7.4 Closes haskell/haddock#394 Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - daceff85 by Simon Peyton Jones at 2015-05-13T12:04:21+01:00 Track the new location of setRdrNameSpace - - - - - 1937d1c4 by Alan Zimmerman at 2015-05-25T21:27:15+02:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - ee0fb6c2 by Łukasz Hanuszczak at 2015-05-27T11:51:31+02:00 Create simple method for indentation parsing. - - - - - 7d6fcad5 by Łukasz Hanuszczak at 2015-05-27T21:36:13+02:00 Make nested lists count indentation according to first item. - - - - - d6819398 by Łukasz Hanuszczak at 2015-05-27T22:46:13+02:00 Add simple test case for arbitrary-depth list nesting. - - - - - 2929c54d by Łukasz Hanuszczak at 2015-06-03T02:11:31+02:00 Add arbitrary-indent spec test for parser. - - - - - 9a0a9bb0 by Mateusz Kowalczyk at 2015-06-03T05:25:29+01:00 Update docs with info on new list nesting rule Fixes haskell/haddock#278 through commits from PR haskell/haddock#401 - - - - - 12efc92c by Mateusz Kowalczyk at 2015-06-03T05:29:26+01:00 Update some meta data at the top of the docs - - - - - 765ee49f by Bartosz Nitka at 2015-06-07T08:40:59-07:00 Add some Hacking docs for getting started - - - - - 19aaf851 by Bartosz Nitka at 2015-06-07T08:44:30-07:00 Fix markdown - - - - - 2a90cb70 by Mateusz Kowalczyk at 2015-06-08T15:08:36+01:00 Refine hacking instructions slightly - - - - - 0894da6e by Thomas Winant at 2015-06-08T23:47:28-05:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 10a9bb76 by Emanuel Borsboom at 2015-06-12T02:46:23+01:00 Build executable with '-threaded' (fixes haskell/haddock#399) - - - - - 7696b94f by Mateusz Kowalczyk at 2015-06-12T02:59:19+01:00 Update changelog for -threaded Closes haskell/haddock#400 - - - - - d3c118ec by Bartosz Nitka at 2015-06-12T03:00:58+01:00 Fix haddock: internal error: spliceURL UnhelpfulSpan (#207) Inferred type signatures don't have SrcSpans, so let's use the one from the declaration. I've tested this manually on the test-case from haskell/haddock#207, but I got stuck at trying to run the test-suite. - - - - - b67e843b by Mateusz Kowalczyk at 2015-06-12T03:01:50+01:00 Changelog for haskell/haddock#207 Fixes haskell/haddock#207, closes haskell/haddock#402 - - - - - 841d785e by jpmoresmau at 2015-06-12T16:03:16+01:00 Attach to instance location the name that has the same location file Fixes haskell/haddock#383 - - - - - 98791cae by Mateusz Kowalczyk at 2015-06-12T16:08:27+01:00 Update changelog Closes haskell/haddock#398 - - - - - 7c0b5a87 by Phil Ruffwind at 2015-06-12T13:07:25-04:00 Fix alignment of Source links in instance table in Firefox Due to a Firefox bug [1], a combination of 'whitespace: nowrap' on the parent element with 'float: right' on the inner element can cause the floated element to be displaced downwards for no apparent reason. To work around this, the left side is wrapped in its own <span> and set to 'float: left'. As a precautionary measure to prevent the parent element from collapsing entirely, we also add the classic "clearfix" hack. The latter is not strictly needed but it helps prevent bugs if the layout is altered again in the future. Fixes haskell/haddock#384. Remark: line 159 of src/Haddock/Backends/Xhtml/Layout.hs was indented to prevent confusion over the operator precedence of (<+>) vs (<<). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=488725 - - - - - cfe86e73 by Mateusz Kowalczyk at 2015-06-14T10:49:01+01:00 Update tests for the CSS changes - - - - - 2d4983c1 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding for Haskell source parser module. - - - - - 29548785 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement function for tagging parsed chunks with source spans. - - - - - 6a5e4074 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement simple string chunking based on HsColour library. - - - - - 6e52291f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create basic token classification method. - - - - - da971a27 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Adapt source span tagging to work with current whitespace handling. - - - - - 4feb5a22 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add record accessors to exports of hyperlinker parser module. - - - - - a8cc4e39 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Make parser module export all types and associated accessors. - - - - - fb8d468f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple HTML renderer for parsed source file. - - - - - 80747822 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for specifying the CSS file path in HTML source renderer. - - - - - 994dc1f5 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix identifier recognition in Haskell source parser. - - - - - b1bd0430 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix comment recognition in Haskell source parser. - - - - - 11db85ae by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for recognizing compiler pragmas in source parser. - - - - - 736c7bd3 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding of module for associating tokens with AST names. - - - - - 7e149bc2 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement utility method for extracting variable identifiers from AST. - - - - - 32eb640a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple mechanism for associating tokens with AST names. - - - - - d4eba5bc by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add dummy support for hyperlinking named tokens. - - - - - 2b76141f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matcher bug causing wrong items being hyperlinked. - - - - - 2d48002e by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Constrain elements exported by hyperlinker modules. - - - - - 9715eec6 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for type token recognition. - - - - - 8fa401cb by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for binding token recognition. - - - - - d062400b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement go-to-definition mechanism for local bindings. - - - - - f4dc229b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement module export- and import-list item hyperlinking. - - - - - c9a46d58 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matching to allow parenthesized operators hyperlinking. - - - - - 03aad95a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix weird hyperlinking of parenthesized operators. - - - - - b4694a7d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for type declaration anchors. - - - - - 7358d2d2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for top-level function declaration anchors. - - - - - dfc24b24 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix external anchors to contain HTML file extension. - - - - - a045926c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Refactor the way AST names are handled within detailed tokens. - - - - - c76049b4 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement hyperlinking of imported module names. - - - - - 2d2a1572 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix parsing of single line comments with broken up newlines. - - - - - 11afdcf2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix bug with improper newline handling. - - - - - 8137f104 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issues with escaped newlines in comments. - - - - - 34759b19 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for parsing C preprocessor macros. - - - - - 09f0f847 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for parser module of source hyperlinker. - - - - - 709a8389 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for AST module of source hyperlinker. - - - - - 4df5c227 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add command line option for generating hyperlinked source. - - - - - 7a755ea2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Extend module interface with rich source token stream field. - - - - - 494f4ab1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement source tokenization during interface creation process. - - - - - 5f21c953 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create hyperlinker module and plug it into the Haddock pipeline. - - - - - 0cc8a216 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for providing custom CSS files for hyperlinked source. - - - - - a32bbdc1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for fancy highlighting upon hovering over identifier. - - - - - d16d642a by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make source hyperlinker generate output in apropriate directory. - - - - - ae12953d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create module with hyperlinker utility functions. - - - - - 6d4952c5 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make external hyperlinks point to locations specified by source URLs. - - - - - 8417555d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Rewrite source generation to fixed links and directory structure. - - - - - ce9cec01 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add basic support for cross-package hyperlink generation. - - - - - 7eaf025c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Disable generating hyperlinks for module references. - - - - - a50bf92e by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make Haddock generate source for all interfaces (also hidden ones). - - - - - f5ae2838 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Prevent source parser from throwing exception when lexing fails. - - - - - db9ffbe0 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement workaround for Chrome highlighting issues. - - - - - 0b6b453b by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate correct anchors for data constructors. - - - - - c86d38bc by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate anchors for record field declarations. - - - - - 063abf7f by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issue with hyperlink highlight styling in Chrome browser. - - - - - 880fc611 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking constructor names in patters. - - - - - c9e89b95 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record patterns. - - - - - 17a11996 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record expressions. - - - - - 0eef932d by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Make hyperlinker respect pretty-printer flag and add documentation. - - - - - f87c1776 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Unexpose hyperlinker modules in Cabal configuration. - - - - - 4c9e2b06 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Setup HSpec framework for Haddock API package. - - - - - 4b20cb30 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add basic tests related to comment parsing. - - - - - 6842e919 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add tests related to parsing basic language constructs. - - - - - 87bffb35 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add simple tests for do-notation parsing. - - - - - e7af1841 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add very simple QuickCheck properties for source parser spec. - - - - - c84efcf1 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Create simple test runner for hyperlinker tests. - - - - - 76b90447 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for basic identifier hyperlinking. - - - - - 0fbf4df6 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for operator hyperlinking. - - - - - 731aa039 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for constructor hyperlinking. - - - - - 995a78a2 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for record expressions and patterns hyperlinking. - - - - - 3566875a by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for literal syntax highlighting. - - - - - 68469a35 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add hyperlinker test runner to .cabal and .gitignore files. - - - - - aa946c93 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Adapt hyperlinker test runner to have the same interface as HTML one. - - - - - ce34da16 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Fix hyperlinker test runner file paths and add pretty-printing option. - - - - - 0d7dd65e by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add reference files for hyperlinker test cases. - - - - - efa4a1e0 by Łukasz Hanuszczak at 2015-07-01T00:47:32+02:00 Make hyperlinker test runner strip local links from generated source. - - - - - 3e96e584 by Łukasz Hanuszczak at 2015-07-01T01:14:59+02:00 Create simple script for accepting hyperlinker test case references. - - - - - 526fe610 by Łukasz Hanuszczak at 2015-07-01T01:16:41+02:00 Re-accept hyperlinker test cases with local references stripped out. - - - - - 892e2cb3 by Łukasz Hanuszczak at 2015-07-01T01:22:09+02:00 Fix bug with diffing wrong files in hyperlinker test runner. - - - - - 9ff46039 by Łukasz Hanuszczak at 2015-07-01T18:04:46+02:00 Remove unused dependencies in Haddock API spec configuration. - - - - - 47969c07 by Łukasz Hanuszczak at 2015-07-01T18:32:19+02:00 Add support for hyperlinking synonyms in patterns. - - - - - a73449e0 by Łukasz Hanuszczak at 2015-07-01T18:33:44+02:00 Create test case for hyperlinking @-patterns. - - - - - c2077ed8 by Łukasz Hanuszczak at 2015-07-01T19:06:04+02:00 Add support for hyperlinking universally quantified type variables. - - - - - 68017342 by Łukasz Hanuszczak at 2015-07-01T19:28:32+02:00 Create hyperlinker test case with quantified type variables. - - - - - 51c01a78 by Łukasz Hanuszczak at 2015-07-01T19:34:22+02:00 Add scoped type variables test for polymorphism test case. - - - - - 13181ae2 by Łukasz Hanuszczak at 2015-07-01T19:56:27+02:00 Add record wildcards test for records hyperlinking test case. - - - - - 991b81dd by Łukasz Hanuszczak at 2015-07-01T21:01:42+02:00 Document some functions in XHTML utlity module. - - - - - 98c8dfe5 by Łukasz Hanuszczak at 2015-07-01T22:25:21+02:00 Make hyperlinker render qualified names as one entity. - - - - - 75e13b9b by Łukasz Hanuszczak at 2015-07-01T22:27:38+02:00 Add qualified name test for identifiers hyperlinking test case. - - - - - de1e143f by Łukasz Hanuszczak at 2015-07-02T12:32:59+02:00 Fix crash happening when hyperlinking type family declarations. - - - - - 7a8fb175 by Łukasz Hanuszczak at 2015-07-02T12:47:03+02:00 Add support for anchoring data family constructor declarations. - - - - - 3b404e49 by Łukasz Hanuszczak at 2015-07-02T13:31:05+02:00 Improve support for hyperlinking type families. - - - - - 59eb7143 by Łukasz Hanuszczak at 2015-07-02T13:33:34+02:00 Add hyperlinker test case for checking type and type family declarations. - - - - - d1cda0c0 by Łukasz Hanuszczak at 2015-07-02T13:41:38+02:00 Fix issue with operators being recognized as preprocessor directives. - - - - - da206c9d by Łukasz Hanuszczak at 2015-07-02T17:18:12+02:00 Fix broken tests for parsing and hyperlinking hash operators. - - - - - 53750d1b by Łukasz Hanuszczak at 2015-07-02T18:53:28+02:00 Add support for anchoring signatures in type class declarations. - - - - - 1fa5bb10 by Łukasz Hanuszczak at 2015-07-02T19:04:47+02:00 Make hyperlinker generate anchors only to top-level value bindings. - - - - - a542305c by Łukasz Hanuszczak at 2015-07-02T19:05:58+02:00 Create hyperlinker test case for type classes. - - - - - b0dd4581 by Łukasz Hanuszczak at 2015-07-04T16:28:26+02:00 Update docs with information about source hyperlinking. - - - - - 9795302a by Łukasz Hanuszczak at 2015-07-04T16:52:15+02:00 Update docs on using `--read-interface` option. - - - - - 9acdc002 by Łukasz Hanuszczak at 2015-07-04T17:15:26+02:00 Remove potentially dangerous record access in hyperlinker AST module. - - - - - fb3ab7be by Łukasz Hanuszczak at 2015-07-04T17:40:10+02:00 Make Haddock generate warnings about potential misuse of hyperlinker. - - - - - a324c504 by Łukasz Hanuszczak at 2015-07-04T17:43:22+02:00 Fix incorrect specification of source style option in doc file. - - - - - 3f01a8e4 by Łukasz Hanuszczak at 2015-07-05T17:06:36+02:00 Refactor source path mapping to use modules as indices. - - - - - ac70f5b1 by Łukasz Hanuszczak at 2015-07-05T17:47:34+02:00 Fix bug where not all module interfaces were added to source mapping. - - - - - f5e57da9 by Łukasz Hanuszczak at 2015-07-06T16:39:57+02:00 Extract main hyperlinker types to separate module. - - - - - 43974905 by Łukasz Hanuszczak at 2015-07-06T16:52:13+02:00 Move source paths types to hyperlinker types module. - - - - - 3e236055 by Łukasz Hanuszczak at 2015-07-06T17:06:19+02:00 Add support for hyperlinking modules in import lists. - - - - - 58233d9f by Łukasz Hanuszczak at 2015-07-06T17:26:49+02:00 Add short documentation for hyperlinker source map type. - - - - - 14da016d by Łukasz Hanuszczak at 2015-07-06T18:07:20+02:00 Fix bug with module name being hyperlinked to `Prelude`. - - - - - 8f79db52 by Łukasz Hanuszczak at 2015-07-06T18:23:47+02:00 Fix problem with spec build in Haddock API configuration. - - - - - e7cc056c by Adam Sandberg Eriksson at 2015-07-07T23:22:21+01:00 StrictData: print correct strictness marks - - - - - e8253ca8 by Mateusz Kowalczyk at 2015-07-07T23:58:28+01:00 Update changelog - - - - - 0aba676b by Mateusz Kowalczyk at 2015-07-07T23:58:33+01:00 Relax upper bound on GHC a bit - - - - - 7a595381 by Mateusz Kowalczyk at 2015-07-07T23:58:52+01:00 Delete trailing whitespace - - - - - 50976d5e by Adam Sandberg Eriksson at 2015-07-08T15:03:04+02:00 StrictData: changes in HsBang type - - - - - 83b045fa by Mateusz Kowalczyk at 2015-07-11T14:35:18+01:00 Fix expansion icon for user-collapsible sections Closes haskell/haddock#412 - - - - - b2a3b0d1 by Mateusz Kowalczyk at 2015-07-22T22:03:21+01:00 Make some version changes after 2.16.1 release - - - - - a8294423 by Ben Gamari at 2015-07-27T13:16:07+02:00 Merge pull request haskell/haddock#422 from adamse/adamse-D1033 Merge for GHC D1033 - - - - - c0173f17 by randen at 2015-07-30T14:49:08-07:00 Break the response file by line termination rather than spaces, since spaces may be within the parameters. This simple approach avoids having the need for any quoting and/or escaping (although a newline char will not be possible in a parameter and has no escape mechanism to allow it). - - - - - 47c0ca14 by Alan Zimmerman at 2015-07-31T10:41:52+02:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - 45a9d770 by Mateusz Kowalczyk at 2015-07-31T09:47:43+01:00 Update changelog - - - - - 347a20a3 by Phil Ruffwind at 2015-08-02T23:15:26+01:00 Avoid JavaScript error during page load in non-frame mode In non-frame mode, parent.window.synopsis refers to the synopsis div rather than the nonexistent frame. Unfortunately, the script wrongly assumes that if it exists it must be a frame, leading to an error where it tries to access the nonexistent attribute 'replace' of an undefined value (synopsis.location). Closes haskell/haddock#406 - - - - - 54ebd519 by Phil Ruffwind at 2015-08-02T23:27:10+01:00 Link to the definitions to themselves Currently, the definitions already have an anchor tag that allows URLs with fragment identifiers to locate them, but it is rather inconvenient to obtain such a URL (so-called "permalink") as it would require finding the a link to the corresponding item in the Synopsis or elsewhere. This commit adds hyperlinks to the definitions themselves, allowing users to obtain links to them easily. To preserve the original aesthetics of the definitions, we alter the color of the link so as to be identical to what it was, except it now has a hover effect indicating that it is clickable. Additionally, the anchor now uses the 'id' attribute instead of the (obsolete) 'name' attribute. Closes haskell/haddock#407 - - - - - 02cc8bb7 by Phil Ruffwind at 2015-08-02T23:28:02+01:00 Fix typo in Haddock.Backends.Xhtml.Layout: divSynposis -> divSynopsis Closes haskell/haddock#408 - - - - - 2eb0a458 by Phil Ruffwind at 2015-08-02T23:30:07+01:00 Fix record field alignment when name is too long Change <dl> to <ul> and use display:table rather than floats to layout the record fields. This avoids bug haskell/haddock#301 that occurs whenever the field name gets too long. Slight aesthetic change: the entire cell of the field's source code is now shaded gray rather than just the area where text exists. Fixes haskell/haddock#301. Closes haskell/haddock#421 - - - - - 7abb3402 by Łukasz Hanuszczak at 2015-08-02T23:32:14+01:00 Add some utility definitions for generating line anchors. - - - - - e0b1d79b by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Make hyperlinked source renderer generate line anchors. - - - - - 24dd4c9f by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Re-accept test cases after adding line anchors for each of them. - - - - - 0372cfcb by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Override source line flags when source hyperlinker is enabled. - - - - - a81bcd07 by Mateusz Kowalczyk at 2015-08-02T23:58:25+01:00 Update tests to follow HTML changes - - - - - d2d7426f by Łukasz Hanuszczak at 2015-08-06T20:54:59+02:00 Fix quote syntax for promoted types. - - - - - 668cf029 by Łukasz Hanuszczak at 2015-08-06T21:12:00+02:00 Apply promoted type quoting to type-level consing. - - - - - 89f8e7c6 by Łukasz Hanuszczak at 2015-08-06T21:17:10+02:00 Extend advanced types test case with other examples. - - - - - 86494bca by Łukasz Hanuszczak at 2015-08-06T21:22:06+02:00 Rename advanced types test case and accept new output. - - - - - dbb7c7c0 by Adam Sandberg Eriksson at 2015-08-09T23:01:05+02:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 2a7704fa by Ben Gamari at 2015-08-10T13:18:05+02:00 Merge pull request haskell/haddock#433 from adamse/split-hsbang HsBang is split into HsSrcBang and HsImplBang - - - - - 891954bc by Thomas Miedema at 2015-08-15T14:51:18+02:00 Follow changes in GHC build system - - - - - b55d32ab by Mateusz Kowalczyk at 2015-08-21T18:06:09+01:00 Make Travis use 7.10.2 - - - - - 97348b51 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Move SYB utilities to standalone module. - - - - - 748ec081 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement `everywhere` transformation in SYB module. - - - - - 011cc543 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement generic transformation constructor. - - - - - b9510db2 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Create simple utility module for type specialization. - - - - - 43229fa6 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Make type of type specialization function more general. - - - - - fd844e90 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Add basic HTML test case for checking instance specialization. - - - - - 6ea0ad04 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Make HTML class instance printer take optional signature argument. - - - - - 65aa41b6 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Refactor instance head type to record instead of a meaningless tuple. - - - - - 3fc3bede by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add expandable method section for each class instance declaration. - - - - - 99ceb107 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Move dummy post-family instances for `DocName` to `Types` module. - - - - - e98f4708 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create convenience functions for type specialization module. - - - - - b947552f by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Hook type specialization logic with HTML pretty-printer. - - - - - dcaa8030 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create stub functions for sugaring specialized types. - - - - - fa84bc65 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement list syntax sugaring logic for specialized types. - - - - - e8b05b07 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement tuple syntax sugaring logic for specialized types. - - - - - 68a2e5bc by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Get rid of code duplication in type specialization module. - - - - - 4721c336 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create scaffolding of a framework for renaming specialized types. - - - - - 271b488d by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in missing cases in specialized type renaming function. - - - - - bfa5f2a4 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Remove code duplication in specialized type renamer. - - - - - ea6bd0e8 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Change state of the type renaming monad. - - - - - 77c5496e by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement simple mechanism for generating new type names. - - - - - 91bfb48b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in stub behaviour with actual environment renaming. - - - - - d244517b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix logic behind binder type renaming. - - - - - f3c5e360 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add SYB-like utility function for performing stateful queries. - - - - - eb3f9154 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create function for retrieving free variables from given type. - - - - - a94561d3 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix compilation error caused by incorrect type signature. - - - - - 8bb707cf by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Move `SetName` class definition to types module. - - - - - 5800b13b by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Hook type renamer with instance method HTML pretty-printer. - - - - - 6a480164 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some test cases for type renamer. - - - - - 839842f7 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized signatures refer to original signature declaration. - - - - - 4880f7c9 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized methods be nicely formatted again. - - - - - ab5a6a2e by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Attach source locations to the specialized class methods. - - - - - 43f8a559 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Extend instances test case to also test multi-name type signatures. - - - - - 59bc751c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix tab-based indentation in instances test case. - - - - - c2126815 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Improve placement of instance methods expander button. - - - - - 0a32e287 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add new data type declaration to instance specialization test case. - - - - - 5281af1f by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make type renamer first try single-letter names as alternatives. - - - - - 7d509475 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix type renamer bug with incorrect names being generated. - - - - - 0f35bf7c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some documentation and refactor type specialization module. - - - - - da1d0803 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix another bug where type renamer was generating incorrect names. - - - - - cd39b5cb by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Refactor type renamer to rebinding and pure renaming phases. - - - - - 850251f4 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix unwitting compilation bug. - - - - - e5e9fc01 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Integrate instance specification type into class instance definition. - - - - - 825b0ea0 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer neccessary instance specification type. - - - - - cdba44eb by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix declaration converter to use more appropriate mode for methods. - - - - - bc45c309 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug with types not being specialized at all. - - - - - 5d8e5d89 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug where instance expander was opening wrong section. - - - - - 6001ee41 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix another type renamer bug where not all names were rebound. - - - - - 5f58ce2a by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix yet another renamer bug where some names were not unique. - - - - - 8265e521 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split instance subsection layout method to top-level declarations. - - - - - e5e66298 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Rearrange layout of instance methods in generated documentation. - - - - - a50b4eea by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer used layout method. - - - - - 2ff36ec2 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach section title to the instance methods block. - - - - - 7ac15300 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Add basic tests for associated types in instances test case. - - - - - db0ea2f9 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach associated types information to instance header. - - - - - 71cad4d5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details section contain associated types information. - - - - - deee2809 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Improve look of rendered associated families in instance details. - - - - - 839d13a5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Introduce alternative type for family declarations. - - - - - d397f03f by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details record use new type for family declarations. - - - - - 2b23fe97 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split printer of type family header to separate functions. - - - - - c3498cdc by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Implement HTML renderer for pseudo-family declarations. - - - - - c12bbb04 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Apply type specializer to associated type family declarations. - - - - - 2fd69ff2 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Create helper method for specializing type signatures. - - - - - 475826e7 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Refactor specializer module to be independent from XHTML backend. - - - - - f00b431c by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add some documentation for instance head specializer. - - - - - a9fef2dc by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix bug with missing space in documentation for associated types. - - - - - 50e29056 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with incorrect instance details sections being expanded. - - - - - e6dfdd03 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by adding instance details section. - - - - - 75565b2a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make section identifier of instance details more GHC-independent. - - - - - add0c23e by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Re-accept tests after applying deterministic section identifiers. - - - - - 878f2534 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make identifier generation also architecture-independent. - - - - - 48be69f8 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with instance expander hijacking type hyperlink click. - - - - - 47830c1f by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Get rid of dreadful hashing function for generating identifiers. - - - - - 956cd5af by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Move `InstOrigin` type declaration to more appropriate module. - - - - - bf672ed3 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by changes related to instance expander. - - - - - 8f2a949a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add examples with type operators to the instances test case. - - - - - 64600a84 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add basic support for sugaring infix type operators. - - - - - 747d71b8 by Łukasz Hanuszczak at 2015-08-21T18:22:34+01:00 Add support for sugaring built-in function syntax. - - - - - d4696ffb by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Remove default methods from Hoogle class output. - - - - - bf0e09d7 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add fixity declarations in Hoogle backend output. - - - - - 90e91a51 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix bug with incorrect fixities being generated in Hoogle backend. - - - - - 48f11d35 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve class type family declarations output in Hoogle backend. - - - - - 661e8e8f by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add missing default family equations in Hoogle output. - - - - - e2d64103 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve formatting of class details output in Hoogle backend. - - - - - 490fc377 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix weird-looking Hoogle output for familyless classes. - - - - - ea115b64 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create script file for new HTML test runner. - - - - - 609913d3 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Set default behaviour if no arguments given. - - - - - dc115f67 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for providing optional arguments for test runner. - - - - - d93ec867 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve output of test runner error messages. - - - - - 0be9fe12 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for executing Haddock process in test runner. - - - - - 4e4d00d9 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add GHC path to test runner configuration. - - - - - d67a2086 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make GHC path a test runner command-line argument. - - - - - c810079a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Extend test runner configuration with Haddock arguments. - - - - - fee18845 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor test runner and create stub functions. - - - - - ff7c161f by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make test runner actually run Haddock executable. - - - - - 391f73e6 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with test runner not producing any output files. - - - - - 81a74e2d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Setup skeleton of framework for running tests. - - - - - f8a79ec4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with modules not being found in global search mode. - - - - - 7e700b4d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make Haddock standard output redirection be more configurable. - - - - - 53b4c17a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Incorporate old, ugly functions for comparing output files. - - - - - 8277c8aa by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor architecture of test runner output checking functions. - - - - - 587bb414 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement actual diffing mechanism. - - - - - 9ed2b5e4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve code style to match popular guidelines. - - - - - 14bffaf8 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make it possible to choose alternative diff tool. - - - - - 5cdfb005 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create stub methods for processing test output as XML documents. - - - - - 7ef8e12e by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement link-stripping logic as simple SYB transformation. - - - - - 8a1fcd4f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Incorporate link stripping to output diffing mechanism. - - - - - 37dba2bc by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement footer-stripping logic. - - - - - 9cd52120 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Add missing dependencies in Cabal configuration file. - - - - - e0f83c6e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix issue with output being printed in incorrect order. - - - - - 0a94fbb0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to run tests without generating diff. - - - - - 76a58c6f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor HTML test suite boilerplate to external package. - - - - - af41e6b0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utilities for storing directory configuration. - - - - - d8f0698f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move IO-dependent config of HTML test suite to test package. - - - - - 17369fa0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Enable all compiler warnings in Haddock test package configuration. - - - - - 9d03b47a by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move Haddock runner of HTML test suite to Haddock test package. - - - - - 4b3483c5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 03754194 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience wrappers to simplify in test entry points. - - - - - 27476ab7 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adjust module visibility and items they export. - - - - - c40002ba by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Remove no longer useful test option. - - - - - 55ab2541 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Change extension of test files used for diffing. - - - - - 136bf4e4 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor and simplify XHTML helper module of test package. - - - - - 69f7e3df by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix typo in link stripper of HTML test suite runner. - - - - - 0c3c1c6b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience script for running specific HTML tests. - - - - - 489e1b05 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement utility functions for conditional link stripping. - - - - - 0f985dc3 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt `hypsrc-test` module to work with new testing framework. - - - - - 927406f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement output accepting mechanism in test package. - - - - - 8545715e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utility function for recursive obtaining directory contents. - - - - - cb70381f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 019599b5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix path handling in test runner. - - - - - 399b985b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to specify ignored files for test output. - - - - - 41b3d93d by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt HTML test runner to use new ignoring functionality. - - - - - e2091c8b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix bug with not all test output files being checked. - - - - - b22134f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Specify ignored files for hyperlinker source test runner. - - - - - 3301dfa1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Copy test runner script for hyperlinked source case. - - - - - d39a6dfa by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner invoking Haddock in incorrect mode. - - - - - f32c8ff3 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix path handling in test module loader. - - - - - 10f94ee9 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make test runner ignore test packages with no modules. - - - - - 5dc4239c by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create test runner entry points for LaTeX test suite. - - - - - 58d1f7cf by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with unnecessary checking old test output. - - - - - c7ce76e1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Re-implement test acceptance functionality. - - - - - 13bbabe8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix warning about no longer needed definition. - - - - - 958a99b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Adapt Cabal configuration to execute LaTeX suite with new runner. - - - - - 550ff663 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Setup test suite for Hoogle backend. - - - - - 3aa969c4 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make Hoogle backend create output directory if needed. - - - - - eb085b02 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Add appropriate .gitignore entry and configure Hoogle test suite. - - - - - a50bf915 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner failing when run on multiple test packages. - - - - - bf5368b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create simple test cases for Hoogle backend. - - - - - 6121ba4b by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create helper function for conversion between XML and XHTML. - - - - - cb516061 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Refactor existing code to use XHTML printer instead of XML one. - - - - - e2de8c82 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Improve portability of test runner scripts. - - - - - 9563e774 by Łukasz Hanuszczak at 2015-08-22T23:43:16+02:00 Remove redundant import statement. - - - - - 55353df1 by Łukasz Hanuszczak at 2015-08-24T23:09:20+02:00 Fix bug with accepting to non-existing directory. - - - - - 00a334ca by Łukasz Hanuszczak at 2015-08-24T23:09:47+02:00 Accept output for Hoogle and LaTeX backends. - - - - - 29191d8b by Łukasz Hanuszczak at 2015-08-24T23:14:18+02:00 Get rid of obsolete testing utilities. - - - - - bbb25db3 by Łukasz Hanuszczak at 2015-08-24T23:18:50+02:00 Update sandbox setup guide to work with Haddock test package. - - - - - cfd45248 by Łukasz Hanuszczak at 2015-08-24T23:51:30+02:00 Make Travis aware of Haddock test package. - - - - - 74185b7a by Łukasz Hanuszczak at 2015-08-25T17:41:59+02:00 Fix test suite failure when used with Stack. - - - - - 18769697 by Łukasz Hanuszczak at 2015-08-25T18:02:09+02:00 Add sample Stack setup to the hacking guide. - - - - - 22715eeb by Łukasz Hanuszczak at 2015-08-25T18:04:47+02:00 Fix Markdown formatting of README file. - - - - - b49ec386 by Łukasz Hanuszczak at 2015-08-25T18:13:36+02:00 Setup Haddock executable path in Travis configuration. - - - - - 5d29eb03 by Eric Seidel at 2015-08-30T09:55:58-07:00 account for changes to ipClass - - - - - f111740a by Ben Gamari at 2015-09-02T13:20:37+02:00 Merge pull request haskell/haddock#443 from bgamari/ghc-head account for changes to ipClass - - - - - a2654bf6 by Jan Stolarek at 2015-09-03T01:32:57+02:00 Follow changes from haskell/haddock#6018 - - - - - 2678bafe by Richard Eisenberg at 2015-09-21T12:00:47-04:00 React to refactoring CoAxiom branch lists. - - - - - ebc56e24 by Edward Z. Yang at 2015-09-21T11:53:46-07:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4a8c4198 by Tamar Christina at 2015-09-27T13:59:08+02:00 Create Process: removed PhaseFailed - - - - - 7e99b790 by Oleg Grenrus at 2015-09-27T20:52:10+03:00 Generate docs for orphan instances - - - - - 32e932e2 by Oleg Grenrus at 2015-09-28T07:21:11+03:00 Have source links for orphan instances - - - - - c2eb9f4f by Oleg Grenrus at 2015-09-28T07:24:58+03:00 Print orphan instances header only if required - - - - - ff96f978 by Oleg Grenrus at 2015-09-28T07:40:54+03:00 Add orphan instances link to contents box - - - - - d72490a6 by Oleg Grenrus at 2015-09-28T16:37:44+03:00 Fix orphan instance collapsing - - - - - 25d3dfe5 by Ben Gamari at 2015-10-03T12:38:09+02:00 Merge pull request haskell/haddock#448 from Mistuke/fix-silent-death-of-runInteractive Remove PhaseFailed - - - - - 1e45e43b by Edward Z. Yang at 2015-10-11T13:10:10-07:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b1370ac1 by Adam Gundry at 2015-10-16T16:26:42+01:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 60bef421 by Simon Peyton Jones at 2015-10-26T12:52:36+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 4c1898ca by Simon Peyton Jones at 2015-10-27T14:24:56+00:00 Track change to PatSyn.patSynSig - - - - - 25108e85 by Simon Peyton Jones at 2015-10-27T17:34:18+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - 693643ac by Ben Gamari at 2015-10-28T14:33:06+01:00 Account for Typeable changes The treatment of type families changed. - - - - - cd7c2221 by Simon Peyton Jones at 2015-10-30T13:03:51+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - 712032cb by Herbert Valerio Riedel at 2015-10-31T11:01:45+01:00 Relax upper bound on `base` to allow base-4.9 - - - - - 0bfa0475 by Simon Peyton Jones at 2015-10-31T19:08:13+00:00 More adaption to wildcard-refactor - - - - - 0a3c0cb7 by Simon Peyton Jones at 2015-10-31T22:14:43+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - c4fd4ec9 by Alan Zimmerman at 2015-11-01T11:16:34+01:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 42cdd882 by Matthew Pickering at 2015-11-06T20:02:16+00:00 Change for IEThingWith - - - - - f368b7be by Ben Gamari at 2015-11-11T11:35:51+01:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - e32965b8 by Simon Peyton Jones at 2015-11-13T12:18:17+00:00 Merge with origin/head - - - - - ebcf795a by Edward Z. Yang at 2015-11-13T21:56:27-08:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4e23989f by Simon Peyton Jones at 2015-11-18T11:32:54+00:00 Wibbles to Haddock - - - - - 2289cd4a by Simon Peyton Jones at 2015-11-20T23:12:49+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor - - - - - 695975a6 by Alan Zimmerman at 2015-11-21T21:16:12+02:00 Update to match GHC wip/T11019 - - - - - bbba21e7 by Simon Peyton Jones at 2015-11-23T13:54:31+00:00 merge with origin/ghc-head - - - - - 3d664258 by Simon Peyton Jones at 2015-11-23T17:17:18+00:00 Wibble - - - - - e64cf586 by Herbert Valerio Riedel at 2015-12-05T00:29:55+01:00 Canonicalise Monad instances - - - - - a2de15a7 by Alan Zimmerman at 2015-12-05T17:33:52+02:00 Matching changes for haskell/haddock#11028 - - - - - cc29a3e4 by Alan Zimmerman at 2015-12-05T19:45:33+02:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 95dd15d1 by Richard Eisenberg at 2015-12-11T17:33:39-06:00 Update for type=kinds - - - - - cb5fd9ed by Herbert Valerio Riedel at 2015-12-14T15:07:30+00:00 Bump versions for ghc-7.11 - - - - - 4f286d96 by Simon Peyton Jones at 2015-12-14T15:10:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 13ea2733 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 098df8b8 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track changes in HsSyn for quasi-quotes - - - - - 716a64de by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track change in API of TyCon - - - - - 77a66bca by Adam Gundry at 2015-12-14T15:10:58+00:00 Track API changes to support empty closed type familes - - - - - f2808305 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track the new location of setRdrNameSpace - - - - - ba8b08a4 by Alan Zimmerman at 2015-12-14T15:10:59+00:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - a4ded87e by Thomas Winant at 2015-12-14T15:14:05+00:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 25c78107 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: print correct strictness marks - - - - - 6cbc41c4 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: changes in HsBang type - - - - - ad46821a by Alan Zimmerman at 2015-12-14T15:14:06+00:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - abc0ae5b by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 3308d06c by Thomas Miedema at 2015-12-14T15:14:07+00:00 Follow changes in GHC build system - - - - - 6c763deb by Eric Seidel at 2015-12-14T15:14:07+00:00 account for changes to ipClass - - - - - ae5b4eac by Jan Stolarek at 2015-12-14T15:17:00+00:00 Follow changes from haskell/haddock#6018 - - - - - ffbc40e0 by Richard Eisenberg at 2015-12-14T15:17:02+00:00 React to refactoring CoAxiom branch lists. - - - - - d1f531e9 by Edward Z. Yang at 2015-12-14T15:17:02+00:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 79f73754 by Tamar Christina at 2015-12-14T15:17:02+00:00 Create Process: removed PhaseFailed - - - - - 3d37bebb by Edward Z. Yang at 2015-12-14T15:20:46+00:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 5f8a9e44 by Adam Gundry at 2015-12-14T15:20:48+00:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 79dda70f by Simon Peyton Jones at 2015-12-14T15:26:02+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 959930fb by Simon Peyton Jones at 2015-12-14T15:37:50+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - e18a8df5 by Simon Peyton Jones at 2015-12-14T15:37:52+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - aa35ab52 by Simon Peyton Jones at 2015-12-14T15:40:18+00:00 More adaption to wildcard-refactor - - - - - 8ceef94b by Simon Peyton Jones at 2015-12-14T15:46:04+00:00 Track change to PatSyn.patSynSig - - - - - cd81e83d by Ben Gamari at 2015-12-14T15:46:06+00:00 Account for Typeable changes The treatment of type families changed. - - - - - 63c9117c by Herbert Valerio Riedel at 2015-12-14T15:46:34+00:00 Relax upper bound on `base` to allow base-4.9 - - - - - a484c613 by Alan Zimmerman at 2015-12-14T15:47:46+00:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 2c26fa51 by Matthew Pickering at 2015-12-14T15:47:47+00:00 Change for IEThingWith - - - - - 593baa0f by Ben Gamari at 2015-12-14T15:49:21+00:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - b6b5ca78 by Edward Z. Yang at 2015-12-14T15:49:54+00:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b5b0e072 by Alan Zimmerman at 2015-12-14T15:54:20+00:00 Update to match GHC wip/T11019 - - - - - 14ddeb68 by Simon Peyton Jones at 2015-12-14T15:54:22+00:00 Wibble - - - - - 10a90ad8 by Herbert Valerio Riedel at 2015-12-14T15:54:22+00:00 Canonicalise Monad instances - - - - - ed68ac50 by Alan Zimmerman at 2015-12-14T15:55:48+00:00 Matching changes for haskell/haddock#11028 - - - - - 3f7e5a2d by Alan Zimmerman at 2015-12-14T15:55:49+00:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 6543a73f by Richard Eisenberg at 2015-12-14T15:59:55+00:00 Update for type=kinds - - - - - 193a5c48 by Matthew Pickering at 2015-12-14T18:17:00+00:00 Changes to compile with 8.0 - - - - - add669ec by Matthew Pickering at 2015-12-14T18:47:12+00:00 Warnings - - - - - 223f3fb4 by Ben Gamari at 2015-12-15T23:45:05+01:00 Update for D1200 - - - - - d058388f by Ben Gamari at 2015-12-16T05:40:17-05:00 Types: Add Outputable[Bndr] DocName instances - - - - - 62ecd7fb by Ben Gamari at 2015-12-16T09:23:09-05:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ddbc187a by Ben Gamari at 2015-12-16T17:54:55+01:00 Update for D1200 - - - - - cec83b52 by Ben Gamari at 2015-12-16T17:54:55+01:00 Types: Add Outputable[Bndr] DocName instances - - - - - d12ecc98 by Ben Gamari at 2015-12-16T17:54:55+01:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ada1616f by Ben Gamari at 2015-12-16T17:54:58+01:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a4f0383d by Ben Gamari at 2015-12-16T23:32:38+01:00 Fix Hyperlinker GHC.con_names is now GHC.getConNames - - - - - a10e6849 by Ben Gamari at 2015-12-20T00:54:11+01:00 Merge remote-tracking branch 'mrhania/testing-framework-improvements' into ghc-head - - - - - f078b4fd by Ben Gamari at 2015-12-20T00:59:51+01:00 test: Compatibility with Cabal 1.23 - - - - - 88a511a9 by Ben Gamari at 2015-12-20T01:14:35+01:00 Merge remote-tracking branch 'phadej/orphans' into ghc-head - - - - - 4e250f36 by Ben Gamari at 2015-12-20T01:14:52+01:00 Add html-test for orphan instances output - - - - - 87fffbad by Alan Zimmerman at 2015-12-20T09:50:42+02:00 Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc - - - - - 6b7e51c9 by idontgetoutmuch at 2015-12-20T21:01:47+00:00 Merge pull request haskell/haddock#1 from haskell/ghc-head Ghc head - - - - - 229c1fb5 by Dominic Steinitz at 2015-12-21T07:19:16+00:00 Handle inline math with mathjax. - - - - - 57902d66 by Dominic Steinitz at 2015-12-21T08:07:11+00:00 Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs - - - - - 0e69f236 by Herbert Valerio Riedel at 2015-12-21T18:30:43+01:00 Fix-up left-over assumptions of GHC 7.12 into GHC 8.0 - - - - - c67f8444 by Simon Peyton Jones at 2015-12-22T16:26:56+00:00 Follow removal of NamedWildCard from HsType - - - - - da40327a by Ben Gamari at 2015-12-23T14:15:28+01:00 html-test/Operators: Clear up ambiguous types For reasons that aren't entirely clear a class with ambiguous types was accepted by GHC <8.0. I've added a functional dependency to clear up this ambiguity. - - - - - 541b7fa4 by Ben Gamari at 2015-12-23T14:18:51+01:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 0febc947 by Ben Gamari at 2015-12-24T00:30:20+01:00 hoogle-test/AssocTypes: Allow AmbiguousTypes GHC 8.0 complains otherwise - - - - - 25810841 by Ben Gamari at 2015-12-24T00:33:18+01:00 OrphanInstances: Accept test output - - - - - 841987f3 by Ben Gamari at 2015-12-25T11:03:11+01:00 Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head - - - - - 358391f0 by Ben Gamari at 2015-12-26T10:44:50+01:00 Add missing import - - - - - a8896885 by Ben Gamari at 2015-12-26T10:45:27+01:00 travis: Use Travis containers - - - - - 85e82134 by Herbert Valerio Riedel at 2015-12-30T17:25:39+01:00 tweak version bounds for GHC-8.1 - - - - - 672a5f75 by randen at 2016-01-01T23:45:25-08:00 The Haddock part for fully gcc-like response files " driver/Main.hs * Moved the response file handling into ResponseFile.hs, updating import section as appropriate. * driver/ResponseFile.hs * New file. In anticipation that maybe some day this could be provided by another library, and to make it possible to unit test, this functionality is pulled out of the Main.hs module, and expanded to support the style/format of response files which gcc uses. * The specification for the format of response files which gcc generates and consumes, seems to be best derived from the gcc code itself (libiberty/argv.c), so that is what has been done here. * This is intended to fix haskell/haddock#379 * driver-test/Main.hs * New file for testing code in the driver source tree * driver-test/ResponseFileSpec.hs * Tests, adapted/adopted from the same gcc code where the escaping/unescaping is from, in the hspec style of unit tests * haddock.cabal * Add the driver-test test-suite. Introduces a new library dependency (upon hspec) for the haddock driver target in the haddock.cabal file, but practically, this should not be a problem as the haddock-api tests already depend on hspec. - - - - - 498781df by Ben Gamari at 2016-01-06T13:41:04+01:00 Version bumps and changelog - - - - - 8451e46a by Ben Gamari at 2016-01-06T13:47:17+01:00 Merge remote-tracking branch 'randen/bug468' - - - - - fb2d9181 by Ben Gamari at 2016-01-06T08:14:42-05:00 Add ResponseFile to OtherModules - - - - - 2cb2d2e3 by Ben Gamari at 2016-01-06T14:35:00+01:00 Merge branch 'master' into ghc-head - - - - - 913477d4 by Eric Seidel at 2016-01-11T14:57:57-08:00 deal with un-wiring of IP class - - - - - c557a4b3 by Alan Zimmerman at 2016-01-15T11:14:35+02:00 Update to match wip/T11430 in GHC - - - - - 3e135093 by Alan Zimmerman at 2016-01-16T18:21:59+01:00 Update to match wip/T11430 in GHC - - - - - c48ef2f9 by Ben Gamari at 2016-01-18T09:50:06+01:00 Merge remote-tracking branch 'gridaphobe/ghc-head' into ghc-head - - - - - 9138a1b0 by Eric Seidel at 2016-01-18T12:50:15+01:00 deal with un-wiring of IP class (cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f) - - - - - b48c172e by Joachim Breitner at 2016-01-19T00:11:38+01:00 Make sure --mathjax affects all written HTML files This fixes haskell/haddock#475. - - - - - af61fe63 by Ryan Scott at 2016-02-07T23:25:57+01:00 Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes haskell/haddock#473) - - - - - b6458693 by Ben Gamari at 2016-02-07T23:29:27+01:00 Merge pull request haskell/haddock#477 from haskell/issue-475 Make sure --mathjax affects all written HTML files - - - - - adcc0071 by Ben Gamari at 2016-02-07T23:34:52+01:00 Merge branch 'master' into ghc-head - - - - - d0404e61 by Ben Gamari at 2016-02-08T12:46:49+01:00 doc: Switch to Sphinx - - - - - acb153b3 by Ben Gamari at 2016-02-08T12:46:56+01:00 Document --use-unicode flag - - - - - c20bdf1d by Ben Gamari at 2016-02-08T13:41:24+01:00 Fix GHC and haddock-library dependency bounds - - - - - 8d946801 by Ben Gamari at 2016-02-08T14:54:56+01:00 testsuite: Rework handling of output sanitization Previously un-cleaned artifacts were kept as reference output, making it difficult to tell what has changed and causing spurious changes in the version control history. Here we rework this, cleaning the output during acceptance. To accomplish this it was necessary to move to strict I/O to ensure the reference handle was closed before accept attempts to open the reference file. - - - - - c465705d by Ben Gamari at 2016-02-08T15:36:05+01:00 test: Compare on dump For reasons I don't understand the Xml representations differ despite their textual representations being identical. - - - - - 1ec0227a by Ben Gamari at 2016-02-08T15:36:05+01:00 html-test: Accept test output - - - - - eefbd63a by Ben Gamari at 2016-02-08T15:36:08+01:00 hypsrc-test: Accept test output And fix impredicative Polymorphism testcase. - - - - - d1df4372 by Ben Gamari at 2016-02-08T15:40:44+01:00 Merge branch 'fix-up-testsuite' - - - - - 206a3859 by Phil Ruffwind at 2016-02-08T17:51:21+01:00 Move the permalinks to "#" on the right side Since pull request haskell/haddock#407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). - - - - - 6c89fa03 by Phil Ruffwind at 2016-02-08T17:54:44+01:00 Update tests for previous commit - - - - - effaa832 by Ben Gamari at 2016-02-08T17:56:17+01:00 Merge branch 'anchors-redux' - - - - - 9a2bec90 by Ben Gamari at 2016-02-08T17:58:40+01:00 Use -fprint-unicode-syntax when --use-unicode is enabled This allows GHC to render `*` as its Unicode representation, among other things. - - - - - 28ecac5b by Ben Gamari at 2016-02-11T18:53:03+01:00 Merge pull request haskell/haddock#480 from bgamari/sphinx Move documentation to ReStructuredText - - - - - 222e5920 by Ryan Scott at 2016-02-11T15:42:42-05:00 Collapse type/data family instances by default - - - - - a80ac03b by Ryan Scott at 2016-02-11T20:17:09-05:00 Ensure expanded family instances render correctly - - - - - 7f985231 by Ben Gamari at 2016-02-12T10:04:22+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - d4eda086 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Various cleanups - - - - - 79bee48d by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show kind signatures for type family variables Addresses GHC haskell/haddock#11588. - - - - - b2981d98 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show 'where ...' after closed type family Seems like we should ideally show the actual equations as well but that seems like it would be a fair amount of work - - - - - cfc0e621 by Ben Gamari at 2016-02-18T22:48:12+01:00 Merge pull request haskell/haddock#483 from bgamari/T11588 Fix GHC haskell/haddock#11588 This fixes GHC haskell/haddock#11588: * Show where ... after closed type families * Show kind signatures on type family type variables - - - - - 256e8a0d by Ben Gamari at 2016-02-18T23:15:39+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 32402036 by Richard Eisenberg at 2016-02-24T13:21:44-05:00 Follow-on changes to support RuntimeRep - - - - - 2b1c572d by Matthew Pickering at 2016-03-04T21:04:02+00:00 Remove unused functions - - - - - eb906f50 by Richard Eisenberg at 2016-03-13T21:17:20+01:00 Follow-on changes to support RuntimeRep (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c) - - - - - 8c34ef34 by Richard Eisenberg at 2016-03-14T23:47:23-04:00 Changes due to fix for GHC#11648. - - - - - 0e022014 by Richard Eisenberg at 2016-03-15T14:06:45+01:00 Changes due to fix for GHC#11648. (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1) - - - - - ed3f78ab by Rik Steenkamp at 2016-04-02T22:20:36+01:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 - - - - - d3210042 by Rik Steenkamp at 2016-04-04T15:43:32+02:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb) - - - - - 236eec90 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 692ee7e0 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. - - - - - 79619f57 by Ben Gamari at 2016-04-10T23:46:22+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. (cherry picked from commit c6d6a18d85e5e2d9bb5904e6919e8a8d7e31c4c5) - - - - - 3358ccb4 by Ben Gamari at 2016-04-10T23:47:27+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 264949b1 by Ben Gamari at 2016-04-16T17:50:23+02:00 Merge pull request haskell/haddock#482 from RyanGlScott/ghc-head Collapse type/data family instances by default - - - - - 478c483a by Ben Gamari at 2016-04-16T17:51:09+02:00 Merge pull request haskell/haddock#489 from mpickering/unused-functions Remove some unused functions - - - - - c94e55f0 by Ryan Scott at 2016-04-16T17:57:54+02:00 Collapse type/data family instances by default (cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088) - - - - - 31e633d3 by Ryan Scott at 2016-04-16T17:58:06+02:00 Ensure expanded family instances render correctly (cherry picked from commit 1338b5d7c32939de6bbc31af0049477e4f847103) - - - - - 03e4d197 by Matthew Pickering at 2016-04-16T17:58:21+02:00 Remove unused functions (cherry picked from commit b89d1c2456bdb2d4208d94ded56155f7088a37d0) - - - - - ed4116f6 by Ben Gamari at 2016-04-20T10:46:57+02:00 ghc: Install files for needed --hyperlinked-source - - - - - 0be999c4 by Ben Gamari at 2016-04-20T11:37:54+02:00 ghc: Install files for needed --hyperlinked-source (cherry picked from commit 5c82c9fc2d21ddaae4a2470f1c375426968f19c6) - - - - - 4d17544c by Simon Peyton Jones at 2016-04-20T12:42:28+01:00 Track change to HsGroup This relates to a big GHC patch for Trac haskell/haddock#11348 - - - - - 1700a50d by Ben Gamari at 2016-05-01T13:19:27+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. - - - - - 0b7c8125 by Ben Gamari at 2016-05-01T13:21:43+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. (cherry picked from commit 609018dd09c4ffe27f9248b2d8b50f6196cd42b9) - - - - - af115ce0 by Ryan Scott at 2016-05-04T22:15:50-04:00 Render Haddocks for derived instances Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac haskell/haddock#11768. - - - - - 76fa1edc by Ben Gamari at 2016-05-10T18:13:25+02:00 haddock-test: A bit of refactoring for debuggability - - - - - 7d4c4b20 by Ben Gamari at 2016-05-10T18:13:25+02:00 Create: Mark a comment as TODO - - - - - 2a6d0c90 by Ben Gamari at 2016-05-10T18:13:25+02:00 html-test: Update reference output - - - - - bd60913d by Ben Gamari at 2016-05-10T18:13:25+02:00 hypsrc-test: Fix reference file path in cabal file It appears the haddock insists on prefixing --hyperlinked-sourcer output with directory which the source appeared in. - - - - - c1548057 by Ben Gamari at 2016-05-10T18:22:12+02:00 doc: Update extra-source-files in Cabal file - - - - - 41d5bae3 by Ben Gamari at 2016-05-10T18:29:21+02:00 Bump versions - - - - - ca75b779 by Ben Gamari at 2016-05-11T16:03:44+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 4e3cfd62 by Ben Gamari at 2016-05-11T16:06:45+02:00 Merge remote-tracking branch 'RyanGlScott/ghc-head' into ghc-head - - - - - a2379970 by Ben Gamari at 2016-05-11T23:15:11+02:00 doc: Add clean targets - - - - - f275212e by Ben Gamari at 2016-05-11T23:15:14+02:00 doc: Add html as an all-target for ghc Otherwise the html documentation won't be installed for binary-dist. - - - - - 388fc0af by Ben Gamari at 2016-05-12T09:49:12+02:00 Update CHANGES - - - - - bad81ad5 by Ben Gamari at 2016-05-12T09:49:38+02:00 Version bump - - - - - c01688a7 by Ben Gamari at 2016-05-12T10:04:58+02:00 Revert "Version bump" This bump was a bit premature. This reverts commit 7b238d9c5be9b07aa2d10df323b5c7b8d1634dc8. - - - - - 7ed05724 by Ben Gamari at 2016-05-12T10:05:33+02:00 doc: Fix GHC clean rule Apparently GHC's build system doesn't permit wildcards in clean paths. - - - - - 5d9611f4 by Ben Gamari at 2016-05-12T17:43:50+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 653566b2 by Ben Gamari at 2016-05-14T09:57:31+02:00 Version bump to 2.17.2 - - - - - b355c439 by Ben Gamari at 2016-05-14T09:57:51+02:00 doc: Use `$(MAKE)` instead of `make` This is necessary to ensure we use gmake. - - - - - 8a18537d by Ben Gamari at 2016-05-14T10:15:45+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - b3290ef1 by Sebastian Meric de Bellefon at 2016-05-14T11:29:47-04:00 Fix haskell/haddock#303. Hide footer when printing The "Produced by Haddock" footer was overlapping the page's body when printing. This patch hides the footer with a css media rule. - - - - - b4a76f89 by Sebastian Meric de Bellefon at 2016-05-15T02:12:46-04:00 Fix haskell/haddock#280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines - - - - - ba797c9e by Ben Gamari at 2016-05-16T14:53:46+02:00 doc: Vendorize alabaster Sphinx theme Alabaster is now the default sphinx theme and is a significant improvement over the previous default that it's worthproviding it when unavailable (e.g. Sphinx <1.3). - - - - - c9283e44 by Ben Gamari at 2016-05-16T14:55:17+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 1c9ea198 by Sebastian Méric de Bellefon at 2016-05-16T12:30:40-04:00 Merge pull request haskell/haddock#502 from Helkafen/master Fix haskell/haddock#303. Hide footer when printing - - - - - 33631016 by Ben Gamari at 2016-05-16T19:56:11+02:00 Revert "doc: Vendorize alabaster Sphinx theme" This ended up causes far too many issues to be worthwhile. We'll just have to live with inconsistent haddock documentation. This reverts commit cec21957001143794e71bcd9420283df18e7de40. - - - - - 93317d26 by Ben Gamari at 2016-05-16T19:56:11+02:00 cabal: Fix README path - - - - - c8695b22 by Ben Gamari at 2016-05-16T19:58:51+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 0b50eaaa by Ben Gamari at 2016-05-16T21:02:08+02:00 doc: Use whichever theme sphinx deems appropriate - - - - - 857c1c9c by Ben Gamari at 2016-05-16T21:07:08+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 15fc5637 by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Remove redundant imports - - - - - 132ddc6a by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Better debug output For tracking down haskell/haddock#505 - - - - - 2252a149 by Ben Gamari at 2016-05-22T12:43:59+02:00 Don't consider default class ops when looking for decls When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of haskell/haddock#505. - - - - - 4886b2ec by Oleg Grenrus at 2016-05-24T16:19:48+03:00 UnfelpfulSpan line number omitted Kind of resolves https://github.com/haskell/haddock/issues/508 - - - - - a4befd36 by Oleg Grenrus at 2016-05-24T16:53:35+03:00 Change Hyperlinked lexer to know about DataKinds ticks - - - - - f45cb52e by David Feuer at 2016-05-24T18:48:53-04:00 Make parser state a newtype Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day. - - - - - 05013dd7 by Sebastian Meric de Bellefon at 2016-05-24T22:03:55-04:00 remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) Frames are a bit broken, ignored by Hackage, and considered obsolete in general. This patch disables frames generation. The mini_*.html files are still used in the synopsis. - - - - - b8163a88 by Ben Gamari at 2016-05-25T14:44:15+02:00 Merge pull request haskell/haddock#507 from bgamari/T505 Fix haskell/haddock#505 - - - - - ea1b30c6 by Sebastian Meric de Bellefon at 2016-05-25T14:17:00-04:00 Update CHANGES - - - - - eddfc258 by Sebastian Méric de Bellefon at 2016-05-25T15:17:40-04:00 Merge pull request haskell/haddock#514 from Helkafen/frames remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) - - - - - 0e506818 by Alex Biehl at 2016-05-26T12:43:09+02:00 Remove misplaced haddock comment - - - - - a07d28c0 by Ben Gamari at 2016-05-27T11:34:59+02:00 Merge pull request haskell/haddock#515 from alexbiehl/master Remove misplaced haddock comment - - - - - 9001d267 by Ben Gamari at 2016-05-27T11:35:46+02:00 Merge pull request haskell/haddock#513 from treeowl/newtype-since Make parser state a newtype - - - - - 74e1a018 by Sebastian Méric de Bellefon at 2016-05-28T17:28:15-04:00 Merge pull request haskell/haddock#504 from Helkafen/issue-280 Fix haskell/haddock#280. Parsing of module header - - - - - 37557f4f by Alan Zimmerman at 2016-05-29T23:36:50+02:00 Matching changes for haskell/haddock#12105 - - - - - 7d09e5d6 by Sebastian Meric de Bellefon at 2016-06-03T18:07:48-04:00 Version bumps (2.17.3, 1.4.2) - - - - - 85b4bc15 by Sebastian Méric de Bellefon at 2016-06-06T18:35:13-04:00 Merge pull request haskell/haddock#521 from Helkafen/master Version bumps (2.17.3, 1.4.2) - - - - - e95f0dee by Sebastian Meric de Bellefon at 2016-06-06T19:11:35-04:00 publish haddock-test library - - - - - 4de40586 by Sebastian Méric de Bellefon at 2016-06-06T20:26:30-04:00 Merge pull request haskell/haddock#512 from phadej/oleg-fixes Fixes for haskell/haddock#508 and haskell/haddock#510 - - - - - ddfd0789 by Dominic Steinitz at 2016-06-09T09:27:28+01:00 Documentation for LaTeX markup. - - - - - 697a503a by Dominic Steinitz at 2016-06-09T09:33:59+01:00 Fix spelling mistake. - - - - - 246f6fff by Dominic Steinitz at 2016-06-09T09:37:15+01:00 Camel case MathJax. - - - - - 4684bd23 by Dominic Steinitz at 2016-06-09T09:44:53+01:00 Fix math typo and add link. - - - - - f20c037c by Simon Peyton Jones at 2016-06-13T18:26:03+01:00 Follow changes to LHsSigWcType - - - - - 0c58996d by Simon Peyton Jones at 2016-06-15T12:56:01+01:00 Follow GHC re-adding FunTy - - - - - 401b5ca7 by Sebastian Méric de Bellefon at 2016-06-15T12:16:47-04:00 Merge pull request haskell/haddock#525 from idontgetoutmuch/master Documentation for LaTeX markup. - - - - - 92d263b7 by Sebastian Méric de Bellefon at 2016-06-15T12:17:29-04:00 Merge pull request haskell/haddock#522 from Helkafen/master publish haddock-test library - - - - - 0953a2ca by Sebastian Meric de Bellefon at 2016-06-16T00:46:46-04:00 Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 65453e14 by Ben Gamari at 2016-06-16T11:16:32+02:00 ocean: Ensure that synopsis fully covers other content Previously MathJax content was being rendered on top of the synopsis due to ambiguous z-ordering. Here we explicitly give the synopsis block a higher z-index to ensure it is rendered on top. Fixes haskell/haddock#531. - - - - - 68e411a1 by Sebastian Méric de Bellefon at 2016-06-16T23:34:39-04:00 Merge pull request haskell/haddock#534 from bgamari/T531 ocean: Ensure that synopsis fully covers other content - - - - - fad6491b by Sebastian Méric de Bellefon at 2016-06-18T23:57:20-04:00 Merge pull request haskell/haddock#533 from Helkafen/master Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 6108e21b by Sebastian Meric de Bellefon at 2016-06-22T23:08:28-04:00 do not create empty src directory Fix haskell/haddock#536. - - - - - 1ef23823 by Sebastian Méric de Bellefon at 2016-06-24T00:04:48-04:00 Merge pull request haskell/haddock#537 from Helkafen/master do not create empty src directory - - - - - 966baa96 by Omari Norman at 2016-06-29T21:59:34-04:00 Add $ as a special character If this character is not escaped, documentation built with Haddock 2.17.2 will fail. This was not an issue with 2.16 series, which causes builds to fail and there is nothing in the docs or error message giving a clue about why builds that used to succeed now don't. - - - - - 324adb60 by Ben Gamari at 2016-07-01T12:18:51+02:00 GhcUtils: Changes for multi-pattern signatures - - - - - d7571675 by Ömer Sinan Ağacan at 2016-07-21T13:30:47+02:00 Add support for unboxed sums - - - - - 29d0907b by Simon Marlow at 2016-07-22T13:55:48+01:00 Disable NFData instances for GHC types when GHC >= 8.2 - - - - - 702d95f3 by Simon Marlow at 2016-08-02T15:57:30+02:00 Disable NFData instances for GHC types when GHC >= 8.0.2 (cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a) - - - - - f4fa79c3 by Ben Gamari at 2016-08-07T13:51:18+02:00 ghc.mk: Don't attempt to install html/frames.html The frames business has been removed. - - - - - 9cd63daf by Ben Gamari at 2016-08-07T13:51:40+02:00 Haddock.Types: More precise version guard This allows haddock to be built with GHC 8.0.2 pre-releases. - - - - - f3d7e03f by Mateusz Kowalczyk at 2016-08-29T20:47:45+01:00 Merge pull request haskell/haddock#538 from massysett/master Add $ as a special character - - - - - 16dbf7fd by Bartosz Nitka at 2016-09-20T19:44:04+01:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 - - - - - 7c31c1ff by Bartosz Nitka at 2016-09-27T17:32:22-04:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b) - - - - - 33a90dce by Ryan Scott at 2016-09-30T20:53:41-04:00 Haddock changes for T10598 See https://ghc.haskell.org/trac/ghc/ticket/10598 - - - - - 1f32f7cb by Ben Gamari at 2016-10-13T20:01:26-04:00 Update for refactoring of NameCache - - - - - 1678ff2e by Ben Gamari at 2016-11-15T17:42:48-05:00 Bump upper bound on base - - - - - 9262a7c5 by Alan Zimmerman at 2016-12-07T21:14:28+02:00 Match changes in GHC wip/T3384 branch - - - - - ac0eaf1a by Ben Gamari at 2016-12-09T09:48:41-05:00 haddock-api: Don't use stdcall calling convention on 64-bit Windows See GHC haskell/haddock#12890. - - - - - 04afe4f7 by Alan Zimmerman at 2016-12-12T20:07:21+02:00 Matching changes for GHC wip/T12942 - - - - - e1d1701d by Ben Gamari at 2016-12-13T16:50:41-05:00 Bump base upper bound - - - - - 3d3eacd1 by Alan Zimmerman at 2017-01-10T16:59:38+02:00 HsIParamTy now has a Located name - - - - - 7dbceefd by Kyrill Briantsev at 2017-01-12T13:23:50+03:00 Prevent GHC API from doing optimization passes. - - - - - d48d1e33 by Richard Eisenberg at 2017-01-19T08:41:41-05:00 Upstream changes re levity polymorphism - - - - - 40c25ed6 by Alan Zimmerman at 2017-01-26T15:16:18+02:00 Changes to match haskell/haddock#13163 in GHC - - - - - 504f586d by Ben Gamari at 2017-02-02T17:19:37-05:00 Kill remaining static flags - - - - - 49147ea0 by Justus Adam at 2017-03-02T15:33:34+01:00 Adding MDoc to exports of Documentation.Haddock - - - - - 1cfba9b4 by Justus Adam at 2017-03-09T11:41:44+01:00 Also exposing toInstalledIface - - - - - 53f0c0dd by Ben Gamari at 2017-03-09T13:10:08-05:00 Bump for GHC 8.3 - - - - - c7902d2e by Ben Gamari at 2017-03-09T23:46:02-05:00 Bump for GHC 8.2 - - - - - 4f3a74f8 by Ben Gamari at 2017-03-10T10:21:55-05:00 Merge branch 'ghc-head' - - - - - e273b72f by Richard Eisenberg at 2017-03-14T13:34:04-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - 6ec3d436 by Richard Eisenberg at 2017-03-14T15:15:52-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - eee3cda1 by Ben Gamari at 2017-03-15T15:19:59-04:00 Adapt to EnumSet - - - - - 017cf58e by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 736d6773 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 475f84a0 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 13240b53 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - cd16d529 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 3bea97ae by Edward Z. Yang at 2017-03-15T22:50:46-07:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b2b051ce by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 0f082795 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 20ef63c9 by Edward Z. Yang at 2017-03-22T13:48:12-07:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 45692dcb by Edward Z. Yang at 2017-03-22T14:11:25-07:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4eae8caf by Ben Gamari at 2017-03-23T09:25:33-04:00 Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEAD - - - - - 0bbe03f5 by Ben Gamari at 2017-03-23T09:27:28-04:00 haddock-api: Bump bound on GHC - - - - - 65f3ac9d by Alex Biehl at 2017-03-23T17:36:11+01:00 Merge pull request haskell/haddock#581 from JustusAdam/master Adding more exports to Documentation.Haddock - - - - - 37d49a47 by Alex Biehl at 2017-03-23T17:39:14+01:00 Merge pull request haskell/haddock#568 from awson/ghc-head Prevent GHC API from doing optimization passes. - - - - - 1ed047e4 by Brian Huffman at 2017-03-23T17:45:58+01:00 Print any user-supplied kind signatures on type parameters. This applies to type parameters on data, newtype, type, and class declarations, and also to forall-bound type vars in type signatures. - - - - - 1b78ca5c by Brian Huffman at 2017-03-23T17:45:58+01:00 Update test suite to expect kind annotations on type parameters. - - - - - a856b162 by Alex Biehl at 2017-03-23T17:49:32+01:00 Include travis build indication badge - - - - - 8e2e2c56 by Ben Gamari at 2017-03-23T17:20:08-04:00 haddock-api: Bump bound on GHC - - - - - 4d2d9995 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737) - - - - - a650e20f by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858) - - - - - caa282c2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 2067a2d0afa9cef381d26fb7140b67c62f433fc0) - - - - - 49684884 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc) - - - - - 4dcfeb1a by Edward Z. Yang at 2017-03-23T17:20:08-04:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a) - - - - - 74dd19d2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e) - - - - - a9b19a23 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3) - - - - - d3631064 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit bf3c4d72a0fda38561376eac7eda216158783267) - - - - - ef2148fc by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1) - - - - - 2f29518b by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 4eb765ca4205c79539d60b7afa9b7e261a4a49fe) - - - - - 37de047d by Phil Ruffwind at 2017-04-03T11:57:14+02:00 Update MathJax URL MathJax is shutting down their CDN: https://www.mathjax.org/cdn-shutting-down/ They recommend migrating to cdnjs. - - - - - e9d24ba8 by David C. Turner at 2017-04-03T14:58:01+02:00 Add highlight for :target to ocean.css - - - - - 4819a202 by Alex Biehl at 2017-04-11T19:36:48+02:00 Allow base-4.10 for haddock-test - - - - - 44cec69c by Alex Biehl at 2017-04-11T19:39:22+02:00 cabal.project for haddock-api, haddock-library and haddock-test - - - - - 935d0f6a by Alex Biehl at 2017-04-11T19:46:29+02:00 Move dist scripts to scripts/ - - - - - 128e150c by Alex Biehl at 2017-04-11T20:34:46+02:00 Add haddock to cabal.project - - - - - cc8e08ea by Alex Biehl at 2017-04-11T20:35:08+02:00 Read files for hyperlinker eagerly This also exposes Documentation.Haddock.Utf8 - - - - - 152dda78 by Alex Biehl at 2017-04-11T20:37:06+02:00 Explicit import list ofr Control.DeepSeq in Haddock.Interface.Create - - - - - 501b33c4 by Kyrill Briantsev at 2017-04-11T21:01:42+02:00 Prevent GHC API from doing optimization passes. - - - - - c9f3f5ff by Alexander Biehl at 2017-04-12T16:36:53+02:00 Add @alexbiehl as maintaner - - - - - 76f214cc by Alex Biehl at 2017-04-13T07:27:18+02:00 Disable doctest with ghc-8.3 Currently doctest doesn't support ghc-head - - - - - 46b4f5fc by Edward Z. Yang at 2017-04-22T20:38:26-07:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f0555235 by Alex Biehl at 2017-04-25T10:08:48+02:00 Travis: Use ghc-8.2.1 on master - - - - - 966ea348 by Alex Biehl at 2017-04-25T10:32:01+02:00 Travis: Verbose cabal output cf. https://travis-ci.org/haskell/haddock/jobs/225512194#L377 - - - - - 36972bcd by Alex Biehl at 2017-04-25T10:40:43+02:00 Use travis_retry for cabal invocations - - - - - b3a09d2c by Alex Biehl at 2017-04-25T17:02:20+02:00 Use new MathJax URL in html-test 18ed871afb82560d5433b2f53e31b4db9353a74e switched to a new MathJax URL but didn't update the tests. - - - - - ae331e5f by Alexander Biehl at 2017-04-25T17:02:20+02:00 Expand signatures for class declarations - - - - - e573c65a by Alexander Biehl at 2017-04-25T17:02:20+02:00 Hoogle: Correctly print classes with associated data types - - - - - 3fc6be9b by Edward Z. Yang at 2017-04-25T17:02:20+02:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9) - - - - - 6725c060 by Herbert Valerio Riedel at 2017-04-25T17:02:20+02:00 `html-test --accept` deltas to reference samples - - - - - 7d444d61 by Alex Biehl at 2017-04-26T07:13:50+02:00 Remove anything related to obsolete frames mode - - - - - b888972c by Alex Biehl at 2017-04-26T07:49:10+02:00 Cherry-picked remaining commits from haddock-2.17.4-release (#603) * Release haddock/haddock-api 2.17.4 and haddock-library 1.4.3 * Set version bounds for haddock-library NB: This allows GHC 8.2.1's base * Set version bounds for haddock & haddock-api The version bounds support GHC 8.2 * Merge (temporary) v2.17.3 branch into v2.17 This allows us to delete the v2.17.3 branch * Fixup changelog * Pin down haddock-api to a single version as otherwise `haddock`'s package version has no proper meaning * fix source-repo spec for haddock-api - - - - - 4161099b by Alex Biehl at 2017-04-26T11:11:20+02:00 Update changelog to reflect news in HEAD - - - - - eed72cb8 by Alex Biehl at 2017-04-26T11:11:20+02:00 Markdownify changelog - - - - - 5815cea1 by Alex Biehl at 2017-04-26T11:32:33+02:00 Bump to 2.18.0 (#605) - - - - - a551d558 by Alex Biehl at 2017-04-29T22:00:25+02:00 Update attoparsec-0.12.1.1 to attoparsec-0.13.1.0 - - - - - ea164a8d by Sergey Vinokurov at 2017-04-29T22:42:36+02:00 Improve error message - - - - - 2e10122f by Alex Biehl at 2017-04-30T10:07:46+02:00 Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. - - - - - f9b24d99 by Alex Biehl at 2017-05-01T17:40:36+02:00 Lazily decode docMap and argMap (#610) These are only used in case of a doc reexport so most of the time decoding these is wasted work. - - - - - 2372af62 by Alex Biehl at 2017-05-01T21:59:23+02:00 Fix Binary instance for InstalledInterface (#611) (#610) introduced lazy decoding for docs from InstalledInterface but forgot to remove the original calls to get and put_ - - - - - 6c633c13 by Nathan Collins at 2017-05-11T11:47:55+02:00 Improve documenation of Haddock markup (#614) * Improve documentation of Haddock markup. - document that Haddock supports inferring types top-level functions with without type signatures, but also explain why using this feature is discouraged. Looks like this feature has been around since version 2.0.0.0 in 2008! - rework the "Module description" section: - move the general discussion of field formatting to the section intro and add examples illustrating the prose for multiline fields. - mention that newlines are preserved in some multiline fields, but not in others (I also noticed that commas in the `Copyright` field are not preserved; I'll look into this bug later). - add a subsection for the module description fields documentation, and put the field keywords in code formatting (double back ticks) instead of double quotes, to be consistent with the typesetting of keywords in other parts of the documentation. - mention that "Named chunks" are not supported in the long-form "Module description" documentation. - fix formatting of keywords in the "Module attributes" section. Perhaps these errors were left over from an automatic translation to ReST from some other format as part of the transition to using Sphinx for Haddock documentation? Also, add a missing reference here; it just said "See ?"! - update footnote about special treatment for re-exporting partially imported modules not being implemented. In my tests it's not implemented at all -- I tried re-exporting both `import B hiding (f)` and `import B (a, b)` style partial imports, and in both cases got the same result as with full imports `import B`: I only get a module reference. * Rework the `Controlling the documentation structure` section. My main goal was to better explain how to use Haddock without an export list, since that's my most common use case, but I hope I improved the section overall: - remove the incomplete `Omitting the export list` section and fold it into the other sections. In particular, summarize the differences between using and not using an export list -- i.e. control over what and in what order is documented -- in the section lead. - add "realistic" examples that use the structure markup, both with and without an export list. I wanted a realistic example here to capture how it can be useful to explain the relationship between a group of functions in a section, in addition to documenting their individual APIs. - make it clear that you can associate documentation chunks with documentation sections when you aren't using an export list, and that doing it in the most obvious way -- i.e. with `-- |`, as you can in the export list -- doesn't work without an export list. It took me a while to figure this out the first time, since the docs didn't explain it at all before. - add a "no export list" example to the section header section. - add more cross references. * Add examples of gotchas for markup in `@...@`. I'm not sure this will help anyone, since I think most people first learn about `@...@` by reading other people's Haddocks, but I've documented the mistakes which I've made and then gotten confused by. * Use consistent Capitalization of Titles. Some titles were in usual title caps, and others only had the first word capitalized. I chose making them all use title caps because that seems to make the cross references look better. - - - - - d4734f45 by Ben Gamari at 2017-05-12T20:36:08+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 93883f37 by Alex Biehl at 2017-05-12T21:02:33+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 5b8f179c by Alex Biehl at 2017-05-13T12:48:10+02:00 Consequently use inClass and notInClass in haddock-library (#617) These allow attoparsec to do some clever lookup optimization - - - - - 77984b82 by Doug Wilson at 2017-05-27T17:37:38+02:00 Don't enable compilation for template haskell (#624) This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa - - - - - 5a3de2b4 by Doug Wilson at 2017-05-27T19:54:53+02:00 Improve Syb code (#621) Specialize.hs and Ast.hs are modified to have their Syb code not recurse into Name or Id in HsSyn types. Specialize.hs is refactored to have fewer calls to Syb functions. Syb.hs has some foldl calls replaced with foldl' calls. There is still a lot of performance on the floor of Ast.hs. The RenamedSource is traversed many times, and lookupBySpan is very inefficient. everywhereBut and lookupBySpan dominate the runtime whenever --hyperlinked-source is passed. - - - - - 3d35a949 by Alex Biehl at 2017-05-30T19:01:37+02:00 Clear fixme comment (#625) - - - - - 2a44bd0c by Alex Biehl at 2017-05-30T19:02:12+02:00 Make haddock-library and haddock-api warning free (#626) - - - - - bd1a0e42 by Alex Biehl at 2017-06-01T10:40:33+02:00 Include `driver-test/*.hs` sdist (#630) This lead to haskell/haddock#629. - - - - - 184a3ab6 by Doug Wilson at 2017-06-03T12:02:08+02:00 Disable pattern match warnings (#628) This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns - - - - - 0cf68004 by Alex Biehl at 2017-06-03T20:37:28+02:00 Allow user defined signatures for pattern synonyms (#631) - - - - - 7f51a58a by Alex Biehl at 2017-06-04T11:56:38+02:00 Use NameSet for isExported check (#632) - - - - - d8f044a9 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Match new AST as per GHC wip/new-tree-one-param See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow - - - - - da1254e3 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Rename extension index tags - - - - - 538c7514 by Christiaan Baaij at 2017-06-09T08:26:43+02:00 Haddock support for bundled pattern synonyms (#627) * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after haskell/haddock#631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case - - - - - a050bffd by Doug Wilson at 2017-06-21T09:27:33+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636) There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6 - - - - - 5d06b871 by Doug Wilson at 2017-06-22T20:23:29+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639) * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports - - - - - b11bb73a by Alex Biehl at 2017-06-23T14:44:41+02:00 Lookup fixities for reexports without subordinates (#642) So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In haskell/haddock#644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from haskell/haddock#642 top-level functions now started to fail reexporting their fixities. - - - - - d2a6dad6 by Alex Biehl at 2017-06-23T18:30:45+02:00 Don't include names with empty subordinates in maps (#644) These are unecessary anyway and just blow up interface size - - - - - 69c2aac4 by Alex Biehl at 2017-06-29T19:54:49+02:00 Make per-argument docs for class methods work again (#648) * Make per-argument docs for class methods work again * Test case - - - - - c9448d54 by Bartosz Nitka at 2017-07-02T12:12:01+02:00 Fix haddock: internal error: links: UnhelpfulSpan (#561) * Fix haddock: internal error: links: UnhelpfulSpan This fixes haskell/haddock#554 for me. I believe this is another fall out of `wildcard-refactor`, like haskell/haddock#549. * Comment to clarify why we take the methods name location - - - - - d4f29eb7 by Alex Biehl at 2017-07-03T19:43:04+02:00 Document record fields when DuplicateRecordFields is enabled (#649) - - - - - 9d6e3423 by Yuji Yamamoto at 2017-07-03T22:37:58+02:00 Fix test failures on Windows (#564) * Ignore .stack-work * Fix for windows: use nul instead of /dev/null * Fix for windows: canonicalize line separator * Also normalize osx line endings - - - - - 7d81e8b3 by Yuji Yamamoto at 2017-07-04T16:13:12+02:00 Avoid errors on non UTF-8 Windows (#566) * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1) - - - - - eded67d2 by Alex Biehl at 2017-07-07T19:17:15+02:00 Remove redudant import warning (#651) - - - - - 05114757 by Alex Biehl at 2017-07-08T00:33:12+02:00 Avoid missing home module warning (#652) * Avoid missing home module warning * Update haddock-library.cabal - - - - - e9cfc902 by Bryn Edwards at 2017-07-17T07:51:20+02:00 Fix haskell/haddock#249 (#655) - - - - - eb02792b by Herbert Valerio Riedel at 2017-07-20T09:09:15+02:00 Fix compilation of lib:haddock-library w/ GHC < 8 - - - - - 9200bfbc by Alex Biehl at 2017-07-20T09:20:38+02:00 Prepare 2.18.1 release (#657) - - - - - 46ddd22c by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Tweak haddock-api.cabal for pending release - - - - - 85e33d29 by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Avoid trivial use of LambdaCase otherwise we can't test w/ e.g. GHC 7.4.2 - - - - - 3afb4bfe by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Refactor .cabal to use sub-lib for vendored lib A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite. - - - - - e56a552e by Herbert Valerio Riedel at 2017-07-20T10:17:48+02:00 haddock-api: add changelog pointing to haddock's changelog This addresses https://github.com/haskell/haddock/issues/638#issuecomment-309283297 - - - - - 2222ff0d by Herbert Valerio Riedel at 2017-07-20T10:19:56+02:00 Drop obsolete/misleading `stability: experimental` This .cabal property has long been considered obsolete - - - - - 9b882905 by Alex Biehl at 2017-07-20T11:25:54+02:00 Beef up haddock description (#658) * Beef up haddock description * Handle empty lines - - - - - bb60e95c by Herbert Valerio Riedel at 2017-07-20T12:08:53+02:00 Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet - - - - - 0761e456 by Herbert Valerio Riedel at 2017-07-20T12:12:55+02:00 Add cheatsheet to haddock.cabal - - - - - 2ece0f0f by Herbert Valerio Riedel at 2017-07-20T12:18:38+02:00 Mention new-build in README - - - - - 947b7865 by Herbert Valerio Riedel at 2017-07-20T12:32:16+02:00 Update README Also improves markup and removes/fixes redundant/obsolete parts [skip ci] - - - - - 785e09ad by Alex Biehl at 2017-07-27T07:28:57+02:00 Bump haddock to 2.18.2, haddock-library to 1.4.5 - - - - - e3ff1ca3 by Alex Biehl at 2017-07-31T20:15:32+02:00 Move `DocMarkup` from haddock-api to haddock-library (#659) * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG - - - - - cda7c20c by Alex Biehl at 2017-07-31T20:35:49+02:00 Fixup haddock - - - - - 583b6812 by Alex Biehl at 2017-07-31T21:20:45+02:00 Changelog for haddock-library - - - - - bac6a0eb by Alex Biehl at 2017-07-31T21:50:24+02:00 Prepare haddock-library-1.4.5 release - - - - - 58ce6877 by Moritz Drexl at 2017-08-05T16:44:40+02:00 Fix renaming after instance signature specializing (#660) * rework rename * Add regression test for Bug 613 * update tests * update changelog - - - - - b8137ec8 by Tim Baumann at 2017-08-06T11:33:38+02:00 Fix: Generate pattern signatures for constructors exported as patterns (#663) * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes haskell/haddock#653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR haskell/haddock#663 * Fix extractPatternSyn error message - - - - - d037086b by Alex Biehl at 2017-08-06T12:43:25+02:00 Bump haddock-library - - - - - 99d7e792 by Alex Biehl at 2017-08-06T12:44:07+02:00 Bump haddock-library in haddock-api - - - - - 94802a5b by Alex Biehl at 2017-08-06T13:18:02+02:00 Provide --show-interface option to dump interfaces (#645) * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated. - - - - - c662e476 by Ryan Scott at 2017-08-14T21:00:21-04:00 Adapt to haskell/haddock#14060 - - - - - b891eb73 by Alex Biehl at 2017-08-16T08:24:48+02:00 Bifoldable and Bitraversable for DocH and MetaDoc - - - - - 021bb56c by Alex Biehl at 2017-08-16T09:06:40+02:00 Refactoring: Make doc renaming monadic This allows us to later throw warnings if can't find an identifier - - - - - 39fbf022 by Alex Biehl at 2017-08-19T20:35:27+02:00 Hyperlinker: Avoid linear lookup in enrichToken (#669) * Make Span strict in Position * Hyperlinker: Use a proper map to enrich tokens - - - - - e13baedd by Alex Biehl at 2017-08-21T20:05:42+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 27dd6e87 by Alex Biehl at 2017-08-21T22:06:35+02:00 Drop Avails from export list - - - - - 86b247e2 by Alex Biehl at 2017-08-22T08:44:22+02:00 Bump ghc version for haddock-api tests - - - - - d4607ca0 by Alex Biehl at 2017-08-22T08:45:17+02:00 Revert "Drop Avails from export list" This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def. - - - - - c9c54c30 by Alex Biehl at 2017-08-22T09:26:01+02:00 IntefaceFile version - - - - - a85b7c02 by Ben Gamari at 2017-08-22T09:29:52-04:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 34e976f5 by Ben Gamari at 2017-08-22T17:40:06+02:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 577abf06 by Ryan Scott at 2017-08-23T14:47:29-04:00 Update for haskell/haddock#14131 - - - - - da68fc55 by Florian Eggenhofer at 2017-08-27T18:21:56+02:00 Generate an index for package content search (#662) Generate an index for package content search - - - - - 39e62302 by Alex Biehl at 2017-08-27T18:50:16+02:00 Content search for haddock html doc - - - - - 91fd6fb2 by Alex Biehl at 2017-08-28T18:39:58+02:00 Fix tests for content search - - - - - b4a3798a by Alex Biehl at 2017-08-28T18:44:08+02:00 Add search button to #page-menu - - - - - 25a7ca65 by Alex Biehl at 2017-08-28T18:47:43+02:00 Load javascript below the fold - - - - - 8d323c1a by Alex Biehl at 2017-08-28T18:49:22+02:00 Accept tests - - - - - c5dac557 by Alex Biehl at 2017-08-28T19:14:55+02:00 Content search css - - - - - 89a5af57 by Paolo Veronelli at 2017-08-29T07:42:13+02:00 Removed `nowrap` for interface method sigs (#674) with nowrap the interfaces method sigs would expand at libitum - - - - - a505f6f7 by Alex Biehl at 2017-08-29T08:05:33+02:00 Include subordinates in content index - - - - - 4bb698c4 by Alexander Biehl at 2017-08-29T11:40:19+02:00 QuickNav: Make docbase configurable - - - - - c783bf44 by Alexander Biehl at 2017-08-29T11:48:36+02:00 QuickNav: Also use baseUrl for doc-index.json request - - - - - 47017510 by Alex Biehl at 2017-08-29T17:56:47+02:00 Fix test fallout (again) - - - - - 924fc318 by Alex Biehl at 2017-08-30T09:24:56+02:00 Write meta.json when generating html output (#676) - - - - - 717dea52 by Alex Biehl at 2017-09-01T09:20:34+02:00 Use relative URL when no docBaseUrl given - - - - - e5d85f3b by Alex Biehl at 2017-09-01T09:35:19+02:00 Add missing js files to data-files (#677) - - - - - 95b9231a by Alex Biehl at 2017-09-01T11:01:36+02:00 Rename "Search" tab to "Quick Jump" - - - - - da0ead0b by Alex Biehl at 2017-09-01T13:03:49+02:00 Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger - - - - - de7da594 by Ben Gamari at 2017-09-05T06:49:55-04:00 Account for "Remember the AvailInfo for each IE" As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building. - - - - - b05cd3b3 by Ben Gamari at 2017-09-14T07:55:07-04:00 Bump upper bound on base - - - - - 79db899e by Herbert Valerio Riedel at 2017-09-21T23:27:52+02:00 Make compatible with Prelude.<> export in GHC 8.4/base-4.11 - - - - - 3405dd52 by Tim Baumann at 2017-09-23T22:02:01+02:00 Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme - - - - - df0b5742 by Alex Biehl at 2017-09-29T21:15:40+02:00 Bump base for haddock-library and haddock-test - - - - - 62b12ea0 by Merijn Verstraaten at 2017-10-04T16:03:13+02:00 Inhibit output of coverage information for hidden modules. (#687) * Inhibit output of coverage information for hidden modules. * Add changelog entry. - - - - - 8daf8bc1 by Alexander Biehl at 2017-10-05T11:27:05+02:00 Don't use subMap in attachInstances - - - - - ad75114e by Alexander Biehl at 2017-10-05T11:27:58+02:00 Revert "Don't use subMap in attachInstances" This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9. - - - - - 7d4aa02f by Alex Biehl at 2017-10-08T15:32:28+02:00 Precise Haddock: Use Avails for export resolution (#688) * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting - - - - - b9b4faa8 by Alex Biehl at 2017-10-08T19:38:21+02:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 43325295 by Alex Biehl at 2017-10-08T20:18:46+02:00 Fix merge fallout - - - - - c6423cc0 by Alex Biehl at 2017-10-08T20:36:12+02:00 Copy QuickJump files over - - - - - 1db587c3 by Tim Baumann at 2017-10-09T18:33:09+02:00 Use <details> element for collapsibles (#690) * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes haskell/haddock#560. - - - - - 1b54c64b by Tim Baumann at 2017-10-10T09:50:59+02:00 Quick Jump: Show error when loading 'doc-index.json' failed (#691) - - - - - 910f716d by Veronika Romashkina at 2017-10-24T07:36:20+02:00 Fix tiny typo in docs (#693) - - - - - b21de7e5 by Ryan Scott at 2017-10-24T13:07:15+02:00 Overhaul Haddock's rendering of kind signatures (#681) * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC - - - - - 6704405c by Ryan Scott at 2017-10-28T07:10:27+02:00 Fix Haddock rendering of kind-indexed data family instances (#694) - - - - - 470f6b9c by Alex Biehl at 2017-10-30T08:45:51+01:00 Add QuickJump version to meta.json (#696) - - - - - b89eccdf by Alex Biehl at 2017-10-30T10:15:49+01:00 Put Quickjump behind --quickjump flag (#697) - - - - - 3095fb58 by Alex Biehl at 2017-10-30T19:09:06+01:00 Add build command to package.json - - - - - f223fda9 by Alex Biehl at 2017-10-30T19:10:39+01:00 Decrease threshold for fuzzy matching - - - - - 80245dda by Edward Z. Yang at 2017-10-31T20:35:05+01:00 Supported reexported-modules via --reexport flag. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 7e389742 by Alex Biehl at 2017-10-31T20:37:56+01:00 Correct missing title in changelog - - - - - 1a2a1c03 by Alex Biehl at 2017-10-31T20:59:07+01:00 Copy quickjump.css for nicer error messages - - - - - db234bb9 by Alex Biehl at 2017-10-31T21:31:18+01:00 Reexported modules: Report warnings if argument cannot be parsed or ... module cannot be found - - - - - eea8a205 by Carlo Hamalainen at 2017-10-31T21:43:14+01:00 More general type for nameCacheFromGhc. (#539) - - - - - 580eb42a by Alex Biehl at 2017-10-31T21:46:52+01:00 Remote tab - - - - - 0e599498 by Alex Biehl at 2017-10-31T21:48:55+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 7b8539bb by Alex Biehl at 2017-10-31T22:28:34+01:00 fullModuleContents traverses exports in declaration order - - - - - 0c91fbf2 by Alex Biehl at 2017-10-31T22:32:31+01:00 Remove excessive use of list comprehensions - - - - - f7356e02 by Alex Biehl at 2017-11-01T19:11:03+01:00 Make better use of AvailInfo - - - - - f3e512d5 by Alex Biehl at 2017-11-02T12:16:22+01:00 Always return documentation for exported subordinates ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks. - - - - - 7cf58898 by Alan Zimmerman at 2017-11-07T08:28:03+02:00 Match changes for Trees that Grow in GHC - - - - - e5105a41 by Alan Zimmerman at 2017-11-08T17:21:58+02:00 Match Trees That Grow - - - - - 55178266 by Alan Zimmerman at 2017-11-11T22:20:31+02:00 Match Trees that Grow in GHC for HsExpr - - - - - 2082ab02 by Ryan Scott at 2017-11-14T15:27:03+01:00 Actually render infix type operators as infix (#703) * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too - - - - - c52ab7d0 by Alan Zimmerman at 2017-11-14T23:14:26+02:00 Clean up use of PlaceHolder, to match TTG - - - - - 81cc9851 by Moritz Angermann at 2017-11-20T07:52:49+01:00 Declare use of `Paths_haddock` module in other-modules (#705) This was detected by `-Wmissing-home-modules` - - - - - f9d27598 by Moritz Angermann at 2017-11-20T12:47:34+01:00 Drop Paths_haddock from ghc.mk (#707) With haskell/haddock#705 and haskell/haddock#706, the custom addition should not be necessary any more. # Conflicts: # ghc.mk - - - - - f34818dc by Moritz Angermann at 2017-11-20T12:47:59+01:00 Add autogen-modules (#706) > Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail. # Conflicts: # haddock.cabal - - - - - bb43a0aa by Ben Gamari at 2017-11-21T15:50:12-05:00 Revert "Clean up use of PlaceHolder, to match TTG" This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049. - - - - - af9ebb2b by Ben Gamari at 2017-11-21T15:50:14-05:00 Revert "Match Trees that Grow in GHC for HsExpr" This reverts commit 9f054dc365379c66668de6719840918190ae6e44. - - - - - 5d35c3af by Ben Gamari at 2017-11-21T15:50:15-05:00 Revert "Match Trees That Grow" This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c. - - - - - 99a8e43b by Ben Gamari at 2017-11-21T16:36:06-05:00 Revert "Match changes for Trees that Grow in GHC" This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547. - - - - - c4d650c2 by Ben Gamari at 2017-12-04T15:06:07-05:00 Bump GHC version - - - - - 027b2274 by Ben Gamari at 2017-12-04T17:06:31-05:00 Bump GHC bound to 8.4.* - - - - - 58eaf755 by Alex Biehl at 2017-12-06T15:44:24+01:00 Update changelog - - - - - d68f5584 by Simon Peyton Jones at 2017-12-07T14:39:56+00:00 Track changes to follow Trac haskell/haddock#14529 This tracks the refactoring of HsDecl.ConDecl. - - - - - dc519d6b by Alec Theriault at 2018-01-06T08:20:43-08:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - 8285118c by Alec Theriault at 2018-01-13T12:12:37+01:00 Constructor and pattern synonym argument docs (#709) * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors. - - - - - ca4fabb4 by Alec Theriault at 2018-01-15T17:12:18-08:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 4c472fea by Ryan Scott at 2018-01-19T10:44:02+01:00 Fix haskell/haddock#732 (#733) - - - - - bff14dbd by Alex Biehl at 2018-01-19T15:33:30+01:00 extractDecl: Extract associated types correctly (#736) - - - - - a2a94a73 by Alex Biehl at 2018-01-19T15:34:40+01:00 extractDecl: Extract associated types correctly (#736) - - - - - 26df93dc by Alex Biehl at 2018-01-20T10:18:22+01:00 haddock-api: bump ghc to ^>= 8.4 - - - - - f65aeb1d by Alex Biehl at 2018-01-20T19:18:20+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - 0e721b97 by Alex Biehl at 2018-01-20T19:20:19+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - cb6234f6 by Ben Gamari at 2018-01-26T13:40:55-05:00 Merge remote-tracking branch 'harpocrates/fix/missing-orphan-instances' into ghc-head - - - - - 0fc28554 by Alec Theriault at 2018-02-01T14:58:18+01:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - b9123772 by Alec Theriault at 2018-02-01T14:58:18+01:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 0c12e274 by Ryan Scott at 2018-02-01T14:58:18+01:00 Fix haskell/haddock#548 by rendering datatype kinds more carefully (#702) - - - - - 8876d20b by Alec Theriault at 2018-02-01T14:58:18+01:00 Use the GHC lexer for the Hyperlinker backend (#714) * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog - - - - - 95c6a771 by Alec Theriault at 2018-02-01T14:58:18+01:00 Clickable anchors for headings (#716) See haskell/haddock#579. This just adds an <a> tag around the heading, pointing to the heading itself. - - - - - 21463d28 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump: Matches on function names weight more than matches in ... module names. - - - - - 8023af39 by Alex Biehl at 2018-02-01T14:58:18+01:00 Treat escaped \] better in definition lists (#717) This fixes haskell/haddock#546. - - - - - e4866dc1 by Alex Biehl at 2018-02-01T14:58:18+01:00 Remove scanner, takeWhile1_ already takes care of escaping - - - - - 9bcaa49d by Alex Biehl at 2018-02-01T14:58:18+01:00 Take until line feed - - - - - 01d2af93 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. - - - - - 31128417 by Alec Theriault at 2018-02-01T14:58:18+01:00 Patch flaky parser test (#720) * Patch flaky parser test This test was a great idea, but it doesn't port over too well to using the GHC lexer. GHC rewrites its input a bit - nothing surprising, but we need to guard against those cases for the test. * Change instance head * Change use site - - - - - 9704f214 by Herbert Valerio Riedel at 2018-02-01T14:58:18+01:00 Include secondary LICENSE file in source dist - - - - - 51f25074 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Grid Tables (#718) * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example - - - - - 670d6200 by Alex Biehl at 2018-02-01T14:58:18+01:00 Add grid table example to cheatsheet (pdf and svg need to be regenerated thought) - - - - - 4262dec9 by Alec Theriault at 2018-02-01T14:58:18+01:00 Fix infinite loop when specializing instance heads (#723) * Fix infinite loop when specializing instance heads The bug can only be triggered from TH, hence why it went un-noticed for so long. * Add test for haskell/haddock#679 and haskell/haddock#710 - - - - - 67ecd803 by Alec Theriault at 2018-02-01T14:58:18+01:00 Filter RTS arguments from 'ghc-options' arguments (#725) This fixes haskell/haddock#666. - - - - - 7db26992 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump Scrollable overlay - - - - - da9ff634 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Hyperlinker: Adjust parser to new PFailed constructor - - - - - 7b7cf8cb by Alexander Biehl at 2018-02-01T14:58:18+01:00 Specialize: Add missing IdP annotations - - - - - 78cd7231 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Convert: Correct pass type - - - - - a2d0f590 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Warning free compilation - - - - - cd861cf3 by Alexander Biehl at 2018-02-01T14:58:18+01:00 hadock-2.19.0 / haddock-api-2.19.0 / haddock-library-1.5.0 - - - - - c6651b72 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Adjust changelogs - - - - - 1e93da0b by Alexander Biehl at 2018-02-01T14:58:18+01:00 haddock-library: Info about breaking changes - - - - - f9b11db8 by Alec Theriault at 2018-02-02T12:36:02+01:00 Properly color pragma contents in hyperlinker The hyperlinker backend now classifies the content of pragmas as 'TkPragma'. That means that in something like '{-# INLINE foo #-}', 'foo' still gets classified as a pragma token. - - - - - c40b0043 by Alec Theriault at 2018-02-02T12:36:02+01:00 Support the new 'ITcolumn_prag' token - - - - - 4a2a4d39 by Alex Biehl at 2018-02-03T12:11:55+01:00 QuickJump: Mitigate encoding problems on Windows - - - - - bb34503a by Alex Biehl at 2018-02-04T18:39:31+01:00 Use withBinaryFile - - - - - 637605bf by Herbert Valerio Riedel at 2018-02-05T09:48:32+01:00 Try GHC 8.4.1 for Travis CI job - - - - - 7abb67e4 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 try harder to build w/ GHC 8.4.1 - - - - - 8255cc98 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 Add `SPDX-License-Identifier` as alised for "license" module header tokens C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from haskell/haddock#743 - - - - - 267cd23d by Herbert Valerio Riedel at 2018-02-05T10:24:34+01:00 Make test-suite SMP compatible - - - - - 95d4bf40 by Alec Theriault at 2018-02-05T22:01:04+01:00 Hyperlink pattern synonyms and 'module' imports (#744) Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes haskell/haddock#731. - - - - - 67838dcd by Alec Theriault at 2018-02-06T08:23:36+01:00 Don't warn about missing '~' (#746) This manually filters out '~' from the list of things to warn about. It truly makes no sense to warn on this since '~' has nothing it could link to - it is magical. This fixes haskell/haddock#532. - - - - - ab6c3f9f by Alec Theriault at 2018-02-06T08:24:47+01:00 Don't barf on 'HsSpliceTy' (#745) This handles 'HsSpliceTy's by replacing them with what they expand to. IIUC everything that is happening, 'renameHsSpliceTy' should not be able to fail for the inputs we feed it from GHC. This fixes haskell/haddock#574. - - - - - 92bf95ad by Alex Biehl at 2018-02-06T08:28:23+01:00 Rename: renameHsSpliceTy ttg - - - - - 3130b1e1 by Alex Biehl at 2018-02-06T09:02:14+01:00 Expand SigDs - - - - - c72adae5 by Alex Biehl at 2018-02-06T09:20:51+01:00 fullModuleContents: support named docs - - - - - de2e4dbf by Alex Biehl at 2018-02-06T13:56:17+01:00 Hyperlinker: Also link pattern synonym arguments - - - - - b7c98237 by Alex Biehl at 2018-02-09T18:44:23+01:00 Expand SigD in a better place In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place. - - - - - 8f598b27 by Alec Theriault at 2018-02-11T12:29:56+01:00 Add module tooltips to linked identifiers (#753) No more clicking to figure out whether your bytestring is strict or lazy! - - - - - d812e65d by Alec Theriault at 2018-02-11T12:31:44+01:00 Add 'show' option to complement 'hide' (#752) * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes haskell/haddock#751 and haskell/haddock#266. * Add a '--show-all' option - - - - - 6676cecb by Alex Biehl at 2018-02-18T11:07:15-05:00 QuickJump: Mitigate encoding problems on Windows (cherry picked from commit 86292c54bfee2343aee84559ec01f1fc68f52231) - - - - - e753dd88 by Alex Biehl at 2018-02-18T17:59:54+01:00 Use withBinaryFile - - - - - 724dc881 by Tamar Christina at 2018-02-19T05:34:49+01:00 Haddock: support splitted include paths. (#689) - - - - - 9b6d6f50 by Alex Biehl at 2018-02-19T05:57:02+01:00 Teach the HTML backend how to render methods with multiple names - - - - - a74aa754 by Alexander Biehl at 2018-02-19T10:04:34+01:00 Hoogle/Latex: Remove use of partial function - - - - - 66d8bb0e by Alec Theriault at 2018-02-25T16:04:01+01:00 Fix file handle leak (#763) (#764) Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137. - - - - - bb92d03d by Alex Biehl at 2018-03-02T14:21:23+01:00 Enable running test suite with stock haddock and ghc using ``` $ cabal new-run -- html-test --haddock-path=$(which haddock) --ghc-path=$(which ghc) ``` - - - - - dddb3cb2 by Alex Biehl at 2018-03-02T15:43:21+01:00 Make testsuite work with haddock-1.19.0 release (#766) - - - - - f38636ed by Alec Theriault at 2018-03-02T15:48:36+01:00 Support unicode operators, proper modules Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes haskell/haddock#458. - - - - - 09d89f7c by Alec Theriault at 2018-03-02T15:48:43+01:00 Remove bang pattern - - - - - d150a687 by Alex Biehl at 2018-03-02T15:48:48+01:00 fix test - - - - - d6fd71a5 by Alex Biehl at 2018-03-02T16:22:38+01:00 haddock-test: Be more explicit which packages to pass We now pass `-hide-all-packages` to haddock when invoking the testsuite. This ensures we don't accidentally pick up any dependencies up through ghc.env files. - - - - - 0932c78c by Alex Biehl at 2018-03-02T17:50:38+01:00 Revert "fix test" This reverts commit 1ac2f9569242f6cb074ba6e577285a4c33ae1197. - - - - - 52516029 by Alex Biehl at 2018-03-02T18:16:50+01:00 Fix Bug548 for real - - - - - 89df9eb5 by Alex Biehl at 2018-03-05T18:28:19+01:00 Hyperlinker: Links for TyOps, class methods and associated types - - - - - d019a4cb by Ryan Scott at 2018-03-06T13:43:56-05:00 Updates for haskell/haddock#13324 - - - - - 6d5a42ce by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump haddock-2.19.0.1, haddock-api-2.19.0.1, haddock-library-1.5.0.1 - - - - - c0e6f380 by Alex Biehl at 2018-03-10T18:25:57+01:00 Update changelogs for haddock-2.19.0.1 and haddock-library-1.5.0.1 - - - - - 500da489 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Update to QC 2.11 - - - - - ce8362e9 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Restore backward-compat with base-4.5 through base-4.8 - - - - - baae4435 by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump lower bound for haddock-library - - - - - 10b7a73e by Alex Biehl at 2018-03-10T18:25:57+01:00 Haddock: Straighten out base bound - - - - - a6096f7b by Alex Biehl at 2018-03-13T08:45:06+01:00 extractDecl: Extract constructor patterns from data family instances (#776) * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors - - - - - ba4a0744 by Simon Jakobi at 2018-03-14T08:26:42+01:00 Readme: Update GHC version (#778) - - - - - 8de157d4 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for definition lists - - - - - 425b46f9 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for links - - - - - d53945d8 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for inline links - - - - - f1dc7c99 by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Slightly unmangle output - - - - - 0879d31c by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Prevent stdout buffering - - - - - 1f9e5f1b by Simon Jakobi at 2018-03-14T20:39:29+01:00 haddock-library.cabal: Clean up GHC options - - - - - 066b891a by Simon Jakobi at 2018-03-14T20:39:29+01:00 Make a proper definition for the <link> parser - - - - - 573d6ba7 by Alec Theriault at 2018-03-21T09:16:57+01:00 Show where instances are defined (#748) * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests - - - - - 99b5d28b by Alex Biehl at 2018-03-21T09:20:36+01:00 Prepare changelog for next release - - - - - 482d3a93 by Alex Biehl at 2018-03-23T15:57:36+01:00 Useful cost centres, timers and allocation counters (#785) * Add some useful cost-centres for profiling * Add withTiming for each haddock phase Invoking haddock with `--optghc=-ddump-timings` now shows the amount of time spent and the number of allocated bytes for each phase. - - - - - 773b41bb by Alec Theriault at 2018-03-27T08:35:59+02:00 @since includes package name (#749) * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too. - - - - - e42c57bc by Alex Biehl at 2018-03-27T08:42:50+02:00 haddock-2.19.1, haddock-api-2.19.1, haddock-library-1.6.0 - - - - - 8373a529 by Alex Biehl at 2018-03-28T10:17:11+02:00 Bump haddock and haddock-api to 2.20.0 - - - - - 5038eddd by Jack Henahan at 2018-04-03T13:28:12+02:00 Clear search string on hide for haskell/haddock#781 (#789) - - - - - 920ca1eb by Alex Biehl at 2018-04-03T16:35:50+02:00 Travis: Build with ghc-8.4.2 (#793) - - - - - a232f0eb by Alan Zimmerman at 2018-04-07T14:14:32+02:00 Match changes in GHC for D4199 Removing HasSourceText and SourceTextX classes. - - - - - ab85060b by Alan Zimmerman at 2018-04-09T21:20:24+02:00 Match GHC changes for TTG - - - - - 739302b6 by Alan Zimmerman at 2018-04-13T13:31:44+02:00 Match GHC for TTG implemented on HsBinds, D4581 - - - - - 2f56d3cb by Ryan Scott at 2018-04-19T11:42:58-04:00 Bump upper bound on base to < 4.13 See https://ghc.haskell.org/trac/ghc/ticket/15018. - - - - - a49df92a by Alex Biehl at 2018-04-20T07:31:44+02:00 Don't treat fixity signatures like declarations - - - - - d02c103b by Ryan Scott at 2018-04-24T11:20:11-04:00 Add regression test for haskell/haddock#413 Fixes haskell/haddock#413. - - - - - c7577f52 by Ryan Scott at 2018-04-24T13:51:06-07:00 Improve the Hoogle backend's treatment of type families (#808) Fixes parts 1 and 2 of haskell/haddock#806. - - - - - d88f85b1 by Alec Theriault at 2018-04-25T11:24:07-07:00 Replace 'attoparsec' with 'parsec' (#799) * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments - - - - - fc25e2fe by Alan Zimmerman at 2018-04-27T15:36:53+02:00 Match changes in GHC for TTG - - - - - 06175f91 by Herbert Valerio Riedel at 2018-05-01T18:11:09+02:00 Merge branch 'ghc-head' with 'ghc-8.4' - - - - - 879caaa8 by Alec Theriault at 2018-05-07T18:53:15-07:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 3e0120cb by Simon Jakobi at 2018-05-07T19:00:18-07:00 Add docs for some DocH constructors (#814) - - - - - 0a32c6db by Alec Theriault at 2018-05-08T02:15:45-07:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 8816e783 by Simon Jakobi at 2018-05-08T10:48:11-07:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - ad60366f by Ryan Scott at 2018-05-10T11:19:47-04:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - 03b7cc3b by Ryan Scott at 2018-05-10T11:24:38-04:00 Wibbles - - - - - b03dd563 by Chaitanya Koparkar at 2018-05-10T11:44:58-04:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 9f298a40 by Ben Gamari at 2018-05-13T17:36:04-04:00 Account for refactoring of LitString - - - - - ea3dabe7 by Ryan Scott at 2018-05-16T09:21:43-04:00 Merge pull request haskell/haddock#826 from haskell/T825 Remove Hoogle backend hack that butchers infix datatype names - - - - - 0d234f7c by Alec Theriault at 2018-05-23T11:29:05+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 15fc9712 by Simon Jakobi at 2018-05-31T04:17:47+02:00 Adjust to new HsDocString internals - - - - - 6f1e19a8 by Ben Gamari at 2018-06-02T16:18:58-04:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 0d0355d9 by Ryan Scott at 2018-06-04T21:26:59-04:00 DerivingVia changes - - - - - 0d93475a by Simon Jakobi at 2018-06-05T19:47:05+02:00 Bump a few dependency bounds (#845) - - - - - 5cbef804 by Alec Theriault at 2018-06-05T19:47:16+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 9094c56f by Alec Theriault at 2018-06-05T22:53:25+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 70188719 by Simon Jakobi at 2018-06-08T22:20:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - 495cd1fc by Chaitanya Koparkar at 2018-06-13T23:01:34+02:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 81088732 by Ben Gamari at 2018-06-13T23:01:34+02:00 Account for refactoring of LitString - - - - - 7baf6587 by Simon Jakobi at 2018-06-13T23:05:08+02:00 Adjust to new HsDocString internals - - - - - bb61464d by Ben Gamari at 2018-06-13T23:05:22+02:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 5d8cb87f by Ryan Scott at 2018-06-13T23:39:30+02:00 DerivingVia changes - - - - - 73d373a3 by Alec Theriault at 2018-06-13T23:39:30+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 4865e254 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Remove `ITtildehsh` token - - - - - b867db54 by Alec Theriault at 2018-06-13T23:39:30+02:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 9598e392 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Add docs for some DocH constructors (#814) - - - - - 8a59035b by Alec Theriault at 2018-06-13T23:39:30+02:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 29350fc8 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - 2590bbd9 by Ryan Scott at 2018-06-13T23:39:30+02:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - a9939fdc by Ryan Scott at 2018-06-13T23:39:30+02:00 Wibbles - - - - - a22f7df4 by Alec Theriault at 2018-06-13T23:39:30+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 8741015d by Simon Jakobi at 2018-06-13T23:39:30+02:00 Bump a few dependency bounds (#845) - - - - - 4791e1cc by Alec Theriault at 2018-06-13T23:39:30+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 311d3216 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - d0577817 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Complete FixitySig and FamilyDecl pattern matches - - - - - 055b3aa7 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Fix redundant import warnings - - - - - f9ce19b1 by Simon Jakobi at 2018-06-13T23:49:52+02:00 html-test: Accept output - - - - - 04604ea7 by Simon Jakobi at 2018-06-13T23:54:37+02:00 Bump bounds on Cabal - - - - - 0713b692 by Simon Jakobi at 2018-06-14T00:00:12+02:00 Merge branch 'ghc-head' into ghc-head-update-3 - - - - - c6a56bfd by Simon Jakobi at 2018-06-14T02:33:27+02:00 Bump ghc bound for haddock-api spec test-suite - - - - - 119d04b2 by Simon Jakobi at 2018-06-14T12:37:48+02:00 Travis: `--allow-newer` for all packages - - - - - 0e876e2c by Alex Biehl at 2018-06-14T15:28:52+02:00 Merge pull request haskell/haddock#857 from sjakobi/ghc-head-update-3 Update ghc-head - - - - - 5be46454 by Alec Theriault at 2018-06-14T21:42:45+02:00 Improved handling of interfaces in 'haddock-test' (#851) This should now work with an inplace GHC where (for instance) HTML directories may not be properly recorded in the package DB. - - - - - 96ab1387 by Vladislav Zavialov at 2018-06-14T17:06:21-04:00 Handle -XStarIsType - - - - - e518f8c4 by Ben Gamari at 2018-06-14T17:48:00-04:00 Revert unintentional reversion of fix of haskell/haddock#548 - - - - - 01b9f96d by Alan Zimmerman at 2018-06-19T11:52:22+02:00 Match changes in GHC for haskell/haddock#14259 - - - - - 7f8c8298 by Ben Gamari at 2018-06-19T18:14:27-04:00 Bump GHC version to 8.6 - - - - - 11c6b5d2 by Ryan Scott at 2018-06-19T23:17:31-04:00 Remove HsEqTy and XEqTy - - - - - b33347c2 by Herbert Valerio Riedel at 2018-06-20T23:14:52+02:00 Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. - - - - - f0d2460e by Herbert Valerio Riedel at 2018-06-20T23:28:46+02:00 Update Travis CI job - - - - - ef239223 by Herbert Valerio Riedel at 2018-06-20T23:32:41+02:00 Drop GHC HEAD from CI and update GHC to 8.4.3 It's a waste of resource to even try to build this branch w/ ghc-head; so let's not do that... - - - - - 41c4a9fa by Ben Gamari at 2018-06-20T18:26:20-04:00 Bump GHC version to 8.7 - - - - - 8be593dc by Herbert Valerio Riedel at 2018-06-21T22:32:15+02:00 Update CI job to use GHC 8.7.* - - - - - b91d334a by Simon Jakobi at 2018-06-30T13:41:38+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section - - - - - f707d848 by Alec Theriault at 2018-07-05T10:43:35-04:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. - - - - - a6d2b8dc by Alec Theriault at 2018-07-06T10:06:32-04:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case - - - - - 13819f71 by Alan Zimmerman at 2018-07-15T19:33:51+02:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 - - - - - c346aa78 by Simon Jakobi at 2018-07-19T12:29:32+02:00 haddock-library: Bump bounds for containers - - - - - 722e733c by Simon Jakobi at 2018-07-19T13:36:45+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] - - - - - f0bd83fd by Alec Theriault at 2018-07-19T14:39:57+02:00 Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. - - - - - 394053a8 by Simon Jakobi at 2018-07-19T14:58:07+02:00 haddock-library: Bump bounds for containers - - - - - 1bda11a2 by Alec Theriault at 2018-07-20T09:04:03+02:00 Add HEAD.hackage overlay (#887) * Add HEAD.hackage overlay * Add HCPKG variable - - - - - c7b4ab45 by Alec Theriault at 2018-07-20T12:01:16+02:00 Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test - - - - - c05d32ad by Alec Theriault at 2018-07-20T12:01:49+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output - - - - - 24b39ee4 by Alec Theriault at 2018-07-20T12:02:16+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. - - - - - cb9d2099 by Simon Jakobi at 2018-07-20T13:39:29+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) - - - - - 133f24f5 by Alec Theriault at 2018-07-20T13:39:29+02:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) - - - - - 11024149 by Alec Theriault at 2018-07-20T13:39:29+02:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) - - - - - de0c139e by Simon Jakobi at 2018-07-20T13:39:29+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) - - - - - 6435e952 by Alec Theriault at 2018-07-20T13:39:29+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) - - - - - 1461af39 by Alec Theriault at 2018-07-20T13:39:29+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) - - - - - 69d3bde1 by Alec Theriault at 2018-07-20T13:49:47+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) - - - - - 6a5c73c7 by Alec Theriault at 2018-07-20T13:50:00+02:00 Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests - - - - - 92ca94c6 by Alec Theriault at 2018-07-20T13:55:36+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) - - - - - 981bc7fa by Simon Jakobi at 2018-07-20T15:06:06+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers - - - - - 27e7c0c5 by Simon Jakobi at 2018-07-20T15:09:05+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 49e1a415 by Simon Jakobi at 2018-07-20T16:02:02+02:00 Update the ghc-8.6 branch (#889) * Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. * README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) * Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) * Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) * tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) * Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. * Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test * Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) * Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) * Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) * Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests * Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 5ca14bed by Simon Jakobi at 2018-07-20T16:05:47+02:00 Revert "Revert "Bump GHC version to 8.6"" That commit didn't belong onto the ghc-8.6 branch. This reverts commit acbaef3b9daf1d2dea10017964bf886e77a8e967. - - - - - 2dd600dd by Simon Jakobi at 2018-07-20T16:18:21+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. - - - - - fceb2422 by Simon Jakobi at 2018-07-20T16:18:21+02:00 outOfScope: Recommend qualifying the identifier - - - - - acea5d23 by Simon Jakobi at 2018-07-20T16:19:35+02:00 outOfScope: Recommend qualifying the identifier (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7) - - - - - 1a83ca55 by Simon Jakobi at 2018-07-20T16:19:35+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f) - - - - - 48374451 by Masahiro Sakai at 2018-07-20T17:06:42+02:00 Add # as a special character (#884) '#' has special meaning used for anchors and can be escaped using backslash. Therefore it would be nice to be listed as special characters. - - - - - 5e1a5275 by Alec Theriault at 2018-07-20T23:37:24+02:00 Let `haddock-test` bypass interface version check (#890) This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to. - - - - - 27286754 by Yuji Yamamoto at 2018-07-23T08:16:01+02:00 Avoid "invalid argument (invalid character)" on non-unicode Windows (#892) Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566 - - - - - 6729d361 by Alec Theriault at 2018-07-23T13:52:56-07:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). - - - - - 8cf4e6b5 by Ryan Scott at 2018-07-27T11:28:03-04:00 eqTyCon_RDR now lives in TysWiredIn After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071 - - - - - 1ad251a6 by Alan Zimmerman at 2018-07-30T13:28:09-04:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 (cherry picked from commit e3926b50ab8a7269fd6904b06e881745f08bc5d6) - - - - - 8aea2492 by Richard Eisenberg at 2018-08-02T10:54:17-04:00 Update against new HsImplicitBndrs - - - - - e42cada9 by Alec Theriault at 2018-08-04T17:51:30+02:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 0e852512 by Alex Biehl at 2018-08-06T13:04:02+02:00 Make --package-version optional for --hoogle generation (#899) * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion - - - - - d2abd684 by Noel Bourke at 2018-08-21T09:34:18+02:00 Remove unnecessary backslashes from docs (#908) On https://haskell-haddock.readthedocs.io/en/latest/markup.html#special-characters the backslash and backtick special characters showed up with an extra backslash before them – I think the escaping is not (or no longer) needed for those characters in rst. - - - - - 7a578a9e by Matthew Pickering at 2018-08-21T09:34:50+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - aa3d4db3 by Matthew Pickering at 2018-08-21T09:37:34+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - ede91744 by Alec Theriault at 2018-08-21T09:42:52+02:00 Better test output when Haddock crashes on a test (#902) In particular: we report the tests that crashed seperately from the tests that produced incorrect output. In order for tests to pass (and exit 0), they must not crash and must produce the right output. - - - - - 4a872b84 by Guillaume Bouchard at 2018-08-21T09:45:57+02:00 Fix a typo (#878) - - - - - 4dbf7595 by Ben Sklaroff at 2018-08-21T12:04:09-04:00 Add ITcomment_line_prag token to Hyperlinker Parser This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935 - - - - - 9170b2a9 by Ben Gamari at 2018-08-21T17:55:15-04:00 Merge pull request haskell/haddock#893 from harpocrates/get-name-to-instances Accumulate explicitly which modules to load for 'attachInstances' - - - - - d57b57cc by Ben Gamari at 2018-08-21T17:59:13-04:00 Merge branch 'ghc-head' of github.com:haskell/haddock into ghc-head - - - - - 14601ca2 by Alec Theriault at 2018-08-21T19:09:37-04:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1) - - - - - 438c645e by Matthew Pickering at 2018-08-21T19:12:39-04:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d) - - - - - a80c5161 by Alec Theriault at 2018-08-21T22:06:40-07:00 Better rendering of unboxed sums/tuples * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType' - - - - - 88456cc1 by Alec Theriault at 2018-08-21T22:06:40-07:00 Handle promoted tuples in 'synifyType' When we have a fully applied promoted tuple, we can expand it out properly. - - - - - fd1c1094 by Alec Theriault at 2018-08-21T22:19:34-07:00 Accept test cases - - - - - 6e80d9e0 by Alec Theriault at 2018-08-21T22:24:03-07:00 Merge pull request haskell/haddock#914 from harpocrates/feature/unboxed-stuff Better rendering of unboxed sums, unboxed tuples, promoted tuples. - - - - - 181a23f1 by Ben Gamari at 2018-08-23T15:53:48-04:00 Merge remote-tracking branch 'origin/ghc-8.6' into ghc-8.6 - - - - - 3a18c1d8 by Alec Theriault at 2018-08-27T14:15:25-07:00 Properly synify promoted list types We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type])))) - - - - - b4794946 by Alec Theriault at 2018-09-03T07:19:55-07:00 Only look at visible types when synifying a 'HsListTy' The other types are still looked at when considering whether to make a kind signature or not. - - - - - a231fce2 by Alec Theriault at 2018-09-03T07:38:10-07:00 Merge pull request haskell/haddock#922 from harpocrates/promoted-lists Properly synify promoted list types - - - - - 0fdf044e by Ningning Xie at 2018-09-15T10:25:58-04:00 Update according to GHC Core changes - - - - - 7379b115 by Ningning Xie at 2018-09-15T15:40:18-04:00 update dataFullSig to work with Co Quantification This should have been in the previous patch, but wasn't. - - - - - cf84a046 by Alec Theriault at 2018-09-17T20:12:18-07:00 Fix/add to various docs * Add documentation for a bunch of previously undocumented options (fixes haskell/haddock#870) * Extend the documentation of `--hoogle` considerably (see haskell/haddock#807) * Describe how to add docs to `deriving` clauses (fixes haskell/haddock#912) * Fix inaccurate docs about hyperlinking infix identifiers (fixes haskell/haddock#780) - - - - - ae017935 by Alec Theriault at 2018-09-22T08:32:16-07:00 Update Travis - - - - - d95ae753 by Alec Theriault at 2018-09-22T09:34:10-07:00 Accept failing tests Also silence orphan warnings. - - - - - f3e67024 by Alec Theriault at 2018-09-22T09:41:23-07:00 Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README - - - - - 3f136d4a by Alec Theriault at 2018-09-22T10:53:31-07:00 Turn haddock-library into a minor release Fix some version bounds in haddock-library too. - - - - - b9def006 by Alec Theriault at 2018-09-22T13:07:35-07:00 keep cabal.project file - - - - - 4909aca7 by Alec Theriault at 2018-10-16T09:36:30-07:00 Build on 7.4 and 7.8 - - - - - 99d20a28 by Herbert Valerio Riedel at 2018-10-16T18:45:52+02:00 Minor tweak to package description - - - - - a8059618 by Herbert Valerio Riedel at 2018-10-16T18:47:24+02:00 Merge pull request haskell/haddock#945 haddock-api 2.21.0 and haddock-library 1.6.1 release - - - - - 2d9bdfc1 by Alec Theriault at 2018-10-16T10:54:21-07:00 Bump haddock-library to 1.7.0 The 1.6.1 release should've been a major bump, since types in the `Documentation.Haddock.Parser.Monad` module changed. This version makes that module internal (as it morally should be). - - - - - ed340cef by Alec Theriault at 2018-10-16T14:59:13-07:00 Merge branch 'ghc-8.4' into ghc-8.6 - - - - - 2821a8df by Alec Theriault at 2018-10-16T15:14:48-07:00 Merge branch 'ghc-8.6' into ghc-head - - - - - a722dc84 by Alec Theriault at 2018-10-16T16:28:55-07:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 63377496 by Alec Theriault at 2018-10-16T16:39:07-07:00 Update changelog - - - - - 099a0110 by Alec Theriault at 2018-10-16T16:49:28-07:00 Merge pull request haskell/haddock#942 from harpocrates/update-docs Fix & add to documentation - - - - - 0927416f by Alec Theriault at 2018-10-16T16:50:14-07:00 Set UTF-8 encoding before writing files (#934) This should fix haskell/haddock#929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8). - - - - - 83b7b017 by Alec Theriault at 2018-10-16T17:42:05-07:00 Output pattern synonyms in Hoogle backend (#947) * Output pattern synonyms in Hoogle backend We were previously weren't outputting _any_ pattern synonyms, bundled or not. Now, we output both. Fixes haskell/haddock#946. * Update changelog - - - - - 81e5033d by Alec Theriault at 2018-10-16T18:04:40-07:00 Release `haddock{,-api}-2.22.0` This version will accompany ghc-8.6.2 - - - - - 9661744e by Alex Biehl at 2018-10-18T08:14:32-07:00 Add NewOcean theme And make it the default theme. - - - - - 7ae6d722 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Improve appearance and readability These changes include: - use latest Haskell's logo colors - decrease #content width to improve readability - use nicer font - improve sizes and distances - - - - - 37f8703d by NunoAlexandre at 2018-10-18T08:14:32-07:00 Include custom font in the html head - - - - - 1d5e1d79 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Update html test reference files - - - - - 53b7651f by NunoAlexandre at 2018-10-18T08:14:32-07:00 Make it responsive - It makes small screens taking more space than larger ones - fixes a few issues present in small screens currently - make it look good across different screen sizes. - - - - - 6aa1aeb1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make the style consistent with hackage Several things are addressed here: - better responsive behaviour on the header - better space usage - consistent colors overall - other nit PR comments - - - - - 3a250c5c by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Place the package name before the menu links This supports the expected responsive menu design, where the package name appears above the menu links. - - - - - cae699b3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update html-test reference files The package name element in the package-header is now a div instead of a paragraph, and it is now above the menu ul.links instead of below. - - - - - 2ec7fd2d by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve synopsis style and code - Use CSS3 instead of loading pictures to show "+" and "-" symbols - Drop redundant code - - - - - 0c874c01 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Decrease space between code blocks There was too much space between code blocks as pointed out by reviewers. - - - - - 85568ce2 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Add an initial-scale property to all haddock pages This solves an issue reported about the content looking incredibly small on mobile devices. - - - - - c1538926 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Address several PR comments - Darken text color like done for hackage - Move synopsis to left side - Make table of contents stick to the left on wide screens - Wrap links to avoid page overflow - Improve expand/collapse buttons - Fix issue with content size on mobile devices - Fix issue with font-size on landscape mode - Increase width of the content - Change colors of table of contents and synopsis - Etc - - - - - e6639e5f by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make synopsis scrollable on wide screens When the synopsis is longer than the screen, you can’t see its end and you can't scroll down either, making the content unreachable. - - - - - 1f0591ff by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve information density - Reduce font size - Improve space between and within code blocks - Improve alignments - Improve spacing within sub-blocks - - - - - bf083097 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Minor adjustments Bring in some adjustments made to hackage: - link colors - page header show everything when package title is too long - - - - - 10375fc7 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix responsive triggers overlap issue The min and max width triggers have the same values, which caused the style resolution to take an intersection of both style declarations when the screen resolution had the size of the limts (say 1280px), causing an odd behaviour and look. - - - - - 95ff2f95 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix issue with menu alignment on firefox Reported and described here: https://github.com/haskell/haddock/pull/721#issuecomment-374668869 - - - - - dc86587e by Alex Biehl at 2018-10-18T08:14:32-07:00 Changelog entry for NewOcean - - - - - 27195e47 by Herbert Valerio Riedel at 2018-10-18T08:14:32-07:00 html-test --accept - - - - - 83f4f9c0 by Alex Biehl at 2018-10-18T08:14:32-07:00 Avoid name shadowing - - - - - 231487f1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font to PT Sans Also migrate some general text related changes from hackage. - - - - - 313db81a by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Use 'flex' to fix header alignment - - - - - 5087367b by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Misc of tweaks - Update link colors to hackage scheme - Tune spacing between content elements - Update footer style - Fix and improve code blocks identation - - - - - b08020df by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font in Xhtml.hs to PT Sans - - - - - 78ce06e3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve code blocks styling - Fix and improve spacing - Improve colors and borders - - - - - 81262d20 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make package-header caption backward-compatible The current html generator of this branch wraps the package-header caption as a div, which does not work (without style adjustments) with the old themes. Changing it from div to span does the trick, without needing to adjust the old stylesheets. - - - - - dc4475cb by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update test-suite reference html pages - - - - - 393d35d8 by Alec Theriault at 2018-10-18T08:25:36-07:00 Accept tests - - - - - a94484ba by Alec Theriault at 2018-10-21T10:29:29-07:00 Fix CHANGELOG - - - - - 8797eca3 by Alec Theriault at 2018-10-21T10:36:19-07:00 Update 'data-files' to include NewOcean stuff - - - - - 1ae51e4a by Simon Jakobi at 2018-10-23T11:29:14+02:00 Fix typo in a warning - - - - - 009ad8e8 by Alec Theriault at 2018-10-24T12:47:47-07:00 Update JS dependencies This was done via `npm audit fix`. I think this fixes haskell/haddock#903 along with some more serious vulnerabilities that nobody seems to have noticed. - - - - - 051994db by Alec Theriault at 2018-10-24T17:31:09-07:00 Resurrect the style-switcher This fixes haskell/haddock#810. Looks like things were broken during the quickjump refactor of the JS. For the (git) record: I do not think the style switcher is a good idea. I'm fixing it for the same reason @mzero added it; as an answer to "rumblings from some that they didn't want their pixels changed on bit" - - - - - 2a1d620f by Alec Theriault at 2018-10-24T17:38:07-07:00 Fix copy-pasta error in data-files - - - - - ed5bfb7f by Alec Theriault at 2018-10-24T20:42:14-07:00 Fix the synopsis button Here's these changes are supposed to do: * put the synopsis back on the right side * properly have it on the edge of the screen on wide screens * adjust the background of the synopsis to match the button (otherwise the grey blends in with what is underneath) * get rid of the dotted purple line * the synopsis contents are now scrollable even when in wide screens (this has been a long-standing bug) - - - - - 883fd74b by Alec Theriault at 2018-10-25T20:16:46-07:00 Avoid more conflicts in generated ids (#954) This fixes haskell/haddock#953 by passing more names into the generated ids. - - - - - ea54e331 by Alec Theriault at 2018-10-25T21:07:12-07:00 Don't hide bullets in method docs I think thst CSS was meant only to deal with fields and the effect on bullets was accidental. Fixes haskell/haddock#926. - - - - - 9a14ef4a by Alec Theriault at 2018-10-25T22:02:07-07:00 Indent more things + slightly smaller font - - - - - b9f17e29 by Alec Theriault at 2018-10-25T22:10:01-07:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 096a3cfa by Alec Theriault at 2018-10-25T22:24:38-07:00 Accept HTML output - - - - - 2669517d by Alec Theriault at 2018-10-26T09:02:35-07:00 User manual + stuff for building GHC docs - - - - - 46b27687 by Alec Theriault at 2018-10-26T09:10:59-07:00 Make 'Contents' in NewOcean scrollable This only happens if the contents block on the left is so big that it doesn't fit (vertically) on the page. If that happens, we want it to be scrollable. - - - - - 3443dd94 by Alec Theriault at 2018-10-26T09:36:46-07:00 Revert "Make 'Contents' in NewOcean scrollable" This reverts commit f909ffd8353d6463fd5dd184998a32aa98d5c922. I missed the fact this also forces the 'Contents' to always go down to the bottom of the page. - - - - - ed081424 by Alec Theriault at 2018-10-26T14:22:23-07:00 Avoid some partiality AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes haskell/haddock#569. - - - - - 6a5bec41 by Alec Theriault at 2018-10-27T10:05:04-07:00 Fix documentation in `haddock-api` (#957) * Fix misplaced Haddocks in Haddock itself Haddock should be able to generate documentation for 'haddock-api' again. * Make CI check that documentation can be built. * Add back a doc that is OK - - - - - 5100450a by Matthew Yacavone at 2018-10-27T14:51:38-04:00 More explicit foralls (GHC Proposal 0007) - - - - - 8771a6b0 by Alec Theriault at 2018-11-05T13:58:11-08:00 Only run MathJax on entities with "mathjax" class (#960) Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes haskell/haddock#959. - - - - - bd7ff5c5 by Alec Theriault at 2018-11-05T15:54:22-08:00 Deduplicate some work in 'AttachInstances' Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too - - - - - cf99fd8f by Alec Theriault at 2018-11-05T15:54:22-08:00 Specialize some SYB functions Perf only change: * Add a 'SPECIALIZE' pragma to help GHC optimize a 'Data a =>' constraint * Manually specialize the needlessly general type of 'specializeTyVarBndrs' - - - - - 4f91c473 by Alec Theriault at 2018-11-05T15:54:22-08:00 Improve perf of renaming Perf only change: * don't look up type variable names (they're never in the environment) * use a difference list for accumulating missing names * more efficient 'Functor'/'Applicative' instances for 'RnM' - - - - - 4bbab0d4 by Alec Theriault at 2018-11-05T15:54:22-08:00 Faster 'Text' driven parser combinators Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}' - - - - - fa430c02 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support hyperlink labels with inline markup The parser for pictures hasn't been properly adjusted yet. - - - - - c1431035 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support (and flatten) inline markup in image links Inline markup is supported in image links but, as per the [commonmark recommendation][0], it is stripped back to a plain text representation. [0]: https://spec.commonmark.org/0.28/#example-547 - - - - - d4ee1ba5 by Alec Theriault at 2018-11-06T12:03:24-08:00 Accept test case - - - - - 8088aeb1 by Alec Theriault at 2018-11-06T12:03:24-08:00 Fix/add to haddock-library test suite - - - - - e78f644d by Alec Theriault at 2018-11-06T13:26:31-08:00 Bump version bounds - - - - - 644335eb by Alec Theriault at 2018-11-06T13:53:30-08:00 Merge pull request haskell/haddock#875 from harpocrates/feature/markup-in-hyperlinks Inline markup in markdown-style links and images - - - - - e173ed0d by Alec Theriault at 2018-11-07T12:37:18-08:00 Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page - - - - - b2d92df7 by Alec Theriault at 2018-11-07T13:41:57-08:00 Allow "Contents" summary to scroll in a fixed div In the unfortunate event that the "Contents" summary doesn't fit vertically (like in the "Prelude"), it will be scrollable. - - - - - ca704c23 by Alec Theriault at 2018-11-07T13:45:15-08:00 Accept HTML output changes - - - - - 82c0ec6d by Alec Theriault at 2018-11-07T18:12:54-08:00 overflow-y 'scroll' -> 'auto' - - - - - 571d7657 by Alec Theriault at 2018-11-08T19:44:12-08:00 Clicking on "Contents" navigates to top of page - - - - - 8065a012 by Alec Theriault at 2018-11-08T19:44:17-08:00 Space out functions more Also, functions and data decls now have the same space before and after them. - - - - - cc650ede by Alec Theriault at 2018-11-09T08:13:35-08:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 65f8c17f by Alec Theriault at 2018-11-10T14:04:06-08:00 Update changelog - - - - - 20473847 by Alec Theriault at 2018-11-10T14:21:40-08:00 Replace oplus/ominus expander/collapser icons with triangles - - - - - 16592957 by Alec Theriault at 2018-11-10T14:35:10-08:00 Merge pull request haskell/haddock#949 from haskell/wip/new-ocean Introduce NewOcean theme. - - - - - 357cefe1 by Alec Theriault at 2018-11-10T16:02:13-08:00 Merge branch 'ghc-8.6' into ghc-head - - - - - de612267 by Alec Theriault at 2018-11-11T20:01:21-08:00 Rename 'NewOcean' theme to 'Linuwial' - - - - - 954b5baa by Alec Theriault at 2018-11-12T08:33:18-08:00 Add blockquote styling Matches b71da1feabf33efbbc517ac376bb690b5a604c2f from hackage-server. Fixes haskell/haddock#967. - - - - - d32c0b0b by Fangyi Zhou at 2018-11-12T10:24:13-08:00 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, osa1 Reviewed By: osa1 GHC Trac Issues: haskell/haddock#15733 Differential Revision: https://phabricator.haskell.org/D5262 - - - - - 41098b1f by Alp Mestanogullari at 2018-11-15T22:40:09+01:00 Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change It got introduced in ghc/ghc at ae2c9b40f5b6bf272251d1f4107c60003f541b62. - - - - - c5c1c7e0 by Alec Theriault at 2018-11-15T13:48:13-08:00 Merge pull request haskell/haddock#970 from alpmestan/alp/fix-promotionflag Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change - - - - - 6473d3a4 by Shayan-Najd at 2018-11-23T01:38:49+01:00 [TTG: Handling Source Locations] Foundation and Pat Trac Issues haskell/haddock#15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`) - - - - - 7a088dfe by Alec Theriault at 2018-11-26T11:11:28-08:00 More uniform handling of `forall`'s in HTML/LaTeX * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes haskell/haddock#973 - - - - - d735e570 by Alec Theriault at 2018-12-12T08:42:09-08:00 Fix warnings, accept output * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's - - - - - a3852f8a by Zejun Wu at 2018-12-14T09:37:47-05:00 Output better debug infromation on internal error in extractDecl This will make investigation of haskell/haddock#979 easier - - - - - 2eccb5b9 by Alec Theriault at 2018-12-17T09:25:10-05:00 Refactor names + unused functions (#982) This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions - - - - - e82e4df8 by Alec Theriault at 2018-12-20T16:16:30-05:00 Load plugins when compiling each module (#983) * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code - - - - - 96e86f38 by Alec Theriault at 2018-12-23T10:23:20-05:00 Properly synify and render promoted type variables (#985) * Synify and render properly promoted type variables Fixes haskell/haddock#923. * Accept output - - - - - 23343345 by Alec Theriault at 2018-12-27T16:39:38-05:00 Remove `haddock-test`'s dep. on `syb` (#987) The functionality is easily inlined into one short function: `gmapEverywhere`. This doesn't warrant pulling in another package. - - - - - d0734f21 by Alec Theriault at 2018-12-27T16:39:52-05:00 Address deprecation warnings in `haddock-test` (#988) Fixes haskell/haddock#885. - - - - - 4d9f144e by mynguyen at 2018-12-30T23:42:26-05:00 Visible kind application haddock update - - - - - ffe0e9ed by Alec Theriault at 2019-01-07T13:55:22-08:00 Print kinded tyvars in constructors for Hoogle (#993) Fixes haskell/haddock#992 - - - - - 2e18b55d by Alec Theriault at 2019-01-10T16:42:45-08:00 Accept new output `GHC.Maybe` -> `Data.Maybe` (#996) Since 53874834b779ad0dfbcde6650069c37926da1b79 in GHC, "GHC.Maybe" is marked as `not-home`. That changes around some test output. - - - - - 055da666 by Gabor Greif at 2019-01-22T14:41:51+01:00 Lone typofix - - - - - 01bb71c9 by Alec Theriault at 2019-01-23T11:46:46-08:00 Keep forall on H98 existential data constructors (#1003) The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes haskell/haddock#1002. - - - - - f9b9bc0e by Ryan Scott at 2019-01-27T09:28:12-08:00 Fix haskell/haddock#1004 with a pinch of dropForAlls - - - - - 5cfcdd0a by Alec Theriault at 2019-01-28T16:49:57-08:00 Loosen 'QuickCheck' and 'hspec' bounds It looks like the new versions don't cause any breakage and loosening the bounds helps deps fit in one stack resolver. - - - - - 3545d3dd by Alec Theriault at 2019-01-31T01:37:25-08:00 Use `.hie` files for the Hyperlinker backend (#977) # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see haskell/haddock#998) * restructure temporary folder logic for `.hi`/`.hie` model - - - - - 2ded3359 by Herbert Valerio Riedel at 2019-02-02T12:06:12+01:00 Update/modernise haddock-library.cabal file - - - - - 62b93451 by Herbert Valerio Riedel at 2019-02-02T12:19:31+01:00 Tentatively declare support for unreleased base-4.13/ghc-8.8 - - - - - 6041e767 by Herbert Valerio Riedel at 2019-02-02T16:04:32+01:00 Normalise LICENSE text w/ cabal's BSD2 template Also, correct the `.cabal` files to advertise `BSD2` instead of the incorrect `BSD3` license. - - - - - 0b459d7f by Alec Theriault at 2019-02-02T18:06:12-08:00 CI: fetch GHC from validate artifact Should help make CI be less broken - - - - - 6b5c07cf by Alec Theriault at 2019-02-02T18:06:12-08:00 Fix some Hyperlinker test suite fallout * Amend `ParserSpec` to match new Hyperlinker API - pass in compiler info - strip out null tokens * Make `hypsrc-test` pass reliably - strip out `local-*` ids - strip out `line-*` ids from the `ClangCppBug` test - re-accept output - - - - - ded34791 by Nathan Collins at 2019-02-02T18:31:23-08:00 Update README instructions for Stack No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock. - - - - - 723298c9 by Alec Theriault at 2019-02-03T09:11:05-08:00 Remove `Documentation.Haddock.Utf8` The circumstances under which this module appeared are completely gone. The Hyperlinker backend no longer needs this module (it uses the more efficient `Encoding` module from `ghc`). Why no deprecation? Because this module really shouldn't exist! - It isn't used in `haddock-library`/`haddock-api` anymore - It was copy pasted directly from `utf8-string` - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding` - - - - - 51050006 by Alec Theriault at 2019-02-03T22:58:58-08:00 Miscellaneous improvements to `Convert` (#1020) Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms - - - - - 841980c4 by Oleg Grenrus at 2019-02-04T08:44:25-08:00 Make a fixture of weird parsing of lists (#997) The second example is interesting. If there's a list directly after the header, and that list has deeper structure, the parser is confused: It finds two lists: - One with the first nested element, - everything after it I'm not trying to fix this, as I'm not even sure this is a bug, and not a feature. - - - - - 7315c0c8 by Ryan Scott at 2019-02-04T12:17:56-08:00 Fix haskell/haddock#1015 with dataConUserTyVars (#1022) The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes haskell/haddock#1015. - - - - - ee0b49a3 by Ryan Scott at 2019-02-04T15:25:17-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. - - - - - 1c850dc8 by Alan Zimmerman at 2019-02-05T21:54:18+02:00 Matching changes in GHC for haskell/haddock#16236 - - - - - ab03c38e by Simon Marlow at 2019-02-06T08:07:33+00:00 Merge pull request haskell/haddock#1014 from hvr/pr/bsd2-normalise Normalise LICENSE text w/ cabal's BSD2 template - - - - - 5a92ccae by Alec Theriault at 2019-02-10T06:21:55-05:00 Merge remote-tracking branch 'gitlab/wip/T16236-2' into ghc-head - - - - - c0485a1d by Alec Theriault at 2019-02-10T03:32:52-08:00 Removes `haddock-test`s dependency on `xml`/`xhtml` (#1027) This means that `html-test`, `latex-test`, `hoogle-test`, and `hypsrc-test` now only depend on GHC boot libs. So we should now be able to build and run these as part of GHC's testsuite. \o/ The reference output has changed very slightly, in three ways: * we don't convert quotes back into `&quot;` as the `xml` lib did * we don't add extra `&nbsp;` as the `xml` lib did * we now remove the entire footer `div` (instead of just emptying it) - - - - - 65a448e3 by Alec Theriault at 2019-02-11T12:27:41-05:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - 360ca937 by Alec Theriault at 2019-02-13T11:36:11-05:00 Clean up logic for guessing `-B` and `--lib` (#1026) Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works. - - - - - d583e364 by Alec Theriault at 2019-02-16T10:41:22-05:00 Fix tests broken by GHC Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings. - - - - - da0c42cc by Vladislav Zavialov at 2019-02-17T11:39:19+03:00 Parser changes to match !380 - - - - - ab96bed7 by Ryan Scott at 2019-02-18T04:44:08-05:00 Bump ghc version to 8.9 - - - - - 44b7c714 by Alec Theriault at 2019-02-22T05:49:43-08:00 Match GHC changes for T16185 `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock. - - - - - 2ee653b1 by Alec Theriault at 2019-02-24T18:53:33-08:00 Update .travis.yml Points to the new GHC CI artifact. - - - - - 90939d71 by Alec Theriault at 2019-02-25T00:42:41-08:00 Support value/type namespaces on identifier links Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity) - - - - - d6ed496c by Alec Theriault at 2019-02-25T00:42:46-08:00 Better identifier parsing * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental). - - - - - 3c3b404c by Alec Theriault at 2019-02-25T22:12:11-08:00 Fix standalone deriving docs Docs on standalone deriving decls for classes with associated types should be associated with the class instance, not the associated type instance. Fixes haskell/haddock#1033 - - - - - d51ef69e by Alec Theriault at 2019-02-26T19:14:59-08:00 Fix bogus identifier defaulting This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes haskell/haddock#1035. - - - - - 88cbbdc7 by Ryan Scott at 2019-02-27T10:14:03-05:00 Visible dependent quantification (#16326) changes - - - - - 0dcf6cee by Xia Li-yao at 2019-02-27T21:53:27-05:00 Menu item controlling which instances are expanded/collapsed (#1007) Adds a menu item (like "Quick Jump") for options related to displaying instances. This provides functionality for: * expanding/collapsing all instances on the currently opened page * controlling whether instances are expanded/collapsed by default * controlling whether the state of instances should be "remembered" This new functionality is implemented in Typescript in `details-helper`. The built-in-themes style switcher also got a revamp so that all three of QuickJump, the style switcher, and instance preferences now have the same style and implementation structure. See also: https://mail.haskell.org/pipermail/haskell-cafe/2019-January/130495.html Fixes haskell/haddock#698. Co-authored-by: Lysxia <lysxia at gmail.com> Co-authored-by: Nathan Collins <conathan at galois.com> - - - - - 3828c0fb by Alec Theriault at 2019-02-28T12:42:49-05:00 `--show-interface` should output to stdout. (#1040) Fixes haskell/haddock#864. - - - - - a50f4cda by gbaz at 2019-03-01T07:43:16-08:00 Increase contrast of Linuwal theme (#1037) This is to address the concern that, on less nice and older screens, some of the shades of grey blend in too easily with the white background. * darken the font slightly * darken slightly the grey behind type signatures and such * add a border and round the corners on code blocks * knock the font down by one point - - - - - ab4d41de by Alec Theriault at 2019-03-03T09:23:26-08:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 12f509eb by Ben Gamari at 2019-03-04T22:13:20-05:00 Remove reference to Opt_SplitObjs flag Split-objects has been removed. - - - - - 5b3e4c9a by Ryan Scott at 2019-03-06T19:16:24-05:00 Update html-test output to reflect haskell/haddock#16391 changes - - - - - fc228af1 by Alec Theriault at 2019-03-09T08:29:23-08:00 Match changes for "Stop inferring over-polymorphic kinds" The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock. - - - - - 6ac109eb by Alec Theriault at 2019-03-09T11:22:55-08:00 Add .hi, .dyn_hi, etc files to .gitignore Fixes haskell/haddock#1030. - - - - - b55f0c05 by Alec Theriault at 2019-03-09T11:22:55-08:00 Better support for default methods in classes * default methods now get rendered differently * default associated types get rendered * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend * LaTeX backend now renders default method signatures NB: there is still no way to document default class members and the NB: LaTeX backend still crashes on associated types - - - - - 10aea0cf by Alec Theriault at 2019-03-09T11:22:55-08:00 Avoid multi-line `emph` in LaTeX backend `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes haskell/haddock#936. - - - - - d22dc2c9 by Alec Theriault at 2019-03-09T11:22:55-08:00 Many LaTeX backend fixes After this commit, we can run with `--latex` on all boot libraries without crashing (although the generated LaTeX still fails to compile in a handful of larger packages like `ghc` and `base`). * Add newlines after all block elements in LaTeX. This is important to prevent the final output from being more an more indented. See the `latext-test/src/Example` test case for a sample of this. * Support associated types in class declarations (but not yet defaults) * Several small issues for producing compiling LaTeX; - avoid empy `\haddockbeginargs` lists (ex: `type family Any`) - properly escape identifiers depending on context (ex: `Int#`) - add `vbox` around `itemize`/`enumerate` (so they can be in tables) * Several spacing fixes: - limit the width of `Pretty`-arranged monospaced code - cut out extra space characters in export lists - only escape spaces if there are _multiple_ spaces - allow type signatures to be multiline (even without docs) * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files from `latex-test` test reference output. Fixes haskell/haddock#935, haskell/haddock#929 (LaTeX docs for `text` build & compile) Fixes haskell/haddock#727, haskell/haddock#930 (I think both are really about type families...) - - - - - 0e6cee00 by Alec Theriault at 2019-03-29T12:11:56-07:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - ce05434d by Alan Zimmerman at 2019-03-29T12:12:11-07:00 Matching changes in GHC for haskell/haddock#16236 (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576) - - - - - d85766b2 by Ben Gamari at 2019-03-29T12:14:04-07:00 Bump GHC to 8.8 - - - - - 5a82cbaf by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Redo ParseModuleHeader - - - - - b9033348 by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - bb55c8f4 by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove outdated `.ghci` files and `scripts` The `.ghci` files are actively annoying when trying to `cabal v2-repl`. As for the `scripts`, the distribution workflow is completely different. - - - - - 5ee244dc by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove obsolete arcanist files + STYLE Now that GHC is hosted on Gitlab, the arcanist files don't make sense anymore. The STYLE file contains nothing more than a dead link too. - - - - - d07c1928 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Redo ParseModuleHeader - - - - - 492762d2 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - af2ac773 by Ryan Scott at 2019-05-14T17:22:13-04:00 Changes for haskell/haddock#16110/#16356 - - - - - 6820ed0d by Alec Theriault at 2019-05-17T08:51:27-07:00 Unbreak haskell/haddock#1004 test case `fail` is no longer part of `Monad`. - - - - - 6bf7be98 by Alec Theriault at 2019-05-17T08:51:27-07:00 Fix haskell/haddock#1063 with better parenthesization logic for contexts The only other change in html/hoogle/hyperlinker output for the boot libraries that this caused is a fix to some Hoogle output for implicit params. ``` $ diff -r _build/docs/ old_docs diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt 13296c13296 < assertError :: (?callStack :: CallStack) => Bool -> a -> a --- > assertError :: ?callStack :: CallStack => Bool -> a -> a ``` - - - - - b5716b61 by Ryan Scott at 2019-05-22T17:24:32-04:00 Match changes with haskell/haddock#14332 - - - - - c115abf6 by Alec Theriault at 2019-05-26T16:01:58-04:00 Remove Haddock's dependency on `Cabal` At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries). - - - - - e5b2d4a3 by Alec Theriault at 2019-05-26T16:16:25-04:00 Regression test: promoted lists in associated types When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes haskell/haddock#466, - - - - - cc5ad5d3 by Alec Theriault at 2019-05-26T17:55:54-04:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 4b3301a6 by Alec Theriault at 2019-05-26T17:57:52-04:00 Release haddock-2.23, haddock-library-1.8.0 Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1. - - - - - 69c7cfce by Matthew Pickering at 2019-05-30T10:54:27+01:00 Update hyperlinker tests for new types in .hie files - - - - - 29b7e738 by Zubin Duggal at 2019-05-30T10:57:51+01:00 update for new way to store hiefile headers - - - - - aeca5d5f by Zubin Duggal at 2019-06-04T18:57:42-04:00 update for new way to store hiefile headers - - - - - ba2ca518 by Ben Gamari at 2019-06-07T23:11:14+00:00 Update test output for introduction of Safe-Inferred - - - - - 3a975a6c by Ryan Scott at 2019-07-03T12:06:27-04:00 Changes for haskell/haddock#15247 - - - - - 0df46555 by Zubin Duggal at 2019-07-22T10:52:50+01:00 Fix haddockHypsrcTest - - - - - 2688686b by Sylvain Henry at 2019-09-12T23:19:39+02:00 Fix for GHC module renaming - - - - - 9ec0f3fc by Alec Theriault at 2019-09-20T03:21:00-04:00 Fix Travis CI, loosen .cabal bounds (#1089) Tentatively for the 2.23 release: * updated Travis CI to work again * tweaked bounds in the `.cabal` files * adjusted `extra-source-files` to properly identify test files - - - - - ca559beb by Matthías Páll Gissurarson at 2019-09-28T12:14:40-04:00 Small change in to facilitate extended typed-holes (#1090) This change has no functional effect on haddock itself, it just changes one pattern to use `_ (` rather than `_(`, so that we may use `_(` as a token for extended typed-holes later. - - - - - 02e28976 by Vladislav Zavialov at 2019-09-28T12:17:45-04:00 Remove spaces around @-patterns (#1093) This is needed to compile `haddock` when [GHC Proposal haskell/haddock#229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented. - - - - - 83cbbf55 by Alexis King at 2019-09-30T21:12:42-04:00 Fix the ignore-exports option (#1082) The `ignore-exports` option has been broken since haskell/haddock#688, as mentioned in https://github.com/haskell/haddock/pull/766#issue-172505043. This PR fixes it. - - - - - e127e0ab by Ben Gamari at 2019-10-06T15:12:06-04:00 Fix a few haddock issues - - - - - 3a0f5c89 by Zubin Duggal at 2019-10-07T17:56:13-04:00 Fix crash when there are no srcspans in the file due to CPP - - - - - 339c5ff8 by Alec Theriault at 2019-10-07T17:56:13-04:00 Prefer un-hyperlinked sources to no sources It is possible to fail to extract an HIE ast. This is however not a reason to produce _no_ output - we should still make a colorized HTML page. - - - - - d47ef478 by Alec Theriault at 2019-10-07T17:56:13-04:00 Add a regression test for haskell/haddock#1091 Previously, this input would crash Haddock. - - - - - ed7c8b0f by Alec Theriault at 2019-10-07T20:56:48-04:00 Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. - - - - - d00436ab by Andreas Klebinger at 2019-10-21T15:53:03+02:00 Refactor for withTiming changes. - - - - - 4230e712 by Ben Gamari at 2019-10-22T09:36:37-04:00 Merge pull request haskell/haddock#1101 from AndreasPK/withTimingRefactor Refactor for withTiming changes. - - - - - d155c5f4 by Ryan Scott at 2019-10-23T10:37:17-04:00 Reify oversaturated data family instances correctly (#1103) This fixes haskell/haddock#1103 by adapting the corresponding patch for GHC (see https://gitlab.haskell.org/ghc/ghc/issues/17296 and https://gitlab.haskell.org/ghc/ghc/merge_requests/1877). - - - - - 331a5adf by Sebastian Graf at 2019-10-25T17:14:40+02:00 Refactor for OutputableBndrId changes - - - - - 48a490e0 by Ben Gamari at 2019-10-27T10:16:16-04:00 Merge pull request haskell/haddock#1105 from sgraf812/wip/flexible-outputable Refactor for OutputableBndrId changes - - - - - f62a7dfc by Sebastian Graf at 2019-11-01T11:54:16+00:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - d9b242ed by Ryan Scott at 2019-11-03T13:20:03-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. (cherry picked from commit cfd682c5fd03b099a3d78c44f9279faf56a0ac70) - - - - - dfd42406 by Sebastian Graf at 2019-11-04T07:02:14-05:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - 0b15be7c by Ben Gamari at 2019-11-09T13:21:33-05:00 Import isRuntimeRepVar from Type rather than TyCoRep isRuntimeRepVar is not longer exported from TyCoRep due to ghc#17441. - - - - - 091f7283 by Ben Gamari at 2019-11-10T12:47:06-05:00 Bump to GHC 8.10 - - - - - e88c71f2 by Ben Gamari at 2019-11-14T00:22:24-05:00 Merge pull request haskell/haddock#1110 from haskell/wip/T17441 Import isRuntimeRepVar from Type rather than TyCoRep - - - - - 4e0bbc17 by Ben Gamari at 2019-11-14T00:22:45-05:00 Version bumps for GHC 8.11 - - - - - 0e85ceb4 by Ben Gamari at 2019-11-15T11:59:45-05:00 Bump to GHC 8.10 - - - - - 00d6d68b by Ben Gamari at 2019-11-16T18:35:58-05:00 Bump ghc version to 8.11 - - - - - dde1fc3f by Ben Gamari at 2019-11-16T20:40:37-05:00 Drop support for base 4.13 - - - - - f52e331d by Vladislav Zavialov at 2019-11-24T13:02:28+03:00 Update Hyperlinker.Parser.classify to use ITdollar - - - - - 1ad96198 by Vladislav Zavialov at 2019-11-28T16:12:33+03:00 Remove HasSrcSpan (#17494) - - - - - 651afd70 by Herbert Valerio Riedel at 2019-12-08T12:08:16+01:00 Document error-prone conditional definition of instances This can easily trip up people if one isn't aware of it. Usually it's better to avoid this kind of conditionality especially for typeclasses for which there's an compat-package as conditional instances like these tend to fragment the ecosystem into those packages that go the extra mile to provide backward compat via those compat-packages and those that fail to do so. - - - - - b521af56 by Herbert Valerio Riedel at 2019-12-08T12:09:54+01:00 Fix build-failure regression for base < 4.7 The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses haskell/haddock#1119 - - - - - 556c375d by Sylvain Henry at 2020-01-02T19:01:55+01:00 Fix after Iface modules renaming - - - - - bd6c53e5 by Sylvain Henry at 2020-01-07T00:48:48+01:00 hsyl20-modules-renamer - - - - - fb23713b by Ryan Scott at 2020-01-08T07:41:13-05:00 Changes for GHC#17608 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2372 - - - - - 4a4dd382 by Ryan Scott at 2020-01-25T08:08:26-05:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - e782a44d by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename PackageConfig into UnitInfo - - - - - ba3c9f05 by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename lookupPackage - - - - - ab37f9b3 by Ben Gamari at 2020-01-29T13:00:44-05:00 Merge pull request haskell/haddock#1125 from haskell/wip/T17566-take-two Changes for GHC#17566 - - - - - 3ebd5ae0 by Ryan Scott at 2020-01-31T05:56:50-05:00 Merge branch 'wip-hsyl20-package-refactor' into ghc-head - - - - - 602a747e by Richard Eisenberg at 2020-02-04T09:05:43+00:00 Echo GHC's removal of PlaceHolder module This goes with GHC's !2083. - - - - - ccfe5679 by Sylvain Henry at 2020-02-10T10:13:56+01:00 Module hierarchy: runtime (cf haskell/haddock#13009) - - - - - 554914ce by Cale Gibbard at 2020-02-10T16:10:39-05:00 Fix build of haddock in stage1 We have to use the correct version of the GHC API, but the version of the compiler itself doesn't matter. - - - - - 5b6fa2a7 by John Ericson at 2020-02-10T16:18:07-05:00 Noramlize `tested-with` fields in cabal files - - - - - e6eb3ebe by Vladislav Zavialov at 2020-02-16T13:25:26+03:00 No MonadFail/Alternative for P - - - - - 90e181f7 by Ben Gamari at 2020-02-18T14:13:47-05:00 Merge pull request haskell/haddock#1129 from obsidiansystems/wip/fix-stage1-build Fix build of haddock in stage1 - - - - - 93b64636 by Sylvain Henry at 2020-02-19T11:20:27+01:00 Modules: Driver (#13009) - - - - - da4f6c7b by Vladislav Zavialov at 2020-02-22T15:33:02+03:00 Use RealSrcSpan in InstMap - - - - - 479b1b50 by Ben Gamari at 2020-02-23T10:28:13-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 55ecacf0 by Sylvain Henry at 2020-02-25T15:18:27+01:00 Modules: Core (#13009) - - - - - 60867b3b by Vladislav Zavialov at 2020-02-28T15:53:52+03:00 Ignore the BufLoc/BufSpan added in GHC's !2516 - - - - - 1e5506d3 by Sylvain Henry at 2020-03-02T12:32:43+01:00 Modules: Core (#13009) - - - - - 6fb53177 by Richard Eisenberg at 2020-03-09T14:49:40+00:00 Changes in GHC's !1913. - - - - - 30b792ea by Ben Gamari at 2020-03-16T12:45:02-04:00 Merge pull request haskell/haddock#1130 from hsyl20/wip/hsyl20-modules-core2 Modules: Core (#13009) - - - - - cd761ffa by Sylvain Henry at 2020-03-18T15:24:00+01:00 Modules: Types - - - - - b6646486 by Ben Gamari at 2020-03-18T14:42:43-04:00 Merge pull request haskell/haddock#1133 from hsyl20/wip/hsyl20/modules/types Modules: Types - - - - - 9325d734 by Kleidukos at 2020-03-19T12:38:31-04:00 Replace the 'caption' class so that the collapsible sections are shown - - - - - 5e2bb555 by Kleidukos at 2020-03-19T12:38:31-04:00 Force ghc-8.8.3 - - - - - c6fcd0aa by Kleidukos at 2020-03-19T12:38:31-04:00 Update test fixtures - - - - - 5c849cb1 by Sylvain Henry at 2020-03-20T09:34:39+01:00 Modules: Types - - - - - 7f439155 by Alec Theriault at 2020-03-20T20:17:01-04:00 Merge branch 'ghc-8.8' into ghc-8.10 - - - - - b7904e5c by Alina Banerjee at 2020-03-20T20:24:17-04:00 Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests - - - - - b9d60a59 by Alec Theriault at 2020-03-22T11:46:42-04:00 Clean up warnings * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal` - - - - - 0c317dbe by Alec Theriault at 2020-03-22T18:46:54-04:00 Fix NPM security warnings This was done by calling `npm audit fix`. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. - - - - - 6e306242 by Alec Theriault at 2020-03-22T20:10:52-04:00 Tentative 2.24 release Adjusted changelogs and versions in `.cabal` files in preparation for the upcoming release bundled with GHC 8.10. - - - - - 1bfb4645 by Ben Gamari at 2020-03-23T16:40:54-04:00 Merge commit '3c2944c037263b426c4fe60a3424c27b852ea71c' into HEAD More changes from the GHC types module refactoring. - - - - - be8c6f3d by Alec Theriault at 2020-03-26T20:10:53-04:00 Update `.travis.yml` to work with GHC 8.10.1 * Regenerated the Travis file with `haskell-ci` * Beef up `.cabal` files with more `tested-with` information - - - - - b025a9c6 by Alec Theriault at 2020-03-26T20:10:53-04:00 Update README Removed some out of date links/info, added some more useful links. * badge to Hackage * update old trac link * `ghc-head` => `ghc-8.10` * `cabal new-*` is now `cabal v2-*` and it should Just Work * `--test-option='--accept'` is the way to accept testsuite output - - - - - 564d889a by Alec Theriault at 2020-03-27T20:34:33-04:00 Fix crash in `haddock-library` on unicode space Our quickcheck tests for `haddock-library` stumbled across an edge case input that was causing Haddock to crash: it was a unicode space character. The root cause of the crash is that we were implicitly assuming that if a space character was not " \t\f\v\r", it would have to be "\n". We fix this by instead defining horizontal space as: any space character that is not '\n'. Fixes haskell/haddock#1142 - - - - - 2d360ba1 by Alec Theriault at 2020-03-27T21:57:32-04:00 Disallow qualified uses of reserved identifiers This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes haskell/haddock#952 - - - - - 47ae22ed by Alec Theriault at 2020-03-28T13:36:25-04:00 Remove unused `Haddock.Utils` functions * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils` - - - - - c0291245 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use TTG empty extensions to remove some `error`'s None of these error cases should ever have been reachable, so this is just a matter of leveraging the type system to assert this. * Use the `NoExtCon` and `noExtCon` to handle case matches for no extension constructors, instead of throwing an `error`. * Use the extension field of `HsSpliceTy` to ensure that this variant of `HsType` cannot exist in an `HsType DocNameI`. - - - - - 0aff8dc4 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` * `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes haskell/haddock#978 - - - - - bf6f2fb7 by Alec Theriault at 2020-03-28T13:36:25-04:00 Cleanup up GHC flags in `.cabal` files * enable more useful warning flags in `haddock-api`, handle the new warnings generated * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in `-Wall` for a while now) - - - - - c576fbf1 by Alec Theriault at 2020-03-28T13:36:25-04:00 `haddock-library` document header level Document the fact the header level is going to always be between 1 and 6 inclusive. Along the way, I also optimized the parsing code a bit. - - - - - 71bce0ee by Alec Theriault at 2020-03-28T14:26:27-04:00 Disallow links in section headers This is quite straightforward to implement, since we already had a function `docToHtmlNoAnchors` (which we used to generate the link in the sidebar "Contents"). This breaks test `Bug387`, but that test case has aged badly: we now automatically generate anchors for all headings, so manually adding an anchor in a section makes no sense. Nested anchors are, as pointed out in haskell/haddock#1054, disallowed by the HTML standard. Fixes haskell/haddock#1054 - - - - - b461b0ed by Sylvain Henry at 2020-03-30T10:34:23+02:00 Modules: type checker - - - - - cd8cd1ee by Ben Gamari at 2020-03-31T12:45:02-04:00 Merge pull request haskell/haddock#1152 from hsyl20/wip/hsyl20/modules/tc Module renaming - - - - - 5e8f8ea7 by Felix Yan at 2020-04-01T17:58:06-07:00 Allow QuickCheck 2.14 Builds fine and all tests pass. - - - - - dc6b1633 by Sylvain Henry at 2020-04-05T16:43:44+02:00 Module renaming: amend previous patch - - - - - eee2f4ae by Ryan Scott at 2020-04-05T09:04:43-07:00 Fix haskell/haddock#1050 by filtering out invisible AppTy arguments This makes the `synifyType` case for `AppTy` more intelligent by taking into consideration the visibilities of each `AppTy` argument and filtering out any invisible arguments, as they aren't intended to be displayed in the source code. (See haskell/haddock#1050 for an example of what can happen if you fail to filter these out.) Along the way, I noticed that a special `synifyType` case for `AppTy t1 (CoercionTy {})` could be consolidated with the case below it, so I took the opportunity to tidy this up. - - - - - 23eb99e8 by Ben Gamari at 2020-04-07T11:19:58-04:00 Merge pull request haskell/haddock#1154 from hsyl20/wip/hsyl20/modules/tc Module renaming: amend previous patch - - - - - 072d994d by Ryan Scott at 2020-04-07T19:32:47-04:00 Make NoExtCon fields strict These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992). - - - - - d8ebf6c8 by Ignat Insarov at 2020-04-09T21:15:01-04:00 Recode Doc to Json. (#1159) * Recode Doc to Json. * More descriptive field labels. - - - - - 52df4b4e by Sylvain Henry at 2020-04-10T12:39:18+02:00 Module renaming - - - - - d9ab8ec8 by Cale Gibbard at 2020-04-14T11:43:34-04:00 Add instance of XCollectPat for DocNameI - - - - - 323d221d by Cale Gibbard at 2020-04-14T11:43:34-04:00 Rename XCollectPat -> CollectPass - - - - - 2df80867 by Alec Theriault at 2020-04-15T07:30:51-07:00 Prune docstrings that are never rendered When first creating a Haddock interface, trim `ifaceDocMap` and `ifaceArgMap` to not include docstrings that can never appear in the final output. Besides checking with GHC which names are exported, we also need to keep all the docs attached to instance declarations (it is much tougher to detect when an instance is fully private). This change means: * slightly smaller interface files (7% reduction on boot libs) * slightly less work to do processing docstrings that aren't used * no warnings in Haddock's output about private docstrings (see haskell/haddock#1070) I've tested manually that this does not affect any of the boot library generated docs (the only change in output was some small re-ordering in a handful of instance lists). This should mean no docstrings have been incorrectly dropped. - - - - - f49c90cc by Alec Theriault at 2020-04-15T07:30:51-07:00 Don't warn about missing links in miminal sigs When renaming the Haddock interface, never emit warnings when renaming a minimal signature. Also added some documention around `renameInterface`. Minimal signatures intentionally include references to potentially un-exported methods (see the discussion in haskell/haddock#330), so it is expected that they will not always have a link destination. On the principle that warnings should always be resolvable, this shouldn't produce a warning. See haskell/haddock#1070. - - - - - a9eda64d by Ben Gamari at 2020-04-17T09:27:35-04:00 Merge pull request haskell/haddock#1160 from hsyl20/wip/hsyl20/modules/systools Module renaming - - - - - f40d7879 by Cale Gibbard at 2020-04-20T11:30:38-04:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ttg-con-pat - - - - - a50e7753 by Ben Gamari at 2020-04-20T11:36:10-04:00 Merge pull request haskell/haddock#1165 from obsidiansystems/wip/ttg-con-pat Trees that Grow refactor (GHC !2553) - - - - - 6a24795c by Alec Theriault at 2020-04-21T08:06:45-07:00 Fallback to `hiDecl` when `extractDecl` fails Sometimes, the declaration being exported is a subdecl (for instance, a record accessor getting exported at the top-level). For these cases, Haddock has to find a way to produce some synthetic sensible top-level declaration. This is done with `extractDecl`. As is shown by haskell/haddock#1067, this is sometimes impossible to do just at a syntactic level (for instance when the subdecl is re-exported). In these cases, the only sensible thing to do is to try to reify a declaration based on a GHC `TyThing` via `hiDecl`. - - - - - eee1a8b7 by Sylvain Henry at 2020-04-24T15:46:05+02:00 Module structure - - - - - 50b9259c by Iñaki at 2020-04-25T18:38:11-04:00 Add support for custom section anchors (#1179) This allows to have stable anchors for groups, even if the set of groups in the documentation is altered. The syntax for setting the anchor of a group is -- * Group name #desiredAnchor# Which will produce an html anchor of the form '#g:desiredAnchor' Co-authored-by: Iñaki García Etxebarria <git at inaki.blueleaf.cc> - - - - - 4003c97a by Ben Gamari at 2020-04-26T09:35:15-04:00 Merge pull request haskell/haddock#1166 from hsyl20/wip/hsyl20/modules/utils Module structure - - - - - 5206ab60 by Sylvain Henry at 2020-04-27T16:47:39+02:00 Renamed UnitInfo fields - - - - - c32c333b by Sylvain Henry at 2020-04-27T17:32:58+02:00 UnitId has been renamed into Unit - - - - - 3e87db64 by Sylvain Henry at 2020-04-27T17:36:00+02:00 Fix for GHC.Unit.* modules - - - - - ae3323a7 by Ben Gamari at 2020-04-29T12:36:37-04:00 Merge pull request haskell/haddock#1183 from hsyl20/wip/hsyl20/unitid Refactoring of Unit code - - - - - b105564a by Artem Pelenitsyn at 2020-05-03T08:14:10+01:00 add dependency on exceptions because GHC.Exception was boiled down (ghc haskell/haddock#18075) - - - - - 9857eff3 by Zubin Duggal at 2020-05-04T18:48:25+01:00 Atomic update of NameCache in readHieFile - - - - - 86bbb226 by Sylvain Henry at 2020-05-14T16:36:27+02:00 Fix after Config module renaming - - - - - a4bbdbc2 by Gert-Jan Bottu at 2020-05-15T22:09:44+02:00 Explicit Specificity Support for Haddock - - - - - 46199daf by Ben Gamari at 2020-05-19T09:59:56-04:00 Merge pull request haskell/haddock#1192 from hsyl20/hsyl20/modules-config Fix after Config module renaming - - - - - f9a9d2ba by Gert-Jan Bottu at 2020-05-20T16:48:38-04:00 Explicit Specificity Support for Haddock - - - - - 55c5b7ea by Ben Gamari at 2020-05-21T00:32:02-04:00 Merge commit 'a8d7e66da4dcc3b242103271875261604be42d6e' into ghc-head - - - - - a566557f by Cale Gibbard at 2020-05-21T16:02:06-04:00 isBootSummary now produces a result of type IsBootInterface - - - - - ea52f905 by Zubin Duggal at 2020-05-24T17:55:48+01:00 update for hiefile-typeclass-info - - - - - 49ba7a67 by Willem Van Onsem at 2020-05-25T12:23:01-04:00 Use floor over round to calculate the percentage (#1195) If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes haskell/haddock#1194 - - - - - c025ebf1 by Ben Gamari at 2020-05-29T14:32:42-04:00 Merge pull request haskell/haddock#1185 from obsidiansystems/boot-disambig isBootSummary now produces a result of type IsBootInterface - - - - - 74ab9415 by Ben Gamari at 2020-05-29T20:23:39-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - b40be944 by Ben Gamari at 2020-06-03T17:02:31-04:00 testsuite: Update expected output for simplified subsumption - - - - - 624be71c by Ryan Scott at 2020-06-05T12:43:23-04:00 Changes for GHC#18191 See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337. - - - - - fbd8f7ce by Sylvain Henry at 2020-06-08T15:31:47+02:00 Fix after unit refactoring - - - - - 743fda4d by Ben Gamari at 2020-06-09T12:09:58-04:00 Merge pull request haskell/haddock#1202 from hsyl20/wip/hsyl20/unitid-ii Fix after unit refactoring - - - - - d07a06a9 by Ryan Scott at 2020-06-13T07:16:55-04:00 Use HsForAllTelescope (GHC#18235) - - - - - 389bb60d by Ben Gamari at 2020-06-13T15:30:52-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - 7a377f5f by Ben Gamari at 2020-06-17T14:53:16-04:00 Merge pull request haskell/haddock#1199 from bgamari/wip/ghc-8.12 haddock: Bounds bumps for GHC 8.12 - - - - - 9fd9e586 by Krzysztof Gogolewski at 2020-06-17T16:09:07-04:00 Adapt Haddock to LinearTypes See ghc/ghc!852. - - - - - 46fe7636 by Ben Gamari at 2020-06-18T14:20:02-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 35a3c9e2 by Zubin Duggal at 2020-06-21T21:19:18+05:30 Use functions exported from HsToCore - - - - - 8abe3928 by Ben Gamari at 2020-06-24T13:53:39-04:00 Merge pull request haskell/haddock#1204 from wz1000/wip/haddock-hstocore Use functions exported from GHC.HsToCore.Docs - - - - - 22f2c937 by Matthías Páll Gissurarson at 2020-06-26T19:07:03+02:00 Adapt Haddock for QualifiedDo - - - - - 3f6208d7 by Vladislav Zavialov at 2020-06-28T14:28:16+03:00 Handle LexicalNegation's ITprefixminus - - - - - 03a19f41 by Sylvain Henry at 2020-07-02T09:37:38+02:00 Rename hsctarget into backend - - - - - ea17ff23 by Andreas Klebinger at 2020-07-02T17:44:18+02:00 Update for UniqFM changes. - - - - - 9872f2f3 by Ben Gamari at 2020-07-09T10:39:19-04:00 Merge pull request haskell/haddock#1209 from AndreasPK/wip/typed_uniqfm Update for UniqFM changes. - - - - - 68f7b668 by Krzysztof Gogolewski at 2020-07-12T18:16:57+02:00 Sync with GHC removing {-# CORE #-} pragma See ghc ticket haskell/haddock#18048 - - - - - eb372681 by Sylvain Henry at 2020-07-20T11:41:30+02:00 Rename hscTarget into backend - - - - - fb7f78bf by Ben Gamari at 2020-07-21T12:15:25-04:00 Merge pull request haskell/haddock#1214 from hsyl20/wip/hsyl20/hadrian/ncg Rename hscTarget into backend - - - - - 1e8f5b56 by Ben Gamari at 2020-07-23T09:11:50-04:00 Merge commit '904dce0cafe0a241dd3ef355775db47fc12f434d' into ghc-head - - - - - d8fd1775 by Zubin Duggal at 2020-07-23T18:46:40+05:30 Update for modular ping pong - - - - - 8416f872 by Ben Gamari at 2020-07-23T09:35:03-04:00 Merge pull request haskell/haddock#1200 from wz1000/wip/wz1000-modular-ping-pong Modular ping pong - - - - - a24a8577 by Ben Gamari at 2020-07-28T15:23:36-04:00 Bump GHC version to 9.0 - - - - - 6a51c9dd by Sylvain Henry at 2020-08-05T18:47:05+02:00 Fix after Outputable refactoring - - - - - c05e1c99 by Ben Gamari at 2020-08-10T14:41:41-04:00 Merge pull request haskell/haddock#1223 from hsyl20/wip/hsyl20/dynflags/exception Fix after Outputable refactoring - - - - - d964f15b by Sylvain Henry at 2020-08-12T11:58:49+02:00 Fix after HomeUnit - - - - - 8e6d5b23 by Ben Gamari at 2020-08-12T14:25:30-04:00 Merge pull request haskell/haddock#1225 from hsyl20/wip/hsyl20/plugins/homeunit Fix after HomeUnit - - - - - 8c7880fe by Sylvain Henry at 2020-08-17T14:13:29+02:00 Remove Ord FastString instance - - - - - 8ea410db by Alex Biehl at 2020-08-19T10:56:32+02:00 Another round of `npm audit fix` (#1228) This should shut down the warnings on Github. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. Last NPM dependency audit happend in d576b2327e2bc117f912fe0a9d595e9ae62614e0 Co-authored-by: Alex Biehl <alex.biehl at target.com> - - - - - 7af6e2a8 by Ben Gamari at 2020-08-31T13:59:34-04:00 Merge pull request haskell/haddock#1226 from hsyl20/wip/hsyl20/fs_ord Remove Ord FastString instance - - - - - ffbc8702 by Alan Zimmerman at 2020-09-07T21:47:41+01:00 Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - a93f1268 by Alan Zimmerman at 2020-09-07T23:11:38+01:00 Merge pull request haskell/haddock#1232 from haskell/wip/T18639-remove-generated-pragma, Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - 1f605d50 by Ben Gamari at 2020-09-14T18:30:01-04:00 Bump GHC version to 9.1 - - - - - 6599df62 by Vladislav Zavialov at 2020-09-18T14:05:15+03:00 Bump base upper bound to 4.16 - - - - - a01b3c43 by Ben Gamari at 2020-09-22T15:41:48-04:00 Update hypsrc-test for QuickLook This appears to be a spurious change. - - - - - e9cc6cac by Vladislav Zavialov at 2020-09-26T21:00:12+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 30e3ca7c by Sylvain Henry at 2020-09-29T11:18:32-04:00 Update for parser (#1234) - - - - - b172f3e3 by Vladislav Zavialov at 2020-09-30T01:01:30+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 0b9c08d3 by Sylvain Henry at 2020-09-30T11:02:33+02:00 Adapt to GHC parser changes - - - - - b9540b7a by Sylvain Henry at 2020-10-12T09:13:38-04:00 Don't pass the HomeUnitId (#1239) - - - - - 34762e80 by HaskellMouse at 2020-10-13T12:58:04+03:00 Changed tests due to unification of `Nat` and `Natural` in the follwing merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583 - - - - - 256f86b6 by Vladislav Zavialov at 2020-10-15T10:48:03+03:00 Add whitespace in: map ($ v) - - - - - 4a3f711b by Alan Zimmerman at 2020-10-19T08:57:27+01:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled - - - - - 072cdd21 by Alan Zimmerman at 2020-10-21T14:48:28-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 9e09a445 by Alan Zimmerman at 2020-10-21T23:53:34-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 636d7de3 by Sylvain Henry at 2020-10-26T14:31:54-04:00 GHC.Driver.Types refactoring (#1242) - - - - - a597f000 by Ryan Scott at 2020-10-29T04:18:05-04:00 Adapt to the removal of Hs{Boxed,Constraint}Tuple See ghc/ghc!4097 and GHC#18723. - - - - - b96660fb by Ryan Scott at 2020-10-30T04:53:05-04:00 Adapt to HsConDecl{H98,GADT}Details split Needed for GHC#18844. - - - - - c287d82c by Ryan Scott at 2020-10-30T19:35:59-04:00 Adapt to HsOuterTyVarBndrs These changes accompany ghc/ghc!4107, which aims to be a fix for haskell/haddock#16762. - - - - - a34c31a1 by Ryan Scott at 2020-11-13T13:38:34-05:00 Adapt to splitPiTysInvisible being renamed to splitInvisPiTys This is a part of !4434, a fix for GHC#18939. - - - - - 66ea459d by Sylvain Henry at 2020-11-16T10:59:30+01:00 Fix after Plugins moved into HscEnv - - - - - 508556d8 by Ben Gamari at 2020-11-18T15:47:40-05:00 Merge pull request haskell/haddock#1253 from hsyl20/wip/hsyl20/plugins/hscenv Fix after Plugins moved into HscEnv - - - - - 620fec1a by Andreas Klebinger at 2020-11-24T20:51:59+01:00 Update for changes in GHC's Pretty - - - - - 01cc13ab by Richard Eisenberg at 2020-11-25T23:18:35-05:00 Avoid GHC#18932. - - - - - 8d29ba21 by Cale Gibbard at 2020-11-25T23:18:35-05:00 Add type arguments to PrefixCon - - - - - 414d5f87 by Sylvain Henry at 2020-11-30T17:06:04+01:00 DynFlags's unit fields moved to HscEnv - - - - - e356668c by Ben Gamari at 2020-11-30T11:11:37-05:00 Merge pull request haskell/haddock#1258 from hsyl20/wip/hsyl20/hscenv/unitstate Unit fields moved from DynFlags to HscEnv - - - - - 7cf552f1 by Ben Gamari at 2020-12-03T10:31:27-05:00 Merge pull request haskell/haddock#1257 from AndreasPK/wip/andreask/opt_dumps Update for changes in GHC's Pretty - - - - - fc0871c3 by Veronika Romashkina at 2020-12-08T16:35:33+01:00 Fix docs links from Darcs to GitHub in intro (#1262) - - - - - 7059e808 by Veronika Romashkina at 2020-12-08T16:36:16+01:00 Use gender neutral word in docs (#1260) - - - - - 1b16e5ee by Maximilian Tagher at 2020-12-08T16:40:03+01:00 Allow scrolling search results (#1235) Closes https://github.com/haskell/haddock/issues/1231 - - - - - 8a118c01 by dependabot[bot] at 2020-12-08T16:40:25+01:00 Bump bl from 1.2.2 to 1.2.3 in /haddock-api/resources/html (#1255) Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - c89ff587 by Xia Li-yao at 2020-12-08T16:42:17+01:00 Allow more characters in anchor following module reference (#1220) - - - - - 14af7d64 by Xia Li-yao at 2020-12-08T16:43:05+01:00 Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243) * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt at mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem at users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard at tweag.io> Co-authored-by: Pepe Iborra <pepeiborra at gmail.com> - - - - - 89e3af13 by tomjaguarpaw at 2020-12-08T18:00:04+01:00 Enable two warnings (#1245) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - c3320f8d by Willem Van Onsem at 2020-12-08T18:26:55+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 685df308 by Alex Biehl at 2020-12-08T20:06:26+01:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - be3ec3c0 by Alex Biehl at 2020-12-08T20:06:26+01:00 Import intercalate - - - - - 32c33912 by Matthías Páll Gissurarson at 2020-12-08T21:15:30+01:00 Adapt Haddock for QualifiedDo - - - - - 31696088 by Alex Biehl at 2020-12-08T22:06:02+01:00 Fix haddock-library tests - - - - - fbc0998a by Alex Biehl at 2020-12-08T23:08:23+01:00 Move to GitHub CI (#1266) * Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell at v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up - - - - - 5b946b9a by tomjaguarpaw at 2020-12-10T19:01:41+01:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - bc5a408f by dependabot[bot] at 2020-12-10T19:02:16+01:00 Bump ini from 1.3.5 to 1.3.7 in /haddock-api/resources/html (#1269) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - d02995f1 by Andrew Martin at 2020-12-14T16:48:40-05:00 Update for boxed rep - - - - - a381aeff by Ben Gamari at 2020-12-15T15:13:30-05:00 Revert "Enable two warnings (#1245) (#1268)" As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce. - - - - - a63c0a9e by Ben Gamari at 2020-12-15T15:17:59-05:00 Revert "Update for boxed rep" This reverts commit 4ffb30d8b637ccebecc81ce610f0af451ac8088d. - - - - - 53bfbb29 by Ben Gamari at 2020-12-15T15:37:24-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - bae76a30 by Ben Gamari at 2020-12-16T02:44:42+00:00 Update output for nullary TyConApp optimisation (ghc/ghc!2952) - - - - - 4b733b57 by Krzysztof Gogolewski at 2020-12-16T20:03:14+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. - - - - - ee463bd3 by Ryan Scott at 2020-12-16T16:55:23-05:00 Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonym Needed for !4417, the fix for GHC#15706 and GHC#18914. - - - - - ed0b02f8 by tomjaguarpaw at 2020-12-19T10:17:19+00:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - d80bf8f5 by Sylvain Henry at 2020-12-21T10:09:25+01:00 Fix after binder collect changes - - - - - bf4c9d32 by Adam Gundry at 2020-12-23T21:35:01+00:00 Adapt to changes to GlobalRdrElt and AvailInfo Needed for ghc/ghc!4467 - - - - - 37736c4c by John Ericson at 2020-12-28T12:27:02-05:00 Support a new ghc --make node type for parallel backpack upsweep - - - - - 717bdeac by Vladislav Zavialov at 2020-12-29T10:50:02+03:00 Inline and fix getGADTConTypeG The getGADTConTypeG used HsRecTy, which is at odds with GHC issue haskell/haddock#18782. I noticed that getGADTConTypeG was only used in the Hoogle backend. Interestingly, when handling H98 constructors, Hoogle converts RecCon to PrefixCon (see Haddock.Backends.Hoogle.ppCtor). So I changed getGADTConTypeG to handle RecConGADT in the same manner as PrefixConGADT, and after this simplification moved it into the 'where' clause of ppCtor, to the only place where it is used. The practical effect of this change is as follows. Consider this example: data TestH98 = T98 { bar::Int } data TestGADT where TG :: { foo :: Int } -> TestGADT Before this patch, haddock --hoogle used to produce: T98 :: Int -> TestH98 [TG] :: {foo :: Int} -> TestGADT Notice how the record syntax was discarded in T98 but not TG. With this patch, we always produce signatures without record syntax: T98 :: Int -> TestH98 [TG] :: Int -> TestGADT I suspect this might also be a bugfix, as currently Hoogle doesn't seem to render GADT record constructors properly. - - - - - cb1b8c56 by Andreas Abel at 2020-12-30T21:12:37+01:00 Build instructions: haddock-library and -api first! - - - - - b947f6ad by Ben Gamari at 2020-12-31T13:04:19-05:00 Merge pull request haskell/haddock#1281 from obsidiansystems/wip/backpack-j Changes to support -j with backpack - - - - - 120e1cfd by Hécate Moonlight at 2021-01-04T19:54:58+01:00 Merge pull request haskell/haddock#1282 from andreasabel/master Build instructions: haddock-library and -api first! - - - - - fd45e41a by Ben Gamari at 2021-01-05T16:14:31-05:00 Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0 - - - - - b471bdec by Ben Gamari at 2021-01-05T16:23:02-05:00 Merge commit '1e56f63c3197e7ca1c1e506e083c2bad25d08793' into ghc-9.0 - - - - - 81cdbc41 by Alex Biehl at 2021-01-09T12:14:41+01:00 Prepare Haddock for being a GHC Plugin - - - - - b646d952 by Alex Biehl at 2021-01-09T12:14:41+01:00 Make Haddock a GHC Plugin - - - - - cc044674 by Alex Biehl at 2021-01-09T12:14:41+01:00 Add -j[n] CLI param to Haddock executable It translates to `--ghcopt=-j[n]` - - - - - 84a04073 by Alex Biehl at 2021-01-09T12:14:41+01:00 Abstract Monad for interface creation I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName. - - - - - 5be2c4f7 by Alex Biehl at 2021-01-09T12:14:41+01:00 Accept tests - - - - - 8cefee9d by Alex Biehl at 2021-01-09T16:10:47+01:00 Add missing dependency for mtl - - - - - 3681f919 by Ben Gamari at 2021-01-13T18:39:25-05:00 Merge remote-tracking branch 'origin/ghc-9.0' into ghc-head - - - - - 33c6b152 by Hécate Moonlight at 2021-01-14T16:04:20+01:00 Merge pull request haskell/haddock#1273 from hsyl20/wip/hsyl20/arrows Fix after binder collect changes - - - - - 70d13e8e by Joachim Breitner at 2021-01-22T19:03:45+01:00 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) - - - - - 7d6dd57a by John Ericson at 2021-01-22T22:02:02+00:00 Add `NoGhcTc` instance now that it's not closed - - - - - e5fdaf0a by Alan Zimmerman at 2021-01-23T22:57:44+00:00 Merge pull request haskell/haddock#1293 from obsidiansystems/wip/fix-18936 Add `NoGhcTc` instance now that it's not closed - - - - - 989a1e05 by Oleg Grenrus at 2021-01-24T16:11:46+03:00 Add import list to Data.List - - - - - 368e144a by Ben Gamari at 2021-01-28T22:15:48+01:00 Adapt to "Make PatSyn immutable" - - - - - abe66c21 by Alfredo Di Napoli at 2021-02-01T08:05:35+01:00 Rename pprLogErrMsg to new name - - - - - e600e75c by Hécate Moonlight at 2021-02-05T14:53:00+01:00 Move CI to ghc-9.0 - - - - - dd492961 by Vladislav Zavialov at 2021-02-05T14:53:00+01:00 Update cabal.project and README build instructions - - - - - 31bd292a by Hécate Moonlight at 2021-02-05T15:03:56+01:00 Merge pull request haskell/haddock#1296 from Kleidukos/ghc-9.0 Merge the late additions to ghc-8.10 into ghc-9.0 - - - - - 6388989e by Vladislav Zavialov at 2021-02-05T17:41:57+03:00 Cleanup: fix build warnings - - - - - f99407ef by Daniel Rogozin at 2021-02-05T18:11:48+03:00 type level characters support for haddock (required for haskell/haddock#11342) - - - - - d8c6b26f by Hécate Moonlight at 2021-02-05T17:44:50+01:00 Add a CONTRIBUTING.md file - - - - - 6a01ad98 by Hécate Moonlight at 2021-02-05T17:58:16+01:00 Merge pull request haskell/haddock#1312 from Kleidukos/proper-branch-etiquette Add a CONTRIBUTING.md file - - - - - 955eecc4 by Vladislav Zavialov at 2021-02-05T20:29:00+03:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into ghc-head - - - - - 47b3d6ab by Hécate Moonlight at 2021-02-05T19:09:38+01:00 Amend the CONTRIBUTING.md file - - - - - 23de6137 by Hécate Moonlight at 2021-02-05T19:16:49+01:00 Merge pull request haskell/haddock#1313 from Kleidukos/amend-contributing Amend the CONTRIBUTING.md file - - - - - 69026b59 by Krzysztof Gogolewski at 2021-02-05T23:05:56+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb) - - - - - ea026b78 by Oleg Grenrus at 2021-02-06T17:14:45+01:00 Add import list to Data.List - - - - - 5204326f by Hécate Moonlight at 2021-02-06T17:15:44+01:00 Merge pull request haskell/haddock#1316 from Kleidukos/explicit-imports-to-data-list Add import list to Data.List - - - - - 1f4d2136 by Ben Gamari at 2021-02-06T11:53:31-05:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge - - - - - 13f0d09a by Ben Gamari at 2021-02-06T11:53:45-05:00 Fix partial record selector warning - - - - - 5c115f7e by Ben Gamari at 2021-02-06T11:55:52-05:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into wip/ghc-head-merge - - - - - b6fd8b75 by Ben Gamari at 2021-02-06T12:01:31-05:00 Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-merge - - - - - a967194c by Ben Gamari at 2021-02-06T18:30:35-05:00 Merge branch 'wip/ghc-head-merge' into ghc-head - - - - - 1f4c3a91 by MorrowM at 2021-02-07T01:52:33+02:00 Fix search div not scrolling - - - - - 684b1287 by Iñaki García Etxebarria at 2021-02-07T16:13:04+01:00 Add support for labeled module references Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label". - - - - - bdb55a5d by Hécate Moonlight at 2021-02-07T16:18:10+01:00 Merge pull request haskell/haddock#1319 from alexbiehl/alex/compat Backward compat: Add support for labeled module references - - - - - 6ca70991 by Hécate Moonlight at 2021-02-07T16:21:29+01:00 Merge pull request haskell/haddock#1314 from tweag/show-linear-backport Backport haskell/haddock#1238 (linear types) to ghc-9.0 - - - - - d9d73298 by Alex Biehl at 2021-02-07T17:46:25+01:00 Remove dubious parseModLink Instead construct the ModLink value directly when parsing. - - - - - 33b4d020 by Hécate Moonlight at 2021-02-07T17:52:05+01:00 Merge pull request haskell/haddock#1320 from haskell/alex/fix Remove dubious parseModLink - - - - - 54211316 by Hécate Moonlight at 2021-02-07T18:12:07+01:00 Merge pull request haskell/haddock#1318 from MorrowM/ghc-9.0 Fix search div not scrolling - - - - - 19db679e by alexbiehl-gc at 2021-02-07T18:14:46+01:00 Merge pull request haskell/haddock#1317 from bgamari/wip/ghc-head-merge Merge ghc-8.10 into ghc-head - - - - - 6bc1e9e4 by Willem Van Onsem at 2021-02-07T18:25:30+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - c8537cf8 by alexbiehl-gc at 2021-02-07T18:30:40+01:00 Merge pull request haskell/haddock#1322 from haskell/alex/forward-port simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 2d47ae4e by alexbiehl-gc at 2021-02-07T18:39:59+01:00 Merge branch 'ghc-head' into ghc-9.0 - - - - - 849e4733 by Hécate Moonlight at 2021-02-07T18:43:19+01:00 Merge pull request haskell/haddock#1321 from Kleidukos/ghc-9.0 Merge ghc-9.0 into ghc-head - - - - - ee6095d7 by Sylvain Henry at 2021-02-08T11:36:38+01:00 Update for Logger - - - - - 4ad688c9 by Alex Biehl at 2021-02-08T18:11:24+01:00 Merge pull request haskell/haddock#1310 from hsyl20/wip/hsyl20/logger2 Logger refactoring - - - - - 922a9e0e by Ben Gamari at 2021-02-08T12:54:33-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - 991649d2 by Sylvain Henry at 2021-02-09T10:55:17+01:00 Fix to build with HEAD - - - - - a8348dc2 by Hécate Moonlight at 2021-02-09T10:58:51+01:00 Merge pull request haskell/haddock#1327 from hsyl20/wip/hsyl20/logger2 Fix to build with HEAD - - - - - 0abdbca6 by Fendor at 2021-02-09T20:06:15+01:00 Add UnitId to Target record - - - - - d5790a0e by Alex Biehl at 2021-02-11T10:32:32+01:00 Stable sort for (data/newtype) instances - - - - - 8e6036f5 by Alex Biehl at 2021-02-11T10:32:32+01:00 Also make TyLit deterministic - - - - - f76d2945 by Hécate Moonlight at 2021-02-11T11:00:31+01:00 Merge pull request haskell/haddock#1329 from hsyl20/hsyl20/stabe_iface Stable sort for instances - - - - - 5e0469ea by Oleg Grenrus at 2021-02-14T15:28:15+02:00 Add import list to Data.List in Haddock.Interface.Create - - - - - fa57cd24 by Hécate Moonlight at 2021-02-14T17:19:27+01:00 Merge pull request haskell/haddock#1331 from phadej/more-explicit-data-list-imports Add import list to Data.List in Haddock.Interface.Create - - - - - f0cd629c by Hécate Moonlight at 2021-02-21T00:22:01+01:00 Merge pull request haskell/haddock#1311 from fendor/wip/add-targetUnitId-to-target Add UnitId to Target record - - - - - 674ef723 by Joachim Breitner at 2021-02-22T10:39:18+01:00 html-test: Always set language from ghc-9.2 on, the “default” langauge of GHC is expected to change more wildly. To prepare for that (and unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4853), this sets the language for all the test files to `Haskell2010`. This should insolate this test suite against changes to the default. Cherry-picked from https://github.com/haskell/haddock/pull/1341 - - - - - f072d623 by Hécate Moonlight at 2021-02-22T10:56:51+01:00 Merge pull request haskell/haddock#1342 from nomeata/joachim/haskell2010-in-tests-ghc-head html-test: Always set language - - - - - caebbfca by Hécate Moonlight at 2021-02-22T11:53:07+01:00 Clean-up of Interface and Interface.Create's imports and pragmata - - - - - f6caa89d by Hécate Moonlight at 2021-02-22T11:54:58+01:00 Merge pull request haskell/haddock#1345 from Kleidukos/head/fix-interface-imports [ghc-head] Clean-up of Interface and Interface.Create's imports and pragmata - - - - - 7395c9cb by Hécate Moonlight at 2021-02-22T18:44:57+01:00 Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 6e9fb5d5 by Hécate Moonlight at 2021-02-22T18:45:28+01:00 Merge pull request haskell/haddock#1348 from Kleidukos/head/explicit-imports-interface Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 9198b118 by Alan Zimmerman at 2021-02-22T20:04:24+00:00 Context becomes a Maybe in the GHC AST This prevents noLoc's appearing in the ParsedSource. Match the change in GHC. - - - - - 0af20f64 by Hécate Moonlight at 2021-02-23T12:36:12+01:00 Fix the call-site of guessTarget in Interface.hs Explicit the imports from GHC.HsToCore.Docs - - - - - b7886885 by Hécate Moonlight at 2021-02-23T12:37:54+01:00 Merge pull request haskell/haddock#1349 from Kleidukos/fix-interface-guesstarget-call Fix the call-site of guessTarget in Interface.hs - - - - - 9cf041ba by Sylvain Henry at 2021-02-24T11:08:20+01:00 Fix haddockHypsrcTest output in ghc-head - - - - - b194182a by Hécate Moonlight at 2021-02-24T11:12:36+01:00 Merge pull request haskell/haddock#1351 from hsyl20/wip/hsyl20/fix-head Fix haddockHypsrcTest output in ghc-head - - - - - 3ce8b375 by Shayne Fletcher at 2021-03-06T09:55:03-05:00 Add ITproj to parser - - - - - d2abf762 by Ben Gamari at 2021-03-06T19:26:49-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a0f6047d by Andrew Martin at 2021-03-07T11:25:23-05:00 Update for boxed rep - - - - - 6f63c99e by Ben Gamari at 2021-03-10T13:20:21-05:00 Update for "FastString: Use FastMutInt instead of IORef Int" - - - - - e13f01df by Luke Lau at 2021-03-10T15:38:40-05:00 Implement template-haskell's putDoc This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int - - - - - 89263d94 by Alan Zimmerman at 2021-03-15T17:15:26+00:00 Match changes in GHC AST for in-tree API Annotations As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418 - - - - - 28db1934 by Alan Zimmerman at 2021-03-15T20:40:09+00:00 Change some type family test results. It is not clear to me whether the original was printing incorrectly (since we did not have the TopLevel flag before now), or if this behaviour is expected. For the time being I am assuming the former. - - - - - 7c11c989 by Sylvain Henry at 2021-03-22T10:05:19+01:00 Fix after NameCache changes - - - - - addbde15 by Sylvain Henry at 2021-03-22T10:05:19+01:00 NameCache doesn't store a UniqSupply anymore - - - - - 15ec6cec by Ben Gamari at 2021-03-22T17:53:44-04:00 Bump GHC version to 9.2 - - - - - dbd6aa63 by Hécate Moonlight at 2021-03-24T14:28:36+01:00 Merge pull request haskell/haddock#1365 from hsyl20/wip/hsyl20/iface1 NameCache refactoring - - - - - 2d32da7e by Oleg Grenrus at 2021-03-27T01:12:00+02:00 Specialization of Data.List - - - - - 32b84fa6 by Fendor at 2021-03-27T10:50:17+01:00 Add UnitId to Target record This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time. - - - - - 54bf9f0e by Hécate Moonlight at 2021-03-28T14:08:35+02:00 Merge pull request haskell/haddock#1368 from fendor/target-unit-id-revert Add UnitId to Target record - - - - - 7dea168a by Alan Zimmerman at 2021-03-29T08:45:52+01:00 EPA : Rename ApiAnn to EpAnn - - - - - 72967f65 by Alfredo Di Napoli at 2021-03-29T09:47:01+02:00 pprError changed name in GHC - - - - - 4bc61035 by Alan Zimmerman at 2021-03-29T16:16:27-04:00 EPA : Rename ApiAnn to EpAnn - - - - - 108d031d by Ben Gamari at 2021-03-29T18:49:36-04:00 Merge commit '36418c4f70d7d2b179a77925b3ad5caedb08c9b5' into HEAD - - - - - 1444f700 by Ben Gamari at 2021-03-31T09:18:39-04:00 Merge pull request haskell/haddock#1370 from adinapoli/wip/adinapoli-diag-reason-severity Rename pprError to mkParserErr - - - - - d3087b79 by Ben Gamari at 2021-03-31T11:34:17-04:00 Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head - - - - - 170b79e9 by Ben Gamari at 2021-03-31T12:24:56-04:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - db0d6bae by Ben Gamari at 2021-04-10T09:34:35-04:00 Bump GHC version to 9.3 - - - - - a9f2c421 by Alan Zimmerman at 2021-04-19T18:26:46-04:00 Update for EPA changes in GHC (cherry picked from commit cafb48118f7c111020663776845897e225607b41) - - - - - 1ee4b7c7 by Sylvain Henry at 2021-05-11T10:00:06+02:00 Removal of HsVersions.h (#1388) * Update for EPA changes in GHC * Account for HsVersions.h removal Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 79e819e9 by Hécate Moonlight at 2021-05-11T10:14:47+02:00 Revert "Removal of HsVersions.h (#1388)" This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6. - - - - - 3dbd3f8b by Alan Zimmerman at 2021-05-11T10:15:17+02:00 Update for EPA changes in GHC - - - - - 2ce80c17 by Sylvain Henry at 2021-05-11T10:15:19+02:00 Account for HsVersions.h removal - - - - - 00e4c918 by Christiaan Baaij at 2021-05-13T08:21:56+02:00 Add Haddock support for the OPAQUE pragma (#1380) - - - - - 8f9049b2 by Hécate Moonlight at 2021-05-13T08:40:22+02:00 fixup! Use GHC 9.2 in CI runner - - - - - 27ddec38 by Alan Zimmerman at 2021-05-13T22:51:20+01:00 EPA: match changes from GHC T19834 - - - - - f8a1d714 by Felix Yan at 2021-05-14T17:10:04+02:00 Allow hspec 2.8 (#1389) All tests are passing. - - - - - df44453b by Divam Narula at 2021-05-20T15:42:42+02:00 Update ref, the variables got renamed. (#1391) This is due to ghc/ghc!5555 which caused a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used. - - - - - e46bfc87 by Alan Zimmerman at 2021-05-20T19:05:09+01:00 Remove Maybe from HsQualTy Match changes in GHC for haskell/haddock#19845 - - - - - 79bd7b62 by Shayne Fletcher at 2021-05-22T08:20:39+10:00 FieldOcc: rename extFieldOcc to foExt - - - - - 6ed68c74 by Ben Gamari at 2021-05-21T22:29:30-04:00 Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head - - - - - f9a02d34 by Alfredo Di Napoli at 2021-05-24T13:53:00+02:00 New Parser diagnostics interface - - - - - 392807d0 by Ben Gamari at 2021-05-24T09:57:40-04:00 Merge pull request haskell/haddock#1394 from adinapoli/wip/adinapoli-align-ps-messages Align Haddock to use the new Parser diagnostics interface - - - - - 33023cd8 by Ben Gamari at 2021-05-24T11:19:16-04:00 Revert "Add Haddock support for the OPAQUE pragma (#1380)" This reverts commit a1337c599ef7720b0482a25c55f11794112496dc. The GHC patch associated with this change is not yet ready to be merged. - - - - - 8c005af7 by Ben Simms at 2021-05-28T07:56:20+02:00 CI configuration for ghc-head (#1395) - - - - - 1e947612 by Hécate Moonlight at 2021-05-28T12:27:35+02:00 Use GHC 9.2 in CI runner (#1378) - - - - - e6fa10ab by CGenie at 2021-05-31T09:02:13+02:00 Add page about common errors (#1396) * Update index.rst Common errors page * Create common-errors.rst * Update common-errors.rst * Use GHC 9.2 in CI runner (#1378) * [haddock-api] remove .hspec-failures Co-authored-by: Hécate Moonlight <Kleidukos at users.noreply.github.com> - - - - - abc72a8d by Sylvain Henry at 2021-06-01T10:02:06+02:00 Adapt Haddock to Logger and Parser changes (#1399) - - - - - 91373656 by Zubin Duggal at 2021-06-01T20:45:10+02:00 Update haddockHypSrc tests since we now compute slighly more type info (#1397) - - - - - ed712822 by Marcin Szamotulski at 2021-06-02T08:54:33+02:00 Added myself to contributors - - - - - 49fdbcb7 by Marcin Szamotulski at 2021-06-02T08:57:24+02:00 Document multi component support - - - - - 9ddc8d7d by Hécate Moonlight at 2021-06-02T09:35:55+02:00 Merge pull request haskell/haddock#1379 from coot/coot/document-multi-component-support Document multi component support - - - - - 585b5c5e by Ben Simms at 2021-06-02T19:46:54+02:00 Update CONTRIBUTING.md (#1402) - - - - - 1df4a605 by Ben Simms at 2021-06-02T19:47:14+02:00 Update CONTRIBUTING.md (#1403) - - - - - 58ea43d2 by sheaf at 2021-06-02T22:09:06+02:00 Update Haddock Bug873 to account for renaming - - - - - c5d0ab23 by Vladislav Zavialov at 2021-06-10T13:35:42+03:00 HsToken in FunTy, RecConGADT - - - - - 1ae2f40c by Hécate Moonlight at 2021-06-11T11:19:09+02:00 Update the CI badges - - - - - 6fdc4de2 by Sylvain Henry at 2021-06-28T19:21:17+02:00 Fix mkParserOpts (#1411) - - - - - 18201670 by Alfredo Di Napoli at 2021-07-05T07:55:12+02:00 Rename getErrorMessages Lexer import This commit renames the Lexer import in `Hyperlinker.Parser` from `getErrorMessages` to `getPsErrorMessages` to eliminate the ambiguity with the `getErrorMessages` function defined in `GHC.Types.Error`. - - - - - 23173ca3 by Ben Gamari at 2021-07-07T11:31:44-04:00 Merge pull request haskell/haddock#1413 from adinapoli/wip/adinapoli-issue-19920 Rename getErrorMessages Lexer import - - - - - b3dc4ed8 by Alan Zimmerman at 2021-07-28T22:30:59+01:00 EPA: match changes from GHC T19834 (cherry picked from commit 2fec1b44e0ee7e263286709aa528b4ecb99ac6c2) - - - - - 5f177278 by Ben Gamari at 2021-08-06T01:17:37-04:00 Merge commit '2a966c8ca37' into HEAD - - - - - cdd81d08 by Marcin Szamotulski at 2021-08-08T17:19:06+02:00 coot/multiple packages (ghc-9.2) (#1418) - - - - - be0d71f1 by Marcin Szamotulski at 2021-08-16T08:46:03+02:00 coot/multiple package (ghc-head) (#1419) * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".". - - - - - 3b09dbdf by Hécate Moonlight at 2021-10-07T23:26:03+02:00 Update GHC 9.2 to latest pre-release in CI - - - - - 7ac55417 by Zubin Duggal at 2021-10-11T12:10:19+02:00 Enable Haddock tests in GHC windows CI (#1428) * testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC - - - - - 1cb81f25 by Andrew Lelechenko at 2021-10-12T15:23:19+02:00 haddock-library does not depend on bytestring or transformers (#1426) - - - - - a890b9aa by sheaf at 2021-10-15T22:19:42+02:00 update haddockHypsrcTest for GHC MR !6705 (#1430) - - - - - 42a55c6c by Sylvain Henry at 2021-10-15T22:20:10+02:00 Fix after PkgQual refactoring (#1429) - - - - - 91659238 by Alan Zimmerman at 2021-10-28T18:57:10+01:00 Update for changes in GHC for branch wip/az/no-srcspan-anno-instances - - - - - acf23e60 by Vladislav Zavialov at 2021-11-05T02:09:47+03:00 Do not use forall as an identifier See GHC ticket haskell/haddock#20609 - - - - - c565db0e by Krzysztof Gogolewski at 2021-11-27T02:42:35+01:00 Update after NoExtCon -> DataConCantHappen rename - - - - - b5f55590 by Artem Pelenitsyn at 2021-11-27T11:14:17+01:00 fix CI for 9.2 (#1436) - - - - - 25cd621e by Matthew Pickering at 2021-12-02T11:46:54+00:00 Update html-test for Data.List revert - - - - - 1d5ff85f by malteneuss at 2021-12-15T07:56:55+01:00 Add hint about inline link issue (#1444) - - - - - 791fde81 by Sylvain Henry at 2021-12-16T09:29:51+01:00 Bump ghc-head (#1445) * Update after NoExtCon -> DataConCantHappen rename * Update html-test for Data.List revert * Fix for new Plugins datatype Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 44236317 by Sylvain Henry at 2021-12-17T09:39:00+01:00 Fix for new Plugins datatype - - - - - 80ada0fa by Hécate Moonlight at 2021-12-17T17:28:48+01:00 Remove ghc-head workflow (#1446) Contributions of GHC glue code are now done on the GHC gitlab, not in the GitHub repo anymore. - - - - - 49e171cd by Matthew Pickering at 2021-12-28T09:47:09+00:00 Remove use of ExtendedModSummary - - - - - 0e91b5ea by askeblad at 2022-01-04T09:18:35+01:00 update URLs - - - - - 9f13c212 by Hécate Moonlight at 2022-02-25T10:19:46+01:00 Fix solver for GHC 9.2 - - - - - 386751a1 by Meng Weng Wong at 2022-02-25T19:19:11+01:00 IDoc link has bitrotted; replaced with web.archive.org cache. (#1454) - - - - - d877cbe6 by Hécate Moonlight at 2022-02-25T19:21:58+01:00 Fix haddock user guide (#1456) - - - - - cc47f036 by Andrew Lelechenko at 2022-03-04T17:29:36+01:00 Allow text-2.0 in haddock-library (#1459) - - - - - 7b3685a3 by malteneuss at 2022-03-07T19:27:24+01:00 Add multi-line style hint to style section (#1460) - - - - - c51088b8 by John Ericson at 2022-03-11T16:46:26+01:00 Fix CollectPass instance to match TTG refactor Companion to GHC !7614 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7614) - - - - - b882195b by Vladislav Zavialov at 2022-03-14T20:32:30+01:00 Link to (~) - - - - - 877349b8 by Christiaan Baaij at 2022-03-16T09:20:43+01:00 Add Haddock support for the OPAQUE pragma - - - - - 0ea22721 by askeblad at 2022-03-16T09:44:27+01:00 typos (#1464) - - - - - a6d13da1 by Matthew Pickering at 2022-03-22T13:41:17+00:00 Minimum changes needed for compilation with hi-haddock With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC. - - - - - e7ac9129 by Matthew Pickering at 2022-03-22T21:17:50+00:00 Update test output - - - - - 6d916214 by Matthew Pickering at 2022-03-24T15:06:26+00:00 Merge branch 'wip/opaque_pragma' into 'ghc-head' Add Haddock support for the OPAQUE pragma See merge request ghc/haddock!2 - - - - - 42208183 by Steve Hart at 2022-03-25T20:43:50+01:00 Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. - - - - - 9676fd79 by Steve Hart at 2022-03-25T21:33:34+01:00 Make links in Synopsis functional again (#1458) Commit e41c1cbe9f0476997eac7b4a3f17cbc6b2262faf added a call to e.preventDefault() when handling click events that reach a toggle element. This prevents the browser from following hyperlinks within the Synopsis section when they are clicked by a user. This commit restores functioning hyperlinks within the Synopsis section by removing the call to e.preventDefault(), as it does not appear to be necessary, and removing it increases the flexibility of the details-helper code. - - - - - d1edd637 by sheaf at 2022-04-01T12:02:02+02:00 Keep track of promotion ticks in HsOpTy Keeping track of promotion ticks in HsOpTy allows us to properly pretty-print promoted constructors such as lists. - - - - - 9dcb2dfc by Jakob Brünker at 2022-04-01T15:46:22+00:00 Add support for \cases See merge request ghc/ghc!7873 - - - - - b0412ee5 by askeblad at 2022-04-06T17:47:57+02:00 spelling errors (#1471) - - - - - 6b18829b by Vladislav Zavialov at 2022-04-06T18:53:58+02:00 Rename [] to List - - - - - 2d046691 by Vladislav Zavialov at 2022-04-07T20:25:54+03:00 HsToken ConDeclGADT con_dcolon - - - - - 90b43da4 by Steve Hart at 2022-04-12T13:29:46+02:00 Parse Markdown links at beginning of line within a paragraph (#1470) * Catch Markdown links at beginning of line within paragraph Per Issue haskell/haddock#774, Markdown links were being parsed as ordinary text when they occurred at the beginning of a line other than the first line of the paragraph. This occurred because the parser was not interpreting a left square bracket as a special character that could delimit special markup. A space character was considered a special character, so, if a space occurred at the beginning of the new line, then the parser would interpret the space by itself and then continue parsing, thereby catching the Markdown link. '\n' was not treated as a special character, so the parser did not catch a Markdown link that may have followed. Note that this will allow for Markdown links that are not surrounded by spaces. For example, the following text includes a Markdown link that will be parsed: Hello, world[label](url) This is consistent with how the parser handles other types of markup. * Remove obsolete documentation hint Commit 6b9aeafddf20efc65d3725c16e3fc43a20aac343 should eliminate the need for the workaround suggested in the documentation. - - - - - 5b08312d by Hécate Moonlight at 2022-04-12T13:36:38+02:00 Force ghc-9.2 in the cabal.project - - - - - 0d0ea349 by dependabot[bot] at 2022-04-12T13:57:41+02:00 Bump path-parse from 1.0.5 to 1.0.7 in /haddock-api/resources/html (#1469) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 2b9fc65e by dependabot[bot] at 2022-04-12T13:57:54+02:00 Bump copy-props from 2.0.4 to 2.0.5 in /haddock-api/resources/html (#1468) Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - ea98a6fb by Ben Gamari at 2022-04-23T22:54:37-04:00 Update for GHC 9.4 - - - - - 9e11864f by Ben Gamari at 2022-04-25T16:24:31-04:00 Merge remote-tracking branch 'upstream/ghc-9.2' into ghc-head - - - - - f83cc506 by Ben Gamari at 2022-04-25T17:00:25-04:00 Bump ghc version to 9.5 - - - - - e01c2e7d by Ben Gamari at 2022-04-28T16:19:04-04:00 Revert "Bump ghc-head (#1445)" This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2. This should not have been merged. - - - - - a2b5ee8c by Ben Gamari at 2022-04-28T16:19:24-04:00 Merge commit '2627a86c' into ghc-head - - - - - 0c6fe4f9 by Ben Gamari at 2022-04-29T10:05:54-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-9.4 - - - - - b6e5cb0a by Ben Gamari at 2022-04-29T11:46:06-04:00 Revert "HsToken ConDeclGADT con_dcolon" This reverts commit 24208496649a02d5f87373052c430ea4a97842c5. - - - - - 15a62888 by Ben Gamari at 2022-04-29T15:12:55-04:00 Bump base upper bound - - - - - 165b9031 by Ben Gamari at 2022-04-29T23:58:38-04:00 Update test output - - - - - e0c3e5da by Phil de Joux at 2022-05-02T14:46:38+02:00 Add hlint action .hlint.yaml with ignores & CPP. (#1475) - - - - - ead1158d by Raphael Das Gupta at 2022-05-02T14:46:48+02:00 fix grammar in docs: "can the" → "can be" (#1477) - - - - - cff97944 by Ben Gamari at 2022-05-02T18:38:56-04:00 Allow base-4.17 - - - - - e4ecb201 by Phil de Joux at 2022-05-03T13:14:55+02:00 Remove unused imports that GHC warned about. (#1480) - - - - - 222890b1 by Phil de Joux at 2022-05-03T13:15:46+02:00 Follow hlint suggestion to remove redundant bang. (#1479) - - - - - 058b671f by Phil de Joux at 2022-05-03T13:34:04+02:00 Follow hlint, remove language pragmas in libs. (#1478) - - - - - 0a645049 by Ben Simms at 2022-05-03T14:19:24+02:00 Keep track of ordered list indexes and render them (#1407) * Keep track of ordered list indexes and render them * Rename some identifiers to clarify - - - - - f0433304 by Norman Ramsey at 2022-05-04T15:13:34-04:00 update for changes in GHC API - - - - - 3740cf71 by Emily Martins at 2022-05-06T18:23:48+02:00 Add link to the readthedocs in cabal description to show on hackage. (cherry picked from commit 52e2d40d47295c02d3181aac0c53028e730f1e3b) - - - - - 5d754f1e by Hécate Moonlight at 2022-05-06T18:44:57+02:00 remove Bug873 - - - - - 968fc267 by Hécate Moonlight at 2022-05-06T18:48:28+02:00 Ignore "Use second" HLint suggestion. It increases laziness. - - - - - 02d14e97 by Jade Lovelace at 2022-05-07T17:42:08+02:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` - - - - - b22b87ed by Artem Pelenitsyn at 2022-05-08T16:19:47+02:00 fix parsing trailing quotes in backticked identifiers (#1408) (#1483) - - - - - 80ae107b by Alex Biehl at 2022-05-08T16:37:16+02:00 Fix "Defined by not used" error (cherry picked from commit 6e02a620a26c3a44f98675dd1b93b08070c36c0a) - - - - - 4c838e84 by Hécate Moonlight at 2022-05-08T16:37:16+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - fc9827b4 by Hécate Moonlight at 2022-05-08T16:40:40+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - b153b555 by Xia Li-yao at 2022-05-20T17:52:42+02:00 Hide synopsis from search when hidden (#1486) Fix haskell/haddock#1451 - - - - - f3e38b85 by Marcin Szamotulski at 2022-05-21T23:32:31+02:00 Allow to hide interfaces when rendering multiple components (#1487) This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package. - - - - - f942863b by Marcin Szamotulski at 2022-05-24T08:29:59+02:00 Check if doc-index.json exists before reading it (#1488) - - - - - 31e92982 by Marcin Szamotulski at 2022-05-25T16:22:13+02:00 Version bump 2.26.1 (#1489) * Version bump 2.26.1 We extended format accepted by `--read-interface` option, which requires updating the minor version. * Update documentation of --read-interface option - - - - - 7cc873e0 by sheaf at 2022-05-25T16:42:31+02:00 Updated HaddockHypsrcTest output for record update changes (MR !7981) - - - - - cd196942 by Marcin Szamotulski at 2022-05-25T20:28:47+02:00 Use visibility to decide which interfaces are included in quickjump (#1490) This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision. - - - - - 00c713c5 by Hécate Moonlight at 2022-05-26T17:09:15+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 2f3039f1 by Hécate Moonlight at 2022-05-26T17:10:59+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 63a5650c by romes at 2022-05-31T12:43:22+01:00 TTG: Match new GHC AST - - - - - dd7d1617 by romes at 2022-06-02T16:11:00+01:00 Update for IE changes in !8228 - - - - - c23aaab7 by cydparser at 2022-06-06T08:48:14+02:00 Fix and improve CI (#1495) * Pin GHC version before creating the freeze file * Use newest action versions * Improve caching * Avoid unnecessarily reinstalling GHC * Use GHC 9.2.2 for CI Co-authored-by: Cyd Wise <cwise at tripshot.com> - - - - - c156fa77 by Hécate Moonlight at 2022-06-06T11:59:35+02:00 Add Mergify configuration (#1496) - - - - - 2dba4188 by Hécate Moonlight at 2022-06-06T16:12:50+02:00 Bump haddock's version in cabal file to 2.26.1 (#1497) - - - - - d7d4b8b9 by Marcin Szamotulski at 2022-06-07T06:09:40+00:00 Render module tree per package in the content page (#1492) * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version. - - - - - 77765665 by Mike Pilgrem at 2022-06-12T21:57:19+01:00 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - b0e079b0 by mergify[bot] at 2022-06-13T11:49:37+00:00 Merge pull request haskell/haddock#1108 from mpilgrem/fix783 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - 6c0292b1 by Hécate Moonlight at 2022-06-21T17:21:08+02:00 Update the contribution guide - - - - - e413b9fa by dependabot[bot] at 2022-06-21T23:38:19+02:00 Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 29d0ef70 by romes at 2022-07-06T11:29:39+02:00 TTG: AST Updates for !8308 - - - - - 1bae7c87 by Alan Zimmerman at 2022-07-06T22:50:43+01:00 Match GHC changes for T21805 This brings in a newtype for FieldLabelString - - - - - 6fe8b988 by Phil de Joux at 2022-07-16T20:54:26+00:00 Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. - - - - - 48fb43af by Phil de Joux at 2022-07-19T09:32:55+02:00 Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. - - - - - c1cf1fa7 by Phil de Joux at 2022-07-24T13:45:59+02:00 Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. - - - - - 74777eb2 by Jade Lovelace at 2022-07-29T11:02:41+01:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` (cherry picked from commit ab53ccf089ea703b767581ac14be0f6c78a7678a) - - - - - faa4cfcf by Hécate Moonlight at 2022-07-29T20:31:20+02:00 Merge pull request haskell/haddock#1516 from duog/9-4-backport-fix-hyperlinks Backport 9-4: Fix hyperlinks to external items and modules (#1482) - - - - - 5d2450f3 by Ben Gamari at 2022-08-05T17:41:15-04:00 Merge remote-tracking branch 'origin/ghc-9.4' - - - - - 63954f73 by Ben Gamari at 2022-08-05T19:08:36-04:00 Clean up build and testsuite for GHC 9.4 - - - - - d4568cb8 by Hécate Moonlight at 2022-08-05T19:10:49-04:00 Bump the versions - - - - - 505583a4 by Ben Gamari at 2022-08-06T13:58:27-04:00 Merge pull request haskell/haddock#1518 from bgamari/wip/ghc-9.4-merge Merge GHC 9.4 into `main` - - - - - 5706f6a4 by Ben Gamari at 2022-08-06T22:57:21-04:00 html-test: Testsuite changes for GHC 9.4.1 - - - - - 5f2a45a2 by Ben Gamari at 2022-08-15T14:33:05-04:00 doc: Fix a few minor ReST issues Sphinx was complaining about too-short title underlines. - - - - - 220e6410 by Ben Gamari at 2022-08-15T14:41:24-04:00 Merge branch 'main' into ghc-head - - - - - fbeb1b02 by Ben Gamari at 2022-08-15T14:45:16-04:00 Updates for GHC 9.5 - - - - - eee562eb by Vladislav Zavialov at 2022-08-15T14:46:13-04:00 HsToken ConDeclGADT con_dcolon - - - - - c5f073db by Ben Gamari at 2022-08-15T16:55:35-04:00 Updates for GHC 9.5 - - - - - 3f7ab242 by Vladislav Zavialov at 2022-08-15T16:55:35-04:00 HsToken ConDeclGADT con_dcolon - - - - - a18e473d by Ben Gamari at 2022-08-16T08:35:19-04:00 Merge branch 'wip/ghc-head-bump' into ghc-head - - - - - af0ff3a4 by M Farkas-Dyck at 2022-09-15T21:16:05+00:00 Disuse `mapLoc`. - - - - - a748fc38 by Matthew Farkas-Dyck at 2022-09-17T10:44:18+00:00 Scrub partiality about `NewOrData`. - - - - - 2758fb6c by John Ericson at 2022-09-18T03:27:37+02:00 Test output changed because of change to `base` Spooky, but I guess that is intended? - - - - - a7eec128 by Torsten Schmits at 2022-09-21T11:06:55+02:00 update tests for the move of tuples to GHC.Tuple.Prim - - - - - 461e7b9d by Ross Paterson at 2022-09-24T22:01:25+00:00 match implementation of GHC proposal haskell/haddock#106 (Define Kinds Without Promotion) - - - - - f7fd77ef by sheaf at 2022-10-17T14:53:01+02:00 Update Haddock for GHC MR !8563 (configuration of diagnostics) - - - - - 3d3e85ab by Vladislav Zavialov at 2022-10-22T23:04:06+03:00 Class layout info - - - - - cbde4cb0 by Simon Peyton Jones at 2022-10-25T23:19:18+01:00 Adapt to Constraint-vs-Type See haskell/haddock#21623 and !8750 - - - - - 7108ba96 by Tom Smeding at 2022-11-01T22:33:23+01:00 Remove outdated footnote about module re-exports The footnote is invalid with GHC 9.2.4 (and possibly earlier): the described behaviour in the main text works fine. - - - - - 206c6bc7 by Hécate Moonlight at 2022-11-01T23:00:46+01:00 Merge pull request haskell/haddock#1534 from tomsmeding/patch-1 - - - - - a57b4c4b by Andrew Lelechenko at 2022-11-21T00:39:52+00:00 Support mtl-2.3 - - - - - e9d62453 by Simon Peyton Jones at 2022-11-25T13:49:12+01:00 Track small API change in TyCon.hs - - - - - eb1c73f7 by Ben Gamari at 2022-12-07T08:46:21-05:00 Update for GhC 9.6 - - - - - 063268dd by Ben Gamari at 2022-12-07T11:26:32-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 4ca722fe by Ben Gamari at 2022-12-08T14:43:26-05:00 Bump bounds to accomodate base-4.18 - - - - - 340b7511 by Vladislav Zavialov at 2022-12-10T12:31:28+00:00 HsToken in HsAppKindTy - - - - - 946226ec by Ben Gamari at 2022-12-13T20:12:56-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - fd8faa66 by Ben Gamari at 2022-12-22T13:44:28-05:00 Bump GHC version to 9.7 - - - - - 2958aa9c by Ben Gamari at 2022-12-22T14:49:16-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 9e0fefd8 by Andrei Borzenkov at 2023-01-30T14:02:04+04:00 Rename () to Unit, Rename (,,...,,) to Tuple<n> - - - - - eb3968b5 by Ben Gamari at 2023-03-10T02:32:43-05:00 Bump versions for ghc-9.6 release - - - - - 4aeead36 by Adam Gundry at 2023-03-23T13:53:47+01:00 Adapt to warning categories changes - - - - - 642d8d60 by sheaf at 2023-03-29T13:35:56+02:00 Adapt to record field refactor This commit adapts to the changes in GHC MR !8686, which overhauls the treatment of record fields in the renamer, adding separate record field namespaces and entirely removing the GreName datatype. - - - - - ac8d4333 by doyougnu at 2023-03-29T11:11:44-04:00 Update UniqMap API - - - - - 7866fc86 by Ben Orchard at 2023-04-20T11:29:33+02:00 update classify with new tokens - - - - - ffcdd683 by Finley McIlwaine at 2023-04-24T09:36:18-06:00 Remove index-state - - - - - 05b70982 by Finley McIlwaine at 2023-04-26T08:16:31-06:00 `renameInterface` space leak fixes - Change logic for accumulation of names for which link warnings will be generated - Change handling of `--ignore-link-symbol` to allow qualified and unqualified names. Added to CHANGES.md - Some formatting changes and comments here and there - - - - - e5697d7c by Finley McIlwaine at 2023-04-27T18:46:36-06:00 Messy things - ghc-debug dependency and instrumentation - cabal.project custom with-compiler - hie.yaml files - traces and such - - - - - 0b8ef80b by Finley McIlwaine at 2023-05-02T18:08:52-06:00 Stop retaining GRE closures GRE closures should never be necessary to Haddock, so we never want to keep them on the heap. Despite that, they are retained by a lot of the data structures that Haddock makes use of. - Attempt to fix that situation by adding strictness to various computations and pruning the `ifaceInstances` field of `Interface` to a much thinner data type. - Removes the `ifaceFamInstances` field, as it was never used. - Move some of the attach instances types (e.g. `SimpleType`) to the types module - - - - - 8bda991b by Finley McIlwaine at 2023-05-08T16:07:51-06:00 Memory usage fixes - Refactor `ifaceDeclMap` to drastically reduce memory footprint. We no longer store all declarations associated with a given name, since we only cared to determine if the only declaration associated with a name was a value declaration. Change the `DeclMap` type to better reflect this. - Drop pre-renaming export items after the renaming step. Since the Hoogle backend used the pre-renamed export items, this isn't trivial. We now generate Hoogle output for exported declarations during the renaming step (if Hoogle output /should/ be generated), and store that with the renamed export item. - Slightly refactor Hoogle backend to handle the above change and allow for early generation of Hoogle output. - Remove the `ifaceRnDocMap` and `ifaceRnArgMap` fields of the `Interface` type, as they were never used. - Remove some unnecessary strictness - Remove a lot of dead code from `Syb` module - - - - - 1611ac0c by Finley McIlwaine at 2023-05-09T11:51:57-06:00 Unify ErrMsgM and IfM - Delete ErrMsgM, stop accumulating warnings in a writer - Make IfM a state monad, print warnings directly to stdout, move IfM type into types module - Drop ErrMsg = String synonym - Unset IORefs from plugin after they are read, preventing unnecessary retention of interfaces - - - - - 42d696ab by Finley McIlwaine at 2023-05-11T15:52:07-06:00 Thunk leak fixes The strictness introduced in this commit was motivated by observing thunk leaks in the eventlog2html output. - Refactor attach instances list comprehension to avoid large intermediate thunks - Refactor some HTML backend list comprehensions to avoid large intermediate thunks - Avoid thunks accumulating in documentation types or documentation parser - A lot of orphan NFData instances to allow us to force documentation values - - - - - 68561cf6 by Finley McIlwaine at 2023-05-11T17:02:10-06:00 Remove GHC debug dep - - - - - 10519e3d by Finley McIlwaine at 2023-05-15T12:40:48-06:00 Force HIE file path Removes a potential retainer of `ModSummary`s - - - - - 1e4a6ec6 by Finley McIlwaine at 2023-05-15T14:20:34-06:00 Re-add index-state, with-compiler, delete hie.yamls - - - - - a2363fe9 by Hécate Moonlight at 2023-05-15T22:45:16+02:00 Merge pull request haskell/haddock#1594 from FinleyMcIlwaine/finley/ghc-9.6-mem-fixes Reduce memory usage - - - - - e8a78383 by Finley McIlwaine at 2023-05-17T12:19:16-06:00 Merge branch ghc-9.6 into ghc-head - - - - - 22e25581 by Finley McIlwaine at 2023-05-17T12:20:23-06:00 Merge branch 'ghc-head' of gitlab.haskell.org:ghc/haddock into ghc-head - - - - - 41bbf0df by Bartłomiej Cieślar at 2023-05-24T08:57:58+02:00 changes to the WarningTxt cases Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - c686ba9b by Hécate Moonlight at 2023-06-01T14:03:02-06:00 Port the remains of Hi-Haddock - - - - - 9d8a85fd by Hécate Moonlight at 2023-06-01T14:03:06-06:00 Stdout for tests - - - - - 36331d07 by Finley McIlwaine at 2023-06-01T14:06:02-06:00 Formatting, organize imports - - - - - a06059b1 by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix empty context confusion in Convert module - - - - - 379346ae by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix associated type families in Hoogle output - - - - - fc6ea7ed by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix test refs Accept several changes in Hoogle tests: Pretty printing logic no longer prints the `(Proxy (Proxy (...))` chain in Bug806 with parentheses. Since this test was only meant to verify that line breaks do not occur, accept the change. `tyThingToLHsDecl` is called for class and data declarations, which ends up "synifying" the type variables and giving unlifted types kind signatures. As a result, type variables of kind `Type -> Type` are now printed with kind signatures in Hoogle output. This could be changed by manually drop kind signatures from class variables in the Hoogle backend if the behavior is deemed unacceptable. Sometimes subordinate declarations are exported separate from their parent declarations (e.g. record selectors). In this case, a type signature is cobbled together for the export item in `extractDecl`. Since this type signature is very manually constructed, it may lack kind signatures of decls constructed from `tyThingToLHsDecl`. An example of this is the `type-sigs` Hoogle test. Change `*` to `Type` in Hoogle test refs. I don't think this will break Hoogle behavior, since it appears to not consider type signatures in search. I have not fully verified this. - - - - - e14b7e58 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix LaTeX backend test refs Changes to GHC pretty printing code have resulted in some differences to Haddock's LaTeX output. - Type variables are printed explicitly quantified in the LinearTypes test - Wildcard types in type family equations are now printed numbered, e.g. _1 _2, in the TypeFamilies3 test - Combined signatures in DefaultSignatures test are now documented as separate signatures - - - - - 41b5b296 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and test source updates - Stop using kind `*` in html test sources - Add TypeOperators where necessary to avoid warnings and future errors - Rename some test modules to match their module names - - - - - c640e2a2 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix missing deprecation warnings on record fields `lookupOccEnv` was used to resolve `OccNames` with warnings attached, but it doesn't look in the record field namespace. Thus, if a record field had a warning attached, it would not resolve and the warning map would not include it. This commit fixes by using `lookupOccEnv_WithFields` instead. - - - - - fad0c462 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and some comments - - - - - 751fd023 by Finley McIlwaine at 2023-06-01T14:11:41-06:00 Accept HTML test diffs All diffs now boil down to the expected differences resulting from declarations being reified from TyThings in hi-haddock. Surface syntax now has much less control over the syntax used in the documentation. - - - - - d835c845 by Finley McIlwaine at 2023-06-01T14:11:45-06:00 Adapt to new load' type - - - - - dcf776c4 by Finley McIlwaine at 2023-06-01T14:13:13-06:00 Update mkWarningMap and moduleWarning - - - - - 8e8432fd by Finley McIlwaine at 2023-06-01T14:28:54-06:00 Revert load' changes - - - - - aeb2982c by Finley McIlwaine at 2023-06-01T14:40:24-06:00 Accept change to Instances test in html-test Link to Data.Tuple instead of GHC.Tuple.Prim - - - - - 8adfdbac by Finley McIlwaine at 2023-06-01T15:53:17-06:00 Reset ghc dep to ^>= 9.6 - - - - - 2b1ce93d by Finley McIlwaine at 2023-06-06T07:50:04-06:00 Update CHANGES.md, user guide, recomp avoidance * Add --trace-args flag for tracing arguments received to standard output * Avoid recompiling due to changes in optimization flags * Update users guide and changes.md - - - - - f3da6676 by Finley McIlwaine at 2023-06-06T14:12:56-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - bf36c467 by Matthew Pickering at 2023-06-07T10:16:09+01:00 Revert back to e16e20d592a6f5d9ed1af17b77fafd6495242345 Neither of these MRs are ready to land yet which causes issues with other MRs which are ready to land and need haddock changes. - - - - - 421510a9 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 atSign has no unicode variant Prior to this change, atSign was defined as follows: atSign unicode = text (if unicode then "@" else "@") Yes, this is the same symbol '\64' and not your font playing tricks on you. Now we define: atSign = char '@' Both the LaTeX and the Xhtml backend are updated accordingly. - - - - - 3785c276 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 LaTeX: fix printing of type variable bindings Consider this type signature: kindOf :: forall {k} (a :: k). Proxy a -> Proxy k Prior to this fix, the LaTeX backend rendered it like this: kindOf :: forall k a. Proxy a -> Proxy k Now we preserve explicit specificity and kind annotations. - - - - - 0febf3a8 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 Add support for invisible binders in type declarations - - - - - 13e33bb3 by Finley McIlwaine at 2023-06-08T07:51:59-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - 3e5340ce by Finley McIlwaine at 2023-06-08T07:54:27-06:00 Add note about stubdir to recompilation docs - - - - - db7e84dc by Finley at 2023-06-08T08:11:03-06:00 Merge pull request haskell/haddock#1597 from haskell/finley/hi-haddock-9.6 hi-haddock for ghc 9.6 - - - - - 4e085d17 by Finley McIlwaine at 2023-06-14T13:41:06-06:00 Replace SYB traversals - - - - - 7b39aec5 by Finley McIlwaine at 2023-06-14T14:20:17-06:00 Test ref accepts, remove unused HaddockClsInst - - - - - df9c2090 by Finley McIlwaine at 2023-06-15T08:02:51-06:00 Use batchMsg for progress reporting during load With hi-haddock as is, there is an awkward silence during the load operation. This commit makes haddock use the default `batchMsg` Messager for progress reporting, and makes the default GHC verbosity level 1, so the user can see what GHC is doing. - - - - - f23679a8 by Hécate Moonlight at 2023-06-15T20:31:53+02:00 Merge pull request haskell/haddock#1600 from haskell/finley/hi-haddock-optim - - - - - a7982192 by Finley McIlwaine at 2023-06-15T15:02:16-06:00 hi-haddock squashed - - - - - c34f0c8d by Finley McIlwaine at 2023-06-15T16:22:03-06:00 Merge remote-tracking branch 'origin/ghc-9.6' into finley/hi-haddock-squashed - - - - - 40452797 by Bartłomiej Cieślar at 2023-06-16T12:26:04+02:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - e58673bf by Ben Gamari at 2023-06-16T09:33:35-04:00 Bump GHC version to 9.8 - - - - - 74bdf972 by Ben Gamari at 2023-06-16T09:36:18-04:00 Merge commit 'fcaaad06770a26d35d4aafd65772dedadf17669c' into ghc-head - - - - - 418ee3dc by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Remove NFData SourceText, IfaceWarnings updates The NFData SourceText instance is now available in GHC Handle mod_iface mi_warns now being IfaceWarnings - - - - - 62f31380 by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Accept Instances.hs test output Due to ghc!10469. - - - - - a8f2fc0e by Ben Gamari at 2023-06-20T15:48:08-04:00 Test fixes for "Fix associated data family doc structure items" Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - cb1ac33e by Bartłomiej Cieślar at 2023-06-21T12:56:02-04:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 9933e10b by Ben Gamari at 2023-06-21T12:56:02-04:00 Bump GHC version to 9.8 - - - - - fe8c18b6 by Ben Gamari at 2023-06-21T15:36:29-04:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - c61a0d5b by Ben Gamari at 2023-06-21T16:10:51-04:00 Bump GHC version to 9.9 - - - - - 0c2a756e by sheaf at 2023-07-07T13:45:12+02:00 Avoid incomplete record update in Haddock Hoogle This commit avoids running into an incomplete record update warning in the Hoogle backend of Haddock. This was only noticed now, because incomplete record updates were broken in GHC 9.6. Now that they are fixed, we have to avoid running into them! - - - - - f9b952a7 by Ben Gamari at 2023-07-21T11:58:05-04:00 Bump base bound to <4.20 For GHC 9.8. - - - - - 1b27e151 by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Check for puns (see ghc#23368) - - - - - 457341fd by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Remove fake exports for (~), List, and Tuple<n> The old reasoning no longer applies, nowadays those names can be mentioned in export lists. - - - - - bf3dcddf by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Fix pretty-printing of Solo and MkSolo - - - - - 495b2241 by Matthew Pickering at 2023-09-01T13:02:07+02:00 Fix issue with duplicate reexported definitions (T23616) When a class method was reexported, it's default methods were also showing up in the generated html page. The simplest and most non-invasive fix is to not look for the default method if we are just exporting the class method.. because the backends are just showing default methods when the whole class is exported. In general it would be worthwhile to rewrite this bit of code I think as the logic and what gets included is split over `lookupDocs` and `availExportDecl` it would be clearer to combine the two. The result of lookupDocs is always just passed to availExportDecl so it seems simpler and more obvious to just write the function directly. - - - - - 6551824d by Finley McIlwaine at 2023-09-05T13:06:57-07:00 Remove fake export of `FUN` from Prelude This prevents `data FUN` from being shown at the top of the Prelude docs. Fixes \#23920 on GHC. - - - - - 9ab5a448 by Alan Zimmerman at 2023-09-08T18:26:53+01:00 Match changes in wip/az/T23885-unicode-funtycon - - - - - 4d08364e by Alan Zimmerman at 2023-10-31T19:46:45+00:00 EPA: match changes in GHC - EPA: Comments in AnchorOperation - EPA: Remove EpaEofComment - - - - - e7da0d25 by Alan Zimmerman at 2023-11-05T11:20:31+00:00 EPA: match changes in GHC, l2l cleanup - - - - - 4ceac14d by Alan Zimmerman at 2023-11-11T15:16:41+00:00 EPA: Replace Anchor with EpaLocation Match GHC - - - - - 94fb8d47 by Alan Zimmerman at 2023-11-29T18:10:26+00:00 Match GHC, No comments in EpaDelta for comments - - - - - 32d208e1 by Vladislav Zavialov at 2023-12-12T20:41:36+03:00 EPA: Match changes to LHsToken removal - - - - - eebdd316 by Apoorv Ingle at 2024-01-23T13:49:12+00:00 Changes for haskell/haddock#18324 - - - - - ae856a82 by Matthew Pickering at 2024-02-05T12:22:39+00:00 ghc-internals fallout - - - - - f8429266 by Jade at 2024-02-08T14:56:50+01:00 Adjust test for ghc MR !10993 - - - - - 6d1e2386 by Alan Zimmerman at 2024-02-13T22:00:28+03:00 EPA: Match changes to HsParTy and HsFunTy - - - - - 9c588f19 by Fendor at 2024-02-14T11:05:36+01:00 Adapt to GHC giving better Name's for linking - - - - - 778e1db3 by Andrei Borzenkov at 2024-02-16T16:12:07+03:00 Namespace specifiers for fixity signatures - - - - - 826c5b47 by Torsten Schmits at 2024-02-21T13:17:05+01:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 2cff14d5 by Ben Gamari at 2024-02-22T09:35:56-05:00 Bump bounds - - - - - f49376b3 by Ben Gamari at 2024-02-22T09:35:56-05:00 Allow `@since` annotations in export lists Here we extend Haddock to admit `@since` annotations in export lists. These can be attached to most export list items (although not subordinate lists). These annotations supercede the declaration's `@since` annotation in produced Haddocks. - - - - - b5aa93df by Ben Gamari at 2024-02-22T12:09:06-05:00 Allow package-qualified @since declarations - - - - - 8f5957f2 by Ben Gamari at 2024-02-22T13:55:19-05:00 Documentation changes from ghc-internal restructuring Previously many declarations (e.g. `Int`) were declared to have a "home" in `Prelude`. However, now Haddock instead chooses to put these in more specific homes (e.g. `Data.Int`). Given that the "home" decision is driven by heuristics and in general these changes seem quite reasonable I am accepting them: * `Int` moved from `Prelude` to `Data.Int` * `(~)` moved from `Prelude` to `Data.Type.Equality` * `Type` moved from `GHC.Types` to `Data.Kind` * `Maybe` moved from `Prelude` to `Data.Maybe` * `Bool` moved from `Prelude` to `Data.Bool` * `Ordering` moved from `Prelude` to `Data.Ord` As well, more identifiers are now hyperlinked; it's not immediately clear *why*, but it is an improvement nevertheless. - - - - - ec33fec3 by Ben Gamari at 2024-02-22T20:36:24-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 30cfd251 by Torsten Schmits at 2024-02-24T13:00:42-05:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 732db81d by Ben Gamari at 2024-02-24T19:12:18-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 86bf7010 by Ben Gamari at 2024-02-27T19:28:10-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 4b6e76b5 by Patrick at 2024-03-07T22:09:30+08:00 fix haskell/haddock#24493, with module name introduced in hieAst The accompanies haddoc PR with GHC PR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12153 Two things have been done: 1. Link is introduced to every `X` in `module X where`, since we introduce the module name to HieAst, 2. `{-# LINE 4 "hypsrc-test/src/PositionPragmas.hs" #-}` is added before the `module PositionPragmas where` in ` hypsrc-test/ref/src/PositionPragmas.html `.It ensures only a single hieAst for file `hypsrc-test/src/PositionPragmas.hs` is generated. - - - - - 635abccc by Ben Gamari at 2024-03-08T17:09:06-05:00 Bump ghc version to 9.10 - - - - - 5b934048 by Ben Gamari at 2024-03-08T18:50:12-05:00 Bump base upper bound - - - - - b30d134e by Ben Gamari at 2024-03-08T18:50:44-05:00 Testsuite output update - - - - - 9bdf3586 by Ben Gamari at 2024-03-09T21:37:44-05:00 Merge branch 'ghc-9.10' into ghc-head - - - - - cec76981 by Ben Gamari at 2024-03-09T21:54:00-05:00 Bump GHC version to 9.11 - - - - - 4c59feb7 by Ben Gamari at 2024-03-09T22:15:01-05:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 810660b7 by Cheng Shao at 2024-03-25T22:19:16-04:00 libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6 This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which includes numerous upstream libffi fixes, especially https://github.com/libffi/libffi/issues/760. - - - - - d2ba41e8 by Alan Zimmerman at 2024-03-25T22:19:51-04:00 EPA: do not duplicate comments in signature RHS - - - - - 32a8103f by Rodrigo Mesquita at 2024-03-26T21:16:12-04:00 configure: Use LDFLAGS when trying linkers A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to check for a working linker. If either of these fail, we try the next in line. However, we were not considering the `$LDFLAGS` when checking if these linkers worked. So we would pick a linker that does not support the current $LDFLAGS and fail further down the line when we used that linker with those flags. Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not supported by `ld.gold` but that was being picked still. - - - - - bf65a7c3 by Rodrigo Mesquita at 2024-03-26T21:16:48-04:00 bindist: Clean xattrs of bin and lib at configure time For issue #21506, we started cleaning the extended attributes of binaries and libraries from the bindist *after* they were installed to workaround notarisation (#17418), as part of `make install`. However, the `ghc-toolchain` binary that is now shipped with the bindist must be run at `./configure` time. Since we only cleaned the xattributes of the binaries and libs after they were installed, in some situations users would be unable to run `ghc-toolchain` from the bindist, failing at configure time (#24554). In this commit we move the xattr cleaning logic to the configure script. Fixes #24554 - - - - - cfeb70d3 by Rodrigo Mesquita at 2024-03-26T21:17:24-04:00 Revert "NCG: Fix a bug in jump shortcutting." This reverts commit 5bd8ed53dcefe10b72acb5729789e19ceb22df66. Fixes #24586 - - - - - 13223f6d by Serge S. Gulin at 2024-03-27T07:28:51-04:00 JS: `h$rts_isProfiled` is removed from `profiling` and left its version at `rts/js/config.js` - - - - - 0acfe391 by Alan Zimmerman at 2024-03-27T07:29:27-04:00 EPA: Do not extend declaration range for trailine zero len semi The lexer inserts virtual semicolons having zero width. Do not use them to extend the list span of items in a list. - - - - - cd0fb82f by Alan Zimmerman at 2024-03-27T19:33:08+00:00 EPA: Fix FamDecl range The span was incorrect if opt_datafam_kind_sig was empty - - - - - f8f384a8 by Ben Gamari at 2024-03-29T01:23:03-04:00 Fix type of _get_osfhandle foreign import Fixes #24601. - - - - - 00d3ecf0 by Alan Zimmerman at 2024-03-29T12:19:10+00:00 EPA: Extend StringLiteral range to include trailing commas This goes slightly against the exact printing philosophy where trailing decorations should be in an annotation, but the practicalities of adding it to the WarningTxt environment, and the problems caused by deviating do not make a more principles approach worthwhile. - - - - - efab3649 by brandon s allbery kf8nh at 2024-03-31T20:04:01-04:00 clarify Note [Preproccesing invocations] - - - - - c8a4c050 by Ben Gamari at 2024-04-02T12:50:35-04:00 rts: Fix TSAN_ENABLED CPP guard This should be `#if defined(TSAN_ENABLED)`, not `#if TSAN_ENABLED`, lest we suffer warnings. - - - - - e91dad93 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix errors when compiling with TSAN This commit fixes rts compilation errors when compiling with TSAN: - xxx_FENCE macros are redefined and trigger CPP warnings. - Use SIZEOF_W. WORD_SIZE_IN_BITS is provided by MachDeps.h which Cmm.h doesn't include by default. - - - - - a9ab9455 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix clang-specific errors when compiling with TSAN This commit fixes clang-specific rts compilation errors when compiling with TSAN: - clang doesn't have -Wtsan flag - Fix prototype of ghc_tsan_* helper functions - __tsan_atomic_* functions aren't clang built-ins and sanitizer/tsan_interface_atomic.h needs to be included - On macOS, TSAN runtime library is libclang_rt.tsan_osx_dynamic.dylib, not libtsan. -fsanitize-thread as a link-time flag will take care of linking the TSAN runtime library anyway so remove tsan as an rts extra library - - - - - 865bd717 by Cheng Shao at 2024-04-02T12:50:35-04:00 compiler: fix github link to __tsan_memory_order in a comment - - - - - 07cb627c by Cheng Shao at 2024-04-02T12:50:35-04:00 ci: improve TSAN CI jobs - Run TSAN jobs with +thread_sanitizer_cmm which enables Cmm instrumentation as well. - Run TSAN jobs in deb12 which ships gcc-12, a reasonably recent gcc that @bgamari confirms he's using in #GHC:matrix.org. Ideally we should be using latest clang release for latest improvements in sanitizers, though that's left as future work. - Mark TSAN jobs as manual+allow_failure in validate pipelines. The purpose is to demonstrate that we have indeed at least fixed building of TSAN mode in CI without blocking the patch to land, and once merged other people can begin playing with TSAN using their own dev setups and feature branches. - - - - - a1c18c7b by Andrei Borzenkov at 2024-04-02T12:51:11-04:00 Merge tc_infer_hs_type and tc_hs_type into one function using ExpType philosophy (#24299, #23639) This patch implements refactoring which is a prerequisite to updating kind checking of type patterns. This is a huge simplification of the main worker that checks kind of HsType. It also fixes the issues caused by previous code duplication, e.g. that we didn't add module finalizers from splices in inference mode. - - - - - 817e8936 by Rodrigo Mesquita at 2024-04-02T20:13:05-04:00 th: Hide the Language.Haskell.TH.Lib.Internal module from haddock Fixes #24562 - - - - - b36ee57b by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: reenable h$appendToHsString optimization (#24495) The optimization introducing h$appendToHsString wasn't kicking in anymore (while it did in 9.8.1) because of the changes introduced in #23270 (7e0c8b3bab30). This patch reenables the optimization by matching on case-expression, as done in Cmm for unpackCString# standard thunks. The test is also T24495 added in the next commits (two commits for ease of backporting to 9.8). - - - - - 527616e9 by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: fix h$appendToHsString implementation (#24495) h$appendToHsString needs to wrap its argument in an updatable thunk to behave like unpackAppendCString#. Otherwise if a SingleEntry thunk is passed, it is stored as-is in a CONS cell, making the resulting list impossible to deepseq (forcing the thunk doesn't update the contents of the CONS cell)! The added test checks that the optimization kicks in and that h$appendToHsString works as intended. Fix #24495 - - - - - faa30b41 by Simon Peyton Jones at 2024-04-02T20:14:22-04:00 Deal with duplicate tyvars in type declarations GHC was outright crashing before this fix: #24604 - - - - - e0b0c717 by Simon Peyton Jones at 2024-04-02T20:14:58-04:00 Try using MCoercion in exprIsConApp_maybe This is just a simple refactor that makes exprIsConApp_maybe a little bit more direct, simple, and efficient. Metrics: compile_time/bytes allocated geo. mean -0.1% minimum -2.0% maximum -0.0% Not a big gain, but worthwhile given that the code is, if anything, easier to grok. - - - - - 15f4d867 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Initial ./configure support for selecting I/O managers In this patch we just define new CPP vars, but don't yet use them or replace the existing approach. That will follow. The intention here is that every I/O manager can be enabled/disabled at GHC build time (subject to some constraints). More than one I/O manager can be enabled to be built. At least one I/O manager supporting the non-threaded RTS must be enabled as well as at least one supporting the non-threaded RTS. The I/O managers enabled here will become the choices available at runtime at RTS startup (in later patches). The choice can be made with RTS flags. There are separate sets of choices for the threaded and non-threaded RTS ways, because most I/O managers are specific to these ways. Furthermore we must establish a default I/O manager for the threaded and non-threaded RTS. Most I/O managers are platform-specific so there are checks to ensure each one can be enabled on the platform. Such checks are also where (in future) any system dependencies (e.g. libraries) can be checked. The output is a set of CPP flags (in the mk/config.h file), with one flag per named I/O manager: * IOMGR_BUILD_<name> : which ones should be built (some) * IOMGR_DEFAULT_NON_THREADED_<name> : which one is default (exactly one) * IOMGR_DEFAULT_THREADED_<name> : which one is default (exactly one) and a set of derived flags in IOManager.h * IOMGR_ENABLED_<name> : enabled for the current RTS way Note that IOMGR_BUILD_<name> just says that an I/O manager will be built for _some_ RTS way (i.e. threaded or non-threaded). The derived flags IOMGR_ENABLED_<name> in IOManager.h say if each I/O manager is enabled in the "current" RTS way. These are the ones that can be used for conditional compilation of the I/O manager code. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - 85b0f87a by Duncan Coutts at 2024-04-03T01:27:17-04:00 Change the handling of the RTS flag --io-manager= Now instead of it being just used on Windows to select between the WinIO vs the MIO or Win32-legacy I/O managers, it is now used on all platforms for selecting the I/O manager to use. Right now it remains the case that there is only an actual choice on Windows, but that will change later. Document the --io-manager flag in the user guide. This change is also reflected in the RTS flags types in the base library. Deprecate the export of IoSubSystem from GHC.RTS.Flags with a message to import it from GHC.IO.Subsystem. The way the 'IoSubSystem' is detected also changes. Instead of looking at the RTS flag, there is now a C bool global var in the RTS which gets set on startup when the I/O manager is selected. This bool var says whether the selected I/O manager classifies as "native" on Windows, which in practice means the WinIO I/O manager has been selected. Similarly, the is_io_mng_native_p RTS helper function is re-implemented in terms of the selected I/O manager, rather than based on the RTS flags. We do however remove the ./configure --native-io-manager flag because we're bringing the WinIO/MIO/Win32-legacy choice under the new general scheme for selecting I/O managers, and that new scheme involves no ./configure time user choices, just runtime RTS flag choices. - - - - - 1a8f020f by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert {init,stop,exit}IOManager to switch style Rather than ad-hoc cpp conitionals on THREADED_RTS and mingw32_HOST_OS, we use a style where we switch on the I/O manager impl, with cases for each I/O manager impl. - - - - - a5bad3d2 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Split up the CapIOManager content by I/O manager Using the new IOMGR_ENABLED_<name> CPP defines. - - - - - 1d36e609 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert initIOManagerAfterFork and wakeupIOManager to switch style - - - - - c2f26f36 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of waitRead#/Write# from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. - - - - - 457705a8 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of the delay# impl from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. Uses a new IOManager API: syncDelay, following the naming convention of sync* for thread-synchronous I/O & timer/delay operations. As part of porting from cmm to C, we maintain the rule that the why_blocked gets accessed using load acquire and store release atomic memory operations. There was one exception to this rule: in the delay# primop cmm code on posix (not win32), the why_blocked was being updated using a store relaxed, not a store release. I've no idea why. In this convesion I'm playing it safe here and using store release consistently. - - - - - e93058e0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 insertIntoSleepingQueue is no longer public No longer defined in IOManager.h, just a private function in IOManager.c. Since it is no longer called from cmm code, just from syncDelay. It ought to get moved further into the select() I/O manager impl, rather than living in IOManager.c. On the other hand appendToIOBlockedQueue is still called from cmm code in the win32-legacy I/O manager primops async{Read,Write}#, and it is also used by the select() I/O manager. Update the CPP and comments to reflect this. - - - - - 60ce9910 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move anyPendingTimeoutsOrIO impl from .h to .c The implementation is eventually going to need to use more private things, which will drag in unwanted includes into IOManager.h, so it's better to move the impl out of the header file and into the .c file, at the slight cost of it no longer being inline. At the same time, change to the "switch (iomgr_type)" style. - - - - - f70b8108 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Take a simpler approach to gcc warnings in IOManager.c We have lots of functions with conditional implementations for different I/O managers. Some functions, for some I/O managers, naturally have implementations that do nothing or barf. When only one such I/O manager is enabled then the whole function implementation will have an implementation that does nothing or barfs. This then results in warnings from gcc that parameters are unused, or that the function should be marked with attribute noreturn (since barf does not return). The USED_IF_THREADS trick for fine-grained warning supression is fine for just two cases, but an equivalent here would need USED_IF_THE_ONLY_ENABLED_IOMGR_IS_X_OR_Y which would have combinitorial blowup. So we take a coarse grained approach and simply disable these two warnings for the whole file. So we use a GCC pragma, with its handy push/pop support: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" #pragma GCC diagnostic ignored "-Wunused-parameter" ... #pragma GCC diagnostic pop - - - - - b48805b9 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add a new trace class for the iomanager It makes sense now for it to be separate from the scheduler class of tracers. Enabled with +RTS -Do. Document the -Do debug flag in the user guide. - - - - - f0c1f862 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Have the throwTo impl go via (new) IOManager APIs rather than directly operating on the IO manager's data structures. Specifically, when thowing an async exception to a thread that is blocked waiting for I/O or waiting for a timer, then we want to cancel that I/O waiting or cancel the timer. Currently this is done directly in removeFromQueues() in RaiseAsync.c. We want it to go via proper APIs both for modularity but also to let us support multiple I/O managers. So add sync{IO,Delay}Cancel, which is the cancellation for the corresponding sync{IO,Delay}. The implementations of these use the usual "switch (iomgr_type)" style. - - - - - 4f9e9c4e by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move awaitEvent into a proper IOManager API and have the scheduler use it. Previously the scheduler calls awaitEvent directly, and awaitEvent is implemented directly in the RTS I/O managers (select, win32). This relies on the old scheme where there's a single active I/O manager for each platform and RTS way. We want to move that to go via an API in IOManager.{h,c} which can then call out to the active I/O manager. Also take the opportunity to split awaitEvent into two. The existing awaitEvent has a bool wait parameter, to say if the call should be blocking or non-blocking. We split this into two separate functions: pollCompletedTimeoutsOrIO and awaitCompletedTimeoutsOrIO. We split them for a few reasons: they have different post-conditions (specifically the await version is supposed to guarantee that there are threads runnable when it completes). Secondly, it is also anticipated that in future I/O managers the implementations of the two cases will be simpler if they are separated. - - - - - 5ad4b30f by Duncan Coutts at 2024-04-03T01:27:18-04:00 Rename awaitEvent in select and win32 I/O managers These are now just called from IOManager.c and are the per-I/O manager backend impls (whereas previously awaitEvent was the entry point). Follow the new naming convention in the IOManager.{h,c} of awaitCompletedTimeoutsOrIO, with the I/O manager's name as a suffix: so awaitCompletedTimeoutsOrIO{Select,Win32}. - - - - - d30c6bc6 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Tidy up a couple things in Select.{h,c} Use the standard #include {Begin,End}Private.h style rather than RTS_PRIVATE on individual decls. And conditionally build the code for the select I/O manager based on the new CPP IOMGR_ENABLED_SELECT rather than on THREADED_RTS. - - - - - 4161f516 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add an IOManager API for scavenging TSO blocked_info When the GC scavenges a TSO it needs to scavenge the tso->blocked_info but the blocked_info is a big union and what lives there depends on the two->why_blocked, which for I/O-related reasons is something that in principle is the responsibility of the I/O manager and not the GC. So the right thing to do is for the GC to ask the I/O manager to sscavenge the blocked_info if it encounters any I/O-related why_blocked reasons. So we add scavengeTSOIOManager in IOManager.{h,c} with the usual style. Now as it happens, right now, there is no special scavenging to do, so the implementation of scavengeTSOIOManager is a fancy no-op. That's because the select I/O manager uses only the fd and target members, which are not GC pointers, and the win32-legacy I/O manager _ought_ to be using GC-managed heap objects for the StgAsyncIOResult but it is actually usingthe C heap, so again no GC pointers. If the win32-legacy were doing this more sensibly, then scavengeTSOIOManager would be the right place to do the GC magic. Future I/O managers will need GC heap objects in the tso->blocked_info and will make use of this functionality. - - - - - 94a87d21 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add I/O manager API notifyIOManagerCapabilitiesChanged Used in setNumCapabilities. It only does anything for MIO on Posix. Previously it always invoked Haskell code, but that code only did anything on non-Windows (and non-JS), and only threaded. That currently effectively means the MIO I/O manager on Posix. So now it only invokes it for the MIO Posix case. - - - - - 3be6d591 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Select an I/O manager early in RTS startup We need to select the I/O manager to use during startup before the per-cap I/O manager initialisation. - - - - - aaa294d0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Make struct CapIOManager be fully opaque Provide an opaque (forward) definition in Capability.h (since the cap contains a *CapIOManager) and then only provide a full definition in a new file IOManagerInternals.h. This new file is only supposed to be included by the IOManager implementation, not by its users. So that means IOManager.c and individual I/O manager implementations. The posix/Signals.c still needs direct access, but that should be eliminated. Anything that needs direct access either needs to be clearly part of an I/O manager (e.g. the sleect() one) or go via a proper API. - - - - - 877a2a80 by Duncan Coutts at 2024-04-03T01:27:18-04:00 The select() I/O manager does have some global initialisation It's just to make sure an exception CAF is a GC root. - - - - - 9c51473b by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add tracing for the main I/O manager actions Using the new tracer class. Note: The unconditional definition of showIOManager should be compatible with the debugTrace change in 7c7d1f6. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - c7d3e3a3 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Include the default I/O manager in the +RTS --info output Document the extra +RTS --info output in the user guide - - - - - 8023bad4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 waitRead# / waitWrite# do not work for win32-legacy I/O manager Previously it was unclear that they did not work because the code path was shared with other I/O managers (in particular select()). Following the code carefully shows that what actually happens is that the calling thread would block forever: the thread will be put into the blocked queue, but no other action is scheduled that will ever result in it getting unblocked. It's better to just fail loudly in case anyone accidentally calls it, also it's less confusing code. - - - - - 83a74d20 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Conditionally ignore some GCC warnings Some GCC versions don't know about some warnings, and they complain that we're ignoring unknown warnings. So we try to ignore the warning based on the GCC version. - - - - - 1adc6fa4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept changes to base-exports All the changes are in fact not changes at all. Previously, the IoSubSystem data type was defined in GHC.RTS.Flags and exported from both GHC.RTS.Flags and GHC.IO.SubSystem. Now, the data type is defined in GHC.IO.SubSystem and still exported from both modules. Therefore, the same exports and same instances are still available from both modules. But the base-exports records only the defining module, and so it looks like a change when it is fully compatible. Related: we do add a deprecation to the export of the type via GHC.RTS.Flags, telling people to use the export from GHC.IO.SubSystem. Also the sort order for some unrelated Show instances changed. No idea why. The same changes apply in the other versions, with a few more changes due to sort order weirdness. - - - - - 8d950968 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept metric decrease in T12227 I can't think of any good reason that anything in this MR should have changed the number of allocations, up or down. (Yes this is an empty commit.) Metric Decrease: T12227 - - - - - e869605e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Several improvements to the handling of coercions * Make `mkSymCo` and `mkInstCo` smarter Fixes #23642 * Fix return role of `SelCo` in the coercion optimiser. Fixes #23617 * Make the coercion optimiser `opt_trans_rule` work better for newtypes Fixes #23619 - - - - - 1efd0714 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 FloatOut: improve floating for join point See the new Note [Floating join point bindings]. * Completely get rid of the complicated join_ceiling nonsense, which I have never understood. * Do not float join points at all, except perhaps to top level. * Some refactoring around wantToFloat, to treat Rec and NonRec more uniformly - - - - - 9c00154d by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve eta-expansion through call stacks See Note [Eta expanding through CallStacks] in GHC.Core.Opt.Arity This is a one-line change, that fixes an inconsistency - || isCallStackPredTy ty + || isCallStackPredTy ty || isCallStackTy ty - - - - - 95a9a172 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Spelling, layout, pretty-printing only - - - - - bdf1660f by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve exprIsConApp_maybe a little Eliminate a redundant case at birth. This sometimes reduces Simplifier iterations. See Note [Case elim in exprIsConApp_maybe]. - - - - - 609cd32c by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Inline GHC.HsToCore.Pmc.Solver.Types.trvVarInfo When exploring compile-time regressions after meddling with the Simplifier, I discovered that GHC.HsToCore.Pmc.Solver.Types.trvVarInfo was very delicately balanced. It's a small, heavily used, overloaded function and it's important that it inlines. By a fluke it was before, but at various times in my journey it stopped doing so. So I just added an INLINE pragma to it; no sense in depending on a delicately-balanced fluke. - - - - - ae24c9bc by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Slight improvement in WorkWrap Ensure that WorkWrap preserves lambda binders, in case of join points. Sadly I have forgotten why I made this change (it was while I was doing a lot of meddling in the Simplifier, but * it does no harm, * it is slightly more efficient, and * presumably it made something better! Anyway I have kept it in a separate commit. - - - - - e9297181 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Use named record fields for the CastIt { ... } data constructor This is a pure refactor - - - - - b4581e23 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Remove a long-commented-out line Pure refactoring - - - - - e026bdf2 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Simplifier improvements This MR started as: allow the simplifer to do more in one pass, arising from places I could see the simplifier taking two iterations where one would do. But it turned into a larger project, because these changes unexpectedly made inlining blow up, especially join points in deeply-nested cases. The main changes are below. There are also many new or rewritten Notes. Avoiding simplifying repeatedly ~~~~~~~~~~~~~~~ See Note [Avoiding simplifying repeatedly] * The SimplEnv now has a seInlineDepth field, which says how deep in unfoldings we are. See Note [Inline depth] in Simplify.Env. Currently used only for the next point: avoiding repeatedly simplifying coercions. * Avoid repeatedly simplifying coercions. see Note [Avoid re-simplifying coercions] in Simplify.Iteration As you'll see from the Note, this makes use of the seInlineDepth. * Allow Simplify.Iteration.simplAuxBind to inline used-once things. This is another part of Note [Post-inline for single-use things], and is really good for reducing simplifier iterations in situations like case K e of { K x -> blah } wher x is used once in blah. * Make GHC.Core.SimpleOpt.exprIsConApp_maybe do some simple case elimination. Note [Case elim in exprIsConApp_maybe] * Improve the case-merge transformation: - Move the main code to `GHC.Core.Utils.mergeCaseAlts`, to join `filterAlts` and friends. See Note [Merge Nested Cases] in GHC.Core.Utils. - Add a new case for `tagToEnum#`; see wrinkle (MC3). - Add a new case to look through join points: see wrinkle (MC4) postInlineUnconditionally ~~~~~~~~~~~~~~~~~~~~~~~~~ * Allow Simplify.Utils.postInlineUnconditionally to inline variables that are used exactly once. See Note [Post-inline for single-use things]. * Do not postInlineUnconditionally join point, ever. Doing so does not reduce allocation, which is the main point, and with join points that are used a lot it can bloat code. See point (1) of Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration. * Do not postInlineUnconditionally a strict (demanded) binding. It will not allocate a thunk (it'll turn into a case instead) so again the main point of inlining it doesn't hold. Better to check per-call-site. * Improve occurrence analyis for bottoming function calls, to help postInlineUnconditionally. See Note [Bottoming function calls] in GHC.Core.Opt.OccurAnal Inlining generally ~~~~~~~~~~~~~~~~~~ * In GHC.Core.Opt.Simplify.Utils.interestingCallContext, use RhsCtxt NonRecursive (not BoringCtxt) for a plain-seq case. See Note [Seq is boring] Also, wrinkle (SB1), inline in that `seq` context only for INLINE functions (UnfWhen guidance). * In GHC.Core.Opt.Simplify.Utils.interestingArg, - return ValueArg for OtherCon [c1,c2, ...], but - return NonTrivArg for OtherCon [] This makes a function a little less likely to inline if all we know is that the argument is evaluated, but nothing else. * isConLikeUnfolding is no longer true for OtherCon {}. This propagates to exprIsConLike. Con-like-ness has /positive/ information. Join points ~~~~~~~~~~~ * Be very careful about inlining join points. See these two long Notes Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline * When making join points, don't do so if the join point is so small it will immediately be inlined; check uncondInlineJoin. * In GHC.Core.Opt.Simplify.Inline.tryUnfolding, improve the inlining heuristics for join points. In general we /do not/ want to inline join points /even if they are small/. See Note [Duplicating join points] GHC.Core.Opt.Simplify.Iteration. But sometimes we do: see Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline; and the new `isBetterUnfoldingThan` function. * Do not add an unfolding to a join point at birth. This is a tricky one and has a long Note [Do not add unfoldings to join points at birth] It shows up in two places - In `mkDupableAlt` do not add an inlining - (trickier) In `simplLetUnfolding` don't add an unfolding for a fresh join point I am not fully satisifed with this, but it works and is well documented. * In GHC.Core.Unfold.sizeExpr, make jumps small, so that we don't penalise having a non-inlined join point. Performance changes ~~~~~~~~~~~~~~~~~~~ * Binary sizes fall by around 2.6%, according to nofib. * Compile times improve slightly. Here are the figures over 1%. I investiate the biggest differnce in T18304. It's a very small module, just a few hundred nodes. The large percentage difffence is due to a single function that didn't quite inline before, and does now, making code size a bit bigger. I decided gains outweighed the losses. Metrics: compile_time/bytes allocated (changes over +/- 1%) ------------------------------------------------ CoOpt_Singletons(normal) -9.2% GOOD LargeRecord(normal) -23.5% GOOD MultiComponentModulesRecomp(normal) +1.2% MultiLayerModulesTH_OneShot(normal) +4.1% BAD PmSeriesS(normal) -3.8% PmSeriesV(normal) -1.5% T11195(normal) -1.3% T12227(normal) -20.4% GOOD T12545(normal) -3.2% T12707(normal) -2.1% GOOD T13253(normal) -1.2% T13253-spj(normal) +8.1% BAD T13386(normal) -3.1% GOOD T14766(normal) -2.6% GOOD T15164(normal) -1.4% T15304(normal) +1.2% T15630(normal) -8.2% T15630a(normal) NEW T15703(normal) -14.7% GOOD T16577(normal) -2.3% GOOD T17516(normal) -39.7% GOOD T18140(normal) +1.2% T18223(normal) -17.1% GOOD T18282(normal) -5.0% GOOD T18304(normal) +10.8% BAD T18923(normal) -2.9% GOOD T1969(normal) +1.0% T19695(normal) -1.5% T20049(normal) -12.7% GOOD T21839c(normal) -4.1% GOOD T3064(normal) -1.5% T3294(normal) +1.2% BAD T4801(normal) +1.2% T5030(normal) -15.2% GOOD T5321Fun(normal) -2.2% GOOD T6048(optasm) -16.8% GOOD T783(normal) -1.2% T8095(normal) -6.0% GOOD T9630(normal) -4.7% GOOD T9961(normal) +1.9% BAD WWRec(normal) -1.4% info_table_map_perf(normal) -1.3% parsing001(normal) +1.5% geo. mean -2.0% minimum -39.7% maximum +10.8% * Runtimes generally improve. In the testsuite perf/should_run gives: Metrics: runtime/bytes allocated ------------------------------------------ Conversions(normal) -0.3% T13536a(optasm) -41.7% GOOD T4830(normal) -0.1% haddock.Cabal(normal) -0.1% haddock.base(normal) -0.1% haddock.compiler(normal) -0.1% geo. mean -0.8% minimum -41.7% maximum +0.0% * For runtime, nofib is a better test. The news is mostly good. Here are the number more than +/- 0.1%: # bytes allocated ==========================++========== imaginary/digits-of-e1 || -14.40% imaginary/digits-of-e2 || -4.41% imaginary/paraffins || -0.17% imaginary/rfib || -0.15% imaginary/wheel-sieve2 || -0.10% real/compress || -0.47% real/fluid || -0.10% real/fulsom || +0.14% real/gamteb || -1.47% real/gg || -0.20% real/infer || +0.24% real/pic || -0.23% real/prolog || -0.36% real/scs || -0.46% real/smallpt || +4.03% shootout/k-nucleotide || -20.23% shootout/n-body || -0.42% shootout/spectral-norm || -0.13% spectral/boyer2 || -3.80% spectral/constraints || -0.27% spectral/hartel/ida || -0.82% spectral/mate || -20.34% spectral/para || +0.46% spectral/rewrite || +1.30% spectral/sphere || -0.14% ==========================++========== geom mean || -0.59% real/smallpt has a huge nest of local definitions, and I could not pin down a reason for a regression. But there are three big wins! Metric Decrease: CoOpt_Singletons LargeRecord T12227 T12707 T13386 T13536a T14766 T15703 T16577 T17516 T18223 T18282 T18923 T21839c T20049 T5321Fun T5030 T6048 T8095 T9630 T783 Metric Increase: MultiLayerModulesTH_OneShot T13253-spj T18304 T18698a T9961 T3294 - - - - - 27db3c5e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Testsuite message changes from simplifier improvements - - - - - 271a7812 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Account for bottoming functions in OccurAnal This fixes #24582, a small but long-standing bug - - - - - 0fde229f by Ben Gamari at 2024-04-04T07:04:58-04:00 testsuite: Introduce template-haskell-exports test - - - - - 0c4a9686 by Luite Stegeman at 2024-04-04T07:05:39-04:00 Update correct counter in bumpTickyAllocd - - - - - 5f085d3a by Fendor at 2024-04-04T14:47:33-04:00 Replace `SizedSeq` with `FlatBag` for flattened structure LinkedLists are notoriously memory ineffiecient when all we do is traversing a structure. As 'UnlinkedBCO' has been identified as a data structure that impacts the overall memory usage of GHCi sessions, we avoid linked lists and prefer flattened structure for storing. We introduce a new memory efficient representation of sequential elements that has special support for the cases: * Empty * Singleton * Tuple Elements This improves sharing in the 'Empty' case and avoids the overhead of 'Array' until its constant overhead is justified. - - - - - 82cfe10c by Fendor at 2024-04-04T14:47:33-04:00 Compact FlatBag array representation `Array` contains three additional `Word`'s we do not need in `FlatBag`. Move `FlatBag` to `SmallArray`. Expand the API of SmallArray by `sizeofSmallArray` and add common traversal functions, such as `mapSmallArray` and `foldMapSmallArray`. Additionally, allow users to force the elements of a `SmallArray` via `rnfSmallArray`. - - - - - 36a75b80 by Andrei Borzenkov at 2024-04-04T14:48:10-04:00 Change how invisible patterns represented in haskell syntax and TH AST (#24557) Before this patch: data ArgPat p = InvisPat (LHsType p) | VisPat (LPat p) With this patch: data Pat p = ... | InvisPat (LHsType p) ... And the same transformation in the TH land. The rest of the changes is just updating code to handle new AST and writing tests to check if it is possible to create invalid states using TH. Metric Increase: MultiLayerModulesTH_OneShot - - - - - 28009fbc by Matthew Pickering at 2024-04-04T14:48:46-04:00 Fix off by one error in seekBinNoExpand and seekBin - - - - - 9b9e031b by Ben Gamari at 2024-04-04T21:30:08-04:00 compiler: Allow more types in GHCForeignImportPrim For many, many years `GHCForeignImportPrim` has suffered from the rather restrictive limitation of not allowing any non-trivial types in arguments or results. This limitation was justified by the code generator allegely barfing in the presence of such types. However, this restriction appears to originate well before the NCG rewrite and the new NCG does not appear to have any trouble with such types (see the added `T24598` test). Lift this restriction. Fixes #24598. - - - - - 1324b862 by Alan Zimmerman at 2024-04-04T21:30:44-04:00 EPA: Use EpaLocation not SrcSpan in ForeignDecls This allows us to update them for makeDeltaAst in ghc-exactprint - - - - - 19883a23 by Alan Zimmerman at 2024-04-05T16:58:17-04:00 EPA: Use EpaLocation for RecFieldsDotDot So we can update it to a delta position in makeDeltaAst if needed. - - - - - e8724327 by Matthew Pickering at 2024-04-05T16:58:53-04:00 Remove accidentally committed test.hs - - - - - 88cb3e10 by Fendor at 2024-04-08T09:03:34-04:00 Avoid UArray when indexing is not required `UnlinkedBCO`'s can occur many times in the heap. Each `UnlinkedBCO` references two `UArray`'s but never indexes them. They are only needed to encode the elements into a `ByteArray#`. The three words for the lower bound, upper bound and number of elements are essentially unused, thus we replace `UArray` with a wrapper around `ByteArray#`. This saves us up to three words for each `UnlinkedBCO`. Further, to avoid re-allocating these words for `ResolvedBCO`, we repeat the procedure for `ResolvedBCO` and add custom `Binary` and `Show` instances. For example, agda's repl session has around 360_000 UnlinkedBCO's, so avoiding these three words is already saving us around 8MB residency. - - - - - f2cc1107 by Fendor at 2024-04-08T09:04:11-04:00 Never UNPACK `FastMutInt` for counting z-encoded `FastString`s In `FastStringTable`, we count the number of z-encoded FastStrings that exist in a GHC session. We used to UNPACK the counters to not waste memory, but live retainer analysis showed that we allocate a lot of `FastMutInt`s, retained by `mkFastZString`. We lazily compute the `FastZString`, only incrementing the counter when the `FastZString` is forced. The function `mkFastStringWith` calls `mkZFastString` and boxes the `FastMutInt`, leading to the following core: mkFastStringWith = \ mk_fs _ -> = case stringTable of { FastStringTable _ n_zencs segments# _ -> ... case ((mk_fs (I# ...) (FastMutInt n_zencs)) `cast` <Co:2> :: ...) ... Marking this field as `NOUNPACK` avoids this reboxing, eliminating the allocation of a fresh `FastMutInt` on every `FastString` allocation. - - - - - c6def949 by Matthew Pickering at 2024-04-08T16:06:51-04:00 Force in_multi to avoid retaining entire hsc_env - - - - - fbb91a63 by Fendor at 2024-04-08T16:06:51-04:00 Eliminate name thunk in declaration fingerprinting Thunk analysis showed that we have about 100_000 thunks (in agda and `-fwrite-simplified-core`) pointing to the name of the name decl. Forcing this thunk fixes this issue. The thunk created here is retained by the thunk created by forkM, it is better to eagerly force this because the result (a `Name`) is already retained indirectly via the `IfaceDecl`. - - - - - 3b7b0c1c by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Use EpaLocation in WarningTxt This allows us to use an EpDelta if needed when using makeDeltaAst. - - - - - 12b997df by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Move DeltaPos and EpaLocation' into GHC.Types.SrcLoc This allows us to use a NoCommentsLocation for the possibly trailing comma location in a StringLiteral. This in turn allows us to correctly roundtrip via makeDeltaAst. - - - - - 868c8a78 by Fendor at 2024-04-09T08:51:50-04:00 Prefer packed representation for CompiledByteCode As there are many 'CompiledByteCode' objects alive during a GHCi session, representing its element in a more packed manner improves space behaviour at a minimal cost. When running GHCi on the agda codebase, we find around 380 live 'CompiledByteCode' objects. Packing their respective 'UnlinkedByteCode' can save quite some pointers. - - - - - be3bddde by Alan Zimmerman at 2024-04-09T08:52:26-04:00 EPA: Capture all comments in a ClassDecl Hopefully the final fix needed for #24533 - - - - - 3d0806fc by Jade at 2024-04-10T05:39:53-04:00 Validate -main-is flag using parseIdentifier Fixes #24368 - - - - - dd530bb7 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: free error message before returning Fixes a memory leak in rts/linker/PEi386.c - - - - - e008a19a by Alexis King at 2024-04-10T05:40:29-04:00 linker: Avoid linear search when looking up Haskell symbols via dlsym See the primary Note [Looking up symbols in the relevant objects] for a more in-depth explanation. When dynamically loading a Haskell symbol (typical when running a splice or GHCi expression), before this commit we would search for the symbol in all dynamic libraries that were loaded. However, this could be very inefficient when too many packages are loaded (which can happen if there are many package dependencies) because the time to lookup the would be linear in the number of packages loaded. This commit drastically improves symbol loading performance by introducing a mapping from units to the handles of corresponding loaded dlls. These handles are returned by dlopen when we load a dll, and can then be used to look up in a specific dynamic library. Looking up a given Name is now much more precise because we can get lookup its unit in the mapping and lookup the symbol solely in the handles of the dynamic libraries loaded for that unit. In one measurement, the wait time before the expression was executed went from +-38 seconds down to +-2s. This commit also includes Note [Symbols may not be found in pkgs_loaded], explaining the fallback to the old behaviour in case no dll can be found in the unit mapping for a given Name. Fixes #23415 Co-authored-by: Rodrigo Mesquita (@alt-romes) - - - - - dcfaa190 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: Make addDLL a wrapper around loadNativeObj Rewrite the implementation of `addDLL` as a wrapper around the more principled `loadNativeObj` rts linker function. The latter should be preferred while the former is preserved for backwards compatibility. `loadNativeObj` was previously only available on ELF platforms, so this commit further refactors the rts linker to transform loadNativeObj_ELF into loadNativeObj_POSIX, which is available in ELF and MachO platforms. The refactor made it possible to remove the `dl_mutex` mutex in favour of always using `linker_mutex` (rather than a combination of both). Lastly, we implement `loadNativeObj` for Windows too. - - - - - 12931698 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 Use symbol cache in internal interpreter too This commit makes the symbol cache that was used by the external interpreter available for the internal interpreter too. This follows from the analysis in #23415 that suggests the internal interpreter could benefit from this cache too, and that there is no good reason not to have the cache for it too. It also makes it a bit more uniform to have the symbol cache range over both the internal and external interpreter. This commit also refactors the cache into a function which is used by both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the caching logic to `lookupSymbolInDLL` too. - - - - - dccd3ea1 by Ben Gamari at 2024-04-10T05:40:29-04:00 testsuite: Add test for lookupSymbolInNativeObj - - - - - 1b1a92bd by Alan Zimmerman at 2024-04-10T05:41:05-04:00 EPA: Remove unnecessary XRec in CompleteMatchSig The XRec for [LIdP pass] is not needed for exact printing, remove it. - - - - - 6e18ce2b by Ben Gamari at 2024-04-12T08:16:09-04:00 users-guide: Clarify language extension documentation Over the years the users guide's language extension documentation has gone through quite a few refactorings. In the process some of the descriptions have been rendered non-sensical. For instance, the description of `NoImplicitPrelude` actually describes the semantics of `ImplicitPrelude`. To fix this we: * ensure that all extensions are named in their "positive" sense (e.g. `ImplicitPrelude` rather than `NoImplicitPrelude`). * rework the documentation to avoid flag-oriented wording like "enable" and "disable" * ensure that the polarity of the documentation is consistent with reality. Fixes #23895. - - - - - a933aff3 by Zubin Duggal at 2024-04-12T08:16:45-04:00 driver: Make `checkHomeUnitsClosed` faster The implementation of `checkHomeUnitsClosed` was traversing every single path in the unit dependency graph - this grows exponentially and quickly grows to be infeasible on larger unit dependency graphs. Instead we replace this with a faster implementation which follows from the specificiation of the closure property - there is a closure error if there are units which are both are both (transitively) depended upon by home units and (transitively) depend on home units, but are not themselves home units. To compute the set of units required for closure, we first compute the closure of the unit dependency graph, then the transpose of this closure, and find all units that are reachable from the home units in the transpose of the closure. - - - - - 23c3e624 by Andreas Klebinger at 2024-04-12T08:17:21-04:00 RTS: Emit warning when -M < -H Fixes #24487 - - - - - d23afb8c by Ben Gamari at 2024-04-12T08:17:56-04:00 testsuite: Add broken test for CApiFFI with -fprefer-bytecode See #24634. - - - - - a4bb3a51 by Ben Gamari at 2024-04-12T08:18:32-04:00 base: Deprecate GHC.Pack As proposed in #21461. Closes #21540. - - - - - 55eb8c98 by Ben Gamari at 2024-04-12T08:19:08-04:00 ghc-internal: Fix mentions of ghc-internal in deprecation warnings Closes #24609. - - - - - b0fbd181 by Ben Gamari at 2024-04-12T08:19:44-04:00 rts: Implement set_initial_registers for AArch64 Fixes #23680. - - - - - 14c9ec62 by Ben Gamari at 2024-04-12T08:20:20-04:00 ghcup-metadata: Use Debian 9 binaries on Ubuntu 16, 17 Closes #24646. - - - - - 35a1621e by Ben Gamari at 2024-04-12T08:20:55-04:00 Bump unix submodule to 2.8.5.1 Closes #24640. - - - - - a1c24df0 by Finley McIlwaine at 2024-04-12T08:21:31-04:00 Correct default -funfolding-use-threshold in docs - - - - - 0255d03c by Oleg Grenrus at 2024-04-12T08:22:07-04:00 FastString is a __Modified__ UTF-8 - - - - - c3489547 by Matthew Pickering at 2024-04-12T13:13:44-04:00 rts: Improve tracing message when nursery is resized It is sometimes more useful to know how much bigger or smaller the nursery got when it is resized. In particular I am trying to investigate situations where we end up with fragmentation due to the nursery (#24577) - - - - - 5e4f4ba8 by Simon Peyton Jones at 2024-04-12T13:14:20-04:00 Don't generate wrappers for `type data` constructors with StrictData Previously, the logic for checking if a data constructor needs a wrapper or not would take into account whether the constructor's fields have explicit strictness (e.g., `data T = MkT !Int`), but the logic would _not_ take into account whether `StrictData` was enabled. This meant that something like `type data T = MkT Int` would incorrectly generate a wrapper for `MkT` if `StrictData` was enabled, leading to the horrible errors seen in #24620. To fix this, we disable generating wrappers for `type data` constructors altogether. Fixes #24620. Co-authored-by: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - dbdf1995 by Alex Mason at 2024-04-15T15:28:26+10:00 Implements MO_S_Mul2 and MO_U_Mul2 using the UMULH, UMULL and SMULH instructions for AArch64 Also adds a test for MO_S_Mul2 - - - - - 42bd0407 by Teo Camarasu at 2024-04-16T20:06:39-04:00 Make template-haskell a stage1 package Promoting template-haskell from a stage0 to a stage1 package means that we can much more easily refactor template-haskell. We implement this by duplicating the in-tree `template-haskell`. A new `template-haskell-next` library is autogenerated to mirror `template-haskell` `stage1:ghc` to depend on the new interface of the library including the `Binary` instances without adding an explicit dependency on `template-haskell`. This is controlled by the `bootstrap-th` cabal flag When building `template-haskell` modules as part of this vendoring we do not have access to quote syntax, so we cannot use variable quote notation (`'Just`). So we either replace these with hand-written `Name`s or hide the code behind CPP. We can remove the `th_hack` from hadrian, which was required when building stage0 packages using the in-tree `template-haskell` library. For more details see Note [Bootstrapping Template Haskell]. Resolves #23536 Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> Co-Authored-By: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - 3d973e47 by Ben Gamari at 2024-04-16T20:07:15-04:00 Bump parsec submodule to 3.1.17.0 - - - - - 9d38bfa0 by Simon Peyton Jones at 2024-04-16T20:07:51-04:00 Clone CoVars in CorePrep This MR addresses #24463. It's all explained in the new Note [Cloning CoVars and TyVars] - - - - - 0fe2b410 by Andreas Klebinger at 2024-04-16T20:08:27-04:00 NCG: Fix a bug where we errounously removed a required jump instruction. Add a new method to the Instruction class to check if we can eliminate a jump in favour of fallthrough control flow. Fixes #24507 - - - - - 9f99126a by Teo Camarasu at 2024-04-16T20:09:04-04:00 Fix documentation preview from doc-tarball job - Include all the .html files and assets in the job artefacts - Include all the .pdf files in the job artefacts - Mark the artefact as an "exposed" artefact meaning it turns up in the UI. Resolves #24651 - - - - - 3a0642ea by Ben Gamari at 2024-04-16T20:09:39-04:00 rts: Ignore EINTR while polling in timerfd itimer implementation While the RTS does attempt to mask signals, it may be that a foreign library unmasks them. This previously caused benign warnings which we now ignore. See #24610. - - - - - 9a53cd3f by Alan Zimmerman at 2024-04-16T20:10:15-04:00 EPA: Add additional comments field to AnnsModule This is used in exact printing to store comments coming after the `where` keyword but before any comments allocated to imports or decls. It is used in ghc-exactprint, see https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195bf47c17d34fa7 - - - - - e5c43259 by Bryan Richter at 2024-04-16T20:10:51-04:00 Remove unrunnable FreeBSD CI jobs FreeBSD runner supply is inelastic. Currently there is only one, and it's unavailable because of a hardware issue. - - - - - 914eb49a by Ben Gamari at 2024-04-16T20:11:27-04:00 rel-eng: Fix mktemp usage in recompress-all We need a temporary directory, not a file. - - - - - f30e4984 by Teo Camarasu at 2024-04-16T20:12:03-04:00 Fix ghc API link in docs/index.html This was missing part of the unit ID meaning it would 404. Resolves #24674 - - - - - d7a3d6b5 by Ben Gamari at 2024-04-16T20:12:39-04:00 template-haskell: Declare TH.Lib.Internal as not-home Rather than `hide`. Closes #24659. - - - - - 5eaa46e7 by Matthew Pickering at 2024-04-19T02:14:55-04:00 testsuite: Rename isCross() predicate to needsTargetWrapper() isCross() was a misnamed because it assumed that all cross targets would provide a target wrapper, but the two most common cross targets (javascript, wasm) don't need a target wrapper. Therefore we rename this predicate to `needsTargetWrapper()` so situations in the testsuite where we can check whether running executables requires a target wrapper or not. - - - - - 55a9d699 by Simon Peyton Jones at 2024-04-19T02:15:32-04:00 Do not float HNFs out of lambdas This MR adjusts SetLevels so that it is less eager to float a HNF (lambda or constructor application) out of a lambda, unless it gets to top level. Data suggests that this change is a small net win: * nofib bytes-allocated falls by -0.09% (but a couple go up) * perf/should_compile bytes-allocated falls by -0.5% * perf/should_run bytes-allocated falls by -0.1% See !12410 for more detail. When fiddling elsewhere, I also found that this patch had a huge positive effect on the (very delicate) test perf/should_run/T21839r But that improvement doesn't show up in this MR by itself. Metric Decrease: MultiLayerModulesRecomp T15703 parsing001 - - - - - f0701585 by Alan Zimmerman at 2024-04-19T02:16:08-04:00 EPA: Fix comments in mkListSyntaxTy0 Also extend the test to confirm. Addresses #24669, 1 of 4 - - - - - b01c01d4 by Serge S. Gulin at 2024-04-19T02:16:51-04:00 JS: set image `x86_64-linux-deb11-emsdk-closure` for build - - - - - c90c6039 by Alan Zimmerman at 2024-04-19T02:17:27-04:00 EPA: Provide correct span for PatBind And remove unused parameter in checkPatBind Contributes to #24669 - - - - - bee54c24 by Krzysztof Gogolewski at 2024-04-19T11:13:00+02:00 Update quantification order following GHC haskell/haddock#23764 - - - - - 2814eb89 by Ben Gamari at 2024-04-19T18:57:05+02:00 hypsrc-test: Fix output of PositionPragmas.html - - - - - 26036f96 by Alan Zimmerman at 2024-04-19T13:11:08-04:00 EPA: Fix span for PatBuilderAppType Include the location of the prefix @ in the span for InVisPat. Also removes unnecessary annotations from HsTP. Contributes to #24669 - - - - - dba03aab by Matthew Craven at 2024-04-19T13:11:44-04:00 testsuite: Give the pre_cmd for mhu-perf more time - - - - - d31fbf6c by Krzysztof Gogolewski at 2024-04-19T21:04:09-04:00 Fix quantification order for a `op` b and a %m -> b Fixes #23764 Implements https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0640-tyop-quantification-order.rst Updates haddock submodule. - - - - - 385cd1c4 by Sebastian Graf at 2024-04-19T21:04:45-04:00 Make `seq#` a magic Id and inline it in CorePrep (#24124) We can save much code and explanation in Tag Inference and StgToCmm by making `seq#` a known-key Magic Id in `GHC.Internal.IO` and inline this definition in CorePrep. See the updated `Note [seq# magic]`. I also implemented a new `Note [Flatten case-bind]` to get better code for otherwise nested case scrutinees. I renamed the contructors of `ArgInfo` to use an `AI` prefix in order to resolve the clash between `type CpeApp = CoreExpr` and the data constructor of `ArgInfo`, as well as fixed typos in `Note [CorePrep invariants]`. Fixes #24252 and #24124. - - - - - 275e41a9 by Jade at 2024-04-20T11:10:40-04:00 Put the newline after errors instead of before them This mainly has consequences for GHCi but also slightly alters how the output of GHC on the commandline looks. Fixes: #22499 - - - - - dd339c7a by Teo Camarasu at 2024-04-20T11:11:16-04:00 Remove unecessary stage0 packages Historically quite a few packages had to be stage0 as they depended on `template-haskell` and that was stage0. In #23536 we made it so that was no longer the case. This allows us to remove a bunch of packages from this list. A few still remain. A new version of `Win32` is required by `semaphore-compat`. Including `Win32` in the stage0 set requires also including `filepath` because otherwise Hadrian's dependency logic gets confused. Once our boot compiler has a newer version of `Win32` all of these will be able to be dropped. Resolves #24652 - - - - - 2f8e3a25 by Alan Zimmerman at 2024-04-20T11:11:52-04:00 EPA: Avoid duplicated comments in splice decls Contributes to #24669 - - - - - c70b9ddb by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fix typos and namings (fixes #24602) You may noted that I've also changed term of ``` , global "h$vt_double" ||= toJExpr IntV ``` See "IntV" and ``` WaitReadOp -> \[] [fd] -> pure $ PRPrimCall $ returnS (app "h$waidRead" [fd]) ``` See "h$waidRead" - - - - - 3db54f9b by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: trivial checks for variable presence (fixes #24602) - - - - - 777f108f by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fs module imported twice (by emscripten and by ghc-internal). ghc-internal import wrapped in a closure to prevent conflict with emscripten (fixes #24602) Better solution is to use some JavaScript module system like AMD, CommonJS or even UMD. It will be investigated at other issues. At first glance we should try UMD (See https://github.com/umdjs/umd) - - - - - a45a5712 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: thread.js requires h$fds and h$fdReady to be declared for static code analysis, minimal code copied from GHCJS (fixes #24602) I've just copied some old pieces of GHCJS from publicly available sources (See https://github.com/Taneb/shims/blob/a6dd0202dcdb86ad63201495b8b5d9763483eb35/src/io.js#L607). Also I didn't put details to h$fds. I took minimal and left only its object initialization: `var h$fds = {};` - - - - - ad90bf12 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: heap and stack overflows reporting defined as js hard failure (fixes #24602) These errors were treated as a hard failure for browser application. The fix is trivial: just throw error. - - - - - 5962fa52 by Serge S. Gulin at 2024-04-21T16:33:44+03:00 JS: Stubs for code without actual implementation detected by Google Closure Compiler (fixes #24602) These errors were fixed just by introducing stubbed functions with throw for further implementation. - - - - - a0694298 by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add externs to linker (fixes #24602) After enabling jsdoc and built-in google closure compiler types I was needed to deal with the following: 1. Define NodeJS-environment types. I've just copied minimal set of externs from semi-official repo (see https://github.com/externs/nodejs/blob/6c6882c73efcdceecf42e7ba11f1e3e5c9c041f0/v8/nodejs.js#L8). 2. Define Emscripten-environment types: `HEAP8`. Emscripten already provides some externs in our code but it supposed to be run in some module system. And its definitions do not work well in plain bundle. 3. We have some functions which purpose is to add to functions some contextual information via function properties. These functions should be marked as `modifies` to let google closure compiler remove calls if these functions are not used actually by call graph. Such functions are: `h$o`, `h$sti`, `h$init_closure`, `h$setObjInfo`. 4. STG primitives such as registries and stuff from `GHC.StgToJS`. `dXX` properties were already present at externs generator function but they are started from `7`, not from `1`. This message is related: `// fixme does closure compiler bite us here?` - - - - - e58bb29f by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: added both tests: for size and for correctness (fixes #24602) By some reason MacOS builds add to stderr messages like: Ignoring unexpected archive entry: __.SYMDEF ... However I left stderr to `/dev/null` for compatibility with linux CI builds. - - - - - 909f3a9c by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Disable js linker warning for empty symbol table to make js tests running consistent across environments - - - - - 83eb10da by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add special preprocessor for js files due of needing to keep jsdoc comments (fixes #24602) Our js files have defined google closure compiler types at jsdoc entries but these jsdoc entries are removed by cpp preprocessor. I considered that reusing them in javascript-backend would be a nice thing. Right now haskell processor uses `-traditional` option to deal with comments and `//` operators. But now there are following compiler options: `-C` and `-CC`. You can read about them at GCC (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-CC) and CLang (see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-CC). It seems that `-CC` works better for javascript jsdoc than `-traditional`. At least it leaves `/* ... */` comments w/o changes. - - - - - e1cf8dc2 by brandon s allbery kf8nh at 2024-04-22T03:48:26-04:00 fix link in CODEOWNERS It seems that our local Gitlab no longer has documentation for the `CODEOWNERS` file, but the master documentation still does. Use that instead. - - - - - a27c6a49 by Fendor at 2024-04-22T10:13:03+02:00 Adapt to UserData split - - - - - 1efc5a7a by Fendor at 2024-04-22T10:13:03+02:00 Adapt to BinHandle split - - - - - 593f4e04 by Fendor at 2024-04-23T10:19:14-04:00 Add performance regression test for '-fwrite-simplified-core' - - - - - 1ba39b05 by Fendor at 2024-04-23T10:19:14-04:00 Typecheck corebindings lazily during bytecode generation This delays typechecking the corebindings until the bytecode generation happens. We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`. In general, we shouldn't retain values of the hydrated `Type`, as not evaluating the bytecode object keeps it alive. It is better if we retain the unhydrated `IfaceType`. See Note [Hydrating Modules] - - - - - e916fc92 by Alan Zimmerman at 2024-04-23T10:19:50-04:00 EPA: Keep comments in a CaseAlt match The comments now live in the surrounding location, not inside the Match. Make sure we keep them. Closes #24707 - - - - - d2b17f32 by Cheng Shao at 2024-04-23T15:01:22-04:00 driver: force merge objects when building dynamic objects This patch forces the driver to always merge objects when building dynamic objects even when ar -L is supported. It is an oversight of !8887: original rationale of that patch is favoring the relatively cheap ar -L operation over object merging when ar -L is supported, which makes sense but only if we are building static objects! Omitting check for whether we are building dynamic objects will result in broken .so files with undefined reference errors at executable link time when building GHC with llvm-ar. Fixes #22210. - - - - - 209d09f5 by Julian Ospald at 2024-04-23T15:02:03-04:00 Allow non-absolute values for bootstrap GHC variable Fixes #24682 - - - - - 3fff0977 by Matthew Pickering at 2024-04-23T15:02:38-04:00 Don't depend on registerPackage function in Cabal More recent versions of Cabal modify the behaviour of libAbiHash which breaks our usage of registerPackage. It is simpler to inline the part of registerPackage that we need and avoid any additional dependency and complication using the higher-level function introduces. - - - - - c62dc317 by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: remove obsolete ln script This commit removes an obsolete ln script in ghc-bignum/gmp. See 060251c24ad160264ae8553efecbb8bed2f06360 for its original intention, but it's been obsolete for a long time, especially since the removal of the make build system. Hence the house cleaning. - - - - - 6399d52b by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: update gmp to 6.3.0 This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0. The tarball format is now xz, and gmpsrc.patch has been patched into the tarball so hadrian no longer needs to deal with patching logic when building in-tree GMP. - - - - - 65b4b92f by Cheng Shao at 2024-04-25T01:32:02-04:00 hadrian: remove obsolete Patch logic This commit removes obsolete Patch logic from hadrian, given we no longer need to patch the gmp tarball when building in-tree GMP. - - - - - 71f28958 by Cheng Shao at 2024-04-25T01:32:02-04:00 autoconf: remove obsolete patch detection This commit removes obsolete deletection logic of the patch command from autoconf scripts, given we no longer need to patch anything in the GHC build process. - - - - - daeda834 by Sylvain Henry at 2024-04-25T01:32:43-04:00 JS: correctly handle RUBBISH literals (#24664) - - - - - 8a06ddf6 by Matthew Pickering at 2024-04-25T11:16:16-04:00 Linearise ghc-internal and base build This is achieved by requesting the final package database for ghc-internal, which mandates it is fully built as a dependency of configuring the `base` package. This is at the expense of cross-package parrallelism between ghc-internal and the base package. Fixes #24436 - - - - - 94da9365 by Andrei Borzenkov at 2024-04-25T11:16:54-04:00 Fix tuple puns renaming (24702) Move tuple renaming short cutter from `isBuiltInOcc_maybe` to `isPunOcc_maybe`, so we consider incoming module. I also fixed some hidden bugs that raised after the change was done. - - - - - fa03b1fb by Fendor at 2024-04-26T18:03:13-04:00 Refactor the Binary serialisation interface The goal is simplifiy adding deduplication tables to `ModIface` interface serialisation. We identify two main points of interest that make this difficult: 1. UserData hardcodes what `Binary` instances can have deduplication tables. Moreover, it heavily uses partial functions. 2. GHC.Iface.Binary hardcodes the deduplication tables for 'Name' and 'FastString', making it difficult to add more deduplication. Instead of having a single `UserData` record with fields for all the types that can have deduplication tables, we allow to provide custom serialisers for any `Typeable`. These are wrapped in existentials and stored in a `Map` indexed by their respective `TypeRep`. The `Binary` instance of the type to deduplicate still needs to explicitly look up the decoder via `findUserDataReader` and `findUserDataWriter`, which is no worse than the status-quo. `Map` was chosen as microbenchmarks indicate it is the fastest for a small number of keys (< 10). To generalise the deduplication table serialisation mechanism, we introduce the types `ReaderTable` and `WriterTable` which provide a simple interface that is sufficient to implement a general purpose deduplication mechanism for `writeBinIface` and `readBinIface`. This allows us to provide a list of deduplication tables for serialisation that can be extended more easily, for example for `IfaceTyCon`, see the issue https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for more motivation. In addition to this refactoring, we split `UserData` into `ReaderUserData` and `WriterUserData`, to avoid partial functions and reduce overall memory usage, as we need fewer mutable variables. Bump haddock submodule to accomodate for `UserData` split. ------------------------- Metric Increase: MultiLayerModulesTH_Make MultiLayerModulesRecomp T21839c ------------------------- - - - - - bac57298 by Fendor at 2024-04-26T18:03:13-04:00 Split `BinHandle` into `ReadBinHandle` and `WriteBinHandle` A `BinHandle` contains too much information for reading data. For example, it needs to keep a `FastMutInt` and a `IORef BinData`, when the non-mutable variants would suffice. Additionally, this change has the benefit that anyone can immediately tell whether the `BinHandle` is used for reading or writing. Bump haddock submodule BinHandle split. - - - - - 4d6394dd by Simon Peyton Jones at 2024-04-26T18:03:49-04:00 Fix missing escaping-kind check in tcPatSynSig Note [Escaping kind in type signatures] explains how we deal with escaping kinds in type signatures, e.g. f :: forall r (a :: TYPE r). a where the kind of the body is (TYPE r), but `r` is not in scope outside the forall-type. I had missed this subtlety in tcPatSynSig, leading to #24686. This MR fixes it; and a similar bug in tc_top_lhs_type. (The latter is tested by T24686a.) - - - - - 981c2c2c by Alan Zimmerman at 2024-04-26T18:04:25-04:00 EPA: check-exact: check that the roundtrip reproduces the source Closes #24670 - - - - - a8616747 by Andrew Lelechenko at 2024-04-26T18:05:01-04:00 Document that setEnv is not thread-safe - - - - - 1e41de83 by Bryan Richter at 2024-04-26T18:05:37-04:00 CI: Work around frequent Signal 9 errors - - - - - a6d5f9da by Naïm Favier at 2024-04-27T17:52:40-04:00 ghc-internal: add MonadFix instance for (,) Closes https://gitlab.haskell.org/ghc/ghc/-/issues/24288, implements CLC proposal https://github.com/haskell/core-libraries-committee/issues/238. Adds a MonadFix instance for tuples, permitting value recursion in the "native" writer monad and bringing consistency with the existing instance for transformers's WriterT (and, to a lesser extent, for Solo). - - - - - 64feadcd by Rodrigo Mesquita at 2024-04-27T17:53:16-04:00 bindist: Fix xattr cleaning The original fix (725343aa) was incorrect because it used the shell bracket syntax which is the quoting syntax in autoconf, making the test for existence be incorrect and therefore `xattr` was never run. Fixes #24554 - - - - - e2094df3 by damhiya at 2024-04-28T23:52:00+09:00 Make read accepts binary integer formats CLC proposal : https://github.com/haskell/core-libraries-committee/issues/177 - - - - - c62239b7 by Sylvain Henry at 2024-04-29T10:35:00+02:00 Fix tests for T22229 - - - - - 1c2fd963 by Alan Zimmerman at 2024-04-29T23:17:00-04:00 EPA: Preserve comments in Match Pats Closes #24708 Closes #24715 Closes #24734 - - - - - 4189d17e by Sylvain Henry at 2024-04-29T23:17:42-04:00 LLVM: better unreachable default destination in Switch (#24717) See added note. Co-authored-by: Siddharth Bhat <siddu.druid at gmail.com> - - - - - a3725c88 by Cheng Shao at 2024-04-29T23:18:20-04:00 ci: enable wasm jobs for MRs with wasm label This patch enables wasm jobs for MRs with wasm label. Previously the wasm label didn't actually have any effect on the CI pipeline, and full-ci needed to be applied to run wasm jobs which was a waste of runners when working on the wasm backend, hence the fix here. - - - - - 702f7964 by Matthew Pickering at 2024-04-29T23:18:56-04:00 Make interface files and object files depend on inplace .conf file A potential fix for #24737 - - - - - 728af21e by Cheng Shao at 2024-04-30T05:30:23-04:00 utils: remove obsolete vagrant scripts Vagrantfile has long been removed in !5288. This commit further removes the obsolete vagrant scripts in the tree. - - - - - 36f2c342 by Cheng Shao at 2024-04-30T05:31:00-04:00 Update autoconf scripts Scripts taken from autoconf 948ae97ca5703224bd3eada06b7a69f40dd15a02 - - - - - ecbf22a6 by Ben Gamari at 2024-04-30T05:31:36-04:00 ghcup-metadata: Drop output_name field This is entirely redundant to the filename of the URL. There is no compelling reason to name the downloaded file differently from its source. - - - - - c56d728e by Zubin Duggal at 2024-04-30T22:45:09-04:00 testsuite: Handle exceptions in framework_fail when testdir is not initialised When `framework_fail` is called before initialising testdir, it would fail with an exception reporting the testdir not being initialised instead of the actual failure. Ensure we report the actual reason for the failure instead of failing in this way. One way this can manifest is when trying to run a test that doesn't exist using `--only` - - - - - d5bea4d6 by Alan Zimmerman at 2024-04-30T22:45:45-04:00 EPA: Fix range for GADT decl with sig only Closes #24714 - - - - - 4d78c53c by Sylvain Henry at 2024-05-01T17:23:06-04:00 Fix TH dependencies (#22229) Add a dependency between Syntax and Internal (via module reexport). - - - - - 37e38db4 by Sylvain Henry at 2024-05-01T17:23:06-04:00 Bump haddock submodule - - - - - ca13075c by Sylvain Henry at 2024-05-01T17:23:47-04:00 JS: cleanup to prepare for #24743 - - - - - 40026ac3 by Alan Zimmerman at 2024-05-01T22:45:07-04:00 EPA: Preserve comments for PrefixCon Preserve comments in fun (Con {- c1 -} a b) = undefined Closes #24736 - - - - - 92134789 by Hécate Moonlight at 2024-05-01T22:45:42-04:00 Correct `@since` metadata in HpcFlags It was introduced in base-4.20, not 4.22. Fix #24721 - - - - - a580722e by Cheng Shao at 2024-05-02T08:18:45-04:00 testsuite: fix req_target_smp predicate - - - - - ac9c5f84 by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Remove (unused)coarse grained locking. The STM code had a coarse grained locking mode guarded by #defines that was unused. This commit removes the code. - - - - - 917ef81b by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Be more optimistic when validating in-flight transactions. * Don't lock tvars when performing non-committal validation. * If we encounter a locked tvar don't consider it a failure. This means in-flight validation will only fail if committing at the moment of validation is *guaranteed* to fail. This prevents in-flight validation from failing spuriously if it happens in parallel on multiple threads or parallel to thread comitting. - - - - - 167a56a0 by Alan Zimmerman at 2024-05-02T08:19:22-04:00 EPA: fix span for empty \case(s) In instance SDecide Nat where SZero %~ (SSucc _) = Disproved (\case) Ensure the span for the HsLam covers the full construct. Closes #24748 - - - - - 9bae34d8 by doyougnu at 2024-05-02T15:41:08-04:00 testsuite: expand size testing infrastructure - closes #24191 - adds windows_skip, wasm_skip, wasm_arch, find_so, _find_so - path_from_ghcPkg, collect_size_ghc_pkg, collect_object_size, find_non_inplace functions to testsuite - adds on_windows and req_dynamic_ghc predicate to testsuite The design is to not make the testsuite too smart and simply offload to ghc-pkg for locations of object files and directories. - - - - - b85b1199 by Sylvain Henry at 2024-05-02T15:41:49-04:00 GHCi: support inlining breakpoints (#24712) When a breakpoint is inlined, its context may change (e.g. tyvars in scope). We must take this into account and not used the breakpoint tick index as its sole identifier. Each instance of a breakpoint (even with the same tick index) now gets a different "info" index. We also need to distinguish modules: - tick module: module with the break array (tick counters, status, etc.) - info module: module having the CgBreakInfo (info at occurrence site) - - - - - 649c24b9 by Oleg Grenrus at 2024-05-03T20:45:42-04:00 Expose constructors of SNat, SChar and SSymbol in ghc-internal - - - - - d603f199 by Mikolaj Konarski at 2024-05-03T20:46:19-04:00 Add DCoVarSet to PluginProv (!12037) - - - - - ba480026 by Serge S. Gulin at 2024-05-03T20:47:01-04:00 JS: Enable more efficient packing of string data (fixes #24706) - - - - - be1e60ee by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Track in-scope variables in ruleCheckProgram This small patch fixes #24726, by tracking in-scope variables properly in -drule-check. Not hard to do! - - - - - 58408c77 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add a couple more HasCallStack constraints in SimpleOpt Just for debugging, no effect on normal code - - - - - 70e245e8 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add comments to Prep.hs This documentation patch fixes a TODO left over from !12364 - - - - - e5687186 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Use HasDebugCallStack, rather than HasCallStack - - - - - 631cefec by Cheng Shao at 2024-05-03T20:48:17-04:00 driver: always merge objects when possible This patch makes the driver always merge objects with `ld -r` when possible, and only fall back to calling `ar -L` when merge objects command is unavailable. This completely reverts !8887 and !12313, given more fixes in Cabal seems to be needed to avoid breaking certain configurations and the maintainence cost is exceeding the behefits in this case :/ - - - - - 1dacb506 by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump time submodule to 1.14 As requested in #24528. ------------------------- Metric Decrease: ghc_bignum_so rts_so Metric Increase: cabal_syntax_dir rts_so time_dir time_so ------------------------- - - - - - 4941b90e by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump terminfo submodule to current master - - - - - 43d48b44 by Cheng Shao at 2024-05-03T20:49:30-04:00 wasm: use scheduler.postTask() for context switch when available This patch makes use of scheduler.postTask() for JSFFI context switch when it's available. It's a more principled approach than our MessageChannel based setImmediate() implementation, and it's available in latest version of Chromium based browsers. - - - - - 08207501 by Cheng Shao at 2024-05-03T20:50:08-04:00 testsuite: give pre_cmd for mhu-perf 5x time - - - - - bf3d4db0 by Alan Zimmerman at 2024-05-03T20:50:43-04:00 EPA: Preserve comments for pattern synonym sig Closes #24749 - - - - - c49493f2 by Matthew Pickering at 2024-05-04T06:02:57-04:00 tests: Widen acceptance window for dir and so size tests These are testing things which are sometimes out the control of a GHC developer. Therefore we shouldn't fail CI if something about these dependencies change because we can't do anything about it. It is still useful to have these statistics for visualisation in grafana though. Ticket #24759 - - - - - 9562808d by Matthew Pickering at 2024-05-04T06:02:57-04:00 Disable rts_so test It has already manifested large fluctuations and destabilising CI Fixes #24762 - - - - - fc24c5cf by Ryan Scott at 2024-05-04T06:03:33-04:00 unboxedSum{Type,Data}Name: Use GHC.Types as the module Unboxed sum constructors are now defined in the `GHC.Types` module, so if you manually quote an unboxed sum (e.g., `''Sum2#`), you will get a `Name` like: ```hs GHC.Types.Sum2# ``` The `unboxedSumTypeName` function in `template-haskell`, however, mistakenly believes that unboxed sum constructors are defined in `GHC.Prim`, so `unboxedSumTypeName 2` would return an entirely different `Name`: ```hs GHC.Prim.(#|#) ``` This is a problem for Template Haskell users, as it means that they can't be sure which `Name` is the correct one. (Similarly for `unboxedSumDataName`.) This patch fixes the implementations of `unboxedSum{Type,Data}Name` to use `GHC.Types` as the module. For consistency with `unboxedTupleTypeName`, the `unboxedSumTypeName` function now uses the non-punned syntax for unboxed sums (`Sum<N>#`) as the `OccName`. Fixes #24750. - - - - - 7eab4e01 by Alan Zimmerman at 2024-05-04T16:14:55+01:00 EPA: Widen stmtslist to include last semicolon Closes #24754 - - - - - 06f7db40 by Teo Camarasu at 2024-05-05T00:19:38-04:00 doc: Fix type error in hs_try_putmvar example - - - - - af000532 by Moritz Schuler at 2024-05-05T06:30:58-04:00 Fix parsing of module names in CLI arguments closes issue #24732 - - - - - da74e9c9 by Ben Gamari at 2024-05-05T06:31:34-04:00 ghc-platform: Add Setup.hs The Hadrian bootstrapping script relies upon `Setup.hs` to drive its build. Addresses #24761. - - - - - 35d34fde by Alan Zimmerman at 2024-05-05T12:52:40-04:00 EPA: preserve comments in class and data decls Fix checkTyClHdr which was discarding comments. Closes #24755 - - - - - 03c5dfbf by Simon Peyton Jones at 2024-05-05T12:53:15-04:00 Fix a float-out error Ticket #24768 showed that the Simplifier was accidentally destroying a join point. It turned out to be that we were sending a bottoming join point to the top, accidentally abstracting over /other/ join points. Easily fixed. - - - - - adba68e7 by John Ericson at 2024-05-05T19:35:56-04:00 Substitute bindist files with Hadrian not configure The `ghc-toolchain` overhaul will eventually replace all this stuff with something much more cleaned up, but I think it is still worth making this sort of cleanup in the meantime so other untanglings and dead code cleaning can procede. I was able to delete a fair amount of dead code doing this too. `LLVMTarget_CPP` is renamed to / merged with `LLVMTarget` because it wasn't actually turned into a valid CPP identifier. (Original to 1345c7cc42c45e63ab1726a8fd24a7e4d4222467, actually.) Progress on #23966 Co-Authored-By: Sylvain Henry <hsyl20 at gmail.com> - - - - - 18f4ff84 by Alan Zimmerman at 2024-05-05T19:36:32-04:00 EPA: fix mkHsOpTyPV duplicating comments Closes #24753 - - - - - a19201d4 by Matthew Craven at 2024-05-06T19:54:29-04:00 Add test cases for #24664 ...since none are present in the original MR !12463 fixing this issue. - - - - - 46328a49 by Alan Zimmerman at 2024-05-06T19:55:05-04:00 EPA: preserve comments in data decls Closes #24771 - - - - - 3b51995c by Andrei Borzenkov at 2024-05-07T14:39:40-04:00 Rename Solo# data constructor to MkSolo# (#24673) - data Solo# a = (# a #) + data Solo# a = MkSolo# a And `(# foo #)` syntax now becomes just a syntactic sugar for `MkSolo# a`. - - - - - 4d59abf2 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Add the cmm_cpp_is_gcc predicate to the testsuite A future C-- test called T24474-cmm-override-g0 relies on the GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it emitting #defines past the preprocessing stage. Clang, at least, does not do this, so the test would fail if ran on Clang. As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of the workaround we apply as a fix for bug #24474, and the workaround was for GCC-specific behaviour, the test needs to be marked as fragile on other compilers. - - - - - 25b0b404 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Split out the C-- preprocessor, and make it pass -g0 Previously, C-- was processed with the C preprocessor program. This means that it inherited flags passed via -optc. A flag that is somewhat often passed through -optc is -g. At certain -g levels (>=2), GCC starts emitting defines *after* preprocessing, for the purposes of debug info generation. This is not useful for the C-- compiler, and, in fact, causes lexer errors. We can suppress this effect (safely, if supported) via -g0. As a workaround, in older versions of GCC (<=10), GCC only emitted defines if a certain set of -g*3 flags was passed. Newer versions check the debug level. For the former, we filter out those -g*3 flags and, for the latter, we specify -g0 on top of that. As a compatible and effective solution, this change adds a C-- preprocessor distinct from the C compiler and preprocessor, but that keeps its flags. The command line produced for C-- preprocessing now looks like: $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/24474 - - - - - 9b4129a5 by Andreas Klebinger at 2024-05-08T13:24:20-04:00 -fprof-late: Only insert cost centres on functions/non-workfree cafs. They are usually useless and doing so for data values comes with a large compile time/code size overhead. Fixes #24103 - - - - - 259b63d3 by Sebastian Graf at 2024-05-08T13:24:57-04:00 Simplifier: Preserve OccInfo on DataAlt fields when case binder is dead (#24770) See the adjusted `Note [DataAlt occ info]`. This change also has a positive repercussion on `Note [Combine case alts: awkward corner]`. Fixes #24770. We now try not to call `dataConRepStrictness` in `adjustFieldsIdInfo` when all fields are lazy anyway, leading to a 2% ghc/alloc decrease in T9675. Metric Decrease: T9675 - - - - - 31b28cdb by Sebastian Graf at 2024-05-08T13:24:57-04:00 Kill seqRule, discard dead seq# in Prep (#24334) Discarding seq#s in Core land via `seqRule` was problematic; see #24334. So instead we discard certain dead, discardable seq#s in Prep now. See the updated `Note [seq# magic]`. This fixes the symptoms of #24334. - - - - - b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00 Document NcgImpl methods Fixes #19914 - - - - - 4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00 Make renamer to be more flexible with parens in the LHS of the rules We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621 - - - - - ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00 IPE: Eliminate dependency on Read Instead of encoding the closure type as decimal string we now simply represent it as an integer, eliminating the need for `Read` in `GHC.Internal.InfoProv.Types.peekInfoProv`. Closes #24504. ------------------------- Metric Decrease: T24602_perf_size size_hello_artifact ------------------------- - - - - - a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00 testsuite: fix testwsdeque with recent clang This patch fixes compilation of testwsdeque.c with recent versions of clang, which will fail with the error below: ``` testwsdeque.c:95:33: error: warning: format specifies type 'long' but the argument has type 'void *' [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~~ ^ testwsdeque.c:95:39: error: warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~ ^~~ | %lu testwsdeque.c:133:42: error: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types] 133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); | ^~~~~ /workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error: note: passing argument to parameter 'startProc' here 193 | OSThreadProc *startProc, void *param); | ^ 2 warnings and 1 error generated. ``` - - - - - c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00 Rename pre-processor invocation args Small clean up. Uses proper names for the various groups of arguments that make up the pre-processor invocation. - - - - - 2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00 ghc-heap: fix typo in ghc-heap cbits - - - - - fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00 Improve performance of Data.List.sort(By) This patch improves the algorithm to sort lists in base. It does so using two strategies: 1) Use a four-way-merge instead of the 'default' two-way-merge. This is able to save comparisons and allocations. 2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization. This mainly benefits types with a fast (>). Note that this *may* break instances with a *malformed* Ord instance where `a > b` is *not* equal to `compare a b == GT`. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236 Fixes #24280 ------------------------- Metric Decrease: MultiLayerModulesTH_Make T10421 T13719 T15164 T18698a T18698b T1969 T9872a T9961 T18730 WWRec T12425 T15703 ------------------------- - - - - - 1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00 Revert "ghcup-metadata: Drop output_name field" This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f. This breaks the ghcup metadata generation on the nightly jobs. - - - - - daff1e30 by Jannis at 2024-05-12T13:38:35-04:00 Division by constants optimization - - - - - 413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00 Tidy: Add flag to expose unfoldings if they take dictionary arguments. Add the flag `-fexpose-overloaded-unfoldings` to be able to control this behaviour. For ghc's boot libraries file size grew by less than 1% when it was enabled. However I refrained from enabling it by default for now. I've also added a section on specialization more broadly to the users guide. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: T12425 T13386 hard_hole_fits ------------------------- - - - - - c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00 Don't store a GlobalRdrEnv in `mi_globals` for GHCi. GHCi only needs the `mi_globals` field for modules imported with :module +*SomeModule. It uses this field to make the top level environment in `SomeModule` available to the repl. By default, only the first target in the command line parameters is "star" loaded into GHCi. Other modules have to be manually "star" loaded into the repl. Storing the top level GlobalRdrEnv for each module is very wasteful, especially given that we will most likely never need most of these environments. Instead we store only the information needed to reconstruct the top level environment in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements as well as all top level symbols defined in the module (not taking export lists into account) When a particular module is "star-loaded" into GHCi (as the first commandline target, or via an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using the `IfaceTopEnv`. - - - - - d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00 Add perf regression test for `-fwrite-if-simplified-core` - - - - - 2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00 Improve pattern to type pattern transformation (23739) `pat_to_type_pat` function now can handle more patterns: - TuplePat - ListPat - LitPat - NPat - ConPat Allowing these new constructors in type patterns significantly increases possible shapes of type patterns without `type` keyword. This patch also changes how lookups in `lookupOccRnConstr` are performed, because we need to fall back into types when we didn't find a constructor on data level to perform `ConPat` to type transformation properly. - - - - - be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00 hadrian: fix hadrian building with ghc-9.10.1 - - - - - ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00 linters: fix lint-whitespace compilation with ghc-9.10.1 - - - - - a593f284 by Andreas Klebinger at 2024-05-15T07:32:10-04:00 Expand the `inline` rule to look through casts/ticks. Fixes #24808 - - - - - b1e0c313 by Cheng Shao at 2024-05-15T07:32:46-04:00 testsuite: bump PartialDownSweep timeout to 5x on wasm32 - - - - - b2227487 by Fendor at 2024-05-15T17:14:06-04:00 Add Eq and Ord instance to `IfaceType` We add an `Ord` instance so that we can store `IfaceType` in a `Data.Map` container. This is required to deduplicate `IfaceType` while writing `.hi` files to disk. Deduplication has many beneficial consequences to both file size and memory usage, as the deduplication enables implicit sharing of values. See issue #24540 for more motivation. The `Ord` instance would be unnecessary if we used a `TrieMap` instead of `Data.Map` for the deduplication process. While in theory this is clerarly the better option, experiments on the agda code base showed that a `TrieMap` implementation has worse run-time performance characteristics. To the change itself, we mostly derive `Eq` and `Ord`. This requires us to change occurrences of `FastString` with `LexicalFastString`, since `FastString` has no `Ord` instance. We change the definition of `IfLclName` to a newtype of `LexicalFastString`, to make such changes in the future easier. Bump haddock submodule for IfLclName changes - - - - - d368f9a6 by Fendor at 2024-05-15T17:14:06-04:00 Move out LiteralMap to avoid cyclic module dependencies - - - - - 2fcc09fd by Fendor at 2024-05-15T17:14:06-04:00 Add deduplication table for `IfaceType` The type `IfaceType` is a highly redundant, tree-like data structure. While benchmarking, we realised that the high redundancy of `IfaceType` causes high memory consumption in GHCi sessions when byte code is embedded into the `.hi` file via `-fwrite-if-simplified-core` or `-fbyte-code-and-object-code`. Loading such `.hi` files from disk introduces many duplicates of memory expensive values in `IfaceType`, such as `IfaceTyCon`, `IfaceTyConApp`, `IA_Arg` and many more. We improve the memory behaviour of GHCi by adding an additional deduplication table for `IfaceType` to the serialisation of `ModIface`, similar to how we deduplicate `Name`s and `FastString`s. When reading the interface file back, the table allows us to automatically share identical values of `IfaceType`. To provide some numbers, we evaluated this patch on the agda code base. We loaded the full library from the `.hi` files, which contained the embedded core expressions (`-fwrite-if-simplified-core`). Before this patch: * Load time: 11.7 s, 2.5 GB maximum residency. After this patch: * Load time: 7.3 s, 1.7 GB maximum residency. This deduplication has the beneficial side effect to additionally reduce the size of the on-disk interface files tremendously. For example, on agda, we reduce the size of `.hi` files (with `-fwrite-if-simplified-core`): * Before: 101 MB on disk * Now: 24 MB on disk This has even a beneficial side effect on the cabal store. We reduce the size of the store on disk: * Before: 341 MB on disk * Now: 310 MB on disk Note, none of the dependencies have been compiled with `-fwrite-if-simplified-core`, but `IfaceType` occurs in multiple locations in a `ModIface`. We also add IfaceType deduplication table to .hie serialisation and refactor .hie file serialisation to use the same infrastrucutre as `putWithTables`. Bump haddock submodule to accomodate for changes to the deduplication table layout and binary interface. - - - - - 36aa7cf1 by Fendor at 2024-05-15T17:14:06-04:00 Add run-time configurability of `.hi` file compression Introduce the flag `-fwrite-if-compression=<n>` which allows to configure the compression level of writing .hi files. The motivation is that some deduplication operations are too expensive for the average use case. Hence, we introduce multiple compression levels with variable impact on performance, but still reduce the memory residency and `.hi` file size on disk considerably. We introduce three compression levels: * `1`: `Normal` mode. This is the least amount of compression. It deduplicates only `Name` and `FastString`s, and is naturally the fastest compression mode. * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is marginally slower than `Normal` mode. In general, it should be safe to always use `Safe` mode. * `3`: `Full` deduplication mode. Deduplicate as much as we can, resulting in minimal .hi files, but at the cost of additional compilation time. Reading .hi files doesn't need to know the initial compression level, and can always deserialise a `ModIface`, as we write out a byte that indicates the next value has been deduplicated. This allows users to experiment with different compression levels for packages, without recompilation of dependencies. Note, the deduplication also has an additional side effect of reduced memory consumption to implicit sharing of deduplicated elements. See https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for example where that matters. ------------------------- Metric Decrease: MultiLayerModulesDefsGhciWithCore T16875 T21839c T24471 hard_hole_fits libdir ------------------------- - - - - - 1e63a6fb by Matthew Pickering at 2024-05-15T17:14:07-04:00 Introduce regression tests for `.hi` file sizes Add regression tests to track how `-fwrite-if-compression` levels affect the size of `.hi` files. - - - - - 639d742b by M Farkas-Dyck at 2024-05-15T17:14:49-04:00 TTG: ApplicativeStatement exist only in Rn and Tc Co-Authored-By: romes <rodrigo.m.mesquita at gmail.com> - - - - - aa7b336b by Jade at 2024-05-15T23:06:17-04:00 Documentation: Improve documentation for symbols exported from System.IO - - - - - c561de8f by Jade at 2024-05-15T23:06:54-04:00 Improve suggestions for language extensions - When suggesting Language extensions, also suggest Extensions which imply them - Suggest ExplicitForAll and GADTSyntax instead of more specific extensions - Rephrase suggestion to include the term 'Extension' - Also moves some flag specific definitions out of Session.hs into Flags.hs (#24478) Fixes: #24477 Fixes: #24448 Fixes: #10893 - - - - - 4c7ae2a1 by Andreas Klebinger at 2024-05-15T23:07:30-04:00 Testsuite: Check if llvm assembler is available for have_llvm - - - - - bc672166 by Torsten Schmits at 2024-05-15T23:08:06-04:00 refactor quadratic search in warnMissingHomeModules - - - - - 7875e8cb by Torsten Schmits at 2024-05-15T23:08:06-04:00 add test that runs MakeDepend on thousands of modules - - - - - b84b91f5 by Adam Gundry at 2024-05-16T15:32:06-04:00 Representation-polymorphic HasField (fixes #22156) This generalises the HasField class to support representation polymorphism, so that instead of type HasField :: forall {k} . k -> Type -> Type -> Constraint we have type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint - - - - - 05285090 by Matthew Pickering at 2024-05-16T15:32:43-04:00 Bump os-string submodule to 2.0.2.2 Closes #24786 - - - - - 886ab43a by Cheng Shao at 2024-05-17T01:34:50-04:00 rts: do not prefetch mark_closure bdescr in non-moving gc when ASSERTS_ENABLED This commit fixes a small an oversight in !12148: the prefetch logic in non-moving GC may trap in debug RTS because it calls Bdescr() for mark_closure which may be a static one. It's fine in non-debug RTS because even invalid bdescr addresses are prefetched, they will not cause segfaults, so this commit implements the most straightforward fix: don't prefetch mark_closure bdescr when assertions are enabled. - - - - - b38dcf39 by Teo Camarasu at 2024-05-17T01:34:50-04:00 rts: Allocate non-moving segments with megablocks Non-moving segments are 8 blocks long and need to be aligned. Previously we serviced allocations by grabbing 15 blocks, finding an aligned 8 block group in it and returning the rest. This proved to lead to high levels of fragmentation as a de-allocating a segment caused an 8 block gap to form, and this could not be reused for allocation. This patch introduces a segment allocator based around using entire megablocks to service segment allocations in bulk. When there are no free segments, we grab an entire megablock and fill it with aligned segments. As the megablock is free, we can easily guarantee alignment. Any unused segments are placed on a free list. It only makes sense to free segments in bulk when all of the segments in a megablock are freeable. After sweeping, we grab the free list, sort it, and find all groups of segments where they cover the megablock and free them. This introduces a period of time when free segments are not available to the mutator, but the risk that this would lead to excessive allocation is low. Right after sweep, we should have an abundance of partially full segments, and this pruning step is relatively quick. In implementing this we drop the logic that kept NONMOVING_MAX_FREE segments on the free list. We also introduce an eventlog event to log the amount of pruned/retained free segments. See Note [Segment allocation strategy] Resolves #24150 ------------------------- Metric Decrease: T13253 T19695 ------------------------- - - - - - 710665bd by Cheng Shao at 2024-05-17T01:35:30-04:00 rts: fix I/O manager compilation errors for win32 target This patch fixes I/O manager compilation errors for win32 target discovered when cross-compiling to win32 using recent clang: ``` rts/win32/ThrIOManager.c:117:7: error: error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | if (is_io_mng_native_p ()) { | ^ | 117 | if (is_io_mng_native_p ()) { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/fs.c:143:28: error: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 143 | int setErrNoFromWin32Error () { | ^ | void | 143 | int setErrNoFromWin32Error () { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:227:9: error: error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 227 | interruptIOManagerEvent (); | ^ | 227 | interruptIOManagerEvent (); | ^ rts/win32/ConsoleHandler.c:227:9: error: note: did you mean 'getIOManagerEvent'? | 227 | interruptIOManagerEvent (); | ^ rts/include/rts/IOInterface.h:27:10: error: note: 'getIOManagerEvent' declared here 27 | void * getIOManagerEvent (void); | ^ | 27 | void * getIOManagerEvent (void); | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:196:9: error: error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/win32/ConsoleHandler.c:196:9: error: note: did you mean 'postThreadLabel'? | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/eventlog/EventLog.h:118:6: error: note: 'postThreadLabel' declared here 118 | void postThreadLabel(Capability *cap, | ^ | 118 | void postThreadLabel(Capability *cap, | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) ``` - - - - - 28b9cee0 by Rodrigo Mesquita at 2024-05-17T01:36:05-04:00 configure: Check C99-compat for Cmm preprocessor Fixes #24815 - - - - - 8927e0c3 by Andreas Klebinger at 2024-05-17T01:36:41-04:00 Ensure `tcHasFixedRuntimeRep (# #)` returns True. - - - - - 04179044 by doyougnu at 2024-05-17T09:00:32-04:00 testsuite: make find_so regex less general Closes #24759 Background. In MR !12372 we began tracking shared object files and directories sizes for dependencies. However, this broke release builds because release builds alter the filenames swapping "in-place" for a hash. This was not considered in the MR and thus broke release pipelines. Furthermore, the rts_so test was found to be wildly varying and was therefore disabled in !12561. This commit fixes both of these issues: - fix the rts_so test by making the regex less general, now the rts_so test and all other foo.so tests must match "libHS<some-lib>-<version>-<hash|'in-place>-<ghc>". This prevents the rts_so test from accidentally matching different rts variants such as rts_threaded, which was the cause of the wild swings after !12372. - add logic to match either a hash or the string in-place. This should make the find_so function build agnostic. - - - - - 0962b50d by Andreas Klebinger at 2024-05-17T09:01:08-04:00 TagAnalysis: Treat all bottom ids as tagged during analysis. Ticket #24806 showed that we also need to treat dead end thunks as tagged during the analysis. - - - - - 7eb9f184 by Ben Gamari at 2024-05-17T11:23:37-04:00 Remove haddock submodule In preparation for merge into the GHC, as proposed in #23178. - - - - - 47b14dcc by Fendor at 2024-05-17T11:28:17-04:00 Adapt to `IfLclName` newtype changes (cherry picked from commit a711607e29b925f3d69e27c5fde4ba655c711ff1) - - - - - 6cc6681d by Fendor at 2024-05-17T11:28:17-04:00 Add IfaceType deduplication table to interface file serialisation Although we do not really need it in the interface file serialisation, as the deserialisation uses `getWithUserData`, we need to mirror the structure `getWithUserData` expects. Thus, we write essentially an empty `IfaceType` table at the end of the file, as the interface file doesn't reference `IfaceType`. (cherry picked from commit c9bc29c6a708483d2abc3d8ec9262510ce87ca61) - - - - - b9721206 by Ben Gamari at 2024-05-17T11:30:22-04:00 ghc-tags.yaml: Initial commit - - - - - 074e7d8f by Ben Gamari at 2024-05-17T11:31:29-04:00 fourmolu: Add configuration - - - - - 151b1736 by Ben Gamari at 2024-05-17T11:32:52-04:00 Makefile: Rework for use by haddock developers Previously the Makefile was present only for GHC's old make-based build system. Now since the make-based build system is gone we can use it for more useful ends. - - - - - a7dcf13b by Ben Gamari at 2024-05-17T11:36:14-04:00 Reformat with fourmolu Using previously-added configuration and `fourmolu -i .` Note that we exclude the test-cases (`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to formatting. - - - - - 0ea6017b by Ben Gamari at 2024-05-17T11:40:04-04:00 Add 'utils/haddock/' from commit 'a7dcf13bfbb97b20e75cc8ce650e2bb628db4660' git-subtree-dir: utils/haddock git-subtree-mainline: 7eb9f1849b1c72a1c61dee88462b4244550406f3 git-subtree-split: a7dcf13bfbb97b20e75cc8ce650e2bb628db4660 - - - - - aba1d304 by Hécate Moonlight at 2024-05-17T11:40:48-04:00 Add exceptions to the dangling notes list - - - - - 527bfbfb by Hécate Moonlight at 2024-05-17T11:40:52-04:00 Add haddock to the whitespace lint ignore list - - - - - 43274677 by Ben Gamari at 2024-05-17T11:41:20-04:00 git-blame-ignore-revs: Ignore haddock reformatting - - - - - 0e679e37 by Fendor at 2024-05-18T00:27:24-04:00 Pass cpp options to the CC builder in hadrian - - - - - bb40244e by Sylvain Henry at 2024-05-18T00:28:06-04:00 JS: fix allocation constant (fix #24746) - - - - - 646d30ab by Jade at 2024-05-18T19:23:31+02:00 Add highlighting for inline-code snippets in haddock - - - - - 64459a3e by Hécate Moonlight at 2024-05-19T08:42:27-04:00 haddock: Add a .readthedocs.yml file for online documentation - - - - - 7d3d9bbf by Serge S. Gulin at 2024-05-19T18:47:05+00:00 Unicode: General Category size test (related #24789) Added trivial size performance test which involves unicode general category usage via `read`. The `read` itself uses general category to detect spaces. The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789. - - - - - 8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00 EPA: Remove redundant code Remove unused epAnnAnns function various cases for showAstData that no longer exist - - - - - 071d7a1e by Rodrigo Mesquita at 2024-05-20T10:55:16-04:00 Improve docs on closed type families in hs-boots Fixes #24776 - - - - - d9e2c119 by Torsten Schmits at 2024-05-20T10:55:52-04:00 Use default deviation for large-project test This new performance test has the purpose of detecting regressions in complexity in relation to the number of modules in a project, so 1% deviation is way too small to avoid false positives. - - - - - 20b0136a by Ben Gamari at 2024-05-22T00:31:39-04:00 ghcup-metadata: Various fixes from 9.10.1 Use Debian 12/x86-64, Debian 10/aarch64, and Debian 11/aarch64 bindists where possible. - - - - - 6838a7c3 by Sylvain Henry at 2024-05-22T00:32:23-04:00 Reverse arguments to stgCallocBytes (fix #24828) - - - - - f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00 Add log messages for Iface serialisation compression level Fix the label of the number of 'IfaceType' entries in the log message. Add log message for the compression level that is used to serialise a an interface file. Adds `Outputable` instance for 'CompressionIFace'. - - - - - 3bad5d55 by Hécate Moonlight at 2024-05-22T00:33:40-04:00 base: Update doctests outputs ghc-internal: Update doctests outputs - - - - - 9317c6fb by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix the testsuites of the haddock-library - Apply all the metadata revisions from Hackage to the cabal file. - Fix the `ParserSpec.hs` file in the `spec` testsuite of haddock-library. - Make `CHANGES.md` an extra-doc-file instead of an extra-source-file. - - - - - 54073b02 by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix parser of @since pragma The testsuite contained tests for annotations of the form `@since foo-bar-0.5.0`, but the parser was written incorrectly. - - - - - ede6ede3 by Matthew Pickering at 2024-05-22T00:34:57-04:00 Fix nightly pages job It seems likely broken by 9f99126a which moved `index.html` from the root folder into `docs/` folder. Fixes #24840 - - - - - b7bcf729 by Cheng Shao at 2024-05-22T00:35:32-04:00 autoconf: remove unused context diff check This patch removes redundant autoconf check for the context diff program given it isn't actually been used anywhere, especially since make removal. - - - - - ea2fe66e by Hécate Moonlight at 2024-05-22T00:36:13-04:00 haddock: Rework the contributing guide - - - - - 0f302a94 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 haddock: Add module relationships diagrams of haddock-api and haddock-library - - - - - d1a9f34f by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add instructions - - - - - b880ee80 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add SVG outputs - - - - - 6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00 rts: Fix size of StgOrigThunkInfo frames Previously the entry code of the `stg_orig_thunk` frame failed to account for the size of the profiling header as it hard-coded the frame size. Fix this. Fixes #24809. - - - - - c645fe40 by Fendor at 2024-05-22T13:40:05-04:00 Add regression test T24809 for stg_orig_thunk_info_frame size - - - - - 4181aa40 by Andreas Klebinger at 2024-05-22T13:40:42-04:00 bindists: Check for existence of share folder before trying to copy it. This folder isn't distributed in windows bindists A lack of doing so resulted us copying loads of files twice. - - - - - d216510e by Matthew Pickering at 2024-05-22T13:40:42-04:00 Remove ad-hoc installation of mingw toolchain in relocatable bindists This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951 The choice about whether to install mingw is taken in the installation makefile. This is also broken on non-windows systems. The actual issue was the EnableDistroToolchain variable wasn't declared in mk/config.mk and therefore the check to install mingw was failing. - - - - - 7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04:00 testsuite: fix T17920 for wasm backend T17920 was marked as fragile on wasm before; it can be trivially fixed by avoiding calling variadic printf() in cmm. - - - - - c739383b by Cheng Shao at 2024-05-22T21:53:29-04:00 testsuite: bump T22744 timeout to 5x - - - - - c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00 testsuite: don't attempt to detect host cpu features when testing cross ghc The testsuite driver CPU feature detection logic only detects host CPU and only makes sense when we are not testing a cross GHC. - - - - - 3d9e4ce6 by Simon Peyton Jones at 2024-05-22T21:54:43-04:00 Better skolemisation As #24810 showed, it is (a little) better to skolemise en-bloc, so that Note [Let-bound skolems] fires more often. See Note [Skolemisation en bloc] in GHC.Tc.Utils.Instantiate. - - - - - a3cd3a1d by Ryan Scott at 2024-05-22T21:55:19-04:00 Add missing parenthesizePat in cvtp We need to ensure that the output of `cvtp` is parenthesized (at precedence `sigPrec`) so that any pattern signatures with a surrounding pattern signature can parse correctly. Fixes #24837. - - - - - 4bb2a7cc by Hécate Moonlight at 2024-05-22T21:55:59-04:00 [base] Document the memory overhead of ByteArray Add a diagram that shows the constituent parts of a ByteArray and their memory overhead. - - - - - 8b2a016a by Hécate Moonlight at 2024-05-22T21:56:38-04:00 Haddock: Add MR template for Haddock - - - - - ead75532 by Peter Trommler at 2024-05-23T02:28:05-04:00 PPC: Support ELF v2 on powerpc64 big-endian Detect ELF v2 on PowerPC 64-bit systems. Check for `_CALL_ELF` preprocessor macro. Fixes #21191 - - - - - 9d4c10f2 by Hécate Kleidukos at 2024-05-23T02:28:44-04:00 gitlab: Add @Kleidukos to CODEOWNERS for utils/haddock - - - - - 28e64170 by Preetham Gujjula at 2024-05-23T07:20:48-04:00 haddock: Add cabal-fmt to tools for `make style` - - - - - 00126a89 by Andrei Borzenkov at 2024-05-23T07:21:24-04:00 haddock: fix verbosity option parsing - - - - - a3e0b68b by Ryan Hendrickson at 2024-05-23T15:52:03-04:00 base: specify tie-breaking behavior of min, max, and related list/Foldable functions - - - - - bdcc0f37 by doyougnu at 2024-05-24T07:51:18-04:00 cmm: add word <-> double/float bitcast - closes: #25331 This is the last step in the project plan described in #25331. This commit: - adds bitcast operands for x86_64, LLVM, aarch64 - For PPC and i386 we resort to using the cmm implementations - renames conversion MachOps from Conv to Round|Truncate - - - - - f0d257f7 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor Some functions in StgToByteCode were filtering out void arguments. However, StgToByteCode is called after unarisation: the void arguments should have been removed earlier. Instead of filtering out, we assert that the args are non-void. - - - - - 03137fd2 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor `layoutNativeCall` was always called with a `primRepCmmType platform` callback. Hence we can put it inside of `layoutNativeCall` rather than repeat it. - - - - - 27c430f3 by David Binder at 2024-05-24T07:52:38-04:00 haddock: Remove compatibility shims for GHC < 8.4 from haddock-library - - - - - 8dd8a076 by Cheng Shao at 2024-05-24T07:53:14-04:00 compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs This patch makes the STG->Cmm backend avoid saving foreign call target to local when there are no caller-save GlobalRegs. Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a foreign call, we unconditionally save the foreign call target to a temporary local first, then rely on cmmSink to clean it up later, which only happens with -fcmm-sink (implied by -O) and not in unoptimized code. And this is troublesome for the wasm backend NCG, which needs to infer a foreign call target symbol's type signature from the Cmm call site. Previously, the NCG has been emitting incorrect type signatures for unoptimized code, which happens to work with `wasm-ld` most of the time, but this is never future-proof against upstream toolchain updates, and it causes horrible breakages when LTO objects are included in linker input. Hence this patch. - - - - - 986df1ab by Cheng Shao at 2024-05-24T07:53:14-04:00 testsuite: add callee-no-local regression test - - - - - 52d62e2a by Sylvain Henry at 2024-05-24T07:53:57-04:00 Fix HasCallStack leftovers from !12514 / #24726 - - - - - c5e00c35 by crumbtoo at 2024-05-24T07:54:38-04:00 user_guide: Fix typo in MultiWayIf chapter Close #24829 - - - - - bd323b0e by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Ensure that CHANGELOG is included in extra-source-files This was missed in the `ghc-internal` split. Closes #24831. - - - - - 1bfd32e8 by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Fix changelog reference to setBacktraceMechanismState (cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d) - - - - - 43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00 Float/double unboxed literal support for HexFloatLiterals (fix #22155) - - - - - 4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00 Improve test labels for binary interface file size tests Test labels for binary interface file sizes are hard to read and overly verbose at the same time. Extend the name for the metric title, but shorten it in the actual comparison table. - - - - - 14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00 Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present" This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa. - - - - - f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00 Fix default hyperlinked sources pattern Previously this didn't include the `%M` token which manifested as broken links to the hyperlinked sources of reexports of declarations defined in other packages. Fixes haddock#1628. (cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36) - - - - - 42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00 Make DocPaths a proper data type (cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c) - - - - - 53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00 haddock: Bump version to 2.30 (cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602) - - - - - e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00 haddock-api: allow base 4.20 and ghc 9.11 - - - - - e294f7a2 by PHO at 2024-05-24T12:17:55-04:00 Add a flag "threaded" for building haddock with the threaded RTS GHC isn't guaranteed to have a threaded RTS. There should be a way to build it with the vanilla one. (cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d) - - - - - 51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00 Update ticky counter event docs. Add the info about the info table address and json fields. Fixes #23200 - - - - - 98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00 Export extractPromotedList (#24866) This can be useful in plugins. - - - - - 228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00 template-haskell: Move wired-ins to ghc-internal Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so ------------------------- - - - - - 62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00 testsuite: mark tests broken by #24886 Now that `template-haskell` is no longer wired-in. These tests are triggering #24886, and so need to be marked broken. - - - - - 3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00 rts: fix missing function prototypes in ClosureMacros.h - - - - - e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00 UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful. - - - - - d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00 ci: Update ci-images commit for fedora38 image The fedora38 nightly job has been failing for quite a while because `diff` was no longer installed. The ci-images bump explicitly installs `diffutils` into these images so hopefully they now pass again. - - - - - 3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00 Update exactprint docs - - - - - 77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00 Incorporate review feedback - - - - - 87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00 Remove no longer relevant reference to comments - - - - - 05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00 Replace outdated code example - - - - - 45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00 Reword error resulting from missing -XBangPatterns. It can be the result of either a bang pattern or strict binding, so now we say so instead of claiming it must be a bang pattern. Fixes #21032 - - - - - e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00 testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x - - - - - 7a660042 by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: ensure gc_thread/gen_workspace is allocated with proper alignment gc_thread/gen_workspace are required to be aligned by 64 bytes. However, this property has not been properly enforced before, and numerous alignment violations at runtime has been caught by UndefinedBehaviorSanitizer that look like: ``` rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment 0x0000027a3390: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8 rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment 0x0000027a3450: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13 ``` This patch fixes the gc_thread/gen_workspace misalignment issue by explicitly allocating them with alignment constraint. - - - - - c77a48af by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: fix an unaligned load in nonmoving gc This patch fixes an unaligned load in nonmoving gc by ensuring the closure address is properly untagged first before attempting to prefetch its header. The unaligned load is reported by UndefinedBehaviorSanitizer: ``` rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment 0x0042005f3a71: note: pointer points here 00 00 00 98 43 13 8e 12 7f 00 00 50 3c 5f 00 42 00 00 00 58 17 b7 92 12 7f 00 00 89 cb 5e 00 42 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9 ``` This issue had previously gone unnoticed since it didn't really harm runtime correctness, the invalid header address directly loaded from a tagged pointer is only used as prefetch address and will not cause segfaults. However, it still should be corrected because the prefetch would be rendered useless by this issue, and untagging only involves a single bitwise operation without memory access so it's cheap enough to add. - - - - - 05c4fafb by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: use __builtin_offsetof to implement STG_FIELD_OFFSET This patch fixes the STG_FIELD_OFFSET macro definition by using __builtin_offsetof, which is what gcc/clang uses to implement offsetof in standard C. The previous definition that uses NULL pointer involves subtle undefined behavior in C and thus reported by UndefinedBehaviorSanitizer as well: ``` rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58 ``` - - - - - 5ff83bfc by Sylvain Henry at 2024-05-30T14:43:10-04:00 JS: remove useless h$CLOCK_REALTIME (#23202) - - - - - 95ef2d58 by Matthew Pickering at 2024-05-30T14:43:47-04:00 ghcup-metadata: Fix metadata generation There were some syntax errors in the generation script which were preventing it from running. I have tested this with: ``` nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525 ``` which completed successfully. - - - - - 1bc66ee4 by Jakob Bruenker at 2024-05-30T14:44:22-04:00 Add diagrams to Arrows documentation This adds diagrams to the documentation of Arrows, similar to the ones found on https://www.haskell.org/arrows/. It does not add diagrams for ArrowChoice for the time being, mainly because it's not clear to me how to visually distinguish them from the ones for Arrow. Ideally, you might want to do something like highlight the arrows belonging to the same tuple or same Either in common colors, but that's not really possible with unicode. - - - - - d10a1c65 by Matthew Craven at 2024-05-30T23:35:48-04:00 Make UnsafeSNat et al. into pattern synonyms ...so that they do not cause coerce to bypass the nominal role on the corresponding singleton types when they are imported. See Note [Preventing unsafe coercions for singleton types] and the discussion at #23478. This also introduces unsafeWithSNatCo (and analogues for Char and Symbol) so that users can still access the dangerous coercions that importing the real constructors would allow, but only in a very localized way. - - - - - 0958937e by Cheng Shao at 2024-05-30T23:36:25-04:00 hadrian: build C/C++ with split sections when enabled When split sections is enabled, ensure -fsplit-sections is passed to GHC as well when invoking GHC to compile C/C++; and pass -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++ with the hadrian Cc builder. Fixes #23381. - - - - - 02b1f91e by Cheng Shao at 2024-05-30T23:36:25-04:00 driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled When -fsplit-sections is passed to GHC, pass -ffunction-sections -fdata-sections to gcc/clang when building C/C++. Previously, -fsplit-sections was only respected by the NCG/LLVM backends, but not the unregisterised backend; the GHC driver did not pass -fdata-sections and -ffunction-sections to the C compiler, which resulted in excessive executable sizes. Fixes #23381. ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - fd47e2e3 by Cheng Shao at 2024-05-30T23:37:00-04:00 testsuite: mark process005 as fragile on JS - - - - - 34a04ea1 by Matthew Pickering at 2024-05-31T06:08:36-04:00 Add -Wderiving-typeable to -Wall Deriving `Typeable` does nothing, and it hasn't done for a long while. There has also been a warning for a long while which warns you about uselessly deriving it but it wasn't enabled in -Wall. Fixes #24784 - - - - - 75fa7b0b by Matthew Pickering at 2024-05-31T06:08:36-04:00 docs: Fix formatting of changelog entries - - - - - 303c4b33 by Preetham Gujjula at 2024-05-31T06:09:21-04:00 docs: Fix link to injective type families paper Closes #24863 - - - - - df97e9a6 by Ben Gamari at 2024-05-31T06:09:57-04:00 ghc-internal: Fix package description The previous description was inherited from `base` and was inappropriate for `ghc-internal`. Also fix the maintainer and bug reporting fields. Closes #24906. - - - - - bf0737c0 by Cheng Shao at 2024-05-31T06:10:33-04:00 compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans This patch removes special consideration for ArchWasm32 in cmmDoCmmSwitchPlans, which means the compiler will now disable cmmImplementSwitchPlans for wasm unreg backend, just like unreg backend of other targets. We enabled it in the past to workaround some compile-time panic in older versions of LLVM, but those panics are no longer present, hence no need to keep this workaround. - - - - - 7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00 utils: add hie.yaml config file for ghc-config Add hie.yaml to ghc-config project directory so it can be edited using HLS. - - - - - 1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00 hadrian: handle findExecutable "" gracefully hadrian may invoke findExecutable "" at run-time due to a certain program is not found by configure script. Which is fine and findExecutable is supposed to return Nothing in this case. However, on Windows there's a directory bug that throws an exception (see https://github.com/haskell/directory/issues/180), so we might as well use a wrapper for findExecutable and handle exceptions gracefully. - - - - - 4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00 configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails When configure fails to find LLC/OPT/LLVMAS within supported version range, it used to set "llc"/"opt"/"clang" as fallback values. This behavior is particularly troublesome when the user has llc/opt/clang with other versions in their PATH and run the testsuite, since hadrian will incorrectly assume have_llvm=True and pass that to the testsuite driver, resulting in annoying optllvm test failures (#23186). If configure determines llc/opt/clang wouldn't work, then we shouldn't pretend it'll work at all, and the bindist configure will invoke FIND_LLVM_PROG check again at install time anyway. - - - - - 5f1afdf7 by Sylvain Henry at 2024-05-31T15:52:52-04:00 Introduce UniqueSet and use it to replace 'UniqSet Unique' 'UniqSet Unique' represents a set of uniques as a 'Map Unique Unique', which is wasting space (associated key/value are always the same). Fix #23572 and #23605 - - - - - e0aa42b9 by crumbtoo at 2024-05-31T15:53:33-04:00 Improve template-haskell haddocks Closes #15822 - - - - - ae170155 by Olivier Benz at 2024-06-01T09:35:17-04:00 Bump max LLVM version to 19 (not inclusive) - - - - - 92aa65ea by Matthew Pickering at 2024-06-01T09:35:17-04:00 ci: Update CI images to test LLVM 18 The debian12 image in this commit has llvm 18 installed. - - - - - adb1fe42 by Serge S. Gulin at 2024-06-01T09:35:53-04:00 Unicode: make ucd2haskell build-able again ucd2haskell tool used streamly library which version in cabal was out of date. It is updated to the latest version at hackage with deprecated parts rewritten. Also following fixes were applied to existing code in suppose that from its last run the code structure was changed and now it was required to be up to date with actual folder structures: 1. Ghc module path environment got a suffix with `src`. 2. Generated code got 2.1 `GHC.Internal` prefix for `Data.*`. 2.2 `GHC.Unicode.Internal` swapped on `GHC.Internal.Unicode` according to actual structure. - - - - - ad56fd84 by Jade at 2024-06-01T09:36:29-04:00 Replace 'NB' with 'Note' in error messages - - - - - 6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00 compiler: fix -ddump-cmm-raw when compiling .cmm This patch fixes missing -ddump-cmm-raw output when compiling .cmm, which is useful for debugging cmm related codegen issues. - - - - - 1c834ad4 by Ryan Scott at 2024-06-01T09:37:40-04:00 Print namespace specifiers in FixitySig's Outputable instance For whatever reason, the `Outputable` instance for `FixitySig` simply did not print out namespace specifiers, leading to the confusing `-ddump-splices` output seen in #24911. This patch corrects this oversight. Fixes #24911. - - - - - cf49fb5f by Sylvain Henry at 2024-06-01T09:38:19-04:00 Configure: display C++ compiler path - - - - - f9c1ae12 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable PIC for in-tree GMP on wasm32 This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. - - - - - 1a32f828 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable in-tree gmp fft code path for wasm32 This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. - - - - - 06277d56 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: build in-tree GMP with malloc-notreentrant on wasm32 This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. - - - - - 9f614270 by ARATA Mizuki at 2024-06-02T14:02:35-04:00 Set package include paths when assembling .S files Fixes #24839. Co-authored-by: Sylvain Henry <hsyl20 at gmail.com> - - - - - 4998a6ed by Alex Mason at 2024-06-03T02:09:29-04:00 Improve performance of genericWordQuotRem2Op (#22966) Implements the algorithm from compiler-rt's udiv128by64to64default. This rewrite results in a roughly 24x improvement in runtime on AArch64 (and likely any other arch that uses it). - - - - - ae50a8eb by Cheng Shao at 2024-06-03T02:10:05-04:00 testsuite: mark T7773 as fragile on wasm - - - - - c8ece0df by Fendor at 2024-06-03T19:43:22-04:00 Migrate `Finder` component to `OsPath`, fixed #24616 For each module in a GHCi session, we keep alive one `ModLocation`. A `ModLocation` is fairly inefficiently packed, as `String`s are expensive in memory usage. While benchmarking the agda codebase, we concluded that we keep alive around 11MB of `FilePath`'s, solely retained by `ModLocation`. We provide a more densely packed encoding of `ModLocation`, by moving from `FilePath` to `OsPath`. Further, we migrate the full `Finder` component to `OsPath` to avoid unnecessary transformations. As the `Finder` component is well-encapsulated, this requires only a minimal amount of changes in other modules. We introduce pattern synonym for 'ModLocation' which maintains backwards compatibility and avoids breaking consumers of 'ModLocation'. - - - - - 0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00 compiler: emit NaturallyAligned when element type & index type are the same width This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. - - - - - 18f63970 by Sebastian Graf at 2024-06-04T05:05:27-04:00 Parser: Remove unused `apats` rule - - - - - 38757c30 by David Knothe at 2024-06-04T05:05:27-04:00 Implement Or Patterns (#22596) This commit introduces a new language extension, `-XOrPatterns`, as described in GHC Proposal 522. An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ..., `patk` succeed, in this order. See also the summary `Note [Implmentation of OrPatterns]`. Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> - - - - - 395412e8 by Cheng Shao at 2024-06-04T05:06:04-04:00 compiler/ghci/rts: remove stdcall support completely We have formally dropped i386 windows support (#18487) a long time ago. The stdcall foreign call convention is only used by i386 windows, and the legacy logic around it is a significant maintenance burden for future work that adds arm64 windows support (#24603). Therefore, this patch removes stdcall support completely from the compiler as well as the RTS (#24883): - stdcall is still recognized as a FFI calling convention in Haskell syntax. GHC will now unconditionally emit a warning (-Wunsupported-calling-conventions) and treat it as ccall. - Apart from minimum logic to support the parsing and warning logic, all other code paths related to stdcall has been completely stripped from the compiler. - ghci only supports FFI_DEFAULT_ABI and ccall convention from now on. - FFI foreign export adjustor code on all platforms no longer handles the stdcall case and only handles ccall from now on. - The Win32 specific parts of RTS no longer has special code paths for stdcall. This commit is the final nail on the coffin for i386 windows support. Further commits will perform more housecleaning to strip the legacy code paths and pave way for future arm64 windows support. - - - - - d1fe9ab6 by Cheng Shao at 2024-06-04T05:06:04-04:00 rts: remove legacy i386 windows code paths This commit removes some legacy i386 windows related code paths in the RTS, given this target is no longer supported. - - - - - a605e4b2 by Cheng Shao at 2024-06-04T05:06:04-04:00 autoconf: remove i386 windows related logic This commit removes legacy i386 windows logic in autoconf scripts. - - - - - 91e5ac5e by Cheng Shao at 2024-06-04T05:06:04-04:00 llvm-targets: remove i386 windows support This commit removes i386 windows from llvm-targets and the script to generate it. - - - - - 65fe75a4 by Cheng Shao at 2024-06-04T05:06:04-04:00 libraries/utils: remove stdcall related legacy logic This commit removes stdcall related legacy logic in libraries and utils. ccall should be used uniformly for all supported windows hosts from now on. - - - - - d2a83302 by Cheng Shao at 2024-06-04T05:06:04-04:00 testsuite: adapt the testsuite for stdcall removal This patch adjusts test cases to handle the stdcall removal: - Some stdcall usages are replaced with ccall since stdcall doesn't make sense anymore. - We also preserve some stdcall usages, and check in the expected warning messages to ensure GHC always warn about stdcall usages (-Wunsupported-calling-conventions) as expected. - Error code testsuite coverage is slightly improved, -Wunsupported-calling-conventions is now tested. - Obsolete code paths related to i386 windows are also removed. - - - - - cef8f47a by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: minor adjustments for stdcall removal This commit include minor adjustments of documentation related to stdcall removal. - - - - - 54332437 by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: mention i386 Windows removal in 9.12 changelog This commit mentions removal of i386 Windows support and stdcall related change in the 9.12 changelog. - - - - - 2aaea8a1 by Cheng Shao at 2024-06-04T05:06:40-04:00 hadrian: improve user settings documentation This patch adds minor improvements to hadrian user settings documentation: - Add missing `ghc.cpp.opts` case - Remove non-existent `cxx` case - Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't - Add example of passing configure argument to autoconf packages - - - - - 71010381 by Alex Mason at 2024-06-04T12:09:07-04:00 Add AArch64 CLZ, CTZ, RBIT primop implementations. Adds support for emitting the clz and rbit instructions, which are used by GHC.Prim.clz*#, GHC.Prim.ctz*# and GHC.Prim.bitReverse*#. - - - - - 44e2abfb by Cheng Shao at 2024-06-04T12:09:43-04:00 hadrian: add +text_simdutf flavour transformer to allow building text with simdutf This patch adds a +text_simdutf flavour transformer to hadrian to allow downstream packagers and users that build from source to opt-in simdutf support for text, in order to benefit from SIMD speedup at run-time. It's still disabled by default for the time being. - - - - - 077cb2e1 by Cheng Shao at 2024-06-04T12:09:43-04:00 ci: enable +text_simdutf flavour transformer for wasm jobs This commit enables +text_simdutf flavour transformer for wasm jobs, so text is now built with simdutf support for wasm. - - - - - b23746ad by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Use TemplateHaskellQuotes in instance Lift ByteArray Resolves #24852 - - - - - 3fd25743 by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Mark addrToByteArray as NOINLINE This function should never be inlined in order to keep code size small. - - - - - 98ad1ea5 by Cheng Shao at 2024-06-04T22:51:26-04:00 compiler: remove unused CompilerInfo/LinkerInfo types This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. - - - - - 11795244 by Cheng Shao at 2024-06-05T06:33:17-04:00 rts: remove unused PowerPC/IA64 native adjustor code This commit removes unused PowerPC/IA64 native adjustor code which is never actually enabled by autoconf/hadrian. Fixes #24920. - - - - - 5132754b by Sylvain Henry at 2024-06-05T06:33:57-04:00 RTS: fix warnings with doing*Profiling (#24918) - - - - - accc8c33 by Cheng Shao at 2024-06-05T11:35:36-04:00 hadrian: don't depend on inplace/mingw when --enable-distro-toolchain on Windows - - - - - 6ffbd678 by Cheng Shao at 2024-06-05T11:35:37-04:00 autoconf: normalize paths of some build-time dependencies on Windows This commit applies path normalization via cygpath -m to some build-time dependencies on Windows. Without this logic, the /clang64/bin prefixed msys2-style paths cause the build to fail with --enable-distro-toolchain. - - - - - 075dc6d4 by Cheng Shao at 2024-06-05T11:36:12-04:00 hadrian: remove OSDarwin mention from speedHack This commit removes mentioning of OSDarwin from speedHack, since speedHack is purely for i386 and we no longer support i386 darwin (#24921). - - - - - 83235c4c by Cheng Shao at 2024-06-05T11:36:12-04:00 compiler: remove 32-bit darwin logic This commit removes all 32-bit darwin logic from the compiler, given we no longer support 32-bit apple systems (#24921). Also contains a bit more cleanup of obsolete i386 windows logic. - - - - - 1eb99bc3 by Cheng Shao at 2024-06-05T11:36:12-04:00 rts: remove 32-bit darwin/ios logic This commit removes 32-bit darwin/ios related logic from the rts, given we no longer support them (#24921). - - - - - 24f65892 by Cheng Shao at 2024-06-05T11:36:12-04:00 llvm-targets: remove 32-bit darwin/ios targets This commit removes 32-bit darwin/ios targets from llvm-targets given we no longer support them (#24921). - - - - - ccdbd689 by Cheng Shao at 2024-06-05T11:36:12-04:00 testsuite: remove 32-bit darwin logic This commit removes 32-bit darwin logic from the testsuite given it's no longer supported (#24921). Also contains more cleanup of obsolete i386 windows logic. - - - - - 11d661c4 by Cheng Shao at 2024-06-05T11:36:13-04:00 docs: mention 32-bit darwin/ios removal in 9.12 changelog This commit mentions removal of 32-bit darwin/ios support (#24921) in the 9.12 changelog. - - - - - 7c173310 by Georgi Lyubenov at 2024-06-05T15:17:22-04:00 Add firstA and secondA to Data.Bitraversable Please see https://github.com/haskell/core-libraries-committee/issues/172 for related discussion - - - - - 3b6f9fd1 by Ben Gamari at 2024-06-05T15:17:59-04:00 base: Fix name of changelog Fixes #24899. Also place it under `extra-doc-files` to better reflect its nature and avoid triggering unnecessary recompilation if it changes. - - - - - 1f4d2ef7 by Sebastian Graf at 2024-06-05T15:18:34-04:00 Announce Or-patterns in the release notes for GHC 9.12 (#22596) Leftover from !9229. - - - - - 8650338d by Jan Hrček at 2024-06-06T10:39:24-04:00 Improve haddocks of Language.Haskell.Syntax.Pat.Pat - - - - - 2eee65e1 by Cheng Shao at 2024-06-06T10:40:00-04:00 testsuite: bump T7653 timeout for wasm - - - - - 990fed60 by Sylvain Henry at 2024-06-07T14:45:23-04:00 StgToCmm: refactor opTranslate and friends - Change arguments order to avoid `\args -> ...` lambdas - Fix documentation - Rename StgToCmm options ("big" doesn't mean anything) - - - - - 1afad514 by Sylvain Henry at 2024-06-07T14:45:23-04:00 NCG x86: remove dead code (#5444) Since 6755d833af8c21bbad6585144b10e20ac4a0a1ab this code is dead. - - - - - 595c0894 by Cheng Shao at 2024-06-07T14:45:58-04:00 testsuite: skip objc-hi/objcxx-hi when cross compiling objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. - - - - - edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - c3619f9c by Ben Gamari at 2024-11-15T11:19:33-05:00 generate-ci: Fix various warnings - - - - - 58b1eb20 by Ben Gamari at 2024-11-15T11:24:24-05:00 generate-ci: Add release+assertions jobs in nightly pipeline Here we add builds in the `release+assertions` flavour on x86-64 and AArch64 in the nightly pipeline. This would help avoid issues like #24586. Addresses #24594. - - - - - 10 changed files: - .ghcid - + .git-blame-ignore-revs - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0ad783754eaa83488ebc7cc8cb3fa5582511cabd...58b1eb2064bc8f0009dfad6edeeb1f123d0cc0c4 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0ad783754eaa83488ebc7cc8cb3fa5582511cabd...58b1eb2064bc8f0009dfad6edeeb1f123d0cc0c4 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 16:25:50 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 11:25:50 -0500 Subject: [Git][ghc/ghc][wip/T20201] testsuite: Add tests for RTS flag parsing error handling Message-ID: <6737760e8ce43_1dbbef88c1d8546b0@gitlab.mail> Ben Gamari pushed to branch wip/T20201 at Glasgow Haskell Compiler / GHC Commits: f833c15b by Ben Gamari at 2024-11-15T11:25:40-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - 5 changed files: - + testsuite/tests/rts/T20201a.hs - + testsuite/tests/rts/T20201a.stderr - + testsuite/tests/rts/T20201b.hs - + testsuite/tests/rts/T20201b.stderr - testsuite/tests/rts/all.T Changes: ===================================== testsuite/tests/rts/T20201a.hs ===================================== @@ -0,0 +1 @@ +main = putStrLn "hi" ===================================== testsuite/tests/rts/T20201a.stderr ===================================== @@ -0,0 +1 @@ +T20201a: error in RTS option -AturtlesM: unable to parse number 'turtlesM' ===================================== testsuite/tests/rts/T20201b.hs ===================================== @@ -0,0 +1,2 @@ +main = putStrLn "hi" + ===================================== testsuite/tests/rts/T20201b.stderr ===================================== @@ -0,0 +1 @@ +T20201b: error in RTS option -A64z: unknown unit suffix 'z' ===================================== testsuite/tests/rts/all.T ===================================== @@ -587,6 +587,10 @@ test('decodeMyStack_emptyListForMissingFlag', , js_broken(22261) # cloneMyStack# not yet implemented ], compile_and_run, ['']) +# Tests RTS flag parsing. Skipped on JS as it uses a distinct RTS. +test('T20201a', [js_skip, exit_code(1)], compile_and_run, ['-with-rtsopts -AturtlesM']) +test('T20201b', [js_skip, exit_code(1)], compile_and_run, ['-with-rtsopts -A64z']) + test('T22012', [js_skip, extra_ways(['ghci'])], compile_and_run, ['T22012_c.c']) # Skip for JS platform as the JS RTS is always single threaded View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f833c15b687d42f5f8927d0d3c7f705523f428ed -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f833c15b687d42f5f8927d0d3c7f705523f428ed You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 16:32:41 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 11:32:41 -0500 Subject: [Git][ghc/ghc][wip/T25377] 154 commits: users-guide: Document GHCi :where command Message-ID: <673777a938b69_1dbbefdfd2c05841@gitlab.mail> Ben Gamari pushed to branch wip/T25377 at Glasgow Haskell Compiler / GHC Commits: 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 8d3b2cc9 by Ben Gamari at 2024-11-15T11:31:30-05:00 rts: Add assertions surrounding tracking of StgAsyncIOResult We were previously pretty cavalier in handling StgAsyncIOResults which has proven in #25377 to be problematic. We now initialize the AsyncResult field of the `stg_block_async_void` frame to NULL when pushing, assert that it is NULL in `awaitRequest` and that it is not NULL in `stg_block_async_void`. - - - - - cf5bf94d by Ben Gamari at 2024-11-15T11:31:30-05:00 rts: Fix resumption of interrupted async IO operations Issue #25377 revealed a somewhat subtle consequence of thunk resumption after asynchronous exception suspension: The mutator may enter the asynchronous I/O completion stack frames (e.g. `stg_block_async`) despite the associated I/O not having been completed. We now handle this case by declaring the operation has having failed. This may result in `threadDelay` delaying less than the requested duration but I don't consider this to be problematic since it is impossible to observe this issue without rather dodgy use of `unsafePerformIO`. - - - - - 30 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - CODEOWNERS - boot - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/Dwarf/Types.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/659ab83c0c8697708820919974cad458558fcadd...cf5bf94d943443b595e6e415919f2769268e71b4 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/659ab83c0c8697708820919974cad458558fcadd...cf5bf94d943443b595e6e415919f2769268e71b4 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 16:42:20 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 11:42:20 -0500 Subject: [Git][ghc/ghc][wip/T25365] 181 commits: Fix typo in the @since annotation of annotateIO Message-ID: <673779ecc1939_1dbbeff908d0600ca@gitlab.mail> Ben Gamari pushed to branch wip/T25365 at Glasgow Haskell Compiler / GHC Commits: 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - b0c45215 by Ben Gamari at 2024-11-15T11:42:07-05:00 base: Capture backtrace from throwSTM Fixes #25365. - - - - - 297ce2a3 by Ben Gamari at 2024-11-15T11:42:11-05:00 base: Annotate rethrown exceptions in catchSTM with WhileHandling - - - - - 30 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - CODEOWNERS - boot - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/Dwarf/Types.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e3818c7189531f4d398a35fe370f971a85207c40...297ce2a3e2c7cc726bbb9a0722c05d2ce5a20c00 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e3818c7189531f4d398a35fe370f971a85207c40...297ce2a3e2c7cc726bbb9a0722c05d2ce5a20c00 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 16:46:27 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 11:46:27 -0500 Subject: [Git][ghc/ghc][wip/T24741] 4713 commits: [haddock @ 2002-04-04 16:23:43 by simonmar] Message-ID: <67377ae37ce66_1dbbeff33900624c2@gitlab.mail> Ben Gamari pushed to branch wip/T24741 at Glasgow Haskell Compiler / GHC Commits: 2b39cd94 by Simon Marlow at 2002-04-04T16:23:43+00:00 [haddock @ 2002-04-04 16:23:43 by simonmar] This is Haddock, my stab at a Haskell documentation tool. It's not quite ready for release yet, but I'm putting it in the repository so others can take a look. It uses a locally modified version of the hssource parser, extended with support for GHC extensions and documentation annotations. - - - - - 99ede94f by Simon Marlow at 2002-04-04T16:24:10+00:00 [haddock @ 2002-04-04 16:24:10 by simonmar] forgot one file - - - - - 8363294c by Simon Marlow at 2002-04-05T13:58:15+00:00 [haddock @ 2002-04-05 13:58:15 by simonmar] Remap names in the exported declarations to be "closer" to the current module. eg. if an exported declaration mentions a type 'T' which is imported from module A then re-exported from the current module, then links from the type or indeed the documentation will point to the current module rather than module A. This is to support better hiding: module A won't be referred to in the generated output. - - - - - 1570cbc1 by Simon Marlow at 2002-04-05T13:58:23+00:00 [haddock @ 2002-04-05 13:58:23 by simonmar] update the TODO list - - - - - 3a62f96b by Simon Marlow at 2002-04-05T14:11:51+00:00 [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration - - - - - c5d9a471 by Simon Marlow at 2002-04-05T14:18:41+00:00 [haddock @ 2002-04-05 14:18:41 by simonmar] remove underlines on visited links - - - - - 97280525 by Simon Marlow at 2002-04-05T16:11:47+00:00 [haddock @ 2002-04-05 16:11:47 by simonmar] - Update to generate more correct HTML. - Use our own non-overloaded table combinators, as the overloaded versions were giving me a headache. The improved type safety caught several errors in the HTML generation. - - - - - 9acd3a4d by Simon Marlow at 2002-04-05T16:32:19+00:00 [haddock @ 2002-04-05 16:32:19 by simonmar] Add width property to the title, and add TD.children for the module contents page. - - - - - ec9a0847 by Simon Marlow at 2002-04-08T16:39:56+00:00 [haddock @ 2002-04-08 16:39:56 by simonmar] Fix a problem with exports of the form T(..). - - - - - e4627dc8 by Simon Marlow at 2002-04-08T16:41:38+00:00 [haddock @ 2002-04-08 16:41:37 by simonmar] - Add our own versions of Html & BlockTable for the time being. - Add support for generating an index to the HTML backend - - - - - 2d73fd75 by Simon Marlow at 2002-04-09T11:23:24+00:00 [haddock @ 2002-04-09 11:23:24 by simonmar] Add '-- /' as a synonym for '-- |', for compatibility with IDoc. - - - - - 3675464e by Simon Marlow at 2002-04-09T11:33:55+00:00 [haddock @ 2002-04-09 11:33:54 by simonmar] - add the <...> syntax for marking up URLs in documentation - Make the output for data & class declarations more compact when there aren't any documentation annotations on the individual methods or constructors respectively. - - - - - 5077f5b1 by Simon Marlow at 2002-04-09T11:36:04+00:00 [haddock @ 2002-04-09 11:36:04 by simonmar] Update the TODO list - - - - - 9e83c54d by Simon Marlow at 2002-04-10T10:50:06+00:00 [haddock @ 2002-04-10 10:50:06 by simonmar] Use explicit 'px' suffix on pixel sizes; IE seems to prefer them - - - - - 052de51c by Simon Marlow at 2002-04-10T13:23:13+00:00 [haddock @ 2002-04-10 13:23:13 by simonmar] Lex URLs as a single token to avoid having to escape special characters inside the URL string. - - - - - 47187edb by Simon Marlow at 2002-04-10T13:23:55+00:00 [haddock @ 2002-04-10 13:23:55 by simonmar] Not sure why I made the constructor name for a record declaration into a TyCls name, but change it back into a Var name anyhow. - - - - - 3dc6aa81 by Simon Marlow at 2002-04-10T13:26:10+00:00 [haddock @ 2002-04-10 13:26:09 by simonmar] Lots of changes, including: - add index support to the HTML backend - clean up the renamer, put it into a monad - propogate unresolved names to the top level and report them in a nicer way - various bugfixes - - - - - c2a70a72 by Simon Marlow at 2002-04-10T13:32:39+00:00 [haddock @ 2002-04-10 13:32:39 by simonmar] Skeleton documentation - - - - - 50c98d17 by Simon Marlow at 2002-04-10T13:37:23+00:00 [haddock @ 2002-04-10 13:37:23 by simonmar] Update the TODO list, separate into pre-1.0 and post-1.0 items - - - - - f3778be6 by Simon Marlow at 2002-04-10T14:30:58+00:00 [haddock @ 2002-04-10 14:30:58 by simonmar] Add an introduction - - - - - cfbaf9f7 by Simon Marlow at 2002-04-10T14:59:51+00:00 [haddock @ 2002-04-10 14:59:51 by simonmar] Sort the module tree - - - - - 76bd7b34 by Simon Marlow at 2002-04-10T15:50:11+00:00 [haddock @ 2002-04-10 15:50:10 by simonmar] Generate a little table of contents at the top of the module doc (only if the module actually contains some section headings, though). - - - - - bb8560a1 by Simon Marlow at 2002-04-10T16:10:26+00:00 [haddock @ 2002-04-10 16:10:26 by simonmar] Now we understand (or at least don't barf on) type signatures in patterns such as you might find when scoped type variables are in use. - - - - - 86c2a026 by Simon Marlow at 2002-04-10T16:10:49+00:00 [haddock @ 2002-04-10 16:10:49 by simonmar] more updates - - - - - 1c052b0e by Simon Marlow at 2002-04-10T16:28:05+00:00 [haddock @ 2002-04-10 16:28:05 by simonmar] Parse errors in doc strings are now reported as warnings rather that causing the whole thing to fall over. It still needs cleaning up (the warning is emitted with trace) but this will do for the time being. - - - - - ace03e8f by Simon Marlow at 2002-04-10T16:38:03+00:00 [haddock @ 2002-04-10 16:38:03 by simonmar] update again - - - - - 69006c3e by Simon Marlow at 2002-04-11T13:38:02+00:00 [haddock @ 2002-04-11 13:38:02 by simonmar] mention Opera - - - - - fe9b10f8 by Simon Marlow at 2002-04-11T13:40:31+00:00 [haddock @ 2002-04-11 13:40:30 by simonmar] - copy haddock.css into the same place as the generated HTML - new option: --css <file> specifies the style sheet to use - new option: -o <dir> specifies the directory in which to generate the output. - because Haddock now needs to know where to find its default stylesheet, we have to have a wrapper script and do the haddock-inplace thing (Makefile code copied largely from fptools/happy). - - - - - 106adbbe by Simon Marlow at 2002-04-24T15:12:41+00:00 [haddock @ 2002-04-24 15:12:41 by simonmar] Stop slurping comment lines when we see a row of dashes longer than length 2: these are useful as separators. - - - - - 995d3f9e by Simon Marlow at 2002-04-24T15:14:12+00:00 [haddock @ 2002-04-24 15:14:11 by simonmar] Grok the kind of module headers we use in fptools/libraries, and pass the "portability", "stability", and "maintainer" strings through into the generated HTML. If the module header doesn't match the pattern, then we don't include the info in the HTML. - - - - - e14da136 by Simon Marlow at 2002-04-24T15:16:57+00:00 [haddock @ 2002-04-24 15:16:57 by simonmar] Done module headers now. - - - - - 2ca8dfd4 by Simon Marlow at 2002-04-24T15:57:48+00:00 [haddock @ 2002-04-24 15:57:47 by simonmar] Handle gcons in export lists (a common extension). - - - - - 044cea81 by Simon Marlow at 2002-04-25T14:20:12+00:00 [haddock @ 2002-04-25 14:20:12 by simonmar] Add the little lambda icon - - - - - 63955027 by Simon Marlow at 2002-04-25T14:40:05+00:00 [haddock @ 2002-04-25 14:40:05 by simonmar] - Add support for named chunks of documentation which can be referenced from the export list. - Copy the icon from $libdir to the destination in HTML mode. - - - - - 36e3f913 by Simon Marlow at 2002-04-25T16:48:36+00:00 [haddock @ 2002-04-25 16:48:36 by simonmar] More keyboard bashing - - - - - 7ae18dd0 by Simon Marlow at 2002-04-26T08:43:33+00:00 [haddock @ 2002-04-26 08:43:33 by simonmar] Package util reqd. to compile with 4.08.2 - - - - - bbd5fbab by Simon Marlow at 2002-04-26T10:13:00+00:00 [haddock @ 2002-04-26 10:13:00 by simonmar] Include $(GHC_HAPPY_OPTS) when compiling HsParser - - - - - 31c53d79 by Simon Marlow at 2002-04-26T11:18:57+00:00 [haddock @ 2002-04-26 11:18:56 by simonmar] - support for fundeps (partially contributed by Brett Letner - thanks Brett). - make it build with GHC 4.08.2 - - - - - c415ce76 by Simon Marlow at 2002-04-26T13:15:02+00:00 [haddock @ 2002-04-26 13:15:02 by simonmar] Move the explicit formatting of the little table for the stability/portability/maintainer info from the HTML into the CSS, and remove the explicit table size (just right-align it). - - - - - 520ee21a by Simon Marlow at 2002-04-26T16:01:44+00:00 [haddock @ 2002-04-26 16:01:44 by simonmar] Yet more keyboard bashing - this is pretty much complete now. - - - - - 2ae37179 by Simon Marlow at 2002-04-26T16:02:14+00:00 [haddock @ 2002-04-26 16:02:14 by simonmar] Add a couple of things I forgot about - - - - - b7211e04 by Simon Marlow at 2002-04-29T15:28:12+00:00 [haddock @ 2002-04-29 15:28:12 by simonmar] bugfix for declBinders on a NewTypeDecl - - - - - 640c154a by Simon Marlow at 2002-04-29T15:28:54+00:00 [haddock @ 2002-04-29 15:28:54 by simonmar] Allow '-- |' style annotations on constructors and record fields. - - - - - 393f258a by Simon Marlow at 2002-04-29T15:37:32+00:00 [haddock @ 2002-04-29 15:37:32 by simonmar] syntax fix - - - - - 8a2c2549 by Simon Marlow at 2002-04-29T15:37:48+00:00 [haddock @ 2002-04-29 15:37:48 by simonmar] Add an example - - - - - db88f8a2 by Simon Marlow at 2002-04-29T15:55:46+00:00 [haddock @ 2002-04-29 15:55:46 by simonmar] remove a trace - - - - - 2b0248e0 by Simon Marlow at 2002-04-29T15:56:19+00:00 [haddock @ 2002-04-29 15:56:19 by simonmar] Fix for 'make install' - - - - - 120453a0 by Simon Marlow at 2002-04-29T15:56:39+00:00 [haddock @ 2002-04-29 15:56:39 by simonmar] Install the auxilliary bits - - - - - 950e6dbb by Simon Marlow at 2002-04-29T15:57:30+00:00 [haddock @ 2002-04-29 15:57:30 by simonmar] Add BinDist bits - - - - - 154b9d71 by Simon Marlow at 2002-05-01T11:02:52+00:00 [haddock @ 2002-05-01 11:02:52 by simonmar] update - - - - - ba6c39fa by Simon Marlow at 2002-05-01T11:03:26+00:00 [haddock @ 2002-05-01 11:03:26 by simonmar] Add another item - - - - - bacb5e33 by Simon Marlow at 2002-05-03T08:50:00+00:00 [haddock @ 2002-05-03 08:50:00 by simonmar] Fix some typos. - - - - - 54c87895 by Sven Panne at 2002-05-05T19:40:51+00:00 [haddock @ 2002-05-05 19:40:51 by panne] As a temporary hack/workaround for a bug in GHC's simplifier, don't pass Happy the -c option for generating the parsers in this subdir. Furthermore, disable -O for HaddocParse, too. - - - - - e6c08703 by Simon Marlow at 2002-05-06T09:51:10+00:00 [haddock @ 2002-05-06 09:51:10 by simonmar] Add RPM spec file (thanks to Tom Moertel <tom-rpms at moertel.com>) - - - - - 7b8fa8e7 by Simon Marlow at 2002-05-06T12:29:26+00:00 [haddock @ 2002-05-06 12:29:26 by simonmar] Add missing type signature (a different workaround for the bug in GHC's simplifier). - - - - - cd0e300d by Simon Marlow at 2002-05-06T12:30:09+00:00 [haddock @ 2002-05-06 12:30:09 by simonmar] Remove workaround for simplifier bug in previous revision. - - - - - 687e68fa by Simon Marlow at 2002-05-06T12:32:32+00:00 [haddock @ 2002-05-06 12:32:32 by simonmar] Allow empty data declarations (another GHC extension). - - - - - 8f29f696 by Simon Marlow at 2002-05-06T12:49:21+00:00 [haddock @ 2002-05-06 12:49:21 by simonmar] Fix silly bug in named documentation block lookup. - - - - - 8e0059af by Simon Marlow at 2002-05-06T13:02:42+00:00 [haddock @ 2002-05-06 13:02:42 by simonmar] Add another named chunk with a different name - - - - - 68f8a896 by Simon Marlow at 2002-05-06T13:32:32+00:00 [haddock @ 2002-05-06 13:32:32 by simonmar] Be more lenient about extra paragraph breaks - - - - - 65fc31db by Simon Marlow at 2002-05-07T15:36:36+00:00 [haddock @ 2002-05-07 15:36:36 by simonmar] DocEmpty is a right and left-unit of DocAppend (remove it in the smart constructor). - - - - - adc81078 by Simon Marlow at 2002-05-07T15:37:15+00:00 [haddock @ 2002-05-07 15:37:15 by simonmar] Allow code blocks to be denoted with bird-tracks in addition to [...]. - - - - - 1283a3c1 by Simon Marlow at 2002-05-08T11:21:56+00:00 [haddock @ 2002-05-08 11:21:56 by simonmar] Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak at cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace. - - - - - a2239cf5 by Simon Marlow at 2002-05-08T11:22:30+00:00 [haddock @ 2002-05-08 11:22:30 by simonmar] Update to test new features. - - - - - 6add955f by Simon Marlow at 2002-05-08T13:37:25+00:00 [haddock @ 2002-05-08 13:37:25 by simonmar] Change the markup for typewriter-font from [...] to @... at . The reasoning is that the '@' symbol is much less likely to be needed than square brackets, and we don't want to have to escape square brackets in code fragments. This will be mildly painful in the short term, but it's better to get the change out of the way as early as possible. - - - - - cda06447 by Simon Marlow at 2002-05-08T13:39:56+00:00 [haddock @ 2002-05-08 13:39:56 by simonmar] Allow nested-style comments to be used as documentation annotations too. eg. {-| ... -} is equivalent to -- | ... An extra space can also be left after the comment opener: {- | ... -}. The only version that isn't allowed is {-# ... -}, because this syntax overlaps with Haskell pragmas; use {- # ... -} instead. - - - - - db23f65e by Simon Marlow at 2002-05-08T14:48:41+00:00 [haddock @ 2002-05-08 14:48:39 by simonmar] Add support for existential quantifiers on constructors. - - - - - adce3794 by Simon Marlow at 2002-05-08T15:43:25+00:00 [haddock @ 2002-05-08 15:43:25 by simonmar] update - - - - - 62a1f436 by Simon Marlow at 2002-05-08T15:44:10+00:00 [haddock @ 2002-05-08 15:44:10 by simonmar] Update to version 0.2 - - - - - f6a24ba3 by Simon Marlow at 2002-05-09T08:48:29+00:00 [haddock @ 2002-05-09 08:48:29 by simonmar] typo - - - - - 9f9522a4 by Simon Marlow at 2002-05-09T10:33:14+00:00 [haddock @ 2002-05-09 10:33:14 by simonmar] oops, left out '/' from the special characters in the last change. - - - - - 14abcb39 by Simon Marlow at 2002-05-09T10:34:44+00:00 [haddock @ 2002-05-09 10:34:44 by simonmar] Fix buglet - - - - - b8d878be by Simon Marlow at 2002-05-09T10:35:00+00:00 [haddock @ 2002-05-09 10:35:00 by simonmar] Give a more useful instance of Show for Module. - - - - - f7bfd626 by Simon Marlow at 2002-05-09T10:37:07+00:00 [haddock @ 2002-05-09 10:37:07 by simonmar] The last commit to Main.lhs broke the delicate balance of laziness which was being used to avoid computing the dependency graph of modules. So I finally bit the bullet and did a proper topological sort of the module graph, which turned out to be easy (stealing the Digraph module from GHC - this really ought to be in the libraries somewhere). - - - - - b481c1d0 by Simon Marlow at 2002-05-09T10:37:25+00:00 [haddock @ 2002-05-09 10:37:25 by simonmar] another item done - - - - - 032e2b42 by Simon Marlow at 2002-05-09T10:44:15+00:00 [haddock @ 2002-05-09 10:44:15 by simonmar] Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not. - - - - - 5fb45e92 by Simon Marlow at 2002-05-09T11:10:55+00:00 [haddock @ 2002-05-09 11:10:55 by simonmar] Add a special case for list types in ppHsAType - - - - - 1937e428 by Simon Marlow at 2002-05-09T12:43:06+00:00 [haddock @ 2002-05-09 12:43:06 by simonmar] Type synonyms can accept a ctype on the RHS, to match GHC. - - - - - 0f16ce56 by Simon Marlow at 2002-05-09T12:45:19+00:00 [haddock @ 2002-05-09 12:45:19 by simonmar] Add 'stdcall' keyword - - - - - 29b0d7d2 by Simon Marlow at 2002-05-09T13:35:45+00:00 [haddock @ 2002-05-09 13:35:45 by simonmar] Add System Requirements section - - - - - bf14dddd by Simon Marlow at 2002-05-09T13:36:11+00:00 [haddock @ 2002-05-09 13:36:11 by simonmar] Test existential types, amongst other things - - - - - 502f8f6f by Simon Marlow at 2002-05-09T13:37:35+00:00 [haddock @ 2002-05-09 13:37:35 by simonmar] Print the module name in a doc-string parse error - - - - - ca1f8d49 by Simon Marlow at 2002-05-09T13:38:04+00:00 [haddock @ 2002-05-09 13:38:04 by simonmar] Add dependency - - - - - 8d3d91ff by Simon Marlow at 2002-05-09T15:37:57+00:00 [haddock @ 2002-05-09 15:37:57 by simonmar] Add the changelog/release notes - - - - - f3960959 by Simon Marlow at 2002-05-09T15:47:47+00:00 [haddock @ 2002-05-09 15:47:47 by simonmar] mention the backquote-style of markup - - - - - 089fb6e6 by Simon Marlow at 2002-05-09T15:59:45+00:00 [haddock @ 2002-05-09 15:59:45 by simonmar] update - - - - - bdd3be0b by Simon Marlow at 2002-05-09T15:59:56+00:00 [haddock @ 2002-05-09 15:59:56 by simonmar] Document changes since 0.1 - - - - - 00fc4af8 by Simon Marlow at 2002-05-10T08:22:48+00:00 [haddock @ 2002-05-10 08:22:48 by simonmar] oops, update to version 0.2 - - - - - a8a79041 by Simon Marlow at 2002-05-10T16:05:08+00:00 [haddock @ 2002-05-10 16:05:08 by simonmar] Only include a mini-contents if there are 2 or more sections - - - - - 06653319 by Simon Marlow at 2002-05-13T09:13:12+00:00 [haddock @ 2002-05-13 09:13:12 by simonmar] fix typos - - - - - 1402b19b by Simon Marlow at 2002-05-13T10:14:22+00:00 [haddock @ 2002-05-13 10:14:22 by simonmar] Allow backquote as the right-hand quote as well as the left-hand quote, as suggested by Dean Herrington. Clean up the grammar a litte. - - - - - dcd5320d by Simon Marlow at 2002-05-13T10:44:10+00:00 [haddock @ 2002-05-13 10:44:10 by simonmar] a couple more things, prioritise a bit - - - - - a90130c4 by Simon Marlow at 2002-05-13T15:19:03+00:00 [haddock @ 2002-05-13 15:19:03 by simonmar] Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs). - - - - - a774d432 by Simon Marlow at 2002-05-13T15:20:54+00:00 [haddock @ 2002-05-13 15:20:54 by simonmar] Fix one of the record examples - - - - - 2d1d5218 by Simon Marlow at 2002-05-15T12:44:35+00:00 [haddock @ 2002-05-15 12:44:35 by simonmar] Preserve the newline before a bird-track, but only within a paragraph. - - - - - 1554c09a by Simon Marlow at 2002-05-15T13:03:02+00:00 [haddock @ 2002-05-15 13:03:01 by simonmar] Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed. - - - - - 57344dc3 by Simon Marlow at 2002-05-15T13:03:19+00:00 [haddock @ 2002-05-15 13:03:19 by simonmar] Bump to version 0.3 - - - - - b2791812 by Simon Marlow at 2002-05-15T13:03:41+00:00 [haddock @ 2002-05-15 13:03:41 by simonmar] update - - - - - fead183e by Simon Marlow at 2002-05-15T13:10:15+00:00 [haddock @ 2002-05-15 13:10:15 by simonmar] Rename Foo.hs to Test.hs, and add a Makefile - - - - - b0b1f89f by Simon Marlow at 2002-05-15T13:16:07+00:00 [haddock @ 2002-05-15 13:16:07 by simonmar] - Remove the note about function argument docs not being implemented - Note that qualified identifiers can be used to point to entities that aren't in scope. - - - - - 5665f31a by Simon Marlow at 2002-05-15T13:28:46+00:00 [haddock @ 2002-05-15 13:28:46 by simonmar] Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson. - - - - - 0564505d by Simon Marlow at 2002-05-17T10:51:57+00:00 [haddock @ 2002-05-17 10:51:57 by simonmar] Fix bugs in qualified name handling (A.B.f was returned as B.f) - - - - - 10e7311c by Simon Marlow at 2002-05-21T10:24:52+00:00 [haddock @ 2002-05-21 10:24:52 by simonmar] - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation - - - - - 2f91c2a6 by Simon Marlow at 2002-05-21T10:27:40+00:00 [haddock @ 2002-05-21 10:27:40 by simonmar] add a few more test cases - - - - - 01c2ddd2 by Simon Marlow at 2002-05-21T10:28:33+00:00 [haddock @ 2002-05-21 10:28:33 by simonmar] Rearrange a bit, and add support for tabular datatype rendering - - - - - a4e4c5f8 by Simon Marlow at 2002-05-27T09:03:52+00:00 [haddock @ 2002-05-27 09:03:51 by simonmar] Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others) - - - - - 48722e68 by Simon Marlow at 2002-05-27T12:30:38+00:00 [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. - - - - - 657204d2 by Simon Marlow at 2002-05-27T13:19:49+00:00 [haddock @ 2002-05-27 13:19:49 by simonmar] Fix bug: we weren't renaming HsDocCommentNamed in renameDecl - - - - - 592aae66 by Simon Marlow at 2002-05-27T14:10:27+00:00 [haddock @ 2002-05-27 14:10:27 by simonmar] Fix some bugs in the rendering of qualified type signatures. - - - - - 69c8f763 by Simon Marlow at 2002-05-27T14:36:45+00:00 [haddock @ 2002-05-27 14:36:45 by simonmar] warning message tweak - - - - - 16e64e21 by Simon Marlow at 2002-05-27T14:53:53+00:00 [haddock @ 2002-05-27 14:53:53 by simonmar] hyperlinked identifiers should be in <tt> - - - - - 8d5e4783 by Simon Marlow at 2002-05-27T15:56:45+00:00 [haddock @ 2002-05-27 15:56:45 by simonmar] Do something sensible for modules which don't export anything (except instances). - - - - - 9d3ef811 by Simon Marlow at 2002-05-28T10:12:50+00:00 [haddock @ 2002-05-28 10:12:50 by simonmar] Rename the module documentation properly (bug reported by Sven Panne). - - - - - ef03a1cc by Simon Marlow at 2002-05-28T10:13:04+00:00 [haddock @ 2002-05-28 10:13:04 by simonmar] Add some more test cases - - - - - 92baa0e8 by Simon Marlow at 2002-05-28T11:17:55+00:00 [haddock @ 2002-05-28 11:17:55 by simonmar] If an identifier doesn't lex, then just replace it by a DocString. - - - - - a3156213 by Simon Marlow at 2002-05-28T16:16:19+00:00 [haddock @ 2002-05-28 16:16:19 by simonmar] Only link to names in the current module which are actually listed in the documentation. A name may be exported but not present in the documentation if it is exported as part of a 'module M' export specifier. - - - - - 31acf941 by Simon Marlow at 2002-05-28T16:17:11+00:00 [haddock @ 2002-05-28 16:17:11 by simonmar] update - - - - - 7e474ebf by Sigbjorn Finne at 2002-05-28T22:42:08+00:00 [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] - - - - - 093f7e53 by Simon Marlow at 2002-05-29T09:09:49+00:00 [haddock @ 2002-05-29 09:09:49 by simonmar] Back out previous change until we can find a better way to do this. - - - - - 9234389c by Simon Marlow at 2002-05-29T13:19:06+00:00 [haddock @ 2002-05-29 13:19:06 by simonmar] Make the markup syntax a little more friendly: - single quotes are now interpreted literally unless they surround a valid Haskell identifier. So for example now there's no need to escape a single quote used as an apostrophe. - text to the right of a bird track is now literal (if you want marked-up text in a code block, use @...@). - - - - - b3333526 by Simon Marlow at 2002-05-29T13:38:51+00:00 [haddock @ 2002-05-29 13:38:51 by simonmar] Document recent changes to markup syntax - - - - - f93641d6 by Simon Marlow at 2002-05-29T15:27:18+00:00 [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too - - - - - 613f21e3 by Simon Marlow at 2002-06-03T13:05:58+00:00 [haddock @ 2002-06-03 13:05:57 by simonmar] Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case). - - - - - 14b36807 by Simon Marlow at 2002-06-03T13:20:00+00:00 [haddock @ 2002-06-03 13:20:00 by simonmar] Fix linking to qualified names again (thanks to Sven Panne for pointing out the bug). - - - - - 95b10eac by Simon Marlow at 2002-06-03T13:46:48+00:00 [haddock @ 2002-06-03 13:46:48 by simonmar] Fix for exporting record selectors from a newtype declaration - - - - - 272f932e by Simon Marlow at 2002-06-03T13:56:38+00:00 [haddock @ 2002-06-03 13:56:38 by simonmar] update to version 0.3 - - - - - 1c0a3bed by Simon Marlow at 2002-06-03T14:05:07+00:00 [haddock @ 2002-06-03 14:05:07 by simonmar] Add changes in version 0.3 - - - - - 145b4626 by Simon Marlow at 2002-06-03T14:12:38+00:00 [haddock @ 2002-06-03 14:12:38 by simonmar] Render class names as proper binders - - - - - 052106b3 by Simon Marlow at 2002-06-03T14:15:10+00:00 [haddock @ 2002-06-03 14:15:10 by simonmar] update, and separate into bugs, features, and cosmetic items. - - - - - 854f4914 by Simon Marlow at 2002-06-03T14:16:13+00:00 [haddock @ 2002-06-03 14:16:13 by simonmar] More test cases - - - - - 466922c8 by Simon Marlow at 2002-06-03T14:16:56+00:00 [haddock @ 2002-06-03 14:16:56 by simonmar] Example from the paper - - - - - 9962a045 by Simon Marlow at 2002-06-03T14:17:49+00:00 [haddock @ 2002-06-03 14:17:49 by simonmar] A debugging version of the style-sheet, which gives some tables coloured backgrounds so we can see what's going on. - - - - - f16b79db by Simon Marlow at 2002-06-03T14:19:46+00:00 [haddock @ 2002-06-03 14:19:46 by simonmar] typo - - - - - 620db27b by Simon Marlow at 2002-06-03T14:48:32+00:00 [haddock @ 2002-06-03 14:48:32 by simonmar] oops, fix markup bugs - - - - - 53fd105c by Simon Marlow at 2002-06-05T09:05:07+00:00 [haddock @ 2002-06-05 09:05:07 by simonmar] Keep foreign imports when there is no export list (bug reported by Sven Panne). - - - - - 6d98989c by Simon Marlow at 2002-06-05T09:12:02+00:00 [haddock @ 2002-06-05 09:12:02 by simonmar] Identifiers in single quotes can be symbol names too (bug reported by Hal Daume). - - - - - 001811e5 by Sven Panne at 2002-06-08T14:03:36+00:00 [haddock @ 2002-06-08 14:03:36 by panne] Tiny workaround for the fact that Haddock currently ignores HsImportSpecs: Let the local_orig_env take precedence. This is no real solution at all, but improves things sometimes, e.g. in my GLUT documentation. :-) - - - - - 504d19c9 by Simon Marlow at 2002-06-11T09:23:25+00:00 [haddock @ 2002-06-11 09:23:25 by simonmar] portability nit - - - - - e13b5af4 by Simon Marlow at 2002-06-20T12:38:07+00:00 [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. - - - - - f467a9b6 by Simon Marlow at 2002-06-20T12:39:02+00:00 [haddock @ 2002-06-20 12:39:01 by simonmar] Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list. - - - - - b8dbfe20 by Simon Marlow at 2002-06-21T12:43:06+00:00 [haddock @ 2002-06-21 12:43:06 by simonmar] When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers. - - - - - 4831dbbd by Simon Marlow at 2002-06-21T15:50:42+00:00 [haddock @ 2002-06-21 15:50:42 by simonmar] Add support for reading and writing interface files(!) This turned out to be quite easy, and necessary to get decent hyperlinks between the documentation for separate packages in the libraries. The functionality isn't quite complete yet: for a given package of modules, you'd like to say "the HTML for these modules lives in directory <dir>" (currently they are assumed to be all in the same place). Two new flags: --dump-interface=FILE dump an interface file in FILE --read-interface=FILE read interface from FILE an interface file describes *all* the modules being processed. Only the exported names are kept in the interface: if you re-export a name from a module in another interface the signature won't be copied. This is a compromise to keep the size of the interfaces sensible. Also, I added another useful option: --no-implicit-prelude avoids trying to import the Prelude. Previously this was the default, but now importing the Prelude from elsewhere makes sense if you also read in an interface containing the Prelude module, so Haddock imports the Prelude implicitly according to the Haskell spec. - - - - - d3640a19 by Sven Panne at 2002-06-23T14:54:00+00:00 [haddock @ 2002-06-23 14:54:00 by panne] Make it compile with newer GHCs - - - - - 780c506b by Sven Panne at 2002-06-23T15:44:31+00:00 [haddock @ 2002-06-23 15:44:31 by panne] Cleaned up build root handling and added more docs - - - - - 45290d2e by Simon Marlow at 2002-06-24T14:37:43+00:00 [haddock @ 2002-06-24 14:37:42 by simonmar] When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface. - - - - - 4e2b9ae6 by Simon Marlow at 2002-07-03T16:01:08+00:00 [haddock @ 2002-07-03 16:01:07 by simonmar] Handle import specs properly, include 'hiding'. Haddock now has a complete implementation of the Haskell module system (more or less; I won't claim it's 100% correct). - - - - - 9a9aa1a8 by Simon Marlow at 2002-07-03T16:18:16+00:00 [haddock @ 2002-07-03 16:18:16 by simonmar] Update - - - - - 560c3026 by Simon Marlow at 2002-07-04T14:56:10+00:00 [haddock @ 2002-07-04 14:56:10 by simonmar] Clean up the code that constructs the exported declarations, and fix a couple of bugs along the way. Now if you import a class hiding one of the methods, then re-export the class, the version in the documentation will correctly have the appropriate method removed. - - - - - 2c26e77d by Simon Marlow at 2002-07-04T15:26:13+00:00 [haddock @ 2002-07-04 15:26:13 by simonmar] More bugfixes to the export handling - - - - - 03e0710d by Simon Marlow at 2002-07-09T10:12:10+00:00 [haddock @ 2002-07-09 10:12:10 by simonmar] Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base). - - - - - 44f3891a by Simon Marlow at 2002-07-09T10:12:51+00:00 [haddock @ 2002-07-09 10:12:51 by simonmar] commented-out debugging code - - - - - 97280873 by Krasimir Angelov at 2002-07-09T16:33:33+00:00 [haddock @ 2002-07-09 16:33:31 by krasimir] 'Microsoft HTML Help' support - - - - - 3dc04655 by Simon Marlow at 2002-07-10T09:40:56+00:00 [haddock @ 2002-07-10 09:40:56 by simonmar] Fix for rendering of the (->) type constructor, from Ross Paterson. - - - - - c9f149c6 by Simon Marlow at 2002-07-10T10:26:11+00:00 [haddock @ 2002-07-10 10:26:11 by simonmar] Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help). - - - - - e8acc1e6 by Simon Marlow at 2002-07-10T10:57:10+00:00 [haddock @ 2002-07-10 10:57:10 by simonmar] Document all the new options since 0.3 - - - - - 8bb85544 by Simon Marlow at 2002-07-10T10:58:31+00:00 [haddock @ 2002-07-10 10:58:31 by simonmar] Sort the options a bit - - - - - abc0dd59 by Simon Marlow at 2002-07-15T09:19:38+00:00 [haddock @ 2002-07-15 09:19:38 by simonmar] Fix a bug in mkExportItems when processing a module without an explicit export list. We were placing one copy of a declaration for each binder in the declaration, which for a data type would mean one copy of the whole declaration per constructor or record selector. - - - - - dde65bb9 by Simon Marlow at 2002-07-15T09:54:16+00:00 [haddock @ 2002-07-15 09:54:16 by simonmar] merge rev. 1.35 - - - - - bd7eb8c4 by Simon Marlow at 2002-07-15T10:14:31+00:00 [haddock @ 2002-07-15 10:14:30 by simonmar] Be a bit more liberal in the kind of commenting styles we allow, as suggested by Malcolm Wallace. Mostly this consists of allowing doc comments either side of a separator token. In an export list, a section heading is now allowed before the comma, as well as after it. eg. module M where ( T(..) -- * a section heading , f -- * another section heading , g ) In record fields, doc comments are allowed anywhere (previously a doc-next was allowed only after the comma, and a doc-before was allowed only before the comma). eg. data R = C { -- | describes 'f' f :: Int -- | describes 'g' , g :: Int } - - - - - 8f6dfe34 by Simon Marlow at 2002-07-15T10:21:56+00:00 [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. - - - - - fc515bb7 by Simon Marlow at 2002-07-15T16:16:50+00:00 [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). - - - - - 80a97e74 by Simon Marlow at 2002-07-19T09:13:10+00:00 [haddock @ 2002-07-19 09:13:10 by simonmar] Allow special id's ([], (), etc.) to be used in an import declaration. - - - - - a69d7378 by Simon Marlow at 2002-07-19T09:59:02+00:00 [haddock @ 2002-07-19 09:59:02 by simonmar] Allow special id's ([], (), etc.) to be used in an import declarations. - - - - - d205fa60 by Simon Marlow at 2002-07-19T10:00:16+00:00 [haddock @ 2002-07-19 10:00:16 by simonmar] Relax the restrictions which require doc comments to be followed by semi colons - in some cases this isn't necessary. Now you can write module M where { -- | some doc class C where {} } without needing to put a semicolon before the class declaration. - - - - - e9301e14 by Simon Marlow at 2002-07-23T08:24:09+00:00 [haddock @ 2002-07-23 08:24:09 by simonmar] A new TODO list item - - - - - e5d77586 by Simon Marlow at 2002-07-23T08:40:56+00:00 [haddock @ 2002-07-23 08:40:56 by simonmar] - update the acknowledgements - remove the paragraph that described how to use explicit layout with doc comments; it isn't relevant any more. - - - - - 78a94137 by Simon Marlow at 2002-07-23T08:43:02+00:00 [haddock @ 2002-07-23 08:43:02 by simonmar] more tests - - - - - 5c320927 by Simon Marlow at 2002-07-23T08:43:26+00:00 [haddock @ 2002-07-23 08:43:26 by simonmar] Updates for version 0.4 - - - - - 488e99ae by Simon Marlow at 2002-07-23T09:10:46+00:00 [haddock @ 2002-07-23 09:10:46 by simonmar] Fix the %changelog (rpm complained that it wasn't in the right order) - - - - - a77bb373 by Simon Marlow at 2002-07-23T09:12:38+00:00 [haddock @ 2002-07-23 09:12:38 by simonmar] Another item for the TODO list - - - - - f1ec1813 by Simon Marlow at 2002-07-23T10:18:46+00:00 [haddock @ 2002-07-23 10:18:46 by simonmar] Add a version banner when invoked with -v - - - - - 1d44cadf by Simon Marlow at 2002-07-24T09:28:19+00:00 [haddock @ 2002-07-24 09:28:19 by simonmar] Remove ^Ms - - - - - 4d8d5e94 by Simon Marlow at 2002-07-24T09:42:18+00:00 [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. - - - - - d6edc43e by Simon Marlow at 2002-07-25T14:37:29+00:00 [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. - - - - - b34d18fa by Simon Marlow at 2002-08-02T09:08:22+00:00 [haddock @ 2002-08-02 09:08:22 by simonmar] The <TT> and <PRE> environments seem to use a font that is a little too small in IE. Compensate. (suggestion from Daan Leijen). - - - - - 8106b086 by Simon Marlow at 2002-08-02T09:25:23+00:00 [haddock @ 2002-08-02 09:25:20 by simonmar] Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen). - - - - - c1acff8f by Simon Marlow at 2002-08-05T09:03:49+00:00 [haddock @ 2002-08-05 09:03:49 by simonmar] update - - - - - f968661c by Simon Marlow at 2002-11-11T09:32:57+00:00 [haddock @ 2002-11-11 09:32:57 by simonmar] Fix cut-n-pasto - - - - - 12d02619 by Simon Marlow at 2002-11-13T09:49:46+00:00 [haddock @ 2002-11-13 09:49:46 by simonmar] Small bugfix in the --read-interface option parsing from Brett Letner. - - - - - 30e32d5e by Ross Paterson at 2003-01-16T15:07:57+00:00 [haddock @ 2003-01-16 15:07:57 by ross] Adjust for the new exception libraries (as well as the old ones). - - - - - 871f65df by Sven Panne at 2003-02-20T21:31:40+00:00 [haddock @ 2003-02-20 21:31:40 by panne] * Add varsyms and consyms to index * Exclude empty entries from index - - - - - bc42cc87 by Sven Panne at 2003-02-24T21:26:29+00:00 [haddock @ 2003-02-24 21:26:29 by panne] Don't convert a "newtype" to a single-constructor "data" for non-abstractly exported types, they are quite different regarding strictness/pattern matching. Now a "data" without any constructors is only emitted for an abstractly exported type, regardless if it is actually a "newtype" or a "data". - - - - - 0c2a1d99 by Sven Panne at 2003-03-08T19:02:38+00:00 [haddock @ 2003-03-08 19:02:38 by panne] Fixed some broken/redirected/canonicalized links found by a very picky link checker. - - - - - 25459269 by Sven Panne at 2003-03-09T21:13:43+00:00 [haddock @ 2003-03-09 21:13:43 by panne] Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor. - - - - - 6be4db86 by Sven Panne at 2003-03-10T21:34:25+00:00 [haddock @ 2003-03-10 21:34:24 by panne] Escape fragments. This fixes e.g. links to operators. - - - - - eb12972c by Ross Paterson at 2003-04-25T10:50:06+00:00 [haddock @ 2003-04-25 10:50:05 by ross] An 80% solution to generating derived instances. A complete solution would duplicate the instance inference logic, but if a type variable occurs as a constructor argument, then we can just propagate the derived class to the variable. But we know nothing of the constraints on any type variables that occur elsewhere. For example, the declarations data Either a b = Left a | Right b deriving (Eq, Ord) data Ptr a = Ptr Addr# deriving (Eq, Ord) newtype IORef a = IORef (STRef RealWorld a) deriving Eq yield the instances (Eq a, Eq b) => Eq (Either a b) (Ord a, Ord b) => Ord (Either a b) Eq (Ptr a) Ord (Ptr a) (??? a) => Eq (IORef a) The last example shows the limits of this local analysis. Note that a type variable may be in both categories: then we know a constraint, but there may be more, or a stronger constraint, e.g. data Tree a = Node a [Tree a] deriving Eq yields (Eq a, ??? a) => Eq (Tree a) - - - - - de886f78 by Simon Marlow at 2003-04-25T11:17:55+00:00 [haddock @ 2003-04-25 11:17:55 by simonmar] Some updates, including moving the derived instance item down to the bottom of the list now that Ross has contributed some code that does the job for common cases. - - - - - 1b52cffd by Simon Marlow at 2003-04-30T14:02:32+00:00 [haddock @ 2003-04-30 14:02:32 by simonmar] When installing on Windows, run cygpath over $(HADDOCKLIB) so that haddock (a mingw program, built by GHC) can understand it. You still need to be in a cygwin environment to run Haddock, because of the shell script wrapper. - - - - - d4f638de by Simon Marlow at 2003-05-06T10:04:47+00:00 [haddock @ 2003-05-06 10:04:47 by simonmar] Catch another case of a paragraph containing just a DocMonospaced that should turn into a DocCodeBlock. - - - - - 4162b2b9 by Simon Marlow at 2003-05-06T10:11:44+00:00 [haddock @ 2003-05-06 10:11:44 by simonmar] Add some more code-block tests. - - - - - 4f5802c8 by Simon Marlow at 2003-05-06T10:14:52+00:00 [haddock @ 2003-05-06 10:14:52 by simonmar] Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code. - - - - - ef8c45f7 by Simon Marlow at 2003-05-21T15:07:21+00:00 [haddock @ 2003-05-21 15:07:21 by simonmar] Only omit the module contents when there are no section headings at all. - - - - - bcee1e75 by Sigbjorn Finne at 2003-05-30T16:50:45+00:00 [haddock @ 2003-05-30 16:50:45 by sof] cygpath: for now, steer clear of --mixed - - - - - 30567af3 by Sigbjorn Finne at 2003-05-30T17:59:28+00:00 [haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit - - - - - b0856e7d by Simon Marlow at 2003-06-03T09:55:26+00:00 [haddock @ 2003-06-03 09:55:26 by simonmar] Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems. - - - - - 70e137ea by Simon Marlow at 2003-07-28T13:30:35+00:00 [haddock @ 2003-07-28 13:30:35 by simonmar] Add tests for a couple of bugs. - - - - - 122bd578 by Simon Marlow at 2003-07-28T13:31:25+00:00 [haddock @ 2003-07-28 13:31:25 by simonmar] Add documentation for anchors. - - - - - 0bd27cb2 by Simon Marlow at 2003-07-28T13:31:46+00:00 [haddock @ 2003-07-28 13:31:46 by simonmar] Update - - - - - 08052d42 by Simon Marlow at 2003-07-28T13:32:12+00:00 [haddock @ 2003-07-28 13:32:12 by simonmar] layout tweak. - - - - - 13942749 by Simon Marlow at 2003-07-28T13:33:03+00:00 [haddock @ 2003-07-28 13:33:03 by simonmar] Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively). - - - - - d7f493b9 by Simon Marlow at 2003-07-28T13:35:17+00:00 [haddock @ 2003-07-28 13:35:16 by simonmar] When a module A exports another module's contents via 'module B', then modules which import entities from B re-exported by A should link to B.foo rather than A.foo. See examples/Bug2.hs. - - - - - d94cf705 by Simon Marlow at 2003-07-28T13:36:14+00:00 [haddock @ 2003-07-28 13:36:14 by simonmar] Update to version 0.5 - - - - - dbb776cd by Sven Panne at 2003-07-28T14:02:43+00:00 [haddock @ 2003-07-28 14:02:43 by panne] * Updated to version 0.5 * Automagically generate configure if it is not there - - - - - 6cfeee53 by Simon Marlow at 2003-07-28T14:32:43+00:00 [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 - - - - - a1ce838f by Simon Marlow at 2003-07-28T14:33:37+00:00 [haddock @ 2003-07-28 14:33:37 by simonmar] Update for 0.5 - - - - - c0fe6493 by Simon Marlow at 2003-07-28T14:53:22+00:00 [haddock @ 2003-07-28 14:53:22 by simonmar] Markup fix - - - - - 6ea31596 by Sven Panne at 2003-07-28T16:40:45+00:00 [haddock @ 2003-07-28 16:40:45 by panne] Make it compile with GHC >= 6.01 - - - - - afcd30fc by Simon Marlow at 2003-07-30T15:04:52+00:00 [haddock @ 2003-07-30 15:04:52 by simonmar] Pay attention to import specs when building the the import env, as well as the orig env. This may fix some wrong links in documentation when import specs are being used. - - - - - 17c3137f by Simon Marlow at 2003-07-30T16:05:41+00:00 [haddock @ 2003-07-30 16:05:40 by simonmar] Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup. - - - - - 3d3b5c87 by Sven Panne at 2003-08-04T10:18:24+00:00 [haddock @ 2003-08-04 10:18:24 by panne] Don't print parentheses around one-element contexts - - - - - 9e3f3f2d by Simon Marlow at 2003-08-04T12:59:47+00:00 [haddock @ 2003-08-04 12:59:47 by simonmar] A couple of TODOs. - - - - - e9d8085c by Simon Marlow at 2003-08-05T14:10:31+00:00 [haddock @ 2003-08-05 14:10:31 by simonmar] I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it. - - - - - ff5c7d6d by Simon Marlow at 2003-08-15T14:42:59+00:00 [haddock @ 2003-08-15 14:42:59 by simonmar] Convert the lexer to Alex, and fix a bug in the process. - - - - - 1aa077bf by Simon Marlow at 2003-08-15T15:00:18+00:00 [haddock @ 2003-08-15 15:00:18 by simonmar] Update - - - - - d3de1e38 by Simon Marlow at 2003-08-15T15:01:03+00:00 [haddock @ 2003-08-15 15:01:03 by simonmar] wibbles - - - - - b40ece3b by Simon Marlow at 2003-08-18T10:04:47+00:00 [haddock @ 2003-08-18 10:04:47 by simonmar] Lex the 'mdo' keyword as 'do'. - - - - - 8f9a1146 by Simon Marlow at 2003-08-18T11:48:24+00:00 [haddock @ 2003-08-18 11:48:24 by simonmar] Two bugs from Sven. - - - - - ea54ebc0 by Simon Marlow at 2003-08-18T11:48:46+00:00 [haddock @ 2003-08-18 11:48:46 by simonmar] Fixes to the new lexer. - - - - - d5f6a4b5 by Simon Marlow at 2003-08-19T09:09:03+00:00 [haddock @ 2003-08-19 09:09:03 by simonmar] Further wibbles to the syntax. - - - - - 6bbdadb7 by Sven Panne at 2003-08-26T18:45:35+00:00 [haddock @ 2003-08-26 18:45:35 by panne] Use autoreconf instead of autoconf - - - - - 32e889cb by Sven Panne at 2003-08-26T19:01:19+00:00 [haddock @ 2003-08-26 19:01:18 by panne] Made option handling a bit more consistent with other tools, in particular: Every program in fptools should output * version info on stdout and terminate successfully when -V or --version * usage info on stdout and terminate successfully when -? or --help * usage info on stderr and terminate unsuccessfully when an unknown option is given. - - - - - 5d156a91 by Sven Panne at 2003-08-26T19:20:55+00:00 [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag - - - - - e6577265 by Sven Panne at 2003-08-27T07:50:03+00:00 [haddock @ 2003-08-27 07:50:02 by panne] * Made -D a short option for --dump-interface. * Made -m a short option for --ms-help. * Made -n a short option for --no-implicit-prelude. * Made -c a short option for --css. * Removed DocBook options from executable (they didn't do anything), but mark them as reserved in the docs. Note that the short option for DocBook output is now -S (from SGML) instead of -d. The latter is now a short option for --debug. * The order of the Options in the documentation now matches the order printed by Haddock itself. Note: Although changing the names of options is often a bad idea, I'd really like to make the options for the programs in fptools more consistent and compatible to the ones used in common GNU programs. - - - - - d303ff98 by Simon Marlow at 2003-09-10T08:23:48+00:00 [haddock @ 2003-09-10 08:23:48 by simonmar] Add doc subdir. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 9a70e46a by Simon Marlow at 2003-09-10T08:24:32+00:00 [haddock @ 2003-09-10 08:24:32 by simonmar] Install these files in $(datadir), not $(libdir), since they're architecture independent. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - bbb87e7a by Simon Marlow at 2003-09-10T08:25:31+00:00 [haddock @ 2003-09-10 08:25:31 by simonmar] Haddock's supplementary HTML bits now live in $(datadir), not $(libdir). Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 3587c24b by Simon Marlow at 2003-09-22T10:34:38+00:00 [haddock @ 2003-09-22 10:34:38 by simonmar] Allow installing of docs. - - - - - d510b517 by Sven Panne at 2003-10-11T08:10:44+00:00 [haddock @ 2003-10-11 08:10:44 by panne] Include architecture-independent files in file list - - - - - 187d7618 by Sigbjorn Finne at 2003-10-20T17:19:24+00:00 [haddock @ 2003-10-20 17:19:22 by sof] support for i-parameters + zip comprehensions - - - - - b6c7a273 by Simon Marlow at 2003-11-03T14:24:24+00:00 [haddock @ 2003-11-03 14:24:24 by simonmar] Update TODO file. - - - - - 58513e33 by Simon Marlow at 2003-11-05T11:22:04+00:00 [haddock @ 2003-11-05 11:22:04 by simonmar] Remove the last of the uses of 'trace' to emit warnings, and tidy up a couple of places where duplicate warnings were being emitted. - - - - - 33a78846 by Simon Marlow at 2003-11-05T11:30:53+00:00 [haddock @ 2003-11-05 11:30:52 by simonmar] - Suppress warnings about unknown imported modules by default. - Add a -v/--verbose flag to re-enable these warnings. The general idea is to suppress the "Warning: unknown module: Prelude" warnings which most Haddock users will see every time, and which aren't terribly useful. - - - - - a969de7f by Simon Marlow at 2003-11-05T12:30:28+00:00 [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. - - - - - f14ea82a by Simon Marlow at 2003-11-05T15:15:59+00:00 [haddock @ 2003-11-05 15:15:59 by simonmar] Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this. - - - - - 01a25ca6 by Simon Marlow at 2003-11-05T15:16:38+00:00 [haddock @ 2003-11-05 15:16:38 by simonmar] Update - - - - - 1a7ccb86 by Simon Marlow at 2003-11-05T17:16:05+00:00 [haddock @ 2003-11-05 17:16:04 by simonmar] Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up. - - - - - a2bca16d by Simon Marlow at 2003-11-06T10:44:52+00:00 [haddock @ 2003-11-06 10:44:52 by simonmar] Include iface_reexported in the .haddock file. This unfortunately bloats the file (40% for base). If this gets to be a problem we can always apply the dictionary trick that GHC uses for squashing .hi files. - - - - - 0a09c293 by Simon Marlow at 2003-11-06T12:39:47+00:00 [haddock @ 2003-11-06 12:39:46 by simonmar] - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo at . -- -- [@bar@] The description of @bar at . Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added. - - - - - fe1b3460 by Simon Marlow at 2003-11-06T14:47:36+00:00 [haddock @ 2003-11-06 14:47:36 by simonmar] Remove the 'Parent' button - it is of dubious use, and often points into thin air. - - - - - db6d762f by Simon Marlow at 2003-11-06T16:48:14+00:00 [haddock @ 2003-11-06 16:48:11 by simonmar] - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page. - - - - - 7d71718b by Simon Marlow at 2003-11-06T16:50:28+00:00 [haddock @ 2003-11-06 16:50:28 by simonmar] Add -k/--package docs - - - - - ef43949d by Simon Marlow at 2003-11-06T16:51:23+00:00 [haddock @ 2003-11-06 16:51:23 by simonmar] Bump to 0.6 - - - - - 1c419e06 by Simon Marlow at 2003-11-06T16:51:50+00:00 [haddock @ 2003-11-06 16:51:50 by simonmar] update - - - - - 69422327 by Simon Marlow at 2003-11-10T14:41:06+00:00 [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. - - - - - 3c3fc433 by Simon Marlow at 2003-11-10T14:51:59+00:00 [haddock @ 2003-11-10 14:51:59 by simonmar] Fix for getReExports: take into account names which are not visible because they are re-exported from a different package. - - - - - 31c8437b by Simon Marlow at 2003-11-10T15:10:53+00:00 [haddock @ 2003-11-10 15:10:53 by simonmar] Version 0.6 changes - - - - - a7c2430b by Simon Marlow at 2003-11-10T15:15:58+00:00 [haddock @ 2003-11-10 15:15:58 by simonmar] getReExports: one error case that isn't - - - - - 00cc459c by Simon Marlow at 2003-11-10T16:15:19+00:00 [haddock @ 2003-11-10 16:15:18 by simonmar] copyright update - - - - - ca62408d by Simon Marlow at 2003-11-11T09:57:25+00:00 [haddock @ 2003-11-11 09:57:25 by simonmar] Version 0.6 - - - - - 3acbf818 by Simon Marlow at 2003-11-11T12:10:44+00:00 [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. - - - - - 6c90abc2 by Simon Marlow at 2003-11-12T10:03:39+00:00 [haddock @ 2003-11-12 10:03:39 by simonmar] 2002 -> 2003 - - - - - 090bbc4c by Simon Marlow at 2003-11-28T12:08:00+00:00 [haddock @ 2003-11-28 12:08:00 by simonmar] update - - - - - 8096a832 by Simon Marlow at 2003-11-28T12:09:58+00:00 [haddock @ 2003-11-28 12:09:58 by simonmar] Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it. - - - - - 35294929 by Sven Panne at 2003-12-29T17:16:31+00:00 [haddock @ 2003-12-29 17:16:31 by panne] Updated my email address - - - - - cdb697bf by Simon Marlow at 2004-01-08T10:14:24+00:00 [haddock @ 2004-01-08 10:14:24 by simonmar] Add instructions for using GHC to pre-process source for feeding to Haddock. - - - - - 8dfc491f by Simon Marlow at 2004-01-09T12:45:46+00:00 [haddock @ 2004-01-09 12:45:46 by simonmar] Add -optP-P to example ghc command line. - - - - - ac41b820 by Simon Marlow at 2004-02-03T11:02:03+00:00 [haddock @ 2004-02-03 11:02:03 by simonmar] Fix bug in index generation - - - - - f4e7edcb by Simon Marlow at 2004-02-10T11:51:16+00:00 [haddock @ 2004-02-10 11:51:16 by simonmar] Don't throw away whitespace at the beginning of a line (experimental fix). - - - - - 68e212d2 by Simon Marlow at 2004-02-10T12:10:08+00:00 [haddock @ 2004-02-10 12:10:08 by simonmar] Fix for previous commit: I now realise why the whitespace was stripped from the beginning of the line. Work around it. - - - - - e7d7f2df by Sven Panne at 2004-02-10T18:38:45+00:00 [haddock @ 2004-02-10 18:38:45 by panne] Make Haddock link with the latest relocated monad transformer package - - - - - 992d4225 by Simon Marlow at 2004-02-16T10:21:35+00:00 [haddock @ 2004-02-16 10:21:35 by simonmar] Add a TODO - - - - - 1ac55326 by Simon Marlow at 2004-03-12T11:33:39+00:00 [haddock @ 2004-03-12 11:33:39 by simonmar] Add an item. - - - - - 0478e903 by Simon Marlow at 2004-03-15T12:24:05+00:00 [haddock @ 2004-03-15 12:24:05 by simonmar] Add an item. - - - - - 6f26d21a by Simon Marlow at 2004-03-18T14:21:29+00:00 [haddock @ 2004-03-18 14:21:29 by simonmar] Fix URL - - - - - 19b6bb99 by Simon Marlow at 2004-03-22T14:09:03+00:00 [haddock @ 2004-03-22 14:09:03 by simonmar] getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me). - - - - - 5c756031 by Simon Marlow at 2004-03-24T09:42:11+00:00 [haddock @ 2004-03-24 09:42:10 by simonmar] hiding bug from Ross Paterson (fixed in rev 1.59 of Main.hs) - - - - - 1b692e6c by Simon Marlow at 2004-03-24T10:10:50+00:00 [haddock @ 2004-03-24 10:10:50 by simonmar] mkExportItems fix & simplification: we should be looking at the actual exported names (calculated earlier) to figure out which subordinates of a declaration are exported. This means that if you export a record, and name its fields separately in the export list, the fields will still be visible in the documentation for the constructor. - - - - - 90e5e294 by Simon Marlow at 2004-03-24T10:12:08+00:00 [haddock @ 2004-03-24 10:12:08 by simonmar] Make restrictCons take into account record field names too (removing a ToDo). - - - - - 2600efa4 by Simon Marlow at 2004-03-24T10:16:17+00:00 [haddock @ 2004-03-24 10:16:17 by simonmar] Record export tests. - - - - - 6a8575c7 by Simon Marlow at 2004-03-25T09:35:14+00:00 [haddock @ 2004-03-25 09:35:14 by simonmar] restrictTo: fix for restricting a newtype with a record field. - - - - - dcf55a8d by Simon Marlow at 2004-03-25T10:01:42+00:00 [haddock @ 2004-03-25 10:01:42 by simonmar] Fix duplicate instance bug - - - - - f49aa758 by Simon Marlow at 2004-03-25T10:02:41+00:00 [haddock @ 2004-03-25 10:02:41 by simonmar] Duplicate instance bug. - - - - - 7b87344c by Simon Marlow at 2004-03-25T10:29:56+00:00 [haddock @ 2004-03-25 10:29:56 by simonmar] If a name is imported from two places, one hidden and one not, choose the unhidden one to link to. Also, when there's only a hidden module to link to, don't try linking to it. - - - - - 40f44d7b by Simon Marlow at 2004-03-25T15:17:24+00:00 [haddock @ 2004-03-25 15:17:23 by simonmar] Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment. - - - - - 9b64dc0f by Simon Marlow at 2004-03-25T15:20:55+00:00 [haddock @ 2004-03-25 15:20:55 by simonmar] Update - - - - - c2fff7f2 by Simon Marlow at 2004-03-25T15:45:10+00:00 [haddock @ 2004-03-25 15:45:10 by simonmar] Eliminate some unnecessary spaces in the HTML rendering - - - - - b7948ff0 by Simon Marlow at 2004-03-25T16:00:37+00:00 [haddock @ 2004-03-25 16:00:36 by simonmar] Remove all that indentation in the generated HTML to keep the file sizes down. - - - - - da2bb4ca by Sven Panne at 2004-03-27T09:57:58+00:00 [haddock @ 2004-03-27 09:57:57 by panne] Added the new-born haddock.js to the build process and the documentation. - - - - - b99e6f8c by Sven Panne at 2004-03-27T10:32:20+00:00 [haddock @ 2004-03-27 10:32:20 by panne] "type" is a required attribute of the "script" element - - - - - 562b185a by Sven Panne at 2004-03-27T12:52:34+00:00 [haddock @ 2004-03-27 12:52:34 by panne] Add a doctype for the contents page, too. - - - - - f6a99c2d by Simon Marlow at 2004-04-14T10:03:25+00:00 [haddock @ 2004-04-14 10:03:25 by simonmar] fix for single-line comment syntax - - - - - de366303 by Simon Marlow at 2004-04-20T13:08:04+00:00 [haddock @ 2004-04-20 13:08:04 by simonmar] Allow a 'type' declaration to include documentation comments. These will be ignored by Haddock, but at least one user (Johannes Waldmann) finds this feature useful, and it's easy to add. - - - - - fd78f51e by Simon Marlow at 2004-05-07T15:14:56+00:00 [haddock @ 2004-05-07 15:14:56 by simonmar] - update copyright - add version to abstract - - - - - 59f53e32 by Sven Panne at 2004-05-09T14:39:53+00:00 [haddock @ 2004-05-09 14:39:53 by panne] Fix the fix for single-line comment syntax, ------------------------------------------- is now a valid comment line again. - - - - - 8b18f2fe by Simon Marlow at 2004-05-10T10:11:51+00:00 [haddock @ 2004-05-10 10:11:51 by simonmar] Update - - - - - 225a491d by Ross Paterson at 2004-05-19T13:10:23+00:00 [haddock @ 2004-05-19 13:10:23 by ross] Make the handling of "deriving" slightly smarter, by ignoring data constructor arguments that are identical to the lhs. Now handles things like data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ... - - - - - 37588686 by Mike Thomas at 2004-05-21T06:38:14+00:00 [haddock @ 2004-05-21 06:38:14 by mthomas] Windows exe extensions (bin remains for Unix). - - - - - cf2b9152 by Simon Marlow at 2004-05-25T09:34:54+00:00 [haddock @ 2004-05-25 09:34:54 by simonmar] Add some TODO items - - - - - 4d29cdfc by Simon Marlow at 2004-05-25T10:41:46+00:00 [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. - - - - - 2e0771e0 by Mike Thomas at 2004-05-28T20:17:55+00:00 [haddock @ 2004-05-28 20:17:55 by mthomas] Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg. - - - - - 8d10bde1 by Sven Panne at 2004-06-05T16:53:34+00:00 [haddock @ 2004-06-05 16:53:34 by panne] Misc. rpm spec file cleanup, including: * make BuildRoot handling more consistent * added default file attributes * consistent defines and tags - - - - - 59974349 by Sven Panne at 2004-06-05T18:01:00+00:00 [haddock @ 2004-06-05 18:01:00 by panne] More rpm spec file cleanup, including: * added some BuildRequires * changed packager to me, so people can complain at the right place :-] * consistently refer to haskell.org instead of www.haskell.org - - - - - b94d4903 by Simon Marlow at 2004-07-01T11:08:58+00:00 [haddock @ 2004-07-01 11:08:57 by simonmar] Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead. - - - - - d5278f67 by Sven Panne at 2004-07-04T15:15:55+00:00 [haddock @ 2004-07-04 15:15:55 by panne] Install pictures for +/- pictures, too (JPEG is a strange format for graphics like this, I would have expected GIF or PNG here.) Things look fine with Konqueror and Netscape on Linux now, the only downside is that the cursor doesn't change when positioned above the "button". - - - - - 46dec6c5 by Sven Panne at 2004-07-13T17:59:28+00:00 [haddock @ 2004-07-13 17:59:28 by panne] A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there. - - - - - 1d7bc432 by Simon Marlow at 2004-07-22T08:54:06+00:00 [haddock @ 2004-07-22 08:54:06 by simonmar] Add single quote to $ident, so you can say eg. 'foldl'' to refer to foldl' (the longest match rule is our friend). Bug reported by Adrian Hey <ahey at iee.org> - - - - - f183618b by Krasimir Angelov at 2004-07-27T22:59:35+00:00 [haddock @ 2004-07-27 22:58:23 by krasimir] Add basic support for Microsoft HTML Help 2.0 - - - - - d515d0c2 by Krasimir Angelov at 2004-07-27T23:02:36+00:00 [haddock @ 2004-07-27 23:02:36 by krasimir] escape names in the index - - - - - a5f1be23 by Krasimir Angelov at 2004-07-27T23:05:21+00:00 [haddock @ 2004-07-27 23:05:21 by krasimir] Add jsFile, plusFile and minusFile to the file list - - - - - c4fb4881 by Krasimir Angelov at 2004-07-28T22:12:10+00:00 [haddock @ 2004-07-28 22:12:09 by krasimir] bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs - - - - - 64d30b1d by Krasimir Angelov at 2004-07-30T22:15:47+00:00 [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug - - - - - 133c8c5c by Krasimir Angelov at 2004-07-31T12:04:38+00:00 [haddock @ 2004-07-31 12:04:37 by krasimir] make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful. - - - - - 79040963 by Krasimir Angelov at 2004-07-31T13:10:20+00:00 [haddock @ 2004-07-31 13:10:20 by krasimir] Make DHtmlTree compatible with Mozila browser - - - - - 1a55dc90 by Krasimir Angelov at 2004-07-31T14:52:55+00:00 [haddock @ 2004-07-31 14:52:55 by krasimir] fix - - - - - 85ce0237 by Krasimir Angelov at 2004-07-31T14:53:28+00:00 [haddock @ 2004-07-31 14:53:28 by krasimir] HtmlHelp 1.x - - - - - 3c0c53ba by Krasimir Angelov at 2004-07-31T20:35:21+00:00 [haddock @ 2004-07-31 20:35:21 by krasimir] Added support for DevHelp - - - - - d42b5af1 by Krasimir Angelov at 2004-07-31T21:17:51+00:00 [haddock @ 2004-07-31 21:17:51 by krasimir] Document new features in HtmlHelp - - - - - 790fe21e by Krasimir Angelov at 2004-08-01T15:14:02+00:00 [haddock @ 2004-08-01 15:14:02 by krasimir] add missing imports - - - - - fd7cc6bc by Krasimir Angelov at 2004-08-01T19:52:08+00:00 [haddock @ 2004-08-01 19:52:06 by krasimir] fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format. - - - - - 94ad7ac8 by Krasimir Angelov at 2004-08-01T19:53:50+00:00 [haddock @ 2004-08-01 19:53:50 by krasimir] I forgot to add the new +/- images - - - - - f0c65388 by Krasimir Angelov at 2004-08-02T16:25:53+00:00 [haddock @ 2004-08-02 16:25:53 by krasimir] Add root node to the table of contents. All modules in tree are not children of the root - - - - - f50bd85d by Sven Panne at 2004-08-02T18:17:46+00:00 [haddock @ 2004-08-02 18:17:46 by panne] Mainly DocBook fixes - - - - - 09527ce3 by Sven Panne at 2004-08-02T20:02:29+00:00 [haddock @ 2004-08-02 20:02:29 by panne] Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays... - - - - - c8fbacfa by Sven Panne at 2004-08-02T20:31:13+00:00 [haddock @ 2004-08-02 20:31:13 by panne] Warning police - - - - - 37830bff by Sven Panne at 2004-08-02T20:32:29+00:00 [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code - - - - - 13847171 by Sven Panne at 2004-08-02T21:12:27+00:00 [haddock @ 2004-08-02 21:12:25 by panne] Use pathJoin instead of low-level list-based manipulation for FilePaths - - - - - c711d61e by Sven Panne at 2004-08-02T21:16:02+00:00 [haddock @ 2004-08-02 21:16:02 by panne] Removed WinDoze CRs - - - - - b1f7dc88 by Sven Panne at 2004-08-03T19:35:59+00:00 [haddock @ 2004-08-03 19:35:59 by panne] Fixed spelling of "http-equiv" attribute - - - - - dd5f394e by Sven Panne at 2004-08-03T19:44:03+00:00 [haddock @ 2004-08-03 19:44:03 by panne] Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before) - - - - - 919c47c6 by Sigbjorn Finne at 2004-08-03T19:45:11+00:00 [haddock @ 2004-08-03 19:45:11 by sof] make it compile with <= ghc-6.1 - - - - - 4d6f01d8 by Sigbjorn Finne at 2004-08-03T19:45:30+00:00 [haddock @ 2004-08-03 19:45:30 by sof] ffi wibble - - - - - 4770643a by Sven Panne at 2004-08-03T20:47:46+00:00 [haddock @ 2004-08-03 20:47:46 by panne] Fixed CSS for button style. Note that only "0" is a valid measure without a unit! - - - - - 14aaf2e5 by Sven Panne at 2004-08-03T21:07:59+00:00 [haddock @ 2004-08-03 21:07:58 by panne] Improved spacing of dynamic module tree - - - - - 97c3579a by Simon Marlow at 2004-08-09T11:03:04+00:00 [haddock @ 2004-08-09 11:03:04 by simonmar] Add FormatVersion Patch submitted by: George Russell <ger at informatik.uni-bremen.de> - - - - - af7f8c03 by Simon Marlow at 2004-08-09T11:55:07+00:00 [haddock @ 2004-08-09 11:55:05 by simonmar] Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger at informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header. - - - - - 7b865ad3 by Simon Marlow at 2004-08-10T14:09:57+00:00 [haddock @ 2004-08-10 14:09:57 by simonmar] Fixes for DevHelp/HtmlHelp following introduction of short module description. - - - - - 814766cd by Simon Marlow at 2004-08-10T14:33:46+00:00 [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. - - - - - 39cf9ede by Simon Marlow at 2004-08-12T12:08:23+00:00 [haddock @ 2004-08-12 12:08:23 by simonmar] Avoid using string-gap tricks. - - - - - b6d78551 by Simon Marlow at 2004-08-13T10:53:21+00:00 [haddock @ 2004-08-13 10:53:21 by simonmar] Update - - - - - eaae7417 by Simon Marlow at 2004-08-13T10:53:50+00:00 [haddock @ 2004-08-13 10:53:50 by simonmar] Test for primes in quoted links - - - - - 68c34f06 by Sven Panne at 2004-08-16T19:59:38+00:00 [haddock @ 2004-08-16 19:59:36 by panne] XMLification - - - - - 7f45a6f9 by Sven Panne at 2004-08-18T16:42:54+00:00 [haddock @ 2004-08-18 16:42:54 by panne] Re-added indices + minor fixes - - - - - 8a5dd97c by Sigbjorn Finne at 2004-08-25T17:15:42+00:00 [haddock @ 2004-08-25 17:15:42 by sof] backquote HADDOCK_VERSION defn for <= ghc-6.0.x; believe this is only needed under mingw - - - - - 4b1b42ea by Sven Panne at 2004-08-26T20:08:50+00:00 [haddock @ 2004-08-26 20:08:49 by panne] SGML is dead, long live DocBook XML! Note: The BuildRequires tags in the spec files are still incomplete and the documentation about the DocBook tools needs to be updated, too. Stay tuned... - - - - - 8d52cedb by Sven Panne at 2004-08-26T21:03:19+00:00 [haddock @ 2004-08-26 21:03:19 by panne] Updated BuildRequires tags. Alas, there seems to be no real standard here, so your mileage may vary... At least the current specs should work on SuSE Linux. - - - - - e6982912 by Sigbjorn Finne at 2004-08-30T15:44:59+00:00 [haddock @ 2004-08-30 15:44:59 by sof] escape HADDOCK_VERSION double quotes on all platforms when compiling with <=6.0.x - - - - - b3fbc867 by Simon Marlow at 2004-08-31T13:09:42+00:00 [haddock @ 2004-08-31 13:09:42 by simonmar] Avoid GHC/shell versionitis and create Version.hs - - - - - c359e16a by Sven Panne at 2004-09-05T19:12:33+00:00 [haddock @ 2004-09-05 19:12:32 by panne] * HTML documentation for "foo.xml" goes into directory "foo" again, not "foo-html". This is nicer and consistent with the behaviour for building the docs from SGML. * Disabled building PostScript documentation in the spec files for now, there are some strange issues with the FO->PS conversion for some files which have to be clarified first. - - - - - c68b1eba by Sven Panne at 2004-09-24T07:04:38+00:00 [haddock @ 2004-09-24 07:04:38 by panne] Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable. - - - - - dfb32615 by Simon Marlow at 2004-09-30T08:21:29+00:00 [haddock @ 2004-09-30 08:21:29 by simonmar] Add a feature request - - - - - 45ff783c by Sven Panne at 2004-10-23T19:54:00+00:00 [haddock @ 2004-10-23 19:54:00 by panne] Improved the Cygwin/MinGW chaos a little bit. There is still confusion about host platform vs. target platform... - - - - - 5f644714 by Krasimir Angelov at 2004-10-28T16:01:51+00:00 [haddock @ 2004-10-28 16:01:51 by krasimir] update for ghc-6.3+ - - - - - 92d9753e by Sven Panne at 2004-11-01T16:39:01+00:00 [haddock @ 2004-11-01 16:39:01 by panne] Revert previous commit: It's Network.URI which should be changed, not Haddock. - - - - - 05f70f6e by Simon Marlow at 2005-01-04T16:15:51+00:00 [haddock @ 2005-01-04 16:15:51 by simonmar] parser fix: allow qualified specialids. - - - - - 47870837 by Simon Marlow at 2005-01-04T16:16:54+00:00 [haddock @ 2005-01-04 16:16:54 by simonmar] Add a test - - - - - ff11fc2c by Ross Paterson at 2005-01-10T19:18:22+00:00 [haddock @ 2005-01-10 19:18:22 by ross] Render non-ASCII characters using numeric character references, to simplify charset issues. There's a META tag saying the charset is UTF-8, but GHC outputs characters as raw bytes. Ideally we need an encoding on the input side too, primarily in comments, because source files containing non-ASCII characters aren't portable between locales. - - - - - eba2fc4e by Simon Marlow at 2005-01-11T10:44:37+00:00 [haddock @ 2005-01-11 10:44:37 by simonmar] Remove string gap - - - - - b899a381 by Ross Paterson at 2005-01-13T11:41:33+00:00 [haddock @ 2005-01-13 11:41:33 by ross] recognize SGML-style numeric character references &#ddd; or &#xhhhh; and translate them into Chars. - - - - - 106e3cf0 by Ross Paterson at 2005-01-13T14:43:41+00:00 [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) - - - - - e8f54f25 by Ross Paterson at 2005-01-13T14:44:24+00:00 [haddock @ 2005-01-13 14:44:24 by ross] Describe numeric character references. - - - - - 914ccdce by Sven Panne at 2005-01-15T18:44:48+00:00 [haddock @ 2005-01-15 18:44:45 by panne] Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later. - - - - - 6ab20e84 by Sven Panne at 2005-01-16T12:18:26+00:00 [haddock @ 2005-01-16 12:18:26 by panne] Trim imports - - - - - efb81da9 by Sven Panne at 2005-01-16T12:58:08+00:00 [haddock @ 2005-01-16 12:58:03 by panne] Correctly handle the new order of arguments for the combining function given to fromListWith. - - - - - e27b5834 by Sven Panne at 2005-01-16T14:14:41+00:00 [haddock @ 2005-01-16 14:14:39 by panne] Data.Map.unions is left-biased. - - - - - dae3cc3e by Sven Panne at 2005-01-16T14:22:44+00:00 [haddock @ 2005-01-16 14:22:44 by panne] Added the last missing "flip" to get identical HTML output as previous versions. - - - - - 951d8408 by Sven Panne at 2005-01-16T14:37:10+00:00 [haddock @ 2005-01-16 14:37:10 by panne] Refactored Text.PrettyPrint legacy hell into a separate module. - - - - - f1c4b892 by Sven Panne at 2005-01-16T15:41:25+00:00 [haddock @ 2005-01-16 15:41:21 by panne] Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway. - - - - - 60824c6e by Simon Marlow at 2005-01-18T10:02:48+00:00 [haddock @ 2005-01-18 10:02:48 by simonmar] Add a TODO - - - - - a8c82f23 by Krasimir Angelov at 2005-01-28T23:19:39+00:00 [haddock @ 2005-01-28 23:19:39 by krasimir] import Foreign/Foreign.C are required for Windows - - - - - d8450a23 by Simon Marlow at 2005-02-02T16:23:04+00:00 [haddock @ 2005-02-02 16:23:00 by simonmar] Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning. - - - - - 1cce71d0 by Simon Marlow at 2005-02-03T13:42:19+00:00 [haddock @ 2005-02-03 13:42:19 by simonmar] - add --ignore-all-exports flag, which behaves as if every module has the ignore-exports attribute (requested by Chris Ryder). - add --hide option to hide a module on the command line. - add --use-package option to get Haddock info for a package from ghc-pkg (largely untested). - remove reexports from the .haddock file, they aren't used any more. - - - - - 767123ef by Ross Paterson at 2005-02-03T16:17:37+00:00 [haddock @ 2005-02-03 16:17:37 by ross] fix typo for < 6.3 - - - - - 0c680c04 by Simon Marlow at 2005-02-04T12:03:31+00:00 [haddock @ 2005-02-04 12:03:31 by simonmar] Fix bug in renameExportItems that meant links in instances weren't being renamed properly. - - - - - ff7abe5f by Simon Marlow at 2005-02-04T12:15:53+00:00 [haddock @ 2005-02-04 12:15:52 by simonmar] Add attribute #not-home, to indicate that the current module should not be considered to be a home module for the each entity it exports, unless there is no other module that exports the entity. - - - - - fc2cfd27 by Simon Marlow at 2005-02-04T12:40:02+00:00 [haddock @ 2005-02-04 12:40:02 by simonmar] Update the documentation w.r.t. home modules and the not-home attribute. - - - - - 26b8ddf7 by Ross Paterson at 2005-02-04T13:36:06+00:00 [haddock @ 2005-02-04 13:36:05 by ross] sort lists of instances by - arity of the type constructors (so higher-kinded instances come first) - name of the class - argument types - - - - - 26bfb19c by Simon Marlow at 2005-02-23T15:57:12+00:00 [haddock @ 2005-02-23 15:57:12 by simonmar] Fix documentation regarding the module attributes. - - - - - 9c3afd02 by Simon Marlow at 2005-02-28T16:18:17+00:00 [haddock @ 2005-02-28 16:18:17 by simonmar] version 0.7 - - - - - a95fd63f by Simon Marlow at 2005-02-28T16:22:08+00:00 [haddock @ 2005-02-28 16:22:08 by simonmar] Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results. - - - - - 905d42f7 by Simon Marlow at 2005-03-01T17:16:42+00:00 [haddock @ 2005-03-01 17:16:40 by simonmar] Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case). - - - - - a0e1d178 by Wolfgang Thaller at 2005-03-09T08:28:39+00:00 [haddock @ 2005-03-09 08:28:39 by wolfgang] Hack haddock's lexer to accept the output from Apple's broken version of cpp (Apple's cpp leaves #pragma set_debug_pwd directives in it's output). - - - - - 9e1eb784 by Simon Marlow at 2005-04-22T14:27:15+00:00 [haddock @ 2005-04-22 14:27:15 by simonmar] Add a TODO item - - - - - 23281f78 by Ross Paterson at 2005-05-18T12:41:59+00:00 [haddock @ 2005-05-18 12:41:59 by ross] fix 3 bugs in --use-package, and document it. - - - - - 00074a68 by Sven Panne at 2005-05-21T12:35:29+00:00 [haddock @ 2005-05-21 12:35:29 by panne] Warning/versionitis police - - - - - 341fa822 by Simon Marlow at 2005-06-15T15:43:21+00:00 [haddock @ 2005-06-15 15:43:21 by simonmar] Allow "licence" as an alternate spelling of "license" - - - - - 3b953f8b by Simon Marlow at 2005-06-16T08:14:12+00:00 [haddock @ 2005-06-16 08:14:12 by simonmar] wibble - - - - - abfd9826 by Simon Marlow at 2005-06-27T14:46:40+00:00 [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The old way confused Apache because the extensions are sometimes interpreted as having special meanings. - - - - - a01eea00 by Simon Marlow at 2005-08-04T13:59:40+00:00 [haddock @ 2005-08-04 13:59:40 by simonmar] 0.7 changes - - - - - 170ef87e by Simon Marlow at 2005-08-04T15:08:03+00:00 [haddock @ 2005-08-04 15:08:03 by simonmar] spec file from Jens Peterson - - - - - 7621fde4 by Simon Marlow at 2005-08-04T15:59:30+00:00 [haddock @ 2005-08-04 15:59:30 by simonmar] replace mingw tests with $(Windows) - - - - - a20739bb by Sven Panne at 2005-08-05T07:01:12+00:00 [haddock @ 2005-08-05 07:01:12 by panne] Reverted to previous version (but with bumped version number), the last commit broke RPM building on SuSE systems due to differently named dependencies. As a clarification: All .spec files in the repository have to work at least on SuSE, because that's the system I'm using. And as "Mr. Building Police", I reserve me the right to keep them that way... >:-) It might very well be the case that we need different .spec files for different platforms, so packagers which are unhappy with the current .spec files should contact me, stating the actual problems. - - - - - 4afb15cf by Simon Marlow at 2005-10-05T10:51:45+00:00 [haddock @ 2005-10-05 10:51:45 by simonmar] Add a bug - - - - - 60f69f82 by Simon Marlow at 2005-10-05T12:52:03+00:00 [haddock @ 2005-10-05 12:52:03 by simonmar] Document new behaviour of -s option - - - - - f7e520ca by Simon Marlow at 2005-10-10T15:02:55+00:00 [haddock @ 2005-10-10 15:02:55 by simonmar] extractRecSel: ignore non-record constructors (fixes a crash when using datatypes with a mixture of record and non-record style constructors). - - - - - b2edbedb by Simon Marlow at 2005-10-14T09:44:21+00:00 Start CHANGES for 0.8 - - - - - 21c7ac8d by Simon Marlow at 2005-10-14T23:11:19+00:00 First cut of Cabal build system - - - - - 766cecdd by Simon Marlow at 2005-10-29T08:14:43+00:00 Add configure script and Makefile for the docs Add a separate configure script and build system for building the documentation. The configure and Makefile code is stolen from fptools. This is left as a separate build system so that the main Cabal setup doesn't require a Unix build environment or DocBook XML tools. - - - - - aa36c783 by Duncan Coutts at 2006-01-17T19:29:55+00:00 Add a --wiki=URL flag to add a per-module link to a correspondng wiki page. So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option. - - - - - e06e2da2 by Simon Marlow at 2006-01-18T09:28:15+00:00 TODO: documnet --wiki - - - - - 17adfda9 by Duncan Coutts at 2006-01-19T20:17:59+00:00 Add an optional wiki link for each top level exported name. In each module, for each "top level" exported entity we add a hyper link to a corresponding wiki page. The link url gets the name of the exported entity as a '#'-style anchor, so if there is an anchor in the page with that name then the users browser should jump directly to it. By "top level" we mean functions, classes, class members and data types (data, type, newtype), but not data constructors, class instances or data type class membership. The link is added at the right of the page and in a small font. Hopefully this is the right balance of visibility/distraction. We also include a link to the wiki base url in the contents and index pages. - - - - - f52324bb by Duncan Coutts at 2006-01-19T20:28:27+00:00 Rewrite pathJoin to only add a path separator when necessary. When the path ends in a file seperator there is no need to add another. Now using "--wiki=http://blah.com/foo/" should do the right thing. (Code snippet adapted from Isaac's FilePath package.) - - - - - 43bb89fa by Duncan Coutts at 2006-01-21T17:15:27+00:00 Teach haddock about line pragmas and add accurate source code links Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's source location tracking to include the file name as well as line/column. This way each AST item that is tagged with a SrcLoc gets the original file name too. Use this original file name to add source links to each exported item, in the same visual style as the wiki links. Note that the per-export source links are to the defining module rather than whichever module haddock pretends it is exported from. This is what we want for source code links. The source code link URL can also contain the name of the export so one could implement jumping to the actual location of the function in the file if it were linked to an html version of the source rather than just plain text. The name can be selected with the %N wild card. So for linking to the raw source code one might use: --source=http://darcs/haskell.org/foo/%F Or for linking to html syntax highlighted code: --source=http://darcs/haskell.org/foo/%M.html#%N - - - - - edd9f229 by Duncan Coutts at 2006-01-22T00:02:00+00:00 Extend URL variable expansion syntax and add source links to the contents page Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module. - - - - - eb3c6ada by Duncan Coutts at 2006-01-23T13:42:34+00:00 Remove the complex substitutions and add more command line flags instead. Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now use three seperate command line flags for the top level, per-module and per-entity source and wiki links. They are: --source-base, --source-module, --source-entity --comments-base, --comments-module, --comments-entity We leave -s, --source as an alias for --source-module which is how that option behaved previously. The long forms of the substitutions are still available, ${FILE} ${MODULE} etc and the only non-trivial substitution is ${MODULE/./c} to replace the '.' characters in the module name with any other character c. eg ${MODULE/./-} Seperating the source and wiki url flags has the added bonus that they can be turned on or off individually. So users can have per-module links for example without having to also have per-entity links.` - - - - - a2f0f2af by Duncan Coutts at 2006-01-23T13:54:52+00:00 Make the --help output fit in 80 columns. This is a purely cosmetic patch, feel free to ignore it. The only trickery going on is that we don't display the deprecated -s, --source flags in the help message, but we do still accept them. - - - - - 2d3a4b0c by Duncan Coutts at 2006-01-23T14:12:16+00:00 Add documentation for the new --source-* and --comments-* command line options - - - - - 1a82a297 by Simon Marlow at 2006-01-23T17:03:27+00:00 fix markup - - - - - 100d464a by Duncan Coutts at 2006-01-23T18:31:13+00:00 remove a couple TODO items that have been done The --wiki, or rather the --comment-* options are now documented. There is probably no need to have haddock invoke unlit or cpp itself since it can now pick up the line pragmas to get the source locations right. Tools like Cabal will arrange for preprocessors to be run so there is less of a need for tools like haddock to do it themselves. - - - - - 3162fa91 by Simon Marlow at 2006-01-24T14:21:56+00:00 add a test I had lying around - - - - - 98947063 by Simon Marlow at 2006-01-31T13:52:54+00:00 add scabal-version field - - - - - c41876e6 by Neil Mitchell at 2006-02-26T17:48:21+00:00 Add Hoogle output option - - - - - f86fb9c0 by Simon Marlow at 2006-03-08T09:15:20+00:00 add haskell.vim Contributed by Brad Bowman <bsb at bereft.net>, thanks! - - - - - 35d3c511 by benjamin.franksen at 2006-03-03T22:39:54+00:00 fixed libdir (/html was missing) - - - - - 4d08fd7d by Simon Marlow at 2006-03-10T11:13:31+00:00 add PatternGuards extension - - - - - 3f095e70 by Simon Marlow at 2006-03-13T11:40:42+00:00 bug fixes from Brad Bowman - - - - - 8610849d by Sven Panne at 2006-03-19T17:02:56+00:00 Fixed Cabal/RPM build - - - - - 34a994d6 by sven.panne at 2006-04-20T12:39:23+00:00 Avoid pattern guards Due to the use of pattern guards in Haddock, GHC was called with -fglasgow-exts. This in turn enables bang patterns, too, which broke the Haddock build. Removing some unnecessary pattern guards seemed to be the better way of fixing this instead of using a pragma to disable pattern guards. - - - - - bb523f51 by Ross Paterson at 2006-04-24T09:03:25+00:00 extend 'deriving' heuristic a little If an argument of a data constructor has a type variable head, it is irreducible and the same type class can be copied into the constraint. (Formerly we just did this for type variable arguments.) - - - - - dab9fe7a by Simon Marlow at 2006-04-26T10:02:31+00:00 record an idea - - - - - 748b7078 by Simon Marlow at 2006-05-08T08:28:53+00:00 add section about deriving - - - - - 11252ea1 by Simon Marlow at 2006-05-24T15:43:10+00:00 replace a fatal error in lexChar with a parseError - - - - - 382c9411 by Simon Marlow at 2006-05-24T15:45:47+00:00 add a bug - - - - - b79272f5 by Simon Marlow at 2006-05-24T15:46:29+00:00 add a bug report - - - - - 912edf65 by David Waern at 2006-07-10T19:09:23+00:00 Initial modifications -- doesn't compile - - - - - a3c7ba99 by David Waern at 2006-07-11T00:54:19+00:00 More porting work -- doesn't compile - - - - - 0a173d19 by David Waern at 2006-07-11T11:30:03+00:00 Make the repos temporarily compile and illustrate a problem - - - - - bad316de by David Waern at 2006-07-11T15:43:47+00:00 Progress on the porting process - - - - - bbf12d02 by David Waern at 2006-07-11T23:07:44+00:00 More progress on the porting -- first pass starting to shape up - - - - - de580ba2 by David Waern at 2006-07-20T17:48:30+00:00 More progress -- still on phase1 - - - - - 75a917a2 by David Waern at 2006-07-23T18:22:43+00:00 More work on pass1 -- mostly done - - - - - 6697b3f7 by David Waern at 2006-07-23T22:17:40+00:00 More work, started working on the renaming phase -- this code will need a cleanup soon :) - - - - - 82a5bcbb by David Waern at 2006-07-29T16:16:43+00:00 Add instances, build renaming environment, start on the renamer - - - - - c3f8f4f1 by David Waern at 2006-07-29T21:37:48+00:00 Complete the renamer - - - - - 7e00d464 by David Waern at 2006-07-30T21:01:57+00:00 Start porting the Html renderer - - - - - f04ce121 by David Waern at 2006-08-09T20:04:56+00:00 More Html rendering progress - - - - - 20c21b53 by David Waern at 2006-08-10T17:37:47+00:00 More progress - - - - - d7097e0d by David Waern at 2006-08-11T20:31:51+00:00 Cleanup - - - - - a7351e86 by David Waern at 2006-08-12T11:44:47+00:00 Render H98 Data declarations - - - - - 3fb2208e by David Waern at 2006-08-12T17:15:34+00:00 Perfect rendering of Test.hs - - - - - 454fd062 by David Waern at 2006-08-13T21:57:08+00:00 Misc fixes and interface load/save - - - - - 7ef7e7be by David Waern at 2006-08-14T00:56:07+00:00 Some refactoring - - - - - a7d3efef by David Waern at 2006-08-19T20:07:55+00:00 Adapt to latest GHC - - - - - 5fc3c0d7 by David Waern at 2006-08-20T21:28:11+00:00 Move interface read/write to its own module + some cleanup - - - - - 037e011c by David Waern at 2006-08-20T21:38:24+00:00 Small cleanup - - - - - da3a1023 by David Waern at 2006-09-03T16:05:22+00:00 Change mode to BatchCompile to avoid GHC API bug - - - - - 3cc9be3b by David Waern at 2006-09-03T16:06:59+00:00 Starting work on GADT rendering - - - - - 94506037 by David Waern at 2006-09-03T20:02:48+00:00 Compensate for change of export list order in GHC - - - - - c2cec4eb by David Waern at 2006-09-04T20:53:01+00:00 Rename a function - - - - - 9a9735ba by David Waern at 2006-09-05T15:51:21+00:00 Change version number to 2.0 - - - - - 3758a714 by David Waern at 2006-09-05T15:51:49+00:00 Align comment properly - - - - - 68478d9e by David Waern at 2006-09-15T18:03:00+00:00 Remove interface reading/writing code and use the GHC api for creating package environments instead - - - - - d2eedd95 by David Waern at 2006-09-15T18:05:29+00:00 Change the executable name to haddock-ghc-nolib - - - - - fcfbcf66 by David Waern at 2006-09-15T18:05:45+00:00 Small source code cleanup - - - - - d08eb017 by David Waern at 2006-09-15T18:06:21+00:00 Remove handling of --package flag - - - - - b8a4cf53 by David Waern at 2006-09-15T18:07:16+00:00 Remove commented-out code - - - - - bef0a684 by David Waern at 2006-09-15T18:37:57+00:00 Don't warn about missing links to () - - - - - e7d25fd7 by David Waern at 2006-09-15T19:50:49+00:00 Remove Interface and Binary2 modules - - - - - 9894f2a1 by David Waern at 2006-09-15T19:53:43+00:00 Remove debug printing from HaddockHtml - - - - - a0e7455d by David Waern at 2006-09-16T00:16:29+00:00 Comments only - - - - - d5b26fa7 by David Waern at 2006-09-16T00:16:57+00:00 Refactor PackageData creation code and start on building the doc env propery (unfinished) - - - - - 06aaa779 by David Waern at 2006-09-16T00:19:25+00:00 Better comments in Main.hs - - - - - 1a52d1b4 by David Waern at 2006-09-18T22:17:11+00:00 Comments and spacing change - - - - - e5a97767 by David Waern at 2006-09-21T17:02:45+00:00 Remove unnecessary fmapM import in Main - - - - - 9d0f9d3a by David Waern at 2006-09-22T18:07:07+00:00 Make import list in HaddockHtml prettier - - - - - 3452f662 by David Waern at 2006-09-22T18:08:47+00:00 Refactor context rendering - - - - - 12d0a6d0 by David Waern at 2006-09-22T18:09:52+00:00 Do proper HsType rendering (inser parentheses correctly) - - - - - 2c20c2f9 by David Waern at 2006-09-22T18:10:45+00:00 Fix a bug in Main.toHsType - - - - - c5396443 by David Waern at 2006-09-22T18:11:16+00:00 Skip external package modules sort for now - - - - - 3fb95547 by David Waern at 2006-09-22T20:35:40+00:00 Take away trailin "2" on all previously clashing type names - - - - - 2174755f by David Waern at 2006-09-22T20:51:43+00:00 Remove unused imports in Main - - - - - 1e9f7a39 by David Waern at 2006-09-22T20:52:11+00:00 Fix a comment in Main - - - - - 32d9e028 by David Waern at 2006-10-05T16:40:11+00:00 Merge with changes to ghc HEAD - - - - - 3058c8f5 by David Waern at 2006-10-05T16:41:02+00:00 Comment fixes - - - - - b9c217ec by David Waern at 2006-10-05T16:49:59+00:00 Filter out more builtin type constructors from warning messages - - - - - 67e7d252 by David Waern at 2006-10-05T19:38:22+00:00 Refactoring -- better structured pass1 - - - - - cd21c0c1 by David Waern at 2006-10-05T19:44:42+00:00 Remove read/dump interface flags - - - - - 313f9e69 by David Waern at 2006-10-05T19:49:26+00:00 Remove unused pretty printing - - - - - 480f09d1 by David Waern at 2006-12-28T13:22:24+00:00 Update to build with latest GHC HEAD - - - - - 63dccfcb by David Waern at 2007-01-05T01:38:45+00:00 Fixed a bug so that --ghc-flag works correctly - - - - - 3117dadc by David Waern at 2006-12-29T18:53:39+00:00 Automatically get the GHC lib dir - - - - - 9dc84a5c by David Waern at 2006-12-29T19:58:53+00:00 Comments - - - - - 0b0237cc by David Waern at 2007-01-05T16:48:30+00:00 Collect docs based on SrcLoc, syncing with removal of DeclEntity from GHC - - - - - a962c256 by David Waern at 2007-01-05T17:02:47+00:00 Add tabs in haddock.cabal - - - - - 0ca30c97 by David Waern at 2007-01-05T17:04:11+00:00 Add GHCUtils.hs - - - - - c0ab9abe by David Waern at 2007-01-10T11:43:08+00:00 Change package name to haddock-ghc, version 0.1 - - - - - 38e18b27 by David Waern at 2007-01-12T12:03:52+00:00 No binder name for foreign exports - - - - - d18587ab by David Waern at 2007-01-12T12:08:15+00:00 Temp record - - - - - ba6251a0 by David Waern at 2007-01-12T18:27:55+00:00 Remove read/dump-interface (again) - - - - - f4ba2b39 by David Waern at 2007-01-12T18:31:36+00:00 Remove DocOption, use the GHC type - - - - - 511be8bd by David Waern at 2007-01-12T18:32:41+00:00 Use exceptions instead of Either when loading package info - - - - - 0f2144d8 by David Waern at 2007-01-12T18:33:23+00:00 Small type change - - - - - 77507eb7 by David Waern at 2007-01-12T18:33:59+00:00 Remove interface file read/write - - - - - 0ea1e14f by David Waern at 2007-01-17T21:40:26+00:00 Add trace_ppr to GHCUtils - - - - - 3878b493 by David Waern at 2007-01-17T21:40:53+00:00 Sort external package modules and build a doc env - - - - - 8dc323fc by David Waern at 2007-01-17T21:42:41+00:00 Remove comment - - - - - f4c5b097 by David Waern at 2007-01-18T23:22:18+00:00 Add haddock-ghc.cabal and remove ghc option pragma in source file - - - - - da242b2c by David Waern at 2007-01-18T23:22:46+00:00 Remove some tabs - - - - - 288ed096 by David Waern at 2007-01-18T23:39:28+00:00 Moved the defaultErrorHandler to scope only over sortAndCheckModules for now - - - - - 4dd150fe by David Waern at 2007-02-03T21:23:56+00:00 Let restrictCons handle infix constructors - - - - - 97893442 by David Waern at 2007-02-04T16:26:00+00:00 Render infix data constructors - - - - - da89db72 by David Waern at 2007-02-04T16:26:33+00:00 CHange project name to Haddock-GHC - - - - - e93d48af by David Waern at 2007-02-04T16:59:08+00:00 Render infix type constructors properly - - - - - 357bc99b by David Waern at 2007-02-04T17:37:08+00:00 Insert spaces around infix function names - - - - - ab6cfc49 by David Waern at 2007-02-04T17:59:54+00:00 Do not list entities without documentation - - - - - 04249c7e by David Waern at 2007-02-04T19:16:25+00:00 Add GADT support (quite untested) - - - - - 2c223f8d by David Waern at 2007-02-04T19:25:10+00:00 Add package file write/save again! - - - - - b07ed218 by David Waern at 2007-02-04T19:33:02+00:00 Comment out minf_iface based stuff - - - - - 953d1fa7 by David Waern at 2007-02-05T00:12:23+00:00 Solve conflicts - - - - - 593247fc by David Waern at 2007-02-06T19:48:48+00:00 Remove -package flag, GHC's can be used instead - - - - - f658ded2 by David Waern at 2007-02-06T20:50:44+00:00 Start for support of ATs - - - - - 97f9e913 by David Waern at 2007-02-06T20:52:27+00:00 Wibble - - - - - 2ce8e4cf by David Waern at 2007-02-16T12:09:49+00:00 Add the DocOptions change - - - - - dee4a9b5 by David Waern at 2007-03-06T01:24:48+00:00 Wibble - - - - - 7cb99d18 by David Waern at 2007-03-06T01:24:58+00:00 Change version to 2.0 and executable name to haddock - - - - - c5aa02bc by David Waern at 2007-03-08T15:59:49+00:00 Go back to -B flag - - - - - 3a349201 by David Waern at 2007-03-09T13:31:59+00:00 Better exception handling and parsing of GHC flags - - - - - 05a69b71 by David Waern at 2007-03-09T17:45:44+00:00 Remove commented-out DocEntity printing - - - - - 755032cb by davve at dtek.chalmers.se at 2007-03-23T23:30:20+00:00 Remove a file that shouldn't be here - - - - - a7077e5f by davve at dtek.chalmers.se at 2007-03-24T03:58:48+00:00 Remove an import - - - - - 6f55aa8b by davve at dtek.chalmers.se at 2007-03-25T00:46:48+00:00 Start work on Haddock API - - - - - f0199480 by davve at dtek.chalmers.se at 2007-03-25T00:56:36+00:00 Prettify some comments - - - - - f952f9d1 by davve at dtek.chalmers.se at 2007-03-25T00:56:53+00:00 Remove ppr in HaddockTypes - - - - - bc594904 by davve at dtek.chalmers.se at 2007-03-25T00:57:53+00:00 Remove commented out doc env inference - - - - - 11ebf08d by davve at dtek.chalmers.se at 2007-03-25T01:23:25+00:00 De-flatten the namespace - - - - - f696b4bc by davve at dtek.chalmers.se at 2007-03-25T03:21:48+00:00 Add missing stuff to API - - - - - 9a2a04c3 by davve at dtek.chalmers.se at 2007-03-25T03:22:02+00:00 Wibble - - - - - 7d04a6d5 by davve at dtek.chalmers.se at 2007-03-25T03:22:08+00:00 Avoid a GHC bug with parseStaticFlags [] - - - - - 4d2820ba by davve at dtek.chalmers.se at 2007-03-26T04:57:01+00:00 Add fall-through case to mkExportItem - - - - - 6ebc8950 by Stefan O'Rear at 2007-03-26T04:14:53+00:00 Add shebang line to Setup.lhs - - - - - 80966ec5 by davve at dtek.chalmers.se at 2007-03-26T05:24:26+00:00 Fix stupid compile error - - - - - 1ea1385d by davve at dtek.chalmers.se at 2007-04-05T17:19:56+00:00 Do save/read of interface files properly - - - - - 0e4f6541 by David Waern at 2007-04-10T21:08:36+00:00 Add version to ghc dependency - - - - - b0499b63 by David Waern at 2007-04-10T21:37:08+00:00 Change package name to haddock - - - - - 9d50d27e by David Waern at 2007-04-24T00:22:14+00:00 Use filepath package instead of FilePath - - - - - 87c7fcdf by David Waern at 2007-07-10T21:03:04+00:00 Add new package dependencies - - - - - 4768709c by David Waern at 2007-07-11T20:37:11+00:00 Follow changes to record constructor representation - - - - - b9a02fee by Simon Marlow at 2007-05-30T14:00:48+00:00 update to compile with the latest GHC & Cabal - - - - - c0ebdc01 by David Waern at 2007-07-11T21:35:45+00:00 Fix conflicts - - - - - 97f7afd4 by David Waern at 2007-07-11T21:52:38+00:00 Follow changes to the GHC API - - - - - a5b7b58f by David Waern at 2007-07-12T20:36:48+00:00 Call parseStaticFlags before newSession - - - - - f7f50dbc by David Waern at 2007-08-01T21:52:58+00:00 Better indentation in haddock.cabal - - - - - d84e52ad by David Waern at 2007-08-02T00:08:18+00:00 Wibble - - - - - a23f494a by David Waern at 2007-08-02T00:08:24+00:00 Be better at trying to load all module dependencies (debugging) - - - - - ee917f13 by David Waern at 2007-08-03T18:48:08+00:00 Load all targets explicitly (checkModule doesn't chase dependencies anymore) - - - - - 5182d631 by David Waern at 2007-08-16T16:48:55+00:00 Finalize support for links to other packages - - - - - dfd1e3da by David Waern at 2007-08-16T16:51:11+00:00 Fix haddock comment errors in Haddock.Types - - - - - 50c0d83e by David Waern at 2007-08-16T16:51:37+00:00 Remove a debug import - - - - - d84b7c2b by David Waern at 2007-08-16T17:06:30+00:00 Rename PackageData to HaddockPackage - - - - - 3b52cb9f by David Waern at 2007-08-16T17:09:42+00:00 Simplify some comments - - - - - 66fa68d9 by David Waern at 2007-08-16T17:11:38+00:00 Comment the HaddockPackage definition - - - - - 8674c761 by David Waern at 2007-08-16T17:25:54+00:00 Improve code layout in Main - - - - - 571a3a0b by David Waern at 2007-08-16T17:32:13+00:00 Remove explict module imports in Main - - - - - d31b3cb0 by David Waern at 2007-08-16T17:36:23+00:00 Correct comments - - - - - 7f8a9f2b by David Waern at 2007-08-16T17:39:50+00:00 Fix layout problems in Haddock.Types - - - - - 9f421d7f by David Waern at 2007-08-17T11:16:48+00:00 Move options out of Main into Haddock.Options - - - - - 80042b63 by David Waern at 2007-08-17T11:26:59+00:00 Small comment/layout fixes - - - - - b141b982 by David Waern at 2007-08-17T11:28:28+00:00 Change project name from Haddock-GHC to Haddock - - - - - dbeb4a81 by David Waern at 2007-08-17T11:41:05+00:00 Add top module comment to all files - - - - - ce99cc9e by David Waern at 2007-08-17T14:53:04+00:00 Factor out typechecking phase into Haddock.Typecheck - - - - - 6bf75d9e by David Waern at 2007-08-17T16:55:35+00:00 Factor out package code to Haddock.Packages - - - - - b396db37 by David Waern at 2007-08-29T22:40:23+00:00 Major refactoring - - - - - 3d4f95ee by David Waern at 2007-08-29T23:26:24+00:00 Rename HaddockModule to Interface and a few more refactorings - - - - - c55326db by David Waern at 2007-08-29T23:48:03+00:00 Some comment cleanup - - - - - 9a84fc46 by David Waern at 2007-08-29T23:49:29+00:00 Add some modules that I forgot to add earlier - - - - - 4536dce2 by David Waern at 2007-08-29T23:55:24+00:00 Wibble - - - - - 9b7f0206 by David Waern at 2007-08-30T16:03:29+00:00 Wibble - - - - - c52c050a by David Waern at 2007-08-30T16:30:37+00:00 Rename HaddockModule to Interface - - - - - eae2995f by David Waern at 2007-08-30T16:42:59+00:00 Simplify createInterfaces - - - - - 53f99caa by David Waern at 2007-09-29T00:04:31+00:00 Add build-type: Simple to the cabal file - - - - - 0d3103a8 by David Waern at 2007-09-29T00:04:58+00:00 Add containers and array dependency - - - - - 6acf5f30 by David Waern at 2007-09-29T00:13:36+00:00 Prettify the cabal file - - - - - 87c1e378 by David Waern at 2007-09-29T13:16:39+00:00 FIX: consym data headers with more than two variables - - - - - b67fc16a by David Waern at 2007-09-29T14:01:32+00:00 FIX: prefix types used as operators should be quoted - - - - - a8f925bc by David Waern at 2007-09-29T14:02:26+00:00 Use isSymOcc from OccName instead of isConSym - - - - - fc330701 by David Waern at 2007-09-29T14:15:37+00:00 Use isLexConSym/isLexVarSym from OccName - - - - - e4f3dbad by David Waern at 2007-09-29T15:01:08+00:00 FIX: do not quote varsym type operators - - - - - 402207d2 by David Waern at 2007-09-29T15:01:50+00:00 Wibble - - - - - f9d89ef0 by David Waern at 2007-09-29T15:17:40+00:00 Take care when pp tyvars - add parens on syms - - - - - 849e2a77 by David Waern at 2007-10-01T21:56:39+00:00 Go back to using a ModuleMap instead of LookupMod - fixes a bug - - - - - 549dbac6 by David Waern at 2007-10-02T01:05:19+00:00 Improve parsing of doc options - - - - - a36021b8 by David Waern at 2007-10-02T23:05:00+00:00 FIX: double arrows in constructor contexts - - - - - d03bf347 by David Waern at 2007-10-09T16:14:05+00:00 Add a simple test suite - - - - - c252c140 by David Waern at 2007-10-17T16:02:28+00:00 Add --optghc=.. style flag passing to GHC - - - - - cce6c1b3 by David Waern at 2007-10-18T22:03:20+00:00 Add support for --read-interface again - - - - - 33d059c0 by David Waern at 2007-10-18T22:30:18+00:00 Refactoring -- get rid of Haddock.Packages - - - - - f9ed0a4c by David Waern at 2007-10-18T22:34:36+00:00 Name changes - - - - - 8a1c816f by David Waern at 2007-10-20T14:24:23+00:00 Add --ghc-version option - - - - - 4925aaa1 by David Waern at 2007-10-21T14:34:26+00:00 Add some Outputable utils - - - - - 69e7e47f by David Waern at 2007-10-21T14:35:49+00:00 FIX: Ord for OrdName was not comparing modules - - - - - 5a4ae535 by David Waern at 2007-10-21T21:18:48+00:00 Wibble - - - - - 03d48e20 by David Waern at 2007-10-24T15:52:56+00:00 Remove Main from "other modules" - - - - - c66f6d82 by David Waern at 2007-10-24T16:37:18+00:00 Make it possible to run haddock on itself - - - - - 21d156d8 by David Waern at 2007-10-25T14:02:14+00:00 Don't set boot modules as targets - - - - - f8bcf91c by David Waern at 2007-10-31T22:11:17+00:00 Add optimisation flags - - - - - 7ac758f2 by David Waern at 2007-11-04T09:48:28+00:00 Go back to loading only targets (seems to work now) - - - - - 4862aae1 by David Waern at 2007-11-05T22:24:57+00:00 Do full compilation of modules -- temporary fix for GHC API problem - - - - - 697e1517 by David Waern at 2007-11-05T22:25:50+00:00 Don't warn about not being able to link to wired/system/builtin-names - - - - - 892186da by David Waern at 2007-11-06T00:49:21+00:00 Filter out instances with TyCons that are not exported - - - - - 9548314c by David Waern at 2007-11-06T09:37:14+00:00 Wibble - - - - - 5cafd627 by David Waern at 2007-11-08T01:43:07+00:00 Filter out all non-vanilla type sigs - - - - - 04621830 by David Waern at 2007-11-08T01:45:13+00:00 Synch loading of names from .haddock files with GHC's name cache - - - - - 88d37f77 by David Waern at 2007-11-08T01:46:21+00:00 Remove commented-out code - - - - - 6409c911 by David Waern at 2007-11-08T01:56:00+00:00 Small bugfix and cleanup in getDeclFromTyCls - - - - - af59d9c2 by David Waern at 2007-11-08T02:08:44+00:00 Remove OrdName stuff - - - - - 3a615e2e by David Waern at 2007-11-08T02:13:41+00:00 Update runtests.hs following changes to haddock - - - - - 01f3314e by David Waern at 2007-11-08T02:33:01+00:00 Complain if we can't link to wired-in names - - - - - fcafb5d1 by David Waern at 2007-11-09T02:40:16+00:00 Don't exit when there are no file arguments - - - - - 194bc332 by David Waern at 2007-11-09T02:55:37+00:00 Wibble - - - - - dbe4cb55 by David Waern at 2007-11-09T02:56:14+00:00 Wibble - - - - - 82869fda by David Waern at 2007-11-10T17:01:43+00:00 Introduce InstalledInterface structure and add more stuff to the .haddock files We introduce InstalledInterface capturing the part of Interface that is stored in the interface files. We change the ppHtmlContents and ppHtmllIndex to take this structure instead of a partial Interface. We add stuff like the doc map and exported names to the .haddock file (via InstalledInterface). - - - - - d6bb57bf by David Waern at 2007-11-10T17:19:48+00:00 FIX: contents and index should include external package modules when --gen-contents/--gen-index - - - - - e8814716 by David Waern at 2007-11-11T00:29:27+00:00 Remove lDocLinkName and its use in Html backend - - - - - 6f9bd702 by David Waern at 2007-11-11T00:50:57+00:00 Do some refactoring in the html backend This also merges an old patch by Augustsson: Wed Jul 12 19:54:36 CEST 2006 lennart.augustsson at credit-suisse.com * Print type definitions like signatures if given arrows. - - - - - 09d0ce24 by Malcolm.Wallace at 2006-07-20T13:13:57+00:00 mention HsColour in the docs, next to option flags for linking to source code - - - - - 24da6c34 by Malcolm.Wallace at 2006-07-20T13:14:50+00:00 change doc references to CVS to give darcs repository location instead - - - - - 74d52cd6 by David Waern at 2007-11-11T00:55:33+00:00 Update copyright - - - - - fcaa3b4f by Duncan Coutts at 2006-09-08T13:41:00+00:00 Eliminate dep on network by doing a little cut'n'paste haddock depending on the network causes a circular dependency at least if you want to build the network lib with haddock docs. - - - - - 10cc9bda by David Waern at 2007-11-11T02:09:41+00:00 Fix conflicts - - - - - 4e3acd39 by David Waern at 2007-11-11T02:21:19+00:00 Manual merge of a patch from Duncan Coutts that removes the dependency on mtl - - - - - fa9070da by Neil Mitchell at 2006-09-29T15:52:03+00:00 Do not generate an empty table if there are no exports, this fixes a <table></table> tag being generated, which is not valid HTML 4.01 - - - - - d7431c85 by David Waern at 2007-11-11T02:28:50+00:00 Fix conflicts - - - - - f87e8f98 by Simon Marlow at 2006-10-10T11:37:16+00:00 changes for 0.8 - - - - - db929565 by Simon Marlow at 2006-10-10T12:07:12+00:00 fix the name of the source file - - - - - 8220aa4b by Simon Marlow at 2006-10-11T14:17:37+00:00 Rename haddock.js to haddock-util.js haddock.js will be run automatically by Windows when you type 'haddock' if it is found on the PATH, so rename to avoid confusion. Spotted by Adrian Hey. - - - - - 6bccdaa1 by sven.panne at 2006-10-12T15:28:23+00:00 Cabal's sdist does not generate "-src.tar.gz" files, but ".tar.gz" ones - - - - - d3f3fc19 by Simon Marlow at 2006-12-06T16:05:07+00:00 add todo item for --maintainer - - - - - 2da7e269 by Simon Marlow at 2006-12-15T15:52:00+00:00 TODO: do something better about re-exported symbols from another package - - - - - 42d85549 by David Waern at 2007-11-11T02:30:59+00:00 Fix conflicts - - - - - 5e7ef6e5 by Neil Mitchell at 2007-01-11T15:41:15+00:00 Never do spliting index files into many - - - - - f3d4aebe by Neil Mitchell at 2007-01-11T17:07:09+00:00 Add searching on the index page - - - - - bad3ab66 by Neil Mitchell at 2007-01-11T18:17:46+00:00 Delete dead code, now there is only one index page - - - - - cd09eedb by Neil Mitchell at 2007-01-11T18:21:19+00:00 Delete more stuff that is no longer required - - - - - e2806646 by David Waern at 2007-11-11T02:41:53+00:00 Fix conflicts - - - - - a872a823 by Neil Mitchell at 2007-01-11T18:51:43+00:00 Make the index be in case-insensitive alphabetic order - - - - - 8bddd9d7 by Neil Mitchell at 2007-02-06T17:49:12+00:00 Do not create empty tables for data declarations which don't have any constructors, instances or comments. Gets better HTML 4.01 compliance - - - - - 036b8120 by David Waern at 2007-11-11T02:56:58+00:00 Fix conflicts - - - - - f50c1639 by Conal Elliott at 2007-02-14T21:54:00+00:00 added substitution %{FILE///c} - - - - - 402e166a by David Waern at 2007-11-11T03:35:46+00:00 Manual merge of old patch: Sat Apr 21 04:36:43 CEST 2007 Roberto Zunino <zunrob at users.sf.net> * URL expansion for %%, %L, %{LINE} - - - - - 2f264fbd by David Waern at 2007-11-11T03:40:33+00:00 Manual merge of an old patch: Thu Apr 19 20:23:40 CEST 2007 Wolfgang Jeltsch <g9ks157k at acme.softbase.org> * bug fix When Haddock was invoked with the --ignore-all-exports flag but the ignore-exports module attribute wasn't used, hyperlinks weren't created for non-exported names. This fix might not be as clean as one would wish (since --ignore-all-exports now results in ignore_all_exports = True *and* an additional OptIgnoreExports option for every module) but at least the bug seems to be resolved now. - - - - - 7d7ae106 by sven.panne at 2007-09-02T12:18:02+00:00 Install LICENSE in the correct place - - - - - 66eaa924 by David Waern at 2007-11-11T19:02:46+00:00 Fix a bug that made haddock loop - - - - - 4ed47b58 by David Waern at 2007-11-11T19:03:09+00:00 Rename java-script file (this wasn't merge correctly) - - - - - d569534a by David Waern at 2007-11-11T19:06:44+00:00 Don't require -B <ghc-libdir> when no argument files Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B <ghc-libdir> to Haddock when there're no source files to process. This is nice when computing contents/index for external packages. - - - - - 373368bc by Neil Mitchell at 2007-01-11T18:22:44+00:00 Change from tabs to spaces in the ppHtmlIndex function - - - - - 6b063a77 by Neil Mitchell at 2007-01-12T12:17:46+00:00 Rewrite much of the index searching code, previously was too slow to execute on the base library with IE, the new version guarantees less than O(log n) operations be performed, where n is the number in the list (before was always O(n)) - - - - - bfad00b7 by David Waern at 2007-11-11T23:33:53+00:00 Fix conflicts - - - - - cd2dcc09 by Neil Mitchell at 2007-01-12T12:25:01+00:00 Make the max number of results 75 instead of 50, to allow map searching in the base library to work - - - - - 3ae74764 by Neil Mitchell at 2007-01-12T12:58:17+00:00 Make the search box in a form so that enter does the default search - - - - - 142103e5 by David Waern at 2007-11-12T00:03:18+00:00 Merge patch from the old branch: Fri Aug 31 13:21:45 CEST 2007 Duncan Coutts <duncan at haskell.org> * Add category: Development to .cabal file Otherwise it appears on the hackage website in the "Unclassified" category. - - - - - 22ec2ddb by David Waern at 2007-11-25T01:55:29+00:00 A a list of small improvements to the TODO file - - - - - eb0129f4 by Wolfgang Jeltsch at 2007-12-03T23:47:55+00:00 addition of type equality support (at least for HTML generation) - - - - - 816a7e22 by David Waern at 2007-12-08T15:46:26+00:00 Handle class operators correctly when rendering predicates - - - - - 68baaad2 by David Waern at 2007-12-08T16:15:54+00:00 Code layout changes - - - - - 09b77fb4 by David Waern at 2007-12-08T16:16:03+00:00 Handle infix operators correctly in the Type -> HsType translation - - - - - 31c36da2 by David Waern at 2007-12-08T16:24:27+00:00 Add ppLParendTypes/ppLParendType - - - - - b17cc818 by David Waern at 2007-12-08T16:26:12+00:00 Use ppParendType when printing types args in predicates - - - - - ffd1f2cf by David Waern at 2007-12-08T16:45:06+00:00 Fix rendering of instance heads to handle infix operators This is also a refactoring to share this code for rendering predicates. - - - - - ff886d45 by David Waern at 2007-12-08T17:27:46+00:00 Fix rendering of class operators - - - - - e2fcbb9e by David Waern at 2007-12-08T17:59:28+00:00 Fix a bug (use ppTyName instead of ppName to print names in type apps) - - - - - 79a1056e by David Waern at 2007-12-08T21:25:18+00:00 Update tests - - - - - 867741ac by David Waern at 2007-12-08T21:25:49+00:00 Give a diff on test failure - - - - - 7e5eb274 by David Waern at 2008-01-05T14:33:45+00:00 Add DrIFT commands - - - - - 3656454d by David Waern at 2008-01-05T20:26:00+00:00 Add "cabal-version: >= 1.2" to the cabal file - - - - - 77974efc by Simon Marlow at 2007-12-20T09:52:44+00:00 add an item - - - - - f6ac1708 by Simon Marlow at 2007-12-06T14:00:10+00:00 Source links must point to the original module, not the referring module - - - - - eda1d5c9 by David Waern at 2008-01-06T14:40:52+00:00 Manual merge of a patch to the 0.8 branch Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar at microsoft.com> * Source links must point to the original module, not the referring module - - - - - 378f4085 by David Waern at 2008-01-06T16:03:45+00:00 Change stability from stable to experimental - - - - - 8bdafe44 by David Waern at 2008-01-06T16:14:22+00:00 Add haskell.vim (it had been removed somehow) - - - - - ea34d02e by David Waern at 2008-01-06T16:36:57+00:00 Change version to 2.0.0.0 - - - - - 34631ac0 by David Waern at 2008-01-06T16:44:57+00:00 Add missing modules to the cabal file - - - - - 9e142935 by David Waern at 2008-01-06T17:25:42+00:00 Depend on ghc >= 6.8.2 && < 6.9 - - - - - 59f9eeaa by Simon Marlow at 2007-12-20T10:43:04+00:00 add build scripts - - - - - 1c29ae30 by Simon Marlow at 2007-12-20T10:47:07+00:00 update version number - - - - - fe16a3e4 by Simon Marlow at 2007-12-20T10:48:03+00:00 update version - - - - - f688530f by Simon Marlow at 2007-12-20T10:48:29+00:00 doc updates - - - - - ce71b611 by David Waern at 2008-01-07T13:46:32+00:00 Change version in docs and spec - - - - - 03ab8d6f by David Waern at 2008-01-07T13:47:38+00:00 Manually merge over changes to CHANGES for 0.9 - - - - - 39f1b042 by David Waern at 2008-01-07T15:17:41+00:00 Remove the -use-package flag, we don't support it anyway - - - - - 7274a544 by David Waern at 2008-01-07T15:33:05+00:00 Update CHANGES for 2.0.0.0 - - - - - 96594f5d by David Waern at 2008-01-07T15:46:49+00:00 Wibble - - - - - f4c5a4c4 by David Waern at 2008-01-07T15:55:36+00:00 Change url to repo in documentation - - - - - 8a4c77f0 by David Waern at 2008-01-07T16:00:54+00:00 Update CHANGES - - - - - cb3a9288 by David Waern at 2008-01-07T16:02:55+00:00 Documentation fix - - - - - d8e45539 by David Waern at 2008-01-07T16:12:00+00:00 Update docs to say that Haddock accets .lhs files and module names - - - - - 4b5ce824 by David Waern at 2008-01-07T16:12:25+00:00 Document -B option - - - - - 47274262 by David Waern at 2008-01-07T16:23:07+00:00 Update CHANGES - - - - - 7ff314a9 by David Waern at 2008-01-07T16:23:20+00:00 Remove --use-package, --package & --no-implicit.. flags from docs - - - - - 6c3819c0 by David Waern at 2008-01-07T16:23:52+00:00 Remove --no-implicit-prelide flag - - - - - 1b14ae40 by David Waern at 2008-01-07T16:32:26+00:00 Update the "Using literate or pre-processed source" section - - - - - 0117f620 by David Waern at 2008-01-07T16:41:55+00:00 Document the --optghc flag - - - - - 087ab1cf by David Waern at 2008-01-07T16:42:10+00:00 Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 - - - - - 7253951e by David Waern at 2008-01-07T16:48:40+00:00 Document OPTIONS_HADDOCK - - - - - 3b6bdcf6 by David Waern at 2008-01-07T16:56:54+00:00 Wibble - - - - - 3025adf9 by David Waern at 2008-01-07T17:08:14+00:00 Wibble - - - - - 5f30f1a0 by David Waern at 2008-01-07T17:15:44+00:00 Change synopsis field to description - - - - - 1673f54b by David Waern at 2008-01-07T17:18:21+00:00 Change my email address in the cabal file - - - - - 55aa9808 by David Waern at 2008-01-07T18:18:02+00:00 Add documentation for readInterfaceFile - - - - - eaea417f by David Waern at 2008-01-07T18:21:30+00:00 Export necessary stuff from Distribution.Haddock - - - - - 7ea18759 by David Waern at 2008-01-07T18:31:49+00:00 Remove dep on Cabal - - - - - 7b79c74e by David Waern at 2008-01-07T18:33:49+00:00 Remove dep on process - - - - - ce3054e6 by David Waern at 2008-01-16T23:01:21+00:00 Add feature-requsts from Henning Thielemann to TODO - - - - - 0c08f1ec by David Waern at 2008-01-16T23:03:02+00:00 Record a bug in TODO - - - - - b04605f3 by David Waern at 2008-01-23T16:59:06+00:00 Add a bug reported by Ross to TODO - - - - - 5b17c030 by David Waern at 2008-01-23T18:05:53+00:00 A a bug report to TODO - - - - - 1c993b0d by David Waern at 2008-01-25T16:30:25+00:00 Accept test output - - - - - c22fc0d0 by David Waern at 2008-01-25T16:34:49+00:00 Accept test output - - - - - 4b795811 by David Waern at 2008-01-25T16:38:37+00:00 Change Hidden.hs (test) to use OPTIONS_HADDOCK - - - - - c124dbd9 by David Waern at 2008-01-25T16:39:23+00:00 Accept test output - - - - - ec6f6eea by David Waern at 2008-01-25T16:42:08+00:00 Add Hidden.html.ref to tests - - - - - 1dc9610c by David Waern at 2008-02-02T20:50:51+00:00 Add a comment about UNPACK bug in TODO - - - - - 2d3f7081 by David Waern at 2008-02-09T22:33:24+00:00 Change the representation of DocNames Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented. - - - - - 0f28c921 by David Waern at 2008-02-09T23:00:36+00:00 H.GHC.Utils: remove unused imports/exports - - - - - 0c44cad5 by David Waern at 2008-02-10T00:28:13+00:00 H.GHC.Utils: add some functions that were removed by mistake - - - - - e3452f49 by David Waern at 2008-02-10T00:28:48+00:00 Fix some trivial warnings in H.InterfaceFile - - - - - a6d74644 by David Waern at 2008-02-10T00:48:06+00:00 Update the version message to fit in small terminals - - - - - 76c9cd3e by David Waern at 2008-02-10T14:47:39+00:00 Remove bugs from TODO that don't apply anymore since the port - - - - - 5e10e090 by David Waern at 2008-02-10T15:22:47+00:00 Remove bugs from TODO that weren't actual bugs - - - - - fef70878 by David Waern at 2008-02-10T15:23:44+00:00 Remove yet another item from TODO that was not an actual bug - - - - - e1af47b8 by David Waern at 2008-02-11T10:25:57+00:00 Bump the version number to 2.1.0 Since the exported datatype DocName has changed, we need to bump the major version number. Let's also drop the fourth version component, it's not that useful. - - - - - e3be7825 by David Waern at 2008-04-11T14:29:04+00:00 Add a bug to TODO - - - - - cb6574be by David Waern at 2008-04-11T16:00:45+00:00 Use the in-place haddock when running tests - - - - - c6d7af0d by David Waern at 2008-04-11T16:09:16+00:00 Turn off GHC warnings when running tests - - - - - 7f61b546 by David Waern at 2008-04-11T17:24:00+00:00 Add a flag for turning off all warnings - - - - - 883b8422 by David Waern at 2008-04-12T14:02:18+00:00 Fix printing of data binders - - - - - 2a0db8fc by David Waern at 2008-04-12T18:52:46+00:00 Fix missing parenthesis in constructor args bug - - - - - 1b3ac3f9 by David Waern at 2008-04-12T18:57:23+00:00 Simplify test suite and add tests I move all tests into one single directory to simplify things, and add a test for the last bug that was fixed. - - - - - 8f178376 by David Waern at 2008-04-12T19:00:15+00:00 Add a script for copying test output to "expected" output - - - - - 193e3a03 by David Waern at 2008-04-12T19:16:37+00:00 Remove two fixed bugs from TODO - - - - - ddc9130c by David Waern at 2008-04-12T19:37:06+00:00 Update test README - - - - - 956069c0 by David Waern at 2008-05-01T12:16:14+00:00 Update version number in spec and docs - - - - - 5478621c by David Waern at 2008-05-01T12:28:12+00:00 Remove claim of backwards compatibility from docs for readInterfaceFile - - - - - 4a16dea9 by David Waern at 2008-05-01T12:33:04+00:00 Update CHANGES - - - - - 804216fb by David Waern at 2008-05-01T12:43:16+00:00 Add a synopsis - - - - - fd0c84d5 by David Waern at 2008-05-01T12:44:44+00:00 Add Haddock.DocName to the cabal file - - - - - 9f4a7439 by David Waern at 2008-05-01T12:45:53+00:00 Remove -fglasgow-exts and -fasm - - - - - aee7c145 by David Waern at 2008-05-01T12:54:01+00:00 Add LANGUAGE pragmas to source files - - - - - 9a58428b by David Waern at 2008-05-01T12:54:19+00:00 Add extensions to cabal file - - - - - 494f1bee by David Waern at 2008-05-01T13:12:09+00:00 Export DocName in the API - - - - - c938196b by David Waern at 2008-05-01T13:12:19+00:00 Add hide options to some source files - - - - - 236e86af by Neil Mitchell at 2008-06-07T20:45:10+00:00 Rewrite the --hoogle flag support - - - - - 6d910950 by Neil Mitchell at 2008-06-14T10:56:50+00:00 Simplify the newtype/data outputting in Hoogle, as haddock does it automatically - - - - - f87a95a8 by Neil Mitchell at 2008-06-14T12:10:18+00:00 Add initial structure for outputting documentation as well, but does not yet output anything - - - - - 7c3bce54 by Neil Mitchell at 2008-06-14T12:27:07+00:00 Remove <document comment> from the Hoogle output - - - - - 9504a325 by Neil Mitchell at 2008-06-16T06:33:21+00:00 Default to "main" if there is no package, otherwise will clobber hoogle's hoogle info - - - - - 4a794a79 by Neil Mitchell at 2008-06-16T06:53:29+00:00 Change packageName to packageStr, as it better reflects the information stored in it - - - - - 7abc9baf by Neil Mitchell at 2008-06-16T07:09:49+00:00 Add modulePkgInfo to Haddock.GHC.Utils, which gives back package name and version info - - - - - 8ca11514 by Neil Mitchell at 2008-06-16T07:13:48+00:00 Change Hoogle to take the package name and package version separately - - - - - a6da452d by Neil Mitchell at 2008-06-18T11:29:46+00:00 In Hoogle do not list things that are not local to this module - - - - - 974b76b7 by David Waern at 2008-06-19T18:40:13+00:00 Be more consistent with GHC API naming in H.GHC.Utils - - - - - 2facb4eb by David Waern at 2008-06-19T19:03:03+00:00 Update test output - - - - - c501de72 by David Waern at 2008-06-26T20:26:49+00:00 Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. - - - - - ac4c6836 by David Waern at 2008-06-26T20:33:08+00:00 Update CHANGES - - - - - 9d21c60a by David Waern at 2008-06-26T20:34:53+00:00 Update README - - - - - 741448f0 by David Waern at 2008-06-26T21:12:57+00:00 Improve wording in the help message - - - - - b1b42b11 by David Waern at 2008-06-30T10:16:17+00:00 Rename ForeignType - - - - - 6d6c2b34 by David Waern at 2008-06-30T10:25:09+00:00 Rename TyFamily - - - - - 8d1125ed by David Waern at 2008-06-30T10:37:21+00:00 Rename type patterns - - - - - 7610a4cb by David Waern at 2008-06-30T10:45:07+00:00 Rename associated types - - - - - 8eeba14c by David Waern at 2008-06-30T10:47:41+00:00 Remove the TODO file now that we have a trac - - - - - 1af5b25b by David Waern at 2008-07-02T18:19:28+00:00 Render type family declarations (untested) - - - - - ceb99797 by David Waern at 2008-07-02T18:24:06+00:00 Remove redundant check for summary when rendering data types - - - - - b36a58e0 by David Waern at 2008-07-02T22:01:38+00:00 More support for type families and associated types Now we just need to render the instances - - - - - 78784879 by David Waern at 2008-07-07T22:13:58+00:00 Remove filtering of instances We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later. - - - - - 3e758dad by David Waern at 2008-06-30T18:50:30+00:00 Run haddock in-place during testing - - - - - d9dab0ce by David Waern at 2008-07-08T21:04:32+00:00 Remove index.html and doc-index.html from output, they should not be versioned - - - - - 3e6c4681 by David Waern at 2008-07-08T21:06:42+00:00 Update test output following change to instance filtering - - - - - e34a3f14 by David Waern at 2008-07-12T16:48:28+00:00 Stop using the map from exported names to declarations During creation of the interface, we were using two maps: one from exported names to declarations, and one from all defined names in the module to declarations. The first contained subordinate names while the second one didn't. The first map was never used to look up names not defined in the associated module, so if we add subordinate names to the second map, we could use it everywhere. That's that this patch does. This simplifies code because we don't have to pass around two maps everywhere. We now store the map from locally defined things in the interface structure instead of the one from exported names. - - - - - 2e1d2766 by David Waern at 2008-07-12T16:55:21+00:00 Get the all locally defined names from GHC API We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API. - - - - - bf637994 by David Waern at 2008-07-13T13:09:16+00:00 Refactoring in H.Interface.Create We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names). - - - - - 547e410e by David Waern at 2008-07-13T13:34:51+00:00 Remove FastString import and FSLIT macro in H.I.Create -- they were unused - - - - - 693759d1 by David Waern at 2008-07-13T13:36:23+00:00 Remove unused import from H.I.Create - - - - - cde6e7fb by David Waern at 2008-07-13T13:51:54+00:00 Small touches - - - - - 96de8f1d by David Waern at 2008-07-20T11:21:46+00:00 Preparation for rendering instances as separate declarations We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet. - - - - - b0f824fb by David Waern at 2008-07-20T15:53:08+00:00 Follow changes to ExportDecl in Hoogle - - - - - 1192eff3 by Neil Mitchell at 2008-06-26T00:28:10+00:00 Change how the Hoogle backend outputs classes, adding the context in - - - - - 7a0d1464 by Neil Mitchell at 2008-06-26T00:28:46+00:00 Remove the indent utility function from Hoogle backend - - - - - 3361241b by Neil Mitchell at 2008-06-26T09:45:09+00:00 Add support for Hoogle writing ForeignImport/ForeignExport properly - - - - - 795ad3bf by Neil Mitchell at 2008-06-26T12:15:25+00:00 Flesh out the Hoogle code to render documentation - - - - - 23277995 by Neil Mitchell at 2008-06-26T14:56:41+00:00 Fix a bug in the Hoogle backend, unordered lists were being written out <ul>...</u> - - - - - db739b27 by Neil Mitchell at 2008-06-26T15:09:54+00:00 Remove any white space around a <li> element - - - - - f2e6bb8c by Neil Mitchell at 2008-07-10T15:30:47+00:00 Remove the TODO in the Hoogle HTML generation, was already done - - - - - 693ec9a3 by Neil Mitchell at 2008-07-10T15:53:00+00:00 Put brackets round operators in more places in the Hoogle output - - - - - 842313aa by Neil Mitchell at 2008-07-10T16:01:25+00:00 Print type signatures with brackets around the name - - - - - cf93deb0 by David Waern at 2008-07-20T17:04:22+00:00 Bump version number to 2.2.0 - - - - - 30e6a8d1 by David Waern at 2008-07-20T17:04:41+00:00 Resolve conflicts in H.B.Hoogle - - - - - 1f0071c9 by David Waern at 2008-07-23T23:05:01+00:00 Add "all" command to runtests.hs that runs all tests despite failures - - - - - f2723023 by David Waern at 2008-07-23T23:08:39+00:00 Update tests/README - - - - - c0304a11 by David Waern at 2008-07-23T23:21:15+00:00 Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. - - - - - 88a5fe71 by David Waern at 2008-07-23T23:54:16+00:00 Depend on the currently available ghc-paths versions only - - - - - 8738d97b by David Waern at 2008-07-24T10:50:44+00:00 FIX haskell/haddock#44: Propagate parenthesis level when printing documented types - - - - - 05339119 by David Waern at 2008-07-24T16:06:18+00:00 Drop unnecessary parenthesis in types, put in by the user We were putting in parenthesis were the user did. Let's remove this since it just clutters up the types. The types are readable anyway since we print parens around infix operators and do not rely on fixity levels. When doing this I discovered that we were relying on user parenthesis when printin types like (a `O` b) c. This patchs fixes this problem so that parenthesis are always inserted around an infix op application in case it is applied to further arguments, or if it's an arguments to a type constructor. Tests are updated. - - - - - b3a99828 by David Waern at 2008-07-24T10:19:43+00:00 Print parenthesis around non-atomic banged types Fixes half of haskell/haddock#44 - - - - - ab5238e0 by David Waern at 2008-07-24T22:07:49+00:00 Add a reference file for the TypeFamilies test - - - - - 1941cc11 by David Waern at 2008-07-25T17:15:53+00:00 Simplify definition of pretty and trace_ppr - - - - - e3bfa33c by David Waern at 2008-07-25T17:18:27+00:00 Warning messages Output a warning when filtering out data/type instances and associated types in instances. We don't show these in the documentation yet, and we need to let the user know. - - - - - 9b85fc89 by David Waern at 2008-07-25T17:45:40+00:00 Doc: Mention Hoogle in the Introduction - - - - - afb2dd60 by David Waern at 2008-07-25T17:49:00+00:00 Doc: update -B description - - - - - 584c0c91 by David Waern at 2008-07-25T18:11:38+00:00 Doc: describe -w flag - - - - - 77619c24 by David Waern at 2008-07-28T12:29:07+00:00 Remove TODO from cabal file - - - - - 96717d5f by David Waern at 2008-07-28T12:29:27+00:00 Support type equality predicates - - - - - c2fd2330 by David Waern at 2008-07-29T19:45:14+00:00 Move unL from H.B.Hoogle to H.GHC.Utils I like Neil's shorter unL better than unLoc from the GHC API. - - - - - c4c3bf6a by David Waern at 2008-07-29T19:47:36+00:00 Do not export ATs when not in list of subitems - - - - - bf9a7b85 by David Waern at 2008-08-03T11:42:59+00:00 Filter out ForeignExports - - - - - df59fcb0 by David Waern at 2008-08-03T14:02:51+00:00 Filter out more declarations The previous refactorings in H.I.Create introduced a few bugs. Filtering of some types of declarations that we don't handle was removed. This patch fixes this. - - - - - 2f8a958b by David Waern at 2008-08-03T15:24:07+00:00 Move reL to H.GHC.Utils so we can use it everywhere - - - - - 8ec15efd by David Waern at 2008-08-03T15:25:00+00:00 Use isVanillaLSig from GHC API instead of home brewn function - - - - - 300f93a2 by David Waern at 2008-08-03T15:25:27+00:00 Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. - - - - - 8776d1ec by David Waern at 2008-08-03T16:21:21+00:00 Filter out more declarations and keep only vanilla type sigs in classes - - - - - ea07eada by David Waern at 2008-08-03T16:48:00+00:00 Fix layout - - - - - dd5e8199 by David Waern at 2008-08-03T16:50:52+00:00 Move some utility functions from H.I.Create to H.GHC.Utils - - - - - 4a1dbd72 by David Waern at 2008-08-03T17:39:55+00:00 Do not filter out doc declarations - - - - - 0bc8dca4 by David Waern at 2008-08-03T17:47:26+00:00 Filter out separately exported ATs (take two) - - - - - af970fe8 by David Waern at 2008-08-03T22:39:17+00:00 Update CHANGES - - - - - 5436ad24 by David Waern at 2008-08-03T22:40:20+00:00 Bump version number to 2.2.1 - - - - - d66de448 by David Waern at 2008-08-05T19:00:32+00:00 Remove version restriction on ghc-paths - - - - - 534b1364 by David Waern at 2008-08-05T19:04:35+00:00 Bump version to 2.2.2 and update CHANGES - - - - - 549188ff by David Waern at 2008-08-05T19:16:49+00:00 Fix CHANGES - - - - - 0d156bb4 by Luke Plant at 2008-08-11T15:20:59+00:00 invoking haddock clarification and help - - - - - 748295cc by David Waern at 2008-08-11T18:56:37+00:00 Doc: say that the --hoogle option is functional - - - - - 43301db4 by David Waern at 2008-08-05T19:26:08+00:00 Change ghc version dependency to >= 6.8.2 - - - - - 3e5a53b6 by David Waern at 2008-08-10T22:42:05+00:00 Make H.GHC.Utils build with GHC HEAD - - - - - 7568ace0 by David Waern at 2008-08-11T19:41:54+00:00 Import Control.OldException instead of C.Exception when using ghc >= 6.9 We should really test for base version instead, but I don't currently know which version to test for. - - - - - b71ae991 by David Waern at 2008-08-12T22:40:39+00:00 Make our .haddock file version number depend on the GHC version We need to do this, since our .haddock format can potentially change whenever GHC's version changes (even when only the patchlevel changes). - - - - - 6307ce3f by David Waern at 2008-08-12T22:49:57+00:00 Remove matching on NoteTy in AttachInstances, it has been removed - - - - - 2dbcfd5f by David Waern at 2008-08-12T23:02:02+00:00 Comment out H.GHC.loadPackages - it is unused and doesn't build with ghc >= 6.9 - - - - - c74db5c2 by David Waern at 2008-08-12T23:03:58+00:00 Hide <.> from GHC import in Hoogle only for ghc <= 6.8.3 - - - - - 69a44ebb by David Waern at 2008-08-12T23:11:12+00:00 Follow changes to parseDynamic/StaticFlags - - - - - 5881f3f0 by David Waern at 2008-08-13T21:43:58+00:00 Add __GHC_PATCHLEVEL__ symbol also when building the library - - - - - 8574dc11 by David Waern at 2008-08-13T21:44:17+00:00 Follow move of package string functions from PackageConfig to Module - - - - - c9baa77f by David Waern at 2008-08-13T21:45:29+00:00 Follow extensible exceptions changes - - - - - 9092de15 by David Waern at 2008-08-13T21:46:20+00:00 Update test following Haddock version change - - - - - ebe569a4 by David Waern at 2008-08-13T21:46:54+00:00 Follow changes to parseDynamic- parseStaticFlags in GHC - - - - - b8a5ffd3 by David Waern at 2008-08-13T21:47:36+00:00 Follow changes to Binary in GHC 6.9 - - - - - edfda1cc by David Waern at 2008-08-13T21:50:17+00:00 Change ghc version dependency to >= 6.8.2 && <= 6.9 - - - - - d59be1cf by Neil Mitchell at 2008-08-12T16:02:53+00:00 Output all items, even if they are not defined in this module - ensures map comes from Prelude, not just GHC.Base - - - - - dda93b9f by Neil Mitchell at 2008-08-12T21:37:32+00:00 Add support for type synonyms to Hoogle, was accidentally missing before (woops!) - - - - - b6ee795c by Neil Mitchell at 2008-08-13T14:03:24+00:00 Generalise Hoogle.doc and add a docWith - - - - - 415e1bb2 by Neil Mitchell at 2008-08-13T14:03:46+00:00 Make Hoogle add documentation to a package - - - - - 790a1202 by Neil Mitchell at 2008-08-18T12:52:43+00:00 Use the same method to put out signatures as class methods in the Hoogle backend - - - - - ded37eba by Neil Mitchell at 2008-08-18T12:53:04+00:00 Remove Explicit top-level forall's when pretty-printing signatures - - - - - 6468c722 by Neil Mitchell at 2008-08-20T07:59:13+00:00 Simplify the code by removing not-to-important use of <.> in the Hoogle back end - - - - - 788c3a8b by Neil Mitchell at 2008-08-21T18:20:24+00:00 In the hoogle back end, markup definition lists using <i>, not <b> - - - - - 77d4b000 by Ian Lynagh at 2008-08-14T10:49:14+00:00 Add a Makefile for GHC's build system. Still won't work yet, but we're closer - - - - - 920440d7 by Ian Lynagh at 2008-08-27T18:06:46+00:00 Add haddock.wrapper - - - - - bcda925f by Ian Lynagh at 2008-08-27T18:07:02+00:00 Add a manual Cabal flag to control the ghc-paths dependency - - - - - 04d194e2 by Ian Lynagh at 2008-08-27T20:41:27+00:00 Update extensions in Cabal file Use ScopedTypeVariables instead of PatternSignatures - - - - - 12480043 by Ian Lynagh at 2008-08-27T20:41:55+00:00 Increase the upper bound on the GHC version number - - - - - b1f809a5 by Ian Lynagh at 2008-08-27T21:32:22+00:00 Fix some warnings - - - - - aea0453d by Ian Lynagh at 2008-08-28T14:22:29+00:00 Fixes for using haddock in a GHC build tree - - - - - ad23bf86 by Ian Lynagh at 2008-08-28T21:14:27+00:00 Don't use Cabal wrappers on Windows - - - - - 35858e4c by Ian Lynagh at 2008-08-29T00:07:42+00:00 Fix in-tree haddock on Windows - - - - - c2642066 by Ian Lynagh at 2008-09-03T22:35:53+00:00 follow library changes - - - - - 2eb55d50 by Ian Lynagh at 2008-09-07T18:52:51+00:00 bindist fixes - - - - - 3daa5b59 by Ian Lynagh at 2008-09-10T16:58:18+00:00 We need to tell haddock that its datasubdir is . or it can't find package.conf - - - - - 388fd8c2 by Ian Lynagh at 2008-09-10T19:47:44+00:00 Fix haddock inplace on Windows - - - - - 70a641c1 by Ian Lynagh at 2008-09-10T22:15:44+00:00 Fix installed haddock on Windows - - - - - 83c1e997 by Neil Mitchell at 2008-09-11T10:48:55+00:00 Import GHC.Paths if not IN_GHC_TREE, seems to match the use of GHC.Paths functions much better - - - - - b452519b by Ian Lynagh at 2008-09-12T12:58:24+00:00 Add a LANGUAGE ForeignFunctionInterface pragma - - - - - afbd592c by Ian Lynagh at 2008-09-12T12:59:13+00:00 Wibble imports - - - - - 547ac4ad by Ian Lynagh at 2008-09-14T15:34:22+00:00 Add a "#!/bin/sh" to haddock.wrapper - - - - - f207a807 by Ian Lynagh at 2008-09-15T10:02:32+00:00 Use "exec" when calling haddock in the wrapper - - - - - 2ee68509 by Thomas Schilling at 2008-09-15T09:09:16+00:00 Port Haddock.Interface to new GHC API. This required one bigger change: 'readInterfaceFile' used to take an optional 'Session' argument. This was used to optionally update the name cache of an existing GHC session. This does not work with the new GHC API, because an active session requires the function to return a 'GhcMonad' action, but this is not possible if no session is provided. The solution is to use an argument of functions for reading and updating the name cache and to make the function work for any monad that embeds IO, so it's result type can adapt to the calling context. While refactoring, I tried to make the code a little more self-documenting, mostly turning comments into function names. - - - - - 3bb96431 by Thomas Schilling at 2008-09-15T09:09:37+00:00 Reflect GHC API changes. - - - - - 2e60f714 by Thomas Schilling at 2008-09-15T09:10:37+00:00 Port Haddock.GHC.Typecheck to new GHC API. - - - - - 9cfd4cff by Thomas Schilling at 2008-09-15T09:11:00+00:00 Port Haddock.GHC to new GHC API. - - - - - caffa003 by Thomas Schilling at 2008-09-15T09:11:25+00:00 Port Main to new GHC API. - - - - - 069a4608 by Ian Lynagh at 2008-09-21T11:19:00+00:00 Fix paths used on Windows frmo a GHC tree: There is no whare directory - - - - - 7ceee1f7 by Ian Lynagh at 2008-09-21T12:20:16+00:00 Fix the in-tree haddock on Windows - - - - - 0d486514 by Ian Lynagh at 2008-09-23T18:06:58+00:00 Increase the GHC upper bound from 6.11 to 6.13 - - - - - f092c414 by Neil Mitchell at 2008-09-11T14:56:07+00:00 Do not wrap __ in brackets - - - - - 036bdd13 by Ian Lynagh at 2008-09-28T01:42:35+00:00 Fix building haddock when GhcProfiled=YES - - - - - 01434a89 by David Waern at 2008-09-24T20:24:21+00:00 Add PatternSignatures LANGUAGE pragma to Main and Utils - - - - - 1671a750 by David Waern at 2008-10-02T22:57:25+00:00 For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). - - - - - a25dde99 by David Waern at 2008-10-02T22:59:57+00:00 Remove ifaceEnv from Interface - it's no longer used - - - - - 610993da by David Waern at 2008-10-02T23:04:58+00:00 Write a comment about source links for type instance declarations - - - - - 5a96b5d5 by Thomas Schilling at 2008-10-03T10:45:08+00:00 Follow GHC API change of parseModule. - - - - - 5a943ae5 by Ian Lynagh at 2008-10-03T15:56:58+00:00 TAG 2008-10-03 - - - - - 76cdd6ae by Thomas Schilling at 2008-10-08T12:29:50+00:00 Only load modules once when typechecking with GHC. This still doesn't fix the memory leak since the typechecked source is retained and then processed separately. To fix the leak, modules must be processed directly after typechecking. - - - - - 7074d251 by David Waern at 2008-10-09T23:53:54+00:00 Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. - - - - - 4b9b2b2d by David Waern at 2008-10-09T23:54:49+00:00 Add some strictness annotations in Interface We add some strictness annotations to the fields of Interface, so that less GHC data is hold on to during processing. - - - - - 22035628 by David Waern at 2008-10-10T20:02:31+00:00 Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck - - - - - be637ad3 by David Waern at 2008-10-10T20:33:38+00:00 Make Haddock build with GHC 6.8.2 - - - - - 523b3404 by David Waern at 2008-10-10T21:08:09+00:00 Fix documentation for createInterfaces - - - - - e1556702 by David Waern at 2008-10-10T21:26:19+00:00 Hide H.Utils in library - - - - - a8e751c3 by David Waern at 2008-10-10T21:34:59+00:00 Add back .haddock file versioning based on GHC version It was accidentally removed in the patch for GHC 6.8.2 compatibility - - - - - 06fb3c01 by David Waern at 2008-10-10T21:47:15+00:00 Bump version number to 2.3.0 - - - - - ff087fce by David Waern at 2008-10-10T22:35:49+00:00 Add support for DocPic The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix! - - - - - 3af85bf6 by David Waern at 2008-10-10T23:34:05+00:00 Update tests - - - - - 0966873c by Simon Marlow at 2008-10-10T14:43:04+00:00 no need for handleErrMsg now, we don't throw any ErrMsgs - - - - - f1870de3 by Clemens Fruhwirth at 2008-10-10T13:29:36+00:00 Compile with wrapper but remove it for dist-install - - - - - 7b440dc2 by David Waern at 2008-10-11T14:02:25+00:00 Remove interface from LinksInfo It was there to know the documentation home module when creating a wiki link, but we already know this since we have the DocName. - - - - - e5729e6a by David Waern at 2008-10-15T20:49:18+00:00 Wibble - - - - - b2a8e01a by David Waern at 2008-10-15T21:03:36+00:00 Use type synonyms for declarations and docs in H.I.Create - - - - - be71a15b by David Waern at 2008-10-15T21:12:17+00:00 Comment out unused type family stuff completely - - - - - 91aaf075 by David Waern at 2008-10-15T21:49:04+00:00 Wibble - - - - - 42ba4eb4 by David Waern at 2008-10-15T21:53:53+00:00 Move convenient type synonym to H.Types - - - - - db11b723 by David Waern at 2008-10-15T22:14:07+00:00 Add DeclInfo to H.Types - - - - - 193552b6 by David Waern at 2008-10-15T22:15:01+00:00 Add subordinates with docs to the declaration map The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate. - - - - - 31e6eebc by David Waern at 2008-10-16T17:18:47+00:00 Wibble - - - - - 0dcbd79f by David Waern at 2008-10-16T20:58:42+00:00 Fix haskell/haddock#61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. - - - - - de47f20a by David Waern at 2008-10-16T22:06:35+00:00 Document function and improve its layout - - - - - e74e625a by Thomas Schilling at 2008-10-20T11:12:57+00:00 Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). - - - - - b63ac9a1 by David Waern at 2008-10-20T20:25:50+00:00 Make renamer consistent Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name). - - - - - f6de0bb0 by Ian Lynagh at 2008-09-19T00:54:43+00:00 TAG GHC 6.10 fork - - - - - 74599cd0 by David Waern at 2008-10-20T21:13:24+00:00 Do not save hidden modules in the .haddock file We were saving interfaces of all processed modules including those hidden using {-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links when generating the index for the libraries that come with GHC. This patch excludes modules with hidden documentation when writing .haddock files. It should fix the above problem. - - - - - 7b6742e9 by David Waern at 2008-10-21T19:54:52+00:00 Do not save hidden modules in the .haddock file (also for ghc >= 6.9) When writing the first patch, I forgot to do the fix in both branches of an #if macro. - - - - - b99b1951 by David Waern at 2008-10-22T20:04:18+00:00 Remove subordinate map and its usage It is not needed now that we store subordinate names in the DeclInfo map. - - - - - da97cddc by David Waern at 2008-10-22T20:11:46+00:00 Tidy up code in H.I.Create a little Remove commented out half-done type instance support, and remove DeclWithDoc synonym. - - - - - 6afa76f3 by David Waern at 2008-10-22T21:17:29+00:00 Fix warnings in H.GHC.Utils - - - - - 171ea1e8 by David Waern at 2008-10-22T21:35:04+00:00 Fix warnings in H.Utils - - - - - c8cb3b91 by David Waern at 2008-10-22T21:36:49+00:00 Wibble - - - - - 767fa06a by David Waern at 2008-10-27T19:59:04+00:00 Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. - - - - - e638bbc6 by David Waern at 2008-11-02T22:21:10+00:00 Add HCAR entry - - - - - 92b4ffcf by David Waern at 2008-11-02T22:44:19+00:00 Update CHANGES - - - - - 84d4da6e by David Waern at 2008-11-03T11:25:04+00:00 Add failing test for template haskell crash - - - - - 2a9cd2b1 by David Waern at 2008-11-04T21:13:44+00:00 Add tests/TH.hs - - - - - 8a59348e by David Waern at 2008-11-04T21:30:26+00:00 TAG 2.3.0 - - - - - 54f70d31 by Thomas Schilling at 2008-10-24T17:04:08+00:00 Enable framed view of the HTML documentation. This patch introduces: - A page that displays the documentation in a framed view. The left side will show a full module index. Clicking a module name will show it in the right frame. If Javascript is enabled, the left side is split again to show the modules at the top and a very short synopsis for the module currently displayed on the right. - Code to generate the mini-synopsis for each module and the mini module index ("index-frames.html"). - CSS rules for the mini-synopsis. - A very small amount of javascript to update the mini-synopsis (but only if inside a frame.) Some perhaps controversial things: - Sharing code was very difficult, so there is a small amount of code duplication. - The amount of generated pages has been doubled, since every module now also gets a mini-synopsis. The overhead should not be too much, but I haven't checked. Alternatively, the mini-synopsis could also be generated using Javascript if we properly annotate the actual synopsis. - - - - - 5d7ea5a6 by David Waern at 2008-11-04T23:20:17+00:00 Follow change to ExportDecl in frames code - - - - - 60e16308 by David Waern at 2008-11-04T23:35:26+00:00 Update CHANGES - - - - - d63fd26d by David Waern at 2008-11-04T23:37:43+00:00 Bump version number - - - - - c1660c39 by David Waern at 2008-11-04T23:44:46+00:00 Update CHANGES - - - - - 995ab384 by David Waern at 2008-11-04T23:55:21+00:00 Remove .ref files from tests/output/ - - - - - 1abbbe75 by David Waern at 2008-11-04T23:57:41+00:00 Output version info before running tests - - - - - 649b182f by David Waern at 2008-11-05T22:45:37+00:00 Add ANNOUNCE message - - - - - c36ae0bb by David Waern at 2008-11-05T23:15:35+00:00 Update ANNOUNCE - - - - - 9c4f3d40 by David Waern at 2008-11-05T23:18:30+00:00 Wibble - - - - - 5aac87ce by David Waern at 2008-11-06T21:07:48+00:00 Depend on base 4.* when using GHC >= 6.9, otherwise 3.* - - - - - b9796a74 by David Waern at 2008-11-06T21:13:40+00:00 Bump version to 2.4.1 and update CHANGES - - - - - d4b26baa by David Waern at 2008-11-06T21:26:33+00:00 Depend on base 4.0.* instead of 4.* - - - - - 2cb0903c by David Waern at 2008-11-06T21:46:53+00:00 Fix warnings in H.B.HH and H.B.HH2 - - - - - e568e89a by David Waern at 2008-11-06T21:47:12+00:00 Fix warnings in Haddock.ModuleTree - - - - - 9dc14fbd by David Waern at 2008-11-06T21:47:52+00:00 Fix warnings in Haddock.Version - - - - - 02ac197c by David Waern at 2008-11-06T21:51:31+00:00 Fix warnings in H.InterfaceFile and H.Options - - - - - 63e7439a by David Waern at 2008-11-06T21:59:45+00:00 Fix warnings in H.GHC.Typecheck - - - - - 4bca5b68 by David Waern at 2008-11-08T13:43:42+00:00 Set HscTarget to HscNothing instead of HscAsm There used to be a bug in the GHC API that prevented us from setting this value. - - - - - 07357aec by David Waern at 2008-11-09T22:27:00+00:00 Re-export NameCache and friends from Distribution.Haddock - - - - - ea554b5a by David Waern at 2008-11-09T23:14:10+00:00 Add Haddock.GHC.Utils to other-modules in library - - - - - 74aecfd7 by David Waern at 2008-11-10T01:18:57+00:00 Export DocName in the library - - - - - 241a58b3 by David Waern at 2008-11-10T01:19:18+00:00 Document the functions in H.DocName - - - - - edc2ef1b by David Waern at 2008-11-10T01:20:52+00:00 Export H.DocName in the library - - - - - 4f588d55 by David Waern at 2008-11-10T01:29:14+00:00 Make DocName an instance of NamedThing - - - - - b4647244 by David Waern at 2008-11-15T22:58:18+00:00 Reflect version bump in test suite - - - - - 4bee8ce2 by David Waern at 2008-11-15T22:58:45+00:00 Update tests For unknown reasons, test output for Bug1 and Test has changed for the better. - - - - - 1690e2f9 by David Waern at 2008-11-15T22:59:33+00:00 Store hidden modules in .haddock files We store documentation for an entity in the 'InstalledInterface' of the definition site module, and never in the same structure for a module which re-exports the entity. So when a client of the Haddock library wants to look up some documentation, he/she might need to access a hidden module. But we currently don't store hidden modules in the .haddock files. So we add the hidden modules and the Haddock options to the .haddock files. The options will be used to filter the module list to obtain the visible modules only, which is necessary for generating the contents and index for installed packages. - - - - - 8add6435 by David Waern at 2008-11-16T14:35:50+00:00 Bump major version number due to .haddock file format change - - - - - 48bfcf82 by David Waern at 2008-11-23T14:32:52+00:00 Update tests to account for version number bump - - - - - 0bbd1738 by David Waern at 2008-11-23T14:33:31+00:00 HADDOCK_DATA_DIR changed to haddock_datadir - - - - - 5088b78c by David Waern at 2008-11-23T17:13:21+00:00 FIX haskell/haddock#45: generate two anchors for each name We generate two anchor tags for each name, one where we don't escape the name and one where we URI-encode it. This is for compatibility between IE and Opera. Test output is updated. - - - - - 5ee5ca3b by Neil Mitchell at 2008-11-27T14:38:11+00:00 Drop HsDocTy annotations, they mess up pretty printing and also have a bracketing bug (#2584) - - - - - 51c014e9 by Roman Cheplyaka at 2008-11-27T22:27:36+00:00 Allow referring to a specific section within a module in a module link Fixes haskell/haddock#65 - - - - - 4094bdc5 by David Waern at 2008-11-28T21:13:33+00:00 Update tests following anchor change - - - - - f89552dd by Thomas Schilling at 2008-11-29T16:16:20+00:00 Haddock really shouldn't try to overwrite files. - - - - - 98127499 by David Waern at 2008-12-07T14:09:15+00:00 Solve conflict - - - - - 319356c5 by David Waern at 2008-10-22T21:16:55+00:00 Add -Wall -Werror to ghc-options - - - - - 3c4968c9 by David Waern at 2008-11-04T23:38:56+00:00 TAG 2.4.0 - - - - - 4b21e003 by David Waern at 2008-11-06T21:14:04+00:00 TAG 2.4.1 - - - - - 8e0cad5c by David Waern at 2008-12-07T14:12:54+00:00 Remove -Werror - - - - - 299d6deb by David Waern at 2008-12-07T14:25:18+00:00 Remove -Wall, we'll focus on warnings after 6.10.2 is out - - - - - 5f4216b6 by David Waern at 2008-12-07T20:58:05+00:00 Resolve conflict properly - - - - - 67d774e7 by Neil Mitchell at 2008-12-15T11:44:26+00:00 Make forall's in constructors explicit, i.e. data Foo = Foo {foo :: Eq a => a} - - - - - 61851792 by Neil Mitchell at 2008-12-18T15:39:39+00:00 Try and find a better package name than "main" for Hoogle, goes wrong when working on an executable rather than a library - - - - - 2fab8554 by David Waern at 2008-12-08T23:19:48+00:00 Make visible names from ExportItems Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment. - - - - - 7caadd8c by Ian Lynagh at 2008-12-11T17:01:04+00:00 Wrap the GHC usage with defaultCleanupHandler This fixes a bug where haddock leaves /tmp/ghc* directories uncleaned. - - - - - 7c9fc9a5 by David Waern at 2009-01-02T21:38:27+00:00 Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. - - - - - 119e4e05 by David Waern at 2009-01-06T23:34:17+00:00 Do not process boot modules We should of course not try to produce documentation for boot modules! The reason this has worked in the past is that the output of "real" modules overwrites the output of boot modules later in the process. However, this causes a subtle link environment problem. So let's get rid of this stupid behaviour. We avoid processing boot modules, but we continue to typecheck them. - - - - - c285b9d2 by David Waern at 2009-01-08T18:03:36+00:00 Export modules also when coming from external packages This seems to have regressed since a refactoring that was part of the 2.3.0 release. - - - - - 24031c17 by David Waern at 2009-01-10T15:26:26+00:00 Change version to 2.4.2 - no need to go to 2.5.0 - - - - - 864d1c3f by David Waern at 2009-01-10T15:35:20+00:00 Update tests to account for version number change - - - - - 524ba886 by David Waern at 2009-01-10T18:29:17+00:00 Add test for Template Haskell splicing - - - - - 05e6e003 by David Waern at 2009-01-10T19:35:42+00:00 Fix Trac haskell/haddock#68: Turn on compilation via C for Template Haskell packages We can't use HscNothing if we need to run code coming from modules inside the processed package during typechecking, which is the case for some packages using Template Haskell. This could be improved, to e.g. use HscInterpreted and HscNothing where possible, instead of using HscC for all modules in the package. - - - - - 2b2bafa1 by David Waern at 2009-01-10T20:22:25+00:00 Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above - - - - - bedc3a93 by Ian Lynagh at 2009-01-11T14:58:41+00:00 Fix the location of INPLACE_PKG_CONF; fixes the build Spotted by Conal Elliott - - - - - 943107c8 by David Waern at 2009-01-20T19:27:39+00:00 Document H.I.Create.collectDocs better - - - - - c6252e37 by David Waern at 2009-01-20T19:29:51+00:00 Fix Trac haskell/haddock#59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). - - - - - 3568a6af by David Waern at 2009-01-21T21:41:48+00:00 Do not indicate that a constructor argument is unboxed We only show the strictness annotation for an unboxed constructor argument. The fact that it is unboxed is an implementation detail and should not be part of the module interface. - - - - - 562a4523 by David Waern at 2009-01-22T18:53:49+00:00 Fix Trac haskell/haddock#50: do not attach docs to pragmas or other kinds of non-declarations We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations. - - - - - 6fdf21c2 by David Waern at 2009-01-22T19:48:09+00:00 Add test for quasi quotation. No reference output yet. - - - - - dc4100fd by David Waern at 2009-01-22T19:57:47+00:00 Improve quasi-quotation test and add reference output - - - - - 908b74bb by David Waern at 2009-01-23T23:22:03+00:00 Filter out separately exported associated types in a smarter way - - - - - f6b42ecb by David Waern at 2009-01-24T16:54:39+00:00 Correct spelling mistake in error message - - - - - 24e4245d by David Waern at 2009-01-24T17:48:03+00:00 Correct comment - - - - - b5e8462f by David Waern at 2009-02-07T13:22:29+00:00 Do not show a subordinate at the top level if its parent is also exported See note in the source code for more info. - - - - - 4b09de57 by David Waern at 2009-02-07T13:53:53+00:00 Update test following change to top level subordinates - - - - - 76379896 by David Waern at 2009-02-07T13:58:04+00:00 Remove html files in the tests/output/ directory which have been accidentally added - - - - - 1a6d8b10 by Joachim Breitner at 2009-02-20T10:29:43+00:00 Typo in comment - - - - - fec367d0 by David Waern at 2009-02-24T20:21:17+00:00 Fix small bug The rule is to prefer type constructors to other things when an identifier in a doc string can refer to multiple things. This stopped working with newer GHC versions (due to a tiny change in the GHC renamer). We implement this rule in the HTML backend for now, instead of fixing it in GHC, since we will move renaming of doc strings to Haddock in the future anyway. - - - - - 9b4172eb by David Waern at 2009-02-25T20:04:38+00:00 Fix bad error handling with newer GHCs When support for GHC 6.10 was added, an error handler was installed only around the typechecking phase. This had the effect that errors thrown during dependency chasing were caught in the top-level exception handler and not printed with enough detail. With this patch we wrap the error handler around all our usage of the Ghc monad. - - - - - de2df363 by Simon Peyton Jones at 2009-02-02T16:47:42+00:00 Hide funTyConName, now exported by TypeRep - - - - - 4d40a29f by Ian Lynagh at 2009-02-12T18:57:49+00:00 Don't build the library when building in the GHC tree - - - - - 1cd0abe4 by Ian Lynagh at 2009-02-13T13:58:53+00:00 Add a ghc.mk - - - - - 3d814eeb by Ian Lynagh at 2009-02-13T18:50:28+00:00 do .depend generation for haddock with the stage1 compiler This is a bit of a hack. We mkdepend with stage1 as if .depend depends on the stage2 compiler then make goes wrong: haddock's .depend gets included, which means that make won't reload until it's built, but we can't build it without the stage2 compiler. We therefore build the stage2 compiler before its .depend file is available, and so compilation fails. - - - - - b55036a4 by Ian Lynagh at 2009-02-25T01:38:13+00:00 Give haddock a wrapper on unix in the new GHC build system - - - - - 9eabfe68 by Ian Lynagh at 2009-02-25T19:21:32+00:00 Create inplace/lib/html in the new GHC build system - - - - - 93af30c7 by Ian Lynagh at 2008-11-07T19:18:23+00:00 TAG GHC 6.10.1 release - - - - - 06e6e34a by Thomas Schilling at 2009-02-24T18:11:00+00:00 Define __GHC_PATCHLEVEL__ for recent version of GHC (stable). - - - - - 680e6ed8 by Thomas Schilling at 2009-02-24T18:12:26+00:00 'needsTemplateHaskell' is not defined in current stable GHC. - - - - - 6c5619df by David Waern at 2009-02-25T22:15:23+00:00 Hide fynTyConName only for recent GHC versions - - - - - 6b2344f1 by Ian Lynagh at 2009-02-26T00:49:56+00:00 Add the module to one of haddocks warnings - - - - - e5d11c70 by David Waern at 2009-02-27T21:37:20+00:00 Bug fix We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates. - - - - - 10a79a60 by David Waern at 2009-02-27T22:08:08+00:00 Fix error message conflict The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now. - - - - - c5055c7f by David Waern at 2009-02-27T22:15:17+00:00 Shorten warning message - - - - - a72fed3a by David Waern at 2009-02-28T00:53:55+00:00 Do not show package name in warning message - - - - - a5daccb2 by Ian Lynagh at 2009-03-01T14:59:35+00:00 Install haddock in the new GHC build system - - - - - dfdb025c by Ian Lynagh at 2009-03-07T23:56:29+00:00 Relax base dependency to < 4.2, not < 4.1 - - - - - 5769c8b4 by David Waern at 2009-03-21T14:58:52+00:00 Bump .haddock file version number (due to change of format) - - - - - f1b8f67b by David Waern at 2009-03-21T14:59:26+00:00 Define __GHC_PATCHLEVEL__=1 when using ghc-6.10.1 - - - - - 23f78831 by David Waern at 2009-03-21T16:40:52+00:00 Update CHANGES - - - - - 7d2735e9 by David Waern at 2009-03-21T16:50:33+00:00 Update ANNOUNCE - - - - - 0771e00a by David Waern at 2009-03-21T16:54:40+00:00 Update ANNOUNCE, again - - - - - 81a6942a by David Waern at 2009-03-21T17:50:06+00:00 Don't be too verbose in CHANGES - - - - - 29861dcf by David Waern at 2009-03-21T18:03:31+00:00 TAG 2.4.2 - - - - - a585f285 by David Waern at 2009-03-21T19:20:29+00:00 Require Cabal >= 1.2.3 - - - - - 7c611662 by David Waern at 2009-03-21T19:21:48+00:00 TAG 2.4.2 with cabal-version >= 1.2.3 - - - - - 23b7deff by Simon Marlow at 2009-03-20T15:43:42+00:00 new GHC build system: use shell-wrappers macro - - - - - 25f8afe7 by Ian Lynagh at 2009-03-21T19:13:53+00:00 Fix (with a hack?) haddock in teh new build system - - - - - 6a29a37e by David Waern at 2009-03-24T22:10:15+00:00 Remove unnecessary LANGUAGE pragma - - - - - 954da57d by David Waern at 2009-03-24T22:21:23+00:00 Fix warnings in H.B.DevHelp - - - - - 1619f1df by David Waern at 2009-03-26T23:20:44+00:00 -Wall police in H.B.Html - - - - - b211e13b by Simon Marlow at 2009-03-24T13:00:56+00:00 install Haddock's html stuff - - - - - 78e0b107 by David Waern at 2008-12-07T19:58:53+00:00 Add verbosity flag and utils, remove "verbose" flag - - - - - 913dae06 by David Waern at 2008-12-07T20:01:05+00:00 Add some basic "verbose" mode logging in H.Interface - - - - - 1cbff3bf by David Waern at 2009-03-27T00:07:26+00:00 Fix conflicts - - - - - 22f82032 by David Waern at 2009-03-27T21:15:11+00:00 Remove H.GHC.Typecheck - - - - - 81557804 by David Waern at 2009-03-27T21:19:22+00:00 Remove docNameOrig and use getName everywhere instead - - - - - d8267213 by David Waern at 2009-03-27T21:21:46+00:00 Use docNameOcc instead of nameOccName . getName - - - - - 5d55deab by David Waern at 2009-03-27T21:33:04+00:00 Remove H.DocName and put DocName in H.Types - - - - - 8ba72611 by David Waern at 2009-03-27T22:06:26+00:00 Document DocName - - - - - 605f8ca5 by David Waern at 2009-03-27T22:45:21+00:00 -Wall police - - - - - e4da93ae by David Waern at 2009-03-27T23:12:53+00:00 -Wall police in H.B.Hoogle - - - - - bb255519 by David Waern at 2009-03-27T23:41:28+00:00 Define Foldable and Traversable instances for Located - - - - - f1195cfe by David Waern at 2009-03-27T23:51:34+00:00 Wibble - - - - - 23818d7c by David Waern at 2009-03-28T00:03:55+00:00 -Wall police in H.I.Rename - - - - - 0f050d67 by David Waern at 2009-03-28T00:15:15+00:00 -Wall police in H.I.AttachInstances - - - - - 0f3fe038 by David Waern at 2009-03-28T21:09:41+00:00 Wibble - - - - - 275d4865 by David Waern at 2009-03-28T21:27:06+00:00 Layout fix - - - - - 54ff0ef8 by David Waern at 2009-03-28T21:59:07+00:00 -Wall police in H.I.Create - - - - - 7f58b117 by David Waern at 2009-03-28T22:10:19+00:00 -Wall police in H.Interface - - - - - f0c03b44 by David Waern at 2009-03-28T22:22:59+00:00 -Wall police in Main - - - - - 29da355c by David Waern at 2009-03-28T22:23:39+00:00 Turn on -Wall -Werror - - - - - 446d3060 by David Waern at 2009-04-01T20:40:30+00:00 hlint police - - - - - 3867c9fc by David Waern at 2009-04-01T20:48:42+00:00 hlint police - - - - - bd1f1600 by David Waern at 2009-04-01T20:58:02+00:00 hlint police - - - - - e0e90866 by David Waern at 2009-04-05T12:42:53+00:00 Move H.GHC.Utils to H.GhcUtils - - - - - 9cbd426b by David Waern at 2009-04-05T12:57:21+00:00 Remove Haddock.GHC and move its (small) contents to Main - - - - - b5c2cbfd by David Waern at 2009-04-05T13:07:04+00:00 Fix whitespace and stylistic issues in Main - - - - - 3c04aa56 by porges at 2008-12-07T08:22:19+00:00 add unicode output - - - - - 607918da by David Waern at 2009-04-26T15:09:43+00:00 Resolve conflict - - - - - 4bec6b6b by Simon Marlow at 2009-05-13T10:00:31+00:00 fix markup - - - - - 436ad6f4 by Simon Marlow at 2009-03-23T11:54:45+00:00 clean up - - - - - bdcd1398 by Simon Marlow at 2009-03-24T10:36:45+00:00 new GHC build system: add $(exeext) - - - - - 9c0972f3 by Simon Marlow at 2009-03-24T11:04:31+00:00 update for new GHC build system layout - - - - - d0f3f83a by Ian Lynagh at 2009-03-29T15:31:43+00:00 GHC new build system fixes - - - - - 5a8245c2 by Ian Lynagh at 2009-04-04T20:44:23+00:00 Tweak new build system - - - - - 9c6f2d7b by Simon Marlow at 2009-05-13T10:01:27+00:00 add build instructions for GHC - - - - - 66d07c76 by Ian Lynagh at 2009-05-31T00:37:53+00:00 Quote program paths in ghc.mk - - - - - bb7de2cd by Ian Lynagh at 2009-06-03T22:57:55+00:00 Use a bang pattern on an unlifted binding - - - - - 3ad283fc by Ian Lynagh at 2009-06-13T16:17:50+00:00 Include haddock in GHC bindists - - - - - ac447ff4 by David Waern at 2009-06-24T21:07:50+00:00 Delete Haddock.Exception and move contents to Haddock.Types Only a few lines of code that mainly declares a type - why not just put it in Haddock.Types. - - - - - 4464fb9b by David Waern at 2009-06-24T22:23:23+00:00 Add Haddock module headers Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock at projects.haskell.org. Next step is to add a brief description to each module. - - - - - 5f4c95dd by David Waern at 2009-06-24T22:39:44+00:00 Fix spelling error - - - - - 6d074cdb by David Waern at 2009-06-25T21:53:56+00:00 Document Interface and InstalledInterface better - - - - - d0cbd183 by David Waern at 2009-06-27T12:46:46+00:00 Remove misplaced whitespace in H.I.Rename - - - - - fa381c49 by David Waern at 2009-06-27T13:26:03+00:00 Fix haskell/haddock#104 - create output directory if missing - - - - - 91fb77ae by Ian Lynagh at 2009-06-25T15:59:50+00:00 TAG 2009-06-25 - - - - - 0d853f40 by Simon Peyton Jones at 2009-07-02T15:35:22+00:00 Follow extra field in ConDecl - - - - - b201735d by Ian Lynagh at 2009-07-05T16:50:35+00:00 Update Makefile for the new GHC build system - - - - - df6c0092 by Ian Lynagh at 2009-07-05T17:01:13+00:00 Resolve conflicts - - - - - 1066870a by Ian Lynagh at 2009-07-05T17:01:48+00:00 Remove the -Wwarn hack in the GHC build system - - - - - 7e856076 by Ian Lynagh at 2009-07-05T17:17:59+00:00 Fix warnings - - - - - 5d4cd958 by Ian Lynagh at 2009-07-05T19:35:40+00:00 Bump version number Cabal needs to distinguish between haddocks having a --verbose and --verbosity flag - - - - - 6ee07c99 by David Waern at 2009-07-06T20:14:57+00:00 Wibble - - - - - 2308b66f by David Waern at 2009-07-06T20:24:20+00:00 Clearer printing of versions by runtests.hs - - - - - d4b5d9ab by David Waern at 2009-07-06T21:22:42+00:00 Fix (invisible) bug introduced by unicode patch - - - - - 2caca8d8 by David Waern at 2009-07-06T21:44:10+00:00 Use HscAsm instead of HscC when using TH - - - - - 18f3b755 by David Waern at 2009-07-06T22:10:22+00:00 Update HCAR entry (by Janis) - - - - - a72ac9db by David Waern at 2009-07-06T23:01:35+00:00 Follow HsRecTy change with an #if __GLASGOW_HASKEL__ >= 611 - - - - - 549135d2 by David Waern at 2009-07-06T23:11:41+00:00 Remove unused functions from Haddock.Utils - - - - - b450134a by Isaac Dupree at 2009-07-11T14:59:00+00:00 revert to split-index for large indices - remove the search-box, because browsers have search-for-text abilities anyway. - pick 150 items in index as the arbitrary time at which to split it - notice the bug that identifiers starting with non-ASCII characters won't be listed in split-index, but don't bother to fix it yet (see ticket haskell/haddock#116, http://trac.haskell.org/haddock/ticket/116 ) - - - - - 78a5661e by Isaac Dupree at 2009-07-20T15:37:18+00:00 Implement GADT records in HTML backend - - - - - 4e163555 by Isaac Dupree at 2009-07-21T22:03:25+00:00 add test for GADT records - - - - - 79aa4d6e by David Waern at 2009-07-23T20:40:37+00:00 Update test suite following version bump - - - - - 5932c011 by David Waern at 2009-08-02T10:25:39+00:00 Fix documentation bug - - - - - a6970fca by David Waern at 2009-08-12T23:08:53+00:00 Remove support for ghc 6.8.* from .cabal file - - - - - c1695902 by Ian Lynagh at 2009-07-07T13:35:45+00:00 Fix unused import warnings - - - - - fb6df7f9 by Ian Lynagh at 2009-07-16T00:20:31+00:00 Use cProjectVersion directly rather than going through compilerInfo Fixes the build after changes in GHC - - - - - 548cdd66 by Simon Marlow at 2009-07-28T14:27:04+00:00 follow changes in GHC's ForeignType - - - - - 9395aaa0 by David Waern at 2009-08-13T22:17:33+00:00 Switch from PatternSignatures to ScopedTypeVariables in Main - - - - - eebf39bd by David Waern at 2009-08-14T17:14:28+00:00 Version .haddock files made with GHC 6.10.3/4 correclty - - - - - 58f3e735 by David Waern at 2009-08-14T17:19:37+00:00 Support GHC 6.10.* and 6.11.* only - - - - - 5f63cecc by David Waern at 2009-08-14T22:03:20+00:00 Do not version .haddock file based on GHC patchlevel version We require that the instances of Binary that we use from GHC will not change between patchlevel versions. - - - - - d519de9f by David Waern at 2009-08-14T23:50:00+00:00 Update CHANGES - - - - - 35dccf5c by David Waern at 2009-08-14T23:51:38+00:00 Update version number everywhere - - - - - 6d363fea by David Waern at 2009-08-15T09:46:49+00:00 Update ANNOUNCE - - - - - c7ee6bc2 by David Waern at 2009-08-15T09:47:13+00:00 Remove -Werror Forgot that Hackage doesn't like it. - - - - - a125c12b by David Waern at 2009-08-15T09:49:50+00:00 Require Cabal >= 1.6 - - - - - adb2f560 by Isaac Dupree at 2009-08-12T03:47:14+00:00 Cross-Package Documentation version 4 - - - - - 3d6dc04d by David Waern at 2009-08-15T23:42:57+00:00 Put all the IN_GHC_TREE stuff inside getGhcLibDir - - - - - 56624097 by David Waern at 2009-08-15T23:52:03+00:00 Add --print-ghc-libdir - - - - - f15d3ccb by David Waern at 2009-08-16T00:37:52+00:00 Read base.haddock when running tests We can now test cross-package docs. - - - - - 283f0fb9 by David Waern at 2009-08-16T00:50:59+00:00 Update test output - we now have more links - - - - - 673d1004 by David Waern at 2009-08-16T01:26:08+00:00 Read process.haddock when running tests - - - - - 0d127f82 by David Waern at 2009-08-16T01:43:04+00:00 Add a test for cross-package documentation - - - - - f94db967 by Ian Lynagh at 2009-08-16T18:42:44+00:00 Follow GHC build system changes - - - - - 5151278a by Isaac Dupree at 2009-08-16T19:58:05+00:00 make cross-package list types look nicer - - - - - c41e8228 by Isaac Dupree at 2009-08-18T01:47:47+00:00 Haddock.Convert: export more functions This lets us remove some code in Haddock.Interface.AttachInstances - - - - - 2e5fa398 by Isaac Dupree at 2009-08-18T02:11:05+00:00 switch AttachInstances to use synify code It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication! - - - - - b8b07123 by Isaac Dupree at 2009-08-18T02:23:31+00:00 Find instances using GHC, which is more complete. In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?) - - - - - 6959b451 by Isaac Dupree at 2009-08-17T00:37:18+00:00 fix preprocessor conditional sense - - - - - 942823af by Isaac Dupree at 2009-08-16T22:46:48+00:00 remove ghc 6.8 conditionals from Haddock.Interface - - - - - 4b3ad888 by Isaac Dupree at 2009-08-18T20:24:38+00:00 Fix GHC 6.11 build in Haddock.Convert - - - - - 0a89c5ab by Isaac Dupree at 2009-08-23T00:08:58+00:00 hacks to make it compile without fnArgDocsn - - - - - 7b3bed43 by Isaac Dupree at 2009-08-23T03:01:28+00:00 less big-Map-based proper extraction of constructor subdocs - - - - - b21c279a by Isaac Dupree at 2009-08-23T03:02:06+00:00 Html: remove unnecessary+troublesome GHC. qualifications - - - - - 96c97115 by Isaac Dupree at 2009-08-23T03:08:03+00:00 Move doc parsing/lexing into Haddock for ghc>=6.11 - - - - - e1cec02d by Isaac Dupree at 2009-08-23T05:08:14+00:00 get rid of unused DocMap parameter in Html - - - - - 66960c59 by Isaac Dupree at 2009-08-23T05:54:20+00:00 fix horrible named-docs-disappearing bug :-) - - - - - a9d7eff3 by Isaac Dupree at 2009-08-23T06:26:36+00:00 re-implement function-argument docs ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently. - - - - - 8bf6852c by Isaac Dupree at 2009-08-23T07:26:05+00:00 cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! - - - - - 30115a64 by Isaac Dupree at 2009-08-23T18:22:47+00:00 Improve behavior for unfindable .haddock - - - - - aa364bda by Isaac Dupree at 2009-08-23T18:28:16+00:00 add comment for FnArgsDoc type - - - - - 49b23a99 by Isaac Dupree at 2009-08-23T21:52:48+00:00 bugfix: restore fnArgDocs for type-synonyms - - - - - f65f9467 by Isaac Dupree at 2009-08-23T22:06:55+00:00 Backends.Hoogle: eliminate warnings - - - - - a292d216 by Isaac Dupree at 2009-08-23T22:10:24+00:00 Haddock.Convert: eliminate warnings - - - - - 5546cd20 by Isaac Dupree at 2009-08-23T22:12:31+00:00 Haddock.Interface.Rename: eliminate warnings - - - - - 0a9798b6 by Isaac Dupree at 2009-08-23T22:18:47+00:00 Main.hs: remove ghc<6.9 conditionals - - - - - e8f9867f by Isaac Dupree at 2009-08-23T22:27:46+00:00 Main.hs: eliminate warnings (except for OldException) - - - - - 61c64247 by Isaac Dupree at 2009-08-23T22:41:01+00:00 move get*LibDir code in Main.hs, to +consistent code, -duplication - - - - - 948f1e69 by Isaac Dupree at 2009-08-23T23:14:26+00:00 Main.hs: OldException->Exception: which eliminates warnings - - - - - 3d5d5e03 by Isaac Dupree at 2009-08-23T23:20:11+00:00 GhcUtils: ghc >= 6.10 - - - - - 2771d657 by Isaac Dupree at 2009-08-23T23:21:55+00:00 InterfaceFile: ghc >= 6.10 - - - - - d9f2b9d1 by Isaac Dupree at 2009-08-23T23:22:58+00:00 Types: ghc >= 6.10 - - - - - ca39210e by Isaac Dupree at 2009-08-23T23:23:26+00:00 ModuleTree: ghc >= 6.10 - - - - - 883c4e59 by Isaac Dupree at 2009-08-23T23:24:04+00:00 Backends.DevHelp: ghc >= 6.10 - - - - - 04667df5 by Isaac Dupree at 2009-08-23T23:24:37+00:00 Backends.Html: ghc >= 6.10 - - - - - a9f7f25f by Isaac Dupree at 2009-08-23T23:25:24+00:00 Utils: ghc >= 6.10 - - - - - b7105022 by Isaac Dupree at 2009-08-23T23:37:47+00:00 eliminate haskell98 dependency, following GHC's example It turns out I/we already had, and it was only a matter of deleting it from the cabal file. - - - - - 292e0911 by Isaac Dupree at 2009-08-24T01:22:44+00:00 refactor out subordinatesWithNoDocs dep of inferenced-decls fix - - - - - c2ed46a2 by Isaac Dupree at 2009-08-24T01:24:03+00:00 Eradicate wrong runtime warning for type-inferenced exported-functions see the long comment in the patch for why I did it this way :-) - - - - - 4ac0b57c by David Waern at 2009-09-04T22:56:20+00:00 Clean up tyThingToHsSynSig a little Factor out noLoc and use the case construct. Also rename the function to tyThingToLHsDecl, since it doesn't just create type signatures. - - - - - 28ab9201 by David Waern at 2009-09-04T22:58:50+00:00 Wibble - - - - - 0d9fe6d0 by David Waern at 2009-09-06T18:39:30+00:00 Add more copyright owners to H.I.AttachInstances - - - - - 122441b1 by David Waern at 2009-09-06T18:44:12+00:00 Style police - - - - - 1fa79463 by David Waern at 2009-09-06T18:57:45+00:00 Move toHsInstHead to Haddock.Convert and call it synifyInstHead - - - - - 0d42a8aa by David Waern at 2009-09-06T21:11:38+00:00 Use colordiff to display test results if available - - - - - ea9d8e03 by Simon Marlow at 2009-08-24T08:46:14+00:00 Follow changes in GHC's interface file format Word32 instead of Int for FastString and Name offsets - - - - - 537e051e by Simon Marlow at 2009-07-29T14:16:53+00:00 define unpackPackageId (it was removed from GHC) - - - - - 50c63aa7 by David Waern at 2009-09-09T23:18:03+00:00 Remove commented-out code - - - - - 511631fe by David Waern at 2009-09-09T23:19:05+00:00 Correct copyright in H.I.ParseModuleHeader - - - - - 898ec768 by David Waern at 2009-09-11T11:22:29+00:00 Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time. - - - - - 37bec0d5 by Simon Peyton Jones at 2009-09-11T08:28:04+00:00 Track change in HsType - - - - - eb3a97c3 by Ian Lynagh at 2009-09-11T16:07:09+00:00 Allow building with base 4.2 - - - - - bb4205ed by Ian Lynagh at 2009-09-22T13:50:02+00:00 Loosen the GHC dependency - - - - - 5c75deb2 by Ian Lynagh at 2009-09-22T14:08:39+00:00 Fix building with GHC >= 6.12 - - - - - fb131481 by David Waern at 2009-09-11T11:24:48+00:00 Update runtests.hs to work with GHC 6.11 - - - - - ac3a419d by David Waern at 2009-09-11T11:25:14+00:00 Update CrossPackageDocs test - - - - - ec65c3c6 by David Waern at 2009-09-11T11:25:40+00:00 Add reference output for CrossPackageDocs - - - - - 520c2758 by Ian Lynagh at 2009-10-25T17:26:40+00:00 Fix installation in the GHC build system - - - - - 28b3d7df by Ian Lynagh at 2009-11-05T15:57:27+00:00 GHC build system: Make *nix installation work in paths containing spaces - - - - - 5c9bb541 by David Waern at 2009-11-14T11:56:39+00:00 Track change in HsType for the right compiler version - - - - - 905097ce by David Waern at 2009-11-14T12:10:47+00:00 hlint police - - - - - 04920630 by Ian Lynagh at 2009-11-20T13:46:30+00:00 Use defaultObjectTarget rather than HscAsm This fixes haddock when we don't have a native code generator - - - - - 966eb079 by David Waern at 2009-11-15T12:32:21+00:00 Remove commented-out code - - - - - 37f00fc4 by David Waern at 2009-11-22T13:58:48+00:00 Make runtests.hs strip links before diffing Generates easier to read diffs when tests fail. The content of the links is not important anyway since it is not taken into account by the tests. - - - - - 3a9bb8ef by David Waern at 2009-11-22T14:05:06+00:00 Follow findProgramOnPath signature change in runtests.hs - - - - - b26b9e5a by David Waern at 2009-11-22T14:08:40+00:00 Follow removal of GHC.MVar from base in CrossPackageDocs - - - - - f4d90ae4 by David Waern at 2009-11-22T14:48:47+00:00 Make copy.hs strip link contents before copying No more updating of reference files when URLs in links changes. - - - - - 4c9c420d by David Waern at 2009-11-22T15:26:41+00:00 Update test reference output * More links (Int, Float etc) * Stripped link contents - - - - - a62b80e3 by David Waern at 2009-11-23T23:19:39+00:00 Update CrossPackageDocs reference output - Remove GHC.MVar import (removed from base) - Strip link contents - - - - - 43491394 by David Waern at 2009-11-23T23:20:00+00:00 Update test reference files with comments on instances - - - - - 0d370a0b by David Waern at 2009-11-23T23:25:16+00:00 Bump version number - - - - - 2293113e by David Waern at 2009-11-24T20:55:49+00:00 Comments on instances Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances - - - - - bf586f29 by David Waern at 2009-11-27T22:05:15+00:00 Whitespace police - - - - - b8f03afa by David Waern at 2009-11-27T22:11:46+00:00 Remove bad whitespace and commented-out pieces - - - - - 90b8ee90 by David Waern at 2009-11-27T22:15:04+00:00 Whitespace police - - - - - b5ede900 by David Waern at 2009-11-27T22:15:50+00:00 Whitespace police - - - - - e3fddbfe by David Waern at 2009-11-28T13:37:59+00:00 Remove Name from DocInstance It's not used. - - - - - 9502786c by David Waern at 2009-11-28T13:56:54+00:00 Require at least GHC 6.12 While regression testing Haddock, I found a bug that happens with GHC 6.10.3, but not with GHC 6.12-rc2 (haven't tried 6.10.4). I don't have time to track it down. I think we should just always require the latest major GHC version. The time spent on making Haddock work with older versions is too high compared to the time spent on bugfixing, refactoring and features. - - - - - 8fa688d8 by David Waern at 2009-11-28T15:05:03+00:00 Remove cruft due to compatibility with older GHCs - - - - - 46fbbe9d by David Waern at 2009-11-28T15:07:50+00:00 Add a documentation header to Haddock.Convert - - - - - c3d2cc4a by David Waern at 2009-11-28T15:10:14+00:00 Remove unused H.Utils.FastMutInt2 - - - - - 490aba80 by David Waern at 2009-11-28T15:36:36+00:00 Rename Distribution.Haddock into Documentation.Haddock - - - - - 33ee2397 by David Waern at 2009-11-28T15:36:47+00:00 Fix error message - - - - - a5a3b950 by David Waern at 2009-11-28T16:58:39+00:00 Add a test flag that brings in QuickCheck - - - - - fa049e13 by David Waern at 2009-11-28T19:32:18+00:00 Say that we want quickcheck 2 - - - - - f32b0d9b by David Waern at 2009-11-28T19:32:40+00:00 Add an Arbitrary instance for HsDoc - - - - - da9a8bd7 by David Waern at 2009-11-28T20:15:30+00:00 Rename HsDoc back into Doc - - - - - edb60101 by David Waern at 2009-11-28T22:16:16+00:00 Move H.Interface.Parse/Lex to H.Parse/Lex These are not just used to build Interfaces. - - - - - 0656a9b8 by David Waern at 2009-11-28T23:12:14+00:00 Update version number in test suite - - - - - 5e8c6f4a by David Waern at 2009-12-21T14:12:41+00:00 Improve doc of DocName - - - - - 7868e551 by Ian Lynagh at 2009-09-22T10:43:03+00:00 TAG GHC 6.12-branch created - - - - - 0452a3ea by Ian Lynagh at 2009-12-15T12:46:07+00:00 TAG GHC 6.12.1 release - - - - - 65e9be62 by David Waern at 2009-12-21T16:58:58+00:00 Update CHANGES - - - - - 145cee32 by David Waern at 2009-12-21T16:59:09+00:00 TAG 2.6.0 - - - - - 3c552008 by David Waern at 2009-12-22T17:11:14+00:00 Update ANNOUNCE - - - - - 931f9db4 by David Waern at 2010-01-22T19:57:17+00:00 Convert haddock.vim to use unix newlines - - - - - 4e56588f by David Waern at 2010-01-22T22:11:17+00:00 Remove unnecessary (and inexplicable) uses of nub - - - - - 744bb4d1 by David Waern at 2010-01-22T22:12:14+00:00 Follow move of parser and lexer - - - - - e34bab14 by David Waern at 2010-01-22T22:49:13+00:00 Use findProgramLocation instead of findProgramOnPath in runtests.hs - - - - - 8d39891b by Isaac Dupree at 2010-01-14T18:53:18+00:00 fix html arg-doc off-by-one and silliness - - - - - 9401f2e9 by David Waern at 2010-01-22T22:57:03+00:00 Create a test for function argument docs - - - - - 507a82d7 by David Waern at 2010-01-22T23:24:47+00:00 Put parenthesis around type signature arguments of function type - - - - - 8a305c28 by David Waern at 2010-01-23T17:26:59+00:00 Add reference file for the FunArgs test - - - - - 1309d5e1 by David Waern at 2010-01-24T16:05:08+00:00 Improve FunArg test and update Test.html.ref - - - - - 2990f055 by Yitzchak Gale at 2010-02-14T16:03:46+00:00 Do not generate illegal character in HTML ID attribute. - - - - - c5bcab7a by David Waern at 2010-02-22T22:10:30+00:00 Fix Haddock markup error in comment - - - - - c6416a73 by David Waern at 2010-02-24T22:55:08+00:00 Large additions to the Haddock API Also improved and added more doc comments. - - - - - 57d289d7 by David Waern at 2010-02-24T22:58:02+00:00 Remove unused ifaceLocals - - - - - 80528d93 by David Waern at 2010-02-25T21:05:09+00:00 Add HaddockModInfo to the API - - - - - 82806848 by David Waern at 2010-02-25T21:05:27+00:00 Wibble - - - - - 744cad4c by David Waern at 2010-02-25T23:30:59+00:00 Make it possible to run a single test - - - - - 6a806e4c by David Waern at 2010-03-14T14:19:39+00:00 Bump version number - - - - - a5a8e4a7 by David Waern at 2010-03-14T14:36:35+00:00 Update ANNOUNCE - - - - - 6f05435e by Simon Hengel at 2010-03-15T20:52:42+00:00 Add missing dependencies for 'library' in haddock.cabal - - - - - faefe2bd by David Waern at 2010-03-15T22:29:37+00:00 Solve conflicts - - - - - 9808ad52 by David Waern at 2010-03-15T22:51:21+00:00 Bump version number - - - - - eb0bf60b by David Waern at 2010-03-15T22:52:32+00:00 Update CHANGES - - - - - f95cd891 by David Waern at 2010-03-15T23:01:06+00:00 Add Paths_haddock to other-modules of library - - - - - 65997b0a by David Waern at 2010-03-15T23:14:59+00:00 Update CHANGES - - - - - 7e251731 by David Waern at 2010-03-15T23:15:30+00:00 Bump version number - - - - - c9cd0ddc by David Waern at 2010-03-16T00:28:34+00:00 Fix warning - - - - - 1cac2d93 by Simon Peyton Jones at 2010-01-04T15:22:16+00:00 Fix imports for new location of splitKindFunTys - - - - - 474f26f6 by Simon Peyton Jones at 2010-02-10T14:36:06+00:00 Update Haddock for quasiquotes - - - - - 0dcc06c0 by Simon Peyton Jones at 2010-02-10T10:59:45+00:00 Track changes in HsTyVarBndr - - - - - 2d84733a by Simon Peyton Jones at 2010-02-10T14:52:44+00:00 Track HsSyn chnages - - - - - 9e3adb8b by Ian Lynagh at 2010-02-20T17:09:42+00:00 Resolve conflicts - - - - - a3e72ff8 by Simon Peyton Jones at 2010-03-04T13:05:16+00:00 Track change in HsUtils; and use a nicer function not an internal one - - - - - 27994854 by David Waern at 2010-03-18T22:22:27+00:00 Fix build with GHC 6.12.1 - - - - - 11f6e488 by David Waern at 2010-03-18T22:24:09+00:00 Bump version in test reference files - - - - - 0ef2f11b by David Waern at 2010-03-20T00:56:30+00:00 Fix library part of cabal file when in ghc tree - - - - - 3f6146ff by Mark Lentczner at 2010-03-20T22:30:11+00:00 First, experimental XHTML rendering switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString) - - - - - b8ab329b by Mark Lentczner at 2010-03-20T22:54:01+00:00 apply changes to Html.hs to Xhtml/*.hs incorporate changes that were made between the time Html.hs was copied and split into Xhtml.hs and Xhtml/*.hs includes patchs after "Wibble" (!) through "Fix build with GHC 6.12.1" - - - - - 73df2433 by Ian Lynagh at 2010-03-20T21:56:37+00:00 Follow LazyUniqFM->UniqFM in GHC - - - - - db4f602b by David Waern at 2010-03-29T22:00:01+00:00 Fix build with GHC 6.12 - - - - - d8dca088 by Simon Hengel at 2010-04-02T16:39:55+00:00 Add missing dependencies to cabal file - - - - - e2adc437 by Simon Hengel at 2010-04-02T14:08:40+00:00 Add markup support for interactive examples - - - - - e882ac05 by Simon Hengel at 2010-04-02T14:11:53+00:00 Add tests for interactive examples - - - - - 5a07a6d3 by David Waern at 2010-04-07T17:05:20+00:00 Propagate source positions from Lex.x to Parse.y - - - - - 6493b46f by David Waern at 2010-04-07T21:48:57+00:00 Let runtests.hs die when haddock has not been built - - - - - 5e34423e by David Waern at 2010-04-07T22:01:13+00:00 Make runtests.hs slightly more readable - - - - - 321d59b3 by David Waern at 2010-04-07T22:13:27+00:00 Fix haskell/haddock#75 Add colons to the $ident character set. - - - - - 37b08b8d by David Waern at 2010-04-08T00:32:52+00:00 Fix haskell/haddock#118 Avoid being too greedy when lexing URL markup (<..>), in order to allow multiple URLs on the same line. Do the same thing with <<..>> and #..#. - - - - - df8feac9 by David Waern at 2010-04-08T00:57:33+00:00 Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. - - - - - 1ca6f84b by David Waern at 2010-04-08T01:03:06+00:00 Add ghc-prim to test suite deps - - - - - 27371e3a by Simon Hengel at 2010-04-08T19:26:34+00:00 Let parsing fails on paragraphs that are immediately followed by an example This is more consistent with the way we treat code blocks. - - - - - 83096e4a by David Waern at 2010-04-08T21:20:00+00:00 Improve function name - - - - - 439983ce by David Waern at 2010-04-10T10:46:14+00:00 Fix haskell/haddock#112 No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds. - - - - - 5c0d35d7 by David Waern at 2010-04-10T10:54:06+00:00 Rename startGhc into withGhc - - - - - dca081fa by Simon Hengel at 2010-04-12T19:09:16+00:00 Add documentation for interactive examples - - - - - c7f26bfa by David Waern at 2010-04-13T00:51:51+00:00 Slight fix to the documentation of examples - - - - - 06eb7c4c by David Waern at 2010-04-13T00:57:05+00:00 Rename Interactive Examples into Examples (and simplify explanation) - - - - - 264830cb by David Waern at 2010-05-10T20:07:27+00:00 Update CHANGES with info about 2.6.1 - - - - - 8e5d4514 by Simon Hengel at 2010-04-18T18:16:54+00:00 Add unit tests for parser - - - - - 68297f40 by David Waern at 2010-05-10T21:53:37+00:00 Improve testsuite README - - - - - f04eb6e4 by David Waern at 2010-05-11T19:14:31+00:00 Re-organise the testsuite structure - - - - - a360f710 by David Waern at 2010-05-11T19:18:03+00:00 Shorten function name - - - - - 1d5dd359 by David Waern at 2010-05-11T21:40:02+00:00 Update runtests.hs following testsuite re-organisation - - - - - ffebe217 by David Waern at 2010-05-11T21:40:10+00:00 Update runtests.hs to use base-4.2.0.1 - - - - - 635de402 by David Waern at 2010-05-11T21:41:11+00:00 Update runparsetests.hs following testsuite reorganisation - - - - - 72137910 by Ian Lynagh at 2010-05-06T20:43:06+00:00 Fix build - - - - - 1a80b76e by Ian Lynagh at 2010-05-06T22:25:29+00:00 Remove redundant import - - - - - 1031a80c by Simon Peyton Jones at 2010-05-07T13:21:09+00:00 Minor wibbles to HsBang stuff - - - - - dd8e7fe5 by Ian Lynagh at 2010-05-08T15:22:00+00:00 GHC build system: Follow "rm" variable changes - - - - - 7f5e6748 by David Waern at 2010-05-13T11:53:02+00:00 Fix build with GHC 6.12.2 - - - - - 7953d4d8 by David Waern at 2010-05-13T18:45:01+00:00 Fixes to comments only - - - - - 8ae8eb64 by David Waern at 2010-05-13T18:57:26+00:00 ModuleMap -> IfaceMap - - - - - 1c3eadc6 by David Waern at 2010-05-13T19:03:13+00:00 Fix whitespace style issues - - - - - e96783c0 by David Waern at 2010-05-13T19:08:53+00:00 Fix comment - - - - - c998a78b by David Waern at 2010-05-13T19:39:00+00:00 Position the module header the same way everywhere Silly, but nice with some consistency :-) - - - - - b48a714e by David Waern at 2010-05-13T19:41:32+00:00 Position of module header, this time in the HTML backends - - - - - f9bfb12e by David Waern at 2010-05-13T19:43:05+00:00 Two newlines between declarations in Main - - - - - 071d44c7 by David Waern at 2010-05-13T19:44:21+00:00 Newlines in Convert - - - - - 036346db by David Waern at 2010-05-13T19:46:47+00:00 Fix a few stylistic issues in H.InterfaceFile - - - - - f0b8379e by David Waern at 2010-05-13T19:47:53+00:00 Add newlines to H.ModuleTree - - - - - 27409f8e by David Waern at 2010-05-13T19:51:10+00:00 Fix stylistic issues in H.Utils - - - - - 24774a11 by David Waern at 2010-05-13T20:00:43+00:00 Structure H.Types better - - - - - 7b6f5e40 by David Waern at 2010-05-13T20:01:04+00:00 Remove bad Arbitrary instance - - - - - fac9f1f6 by David Waern at 2010-05-13T20:05:50+00:00 Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead - - - - - fe6d00c4 by David Waern at 2010-05-13T20:51:55+00:00 Export a couple of more types from the API - - - - - b2e33a5f by David Waern at 2010-05-13T21:27:51+00:00 Improve doc comment for Interface - - - - - c585f2ce by David Waern at 2010-05-13T21:30:14+00:00 Improve documentation of Haddock.Interface - - - - - e6791db2 by David Waern at 2010-05-13T22:07:35+00:00 Remove meaningless comments - - - - - 7801b390 by David Waern at 2010-05-14T17:53:33+00:00 Remove unused modules - - - - - f813e937 by David Waern at 2010-05-14T17:55:17+00:00 Re-direct compilation output to a temporary directory Also add a flag --no-tmp-comp-dir that can be used to get the old behaviour of writing compilation files to GHC's output directory (default "."). - - - - - e56737ec by David Waern at 2010-05-14T18:06:11+00:00 Wibble - - - - - e40b0447 by David Waern at 2010-05-14T19:01:52+00:00 Move flag evaluation code from Main to Haddock.Options Determining the value of "singular" flags (by e.g. taking the last occurrence of the flag) and other flag evaluation should done in Haddock.Options which is the module that is supposed to define the command line interface. This makes Main a bit easier on the eyes as well. - - - - - 27091f57 by David Waern at 2010-05-14T19:05:10+00:00 Wibble - - - - - c658cf61 by David Waern at 2010-05-14T19:06:49+00:00 Re-order things in Haddock.Options a bit - - - - - 8cfdd342 by David Waern at 2010-05-14T19:20:29+00:00 De-tabify Haddock.Options and fix other whitespace issues - - - - - 0df16b62 by David Waern at 2010-05-14T19:25:07+00:00 Improve comments - - - - - 80b38e2b by David Waern at 2010-05-14T19:26:42+00:00 Whitespace police - - - - - fe580255 by David Waern at 2010-05-14T19:31:23+00:00 Wibbles to comments - - - - - a2b43fad by David Waern at 2010-05-14T20:24:32+00:00 Move some more flag functions to Haddock.Options - - - - - 3f895547 by David Waern at 2010-05-14T20:37:12+00:00 Make renderStep a top-level function in Main - - - - - 5cdca11d by David Waern at 2010-05-14T20:39:27+00:00 Spelling in comment - - - - - ad98d14c by David Waern at 2010-05-14T20:40:26+00:00 Comment fixes - - - - - 0bb9218f by David Waern at 2010-05-14T20:49:01+00:00 Whitespace police - - - - - 0f0a533f by David Waern at 2010-05-15T16:42:29+00:00 Improve description of --dump-interface - - - - - 5b2833ac by David Waern at 2010-05-15T17:16:53+00:00 Document --no-tmp-comp-dir - - - - - 8160b170 by David Waern at 2010-05-15T17:18:59+00:00 Wibble - - - - - 570dbe33 by David Waern at 2010-05-18T21:15:38+00:00 HLint police - - - - - 204e425f by David Waern at 2010-05-18T21:16:30+00:00 HLint police - - - - - 6db657ac by David Waern at 2010-05-18T21:16:37+00:00 Wibble - - - - - b942ccd7 by Simon Marlow at 2010-06-02T08:27:30+00:00 Interrupted disappeared in GHC 6.13 (GHC ticket haskell/haddock#4100) - - - - - 3b94a819 by Simon Marlow at 2010-06-02T08:45:08+00:00 Allow base-4.3 - - - - - c5a1fb7c by Simon Marlow at 2010-06-02T09:03:04+00:00 Fix compilation with GHC 6.13 - - - - - 6181296c by David Waern at 2010-06-08T21:09:05+00:00 Display name of prologue file when parsing it fails - - - - - 7cbc6f60 by Ian Lynagh at 2010-06-13T16:20:25+00:00 Remove redundant imports - - - - - 980c804b by Simon Marlow at 2010-06-22T08:41:50+00:00 isLocalAndTypeInferenced: fix for local module names overlapping package modules - - - - - d74d4a12 by Simon Marlow at 2010-06-23T12:03:27+00:00 Unresolved identifiers in Doc get replaced with DocMonospaced rather than plain strings - - - - - d8546783 by Simon Marlow at 2010-06-30T12:45:17+00:00 LaTeX backend (new options: --latex, --latex-style=<style>) - - - - - 437afa9e by David Waern at 2010-07-01T12:02:44+00:00 Fix a few stylistic whitespace issues in LaTeX backend - - - - - 85bc1fae by David Waern at 2010-07-01T15:42:45+00:00 Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this) - - - - - 7d2eb86f by David Waern at 2010-07-01T15:43:33+00:00 Update test following Simon's patch to render unresolved names in monospaced font - - - - - 08fcbcd2 by David Waern at 2010-07-01T16:12:18+00:00 Warning police - - - - - d04a8d7a by David Waern at 2010-07-04T14:53:39+00:00 Fix a bug in attachInstances We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however. - - - - - d10344eb by Simon Hengel at 2010-07-10T09:19:04+00:00 Add missing dependencies to cabal file - - - - - 24090531 by Mark Lentczner at 2010-03-21T04:51:16+00:00 add exports to Xhtml modules - - - - - 84f9a333 by Mark Lentczner at 2010-04-03T19:14:22+00:00 clean up Doc formatting code - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up <pre> sections - - - - - bebccf52 by Mark Lentczner at 2010-04-04T04:51:08+00:00 tweak list css - - - - - 0c2aeb5e by Mark Lentczner at 2010-04-04T06:24:14+00:00 all decls now generate Html not HtmlTable - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code - - - - - dbf73e6e by Mark Lentczner at 2010-04-05T05:02:43+00:00 clean up processExport and place a div around each decl - - - - - e25b7e9f by Mark Lentczner at 2010-04-10T21:23:21+00:00 data decls are now a sequence of paragraphs, not a table - - - - - 89ee0294 by Mark Lentczner at 2010-04-10T21:29:16+00:00 removed commented out code that can't be maintained - - - - - d466f536 by Mark Lentczner at 2010-04-12T04:56:27+00:00 removed declWithDoc and cleaned up data decls in summary - - - - - ed755832 by Mark Lentczner at 2010-04-12T05:07:53+00:00 merge in markupExample changes - - - - - c36f51fd by Mark Lentczner at 2010-04-25T04:56:37+00:00 made record fields be an unordList, not a table - - - - - ed3a28d6 by Mark Lentczner at 2010-04-25T05:23:28+00:00 fixed surround of instance and constructor tables - - - - - 0e35bbc4 by Mark Lentczner at 2010-04-25T05:36:59+00:00 fix class member boxes in summary - - - - - 5041749b by Mark Lentczner at 2010-04-25T05:38:35+00:00 remove unused bodyBox - - - - - e91724db by Mark Lentczner at 2010-04-25T06:26:10+00:00 fixed javascript quoting/escpaing issue - - - - - f4abbb73 by Mark Lentczner at 2010-05-03T23:04:31+00:00 adjust css for current markup - - - - - e75fec4c by Mark Lentczner at 2010-05-04T06:14:34+00:00 added assoicated types and methods back into class decls - - - - - 84169323 by Mark Lentczner at 2010-05-24T13:13:42+00:00 merge in changes from the big-whitespace cleanup - - - - - 3c1c872e by Mark Lentczner at 2010-06-11T21:03:58+00:00 adjust synopsis and bottom bar spacing - - - - - 3c1f9ef7 by Mark Lentczner at 2010-06-11T21:14:44+00:00 fix missing space in "module" lines in synoposis - - - - - 9a137e6d by Mark Lentczner at 2010-06-11T21:34:08+00:00 changed tt elements to code elements - - - - - 50f71ef1 by Mark Lentczner at 2010-06-11T23:27:46+00:00 factored out ppInstances - - - - - 3b9a9de5 by Mark Lentczner at 2010-06-17T17:36:01+00:00 push single constructors (newtype) onto line with decl - - - - - e0f8f2ec by Mark Lentczner at 2010-06-17T22:20:56+00:00 remove <++> connector - - - - - 56c075dd by Mark Lentczner at 2010-07-13T05:26:21+00:00 change to new page structure - - - - - 04be6ca7 by Mark Lentczner at 2010-07-14T04:21:55+00:00 constructors and args as dl lists, built in Layout.hs - - - - - 65aeafc2 by Mark Lentczner at 2010-07-14T05:38:32+00:00 better interface to subDecls - - - - - 72032189 by Mark Lentczner at 2010-07-14T07:04:10+00:00 made subDecl tables looks just so - - - - - b782eca2 by Mark Lentczner at 2010-07-14T16:00:54+00:00 convert args to SubDecl format - - - - - cc75e98f by Mark Lentczner at 2010-07-14T16:28:53+00:00 convert instances to SubDecl - - - - - 34e2aa5a by Mark Lentczner at 2010-07-14T21:07:32+00:00 removing old table cruft from Layout.hs - - - - - d5810d95 by Mark Lentczner at 2010-07-14T21:54:58+00:00 methods and associated types in new layout scheme - - - - - 65ef9579 by Mark Lentczner at 2010-07-14T23:43:42+00:00 clean up synopsis lists - - - - - e523318f by Mark Lentczner at 2010-07-15T05:02:26+00:00 clean up of anchors - - - - - 1215dfc5 by Mark Lentczner at 2010-07-15T23:53:01+00:00 added two new themes and rough css switcher - - - - - 7f0fd36f by Mark Lentczner at 2010-07-16T04:57:38+00:00 fixed package catpion, added style menu - - - - - 0dd4999c by Mark Lentczner at 2010-07-16T20:12:39+00:00 new output for mini_ pages - - - - - 64b2810b by Mark Lentczner at 2010-07-16T20:58:41+00:00 reformat index-frames - - - - - 3173f555 by Mark Lentczner at 2010-07-16T22:41:53+00:00 convert index to new markup - - - - - b0a4b7c9 by Mark Lentczner at 2010-07-17T04:07:22+00:00 convert index.html to new markup, adjust module markup - - - - - 8261ae1e by Mark Lentczner at 2010-07-17T05:07:29+00:00 classing styling of ancillary pages - - - - - 2a4fb025 by Mark Lentczner at 2010-07-17T05:11:45+00:00 clean up Layout.hs: no more vanillaTable - - - - - 87eec685 by Mark Lentczner at 2010-07-17T05:35:16+00:00 clean up Util.hs - - - - - d304e9b0 by Mark Lentczner at 2010-07-17T05:38:50+00:00 qualify import of XHtml as XHtml - - - - - 7dc05807 by Mark Lentczner at 2010-07-17T06:17:53+00:00 factored out head element generation - - - - - 9cdaec9e by Mark Lentczner at 2010-07-17T06:44:54+00:00 refactored out main page body generation - - - - - 8a51019e by Mark Lentczner at 2010-07-17T06:48:20+00:00 moved footer into only place that used it - - - - - efa479da by Mark Lentczner at 2010-07-17T18:48:30+00:00 styling auxillary pages for tibbe and snappy themes - - - - - 81de5509 by Mark Lentczner at 2010-07-18T04:41:38+00:00 fixed alphabet on index page, and styling of it and packages in module lists - - - - - 20718c1a by Mark Lentczner at 2010-07-18T05:34:29+00:00 cleaned up div functions in Layout.hs - - - - - 60d50453 by Mark Lentczner at 2010-07-18T05:48:39+00:00 added content div to main pages - - - - - ed16561c by Mark Lentczner at 2010-07-18T06:12:22+00:00 add .doc class to documentation blocks - - - - - f5c781b0 by Mark Lentczner at 2010-07-19T05:20:53+00:00 refactoring of anchor ID and fragment handling - - - - - a69a93bf by Mark Lentczner at 2010-07-19T05:35:55+00:00 remove an explicit bold tag - replace with .def class - - - - - d76c7225 by Mark Lentczner at 2010-07-19T06:56:15+00:00 rename Haddock.Backends.Xhtml.Util to Utils - - - - - 5a58c0da by David Waern at 2010-07-21T13:30:54+00:00 Remove trailing whitespace in Haddock.Backends.Xhtml - - - - - 0652aa17 by David Waern at 2010-07-21T13:33:21+00:00 Align a few comments - - - - - 785776c3 by David Waern at 2010-07-21T13:39:04+00:00 Remove trailing whitespace in H.B.X.Decl - - - - - 71a30710 by David Waern at 2010-07-21T13:44:27+00:00 Remove more trailing whitespace - - - - - 38750394 by David Waern at 2010-07-21T13:50:43+00:00 Style police - - - - - 3023d940 by David Waern at 2010-07-21T14:01:22+00:00 Style police in H.B.X.Decl - - - - - df16e9e6 by David Waern at 2010-07-21T14:14:45+00:00 Style police in H.B.X.DocMarkup - - - - - 6020e321 by David Waern at 2010-07-21T14:17:32+00:00 More style police - - - - - 86ad8bf5 by David Waern at 2010-07-21T14:21:02+00:00 Style police in H.B.Xhtml - - - - - aea27d03 by David Waern at 2010-07-21T14:42:03+00:00 Fix warnings in LaTeX backend - - - - - 2aff34a9 by David Waern at 2010-07-21T14:50:46+00:00 Style police in LaTeX backend (mainly more newlines) - - - - - e517162d by David Waern at 2010-07-21T15:05:47+00:00 Doc sections in Main - - - - - b971aa0c by David Waern at 2010-07-21T15:06:17+00:00 Trailing whitespace in Documentation.Haddock - - - - - f11628fb by David Waern at 2010-07-21T15:07:06+00:00 Trailing whitespace in Haddock.Convert - - - - - cbaf284c by David Waern at 2010-07-21T15:08:11+00:00 Style police in Haddock.GhcUtils - - - - - 71feb77b by David Waern at 2010-07-21T15:09:06+00:00 Style police in Haddock.InterfaceFile - - - - - 0a9c80e6 by David Waern at 2010-07-21T15:11:33+00:00 Whitespace police - - - - - 6168376c by David Waern at 2010-07-21T15:16:35+00:00 Style police in Haddock.Utils - - - - - 9fe4dd90 by David Waern at 2010-07-21T15:19:31+00:00 Add -fwarn-tabs - - - - - a000d752 by Mark Lentczner at 2010-07-20T17:25:52+00:00 move CSS Theme functions into Themes.hs - - - - - b52b440f by Mark Lentczner at 2010-07-20T17:29:35+00:00 add Thomas Schilling's theme - - - - - e43fa7e8 by Mark Lentczner at 2010-07-21T04:49:34+00:00 correct icon used with Snappy theme - - - - - ba5092d3 by Mark Lentczner at 2010-07-21T04:56:47+00:00 apply Tibbe's updates to his theme - - - - - 7804eef6 by Mark Lentczner at 2010-07-21T05:15:49+00:00 space between "Style" and the downward triangle - - - - - 7131d4c6 by Mark Lentczner at 2010-07-21T17:43:35+00:00 merge with David's source cleanups - - - - - ee65f1cb by David Waern at 2010-07-22T16:50:46+00:00 Fix a bug where we allowed --hoogle, --latex, etc without input files - - - - - e413ff7a by David Waern at 2010-07-22T17:21:58+00:00 Improve function name - - - - - a0fd14f3 by Simon Marlow at 2010-06-30T15:34:32+00:00 fix warnings - - - - - 31f73d2a by David Waern at 2010-07-22T19:29:41+00:00 Solve conflicts - - - - - d563b4a5 by Simon Marlow at 2010-06-30T15:34:37+00:00 fix warning - - - - - 412b6469 by David Waern at 2010-07-22T19:31:28+00:00 Solve conflict - - - - - 35174b94 by Ian Lynagh at 2010-07-06T17:27:16+00:00 Follow mkPState argument order change - - - - - b5c3585c by Simon Marlow at 2010-07-14T08:49:21+00:00 common up code for instance rendering - - - - - d8009560 by Simon Marlow at 2010-07-14T12:37:11+00:00 fix warnings - - - - - a6d88695 by David Waern at 2010-07-24T15:33:33+00:00 Fix build with ghc < 6.13 - - - - - 94cf9de1 by David Waern at 2010-07-24T15:34:37+00:00 Remove conflict left-over - - - - - 313b15c0 by Mark Lentczner at 2010-07-21T22:09:04+00:00 reorganization of nhaddock.css with tibbe - - - - - 9defed80 by Mark Lentczner at 2010-07-21T22:42:14+00:00 further cleanup of nhaddock.css, float TOC, support aux. pages - - - - - 6d944c1b by Mark Lentczner at 2010-07-22T06:22:23+00:00 remove old HTML backend - - - - - b3e8cba5 by Mark Lentczner at 2010-07-22T06:43:32+00:00 remove --html-help support - it was old, out-of-date, and mostly missing - - - - - d2654a08 by Mark Lentczner at 2010-07-22T21:45:34+00:00 tweaks to nhaddock.css - - - - - f73b285c by Mark Lentczner at 2010-07-23T06:19:35+00:00 command like processing for theme selection The bulk of the change is threadnig the selected theme set through functions in Xhtml.hs so that the selected themes can be used when generating the page output. There isn't much going on in most of these changes, just passing it along. The real work is all done in Themes.hs. - - - - - 8bddc90d by Mark Lentczner at 2010-07-23T06:58:31+00:00 drop --themes support, add named theme support decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. - - - - - 20cafd4f by Mark Lentczner at 2010-07-23T17:44:29+00:00 rename --default-themes to --built-in-themes - - - - - 0fe41307 by Mark Lentczner at 2010-07-23T18:33:02+00:00 tweaks to theme for info table, headings, and tables - - - - - cba4fee0 by Mark Lentczner at 2010-07-23T19:13:59+00:00 tweaks for dl layout, though still not used - - - - - 463fa294 by Mark Lentczner at 2010-07-23T21:07:19+00:00 tweak look of mini pages, keywords, and preblocks - - - - - 5472fc02 by Mark Lentczner at 2010-07-24T05:36:15+00:00 slide out Synopsis drawer - - - - - 9d5d5de5 by Mark Lentczner at 2010-07-24T06:02:42+00:00 extend package header and footer to edges of page - - - - - a47c91a2 by Mark Lentczner at 2010-07-24T06:28:44+00:00 fields are def lists, tweak css for style menu, mini pages, arguments - - - - - ca20f23b by Mark Lentczner at 2010-07-24T16:55:22+00:00 excisting last vestiges of the --xhtml flag - - - - - 71fb012e by Mark Lentczner at 2010-07-25T18:47:49+00:00 change how collapsing sections are done make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags - - - - - c168c8d3 by Mark Lentczner at 2010-07-26T00:32:05+00:00 reorganize files in the html lib data dir - - - - - 93324301 by Mark Lentczner at 2010-07-26T01:27:42+00:00 cleaned up Themes.hs - - - - - ad3b5dd4 by Mark Lentczner at 2010-07-26T02:39:15+00:00 make module list use new collapsers - - - - - 1df9bfc6 by Mark Lentczner at 2010-07-27T19:09:25+00:00 remove Tibbe theme - - - - - 8b9b01b3 by Mark Lentczner at 2010-07-27T20:04:03+00:00 move themes into html dir with .theme and .std-theme extensions - - - - - a7beb965 by Mark Lentczner at 2010-07-27T21:06:34+00:00 give a class to empty dd elements so they can be hidden - - - - - a258c117 by Mark Lentczner at 2010-07-27T21:23:58+00:00 remove custom version of copyFile in Xhtml.hs - - - - - b70dba6e by Mark Lentczner at 2010-07-27T22:12:45+00:00 apply margin changes to pre and headings as per group decision, and small cleanups - - - - - e6f722a2 by Mark Lentczner at 2010-07-28T00:03:12+00:00 make info block and package bar links be floatable by placing them first in the dom tree - - - - - c8278867 by Mark Lentczner at 2010-07-28T19:01:18+00:00 styling source links on declarations - - - - - 88fdc399 by Mark Lentczner at 2010-07-29T01:12:46+00:00 styling tweaks don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers - - - - - 8a75b213 by Ian Lynagh at 2010-07-30T20:21:46+00:00 Fix build in GHC tree - - - - - ce8e18b3 by Simon Hengel at 2010-08-03T18:37:26+00:00 Adapt paths to data files in cabal file - - - - - 9701a455 by Simon Hengel at 2010-08-07T13:20:27+00:00 Add missing dependency to cabal file - - - - - 01b838d1 by Mark Lentczner at 2010-07-30T20:19:40+00:00 improved synopsis drawer: on click, not hover - - - - - 7b6f3e59 by Mark Lentczner at 2010-07-30T23:38:55+00:00 put the synopsis back in the other themes - - - - - 7b2904c9 by Mark Lentczner at 2010-08-11T11:11:26+00:00 close arrows on expanded synopsis drawer - - - - - ea19e177 by Mark Lentczner at 2010-08-12T21:16:45+00:00 width and font changes removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent - - - - - 5ced00c0 by Mark Lentczner at 2010-08-13T15:09:55+00:00 implemented YUI's CSS font approach - - - - - 2799c548 by Mark Lentczner at 2010-08-13T15:11:59+00:00 adjusted margin to 2em, 1 wasn't enough - - - - - 58f06893 by Mark Lentczner at 2010-08-13T15:48:44+00:00 removed underlining on hover for named anchors headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute - - - - - 7aced4c4 by Mark Lentczner at 2010-08-13T15:50:22+00:00 more space between elements - - - - - 5a3c1cce by Mark Lentczner at 2010-08-13T16:43:43+00:00 adjusted font sizes of auxilary pages per new scheme - - - - - 487539ef by Mark Lentczner at 2010-08-13T21:43:41+00:00 add Frames button and clean up frames.html - - - - - c1a140b6 by Mark Lentczner at 2010-08-13T22:17:48+00:00 move frames button to js - - - - - b0bdb68e by Mark Lentczner at 2010-08-14T03:44:46+00:00 build style menu in javascript moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page - - - - - 43ab7120 by Mark Lentczner at 2010-08-16T15:15:37+00:00 font size and margin tweaks - - - - - c0b68652 by Mark Lentczner at 2010-08-17T18:19:52+00:00 clean up collapser logics javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS - - - - - 5d573427 by Mark Lentczner at 2010-08-17T23:06:02+00:00 don't collapse entries in module list when clicking on links - - - - - 8c307c4a by Mark Lentczner at 2010-08-17T23:21:43+00:00 add missing data file to .cabal - - - - - 414bcfcf by Mark Lentczner at 2010-08-17T23:28:47+00:00 remove synopsis when in frames - - - - - ba0fa98a by Mark Lentczner at 2010-08-18T16:16:11+00:00 layout tweeks - mini page font size, toc color, etc. - - - - - 63c1bed1 by Mark Lentczner at 2010-08-18T19:50:02+00:00 margin fiddling - - - - - c311c094 by Mark Lentczner at 2010-08-20T01:37:55+00:00 better synopsis handling logic - no flashing - - - - - f1fe5fa8 by Mark Lentczner at 2010-08-20T01:41:06+00:00 fix small layout issues mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers - - - - - 0de84d77 by Mark Lentczner at 2010-08-20T02:13:09+00:00 made style changing and cookies storage robust - - - - - 1ef064f9 by Thomas Schilling at 2010-08-04T13:12:22+00:00 Make synopsis frame behave properly in Firefox. In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. - - - - - dd1c9a94 by Mark Lentczner at 2010-08-21T01:46:19+00:00 remove Snappy theme - - - - - 2353a90d by Mark Lentczner at 2010-08-25T05:16:19+00:00 fix occasional v.scroll bars on pre blocks (I think) - - - - - 459b8bf1 by Simon Hengel at 2010-08-08T10:12:45+00:00 Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API - - - - - b1b68675 by David Waern at 2010-08-26T20:31:58+00:00 Follow recent API additions with some refactorings Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. - - - - - 264d4d67 by David Waern at 2010-08-26T21:40:59+00:00 Get rid of GhcModule and related cruft We can get everything we need directly from TypecheckedModule. - - - - - 0feacec2 by Mark Lentczner at 2010-08-26T23:44:13+00:00 fixed CSS for ordered lists and def lists in doc blocks - - - - - 2997e0c2 by Mark Lentczner at 2010-08-26T23:45:03+00:00 support both kinds of enumerated lists in doc markup The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported - - - - - 5d4ddeec by Mark Lentczner at 2010-08-27T21:29:48+00:00 fix broken header link margins - - - - - 614456ba by Mark Lentczner at 2010-08-27T22:16:19+00:00 fix table of contents CSS - - - - - 03f329a2 by David Waern at 2010-08-28T16:36:09+00:00 Update tests following switch to the Xhtml backend - - - - - ca689fa2 by Mark Lentczner at 2010-08-28T18:25:16+00:00 fix def lists - - - - - 18e1d3d2 by Mark Lentczner at 2010-08-28T18:26:18+00:00 push footer to bottom of window - - - - - b0ab8d82 by David Waern at 2010-08-28T22:04:32+00:00 Whitespace police - - - - - 2d217977 by David Waern at 2010-08-29T12:44:45+00:00 Remove Snappy data files - - - - - 01e27d5f by David Waern at 2010-08-29T13:03:28+00:00 Add source entity path to --read-interface You can now use this flag like this: --read-interface=<html path>,<source entity path>,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. - - - - - 20bf4aaa by David Waern at 2010-08-29T13:11:03+00:00 Naming wibbles - - - - - ad22463f by Mark Lentczner at 2010-08-29T15:14:54+00:00 make portability block be a table - solves layout issues - - - - - 97bd1ae6 by Mark Lentczner at 2010-08-29T15:17:42+00:00 update golden test for Test due to portability box change - - - - - d37e139e by Mark Lentczner at 2010-08-29T17:07:17+00:00 move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs - - - - - acf52501 by David Waern at 2010-08-29T17:32:36+00:00 Allow building with ghc < 6.16 - - - - - 1cb34ed8 by Ian Lynagh at 2010-07-24T23:18:49+00:00 Flatten the dynflags before parsing - - - - - b36845b4 by Ian Lynagh at 2010-07-24T23:26:49+00:00 Follow flattenLanguageFlags -> flattenExtensionFlags rename - - - - - 7f7fcc7e by David Waern at 2010-08-29T17:46:23+00:00 Use flattenExtensionFlags with ghc >= 6.13 only - - - - - 13cf9411 by Ian Lynagh at 2010-08-01T18:09:54+00:00 Make the main haddock script versioned, and make plain "haddock" a symlink - - - - - 495cbff2 by Ian Lynagh at 2010-08-18T18:57:24+00:00 Fix installation in the GHC build system Data-files are now in subdirectories, so we need to handle that - - - - - 88ebab0a by Ian Lynagh at 2010-08-18T19:43:53+00:00 GHC build system: Add all the data files to BINDIST_EXTRAS - - - - - 65837172 by David Waern at 2010-08-29T20:12:34+00:00 Update Test - - - - - 094bbaa2 by David Waern at 2010-08-29T20:55:14+00:00 Revert update to Test - - - - - a881cfb3 by David Waern at 2010-08-31T18:24:15+00:00 Bump version number - - - - - 1fc8a3eb by David Waern at 2010-08-31T22:32:27+00:00 Update ANNOUNCE - - - - - ee1df9d0 by David Waern at 2010-08-31T22:33:11+00:00 Update CHANGES - - - - - 394cc854 by David Waern at 2010-08-31T22:33:23+00:00 Update interface file versioning to work with ghc 6.14/15 - - - - - 7d03b79b by David Waern at 2010-08-31T22:36:00+00:00 Update test output following version change - - - - - a48d82d1 by Mark Lentczner at 2010-09-01T04:29:35+00:00 sort options in doc to match --help output removed --html-help option, as it is no longer supported - - - - - 06561aeb by Mark Lentczner at 2010-09-01T05:29:32+00:00 update options documentation rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents - - - - - 57dea832 by Mark Lentczner at 2010-09-01T05:31:27+00:00 slight wording change about Frames mode - - - - - fa1f6da3 by David Waern at 2010-09-01T10:57:44+00:00 Update doc configure script to find docbook stylesheets on arch linux - - - - - addff770 by David Waern at 2010-09-01T11:02:29+00:00 Wibble - - - - - 8399006d by David Waern at 2010-09-01T11:19:21+00:00 Replace ghci> with >>> in example syntax - - - - - 35074cf8 by David Waern at 2010-09-01T19:03:27+00:00 Improve docs for --no-tmp-comp-dir - - - - - 0f8f8cfd by David Waern at 2010-09-02T11:22:27+00:00 Add a list of contributors to the user guide Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. - - - - - 42ccf099 by David Waern at 2010-09-02T11:29:22+00:00 Update copyright years in license - - - - - 0d560479 by David Waern at 2010-09-02T11:38:52+00:00 Update release instructions - - - - - 72ab7796 by David Waern at 2010-09-02T19:27:08+00:00 Add a note to ANNOUNCE - - - - - bf9d9c5d by David Waern at 2010-09-02T19:27:48+00:00 H.Utils needs FFI on Win+MinGW - - - - - 048ae44a by Mark Lentczner at 2010-09-04T23:19:47+00:00 make TOC group header identifiers validate - - - - - 8c6faf36 by Simon Michael at 2010-09-22T07:12:34+00:00 add hints for cleaner darcs show authors output - - - - - 9909bd17 by Simon Michael at 2010-09-22T17:58:06+00:00 print haddock coverage info on stdout when generating docs A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability. - - - - - 6da72171 by David Waern at 2010-10-03T21:31:24+00:00 Style wibble - - - - - 2f8d8e4d by Tobias Brandt at 2010-08-27T07:01:21+00:00 adding the option to fully qualify identifiers - - - - - 833be6c6 by Tobias Brandt at 2010-08-27T15:50:28+00:00 adding support for local and relative name qualification - - - - - df15c4e9 by Tobias Brandt at 2010-08-27T15:56:37+00:00 corrected qualification help message - - - - - 449e9ce1 by David Waern at 2010-10-16T17:34:30+00:00 Solve conflicts - - - - - 3469bda5 by David Waern at 2010-10-16T18:42:40+00:00 Use "qual" as an abbreviation for qualification instead of "quali" for consistency - - - - - 97c2d728 by David Waern at 2010-10-16T18:47:07+00:00 Style police - - - - - ce14fbea by David Waern at 2010-10-16T21:15:25+00:00 Style police - - - - - fdf29e9d by David Waern at 2010-10-17T00:30:44+00:00 Add a pointer to the style guide - - - - - 8e6b44e8 by rrnewton at 2010-10-24T03:19:28+00:00 Change to index pages: include an 'All' option even when subdividing A-Z. - - - - - 755b131c by David Waern at 2010-11-14T19:39:36+00:00 Bump version - - - - - d0345a04 by David Waern at 2010-11-14T19:41:59+00:00 TAG 2.8.1 - - - - - f6221508 by Simon Peyton Jones at 2010-09-13T09:53:00+00:00 Adapt to minor changes in internal GHC functions - - - - - 1290713d by Ian Lynagh at 2010-09-15T10:37:18+00:00 Remove duplicate Outputable instance for Data.Map.Map - - - - - 87f69eef by Ian Lynagh at 2010-09-21T15:01:10+00:00 Bump GHC dep upper bound - - - - - af36e087 by Ian Lynagh at 2010-09-21T15:12:02+00:00 Fix up __GLASGOW_HASKELL__ tests - - - - - ad67716c by Ian Lynagh at 2010-09-21T20:31:35+00:00 Don't build haddock is HADDOCK_DOCS is NO - - - - - 63b3f1f5 by Ian Lynagh at 2010-09-21T21:39:51+00:00 Fixes for when HADDOCK_DOCS=NO - - - - - e92bfa42 by Ian Lynagh at 2010-09-29T21:15:38+00:00 Fix URL creation on Windows: Use / not \ in URLs. Fixes haskell/haddock#4353 - - - - - 66c55e05 by Ian Lynagh at 2010-09-30T17:03:34+00:00 Tidy up haddock symlink installation In particular, it now doesn't get created if we aren't installing haddock. - - - - - 549b5556 by Ian Lynagh at 2010-10-23T21:17:14+00:00 Follow extension-flattening change in GHC - - - - - d7c2f72b by David Waern at 2010-11-14T20:17:55+00:00 Bump version to 2.8.2 - - - - - 6989a3a9 by David Waern at 2010-11-14T20:26:01+00:00 Solve conflict - - - - - 055c6910 by Ian Lynagh at 2010-09-22T15:36:20+00:00 Bump GHC dep - - - - - c96c0763 by Simon Marlow at 2010-10-27T11:09:44+00:00 follow changes in the GHC API - - - - - 45907129 by David Waern at 2010-11-07T14:00:58+00:00 Update the HCAR entry - - - - - 61940b95 by David Waern at 2010-11-07T14:07:34+00:00 Make the HCAR entry smaller - - - - - aa590b7d by David Waern at 2010-11-14T21:30:59+00:00 Update HCAR entry with November 2010 version - - - - - 587f9847 by David Waern at 2010-11-14T23:48:17+00:00 Require ghc >= 7.0 - - - - - ff5c647c by David Waern at 2010-11-14T23:49:09+00:00 TAG 2.8.2 - - - - - 937fcb4f by David Waern at 2010-11-14T23:49:45+00:00 Solve conflict - - - - - 8e5d0c1a by David Waern at 2010-11-15T21:09:50+00:00 Remove code for ghc < 7 - - - - - 3d47b70a by David Waern at 2010-11-15T21:11:06+00:00 Fix bad merge - - - - - 7f4a0d8a by David Waern at 2010-11-15T21:13:57+00:00 Remove more ghc < 7 code - - - - - 9ee34b50 by David Waern at 2010-11-15T21:31:25+00:00 Match all AsyncExceptions in exception handler - - - - - 42849c70 by David Waern at 2010-11-15T21:35:31+00:00 Just say "internal error" instead of "internal Haddock or GHC error" - - - - - c88c809b by David Waern at 2010-11-15T21:44:19+00:00 Remove docNameOcc under the motto "don't name compositions" - - - - - b798fc7c by David Waern at 2010-11-15T23:27:13+00:00 Wibble - - - - - 2228197e by David Waern at 2010-11-15T23:28:24+00:00 Rename the HCAR entry file - - - - - 8a3f9090 by David Waern at 2010-11-16T00:05:29+00:00 Remove Haskell 2010 extensions from .cabal file - - - - - c7a0c597 by David Waern at 2010-11-16T00:10:28+00:00 Style wibbles - - - - - cde707a5 by David Waern at 2010-11-16T00:12:00+00:00 Remove LANGUAGE ForeignFunctionInterface pragmas - - - - - 1dbda8ed by David Waern at 2010-11-16T00:17:21+00:00 Make a little more use of DoAndIfThenElse - - - - - 4c45ff6e by David Waern at 2010-11-16T00:59:41+00:00 hlint police - - - - - d2feaf09 by David Waern at 2010-11-16T01:14:15+00:00 hlint police - - - - - 99876e97 by David Waern at 2010-11-20T19:06:00+00:00 Haddock documentation updates - - - - - 65ce6987 by David Waern at 2010-11-20T19:42:51+00:00 Follow the style guide closer in Haddock.Types and improve docs - - - - - 28ca304a by tob.brandt at 2010-11-20T17:04:40+00:00 add full qualification for undocumented names - - - - - d61341e3 by David Waern at 2010-11-20T20:04:15+00:00 Re-structure qualification code a little - - - - - 0057e4d6 by David Waern at 2010-11-20T20:07:55+00:00 Re-order functions - - - - - d7279afd by David Waern at 2010-11-21T03:39:54+00:00 Add BangPatterns to alex and happy source files - - - - - 629fe60e by tob.brandt at 2010-11-23T23:35:11+00:00 documentation for qualification - - - - - 37031cee by David Waern at 2010-11-23T21:06:44+00:00 Update CHANGES - don't mention 2.8.2, we won't release it - - - - - f2489e19 by David Waern at 2010-12-01T21:57:11+00:00 Update deps of runtests.hs to work with ghc 7.0.1 - - - - - d3657e9a by David Waern at 2010-12-01T22:04:57+00:00 Make tests compile with ghc 7.0.1 - - - - - a2f09d9b by David Waern at 2010-12-01T22:06:59+00:00 Update tests following version bump - - - - - 50883ebb by David Waern at 2010-12-06T14:09:18+00:00 Update tests following recent changes - - - - - fc2fadeb by David Waern at 2010-12-06T14:17:29+00:00 Add a flag --pretty-html for rendering indented html with newlines - - - - - 30832ef2 by David Waern at 2010-12-06T14:17:35+00:00 Use --pretty-html when running the test suite. Makes it easier to compare output - - - - - a0b81b31 by David Waern at 2010-12-06T14:18:27+00:00 Wibble - - - - - 3aaa23fe by David Waern at 2010-12-06T14:19:29+00:00 Haddockify ppHtml comments - - - - - 24bb24f0 by David Waern at 2010-12-06T14:23:15+00:00 Remove --debug. It was't used, and --verbosity should take its place - - - - - 6bc076e5 by David Waern at 2010-12-06T14:25:37+00:00 Rename golden-tests into html-tests. "golden tests" sounds strange - - - - - 53301e55 by David Waern at 2010-12-06T14:26:26+00:00 QUALI -> QUAL in the description --qual for consistency - - - - - 98b6affb by David Waern at 2010-12-06T21:54:02+00:00 Bump version - - - - - 371bf1b3 by David Waern at 2010-12-06T22:08:55+00:00 Update tests following version bump - - - - - 25be762d by David Waern at 2010-12-06T22:21:03+00:00 Update CHANGES - - - - - 7c7dac71 by David Waern at 2010-12-06T22:33:43+00:00 Update ANNOUNCE - - - - - 30d7a5f2 by Simon Peyton Jones at 2010-11-15T08:38:38+00:00 Alex generates BangPatterns, so make Lex.x accept them (It'd be better for Alex to generate this pragma.) - - - - - 605e8018 by Simon Marlow at 2010-11-17T11:37:24+00:00 Add {-# LANGUAGE BangPatterns #-} to mollify GHC - - - - - a46607ba by David Waern at 2010-12-07T14:08:10+00:00 Solve conflicts - - - - - b28cda66 by David Waern at 2010-12-09T20:41:35+00:00 Docs: Mention that \ is a special character in markup - - - - - a435bfdd by Ian Lynagh at 2010-11-17T14:01:19+00:00 TAG GHC 7.0.1 release - - - - - 5a15a05a by David Waern at 2010-12-11T17:51:19+00:00 Fix indentation problem - - - - - 4232289a by Lennart Kolmodin at 2010-12-17T18:32:03+00:00 Revise haddock.cabal given that we now require ghc-7 default-language should be Haskell2010, slight new semantics for extensions. Rewrite into clearer dependencies of base and Cabal. - - - - - a36302dc by David Waern at 2010-12-19T17:12:37+00:00 Update CHANGES - - - - - 7c8b85b3 by David Waern at 2010-12-19T17:14:24+00:00 Bump version - - - - - cff22813 by Ian Lynagh at 2011-01-05T18:24:27+00:00 Write hoogle output in utf8; fixes GHC build on Windows - - - - - c7e762ea by David Waern at 2011-01-22T00:00:35+00:00 Put title outside doc div when HTML:fying title+prologue Avoids indenting the title, and makes more sense since the title is not a doc string anyway. - - - - - 5f639054 by David Waern at 2011-01-22T16:09:44+00:00 Fix spelling error - contributed by Marco Silva - - - - - c11dce78 by Ian Lynagh at 2011-01-07T02:33:11+00:00 Follow GHC build system changes - - - - - 101cfaf5 by David Waern at 2011-01-08T14:06:44+00:00 Bump version - - - - - af62348b by David Waern at 2011-01-08T14:07:07+00:00 TAG 2.9.2 - - - - - 4d1f6461 by Ian Lynagh at 2011-01-07T23:06:57+00:00 Name the haddock script haddock-ghc-7.0.2 instead of haddock-7.0.2; haskell/haddock#4882 "7.0.2" looked like a haddock version number before - - - - - 8ee4d5d3 by Simon Peyton Jones at 2011-01-10T17:31:12+00:00 Update Haddock to reflect change in hs_tyclds field of HsGroup - - - - - 06f3e3db by Ian Lynagh at 2011-03-03T15:02:37+00:00 TAG GHC 7.0.2 release - - - - - 7de0667d by David Waern at 2011-03-10T22:47:13+00:00 Update CHANGES - - - - - 33a9f1c8 by David Waern at 2011-03-10T22:47:31+00:00 Fix build with ghc 7.0.1 - - - - - 4616f861 by David Waern at 2011-03-10T22:47:50+00:00 TAG 2.9.2-actual - - - - - 0dab5e3c by Simon Hengel at 2011-04-08T15:53:01+00:00 Set shell script for unit tests back to work - - - - - 85c54dee by Simon Hengel at 2011-04-08T16:01:24+00:00 Set unit tests back to work Here "ghci>" was still used instead of ">>>". - - - - - 1cea9b78 by Simon Hengel at 2011-04-08T16:25:36+00:00 Update runtests.hs for GHC 7.0.2 - - - - - 8e5b3bbb by Simon Hengel at 2011-04-08T16:28:49+00:00 Update Haddock version in *.html.ref - - - - - 2545e955 by Simon Hengel at 2011-04-08T17:09:28+00:00 Add support for blank lines in the result of examples Result lines that only contain the string "<BLANKLINE>" are treated as a blank line. - - - - - adf64d2e by Simon Hengel at 2011-04-08T17:36:50+00:00 Add documentation for "support for blank lines in the result of examples" - - - - - c51352ca by David Waern at 2011-05-21T23:57:56+00:00 Improve a haddock comment - - - - - 7419cf2c by David Waern at 2011-05-22T15:41:52+00:00 Use cabal's test suite support to run the test suite This gives up proper dependency tracking of the test script. - - - - - 7770070c by David Waern at 2011-05-22T01:45:44+00:00 We don't need to send DocOptions nor a flag to mkExportItems - - - - - 9d95b7b6 by David Waern at 2011-05-22T21:39:03+00:00 Fix a bug - - - - - 1f93699b by David Waern at 2011-05-22T21:40:21+00:00 Break out fullContentsOf, give it a better name and some documentation The documentation describes how we want this function to eventually behave, once we have fixed a few problems with the current implementation. - - - - - 9a86432f by David Waern at 2011-05-22T21:53:52+00:00 Fix some stylistic issues in mkExportItems - - - - - c271ff0c by David Waern at 2011-05-22T22:09:11+00:00 Indentation - - - - - 93e602b1 by David Waern at 2011-06-10T01:35:31+00:00 Add git commits since switchover: darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower at hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo at earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm at cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo at earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC - - - - - 498da5ae by David Waern at 2011-06-11T00:33:33+00:00 * Merge in git patch from Michal Terepeta >From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001 From: Michal Terepeta <michal.terepeta at gmail.com> Date: Sat, 14 May 2011 19:18:22 +0200 Subject: [PATCH] Follow the change of TypeSig in GHC. This follows the change in GHC to make TypeSig take a list of names (instead of just one); GHC ticket haskell/haddock#1595. This should also improve the Haddock output in case the user writes a type signature that refers to many names: -- | Some comment.. foo, bar :: ... will now generate the expected output with one signature for both names. - - - - - 094607fe by Ian Lynagh at 2011-06-17T19:10:29+01:00 Fix build - - - - - 8fa35740 by Ian Lynagh at 2011-06-26T21:06:40+01:00 Bump GHC dep to allow 7.2 - - - - - e4d2ca3c by Ian Lynagh at 2011-07-07T23:06:28+01:00 Relax base dep - - - - - b948fde9 by Ian Lynagh at 2011-07-28T16:39:45+01:00 GHC build system: Don't install the datafiles twice - - - - - f82f6d70 by Simon Marlow at 2011-08-11T12:08:15+01:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - b341cc12 by Max Bolingbroke at 2011-08-22T20:25:27+01:00 Fix compilation with no-pred-ty GHC - - - - - 30494581 by Max Bolingbroke at 2011-08-23T10:20:54+01:00 Remaining fixes for PredTy removal - - - - - 0b197138 by Max Bolingbroke at 2011-08-26T08:27:45+01:00 Rename factKind to constraintKind - - - - - a379bec5 by Max Bolingbroke at 2011-09-04T12:54:47+01:00 Deal with change to IParam handling in GHC - - - - - f94e421b by Max Bolingbroke at 2011-09-06T17:34:31+01:00 Adapt Haddock for the ConstraintKind extension changes - - - - - 8821e5cc by Max Bolingbroke at 2011-09-09T08:24:59+01:00 Ignore associated type defaults (just as we ignore default methods) - - - - - 31a0afd4 by Max Bolingbroke at 2011-09-09T09:06:00+01:00 Merge branch 'no-pred-ty' of ssh://darcs.haskell.org/srv/darcs/haddock into no-pred-ty - - - - - dd3b530a by Max Bolingbroke at 2011-09-09T14:10:25+01:00 Merge branch 'no-pred-ty' Conflicts: src/Haddock/Convert.hs - - - - - 5f25ec96 by Max Bolingbroke at 2011-09-09T14:10:40+01:00 Replace FactTuple with ConstraintTuple - - - - - cd30b9cc by David Waern at 2011-09-26T02:17:55+02:00 Bump to version 2.9.3 - - - - - 4fbfd397 by Max Bolingbroke at 2011-09-27T14:55:21+01:00 Follow changes to BinIface Name serialization - - - - - 92257d90 by David Waern at 2011-09-30T23:45:07+02:00 Fix problem with test files not added to distribution tarball - - - - - 00255bda by David Waern at 2011-09-30T23:48:24+02:00 Merge branch 'development' - - - - - 5421264f by David Waern at 2011-10-01T01:25:39+02:00 Merge in darcs patch from Simon Meier: Wed Jun 1 19:41:16 CEST 2011 iridcode at gmail.com * prettier haddock coverage info The new coverage info rendering uses less horizontal space. This reduces the number of unnecessary line-wrappings. Moreover, the most important information, how much has been documented already, is now put up front. Hopefully, this makes it more likely that a library author is bothered by the low coverage of his modules and fixes that issue ;-) - - - - - 07d318ef by David Waern at 2011-10-01T01:34:10+02:00 Use printException instead of deprecated printExceptionAndWarnings - - - - - 40d52ee4 by David Waern at 2011-10-01T01:41:13+02:00 Merge in darcs pach: Mon Apr 11 18:09:54 JST 2011 Liyang HU <haddock at liyang.hu> * Remember collapsed sections in index.html / haddock-util.js - - - - - 279d6dd4 by David Waern at 2011-10-01T01:55:45+02:00 Merge in darcs patch: Joachim Breitner <mail at joachim-breitner.de>**20110619201645 Ignore-this: f6c51228205b0902ad5bfad5040b989a As reported on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578301, generating the global index takes much too long if type-level (with lots of auto-generated types) is installed. The patch avoids a quadratic runtime in the subfunction getIfaceIndex of ppHtmlIndex by using a temporary set. Runtime improvement observed here from 25.36s to 2.86s. - - - - - d1612383 by David Waern at 2011-10-01T01:56:48+02:00 Merge branch 'development' - - - - - 347520c1 by David Waern at 2011-10-01T01:56:54+02:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9a0c95e8 by David Waern at 2011-10-01T02:19:10+02:00 Improve .cabal file - - - - - 6967dc64 by Ian Lynagh at 2011-10-01T01:34:06+01:00 Follow changes to ForeignImport/ForeignExport in GHC - - - - - 565cb26b by Simon Marlow at 2011-10-04T00:15:04+02:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - 8b74f512 by David Waern at 2011-10-04T00:18:17+02:00 Requre ghc >= 7.2 - - - - - 271d360c by David Waern at 2011-10-04T00:22:50+02:00 Bump version to 2.9.4 - - - - - 37f3edb0 by David Waern at 2011-10-06T02:30:21+02:00 Add alex and happy to build-tools. - - - - - 7ac2bb6e by David Terei at 2011-10-12T14:02:55-07:00 Add safe haskell indication to haddock output - - - - - 42c91a47 by David Terei at 2011-10-12T14:06:03-07:00 Fix CSS issue with info table not being contained in module header - - - - - 0eddab6c by David Terei at 2011-10-12T14:06:58-07:00 Add safe haskell indication to haddock output - - - - - 3df058eb by David Terei at 2011-10-12T14:07:07-07:00 Fix CSS issue with info table not being contained in module header - - - - - a40a6c3f by David Waern at 2011-10-22T11:29:06+02:00 Bump .haddock file version since the format has changed recently - - - - - 8a6254be by David Waern at 2011-10-22T11:30:42+02:00 Merge branch 'development' - - - - - 642e3e02 by David Waern at 2011-10-23T21:23:39+02:00 Sort import list - - - - - 36371cf8 by David Waern at 2011-10-23T22:48:18+02:00 Remove NEW_GHC_LAYOUT conditional. - - - - - 5604b499 by David Waern at 2011-10-27T00:15:03+02:00 Add --print-ghc-path. - - - - - 463499fa by David Waern at 2011-10-27T00:16:22+02:00 Make testsuite able to find its dependencies automatically. - - - - - a3506172 by Ryan Newton at 2011-11-05T05:59:58-04:00 Improved declNames internal error. Added a case to handle DocD. - - - - - 001b8baf by David Waern at 2011-11-05T20:37:29+01:00 Rename copy.hs -> accept.hs. - - - - - 55d808d3 by David Waern at 2011-11-05T23:30:02+01:00 Fix build. - - - - - deb5c3be by David Waern at 2011-11-06T00:01:47+01:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9b663554 by David Waern at 2011-11-06T00:03:45+01:00 Merge https://github.com/rrnewton/haddock - - - - - 1abb0ff6 by David Waern at 2011-11-06T01:20:37+01:00 Use getDeclMainBinder instead of declNames. - - - - - 4b005c01 by David Waern at 2011-11-06T19:09:53+01:00 Fix build. - - - - - c2c51bc7 by Ian Lynagh at 2011-11-06T23:01:33+00:00 Remove -DNEW_GHC_LAYOUT in ghc.mk - - - - - f847d703 by Jose Pedro Magalhaes at 2011-11-11T09:07:39+00:00 New kind-polymorphic core This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds - - - - - 7d7c3b09 by Jose Pedro Magalhaes at 2011-11-16T21:42:22+01:00 Follow changes to tuple sorts in master - - - - - 8430e03e by Simon Peyton Jones at 2011-11-17T10:20:27+00:00 Remove redundant imports - - - - - d1b06832 by Ian Lynagh at 2011-11-19T01:33:21+00:00 Follow GHC build system change to the way we call rm - - - - - 9e2230ed by David Waern at 2011-11-24T15:00:24+01:00 Fix a bug in test runner and get rid of regex-compat dependency. - - - - - 52039b21 by David Waern at 2011-11-24T23:55:36+01:00 Avoid haskell98 dependency in test - - - - - 92e1220d by David Waern at 2011-11-25T00:03:33+01:00 Avoid depency on regex-compat also in accept.hs. - - - - - ddac6b6f by David Waern at 2011-11-25T02:13:38+01:00 Accept test output. - - - - - 5a720455 by David Waern at 2011-11-25T02:16:20+01:00 Some more changes to test scripts. - - - - - 170a9004 by David Waern at 2011-11-25T02:30:41+01:00 Add flag --interface-version. - - - - - d225576c by David Waern at 2011-11-25T02:39:26+01:00 Remove #ifs for older compiler versions. - - - - - f0d0a4f5 by David Waern at 2011-11-26T04:20:12+01:00 Give preference to type over data constructors for doc comment links at renaming time. Previously this was done in the backends. Also, warn when a doc comment refers to something that is in scope but which we don't have the .haddock file for. These changes mean we can make DocIdentifier [a] into DocIdentifier a. - - - - - eef0e776 by David Waern at 2011-11-26T17:01:06+01:00 Allow doc comments to link to out-of-scope things (#78). (A bug that should have been fixed long ago.) - - - - - 565ad529 by David Waern at 2011-11-26T19:56:21+01:00 Update tests. - - - - - fb3ce7b9 by David Waern at 2011-11-26T21:44:28+01:00 Cleanup. - - - - - d0328126 by David Waern at 2011-11-26T22:10:28+01:00 Fix module reference bug. - - - - - c03765f8 by David Waern at 2011-12-03T05:20:20+01:00 Slightly better behaviour on top-levels without type signatures. - Docs don't get attached to the next top-level with signature by mistake. - If there's an export list and the top-level is part of it, its doc comment shows up in the documentation. - - - - - 48461d31 by David Waern at 2011-12-03T05:38:10+01:00 Add a test for Unicode doc comments. - - - - - 549c4b4e by David Waern at 2011-12-03T19:07:55+01:00 Cleanup. - - - - - 7bfecf91 by David Waern at 2011-12-03T20:13:08+01:00 More cleanup. - - - - - 14fab722 by Ian Lynagh at 2011-12-12T21:21:35+00:00 Update dependencies and binaryInterfaceVersion - - - - - 469e6568 by Ian Lynagh at 2011-12-18T12:56:16+00:00 Fix (untested) building from source tarball without alex/happy haddock's .cabal file was declaring that it needed alex and happy to build, but in the GHC source tarballs it doesn't. - - - - - 895c9a8c by David Waern at 2011-12-27T12:57:43+01:00 Go back to having a doc, sub and decl map instead of one big decl map. This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer. - - - - - 736767d9 by David Waern at 2011-12-27T13:33:41+01:00 Merge ../../../haddock Conflicts: src/Haddock/InterfaceFile.hs - - - - - 20016f79 by David Waern at 2011-12-27T13:57:23+01:00 Bump version. - - - - - 31f276fb by David Waern at 2011-12-27T13:57:32+01:00 Merge ../ghc/utils/haddock - - - - - 95b367cd by David Waern at 2011-12-27T14:57:29+01:00 Update tests following version bump. - - - - - fa3c94cd by David Waern at 2011-12-27T14:57:51+01:00 Get rid of quite unnecessary use of different lists. - - - - - 9c4d3c54 by David Waern at 2011-12-27T15:26:42+01:00 Cleanup. - - - - - 2caf9f90 by David Waern at 2011-12-27T16:18:05+01:00 Wibbles. - - - - - 3757d09b by David Waern at 2011-12-27T20:50:26+01:00 Complete support for inferring types for top-level bindings. - - - - - 53418734 by David Waern at 2011-12-28T15:02:13+01:00 Minor fixes and cleanup. - - - - - 0c9d0385 by Ian Lynagh at 2012-01-03T18:31:29+00:00 Follow rename of Instance to ClsInst in GHC - - - - - c9bc969a by Simon Hengel at 2012-01-12T21:28:14+01:00 Make sure that generated xhtml is valid (close haskell/haddock#186) Thanks to Phyx. - - - - - 836a0b9a by David Waern at 2012-02-01T02:30:05+01:00 Fix bug introduced in my recent refactoring. - - - - - c7d733eb by David Waern at 2012-02-01T02:30:26+01:00 Cleanup mkMaps and avoid quadratic behaviour. - - - - - da3cda8f by David Waern at 2012-02-01T02:56:56+01:00 Require ghc >= 7.4. - - - - - 83a3287e by David Waern at 2012-02-01T02:57:36+01:00 Update CHANGES. - - - - - 93408f0b by Simon Hengel at 2012-02-04T00:48:04+01:00 Add reference renderings - - - - - 49d00d2c by Simon Hengel at 2012-02-04T00:48:25+01:00 Set unit tests for parser back to work - - - - - eb450980 by Simon Hengel at 2012-02-04T00:49:07+01:00 Add .gitignore - - - - - a841602c by Simon Hengel at 2012-02-04T00:49:16+01:00 Add .ghci file - - - - - 8861199d by Simon Hengel at 2012-02-04T00:49:29+01:00 tests/html-tests/copy.hs: Use mapM_ instead of mapM So we do net get a list of () on stdout when running with runhaskell. - - - - - b477d9b5 by Simon Hengel at 2012-02-04T00:49:46+01:00 Remove index files from golden tests - - - - - 9dbda34e by Simon Hengel at 2012-02-04T00:49:57+01:00 Add /tests/html-tests/tests/*index*.ref to .gitignore - - - - - a9434817 by Simon Hengel at 2012-02-04T00:50:04+01:00 Add DocWarning to Doc The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis. - - - - - de2fb6fa by Simon Hengel at 2012-02-04T00:50:13+01:00 Add support for module warnings - - - - - 0640920e by Simon Hengel at 2012-02-04T00:50:21+01:00 Add tests for module warnings - - - - - 30ce0d77 by Simon Hengel at 2012-02-04T00:50:29+01:00 Add support for warnings - - - - - bb367960 by Simon Hengel at 2012-02-04T00:50:37+01:00 Add tests for warnings - - - - - 6af1dc2d by Simon Hengel at 2012-02-04T00:50:50+01:00 Expand type signatures in export list (fixes haskell/haddock#192) - - - - - a06cbf25 by Simon Hengel at 2012-02-04T00:51:04+01:00 Expand type signatures for modules without explicit export list - - - - - 57dda796 by Simon Hengel at 2012-02-04T00:51:15+01:00 Remove obsolete TODO - - - - - 270c3253 by David Waern at 2012-02-04T00:51:24+01:00 Fix issues in support for warnings. * Match against local names only. * Simplify (it's OK to map over the warnings). - - - - - 683634bd by David Waern at 2012-02-04T00:55:11+01:00 Some cleanup and make sure we filter warnings through exports. - - - - - 210cb4ca by David Waern at 2012-02-04T03:01:30+01:00 Merge branch 'fix-for-186' of https://github.com/sol/haddock into ghc-7.4 - - - - - e8db9031 by David Waern at 2012-02-04T03:07:51+01:00 Style police. - - - - - 261f9462 by David Waern at 2012-02-04T03:20:16+01:00 Update tests. - - - - - 823cfc7c by David Waern at 2012-02-04T03:21:12+01:00 Use mapM_ in accept.hs as well. - - - - - 873dd619 by David Waern at 2012-02-04T03:21:33+01:00 Remove copy.hs - use accept.hs instead. - - - - - 0e31a14a by David Waern at 2012-02-04T03:47:33+01:00 Use <> instead of mappend. - - - - - 2ff7544f by David Waern at 2012-02-04T03:48:55+01:00 Remove code for older ghc versions. - - - - - dacf2786 by David Waern at 2012-02-04T15:52:51+01:00 Clean up some code from last SoC project. - - - - - 00cbb117 by David Waern at 2012-02-04T21:43:49+01:00 Mostly hlint-inspired cleanup. - - - - - 7dc86cc2 by Simon Peyton Jones at 2012-02-06T09:14:41+00:00 Track changes in HsDecls - - - - - f91f82fe by Ian Lynagh at 2012-02-16T13:40:11+00:00 Follow changes in GHC caused by the CAPI CTYPE pragma - - - - - a0ea6b0b by Ian Lynagh at 2012-02-22T02:26:12+00:00 Follow changes in GHC - - - - - b23b07d1 by Simon Peyton Jones at 2012-03-02T16:36:41+00:00 Follow changes in data representation from the big PolyKinds commit - - - - - 43406022 by Simon Hengel at 2012-03-05T11:18:34+01:00 Save/restore global state for static flags when running GHC actions This is necessary if we want to run createInterfaces (from Documentation.Haddock) multiple times in the same process. - - - - - 9fba16fe by Paolo Capriotti at 2012-03-06T10:57:33+00:00 Update .gitignore. - - - - - a9325044 by Simon Peyton Jones at 2012-03-14T17:35:42+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - fd48065a by Iavor Diatchki at 2012-03-15T22:43:35-07:00 Add support for type-level literals. - - - - - 2e8206dd by Simon Peyton Jones at 2012-03-16T14:18:22+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - 93e13319 by Simon Peyton Jones at 2012-03-17T01:04:05+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock Conflicts: src/Haddock/Convert.hs - - - - - d253fa71 by Iavor Diatchki at 2012-03-19T20:12:18-07:00 Merge remote-tracking branch 'origin/master' into type-nats - - - - - fc40acc8 by Iavor Diatchki at 2012-03-19T20:31:27-07:00 Add a missing case for type literals. - - - - - fd2ad699 by Iavor Diatchki at 2012-03-24T13:28:29-07:00 Rename variable to avoid shadowing warning. - - - - - 9369dd3c by Simon Peyton Jones at 2012-03-26T09:14:23+01:00 Follow refactoring of TyClDecl/HsTyDefn - - - - - 38825ca5 by Simon Peyton Jones at 2012-03-26T09:14:37+01:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - 4324ac0f by David Waern at 2012-04-01T01:51:19+02:00 Disable unicode test. - - - - - 3165b750 by David Waern at 2012-04-01T01:51:34+02:00 Take reader environment directly from TypecheckedSource. - - - - - 213b644c by David Waern at 2012-04-01T01:55:20+02:00 Cleanup. - - - - - 3118b4ba by David Waern at 2012-04-01T02:16:15+02:00 Don't filter out unexported names from the four maps - fixes a regression. - - - - - d6524e17 by David Waern at 2012-04-01T02:40:34+02:00 Fix crash when using --qual. Naughty GHC API! - - - - - ea3c43d8 by Henning Thielemann at 2012-04-01T13:03:07+02:00 add QualOption type for distinction between qualification argument given by the user and the actual qualification for a concrete module - - - - - 5422ff05 by Henning Thielemann at 2012-04-01T16:25:02+02:00 emit an error message when the --qual option is used incorrectly - - - - - 026e3404 by David Waern at 2012-04-01T18:10:30+02:00 Don't crash on unicode strings in doc comments. - - - - - ce006632 by David Waern at 2012-04-01T20:13:35+02:00 Add test for --ignore-all-exports flag/ignore-exports pragma. - - - - - 6e4dd33c by David Waern at 2012-04-01T20:21:03+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.4 - - - - - 734ae124 by Henning Thielemann at 2012-04-01T20:22:10+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - 622f9ba5 by David Waern at 2012-04-01T21:26:13+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 55ce17cb by Henning Thielemann at 2012-04-01T22:03:25+02:00 'abbreviate' qualification style - basic support Currently we ignore the package a module is imported from. This means that a module import would shadow another one with the same module name from a different package. - - - - - c85314ef by David Waern at 2012-04-01T22:05:12+02:00 Check qualification option before processing modules. - - - - - ae4b626c by Henning Thielemann at 2012-04-02T00:19:36+02:00 abbreviated qualification: use Packages.lookupModuleInAllPackages for finding the package that a module belongs to - - - - - 60bdbcf5 by Henning Thielemann at 2012-04-02T00:25:31+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - df44301d by Henning Thielemann at 2012-04-02T00:29:05+02:00 qualification style 'abbreviated' -> 'aliased' - - - - - f4192a64 by David Waern at 2012-04-02T01:05:47+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 7ba09067 by David Terei at 2012-04-04T15:08:21-07:00 Fix reporting of modules safe haskell mode (#5989) - - - - - d0cc33d0 by David Terei at 2012-04-06T15:50:41+01:00 Fix reporting of modules safe haskell mode (#5989) - - - - - 6e3434c5 by Simon Peyton Jones at 2012-04-20T18:37:46+01:00 Track changes in HsSyn - - - - - 22014ed0 by Simon Peyton Jones at 2012-05-11T22:45:15+01:00 Follow changes to LHsTyVarBndrs - - - - - d9a07b24 by David Waern at 2012-05-15T01:46:35+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - a6c4ebc6 by David Waern at 2012-05-16T02:18:32+02:00 Update CHANGES. - - - - - 8e181d29 by David Waern at 2012-05-16T02:27:56+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - e358210d by David Waern at 2012-05-16T02:35:33+02:00 Mention the new aliased --qual mode in CHANGES. - - - - - efd36a28 by David Waern at 2012-05-16T21:33:13+02:00 Bump version number. - - - - - d6b3af14 by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for deprecated record field - - - - - 927f800e by Simon Hengel at 2012-05-17T19:08:20+02:00 Use >>= instead of fmap and join - - - - - 048b41d5 by Simon Hengel at 2012-05-17T19:08:20+02:00 newtype-wrap Doc nodes for things that may have warnings attached - - - - - e3a89fc3 by Simon Hengel at 2012-05-17T19:08:20+02:00 Attach warnings to `Documentation` type - - - - - 5d4cc43d by Simon Hengel at 2012-05-17T19:08:20+02:00 Simplify lookupWarning - - - - - cf8ae69d by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for haskell/haddock#205 - - - - - cb409b19 by Simon Peyton Jones at 2012-05-25T08:30:11+01:00 Follow changes in LHsTyVarBndrs - - - - - 2d5f4179 by Simon Hengel at 2012-05-26T19:21:29+02:00 Add Applicative instance for (GenRnM a) - - - - - e4373060 by Simon Hengel at 2012-05-26T19:21:33+02:00 Use a map for warnings, as suggested by @waern - - - - - 597a68c7 by Simon Hengel at 2012-05-27T08:48:24+02:00 Add an optional label to URLs - - - - - ef1ac7fe by Simon Hengel at 2012-05-27T08:48:24+02:00 Add support for hyperlink labels to parser - - - - - 41f2adce by Simon Hengel at 2012-05-27T08:48:24+02:00 Add golden test for hyperlinks - - - - - 83d5e764 by Simon Hengel at 2012-05-27T08:50:02+02:00 Use LANGUAGE pragmas instead of default-extensions in cabal file - - - - - ddb755e5 by Simon Hengel at 2012-05-27T08:50:02+02:00 Fix typo in comment - - - - - 110676b4 by Simon Hengel at 2012-05-27T08:50:02+02:00 Add a type signature for a where-binding - - - - - 7d9ba2a0 by Ian Lynagh at 2012-06-12T14:38:01+01:00 Follow changes in GHC - - - - - 47c704f2 by Ian Lynagh at 2012-06-12T18:52:16+01:00 Follow changes in GHC - - - - - e1efe1ab by Simon Peyton Jones at 2012-06-13T17:25:29+01:00 Follow changes for the implementation of implicit parameters - - - - - 69abc81c by Ian Lynagh at 2012-06-19T22:52:58+01:00 Follow changes in base - - - - - 9d074a21 by Paolo Capriotti at 2012-06-22T18:26:47+01:00 Use right docMap to get decl documentation. - - - - - e3292ef6 by Ian Lynagh at 2012-07-15T01:31:19+01:00 Follow changes in GHC - - - - - ceae56b0 by Ian Lynagh at 2012-07-16T21:22:48+01:00 Fix haddock following some GHC changes Passing _|_ as the Settings for defaultDynFlags no longer works well enough - - - - - 9df72735 by Paolo Capriotti at 2012-07-19T16:49:32+01:00 Forward port changes from stable. - - - - - 572f5fcf by Ian Lynagh at 2012-07-19T20:38:26+01:00 Merge branch 'master' of darcs.haskell.org:/srv/darcs//haddock - - - - - 9195aca4 by Paolo Capriotti at 2012-07-20T10:27:28+01:00 Update dependencies. - - - - - 33db3923 by Ian Lynagh at 2012-07-20T17:54:43+01:00 Build with GHC 7.7 - - - - - 925a2cea by David Waern at 2012-07-23T16:50:40+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.6 Conflicts: src/Haddock/InterfaceFile.hs - - - - - d710ef97 by David Waern at 2012-07-23T16:52:07+02:00 Bump version number. - - - - - eb0c2f83 by David Waern at 2012-07-23T16:57:58+02:00 Update CHANGES. - - - - - b3f56943 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Hide "internal" instances This fixes haskell/haddock#37 (http://trac.haskell.org/haddock/ticket/37) Precisely, we show an instance iff its class and all the types are exported by non-hidden modules. - - - - - a70aa412 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Tests for hiding instances (#37) - - - - - c0f4aa58 by Simon Hengel at 2012-07-27T13:00:13+03:00 Add an other test for hiding instances (#37) - - - - - a7ed6268 by Ian Lynagh at 2012-08-07T14:48:13+01:00 Follow changes in GHC - - - - - 0ab30d38 by Ian Lynagh at 2012-08-13T22:12:27+01:00 Improve haddock memory usage - - - - - 0eaa4e30 by Ian Lynagh at 2012-08-13T23:58:46+01:00 Improve haddock memory usage - - - - - 659d26cf by Ian Lynagh at 2012-08-14T13:16:48+01:00 Remove some temporary pragmas I accidentally recorded - - - - - d97fceb6 by Simon Hengel at 2012-08-25T13:19:34+02:00 Add missing dependency to library - - - - - 4c910697 by Simon Hengel at 2012-08-28T07:39:14+02:00 Move .ghci to project root - - - - - fc3c601a by Simon Hengel at 2012-08-28T07:39:14+02:00 accept.hs: Ignore some files - - - - - 1af9b984 by Simon Hengel at 2012-08-28T07:40:04+02:00 Update reference renderings (bump version) - - - - - 980dc253 by Simon Hengel at 2012-08-28T07:40:32+02:00 Update reference renderings (remove links for ()) - - - - - 33651dbf by Simon Hengel at 2012-08-28T07:41:50+02:00 Update documentation of `runInteractiveProcess` in reference rendering - - - - - 7ab25078 by David Waern at 2012-09-07T10:38:50+02:00 Merge branch 'hiddenInstances2' of http://github.com/feuerbach/haddock into ghc-7.6 - - - - - c3de3a4b by David Waern at 2012-09-07T14:29:27+02:00 Follow changes in GHC. - - - - - 298c43ac by David Waern at 2012-09-07T14:59:24+02:00 Update CHANGES. - - - - - e797993a by David Waern at 2012-09-07T15:21:30+02:00 Update ANNOUNCE. - - - - - d0b44790 by David Waern at 2012-09-07T15:22:43+02:00 Merge branch 'hidden-instances' into ghc-7.6 - - - - - 41a4adc8 by Simon Hengel at 2012-09-08T12:08:37+02:00 Update doc/README - - - - - 71ad1040 by Simon Hengel at 2012-09-08T12:17:17+02:00 Add documentation for URL labels - - - - - 9bb41afd by Simon Peyton Jones at 2012-09-20T18:14:26+01:00 Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs - - - - - b8139bfa by Simon Hengel at 2012-09-21T14:24:16+02:00 Disable Unicode test for now - - - - - a5fafdd7 by Simon Hengel at 2012-09-21T14:35:45+02:00 Update TypeOperators test for GHC 7.6.1 Type operators can't be used as type variables anymore! - - - - - 6ccf0025 by Simon Hengel at 2012-09-21T16:02:24+02:00 Remove (Monad (Either e)) instance from ref. rendering of CrossPackageDocs I do not really understand why the behavior changed, so I'll open a ticket, so that we can further investigate. - - - - - b5c6c138 by Ian Lynagh at 2012-09-27T02:00:57+01:00 Follow changes in GHC build system - - - - - b98eded0 by David Waern at 2012-09-27T15:37:02+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 76cc2051 by David Waern at 2012-09-27T15:48:19+02:00 Update hidden instances tests. - - - - - aeaa1c59 by David Waern at 2012-09-28T10:21:32+02:00 Make API buildable with GHC 7.6. - - - - - d76be1b0 by Simon Peyton Jones at 2012-09-28T15:57:05+01:00 Merge remote-tracking branch 'origin/master' into tc-untouchables - - - - - a1922af8 by David Waern at 2012-09-28T19:50:20+02:00 Fix spurious superclass constraints bug. - - - - - bc41bdbb by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove old examples - - - - - bed7d3dd by Simon Hengel at 2012-10-01T11:30:51+02:00 Adapt parsetests for GHC 7.6.1 - - - - - dcdb22bb by Simon Hengel at 2012-10-01T11:30:51+02:00 Add test-suite section for parsetests to cabal file + get rid of HUnit dependency - - - - - 1e5263c9 by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove test flag from cabal file This was not really used. - - - - - 4beee98b by David Waern at 2012-09-28T23:42:28+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 11dd2256 by Ian Lynagh at 2012-10-03T16:17:35+01:00 Follow change in GHC build system - - - - - fbd77962 by Simon Hengel at 2012-10-03T18:49:40+02:00 Remove redundant dependency from cabal file - - - - - 09218989 by Simon Hengel at 2012-10-04T16:03:05+02:00 Fix typo - - - - - 93a2d5f9 by Simon Hengel at 2012-10-04T16:11:41+02:00 Remove trailing whitespace from cabal file - - - - - c8b46cd3 by Simon Hengel at 2012-10-04T16:12:17+02:00 Export Haddock's main entry point from library - - - - - b411e77b by Simon Hengel at 2012-10-04T16:29:46+02:00 Depend on library for executable The main motivation for this is to increase build speed. In GHC's source tree the library is not build, but all modules are now required for the executable, so that GHC's validate will now detect build failures for the library. - - - - - f8f0979f by Simon Hengel at 2012-10-05T00:32:57+02:00 Set executable flag for Setup.lhs - - - - - dd045998 by Simon Hengel at 2012-10-07T16:44:06+02:00 Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. - - - - - 7b39c3ae by Simon Hengel at 2012-10-07T17:05:45+02:00 cross-package test: re-export IsString instead of Monad There is a monad instance for Q, which is not available on platforms that do not have GHCi support. This caused CrossPackageDocs to fail on those platforms. Re-exporting IsString should test the same thing, but it works on all platforms. - - - - - 0700c605 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Fix some warnings - - - - - f78eca79 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Make -Wall proof - - - - - 6beec041 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Use listToMaybe/fromMaybe instead of safeHead/maybe - - - - - 44b8ce86 by Ian Lynagh at 2012-10-08T21:59:46+01:00 Follow changes in GHC - - - - - 6da5f702 by Simon Hengel at 2012-10-09T11:16:19+02:00 Update .ghci - - - - - 9ac1a1b9 by Kazu Yamamoto at 2012-10-09T12:45:31+02:00 Add markup support for properties - - - - - 1944cb42 by Simon Hengel at 2012-10-09T12:45:31+02:00 Simplify lexing/parsing of properties In contrast to what we do for examples, we do not really need to capture the "prompt" here. - - - - - bffd8e62 by Simon Hengel at 2012-10-09T13:40:14+02:00 Add HTML test for properties - - - - - 2fe9c5cb by Simon Hengel at 2012-10-09T13:40:21+02:00 Add unit tests for properties - - - - - 874e361b by Simon Hengel at 2012-10-09T13:40:33+02:00 Bump interface version - - - - - 2506cc37 by Simon Hengel at 2012-10-09T15:15:04+02:00 Fix parser bug - - - - - 743d2b7d by Simon Hengel at 2012-10-09T15:31:06+02:00 Allow to load interface files with compatible versions - - - - - 981a1660 by Simon Hengel at 2012-10-10T10:32:05+02:00 Export more types from Documentation.Haddock (fixes haskell/haddock#216) - - - - - dff7dc76 by Simon Hengel at 2012-10-10T11:15:19+02:00 Update ANNOUNCE and CHANGES - - - - - edd2bb01 by Simon Hengel at 2012-10-10T11:22:50+02:00 Bump version - - - - - 5039163b by Simon Hengel at 2012-10-10T13:56:04+02:00 Fix typo in documentation - - - - - e4ce34da by Simon Hengel at 2012-10-10T14:28:35+02:00 Add documentation for properties - - - - - 9555ebca by Simon Hengel at 2012-10-11T10:49:04+02:00 Remove redundant if-defs, more source documentation - - - - - 87aa67e1 by Simon Hengel at 2012-10-11T12:32:51+02:00 Adapt cabal file - - - - - c44c1dee by Simon Hengel at 2012-10-11T12:41:58+02:00 Require ghc 7.6 - - - - - 8383bc34 by Simon Hengel at 2012-10-11T12:50:24+02:00 Bump version - - - - - 1030eb38 by Simon Hengel at 2012-10-11T12:55:44+02:00 Update ANNOUNCE and CHANGES - - - - - 74955088 by Simon Hengel at 2012-10-12T09:49:31+02:00 Improve note about `binaryInterfaceVersion` (thanks David) - - - - - ee30f6b7 by Simon Hengel at 2012-10-13T13:40:59+02:00 Update version in html tests, rpm spec file, and user manual - - - - - f2861f18 by Simon Hengel at 2012-10-13T14:40:33+02:00 Remove unused MonadFix constraint - - - - - dfdf1a74 by Simon Hengel at 2012-10-13T15:15:38+02:00 Minor code simplification - - - - - 4ecd1e70 by Simon Hengel at 2012-10-13T15:33:43+02:00 Increase code locality - - - - - f7df5cc9 by Simon Hengel at 2012-10-13T16:03:12+02:00 Minor code simplification - - - - - e737eb6e by Simon Hengel at 2012-10-13T19:03:04+02:00 Handle HsExplicitListTy in renameer (fixes haskell/haddock#213) - - - - - c2dc8f17 by Simon Hengel at 2012-10-13T20:46:31+02:00 Better error messages - - - - - 14d48b4c by Simon Hengel at 2012-10-14T00:21:07+02:00 Simplify RnM type - - - - - 6c2cc547 by Simon Hengel at 2012-10-14T00:23:35+02:00 Simplify lookupRn - - - - - bc77ce85 by Simon Hengel at 2012-10-14T01:51:32+02:00 Organize unite tests hierarchically - - - - - 2306d117 by Simon Hengel at 2012-10-14T10:34:58+02:00 Handle more cases in renameType - - - - - 8a864203 by Simon Hengel at 2012-10-14T11:47:59+02:00 Add mini_HiddenInstances.html.ref and mini_HiddenInstancesB.html.ref - - - - - 3a978eca by Simon Hengel at 2012-10-14T11:49:28+02:00 Add /tests/html-tests/output/ to .gitignore - - - - - db18888a by Simon Hengel at 2012-10-14T13:38:21+02:00 Allow haddock markup in deprecation messages - - - - - e7cfee9f by Simon Hengel at 2012-10-14T14:00:23+02:00 If parsing of deprecation message fails, include it verbatim - - - - - 242a85be by Simon Hengel at 2012-10-14T14:13:24+02:00 Add description for PruneWithWarning test - - - - - 43d33df1 by Simon Hengel at 2012-10-14T15:40:53+02:00 Minor formatting change - - - - - 22768c44 by Simon Hengel at 2012-10-14T16:03:43+02:00 Properly handle deprecation messages for re-exported things (fixes haskell/haddock#220) - - - - - cb4b9111 by Simon Hengel at 2012-10-14T17:30:28+02:00 Add build artifacts for documentation to .gitignore - - - - - 854cd8de by Simon Hengel at 2012-10-14T23:34:51+02:00 unit-tests: Improve readability Add IsString instance for (Doc RdrName) + use <> instead of DocAppend. - - - - - c4446d54 by Simon Hengel at 2012-10-14T23:37:21+02:00 unit-tests: Minor refactoring Rename parse to parseParas. - - - - - 04f2703c by Simon Hengel at 2012-10-15T00:36:42+02:00 Fix typo - - - - - 3d109e44 by Simon Hengel at 2012-10-15T10:30:07+02:00 Add description for DeprecatedReExport test - - - - - 84f0985c by Simon Hengel at 2012-10-15T14:54:19+02:00 Move resources to /resources directory - - - - - a5de7ca6 by Simon Hengel at 2012-10-15T15:46:18+02:00 Move HTML tests to directory /html-test/ - - - - - e21f727d by Simon Hengel at 2012-10-15T19:32:42+02:00 Move HTML reference renderings to /html-test/ref/ - - - - - 3a3c6c75 by Simon Hengel at 2012-10-15T19:32:42+02:00 Copy css, images, etc. on accept - - - - - 40ead6dc by Simon Hengel at 2012-10-15T19:32:42+02:00 Move unit tests to /test directory - - - - - 99a28231 by Simon Hengel at 2012-10-15T19:32:42+02:00 Fix Setup.lhs /usr/bin/runhaskell is not installed on all systems. - - - - - 95faf45e by Simon Hengel at 2012-10-15T19:32:42+02:00 Make test management scripts more robust * They are now independent from the current directory, and hence can be called from everywhere * On UNIX/Linux they can now be run as scripts - - - - - 027aaa2d by Simon Hengel at 2012-10-15T19:53:40+02:00 Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. - - - - - e0266ede by Simon Hengel at 2012-10-15T20:03:43+02:00 Add test case for "spurious superclass constraints bug" - - - - - 52a2aa92 by Simon Hengel at 2012-10-15T20:28:55+02:00 Adapt accept.lhs, so that it ignores more index files - - - - - 53530781 by Simon Hengel at 2012-10-15T20:49:39+02:00 Rename html-test/runtests.lhs to html-test/run.lhs - - - - - 84518797 by Simon Hengel at 2012-10-15T20:49:39+02:00 Move source files for HTML tests to html-test/src - - - - - a911dc6c by Simon Hengel at 2012-10-15T20:49:39+02:00 Adapt output directory for HTML tests - - - - - d3c15857 by Ian Lynagh at 2012-10-16T16:54:43+01:00 Follow dopt->gopt rename - - - - - 956665a5 by Simon Hengel at 2012-10-18T08:42:48+02:00 Update html-test/README - - - - - 903b1029 by Simon Hengel at 2012-10-18T08:50:26+02:00 Use markdown for html-test/README - - - - - 150b4d63 by Ian Lynagh at 2012-10-18T16:36:00+01:00 Follow changes in GHC: 'flags' has been renamed 'generalFlags' - - - - - 41e04ff9 by Simon Hengel at 2012-11-28T09:54:35+01:00 Export missing types from Documentation.Haddock - - - - - 9be59237 by Ian Lynagh at 2012-11-30T23:20:47+00:00 Update dependencies - - - - - e06842f5 by Simon Hengel at 2012-12-07T20:58:05+01:00 Bump version - - - - - e3dbede0 by Simon Hengel at 2012-12-07T20:58:05+01:00 Add missing test files to cabal file (fixes haskell/haddock#230) - - - - - ee0dcca7 by Simon Hengel at 2012-12-07T20:58:05+01:00 Update CHANGES - - - - - 51601bdb by Simon Peyton Jones at 2012-12-19T17:28:35+00:00 Track changes in UNPACK pragma stuff - - - - - f2573bc1 by Richard Eisenberg at 2012-12-21T20:56:25-05:00 Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances. - - - - - f788d0fb by Simon Peyton Jones at 2012-12-23T15:49:58+00:00 Track changes in HsBang - - - - - ca460a0c by Simon Peyton Jones at 2012-12-23T15:50:28+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - f078fea6 by Simon Peyton Jones at 2013-01-02T08:33:13+00:00 Use InstEnv.instanceSig rather than instanceHead (name change) - - - - - 88e41305 by Simon Peyton Jones at 2013-01-14T17:10:27+00:00 Track change to HsBang type - - - - - e1ad4e19 by Kazu Yamamoto at 2013-02-01T11:59:24+09:00 Merge branch 'ghc-7.6' into ghc-7.6-merge-2 Conflicts: haddock.cabal src/Haddock/Interface/AttachInstances.hs src/Haddock/Interface/Create.hs src/Haddock/Interface/LexParseRn.hs src/Haddock/InterfaceFile.hs src/Haddock/Types.hs Only GHC HEAD can compile this. GHC 7.6.x cannot compile this. Some test fail. - - - - - 62bec012 by Kazu Yamamoto at 2013-02-06T11:12:28+09:00 Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.) - - - - - 013fd2e4 by Kazu Yamamoto at 2013-02-06T17:56:21+09:00 Refactoring instanceHead'. - - - - - 3148ce0e by Kazu Yamamoto at 2013-02-07T17:45:10+09:00 Using new syntax in html-test/src/GADTRecords.hs. - - - - - 626dabe7 by Gabor Greif at 2013-02-15T22:42:01+01:00 Typo - - - - - 1eb667ae by Ian Lynagh at 2013-02-16T17:02:07+00:00 Follow changes in base - - - - - 3ef8253a by Ian Lynagh at 2013-03-01T23:23:57+00:00 Follow changes in GHC's build system - - - - - 1a265a3c by Ian Lynagh at 2013-03-03T23:12:07+00:00 Follow changes in GHC build system - - - - - 69941c79 by Max Bolingbroke at 2013-03-10T09:38:28-07:00 Use Alex 3's Unicode support to properly lex source files as UTF-8 Signed-off-by: David Waern <david.waern at gmail.com> - - - - - ea687dad by Simon Peyton Jones at 2013-03-15T14:16:10+00:00 Adapt to tcRnGetInfo returning family instances too This API change was part of the fix to Trac haskell/haddock#4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays. - - - - - 971a30b0 by Andreas Voellmy at 2013-05-19T20:47:39+01:00 Fix for haskell/haddock#7879. Changed copy of utils/haddock/html/resources/html to use "cp -RL" rather than "cp -R". This allows users to run validate in a build tree, where the build tree was setup using lndir with a relative path to the source directory. - - - - - 31fb7694 by Ian Lynagh at 2013-05-19T20:47:49+01:00 Use "cp -L" when making $(INPLACE_LIB)/latex too - - - - - e9952233 by Simon Hengel at 2013-06-01T18:06:50+02:00 Add -itest to .ghci - - - - - b06873b3 by Mateusz Kowalczyk at 2013-06-01T18:06:50+02:00 Workaround for a failing build with --enable-tests. - - - - - e7858d16 by Simon Hengel at 2013-06-01T19:29:28+02:00 Fix broken test - - - - - 0690acb1 by Richard Eisenberg at 2013-06-21T14:08:25+01:00 Updates to reflect changes in HsDecls to support closed type families. - - - - - 7fd347ec by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 53ed81b6 by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 931c4f4f by Richard Eisenberg at 2013-07-24T13:15:59+01:00 Remove (error "synifyKind") to use WithinType, to allow haddock to process base. - - - - - 55a9c804 by Richard Eisenberg at 2013-08-02T15:54:55+01:00 Changes to reflect changes in GHC's type HsTyVarBndr - - - - - b6e9226c by Mathieu Boespflug at 2013-08-04T10:39:43-07:00 Output Copright and License keys in Xhtml backend. This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern at gmail.com> - - - - - 4c66028a by David Waern at 2013-08-04T15:27:36-07:00 Bump interface file version. - - - - - 67340163 by David Waern at 2013-08-09T16:12:51-07:00 Update tests. - - - - - 2087569b by Mateusz Kowalczyk at 2013-08-25T09:24:13+02:00 Add spec tests. This adds tests for all elements we can create during regular parsing. This also adds tests for text with unicode in it. - - - - - 97f36a11 by Mateusz Kowalczyk at 2013-08-27T06:59:12+01:00 Fix ticket haskell/haddock#247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. - - - - - 60681b4f by Mateusz Kowalczyk at 2013-08-27T21:22:48+02:00 LaTeX tests setup - - - - - fa4c27b2 by Mateusz Kowalczyk at 2013-09-02T23:21:43+01:00 Fixes haskell/haddock#253 - - - - - 1a202490 by Mateusz Kowalczyk at 2013-09-03T01:12:50+01:00 Use Hspec instead of nanospec This is motivated by the fact that Haddock tests are not ran by the GHC's ‘validate’ script so we're pretty liberal on dependencies in that area. Full Hspec gives us some nice features such as Quickcheck integration. - - - - - 8cde3b20 by David Luposchainsky at 2013-09-08T07:27:28-05:00 Fix AMP warnings Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - d10661f2 by Herbert Valerio Riedel at 2013-09-11T15:15:01+02:00 Update Git repo URL in `.cabal` file - - - - - 16a44eb5 by Richard Eisenberg at 2013-09-17T09:34:26-04:00 Revision to reflect new role annotation syntax in GHC. - - - - - 4b9833b9 by Herbert Valerio Riedel at 2013-09-18T10:15:28+02:00 Add missing `traverse` method for `GenLocated` As `Traversable` needs at least one of `traverse` or `sequenceA` to be overridden. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - b71fed5d by Simon Hengel at 2013-09-18T22:43:34+02:00 Add test helper - - - - - 4fc1ea86 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#231 - - - - - 435872f6 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#256 We inject -dynamic-too into flags before we run all our actions in the GHC monad. - - - - - b8b24abb by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Add new field to DynFlags - - - - - 49558795 by Simon Hengel at 2013-09-18T22:43:35+02:00 Fallback to ./resources when Cabal data is not found (so that themes are found during development) - - - - - bf79d05c by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Fixes haskell/haddock#5 - - - - - e1baebc2 by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Print missing documentation. Fixes haskell/haddock#258. - - - - - 02ea74de by Austin Seipp at 2013-10-09T10:52:22-05:00 Don't consider StaticFlags when parsing arguments. Instead, discard any static flags before parsing the command line using GHC's DynFlags parser. See http://ghc.haskell.org/trac/ghc/ticket/8276 Based off a patch from Simon Hengel. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 704fd5bb by Simon Hengel at 2013-11-09T00:15:13+01:00 Update HTML tests - - - - - f9fed49e by Simon Hengel at 2013-11-10T18:43:58+01:00 Bump version - - - - - 97ae1999 by Simon Peyton Jones at 2013-11-25T17:25:14+00:00 Track changes in HsSpliceTy data constructor - - - - - 59ad8268 by Simon Peyton Jones at 2014-01-10T18:17:43+00:00 Adapt to small change in Pretty's exports - - - - - 8b12e6aa by Simon Hengel at 2014-01-12T14:48:35-06:00 Some code simplification by using traverse - - - - - fc5ea9a2 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix warnings in test helper - - - - - 6dbb3ba5 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Add ByteString version of Attoparsec - - - - - 968d7774 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 One pass parser and tests. We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing. - - - - - 37a07c9c by Simon Hengel at 2014-01-12T14:48:35-06:00 Rename Haddock.ParseSpec to Haddock.ParserSpec - - - - - f0f68fe9 by Simon Hengel at 2014-01-12T14:48:35-06:00 Don't append newline to parseString input We also check that we have parsed everything with endOfInput. - - - - - 95d60093 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu at fuuzetsu.co.uk if you need the full commit history. - - - - - 7d99108c by Simon Hengel at 2014-01-12T14:48:35-06:00 Update acceptance tests - - - - - d1b59640 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Support for bold. Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs - - - - - 4b412b39 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Allow for headings inside function documentation. LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs - - - - - fdcca428 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Per-module extension flags and language listing. Any extensions that are not enabled by a used language (Haskell2010 &c) will be shown. Furthermore, any implicitly enabled are also going to be shown. While we could eliminate this either by using the GHC API or a dirty hack, I opted not to: if a user doesn't want the implied flags to show, they are recommended to use enable extensions more carefully or individually. Perhaps this will encourage users to not enable the most powerful flags needlessly. Enabled with show-extensions. Conflicts: src/Haddock/InterfaceFile.hs - - - - - 368942a2 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Bump interface version There were some breaking changes over the last few patches so we bump the interface version. This causes a big problem with testing: 1. To generate cross package docs, we first need to generate docs for the package used. 2. To generate package docs with new interface version, we need to use Haddock which has the version bumped. 3. To get Haddock with the version bump, we first need to test cross package docs 4. GOTO 1 So the problem is the chicken and the egg problem. It seems that the only solution would be to generate some interface files on the fly but it is non-trivial. To run this test, you'll have to: * build Haddock without the test (make sure everything else passes) * rebuild the packages used in the test with your shiny new binary making sure they are visible to Haddock * remove the ‘_hidden’ suffix and re-run the tests Note: because the packages currently used for this test are those provided by GHC, it's probably non-trivial to just re-build them. Preferably something less tedious to rebuild should be used and something that is not subject to change. - - - - - 124ae7a9 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow for nesting of paragraphs under lists. The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - c7913535 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow escaping in URLs and pictures. Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - 32326680 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update documentation. - - - - - fbef6406 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update maintainer - - - - - b40e82f4 by Mateusz Kowalczyk at 2014-01-13T02:39:25-06:00 Fixes haskell/haddock#271 Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - f4eafbf8 by Gergő Érdi at 2014-01-19T15:35:16-06:00 Support for -XPatternSynonyms Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - a8939591 by Austin Seipp at 2014-01-29T08:09:04-06:00 Update CPP check for __GLASGOW_HASKELL__ Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 30d7e9d5 by Gergő Érdi at 2014-01-31T00:15:01+08:00 <+>: Don't insert a space when concatenating empty nodes - - - - - a25ccd4d by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Fix @ code blocks In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. - - - - - 0f67305a by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Update tests This updates tests due to Haddock Trac haskell/haddock#271 fix and due to removal of TypeHoles as an extension from GHC. - - - - - 157322a7 by Gergő Érdi at 2014-01-31T01:03:17+08:00 Handle infix vs prefix names correctly everywhere, by explicitly specifying the context The basic idea is that "a" and "+" are either pretty-printed as "a" and "(+)" or "`a`" and "+" - - - - - aa6d9685 by Mateusz Kowalczyk at 2014-01-30T17:21:50+00:00 Correct whitespace in ‘hidden’ test for <+> change - - - - - 121872f0 by Mateusz Kowalczyk at 2014-02-09T17:59:12+00:00 Document module header. Fixes Haddock Trac haskell/haddock#270. - - - - - e3253746 by Mateusz Kowalczyk at 2014-02-10T21:37:48+00:00 Insert a space between module link and description Fixes Haddock Trac haskell/haddock#277. - - - - - 771d2384 by Mateusz Kowalczyk at 2014-02-10T23:27:21+00:00 Ensure a space between type signature and ‘Source’ This is briefly related to Haddock Trac haskell/haddock#249 and employs effectively the suggested fix _but_ it doesn't actually fix the reported issue. This commit simply makes copying the full line a bit less of a pain. - - - - - 8cda9eff by nand at 2014-02-11T15:48:30+00:00 Add support for type/data families This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 3f22c510 by nand at 2014-02-11T15:53:50+00:00 Improve display of poly-kinded type operators This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - effb2d6b by nand at 2014-02-11T15:56:50+00:00 Add test case for PatternSynonyms This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - b38faf0d by Niklas Haas at 2014-02-13T21:53:32+00:00 Get rid of re-implementation of sortBy I have no idea what this was doing lying around here, and due to the usage of tuples it's actually slower, too. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - ac1e0413 by Mateusz Kowalczyk at 2014-02-13T23:57:16+00:00 Only warn about missing docs when docs are missing This fixes the ‘Missing documentation for…’ message for modules with 100% coverage. - - - - - cae2e36a by Niklas Haas at 2014-02-15T21:56:18+00:00 Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 8bea5c3a by Mateusz Kowalczyk at 2014-02-19T05:11:34+00:00 Use a bespoke data type to indicate fixity This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment. - - - - - 5b52d57c by Niklas Haas at 2014-02-22T21:31:03+01:00 Strip a single leading space from bird tracks (#201) This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch. - - - - - 5a1315a5 by Simon Hengel at 2014-02-22T21:55:35+01:00 Turn a source code comment into specs - - - - - 784cfe58 by Mateusz Kowalczyk at 2014-02-23T05:02:22+00:00 Update test case for lifted GADT type rendering The parsing of these seems to have been fixed by GHC folk and it now renders differently. IMHO it now renders in a better way so I'm updating the test to reflect this. - - - - - c3c88c2f by Mateusz Kowalczyk at 2014-02-23T06:37:14+00:00 Don't shadow ‘strip’. -Wall complains - - - - - 293031d8 by Niklas Haas at 2014-02-23T15:21:52+01:00 Make ImplicitParams render correctly (#260) This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone) - - - - - 4200842d by Niklas Haas at 2014-02-23T15:37:13+01:00 Lower precedence of equality constraints This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC - - - - - b59e3227 by Niklas Haas at 2014-02-23T16:11:22+01:00 Add RankNTypes test case to ImplicitParams.hs This test actually tests what haskell/haddock#260 originally reported - I omitted the RankNTypes scenario from the original fix because I realized it's not relevant to the underlying issue and indeed, this renders as intended now. Still good to have more tests. - - - - - c373dbf7 by Mateusz Kowalczyk at 2014-02-24T06:09:54+00:00 Fix rendering of Contents when links are present Fixes Haddock Trac haskell/haddock#267. - - - - - 9ecb0e56 by Mateusz Kowalczyk at 2014-02-24T06:26:50+00:00 Fix wording in the docs - - - - - 4f4dcd8e by Mateusz Kowalczyk at 2014-02-27T03:00:33+00:00 Change rendering of duplicate record field docs See Haddock Trac haskell/haddock#195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this. - - - - - ad8aa609 by Niklas Haas at 2014-03-08T09:43:26+01:00 Render fixity information Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of. - - - - - 6a39c917 by Niklas Haas at 2014-03-09T07:43:39+01:00 Reorder topDeclElem to move the source/wiki links to the top They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom. - - - - - 2d34b3b4 by Niklas Haas at 2014-03-09T07:53:46+01:00 Use optLast instead of listToMaybe for sourceUrls/wikiUrls This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates. - - - - - 0eff4624 by Niklas Haas at 2014-03-09T07:53:46+01:00 Differentiate between TH splices (line-links) and regular names This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures. - - - - - 66d6f77b by Niklas Haas at 2014-03-09T20:02:43+01:00 Group similar fixities together Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <= - - - - - 6587f9f5 by Mateusz Kowalczyk at 2014-03-10T04:24:18+00:00 Update changelog - - - - - 7387ddad by Niklas Haas at 2014-03-11T10:26:04+01:00 Include fixity information in the Interface file This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly. - - - - - ab46ef44 by Niklas Haas at 2014-03-11T10:26:04+01:00 Update changelog - - - - - 565cab6f by Niklas Haas at 2014-03-11T10:26:04+01:00 Update appearance of fixity annotations This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present. - - - - - 5d7afd67 by Niklas Haas at 2014-03-11T10:26:05+01:00 Filter family instances of hidden types Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case. - - - - - ec291b0c by Niklas Haas at 2014-03-11T10:26:05+01:00 Add documentation for --source-entity-line - - - - - 0922e581 by Niklas Haas at 2014-03-11T10:37:32+01:00 Revert "Reorder topDeclElem to move the source/wiki links to the top" This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines. - - - - - 30618e8b by Mateusz Kowalczyk at 2014-03-11T09:41:07+00:00 Bump version to 2.15.0 - - - - - adf3f1bb by Mateusz Kowalczyk at 2014-03-11T09:41:09+00:00 Fix up some whitespace - - - - - 8905f57d by Niklas Haas at 2014-03-13T19:18:06+00:00 Hide RHS of TFs with non-exported right hand sides Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user. - - - - - 5c44d5c2 by Niklas Haas at 2014-03-13T19:18:08+00:00 Add UnicodeSyntax alternatives for * and -> I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting. - - - - - b04a63e6 by Niklas Haas at 2014-03-13T19:18:10+00:00 Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. - - - - - a4a20b16 by Niklas Haas at 2014-03-13T19:18:12+00:00 Strip links from recently added html tests These were accidentally left there when the tests were originally added - - - - - d624f315 by Mateusz Kowalczyk at 2014-03-13T19:19:31+00:00 Update changelog - - - - - d27a21ac by Mateusz Kowalczyk at 2014-03-13T21:19:07+00:00 Always read in prologue files as UTF8 (#286). - - - - - 54b2fd78 by Mateusz Kowalczyk at 2014-03-13T21:28:09+00:00 Style only - - - - - fa4fe650 by Simon Hengel at 2014-03-15T09:04:18+01:00 Add Fuuzetsu maintainers field in cabal file - - - - - f83484b7 by Niklas Haas at 2014-03-15T18:20:24+00:00 Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. - - - - - 0099d276 by Niklas Haas at 2014-03-15T18:20:26+00:00 Fix issue haskell/haddock#281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. - - - - - 1f9687bd by Mateusz Kowalczyk at 2014-03-21T17:48:37+00:00 Please cabal sdist - - - - - 75542693 by Mateusz Kowalczyk at 2014-03-22T16:36:16+00:00 Drop needless --split-objs which slows us down. Involves tiny cleanup of all the dynflag bindings. Fixes haskell/haddock#292. - - - - - 31214dc3 by Herbert Valerio Riedel at 2014-03-23T18:01:01+01:00 Fix a few typos Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 0b73e638 by Mateusz Kowalczyk at 2014-03-31T05:34:36+01:00 Print kind signatures on GADTs - - - - - 2bab42f3 by Mateusz Kowalczyk at 2014-03-31T16:53:25+01:00 Add default for new PlatformConstraints field - - - - - 42647c5f by Mateusz Kowalczyk at 2014-03-31T18:29:04+01:00 Drop leading whitespace in @-style blocks. Fixes haskell/haddock#201. - - - - - 98208294 by Niklas Haas at 2014-03-31T20:09:58+02:00 Crash when exporting record selectors of data family instances This fixes bug haskell/haddock#294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated. - - - - - 3832d171 by Mateusz Kowalczyk at 2014-04-01T19:07:33+01:00 Make CHANGES consistent with what's now in 2.14.2 - - - - - c386ae89 by Mateusz Kowalczyk at 2014-04-01T19:18:36+01:00 Actually bundle extra spec tests in sdist - - - - - bd57a6d3 by Mateusz Kowalczyk at 2014-04-03T21:13:48+01:00 Update test cases for GHC bug haskell/haddock#8945, Haddock haskell/haddock#188 The order of signature groups has been corrected upstream. Here we add a test case and update some existing test-cases to reflect this change. We remove grouped signature in test cases that we can (Minimal, BugDeprecated &c) so that the test is as self-contained as possible. - - - - - 708b88b1 by Mateusz Kowalczyk at 2014-04-03T21:16:07+01:00 Enforce strict GHC version in cabal file This stops people with 7.6.3 trying to install 2.15.x which clearly won't work. Unfortunately we shipped 2.14.x without realising this. - - - - - 60334f7c by Mateusz Kowalczyk at 2014-04-03T21:19:24+01:00 Initialise some new PlatformConstants fields - - - - - ea77f668 by Mateusz Kowalczyk at 2014-04-11T16:52:23+01:00 We don't actually want unicode here - - - - - 0b651cae by Mateusz Kowalczyk at 2014-04-11T18:13:30+01:00 Parse identifiers with ^ and ⋆ in them. Fixes haskell/haddock#298. - - - - - e8ad0f5f by Mateusz Kowalczyk at 2014-04-11T18:47:41+01:00 Ignore version string during HTML tests. - - - - - de489089 by Mateusz Kowalczyk at 2014-04-11T18:59:30+01:00 Update CHANGES to follow 2.14.3 - - - - - beb464a9 by Gergő Érdi at 2014-04-13T16:31:10+08:00 remove Origin flag from LHsBindsLR - - - - - cb16f07c by Herbert Valerio Riedel at 2014-04-21T17:16:50+02:00 Replace local `die` by new `System.Exit.die` Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 9b9b23c7 by Mateusz Kowalczyk at 2014-05-03T15:40:11+02:00 Disambiguate ‘die’ in test runners. - - - - - 5d28a2b8 by Mateusz Kowalczyk at 2014-05-05T09:19:49+02:00 Prepare modules for parser split. We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type. - - - - - d3967ff3 by Mateusz Kowalczyk at 2014-05-05T11:00:41+02:00 Move parser + parser tests out to own package. We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes. - - - - - 522a448d by Mateusz Kowalczyk at 2014-05-05T11:14:47+02:00 Move out Show and Eq instances to Types They are much more useful to the users here. - - - - - 11a6f0f2 by Mateusz Kowalczyk at 2014-05-06T13:50:31+02:00 Remove no longer necessary parser error handling. We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places. - - - - - 6992c924 by Mateusz Kowalczyk at 2014-05-14T02:23:55+02:00 Please the GHC build-system. As I can not figure out how to do this properly, if we're in GHC tree, we treat the library as being the same package. If we're not in the tree, we require that the library be installed separately. - - - - - 7a8ad763 by Mateusz Kowalczyk at 2014-05-14T14:50:25+02:00 Update issue tracker URL - - - - - f616c521 by Mateusz Kowalczyk at 2014-05-14T14:53:32+02:00 Update issue tracker URL for haddock-library - - - - - 66580ded by Gergő Érdi at 2014-05-25T14:24:16+08:00 Accomodate change in PatSyn representation - - - - - 0e43b988 by Mateusz Kowalczyk at 2014-05-29T03:15:29+02:00 Revert "Accomodate change in PatSyn representation" This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this. - - - - - e10d7ec8 by Mateusz Kowalczyk at 2014-05-29T03:24:11+02:00 Revert "Revert "Accomodate change in PatSyn representation"" This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me. - - - - - 5861aca9 by Mateusz Kowalczyk at 2014-06-05T19:49:27+02:00 Clear up highlighting of identifiers with ‘'’s. - - - - - d7cc420f by Simon Peyton Jones at 2014-06-06T12:41:09+01:00 Follow change in patSynSig - - - - - 938b4fd8 by Mateusz Kowalczyk at 2014-06-12T07:24:29+02:00 Slightly update the readme. Style-sheets are no longer a recent thing, dead links, old maintainers, different formats. - - - - - c7799dea by Mateusz Kowalczyk at 2014-06-18T00:05:56+02:00 Update cabal files Update repository urls, use subdir property for haddock-library and use a separate versioning scheme for haddock-library in preparation for release. - - - - - a2750b6a by Simon Hengel at 2014-06-18T11:01:18+08:00 Compatibility with older versions of base and bytestring - - - - - 009b4b03 by Simon Hengel at 2014-06-18T11:14:01+08:00 Enable travis-ci for haddock-library - - - - - 9b5862eb by Simon Hengel at 2014-06-18T11:14:01+08:00 haddock-library: Do not depend on haddock-library in test suite I think you either add src to hs-source-dirs or the library to build-depends. But doing both does not make sense (AFAICT). - - - - - fb1f3279 by Simon Hengel at 2014-06-18T11:49:05+08:00 haddock-library: Use -Wall for specs - - - - - 649340e1 by Mateusz Kowalczyk at 2014-06-18T06:58:54+02:00 Use Travis with multiple GHC versions When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project. - - - - - d7eeeec2 by Mateusz Kowalczyk at 2014-06-18T07:49:04+02:00 Comment improvements + few words in cabal file - - - - - 0f8db914 by Simon Hengel at 2014-06-18T13:52:23+08:00 Use doctest to check examples in documentation - - - - - 2888a8dc by Simon Hengel at 2014-06-18T14:16:48+08:00 Remove doctest dependency (so that we can use haddock-library with doctest) - - - - - 626d5e85 by Mateusz Kowalczyk at 2014-06-18T08:41:25+02:00 Travis tweaks - - - - - 41d4f9cc by Mateusz Kowalczyk at 2014-06-18T08:58:43+02:00 Don't actually forget to install specified GHC. - - - - - c6aa512a by John MacFarlane at 2014-06-18T10:43:57-07:00 Removed reliance on LambdaCase (which breaks build with ghc 7.4). - - - - - b9b93b6f by John MacFarlane at 2014-06-18T10:54:56-07:00 Fixed haddock warnings. - - - - - a41b0ab5 by Mateusz Kowalczyk at 2014-06-19T01:20:10+02:00 Update Travis, bump version - - - - - 864bf62a by Mateusz Kowalczyk at 2014-06-25T10:36:54+02:00 Fix anchors. Closes haskell/haddock#308. - - - - - 53df91bb by Mateusz Kowalczyk at 2014-06-25T15:04:49+02:00 Drop DocParagraph from front of headers I can not remember why they were wrapped in paragraphs to begin with and it seems unnecessary now that I test it. Closes haskell/haddock#307. - - - - - 29b5f2fa by Mateusz Kowalczyk at 2014-06-25T15:17:20+02:00 Don't mangle append order for nested lists. The benefit of this is that the ‘top-level’ element of such lists is properly wrapped in <p> tags so any CSS working with these will be applied properly. It also just makes more sense. Pointed out at jgm/pandoc#1346. - - - - - 05cb6e9c by Mateusz Kowalczyk at 2014-06-25T15:19:45+02:00 Bump haddock-library to 1.1.0 for release - - - - - 70feab15 by Iavor Diatchki at 2014-07-01T03:37:07-07:00 Propagate overloading-mode for instance declarations in haddock (#9242) - - - - - d4ca34a7 by Simon Peyton Jones at 2014-07-14T16:23:15+01:00 Adapt to new definition of HsDecls.TyFamEqn This is a knock-on from the refactoring from Trac haskell/haddock#9063. I'll push the corresponding changes to GHC shortly. - - - - - f91e2276 by Edward Z. Yang at 2014-07-21T08:14:19-07:00 Track GHC PackageId to PackageKey renaming. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - b010f9ef by Edward Z. Yang at 2014-07-25T16:28:46-07:00 Track changes for module reexports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - 8b85f9f9 by Mateusz Kowalczyk at 2014-07-28T13:25:43+02:00 Catch mid-line URLs. Fixes haskell/haddock#314. - - - - - 4c613a78 by Edward Z. Yang at 2014-08-05T03:11:00-07:00 Track type signature change of lookupModuleInAllPackages Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - e80b051c by Edward Z. Yang at 2014-08-05T17:34:26+01:00 If GhcProfiled, also build Haddock profiled. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f9cccd29 by Edward Z. Yang at 2014-08-07T14:23:35+01:00 Ignore TAGS files. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 00b3af52 by Mateusz Kowalczyk at 2014-08-08T04:58:19+02:00 Update to attoparsec-0.12.1.1 There seems to be memory and speed improvement. - - - - - 5457dc71 by Mateusz Kowalczyk at 2014-08-08T18:24:02+02:00 Fix forgotten src - - - - - 3520cb04 by Mateusz Kowalczyk at 2014-08-14T20:19:07+01:00 Bump down the version for master to 2.14.4 - - - - - dc98c21b by Mateusz Kowalczyk at 2014-08-14T20:23:27+01:00 Revert "Track type signature change of lookupModuleInAllPackages" This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f. - - - - - 3f2038c0 by Mateusz Kowalczyk at 2014-08-14T20:23:31+01:00 Revert "Track changes for module reexports." This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d. - - - - - 56d4e49e by Mateusz Kowalczyk at 2014-08-14T20:23:42+01:00 Revert "Track GHC PackageId to PackageKey renaming." This reverts commit 8ac42d3327473939c013551750425cac191ff0fd. - - - - - 726ea3cb by Mateusz Kowalczyk at 2014-08-14T20:23:47+01:00 Revert "Adapt to new definition of HsDecls.TyFamEqn" This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd. - - - - - 61a88ff0 by Mateusz Kowalczyk at 2014-08-14T20:23:52+01:00 Revert "Propagate overloading-mode for instance declarations in haddock (#9242)" This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c. - - - - - a32ba674 by Mateusz Kowalczyk at 2014-08-14T20:26:03+01:00 Revert "Disambiguate ‘die’ in test runners." This reverts commit dba02d6df32534aac5d257f2d28596238d248942. - - - - - f335820f by Mateusz Kowalczyk at 2014-08-14T20:26:09+01:00 Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. - - - - - 107078e4 by Mateusz Kowalczyk at 2014-08-14T20:27:34+01:00 Merge branch 'reverts' This reverts any changes that were made to have Haddock compile with 7.9. When 7.10 release comes, we can simply re-apply all the patches and any patches that occur on ghc-head branch from now on. This allows us to build master with 7.8.3 - - - - - b44b3871 by Mateusz Kowalczyk at 2014-08-15T02:47:40+01:00 Fix haskell/haddock#313 by doing some list munging. I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly. - - - - - e1a62cde by Mateusz Kowalczyk at 2014-08-15T02:52:56+01:00 Stop testing haskell/haddock#188. Because the change is in GHC 7.9 and we now work against 7.8.3, this test no longer makes sense. We revert it until 7.10 becomes the standard version. If anything, there should be a test for this in GHC itself. - - - - - 54e8286d by Mateusz Kowalczyk at 2014-08-15T05:31:57+01:00 Add haskell/haddock#313 to CHANGES - - - - - 9df7ad5d by Simon Hengel at 2014-08-20T11:25:32+08:00 Fix warning - - - - - ee2574d6 by Simon Hengel at 2014-08-20T12:07:01+08:00 Fix travis builds - - - - - 384cf2e6 by Simon Hengel at 2014-08-20T12:14:31+08:00 Require GHC 7.8.3 - - - - - d4779863 by Simon Hengel at 2014-08-22T12:14:16+08:00 Move Haddock API to a separate package - - - - - 80f3e0e1 by Simon Hengel at 2014-08-22T14:57:38+08:00 Bump version to 2.15.0 and add version constraints - - - - - 309a94ce by Simon Hengel at 2014-08-22T15:18:06+08:00 Add deprecated compatibility module - - - - - 4d1e4e3f by Luite Stegeman at 2014-08-22T20:46:45+02:00 export things to allow customizing how the Ghc session is run - - - - - 47884591 by Luite Stegeman at 2014-08-22T20:46:51+02:00 ghc 7.8.2 compatibility - - - - - 5ea94e2c by Luite Stegeman at 2014-08-22T22:08:58+02:00 install dependencies for haddock-api on travis - - - - - 9fb845b2 by Mateusz Kowalczyk at 2014-08-23T10:09:34+01:00 Move sources under haddock-api/src - - - - - 85817dc4 by Mateusz Kowalczyk at 2014-08-23T10:10:48+01:00 Remove compat stuff - - - - - 151c6169 by Niklas Haas at 2014-08-24T08:14:10+02:00 Fix extra whitespace on signatures and update all test cases This was long overdue, now running ./accept.lhs on a clean test from master will not generate a bunch of changes. - - - - - d320e0d2 by Niklas Haas at 2014-08-24T08:14:35+02:00 Omit unnecessary foralls and fix haskell/haddock#315 This also fixes haskell/haddock#86. - - - - - bdafe108 by Mateusz Kowalczyk at 2014-08-24T15:06:46+01:00 Update CHANGES - - - - - fafa6d6e by Mateusz Kowalczyk at 2014-08-24T15:14:23+01:00 Delete few unused/irrelevant/badly-place files. - - - - - 3634923d by Duncan Coutts at 2014-08-27T13:49:31+01:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. - - - - - 539a7e70 by Herbert Valerio Riedel at 2014-08-31T11:36:32+02:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 9e3a0e5b by Mateusz Kowalczyk at 2014-08-31T12:54:43+01:00 Bump version in doc - - - - - 4a177525 by Mateusz Kowalczyk at 2014-08-31T13:01:23+01:00 Bump haddock-library version - - - - - f99c1384 by Mateusz Kowalczyk at 2014-08-31T13:05:25+01:00 Remove references to deleted files - - - - - 5e51a247 by Mateusz Kowalczyk at 2014-08-31T14:18:44+01:00 Make the doc parser not complain - - - - - 2cedb49a by Mateusz Kowalczyk at 2014-09-03T03:33:15+01:00 CONTRIBUTING file for issues - - - - - 88027143 by Mateusz Kowalczyk at 2014-09-04T00:46:59+01:00 Mention --print-missing-docs - - - - - 42f6754f by Alan Zimmerman at 2014-09-05T18:13:24-05:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e712719e by Austin Seipp at 2014-09-09T01:03:27-05:00 Fix import of 'empty' due to AMP. Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 71c29755 by Herbert Valerio Riedel at 2014-09-09T17:35:20+02:00 Bump `base` constraint for AMP - - - - - 0bf9f3ed by Mateusz Kowalczyk at 2014-09-12T19:18:32+01:00 Delete stale ANNOUNCE - - - - - cac89ee6 by Krzysztof Gogolewski at 2014-09-14T17:17:09+02:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 4d683426 by Edward Z. Yang at 2014-09-18T13:38:11-07:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 80697fd5 by Herbert Valerio Riedel at 2014-09-19T00:07:52+02:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. - - - - - c015eb70 by Herbert Valerio Riedel at 2014-09-19T00:10:36+02:00 Revert "Followup changes to addition of -fwarn-context-quantification" This reverts commit 4023817d7c0e46db012ba2eea28022626841ca9b temporarily as the respective feature hasn't landed in GHC HEAD yet, but this commit blocks later commits from being referenced in GHC HEAD. - - - - - 38ded784 by Edward Z. Yang at 2014-09-18T15:32:15-07:00 Revert "Revert "Followup changes to addition of -fwarn-context-quantification"" This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now. - - - - - f55d59c9 by Herbert Valerio Riedel at 2014-09-26T19:18:28+02:00 Revert "Fix import of 'empty' due to AMP." This reverts commit 0cc5bc85e9fca92ab712b68a2ba2c0dd9d3d79f4 since it turns out we don't need to re-export `empty` from Control.Monad after all. - - - - - 467050f1 by David Feuer at 2014-10-09T20:07:36-04:00 Fix improper lazy IO use Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. - - - - - cc47b699 by Edward Z. Yang at 2014-10-09T21:38:19-07:00 Fix use-after-close lazy IO bug Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. Signed-off-by: David Feuer <David.Feuer at gmail.com> Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 87babcbe by Austin Seipp at 2014-10-20T20:05:27-05:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - ab259516 by Austin Seipp at 2014-10-20T20:07:01-05:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - b918093c by Mateusz Kowalczyk at 2014-10-29T03:59:39+00:00 Experimental support for collapsable headers Closes haskell/haddock#335 - - - - - 849db129 by Mateusz Kowalczyk at 2014-10-29T10:07:26+01:00 Experimental support for collapsable headers (cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc) - - - - - a4cc4789 by Herbert Valerio Riedel at 2014-10-31T11:08:26+01:00 Collapse user-defined section by default (re haskell/haddock#335) - - - - - 9da1b33e by Yuras Shumovich at 2014-10-31T16:11:04-05:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - c625aefc by Austin Seipp at 2014-10-31T19:34:10-05:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - c7738e5e by Simon Hengel at 2014-11-02T07:25:30+08:00 Remove -fobject-code from .ghci (this slows down reloads on modifications) - - - - - d4a86e95 by Simon Hengel at 2014-11-03T09:26:11+08:00 Get rid of StandaloneDeriving - - - - - a974e311 by Simon Hengel at 2014-11-03T09:26:11+08:00 Derive more instances - - - - - 8aa0c4d7 by Simon Hengel at 2014-11-03T09:27:08+08:00 Remove unused language extensions - - - - - 3052d46a by Simon Hengel at 2014-11-03T09:30:46+08:00 Minor refactoring - - - - - 4281d3cb by Simon Hengel at 2014-11-03T09:30:46+08:00 parser: Try to parse definition lists right before text paragraphs - - - - - 8ba12bf9 by Simon Hengel at 2014-11-03T09:34:19+08:00 Add support for markdown links (closes haskell/haddock#336) - - - - - a2f8d747 by Simon Hengel at 2014-11-03T09:34:19+08:00 Allow markdown links at the beginning of a paragraph - - - - - 53b11207 by Simon Hengel at 2014-11-03T09:34:20+08:00 Update documentation - - - - - 652267c6 by Simon Hengel at 2014-11-03T09:34:20+08:00 Add support for markdown images - - - - - 9d667502 by Simon Hengel at 2014-11-03T09:34:20+08:00 Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. - - - - - 8167fc32 by Mateusz Kowalczyk at 2014-11-04T01:16:51+00:00 whitespace only - - - - - 3da62981 by Mateusz Kowalczyk at 2014-11-04T01:17:31+00:00 Fix re-exports of built-in type families Fixes haskell/haddock#310 - - - - - edc76b34 by Mateusz Kowalczyk at 2014-11-04T02:54:28+00:00 Turn some uses of error into recoverable warnings This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end. - - - - - 0a137400 by Mateusz Kowalczyk at 2014-11-04T04:09:44+00:00 Fix warnings - - - - - d068fc21 by Mateusz Kowalczyk at 2014-11-04T21:04:07+00:00 Fix parsing of identifiers written in infix way - - - - - 1a9f2f3d by Simon Hengel at 2014-11-08T11:32:42+08:00 Minor code simplification - - - - - 6475e9b1 by Simon Hengel at 2014-11-08T17:28:33+08:00 newtype-wrap parser monad - - - - - dc1ea105 by Herbert Valerio Riedel at 2014-11-15T11:55:43+01:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - fbb1aca4 by Simon Hengel at 2014-11-16T08:51:38+08:00 State intention rather than implementation details in Haddock comment - - - - - 97851ab2 by Simon Hengel at 2014-11-16T10:20:19+08:00 (wip) Add support for @since (closes haskell/haddock#26) - - - - - 34bcd18e by Gergő Érdi at 2014-11-20T22:35:38+08:00 Update Haddock to new pattern synonym type signature syntax - - - - - 304b7dc3 by Jan Stolarek at 2014-11-20T17:48:43+01:00 Follow changes from haskell/haddock#9812 - - - - - 920f9b03 by Richard Eisenberg at 2014-11-20T16:52:50-05:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 0bfe4e78 by Alan Zimmerman at 2014-11-21T11:23:09-06:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 356ed45a by Thomas Winant at 2014-11-28T16:11:22-06:00 Support for PartialTypeSignatures - - - - - 5dc8f3b1 by Gergő Érdi at 2014-11-29T15:39:09+08:00 For pattern synonyms, render "pattern" as a keyword - - - - - fe704480 by Mateusz Kowalczyk at 2014-12-09T03:38:32+00:00 List new module in cabal file - - - - - b9ad5a29 by Mateusz Kowalczyk at 2014-12-10T00:58:24+00:00 Allow the parser to spit out meta-info Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes haskell/haddock#26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves. - - - - - 765af0e3 by Mateusz Kowalczyk at 2014-12-10T01:17:19+00:00 Update doctest parts of comments - - - - - 8670272b by jpmoresmau at 2014-12-10T01:35:31+00:00 header could contain several lines Closes haskell/haddock#348 - - - - - 4f9ae4f3 by Mateusz Kowalczyk at 2014-12-12T06:22:31+00:00 Revert "Merge branch 'reverts'" This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - e974ac94 by Duncan Coutts at 2014-12-12T06:26:11+00:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. Conflicts: haddock-api/src/Haddock.hs - - - - - 2f3a2365 by Herbert Valerio Riedel at 2014-12-12T06:26:51+00:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 1dbd6390 by Alan Zimmerman at 2014-12-12T06:32:07+00:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - bb6ff1f4 by Mateusz Kowalczyk at 2014-12-12T06:35:07+00:00 Bump ‘base’ constraint Follows the similar commit made on ghc-head branch - - - - - 466fe4ab by Krzysztof Gogolewski at 2014-12-12T06:37:42+00:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 97e080c9 by Edward Z. Yang at 2014-12-12T06:39:35+00:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs - - - - - 20b2af56 by Herbert Valerio Riedel at 2014-12-12T06:42:50+00:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. Conflicts: haddock-library/src/Documentation/Haddock/Parser.hs - - - - - b3ad269d by Austin Seipp at 2014-12-12T06:44:14+00:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 072df0dd by Austin Seipp at 2014-12-12T06:45:01+00:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - dbb9294a by Herbert Valerio Riedel at 2014-12-12T06:46:17+00:00 Collapse user-defined section by default (re haskell/haddock#335) Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - - - - - f23ab545 by Yuras Shumovich at 2014-12-12T06:46:41+00:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - 753a4b67 by Austin Seipp at 2014-12-12T06:46:51+00:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8954e8f5 by Herbert Valerio Riedel at 2014-12-12T06:50:53+00:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - d2b06d61 by Gergő Érdi at 2014-12-12T07:07:30+00:00 Update Haddock to new pattern synonym type signature syntax Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 1ff02426 by Jan Stolarek at 2014-12-12T07:13:24+00:00 Follow changes from haskell/haddock#9812 Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - 06ad7600 by Richard Eisenberg at 2014-12-12T07:13:43+00:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 8fd2aa8b by Alan Zimmerman at 2014-12-12T07:22:25+00:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Backends/LaTeX.hs haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 95c3db98 by Thomas Winant at 2014-12-12T07:35:49+00:00 Support for PartialTypeSignatures Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs haddock-api/src/Haddock/Interface/Create.hs - - - - - 45494428 by Gergő Érdi at 2014-12-12T07:36:18+00:00 For pattern synonyms, render "pattern" as a keyword - - - - - a237e3eb by Mateusz Kowalczyk at 2014-12-12T12:27:13+00:00 Various fixups and bumps for next release - - - - - 22918bcd by Herbert Valerio Riedel at 2014-12-14T10:11:47+01:00 Remove redundant wild-card pattern match (this would otherwise cause a build-failure with `-Werror`) - - - - - 1d6ce947 by Herbert Valerio Riedel at 2014-12-14T10:17:06+01:00 Treat GHC 7.10 the same as GHC 7.9 ...since the current GHC 7.9 is going to become GHC 7.10 real-soon-now anyway - - - - - f434ea89 by Herbert Valerio Riedel at 2014-12-14T18:26:50+01:00 Fixup ghc.mk (follow-up to 1739375eb23342) This makes the GHC build-system aware of the data-files to be copied into the bindist (as haddock.cabal doesn't list those anymore) - - - - - 6fb839eb by Mateusz Kowalczyk at 2014-12-17T09:28:59+00:00 Only keep one Version instead of blindly appending - - - - - 40645489 by Mateusz Kowalczyk at 2014-12-18T07:09:44+00:00 Fix dependency version - - - - - 8b3b927b by Mateusz Kowalczyk at 2014-12-18T07:14:23+00:00 Print missing docs by default Adds --no-print-missing-docs - - - - - 59666694 by Mateusz Kowalczyk at 2014-12-18T07:21:37+00:00 update changelog - - - - - aa6d168e by Mateusz Kowalczyk at 2014-12-18T07:30:58+00:00 Update docs for @since - - - - - 2d7043ee by Luite Stegeman at 2014-12-19T18:29:35-06:00 hide projectVersion from DynFlags since it clashes with Haddock.Version.projectVersion - - - - - aaa70fc0 by Luite Stegeman at 2014-12-22T15:58:43+01:00 Add missing import for standalone haddock-api package - - - - - 9ce01269 by Herbert Valerio Riedel at 2014-12-22T17:48:45+01:00 Reset ghc-head with master's tree (this is an overwriting git merge of master into ghc-head) - - - - - fcd6fec1 by Herbert Valerio Riedel at 2014-12-22T17:51:52+01:00 Bump versions for ghc-7.11 - - - - - 525ec900 by Mateusz Kowalczyk at 2014-12-23T13:36:24+00:00 travis-ci: test with HEAD - - - - - cbf494b5 by Simon Peyton Jones at 2014-12-23T15:22:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 50e01c99 by Mateusz Kowalczyk at 2014-12-29T15:28:47+00:00 Make travis use 7.10.x - - - - - 475e60b0 by Njagi Mwaniki at 2014-12-29T15:30:44+00:00 Turn the README into GitHub Markdown format. Closes haskell/haddock#354 - - - - - 8cacf48e by Luite Stegeman at 2015-01-05T16:25:37+01:00 bump haddock-api ghc dependency to allow release candidate and first release - - - - - 6ed6cf1f by Simon Peyton Jones at 2015-01-06T16:37:47+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 8b484f33 by Simon Peyton Jones at 2015-01-08T15:50:22+00:00 Track naming change in DataCon - - - - - 23c5c0b5 by Alan Zimmerman at 2015-01-16T10:15:11-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e7a5532c by JP Moresmau at 2015-01-22T17:19:03+00:00 Ignore warnings, install Cabal 1.22 - - - - - 86942c84 by jpmoresmau at 2015-01-22T17:19:04+00:00 solve dataDir ambiguity - - - - - 5ceb743e by jpmoresmau at 2015-01-22T19:17:32+00:00 support GHC 7.10: no Safe-Inferred, Foldable instance - - - - - 6a3b3fb5 by Mateusz Kowalczyk at 2015-01-22T19:32:10+00:00 Update test files Test: a correct behaviour for fields comma-separating values. I'm surprised we had no bug open for this. Maybe it affects how haskell/haddock#301 renders now but I doubt. Operators: Seems GHC is giving us a new order for operators, something must have changed on their side again. cc @haasn , this makes the fixity to the side not match the order on the LHS which is a bit unpleasant. Maybe the fixity can be made to match the GHC order? Bug335: We expand examples by default now. Bug310: Now inferred safe. - - - - - 708f8b2f by jpmoresmau at 2015-01-22T19:36:59+00:00 Links to source location of class instance definitions - - - - - 5cf8a6da by Vincent Berthoux at 2015-01-22T19:59:58+00:00 Filter '\r' from comments due to Windows problems. On Windows this was causing newline to be rendered twice in code blocks. Closes haskell/haddock#359, fixes haskell/haddock#356. - - - - - 1749e6f0 by Mateusz Kowalczyk at 2015-01-22T20:31:27+00:00 Changelog only - - - - - c8145f90 by Mateusz Kowalczyk at 2015-01-22T23:34:05+00:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. - - - - - 14248254 by Mateusz Kowalczyk at 2015-01-22T23:43:18+00:00 Sort out some module import warnings - - - - - d8a38989 by Simon Peyton Jones at 2015-01-23T07:10:16-06:00 Track naming change in DataCon (cherry picked from commit 04cf63d0195837ed52075ed7d2676e71831e8a0b) - - - - - d3ac6ae4 by Alan Zimmerman at 2015-01-23T07:17:19-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit d61bbc75890e4eb0ad508b9c2a27b91f691213e6) - - - - - 4c1ffeb0 by Simon Peyton Jones at 2015-02-10T12:10:33+00:00 Track changes in HsSyn for quasi-quotes - - - - - 775d20f7 by Mateusz Kowalczyk at 2015-03-15T08:11:48+01:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. (cherry picked from commit 8e06728afb0784128ab2df0be7a5d7a191d30ff4) - - - - - f9245e72 by Phil Ruffwind at 2015-03-16T04:32:01-04:00 Prevent Synopsis from using up too much horizontal space When long type signatures occur in the Synopsis, the element is stretched beyond the width of the window. Scrollbars don't appear, so it's impossible to read anything when this happens. - - - - - cd8fa415 by Mateusz Kowalczyk at 2015-03-17T21:59:39+00:00 Update changelog Closes haskell/haddock#151 due to 71170fc77962f10d7d001e3b8bc8b92bfeda99bc - - - - - b5248b47 by Ben Gamari at 2015-03-25T17:12:17+00:00 Make the error encountered when a package can't be found more user-friendly Closes haskell/haddock#369 - - - - - b756b772 by Mateusz Kowalczyk at 2015-03-26T16:31:40+00:00 Remove now redundant imports - - - - - 5ea5e8dd by Mateusz Kowalczyk at 2015-03-26T16:45:52+00:00 Update test to account for \r filtering - - - - - 6539bfb3 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Test for anchor defaulting I delete the old tests because it turns out that: * test runner would never put them in scope of each other even with imports so just one would suffice * test runner actually needed some hacking to keep links so in the end we would end up with no anchors making them useless - - - - - 1a01d950 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Clearly default to variables in out of scope case - - - - - 7943abe8 by Mateusz Kowalczyk at 2015-03-27T01:14:11+00:00 Fix Hoogle display of constructors Fixes haskell/haddock#361 - - - - - 6d6e587e by Mateusz Kowalczyk at 2015-03-27T01:45:18+00:00 Fully qualify names in Hoogle instances output Closes haskell/haddock#263 - - - - - 52dac365 by Mateusz Kowalczyk at 2015-03-27T01:55:01+00:00 Update changelog - - - - - ca5af9a8 by Mateusz Kowalczyk at 2015-03-27T02:43:55+00:00 Output method documentation in Hoogle backend One thing of note is that we no longer preserve grouping of methods and print each method on its own line. We could preserve it if no documentation is present for any methods in the group if someone asks for it though. Fixes haskell/haddock#259 - - - - - a33f0c10 by Mateusz Kowalczyk at 2015-03-27T03:04:21+00:00 Don't print instance safety information in Hoogle Fixes haskell/haddock#168 - - - - - df6c935a by Mateusz Kowalczyk at 2015-03-28T00:11:47+00:00 Post-release version bumps and changelog - - - - - dde8f7c0 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Loosen bounds on haddock-* - - - - - de93bf89 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Expand response files in arguments Closes haskell/haddock#285 - - - - - 1f0b0856 by Zejun Wu at 2015-04-26T16:35:35-07:00 Do not insert anchor for section headings in contents box - - - - - 860439d7 by Simon Peyton Jones at 2015-05-01T09:36:47+01:00 Track change in API of TyCon - - - - - a32f3e5f by Adam Gundry at 2015-05-04T15:32:59+01:00 Track API changes to support empty closed type familes - - - - - 77e98bee by Ben Gamari at 2015-05-06T20:17:08+01:00 Ignore doc/haddock.{ps,pdf} - - - - - 663d0204 by Murray Campbell at 2015-05-11T04:47:37-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8bb0dcf5 by Murray Campbell at 2015-05-11T06:35:06-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit 2380f07c430c525b205ce2eae6dab23c8388d899) - - - - - bad900ea by Adam Bergmark at 2015-05-11T15:29:39+01:00 haddock-library: require GHC >= 7.4 `Data.Monoid.<>` was added in base-4.5/GHC-7.4 Closes haskell/haddock#394 Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - daceff85 by Simon Peyton Jones at 2015-05-13T12:04:21+01:00 Track the new location of setRdrNameSpace - - - - - 1937d1c4 by Alan Zimmerman at 2015-05-25T21:27:15+02:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - ee0fb6c2 by Łukasz Hanuszczak at 2015-05-27T11:51:31+02:00 Create simple method for indentation parsing. - - - - - 7d6fcad5 by Łukasz Hanuszczak at 2015-05-27T21:36:13+02:00 Make nested lists count indentation according to first item. - - - - - d6819398 by Łukasz Hanuszczak at 2015-05-27T22:46:13+02:00 Add simple test case for arbitrary-depth list nesting. - - - - - 2929c54d by Łukasz Hanuszczak at 2015-06-03T02:11:31+02:00 Add arbitrary-indent spec test for parser. - - - - - 9a0a9bb0 by Mateusz Kowalczyk at 2015-06-03T05:25:29+01:00 Update docs with info on new list nesting rule Fixes haskell/haddock#278 through commits from PR haskell/haddock#401 - - - - - 12efc92c by Mateusz Kowalczyk at 2015-06-03T05:29:26+01:00 Update some meta data at the top of the docs - - - - - 765ee49f by Bartosz Nitka at 2015-06-07T08:40:59-07:00 Add some Hacking docs for getting started - - - - - 19aaf851 by Bartosz Nitka at 2015-06-07T08:44:30-07:00 Fix markdown - - - - - 2a90cb70 by Mateusz Kowalczyk at 2015-06-08T15:08:36+01:00 Refine hacking instructions slightly - - - - - 0894da6e by Thomas Winant at 2015-06-08T23:47:28-05:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 10a9bb76 by Emanuel Borsboom at 2015-06-12T02:46:23+01:00 Build executable with '-threaded' (fixes haskell/haddock#399) - - - - - 7696b94f by Mateusz Kowalczyk at 2015-06-12T02:59:19+01:00 Update changelog for -threaded Closes haskell/haddock#400 - - - - - d3c118ec by Bartosz Nitka at 2015-06-12T03:00:58+01:00 Fix haddock: internal error: spliceURL UnhelpfulSpan (#207) Inferred type signatures don't have SrcSpans, so let's use the one from the declaration. I've tested this manually on the test-case from haskell/haddock#207, but I got stuck at trying to run the test-suite. - - - - - b67e843b by Mateusz Kowalczyk at 2015-06-12T03:01:50+01:00 Changelog for haskell/haddock#207 Fixes haskell/haddock#207, closes haskell/haddock#402 - - - - - 841d785e by jpmoresmau at 2015-06-12T16:03:16+01:00 Attach to instance location the name that has the same location file Fixes haskell/haddock#383 - - - - - 98791cae by Mateusz Kowalczyk at 2015-06-12T16:08:27+01:00 Update changelog Closes haskell/haddock#398 - - - - - 7c0b5a87 by Phil Ruffwind at 2015-06-12T13:07:25-04:00 Fix alignment of Source links in instance table in Firefox Due to a Firefox bug [1], a combination of 'whitespace: nowrap' on the parent element with 'float: right' on the inner element can cause the floated element to be displaced downwards for no apparent reason. To work around this, the left side is wrapped in its own <span> and set to 'float: left'. As a precautionary measure to prevent the parent element from collapsing entirely, we also add the classic "clearfix" hack. The latter is not strictly needed but it helps prevent bugs if the layout is altered again in the future. Fixes haskell/haddock#384. Remark: line 159 of src/Haddock/Backends/Xhtml/Layout.hs was indented to prevent confusion over the operator precedence of (<+>) vs (<<). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=488725 - - - - - cfe86e73 by Mateusz Kowalczyk at 2015-06-14T10:49:01+01:00 Update tests for the CSS changes - - - - - 2d4983c1 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding for Haskell source parser module. - - - - - 29548785 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement function for tagging parsed chunks with source spans. - - - - - 6a5e4074 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement simple string chunking based on HsColour library. - - - - - 6e52291f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create basic token classification method. - - - - - da971a27 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Adapt source span tagging to work with current whitespace handling. - - - - - 4feb5a22 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add record accessors to exports of hyperlinker parser module. - - - - - a8cc4e39 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Make parser module export all types and associated accessors. - - - - - fb8d468f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple HTML renderer for parsed source file. - - - - - 80747822 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for specifying the CSS file path in HTML source renderer. - - - - - 994dc1f5 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix identifier recognition in Haskell source parser. - - - - - b1bd0430 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix comment recognition in Haskell source parser. - - - - - 11db85ae by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for recognizing compiler pragmas in source parser. - - - - - 736c7bd3 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding of module for associating tokens with AST names. - - - - - 7e149bc2 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement utility method for extracting variable identifiers from AST. - - - - - 32eb640a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple mechanism for associating tokens with AST names. - - - - - d4eba5bc by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add dummy support for hyperlinking named tokens. - - - - - 2b76141f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matcher bug causing wrong items being hyperlinked. - - - - - 2d48002e by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Constrain elements exported by hyperlinker modules. - - - - - 9715eec6 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for type token recognition. - - - - - 8fa401cb by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for binding token recognition. - - - - - d062400b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement go-to-definition mechanism for local bindings. - - - - - f4dc229b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement module export- and import-list item hyperlinking. - - - - - c9a46d58 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matching to allow parenthesized operators hyperlinking. - - - - - 03aad95a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix weird hyperlinking of parenthesized operators. - - - - - b4694a7d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for type declaration anchors. - - - - - 7358d2d2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for top-level function declaration anchors. - - - - - dfc24b24 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix external anchors to contain HTML file extension. - - - - - a045926c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Refactor the way AST names are handled within detailed tokens. - - - - - c76049b4 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement hyperlinking of imported module names. - - - - - 2d2a1572 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix parsing of single line comments with broken up newlines. - - - - - 11afdcf2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix bug with improper newline handling. - - - - - 8137f104 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issues with escaped newlines in comments. - - - - - 34759b19 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for parsing C preprocessor macros. - - - - - 09f0f847 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for parser module of source hyperlinker. - - - - - 709a8389 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for AST module of source hyperlinker. - - - - - 4df5c227 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add command line option for generating hyperlinked source. - - - - - 7a755ea2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Extend module interface with rich source token stream field. - - - - - 494f4ab1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement source tokenization during interface creation process. - - - - - 5f21c953 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create hyperlinker module and plug it into the Haddock pipeline. - - - - - 0cc8a216 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for providing custom CSS files for hyperlinked source. - - - - - a32bbdc1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for fancy highlighting upon hovering over identifier. - - - - - d16d642a by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make source hyperlinker generate output in apropriate directory. - - - - - ae12953d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create module with hyperlinker utility functions. - - - - - 6d4952c5 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make external hyperlinks point to locations specified by source URLs. - - - - - 8417555d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Rewrite source generation to fixed links and directory structure. - - - - - ce9cec01 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add basic support for cross-package hyperlink generation. - - - - - 7eaf025c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Disable generating hyperlinks for module references. - - - - - a50bf92e by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make Haddock generate source for all interfaces (also hidden ones). - - - - - f5ae2838 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Prevent source parser from throwing exception when lexing fails. - - - - - db9ffbe0 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement workaround for Chrome highlighting issues. - - - - - 0b6b453b by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate correct anchors for data constructors. - - - - - c86d38bc by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate anchors for record field declarations. - - - - - 063abf7f by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issue with hyperlink highlight styling in Chrome browser. - - - - - 880fc611 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking constructor names in patters. - - - - - c9e89b95 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record patterns. - - - - - 17a11996 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record expressions. - - - - - 0eef932d by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Make hyperlinker respect pretty-printer flag and add documentation. - - - - - f87c1776 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Unexpose hyperlinker modules in Cabal configuration. - - - - - 4c9e2b06 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Setup HSpec framework for Haddock API package. - - - - - 4b20cb30 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add basic tests related to comment parsing. - - - - - 6842e919 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add tests related to parsing basic language constructs. - - - - - 87bffb35 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add simple tests for do-notation parsing. - - - - - e7af1841 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add very simple QuickCheck properties for source parser spec. - - - - - c84efcf1 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Create simple test runner for hyperlinker tests. - - - - - 76b90447 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for basic identifier hyperlinking. - - - - - 0fbf4df6 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for operator hyperlinking. - - - - - 731aa039 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for constructor hyperlinking. - - - - - 995a78a2 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for record expressions and patterns hyperlinking. - - - - - 3566875a by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for literal syntax highlighting. - - - - - 68469a35 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add hyperlinker test runner to .cabal and .gitignore files. - - - - - aa946c93 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Adapt hyperlinker test runner to have the same interface as HTML one. - - - - - ce34da16 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Fix hyperlinker test runner file paths and add pretty-printing option. - - - - - 0d7dd65e by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add reference files for hyperlinker test cases. - - - - - efa4a1e0 by Łukasz Hanuszczak at 2015-07-01T00:47:32+02:00 Make hyperlinker test runner strip local links from generated source. - - - - - 3e96e584 by Łukasz Hanuszczak at 2015-07-01T01:14:59+02:00 Create simple script for accepting hyperlinker test case references. - - - - - 526fe610 by Łukasz Hanuszczak at 2015-07-01T01:16:41+02:00 Re-accept hyperlinker test cases with local references stripped out. - - - - - 892e2cb3 by Łukasz Hanuszczak at 2015-07-01T01:22:09+02:00 Fix bug with diffing wrong files in hyperlinker test runner. - - - - - 9ff46039 by Łukasz Hanuszczak at 2015-07-01T18:04:46+02:00 Remove unused dependencies in Haddock API spec configuration. - - - - - 47969c07 by Łukasz Hanuszczak at 2015-07-01T18:32:19+02:00 Add support for hyperlinking synonyms in patterns. - - - - - a73449e0 by Łukasz Hanuszczak at 2015-07-01T18:33:44+02:00 Create test case for hyperlinking @-patterns. - - - - - c2077ed8 by Łukasz Hanuszczak at 2015-07-01T19:06:04+02:00 Add support for hyperlinking universally quantified type variables. - - - - - 68017342 by Łukasz Hanuszczak at 2015-07-01T19:28:32+02:00 Create hyperlinker test case with quantified type variables. - - - - - 51c01a78 by Łukasz Hanuszczak at 2015-07-01T19:34:22+02:00 Add scoped type variables test for polymorphism test case. - - - - - 13181ae2 by Łukasz Hanuszczak at 2015-07-01T19:56:27+02:00 Add record wildcards test for records hyperlinking test case. - - - - - 991b81dd by Łukasz Hanuszczak at 2015-07-01T21:01:42+02:00 Document some functions in XHTML utlity module. - - - - - 98c8dfe5 by Łukasz Hanuszczak at 2015-07-01T22:25:21+02:00 Make hyperlinker render qualified names as one entity. - - - - - 75e13b9b by Łukasz Hanuszczak at 2015-07-01T22:27:38+02:00 Add qualified name test for identifiers hyperlinking test case. - - - - - de1e143f by Łukasz Hanuszczak at 2015-07-02T12:32:59+02:00 Fix crash happening when hyperlinking type family declarations. - - - - - 7a8fb175 by Łukasz Hanuszczak at 2015-07-02T12:47:03+02:00 Add support for anchoring data family constructor declarations. - - - - - 3b404e49 by Łukasz Hanuszczak at 2015-07-02T13:31:05+02:00 Improve support for hyperlinking type families. - - - - - 59eb7143 by Łukasz Hanuszczak at 2015-07-02T13:33:34+02:00 Add hyperlinker test case for checking type and type family declarations. - - - - - d1cda0c0 by Łukasz Hanuszczak at 2015-07-02T13:41:38+02:00 Fix issue with operators being recognized as preprocessor directives. - - - - - da206c9d by Łukasz Hanuszczak at 2015-07-02T17:18:12+02:00 Fix broken tests for parsing and hyperlinking hash operators. - - - - - 53750d1b by Łukasz Hanuszczak at 2015-07-02T18:53:28+02:00 Add support for anchoring signatures in type class declarations. - - - - - 1fa5bb10 by Łukasz Hanuszczak at 2015-07-02T19:04:47+02:00 Make hyperlinker generate anchors only to top-level value bindings. - - - - - a542305c by Łukasz Hanuszczak at 2015-07-02T19:05:58+02:00 Create hyperlinker test case for type classes. - - - - - b0dd4581 by Łukasz Hanuszczak at 2015-07-04T16:28:26+02:00 Update docs with information about source hyperlinking. - - - - - 9795302a by Łukasz Hanuszczak at 2015-07-04T16:52:15+02:00 Update docs on using `--read-interface` option. - - - - - 9acdc002 by Łukasz Hanuszczak at 2015-07-04T17:15:26+02:00 Remove potentially dangerous record access in hyperlinker AST module. - - - - - fb3ab7be by Łukasz Hanuszczak at 2015-07-04T17:40:10+02:00 Make Haddock generate warnings about potential misuse of hyperlinker. - - - - - a324c504 by Łukasz Hanuszczak at 2015-07-04T17:43:22+02:00 Fix incorrect specification of source style option in doc file. - - - - - 3f01a8e4 by Łukasz Hanuszczak at 2015-07-05T17:06:36+02:00 Refactor source path mapping to use modules as indices. - - - - - ac70f5b1 by Łukasz Hanuszczak at 2015-07-05T17:47:34+02:00 Fix bug where not all module interfaces were added to source mapping. - - - - - f5e57da9 by Łukasz Hanuszczak at 2015-07-06T16:39:57+02:00 Extract main hyperlinker types to separate module. - - - - - 43974905 by Łukasz Hanuszczak at 2015-07-06T16:52:13+02:00 Move source paths types to hyperlinker types module. - - - - - 3e236055 by Łukasz Hanuszczak at 2015-07-06T17:06:19+02:00 Add support for hyperlinking modules in import lists. - - - - - 58233d9f by Łukasz Hanuszczak at 2015-07-06T17:26:49+02:00 Add short documentation for hyperlinker source map type. - - - - - 14da016d by Łukasz Hanuszczak at 2015-07-06T18:07:20+02:00 Fix bug with module name being hyperlinked to `Prelude`. - - - - - 8f79db52 by Łukasz Hanuszczak at 2015-07-06T18:23:47+02:00 Fix problem with spec build in Haddock API configuration. - - - - - e7cc056c by Adam Sandberg Eriksson at 2015-07-07T23:22:21+01:00 StrictData: print correct strictness marks - - - - - e8253ca8 by Mateusz Kowalczyk at 2015-07-07T23:58:28+01:00 Update changelog - - - - - 0aba676b by Mateusz Kowalczyk at 2015-07-07T23:58:33+01:00 Relax upper bound on GHC a bit - - - - - 7a595381 by Mateusz Kowalczyk at 2015-07-07T23:58:52+01:00 Delete trailing whitespace - - - - - 50976d5e by Adam Sandberg Eriksson at 2015-07-08T15:03:04+02:00 StrictData: changes in HsBang type - - - - - 83b045fa by Mateusz Kowalczyk at 2015-07-11T14:35:18+01:00 Fix expansion icon for user-collapsible sections Closes haskell/haddock#412 - - - - - b2a3b0d1 by Mateusz Kowalczyk at 2015-07-22T22:03:21+01:00 Make some version changes after 2.16.1 release - - - - - a8294423 by Ben Gamari at 2015-07-27T13:16:07+02:00 Merge pull request haskell/haddock#422 from adamse/adamse-D1033 Merge for GHC D1033 - - - - - c0173f17 by randen at 2015-07-30T14:49:08-07:00 Break the response file by line termination rather than spaces, since spaces may be within the parameters. This simple approach avoids having the need for any quoting and/or escaping (although a newline char will not be possible in a parameter and has no escape mechanism to allow it). - - - - - 47c0ca14 by Alan Zimmerman at 2015-07-31T10:41:52+02:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - 45a9d770 by Mateusz Kowalczyk at 2015-07-31T09:47:43+01:00 Update changelog - - - - - 347a20a3 by Phil Ruffwind at 2015-08-02T23:15:26+01:00 Avoid JavaScript error during page load in non-frame mode In non-frame mode, parent.window.synopsis refers to the synopsis div rather than the nonexistent frame. Unfortunately, the script wrongly assumes that if it exists it must be a frame, leading to an error where it tries to access the nonexistent attribute 'replace' of an undefined value (synopsis.location). Closes haskell/haddock#406 - - - - - 54ebd519 by Phil Ruffwind at 2015-08-02T23:27:10+01:00 Link to the definitions to themselves Currently, the definitions already have an anchor tag that allows URLs with fragment identifiers to locate them, but it is rather inconvenient to obtain such a URL (so-called "permalink") as it would require finding the a link to the corresponding item in the Synopsis or elsewhere. This commit adds hyperlinks to the definitions themselves, allowing users to obtain links to them easily. To preserve the original aesthetics of the definitions, we alter the color of the link so as to be identical to what it was, except it now has a hover effect indicating that it is clickable. Additionally, the anchor now uses the 'id' attribute instead of the (obsolete) 'name' attribute. Closes haskell/haddock#407 - - - - - 02cc8bb7 by Phil Ruffwind at 2015-08-02T23:28:02+01:00 Fix typo in Haddock.Backends.Xhtml.Layout: divSynposis -> divSynopsis Closes haskell/haddock#408 - - - - - 2eb0a458 by Phil Ruffwind at 2015-08-02T23:30:07+01:00 Fix record field alignment when name is too long Change <dl> to <ul> and use display:table rather than floats to layout the record fields. This avoids bug haskell/haddock#301 that occurs whenever the field name gets too long. Slight aesthetic change: the entire cell of the field's source code is now shaded gray rather than just the area where text exists. Fixes haskell/haddock#301. Closes haskell/haddock#421 - - - - - 7abb3402 by Łukasz Hanuszczak at 2015-08-02T23:32:14+01:00 Add some utility definitions for generating line anchors. - - - - - e0b1d79b by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Make hyperlinked source renderer generate line anchors. - - - - - 24dd4c9f by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Re-accept test cases after adding line anchors for each of them. - - - - - 0372cfcb by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Override source line flags when source hyperlinker is enabled. - - - - - a81bcd07 by Mateusz Kowalczyk at 2015-08-02T23:58:25+01:00 Update tests to follow HTML changes - - - - - d2d7426f by Łukasz Hanuszczak at 2015-08-06T20:54:59+02:00 Fix quote syntax for promoted types. - - - - - 668cf029 by Łukasz Hanuszczak at 2015-08-06T21:12:00+02:00 Apply promoted type quoting to type-level consing. - - - - - 89f8e7c6 by Łukasz Hanuszczak at 2015-08-06T21:17:10+02:00 Extend advanced types test case with other examples. - - - - - 86494bca by Łukasz Hanuszczak at 2015-08-06T21:22:06+02:00 Rename advanced types test case and accept new output. - - - - - dbb7c7c0 by Adam Sandberg Eriksson at 2015-08-09T23:01:05+02:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 2a7704fa by Ben Gamari at 2015-08-10T13:18:05+02:00 Merge pull request haskell/haddock#433 from adamse/split-hsbang HsBang is split into HsSrcBang and HsImplBang - - - - - 891954bc by Thomas Miedema at 2015-08-15T14:51:18+02:00 Follow changes in GHC build system - - - - - b55d32ab by Mateusz Kowalczyk at 2015-08-21T18:06:09+01:00 Make Travis use 7.10.2 - - - - - 97348b51 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Move SYB utilities to standalone module. - - - - - 748ec081 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement `everywhere` transformation in SYB module. - - - - - 011cc543 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement generic transformation constructor. - - - - - b9510db2 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Create simple utility module for type specialization. - - - - - 43229fa6 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Make type of type specialization function more general. - - - - - fd844e90 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Add basic HTML test case for checking instance specialization. - - - - - 6ea0ad04 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Make HTML class instance printer take optional signature argument. - - - - - 65aa41b6 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Refactor instance head type to record instead of a meaningless tuple. - - - - - 3fc3bede by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add expandable method section for each class instance declaration. - - - - - 99ceb107 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Move dummy post-family instances for `DocName` to `Types` module. - - - - - e98f4708 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create convenience functions for type specialization module. - - - - - b947552f by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Hook type specialization logic with HTML pretty-printer. - - - - - dcaa8030 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create stub functions for sugaring specialized types. - - - - - fa84bc65 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement list syntax sugaring logic for specialized types. - - - - - e8b05b07 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement tuple syntax sugaring logic for specialized types. - - - - - 68a2e5bc by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Get rid of code duplication in type specialization module. - - - - - 4721c336 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create scaffolding of a framework for renaming specialized types. - - - - - 271b488d by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in missing cases in specialized type renaming function. - - - - - bfa5f2a4 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Remove code duplication in specialized type renamer. - - - - - ea6bd0e8 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Change state of the type renaming monad. - - - - - 77c5496e by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement simple mechanism for generating new type names. - - - - - 91bfb48b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in stub behaviour with actual environment renaming. - - - - - d244517b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix logic behind binder type renaming. - - - - - f3c5e360 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add SYB-like utility function for performing stateful queries. - - - - - eb3f9154 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create function for retrieving free variables from given type. - - - - - a94561d3 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix compilation error caused by incorrect type signature. - - - - - 8bb707cf by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Move `SetName` class definition to types module. - - - - - 5800b13b by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Hook type renamer with instance method HTML pretty-printer. - - - - - 6a480164 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some test cases for type renamer. - - - - - 839842f7 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized signatures refer to original signature declaration. - - - - - 4880f7c9 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized methods be nicely formatted again. - - - - - ab5a6a2e by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Attach source locations to the specialized class methods. - - - - - 43f8a559 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Extend instances test case to also test multi-name type signatures. - - - - - 59bc751c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix tab-based indentation in instances test case. - - - - - c2126815 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Improve placement of instance methods expander button. - - - - - 0a32e287 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add new data type declaration to instance specialization test case. - - - - - 5281af1f by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make type renamer first try single-letter names as alternatives. - - - - - 7d509475 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix type renamer bug with incorrect names being generated. - - - - - 0f35bf7c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some documentation and refactor type specialization module. - - - - - da1d0803 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix another bug where type renamer was generating incorrect names. - - - - - cd39b5cb by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Refactor type renamer to rebinding and pure renaming phases. - - - - - 850251f4 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix unwitting compilation bug. - - - - - e5e9fc01 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Integrate instance specification type into class instance definition. - - - - - 825b0ea0 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer neccessary instance specification type. - - - - - cdba44eb by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix declaration converter to use more appropriate mode for methods. - - - - - bc45c309 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug with types not being specialized at all. - - - - - 5d8e5d89 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug where instance expander was opening wrong section. - - - - - 6001ee41 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix another type renamer bug where not all names were rebound. - - - - - 5f58ce2a by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix yet another renamer bug where some names were not unique. - - - - - 8265e521 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split instance subsection layout method to top-level declarations. - - - - - e5e66298 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Rearrange layout of instance methods in generated documentation. - - - - - a50b4eea by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer used layout method. - - - - - 2ff36ec2 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach section title to the instance methods block. - - - - - 7ac15300 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Add basic tests for associated types in instances test case. - - - - - db0ea2f9 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach associated types information to instance header. - - - - - 71cad4d5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details section contain associated types information. - - - - - deee2809 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Improve look of rendered associated families in instance details. - - - - - 839d13a5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Introduce alternative type for family declarations. - - - - - d397f03f by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details record use new type for family declarations. - - - - - 2b23fe97 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split printer of type family header to separate functions. - - - - - c3498cdc by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Implement HTML renderer for pseudo-family declarations. - - - - - c12bbb04 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Apply type specializer to associated type family declarations. - - - - - 2fd69ff2 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Create helper method for specializing type signatures. - - - - - 475826e7 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Refactor specializer module to be independent from XHTML backend. - - - - - f00b431c by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add some documentation for instance head specializer. - - - - - a9fef2dc by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix bug with missing space in documentation for associated types. - - - - - 50e29056 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with incorrect instance details sections being expanded. - - - - - e6dfdd03 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by adding instance details section. - - - - - 75565b2a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make section identifier of instance details more GHC-independent. - - - - - add0c23e by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Re-accept tests after applying deterministic section identifiers. - - - - - 878f2534 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make identifier generation also architecture-independent. - - - - - 48be69f8 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with instance expander hijacking type hyperlink click. - - - - - 47830c1f by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Get rid of dreadful hashing function for generating identifiers. - - - - - 956cd5af by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Move `InstOrigin` type declaration to more appropriate module. - - - - - bf672ed3 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by changes related to instance expander. - - - - - 8f2a949a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add examples with type operators to the instances test case. - - - - - 64600a84 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add basic support for sugaring infix type operators. - - - - - 747d71b8 by Łukasz Hanuszczak at 2015-08-21T18:22:34+01:00 Add support for sugaring built-in function syntax. - - - - - d4696ffb by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Remove default methods from Hoogle class output. - - - - - bf0e09d7 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add fixity declarations in Hoogle backend output. - - - - - 90e91a51 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix bug with incorrect fixities being generated in Hoogle backend. - - - - - 48f11d35 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve class type family declarations output in Hoogle backend. - - - - - 661e8e8f by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add missing default family equations in Hoogle output. - - - - - e2d64103 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve formatting of class details output in Hoogle backend. - - - - - 490fc377 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix weird-looking Hoogle output for familyless classes. - - - - - ea115b64 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create script file for new HTML test runner. - - - - - 609913d3 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Set default behaviour if no arguments given. - - - - - dc115f67 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for providing optional arguments for test runner. - - - - - d93ec867 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve output of test runner error messages. - - - - - 0be9fe12 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for executing Haddock process in test runner. - - - - - 4e4d00d9 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add GHC path to test runner configuration. - - - - - d67a2086 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make GHC path a test runner command-line argument. - - - - - c810079a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Extend test runner configuration with Haddock arguments. - - - - - fee18845 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor test runner and create stub functions. - - - - - ff7c161f by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make test runner actually run Haddock executable. - - - - - 391f73e6 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with test runner not producing any output files. - - - - - 81a74e2d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Setup skeleton of framework for running tests. - - - - - f8a79ec4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with modules not being found in global search mode. - - - - - 7e700b4d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make Haddock standard output redirection be more configurable. - - - - - 53b4c17a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Incorporate old, ugly functions for comparing output files. - - - - - 8277c8aa by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor architecture of test runner output checking functions. - - - - - 587bb414 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement actual diffing mechanism. - - - - - 9ed2b5e4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve code style to match popular guidelines. - - - - - 14bffaf8 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make it possible to choose alternative diff tool. - - - - - 5cdfb005 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create stub methods for processing test output as XML documents. - - - - - 7ef8e12e by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement link-stripping logic as simple SYB transformation. - - - - - 8a1fcd4f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Incorporate link stripping to output diffing mechanism. - - - - - 37dba2bc by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement footer-stripping logic. - - - - - 9cd52120 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Add missing dependencies in Cabal configuration file. - - - - - e0f83c6e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix issue with output being printed in incorrect order. - - - - - 0a94fbb0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to run tests without generating diff. - - - - - 76a58c6f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor HTML test suite boilerplate to external package. - - - - - af41e6b0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utilities for storing directory configuration. - - - - - d8f0698f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move IO-dependent config of HTML test suite to test package. - - - - - 17369fa0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Enable all compiler warnings in Haddock test package configuration. - - - - - 9d03b47a by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move Haddock runner of HTML test suite to Haddock test package. - - - - - 4b3483c5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 03754194 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience wrappers to simplify in test entry points. - - - - - 27476ab7 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adjust module visibility and items they export. - - - - - c40002ba by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Remove no longer useful test option. - - - - - 55ab2541 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Change extension of test files used for diffing. - - - - - 136bf4e4 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor and simplify XHTML helper module of test package. - - - - - 69f7e3df by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix typo in link stripper of HTML test suite runner. - - - - - 0c3c1c6b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience script for running specific HTML tests. - - - - - 489e1b05 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement utility functions for conditional link stripping. - - - - - 0f985dc3 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt `hypsrc-test` module to work with new testing framework. - - - - - 927406f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement output accepting mechanism in test package. - - - - - 8545715e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utility function for recursive obtaining directory contents. - - - - - cb70381f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 019599b5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix path handling in test runner. - - - - - 399b985b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to specify ignored files for test output. - - - - - 41b3d93d by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt HTML test runner to use new ignoring functionality. - - - - - e2091c8b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix bug with not all test output files being checked. - - - - - b22134f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Specify ignored files for hyperlinker source test runner. - - - - - 3301dfa1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Copy test runner script for hyperlinked source case. - - - - - d39a6dfa by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner invoking Haddock in incorrect mode. - - - - - f32c8ff3 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix path handling in test module loader. - - - - - 10f94ee9 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make test runner ignore test packages with no modules. - - - - - 5dc4239c by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create test runner entry points for LaTeX test suite. - - - - - 58d1f7cf by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with unnecessary checking old test output. - - - - - c7ce76e1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Re-implement test acceptance functionality. - - - - - 13bbabe8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix warning about no longer needed definition. - - - - - 958a99b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Adapt Cabal configuration to execute LaTeX suite with new runner. - - - - - 550ff663 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Setup test suite for Hoogle backend. - - - - - 3aa969c4 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make Hoogle backend create output directory if needed. - - - - - eb085b02 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Add appropriate .gitignore entry and configure Hoogle test suite. - - - - - a50bf915 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner failing when run on multiple test packages. - - - - - bf5368b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create simple test cases for Hoogle backend. - - - - - 6121ba4b by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create helper function for conversion between XML and XHTML. - - - - - cb516061 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Refactor existing code to use XHTML printer instead of XML one. - - - - - e2de8c82 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Improve portability of test runner scripts. - - - - - 9563e774 by Łukasz Hanuszczak at 2015-08-22T23:43:16+02:00 Remove redundant import statement. - - - - - 55353df1 by Łukasz Hanuszczak at 2015-08-24T23:09:20+02:00 Fix bug with accepting to non-existing directory. - - - - - 00a334ca by Łukasz Hanuszczak at 2015-08-24T23:09:47+02:00 Accept output for Hoogle and LaTeX backends. - - - - - 29191d8b by Łukasz Hanuszczak at 2015-08-24T23:14:18+02:00 Get rid of obsolete testing utilities. - - - - - bbb25db3 by Łukasz Hanuszczak at 2015-08-24T23:18:50+02:00 Update sandbox setup guide to work with Haddock test package. - - - - - cfd45248 by Łukasz Hanuszczak at 2015-08-24T23:51:30+02:00 Make Travis aware of Haddock test package. - - - - - 74185b7a by Łukasz Hanuszczak at 2015-08-25T17:41:59+02:00 Fix test suite failure when used with Stack. - - - - - 18769697 by Łukasz Hanuszczak at 2015-08-25T18:02:09+02:00 Add sample Stack setup to the hacking guide. - - - - - 22715eeb by Łukasz Hanuszczak at 2015-08-25T18:04:47+02:00 Fix Markdown formatting of README file. - - - - - b49ec386 by Łukasz Hanuszczak at 2015-08-25T18:13:36+02:00 Setup Haddock executable path in Travis configuration. - - - - - 5d29eb03 by Eric Seidel at 2015-08-30T09:55:58-07:00 account for changes to ipClass - - - - - f111740a by Ben Gamari at 2015-09-02T13:20:37+02:00 Merge pull request haskell/haddock#443 from bgamari/ghc-head account for changes to ipClass - - - - - a2654bf6 by Jan Stolarek at 2015-09-03T01:32:57+02:00 Follow changes from haskell/haddock#6018 - - - - - 2678bafe by Richard Eisenberg at 2015-09-21T12:00:47-04:00 React to refactoring CoAxiom branch lists. - - - - - ebc56e24 by Edward Z. Yang at 2015-09-21T11:53:46-07:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4a8c4198 by Tamar Christina at 2015-09-27T13:59:08+02:00 Create Process: removed PhaseFailed - - - - - 7e99b790 by Oleg Grenrus at 2015-09-27T20:52:10+03:00 Generate docs for orphan instances - - - - - 32e932e2 by Oleg Grenrus at 2015-09-28T07:21:11+03:00 Have source links for orphan instances - - - - - c2eb9f4f by Oleg Grenrus at 2015-09-28T07:24:58+03:00 Print orphan instances header only if required - - - - - ff96f978 by Oleg Grenrus at 2015-09-28T07:40:54+03:00 Add orphan instances link to contents box - - - - - d72490a6 by Oleg Grenrus at 2015-09-28T16:37:44+03:00 Fix orphan instance collapsing - - - - - 25d3dfe5 by Ben Gamari at 2015-10-03T12:38:09+02:00 Merge pull request haskell/haddock#448 from Mistuke/fix-silent-death-of-runInteractive Remove PhaseFailed - - - - - 1e45e43b by Edward Z. Yang at 2015-10-11T13:10:10-07:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b1370ac1 by Adam Gundry at 2015-10-16T16:26:42+01:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 60bef421 by Simon Peyton Jones at 2015-10-26T12:52:36+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 4c1898ca by Simon Peyton Jones at 2015-10-27T14:24:56+00:00 Track change to PatSyn.patSynSig - - - - - 25108e85 by Simon Peyton Jones at 2015-10-27T17:34:18+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - 693643ac by Ben Gamari at 2015-10-28T14:33:06+01:00 Account for Typeable changes The treatment of type families changed. - - - - - cd7c2221 by Simon Peyton Jones at 2015-10-30T13:03:51+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - 712032cb by Herbert Valerio Riedel at 2015-10-31T11:01:45+01:00 Relax upper bound on `base` to allow base-4.9 - - - - - 0bfa0475 by Simon Peyton Jones at 2015-10-31T19:08:13+00:00 More adaption to wildcard-refactor - - - - - 0a3c0cb7 by Simon Peyton Jones at 2015-10-31T22:14:43+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - c4fd4ec9 by Alan Zimmerman at 2015-11-01T11:16:34+01:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 42cdd882 by Matthew Pickering at 2015-11-06T20:02:16+00:00 Change for IEThingWith - - - - - f368b7be by Ben Gamari at 2015-11-11T11:35:51+01:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - e32965b8 by Simon Peyton Jones at 2015-11-13T12:18:17+00:00 Merge with origin/head - - - - - ebcf795a by Edward Z. Yang at 2015-11-13T21:56:27-08:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4e23989f by Simon Peyton Jones at 2015-11-18T11:32:54+00:00 Wibbles to Haddock - - - - - 2289cd4a by Simon Peyton Jones at 2015-11-20T23:12:49+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor - - - - - 695975a6 by Alan Zimmerman at 2015-11-21T21:16:12+02:00 Update to match GHC wip/T11019 - - - - - bbba21e7 by Simon Peyton Jones at 2015-11-23T13:54:31+00:00 merge with origin/ghc-head - - - - - 3d664258 by Simon Peyton Jones at 2015-11-23T17:17:18+00:00 Wibble - - - - - e64cf586 by Herbert Valerio Riedel at 2015-12-05T00:29:55+01:00 Canonicalise Monad instances - - - - - a2de15a7 by Alan Zimmerman at 2015-12-05T17:33:52+02:00 Matching changes for haskell/haddock#11028 - - - - - cc29a3e4 by Alan Zimmerman at 2015-12-05T19:45:33+02:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 95dd15d1 by Richard Eisenberg at 2015-12-11T17:33:39-06:00 Update for type=kinds - - - - - cb5fd9ed by Herbert Valerio Riedel at 2015-12-14T15:07:30+00:00 Bump versions for ghc-7.11 - - - - - 4f286d96 by Simon Peyton Jones at 2015-12-14T15:10:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 13ea2733 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 098df8b8 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track changes in HsSyn for quasi-quotes - - - - - 716a64de by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track change in API of TyCon - - - - - 77a66bca by Adam Gundry at 2015-12-14T15:10:58+00:00 Track API changes to support empty closed type familes - - - - - f2808305 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track the new location of setRdrNameSpace - - - - - ba8b08a4 by Alan Zimmerman at 2015-12-14T15:10:59+00:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - a4ded87e by Thomas Winant at 2015-12-14T15:14:05+00:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 25c78107 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: print correct strictness marks - - - - - 6cbc41c4 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: changes in HsBang type - - - - - ad46821a by Alan Zimmerman at 2015-12-14T15:14:06+00:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - abc0ae5b by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 3308d06c by Thomas Miedema at 2015-12-14T15:14:07+00:00 Follow changes in GHC build system - - - - - 6c763deb by Eric Seidel at 2015-12-14T15:14:07+00:00 account for changes to ipClass - - - - - ae5b4eac by Jan Stolarek at 2015-12-14T15:17:00+00:00 Follow changes from haskell/haddock#6018 - - - - - ffbc40e0 by Richard Eisenberg at 2015-12-14T15:17:02+00:00 React to refactoring CoAxiom branch lists. - - - - - d1f531e9 by Edward Z. Yang at 2015-12-14T15:17:02+00:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 79f73754 by Tamar Christina at 2015-12-14T15:17:02+00:00 Create Process: removed PhaseFailed - - - - - 3d37bebb by Edward Z. Yang at 2015-12-14T15:20:46+00:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 5f8a9e44 by Adam Gundry at 2015-12-14T15:20:48+00:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 79dda70f by Simon Peyton Jones at 2015-12-14T15:26:02+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 959930fb by Simon Peyton Jones at 2015-12-14T15:37:50+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - e18a8df5 by Simon Peyton Jones at 2015-12-14T15:37:52+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - aa35ab52 by Simon Peyton Jones at 2015-12-14T15:40:18+00:00 More adaption to wildcard-refactor - - - - - 8ceef94b by Simon Peyton Jones at 2015-12-14T15:46:04+00:00 Track change to PatSyn.patSynSig - - - - - cd81e83d by Ben Gamari at 2015-12-14T15:46:06+00:00 Account for Typeable changes The treatment of type families changed. - - - - - 63c9117c by Herbert Valerio Riedel at 2015-12-14T15:46:34+00:00 Relax upper bound on `base` to allow base-4.9 - - - - - a484c613 by Alan Zimmerman at 2015-12-14T15:47:46+00:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 2c26fa51 by Matthew Pickering at 2015-12-14T15:47:47+00:00 Change for IEThingWith - - - - - 593baa0f by Ben Gamari at 2015-12-14T15:49:21+00:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - b6b5ca78 by Edward Z. Yang at 2015-12-14T15:49:54+00:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b5b0e072 by Alan Zimmerman at 2015-12-14T15:54:20+00:00 Update to match GHC wip/T11019 - - - - - 14ddeb68 by Simon Peyton Jones at 2015-12-14T15:54:22+00:00 Wibble - - - - - 10a90ad8 by Herbert Valerio Riedel at 2015-12-14T15:54:22+00:00 Canonicalise Monad instances - - - - - ed68ac50 by Alan Zimmerman at 2015-12-14T15:55:48+00:00 Matching changes for haskell/haddock#11028 - - - - - 3f7e5a2d by Alan Zimmerman at 2015-12-14T15:55:49+00:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 6543a73f by Richard Eisenberg at 2015-12-14T15:59:55+00:00 Update for type=kinds - - - - - 193a5c48 by Matthew Pickering at 2015-12-14T18:17:00+00:00 Changes to compile with 8.0 - - - - - add669ec by Matthew Pickering at 2015-12-14T18:47:12+00:00 Warnings - - - - - 223f3fb4 by Ben Gamari at 2015-12-15T23:45:05+01:00 Update for D1200 - - - - - d058388f by Ben Gamari at 2015-12-16T05:40:17-05:00 Types: Add Outputable[Bndr] DocName instances - - - - - 62ecd7fb by Ben Gamari at 2015-12-16T09:23:09-05:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ddbc187a by Ben Gamari at 2015-12-16T17:54:55+01:00 Update for D1200 - - - - - cec83b52 by Ben Gamari at 2015-12-16T17:54:55+01:00 Types: Add Outputable[Bndr] DocName instances - - - - - d12ecc98 by Ben Gamari at 2015-12-16T17:54:55+01:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ada1616f by Ben Gamari at 2015-12-16T17:54:58+01:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a4f0383d by Ben Gamari at 2015-12-16T23:32:38+01:00 Fix Hyperlinker GHC.con_names is now GHC.getConNames - - - - - a10e6849 by Ben Gamari at 2015-12-20T00:54:11+01:00 Merge remote-tracking branch 'mrhania/testing-framework-improvements' into ghc-head - - - - - f078b4fd by Ben Gamari at 2015-12-20T00:59:51+01:00 test: Compatibility with Cabal 1.23 - - - - - 88a511a9 by Ben Gamari at 2015-12-20T01:14:35+01:00 Merge remote-tracking branch 'phadej/orphans' into ghc-head - - - - - 4e250f36 by Ben Gamari at 2015-12-20T01:14:52+01:00 Add html-test for orphan instances output - - - - - 87fffbad by Alan Zimmerman at 2015-12-20T09:50:42+02:00 Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc - - - - - 6b7e51c9 by idontgetoutmuch at 2015-12-20T21:01:47+00:00 Merge pull request haskell/haddock#1 from haskell/ghc-head Ghc head - - - - - 229c1fb5 by Dominic Steinitz at 2015-12-21T07:19:16+00:00 Handle inline math with mathjax. - - - - - 57902d66 by Dominic Steinitz at 2015-12-21T08:07:11+00:00 Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs - - - - - 0e69f236 by Herbert Valerio Riedel at 2015-12-21T18:30:43+01:00 Fix-up left-over assumptions of GHC 7.12 into GHC 8.0 - - - - - c67f8444 by Simon Peyton Jones at 2015-12-22T16:26:56+00:00 Follow removal of NamedWildCard from HsType - - - - - da40327a by Ben Gamari at 2015-12-23T14:15:28+01:00 html-test/Operators: Clear up ambiguous types For reasons that aren't entirely clear a class with ambiguous types was accepted by GHC <8.0. I've added a functional dependency to clear up this ambiguity. - - - - - 541b7fa4 by Ben Gamari at 2015-12-23T14:18:51+01:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 0febc947 by Ben Gamari at 2015-12-24T00:30:20+01:00 hoogle-test/AssocTypes: Allow AmbiguousTypes GHC 8.0 complains otherwise - - - - - 25810841 by Ben Gamari at 2015-12-24T00:33:18+01:00 OrphanInstances: Accept test output - - - - - 841987f3 by Ben Gamari at 2015-12-25T11:03:11+01:00 Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head - - - - - 358391f0 by Ben Gamari at 2015-12-26T10:44:50+01:00 Add missing import - - - - - a8896885 by Ben Gamari at 2015-12-26T10:45:27+01:00 travis: Use Travis containers - - - - - 85e82134 by Herbert Valerio Riedel at 2015-12-30T17:25:39+01:00 tweak version bounds for GHC-8.1 - - - - - 672a5f75 by randen at 2016-01-01T23:45:25-08:00 The Haddock part for fully gcc-like response files " driver/Main.hs * Moved the response file handling into ResponseFile.hs, updating import section as appropriate. * driver/ResponseFile.hs * New file. In anticipation that maybe some day this could be provided by another library, and to make it possible to unit test, this functionality is pulled out of the Main.hs module, and expanded to support the style/format of response files which gcc uses. * The specification for the format of response files which gcc generates and consumes, seems to be best derived from the gcc code itself (libiberty/argv.c), so that is what has been done here. * This is intended to fix haskell/haddock#379 * driver-test/Main.hs * New file for testing code in the driver source tree * driver-test/ResponseFileSpec.hs * Tests, adapted/adopted from the same gcc code where the escaping/unescaping is from, in the hspec style of unit tests * haddock.cabal * Add the driver-test test-suite. Introduces a new library dependency (upon hspec) for the haddock driver target in the haddock.cabal file, but practically, this should not be a problem as the haddock-api tests already depend on hspec. - - - - - 498781df by Ben Gamari at 2016-01-06T13:41:04+01:00 Version bumps and changelog - - - - - 8451e46a by Ben Gamari at 2016-01-06T13:47:17+01:00 Merge remote-tracking branch 'randen/bug468' - - - - - fb2d9181 by Ben Gamari at 2016-01-06T08:14:42-05:00 Add ResponseFile to OtherModules - - - - - 2cb2d2e3 by Ben Gamari at 2016-01-06T14:35:00+01:00 Merge branch 'master' into ghc-head - - - - - 913477d4 by Eric Seidel at 2016-01-11T14:57:57-08:00 deal with un-wiring of IP class - - - - - c557a4b3 by Alan Zimmerman at 2016-01-15T11:14:35+02:00 Update to match wip/T11430 in GHC - - - - - 3e135093 by Alan Zimmerman at 2016-01-16T18:21:59+01:00 Update to match wip/T11430 in GHC - - - - - c48ef2f9 by Ben Gamari at 2016-01-18T09:50:06+01:00 Merge remote-tracking branch 'gridaphobe/ghc-head' into ghc-head - - - - - 9138a1b0 by Eric Seidel at 2016-01-18T12:50:15+01:00 deal with un-wiring of IP class (cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f) - - - - - b48c172e by Joachim Breitner at 2016-01-19T00:11:38+01:00 Make sure --mathjax affects all written HTML files This fixes haskell/haddock#475. - - - - - af61fe63 by Ryan Scott at 2016-02-07T23:25:57+01:00 Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes haskell/haddock#473) - - - - - b6458693 by Ben Gamari at 2016-02-07T23:29:27+01:00 Merge pull request haskell/haddock#477 from haskell/issue-475 Make sure --mathjax affects all written HTML files - - - - - adcc0071 by Ben Gamari at 2016-02-07T23:34:52+01:00 Merge branch 'master' into ghc-head - - - - - d0404e61 by Ben Gamari at 2016-02-08T12:46:49+01:00 doc: Switch to Sphinx - - - - - acb153b3 by Ben Gamari at 2016-02-08T12:46:56+01:00 Document --use-unicode flag - - - - - c20bdf1d by Ben Gamari at 2016-02-08T13:41:24+01:00 Fix GHC and haddock-library dependency bounds - - - - - 8d946801 by Ben Gamari at 2016-02-08T14:54:56+01:00 testsuite: Rework handling of output sanitization Previously un-cleaned artifacts were kept as reference output, making it difficult to tell what has changed and causing spurious changes in the version control history. Here we rework this, cleaning the output during acceptance. To accomplish this it was necessary to move to strict I/O to ensure the reference handle was closed before accept attempts to open the reference file. - - - - - c465705d by Ben Gamari at 2016-02-08T15:36:05+01:00 test: Compare on dump For reasons I don't understand the Xml representations differ despite their textual representations being identical. - - - - - 1ec0227a by Ben Gamari at 2016-02-08T15:36:05+01:00 html-test: Accept test output - - - - - eefbd63a by Ben Gamari at 2016-02-08T15:36:08+01:00 hypsrc-test: Accept test output And fix impredicative Polymorphism testcase. - - - - - d1df4372 by Ben Gamari at 2016-02-08T15:40:44+01:00 Merge branch 'fix-up-testsuite' - - - - - 206a3859 by Phil Ruffwind at 2016-02-08T17:51:21+01:00 Move the permalinks to "#" on the right side Since pull request haskell/haddock#407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). - - - - - 6c89fa03 by Phil Ruffwind at 2016-02-08T17:54:44+01:00 Update tests for previous commit - - - - - effaa832 by Ben Gamari at 2016-02-08T17:56:17+01:00 Merge branch 'anchors-redux' - - - - - 9a2bec90 by Ben Gamari at 2016-02-08T17:58:40+01:00 Use -fprint-unicode-syntax when --use-unicode is enabled This allows GHC to render `*` as its Unicode representation, among other things. - - - - - 28ecac5b by Ben Gamari at 2016-02-11T18:53:03+01:00 Merge pull request haskell/haddock#480 from bgamari/sphinx Move documentation to ReStructuredText - - - - - 222e5920 by Ryan Scott at 2016-02-11T15:42:42-05:00 Collapse type/data family instances by default - - - - - a80ac03b by Ryan Scott at 2016-02-11T20:17:09-05:00 Ensure expanded family instances render correctly - - - - - 7f985231 by Ben Gamari at 2016-02-12T10:04:22+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - d4eda086 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Various cleanups - - - - - 79bee48d by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show kind signatures for type family variables Addresses GHC haskell/haddock#11588. - - - - - b2981d98 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show 'where ...' after closed type family Seems like we should ideally show the actual equations as well but that seems like it would be a fair amount of work - - - - - cfc0e621 by Ben Gamari at 2016-02-18T22:48:12+01:00 Merge pull request haskell/haddock#483 from bgamari/T11588 Fix GHC haskell/haddock#11588 This fixes GHC haskell/haddock#11588: * Show where ... after closed type families * Show kind signatures on type family type variables - - - - - 256e8a0d by Ben Gamari at 2016-02-18T23:15:39+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 32402036 by Richard Eisenberg at 2016-02-24T13:21:44-05:00 Follow-on changes to support RuntimeRep - - - - - 2b1c572d by Matthew Pickering at 2016-03-04T21:04:02+00:00 Remove unused functions - - - - - eb906f50 by Richard Eisenberg at 2016-03-13T21:17:20+01:00 Follow-on changes to support RuntimeRep (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c) - - - - - 8c34ef34 by Richard Eisenberg at 2016-03-14T23:47:23-04:00 Changes due to fix for GHC#11648. - - - - - 0e022014 by Richard Eisenberg at 2016-03-15T14:06:45+01:00 Changes due to fix for GHC#11648. (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1) - - - - - ed3f78ab by Rik Steenkamp at 2016-04-02T22:20:36+01:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 - - - - - d3210042 by Rik Steenkamp at 2016-04-04T15:43:32+02:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb) - - - - - 236eec90 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 692ee7e0 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. - - - - - 79619f57 by Ben Gamari at 2016-04-10T23:46:22+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. (cherry picked from commit c6d6a18d85e5e2d9bb5904e6919e8a8d7e31c4c5) - - - - - 3358ccb4 by Ben Gamari at 2016-04-10T23:47:27+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 264949b1 by Ben Gamari at 2016-04-16T17:50:23+02:00 Merge pull request haskell/haddock#482 from RyanGlScott/ghc-head Collapse type/data family instances by default - - - - - 478c483a by Ben Gamari at 2016-04-16T17:51:09+02:00 Merge pull request haskell/haddock#489 from mpickering/unused-functions Remove some unused functions - - - - - c94e55f0 by Ryan Scott at 2016-04-16T17:57:54+02:00 Collapse type/data family instances by default (cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088) - - - - - 31e633d3 by Ryan Scott at 2016-04-16T17:58:06+02:00 Ensure expanded family instances render correctly (cherry picked from commit 1338b5d7c32939de6bbc31af0049477e4f847103) - - - - - 03e4d197 by Matthew Pickering at 2016-04-16T17:58:21+02:00 Remove unused functions (cherry picked from commit b89d1c2456bdb2d4208d94ded56155f7088a37d0) - - - - - ed4116f6 by Ben Gamari at 2016-04-20T10:46:57+02:00 ghc: Install files for needed --hyperlinked-source - - - - - 0be999c4 by Ben Gamari at 2016-04-20T11:37:54+02:00 ghc: Install files for needed --hyperlinked-source (cherry picked from commit 5c82c9fc2d21ddaae4a2470f1c375426968f19c6) - - - - - 4d17544c by Simon Peyton Jones at 2016-04-20T12:42:28+01:00 Track change to HsGroup This relates to a big GHC patch for Trac haskell/haddock#11348 - - - - - 1700a50d by Ben Gamari at 2016-05-01T13:19:27+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. - - - - - 0b7c8125 by Ben Gamari at 2016-05-01T13:21:43+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. (cherry picked from commit 609018dd09c4ffe27f9248b2d8b50f6196cd42b9) - - - - - af115ce0 by Ryan Scott at 2016-05-04T22:15:50-04:00 Render Haddocks for derived instances Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac haskell/haddock#11768. - - - - - 76fa1edc by Ben Gamari at 2016-05-10T18:13:25+02:00 haddock-test: A bit of refactoring for debuggability - - - - - 7d4c4b20 by Ben Gamari at 2016-05-10T18:13:25+02:00 Create: Mark a comment as TODO - - - - - 2a6d0c90 by Ben Gamari at 2016-05-10T18:13:25+02:00 html-test: Update reference output - - - - - bd60913d by Ben Gamari at 2016-05-10T18:13:25+02:00 hypsrc-test: Fix reference file path in cabal file It appears the haddock insists on prefixing --hyperlinked-sourcer output with directory which the source appeared in. - - - - - c1548057 by Ben Gamari at 2016-05-10T18:22:12+02:00 doc: Update extra-source-files in Cabal file - - - - - 41d5bae3 by Ben Gamari at 2016-05-10T18:29:21+02:00 Bump versions - - - - - ca75b779 by Ben Gamari at 2016-05-11T16:03:44+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 4e3cfd62 by Ben Gamari at 2016-05-11T16:06:45+02:00 Merge remote-tracking branch 'RyanGlScott/ghc-head' into ghc-head - - - - - a2379970 by Ben Gamari at 2016-05-11T23:15:11+02:00 doc: Add clean targets - - - - - f275212e by Ben Gamari at 2016-05-11T23:15:14+02:00 doc: Add html as an all-target for ghc Otherwise the html documentation won't be installed for binary-dist. - - - - - 388fc0af by Ben Gamari at 2016-05-12T09:49:12+02:00 Update CHANGES - - - - - bad81ad5 by Ben Gamari at 2016-05-12T09:49:38+02:00 Version bump - - - - - c01688a7 by Ben Gamari at 2016-05-12T10:04:58+02:00 Revert "Version bump" This bump was a bit premature. This reverts commit 7b238d9c5be9b07aa2d10df323b5c7b8d1634dc8. - - - - - 7ed05724 by Ben Gamari at 2016-05-12T10:05:33+02:00 doc: Fix GHC clean rule Apparently GHC's build system doesn't permit wildcards in clean paths. - - - - - 5d9611f4 by Ben Gamari at 2016-05-12T17:43:50+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 653566b2 by Ben Gamari at 2016-05-14T09:57:31+02:00 Version bump to 2.17.2 - - - - - b355c439 by Ben Gamari at 2016-05-14T09:57:51+02:00 doc: Use `$(MAKE)` instead of `make` This is necessary to ensure we use gmake. - - - - - 8a18537d by Ben Gamari at 2016-05-14T10:15:45+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - b3290ef1 by Sebastian Meric de Bellefon at 2016-05-14T11:29:47-04:00 Fix haskell/haddock#303. Hide footer when printing The "Produced by Haddock" footer was overlapping the page's body when printing. This patch hides the footer with a css media rule. - - - - - b4a76f89 by Sebastian Meric de Bellefon at 2016-05-15T02:12:46-04:00 Fix haskell/haddock#280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines - - - - - ba797c9e by Ben Gamari at 2016-05-16T14:53:46+02:00 doc: Vendorize alabaster Sphinx theme Alabaster is now the default sphinx theme and is a significant improvement over the previous default that it's worthproviding it when unavailable (e.g. Sphinx <1.3). - - - - - c9283e44 by Ben Gamari at 2016-05-16T14:55:17+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 1c9ea198 by Sebastian Méric de Bellefon at 2016-05-16T12:30:40-04:00 Merge pull request haskell/haddock#502 from Helkafen/master Fix haskell/haddock#303. Hide footer when printing - - - - - 33631016 by Ben Gamari at 2016-05-16T19:56:11+02:00 Revert "doc: Vendorize alabaster Sphinx theme" This ended up causes far too many issues to be worthwhile. We'll just have to live with inconsistent haddock documentation. This reverts commit cec21957001143794e71bcd9420283df18e7de40. - - - - - 93317d26 by Ben Gamari at 2016-05-16T19:56:11+02:00 cabal: Fix README path - - - - - c8695b22 by Ben Gamari at 2016-05-16T19:58:51+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 0b50eaaa by Ben Gamari at 2016-05-16T21:02:08+02:00 doc: Use whichever theme sphinx deems appropriate - - - - - 857c1c9c by Ben Gamari at 2016-05-16T21:07:08+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 15fc5637 by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Remove redundant imports - - - - - 132ddc6a by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Better debug output For tracking down haskell/haddock#505 - - - - - 2252a149 by Ben Gamari at 2016-05-22T12:43:59+02:00 Don't consider default class ops when looking for decls When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of haskell/haddock#505. - - - - - 4886b2ec by Oleg Grenrus at 2016-05-24T16:19:48+03:00 UnfelpfulSpan line number omitted Kind of resolves https://github.com/haskell/haddock/issues/508 - - - - - a4befd36 by Oleg Grenrus at 2016-05-24T16:53:35+03:00 Change Hyperlinked lexer to know about DataKinds ticks - - - - - f45cb52e by David Feuer at 2016-05-24T18:48:53-04:00 Make parser state a newtype Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day. - - - - - 05013dd7 by Sebastian Meric de Bellefon at 2016-05-24T22:03:55-04:00 remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) Frames are a bit broken, ignored by Hackage, and considered obsolete in general. This patch disables frames generation. The mini_*.html files are still used in the synopsis. - - - - - b8163a88 by Ben Gamari at 2016-05-25T14:44:15+02:00 Merge pull request haskell/haddock#507 from bgamari/T505 Fix haskell/haddock#505 - - - - - ea1b30c6 by Sebastian Meric de Bellefon at 2016-05-25T14:17:00-04:00 Update CHANGES - - - - - eddfc258 by Sebastian Méric de Bellefon at 2016-05-25T15:17:40-04:00 Merge pull request haskell/haddock#514 from Helkafen/frames remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) - - - - - 0e506818 by Alex Biehl at 2016-05-26T12:43:09+02:00 Remove misplaced haddock comment - - - - - a07d28c0 by Ben Gamari at 2016-05-27T11:34:59+02:00 Merge pull request haskell/haddock#515 from alexbiehl/master Remove misplaced haddock comment - - - - - 9001d267 by Ben Gamari at 2016-05-27T11:35:46+02:00 Merge pull request haskell/haddock#513 from treeowl/newtype-since Make parser state a newtype - - - - - 74e1a018 by Sebastian Méric de Bellefon at 2016-05-28T17:28:15-04:00 Merge pull request haskell/haddock#504 from Helkafen/issue-280 Fix haskell/haddock#280. Parsing of module header - - - - - 37557f4f by Alan Zimmerman at 2016-05-29T23:36:50+02:00 Matching changes for haskell/haddock#12105 - - - - - 7d09e5d6 by Sebastian Meric de Bellefon at 2016-06-03T18:07:48-04:00 Version bumps (2.17.3, 1.4.2) - - - - - 85b4bc15 by Sebastian Méric de Bellefon at 2016-06-06T18:35:13-04:00 Merge pull request haskell/haddock#521 from Helkafen/master Version bumps (2.17.3, 1.4.2) - - - - - e95f0dee by Sebastian Meric de Bellefon at 2016-06-06T19:11:35-04:00 publish haddock-test library - - - - - 4de40586 by Sebastian Méric de Bellefon at 2016-06-06T20:26:30-04:00 Merge pull request haskell/haddock#512 from phadej/oleg-fixes Fixes for haskell/haddock#508 and haskell/haddock#510 - - - - - ddfd0789 by Dominic Steinitz at 2016-06-09T09:27:28+01:00 Documentation for LaTeX markup. - - - - - 697a503a by Dominic Steinitz at 2016-06-09T09:33:59+01:00 Fix spelling mistake. - - - - - 246f6fff by Dominic Steinitz at 2016-06-09T09:37:15+01:00 Camel case MathJax. - - - - - 4684bd23 by Dominic Steinitz at 2016-06-09T09:44:53+01:00 Fix math typo and add link. - - - - - f20c037c by Simon Peyton Jones at 2016-06-13T18:26:03+01:00 Follow changes to LHsSigWcType - - - - - 0c58996d by Simon Peyton Jones at 2016-06-15T12:56:01+01:00 Follow GHC re-adding FunTy - - - - - 401b5ca7 by Sebastian Méric de Bellefon at 2016-06-15T12:16:47-04:00 Merge pull request haskell/haddock#525 from idontgetoutmuch/master Documentation for LaTeX markup. - - - - - 92d263b7 by Sebastian Méric de Bellefon at 2016-06-15T12:17:29-04:00 Merge pull request haskell/haddock#522 from Helkafen/master publish haddock-test library - - - - - 0953a2ca by Sebastian Meric de Bellefon at 2016-06-16T00:46:46-04:00 Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 65453e14 by Ben Gamari at 2016-06-16T11:16:32+02:00 ocean: Ensure that synopsis fully covers other content Previously MathJax content was being rendered on top of the synopsis due to ambiguous z-ordering. Here we explicitly give the synopsis block a higher z-index to ensure it is rendered on top. Fixes haskell/haddock#531. - - - - - 68e411a1 by Sebastian Méric de Bellefon at 2016-06-16T23:34:39-04:00 Merge pull request haskell/haddock#534 from bgamari/T531 ocean: Ensure that synopsis fully covers other content - - - - - fad6491b by Sebastian Méric de Bellefon at 2016-06-18T23:57:20-04:00 Merge pull request haskell/haddock#533 from Helkafen/master Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 6108e21b by Sebastian Meric de Bellefon at 2016-06-22T23:08:28-04:00 do not create empty src directory Fix haskell/haddock#536. - - - - - 1ef23823 by Sebastian Méric de Bellefon at 2016-06-24T00:04:48-04:00 Merge pull request haskell/haddock#537 from Helkafen/master do not create empty src directory - - - - - 966baa96 by Omari Norman at 2016-06-29T21:59:34-04:00 Add $ as a special character If this character is not escaped, documentation built with Haddock 2.17.2 will fail. This was not an issue with 2.16 series, which causes builds to fail and there is nothing in the docs or error message giving a clue about why builds that used to succeed now don't. - - - - - 324adb60 by Ben Gamari at 2016-07-01T12:18:51+02:00 GhcUtils: Changes for multi-pattern signatures - - - - - d7571675 by Ömer Sinan Ağacan at 2016-07-21T13:30:47+02:00 Add support for unboxed sums - - - - - 29d0907b by Simon Marlow at 2016-07-22T13:55:48+01:00 Disable NFData instances for GHC types when GHC >= 8.2 - - - - - 702d95f3 by Simon Marlow at 2016-08-02T15:57:30+02:00 Disable NFData instances for GHC types when GHC >= 8.0.2 (cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a) - - - - - f4fa79c3 by Ben Gamari at 2016-08-07T13:51:18+02:00 ghc.mk: Don't attempt to install html/frames.html The frames business has been removed. - - - - - 9cd63daf by Ben Gamari at 2016-08-07T13:51:40+02:00 Haddock.Types: More precise version guard This allows haddock to be built with GHC 8.0.2 pre-releases. - - - - - f3d7e03f by Mateusz Kowalczyk at 2016-08-29T20:47:45+01:00 Merge pull request haskell/haddock#538 from massysett/master Add $ as a special character - - - - - 16dbf7fd by Bartosz Nitka at 2016-09-20T19:44:04+01:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 - - - - - 7c31c1ff by Bartosz Nitka at 2016-09-27T17:32:22-04:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b) - - - - - 33a90dce by Ryan Scott at 2016-09-30T20:53:41-04:00 Haddock changes for T10598 See https://ghc.haskell.org/trac/ghc/ticket/10598 - - - - - 1f32f7cb by Ben Gamari at 2016-10-13T20:01:26-04:00 Update for refactoring of NameCache - - - - - 1678ff2e by Ben Gamari at 2016-11-15T17:42:48-05:00 Bump upper bound on base - - - - - 9262a7c5 by Alan Zimmerman at 2016-12-07T21:14:28+02:00 Match changes in GHC wip/T3384 branch - - - - - ac0eaf1a by Ben Gamari at 2016-12-09T09:48:41-05:00 haddock-api: Don't use stdcall calling convention on 64-bit Windows See GHC haskell/haddock#12890. - - - - - 04afe4f7 by Alan Zimmerman at 2016-12-12T20:07:21+02:00 Matching changes for GHC wip/T12942 - - - - - e1d1701d by Ben Gamari at 2016-12-13T16:50:41-05:00 Bump base upper bound - - - - - 3d3eacd1 by Alan Zimmerman at 2017-01-10T16:59:38+02:00 HsIParamTy now has a Located name - - - - - 7dbceefd by Kyrill Briantsev at 2017-01-12T13:23:50+03:00 Prevent GHC API from doing optimization passes. - - - - - d48d1e33 by Richard Eisenberg at 2017-01-19T08:41:41-05:00 Upstream changes re levity polymorphism - - - - - 40c25ed6 by Alan Zimmerman at 2017-01-26T15:16:18+02:00 Changes to match haskell/haddock#13163 in GHC - - - - - 504f586d by Ben Gamari at 2017-02-02T17:19:37-05:00 Kill remaining static flags - - - - - 49147ea0 by Justus Adam at 2017-03-02T15:33:34+01:00 Adding MDoc to exports of Documentation.Haddock - - - - - 1cfba9b4 by Justus Adam at 2017-03-09T11:41:44+01:00 Also exposing toInstalledIface - - - - - 53f0c0dd by Ben Gamari at 2017-03-09T13:10:08-05:00 Bump for GHC 8.3 - - - - - c7902d2e by Ben Gamari at 2017-03-09T23:46:02-05:00 Bump for GHC 8.2 - - - - - 4f3a74f8 by Ben Gamari at 2017-03-10T10:21:55-05:00 Merge branch 'ghc-head' - - - - - e273b72f by Richard Eisenberg at 2017-03-14T13:34:04-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - 6ec3d436 by Richard Eisenberg at 2017-03-14T15:15:52-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - eee3cda1 by Ben Gamari at 2017-03-15T15:19:59-04:00 Adapt to EnumSet - - - - - 017cf58e by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 736d6773 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 475f84a0 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 13240b53 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - cd16d529 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 3bea97ae by Edward Z. Yang at 2017-03-15T22:50:46-07:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b2b051ce by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 0f082795 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 20ef63c9 by Edward Z. Yang at 2017-03-22T13:48:12-07:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 45692dcb by Edward Z. Yang at 2017-03-22T14:11:25-07:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4eae8caf by Ben Gamari at 2017-03-23T09:25:33-04:00 Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEAD - - - - - 0bbe03f5 by Ben Gamari at 2017-03-23T09:27:28-04:00 haddock-api: Bump bound on GHC - - - - - 65f3ac9d by Alex Biehl at 2017-03-23T17:36:11+01:00 Merge pull request haskell/haddock#581 from JustusAdam/master Adding more exports to Documentation.Haddock - - - - - 37d49a47 by Alex Biehl at 2017-03-23T17:39:14+01:00 Merge pull request haskell/haddock#568 from awson/ghc-head Prevent GHC API from doing optimization passes. - - - - - 1ed047e4 by Brian Huffman at 2017-03-23T17:45:58+01:00 Print any user-supplied kind signatures on type parameters. This applies to type parameters on data, newtype, type, and class declarations, and also to forall-bound type vars in type signatures. - - - - - 1b78ca5c by Brian Huffman at 2017-03-23T17:45:58+01:00 Update test suite to expect kind annotations on type parameters. - - - - - a856b162 by Alex Biehl at 2017-03-23T17:49:32+01:00 Include travis build indication badge - - - - - 8e2e2c56 by Ben Gamari at 2017-03-23T17:20:08-04:00 haddock-api: Bump bound on GHC - - - - - 4d2d9995 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737) - - - - - a650e20f by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858) - - - - - caa282c2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 2067a2d0afa9cef381d26fb7140b67c62f433fc0) - - - - - 49684884 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc) - - - - - 4dcfeb1a by Edward Z. Yang at 2017-03-23T17:20:08-04:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a) - - - - - 74dd19d2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e) - - - - - a9b19a23 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3) - - - - - d3631064 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit bf3c4d72a0fda38561376eac7eda216158783267) - - - - - ef2148fc by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1) - - - - - 2f29518b by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 4eb765ca4205c79539d60b7afa9b7e261a4a49fe) - - - - - 37de047d by Phil Ruffwind at 2017-04-03T11:57:14+02:00 Update MathJax URL MathJax is shutting down their CDN: https://www.mathjax.org/cdn-shutting-down/ They recommend migrating to cdnjs. - - - - - e9d24ba8 by David C. Turner at 2017-04-03T14:58:01+02:00 Add highlight for :target to ocean.css - - - - - 4819a202 by Alex Biehl at 2017-04-11T19:36:48+02:00 Allow base-4.10 for haddock-test - - - - - 44cec69c by Alex Biehl at 2017-04-11T19:39:22+02:00 cabal.project for haddock-api, haddock-library and haddock-test - - - - - 935d0f6a by Alex Biehl at 2017-04-11T19:46:29+02:00 Move dist scripts to scripts/ - - - - - 128e150c by Alex Biehl at 2017-04-11T20:34:46+02:00 Add haddock to cabal.project - - - - - cc8e08ea by Alex Biehl at 2017-04-11T20:35:08+02:00 Read files for hyperlinker eagerly This also exposes Documentation.Haddock.Utf8 - - - - - 152dda78 by Alex Biehl at 2017-04-11T20:37:06+02:00 Explicit import list ofr Control.DeepSeq in Haddock.Interface.Create - - - - - 501b33c4 by Kyrill Briantsev at 2017-04-11T21:01:42+02:00 Prevent GHC API from doing optimization passes. - - - - - c9f3f5ff by Alexander Biehl at 2017-04-12T16:36:53+02:00 Add @alexbiehl as maintaner - - - - - 76f214cc by Alex Biehl at 2017-04-13T07:27:18+02:00 Disable doctest with ghc-8.3 Currently doctest doesn't support ghc-head - - - - - 46b4f5fc by Edward Z. Yang at 2017-04-22T20:38:26-07:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f0555235 by Alex Biehl at 2017-04-25T10:08:48+02:00 Travis: Use ghc-8.2.1 on master - - - - - 966ea348 by Alex Biehl at 2017-04-25T10:32:01+02:00 Travis: Verbose cabal output cf. https://travis-ci.org/haskell/haddock/jobs/225512194#L377 - - - - - 36972bcd by Alex Biehl at 2017-04-25T10:40:43+02:00 Use travis_retry for cabal invocations - - - - - b3a09d2c by Alex Biehl at 2017-04-25T17:02:20+02:00 Use new MathJax URL in html-test 18ed871afb82560d5433b2f53e31b4db9353a74e switched to a new MathJax URL but didn't update the tests. - - - - - ae331e5f by Alexander Biehl at 2017-04-25T17:02:20+02:00 Expand signatures for class declarations - - - - - e573c65a by Alexander Biehl at 2017-04-25T17:02:20+02:00 Hoogle: Correctly print classes with associated data types - - - - - 3fc6be9b by Edward Z. Yang at 2017-04-25T17:02:20+02:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9) - - - - - 6725c060 by Herbert Valerio Riedel at 2017-04-25T17:02:20+02:00 `html-test --accept` deltas to reference samples - - - - - 7d444d61 by Alex Biehl at 2017-04-26T07:13:50+02:00 Remove anything related to obsolete frames mode - - - - - b888972c by Alex Biehl at 2017-04-26T07:49:10+02:00 Cherry-picked remaining commits from haddock-2.17.4-release (#603) * Release haddock/haddock-api 2.17.4 and haddock-library 1.4.3 * Set version bounds for haddock-library NB: This allows GHC 8.2.1's base * Set version bounds for haddock & haddock-api The version bounds support GHC 8.2 * Merge (temporary) v2.17.3 branch into v2.17 This allows us to delete the v2.17.3 branch * Fixup changelog * Pin down haddock-api to a single version as otherwise `haddock`'s package version has no proper meaning * fix source-repo spec for haddock-api - - - - - 4161099b by Alex Biehl at 2017-04-26T11:11:20+02:00 Update changelog to reflect news in HEAD - - - - - eed72cb8 by Alex Biehl at 2017-04-26T11:11:20+02:00 Markdownify changelog - - - - - 5815cea1 by Alex Biehl at 2017-04-26T11:32:33+02:00 Bump to 2.18.0 (#605) - - - - - a551d558 by Alex Biehl at 2017-04-29T22:00:25+02:00 Update attoparsec-0.12.1.1 to attoparsec-0.13.1.0 - - - - - ea164a8d by Sergey Vinokurov at 2017-04-29T22:42:36+02:00 Improve error message - - - - - 2e10122f by Alex Biehl at 2017-04-30T10:07:46+02:00 Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. - - - - - f9b24d99 by Alex Biehl at 2017-05-01T17:40:36+02:00 Lazily decode docMap and argMap (#610) These are only used in case of a doc reexport so most of the time decoding these is wasted work. - - - - - 2372af62 by Alex Biehl at 2017-05-01T21:59:23+02:00 Fix Binary instance for InstalledInterface (#611) (#610) introduced lazy decoding for docs from InstalledInterface but forgot to remove the original calls to get and put_ - - - - - 6c633c13 by Nathan Collins at 2017-05-11T11:47:55+02:00 Improve documenation of Haddock markup (#614) * Improve documentation of Haddock markup. - document that Haddock supports inferring types top-level functions with without type signatures, but also explain why using this feature is discouraged. Looks like this feature has been around since version 2.0.0.0 in 2008! - rework the "Module description" section: - move the general discussion of field formatting to the section intro and add examples illustrating the prose for multiline fields. - mention that newlines are preserved in some multiline fields, but not in others (I also noticed that commas in the `Copyright` field are not preserved; I'll look into this bug later). - add a subsection for the module description fields documentation, and put the field keywords in code formatting (double back ticks) instead of double quotes, to be consistent with the typesetting of keywords in other parts of the documentation. - mention that "Named chunks" are not supported in the long-form "Module description" documentation. - fix formatting of keywords in the "Module attributes" section. Perhaps these errors were left over from an automatic translation to ReST from some other format as part of the transition to using Sphinx for Haddock documentation? Also, add a missing reference here; it just said "See ?"! - update footnote about special treatment for re-exporting partially imported modules not being implemented. In my tests it's not implemented at all -- I tried re-exporting both `import B hiding (f)` and `import B (a, b)` style partial imports, and in both cases got the same result as with full imports `import B`: I only get a module reference. * Rework the `Controlling the documentation structure` section. My main goal was to better explain how to use Haddock without an export list, since that's my most common use case, but I hope I improved the section overall: - remove the incomplete `Omitting the export list` section and fold it into the other sections. In particular, summarize the differences between using and not using an export list -- i.e. control over what and in what order is documented -- in the section lead. - add "realistic" examples that use the structure markup, both with and without an export list. I wanted a realistic example here to capture how it can be useful to explain the relationship between a group of functions in a section, in addition to documenting their individual APIs. - make it clear that you can associate documentation chunks with documentation sections when you aren't using an export list, and that doing it in the most obvious way -- i.e. with `-- |`, as you can in the export list -- doesn't work without an export list. It took me a while to figure this out the first time, since the docs didn't explain it at all before. - add a "no export list" example to the section header section. - add more cross references. * Add examples of gotchas for markup in `@...@`. I'm not sure this will help anyone, since I think most people first learn about `@...@` by reading other people's Haddocks, but I've documented the mistakes which I've made and then gotten confused by. * Use consistent Capitalization of Titles. Some titles were in usual title caps, and others only had the first word capitalized. I chose making them all use title caps because that seems to make the cross references look better. - - - - - d4734f45 by Ben Gamari at 2017-05-12T20:36:08+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 93883f37 by Alex Biehl at 2017-05-12T21:02:33+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 5b8f179c by Alex Biehl at 2017-05-13T12:48:10+02:00 Consequently use inClass and notInClass in haddock-library (#617) These allow attoparsec to do some clever lookup optimization - - - - - 77984b82 by Doug Wilson at 2017-05-27T17:37:38+02:00 Don't enable compilation for template haskell (#624) This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa - - - - - 5a3de2b4 by Doug Wilson at 2017-05-27T19:54:53+02:00 Improve Syb code (#621) Specialize.hs and Ast.hs are modified to have their Syb code not recurse into Name or Id in HsSyn types. Specialize.hs is refactored to have fewer calls to Syb functions. Syb.hs has some foldl calls replaced with foldl' calls. There is still a lot of performance on the floor of Ast.hs. The RenamedSource is traversed many times, and lookupBySpan is very inefficient. everywhereBut and lookupBySpan dominate the runtime whenever --hyperlinked-source is passed. - - - - - 3d35a949 by Alex Biehl at 2017-05-30T19:01:37+02:00 Clear fixme comment (#625) - - - - - 2a44bd0c by Alex Biehl at 2017-05-30T19:02:12+02:00 Make haddock-library and haddock-api warning free (#626) - - - - - bd1a0e42 by Alex Biehl at 2017-06-01T10:40:33+02:00 Include `driver-test/*.hs` sdist (#630) This lead to haskell/haddock#629. - - - - - 184a3ab6 by Doug Wilson at 2017-06-03T12:02:08+02:00 Disable pattern match warnings (#628) This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns - - - - - 0cf68004 by Alex Biehl at 2017-06-03T20:37:28+02:00 Allow user defined signatures for pattern synonyms (#631) - - - - - 7f51a58a by Alex Biehl at 2017-06-04T11:56:38+02:00 Use NameSet for isExported check (#632) - - - - - d8f044a9 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Match new AST as per GHC wip/new-tree-one-param See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow - - - - - da1254e3 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Rename extension index tags - - - - - 538c7514 by Christiaan Baaij at 2017-06-09T08:26:43+02:00 Haddock support for bundled pattern synonyms (#627) * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after haskell/haddock#631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case - - - - - a050bffd by Doug Wilson at 2017-06-21T09:27:33+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636) There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6 - - - - - 5d06b871 by Doug Wilson at 2017-06-22T20:23:29+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639) * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports - - - - - b11bb73a by Alex Biehl at 2017-06-23T14:44:41+02:00 Lookup fixities for reexports without subordinates (#642) So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In haskell/haddock#644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from haskell/haddock#642 top-level functions now started to fail reexporting their fixities. - - - - - d2a6dad6 by Alex Biehl at 2017-06-23T18:30:45+02:00 Don't include names with empty subordinates in maps (#644) These are unecessary anyway and just blow up interface size - - - - - 69c2aac4 by Alex Biehl at 2017-06-29T19:54:49+02:00 Make per-argument docs for class methods work again (#648) * Make per-argument docs for class methods work again * Test case - - - - - c9448d54 by Bartosz Nitka at 2017-07-02T12:12:01+02:00 Fix haddock: internal error: links: UnhelpfulSpan (#561) * Fix haddock: internal error: links: UnhelpfulSpan This fixes haskell/haddock#554 for me. I believe this is another fall out of `wildcard-refactor`, like haskell/haddock#549. * Comment to clarify why we take the methods name location - - - - - d4f29eb7 by Alex Biehl at 2017-07-03T19:43:04+02:00 Document record fields when DuplicateRecordFields is enabled (#649) - - - - - 9d6e3423 by Yuji Yamamoto at 2017-07-03T22:37:58+02:00 Fix test failures on Windows (#564) * Ignore .stack-work * Fix for windows: use nul instead of /dev/null * Fix for windows: canonicalize line separator * Also normalize osx line endings - - - - - 7d81e8b3 by Yuji Yamamoto at 2017-07-04T16:13:12+02:00 Avoid errors on non UTF-8 Windows (#566) * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1) - - - - - eded67d2 by Alex Biehl at 2017-07-07T19:17:15+02:00 Remove redudant import warning (#651) - - - - - 05114757 by Alex Biehl at 2017-07-08T00:33:12+02:00 Avoid missing home module warning (#652) * Avoid missing home module warning * Update haddock-library.cabal - - - - - e9cfc902 by Bryn Edwards at 2017-07-17T07:51:20+02:00 Fix haskell/haddock#249 (#655) - - - - - eb02792b by Herbert Valerio Riedel at 2017-07-20T09:09:15+02:00 Fix compilation of lib:haddock-library w/ GHC < 8 - - - - - 9200bfbc by Alex Biehl at 2017-07-20T09:20:38+02:00 Prepare 2.18.1 release (#657) - - - - - 46ddd22c by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Tweak haddock-api.cabal for pending release - - - - - 85e33d29 by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Avoid trivial use of LambdaCase otherwise we can't test w/ e.g. GHC 7.4.2 - - - - - 3afb4bfe by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Refactor .cabal to use sub-lib for vendored lib A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite. - - - - - e56a552e by Herbert Valerio Riedel at 2017-07-20T10:17:48+02:00 haddock-api: add changelog pointing to haddock's changelog This addresses https://github.com/haskell/haddock/issues/638#issuecomment-309283297 - - - - - 2222ff0d by Herbert Valerio Riedel at 2017-07-20T10:19:56+02:00 Drop obsolete/misleading `stability: experimental` This .cabal property has long been considered obsolete - - - - - 9b882905 by Alex Biehl at 2017-07-20T11:25:54+02:00 Beef up haddock description (#658) * Beef up haddock description * Handle empty lines - - - - - bb60e95c by Herbert Valerio Riedel at 2017-07-20T12:08:53+02:00 Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet - - - - - 0761e456 by Herbert Valerio Riedel at 2017-07-20T12:12:55+02:00 Add cheatsheet to haddock.cabal - - - - - 2ece0f0f by Herbert Valerio Riedel at 2017-07-20T12:18:38+02:00 Mention new-build in README - - - - - 947b7865 by Herbert Valerio Riedel at 2017-07-20T12:32:16+02:00 Update README Also improves markup and removes/fixes redundant/obsolete parts [skip ci] - - - - - 785e09ad by Alex Biehl at 2017-07-27T07:28:57+02:00 Bump haddock to 2.18.2, haddock-library to 1.4.5 - - - - - e3ff1ca3 by Alex Biehl at 2017-07-31T20:15:32+02:00 Move `DocMarkup` from haddock-api to haddock-library (#659) * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG - - - - - cda7c20c by Alex Biehl at 2017-07-31T20:35:49+02:00 Fixup haddock - - - - - 583b6812 by Alex Biehl at 2017-07-31T21:20:45+02:00 Changelog for haddock-library - - - - - bac6a0eb by Alex Biehl at 2017-07-31T21:50:24+02:00 Prepare haddock-library-1.4.5 release - - - - - 58ce6877 by Moritz Drexl at 2017-08-05T16:44:40+02:00 Fix renaming after instance signature specializing (#660) * rework rename * Add regression test for Bug 613 * update tests * update changelog - - - - - b8137ec8 by Tim Baumann at 2017-08-06T11:33:38+02:00 Fix: Generate pattern signatures for constructors exported as patterns (#663) * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes haskell/haddock#653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR haskell/haddock#663 * Fix extractPatternSyn error message - - - - - d037086b by Alex Biehl at 2017-08-06T12:43:25+02:00 Bump haddock-library - - - - - 99d7e792 by Alex Biehl at 2017-08-06T12:44:07+02:00 Bump haddock-library in haddock-api - - - - - 94802a5b by Alex Biehl at 2017-08-06T13:18:02+02:00 Provide --show-interface option to dump interfaces (#645) * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated. - - - - - c662e476 by Ryan Scott at 2017-08-14T21:00:21-04:00 Adapt to haskell/haddock#14060 - - - - - b891eb73 by Alex Biehl at 2017-08-16T08:24:48+02:00 Bifoldable and Bitraversable for DocH and MetaDoc - - - - - 021bb56c by Alex Biehl at 2017-08-16T09:06:40+02:00 Refactoring: Make doc renaming monadic This allows us to later throw warnings if can't find an identifier - - - - - 39fbf022 by Alex Biehl at 2017-08-19T20:35:27+02:00 Hyperlinker: Avoid linear lookup in enrichToken (#669) * Make Span strict in Position * Hyperlinker: Use a proper map to enrich tokens - - - - - e13baedd by Alex Biehl at 2017-08-21T20:05:42+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 27dd6e87 by Alex Biehl at 2017-08-21T22:06:35+02:00 Drop Avails from export list - - - - - 86b247e2 by Alex Biehl at 2017-08-22T08:44:22+02:00 Bump ghc version for haddock-api tests - - - - - d4607ca0 by Alex Biehl at 2017-08-22T08:45:17+02:00 Revert "Drop Avails from export list" This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def. - - - - - c9c54c30 by Alex Biehl at 2017-08-22T09:26:01+02:00 IntefaceFile version - - - - - a85b7c02 by Ben Gamari at 2017-08-22T09:29:52-04:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 34e976f5 by Ben Gamari at 2017-08-22T17:40:06+02:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 577abf06 by Ryan Scott at 2017-08-23T14:47:29-04:00 Update for haskell/haddock#14131 - - - - - da68fc55 by Florian Eggenhofer at 2017-08-27T18:21:56+02:00 Generate an index for package content search (#662) Generate an index for package content search - - - - - 39e62302 by Alex Biehl at 2017-08-27T18:50:16+02:00 Content search for haddock html doc - - - - - 91fd6fb2 by Alex Biehl at 2017-08-28T18:39:58+02:00 Fix tests for content search - - - - - b4a3798a by Alex Biehl at 2017-08-28T18:44:08+02:00 Add search button to #page-menu - - - - - 25a7ca65 by Alex Biehl at 2017-08-28T18:47:43+02:00 Load javascript below the fold - - - - - 8d323c1a by Alex Biehl at 2017-08-28T18:49:22+02:00 Accept tests - - - - - c5dac557 by Alex Biehl at 2017-08-28T19:14:55+02:00 Content search css - - - - - 89a5af57 by Paolo Veronelli at 2017-08-29T07:42:13+02:00 Removed `nowrap` for interface method sigs (#674) with nowrap the interfaces method sigs would expand at libitum - - - - - a505f6f7 by Alex Biehl at 2017-08-29T08:05:33+02:00 Include subordinates in content index - - - - - 4bb698c4 by Alexander Biehl at 2017-08-29T11:40:19+02:00 QuickNav: Make docbase configurable - - - - - c783bf44 by Alexander Biehl at 2017-08-29T11:48:36+02:00 QuickNav: Also use baseUrl for doc-index.json request - - - - - 47017510 by Alex Biehl at 2017-08-29T17:56:47+02:00 Fix test fallout (again) - - - - - 924fc318 by Alex Biehl at 2017-08-30T09:24:56+02:00 Write meta.json when generating html output (#676) - - - - - 717dea52 by Alex Biehl at 2017-09-01T09:20:34+02:00 Use relative URL when no docBaseUrl given - - - - - e5d85f3b by Alex Biehl at 2017-09-01T09:35:19+02:00 Add missing js files to data-files (#677) - - - - - 95b9231a by Alex Biehl at 2017-09-01T11:01:36+02:00 Rename "Search" tab to "Quick Jump" - - - - - da0ead0b by Alex Biehl at 2017-09-01T13:03:49+02:00 Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger - - - - - de7da594 by Ben Gamari at 2017-09-05T06:49:55-04:00 Account for "Remember the AvailInfo for each IE" As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building. - - - - - b05cd3b3 by Ben Gamari at 2017-09-14T07:55:07-04:00 Bump upper bound on base - - - - - 79db899e by Herbert Valerio Riedel at 2017-09-21T23:27:52+02:00 Make compatible with Prelude.<> export in GHC 8.4/base-4.11 - - - - - 3405dd52 by Tim Baumann at 2017-09-23T22:02:01+02:00 Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme - - - - - df0b5742 by Alex Biehl at 2017-09-29T21:15:40+02:00 Bump base for haddock-library and haddock-test - - - - - 62b12ea0 by Merijn Verstraaten at 2017-10-04T16:03:13+02:00 Inhibit output of coverage information for hidden modules. (#687) * Inhibit output of coverage information for hidden modules. * Add changelog entry. - - - - - 8daf8bc1 by Alexander Biehl at 2017-10-05T11:27:05+02:00 Don't use subMap in attachInstances - - - - - ad75114e by Alexander Biehl at 2017-10-05T11:27:58+02:00 Revert "Don't use subMap in attachInstances" This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9. - - - - - 7d4aa02f by Alex Biehl at 2017-10-08T15:32:28+02:00 Precise Haddock: Use Avails for export resolution (#688) * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting - - - - - b9b4faa8 by Alex Biehl at 2017-10-08T19:38:21+02:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 43325295 by Alex Biehl at 2017-10-08T20:18:46+02:00 Fix merge fallout - - - - - c6423cc0 by Alex Biehl at 2017-10-08T20:36:12+02:00 Copy QuickJump files over - - - - - 1db587c3 by Tim Baumann at 2017-10-09T18:33:09+02:00 Use <details> element for collapsibles (#690) * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes haskell/haddock#560. - - - - - 1b54c64b by Tim Baumann at 2017-10-10T09:50:59+02:00 Quick Jump: Show error when loading 'doc-index.json' failed (#691) - - - - - 910f716d by Veronika Romashkina at 2017-10-24T07:36:20+02:00 Fix tiny typo in docs (#693) - - - - - b21de7e5 by Ryan Scott at 2017-10-24T13:07:15+02:00 Overhaul Haddock's rendering of kind signatures (#681) * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC - - - - - 6704405c by Ryan Scott at 2017-10-28T07:10:27+02:00 Fix Haddock rendering of kind-indexed data family instances (#694) - - - - - 470f6b9c by Alex Biehl at 2017-10-30T08:45:51+01:00 Add QuickJump version to meta.json (#696) - - - - - b89eccdf by Alex Biehl at 2017-10-30T10:15:49+01:00 Put Quickjump behind --quickjump flag (#697) - - - - - 3095fb58 by Alex Biehl at 2017-10-30T19:09:06+01:00 Add build command to package.json - - - - - f223fda9 by Alex Biehl at 2017-10-30T19:10:39+01:00 Decrease threshold for fuzzy matching - - - - - 80245dda by Edward Z. Yang at 2017-10-31T20:35:05+01:00 Supported reexported-modules via --reexport flag. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 7e389742 by Alex Biehl at 2017-10-31T20:37:56+01:00 Correct missing title in changelog - - - - - 1a2a1c03 by Alex Biehl at 2017-10-31T20:59:07+01:00 Copy quickjump.css for nicer error messages - - - - - db234bb9 by Alex Biehl at 2017-10-31T21:31:18+01:00 Reexported modules: Report warnings if argument cannot be parsed or ... module cannot be found - - - - - eea8a205 by Carlo Hamalainen at 2017-10-31T21:43:14+01:00 More general type for nameCacheFromGhc. (#539) - - - - - 580eb42a by Alex Biehl at 2017-10-31T21:46:52+01:00 Remote tab - - - - - 0e599498 by Alex Biehl at 2017-10-31T21:48:55+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 7b8539bb by Alex Biehl at 2017-10-31T22:28:34+01:00 fullModuleContents traverses exports in declaration order - - - - - 0c91fbf2 by Alex Biehl at 2017-10-31T22:32:31+01:00 Remove excessive use of list comprehensions - - - - - f7356e02 by Alex Biehl at 2017-11-01T19:11:03+01:00 Make better use of AvailInfo - - - - - f3e512d5 by Alex Biehl at 2017-11-02T12:16:22+01:00 Always return documentation for exported subordinates ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks. - - - - - 7cf58898 by Alan Zimmerman at 2017-11-07T08:28:03+02:00 Match changes for Trees that Grow in GHC - - - - - e5105a41 by Alan Zimmerman at 2017-11-08T17:21:58+02:00 Match Trees That Grow - - - - - 55178266 by Alan Zimmerman at 2017-11-11T22:20:31+02:00 Match Trees that Grow in GHC for HsExpr - - - - - 2082ab02 by Ryan Scott at 2017-11-14T15:27:03+01:00 Actually render infix type operators as infix (#703) * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too - - - - - c52ab7d0 by Alan Zimmerman at 2017-11-14T23:14:26+02:00 Clean up use of PlaceHolder, to match TTG - - - - - 81cc9851 by Moritz Angermann at 2017-11-20T07:52:49+01:00 Declare use of `Paths_haddock` module in other-modules (#705) This was detected by `-Wmissing-home-modules` - - - - - f9d27598 by Moritz Angermann at 2017-11-20T12:47:34+01:00 Drop Paths_haddock from ghc.mk (#707) With haskell/haddock#705 and haskell/haddock#706, the custom addition should not be necessary any more. # Conflicts: # ghc.mk - - - - - f34818dc by Moritz Angermann at 2017-11-20T12:47:59+01:00 Add autogen-modules (#706) > Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail. # Conflicts: # haddock.cabal - - - - - bb43a0aa by Ben Gamari at 2017-11-21T15:50:12-05:00 Revert "Clean up use of PlaceHolder, to match TTG" This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049. - - - - - af9ebb2b by Ben Gamari at 2017-11-21T15:50:14-05:00 Revert "Match Trees that Grow in GHC for HsExpr" This reverts commit 9f054dc365379c66668de6719840918190ae6e44. - - - - - 5d35c3af by Ben Gamari at 2017-11-21T15:50:15-05:00 Revert "Match Trees That Grow" This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c. - - - - - 99a8e43b by Ben Gamari at 2017-11-21T16:36:06-05:00 Revert "Match changes for Trees that Grow in GHC" This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547. - - - - - c4d650c2 by Ben Gamari at 2017-12-04T15:06:07-05:00 Bump GHC version - - - - - 027b2274 by Ben Gamari at 2017-12-04T17:06:31-05:00 Bump GHC bound to 8.4.* - - - - - 58eaf755 by Alex Biehl at 2017-12-06T15:44:24+01:00 Update changelog - - - - - d68f5584 by Simon Peyton Jones at 2017-12-07T14:39:56+00:00 Track changes to follow Trac haskell/haddock#14529 This tracks the refactoring of HsDecl.ConDecl. - - - - - dc519d6b by Alec Theriault at 2018-01-06T08:20:43-08:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - 8285118c by Alec Theriault at 2018-01-13T12:12:37+01:00 Constructor and pattern synonym argument docs (#709) * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors. - - - - - ca4fabb4 by Alec Theriault at 2018-01-15T17:12:18-08:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 4c472fea by Ryan Scott at 2018-01-19T10:44:02+01:00 Fix haskell/haddock#732 (#733) - - - - - bff14dbd by Alex Biehl at 2018-01-19T15:33:30+01:00 extractDecl: Extract associated types correctly (#736) - - - - - a2a94a73 by Alex Biehl at 2018-01-19T15:34:40+01:00 extractDecl: Extract associated types correctly (#736) - - - - - 26df93dc by Alex Biehl at 2018-01-20T10:18:22+01:00 haddock-api: bump ghc to ^>= 8.4 - - - - - f65aeb1d by Alex Biehl at 2018-01-20T19:18:20+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - 0e721b97 by Alex Biehl at 2018-01-20T19:20:19+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - cb6234f6 by Ben Gamari at 2018-01-26T13:40:55-05:00 Merge remote-tracking branch 'harpocrates/fix/missing-orphan-instances' into ghc-head - - - - - 0fc28554 by Alec Theriault at 2018-02-01T14:58:18+01:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - b9123772 by Alec Theriault at 2018-02-01T14:58:18+01:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 0c12e274 by Ryan Scott at 2018-02-01T14:58:18+01:00 Fix haskell/haddock#548 by rendering datatype kinds more carefully (#702) - - - - - 8876d20b by Alec Theriault at 2018-02-01T14:58:18+01:00 Use the GHC lexer for the Hyperlinker backend (#714) * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog - - - - - 95c6a771 by Alec Theriault at 2018-02-01T14:58:18+01:00 Clickable anchors for headings (#716) See haskell/haddock#579. This just adds an <a> tag around the heading, pointing to the heading itself. - - - - - 21463d28 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump: Matches on function names weight more than matches in ... module names. - - - - - 8023af39 by Alex Biehl at 2018-02-01T14:58:18+01:00 Treat escaped \] better in definition lists (#717) This fixes haskell/haddock#546. - - - - - e4866dc1 by Alex Biehl at 2018-02-01T14:58:18+01:00 Remove scanner, takeWhile1_ already takes care of escaping - - - - - 9bcaa49d by Alex Biehl at 2018-02-01T14:58:18+01:00 Take until line feed - - - - - 01d2af93 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. - - - - - 31128417 by Alec Theriault at 2018-02-01T14:58:18+01:00 Patch flaky parser test (#720) * Patch flaky parser test This test was a great idea, but it doesn't port over too well to using the GHC lexer. GHC rewrites its input a bit - nothing surprising, but we need to guard against those cases for the test. * Change instance head * Change use site - - - - - 9704f214 by Herbert Valerio Riedel at 2018-02-01T14:58:18+01:00 Include secondary LICENSE file in source dist - - - - - 51f25074 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Grid Tables (#718) * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example - - - - - 670d6200 by Alex Biehl at 2018-02-01T14:58:18+01:00 Add grid table example to cheatsheet (pdf and svg need to be regenerated thought) - - - - - 4262dec9 by Alec Theriault at 2018-02-01T14:58:18+01:00 Fix infinite loop when specializing instance heads (#723) * Fix infinite loop when specializing instance heads The bug can only be triggered from TH, hence why it went un-noticed for so long. * Add test for haskell/haddock#679 and haskell/haddock#710 - - - - - 67ecd803 by Alec Theriault at 2018-02-01T14:58:18+01:00 Filter RTS arguments from 'ghc-options' arguments (#725) This fixes haskell/haddock#666. - - - - - 7db26992 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump Scrollable overlay - - - - - da9ff634 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Hyperlinker: Adjust parser to new PFailed constructor - - - - - 7b7cf8cb by Alexander Biehl at 2018-02-01T14:58:18+01:00 Specialize: Add missing IdP annotations - - - - - 78cd7231 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Convert: Correct pass type - - - - - a2d0f590 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Warning free compilation - - - - - cd861cf3 by Alexander Biehl at 2018-02-01T14:58:18+01:00 hadock-2.19.0 / haddock-api-2.19.0 / haddock-library-1.5.0 - - - - - c6651b72 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Adjust changelogs - - - - - 1e93da0b by Alexander Biehl at 2018-02-01T14:58:18+01:00 haddock-library: Info about breaking changes - - - - - f9b11db8 by Alec Theriault at 2018-02-02T12:36:02+01:00 Properly color pragma contents in hyperlinker The hyperlinker backend now classifies the content of pragmas as 'TkPragma'. That means that in something like '{-# INLINE foo #-}', 'foo' still gets classified as a pragma token. - - - - - c40b0043 by Alec Theriault at 2018-02-02T12:36:02+01:00 Support the new 'ITcolumn_prag' token - - - - - 4a2a4d39 by Alex Biehl at 2018-02-03T12:11:55+01:00 QuickJump: Mitigate encoding problems on Windows - - - - - bb34503a by Alex Biehl at 2018-02-04T18:39:31+01:00 Use withBinaryFile - - - - - 637605bf by Herbert Valerio Riedel at 2018-02-05T09:48:32+01:00 Try GHC 8.4.1 for Travis CI job - - - - - 7abb67e4 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 try harder to build w/ GHC 8.4.1 - - - - - 8255cc98 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 Add `SPDX-License-Identifier` as alised for "license" module header tokens C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from haskell/haddock#743 - - - - - 267cd23d by Herbert Valerio Riedel at 2018-02-05T10:24:34+01:00 Make test-suite SMP compatible - - - - - 95d4bf40 by Alec Theriault at 2018-02-05T22:01:04+01:00 Hyperlink pattern synonyms and 'module' imports (#744) Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes haskell/haddock#731. - - - - - 67838dcd by Alec Theriault at 2018-02-06T08:23:36+01:00 Don't warn about missing '~' (#746) This manually filters out '~' from the list of things to warn about. It truly makes no sense to warn on this since '~' has nothing it could link to - it is magical. This fixes haskell/haddock#532. - - - - - ab6c3f9f by Alec Theriault at 2018-02-06T08:24:47+01:00 Don't barf on 'HsSpliceTy' (#745) This handles 'HsSpliceTy's by replacing them with what they expand to. IIUC everything that is happening, 'renameHsSpliceTy' should not be able to fail for the inputs we feed it from GHC. This fixes haskell/haddock#574. - - - - - 92bf95ad by Alex Biehl at 2018-02-06T08:28:23+01:00 Rename: renameHsSpliceTy ttg - - - - - 3130b1e1 by Alex Biehl at 2018-02-06T09:02:14+01:00 Expand SigDs - - - - - c72adae5 by Alex Biehl at 2018-02-06T09:20:51+01:00 fullModuleContents: support named docs - - - - - de2e4dbf by Alex Biehl at 2018-02-06T13:56:17+01:00 Hyperlinker: Also link pattern synonym arguments - - - - - b7c98237 by Alex Biehl at 2018-02-09T18:44:23+01:00 Expand SigD in a better place In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place. - - - - - 8f598b27 by Alec Theriault at 2018-02-11T12:29:56+01:00 Add module tooltips to linked identifiers (#753) No more clicking to figure out whether your bytestring is strict or lazy! - - - - - d812e65d by Alec Theriault at 2018-02-11T12:31:44+01:00 Add 'show' option to complement 'hide' (#752) * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes haskell/haddock#751 and haskell/haddock#266. * Add a '--show-all' option - - - - - 6676cecb by Alex Biehl at 2018-02-18T11:07:15-05:00 QuickJump: Mitigate encoding problems on Windows (cherry picked from commit 86292c54bfee2343aee84559ec01f1fc68f52231) - - - - - e753dd88 by Alex Biehl at 2018-02-18T17:59:54+01:00 Use withBinaryFile - - - - - 724dc881 by Tamar Christina at 2018-02-19T05:34:49+01:00 Haddock: support splitted include paths. (#689) - - - - - 9b6d6f50 by Alex Biehl at 2018-02-19T05:57:02+01:00 Teach the HTML backend how to render methods with multiple names - - - - - a74aa754 by Alexander Biehl at 2018-02-19T10:04:34+01:00 Hoogle/Latex: Remove use of partial function - - - - - 66d8bb0e by Alec Theriault at 2018-02-25T16:04:01+01:00 Fix file handle leak (#763) (#764) Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137. - - - - - bb92d03d by Alex Biehl at 2018-03-02T14:21:23+01:00 Enable running test suite with stock haddock and ghc using ``` $ cabal new-run -- html-test --haddock-path=$(which haddock) --ghc-path=$(which ghc) ``` - - - - - dddb3cb2 by Alex Biehl at 2018-03-02T15:43:21+01:00 Make testsuite work with haddock-1.19.0 release (#766) - - - - - f38636ed by Alec Theriault at 2018-03-02T15:48:36+01:00 Support unicode operators, proper modules Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes haskell/haddock#458. - - - - - 09d89f7c by Alec Theriault at 2018-03-02T15:48:43+01:00 Remove bang pattern - - - - - d150a687 by Alex Biehl at 2018-03-02T15:48:48+01:00 fix test - - - - - d6fd71a5 by Alex Biehl at 2018-03-02T16:22:38+01:00 haddock-test: Be more explicit which packages to pass We now pass `-hide-all-packages` to haddock when invoking the testsuite. This ensures we don't accidentally pick up any dependencies up through ghc.env files. - - - - - 0932c78c by Alex Biehl at 2018-03-02T17:50:38+01:00 Revert "fix test" This reverts commit 1ac2f9569242f6cb074ba6e577285a4c33ae1197. - - - - - 52516029 by Alex Biehl at 2018-03-02T18:16:50+01:00 Fix Bug548 for real - - - - - 89df9eb5 by Alex Biehl at 2018-03-05T18:28:19+01:00 Hyperlinker: Links for TyOps, class methods and associated types - - - - - d019a4cb by Ryan Scott at 2018-03-06T13:43:56-05:00 Updates for haskell/haddock#13324 - - - - - 6d5a42ce by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump haddock-2.19.0.1, haddock-api-2.19.0.1, haddock-library-1.5.0.1 - - - - - c0e6f380 by Alex Biehl at 2018-03-10T18:25:57+01:00 Update changelogs for haddock-2.19.0.1 and haddock-library-1.5.0.1 - - - - - 500da489 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Update to QC 2.11 - - - - - ce8362e9 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Restore backward-compat with base-4.5 through base-4.8 - - - - - baae4435 by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump lower bound for haddock-library - - - - - 10b7a73e by Alex Biehl at 2018-03-10T18:25:57+01:00 Haddock: Straighten out base bound - - - - - a6096f7b by Alex Biehl at 2018-03-13T08:45:06+01:00 extractDecl: Extract constructor patterns from data family instances (#776) * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors - - - - - ba4a0744 by Simon Jakobi at 2018-03-14T08:26:42+01:00 Readme: Update GHC version (#778) - - - - - 8de157d4 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for definition lists - - - - - 425b46f9 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for links - - - - - d53945d8 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for inline links - - - - - f1dc7c99 by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Slightly unmangle output - - - - - 0879d31c by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Prevent stdout buffering - - - - - 1f9e5f1b by Simon Jakobi at 2018-03-14T20:39:29+01:00 haddock-library.cabal: Clean up GHC options - - - - - 066b891a by Simon Jakobi at 2018-03-14T20:39:29+01:00 Make a proper definition for the <link> parser - - - - - 573d6ba7 by Alec Theriault at 2018-03-21T09:16:57+01:00 Show where instances are defined (#748) * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests - - - - - 99b5d28b by Alex Biehl at 2018-03-21T09:20:36+01:00 Prepare changelog for next release - - - - - 482d3a93 by Alex Biehl at 2018-03-23T15:57:36+01:00 Useful cost centres, timers and allocation counters (#785) * Add some useful cost-centres for profiling * Add withTiming for each haddock phase Invoking haddock with `--optghc=-ddump-timings` now shows the amount of time spent and the number of allocated bytes for each phase. - - - - - 773b41bb by Alec Theriault at 2018-03-27T08:35:59+02:00 @since includes package name (#749) * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too. - - - - - e42c57bc by Alex Biehl at 2018-03-27T08:42:50+02:00 haddock-2.19.1, haddock-api-2.19.1, haddock-library-1.6.0 - - - - - 8373a529 by Alex Biehl at 2018-03-28T10:17:11+02:00 Bump haddock and haddock-api to 2.20.0 - - - - - 5038eddd by Jack Henahan at 2018-04-03T13:28:12+02:00 Clear search string on hide for haskell/haddock#781 (#789) - - - - - 920ca1eb by Alex Biehl at 2018-04-03T16:35:50+02:00 Travis: Build with ghc-8.4.2 (#793) - - - - - a232f0eb by Alan Zimmerman at 2018-04-07T14:14:32+02:00 Match changes in GHC for D4199 Removing HasSourceText and SourceTextX classes. - - - - - ab85060b by Alan Zimmerman at 2018-04-09T21:20:24+02:00 Match GHC changes for TTG - - - - - 739302b6 by Alan Zimmerman at 2018-04-13T13:31:44+02:00 Match GHC for TTG implemented on HsBinds, D4581 - - - - - 2f56d3cb by Ryan Scott at 2018-04-19T11:42:58-04:00 Bump upper bound on base to < 4.13 See https://ghc.haskell.org/trac/ghc/ticket/15018. - - - - - a49df92a by Alex Biehl at 2018-04-20T07:31:44+02:00 Don't treat fixity signatures like declarations - - - - - d02c103b by Ryan Scott at 2018-04-24T11:20:11-04:00 Add regression test for haskell/haddock#413 Fixes haskell/haddock#413. - - - - - c7577f52 by Ryan Scott at 2018-04-24T13:51:06-07:00 Improve the Hoogle backend's treatment of type families (#808) Fixes parts 1 and 2 of haskell/haddock#806. - - - - - d88f85b1 by Alec Theriault at 2018-04-25T11:24:07-07:00 Replace 'attoparsec' with 'parsec' (#799) * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments - - - - - fc25e2fe by Alan Zimmerman at 2018-04-27T15:36:53+02:00 Match changes in GHC for TTG - - - - - 06175f91 by Herbert Valerio Riedel at 2018-05-01T18:11:09+02:00 Merge branch 'ghc-head' with 'ghc-8.4' - - - - - 879caaa8 by Alec Theriault at 2018-05-07T18:53:15-07:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 3e0120cb by Simon Jakobi at 2018-05-07T19:00:18-07:00 Add docs for some DocH constructors (#814) - - - - - 0a32c6db by Alec Theriault at 2018-05-08T02:15:45-07:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 8816e783 by Simon Jakobi at 2018-05-08T10:48:11-07:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - ad60366f by Ryan Scott at 2018-05-10T11:19:47-04:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - 03b7cc3b by Ryan Scott at 2018-05-10T11:24:38-04:00 Wibbles - - - - - b03dd563 by Chaitanya Koparkar at 2018-05-10T11:44:58-04:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 9f298a40 by Ben Gamari at 2018-05-13T17:36:04-04:00 Account for refactoring of LitString - - - - - ea3dabe7 by Ryan Scott at 2018-05-16T09:21:43-04:00 Merge pull request haskell/haddock#826 from haskell/T825 Remove Hoogle backend hack that butchers infix datatype names - - - - - 0d234f7c by Alec Theriault at 2018-05-23T11:29:05+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 15fc9712 by Simon Jakobi at 2018-05-31T04:17:47+02:00 Adjust to new HsDocString internals - - - - - 6f1e19a8 by Ben Gamari at 2018-06-02T16:18:58-04:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 0d0355d9 by Ryan Scott at 2018-06-04T21:26:59-04:00 DerivingVia changes - - - - - 0d93475a by Simon Jakobi at 2018-06-05T19:47:05+02:00 Bump a few dependency bounds (#845) - - - - - 5cbef804 by Alec Theriault at 2018-06-05T19:47:16+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 9094c56f by Alec Theriault at 2018-06-05T22:53:25+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 70188719 by Simon Jakobi at 2018-06-08T22:20:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - 495cd1fc by Chaitanya Koparkar at 2018-06-13T23:01:34+02:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 81088732 by Ben Gamari at 2018-06-13T23:01:34+02:00 Account for refactoring of LitString - - - - - 7baf6587 by Simon Jakobi at 2018-06-13T23:05:08+02:00 Adjust to new HsDocString internals - - - - - bb61464d by Ben Gamari at 2018-06-13T23:05:22+02:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 5d8cb87f by Ryan Scott at 2018-06-13T23:39:30+02:00 DerivingVia changes - - - - - 73d373a3 by Alec Theriault at 2018-06-13T23:39:30+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 4865e254 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Remove `ITtildehsh` token - - - - - b867db54 by Alec Theriault at 2018-06-13T23:39:30+02:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 9598e392 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Add docs for some DocH constructors (#814) - - - - - 8a59035b by Alec Theriault at 2018-06-13T23:39:30+02:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 29350fc8 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - 2590bbd9 by Ryan Scott at 2018-06-13T23:39:30+02:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - a9939fdc by Ryan Scott at 2018-06-13T23:39:30+02:00 Wibbles - - - - - a22f7df4 by Alec Theriault at 2018-06-13T23:39:30+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 8741015d by Simon Jakobi at 2018-06-13T23:39:30+02:00 Bump a few dependency bounds (#845) - - - - - 4791e1cc by Alec Theriault at 2018-06-13T23:39:30+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 311d3216 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - d0577817 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Complete FixitySig and FamilyDecl pattern matches - - - - - 055b3aa7 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Fix redundant import warnings - - - - - f9ce19b1 by Simon Jakobi at 2018-06-13T23:49:52+02:00 html-test: Accept output - - - - - 04604ea7 by Simon Jakobi at 2018-06-13T23:54:37+02:00 Bump bounds on Cabal - - - - - 0713b692 by Simon Jakobi at 2018-06-14T00:00:12+02:00 Merge branch 'ghc-head' into ghc-head-update-3 - - - - - c6a56bfd by Simon Jakobi at 2018-06-14T02:33:27+02:00 Bump ghc bound for haddock-api spec test-suite - - - - - 119d04b2 by Simon Jakobi at 2018-06-14T12:37:48+02:00 Travis: `--allow-newer` for all packages - - - - - 0e876e2c by Alex Biehl at 2018-06-14T15:28:52+02:00 Merge pull request haskell/haddock#857 from sjakobi/ghc-head-update-3 Update ghc-head - - - - - 5be46454 by Alec Theriault at 2018-06-14T21:42:45+02:00 Improved handling of interfaces in 'haddock-test' (#851) This should now work with an inplace GHC where (for instance) HTML directories may not be properly recorded in the package DB. - - - - - 96ab1387 by Vladislav Zavialov at 2018-06-14T17:06:21-04:00 Handle -XStarIsType - - - - - e518f8c4 by Ben Gamari at 2018-06-14T17:48:00-04:00 Revert unintentional reversion of fix of haskell/haddock#548 - - - - - 01b9f96d by Alan Zimmerman at 2018-06-19T11:52:22+02:00 Match changes in GHC for haskell/haddock#14259 - - - - - 7f8c8298 by Ben Gamari at 2018-06-19T18:14:27-04:00 Bump GHC version to 8.6 - - - - - 11c6b5d2 by Ryan Scott at 2018-06-19T23:17:31-04:00 Remove HsEqTy and XEqTy - - - - - b33347c2 by Herbert Valerio Riedel at 2018-06-20T23:14:52+02:00 Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. - - - - - f0d2460e by Herbert Valerio Riedel at 2018-06-20T23:28:46+02:00 Update Travis CI job - - - - - ef239223 by Herbert Valerio Riedel at 2018-06-20T23:32:41+02:00 Drop GHC HEAD from CI and update GHC to 8.4.3 It's a waste of resource to even try to build this branch w/ ghc-head; so let's not do that... - - - - - 41c4a9fa by Ben Gamari at 2018-06-20T18:26:20-04:00 Bump GHC version to 8.7 - - - - - 8be593dc by Herbert Valerio Riedel at 2018-06-21T22:32:15+02:00 Update CI job to use GHC 8.7.* - - - - - b91d334a by Simon Jakobi at 2018-06-30T13:41:38+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section - - - - - f707d848 by Alec Theriault at 2018-07-05T10:43:35-04:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. - - - - - a6d2b8dc by Alec Theriault at 2018-07-06T10:06:32-04:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case - - - - - 13819f71 by Alan Zimmerman at 2018-07-15T19:33:51+02:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 - - - - - c346aa78 by Simon Jakobi at 2018-07-19T12:29:32+02:00 haddock-library: Bump bounds for containers - - - - - 722e733c by Simon Jakobi at 2018-07-19T13:36:45+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] - - - - - f0bd83fd by Alec Theriault at 2018-07-19T14:39:57+02:00 Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. - - - - - 394053a8 by Simon Jakobi at 2018-07-19T14:58:07+02:00 haddock-library: Bump bounds for containers - - - - - 1bda11a2 by Alec Theriault at 2018-07-20T09:04:03+02:00 Add HEAD.hackage overlay (#887) * Add HEAD.hackage overlay * Add HCPKG variable - - - - - c7b4ab45 by Alec Theriault at 2018-07-20T12:01:16+02:00 Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test - - - - - c05d32ad by Alec Theriault at 2018-07-20T12:01:49+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output - - - - - 24b39ee4 by Alec Theriault at 2018-07-20T12:02:16+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. - - - - - cb9d2099 by Simon Jakobi at 2018-07-20T13:39:29+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) - - - - - 133f24f5 by Alec Theriault at 2018-07-20T13:39:29+02:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) - - - - - 11024149 by Alec Theriault at 2018-07-20T13:39:29+02:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) - - - - - de0c139e by Simon Jakobi at 2018-07-20T13:39:29+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) - - - - - 6435e952 by Alec Theriault at 2018-07-20T13:39:29+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) - - - - - 1461af39 by Alec Theriault at 2018-07-20T13:39:29+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) - - - - - 69d3bde1 by Alec Theriault at 2018-07-20T13:49:47+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) - - - - - 6a5c73c7 by Alec Theriault at 2018-07-20T13:50:00+02:00 Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests - - - - - 92ca94c6 by Alec Theriault at 2018-07-20T13:55:36+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) - - - - - 981bc7fa by Simon Jakobi at 2018-07-20T15:06:06+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers - - - - - 27e7c0c5 by Simon Jakobi at 2018-07-20T15:09:05+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 49e1a415 by Simon Jakobi at 2018-07-20T16:02:02+02:00 Update the ghc-8.6 branch (#889) * Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. * README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) * Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) * Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) * tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) * Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. * Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test * Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) * Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) * Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) * Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests * Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 5ca14bed by Simon Jakobi at 2018-07-20T16:05:47+02:00 Revert "Revert "Bump GHC version to 8.6"" That commit didn't belong onto the ghc-8.6 branch. This reverts commit acbaef3b9daf1d2dea10017964bf886e77a8e967. - - - - - 2dd600dd by Simon Jakobi at 2018-07-20T16:18:21+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. - - - - - fceb2422 by Simon Jakobi at 2018-07-20T16:18:21+02:00 outOfScope: Recommend qualifying the identifier - - - - - acea5d23 by Simon Jakobi at 2018-07-20T16:19:35+02:00 outOfScope: Recommend qualifying the identifier (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7) - - - - - 1a83ca55 by Simon Jakobi at 2018-07-20T16:19:35+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f) - - - - - 48374451 by Masahiro Sakai at 2018-07-20T17:06:42+02:00 Add # as a special character (#884) '#' has special meaning used for anchors and can be escaped using backslash. Therefore it would be nice to be listed as special characters. - - - - - 5e1a5275 by Alec Theriault at 2018-07-20T23:37:24+02:00 Let `haddock-test` bypass interface version check (#890) This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to. - - - - - 27286754 by Yuji Yamamoto at 2018-07-23T08:16:01+02:00 Avoid "invalid argument (invalid character)" on non-unicode Windows (#892) Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566 - - - - - 6729d361 by Alec Theriault at 2018-07-23T13:52:56-07:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). - - - - - 8cf4e6b5 by Ryan Scott at 2018-07-27T11:28:03-04:00 eqTyCon_RDR now lives in TysWiredIn After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071 - - - - - 1ad251a6 by Alan Zimmerman at 2018-07-30T13:28:09-04:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 (cherry picked from commit e3926b50ab8a7269fd6904b06e881745f08bc5d6) - - - - - 8aea2492 by Richard Eisenberg at 2018-08-02T10:54:17-04:00 Update against new HsImplicitBndrs - - - - - e42cada9 by Alec Theriault at 2018-08-04T17:51:30+02:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 0e852512 by Alex Biehl at 2018-08-06T13:04:02+02:00 Make --package-version optional for --hoogle generation (#899) * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion - - - - - d2abd684 by Noel Bourke at 2018-08-21T09:34:18+02:00 Remove unnecessary backslashes from docs (#908) On https://haskell-haddock.readthedocs.io/en/latest/markup.html#special-characters the backslash and backtick special characters showed up with an extra backslash before them – I think the escaping is not (or no longer) needed for those characters in rst. - - - - - 7a578a9e by Matthew Pickering at 2018-08-21T09:34:50+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - aa3d4db3 by Matthew Pickering at 2018-08-21T09:37:34+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - ede91744 by Alec Theriault at 2018-08-21T09:42:52+02:00 Better test output when Haddock crashes on a test (#902) In particular: we report the tests that crashed seperately from the tests that produced incorrect output. In order for tests to pass (and exit 0), they must not crash and must produce the right output. - - - - - 4a872b84 by Guillaume Bouchard at 2018-08-21T09:45:57+02:00 Fix a typo (#878) - - - - - 4dbf7595 by Ben Sklaroff at 2018-08-21T12:04:09-04:00 Add ITcomment_line_prag token to Hyperlinker Parser This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935 - - - - - 9170b2a9 by Ben Gamari at 2018-08-21T17:55:15-04:00 Merge pull request haskell/haddock#893 from harpocrates/get-name-to-instances Accumulate explicitly which modules to load for 'attachInstances' - - - - - d57b57cc by Ben Gamari at 2018-08-21T17:59:13-04:00 Merge branch 'ghc-head' of github.com:haskell/haddock into ghc-head - - - - - 14601ca2 by Alec Theriault at 2018-08-21T19:09:37-04:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1) - - - - - 438c645e by Matthew Pickering at 2018-08-21T19:12:39-04:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d) - - - - - a80c5161 by Alec Theriault at 2018-08-21T22:06:40-07:00 Better rendering of unboxed sums/tuples * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType' - - - - - 88456cc1 by Alec Theriault at 2018-08-21T22:06:40-07:00 Handle promoted tuples in 'synifyType' When we have a fully applied promoted tuple, we can expand it out properly. - - - - - fd1c1094 by Alec Theriault at 2018-08-21T22:19:34-07:00 Accept test cases - - - - - 6e80d9e0 by Alec Theriault at 2018-08-21T22:24:03-07:00 Merge pull request haskell/haddock#914 from harpocrates/feature/unboxed-stuff Better rendering of unboxed sums, unboxed tuples, promoted tuples. - - - - - 181a23f1 by Ben Gamari at 2018-08-23T15:53:48-04:00 Merge remote-tracking branch 'origin/ghc-8.6' into ghc-8.6 - - - - - 3a18c1d8 by Alec Theriault at 2018-08-27T14:15:25-07:00 Properly synify promoted list types We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type])))) - - - - - b4794946 by Alec Theriault at 2018-09-03T07:19:55-07:00 Only look at visible types when synifying a 'HsListTy' The other types are still looked at when considering whether to make a kind signature or not. - - - - - a231fce2 by Alec Theriault at 2018-09-03T07:38:10-07:00 Merge pull request haskell/haddock#922 from harpocrates/promoted-lists Properly synify promoted list types - - - - - 0fdf044e by Ningning Xie at 2018-09-15T10:25:58-04:00 Update according to GHC Core changes - - - - - 7379b115 by Ningning Xie at 2018-09-15T15:40:18-04:00 update dataFullSig to work with Co Quantification This should have been in the previous patch, but wasn't. - - - - - cf84a046 by Alec Theriault at 2018-09-17T20:12:18-07:00 Fix/add to various docs * Add documentation for a bunch of previously undocumented options (fixes haskell/haddock#870) * Extend the documentation of `--hoogle` considerably (see haskell/haddock#807) * Describe how to add docs to `deriving` clauses (fixes haskell/haddock#912) * Fix inaccurate docs about hyperlinking infix identifiers (fixes haskell/haddock#780) - - - - - ae017935 by Alec Theriault at 2018-09-22T08:32:16-07:00 Update Travis - - - - - d95ae753 by Alec Theriault at 2018-09-22T09:34:10-07:00 Accept failing tests Also silence orphan warnings. - - - - - f3e67024 by Alec Theriault at 2018-09-22T09:41:23-07:00 Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README - - - - - 3f136d4a by Alec Theriault at 2018-09-22T10:53:31-07:00 Turn haddock-library into a minor release Fix some version bounds in haddock-library too. - - - - - b9def006 by Alec Theriault at 2018-09-22T13:07:35-07:00 keep cabal.project file - - - - - 4909aca7 by Alec Theriault at 2018-10-16T09:36:30-07:00 Build on 7.4 and 7.8 - - - - - 99d20a28 by Herbert Valerio Riedel at 2018-10-16T18:45:52+02:00 Minor tweak to package description - - - - - a8059618 by Herbert Valerio Riedel at 2018-10-16T18:47:24+02:00 Merge pull request haskell/haddock#945 haddock-api 2.21.0 and haddock-library 1.6.1 release - - - - - 2d9bdfc1 by Alec Theriault at 2018-10-16T10:54:21-07:00 Bump haddock-library to 1.7.0 The 1.6.1 release should've been a major bump, since types in the `Documentation.Haddock.Parser.Monad` module changed. This version makes that module internal (as it morally should be). - - - - - ed340cef by Alec Theriault at 2018-10-16T14:59:13-07:00 Merge branch 'ghc-8.4' into ghc-8.6 - - - - - 2821a8df by Alec Theriault at 2018-10-16T15:14:48-07:00 Merge branch 'ghc-8.6' into ghc-head - - - - - a722dc84 by Alec Theriault at 2018-10-16T16:28:55-07:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 63377496 by Alec Theriault at 2018-10-16T16:39:07-07:00 Update changelog - - - - - 099a0110 by Alec Theriault at 2018-10-16T16:49:28-07:00 Merge pull request haskell/haddock#942 from harpocrates/update-docs Fix & add to documentation - - - - - 0927416f by Alec Theriault at 2018-10-16T16:50:14-07:00 Set UTF-8 encoding before writing files (#934) This should fix haskell/haddock#929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8). - - - - - 83b7b017 by Alec Theriault at 2018-10-16T17:42:05-07:00 Output pattern synonyms in Hoogle backend (#947) * Output pattern synonyms in Hoogle backend We were previously weren't outputting _any_ pattern synonyms, bundled or not. Now, we output both. Fixes haskell/haddock#946. * Update changelog - - - - - 81e5033d by Alec Theriault at 2018-10-16T18:04:40-07:00 Release `haddock{,-api}-2.22.0` This version will accompany ghc-8.6.2 - - - - - 9661744e by Alex Biehl at 2018-10-18T08:14:32-07:00 Add NewOcean theme And make it the default theme. - - - - - 7ae6d722 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Improve appearance and readability These changes include: - use latest Haskell's logo colors - decrease #content width to improve readability - use nicer font - improve sizes and distances - - - - - 37f8703d by NunoAlexandre at 2018-10-18T08:14:32-07:00 Include custom font in the html head - - - - - 1d5e1d79 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Update html test reference files - - - - - 53b7651f by NunoAlexandre at 2018-10-18T08:14:32-07:00 Make it responsive - It makes small screens taking more space than larger ones - fixes a few issues present in small screens currently - make it look good across different screen sizes. - - - - - 6aa1aeb1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make the style consistent with hackage Several things are addressed here: - better responsive behaviour on the header - better space usage - consistent colors overall - other nit PR comments - - - - - 3a250c5c by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Place the package name before the menu links This supports the expected responsive menu design, where the package name appears above the menu links. - - - - - cae699b3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update html-test reference files The package name element in the package-header is now a div instead of a paragraph, and it is now above the menu ul.links instead of below. - - - - - 2ec7fd2d by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve synopsis style and code - Use CSS3 instead of loading pictures to show "+" and "-" symbols - Drop redundant code - - - - - 0c874c01 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Decrease space between code blocks There was too much space between code blocks as pointed out by reviewers. - - - - - 85568ce2 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Add an initial-scale property to all haddock pages This solves an issue reported about the content looking incredibly small on mobile devices. - - - - - c1538926 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Address several PR comments - Darken text color like done for hackage - Move synopsis to left side - Make table of contents stick to the left on wide screens - Wrap links to avoid page overflow - Improve expand/collapse buttons - Fix issue with content size on mobile devices - Fix issue with font-size on landscape mode - Increase width of the content - Change colors of table of contents and synopsis - Etc - - - - - e6639e5f by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make synopsis scrollable on wide screens When the synopsis is longer than the screen, you can’t see its end and you can't scroll down either, making the content unreachable. - - - - - 1f0591ff by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve information density - Reduce font size - Improve space between and within code blocks - Improve alignments - Improve spacing within sub-blocks - - - - - bf083097 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Minor adjustments Bring in some adjustments made to hackage: - link colors - page header show everything when package title is too long - - - - - 10375fc7 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix responsive triggers overlap issue The min and max width triggers have the same values, which caused the style resolution to take an intersection of both style declarations when the screen resolution had the size of the limts (say 1280px), causing an odd behaviour and look. - - - - - 95ff2f95 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix issue with menu alignment on firefox Reported and described here: https://github.com/haskell/haddock/pull/721#issuecomment-374668869 - - - - - dc86587e by Alex Biehl at 2018-10-18T08:14:32-07:00 Changelog entry for NewOcean - - - - - 27195e47 by Herbert Valerio Riedel at 2018-10-18T08:14:32-07:00 html-test --accept - - - - - 83f4f9c0 by Alex Biehl at 2018-10-18T08:14:32-07:00 Avoid name shadowing - - - - - 231487f1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font to PT Sans Also migrate some general text related changes from hackage. - - - - - 313db81a by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Use 'flex' to fix header alignment - - - - - 5087367b by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Misc of tweaks - Update link colors to hackage scheme - Tune spacing between content elements - Update footer style - Fix and improve code blocks identation - - - - - b08020df by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font in Xhtml.hs to PT Sans - - - - - 78ce06e3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve code blocks styling - Fix and improve spacing - Improve colors and borders - - - - - 81262d20 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make package-header caption backward-compatible The current html generator of this branch wraps the package-header caption as a div, which does not work (without style adjustments) with the old themes. Changing it from div to span does the trick, without needing to adjust the old stylesheets. - - - - - dc4475cb by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update test-suite reference html pages - - - - - 393d35d8 by Alec Theriault at 2018-10-18T08:25:36-07:00 Accept tests - - - - - a94484ba by Alec Theriault at 2018-10-21T10:29:29-07:00 Fix CHANGELOG - - - - - 8797eca3 by Alec Theriault at 2018-10-21T10:36:19-07:00 Update 'data-files' to include NewOcean stuff - - - - - 1ae51e4a by Simon Jakobi at 2018-10-23T11:29:14+02:00 Fix typo in a warning - - - - - 009ad8e8 by Alec Theriault at 2018-10-24T12:47:47-07:00 Update JS dependencies This was done via `npm audit fix`. I think this fixes haskell/haddock#903 along with some more serious vulnerabilities that nobody seems to have noticed. - - - - - 051994db by Alec Theriault at 2018-10-24T17:31:09-07:00 Resurrect the style-switcher This fixes haskell/haddock#810. Looks like things were broken during the quickjump refactor of the JS. For the (git) record: I do not think the style switcher is a good idea. I'm fixing it for the same reason @mzero added it; as an answer to "rumblings from some that they didn't want their pixels changed on bit" - - - - - 2a1d620f by Alec Theriault at 2018-10-24T17:38:07-07:00 Fix copy-pasta error in data-files - - - - - ed5bfb7f by Alec Theriault at 2018-10-24T20:42:14-07:00 Fix the synopsis button Here's these changes are supposed to do: * put the synopsis back on the right side * properly have it on the edge of the screen on wide screens * adjust the background of the synopsis to match the button (otherwise the grey blends in with what is underneath) * get rid of the dotted purple line * the synopsis contents are now scrollable even when in wide screens (this has been a long-standing bug) - - - - - 883fd74b by Alec Theriault at 2018-10-25T20:16:46-07:00 Avoid more conflicts in generated ids (#954) This fixes haskell/haddock#953 by passing more names into the generated ids. - - - - - ea54e331 by Alec Theriault at 2018-10-25T21:07:12-07:00 Don't hide bullets in method docs I think thst CSS was meant only to deal with fields and the effect on bullets was accidental. Fixes haskell/haddock#926. - - - - - 9a14ef4a by Alec Theriault at 2018-10-25T22:02:07-07:00 Indent more things + slightly smaller font - - - - - b9f17e29 by Alec Theriault at 2018-10-25T22:10:01-07:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 096a3cfa by Alec Theriault at 2018-10-25T22:24:38-07:00 Accept HTML output - - - - - 2669517d by Alec Theriault at 2018-10-26T09:02:35-07:00 User manual + stuff for building GHC docs - - - - - 46b27687 by Alec Theriault at 2018-10-26T09:10:59-07:00 Make 'Contents' in NewOcean scrollable This only happens if the contents block on the left is so big that it doesn't fit (vertically) on the page. If that happens, we want it to be scrollable. - - - - - 3443dd94 by Alec Theriault at 2018-10-26T09:36:46-07:00 Revert "Make 'Contents' in NewOcean scrollable" This reverts commit f909ffd8353d6463fd5dd184998a32aa98d5c922. I missed the fact this also forces the 'Contents' to always go down to the bottom of the page. - - - - - ed081424 by Alec Theriault at 2018-10-26T14:22:23-07:00 Avoid some partiality AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes haskell/haddock#569. - - - - - 6a5bec41 by Alec Theriault at 2018-10-27T10:05:04-07:00 Fix documentation in `haddock-api` (#957) * Fix misplaced Haddocks in Haddock itself Haddock should be able to generate documentation for 'haddock-api' again. * Make CI check that documentation can be built. * Add back a doc that is OK - - - - - 5100450a by Matthew Yacavone at 2018-10-27T14:51:38-04:00 More explicit foralls (GHC Proposal 0007) - - - - - 8771a6b0 by Alec Theriault at 2018-11-05T13:58:11-08:00 Only run MathJax on entities with "mathjax" class (#960) Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes haskell/haddock#959. - - - - - bd7ff5c5 by Alec Theriault at 2018-11-05T15:54:22-08:00 Deduplicate some work in 'AttachInstances' Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too - - - - - cf99fd8f by Alec Theriault at 2018-11-05T15:54:22-08:00 Specialize some SYB functions Perf only change: * Add a 'SPECIALIZE' pragma to help GHC optimize a 'Data a =>' constraint * Manually specialize the needlessly general type of 'specializeTyVarBndrs' - - - - - 4f91c473 by Alec Theriault at 2018-11-05T15:54:22-08:00 Improve perf of renaming Perf only change: * don't look up type variable names (they're never in the environment) * use a difference list for accumulating missing names * more efficient 'Functor'/'Applicative' instances for 'RnM' - - - - - 4bbab0d4 by Alec Theriault at 2018-11-05T15:54:22-08:00 Faster 'Text' driven parser combinators Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}' - - - - - fa430c02 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support hyperlink labels with inline markup The parser for pictures hasn't been properly adjusted yet. - - - - - c1431035 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support (and flatten) inline markup in image links Inline markup is supported in image links but, as per the [commonmark recommendation][0], it is stripped back to a plain text representation. [0]: https://spec.commonmark.org/0.28/#example-547 - - - - - d4ee1ba5 by Alec Theriault at 2018-11-06T12:03:24-08:00 Accept test case - - - - - 8088aeb1 by Alec Theriault at 2018-11-06T12:03:24-08:00 Fix/add to haddock-library test suite - - - - - e78f644d by Alec Theriault at 2018-11-06T13:26:31-08:00 Bump version bounds - - - - - 644335eb by Alec Theriault at 2018-11-06T13:53:30-08:00 Merge pull request haskell/haddock#875 from harpocrates/feature/markup-in-hyperlinks Inline markup in markdown-style links and images - - - - - e173ed0d by Alec Theriault at 2018-11-07T12:37:18-08:00 Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page - - - - - b2d92df7 by Alec Theriault at 2018-11-07T13:41:57-08:00 Allow "Contents" summary to scroll in a fixed div In the unfortunate event that the "Contents" summary doesn't fit vertically (like in the "Prelude"), it will be scrollable. - - - - - ca704c23 by Alec Theriault at 2018-11-07T13:45:15-08:00 Accept HTML output changes - - - - - 82c0ec6d by Alec Theriault at 2018-11-07T18:12:54-08:00 overflow-y 'scroll' -> 'auto' - - - - - 571d7657 by Alec Theriault at 2018-11-08T19:44:12-08:00 Clicking on "Contents" navigates to top of page - - - - - 8065a012 by Alec Theriault at 2018-11-08T19:44:17-08:00 Space out functions more Also, functions and data decls now have the same space before and after them. - - - - - cc650ede by Alec Theriault at 2018-11-09T08:13:35-08:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 65f8c17f by Alec Theriault at 2018-11-10T14:04:06-08:00 Update changelog - - - - - 20473847 by Alec Theriault at 2018-11-10T14:21:40-08:00 Replace oplus/ominus expander/collapser icons with triangles - - - - - 16592957 by Alec Theriault at 2018-11-10T14:35:10-08:00 Merge pull request haskell/haddock#949 from haskell/wip/new-ocean Introduce NewOcean theme. - - - - - 357cefe1 by Alec Theriault at 2018-11-10T16:02:13-08:00 Merge branch 'ghc-8.6' into ghc-head - - - - - de612267 by Alec Theriault at 2018-11-11T20:01:21-08:00 Rename 'NewOcean' theme to 'Linuwial' - - - - - 954b5baa by Alec Theriault at 2018-11-12T08:33:18-08:00 Add blockquote styling Matches b71da1feabf33efbbc517ac376bb690b5a604c2f from hackage-server. Fixes haskell/haddock#967. - - - - - d32c0b0b by Fangyi Zhou at 2018-11-12T10:24:13-08:00 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, osa1 Reviewed By: osa1 GHC Trac Issues: haskell/haddock#15733 Differential Revision: https://phabricator.haskell.org/D5262 - - - - - 41098b1f by Alp Mestanogullari at 2018-11-15T22:40:09+01:00 Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change It got introduced in ghc/ghc at ae2c9b40f5b6bf272251d1f4107c60003f541b62. - - - - - c5c1c7e0 by Alec Theriault at 2018-11-15T13:48:13-08:00 Merge pull request haskell/haddock#970 from alpmestan/alp/fix-promotionflag Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change - - - - - 6473d3a4 by Shayan-Najd at 2018-11-23T01:38:49+01:00 [TTG: Handling Source Locations] Foundation and Pat Trac Issues haskell/haddock#15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`) - - - - - 7a088dfe by Alec Theriault at 2018-11-26T11:11:28-08:00 More uniform handling of `forall`'s in HTML/LaTeX * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes haskell/haddock#973 - - - - - d735e570 by Alec Theriault at 2018-12-12T08:42:09-08:00 Fix warnings, accept output * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's - - - - - a3852f8a by Zejun Wu at 2018-12-14T09:37:47-05:00 Output better debug infromation on internal error in extractDecl This will make investigation of haskell/haddock#979 easier - - - - - 2eccb5b9 by Alec Theriault at 2018-12-17T09:25:10-05:00 Refactor names + unused functions (#982) This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions - - - - - e82e4df8 by Alec Theriault at 2018-12-20T16:16:30-05:00 Load plugins when compiling each module (#983) * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code - - - - - 96e86f38 by Alec Theriault at 2018-12-23T10:23:20-05:00 Properly synify and render promoted type variables (#985) * Synify and render properly promoted type variables Fixes haskell/haddock#923. * Accept output - - - - - 23343345 by Alec Theriault at 2018-12-27T16:39:38-05:00 Remove `haddock-test`'s dep. on `syb` (#987) The functionality is easily inlined into one short function: `gmapEverywhere`. This doesn't warrant pulling in another package. - - - - - d0734f21 by Alec Theriault at 2018-12-27T16:39:52-05:00 Address deprecation warnings in `haddock-test` (#988) Fixes haskell/haddock#885. - - - - - 4d9f144e by mynguyen at 2018-12-30T23:42:26-05:00 Visible kind application haddock update - - - - - ffe0e9ed by Alec Theriault at 2019-01-07T13:55:22-08:00 Print kinded tyvars in constructors for Hoogle (#993) Fixes haskell/haddock#992 - - - - - 2e18b55d by Alec Theriault at 2019-01-10T16:42:45-08:00 Accept new output `GHC.Maybe` -> `Data.Maybe` (#996) Since 53874834b779ad0dfbcde6650069c37926da1b79 in GHC, "GHC.Maybe" is marked as `not-home`. That changes around some test output. - - - - - 055da666 by Gabor Greif at 2019-01-22T14:41:51+01:00 Lone typofix - - - - - 01bb71c9 by Alec Theriault at 2019-01-23T11:46:46-08:00 Keep forall on H98 existential data constructors (#1003) The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes haskell/haddock#1002. - - - - - f9b9bc0e by Ryan Scott at 2019-01-27T09:28:12-08:00 Fix haskell/haddock#1004 with a pinch of dropForAlls - - - - - 5cfcdd0a by Alec Theriault at 2019-01-28T16:49:57-08:00 Loosen 'QuickCheck' and 'hspec' bounds It looks like the new versions don't cause any breakage and loosening the bounds helps deps fit in one stack resolver. - - - - - 3545d3dd by Alec Theriault at 2019-01-31T01:37:25-08:00 Use `.hie` files for the Hyperlinker backend (#977) # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see haskell/haddock#998) * restructure temporary folder logic for `.hi`/`.hie` model - - - - - 2ded3359 by Herbert Valerio Riedel at 2019-02-02T12:06:12+01:00 Update/modernise haddock-library.cabal file - - - - - 62b93451 by Herbert Valerio Riedel at 2019-02-02T12:19:31+01:00 Tentatively declare support for unreleased base-4.13/ghc-8.8 - - - - - 6041e767 by Herbert Valerio Riedel at 2019-02-02T16:04:32+01:00 Normalise LICENSE text w/ cabal's BSD2 template Also, correct the `.cabal` files to advertise `BSD2` instead of the incorrect `BSD3` license. - - - - - 0b459d7f by Alec Theriault at 2019-02-02T18:06:12-08:00 CI: fetch GHC from validate artifact Should help make CI be less broken - - - - - 6b5c07cf by Alec Theriault at 2019-02-02T18:06:12-08:00 Fix some Hyperlinker test suite fallout * Amend `ParserSpec` to match new Hyperlinker API - pass in compiler info - strip out null tokens * Make `hypsrc-test` pass reliably - strip out `local-*` ids - strip out `line-*` ids from the `ClangCppBug` test - re-accept output - - - - - ded34791 by Nathan Collins at 2019-02-02T18:31:23-08:00 Update README instructions for Stack No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock. - - - - - 723298c9 by Alec Theriault at 2019-02-03T09:11:05-08:00 Remove `Documentation.Haddock.Utf8` The circumstances under which this module appeared are completely gone. The Hyperlinker backend no longer needs this module (it uses the more efficient `Encoding` module from `ghc`). Why no deprecation? Because this module really shouldn't exist! - It isn't used in `haddock-library`/`haddock-api` anymore - It was copy pasted directly from `utf8-string` - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding` - - - - - 51050006 by Alec Theriault at 2019-02-03T22:58:58-08:00 Miscellaneous improvements to `Convert` (#1020) Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms - - - - - 841980c4 by Oleg Grenrus at 2019-02-04T08:44:25-08:00 Make a fixture of weird parsing of lists (#997) The second example is interesting. If there's a list directly after the header, and that list has deeper structure, the parser is confused: It finds two lists: - One with the first nested element, - everything after it I'm not trying to fix this, as I'm not even sure this is a bug, and not a feature. - - - - - 7315c0c8 by Ryan Scott at 2019-02-04T12:17:56-08:00 Fix haskell/haddock#1015 with dataConUserTyVars (#1022) The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes haskell/haddock#1015. - - - - - ee0b49a3 by Ryan Scott at 2019-02-04T15:25:17-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. - - - - - 1c850dc8 by Alan Zimmerman at 2019-02-05T21:54:18+02:00 Matching changes in GHC for haskell/haddock#16236 - - - - - ab03c38e by Simon Marlow at 2019-02-06T08:07:33+00:00 Merge pull request haskell/haddock#1014 from hvr/pr/bsd2-normalise Normalise LICENSE text w/ cabal's BSD2 template - - - - - 5a92ccae by Alec Theriault at 2019-02-10T06:21:55-05:00 Merge remote-tracking branch 'gitlab/wip/T16236-2' into ghc-head - - - - - c0485a1d by Alec Theriault at 2019-02-10T03:32:52-08:00 Removes `haddock-test`s dependency on `xml`/`xhtml` (#1027) This means that `html-test`, `latex-test`, `hoogle-test`, and `hypsrc-test` now only depend on GHC boot libs. So we should now be able to build and run these as part of GHC's testsuite. \o/ The reference output has changed very slightly, in three ways: * we don't convert quotes back into `&quot;` as the `xml` lib did * we don't add extra `&nbsp;` as the `xml` lib did * we now remove the entire footer `div` (instead of just emptying it) - - - - - 65a448e3 by Alec Theriault at 2019-02-11T12:27:41-05:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - 360ca937 by Alec Theriault at 2019-02-13T11:36:11-05:00 Clean up logic for guessing `-B` and `--lib` (#1026) Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works. - - - - - d583e364 by Alec Theriault at 2019-02-16T10:41:22-05:00 Fix tests broken by GHC Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings. - - - - - da0c42cc by Vladislav Zavialov at 2019-02-17T11:39:19+03:00 Parser changes to match !380 - - - - - ab96bed7 by Ryan Scott at 2019-02-18T04:44:08-05:00 Bump ghc version to 8.9 - - - - - 44b7c714 by Alec Theriault at 2019-02-22T05:49:43-08:00 Match GHC changes for T16185 `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock. - - - - - 2ee653b1 by Alec Theriault at 2019-02-24T18:53:33-08:00 Update .travis.yml Points to the new GHC CI artifact. - - - - - 90939d71 by Alec Theriault at 2019-02-25T00:42:41-08:00 Support value/type namespaces on identifier links Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity) - - - - - d6ed496c by Alec Theriault at 2019-02-25T00:42:46-08:00 Better identifier parsing * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental). - - - - - 3c3b404c by Alec Theriault at 2019-02-25T22:12:11-08:00 Fix standalone deriving docs Docs on standalone deriving decls for classes with associated types should be associated with the class instance, not the associated type instance. Fixes haskell/haddock#1033 - - - - - d51ef69e by Alec Theriault at 2019-02-26T19:14:59-08:00 Fix bogus identifier defaulting This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes haskell/haddock#1035. - - - - - 88cbbdc7 by Ryan Scott at 2019-02-27T10:14:03-05:00 Visible dependent quantification (#16326) changes - - - - - 0dcf6cee by Xia Li-yao at 2019-02-27T21:53:27-05:00 Menu item controlling which instances are expanded/collapsed (#1007) Adds a menu item (like "Quick Jump") for options related to displaying instances. This provides functionality for: * expanding/collapsing all instances on the currently opened page * controlling whether instances are expanded/collapsed by default * controlling whether the state of instances should be "remembered" This new functionality is implemented in Typescript in `details-helper`. The built-in-themes style switcher also got a revamp so that all three of QuickJump, the style switcher, and instance preferences now have the same style and implementation structure. See also: https://mail.haskell.org/pipermail/haskell-cafe/2019-January/130495.html Fixes haskell/haddock#698. Co-authored-by: Lysxia <lysxia at gmail.com> Co-authored-by: Nathan Collins <conathan at galois.com> - - - - - 3828c0fb by Alec Theriault at 2019-02-28T12:42:49-05:00 `--show-interface` should output to stdout. (#1040) Fixes haskell/haddock#864. - - - - - a50f4cda by gbaz at 2019-03-01T07:43:16-08:00 Increase contrast of Linuwal theme (#1037) This is to address the concern that, on less nice and older screens, some of the shades of grey blend in too easily with the white background. * darken the font slightly * darken slightly the grey behind type signatures and such * add a border and round the corners on code blocks * knock the font down by one point - - - - - ab4d41de by Alec Theriault at 2019-03-03T09:23:26-08:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 12f509eb by Ben Gamari at 2019-03-04T22:13:20-05:00 Remove reference to Opt_SplitObjs flag Split-objects has been removed. - - - - - 5b3e4c9a by Ryan Scott at 2019-03-06T19:16:24-05:00 Update html-test output to reflect haskell/haddock#16391 changes - - - - - fc228af1 by Alec Theriault at 2019-03-09T08:29:23-08:00 Match changes for "Stop inferring over-polymorphic kinds" The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock. - - - - - 6ac109eb by Alec Theriault at 2019-03-09T11:22:55-08:00 Add .hi, .dyn_hi, etc files to .gitignore Fixes haskell/haddock#1030. - - - - - b55f0c05 by Alec Theriault at 2019-03-09T11:22:55-08:00 Better support for default methods in classes * default methods now get rendered differently * default associated types get rendered * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend * LaTeX backend now renders default method signatures NB: there is still no way to document default class members and the NB: LaTeX backend still crashes on associated types - - - - - 10aea0cf by Alec Theriault at 2019-03-09T11:22:55-08:00 Avoid multi-line `emph` in LaTeX backend `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes haskell/haddock#936. - - - - - d22dc2c9 by Alec Theriault at 2019-03-09T11:22:55-08:00 Many LaTeX backend fixes After this commit, we can run with `--latex` on all boot libraries without crashing (although the generated LaTeX still fails to compile in a handful of larger packages like `ghc` and `base`). * Add newlines after all block elements in LaTeX. This is important to prevent the final output from being more an more indented. See the `latext-test/src/Example` test case for a sample of this. * Support associated types in class declarations (but not yet defaults) * Several small issues for producing compiling LaTeX; - avoid empy `\haddockbeginargs` lists (ex: `type family Any`) - properly escape identifiers depending on context (ex: `Int#`) - add `vbox` around `itemize`/`enumerate` (so they can be in tables) * Several spacing fixes: - limit the width of `Pretty`-arranged monospaced code - cut out extra space characters in export lists - only escape spaces if there are _multiple_ spaces - allow type signatures to be multiline (even without docs) * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files from `latex-test` test reference output. Fixes haskell/haddock#935, haskell/haddock#929 (LaTeX docs for `text` build & compile) Fixes haskell/haddock#727, haskell/haddock#930 (I think both are really about type families...) - - - - - 0e6cee00 by Alec Theriault at 2019-03-29T12:11:56-07:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - ce05434d by Alan Zimmerman at 2019-03-29T12:12:11-07:00 Matching changes in GHC for haskell/haddock#16236 (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576) - - - - - d85766b2 by Ben Gamari at 2019-03-29T12:14:04-07:00 Bump GHC to 8.8 - - - - - 5a82cbaf by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Redo ParseModuleHeader - - - - - b9033348 by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - bb55c8f4 by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove outdated `.ghci` files and `scripts` The `.ghci` files are actively annoying when trying to `cabal v2-repl`. As for the `scripts`, the distribution workflow is completely different. - - - - - 5ee244dc by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove obsolete arcanist files + STYLE Now that GHC is hosted on Gitlab, the arcanist files don't make sense anymore. The STYLE file contains nothing more than a dead link too. - - - - - d07c1928 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Redo ParseModuleHeader - - - - - 492762d2 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - af2ac773 by Ryan Scott at 2019-05-14T17:22:13-04:00 Changes for haskell/haddock#16110/#16356 - - - - - 6820ed0d by Alec Theriault at 2019-05-17T08:51:27-07:00 Unbreak haskell/haddock#1004 test case `fail` is no longer part of `Monad`. - - - - - 6bf7be98 by Alec Theriault at 2019-05-17T08:51:27-07:00 Fix haskell/haddock#1063 with better parenthesization logic for contexts The only other change in html/hoogle/hyperlinker output for the boot libraries that this caused is a fix to some Hoogle output for implicit params. ``` $ diff -r _build/docs/ old_docs diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt 13296c13296 < assertError :: (?callStack :: CallStack) => Bool -> a -> a --- > assertError :: ?callStack :: CallStack => Bool -> a -> a ``` - - - - - b5716b61 by Ryan Scott at 2019-05-22T17:24:32-04:00 Match changes with haskell/haddock#14332 - - - - - c115abf6 by Alec Theriault at 2019-05-26T16:01:58-04:00 Remove Haddock's dependency on `Cabal` At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries). - - - - - e5b2d4a3 by Alec Theriault at 2019-05-26T16:16:25-04:00 Regression test: promoted lists in associated types When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes haskell/haddock#466, - - - - - cc5ad5d3 by Alec Theriault at 2019-05-26T17:55:54-04:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 4b3301a6 by Alec Theriault at 2019-05-26T17:57:52-04:00 Release haddock-2.23, haddock-library-1.8.0 Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1. - - - - - 69c7cfce by Matthew Pickering at 2019-05-30T10:54:27+01:00 Update hyperlinker tests for new types in .hie files - - - - - 29b7e738 by Zubin Duggal at 2019-05-30T10:57:51+01:00 update for new way to store hiefile headers - - - - - aeca5d5f by Zubin Duggal at 2019-06-04T18:57:42-04:00 update for new way to store hiefile headers - - - - - ba2ca518 by Ben Gamari at 2019-06-07T23:11:14+00:00 Update test output for introduction of Safe-Inferred - - - - - 3a975a6c by Ryan Scott at 2019-07-03T12:06:27-04:00 Changes for haskell/haddock#15247 - - - - - 0df46555 by Zubin Duggal at 2019-07-22T10:52:50+01:00 Fix haddockHypsrcTest - - - - - 2688686b by Sylvain Henry at 2019-09-12T23:19:39+02:00 Fix for GHC module renaming - - - - - 9ec0f3fc by Alec Theriault at 2019-09-20T03:21:00-04:00 Fix Travis CI, loosen .cabal bounds (#1089) Tentatively for the 2.23 release: * updated Travis CI to work again * tweaked bounds in the `.cabal` files * adjusted `extra-source-files` to properly identify test files - - - - - ca559beb by Matthías Páll Gissurarson at 2019-09-28T12:14:40-04:00 Small change in to facilitate extended typed-holes (#1090) This change has no functional effect on haddock itself, it just changes one pattern to use `_ (` rather than `_(`, so that we may use `_(` as a token for extended typed-holes later. - - - - - 02e28976 by Vladislav Zavialov at 2019-09-28T12:17:45-04:00 Remove spaces around @-patterns (#1093) This is needed to compile `haddock` when [GHC Proposal haskell/haddock#229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented. - - - - - 83cbbf55 by Alexis King at 2019-09-30T21:12:42-04:00 Fix the ignore-exports option (#1082) The `ignore-exports` option has been broken since haskell/haddock#688, as mentioned in https://github.com/haskell/haddock/pull/766#issue-172505043. This PR fixes it. - - - - - e127e0ab by Ben Gamari at 2019-10-06T15:12:06-04:00 Fix a few haddock issues - - - - - 3a0f5c89 by Zubin Duggal at 2019-10-07T17:56:13-04:00 Fix crash when there are no srcspans in the file due to CPP - - - - - 339c5ff8 by Alec Theriault at 2019-10-07T17:56:13-04:00 Prefer un-hyperlinked sources to no sources It is possible to fail to extract an HIE ast. This is however not a reason to produce _no_ output - we should still make a colorized HTML page. - - - - - d47ef478 by Alec Theriault at 2019-10-07T17:56:13-04:00 Add a regression test for haskell/haddock#1091 Previously, this input would crash Haddock. - - - - - ed7c8b0f by Alec Theriault at 2019-10-07T20:56:48-04:00 Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. - - - - - d00436ab by Andreas Klebinger at 2019-10-21T15:53:03+02:00 Refactor for withTiming changes. - - - - - 4230e712 by Ben Gamari at 2019-10-22T09:36:37-04:00 Merge pull request haskell/haddock#1101 from AndreasPK/withTimingRefactor Refactor for withTiming changes. - - - - - d155c5f4 by Ryan Scott at 2019-10-23T10:37:17-04:00 Reify oversaturated data family instances correctly (#1103) This fixes haskell/haddock#1103 by adapting the corresponding patch for GHC (see https://gitlab.haskell.org/ghc/ghc/issues/17296 and https://gitlab.haskell.org/ghc/ghc/merge_requests/1877). - - - - - 331a5adf by Sebastian Graf at 2019-10-25T17:14:40+02:00 Refactor for OutputableBndrId changes - - - - - 48a490e0 by Ben Gamari at 2019-10-27T10:16:16-04:00 Merge pull request haskell/haddock#1105 from sgraf812/wip/flexible-outputable Refactor for OutputableBndrId changes - - - - - f62a7dfc by Sebastian Graf at 2019-11-01T11:54:16+00:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - d9b242ed by Ryan Scott at 2019-11-03T13:20:03-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. (cherry picked from commit cfd682c5fd03b099a3d78c44f9279faf56a0ac70) - - - - - dfd42406 by Sebastian Graf at 2019-11-04T07:02:14-05:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - 0b15be7c by Ben Gamari at 2019-11-09T13:21:33-05:00 Import isRuntimeRepVar from Type rather than TyCoRep isRuntimeRepVar is not longer exported from TyCoRep due to ghc#17441. - - - - - 091f7283 by Ben Gamari at 2019-11-10T12:47:06-05:00 Bump to GHC 8.10 - - - - - e88c71f2 by Ben Gamari at 2019-11-14T00:22:24-05:00 Merge pull request haskell/haddock#1110 from haskell/wip/T17441 Import isRuntimeRepVar from Type rather than TyCoRep - - - - - 4e0bbc17 by Ben Gamari at 2019-11-14T00:22:45-05:00 Version bumps for GHC 8.11 - - - - - 0e85ceb4 by Ben Gamari at 2019-11-15T11:59:45-05:00 Bump to GHC 8.10 - - - - - 00d6d68b by Ben Gamari at 2019-11-16T18:35:58-05:00 Bump ghc version to 8.11 - - - - - dde1fc3f by Ben Gamari at 2019-11-16T20:40:37-05:00 Drop support for base 4.13 - - - - - f52e331d by Vladislav Zavialov at 2019-11-24T13:02:28+03:00 Update Hyperlinker.Parser.classify to use ITdollar - - - - - 1ad96198 by Vladislav Zavialov at 2019-11-28T16:12:33+03:00 Remove HasSrcSpan (#17494) - - - - - 651afd70 by Herbert Valerio Riedel at 2019-12-08T12:08:16+01:00 Document error-prone conditional definition of instances This can easily trip up people if one isn't aware of it. Usually it's better to avoid this kind of conditionality especially for typeclasses for which there's an compat-package as conditional instances like these tend to fragment the ecosystem into those packages that go the extra mile to provide backward compat via those compat-packages and those that fail to do so. - - - - - b521af56 by Herbert Valerio Riedel at 2019-12-08T12:09:54+01:00 Fix build-failure regression for base < 4.7 The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses haskell/haddock#1119 - - - - - 556c375d by Sylvain Henry at 2020-01-02T19:01:55+01:00 Fix after Iface modules renaming - - - - - bd6c53e5 by Sylvain Henry at 2020-01-07T00:48:48+01:00 hsyl20-modules-renamer - - - - - fb23713b by Ryan Scott at 2020-01-08T07:41:13-05:00 Changes for GHC#17608 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2372 - - - - - 4a4dd382 by Ryan Scott at 2020-01-25T08:08:26-05:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - e782a44d by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename PackageConfig into UnitInfo - - - - - ba3c9f05 by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename lookupPackage - - - - - ab37f9b3 by Ben Gamari at 2020-01-29T13:00:44-05:00 Merge pull request haskell/haddock#1125 from haskell/wip/T17566-take-two Changes for GHC#17566 - - - - - 3ebd5ae0 by Ryan Scott at 2020-01-31T05:56:50-05:00 Merge branch 'wip-hsyl20-package-refactor' into ghc-head - - - - - 602a747e by Richard Eisenberg at 2020-02-04T09:05:43+00:00 Echo GHC's removal of PlaceHolder module This goes with GHC's !2083. - - - - - ccfe5679 by Sylvain Henry at 2020-02-10T10:13:56+01:00 Module hierarchy: runtime (cf haskell/haddock#13009) - - - - - 554914ce by Cale Gibbard at 2020-02-10T16:10:39-05:00 Fix build of haddock in stage1 We have to use the correct version of the GHC API, but the version of the compiler itself doesn't matter. - - - - - 5b6fa2a7 by John Ericson at 2020-02-10T16:18:07-05:00 Noramlize `tested-with` fields in cabal files - - - - - e6eb3ebe by Vladislav Zavialov at 2020-02-16T13:25:26+03:00 No MonadFail/Alternative for P - - - - - 90e181f7 by Ben Gamari at 2020-02-18T14:13:47-05:00 Merge pull request haskell/haddock#1129 from obsidiansystems/wip/fix-stage1-build Fix build of haddock in stage1 - - - - - 93b64636 by Sylvain Henry at 2020-02-19T11:20:27+01:00 Modules: Driver (#13009) - - - - - da4f6c7b by Vladislav Zavialov at 2020-02-22T15:33:02+03:00 Use RealSrcSpan in InstMap - - - - - 479b1b50 by Ben Gamari at 2020-02-23T10:28:13-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 55ecacf0 by Sylvain Henry at 2020-02-25T15:18:27+01:00 Modules: Core (#13009) - - - - - 60867b3b by Vladislav Zavialov at 2020-02-28T15:53:52+03:00 Ignore the BufLoc/BufSpan added in GHC's !2516 - - - - - 1e5506d3 by Sylvain Henry at 2020-03-02T12:32:43+01:00 Modules: Core (#13009) - - - - - 6fb53177 by Richard Eisenberg at 2020-03-09T14:49:40+00:00 Changes in GHC's !1913. - - - - - 30b792ea by Ben Gamari at 2020-03-16T12:45:02-04:00 Merge pull request haskell/haddock#1130 from hsyl20/wip/hsyl20-modules-core2 Modules: Core (#13009) - - - - - cd761ffa by Sylvain Henry at 2020-03-18T15:24:00+01:00 Modules: Types - - - - - b6646486 by Ben Gamari at 2020-03-18T14:42:43-04:00 Merge pull request haskell/haddock#1133 from hsyl20/wip/hsyl20/modules/types Modules: Types - - - - - 9325d734 by Kleidukos at 2020-03-19T12:38:31-04:00 Replace the 'caption' class so that the collapsible sections are shown - - - - - 5e2bb555 by Kleidukos at 2020-03-19T12:38:31-04:00 Force ghc-8.8.3 - - - - - c6fcd0aa by Kleidukos at 2020-03-19T12:38:31-04:00 Update test fixtures - - - - - 5c849cb1 by Sylvain Henry at 2020-03-20T09:34:39+01:00 Modules: Types - - - - - 7f439155 by Alec Theriault at 2020-03-20T20:17:01-04:00 Merge branch 'ghc-8.8' into ghc-8.10 - - - - - b7904e5c by Alina Banerjee at 2020-03-20T20:24:17-04:00 Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests - - - - - b9d60a59 by Alec Theriault at 2020-03-22T11:46:42-04:00 Clean up warnings * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal` - - - - - 0c317dbe by Alec Theriault at 2020-03-22T18:46:54-04:00 Fix NPM security warnings This was done by calling `npm audit fix`. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. - - - - - 6e306242 by Alec Theriault at 2020-03-22T20:10:52-04:00 Tentative 2.24 release Adjusted changelogs and versions in `.cabal` files in preparation for the upcoming release bundled with GHC 8.10. - - - - - 1bfb4645 by Ben Gamari at 2020-03-23T16:40:54-04:00 Merge commit '3c2944c037263b426c4fe60a3424c27b852ea71c' into HEAD More changes from the GHC types module refactoring. - - - - - be8c6f3d by Alec Theriault at 2020-03-26T20:10:53-04:00 Update `.travis.yml` to work with GHC 8.10.1 * Regenerated the Travis file with `haskell-ci` * Beef up `.cabal` files with more `tested-with` information - - - - - b025a9c6 by Alec Theriault at 2020-03-26T20:10:53-04:00 Update README Removed some out of date links/info, added some more useful links. * badge to Hackage * update old trac link * `ghc-head` => `ghc-8.10` * `cabal new-*` is now `cabal v2-*` and it should Just Work * `--test-option='--accept'` is the way to accept testsuite output - - - - - 564d889a by Alec Theriault at 2020-03-27T20:34:33-04:00 Fix crash in `haddock-library` on unicode space Our quickcheck tests for `haddock-library` stumbled across an edge case input that was causing Haddock to crash: it was a unicode space character. The root cause of the crash is that we were implicitly assuming that if a space character was not " \t\f\v\r", it would have to be "\n". We fix this by instead defining horizontal space as: any space character that is not '\n'. Fixes haskell/haddock#1142 - - - - - 2d360ba1 by Alec Theriault at 2020-03-27T21:57:32-04:00 Disallow qualified uses of reserved identifiers This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes haskell/haddock#952 - - - - - 47ae22ed by Alec Theriault at 2020-03-28T13:36:25-04:00 Remove unused `Haddock.Utils` functions * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils` - - - - - c0291245 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use TTG empty extensions to remove some `error`'s None of these error cases should ever have been reachable, so this is just a matter of leveraging the type system to assert this. * Use the `NoExtCon` and `noExtCon` to handle case matches for no extension constructors, instead of throwing an `error`. * Use the extension field of `HsSpliceTy` to ensure that this variant of `HsType` cannot exist in an `HsType DocNameI`. - - - - - 0aff8dc4 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` * `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes haskell/haddock#978 - - - - - bf6f2fb7 by Alec Theriault at 2020-03-28T13:36:25-04:00 Cleanup up GHC flags in `.cabal` files * enable more useful warning flags in `haddock-api`, handle the new warnings generated * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in `-Wall` for a while now) - - - - - c576fbf1 by Alec Theriault at 2020-03-28T13:36:25-04:00 `haddock-library` document header level Document the fact the header level is going to always be between 1 and 6 inclusive. Along the way, I also optimized the parsing code a bit. - - - - - 71bce0ee by Alec Theriault at 2020-03-28T14:26:27-04:00 Disallow links in section headers This is quite straightforward to implement, since we already had a function `docToHtmlNoAnchors` (which we used to generate the link in the sidebar "Contents"). This breaks test `Bug387`, but that test case has aged badly: we now automatically generate anchors for all headings, so manually adding an anchor in a section makes no sense. Nested anchors are, as pointed out in haskell/haddock#1054, disallowed by the HTML standard. Fixes haskell/haddock#1054 - - - - - b461b0ed by Sylvain Henry at 2020-03-30T10:34:23+02:00 Modules: type checker - - - - - cd8cd1ee by Ben Gamari at 2020-03-31T12:45:02-04:00 Merge pull request haskell/haddock#1152 from hsyl20/wip/hsyl20/modules/tc Module renaming - - - - - 5e8f8ea7 by Felix Yan at 2020-04-01T17:58:06-07:00 Allow QuickCheck 2.14 Builds fine and all tests pass. - - - - - dc6b1633 by Sylvain Henry at 2020-04-05T16:43:44+02:00 Module renaming: amend previous patch - - - - - eee2f4ae by Ryan Scott at 2020-04-05T09:04:43-07:00 Fix haskell/haddock#1050 by filtering out invisible AppTy arguments This makes the `synifyType` case for `AppTy` more intelligent by taking into consideration the visibilities of each `AppTy` argument and filtering out any invisible arguments, as they aren't intended to be displayed in the source code. (See haskell/haddock#1050 for an example of what can happen if you fail to filter these out.) Along the way, I noticed that a special `synifyType` case for `AppTy t1 (CoercionTy {})` could be consolidated with the case below it, so I took the opportunity to tidy this up. - - - - - 23eb99e8 by Ben Gamari at 2020-04-07T11:19:58-04:00 Merge pull request haskell/haddock#1154 from hsyl20/wip/hsyl20/modules/tc Module renaming: amend previous patch - - - - - 072d994d by Ryan Scott at 2020-04-07T19:32:47-04:00 Make NoExtCon fields strict These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992). - - - - - d8ebf6c8 by Ignat Insarov at 2020-04-09T21:15:01-04:00 Recode Doc to Json. (#1159) * Recode Doc to Json. * More descriptive field labels. - - - - - 52df4b4e by Sylvain Henry at 2020-04-10T12:39:18+02:00 Module renaming - - - - - d9ab8ec8 by Cale Gibbard at 2020-04-14T11:43:34-04:00 Add instance of XCollectPat for DocNameI - - - - - 323d221d by Cale Gibbard at 2020-04-14T11:43:34-04:00 Rename XCollectPat -> CollectPass - - - - - 2df80867 by Alec Theriault at 2020-04-15T07:30:51-07:00 Prune docstrings that are never rendered When first creating a Haddock interface, trim `ifaceDocMap` and `ifaceArgMap` to not include docstrings that can never appear in the final output. Besides checking with GHC which names are exported, we also need to keep all the docs attached to instance declarations (it is much tougher to detect when an instance is fully private). This change means: * slightly smaller interface files (7% reduction on boot libs) * slightly less work to do processing docstrings that aren't used * no warnings in Haddock's output about private docstrings (see haskell/haddock#1070) I've tested manually that this does not affect any of the boot library generated docs (the only change in output was some small re-ordering in a handful of instance lists). This should mean no docstrings have been incorrectly dropped. - - - - - f49c90cc by Alec Theriault at 2020-04-15T07:30:51-07:00 Don't warn about missing links in miminal sigs When renaming the Haddock interface, never emit warnings when renaming a minimal signature. Also added some documention around `renameInterface`. Minimal signatures intentionally include references to potentially un-exported methods (see the discussion in haskell/haddock#330), so it is expected that they will not always have a link destination. On the principle that warnings should always be resolvable, this shouldn't produce a warning. See haskell/haddock#1070. - - - - - a9eda64d by Ben Gamari at 2020-04-17T09:27:35-04:00 Merge pull request haskell/haddock#1160 from hsyl20/wip/hsyl20/modules/systools Module renaming - - - - - f40d7879 by Cale Gibbard at 2020-04-20T11:30:38-04:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ttg-con-pat - - - - - a50e7753 by Ben Gamari at 2020-04-20T11:36:10-04:00 Merge pull request haskell/haddock#1165 from obsidiansystems/wip/ttg-con-pat Trees that Grow refactor (GHC !2553) - - - - - 6a24795c by Alec Theriault at 2020-04-21T08:06:45-07:00 Fallback to `hiDecl` when `extractDecl` fails Sometimes, the declaration being exported is a subdecl (for instance, a record accessor getting exported at the top-level). For these cases, Haddock has to find a way to produce some synthetic sensible top-level declaration. This is done with `extractDecl`. As is shown by haskell/haddock#1067, this is sometimes impossible to do just at a syntactic level (for instance when the subdecl is re-exported). In these cases, the only sensible thing to do is to try to reify a declaration based on a GHC `TyThing` via `hiDecl`. - - - - - eee1a8b7 by Sylvain Henry at 2020-04-24T15:46:05+02:00 Module structure - - - - - 50b9259c by Iñaki at 2020-04-25T18:38:11-04:00 Add support for custom section anchors (#1179) This allows to have stable anchors for groups, even if the set of groups in the documentation is altered. The syntax for setting the anchor of a group is -- * Group name #desiredAnchor# Which will produce an html anchor of the form '#g:desiredAnchor' Co-authored-by: Iñaki García Etxebarria <git at inaki.blueleaf.cc> - - - - - 4003c97a by Ben Gamari at 2020-04-26T09:35:15-04:00 Merge pull request haskell/haddock#1166 from hsyl20/wip/hsyl20/modules/utils Module structure - - - - - 5206ab60 by Sylvain Henry at 2020-04-27T16:47:39+02:00 Renamed UnitInfo fields - - - - - c32c333b by Sylvain Henry at 2020-04-27T17:32:58+02:00 UnitId has been renamed into Unit - - - - - 3e87db64 by Sylvain Henry at 2020-04-27T17:36:00+02:00 Fix for GHC.Unit.* modules - - - - - ae3323a7 by Ben Gamari at 2020-04-29T12:36:37-04:00 Merge pull request haskell/haddock#1183 from hsyl20/wip/hsyl20/unitid Refactoring of Unit code - - - - - b105564a by Artem Pelenitsyn at 2020-05-03T08:14:10+01:00 add dependency on exceptions because GHC.Exception was boiled down (ghc haskell/haddock#18075) - - - - - 9857eff3 by Zubin Duggal at 2020-05-04T18:48:25+01:00 Atomic update of NameCache in readHieFile - - - - - 86bbb226 by Sylvain Henry at 2020-05-14T16:36:27+02:00 Fix after Config module renaming - - - - - a4bbdbc2 by Gert-Jan Bottu at 2020-05-15T22:09:44+02:00 Explicit Specificity Support for Haddock - - - - - 46199daf by Ben Gamari at 2020-05-19T09:59:56-04:00 Merge pull request haskell/haddock#1192 from hsyl20/hsyl20/modules-config Fix after Config module renaming - - - - - f9a9d2ba by Gert-Jan Bottu at 2020-05-20T16:48:38-04:00 Explicit Specificity Support for Haddock - - - - - 55c5b7ea by Ben Gamari at 2020-05-21T00:32:02-04:00 Merge commit 'a8d7e66da4dcc3b242103271875261604be42d6e' into ghc-head - - - - - a566557f by Cale Gibbard at 2020-05-21T16:02:06-04:00 isBootSummary now produces a result of type IsBootInterface - - - - - ea52f905 by Zubin Duggal at 2020-05-24T17:55:48+01:00 update for hiefile-typeclass-info - - - - - 49ba7a67 by Willem Van Onsem at 2020-05-25T12:23:01-04:00 Use floor over round to calculate the percentage (#1195) If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes haskell/haddock#1194 - - - - - c025ebf1 by Ben Gamari at 2020-05-29T14:32:42-04:00 Merge pull request haskell/haddock#1185 from obsidiansystems/boot-disambig isBootSummary now produces a result of type IsBootInterface - - - - - 74ab9415 by Ben Gamari at 2020-05-29T20:23:39-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - b40be944 by Ben Gamari at 2020-06-03T17:02:31-04:00 testsuite: Update expected output for simplified subsumption - - - - - 624be71c by Ryan Scott at 2020-06-05T12:43:23-04:00 Changes for GHC#18191 See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337. - - - - - fbd8f7ce by Sylvain Henry at 2020-06-08T15:31:47+02:00 Fix after unit refactoring - - - - - 743fda4d by Ben Gamari at 2020-06-09T12:09:58-04:00 Merge pull request haskell/haddock#1202 from hsyl20/wip/hsyl20/unitid-ii Fix after unit refactoring - - - - - d07a06a9 by Ryan Scott at 2020-06-13T07:16:55-04:00 Use HsForAllTelescope (GHC#18235) - - - - - 389bb60d by Ben Gamari at 2020-06-13T15:30:52-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - 7a377f5f by Ben Gamari at 2020-06-17T14:53:16-04:00 Merge pull request haskell/haddock#1199 from bgamari/wip/ghc-8.12 haddock: Bounds bumps for GHC 8.12 - - - - - 9fd9e586 by Krzysztof Gogolewski at 2020-06-17T16:09:07-04:00 Adapt Haddock to LinearTypes See ghc/ghc!852. - - - - - 46fe7636 by Ben Gamari at 2020-06-18T14:20:02-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 35a3c9e2 by Zubin Duggal at 2020-06-21T21:19:18+05:30 Use functions exported from HsToCore - - - - - 8abe3928 by Ben Gamari at 2020-06-24T13:53:39-04:00 Merge pull request haskell/haddock#1204 from wz1000/wip/haddock-hstocore Use functions exported from GHC.HsToCore.Docs - - - - - 22f2c937 by Matthías Páll Gissurarson at 2020-06-26T19:07:03+02:00 Adapt Haddock for QualifiedDo - - - - - 3f6208d7 by Vladislav Zavialov at 2020-06-28T14:28:16+03:00 Handle LexicalNegation's ITprefixminus - - - - - 03a19f41 by Sylvain Henry at 2020-07-02T09:37:38+02:00 Rename hsctarget into backend - - - - - ea17ff23 by Andreas Klebinger at 2020-07-02T17:44:18+02:00 Update for UniqFM changes. - - - - - 9872f2f3 by Ben Gamari at 2020-07-09T10:39:19-04:00 Merge pull request haskell/haddock#1209 from AndreasPK/wip/typed_uniqfm Update for UniqFM changes. - - - - - 68f7b668 by Krzysztof Gogolewski at 2020-07-12T18:16:57+02:00 Sync with GHC removing {-# CORE #-} pragma See ghc ticket haskell/haddock#18048 - - - - - eb372681 by Sylvain Henry at 2020-07-20T11:41:30+02:00 Rename hscTarget into backend - - - - - fb7f78bf by Ben Gamari at 2020-07-21T12:15:25-04:00 Merge pull request haskell/haddock#1214 from hsyl20/wip/hsyl20/hadrian/ncg Rename hscTarget into backend - - - - - 1e8f5b56 by Ben Gamari at 2020-07-23T09:11:50-04:00 Merge commit '904dce0cafe0a241dd3ef355775db47fc12f434d' into ghc-head - - - - - d8fd1775 by Zubin Duggal at 2020-07-23T18:46:40+05:30 Update for modular ping pong - - - - - 8416f872 by Ben Gamari at 2020-07-23T09:35:03-04:00 Merge pull request haskell/haddock#1200 from wz1000/wip/wz1000-modular-ping-pong Modular ping pong - - - - - a24a8577 by Ben Gamari at 2020-07-28T15:23:36-04:00 Bump GHC version to 9.0 - - - - - 6a51c9dd by Sylvain Henry at 2020-08-05T18:47:05+02:00 Fix after Outputable refactoring - - - - - c05e1c99 by Ben Gamari at 2020-08-10T14:41:41-04:00 Merge pull request haskell/haddock#1223 from hsyl20/wip/hsyl20/dynflags/exception Fix after Outputable refactoring - - - - - d964f15b by Sylvain Henry at 2020-08-12T11:58:49+02:00 Fix after HomeUnit - - - - - 8e6d5b23 by Ben Gamari at 2020-08-12T14:25:30-04:00 Merge pull request haskell/haddock#1225 from hsyl20/wip/hsyl20/plugins/homeunit Fix after HomeUnit - - - - - 8c7880fe by Sylvain Henry at 2020-08-17T14:13:29+02:00 Remove Ord FastString instance - - - - - 8ea410db by Alex Biehl at 2020-08-19T10:56:32+02:00 Another round of `npm audit fix` (#1228) This should shut down the warnings on Github. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. Last NPM dependency audit happend in d576b2327e2bc117f912fe0a9d595e9ae62614e0 Co-authored-by: Alex Biehl <alex.biehl at target.com> - - - - - 7af6e2a8 by Ben Gamari at 2020-08-31T13:59:34-04:00 Merge pull request haskell/haddock#1226 from hsyl20/wip/hsyl20/fs_ord Remove Ord FastString instance - - - - - ffbc8702 by Alan Zimmerman at 2020-09-07T21:47:41+01:00 Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - a93f1268 by Alan Zimmerman at 2020-09-07T23:11:38+01:00 Merge pull request haskell/haddock#1232 from haskell/wip/T18639-remove-generated-pragma, Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - 1f605d50 by Ben Gamari at 2020-09-14T18:30:01-04:00 Bump GHC version to 9.1 - - - - - 6599df62 by Vladislav Zavialov at 2020-09-18T14:05:15+03:00 Bump base upper bound to 4.16 - - - - - a01b3c43 by Ben Gamari at 2020-09-22T15:41:48-04:00 Update hypsrc-test for QuickLook This appears to be a spurious change. - - - - - e9cc6cac by Vladislav Zavialov at 2020-09-26T21:00:12+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 30e3ca7c by Sylvain Henry at 2020-09-29T11:18:32-04:00 Update for parser (#1234) - - - - - b172f3e3 by Vladislav Zavialov at 2020-09-30T01:01:30+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 0b9c08d3 by Sylvain Henry at 2020-09-30T11:02:33+02:00 Adapt to GHC parser changes - - - - - b9540b7a by Sylvain Henry at 2020-10-12T09:13:38-04:00 Don't pass the HomeUnitId (#1239) - - - - - 34762e80 by HaskellMouse at 2020-10-13T12:58:04+03:00 Changed tests due to unification of `Nat` and `Natural` in the follwing merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583 - - - - - 256f86b6 by Vladislav Zavialov at 2020-10-15T10:48:03+03:00 Add whitespace in: map ($ v) - - - - - 4a3f711b by Alan Zimmerman at 2020-10-19T08:57:27+01:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled - - - - - 072cdd21 by Alan Zimmerman at 2020-10-21T14:48:28-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 9e09a445 by Alan Zimmerman at 2020-10-21T23:53:34-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 636d7de3 by Sylvain Henry at 2020-10-26T14:31:54-04:00 GHC.Driver.Types refactoring (#1242) - - - - - a597f000 by Ryan Scott at 2020-10-29T04:18:05-04:00 Adapt to the removal of Hs{Boxed,Constraint}Tuple See ghc/ghc!4097 and GHC#18723. - - - - - b96660fb by Ryan Scott at 2020-10-30T04:53:05-04:00 Adapt to HsConDecl{H98,GADT}Details split Needed for GHC#18844. - - - - - c287d82c by Ryan Scott at 2020-10-30T19:35:59-04:00 Adapt to HsOuterTyVarBndrs These changes accompany ghc/ghc!4107, which aims to be a fix for haskell/haddock#16762. - - - - - a34c31a1 by Ryan Scott at 2020-11-13T13:38:34-05:00 Adapt to splitPiTysInvisible being renamed to splitInvisPiTys This is a part of !4434, a fix for GHC#18939. - - - - - 66ea459d by Sylvain Henry at 2020-11-16T10:59:30+01:00 Fix after Plugins moved into HscEnv - - - - - 508556d8 by Ben Gamari at 2020-11-18T15:47:40-05:00 Merge pull request haskell/haddock#1253 from hsyl20/wip/hsyl20/plugins/hscenv Fix after Plugins moved into HscEnv - - - - - 620fec1a by Andreas Klebinger at 2020-11-24T20:51:59+01:00 Update for changes in GHC's Pretty - - - - - 01cc13ab by Richard Eisenberg at 2020-11-25T23:18:35-05:00 Avoid GHC#18932. - - - - - 8d29ba21 by Cale Gibbard at 2020-11-25T23:18:35-05:00 Add type arguments to PrefixCon - - - - - 414d5f87 by Sylvain Henry at 2020-11-30T17:06:04+01:00 DynFlags's unit fields moved to HscEnv - - - - - e356668c by Ben Gamari at 2020-11-30T11:11:37-05:00 Merge pull request haskell/haddock#1258 from hsyl20/wip/hsyl20/hscenv/unitstate Unit fields moved from DynFlags to HscEnv - - - - - 7cf552f1 by Ben Gamari at 2020-12-03T10:31:27-05:00 Merge pull request haskell/haddock#1257 from AndreasPK/wip/andreask/opt_dumps Update for changes in GHC's Pretty - - - - - fc0871c3 by Veronika Romashkina at 2020-12-08T16:35:33+01:00 Fix docs links from Darcs to GitHub in intro (#1262) - - - - - 7059e808 by Veronika Romashkina at 2020-12-08T16:36:16+01:00 Use gender neutral word in docs (#1260) - - - - - 1b16e5ee by Maximilian Tagher at 2020-12-08T16:40:03+01:00 Allow scrolling search results (#1235) Closes https://github.com/haskell/haddock/issues/1231 - - - - - 8a118c01 by dependabot[bot] at 2020-12-08T16:40:25+01:00 Bump bl from 1.2.2 to 1.2.3 in /haddock-api/resources/html (#1255) Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - c89ff587 by Xia Li-yao at 2020-12-08T16:42:17+01:00 Allow more characters in anchor following module reference (#1220) - - - - - 14af7d64 by Xia Li-yao at 2020-12-08T16:43:05+01:00 Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243) * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt at mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem at users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard at tweag.io> Co-authored-by: Pepe Iborra <pepeiborra at gmail.com> - - - - - 89e3af13 by tomjaguarpaw at 2020-12-08T18:00:04+01:00 Enable two warnings (#1245) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - c3320f8d by Willem Van Onsem at 2020-12-08T18:26:55+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 685df308 by Alex Biehl at 2020-12-08T20:06:26+01:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - be3ec3c0 by Alex Biehl at 2020-12-08T20:06:26+01:00 Import intercalate - - - - - 32c33912 by Matthías Páll Gissurarson at 2020-12-08T21:15:30+01:00 Adapt Haddock for QualifiedDo - - - - - 31696088 by Alex Biehl at 2020-12-08T22:06:02+01:00 Fix haddock-library tests - - - - - fbc0998a by Alex Biehl at 2020-12-08T23:08:23+01:00 Move to GitHub CI (#1266) * Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell at v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up - - - - - 5b946b9a by tomjaguarpaw at 2020-12-10T19:01:41+01:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - bc5a408f by dependabot[bot] at 2020-12-10T19:02:16+01:00 Bump ini from 1.3.5 to 1.3.7 in /haddock-api/resources/html (#1269) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - d02995f1 by Andrew Martin at 2020-12-14T16:48:40-05:00 Update for boxed rep - - - - - a381aeff by Ben Gamari at 2020-12-15T15:13:30-05:00 Revert "Enable two warnings (#1245) (#1268)" As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce. - - - - - a63c0a9e by Ben Gamari at 2020-12-15T15:17:59-05:00 Revert "Update for boxed rep" This reverts commit 4ffb30d8b637ccebecc81ce610f0af451ac8088d. - - - - - 53bfbb29 by Ben Gamari at 2020-12-15T15:37:24-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - bae76a30 by Ben Gamari at 2020-12-16T02:44:42+00:00 Update output for nullary TyConApp optimisation (ghc/ghc!2952) - - - - - 4b733b57 by Krzysztof Gogolewski at 2020-12-16T20:03:14+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. - - - - - ee463bd3 by Ryan Scott at 2020-12-16T16:55:23-05:00 Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonym Needed for !4417, the fix for GHC#15706 and GHC#18914. - - - - - ed0b02f8 by tomjaguarpaw at 2020-12-19T10:17:19+00:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - d80bf8f5 by Sylvain Henry at 2020-12-21T10:09:25+01:00 Fix after binder collect changes - - - - - bf4c9d32 by Adam Gundry at 2020-12-23T21:35:01+00:00 Adapt to changes to GlobalRdrElt and AvailInfo Needed for ghc/ghc!4467 - - - - - 37736c4c by John Ericson at 2020-12-28T12:27:02-05:00 Support a new ghc --make node type for parallel backpack upsweep - - - - - 717bdeac by Vladislav Zavialov at 2020-12-29T10:50:02+03:00 Inline and fix getGADTConTypeG The getGADTConTypeG used HsRecTy, which is at odds with GHC issue haskell/haddock#18782. I noticed that getGADTConTypeG was only used in the Hoogle backend. Interestingly, when handling H98 constructors, Hoogle converts RecCon to PrefixCon (see Haddock.Backends.Hoogle.ppCtor). So I changed getGADTConTypeG to handle RecConGADT in the same manner as PrefixConGADT, and after this simplification moved it into the 'where' clause of ppCtor, to the only place where it is used. The practical effect of this change is as follows. Consider this example: data TestH98 = T98 { bar::Int } data TestGADT where TG :: { foo :: Int } -> TestGADT Before this patch, haddock --hoogle used to produce: T98 :: Int -> TestH98 [TG] :: {foo :: Int} -> TestGADT Notice how the record syntax was discarded in T98 but not TG. With this patch, we always produce signatures without record syntax: T98 :: Int -> TestH98 [TG] :: Int -> TestGADT I suspect this might also be a bugfix, as currently Hoogle doesn't seem to render GADT record constructors properly. - - - - - cb1b8c56 by Andreas Abel at 2020-12-30T21:12:37+01:00 Build instructions: haddock-library and -api first! - - - - - b947f6ad by Ben Gamari at 2020-12-31T13:04:19-05:00 Merge pull request haskell/haddock#1281 from obsidiansystems/wip/backpack-j Changes to support -j with backpack - - - - - 120e1cfd by Hécate Moonlight at 2021-01-04T19:54:58+01:00 Merge pull request haskell/haddock#1282 from andreasabel/master Build instructions: haddock-library and -api first! - - - - - fd45e41a by Ben Gamari at 2021-01-05T16:14:31-05:00 Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0 - - - - - b471bdec by Ben Gamari at 2021-01-05T16:23:02-05:00 Merge commit '1e56f63c3197e7ca1c1e506e083c2bad25d08793' into ghc-9.0 - - - - - 81cdbc41 by Alex Biehl at 2021-01-09T12:14:41+01:00 Prepare Haddock for being a GHC Plugin - - - - - b646d952 by Alex Biehl at 2021-01-09T12:14:41+01:00 Make Haddock a GHC Plugin - - - - - cc044674 by Alex Biehl at 2021-01-09T12:14:41+01:00 Add -j[n] CLI param to Haddock executable It translates to `--ghcopt=-j[n]` - - - - - 84a04073 by Alex Biehl at 2021-01-09T12:14:41+01:00 Abstract Monad for interface creation I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName. - - - - - 5be2c4f7 by Alex Biehl at 2021-01-09T12:14:41+01:00 Accept tests - - - - - 8cefee9d by Alex Biehl at 2021-01-09T16:10:47+01:00 Add missing dependency for mtl - - - - - 3681f919 by Ben Gamari at 2021-01-13T18:39:25-05:00 Merge remote-tracking branch 'origin/ghc-9.0' into ghc-head - - - - - 33c6b152 by Hécate Moonlight at 2021-01-14T16:04:20+01:00 Merge pull request haskell/haddock#1273 from hsyl20/wip/hsyl20/arrows Fix after binder collect changes - - - - - 70d13e8e by Joachim Breitner at 2021-01-22T19:03:45+01:00 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) - - - - - 7d6dd57a by John Ericson at 2021-01-22T22:02:02+00:00 Add `NoGhcTc` instance now that it's not closed - - - - - e5fdaf0a by Alan Zimmerman at 2021-01-23T22:57:44+00:00 Merge pull request haskell/haddock#1293 from obsidiansystems/wip/fix-18936 Add `NoGhcTc` instance now that it's not closed - - - - - 989a1e05 by Oleg Grenrus at 2021-01-24T16:11:46+03:00 Add import list to Data.List - - - - - 368e144a by Ben Gamari at 2021-01-28T22:15:48+01:00 Adapt to "Make PatSyn immutable" - - - - - abe66c21 by Alfredo Di Napoli at 2021-02-01T08:05:35+01:00 Rename pprLogErrMsg to new name - - - - - e600e75c by Hécate Moonlight at 2021-02-05T14:53:00+01:00 Move CI to ghc-9.0 - - - - - dd492961 by Vladislav Zavialov at 2021-02-05T14:53:00+01:00 Update cabal.project and README build instructions - - - - - 31bd292a by Hécate Moonlight at 2021-02-05T15:03:56+01:00 Merge pull request haskell/haddock#1296 from Kleidukos/ghc-9.0 Merge the late additions to ghc-8.10 into ghc-9.0 - - - - - 6388989e by Vladislav Zavialov at 2021-02-05T17:41:57+03:00 Cleanup: fix build warnings - - - - - f99407ef by Daniel Rogozin at 2021-02-05T18:11:48+03:00 type level characters support for haddock (required for haskell/haddock#11342) - - - - - d8c6b26f by Hécate Moonlight at 2021-02-05T17:44:50+01:00 Add a CONTRIBUTING.md file - - - - - 6a01ad98 by Hécate Moonlight at 2021-02-05T17:58:16+01:00 Merge pull request haskell/haddock#1312 from Kleidukos/proper-branch-etiquette Add a CONTRIBUTING.md file - - - - - 955eecc4 by Vladislav Zavialov at 2021-02-05T20:29:00+03:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into ghc-head - - - - - 47b3d6ab by Hécate Moonlight at 2021-02-05T19:09:38+01:00 Amend the CONTRIBUTING.md file - - - - - 23de6137 by Hécate Moonlight at 2021-02-05T19:16:49+01:00 Merge pull request haskell/haddock#1313 from Kleidukos/amend-contributing Amend the CONTRIBUTING.md file - - - - - 69026b59 by Krzysztof Gogolewski at 2021-02-05T23:05:56+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb) - - - - - ea026b78 by Oleg Grenrus at 2021-02-06T17:14:45+01:00 Add import list to Data.List - - - - - 5204326f by Hécate Moonlight at 2021-02-06T17:15:44+01:00 Merge pull request haskell/haddock#1316 from Kleidukos/explicit-imports-to-data-list Add import list to Data.List - - - - - 1f4d2136 by Ben Gamari at 2021-02-06T11:53:31-05:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge - - - - - 13f0d09a by Ben Gamari at 2021-02-06T11:53:45-05:00 Fix partial record selector warning - - - - - 5c115f7e by Ben Gamari at 2021-02-06T11:55:52-05:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into wip/ghc-head-merge - - - - - b6fd8b75 by Ben Gamari at 2021-02-06T12:01:31-05:00 Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-merge - - - - - a967194c by Ben Gamari at 2021-02-06T18:30:35-05:00 Merge branch 'wip/ghc-head-merge' into ghc-head - - - - - 1f4c3a91 by MorrowM at 2021-02-07T01:52:33+02:00 Fix search div not scrolling - - - - - 684b1287 by Iñaki García Etxebarria at 2021-02-07T16:13:04+01:00 Add support for labeled module references Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label". - - - - - bdb55a5d by Hécate Moonlight at 2021-02-07T16:18:10+01:00 Merge pull request haskell/haddock#1319 from alexbiehl/alex/compat Backward compat: Add support for labeled module references - - - - - 6ca70991 by Hécate Moonlight at 2021-02-07T16:21:29+01:00 Merge pull request haskell/haddock#1314 from tweag/show-linear-backport Backport haskell/haddock#1238 (linear types) to ghc-9.0 - - - - - d9d73298 by Alex Biehl at 2021-02-07T17:46:25+01:00 Remove dubious parseModLink Instead construct the ModLink value directly when parsing. - - - - - 33b4d020 by Hécate Moonlight at 2021-02-07T17:52:05+01:00 Merge pull request haskell/haddock#1320 from haskell/alex/fix Remove dubious parseModLink - - - - - 54211316 by Hécate Moonlight at 2021-02-07T18:12:07+01:00 Merge pull request haskell/haddock#1318 from MorrowM/ghc-9.0 Fix search div not scrolling - - - - - 19db679e by alexbiehl-gc at 2021-02-07T18:14:46+01:00 Merge pull request haskell/haddock#1317 from bgamari/wip/ghc-head-merge Merge ghc-8.10 into ghc-head - - - - - 6bc1e9e4 by Willem Van Onsem at 2021-02-07T18:25:30+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - c8537cf8 by alexbiehl-gc at 2021-02-07T18:30:40+01:00 Merge pull request haskell/haddock#1322 from haskell/alex/forward-port simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 2d47ae4e by alexbiehl-gc at 2021-02-07T18:39:59+01:00 Merge branch 'ghc-head' into ghc-9.0 - - - - - 849e4733 by Hécate Moonlight at 2021-02-07T18:43:19+01:00 Merge pull request haskell/haddock#1321 from Kleidukos/ghc-9.0 Merge ghc-9.0 into ghc-head - - - - - ee6095d7 by Sylvain Henry at 2021-02-08T11:36:38+01:00 Update for Logger - - - - - 4ad688c9 by Alex Biehl at 2021-02-08T18:11:24+01:00 Merge pull request haskell/haddock#1310 from hsyl20/wip/hsyl20/logger2 Logger refactoring - - - - - 922a9e0e by Ben Gamari at 2021-02-08T12:54:33-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - 991649d2 by Sylvain Henry at 2021-02-09T10:55:17+01:00 Fix to build with HEAD - - - - - a8348dc2 by Hécate Moonlight at 2021-02-09T10:58:51+01:00 Merge pull request haskell/haddock#1327 from hsyl20/wip/hsyl20/logger2 Fix to build with HEAD - - - - - 0abdbca6 by Fendor at 2021-02-09T20:06:15+01:00 Add UnitId to Target record - - - - - d5790a0e by Alex Biehl at 2021-02-11T10:32:32+01:00 Stable sort for (data/newtype) instances - - - - - 8e6036f5 by Alex Biehl at 2021-02-11T10:32:32+01:00 Also make TyLit deterministic - - - - - f76d2945 by Hécate Moonlight at 2021-02-11T11:00:31+01:00 Merge pull request haskell/haddock#1329 from hsyl20/hsyl20/stabe_iface Stable sort for instances - - - - - 5e0469ea by Oleg Grenrus at 2021-02-14T15:28:15+02:00 Add import list to Data.List in Haddock.Interface.Create - - - - - fa57cd24 by Hécate Moonlight at 2021-02-14T17:19:27+01:00 Merge pull request haskell/haddock#1331 from phadej/more-explicit-data-list-imports Add import list to Data.List in Haddock.Interface.Create - - - - - f0cd629c by Hécate Moonlight at 2021-02-21T00:22:01+01:00 Merge pull request haskell/haddock#1311 from fendor/wip/add-targetUnitId-to-target Add UnitId to Target record - - - - - 674ef723 by Joachim Breitner at 2021-02-22T10:39:18+01:00 html-test: Always set language from ghc-9.2 on, the “default” langauge of GHC is expected to change more wildly. To prepare for that (and unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4853), this sets the language for all the test files to `Haskell2010`. This should insolate this test suite against changes to the default. Cherry-picked from https://github.com/haskell/haddock/pull/1341 - - - - - f072d623 by Hécate Moonlight at 2021-02-22T10:56:51+01:00 Merge pull request haskell/haddock#1342 from nomeata/joachim/haskell2010-in-tests-ghc-head html-test: Always set language - - - - - caebbfca by Hécate Moonlight at 2021-02-22T11:53:07+01:00 Clean-up of Interface and Interface.Create's imports and pragmata - - - - - f6caa89d by Hécate Moonlight at 2021-02-22T11:54:58+01:00 Merge pull request haskell/haddock#1345 from Kleidukos/head/fix-interface-imports [ghc-head] Clean-up of Interface and Interface.Create's imports and pragmata - - - - - 7395c9cb by Hécate Moonlight at 2021-02-22T18:44:57+01:00 Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 6e9fb5d5 by Hécate Moonlight at 2021-02-22T18:45:28+01:00 Merge pull request haskell/haddock#1348 from Kleidukos/head/explicit-imports-interface Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 9198b118 by Alan Zimmerman at 2021-02-22T20:04:24+00:00 Context becomes a Maybe in the GHC AST This prevents noLoc's appearing in the ParsedSource. Match the change in GHC. - - - - - 0af20f64 by Hécate Moonlight at 2021-02-23T12:36:12+01:00 Fix the call-site of guessTarget in Interface.hs Explicit the imports from GHC.HsToCore.Docs - - - - - b7886885 by Hécate Moonlight at 2021-02-23T12:37:54+01:00 Merge pull request haskell/haddock#1349 from Kleidukos/fix-interface-guesstarget-call Fix the call-site of guessTarget in Interface.hs - - - - - 9cf041ba by Sylvain Henry at 2021-02-24T11:08:20+01:00 Fix haddockHypsrcTest output in ghc-head - - - - - b194182a by Hécate Moonlight at 2021-02-24T11:12:36+01:00 Merge pull request haskell/haddock#1351 from hsyl20/wip/hsyl20/fix-head Fix haddockHypsrcTest output in ghc-head - - - - - 3ce8b375 by Shayne Fletcher at 2021-03-06T09:55:03-05:00 Add ITproj to parser - - - - - d2abf762 by Ben Gamari at 2021-03-06T19:26:49-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a0f6047d by Andrew Martin at 2021-03-07T11:25:23-05:00 Update for boxed rep - - - - - 6f63c99e by Ben Gamari at 2021-03-10T13:20:21-05:00 Update for "FastString: Use FastMutInt instead of IORef Int" - - - - - e13f01df by Luke Lau at 2021-03-10T15:38:40-05:00 Implement template-haskell's putDoc This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int - - - - - 89263d94 by Alan Zimmerman at 2021-03-15T17:15:26+00:00 Match changes in GHC AST for in-tree API Annotations As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418 - - - - - 28db1934 by Alan Zimmerman at 2021-03-15T20:40:09+00:00 Change some type family test results. It is not clear to me whether the original was printing incorrectly (since we did not have the TopLevel flag before now), or if this behaviour is expected. For the time being I am assuming the former. - - - - - 7c11c989 by Sylvain Henry at 2021-03-22T10:05:19+01:00 Fix after NameCache changes - - - - - addbde15 by Sylvain Henry at 2021-03-22T10:05:19+01:00 NameCache doesn't store a UniqSupply anymore - - - - - 15ec6cec by Ben Gamari at 2021-03-22T17:53:44-04:00 Bump GHC version to 9.2 - - - - - dbd6aa63 by Hécate Moonlight at 2021-03-24T14:28:36+01:00 Merge pull request haskell/haddock#1365 from hsyl20/wip/hsyl20/iface1 NameCache refactoring - - - - - 2d32da7e by Oleg Grenrus at 2021-03-27T01:12:00+02:00 Specialization of Data.List - - - - - 32b84fa6 by Fendor at 2021-03-27T10:50:17+01:00 Add UnitId to Target record This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time. - - - - - 54bf9f0e by Hécate Moonlight at 2021-03-28T14:08:35+02:00 Merge pull request haskell/haddock#1368 from fendor/target-unit-id-revert Add UnitId to Target record - - - - - 7dea168a by Alan Zimmerman at 2021-03-29T08:45:52+01:00 EPA : Rename ApiAnn to EpAnn - - - - - 72967f65 by Alfredo Di Napoli at 2021-03-29T09:47:01+02:00 pprError changed name in GHC - - - - - 4bc61035 by Alan Zimmerman at 2021-03-29T16:16:27-04:00 EPA : Rename ApiAnn to EpAnn - - - - - 108d031d by Ben Gamari at 2021-03-29T18:49:36-04:00 Merge commit '36418c4f70d7d2b179a77925b3ad5caedb08c9b5' into HEAD - - - - - 1444f700 by Ben Gamari at 2021-03-31T09:18:39-04:00 Merge pull request haskell/haddock#1370 from adinapoli/wip/adinapoli-diag-reason-severity Rename pprError to mkParserErr - - - - - d3087b79 by Ben Gamari at 2021-03-31T11:34:17-04:00 Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head - - - - - 170b79e9 by Ben Gamari at 2021-03-31T12:24:56-04:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - db0d6bae by Ben Gamari at 2021-04-10T09:34:35-04:00 Bump GHC version to 9.3 - - - - - a9f2c421 by Alan Zimmerman at 2021-04-19T18:26:46-04:00 Update for EPA changes in GHC (cherry picked from commit cafb48118f7c111020663776845897e225607b41) - - - - - 1ee4b7c7 by Sylvain Henry at 2021-05-11T10:00:06+02:00 Removal of HsVersions.h (#1388) * Update for EPA changes in GHC * Account for HsVersions.h removal Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 79e819e9 by Hécate Moonlight at 2021-05-11T10:14:47+02:00 Revert "Removal of HsVersions.h (#1388)" This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6. - - - - - 3dbd3f8b by Alan Zimmerman at 2021-05-11T10:15:17+02:00 Update for EPA changes in GHC - - - - - 2ce80c17 by Sylvain Henry at 2021-05-11T10:15:19+02:00 Account for HsVersions.h removal - - - - - 00e4c918 by Christiaan Baaij at 2021-05-13T08:21:56+02:00 Add Haddock support for the OPAQUE pragma (#1380) - - - - - 8f9049b2 by Hécate Moonlight at 2021-05-13T08:40:22+02:00 fixup! Use GHC 9.2 in CI runner - - - - - 27ddec38 by Alan Zimmerman at 2021-05-13T22:51:20+01:00 EPA: match changes from GHC T19834 - - - - - f8a1d714 by Felix Yan at 2021-05-14T17:10:04+02:00 Allow hspec 2.8 (#1389) All tests are passing. - - - - - df44453b by Divam Narula at 2021-05-20T15:42:42+02:00 Update ref, the variables got renamed. (#1391) This is due to ghc/ghc!5555 which caused a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used. - - - - - e46bfc87 by Alan Zimmerman at 2021-05-20T19:05:09+01:00 Remove Maybe from HsQualTy Match changes in GHC for haskell/haddock#19845 - - - - - 79bd7b62 by Shayne Fletcher at 2021-05-22T08:20:39+10:00 FieldOcc: rename extFieldOcc to foExt - - - - - 6ed68c74 by Ben Gamari at 2021-05-21T22:29:30-04:00 Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head - - - - - f9a02d34 by Alfredo Di Napoli at 2021-05-24T13:53:00+02:00 New Parser diagnostics interface - - - - - 392807d0 by Ben Gamari at 2021-05-24T09:57:40-04:00 Merge pull request haskell/haddock#1394 from adinapoli/wip/adinapoli-align-ps-messages Align Haddock to use the new Parser diagnostics interface - - - - - 33023cd8 by Ben Gamari at 2021-05-24T11:19:16-04:00 Revert "Add Haddock support for the OPAQUE pragma (#1380)" This reverts commit a1337c599ef7720b0482a25c55f11794112496dc. The GHC patch associated with this change is not yet ready to be merged. - - - - - 8c005af7 by Ben Simms at 2021-05-28T07:56:20+02:00 CI configuration for ghc-head (#1395) - - - - - 1e947612 by Hécate Moonlight at 2021-05-28T12:27:35+02:00 Use GHC 9.2 in CI runner (#1378) - - - - - e6fa10ab by CGenie at 2021-05-31T09:02:13+02:00 Add page about common errors (#1396) * Update index.rst Common errors page * Create common-errors.rst * Update common-errors.rst * Use GHC 9.2 in CI runner (#1378) * [haddock-api] remove .hspec-failures Co-authored-by: Hécate Moonlight <Kleidukos at users.noreply.github.com> - - - - - abc72a8d by Sylvain Henry at 2021-06-01T10:02:06+02:00 Adapt Haddock to Logger and Parser changes (#1399) - - - - - 91373656 by Zubin Duggal at 2021-06-01T20:45:10+02:00 Update haddockHypSrc tests since we now compute slighly more type info (#1397) - - - - - ed712822 by Marcin Szamotulski at 2021-06-02T08:54:33+02:00 Added myself to contributors - - - - - 49fdbcb7 by Marcin Szamotulski at 2021-06-02T08:57:24+02:00 Document multi component support - - - - - 9ddc8d7d by Hécate Moonlight at 2021-06-02T09:35:55+02:00 Merge pull request haskell/haddock#1379 from coot/coot/document-multi-component-support Document multi component support - - - - - 585b5c5e by Ben Simms at 2021-06-02T19:46:54+02:00 Update CONTRIBUTING.md (#1402) - - - - - 1df4a605 by Ben Simms at 2021-06-02T19:47:14+02:00 Update CONTRIBUTING.md (#1403) - - - - - 58ea43d2 by sheaf at 2021-06-02T22:09:06+02:00 Update Haddock Bug873 to account for renaming - - - - - c5d0ab23 by Vladislav Zavialov at 2021-06-10T13:35:42+03:00 HsToken in FunTy, RecConGADT - - - - - 1ae2f40c by Hécate Moonlight at 2021-06-11T11:19:09+02:00 Update the CI badges - - - - - 6fdc4de2 by Sylvain Henry at 2021-06-28T19:21:17+02:00 Fix mkParserOpts (#1411) - - - - - 18201670 by Alfredo Di Napoli at 2021-07-05T07:55:12+02:00 Rename getErrorMessages Lexer import This commit renames the Lexer import in `Hyperlinker.Parser` from `getErrorMessages` to `getPsErrorMessages` to eliminate the ambiguity with the `getErrorMessages` function defined in `GHC.Types.Error`. - - - - - 23173ca3 by Ben Gamari at 2021-07-07T11:31:44-04:00 Merge pull request haskell/haddock#1413 from adinapoli/wip/adinapoli-issue-19920 Rename getErrorMessages Lexer import - - - - - b3dc4ed8 by Alan Zimmerman at 2021-07-28T22:30:59+01:00 EPA: match changes from GHC T19834 (cherry picked from commit 2fec1b44e0ee7e263286709aa528b4ecb99ac6c2) - - - - - 5f177278 by Ben Gamari at 2021-08-06T01:17:37-04:00 Merge commit '2a966c8ca37' into HEAD - - - - - cdd81d08 by Marcin Szamotulski at 2021-08-08T17:19:06+02:00 coot/multiple packages (ghc-9.2) (#1418) - - - - - be0d71f1 by Marcin Szamotulski at 2021-08-16T08:46:03+02:00 coot/multiple package (ghc-head) (#1419) * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".". - - - - - 3b09dbdf by Hécate Moonlight at 2021-10-07T23:26:03+02:00 Update GHC 9.2 to latest pre-release in CI - - - - - 7ac55417 by Zubin Duggal at 2021-10-11T12:10:19+02:00 Enable Haddock tests in GHC windows CI (#1428) * testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC - - - - - 1cb81f25 by Andrew Lelechenko at 2021-10-12T15:23:19+02:00 haddock-library does not depend on bytestring or transformers (#1426) - - - - - a890b9aa by sheaf at 2021-10-15T22:19:42+02:00 update haddockHypsrcTest for GHC MR !6705 (#1430) - - - - - 42a55c6c by Sylvain Henry at 2021-10-15T22:20:10+02:00 Fix after PkgQual refactoring (#1429) - - - - - 91659238 by Alan Zimmerman at 2021-10-28T18:57:10+01:00 Update for changes in GHC for branch wip/az/no-srcspan-anno-instances - - - - - acf23e60 by Vladislav Zavialov at 2021-11-05T02:09:47+03:00 Do not use forall as an identifier See GHC ticket haskell/haddock#20609 - - - - - c565db0e by Krzysztof Gogolewski at 2021-11-27T02:42:35+01:00 Update after NoExtCon -> DataConCantHappen rename - - - - - b5f55590 by Artem Pelenitsyn at 2021-11-27T11:14:17+01:00 fix CI for 9.2 (#1436) - - - - - 25cd621e by Matthew Pickering at 2021-12-02T11:46:54+00:00 Update html-test for Data.List revert - - - - - 1d5ff85f by malteneuss at 2021-12-15T07:56:55+01:00 Add hint about inline link issue (#1444) - - - - - 791fde81 by Sylvain Henry at 2021-12-16T09:29:51+01:00 Bump ghc-head (#1445) * Update after NoExtCon -> DataConCantHappen rename * Update html-test for Data.List revert * Fix for new Plugins datatype Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 44236317 by Sylvain Henry at 2021-12-17T09:39:00+01:00 Fix for new Plugins datatype - - - - - 80ada0fa by Hécate Moonlight at 2021-12-17T17:28:48+01:00 Remove ghc-head workflow (#1446) Contributions of GHC glue code are now done on the GHC gitlab, not in the GitHub repo anymore. - - - - - 49e171cd by Matthew Pickering at 2021-12-28T09:47:09+00:00 Remove use of ExtendedModSummary - - - - - 0e91b5ea by askeblad at 2022-01-04T09:18:35+01:00 update URLs - - - - - 9f13c212 by Hécate Moonlight at 2022-02-25T10:19:46+01:00 Fix solver for GHC 9.2 - - - - - 386751a1 by Meng Weng Wong at 2022-02-25T19:19:11+01:00 IDoc link has bitrotted; replaced with web.archive.org cache. (#1454) - - - - - d877cbe6 by Hécate Moonlight at 2022-02-25T19:21:58+01:00 Fix haddock user guide (#1456) - - - - - cc47f036 by Andrew Lelechenko at 2022-03-04T17:29:36+01:00 Allow text-2.0 in haddock-library (#1459) - - - - - 7b3685a3 by malteneuss at 2022-03-07T19:27:24+01:00 Add multi-line style hint to style section (#1460) - - - - - c51088b8 by John Ericson at 2022-03-11T16:46:26+01:00 Fix CollectPass instance to match TTG refactor Companion to GHC !7614 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7614) - - - - - b882195b by Vladislav Zavialov at 2022-03-14T20:32:30+01:00 Link to (~) - - - - - 877349b8 by Christiaan Baaij at 2022-03-16T09:20:43+01:00 Add Haddock support for the OPAQUE pragma - - - - - 0ea22721 by askeblad at 2022-03-16T09:44:27+01:00 typos (#1464) - - - - - a6d13da1 by Matthew Pickering at 2022-03-22T13:41:17+00:00 Minimum changes needed for compilation with hi-haddock With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC. - - - - - e7ac9129 by Matthew Pickering at 2022-03-22T21:17:50+00:00 Update test output - - - - - 6d916214 by Matthew Pickering at 2022-03-24T15:06:26+00:00 Merge branch 'wip/opaque_pragma' into 'ghc-head' Add Haddock support for the OPAQUE pragma See merge request ghc/haddock!2 - - - - - 42208183 by Steve Hart at 2022-03-25T20:43:50+01:00 Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. - - - - - 9676fd79 by Steve Hart at 2022-03-25T21:33:34+01:00 Make links in Synopsis functional again (#1458) Commit e41c1cbe9f0476997eac7b4a3f17cbc6b2262faf added a call to e.preventDefault() when handling click events that reach a toggle element. This prevents the browser from following hyperlinks within the Synopsis section when they are clicked by a user. This commit restores functioning hyperlinks within the Synopsis section by removing the call to e.preventDefault(), as it does not appear to be necessary, and removing it increases the flexibility of the details-helper code. - - - - - d1edd637 by sheaf at 2022-04-01T12:02:02+02:00 Keep track of promotion ticks in HsOpTy Keeping track of promotion ticks in HsOpTy allows us to properly pretty-print promoted constructors such as lists. - - - - - 9dcb2dfc by Jakob Brünker at 2022-04-01T15:46:22+00:00 Add support for \cases See merge request ghc/ghc!7873 - - - - - b0412ee5 by askeblad at 2022-04-06T17:47:57+02:00 spelling errors (#1471) - - - - - 6b18829b by Vladislav Zavialov at 2022-04-06T18:53:58+02:00 Rename [] to List - - - - - 2d046691 by Vladislav Zavialov at 2022-04-07T20:25:54+03:00 HsToken ConDeclGADT con_dcolon - - - - - 90b43da4 by Steve Hart at 2022-04-12T13:29:46+02:00 Parse Markdown links at beginning of line within a paragraph (#1470) * Catch Markdown links at beginning of line within paragraph Per Issue haskell/haddock#774, Markdown links were being parsed as ordinary text when they occurred at the beginning of a line other than the first line of the paragraph. This occurred because the parser was not interpreting a left square bracket as a special character that could delimit special markup. A space character was considered a special character, so, if a space occurred at the beginning of the new line, then the parser would interpret the space by itself and then continue parsing, thereby catching the Markdown link. '\n' was not treated as a special character, so the parser did not catch a Markdown link that may have followed. Note that this will allow for Markdown links that are not surrounded by spaces. For example, the following text includes a Markdown link that will be parsed: Hello, world[label](url) This is consistent with how the parser handles other types of markup. * Remove obsolete documentation hint Commit 6b9aeafddf20efc65d3725c16e3fc43a20aac343 should eliminate the need for the workaround suggested in the documentation. - - - - - 5b08312d by Hécate Moonlight at 2022-04-12T13:36:38+02:00 Force ghc-9.2 in the cabal.project - - - - - 0d0ea349 by dependabot[bot] at 2022-04-12T13:57:41+02:00 Bump path-parse from 1.0.5 to 1.0.7 in /haddock-api/resources/html (#1469) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 2b9fc65e by dependabot[bot] at 2022-04-12T13:57:54+02:00 Bump copy-props from 2.0.4 to 2.0.5 in /haddock-api/resources/html (#1468) Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - ea98a6fb by Ben Gamari at 2022-04-23T22:54:37-04:00 Update for GHC 9.4 - - - - - 9e11864f by Ben Gamari at 2022-04-25T16:24:31-04:00 Merge remote-tracking branch 'upstream/ghc-9.2' into ghc-head - - - - - f83cc506 by Ben Gamari at 2022-04-25T17:00:25-04:00 Bump ghc version to 9.5 - - - - - e01c2e7d by Ben Gamari at 2022-04-28T16:19:04-04:00 Revert "Bump ghc-head (#1445)" This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2. This should not have been merged. - - - - - a2b5ee8c by Ben Gamari at 2022-04-28T16:19:24-04:00 Merge commit '2627a86c' into ghc-head - - - - - 0c6fe4f9 by Ben Gamari at 2022-04-29T10:05:54-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-9.4 - - - - - b6e5cb0a by Ben Gamari at 2022-04-29T11:46:06-04:00 Revert "HsToken ConDeclGADT con_dcolon" This reverts commit 24208496649a02d5f87373052c430ea4a97842c5. - - - - - 15a62888 by Ben Gamari at 2022-04-29T15:12:55-04:00 Bump base upper bound - - - - - 165b9031 by Ben Gamari at 2022-04-29T23:58:38-04:00 Update test output - - - - - e0c3e5da by Phil de Joux at 2022-05-02T14:46:38+02:00 Add hlint action .hlint.yaml with ignores & CPP. (#1475) - - - - - ead1158d by Raphael Das Gupta at 2022-05-02T14:46:48+02:00 fix grammar in docs: "can the" → "can be" (#1477) - - - - - cff97944 by Ben Gamari at 2022-05-02T18:38:56-04:00 Allow base-4.17 - - - - - e4ecb201 by Phil de Joux at 2022-05-03T13:14:55+02:00 Remove unused imports that GHC warned about. (#1480) - - - - - 222890b1 by Phil de Joux at 2022-05-03T13:15:46+02:00 Follow hlint suggestion to remove redundant bang. (#1479) - - - - - 058b671f by Phil de Joux at 2022-05-03T13:34:04+02:00 Follow hlint, remove language pragmas in libs. (#1478) - - - - - 0a645049 by Ben Simms at 2022-05-03T14:19:24+02:00 Keep track of ordered list indexes and render them (#1407) * Keep track of ordered list indexes and render them * Rename some identifiers to clarify - - - - - f0433304 by Norman Ramsey at 2022-05-04T15:13:34-04:00 update for changes in GHC API - - - - - 3740cf71 by Emily Martins at 2022-05-06T18:23:48+02:00 Add link to the readthedocs in cabal description to show on hackage. (cherry picked from commit 52e2d40d47295c02d3181aac0c53028e730f1e3b) - - - - - 5d754f1e by Hécate Moonlight at 2022-05-06T18:44:57+02:00 remove Bug873 - - - - - 968fc267 by Hécate Moonlight at 2022-05-06T18:48:28+02:00 Ignore "Use second" HLint suggestion. It increases laziness. - - - - - 02d14e97 by Jade Lovelace at 2022-05-07T17:42:08+02:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` - - - - - b22b87ed by Artem Pelenitsyn at 2022-05-08T16:19:47+02:00 fix parsing trailing quotes in backticked identifiers (#1408) (#1483) - - - - - 80ae107b by Alex Biehl at 2022-05-08T16:37:16+02:00 Fix "Defined by not used" error (cherry picked from commit 6e02a620a26c3a44f98675dd1b93b08070c36c0a) - - - - - 4c838e84 by Hécate Moonlight at 2022-05-08T16:37:16+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - fc9827b4 by Hécate Moonlight at 2022-05-08T16:40:40+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - b153b555 by Xia Li-yao at 2022-05-20T17:52:42+02:00 Hide synopsis from search when hidden (#1486) Fix haskell/haddock#1451 - - - - - f3e38b85 by Marcin Szamotulski at 2022-05-21T23:32:31+02:00 Allow to hide interfaces when rendering multiple components (#1487) This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package. - - - - - f942863b by Marcin Szamotulski at 2022-05-24T08:29:59+02:00 Check if doc-index.json exists before reading it (#1488) - - - - - 31e92982 by Marcin Szamotulski at 2022-05-25T16:22:13+02:00 Version bump 2.26.1 (#1489) * Version bump 2.26.1 We extended format accepted by `--read-interface` option, which requires updating the minor version. * Update documentation of --read-interface option - - - - - 7cc873e0 by sheaf at 2022-05-25T16:42:31+02:00 Updated HaddockHypsrcTest output for record update changes (MR !7981) - - - - - cd196942 by Marcin Szamotulski at 2022-05-25T20:28:47+02:00 Use visibility to decide which interfaces are included in quickjump (#1490) This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision. - - - - - 00c713c5 by Hécate Moonlight at 2022-05-26T17:09:15+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 2f3039f1 by Hécate Moonlight at 2022-05-26T17:10:59+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 63a5650c by romes at 2022-05-31T12:43:22+01:00 TTG: Match new GHC AST - - - - - dd7d1617 by romes at 2022-06-02T16:11:00+01:00 Update for IE changes in !8228 - - - - - c23aaab7 by cydparser at 2022-06-06T08:48:14+02:00 Fix and improve CI (#1495) * Pin GHC version before creating the freeze file * Use newest action versions * Improve caching * Avoid unnecessarily reinstalling GHC * Use GHC 9.2.2 for CI Co-authored-by: Cyd Wise <cwise at tripshot.com> - - - - - c156fa77 by Hécate Moonlight at 2022-06-06T11:59:35+02:00 Add Mergify configuration (#1496) - - - - - 2dba4188 by Hécate Moonlight at 2022-06-06T16:12:50+02:00 Bump haddock's version in cabal file to 2.26.1 (#1497) - - - - - d7d4b8b9 by Marcin Szamotulski at 2022-06-07T06:09:40+00:00 Render module tree per package in the content page (#1492) * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version. - - - - - 77765665 by Mike Pilgrem at 2022-06-12T21:57:19+01:00 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - b0e079b0 by mergify[bot] at 2022-06-13T11:49:37+00:00 Merge pull request haskell/haddock#1108 from mpilgrem/fix783 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - 6c0292b1 by Hécate Moonlight at 2022-06-21T17:21:08+02:00 Update the contribution guide - - - - - e413b9fa by dependabot[bot] at 2022-06-21T23:38:19+02:00 Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 29d0ef70 by romes at 2022-07-06T11:29:39+02:00 TTG: AST Updates for !8308 - - - - - 1bae7c87 by Alan Zimmerman at 2022-07-06T22:50:43+01:00 Match GHC changes for T21805 This brings in a newtype for FieldLabelString - - - - - 6fe8b988 by Phil de Joux at 2022-07-16T20:54:26+00:00 Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. - - - - - 48fb43af by Phil de Joux at 2022-07-19T09:32:55+02:00 Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. - - - - - c1cf1fa7 by Phil de Joux at 2022-07-24T13:45:59+02:00 Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. - - - - - 74777eb2 by Jade Lovelace at 2022-07-29T11:02:41+01:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` (cherry picked from commit ab53ccf089ea703b767581ac14be0f6c78a7678a) - - - - - faa4cfcf by Hécate Moonlight at 2022-07-29T20:31:20+02:00 Merge pull request haskell/haddock#1516 from duog/9-4-backport-fix-hyperlinks Backport 9-4: Fix hyperlinks to external items and modules (#1482) - - - - - 5d2450f3 by Ben Gamari at 2022-08-05T17:41:15-04:00 Merge remote-tracking branch 'origin/ghc-9.4' - - - - - 63954f73 by Ben Gamari at 2022-08-05T19:08:36-04:00 Clean up build and testsuite for GHC 9.4 - - - - - d4568cb8 by Hécate Moonlight at 2022-08-05T19:10:49-04:00 Bump the versions - - - - - 505583a4 by Ben Gamari at 2022-08-06T13:58:27-04:00 Merge pull request haskell/haddock#1518 from bgamari/wip/ghc-9.4-merge Merge GHC 9.4 into `main` - - - - - 5706f6a4 by Ben Gamari at 2022-08-06T22:57:21-04:00 html-test: Testsuite changes for GHC 9.4.1 - - - - - 5f2a45a2 by Ben Gamari at 2022-08-15T14:33:05-04:00 doc: Fix a few minor ReST issues Sphinx was complaining about too-short title underlines. - - - - - 220e6410 by Ben Gamari at 2022-08-15T14:41:24-04:00 Merge branch 'main' into ghc-head - - - - - fbeb1b02 by Ben Gamari at 2022-08-15T14:45:16-04:00 Updates for GHC 9.5 - - - - - eee562eb by Vladislav Zavialov at 2022-08-15T14:46:13-04:00 HsToken ConDeclGADT con_dcolon - - - - - c5f073db by Ben Gamari at 2022-08-15T16:55:35-04:00 Updates for GHC 9.5 - - - - - 3f7ab242 by Vladislav Zavialov at 2022-08-15T16:55:35-04:00 HsToken ConDeclGADT con_dcolon - - - - - a18e473d by Ben Gamari at 2022-08-16T08:35:19-04:00 Merge branch 'wip/ghc-head-bump' into ghc-head - - - - - af0ff3a4 by M Farkas-Dyck at 2022-09-15T21:16:05+00:00 Disuse `mapLoc`. - - - - - a748fc38 by Matthew Farkas-Dyck at 2022-09-17T10:44:18+00:00 Scrub partiality about `NewOrData`. - - - - - 2758fb6c by John Ericson at 2022-09-18T03:27:37+02:00 Test output changed because of change to `base` Spooky, but I guess that is intended? - - - - - a7eec128 by Torsten Schmits at 2022-09-21T11:06:55+02:00 update tests for the move of tuples to GHC.Tuple.Prim - - - - - 461e7b9d by Ross Paterson at 2022-09-24T22:01:25+00:00 match implementation of GHC proposal haskell/haddock#106 (Define Kinds Without Promotion) - - - - - f7fd77ef by sheaf at 2022-10-17T14:53:01+02:00 Update Haddock for GHC MR !8563 (configuration of diagnostics) - - - - - 3d3e85ab by Vladislav Zavialov at 2022-10-22T23:04:06+03:00 Class layout info - - - - - cbde4cb0 by Simon Peyton Jones at 2022-10-25T23:19:18+01:00 Adapt to Constraint-vs-Type See haskell/haddock#21623 and !8750 - - - - - 7108ba96 by Tom Smeding at 2022-11-01T22:33:23+01:00 Remove outdated footnote about module re-exports The footnote is invalid with GHC 9.2.4 (and possibly earlier): the described behaviour in the main text works fine. - - - - - 206c6bc7 by Hécate Moonlight at 2022-11-01T23:00:46+01:00 Merge pull request haskell/haddock#1534 from tomsmeding/patch-1 - - - - - a57b4c4b by Andrew Lelechenko at 2022-11-21T00:39:52+00:00 Support mtl-2.3 - - - - - e9d62453 by Simon Peyton Jones at 2022-11-25T13:49:12+01:00 Track small API change in TyCon.hs - - - - - eb1c73f7 by Ben Gamari at 2022-12-07T08:46:21-05:00 Update for GhC 9.6 - - - - - 063268dd by Ben Gamari at 2022-12-07T11:26:32-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 4ca722fe by Ben Gamari at 2022-12-08T14:43:26-05:00 Bump bounds to accomodate base-4.18 - - - - - 340b7511 by Vladislav Zavialov at 2022-12-10T12:31:28+00:00 HsToken in HsAppKindTy - - - - - 946226ec by Ben Gamari at 2022-12-13T20:12:56-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - fd8faa66 by Ben Gamari at 2022-12-22T13:44:28-05:00 Bump GHC version to 9.7 - - - - - 2958aa9c by Ben Gamari at 2022-12-22T14:49:16-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 9e0fefd8 by Andrei Borzenkov at 2023-01-30T14:02:04+04:00 Rename () to Unit, Rename (,,...,,) to Tuple<n> - - - - - eb3968b5 by Ben Gamari at 2023-03-10T02:32:43-05:00 Bump versions for ghc-9.6 release - - - - - 4aeead36 by Adam Gundry at 2023-03-23T13:53:47+01:00 Adapt to warning categories changes - - - - - 642d8d60 by sheaf at 2023-03-29T13:35:56+02:00 Adapt to record field refactor This commit adapts to the changes in GHC MR !8686, which overhauls the treatment of record fields in the renamer, adding separate record field namespaces and entirely removing the GreName datatype. - - - - - ac8d4333 by doyougnu at 2023-03-29T11:11:44-04:00 Update UniqMap API - - - - - 7866fc86 by Ben Orchard at 2023-04-20T11:29:33+02:00 update classify with new tokens - - - - - ffcdd683 by Finley McIlwaine at 2023-04-24T09:36:18-06:00 Remove index-state - - - - - 05b70982 by Finley McIlwaine at 2023-04-26T08:16:31-06:00 `renameInterface` space leak fixes - Change logic for accumulation of names for which link warnings will be generated - Change handling of `--ignore-link-symbol` to allow qualified and unqualified names. Added to CHANGES.md - Some formatting changes and comments here and there - - - - - e5697d7c by Finley McIlwaine at 2023-04-27T18:46:36-06:00 Messy things - ghc-debug dependency and instrumentation - cabal.project custom with-compiler - hie.yaml files - traces and such - - - - - 0b8ef80b by Finley McIlwaine at 2023-05-02T18:08:52-06:00 Stop retaining GRE closures GRE closures should never be necessary to Haddock, so we never want to keep them on the heap. Despite that, they are retained by a lot of the data structures that Haddock makes use of. - Attempt to fix that situation by adding strictness to various computations and pruning the `ifaceInstances` field of `Interface` to a much thinner data type. - Removes the `ifaceFamInstances` field, as it was never used. - Move some of the attach instances types (e.g. `SimpleType`) to the types module - - - - - 8bda991b by Finley McIlwaine at 2023-05-08T16:07:51-06:00 Memory usage fixes - Refactor `ifaceDeclMap` to drastically reduce memory footprint. We no longer store all declarations associated with a given name, since we only cared to determine if the only declaration associated with a name was a value declaration. Change the `DeclMap` type to better reflect this. - Drop pre-renaming export items after the renaming step. Since the Hoogle backend used the pre-renamed export items, this isn't trivial. We now generate Hoogle output for exported declarations during the renaming step (if Hoogle output /should/ be generated), and store that with the renamed export item. - Slightly refactor Hoogle backend to handle the above change and allow for early generation of Hoogle output. - Remove the `ifaceRnDocMap` and `ifaceRnArgMap` fields of the `Interface` type, as they were never used. - Remove some unnecessary strictness - Remove a lot of dead code from `Syb` module - - - - - 1611ac0c by Finley McIlwaine at 2023-05-09T11:51:57-06:00 Unify ErrMsgM and IfM - Delete ErrMsgM, stop accumulating warnings in a writer - Make IfM a state monad, print warnings directly to stdout, move IfM type into types module - Drop ErrMsg = String synonym - Unset IORefs from plugin after they are read, preventing unnecessary retention of interfaces - - - - - 42d696ab by Finley McIlwaine at 2023-05-11T15:52:07-06:00 Thunk leak fixes The strictness introduced in this commit was motivated by observing thunk leaks in the eventlog2html output. - Refactor attach instances list comprehension to avoid large intermediate thunks - Refactor some HTML backend list comprehensions to avoid large intermediate thunks - Avoid thunks accumulating in documentation types or documentation parser - A lot of orphan NFData instances to allow us to force documentation values - - - - - 68561cf6 by Finley McIlwaine at 2023-05-11T17:02:10-06:00 Remove GHC debug dep - - - - - 10519e3d by Finley McIlwaine at 2023-05-15T12:40:48-06:00 Force HIE file path Removes a potential retainer of `ModSummary`s - - - - - 1e4a6ec6 by Finley McIlwaine at 2023-05-15T14:20:34-06:00 Re-add index-state, with-compiler, delete hie.yamls - - - - - a2363fe9 by Hécate Moonlight at 2023-05-15T22:45:16+02:00 Merge pull request haskell/haddock#1594 from FinleyMcIlwaine/finley/ghc-9.6-mem-fixes Reduce memory usage - - - - - e8a78383 by Finley McIlwaine at 2023-05-17T12:19:16-06:00 Merge branch ghc-9.6 into ghc-head - - - - - 22e25581 by Finley McIlwaine at 2023-05-17T12:20:23-06:00 Merge branch 'ghc-head' of gitlab.haskell.org:ghc/haddock into ghc-head - - - - - 41bbf0df by Bartłomiej Cieślar at 2023-05-24T08:57:58+02:00 changes to the WarningTxt cases Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - c686ba9b by Hécate Moonlight at 2023-06-01T14:03:02-06:00 Port the remains of Hi-Haddock - - - - - 9d8a85fd by Hécate Moonlight at 2023-06-01T14:03:06-06:00 Stdout for tests - - - - - 36331d07 by Finley McIlwaine at 2023-06-01T14:06:02-06:00 Formatting, organize imports - - - - - a06059b1 by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix empty context confusion in Convert module - - - - - 379346ae by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix associated type families in Hoogle output - - - - - fc6ea7ed by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix test refs Accept several changes in Hoogle tests: Pretty printing logic no longer prints the `(Proxy (Proxy (...))` chain in Bug806 with parentheses. Since this test was only meant to verify that line breaks do not occur, accept the change. `tyThingToLHsDecl` is called for class and data declarations, which ends up "synifying" the type variables and giving unlifted types kind signatures. As a result, type variables of kind `Type -> Type` are now printed with kind signatures in Hoogle output. This could be changed by manually drop kind signatures from class variables in the Hoogle backend if the behavior is deemed unacceptable. Sometimes subordinate declarations are exported separate from their parent declarations (e.g. record selectors). In this case, a type signature is cobbled together for the export item in `extractDecl`. Since this type signature is very manually constructed, it may lack kind signatures of decls constructed from `tyThingToLHsDecl`. An example of this is the `type-sigs` Hoogle test. Change `*` to `Type` in Hoogle test refs. I don't think this will break Hoogle behavior, since it appears to not consider type signatures in search. I have not fully verified this. - - - - - e14b7e58 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix LaTeX backend test refs Changes to GHC pretty printing code have resulted in some differences to Haddock's LaTeX output. - Type variables are printed explicitly quantified in the LinearTypes test - Wildcard types in type family equations are now printed numbered, e.g. _1 _2, in the TypeFamilies3 test - Combined signatures in DefaultSignatures test are now documented as separate signatures - - - - - 41b5b296 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and test source updates - Stop using kind `*` in html test sources - Add TypeOperators where necessary to avoid warnings and future errors - Rename some test modules to match their module names - - - - - c640e2a2 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix missing deprecation warnings on record fields `lookupOccEnv` was used to resolve `OccNames` with warnings attached, but it doesn't look in the record field namespace. Thus, if a record field had a warning attached, it would not resolve and the warning map would not include it. This commit fixes by using `lookupOccEnv_WithFields` instead. - - - - - fad0c462 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and some comments - - - - - 751fd023 by Finley McIlwaine at 2023-06-01T14:11:41-06:00 Accept HTML test diffs All diffs now boil down to the expected differences resulting from declarations being reified from TyThings in hi-haddock. Surface syntax now has much less control over the syntax used in the documentation. - - - - - d835c845 by Finley McIlwaine at 2023-06-01T14:11:45-06:00 Adapt to new load' type - - - - - dcf776c4 by Finley McIlwaine at 2023-06-01T14:13:13-06:00 Update mkWarningMap and moduleWarning - - - - - 8e8432fd by Finley McIlwaine at 2023-06-01T14:28:54-06:00 Revert load' changes - - - - - aeb2982c by Finley McIlwaine at 2023-06-01T14:40:24-06:00 Accept change to Instances test in html-test Link to Data.Tuple instead of GHC.Tuple.Prim - - - - - 8adfdbac by Finley McIlwaine at 2023-06-01T15:53:17-06:00 Reset ghc dep to ^>= 9.6 - - - - - 2b1ce93d by Finley McIlwaine at 2023-06-06T07:50:04-06:00 Update CHANGES.md, user guide, recomp avoidance * Add --trace-args flag for tracing arguments received to standard output * Avoid recompiling due to changes in optimization flags * Update users guide and changes.md - - - - - f3da6676 by Finley McIlwaine at 2023-06-06T14:12:56-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - bf36c467 by Matthew Pickering at 2023-06-07T10:16:09+01:00 Revert back to e16e20d592a6f5d9ed1af17b77fafd6495242345 Neither of these MRs are ready to land yet which causes issues with other MRs which are ready to land and need haddock changes. - - - - - 421510a9 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 atSign has no unicode variant Prior to this change, atSign was defined as follows: atSign unicode = text (if unicode then "@" else "@") Yes, this is the same symbol '\64' and not your font playing tricks on you. Now we define: atSign = char '@' Both the LaTeX and the Xhtml backend are updated accordingly. - - - - - 3785c276 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 LaTeX: fix printing of type variable bindings Consider this type signature: kindOf :: forall {k} (a :: k). Proxy a -> Proxy k Prior to this fix, the LaTeX backend rendered it like this: kindOf :: forall k a. Proxy a -> Proxy k Now we preserve explicit specificity and kind annotations. - - - - - 0febf3a8 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 Add support for invisible binders in type declarations - - - - - 13e33bb3 by Finley McIlwaine at 2023-06-08T07:51:59-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - 3e5340ce by Finley McIlwaine at 2023-06-08T07:54:27-06:00 Add note about stubdir to recompilation docs - - - - - db7e84dc by Finley at 2023-06-08T08:11:03-06:00 Merge pull request haskell/haddock#1597 from haskell/finley/hi-haddock-9.6 hi-haddock for ghc 9.6 - - - - - 4e085d17 by Finley McIlwaine at 2023-06-14T13:41:06-06:00 Replace SYB traversals - - - - - 7b39aec5 by Finley McIlwaine at 2023-06-14T14:20:17-06:00 Test ref accepts, remove unused HaddockClsInst - - - - - df9c2090 by Finley McIlwaine at 2023-06-15T08:02:51-06:00 Use batchMsg for progress reporting during load With hi-haddock as is, there is an awkward silence during the load operation. This commit makes haddock use the default `batchMsg` Messager for progress reporting, and makes the default GHC verbosity level 1, so the user can see what GHC is doing. - - - - - f23679a8 by Hécate Moonlight at 2023-06-15T20:31:53+02:00 Merge pull request haskell/haddock#1600 from haskell/finley/hi-haddock-optim - - - - - a7982192 by Finley McIlwaine at 2023-06-15T15:02:16-06:00 hi-haddock squashed - - - - - c34f0c8d by Finley McIlwaine at 2023-06-15T16:22:03-06:00 Merge remote-tracking branch 'origin/ghc-9.6' into finley/hi-haddock-squashed - - - - - 40452797 by Bartłomiej Cieślar at 2023-06-16T12:26:04+02:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - e58673bf by Ben Gamari at 2023-06-16T09:33:35-04:00 Bump GHC version to 9.8 - - - - - 74bdf972 by Ben Gamari at 2023-06-16T09:36:18-04:00 Merge commit 'fcaaad06770a26d35d4aafd65772dedadf17669c' into ghc-head - - - - - 418ee3dc by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Remove NFData SourceText, IfaceWarnings updates The NFData SourceText instance is now available in GHC Handle mod_iface mi_warns now being IfaceWarnings - - - - - 62f31380 by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Accept Instances.hs test output Due to ghc!10469. - - - - - a8f2fc0e by Ben Gamari at 2023-06-20T15:48:08-04:00 Test fixes for "Fix associated data family doc structure items" Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - cb1ac33e by Bartłomiej Cieślar at 2023-06-21T12:56:02-04:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 9933e10b by Ben Gamari at 2023-06-21T12:56:02-04:00 Bump GHC version to 9.8 - - - - - fe8c18b6 by Ben Gamari at 2023-06-21T15:36:29-04:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - c61a0d5b by Ben Gamari at 2023-06-21T16:10:51-04:00 Bump GHC version to 9.9 - - - - - 0c2a756e by sheaf at 2023-07-07T13:45:12+02:00 Avoid incomplete record update in Haddock Hoogle This commit avoids running into an incomplete record update warning in the Hoogle backend of Haddock. This was only noticed now, because incomplete record updates were broken in GHC 9.6. Now that they are fixed, we have to avoid running into them! - - - - - f9b952a7 by Ben Gamari at 2023-07-21T11:58:05-04:00 Bump base bound to <4.20 For GHC 9.8. - - - - - 1b27e151 by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Check for puns (see ghc#23368) - - - - - 457341fd by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Remove fake exports for (~), List, and Tuple<n> The old reasoning no longer applies, nowadays those names can be mentioned in export lists. - - - - - bf3dcddf by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Fix pretty-printing of Solo and MkSolo - - - - - 495b2241 by Matthew Pickering at 2023-09-01T13:02:07+02:00 Fix issue with duplicate reexported definitions (T23616) When a class method was reexported, it's default methods were also showing up in the generated html page. The simplest and most non-invasive fix is to not look for the default method if we are just exporting the class method.. because the backends are just showing default methods when the whole class is exported. In general it would be worthwhile to rewrite this bit of code I think as the logic and what gets included is split over `lookupDocs` and `availExportDecl` it would be clearer to combine the two. The result of lookupDocs is always just passed to availExportDecl so it seems simpler and more obvious to just write the function directly. - - - - - 6551824d by Finley McIlwaine at 2023-09-05T13:06:57-07:00 Remove fake export of `FUN` from Prelude This prevents `data FUN` from being shown at the top of the Prelude docs. Fixes \#23920 on GHC. - - - - - 9ab5a448 by Alan Zimmerman at 2023-09-08T18:26:53+01:00 Match changes in wip/az/T23885-unicode-funtycon - - - - - 4d08364e by Alan Zimmerman at 2023-10-31T19:46:45+00:00 EPA: match changes in GHC - EPA: Comments in AnchorOperation - EPA: Remove EpaEofComment - - - - - e7da0d25 by Alan Zimmerman at 2023-11-05T11:20:31+00:00 EPA: match changes in GHC, l2l cleanup - - - - - 4ceac14d by Alan Zimmerman at 2023-11-11T15:16:41+00:00 EPA: Replace Anchor with EpaLocation Match GHC - - - - - 94fb8d47 by Alan Zimmerman at 2023-11-29T18:10:26+00:00 Match GHC, No comments in EpaDelta for comments - - - - - 32d208e1 by Vladislav Zavialov at 2023-12-12T20:41:36+03:00 EPA: Match changes to LHsToken removal - - - - - eebdd316 by Apoorv Ingle at 2024-01-23T13:49:12+00:00 Changes for haskell/haddock#18324 - - - - - ae856a82 by Matthew Pickering at 2024-02-05T12:22:39+00:00 ghc-internals fallout - - - - - f8429266 by Jade at 2024-02-08T14:56:50+01:00 Adjust test for ghc MR !10993 - - - - - 6d1e2386 by Alan Zimmerman at 2024-02-13T22:00:28+03:00 EPA: Match changes to HsParTy and HsFunTy - - - - - 9c588f19 by Fendor at 2024-02-14T11:05:36+01:00 Adapt to GHC giving better Name's for linking - - - - - 778e1db3 by Andrei Borzenkov at 2024-02-16T16:12:07+03:00 Namespace specifiers for fixity signatures - - - - - 826c5b47 by Torsten Schmits at 2024-02-21T13:17:05+01:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 2cff14d5 by Ben Gamari at 2024-02-22T09:35:56-05:00 Bump bounds - - - - - f49376b3 by Ben Gamari at 2024-02-22T09:35:56-05:00 Allow `@since` annotations in export lists Here we extend Haddock to admit `@since` annotations in export lists. These can be attached to most export list items (although not subordinate lists). These annotations supercede the declaration's `@since` annotation in produced Haddocks. - - - - - b5aa93df by Ben Gamari at 2024-02-22T12:09:06-05:00 Allow package-qualified @since declarations - - - - - 8f5957f2 by Ben Gamari at 2024-02-22T13:55:19-05:00 Documentation changes from ghc-internal restructuring Previously many declarations (e.g. `Int`) were declared to have a "home" in `Prelude`. However, now Haddock instead chooses to put these in more specific homes (e.g. `Data.Int`). Given that the "home" decision is driven by heuristics and in general these changes seem quite reasonable I am accepting them: * `Int` moved from `Prelude` to `Data.Int` * `(~)` moved from `Prelude` to `Data.Type.Equality` * `Type` moved from `GHC.Types` to `Data.Kind` * `Maybe` moved from `Prelude` to `Data.Maybe` * `Bool` moved from `Prelude` to `Data.Bool` * `Ordering` moved from `Prelude` to `Data.Ord` As well, more identifiers are now hyperlinked; it's not immediately clear *why*, but it is an improvement nevertheless. - - - - - ec33fec3 by Ben Gamari at 2024-02-22T20:36:24-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 30cfd251 by Torsten Schmits at 2024-02-24T13:00:42-05:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 732db81d by Ben Gamari at 2024-02-24T19:12:18-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 86bf7010 by Ben Gamari at 2024-02-27T19:28:10-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 4b6e76b5 by Patrick at 2024-03-07T22:09:30+08:00 fix haskell/haddock#24493, with module name introduced in hieAst The accompanies haddoc PR with GHC PR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12153 Two things have been done: 1. Link is introduced to every `X` in `module X where`, since we introduce the module name to HieAst, 2. `{-# LINE 4 "hypsrc-test/src/PositionPragmas.hs" #-}` is added before the `module PositionPragmas where` in ` hypsrc-test/ref/src/PositionPragmas.html `.It ensures only a single hieAst for file `hypsrc-test/src/PositionPragmas.hs` is generated. - - - - - 635abccc by Ben Gamari at 2024-03-08T17:09:06-05:00 Bump ghc version to 9.10 - - - - - 5b934048 by Ben Gamari at 2024-03-08T18:50:12-05:00 Bump base upper bound - - - - - b30d134e by Ben Gamari at 2024-03-08T18:50:44-05:00 Testsuite output update - - - - - 9bdf3586 by Ben Gamari at 2024-03-09T21:37:44-05:00 Merge branch 'ghc-9.10' into ghc-head - - - - - cec76981 by Ben Gamari at 2024-03-09T21:54:00-05:00 Bump GHC version to 9.11 - - - - - 4c59feb7 by Ben Gamari at 2024-03-09T22:15:01-05:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - bee54c24 by Krzysztof Gogolewski at 2024-04-19T11:13:00+02:00 Update quantification order following GHC haskell/haddock#23764 - - - - - 2814eb89 by Ben Gamari at 2024-04-19T18:57:05+02:00 hypsrc-test: Fix output of PositionPragmas.html - - - - - a27c6a49 by Fendor at 2024-04-22T10:13:03+02:00 Adapt to UserData split - - - - - 1efc5a7a by Fendor at 2024-04-22T10:13:03+02:00 Adapt to BinHandle split - - - - - c62239b7 by Sylvain Henry at 2024-04-29T10:35:00+02:00 Fix tests for T22229 - - - - - 7eab4e01 by Alan Zimmerman at 2024-05-04T16:14:55+01:00 EPA: Widen stmtslist to include last semicolon Closes #24754 - - - - - 06f7db40 by Teo Camarasu at 2024-05-05T00:19:38-04:00 doc: Fix type error in hs_try_putmvar example - - - - - af000532 by Moritz Schuler at 2024-05-05T06:30:58-04:00 Fix parsing of module names in CLI arguments closes issue #24732 - - - - - da74e9c9 by Ben Gamari at 2024-05-05T06:31:34-04:00 ghc-platform: Add Setup.hs The Hadrian bootstrapping script relies upon `Setup.hs` to drive its build. Addresses #24761. - - - - - 35d34fde by Alan Zimmerman at 2024-05-05T12:52:40-04:00 EPA: preserve comments in class and data decls Fix checkTyClHdr which was discarding comments. Closes #24755 - - - - - 03c5dfbf by Simon Peyton Jones at 2024-05-05T12:53:15-04:00 Fix a float-out error Ticket #24768 showed that the Simplifier was accidentally destroying a join point. It turned out to be that we were sending a bottoming join point to the top, accidentally abstracting over /other/ join points. Easily fixed. - - - - - adba68e7 by John Ericson at 2024-05-05T19:35:56-04:00 Substitute bindist files with Hadrian not configure The `ghc-toolchain` overhaul will eventually replace all this stuff with something much more cleaned up, but I think it is still worth making this sort of cleanup in the meantime so other untanglings and dead code cleaning can procede. I was able to delete a fair amount of dead code doing this too. `LLVMTarget_CPP` is renamed to / merged with `LLVMTarget` because it wasn't actually turned into a valid CPP identifier. (Original to 1345c7cc42c45e63ab1726a8fd24a7e4d4222467, actually.) Progress on #23966 Co-Authored-By: Sylvain Henry <hsyl20 at gmail.com> - - - - - 18f4ff84 by Alan Zimmerman at 2024-05-05T19:36:32-04:00 EPA: fix mkHsOpTyPV duplicating comments Closes #24753 - - - - - a19201d4 by Matthew Craven at 2024-05-06T19:54:29-04:00 Add test cases for #24664 ...since none are present in the original MR !12463 fixing this issue. - - - - - 46328a49 by Alan Zimmerman at 2024-05-06T19:55:05-04:00 EPA: preserve comments in data decls Closes #24771 - - - - - 3b51995c by Andrei Borzenkov at 2024-05-07T14:39:40-04:00 Rename Solo# data constructor to MkSolo# (#24673) - data Solo# a = (# a #) + data Solo# a = MkSolo# a And `(# foo #)` syntax now becomes just a syntactic sugar for `MkSolo# a`. - - - - - 4d59abf2 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Add the cmm_cpp_is_gcc predicate to the testsuite A future C-- test called T24474-cmm-override-g0 relies on the GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it emitting #defines past the preprocessing stage. Clang, at least, does not do this, so the test would fail if ran on Clang. As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of the workaround we apply as a fix for bug #24474, and the workaround was for GCC-specific behaviour, the test needs to be marked as fragile on other compilers. - - - - - 25b0b404 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Split out the C-- preprocessor, and make it pass -g0 Previously, C-- was processed with the C preprocessor program. This means that it inherited flags passed via -optc. A flag that is somewhat often passed through -optc is -g. At certain -g levels (>=2), GCC starts emitting defines *after* preprocessing, for the purposes of debug info generation. This is not useful for the C-- compiler, and, in fact, causes lexer errors. We can suppress this effect (safely, if supported) via -g0. As a workaround, in older versions of GCC (<=10), GCC only emitted defines if a certain set of -g*3 flags was passed. Newer versions check the debug level. For the former, we filter out those -g*3 flags and, for the latter, we specify -g0 on top of that. As a compatible and effective solution, this change adds a C-- preprocessor distinct from the C compiler and preprocessor, but that keeps its flags. The command line produced for C-- preprocessing now looks like: $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/24474 - - - - - 9b4129a5 by Andreas Klebinger at 2024-05-08T13:24:20-04:00 -fprof-late: Only insert cost centres on functions/non-workfree cafs. They are usually useless and doing so for data values comes with a large compile time/code size overhead. Fixes #24103 - - - - - 259b63d3 by Sebastian Graf at 2024-05-08T13:24:57-04:00 Simplifier: Preserve OccInfo on DataAlt fields when case binder is dead (#24770) See the adjusted `Note [DataAlt occ info]`. This change also has a positive repercussion on `Note [Combine case alts: awkward corner]`. Fixes #24770. We now try not to call `dataConRepStrictness` in `adjustFieldsIdInfo` when all fields are lazy anyway, leading to a 2% ghc/alloc decrease in T9675. Metric Decrease: T9675 - - - - - 31b28cdb by Sebastian Graf at 2024-05-08T13:24:57-04:00 Kill seqRule, discard dead seq# in Prep (#24334) Discarding seq#s in Core land via `seqRule` was problematic; see #24334. So instead we discard certain dead, discardable seq#s in Prep now. See the updated `Note [seq# magic]`. This fixes the symptoms of #24334. - - - - - b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00 Document NcgImpl methods Fixes #19914 - - - - - 4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00 Make renamer to be more flexible with parens in the LHS of the rules We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621 - - - - - ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00 IPE: Eliminate dependency on Read Instead of encoding the closure type as decimal string we now simply represent it as an integer, eliminating the need for `Read` in `GHC.Internal.InfoProv.Types.peekInfoProv`. Closes #24504. ------------------------- Metric Decrease: T24602_perf_size size_hello_artifact ------------------------- - - - - - a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00 testsuite: fix testwsdeque with recent clang This patch fixes compilation of testwsdeque.c with recent versions of clang, which will fail with the error below: ``` testwsdeque.c:95:33: error: warning: format specifies type 'long' but the argument has type 'void *' [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~~ ^ testwsdeque.c:95:39: error: warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~ ^~~ | %lu testwsdeque.c:133:42: error: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types] 133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); | ^~~~~ /workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error: note: passing argument to parameter 'startProc' here 193 | OSThreadProc *startProc, void *param); | ^ 2 warnings and 1 error generated. ``` - - - - - c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00 Rename pre-processor invocation args Small clean up. Uses proper names for the various groups of arguments that make up the pre-processor invocation. - - - - - 2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00 ghc-heap: fix typo in ghc-heap cbits - - - - - fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00 Improve performance of Data.List.sort(By) This patch improves the algorithm to sort lists in base. It does so using two strategies: 1) Use a four-way-merge instead of the 'default' two-way-merge. This is able to save comparisons and allocations. 2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization. This mainly benefits types with a fast (>). Note that this *may* break instances with a *malformed* Ord instance where `a > b` is *not* equal to `compare a b == GT`. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236 Fixes #24280 ------------------------- Metric Decrease: MultiLayerModulesTH_Make T10421 T13719 T15164 T18698a T18698b T1969 T9872a T9961 T18730 WWRec T12425 T15703 ------------------------- - - - - - 1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00 Revert "ghcup-metadata: Drop output_name field" This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f. This breaks the ghcup metadata generation on the nightly jobs. - - - - - daff1e30 by Jannis at 2024-05-12T13:38:35-04:00 Division by constants optimization - - - - - 413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00 Tidy: Add flag to expose unfoldings if they take dictionary arguments. Add the flag `-fexpose-overloaded-unfoldings` to be able to control this behaviour. For ghc's boot libraries file size grew by less than 1% when it was enabled. However I refrained from enabling it by default for now. I've also added a section on specialization more broadly to the users guide. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: T12425 T13386 hard_hole_fits ------------------------- - - - - - c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00 Don't store a GlobalRdrEnv in `mi_globals` for GHCi. GHCi only needs the `mi_globals` field for modules imported with :module +*SomeModule. It uses this field to make the top level environment in `SomeModule` available to the repl. By default, only the first target in the command line parameters is "star" loaded into GHCi. Other modules have to be manually "star" loaded into the repl. Storing the top level GlobalRdrEnv for each module is very wasteful, especially given that we will most likely never need most of these environments. Instead we store only the information needed to reconstruct the top level environment in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements as well as all top level symbols defined in the module (not taking export lists into account) When a particular module is "star-loaded" into GHCi (as the first commandline target, or via an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using the `IfaceTopEnv`. - - - - - d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00 Add perf regression test for `-fwrite-if-simplified-core` - - - - - 2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00 Improve pattern to type pattern transformation (23739) `pat_to_type_pat` function now can handle more patterns: - TuplePat - ListPat - LitPat - NPat - ConPat Allowing these new constructors in type patterns significantly increases possible shapes of type patterns without `type` keyword. This patch also changes how lookups in `lookupOccRnConstr` are performed, because we need to fall back into types when we didn't find a constructor on data level to perform `ConPat` to type transformation properly. - - - - - be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00 hadrian: fix hadrian building with ghc-9.10.1 - - - - - ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00 linters: fix lint-whitespace compilation with ghc-9.10.1 - - - - - a593f284 by Andreas Klebinger at 2024-05-15T07:32:10-04:00 Expand the `inline` rule to look through casts/ticks. Fixes #24808 - - - - - b1e0c313 by Cheng Shao at 2024-05-15T07:32:46-04:00 testsuite: bump PartialDownSweep timeout to 5x on wasm32 - - - - - b2227487 by Fendor at 2024-05-15T17:14:06-04:00 Add Eq and Ord instance to `IfaceType` We add an `Ord` instance so that we can store `IfaceType` in a `Data.Map` container. This is required to deduplicate `IfaceType` while writing `.hi` files to disk. Deduplication has many beneficial consequences to both file size and memory usage, as the deduplication enables implicit sharing of values. See issue #24540 for more motivation. The `Ord` instance would be unnecessary if we used a `TrieMap` instead of `Data.Map` for the deduplication process. While in theory this is clerarly the better option, experiments on the agda code base showed that a `TrieMap` implementation has worse run-time performance characteristics. To the change itself, we mostly derive `Eq` and `Ord`. This requires us to change occurrences of `FastString` with `LexicalFastString`, since `FastString` has no `Ord` instance. We change the definition of `IfLclName` to a newtype of `LexicalFastString`, to make such changes in the future easier. Bump haddock submodule for IfLclName changes - - - - - d368f9a6 by Fendor at 2024-05-15T17:14:06-04:00 Move out LiteralMap to avoid cyclic module dependencies - - - - - 2fcc09fd by Fendor at 2024-05-15T17:14:06-04:00 Add deduplication table for `IfaceType` The type `IfaceType` is a highly redundant, tree-like data structure. While benchmarking, we realised that the high redundancy of `IfaceType` causes high memory consumption in GHCi sessions when byte code is embedded into the `.hi` file via `-fwrite-if-simplified-core` or `-fbyte-code-and-object-code`. Loading such `.hi` files from disk introduces many duplicates of memory expensive values in `IfaceType`, such as `IfaceTyCon`, `IfaceTyConApp`, `IA_Arg` and many more. We improve the memory behaviour of GHCi by adding an additional deduplication table for `IfaceType` to the serialisation of `ModIface`, similar to how we deduplicate `Name`s and `FastString`s. When reading the interface file back, the table allows us to automatically share identical values of `IfaceType`. To provide some numbers, we evaluated this patch on the agda code base. We loaded the full library from the `.hi` files, which contained the embedded core expressions (`-fwrite-if-simplified-core`). Before this patch: * Load time: 11.7 s, 2.5 GB maximum residency. After this patch: * Load time: 7.3 s, 1.7 GB maximum residency. This deduplication has the beneficial side effect to additionally reduce the size of the on-disk interface files tremendously. For example, on agda, we reduce the size of `.hi` files (with `-fwrite-if-simplified-core`): * Before: 101 MB on disk * Now: 24 MB on disk This has even a beneficial side effect on the cabal store. We reduce the size of the store on disk: * Before: 341 MB on disk * Now: 310 MB on disk Note, none of the dependencies have been compiled with `-fwrite-if-simplified-core`, but `IfaceType` occurs in multiple locations in a `ModIface`. We also add IfaceType deduplication table to .hie serialisation and refactor .hie file serialisation to use the same infrastrucutre as `putWithTables`. Bump haddock submodule to accomodate for changes to the deduplication table layout and binary interface. - - - - - 36aa7cf1 by Fendor at 2024-05-15T17:14:06-04:00 Add run-time configurability of `.hi` file compression Introduce the flag `-fwrite-if-compression=<n>` which allows to configure the compression level of writing .hi files. The motivation is that some deduplication operations are too expensive for the average use case. Hence, we introduce multiple compression levels with variable impact on performance, but still reduce the memory residency and `.hi` file size on disk considerably. We introduce three compression levels: * `1`: `Normal` mode. This is the least amount of compression. It deduplicates only `Name` and `FastString`s, and is naturally the fastest compression mode. * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is marginally slower than `Normal` mode. In general, it should be safe to always use `Safe` mode. * `3`: `Full` deduplication mode. Deduplicate as much as we can, resulting in minimal .hi files, but at the cost of additional compilation time. Reading .hi files doesn't need to know the initial compression level, and can always deserialise a `ModIface`, as we write out a byte that indicates the next value has been deduplicated. This allows users to experiment with different compression levels for packages, without recompilation of dependencies. Note, the deduplication also has an additional side effect of reduced memory consumption to implicit sharing of deduplicated elements. See https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for example where that matters. ------------------------- Metric Decrease: MultiLayerModulesDefsGhciWithCore T16875 T21839c T24471 hard_hole_fits libdir ------------------------- - - - - - 1e63a6fb by Matthew Pickering at 2024-05-15T17:14:07-04:00 Introduce regression tests for `.hi` file sizes Add regression tests to track how `-fwrite-if-compression` levels affect the size of `.hi` files. - - - - - 639d742b by M Farkas-Dyck at 2024-05-15T17:14:49-04:00 TTG: ApplicativeStatement exist only in Rn and Tc Co-Authored-By: romes <rodrigo.m.mesquita at gmail.com> - - - - - aa7b336b by Jade at 2024-05-15T23:06:17-04:00 Documentation: Improve documentation for symbols exported from System.IO - - - - - c561de8f by Jade at 2024-05-15T23:06:54-04:00 Improve suggestions for language extensions - When suggesting Language extensions, also suggest Extensions which imply them - Suggest ExplicitForAll and GADTSyntax instead of more specific extensions - Rephrase suggestion to include the term 'Extension' - Also moves some flag specific definitions out of Session.hs into Flags.hs (#24478) Fixes: #24477 Fixes: #24448 Fixes: #10893 - - - - - 4c7ae2a1 by Andreas Klebinger at 2024-05-15T23:07:30-04:00 Testsuite: Check if llvm assembler is available for have_llvm - - - - - bc672166 by Torsten Schmits at 2024-05-15T23:08:06-04:00 refactor quadratic search in warnMissingHomeModules - - - - - 7875e8cb by Torsten Schmits at 2024-05-15T23:08:06-04:00 add test that runs MakeDepend on thousands of modules - - - - - b84b91f5 by Adam Gundry at 2024-05-16T15:32:06-04:00 Representation-polymorphic HasField (fixes #22156) This generalises the HasField class to support representation polymorphism, so that instead of type HasField :: forall {k} . k -> Type -> Type -> Constraint we have type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint - - - - - 05285090 by Matthew Pickering at 2024-05-16T15:32:43-04:00 Bump os-string submodule to 2.0.2.2 Closes #24786 - - - - - 886ab43a by Cheng Shao at 2024-05-17T01:34:50-04:00 rts: do not prefetch mark_closure bdescr in non-moving gc when ASSERTS_ENABLED This commit fixes a small an oversight in !12148: the prefetch logic in non-moving GC may trap in debug RTS because it calls Bdescr() for mark_closure which may be a static one. It's fine in non-debug RTS because even invalid bdescr addresses are prefetched, they will not cause segfaults, so this commit implements the most straightforward fix: don't prefetch mark_closure bdescr when assertions are enabled. - - - - - b38dcf39 by Teo Camarasu at 2024-05-17T01:34:50-04:00 rts: Allocate non-moving segments with megablocks Non-moving segments are 8 blocks long and need to be aligned. Previously we serviced allocations by grabbing 15 blocks, finding an aligned 8 block group in it and returning the rest. This proved to lead to high levels of fragmentation as a de-allocating a segment caused an 8 block gap to form, and this could not be reused for allocation. This patch introduces a segment allocator based around using entire megablocks to service segment allocations in bulk. When there are no free segments, we grab an entire megablock and fill it with aligned segments. As the megablock is free, we can easily guarantee alignment. Any unused segments are placed on a free list. It only makes sense to free segments in bulk when all of the segments in a megablock are freeable. After sweeping, we grab the free list, sort it, and find all groups of segments where they cover the megablock and free them. This introduces a period of time when free segments are not available to the mutator, but the risk that this would lead to excessive allocation is low. Right after sweep, we should have an abundance of partially full segments, and this pruning step is relatively quick. In implementing this we drop the logic that kept NONMOVING_MAX_FREE segments on the free list. We also introduce an eventlog event to log the amount of pruned/retained free segments. See Note [Segment allocation strategy] Resolves #24150 ------------------------- Metric Decrease: T13253 T19695 ------------------------- - - - - - 710665bd by Cheng Shao at 2024-05-17T01:35:30-04:00 rts: fix I/O manager compilation errors for win32 target This patch fixes I/O manager compilation errors for win32 target discovered when cross-compiling to win32 using recent clang: ``` rts/win32/ThrIOManager.c:117:7: error: error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | if (is_io_mng_native_p ()) { | ^ | 117 | if (is_io_mng_native_p ()) { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/fs.c:143:28: error: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 143 | int setErrNoFromWin32Error () { | ^ | void | 143 | int setErrNoFromWin32Error () { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:227:9: error: error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 227 | interruptIOManagerEvent (); | ^ | 227 | interruptIOManagerEvent (); | ^ rts/win32/ConsoleHandler.c:227:9: error: note: did you mean 'getIOManagerEvent'? | 227 | interruptIOManagerEvent (); | ^ rts/include/rts/IOInterface.h:27:10: error: note: 'getIOManagerEvent' declared here 27 | void * getIOManagerEvent (void); | ^ | 27 | void * getIOManagerEvent (void); | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:196:9: error: error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/win32/ConsoleHandler.c:196:9: error: note: did you mean 'postThreadLabel'? | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/eventlog/EventLog.h:118:6: error: note: 'postThreadLabel' declared here 118 | void postThreadLabel(Capability *cap, | ^ | 118 | void postThreadLabel(Capability *cap, | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) ``` - - - - - 28b9cee0 by Rodrigo Mesquita at 2024-05-17T01:36:05-04:00 configure: Check C99-compat for Cmm preprocessor Fixes #24815 - - - - - 8927e0c3 by Andreas Klebinger at 2024-05-17T01:36:41-04:00 Ensure `tcHasFixedRuntimeRep (# #)` returns True. - - - - - 04179044 by doyougnu at 2024-05-17T09:00:32-04:00 testsuite: make find_so regex less general Closes #24759 Background. In MR !12372 we began tracking shared object files and directories sizes for dependencies. However, this broke release builds because release builds alter the filenames swapping "in-place" for a hash. This was not considered in the MR and thus broke release pipelines. Furthermore, the rts_so test was found to be wildly varying and was therefore disabled in !12561. This commit fixes both of these issues: - fix the rts_so test by making the regex less general, now the rts_so test and all other foo.so tests must match "libHS<some-lib>-<version>-<hash|'in-place>-<ghc>". This prevents the rts_so test from accidentally matching different rts variants such as rts_threaded, which was the cause of the wild swings after !12372. - add logic to match either a hash or the string in-place. This should make the find_so function build agnostic. - - - - - 0962b50d by Andreas Klebinger at 2024-05-17T09:01:08-04:00 TagAnalysis: Treat all bottom ids as tagged during analysis. Ticket #24806 showed that we also need to treat dead end thunks as tagged during the analysis. - - - - - 7eb9f184 by Ben Gamari at 2024-05-17T11:23:37-04:00 Remove haddock submodule In preparation for merge into the GHC, as proposed in #23178. - - - - - 47b14dcc by Fendor at 2024-05-17T11:28:17-04:00 Adapt to `IfLclName` newtype changes (cherry picked from commit a711607e29b925f3d69e27c5fde4ba655c711ff1) - - - - - 6cc6681d by Fendor at 2024-05-17T11:28:17-04:00 Add IfaceType deduplication table to interface file serialisation Although we do not really need it in the interface file serialisation, as the deserialisation uses `getWithUserData`, we need to mirror the structure `getWithUserData` expects. Thus, we write essentially an empty `IfaceType` table at the end of the file, as the interface file doesn't reference `IfaceType`. (cherry picked from commit c9bc29c6a708483d2abc3d8ec9262510ce87ca61) - - - - - b9721206 by Ben Gamari at 2024-05-17T11:30:22-04:00 ghc-tags.yaml: Initial commit - - - - - 074e7d8f by Ben Gamari at 2024-05-17T11:31:29-04:00 fourmolu: Add configuration - - - - - 151b1736 by Ben Gamari at 2024-05-17T11:32:52-04:00 Makefile: Rework for use by haddock developers Previously the Makefile was present only for GHC's old make-based build system. Now since the make-based build system is gone we can use it for more useful ends. - - - - - a7dcf13b by Ben Gamari at 2024-05-17T11:36:14-04:00 Reformat with fourmolu Using previously-added configuration and `fourmolu -i .` Note that we exclude the test-cases (`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to formatting. - - - - - 0ea6017b by Ben Gamari at 2024-05-17T11:40:04-04:00 Add 'utils/haddock/' from commit 'a7dcf13bfbb97b20e75cc8ce650e2bb628db4660' git-subtree-dir: utils/haddock git-subtree-mainline: 7eb9f1849b1c72a1c61dee88462b4244550406f3 git-subtree-split: a7dcf13bfbb97b20e75cc8ce650e2bb628db4660 - - - - - aba1d304 by Hécate Moonlight at 2024-05-17T11:40:48-04:00 Add exceptions to the dangling notes list - - - - - 527bfbfb by Hécate Moonlight at 2024-05-17T11:40:52-04:00 Add haddock to the whitespace lint ignore list - - - - - 43274677 by Ben Gamari at 2024-05-17T11:41:20-04:00 git-blame-ignore-revs: Ignore haddock reformatting - - - - - 0e679e37 by Fendor at 2024-05-18T00:27:24-04:00 Pass cpp options to the CC builder in hadrian - - - - - bb40244e by Sylvain Henry at 2024-05-18T00:28:06-04:00 JS: fix allocation constant (fix #24746) - - - - - 646d30ab by Jade at 2024-05-18T19:23:31+02:00 Add highlighting for inline-code snippets in haddock - - - - - 64459a3e by Hécate Moonlight at 2024-05-19T08:42:27-04:00 haddock: Add a .readthedocs.yml file for online documentation - - - - - 7d3d9bbf by Serge S. Gulin at 2024-05-19T18:47:05+00:00 Unicode: General Category size test (related #24789) Added trivial size performance test which involves unicode general category usage via `read`. The `read` itself uses general category to detect spaces. The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789. - - - - - 8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00 EPA: Remove redundant code Remove unused epAnnAnns function various cases for showAstData that no longer exist - - - - - 071d7a1e by Rodrigo Mesquita at 2024-05-20T10:55:16-04:00 Improve docs on closed type families in hs-boots Fixes #24776 - - - - - d9e2c119 by Torsten Schmits at 2024-05-20T10:55:52-04:00 Use default deviation for large-project test This new performance test has the purpose of detecting regressions in complexity in relation to the number of modules in a project, so 1% deviation is way too small to avoid false positives. - - - - - 20b0136a by Ben Gamari at 2024-05-22T00:31:39-04:00 ghcup-metadata: Various fixes from 9.10.1 Use Debian 12/x86-64, Debian 10/aarch64, and Debian 11/aarch64 bindists where possible. - - - - - 6838a7c3 by Sylvain Henry at 2024-05-22T00:32:23-04:00 Reverse arguments to stgCallocBytes (fix #24828) - - - - - f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00 Add log messages for Iface serialisation compression level Fix the label of the number of 'IfaceType' entries in the log message. Add log message for the compression level that is used to serialise a an interface file. Adds `Outputable` instance for 'CompressionIFace'. - - - - - 3bad5d55 by Hécate Moonlight at 2024-05-22T00:33:40-04:00 base: Update doctests outputs ghc-internal: Update doctests outputs - - - - - 9317c6fb by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix the testsuites of the haddock-library - Apply all the metadata revisions from Hackage to the cabal file. - Fix the `ParserSpec.hs` file in the `spec` testsuite of haddock-library. - Make `CHANGES.md` an extra-doc-file instead of an extra-source-file. - - - - - 54073b02 by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix parser of @since pragma The testsuite contained tests for annotations of the form `@since foo-bar-0.5.0`, but the parser was written incorrectly. - - - - - ede6ede3 by Matthew Pickering at 2024-05-22T00:34:57-04:00 Fix nightly pages job It seems likely broken by 9f99126a which moved `index.html` from the root folder into `docs/` folder. Fixes #24840 - - - - - b7bcf729 by Cheng Shao at 2024-05-22T00:35:32-04:00 autoconf: remove unused context diff check This patch removes redundant autoconf check for the context diff program given it isn't actually been used anywhere, especially since make removal. - - - - - ea2fe66e by Hécate Moonlight at 2024-05-22T00:36:13-04:00 haddock: Rework the contributing guide - - - - - 0f302a94 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 haddock: Add module relationships diagrams of haddock-api and haddock-library - - - - - d1a9f34f by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add instructions - - - - - b880ee80 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add SVG outputs - - - - - 6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00 rts: Fix size of StgOrigThunkInfo frames Previously the entry code of the `stg_orig_thunk` frame failed to account for the size of the profiling header as it hard-coded the frame size. Fix this. Fixes #24809. - - - - - c645fe40 by Fendor at 2024-05-22T13:40:05-04:00 Add regression test T24809 for stg_orig_thunk_info_frame size - - - - - 4181aa40 by Andreas Klebinger at 2024-05-22T13:40:42-04:00 bindists: Check for existence of share folder before trying to copy it. This folder isn't distributed in windows bindists A lack of doing so resulted us copying loads of files twice. - - - - - d216510e by Matthew Pickering at 2024-05-22T13:40:42-04:00 Remove ad-hoc installation of mingw toolchain in relocatable bindists This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951 The choice about whether to install mingw is taken in the installation makefile. This is also broken on non-windows systems. The actual issue was the EnableDistroToolchain variable wasn't declared in mk/config.mk and therefore the check to install mingw was failing. - - - - - 7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04:00 testsuite: fix T17920 for wasm backend T17920 was marked as fragile on wasm before; it can be trivially fixed by avoiding calling variadic printf() in cmm. - - - - - c739383b by Cheng Shao at 2024-05-22T21:53:29-04:00 testsuite: bump T22744 timeout to 5x - - - - - c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00 testsuite: don't attempt to detect host cpu features when testing cross ghc The testsuite driver CPU feature detection logic only detects host CPU and only makes sense when we are not testing a cross GHC. - - - - - 3d9e4ce6 by Simon Peyton Jones at 2024-05-22T21:54:43-04:00 Better skolemisation As #24810 showed, it is (a little) better to skolemise en-bloc, so that Note [Let-bound skolems] fires more often. See Note [Skolemisation en bloc] in GHC.Tc.Utils.Instantiate. - - - - - a3cd3a1d by Ryan Scott at 2024-05-22T21:55:19-04:00 Add missing parenthesizePat in cvtp We need to ensure that the output of `cvtp` is parenthesized (at precedence `sigPrec`) so that any pattern signatures with a surrounding pattern signature can parse correctly. Fixes #24837. - - - - - 4bb2a7cc by Hécate Moonlight at 2024-05-22T21:55:59-04:00 [base] Document the memory overhead of ByteArray Add a diagram that shows the constituent parts of a ByteArray and their memory overhead. - - - - - 8b2a016a by Hécate Moonlight at 2024-05-22T21:56:38-04:00 Haddock: Add MR template for Haddock - - - - - ead75532 by Peter Trommler at 2024-05-23T02:28:05-04:00 PPC: Support ELF v2 on powerpc64 big-endian Detect ELF v2 on PowerPC 64-bit systems. Check for `_CALL_ELF` preprocessor macro. Fixes #21191 - - - - - 9d4c10f2 by Hécate Kleidukos at 2024-05-23T02:28:44-04:00 gitlab: Add @Kleidukos to CODEOWNERS for utils/haddock - - - - - 28e64170 by Preetham Gujjula at 2024-05-23T07:20:48-04:00 haddock: Add cabal-fmt to tools for `make style` - - - - - 00126a89 by Andrei Borzenkov at 2024-05-23T07:21:24-04:00 haddock: fix verbosity option parsing - - - - - a3e0b68b by Ryan Hendrickson at 2024-05-23T15:52:03-04:00 base: specify tie-breaking behavior of min, max, and related list/Foldable functions - - - - - bdcc0f37 by doyougnu at 2024-05-24T07:51:18-04:00 cmm: add word <-> double/float bitcast - closes: #25331 This is the last step in the project plan described in #25331. This commit: - adds bitcast operands for x86_64, LLVM, aarch64 - For PPC and i386 we resort to using the cmm implementations - renames conversion MachOps from Conv to Round|Truncate - - - - - f0d257f7 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor Some functions in StgToByteCode were filtering out void arguments. However, StgToByteCode is called after unarisation: the void arguments should have been removed earlier. Instead of filtering out, we assert that the args are non-void. - - - - - 03137fd2 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor `layoutNativeCall` was always called with a `primRepCmmType platform` callback. Hence we can put it inside of `layoutNativeCall` rather than repeat it. - - - - - 27c430f3 by David Binder at 2024-05-24T07:52:38-04:00 haddock: Remove compatibility shims for GHC < 8.4 from haddock-library - - - - - 8dd8a076 by Cheng Shao at 2024-05-24T07:53:14-04:00 compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs This patch makes the STG->Cmm backend avoid saving foreign call target to local when there are no caller-save GlobalRegs. Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a foreign call, we unconditionally save the foreign call target to a temporary local first, then rely on cmmSink to clean it up later, which only happens with -fcmm-sink (implied by -O) and not in unoptimized code. And this is troublesome for the wasm backend NCG, which needs to infer a foreign call target symbol's type signature from the Cmm call site. Previously, the NCG has been emitting incorrect type signatures for unoptimized code, which happens to work with `wasm-ld` most of the time, but this is never future-proof against upstream toolchain updates, and it causes horrible breakages when LTO objects are included in linker input. Hence this patch. - - - - - 986df1ab by Cheng Shao at 2024-05-24T07:53:14-04:00 testsuite: add callee-no-local regression test - - - - - 52d62e2a by Sylvain Henry at 2024-05-24T07:53:57-04:00 Fix HasCallStack leftovers from !12514 / #24726 - - - - - c5e00c35 by crumbtoo at 2024-05-24T07:54:38-04:00 user_guide: Fix typo in MultiWayIf chapter Close #24829 - - - - - bd323b0e by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Ensure that CHANGELOG is included in extra-source-files This was missed in the `ghc-internal` split. Closes #24831. - - - - - 1bfd32e8 by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Fix changelog reference to setBacktraceMechanismState (cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d) - - - - - 43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00 Float/double unboxed literal support for HexFloatLiterals (fix #22155) - - - - - 4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00 Improve test labels for binary interface file size tests Test labels for binary interface file sizes are hard to read and overly verbose at the same time. Extend the name for the metric title, but shorten it in the actual comparison table. - - - - - 14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00 Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present" This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa. - - - - - f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00 Fix default hyperlinked sources pattern Previously this didn't include the `%M` token which manifested as broken links to the hyperlinked sources of reexports of declarations defined in other packages. Fixes haddock#1628. (cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36) - - - - - 42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00 Make DocPaths a proper data type (cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c) - - - - - 53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00 haddock: Bump version to 2.30 (cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602) - - - - - e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00 haddock-api: allow base 4.20 and ghc 9.11 - - - - - e294f7a2 by PHO at 2024-05-24T12:17:55-04:00 Add a flag "threaded" for building haddock with the threaded RTS GHC isn't guaranteed to have a threaded RTS. There should be a way to build it with the vanilla one. (cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d) - - - - - 51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00 Update ticky counter event docs. Add the info about the info table address and json fields. Fixes #23200 - - - - - 98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00 Export extractPromotedList (#24866) This can be useful in plugins. - - - - - 228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00 template-haskell: Move wired-ins to ghc-internal Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so ------------------------- - - - - - 62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00 testsuite: mark tests broken by #24886 Now that `template-haskell` is no longer wired-in. These tests are triggering #24886, and so need to be marked broken. - - - - - 3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00 rts: fix missing function prototypes in ClosureMacros.h - - - - - e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00 UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful. - - - - - d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00 ci: Update ci-images commit for fedora38 image The fedora38 nightly job has been failing for quite a while because `diff` was no longer installed. The ci-images bump explicitly installs `diffutils` into these images so hopefully they now pass again. - - - - - 3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00 Update exactprint docs - - - - - 77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00 Incorporate review feedback - - - - - 87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00 Remove no longer relevant reference to comments - - - - - 05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00 Replace outdated code example - - - - - 45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00 Reword error resulting from missing -XBangPatterns. It can be the result of either a bang pattern or strict binding, so now we say so instead of claiming it must be a bang pattern. Fixes #21032 - - - - - e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00 testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x - - - - - 7a660042 by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: ensure gc_thread/gen_workspace is allocated with proper alignment gc_thread/gen_workspace are required to be aligned by 64 bytes. However, this property has not been properly enforced before, and numerous alignment violations at runtime has been caught by UndefinedBehaviorSanitizer that look like: ``` rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment 0x0000027a3390: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8 rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment 0x0000027a3450: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13 ``` This patch fixes the gc_thread/gen_workspace misalignment issue by explicitly allocating them with alignment constraint. - - - - - c77a48af by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: fix an unaligned load in nonmoving gc This patch fixes an unaligned load in nonmoving gc by ensuring the closure address is properly untagged first before attempting to prefetch its header. The unaligned load is reported by UndefinedBehaviorSanitizer: ``` rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment 0x0042005f3a71: note: pointer points here 00 00 00 98 43 13 8e 12 7f 00 00 50 3c 5f 00 42 00 00 00 58 17 b7 92 12 7f 00 00 89 cb 5e 00 42 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9 ``` This issue had previously gone unnoticed since it didn't really harm runtime correctness, the invalid header address directly loaded from a tagged pointer is only used as prefetch address and will not cause segfaults. However, it still should be corrected because the prefetch would be rendered useless by this issue, and untagging only involves a single bitwise operation without memory access so it's cheap enough to add. - - - - - 05c4fafb by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: use __builtin_offsetof to implement STG_FIELD_OFFSET This patch fixes the STG_FIELD_OFFSET macro definition by using __builtin_offsetof, which is what gcc/clang uses to implement offsetof in standard C. The previous definition that uses NULL pointer involves subtle undefined behavior in C and thus reported by UndefinedBehaviorSanitizer as well: ``` rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58 ``` - - - - - 5ff83bfc by Sylvain Henry at 2024-05-30T14:43:10-04:00 JS: remove useless h$CLOCK_REALTIME (#23202) - - - - - 95ef2d58 by Matthew Pickering at 2024-05-30T14:43:47-04:00 ghcup-metadata: Fix metadata generation There were some syntax errors in the generation script which were preventing it from running. I have tested this with: ``` nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525 ``` which completed successfully. - - - - - 1bc66ee4 by Jakob Bruenker at 2024-05-30T14:44:22-04:00 Add diagrams to Arrows documentation This adds diagrams to the documentation of Arrows, similar to the ones found on https://www.haskell.org/arrows/. It does not add diagrams for ArrowChoice for the time being, mainly because it's not clear to me how to visually distinguish them from the ones for Arrow. Ideally, you might want to do something like highlight the arrows belonging to the same tuple or same Either in common colors, but that's not really possible with unicode. - - - - - d10a1c65 by Matthew Craven at 2024-05-30T23:35:48-04:00 Make UnsafeSNat et al. into pattern synonyms ...so that they do not cause coerce to bypass the nominal role on the corresponding singleton types when they are imported. See Note [Preventing unsafe coercions for singleton types] and the discussion at #23478. This also introduces unsafeWithSNatCo (and analogues for Char and Symbol) so that users can still access the dangerous coercions that importing the real constructors would allow, but only in a very localized way. - - - - - 0958937e by Cheng Shao at 2024-05-30T23:36:25-04:00 hadrian: build C/C++ with split sections when enabled When split sections is enabled, ensure -fsplit-sections is passed to GHC as well when invoking GHC to compile C/C++; and pass -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++ with the hadrian Cc builder. Fixes #23381. - - - - - 02b1f91e by Cheng Shao at 2024-05-30T23:36:25-04:00 driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled When -fsplit-sections is passed to GHC, pass -ffunction-sections -fdata-sections to gcc/clang when building C/C++. Previously, -fsplit-sections was only respected by the NCG/LLVM backends, but not the unregisterised backend; the GHC driver did not pass -fdata-sections and -ffunction-sections to the C compiler, which resulted in excessive executable sizes. Fixes #23381. ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - fd47e2e3 by Cheng Shao at 2024-05-30T23:37:00-04:00 testsuite: mark process005 as fragile on JS - - - - - 34a04ea1 by Matthew Pickering at 2024-05-31T06:08:36-04:00 Add -Wderiving-typeable to -Wall Deriving `Typeable` does nothing, and it hasn't done for a long while. There has also been a warning for a long while which warns you about uselessly deriving it but it wasn't enabled in -Wall. Fixes #24784 - - - - - 75fa7b0b by Matthew Pickering at 2024-05-31T06:08:36-04:00 docs: Fix formatting of changelog entries - - - - - 303c4b33 by Preetham Gujjula at 2024-05-31T06:09:21-04:00 docs: Fix link to injective type families paper Closes #24863 - - - - - df97e9a6 by Ben Gamari at 2024-05-31T06:09:57-04:00 ghc-internal: Fix package description The previous description was inherited from `base` and was inappropriate for `ghc-internal`. Also fix the maintainer and bug reporting fields. Closes #24906. - - - - - bf0737c0 by Cheng Shao at 2024-05-31T06:10:33-04:00 compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans This patch removes special consideration for ArchWasm32 in cmmDoCmmSwitchPlans, which means the compiler will now disable cmmImplementSwitchPlans for wasm unreg backend, just like unreg backend of other targets. We enabled it in the past to workaround some compile-time panic in older versions of LLVM, but those panics are no longer present, hence no need to keep this workaround. - - - - - 7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00 utils: add hie.yaml config file for ghc-config Add hie.yaml to ghc-config project directory so it can be edited using HLS. - - - - - 1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00 hadrian: handle findExecutable "" gracefully hadrian may invoke findExecutable "" at run-time due to a certain program is not found by configure script. Which is fine and findExecutable is supposed to return Nothing in this case. However, on Windows there's a directory bug that throws an exception (see https://github.com/haskell/directory/issues/180), so we might as well use a wrapper for findExecutable and handle exceptions gracefully. - - - - - 4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00 configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails When configure fails to find LLC/OPT/LLVMAS within supported version range, it used to set "llc"/"opt"/"clang" as fallback values. This behavior is particularly troublesome when the user has llc/opt/clang with other versions in their PATH and run the testsuite, since hadrian will incorrectly assume have_llvm=True and pass that to the testsuite driver, resulting in annoying optllvm test failures (#23186). If configure determines llc/opt/clang wouldn't work, then we shouldn't pretend it'll work at all, and the bindist configure will invoke FIND_LLVM_PROG check again at install time anyway. - - - - - 5f1afdf7 by Sylvain Henry at 2024-05-31T15:52:52-04:00 Introduce UniqueSet and use it to replace 'UniqSet Unique' 'UniqSet Unique' represents a set of uniques as a 'Map Unique Unique', which is wasting space (associated key/value are always the same). Fix #23572 and #23605 - - - - - e0aa42b9 by crumbtoo at 2024-05-31T15:53:33-04:00 Improve template-haskell haddocks Closes #15822 - - - - - ae170155 by Olivier Benz at 2024-06-01T09:35:17-04:00 Bump max LLVM version to 19 (not inclusive) - - - - - 92aa65ea by Matthew Pickering at 2024-06-01T09:35:17-04:00 ci: Update CI images to test LLVM 18 The debian12 image in this commit has llvm 18 installed. - - - - - adb1fe42 by Serge S. Gulin at 2024-06-01T09:35:53-04:00 Unicode: make ucd2haskell build-able again ucd2haskell tool used streamly library which version in cabal was out of date. It is updated to the latest version at hackage with deprecated parts rewritten. Also following fixes were applied to existing code in suppose that from its last run the code structure was changed and now it was required to be up to date with actual folder structures: 1. Ghc module path environment got a suffix with `src`. 2. Generated code got 2.1 `GHC.Internal` prefix for `Data.*`. 2.2 `GHC.Unicode.Internal` swapped on `GHC.Internal.Unicode` according to actual structure. - - - - - ad56fd84 by Jade at 2024-06-01T09:36:29-04:00 Replace 'NB' with 'Note' in error messages - - - - - 6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00 compiler: fix -ddump-cmm-raw when compiling .cmm This patch fixes missing -ddump-cmm-raw output when compiling .cmm, which is useful for debugging cmm related codegen issues. - - - - - 1c834ad4 by Ryan Scott at 2024-06-01T09:37:40-04:00 Print namespace specifiers in FixitySig's Outputable instance For whatever reason, the `Outputable` instance for `FixitySig` simply did not print out namespace specifiers, leading to the confusing `-ddump-splices` output seen in #24911. This patch corrects this oversight. Fixes #24911. - - - - - cf49fb5f by Sylvain Henry at 2024-06-01T09:38:19-04:00 Configure: display C++ compiler path - - - - - f9c1ae12 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable PIC for in-tree GMP on wasm32 This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. - - - - - 1a32f828 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable in-tree gmp fft code path for wasm32 This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. - - - - - 06277d56 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: build in-tree GMP with malloc-notreentrant on wasm32 This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. - - - - - 9f614270 by ARATA Mizuki at 2024-06-02T14:02:35-04:00 Set package include paths when assembling .S files Fixes #24839. Co-authored-by: Sylvain Henry <hsyl20 at gmail.com> - - - - - 4998a6ed by Alex Mason at 2024-06-03T02:09:29-04:00 Improve performance of genericWordQuotRem2Op (#22966) Implements the algorithm from compiler-rt's udiv128by64to64default. This rewrite results in a roughly 24x improvement in runtime on AArch64 (and likely any other arch that uses it). - - - - - ae50a8eb by Cheng Shao at 2024-06-03T02:10:05-04:00 testsuite: mark T7773 as fragile on wasm - - - - - c8ece0df by Fendor at 2024-06-03T19:43:22-04:00 Migrate `Finder` component to `OsPath`, fixed #24616 For each module in a GHCi session, we keep alive one `ModLocation`. A `ModLocation` is fairly inefficiently packed, as `String`s are expensive in memory usage. While benchmarking the agda codebase, we concluded that we keep alive around 11MB of `FilePath`'s, solely retained by `ModLocation`. We provide a more densely packed encoding of `ModLocation`, by moving from `FilePath` to `OsPath`. Further, we migrate the full `Finder` component to `OsPath` to avoid unnecessary transformations. As the `Finder` component is well-encapsulated, this requires only a minimal amount of changes in other modules. We introduce pattern synonym for 'ModLocation' which maintains backwards compatibility and avoids breaking consumers of 'ModLocation'. - - - - - 0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00 compiler: emit NaturallyAligned when element type & index type are the same width This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. - - - - - 18f63970 by Sebastian Graf at 2024-06-04T05:05:27-04:00 Parser: Remove unused `apats` rule - - - - - 38757c30 by David Knothe at 2024-06-04T05:05:27-04:00 Implement Or Patterns (#22596) This commit introduces a new language extension, `-XOrPatterns`, as described in GHC Proposal 522. An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ..., `patk` succeed, in this order. See also the summary `Note [Implmentation of OrPatterns]`. Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> - - - - - 395412e8 by Cheng Shao at 2024-06-04T05:06:04-04:00 compiler/ghci/rts: remove stdcall support completely We have formally dropped i386 windows support (#18487) a long time ago. The stdcall foreign call convention is only used by i386 windows, and the legacy logic around it is a significant maintenance burden for future work that adds arm64 windows support (#24603). Therefore, this patch removes stdcall support completely from the compiler as well as the RTS (#24883): - stdcall is still recognized as a FFI calling convention in Haskell syntax. GHC will now unconditionally emit a warning (-Wunsupported-calling-conventions) and treat it as ccall. - Apart from minimum logic to support the parsing and warning logic, all other code paths related to stdcall has been completely stripped from the compiler. - ghci only supports FFI_DEFAULT_ABI and ccall convention from now on. - FFI foreign export adjustor code on all platforms no longer handles the stdcall case and only handles ccall from now on. - The Win32 specific parts of RTS no longer has special code paths for stdcall. This commit is the final nail on the coffin for i386 windows support. Further commits will perform more housecleaning to strip the legacy code paths and pave way for future arm64 windows support. - - - - - d1fe9ab6 by Cheng Shao at 2024-06-04T05:06:04-04:00 rts: remove legacy i386 windows code paths This commit removes some legacy i386 windows related code paths in the RTS, given this target is no longer supported. - - - - - a605e4b2 by Cheng Shao at 2024-06-04T05:06:04-04:00 autoconf: remove i386 windows related logic This commit removes legacy i386 windows logic in autoconf scripts. - - - - - 91e5ac5e by Cheng Shao at 2024-06-04T05:06:04-04:00 llvm-targets: remove i386 windows support This commit removes i386 windows from llvm-targets and the script to generate it. - - - - - 65fe75a4 by Cheng Shao at 2024-06-04T05:06:04-04:00 libraries/utils: remove stdcall related legacy logic This commit removes stdcall related legacy logic in libraries and utils. ccall should be used uniformly for all supported windows hosts from now on. - - - - - d2a83302 by Cheng Shao at 2024-06-04T05:06:04-04:00 testsuite: adapt the testsuite for stdcall removal This patch adjusts test cases to handle the stdcall removal: - Some stdcall usages are replaced with ccall since stdcall doesn't make sense anymore. - We also preserve some stdcall usages, and check in the expected warning messages to ensure GHC always warn about stdcall usages (-Wunsupported-calling-conventions) as expected. - Error code testsuite coverage is slightly improved, -Wunsupported-calling-conventions is now tested. - Obsolete code paths related to i386 windows are also removed. - - - - - cef8f47a by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: minor adjustments for stdcall removal This commit include minor adjustments of documentation related to stdcall removal. - - - - - 54332437 by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: mention i386 Windows removal in 9.12 changelog This commit mentions removal of i386 Windows support and stdcall related change in the 9.12 changelog. - - - - - 2aaea8a1 by Cheng Shao at 2024-06-04T05:06:40-04:00 hadrian: improve user settings documentation This patch adds minor improvements to hadrian user settings documentation: - Add missing `ghc.cpp.opts` case - Remove non-existent `cxx` case - Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't - Add example of passing configure argument to autoconf packages - - - - - 71010381 by Alex Mason at 2024-06-04T12:09:07-04:00 Add AArch64 CLZ, CTZ, RBIT primop implementations. Adds support for emitting the clz and rbit instructions, which are used by GHC.Prim.clz*#, GHC.Prim.ctz*# and GHC.Prim.bitReverse*#. - - - - - 44e2abfb by Cheng Shao at 2024-06-04T12:09:43-04:00 hadrian: add +text_simdutf flavour transformer to allow building text with simdutf This patch adds a +text_simdutf flavour transformer to hadrian to allow downstream packagers and users that build from source to opt-in simdutf support for text, in order to benefit from SIMD speedup at run-time. It's still disabled by default for the time being. - - - - - 077cb2e1 by Cheng Shao at 2024-06-04T12:09:43-04:00 ci: enable +text_simdutf flavour transformer for wasm jobs This commit enables +text_simdutf flavour transformer for wasm jobs, so text is now built with simdutf support for wasm. - - - - - b23746ad by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Use TemplateHaskellQuotes in instance Lift ByteArray Resolves #24852 - - - - - 3fd25743 by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Mark addrToByteArray as NOINLINE This function should never be inlined in order to keep code size small. - - - - - 98ad1ea5 by Cheng Shao at 2024-06-04T22:51:26-04:00 compiler: remove unused CompilerInfo/LinkerInfo types This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. - - - - - 11795244 by Cheng Shao at 2024-06-05T06:33:17-04:00 rts: remove unused PowerPC/IA64 native adjustor code This commit removes unused PowerPC/IA64 native adjustor code which is never actually enabled by autoconf/hadrian. Fixes #24920. - - - - - 5132754b by Sylvain Henry at 2024-06-05T06:33:57-04:00 RTS: fix warnings with doing*Profiling (#24918) - - - - - accc8c33 by Cheng Shao at 2024-06-05T11:35:36-04:00 hadrian: don't depend on inplace/mingw when --enable-distro-toolchain on Windows - - - - - 6ffbd678 by Cheng Shao at 2024-06-05T11:35:37-04:00 autoconf: normalize paths of some build-time dependencies on Windows This commit applies path normalization via cygpath -m to some build-time dependencies on Windows. Without this logic, the /clang64/bin prefixed msys2-style paths cause the build to fail with --enable-distro-toolchain. - - - - - 075dc6d4 by Cheng Shao at 2024-06-05T11:36:12-04:00 hadrian: remove OSDarwin mention from speedHack This commit removes mentioning of OSDarwin from speedHack, since speedHack is purely for i386 and we no longer support i386 darwin (#24921). - - - - - 83235c4c by Cheng Shao at 2024-06-05T11:36:12-04:00 compiler: remove 32-bit darwin logic This commit removes all 32-bit darwin logic from the compiler, given we no longer support 32-bit apple systems (#24921). Also contains a bit more cleanup of obsolete i386 windows logic. - - - - - 1eb99bc3 by Cheng Shao at 2024-06-05T11:36:12-04:00 rts: remove 32-bit darwin/ios logic This commit removes 32-bit darwin/ios related logic from the rts, given we no longer support them (#24921). - - - - - 24f65892 by Cheng Shao at 2024-06-05T11:36:12-04:00 llvm-targets: remove 32-bit darwin/ios targets This commit removes 32-bit darwin/ios targets from llvm-targets given we no longer support them (#24921). - - - - - ccdbd689 by Cheng Shao at 2024-06-05T11:36:12-04:00 testsuite: remove 32-bit darwin logic This commit removes 32-bit darwin logic from the testsuite given it's no longer supported (#24921). Also contains more cleanup of obsolete i386 windows logic. - - - - - 11d661c4 by Cheng Shao at 2024-06-05T11:36:13-04:00 docs: mention 32-bit darwin/ios removal in 9.12 changelog This commit mentions removal of 32-bit darwin/ios support (#24921) in the 9.12 changelog. - - - - - 7c173310 by Georgi Lyubenov at 2024-06-05T15:17:22-04:00 Add firstA and secondA to Data.Bitraversable Please see https://github.com/haskell/core-libraries-committee/issues/172 for related discussion - - - - - 3b6f9fd1 by Ben Gamari at 2024-06-05T15:17:59-04:00 base: Fix name of changelog Fixes #24899. Also place it under `extra-doc-files` to better reflect its nature and avoid triggering unnecessary recompilation if it changes. - - - - - 1f4d2ef7 by Sebastian Graf at 2024-06-05T15:18:34-04:00 Announce Or-patterns in the release notes for GHC 9.12 (#22596) Leftover from !9229. - - - - - 8650338d by Jan Hrček at 2024-06-06T10:39:24-04:00 Improve haddocks of Language.Haskell.Syntax.Pat.Pat - - - - - 2eee65e1 by Cheng Shao at 2024-06-06T10:40:00-04:00 testsuite: bump T7653 timeout for wasm - - - - - 990fed60 by Sylvain Henry at 2024-06-07T14:45:23-04:00 StgToCmm: refactor opTranslate and friends - Change arguments order to avoid `\args -> ...` lambdas - Fix documentation - Rename StgToCmm options ("big" doesn't mean anything) - - - - - 1afad514 by Sylvain Henry at 2024-06-07T14:45:23-04:00 NCG x86: remove dead code (#5444) Since 6755d833af8c21bbad6585144b10e20ac4a0a1ab this code is dead. - - - - - 595c0894 by Cheng Shao at 2024-06-07T14:45:58-04:00 testsuite: skip objc-hi/objcxx-hi when cross compiling objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. - - - - - edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 9a04bf00 by Ben Gamari at 2024-11-15T11:45:38-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - 10 changed files: - .ghcid - + .git-blame-ignore-revs - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/928ad9d6ae6592d772579ae0e36b3b2a35c09025...9a04bf002f612725ab3d47708ba9f5e2da7b5786 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/928ad9d6ae6592d772579ae0e36b3b2a35c09025...9a04bf002f612725ab3d47708ba9f5e2da7b5786 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 18:37:49 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 13:37:49 -0500 Subject: [Git][ghc/ghc][wip/CLC208] 183 commits: Fix typo in the @since annotation of annotateIO Message-ID: <673794fd6303e_18c2122d3890841a6@gitlab.mail> Ben Gamari pushed to branch wip/CLC208 at Glasgow Haskell Compiler / GHC Commits: 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 7322c06e by Ben Gamari at 2024-11-15T13:36:55-05:00 ghc-internal: Drop GHC.Internal.Data.Enum This module consists only of reexports and consequently there is no reason for it to exist. - - - - - 88c38080 by Ben Gamari at 2024-11-15T13:37:09-05:00 base: Introduce Data.Bounded As proposed in [CLC#208] but unfortunately `Data.Enum` was already incorrectly introduced in the `ghc-internal` refactor. [CLC#208]: https://github.com/haskell/core-libraries-committee/issues/208 - - - - - c3458717 by Ben Gamari at 2024-11-15T13:37:38-05:00 base: Deprecate export of Bounded from Data.Enum This begins the process of bringing us into compliance with [CLC#208]. [CLC#208]: https://github.com/haskell/core-libraries-committee/issues/208 - - - - - ee3e89d2 by Ben Gamari at 2024-11-15T13:37:39-05:00 base: Mention incorrect Data.Enum addition in changelog - - - - - 30 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - CODEOWNERS - boot - cabal.project-reinstall - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/Dwarf/Types.hs - compiler/GHC/CmmToAsm/PIC.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs - compiler/GHC/CmmToAsm/Wasm.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/CodeGen.hs - compiler/GHC/CmmToLlvm/Data.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c198bdcfee3eec3341821108eccf44d001e7a33f...ee3e89d23478f43d74b0fc37e230ca849efd360d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c198bdcfee3eec3341821108eccf44d001e7a33f...ee3e89d23478f43d74b0fc37e230ca849efd360d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 18:41:03 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 13:41:03 -0500 Subject: [Git][ghc/ghc][wip/hadrian-haddock-opts] 5851 commits: [haddock @ 2002-04-04 16:23:43 by simonmar] Message-ID: <673795bf4d091_18c2124a880094132@gitlab.mail> Ben Gamari pushed to branch wip/hadrian-haddock-opts at Glasgow Haskell Compiler / GHC Commits: 2b39cd94 by Simon Marlow at 2002-04-04T16:23:43+00:00 [haddock @ 2002-04-04 16:23:43 by simonmar] This is Haddock, my stab at a Haskell documentation tool. It's not quite ready for release yet, but I'm putting it in the repository so others can take a look. It uses a locally modified version of the hssource parser, extended with support for GHC extensions and documentation annotations. - - - - - 99ede94f by Simon Marlow at 2002-04-04T16:24:10+00:00 [haddock @ 2002-04-04 16:24:10 by simonmar] forgot one file - - - - - 8363294c by Simon Marlow at 2002-04-05T13:58:15+00:00 [haddock @ 2002-04-05 13:58:15 by simonmar] Remap names in the exported declarations to be "closer" to the current module. eg. if an exported declaration mentions a type 'T' which is imported from module A then re-exported from the current module, then links from the type or indeed the documentation will point to the current module rather than module A. This is to support better hiding: module A won't be referred to in the generated output. - - - - - 1570cbc1 by Simon Marlow at 2002-04-05T13:58:23+00:00 [haddock @ 2002-04-05 13:58:23 by simonmar] update the TODO list - - - - - 3a62f96b by Simon Marlow at 2002-04-05T14:11:51+00:00 [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration - - - - - c5d9a471 by Simon Marlow at 2002-04-05T14:18:41+00:00 [haddock @ 2002-04-05 14:18:41 by simonmar] remove underlines on visited links - - - - - 97280525 by Simon Marlow at 2002-04-05T16:11:47+00:00 [haddock @ 2002-04-05 16:11:47 by simonmar] - Update to generate more correct HTML. - Use our own non-overloaded table combinators, as the overloaded versions were giving me a headache. The improved type safety caught several errors in the HTML generation. - - - - - 9acd3a4d by Simon Marlow at 2002-04-05T16:32:19+00:00 [haddock @ 2002-04-05 16:32:19 by simonmar] Add width property to the title, and add TD.children for the module contents page. - - - - - ec9a0847 by Simon Marlow at 2002-04-08T16:39:56+00:00 [haddock @ 2002-04-08 16:39:56 by simonmar] Fix a problem with exports of the form T(..). - - - - - e4627dc8 by Simon Marlow at 2002-04-08T16:41:38+00:00 [haddock @ 2002-04-08 16:41:37 by simonmar] - Add our own versions of Html & BlockTable for the time being. - Add support for generating an index to the HTML backend - - - - - 2d73fd75 by Simon Marlow at 2002-04-09T11:23:24+00:00 [haddock @ 2002-04-09 11:23:24 by simonmar] Add '-- /' as a synonym for '-- |', for compatibility with IDoc. - - - - - 3675464e by Simon Marlow at 2002-04-09T11:33:55+00:00 [haddock @ 2002-04-09 11:33:54 by simonmar] - add the <...> syntax for marking up URLs in documentation - Make the output for data & class declarations more compact when there aren't any documentation annotations on the individual methods or constructors respectively. - - - - - 5077f5b1 by Simon Marlow at 2002-04-09T11:36:04+00:00 [haddock @ 2002-04-09 11:36:04 by simonmar] Update the TODO list - - - - - 9e83c54d by Simon Marlow at 2002-04-10T10:50:06+00:00 [haddock @ 2002-04-10 10:50:06 by simonmar] Use explicit 'px' suffix on pixel sizes; IE seems to prefer them - - - - - 052de51c by Simon Marlow at 2002-04-10T13:23:13+00:00 [haddock @ 2002-04-10 13:23:13 by simonmar] Lex URLs as a single token to avoid having to escape special characters inside the URL string. - - - - - 47187edb by Simon Marlow at 2002-04-10T13:23:55+00:00 [haddock @ 2002-04-10 13:23:55 by simonmar] Not sure why I made the constructor name for a record declaration into a TyCls name, but change it back into a Var name anyhow. - - - - - 3dc6aa81 by Simon Marlow at 2002-04-10T13:26:10+00:00 [haddock @ 2002-04-10 13:26:09 by simonmar] Lots of changes, including: - add index support to the HTML backend - clean up the renamer, put it into a monad - propogate unresolved names to the top level and report them in a nicer way - various bugfixes - - - - - c2a70a72 by Simon Marlow at 2002-04-10T13:32:39+00:00 [haddock @ 2002-04-10 13:32:39 by simonmar] Skeleton documentation - - - - - 50c98d17 by Simon Marlow at 2002-04-10T13:37:23+00:00 [haddock @ 2002-04-10 13:37:23 by simonmar] Update the TODO list, separate into pre-1.0 and post-1.0 items - - - - - f3778be6 by Simon Marlow at 2002-04-10T14:30:58+00:00 [haddock @ 2002-04-10 14:30:58 by simonmar] Add an introduction - - - - - cfbaf9f7 by Simon Marlow at 2002-04-10T14:59:51+00:00 [haddock @ 2002-04-10 14:59:51 by simonmar] Sort the module tree - - - - - 76bd7b34 by Simon Marlow at 2002-04-10T15:50:11+00:00 [haddock @ 2002-04-10 15:50:10 by simonmar] Generate a little table of contents at the top of the module doc (only if the module actually contains some section headings, though). - - - - - bb8560a1 by Simon Marlow at 2002-04-10T16:10:26+00:00 [haddock @ 2002-04-10 16:10:26 by simonmar] Now we understand (or at least don't barf on) type signatures in patterns such as you might find when scoped type variables are in use. - - - - - 86c2a026 by Simon Marlow at 2002-04-10T16:10:49+00:00 [haddock @ 2002-04-10 16:10:49 by simonmar] more updates - - - - - 1c052b0e by Simon Marlow at 2002-04-10T16:28:05+00:00 [haddock @ 2002-04-10 16:28:05 by simonmar] Parse errors in doc strings are now reported as warnings rather that causing the whole thing to fall over. It still needs cleaning up (the warning is emitted with trace) but this will do for the time being. - - - - - ace03e8f by Simon Marlow at 2002-04-10T16:38:03+00:00 [haddock @ 2002-04-10 16:38:03 by simonmar] update again - - - - - 69006c3e by Simon Marlow at 2002-04-11T13:38:02+00:00 [haddock @ 2002-04-11 13:38:02 by simonmar] mention Opera - - - - - fe9b10f8 by Simon Marlow at 2002-04-11T13:40:31+00:00 [haddock @ 2002-04-11 13:40:30 by simonmar] - copy haddock.css into the same place as the generated HTML - new option: --css <file> specifies the style sheet to use - new option: -o <dir> specifies the directory in which to generate the output. - because Haddock now needs to know where to find its default stylesheet, we have to have a wrapper script and do the haddock-inplace thing (Makefile code copied largely from fptools/happy). - - - - - 106adbbe by Simon Marlow at 2002-04-24T15:12:41+00:00 [haddock @ 2002-04-24 15:12:41 by simonmar] Stop slurping comment lines when we see a row of dashes longer than length 2: these are useful as separators. - - - - - 995d3f9e by Simon Marlow at 2002-04-24T15:14:12+00:00 [haddock @ 2002-04-24 15:14:11 by simonmar] Grok the kind of module headers we use in fptools/libraries, and pass the "portability", "stability", and "maintainer" strings through into the generated HTML. If the module header doesn't match the pattern, then we don't include the info in the HTML. - - - - - e14da136 by Simon Marlow at 2002-04-24T15:16:57+00:00 [haddock @ 2002-04-24 15:16:57 by simonmar] Done module headers now. - - - - - 2ca8dfd4 by Simon Marlow at 2002-04-24T15:57:48+00:00 [haddock @ 2002-04-24 15:57:47 by simonmar] Handle gcons in export lists (a common extension). - - - - - 044cea81 by Simon Marlow at 2002-04-25T14:20:12+00:00 [haddock @ 2002-04-25 14:20:12 by simonmar] Add the little lambda icon - - - - - 63955027 by Simon Marlow at 2002-04-25T14:40:05+00:00 [haddock @ 2002-04-25 14:40:05 by simonmar] - Add support for named chunks of documentation which can be referenced from the export list. - Copy the icon from $libdir to the destination in HTML mode. - - - - - 36e3f913 by Simon Marlow at 2002-04-25T16:48:36+00:00 [haddock @ 2002-04-25 16:48:36 by simonmar] More keyboard bashing - - - - - 7ae18dd0 by Simon Marlow at 2002-04-26T08:43:33+00:00 [haddock @ 2002-04-26 08:43:33 by simonmar] Package util reqd. to compile with 4.08.2 - - - - - bbd5fbab by Simon Marlow at 2002-04-26T10:13:00+00:00 [haddock @ 2002-04-26 10:13:00 by simonmar] Include $(GHC_HAPPY_OPTS) when compiling HsParser - - - - - 31c53d79 by Simon Marlow at 2002-04-26T11:18:57+00:00 [haddock @ 2002-04-26 11:18:56 by simonmar] - support for fundeps (partially contributed by Brett Letner - thanks Brett). - make it build with GHC 4.08.2 - - - - - c415ce76 by Simon Marlow at 2002-04-26T13:15:02+00:00 [haddock @ 2002-04-26 13:15:02 by simonmar] Move the explicit formatting of the little table for the stability/portability/maintainer info from the HTML into the CSS, and remove the explicit table size (just right-align it). - - - - - 520ee21a by Simon Marlow at 2002-04-26T16:01:44+00:00 [haddock @ 2002-04-26 16:01:44 by simonmar] Yet more keyboard bashing - this is pretty much complete now. - - - - - 2ae37179 by Simon Marlow at 2002-04-26T16:02:14+00:00 [haddock @ 2002-04-26 16:02:14 by simonmar] Add a couple of things I forgot about - - - - - b7211e04 by Simon Marlow at 2002-04-29T15:28:12+00:00 [haddock @ 2002-04-29 15:28:12 by simonmar] bugfix for declBinders on a NewTypeDecl - - - - - 640c154a by Simon Marlow at 2002-04-29T15:28:54+00:00 [haddock @ 2002-04-29 15:28:54 by simonmar] Allow '-- |' style annotations on constructors and record fields. - - - - - 393f258a by Simon Marlow at 2002-04-29T15:37:32+00:00 [haddock @ 2002-04-29 15:37:32 by simonmar] syntax fix - - - - - 8a2c2549 by Simon Marlow at 2002-04-29T15:37:48+00:00 [haddock @ 2002-04-29 15:37:48 by simonmar] Add an example - - - - - db88f8a2 by Simon Marlow at 2002-04-29T15:55:46+00:00 [haddock @ 2002-04-29 15:55:46 by simonmar] remove a trace - - - - - 2b0248e0 by Simon Marlow at 2002-04-29T15:56:19+00:00 [haddock @ 2002-04-29 15:56:19 by simonmar] Fix for 'make install' - - - - - 120453a0 by Simon Marlow at 2002-04-29T15:56:39+00:00 [haddock @ 2002-04-29 15:56:39 by simonmar] Install the auxilliary bits - - - - - 950e6dbb by Simon Marlow at 2002-04-29T15:57:30+00:00 [haddock @ 2002-04-29 15:57:30 by simonmar] Add BinDist bits - - - - - 154b9d71 by Simon Marlow at 2002-05-01T11:02:52+00:00 [haddock @ 2002-05-01 11:02:52 by simonmar] update - - - - - ba6c39fa by Simon Marlow at 2002-05-01T11:03:26+00:00 [haddock @ 2002-05-01 11:03:26 by simonmar] Add another item - - - - - bacb5e33 by Simon Marlow at 2002-05-03T08:50:00+00:00 [haddock @ 2002-05-03 08:50:00 by simonmar] Fix some typos. - - - - - 54c87895 by Sven Panne at 2002-05-05T19:40:51+00:00 [haddock @ 2002-05-05 19:40:51 by panne] As a temporary hack/workaround for a bug in GHC's simplifier, don't pass Happy the -c option for generating the parsers in this subdir. Furthermore, disable -O for HaddocParse, too. - - - - - e6c08703 by Simon Marlow at 2002-05-06T09:51:10+00:00 [haddock @ 2002-05-06 09:51:10 by simonmar] Add RPM spec file (thanks to Tom Moertel <tom-rpms at moertel.com>) - - - - - 7b8fa8e7 by Simon Marlow at 2002-05-06T12:29:26+00:00 [haddock @ 2002-05-06 12:29:26 by simonmar] Add missing type signature (a different workaround for the bug in GHC's simplifier). - - - - - cd0e300d by Simon Marlow at 2002-05-06T12:30:09+00:00 [haddock @ 2002-05-06 12:30:09 by simonmar] Remove workaround for simplifier bug in previous revision. - - - - - 687e68fa by Simon Marlow at 2002-05-06T12:32:32+00:00 [haddock @ 2002-05-06 12:32:32 by simonmar] Allow empty data declarations (another GHC extension). - - - - - 8f29f696 by Simon Marlow at 2002-05-06T12:49:21+00:00 [haddock @ 2002-05-06 12:49:21 by simonmar] Fix silly bug in named documentation block lookup. - - - - - 8e0059af by Simon Marlow at 2002-05-06T13:02:42+00:00 [haddock @ 2002-05-06 13:02:42 by simonmar] Add another named chunk with a different name - - - - - 68f8a896 by Simon Marlow at 2002-05-06T13:32:32+00:00 [haddock @ 2002-05-06 13:32:32 by simonmar] Be more lenient about extra paragraph breaks - - - - - 65fc31db by Simon Marlow at 2002-05-07T15:36:36+00:00 [haddock @ 2002-05-07 15:36:36 by simonmar] DocEmpty is a right and left-unit of DocAppend (remove it in the smart constructor). - - - - - adc81078 by Simon Marlow at 2002-05-07T15:37:15+00:00 [haddock @ 2002-05-07 15:37:15 by simonmar] Allow code blocks to be denoted with bird-tracks in addition to [...]. - - - - - 1283a3c1 by Simon Marlow at 2002-05-08T11:21:56+00:00 [haddock @ 2002-05-08 11:21:56 by simonmar] Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak at cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace. - - - - - a2239cf5 by Simon Marlow at 2002-05-08T11:22:30+00:00 [haddock @ 2002-05-08 11:22:30 by simonmar] Update to test new features. - - - - - 6add955f by Simon Marlow at 2002-05-08T13:37:25+00:00 [haddock @ 2002-05-08 13:37:25 by simonmar] Change the markup for typewriter-font from [...] to @... at . The reasoning is that the '@' symbol is much less likely to be needed than square brackets, and we don't want to have to escape square brackets in code fragments. This will be mildly painful in the short term, but it's better to get the change out of the way as early as possible. - - - - - cda06447 by Simon Marlow at 2002-05-08T13:39:56+00:00 [haddock @ 2002-05-08 13:39:56 by simonmar] Allow nested-style comments to be used as documentation annotations too. eg. {-| ... -} is equivalent to -- | ... An extra space can also be left after the comment opener: {- | ... -}. The only version that isn't allowed is {-# ... -}, because this syntax overlaps with Haskell pragmas; use {- # ... -} instead. - - - - - db23f65e by Simon Marlow at 2002-05-08T14:48:41+00:00 [haddock @ 2002-05-08 14:48:39 by simonmar] Add support for existential quantifiers on constructors. - - - - - adce3794 by Simon Marlow at 2002-05-08T15:43:25+00:00 [haddock @ 2002-05-08 15:43:25 by simonmar] update - - - - - 62a1f436 by Simon Marlow at 2002-05-08T15:44:10+00:00 [haddock @ 2002-05-08 15:44:10 by simonmar] Update to version 0.2 - - - - - f6a24ba3 by Simon Marlow at 2002-05-09T08:48:29+00:00 [haddock @ 2002-05-09 08:48:29 by simonmar] typo - - - - - 9f9522a4 by Simon Marlow at 2002-05-09T10:33:14+00:00 [haddock @ 2002-05-09 10:33:14 by simonmar] oops, left out '/' from the special characters in the last change. - - - - - 14abcb39 by Simon Marlow at 2002-05-09T10:34:44+00:00 [haddock @ 2002-05-09 10:34:44 by simonmar] Fix buglet - - - - - b8d878be by Simon Marlow at 2002-05-09T10:35:00+00:00 [haddock @ 2002-05-09 10:35:00 by simonmar] Give a more useful instance of Show for Module. - - - - - f7bfd626 by Simon Marlow at 2002-05-09T10:37:07+00:00 [haddock @ 2002-05-09 10:37:07 by simonmar] The last commit to Main.lhs broke the delicate balance of laziness which was being used to avoid computing the dependency graph of modules. So I finally bit the bullet and did a proper topological sort of the module graph, which turned out to be easy (stealing the Digraph module from GHC - this really ought to be in the libraries somewhere). - - - - - b481c1d0 by Simon Marlow at 2002-05-09T10:37:25+00:00 [haddock @ 2002-05-09 10:37:25 by simonmar] another item done - - - - - 032e2b42 by Simon Marlow at 2002-05-09T10:44:15+00:00 [haddock @ 2002-05-09 10:44:15 by simonmar] Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not. - - - - - 5fb45e92 by Simon Marlow at 2002-05-09T11:10:55+00:00 [haddock @ 2002-05-09 11:10:55 by simonmar] Add a special case for list types in ppHsAType - - - - - 1937e428 by Simon Marlow at 2002-05-09T12:43:06+00:00 [haddock @ 2002-05-09 12:43:06 by simonmar] Type synonyms can accept a ctype on the RHS, to match GHC. - - - - - 0f16ce56 by Simon Marlow at 2002-05-09T12:45:19+00:00 [haddock @ 2002-05-09 12:45:19 by simonmar] Add 'stdcall' keyword - - - - - 29b0d7d2 by Simon Marlow at 2002-05-09T13:35:45+00:00 [haddock @ 2002-05-09 13:35:45 by simonmar] Add System Requirements section - - - - - bf14dddd by Simon Marlow at 2002-05-09T13:36:11+00:00 [haddock @ 2002-05-09 13:36:11 by simonmar] Test existential types, amongst other things - - - - - 502f8f6f by Simon Marlow at 2002-05-09T13:37:35+00:00 [haddock @ 2002-05-09 13:37:35 by simonmar] Print the module name in a doc-string parse error - - - - - ca1f8d49 by Simon Marlow at 2002-05-09T13:38:04+00:00 [haddock @ 2002-05-09 13:38:04 by simonmar] Add dependency - - - - - 8d3d91ff by Simon Marlow at 2002-05-09T15:37:57+00:00 [haddock @ 2002-05-09 15:37:57 by simonmar] Add the changelog/release notes - - - - - f3960959 by Simon Marlow at 2002-05-09T15:47:47+00:00 [haddock @ 2002-05-09 15:47:47 by simonmar] mention the backquote-style of markup - - - - - 089fb6e6 by Simon Marlow at 2002-05-09T15:59:45+00:00 [haddock @ 2002-05-09 15:59:45 by simonmar] update - - - - - bdd3be0b by Simon Marlow at 2002-05-09T15:59:56+00:00 [haddock @ 2002-05-09 15:59:56 by simonmar] Document changes since 0.1 - - - - - 00fc4af8 by Simon Marlow at 2002-05-10T08:22:48+00:00 [haddock @ 2002-05-10 08:22:48 by simonmar] oops, update to version 0.2 - - - - - a8a79041 by Simon Marlow at 2002-05-10T16:05:08+00:00 [haddock @ 2002-05-10 16:05:08 by simonmar] Only include a mini-contents if there are 2 or more sections - - - - - 06653319 by Simon Marlow at 2002-05-13T09:13:12+00:00 [haddock @ 2002-05-13 09:13:12 by simonmar] fix typos - - - - - 1402b19b by Simon Marlow at 2002-05-13T10:14:22+00:00 [haddock @ 2002-05-13 10:14:22 by simonmar] Allow backquote as the right-hand quote as well as the left-hand quote, as suggested by Dean Herrington. Clean up the grammar a litte. - - - - - dcd5320d by Simon Marlow at 2002-05-13T10:44:10+00:00 [haddock @ 2002-05-13 10:44:10 by simonmar] a couple more things, prioritise a bit - - - - - a90130c4 by Simon Marlow at 2002-05-13T15:19:03+00:00 [haddock @ 2002-05-13 15:19:03 by simonmar] Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs). - - - - - a774d432 by Simon Marlow at 2002-05-13T15:20:54+00:00 [haddock @ 2002-05-13 15:20:54 by simonmar] Fix one of the record examples - - - - - 2d1d5218 by Simon Marlow at 2002-05-15T12:44:35+00:00 [haddock @ 2002-05-15 12:44:35 by simonmar] Preserve the newline before a bird-track, but only within a paragraph. - - - - - 1554c09a by Simon Marlow at 2002-05-15T13:03:02+00:00 [haddock @ 2002-05-15 13:03:01 by simonmar] Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed. - - - - - 57344dc3 by Simon Marlow at 2002-05-15T13:03:19+00:00 [haddock @ 2002-05-15 13:03:19 by simonmar] Bump to version 0.3 - - - - - b2791812 by Simon Marlow at 2002-05-15T13:03:41+00:00 [haddock @ 2002-05-15 13:03:41 by simonmar] update - - - - - fead183e by Simon Marlow at 2002-05-15T13:10:15+00:00 [haddock @ 2002-05-15 13:10:15 by simonmar] Rename Foo.hs to Test.hs, and add a Makefile - - - - - b0b1f89f by Simon Marlow at 2002-05-15T13:16:07+00:00 [haddock @ 2002-05-15 13:16:07 by simonmar] - Remove the note about function argument docs not being implemented - Note that qualified identifiers can be used to point to entities that aren't in scope. - - - - - 5665f31a by Simon Marlow at 2002-05-15T13:28:46+00:00 [haddock @ 2002-05-15 13:28:46 by simonmar] Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson. - - - - - 0564505d by Simon Marlow at 2002-05-17T10:51:57+00:00 [haddock @ 2002-05-17 10:51:57 by simonmar] Fix bugs in qualified name handling (A.B.f was returned as B.f) - - - - - 10e7311c by Simon Marlow at 2002-05-21T10:24:52+00:00 [haddock @ 2002-05-21 10:24:52 by simonmar] - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation - - - - - 2f91c2a6 by Simon Marlow at 2002-05-21T10:27:40+00:00 [haddock @ 2002-05-21 10:27:40 by simonmar] add a few more test cases - - - - - 01c2ddd2 by Simon Marlow at 2002-05-21T10:28:33+00:00 [haddock @ 2002-05-21 10:28:33 by simonmar] Rearrange a bit, and add support for tabular datatype rendering - - - - - a4e4c5f8 by Simon Marlow at 2002-05-27T09:03:52+00:00 [haddock @ 2002-05-27 09:03:51 by simonmar] Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others) - - - - - 48722e68 by Simon Marlow at 2002-05-27T12:30:38+00:00 [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. - - - - - 657204d2 by Simon Marlow at 2002-05-27T13:19:49+00:00 [haddock @ 2002-05-27 13:19:49 by simonmar] Fix bug: we weren't renaming HsDocCommentNamed in renameDecl - - - - - 592aae66 by Simon Marlow at 2002-05-27T14:10:27+00:00 [haddock @ 2002-05-27 14:10:27 by simonmar] Fix some bugs in the rendering of qualified type signatures. - - - - - 69c8f763 by Simon Marlow at 2002-05-27T14:36:45+00:00 [haddock @ 2002-05-27 14:36:45 by simonmar] warning message tweak - - - - - 16e64e21 by Simon Marlow at 2002-05-27T14:53:53+00:00 [haddock @ 2002-05-27 14:53:53 by simonmar] hyperlinked identifiers should be in <tt> - - - - - 8d5e4783 by Simon Marlow at 2002-05-27T15:56:45+00:00 [haddock @ 2002-05-27 15:56:45 by simonmar] Do something sensible for modules which don't export anything (except instances). - - - - - 9d3ef811 by Simon Marlow at 2002-05-28T10:12:50+00:00 [haddock @ 2002-05-28 10:12:50 by simonmar] Rename the module documentation properly (bug reported by Sven Panne). - - - - - ef03a1cc by Simon Marlow at 2002-05-28T10:13:04+00:00 [haddock @ 2002-05-28 10:13:04 by simonmar] Add some more test cases - - - - - 92baa0e8 by Simon Marlow at 2002-05-28T11:17:55+00:00 [haddock @ 2002-05-28 11:17:55 by simonmar] If an identifier doesn't lex, then just replace it by a DocString. - - - - - a3156213 by Simon Marlow at 2002-05-28T16:16:19+00:00 [haddock @ 2002-05-28 16:16:19 by simonmar] Only link to names in the current module which are actually listed in the documentation. A name may be exported but not present in the documentation if it is exported as part of a 'module M' export specifier. - - - - - 31acf941 by Simon Marlow at 2002-05-28T16:17:11+00:00 [haddock @ 2002-05-28 16:17:11 by simonmar] update - - - - - 7e474ebf by Sigbjorn Finne at 2002-05-28T22:42:08+00:00 [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] - - - - - 093f7e53 by Simon Marlow at 2002-05-29T09:09:49+00:00 [haddock @ 2002-05-29 09:09:49 by simonmar] Back out previous change until we can find a better way to do this. - - - - - 9234389c by Simon Marlow at 2002-05-29T13:19:06+00:00 [haddock @ 2002-05-29 13:19:06 by simonmar] Make the markup syntax a little more friendly: - single quotes are now interpreted literally unless they surround a valid Haskell identifier. So for example now there's no need to escape a single quote used as an apostrophe. - text to the right of a bird track is now literal (if you want marked-up text in a code block, use @...@). - - - - - b3333526 by Simon Marlow at 2002-05-29T13:38:51+00:00 [haddock @ 2002-05-29 13:38:51 by simonmar] Document recent changes to markup syntax - - - - - f93641d6 by Simon Marlow at 2002-05-29T15:27:18+00:00 [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too - - - - - 613f21e3 by Simon Marlow at 2002-06-03T13:05:58+00:00 [haddock @ 2002-06-03 13:05:57 by simonmar] Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case). - - - - - 14b36807 by Simon Marlow at 2002-06-03T13:20:00+00:00 [haddock @ 2002-06-03 13:20:00 by simonmar] Fix linking to qualified names again (thanks to Sven Panne for pointing out the bug). - - - - - 95b10eac by Simon Marlow at 2002-06-03T13:46:48+00:00 [haddock @ 2002-06-03 13:46:48 by simonmar] Fix for exporting record selectors from a newtype declaration - - - - - 272f932e by Simon Marlow at 2002-06-03T13:56:38+00:00 [haddock @ 2002-06-03 13:56:38 by simonmar] update to version 0.3 - - - - - 1c0a3bed by Simon Marlow at 2002-06-03T14:05:07+00:00 [haddock @ 2002-06-03 14:05:07 by simonmar] Add changes in version 0.3 - - - - - 145b4626 by Simon Marlow at 2002-06-03T14:12:38+00:00 [haddock @ 2002-06-03 14:12:38 by simonmar] Render class names as proper binders - - - - - 052106b3 by Simon Marlow at 2002-06-03T14:15:10+00:00 [haddock @ 2002-06-03 14:15:10 by simonmar] update, and separate into bugs, features, and cosmetic items. - - - - - 854f4914 by Simon Marlow at 2002-06-03T14:16:13+00:00 [haddock @ 2002-06-03 14:16:13 by simonmar] More test cases - - - - - 466922c8 by Simon Marlow at 2002-06-03T14:16:56+00:00 [haddock @ 2002-06-03 14:16:56 by simonmar] Example from the paper - - - - - 9962a045 by Simon Marlow at 2002-06-03T14:17:49+00:00 [haddock @ 2002-06-03 14:17:49 by simonmar] A debugging version of the style-sheet, which gives some tables coloured backgrounds so we can see what's going on. - - - - - f16b79db by Simon Marlow at 2002-06-03T14:19:46+00:00 [haddock @ 2002-06-03 14:19:46 by simonmar] typo - - - - - 620db27b by Simon Marlow at 2002-06-03T14:48:32+00:00 [haddock @ 2002-06-03 14:48:32 by simonmar] oops, fix markup bugs - - - - - 53fd105c by Simon Marlow at 2002-06-05T09:05:07+00:00 [haddock @ 2002-06-05 09:05:07 by simonmar] Keep foreign imports when there is no export list (bug reported by Sven Panne). - - - - - 6d98989c by Simon Marlow at 2002-06-05T09:12:02+00:00 [haddock @ 2002-06-05 09:12:02 by simonmar] Identifiers in single quotes can be symbol names too (bug reported by Hal Daume). - - - - - 001811e5 by Sven Panne at 2002-06-08T14:03:36+00:00 [haddock @ 2002-06-08 14:03:36 by panne] Tiny workaround for the fact that Haddock currently ignores HsImportSpecs: Let the local_orig_env take precedence. This is no real solution at all, but improves things sometimes, e.g. in my GLUT documentation. :-) - - - - - 504d19c9 by Simon Marlow at 2002-06-11T09:23:25+00:00 [haddock @ 2002-06-11 09:23:25 by simonmar] portability nit - - - - - e13b5af4 by Simon Marlow at 2002-06-20T12:38:07+00:00 [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. - - - - - f467a9b6 by Simon Marlow at 2002-06-20T12:39:02+00:00 [haddock @ 2002-06-20 12:39:01 by simonmar] Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list. - - - - - b8dbfe20 by Simon Marlow at 2002-06-21T12:43:06+00:00 [haddock @ 2002-06-21 12:43:06 by simonmar] When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers. - - - - - 4831dbbd by Simon Marlow at 2002-06-21T15:50:42+00:00 [haddock @ 2002-06-21 15:50:42 by simonmar] Add support for reading and writing interface files(!) This turned out to be quite easy, and necessary to get decent hyperlinks between the documentation for separate packages in the libraries. The functionality isn't quite complete yet: for a given package of modules, you'd like to say "the HTML for these modules lives in directory <dir>" (currently they are assumed to be all in the same place). Two new flags: --dump-interface=FILE dump an interface file in FILE --read-interface=FILE read interface from FILE an interface file describes *all* the modules being processed. Only the exported names are kept in the interface: if you re-export a name from a module in another interface the signature won't be copied. This is a compromise to keep the size of the interfaces sensible. Also, I added another useful option: --no-implicit-prelude avoids trying to import the Prelude. Previously this was the default, but now importing the Prelude from elsewhere makes sense if you also read in an interface containing the Prelude module, so Haddock imports the Prelude implicitly according to the Haskell spec. - - - - - d3640a19 by Sven Panne at 2002-06-23T14:54:00+00:00 [haddock @ 2002-06-23 14:54:00 by panne] Make it compile with newer GHCs - - - - - 780c506b by Sven Panne at 2002-06-23T15:44:31+00:00 [haddock @ 2002-06-23 15:44:31 by panne] Cleaned up build root handling and added more docs - - - - - 45290d2e by Simon Marlow at 2002-06-24T14:37:43+00:00 [haddock @ 2002-06-24 14:37:42 by simonmar] When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface. - - - - - 4e2b9ae6 by Simon Marlow at 2002-07-03T16:01:08+00:00 [haddock @ 2002-07-03 16:01:07 by simonmar] Handle import specs properly, include 'hiding'. Haddock now has a complete implementation of the Haskell module system (more or less; I won't claim it's 100% correct). - - - - - 9a9aa1a8 by Simon Marlow at 2002-07-03T16:18:16+00:00 [haddock @ 2002-07-03 16:18:16 by simonmar] Update - - - - - 560c3026 by Simon Marlow at 2002-07-04T14:56:10+00:00 [haddock @ 2002-07-04 14:56:10 by simonmar] Clean up the code that constructs the exported declarations, and fix a couple of bugs along the way. Now if you import a class hiding one of the methods, then re-export the class, the version in the documentation will correctly have the appropriate method removed. - - - - - 2c26e77d by Simon Marlow at 2002-07-04T15:26:13+00:00 [haddock @ 2002-07-04 15:26:13 by simonmar] More bugfixes to the export handling - - - - - 03e0710d by Simon Marlow at 2002-07-09T10:12:10+00:00 [haddock @ 2002-07-09 10:12:10 by simonmar] Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base). - - - - - 44f3891a by Simon Marlow at 2002-07-09T10:12:51+00:00 [haddock @ 2002-07-09 10:12:51 by simonmar] commented-out debugging code - - - - - 97280873 by Krasimir Angelov at 2002-07-09T16:33:33+00:00 [haddock @ 2002-07-09 16:33:31 by krasimir] 'Microsoft HTML Help' support - - - - - 3dc04655 by Simon Marlow at 2002-07-10T09:40:56+00:00 [haddock @ 2002-07-10 09:40:56 by simonmar] Fix for rendering of the (->) type constructor, from Ross Paterson. - - - - - c9f149c6 by Simon Marlow at 2002-07-10T10:26:11+00:00 [haddock @ 2002-07-10 10:26:11 by simonmar] Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help). - - - - - e8acc1e6 by Simon Marlow at 2002-07-10T10:57:10+00:00 [haddock @ 2002-07-10 10:57:10 by simonmar] Document all the new options since 0.3 - - - - - 8bb85544 by Simon Marlow at 2002-07-10T10:58:31+00:00 [haddock @ 2002-07-10 10:58:31 by simonmar] Sort the options a bit - - - - - abc0dd59 by Simon Marlow at 2002-07-15T09:19:38+00:00 [haddock @ 2002-07-15 09:19:38 by simonmar] Fix a bug in mkExportItems when processing a module without an explicit export list. We were placing one copy of a declaration for each binder in the declaration, which for a data type would mean one copy of the whole declaration per constructor or record selector. - - - - - dde65bb9 by Simon Marlow at 2002-07-15T09:54:16+00:00 [haddock @ 2002-07-15 09:54:16 by simonmar] merge rev. 1.35 - - - - - bd7eb8c4 by Simon Marlow at 2002-07-15T10:14:31+00:00 [haddock @ 2002-07-15 10:14:30 by simonmar] Be a bit more liberal in the kind of commenting styles we allow, as suggested by Malcolm Wallace. Mostly this consists of allowing doc comments either side of a separator token. In an export list, a section heading is now allowed before the comma, as well as after it. eg. module M where ( T(..) -- * a section heading , f -- * another section heading , g ) In record fields, doc comments are allowed anywhere (previously a doc-next was allowed only after the comma, and a doc-before was allowed only before the comma). eg. data R = C { -- | describes 'f' f :: Int -- | describes 'g' , g :: Int } - - - - - 8f6dfe34 by Simon Marlow at 2002-07-15T10:21:56+00:00 [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. - - - - - fc515bb7 by Simon Marlow at 2002-07-15T16:16:50+00:00 [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). - - - - - 80a97e74 by Simon Marlow at 2002-07-19T09:13:10+00:00 [haddock @ 2002-07-19 09:13:10 by simonmar] Allow special id's ([], (), etc.) to be used in an import declaration. - - - - - a69d7378 by Simon Marlow at 2002-07-19T09:59:02+00:00 [haddock @ 2002-07-19 09:59:02 by simonmar] Allow special id's ([], (), etc.) to be used in an import declarations. - - - - - d205fa60 by Simon Marlow at 2002-07-19T10:00:16+00:00 [haddock @ 2002-07-19 10:00:16 by simonmar] Relax the restrictions which require doc comments to be followed by semi colons - in some cases this isn't necessary. Now you can write module M where { -- | some doc class C where {} } without needing to put a semicolon before the class declaration. - - - - - e9301e14 by Simon Marlow at 2002-07-23T08:24:09+00:00 [haddock @ 2002-07-23 08:24:09 by simonmar] A new TODO list item - - - - - e5d77586 by Simon Marlow at 2002-07-23T08:40:56+00:00 [haddock @ 2002-07-23 08:40:56 by simonmar] - update the acknowledgements - remove the paragraph that described how to use explicit layout with doc comments; it isn't relevant any more. - - - - - 78a94137 by Simon Marlow at 2002-07-23T08:43:02+00:00 [haddock @ 2002-07-23 08:43:02 by simonmar] more tests - - - - - 5c320927 by Simon Marlow at 2002-07-23T08:43:26+00:00 [haddock @ 2002-07-23 08:43:26 by simonmar] Updates for version 0.4 - - - - - 488e99ae by Simon Marlow at 2002-07-23T09:10:46+00:00 [haddock @ 2002-07-23 09:10:46 by simonmar] Fix the %changelog (rpm complained that it wasn't in the right order) - - - - - a77bb373 by Simon Marlow at 2002-07-23T09:12:38+00:00 [haddock @ 2002-07-23 09:12:38 by simonmar] Another item for the TODO list - - - - - f1ec1813 by Simon Marlow at 2002-07-23T10:18:46+00:00 [haddock @ 2002-07-23 10:18:46 by simonmar] Add a version banner when invoked with -v - - - - - 1d44cadf by Simon Marlow at 2002-07-24T09:28:19+00:00 [haddock @ 2002-07-24 09:28:19 by simonmar] Remove ^Ms - - - - - 4d8d5e94 by Simon Marlow at 2002-07-24T09:42:18+00:00 [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. - - - - - d6edc43e by Simon Marlow at 2002-07-25T14:37:29+00:00 [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. - - - - - b34d18fa by Simon Marlow at 2002-08-02T09:08:22+00:00 [haddock @ 2002-08-02 09:08:22 by simonmar] The <TT> and <PRE> environments seem to use a font that is a little too small in IE. Compensate. (suggestion from Daan Leijen). - - - - - 8106b086 by Simon Marlow at 2002-08-02T09:25:23+00:00 [haddock @ 2002-08-02 09:25:20 by simonmar] Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen). - - - - - c1acff8f by Simon Marlow at 2002-08-05T09:03:49+00:00 [haddock @ 2002-08-05 09:03:49 by simonmar] update - - - - - f968661c by Simon Marlow at 2002-11-11T09:32:57+00:00 [haddock @ 2002-11-11 09:32:57 by simonmar] Fix cut-n-pasto - - - - - 12d02619 by Simon Marlow at 2002-11-13T09:49:46+00:00 [haddock @ 2002-11-13 09:49:46 by simonmar] Small bugfix in the --read-interface option parsing from Brett Letner. - - - - - 30e32d5e by Ross Paterson at 2003-01-16T15:07:57+00:00 [haddock @ 2003-01-16 15:07:57 by ross] Adjust for the new exception libraries (as well as the old ones). - - - - - 871f65df by Sven Panne at 2003-02-20T21:31:40+00:00 [haddock @ 2003-02-20 21:31:40 by panne] * Add varsyms and consyms to index * Exclude empty entries from index - - - - - bc42cc87 by Sven Panne at 2003-02-24T21:26:29+00:00 [haddock @ 2003-02-24 21:26:29 by panne] Don't convert a "newtype" to a single-constructor "data" for non-abstractly exported types, they are quite different regarding strictness/pattern matching. Now a "data" without any constructors is only emitted for an abstractly exported type, regardless if it is actually a "newtype" or a "data". - - - - - 0c2a1d99 by Sven Panne at 2003-03-08T19:02:38+00:00 [haddock @ 2003-03-08 19:02:38 by panne] Fixed some broken/redirected/canonicalized links found by a very picky link checker. - - - - - 25459269 by Sven Panne at 2003-03-09T21:13:43+00:00 [haddock @ 2003-03-09 21:13:43 by panne] Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor. - - - - - 6be4db86 by Sven Panne at 2003-03-10T21:34:25+00:00 [haddock @ 2003-03-10 21:34:24 by panne] Escape fragments. This fixes e.g. links to operators. - - - - - eb12972c by Ross Paterson at 2003-04-25T10:50:06+00:00 [haddock @ 2003-04-25 10:50:05 by ross] An 80% solution to generating derived instances. A complete solution would duplicate the instance inference logic, but if a type variable occurs as a constructor argument, then we can just propagate the derived class to the variable. But we know nothing of the constraints on any type variables that occur elsewhere. For example, the declarations data Either a b = Left a | Right b deriving (Eq, Ord) data Ptr a = Ptr Addr# deriving (Eq, Ord) newtype IORef a = IORef (STRef RealWorld a) deriving Eq yield the instances (Eq a, Eq b) => Eq (Either a b) (Ord a, Ord b) => Ord (Either a b) Eq (Ptr a) Ord (Ptr a) (??? a) => Eq (IORef a) The last example shows the limits of this local analysis. Note that a type variable may be in both categories: then we know a constraint, but there may be more, or a stronger constraint, e.g. data Tree a = Node a [Tree a] deriving Eq yields (Eq a, ??? a) => Eq (Tree a) - - - - - de886f78 by Simon Marlow at 2003-04-25T11:17:55+00:00 [haddock @ 2003-04-25 11:17:55 by simonmar] Some updates, including moving the derived instance item down to the bottom of the list now that Ross has contributed some code that does the job for common cases. - - - - - 1b52cffd by Simon Marlow at 2003-04-30T14:02:32+00:00 [haddock @ 2003-04-30 14:02:32 by simonmar] When installing on Windows, run cygpath over $(HADDOCKLIB) so that haddock (a mingw program, built by GHC) can understand it. You still need to be in a cygwin environment to run Haddock, because of the shell script wrapper. - - - - - d4f638de by Simon Marlow at 2003-05-06T10:04:47+00:00 [haddock @ 2003-05-06 10:04:47 by simonmar] Catch another case of a paragraph containing just a DocMonospaced that should turn into a DocCodeBlock. - - - - - 4162b2b9 by Simon Marlow at 2003-05-06T10:11:44+00:00 [haddock @ 2003-05-06 10:11:44 by simonmar] Add some more code-block tests. - - - - - 4f5802c8 by Simon Marlow at 2003-05-06T10:14:52+00:00 [haddock @ 2003-05-06 10:14:52 by simonmar] Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code. - - - - - ef8c45f7 by Simon Marlow at 2003-05-21T15:07:21+00:00 [haddock @ 2003-05-21 15:07:21 by simonmar] Only omit the module contents when there are no section headings at all. - - - - - bcee1e75 by Sigbjorn Finne at 2003-05-30T16:50:45+00:00 [haddock @ 2003-05-30 16:50:45 by sof] cygpath: for now, steer clear of --mixed - - - - - 30567af3 by Sigbjorn Finne at 2003-05-30T17:59:28+00:00 [haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit - - - - - b0856e7d by Simon Marlow at 2003-06-03T09:55:26+00:00 [haddock @ 2003-06-03 09:55:26 by simonmar] Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems. - - - - - 70e137ea by Simon Marlow at 2003-07-28T13:30:35+00:00 [haddock @ 2003-07-28 13:30:35 by simonmar] Add tests for a couple of bugs. - - - - - 122bd578 by Simon Marlow at 2003-07-28T13:31:25+00:00 [haddock @ 2003-07-28 13:31:25 by simonmar] Add documentation for anchors. - - - - - 0bd27cb2 by Simon Marlow at 2003-07-28T13:31:46+00:00 [haddock @ 2003-07-28 13:31:46 by simonmar] Update - - - - - 08052d42 by Simon Marlow at 2003-07-28T13:32:12+00:00 [haddock @ 2003-07-28 13:32:12 by simonmar] layout tweak. - - - - - 13942749 by Simon Marlow at 2003-07-28T13:33:03+00:00 [haddock @ 2003-07-28 13:33:03 by simonmar] Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively). - - - - - d7f493b9 by Simon Marlow at 2003-07-28T13:35:17+00:00 [haddock @ 2003-07-28 13:35:16 by simonmar] When a module A exports another module's contents via 'module B', then modules which import entities from B re-exported by A should link to B.foo rather than A.foo. See examples/Bug2.hs. - - - - - d94cf705 by Simon Marlow at 2003-07-28T13:36:14+00:00 [haddock @ 2003-07-28 13:36:14 by simonmar] Update to version 0.5 - - - - - dbb776cd by Sven Panne at 2003-07-28T14:02:43+00:00 [haddock @ 2003-07-28 14:02:43 by panne] * Updated to version 0.5 * Automagically generate configure if it is not there - - - - - 6cfeee53 by Simon Marlow at 2003-07-28T14:32:43+00:00 [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 - - - - - a1ce838f by Simon Marlow at 2003-07-28T14:33:37+00:00 [haddock @ 2003-07-28 14:33:37 by simonmar] Update for 0.5 - - - - - c0fe6493 by Simon Marlow at 2003-07-28T14:53:22+00:00 [haddock @ 2003-07-28 14:53:22 by simonmar] Markup fix - - - - - 6ea31596 by Sven Panne at 2003-07-28T16:40:45+00:00 [haddock @ 2003-07-28 16:40:45 by panne] Make it compile with GHC >= 6.01 - - - - - afcd30fc by Simon Marlow at 2003-07-30T15:04:52+00:00 [haddock @ 2003-07-30 15:04:52 by simonmar] Pay attention to import specs when building the the import env, as well as the orig env. This may fix some wrong links in documentation when import specs are being used. - - - - - 17c3137f by Simon Marlow at 2003-07-30T16:05:41+00:00 [haddock @ 2003-07-30 16:05:40 by simonmar] Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup. - - - - - 3d3b5c87 by Sven Panne at 2003-08-04T10:18:24+00:00 [haddock @ 2003-08-04 10:18:24 by panne] Don't print parentheses around one-element contexts - - - - - 9e3f3f2d by Simon Marlow at 2003-08-04T12:59:47+00:00 [haddock @ 2003-08-04 12:59:47 by simonmar] A couple of TODOs. - - - - - e9d8085c by Simon Marlow at 2003-08-05T14:10:31+00:00 [haddock @ 2003-08-05 14:10:31 by simonmar] I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it. - - - - - ff5c7d6d by Simon Marlow at 2003-08-15T14:42:59+00:00 [haddock @ 2003-08-15 14:42:59 by simonmar] Convert the lexer to Alex, and fix a bug in the process. - - - - - 1aa077bf by Simon Marlow at 2003-08-15T15:00:18+00:00 [haddock @ 2003-08-15 15:00:18 by simonmar] Update - - - - - d3de1e38 by Simon Marlow at 2003-08-15T15:01:03+00:00 [haddock @ 2003-08-15 15:01:03 by simonmar] wibbles - - - - - b40ece3b by Simon Marlow at 2003-08-18T10:04:47+00:00 [haddock @ 2003-08-18 10:04:47 by simonmar] Lex the 'mdo' keyword as 'do'. - - - - - 8f9a1146 by Simon Marlow at 2003-08-18T11:48:24+00:00 [haddock @ 2003-08-18 11:48:24 by simonmar] Two bugs from Sven. - - - - - ea54ebc0 by Simon Marlow at 2003-08-18T11:48:46+00:00 [haddock @ 2003-08-18 11:48:46 by simonmar] Fixes to the new lexer. - - - - - d5f6a4b5 by Simon Marlow at 2003-08-19T09:09:03+00:00 [haddock @ 2003-08-19 09:09:03 by simonmar] Further wibbles to the syntax. - - - - - 6bbdadb7 by Sven Panne at 2003-08-26T18:45:35+00:00 [haddock @ 2003-08-26 18:45:35 by panne] Use autoreconf instead of autoconf - - - - - 32e889cb by Sven Panne at 2003-08-26T19:01:19+00:00 [haddock @ 2003-08-26 19:01:18 by panne] Made option handling a bit more consistent with other tools, in particular: Every program in fptools should output * version info on stdout and terminate successfully when -V or --version * usage info on stdout and terminate successfully when -? or --help * usage info on stderr and terminate unsuccessfully when an unknown option is given. - - - - - 5d156a91 by Sven Panne at 2003-08-26T19:20:55+00:00 [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag - - - - - e6577265 by Sven Panne at 2003-08-27T07:50:03+00:00 [haddock @ 2003-08-27 07:50:02 by panne] * Made -D a short option for --dump-interface. * Made -m a short option for --ms-help. * Made -n a short option for --no-implicit-prelude. * Made -c a short option for --css. * Removed DocBook options from executable (they didn't do anything), but mark them as reserved in the docs. Note that the short option for DocBook output is now -S (from SGML) instead of -d. The latter is now a short option for --debug. * The order of the Options in the documentation now matches the order printed by Haddock itself. Note: Although changing the names of options is often a bad idea, I'd really like to make the options for the programs in fptools more consistent and compatible to the ones used in common GNU programs. - - - - - d303ff98 by Simon Marlow at 2003-09-10T08:23:48+00:00 [haddock @ 2003-09-10 08:23:48 by simonmar] Add doc subdir. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 9a70e46a by Simon Marlow at 2003-09-10T08:24:32+00:00 [haddock @ 2003-09-10 08:24:32 by simonmar] Install these files in $(datadir), not $(libdir), since they're architecture independent. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - bbb87e7a by Simon Marlow at 2003-09-10T08:25:31+00:00 [haddock @ 2003-09-10 08:25:31 by simonmar] Haddock's supplementary HTML bits now live in $(datadir), not $(libdir). Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 3587c24b by Simon Marlow at 2003-09-22T10:34:38+00:00 [haddock @ 2003-09-22 10:34:38 by simonmar] Allow installing of docs. - - - - - d510b517 by Sven Panne at 2003-10-11T08:10:44+00:00 [haddock @ 2003-10-11 08:10:44 by panne] Include architecture-independent files in file list - - - - - 187d7618 by Sigbjorn Finne at 2003-10-20T17:19:24+00:00 [haddock @ 2003-10-20 17:19:22 by sof] support for i-parameters + zip comprehensions - - - - - b6c7a273 by Simon Marlow at 2003-11-03T14:24:24+00:00 [haddock @ 2003-11-03 14:24:24 by simonmar] Update TODO file. - - - - - 58513e33 by Simon Marlow at 2003-11-05T11:22:04+00:00 [haddock @ 2003-11-05 11:22:04 by simonmar] Remove the last of the uses of 'trace' to emit warnings, and tidy up a couple of places where duplicate warnings were being emitted. - - - - - 33a78846 by Simon Marlow at 2003-11-05T11:30:53+00:00 [haddock @ 2003-11-05 11:30:52 by simonmar] - Suppress warnings about unknown imported modules by default. - Add a -v/--verbose flag to re-enable these warnings. The general idea is to suppress the "Warning: unknown module: Prelude" warnings which most Haddock users will see every time, and which aren't terribly useful. - - - - - a969de7f by Simon Marlow at 2003-11-05T12:30:28+00:00 [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. - - - - - f14ea82a by Simon Marlow at 2003-11-05T15:15:59+00:00 [haddock @ 2003-11-05 15:15:59 by simonmar] Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this. - - - - - 01a25ca6 by Simon Marlow at 2003-11-05T15:16:38+00:00 [haddock @ 2003-11-05 15:16:38 by simonmar] Update - - - - - 1a7ccb86 by Simon Marlow at 2003-11-05T17:16:05+00:00 [haddock @ 2003-11-05 17:16:04 by simonmar] Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up. - - - - - a2bca16d by Simon Marlow at 2003-11-06T10:44:52+00:00 [haddock @ 2003-11-06 10:44:52 by simonmar] Include iface_reexported in the .haddock file. This unfortunately bloats the file (40% for base). If this gets to be a problem we can always apply the dictionary trick that GHC uses for squashing .hi files. - - - - - 0a09c293 by Simon Marlow at 2003-11-06T12:39:47+00:00 [haddock @ 2003-11-06 12:39:46 by simonmar] - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo at . -- -- [@bar@] The description of @bar at . Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added. - - - - - fe1b3460 by Simon Marlow at 2003-11-06T14:47:36+00:00 [haddock @ 2003-11-06 14:47:36 by simonmar] Remove the 'Parent' button - it is of dubious use, and often points into thin air. - - - - - db6d762f by Simon Marlow at 2003-11-06T16:48:14+00:00 [haddock @ 2003-11-06 16:48:11 by simonmar] - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page. - - - - - 7d71718b by Simon Marlow at 2003-11-06T16:50:28+00:00 [haddock @ 2003-11-06 16:50:28 by simonmar] Add -k/--package docs - - - - - ef43949d by Simon Marlow at 2003-11-06T16:51:23+00:00 [haddock @ 2003-11-06 16:51:23 by simonmar] Bump to 0.6 - - - - - 1c419e06 by Simon Marlow at 2003-11-06T16:51:50+00:00 [haddock @ 2003-11-06 16:51:50 by simonmar] update - - - - - 69422327 by Simon Marlow at 2003-11-10T14:41:06+00:00 [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. - - - - - 3c3fc433 by Simon Marlow at 2003-11-10T14:51:59+00:00 [haddock @ 2003-11-10 14:51:59 by simonmar] Fix for getReExports: take into account names which are not visible because they are re-exported from a different package. - - - - - 31c8437b by Simon Marlow at 2003-11-10T15:10:53+00:00 [haddock @ 2003-11-10 15:10:53 by simonmar] Version 0.6 changes - - - - - a7c2430b by Simon Marlow at 2003-11-10T15:15:58+00:00 [haddock @ 2003-11-10 15:15:58 by simonmar] getReExports: one error case that isn't - - - - - 00cc459c by Simon Marlow at 2003-11-10T16:15:19+00:00 [haddock @ 2003-11-10 16:15:18 by simonmar] copyright update - - - - - ca62408d by Simon Marlow at 2003-11-11T09:57:25+00:00 [haddock @ 2003-11-11 09:57:25 by simonmar] Version 0.6 - - - - - 3acbf818 by Simon Marlow at 2003-11-11T12:10:44+00:00 [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. - - - - - 6c90abc2 by Simon Marlow at 2003-11-12T10:03:39+00:00 [haddock @ 2003-11-12 10:03:39 by simonmar] 2002 -> 2003 - - - - - 090bbc4c by Simon Marlow at 2003-11-28T12:08:00+00:00 [haddock @ 2003-11-28 12:08:00 by simonmar] update - - - - - 8096a832 by Simon Marlow at 2003-11-28T12:09:58+00:00 [haddock @ 2003-11-28 12:09:58 by simonmar] Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it. - - - - - 35294929 by Sven Panne at 2003-12-29T17:16:31+00:00 [haddock @ 2003-12-29 17:16:31 by panne] Updated my email address - - - - - cdb697bf by Simon Marlow at 2004-01-08T10:14:24+00:00 [haddock @ 2004-01-08 10:14:24 by simonmar] Add instructions for using GHC to pre-process source for feeding to Haddock. - - - - - 8dfc491f by Simon Marlow at 2004-01-09T12:45:46+00:00 [haddock @ 2004-01-09 12:45:46 by simonmar] Add -optP-P to example ghc command line. - - - - - ac41b820 by Simon Marlow at 2004-02-03T11:02:03+00:00 [haddock @ 2004-02-03 11:02:03 by simonmar] Fix bug in index generation - - - - - f4e7edcb by Simon Marlow at 2004-02-10T11:51:16+00:00 [haddock @ 2004-02-10 11:51:16 by simonmar] Don't throw away whitespace at the beginning of a line (experimental fix). - - - - - 68e212d2 by Simon Marlow at 2004-02-10T12:10:08+00:00 [haddock @ 2004-02-10 12:10:08 by simonmar] Fix for previous commit: I now realise why the whitespace was stripped from the beginning of the line. Work around it. - - - - - e7d7f2df by Sven Panne at 2004-02-10T18:38:45+00:00 [haddock @ 2004-02-10 18:38:45 by panne] Make Haddock link with the latest relocated monad transformer package - - - - - 992d4225 by Simon Marlow at 2004-02-16T10:21:35+00:00 [haddock @ 2004-02-16 10:21:35 by simonmar] Add a TODO - - - - - 1ac55326 by Simon Marlow at 2004-03-12T11:33:39+00:00 [haddock @ 2004-03-12 11:33:39 by simonmar] Add an item. - - - - - 0478e903 by Simon Marlow at 2004-03-15T12:24:05+00:00 [haddock @ 2004-03-15 12:24:05 by simonmar] Add an item. - - - - - 6f26d21a by Simon Marlow at 2004-03-18T14:21:29+00:00 [haddock @ 2004-03-18 14:21:29 by simonmar] Fix URL - - - - - 19b6bb99 by Simon Marlow at 2004-03-22T14:09:03+00:00 [haddock @ 2004-03-22 14:09:03 by simonmar] getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me). - - - - - 5c756031 by Simon Marlow at 2004-03-24T09:42:11+00:00 [haddock @ 2004-03-24 09:42:10 by simonmar] hiding bug from Ross Paterson (fixed in rev 1.59 of Main.hs) - - - - - 1b692e6c by Simon Marlow at 2004-03-24T10:10:50+00:00 [haddock @ 2004-03-24 10:10:50 by simonmar] mkExportItems fix & simplification: we should be looking at the actual exported names (calculated earlier) to figure out which subordinates of a declaration are exported. This means that if you export a record, and name its fields separately in the export list, the fields will still be visible in the documentation for the constructor. - - - - - 90e5e294 by Simon Marlow at 2004-03-24T10:12:08+00:00 [haddock @ 2004-03-24 10:12:08 by simonmar] Make restrictCons take into account record field names too (removing a ToDo). - - - - - 2600efa4 by Simon Marlow at 2004-03-24T10:16:17+00:00 [haddock @ 2004-03-24 10:16:17 by simonmar] Record export tests. - - - - - 6a8575c7 by Simon Marlow at 2004-03-25T09:35:14+00:00 [haddock @ 2004-03-25 09:35:14 by simonmar] restrictTo: fix for restricting a newtype with a record field. - - - - - dcf55a8d by Simon Marlow at 2004-03-25T10:01:42+00:00 [haddock @ 2004-03-25 10:01:42 by simonmar] Fix duplicate instance bug - - - - - f49aa758 by Simon Marlow at 2004-03-25T10:02:41+00:00 [haddock @ 2004-03-25 10:02:41 by simonmar] Duplicate instance bug. - - - - - 7b87344c by Simon Marlow at 2004-03-25T10:29:56+00:00 [haddock @ 2004-03-25 10:29:56 by simonmar] If a name is imported from two places, one hidden and one not, choose the unhidden one to link to. Also, when there's only a hidden module to link to, don't try linking to it. - - - - - 40f44d7b by Simon Marlow at 2004-03-25T15:17:24+00:00 [haddock @ 2004-03-25 15:17:23 by simonmar] Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment. - - - - - 9b64dc0f by Simon Marlow at 2004-03-25T15:20:55+00:00 [haddock @ 2004-03-25 15:20:55 by simonmar] Update - - - - - c2fff7f2 by Simon Marlow at 2004-03-25T15:45:10+00:00 [haddock @ 2004-03-25 15:45:10 by simonmar] Eliminate some unnecessary spaces in the HTML rendering - - - - - b7948ff0 by Simon Marlow at 2004-03-25T16:00:37+00:00 [haddock @ 2004-03-25 16:00:36 by simonmar] Remove all that indentation in the generated HTML to keep the file sizes down. - - - - - da2bb4ca by Sven Panne at 2004-03-27T09:57:58+00:00 [haddock @ 2004-03-27 09:57:57 by panne] Added the new-born haddock.js to the build process and the documentation. - - - - - b99e6f8c by Sven Panne at 2004-03-27T10:32:20+00:00 [haddock @ 2004-03-27 10:32:20 by panne] "type" is a required attribute of the "script" element - - - - - 562b185a by Sven Panne at 2004-03-27T12:52:34+00:00 [haddock @ 2004-03-27 12:52:34 by panne] Add a doctype for the contents page, too. - - - - - f6a99c2d by Simon Marlow at 2004-04-14T10:03:25+00:00 [haddock @ 2004-04-14 10:03:25 by simonmar] fix for single-line comment syntax - - - - - de366303 by Simon Marlow at 2004-04-20T13:08:04+00:00 [haddock @ 2004-04-20 13:08:04 by simonmar] Allow a 'type' declaration to include documentation comments. These will be ignored by Haddock, but at least one user (Johannes Waldmann) finds this feature useful, and it's easy to add. - - - - - fd78f51e by Simon Marlow at 2004-05-07T15:14:56+00:00 [haddock @ 2004-05-07 15:14:56 by simonmar] - update copyright - add version to abstract - - - - - 59f53e32 by Sven Panne at 2004-05-09T14:39:53+00:00 [haddock @ 2004-05-09 14:39:53 by panne] Fix the fix for single-line comment syntax, ------------------------------------------- is now a valid comment line again. - - - - - 8b18f2fe by Simon Marlow at 2004-05-10T10:11:51+00:00 [haddock @ 2004-05-10 10:11:51 by simonmar] Update - - - - - 225a491d by Ross Paterson at 2004-05-19T13:10:23+00:00 [haddock @ 2004-05-19 13:10:23 by ross] Make the handling of "deriving" slightly smarter, by ignoring data constructor arguments that are identical to the lhs. Now handles things like data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ... - - - - - 37588686 by Mike Thomas at 2004-05-21T06:38:14+00:00 [haddock @ 2004-05-21 06:38:14 by mthomas] Windows exe extensions (bin remains for Unix). - - - - - cf2b9152 by Simon Marlow at 2004-05-25T09:34:54+00:00 [haddock @ 2004-05-25 09:34:54 by simonmar] Add some TODO items - - - - - 4d29cdfc by Simon Marlow at 2004-05-25T10:41:46+00:00 [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. - - - - - 2e0771e0 by Mike Thomas at 2004-05-28T20:17:55+00:00 [haddock @ 2004-05-28 20:17:55 by mthomas] Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg. - - - - - 8d10bde1 by Sven Panne at 2004-06-05T16:53:34+00:00 [haddock @ 2004-06-05 16:53:34 by panne] Misc. rpm spec file cleanup, including: * make BuildRoot handling more consistent * added default file attributes * consistent defines and tags - - - - - 59974349 by Sven Panne at 2004-06-05T18:01:00+00:00 [haddock @ 2004-06-05 18:01:00 by panne] More rpm spec file cleanup, including: * added some BuildRequires * changed packager to me, so people can complain at the right place :-] * consistently refer to haskell.org instead of www.haskell.org - - - - - b94d4903 by Simon Marlow at 2004-07-01T11:08:58+00:00 [haddock @ 2004-07-01 11:08:57 by simonmar] Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead. - - - - - d5278f67 by Sven Panne at 2004-07-04T15:15:55+00:00 [haddock @ 2004-07-04 15:15:55 by panne] Install pictures for +/- pictures, too (JPEG is a strange format for graphics like this, I would have expected GIF or PNG here.) Things look fine with Konqueror and Netscape on Linux now, the only downside is that the cursor doesn't change when positioned above the "button". - - - - - 46dec6c5 by Sven Panne at 2004-07-13T17:59:28+00:00 [haddock @ 2004-07-13 17:59:28 by panne] A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there. - - - - - 1d7bc432 by Simon Marlow at 2004-07-22T08:54:06+00:00 [haddock @ 2004-07-22 08:54:06 by simonmar] Add single quote to $ident, so you can say eg. 'foldl'' to refer to foldl' (the longest match rule is our friend). Bug reported by Adrian Hey <ahey at iee.org> - - - - - f183618b by Krasimir Angelov at 2004-07-27T22:59:35+00:00 [haddock @ 2004-07-27 22:58:23 by krasimir] Add basic support for Microsoft HTML Help 2.0 - - - - - d515d0c2 by Krasimir Angelov at 2004-07-27T23:02:36+00:00 [haddock @ 2004-07-27 23:02:36 by krasimir] escape names in the index - - - - - a5f1be23 by Krasimir Angelov at 2004-07-27T23:05:21+00:00 [haddock @ 2004-07-27 23:05:21 by krasimir] Add jsFile, plusFile and minusFile to the file list - - - - - c4fb4881 by Krasimir Angelov at 2004-07-28T22:12:10+00:00 [haddock @ 2004-07-28 22:12:09 by krasimir] bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs - - - - - 64d30b1d by Krasimir Angelov at 2004-07-30T22:15:47+00:00 [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug - - - - - 133c8c5c by Krasimir Angelov at 2004-07-31T12:04:38+00:00 [haddock @ 2004-07-31 12:04:37 by krasimir] make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful. - - - - - 79040963 by Krasimir Angelov at 2004-07-31T13:10:20+00:00 [haddock @ 2004-07-31 13:10:20 by krasimir] Make DHtmlTree compatible with Mozila browser - - - - - 1a55dc90 by Krasimir Angelov at 2004-07-31T14:52:55+00:00 [haddock @ 2004-07-31 14:52:55 by krasimir] fix - - - - - 85ce0237 by Krasimir Angelov at 2004-07-31T14:53:28+00:00 [haddock @ 2004-07-31 14:53:28 by krasimir] HtmlHelp 1.x - - - - - 3c0c53ba by Krasimir Angelov at 2004-07-31T20:35:21+00:00 [haddock @ 2004-07-31 20:35:21 by krasimir] Added support for DevHelp - - - - - d42b5af1 by Krasimir Angelov at 2004-07-31T21:17:51+00:00 [haddock @ 2004-07-31 21:17:51 by krasimir] Document new features in HtmlHelp - - - - - 790fe21e by Krasimir Angelov at 2004-08-01T15:14:02+00:00 [haddock @ 2004-08-01 15:14:02 by krasimir] add missing imports - - - - - fd7cc6bc by Krasimir Angelov at 2004-08-01T19:52:08+00:00 [haddock @ 2004-08-01 19:52:06 by krasimir] fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format. - - - - - 94ad7ac8 by Krasimir Angelov at 2004-08-01T19:53:50+00:00 [haddock @ 2004-08-01 19:53:50 by krasimir] I forgot to add the new +/- images - - - - - f0c65388 by Krasimir Angelov at 2004-08-02T16:25:53+00:00 [haddock @ 2004-08-02 16:25:53 by krasimir] Add root node to the table of contents. All modules in tree are not children of the root - - - - - f50bd85d by Sven Panne at 2004-08-02T18:17:46+00:00 [haddock @ 2004-08-02 18:17:46 by panne] Mainly DocBook fixes - - - - - 09527ce3 by Sven Panne at 2004-08-02T20:02:29+00:00 [haddock @ 2004-08-02 20:02:29 by panne] Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays... - - - - - c8fbacfa by Sven Panne at 2004-08-02T20:31:13+00:00 [haddock @ 2004-08-02 20:31:13 by panne] Warning police - - - - - 37830bff by Sven Panne at 2004-08-02T20:32:29+00:00 [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code - - - - - 13847171 by Sven Panne at 2004-08-02T21:12:27+00:00 [haddock @ 2004-08-02 21:12:25 by panne] Use pathJoin instead of low-level list-based manipulation for FilePaths - - - - - c711d61e by Sven Panne at 2004-08-02T21:16:02+00:00 [haddock @ 2004-08-02 21:16:02 by panne] Removed WinDoze CRs - - - - - b1f7dc88 by Sven Panne at 2004-08-03T19:35:59+00:00 [haddock @ 2004-08-03 19:35:59 by panne] Fixed spelling of "http-equiv" attribute - - - - - dd5f394e by Sven Panne at 2004-08-03T19:44:03+00:00 [haddock @ 2004-08-03 19:44:03 by panne] Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before) - - - - - 919c47c6 by Sigbjorn Finne at 2004-08-03T19:45:11+00:00 [haddock @ 2004-08-03 19:45:11 by sof] make it compile with <= ghc-6.1 - - - - - 4d6f01d8 by Sigbjorn Finne at 2004-08-03T19:45:30+00:00 [haddock @ 2004-08-03 19:45:30 by sof] ffi wibble - - - - - 4770643a by Sven Panne at 2004-08-03T20:47:46+00:00 [haddock @ 2004-08-03 20:47:46 by panne] Fixed CSS for button style. Note that only "0" is a valid measure without a unit! - - - - - 14aaf2e5 by Sven Panne at 2004-08-03T21:07:59+00:00 [haddock @ 2004-08-03 21:07:58 by panne] Improved spacing of dynamic module tree - - - - - 97c3579a by Simon Marlow at 2004-08-09T11:03:04+00:00 [haddock @ 2004-08-09 11:03:04 by simonmar] Add FormatVersion Patch submitted by: George Russell <ger at informatik.uni-bremen.de> - - - - - af7f8c03 by Simon Marlow at 2004-08-09T11:55:07+00:00 [haddock @ 2004-08-09 11:55:05 by simonmar] Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger at informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header. - - - - - 7b865ad3 by Simon Marlow at 2004-08-10T14:09:57+00:00 [haddock @ 2004-08-10 14:09:57 by simonmar] Fixes for DevHelp/HtmlHelp following introduction of short module description. - - - - - 814766cd by Simon Marlow at 2004-08-10T14:33:46+00:00 [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. - - - - - 39cf9ede by Simon Marlow at 2004-08-12T12:08:23+00:00 [haddock @ 2004-08-12 12:08:23 by simonmar] Avoid using string-gap tricks. - - - - - b6d78551 by Simon Marlow at 2004-08-13T10:53:21+00:00 [haddock @ 2004-08-13 10:53:21 by simonmar] Update - - - - - eaae7417 by Simon Marlow at 2004-08-13T10:53:50+00:00 [haddock @ 2004-08-13 10:53:50 by simonmar] Test for primes in quoted links - - - - - 68c34f06 by Sven Panne at 2004-08-16T19:59:38+00:00 [haddock @ 2004-08-16 19:59:36 by panne] XMLification - - - - - 7f45a6f9 by Sven Panne at 2004-08-18T16:42:54+00:00 [haddock @ 2004-08-18 16:42:54 by panne] Re-added indices + minor fixes - - - - - 8a5dd97c by Sigbjorn Finne at 2004-08-25T17:15:42+00:00 [haddock @ 2004-08-25 17:15:42 by sof] backquote HADDOCK_VERSION defn for <= ghc-6.0.x; believe this is only needed under mingw - - - - - 4b1b42ea by Sven Panne at 2004-08-26T20:08:50+00:00 [haddock @ 2004-08-26 20:08:49 by panne] SGML is dead, long live DocBook XML! Note: The BuildRequires tags in the spec files are still incomplete and the documentation about the DocBook tools needs to be updated, too. Stay tuned... - - - - - 8d52cedb by Sven Panne at 2004-08-26T21:03:19+00:00 [haddock @ 2004-08-26 21:03:19 by panne] Updated BuildRequires tags. Alas, there seems to be no real standard here, so your mileage may vary... At least the current specs should work on SuSE Linux. - - - - - e6982912 by Sigbjorn Finne at 2004-08-30T15:44:59+00:00 [haddock @ 2004-08-30 15:44:59 by sof] escape HADDOCK_VERSION double quotes on all platforms when compiling with <=6.0.x - - - - - b3fbc867 by Simon Marlow at 2004-08-31T13:09:42+00:00 [haddock @ 2004-08-31 13:09:42 by simonmar] Avoid GHC/shell versionitis and create Version.hs - - - - - c359e16a by Sven Panne at 2004-09-05T19:12:33+00:00 [haddock @ 2004-09-05 19:12:32 by panne] * HTML documentation for "foo.xml" goes into directory "foo" again, not "foo-html". This is nicer and consistent with the behaviour for building the docs from SGML. * Disabled building PostScript documentation in the spec files for now, there are some strange issues with the FO->PS conversion for some files which have to be clarified first. - - - - - c68b1eba by Sven Panne at 2004-09-24T07:04:38+00:00 [haddock @ 2004-09-24 07:04:38 by panne] Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable. - - - - - dfb32615 by Simon Marlow at 2004-09-30T08:21:29+00:00 [haddock @ 2004-09-30 08:21:29 by simonmar] Add a feature request - - - - - 45ff783c by Sven Panne at 2004-10-23T19:54:00+00:00 [haddock @ 2004-10-23 19:54:00 by panne] Improved the Cygwin/MinGW chaos a little bit. There is still confusion about host platform vs. target platform... - - - - - 5f644714 by Krasimir Angelov at 2004-10-28T16:01:51+00:00 [haddock @ 2004-10-28 16:01:51 by krasimir] update for ghc-6.3+ - - - - - 92d9753e by Sven Panne at 2004-11-01T16:39:01+00:00 [haddock @ 2004-11-01 16:39:01 by panne] Revert previous commit: It's Network.URI which should be changed, not Haddock. - - - - - 05f70f6e by Simon Marlow at 2005-01-04T16:15:51+00:00 [haddock @ 2005-01-04 16:15:51 by simonmar] parser fix: allow qualified specialids. - - - - - 47870837 by Simon Marlow at 2005-01-04T16:16:54+00:00 [haddock @ 2005-01-04 16:16:54 by simonmar] Add a test - - - - - ff11fc2c by Ross Paterson at 2005-01-10T19:18:22+00:00 [haddock @ 2005-01-10 19:18:22 by ross] Render non-ASCII characters using numeric character references, to simplify charset issues. There's a META tag saying the charset is UTF-8, but GHC outputs characters as raw bytes. Ideally we need an encoding on the input side too, primarily in comments, because source files containing non-ASCII characters aren't portable between locales. - - - - - eba2fc4e by Simon Marlow at 2005-01-11T10:44:37+00:00 [haddock @ 2005-01-11 10:44:37 by simonmar] Remove string gap - - - - - b899a381 by Ross Paterson at 2005-01-13T11:41:33+00:00 [haddock @ 2005-01-13 11:41:33 by ross] recognize SGML-style numeric character references &#ddd; or &#xhhhh; and translate them into Chars. - - - - - 106e3cf0 by Ross Paterson at 2005-01-13T14:43:41+00:00 [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) - - - - - e8f54f25 by Ross Paterson at 2005-01-13T14:44:24+00:00 [haddock @ 2005-01-13 14:44:24 by ross] Describe numeric character references. - - - - - 914ccdce by Sven Panne at 2005-01-15T18:44:48+00:00 [haddock @ 2005-01-15 18:44:45 by panne] Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later. - - - - - 6ab20e84 by Sven Panne at 2005-01-16T12:18:26+00:00 [haddock @ 2005-01-16 12:18:26 by panne] Trim imports - - - - - efb81da9 by Sven Panne at 2005-01-16T12:58:08+00:00 [haddock @ 2005-01-16 12:58:03 by panne] Correctly handle the new order of arguments for the combining function given to fromListWith. - - - - - e27b5834 by Sven Panne at 2005-01-16T14:14:41+00:00 [haddock @ 2005-01-16 14:14:39 by panne] Data.Map.unions is left-biased. - - - - - dae3cc3e by Sven Panne at 2005-01-16T14:22:44+00:00 [haddock @ 2005-01-16 14:22:44 by panne] Added the last missing "flip" to get identical HTML output as previous versions. - - - - - 951d8408 by Sven Panne at 2005-01-16T14:37:10+00:00 [haddock @ 2005-01-16 14:37:10 by panne] Refactored Text.PrettyPrint legacy hell into a separate module. - - - - - f1c4b892 by Sven Panne at 2005-01-16T15:41:25+00:00 [haddock @ 2005-01-16 15:41:21 by panne] Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway. - - - - - 60824c6e by Simon Marlow at 2005-01-18T10:02:48+00:00 [haddock @ 2005-01-18 10:02:48 by simonmar] Add a TODO - - - - - a8c82f23 by Krasimir Angelov at 2005-01-28T23:19:39+00:00 [haddock @ 2005-01-28 23:19:39 by krasimir] import Foreign/Foreign.C are required for Windows - - - - - d8450a23 by Simon Marlow at 2005-02-02T16:23:04+00:00 [haddock @ 2005-02-02 16:23:00 by simonmar] Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning. - - - - - 1cce71d0 by Simon Marlow at 2005-02-03T13:42:19+00:00 [haddock @ 2005-02-03 13:42:19 by simonmar] - add --ignore-all-exports flag, which behaves as if every module has the ignore-exports attribute (requested by Chris Ryder). - add --hide option to hide a module on the command line. - add --use-package option to get Haddock info for a package from ghc-pkg (largely untested). - remove reexports from the .haddock file, they aren't used any more. - - - - - 767123ef by Ross Paterson at 2005-02-03T16:17:37+00:00 [haddock @ 2005-02-03 16:17:37 by ross] fix typo for < 6.3 - - - - - 0c680c04 by Simon Marlow at 2005-02-04T12:03:31+00:00 [haddock @ 2005-02-04 12:03:31 by simonmar] Fix bug in renameExportItems that meant links in instances weren't being renamed properly. - - - - - ff7abe5f by Simon Marlow at 2005-02-04T12:15:53+00:00 [haddock @ 2005-02-04 12:15:52 by simonmar] Add attribute #not-home, to indicate that the current module should not be considered to be a home module for the each entity it exports, unless there is no other module that exports the entity. - - - - - fc2cfd27 by Simon Marlow at 2005-02-04T12:40:02+00:00 [haddock @ 2005-02-04 12:40:02 by simonmar] Update the documentation w.r.t. home modules and the not-home attribute. - - - - - 26b8ddf7 by Ross Paterson at 2005-02-04T13:36:06+00:00 [haddock @ 2005-02-04 13:36:05 by ross] sort lists of instances by - arity of the type constructors (so higher-kinded instances come first) - name of the class - argument types - - - - - 26bfb19c by Simon Marlow at 2005-02-23T15:57:12+00:00 [haddock @ 2005-02-23 15:57:12 by simonmar] Fix documentation regarding the module attributes. - - - - - 9c3afd02 by Simon Marlow at 2005-02-28T16:18:17+00:00 [haddock @ 2005-02-28 16:18:17 by simonmar] version 0.7 - - - - - a95fd63f by Simon Marlow at 2005-02-28T16:22:08+00:00 [haddock @ 2005-02-28 16:22:08 by simonmar] Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results. - - - - - 905d42f7 by Simon Marlow at 2005-03-01T17:16:42+00:00 [haddock @ 2005-03-01 17:16:40 by simonmar] Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case). - - - - - a0e1d178 by Wolfgang Thaller at 2005-03-09T08:28:39+00:00 [haddock @ 2005-03-09 08:28:39 by wolfgang] Hack haddock's lexer to accept the output from Apple's broken version of cpp (Apple's cpp leaves #pragma set_debug_pwd directives in it's output). - - - - - 9e1eb784 by Simon Marlow at 2005-04-22T14:27:15+00:00 [haddock @ 2005-04-22 14:27:15 by simonmar] Add a TODO item - - - - - 23281f78 by Ross Paterson at 2005-05-18T12:41:59+00:00 [haddock @ 2005-05-18 12:41:59 by ross] fix 3 bugs in --use-package, and document it. - - - - - 00074a68 by Sven Panne at 2005-05-21T12:35:29+00:00 [haddock @ 2005-05-21 12:35:29 by panne] Warning/versionitis police - - - - - 341fa822 by Simon Marlow at 2005-06-15T15:43:21+00:00 [haddock @ 2005-06-15 15:43:21 by simonmar] Allow "licence" as an alternate spelling of "license" - - - - - 3b953f8b by Simon Marlow at 2005-06-16T08:14:12+00:00 [haddock @ 2005-06-16 08:14:12 by simonmar] wibble - - - - - abfd9826 by Simon Marlow at 2005-06-27T14:46:40+00:00 [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The old way confused Apache because the extensions are sometimes interpreted as having special meanings. - - - - - a01eea00 by Simon Marlow at 2005-08-04T13:59:40+00:00 [haddock @ 2005-08-04 13:59:40 by simonmar] 0.7 changes - - - - - 170ef87e by Simon Marlow at 2005-08-04T15:08:03+00:00 [haddock @ 2005-08-04 15:08:03 by simonmar] spec file from Jens Peterson - - - - - 7621fde4 by Simon Marlow at 2005-08-04T15:59:30+00:00 [haddock @ 2005-08-04 15:59:30 by simonmar] replace mingw tests with $(Windows) - - - - - a20739bb by Sven Panne at 2005-08-05T07:01:12+00:00 [haddock @ 2005-08-05 07:01:12 by panne] Reverted to previous version (but with bumped version number), the last commit broke RPM building on SuSE systems due to differently named dependencies. As a clarification: All .spec files in the repository have to work at least on SuSE, because that's the system I'm using. And as "Mr. Building Police", I reserve me the right to keep them that way... >:-) It might very well be the case that we need different .spec files for different platforms, so packagers which are unhappy with the current .spec files should contact me, stating the actual problems. - - - - - 4afb15cf by Simon Marlow at 2005-10-05T10:51:45+00:00 [haddock @ 2005-10-05 10:51:45 by simonmar] Add a bug - - - - - 60f69f82 by Simon Marlow at 2005-10-05T12:52:03+00:00 [haddock @ 2005-10-05 12:52:03 by simonmar] Document new behaviour of -s option - - - - - f7e520ca by Simon Marlow at 2005-10-10T15:02:55+00:00 [haddock @ 2005-10-10 15:02:55 by simonmar] extractRecSel: ignore non-record constructors (fixes a crash when using datatypes with a mixture of record and non-record style constructors). - - - - - b2edbedb by Simon Marlow at 2005-10-14T09:44:21+00:00 Start CHANGES for 0.8 - - - - - 21c7ac8d by Simon Marlow at 2005-10-14T23:11:19+00:00 First cut of Cabal build system - - - - - 766cecdd by Simon Marlow at 2005-10-29T08:14:43+00:00 Add configure script and Makefile for the docs Add a separate configure script and build system for building the documentation. The configure and Makefile code is stolen from fptools. This is left as a separate build system so that the main Cabal setup doesn't require a Unix build environment or DocBook XML tools. - - - - - aa36c783 by Duncan Coutts at 2006-01-17T19:29:55+00:00 Add a --wiki=URL flag to add a per-module link to a correspondng wiki page. So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option. - - - - - e06e2da2 by Simon Marlow at 2006-01-18T09:28:15+00:00 TODO: documnet --wiki - - - - - 17adfda9 by Duncan Coutts at 2006-01-19T20:17:59+00:00 Add an optional wiki link for each top level exported name. In each module, for each "top level" exported entity we add a hyper link to a corresponding wiki page. The link url gets the name of the exported entity as a '#'-style anchor, so if there is an anchor in the page with that name then the users browser should jump directly to it. By "top level" we mean functions, classes, class members and data types (data, type, newtype), but not data constructors, class instances or data type class membership. The link is added at the right of the page and in a small font. Hopefully this is the right balance of visibility/distraction. We also include a link to the wiki base url in the contents and index pages. - - - - - f52324bb by Duncan Coutts at 2006-01-19T20:28:27+00:00 Rewrite pathJoin to only add a path separator when necessary. When the path ends in a file seperator there is no need to add another. Now using "--wiki=http://blah.com/foo/" should do the right thing. (Code snippet adapted from Isaac's FilePath package.) - - - - - 43bb89fa by Duncan Coutts at 2006-01-21T17:15:27+00:00 Teach haddock about line pragmas and add accurate source code links Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's source location tracking to include the file name as well as line/column. This way each AST item that is tagged with a SrcLoc gets the original file name too. Use this original file name to add source links to each exported item, in the same visual style as the wiki links. Note that the per-export source links are to the defining module rather than whichever module haddock pretends it is exported from. This is what we want for source code links. The source code link URL can also contain the name of the export so one could implement jumping to the actual location of the function in the file if it were linked to an html version of the source rather than just plain text. The name can be selected with the %N wild card. So for linking to the raw source code one might use: --source=http://darcs/haskell.org/foo/%F Or for linking to html syntax highlighted code: --source=http://darcs/haskell.org/foo/%M.html#%N - - - - - edd9f229 by Duncan Coutts at 2006-01-22T00:02:00+00:00 Extend URL variable expansion syntax and add source links to the contents page Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module. - - - - - eb3c6ada by Duncan Coutts at 2006-01-23T13:42:34+00:00 Remove the complex substitutions and add more command line flags instead. Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now use three seperate command line flags for the top level, per-module and per-entity source and wiki links. They are: --source-base, --source-module, --source-entity --comments-base, --comments-module, --comments-entity We leave -s, --source as an alias for --source-module which is how that option behaved previously. The long forms of the substitutions are still available, ${FILE} ${MODULE} etc and the only non-trivial substitution is ${MODULE/./c} to replace the '.' characters in the module name with any other character c. eg ${MODULE/./-} Seperating the source and wiki url flags has the added bonus that they can be turned on or off individually. So users can have per-module links for example without having to also have per-entity links.` - - - - - a2f0f2af by Duncan Coutts at 2006-01-23T13:54:52+00:00 Make the --help output fit in 80 columns. This is a purely cosmetic patch, feel free to ignore it. The only trickery going on is that we don't display the deprecated -s, --source flags in the help message, but we do still accept them. - - - - - 2d3a4b0c by Duncan Coutts at 2006-01-23T14:12:16+00:00 Add documentation for the new --source-* and --comments-* command line options - - - - - 1a82a297 by Simon Marlow at 2006-01-23T17:03:27+00:00 fix markup - - - - - 100d464a by Duncan Coutts at 2006-01-23T18:31:13+00:00 remove a couple TODO items that have been done The --wiki, or rather the --comment-* options are now documented. There is probably no need to have haddock invoke unlit or cpp itself since it can now pick up the line pragmas to get the source locations right. Tools like Cabal will arrange for preprocessors to be run so there is less of a need for tools like haddock to do it themselves. - - - - - 3162fa91 by Simon Marlow at 2006-01-24T14:21:56+00:00 add a test I had lying around - - - - - 98947063 by Simon Marlow at 2006-01-31T13:52:54+00:00 add scabal-version field - - - - - c41876e6 by Neil Mitchell at 2006-02-26T17:48:21+00:00 Add Hoogle output option - - - - - f86fb9c0 by Simon Marlow at 2006-03-08T09:15:20+00:00 add haskell.vim Contributed by Brad Bowman <bsb at bereft.net>, thanks! - - - - - 35d3c511 by benjamin.franksen at 2006-03-03T22:39:54+00:00 fixed libdir (/html was missing) - - - - - 4d08fd7d by Simon Marlow at 2006-03-10T11:13:31+00:00 add PatternGuards extension - - - - - 3f095e70 by Simon Marlow at 2006-03-13T11:40:42+00:00 bug fixes from Brad Bowman - - - - - 8610849d by Sven Panne at 2006-03-19T17:02:56+00:00 Fixed Cabal/RPM build - - - - - 34a994d6 by sven.panne at 2006-04-20T12:39:23+00:00 Avoid pattern guards Due to the use of pattern guards in Haddock, GHC was called with -fglasgow-exts. This in turn enables bang patterns, too, which broke the Haddock build. Removing some unnecessary pattern guards seemed to be the better way of fixing this instead of using a pragma to disable pattern guards. - - - - - bb523f51 by Ross Paterson at 2006-04-24T09:03:25+00:00 extend 'deriving' heuristic a little If an argument of a data constructor has a type variable head, it is irreducible and the same type class can be copied into the constraint. (Formerly we just did this for type variable arguments.) - - - - - dab9fe7a by Simon Marlow at 2006-04-26T10:02:31+00:00 record an idea - - - - - 748b7078 by Simon Marlow at 2006-05-08T08:28:53+00:00 add section about deriving - - - - - 11252ea1 by Simon Marlow at 2006-05-24T15:43:10+00:00 replace a fatal error in lexChar with a parseError - - - - - 382c9411 by Simon Marlow at 2006-05-24T15:45:47+00:00 add a bug - - - - - b79272f5 by Simon Marlow at 2006-05-24T15:46:29+00:00 add a bug report - - - - - 912edf65 by David Waern at 2006-07-10T19:09:23+00:00 Initial modifications -- doesn't compile - - - - - a3c7ba99 by David Waern at 2006-07-11T00:54:19+00:00 More porting work -- doesn't compile - - - - - 0a173d19 by David Waern at 2006-07-11T11:30:03+00:00 Make the repos temporarily compile and illustrate a problem - - - - - bad316de by David Waern at 2006-07-11T15:43:47+00:00 Progress on the porting process - - - - - bbf12d02 by David Waern at 2006-07-11T23:07:44+00:00 More progress on the porting -- first pass starting to shape up - - - - - de580ba2 by David Waern at 2006-07-20T17:48:30+00:00 More progress -- still on phase1 - - - - - 75a917a2 by David Waern at 2006-07-23T18:22:43+00:00 More work on pass1 -- mostly done - - - - - 6697b3f7 by David Waern at 2006-07-23T22:17:40+00:00 More work, started working on the renaming phase -- this code will need a cleanup soon :) - - - - - 82a5bcbb by David Waern at 2006-07-29T16:16:43+00:00 Add instances, build renaming environment, start on the renamer - - - - - c3f8f4f1 by David Waern at 2006-07-29T21:37:48+00:00 Complete the renamer - - - - - 7e00d464 by David Waern at 2006-07-30T21:01:57+00:00 Start porting the Html renderer - - - - - f04ce121 by David Waern at 2006-08-09T20:04:56+00:00 More Html rendering progress - - - - - 20c21b53 by David Waern at 2006-08-10T17:37:47+00:00 More progress - - - - - d7097e0d by David Waern at 2006-08-11T20:31:51+00:00 Cleanup - - - - - a7351e86 by David Waern at 2006-08-12T11:44:47+00:00 Render H98 Data declarations - - - - - 3fb2208e by David Waern at 2006-08-12T17:15:34+00:00 Perfect rendering of Test.hs - - - - - 454fd062 by David Waern at 2006-08-13T21:57:08+00:00 Misc fixes and interface load/save - - - - - 7ef7e7be by David Waern at 2006-08-14T00:56:07+00:00 Some refactoring - - - - - a7d3efef by David Waern at 2006-08-19T20:07:55+00:00 Adapt to latest GHC - - - - - 5fc3c0d7 by David Waern at 2006-08-20T21:28:11+00:00 Move interface read/write to its own module + some cleanup - - - - - 037e011c by David Waern at 2006-08-20T21:38:24+00:00 Small cleanup - - - - - da3a1023 by David Waern at 2006-09-03T16:05:22+00:00 Change mode to BatchCompile to avoid GHC API bug - - - - - 3cc9be3b by David Waern at 2006-09-03T16:06:59+00:00 Starting work on GADT rendering - - - - - 94506037 by David Waern at 2006-09-03T20:02:48+00:00 Compensate for change of export list order in GHC - - - - - c2cec4eb by David Waern at 2006-09-04T20:53:01+00:00 Rename a function - - - - - 9a9735ba by David Waern at 2006-09-05T15:51:21+00:00 Change version number to 2.0 - - - - - 3758a714 by David Waern at 2006-09-05T15:51:49+00:00 Align comment properly - - - - - 68478d9e by David Waern at 2006-09-15T18:03:00+00:00 Remove interface reading/writing code and use the GHC api for creating package environments instead - - - - - d2eedd95 by David Waern at 2006-09-15T18:05:29+00:00 Change the executable name to haddock-ghc-nolib - - - - - fcfbcf66 by David Waern at 2006-09-15T18:05:45+00:00 Small source code cleanup - - - - - d08eb017 by David Waern at 2006-09-15T18:06:21+00:00 Remove handling of --package flag - - - - - b8a4cf53 by David Waern at 2006-09-15T18:07:16+00:00 Remove commented-out code - - - - - bef0a684 by David Waern at 2006-09-15T18:37:57+00:00 Don't warn about missing links to () - - - - - e7d25fd7 by David Waern at 2006-09-15T19:50:49+00:00 Remove Interface and Binary2 modules - - - - - 9894f2a1 by David Waern at 2006-09-15T19:53:43+00:00 Remove debug printing from HaddockHtml - - - - - a0e7455d by David Waern at 2006-09-16T00:16:29+00:00 Comments only - - - - - d5b26fa7 by David Waern at 2006-09-16T00:16:57+00:00 Refactor PackageData creation code and start on building the doc env propery (unfinished) - - - - - 06aaa779 by David Waern at 2006-09-16T00:19:25+00:00 Better comments in Main.hs - - - - - 1a52d1b4 by David Waern at 2006-09-18T22:17:11+00:00 Comments and spacing change - - - - - e5a97767 by David Waern at 2006-09-21T17:02:45+00:00 Remove unnecessary fmapM import in Main - - - - - 9d0f9d3a by David Waern at 2006-09-22T18:07:07+00:00 Make import list in HaddockHtml prettier - - - - - 3452f662 by David Waern at 2006-09-22T18:08:47+00:00 Refactor context rendering - - - - - 12d0a6d0 by David Waern at 2006-09-22T18:09:52+00:00 Do proper HsType rendering (inser parentheses correctly) - - - - - 2c20c2f9 by David Waern at 2006-09-22T18:10:45+00:00 Fix a bug in Main.toHsType - - - - - c5396443 by David Waern at 2006-09-22T18:11:16+00:00 Skip external package modules sort for now - - - - - 3fb95547 by David Waern at 2006-09-22T20:35:40+00:00 Take away trailin "2" on all previously clashing type names - - - - - 2174755f by David Waern at 2006-09-22T20:51:43+00:00 Remove unused imports in Main - - - - - 1e9f7a39 by David Waern at 2006-09-22T20:52:11+00:00 Fix a comment in Main - - - - - 32d9e028 by David Waern at 2006-10-05T16:40:11+00:00 Merge with changes to ghc HEAD - - - - - 3058c8f5 by David Waern at 2006-10-05T16:41:02+00:00 Comment fixes - - - - - b9c217ec by David Waern at 2006-10-05T16:49:59+00:00 Filter out more builtin type constructors from warning messages - - - - - 67e7d252 by David Waern at 2006-10-05T19:38:22+00:00 Refactoring -- better structured pass1 - - - - - cd21c0c1 by David Waern at 2006-10-05T19:44:42+00:00 Remove read/dump interface flags - - - - - 313f9e69 by David Waern at 2006-10-05T19:49:26+00:00 Remove unused pretty printing - - - - - 480f09d1 by David Waern at 2006-12-28T13:22:24+00:00 Update to build with latest GHC HEAD - - - - - 63dccfcb by David Waern at 2007-01-05T01:38:45+00:00 Fixed a bug so that --ghc-flag works correctly - - - - - 3117dadc by David Waern at 2006-12-29T18:53:39+00:00 Automatically get the GHC lib dir - - - - - 9dc84a5c by David Waern at 2006-12-29T19:58:53+00:00 Comments - - - - - 0b0237cc by David Waern at 2007-01-05T16:48:30+00:00 Collect docs based on SrcLoc, syncing with removal of DeclEntity from GHC - - - - - a962c256 by David Waern at 2007-01-05T17:02:47+00:00 Add tabs in haddock.cabal - - - - - 0ca30c97 by David Waern at 2007-01-05T17:04:11+00:00 Add GHCUtils.hs - - - - - c0ab9abe by David Waern at 2007-01-10T11:43:08+00:00 Change package name to haddock-ghc, version 0.1 - - - - - 38e18b27 by David Waern at 2007-01-12T12:03:52+00:00 No binder name for foreign exports - - - - - d18587ab by David Waern at 2007-01-12T12:08:15+00:00 Temp record - - - - - ba6251a0 by David Waern at 2007-01-12T18:27:55+00:00 Remove read/dump-interface (again) - - - - - f4ba2b39 by David Waern at 2007-01-12T18:31:36+00:00 Remove DocOption, use the GHC type - - - - - 511be8bd by David Waern at 2007-01-12T18:32:41+00:00 Use exceptions instead of Either when loading package info - - - - - 0f2144d8 by David Waern at 2007-01-12T18:33:23+00:00 Small type change - - - - - 77507eb7 by David Waern at 2007-01-12T18:33:59+00:00 Remove interface file read/write - - - - - 0ea1e14f by David Waern at 2007-01-17T21:40:26+00:00 Add trace_ppr to GHCUtils - - - - - 3878b493 by David Waern at 2007-01-17T21:40:53+00:00 Sort external package modules and build a doc env - - - - - 8dc323fc by David Waern at 2007-01-17T21:42:41+00:00 Remove comment - - - - - f4c5b097 by David Waern at 2007-01-18T23:22:18+00:00 Add haddock-ghc.cabal and remove ghc option pragma in source file - - - - - da242b2c by David Waern at 2007-01-18T23:22:46+00:00 Remove some tabs - - - - - 288ed096 by David Waern at 2007-01-18T23:39:28+00:00 Moved the defaultErrorHandler to scope only over sortAndCheckModules for now - - - - - 4dd150fe by David Waern at 2007-02-03T21:23:56+00:00 Let restrictCons handle infix constructors - - - - - 97893442 by David Waern at 2007-02-04T16:26:00+00:00 Render infix data constructors - - - - - da89db72 by David Waern at 2007-02-04T16:26:33+00:00 CHange project name to Haddock-GHC - - - - - e93d48af by David Waern at 2007-02-04T16:59:08+00:00 Render infix type constructors properly - - - - - 357bc99b by David Waern at 2007-02-04T17:37:08+00:00 Insert spaces around infix function names - - - - - ab6cfc49 by David Waern at 2007-02-04T17:59:54+00:00 Do not list entities without documentation - - - - - 04249c7e by David Waern at 2007-02-04T19:16:25+00:00 Add GADT support (quite untested) - - - - - 2c223f8d by David Waern at 2007-02-04T19:25:10+00:00 Add package file write/save again! - - - - - b07ed218 by David Waern at 2007-02-04T19:33:02+00:00 Comment out minf_iface based stuff - - - - - 953d1fa7 by David Waern at 2007-02-05T00:12:23+00:00 Solve conflicts - - - - - 593247fc by David Waern at 2007-02-06T19:48:48+00:00 Remove -package flag, GHC's can be used instead - - - - - f658ded2 by David Waern at 2007-02-06T20:50:44+00:00 Start for support of ATs - - - - - 97f9e913 by David Waern at 2007-02-06T20:52:27+00:00 Wibble - - - - - 2ce8e4cf by David Waern at 2007-02-16T12:09:49+00:00 Add the DocOptions change - - - - - dee4a9b5 by David Waern at 2007-03-06T01:24:48+00:00 Wibble - - - - - 7cb99d18 by David Waern at 2007-03-06T01:24:58+00:00 Change version to 2.0 and executable name to haddock - - - - - c5aa02bc by David Waern at 2007-03-08T15:59:49+00:00 Go back to -B flag - - - - - 3a349201 by David Waern at 2007-03-09T13:31:59+00:00 Better exception handling and parsing of GHC flags - - - - - 05a69b71 by David Waern at 2007-03-09T17:45:44+00:00 Remove commented-out DocEntity printing - - - - - 755032cb by davve at dtek.chalmers.se at 2007-03-23T23:30:20+00:00 Remove a file that shouldn't be here - - - - - a7077e5f by davve at dtek.chalmers.se at 2007-03-24T03:58:48+00:00 Remove an import - - - - - 6f55aa8b by davve at dtek.chalmers.se at 2007-03-25T00:46:48+00:00 Start work on Haddock API - - - - - f0199480 by davve at dtek.chalmers.se at 2007-03-25T00:56:36+00:00 Prettify some comments - - - - - f952f9d1 by davve at dtek.chalmers.se at 2007-03-25T00:56:53+00:00 Remove ppr in HaddockTypes - - - - - bc594904 by davve at dtek.chalmers.se at 2007-03-25T00:57:53+00:00 Remove commented out doc env inference - - - - - 11ebf08d by davve at dtek.chalmers.se at 2007-03-25T01:23:25+00:00 De-flatten the namespace - - - - - f696b4bc by davve at dtek.chalmers.se at 2007-03-25T03:21:48+00:00 Add missing stuff to API - - - - - 9a2a04c3 by davve at dtek.chalmers.se at 2007-03-25T03:22:02+00:00 Wibble - - - - - 7d04a6d5 by davve at dtek.chalmers.se at 2007-03-25T03:22:08+00:00 Avoid a GHC bug with parseStaticFlags [] - - - - - 4d2820ba by davve at dtek.chalmers.se at 2007-03-26T04:57:01+00:00 Add fall-through case to mkExportItem - - - - - 6ebc8950 by Stefan O'Rear at 2007-03-26T04:14:53+00:00 Add shebang line to Setup.lhs - - - - - 80966ec5 by davve at dtek.chalmers.se at 2007-03-26T05:24:26+00:00 Fix stupid compile error - - - - - 1ea1385d by davve at dtek.chalmers.se at 2007-04-05T17:19:56+00:00 Do save/read of interface files properly - - - - - 0e4f6541 by David Waern at 2007-04-10T21:08:36+00:00 Add version to ghc dependency - - - - - b0499b63 by David Waern at 2007-04-10T21:37:08+00:00 Change package name to haddock - - - - - 9d50d27e by David Waern at 2007-04-24T00:22:14+00:00 Use filepath package instead of FilePath - - - - - 87c7fcdf by David Waern at 2007-07-10T21:03:04+00:00 Add new package dependencies - - - - - 4768709c by David Waern at 2007-07-11T20:37:11+00:00 Follow changes to record constructor representation - - - - - b9a02fee by Simon Marlow at 2007-05-30T14:00:48+00:00 update to compile with the latest GHC & Cabal - - - - - c0ebdc01 by David Waern at 2007-07-11T21:35:45+00:00 Fix conflicts - - - - - 97f7afd4 by David Waern at 2007-07-11T21:52:38+00:00 Follow changes to the GHC API - - - - - a5b7b58f by David Waern at 2007-07-12T20:36:48+00:00 Call parseStaticFlags before newSession - - - - - f7f50dbc by David Waern at 2007-08-01T21:52:58+00:00 Better indentation in haddock.cabal - - - - - d84e52ad by David Waern at 2007-08-02T00:08:18+00:00 Wibble - - - - - a23f494a by David Waern at 2007-08-02T00:08:24+00:00 Be better at trying to load all module dependencies (debugging) - - - - - ee917f13 by David Waern at 2007-08-03T18:48:08+00:00 Load all targets explicitly (checkModule doesn't chase dependencies anymore) - - - - - 5182d631 by David Waern at 2007-08-16T16:48:55+00:00 Finalize support for links to other packages - - - - - dfd1e3da by David Waern at 2007-08-16T16:51:11+00:00 Fix haddock comment errors in Haddock.Types - - - - - 50c0d83e by David Waern at 2007-08-16T16:51:37+00:00 Remove a debug import - - - - - d84b7c2b by David Waern at 2007-08-16T17:06:30+00:00 Rename PackageData to HaddockPackage - - - - - 3b52cb9f by David Waern at 2007-08-16T17:09:42+00:00 Simplify some comments - - - - - 66fa68d9 by David Waern at 2007-08-16T17:11:38+00:00 Comment the HaddockPackage definition - - - - - 8674c761 by David Waern at 2007-08-16T17:25:54+00:00 Improve code layout in Main - - - - - 571a3a0b by David Waern at 2007-08-16T17:32:13+00:00 Remove explict module imports in Main - - - - - d31b3cb0 by David Waern at 2007-08-16T17:36:23+00:00 Correct comments - - - - - 7f8a9f2b by David Waern at 2007-08-16T17:39:50+00:00 Fix layout problems in Haddock.Types - - - - - 9f421d7f by David Waern at 2007-08-17T11:16:48+00:00 Move options out of Main into Haddock.Options - - - - - 80042b63 by David Waern at 2007-08-17T11:26:59+00:00 Small comment/layout fixes - - - - - b141b982 by David Waern at 2007-08-17T11:28:28+00:00 Change project name from Haddock-GHC to Haddock - - - - - dbeb4a81 by David Waern at 2007-08-17T11:41:05+00:00 Add top module comment to all files - - - - - ce99cc9e by David Waern at 2007-08-17T14:53:04+00:00 Factor out typechecking phase into Haddock.Typecheck - - - - - 6bf75d9e by David Waern at 2007-08-17T16:55:35+00:00 Factor out package code to Haddock.Packages - - - - - b396db37 by David Waern at 2007-08-29T22:40:23+00:00 Major refactoring - - - - - 3d4f95ee by David Waern at 2007-08-29T23:26:24+00:00 Rename HaddockModule to Interface and a few more refactorings - - - - - c55326db by David Waern at 2007-08-29T23:48:03+00:00 Some comment cleanup - - - - - 9a84fc46 by David Waern at 2007-08-29T23:49:29+00:00 Add some modules that I forgot to add earlier - - - - - 4536dce2 by David Waern at 2007-08-29T23:55:24+00:00 Wibble - - - - - 9b7f0206 by David Waern at 2007-08-30T16:03:29+00:00 Wibble - - - - - c52c050a by David Waern at 2007-08-30T16:30:37+00:00 Rename HaddockModule to Interface - - - - - eae2995f by David Waern at 2007-08-30T16:42:59+00:00 Simplify createInterfaces - - - - - 53f99caa by David Waern at 2007-09-29T00:04:31+00:00 Add build-type: Simple to the cabal file - - - - - 0d3103a8 by David Waern at 2007-09-29T00:04:58+00:00 Add containers and array dependency - - - - - 6acf5f30 by David Waern at 2007-09-29T00:13:36+00:00 Prettify the cabal file - - - - - 87c1e378 by David Waern at 2007-09-29T13:16:39+00:00 FIX: consym data headers with more than two variables - - - - - b67fc16a by David Waern at 2007-09-29T14:01:32+00:00 FIX: prefix types used as operators should be quoted - - - - - a8f925bc by David Waern at 2007-09-29T14:02:26+00:00 Use isSymOcc from OccName instead of isConSym - - - - - fc330701 by David Waern at 2007-09-29T14:15:37+00:00 Use isLexConSym/isLexVarSym from OccName - - - - - e4f3dbad by David Waern at 2007-09-29T15:01:08+00:00 FIX: do not quote varsym type operators - - - - - 402207d2 by David Waern at 2007-09-29T15:01:50+00:00 Wibble - - - - - f9d89ef0 by David Waern at 2007-09-29T15:17:40+00:00 Take care when pp tyvars - add parens on syms - - - - - 849e2a77 by David Waern at 2007-10-01T21:56:39+00:00 Go back to using a ModuleMap instead of LookupMod - fixes a bug - - - - - 549dbac6 by David Waern at 2007-10-02T01:05:19+00:00 Improve parsing of doc options - - - - - a36021b8 by David Waern at 2007-10-02T23:05:00+00:00 FIX: double arrows in constructor contexts - - - - - d03bf347 by David Waern at 2007-10-09T16:14:05+00:00 Add a simple test suite - - - - - c252c140 by David Waern at 2007-10-17T16:02:28+00:00 Add --optghc=.. style flag passing to GHC - - - - - cce6c1b3 by David Waern at 2007-10-18T22:03:20+00:00 Add support for --read-interface again - - - - - 33d059c0 by David Waern at 2007-10-18T22:30:18+00:00 Refactoring -- get rid of Haddock.Packages - - - - - f9ed0a4c by David Waern at 2007-10-18T22:34:36+00:00 Name changes - - - - - 8a1c816f by David Waern at 2007-10-20T14:24:23+00:00 Add --ghc-version option - - - - - 4925aaa1 by David Waern at 2007-10-21T14:34:26+00:00 Add some Outputable utils - - - - - 69e7e47f by David Waern at 2007-10-21T14:35:49+00:00 FIX: Ord for OrdName was not comparing modules - - - - - 5a4ae535 by David Waern at 2007-10-21T21:18:48+00:00 Wibble - - - - - 03d48e20 by David Waern at 2007-10-24T15:52:56+00:00 Remove Main from "other modules" - - - - - c66f6d82 by David Waern at 2007-10-24T16:37:18+00:00 Make it possible to run haddock on itself - - - - - 21d156d8 by David Waern at 2007-10-25T14:02:14+00:00 Don't set boot modules as targets - - - - - f8bcf91c by David Waern at 2007-10-31T22:11:17+00:00 Add optimisation flags - - - - - 7ac758f2 by David Waern at 2007-11-04T09:48:28+00:00 Go back to loading only targets (seems to work now) - - - - - 4862aae1 by David Waern at 2007-11-05T22:24:57+00:00 Do full compilation of modules -- temporary fix for GHC API problem - - - - - 697e1517 by David Waern at 2007-11-05T22:25:50+00:00 Don't warn about not being able to link to wired/system/builtin-names - - - - - 892186da by David Waern at 2007-11-06T00:49:21+00:00 Filter out instances with TyCons that are not exported - - - - - 9548314c by David Waern at 2007-11-06T09:37:14+00:00 Wibble - - - - - 5cafd627 by David Waern at 2007-11-08T01:43:07+00:00 Filter out all non-vanilla type sigs - - - - - 04621830 by David Waern at 2007-11-08T01:45:13+00:00 Synch loading of names from .haddock files with GHC's name cache - - - - - 88d37f77 by David Waern at 2007-11-08T01:46:21+00:00 Remove commented-out code - - - - - 6409c911 by David Waern at 2007-11-08T01:56:00+00:00 Small bugfix and cleanup in getDeclFromTyCls - - - - - af59d9c2 by David Waern at 2007-11-08T02:08:44+00:00 Remove OrdName stuff - - - - - 3a615e2e by David Waern at 2007-11-08T02:13:41+00:00 Update runtests.hs following changes to haddock - - - - - 01f3314e by David Waern at 2007-11-08T02:33:01+00:00 Complain if we can't link to wired-in names - - - - - fcafb5d1 by David Waern at 2007-11-09T02:40:16+00:00 Don't exit when there are no file arguments - - - - - 194bc332 by David Waern at 2007-11-09T02:55:37+00:00 Wibble - - - - - dbe4cb55 by David Waern at 2007-11-09T02:56:14+00:00 Wibble - - - - - 82869fda by David Waern at 2007-11-10T17:01:43+00:00 Introduce InstalledInterface structure and add more stuff to the .haddock files We introduce InstalledInterface capturing the part of Interface that is stored in the interface files. We change the ppHtmlContents and ppHtmllIndex to take this structure instead of a partial Interface. We add stuff like the doc map and exported names to the .haddock file (via InstalledInterface). - - - - - d6bb57bf by David Waern at 2007-11-10T17:19:48+00:00 FIX: contents and index should include external package modules when --gen-contents/--gen-index - - - - - e8814716 by David Waern at 2007-11-11T00:29:27+00:00 Remove lDocLinkName and its use in Html backend - - - - - 6f9bd702 by David Waern at 2007-11-11T00:50:57+00:00 Do some refactoring in the html backend This also merges an old patch by Augustsson: Wed Jul 12 19:54:36 CEST 2006 lennart.augustsson at credit-suisse.com * Print type definitions like signatures if given arrows. - - - - - 09d0ce24 by Malcolm.Wallace at 2006-07-20T13:13:57+00:00 mention HsColour in the docs, next to option flags for linking to source code - - - - - 24da6c34 by Malcolm.Wallace at 2006-07-20T13:14:50+00:00 change doc references to CVS to give darcs repository location instead - - - - - 74d52cd6 by David Waern at 2007-11-11T00:55:33+00:00 Update copyright - - - - - fcaa3b4f by Duncan Coutts at 2006-09-08T13:41:00+00:00 Eliminate dep on network by doing a little cut'n'paste haddock depending on the network causes a circular dependency at least if you want to build the network lib with haddock docs. - - - - - 10cc9bda by David Waern at 2007-11-11T02:09:41+00:00 Fix conflicts - - - - - 4e3acd39 by David Waern at 2007-11-11T02:21:19+00:00 Manual merge of a patch from Duncan Coutts that removes the dependency on mtl - - - - - fa9070da by Neil Mitchell at 2006-09-29T15:52:03+00:00 Do not generate an empty table if there are no exports, this fixes a <table></table> tag being generated, which is not valid HTML 4.01 - - - - - d7431c85 by David Waern at 2007-11-11T02:28:50+00:00 Fix conflicts - - - - - f87e8f98 by Simon Marlow at 2006-10-10T11:37:16+00:00 changes for 0.8 - - - - - db929565 by Simon Marlow at 2006-10-10T12:07:12+00:00 fix the name of the source file - - - - - 8220aa4b by Simon Marlow at 2006-10-11T14:17:37+00:00 Rename haddock.js to haddock-util.js haddock.js will be run automatically by Windows when you type 'haddock' if it is found on the PATH, so rename to avoid confusion. Spotted by Adrian Hey. - - - - - 6bccdaa1 by sven.panne at 2006-10-12T15:28:23+00:00 Cabal's sdist does not generate "-src.tar.gz" files, but ".tar.gz" ones - - - - - d3f3fc19 by Simon Marlow at 2006-12-06T16:05:07+00:00 add todo item for --maintainer - - - - - 2da7e269 by Simon Marlow at 2006-12-15T15:52:00+00:00 TODO: do something better about re-exported symbols from another package - - - - - 42d85549 by David Waern at 2007-11-11T02:30:59+00:00 Fix conflicts - - - - - 5e7ef6e5 by Neil Mitchell at 2007-01-11T15:41:15+00:00 Never do spliting index files into many - - - - - f3d4aebe by Neil Mitchell at 2007-01-11T17:07:09+00:00 Add searching on the index page - - - - - bad3ab66 by Neil Mitchell at 2007-01-11T18:17:46+00:00 Delete dead code, now there is only one index page - - - - - cd09eedb by Neil Mitchell at 2007-01-11T18:21:19+00:00 Delete more stuff that is no longer required - - - - - e2806646 by David Waern at 2007-11-11T02:41:53+00:00 Fix conflicts - - - - - a872a823 by Neil Mitchell at 2007-01-11T18:51:43+00:00 Make the index be in case-insensitive alphabetic order - - - - - 8bddd9d7 by Neil Mitchell at 2007-02-06T17:49:12+00:00 Do not create empty tables for data declarations which don't have any constructors, instances or comments. Gets better HTML 4.01 compliance - - - - - 036b8120 by David Waern at 2007-11-11T02:56:58+00:00 Fix conflicts - - - - - f50c1639 by Conal Elliott at 2007-02-14T21:54:00+00:00 added substitution %{FILE///c} - - - - - 402e166a by David Waern at 2007-11-11T03:35:46+00:00 Manual merge of old patch: Sat Apr 21 04:36:43 CEST 2007 Roberto Zunino <zunrob at users.sf.net> * URL expansion for %%, %L, %{LINE} - - - - - 2f264fbd by David Waern at 2007-11-11T03:40:33+00:00 Manual merge of an old patch: Thu Apr 19 20:23:40 CEST 2007 Wolfgang Jeltsch <g9ks157k at acme.softbase.org> * bug fix When Haddock was invoked with the --ignore-all-exports flag but the ignore-exports module attribute wasn't used, hyperlinks weren't created for non-exported names. This fix might not be as clean as one would wish (since --ignore-all-exports now results in ignore_all_exports = True *and* an additional OptIgnoreExports option for every module) but at least the bug seems to be resolved now. - - - - - 7d7ae106 by sven.panne at 2007-09-02T12:18:02+00:00 Install LICENSE in the correct place - - - - - 66eaa924 by David Waern at 2007-11-11T19:02:46+00:00 Fix a bug that made haddock loop - - - - - 4ed47b58 by David Waern at 2007-11-11T19:03:09+00:00 Rename java-script file (this wasn't merge correctly) - - - - - d569534a by David Waern at 2007-11-11T19:06:44+00:00 Don't require -B <ghc-libdir> when no argument files Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B <ghc-libdir> to Haddock when there're no source files to process. This is nice when computing contents/index for external packages. - - - - - 373368bc by Neil Mitchell at 2007-01-11T18:22:44+00:00 Change from tabs to spaces in the ppHtmlIndex function - - - - - 6b063a77 by Neil Mitchell at 2007-01-12T12:17:46+00:00 Rewrite much of the index searching code, previously was too slow to execute on the base library with IE, the new version guarantees less than O(log n) operations be performed, where n is the number in the list (before was always O(n)) - - - - - bfad00b7 by David Waern at 2007-11-11T23:33:53+00:00 Fix conflicts - - - - - cd2dcc09 by Neil Mitchell at 2007-01-12T12:25:01+00:00 Make the max number of results 75 instead of 50, to allow map searching in the base library to work - - - - - 3ae74764 by Neil Mitchell at 2007-01-12T12:58:17+00:00 Make the search box in a form so that enter does the default search - - - - - 142103e5 by David Waern at 2007-11-12T00:03:18+00:00 Merge patch from the old branch: Fri Aug 31 13:21:45 CEST 2007 Duncan Coutts <duncan at haskell.org> * Add category: Development to .cabal file Otherwise it appears on the hackage website in the "Unclassified" category. - - - - - 22ec2ddb by David Waern at 2007-11-25T01:55:29+00:00 A a list of small improvements to the TODO file - - - - - eb0129f4 by Wolfgang Jeltsch at 2007-12-03T23:47:55+00:00 addition of type equality support (at least for HTML generation) - - - - - 816a7e22 by David Waern at 2007-12-08T15:46:26+00:00 Handle class operators correctly when rendering predicates - - - - - 68baaad2 by David Waern at 2007-12-08T16:15:54+00:00 Code layout changes - - - - - 09b77fb4 by David Waern at 2007-12-08T16:16:03+00:00 Handle infix operators correctly in the Type -> HsType translation - - - - - 31c36da2 by David Waern at 2007-12-08T16:24:27+00:00 Add ppLParendTypes/ppLParendType - - - - - b17cc818 by David Waern at 2007-12-08T16:26:12+00:00 Use ppParendType when printing types args in predicates - - - - - ffd1f2cf by David Waern at 2007-12-08T16:45:06+00:00 Fix rendering of instance heads to handle infix operators This is also a refactoring to share this code for rendering predicates. - - - - - ff886d45 by David Waern at 2007-12-08T17:27:46+00:00 Fix rendering of class operators - - - - - e2fcbb9e by David Waern at 2007-12-08T17:59:28+00:00 Fix a bug (use ppTyName instead of ppName to print names in type apps) - - - - - 79a1056e by David Waern at 2007-12-08T21:25:18+00:00 Update tests - - - - - 867741ac by David Waern at 2007-12-08T21:25:49+00:00 Give a diff on test failure - - - - - 7e5eb274 by David Waern at 2008-01-05T14:33:45+00:00 Add DrIFT commands - - - - - 3656454d by David Waern at 2008-01-05T20:26:00+00:00 Add "cabal-version: >= 1.2" to the cabal file - - - - - 77974efc by Simon Marlow at 2007-12-20T09:52:44+00:00 add an item - - - - - f6ac1708 by Simon Marlow at 2007-12-06T14:00:10+00:00 Source links must point to the original module, not the referring module - - - - - eda1d5c9 by David Waern at 2008-01-06T14:40:52+00:00 Manual merge of a patch to the 0.8 branch Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar at microsoft.com> * Source links must point to the original module, not the referring module - - - - - 378f4085 by David Waern at 2008-01-06T16:03:45+00:00 Change stability from stable to experimental - - - - - 8bdafe44 by David Waern at 2008-01-06T16:14:22+00:00 Add haskell.vim (it had been removed somehow) - - - - - ea34d02e by David Waern at 2008-01-06T16:36:57+00:00 Change version to 2.0.0.0 - - - - - 34631ac0 by David Waern at 2008-01-06T16:44:57+00:00 Add missing modules to the cabal file - - - - - 9e142935 by David Waern at 2008-01-06T17:25:42+00:00 Depend on ghc >= 6.8.2 && < 6.9 - - - - - 59f9eeaa by Simon Marlow at 2007-12-20T10:43:04+00:00 add build scripts - - - - - 1c29ae30 by Simon Marlow at 2007-12-20T10:47:07+00:00 update version number - - - - - fe16a3e4 by Simon Marlow at 2007-12-20T10:48:03+00:00 update version - - - - - f688530f by Simon Marlow at 2007-12-20T10:48:29+00:00 doc updates - - - - - ce71b611 by David Waern at 2008-01-07T13:46:32+00:00 Change version in docs and spec - - - - - 03ab8d6f by David Waern at 2008-01-07T13:47:38+00:00 Manually merge over changes to CHANGES for 0.9 - - - - - 39f1b042 by David Waern at 2008-01-07T15:17:41+00:00 Remove the -use-package flag, we don't support it anyway - - - - - 7274a544 by David Waern at 2008-01-07T15:33:05+00:00 Update CHANGES for 2.0.0.0 - - - - - 96594f5d by David Waern at 2008-01-07T15:46:49+00:00 Wibble - - - - - f4c5a4c4 by David Waern at 2008-01-07T15:55:36+00:00 Change url to repo in documentation - - - - - 8a4c77f0 by David Waern at 2008-01-07T16:00:54+00:00 Update CHANGES - - - - - cb3a9288 by David Waern at 2008-01-07T16:02:55+00:00 Documentation fix - - - - - d8e45539 by David Waern at 2008-01-07T16:12:00+00:00 Update docs to say that Haddock accets .lhs files and module names - - - - - 4b5ce824 by David Waern at 2008-01-07T16:12:25+00:00 Document -B option - - - - - 47274262 by David Waern at 2008-01-07T16:23:07+00:00 Update CHANGES - - - - - 7ff314a9 by David Waern at 2008-01-07T16:23:20+00:00 Remove --use-package, --package & --no-implicit.. flags from docs - - - - - 6c3819c0 by David Waern at 2008-01-07T16:23:52+00:00 Remove --no-implicit-prelide flag - - - - - 1b14ae40 by David Waern at 2008-01-07T16:32:26+00:00 Update the "Using literate or pre-processed source" section - - - - - 0117f620 by David Waern at 2008-01-07T16:41:55+00:00 Document the --optghc flag - - - - - 087ab1cf by David Waern at 2008-01-07T16:42:10+00:00 Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 - - - - - 7253951e by David Waern at 2008-01-07T16:48:40+00:00 Document OPTIONS_HADDOCK - - - - - 3b6bdcf6 by David Waern at 2008-01-07T16:56:54+00:00 Wibble - - - - - 3025adf9 by David Waern at 2008-01-07T17:08:14+00:00 Wibble - - - - - 5f30f1a0 by David Waern at 2008-01-07T17:15:44+00:00 Change synopsis field to description - - - - - 1673f54b by David Waern at 2008-01-07T17:18:21+00:00 Change my email address in the cabal file - - - - - 55aa9808 by David Waern at 2008-01-07T18:18:02+00:00 Add documentation for readInterfaceFile - - - - - eaea417f by David Waern at 2008-01-07T18:21:30+00:00 Export necessary stuff from Distribution.Haddock - - - - - 7ea18759 by David Waern at 2008-01-07T18:31:49+00:00 Remove dep on Cabal - - - - - 7b79c74e by David Waern at 2008-01-07T18:33:49+00:00 Remove dep on process - - - - - ce3054e6 by David Waern at 2008-01-16T23:01:21+00:00 Add feature-requsts from Henning Thielemann to TODO - - - - - 0c08f1ec by David Waern at 2008-01-16T23:03:02+00:00 Record a bug in TODO - - - - - b04605f3 by David Waern at 2008-01-23T16:59:06+00:00 Add a bug reported by Ross to TODO - - - - - 5b17c030 by David Waern at 2008-01-23T18:05:53+00:00 A a bug report to TODO - - - - - 1c993b0d by David Waern at 2008-01-25T16:30:25+00:00 Accept test output - - - - - c22fc0d0 by David Waern at 2008-01-25T16:34:49+00:00 Accept test output - - - - - 4b795811 by David Waern at 2008-01-25T16:38:37+00:00 Change Hidden.hs (test) to use OPTIONS_HADDOCK - - - - - c124dbd9 by David Waern at 2008-01-25T16:39:23+00:00 Accept test output - - - - - ec6f6eea by David Waern at 2008-01-25T16:42:08+00:00 Add Hidden.html.ref to tests - - - - - 1dc9610c by David Waern at 2008-02-02T20:50:51+00:00 Add a comment about UNPACK bug in TODO - - - - - 2d3f7081 by David Waern at 2008-02-09T22:33:24+00:00 Change the representation of DocNames Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented. - - - - - 0f28c921 by David Waern at 2008-02-09T23:00:36+00:00 H.GHC.Utils: remove unused imports/exports - - - - - 0c44cad5 by David Waern at 2008-02-10T00:28:13+00:00 H.GHC.Utils: add some functions that were removed by mistake - - - - - e3452f49 by David Waern at 2008-02-10T00:28:48+00:00 Fix some trivial warnings in H.InterfaceFile - - - - - a6d74644 by David Waern at 2008-02-10T00:48:06+00:00 Update the version message to fit in small terminals - - - - - 76c9cd3e by David Waern at 2008-02-10T14:47:39+00:00 Remove bugs from TODO that don't apply anymore since the port - - - - - 5e10e090 by David Waern at 2008-02-10T15:22:47+00:00 Remove bugs from TODO that weren't actual bugs - - - - - fef70878 by David Waern at 2008-02-10T15:23:44+00:00 Remove yet another item from TODO that was not an actual bug - - - - - e1af47b8 by David Waern at 2008-02-11T10:25:57+00:00 Bump the version number to 2.1.0 Since the exported datatype DocName has changed, we need to bump the major version number. Let's also drop the fourth version component, it's not that useful. - - - - - e3be7825 by David Waern at 2008-04-11T14:29:04+00:00 Add a bug to TODO - - - - - cb6574be by David Waern at 2008-04-11T16:00:45+00:00 Use the in-place haddock when running tests - - - - - c6d7af0d by David Waern at 2008-04-11T16:09:16+00:00 Turn off GHC warnings when running tests - - - - - 7f61b546 by David Waern at 2008-04-11T17:24:00+00:00 Add a flag for turning off all warnings - - - - - 883b8422 by David Waern at 2008-04-12T14:02:18+00:00 Fix printing of data binders - - - - - 2a0db8fc by David Waern at 2008-04-12T18:52:46+00:00 Fix missing parenthesis in constructor args bug - - - - - 1b3ac3f9 by David Waern at 2008-04-12T18:57:23+00:00 Simplify test suite and add tests I move all tests into one single directory to simplify things, and add a test for the last bug that was fixed. - - - - - 8f178376 by David Waern at 2008-04-12T19:00:15+00:00 Add a script for copying test output to "expected" output - - - - - 193e3a03 by David Waern at 2008-04-12T19:16:37+00:00 Remove two fixed bugs from TODO - - - - - ddc9130c by David Waern at 2008-04-12T19:37:06+00:00 Update test README - - - - - 956069c0 by David Waern at 2008-05-01T12:16:14+00:00 Update version number in spec and docs - - - - - 5478621c by David Waern at 2008-05-01T12:28:12+00:00 Remove claim of backwards compatibility from docs for readInterfaceFile - - - - - 4a16dea9 by David Waern at 2008-05-01T12:33:04+00:00 Update CHANGES - - - - - 804216fb by David Waern at 2008-05-01T12:43:16+00:00 Add a synopsis - - - - - fd0c84d5 by David Waern at 2008-05-01T12:44:44+00:00 Add Haddock.DocName to the cabal file - - - - - 9f4a7439 by David Waern at 2008-05-01T12:45:53+00:00 Remove -fglasgow-exts and -fasm - - - - - aee7c145 by David Waern at 2008-05-01T12:54:01+00:00 Add LANGUAGE pragmas to source files - - - - - 9a58428b by David Waern at 2008-05-01T12:54:19+00:00 Add extensions to cabal file - - - - - 494f1bee by David Waern at 2008-05-01T13:12:09+00:00 Export DocName in the API - - - - - c938196b by David Waern at 2008-05-01T13:12:19+00:00 Add hide options to some source files - - - - - 236e86af by Neil Mitchell at 2008-06-07T20:45:10+00:00 Rewrite the --hoogle flag support - - - - - 6d910950 by Neil Mitchell at 2008-06-14T10:56:50+00:00 Simplify the newtype/data outputting in Hoogle, as haddock does it automatically - - - - - f87a95a8 by Neil Mitchell at 2008-06-14T12:10:18+00:00 Add initial structure for outputting documentation as well, but does not yet output anything - - - - - 7c3bce54 by Neil Mitchell at 2008-06-14T12:27:07+00:00 Remove <document comment> from the Hoogle output - - - - - 9504a325 by Neil Mitchell at 2008-06-16T06:33:21+00:00 Default to "main" if there is no package, otherwise will clobber hoogle's hoogle info - - - - - 4a794a79 by Neil Mitchell at 2008-06-16T06:53:29+00:00 Change packageName to packageStr, as it better reflects the information stored in it - - - - - 7abc9baf by Neil Mitchell at 2008-06-16T07:09:49+00:00 Add modulePkgInfo to Haddock.GHC.Utils, which gives back package name and version info - - - - - 8ca11514 by Neil Mitchell at 2008-06-16T07:13:48+00:00 Change Hoogle to take the package name and package version separately - - - - - a6da452d by Neil Mitchell at 2008-06-18T11:29:46+00:00 In Hoogle do not list things that are not local to this module - - - - - 974b76b7 by David Waern at 2008-06-19T18:40:13+00:00 Be more consistent with GHC API naming in H.GHC.Utils - - - - - 2facb4eb by David Waern at 2008-06-19T19:03:03+00:00 Update test output - - - - - c501de72 by David Waern at 2008-06-26T20:26:49+00:00 Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. - - - - - ac4c6836 by David Waern at 2008-06-26T20:33:08+00:00 Update CHANGES - - - - - 9d21c60a by David Waern at 2008-06-26T20:34:53+00:00 Update README - - - - - 741448f0 by David Waern at 2008-06-26T21:12:57+00:00 Improve wording in the help message - - - - - b1b42b11 by David Waern at 2008-06-30T10:16:17+00:00 Rename ForeignType - - - - - 6d6c2b34 by David Waern at 2008-06-30T10:25:09+00:00 Rename TyFamily - - - - - 8d1125ed by David Waern at 2008-06-30T10:37:21+00:00 Rename type patterns - - - - - 7610a4cb by David Waern at 2008-06-30T10:45:07+00:00 Rename associated types - - - - - 8eeba14c by David Waern at 2008-06-30T10:47:41+00:00 Remove the TODO file now that we have a trac - - - - - 1af5b25b by David Waern at 2008-07-02T18:19:28+00:00 Render type family declarations (untested) - - - - - ceb99797 by David Waern at 2008-07-02T18:24:06+00:00 Remove redundant check for summary when rendering data types - - - - - b36a58e0 by David Waern at 2008-07-02T22:01:38+00:00 More support for type families and associated types Now we just need to render the instances - - - - - 78784879 by David Waern at 2008-07-07T22:13:58+00:00 Remove filtering of instances We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later. - - - - - 3e758dad by David Waern at 2008-06-30T18:50:30+00:00 Run haddock in-place during testing - - - - - d9dab0ce by David Waern at 2008-07-08T21:04:32+00:00 Remove index.html and doc-index.html from output, they should not be versioned - - - - - 3e6c4681 by David Waern at 2008-07-08T21:06:42+00:00 Update test output following change to instance filtering - - - - - e34a3f14 by David Waern at 2008-07-12T16:48:28+00:00 Stop using the map from exported names to declarations During creation of the interface, we were using two maps: one from exported names to declarations, and one from all defined names in the module to declarations. The first contained subordinate names while the second one didn't. The first map was never used to look up names not defined in the associated module, so if we add subordinate names to the second map, we could use it everywhere. That's that this patch does. This simplifies code because we don't have to pass around two maps everywhere. We now store the map from locally defined things in the interface structure instead of the one from exported names. - - - - - 2e1d2766 by David Waern at 2008-07-12T16:55:21+00:00 Get the all locally defined names from GHC API We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API. - - - - - bf637994 by David Waern at 2008-07-13T13:09:16+00:00 Refactoring in H.Interface.Create We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names). - - - - - 547e410e by David Waern at 2008-07-13T13:34:51+00:00 Remove FastString import and FSLIT macro in H.I.Create -- they were unused - - - - - 693759d1 by David Waern at 2008-07-13T13:36:23+00:00 Remove unused import from H.I.Create - - - - - cde6e7fb by David Waern at 2008-07-13T13:51:54+00:00 Small touches - - - - - 96de8f1d by David Waern at 2008-07-20T11:21:46+00:00 Preparation for rendering instances as separate declarations We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet. - - - - - b0f824fb by David Waern at 2008-07-20T15:53:08+00:00 Follow changes to ExportDecl in Hoogle - - - - - 1192eff3 by Neil Mitchell at 2008-06-26T00:28:10+00:00 Change how the Hoogle backend outputs classes, adding the context in - - - - - 7a0d1464 by Neil Mitchell at 2008-06-26T00:28:46+00:00 Remove the indent utility function from Hoogle backend - - - - - 3361241b by Neil Mitchell at 2008-06-26T09:45:09+00:00 Add support for Hoogle writing ForeignImport/ForeignExport properly - - - - - 795ad3bf by Neil Mitchell at 2008-06-26T12:15:25+00:00 Flesh out the Hoogle code to render documentation - - - - - 23277995 by Neil Mitchell at 2008-06-26T14:56:41+00:00 Fix a bug in the Hoogle backend, unordered lists were being written out <ul>...</u> - - - - - db739b27 by Neil Mitchell at 2008-06-26T15:09:54+00:00 Remove any white space around a <li> element - - - - - f2e6bb8c by Neil Mitchell at 2008-07-10T15:30:47+00:00 Remove the TODO in the Hoogle HTML generation, was already done - - - - - 693ec9a3 by Neil Mitchell at 2008-07-10T15:53:00+00:00 Put brackets round operators in more places in the Hoogle output - - - - - 842313aa by Neil Mitchell at 2008-07-10T16:01:25+00:00 Print type signatures with brackets around the name - - - - - cf93deb0 by David Waern at 2008-07-20T17:04:22+00:00 Bump version number to 2.2.0 - - - - - 30e6a8d1 by David Waern at 2008-07-20T17:04:41+00:00 Resolve conflicts in H.B.Hoogle - - - - - 1f0071c9 by David Waern at 2008-07-23T23:05:01+00:00 Add "all" command to runtests.hs that runs all tests despite failures - - - - - f2723023 by David Waern at 2008-07-23T23:08:39+00:00 Update tests/README - - - - - c0304a11 by David Waern at 2008-07-23T23:21:15+00:00 Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. - - - - - 88a5fe71 by David Waern at 2008-07-23T23:54:16+00:00 Depend on the currently available ghc-paths versions only - - - - - 8738d97b by David Waern at 2008-07-24T10:50:44+00:00 FIX haskell/haddock#44: Propagate parenthesis level when printing documented types - - - - - 05339119 by David Waern at 2008-07-24T16:06:18+00:00 Drop unnecessary parenthesis in types, put in by the user We were putting in parenthesis were the user did. Let's remove this since it just clutters up the types. The types are readable anyway since we print parens around infix operators and do not rely on fixity levels. When doing this I discovered that we were relying on user parenthesis when printin types like (a `O` b) c. This patchs fixes this problem so that parenthesis are always inserted around an infix op application in case it is applied to further arguments, or if it's an arguments to a type constructor. Tests are updated. - - - - - b3a99828 by David Waern at 2008-07-24T10:19:43+00:00 Print parenthesis around non-atomic banged types Fixes half of haskell/haddock#44 - - - - - ab5238e0 by David Waern at 2008-07-24T22:07:49+00:00 Add a reference file for the TypeFamilies test - - - - - 1941cc11 by David Waern at 2008-07-25T17:15:53+00:00 Simplify definition of pretty and trace_ppr - - - - - e3bfa33c by David Waern at 2008-07-25T17:18:27+00:00 Warning messages Output a warning when filtering out data/type instances and associated types in instances. We don't show these in the documentation yet, and we need to let the user know. - - - - - 9b85fc89 by David Waern at 2008-07-25T17:45:40+00:00 Doc: Mention Hoogle in the Introduction - - - - - afb2dd60 by David Waern at 2008-07-25T17:49:00+00:00 Doc: update -B description - - - - - 584c0c91 by David Waern at 2008-07-25T18:11:38+00:00 Doc: describe -w flag - - - - - 77619c24 by David Waern at 2008-07-28T12:29:07+00:00 Remove TODO from cabal file - - - - - 96717d5f by David Waern at 2008-07-28T12:29:27+00:00 Support type equality predicates - - - - - c2fd2330 by David Waern at 2008-07-29T19:45:14+00:00 Move unL from H.B.Hoogle to H.GHC.Utils I like Neil's shorter unL better than unLoc from the GHC API. - - - - - c4c3bf6a by David Waern at 2008-07-29T19:47:36+00:00 Do not export ATs when not in list of subitems - - - - - bf9a7b85 by David Waern at 2008-08-03T11:42:59+00:00 Filter out ForeignExports - - - - - df59fcb0 by David Waern at 2008-08-03T14:02:51+00:00 Filter out more declarations The previous refactorings in H.I.Create introduced a few bugs. Filtering of some types of declarations that we don't handle was removed. This patch fixes this. - - - - - 2f8a958b by David Waern at 2008-08-03T15:24:07+00:00 Move reL to H.GHC.Utils so we can use it everywhere - - - - - 8ec15efd by David Waern at 2008-08-03T15:25:00+00:00 Use isVanillaLSig from GHC API instead of home brewn function - - - - - 300f93a2 by David Waern at 2008-08-03T15:25:27+00:00 Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. - - - - - 8776d1ec by David Waern at 2008-08-03T16:21:21+00:00 Filter out more declarations and keep only vanilla type sigs in classes - - - - - ea07eada by David Waern at 2008-08-03T16:48:00+00:00 Fix layout - - - - - dd5e8199 by David Waern at 2008-08-03T16:50:52+00:00 Move some utility functions from H.I.Create to H.GHC.Utils - - - - - 4a1dbd72 by David Waern at 2008-08-03T17:39:55+00:00 Do not filter out doc declarations - - - - - 0bc8dca4 by David Waern at 2008-08-03T17:47:26+00:00 Filter out separately exported ATs (take two) - - - - - af970fe8 by David Waern at 2008-08-03T22:39:17+00:00 Update CHANGES - - - - - 5436ad24 by David Waern at 2008-08-03T22:40:20+00:00 Bump version number to 2.2.1 - - - - - d66de448 by David Waern at 2008-08-05T19:00:32+00:00 Remove version restriction on ghc-paths - - - - - 534b1364 by David Waern at 2008-08-05T19:04:35+00:00 Bump version to 2.2.2 and update CHANGES - - - - - 549188ff by David Waern at 2008-08-05T19:16:49+00:00 Fix CHANGES - - - - - 0d156bb4 by Luke Plant at 2008-08-11T15:20:59+00:00 invoking haddock clarification and help - - - - - 748295cc by David Waern at 2008-08-11T18:56:37+00:00 Doc: say that the --hoogle option is functional - - - - - 43301db4 by David Waern at 2008-08-05T19:26:08+00:00 Change ghc version dependency to >= 6.8.2 - - - - - 3e5a53b6 by David Waern at 2008-08-10T22:42:05+00:00 Make H.GHC.Utils build with GHC HEAD - - - - - 7568ace0 by David Waern at 2008-08-11T19:41:54+00:00 Import Control.OldException instead of C.Exception when using ghc >= 6.9 We should really test for base version instead, but I don't currently know which version to test for. - - - - - b71ae991 by David Waern at 2008-08-12T22:40:39+00:00 Make our .haddock file version number depend on the GHC version We need to do this, since our .haddock format can potentially change whenever GHC's version changes (even when only the patchlevel changes). - - - - - 6307ce3f by David Waern at 2008-08-12T22:49:57+00:00 Remove matching on NoteTy in AttachInstances, it has been removed - - - - - 2dbcfd5f by David Waern at 2008-08-12T23:02:02+00:00 Comment out H.GHC.loadPackages - it is unused and doesn't build with ghc >= 6.9 - - - - - c74db5c2 by David Waern at 2008-08-12T23:03:58+00:00 Hide <.> from GHC import in Hoogle only for ghc <= 6.8.3 - - - - - 69a44ebb by David Waern at 2008-08-12T23:11:12+00:00 Follow changes to parseDynamic/StaticFlags - - - - - 5881f3f0 by David Waern at 2008-08-13T21:43:58+00:00 Add __GHC_PATCHLEVEL__ symbol also when building the library - - - - - 8574dc11 by David Waern at 2008-08-13T21:44:17+00:00 Follow move of package string functions from PackageConfig to Module - - - - - c9baa77f by David Waern at 2008-08-13T21:45:29+00:00 Follow extensible exceptions changes - - - - - 9092de15 by David Waern at 2008-08-13T21:46:20+00:00 Update test following Haddock version change - - - - - ebe569a4 by David Waern at 2008-08-13T21:46:54+00:00 Follow changes to parseDynamic- parseStaticFlags in GHC - - - - - b8a5ffd3 by David Waern at 2008-08-13T21:47:36+00:00 Follow changes to Binary in GHC 6.9 - - - - - edfda1cc by David Waern at 2008-08-13T21:50:17+00:00 Change ghc version dependency to >= 6.8.2 && <= 6.9 - - - - - d59be1cf by Neil Mitchell at 2008-08-12T16:02:53+00:00 Output all items, even if they are not defined in this module - ensures map comes from Prelude, not just GHC.Base - - - - - dda93b9f by Neil Mitchell at 2008-08-12T21:37:32+00:00 Add support for type synonyms to Hoogle, was accidentally missing before (woops!) - - - - - b6ee795c by Neil Mitchell at 2008-08-13T14:03:24+00:00 Generalise Hoogle.doc and add a docWith - - - - - 415e1bb2 by Neil Mitchell at 2008-08-13T14:03:46+00:00 Make Hoogle add documentation to a package - - - - - 790a1202 by Neil Mitchell at 2008-08-18T12:52:43+00:00 Use the same method to put out signatures as class methods in the Hoogle backend - - - - - ded37eba by Neil Mitchell at 2008-08-18T12:53:04+00:00 Remove Explicit top-level forall's when pretty-printing signatures - - - - - 6468c722 by Neil Mitchell at 2008-08-20T07:59:13+00:00 Simplify the code by removing not-to-important use of <.> in the Hoogle back end - - - - - 788c3a8b by Neil Mitchell at 2008-08-21T18:20:24+00:00 In the hoogle back end, markup definition lists using <i>, not <b> - - - - - 77d4b000 by Ian Lynagh at 2008-08-14T10:49:14+00:00 Add a Makefile for GHC's build system. Still won't work yet, but we're closer - - - - - 920440d7 by Ian Lynagh at 2008-08-27T18:06:46+00:00 Add haddock.wrapper - - - - - bcda925f by Ian Lynagh at 2008-08-27T18:07:02+00:00 Add a manual Cabal flag to control the ghc-paths dependency - - - - - 04d194e2 by Ian Lynagh at 2008-08-27T20:41:27+00:00 Update extensions in Cabal file Use ScopedTypeVariables instead of PatternSignatures - - - - - 12480043 by Ian Lynagh at 2008-08-27T20:41:55+00:00 Increase the upper bound on the GHC version number - - - - - b1f809a5 by Ian Lynagh at 2008-08-27T21:32:22+00:00 Fix some warnings - - - - - aea0453d by Ian Lynagh at 2008-08-28T14:22:29+00:00 Fixes for using haddock in a GHC build tree - - - - - ad23bf86 by Ian Lynagh at 2008-08-28T21:14:27+00:00 Don't use Cabal wrappers on Windows - - - - - 35858e4c by Ian Lynagh at 2008-08-29T00:07:42+00:00 Fix in-tree haddock on Windows - - - - - c2642066 by Ian Lynagh at 2008-09-03T22:35:53+00:00 follow library changes - - - - - 2eb55d50 by Ian Lynagh at 2008-09-07T18:52:51+00:00 bindist fixes - - - - - 3daa5b59 by Ian Lynagh at 2008-09-10T16:58:18+00:00 We need to tell haddock that its datasubdir is . or it can't find package.conf - - - - - 388fd8c2 by Ian Lynagh at 2008-09-10T19:47:44+00:00 Fix haddock inplace on Windows - - - - - 70a641c1 by Ian Lynagh at 2008-09-10T22:15:44+00:00 Fix installed haddock on Windows - - - - - 83c1e997 by Neil Mitchell at 2008-09-11T10:48:55+00:00 Import GHC.Paths if not IN_GHC_TREE, seems to match the use of GHC.Paths functions much better - - - - - b452519b by Ian Lynagh at 2008-09-12T12:58:24+00:00 Add a LANGUAGE ForeignFunctionInterface pragma - - - - - afbd592c by Ian Lynagh at 2008-09-12T12:59:13+00:00 Wibble imports - - - - - 547ac4ad by Ian Lynagh at 2008-09-14T15:34:22+00:00 Add a "#!/bin/sh" to haddock.wrapper - - - - - f207a807 by Ian Lynagh at 2008-09-15T10:02:32+00:00 Use "exec" when calling haddock in the wrapper - - - - - 2ee68509 by Thomas Schilling at 2008-09-15T09:09:16+00:00 Port Haddock.Interface to new GHC API. This required one bigger change: 'readInterfaceFile' used to take an optional 'Session' argument. This was used to optionally update the name cache of an existing GHC session. This does not work with the new GHC API, because an active session requires the function to return a 'GhcMonad' action, but this is not possible if no session is provided. The solution is to use an argument of functions for reading and updating the name cache and to make the function work for any monad that embeds IO, so it's result type can adapt to the calling context. While refactoring, I tried to make the code a little more self-documenting, mostly turning comments into function names. - - - - - 3bb96431 by Thomas Schilling at 2008-09-15T09:09:37+00:00 Reflect GHC API changes. - - - - - 2e60f714 by Thomas Schilling at 2008-09-15T09:10:37+00:00 Port Haddock.GHC.Typecheck to new GHC API. - - - - - 9cfd4cff by Thomas Schilling at 2008-09-15T09:11:00+00:00 Port Haddock.GHC to new GHC API. - - - - - caffa003 by Thomas Schilling at 2008-09-15T09:11:25+00:00 Port Main to new GHC API. - - - - - 069a4608 by Ian Lynagh at 2008-09-21T11:19:00+00:00 Fix paths used on Windows frmo a GHC tree: There is no whare directory - - - - - 7ceee1f7 by Ian Lynagh at 2008-09-21T12:20:16+00:00 Fix the in-tree haddock on Windows - - - - - 0d486514 by Ian Lynagh at 2008-09-23T18:06:58+00:00 Increase the GHC upper bound from 6.11 to 6.13 - - - - - f092c414 by Neil Mitchell at 2008-09-11T14:56:07+00:00 Do not wrap __ in brackets - - - - - 036bdd13 by Ian Lynagh at 2008-09-28T01:42:35+00:00 Fix building haddock when GhcProfiled=YES - - - - - 01434a89 by David Waern at 2008-09-24T20:24:21+00:00 Add PatternSignatures LANGUAGE pragma to Main and Utils - - - - - 1671a750 by David Waern at 2008-10-02T22:57:25+00:00 For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). - - - - - a25dde99 by David Waern at 2008-10-02T22:59:57+00:00 Remove ifaceEnv from Interface - it's no longer used - - - - - 610993da by David Waern at 2008-10-02T23:04:58+00:00 Write a comment about source links for type instance declarations - - - - - 5a96b5d5 by Thomas Schilling at 2008-10-03T10:45:08+00:00 Follow GHC API change of parseModule. - - - - - 5a943ae5 by Ian Lynagh at 2008-10-03T15:56:58+00:00 TAG 2008-10-03 - - - - - 76cdd6ae by Thomas Schilling at 2008-10-08T12:29:50+00:00 Only load modules once when typechecking with GHC. This still doesn't fix the memory leak since the typechecked source is retained and then processed separately. To fix the leak, modules must be processed directly after typechecking. - - - - - 7074d251 by David Waern at 2008-10-09T23:53:54+00:00 Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. - - - - - 4b9b2b2d by David Waern at 2008-10-09T23:54:49+00:00 Add some strictness annotations in Interface We add some strictness annotations to the fields of Interface, so that less GHC data is hold on to during processing. - - - - - 22035628 by David Waern at 2008-10-10T20:02:31+00:00 Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck - - - - - be637ad3 by David Waern at 2008-10-10T20:33:38+00:00 Make Haddock build with GHC 6.8.2 - - - - - 523b3404 by David Waern at 2008-10-10T21:08:09+00:00 Fix documentation for createInterfaces - - - - - e1556702 by David Waern at 2008-10-10T21:26:19+00:00 Hide H.Utils in library - - - - - a8e751c3 by David Waern at 2008-10-10T21:34:59+00:00 Add back .haddock file versioning based on GHC version It was accidentally removed in the patch for GHC 6.8.2 compatibility - - - - - 06fb3c01 by David Waern at 2008-10-10T21:47:15+00:00 Bump version number to 2.3.0 - - - - - ff087fce by David Waern at 2008-10-10T22:35:49+00:00 Add support for DocPic The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix! - - - - - 3af85bf6 by David Waern at 2008-10-10T23:34:05+00:00 Update tests - - - - - 0966873c by Simon Marlow at 2008-10-10T14:43:04+00:00 no need for handleErrMsg now, we don't throw any ErrMsgs - - - - - f1870de3 by Clemens Fruhwirth at 2008-10-10T13:29:36+00:00 Compile with wrapper but remove it for dist-install - - - - - 7b440dc2 by David Waern at 2008-10-11T14:02:25+00:00 Remove interface from LinksInfo It was there to know the documentation home module when creating a wiki link, but we already know this since we have the DocName. - - - - - e5729e6a by David Waern at 2008-10-15T20:49:18+00:00 Wibble - - - - - b2a8e01a by David Waern at 2008-10-15T21:03:36+00:00 Use type synonyms for declarations and docs in H.I.Create - - - - - be71a15b by David Waern at 2008-10-15T21:12:17+00:00 Comment out unused type family stuff completely - - - - - 91aaf075 by David Waern at 2008-10-15T21:49:04+00:00 Wibble - - - - - 42ba4eb4 by David Waern at 2008-10-15T21:53:53+00:00 Move convenient type synonym to H.Types - - - - - db11b723 by David Waern at 2008-10-15T22:14:07+00:00 Add DeclInfo to H.Types - - - - - 193552b6 by David Waern at 2008-10-15T22:15:01+00:00 Add subordinates with docs to the declaration map The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate. - - - - - 31e6eebc by David Waern at 2008-10-16T17:18:47+00:00 Wibble - - - - - 0dcbd79f by David Waern at 2008-10-16T20:58:42+00:00 Fix haskell/haddock#61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. - - - - - de47f20a by David Waern at 2008-10-16T22:06:35+00:00 Document function and improve its layout - - - - - e74e625a by Thomas Schilling at 2008-10-20T11:12:57+00:00 Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). - - - - - b63ac9a1 by David Waern at 2008-10-20T20:25:50+00:00 Make renamer consistent Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name). - - - - - f6de0bb0 by Ian Lynagh at 2008-09-19T00:54:43+00:00 TAG GHC 6.10 fork - - - - - 74599cd0 by David Waern at 2008-10-20T21:13:24+00:00 Do not save hidden modules in the .haddock file We were saving interfaces of all processed modules including those hidden using {-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links when generating the index for the libraries that come with GHC. This patch excludes modules with hidden documentation when writing .haddock files. It should fix the above problem. - - - - - 7b6742e9 by David Waern at 2008-10-21T19:54:52+00:00 Do not save hidden modules in the .haddock file (also for ghc >= 6.9) When writing the first patch, I forgot to do the fix in both branches of an #if macro. - - - - - b99b1951 by David Waern at 2008-10-22T20:04:18+00:00 Remove subordinate map and its usage It is not needed now that we store subordinate names in the DeclInfo map. - - - - - da97cddc by David Waern at 2008-10-22T20:11:46+00:00 Tidy up code in H.I.Create a little Remove commented out half-done type instance support, and remove DeclWithDoc synonym. - - - - - 6afa76f3 by David Waern at 2008-10-22T21:17:29+00:00 Fix warnings in H.GHC.Utils - - - - - 171ea1e8 by David Waern at 2008-10-22T21:35:04+00:00 Fix warnings in H.Utils - - - - - c8cb3b91 by David Waern at 2008-10-22T21:36:49+00:00 Wibble - - - - - 767fa06a by David Waern at 2008-10-27T19:59:04+00:00 Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. - - - - - e638bbc6 by David Waern at 2008-11-02T22:21:10+00:00 Add HCAR entry - - - - - 92b4ffcf by David Waern at 2008-11-02T22:44:19+00:00 Update CHANGES - - - - - 84d4da6e by David Waern at 2008-11-03T11:25:04+00:00 Add failing test for template haskell crash - - - - - 2a9cd2b1 by David Waern at 2008-11-04T21:13:44+00:00 Add tests/TH.hs - - - - - 8a59348e by David Waern at 2008-11-04T21:30:26+00:00 TAG 2.3.0 - - - - - 54f70d31 by Thomas Schilling at 2008-10-24T17:04:08+00:00 Enable framed view of the HTML documentation. This patch introduces: - A page that displays the documentation in a framed view. The left side will show a full module index. Clicking a module name will show it in the right frame. If Javascript is enabled, the left side is split again to show the modules at the top and a very short synopsis for the module currently displayed on the right. - Code to generate the mini-synopsis for each module and the mini module index ("index-frames.html"). - CSS rules for the mini-synopsis. - A very small amount of javascript to update the mini-synopsis (but only if inside a frame.) Some perhaps controversial things: - Sharing code was very difficult, so there is a small amount of code duplication. - The amount of generated pages has been doubled, since every module now also gets a mini-synopsis. The overhead should not be too much, but I haven't checked. Alternatively, the mini-synopsis could also be generated using Javascript if we properly annotate the actual synopsis. - - - - - 5d7ea5a6 by David Waern at 2008-11-04T23:20:17+00:00 Follow change to ExportDecl in frames code - - - - - 60e16308 by David Waern at 2008-11-04T23:35:26+00:00 Update CHANGES - - - - - d63fd26d by David Waern at 2008-11-04T23:37:43+00:00 Bump version number - - - - - c1660c39 by David Waern at 2008-11-04T23:44:46+00:00 Update CHANGES - - - - - 995ab384 by David Waern at 2008-11-04T23:55:21+00:00 Remove .ref files from tests/output/ - - - - - 1abbbe75 by David Waern at 2008-11-04T23:57:41+00:00 Output version info before running tests - - - - - 649b182f by David Waern at 2008-11-05T22:45:37+00:00 Add ANNOUNCE message - - - - - c36ae0bb by David Waern at 2008-11-05T23:15:35+00:00 Update ANNOUNCE - - - - - 9c4f3d40 by David Waern at 2008-11-05T23:18:30+00:00 Wibble - - - - - 5aac87ce by David Waern at 2008-11-06T21:07:48+00:00 Depend on base 4.* when using GHC >= 6.9, otherwise 3.* - - - - - b9796a74 by David Waern at 2008-11-06T21:13:40+00:00 Bump version to 2.4.1 and update CHANGES - - - - - d4b26baa by David Waern at 2008-11-06T21:26:33+00:00 Depend on base 4.0.* instead of 4.* - - - - - 2cb0903c by David Waern at 2008-11-06T21:46:53+00:00 Fix warnings in H.B.HH and H.B.HH2 - - - - - e568e89a by David Waern at 2008-11-06T21:47:12+00:00 Fix warnings in Haddock.ModuleTree - - - - - 9dc14fbd by David Waern at 2008-11-06T21:47:52+00:00 Fix warnings in Haddock.Version - - - - - 02ac197c by David Waern at 2008-11-06T21:51:31+00:00 Fix warnings in H.InterfaceFile and H.Options - - - - - 63e7439a by David Waern at 2008-11-06T21:59:45+00:00 Fix warnings in H.GHC.Typecheck - - - - - 4bca5b68 by David Waern at 2008-11-08T13:43:42+00:00 Set HscTarget to HscNothing instead of HscAsm There used to be a bug in the GHC API that prevented us from setting this value. - - - - - 07357aec by David Waern at 2008-11-09T22:27:00+00:00 Re-export NameCache and friends from Distribution.Haddock - - - - - ea554b5a by David Waern at 2008-11-09T23:14:10+00:00 Add Haddock.GHC.Utils to other-modules in library - - - - - 74aecfd7 by David Waern at 2008-11-10T01:18:57+00:00 Export DocName in the library - - - - - 241a58b3 by David Waern at 2008-11-10T01:19:18+00:00 Document the functions in H.DocName - - - - - edc2ef1b by David Waern at 2008-11-10T01:20:52+00:00 Export H.DocName in the library - - - - - 4f588d55 by David Waern at 2008-11-10T01:29:14+00:00 Make DocName an instance of NamedThing - - - - - b4647244 by David Waern at 2008-11-15T22:58:18+00:00 Reflect version bump in test suite - - - - - 4bee8ce2 by David Waern at 2008-11-15T22:58:45+00:00 Update tests For unknown reasons, test output for Bug1 and Test has changed for the better. - - - - - 1690e2f9 by David Waern at 2008-11-15T22:59:33+00:00 Store hidden modules in .haddock files We store documentation for an entity in the 'InstalledInterface' of the definition site module, and never in the same structure for a module which re-exports the entity. So when a client of the Haddock library wants to look up some documentation, he/she might need to access a hidden module. But we currently don't store hidden modules in the .haddock files. So we add the hidden modules and the Haddock options to the .haddock files. The options will be used to filter the module list to obtain the visible modules only, which is necessary for generating the contents and index for installed packages. - - - - - 8add6435 by David Waern at 2008-11-16T14:35:50+00:00 Bump major version number due to .haddock file format change - - - - - 48bfcf82 by David Waern at 2008-11-23T14:32:52+00:00 Update tests to account for version number bump - - - - - 0bbd1738 by David Waern at 2008-11-23T14:33:31+00:00 HADDOCK_DATA_DIR changed to haddock_datadir - - - - - 5088b78c by David Waern at 2008-11-23T17:13:21+00:00 FIX haskell/haddock#45: generate two anchors for each name We generate two anchor tags for each name, one where we don't escape the name and one where we URI-encode it. This is for compatibility between IE and Opera. Test output is updated. - - - - - 5ee5ca3b by Neil Mitchell at 2008-11-27T14:38:11+00:00 Drop HsDocTy annotations, they mess up pretty printing and also have a bracketing bug (#2584) - - - - - 51c014e9 by Roman Cheplyaka at 2008-11-27T22:27:36+00:00 Allow referring to a specific section within a module in a module link Fixes haskell/haddock#65 - - - - - 4094bdc5 by David Waern at 2008-11-28T21:13:33+00:00 Update tests following anchor change - - - - - f89552dd by Thomas Schilling at 2008-11-29T16:16:20+00:00 Haddock really shouldn't try to overwrite files. - - - - - 98127499 by David Waern at 2008-12-07T14:09:15+00:00 Solve conflict - - - - - 319356c5 by David Waern at 2008-10-22T21:16:55+00:00 Add -Wall -Werror to ghc-options - - - - - 3c4968c9 by David Waern at 2008-11-04T23:38:56+00:00 TAG 2.4.0 - - - - - 4b21e003 by David Waern at 2008-11-06T21:14:04+00:00 TAG 2.4.1 - - - - - 8e0cad5c by David Waern at 2008-12-07T14:12:54+00:00 Remove -Werror - - - - - 299d6deb by David Waern at 2008-12-07T14:25:18+00:00 Remove -Wall, we'll focus on warnings after 6.10.2 is out - - - - - 5f4216b6 by David Waern at 2008-12-07T20:58:05+00:00 Resolve conflict properly - - - - - 67d774e7 by Neil Mitchell at 2008-12-15T11:44:26+00:00 Make forall's in constructors explicit, i.e. data Foo = Foo {foo :: Eq a => a} - - - - - 61851792 by Neil Mitchell at 2008-12-18T15:39:39+00:00 Try and find a better package name than "main" for Hoogle, goes wrong when working on an executable rather than a library - - - - - 2fab8554 by David Waern at 2008-12-08T23:19:48+00:00 Make visible names from ExportItems Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment. - - - - - 7caadd8c by Ian Lynagh at 2008-12-11T17:01:04+00:00 Wrap the GHC usage with defaultCleanupHandler This fixes a bug where haddock leaves /tmp/ghc* directories uncleaned. - - - - - 7c9fc9a5 by David Waern at 2009-01-02T21:38:27+00:00 Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. - - - - - 119e4e05 by David Waern at 2009-01-06T23:34:17+00:00 Do not process boot modules We should of course not try to produce documentation for boot modules! The reason this has worked in the past is that the output of "real" modules overwrites the output of boot modules later in the process. However, this causes a subtle link environment problem. So let's get rid of this stupid behaviour. We avoid processing boot modules, but we continue to typecheck them. - - - - - c285b9d2 by David Waern at 2009-01-08T18:03:36+00:00 Export modules also when coming from external packages This seems to have regressed since a refactoring that was part of the 2.3.0 release. - - - - - 24031c17 by David Waern at 2009-01-10T15:26:26+00:00 Change version to 2.4.2 - no need to go to 2.5.0 - - - - - 864d1c3f by David Waern at 2009-01-10T15:35:20+00:00 Update tests to account for version number change - - - - - 524ba886 by David Waern at 2009-01-10T18:29:17+00:00 Add test for Template Haskell splicing - - - - - 05e6e003 by David Waern at 2009-01-10T19:35:42+00:00 Fix Trac haskell/haddock#68: Turn on compilation via C for Template Haskell packages We can't use HscNothing if we need to run code coming from modules inside the processed package during typechecking, which is the case for some packages using Template Haskell. This could be improved, to e.g. use HscInterpreted and HscNothing where possible, instead of using HscC for all modules in the package. - - - - - 2b2bafa1 by David Waern at 2009-01-10T20:22:25+00:00 Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above - - - - - bedc3a93 by Ian Lynagh at 2009-01-11T14:58:41+00:00 Fix the location of INPLACE_PKG_CONF; fixes the build Spotted by Conal Elliott - - - - - 943107c8 by David Waern at 2009-01-20T19:27:39+00:00 Document H.I.Create.collectDocs better - - - - - c6252e37 by David Waern at 2009-01-20T19:29:51+00:00 Fix Trac haskell/haddock#59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). - - - - - 3568a6af by David Waern at 2009-01-21T21:41:48+00:00 Do not indicate that a constructor argument is unboxed We only show the strictness annotation for an unboxed constructor argument. The fact that it is unboxed is an implementation detail and should not be part of the module interface. - - - - - 562a4523 by David Waern at 2009-01-22T18:53:49+00:00 Fix Trac haskell/haddock#50: do not attach docs to pragmas or other kinds of non-declarations We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations. - - - - - 6fdf21c2 by David Waern at 2009-01-22T19:48:09+00:00 Add test for quasi quotation. No reference output yet. - - - - - dc4100fd by David Waern at 2009-01-22T19:57:47+00:00 Improve quasi-quotation test and add reference output - - - - - 908b74bb by David Waern at 2009-01-23T23:22:03+00:00 Filter out separately exported associated types in a smarter way - - - - - f6b42ecb by David Waern at 2009-01-24T16:54:39+00:00 Correct spelling mistake in error message - - - - - 24e4245d by David Waern at 2009-01-24T17:48:03+00:00 Correct comment - - - - - b5e8462f by David Waern at 2009-02-07T13:22:29+00:00 Do not show a subordinate at the top level if its parent is also exported See note in the source code for more info. - - - - - 4b09de57 by David Waern at 2009-02-07T13:53:53+00:00 Update test following change to top level subordinates - - - - - 76379896 by David Waern at 2009-02-07T13:58:04+00:00 Remove html files in the tests/output/ directory which have been accidentally added - - - - - 1a6d8b10 by Joachim Breitner at 2009-02-20T10:29:43+00:00 Typo in comment - - - - - fec367d0 by David Waern at 2009-02-24T20:21:17+00:00 Fix small bug The rule is to prefer type constructors to other things when an identifier in a doc string can refer to multiple things. This stopped working with newer GHC versions (due to a tiny change in the GHC renamer). We implement this rule in the HTML backend for now, instead of fixing it in GHC, since we will move renaming of doc strings to Haddock in the future anyway. - - - - - 9b4172eb by David Waern at 2009-02-25T20:04:38+00:00 Fix bad error handling with newer GHCs When support for GHC 6.10 was added, an error handler was installed only around the typechecking phase. This had the effect that errors thrown during dependency chasing were caught in the top-level exception handler and not printed with enough detail. With this patch we wrap the error handler around all our usage of the Ghc monad. - - - - - de2df363 by Simon Peyton Jones at 2009-02-02T16:47:42+00:00 Hide funTyConName, now exported by TypeRep - - - - - 4d40a29f by Ian Lynagh at 2009-02-12T18:57:49+00:00 Don't build the library when building in the GHC tree - - - - - 1cd0abe4 by Ian Lynagh at 2009-02-13T13:58:53+00:00 Add a ghc.mk - - - - - 3d814eeb by Ian Lynagh at 2009-02-13T18:50:28+00:00 do .depend generation for haddock with the stage1 compiler This is a bit of a hack. We mkdepend with stage1 as if .depend depends on the stage2 compiler then make goes wrong: haddock's .depend gets included, which means that make won't reload until it's built, but we can't build it without the stage2 compiler. We therefore build the stage2 compiler before its .depend file is available, and so compilation fails. - - - - - b55036a4 by Ian Lynagh at 2009-02-25T01:38:13+00:00 Give haddock a wrapper on unix in the new GHC build system - - - - - 9eabfe68 by Ian Lynagh at 2009-02-25T19:21:32+00:00 Create inplace/lib/html in the new GHC build system - - - - - 93af30c7 by Ian Lynagh at 2008-11-07T19:18:23+00:00 TAG GHC 6.10.1 release - - - - - 06e6e34a by Thomas Schilling at 2009-02-24T18:11:00+00:00 Define __GHC_PATCHLEVEL__ for recent version of GHC (stable). - - - - - 680e6ed8 by Thomas Schilling at 2009-02-24T18:12:26+00:00 'needsTemplateHaskell' is not defined in current stable GHC. - - - - - 6c5619df by David Waern at 2009-02-25T22:15:23+00:00 Hide fynTyConName only for recent GHC versions - - - - - 6b2344f1 by Ian Lynagh at 2009-02-26T00:49:56+00:00 Add the module to one of haddocks warnings - - - - - e5d11c70 by David Waern at 2009-02-27T21:37:20+00:00 Bug fix We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates. - - - - - 10a79a60 by David Waern at 2009-02-27T22:08:08+00:00 Fix error message conflict The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now. - - - - - c5055c7f by David Waern at 2009-02-27T22:15:17+00:00 Shorten warning message - - - - - a72fed3a by David Waern at 2009-02-28T00:53:55+00:00 Do not show package name in warning message - - - - - a5daccb2 by Ian Lynagh at 2009-03-01T14:59:35+00:00 Install haddock in the new GHC build system - - - - - dfdb025c by Ian Lynagh at 2009-03-07T23:56:29+00:00 Relax base dependency to < 4.2, not < 4.1 - - - - - 5769c8b4 by David Waern at 2009-03-21T14:58:52+00:00 Bump .haddock file version number (due to change of format) - - - - - f1b8f67b by David Waern at 2009-03-21T14:59:26+00:00 Define __GHC_PATCHLEVEL__=1 when using ghc-6.10.1 - - - - - 23f78831 by David Waern at 2009-03-21T16:40:52+00:00 Update CHANGES - - - - - 7d2735e9 by David Waern at 2009-03-21T16:50:33+00:00 Update ANNOUNCE - - - - - 0771e00a by David Waern at 2009-03-21T16:54:40+00:00 Update ANNOUNCE, again - - - - - 81a6942a by David Waern at 2009-03-21T17:50:06+00:00 Don't be too verbose in CHANGES - - - - - 29861dcf by David Waern at 2009-03-21T18:03:31+00:00 TAG 2.4.2 - - - - - a585f285 by David Waern at 2009-03-21T19:20:29+00:00 Require Cabal >= 1.2.3 - - - - - 7c611662 by David Waern at 2009-03-21T19:21:48+00:00 TAG 2.4.2 with cabal-version >= 1.2.3 - - - - - 23b7deff by Simon Marlow at 2009-03-20T15:43:42+00:00 new GHC build system: use shell-wrappers macro - - - - - 25f8afe7 by Ian Lynagh at 2009-03-21T19:13:53+00:00 Fix (with a hack?) haddock in teh new build system - - - - - 6a29a37e by David Waern at 2009-03-24T22:10:15+00:00 Remove unnecessary LANGUAGE pragma - - - - - 954da57d by David Waern at 2009-03-24T22:21:23+00:00 Fix warnings in H.B.DevHelp - - - - - 1619f1df by David Waern at 2009-03-26T23:20:44+00:00 -Wall police in H.B.Html - - - - - b211e13b by Simon Marlow at 2009-03-24T13:00:56+00:00 install Haddock's html stuff - - - - - 78e0b107 by David Waern at 2008-12-07T19:58:53+00:00 Add verbosity flag and utils, remove "verbose" flag - - - - - 913dae06 by David Waern at 2008-12-07T20:01:05+00:00 Add some basic "verbose" mode logging in H.Interface - - - - - 1cbff3bf by David Waern at 2009-03-27T00:07:26+00:00 Fix conflicts - - - - - 22f82032 by David Waern at 2009-03-27T21:15:11+00:00 Remove H.GHC.Typecheck - - - - - 81557804 by David Waern at 2009-03-27T21:19:22+00:00 Remove docNameOrig and use getName everywhere instead - - - - - d8267213 by David Waern at 2009-03-27T21:21:46+00:00 Use docNameOcc instead of nameOccName . getName - - - - - 5d55deab by David Waern at 2009-03-27T21:33:04+00:00 Remove H.DocName and put DocName in H.Types - - - - - 8ba72611 by David Waern at 2009-03-27T22:06:26+00:00 Document DocName - - - - - 605f8ca5 by David Waern at 2009-03-27T22:45:21+00:00 -Wall police - - - - - e4da93ae by David Waern at 2009-03-27T23:12:53+00:00 -Wall police in H.B.Hoogle - - - - - bb255519 by David Waern at 2009-03-27T23:41:28+00:00 Define Foldable and Traversable instances for Located - - - - - f1195cfe by David Waern at 2009-03-27T23:51:34+00:00 Wibble - - - - - 23818d7c by David Waern at 2009-03-28T00:03:55+00:00 -Wall police in H.I.Rename - - - - - 0f050d67 by David Waern at 2009-03-28T00:15:15+00:00 -Wall police in H.I.AttachInstances - - - - - 0f3fe038 by David Waern at 2009-03-28T21:09:41+00:00 Wibble - - - - - 275d4865 by David Waern at 2009-03-28T21:27:06+00:00 Layout fix - - - - - 54ff0ef8 by David Waern at 2009-03-28T21:59:07+00:00 -Wall police in H.I.Create - - - - - 7f58b117 by David Waern at 2009-03-28T22:10:19+00:00 -Wall police in H.Interface - - - - - f0c03b44 by David Waern at 2009-03-28T22:22:59+00:00 -Wall police in Main - - - - - 29da355c by David Waern at 2009-03-28T22:23:39+00:00 Turn on -Wall -Werror - - - - - 446d3060 by David Waern at 2009-04-01T20:40:30+00:00 hlint police - - - - - 3867c9fc by David Waern at 2009-04-01T20:48:42+00:00 hlint police - - - - - bd1f1600 by David Waern at 2009-04-01T20:58:02+00:00 hlint police - - - - - e0e90866 by David Waern at 2009-04-05T12:42:53+00:00 Move H.GHC.Utils to H.GhcUtils - - - - - 9cbd426b by David Waern at 2009-04-05T12:57:21+00:00 Remove Haddock.GHC and move its (small) contents to Main - - - - - b5c2cbfd by David Waern at 2009-04-05T13:07:04+00:00 Fix whitespace and stylistic issues in Main - - - - - 3c04aa56 by porges at 2008-12-07T08:22:19+00:00 add unicode output - - - - - 607918da by David Waern at 2009-04-26T15:09:43+00:00 Resolve conflict - - - - - 4bec6b6b by Simon Marlow at 2009-05-13T10:00:31+00:00 fix markup - - - - - 436ad6f4 by Simon Marlow at 2009-03-23T11:54:45+00:00 clean up - - - - - bdcd1398 by Simon Marlow at 2009-03-24T10:36:45+00:00 new GHC build system: add $(exeext) - - - - - 9c0972f3 by Simon Marlow at 2009-03-24T11:04:31+00:00 update for new GHC build system layout - - - - - d0f3f83a by Ian Lynagh at 2009-03-29T15:31:43+00:00 GHC new build system fixes - - - - - 5a8245c2 by Ian Lynagh at 2009-04-04T20:44:23+00:00 Tweak new build system - - - - - 9c6f2d7b by Simon Marlow at 2009-05-13T10:01:27+00:00 add build instructions for GHC - - - - - 66d07c76 by Ian Lynagh at 2009-05-31T00:37:53+00:00 Quote program paths in ghc.mk - - - - - bb7de2cd by Ian Lynagh at 2009-06-03T22:57:55+00:00 Use a bang pattern on an unlifted binding - - - - - 3ad283fc by Ian Lynagh at 2009-06-13T16:17:50+00:00 Include haddock in GHC bindists - - - - - ac447ff4 by David Waern at 2009-06-24T21:07:50+00:00 Delete Haddock.Exception and move contents to Haddock.Types Only a few lines of code that mainly declares a type - why not just put it in Haddock.Types. - - - - - 4464fb9b by David Waern at 2009-06-24T22:23:23+00:00 Add Haddock module headers Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock at projects.haskell.org. Next step is to add a brief description to each module. - - - - - 5f4c95dd by David Waern at 2009-06-24T22:39:44+00:00 Fix spelling error - - - - - 6d074cdb by David Waern at 2009-06-25T21:53:56+00:00 Document Interface and InstalledInterface better - - - - - d0cbd183 by David Waern at 2009-06-27T12:46:46+00:00 Remove misplaced whitespace in H.I.Rename - - - - - fa381c49 by David Waern at 2009-06-27T13:26:03+00:00 Fix haskell/haddock#104 - create output directory if missing - - - - - 91fb77ae by Ian Lynagh at 2009-06-25T15:59:50+00:00 TAG 2009-06-25 - - - - - 0d853f40 by Simon Peyton Jones at 2009-07-02T15:35:22+00:00 Follow extra field in ConDecl - - - - - b201735d by Ian Lynagh at 2009-07-05T16:50:35+00:00 Update Makefile for the new GHC build system - - - - - df6c0092 by Ian Lynagh at 2009-07-05T17:01:13+00:00 Resolve conflicts - - - - - 1066870a by Ian Lynagh at 2009-07-05T17:01:48+00:00 Remove the -Wwarn hack in the GHC build system - - - - - 7e856076 by Ian Lynagh at 2009-07-05T17:17:59+00:00 Fix warnings - - - - - 5d4cd958 by Ian Lynagh at 2009-07-05T19:35:40+00:00 Bump version number Cabal needs to distinguish between haddocks having a --verbose and --verbosity flag - - - - - 6ee07c99 by David Waern at 2009-07-06T20:14:57+00:00 Wibble - - - - - 2308b66f by David Waern at 2009-07-06T20:24:20+00:00 Clearer printing of versions by runtests.hs - - - - - d4b5d9ab by David Waern at 2009-07-06T21:22:42+00:00 Fix (invisible) bug introduced by unicode patch - - - - - 2caca8d8 by David Waern at 2009-07-06T21:44:10+00:00 Use HscAsm instead of HscC when using TH - - - - - 18f3b755 by David Waern at 2009-07-06T22:10:22+00:00 Update HCAR entry (by Janis) - - - - - a72ac9db by David Waern at 2009-07-06T23:01:35+00:00 Follow HsRecTy change with an #if __GLASGOW_HASKEL__ >= 611 - - - - - 549135d2 by David Waern at 2009-07-06T23:11:41+00:00 Remove unused functions from Haddock.Utils - - - - - b450134a by Isaac Dupree at 2009-07-11T14:59:00+00:00 revert to split-index for large indices - remove the search-box, because browsers have search-for-text abilities anyway. - pick 150 items in index as the arbitrary time at which to split it - notice the bug that identifiers starting with non-ASCII characters won't be listed in split-index, but don't bother to fix it yet (see ticket haskell/haddock#116, http://trac.haskell.org/haddock/ticket/116 ) - - - - - 78a5661e by Isaac Dupree at 2009-07-20T15:37:18+00:00 Implement GADT records in HTML backend - - - - - 4e163555 by Isaac Dupree at 2009-07-21T22:03:25+00:00 add test for GADT records - - - - - 79aa4d6e by David Waern at 2009-07-23T20:40:37+00:00 Update test suite following version bump - - - - - 5932c011 by David Waern at 2009-08-02T10:25:39+00:00 Fix documentation bug - - - - - a6970fca by David Waern at 2009-08-12T23:08:53+00:00 Remove support for ghc 6.8.* from .cabal file - - - - - c1695902 by Ian Lynagh at 2009-07-07T13:35:45+00:00 Fix unused import warnings - - - - - fb6df7f9 by Ian Lynagh at 2009-07-16T00:20:31+00:00 Use cProjectVersion directly rather than going through compilerInfo Fixes the build after changes in GHC - - - - - 548cdd66 by Simon Marlow at 2009-07-28T14:27:04+00:00 follow changes in GHC's ForeignType - - - - - 9395aaa0 by David Waern at 2009-08-13T22:17:33+00:00 Switch from PatternSignatures to ScopedTypeVariables in Main - - - - - eebf39bd by David Waern at 2009-08-14T17:14:28+00:00 Version .haddock files made with GHC 6.10.3/4 correclty - - - - - 58f3e735 by David Waern at 2009-08-14T17:19:37+00:00 Support GHC 6.10.* and 6.11.* only - - - - - 5f63cecc by David Waern at 2009-08-14T22:03:20+00:00 Do not version .haddock file based on GHC patchlevel version We require that the instances of Binary that we use from GHC will not change between patchlevel versions. - - - - - d519de9f by David Waern at 2009-08-14T23:50:00+00:00 Update CHANGES - - - - - 35dccf5c by David Waern at 2009-08-14T23:51:38+00:00 Update version number everywhere - - - - - 6d363fea by David Waern at 2009-08-15T09:46:49+00:00 Update ANNOUNCE - - - - - c7ee6bc2 by David Waern at 2009-08-15T09:47:13+00:00 Remove -Werror Forgot that Hackage doesn't like it. - - - - - a125c12b by David Waern at 2009-08-15T09:49:50+00:00 Require Cabal >= 1.6 - - - - - adb2f560 by Isaac Dupree at 2009-08-12T03:47:14+00:00 Cross-Package Documentation version 4 - - - - - 3d6dc04d by David Waern at 2009-08-15T23:42:57+00:00 Put all the IN_GHC_TREE stuff inside getGhcLibDir - - - - - 56624097 by David Waern at 2009-08-15T23:52:03+00:00 Add --print-ghc-libdir - - - - - f15d3ccb by David Waern at 2009-08-16T00:37:52+00:00 Read base.haddock when running tests We can now test cross-package docs. - - - - - 283f0fb9 by David Waern at 2009-08-16T00:50:59+00:00 Update test output - we now have more links - - - - - 673d1004 by David Waern at 2009-08-16T01:26:08+00:00 Read process.haddock when running tests - - - - - 0d127f82 by David Waern at 2009-08-16T01:43:04+00:00 Add a test for cross-package documentation - - - - - f94db967 by Ian Lynagh at 2009-08-16T18:42:44+00:00 Follow GHC build system changes - - - - - 5151278a by Isaac Dupree at 2009-08-16T19:58:05+00:00 make cross-package list types look nicer - - - - - c41e8228 by Isaac Dupree at 2009-08-18T01:47:47+00:00 Haddock.Convert: export more functions This lets us remove some code in Haddock.Interface.AttachInstances - - - - - 2e5fa398 by Isaac Dupree at 2009-08-18T02:11:05+00:00 switch AttachInstances to use synify code It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication! - - - - - b8b07123 by Isaac Dupree at 2009-08-18T02:23:31+00:00 Find instances using GHC, which is more complete. In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?) - - - - - 6959b451 by Isaac Dupree at 2009-08-17T00:37:18+00:00 fix preprocessor conditional sense - - - - - 942823af by Isaac Dupree at 2009-08-16T22:46:48+00:00 remove ghc 6.8 conditionals from Haddock.Interface - - - - - 4b3ad888 by Isaac Dupree at 2009-08-18T20:24:38+00:00 Fix GHC 6.11 build in Haddock.Convert - - - - - 0a89c5ab by Isaac Dupree at 2009-08-23T00:08:58+00:00 hacks to make it compile without fnArgDocsn - - - - - 7b3bed43 by Isaac Dupree at 2009-08-23T03:01:28+00:00 less big-Map-based proper extraction of constructor subdocs - - - - - b21c279a by Isaac Dupree at 2009-08-23T03:02:06+00:00 Html: remove unnecessary+troublesome GHC. qualifications - - - - - 96c97115 by Isaac Dupree at 2009-08-23T03:08:03+00:00 Move doc parsing/lexing into Haddock for ghc>=6.11 - - - - - e1cec02d by Isaac Dupree at 2009-08-23T05:08:14+00:00 get rid of unused DocMap parameter in Html - - - - - 66960c59 by Isaac Dupree at 2009-08-23T05:54:20+00:00 fix horrible named-docs-disappearing bug :-) - - - - - a9d7eff3 by Isaac Dupree at 2009-08-23T06:26:36+00:00 re-implement function-argument docs ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently. - - - - - 8bf6852c by Isaac Dupree at 2009-08-23T07:26:05+00:00 cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! - - - - - 30115a64 by Isaac Dupree at 2009-08-23T18:22:47+00:00 Improve behavior for unfindable .haddock - - - - - aa364bda by Isaac Dupree at 2009-08-23T18:28:16+00:00 add comment for FnArgsDoc type - - - - - 49b23a99 by Isaac Dupree at 2009-08-23T21:52:48+00:00 bugfix: restore fnArgDocs for type-synonyms - - - - - f65f9467 by Isaac Dupree at 2009-08-23T22:06:55+00:00 Backends.Hoogle: eliminate warnings - - - - - a292d216 by Isaac Dupree at 2009-08-23T22:10:24+00:00 Haddock.Convert: eliminate warnings - - - - - 5546cd20 by Isaac Dupree at 2009-08-23T22:12:31+00:00 Haddock.Interface.Rename: eliminate warnings - - - - - 0a9798b6 by Isaac Dupree at 2009-08-23T22:18:47+00:00 Main.hs: remove ghc<6.9 conditionals - - - - - e8f9867f by Isaac Dupree at 2009-08-23T22:27:46+00:00 Main.hs: eliminate warnings (except for OldException) - - - - - 61c64247 by Isaac Dupree at 2009-08-23T22:41:01+00:00 move get*LibDir code in Main.hs, to +consistent code, -duplication - - - - - 948f1e69 by Isaac Dupree at 2009-08-23T23:14:26+00:00 Main.hs: OldException->Exception: which eliminates warnings - - - - - 3d5d5e03 by Isaac Dupree at 2009-08-23T23:20:11+00:00 GhcUtils: ghc >= 6.10 - - - - - 2771d657 by Isaac Dupree at 2009-08-23T23:21:55+00:00 InterfaceFile: ghc >= 6.10 - - - - - d9f2b9d1 by Isaac Dupree at 2009-08-23T23:22:58+00:00 Types: ghc >= 6.10 - - - - - ca39210e by Isaac Dupree at 2009-08-23T23:23:26+00:00 ModuleTree: ghc >= 6.10 - - - - - 883c4e59 by Isaac Dupree at 2009-08-23T23:24:04+00:00 Backends.DevHelp: ghc >= 6.10 - - - - - 04667df5 by Isaac Dupree at 2009-08-23T23:24:37+00:00 Backends.Html: ghc >= 6.10 - - - - - a9f7f25f by Isaac Dupree at 2009-08-23T23:25:24+00:00 Utils: ghc >= 6.10 - - - - - b7105022 by Isaac Dupree at 2009-08-23T23:37:47+00:00 eliminate haskell98 dependency, following GHC's example It turns out I/we already had, and it was only a matter of deleting it from the cabal file. - - - - - 292e0911 by Isaac Dupree at 2009-08-24T01:22:44+00:00 refactor out subordinatesWithNoDocs dep of inferenced-decls fix - - - - - c2ed46a2 by Isaac Dupree at 2009-08-24T01:24:03+00:00 Eradicate wrong runtime warning for type-inferenced exported-functions see the long comment in the patch for why I did it this way :-) - - - - - 4ac0b57c by David Waern at 2009-09-04T22:56:20+00:00 Clean up tyThingToHsSynSig a little Factor out noLoc and use the case construct. Also rename the function to tyThingToLHsDecl, since it doesn't just create type signatures. - - - - - 28ab9201 by David Waern at 2009-09-04T22:58:50+00:00 Wibble - - - - - 0d9fe6d0 by David Waern at 2009-09-06T18:39:30+00:00 Add more copyright owners to H.I.AttachInstances - - - - - 122441b1 by David Waern at 2009-09-06T18:44:12+00:00 Style police - - - - - 1fa79463 by David Waern at 2009-09-06T18:57:45+00:00 Move toHsInstHead to Haddock.Convert and call it synifyInstHead - - - - - 0d42a8aa by David Waern at 2009-09-06T21:11:38+00:00 Use colordiff to display test results if available - - - - - ea9d8e03 by Simon Marlow at 2009-08-24T08:46:14+00:00 Follow changes in GHC's interface file format Word32 instead of Int for FastString and Name offsets - - - - - 537e051e by Simon Marlow at 2009-07-29T14:16:53+00:00 define unpackPackageId (it was removed from GHC) - - - - - 50c63aa7 by David Waern at 2009-09-09T23:18:03+00:00 Remove commented-out code - - - - - 511631fe by David Waern at 2009-09-09T23:19:05+00:00 Correct copyright in H.I.ParseModuleHeader - - - - - 898ec768 by David Waern at 2009-09-11T11:22:29+00:00 Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time. - - - - - 37bec0d5 by Simon Peyton Jones at 2009-09-11T08:28:04+00:00 Track change in HsType - - - - - eb3a97c3 by Ian Lynagh at 2009-09-11T16:07:09+00:00 Allow building with base 4.2 - - - - - bb4205ed by Ian Lynagh at 2009-09-22T13:50:02+00:00 Loosen the GHC dependency - - - - - 5c75deb2 by Ian Lynagh at 2009-09-22T14:08:39+00:00 Fix building with GHC >= 6.12 - - - - - fb131481 by David Waern at 2009-09-11T11:24:48+00:00 Update runtests.hs to work with GHC 6.11 - - - - - ac3a419d by David Waern at 2009-09-11T11:25:14+00:00 Update CrossPackageDocs test - - - - - ec65c3c6 by David Waern at 2009-09-11T11:25:40+00:00 Add reference output for CrossPackageDocs - - - - - 520c2758 by Ian Lynagh at 2009-10-25T17:26:40+00:00 Fix installation in the GHC build system - - - - - 28b3d7df by Ian Lynagh at 2009-11-05T15:57:27+00:00 GHC build system: Make *nix installation work in paths containing spaces - - - - - 5c9bb541 by David Waern at 2009-11-14T11:56:39+00:00 Track change in HsType for the right compiler version - - - - - 905097ce by David Waern at 2009-11-14T12:10:47+00:00 hlint police - - - - - 04920630 by Ian Lynagh at 2009-11-20T13:46:30+00:00 Use defaultObjectTarget rather than HscAsm This fixes haddock when we don't have a native code generator - - - - - 966eb079 by David Waern at 2009-11-15T12:32:21+00:00 Remove commented-out code - - - - - 37f00fc4 by David Waern at 2009-11-22T13:58:48+00:00 Make runtests.hs strip links before diffing Generates easier to read diffs when tests fail. The content of the links is not important anyway since it is not taken into account by the tests. - - - - - 3a9bb8ef by David Waern at 2009-11-22T14:05:06+00:00 Follow findProgramOnPath signature change in runtests.hs - - - - - b26b9e5a by David Waern at 2009-11-22T14:08:40+00:00 Follow removal of GHC.MVar from base in CrossPackageDocs - - - - - f4d90ae4 by David Waern at 2009-11-22T14:48:47+00:00 Make copy.hs strip link contents before copying No more updating of reference files when URLs in links changes. - - - - - 4c9c420d by David Waern at 2009-11-22T15:26:41+00:00 Update test reference output * More links (Int, Float etc) * Stripped link contents - - - - - a62b80e3 by David Waern at 2009-11-23T23:19:39+00:00 Update CrossPackageDocs reference output - Remove GHC.MVar import (removed from base) - Strip link contents - - - - - 43491394 by David Waern at 2009-11-23T23:20:00+00:00 Update test reference files with comments on instances - - - - - 0d370a0b by David Waern at 2009-11-23T23:25:16+00:00 Bump version number - - - - - 2293113e by David Waern at 2009-11-24T20:55:49+00:00 Comments on instances Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances - - - - - bf586f29 by David Waern at 2009-11-27T22:05:15+00:00 Whitespace police - - - - - b8f03afa by David Waern at 2009-11-27T22:11:46+00:00 Remove bad whitespace and commented-out pieces - - - - - 90b8ee90 by David Waern at 2009-11-27T22:15:04+00:00 Whitespace police - - - - - b5ede900 by David Waern at 2009-11-27T22:15:50+00:00 Whitespace police - - - - - e3fddbfe by David Waern at 2009-11-28T13:37:59+00:00 Remove Name from DocInstance It's not used. - - - - - 9502786c by David Waern at 2009-11-28T13:56:54+00:00 Require at least GHC 6.12 While regression testing Haddock, I found a bug that happens with GHC 6.10.3, but not with GHC 6.12-rc2 (haven't tried 6.10.4). I don't have time to track it down. I think we should just always require the latest major GHC version. The time spent on making Haddock work with older versions is too high compared to the time spent on bugfixing, refactoring and features. - - - - - 8fa688d8 by David Waern at 2009-11-28T15:05:03+00:00 Remove cruft due to compatibility with older GHCs - - - - - 46fbbe9d by David Waern at 2009-11-28T15:07:50+00:00 Add a documentation header to Haddock.Convert - - - - - c3d2cc4a by David Waern at 2009-11-28T15:10:14+00:00 Remove unused H.Utils.FastMutInt2 - - - - - 490aba80 by David Waern at 2009-11-28T15:36:36+00:00 Rename Distribution.Haddock into Documentation.Haddock - - - - - 33ee2397 by David Waern at 2009-11-28T15:36:47+00:00 Fix error message - - - - - a5a3b950 by David Waern at 2009-11-28T16:58:39+00:00 Add a test flag that brings in QuickCheck - - - - - fa049e13 by David Waern at 2009-11-28T19:32:18+00:00 Say that we want quickcheck 2 - - - - - f32b0d9b by David Waern at 2009-11-28T19:32:40+00:00 Add an Arbitrary instance for HsDoc - - - - - da9a8bd7 by David Waern at 2009-11-28T20:15:30+00:00 Rename HsDoc back into Doc - - - - - edb60101 by David Waern at 2009-11-28T22:16:16+00:00 Move H.Interface.Parse/Lex to H.Parse/Lex These are not just used to build Interfaces. - - - - - 0656a9b8 by David Waern at 2009-11-28T23:12:14+00:00 Update version number in test suite - - - - - 5e8c6f4a by David Waern at 2009-12-21T14:12:41+00:00 Improve doc of DocName - - - - - 7868e551 by Ian Lynagh at 2009-09-22T10:43:03+00:00 TAG GHC 6.12-branch created - - - - - 0452a3ea by Ian Lynagh at 2009-12-15T12:46:07+00:00 TAG GHC 6.12.1 release - - - - - 65e9be62 by David Waern at 2009-12-21T16:58:58+00:00 Update CHANGES - - - - - 145cee32 by David Waern at 2009-12-21T16:59:09+00:00 TAG 2.6.0 - - - - - 3c552008 by David Waern at 2009-12-22T17:11:14+00:00 Update ANNOUNCE - - - - - 931f9db4 by David Waern at 2010-01-22T19:57:17+00:00 Convert haddock.vim to use unix newlines - - - - - 4e56588f by David Waern at 2010-01-22T22:11:17+00:00 Remove unnecessary (and inexplicable) uses of nub - - - - - 744bb4d1 by David Waern at 2010-01-22T22:12:14+00:00 Follow move of parser and lexer - - - - - e34bab14 by David Waern at 2010-01-22T22:49:13+00:00 Use findProgramLocation instead of findProgramOnPath in runtests.hs - - - - - 8d39891b by Isaac Dupree at 2010-01-14T18:53:18+00:00 fix html arg-doc off-by-one and silliness - - - - - 9401f2e9 by David Waern at 2010-01-22T22:57:03+00:00 Create a test for function argument docs - - - - - 507a82d7 by David Waern at 2010-01-22T23:24:47+00:00 Put parenthesis around type signature arguments of function type - - - - - 8a305c28 by David Waern at 2010-01-23T17:26:59+00:00 Add reference file for the FunArgs test - - - - - 1309d5e1 by David Waern at 2010-01-24T16:05:08+00:00 Improve FunArg test and update Test.html.ref - - - - - 2990f055 by Yitzchak Gale at 2010-02-14T16:03:46+00:00 Do not generate illegal character in HTML ID attribute. - - - - - c5bcab7a by David Waern at 2010-02-22T22:10:30+00:00 Fix Haddock markup error in comment - - - - - c6416a73 by David Waern at 2010-02-24T22:55:08+00:00 Large additions to the Haddock API Also improved and added more doc comments. - - - - - 57d289d7 by David Waern at 2010-02-24T22:58:02+00:00 Remove unused ifaceLocals - - - - - 80528d93 by David Waern at 2010-02-25T21:05:09+00:00 Add HaddockModInfo to the API - - - - - 82806848 by David Waern at 2010-02-25T21:05:27+00:00 Wibble - - - - - 744cad4c by David Waern at 2010-02-25T23:30:59+00:00 Make it possible to run a single test - - - - - 6a806e4c by David Waern at 2010-03-14T14:19:39+00:00 Bump version number - - - - - a5a8e4a7 by David Waern at 2010-03-14T14:36:35+00:00 Update ANNOUNCE - - - - - 6f05435e by Simon Hengel at 2010-03-15T20:52:42+00:00 Add missing dependencies for 'library' in haddock.cabal - - - - - faefe2bd by David Waern at 2010-03-15T22:29:37+00:00 Solve conflicts - - - - - 9808ad52 by David Waern at 2010-03-15T22:51:21+00:00 Bump version number - - - - - eb0bf60b by David Waern at 2010-03-15T22:52:32+00:00 Update CHANGES - - - - - f95cd891 by David Waern at 2010-03-15T23:01:06+00:00 Add Paths_haddock to other-modules of library - - - - - 65997b0a by David Waern at 2010-03-15T23:14:59+00:00 Update CHANGES - - - - - 7e251731 by David Waern at 2010-03-15T23:15:30+00:00 Bump version number - - - - - c9cd0ddc by David Waern at 2010-03-16T00:28:34+00:00 Fix warning - - - - - 1cac2d93 by Simon Peyton Jones at 2010-01-04T15:22:16+00:00 Fix imports for new location of splitKindFunTys - - - - - 474f26f6 by Simon Peyton Jones at 2010-02-10T14:36:06+00:00 Update Haddock for quasiquotes - - - - - 0dcc06c0 by Simon Peyton Jones at 2010-02-10T10:59:45+00:00 Track changes in HsTyVarBndr - - - - - 2d84733a by Simon Peyton Jones at 2010-02-10T14:52:44+00:00 Track HsSyn chnages - - - - - 9e3adb8b by Ian Lynagh at 2010-02-20T17:09:42+00:00 Resolve conflicts - - - - - a3e72ff8 by Simon Peyton Jones at 2010-03-04T13:05:16+00:00 Track change in HsUtils; and use a nicer function not an internal one - - - - - 27994854 by David Waern at 2010-03-18T22:22:27+00:00 Fix build with GHC 6.12.1 - - - - - 11f6e488 by David Waern at 2010-03-18T22:24:09+00:00 Bump version in test reference files - - - - - 0ef2f11b by David Waern at 2010-03-20T00:56:30+00:00 Fix library part of cabal file when in ghc tree - - - - - 3f6146ff by Mark Lentczner at 2010-03-20T22:30:11+00:00 First, experimental XHTML rendering switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString) - - - - - b8ab329b by Mark Lentczner at 2010-03-20T22:54:01+00:00 apply changes to Html.hs to Xhtml/*.hs incorporate changes that were made between the time Html.hs was copied and split into Xhtml.hs and Xhtml/*.hs includes patchs after "Wibble" (!) through "Fix build with GHC 6.12.1" - - - - - 73df2433 by Ian Lynagh at 2010-03-20T21:56:37+00:00 Follow LazyUniqFM->UniqFM in GHC - - - - - db4f602b by David Waern at 2010-03-29T22:00:01+00:00 Fix build with GHC 6.12 - - - - - d8dca088 by Simon Hengel at 2010-04-02T16:39:55+00:00 Add missing dependencies to cabal file - - - - - e2adc437 by Simon Hengel at 2010-04-02T14:08:40+00:00 Add markup support for interactive examples - - - - - e882ac05 by Simon Hengel at 2010-04-02T14:11:53+00:00 Add tests for interactive examples - - - - - 5a07a6d3 by David Waern at 2010-04-07T17:05:20+00:00 Propagate source positions from Lex.x to Parse.y - - - - - 6493b46f by David Waern at 2010-04-07T21:48:57+00:00 Let runtests.hs die when haddock has not been built - - - - - 5e34423e by David Waern at 2010-04-07T22:01:13+00:00 Make runtests.hs slightly more readable - - - - - 321d59b3 by David Waern at 2010-04-07T22:13:27+00:00 Fix haskell/haddock#75 Add colons to the $ident character set. - - - - - 37b08b8d by David Waern at 2010-04-08T00:32:52+00:00 Fix haskell/haddock#118 Avoid being too greedy when lexing URL markup (<..>), in order to allow multiple URLs on the same line. Do the same thing with <<..>> and #..#. - - - - - df8feac9 by David Waern at 2010-04-08T00:57:33+00:00 Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. - - - - - 1ca6f84b by David Waern at 2010-04-08T01:03:06+00:00 Add ghc-prim to test suite deps - - - - - 27371e3a by Simon Hengel at 2010-04-08T19:26:34+00:00 Let parsing fails on paragraphs that are immediately followed by an example This is more consistent with the way we treat code blocks. - - - - - 83096e4a by David Waern at 2010-04-08T21:20:00+00:00 Improve function name - - - - - 439983ce by David Waern at 2010-04-10T10:46:14+00:00 Fix haskell/haddock#112 No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds. - - - - - 5c0d35d7 by David Waern at 2010-04-10T10:54:06+00:00 Rename startGhc into withGhc - - - - - dca081fa by Simon Hengel at 2010-04-12T19:09:16+00:00 Add documentation for interactive examples - - - - - c7f26bfa by David Waern at 2010-04-13T00:51:51+00:00 Slight fix to the documentation of examples - - - - - 06eb7c4c by David Waern at 2010-04-13T00:57:05+00:00 Rename Interactive Examples into Examples (and simplify explanation) - - - - - 264830cb by David Waern at 2010-05-10T20:07:27+00:00 Update CHANGES with info about 2.6.1 - - - - - 8e5d4514 by Simon Hengel at 2010-04-18T18:16:54+00:00 Add unit tests for parser - - - - - 68297f40 by David Waern at 2010-05-10T21:53:37+00:00 Improve testsuite README - - - - - f04eb6e4 by David Waern at 2010-05-11T19:14:31+00:00 Re-organise the testsuite structure - - - - - a360f710 by David Waern at 2010-05-11T19:18:03+00:00 Shorten function name - - - - - 1d5dd359 by David Waern at 2010-05-11T21:40:02+00:00 Update runtests.hs following testsuite re-organisation - - - - - ffebe217 by David Waern at 2010-05-11T21:40:10+00:00 Update runtests.hs to use base-4.2.0.1 - - - - - 635de402 by David Waern at 2010-05-11T21:41:11+00:00 Update runparsetests.hs following testsuite reorganisation - - - - - 72137910 by Ian Lynagh at 2010-05-06T20:43:06+00:00 Fix build - - - - - 1a80b76e by Ian Lynagh at 2010-05-06T22:25:29+00:00 Remove redundant import - - - - - 1031a80c by Simon Peyton Jones at 2010-05-07T13:21:09+00:00 Minor wibbles to HsBang stuff - - - - - dd8e7fe5 by Ian Lynagh at 2010-05-08T15:22:00+00:00 GHC build system: Follow "rm" variable changes - - - - - 7f5e6748 by David Waern at 2010-05-13T11:53:02+00:00 Fix build with GHC 6.12.2 - - - - - 7953d4d8 by David Waern at 2010-05-13T18:45:01+00:00 Fixes to comments only - - - - - 8ae8eb64 by David Waern at 2010-05-13T18:57:26+00:00 ModuleMap -> IfaceMap - - - - - 1c3eadc6 by David Waern at 2010-05-13T19:03:13+00:00 Fix whitespace style issues - - - - - e96783c0 by David Waern at 2010-05-13T19:08:53+00:00 Fix comment - - - - - c998a78b by David Waern at 2010-05-13T19:39:00+00:00 Position the module header the same way everywhere Silly, but nice with some consistency :-) - - - - - b48a714e by David Waern at 2010-05-13T19:41:32+00:00 Position of module header, this time in the HTML backends - - - - - f9bfb12e by David Waern at 2010-05-13T19:43:05+00:00 Two newlines between declarations in Main - - - - - 071d44c7 by David Waern at 2010-05-13T19:44:21+00:00 Newlines in Convert - - - - - 036346db by David Waern at 2010-05-13T19:46:47+00:00 Fix a few stylistic issues in H.InterfaceFile - - - - - f0b8379e by David Waern at 2010-05-13T19:47:53+00:00 Add newlines to H.ModuleTree - - - - - 27409f8e by David Waern at 2010-05-13T19:51:10+00:00 Fix stylistic issues in H.Utils - - - - - 24774a11 by David Waern at 2010-05-13T20:00:43+00:00 Structure H.Types better - - - - - 7b6f5e40 by David Waern at 2010-05-13T20:01:04+00:00 Remove bad Arbitrary instance - - - - - fac9f1f6 by David Waern at 2010-05-13T20:05:50+00:00 Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead - - - - - fe6d00c4 by David Waern at 2010-05-13T20:51:55+00:00 Export a couple of more types from the API - - - - - b2e33a5f by David Waern at 2010-05-13T21:27:51+00:00 Improve doc comment for Interface - - - - - c585f2ce by David Waern at 2010-05-13T21:30:14+00:00 Improve documentation of Haddock.Interface - - - - - e6791db2 by David Waern at 2010-05-13T22:07:35+00:00 Remove meaningless comments - - - - - 7801b390 by David Waern at 2010-05-14T17:53:33+00:00 Remove unused modules - - - - - f813e937 by David Waern at 2010-05-14T17:55:17+00:00 Re-direct compilation output to a temporary directory Also add a flag --no-tmp-comp-dir that can be used to get the old behaviour of writing compilation files to GHC's output directory (default "."). - - - - - e56737ec by David Waern at 2010-05-14T18:06:11+00:00 Wibble - - - - - e40b0447 by David Waern at 2010-05-14T19:01:52+00:00 Move flag evaluation code from Main to Haddock.Options Determining the value of "singular" flags (by e.g. taking the last occurrence of the flag) and other flag evaluation should done in Haddock.Options which is the module that is supposed to define the command line interface. This makes Main a bit easier on the eyes as well. - - - - - 27091f57 by David Waern at 2010-05-14T19:05:10+00:00 Wibble - - - - - c658cf61 by David Waern at 2010-05-14T19:06:49+00:00 Re-order things in Haddock.Options a bit - - - - - 8cfdd342 by David Waern at 2010-05-14T19:20:29+00:00 De-tabify Haddock.Options and fix other whitespace issues - - - - - 0df16b62 by David Waern at 2010-05-14T19:25:07+00:00 Improve comments - - - - - 80b38e2b by David Waern at 2010-05-14T19:26:42+00:00 Whitespace police - - - - - fe580255 by David Waern at 2010-05-14T19:31:23+00:00 Wibbles to comments - - - - - a2b43fad by David Waern at 2010-05-14T20:24:32+00:00 Move some more flag functions to Haddock.Options - - - - - 3f895547 by David Waern at 2010-05-14T20:37:12+00:00 Make renderStep a top-level function in Main - - - - - 5cdca11d by David Waern at 2010-05-14T20:39:27+00:00 Spelling in comment - - - - - ad98d14c by David Waern at 2010-05-14T20:40:26+00:00 Comment fixes - - - - - 0bb9218f by David Waern at 2010-05-14T20:49:01+00:00 Whitespace police - - - - - 0f0a533f by David Waern at 2010-05-15T16:42:29+00:00 Improve description of --dump-interface - - - - - 5b2833ac by David Waern at 2010-05-15T17:16:53+00:00 Document --no-tmp-comp-dir - - - - - 8160b170 by David Waern at 2010-05-15T17:18:59+00:00 Wibble - - - - - 570dbe33 by David Waern at 2010-05-18T21:15:38+00:00 HLint police - - - - - 204e425f by David Waern at 2010-05-18T21:16:30+00:00 HLint police - - - - - 6db657ac by David Waern at 2010-05-18T21:16:37+00:00 Wibble - - - - - b942ccd7 by Simon Marlow at 2010-06-02T08:27:30+00:00 Interrupted disappeared in GHC 6.13 (GHC ticket haskell/haddock#4100) - - - - - 3b94a819 by Simon Marlow at 2010-06-02T08:45:08+00:00 Allow base-4.3 - - - - - c5a1fb7c by Simon Marlow at 2010-06-02T09:03:04+00:00 Fix compilation with GHC 6.13 - - - - - 6181296c by David Waern at 2010-06-08T21:09:05+00:00 Display name of prologue file when parsing it fails - - - - - 7cbc6f60 by Ian Lynagh at 2010-06-13T16:20:25+00:00 Remove redundant imports - - - - - 980c804b by Simon Marlow at 2010-06-22T08:41:50+00:00 isLocalAndTypeInferenced: fix for local module names overlapping package modules - - - - - d74d4a12 by Simon Marlow at 2010-06-23T12:03:27+00:00 Unresolved identifiers in Doc get replaced with DocMonospaced rather than plain strings - - - - - d8546783 by Simon Marlow at 2010-06-30T12:45:17+00:00 LaTeX backend (new options: --latex, --latex-style=<style>) - - - - - 437afa9e by David Waern at 2010-07-01T12:02:44+00:00 Fix a few stylistic whitespace issues in LaTeX backend - - - - - 85bc1fae by David Waern at 2010-07-01T15:42:45+00:00 Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this) - - - - - 7d2eb86f by David Waern at 2010-07-01T15:43:33+00:00 Update test following Simon's patch to render unresolved names in monospaced font - - - - - 08fcbcd2 by David Waern at 2010-07-01T16:12:18+00:00 Warning police - - - - - d04a8d7a by David Waern at 2010-07-04T14:53:39+00:00 Fix a bug in attachInstances We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however. - - - - - d10344eb by Simon Hengel at 2010-07-10T09:19:04+00:00 Add missing dependencies to cabal file - - - - - 24090531 by Mark Lentczner at 2010-03-21T04:51:16+00:00 add exports to Xhtml modules - - - - - 84f9a333 by Mark Lentczner at 2010-04-03T19:14:22+00:00 clean up Doc formatting code - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up <pre> sections - - - - - bebccf52 by Mark Lentczner at 2010-04-04T04:51:08+00:00 tweak list css - - - - - 0c2aeb5e by Mark Lentczner at 2010-04-04T06:24:14+00:00 all decls now generate Html not HtmlTable - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code - - - - - dbf73e6e by Mark Lentczner at 2010-04-05T05:02:43+00:00 clean up processExport and place a div around each decl - - - - - e25b7e9f by Mark Lentczner at 2010-04-10T21:23:21+00:00 data decls are now a sequence of paragraphs, not a table - - - - - 89ee0294 by Mark Lentczner at 2010-04-10T21:29:16+00:00 removed commented out code that can't be maintained - - - - - d466f536 by Mark Lentczner at 2010-04-12T04:56:27+00:00 removed declWithDoc and cleaned up data decls in summary - - - - - ed755832 by Mark Lentczner at 2010-04-12T05:07:53+00:00 merge in markupExample changes - - - - - c36f51fd by Mark Lentczner at 2010-04-25T04:56:37+00:00 made record fields be an unordList, not a table - - - - - ed3a28d6 by Mark Lentczner at 2010-04-25T05:23:28+00:00 fixed surround of instance and constructor tables - - - - - 0e35bbc4 by Mark Lentczner at 2010-04-25T05:36:59+00:00 fix class member boxes in summary - - - - - 5041749b by Mark Lentczner at 2010-04-25T05:38:35+00:00 remove unused bodyBox - - - - - e91724db by Mark Lentczner at 2010-04-25T06:26:10+00:00 fixed javascript quoting/escpaing issue - - - - - f4abbb73 by Mark Lentczner at 2010-05-03T23:04:31+00:00 adjust css for current markup - - - - - e75fec4c by Mark Lentczner at 2010-05-04T06:14:34+00:00 added assoicated types and methods back into class decls - - - - - 84169323 by Mark Lentczner at 2010-05-24T13:13:42+00:00 merge in changes from the big-whitespace cleanup - - - - - 3c1c872e by Mark Lentczner at 2010-06-11T21:03:58+00:00 adjust synopsis and bottom bar spacing - - - - - 3c1f9ef7 by Mark Lentczner at 2010-06-11T21:14:44+00:00 fix missing space in "module" lines in synoposis - - - - - 9a137e6d by Mark Lentczner at 2010-06-11T21:34:08+00:00 changed tt elements to code elements - - - - - 50f71ef1 by Mark Lentczner at 2010-06-11T23:27:46+00:00 factored out ppInstances - - - - - 3b9a9de5 by Mark Lentczner at 2010-06-17T17:36:01+00:00 push single constructors (newtype) onto line with decl - - - - - e0f8f2ec by Mark Lentczner at 2010-06-17T22:20:56+00:00 remove <++> connector - - - - - 56c075dd by Mark Lentczner at 2010-07-13T05:26:21+00:00 change to new page structure - - - - - 04be6ca7 by Mark Lentczner at 2010-07-14T04:21:55+00:00 constructors and args as dl lists, built in Layout.hs - - - - - 65aeafc2 by Mark Lentczner at 2010-07-14T05:38:32+00:00 better interface to subDecls - - - - - 72032189 by Mark Lentczner at 2010-07-14T07:04:10+00:00 made subDecl tables looks just so - - - - - b782eca2 by Mark Lentczner at 2010-07-14T16:00:54+00:00 convert args to SubDecl format - - - - - cc75e98f by Mark Lentczner at 2010-07-14T16:28:53+00:00 convert instances to SubDecl - - - - - 34e2aa5a by Mark Lentczner at 2010-07-14T21:07:32+00:00 removing old table cruft from Layout.hs - - - - - d5810d95 by Mark Lentczner at 2010-07-14T21:54:58+00:00 methods and associated types in new layout scheme - - - - - 65ef9579 by Mark Lentczner at 2010-07-14T23:43:42+00:00 clean up synopsis lists - - - - - e523318f by Mark Lentczner at 2010-07-15T05:02:26+00:00 clean up of anchors - - - - - 1215dfc5 by Mark Lentczner at 2010-07-15T23:53:01+00:00 added two new themes and rough css switcher - - - - - 7f0fd36f by Mark Lentczner at 2010-07-16T04:57:38+00:00 fixed package catpion, added style menu - - - - - 0dd4999c by Mark Lentczner at 2010-07-16T20:12:39+00:00 new output for mini_ pages - - - - - 64b2810b by Mark Lentczner at 2010-07-16T20:58:41+00:00 reformat index-frames - - - - - 3173f555 by Mark Lentczner at 2010-07-16T22:41:53+00:00 convert index to new markup - - - - - b0a4b7c9 by Mark Lentczner at 2010-07-17T04:07:22+00:00 convert index.html to new markup, adjust module markup - - - - - 8261ae1e by Mark Lentczner at 2010-07-17T05:07:29+00:00 classing styling of ancillary pages - - - - - 2a4fb025 by Mark Lentczner at 2010-07-17T05:11:45+00:00 clean up Layout.hs: no more vanillaTable - - - - - 87eec685 by Mark Lentczner at 2010-07-17T05:35:16+00:00 clean up Util.hs - - - - - d304e9b0 by Mark Lentczner at 2010-07-17T05:38:50+00:00 qualify import of XHtml as XHtml - - - - - 7dc05807 by Mark Lentczner at 2010-07-17T06:17:53+00:00 factored out head element generation - - - - - 9cdaec9e by Mark Lentczner at 2010-07-17T06:44:54+00:00 refactored out main page body generation - - - - - 8a51019e by Mark Lentczner at 2010-07-17T06:48:20+00:00 moved footer into only place that used it - - - - - efa479da by Mark Lentczner at 2010-07-17T18:48:30+00:00 styling auxillary pages for tibbe and snappy themes - - - - - 81de5509 by Mark Lentczner at 2010-07-18T04:41:38+00:00 fixed alphabet on index page, and styling of it and packages in module lists - - - - - 20718c1a by Mark Lentczner at 2010-07-18T05:34:29+00:00 cleaned up div functions in Layout.hs - - - - - 60d50453 by Mark Lentczner at 2010-07-18T05:48:39+00:00 added content div to main pages - - - - - ed16561c by Mark Lentczner at 2010-07-18T06:12:22+00:00 add .doc class to documentation blocks - - - - - f5c781b0 by Mark Lentczner at 2010-07-19T05:20:53+00:00 refactoring of anchor ID and fragment handling - - - - - a69a93bf by Mark Lentczner at 2010-07-19T05:35:55+00:00 remove an explicit bold tag - replace with .def class - - - - - d76c7225 by Mark Lentczner at 2010-07-19T06:56:15+00:00 rename Haddock.Backends.Xhtml.Util to Utils - - - - - 5a58c0da by David Waern at 2010-07-21T13:30:54+00:00 Remove trailing whitespace in Haddock.Backends.Xhtml - - - - - 0652aa17 by David Waern at 2010-07-21T13:33:21+00:00 Align a few comments - - - - - 785776c3 by David Waern at 2010-07-21T13:39:04+00:00 Remove trailing whitespace in H.B.X.Decl - - - - - 71a30710 by David Waern at 2010-07-21T13:44:27+00:00 Remove more trailing whitespace - - - - - 38750394 by David Waern at 2010-07-21T13:50:43+00:00 Style police - - - - - 3023d940 by David Waern at 2010-07-21T14:01:22+00:00 Style police in H.B.X.Decl - - - - - df16e9e6 by David Waern at 2010-07-21T14:14:45+00:00 Style police in H.B.X.DocMarkup - - - - - 6020e321 by David Waern at 2010-07-21T14:17:32+00:00 More style police - - - - - 86ad8bf5 by David Waern at 2010-07-21T14:21:02+00:00 Style police in H.B.Xhtml - - - - - aea27d03 by David Waern at 2010-07-21T14:42:03+00:00 Fix warnings in LaTeX backend - - - - - 2aff34a9 by David Waern at 2010-07-21T14:50:46+00:00 Style police in LaTeX backend (mainly more newlines) - - - - - e517162d by David Waern at 2010-07-21T15:05:47+00:00 Doc sections in Main - - - - - b971aa0c by David Waern at 2010-07-21T15:06:17+00:00 Trailing whitespace in Documentation.Haddock - - - - - f11628fb by David Waern at 2010-07-21T15:07:06+00:00 Trailing whitespace in Haddock.Convert - - - - - cbaf284c by David Waern at 2010-07-21T15:08:11+00:00 Style police in Haddock.GhcUtils - - - - - 71feb77b by David Waern at 2010-07-21T15:09:06+00:00 Style police in Haddock.InterfaceFile - - - - - 0a9c80e6 by David Waern at 2010-07-21T15:11:33+00:00 Whitespace police - - - - - 6168376c by David Waern at 2010-07-21T15:16:35+00:00 Style police in Haddock.Utils - - - - - 9fe4dd90 by David Waern at 2010-07-21T15:19:31+00:00 Add -fwarn-tabs - - - - - a000d752 by Mark Lentczner at 2010-07-20T17:25:52+00:00 move CSS Theme functions into Themes.hs - - - - - b52b440f by Mark Lentczner at 2010-07-20T17:29:35+00:00 add Thomas Schilling's theme - - - - - e43fa7e8 by Mark Lentczner at 2010-07-21T04:49:34+00:00 correct icon used with Snappy theme - - - - - ba5092d3 by Mark Lentczner at 2010-07-21T04:56:47+00:00 apply Tibbe's updates to his theme - - - - - 7804eef6 by Mark Lentczner at 2010-07-21T05:15:49+00:00 space between "Style" and the downward triangle - - - - - 7131d4c6 by Mark Lentczner at 2010-07-21T17:43:35+00:00 merge with David's source cleanups - - - - - ee65f1cb by David Waern at 2010-07-22T16:50:46+00:00 Fix a bug where we allowed --hoogle, --latex, etc without input files - - - - - e413ff7a by David Waern at 2010-07-22T17:21:58+00:00 Improve function name - - - - - a0fd14f3 by Simon Marlow at 2010-06-30T15:34:32+00:00 fix warnings - - - - - 31f73d2a by David Waern at 2010-07-22T19:29:41+00:00 Solve conflicts - - - - - d563b4a5 by Simon Marlow at 2010-06-30T15:34:37+00:00 fix warning - - - - - 412b6469 by David Waern at 2010-07-22T19:31:28+00:00 Solve conflict - - - - - 35174b94 by Ian Lynagh at 2010-07-06T17:27:16+00:00 Follow mkPState argument order change - - - - - b5c3585c by Simon Marlow at 2010-07-14T08:49:21+00:00 common up code for instance rendering - - - - - d8009560 by Simon Marlow at 2010-07-14T12:37:11+00:00 fix warnings - - - - - a6d88695 by David Waern at 2010-07-24T15:33:33+00:00 Fix build with ghc < 6.13 - - - - - 94cf9de1 by David Waern at 2010-07-24T15:34:37+00:00 Remove conflict left-over - - - - - 313b15c0 by Mark Lentczner at 2010-07-21T22:09:04+00:00 reorganization of nhaddock.css with tibbe - - - - - 9defed80 by Mark Lentczner at 2010-07-21T22:42:14+00:00 further cleanup of nhaddock.css, float TOC, support aux. pages - - - - - 6d944c1b by Mark Lentczner at 2010-07-22T06:22:23+00:00 remove old HTML backend - - - - - b3e8cba5 by Mark Lentczner at 2010-07-22T06:43:32+00:00 remove --html-help support - it was old, out-of-date, and mostly missing - - - - - d2654a08 by Mark Lentczner at 2010-07-22T21:45:34+00:00 tweaks to nhaddock.css - - - - - f73b285c by Mark Lentczner at 2010-07-23T06:19:35+00:00 command like processing for theme selection The bulk of the change is threadnig the selected theme set through functions in Xhtml.hs so that the selected themes can be used when generating the page output. There isn't much going on in most of these changes, just passing it along. The real work is all done in Themes.hs. - - - - - 8bddc90d by Mark Lentczner at 2010-07-23T06:58:31+00:00 drop --themes support, add named theme support decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. - - - - - 20cafd4f by Mark Lentczner at 2010-07-23T17:44:29+00:00 rename --default-themes to --built-in-themes - - - - - 0fe41307 by Mark Lentczner at 2010-07-23T18:33:02+00:00 tweaks to theme for info table, headings, and tables - - - - - cba4fee0 by Mark Lentczner at 2010-07-23T19:13:59+00:00 tweaks for dl layout, though still not used - - - - - 463fa294 by Mark Lentczner at 2010-07-23T21:07:19+00:00 tweak look of mini pages, keywords, and preblocks - - - - - 5472fc02 by Mark Lentczner at 2010-07-24T05:36:15+00:00 slide out Synopsis drawer - - - - - 9d5d5de5 by Mark Lentczner at 2010-07-24T06:02:42+00:00 extend package header and footer to edges of page - - - - - a47c91a2 by Mark Lentczner at 2010-07-24T06:28:44+00:00 fields are def lists, tweak css for style menu, mini pages, arguments - - - - - ca20f23b by Mark Lentczner at 2010-07-24T16:55:22+00:00 excisting last vestiges of the --xhtml flag - - - - - 71fb012e by Mark Lentczner at 2010-07-25T18:47:49+00:00 change how collapsing sections are done make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags - - - - - c168c8d3 by Mark Lentczner at 2010-07-26T00:32:05+00:00 reorganize files in the html lib data dir - - - - - 93324301 by Mark Lentczner at 2010-07-26T01:27:42+00:00 cleaned up Themes.hs - - - - - ad3b5dd4 by Mark Lentczner at 2010-07-26T02:39:15+00:00 make module list use new collapsers - - - - - 1df9bfc6 by Mark Lentczner at 2010-07-27T19:09:25+00:00 remove Tibbe theme - - - - - 8b9b01b3 by Mark Lentczner at 2010-07-27T20:04:03+00:00 move themes into html dir with .theme and .std-theme extensions - - - - - a7beb965 by Mark Lentczner at 2010-07-27T21:06:34+00:00 give a class to empty dd elements so they can be hidden - - - - - a258c117 by Mark Lentczner at 2010-07-27T21:23:58+00:00 remove custom version of copyFile in Xhtml.hs - - - - - b70dba6e by Mark Lentczner at 2010-07-27T22:12:45+00:00 apply margin changes to pre and headings as per group decision, and small cleanups - - - - - e6f722a2 by Mark Lentczner at 2010-07-28T00:03:12+00:00 make info block and package bar links be floatable by placing them first in the dom tree - - - - - c8278867 by Mark Lentczner at 2010-07-28T19:01:18+00:00 styling source links on declarations - - - - - 88fdc399 by Mark Lentczner at 2010-07-29T01:12:46+00:00 styling tweaks don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers - - - - - 8a75b213 by Ian Lynagh at 2010-07-30T20:21:46+00:00 Fix build in GHC tree - - - - - ce8e18b3 by Simon Hengel at 2010-08-03T18:37:26+00:00 Adapt paths to data files in cabal file - - - - - 9701a455 by Simon Hengel at 2010-08-07T13:20:27+00:00 Add missing dependency to cabal file - - - - - 01b838d1 by Mark Lentczner at 2010-07-30T20:19:40+00:00 improved synopsis drawer: on click, not hover - - - - - 7b6f3e59 by Mark Lentczner at 2010-07-30T23:38:55+00:00 put the synopsis back in the other themes - - - - - 7b2904c9 by Mark Lentczner at 2010-08-11T11:11:26+00:00 close arrows on expanded synopsis drawer - - - - - ea19e177 by Mark Lentczner at 2010-08-12T21:16:45+00:00 width and font changes removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent - - - - - 5ced00c0 by Mark Lentczner at 2010-08-13T15:09:55+00:00 implemented YUI's CSS font approach - - - - - 2799c548 by Mark Lentczner at 2010-08-13T15:11:59+00:00 adjusted margin to 2em, 1 wasn't enough - - - - - 58f06893 by Mark Lentczner at 2010-08-13T15:48:44+00:00 removed underlining on hover for named anchors headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute - - - - - 7aced4c4 by Mark Lentczner at 2010-08-13T15:50:22+00:00 more space between elements - - - - - 5a3c1cce by Mark Lentczner at 2010-08-13T16:43:43+00:00 adjusted font sizes of auxilary pages per new scheme - - - - - 487539ef by Mark Lentczner at 2010-08-13T21:43:41+00:00 add Frames button and clean up frames.html - - - - - c1a140b6 by Mark Lentczner at 2010-08-13T22:17:48+00:00 move frames button to js - - - - - b0bdb68e by Mark Lentczner at 2010-08-14T03:44:46+00:00 build style menu in javascript moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page - - - - - 43ab7120 by Mark Lentczner at 2010-08-16T15:15:37+00:00 font size and margin tweaks - - - - - c0b68652 by Mark Lentczner at 2010-08-17T18:19:52+00:00 clean up collapser logics javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS - - - - - 5d573427 by Mark Lentczner at 2010-08-17T23:06:02+00:00 don't collapse entries in module list when clicking on links - - - - - 8c307c4a by Mark Lentczner at 2010-08-17T23:21:43+00:00 add missing data file to .cabal - - - - - 414bcfcf by Mark Lentczner at 2010-08-17T23:28:47+00:00 remove synopsis when in frames - - - - - ba0fa98a by Mark Lentczner at 2010-08-18T16:16:11+00:00 layout tweeks - mini page font size, toc color, etc. - - - - - 63c1bed1 by Mark Lentczner at 2010-08-18T19:50:02+00:00 margin fiddling - - - - - c311c094 by Mark Lentczner at 2010-08-20T01:37:55+00:00 better synopsis handling logic - no flashing - - - - - f1fe5fa8 by Mark Lentczner at 2010-08-20T01:41:06+00:00 fix small layout issues mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers - - - - - 0de84d77 by Mark Lentczner at 2010-08-20T02:13:09+00:00 made style changing and cookies storage robust - - - - - 1ef064f9 by Thomas Schilling at 2010-08-04T13:12:22+00:00 Make synopsis frame behave properly in Firefox. In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. - - - - - dd1c9a94 by Mark Lentczner at 2010-08-21T01:46:19+00:00 remove Snappy theme - - - - - 2353a90d by Mark Lentczner at 2010-08-25T05:16:19+00:00 fix occasional v.scroll bars on pre blocks (I think) - - - - - 459b8bf1 by Simon Hengel at 2010-08-08T10:12:45+00:00 Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API - - - - - b1b68675 by David Waern at 2010-08-26T20:31:58+00:00 Follow recent API additions with some refactorings Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. - - - - - 264d4d67 by David Waern at 2010-08-26T21:40:59+00:00 Get rid of GhcModule and related cruft We can get everything we need directly from TypecheckedModule. - - - - - 0feacec2 by Mark Lentczner at 2010-08-26T23:44:13+00:00 fixed CSS for ordered lists and def lists in doc blocks - - - - - 2997e0c2 by Mark Lentczner at 2010-08-26T23:45:03+00:00 support both kinds of enumerated lists in doc markup The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported - - - - - 5d4ddeec by Mark Lentczner at 2010-08-27T21:29:48+00:00 fix broken header link margins - - - - - 614456ba by Mark Lentczner at 2010-08-27T22:16:19+00:00 fix table of contents CSS - - - - - 03f329a2 by David Waern at 2010-08-28T16:36:09+00:00 Update tests following switch to the Xhtml backend - - - - - ca689fa2 by Mark Lentczner at 2010-08-28T18:25:16+00:00 fix def lists - - - - - 18e1d3d2 by Mark Lentczner at 2010-08-28T18:26:18+00:00 push footer to bottom of window - - - - - b0ab8d82 by David Waern at 2010-08-28T22:04:32+00:00 Whitespace police - - - - - 2d217977 by David Waern at 2010-08-29T12:44:45+00:00 Remove Snappy data files - - - - - 01e27d5f by David Waern at 2010-08-29T13:03:28+00:00 Add source entity path to --read-interface You can now use this flag like this: --read-interface=<html path>,<source entity path>,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. - - - - - 20bf4aaa by David Waern at 2010-08-29T13:11:03+00:00 Naming wibbles - - - - - ad22463f by Mark Lentczner at 2010-08-29T15:14:54+00:00 make portability block be a table - solves layout issues - - - - - 97bd1ae6 by Mark Lentczner at 2010-08-29T15:17:42+00:00 update golden test for Test due to portability box change - - - - - d37e139e by Mark Lentczner at 2010-08-29T17:07:17+00:00 move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs - - - - - acf52501 by David Waern at 2010-08-29T17:32:36+00:00 Allow building with ghc < 6.16 - - - - - 1cb34ed8 by Ian Lynagh at 2010-07-24T23:18:49+00:00 Flatten the dynflags before parsing - - - - - b36845b4 by Ian Lynagh at 2010-07-24T23:26:49+00:00 Follow flattenLanguageFlags -> flattenExtensionFlags rename - - - - - 7f7fcc7e by David Waern at 2010-08-29T17:46:23+00:00 Use flattenExtensionFlags with ghc >= 6.13 only - - - - - 13cf9411 by Ian Lynagh at 2010-08-01T18:09:54+00:00 Make the main haddock script versioned, and make plain "haddock" a symlink - - - - - 495cbff2 by Ian Lynagh at 2010-08-18T18:57:24+00:00 Fix installation in the GHC build system Data-files are now in subdirectories, so we need to handle that - - - - - 88ebab0a by Ian Lynagh at 2010-08-18T19:43:53+00:00 GHC build system: Add all the data files to BINDIST_EXTRAS - - - - - 65837172 by David Waern at 2010-08-29T20:12:34+00:00 Update Test - - - - - 094bbaa2 by David Waern at 2010-08-29T20:55:14+00:00 Revert update to Test - - - - - a881cfb3 by David Waern at 2010-08-31T18:24:15+00:00 Bump version number - - - - - 1fc8a3eb by David Waern at 2010-08-31T22:32:27+00:00 Update ANNOUNCE - - - - - ee1df9d0 by David Waern at 2010-08-31T22:33:11+00:00 Update CHANGES - - - - - 394cc854 by David Waern at 2010-08-31T22:33:23+00:00 Update interface file versioning to work with ghc 6.14/15 - - - - - 7d03b79b by David Waern at 2010-08-31T22:36:00+00:00 Update test output following version change - - - - - a48d82d1 by Mark Lentczner at 2010-09-01T04:29:35+00:00 sort options in doc to match --help output removed --html-help option, as it is no longer supported - - - - - 06561aeb by Mark Lentczner at 2010-09-01T05:29:32+00:00 update options documentation rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents - - - - - 57dea832 by Mark Lentczner at 2010-09-01T05:31:27+00:00 slight wording change about Frames mode - - - - - fa1f6da3 by David Waern at 2010-09-01T10:57:44+00:00 Update doc configure script to find docbook stylesheets on arch linux - - - - - addff770 by David Waern at 2010-09-01T11:02:29+00:00 Wibble - - - - - 8399006d by David Waern at 2010-09-01T11:19:21+00:00 Replace ghci> with >>> in example syntax - - - - - 35074cf8 by David Waern at 2010-09-01T19:03:27+00:00 Improve docs for --no-tmp-comp-dir - - - - - 0f8f8cfd by David Waern at 2010-09-02T11:22:27+00:00 Add a list of contributors to the user guide Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. - - - - - 42ccf099 by David Waern at 2010-09-02T11:29:22+00:00 Update copyright years in license - - - - - 0d560479 by David Waern at 2010-09-02T11:38:52+00:00 Update release instructions - - - - - 72ab7796 by David Waern at 2010-09-02T19:27:08+00:00 Add a note to ANNOUNCE - - - - - bf9d9c5d by David Waern at 2010-09-02T19:27:48+00:00 H.Utils needs FFI on Win+MinGW - - - - - 048ae44a by Mark Lentczner at 2010-09-04T23:19:47+00:00 make TOC group header identifiers validate - - - - - 8c6faf36 by Simon Michael at 2010-09-22T07:12:34+00:00 add hints for cleaner darcs show authors output - - - - - 9909bd17 by Simon Michael at 2010-09-22T17:58:06+00:00 print haddock coverage info on stdout when generating docs A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability. - - - - - 6da72171 by David Waern at 2010-10-03T21:31:24+00:00 Style wibble - - - - - 2f8d8e4d by Tobias Brandt at 2010-08-27T07:01:21+00:00 adding the option to fully qualify identifiers - - - - - 833be6c6 by Tobias Brandt at 2010-08-27T15:50:28+00:00 adding support for local and relative name qualification - - - - - df15c4e9 by Tobias Brandt at 2010-08-27T15:56:37+00:00 corrected qualification help message - - - - - 449e9ce1 by David Waern at 2010-10-16T17:34:30+00:00 Solve conflicts - - - - - 3469bda5 by David Waern at 2010-10-16T18:42:40+00:00 Use "qual" as an abbreviation for qualification instead of "quali" for consistency - - - - - 97c2d728 by David Waern at 2010-10-16T18:47:07+00:00 Style police - - - - - ce14fbea by David Waern at 2010-10-16T21:15:25+00:00 Style police - - - - - fdf29e9d by David Waern at 2010-10-17T00:30:44+00:00 Add a pointer to the style guide - - - - - 8e6b44e8 by rrnewton at 2010-10-24T03:19:28+00:00 Change to index pages: include an 'All' option even when subdividing A-Z. - - - - - 755b131c by David Waern at 2010-11-14T19:39:36+00:00 Bump version - - - - - d0345a04 by David Waern at 2010-11-14T19:41:59+00:00 TAG 2.8.1 - - - - - f6221508 by Simon Peyton Jones at 2010-09-13T09:53:00+00:00 Adapt to minor changes in internal GHC functions - - - - - 1290713d by Ian Lynagh at 2010-09-15T10:37:18+00:00 Remove duplicate Outputable instance for Data.Map.Map - - - - - 87f69eef by Ian Lynagh at 2010-09-21T15:01:10+00:00 Bump GHC dep upper bound - - - - - af36e087 by Ian Lynagh at 2010-09-21T15:12:02+00:00 Fix up __GLASGOW_HASKELL__ tests - - - - - ad67716c by Ian Lynagh at 2010-09-21T20:31:35+00:00 Don't build haddock is HADDOCK_DOCS is NO - - - - - 63b3f1f5 by Ian Lynagh at 2010-09-21T21:39:51+00:00 Fixes for when HADDOCK_DOCS=NO - - - - - e92bfa42 by Ian Lynagh at 2010-09-29T21:15:38+00:00 Fix URL creation on Windows: Use / not \ in URLs. Fixes haskell/haddock#4353 - - - - - 66c55e05 by Ian Lynagh at 2010-09-30T17:03:34+00:00 Tidy up haddock symlink installation In particular, it now doesn't get created if we aren't installing haddock. - - - - - 549b5556 by Ian Lynagh at 2010-10-23T21:17:14+00:00 Follow extension-flattening change in GHC - - - - - d7c2f72b by David Waern at 2010-11-14T20:17:55+00:00 Bump version to 2.8.2 - - - - - 6989a3a9 by David Waern at 2010-11-14T20:26:01+00:00 Solve conflict - - - - - 055c6910 by Ian Lynagh at 2010-09-22T15:36:20+00:00 Bump GHC dep - - - - - c96c0763 by Simon Marlow at 2010-10-27T11:09:44+00:00 follow changes in the GHC API - - - - - 45907129 by David Waern at 2010-11-07T14:00:58+00:00 Update the HCAR entry - - - - - 61940b95 by David Waern at 2010-11-07T14:07:34+00:00 Make the HCAR entry smaller - - - - - aa590b7d by David Waern at 2010-11-14T21:30:59+00:00 Update HCAR entry with November 2010 version - - - - - 587f9847 by David Waern at 2010-11-14T23:48:17+00:00 Require ghc >= 7.0 - - - - - ff5c647c by David Waern at 2010-11-14T23:49:09+00:00 TAG 2.8.2 - - - - - 937fcb4f by David Waern at 2010-11-14T23:49:45+00:00 Solve conflict - - - - - 8e5d0c1a by David Waern at 2010-11-15T21:09:50+00:00 Remove code for ghc < 7 - - - - - 3d47b70a by David Waern at 2010-11-15T21:11:06+00:00 Fix bad merge - - - - - 7f4a0d8a by David Waern at 2010-11-15T21:13:57+00:00 Remove more ghc < 7 code - - - - - 9ee34b50 by David Waern at 2010-11-15T21:31:25+00:00 Match all AsyncExceptions in exception handler - - - - - 42849c70 by David Waern at 2010-11-15T21:35:31+00:00 Just say "internal error" instead of "internal Haddock or GHC error" - - - - - c88c809b by David Waern at 2010-11-15T21:44:19+00:00 Remove docNameOcc under the motto "don't name compositions" - - - - - b798fc7c by David Waern at 2010-11-15T23:27:13+00:00 Wibble - - - - - 2228197e by David Waern at 2010-11-15T23:28:24+00:00 Rename the HCAR entry file - - - - - 8a3f9090 by David Waern at 2010-11-16T00:05:29+00:00 Remove Haskell 2010 extensions from .cabal file - - - - - c7a0c597 by David Waern at 2010-11-16T00:10:28+00:00 Style wibbles - - - - - cde707a5 by David Waern at 2010-11-16T00:12:00+00:00 Remove LANGUAGE ForeignFunctionInterface pragmas - - - - - 1dbda8ed by David Waern at 2010-11-16T00:17:21+00:00 Make a little more use of DoAndIfThenElse - - - - - 4c45ff6e by David Waern at 2010-11-16T00:59:41+00:00 hlint police - - - - - d2feaf09 by David Waern at 2010-11-16T01:14:15+00:00 hlint police - - - - - 99876e97 by David Waern at 2010-11-20T19:06:00+00:00 Haddock documentation updates - - - - - 65ce6987 by David Waern at 2010-11-20T19:42:51+00:00 Follow the style guide closer in Haddock.Types and improve docs - - - - - 28ca304a by tob.brandt at 2010-11-20T17:04:40+00:00 add full qualification for undocumented names - - - - - d61341e3 by David Waern at 2010-11-20T20:04:15+00:00 Re-structure qualification code a little - - - - - 0057e4d6 by David Waern at 2010-11-20T20:07:55+00:00 Re-order functions - - - - - d7279afd by David Waern at 2010-11-21T03:39:54+00:00 Add BangPatterns to alex and happy source files - - - - - 629fe60e by tob.brandt at 2010-11-23T23:35:11+00:00 documentation for qualification - - - - - 37031cee by David Waern at 2010-11-23T21:06:44+00:00 Update CHANGES - don't mention 2.8.2, we won't release it - - - - - f2489e19 by David Waern at 2010-12-01T21:57:11+00:00 Update deps of runtests.hs to work with ghc 7.0.1 - - - - - d3657e9a by David Waern at 2010-12-01T22:04:57+00:00 Make tests compile with ghc 7.0.1 - - - - - a2f09d9b by David Waern at 2010-12-01T22:06:59+00:00 Update tests following version bump - - - - - 50883ebb by David Waern at 2010-12-06T14:09:18+00:00 Update tests following recent changes - - - - - fc2fadeb by David Waern at 2010-12-06T14:17:29+00:00 Add a flag --pretty-html for rendering indented html with newlines - - - - - 30832ef2 by David Waern at 2010-12-06T14:17:35+00:00 Use --pretty-html when running the test suite. Makes it easier to compare output - - - - - a0b81b31 by David Waern at 2010-12-06T14:18:27+00:00 Wibble - - - - - 3aaa23fe by David Waern at 2010-12-06T14:19:29+00:00 Haddockify ppHtml comments - - - - - 24bb24f0 by David Waern at 2010-12-06T14:23:15+00:00 Remove --debug. It was't used, and --verbosity should take its place - - - - - 6bc076e5 by David Waern at 2010-12-06T14:25:37+00:00 Rename golden-tests into html-tests. "golden tests" sounds strange - - - - - 53301e55 by David Waern at 2010-12-06T14:26:26+00:00 QUALI -> QUAL in the description --qual for consistency - - - - - 98b6affb by David Waern at 2010-12-06T21:54:02+00:00 Bump version - - - - - 371bf1b3 by David Waern at 2010-12-06T22:08:55+00:00 Update tests following version bump - - - - - 25be762d by David Waern at 2010-12-06T22:21:03+00:00 Update CHANGES - - - - - 7c7dac71 by David Waern at 2010-12-06T22:33:43+00:00 Update ANNOUNCE - - - - - 30d7a5f2 by Simon Peyton Jones at 2010-11-15T08:38:38+00:00 Alex generates BangPatterns, so make Lex.x accept them (It'd be better for Alex to generate this pragma.) - - - - - 605e8018 by Simon Marlow at 2010-11-17T11:37:24+00:00 Add {-# LANGUAGE BangPatterns #-} to mollify GHC - - - - - a46607ba by David Waern at 2010-12-07T14:08:10+00:00 Solve conflicts - - - - - b28cda66 by David Waern at 2010-12-09T20:41:35+00:00 Docs: Mention that \ is a special character in markup - - - - - a435bfdd by Ian Lynagh at 2010-11-17T14:01:19+00:00 TAG GHC 7.0.1 release - - - - - 5a15a05a by David Waern at 2010-12-11T17:51:19+00:00 Fix indentation problem - - - - - 4232289a by Lennart Kolmodin at 2010-12-17T18:32:03+00:00 Revise haddock.cabal given that we now require ghc-7 default-language should be Haskell2010, slight new semantics for extensions. Rewrite into clearer dependencies of base and Cabal. - - - - - a36302dc by David Waern at 2010-12-19T17:12:37+00:00 Update CHANGES - - - - - 7c8b85b3 by David Waern at 2010-12-19T17:14:24+00:00 Bump version - - - - - cff22813 by Ian Lynagh at 2011-01-05T18:24:27+00:00 Write hoogle output in utf8; fixes GHC build on Windows - - - - - c7e762ea by David Waern at 2011-01-22T00:00:35+00:00 Put title outside doc div when HTML:fying title+prologue Avoids indenting the title, and makes more sense since the title is not a doc string anyway. - - - - - 5f639054 by David Waern at 2011-01-22T16:09:44+00:00 Fix spelling error - contributed by Marco Silva - - - - - c11dce78 by Ian Lynagh at 2011-01-07T02:33:11+00:00 Follow GHC build system changes - - - - - 101cfaf5 by David Waern at 2011-01-08T14:06:44+00:00 Bump version - - - - - af62348b by David Waern at 2011-01-08T14:07:07+00:00 TAG 2.9.2 - - - - - 4d1f6461 by Ian Lynagh at 2011-01-07T23:06:57+00:00 Name the haddock script haddock-ghc-7.0.2 instead of haddock-7.0.2; haskell/haddock#4882 "7.0.2" looked like a haddock version number before - - - - - 8ee4d5d3 by Simon Peyton Jones at 2011-01-10T17:31:12+00:00 Update Haddock to reflect change in hs_tyclds field of HsGroup - - - - - 06f3e3db by Ian Lynagh at 2011-03-03T15:02:37+00:00 TAG GHC 7.0.2 release - - - - - 7de0667d by David Waern at 2011-03-10T22:47:13+00:00 Update CHANGES - - - - - 33a9f1c8 by David Waern at 2011-03-10T22:47:31+00:00 Fix build with ghc 7.0.1 - - - - - 4616f861 by David Waern at 2011-03-10T22:47:50+00:00 TAG 2.9.2-actual - - - - - 0dab5e3c by Simon Hengel at 2011-04-08T15:53:01+00:00 Set shell script for unit tests back to work - - - - - 85c54dee by Simon Hengel at 2011-04-08T16:01:24+00:00 Set unit tests back to work Here "ghci>" was still used instead of ">>>". - - - - - 1cea9b78 by Simon Hengel at 2011-04-08T16:25:36+00:00 Update runtests.hs for GHC 7.0.2 - - - - - 8e5b3bbb by Simon Hengel at 2011-04-08T16:28:49+00:00 Update Haddock version in *.html.ref - - - - - 2545e955 by Simon Hengel at 2011-04-08T17:09:28+00:00 Add support for blank lines in the result of examples Result lines that only contain the string "<BLANKLINE>" are treated as a blank line. - - - - - adf64d2e by Simon Hengel at 2011-04-08T17:36:50+00:00 Add documentation for "support for blank lines in the result of examples" - - - - - c51352ca by David Waern at 2011-05-21T23:57:56+00:00 Improve a haddock comment - - - - - 7419cf2c by David Waern at 2011-05-22T15:41:52+00:00 Use cabal's test suite support to run the test suite This gives up proper dependency tracking of the test script. - - - - - 7770070c by David Waern at 2011-05-22T01:45:44+00:00 We don't need to send DocOptions nor a flag to mkExportItems - - - - - 9d95b7b6 by David Waern at 2011-05-22T21:39:03+00:00 Fix a bug - - - - - 1f93699b by David Waern at 2011-05-22T21:40:21+00:00 Break out fullContentsOf, give it a better name and some documentation The documentation describes how we want this function to eventually behave, once we have fixed a few problems with the current implementation. - - - - - 9a86432f by David Waern at 2011-05-22T21:53:52+00:00 Fix some stylistic issues in mkExportItems - - - - - c271ff0c by David Waern at 2011-05-22T22:09:11+00:00 Indentation - - - - - 93e602b1 by David Waern at 2011-06-10T01:35:31+00:00 Add git commits since switchover: darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower at hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo at earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm at cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo at earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC - - - - - 498da5ae by David Waern at 2011-06-11T00:33:33+00:00 * Merge in git patch from Michal Terepeta >From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001 From: Michal Terepeta <michal.terepeta at gmail.com> Date: Sat, 14 May 2011 19:18:22 +0200 Subject: [PATCH] Follow the change of TypeSig in GHC. This follows the change in GHC to make TypeSig take a list of names (instead of just one); GHC ticket haskell/haddock#1595. This should also improve the Haddock output in case the user writes a type signature that refers to many names: -- | Some comment.. foo, bar :: ... will now generate the expected output with one signature for both names. - - - - - 094607fe by Ian Lynagh at 2011-06-17T19:10:29+01:00 Fix build - - - - - 8fa35740 by Ian Lynagh at 2011-06-26T21:06:40+01:00 Bump GHC dep to allow 7.2 - - - - - e4d2ca3c by Ian Lynagh at 2011-07-07T23:06:28+01:00 Relax base dep - - - - - b948fde9 by Ian Lynagh at 2011-07-28T16:39:45+01:00 GHC build system: Don't install the datafiles twice - - - - - f82f6d70 by Simon Marlow at 2011-08-11T12:08:15+01:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - b341cc12 by Max Bolingbroke at 2011-08-22T20:25:27+01:00 Fix compilation with no-pred-ty GHC - - - - - 30494581 by Max Bolingbroke at 2011-08-23T10:20:54+01:00 Remaining fixes for PredTy removal - - - - - 0b197138 by Max Bolingbroke at 2011-08-26T08:27:45+01:00 Rename factKind to constraintKind - - - - - a379bec5 by Max Bolingbroke at 2011-09-04T12:54:47+01:00 Deal with change to IParam handling in GHC - - - - - f94e421b by Max Bolingbroke at 2011-09-06T17:34:31+01:00 Adapt Haddock for the ConstraintKind extension changes - - - - - 8821e5cc by Max Bolingbroke at 2011-09-09T08:24:59+01:00 Ignore associated type defaults (just as we ignore default methods) - - - - - 31a0afd4 by Max Bolingbroke at 2011-09-09T09:06:00+01:00 Merge branch 'no-pred-ty' of ssh://darcs.haskell.org/srv/darcs/haddock into no-pred-ty - - - - - dd3b530a by Max Bolingbroke at 2011-09-09T14:10:25+01:00 Merge branch 'no-pred-ty' Conflicts: src/Haddock/Convert.hs - - - - - 5f25ec96 by Max Bolingbroke at 2011-09-09T14:10:40+01:00 Replace FactTuple with ConstraintTuple - - - - - cd30b9cc by David Waern at 2011-09-26T02:17:55+02:00 Bump to version 2.9.3 - - - - - 4fbfd397 by Max Bolingbroke at 2011-09-27T14:55:21+01:00 Follow changes to BinIface Name serialization - - - - - 92257d90 by David Waern at 2011-09-30T23:45:07+02:00 Fix problem with test files not added to distribution tarball - - - - - 00255bda by David Waern at 2011-09-30T23:48:24+02:00 Merge branch 'development' - - - - - 5421264f by David Waern at 2011-10-01T01:25:39+02:00 Merge in darcs patch from Simon Meier: Wed Jun 1 19:41:16 CEST 2011 iridcode at gmail.com * prettier haddock coverage info The new coverage info rendering uses less horizontal space. This reduces the number of unnecessary line-wrappings. Moreover, the most important information, how much has been documented already, is now put up front. Hopefully, this makes it more likely that a library author is bothered by the low coverage of his modules and fixes that issue ;-) - - - - - 07d318ef by David Waern at 2011-10-01T01:34:10+02:00 Use printException instead of deprecated printExceptionAndWarnings - - - - - 40d52ee4 by David Waern at 2011-10-01T01:41:13+02:00 Merge in darcs pach: Mon Apr 11 18:09:54 JST 2011 Liyang HU <haddock at liyang.hu> * Remember collapsed sections in index.html / haddock-util.js - - - - - 279d6dd4 by David Waern at 2011-10-01T01:55:45+02:00 Merge in darcs patch: Joachim Breitner <mail at joachim-breitner.de>**20110619201645 Ignore-this: f6c51228205b0902ad5bfad5040b989a As reported on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578301, generating the global index takes much too long if type-level (with lots of auto-generated types) is installed. The patch avoids a quadratic runtime in the subfunction getIfaceIndex of ppHtmlIndex by using a temporary set. Runtime improvement observed here from 25.36s to 2.86s. - - - - - d1612383 by David Waern at 2011-10-01T01:56:48+02:00 Merge branch 'development' - - - - - 347520c1 by David Waern at 2011-10-01T01:56:54+02:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9a0c95e8 by David Waern at 2011-10-01T02:19:10+02:00 Improve .cabal file - - - - - 6967dc64 by Ian Lynagh at 2011-10-01T01:34:06+01:00 Follow changes to ForeignImport/ForeignExport in GHC - - - - - 565cb26b by Simon Marlow at 2011-10-04T00:15:04+02:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - 8b74f512 by David Waern at 2011-10-04T00:18:17+02:00 Requre ghc >= 7.2 - - - - - 271d360c by David Waern at 2011-10-04T00:22:50+02:00 Bump version to 2.9.4 - - - - - 37f3edb0 by David Waern at 2011-10-06T02:30:21+02:00 Add alex and happy to build-tools. - - - - - 7ac2bb6e by David Terei at 2011-10-12T14:02:55-07:00 Add safe haskell indication to haddock output - - - - - 42c91a47 by David Terei at 2011-10-12T14:06:03-07:00 Fix CSS issue with info table not being contained in module header - - - - - 0eddab6c by David Terei at 2011-10-12T14:06:58-07:00 Add safe haskell indication to haddock output - - - - - 3df058eb by David Terei at 2011-10-12T14:07:07-07:00 Fix CSS issue with info table not being contained in module header - - - - - a40a6c3f by David Waern at 2011-10-22T11:29:06+02:00 Bump .haddock file version since the format has changed recently - - - - - 8a6254be by David Waern at 2011-10-22T11:30:42+02:00 Merge branch 'development' - - - - - 642e3e02 by David Waern at 2011-10-23T21:23:39+02:00 Sort import list - - - - - 36371cf8 by David Waern at 2011-10-23T22:48:18+02:00 Remove NEW_GHC_LAYOUT conditional. - - - - - 5604b499 by David Waern at 2011-10-27T00:15:03+02:00 Add --print-ghc-path. - - - - - 463499fa by David Waern at 2011-10-27T00:16:22+02:00 Make testsuite able to find its dependencies automatically. - - - - - a3506172 by Ryan Newton at 2011-11-05T05:59:58-04:00 Improved declNames internal error. Added a case to handle DocD. - - - - - 001b8baf by David Waern at 2011-11-05T20:37:29+01:00 Rename copy.hs -> accept.hs. - - - - - 55d808d3 by David Waern at 2011-11-05T23:30:02+01:00 Fix build. - - - - - deb5c3be by David Waern at 2011-11-06T00:01:47+01:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9b663554 by David Waern at 2011-11-06T00:03:45+01:00 Merge https://github.com/rrnewton/haddock - - - - - 1abb0ff6 by David Waern at 2011-11-06T01:20:37+01:00 Use getDeclMainBinder instead of declNames. - - - - - 4b005c01 by David Waern at 2011-11-06T19:09:53+01:00 Fix build. - - - - - c2c51bc7 by Ian Lynagh at 2011-11-06T23:01:33+00:00 Remove -DNEW_GHC_LAYOUT in ghc.mk - - - - - f847d703 by Jose Pedro Magalhaes at 2011-11-11T09:07:39+00:00 New kind-polymorphic core This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds - - - - - 7d7c3b09 by Jose Pedro Magalhaes at 2011-11-16T21:42:22+01:00 Follow changes to tuple sorts in master - - - - - 8430e03e by Simon Peyton Jones at 2011-11-17T10:20:27+00:00 Remove redundant imports - - - - - d1b06832 by Ian Lynagh at 2011-11-19T01:33:21+00:00 Follow GHC build system change to the way we call rm - - - - - 9e2230ed by David Waern at 2011-11-24T15:00:24+01:00 Fix a bug in test runner and get rid of regex-compat dependency. - - - - - 52039b21 by David Waern at 2011-11-24T23:55:36+01:00 Avoid haskell98 dependency in test - - - - - 92e1220d by David Waern at 2011-11-25T00:03:33+01:00 Avoid depency on regex-compat also in accept.hs. - - - - - ddac6b6f by David Waern at 2011-11-25T02:13:38+01:00 Accept test output. - - - - - 5a720455 by David Waern at 2011-11-25T02:16:20+01:00 Some more changes to test scripts. - - - - - 170a9004 by David Waern at 2011-11-25T02:30:41+01:00 Add flag --interface-version. - - - - - d225576c by David Waern at 2011-11-25T02:39:26+01:00 Remove #ifs for older compiler versions. - - - - - f0d0a4f5 by David Waern at 2011-11-26T04:20:12+01:00 Give preference to type over data constructors for doc comment links at renaming time. Previously this was done in the backends. Also, warn when a doc comment refers to something that is in scope but which we don't have the .haddock file for. These changes mean we can make DocIdentifier [a] into DocIdentifier a. - - - - - eef0e776 by David Waern at 2011-11-26T17:01:06+01:00 Allow doc comments to link to out-of-scope things (#78). (A bug that should have been fixed long ago.) - - - - - 565ad529 by David Waern at 2011-11-26T19:56:21+01:00 Update tests. - - - - - fb3ce7b9 by David Waern at 2011-11-26T21:44:28+01:00 Cleanup. - - - - - d0328126 by David Waern at 2011-11-26T22:10:28+01:00 Fix module reference bug. - - - - - c03765f8 by David Waern at 2011-12-03T05:20:20+01:00 Slightly better behaviour on top-levels without type signatures. - Docs don't get attached to the next top-level with signature by mistake. - If there's an export list and the top-level is part of it, its doc comment shows up in the documentation. - - - - - 48461d31 by David Waern at 2011-12-03T05:38:10+01:00 Add a test for Unicode doc comments. - - - - - 549c4b4e by David Waern at 2011-12-03T19:07:55+01:00 Cleanup. - - - - - 7bfecf91 by David Waern at 2011-12-03T20:13:08+01:00 More cleanup. - - - - - 14fab722 by Ian Lynagh at 2011-12-12T21:21:35+00:00 Update dependencies and binaryInterfaceVersion - - - - - 469e6568 by Ian Lynagh at 2011-12-18T12:56:16+00:00 Fix (untested) building from source tarball without alex/happy haddock's .cabal file was declaring that it needed alex and happy to build, but in the GHC source tarballs it doesn't. - - - - - 895c9a8c by David Waern at 2011-12-27T12:57:43+01:00 Go back to having a doc, sub and decl map instead of one big decl map. This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer. - - - - - 736767d9 by David Waern at 2011-12-27T13:33:41+01:00 Merge ../../../haddock Conflicts: src/Haddock/InterfaceFile.hs - - - - - 20016f79 by David Waern at 2011-12-27T13:57:23+01:00 Bump version. - - - - - 31f276fb by David Waern at 2011-12-27T13:57:32+01:00 Merge ../ghc/utils/haddock - - - - - 95b367cd by David Waern at 2011-12-27T14:57:29+01:00 Update tests following version bump. - - - - - fa3c94cd by David Waern at 2011-12-27T14:57:51+01:00 Get rid of quite unnecessary use of different lists. - - - - - 9c4d3c54 by David Waern at 2011-12-27T15:26:42+01:00 Cleanup. - - - - - 2caf9f90 by David Waern at 2011-12-27T16:18:05+01:00 Wibbles. - - - - - 3757d09b by David Waern at 2011-12-27T20:50:26+01:00 Complete support for inferring types for top-level bindings. - - - - - 53418734 by David Waern at 2011-12-28T15:02:13+01:00 Minor fixes and cleanup. - - - - - 0c9d0385 by Ian Lynagh at 2012-01-03T18:31:29+00:00 Follow rename of Instance to ClsInst in GHC - - - - - c9bc969a by Simon Hengel at 2012-01-12T21:28:14+01:00 Make sure that generated xhtml is valid (close haskell/haddock#186) Thanks to Phyx. - - - - - 836a0b9a by David Waern at 2012-02-01T02:30:05+01:00 Fix bug introduced in my recent refactoring. - - - - - c7d733eb by David Waern at 2012-02-01T02:30:26+01:00 Cleanup mkMaps and avoid quadratic behaviour. - - - - - da3cda8f by David Waern at 2012-02-01T02:56:56+01:00 Require ghc >= 7.4. - - - - - 83a3287e by David Waern at 2012-02-01T02:57:36+01:00 Update CHANGES. - - - - - 93408f0b by Simon Hengel at 2012-02-04T00:48:04+01:00 Add reference renderings - - - - - 49d00d2c by Simon Hengel at 2012-02-04T00:48:25+01:00 Set unit tests for parser back to work - - - - - eb450980 by Simon Hengel at 2012-02-04T00:49:07+01:00 Add .gitignore - - - - - a841602c by Simon Hengel at 2012-02-04T00:49:16+01:00 Add .ghci file - - - - - 8861199d by Simon Hengel at 2012-02-04T00:49:29+01:00 tests/html-tests/copy.hs: Use mapM_ instead of mapM So we do net get a list of () on stdout when running with runhaskell. - - - - - b477d9b5 by Simon Hengel at 2012-02-04T00:49:46+01:00 Remove index files from golden tests - - - - - 9dbda34e by Simon Hengel at 2012-02-04T00:49:57+01:00 Add /tests/html-tests/tests/*index*.ref to .gitignore - - - - - a9434817 by Simon Hengel at 2012-02-04T00:50:04+01:00 Add DocWarning to Doc The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis. - - - - - de2fb6fa by Simon Hengel at 2012-02-04T00:50:13+01:00 Add support for module warnings - - - - - 0640920e by Simon Hengel at 2012-02-04T00:50:21+01:00 Add tests for module warnings - - - - - 30ce0d77 by Simon Hengel at 2012-02-04T00:50:29+01:00 Add support for warnings - - - - - bb367960 by Simon Hengel at 2012-02-04T00:50:37+01:00 Add tests for warnings - - - - - 6af1dc2d by Simon Hengel at 2012-02-04T00:50:50+01:00 Expand type signatures in export list (fixes haskell/haddock#192) - - - - - a06cbf25 by Simon Hengel at 2012-02-04T00:51:04+01:00 Expand type signatures for modules without explicit export list - - - - - 57dda796 by Simon Hengel at 2012-02-04T00:51:15+01:00 Remove obsolete TODO - - - - - 270c3253 by David Waern at 2012-02-04T00:51:24+01:00 Fix issues in support for warnings. * Match against local names only. * Simplify (it's OK to map over the warnings). - - - - - 683634bd by David Waern at 2012-02-04T00:55:11+01:00 Some cleanup and make sure we filter warnings through exports. - - - - - 210cb4ca by David Waern at 2012-02-04T03:01:30+01:00 Merge branch 'fix-for-186' of https://github.com/sol/haddock into ghc-7.4 - - - - - e8db9031 by David Waern at 2012-02-04T03:07:51+01:00 Style police. - - - - - 261f9462 by David Waern at 2012-02-04T03:20:16+01:00 Update tests. - - - - - 823cfc7c by David Waern at 2012-02-04T03:21:12+01:00 Use mapM_ in accept.hs as well. - - - - - 873dd619 by David Waern at 2012-02-04T03:21:33+01:00 Remove copy.hs - use accept.hs instead. - - - - - 0e31a14a by David Waern at 2012-02-04T03:47:33+01:00 Use <> instead of mappend. - - - - - 2ff7544f by David Waern at 2012-02-04T03:48:55+01:00 Remove code for older ghc versions. - - - - - dacf2786 by David Waern at 2012-02-04T15:52:51+01:00 Clean up some code from last SoC project. - - - - - 00cbb117 by David Waern at 2012-02-04T21:43:49+01:00 Mostly hlint-inspired cleanup. - - - - - 7dc86cc2 by Simon Peyton Jones at 2012-02-06T09:14:41+00:00 Track changes in HsDecls - - - - - f91f82fe by Ian Lynagh at 2012-02-16T13:40:11+00:00 Follow changes in GHC caused by the CAPI CTYPE pragma - - - - - a0ea6b0b by Ian Lynagh at 2012-02-22T02:26:12+00:00 Follow changes in GHC - - - - - b23b07d1 by Simon Peyton Jones at 2012-03-02T16:36:41+00:00 Follow changes in data representation from the big PolyKinds commit - - - - - 43406022 by Simon Hengel at 2012-03-05T11:18:34+01:00 Save/restore global state for static flags when running GHC actions This is necessary if we want to run createInterfaces (from Documentation.Haddock) multiple times in the same process. - - - - - 9fba16fe by Paolo Capriotti at 2012-03-06T10:57:33+00:00 Update .gitignore. - - - - - a9325044 by Simon Peyton Jones at 2012-03-14T17:35:42+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - fd48065a by Iavor Diatchki at 2012-03-15T22:43:35-07:00 Add support for type-level literals. - - - - - 2e8206dd by Simon Peyton Jones at 2012-03-16T14:18:22+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - 93e13319 by Simon Peyton Jones at 2012-03-17T01:04:05+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock Conflicts: src/Haddock/Convert.hs - - - - - d253fa71 by Iavor Diatchki at 2012-03-19T20:12:18-07:00 Merge remote-tracking branch 'origin/master' into type-nats - - - - - fc40acc8 by Iavor Diatchki at 2012-03-19T20:31:27-07:00 Add a missing case for type literals. - - - - - fd2ad699 by Iavor Diatchki at 2012-03-24T13:28:29-07:00 Rename variable to avoid shadowing warning. - - - - - 9369dd3c by Simon Peyton Jones at 2012-03-26T09:14:23+01:00 Follow refactoring of TyClDecl/HsTyDefn - - - - - 38825ca5 by Simon Peyton Jones at 2012-03-26T09:14:37+01:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - 4324ac0f by David Waern at 2012-04-01T01:51:19+02:00 Disable unicode test. - - - - - 3165b750 by David Waern at 2012-04-01T01:51:34+02:00 Take reader environment directly from TypecheckedSource. - - - - - 213b644c by David Waern at 2012-04-01T01:55:20+02:00 Cleanup. - - - - - 3118b4ba by David Waern at 2012-04-01T02:16:15+02:00 Don't filter out unexported names from the four maps - fixes a regression. - - - - - d6524e17 by David Waern at 2012-04-01T02:40:34+02:00 Fix crash when using --qual. Naughty GHC API! - - - - - ea3c43d8 by Henning Thielemann at 2012-04-01T13:03:07+02:00 add QualOption type for distinction between qualification argument given by the user and the actual qualification for a concrete module - - - - - 5422ff05 by Henning Thielemann at 2012-04-01T16:25:02+02:00 emit an error message when the --qual option is used incorrectly - - - - - 026e3404 by David Waern at 2012-04-01T18:10:30+02:00 Don't crash on unicode strings in doc comments. - - - - - ce006632 by David Waern at 2012-04-01T20:13:35+02:00 Add test for --ignore-all-exports flag/ignore-exports pragma. - - - - - 6e4dd33c by David Waern at 2012-04-01T20:21:03+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.4 - - - - - 734ae124 by Henning Thielemann at 2012-04-01T20:22:10+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - 622f9ba5 by David Waern at 2012-04-01T21:26:13+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 55ce17cb by Henning Thielemann at 2012-04-01T22:03:25+02:00 'abbreviate' qualification style - basic support Currently we ignore the package a module is imported from. This means that a module import would shadow another one with the same module name from a different package. - - - - - c85314ef by David Waern at 2012-04-01T22:05:12+02:00 Check qualification option before processing modules. - - - - - ae4b626c by Henning Thielemann at 2012-04-02T00:19:36+02:00 abbreviated qualification: use Packages.lookupModuleInAllPackages for finding the package that a module belongs to - - - - - 60bdbcf5 by Henning Thielemann at 2012-04-02T00:25:31+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - df44301d by Henning Thielemann at 2012-04-02T00:29:05+02:00 qualification style 'abbreviated' -> 'aliased' - - - - - f4192a64 by David Waern at 2012-04-02T01:05:47+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 7ba09067 by David Terei at 2012-04-04T15:08:21-07:00 Fix reporting of modules safe haskell mode (#5989) - - - - - d0cc33d0 by David Terei at 2012-04-06T15:50:41+01:00 Fix reporting of modules safe haskell mode (#5989) - - - - - 6e3434c5 by Simon Peyton Jones at 2012-04-20T18:37:46+01:00 Track changes in HsSyn - - - - - 22014ed0 by Simon Peyton Jones at 2012-05-11T22:45:15+01:00 Follow changes to LHsTyVarBndrs - - - - - d9a07b24 by David Waern at 2012-05-15T01:46:35+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - a6c4ebc6 by David Waern at 2012-05-16T02:18:32+02:00 Update CHANGES. - - - - - 8e181d29 by David Waern at 2012-05-16T02:27:56+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - e358210d by David Waern at 2012-05-16T02:35:33+02:00 Mention the new aliased --qual mode in CHANGES. - - - - - efd36a28 by David Waern at 2012-05-16T21:33:13+02:00 Bump version number. - - - - - d6b3af14 by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for deprecated record field - - - - - 927f800e by Simon Hengel at 2012-05-17T19:08:20+02:00 Use >>= instead of fmap and join - - - - - 048b41d5 by Simon Hengel at 2012-05-17T19:08:20+02:00 newtype-wrap Doc nodes for things that may have warnings attached - - - - - e3a89fc3 by Simon Hengel at 2012-05-17T19:08:20+02:00 Attach warnings to `Documentation` type - - - - - 5d4cc43d by Simon Hengel at 2012-05-17T19:08:20+02:00 Simplify lookupWarning - - - - - cf8ae69d by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for haskell/haddock#205 - - - - - cb409b19 by Simon Peyton Jones at 2012-05-25T08:30:11+01:00 Follow changes in LHsTyVarBndrs - - - - - 2d5f4179 by Simon Hengel at 2012-05-26T19:21:29+02:00 Add Applicative instance for (GenRnM a) - - - - - e4373060 by Simon Hengel at 2012-05-26T19:21:33+02:00 Use a map for warnings, as suggested by @waern - - - - - 597a68c7 by Simon Hengel at 2012-05-27T08:48:24+02:00 Add an optional label to URLs - - - - - ef1ac7fe by Simon Hengel at 2012-05-27T08:48:24+02:00 Add support for hyperlink labels to parser - - - - - 41f2adce by Simon Hengel at 2012-05-27T08:48:24+02:00 Add golden test for hyperlinks - - - - - 83d5e764 by Simon Hengel at 2012-05-27T08:50:02+02:00 Use LANGUAGE pragmas instead of default-extensions in cabal file - - - - - ddb755e5 by Simon Hengel at 2012-05-27T08:50:02+02:00 Fix typo in comment - - - - - 110676b4 by Simon Hengel at 2012-05-27T08:50:02+02:00 Add a type signature for a where-binding - - - - - 7d9ba2a0 by Ian Lynagh at 2012-06-12T14:38:01+01:00 Follow changes in GHC - - - - - 47c704f2 by Ian Lynagh at 2012-06-12T18:52:16+01:00 Follow changes in GHC - - - - - e1efe1ab by Simon Peyton Jones at 2012-06-13T17:25:29+01:00 Follow changes for the implementation of implicit parameters - - - - - 69abc81c by Ian Lynagh at 2012-06-19T22:52:58+01:00 Follow changes in base - - - - - 9d074a21 by Paolo Capriotti at 2012-06-22T18:26:47+01:00 Use right docMap to get decl documentation. - - - - - e3292ef6 by Ian Lynagh at 2012-07-15T01:31:19+01:00 Follow changes in GHC - - - - - ceae56b0 by Ian Lynagh at 2012-07-16T21:22:48+01:00 Fix haddock following some GHC changes Passing _|_ as the Settings for defaultDynFlags no longer works well enough - - - - - 9df72735 by Paolo Capriotti at 2012-07-19T16:49:32+01:00 Forward port changes from stable. - - - - - 572f5fcf by Ian Lynagh at 2012-07-19T20:38:26+01:00 Merge branch 'master' of darcs.haskell.org:/srv/darcs//haddock - - - - - 9195aca4 by Paolo Capriotti at 2012-07-20T10:27:28+01:00 Update dependencies. - - - - - 33db3923 by Ian Lynagh at 2012-07-20T17:54:43+01:00 Build with GHC 7.7 - - - - - 925a2cea by David Waern at 2012-07-23T16:50:40+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.6 Conflicts: src/Haddock/InterfaceFile.hs - - - - - d710ef97 by David Waern at 2012-07-23T16:52:07+02:00 Bump version number. - - - - - eb0c2f83 by David Waern at 2012-07-23T16:57:58+02:00 Update CHANGES. - - - - - b3f56943 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Hide "internal" instances This fixes haskell/haddock#37 (http://trac.haskell.org/haddock/ticket/37) Precisely, we show an instance iff its class and all the types are exported by non-hidden modules. - - - - - a70aa412 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Tests for hiding instances (#37) - - - - - c0f4aa58 by Simon Hengel at 2012-07-27T13:00:13+03:00 Add an other test for hiding instances (#37) - - - - - a7ed6268 by Ian Lynagh at 2012-08-07T14:48:13+01:00 Follow changes in GHC - - - - - 0ab30d38 by Ian Lynagh at 2012-08-13T22:12:27+01:00 Improve haddock memory usage - - - - - 0eaa4e30 by Ian Lynagh at 2012-08-13T23:58:46+01:00 Improve haddock memory usage - - - - - 659d26cf by Ian Lynagh at 2012-08-14T13:16:48+01:00 Remove some temporary pragmas I accidentally recorded - - - - - d97fceb6 by Simon Hengel at 2012-08-25T13:19:34+02:00 Add missing dependency to library - - - - - 4c910697 by Simon Hengel at 2012-08-28T07:39:14+02:00 Move .ghci to project root - - - - - fc3c601a by Simon Hengel at 2012-08-28T07:39:14+02:00 accept.hs: Ignore some files - - - - - 1af9b984 by Simon Hengel at 2012-08-28T07:40:04+02:00 Update reference renderings (bump version) - - - - - 980dc253 by Simon Hengel at 2012-08-28T07:40:32+02:00 Update reference renderings (remove links for ()) - - - - - 33651dbf by Simon Hengel at 2012-08-28T07:41:50+02:00 Update documentation of `runInteractiveProcess` in reference rendering - - - - - 7ab25078 by David Waern at 2012-09-07T10:38:50+02:00 Merge branch 'hiddenInstances2' of http://github.com/feuerbach/haddock into ghc-7.6 - - - - - c3de3a4b by David Waern at 2012-09-07T14:29:27+02:00 Follow changes in GHC. - - - - - 298c43ac by David Waern at 2012-09-07T14:59:24+02:00 Update CHANGES. - - - - - e797993a by David Waern at 2012-09-07T15:21:30+02:00 Update ANNOUNCE. - - - - - d0b44790 by David Waern at 2012-09-07T15:22:43+02:00 Merge branch 'hidden-instances' into ghc-7.6 - - - - - 41a4adc8 by Simon Hengel at 2012-09-08T12:08:37+02:00 Update doc/README - - - - - 71ad1040 by Simon Hengel at 2012-09-08T12:17:17+02:00 Add documentation for URL labels - - - - - 9bb41afd by Simon Peyton Jones at 2012-09-20T18:14:26+01:00 Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs - - - - - b8139bfa by Simon Hengel at 2012-09-21T14:24:16+02:00 Disable Unicode test for now - - - - - a5fafdd7 by Simon Hengel at 2012-09-21T14:35:45+02:00 Update TypeOperators test for GHC 7.6.1 Type operators can't be used as type variables anymore! - - - - - 6ccf0025 by Simon Hengel at 2012-09-21T16:02:24+02:00 Remove (Monad (Either e)) instance from ref. rendering of CrossPackageDocs I do not really understand why the behavior changed, so I'll open a ticket, so that we can further investigate. - - - - - b5c6c138 by Ian Lynagh at 2012-09-27T02:00:57+01:00 Follow changes in GHC build system - - - - - b98eded0 by David Waern at 2012-09-27T15:37:02+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 76cc2051 by David Waern at 2012-09-27T15:48:19+02:00 Update hidden instances tests. - - - - - aeaa1c59 by David Waern at 2012-09-28T10:21:32+02:00 Make API buildable with GHC 7.6. - - - - - d76be1b0 by Simon Peyton Jones at 2012-09-28T15:57:05+01:00 Merge remote-tracking branch 'origin/master' into tc-untouchables - - - - - a1922af8 by David Waern at 2012-09-28T19:50:20+02:00 Fix spurious superclass constraints bug. - - - - - bc41bdbb by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove old examples - - - - - bed7d3dd by Simon Hengel at 2012-10-01T11:30:51+02:00 Adapt parsetests for GHC 7.6.1 - - - - - dcdb22bb by Simon Hengel at 2012-10-01T11:30:51+02:00 Add test-suite section for parsetests to cabal file + get rid of HUnit dependency - - - - - 1e5263c9 by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove test flag from cabal file This was not really used. - - - - - 4beee98b by David Waern at 2012-09-28T23:42:28+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 11dd2256 by Ian Lynagh at 2012-10-03T16:17:35+01:00 Follow change in GHC build system - - - - - fbd77962 by Simon Hengel at 2012-10-03T18:49:40+02:00 Remove redundant dependency from cabal file - - - - - 09218989 by Simon Hengel at 2012-10-04T16:03:05+02:00 Fix typo - - - - - 93a2d5f9 by Simon Hengel at 2012-10-04T16:11:41+02:00 Remove trailing whitespace from cabal file - - - - - c8b46cd3 by Simon Hengel at 2012-10-04T16:12:17+02:00 Export Haddock's main entry point from library - - - - - b411e77b by Simon Hengel at 2012-10-04T16:29:46+02:00 Depend on library for executable The main motivation for this is to increase build speed. In GHC's source tree the library is not build, but all modules are now required for the executable, so that GHC's validate will now detect build failures for the library. - - - - - f8f0979f by Simon Hengel at 2012-10-05T00:32:57+02:00 Set executable flag for Setup.lhs - - - - - dd045998 by Simon Hengel at 2012-10-07T16:44:06+02:00 Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. - - - - - 7b39c3ae by Simon Hengel at 2012-10-07T17:05:45+02:00 cross-package test: re-export IsString instead of Monad There is a monad instance for Q, which is not available on platforms that do not have GHCi support. This caused CrossPackageDocs to fail on those platforms. Re-exporting IsString should test the same thing, but it works on all platforms. - - - - - 0700c605 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Fix some warnings - - - - - f78eca79 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Make -Wall proof - - - - - 6beec041 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Use listToMaybe/fromMaybe instead of safeHead/maybe - - - - - 44b8ce86 by Ian Lynagh at 2012-10-08T21:59:46+01:00 Follow changes in GHC - - - - - 6da5f702 by Simon Hengel at 2012-10-09T11:16:19+02:00 Update .ghci - - - - - 9ac1a1b9 by Kazu Yamamoto at 2012-10-09T12:45:31+02:00 Add markup support for properties - - - - - 1944cb42 by Simon Hengel at 2012-10-09T12:45:31+02:00 Simplify lexing/parsing of properties In contrast to what we do for examples, we do not really need to capture the "prompt" here. - - - - - bffd8e62 by Simon Hengel at 2012-10-09T13:40:14+02:00 Add HTML test for properties - - - - - 2fe9c5cb by Simon Hengel at 2012-10-09T13:40:21+02:00 Add unit tests for properties - - - - - 874e361b by Simon Hengel at 2012-10-09T13:40:33+02:00 Bump interface version - - - - - 2506cc37 by Simon Hengel at 2012-10-09T15:15:04+02:00 Fix parser bug - - - - - 743d2b7d by Simon Hengel at 2012-10-09T15:31:06+02:00 Allow to load interface files with compatible versions - - - - - 981a1660 by Simon Hengel at 2012-10-10T10:32:05+02:00 Export more types from Documentation.Haddock (fixes haskell/haddock#216) - - - - - dff7dc76 by Simon Hengel at 2012-10-10T11:15:19+02:00 Update ANNOUNCE and CHANGES - - - - - edd2bb01 by Simon Hengel at 2012-10-10T11:22:50+02:00 Bump version - - - - - 5039163b by Simon Hengel at 2012-10-10T13:56:04+02:00 Fix typo in documentation - - - - - e4ce34da by Simon Hengel at 2012-10-10T14:28:35+02:00 Add documentation for properties - - - - - 9555ebca by Simon Hengel at 2012-10-11T10:49:04+02:00 Remove redundant if-defs, more source documentation - - - - - 87aa67e1 by Simon Hengel at 2012-10-11T12:32:51+02:00 Adapt cabal file - - - - - c44c1dee by Simon Hengel at 2012-10-11T12:41:58+02:00 Require ghc 7.6 - - - - - 8383bc34 by Simon Hengel at 2012-10-11T12:50:24+02:00 Bump version - - - - - 1030eb38 by Simon Hengel at 2012-10-11T12:55:44+02:00 Update ANNOUNCE and CHANGES - - - - - 74955088 by Simon Hengel at 2012-10-12T09:49:31+02:00 Improve note about `binaryInterfaceVersion` (thanks David) - - - - - ee30f6b7 by Simon Hengel at 2012-10-13T13:40:59+02:00 Update version in html tests, rpm spec file, and user manual - - - - - f2861f18 by Simon Hengel at 2012-10-13T14:40:33+02:00 Remove unused MonadFix constraint - - - - - dfdf1a74 by Simon Hengel at 2012-10-13T15:15:38+02:00 Minor code simplification - - - - - 4ecd1e70 by Simon Hengel at 2012-10-13T15:33:43+02:00 Increase code locality - - - - - f7df5cc9 by Simon Hengel at 2012-10-13T16:03:12+02:00 Minor code simplification - - - - - e737eb6e by Simon Hengel at 2012-10-13T19:03:04+02:00 Handle HsExplicitListTy in renameer (fixes haskell/haddock#213) - - - - - c2dc8f17 by Simon Hengel at 2012-10-13T20:46:31+02:00 Better error messages - - - - - 14d48b4c by Simon Hengel at 2012-10-14T00:21:07+02:00 Simplify RnM type - - - - - 6c2cc547 by Simon Hengel at 2012-10-14T00:23:35+02:00 Simplify lookupRn - - - - - bc77ce85 by Simon Hengel at 2012-10-14T01:51:32+02:00 Organize unite tests hierarchically - - - - - 2306d117 by Simon Hengel at 2012-10-14T10:34:58+02:00 Handle more cases in renameType - - - - - 8a864203 by Simon Hengel at 2012-10-14T11:47:59+02:00 Add mini_HiddenInstances.html.ref and mini_HiddenInstancesB.html.ref - - - - - 3a978eca by Simon Hengel at 2012-10-14T11:49:28+02:00 Add /tests/html-tests/output/ to .gitignore - - - - - db18888a by Simon Hengel at 2012-10-14T13:38:21+02:00 Allow haddock markup in deprecation messages - - - - - e7cfee9f by Simon Hengel at 2012-10-14T14:00:23+02:00 If parsing of deprecation message fails, include it verbatim - - - - - 242a85be by Simon Hengel at 2012-10-14T14:13:24+02:00 Add description for PruneWithWarning test - - - - - 43d33df1 by Simon Hengel at 2012-10-14T15:40:53+02:00 Minor formatting change - - - - - 22768c44 by Simon Hengel at 2012-10-14T16:03:43+02:00 Properly handle deprecation messages for re-exported things (fixes haskell/haddock#220) - - - - - cb4b9111 by Simon Hengel at 2012-10-14T17:30:28+02:00 Add build artifacts for documentation to .gitignore - - - - - 854cd8de by Simon Hengel at 2012-10-14T23:34:51+02:00 unit-tests: Improve readability Add IsString instance for (Doc RdrName) + use <> instead of DocAppend. - - - - - c4446d54 by Simon Hengel at 2012-10-14T23:37:21+02:00 unit-tests: Minor refactoring Rename parse to parseParas. - - - - - 04f2703c by Simon Hengel at 2012-10-15T00:36:42+02:00 Fix typo - - - - - 3d109e44 by Simon Hengel at 2012-10-15T10:30:07+02:00 Add description for DeprecatedReExport test - - - - - 84f0985c by Simon Hengel at 2012-10-15T14:54:19+02:00 Move resources to /resources directory - - - - - a5de7ca6 by Simon Hengel at 2012-10-15T15:46:18+02:00 Move HTML tests to directory /html-test/ - - - - - e21f727d by Simon Hengel at 2012-10-15T19:32:42+02:00 Move HTML reference renderings to /html-test/ref/ - - - - - 3a3c6c75 by Simon Hengel at 2012-10-15T19:32:42+02:00 Copy css, images, etc. on accept - - - - - 40ead6dc by Simon Hengel at 2012-10-15T19:32:42+02:00 Move unit tests to /test directory - - - - - 99a28231 by Simon Hengel at 2012-10-15T19:32:42+02:00 Fix Setup.lhs /usr/bin/runhaskell is not installed on all systems. - - - - - 95faf45e by Simon Hengel at 2012-10-15T19:32:42+02:00 Make test management scripts more robust * They are now independent from the current directory, and hence can be called from everywhere * On UNIX/Linux they can now be run as scripts - - - - - 027aaa2d by Simon Hengel at 2012-10-15T19:53:40+02:00 Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. - - - - - e0266ede by Simon Hengel at 2012-10-15T20:03:43+02:00 Add test case for "spurious superclass constraints bug" - - - - - 52a2aa92 by Simon Hengel at 2012-10-15T20:28:55+02:00 Adapt accept.lhs, so that it ignores more index files - - - - - 53530781 by Simon Hengel at 2012-10-15T20:49:39+02:00 Rename html-test/runtests.lhs to html-test/run.lhs - - - - - 84518797 by Simon Hengel at 2012-10-15T20:49:39+02:00 Move source files for HTML tests to html-test/src - - - - - a911dc6c by Simon Hengel at 2012-10-15T20:49:39+02:00 Adapt output directory for HTML tests - - - - - d3c15857 by Ian Lynagh at 2012-10-16T16:54:43+01:00 Follow dopt->gopt rename - - - - - 956665a5 by Simon Hengel at 2012-10-18T08:42:48+02:00 Update html-test/README - - - - - 903b1029 by Simon Hengel at 2012-10-18T08:50:26+02:00 Use markdown for html-test/README - - - - - 150b4d63 by Ian Lynagh at 2012-10-18T16:36:00+01:00 Follow changes in GHC: 'flags' has been renamed 'generalFlags' - - - - - 41e04ff9 by Simon Hengel at 2012-11-28T09:54:35+01:00 Export missing types from Documentation.Haddock - - - - - 9be59237 by Ian Lynagh at 2012-11-30T23:20:47+00:00 Update dependencies - - - - - e06842f5 by Simon Hengel at 2012-12-07T20:58:05+01:00 Bump version - - - - - e3dbede0 by Simon Hengel at 2012-12-07T20:58:05+01:00 Add missing test files to cabal file (fixes haskell/haddock#230) - - - - - ee0dcca7 by Simon Hengel at 2012-12-07T20:58:05+01:00 Update CHANGES - - - - - 51601bdb by Simon Peyton Jones at 2012-12-19T17:28:35+00:00 Track changes in UNPACK pragma stuff - - - - - f2573bc1 by Richard Eisenberg at 2012-12-21T20:56:25-05:00 Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances. - - - - - f788d0fb by Simon Peyton Jones at 2012-12-23T15:49:58+00:00 Track changes in HsBang - - - - - ca460a0c by Simon Peyton Jones at 2012-12-23T15:50:28+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - f078fea6 by Simon Peyton Jones at 2013-01-02T08:33:13+00:00 Use InstEnv.instanceSig rather than instanceHead (name change) - - - - - 88e41305 by Simon Peyton Jones at 2013-01-14T17:10:27+00:00 Track change to HsBang type - - - - - e1ad4e19 by Kazu Yamamoto at 2013-02-01T11:59:24+09:00 Merge branch 'ghc-7.6' into ghc-7.6-merge-2 Conflicts: haddock.cabal src/Haddock/Interface/AttachInstances.hs src/Haddock/Interface/Create.hs src/Haddock/Interface/LexParseRn.hs src/Haddock/InterfaceFile.hs src/Haddock/Types.hs Only GHC HEAD can compile this. GHC 7.6.x cannot compile this. Some test fail. - - - - - 62bec012 by Kazu Yamamoto at 2013-02-06T11:12:28+09:00 Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.) - - - - - 013fd2e4 by Kazu Yamamoto at 2013-02-06T17:56:21+09:00 Refactoring instanceHead'. - - - - - 3148ce0e by Kazu Yamamoto at 2013-02-07T17:45:10+09:00 Using new syntax in html-test/src/GADTRecords.hs. - - - - - 626dabe7 by Gabor Greif at 2013-02-15T22:42:01+01:00 Typo - - - - - 1eb667ae by Ian Lynagh at 2013-02-16T17:02:07+00:00 Follow changes in base - - - - - 3ef8253a by Ian Lynagh at 2013-03-01T23:23:57+00:00 Follow changes in GHC's build system - - - - - 1a265a3c by Ian Lynagh at 2013-03-03T23:12:07+00:00 Follow changes in GHC build system - - - - - 69941c79 by Max Bolingbroke at 2013-03-10T09:38:28-07:00 Use Alex 3's Unicode support to properly lex source files as UTF-8 Signed-off-by: David Waern <david.waern at gmail.com> - - - - - ea687dad by Simon Peyton Jones at 2013-03-15T14:16:10+00:00 Adapt to tcRnGetInfo returning family instances too This API change was part of the fix to Trac haskell/haddock#4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays. - - - - - 971a30b0 by Andreas Voellmy at 2013-05-19T20:47:39+01:00 Fix for haskell/haddock#7879. Changed copy of utils/haddock/html/resources/html to use "cp -RL" rather than "cp -R". This allows users to run validate in a build tree, where the build tree was setup using lndir with a relative path to the source directory. - - - - - 31fb7694 by Ian Lynagh at 2013-05-19T20:47:49+01:00 Use "cp -L" when making $(INPLACE_LIB)/latex too - - - - - e9952233 by Simon Hengel at 2013-06-01T18:06:50+02:00 Add -itest to .ghci - - - - - b06873b3 by Mateusz Kowalczyk at 2013-06-01T18:06:50+02:00 Workaround for a failing build with --enable-tests. - - - - - e7858d16 by Simon Hengel at 2013-06-01T19:29:28+02:00 Fix broken test - - - - - 0690acb1 by Richard Eisenberg at 2013-06-21T14:08:25+01:00 Updates to reflect changes in HsDecls to support closed type families. - - - - - 7fd347ec by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 53ed81b6 by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 931c4f4f by Richard Eisenberg at 2013-07-24T13:15:59+01:00 Remove (error "synifyKind") to use WithinType, to allow haddock to process base. - - - - - 55a9c804 by Richard Eisenberg at 2013-08-02T15:54:55+01:00 Changes to reflect changes in GHC's type HsTyVarBndr - - - - - b6e9226c by Mathieu Boespflug at 2013-08-04T10:39:43-07:00 Output Copright and License keys in Xhtml backend. This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern at gmail.com> - - - - - 4c66028a by David Waern at 2013-08-04T15:27:36-07:00 Bump interface file version. - - - - - 67340163 by David Waern at 2013-08-09T16:12:51-07:00 Update tests. - - - - - 2087569b by Mateusz Kowalczyk at 2013-08-25T09:24:13+02:00 Add spec tests. This adds tests for all elements we can create during regular parsing. This also adds tests for text with unicode in it. - - - - - 97f36a11 by Mateusz Kowalczyk at 2013-08-27T06:59:12+01:00 Fix ticket haskell/haddock#247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. - - - - - 60681b4f by Mateusz Kowalczyk at 2013-08-27T21:22:48+02:00 LaTeX tests setup - - - - - fa4c27b2 by Mateusz Kowalczyk at 2013-09-02T23:21:43+01:00 Fixes haskell/haddock#253 - - - - - 1a202490 by Mateusz Kowalczyk at 2013-09-03T01:12:50+01:00 Use Hspec instead of nanospec This is motivated by the fact that Haddock tests are not ran by the GHC's ‘validate’ script so we're pretty liberal on dependencies in that area. Full Hspec gives us some nice features such as Quickcheck integration. - - - - - 8cde3b20 by David Luposchainsky at 2013-09-08T07:27:28-05:00 Fix AMP warnings Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - d10661f2 by Herbert Valerio Riedel at 2013-09-11T15:15:01+02:00 Update Git repo URL in `.cabal` file - - - - - 16a44eb5 by Richard Eisenberg at 2013-09-17T09:34:26-04:00 Revision to reflect new role annotation syntax in GHC. - - - - - 4b9833b9 by Herbert Valerio Riedel at 2013-09-18T10:15:28+02:00 Add missing `traverse` method for `GenLocated` As `Traversable` needs at least one of `traverse` or `sequenceA` to be overridden. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - b71fed5d by Simon Hengel at 2013-09-18T22:43:34+02:00 Add test helper - - - - - 4fc1ea86 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#231 - - - - - 435872f6 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#256 We inject -dynamic-too into flags before we run all our actions in the GHC monad. - - - - - b8b24abb by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Add new field to DynFlags - - - - - 49558795 by Simon Hengel at 2013-09-18T22:43:35+02:00 Fallback to ./resources when Cabal data is not found (so that themes are found during development) - - - - - bf79d05c by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Fixes haskell/haddock#5 - - - - - e1baebc2 by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Print missing documentation. Fixes haskell/haddock#258. - - - - - 02ea74de by Austin Seipp at 2013-10-09T10:52:22-05:00 Don't consider StaticFlags when parsing arguments. Instead, discard any static flags before parsing the command line using GHC's DynFlags parser. See http://ghc.haskell.org/trac/ghc/ticket/8276 Based off a patch from Simon Hengel. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 704fd5bb by Simon Hengel at 2013-11-09T00:15:13+01:00 Update HTML tests - - - - - f9fed49e by Simon Hengel at 2013-11-10T18:43:58+01:00 Bump version - - - - - 97ae1999 by Simon Peyton Jones at 2013-11-25T17:25:14+00:00 Track changes in HsSpliceTy data constructor - - - - - 59ad8268 by Simon Peyton Jones at 2014-01-10T18:17:43+00:00 Adapt to small change in Pretty's exports - - - - - 8b12e6aa by Simon Hengel at 2014-01-12T14:48:35-06:00 Some code simplification by using traverse - - - - - fc5ea9a2 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix warnings in test helper - - - - - 6dbb3ba5 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Add ByteString version of Attoparsec - - - - - 968d7774 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 One pass parser and tests. We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing. - - - - - 37a07c9c by Simon Hengel at 2014-01-12T14:48:35-06:00 Rename Haddock.ParseSpec to Haddock.ParserSpec - - - - - f0f68fe9 by Simon Hengel at 2014-01-12T14:48:35-06:00 Don't append newline to parseString input We also check that we have parsed everything with endOfInput. - - - - - 95d60093 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu at fuuzetsu.co.uk if you need the full commit history. - - - - - 7d99108c by Simon Hengel at 2014-01-12T14:48:35-06:00 Update acceptance tests - - - - - d1b59640 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Support for bold. Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs - - - - - 4b412b39 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Allow for headings inside function documentation. LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs - - - - - fdcca428 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Per-module extension flags and language listing. Any extensions that are not enabled by a used language (Haskell2010 &c) will be shown. Furthermore, any implicitly enabled are also going to be shown. While we could eliminate this either by using the GHC API or a dirty hack, I opted not to: if a user doesn't want the implied flags to show, they are recommended to use enable extensions more carefully or individually. Perhaps this will encourage users to not enable the most powerful flags needlessly. Enabled with show-extensions. Conflicts: src/Haddock/InterfaceFile.hs - - - - - 368942a2 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Bump interface version There were some breaking changes over the last few patches so we bump the interface version. This causes a big problem with testing: 1. To generate cross package docs, we first need to generate docs for the package used. 2. To generate package docs with new interface version, we need to use Haddock which has the version bumped. 3. To get Haddock with the version bump, we first need to test cross package docs 4. GOTO 1 So the problem is the chicken and the egg problem. It seems that the only solution would be to generate some interface files on the fly but it is non-trivial. To run this test, you'll have to: * build Haddock without the test (make sure everything else passes) * rebuild the packages used in the test with your shiny new binary making sure they are visible to Haddock * remove the ‘_hidden’ suffix and re-run the tests Note: because the packages currently used for this test are those provided by GHC, it's probably non-trivial to just re-build them. Preferably something less tedious to rebuild should be used and something that is not subject to change. - - - - - 124ae7a9 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow for nesting of paragraphs under lists. The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - c7913535 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow escaping in URLs and pictures. Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - 32326680 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update documentation. - - - - - fbef6406 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update maintainer - - - - - b40e82f4 by Mateusz Kowalczyk at 2014-01-13T02:39:25-06:00 Fixes haskell/haddock#271 Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - f4eafbf8 by Gergő Érdi at 2014-01-19T15:35:16-06:00 Support for -XPatternSynonyms Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - a8939591 by Austin Seipp at 2014-01-29T08:09:04-06:00 Update CPP check for __GLASGOW_HASKELL__ Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 30d7e9d5 by Gergő Érdi at 2014-01-31T00:15:01+08:00 <+>: Don't insert a space when concatenating empty nodes - - - - - a25ccd4d by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Fix @ code blocks In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. - - - - - 0f67305a by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Update tests This updates tests due to Haddock Trac haskell/haddock#271 fix and due to removal of TypeHoles as an extension from GHC. - - - - - 157322a7 by Gergő Érdi at 2014-01-31T01:03:17+08:00 Handle infix vs prefix names correctly everywhere, by explicitly specifying the context The basic idea is that "a" and "+" are either pretty-printed as "a" and "(+)" or "`a`" and "+" - - - - - aa6d9685 by Mateusz Kowalczyk at 2014-01-30T17:21:50+00:00 Correct whitespace in ‘hidden’ test for <+> change - - - - - 121872f0 by Mateusz Kowalczyk at 2014-02-09T17:59:12+00:00 Document module header. Fixes Haddock Trac haskell/haddock#270. - - - - - e3253746 by Mateusz Kowalczyk at 2014-02-10T21:37:48+00:00 Insert a space between module link and description Fixes Haddock Trac haskell/haddock#277. - - - - - 771d2384 by Mateusz Kowalczyk at 2014-02-10T23:27:21+00:00 Ensure a space between type signature and ‘Source’ This is briefly related to Haddock Trac haskell/haddock#249 and employs effectively the suggested fix _but_ it doesn't actually fix the reported issue. This commit simply makes copying the full line a bit less of a pain. - - - - - 8cda9eff by nand at 2014-02-11T15:48:30+00:00 Add support for type/data families This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 3f22c510 by nand at 2014-02-11T15:53:50+00:00 Improve display of poly-kinded type operators This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - effb2d6b by nand at 2014-02-11T15:56:50+00:00 Add test case for PatternSynonyms This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - b38faf0d by Niklas Haas at 2014-02-13T21:53:32+00:00 Get rid of re-implementation of sortBy I have no idea what this was doing lying around here, and due to the usage of tuples it's actually slower, too. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - ac1e0413 by Mateusz Kowalczyk at 2014-02-13T23:57:16+00:00 Only warn about missing docs when docs are missing This fixes the ‘Missing documentation for…’ message for modules with 100% coverage. - - - - - cae2e36a by Niklas Haas at 2014-02-15T21:56:18+00:00 Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 8bea5c3a by Mateusz Kowalczyk at 2014-02-19T05:11:34+00:00 Use a bespoke data type to indicate fixity This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment. - - - - - 5b52d57c by Niklas Haas at 2014-02-22T21:31:03+01:00 Strip a single leading space from bird tracks (#201) This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch. - - - - - 5a1315a5 by Simon Hengel at 2014-02-22T21:55:35+01:00 Turn a source code comment into specs - - - - - 784cfe58 by Mateusz Kowalczyk at 2014-02-23T05:02:22+00:00 Update test case for lifted GADT type rendering The parsing of these seems to have been fixed by GHC folk and it now renders differently. IMHO it now renders in a better way so I'm updating the test to reflect this. - - - - - c3c88c2f by Mateusz Kowalczyk at 2014-02-23T06:37:14+00:00 Don't shadow ‘strip’. -Wall complains - - - - - 293031d8 by Niklas Haas at 2014-02-23T15:21:52+01:00 Make ImplicitParams render correctly (#260) This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone) - - - - - 4200842d by Niklas Haas at 2014-02-23T15:37:13+01:00 Lower precedence of equality constraints This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC - - - - - b59e3227 by Niklas Haas at 2014-02-23T16:11:22+01:00 Add RankNTypes test case to ImplicitParams.hs This test actually tests what haskell/haddock#260 originally reported - I omitted the RankNTypes scenario from the original fix because I realized it's not relevant to the underlying issue and indeed, this renders as intended now. Still good to have more tests. - - - - - c373dbf7 by Mateusz Kowalczyk at 2014-02-24T06:09:54+00:00 Fix rendering of Contents when links are present Fixes Haddock Trac haskell/haddock#267. - - - - - 9ecb0e56 by Mateusz Kowalczyk at 2014-02-24T06:26:50+00:00 Fix wording in the docs - - - - - 4f4dcd8e by Mateusz Kowalczyk at 2014-02-27T03:00:33+00:00 Change rendering of duplicate record field docs See Haddock Trac haskell/haddock#195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this. - - - - - ad8aa609 by Niklas Haas at 2014-03-08T09:43:26+01:00 Render fixity information Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of. - - - - - 6a39c917 by Niklas Haas at 2014-03-09T07:43:39+01:00 Reorder topDeclElem to move the source/wiki links to the top They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom. - - - - - 2d34b3b4 by Niklas Haas at 2014-03-09T07:53:46+01:00 Use optLast instead of listToMaybe for sourceUrls/wikiUrls This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates. - - - - - 0eff4624 by Niklas Haas at 2014-03-09T07:53:46+01:00 Differentiate between TH splices (line-links) and regular names This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures. - - - - - 66d6f77b by Niklas Haas at 2014-03-09T20:02:43+01:00 Group similar fixities together Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <= - - - - - 6587f9f5 by Mateusz Kowalczyk at 2014-03-10T04:24:18+00:00 Update changelog - - - - - 7387ddad by Niklas Haas at 2014-03-11T10:26:04+01:00 Include fixity information in the Interface file This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly. - - - - - ab46ef44 by Niklas Haas at 2014-03-11T10:26:04+01:00 Update changelog - - - - - 565cab6f by Niklas Haas at 2014-03-11T10:26:04+01:00 Update appearance of fixity annotations This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present. - - - - - 5d7afd67 by Niklas Haas at 2014-03-11T10:26:05+01:00 Filter family instances of hidden types Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case. - - - - - ec291b0c by Niklas Haas at 2014-03-11T10:26:05+01:00 Add documentation for --source-entity-line - - - - - 0922e581 by Niklas Haas at 2014-03-11T10:37:32+01:00 Revert "Reorder topDeclElem to move the source/wiki links to the top" This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines. - - - - - 30618e8b by Mateusz Kowalczyk at 2014-03-11T09:41:07+00:00 Bump version to 2.15.0 - - - - - adf3f1bb by Mateusz Kowalczyk at 2014-03-11T09:41:09+00:00 Fix up some whitespace - - - - - 8905f57d by Niklas Haas at 2014-03-13T19:18:06+00:00 Hide RHS of TFs with non-exported right hand sides Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user. - - - - - 5c44d5c2 by Niklas Haas at 2014-03-13T19:18:08+00:00 Add UnicodeSyntax alternatives for * and -> I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting. - - - - - b04a63e6 by Niklas Haas at 2014-03-13T19:18:10+00:00 Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. - - - - - a4a20b16 by Niklas Haas at 2014-03-13T19:18:12+00:00 Strip links from recently added html tests These were accidentally left there when the tests were originally added - - - - - d624f315 by Mateusz Kowalczyk at 2014-03-13T19:19:31+00:00 Update changelog - - - - - d27a21ac by Mateusz Kowalczyk at 2014-03-13T21:19:07+00:00 Always read in prologue files as UTF8 (#286). - - - - - 54b2fd78 by Mateusz Kowalczyk at 2014-03-13T21:28:09+00:00 Style only - - - - - fa4fe650 by Simon Hengel at 2014-03-15T09:04:18+01:00 Add Fuuzetsu maintainers field in cabal file - - - - - f83484b7 by Niklas Haas at 2014-03-15T18:20:24+00:00 Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. - - - - - 0099d276 by Niklas Haas at 2014-03-15T18:20:26+00:00 Fix issue haskell/haddock#281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. - - - - - 1f9687bd by Mateusz Kowalczyk at 2014-03-21T17:48:37+00:00 Please cabal sdist - - - - - 75542693 by Mateusz Kowalczyk at 2014-03-22T16:36:16+00:00 Drop needless --split-objs which slows us down. Involves tiny cleanup of all the dynflag bindings. Fixes haskell/haddock#292. - - - - - 31214dc3 by Herbert Valerio Riedel at 2014-03-23T18:01:01+01:00 Fix a few typos Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 0b73e638 by Mateusz Kowalczyk at 2014-03-31T05:34:36+01:00 Print kind signatures on GADTs - - - - - 2bab42f3 by Mateusz Kowalczyk at 2014-03-31T16:53:25+01:00 Add default for new PlatformConstraints field - - - - - 42647c5f by Mateusz Kowalczyk at 2014-03-31T18:29:04+01:00 Drop leading whitespace in @-style blocks. Fixes haskell/haddock#201. - - - - - 98208294 by Niklas Haas at 2014-03-31T20:09:58+02:00 Crash when exporting record selectors of data family instances This fixes bug haskell/haddock#294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated. - - - - - 3832d171 by Mateusz Kowalczyk at 2014-04-01T19:07:33+01:00 Make CHANGES consistent with what's now in 2.14.2 - - - - - c386ae89 by Mateusz Kowalczyk at 2014-04-01T19:18:36+01:00 Actually bundle extra spec tests in sdist - - - - - bd57a6d3 by Mateusz Kowalczyk at 2014-04-03T21:13:48+01:00 Update test cases for GHC bug haskell/haddock#8945, Haddock haskell/haddock#188 The order of signature groups has been corrected upstream. Here we add a test case and update some existing test-cases to reflect this change. We remove grouped signature in test cases that we can (Minimal, BugDeprecated &c) so that the test is as self-contained as possible. - - - - - 708b88b1 by Mateusz Kowalczyk at 2014-04-03T21:16:07+01:00 Enforce strict GHC version in cabal file This stops people with 7.6.3 trying to install 2.15.x which clearly won't work. Unfortunately we shipped 2.14.x without realising this. - - - - - 60334f7c by Mateusz Kowalczyk at 2014-04-03T21:19:24+01:00 Initialise some new PlatformConstants fields - - - - - ea77f668 by Mateusz Kowalczyk at 2014-04-11T16:52:23+01:00 We don't actually want unicode here - - - - - 0b651cae by Mateusz Kowalczyk at 2014-04-11T18:13:30+01:00 Parse identifiers with ^ and ⋆ in them. Fixes haskell/haddock#298. - - - - - e8ad0f5f by Mateusz Kowalczyk at 2014-04-11T18:47:41+01:00 Ignore version string during HTML tests. - - - - - de489089 by Mateusz Kowalczyk at 2014-04-11T18:59:30+01:00 Update CHANGES to follow 2.14.3 - - - - - beb464a9 by Gergő Érdi at 2014-04-13T16:31:10+08:00 remove Origin flag from LHsBindsLR - - - - - cb16f07c by Herbert Valerio Riedel at 2014-04-21T17:16:50+02:00 Replace local `die` by new `System.Exit.die` Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 9b9b23c7 by Mateusz Kowalczyk at 2014-05-03T15:40:11+02:00 Disambiguate ‘die’ in test runners. - - - - - 5d28a2b8 by Mateusz Kowalczyk at 2014-05-05T09:19:49+02:00 Prepare modules for parser split. We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type. - - - - - d3967ff3 by Mateusz Kowalczyk at 2014-05-05T11:00:41+02:00 Move parser + parser tests out to own package. We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes. - - - - - 522a448d by Mateusz Kowalczyk at 2014-05-05T11:14:47+02:00 Move out Show and Eq instances to Types They are much more useful to the users here. - - - - - 11a6f0f2 by Mateusz Kowalczyk at 2014-05-06T13:50:31+02:00 Remove no longer necessary parser error handling. We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places. - - - - - 6992c924 by Mateusz Kowalczyk at 2014-05-14T02:23:55+02:00 Please the GHC build-system. As I can not figure out how to do this properly, if we're in GHC tree, we treat the library as being the same package. If we're not in the tree, we require that the library be installed separately. - - - - - 7a8ad763 by Mateusz Kowalczyk at 2014-05-14T14:50:25+02:00 Update issue tracker URL - - - - - f616c521 by Mateusz Kowalczyk at 2014-05-14T14:53:32+02:00 Update issue tracker URL for haddock-library - - - - - 66580ded by Gergő Érdi at 2014-05-25T14:24:16+08:00 Accomodate change in PatSyn representation - - - - - 0e43b988 by Mateusz Kowalczyk at 2014-05-29T03:15:29+02:00 Revert "Accomodate change in PatSyn representation" This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this. - - - - - e10d7ec8 by Mateusz Kowalczyk at 2014-05-29T03:24:11+02:00 Revert "Revert "Accomodate change in PatSyn representation"" This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me. - - - - - 5861aca9 by Mateusz Kowalczyk at 2014-06-05T19:49:27+02:00 Clear up highlighting of identifiers with ‘'’s. - - - - - d7cc420f by Simon Peyton Jones at 2014-06-06T12:41:09+01:00 Follow change in patSynSig - - - - - 938b4fd8 by Mateusz Kowalczyk at 2014-06-12T07:24:29+02:00 Slightly update the readme. Style-sheets are no longer a recent thing, dead links, old maintainers, different formats. - - - - - c7799dea by Mateusz Kowalczyk at 2014-06-18T00:05:56+02:00 Update cabal files Update repository urls, use subdir property for haddock-library and use a separate versioning scheme for haddock-library in preparation for release. - - - - - a2750b6a by Simon Hengel at 2014-06-18T11:01:18+08:00 Compatibility with older versions of base and bytestring - - - - - 009b4b03 by Simon Hengel at 2014-06-18T11:14:01+08:00 Enable travis-ci for haddock-library - - - - - 9b5862eb by Simon Hengel at 2014-06-18T11:14:01+08:00 haddock-library: Do not depend on haddock-library in test suite I think you either add src to hs-source-dirs or the library to build-depends. But doing both does not make sense (AFAICT). - - - - - fb1f3279 by Simon Hengel at 2014-06-18T11:49:05+08:00 haddock-library: Use -Wall for specs - - - - - 649340e1 by Mateusz Kowalczyk at 2014-06-18T06:58:54+02:00 Use Travis with multiple GHC versions When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project. - - - - - d7eeeec2 by Mateusz Kowalczyk at 2014-06-18T07:49:04+02:00 Comment improvements + few words in cabal file - - - - - 0f8db914 by Simon Hengel at 2014-06-18T13:52:23+08:00 Use doctest to check examples in documentation - - - - - 2888a8dc by Simon Hengel at 2014-06-18T14:16:48+08:00 Remove doctest dependency (so that we can use haddock-library with doctest) - - - - - 626d5e85 by Mateusz Kowalczyk at 2014-06-18T08:41:25+02:00 Travis tweaks - - - - - 41d4f9cc by Mateusz Kowalczyk at 2014-06-18T08:58:43+02:00 Don't actually forget to install specified GHC. - - - - - c6aa512a by John MacFarlane at 2014-06-18T10:43:57-07:00 Removed reliance on LambdaCase (which breaks build with ghc 7.4). - - - - - b9b93b6f by John MacFarlane at 2014-06-18T10:54:56-07:00 Fixed haddock warnings. - - - - - a41b0ab5 by Mateusz Kowalczyk at 2014-06-19T01:20:10+02:00 Update Travis, bump version - - - - - 864bf62a by Mateusz Kowalczyk at 2014-06-25T10:36:54+02:00 Fix anchors. Closes haskell/haddock#308. - - - - - 53df91bb by Mateusz Kowalczyk at 2014-06-25T15:04:49+02:00 Drop DocParagraph from front of headers I can not remember why they were wrapped in paragraphs to begin with and it seems unnecessary now that I test it. Closes haskell/haddock#307. - - - - - 29b5f2fa by Mateusz Kowalczyk at 2014-06-25T15:17:20+02:00 Don't mangle append order for nested lists. The benefit of this is that the ‘top-level’ element of such lists is properly wrapped in <p> tags so any CSS working with these will be applied properly. It also just makes more sense. Pointed out at jgm/pandoc#1346. - - - - - 05cb6e9c by Mateusz Kowalczyk at 2014-06-25T15:19:45+02:00 Bump haddock-library to 1.1.0 for release - - - - - 70feab15 by Iavor Diatchki at 2014-07-01T03:37:07-07:00 Propagate overloading-mode for instance declarations in haddock (#9242) - - - - - d4ca34a7 by Simon Peyton Jones at 2014-07-14T16:23:15+01:00 Adapt to new definition of HsDecls.TyFamEqn This is a knock-on from the refactoring from Trac haskell/haddock#9063. I'll push the corresponding changes to GHC shortly. - - - - - f91e2276 by Edward Z. Yang at 2014-07-21T08:14:19-07:00 Track GHC PackageId to PackageKey renaming. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - b010f9ef by Edward Z. Yang at 2014-07-25T16:28:46-07:00 Track changes for module reexports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - 8b85f9f9 by Mateusz Kowalczyk at 2014-07-28T13:25:43+02:00 Catch mid-line URLs. Fixes haskell/haddock#314. - - - - - 4c613a78 by Edward Z. Yang at 2014-08-05T03:11:00-07:00 Track type signature change of lookupModuleInAllPackages Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - e80b051c by Edward Z. Yang at 2014-08-05T17:34:26+01:00 If GhcProfiled, also build Haddock profiled. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f9cccd29 by Edward Z. Yang at 2014-08-07T14:23:35+01:00 Ignore TAGS files. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 00b3af52 by Mateusz Kowalczyk at 2014-08-08T04:58:19+02:00 Update to attoparsec-0.12.1.1 There seems to be memory and speed improvement. - - - - - 5457dc71 by Mateusz Kowalczyk at 2014-08-08T18:24:02+02:00 Fix forgotten src - - - - - 3520cb04 by Mateusz Kowalczyk at 2014-08-14T20:19:07+01:00 Bump down the version for master to 2.14.4 - - - - - dc98c21b by Mateusz Kowalczyk at 2014-08-14T20:23:27+01:00 Revert "Track type signature change of lookupModuleInAllPackages" This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f. - - - - - 3f2038c0 by Mateusz Kowalczyk at 2014-08-14T20:23:31+01:00 Revert "Track changes for module reexports." This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d. - - - - - 56d4e49e by Mateusz Kowalczyk at 2014-08-14T20:23:42+01:00 Revert "Track GHC PackageId to PackageKey renaming." This reverts commit 8ac42d3327473939c013551750425cac191ff0fd. - - - - - 726ea3cb by Mateusz Kowalczyk at 2014-08-14T20:23:47+01:00 Revert "Adapt to new definition of HsDecls.TyFamEqn" This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd. - - - - - 61a88ff0 by Mateusz Kowalczyk at 2014-08-14T20:23:52+01:00 Revert "Propagate overloading-mode for instance declarations in haddock (#9242)" This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c. - - - - - a32ba674 by Mateusz Kowalczyk at 2014-08-14T20:26:03+01:00 Revert "Disambiguate ‘die’ in test runners." This reverts commit dba02d6df32534aac5d257f2d28596238d248942. - - - - - f335820f by Mateusz Kowalczyk at 2014-08-14T20:26:09+01:00 Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. - - - - - 107078e4 by Mateusz Kowalczyk at 2014-08-14T20:27:34+01:00 Merge branch 'reverts' This reverts any changes that were made to have Haddock compile with 7.9. When 7.10 release comes, we can simply re-apply all the patches and any patches that occur on ghc-head branch from now on. This allows us to build master with 7.8.3 - - - - - b44b3871 by Mateusz Kowalczyk at 2014-08-15T02:47:40+01:00 Fix haskell/haddock#313 by doing some list munging. I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly. - - - - - e1a62cde by Mateusz Kowalczyk at 2014-08-15T02:52:56+01:00 Stop testing haskell/haddock#188. Because the change is in GHC 7.9 and we now work against 7.8.3, this test no longer makes sense. We revert it until 7.10 becomes the standard version. If anything, there should be a test for this in GHC itself. - - - - - 54e8286d by Mateusz Kowalczyk at 2014-08-15T05:31:57+01:00 Add haskell/haddock#313 to CHANGES - - - - - 9df7ad5d by Simon Hengel at 2014-08-20T11:25:32+08:00 Fix warning - - - - - ee2574d6 by Simon Hengel at 2014-08-20T12:07:01+08:00 Fix travis builds - - - - - 384cf2e6 by Simon Hengel at 2014-08-20T12:14:31+08:00 Require GHC 7.8.3 - - - - - d4779863 by Simon Hengel at 2014-08-22T12:14:16+08:00 Move Haddock API to a separate package - - - - - 80f3e0e1 by Simon Hengel at 2014-08-22T14:57:38+08:00 Bump version to 2.15.0 and add version constraints - - - - - 309a94ce by Simon Hengel at 2014-08-22T15:18:06+08:00 Add deprecated compatibility module - - - - - 4d1e4e3f by Luite Stegeman at 2014-08-22T20:46:45+02:00 export things to allow customizing how the Ghc session is run - - - - - 47884591 by Luite Stegeman at 2014-08-22T20:46:51+02:00 ghc 7.8.2 compatibility - - - - - 5ea94e2c by Luite Stegeman at 2014-08-22T22:08:58+02:00 install dependencies for haddock-api on travis - - - - - 9fb845b2 by Mateusz Kowalczyk at 2014-08-23T10:09:34+01:00 Move sources under haddock-api/src - - - - - 85817dc4 by Mateusz Kowalczyk at 2014-08-23T10:10:48+01:00 Remove compat stuff - - - - - 151c6169 by Niklas Haas at 2014-08-24T08:14:10+02:00 Fix extra whitespace on signatures and update all test cases This was long overdue, now running ./accept.lhs on a clean test from master will not generate a bunch of changes. - - - - - d320e0d2 by Niklas Haas at 2014-08-24T08:14:35+02:00 Omit unnecessary foralls and fix haskell/haddock#315 This also fixes haskell/haddock#86. - - - - - bdafe108 by Mateusz Kowalczyk at 2014-08-24T15:06:46+01:00 Update CHANGES - - - - - fafa6d6e by Mateusz Kowalczyk at 2014-08-24T15:14:23+01:00 Delete few unused/irrelevant/badly-place files. - - - - - 3634923d by Duncan Coutts at 2014-08-27T13:49:31+01:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. - - - - - 539a7e70 by Herbert Valerio Riedel at 2014-08-31T11:36:32+02:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 9e3a0e5b by Mateusz Kowalczyk at 2014-08-31T12:54:43+01:00 Bump version in doc - - - - - 4a177525 by Mateusz Kowalczyk at 2014-08-31T13:01:23+01:00 Bump haddock-library version - - - - - f99c1384 by Mateusz Kowalczyk at 2014-08-31T13:05:25+01:00 Remove references to deleted files - - - - - 5e51a247 by Mateusz Kowalczyk at 2014-08-31T14:18:44+01:00 Make the doc parser not complain - - - - - 2cedb49a by Mateusz Kowalczyk at 2014-09-03T03:33:15+01:00 CONTRIBUTING file for issues - - - - - 88027143 by Mateusz Kowalczyk at 2014-09-04T00:46:59+01:00 Mention --print-missing-docs - - - - - 42f6754f by Alan Zimmerman at 2014-09-05T18:13:24-05:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e712719e by Austin Seipp at 2014-09-09T01:03:27-05:00 Fix import of 'empty' due to AMP. Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 71c29755 by Herbert Valerio Riedel at 2014-09-09T17:35:20+02:00 Bump `base` constraint for AMP - - - - - 0bf9f3ed by Mateusz Kowalczyk at 2014-09-12T19:18:32+01:00 Delete stale ANNOUNCE - - - - - cac89ee6 by Krzysztof Gogolewski at 2014-09-14T17:17:09+02:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 4d683426 by Edward Z. Yang at 2014-09-18T13:38:11-07:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 80697fd5 by Herbert Valerio Riedel at 2014-09-19T00:07:52+02:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. - - - - - c015eb70 by Herbert Valerio Riedel at 2014-09-19T00:10:36+02:00 Revert "Followup changes to addition of -fwarn-context-quantification" This reverts commit 4023817d7c0e46db012ba2eea28022626841ca9b temporarily as the respective feature hasn't landed in GHC HEAD yet, but this commit blocks later commits from being referenced in GHC HEAD. - - - - - 38ded784 by Edward Z. Yang at 2014-09-18T15:32:15-07:00 Revert "Revert "Followup changes to addition of -fwarn-context-quantification"" This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now. - - - - - f55d59c9 by Herbert Valerio Riedel at 2014-09-26T19:18:28+02:00 Revert "Fix import of 'empty' due to AMP." This reverts commit 0cc5bc85e9fca92ab712b68a2ba2c0dd9d3d79f4 since it turns out we don't need to re-export `empty` from Control.Monad after all. - - - - - 467050f1 by David Feuer at 2014-10-09T20:07:36-04:00 Fix improper lazy IO use Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. - - - - - cc47b699 by Edward Z. Yang at 2014-10-09T21:38:19-07:00 Fix use-after-close lazy IO bug Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. Signed-off-by: David Feuer <David.Feuer at gmail.com> Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 87babcbe by Austin Seipp at 2014-10-20T20:05:27-05:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - ab259516 by Austin Seipp at 2014-10-20T20:07:01-05:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - b918093c by Mateusz Kowalczyk at 2014-10-29T03:59:39+00:00 Experimental support for collapsable headers Closes haskell/haddock#335 - - - - - 849db129 by Mateusz Kowalczyk at 2014-10-29T10:07:26+01:00 Experimental support for collapsable headers (cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc) - - - - - a4cc4789 by Herbert Valerio Riedel at 2014-10-31T11:08:26+01:00 Collapse user-defined section by default (re haskell/haddock#335) - - - - - 9da1b33e by Yuras Shumovich at 2014-10-31T16:11:04-05:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - c625aefc by Austin Seipp at 2014-10-31T19:34:10-05:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - c7738e5e by Simon Hengel at 2014-11-02T07:25:30+08:00 Remove -fobject-code from .ghci (this slows down reloads on modifications) - - - - - d4a86e95 by Simon Hengel at 2014-11-03T09:26:11+08:00 Get rid of StandaloneDeriving - - - - - a974e311 by Simon Hengel at 2014-11-03T09:26:11+08:00 Derive more instances - - - - - 8aa0c4d7 by Simon Hengel at 2014-11-03T09:27:08+08:00 Remove unused language extensions - - - - - 3052d46a by Simon Hengel at 2014-11-03T09:30:46+08:00 Minor refactoring - - - - - 4281d3cb by Simon Hengel at 2014-11-03T09:30:46+08:00 parser: Try to parse definition lists right before text paragraphs - - - - - 8ba12bf9 by Simon Hengel at 2014-11-03T09:34:19+08:00 Add support for markdown links (closes haskell/haddock#336) - - - - - a2f8d747 by Simon Hengel at 2014-11-03T09:34:19+08:00 Allow markdown links at the beginning of a paragraph - - - - - 53b11207 by Simon Hengel at 2014-11-03T09:34:20+08:00 Update documentation - - - - - 652267c6 by Simon Hengel at 2014-11-03T09:34:20+08:00 Add support for markdown images - - - - - 9d667502 by Simon Hengel at 2014-11-03T09:34:20+08:00 Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. - - - - - 8167fc32 by Mateusz Kowalczyk at 2014-11-04T01:16:51+00:00 whitespace only - - - - - 3da62981 by Mateusz Kowalczyk at 2014-11-04T01:17:31+00:00 Fix re-exports of built-in type families Fixes haskell/haddock#310 - - - - - edc76b34 by Mateusz Kowalczyk at 2014-11-04T02:54:28+00:00 Turn some uses of error into recoverable warnings This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end. - - - - - 0a137400 by Mateusz Kowalczyk at 2014-11-04T04:09:44+00:00 Fix warnings - - - - - d068fc21 by Mateusz Kowalczyk at 2014-11-04T21:04:07+00:00 Fix parsing of identifiers written in infix way - - - - - 1a9f2f3d by Simon Hengel at 2014-11-08T11:32:42+08:00 Minor code simplification - - - - - 6475e9b1 by Simon Hengel at 2014-11-08T17:28:33+08:00 newtype-wrap parser monad - - - - - dc1ea105 by Herbert Valerio Riedel at 2014-11-15T11:55:43+01:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - fbb1aca4 by Simon Hengel at 2014-11-16T08:51:38+08:00 State intention rather than implementation details in Haddock comment - - - - - 97851ab2 by Simon Hengel at 2014-11-16T10:20:19+08:00 (wip) Add support for @since (closes haskell/haddock#26) - - - - - 34bcd18e by Gergő Érdi at 2014-11-20T22:35:38+08:00 Update Haddock to new pattern synonym type signature syntax - - - - - 304b7dc3 by Jan Stolarek at 2014-11-20T17:48:43+01:00 Follow changes from haskell/haddock#9812 - - - - - 920f9b03 by Richard Eisenberg at 2014-11-20T16:52:50-05:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 0bfe4e78 by Alan Zimmerman at 2014-11-21T11:23:09-06:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 356ed45a by Thomas Winant at 2014-11-28T16:11:22-06:00 Support for PartialTypeSignatures - - - - - 5dc8f3b1 by Gergő Érdi at 2014-11-29T15:39:09+08:00 For pattern synonyms, render "pattern" as a keyword - - - - - fe704480 by Mateusz Kowalczyk at 2014-12-09T03:38:32+00:00 List new module in cabal file - - - - - b9ad5a29 by Mateusz Kowalczyk at 2014-12-10T00:58:24+00:00 Allow the parser to spit out meta-info Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes haskell/haddock#26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves. - - - - - 765af0e3 by Mateusz Kowalczyk at 2014-12-10T01:17:19+00:00 Update doctest parts of comments - - - - - 8670272b by jpmoresmau at 2014-12-10T01:35:31+00:00 header could contain several lines Closes haskell/haddock#348 - - - - - 4f9ae4f3 by Mateusz Kowalczyk at 2014-12-12T06:22:31+00:00 Revert "Merge branch 'reverts'" This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - e974ac94 by Duncan Coutts at 2014-12-12T06:26:11+00:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. Conflicts: haddock-api/src/Haddock.hs - - - - - 2f3a2365 by Herbert Valerio Riedel at 2014-12-12T06:26:51+00:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 1dbd6390 by Alan Zimmerman at 2014-12-12T06:32:07+00:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - bb6ff1f4 by Mateusz Kowalczyk at 2014-12-12T06:35:07+00:00 Bump ‘base’ constraint Follows the similar commit made on ghc-head branch - - - - - 466fe4ab by Krzysztof Gogolewski at 2014-12-12T06:37:42+00:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 97e080c9 by Edward Z. Yang at 2014-12-12T06:39:35+00:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs - - - - - 20b2af56 by Herbert Valerio Riedel at 2014-12-12T06:42:50+00:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. Conflicts: haddock-library/src/Documentation/Haddock/Parser.hs - - - - - b3ad269d by Austin Seipp at 2014-12-12T06:44:14+00:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 072df0dd by Austin Seipp at 2014-12-12T06:45:01+00:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - dbb9294a by Herbert Valerio Riedel at 2014-12-12T06:46:17+00:00 Collapse user-defined section by default (re haskell/haddock#335) Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - - - - - f23ab545 by Yuras Shumovich at 2014-12-12T06:46:41+00:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - 753a4b67 by Austin Seipp at 2014-12-12T06:46:51+00:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8954e8f5 by Herbert Valerio Riedel at 2014-12-12T06:50:53+00:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - d2b06d61 by Gergő Érdi at 2014-12-12T07:07:30+00:00 Update Haddock to new pattern synonym type signature syntax Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 1ff02426 by Jan Stolarek at 2014-12-12T07:13:24+00:00 Follow changes from haskell/haddock#9812 Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - 06ad7600 by Richard Eisenberg at 2014-12-12T07:13:43+00:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 8fd2aa8b by Alan Zimmerman at 2014-12-12T07:22:25+00:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Backends/LaTeX.hs haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 95c3db98 by Thomas Winant at 2014-12-12T07:35:49+00:00 Support for PartialTypeSignatures Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs haddock-api/src/Haddock/Interface/Create.hs - - - - - 45494428 by Gergő Érdi at 2014-12-12T07:36:18+00:00 For pattern synonyms, render "pattern" as a keyword - - - - - a237e3eb by Mateusz Kowalczyk at 2014-12-12T12:27:13+00:00 Various fixups and bumps for next release - - - - - 22918bcd by Herbert Valerio Riedel at 2014-12-14T10:11:47+01:00 Remove redundant wild-card pattern match (this would otherwise cause a build-failure with `-Werror`) - - - - - 1d6ce947 by Herbert Valerio Riedel at 2014-12-14T10:17:06+01:00 Treat GHC 7.10 the same as GHC 7.9 ...since the current GHC 7.9 is going to become GHC 7.10 real-soon-now anyway - - - - - f434ea89 by Herbert Valerio Riedel at 2014-12-14T18:26:50+01:00 Fixup ghc.mk (follow-up to 1739375eb23342) This makes the GHC build-system aware of the data-files to be copied into the bindist (as haddock.cabal doesn't list those anymore) - - - - - 6fb839eb by Mateusz Kowalczyk at 2014-12-17T09:28:59+00:00 Only keep one Version instead of blindly appending - - - - - 40645489 by Mateusz Kowalczyk at 2014-12-18T07:09:44+00:00 Fix dependency version - - - - - 8b3b927b by Mateusz Kowalczyk at 2014-12-18T07:14:23+00:00 Print missing docs by default Adds --no-print-missing-docs - - - - - 59666694 by Mateusz Kowalczyk at 2014-12-18T07:21:37+00:00 update changelog - - - - - aa6d168e by Mateusz Kowalczyk at 2014-12-18T07:30:58+00:00 Update docs for @since - - - - - 2d7043ee by Luite Stegeman at 2014-12-19T18:29:35-06:00 hide projectVersion from DynFlags since it clashes with Haddock.Version.projectVersion - - - - - aaa70fc0 by Luite Stegeman at 2014-12-22T15:58:43+01:00 Add missing import for standalone haddock-api package - - - - - 9ce01269 by Herbert Valerio Riedel at 2014-12-22T17:48:45+01:00 Reset ghc-head with master's tree (this is an overwriting git merge of master into ghc-head) - - - - - fcd6fec1 by Herbert Valerio Riedel at 2014-12-22T17:51:52+01:00 Bump versions for ghc-7.11 - - - - - 525ec900 by Mateusz Kowalczyk at 2014-12-23T13:36:24+00:00 travis-ci: test with HEAD - - - - - cbf494b5 by Simon Peyton Jones at 2014-12-23T15:22:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 50e01c99 by Mateusz Kowalczyk at 2014-12-29T15:28:47+00:00 Make travis use 7.10.x - - - - - 475e60b0 by Njagi Mwaniki at 2014-12-29T15:30:44+00:00 Turn the README into GitHub Markdown format. Closes haskell/haddock#354 - - - - - 8cacf48e by Luite Stegeman at 2015-01-05T16:25:37+01:00 bump haddock-api ghc dependency to allow release candidate and first release - - - - - 6ed6cf1f by Simon Peyton Jones at 2015-01-06T16:37:47+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 8b484f33 by Simon Peyton Jones at 2015-01-08T15:50:22+00:00 Track naming change in DataCon - - - - - 23c5c0b5 by Alan Zimmerman at 2015-01-16T10:15:11-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e7a5532c by JP Moresmau at 2015-01-22T17:19:03+00:00 Ignore warnings, install Cabal 1.22 - - - - - 86942c84 by jpmoresmau at 2015-01-22T17:19:04+00:00 solve dataDir ambiguity - - - - - 5ceb743e by jpmoresmau at 2015-01-22T19:17:32+00:00 support GHC 7.10: no Safe-Inferred, Foldable instance - - - - - 6a3b3fb5 by Mateusz Kowalczyk at 2015-01-22T19:32:10+00:00 Update test files Test: a correct behaviour for fields comma-separating values. I'm surprised we had no bug open for this. Maybe it affects how haskell/haddock#301 renders now but I doubt. Operators: Seems GHC is giving us a new order for operators, something must have changed on their side again. cc @haasn , this makes the fixity to the side not match the order on the LHS which is a bit unpleasant. Maybe the fixity can be made to match the GHC order? Bug335: We expand examples by default now. Bug310: Now inferred safe. - - - - - 708f8b2f by jpmoresmau at 2015-01-22T19:36:59+00:00 Links to source location of class instance definitions - - - - - 5cf8a6da by Vincent Berthoux at 2015-01-22T19:59:58+00:00 Filter '\r' from comments due to Windows problems. On Windows this was causing newline to be rendered twice in code blocks. Closes haskell/haddock#359, fixes haskell/haddock#356. - - - - - 1749e6f0 by Mateusz Kowalczyk at 2015-01-22T20:31:27+00:00 Changelog only - - - - - c8145f90 by Mateusz Kowalczyk at 2015-01-22T23:34:05+00:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. - - - - - 14248254 by Mateusz Kowalczyk at 2015-01-22T23:43:18+00:00 Sort out some module import warnings - - - - - d8a38989 by Simon Peyton Jones at 2015-01-23T07:10:16-06:00 Track naming change in DataCon (cherry picked from commit 04cf63d0195837ed52075ed7d2676e71831e8a0b) - - - - - d3ac6ae4 by Alan Zimmerman at 2015-01-23T07:17:19-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit d61bbc75890e4eb0ad508b9c2a27b91f691213e6) - - - - - 4c1ffeb0 by Simon Peyton Jones at 2015-02-10T12:10:33+00:00 Track changes in HsSyn for quasi-quotes - - - - - 775d20f7 by Mateusz Kowalczyk at 2015-03-15T08:11:48+01:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. (cherry picked from commit 8e06728afb0784128ab2df0be7a5d7a191d30ff4) - - - - - f9245e72 by Phil Ruffwind at 2015-03-16T04:32:01-04:00 Prevent Synopsis from using up too much horizontal space When long type signatures occur in the Synopsis, the element is stretched beyond the width of the window. Scrollbars don't appear, so it's impossible to read anything when this happens. - - - - - cd8fa415 by Mateusz Kowalczyk at 2015-03-17T21:59:39+00:00 Update changelog Closes haskell/haddock#151 due to 71170fc77962f10d7d001e3b8bc8b92bfeda99bc - - - - - b5248b47 by Ben Gamari at 2015-03-25T17:12:17+00:00 Make the error encountered when a package can't be found more user-friendly Closes haskell/haddock#369 - - - - - b756b772 by Mateusz Kowalczyk at 2015-03-26T16:31:40+00:00 Remove now redundant imports - - - - - 5ea5e8dd by Mateusz Kowalczyk at 2015-03-26T16:45:52+00:00 Update test to account for \r filtering - - - - - 6539bfb3 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Test for anchor defaulting I delete the old tests because it turns out that: * test runner would never put them in scope of each other even with imports so just one would suffice * test runner actually needed some hacking to keep links so in the end we would end up with no anchors making them useless - - - - - 1a01d950 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Clearly default to variables in out of scope case - - - - - 7943abe8 by Mateusz Kowalczyk at 2015-03-27T01:14:11+00:00 Fix Hoogle display of constructors Fixes haskell/haddock#361 - - - - - 6d6e587e by Mateusz Kowalczyk at 2015-03-27T01:45:18+00:00 Fully qualify names in Hoogle instances output Closes haskell/haddock#263 - - - - - 52dac365 by Mateusz Kowalczyk at 2015-03-27T01:55:01+00:00 Update changelog - - - - - ca5af9a8 by Mateusz Kowalczyk at 2015-03-27T02:43:55+00:00 Output method documentation in Hoogle backend One thing of note is that we no longer preserve grouping of methods and print each method on its own line. We could preserve it if no documentation is present for any methods in the group if someone asks for it though. Fixes haskell/haddock#259 - - - - - a33f0c10 by Mateusz Kowalczyk at 2015-03-27T03:04:21+00:00 Don't print instance safety information in Hoogle Fixes haskell/haddock#168 - - - - - df6c935a by Mateusz Kowalczyk at 2015-03-28T00:11:47+00:00 Post-release version bumps and changelog - - - - - dde8f7c0 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Loosen bounds on haddock-* - - - - - de93bf89 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Expand response files in arguments Closes haskell/haddock#285 - - - - - 1f0b0856 by Zejun Wu at 2015-04-26T16:35:35-07:00 Do not insert anchor for section headings in contents box - - - - - 860439d7 by Simon Peyton Jones at 2015-05-01T09:36:47+01:00 Track change in API of TyCon - - - - - a32f3e5f by Adam Gundry at 2015-05-04T15:32:59+01:00 Track API changes to support empty closed type familes - - - - - 77e98bee by Ben Gamari at 2015-05-06T20:17:08+01:00 Ignore doc/haddock.{ps,pdf} - - - - - 663d0204 by Murray Campbell at 2015-05-11T04:47:37-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8bb0dcf5 by Murray Campbell at 2015-05-11T06:35:06-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit 2380f07c430c525b205ce2eae6dab23c8388d899) - - - - - bad900ea by Adam Bergmark at 2015-05-11T15:29:39+01:00 haddock-library: require GHC >= 7.4 `Data.Monoid.<>` was added in base-4.5/GHC-7.4 Closes haskell/haddock#394 Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - daceff85 by Simon Peyton Jones at 2015-05-13T12:04:21+01:00 Track the new location of setRdrNameSpace - - - - - 1937d1c4 by Alan Zimmerman at 2015-05-25T21:27:15+02:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - ee0fb6c2 by Łukasz Hanuszczak at 2015-05-27T11:51:31+02:00 Create simple method for indentation parsing. - - - - - 7d6fcad5 by Łukasz Hanuszczak at 2015-05-27T21:36:13+02:00 Make nested lists count indentation according to first item. - - - - - d6819398 by Łukasz Hanuszczak at 2015-05-27T22:46:13+02:00 Add simple test case for arbitrary-depth list nesting. - - - - - 2929c54d by Łukasz Hanuszczak at 2015-06-03T02:11:31+02:00 Add arbitrary-indent spec test for parser. - - - - - 9a0a9bb0 by Mateusz Kowalczyk at 2015-06-03T05:25:29+01:00 Update docs with info on new list nesting rule Fixes haskell/haddock#278 through commits from PR haskell/haddock#401 - - - - - 12efc92c by Mateusz Kowalczyk at 2015-06-03T05:29:26+01:00 Update some meta data at the top of the docs - - - - - 765ee49f by Bartosz Nitka at 2015-06-07T08:40:59-07:00 Add some Hacking docs for getting started - - - - - 19aaf851 by Bartosz Nitka at 2015-06-07T08:44:30-07:00 Fix markdown - - - - - 2a90cb70 by Mateusz Kowalczyk at 2015-06-08T15:08:36+01:00 Refine hacking instructions slightly - - - - - 0894da6e by Thomas Winant at 2015-06-08T23:47:28-05:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 10a9bb76 by Emanuel Borsboom at 2015-06-12T02:46:23+01:00 Build executable with '-threaded' (fixes haskell/haddock#399) - - - - - 7696b94f by Mateusz Kowalczyk at 2015-06-12T02:59:19+01:00 Update changelog for -threaded Closes haskell/haddock#400 - - - - - d3c118ec by Bartosz Nitka at 2015-06-12T03:00:58+01:00 Fix haddock: internal error: spliceURL UnhelpfulSpan (#207) Inferred type signatures don't have SrcSpans, so let's use the one from the declaration. I've tested this manually on the test-case from haskell/haddock#207, but I got stuck at trying to run the test-suite. - - - - - b67e843b by Mateusz Kowalczyk at 2015-06-12T03:01:50+01:00 Changelog for haskell/haddock#207 Fixes haskell/haddock#207, closes haskell/haddock#402 - - - - - 841d785e by jpmoresmau at 2015-06-12T16:03:16+01:00 Attach to instance location the name that has the same location file Fixes haskell/haddock#383 - - - - - 98791cae by Mateusz Kowalczyk at 2015-06-12T16:08:27+01:00 Update changelog Closes haskell/haddock#398 - - - - - 7c0b5a87 by Phil Ruffwind at 2015-06-12T13:07:25-04:00 Fix alignment of Source links in instance table in Firefox Due to a Firefox bug [1], a combination of 'whitespace: nowrap' on the parent element with 'float: right' on the inner element can cause the floated element to be displaced downwards for no apparent reason. To work around this, the left side is wrapped in its own <span> and set to 'float: left'. As a precautionary measure to prevent the parent element from collapsing entirely, we also add the classic "clearfix" hack. The latter is not strictly needed but it helps prevent bugs if the layout is altered again in the future. Fixes haskell/haddock#384. Remark: line 159 of src/Haddock/Backends/Xhtml/Layout.hs was indented to prevent confusion over the operator precedence of (<+>) vs (<<). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=488725 - - - - - cfe86e73 by Mateusz Kowalczyk at 2015-06-14T10:49:01+01:00 Update tests for the CSS changes - - - - - 2d4983c1 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding for Haskell source parser module. - - - - - 29548785 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement function for tagging parsed chunks with source spans. - - - - - 6a5e4074 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement simple string chunking based on HsColour library. - - - - - 6e52291f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create basic token classification method. - - - - - da971a27 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Adapt source span tagging to work with current whitespace handling. - - - - - 4feb5a22 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add record accessors to exports of hyperlinker parser module. - - - - - a8cc4e39 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Make parser module export all types and associated accessors. - - - - - fb8d468f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple HTML renderer for parsed source file. - - - - - 80747822 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for specifying the CSS file path in HTML source renderer. - - - - - 994dc1f5 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix identifier recognition in Haskell source parser. - - - - - b1bd0430 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix comment recognition in Haskell source parser. - - - - - 11db85ae by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for recognizing compiler pragmas in source parser. - - - - - 736c7bd3 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding of module for associating tokens with AST names. - - - - - 7e149bc2 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement utility method for extracting variable identifiers from AST. - - - - - 32eb640a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple mechanism for associating tokens with AST names. - - - - - d4eba5bc by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add dummy support for hyperlinking named tokens. - - - - - 2b76141f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matcher bug causing wrong items being hyperlinked. - - - - - 2d48002e by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Constrain elements exported by hyperlinker modules. - - - - - 9715eec6 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for type token recognition. - - - - - 8fa401cb by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for binding token recognition. - - - - - d062400b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement go-to-definition mechanism for local bindings. - - - - - f4dc229b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement module export- and import-list item hyperlinking. - - - - - c9a46d58 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matching to allow parenthesized operators hyperlinking. - - - - - 03aad95a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix weird hyperlinking of parenthesized operators. - - - - - b4694a7d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for type declaration anchors. - - - - - 7358d2d2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for top-level function declaration anchors. - - - - - dfc24b24 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix external anchors to contain HTML file extension. - - - - - a045926c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Refactor the way AST names are handled within detailed tokens. - - - - - c76049b4 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement hyperlinking of imported module names. - - - - - 2d2a1572 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix parsing of single line comments with broken up newlines. - - - - - 11afdcf2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix bug with improper newline handling. - - - - - 8137f104 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issues with escaped newlines in comments. - - - - - 34759b19 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for parsing C preprocessor macros. - - - - - 09f0f847 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for parser module of source hyperlinker. - - - - - 709a8389 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for AST module of source hyperlinker. - - - - - 4df5c227 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add command line option for generating hyperlinked source. - - - - - 7a755ea2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Extend module interface with rich source token stream field. - - - - - 494f4ab1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement source tokenization during interface creation process. - - - - - 5f21c953 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create hyperlinker module and plug it into the Haddock pipeline. - - - - - 0cc8a216 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for providing custom CSS files for hyperlinked source. - - - - - a32bbdc1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for fancy highlighting upon hovering over identifier. - - - - - d16d642a by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make source hyperlinker generate output in apropriate directory. - - - - - ae12953d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create module with hyperlinker utility functions. - - - - - 6d4952c5 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make external hyperlinks point to locations specified by source URLs. - - - - - 8417555d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Rewrite source generation to fixed links and directory structure. - - - - - ce9cec01 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add basic support for cross-package hyperlink generation. - - - - - 7eaf025c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Disable generating hyperlinks for module references. - - - - - a50bf92e by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make Haddock generate source for all interfaces (also hidden ones). - - - - - f5ae2838 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Prevent source parser from throwing exception when lexing fails. - - - - - db9ffbe0 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement workaround for Chrome highlighting issues. - - - - - 0b6b453b by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate correct anchors for data constructors. - - - - - c86d38bc by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate anchors for record field declarations. - - - - - 063abf7f by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issue with hyperlink highlight styling in Chrome browser. - - - - - 880fc611 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking constructor names in patters. - - - - - c9e89b95 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record patterns. - - - - - 17a11996 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record expressions. - - - - - 0eef932d by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Make hyperlinker respect pretty-printer flag and add documentation. - - - - - f87c1776 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Unexpose hyperlinker modules in Cabal configuration. - - - - - 4c9e2b06 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Setup HSpec framework for Haddock API package. - - - - - 4b20cb30 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add basic tests related to comment parsing. - - - - - 6842e919 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add tests related to parsing basic language constructs. - - - - - 87bffb35 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add simple tests for do-notation parsing. - - - - - e7af1841 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add very simple QuickCheck properties for source parser spec. - - - - - c84efcf1 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Create simple test runner for hyperlinker tests. - - - - - 76b90447 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for basic identifier hyperlinking. - - - - - 0fbf4df6 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for operator hyperlinking. - - - - - 731aa039 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for constructor hyperlinking. - - - - - 995a78a2 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for record expressions and patterns hyperlinking. - - - - - 3566875a by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for literal syntax highlighting. - - - - - 68469a35 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add hyperlinker test runner to .cabal and .gitignore files. - - - - - aa946c93 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Adapt hyperlinker test runner to have the same interface as HTML one. - - - - - ce34da16 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Fix hyperlinker test runner file paths and add pretty-printing option. - - - - - 0d7dd65e by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add reference files for hyperlinker test cases. - - - - - efa4a1e0 by Łukasz Hanuszczak at 2015-07-01T00:47:32+02:00 Make hyperlinker test runner strip local links from generated source. - - - - - 3e96e584 by Łukasz Hanuszczak at 2015-07-01T01:14:59+02:00 Create simple script for accepting hyperlinker test case references. - - - - - 526fe610 by Łukasz Hanuszczak at 2015-07-01T01:16:41+02:00 Re-accept hyperlinker test cases with local references stripped out. - - - - - 892e2cb3 by Łukasz Hanuszczak at 2015-07-01T01:22:09+02:00 Fix bug with diffing wrong files in hyperlinker test runner. - - - - - 9ff46039 by Łukasz Hanuszczak at 2015-07-01T18:04:46+02:00 Remove unused dependencies in Haddock API spec configuration. - - - - - 47969c07 by Łukasz Hanuszczak at 2015-07-01T18:32:19+02:00 Add support for hyperlinking synonyms in patterns. - - - - - a73449e0 by Łukasz Hanuszczak at 2015-07-01T18:33:44+02:00 Create test case for hyperlinking @-patterns. - - - - - c2077ed8 by Łukasz Hanuszczak at 2015-07-01T19:06:04+02:00 Add support for hyperlinking universally quantified type variables. - - - - - 68017342 by Łukasz Hanuszczak at 2015-07-01T19:28:32+02:00 Create hyperlinker test case with quantified type variables. - - - - - 51c01a78 by Łukasz Hanuszczak at 2015-07-01T19:34:22+02:00 Add scoped type variables test for polymorphism test case. - - - - - 13181ae2 by Łukasz Hanuszczak at 2015-07-01T19:56:27+02:00 Add record wildcards test for records hyperlinking test case. - - - - - 991b81dd by Łukasz Hanuszczak at 2015-07-01T21:01:42+02:00 Document some functions in XHTML utlity module. - - - - - 98c8dfe5 by Łukasz Hanuszczak at 2015-07-01T22:25:21+02:00 Make hyperlinker render qualified names as one entity. - - - - - 75e13b9b by Łukasz Hanuszczak at 2015-07-01T22:27:38+02:00 Add qualified name test for identifiers hyperlinking test case. - - - - - de1e143f by Łukasz Hanuszczak at 2015-07-02T12:32:59+02:00 Fix crash happening when hyperlinking type family declarations. - - - - - 7a8fb175 by Łukasz Hanuszczak at 2015-07-02T12:47:03+02:00 Add support for anchoring data family constructor declarations. - - - - - 3b404e49 by Łukasz Hanuszczak at 2015-07-02T13:31:05+02:00 Improve support for hyperlinking type families. - - - - - 59eb7143 by Łukasz Hanuszczak at 2015-07-02T13:33:34+02:00 Add hyperlinker test case for checking type and type family declarations. - - - - - d1cda0c0 by Łukasz Hanuszczak at 2015-07-02T13:41:38+02:00 Fix issue with operators being recognized as preprocessor directives. - - - - - da206c9d by Łukasz Hanuszczak at 2015-07-02T17:18:12+02:00 Fix broken tests for parsing and hyperlinking hash operators. - - - - - 53750d1b by Łukasz Hanuszczak at 2015-07-02T18:53:28+02:00 Add support for anchoring signatures in type class declarations. - - - - - 1fa5bb10 by Łukasz Hanuszczak at 2015-07-02T19:04:47+02:00 Make hyperlinker generate anchors only to top-level value bindings. - - - - - a542305c by Łukasz Hanuszczak at 2015-07-02T19:05:58+02:00 Create hyperlinker test case for type classes. - - - - - b0dd4581 by Łukasz Hanuszczak at 2015-07-04T16:28:26+02:00 Update docs with information about source hyperlinking. - - - - - 9795302a by Łukasz Hanuszczak at 2015-07-04T16:52:15+02:00 Update docs on using `--read-interface` option. - - - - - 9acdc002 by Łukasz Hanuszczak at 2015-07-04T17:15:26+02:00 Remove potentially dangerous record access in hyperlinker AST module. - - - - - fb3ab7be by Łukasz Hanuszczak at 2015-07-04T17:40:10+02:00 Make Haddock generate warnings about potential misuse of hyperlinker. - - - - - a324c504 by Łukasz Hanuszczak at 2015-07-04T17:43:22+02:00 Fix incorrect specification of source style option in doc file. - - - - - 3f01a8e4 by Łukasz Hanuszczak at 2015-07-05T17:06:36+02:00 Refactor source path mapping to use modules as indices. - - - - - ac70f5b1 by Łukasz Hanuszczak at 2015-07-05T17:47:34+02:00 Fix bug where not all module interfaces were added to source mapping. - - - - - f5e57da9 by Łukasz Hanuszczak at 2015-07-06T16:39:57+02:00 Extract main hyperlinker types to separate module. - - - - - 43974905 by Łukasz Hanuszczak at 2015-07-06T16:52:13+02:00 Move source paths types to hyperlinker types module. - - - - - 3e236055 by Łukasz Hanuszczak at 2015-07-06T17:06:19+02:00 Add support for hyperlinking modules in import lists. - - - - - 58233d9f by Łukasz Hanuszczak at 2015-07-06T17:26:49+02:00 Add short documentation for hyperlinker source map type. - - - - - 14da016d by Łukasz Hanuszczak at 2015-07-06T18:07:20+02:00 Fix bug with module name being hyperlinked to `Prelude`. - - - - - 8f79db52 by Łukasz Hanuszczak at 2015-07-06T18:23:47+02:00 Fix problem with spec build in Haddock API configuration. - - - - - e7cc056c by Adam Sandberg Eriksson at 2015-07-07T23:22:21+01:00 StrictData: print correct strictness marks - - - - - e8253ca8 by Mateusz Kowalczyk at 2015-07-07T23:58:28+01:00 Update changelog - - - - - 0aba676b by Mateusz Kowalczyk at 2015-07-07T23:58:33+01:00 Relax upper bound on GHC a bit - - - - - 7a595381 by Mateusz Kowalczyk at 2015-07-07T23:58:52+01:00 Delete trailing whitespace - - - - - 50976d5e by Adam Sandberg Eriksson at 2015-07-08T15:03:04+02:00 StrictData: changes in HsBang type - - - - - 83b045fa by Mateusz Kowalczyk at 2015-07-11T14:35:18+01:00 Fix expansion icon for user-collapsible sections Closes haskell/haddock#412 - - - - - b2a3b0d1 by Mateusz Kowalczyk at 2015-07-22T22:03:21+01:00 Make some version changes after 2.16.1 release - - - - - a8294423 by Ben Gamari at 2015-07-27T13:16:07+02:00 Merge pull request haskell/haddock#422 from adamse/adamse-D1033 Merge for GHC D1033 - - - - - c0173f17 by randen at 2015-07-30T14:49:08-07:00 Break the response file by line termination rather than spaces, since spaces may be within the parameters. This simple approach avoids having the need for any quoting and/or escaping (although a newline char will not be possible in a parameter and has no escape mechanism to allow it). - - - - - 47c0ca14 by Alan Zimmerman at 2015-07-31T10:41:52+02:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - 45a9d770 by Mateusz Kowalczyk at 2015-07-31T09:47:43+01:00 Update changelog - - - - - 347a20a3 by Phil Ruffwind at 2015-08-02T23:15:26+01:00 Avoid JavaScript error during page load in non-frame mode In non-frame mode, parent.window.synopsis refers to the synopsis div rather than the nonexistent frame. Unfortunately, the script wrongly assumes that if it exists it must be a frame, leading to an error where it tries to access the nonexistent attribute 'replace' of an undefined value (synopsis.location). Closes haskell/haddock#406 - - - - - 54ebd519 by Phil Ruffwind at 2015-08-02T23:27:10+01:00 Link to the definitions to themselves Currently, the definitions already have an anchor tag that allows URLs with fragment identifiers to locate them, but it is rather inconvenient to obtain such a URL (so-called "permalink") as it would require finding the a link to the corresponding item in the Synopsis or elsewhere. This commit adds hyperlinks to the definitions themselves, allowing users to obtain links to them easily. To preserve the original aesthetics of the definitions, we alter the color of the link so as to be identical to what it was, except it now has a hover effect indicating that it is clickable. Additionally, the anchor now uses the 'id' attribute instead of the (obsolete) 'name' attribute. Closes haskell/haddock#407 - - - - - 02cc8bb7 by Phil Ruffwind at 2015-08-02T23:28:02+01:00 Fix typo in Haddock.Backends.Xhtml.Layout: divSynposis -> divSynopsis Closes haskell/haddock#408 - - - - - 2eb0a458 by Phil Ruffwind at 2015-08-02T23:30:07+01:00 Fix record field alignment when name is too long Change <dl> to <ul> and use display:table rather than floats to layout the record fields. This avoids bug haskell/haddock#301 that occurs whenever the field name gets too long. Slight aesthetic change: the entire cell of the field's source code is now shaded gray rather than just the area where text exists. Fixes haskell/haddock#301. Closes haskell/haddock#421 - - - - - 7abb3402 by Łukasz Hanuszczak at 2015-08-02T23:32:14+01:00 Add some utility definitions for generating line anchors. - - - - - e0b1d79b by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Make hyperlinked source renderer generate line anchors. - - - - - 24dd4c9f by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Re-accept test cases after adding line anchors for each of them. - - - - - 0372cfcb by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Override source line flags when source hyperlinker is enabled. - - - - - a81bcd07 by Mateusz Kowalczyk at 2015-08-02T23:58:25+01:00 Update tests to follow HTML changes - - - - - d2d7426f by Łukasz Hanuszczak at 2015-08-06T20:54:59+02:00 Fix quote syntax for promoted types. - - - - - 668cf029 by Łukasz Hanuszczak at 2015-08-06T21:12:00+02:00 Apply promoted type quoting to type-level consing. - - - - - 89f8e7c6 by Łukasz Hanuszczak at 2015-08-06T21:17:10+02:00 Extend advanced types test case with other examples. - - - - - 86494bca by Łukasz Hanuszczak at 2015-08-06T21:22:06+02:00 Rename advanced types test case and accept new output. - - - - - dbb7c7c0 by Adam Sandberg Eriksson at 2015-08-09T23:01:05+02:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 2a7704fa by Ben Gamari at 2015-08-10T13:18:05+02:00 Merge pull request haskell/haddock#433 from adamse/split-hsbang HsBang is split into HsSrcBang and HsImplBang - - - - - 891954bc by Thomas Miedema at 2015-08-15T14:51:18+02:00 Follow changes in GHC build system - - - - - b55d32ab by Mateusz Kowalczyk at 2015-08-21T18:06:09+01:00 Make Travis use 7.10.2 - - - - - 97348b51 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Move SYB utilities to standalone module. - - - - - 748ec081 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement `everywhere` transformation in SYB module. - - - - - 011cc543 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement generic transformation constructor. - - - - - b9510db2 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Create simple utility module for type specialization. - - - - - 43229fa6 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Make type of type specialization function more general. - - - - - fd844e90 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Add basic HTML test case for checking instance specialization. - - - - - 6ea0ad04 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Make HTML class instance printer take optional signature argument. - - - - - 65aa41b6 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Refactor instance head type to record instead of a meaningless tuple. - - - - - 3fc3bede by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add expandable method section for each class instance declaration. - - - - - 99ceb107 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Move dummy post-family instances for `DocName` to `Types` module. - - - - - e98f4708 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create convenience functions for type specialization module. - - - - - b947552f by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Hook type specialization logic with HTML pretty-printer. - - - - - dcaa8030 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create stub functions for sugaring specialized types. - - - - - fa84bc65 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement list syntax sugaring logic for specialized types. - - - - - e8b05b07 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement tuple syntax sugaring logic for specialized types. - - - - - 68a2e5bc by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Get rid of code duplication in type specialization module. - - - - - 4721c336 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create scaffolding of a framework for renaming specialized types. - - - - - 271b488d by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in missing cases in specialized type renaming function. - - - - - bfa5f2a4 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Remove code duplication in specialized type renamer. - - - - - ea6bd0e8 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Change state of the type renaming monad. - - - - - 77c5496e by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement simple mechanism for generating new type names. - - - - - 91bfb48b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in stub behaviour with actual environment renaming. - - - - - d244517b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix logic behind binder type renaming. - - - - - f3c5e360 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add SYB-like utility function for performing stateful queries. - - - - - eb3f9154 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create function for retrieving free variables from given type. - - - - - a94561d3 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix compilation error caused by incorrect type signature. - - - - - 8bb707cf by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Move `SetName` class definition to types module. - - - - - 5800b13b by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Hook type renamer with instance method HTML pretty-printer. - - - - - 6a480164 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some test cases for type renamer. - - - - - 839842f7 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized signatures refer to original signature declaration. - - - - - 4880f7c9 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized methods be nicely formatted again. - - - - - ab5a6a2e by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Attach source locations to the specialized class methods. - - - - - 43f8a559 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Extend instances test case to also test multi-name type signatures. - - - - - 59bc751c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix tab-based indentation in instances test case. - - - - - c2126815 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Improve placement of instance methods expander button. - - - - - 0a32e287 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add new data type declaration to instance specialization test case. - - - - - 5281af1f by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make type renamer first try single-letter names as alternatives. - - - - - 7d509475 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix type renamer bug with incorrect names being generated. - - - - - 0f35bf7c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some documentation and refactor type specialization module. - - - - - da1d0803 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix another bug where type renamer was generating incorrect names. - - - - - cd39b5cb by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Refactor type renamer to rebinding and pure renaming phases. - - - - - 850251f4 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix unwitting compilation bug. - - - - - e5e9fc01 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Integrate instance specification type into class instance definition. - - - - - 825b0ea0 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer neccessary instance specification type. - - - - - cdba44eb by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix declaration converter to use more appropriate mode for methods. - - - - - bc45c309 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug with types not being specialized at all. - - - - - 5d8e5d89 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug where instance expander was opening wrong section. - - - - - 6001ee41 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix another type renamer bug where not all names were rebound. - - - - - 5f58ce2a by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix yet another renamer bug where some names were not unique. - - - - - 8265e521 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split instance subsection layout method to top-level declarations. - - - - - e5e66298 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Rearrange layout of instance methods in generated documentation. - - - - - a50b4eea by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer used layout method. - - - - - 2ff36ec2 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach section title to the instance methods block. - - - - - 7ac15300 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Add basic tests for associated types in instances test case. - - - - - db0ea2f9 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach associated types information to instance header. - - - - - 71cad4d5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details section contain associated types information. - - - - - deee2809 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Improve look of rendered associated families in instance details. - - - - - 839d13a5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Introduce alternative type for family declarations. - - - - - d397f03f by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details record use new type for family declarations. - - - - - 2b23fe97 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split printer of type family header to separate functions. - - - - - c3498cdc by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Implement HTML renderer for pseudo-family declarations. - - - - - c12bbb04 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Apply type specializer to associated type family declarations. - - - - - 2fd69ff2 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Create helper method for specializing type signatures. - - - - - 475826e7 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Refactor specializer module to be independent from XHTML backend. - - - - - f00b431c by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add some documentation for instance head specializer. - - - - - a9fef2dc by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix bug with missing space in documentation for associated types. - - - - - 50e29056 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with incorrect instance details sections being expanded. - - - - - e6dfdd03 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by adding instance details section. - - - - - 75565b2a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make section identifier of instance details more GHC-independent. - - - - - add0c23e by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Re-accept tests after applying deterministic section identifiers. - - - - - 878f2534 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make identifier generation also architecture-independent. - - - - - 48be69f8 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with instance expander hijacking type hyperlink click. - - - - - 47830c1f by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Get rid of dreadful hashing function for generating identifiers. - - - - - 956cd5af by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Move `InstOrigin` type declaration to more appropriate module. - - - - - bf672ed3 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by changes related to instance expander. - - - - - 8f2a949a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add examples with type operators to the instances test case. - - - - - 64600a84 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add basic support for sugaring infix type operators. - - - - - 747d71b8 by Łukasz Hanuszczak at 2015-08-21T18:22:34+01:00 Add support for sugaring built-in function syntax. - - - - - d4696ffb by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Remove default methods from Hoogle class output. - - - - - bf0e09d7 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add fixity declarations in Hoogle backend output. - - - - - 90e91a51 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix bug with incorrect fixities being generated in Hoogle backend. - - - - - 48f11d35 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve class type family declarations output in Hoogle backend. - - - - - 661e8e8f by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add missing default family equations in Hoogle output. - - - - - e2d64103 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve formatting of class details output in Hoogle backend. - - - - - 490fc377 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix weird-looking Hoogle output for familyless classes. - - - - - ea115b64 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create script file for new HTML test runner. - - - - - 609913d3 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Set default behaviour if no arguments given. - - - - - dc115f67 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for providing optional arguments for test runner. - - - - - d93ec867 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve output of test runner error messages. - - - - - 0be9fe12 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for executing Haddock process in test runner. - - - - - 4e4d00d9 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add GHC path to test runner configuration. - - - - - d67a2086 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make GHC path a test runner command-line argument. - - - - - c810079a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Extend test runner configuration with Haddock arguments. - - - - - fee18845 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor test runner and create stub functions. - - - - - ff7c161f by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make test runner actually run Haddock executable. - - - - - 391f73e6 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with test runner not producing any output files. - - - - - 81a74e2d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Setup skeleton of framework for running tests. - - - - - f8a79ec4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with modules not being found in global search mode. - - - - - 7e700b4d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make Haddock standard output redirection be more configurable. - - - - - 53b4c17a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Incorporate old, ugly functions for comparing output files. - - - - - 8277c8aa by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor architecture of test runner output checking functions. - - - - - 587bb414 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement actual diffing mechanism. - - - - - 9ed2b5e4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve code style to match popular guidelines. - - - - - 14bffaf8 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make it possible to choose alternative diff tool. - - - - - 5cdfb005 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create stub methods for processing test output as XML documents. - - - - - 7ef8e12e by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement link-stripping logic as simple SYB transformation. - - - - - 8a1fcd4f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Incorporate link stripping to output diffing mechanism. - - - - - 37dba2bc by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement footer-stripping logic. - - - - - 9cd52120 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Add missing dependencies in Cabal configuration file. - - - - - e0f83c6e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix issue with output being printed in incorrect order. - - - - - 0a94fbb0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to run tests without generating diff. - - - - - 76a58c6f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor HTML test suite boilerplate to external package. - - - - - af41e6b0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utilities for storing directory configuration. - - - - - d8f0698f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move IO-dependent config of HTML test suite to test package. - - - - - 17369fa0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Enable all compiler warnings in Haddock test package configuration. - - - - - 9d03b47a by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move Haddock runner of HTML test suite to Haddock test package. - - - - - 4b3483c5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 03754194 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience wrappers to simplify in test entry points. - - - - - 27476ab7 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adjust module visibility and items they export. - - - - - c40002ba by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Remove no longer useful test option. - - - - - 55ab2541 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Change extension of test files used for diffing. - - - - - 136bf4e4 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor and simplify XHTML helper module of test package. - - - - - 69f7e3df by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix typo in link stripper of HTML test suite runner. - - - - - 0c3c1c6b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience script for running specific HTML tests. - - - - - 489e1b05 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement utility functions for conditional link stripping. - - - - - 0f985dc3 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt `hypsrc-test` module to work with new testing framework. - - - - - 927406f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement output accepting mechanism in test package. - - - - - 8545715e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utility function for recursive obtaining directory contents. - - - - - cb70381f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 019599b5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix path handling in test runner. - - - - - 399b985b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to specify ignored files for test output. - - - - - 41b3d93d by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt HTML test runner to use new ignoring functionality. - - - - - e2091c8b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix bug with not all test output files being checked. - - - - - b22134f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Specify ignored files for hyperlinker source test runner. - - - - - 3301dfa1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Copy test runner script for hyperlinked source case. - - - - - d39a6dfa by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner invoking Haddock in incorrect mode. - - - - - f32c8ff3 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix path handling in test module loader. - - - - - 10f94ee9 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make test runner ignore test packages with no modules. - - - - - 5dc4239c by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create test runner entry points for LaTeX test suite. - - - - - 58d1f7cf by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with unnecessary checking old test output. - - - - - c7ce76e1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Re-implement test acceptance functionality. - - - - - 13bbabe8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix warning about no longer needed definition. - - - - - 958a99b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Adapt Cabal configuration to execute LaTeX suite with new runner. - - - - - 550ff663 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Setup test suite for Hoogle backend. - - - - - 3aa969c4 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make Hoogle backend create output directory if needed. - - - - - eb085b02 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Add appropriate .gitignore entry and configure Hoogle test suite. - - - - - a50bf915 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner failing when run on multiple test packages. - - - - - bf5368b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create simple test cases for Hoogle backend. - - - - - 6121ba4b by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create helper function for conversion between XML and XHTML. - - - - - cb516061 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Refactor existing code to use XHTML printer instead of XML one. - - - - - e2de8c82 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Improve portability of test runner scripts. - - - - - 9563e774 by Łukasz Hanuszczak at 2015-08-22T23:43:16+02:00 Remove redundant import statement. - - - - - 55353df1 by Łukasz Hanuszczak at 2015-08-24T23:09:20+02:00 Fix bug with accepting to non-existing directory. - - - - - 00a334ca by Łukasz Hanuszczak at 2015-08-24T23:09:47+02:00 Accept output for Hoogle and LaTeX backends. - - - - - 29191d8b by Łukasz Hanuszczak at 2015-08-24T23:14:18+02:00 Get rid of obsolete testing utilities. - - - - - bbb25db3 by Łukasz Hanuszczak at 2015-08-24T23:18:50+02:00 Update sandbox setup guide to work with Haddock test package. - - - - - cfd45248 by Łukasz Hanuszczak at 2015-08-24T23:51:30+02:00 Make Travis aware of Haddock test package. - - - - - 74185b7a by Łukasz Hanuszczak at 2015-08-25T17:41:59+02:00 Fix test suite failure when used with Stack. - - - - - 18769697 by Łukasz Hanuszczak at 2015-08-25T18:02:09+02:00 Add sample Stack setup to the hacking guide. - - - - - 22715eeb by Łukasz Hanuszczak at 2015-08-25T18:04:47+02:00 Fix Markdown formatting of README file. - - - - - b49ec386 by Łukasz Hanuszczak at 2015-08-25T18:13:36+02:00 Setup Haddock executable path in Travis configuration. - - - - - 5d29eb03 by Eric Seidel at 2015-08-30T09:55:58-07:00 account for changes to ipClass - - - - - f111740a by Ben Gamari at 2015-09-02T13:20:37+02:00 Merge pull request haskell/haddock#443 from bgamari/ghc-head account for changes to ipClass - - - - - a2654bf6 by Jan Stolarek at 2015-09-03T01:32:57+02:00 Follow changes from haskell/haddock#6018 - - - - - 2678bafe by Richard Eisenberg at 2015-09-21T12:00:47-04:00 React to refactoring CoAxiom branch lists. - - - - - ebc56e24 by Edward Z. Yang at 2015-09-21T11:53:46-07:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4a8c4198 by Tamar Christina at 2015-09-27T13:59:08+02:00 Create Process: removed PhaseFailed - - - - - 7e99b790 by Oleg Grenrus at 2015-09-27T20:52:10+03:00 Generate docs for orphan instances - - - - - 32e932e2 by Oleg Grenrus at 2015-09-28T07:21:11+03:00 Have source links for orphan instances - - - - - c2eb9f4f by Oleg Grenrus at 2015-09-28T07:24:58+03:00 Print orphan instances header only if required - - - - - ff96f978 by Oleg Grenrus at 2015-09-28T07:40:54+03:00 Add orphan instances link to contents box - - - - - d72490a6 by Oleg Grenrus at 2015-09-28T16:37:44+03:00 Fix orphan instance collapsing - - - - - 25d3dfe5 by Ben Gamari at 2015-10-03T12:38:09+02:00 Merge pull request haskell/haddock#448 from Mistuke/fix-silent-death-of-runInteractive Remove PhaseFailed - - - - - 1e45e43b by Edward Z. Yang at 2015-10-11T13:10:10-07:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b1370ac1 by Adam Gundry at 2015-10-16T16:26:42+01:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 60bef421 by Simon Peyton Jones at 2015-10-26T12:52:36+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 4c1898ca by Simon Peyton Jones at 2015-10-27T14:24:56+00:00 Track change to PatSyn.patSynSig - - - - - 25108e85 by Simon Peyton Jones at 2015-10-27T17:34:18+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - 693643ac by Ben Gamari at 2015-10-28T14:33:06+01:00 Account for Typeable changes The treatment of type families changed. - - - - - cd7c2221 by Simon Peyton Jones at 2015-10-30T13:03:51+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - 712032cb by Herbert Valerio Riedel at 2015-10-31T11:01:45+01:00 Relax upper bound on `base` to allow base-4.9 - - - - - 0bfa0475 by Simon Peyton Jones at 2015-10-31T19:08:13+00:00 More adaption to wildcard-refactor - - - - - 0a3c0cb7 by Simon Peyton Jones at 2015-10-31T22:14:43+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - c4fd4ec9 by Alan Zimmerman at 2015-11-01T11:16:34+01:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 42cdd882 by Matthew Pickering at 2015-11-06T20:02:16+00:00 Change for IEThingWith - - - - - f368b7be by Ben Gamari at 2015-11-11T11:35:51+01:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - e32965b8 by Simon Peyton Jones at 2015-11-13T12:18:17+00:00 Merge with origin/head - - - - - ebcf795a by Edward Z. Yang at 2015-11-13T21:56:27-08:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4e23989f by Simon Peyton Jones at 2015-11-18T11:32:54+00:00 Wibbles to Haddock - - - - - 2289cd4a by Simon Peyton Jones at 2015-11-20T23:12:49+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor - - - - - 695975a6 by Alan Zimmerman at 2015-11-21T21:16:12+02:00 Update to match GHC wip/T11019 - - - - - bbba21e7 by Simon Peyton Jones at 2015-11-23T13:54:31+00:00 merge with origin/ghc-head - - - - - 3d664258 by Simon Peyton Jones at 2015-11-23T17:17:18+00:00 Wibble - - - - - e64cf586 by Herbert Valerio Riedel at 2015-12-05T00:29:55+01:00 Canonicalise Monad instances - - - - - a2de15a7 by Alan Zimmerman at 2015-12-05T17:33:52+02:00 Matching changes for haskell/haddock#11028 - - - - - cc29a3e4 by Alan Zimmerman at 2015-12-05T19:45:33+02:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 95dd15d1 by Richard Eisenberg at 2015-12-11T17:33:39-06:00 Update for type=kinds - - - - - cb5fd9ed by Herbert Valerio Riedel at 2015-12-14T15:07:30+00:00 Bump versions for ghc-7.11 - - - - - 4f286d96 by Simon Peyton Jones at 2015-12-14T15:10:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 13ea2733 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 098df8b8 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track changes in HsSyn for quasi-quotes - - - - - 716a64de by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track change in API of TyCon - - - - - 77a66bca by Adam Gundry at 2015-12-14T15:10:58+00:00 Track API changes to support empty closed type familes - - - - - f2808305 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track the new location of setRdrNameSpace - - - - - ba8b08a4 by Alan Zimmerman at 2015-12-14T15:10:59+00:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - a4ded87e by Thomas Winant at 2015-12-14T15:14:05+00:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 25c78107 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: print correct strictness marks - - - - - 6cbc41c4 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: changes in HsBang type - - - - - ad46821a by Alan Zimmerman at 2015-12-14T15:14:06+00:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - abc0ae5b by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 3308d06c by Thomas Miedema at 2015-12-14T15:14:07+00:00 Follow changes in GHC build system - - - - - 6c763deb by Eric Seidel at 2015-12-14T15:14:07+00:00 account for changes to ipClass - - - - - ae5b4eac by Jan Stolarek at 2015-12-14T15:17:00+00:00 Follow changes from haskell/haddock#6018 - - - - - ffbc40e0 by Richard Eisenberg at 2015-12-14T15:17:02+00:00 React to refactoring CoAxiom branch lists. - - - - - d1f531e9 by Edward Z. Yang at 2015-12-14T15:17:02+00:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 79f73754 by Tamar Christina at 2015-12-14T15:17:02+00:00 Create Process: removed PhaseFailed - - - - - 3d37bebb by Edward Z. Yang at 2015-12-14T15:20:46+00:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 5f8a9e44 by Adam Gundry at 2015-12-14T15:20:48+00:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 79dda70f by Simon Peyton Jones at 2015-12-14T15:26:02+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 959930fb by Simon Peyton Jones at 2015-12-14T15:37:50+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - e18a8df5 by Simon Peyton Jones at 2015-12-14T15:37:52+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - aa35ab52 by Simon Peyton Jones at 2015-12-14T15:40:18+00:00 More adaption to wildcard-refactor - - - - - 8ceef94b by Simon Peyton Jones at 2015-12-14T15:46:04+00:00 Track change to PatSyn.patSynSig - - - - - cd81e83d by Ben Gamari at 2015-12-14T15:46:06+00:00 Account for Typeable changes The treatment of type families changed. - - - - - 63c9117c by Herbert Valerio Riedel at 2015-12-14T15:46:34+00:00 Relax upper bound on `base` to allow base-4.9 - - - - - a484c613 by Alan Zimmerman at 2015-12-14T15:47:46+00:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 2c26fa51 by Matthew Pickering at 2015-12-14T15:47:47+00:00 Change for IEThingWith - - - - - 593baa0f by Ben Gamari at 2015-12-14T15:49:21+00:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - b6b5ca78 by Edward Z. Yang at 2015-12-14T15:49:54+00:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b5b0e072 by Alan Zimmerman at 2015-12-14T15:54:20+00:00 Update to match GHC wip/T11019 - - - - - 14ddeb68 by Simon Peyton Jones at 2015-12-14T15:54:22+00:00 Wibble - - - - - 10a90ad8 by Herbert Valerio Riedel at 2015-12-14T15:54:22+00:00 Canonicalise Monad instances - - - - - ed68ac50 by Alan Zimmerman at 2015-12-14T15:55:48+00:00 Matching changes for haskell/haddock#11028 - - - - - 3f7e5a2d by Alan Zimmerman at 2015-12-14T15:55:49+00:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 6543a73f by Richard Eisenberg at 2015-12-14T15:59:55+00:00 Update for type=kinds - - - - - 193a5c48 by Matthew Pickering at 2015-12-14T18:17:00+00:00 Changes to compile with 8.0 - - - - - add669ec by Matthew Pickering at 2015-12-14T18:47:12+00:00 Warnings - - - - - 223f3fb4 by Ben Gamari at 2015-12-15T23:45:05+01:00 Update for D1200 - - - - - d058388f by Ben Gamari at 2015-12-16T05:40:17-05:00 Types: Add Outputable[Bndr] DocName instances - - - - - 62ecd7fb by Ben Gamari at 2015-12-16T09:23:09-05:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ddbc187a by Ben Gamari at 2015-12-16T17:54:55+01:00 Update for D1200 - - - - - cec83b52 by Ben Gamari at 2015-12-16T17:54:55+01:00 Types: Add Outputable[Bndr] DocName instances - - - - - d12ecc98 by Ben Gamari at 2015-12-16T17:54:55+01:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ada1616f by Ben Gamari at 2015-12-16T17:54:58+01:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a4f0383d by Ben Gamari at 2015-12-16T23:32:38+01:00 Fix Hyperlinker GHC.con_names is now GHC.getConNames - - - - - a10e6849 by Ben Gamari at 2015-12-20T00:54:11+01:00 Merge remote-tracking branch 'mrhania/testing-framework-improvements' into ghc-head - - - - - f078b4fd by Ben Gamari at 2015-12-20T00:59:51+01:00 test: Compatibility with Cabal 1.23 - - - - - 88a511a9 by Ben Gamari at 2015-12-20T01:14:35+01:00 Merge remote-tracking branch 'phadej/orphans' into ghc-head - - - - - 4e250f36 by Ben Gamari at 2015-12-20T01:14:52+01:00 Add html-test for orphan instances output - - - - - 87fffbad by Alan Zimmerman at 2015-12-20T09:50:42+02:00 Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc - - - - - 6b7e51c9 by idontgetoutmuch at 2015-12-20T21:01:47+00:00 Merge pull request haskell/haddock#1 from haskell/ghc-head Ghc head - - - - - 229c1fb5 by Dominic Steinitz at 2015-12-21T07:19:16+00:00 Handle inline math with mathjax. - - - - - 57902d66 by Dominic Steinitz at 2015-12-21T08:07:11+00:00 Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs - - - - - 0e69f236 by Herbert Valerio Riedel at 2015-12-21T18:30:43+01:00 Fix-up left-over assumptions of GHC 7.12 into GHC 8.0 - - - - - c67f8444 by Simon Peyton Jones at 2015-12-22T16:26:56+00:00 Follow removal of NamedWildCard from HsType - - - - - da40327a by Ben Gamari at 2015-12-23T14:15:28+01:00 html-test/Operators: Clear up ambiguous types For reasons that aren't entirely clear a class with ambiguous types was accepted by GHC <8.0. I've added a functional dependency to clear up this ambiguity. - - - - - 541b7fa4 by Ben Gamari at 2015-12-23T14:18:51+01:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 0febc947 by Ben Gamari at 2015-12-24T00:30:20+01:00 hoogle-test/AssocTypes: Allow AmbiguousTypes GHC 8.0 complains otherwise - - - - - 25810841 by Ben Gamari at 2015-12-24T00:33:18+01:00 OrphanInstances: Accept test output - - - - - 841987f3 by Ben Gamari at 2015-12-25T11:03:11+01:00 Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head - - - - - 358391f0 by Ben Gamari at 2015-12-26T10:44:50+01:00 Add missing import - - - - - a8896885 by Ben Gamari at 2015-12-26T10:45:27+01:00 travis: Use Travis containers - - - - - 85e82134 by Herbert Valerio Riedel at 2015-12-30T17:25:39+01:00 tweak version bounds for GHC-8.1 - - - - - 672a5f75 by randen at 2016-01-01T23:45:25-08:00 The Haddock part for fully gcc-like response files " driver/Main.hs * Moved the response file handling into ResponseFile.hs, updating import section as appropriate. * driver/ResponseFile.hs * New file. In anticipation that maybe some day this could be provided by another library, and to make it possible to unit test, this functionality is pulled out of the Main.hs module, and expanded to support the style/format of response files which gcc uses. * The specification for the format of response files which gcc generates and consumes, seems to be best derived from the gcc code itself (libiberty/argv.c), so that is what has been done here. * This is intended to fix haskell/haddock#379 * driver-test/Main.hs * New file for testing code in the driver source tree * driver-test/ResponseFileSpec.hs * Tests, adapted/adopted from the same gcc code where the escaping/unescaping is from, in the hspec style of unit tests * haddock.cabal * Add the driver-test test-suite. Introduces a new library dependency (upon hspec) for the haddock driver target in the haddock.cabal file, but practically, this should not be a problem as the haddock-api tests already depend on hspec. - - - - - 498781df by Ben Gamari at 2016-01-06T13:41:04+01:00 Version bumps and changelog - - - - - 8451e46a by Ben Gamari at 2016-01-06T13:47:17+01:00 Merge remote-tracking branch 'randen/bug468' - - - - - fb2d9181 by Ben Gamari at 2016-01-06T08:14:42-05:00 Add ResponseFile to OtherModules - - - - - 2cb2d2e3 by Ben Gamari at 2016-01-06T14:35:00+01:00 Merge branch 'master' into ghc-head - - - - - 913477d4 by Eric Seidel at 2016-01-11T14:57:57-08:00 deal with un-wiring of IP class - - - - - c557a4b3 by Alan Zimmerman at 2016-01-15T11:14:35+02:00 Update to match wip/T11430 in GHC - - - - - 3e135093 by Alan Zimmerman at 2016-01-16T18:21:59+01:00 Update to match wip/T11430 in GHC - - - - - c48ef2f9 by Ben Gamari at 2016-01-18T09:50:06+01:00 Merge remote-tracking branch 'gridaphobe/ghc-head' into ghc-head - - - - - 9138a1b0 by Eric Seidel at 2016-01-18T12:50:15+01:00 deal with un-wiring of IP class (cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f) - - - - - b48c172e by Joachim Breitner at 2016-01-19T00:11:38+01:00 Make sure --mathjax affects all written HTML files This fixes haskell/haddock#475. - - - - - af61fe63 by Ryan Scott at 2016-02-07T23:25:57+01:00 Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes haskell/haddock#473) - - - - - b6458693 by Ben Gamari at 2016-02-07T23:29:27+01:00 Merge pull request haskell/haddock#477 from haskell/issue-475 Make sure --mathjax affects all written HTML files - - - - - adcc0071 by Ben Gamari at 2016-02-07T23:34:52+01:00 Merge branch 'master' into ghc-head - - - - - d0404e61 by Ben Gamari at 2016-02-08T12:46:49+01:00 doc: Switch to Sphinx - - - - - acb153b3 by Ben Gamari at 2016-02-08T12:46:56+01:00 Document --use-unicode flag - - - - - c20bdf1d by Ben Gamari at 2016-02-08T13:41:24+01:00 Fix GHC and haddock-library dependency bounds - - - - - 8d946801 by Ben Gamari at 2016-02-08T14:54:56+01:00 testsuite: Rework handling of output sanitization Previously un-cleaned artifacts were kept as reference output, making it difficult to tell what has changed and causing spurious changes in the version control history. Here we rework this, cleaning the output during acceptance. To accomplish this it was necessary to move to strict I/O to ensure the reference handle was closed before accept attempts to open the reference file. - - - - - c465705d by Ben Gamari at 2016-02-08T15:36:05+01:00 test: Compare on dump For reasons I don't understand the Xml representations differ despite their textual representations being identical. - - - - - 1ec0227a by Ben Gamari at 2016-02-08T15:36:05+01:00 html-test: Accept test output - - - - - eefbd63a by Ben Gamari at 2016-02-08T15:36:08+01:00 hypsrc-test: Accept test output And fix impredicative Polymorphism testcase. - - - - - d1df4372 by Ben Gamari at 2016-02-08T15:40:44+01:00 Merge branch 'fix-up-testsuite' - - - - - 206a3859 by Phil Ruffwind at 2016-02-08T17:51:21+01:00 Move the permalinks to "#" on the right side Since pull request haskell/haddock#407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). - - - - - 6c89fa03 by Phil Ruffwind at 2016-02-08T17:54:44+01:00 Update tests for previous commit - - - - - effaa832 by Ben Gamari at 2016-02-08T17:56:17+01:00 Merge branch 'anchors-redux' - - - - - 9a2bec90 by Ben Gamari at 2016-02-08T17:58:40+01:00 Use -fprint-unicode-syntax when --use-unicode is enabled This allows GHC to render `*` as its Unicode representation, among other things. - - - - - 28ecac5b by Ben Gamari at 2016-02-11T18:53:03+01:00 Merge pull request haskell/haddock#480 from bgamari/sphinx Move documentation to ReStructuredText - - - - - 222e5920 by Ryan Scott at 2016-02-11T15:42:42-05:00 Collapse type/data family instances by default - - - - - a80ac03b by Ryan Scott at 2016-02-11T20:17:09-05:00 Ensure expanded family instances render correctly - - - - - 7f985231 by Ben Gamari at 2016-02-12T10:04:22+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - d4eda086 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Various cleanups - - - - - 79bee48d by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show kind signatures for type family variables Addresses GHC haskell/haddock#11588. - - - - - b2981d98 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show 'where ...' after closed type family Seems like we should ideally show the actual equations as well but that seems like it would be a fair amount of work - - - - - cfc0e621 by Ben Gamari at 2016-02-18T22:48:12+01:00 Merge pull request haskell/haddock#483 from bgamari/T11588 Fix GHC haskell/haddock#11588 This fixes GHC haskell/haddock#11588: * Show where ... after closed type families * Show kind signatures on type family type variables - - - - - 256e8a0d by Ben Gamari at 2016-02-18T23:15:39+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 32402036 by Richard Eisenberg at 2016-02-24T13:21:44-05:00 Follow-on changes to support RuntimeRep - - - - - 2b1c572d by Matthew Pickering at 2016-03-04T21:04:02+00:00 Remove unused functions - - - - - eb906f50 by Richard Eisenberg at 2016-03-13T21:17:20+01:00 Follow-on changes to support RuntimeRep (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c) - - - - - 8c34ef34 by Richard Eisenberg at 2016-03-14T23:47:23-04:00 Changes due to fix for GHC#11648. - - - - - 0e022014 by Richard Eisenberg at 2016-03-15T14:06:45+01:00 Changes due to fix for GHC#11648. (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1) - - - - - ed3f78ab by Rik Steenkamp at 2016-04-02T22:20:36+01:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 - - - - - d3210042 by Rik Steenkamp at 2016-04-04T15:43:32+02:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb) - - - - - 236eec90 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 692ee7e0 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. - - - - - 79619f57 by Ben Gamari at 2016-04-10T23:46:22+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. (cherry picked from commit c6d6a18d85e5e2d9bb5904e6919e8a8d7e31c4c5) - - - - - 3358ccb4 by Ben Gamari at 2016-04-10T23:47:27+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 264949b1 by Ben Gamari at 2016-04-16T17:50:23+02:00 Merge pull request haskell/haddock#482 from RyanGlScott/ghc-head Collapse type/data family instances by default - - - - - 478c483a by Ben Gamari at 2016-04-16T17:51:09+02:00 Merge pull request haskell/haddock#489 from mpickering/unused-functions Remove some unused functions - - - - - c94e55f0 by Ryan Scott at 2016-04-16T17:57:54+02:00 Collapse type/data family instances by default (cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088) - - - - - 31e633d3 by Ryan Scott at 2016-04-16T17:58:06+02:00 Ensure expanded family instances render correctly (cherry picked from commit 1338b5d7c32939de6bbc31af0049477e4f847103) - - - - - 03e4d197 by Matthew Pickering at 2016-04-16T17:58:21+02:00 Remove unused functions (cherry picked from commit b89d1c2456bdb2d4208d94ded56155f7088a37d0) - - - - - ed4116f6 by Ben Gamari at 2016-04-20T10:46:57+02:00 ghc: Install files for needed --hyperlinked-source - - - - - 0be999c4 by Ben Gamari at 2016-04-20T11:37:54+02:00 ghc: Install files for needed --hyperlinked-source (cherry picked from commit 5c82c9fc2d21ddaae4a2470f1c375426968f19c6) - - - - - 4d17544c by Simon Peyton Jones at 2016-04-20T12:42:28+01:00 Track change to HsGroup This relates to a big GHC patch for Trac haskell/haddock#11348 - - - - - 1700a50d by Ben Gamari at 2016-05-01T13:19:27+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. - - - - - 0b7c8125 by Ben Gamari at 2016-05-01T13:21:43+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. (cherry picked from commit 609018dd09c4ffe27f9248b2d8b50f6196cd42b9) - - - - - af115ce0 by Ryan Scott at 2016-05-04T22:15:50-04:00 Render Haddocks for derived instances Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac haskell/haddock#11768. - - - - - 76fa1edc by Ben Gamari at 2016-05-10T18:13:25+02:00 haddock-test: A bit of refactoring for debuggability - - - - - 7d4c4b20 by Ben Gamari at 2016-05-10T18:13:25+02:00 Create: Mark a comment as TODO - - - - - 2a6d0c90 by Ben Gamari at 2016-05-10T18:13:25+02:00 html-test: Update reference output - - - - - bd60913d by Ben Gamari at 2016-05-10T18:13:25+02:00 hypsrc-test: Fix reference file path in cabal file It appears the haddock insists on prefixing --hyperlinked-sourcer output with directory which the source appeared in. - - - - - c1548057 by Ben Gamari at 2016-05-10T18:22:12+02:00 doc: Update extra-source-files in Cabal file - - - - - 41d5bae3 by Ben Gamari at 2016-05-10T18:29:21+02:00 Bump versions - - - - - ca75b779 by Ben Gamari at 2016-05-11T16:03:44+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 4e3cfd62 by Ben Gamari at 2016-05-11T16:06:45+02:00 Merge remote-tracking branch 'RyanGlScott/ghc-head' into ghc-head - - - - - a2379970 by Ben Gamari at 2016-05-11T23:15:11+02:00 doc: Add clean targets - - - - - f275212e by Ben Gamari at 2016-05-11T23:15:14+02:00 doc: Add html as an all-target for ghc Otherwise the html documentation won't be installed for binary-dist. - - - - - 388fc0af by Ben Gamari at 2016-05-12T09:49:12+02:00 Update CHANGES - - - - - bad81ad5 by Ben Gamari at 2016-05-12T09:49:38+02:00 Version bump - - - - - c01688a7 by Ben Gamari at 2016-05-12T10:04:58+02:00 Revert "Version bump" This bump was a bit premature. This reverts commit 7b238d9c5be9b07aa2d10df323b5c7b8d1634dc8. - - - - - 7ed05724 by Ben Gamari at 2016-05-12T10:05:33+02:00 doc: Fix GHC clean rule Apparently GHC's build system doesn't permit wildcards in clean paths. - - - - - 5d9611f4 by Ben Gamari at 2016-05-12T17:43:50+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 653566b2 by Ben Gamari at 2016-05-14T09:57:31+02:00 Version bump to 2.17.2 - - - - - b355c439 by Ben Gamari at 2016-05-14T09:57:51+02:00 doc: Use `$(MAKE)` instead of `make` This is necessary to ensure we use gmake. - - - - - 8a18537d by Ben Gamari at 2016-05-14T10:15:45+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - b3290ef1 by Sebastian Meric de Bellefon at 2016-05-14T11:29:47-04:00 Fix haskell/haddock#303. Hide footer when printing The "Produced by Haddock" footer was overlapping the page's body when printing. This patch hides the footer with a css media rule. - - - - - b4a76f89 by Sebastian Meric de Bellefon at 2016-05-15T02:12:46-04:00 Fix haskell/haddock#280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines - - - - - ba797c9e by Ben Gamari at 2016-05-16T14:53:46+02:00 doc: Vendorize alabaster Sphinx theme Alabaster is now the default sphinx theme and is a significant improvement over the previous default that it's worthproviding it when unavailable (e.g. Sphinx <1.3). - - - - - c9283e44 by Ben Gamari at 2016-05-16T14:55:17+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 1c9ea198 by Sebastian Méric de Bellefon at 2016-05-16T12:30:40-04:00 Merge pull request haskell/haddock#502 from Helkafen/master Fix haskell/haddock#303. Hide footer when printing - - - - - 33631016 by Ben Gamari at 2016-05-16T19:56:11+02:00 Revert "doc: Vendorize alabaster Sphinx theme" This ended up causes far too many issues to be worthwhile. We'll just have to live with inconsistent haddock documentation. This reverts commit cec21957001143794e71bcd9420283df18e7de40. - - - - - 93317d26 by Ben Gamari at 2016-05-16T19:56:11+02:00 cabal: Fix README path - - - - - c8695b22 by Ben Gamari at 2016-05-16T19:58:51+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 0b50eaaa by Ben Gamari at 2016-05-16T21:02:08+02:00 doc: Use whichever theme sphinx deems appropriate - - - - - 857c1c9c by Ben Gamari at 2016-05-16T21:07:08+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 15fc5637 by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Remove redundant imports - - - - - 132ddc6a by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Better debug output For tracking down haskell/haddock#505 - - - - - 2252a149 by Ben Gamari at 2016-05-22T12:43:59+02:00 Don't consider default class ops when looking for decls When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of haskell/haddock#505. - - - - - 4886b2ec by Oleg Grenrus at 2016-05-24T16:19:48+03:00 UnfelpfulSpan line number omitted Kind of resolves https://github.com/haskell/haddock/issues/508 - - - - - a4befd36 by Oleg Grenrus at 2016-05-24T16:53:35+03:00 Change Hyperlinked lexer to know about DataKinds ticks - - - - - f45cb52e by David Feuer at 2016-05-24T18:48:53-04:00 Make parser state a newtype Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day. - - - - - 05013dd7 by Sebastian Meric de Bellefon at 2016-05-24T22:03:55-04:00 remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) Frames are a bit broken, ignored by Hackage, and considered obsolete in general. This patch disables frames generation. The mini_*.html files are still used in the synopsis. - - - - - b8163a88 by Ben Gamari at 2016-05-25T14:44:15+02:00 Merge pull request haskell/haddock#507 from bgamari/T505 Fix haskell/haddock#505 - - - - - ea1b30c6 by Sebastian Meric de Bellefon at 2016-05-25T14:17:00-04:00 Update CHANGES - - - - - eddfc258 by Sebastian Méric de Bellefon at 2016-05-25T15:17:40-04:00 Merge pull request haskell/haddock#514 from Helkafen/frames remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) - - - - - 0e506818 by Alex Biehl at 2016-05-26T12:43:09+02:00 Remove misplaced haddock comment - - - - - a07d28c0 by Ben Gamari at 2016-05-27T11:34:59+02:00 Merge pull request haskell/haddock#515 from alexbiehl/master Remove misplaced haddock comment - - - - - 9001d267 by Ben Gamari at 2016-05-27T11:35:46+02:00 Merge pull request haskell/haddock#513 from treeowl/newtype-since Make parser state a newtype - - - - - 74e1a018 by Sebastian Méric de Bellefon at 2016-05-28T17:28:15-04:00 Merge pull request haskell/haddock#504 from Helkafen/issue-280 Fix haskell/haddock#280. Parsing of module header - - - - - 37557f4f by Alan Zimmerman at 2016-05-29T23:36:50+02:00 Matching changes for haskell/haddock#12105 - - - - - 7d09e5d6 by Sebastian Meric de Bellefon at 2016-06-03T18:07:48-04:00 Version bumps (2.17.3, 1.4.2) - - - - - 85b4bc15 by Sebastian Méric de Bellefon at 2016-06-06T18:35:13-04:00 Merge pull request haskell/haddock#521 from Helkafen/master Version bumps (2.17.3, 1.4.2) - - - - - e95f0dee by Sebastian Meric de Bellefon at 2016-06-06T19:11:35-04:00 publish haddock-test library - - - - - 4de40586 by Sebastian Méric de Bellefon at 2016-06-06T20:26:30-04:00 Merge pull request haskell/haddock#512 from phadej/oleg-fixes Fixes for haskell/haddock#508 and haskell/haddock#510 - - - - - ddfd0789 by Dominic Steinitz at 2016-06-09T09:27:28+01:00 Documentation for LaTeX markup. - - - - - 697a503a by Dominic Steinitz at 2016-06-09T09:33:59+01:00 Fix spelling mistake. - - - - - 246f6fff by Dominic Steinitz at 2016-06-09T09:37:15+01:00 Camel case MathJax. - - - - - 4684bd23 by Dominic Steinitz at 2016-06-09T09:44:53+01:00 Fix math typo and add link. - - - - - f20c037c by Simon Peyton Jones at 2016-06-13T18:26:03+01:00 Follow changes to LHsSigWcType - - - - - 0c58996d by Simon Peyton Jones at 2016-06-15T12:56:01+01:00 Follow GHC re-adding FunTy - - - - - 401b5ca7 by Sebastian Méric de Bellefon at 2016-06-15T12:16:47-04:00 Merge pull request haskell/haddock#525 from idontgetoutmuch/master Documentation for LaTeX markup. - - - - - 92d263b7 by Sebastian Méric de Bellefon at 2016-06-15T12:17:29-04:00 Merge pull request haskell/haddock#522 from Helkafen/master publish haddock-test library - - - - - 0953a2ca by Sebastian Meric de Bellefon at 2016-06-16T00:46:46-04:00 Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 65453e14 by Ben Gamari at 2016-06-16T11:16:32+02:00 ocean: Ensure that synopsis fully covers other content Previously MathJax content was being rendered on top of the synopsis due to ambiguous z-ordering. Here we explicitly give the synopsis block a higher z-index to ensure it is rendered on top. Fixes haskell/haddock#531. - - - - - 68e411a1 by Sebastian Méric de Bellefon at 2016-06-16T23:34:39-04:00 Merge pull request haskell/haddock#534 from bgamari/T531 ocean: Ensure that synopsis fully covers other content - - - - - fad6491b by Sebastian Méric de Bellefon at 2016-06-18T23:57:20-04:00 Merge pull request haskell/haddock#533 from Helkafen/master Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 6108e21b by Sebastian Meric de Bellefon at 2016-06-22T23:08:28-04:00 do not create empty src directory Fix haskell/haddock#536. - - - - - 1ef23823 by Sebastian Méric de Bellefon at 2016-06-24T00:04:48-04:00 Merge pull request haskell/haddock#537 from Helkafen/master do not create empty src directory - - - - - 966baa96 by Omari Norman at 2016-06-29T21:59:34-04:00 Add $ as a special character If this character is not escaped, documentation built with Haddock 2.17.2 will fail. This was not an issue with 2.16 series, which causes builds to fail and there is nothing in the docs or error message giving a clue about why builds that used to succeed now don't. - - - - - 324adb60 by Ben Gamari at 2016-07-01T12:18:51+02:00 GhcUtils: Changes for multi-pattern signatures - - - - - d7571675 by Ömer Sinan Ağacan at 2016-07-21T13:30:47+02:00 Add support for unboxed sums - - - - - 29d0907b by Simon Marlow at 2016-07-22T13:55:48+01:00 Disable NFData instances for GHC types when GHC >= 8.2 - - - - - 702d95f3 by Simon Marlow at 2016-08-02T15:57:30+02:00 Disable NFData instances for GHC types when GHC >= 8.0.2 (cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a) - - - - - f4fa79c3 by Ben Gamari at 2016-08-07T13:51:18+02:00 ghc.mk: Don't attempt to install html/frames.html The frames business has been removed. - - - - - 9cd63daf by Ben Gamari at 2016-08-07T13:51:40+02:00 Haddock.Types: More precise version guard This allows haddock to be built with GHC 8.0.2 pre-releases. - - - - - f3d7e03f by Mateusz Kowalczyk at 2016-08-29T20:47:45+01:00 Merge pull request haskell/haddock#538 from massysett/master Add $ as a special character - - - - - 16dbf7fd by Bartosz Nitka at 2016-09-20T19:44:04+01:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 - - - - - 7c31c1ff by Bartosz Nitka at 2016-09-27T17:32:22-04:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b) - - - - - 33a90dce by Ryan Scott at 2016-09-30T20:53:41-04:00 Haddock changes for T10598 See https://ghc.haskell.org/trac/ghc/ticket/10598 - - - - - 1f32f7cb by Ben Gamari at 2016-10-13T20:01:26-04:00 Update for refactoring of NameCache - - - - - 1678ff2e by Ben Gamari at 2016-11-15T17:42:48-05:00 Bump upper bound on base - - - - - 9262a7c5 by Alan Zimmerman at 2016-12-07T21:14:28+02:00 Match changes in GHC wip/T3384 branch - - - - - ac0eaf1a by Ben Gamari at 2016-12-09T09:48:41-05:00 haddock-api: Don't use stdcall calling convention on 64-bit Windows See GHC haskell/haddock#12890. - - - - - 04afe4f7 by Alan Zimmerman at 2016-12-12T20:07:21+02:00 Matching changes for GHC wip/T12942 - - - - - e1d1701d by Ben Gamari at 2016-12-13T16:50:41-05:00 Bump base upper bound - - - - - 3d3eacd1 by Alan Zimmerman at 2017-01-10T16:59:38+02:00 HsIParamTy now has a Located name - - - - - 7dbceefd by Kyrill Briantsev at 2017-01-12T13:23:50+03:00 Prevent GHC API from doing optimization passes. - - - - - d48d1e33 by Richard Eisenberg at 2017-01-19T08:41:41-05:00 Upstream changes re levity polymorphism - - - - - 40c25ed6 by Alan Zimmerman at 2017-01-26T15:16:18+02:00 Changes to match haskell/haddock#13163 in GHC - - - - - 504f586d by Ben Gamari at 2017-02-02T17:19:37-05:00 Kill remaining static flags - - - - - 49147ea0 by Justus Adam at 2017-03-02T15:33:34+01:00 Adding MDoc to exports of Documentation.Haddock - - - - - 1cfba9b4 by Justus Adam at 2017-03-09T11:41:44+01:00 Also exposing toInstalledIface - - - - - 53f0c0dd by Ben Gamari at 2017-03-09T13:10:08-05:00 Bump for GHC 8.3 - - - - - c7902d2e by Ben Gamari at 2017-03-09T23:46:02-05:00 Bump for GHC 8.2 - - - - - 4f3a74f8 by Ben Gamari at 2017-03-10T10:21:55-05:00 Merge branch 'ghc-head' - - - - - e273b72f by Richard Eisenberg at 2017-03-14T13:34:04-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - 6ec3d436 by Richard Eisenberg at 2017-03-14T15:15:52-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - eee3cda1 by Ben Gamari at 2017-03-15T15:19:59-04:00 Adapt to EnumSet - - - - - 017cf58e by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 736d6773 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 475f84a0 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 13240b53 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - cd16d529 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 3bea97ae by Edward Z. Yang at 2017-03-15T22:50:46-07:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b2b051ce by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 0f082795 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 20ef63c9 by Edward Z. Yang at 2017-03-22T13:48:12-07:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 45692dcb by Edward Z. Yang at 2017-03-22T14:11:25-07:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4eae8caf by Ben Gamari at 2017-03-23T09:25:33-04:00 Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEAD - - - - - 0bbe03f5 by Ben Gamari at 2017-03-23T09:27:28-04:00 haddock-api: Bump bound on GHC - - - - - 65f3ac9d by Alex Biehl at 2017-03-23T17:36:11+01:00 Merge pull request haskell/haddock#581 from JustusAdam/master Adding more exports to Documentation.Haddock - - - - - 37d49a47 by Alex Biehl at 2017-03-23T17:39:14+01:00 Merge pull request haskell/haddock#568 from awson/ghc-head Prevent GHC API from doing optimization passes. - - - - - 1ed047e4 by Brian Huffman at 2017-03-23T17:45:58+01:00 Print any user-supplied kind signatures on type parameters. This applies to type parameters on data, newtype, type, and class declarations, and also to forall-bound type vars in type signatures. - - - - - 1b78ca5c by Brian Huffman at 2017-03-23T17:45:58+01:00 Update test suite to expect kind annotations on type parameters. - - - - - a856b162 by Alex Biehl at 2017-03-23T17:49:32+01:00 Include travis build indication badge - - - - - 8e2e2c56 by Ben Gamari at 2017-03-23T17:20:08-04:00 haddock-api: Bump bound on GHC - - - - - 4d2d9995 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737) - - - - - a650e20f by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858) - - - - - caa282c2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 2067a2d0afa9cef381d26fb7140b67c62f433fc0) - - - - - 49684884 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc) - - - - - 4dcfeb1a by Edward Z. Yang at 2017-03-23T17:20:08-04:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a) - - - - - 74dd19d2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e) - - - - - a9b19a23 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3) - - - - - d3631064 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit bf3c4d72a0fda38561376eac7eda216158783267) - - - - - ef2148fc by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1) - - - - - 2f29518b by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 4eb765ca4205c79539d60b7afa9b7e261a4a49fe) - - - - - 37de047d by Phil Ruffwind at 2017-04-03T11:57:14+02:00 Update MathJax URL MathJax is shutting down their CDN: https://www.mathjax.org/cdn-shutting-down/ They recommend migrating to cdnjs. - - - - - e9d24ba8 by David C. Turner at 2017-04-03T14:58:01+02:00 Add highlight for :target to ocean.css - - - - - 4819a202 by Alex Biehl at 2017-04-11T19:36:48+02:00 Allow base-4.10 for haddock-test - - - - - 44cec69c by Alex Biehl at 2017-04-11T19:39:22+02:00 cabal.project for haddock-api, haddock-library and haddock-test - - - - - 935d0f6a by Alex Biehl at 2017-04-11T19:46:29+02:00 Move dist scripts to scripts/ - - - - - 128e150c by Alex Biehl at 2017-04-11T20:34:46+02:00 Add haddock to cabal.project - - - - - cc8e08ea by Alex Biehl at 2017-04-11T20:35:08+02:00 Read files for hyperlinker eagerly This also exposes Documentation.Haddock.Utf8 - - - - - 152dda78 by Alex Biehl at 2017-04-11T20:37:06+02:00 Explicit import list ofr Control.DeepSeq in Haddock.Interface.Create - - - - - 501b33c4 by Kyrill Briantsev at 2017-04-11T21:01:42+02:00 Prevent GHC API from doing optimization passes. - - - - - c9f3f5ff by Alexander Biehl at 2017-04-12T16:36:53+02:00 Add @alexbiehl as maintaner - - - - - 76f214cc by Alex Biehl at 2017-04-13T07:27:18+02:00 Disable doctest with ghc-8.3 Currently doctest doesn't support ghc-head - - - - - 46b4f5fc by Edward Z. Yang at 2017-04-22T20:38:26-07:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f0555235 by Alex Biehl at 2017-04-25T10:08:48+02:00 Travis: Use ghc-8.2.1 on master - - - - - 966ea348 by Alex Biehl at 2017-04-25T10:32:01+02:00 Travis: Verbose cabal output cf. https://travis-ci.org/haskell/haddock/jobs/225512194#L377 - - - - - 36972bcd by Alex Biehl at 2017-04-25T10:40:43+02:00 Use travis_retry for cabal invocations - - - - - b3a09d2c by Alex Biehl at 2017-04-25T17:02:20+02:00 Use new MathJax URL in html-test 18ed871afb82560d5433b2f53e31b4db9353a74e switched to a new MathJax URL but didn't update the tests. - - - - - ae331e5f by Alexander Biehl at 2017-04-25T17:02:20+02:00 Expand signatures for class declarations - - - - - e573c65a by Alexander Biehl at 2017-04-25T17:02:20+02:00 Hoogle: Correctly print classes with associated data types - - - - - 3fc6be9b by Edward Z. Yang at 2017-04-25T17:02:20+02:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9) - - - - - 6725c060 by Herbert Valerio Riedel at 2017-04-25T17:02:20+02:00 `html-test --accept` deltas to reference samples - - - - - 7d444d61 by Alex Biehl at 2017-04-26T07:13:50+02:00 Remove anything related to obsolete frames mode - - - - - b888972c by Alex Biehl at 2017-04-26T07:49:10+02:00 Cherry-picked remaining commits from haddock-2.17.4-release (#603) * Release haddock/haddock-api 2.17.4 and haddock-library 1.4.3 * Set version bounds for haddock-library NB: This allows GHC 8.2.1's base * Set version bounds for haddock & haddock-api The version bounds support GHC 8.2 * Merge (temporary) v2.17.3 branch into v2.17 This allows us to delete the v2.17.3 branch * Fixup changelog * Pin down haddock-api to a single version as otherwise `haddock`'s package version has no proper meaning * fix source-repo spec for haddock-api - - - - - 4161099b by Alex Biehl at 2017-04-26T11:11:20+02:00 Update changelog to reflect news in HEAD - - - - - eed72cb8 by Alex Biehl at 2017-04-26T11:11:20+02:00 Markdownify changelog - - - - - 5815cea1 by Alex Biehl at 2017-04-26T11:32:33+02:00 Bump to 2.18.0 (#605) - - - - - a551d558 by Alex Biehl at 2017-04-29T22:00:25+02:00 Update attoparsec-0.12.1.1 to attoparsec-0.13.1.0 - - - - - ea164a8d by Sergey Vinokurov at 2017-04-29T22:42:36+02:00 Improve error message - - - - - 2e10122f by Alex Biehl at 2017-04-30T10:07:46+02:00 Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. - - - - - f9b24d99 by Alex Biehl at 2017-05-01T17:40:36+02:00 Lazily decode docMap and argMap (#610) These are only used in case of a doc reexport so most of the time decoding these is wasted work. - - - - - 2372af62 by Alex Biehl at 2017-05-01T21:59:23+02:00 Fix Binary instance for InstalledInterface (#611) (#610) introduced lazy decoding for docs from InstalledInterface but forgot to remove the original calls to get and put_ - - - - - 6c633c13 by Nathan Collins at 2017-05-11T11:47:55+02:00 Improve documenation of Haddock markup (#614) * Improve documentation of Haddock markup. - document that Haddock supports inferring types top-level functions with without type signatures, but also explain why using this feature is discouraged. Looks like this feature has been around since version 2.0.0.0 in 2008! - rework the "Module description" section: - move the general discussion of field formatting to the section intro and add examples illustrating the prose for multiline fields. - mention that newlines are preserved in some multiline fields, but not in others (I also noticed that commas in the `Copyright` field are not preserved; I'll look into this bug later). - add a subsection for the module description fields documentation, and put the field keywords in code formatting (double back ticks) instead of double quotes, to be consistent with the typesetting of keywords in other parts of the documentation. - mention that "Named chunks" are not supported in the long-form "Module description" documentation. - fix formatting of keywords in the "Module attributes" section. Perhaps these errors were left over from an automatic translation to ReST from some other format as part of the transition to using Sphinx for Haddock documentation? Also, add a missing reference here; it just said "See ?"! - update footnote about special treatment for re-exporting partially imported modules not being implemented. In my tests it's not implemented at all -- I tried re-exporting both `import B hiding (f)` and `import B (a, b)` style partial imports, and in both cases got the same result as with full imports `import B`: I only get a module reference. * Rework the `Controlling the documentation structure` section. My main goal was to better explain how to use Haddock without an export list, since that's my most common use case, but I hope I improved the section overall: - remove the incomplete `Omitting the export list` section and fold it into the other sections. In particular, summarize the differences between using and not using an export list -- i.e. control over what and in what order is documented -- in the section lead. - add "realistic" examples that use the structure markup, both with and without an export list. I wanted a realistic example here to capture how it can be useful to explain the relationship between a group of functions in a section, in addition to documenting their individual APIs. - make it clear that you can associate documentation chunks with documentation sections when you aren't using an export list, and that doing it in the most obvious way -- i.e. with `-- |`, as you can in the export list -- doesn't work without an export list. It took me a while to figure this out the first time, since the docs didn't explain it at all before. - add a "no export list" example to the section header section. - add more cross references. * Add examples of gotchas for markup in `@...@`. I'm not sure this will help anyone, since I think most people first learn about `@...@` by reading other people's Haddocks, but I've documented the mistakes which I've made and then gotten confused by. * Use consistent Capitalization of Titles. Some titles were in usual title caps, and others only had the first word capitalized. I chose making them all use title caps because that seems to make the cross references look better. - - - - - d4734f45 by Ben Gamari at 2017-05-12T20:36:08+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 93883f37 by Alex Biehl at 2017-05-12T21:02:33+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 5b8f179c by Alex Biehl at 2017-05-13T12:48:10+02:00 Consequently use inClass and notInClass in haddock-library (#617) These allow attoparsec to do some clever lookup optimization - - - - - 77984b82 by Doug Wilson at 2017-05-27T17:37:38+02:00 Don't enable compilation for template haskell (#624) This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa - - - - - 5a3de2b4 by Doug Wilson at 2017-05-27T19:54:53+02:00 Improve Syb code (#621) Specialize.hs and Ast.hs are modified to have their Syb code not recurse into Name or Id in HsSyn types. Specialize.hs is refactored to have fewer calls to Syb functions. Syb.hs has some foldl calls replaced with foldl' calls. There is still a lot of performance on the floor of Ast.hs. The RenamedSource is traversed many times, and lookupBySpan is very inefficient. everywhereBut and lookupBySpan dominate the runtime whenever --hyperlinked-source is passed. - - - - - 3d35a949 by Alex Biehl at 2017-05-30T19:01:37+02:00 Clear fixme comment (#625) - - - - - 2a44bd0c by Alex Biehl at 2017-05-30T19:02:12+02:00 Make haddock-library and haddock-api warning free (#626) - - - - - bd1a0e42 by Alex Biehl at 2017-06-01T10:40:33+02:00 Include `driver-test/*.hs` sdist (#630) This lead to haskell/haddock#629. - - - - - 184a3ab6 by Doug Wilson at 2017-06-03T12:02:08+02:00 Disable pattern match warnings (#628) This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns - - - - - 0cf68004 by Alex Biehl at 2017-06-03T20:37:28+02:00 Allow user defined signatures for pattern synonyms (#631) - - - - - 7f51a58a by Alex Biehl at 2017-06-04T11:56:38+02:00 Use NameSet for isExported check (#632) - - - - - d8f044a9 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Match new AST as per GHC wip/new-tree-one-param See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow - - - - - da1254e3 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Rename extension index tags - - - - - 538c7514 by Christiaan Baaij at 2017-06-09T08:26:43+02:00 Haddock support for bundled pattern synonyms (#627) * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after haskell/haddock#631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case - - - - - a050bffd by Doug Wilson at 2017-06-21T09:27:33+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636) There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6 - - - - - 5d06b871 by Doug Wilson at 2017-06-22T20:23:29+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639) * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports - - - - - b11bb73a by Alex Biehl at 2017-06-23T14:44:41+02:00 Lookup fixities for reexports without subordinates (#642) So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In haskell/haddock#644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from haskell/haddock#642 top-level functions now started to fail reexporting their fixities. - - - - - d2a6dad6 by Alex Biehl at 2017-06-23T18:30:45+02:00 Don't include names with empty subordinates in maps (#644) These are unecessary anyway and just blow up interface size - - - - - 69c2aac4 by Alex Biehl at 2017-06-29T19:54:49+02:00 Make per-argument docs for class methods work again (#648) * Make per-argument docs for class methods work again * Test case - - - - - c9448d54 by Bartosz Nitka at 2017-07-02T12:12:01+02:00 Fix haddock: internal error: links: UnhelpfulSpan (#561) * Fix haddock: internal error: links: UnhelpfulSpan This fixes haskell/haddock#554 for me. I believe this is another fall out of `wildcard-refactor`, like haskell/haddock#549. * Comment to clarify why we take the methods name location - - - - - d4f29eb7 by Alex Biehl at 2017-07-03T19:43:04+02:00 Document record fields when DuplicateRecordFields is enabled (#649) - - - - - 9d6e3423 by Yuji Yamamoto at 2017-07-03T22:37:58+02:00 Fix test failures on Windows (#564) * Ignore .stack-work * Fix for windows: use nul instead of /dev/null * Fix for windows: canonicalize line separator * Also normalize osx line endings - - - - - 7d81e8b3 by Yuji Yamamoto at 2017-07-04T16:13:12+02:00 Avoid errors on non UTF-8 Windows (#566) * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1) - - - - - eded67d2 by Alex Biehl at 2017-07-07T19:17:15+02:00 Remove redudant import warning (#651) - - - - - 05114757 by Alex Biehl at 2017-07-08T00:33:12+02:00 Avoid missing home module warning (#652) * Avoid missing home module warning * Update haddock-library.cabal - - - - - e9cfc902 by Bryn Edwards at 2017-07-17T07:51:20+02:00 Fix haskell/haddock#249 (#655) - - - - - eb02792b by Herbert Valerio Riedel at 2017-07-20T09:09:15+02:00 Fix compilation of lib:haddock-library w/ GHC < 8 - - - - - 9200bfbc by Alex Biehl at 2017-07-20T09:20:38+02:00 Prepare 2.18.1 release (#657) - - - - - 46ddd22c by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Tweak haddock-api.cabal for pending release - - - - - 85e33d29 by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Avoid trivial use of LambdaCase otherwise we can't test w/ e.g. GHC 7.4.2 - - - - - 3afb4bfe by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Refactor .cabal to use sub-lib for vendored lib A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite. - - - - - e56a552e by Herbert Valerio Riedel at 2017-07-20T10:17:48+02:00 haddock-api: add changelog pointing to haddock's changelog This addresses https://github.com/haskell/haddock/issues/638#issuecomment-309283297 - - - - - 2222ff0d by Herbert Valerio Riedel at 2017-07-20T10:19:56+02:00 Drop obsolete/misleading `stability: experimental` This .cabal property has long been considered obsolete - - - - - 9b882905 by Alex Biehl at 2017-07-20T11:25:54+02:00 Beef up haddock description (#658) * Beef up haddock description * Handle empty lines - - - - - bb60e95c by Herbert Valerio Riedel at 2017-07-20T12:08:53+02:00 Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet - - - - - 0761e456 by Herbert Valerio Riedel at 2017-07-20T12:12:55+02:00 Add cheatsheet to haddock.cabal - - - - - 2ece0f0f by Herbert Valerio Riedel at 2017-07-20T12:18:38+02:00 Mention new-build in README - - - - - 947b7865 by Herbert Valerio Riedel at 2017-07-20T12:32:16+02:00 Update README Also improves markup and removes/fixes redundant/obsolete parts [skip ci] - - - - - 785e09ad by Alex Biehl at 2017-07-27T07:28:57+02:00 Bump haddock to 2.18.2, haddock-library to 1.4.5 - - - - - e3ff1ca3 by Alex Biehl at 2017-07-31T20:15:32+02:00 Move `DocMarkup` from haddock-api to haddock-library (#659) * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG - - - - - cda7c20c by Alex Biehl at 2017-07-31T20:35:49+02:00 Fixup haddock - - - - - 583b6812 by Alex Biehl at 2017-07-31T21:20:45+02:00 Changelog for haddock-library - - - - - bac6a0eb by Alex Biehl at 2017-07-31T21:50:24+02:00 Prepare haddock-library-1.4.5 release - - - - - 58ce6877 by Moritz Drexl at 2017-08-05T16:44:40+02:00 Fix renaming after instance signature specializing (#660) * rework rename * Add regression test for Bug 613 * update tests * update changelog - - - - - b8137ec8 by Tim Baumann at 2017-08-06T11:33:38+02:00 Fix: Generate pattern signatures for constructors exported as patterns (#663) * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes haskell/haddock#653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR haskell/haddock#663 * Fix extractPatternSyn error message - - - - - d037086b by Alex Biehl at 2017-08-06T12:43:25+02:00 Bump haddock-library - - - - - 99d7e792 by Alex Biehl at 2017-08-06T12:44:07+02:00 Bump haddock-library in haddock-api - - - - - 94802a5b by Alex Biehl at 2017-08-06T13:18:02+02:00 Provide --show-interface option to dump interfaces (#645) * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated. - - - - - c662e476 by Ryan Scott at 2017-08-14T21:00:21-04:00 Adapt to haskell/haddock#14060 - - - - - b891eb73 by Alex Biehl at 2017-08-16T08:24:48+02:00 Bifoldable and Bitraversable for DocH and MetaDoc - - - - - 021bb56c by Alex Biehl at 2017-08-16T09:06:40+02:00 Refactoring: Make doc renaming monadic This allows us to later throw warnings if can't find an identifier - - - - - 39fbf022 by Alex Biehl at 2017-08-19T20:35:27+02:00 Hyperlinker: Avoid linear lookup in enrichToken (#669) * Make Span strict in Position * Hyperlinker: Use a proper map to enrich tokens - - - - - e13baedd by Alex Biehl at 2017-08-21T20:05:42+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 27dd6e87 by Alex Biehl at 2017-08-21T22:06:35+02:00 Drop Avails from export list - - - - - 86b247e2 by Alex Biehl at 2017-08-22T08:44:22+02:00 Bump ghc version for haddock-api tests - - - - - d4607ca0 by Alex Biehl at 2017-08-22T08:45:17+02:00 Revert "Drop Avails from export list" This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def. - - - - - c9c54c30 by Alex Biehl at 2017-08-22T09:26:01+02:00 IntefaceFile version - - - - - a85b7c02 by Ben Gamari at 2017-08-22T09:29:52-04:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 34e976f5 by Ben Gamari at 2017-08-22T17:40:06+02:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 577abf06 by Ryan Scott at 2017-08-23T14:47:29-04:00 Update for haskell/haddock#14131 - - - - - da68fc55 by Florian Eggenhofer at 2017-08-27T18:21:56+02:00 Generate an index for package content search (#662) Generate an index for package content search - - - - - 39e62302 by Alex Biehl at 2017-08-27T18:50:16+02:00 Content search for haddock html doc - - - - - 91fd6fb2 by Alex Biehl at 2017-08-28T18:39:58+02:00 Fix tests for content search - - - - - b4a3798a by Alex Biehl at 2017-08-28T18:44:08+02:00 Add search button to #page-menu - - - - - 25a7ca65 by Alex Biehl at 2017-08-28T18:47:43+02:00 Load javascript below the fold - - - - - 8d323c1a by Alex Biehl at 2017-08-28T18:49:22+02:00 Accept tests - - - - - c5dac557 by Alex Biehl at 2017-08-28T19:14:55+02:00 Content search css - - - - - 89a5af57 by Paolo Veronelli at 2017-08-29T07:42:13+02:00 Removed `nowrap` for interface method sigs (#674) with nowrap the interfaces method sigs would expand at libitum - - - - - a505f6f7 by Alex Biehl at 2017-08-29T08:05:33+02:00 Include subordinates in content index - - - - - 4bb698c4 by Alexander Biehl at 2017-08-29T11:40:19+02:00 QuickNav: Make docbase configurable - - - - - c783bf44 by Alexander Biehl at 2017-08-29T11:48:36+02:00 QuickNav: Also use baseUrl for doc-index.json request - - - - - 47017510 by Alex Biehl at 2017-08-29T17:56:47+02:00 Fix test fallout (again) - - - - - 924fc318 by Alex Biehl at 2017-08-30T09:24:56+02:00 Write meta.json when generating html output (#676) - - - - - 717dea52 by Alex Biehl at 2017-09-01T09:20:34+02:00 Use relative URL when no docBaseUrl given - - - - - e5d85f3b by Alex Biehl at 2017-09-01T09:35:19+02:00 Add missing js files to data-files (#677) - - - - - 95b9231a by Alex Biehl at 2017-09-01T11:01:36+02:00 Rename "Search" tab to "Quick Jump" - - - - - da0ead0b by Alex Biehl at 2017-09-01T13:03:49+02:00 Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger - - - - - de7da594 by Ben Gamari at 2017-09-05T06:49:55-04:00 Account for "Remember the AvailInfo for each IE" As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building. - - - - - b05cd3b3 by Ben Gamari at 2017-09-14T07:55:07-04:00 Bump upper bound on base - - - - - 79db899e by Herbert Valerio Riedel at 2017-09-21T23:27:52+02:00 Make compatible with Prelude.<> export in GHC 8.4/base-4.11 - - - - - 3405dd52 by Tim Baumann at 2017-09-23T22:02:01+02:00 Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme - - - - - df0b5742 by Alex Biehl at 2017-09-29T21:15:40+02:00 Bump base for haddock-library and haddock-test - - - - - 62b12ea0 by Merijn Verstraaten at 2017-10-04T16:03:13+02:00 Inhibit output of coverage information for hidden modules. (#687) * Inhibit output of coverage information for hidden modules. * Add changelog entry. - - - - - 8daf8bc1 by Alexander Biehl at 2017-10-05T11:27:05+02:00 Don't use subMap in attachInstances - - - - - ad75114e by Alexander Biehl at 2017-10-05T11:27:58+02:00 Revert "Don't use subMap in attachInstances" This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9. - - - - - 7d4aa02f by Alex Biehl at 2017-10-08T15:32:28+02:00 Precise Haddock: Use Avails for export resolution (#688) * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting - - - - - b9b4faa8 by Alex Biehl at 2017-10-08T19:38:21+02:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 43325295 by Alex Biehl at 2017-10-08T20:18:46+02:00 Fix merge fallout - - - - - c6423cc0 by Alex Biehl at 2017-10-08T20:36:12+02:00 Copy QuickJump files over - - - - - 1db587c3 by Tim Baumann at 2017-10-09T18:33:09+02:00 Use <details> element for collapsibles (#690) * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes haskell/haddock#560. - - - - - 1b54c64b by Tim Baumann at 2017-10-10T09:50:59+02:00 Quick Jump: Show error when loading 'doc-index.json' failed (#691) - - - - - 910f716d by Veronika Romashkina at 2017-10-24T07:36:20+02:00 Fix tiny typo in docs (#693) - - - - - b21de7e5 by Ryan Scott at 2017-10-24T13:07:15+02:00 Overhaul Haddock's rendering of kind signatures (#681) * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC - - - - - 6704405c by Ryan Scott at 2017-10-28T07:10:27+02:00 Fix Haddock rendering of kind-indexed data family instances (#694) - - - - - 470f6b9c by Alex Biehl at 2017-10-30T08:45:51+01:00 Add QuickJump version to meta.json (#696) - - - - - b89eccdf by Alex Biehl at 2017-10-30T10:15:49+01:00 Put Quickjump behind --quickjump flag (#697) - - - - - 3095fb58 by Alex Biehl at 2017-10-30T19:09:06+01:00 Add build command to package.json - - - - - f223fda9 by Alex Biehl at 2017-10-30T19:10:39+01:00 Decrease threshold for fuzzy matching - - - - - 80245dda by Edward Z. Yang at 2017-10-31T20:35:05+01:00 Supported reexported-modules via --reexport flag. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 7e389742 by Alex Biehl at 2017-10-31T20:37:56+01:00 Correct missing title in changelog - - - - - 1a2a1c03 by Alex Biehl at 2017-10-31T20:59:07+01:00 Copy quickjump.css for nicer error messages - - - - - db234bb9 by Alex Biehl at 2017-10-31T21:31:18+01:00 Reexported modules: Report warnings if argument cannot be parsed or ... module cannot be found - - - - - eea8a205 by Carlo Hamalainen at 2017-10-31T21:43:14+01:00 More general type for nameCacheFromGhc. (#539) - - - - - 580eb42a by Alex Biehl at 2017-10-31T21:46:52+01:00 Remote tab - - - - - 0e599498 by Alex Biehl at 2017-10-31T21:48:55+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 7b8539bb by Alex Biehl at 2017-10-31T22:28:34+01:00 fullModuleContents traverses exports in declaration order - - - - - 0c91fbf2 by Alex Biehl at 2017-10-31T22:32:31+01:00 Remove excessive use of list comprehensions - - - - - f7356e02 by Alex Biehl at 2017-11-01T19:11:03+01:00 Make better use of AvailInfo - - - - - f3e512d5 by Alex Biehl at 2017-11-02T12:16:22+01:00 Always return documentation for exported subordinates ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks. - - - - - 7cf58898 by Alan Zimmerman at 2017-11-07T08:28:03+02:00 Match changes for Trees that Grow in GHC - - - - - e5105a41 by Alan Zimmerman at 2017-11-08T17:21:58+02:00 Match Trees That Grow - - - - - 55178266 by Alan Zimmerman at 2017-11-11T22:20:31+02:00 Match Trees that Grow in GHC for HsExpr - - - - - 2082ab02 by Ryan Scott at 2017-11-14T15:27:03+01:00 Actually render infix type operators as infix (#703) * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too - - - - - c52ab7d0 by Alan Zimmerman at 2017-11-14T23:14:26+02:00 Clean up use of PlaceHolder, to match TTG - - - - - 81cc9851 by Moritz Angermann at 2017-11-20T07:52:49+01:00 Declare use of `Paths_haddock` module in other-modules (#705) This was detected by `-Wmissing-home-modules` - - - - - f9d27598 by Moritz Angermann at 2017-11-20T12:47:34+01:00 Drop Paths_haddock from ghc.mk (#707) With haskell/haddock#705 and haskell/haddock#706, the custom addition should not be necessary any more. # Conflicts: # ghc.mk - - - - - f34818dc by Moritz Angermann at 2017-11-20T12:47:59+01:00 Add autogen-modules (#706) > Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail. # Conflicts: # haddock.cabal - - - - - bb43a0aa by Ben Gamari at 2017-11-21T15:50:12-05:00 Revert "Clean up use of PlaceHolder, to match TTG" This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049. - - - - - af9ebb2b by Ben Gamari at 2017-11-21T15:50:14-05:00 Revert "Match Trees that Grow in GHC for HsExpr" This reverts commit 9f054dc365379c66668de6719840918190ae6e44. - - - - - 5d35c3af by Ben Gamari at 2017-11-21T15:50:15-05:00 Revert "Match Trees That Grow" This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c. - - - - - 99a8e43b by Ben Gamari at 2017-11-21T16:36:06-05:00 Revert "Match changes for Trees that Grow in GHC" This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547. - - - - - c4d650c2 by Ben Gamari at 2017-12-04T15:06:07-05:00 Bump GHC version - - - - - 027b2274 by Ben Gamari at 2017-12-04T17:06:31-05:00 Bump GHC bound to 8.4.* - - - - - 58eaf755 by Alex Biehl at 2017-12-06T15:44:24+01:00 Update changelog - - - - - d68f5584 by Simon Peyton Jones at 2017-12-07T14:39:56+00:00 Track changes to follow Trac haskell/haddock#14529 This tracks the refactoring of HsDecl.ConDecl. - - - - - dc519d6b by Alec Theriault at 2018-01-06T08:20:43-08:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - 8285118c by Alec Theriault at 2018-01-13T12:12:37+01:00 Constructor and pattern synonym argument docs (#709) * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors. - - - - - ca4fabb4 by Alec Theriault at 2018-01-15T17:12:18-08:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 4c472fea by Ryan Scott at 2018-01-19T10:44:02+01:00 Fix haskell/haddock#732 (#733) - - - - - bff14dbd by Alex Biehl at 2018-01-19T15:33:30+01:00 extractDecl: Extract associated types correctly (#736) - - - - - a2a94a73 by Alex Biehl at 2018-01-19T15:34:40+01:00 extractDecl: Extract associated types correctly (#736) - - - - - 26df93dc by Alex Biehl at 2018-01-20T10:18:22+01:00 haddock-api: bump ghc to ^>= 8.4 - - - - - f65aeb1d by Alex Biehl at 2018-01-20T19:18:20+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - 0e721b97 by Alex Biehl at 2018-01-20T19:20:19+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - cb6234f6 by Ben Gamari at 2018-01-26T13:40:55-05:00 Merge remote-tracking branch 'harpocrates/fix/missing-orphan-instances' into ghc-head - - - - - 0fc28554 by Alec Theriault at 2018-02-01T14:58:18+01:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - b9123772 by Alec Theriault at 2018-02-01T14:58:18+01:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 0c12e274 by Ryan Scott at 2018-02-01T14:58:18+01:00 Fix haskell/haddock#548 by rendering datatype kinds more carefully (#702) - - - - - 8876d20b by Alec Theriault at 2018-02-01T14:58:18+01:00 Use the GHC lexer for the Hyperlinker backend (#714) * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog - - - - - 95c6a771 by Alec Theriault at 2018-02-01T14:58:18+01:00 Clickable anchors for headings (#716) See haskell/haddock#579. This just adds an <a> tag around the heading, pointing to the heading itself. - - - - - 21463d28 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump: Matches on function names weight more than matches in ... module names. - - - - - 8023af39 by Alex Biehl at 2018-02-01T14:58:18+01:00 Treat escaped \] better in definition lists (#717) This fixes haskell/haddock#546. - - - - - e4866dc1 by Alex Biehl at 2018-02-01T14:58:18+01:00 Remove scanner, takeWhile1_ already takes care of escaping - - - - - 9bcaa49d by Alex Biehl at 2018-02-01T14:58:18+01:00 Take until line feed - - - - - 01d2af93 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. - - - - - 31128417 by Alec Theriault at 2018-02-01T14:58:18+01:00 Patch flaky parser test (#720) * Patch flaky parser test This test was a great idea, but it doesn't port over too well to using the GHC lexer. GHC rewrites its input a bit - nothing surprising, but we need to guard against those cases for the test. * Change instance head * Change use site - - - - - 9704f214 by Herbert Valerio Riedel at 2018-02-01T14:58:18+01:00 Include secondary LICENSE file in source dist - - - - - 51f25074 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Grid Tables (#718) * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example - - - - - 670d6200 by Alex Biehl at 2018-02-01T14:58:18+01:00 Add grid table example to cheatsheet (pdf and svg need to be regenerated thought) - - - - - 4262dec9 by Alec Theriault at 2018-02-01T14:58:18+01:00 Fix infinite loop when specializing instance heads (#723) * Fix infinite loop when specializing instance heads The bug can only be triggered from TH, hence why it went un-noticed for so long. * Add test for haskell/haddock#679 and haskell/haddock#710 - - - - - 67ecd803 by Alec Theriault at 2018-02-01T14:58:18+01:00 Filter RTS arguments from 'ghc-options' arguments (#725) This fixes haskell/haddock#666. - - - - - 7db26992 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump Scrollable overlay - - - - - da9ff634 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Hyperlinker: Adjust parser to new PFailed constructor - - - - - 7b7cf8cb by Alexander Biehl at 2018-02-01T14:58:18+01:00 Specialize: Add missing IdP annotations - - - - - 78cd7231 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Convert: Correct pass type - - - - - a2d0f590 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Warning free compilation - - - - - cd861cf3 by Alexander Biehl at 2018-02-01T14:58:18+01:00 hadock-2.19.0 / haddock-api-2.19.0 / haddock-library-1.5.0 - - - - - c6651b72 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Adjust changelogs - - - - - 1e93da0b by Alexander Biehl at 2018-02-01T14:58:18+01:00 haddock-library: Info about breaking changes - - - - - f9b11db8 by Alec Theriault at 2018-02-02T12:36:02+01:00 Properly color pragma contents in hyperlinker The hyperlinker backend now classifies the content of pragmas as 'TkPragma'. That means that in something like '{-# INLINE foo #-}', 'foo' still gets classified as a pragma token. - - - - - c40b0043 by Alec Theriault at 2018-02-02T12:36:02+01:00 Support the new 'ITcolumn_prag' token - - - - - 4a2a4d39 by Alex Biehl at 2018-02-03T12:11:55+01:00 QuickJump: Mitigate encoding problems on Windows - - - - - bb34503a by Alex Biehl at 2018-02-04T18:39:31+01:00 Use withBinaryFile - - - - - 637605bf by Herbert Valerio Riedel at 2018-02-05T09:48:32+01:00 Try GHC 8.4.1 for Travis CI job - - - - - 7abb67e4 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 try harder to build w/ GHC 8.4.1 - - - - - 8255cc98 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 Add `SPDX-License-Identifier` as alised for "license" module header tokens C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from haskell/haddock#743 - - - - - 267cd23d by Herbert Valerio Riedel at 2018-02-05T10:24:34+01:00 Make test-suite SMP compatible - - - - - 95d4bf40 by Alec Theriault at 2018-02-05T22:01:04+01:00 Hyperlink pattern synonyms and 'module' imports (#744) Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes haskell/haddock#731. - - - - - 67838dcd by Alec Theriault at 2018-02-06T08:23:36+01:00 Don't warn about missing '~' (#746) This manually filters out '~' from the list of things to warn about. It truly makes no sense to warn on this since '~' has nothing it could link to - it is magical. This fixes haskell/haddock#532. - - - - - ab6c3f9f by Alec Theriault at 2018-02-06T08:24:47+01:00 Don't barf on 'HsSpliceTy' (#745) This handles 'HsSpliceTy's by replacing them with what they expand to. IIUC everything that is happening, 'renameHsSpliceTy' should not be able to fail for the inputs we feed it from GHC. This fixes haskell/haddock#574. - - - - - 92bf95ad by Alex Biehl at 2018-02-06T08:28:23+01:00 Rename: renameHsSpliceTy ttg - - - - - 3130b1e1 by Alex Biehl at 2018-02-06T09:02:14+01:00 Expand SigDs - - - - - c72adae5 by Alex Biehl at 2018-02-06T09:20:51+01:00 fullModuleContents: support named docs - - - - - de2e4dbf by Alex Biehl at 2018-02-06T13:56:17+01:00 Hyperlinker: Also link pattern synonym arguments - - - - - b7c98237 by Alex Biehl at 2018-02-09T18:44:23+01:00 Expand SigD in a better place In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place. - - - - - 8f598b27 by Alec Theriault at 2018-02-11T12:29:56+01:00 Add module tooltips to linked identifiers (#753) No more clicking to figure out whether your bytestring is strict or lazy! - - - - - d812e65d by Alec Theriault at 2018-02-11T12:31:44+01:00 Add 'show' option to complement 'hide' (#752) * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes haskell/haddock#751 and haskell/haddock#266. * Add a '--show-all' option - - - - - 6676cecb by Alex Biehl at 2018-02-18T11:07:15-05:00 QuickJump: Mitigate encoding problems on Windows (cherry picked from commit 86292c54bfee2343aee84559ec01f1fc68f52231) - - - - - e753dd88 by Alex Biehl at 2018-02-18T17:59:54+01:00 Use withBinaryFile - - - - - 724dc881 by Tamar Christina at 2018-02-19T05:34:49+01:00 Haddock: support splitted include paths. (#689) - - - - - 9b6d6f50 by Alex Biehl at 2018-02-19T05:57:02+01:00 Teach the HTML backend how to render methods with multiple names - - - - - a74aa754 by Alexander Biehl at 2018-02-19T10:04:34+01:00 Hoogle/Latex: Remove use of partial function - - - - - 66d8bb0e by Alec Theriault at 2018-02-25T16:04:01+01:00 Fix file handle leak (#763) (#764) Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137. - - - - - bb92d03d by Alex Biehl at 2018-03-02T14:21:23+01:00 Enable running test suite with stock haddock and ghc using ``` $ cabal new-run -- html-test --haddock-path=$(which haddock) --ghc-path=$(which ghc) ``` - - - - - dddb3cb2 by Alex Biehl at 2018-03-02T15:43:21+01:00 Make testsuite work with haddock-1.19.0 release (#766) - - - - - f38636ed by Alec Theriault at 2018-03-02T15:48:36+01:00 Support unicode operators, proper modules Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes haskell/haddock#458. - - - - - 09d89f7c by Alec Theriault at 2018-03-02T15:48:43+01:00 Remove bang pattern - - - - - d150a687 by Alex Biehl at 2018-03-02T15:48:48+01:00 fix test - - - - - d6fd71a5 by Alex Biehl at 2018-03-02T16:22:38+01:00 haddock-test: Be more explicit which packages to pass We now pass `-hide-all-packages` to haddock when invoking the testsuite. This ensures we don't accidentally pick up any dependencies up through ghc.env files. - - - - - 0932c78c by Alex Biehl at 2018-03-02T17:50:38+01:00 Revert "fix test" This reverts commit 1ac2f9569242f6cb074ba6e577285a4c33ae1197. - - - - - 52516029 by Alex Biehl at 2018-03-02T18:16:50+01:00 Fix Bug548 for real - - - - - 89df9eb5 by Alex Biehl at 2018-03-05T18:28:19+01:00 Hyperlinker: Links for TyOps, class methods and associated types - - - - - d019a4cb by Ryan Scott at 2018-03-06T13:43:56-05:00 Updates for haskell/haddock#13324 - - - - - 6d5a42ce by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump haddock-2.19.0.1, haddock-api-2.19.0.1, haddock-library-1.5.0.1 - - - - - c0e6f380 by Alex Biehl at 2018-03-10T18:25:57+01:00 Update changelogs for haddock-2.19.0.1 and haddock-library-1.5.0.1 - - - - - 500da489 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Update to QC 2.11 - - - - - ce8362e9 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Restore backward-compat with base-4.5 through base-4.8 - - - - - baae4435 by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump lower bound for haddock-library - - - - - 10b7a73e by Alex Biehl at 2018-03-10T18:25:57+01:00 Haddock: Straighten out base bound - - - - - a6096f7b by Alex Biehl at 2018-03-13T08:45:06+01:00 extractDecl: Extract constructor patterns from data family instances (#776) * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors - - - - - ba4a0744 by Simon Jakobi at 2018-03-14T08:26:42+01:00 Readme: Update GHC version (#778) - - - - - 8de157d4 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for definition lists - - - - - 425b46f9 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for links - - - - - d53945d8 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for inline links - - - - - f1dc7c99 by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Slightly unmangle output - - - - - 0879d31c by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Prevent stdout buffering - - - - - 1f9e5f1b by Simon Jakobi at 2018-03-14T20:39:29+01:00 haddock-library.cabal: Clean up GHC options - - - - - 066b891a by Simon Jakobi at 2018-03-14T20:39:29+01:00 Make a proper definition for the <link> parser - - - - - 573d6ba7 by Alec Theriault at 2018-03-21T09:16:57+01:00 Show where instances are defined (#748) * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests - - - - - 99b5d28b by Alex Biehl at 2018-03-21T09:20:36+01:00 Prepare changelog for next release - - - - - 482d3a93 by Alex Biehl at 2018-03-23T15:57:36+01:00 Useful cost centres, timers and allocation counters (#785) * Add some useful cost-centres for profiling * Add withTiming for each haddock phase Invoking haddock with `--optghc=-ddump-timings` now shows the amount of time spent and the number of allocated bytes for each phase. - - - - - 773b41bb by Alec Theriault at 2018-03-27T08:35:59+02:00 @since includes package name (#749) * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too. - - - - - e42c57bc by Alex Biehl at 2018-03-27T08:42:50+02:00 haddock-2.19.1, haddock-api-2.19.1, haddock-library-1.6.0 - - - - - 8373a529 by Alex Biehl at 2018-03-28T10:17:11+02:00 Bump haddock and haddock-api to 2.20.0 - - - - - 5038eddd by Jack Henahan at 2018-04-03T13:28:12+02:00 Clear search string on hide for haskell/haddock#781 (#789) - - - - - 920ca1eb by Alex Biehl at 2018-04-03T16:35:50+02:00 Travis: Build with ghc-8.4.2 (#793) - - - - - a232f0eb by Alan Zimmerman at 2018-04-07T14:14:32+02:00 Match changes in GHC for D4199 Removing HasSourceText and SourceTextX classes. - - - - - ab85060b by Alan Zimmerman at 2018-04-09T21:20:24+02:00 Match GHC changes for TTG - - - - - 739302b6 by Alan Zimmerman at 2018-04-13T13:31:44+02:00 Match GHC for TTG implemented on HsBinds, D4581 - - - - - 2f56d3cb by Ryan Scott at 2018-04-19T11:42:58-04:00 Bump upper bound on base to < 4.13 See https://ghc.haskell.org/trac/ghc/ticket/15018. - - - - - a49df92a by Alex Biehl at 2018-04-20T07:31:44+02:00 Don't treat fixity signatures like declarations - - - - - d02c103b by Ryan Scott at 2018-04-24T11:20:11-04:00 Add regression test for haskell/haddock#413 Fixes haskell/haddock#413. - - - - - c7577f52 by Ryan Scott at 2018-04-24T13:51:06-07:00 Improve the Hoogle backend's treatment of type families (#808) Fixes parts 1 and 2 of haskell/haddock#806. - - - - - d88f85b1 by Alec Theriault at 2018-04-25T11:24:07-07:00 Replace 'attoparsec' with 'parsec' (#799) * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments - - - - - fc25e2fe by Alan Zimmerman at 2018-04-27T15:36:53+02:00 Match changes in GHC for TTG - - - - - 06175f91 by Herbert Valerio Riedel at 2018-05-01T18:11:09+02:00 Merge branch 'ghc-head' with 'ghc-8.4' - - - - - 879caaa8 by Alec Theriault at 2018-05-07T18:53:15-07:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 3e0120cb by Simon Jakobi at 2018-05-07T19:00:18-07:00 Add docs for some DocH constructors (#814) - - - - - 0a32c6db by Alec Theriault at 2018-05-08T02:15:45-07:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 8816e783 by Simon Jakobi at 2018-05-08T10:48:11-07:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - ad60366f by Ryan Scott at 2018-05-10T11:19:47-04:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - 03b7cc3b by Ryan Scott at 2018-05-10T11:24:38-04:00 Wibbles - - - - - b03dd563 by Chaitanya Koparkar at 2018-05-10T11:44:58-04:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 9f298a40 by Ben Gamari at 2018-05-13T17:36:04-04:00 Account for refactoring of LitString - - - - - ea3dabe7 by Ryan Scott at 2018-05-16T09:21:43-04:00 Merge pull request haskell/haddock#826 from haskell/T825 Remove Hoogle backend hack that butchers infix datatype names - - - - - 0d234f7c by Alec Theriault at 2018-05-23T11:29:05+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 15fc9712 by Simon Jakobi at 2018-05-31T04:17:47+02:00 Adjust to new HsDocString internals - - - - - 6f1e19a8 by Ben Gamari at 2018-06-02T16:18:58-04:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 0d0355d9 by Ryan Scott at 2018-06-04T21:26:59-04:00 DerivingVia changes - - - - - 0d93475a by Simon Jakobi at 2018-06-05T19:47:05+02:00 Bump a few dependency bounds (#845) - - - - - 5cbef804 by Alec Theriault at 2018-06-05T19:47:16+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 9094c56f by Alec Theriault at 2018-06-05T22:53:25+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 70188719 by Simon Jakobi at 2018-06-08T22:20:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - 495cd1fc by Chaitanya Koparkar at 2018-06-13T23:01:34+02:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 81088732 by Ben Gamari at 2018-06-13T23:01:34+02:00 Account for refactoring of LitString - - - - - 7baf6587 by Simon Jakobi at 2018-06-13T23:05:08+02:00 Adjust to new HsDocString internals - - - - - bb61464d by Ben Gamari at 2018-06-13T23:05:22+02:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 5d8cb87f by Ryan Scott at 2018-06-13T23:39:30+02:00 DerivingVia changes - - - - - 73d373a3 by Alec Theriault at 2018-06-13T23:39:30+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 4865e254 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Remove `ITtildehsh` token - - - - - b867db54 by Alec Theriault at 2018-06-13T23:39:30+02:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 9598e392 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Add docs for some DocH constructors (#814) - - - - - 8a59035b by Alec Theriault at 2018-06-13T23:39:30+02:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 29350fc8 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - 2590bbd9 by Ryan Scott at 2018-06-13T23:39:30+02:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - a9939fdc by Ryan Scott at 2018-06-13T23:39:30+02:00 Wibbles - - - - - a22f7df4 by Alec Theriault at 2018-06-13T23:39:30+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 8741015d by Simon Jakobi at 2018-06-13T23:39:30+02:00 Bump a few dependency bounds (#845) - - - - - 4791e1cc by Alec Theriault at 2018-06-13T23:39:30+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 311d3216 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - d0577817 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Complete FixitySig and FamilyDecl pattern matches - - - - - 055b3aa7 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Fix redundant import warnings - - - - - f9ce19b1 by Simon Jakobi at 2018-06-13T23:49:52+02:00 html-test: Accept output - - - - - 04604ea7 by Simon Jakobi at 2018-06-13T23:54:37+02:00 Bump bounds on Cabal - - - - - 0713b692 by Simon Jakobi at 2018-06-14T00:00:12+02:00 Merge branch 'ghc-head' into ghc-head-update-3 - - - - - c6a56bfd by Simon Jakobi at 2018-06-14T02:33:27+02:00 Bump ghc bound for haddock-api spec test-suite - - - - - 119d04b2 by Simon Jakobi at 2018-06-14T12:37:48+02:00 Travis: `--allow-newer` for all packages - - - - - 0e876e2c by Alex Biehl at 2018-06-14T15:28:52+02:00 Merge pull request haskell/haddock#857 from sjakobi/ghc-head-update-3 Update ghc-head - - - - - 5be46454 by Alec Theriault at 2018-06-14T21:42:45+02:00 Improved handling of interfaces in 'haddock-test' (#851) This should now work with an inplace GHC where (for instance) HTML directories may not be properly recorded in the package DB. - - - - - 96ab1387 by Vladislav Zavialov at 2018-06-14T17:06:21-04:00 Handle -XStarIsType - - - - - e518f8c4 by Ben Gamari at 2018-06-14T17:48:00-04:00 Revert unintentional reversion of fix of haskell/haddock#548 - - - - - 01b9f96d by Alan Zimmerman at 2018-06-19T11:52:22+02:00 Match changes in GHC for haskell/haddock#14259 - - - - - 7f8c8298 by Ben Gamari at 2018-06-19T18:14:27-04:00 Bump GHC version to 8.6 - - - - - 11c6b5d2 by Ryan Scott at 2018-06-19T23:17:31-04:00 Remove HsEqTy and XEqTy - - - - - b33347c2 by Herbert Valerio Riedel at 2018-06-20T23:14:52+02:00 Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. - - - - - f0d2460e by Herbert Valerio Riedel at 2018-06-20T23:28:46+02:00 Update Travis CI job - - - - - ef239223 by Herbert Valerio Riedel at 2018-06-20T23:32:41+02:00 Drop GHC HEAD from CI and update GHC to 8.4.3 It's a waste of resource to even try to build this branch w/ ghc-head; so let's not do that... - - - - - 41c4a9fa by Ben Gamari at 2018-06-20T18:26:20-04:00 Bump GHC version to 8.7 - - - - - 8be593dc by Herbert Valerio Riedel at 2018-06-21T22:32:15+02:00 Update CI job to use GHC 8.7.* - - - - - b91d334a by Simon Jakobi at 2018-06-30T13:41:38+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section - - - - - f707d848 by Alec Theriault at 2018-07-05T10:43:35-04:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. - - - - - a6d2b8dc by Alec Theriault at 2018-07-06T10:06:32-04:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case - - - - - 13819f71 by Alan Zimmerman at 2018-07-15T19:33:51+02:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 - - - - - c346aa78 by Simon Jakobi at 2018-07-19T12:29:32+02:00 haddock-library: Bump bounds for containers - - - - - 722e733c by Simon Jakobi at 2018-07-19T13:36:45+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] - - - - - f0bd83fd by Alec Theriault at 2018-07-19T14:39:57+02:00 Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. - - - - - 394053a8 by Simon Jakobi at 2018-07-19T14:58:07+02:00 haddock-library: Bump bounds for containers - - - - - 1bda11a2 by Alec Theriault at 2018-07-20T09:04:03+02:00 Add HEAD.hackage overlay (#887) * Add HEAD.hackage overlay * Add HCPKG variable - - - - - c7b4ab45 by Alec Theriault at 2018-07-20T12:01:16+02:00 Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test - - - - - c05d32ad by Alec Theriault at 2018-07-20T12:01:49+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output - - - - - 24b39ee4 by Alec Theriault at 2018-07-20T12:02:16+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. - - - - - cb9d2099 by Simon Jakobi at 2018-07-20T13:39:29+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) - - - - - 133f24f5 by Alec Theriault at 2018-07-20T13:39:29+02:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) - - - - - 11024149 by Alec Theriault at 2018-07-20T13:39:29+02:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) - - - - - de0c139e by Simon Jakobi at 2018-07-20T13:39:29+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) - - - - - 6435e952 by Alec Theriault at 2018-07-20T13:39:29+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) - - - - - 1461af39 by Alec Theriault at 2018-07-20T13:39:29+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) - - - - - 69d3bde1 by Alec Theriault at 2018-07-20T13:49:47+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) - - - - - 6a5c73c7 by Alec Theriault at 2018-07-20T13:50:00+02:00 Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests - - - - - 92ca94c6 by Alec Theriault at 2018-07-20T13:55:36+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) - - - - - 981bc7fa by Simon Jakobi at 2018-07-20T15:06:06+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers - - - - - 27e7c0c5 by Simon Jakobi at 2018-07-20T15:09:05+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 49e1a415 by Simon Jakobi at 2018-07-20T16:02:02+02:00 Update the ghc-8.6 branch (#889) * Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. * README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) * Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) * Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) * tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) * Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. * Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test * Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) * Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) * Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) * Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests * Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 5ca14bed by Simon Jakobi at 2018-07-20T16:05:47+02:00 Revert "Revert "Bump GHC version to 8.6"" That commit didn't belong onto the ghc-8.6 branch. This reverts commit acbaef3b9daf1d2dea10017964bf886e77a8e967. - - - - - 2dd600dd by Simon Jakobi at 2018-07-20T16:18:21+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. - - - - - fceb2422 by Simon Jakobi at 2018-07-20T16:18:21+02:00 outOfScope: Recommend qualifying the identifier - - - - - acea5d23 by Simon Jakobi at 2018-07-20T16:19:35+02:00 outOfScope: Recommend qualifying the identifier (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7) - - - - - 1a83ca55 by Simon Jakobi at 2018-07-20T16:19:35+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f) - - - - - 48374451 by Masahiro Sakai at 2018-07-20T17:06:42+02:00 Add # as a special character (#884) '#' has special meaning used for anchors and can be escaped using backslash. Therefore it would be nice to be listed as special characters. - - - - - 5e1a5275 by Alec Theriault at 2018-07-20T23:37:24+02:00 Let `haddock-test` bypass interface version check (#890) This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to. - - - - - 27286754 by Yuji Yamamoto at 2018-07-23T08:16:01+02:00 Avoid "invalid argument (invalid character)" on non-unicode Windows (#892) Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566 - - - - - 6729d361 by Alec Theriault at 2018-07-23T13:52:56-07:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). - - - - - 8cf4e6b5 by Ryan Scott at 2018-07-27T11:28:03-04:00 eqTyCon_RDR now lives in TysWiredIn After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071 - - - - - 1ad251a6 by Alan Zimmerman at 2018-07-30T13:28:09-04:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 (cherry picked from commit e3926b50ab8a7269fd6904b06e881745f08bc5d6) - - - - - 8aea2492 by Richard Eisenberg at 2018-08-02T10:54:17-04:00 Update against new HsImplicitBndrs - - - - - e42cada9 by Alec Theriault at 2018-08-04T17:51:30+02:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 0e852512 by Alex Biehl at 2018-08-06T13:04:02+02:00 Make --package-version optional for --hoogle generation (#899) * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion - - - - - d2abd684 by Noel Bourke at 2018-08-21T09:34:18+02:00 Remove unnecessary backslashes from docs (#908) On https://haskell-haddock.readthedocs.io/en/latest/markup.html#special-characters the backslash and backtick special characters showed up with an extra backslash before them – I think the escaping is not (or no longer) needed for those characters in rst. - - - - - 7a578a9e by Matthew Pickering at 2018-08-21T09:34:50+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - aa3d4db3 by Matthew Pickering at 2018-08-21T09:37:34+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - ede91744 by Alec Theriault at 2018-08-21T09:42:52+02:00 Better test output when Haddock crashes on a test (#902) In particular: we report the tests that crashed seperately from the tests that produced incorrect output. In order for tests to pass (and exit 0), they must not crash and must produce the right output. - - - - - 4a872b84 by Guillaume Bouchard at 2018-08-21T09:45:57+02:00 Fix a typo (#878) - - - - - 4dbf7595 by Ben Sklaroff at 2018-08-21T12:04:09-04:00 Add ITcomment_line_prag token to Hyperlinker Parser This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935 - - - - - 9170b2a9 by Ben Gamari at 2018-08-21T17:55:15-04:00 Merge pull request haskell/haddock#893 from harpocrates/get-name-to-instances Accumulate explicitly which modules to load for 'attachInstances' - - - - - d57b57cc by Ben Gamari at 2018-08-21T17:59:13-04:00 Merge branch 'ghc-head' of github.com:haskell/haddock into ghc-head - - - - - 14601ca2 by Alec Theriault at 2018-08-21T19:09:37-04:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1) - - - - - 438c645e by Matthew Pickering at 2018-08-21T19:12:39-04:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d) - - - - - a80c5161 by Alec Theriault at 2018-08-21T22:06:40-07:00 Better rendering of unboxed sums/tuples * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType' - - - - - 88456cc1 by Alec Theriault at 2018-08-21T22:06:40-07:00 Handle promoted tuples in 'synifyType' When we have a fully applied promoted tuple, we can expand it out properly. - - - - - fd1c1094 by Alec Theriault at 2018-08-21T22:19:34-07:00 Accept test cases - - - - - 6e80d9e0 by Alec Theriault at 2018-08-21T22:24:03-07:00 Merge pull request haskell/haddock#914 from harpocrates/feature/unboxed-stuff Better rendering of unboxed sums, unboxed tuples, promoted tuples. - - - - - 181a23f1 by Ben Gamari at 2018-08-23T15:53:48-04:00 Merge remote-tracking branch 'origin/ghc-8.6' into ghc-8.6 - - - - - 3a18c1d8 by Alec Theriault at 2018-08-27T14:15:25-07:00 Properly synify promoted list types We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type])))) - - - - - b4794946 by Alec Theriault at 2018-09-03T07:19:55-07:00 Only look at visible types when synifying a 'HsListTy' The other types are still looked at when considering whether to make a kind signature or not. - - - - - a231fce2 by Alec Theriault at 2018-09-03T07:38:10-07:00 Merge pull request haskell/haddock#922 from harpocrates/promoted-lists Properly synify promoted list types - - - - - 0fdf044e by Ningning Xie at 2018-09-15T10:25:58-04:00 Update according to GHC Core changes - - - - - 7379b115 by Ningning Xie at 2018-09-15T15:40:18-04:00 update dataFullSig to work with Co Quantification This should have been in the previous patch, but wasn't. - - - - - cf84a046 by Alec Theriault at 2018-09-17T20:12:18-07:00 Fix/add to various docs * Add documentation for a bunch of previously undocumented options (fixes haskell/haddock#870) * Extend the documentation of `--hoogle` considerably (see haskell/haddock#807) * Describe how to add docs to `deriving` clauses (fixes haskell/haddock#912) * Fix inaccurate docs about hyperlinking infix identifiers (fixes haskell/haddock#780) - - - - - ae017935 by Alec Theriault at 2018-09-22T08:32:16-07:00 Update Travis - - - - - d95ae753 by Alec Theriault at 2018-09-22T09:34:10-07:00 Accept failing tests Also silence orphan warnings. - - - - - f3e67024 by Alec Theriault at 2018-09-22T09:41:23-07:00 Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README - - - - - 3f136d4a by Alec Theriault at 2018-09-22T10:53:31-07:00 Turn haddock-library into a minor release Fix some version bounds in haddock-library too. - - - - - b9def006 by Alec Theriault at 2018-09-22T13:07:35-07:00 keep cabal.project file - - - - - 4909aca7 by Alec Theriault at 2018-10-16T09:36:30-07:00 Build on 7.4 and 7.8 - - - - - 99d20a28 by Herbert Valerio Riedel at 2018-10-16T18:45:52+02:00 Minor tweak to package description - - - - - a8059618 by Herbert Valerio Riedel at 2018-10-16T18:47:24+02:00 Merge pull request haskell/haddock#945 haddock-api 2.21.0 and haddock-library 1.6.1 release - - - - - 2d9bdfc1 by Alec Theriault at 2018-10-16T10:54:21-07:00 Bump haddock-library to 1.7.0 The 1.6.1 release should've been a major bump, since types in the `Documentation.Haddock.Parser.Monad` module changed. This version makes that module internal (as it morally should be). - - - - - ed340cef by Alec Theriault at 2018-10-16T14:59:13-07:00 Merge branch 'ghc-8.4' into ghc-8.6 - - - - - 2821a8df by Alec Theriault at 2018-10-16T15:14:48-07:00 Merge branch 'ghc-8.6' into ghc-head - - - - - a722dc84 by Alec Theriault at 2018-10-16T16:28:55-07:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 63377496 by Alec Theriault at 2018-10-16T16:39:07-07:00 Update changelog - - - - - 099a0110 by Alec Theriault at 2018-10-16T16:49:28-07:00 Merge pull request haskell/haddock#942 from harpocrates/update-docs Fix & add to documentation - - - - - 0927416f by Alec Theriault at 2018-10-16T16:50:14-07:00 Set UTF-8 encoding before writing files (#934) This should fix haskell/haddock#929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8). - - - - - 83b7b017 by Alec Theriault at 2018-10-16T17:42:05-07:00 Output pattern synonyms in Hoogle backend (#947) * Output pattern synonyms in Hoogle backend We were previously weren't outputting _any_ pattern synonyms, bundled or not. Now, we output both. Fixes haskell/haddock#946. * Update changelog - - - - - 81e5033d by Alec Theriault at 2018-10-16T18:04:40-07:00 Release `haddock{,-api}-2.22.0` This version will accompany ghc-8.6.2 - - - - - 9661744e by Alex Biehl at 2018-10-18T08:14:32-07:00 Add NewOcean theme And make it the default theme. - - - - - 7ae6d722 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Improve appearance and readability These changes include: - use latest Haskell's logo colors - decrease #content width to improve readability - use nicer font - improve sizes and distances - - - - - 37f8703d by NunoAlexandre at 2018-10-18T08:14:32-07:00 Include custom font in the html head - - - - - 1d5e1d79 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Update html test reference files - - - - - 53b7651f by NunoAlexandre at 2018-10-18T08:14:32-07:00 Make it responsive - It makes small screens taking more space than larger ones - fixes a few issues present in small screens currently - make it look good across different screen sizes. - - - - - 6aa1aeb1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make the style consistent with hackage Several things are addressed here: - better responsive behaviour on the header - better space usage - consistent colors overall - other nit PR comments - - - - - 3a250c5c by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Place the package name before the menu links This supports the expected responsive menu design, where the package name appears above the menu links. - - - - - cae699b3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update html-test reference files The package name element in the package-header is now a div instead of a paragraph, and it is now above the menu ul.links instead of below. - - - - - 2ec7fd2d by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve synopsis style and code - Use CSS3 instead of loading pictures to show "+" and "-" symbols - Drop redundant code - - - - - 0c874c01 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Decrease space between code blocks There was too much space between code blocks as pointed out by reviewers. - - - - - 85568ce2 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Add an initial-scale property to all haddock pages This solves an issue reported about the content looking incredibly small on mobile devices. - - - - - c1538926 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Address several PR comments - Darken text color like done for hackage - Move synopsis to left side - Make table of contents stick to the left on wide screens - Wrap links to avoid page overflow - Improve expand/collapse buttons - Fix issue with content size on mobile devices - Fix issue with font-size on landscape mode - Increase width of the content - Change colors of table of contents and synopsis - Etc - - - - - e6639e5f by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make synopsis scrollable on wide screens When the synopsis is longer than the screen, you can’t see its end and you can't scroll down either, making the content unreachable. - - - - - 1f0591ff by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve information density - Reduce font size - Improve space between and within code blocks - Improve alignments - Improve spacing within sub-blocks - - - - - bf083097 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Minor adjustments Bring in some adjustments made to hackage: - link colors - page header show everything when package title is too long - - - - - 10375fc7 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix responsive triggers overlap issue The min and max width triggers have the same values, which caused the style resolution to take an intersection of both style declarations when the screen resolution had the size of the limts (say 1280px), causing an odd behaviour and look. - - - - - 95ff2f95 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix issue with menu alignment on firefox Reported and described here: https://github.com/haskell/haddock/pull/721#issuecomment-374668869 - - - - - dc86587e by Alex Biehl at 2018-10-18T08:14:32-07:00 Changelog entry for NewOcean - - - - - 27195e47 by Herbert Valerio Riedel at 2018-10-18T08:14:32-07:00 html-test --accept - - - - - 83f4f9c0 by Alex Biehl at 2018-10-18T08:14:32-07:00 Avoid name shadowing - - - - - 231487f1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font to PT Sans Also migrate some general text related changes from hackage. - - - - - 313db81a by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Use 'flex' to fix header alignment - - - - - 5087367b by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Misc of tweaks - Update link colors to hackage scheme - Tune spacing between content elements - Update footer style - Fix and improve code blocks identation - - - - - b08020df by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font in Xhtml.hs to PT Sans - - - - - 78ce06e3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve code blocks styling - Fix and improve spacing - Improve colors and borders - - - - - 81262d20 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make package-header caption backward-compatible The current html generator of this branch wraps the package-header caption as a div, which does not work (without style adjustments) with the old themes. Changing it from div to span does the trick, without needing to adjust the old stylesheets. - - - - - dc4475cb by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update test-suite reference html pages - - - - - 393d35d8 by Alec Theriault at 2018-10-18T08:25:36-07:00 Accept tests - - - - - a94484ba by Alec Theriault at 2018-10-21T10:29:29-07:00 Fix CHANGELOG - - - - - 8797eca3 by Alec Theriault at 2018-10-21T10:36:19-07:00 Update 'data-files' to include NewOcean stuff - - - - - 1ae51e4a by Simon Jakobi at 2018-10-23T11:29:14+02:00 Fix typo in a warning - - - - - 009ad8e8 by Alec Theriault at 2018-10-24T12:47:47-07:00 Update JS dependencies This was done via `npm audit fix`. I think this fixes haskell/haddock#903 along with some more serious vulnerabilities that nobody seems to have noticed. - - - - - 051994db by Alec Theriault at 2018-10-24T17:31:09-07:00 Resurrect the style-switcher This fixes haskell/haddock#810. Looks like things were broken during the quickjump refactor of the JS. For the (git) record: I do not think the style switcher is a good idea. I'm fixing it for the same reason @mzero added it; as an answer to "rumblings from some that they didn't want their pixels changed on bit" - - - - - 2a1d620f by Alec Theriault at 2018-10-24T17:38:07-07:00 Fix copy-pasta error in data-files - - - - - ed5bfb7f by Alec Theriault at 2018-10-24T20:42:14-07:00 Fix the synopsis button Here's these changes are supposed to do: * put the synopsis back on the right side * properly have it on the edge of the screen on wide screens * adjust the background of the synopsis to match the button (otherwise the grey blends in with what is underneath) * get rid of the dotted purple line * the synopsis contents are now scrollable even when in wide screens (this has been a long-standing bug) - - - - - 883fd74b by Alec Theriault at 2018-10-25T20:16:46-07:00 Avoid more conflicts in generated ids (#954) This fixes haskell/haddock#953 by passing more names into the generated ids. - - - - - ea54e331 by Alec Theriault at 2018-10-25T21:07:12-07:00 Don't hide bullets in method docs I think thst CSS was meant only to deal with fields and the effect on bullets was accidental. Fixes haskell/haddock#926. - - - - - 9a14ef4a by Alec Theriault at 2018-10-25T22:02:07-07:00 Indent more things + slightly smaller font - - - - - b9f17e29 by Alec Theriault at 2018-10-25T22:10:01-07:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 096a3cfa by Alec Theriault at 2018-10-25T22:24:38-07:00 Accept HTML output - - - - - 2669517d by Alec Theriault at 2018-10-26T09:02:35-07:00 User manual + stuff for building GHC docs - - - - - 46b27687 by Alec Theriault at 2018-10-26T09:10:59-07:00 Make 'Contents' in NewOcean scrollable This only happens if the contents block on the left is so big that it doesn't fit (vertically) on the page. If that happens, we want it to be scrollable. - - - - - 3443dd94 by Alec Theriault at 2018-10-26T09:36:46-07:00 Revert "Make 'Contents' in NewOcean scrollable" This reverts commit f909ffd8353d6463fd5dd184998a32aa98d5c922. I missed the fact this also forces the 'Contents' to always go down to the bottom of the page. - - - - - ed081424 by Alec Theriault at 2018-10-26T14:22:23-07:00 Avoid some partiality AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes haskell/haddock#569. - - - - - 6a5bec41 by Alec Theriault at 2018-10-27T10:05:04-07:00 Fix documentation in `haddock-api` (#957) * Fix misplaced Haddocks in Haddock itself Haddock should be able to generate documentation for 'haddock-api' again. * Make CI check that documentation can be built. * Add back a doc that is OK - - - - - 5100450a by Matthew Yacavone at 2018-10-27T14:51:38-04:00 More explicit foralls (GHC Proposal 0007) - - - - - 8771a6b0 by Alec Theriault at 2018-11-05T13:58:11-08:00 Only run MathJax on entities with "mathjax" class (#960) Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes haskell/haddock#959. - - - - - bd7ff5c5 by Alec Theriault at 2018-11-05T15:54:22-08:00 Deduplicate some work in 'AttachInstances' Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too - - - - - cf99fd8f by Alec Theriault at 2018-11-05T15:54:22-08:00 Specialize some SYB functions Perf only change: * Add a 'SPECIALIZE' pragma to help GHC optimize a 'Data a =>' constraint * Manually specialize the needlessly general type of 'specializeTyVarBndrs' - - - - - 4f91c473 by Alec Theriault at 2018-11-05T15:54:22-08:00 Improve perf of renaming Perf only change: * don't look up type variable names (they're never in the environment) * use a difference list for accumulating missing names * more efficient 'Functor'/'Applicative' instances for 'RnM' - - - - - 4bbab0d4 by Alec Theriault at 2018-11-05T15:54:22-08:00 Faster 'Text' driven parser combinators Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}' - - - - - fa430c02 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support hyperlink labels with inline markup The parser for pictures hasn't been properly adjusted yet. - - - - - c1431035 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support (and flatten) inline markup in image links Inline markup is supported in image links but, as per the [commonmark recommendation][0], it is stripped back to a plain text representation. [0]: https://spec.commonmark.org/0.28/#example-547 - - - - - d4ee1ba5 by Alec Theriault at 2018-11-06T12:03:24-08:00 Accept test case - - - - - 8088aeb1 by Alec Theriault at 2018-11-06T12:03:24-08:00 Fix/add to haddock-library test suite - - - - - e78f644d by Alec Theriault at 2018-11-06T13:26:31-08:00 Bump version bounds - - - - - 644335eb by Alec Theriault at 2018-11-06T13:53:30-08:00 Merge pull request haskell/haddock#875 from harpocrates/feature/markup-in-hyperlinks Inline markup in markdown-style links and images - - - - - e173ed0d by Alec Theriault at 2018-11-07T12:37:18-08:00 Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page - - - - - b2d92df7 by Alec Theriault at 2018-11-07T13:41:57-08:00 Allow "Contents" summary to scroll in a fixed div In the unfortunate event that the "Contents" summary doesn't fit vertically (like in the "Prelude"), it will be scrollable. - - - - - ca704c23 by Alec Theriault at 2018-11-07T13:45:15-08:00 Accept HTML output changes - - - - - 82c0ec6d by Alec Theriault at 2018-11-07T18:12:54-08:00 overflow-y 'scroll' -> 'auto' - - - - - 571d7657 by Alec Theriault at 2018-11-08T19:44:12-08:00 Clicking on "Contents" navigates to top of page - - - - - 8065a012 by Alec Theriault at 2018-11-08T19:44:17-08:00 Space out functions more Also, functions and data decls now have the same space before and after them. - - - - - cc650ede by Alec Theriault at 2018-11-09T08:13:35-08:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 65f8c17f by Alec Theriault at 2018-11-10T14:04:06-08:00 Update changelog - - - - - 20473847 by Alec Theriault at 2018-11-10T14:21:40-08:00 Replace oplus/ominus expander/collapser icons with triangles - - - - - 16592957 by Alec Theriault at 2018-11-10T14:35:10-08:00 Merge pull request haskell/haddock#949 from haskell/wip/new-ocean Introduce NewOcean theme. - - - - - 357cefe1 by Alec Theriault at 2018-11-10T16:02:13-08:00 Merge branch 'ghc-8.6' into ghc-head - - - - - de612267 by Alec Theriault at 2018-11-11T20:01:21-08:00 Rename 'NewOcean' theme to 'Linuwial' - - - - - 954b5baa by Alec Theriault at 2018-11-12T08:33:18-08:00 Add blockquote styling Matches b71da1feabf33efbbc517ac376bb690b5a604c2f from hackage-server. Fixes haskell/haddock#967. - - - - - d32c0b0b by Fangyi Zhou at 2018-11-12T10:24:13-08:00 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, osa1 Reviewed By: osa1 GHC Trac Issues: haskell/haddock#15733 Differential Revision: https://phabricator.haskell.org/D5262 - - - - - 41098b1f by Alp Mestanogullari at 2018-11-15T22:40:09+01:00 Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change It got introduced in ghc/ghc at ae2c9b40f5b6bf272251d1f4107c60003f541b62. - - - - - c5c1c7e0 by Alec Theriault at 2018-11-15T13:48:13-08:00 Merge pull request haskell/haddock#970 from alpmestan/alp/fix-promotionflag Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change - - - - - 6473d3a4 by Shayan-Najd at 2018-11-23T01:38:49+01:00 [TTG: Handling Source Locations] Foundation and Pat Trac Issues haskell/haddock#15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`) - - - - - 7a088dfe by Alec Theriault at 2018-11-26T11:11:28-08:00 More uniform handling of `forall`'s in HTML/LaTeX * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes haskell/haddock#973 - - - - - d735e570 by Alec Theriault at 2018-12-12T08:42:09-08:00 Fix warnings, accept output * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's - - - - - a3852f8a by Zejun Wu at 2018-12-14T09:37:47-05:00 Output better debug infromation on internal error in extractDecl This will make investigation of haskell/haddock#979 easier - - - - - 2eccb5b9 by Alec Theriault at 2018-12-17T09:25:10-05:00 Refactor names + unused functions (#982) This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions - - - - - e82e4df8 by Alec Theriault at 2018-12-20T16:16:30-05:00 Load plugins when compiling each module (#983) * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code - - - - - 96e86f38 by Alec Theriault at 2018-12-23T10:23:20-05:00 Properly synify and render promoted type variables (#985) * Synify and render properly promoted type variables Fixes haskell/haddock#923. * Accept output - - - - - 23343345 by Alec Theriault at 2018-12-27T16:39:38-05:00 Remove `haddock-test`'s dep. on `syb` (#987) The functionality is easily inlined into one short function: `gmapEverywhere`. This doesn't warrant pulling in another package. - - - - - d0734f21 by Alec Theriault at 2018-12-27T16:39:52-05:00 Address deprecation warnings in `haddock-test` (#988) Fixes haskell/haddock#885. - - - - - 4d9f144e by mynguyen at 2018-12-30T23:42:26-05:00 Visible kind application haddock update - - - - - ffe0e9ed by Alec Theriault at 2019-01-07T13:55:22-08:00 Print kinded tyvars in constructors for Hoogle (#993) Fixes haskell/haddock#992 - - - - - 2e18b55d by Alec Theriault at 2019-01-10T16:42:45-08:00 Accept new output `GHC.Maybe` -> `Data.Maybe` (#996) Since 53874834b779ad0dfbcde6650069c37926da1b79 in GHC, "GHC.Maybe" is marked as `not-home`. That changes around some test output. - - - - - 055da666 by Gabor Greif at 2019-01-22T14:41:51+01:00 Lone typofix - - - - - 01bb71c9 by Alec Theriault at 2019-01-23T11:46:46-08:00 Keep forall on H98 existential data constructors (#1003) The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes haskell/haddock#1002. - - - - - f9b9bc0e by Ryan Scott at 2019-01-27T09:28:12-08:00 Fix haskell/haddock#1004 with a pinch of dropForAlls - - - - - 5cfcdd0a by Alec Theriault at 2019-01-28T16:49:57-08:00 Loosen 'QuickCheck' and 'hspec' bounds It looks like the new versions don't cause any breakage and loosening the bounds helps deps fit in one stack resolver. - - - - - 3545d3dd by Alec Theriault at 2019-01-31T01:37:25-08:00 Use `.hie` files for the Hyperlinker backend (#977) # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see haskell/haddock#998) * restructure temporary folder logic for `.hi`/`.hie` model - - - - - 2ded3359 by Herbert Valerio Riedel at 2019-02-02T12:06:12+01:00 Update/modernise haddock-library.cabal file - - - - - 62b93451 by Herbert Valerio Riedel at 2019-02-02T12:19:31+01:00 Tentatively declare support for unreleased base-4.13/ghc-8.8 - - - - - 6041e767 by Herbert Valerio Riedel at 2019-02-02T16:04:32+01:00 Normalise LICENSE text w/ cabal's BSD2 template Also, correct the `.cabal` files to advertise `BSD2` instead of the incorrect `BSD3` license. - - - - - 0b459d7f by Alec Theriault at 2019-02-02T18:06:12-08:00 CI: fetch GHC from validate artifact Should help make CI be less broken - - - - - 6b5c07cf by Alec Theriault at 2019-02-02T18:06:12-08:00 Fix some Hyperlinker test suite fallout * Amend `ParserSpec` to match new Hyperlinker API - pass in compiler info - strip out null tokens * Make `hypsrc-test` pass reliably - strip out `local-*` ids - strip out `line-*` ids from the `ClangCppBug` test - re-accept output - - - - - ded34791 by Nathan Collins at 2019-02-02T18:31:23-08:00 Update README instructions for Stack No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock. - - - - - 723298c9 by Alec Theriault at 2019-02-03T09:11:05-08:00 Remove `Documentation.Haddock.Utf8` The circumstances under which this module appeared are completely gone. The Hyperlinker backend no longer needs this module (it uses the more efficient `Encoding` module from `ghc`). Why no deprecation? Because this module really shouldn't exist! - It isn't used in `haddock-library`/`haddock-api` anymore - It was copy pasted directly from `utf8-string` - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding` - - - - - 51050006 by Alec Theriault at 2019-02-03T22:58:58-08:00 Miscellaneous improvements to `Convert` (#1020) Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms - - - - - 841980c4 by Oleg Grenrus at 2019-02-04T08:44:25-08:00 Make a fixture of weird parsing of lists (#997) The second example is interesting. If there's a list directly after the header, and that list has deeper structure, the parser is confused: It finds two lists: - One with the first nested element, - everything after it I'm not trying to fix this, as I'm not even sure this is a bug, and not a feature. - - - - - 7315c0c8 by Ryan Scott at 2019-02-04T12:17:56-08:00 Fix haskell/haddock#1015 with dataConUserTyVars (#1022) The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes haskell/haddock#1015. - - - - - ee0b49a3 by Ryan Scott at 2019-02-04T15:25:17-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. - - - - - 1c850dc8 by Alan Zimmerman at 2019-02-05T21:54:18+02:00 Matching changes in GHC for haskell/haddock#16236 - - - - - ab03c38e by Simon Marlow at 2019-02-06T08:07:33+00:00 Merge pull request haskell/haddock#1014 from hvr/pr/bsd2-normalise Normalise LICENSE text w/ cabal's BSD2 template - - - - - 5a92ccae by Alec Theriault at 2019-02-10T06:21:55-05:00 Merge remote-tracking branch 'gitlab/wip/T16236-2' into ghc-head - - - - - c0485a1d by Alec Theriault at 2019-02-10T03:32:52-08:00 Removes `haddock-test`s dependency on `xml`/`xhtml` (#1027) This means that `html-test`, `latex-test`, `hoogle-test`, and `hypsrc-test` now only depend on GHC boot libs. So we should now be able to build and run these as part of GHC's testsuite. \o/ The reference output has changed very slightly, in three ways: * we don't convert quotes back into `&quot;` as the `xml` lib did * we don't add extra `&nbsp;` as the `xml` lib did * we now remove the entire footer `div` (instead of just emptying it) - - - - - 65a448e3 by Alec Theriault at 2019-02-11T12:27:41-05:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - 360ca937 by Alec Theriault at 2019-02-13T11:36:11-05:00 Clean up logic for guessing `-B` and `--lib` (#1026) Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works. - - - - - d583e364 by Alec Theriault at 2019-02-16T10:41:22-05:00 Fix tests broken by GHC Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings. - - - - - da0c42cc by Vladislav Zavialov at 2019-02-17T11:39:19+03:00 Parser changes to match !380 - - - - - ab96bed7 by Ryan Scott at 2019-02-18T04:44:08-05:00 Bump ghc version to 8.9 - - - - - 44b7c714 by Alec Theriault at 2019-02-22T05:49:43-08:00 Match GHC changes for T16185 `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock. - - - - - 2ee653b1 by Alec Theriault at 2019-02-24T18:53:33-08:00 Update .travis.yml Points to the new GHC CI artifact. - - - - - 90939d71 by Alec Theriault at 2019-02-25T00:42:41-08:00 Support value/type namespaces on identifier links Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity) - - - - - d6ed496c by Alec Theriault at 2019-02-25T00:42:46-08:00 Better identifier parsing * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental). - - - - - 3c3b404c by Alec Theriault at 2019-02-25T22:12:11-08:00 Fix standalone deriving docs Docs on standalone deriving decls for classes with associated types should be associated with the class instance, not the associated type instance. Fixes haskell/haddock#1033 - - - - - d51ef69e by Alec Theriault at 2019-02-26T19:14:59-08:00 Fix bogus identifier defaulting This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes haskell/haddock#1035. - - - - - 88cbbdc7 by Ryan Scott at 2019-02-27T10:14:03-05:00 Visible dependent quantification (#16326) changes - - - - - 0dcf6cee by Xia Li-yao at 2019-02-27T21:53:27-05:00 Menu item controlling which instances are expanded/collapsed (#1007) Adds a menu item (like "Quick Jump") for options related to displaying instances. This provides functionality for: * expanding/collapsing all instances on the currently opened page * controlling whether instances are expanded/collapsed by default * controlling whether the state of instances should be "remembered" This new functionality is implemented in Typescript in `details-helper`. The built-in-themes style switcher also got a revamp so that all three of QuickJump, the style switcher, and instance preferences now have the same style and implementation structure. See also: https://mail.haskell.org/pipermail/haskell-cafe/2019-January/130495.html Fixes haskell/haddock#698. Co-authored-by: Lysxia <lysxia at gmail.com> Co-authored-by: Nathan Collins <conathan at galois.com> - - - - - 3828c0fb by Alec Theriault at 2019-02-28T12:42:49-05:00 `--show-interface` should output to stdout. (#1040) Fixes haskell/haddock#864. - - - - - a50f4cda by gbaz at 2019-03-01T07:43:16-08:00 Increase contrast of Linuwal theme (#1037) This is to address the concern that, on less nice and older screens, some of the shades of grey blend in too easily with the white background. * darken the font slightly * darken slightly the grey behind type signatures and such * add a border and round the corners on code blocks * knock the font down by one point - - - - - ab4d41de by Alec Theriault at 2019-03-03T09:23:26-08:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 12f509eb by Ben Gamari at 2019-03-04T22:13:20-05:00 Remove reference to Opt_SplitObjs flag Split-objects has been removed. - - - - - 5b3e4c9a by Ryan Scott at 2019-03-06T19:16:24-05:00 Update html-test output to reflect haskell/haddock#16391 changes - - - - - fc228af1 by Alec Theriault at 2019-03-09T08:29:23-08:00 Match changes for "Stop inferring over-polymorphic kinds" The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock. - - - - - 6ac109eb by Alec Theriault at 2019-03-09T11:22:55-08:00 Add .hi, .dyn_hi, etc files to .gitignore Fixes haskell/haddock#1030. - - - - - b55f0c05 by Alec Theriault at 2019-03-09T11:22:55-08:00 Better support for default methods in classes * default methods now get rendered differently * default associated types get rendered * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend * LaTeX backend now renders default method signatures NB: there is still no way to document default class members and the NB: LaTeX backend still crashes on associated types - - - - - 10aea0cf by Alec Theriault at 2019-03-09T11:22:55-08:00 Avoid multi-line `emph` in LaTeX backend `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes haskell/haddock#936. - - - - - d22dc2c9 by Alec Theriault at 2019-03-09T11:22:55-08:00 Many LaTeX backend fixes After this commit, we can run with `--latex` on all boot libraries without crashing (although the generated LaTeX still fails to compile in a handful of larger packages like `ghc` and `base`). * Add newlines after all block elements in LaTeX. This is important to prevent the final output from being more an more indented. See the `latext-test/src/Example` test case for a sample of this. * Support associated types in class declarations (but not yet defaults) * Several small issues for producing compiling LaTeX; - avoid empy `\haddockbeginargs` lists (ex: `type family Any`) - properly escape identifiers depending on context (ex: `Int#`) - add `vbox` around `itemize`/`enumerate` (so they can be in tables) * Several spacing fixes: - limit the width of `Pretty`-arranged monospaced code - cut out extra space characters in export lists - only escape spaces if there are _multiple_ spaces - allow type signatures to be multiline (even without docs) * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files from `latex-test` test reference output. Fixes haskell/haddock#935, haskell/haddock#929 (LaTeX docs for `text` build & compile) Fixes haskell/haddock#727, haskell/haddock#930 (I think both are really about type families...) - - - - - 0e6cee00 by Alec Theriault at 2019-03-29T12:11:56-07:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - ce05434d by Alan Zimmerman at 2019-03-29T12:12:11-07:00 Matching changes in GHC for haskell/haddock#16236 (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576) - - - - - d85766b2 by Ben Gamari at 2019-03-29T12:14:04-07:00 Bump GHC to 8.8 - - - - - 5a82cbaf by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Redo ParseModuleHeader - - - - - b9033348 by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - bb55c8f4 by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove outdated `.ghci` files and `scripts` The `.ghci` files are actively annoying when trying to `cabal v2-repl`. As for the `scripts`, the distribution workflow is completely different. - - - - - 5ee244dc by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove obsolete arcanist files + STYLE Now that GHC is hosted on Gitlab, the arcanist files don't make sense anymore. The STYLE file contains nothing more than a dead link too. - - - - - d07c1928 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Redo ParseModuleHeader - - - - - 492762d2 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - af2ac773 by Ryan Scott at 2019-05-14T17:22:13-04:00 Changes for haskell/haddock#16110/#16356 - - - - - 6820ed0d by Alec Theriault at 2019-05-17T08:51:27-07:00 Unbreak haskell/haddock#1004 test case `fail` is no longer part of `Monad`. - - - - - 6bf7be98 by Alec Theriault at 2019-05-17T08:51:27-07:00 Fix haskell/haddock#1063 with better parenthesization logic for contexts The only other change in html/hoogle/hyperlinker output for the boot libraries that this caused is a fix to some Hoogle output for implicit params. ``` $ diff -r _build/docs/ old_docs diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt 13296c13296 < assertError :: (?callStack :: CallStack) => Bool -> a -> a --- > assertError :: ?callStack :: CallStack => Bool -> a -> a ``` - - - - - b5716b61 by Ryan Scott at 2019-05-22T17:24:32-04:00 Match changes with haskell/haddock#14332 - - - - - c115abf6 by Alec Theriault at 2019-05-26T16:01:58-04:00 Remove Haddock's dependency on `Cabal` At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries). - - - - - e5b2d4a3 by Alec Theriault at 2019-05-26T16:16:25-04:00 Regression test: promoted lists in associated types When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes haskell/haddock#466, - - - - - cc5ad5d3 by Alec Theriault at 2019-05-26T17:55:54-04:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 4b3301a6 by Alec Theriault at 2019-05-26T17:57:52-04:00 Release haddock-2.23, haddock-library-1.8.0 Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1. - - - - - 69c7cfce by Matthew Pickering at 2019-05-30T10:54:27+01:00 Update hyperlinker tests for new types in .hie files - - - - - 29b7e738 by Zubin Duggal at 2019-05-30T10:57:51+01:00 update for new way to store hiefile headers - - - - - aeca5d5f by Zubin Duggal at 2019-06-04T18:57:42-04:00 update for new way to store hiefile headers - - - - - ba2ca518 by Ben Gamari at 2019-06-07T23:11:14+00:00 Update test output for introduction of Safe-Inferred - - - - - 3a975a6c by Ryan Scott at 2019-07-03T12:06:27-04:00 Changes for haskell/haddock#15247 - - - - - 0df46555 by Zubin Duggal at 2019-07-22T10:52:50+01:00 Fix haddockHypsrcTest - - - - - 2688686b by Sylvain Henry at 2019-09-12T23:19:39+02:00 Fix for GHC module renaming - - - - - 9ec0f3fc by Alec Theriault at 2019-09-20T03:21:00-04:00 Fix Travis CI, loosen .cabal bounds (#1089) Tentatively for the 2.23 release: * updated Travis CI to work again * tweaked bounds in the `.cabal` files * adjusted `extra-source-files` to properly identify test files - - - - - ca559beb by Matthías Páll Gissurarson at 2019-09-28T12:14:40-04:00 Small change in to facilitate extended typed-holes (#1090) This change has no functional effect on haddock itself, it just changes one pattern to use `_ (` rather than `_(`, so that we may use `_(` as a token for extended typed-holes later. - - - - - 02e28976 by Vladislav Zavialov at 2019-09-28T12:17:45-04:00 Remove spaces around @-patterns (#1093) This is needed to compile `haddock` when [GHC Proposal haskell/haddock#229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented. - - - - - 83cbbf55 by Alexis King at 2019-09-30T21:12:42-04:00 Fix the ignore-exports option (#1082) The `ignore-exports` option has been broken since haskell/haddock#688, as mentioned in https://github.com/haskell/haddock/pull/766#issue-172505043. This PR fixes it. - - - - - e127e0ab by Ben Gamari at 2019-10-06T15:12:06-04:00 Fix a few haddock issues - - - - - 3a0f5c89 by Zubin Duggal at 2019-10-07T17:56:13-04:00 Fix crash when there are no srcspans in the file due to CPP - - - - - 339c5ff8 by Alec Theriault at 2019-10-07T17:56:13-04:00 Prefer un-hyperlinked sources to no sources It is possible to fail to extract an HIE ast. This is however not a reason to produce _no_ output - we should still make a colorized HTML page. - - - - - d47ef478 by Alec Theriault at 2019-10-07T17:56:13-04:00 Add a regression test for haskell/haddock#1091 Previously, this input would crash Haddock. - - - - - ed7c8b0f by Alec Theriault at 2019-10-07T20:56:48-04:00 Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. - - - - - d00436ab by Andreas Klebinger at 2019-10-21T15:53:03+02:00 Refactor for withTiming changes. - - - - - 4230e712 by Ben Gamari at 2019-10-22T09:36:37-04:00 Merge pull request haskell/haddock#1101 from AndreasPK/withTimingRefactor Refactor for withTiming changes. - - - - - d155c5f4 by Ryan Scott at 2019-10-23T10:37:17-04:00 Reify oversaturated data family instances correctly (#1103) This fixes haskell/haddock#1103 by adapting the corresponding patch for GHC (see https://gitlab.haskell.org/ghc/ghc/issues/17296 and https://gitlab.haskell.org/ghc/ghc/merge_requests/1877). - - - - - 331a5adf by Sebastian Graf at 2019-10-25T17:14:40+02:00 Refactor for OutputableBndrId changes - - - - - 48a490e0 by Ben Gamari at 2019-10-27T10:16:16-04:00 Merge pull request haskell/haddock#1105 from sgraf812/wip/flexible-outputable Refactor for OutputableBndrId changes - - - - - f62a7dfc by Sebastian Graf at 2019-11-01T11:54:16+00:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - d9b242ed by Ryan Scott at 2019-11-03T13:20:03-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. (cherry picked from commit cfd682c5fd03b099a3d78c44f9279faf56a0ac70) - - - - - dfd42406 by Sebastian Graf at 2019-11-04T07:02:14-05:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - 0b15be7c by Ben Gamari at 2019-11-09T13:21:33-05:00 Import isRuntimeRepVar from Type rather than TyCoRep isRuntimeRepVar is not longer exported from TyCoRep due to ghc#17441. - - - - - 091f7283 by Ben Gamari at 2019-11-10T12:47:06-05:00 Bump to GHC 8.10 - - - - - e88c71f2 by Ben Gamari at 2019-11-14T00:22:24-05:00 Merge pull request haskell/haddock#1110 from haskell/wip/T17441 Import isRuntimeRepVar from Type rather than TyCoRep - - - - - 4e0bbc17 by Ben Gamari at 2019-11-14T00:22:45-05:00 Version bumps for GHC 8.11 - - - - - 0e85ceb4 by Ben Gamari at 2019-11-15T11:59:45-05:00 Bump to GHC 8.10 - - - - - 00d6d68b by Ben Gamari at 2019-11-16T18:35:58-05:00 Bump ghc version to 8.11 - - - - - dde1fc3f by Ben Gamari at 2019-11-16T20:40:37-05:00 Drop support for base 4.13 - - - - - f52e331d by Vladislav Zavialov at 2019-11-24T13:02:28+03:00 Update Hyperlinker.Parser.classify to use ITdollar - - - - - 1ad96198 by Vladislav Zavialov at 2019-11-28T16:12:33+03:00 Remove HasSrcSpan (#17494) - - - - - 651afd70 by Herbert Valerio Riedel at 2019-12-08T12:08:16+01:00 Document error-prone conditional definition of instances This can easily trip up people if one isn't aware of it. Usually it's better to avoid this kind of conditionality especially for typeclasses for which there's an compat-package as conditional instances like these tend to fragment the ecosystem into those packages that go the extra mile to provide backward compat via those compat-packages and those that fail to do so. - - - - - b521af56 by Herbert Valerio Riedel at 2019-12-08T12:09:54+01:00 Fix build-failure regression for base < 4.7 The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses haskell/haddock#1119 - - - - - 556c375d by Sylvain Henry at 2020-01-02T19:01:55+01:00 Fix after Iface modules renaming - - - - - bd6c53e5 by Sylvain Henry at 2020-01-07T00:48:48+01:00 hsyl20-modules-renamer - - - - - fb23713b by Ryan Scott at 2020-01-08T07:41:13-05:00 Changes for GHC#17608 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2372 - - - - - 4a4dd382 by Ryan Scott at 2020-01-25T08:08:26-05:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - e782a44d by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename PackageConfig into UnitInfo - - - - - ba3c9f05 by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename lookupPackage - - - - - ab37f9b3 by Ben Gamari at 2020-01-29T13:00:44-05:00 Merge pull request haskell/haddock#1125 from haskell/wip/T17566-take-two Changes for GHC#17566 - - - - - 3ebd5ae0 by Ryan Scott at 2020-01-31T05:56:50-05:00 Merge branch 'wip-hsyl20-package-refactor' into ghc-head - - - - - 602a747e by Richard Eisenberg at 2020-02-04T09:05:43+00:00 Echo GHC's removal of PlaceHolder module This goes with GHC's !2083. - - - - - ccfe5679 by Sylvain Henry at 2020-02-10T10:13:56+01:00 Module hierarchy: runtime (cf haskell/haddock#13009) - - - - - 554914ce by Cale Gibbard at 2020-02-10T16:10:39-05:00 Fix build of haddock in stage1 We have to use the correct version of the GHC API, but the version of the compiler itself doesn't matter. - - - - - 5b6fa2a7 by John Ericson at 2020-02-10T16:18:07-05:00 Noramlize `tested-with` fields in cabal files - - - - - e6eb3ebe by Vladislav Zavialov at 2020-02-16T13:25:26+03:00 No MonadFail/Alternative for P - - - - - 90e181f7 by Ben Gamari at 2020-02-18T14:13:47-05:00 Merge pull request haskell/haddock#1129 from obsidiansystems/wip/fix-stage1-build Fix build of haddock in stage1 - - - - - 93b64636 by Sylvain Henry at 2020-02-19T11:20:27+01:00 Modules: Driver (#13009) - - - - - da4f6c7b by Vladislav Zavialov at 2020-02-22T15:33:02+03:00 Use RealSrcSpan in InstMap - - - - - 479b1b50 by Ben Gamari at 2020-02-23T10:28:13-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 55ecacf0 by Sylvain Henry at 2020-02-25T15:18:27+01:00 Modules: Core (#13009) - - - - - 60867b3b by Vladislav Zavialov at 2020-02-28T15:53:52+03:00 Ignore the BufLoc/BufSpan added in GHC's !2516 - - - - - 1e5506d3 by Sylvain Henry at 2020-03-02T12:32:43+01:00 Modules: Core (#13009) - - - - - 6fb53177 by Richard Eisenberg at 2020-03-09T14:49:40+00:00 Changes in GHC's !1913. - - - - - 30b792ea by Ben Gamari at 2020-03-16T12:45:02-04:00 Merge pull request haskell/haddock#1130 from hsyl20/wip/hsyl20-modules-core2 Modules: Core (#13009) - - - - - cd761ffa by Sylvain Henry at 2020-03-18T15:24:00+01:00 Modules: Types - - - - - b6646486 by Ben Gamari at 2020-03-18T14:42:43-04:00 Merge pull request haskell/haddock#1133 from hsyl20/wip/hsyl20/modules/types Modules: Types - - - - - 9325d734 by Kleidukos at 2020-03-19T12:38:31-04:00 Replace the 'caption' class so that the collapsible sections are shown - - - - - 5e2bb555 by Kleidukos at 2020-03-19T12:38:31-04:00 Force ghc-8.8.3 - - - - - c6fcd0aa by Kleidukos at 2020-03-19T12:38:31-04:00 Update test fixtures - - - - - 5c849cb1 by Sylvain Henry at 2020-03-20T09:34:39+01:00 Modules: Types - - - - - 7f439155 by Alec Theriault at 2020-03-20T20:17:01-04:00 Merge branch 'ghc-8.8' into ghc-8.10 - - - - - b7904e5c by Alina Banerjee at 2020-03-20T20:24:17-04:00 Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests - - - - - b9d60a59 by Alec Theriault at 2020-03-22T11:46:42-04:00 Clean up warnings * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal` - - - - - 0c317dbe by Alec Theriault at 2020-03-22T18:46:54-04:00 Fix NPM security warnings This was done by calling `npm audit fix`. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. - - - - - 6e306242 by Alec Theriault at 2020-03-22T20:10:52-04:00 Tentative 2.24 release Adjusted changelogs and versions in `.cabal` files in preparation for the upcoming release bundled with GHC 8.10. - - - - - 1bfb4645 by Ben Gamari at 2020-03-23T16:40:54-04:00 Merge commit '3c2944c037263b426c4fe60a3424c27b852ea71c' into HEAD More changes from the GHC types module refactoring. - - - - - be8c6f3d by Alec Theriault at 2020-03-26T20:10:53-04:00 Update `.travis.yml` to work with GHC 8.10.1 * Regenerated the Travis file with `haskell-ci` * Beef up `.cabal` files with more `tested-with` information - - - - - b025a9c6 by Alec Theriault at 2020-03-26T20:10:53-04:00 Update README Removed some out of date links/info, added some more useful links. * badge to Hackage * update old trac link * `ghc-head` => `ghc-8.10` * `cabal new-*` is now `cabal v2-*` and it should Just Work * `--test-option='--accept'` is the way to accept testsuite output - - - - - 564d889a by Alec Theriault at 2020-03-27T20:34:33-04:00 Fix crash in `haddock-library` on unicode space Our quickcheck tests for `haddock-library` stumbled across an edge case input that was causing Haddock to crash: it was a unicode space character. The root cause of the crash is that we were implicitly assuming that if a space character was not " \t\f\v\r", it would have to be "\n". We fix this by instead defining horizontal space as: any space character that is not '\n'. Fixes haskell/haddock#1142 - - - - - 2d360ba1 by Alec Theriault at 2020-03-27T21:57:32-04:00 Disallow qualified uses of reserved identifiers This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes haskell/haddock#952 - - - - - 47ae22ed by Alec Theriault at 2020-03-28T13:36:25-04:00 Remove unused `Haddock.Utils` functions * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils` - - - - - c0291245 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use TTG empty extensions to remove some `error`'s None of these error cases should ever have been reachable, so this is just a matter of leveraging the type system to assert this. * Use the `NoExtCon` and `noExtCon` to handle case matches for no extension constructors, instead of throwing an `error`. * Use the extension field of `HsSpliceTy` to ensure that this variant of `HsType` cannot exist in an `HsType DocNameI`. - - - - - 0aff8dc4 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` * `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes haskell/haddock#978 - - - - - bf6f2fb7 by Alec Theriault at 2020-03-28T13:36:25-04:00 Cleanup up GHC flags in `.cabal` files * enable more useful warning flags in `haddock-api`, handle the new warnings generated * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in `-Wall` for a while now) - - - - - c576fbf1 by Alec Theriault at 2020-03-28T13:36:25-04:00 `haddock-library` document header level Document the fact the header level is going to always be between 1 and 6 inclusive. Along the way, I also optimized the parsing code a bit. - - - - - 71bce0ee by Alec Theriault at 2020-03-28T14:26:27-04:00 Disallow links in section headers This is quite straightforward to implement, since we already had a function `docToHtmlNoAnchors` (which we used to generate the link in the sidebar "Contents"). This breaks test `Bug387`, but that test case has aged badly: we now automatically generate anchors for all headings, so manually adding an anchor in a section makes no sense. Nested anchors are, as pointed out in haskell/haddock#1054, disallowed by the HTML standard. Fixes haskell/haddock#1054 - - - - - b461b0ed by Sylvain Henry at 2020-03-30T10:34:23+02:00 Modules: type checker - - - - - cd8cd1ee by Ben Gamari at 2020-03-31T12:45:02-04:00 Merge pull request haskell/haddock#1152 from hsyl20/wip/hsyl20/modules/tc Module renaming - - - - - 5e8f8ea7 by Felix Yan at 2020-04-01T17:58:06-07:00 Allow QuickCheck 2.14 Builds fine and all tests pass. - - - - - dc6b1633 by Sylvain Henry at 2020-04-05T16:43:44+02:00 Module renaming: amend previous patch - - - - - eee2f4ae by Ryan Scott at 2020-04-05T09:04:43-07:00 Fix haskell/haddock#1050 by filtering out invisible AppTy arguments This makes the `synifyType` case for `AppTy` more intelligent by taking into consideration the visibilities of each `AppTy` argument and filtering out any invisible arguments, as they aren't intended to be displayed in the source code. (See haskell/haddock#1050 for an example of what can happen if you fail to filter these out.) Along the way, I noticed that a special `synifyType` case for `AppTy t1 (CoercionTy {})` could be consolidated with the case below it, so I took the opportunity to tidy this up. - - - - - 23eb99e8 by Ben Gamari at 2020-04-07T11:19:58-04:00 Merge pull request haskell/haddock#1154 from hsyl20/wip/hsyl20/modules/tc Module renaming: amend previous patch - - - - - 072d994d by Ryan Scott at 2020-04-07T19:32:47-04:00 Make NoExtCon fields strict These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992). - - - - - d8ebf6c8 by Ignat Insarov at 2020-04-09T21:15:01-04:00 Recode Doc to Json. (#1159) * Recode Doc to Json. * More descriptive field labels. - - - - - 52df4b4e by Sylvain Henry at 2020-04-10T12:39:18+02:00 Module renaming - - - - - d9ab8ec8 by Cale Gibbard at 2020-04-14T11:43:34-04:00 Add instance of XCollectPat for DocNameI - - - - - 323d221d by Cale Gibbard at 2020-04-14T11:43:34-04:00 Rename XCollectPat -> CollectPass - - - - - 2df80867 by Alec Theriault at 2020-04-15T07:30:51-07:00 Prune docstrings that are never rendered When first creating a Haddock interface, trim `ifaceDocMap` and `ifaceArgMap` to not include docstrings that can never appear in the final output. Besides checking with GHC which names are exported, we also need to keep all the docs attached to instance declarations (it is much tougher to detect when an instance is fully private). This change means: * slightly smaller interface files (7% reduction on boot libs) * slightly less work to do processing docstrings that aren't used * no warnings in Haddock's output about private docstrings (see haskell/haddock#1070) I've tested manually that this does not affect any of the boot library generated docs (the only change in output was some small re-ordering in a handful of instance lists). This should mean no docstrings have been incorrectly dropped. - - - - - f49c90cc by Alec Theriault at 2020-04-15T07:30:51-07:00 Don't warn about missing links in miminal sigs When renaming the Haddock interface, never emit warnings when renaming a minimal signature. Also added some documention around `renameInterface`. Minimal signatures intentionally include references to potentially un-exported methods (see the discussion in haskell/haddock#330), so it is expected that they will not always have a link destination. On the principle that warnings should always be resolvable, this shouldn't produce a warning. See haskell/haddock#1070. - - - - - a9eda64d by Ben Gamari at 2020-04-17T09:27:35-04:00 Merge pull request haskell/haddock#1160 from hsyl20/wip/hsyl20/modules/systools Module renaming - - - - - f40d7879 by Cale Gibbard at 2020-04-20T11:30:38-04:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ttg-con-pat - - - - - a50e7753 by Ben Gamari at 2020-04-20T11:36:10-04:00 Merge pull request haskell/haddock#1165 from obsidiansystems/wip/ttg-con-pat Trees that Grow refactor (GHC !2553) - - - - - 6a24795c by Alec Theriault at 2020-04-21T08:06:45-07:00 Fallback to `hiDecl` when `extractDecl` fails Sometimes, the declaration being exported is a subdecl (for instance, a record accessor getting exported at the top-level). For these cases, Haddock has to find a way to produce some synthetic sensible top-level declaration. This is done with `extractDecl`. As is shown by haskell/haddock#1067, this is sometimes impossible to do just at a syntactic level (for instance when the subdecl is re-exported). In these cases, the only sensible thing to do is to try to reify a declaration based on a GHC `TyThing` via `hiDecl`. - - - - - eee1a8b7 by Sylvain Henry at 2020-04-24T15:46:05+02:00 Module structure - - - - - 50b9259c by Iñaki at 2020-04-25T18:38:11-04:00 Add support for custom section anchors (#1179) This allows to have stable anchors for groups, even if the set of groups in the documentation is altered. The syntax for setting the anchor of a group is -- * Group name #desiredAnchor# Which will produce an html anchor of the form '#g:desiredAnchor' Co-authored-by: Iñaki García Etxebarria <git at inaki.blueleaf.cc> - - - - - 4003c97a by Ben Gamari at 2020-04-26T09:35:15-04:00 Merge pull request haskell/haddock#1166 from hsyl20/wip/hsyl20/modules/utils Module structure - - - - - 5206ab60 by Sylvain Henry at 2020-04-27T16:47:39+02:00 Renamed UnitInfo fields - - - - - c32c333b by Sylvain Henry at 2020-04-27T17:32:58+02:00 UnitId has been renamed into Unit - - - - - 3e87db64 by Sylvain Henry at 2020-04-27T17:36:00+02:00 Fix for GHC.Unit.* modules - - - - - ae3323a7 by Ben Gamari at 2020-04-29T12:36:37-04:00 Merge pull request haskell/haddock#1183 from hsyl20/wip/hsyl20/unitid Refactoring of Unit code - - - - - b105564a by Artem Pelenitsyn at 2020-05-03T08:14:10+01:00 add dependency on exceptions because GHC.Exception was boiled down (ghc haskell/haddock#18075) - - - - - 9857eff3 by Zubin Duggal at 2020-05-04T18:48:25+01:00 Atomic update of NameCache in readHieFile - - - - - 86bbb226 by Sylvain Henry at 2020-05-14T16:36:27+02:00 Fix after Config module renaming - - - - - a4bbdbc2 by Gert-Jan Bottu at 2020-05-15T22:09:44+02:00 Explicit Specificity Support for Haddock - - - - - 46199daf by Ben Gamari at 2020-05-19T09:59:56-04:00 Merge pull request haskell/haddock#1192 from hsyl20/hsyl20/modules-config Fix after Config module renaming - - - - - f9a9d2ba by Gert-Jan Bottu at 2020-05-20T16:48:38-04:00 Explicit Specificity Support for Haddock - - - - - 55c5b7ea by Ben Gamari at 2020-05-21T00:32:02-04:00 Merge commit 'a8d7e66da4dcc3b242103271875261604be42d6e' into ghc-head - - - - - a566557f by Cale Gibbard at 2020-05-21T16:02:06-04:00 isBootSummary now produces a result of type IsBootInterface - - - - - ea52f905 by Zubin Duggal at 2020-05-24T17:55:48+01:00 update for hiefile-typeclass-info - - - - - 49ba7a67 by Willem Van Onsem at 2020-05-25T12:23:01-04:00 Use floor over round to calculate the percentage (#1195) If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes haskell/haddock#1194 - - - - - c025ebf1 by Ben Gamari at 2020-05-29T14:32:42-04:00 Merge pull request haskell/haddock#1185 from obsidiansystems/boot-disambig isBootSummary now produces a result of type IsBootInterface - - - - - 74ab9415 by Ben Gamari at 2020-05-29T20:23:39-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - b40be944 by Ben Gamari at 2020-06-03T17:02:31-04:00 testsuite: Update expected output for simplified subsumption - - - - - 624be71c by Ryan Scott at 2020-06-05T12:43:23-04:00 Changes for GHC#18191 See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337. - - - - - fbd8f7ce by Sylvain Henry at 2020-06-08T15:31:47+02:00 Fix after unit refactoring - - - - - 743fda4d by Ben Gamari at 2020-06-09T12:09:58-04:00 Merge pull request haskell/haddock#1202 from hsyl20/wip/hsyl20/unitid-ii Fix after unit refactoring - - - - - d07a06a9 by Ryan Scott at 2020-06-13T07:16:55-04:00 Use HsForAllTelescope (GHC#18235) - - - - - 389bb60d by Ben Gamari at 2020-06-13T15:30:52-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - 7a377f5f by Ben Gamari at 2020-06-17T14:53:16-04:00 Merge pull request haskell/haddock#1199 from bgamari/wip/ghc-8.12 haddock: Bounds bumps for GHC 8.12 - - - - - 9fd9e586 by Krzysztof Gogolewski at 2020-06-17T16:09:07-04:00 Adapt Haddock to LinearTypes See ghc/ghc!852. - - - - - 46fe7636 by Ben Gamari at 2020-06-18T14:20:02-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 35a3c9e2 by Zubin Duggal at 2020-06-21T21:19:18+05:30 Use functions exported from HsToCore - - - - - 8abe3928 by Ben Gamari at 2020-06-24T13:53:39-04:00 Merge pull request haskell/haddock#1204 from wz1000/wip/haddock-hstocore Use functions exported from GHC.HsToCore.Docs - - - - - 22f2c937 by Matthías Páll Gissurarson at 2020-06-26T19:07:03+02:00 Adapt Haddock for QualifiedDo - - - - - 3f6208d7 by Vladislav Zavialov at 2020-06-28T14:28:16+03:00 Handle LexicalNegation's ITprefixminus - - - - - 03a19f41 by Sylvain Henry at 2020-07-02T09:37:38+02:00 Rename hsctarget into backend - - - - - ea17ff23 by Andreas Klebinger at 2020-07-02T17:44:18+02:00 Update for UniqFM changes. - - - - - 9872f2f3 by Ben Gamari at 2020-07-09T10:39:19-04:00 Merge pull request haskell/haddock#1209 from AndreasPK/wip/typed_uniqfm Update for UniqFM changes. - - - - - 68f7b668 by Krzysztof Gogolewski at 2020-07-12T18:16:57+02:00 Sync with GHC removing {-# CORE #-} pragma See ghc ticket haskell/haddock#18048 - - - - - eb372681 by Sylvain Henry at 2020-07-20T11:41:30+02:00 Rename hscTarget into backend - - - - - fb7f78bf by Ben Gamari at 2020-07-21T12:15:25-04:00 Merge pull request haskell/haddock#1214 from hsyl20/wip/hsyl20/hadrian/ncg Rename hscTarget into backend - - - - - 1e8f5b56 by Ben Gamari at 2020-07-23T09:11:50-04:00 Merge commit '904dce0cafe0a241dd3ef355775db47fc12f434d' into ghc-head - - - - - d8fd1775 by Zubin Duggal at 2020-07-23T18:46:40+05:30 Update for modular ping pong - - - - - 8416f872 by Ben Gamari at 2020-07-23T09:35:03-04:00 Merge pull request haskell/haddock#1200 from wz1000/wip/wz1000-modular-ping-pong Modular ping pong - - - - - a24a8577 by Ben Gamari at 2020-07-28T15:23:36-04:00 Bump GHC version to 9.0 - - - - - 6a51c9dd by Sylvain Henry at 2020-08-05T18:47:05+02:00 Fix after Outputable refactoring - - - - - c05e1c99 by Ben Gamari at 2020-08-10T14:41:41-04:00 Merge pull request haskell/haddock#1223 from hsyl20/wip/hsyl20/dynflags/exception Fix after Outputable refactoring - - - - - d964f15b by Sylvain Henry at 2020-08-12T11:58:49+02:00 Fix after HomeUnit - - - - - 8e6d5b23 by Ben Gamari at 2020-08-12T14:25:30-04:00 Merge pull request haskell/haddock#1225 from hsyl20/wip/hsyl20/plugins/homeunit Fix after HomeUnit - - - - - 8c7880fe by Sylvain Henry at 2020-08-17T14:13:29+02:00 Remove Ord FastString instance - - - - - 8ea410db by Alex Biehl at 2020-08-19T10:56:32+02:00 Another round of `npm audit fix` (#1228) This should shut down the warnings on Github. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. Last NPM dependency audit happend in d576b2327e2bc117f912fe0a9d595e9ae62614e0 Co-authored-by: Alex Biehl <alex.biehl at target.com> - - - - - 7af6e2a8 by Ben Gamari at 2020-08-31T13:59:34-04:00 Merge pull request haskell/haddock#1226 from hsyl20/wip/hsyl20/fs_ord Remove Ord FastString instance - - - - - ffbc8702 by Alan Zimmerman at 2020-09-07T21:47:41+01:00 Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - a93f1268 by Alan Zimmerman at 2020-09-07T23:11:38+01:00 Merge pull request haskell/haddock#1232 from haskell/wip/T18639-remove-generated-pragma, Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - 1f605d50 by Ben Gamari at 2020-09-14T18:30:01-04:00 Bump GHC version to 9.1 - - - - - 6599df62 by Vladislav Zavialov at 2020-09-18T14:05:15+03:00 Bump base upper bound to 4.16 - - - - - a01b3c43 by Ben Gamari at 2020-09-22T15:41:48-04:00 Update hypsrc-test for QuickLook This appears to be a spurious change. - - - - - e9cc6cac by Vladislav Zavialov at 2020-09-26T21:00:12+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 30e3ca7c by Sylvain Henry at 2020-09-29T11:18:32-04:00 Update for parser (#1234) - - - - - b172f3e3 by Vladislav Zavialov at 2020-09-30T01:01:30+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 0b9c08d3 by Sylvain Henry at 2020-09-30T11:02:33+02:00 Adapt to GHC parser changes - - - - - b9540b7a by Sylvain Henry at 2020-10-12T09:13:38-04:00 Don't pass the HomeUnitId (#1239) - - - - - 34762e80 by HaskellMouse at 2020-10-13T12:58:04+03:00 Changed tests due to unification of `Nat` and `Natural` in the follwing merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583 - - - - - 256f86b6 by Vladislav Zavialov at 2020-10-15T10:48:03+03:00 Add whitespace in: map ($ v) - - - - - 4a3f711b by Alan Zimmerman at 2020-10-19T08:57:27+01:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled - - - - - 072cdd21 by Alan Zimmerman at 2020-10-21T14:48:28-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 9e09a445 by Alan Zimmerman at 2020-10-21T23:53:34-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 636d7de3 by Sylvain Henry at 2020-10-26T14:31:54-04:00 GHC.Driver.Types refactoring (#1242) - - - - - a597f000 by Ryan Scott at 2020-10-29T04:18:05-04:00 Adapt to the removal of Hs{Boxed,Constraint}Tuple See ghc/ghc!4097 and GHC#18723. - - - - - b96660fb by Ryan Scott at 2020-10-30T04:53:05-04:00 Adapt to HsConDecl{H98,GADT}Details split Needed for GHC#18844. - - - - - c287d82c by Ryan Scott at 2020-10-30T19:35:59-04:00 Adapt to HsOuterTyVarBndrs These changes accompany ghc/ghc!4107, which aims to be a fix for haskell/haddock#16762. - - - - - a34c31a1 by Ryan Scott at 2020-11-13T13:38:34-05:00 Adapt to splitPiTysInvisible being renamed to splitInvisPiTys This is a part of !4434, a fix for GHC#18939. - - - - - 66ea459d by Sylvain Henry at 2020-11-16T10:59:30+01:00 Fix after Plugins moved into HscEnv - - - - - 508556d8 by Ben Gamari at 2020-11-18T15:47:40-05:00 Merge pull request haskell/haddock#1253 from hsyl20/wip/hsyl20/plugins/hscenv Fix after Plugins moved into HscEnv - - - - - 620fec1a by Andreas Klebinger at 2020-11-24T20:51:59+01:00 Update for changes in GHC's Pretty - - - - - 01cc13ab by Richard Eisenberg at 2020-11-25T23:18:35-05:00 Avoid GHC#18932. - - - - - 8d29ba21 by Cale Gibbard at 2020-11-25T23:18:35-05:00 Add type arguments to PrefixCon - - - - - 414d5f87 by Sylvain Henry at 2020-11-30T17:06:04+01:00 DynFlags's unit fields moved to HscEnv - - - - - e356668c by Ben Gamari at 2020-11-30T11:11:37-05:00 Merge pull request haskell/haddock#1258 from hsyl20/wip/hsyl20/hscenv/unitstate Unit fields moved from DynFlags to HscEnv - - - - - 7cf552f1 by Ben Gamari at 2020-12-03T10:31:27-05:00 Merge pull request haskell/haddock#1257 from AndreasPK/wip/andreask/opt_dumps Update for changes in GHC's Pretty - - - - - fc0871c3 by Veronika Romashkina at 2020-12-08T16:35:33+01:00 Fix docs links from Darcs to GitHub in intro (#1262) - - - - - 7059e808 by Veronika Romashkina at 2020-12-08T16:36:16+01:00 Use gender neutral word in docs (#1260) - - - - - 1b16e5ee by Maximilian Tagher at 2020-12-08T16:40:03+01:00 Allow scrolling search results (#1235) Closes https://github.com/haskell/haddock/issues/1231 - - - - - 8a118c01 by dependabot[bot] at 2020-12-08T16:40:25+01:00 Bump bl from 1.2.2 to 1.2.3 in /haddock-api/resources/html (#1255) Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - c89ff587 by Xia Li-yao at 2020-12-08T16:42:17+01:00 Allow more characters in anchor following module reference (#1220) - - - - - 14af7d64 by Xia Li-yao at 2020-12-08T16:43:05+01:00 Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243) * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt at mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem at users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard at tweag.io> Co-authored-by: Pepe Iborra <pepeiborra at gmail.com> - - - - - 89e3af13 by tomjaguarpaw at 2020-12-08T18:00:04+01:00 Enable two warnings (#1245) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - c3320f8d by Willem Van Onsem at 2020-12-08T18:26:55+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 685df308 by Alex Biehl at 2020-12-08T20:06:26+01:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - be3ec3c0 by Alex Biehl at 2020-12-08T20:06:26+01:00 Import intercalate - - - - - 32c33912 by Matthías Páll Gissurarson at 2020-12-08T21:15:30+01:00 Adapt Haddock for QualifiedDo - - - - - 31696088 by Alex Biehl at 2020-12-08T22:06:02+01:00 Fix haddock-library tests - - - - - fbc0998a by Alex Biehl at 2020-12-08T23:08:23+01:00 Move to GitHub CI (#1266) * Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell at v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up - - - - - 5b946b9a by tomjaguarpaw at 2020-12-10T19:01:41+01:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - bc5a408f by dependabot[bot] at 2020-12-10T19:02:16+01:00 Bump ini from 1.3.5 to 1.3.7 in /haddock-api/resources/html (#1269) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - d02995f1 by Andrew Martin at 2020-12-14T16:48:40-05:00 Update for boxed rep - - - - - a381aeff by Ben Gamari at 2020-12-15T15:13:30-05:00 Revert "Enable two warnings (#1245) (#1268)" As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce. - - - - - a63c0a9e by Ben Gamari at 2020-12-15T15:17:59-05:00 Revert "Update for boxed rep" This reverts commit 4ffb30d8b637ccebecc81ce610f0af451ac8088d. - - - - - 53bfbb29 by Ben Gamari at 2020-12-15T15:37:24-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - bae76a30 by Ben Gamari at 2020-12-16T02:44:42+00:00 Update output for nullary TyConApp optimisation (ghc/ghc!2952) - - - - - 4b733b57 by Krzysztof Gogolewski at 2020-12-16T20:03:14+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. - - - - - ee463bd3 by Ryan Scott at 2020-12-16T16:55:23-05:00 Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonym Needed for !4417, the fix for GHC#15706 and GHC#18914. - - - - - ed0b02f8 by tomjaguarpaw at 2020-12-19T10:17:19+00:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - d80bf8f5 by Sylvain Henry at 2020-12-21T10:09:25+01:00 Fix after binder collect changes - - - - - bf4c9d32 by Adam Gundry at 2020-12-23T21:35:01+00:00 Adapt to changes to GlobalRdrElt and AvailInfo Needed for ghc/ghc!4467 - - - - - 37736c4c by John Ericson at 2020-12-28T12:27:02-05:00 Support a new ghc --make node type for parallel backpack upsweep - - - - - 717bdeac by Vladislav Zavialov at 2020-12-29T10:50:02+03:00 Inline and fix getGADTConTypeG The getGADTConTypeG used HsRecTy, which is at odds with GHC issue haskell/haddock#18782. I noticed that getGADTConTypeG was only used in the Hoogle backend. Interestingly, when handling H98 constructors, Hoogle converts RecCon to PrefixCon (see Haddock.Backends.Hoogle.ppCtor). So I changed getGADTConTypeG to handle RecConGADT in the same manner as PrefixConGADT, and after this simplification moved it into the 'where' clause of ppCtor, to the only place where it is used. The practical effect of this change is as follows. Consider this example: data TestH98 = T98 { bar::Int } data TestGADT where TG :: { foo :: Int } -> TestGADT Before this patch, haddock --hoogle used to produce: T98 :: Int -> TestH98 [TG] :: {foo :: Int} -> TestGADT Notice how the record syntax was discarded in T98 but not TG. With this patch, we always produce signatures without record syntax: T98 :: Int -> TestH98 [TG] :: Int -> TestGADT I suspect this might also be a bugfix, as currently Hoogle doesn't seem to render GADT record constructors properly. - - - - - cb1b8c56 by Andreas Abel at 2020-12-30T21:12:37+01:00 Build instructions: haddock-library and -api first! - - - - - b947f6ad by Ben Gamari at 2020-12-31T13:04:19-05:00 Merge pull request haskell/haddock#1281 from obsidiansystems/wip/backpack-j Changes to support -j with backpack - - - - - 120e1cfd by Hécate Moonlight at 2021-01-04T19:54:58+01:00 Merge pull request haskell/haddock#1282 from andreasabel/master Build instructions: haddock-library and -api first! - - - - - fd45e41a by Ben Gamari at 2021-01-05T16:14:31-05:00 Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0 - - - - - b471bdec by Ben Gamari at 2021-01-05T16:23:02-05:00 Merge commit '1e56f63c3197e7ca1c1e506e083c2bad25d08793' into ghc-9.0 - - - - - 81cdbc41 by Alex Biehl at 2021-01-09T12:14:41+01:00 Prepare Haddock for being a GHC Plugin - - - - - b646d952 by Alex Biehl at 2021-01-09T12:14:41+01:00 Make Haddock a GHC Plugin - - - - - cc044674 by Alex Biehl at 2021-01-09T12:14:41+01:00 Add -j[n] CLI param to Haddock executable It translates to `--ghcopt=-j[n]` - - - - - 84a04073 by Alex Biehl at 2021-01-09T12:14:41+01:00 Abstract Monad for interface creation I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName. - - - - - 5be2c4f7 by Alex Biehl at 2021-01-09T12:14:41+01:00 Accept tests - - - - - 8cefee9d by Alex Biehl at 2021-01-09T16:10:47+01:00 Add missing dependency for mtl - - - - - 3681f919 by Ben Gamari at 2021-01-13T18:39:25-05:00 Merge remote-tracking branch 'origin/ghc-9.0' into ghc-head - - - - - 33c6b152 by Hécate Moonlight at 2021-01-14T16:04:20+01:00 Merge pull request haskell/haddock#1273 from hsyl20/wip/hsyl20/arrows Fix after binder collect changes - - - - - 70d13e8e by Joachim Breitner at 2021-01-22T19:03:45+01:00 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) - - - - - 7d6dd57a by John Ericson at 2021-01-22T22:02:02+00:00 Add `NoGhcTc` instance now that it's not closed - - - - - e5fdaf0a by Alan Zimmerman at 2021-01-23T22:57:44+00:00 Merge pull request haskell/haddock#1293 from obsidiansystems/wip/fix-18936 Add `NoGhcTc` instance now that it's not closed - - - - - 989a1e05 by Oleg Grenrus at 2021-01-24T16:11:46+03:00 Add import list to Data.List - - - - - 368e144a by Ben Gamari at 2021-01-28T22:15:48+01:00 Adapt to "Make PatSyn immutable" - - - - - abe66c21 by Alfredo Di Napoli at 2021-02-01T08:05:35+01:00 Rename pprLogErrMsg to new name - - - - - e600e75c by Hécate Moonlight at 2021-02-05T14:53:00+01:00 Move CI to ghc-9.0 - - - - - dd492961 by Vladislav Zavialov at 2021-02-05T14:53:00+01:00 Update cabal.project and README build instructions - - - - - 31bd292a by Hécate Moonlight at 2021-02-05T15:03:56+01:00 Merge pull request haskell/haddock#1296 from Kleidukos/ghc-9.0 Merge the late additions to ghc-8.10 into ghc-9.0 - - - - - 6388989e by Vladislav Zavialov at 2021-02-05T17:41:57+03:00 Cleanup: fix build warnings - - - - - f99407ef by Daniel Rogozin at 2021-02-05T18:11:48+03:00 type level characters support for haddock (required for haskell/haddock#11342) - - - - - d8c6b26f by Hécate Moonlight at 2021-02-05T17:44:50+01:00 Add a CONTRIBUTING.md file - - - - - 6a01ad98 by Hécate Moonlight at 2021-02-05T17:58:16+01:00 Merge pull request haskell/haddock#1312 from Kleidukos/proper-branch-etiquette Add a CONTRIBUTING.md file - - - - - 955eecc4 by Vladislav Zavialov at 2021-02-05T20:29:00+03:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into ghc-head - - - - - 47b3d6ab by Hécate Moonlight at 2021-02-05T19:09:38+01:00 Amend the CONTRIBUTING.md file - - - - - 23de6137 by Hécate Moonlight at 2021-02-05T19:16:49+01:00 Merge pull request haskell/haddock#1313 from Kleidukos/amend-contributing Amend the CONTRIBUTING.md file - - - - - 69026b59 by Krzysztof Gogolewski at 2021-02-05T23:05:56+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb) - - - - - ea026b78 by Oleg Grenrus at 2021-02-06T17:14:45+01:00 Add import list to Data.List - - - - - 5204326f by Hécate Moonlight at 2021-02-06T17:15:44+01:00 Merge pull request haskell/haddock#1316 from Kleidukos/explicit-imports-to-data-list Add import list to Data.List - - - - - 1f4d2136 by Ben Gamari at 2021-02-06T11:53:31-05:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge - - - - - 13f0d09a by Ben Gamari at 2021-02-06T11:53:45-05:00 Fix partial record selector warning - - - - - 5c115f7e by Ben Gamari at 2021-02-06T11:55:52-05:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into wip/ghc-head-merge - - - - - b6fd8b75 by Ben Gamari at 2021-02-06T12:01:31-05:00 Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-merge - - - - - a967194c by Ben Gamari at 2021-02-06T18:30:35-05:00 Merge branch 'wip/ghc-head-merge' into ghc-head - - - - - 1f4c3a91 by MorrowM at 2021-02-07T01:52:33+02:00 Fix search div not scrolling - - - - - 684b1287 by Iñaki García Etxebarria at 2021-02-07T16:13:04+01:00 Add support for labeled module references Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label". - - - - - bdb55a5d by Hécate Moonlight at 2021-02-07T16:18:10+01:00 Merge pull request haskell/haddock#1319 from alexbiehl/alex/compat Backward compat: Add support for labeled module references - - - - - 6ca70991 by Hécate Moonlight at 2021-02-07T16:21:29+01:00 Merge pull request haskell/haddock#1314 from tweag/show-linear-backport Backport haskell/haddock#1238 (linear types) to ghc-9.0 - - - - - d9d73298 by Alex Biehl at 2021-02-07T17:46:25+01:00 Remove dubious parseModLink Instead construct the ModLink value directly when parsing. - - - - - 33b4d020 by Hécate Moonlight at 2021-02-07T17:52:05+01:00 Merge pull request haskell/haddock#1320 from haskell/alex/fix Remove dubious parseModLink - - - - - 54211316 by Hécate Moonlight at 2021-02-07T18:12:07+01:00 Merge pull request haskell/haddock#1318 from MorrowM/ghc-9.0 Fix search div not scrolling - - - - - 19db679e by alexbiehl-gc at 2021-02-07T18:14:46+01:00 Merge pull request haskell/haddock#1317 from bgamari/wip/ghc-head-merge Merge ghc-8.10 into ghc-head - - - - - 6bc1e9e4 by Willem Van Onsem at 2021-02-07T18:25:30+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - c8537cf8 by alexbiehl-gc at 2021-02-07T18:30:40+01:00 Merge pull request haskell/haddock#1322 from haskell/alex/forward-port simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 2d47ae4e by alexbiehl-gc at 2021-02-07T18:39:59+01:00 Merge branch 'ghc-head' into ghc-9.0 - - - - - 849e4733 by Hécate Moonlight at 2021-02-07T18:43:19+01:00 Merge pull request haskell/haddock#1321 from Kleidukos/ghc-9.0 Merge ghc-9.0 into ghc-head - - - - - ee6095d7 by Sylvain Henry at 2021-02-08T11:36:38+01:00 Update for Logger - - - - - 4ad688c9 by Alex Biehl at 2021-02-08T18:11:24+01:00 Merge pull request haskell/haddock#1310 from hsyl20/wip/hsyl20/logger2 Logger refactoring - - - - - 922a9e0e by Ben Gamari at 2021-02-08T12:54:33-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - 991649d2 by Sylvain Henry at 2021-02-09T10:55:17+01:00 Fix to build with HEAD - - - - - a8348dc2 by Hécate Moonlight at 2021-02-09T10:58:51+01:00 Merge pull request haskell/haddock#1327 from hsyl20/wip/hsyl20/logger2 Fix to build with HEAD - - - - - 0abdbca6 by Fendor at 2021-02-09T20:06:15+01:00 Add UnitId to Target record - - - - - d5790a0e by Alex Biehl at 2021-02-11T10:32:32+01:00 Stable sort for (data/newtype) instances - - - - - 8e6036f5 by Alex Biehl at 2021-02-11T10:32:32+01:00 Also make TyLit deterministic - - - - - f76d2945 by Hécate Moonlight at 2021-02-11T11:00:31+01:00 Merge pull request haskell/haddock#1329 from hsyl20/hsyl20/stabe_iface Stable sort for instances - - - - - 5e0469ea by Oleg Grenrus at 2021-02-14T15:28:15+02:00 Add import list to Data.List in Haddock.Interface.Create - - - - - fa57cd24 by Hécate Moonlight at 2021-02-14T17:19:27+01:00 Merge pull request haskell/haddock#1331 from phadej/more-explicit-data-list-imports Add import list to Data.List in Haddock.Interface.Create - - - - - f0cd629c by Hécate Moonlight at 2021-02-21T00:22:01+01:00 Merge pull request haskell/haddock#1311 from fendor/wip/add-targetUnitId-to-target Add UnitId to Target record - - - - - 674ef723 by Joachim Breitner at 2021-02-22T10:39:18+01:00 html-test: Always set language from ghc-9.2 on, the “default” langauge of GHC is expected to change more wildly. To prepare for that (and unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4853), this sets the language for all the test files to `Haskell2010`. This should insolate this test suite against changes to the default. Cherry-picked from https://github.com/haskell/haddock/pull/1341 - - - - - f072d623 by Hécate Moonlight at 2021-02-22T10:56:51+01:00 Merge pull request haskell/haddock#1342 from nomeata/joachim/haskell2010-in-tests-ghc-head html-test: Always set language - - - - - caebbfca by Hécate Moonlight at 2021-02-22T11:53:07+01:00 Clean-up of Interface and Interface.Create's imports and pragmata - - - - - f6caa89d by Hécate Moonlight at 2021-02-22T11:54:58+01:00 Merge pull request haskell/haddock#1345 from Kleidukos/head/fix-interface-imports [ghc-head] Clean-up of Interface and Interface.Create's imports and pragmata - - - - - 7395c9cb by Hécate Moonlight at 2021-02-22T18:44:57+01:00 Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 6e9fb5d5 by Hécate Moonlight at 2021-02-22T18:45:28+01:00 Merge pull request haskell/haddock#1348 from Kleidukos/head/explicit-imports-interface Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 9198b118 by Alan Zimmerman at 2021-02-22T20:04:24+00:00 Context becomes a Maybe in the GHC AST This prevents noLoc's appearing in the ParsedSource. Match the change in GHC. - - - - - 0af20f64 by Hécate Moonlight at 2021-02-23T12:36:12+01:00 Fix the call-site of guessTarget in Interface.hs Explicit the imports from GHC.HsToCore.Docs - - - - - b7886885 by Hécate Moonlight at 2021-02-23T12:37:54+01:00 Merge pull request haskell/haddock#1349 from Kleidukos/fix-interface-guesstarget-call Fix the call-site of guessTarget in Interface.hs - - - - - 9cf041ba by Sylvain Henry at 2021-02-24T11:08:20+01:00 Fix haddockHypsrcTest output in ghc-head - - - - - b194182a by Hécate Moonlight at 2021-02-24T11:12:36+01:00 Merge pull request haskell/haddock#1351 from hsyl20/wip/hsyl20/fix-head Fix haddockHypsrcTest output in ghc-head - - - - - 3ce8b375 by Shayne Fletcher at 2021-03-06T09:55:03-05:00 Add ITproj to parser - - - - - d2abf762 by Ben Gamari at 2021-03-06T19:26:49-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a0f6047d by Andrew Martin at 2021-03-07T11:25:23-05:00 Update for boxed rep - - - - - 6f63c99e by Ben Gamari at 2021-03-10T13:20:21-05:00 Update for "FastString: Use FastMutInt instead of IORef Int" - - - - - e13f01df by Luke Lau at 2021-03-10T15:38:40-05:00 Implement template-haskell's putDoc This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int - - - - - 89263d94 by Alan Zimmerman at 2021-03-15T17:15:26+00:00 Match changes in GHC AST for in-tree API Annotations As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418 - - - - - 28db1934 by Alan Zimmerman at 2021-03-15T20:40:09+00:00 Change some type family test results. It is not clear to me whether the original was printing incorrectly (since we did not have the TopLevel flag before now), or if this behaviour is expected. For the time being I am assuming the former. - - - - - 7c11c989 by Sylvain Henry at 2021-03-22T10:05:19+01:00 Fix after NameCache changes - - - - - addbde15 by Sylvain Henry at 2021-03-22T10:05:19+01:00 NameCache doesn't store a UniqSupply anymore - - - - - 15ec6cec by Ben Gamari at 2021-03-22T17:53:44-04:00 Bump GHC version to 9.2 - - - - - dbd6aa63 by Hécate Moonlight at 2021-03-24T14:28:36+01:00 Merge pull request haskell/haddock#1365 from hsyl20/wip/hsyl20/iface1 NameCache refactoring - - - - - 2d32da7e by Oleg Grenrus at 2021-03-27T01:12:00+02:00 Specialization of Data.List - - - - - 32b84fa6 by Fendor at 2021-03-27T10:50:17+01:00 Add UnitId to Target record This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time. - - - - - 54bf9f0e by Hécate Moonlight at 2021-03-28T14:08:35+02:00 Merge pull request haskell/haddock#1368 from fendor/target-unit-id-revert Add UnitId to Target record - - - - - 7dea168a by Alan Zimmerman at 2021-03-29T08:45:52+01:00 EPA : Rename ApiAnn to EpAnn - - - - - 72967f65 by Alfredo Di Napoli at 2021-03-29T09:47:01+02:00 pprError changed name in GHC - - - - - 4bc61035 by Alan Zimmerman at 2021-03-29T16:16:27-04:00 EPA : Rename ApiAnn to EpAnn - - - - - 108d031d by Ben Gamari at 2021-03-29T18:49:36-04:00 Merge commit '36418c4f70d7d2b179a77925b3ad5caedb08c9b5' into HEAD - - - - - 1444f700 by Ben Gamari at 2021-03-31T09:18:39-04:00 Merge pull request haskell/haddock#1370 from adinapoli/wip/adinapoli-diag-reason-severity Rename pprError to mkParserErr - - - - - d3087b79 by Ben Gamari at 2021-03-31T11:34:17-04:00 Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head - - - - - 170b79e9 by Ben Gamari at 2021-03-31T12:24:56-04:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - db0d6bae by Ben Gamari at 2021-04-10T09:34:35-04:00 Bump GHC version to 9.3 - - - - - a9f2c421 by Alan Zimmerman at 2021-04-19T18:26:46-04:00 Update for EPA changes in GHC (cherry picked from commit cafb48118f7c111020663776845897e225607b41) - - - - - 1ee4b7c7 by Sylvain Henry at 2021-05-11T10:00:06+02:00 Removal of HsVersions.h (#1388) * Update for EPA changes in GHC * Account for HsVersions.h removal Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 79e819e9 by Hécate Moonlight at 2021-05-11T10:14:47+02:00 Revert "Removal of HsVersions.h (#1388)" This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6. - - - - - 3dbd3f8b by Alan Zimmerman at 2021-05-11T10:15:17+02:00 Update for EPA changes in GHC - - - - - 2ce80c17 by Sylvain Henry at 2021-05-11T10:15:19+02:00 Account for HsVersions.h removal - - - - - 00e4c918 by Christiaan Baaij at 2021-05-13T08:21:56+02:00 Add Haddock support for the OPAQUE pragma (#1380) - - - - - 8f9049b2 by Hécate Moonlight at 2021-05-13T08:40:22+02:00 fixup! Use GHC 9.2 in CI runner - - - - - 27ddec38 by Alan Zimmerman at 2021-05-13T22:51:20+01:00 EPA: match changes from GHC T19834 - - - - - f8a1d714 by Felix Yan at 2021-05-14T17:10:04+02:00 Allow hspec 2.8 (#1389) All tests are passing. - - - - - df44453b by Divam Narula at 2021-05-20T15:42:42+02:00 Update ref, the variables got renamed. (#1391) This is due to ghc/ghc!5555 which caused a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used. - - - - - e46bfc87 by Alan Zimmerman at 2021-05-20T19:05:09+01:00 Remove Maybe from HsQualTy Match changes in GHC for haskell/haddock#19845 - - - - - 79bd7b62 by Shayne Fletcher at 2021-05-22T08:20:39+10:00 FieldOcc: rename extFieldOcc to foExt - - - - - 6ed68c74 by Ben Gamari at 2021-05-21T22:29:30-04:00 Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head - - - - - f9a02d34 by Alfredo Di Napoli at 2021-05-24T13:53:00+02:00 New Parser diagnostics interface - - - - - 392807d0 by Ben Gamari at 2021-05-24T09:57:40-04:00 Merge pull request haskell/haddock#1394 from adinapoli/wip/adinapoli-align-ps-messages Align Haddock to use the new Parser diagnostics interface - - - - - 33023cd8 by Ben Gamari at 2021-05-24T11:19:16-04:00 Revert "Add Haddock support for the OPAQUE pragma (#1380)" This reverts commit a1337c599ef7720b0482a25c55f11794112496dc. The GHC patch associated with this change is not yet ready to be merged. - - - - - 8c005af7 by Ben Simms at 2021-05-28T07:56:20+02:00 CI configuration for ghc-head (#1395) - - - - - 1e947612 by Hécate Moonlight at 2021-05-28T12:27:35+02:00 Use GHC 9.2 in CI runner (#1378) - - - - - e6fa10ab by CGenie at 2021-05-31T09:02:13+02:00 Add page about common errors (#1396) * Update index.rst Common errors page * Create common-errors.rst * Update common-errors.rst * Use GHC 9.2 in CI runner (#1378) * [haddock-api] remove .hspec-failures Co-authored-by: Hécate Moonlight <Kleidukos at users.noreply.github.com> - - - - - abc72a8d by Sylvain Henry at 2021-06-01T10:02:06+02:00 Adapt Haddock to Logger and Parser changes (#1399) - - - - - 91373656 by Zubin Duggal at 2021-06-01T20:45:10+02:00 Update haddockHypSrc tests since we now compute slighly more type info (#1397) - - - - - ed712822 by Marcin Szamotulski at 2021-06-02T08:54:33+02:00 Added myself to contributors - - - - - 49fdbcb7 by Marcin Szamotulski at 2021-06-02T08:57:24+02:00 Document multi component support - - - - - 9ddc8d7d by Hécate Moonlight at 2021-06-02T09:35:55+02:00 Merge pull request haskell/haddock#1379 from coot/coot/document-multi-component-support Document multi component support - - - - - 585b5c5e by Ben Simms at 2021-06-02T19:46:54+02:00 Update CONTRIBUTING.md (#1402) - - - - - 1df4a605 by Ben Simms at 2021-06-02T19:47:14+02:00 Update CONTRIBUTING.md (#1403) - - - - - 58ea43d2 by sheaf at 2021-06-02T22:09:06+02:00 Update Haddock Bug873 to account for renaming - - - - - c5d0ab23 by Vladislav Zavialov at 2021-06-10T13:35:42+03:00 HsToken in FunTy, RecConGADT - - - - - 1ae2f40c by Hécate Moonlight at 2021-06-11T11:19:09+02:00 Update the CI badges - - - - - 6fdc4de2 by Sylvain Henry at 2021-06-28T19:21:17+02:00 Fix mkParserOpts (#1411) - - - - - 18201670 by Alfredo Di Napoli at 2021-07-05T07:55:12+02:00 Rename getErrorMessages Lexer import This commit renames the Lexer import in `Hyperlinker.Parser` from `getErrorMessages` to `getPsErrorMessages` to eliminate the ambiguity with the `getErrorMessages` function defined in `GHC.Types.Error`. - - - - - 23173ca3 by Ben Gamari at 2021-07-07T11:31:44-04:00 Merge pull request haskell/haddock#1413 from adinapoli/wip/adinapoli-issue-19920 Rename getErrorMessages Lexer import - - - - - b3dc4ed8 by Alan Zimmerman at 2021-07-28T22:30:59+01:00 EPA: match changes from GHC T19834 (cherry picked from commit 2fec1b44e0ee7e263286709aa528b4ecb99ac6c2) - - - - - 5f177278 by Ben Gamari at 2021-08-06T01:17:37-04:00 Merge commit '2a966c8ca37' into HEAD - - - - - cdd81d08 by Marcin Szamotulski at 2021-08-08T17:19:06+02:00 coot/multiple packages (ghc-9.2) (#1418) - - - - - be0d71f1 by Marcin Szamotulski at 2021-08-16T08:46:03+02:00 coot/multiple package (ghc-head) (#1419) * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".". - - - - - 3b09dbdf by Hécate Moonlight at 2021-10-07T23:26:03+02:00 Update GHC 9.2 to latest pre-release in CI - - - - - 7ac55417 by Zubin Duggal at 2021-10-11T12:10:19+02:00 Enable Haddock tests in GHC windows CI (#1428) * testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC - - - - - 1cb81f25 by Andrew Lelechenko at 2021-10-12T15:23:19+02:00 haddock-library does not depend on bytestring or transformers (#1426) - - - - - a890b9aa by sheaf at 2021-10-15T22:19:42+02:00 update haddockHypsrcTest for GHC MR !6705 (#1430) - - - - - 42a55c6c by Sylvain Henry at 2021-10-15T22:20:10+02:00 Fix after PkgQual refactoring (#1429) - - - - - 91659238 by Alan Zimmerman at 2021-10-28T18:57:10+01:00 Update for changes in GHC for branch wip/az/no-srcspan-anno-instances - - - - - acf23e60 by Vladislav Zavialov at 2021-11-05T02:09:47+03:00 Do not use forall as an identifier See GHC ticket haskell/haddock#20609 - - - - - c565db0e by Krzysztof Gogolewski at 2021-11-27T02:42:35+01:00 Update after NoExtCon -> DataConCantHappen rename - - - - - b5f55590 by Artem Pelenitsyn at 2021-11-27T11:14:17+01:00 fix CI for 9.2 (#1436) - - - - - 25cd621e by Matthew Pickering at 2021-12-02T11:46:54+00:00 Update html-test for Data.List revert - - - - - 1d5ff85f by malteneuss at 2021-12-15T07:56:55+01:00 Add hint about inline link issue (#1444) - - - - - 791fde81 by Sylvain Henry at 2021-12-16T09:29:51+01:00 Bump ghc-head (#1445) * Update after NoExtCon -> DataConCantHappen rename * Update html-test for Data.List revert * Fix for new Plugins datatype Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 44236317 by Sylvain Henry at 2021-12-17T09:39:00+01:00 Fix for new Plugins datatype - - - - - 80ada0fa by Hécate Moonlight at 2021-12-17T17:28:48+01:00 Remove ghc-head workflow (#1446) Contributions of GHC glue code are now done on the GHC gitlab, not in the GitHub repo anymore. - - - - - 49e171cd by Matthew Pickering at 2021-12-28T09:47:09+00:00 Remove use of ExtendedModSummary - - - - - 0e91b5ea by askeblad at 2022-01-04T09:18:35+01:00 update URLs - - - - - 9f13c212 by Hécate Moonlight at 2022-02-25T10:19:46+01:00 Fix solver for GHC 9.2 - - - - - 386751a1 by Meng Weng Wong at 2022-02-25T19:19:11+01:00 IDoc link has bitrotted; replaced with web.archive.org cache. (#1454) - - - - - d877cbe6 by Hécate Moonlight at 2022-02-25T19:21:58+01:00 Fix haddock user guide (#1456) - - - - - cc47f036 by Andrew Lelechenko at 2022-03-04T17:29:36+01:00 Allow text-2.0 in haddock-library (#1459) - - - - - 7b3685a3 by malteneuss at 2022-03-07T19:27:24+01:00 Add multi-line style hint to style section (#1460) - - - - - c51088b8 by John Ericson at 2022-03-11T16:46:26+01:00 Fix CollectPass instance to match TTG refactor Companion to GHC !7614 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7614) - - - - - b882195b by Vladislav Zavialov at 2022-03-14T20:32:30+01:00 Link to (~) - - - - - 877349b8 by Christiaan Baaij at 2022-03-16T09:20:43+01:00 Add Haddock support for the OPAQUE pragma - - - - - 0ea22721 by askeblad at 2022-03-16T09:44:27+01:00 typos (#1464) - - - - - a6d13da1 by Matthew Pickering at 2022-03-22T13:41:17+00:00 Minimum changes needed for compilation with hi-haddock With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC. - - - - - e7ac9129 by Matthew Pickering at 2022-03-22T21:17:50+00:00 Update test output - - - - - 6d916214 by Matthew Pickering at 2022-03-24T15:06:26+00:00 Merge branch 'wip/opaque_pragma' into 'ghc-head' Add Haddock support for the OPAQUE pragma See merge request ghc/haddock!2 - - - - - 42208183 by Steve Hart at 2022-03-25T20:43:50+01:00 Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. - - - - - 9676fd79 by Steve Hart at 2022-03-25T21:33:34+01:00 Make links in Synopsis functional again (#1458) Commit e41c1cbe9f0476997eac7b4a3f17cbc6b2262faf added a call to e.preventDefault() when handling click events that reach a toggle element. This prevents the browser from following hyperlinks within the Synopsis section when they are clicked by a user. This commit restores functioning hyperlinks within the Synopsis section by removing the call to e.preventDefault(), as it does not appear to be necessary, and removing it increases the flexibility of the details-helper code. - - - - - d1edd637 by sheaf at 2022-04-01T12:02:02+02:00 Keep track of promotion ticks in HsOpTy Keeping track of promotion ticks in HsOpTy allows us to properly pretty-print promoted constructors such as lists. - - - - - 9dcb2dfc by Jakob Brünker at 2022-04-01T15:46:22+00:00 Add support for \cases See merge request ghc/ghc!7873 - - - - - b0412ee5 by askeblad at 2022-04-06T17:47:57+02:00 spelling errors (#1471) - - - - - 6b18829b by Vladislav Zavialov at 2022-04-06T18:53:58+02:00 Rename [] to List - - - - - 2d046691 by Vladislav Zavialov at 2022-04-07T20:25:54+03:00 HsToken ConDeclGADT con_dcolon - - - - - 90b43da4 by Steve Hart at 2022-04-12T13:29:46+02:00 Parse Markdown links at beginning of line within a paragraph (#1470) * Catch Markdown links at beginning of line within paragraph Per Issue haskell/haddock#774, Markdown links were being parsed as ordinary text when they occurred at the beginning of a line other than the first line of the paragraph. This occurred because the parser was not interpreting a left square bracket as a special character that could delimit special markup. A space character was considered a special character, so, if a space occurred at the beginning of the new line, then the parser would interpret the space by itself and then continue parsing, thereby catching the Markdown link. '\n' was not treated as a special character, so the parser did not catch a Markdown link that may have followed. Note that this will allow for Markdown links that are not surrounded by spaces. For example, the following text includes a Markdown link that will be parsed: Hello, world[label](url) This is consistent with how the parser handles other types of markup. * Remove obsolete documentation hint Commit 6b9aeafddf20efc65d3725c16e3fc43a20aac343 should eliminate the need for the workaround suggested in the documentation. - - - - - 5b08312d by Hécate Moonlight at 2022-04-12T13:36:38+02:00 Force ghc-9.2 in the cabal.project - - - - - 0d0ea349 by dependabot[bot] at 2022-04-12T13:57:41+02:00 Bump path-parse from 1.0.5 to 1.0.7 in /haddock-api/resources/html (#1469) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 2b9fc65e by dependabot[bot] at 2022-04-12T13:57:54+02:00 Bump copy-props from 2.0.4 to 2.0.5 in /haddock-api/resources/html (#1468) Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - ea98a6fb by Ben Gamari at 2022-04-23T22:54:37-04:00 Update for GHC 9.4 - - - - - 9e11864f by Ben Gamari at 2022-04-25T16:24:31-04:00 Merge remote-tracking branch 'upstream/ghc-9.2' into ghc-head - - - - - f83cc506 by Ben Gamari at 2022-04-25T17:00:25-04:00 Bump ghc version to 9.5 - - - - - e01c2e7d by Ben Gamari at 2022-04-28T16:19:04-04:00 Revert "Bump ghc-head (#1445)" This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2. This should not have been merged. - - - - - a2b5ee8c by Ben Gamari at 2022-04-28T16:19:24-04:00 Merge commit '2627a86c' into ghc-head - - - - - 0c6fe4f9 by Ben Gamari at 2022-04-29T10:05:54-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-9.4 - - - - - b6e5cb0a by Ben Gamari at 2022-04-29T11:46:06-04:00 Revert "HsToken ConDeclGADT con_dcolon" This reverts commit 24208496649a02d5f87373052c430ea4a97842c5. - - - - - 15a62888 by Ben Gamari at 2022-04-29T15:12:55-04:00 Bump base upper bound - - - - - 165b9031 by Ben Gamari at 2022-04-29T23:58:38-04:00 Update test output - - - - - e0c3e5da by Phil de Joux at 2022-05-02T14:46:38+02:00 Add hlint action .hlint.yaml with ignores & CPP. (#1475) - - - - - ead1158d by Raphael Das Gupta at 2022-05-02T14:46:48+02:00 fix grammar in docs: "can the" → "can be" (#1477) - - - - - cff97944 by Ben Gamari at 2022-05-02T18:38:56-04:00 Allow base-4.17 - - - - - e4ecb201 by Phil de Joux at 2022-05-03T13:14:55+02:00 Remove unused imports that GHC warned about. (#1480) - - - - - 222890b1 by Phil de Joux at 2022-05-03T13:15:46+02:00 Follow hlint suggestion to remove redundant bang. (#1479) - - - - - 058b671f by Phil de Joux at 2022-05-03T13:34:04+02:00 Follow hlint, remove language pragmas in libs. (#1478) - - - - - 0a645049 by Ben Simms at 2022-05-03T14:19:24+02:00 Keep track of ordered list indexes and render them (#1407) * Keep track of ordered list indexes and render them * Rename some identifiers to clarify - - - - - f0433304 by Norman Ramsey at 2022-05-04T15:13:34-04:00 update for changes in GHC API - - - - - 3740cf71 by Emily Martins at 2022-05-06T18:23:48+02:00 Add link to the readthedocs in cabal description to show on hackage. (cherry picked from commit 52e2d40d47295c02d3181aac0c53028e730f1e3b) - - - - - 5d754f1e by Hécate Moonlight at 2022-05-06T18:44:57+02:00 remove Bug873 - - - - - 968fc267 by Hécate Moonlight at 2022-05-06T18:48:28+02:00 Ignore "Use second" HLint suggestion. It increases laziness. - - - - - 02d14e97 by Jade Lovelace at 2022-05-07T17:42:08+02:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` - - - - - b22b87ed by Artem Pelenitsyn at 2022-05-08T16:19:47+02:00 fix parsing trailing quotes in backticked identifiers (#1408) (#1483) - - - - - 80ae107b by Alex Biehl at 2022-05-08T16:37:16+02:00 Fix "Defined by not used" error (cherry picked from commit 6e02a620a26c3a44f98675dd1b93b08070c36c0a) - - - - - 4c838e84 by Hécate Moonlight at 2022-05-08T16:37:16+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - fc9827b4 by Hécate Moonlight at 2022-05-08T16:40:40+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - b153b555 by Xia Li-yao at 2022-05-20T17:52:42+02:00 Hide synopsis from search when hidden (#1486) Fix haskell/haddock#1451 - - - - - f3e38b85 by Marcin Szamotulski at 2022-05-21T23:32:31+02:00 Allow to hide interfaces when rendering multiple components (#1487) This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package. - - - - - f942863b by Marcin Szamotulski at 2022-05-24T08:29:59+02:00 Check if doc-index.json exists before reading it (#1488) - - - - - 31e92982 by Marcin Szamotulski at 2022-05-25T16:22:13+02:00 Version bump 2.26.1 (#1489) * Version bump 2.26.1 We extended format accepted by `--read-interface` option, which requires updating the minor version. * Update documentation of --read-interface option - - - - - 7cc873e0 by sheaf at 2022-05-25T16:42:31+02:00 Updated HaddockHypsrcTest output for record update changes (MR !7981) - - - - - cd196942 by Marcin Szamotulski at 2022-05-25T20:28:47+02:00 Use visibility to decide which interfaces are included in quickjump (#1490) This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision. - - - - - 00c713c5 by Hécate Moonlight at 2022-05-26T17:09:15+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 2f3039f1 by Hécate Moonlight at 2022-05-26T17:10:59+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 63a5650c by romes at 2022-05-31T12:43:22+01:00 TTG: Match new GHC AST - - - - - dd7d1617 by romes at 2022-06-02T16:11:00+01:00 Update for IE changes in !8228 - - - - - c23aaab7 by cydparser at 2022-06-06T08:48:14+02:00 Fix and improve CI (#1495) * Pin GHC version before creating the freeze file * Use newest action versions * Improve caching * Avoid unnecessarily reinstalling GHC * Use GHC 9.2.2 for CI Co-authored-by: Cyd Wise <cwise at tripshot.com> - - - - - c156fa77 by Hécate Moonlight at 2022-06-06T11:59:35+02:00 Add Mergify configuration (#1496) - - - - - 2dba4188 by Hécate Moonlight at 2022-06-06T16:12:50+02:00 Bump haddock's version in cabal file to 2.26.1 (#1497) - - - - - d7d4b8b9 by Marcin Szamotulski at 2022-06-07T06:09:40+00:00 Render module tree per package in the content page (#1492) * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version. - - - - - 77765665 by Mike Pilgrem at 2022-06-12T21:57:19+01:00 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - b0e079b0 by mergify[bot] at 2022-06-13T11:49:37+00:00 Merge pull request haskell/haddock#1108 from mpilgrem/fix783 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - 6c0292b1 by Hécate Moonlight at 2022-06-21T17:21:08+02:00 Update the contribution guide - - - - - e413b9fa by dependabot[bot] at 2022-06-21T23:38:19+02:00 Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 29d0ef70 by romes at 2022-07-06T11:29:39+02:00 TTG: AST Updates for !8308 - - - - - 1bae7c87 by Alan Zimmerman at 2022-07-06T22:50:43+01:00 Match GHC changes for T21805 This brings in a newtype for FieldLabelString - - - - - 6fe8b988 by Phil de Joux at 2022-07-16T20:54:26+00:00 Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. - - - - - 48fb43af by Phil de Joux at 2022-07-19T09:32:55+02:00 Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. - - - - - c1cf1fa7 by Phil de Joux at 2022-07-24T13:45:59+02:00 Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. - - - - - 74777eb2 by Jade Lovelace at 2022-07-29T11:02:41+01:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` (cherry picked from commit ab53ccf089ea703b767581ac14be0f6c78a7678a) - - - - - faa4cfcf by Hécate Moonlight at 2022-07-29T20:31:20+02:00 Merge pull request haskell/haddock#1516 from duog/9-4-backport-fix-hyperlinks Backport 9-4: Fix hyperlinks to external items and modules (#1482) - - - - - 5d2450f3 by Ben Gamari at 2022-08-05T17:41:15-04:00 Merge remote-tracking branch 'origin/ghc-9.4' - - - - - 63954f73 by Ben Gamari at 2022-08-05T19:08:36-04:00 Clean up build and testsuite for GHC 9.4 - - - - - d4568cb8 by Hécate Moonlight at 2022-08-05T19:10:49-04:00 Bump the versions - - - - - 505583a4 by Ben Gamari at 2022-08-06T13:58:27-04:00 Merge pull request haskell/haddock#1518 from bgamari/wip/ghc-9.4-merge Merge GHC 9.4 into `main` - - - - - 5706f6a4 by Ben Gamari at 2022-08-06T22:57:21-04:00 html-test: Testsuite changes for GHC 9.4.1 - - - - - 5f2a45a2 by Ben Gamari at 2022-08-15T14:33:05-04:00 doc: Fix a few minor ReST issues Sphinx was complaining about too-short title underlines. - - - - - 220e6410 by Ben Gamari at 2022-08-15T14:41:24-04:00 Merge branch 'main' into ghc-head - - - - - fbeb1b02 by Ben Gamari at 2022-08-15T14:45:16-04:00 Updates for GHC 9.5 - - - - - eee562eb by Vladislav Zavialov at 2022-08-15T14:46:13-04:00 HsToken ConDeclGADT con_dcolon - - - - - c5f073db by Ben Gamari at 2022-08-15T16:55:35-04:00 Updates for GHC 9.5 - - - - - 3f7ab242 by Vladislav Zavialov at 2022-08-15T16:55:35-04:00 HsToken ConDeclGADT con_dcolon - - - - - a18e473d by Ben Gamari at 2022-08-16T08:35:19-04:00 Merge branch 'wip/ghc-head-bump' into ghc-head - - - - - af0ff3a4 by M Farkas-Dyck at 2022-09-15T21:16:05+00:00 Disuse `mapLoc`. - - - - - a748fc38 by Matthew Farkas-Dyck at 2022-09-17T10:44:18+00:00 Scrub partiality about `NewOrData`. - - - - - 2758fb6c by John Ericson at 2022-09-18T03:27:37+02:00 Test output changed because of change to `base` Spooky, but I guess that is intended? - - - - - a7eec128 by Torsten Schmits at 2022-09-21T11:06:55+02:00 update tests for the move of tuples to GHC.Tuple.Prim - - - - - 461e7b9d by Ross Paterson at 2022-09-24T22:01:25+00:00 match implementation of GHC proposal haskell/haddock#106 (Define Kinds Without Promotion) - - - - - f7fd77ef by sheaf at 2022-10-17T14:53:01+02:00 Update Haddock for GHC MR !8563 (configuration of diagnostics) - - - - - 3d3e85ab by Vladislav Zavialov at 2022-10-22T23:04:06+03:00 Class layout info - - - - - cbde4cb0 by Simon Peyton Jones at 2022-10-25T23:19:18+01:00 Adapt to Constraint-vs-Type See haskell/haddock#21623 and !8750 - - - - - 7108ba96 by Tom Smeding at 2022-11-01T22:33:23+01:00 Remove outdated footnote about module re-exports The footnote is invalid with GHC 9.2.4 (and possibly earlier): the described behaviour in the main text works fine. - - - - - 206c6bc7 by Hécate Moonlight at 2022-11-01T23:00:46+01:00 Merge pull request haskell/haddock#1534 from tomsmeding/patch-1 - - - - - a57b4c4b by Andrew Lelechenko at 2022-11-21T00:39:52+00:00 Support mtl-2.3 - - - - - e9d62453 by Simon Peyton Jones at 2022-11-25T13:49:12+01:00 Track small API change in TyCon.hs - - - - - eb1c73f7 by Ben Gamari at 2022-12-07T08:46:21-05:00 Update for GhC 9.6 - - - - - 063268dd by Ben Gamari at 2022-12-07T11:26:32-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 4ca722fe by Ben Gamari at 2022-12-08T14:43:26-05:00 Bump bounds to accomodate base-4.18 - - - - - 340b7511 by Vladislav Zavialov at 2022-12-10T12:31:28+00:00 HsToken in HsAppKindTy - - - - - 946226ec by Ben Gamari at 2022-12-13T20:12:56-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - fd8faa66 by Ben Gamari at 2022-12-22T13:44:28-05:00 Bump GHC version to 9.7 - - - - - 2958aa9c by Ben Gamari at 2022-12-22T14:49:16-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 9e0fefd8 by Andrei Borzenkov at 2023-01-30T14:02:04+04:00 Rename () to Unit, Rename (,,...,,) to Tuple<n> - - - - - eb3968b5 by Ben Gamari at 2023-03-10T02:32:43-05:00 Bump versions for ghc-9.6 release - - - - - 4aeead36 by Adam Gundry at 2023-03-23T13:53:47+01:00 Adapt to warning categories changes - - - - - 642d8d60 by sheaf at 2023-03-29T13:35:56+02:00 Adapt to record field refactor This commit adapts to the changes in GHC MR !8686, which overhauls the treatment of record fields in the renamer, adding separate record field namespaces and entirely removing the GreName datatype. - - - - - ac8d4333 by doyougnu at 2023-03-29T11:11:44-04:00 Update UniqMap API - - - - - 7866fc86 by Ben Orchard at 2023-04-20T11:29:33+02:00 update classify with new tokens - - - - - ffcdd683 by Finley McIlwaine at 2023-04-24T09:36:18-06:00 Remove index-state - - - - - 05b70982 by Finley McIlwaine at 2023-04-26T08:16:31-06:00 `renameInterface` space leak fixes - Change logic for accumulation of names for which link warnings will be generated - Change handling of `--ignore-link-symbol` to allow qualified and unqualified names. Added to CHANGES.md - Some formatting changes and comments here and there - - - - - e5697d7c by Finley McIlwaine at 2023-04-27T18:46:36-06:00 Messy things - ghc-debug dependency and instrumentation - cabal.project custom with-compiler - hie.yaml files - traces and such - - - - - 0b8ef80b by Finley McIlwaine at 2023-05-02T18:08:52-06:00 Stop retaining GRE closures GRE closures should never be necessary to Haddock, so we never want to keep them on the heap. Despite that, they are retained by a lot of the data structures that Haddock makes use of. - Attempt to fix that situation by adding strictness to various computations and pruning the `ifaceInstances` field of `Interface` to a much thinner data type. - Removes the `ifaceFamInstances` field, as it was never used. - Move some of the attach instances types (e.g. `SimpleType`) to the types module - - - - - 8bda991b by Finley McIlwaine at 2023-05-08T16:07:51-06:00 Memory usage fixes - Refactor `ifaceDeclMap` to drastically reduce memory footprint. We no longer store all declarations associated with a given name, since we only cared to determine if the only declaration associated with a name was a value declaration. Change the `DeclMap` type to better reflect this. - Drop pre-renaming export items after the renaming step. Since the Hoogle backend used the pre-renamed export items, this isn't trivial. We now generate Hoogle output for exported declarations during the renaming step (if Hoogle output /should/ be generated), and store that with the renamed export item. - Slightly refactor Hoogle backend to handle the above change and allow for early generation of Hoogle output. - Remove the `ifaceRnDocMap` and `ifaceRnArgMap` fields of the `Interface` type, as they were never used. - Remove some unnecessary strictness - Remove a lot of dead code from `Syb` module - - - - - 1611ac0c by Finley McIlwaine at 2023-05-09T11:51:57-06:00 Unify ErrMsgM and IfM - Delete ErrMsgM, stop accumulating warnings in a writer - Make IfM a state monad, print warnings directly to stdout, move IfM type into types module - Drop ErrMsg = String synonym - Unset IORefs from plugin after they are read, preventing unnecessary retention of interfaces - - - - - 42d696ab by Finley McIlwaine at 2023-05-11T15:52:07-06:00 Thunk leak fixes The strictness introduced in this commit was motivated by observing thunk leaks in the eventlog2html output. - Refactor attach instances list comprehension to avoid large intermediate thunks - Refactor some HTML backend list comprehensions to avoid large intermediate thunks - Avoid thunks accumulating in documentation types or documentation parser - A lot of orphan NFData instances to allow us to force documentation values - - - - - 68561cf6 by Finley McIlwaine at 2023-05-11T17:02:10-06:00 Remove GHC debug dep - - - - - 10519e3d by Finley McIlwaine at 2023-05-15T12:40:48-06:00 Force HIE file path Removes a potential retainer of `ModSummary`s - - - - - 1e4a6ec6 by Finley McIlwaine at 2023-05-15T14:20:34-06:00 Re-add index-state, with-compiler, delete hie.yamls - - - - - a2363fe9 by Hécate Moonlight at 2023-05-15T22:45:16+02:00 Merge pull request haskell/haddock#1594 from FinleyMcIlwaine/finley/ghc-9.6-mem-fixes Reduce memory usage - - - - - e8a78383 by Finley McIlwaine at 2023-05-17T12:19:16-06:00 Merge branch ghc-9.6 into ghc-head - - - - - 22e25581 by Finley McIlwaine at 2023-05-17T12:20:23-06:00 Merge branch 'ghc-head' of gitlab.haskell.org:ghc/haddock into ghc-head - - - - - 41bbf0df by Bartłomiej Cieślar at 2023-05-24T08:57:58+02:00 changes to the WarningTxt cases Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - c686ba9b by Hécate Moonlight at 2023-06-01T14:03:02-06:00 Port the remains of Hi-Haddock - - - - - 9d8a85fd by Hécate Moonlight at 2023-06-01T14:03:06-06:00 Stdout for tests - - - - - 36331d07 by Finley McIlwaine at 2023-06-01T14:06:02-06:00 Formatting, organize imports - - - - - a06059b1 by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix empty context confusion in Convert module - - - - - 379346ae by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix associated type families in Hoogle output - - - - - fc6ea7ed by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix test refs Accept several changes in Hoogle tests: Pretty printing logic no longer prints the `(Proxy (Proxy (...))` chain in Bug806 with parentheses. Since this test was only meant to verify that line breaks do not occur, accept the change. `tyThingToLHsDecl` is called for class and data declarations, which ends up "synifying" the type variables and giving unlifted types kind signatures. As a result, type variables of kind `Type -> Type` are now printed with kind signatures in Hoogle output. This could be changed by manually drop kind signatures from class variables in the Hoogle backend if the behavior is deemed unacceptable. Sometimes subordinate declarations are exported separate from their parent declarations (e.g. record selectors). In this case, a type signature is cobbled together for the export item in `extractDecl`. Since this type signature is very manually constructed, it may lack kind signatures of decls constructed from `tyThingToLHsDecl`. An example of this is the `type-sigs` Hoogle test. Change `*` to `Type` in Hoogle test refs. I don't think this will break Hoogle behavior, since it appears to not consider type signatures in search. I have not fully verified this. - - - - - e14b7e58 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix LaTeX backend test refs Changes to GHC pretty printing code have resulted in some differences to Haddock's LaTeX output. - Type variables are printed explicitly quantified in the LinearTypes test - Wildcard types in type family equations are now printed numbered, e.g. _1 _2, in the TypeFamilies3 test - Combined signatures in DefaultSignatures test are now documented as separate signatures - - - - - 41b5b296 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and test source updates - Stop using kind `*` in html test sources - Add TypeOperators where necessary to avoid warnings and future errors - Rename some test modules to match their module names - - - - - c640e2a2 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix missing deprecation warnings on record fields `lookupOccEnv` was used to resolve `OccNames` with warnings attached, but it doesn't look in the record field namespace. Thus, if a record field had a warning attached, it would not resolve and the warning map would not include it. This commit fixes by using `lookupOccEnv_WithFields` instead. - - - - - fad0c462 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and some comments - - - - - 751fd023 by Finley McIlwaine at 2023-06-01T14:11:41-06:00 Accept HTML test diffs All diffs now boil down to the expected differences resulting from declarations being reified from TyThings in hi-haddock. Surface syntax now has much less control over the syntax used in the documentation. - - - - - d835c845 by Finley McIlwaine at 2023-06-01T14:11:45-06:00 Adapt to new load' type - - - - - dcf776c4 by Finley McIlwaine at 2023-06-01T14:13:13-06:00 Update mkWarningMap and moduleWarning - - - - - 8e8432fd by Finley McIlwaine at 2023-06-01T14:28:54-06:00 Revert load' changes - - - - - aeb2982c by Finley McIlwaine at 2023-06-01T14:40:24-06:00 Accept change to Instances test in html-test Link to Data.Tuple instead of GHC.Tuple.Prim - - - - - 8adfdbac by Finley McIlwaine at 2023-06-01T15:53:17-06:00 Reset ghc dep to ^>= 9.6 - - - - - 2b1ce93d by Finley McIlwaine at 2023-06-06T07:50:04-06:00 Update CHANGES.md, user guide, recomp avoidance * Add --trace-args flag for tracing arguments received to standard output * Avoid recompiling due to changes in optimization flags * Update users guide and changes.md - - - - - f3da6676 by Finley McIlwaine at 2023-06-06T14:12:56-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - bf36c467 by Matthew Pickering at 2023-06-07T10:16:09+01:00 Revert back to e16e20d592a6f5d9ed1af17b77fafd6495242345 Neither of these MRs are ready to land yet which causes issues with other MRs which are ready to land and need haddock changes. - - - - - 421510a9 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 atSign has no unicode variant Prior to this change, atSign was defined as follows: atSign unicode = text (if unicode then "@" else "@") Yes, this is the same symbol '\64' and not your font playing tricks on you. Now we define: atSign = char '@' Both the LaTeX and the Xhtml backend are updated accordingly. - - - - - 3785c276 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 LaTeX: fix printing of type variable bindings Consider this type signature: kindOf :: forall {k} (a :: k). Proxy a -> Proxy k Prior to this fix, the LaTeX backend rendered it like this: kindOf :: forall k a. Proxy a -> Proxy k Now we preserve explicit specificity and kind annotations. - - - - - 0febf3a8 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 Add support for invisible binders in type declarations - - - - - 13e33bb3 by Finley McIlwaine at 2023-06-08T07:51:59-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - 3e5340ce by Finley McIlwaine at 2023-06-08T07:54:27-06:00 Add note about stubdir to recompilation docs - - - - - db7e84dc by Finley at 2023-06-08T08:11:03-06:00 Merge pull request haskell/haddock#1597 from haskell/finley/hi-haddock-9.6 hi-haddock for ghc 9.6 - - - - - 4e085d17 by Finley McIlwaine at 2023-06-14T13:41:06-06:00 Replace SYB traversals - - - - - 7b39aec5 by Finley McIlwaine at 2023-06-14T14:20:17-06:00 Test ref accepts, remove unused HaddockClsInst - - - - - df9c2090 by Finley McIlwaine at 2023-06-15T08:02:51-06:00 Use batchMsg for progress reporting during load With hi-haddock as is, there is an awkward silence during the load operation. This commit makes haddock use the default `batchMsg` Messager for progress reporting, and makes the default GHC verbosity level 1, so the user can see what GHC is doing. - - - - - f23679a8 by Hécate Moonlight at 2023-06-15T20:31:53+02:00 Merge pull request haskell/haddock#1600 from haskell/finley/hi-haddock-optim - - - - - a7982192 by Finley McIlwaine at 2023-06-15T15:02:16-06:00 hi-haddock squashed - - - - - c34f0c8d by Finley McIlwaine at 2023-06-15T16:22:03-06:00 Merge remote-tracking branch 'origin/ghc-9.6' into finley/hi-haddock-squashed - - - - - 40452797 by Bartłomiej Cieślar at 2023-06-16T12:26:04+02:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - e58673bf by Ben Gamari at 2023-06-16T09:33:35-04:00 Bump GHC version to 9.8 - - - - - 74bdf972 by Ben Gamari at 2023-06-16T09:36:18-04:00 Merge commit 'fcaaad06770a26d35d4aafd65772dedadf17669c' into ghc-head - - - - - 418ee3dc by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Remove NFData SourceText, IfaceWarnings updates The NFData SourceText instance is now available in GHC Handle mod_iface mi_warns now being IfaceWarnings - - - - - 62f31380 by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Accept Instances.hs test output Due to ghc!10469. - - - - - a8f2fc0e by Ben Gamari at 2023-06-20T15:48:08-04:00 Test fixes for "Fix associated data family doc structure items" Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - cb1ac33e by Bartłomiej Cieślar at 2023-06-21T12:56:02-04:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 9933e10b by Ben Gamari at 2023-06-21T12:56:02-04:00 Bump GHC version to 9.8 - - - - - fe8c18b6 by Ben Gamari at 2023-06-21T15:36:29-04:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - c61a0d5b by Ben Gamari at 2023-06-21T16:10:51-04:00 Bump GHC version to 9.9 - - - - - 0c2a756e by sheaf at 2023-07-07T13:45:12+02:00 Avoid incomplete record update in Haddock Hoogle This commit avoids running into an incomplete record update warning in the Hoogle backend of Haddock. This was only noticed now, because incomplete record updates were broken in GHC 9.6. Now that they are fixed, we have to avoid running into them! - - - - - f9b952a7 by Ben Gamari at 2023-07-21T11:58:05-04:00 Bump base bound to <4.20 For GHC 9.8. - - - - - 1b27e151 by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Check for puns (see ghc#23368) - - - - - 457341fd by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Remove fake exports for (~), List, and Tuple<n> The old reasoning no longer applies, nowadays those names can be mentioned in export lists. - - - - - bf3dcddf by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Fix pretty-printing of Solo and MkSolo - - - - - e2c91bff by Gergő Érdi at 2023-08-03T02:55:46+01:00 Desugar bindings in the context of their evidence Closes #23172 - - - - - 481f4a46 by Gergő Érdi at 2023-08-03T07:48:43+01:00 Add flag to `-f{no-}specialise-incoherents` to enable/disable specialisation of incoherent instances Fixes #23287 - - - - - d751c583 by Profpatsch at 2023-08-04T12:24:26-04:00 base: Improve String & IsString documentation - - - - - 01db1117 by Ben Gamari at 2023-08-04T12:25:02-04:00 rts/win32: Ensure reliability of IO manager shutdown When the Win32 threaded IO manager shuts down, `ioManagerDie` sends an `IO_MANAGER_DIE` event to the IO manager thread using the `io_manager_event` event object. Finally, it will closes the event object, and invalidate `io_manager_event`. Previously, `readIOManagerEvent` would see that `io_manager_event` is invalid and return `0`, suggesting that everything is right with the world. This meant that if `ioManagerDie` invalidated the handle before the event manager was blocked on the event we would end up in a situation where the event manager would never realize it was asked to shut down. Fix this by ensuring that `readIOManagerEvent` instead returns `IO_MANAGER_DIE` when we detect that the event object has been invalidated by `ioManagerDie`. Fixes #23691. - - - - - fdef003a by Ryan Scott at 2023-08-04T12:25:39-04:00 Look through TH splices in splitHsApps This modifies `splitHsApps` (a key function used in typechecking function applications) to look through untyped TH splices and quasiquotes. Not doing so was the cause of #21077. This builds on !7821 by making `splitHsApps` match on `HsUntypedSpliceTop`, which contains the `ThModFinalizers` that must be run as part of invoking the TH splice. See the new `Note [Looking through Template Haskell splices in splitHsApps]` in `GHC.Tc.Gen.Head`. Along the way, I needed to make the type of `splitHsApps.set` slightly more general to accommodate the fact that the location attached to a quasiquote is a `SrcAnn NoEpAnns` rather than a `SrcSpanAnnA`. Fixes #21077. - - - - - e77a0b41 by Ben Gamari at 2023-08-04T12:26:15-04:00 Bump deepseq submodule to 1.5. And bump bounds (cherry picked from commit 1228d3a4a08d30eaf0138a52d1be25b38339ef0b) - - - - - cebb5819 by Ben Gamari at 2023-08-04T12:26:15-04:00 configure: Bump minimal boot GHC version to 9.4 (cherry picked from commit d3ffdaf9137705894d15ccc3feff569d64163e8e) - - - - - 83766dbf by Ben Gamari at 2023-08-04T12:26:15-04:00 template-haskell: Bump version to 2.21.0.0 Bumps exceptions submodule. (cherry picked from commit bf57fc9aea1196f97f5adb72c8b56434ca4b87cb) - - - - - 1211112a by Ben Gamari at 2023-08-04T12:26:15-04:00 base: Bump version to 4.19 Updates all boot library submodules. (cherry picked from commit 433d99a3c24a55b14ec09099395e9b9641430143) - - - - - 3ab5efd9 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Normalise versions more aggressively In backpack hashes can contain `+` characters. (cherry picked from commit 024861af51aee807d800e01e122897166a65ea93) - - - - - d52be957 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Declare bkpcabal08 as fragile Due to spurious output changes described in #23648. (cherry picked from commit c046a2382420f2be2c4a657c56f8d95f914ea47b) - - - - - e75a58d1 by Ben Gamari at 2023-08-04T12:26:15-04:00 gitlab-ci: Only mark linker_unload_native as broken in static jobs This test passes on dynamically-linked Alpine. (cherry picked from commit f356a7e8ec8ec3d6b2b30fd175598b9b80065d87) - - - - - 8b176514 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite: Update base-exports - - - - - 4b647936 by Ben Gamari at 2023-08-04T12:26:15-04:00 testsuite/interface-stability: normalise versions This eliminates spurious changes from version bumps. - - - - - 0eb54c05 by Ben Gamari at 2023-08-04T12:26:51-04:00 linker/PEi386: Don't sign-extend symbol section number Previously we incorrectly interpreted PE section numbers as signed values. However, this isn't the case; rather, it's an unsigned 16-bit number with a few special bit-patterns (0xffff and 0xfffe). This resulted in #22941 as the linker would conclude that the sections were invalid. Fixing this required quite a bit of refactoring. Closes #22941. - - - - - fd7ce39c by Ben Gamari at 2023-08-04T12:27:28-04:00 testsuite: Mark MulMayOflo_full as broken rather than skipping To ensure that we don't accidentally fix it. See #23742. - - - - - 824092f2 by Ben Gamari at 2023-08-04T12:27:28-04:00 nativeGen/AArch64: Fix sign extension in MulMayOflo Previously the 32-bit implementations of MulMayOflo would use the a non-sensical sign-extension mode. Rewrite these to reflect what gcc 11 produces. Also similarly rework the 16- and 8-bit cases. This now passes the MulMayOflo tests in ghc/test-primops> in all four widths, including the precision tests. Fixes #23721. - - - - - 1b15dbc4 by Jan Hrček at 2023-08-04T12:28:08-04:00 Fix haddock markup in code example for coerce - - - - - 46fd8ced by Vladislav Zavialov at 2023-08-04T12:28:44-04:00 Fix (~) and (@) infix operators in TH splices (#23748) 8168b42a "Whitespace-sensitive bang patterns" allows GHC to accept the following infix operators: a ~ b = () a @ b = () But not if TH is used to generate those declarations: $([d| a ~ b = () a @ b = () |]) -- Test.hs:5:2: error: [GHC-55017] -- Illegal variable name: ‘~’ -- When splicing a TH declaration: (~_0) a_1 b_2 = GHC.Tuple.Prim.() This is easily fixed by modifying `reservedOps` in GHC.Utils.Lexeme - - - - - a1899d8f by Aaron Allen at 2023-08-04T12:29:24-04:00 [#23663] Show Flag Suggestions in GHCi Makes suggestions when using `:set` in GHCi with a misspelled flag. This mirrors how invalid flags are handled when passed to GHC directly. Logic for producing flag suggestions was moved to GHC.Driver.Sesssion so it can be shared. resolves #23663 - - - - - 03f2debd by Rodrigo Mesquita at 2023-08-04T12:30:00-04:00 Improve ghc-toolchain validation configure warning Fixes the layout of the ghc-toolchain validation warning produced by configure. - - - - - de25487d by Alan Zimmerman at 2023-08-04T12:30:36-04:00 EPA make getLocA a synonym for getHasLoc This is basically a no-op change, but allows us to make future changes that can rely on the HasLoc instances And I presume this means we can use more precise functions based on class resolution, so the Windows CI build reports Metric Decrease: T12234 T13035 - - - - - 3ac423b9 by Ben Gamari at 2023-08-04T12:31:13-04:00 ghc-platform: Add upper bound on base Hackage upload requires this. - - - - - 8ba20b21 by Matthew Craven at 2023-08-04T17:22:59-04:00 Adjust and clarify handling of primop effects Fixes #17900; fixes #20195. The existing "can_fail" and "has_side_effects" primop attributes that previously governed this were used in inconsistent and confusingly-documented ways, especially with regard to raising exceptions. This patch replaces them with a single "effect" attribute, which has four possible values: NoEffect, CanFail, ThrowsException, and ReadWriteEffect. These are described in Note [Classifying primop effects]. A substantial amount of related documentation has been re-drafted for clarity and accuracy. In the process of making this attribute format change for literally every primop, several existing mis-classifications were detected and corrected. One of these mis-classifications was tagToEnum#, which is now considered CanFail; this particular fix is known to cause a regression in performance for derived Enum instances. (See #23782.) Fixing this is left as future work. New primop attributes "cheap" and "work_free" were also added, and used in the corresponding parts of GHC.Core.Utils. In view of their actual meaning and uses, `primOpOkForSideEffects` and `exprOkForSideEffects` have been renamed to `primOpOkToDiscard` and `exprOkToDiscard`, respectively. Metric Increase: T21839c - - - - - 41bf2c09 by sheaf at 2023-08-04T17:23:42-04:00 Update inert_solved_dicts for ImplicitParams When adding an implicit parameter dictionary to the inert set, we must make sure that it replaces any previous implicit parameter dictionaries that overlap, in order to get the appropriate shadowing behaviour, as in let ?x = 1 in let ?x = 2 in ?x We were already doing this for inert_cans, but we weren't doing the same thing for inert_solved_dicts, which lead to the bug reported in #23761. The fix is thus to make sure that, when handling an implicit parameter dictionary in updInertDicts, we update **both** inert_cans and inert_solved_dicts to ensure a new implicit parameter dictionary correctly shadows old ones. Fixes #23761 - - - - - 43578d60 by Matthew Craven at 2023-08-05T01:05:36-04:00 Bump bytestring submodule to 0.11.5.1 - - - - - 91353622 by Ben Gamari at 2023-08-05T01:06:13-04:00 Initial commit of Note [Thunks, blackholes, and indirections] This Note attempts to summarize the treatment of thunks, thunk update, and indirections. This fell out of work on #23185. - - - - - 8d686854 by sheaf at 2023-08-05T01:06:54-04:00 Remove zonk in tcVTA This removes the zonk in GHC.Tc.Gen.App.tc_inst_forall_arg and its accompanying Note [Visible type application zonk]. Indeed, this zonk is no longer necessary, as we no longer maintain the invariant that types are well-kinded without zonking; only that typeKind does not crash; see Note [The Purely Kinded Type Invariant (PKTI)]. This commit removes this zonking step (as well as a secondary zonk), and replaces the aforementioned Note with the explanatory Note [Type application substitution], which justifies why the substitution performed in tc_inst_forall_arg remains valid without this zonking step. Fixes #23661 - - - - - 19dea673 by Ben Gamari at 2023-08-05T01:07:30-04:00 Bump nofib submodule Ensuring that nofib can be build using the same range of bootstrap compilers as GHC itself. - - - - - aa07402e by Luite Stegeman at 2023-08-05T23:15:55+09:00 JS: Improve compatibility with recent emsdk The JavaScript code in libraries/base/jsbits/base.js had some hardcoded offsets for fields in structs, because we expected the layout of the data structures to remain unchanged. Emsdk 3.1.42 changed the layout of the stat struct, breaking this assumption, and causing code in .hsc files accessing the stat struct to fail. This patch improves compatibility with recent emsdk by removing the assumption that data layouts stay unchanged: 1. offsets of fields in structs used by JavaScript code are now computed by the configure script, so both the .js and .hsc files will automatically use the new layout if anything changes. 2. the distrib/configure script checks that the emsdk version on a user's system is the same version that a bindist was booted with, to avoid data layout inconsistencies See #23641 - - - - - b938950d by Luite Stegeman at 2023-08-07T06:27:51-04:00 JS: Fix missing local variable declarations This fixes some missing local variable declarations that were found by running the testsuite in strict mode. Fixes #23775 - - - - - 6c0e2247 by sheaf at 2023-08-07T13:31:21-04:00 Update Haddock submodule to fix #23368 This submodule update adds the following three commits: bbf1c8ae - Check for puns 0550694e - Remove fake exports for (~), List, and Tuple<n> 5877bceb - Fix pretty-printing of Solo and MkSolo These commits fix the issues with Haddock HTML rendering reported in ticket #23368. Fixes #23368 - - - - - 5b5be3ea by Matthew Pickering at 2023-08-07T13:32:00-04:00 Revert "Bump bytestring submodule to 0.11.5.1" This reverts commit 43578d60bfc478e7277dcd892463cec305400025. Fixes #23789 - - - - - 01961be3 by Ben Gamari at 2023-08-08T02:47:14-04:00 configure: Derive library version from ghc-prim.cabal.in Since ghc-prim.cabal is now generated by Hadrian, we cannot depend upon it. Closes #23726. - - - - - 3b373838 by Ryan Scott at 2023-08-08T02:47:49-04:00 tcExpr: Push expected types for untyped TH splices inwards In !10911, I deleted a `tcExpr` case for `HsUntypedSplice` in favor of a much simpler case that simply delegates to `tcApp`. Although this passed the test suite at the time, this was actually an error, as the previous `tcExpr` case was critically pushing the expected type inwards. This actually matters for programs like the one in #23796, which GHC would not accept with type inference alone—we need full-blown type _checking_ to accept these. I have added back the previous `tcExpr` case for `HsUntypedSplice` and now explain why we have two different `HsUntypedSplice` cases (one in `tcExpr` and another in `splitHsApps`) in `Note [Looking through Template Haskell splices in splitHsApps]` in `GHC.Tc.Gen.Head`. Fixes #23796. - - - - - 0ef1d8ae by sheaf at 2023-08-08T21:26:51-04:00 Compute all emitted diagnostic codes This commit introduces in GHC.Types.Error.Codes the function constructorCodes :: forall diag. (...) => Map DiagnosticCode String which computes a collection of all the diagnostic codes that correspond to a particular type. In particular, we can compute the collection of all diagnostic codes emitted by GHC using the invocation constructorCodes @GhcMessage We then make use of this functionality in the new "codes" test which checks consistency and coverage of GHC diagnostic codes. It performs three checks: - check 1: all non-outdated GhcDiagnosticCode equations are statically used. - check 2: all outdated GhcDiagnosticCode equations are statically unused. - check 3: all statically used diagnostic codes are covered by the testsuite (modulo accepted exceptions). - - - - - 4bc7b1e5 by Fraser Tweedale at 2023-08-08T21:27:32-04:00 numberToRangedRational: fix edge cases for exp ≈ (maxBound :: Int) Currently a negative exponent less than `minBound :: Int` results in Infinity, which is very surprising and obviously wrong. ``` λ> read "1e-9223372036854775808" :: Double 0.0 λ> read "1e-9223372036854775809" :: Double Infinity ``` There is a further edge case where the exponent can overflow when increased by the number of tens places in the integer part, or underflow when decreased by the number of leading zeros in the fractional part if the integer part is zero: ``` λ> read "10e9223372036854775807" :: Double 0.0 λ> read "0.01e-9223372036854775808" :: Double Infinity ``` To resolve both of these issues, perform all arithmetic and comparisons involving the exponent in type `Integer`. This approach also eliminates the need to explicitly check the exponent against `maxBound :: Int` and `minBound :: Int`, because the allowed range of the exponent (i.e. the result of `floatRange` for the target floating point type) is certainly within those bounds. This change implements CLC proposal 192: https://github.com/haskell/core-libraries-committee/issues/192 - - - - - 6eab07b2 by Alan Zimmerman at 2023-08-08T21:28:10-04:00 EPA: Remove Location from WarningTxt source This is not needed. - - - - - 1a98d673 by Sebastian Graf at 2023-08-09T16:24:29-04:00 Cleanup a TODO introduced in 1f94e0f7 The change must have slipped through review of !4412 - - - - - 2274abc8 by Sebastian Graf at 2023-08-09T16:24:29-04:00 More explicit strictness in GHC.Real - - - - - ce8aa54c by Sebastian Graf at 2023-08-09T16:24:30-04:00 exprIsTrivial: Factor out shared implementation The duplication between `exprIsTrivial` and `getIdFromTrivialExpr_maybe` has been bugging me for a long time. This patch introduces an inlinable worker function `trivial_expr_fold` acting as the single, shared decision procedure of triviality. It "returns" a Church-encoded `Maybe (Maybe Id)`, so when it is inlined, it fuses to similar code as before. (Better code, even, in the case of `getIdFromTrivialExpr` which presently allocates a `Just` constructor that cancels away after this patch.) - - - - - d004a36d by Sebastian Graf at 2023-08-09T16:24:30-04:00 Simplify: Simplification of arguments in a single function The Simplifier had a function `simplArg` that wasn't called in `rebuildCall`, which seems to be the main way to simplify args. Hence I consolidated the code path to call `simplArg`, too, renaming to `simplLazyArg`. - - - - - 8c73505e by Sebastian Graf at 2023-08-09T16:24:30-04:00 Core.Ppr: Omit case binder for empty case alternatives A minor improvement to pretty-printing - - - - - d8d993f1 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Disable tests RepPolyWrappedVar2 and RepPolyUnsafeCoerce1 in JS backend ... because those coerce between incompatible/unknown PrimReps. - - - - - f06e87e4 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Inlining literals into boring contexts is OK - - - - - 4a6b7c87 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Clarify floating of unsafeEqualityProofs (#23754) - - - - - b0f4752e by Sebastian Graf at 2023-08-09T16:24:30-04:00 Kill SetLevel.notWorthFloating.is_triv (#23270) We have had it since b84ba676034, when it operated on annotated expressions. Nowadays it operates on vanilla `CoreExpr` though, so we should just call `exprIsTrivial`; thus handling empty cases and string literals correctly. - - - - - 7e0c8b3b by Sebastian Graf at 2023-08-09T16:24:30-04:00 ANFise string literal arguments (#23270) This instates the invariant that a trivial CoreExpr translates to an atomic StgExpr. Nice. Annoyingly, in -O0 we sometimes generate ``` foo = case "blah"# of sat { __DEFAULT -> unpackCString# sat } ``` which makes it a bit harder to spot that we can emit a standard `stg_unpack_cstring` thunk. Fixes #23270. - - - - - 357f2738 by Sebastian Graf at 2023-08-09T16:24:30-04:00 Deactivate -fcatch-nonexhaustive-cases in ghc-bignum (#23345) - - - - - 59202c80 by Sebastian Graf at 2023-08-09T16:24:30-04:00 CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now. The main reason is that it plays far better in conjunction with eta expansion (as we aim to do for arguments in CorePrep, #23083), because we can discard any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta` it's impossible to discard the argument. We do also give the same treatment to unsafeCoerce proofs and treat them as trivial iff their RHS is trivial. It is also both much simpler to describe than the previous mechanism of emitting an unsafe coercion and simpler to implement, removing quite a bit of commentary and `CorePrepProv`. In the ghc/alloc perf test `LargeRecord`, we introduce an additional Simplifier iteration due to #17910. E.g., FloatOut produces a binding ``` lvl_s6uK [Occ=Once1] :: GHC.Types.Int [LclId] lvl_s6uK = GHC.Types.I# 2# lvl_s6uL [Occ=Once1] :: GHC.Types.Any [LclId] lvl_s6uL = case Unsafe.Coerce.unsafeEqualityProof ... of { Unsafe.Coerce.UnsafeRefl v2_i6tr -> lvl_s6uK `cast` (... v2_i6tr ...) } ``` That occurs once and hence is pre-inlined unconditionally in the next Simplifier pass. It's non-trivial to find a way around that, but not really harmful otherwise. Hence we accept a 1.2% increase on some architectures. Metric Increase: LargeRecord - - - - - 00d31188 by Sebastian Graf at 2023-08-09T16:24:30-04:00 CorePrep: Eta expand arguments (#23083) Previously, we'd only eta expand let bindings and lambdas, now we'll also eta expand arguments such as in T23083: ```hs g f h = f (h `seq` (h $)) ``` Unless `-fpedantic-bottoms` is set, we'll now transform to ```hs g f h = f (\eta -> h eta) ``` in CorePrep. See the new `Note [Eta expansion of arguments in CorePrep]` for the details. We only do this optimisation with -O2 because we saw 2-3% ghc/alloc regressions in T4801 and T5321FD. Fixes #23083. - - - - - bf885d7a by Matthew Craven at 2023-08-09T16:25:07-04:00 Bump bytestring submodule to 0.11.5, again Fixes #23789. The bytestring commit used here is unreleased; a release can be made when necessary. - - - - - 7acbf0fd by Sven Tennie at 2023-08-10T19:17:11-04:00 Serialize CmmRetInfo in .rodata The handling of case was missing. - - - - - 0c3136f2 by Sven Tennie at 2023-08-10T19:17:11-04:00 Reference StgRetFun payload by its struct field address This is easier to grasp than relative pointer offsets. - - - - - f68ff313 by Sven Tennie at 2023-08-10T19:17:11-04:00 Better variable name: u -> frame The 'u' was likely introduced by copy'n'paste. - - - - - 0131bb7f by Sven Tennie at 2023-08-10T19:17:11-04:00 Make checkSTACK() public Such that it can also be used in tests. - - - - - 7b6e1e53 by Sven Tennie at 2023-08-10T19:17:11-04:00 Publish stack related fields in DerivedConstants.h These will be used in ghc-heap to decode these parts of the stack. - - - - - 907ed054 by Sven Tennie at 2023-08-10T19:17:11-04:00 ghc-heap: Decode StgStack and its stack frames Previously, ghc-heap could only decode heap closures. The approach is explained in detail in note [Decoding the stack]. - - - - - 6beb6ac2 by Sven Tennie at 2023-08-10T19:17:11-04:00 Remove RetFunType from RetFun stack frame representation It's a technical detail. The single usage is replaced by a predicate. - - - - - 006bb4f3 by Sven Tennie at 2023-08-10T19:17:11-04:00 Better parameter name The call-site uses the term "offset", too. - - - - - d4c2c1af by Sven Tennie at 2023-08-10T19:17:11-04:00 Make closure boxing pure There seems to be no need to do something complicated. However, the strictness of the closure pointer matters, otherwise a thunk gets decoded. - - - - - 8d8426c9 by Sven Tennie at 2023-08-10T19:17:11-04:00 Document entertainGC in test It wasn't obvious why it's there and what its role is. Also, increase the "entertainment level" a bit. I checked in STG and Cmm dumps that this really generates closures (and is not e.g. constant folded away.) - - - - - cc52c358 by Finley McIlwaine at 2023-08-10T19:17:47-04:00 Add -dipe-stats flag This is useful for seeing which info tables have information. - - - - - 261c4acb by Finley McIlwaine at 2023-08-10T19:17:47-04:00 Add -finfo-table-map-with-fallback -finfo-table-map-with-stack The -fno-info-table-map-with-stack flag omits STACK info tables from the info table map, and the -fno-info-table-map-with-fallback flag omits info tables with defaulted source locations from the map. In a test on the Agda codebase the build results were about 7% smaller when both of those types of tables were omitted. Adds a test that verifies that passing each combination of these flags results in the correct output for -dipe-stats, which is disabled for the js backend since profiling is not implemented. This commit also refactors a lot of the logic around extracting info tables from the Cmm results and building the info table map. This commit also fixes some issues in the users guide rst source to fix warnings that were noticed while debugging the documentation for these flags. Fixes #23702 - - - - - d7047e0d by Jaro Reinders at 2023-08-14T04:41:42-04:00 Add changelog entry for specialised Enum Int64/Word64 instances - - - - - 52f5e8fb by cydparser at 2023-08-14T04:42:20-04:00 Fix -ddump-to-file and -ddump-timings interaction (#20316) - - - - - 1274c5d6 by cydparser at 2023-08-14T04:42:20-04:00 Update release notes (#20316) - - - - - 8e699b23 by Matthew Pickering at 2023-08-14T10:44:47-04:00 base: Add changelog entry for CLC #188 This proposal modified the implementations of copyBytes, moveBytes and fillBytes (as detailed in the proposal) https://github.com/haskell/core-libraries-committee/issues/188 - - - - - 026f040a by Matthew Pickering at 2023-08-14T10:45:23-04:00 packaging: Build manpage in separate directory to other documentation We were installing two copies of the manpage: * One useless one in the `share/doc` folder, because we copy the doc/ folder into share/ * The one we deliberately installed into `share/man` etc The solution is to build the manpage into the `manpage` directory when building the bindist, and then just install it separately. Fixes #23707 - - - - - 524c60c8 by Bartłomiej Cieślar at 2023-08-14T13:46:33-04:00 Report deprecated fields bound by record wildcards when used This commit ensures that we emit the appropriate warnings when a deprecated record field bound by a record wildcard is used. For example: module A where data Foo = Foo {x :: Int, y :: Bool, z :: Char} {-# DEPRECATED x "Don't use x" #-} {-# WARNING y "Don't use y" #-} module B where import A foo (Foo {..}) = x This will cause us to emit a "Don't use x" warning, with location the location of the record wildcard. Note that we don't warn about `y`, because it is unused in the RHS of `foo`. Fixes #23382 - - - - - d6130065 by Matthew Pickering at 2023-08-14T13:47:11-04:00 Add zstd suffix to jobs which rely on zstd This was causing some confusion as the job was named simply "x86_64-linux-deb10-validate", which implies a standard configuration rather than any dependency on libzstd. - - - - - e24e44fc by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: Always run project-version job This is needed for the downstream test-primops pipeline to workout what the version of a bindist produced by a pipeline is. - - - - - f17b9d62 by Matthew Pickering at 2023-08-14T13:47:11-04:00 gen_ci: Rework how jobs-metadata.json is generated * We now represent a job group a triple of Maybes, which makes it easier to work out when jobs are enabled/disabled on certain pipelines. ``` data JobGroup a = StandardTriple { v :: Maybe (NamedJob a) , n :: Maybe (NamedJob a) , r :: Maybe (NamedJob a) } ``` * `jobs-metadata.json` generation is reworked using the following algorithm. - For each pipeline type, find all the platforms we are doing builds for. - Select one build per platform - Zip together the results This way we can choose different pipelines for validate/nightly/release which makes the metadata also useful for validate pipelines. This feature is used by the test-primops downstream CI in order to select the right bindist for testing validate pipelines. This makes it easier to inspect which jobs are going to be enabled on a particular pipeline. - - - - - f9a5563d by Matthew Pickering at 2023-08-14T13:47:11-04:00 gen_ci: Rules rework In particular we now distinguish between whether we are dealing with a Nightly/Release pipeline (which labels don't matter for) and a validate pipeline where labels do matter. The overall goal here is to allow a disjunction of labels for validate pipelines, for example, > Run a job if we have the full-ci label or test-primops label Therefore the "ValidateOnly" rules are treated as a set of disjunctions rather than conjunctions like before. What this means in particular is that if we want to ONLY run a job if a label is set, for example, "FreeBSD" label then we have to override the whole label set. Fixes #23772 - - - - - d54b0c1d by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: set -e for lint-ci-config scripts - - - - - 994a9b35 by Matthew Pickering at 2023-08-14T13:47:11-04:00 ci: Fix job metadata generation - - - - - e194ed2b by Ben Gamari at 2023-08-15T00:58:09-04:00 users-guide: Note that GHC2021 doesn't include ExplicitNamespaces As noted in #23801. - - - - - d814bda9 by Ben Gamari at 2023-08-15T05:43:53-04:00 users-guide: Support both distutils and packaging As noted in #23818, some old distributions (e.g. Debian 9) only include `distutils` while newer distributions only include `packaging`. Fixes #23818. - - - - - 1726db3f by Ben Gamari at 2023-08-15T05:43:53-04:00 users-guide: Ensure extlinks is compatible with Sphinx <4 The semantics of the `extlinks` attribute annoyingly changed in Sphinx 4. Reflect this in our configuration. See #22690. Fixes #23807. - - - - - 173338cf by Matthew Pickering at 2023-08-15T22:00:24-04:00 ci: Run full-ci on master and release branches Fixes #23737 - - - - - bdab6898 by Andrew Lelechenko at 2023-08-15T22:01:03-04:00 Add @since pragmas for Data.Ord.clamp and GHC.Float.clamp - - - - - 662d351b by Matthew Pickering at 2023-08-16T09:35:04-04:00 ghc-toolchain: Match CPP args with configure script At the moment we need ghc-toolchain to precisely match the output as provided by the normal configure script. The normal configure script (FP_HSCPP_CMD_WITH_ARGS) branches on whether we are using clang or gcc so we match that logic exactly in ghc-toolchain. The old implementation (which checks if certain flags are supported) is better but for now we have to match to catch any potential errors in the configuration. Ticket: #23720 - - - - - 09c6759e by Matthew Pickering at 2023-08-16T09:35:04-04:00 configure: Fix `-Wl,--no-as-needed` check The check was failing because the args supplied by $$1 were quoted which failed because then the C compiler thought they were an input file. Fixes #23720 - - - - - 2129678b by Matthew Pickering at 2023-08-16T09:35:04-04:00 configure: Add flag which turns ghc-toolchain check into error We want to catch these errors in CI, but first we need to a flag which turns this check into an error. - - - - - 6e2aa8e0 by Matthew Pickering at 2023-08-16T09:35:04-04:00 ci: Enable --enable-strict-ghc-toolchain-check for all CI jobs This will cause any CI job to fail if we have a mismatch between what ghc-toolchain reports and what ./configure natively reports. Fixing these kinds of issues is highest priority for 9.10 release. - - - - - 12d39e24 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 Pass user-specified options to ghc-toolchain The current user interface to configuring target toolchains is `./configure`. In !9263 we added a new tool to configure target toolchains called `ghc-toolchain`, but the blessed way of creating these toolchains is still through configure. However, we were not passing the user-specified options given with the `./configure` invocation to the ghc-toolchain tool. This commit remedies that by storing the user options and environment variables in USER_* variables, which then get passed to GHC-toolchain. The exception to the rule is the windows bundled toolchain, which overrides the USER_* variables with whatever flags the windows bundled toolchain requires to work. We consider the bundled toolchain to be effectively the user specifying options, since the actual user delegated that configuration work. Closes #23678 - - - - - f7b3c3a0 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 ghc-toolchain: Parse javascript and ghcjs as a Arch and OS - - - - - 8a0ae4ee by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 ghc-toolchain: Fix ranlib option - - - - - 31e9ec96 by Rodrigo Mesquita at 2023-08-16T09:35:04-04:00 Check Link Works with -Werror - - - - - bc1998b3 by Matthew Pickering at 2023-08-16T09:35:04-04:00 Only check for no_compact_unwind support on darwin While writing ghc-toolchain we noticed that the FP_PROG_LD_NO_COMPACT_UNWIND check is subtly wrong. Specifically, we pass -Wl,-no_compact_unwind to cc. However, ld.gold interprets this as -n o_compact_unwind, which is a valid argument. Fixes #23676 - - - - - 0283f36e by Matthew Pickering at 2023-08-16T09:35:04-04:00 Add some javascript special cases to ghc-toolchain On javascript there isn't a choice of toolchain but some of the configure checks were not accurately providing the correct answer. 1. The linker was reported as gnu LD because the --version output mentioned gnu LD. 2. The --target flag makes no sense on javascript but it was just ignored by the linker, so we add a special case to stop ghc-toolchain thinking that emcc supports --target when used as a linker. - - - - - a48ec5f8 by Matthew Pickering at 2023-08-16T09:35:04-04:00 check for emcc in gnu_LD check - - - - - 50df2e69 by Matthew Pickering at 2023-08-16T09:35:04-04:00 Add ldOverrideWhitelist to only default to ldOverride on windows/linux On some platforms - ie darwin, javascript etc we really do not want to allow the user to use any linker other than the default one as this leads to all kinds of bugs. Therefore it is a bit more prudant to add a whitelist which specifies on which platforms it might be possible to use a different linker. - - - - - a669a39c by Matthew Pickering at 2023-08-16T09:35:04-04:00 Fix plaform glob in FPTOOLS_SET_C_LD_FLAGS A normal triple may look like x86_64-unknown-linux but when cross-compiling you get $target set to a quad such as.. aarch64-unknown-linux-gnu Which should also match this check. - - - - - c52b6769 by Matthew Pickering at 2023-08-16T09:35:04-04:00 ghc-toolchain: Pass ld-override onto ghc-toolchain - - - - - 039b484f by Matthew Pickering at 2023-08-16T09:35:04-04:00 ld override: Make whitelist override user given option - - - - - d2b63cbc by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: Add format mode to normalise differences before diffing. The "format" mode takes an "--input" and "--ouput" target file and formats it. This is intended to be useful on windows where the configure/ghc-toolchain target files can't be diffed very easily because the path separators are different. - - - - - f2b39e4a by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: Bump ci-images commit to get new ghc-wasm-meta We needed to remove -Wno-unused-command-line-argument from the arguments passed in order for the configure check to report correctly. See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10976#note_516335 - - - - - 92103830 by Matthew Pickering at 2023-08-16T09:35:05-04:00 configure: MergeObjsCmd - distinguish between empty string and unset variable If `MergeObjsCmd` is explicitly set to the empty string then we should assume that MergeObjs is just not supported. This is especially important for windows where we set MergeObjsCmd to "" in m4/fp_setup_windows_toolchain.m4. - - - - - 3500bb2c by Matthew Pickering at 2023-08-16T09:35:05-04:00 configure: Add proper check to see if object merging works - - - - - 08c9a014 by Matthew Pickering at 2023-08-16T09:35:05-04:00 ghc-toolchain: If MergeObjsCmd is not set, replace setting with Nothing If the user explicitly chooses to not set a MergeObjsCmd then it is correct to use Nothing for tgtMergeObjs field in the Target file. - - - - - c9071d94 by Matthew Pickering at 2023-08-16T09:35:05-04:00 HsCppArgs: Augment the HsCppOptions This is important when we pass -I when setting up the windows toolchain. - - - - - 294a6d80 by Matthew Pickering at 2023-08-16T09:35:05-04:00 Set USER_CPP_ARGS when setting up windows toolchain - - - - - bde4b5d4 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00 Improve handling of Cc as a fallback - - - - - f4c1c3a3 by Rodrigo Mesquita at 2023-08-16T09:35:05-04:00 ghc-toolchain: Configure Cpp and HsCpp correctly when user specifies flags In ghc-toolchain, we were only /not/ configuring required flags when the user specified any flags at all for the of the HsCpp and Cpp tools. Otherwise, the linker takes into consideration the user specified flags to determine whether to search for a better linker implementation, but already configured the remaining GHC and platform-specific flags regardless of the user options. Other Tools consider the user options as a baseline for further configuration (see `findProgram`), so #23689 is not applicable. Closes #23689 - - - - - bfe4ffac by Matthew Pickering at 2023-08-16T09:35:05-04:00 CPP_ARGS: Put new options after user specified options This matches up with the behaviour of ghc-toolchain, so that the output of both matches. - - - - - a6828173 by Gergő Érdi at 2023-08-16T09:35:41-04:00 If a defaulting plugin made progress, re-zonk wanteds before built-in defaulting Fixes #23821. - - - - - e2b38115 by Sylvain Henry at 2023-08-17T07:54:06-04:00 JS: implement openat(AT_FDCWD...) (#23697) Use `openSync` to implement `openat(AT_FDCWD...)`. - - - - - a975c663 by sheaf at 2023-08-17T07:54:47-04:00 Use unsatisfiable for missing methods w/ defaults When a class instance has an Unsatisfiable constraint in its context and the user has not explicitly provided an implementation of a method, we now always provide a RHS of the form `unsatisfiable @msg`, even if the method has a default definition available. This ensures that, when deferring type errors, users get the appropriate error message instead of a possible runtime loop, if class default methods were defined recursively. Fixes #23816 - - - - - 45ca51e5 by Ben Gamari at 2023-08-17T15:16:41-04:00 ghc-internal: Initial commit of the skeleton - - - - - 88bbf8c5 by Ben Gamari at 2023-08-17T15:16:41-04:00 ghc-experimental: Initial commit - - - - - 664468c0 by Ben Gamari at 2023-08-17T15:17:17-04:00 testsuite/cloneStackLib: Fix incorrect format specifiers - - - - - eaa835bb by Ben Gamari at 2023-08-17T15:17:17-04:00 rts/ipe: Fix const-correctness of IpeBufferListNode Both info tables and the string table should be `const` - - - - - 78f6f6fd by Ben Gamari at 2023-08-17T15:17:17-04:00 nonmoving: Drop dead debugging utilities These are largely superceded by support in the ghc-utils GDB extension. - - - - - 3f6e8f42 by Ben Gamari at 2023-08-17T15:17:17-04:00 nonmoving: Refactor management of mark thread Here we refactor that treatment of the worker thread used by the nonmoving GC for concurrent marking, avoiding creating a new thread with every major GC cycle. As well, the new scheme is considerably easier to reason about, consolidating all state in one place, accessed via a small set of accessors with clear semantics. - - - - - 88c32b7d by Ben Gamari at 2023-08-17T15:17:17-04:00 testsuite: Skip T23221 in nonmoving GC ways This test is very dependent upon GC behavior. - - - - - 381cfaed by Ben Gamari at 2023-08-17T15:17:17-04:00 ghc-heap: Don't expose stack dirty and marking fields These are GC metadata and are not relevant to the end-user. Moreover, they are unstable which makes ghc-heap harder to test than necessary. - - - - - 16828ca5 by Luite Stegeman at 2023-08-21T18:42:53-04:00 bump process submodule to include macOS fix and JS support - - - - - b4d5f6ed by Matthew Pickering at 2023-08-21T18:43:29-04:00 ci: Add support for triggering test-primops pipelines This commit adds 4 ways to trigger testing with test-primops. 1. Applying the ~test-primops label to a validate pipeline. 2. A manually triggered job on a validate pipeline 3. A nightly pipeline job 4. A release pipeline job Fixes #23695 - - - - - 32c50daa by Matthew Pickering at 2023-08-21T18:43:29-04:00 Add test-primops label support The test-primops CI job requires some additional builds in the validation pipeline, so we make sure to enable these jobs when test-primops label is set. - - - - - 73ca8340 by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "Aarch ncg: Optimize immediate use for address calculations" This reverts commit 8f3b3b78a8cce3bd463ed175ee933c2aabffc631. See #23793 - - - - - 5546ad9e by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "AArch NCG: Pure refactor" This reverts commit 00fb6e6b06598752414a0b9a92840fb6ca61338d. See #23793 - - - - - 02dfcdc2 by Matthew Pickering at 2023-08-21T18:43:29-04:00 Revert "Aarch64 NCG: Use encoded immediates for literals." This reverts commit 40425c5021a9d8eb5e1c1046e2d5fa0a2918f96c. See #23793 ------------------------- Metric Increase: T4801 T5321FD T5321Fun ------------------------- - - - - - 7be4a272 by Matthew Pickering at 2023-08-22T08:55:20+01:00 ci: Remove manually triggered test-ci job This doesn't work on slimmed down pipelines as the needed jobs don't exist. If you want to run test-primops then apply the label. - - - - - 76a4d11b by Jaro Reinders at 2023-08-22T08:08:13-04:00 Remove Ptr example from roles docs - - - - - 069729d3 by Bryan Richter at 2023-08-22T08:08:49-04:00 Guard against duplicate pipelines in forks - - - - - f861423b by Rune K. Svendsen at 2023-08-22T08:09:35-04:00 dump-decls: fix "Ambiguous module name"-error Fixes errors of the following kind, which happen when dump-decls is run on a package that contains a module name that clashes with that of another package. ``` dump-decls: <no location info>: error: Ambiguous module name `System.Console.ANSI.Types': it was found in multiple packages: ansi-terminal-0.11.4 ansi-terminal-types-0.11.5 ``` - - - - - edd8bc43 by Krzysztof Gogolewski at 2023-08-22T12:31:20-04:00 Fix MultiWayIf linearity checking (#23814) Co-authored-by: Thomas BAGREL <thomas.bagrel at tweag.io> - - - - - 4ba088d1 by konsumlamm at 2023-08-22T12:32:02-04:00 Update `Control.Concurrent.*` documentation - - - - - 015886ec by ARATA Mizuki at 2023-08-22T15:13:13-04:00 Support 128-bit SIMD on AArch64 via LLVM backend - - - - - 52a6d868 by Krzysztof Gogolewski at 2023-08-22T15:13:51-04:00 Testsuite cleanup - Remove misleading help text in perf_notes, ways are not metrics - Remove no_print_summary - this was used for Phabricator - In linters tests, run 'git ls-files' just once. Previously, it was called on each has_ls_files() - Add ghc-prim.cabal to gitignore, noticed in #23726 - Remove ghc-prim.cabal, it was accidentally committed in 524c60c8cd - - - - - ab40aa52 by Alan Zimmerman at 2023-08-22T15:14:28-04:00 EPA: Use Introduce [DeclTag] in AnnSortKey The AnnSortKey is used to keep track of the order of declarations for printing when the container has split them apart. This applies to HsValBinds and ClassDecl, ClsInstDecl. When making modifications to the list of declarations, the new order must be captured for when it must be printed. For each list of declarations (binds and sigs for a HsValBind) we can just store the list in order. To recreate the list when printing, we must merge them, and this is what the AnnSortKey records. It used to be indexed by SrcSpan, we now simply index by a marker as to which list to take the next item from. - - - - - e7db36c1 by sheaf at 2023-08-23T08:41:28-04:00 Don't attempt pattern synonym error recovery This commit gets rid of the pattern synonym error recovery mechanism (recoverPSB). The rationale is that the fake pattern synonym binding that the recovery mechanism introduced could lead to undesirable knock-on errors, and it isn't really feasible to conjure up a satisfactory binding as pattern synonyms can be used both in expressions and patterns. See Note [Pattern synonym error recovery] in GHC.Tc.TyCl.PatSyn. It isn't such a big deal to eagerly fail compilation on a pattern synonym that doesn't typecheck anyway. Fixes #23467 - - - - - 6ccd9d65 by Ben Gamari at 2023-08-23T08:42:05-04:00 base: Don't use Data.ByteString.Internals.memcpy This function is now deprecated from `bytestring`. Use `Foreign.Marshal.Utils.copyBytes` instead. Fixes #23880. - - - - - 0bfa0031 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Uniformly pass buildOptions to all builders in runBuilder In Builder.hs, runBuilderWith mostly ignores the buildOptions in BuildInfo. This leads to hard to diagnose bugs as any build options you pass with runBuilderWithCmdOptions are ignored for many builders. Solution: Uniformly pass buildOptions to the invocation of cmd. Fixes #23845 - - - - - 9cac8f11 by Matthew Pickering at 2023-08-23T13:43:48-04:00 Abstract windows toolchain setup This commit splits up the windows toolchain setup logic into two functions. * FP_INSTALL_WINDOWS_TOOLCHAIN - deals with downloading the toolchain if it isn't already downloaded * FP_SETUP_WINDOWS_TOOLCHAIN - sets the environment variables to point to the correct place FP_SETUP_WINDOWS_TOOLCHAIN is abstracted from the location of the mingw toolchain and also the eventual location where we will install the toolchain in the installed bindist. This is the first step towards #23608 - - - - - 6c043187 by Matthew Pickering at 2023-08-23T13:43:48-04:00 Generate build.mk for bindists The config.mk.in script was relying on some variables which were supposed to be set by build.mk but therefore never were when used to install a bindist. Specifically * BUILD_PROF_LIBS to determine whether we had profiled libraries or not * DYNAMIC_GHC_PROGRAMS to determine whether we had shared libraries or not Not only were these never set but also not really accurate because you could have shared libaries but still statically linked ghc executable. In addition variables like GhcLibWays were just never used, so those have been deleted from the script. Now instead we generate a build.mk file which just directly specifies which RtsWays we have supplied in the bindist and whether we have DYNAMIC_GHC_PROGRAMS. - - - - - fe23629b by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Add reloc-binary-dist-* targets This adds a command line option to build a "relocatable" bindist. The bindist is created by first creating a normal bindist and then installing it using the `RelocatableBuild=YES` option. This creates a bindist without any wrapper scripts pointing to the libdir. The motivation for this feature is that we want to ship relocatable bindists on windows and this method is more uniform than the ad-hoc method which lead to bugs such as #23608 and #23476 The relocatable bindist can be built with the "reloc-binary-dist" target and supports the same suffixes as the normal "binary-dist" command to specify the compression style. - - - - - 41cbaf44 by Matthew Pickering at 2023-08-23T13:43:48-04:00 packaging: Fix installation scripts on windows/RelocatableBuild case This includes quite a lot of small fixes which fix the installation makefile to work on windows properly. This also required fixing the RelocatableBuild variable which seemed to have been broken for a long while. Sam helped me a lot writing this patch by providing a windows machine to test the changes. Without him it would have taken ages to tweak everything. Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 03474456 by Matthew Pickering at 2023-08-23T13:43:48-04:00 ci: Build relocatable bindist on windows We now build the relocatable bindist target on windows, which means we test and distribute the new method of creating a relocatable bindist. - - - - - d0b48113 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Add error when trying to build binary-dist target on windows The binary dist produced by `binary-dist` target doesn't work on windows because of the wrapper script the makefile installs. In order to not surprise any packagers we just give an error if someone tries to build the old binary-dist target rather than the reloc-binary-dist target. - - - - - 7cbf9361 by Matthew Pickering at 2023-08-23T13:43:48-04:00 hadrian: Remove query' logic to use tooldir - - - - - 03fad42e by Matthew Pickering at 2023-08-23T13:43:48-04:00 configure: Set WindresCmd directly and removed unused variables For some reason there was an indirection via the Windres variable before setting WindresCmd. That indirection led to #23855. I then also noticed that these other variables were just not used anywhere when trying to work out what the correct condition was for this bit of the configure script. - - - - - c82770f5 by sheaf at 2023-08-23T13:43:48-04:00 Apply shellcheck suggestion to SUBST_TOOLDIR - - - - - 896e35e5 by sheaf at 2023-08-23T13:44:34-04:00 Compute hints from TcSolverReportMsg This commit changes how hints are handled in conjunction with constraint solver report messages. Instead of storing `[GhcHint]` in the TcRnSolverReport error constructor, we compute the hints depending on the underlying TcSolverReportMsg. This disentangles the logic and makes it easier to add new hints for certain errors. - - - - - a05cdaf0 by Alexander Esgen at 2023-08-23T13:45:16-04:00 users-guide: remove note about fatal Haddock parse failures - - - - - 4908d798 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Introduce Data.Enum - - - - - f59707c7 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num.Integer - - - - - b1054053 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num - - - - - 6baa481d by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Num.Natural - - - - - 2ac15233 by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Float - - - - - f3c489de by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add export list to GHC.Real - - - - - 94f59eaa by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Eliminate module reexport in GHC.Exception The metric increase here isn't strictly due to this commit but it's a rather small, incidental change. Metric Increase: T8095 T13386 Metric Decrease: T8095 T13386 T18304 - - - - - be1fc7df by Ben Gamari at 2023-08-23T17:36:41-04:00 base: Add disclaimers in internal modules To warn users that these modules are internal and their interfaces may change with little warning. As proposed in Core Libraries Committee #146 [CLC146]. [CLC146]: https://github.com/haskell/core-libraries-committee/issues/146 - - - - - 0326f3f4 by sheaf at 2023-08-23T17:37:29-04:00 Bump Cabal submodule We need to bump the Cabal submodule to include commit ec75950 which fixes an issue with a dodgy import Rep(..) which relied on GHC bug #23570 - - - - - 0504cd08 by Facundo Domínguez at 2023-08-23T17:38:11-04:00 Fix typos in the documentation of Data.OldList.permutations - - - - - 1420b8cb by Antoine Leblanc at 2023-08-24T16:18:17-04:00 Be more eager in TyCon boot validity checking This commit performs boot-file consistency checking for TyCons into checkValidTyCl. This ensures that we eagerly catch any mismatches, which prevents the compiler from seeing these inconsistencies and panicking as a result. See Note [TyCon boot consistency checking] in GHC.Tc.TyCl. Fixes #16127 - - - - - d99c816f by Finley McIlwaine at 2023-08-24T16:18:55-04:00 Refactor estimation of stack info table provenance This commit greatly refactors the way we compute estimated provenance for stack info tables. Previously, this process was done using an entirely separate traversal of the whole Cmm code stream to build the map from info tables to source locations. The separate traversal is now fused with the Cmm code generation pipeline in GHC.Driver.Main. This results in very significant code generation speed ups when -finfo-table-map is enabled. In testing, this patch reduces code generation times by almost 30% with -finfo-table-map and -O0, and 60% with -finfo-table-map and -O1 or -O2 . Fixes #23103 - - - - - d3e0124c by Finley McIlwaine at 2023-08-24T16:18:55-04:00 Add a test checking overhead of -finfo-table-map We want to make sure we don't end up with poor codegen performance resulting from -finfo-table-map again as in #23103. This test adds a performance test tracking total allocations while compiling ExactPrint with -finfo-table-map. - - - - - fcfc1777 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Add export list to GHC.Llvm.MetaData - - - - - 5880fff6 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Allow LlvmLits in MetaExprs This omission appears to be an oversight. - - - - - 86ce92a2 by Ben Gamari at 2023-08-25T10:58:16-04:00 compiler: Move platform feature predicates to GHC.Driver.DynFlags These are useful in `GHC.Driver.Config.*`. - - - - - a6a38742 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Introduce infrastructure for module flag metadata - - - - - e9af2cf3 by Ben Gamari at 2023-08-25T10:58:16-04:00 llvmGen: Don't pass stack alignment via command line As of https://reviews.llvm.org/D103048 LLVM no longer supports the `-stack-alignment=...` flag. Instead this information is passed via a module flag metadata node. This requires dropping support for LLVM 11 and 12. Fixes #23870 - - - - - a936f244 by Alan Zimmerman at 2023-08-25T10:58:56-04:00 EPA: Keep track of "in" token for WarningTxt category A warning can now be written with a category, e.g. {-# WARNInG in "x-c" e "d" #-} Keep track of the location of the 'in' keyword and string, as well as the original SourceText of the label, in case it uses character escapes. - - - - - 3df8a653 by Matthew Pickering at 2023-08-25T17:42:18-04:00 Remove redundant import in InfoTableProv The copyBytes function is provided by the import of Foreign. Fixes #23889 - - - - - d6f807ec by Ben Gamari at 2023-08-25T17:42:54-04:00 gitlab/issue-template: Mention report-a-bug - - - - - 50b9f75d by Artin Ghasivand at 2023-08-26T20:02:50+03:30 Added StandaloneKindSignature examples to replace CUSKs ones - - - - - 2f6309a4 by Vladislav Zavialov at 2023-08-27T03:47:37-04:00 Remove outdated CPP in compiler/* and template-haskell/* The boot compiler was bumped to 9.4 in cebb5819b43. There is no point supporting older GHC versions with CPP. - - - - - 5248fdf7 by Zubin Duggal at 2023-08-28T15:01:09+05:30 testsuite: Add regression test for #23861 Simon says this was fixed by commit 8d68685468d0b6e922332a3ee8c7541efbe46137 Author: sheaf <sam.derbyshire at gmail.com> Date: Fri Aug 4 15:28:45 2023 +0200 Remove zonk in tcVTA - - - - - b6903f4d by Zubin Duggal at 2023-08-28T12:33:58-04:00 testsuite: Add regression test for #23864 Simon says this was fixed by commit 59202c800f2c97c16906120ab2561f6e1556e4af Author: Sebastian Graf <sebastian.graf at kit.edu> Date: Fri Mar 31 17:35:22 2023 +0200 CorePrep: Eliminate EmptyCase and unsafeEqualityProof in CoreToStg instead We eliminate EmptyCase by way of `coreToStg (Case e _ _ []) = coreToStg e` now. The main reason is that it plays far better in conjunction with eta expansion (as we aim to do for arguments in CorePrep, #23083), because we can discard any arguments, `(case e of {}) eta == case e of {}`, whereas in `(e |> co) eta` it's impossible to discard the argument. - - - - - 9eecdf33 by sheaf at 2023-08-28T18:54:06+00:00 Remove ScopedTypeVariables => TypeAbstractions This commit implements [amendment 604](https://github.com/ghc-proposals/ghc-proposals/pull/604/) to [GHC proposal 448](https://github.com/ghc-proposals/ghc-proposals/pull/448) by removing the implication of language extensions ScopedTypeVariables => TypeAbstractions To limit breakage, we now allow type arguments in constructor patterns when both ScopedTypeVariables and TypeApplications are enabled, but we emit a warning notifying the user that this is deprecated behaviour that will go away starting in GHC 9.12. Fixes #23776 - - - - - fadd5b4d by sheaf at 2023-08-28T18:54:06+00:00 .stderr: ScopedTypeVariables =/> TypeAbstractions This commit accepts testsuite changes for the changes in the previous commit, which mean that TypeAbstractions is no longer implied by ScopedTypeVariables. - - - - - 4f5fb500 by Greg Steuck at 2023-08-29T07:55:13-04:00 Repair `codes` test on OpenBSD by explicitly requesting extended RE - - - - - 6bbde581 by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Add test for #23540 `T23540.hs` makes use of `explainEv` from `HieQueries.hs`, so `explainEv` has been moved to `TestUtils.hs`. - - - - - 257bb3bd by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Add test for #23120 - - - - - 4f192947 by Vasily Sterekhov at 2023-08-29T12:06:58-04:00 Make some evidence uses reachable by toHie Resolves #23540, #23120 This adds spans to certain expressions in the typechecker and renamer, and lets 'toHie' make use of those spans. Therefore the relevant evidence uses for the following syntax will now show up under the expected nodes in 'HieAst's: - Overloaded literals ('IsString', 'Num', 'Fractional') - Natural patterns and N+k patterns ('Eq', 'Ord', and instances from the overloaded literals being matched on) - Arithmetic sequences ('Enum') - Monadic bind statements ('Monad') - Monadic body statements ('Monad', 'Alternative') - ApplicativeDo ('Applicative', 'Functor') - Overloaded lists ('IsList') Also see Note [Source locations for implicit function calls] In the process of handling overloaded lists I added an extra 'SrcSpan' field to 'VAExpansion' - this allows us to more accurately reconstruct the locations from the renamer in 'rebuildHsApps'. This also happens to fix #23120. See the additions to Note [Looking through HsExpanded] - - - - - fe9fcf9d by Sylvain Henry at 2023-08-29T12:07:50-04:00 ghc-heap: rename C file (fix #23898) - - - - - b60d6576 by Krzysztof Gogolewski at 2023-08-29T12:08:29-04:00 Misc cleanup - Builtin.PrimOps: ReturnsAlg was used only for unboxed tuples. Rename to ReturnsTuple. - Builtin.Utils: use SDoc for a panic message. The comment about <<details unavailable>> was obsoleted by e8d356773b56. - TagCheck: fix wrong logic. It was zipping a list 'args' with its version 'args_cmm' after filtering. - Core.Type: remove an outdated 1999 comment about unlifted polymorphic types - hadrian: remove leftover debugging print - - - - - 3054fd6d by Krzysztof Gogolewski at 2023-08-29T12:09:08-04:00 Add a regression test for #23903 The bug has been fixed by commit bad2f8b8aa8424. - - - - - 21584b12 by Ben Gamari at 2023-08-29T19:52:02-04:00 README: Refer to ghc-hq repository for contributor and governance information - - - - - e542d590 by sheaf at 2023-08-29T19:52:40-04:00 Export setInertSet from GHC.Tc.Solver.Monad We used to export getTcSInerts and setTcSInerts from GHC.Tc.Solver.Monad. These got renamed to getInertSet/setInertSet in e1590ddc. That commit also removed the export of setInertSet, but that function is useful for the GHC API. - - - - - 694ec5b1 by sheaf at 2023-08-30T10:18:32-04:00 Don't bundle children for non-parent Avails We used to bundle all children of the parent Avail with things that aren't the parent, e.g. with class C a where type T a meth :: .. we would bundle the whole Avail (C, T, meth) with all of C, T and meth, instead of only with C. Avoiding this fixes #23570 - - - - - d926380d by Krzysztof Gogolewski at 2023-08-30T10:19:08-04:00 Fix typos - - - - - d07080d2 by Josh Meredith at 2023-08-30T19:42:32-04:00 JS: Implement missing C functions `rename`, `realpath`, and `getcwd` (#23806) - - - - - e2940272 by David Binder at 2023-08-30T19:43:08-04:00 Bump submodules of hpc and hpc-bin to version 0.7.0.0 hpc 0.7.0.0 dropped SafeHaskell safety guarantees in order to simplify compatibility with newer versions of the directory package which dropped all SafeHaskell guarantees. - - - - - 5d56d05c by David Binder at 2023-08-30T19:43:08-04:00 Bump hpc bound in ghc.cabal.in - - - - - 99fff496 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 ghc classes documentation: rm redundant comment - - - - - fe021bab by Dominik Schrempf at 2023-08-31T00:04:46-04:00 prelude documentation: various nits - - - - - 48c84547 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 integer documentation: minor corrections - - - - - 20cd12f4 by Dominik Schrempf at 2023-08-31T00:04:46-04:00 real documentation: nits - - - - - dd39bdc0 by sheaf at 2023-08-31T00:05:27-04:00 Add a test for #21765 This issue (of reporting a constraint as being redundant even though removing it causes typechecking to fail) was fixed in aed1974e. This commit simply adds a regression test. Fixes #21765 - - - - - f1ec3628 by Andrew Lelechenko at 2023-08-31T23:53:30-04:00 Export foldl' from Prelude and bump submodules See https://github.com/haskell/core-libraries-committee/issues/167 for discussion Metric Decrease: T8095 T13386 Metric Increase: T13386 T8095 T8095 ghc/alloc decreased on x86_64, but increased on aarch64. T13386 ghc/alloc decreased on x86_64-windows, but increased on other platforms. Neither has anything to do with `foldl'`, so I conclude that both are flaky. - - - - - 3181b97d by Gergő Érdi at 2023-08-31T23:54:06-04:00 Allow cross-tyvar defaulting proposals from plugins Fixes #23832. - - - - - 495b2241 by Matthew Pickering at 2023-09-01T13:02:07+02:00 Fix issue with duplicate reexported definitions (T23616) When a class method was reexported, it's default methods were also showing up in the generated html page. The simplest and most non-invasive fix is to not look for the default method if we are just exporting the class method.. because the backends are just showing default methods when the whole class is exported. In general it would be worthwhile to rewrite this bit of code I think as the logic and what gets included is split over `lookupDocs` and `availExportDecl` it would be clearer to combine the two. The result of lookupDocs is always just passed to availExportDecl so it seems simpler and more obvious to just write the function directly. - - - - - e4af506e by Sebastian Graf at 2023-09-01T14:29:12-04:00 Clarify Note [GlobalId/LocalId] after CorePrep (#23797) Fixes #23797. - - - - - ac29787c by Sylvain Henry at 2023-09-01T14:30:02-04:00 Fix warning with UNPACK on sum type (#23921) - - - - - 9765ac7b by Zubin Duggal at 2023-09-05T00:37:45-04:00 hadrian: track python dependencies in doc rules - - - - - 1578215f by sheaf at 2023-09-05T00:38:26-04:00 Bump Haddock to fix #23616 This commit updates the Haddock submodule to include the fix to #23616. Fixes #23616 - - - - - 5a2fe35a by David Binder at 2023-09-05T00:39:07-04:00 Fix example in GHC user guide in SafeHaskell section The example given in the SafeHaskell section uses an implementation of Monad which no longer works. This MR removes the non-canonical return instance and adds the necessary instances of Functor and Applicative. - - - - - 291d81ae by Matthew Pickering at 2023-09-05T14:03:10-04:00 driver: Check transitive closure of haskell package dependencies when deciding whether to relink We were previously just checking whether direct package dependencies had been modified. This caused issues when compiling without optimisations as we wouldn't relink the direct dependency if one of its dependenices changed. Fixes #23724 - - - - - 35da0775 by Krzysztof Gogolewski at 2023-09-05T14:03:47-04:00 Re-export GHC.Utils.Panic.Plain from GHC.Utils.Panic Fixes #23930 - - - - - 6551824d by Finley McIlwaine at 2023-09-05T13:06:57-07:00 Remove fake export of `FUN` from Prelude This prevents `data FUN` from being shown at the top of the Prelude docs. Fixes \#23920 on GHC. - - - - - 3930d793 by Jaro Reinders at 2023-09-06T18:42:55-04:00 Make STG rewriter produce updatable closures - - - - - 0104221a by Krzysztof Gogolewski at 2023-09-06T18:43:32-04:00 configure: update message to use hadrian (#22616) - - - - - b34f8586 by Alan Zimmerman at 2023-09-07T10:58:38-04:00 EPA: Incorrect locations for UserTyVar with '@' In T13343.hs, the location for the @ is not within the span of the surrounding UserTyVar. type Bad @v = (forall (v1 :: RuntimeRep) (a1 :: TYPE v). a1) :: TYPE v Widen it so it is captured. Closes #23887 - - - - - 8046f020 by Finley McIlwaine at 2023-09-07T10:59:15-04:00 Bump haddock submodule to fix #23920 Removes the fake export of `FUN` from Prelude. Fixes #23920. Bumps haddock submodule. - - - - - e0aa8c6e by Krzysztof Gogolewski at 2023-09-07T11:00:03-04:00 Fix wrong role in mkSelCo_maybe In the Lint failure in #23938, we start with a coercion Refl :: T a ~R T a, and call mkSelCo (SelTyCon 1 nominal) Refl. The function incorrectly returned Refl :: a ~R a. The returned role should be nominal, according to the SelCo rule: co : (T s1..sn) ~r0 (T t1..tn) r = tyConRole tc r0 i ---------------------------------- SelCo (SelTyCon i r) : si ~r ti In this test case, r is nominal while r0 is representational. - - - - - 1d92f2df by Gergő Érdi at 2023-09-08T04:04:30-04:00 If we have multiple defaulting plugins, then we should zonk in between them after any defaulting has taken place, to avoid a defaulting plugin seeing a metavariable that has already been filled. Fixes #23821. - - - - - eaee4d29 by Gergő Érdi at 2023-09-08T04:04:30-04:00 Improvements to the documentation of defaulting plugins Based on @simonpj's draft and comments in !11117 - - - - - ede3df27 by Alan Zimmerman at 2023-09-08T04:05:06-04:00 EPA: Incorrect span for LWarnDec GhcPs The code (from T23465.hs) {-# WARNInG in "x-c" e "d" #-} e = e gives an incorrect span for the LWarnDecl GhcPs Closes #23892 It also fixes the Test23465/Test23464 mixup - - - - - a0ccef7a by Krzysztof Gogolewski at 2023-09-08T04:05:42-04:00 Valid hole fits: don't suggest unsafeCoerce (#17940) - - - - - 9ab5a448 by Alan Zimmerman at 2023-09-08T18:26:53+01:00 Match changes in wip/az/T23885-unicode-funtycon - - - - - 88b942c4 by Oleg Grenrus at 2023-09-08T19:58:42-04:00 Add warning for badly staged types. Resolves #23829. The stage violation results in out-of-bound names in splices. Technically this is an error, but someone might rely on this!? Internal changes: - we now track stages for TyVars. - thLevel (RunSplice _) = 0, instead of panic, as reifyInstances does in fact rename its argument type, and it can contain variables. - - - - - 9861f787 by Ben Gamari at 2023-09-08T19:59:19-04:00 rts: Fix invalid symbol type I suspect this code is dead since we haven't observed this failing despite the obviously incorrect macro name. - - - - - 03ed6a9a by Ben Gamari at 2023-09-08T19:59:19-04:00 testsuite: Add simple test exercising C11 atomics in GHCi See #22012. - - - - - 1aa5733a by Ben Gamari at 2023-09-08T19:59:19-04:00 rts/RtsSymbols: Add AArch64 outline atomic operations Fixes #22012 by adding the symbols described in https://github.com/llvm/llvm-project/blob/main/llvm/docs/Atomics.rst#libcalls-atomic. Ultimately this would be better addressed by #22011, but this is a first step in the right direction and fixes the immediate symptom. Note that we dropped the `__arch64_cas16` operations as these provided by all platforms's compilers. Also, we don't link directly against the libgcc/compiler-rt definitions but rather provide our own wrappers to work around broken toolchains (e.g. https://bugs.gentoo.org/868018). Generated via https://gitlab.haskell.org/ghc/ghc/-/snippets/5733. - - - - - 8f7d3041 by Matthew Pickering at 2023-09-08T19:59:55-04:00 ci: Build debian12 and fedora38 bindists This adds builds for the latest releases for fedora and debian We build these bindists in nightly and release pipelines. - - - - - a1f0d55c by Felix Leitz at 2023-09-08T20:00:37-04:00 Fix documentation around extension implication for MultiParamTypeClasses/ConstrainedClassMethods. - - - - - 98166389 by Teo Camarasu at 2023-09-12T04:30:54-04:00 docs: move -xn flag beside --nonmoving-gc It makes sense to have these beside each other as they are aliases. - - - - - f367835c by Teo Camarasu at 2023-09-12T04:30:55-04:00 nonmoving: introduce a family of dense allocators Supplement the existing power 2 sized nonmoving allocators with a family of dense allocators up to a configurable threshold. This should reduce waste from rounding up block sizes while keeping the amount of allocator sizes manageable. This patch: - Adds a new configuration option `--nonmoving-dense-allocator-count` to control the amount of these new dense allocators. - Adds some constants to `NonmovingAllocator` in order to keep marking fast with the new allocators. Resolves #23340 - - - - - 2b07bf2e by Teo Camarasu at 2023-09-12T04:30:55-04:00 Add changelog entry for #23340 - - - - - f96fe681 by sheaf at 2023-09-12T04:31:44-04:00 Use printGhciException in run{Stmt, Decls} When evaluating statements in GHCi, we need to use printGhciException instead of the printException function that GHC provides in order to get the appropriate error messages that are customised for ghci use. - - - - - d09b932b by psilospore at 2023-09-12T04:31:44-04:00 T23686: Suggest how to enable Language Extension when in ghci Fixes #23686 - - - - - da30f0be by Matthew Craven at 2023-09-12T04:32:24-04:00 Unarise: Split Rubbish literals in function args Fixes #23914. Also adds a check to STG lint that these args are properly unary or nullary after unarisation - - - - - 261b6747 by Matthew Pickering at 2023-09-12T04:33:04-04:00 darwin: Bump MAXOSX_DEPLOYMENT_TARGET to 10.13 This bumps the minumum supported version to 10.13 (High Sierra) which is 6 years old at this point. Fixes #22938 - - - - - f418f919 by Mario Blažević at 2023-09-12T04:33:45-04:00 Fix TH pretty-printing of nested GADTs, issue #23937 This commit fixes `Language.Haskell.TH.Ppr.pprint` so that it correctly pretty-prints GADTs declarations contained within data family instances. Fixes #23937 - - - - - d7a64753 by John Ericson at 2023-09-12T04:34:20-04:00 Put hadrian non-bootstrap plans through `jq` This makes it possible to review changes with conventional diffing tools. This is picking up where ad8cfed4195b1bbfc15b841f010e75e71f63157d left off. - - - - - ff0a709a by Sylvain Henry at 2023-09-12T08:46:28-04:00 JS: fix some tests - Tests using Setup programs need to pass --with-hc-pkg - Several other fixes See https://gitlab.haskell.org/ghc/ghc/-/wikis/javascript-backend/bug_triage for the current status - - - - - fc86f0e7 by Krzysztof Gogolewski at 2023-09-12T08:47:04-04:00 Fix in-scope set assertion failure (#23918) Patch by Simon - - - - - 21a906c2 by Matthew Pickering at 2023-09-12T17:21:04+02:00 Add -Winconsistent-flags warning The warning fires when inconsistent command line flags are passed. For example: * -dynamic-too and -dynamic * -dynamic-too on windows * -O and --interactive * etc This is on by default and allows users to control whether the warning is displayed and whether it should be an error or not. Fixes #22572 - - - - - dfc4f426 by Krzysztof Gogolewski at 2023-09-12T20:31:35-04:00 Avoid serializing BCOs with the internal interpreter Refs #23919 - - - - - 9217950b by Finley McIlwaine at 2023-09-13T08:06:03-04:00 Fix numa auto configure - - - - - 98e7c1cf by Simon Peyton Jones at 2023-09-13T08:06:40-04:00 Add -fno-cse to T15426 and T18964 This -fno-cse change is to avoid these performance tests depending on flukey CSE stuff. Each contains several independent tests, and we don't want them to interact. See #23925. By killing CSE we expect a 400% increase in T15426, and 100% in T18964. Metric Increase: T15426 T18964 - - - - - 236a134e by Simon Peyton Jones at 2023-09-13T08:06:40-04:00 Tiny refactor canEtaReduceToArity was only called internally, and always with two arguments equal to zero. This patch just specialises the function, and renames it to cantEtaReduceFun. No change in behaviour. - - - - - 56b403c9 by Ben Gamari at 2023-09-13T19:21:36-04:00 spec-constr: Lift argument limit for SPEC-marked functions When the user adds a SPEC argument to a function, they are informing us that they expect the function to be specialised. However, previously this instruction could be preempted by the specialised-argument limit (sc_max_args). Fix this. This fixes #14003. - - - - - 6840012e by Simon Peyton Jones at 2023-09-13T19:22:13-04:00 Fix eta reduction Issue #23922 showed that GHC was bogusly eta-reducing a join point. We should never eta-reduce (\x -> j x) to j, if j is a join point. It is extremly difficult to trigger this bug. It took me 45 mins of trying to make a small tests case, here immortalised as T23922a. - - - - - e5c00092 by Andreas Klebinger at 2023-09-14T08:57:43-04:00 Profiling: Properly escape characters when using `-pj`. There are some ways in which unusual characters like quotes or others can make it into cost centre names. So properly escape these. Fixes #23924 - - - - - ec490578 by Ellie Hermaszewska at 2023-09-14T08:58:24-04:00 Use clearer example variable names for bool eliminator - - - - - 5126a2fe by Sylvain Henry at 2023-09-15T11:18:02-04:00 Add missing int64/word64-to-double/float rules (#23907) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/203 - - - - - 566ef411 by Mario Blažević at 2023-09-15T11:18:43-04:00 Fix and test TH pretty-printing of type operator role declarations This commit fixes and tests `Language.Haskell.TH.Ppr.pprint` so that it correctly pretty-prints `type role` declarations for operator names. Fixes #23954 - - - - - 8e05c54a by Simon Peyton Jones at 2023-09-16T01:42:33-04:00 Use correct FunTyFlag in adjustJoinPointType As the Lint error in #23952 showed, the function adjustJoinPointType was failing to adjust the FunTyFlag when adjusting the type. I don't think this caused the seg-fault reported in the ticket, but it is definitely. This patch fixes it. It is tricky to come up a small test case; Krzysztof came up with this one, but it only triggers a failure in GHC 9.6. - - - - - 778c84b6 by Pierre Le Marre at 2023-09-16T01:43:15-04:00 Update to Unicode 15.1.0 See: https://www.unicode.org/versions/Unicode15.1.0/ - - - - - f9d79a6c by Alan Zimmerman at 2023-09-18T00:00:14-04:00 EPA: track unicode version for unrestrictedFunTyCon Closes #23885 Updates haddock submodule - - - - - 9374f116 by Andrew Lelechenko at 2023-09-18T00:00:54-04:00 Bump parsec submodule to allow text-2.1 and bytestring-0.12 - - - - - 7ca0240e by Ben Gamari at 2023-09-18T15:16:48-04:00 base: Advertise linear time of readFloat As noted in #23538, `readFloat` has runtime that scales nonlinearly in the size of its input. Consequently, its use on untrusted input can be exploited as a denial-of-service vector. Point this out and suggest use of `read` instead. See #23538. - - - - - f3f58f13 by Simon Peyton Jones at 2023-09-18T15:17:24-04:00 Remove dead code GHC.CoreToStg.Prep.canFloat This function never fires, so we can delete it: #23965. - - - - - ccab5b15 by Ben Gamari at 2023-09-18T15:18:02-04:00 base/changelog: Move fix for #23907 to 9.8.1 section Since the fix was backported to 9.8.1 - - - - - 51b57d65 by Matthew Pickering at 2023-09-19T08:44:31-04:00 Add aarch64 alpine bindist This is dynamically linked and makes creating statically linked executables more straightforward. Fixes #23482 - - - - - 02c87213 by Matthew Pickering at 2023-09-19T08:44:31-04:00 Add aarch64-deb11 bindist This adds a debian 11 release job for aarch64. Fixes #22005 - - - - - 8b61dfd6 by Alexis King at 2023-09-19T08:45:13-04:00 Don’t store the async exception masking state in CATCH frames - - - - - 86d2971e by doyougnu at 2023-09-19T19:08:19-04:00 compiler,ghci: error codes link to HF error index closes: #23259 - adds -fprint-error-index-links={auto|always|never} flag - - - - - 5f826c18 by sheaf at 2023-09-19T19:09:03-04:00 Pass quantified tyvars in tcDefaultAssocDecl This commit passes the correct set of quantified type variables written by the user in associated type default declarations for validity checking. This ensures that validity checking of associated type defaults mirrors that of standalone type family instances. Fixes #23768 (see testcase T23734 in subsequent commit) - - - - - aba18424 by sheaf at 2023-09-19T19:09:03-04:00 Avoid panic in mkGADTVars This commit avoids panicking in mkGADTVars when we encounter a type variable as in #23784 that is bound by a user-written forall but not actually used. Fixes #23784 - - - - - a525a92a by sheaf at 2023-09-19T19:09:03-04:00 Adjust reporting of unused tyvars in data FamInsts This commit adjusts the validity checking of data family instances to improve the reporting of unused type variables. See Note [Out of scope tvs in data family instances] in GHC.Tc.Validity. The problem was that, in a situation such as data family D :: Type data instance forall (d :: Type). D = MkD the RHS passed to 'checkFamPatBinders' would be the TyCon app R:D d which mentions the type variable 'd' quantified in the user-written forall. Thus, when computing the set of unused type variables in the RHS of the data family instance, we would find that 'd' is used, and report a strange error message that would say that 'd' is not bound on the LHS. To fix this, we special-case the data-family instance case, manually extracting all the type variables that appear in the arguments of all the data constructores of the data family instance. Fixes #23778 - - - - - 28dd52ee by sheaf at 2023-09-19T19:09:03-04:00 Unused tyvars in FamInst: only report user tyvars This commit changes how we perform some validity checking for coercion axioms to mirror how we handle default declarations for associated type families. This allows us to keep track of whether type variables in type and data family instances were user-written or not, in order to only report the user-written ones in "unused type variable" error messages. Consider for example: {-# LANGUAGE PolyKinds #-} type family F type instance forall a. F = () In this case, we get two quantified type variables, (k :: Type) and (a :: k); the second being user-written, but the first is introduced by the typechecker. We should only report 'a' as being unused, as the user has no idea what 'k' is. Fixes #23734 - - - - - 1eed645c by sheaf at 2023-09-19T19:09:03-04:00 Validity: refactor treatment of data families This commit refactors the reporting of unused type variables in type and data family instances to be more principled. This avoids ad-hoc logic in the treatment of data family instances. - - - - - 35bc506b by John Ericson at 2023-09-19T19:09:40-04:00 Remove `ghc-cabal` It is dead code since the Make build system was removed. I tried to go over every match of `git grep -i ghc-cabal` to find other stray bits. Some of those might be workarounds that can be further removed. - - - - - 665ca116 by John Paul Adrian Glaubitz at 2023-09-19T19:10:39-04:00 Re-add unregisterised build support for sparc and sparc64 Closes #23959 - - - - - 142f8740 by Matthew Pickering at 2023-09-19T19:11:16-04:00 Bump ci-images to use updated version of Alex Fixes #23977 - - - - - fa977034 by John Ericson at 2023-09-21T12:55:25-04:00 Use Cabal 3.10 for Hadrian We need the newer version for `CABAL_FLAG_*` env vars for #17191. - - - - - a5d22cab by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: `need` any `configure` script we will call When the script is changed, we should reconfigure. - - - - - db882b57 by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: Make it easier to debug Cabal configure Right now, output is squashed. This make per-package configure scripts extremely hard to maintain, because we get vague "library is missing" errors when the actually probably is usually completely unrelated except for also involving the C/C++ toolchain. (I can always pass `-VVV` to Hadrian locally, but these errors are subtle and I often cannot reproduce them locally!) `--disable-option-checking` was added back in 75c6e0684dda585c37b4ac254cd7a13537a59a91 but seems to be a bit overkill; if other flags are passed that are not recognized behind the two from Cabal mentioned in the former comment, we *do* want to know about it. - - - - - 7ed65f5a by John Ericson at 2023-09-21T12:55:25-04:00 hadrian: Increase verbosity of certain cabal commands This is a hack to get around the cabal function we're calling *decreasing* the verbosity it passes to another function, which is the stuff we often actually care about. Sigh. Keeping this a separate commit so if this makes things too verbose it is easy to revert. - - - - - a4fde569 by John Ericson at 2023-09-21T12:55:25-04:00 rts: Move most external symbols logic to the configure script This is much more terse because we are programmatically handling the leading underscore. `findPtr` however is still handled in the Cabal file because we need a newer Cabal to pass flags to the configure script automatically. Co-Authored-By: Ben Gamari <ben at well-typed.com> - - - - - 56cc85fb by Andrew Lelechenko at 2023-09-21T12:56:21-04:00 Bump Cabal submodule to allow text-2.1 and bytestring-0.12 - - - - - 0cd6148c by Matthew Pickering at 2023-09-21T12:56:21-04:00 hadrian: Generate Distribution/Fields/Lexer.x before creating a source-dist - - - - - b10ba6a3 by Andrew Lelechenko at 2023-09-21T12:56:21-04:00 Bump hadrian's index-state to upgrade alex at least to 3.2.7.3 - - - - - 11ecc37b by Luite Stegeman at 2023-09-21T12:57:03-04:00 JS: correct file size and times Programs produced by the JavaScript backend were returning incorrect file sizes and modification times, causing cabal related tests to fail. This fixes the problem and adds an additional test that verifies basic file information operations. fixes #23980 - - - - - b35fd2cd by Ben Gamari at 2023-09-21T12:57:39-04:00 gitlab-ci: Drop libiserv from upload_ghc_libs libiserv has been merged into the ghci package. - - - - - 37ad04e8 by Ben Gamari at 2023-09-21T12:58:15-04:00 testsuite: Fix Windows line endings - - - - - 5795b365 by Ben Gamari at 2023-09-21T12:58:15-04:00 testsuite: Use makefile_test - - - - - 15118740 by Ben Gamari at 2023-09-21T12:58:55-04:00 system-cxx-std-lib: Add license and description - - - - - 0208f1d5 by Ben Gamari at 2023-09-21T12:59:33-04:00 gitlab/issue-templates: Rename bug.md -> default.md So that it is visible by default. - - - - - 23cc3f21 by Andrew Lelechenko at 2023-09-21T20:18:11+01:00 Bump submodule text to 2.1 - - - - - b8e4fe23 by Andrew Lelechenko at 2023-09-22T20:05:05-04:00 Bump submodule unix to 2.8.2.1 - - - - - 54b2016e by John Ericson at 2023-09-23T11:40:41-04:00 Move lib{numa,dw} defines to RTS configure Clean up the m4 to handle the auto case always and be more consistent. Also simplify the CPP --- we should always have both headers if we are using libnuma. "side effects" (AC_DEFINE, and AC_SUBST) are removed from the macros to better separate searching from actions taken based on search results. This might seem overkill now, but will make shuffling logic between configure scripts easier later. The macro comments are converted from `dnl` to `#` following the recomendation in https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Macro-Definitions.html - - - - - d51b601b by John Ericson at 2023-09-23T11:40:50-04:00 Shuffle libzstd configuring between scripts Like the prior commit for libdw and libnuma, `AC_DEFINE` to RTS configure, `AC_SUBST` goes to the top-level configure script, and the documentation of the m4 macro is improved. - - - - - d1425af0 by John Ericson at 2023-09-23T11:41:03-04:00 Move `FP_ARM_OUTLINE_ATOMICS` to RTS configure It is just `AC_DEFINE` it belongs there instead. - - - - - 18de37e4 by John Ericson at 2023-09-23T11:41:03-04:00 Move mmap in the runtime linker check to the RTS configure `AC_DEFINE` should go there instead. - - - - - 74132c2b by Andrew Lelechenko at 2023-09-25T21:56:54-04:00 Elaborate comment on GHC_NO_UNICODE - - - - - de142aa2 by Ben Gamari at 2023-09-26T15:25:03-04:00 gitlab-ci: Mark T22012 as broken on CentOS 7 Due to #23979. - - - - - 6a896ce8 by Teo Camarasu at 2023-09-26T15:25:39-04:00 hadrian: better error for failing to find file's dependencies Resolves #24004 - - - - - d697a6c2 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Refactor uses of `partitionEithers . map` This patch changes occurences of the idiom `partitionEithers (map f xs)` by the simpler form `partitionWith f xs` where `partitionWith` is the utility function defined in `GHC.Utils.Misc`. Resolves: #23953 - - - - - 8a2968b7 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Refactor uses of `partitionEithers <$> mapM f xs` This patch changes occurences of the idiom `partitionEithers <$> mapM f xs` by the simpler form `partitionWithM f xs` where `partitionWithM` is a utility function newly added to `GHC.Utils.Misc`. - - - - - 6a27eb97 by Stefan Holdermans at 2023-09-26T20:58:37+00:00 Mark `GHC.Utils.Misc.partitionWithM` as inlineable This patch adds an `INLINEABLE` pragma for `partitionWithM` to ensure that the right-hand side of the definition of this function remains available for specialisation at call sites. - - - - - f1e5245a by David Binder at 2023-09-27T01:19:00-04:00 Add RTS option to supress tix file - - - - - 1f43124f by David Binder at 2023-09-27T01:19:00-04:00 Add expected output to testsuite in test interface-stability/base-exports - - - - - b9d2c354 by David Binder at 2023-09-27T01:19:00-04:00 Expose HpcFlags and getHpcFlags from GHC.RTS.Flags - - - - - 345675c6 by David Binder at 2023-09-27T01:19:00-04:00 Fix expected output of interface-stability test - - - - - 146e1c39 by David Binder at 2023-09-27T01:19:00-04:00 Implement getHpcFlags - - - - - 61ba8e20 by David Binder at 2023-09-27T01:19:00-04:00 Add section in user guide - - - - - ea05f890 by David Binder at 2023-09-27T01:19:01-04:00 Rename --emit-tix-file to --write-tix-file - - - - - cabce2ce by David Binder at 2023-09-27T01:19:01-04:00 Update the golden files for interface stability - - - - - 1dbdb9d0 by Krzysztof Gogolewski at 2023-09-27T01:19:37-04:00 Refactor: introduce stgArgRep The function 'stgArgType' returns the type in STG. But this violates the abstraction: in STG we're supposed to operate on PrimReps. This introduces stgArgRep ty = typePrimRep (stgArgType ty) stgArgRep1 ty = typePrimRep1 (stgArgType ty) stgArgRep_maybe ty = typePrimRep_maybe (stgArgType ty) stgArgType is still directly used for unboxed tuples (should be fixable), FFI and in ticky. - - - - - b02f8042 by Mario Blažević at 2023-09-27T17:33:28-04:00 Fix TH pretty-printer's parenthesization This PR Fixes `Language.Haskell.TH.Ppr.pprint` so it correctly emits parentheses where needed. Fixes #23962, #23968, #23971, and #23986 - - - - - 79104334 by Krzysztof Gogolewski at 2023-09-27T17:34:04-04:00 Add a testcase for #17564 The code in the ticket relied on the behaviour of Derived constraints. Derived constraints were removed in GHC 9.4 and now the code works as expected. - - - - - d7a80143 by sheaf at 2023-09-28T03:25:53-04:00 lint-codes: add new modes of operation This commit adds two new modes of operation to the lint-codes utility: list - list all statically used diagnostic codes outdated - list all outdated diagnostic codes The previous behaviour is now: test - test consistency and coverage of diagnostic codes - - - - - 477d223c by sheaf at 2023-09-28T03:25:53-04:00 lint codes: avoid using git-grep We manually traverse through the filesystem to find the diagnostic codes embedded in .stdout and .stderr files, to avoid any issues with old versions of grep. Fixes #23843 - - - - - a38ae69a by sheaf at 2023-09-28T03:25:53-04:00 lint-codes: add Hadrian targets This commit adds new Hadrian targets: codes, codes:used - list all used diagnostic codes codes:outdated - list outdated diagnostic codes This allows users to easily query GHC for used and outdated diagnostic codes, e.g. hadrian/build -j --flavour=<..> codes will list all used diagnostic codes in the command line by running the lint-codes utility in the "list codes" mode of operation. The diagnostic code consistency and coverage test is still run as usual, through the testsuite: hadrian/build test --only="codes" - - - - - 9cdd629b by Ben Gamari at 2023-09-28T03:26:29-04:00 hadrian: Install LICENSE files in bindists Fixes #23548. - - - - - b8ebf876 by Matthew Craven at 2023-09-28T03:27:05-04:00 Fix visibility when eta-reducing a type lambda Fixes #24014. - - - - - d3874407 by Torsten Schmits at 2023-09-30T16:08:10-04:00 Fix several mistakes around free variables in iface breakpoints Fixes #23612 , #23607, #23998 and #23666. MR: !11026 The fingerprinting logic in `Iface.Recomp` failed lookups when processing decls containing breakpoints for two reasons: * IfaceBreakpoint created binders for free variables instead of expressions * When collecting free names for the dependency analysis for fingerprinting, breakpoint FVs were skipped - - - - - ef5342cd by Simon Peyton Jones at 2023-09-30T16:08:48-04:00 Refactor to combine HsLam and HsLamCase This MR is pure refactoring (#23916): * Combine `HsLam` and `HsLamCase` * Combine `HsCmdLam` and `HsCmdLamCase` This just arranges to treat uniformly \x -> e \case pi -> ei \cases pis -> ie In the exising code base the first is treated differently to the latter two. No change in behaviour. More specifics: * Combine `HsLam` and `HsLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsExpr`) into one data construtor covering * Lambda * `\case` * `\cases` * The new `HsLam` has an argument of type `HsLamVariant` to distinguish the three cases. * Similarly, combine `HsCmdLam` and `HsCmdLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsCmd` ) into one. * Similarly, combine `mkHsLamPV` and `mkHsLamCasePV` (methods of class `DisambECP`) into one. (Thank you Alan Zimmerman.) * Similarly, combine `LambdaExpr` and `LamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsMatchContext`) into one: `LamAlt` with a `HsLamVariant` argument. * Similarly, combine `KappaExpr` and `ArrowLamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsArrowMatchContext`) into one: `ArrowLamAlt` with a `HsLamVariant` argument. * Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one. * Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one. * In the same `PsError` data type, combine `PsErrLambdaCmdInFunAppCmd` and `PsErrLambdaCaseCmdInFunAppCmd` into one. * In the same `PsError` data tpye, combine `PsErrLambdaInFunAppExpr` and `PsErrLambdaCaseInFunAppExpr` into one. p* Smilarly combine `ExpectedFunTyLam` and `ExpectedFunTyLamCase` (constructors of `GHC.Tc.Types.Origin.ExpectedFunTyOrigin`) into one. Phew! - - - - - b048bea0 by Andreas Klebinger at 2023-09-30T16:09:24-04:00 Arm: Make ppr methods easier to use by not requiring NCGConfig - - - - - 2adc0508 by Andreas Klebinger at 2023-09-30T16:09:24-04:00 AArch64: Fix broken conditional jumps for offsets >= 1MB Rewrite conditional jump instructions with offsets >= 1MB to use unconditional jumps to avoid overflowing the immediate. Fixes #23746 - - - - - 1424f790 by Alan Zimmerman at 2023-09-30T16:10:00-04:00 EPA: Replace Monoid with NoAnn We currently use the Monoid class as a constraint on Exact Print Annotation functions, so we can use mempty. But this leads to requiring Semigroup instances too, which do not always make sense. Instead, introduce a class NoAnn, with a function noAnn analogous to mempty. Closes #20372 Updates haddock submodule - - - - - c1a3ecde by Ben Gamari at 2023-09-30T16:10:36-04:00 users-guide: Refactor handling of :base-ref: et al. - - - - - bc204783 by Richard Eisenberg at 2023-10-02T14:50:52+02:00 Simplify and correct nasty case in coercion opt This fixes #21062. No test case, because triggering this code seems challenging. - - - - - 9c9ca67e by Andrew Lelechenko at 2023-10-04T05:42:28-04:00 Bump bytestring submodule to 0.12.0.2 - - - - - 4e46dc2b by Andrew Lelechenko at 2023-10-04T05:42:28-04:00 Inline bucket_match - - - - - f6b2751f by Ben Gamari at 2023-10-04T05:43:05-04:00 configure: Fix #21712 again This is a bit of a shot in the dark to fix #24033, which appears to be another instance of #21712. For some reason the ld-override logic *still* appears to be active on Darwin targets (or at least one). Consequently, on misconfigured systems we may choose a non-`ld64` linker. It's a bit unclear exactly what happened in #24033 but ultimately the check added for #21712 was not quite right, checking for the `ghc_host_os` (the value of which depends upon the bootstrap compiler) instead of the target platform. Fix this. Fixes #24033. - - - - - 2f0a101d by Krzysztof Gogolewski at 2023-10-04T05:43:42-04:00 Add a regression test for #24029 - - - - - 8cee3fd7 by sheaf at 2023-10-04T05:44:22-04:00 Fix non-symbolic children lookup of fixity decl The fix for #23664 did not correctly account for non-symbolic names when looking up children of a given parent. This one-line fix changes that. Fixes #24037 - - - - - a4785b33 by Cheng Shao at 2023-10-04T05:44:59-04:00 rts: fix incorrect ticket reference - - - - - e037f459 by Ben Gamari at 2023-10-04T05:45:35-04:00 users-guide: Fix discussion of -Wpartial-fields * fix a few typos * add a new example showing when the warning fires * clarify the existing example * point out -Wincomplete-record-selects Fixes #24049. - - - - - 8ff3134e by Matthew Pickering at 2023-10-05T05:34:58-04:00 Revert "Pass preprocessor options to C compiler when building foreign C files (#16737)" This reverts commit 1c18d3b41f897f34a93669edaebe6069f319f9e2. `-optP` should pass options to the preprocessor, that might be a very different program to the C compiler, so passing the options to the C compiler is likely to result in `-optP` being useless. Fixes #17185 and #21291 - - - - - 8f6010b9 by Ben Gamari at 2023-10-05T05:35:36-04:00 rts/nonmoving: Fix on LLP64 platforms Previously `NONMOVING_SEGMENT_MASK` and friends were defined with the `UL` size suffix. However, this is wrong on LLP64 platforms like Windows, where `long` is 32-bits. Fixes #23003. Fixes #24042. - - - - - f20d02f8 by Andreas Klebinger at 2023-10-05T05:36:14-04:00 Fix isAArch64Bitmask for 32bit immediates. Fixes #23802 - - - - - 63afb701 by Bryan Richter at 2023-10-05T05:36:49-04:00 Work around perf note fetch failure Addresses #24055. - - - - - 242102f4 by Krzysztof Gogolewski at 2023-10-05T05:37:26-04:00 Add a test for #21348 - - - - - 7d390bce by Rewbert at 2023-10-05T05:38:08-04:00 Fixes #24046 - - - - - 69abb171 by Finley McIlwaine at 2023-10-06T14:06:28-07:00 Ensure unconstrained instance dictionaries get IPE info In the `StgRhsCon` case of `GHC.Stg.Debug.collectStgRhs`, we were not coming up with an initial source span based on the span of the binder, which was causing instance dictionaries without dynamic superclass constraints to not have source locations in their IPE info. Now they do. Resolves #24005 - - - - - 390443b7 by Andreas Klebinger at 2023-10-07T10:00:20-04:00 rts: Split up rts/include/stg/MachRegs.h by arch - - - - - 3685942f by Bryan Richter at 2023-10-07T10:00:56-04:00 Actually set hackage index state Or at least, use a version of the cabal command that *claims* to set the index state. Time will tell. - - - - - 46a0e5be by Bryan Richter at 2023-10-07T10:00:56-04:00 Update hackage index state - - - - - d4b037de by Bryan Richter at 2023-10-07T10:00:56-04:00 Ensure hadrian uses CI's hackage index state - - - - - e206be64 by Andrew Lelechenko at 2023-10-08T15:06:14-04:00 Do not use O_NONBLOCK on regular files or block devices CLC proposal https://github.com/haskell/core-libraries-committee/issues/166 - - - - - a06197c4 by David Binder at 2023-10-08T15:06:55-04:00 Update hpc-bin submodule to 0.69 - - - - - ed6785b6 by David Binder at 2023-10-08T15:06:55-04:00 Update Hadrian with correct path to happy file for hpc-bin - - - - - 94066d58 by Alan Zimmerman at 2023-10-09T21:35:53-04:00 EPA: Introduce HasAnnotation class The class is defined as class HasAnnotation e where noAnnSrcSpan :: SrcSpan -> e This generalises noAnnSrcSpan, and allows noLocA :: (HasAnnotation e) => a -> GenLocated e a noLocA = L (noAnnSrcSpan noSrcSpan) - - - - - 8792a1bc by Ben Gamari at 2023-10-09T21:36:29-04:00 Bump unix submodule to v2.8.3.0 - - - - - e96c51cb by Andreas Klebinger at 2023-10-10T16:44:27+01:00 Add a flag -fkeep-auto-rules to optionally keep auto-generated rules around. The motivation for the flag is given in #21917. - - - - - 3ed58cef by Matthew Pickering at 2023-10-10T19:01:22-04:00 hadrian: Add ghcToolchain to tool args list This allows you to load ghc-toolchain and ghc-toolchain-bin into HLS. - - - - - 476c02d4 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Normalise triple via config.sub We were not normalising the target triple anymore like we did with the old make build system. Fixes #23856 - - - - - 303dd237 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add missing vendor normalisation This is copied from m4/ghc_convert_vendor.m4 Towards #23868 - - - - - 838026c9 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add loongarch64 to parseArch Towards #23868 - - - - - 1a5bc0b5 by Matthew Pickering at 2023-10-10T19:01:22-04:00 Add same LD hack to ghc-toolchain In the ./configure script, if you pass the `LD` variable then this has the effect of stopping use searching for a linker and hence passing `-fuse-ld=...`. We want to emulate this logic in ghc-toolchain, if a use explicilty specifies `LD` variable then don't add `-fuse-ld=..` with the goal of making ./configure and ghc-toolchain agree on which flags to use when using the C compiler as a linker. This is quite unsavoury as we don't bake the choice of LD into the configuration anywhere but what's important for now is making ghc-toolchain and ./configure agree as much as possible. See #23857 for more discussion - - - - - 42d50b5a by Ben Gamari at 2023-10-10T19:01:22-04:00 ghc-toolchain: Check for C99 support with -std=c99 Previously we failed to try enabling C99 support with `-std=c99`, as `autoconf` attempts. This broke on older compilers (e.g. CentOS 7) which don't enable C99 by default. Fixes #23879. - - - - - da2961af by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Add endianess check using __BYTE_ORDER__ macro In very old toolchains the BYTE_ORDER macro is not set but thankfully the __BYTE_ORDER__ macro can be used instead. - - - - - d8da73cd by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: AC_PATH_TARGET_TOOL for LD We want to make sure that LD is set to an absolute path in order to be consistent with the `LD=$(command -v ld)` call. The AC_PATH_TARGET_TOOL macro uses the absolute path rather than AC_CHECK_TARGET_TOOL which might use a relative path. - - - - - 171f93cc by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Check whether we need -std=gnu99 for CPP as well In ./configure the C99 flag is passed to the C compiler when used as a C preprocessor. So we also check the same thing in ghc-toolchain. - - - - - 89a0918d by Matthew Pickering at 2023-10-10T19:01:22-04:00 Check for --target linker flag separately to C compiler There are situations where the C compiler doesn't accept `--target` but when used as a linker it does (but doesn't do anything most likely) In particular with old gcc toolchains, the C compiler doesn't support --target but when used as a linker it does. - - - - - 37218329 by Matthew Pickering at 2023-10-10T19:01:22-04:00 Use Cc to compile test file in nopie check We were attempting to use the C compiler, as a linker, to compile a file in the nopie check, but that won't work in general as the flags we pass to the linker might not be compatible with the ones we pass when using the C compiler. - - - - - 9b2dfd21 by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: Error when ghc-toolchain fails to compile This is a small QOL change as if you are working on ghc-toolchain and it fails to compile then configure will continue and can give you outdated results. - - - - - 1f0de49a by Matthew Pickering at 2023-10-10T19:01:22-04:00 configure: Check whether -no-pie works when the C compiler is used as a linker `-no-pie` is a flag we pass when using the C compiler as a linker (see pieCCLDOpts in GHC.Driver.Session) so we should test whether the C compiler used as a linker supports the flag, rather than just the C compiler. - - - - - 62cd2579 by Matthew Pickering at 2023-10-10T19:01:22-04:00 ghc-toolchain: Remove javascript special case for --target detection emcc when used as a linker seems to ignore the --target flag, and for consistency with configure which now tests for --target, we remove this special case. - - - - - 0720fde7 by Ben Gamari at 2023-10-10T19:01:22-04:00 toolchain: Don't pass --target to emscripten toolchain As noted in `Note [Don't pass --target to emscripten toolchain]`, emscripten's `emcc` is rather inconsistent with respect to its treatment of the `--target` flag. Avoid this by special-casing this toolchain in the `configure` script and `ghc-toolchain`. Fixes on aspect of #23744. - - - - - 6354e1da by Matthew Pickering at 2023-10-10T19:01:22-04:00 hadrian: Don't pass `--gcc-options` as a --configure-arg to cabal configure Stop passing -gcc-options which mixed together linker flags and non-linker flags. There's no guarantee the C compiler will accept both of these in each mode. - - - - - c00a4bd6 by Ben Gamari at 2023-10-10T19:01:22-04:00 configure: Probe stage0 link flags For consistency with later stages and CC. - - - - - 1f11e7c4 by Sebastian Graf at 2023-10-10T19:01:58-04:00 Stricter Binary.get in GHC.Types.Unit (#23964) I noticed some thunking while looking at Core. This change has very modest, but throughout positive ghc/alloc effect: ``` hard_hole_fits(normal) ghc/alloc 283,057,664 281,620,872 -0.5% geo. mean -0.1% minimum -0.5% maximum +0.0% ``` Fixes #23964. - - - - - a4f1a181 by Bryan Richter at 2023-10-10T19:02:37-04:00 rel_eng/upload.sh cleanups - - - - - 80705335 by doyougnu at 2023-10-10T19:03:18-04:00 ci: add javascript label rule This adds a rule which triggers the javascript job when the "javascript" label is assigned to an MR. - - - - - a2c0fff6 by Matthew Craven at 2023-10-10T19:03:54-04:00 Make 'wWarningFlagsDeps' include every WarningFlag Fixes #24071. - - - - - d055f099 by Jan Hrček at 2023-10-10T19:04:33-04:00 Fix pretty printing of overlap pragmas in TH splices (fixes #24074) - - - - - 0746b868 by Andreas Klebinger at 2023-10-10T19:05:09-04:00 Aarch64 NCG: Use encoded immediates for literals. Try to generate instr x2, <imm> instead of mov x1, lit instr x2, x1 When possible. This get's rid if quite a few redundant mov instructions. I believe this causes a metric decrease for LargeRecords as we reduce register pressure. ------------------------- Metric Decrease: LargeRecord ------------------------- - - - - - 739f4e6f by Andreas Klebinger at 2023-10-10T19:05:09-04:00 AArch NCG: Refactor getRegister' Remove some special cases which can be handled just as well by the generic case. This increases code re-use while also fixing #23749. Since some of the special case wasn't upholding Note [Signed arithmetic on AArch64]. - - - - - 1b213d33 by Andreas Klebinger at 2023-10-10T19:05:09-04:00 Aarch ncg: Optimize immediate use for address calculations When the offset doesn't fit into the immediate we now just reuse the general getRegister' code path which is well optimized to compute the offset into a register instead of a special case for CmmRegOff. This means we generate a lot less code under certain conditions which is why performance metrics for these improve. ------------------------- Metric Decrease: T4801 T5321FD T5321Fun ------------------------- - - - - - b7df0732 by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over mem management checks These are for heap allocation, a strictly RTS concern. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. The RTS configure one has a new ``` AC_CHECK_SIZEOF([void *]) ``` that the top-level configure version didn't have, so that `ac_cv_sizeof_void_p` is defined. Once more code is moved over in latter commits, that can go away. Progress towards #17191 - - - - - 41130a65 by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over `__thread` check This used by (@bgamari thinks) the `GCThread` abstraction in the RTS. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - cc5ec2bd by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over misc function checks These are for general use in the RTS. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - 809e7c2d by John Ericson at 2023-10-11T16:02:11-04:00 RTS configure: Move over `eventfd` check This check is for the RTS part of the event manager and has a corresponding part in `base`. All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - 58f3babf by John Ericson at 2023-10-11T16:02:48-04:00 Split `FP_CHECK_PTHREADS` and move part to RTS configure `NEED_PTHREAD_LIB` is unused since 3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the make build system), and so is no longer defined. Progress towards #17191 - - - - - e99cf237 by Moritz Angermann at 2023-10-11T16:03:24-04:00 nativeGen: section flags for .text$foo only Commit 3ece9856d157c85511d59f9f862ab351bbd9b38b, was supposed to fix #22834 in !9810. It does however add "xr" indiscriminatly to .text sections even if splitSections is disabled. This leads to the assembler saying: ghc_1.s:7849:0: error: Warning: Ignoring changed section attributes for .text | 7849 | .section .text,"xr" | ^ - - - - - f383a242 by Sylvain Henry at 2023-10-11T16:04:04-04:00 Modularity: pass TempDir instead of DynFlags (#17957) - - - - - 34fc28b0 by John Ericson at 2023-10-12T06:48:28-04:00 Test that functions from `mingwex` are available Ryan wrote these two minimizations, but they never got added to the test suite. See #23309, #23378 Co-Authored-By: Ben Gamari <bgamari.foss at gmail.com> Co-Authored-By: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - bdb54a0e by John Ericson at 2023-10-12T06:48:28-04:00 Do not check for the `mingwex` library in `/configure` See the recent discussion in !10360 --- Cabal will itself check for the library for the packages that need it, and while the autoconf check additionally does some other things like define a `HAS_LIBMINGWEX` C Preprocessor macro, those other things are also unused and unneeded. Progress towards #17191, which aims to get rid of `/configure` entirely. - - - - - 43e814e1 by Ben Gamari at 2023-10-12T06:49:40-04:00 base: Introduce move modules into src The only non-move changes here are whitespace changes to pass the `whitespace` test and a few testsuite adaptations. - - - - - df81536f by Moritz Angermann at 2023-10-12T06:50:16-04:00 [PEi386 linker] Bounds check and null-deref guard We should resonably be able to expect that we won't exceed the number of sections if we assume to be dealing with legal object files. We can however not guarantee that we get some negative values, and while we try to special case most, we should exclude negative indexing into the sections array. We also need to ensure that we do not try to derefences targetSection, if it is NULL, due to the switch statement. - - - - - c74c4f00 by John Ericson at 2023-10-12T10:31:13-04:00 Move apple compat check to RTS configure - - - - - c80778ea by John Ericson at 2023-10-12T10:31:13-04:00 Move clock/timer fun checks to RTS configure Actual library check (which will set the Cabal flag) is left in the top-level configure for now. Progress towards #17191 - - - - - 7f9f2686 by John Ericson at 2023-10-12T10:31:13-04:00 Move visibility and "musttail" annotation checks to the RTS configure All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. Progress towards #17191 - - - - - ffb3efe6 by John Ericson at 2023-10-12T10:31:13-04:00 Move leading underscore checks to RTS configure `CabalLeadingUnderscore` is done via Hadrian already, so we can stop `AC_SUBST`ing it completely. - - - - - 25fa4b02 by John Ericson at 2023-10-12T10:31:13-04:00 Move alloca, fork, const, and big endian checks to RTS configure All of this should boil down to `AC_DEFINE` not `AC_SUBST`, so it belongs in the RTS configure and should be safe to move without modification. - - - - - 5170f42a by John Ericson at 2023-10-12T10:31:13-04:00 Move libdl check to RTS configure - - - - - ea7a1447 by John Ericson at 2023-10-12T10:31:13-04:00 Adjust `FP_FIND_LIBFFI` Just set vars, and `AC_SUBST` in top-level configure. Don't define `HAVE_SYSTEM_LIBFFI` because nothing is using it. It hasn't be in used since 3609340743c1b25fdfd0e18b1670dac54c8d8623 (part of the make build system). - - - - - f399812c by John Ericson at 2023-10-12T10:31:13-04:00 Split BFD support to RTS configure The flag is still in the top-level configure, but the other checks (which define various macros --- important) are in the RTS configure. - - - - - f64f44e9 by John Ericson at 2023-10-12T10:31:13-04:00 Split libm check between top level and RTS - - - - - dafc4709 by Moritz Angermann at 2023-10-12T10:31:49-04:00 CgUtils.fixStgRegStmt respect register width This change ensure that the reg + offset computation is always of the same size. Before this we could end up with a 64bit register, and then add a 32bit offset (on 32bit platforms). This not only would fail type sanity checking, but also incorrectly truncate 64bit values into 32bit values silently on 32bit architectures. - - - - - 9e6ef7ba by Matthew Pickering at 2023-10-12T20:35:00-04:00 hadrian: Decrease verbosity of cabal commands In Normal, most tools do not produce output to stdout unless there are error conditions. Reverts 7ed65f5a1bc8e040e318ccff395f53a9bbfd8217 - - - - - 08fc27af by John Ericson at 2023-10-12T20:35:36-04:00 Do not substitute `@...@` for stage-specific values in cabal files `rts` and `ghc-prim` now no longer have a `*.cabal.in` to set Cabal flag defaults; instead manual choices are passed to configure in the usual way. The old way was fundamentally broken, because it meant we were baking these Cabal files for a specific stage. Now we only do stage-agnostic @...@ substitution in cabal files (the GHC version), and so all stage-specific configuration is properly confined to `_build` and the right stage dir. Also `include-ghc-prim` is a flag that no longer exists for `ghc-prim` (it was removed in 835d8ddbbfb11796ea8a03d1806b7cee38ba17a6) so I got rid of it. Co-Authored-By: Matthew Pickering <matthewtpickering at gmail.com> - - - - - a0ac8785 by Sebastian Graf at 2023-10-14T19:17:12-04:00 Fix restarts in .ghcid Using the whole of `hadrian/` restarted in a loop for me. - - - - - fea9ecdb by Sebastian Graf at 2023-10-14T19:17:12-04:00 CorePrep: Refactor FloatingBind (#23442) A drastically improved architecture for local floating in CorePrep that decouples the decision of whether a float is going to be let- or case-bound from how far it can float (out of strict contexts, out of lazy contexts, to top-level). There are a couple of new Notes describing the effort: * `Note [Floating in CorePrep]` for the overview * `Note [BindInfo and FloatInfo]` for the new classification of floats * `Note [Floats and FloatDecision]` for how FloatInfo is used to inform floating decisions This is necessary ground work for proper treatment of Strict fields and unlifted values at top-level. Fixes #23442. NoFib results (omitted = 0.0%): ``` -------------------------------------------------------------------------------- Program Allocs Instrs -------------------------------------------------------------------------------- pretty 0.0% -1.6% scc 0.0% -1.7% -------------------------------------------------------------------------------- Min 0.0% -1.7% Max 0.0% -0.0% Geometric Mean -0.0% -0.0% ``` - - - - - 32523713 by Matthew Pickering at 2023-10-14T19:17:49-04:00 hadrian: Move ghcBinDeps into ghcLibDeps This completes a5227080b57cb51ac34d4c9de1accdf6360b818b, the `ghc-usage.txt` and `ghci-usage.txt` file are also used by the `ghc` library so need to make sure they are present in the libdir even if we are not going to build `ghc-bin`. This also fixes things for cross compilers because the stage2 cross-compiler requires the ghc-usage.txt file, but we are using the stage2 lib folder but not building stage3:exe:ghc-bin so ghc-usage.txt was not being generated. - - - - - ec3c4488 by sheaf at 2023-10-14T19:18:29-04:00 Combine GREs when combining in mkImportOccEnv In `GHC.Rename.Names.mkImportOccEnv`, we sometimes discard one import item in favour of another, as explained in Note [Dealing with imports] in `GHC.Rename.Names`. However, this can cause us to lose track of important parent information. Consider for example #24084: module M1 where { class C a where { type T a } } module M2 ( module M1 ) where { import M1 } module M3 where { import M2 ( C, T ); instance C () where T () = () } When processing the import list of `M3`, we start off (for reasons that are not relevant right now) with two `Avail`s attached to `T`, namely `C(C, T)` and `T(T)`. We combine them in the `combine` function of `mkImportOccEnv`; as described in Note [Dealing with imports] we discard `C(C, T)` in favour of `T(T)`. However, in doing so, we **must not** discard the information want that `C` is the parent of `T`. Indeed, losing track of this information can cause errors when importing, as we could get an error of the form ‘T’ is not a (visible) associated type of class ‘C’ We fix this by combining the two GREs for `T` using `plusGRE`. Fixes #24084 - - - - - 257c2807 by Ilias Tsitsimpis at 2023-10-14T19:19:07-04:00 hadrian: Pass -DNOSMP to C compiler when needed Hadrian passes the -DNOSMP flag to GHC when the target doesn't support SMP, but doesn't pass it to CC as well, leading to the following compilation error on mips64el: | Run Cc (FindCDependencies CDep) Stage1: rts/sm/NonMovingScav.c => _build/stage1/rts/build/c/sm/NonMovingScav.o.d Command line: /usr/bin/mips64el-linux-gnuabi64-gcc -E -MM -MG -MF _build/stage1/rts/build/c/hooks/FlagDefaults.thr_debug_p_o.d -MT _build/stage1/rts/build/c/hooks/FlagDefaults.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -x c rts/hooks/FlagDefaults.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -DTHREADED_RTS -DDEBUG -fomit-frame-pointer -O2 -g -Irts -I_build/stage1/rts/build -DDEBUG -fno-omit-frame-pointer -g3 -O0 ===> Command failed with error code: 1 In file included from rts/include/Stg.h:348, from rts/include/Rts.h:38, from rts/hooks/FlagDefaults.c:8: rts/include/stg/SMP.h:416:2: error: #error memory barriers unimplemented on this architecture 416 | #error memory barriers unimplemented on this architecture | ^~~~~ rts/include/stg/SMP.h:440:2: error: #error memory barriers unimplemented on this architecture 440 | #error memory barriers unimplemented on this architecture | ^~~~~ rts/include/stg/SMP.h:464:2: error: #error memory barriers unimplemented on this architecture 464 | #error memory barriers unimplemented on this architecture | ^~~~~ The old make system correctly passed this flag to both GHC and CC [1]. Fix this error by passing -DNOSMP to CC as well. [1] https://gitlab.haskell.org/ghc/ghc/-/blob/00920f176b0235d5bb52a8e054d89a664f8938fe/rts/ghc.mk#L407 Closes #24082 - - - - - 13d3c613 by John Ericson at 2023-10-14T19:19:42-04:00 Users Guide: Drop dead code for Haddock refs to `parallel` I noticed while working on !11451 that `@LIBRARY_parallel_UNIT_ID@` was not substituted. It is dead code -- there is no `parallel-ref` usages and it doesn't look like there ever was (going back to 3e5d0f188d6c8633e55e9ba6c8941c07e459fa4b), so let's delete it. - - - - - fe067577 by Sylvain Henry at 2023-10-18T19:40:25-04:00 Avoid out-of-bound array access in bigNatIsPowerOf2 (fix #24066) bigNatIndex# in the `where` clause wasn't guarded by "bigNatIsZero a". - - - - - cc1625b1 by Sylvain Henry at 2023-10-18T19:40:25-04:00 Bignum: fix right shift of negative BigNat with native backend - - - - - cbe4400d by Sylvain Henry at 2023-10-18T19:40:25-04:00 Rts: expose rtsOutOfBoundsAccess symbol - - - - - 72c7380c by Sylvain Henry at 2023-10-18T19:40:25-04:00 Hadrian: enable `-fcheck-prim-bounds` in validate flavour This allows T24066 to fail when the bug is present. Otherwise the out-of-bound access isn't detected as it happens in ghc-bignum which wasn't compiled with the bounds check. - - - - - f9436990 by John Ericson at 2023-10-18T19:41:01-04:00 Make Hadrian solely responsible for substituting `docs/users_guide/ghc_config.py.in` Fixes #24091 Progress on #23966 Issue #24091 reports that `@ProjectVersion@` is no longer being substituted in the GHC user's guide. I assume this is a recent issue, but I am not sure how it's worked since c1a3ecde720b3bddc2c8616daaa06ee324e602ab; it looks like both Hadrian and configure are trying to substitute the same `.in` file! Now only Hadrian does. That is better anyways; already something that issue #23966 requested. It seems like we were missing some dependencies in Hadrian. (I really, really hate that this is possible!) Hopefully it is fixed now. - - - - - b12df0bb by John Ericson at 2023-10-18T19:41:37-04:00 `ghcversion.h`: No need to cope with undefined `ProjectPatchLevel*` Since 4e6c80197f1cc46dfdef0300de46847c7cfbdcb0, these are guaranteed to be defined. (Guaranteed including a test in the testsuite.) - - - - - 0295375a by John Ericson at 2023-10-18T19:41:37-04:00 Generate `ghcversion.h` from a `.in` file Now that there are no conditional sections (see the previous commit), we can just a do simple substitution rather than pasting it together line by line. Progress on #23966 - - - - - 740a1b85 by Krzysztof Gogolewski at 2023-10-19T11:37:20-04:00 Add a regression test for #24064 - - - - - 921fbf2f by Hécate Moonlight at 2023-10-19T11:37:59-04:00 CLC Proposal #182: Export List from Data.List Proposal link: https://github.com/haskell/core-libraries-committee/issues/182 - - - - - 4f02d3c1 by Sylvain Henry at 2023-10-20T04:01:32-04:00 rts: fix small argument passing on big-endian arch (fix #23387) - - - - - b86243b4 by Sylvain Henry at 2023-10-20T04:02:13-04:00 Interpreter: fix literal alignment on big-endian architectures (fix #19261) Literals weren't correctly aligned on big-endian, despite what the comment said. - - - - - a4b2ec47 by Sylvain Henry at 2023-10-20T04:02:54-04:00 Testsuite: recomp011 and recomp015 are fixed on powerpc These tests have been fixed but not tested and re-enabled on big-endian powerpc (see comments in #11260 and #11323) - - - - - fded7dd4 by Sebastian Graf at 2023-10-20T04:03:30-04:00 CorePrep: Allow floating dictionary applications in -O0 into a Rec (#24102) - - - - - 02efc181 by John Ericson at 2023-10-22T02:48:55-04:00 Move function checks to RTS configure Some of these functions are used in `base` too, but we can copy the checks over to its configure if that's an issue. - - - - - 5f4bccab by John Ericson at 2023-10-22T02:48:55-04:00 Move over a number of C-style checks to RTS configure - - - - - 5cf04f58 by John Ericson at 2023-10-22T02:48:55-04:00 Move/Copy more `AC_DEFINE` to RTS config Only exception is the LLVM version macros, which are used for GHC itself. - - - - - b8ce5dfe by John Ericson at 2023-10-22T02:48:55-04:00 Define `TABLES_NEXT_TO_CODE` in the RTS configure We create a new cabal flag to facilitate this. - - - - - 4a40271e by John Ericson at 2023-10-22T02:48:55-04:00 Configure scripts: `checkOS`: Make a bit more robust `mingw64` and `mingw32` are now both accepted for `OSMinGW32`. This allows us to cope with configs/triples that we haven't normalized extra being what GNU `config.sub` does. - - - - - 16bec0a0 by John Ericson at 2023-10-22T02:48:55-04:00 Generate `ghcplatform.h` from RTS configure We create a new cabal flag to facilitate this. - - - - - 7dfcab2f by John Ericson at 2023-10-22T02:48:55-04:00 Get rid of all mention of `mk/config.h` The RTS configure script is now solely responsible for managing its headers; the top level configure script does not help. - - - - - c1e3719c by Cheng Shao at 2023-10-22T02:49:33-04:00 rts: drop stale mentions of MIN_UPD_SIZE We used to have MIN_UPD_SIZE macro that describes the minimum reserved size for thunks, so that the thunk can be overwritten in place as indirections or blackholes. However, this macro has not been actually defined or used anywhere since a long time ago; StgThunkHeader already reserves a padding word for this purpose. Hence this patch which drops stale mentions of MIN_UPD_SIZE. - - - - - d24b0d85 by Andrew Lelechenko at 2023-10-22T02:50:11-04:00 base changelog: move non-backported entries from 4.19 section to 4.20 Neither !10933 (check https://hackage.haskell.org/package/base-4.19.0.0/docs/src/Text.Read.Lex.html#numberToRangedRational) nor !10189 (check https://hackage.haskell.org/package/base-4.19.0.0/docs/src/Data.List.NonEmpty.html#unzip) were backported to `base-4.19.0.0`. Moving them to `base-4.20.0.0` section. Also minor stylistic changes to other entries, bringing them to a uniform form. - - - - - de78b32a by Alan Zimmerman at 2023-10-23T09:09:41-04:00 EPA Some tweaks to annotations - Fix span for GRHS - Move TrailingAnns from last match to FunBind - Fix GADT 'where' clause span - Capture full range for a CaseAlt Match - - - - - d5a8780d by Simon Hengel at 2023-10-23T09:10:23-04:00 Update primitives.rst - - - - - 4d075924 by Josh Meredith at 2023-10-24T23:04:12+11:00 JS/userguide: add explanation of writing jsbits - - - - - 07ab5cc1 by Cheng Shao at 2023-10-24T15:40:32-04:00 testsuite: increase timeout of ghc-api tests for wasm32 ghc-api tests for wasm32 are more likely to timeout due to the large wasm module sizes, especially when testing with wasm native tail calls, given wasmtime's handling of tail call opcodes are suboptimal at the moment. It makes sense to increase timeout specifically for these tests on wasm32. This doesn't affect other targets, and for wasm32 we don't increase timeout for all tests, so not to risk letting major performance regressions slip through the testsuite. - - - - - 0d6acca5 by Greg Steuck at 2023-10-26T08:44:23-04:00 Explicitly require RLIMIT_AS before use in OSMem.c This is done elsewhere in the source tree. It also suddenly is required on OpenBSD. - - - - - 9408b086 by Sylvain Henry at 2023-10-26T08:45:03-04:00 Modularity: modularize external linker Decouple runLink from DynFlags to allow calling runLink more easily. This is preliminary work for calling Emscripten's linker (emcc) from our JavaScript linker. - - - - - e0f35030 by doyougnu at 2023-10-27T08:41:12-04:00 js: add JStg IR, remove unsaturated constructor - Major step towards #22736 and adding the optimizer in #22261 - - - - - 35587eba by Simon Peyton Jones at 2023-10-27T08:41:48-04:00 Fix a bug in tail calls with ticks See #24078 for the diagnosis. The change affects only the Tick case of occurrence analysis. It's a bit hard to test, so no regression test (yet anyway). - - - - - 9bc5cb92 by Matthew Craven at 2023-10-28T07:06:17-04:00 Teach tag-inference about SeqOp/seq# Fixes the STG/tag-inference analogue of #15226. Co-Authored-By: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - 34f06334 by Moritz Angermann at 2023-10-28T07:06:53-04:00 [PEi386] Mask SYM_TYPE_DUP_DISCARD in makeSymbolExtra 48e391952c17ff7eab10b0b1456e3f2a2af28a9b introduced `SYM_TYPE_DUP_DISCARD` to the bitfield. The linker however, failed to mask the `SYM_TYPE_DUP_DISCARD` value. Thus `== SYM_TYPE_CODE` comparisons easily failed. This lead to us relocating DATA lookups (GOT) into E8 (call) and E9 (jump) instructions. - - - - - 5b51b2a2 by Mario Blažević at 2023-10-28T07:07:33-04:00 Fix and test for issue #24111, TH.Ppr output of pattern synonyms - - - - - 723bc352 by Alan Zimmerman at 2023-10-30T20:36:41-04:00 EPA: print doc comments as normal comments And ignore the ones allocated in haddock processing. It does not guarantee that every original haddock-like comment appears in the output, as it discards ones that have no legal attachment point. closes #23459 - - - - - 21b76843 by Simon Peyton Jones at 2023-10-30T20:37:17-04:00 Fix non-termination bug in equality solver constraint left-to-right then right to left, forever. Easily fixed. - - - - - 270867ac by Sebastian Graf at 2023-10-30T20:37:52-04:00 ghc-toolchain: build with `-package-env=-` (#24131) Otherwise globally installed libraries (via `cabal install --lib`) break the build. Fixes #24131. - - - - - 4d08364e by Alan Zimmerman at 2023-10-31T19:46:45+00:00 EPA: match changes in GHC - EPA: Comments in AnchorOperation - EPA: Remove EpaEofComment - - - - - 7a90020f by Krzysztof Gogolewski at 2023-10-31T20:03:37-04:00 docs: fix ScopedTypeVariables example (#24101) The previous example didn't compile. Furthermore, it wasn't demonstrating the point properly. I have changed it to an example which shows that 'a' in the signature must be the same 'a' as in the instance head. - - - - - 49f69f50 by Krzysztof Gogolewski at 2023-10-31T20:04:13-04:00 Fix pretty-printing of type family dependencies "where" should be after the injectivity annotation. - - - - - 73c191c0 by Ben Gamari at 2023-10-31T20:04:49-04:00 gitlab-ci: Bump LLVM bootstrap jobs to Debian 12 As the Debian 10 images have too old an LLVM. Addresses #24056. - - - - - 5b0392e0 by Matthew Pickering at 2023-10-31T20:04:49-04:00 ci: Run aarch64 llvm backend job with "LLVM backend" label This brings it into line with the x86 LLVM backend job. - - - - - 9f9c9227 by Ryan Scott at 2023-11-01T09:19:12-04:00 More robust checking for DataKinds As observed in #22141, GHC was not doing its due diligence in catching code that should require `DataKinds` in order to use. Most notably, it was allowing the use of arbitrary data types in kind contexts without `DataKinds`, e.g., ```hs data Vector :: Nat -> Type -> Type where ``` This patch revamps how GHC tracks `DataKinds`. The full specification is written out in the `DataKinds` section of the GHC User's Guide, and the implementation thereof is described in `Note [Checking for DataKinds]` in `GHC.Tc.Validity`. In brief: * We catch _type_-level `DataKinds` violations in the renamer. See `checkDataKinds` in `GHC.Rename.HsType` and `check_data_kinds` in `GHC.Rename.Pat`. * We catch _kind_-level `DataKinds` violations in the typechecker, as this allows us to catch things that appear beneath type synonyms. (We do *not* want to do this in type-level contexts, as it is perfectly fine for a type synonym to mention something that requires DataKinds while still using the type synonym in a module that doesn't enable DataKinds.) See `checkValidType` in `GHC.Tc.Validity`. * There is now a single `TcRnDataKindsError` that classifies all manner of `DataKinds` violations, both in the renamer and the typechecker. The `NoDataKindsDC` error has been removed, as it has been subsumed by `TcRnDataKindsError`. * I have added `CONSTRAINT` is `isKindTyCon`, which is what checks for illicit uses of data types at the kind level without `DataKinds`. Previously, `isKindTyCon` checked for `Constraint` but not `CONSTRAINT`. This is inconsistent, given that both `Type` and `TYPE` were checked by `isKindTyCon`. Moreover, it thwarted the implementation of the `DataKinds` check in `checkValidType`, since we would expand `Constraint` (which was OK without `DataKinds`) to `CONSTRAINT` (which was _not_ OK without `DataKinds`) and reject it. Now both are allowed. * I have added a flurry of additional test cases that test various corners of `DataKinds` checking. Fixes #22141. - - - - - 575d7690 by Sylvain Henry at 2023-11-01T09:19:53-04:00 JS: fix FFI "wrapper" and "dynamic" Fix codegen and helper functions for "wrapper" and "dynamic" foreign imports. Fix tests: - ffi006 - ffi011 - T2469 - T4038 Related to #22363 - - - - - 81fb8885 by Alan Zimmerman at 2023-11-01T22:23:56-04:00 EPA: Use full range for Anchor This change requires a series of related changes, which must all land at the same time, otherwise all the EPA tests break. * Use the current Anchor end as prior end Use the original anchor location end as the source of truth for calculating print deltas. This allows original spacing to apply in most cases, only changed AST items need initial delta positions. * Add DArrow to TrailingAnn * EPA Introduce HasTrailing in ExactPrint Use [TrailingAnn] in enterAnn and remove it from ExactPrint (LocatedN RdrName) * In HsDo, put TrailingAnns at top of LastStmt * EPA: do not convert comments to deltas when balancing. * EPA: deal with fallout from getMonoBind * EPA fix captureLineSpacing * EPA print any comments in the span before exiting it * EPA: Add comments to AnchorOperation * EPA: remove AnnEofComment, it is no longer used Updates Haddock submodule - - - - - 03e82511 by Rodrigo Mesquita at 2023-11-01T22:24:32-04:00 Fix in docs regarding SSymbol, SNat, SChar (#24119) - - - - - 362cc693 by Matthew Pickering at 2023-11-01T22:25:08-04:00 hadrian: Update bootstrap plans (9.4.6, 9.4.7, 9.6.2, 9.6.3, 9.8.1) Updating the bootstrap plans with more recent GHC versions. - - - - - 00b9b8d3 by Matthew Pickering at 2023-11-01T22:25:08-04:00 ci: Add 9.8.1 bootstrap testing job - - - - - ef3d20f8 by Matthew Pickering at 2023-11-01T22:25:08-04:00 Compatibility with 9.8.1 as boot compiler This fixes several compatability issues when using 9.8.1 as the boot compiler. * An incorrect version guard on the stack decoding logic in ghc-heap * Some ghc-prim bounds need relaxing * ghc is no longer wired in, so we have to remove the -this-unit-id ghc call. Fixes #24077 - - - - - 6755d833 by Jaro Reinders at 2023-11-03T10:54:42+01:00 Add NCG support for common 64bit operations to the x86 backend. These used to be implemented via C calls which was obviously quite bad for performance for operations like simple addition. Co-authored-by: Andreas Klebinger - - - - - 0dfb1fa7 by Vladislav Zavialov at 2023-11-03T14:08:41-04:00 T2T in Expressions (#23738) This patch implements the T2T (term-to-type) transformation in expressions. Given a function with a required type argument vfun :: forall a -> ... the user can now call it as vfun (Maybe Int) instead of vfun (type (Maybe Int)) The Maybe Int argument is parsed and renamed as a term (HsExpr), but then undergoes a conversion to a type (HsType). See the new function expr_to_type in compiler/GHC/Tc/Gen/App.hs and Note [RequiredTypeArguments and the T2T mapping] Left as future work: checking for puns. - - - - - cc1c7c54 by Duncan Coutts at 2023-11-05T00:23:44-04:00 Add a test for I/O managers It tries to cover the cases of multiple threads waiting on the same fd for reading and multiple threads waiting for writing, including wait cancellation by async exceptions. It should work for any I/O manager, in-RTS or in-Haskell. Unfortunately it will not currently work for Windows because it relies on anonymous unix sockets. It could in principle be ported to use Windows named pipes. - - - - - 2e448f98 by Cheng Shao at 2023-11-05T00:23:44-04:00 Skip the IOManager test on wasm32 arch. The test relies on the sockets API which are not (yet) available. - - - - - fe50eb35 by Cheng Shao at 2023-11-05T00:24:20-04:00 compiler: fix eager blackhole symbol in wasm32 NCG - - - - - af771148 by Cheng Shao at 2023-11-05T00:24:20-04:00 testsuite: fix optasm tests for wasm32 - - - - - 1b90735c by Matthew Pickering at 2023-11-05T00:24:20-04:00 testsuite: Add wasm32 to testsuite arches with NCG The compiler --info reports that wasm32 compilers have a NCG, so we should agree with that here. - - - - - db9a6496 by Alan Zimmerman at 2023-11-05T00:24:55-04:00 EPA: make locA a function, not a field name And use it to generalise reLoc The following for the windows pipeline one. 5.5% Metric Increase: T5205 - - - - - 833e250c by Simon Peyton Jones at 2023-11-05T00:25:31-04:00 Update the unification count in wrapUnifierX Omitting this caused type inference to fail in #24146. This was an accidental omision in my refactoring of the equality solver. - - - - - e451139f by Andreas Klebinger at 2023-11-05T00:26:07-04:00 Remove an accidental git conflict marker from a comment. - - - - - e7da0d25 by Alan Zimmerman at 2023-11-05T11:20:31+00:00 EPA: match changes in GHC, l2l cleanup - - - - - 30baac7a by Tobias Haslop at 2023-11-06T10:50:32+00:00 Add laws relating between Foldable/Traversable with their Bi- superclasses See https://github.com/haskell/core-libraries-committee/issues/205 for discussion. This commit also documents that the tuple instances only satisfy the laws up to lazyness, similar to the documentation added in !9512. - - - - - df626f00 by Tobias Haslop at 2023-11-07T02:20:37-05:00 Elaborate on the quantified superclass of Bifunctor This was requested in the comment https://github.com/haskell/core-libraries-committee/issues/93#issuecomment-1597271700 for when Traversable becomes a superclass of Bitraversable, but similarly applies to Functor/Bifunctor, which already are in a superclass relationship. - - - - - 8217acb8 by Alan Zimmerman at 2023-11-07T02:21:12-05:00 EPA: get rid of l2l and friends Replace them with l2l to convert the location la2la to convert a GenLocated thing Updates haddock submodule - - - - - dd88a260 by Luite Stegeman at 2023-11-07T02:21:53-05:00 JS: remove broken newIdents from JStg Monad GHC.JS.JStg.Monad.newIdents was broken, resulting in duplicate identifiers being generated in h$c1, h$c2, ... . This change removes the broken newIdents. - - - - - 455524a2 by Matthew Craven at 2023-11-09T08:41:59-05:00 Create specially-solved DataToTag class Closes #20532. This implements CLC proposal 104: https://github.com/haskell/core-libraries-committee/issues/104 The design is explained in Note [DataToTag overview] in GHC.Tc.Instance.Class. This replaces the existing `dataToTag#` primop. These metric changes are not "real"; they represent Unique-related flukes triggering on a different set of jobs than they did previously. See also #19414. Metric Decrease: T13386 T8095 Metric Increase: T13386 T8095 Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - a05f4554 by Alan Zimmerman at 2023-11-09T08:42:35-05:00 EPA: get rid of glRR and friends in GHC/Parser.y With the HasLoc and HasAnnotation classes, we can replace a number of type-specific helper functions in the parser with polymorphic ones instead Metric Decrease: MultiLayerModulesTH_Make - - - - - 18498538 by Cheng Shao at 2023-11-09T16:58:12+00:00 ci: bump ci-images for wasi-sdk upgrade - - - - - 52c0fc69 by PHO at 2023-11-09T19:16:22-05:00 Don't assume the current locale is *.UTF-8, set the encoding explicitly primops.txt contains Unicode characters: > LC_ALL=C ./genprimopcode --data-decl < ./primops.txt > genprimopcode: <stdin>: hGetContents: invalid argument (cannot decode byte sequence starting from 226) Hadrian must also avoid using readFile' to read primops.txt because it tries to decode the file with a locale-specific encoding. - - - - - 7233b3b1 by PHO at 2023-11-09T19:17:01-05:00 Use '[' instead of '[[' because the latter is a Bash-ism It doesn't work on platforms where /bin/sh is something other than Bash. - - - - - 6dbab180 by Simon Peyton Jones at 2023-11-09T19:17:36-05:00 Add an extra check in kcCheckDeclHeader_sig Fix #24083 by checking for a implicitly-scoped type variable that is not actually bound. See Note [Disconnected type variables] in GHC.Tc.Gen.HsType For some reason, on aarch64-darwin we saw a 2.8% decrease in compiler allocations for MultiLayerModulesTH_Make; but 0.0% on other architectures. Metric Decrease: MultiLayerModulesTH_Make - - - - - 22551364 by Sven Tennie at 2023-11-11T06:35:22-05:00 AArch64: Delete unused LDATA pseudo-instruction Though there were consuming functions for LDATA, there were no producers. Thus, the removed code was "dead". - - - - - 2a0ec8eb by Alan Zimmerman at 2023-11-11T06:35:59-05:00 EPA: harmonise acsa and acsA in GHC/Parser.y With the HasLoc class, we can remove the acsa helper function, using acsA instead. - - - - - 4ceac14d by Alan Zimmerman at 2023-11-11T15:16:41+00:00 EPA: Replace Anchor with EpaLocation Match GHC - - - - - 7ae517a0 by Teo Camarasu at 2023-11-12T08:04:12-05:00 nofib: bump submodule This includes changes that: - fix building a benchmark with HEAD - remove a Makefile-ism that causes errors in bash scripts Resolves #24178 - - - - - 3f0036ec by Alan Zimmerman at 2023-11-12T08:04:47-05:00 EPA: Replace Anchor with EpaLocation An Anchor has a location and an operation, which is either that it is unchanged or that it has moved with a DeltaPos data Anchor = Anchor { anchor :: RealSrcSpan , anchor_op :: AnchorOperation } An EpaLocation also has either a location or a DeltaPos data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan) | EpaDelta !DeltaPos ![LEpaComment] Now that we do not care about always having a location in the anchor, we remove Anchor and replace it with EpaLocation We do this with a type alias initially, to ease the transition. The alias will be removed in time. We also have helpers to reconstruct the AnchorOperation from an EpaLocation. This is also temporary. Updates Haddock submodule - - - - - a7492048 by Alan Zimmerman at 2023-11-12T13:43:07+00:00 EPA: get rid of AnchorOperation Now that the Anchor type is an alias for EpaLocation, remove AnchorOperation. Updates haddock submodule - - - - - 0745c34d by Andrew Lelechenko at 2023-11-13T16:25:07-05:00 Add since annotation for showHFloat - - - - - e98051a5 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 Suppress duplicate librares linker warning of new macOS linker Fixes #24167 XCode 15 introduced a new linker which warns on duplicate libraries being linked. To disable this warning, we pass -Wl,-no_warn_duplicate_libraries as suggested by Brad King in CMake issue #25297. This flag isn't necessarily available to other linkers on darwin, so we must only configure it into the CC linker arguments if valid. - - - - - c411c431 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Encoding test witnesses recent iconv bug is fragile A regression in the new iconv() distributed with XCode 15 and MacOS Sonoma causes the test 'encoding004' to fail in the CP936 roundrip. We mark this test as fragile until this is fixed upstream (rather than broken, since previous versions of iconv pass the test) See #24161 - - - - - ce7fe5a9 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Update to LC_ALL=C no longer being ignored in darwin MacOS seems to have fixed an issue where it used to ignore the variable `LC_ALL` in program invocations and default to using Unicode. Since the behaviour seems to be fixed to account for the locale variable, we mark tests that were previously broken in spite of it as fragile (since they now pass in recent macOS distributions) See #24161 - - - - - e6c803f7 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 darwin: Fix single_module is obsolete warning In XCode 15's linker, -single_module is the default and otherwise passing it as a flag results in a warning being raised: ld: warning: -single_module is obsolete This patch fixes this warning by, at configure time, determining whether the linker supports -single_module (which is likely false for all non-darwin linkers, and true for darwin linkers in previous versions of macOS), and using that information at runtime to decide to pass or not the flag in the invocation. Fixes #24168 - - - - - 929ba2f9 by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 testsuite: Skip MultiLayerModulesTH_Make on darwin The recent toolchain upgrade on darwin machines resulted in the MultiLayerModulesTH_Make test metrics varying too much from the baseline, ultimately blocking the CI pipelines. This commit skips the test on darwin to temporarily avoid failures due to the environment change in the runners. However, the metrics divergence is being investigated still (tracked in #24177) - - - - - af261ccd by Rodrigo Mesquita at 2023-11-15T13:18:58-05:00 configure: check target (not build) understands -no_compact_unwind Previously, we were branching on whether the build system was darwin to shortcut this check, but we really want to branch on whether the target system (which is what we are configuring ld_prog for) is darwin. - - - - - 2125c176 by Luite Stegeman at 2023-11-15T13:19:38-05:00 JS: Fix missing variable declarations The JStg IR update was missing some local variable declarations that were present earlier, causing global variables to be used implicitly (or an error in JavaScript strict mode). This adds the local variable declarations again. - - - - - 99ced73b by Krzysztof Gogolewski at 2023-11-15T13:20:14-05:00 Remove loopy superclass solve mechanism Programs with a -Wloopy-superclass-solve warning will now fail with an error. Fixes #23017 - - - - - 2aff2361 by Zubin Duggal at 2023-11-15T13:20:50-05:00 users-guide: Fix links to libraries from the users-guide. The unit-ids generated in c1a3ecde720b3bddc2c8616daaa06ee324e602ab include the package name, so we don't need to explicitly add it to the links. Fixes #24151 - - - - - 27981fac by Alan Zimmerman at 2023-11-15T13:21:25-05:00 EPA: splitLHsForAllTyInvis does not return ann We did not use the annotations returned from splitLHsForAllTyInvis, so do not return them. - - - - - a6467834 by Krzysztof Gogolewski at 2023-11-15T22:22:59-05:00 Document defaulting of RuntimeReps Fixes #24099 - - - - - 2776920e by Simon Peyton Jones at 2023-11-15T22:23:35-05:00 Second fix to #24083 My earlier fix turns out to be too aggressive for data/type families See wrinkle (DTV1) in Note [Disconnected type variables] - - - - - cee81370 by Sylvain Henry at 2023-11-16T09:57:46-05:00 Fix unusable units and module reexport interaction (#21097) This commit fixes an issue with ModUnusable introduced in df0f148feae. In mkUnusableModuleNameProvidersMap we traverse the list of unusable units and generate ModUnusable origin for all the modules they contain: exposed modules, hidden modules, and also re-exported modules. To do this we have a two-level map: ModuleName -> Unit:ModuleName (aka Module) -> ModuleOrigin So for each module name "M" in broken unit "u" we have: "M" -> u:M -> ModUnusable reason However in the case of module reexports we were using the *target* module as a key. E.g. if "u:M" is a reexport for "X" from unit "o": "M" -> o:X -> ModUnusable reason Case 1: suppose a reexport without module renaming (u:M -> o:M) from unusable unit u: "M" -> o:M -> ModUnusable reason Here it's claiming that the import of M is unusable because a reexport from u is unusable. But if unit o isn't unusable we could also have in the map: "M" -> o:M -> ModOrigin ... Issue: the Semigroup instance of ModuleOrigin doesn't handle the case (ModUnusable <> ModOrigin) Case 2: similarly we could have 2 unusable units reexporting the same module without renaming, say (u:M -> o:M) and (v:M -> o:M) with u and v unusable. It gives: "M" -> o:M -> ModUnusable ... (for u) "M" -> o:M -> ModUnusable ... (for v) Issue: the Semigroup instance of ModuleOrigin doesn't handle the case (ModUnusable <> ModUnusable). This led to #21097, #16996, #11050. To fix this, in this commit we make ModUnusable track whether the module used as key is a reexport or not (for better error messages) and we use the re-export module as key. E.g. if "u:M" is a reexport for "o:X" and u is unusable, we now record: "M" -> u:M -> ModUnusable reason reexported=True So now, we have two cases for a reexport u:M -> o:X: - u unusable: "M" -> u:M -> ModUnusable ... reexported=True - u usable: "M" -> o:X -> ModOrigin ... reexportedFrom=u:M The second case is indexed with o:X because in this case the Semigroup instance of ModOrigin is used to combine valid expositions of a module (directly or via reexports). Note that module lookup functions select usable modules first (those who have a ModOrigin value), so it doesn't matter if we add new ModUnusable entries in the map like this: "M" -> { u:M -> ModUnusable ... reexported=True o:M -> ModOrigin ... } The ModOrigin one will be used. Only if there is no ModOrigin or ModHidden entry will the ModUnusable error be printed. See T21097 for an example printing several reasons why an import is unusable. - - - - - 3e606230 by Krzysztof Gogolewski at 2023-11-16T09:58:22-05:00 Fix IPE test A helper function was defined in a different module than used. To reproduce: ./hadrian/build test --test-root-dirs=testsuite/tests/rts/ipe - - - - - 49f5264b by Andreas Klebinger at 2023-11-16T20:52:11-05:00 Properly compute unpacked sizes for -funpack-small-strict-fields. Use rep size rather than rep count to compute the size. Fixes #22309 - - - - - b4f84e4b by James Henri Haydon at 2023-11-16T20:52:53-05:00 Explicit methods for Alternative Compose Explicitly define some and many in Alternative instance for Data.Functor.Compose Implementation of https://github.com/haskell/core-libraries-committee/issues/181 - - - - - 9bc0dd1f by Ignat Insarov at 2023-11-16T20:53:34-05:00 Add permutations for non-empty lists. Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/68#issuecomment-1221409837 - - - - - 5643ecf9 by Andrew Lelechenko at 2023-11-16T20:53:34-05:00 Update changelog and since annotations for Data.List.NonEmpty.permutations Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/68#issuecomment-1221409837 - - - - - 94ff2134 by Oleg Alexander at 2023-11-16T20:54:15-05:00 Update doc string for traceShow Updated doc string for traceShow. - - - - - faff671a by Luite Stegeman at 2023-11-17T14:12:51+01:00 JS: clean up some foreign imports - - - - - 856e0a4e by Sven Tennie at 2023-11-18T06:54:11-05:00 AArch64: Remove unused instructions As these aren't ever emitted, we don't even know if they work or will ever be used. If one of them is needed in future, we may easily re-add it. Deleted instructions are: - CMN - ANDS - BIC - BICS - EON - ORN - ROR - TST - STP - LDP - DMBSY - - - - - 615441ef by Alan Zimmerman at 2023-11-18T06:54:46-05:00 EPA: Replace Monoid with NoAnn Remove the final Monoid instances in the exact print infrastructure. For Windows CI Metric Decrease: T5205 - - - - - 5a6c49d4 by David Feuer at 2023-11-20T18:53:18-05:00 Speed up stimes in instance Semigroup Endo As discussed at https://github.com/haskell/core-libraries-committee/issues/4 - - - - - cf9da4b3 by Andrew Lelechenko at 2023-11-20T18:53:18-05:00 base: reflect latest changes in the changelog - - - - - 48bf364e by Alan Zimmerman at 2023-11-20T18:53:54-05:00 EPA: Use SrcSpan in EpaSpan This is more natural, since we already need to deal with invalid RealSrcSpans, and that is exactly what SrcSpan.UnhelpfulSpan is for. Updates haddock submodule. - - - - - 97ec37cc by Sebastian Graf at 2023-11-20T18:54:31-05:00 Add regression test for #6070 Fixes #6070. - - - - - e9d5ae41 by Owen Shepherd at 2023-11-21T18:32:23-05:00 chore: Correct typo in the gitlab MR template [skip ci] - - - - - f158a8d0 by Rodrigo Mesquita at 2023-11-21T18:32:59-05:00 Improve error message when reading invalid `.target` files A `.target` file generated by ghc-toolchain or by configure can become invalid if the target representation (`Toolchain.Target`) is changed while the files are not re-generated by calling `./configure` or `ghc-toolchain` again. There is also the issue of hadrian caching the dependencies on `.target` files, which makes parsing fail when reading reading the cached value if the representation has been updated. This patch provides a better error message in both situations, moving away from a terrible `Prelude.read: no parse` error that you would get otherwise. Fixes #24199 - - - - - 955520c6 by Ben Gamari at 2023-11-21T18:33:34-05:00 users guide: Note that QuantifiedConstraints implies ExplicitForAll Fixes #24025. - - - - - 17ec3e97 by Owen Shepherd at 2023-11-22T09:37:28+01:00 fix: Change type signatures in NonEmpty export comments to reflect reality This fixes several typos in the comments of Data.List.NonEmpty export list items. - - - - - 2fd78f9f by Samuel Thibault at 2023-11-22T11:49:13-05:00 Fix the platform string for GNU/Hurd As commited in Cargo https://github.com/haskell/cabal/pull/9434 there is confusion between "gnu" and "hurd". This got fixed in Cargo, we need the converse in Hadrian. Fixes #24180 - - - - - a79960fe by Alan Zimmerman at 2023-11-22T11:49:48-05:00 EPA: Tuple Present no longer has annotation The Present constructor for a Tuple argument will never have an exact print annotation. So make this impossible. - - - - - 121c9ab7 by David Binder at 2023-11-22T21:12:29-05:00 Unify the hpc testsuites The hpc testsuite was split between testsuite/tests/hpc and the submodule libraries/hpc/test. This commit unifies the two testsuites in the GHC repository in the directory testsuite/tests/hpc. - - - - - d2733a05 by Alan Zimmerman at 2023-11-22T21:13:05-05:00 EPA: empty tup_tail has noAnn In Parser.y, the tup_tail rule had the following option | {- empty -} %shift { return [Left noAnn] } Once this works through PostProcess.hs, it means we add an extra Missing constructor if the last item was a comma. Change the annotation type to a Bool to indicate this, and use the EpAnn Anchor for the print location for the others. - - - - - fa576eb8 by Andreas Klebinger at 2023-11-24T08:29:13-05:00 Fix FMA primops generating broken assembly on x86. `genFMA3Code` assumed that we had to take extra precations to avoid overwriting the result of `getNonClobberedReg`. One of these special cases caused a bug resulting in broken assembly. I believe we don't need to hadle these cases specially at all, which means this MR simply deletes the special cases to fix the bug. Fixes #24160 - - - - - 34d86315 by Alan Zimmerman at 2023-11-24T08:29:49-05:00 EPA: Remove parenthesizeHsType This is called from PostProcess.hs, and adds spurious parens. With the looser version of exact printing we had before we could tolerate this, as they would be swallowed by the original at the same place. But with the next change (remove EpAnnNotUsed) they result in duplicates in the output. For Darwin build: Metric Increase: MultiLayerModulesTH_OneShot - - - - - 3ede659d by Vladislav Zavialov at 2023-11-26T06:43:32-05:00 Add name for -Wdeprecated-type-abstractions (#24154) This warning had no name or flag and was triggered unconditionally. Now it is part of -Wcompat. - - - - - 7902ebf8 by Alan Zimmerman at 2023-11-26T06:44:08-05:00 EPA: Remove EpAnnNotUsed We no longer need the EpAnnNotUsed constructor for EpAnn, as we can represent an unused annotation with an anchor having a EpaDelta of zero, and empty comments and annotations. This simplifies code handling annotations considerably. Updates haddock submodule Metric Increase: parsing001 - - - - - 471b2672 by Mario Blažević at 2023-11-26T06:44:48-05:00 Bumped the upper bound of text to <2.2 - - - - - d1bf25c7 by Vladislav Zavialov at 2023-11-26T11:45:49-05:00 Term variable capture (#23740) This patch changes type variable lookup rules (lookupTypeOccRn) and implicit quantification rules (filterInScope) so that variables bound in the term namespace can be captured at the type level {-# LANGUAGE RequiredTypeArguments #-} f1 x = g1 @x -- `x` used in a type application f2 x = g2 (undefined :: x) -- `x` used in a type annotation f3 x = g3 (type x) -- `x` used in an embedded type f4 x = ... where g4 :: x -> x -- `x` used in a type signature g4 = ... This change alone does not allow us to accept examples shown above, but at least it gets them past the renamer. - - - - - da863d15 by Vladislav Zavialov at 2023-11-26T11:46:26-05:00 Update Note [hsScopedTvs and visible foralls] The Note was written before GHC gained support for visible forall in types of terms. Rewrite a few sentences and use a better example. - - - - - b5213542 by Matthew Pickering at 2023-11-27T12:53:59-05:00 testsuite: Add mechanism to collect generic metrics * Generalise the metric logic by adding an additional field which allows you to specify how to query for the actual value. Previously the method of querying the baseline value was abstracted (but always set to the same thing). * This requires rejigging how the stat collection works slightly but now it's more uniform and hopefully simpler. * Introduce some new "generic" helper functions for writing generic stats tests. - collect_size ( deviation, path ) Record the size of the file as a metric - stat_from_file ( metric, deviation, path ) Read a value from the given path, and store that as a metric - collect_generic_stat ( metric, deviation, get_stat) Provide your own `get_stat` function, `lambda way: <Int>`, which can be used to establish the current value of the metric. - collect_generic_stats ( metric_info ): Like collect_generic_stat but provide the whole dictionary of metric definitions. { metric: { deviation: <Int> current: lambda way: <Int> } } * Introduce two new "size" metrics for keeping track of build products. - `size_hello_obj` - The size of `hello.o` from compiling hello.hs - `libdir` - The total size of the `libdir` folder. * Track the number of modules in the AST tests - CountDepsAst - CountDepsParser This lays the infrastructure for #24191 #22256 #17129 - - - - - 7d9a2e44 by ARATA Mizuki at 2023-11-27T12:54:39-05:00 x86: Don't require -mavx2 when using 256-bit floating-point SIMD primitives Fixes #24222 - - - - - 4e5ff6a4 by Alan Zimmerman at 2023-11-27T12:55:15-05:00 EPA: Remove SrcSpanAnn Now that we only have a single constructor for EpAnn, And it uses a SrcSpan for its location, we can do away with SrcSpanAnn completely. It only existed to wrap the original SrcSpan in a location, and provide a place for the exact print annotation. For darwin only: Metric Increase: MultiLayerModulesTH_OneShot Updates haddock submodule - - - - - e05bca39 by Krzysztof Gogolewski at 2023-11-28T08:00:55-05:00 testsuite: don't initialize testdir to '.' The test directory is removed during cleanup, if there's an interrupt that could remove the entire repository. Fixes #24219 - - - - - af881674 by Alan Zimmerman at 2023-11-28T08:01:30-05:00 EPA: Clean up mkScope in Ast.hs Now that we have HasLoc we can get rid of all the custom variants of mkScope For deb10-numa Metric Increase: libdir - - - - - 292983c8 by Ben Gamari at 2023-11-28T22:44:28-05:00 distrib: Rediscover otool and install_name_tool on Darwin In the bindist configure script we must rediscover the `otool` and `install_name_tool`s since they may be different from the build environment. Fixes #24211. - - - - - dfe1c354 by Stefan Schulze Frielinghaus at 2023-11-28T22:45:04-05:00 llvmGen: Align objects in the data section Objects in the data section may be referenced via tagged pointers. Thus, align those objects to a 4- or 8-byte boundary for 32- or 64-bit platforms, respectively. Note, this may need to be reconsidered if objects with a greater natural alignment requirement are emitted as e.g. 128-bit atomics. Fixes #24163. - - - - - f6c486c3 by Matthew Pickering at 2023-11-29T11:08:13-05:00 metrics: Widen libdir and size_hello_obj acceptance window af8816740d9b8759be1a22af8adcb5f13edeb61d shows that the libdir size can fluctuate quite significantly even when the change is quite small. Therefore we widen the acceptance window to 10%. - - - - - 99a6a49c by Alan Zimmerman at 2023-11-29T11:08:49-05:00 EPA: Clean up TC Monad Utils We no longer need the alternative variant of addLocM (addLocMA) nor wrapLocAM, wrapLocSndMA. aarch64-darwin Metric Increase: MultiLayerModulesTH_OneShot deb10-numa-slow Metric Decrease: libdir - - - - - 94fb8d47 by Alan Zimmerman at 2023-11-29T18:10:26+00:00 Match GHC, No comments in EpaDelta for comments - - - - - cbc03fa0 by Sebastian Graf at 2023-11-30T12:37:21-05:00 perf tests: Move comments into new `Note [Sensitivity to unique increment]` (#19414) And additionally to T12545, link from T8095, T13386 to this new Note. - - - - - c7623b22 by Alan Zimmerman at 2023-11-30T12:37:56-05:00 EPA: EpaDelta for comment has no comments EpaLocation is used to position things. It has two constructors, EpaSpan holding a SrcSpan, and EpaDelta with a delta position and a possible list of comments. The comment list is needed because the location in EpaDelta has no absolute information to decide which comments should be emitted before them when printing. But it is also used for specifying the position of a comment. To prevent the absurdity of a comment position having a list of comments in it, we make EpaLocation parameterisable, using comments for the normal case and a constant for within comments. Updates haddock submodule. aarch64-darwin Metric Decrease: MultiLayerModulesTH_OneShot - - - - - bd8acc0c by Krzysztof Gogolewski at 2023-11-30T12:38:32-05:00 Kind-check body of a required forall We now require that in 'forall a -> ty', ty has kind TYPE r for some r. Fixes #24176 - - - - - 010fb784 by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Remove incorrect haddock link quotes in code block - - - - - cda9c12d by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Remove cycle from group haddock example - - - - - 495265b9 by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Use repl haddock syntax in group docs - - - - - d134d1de by Owen Shepherd at 2023-12-03T00:10:09-05:00 docs(NonEmpty/group): Use list [] notation in group haddock - - - - - dfcf629c by Owen Shepherd at 2023-12-03T00:10:10-05:00 docs(NonEmpty/group): Specify final property of group function in haddock - - - - - cad3b734 by Owen Shepherd at 2023-12-03T00:10:10-05:00 fix: Add missing property of List.group - - - - - bad37656 by Matthew Pickering at 2023-12-03T00:10:46-05:00 testsuite: Fix T21097b test with make 4.1 (deb9) cee81370cd6ef256f66035e3116878d4cb82e28b recently added a test which failed on deb9 because the version of make was emitting the recipe failure to stdout rather than stderr. One way to fix this is to be more precise in the test about which part of the output we care about inspecting. - - - - - 5efdf421 by Matthew Pickering at 2023-12-03T00:11:21-05:00 testsuite: Track size of libdir in bytes For consistency it's better if we track all size metrics in bytes. Metric Increase: libdir - - - - - f5eb0f29 by Matthew Pickering at 2023-12-03T00:11:22-05:00 testsuite: Remove rogue trace in testsuite I accidentally left a trace in the generics metric patch. - - - - - d5610737 by Claudio Bley at 2023-12-06T16:13:33-05:00 Only exit ghci in -e mode when :add command fails Previously, when running `ghci -e ':add Sample.hs'` the process would exit with exit code 1 if the file exists and could be loaded. Fixes #24115 - - - - - 0f0c53a5 by Vladislav Zavialov at 2023-12-06T16:14:09-05:00 T2T in Patterns (#23739) This patch implements the T2T (term-to-type) transformation in patterns. Patterns that are checked against a visible forall can now be written without the `type` keyword: \(type t) (x :: t) -> ... -- old \t (x :: t) -> ... -- new The `t` binder is parsed and renamed as a term pattern (Pat), but then undergoes a conversion to a type pattern (HsTyPat). See the new function pat_to_type_pat in compiler/GHC/Tc/Gen/Pat.hs - - - - - 10a1a6c6 by Sebastian Graf at 2023-12-06T16:14:45-05:00 Pmc: Fix SrcLoc and warning for incomplete irrefutable pats (#24234) Before, the source location would point at the surrounding function definition, causing the confusion in #24234. I also took the opportunity to introduce a new `LazyPatCtx :: HsMatchContext _` to make the warning message say "irrefutable pattern" instead of "pattern binding". - - - - - 36b9a38c by Matthew Pickering at 2023-12-06T16:15:21-05:00 libraries: Bump filepath to 1.4.200.1 and unix to 2.8.4.0 Updates filepath submodule Updates unix submodule Fixes #24240 - - - - - 91ff0971 by Matthew Pickering at 2023-12-06T16:15:21-05:00 Submodule linter: Allow references to tags We modify the submodule linter so that if the bumped commit is a specific tag then the commit is accepted. Fixes #24241 - - - - - 86f652dc by Zubin Duggal at 2023-12-06T16:15:21-05:00 hadrian: set -Wno-deprecations for directory and Win32 The filepath bump to 1.4.200.1 introduces a deprecation warning. See https://gitlab.haskell.org/ghc/ghc/-/issues/24240 https://github.com/haskell/filepath/pull/206 - - - - - 7ac6006e by Sylvain Henry at 2023-12-06T16:16:02-05:00 Zap OccInfo on case binders during StgCse #14895 #24233 StgCse can revive dead binders: case foo of dead { Foo x y -> Foo x y; ... } ===> case foo of dead { Foo x y -> dead; ... } -- dead is no longer dead So we must zap occurrence information on case binders. Fix #14895 and #24233 - - - - - 57c391c4 by Sebastian Graf at 2023-12-06T16:16:37-05:00 Cpr: Turn an assertion into a check to deal with some dead code (#23862) See the new `Note [Dead code may contain type confusions]`. Fixes #23862. - - - - - c1c8abf8 by Zubin Duggal at 2023-12-08T02:25:07-05:00 testsuite: add test for #23944 - - - - - 6329d308 by Zubin Duggal at 2023-12-08T02:25:07-05:00 driver: Only run a dynamic-too pipeline if object files are going to be generated Otherwise we run into a panic in hscMaybeWriteIface: "Unexpected DT_Dyn state when writing simple interface" when dynamic-too is enabled We could remove the panic and just write the interface even if the state is `DT_Dyn`, but it seems pointless to run the pipeline twice when `hscMaybeWriteIface` is already designed to write both `hi` and `dyn_hi` files if dynamic-too is enabled. Fixes #23944. - - - - - 28811f88 by Simon Peyton Jones at 2023-12-08T05:47:18-05:00 Improve duplicate elimination in SpecConstr This partially fixes #24229. See the new Note [Pattern duplicate elimination] in SpecConstr - - - - - fec7894f by Simon Peyton Jones at 2023-12-08T05:47:18-05:00 Make SpecConstr deal with casts better This patch does two things, to fix #23209: * It improves SpecConstr so that it no longer quantifies over coercion variables. See Note [SpecConstr and casts] * It improves the rule matcher to deal nicely with the case where the rule does not quantify over coercion variables, but the the template has a cast in it. See Note [Casts in the template] - - - - - 8db8d2fd by Zubin Duggal at 2023-12-08T05:47:54-05:00 driver: Don't lose track of nodes when we fail to resolve cycles The nodes that take part in a cycle should include both hs-boot and hs files, but when we fail to resolve a cycle, we were only counting the nodes from the graph without boot files. Fixes #24196 - - - - - c5b4efd3 by Zubin Duggal at 2023-12-08T05:48:30-05:00 testsuite: Skip MultiLayerModulesTH_OneShot on darwin See #24177 - - - - - fae472a9 by Wendao Lee at 2023-12-08T05:49:12-05:00 docs(Data.Char):Add more detailed descriptions for some functions Related changed function's docs: -GHC.Unicode.isAlpha -GHC.Unicode.isPrint -GHC.Unicode.isAlphaNum Add more details for what the function will return. Co-authored-by: Bodigrim <andrew.lelechenko at gmail.com> - - - - - ca7510e4 by Malik Ammar Faisal at 2023-12-08T05:49:55-05:00 Fix float parsing in GHC Cmm Lexer Add test case for bug #24224 - - - - - d8baa1bd by Simon Peyton Jones at 2023-12-08T15:40:37+00:00 Take care when simplifying unfoldings This MR fixes a very subtle bug exposed by #24242. See Note [Environment for simplLetUnfolding]. I also updated a bunch of Notes on shadowing - - - - - 03ca551d by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Comments only in FloatIn Relevant to #3458 - - - - - 50c78779 by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Comments only in SpecConstr - - - - - 9431e195 by Simon Peyton Jones at 2023-12-08T15:54:50-05:00 Add test for #22238 - - - - - d9e4c597 by Vladislav Zavialov at 2023-12-11T04:19:34-05:00 Make forall a keyword (#23719) Before this change, GHC used to accept `forall` as a term-level identifier: -- from constraints-0.13 forall :: forall p. (forall a. Dict (p a)) -> Dict (Forall p) forall d = ... Now it is a parse error. The -Wforall-identifier warning has served its purpose and is now a deprecated no-op. - - - - - 58d56644 by Zubin Duggal at 2023-12-11T04:20:10-05:00 driver: Ensure we actually clear the interactive context before reloading Previously we called discardIC, but immediately after set the session back to an old HscEnv that still contained the IC Partially addresses #24107 Fixes #23405 - - - - - 8e5745a0 by Zubin Duggal at 2023-12-11T04:20:10-05:00 driver: Ensure we force the lookup of old build artifacts before returning the build plan This prevents us from retaining all previous build artifacts in memory until a recompile finishes, instead only retaining the exact artifacts we need. Fixes #24118 - - - - - 105c370c by Zubin Duggal at 2023-12-11T04:20:10-05:00 testsuite: add test for #24118 and #24107 MultiLayerModulesDefsGhci was not able to catch the leak because it uses :l which discards the previous environment. Using :r catches both of these leaks - - - - - e822ff88 by Zubin Duggal at 2023-12-11T04:20:10-05:00 compiler: Add some strictness annotations to ImportSpec and related constructors This prevents us from retaining entire HscEnvs. Force these ImportSpecs when forcing the GlobalRdrEltX Adds an NFData instance for Bag Fixes #24107 - - - - - 522c12a4 by Zubin Duggal at 2023-12-11T04:20:10-05:00 compiler: Force IfGlobalRdrEnv in NFData instance. - - - - - 188b280d by Arnaud Spiwack at 2023-12-11T15:33:31+01:00 LinearTypes => MonoLocalBinds - - - - - 8e0446df by Arnaud Spiwack at 2023-12-11T15:44:28+01:00 Linear let and where bindings For expediency, the initial implementation of linear types in GHC made it so that let and where binders would always be considered unrestricted. This was rather unpleasant, and probably a big obstacle to adoption. At any rate, this was not how the proposal was designed. This patch fixes this infelicity. It was surprisingly difficult to build, which explains, in part, why it took so long to materialise. As of this patch, let or where bindings marked with %1 will be linear (respectively %p for an arbitrary multiplicity p). Unmarked let will infer their multiplicity. Here is a prototypical example of program that used to be rejected and is accepted with this patch: ```haskell f :: A %1 -> B g :: B %1 -> C h :: A %1 -> C h x = g y where y = f x ``` Exceptions: - Recursive let are unrestricted, as there isn't a clear semantics of what a linear recursive binding would be. - Destructive lets with lazy bindings are unrestricted, as their desugaring isn't linear (see also #23461). - (Strict) destructive lets with inferred polymorphic type are unrestricted. Because the desugaring isn't linear (See #18461 down-thread). Closes #18461 and #18739 Co-authored-by: @jackohughes - - - - - effa7e2d by Matthew Craven at 2023-12-12T04:37:20-05:00 Introduce `dataToTagSmall#` primop (closes #21710) ...and use it to generate slightly better code when dataToTag# is used at a "small data type" where there is no need to mess with "is_too_big_tag" or potentially look at an info table. Metric Decrease: T18304 - - - - - 35c7aef6 by Matthew Craven at 2023-12-12T04:37:20-05:00 Fix formatting of Note [alg-alt heap check] - - - - - 7397c784 by Oleg Grenrus at 2023-12-12T04:37:56-05:00 Allow untyped brackets in typed splices and vice versa. Resolves #24190 Apparently the check was essentially always (as far as I can trace back: d0d47ba76f8f0501cf3c4966bc83966ab38cac27), and while it does catch some mismatches, the type-checker will catch them too. OTOH, it prevents writing completely reasonable programs. - - - - - 32d208e1 by Vladislav Zavialov at 2023-12-12T20:41:36+03:00 EPA: Match changes to LHsToken removal - - - - - a3ee3b99 by Moritz Angermann at 2023-12-12T19:50:58-05:00 Drop hard Xcode dependency XCODE_VERSION calls out to `xcodebuild`, which is only available when having `Xcode` installed. The CommandLineTools are not sufficient. To install Xcode, you must have an apple id to download the Xcode.xip from apple. We do not use xcodebuild anywhere in our build explicilty. At best it appears to be a proxy for checking the linker or the compiler. These should rather be done with ``` xcrun ld -version ``` or similar, and not by proxy through Xcode. The CLR should be sufficient for building software on macOS. - - - - - 1c9496e0 by Vladislav Zavialov at 2023-12-12T19:51:34-05:00 docs: update information on RequiredTypeArguments Update the User's Guide and Release Notes to account for the recent progress in the implementation of RequiredTypeArguments. - - - - - d0b17576 by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Fix off-by-one in assertion Previously we failed to account for the NULL terminator `postString` asserted that there is enough room in the buffer for the string. - - - - - a10f9b9b by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Honor result of ensureRoomForVariableEvent is Previously we would keep plugging along, even if isn't enough room for the event. - - - - - 0e0f41c0 by Ben Gamari at 2023-12-13T06:33:37-05:00 rts/eventlog: Avoid truncating event sizes Previously ensureRoomForVariableEvent would truncate the desired size to 16-bits, resulting in #24197. Fixes #24197. - - - - - 64e724c8 by Artin Ghasivand at 2023-12-13T06:34:20-05:00 Remove the "Derived Constraint" argument of TcPluginSolver, docs - - - - - fe6d97dd by Vladislav Zavialov at 2023-12-13T06:34:56-05:00 EPA: Move tokens into GhcPs extension fields (#23447) Summary of changes * Remove Language.Haskell.Syntax.Concrete * Move all tokens into GhcPs extension fields (LHsToken -> EpToken) * Create new TTG extension fields as needed * Drop the MultAnn wrapper Updates the haddock submodule. Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 8106e695 by Zubin Duggal at 2023-12-13T06:35:34-05:00 testsuite: use copy_files in T23405 This prevents the tree from being dirtied when the file is modified. - - - - - ed0e4099 by Bryan Richter at 2023-12-14T04:30:53-05:00 Document ghc package's PVP-noncompliance This changes nothing, it just makes the status quo explicit. - - - - - 8bef8d9f by Luite Stegeman at 2023-12-14T04:31:33-05:00 JS: Mark spurious CI failures js_fragile(24259) This marks the spurious test failures on the JS platform as js_fragile(24259), so we don't hold up merge requests while fixing the underlying issues. See #24259 - - - - - 1c79526a by Finley McIlwaine at 2023-12-15T12:24:40-08:00 Late plugins - - - - - 000c3302 by Finley McIlwaine at 2023-12-15T12:24:40-08:00 withTiming on LateCCs and late plugins - - - - - be4551ac by Finley McIlwaine at 2023-12-15T12:24:40-08:00 add test for late plugins - - - - - 7c29da9f by Finley McIlwaine at 2023-12-15T12:24:40-08:00 Document late plugins - - - - - 9a52ae46 by Ben Gamari at 2023-12-20T07:07:26-05:00 Fix thunk update ordering Previously we attempted to ensure soundness of concurrent thunk update by synchronizing on the access of the thunk's info table pointer field. This was believed to be sufficient since the indirectee (which may expose a closure allocated by another core) would not be examined until the info table pointer update is complete. However, it turns out that this can result in data races in the presence of multiple threads racing a update a single thunk. For instance, consider this interleaving under the old scheme: Thread A Thread B --------- --------- t=0 Enter t 1 Push update frame 2 Begin evaluation 4 Pause thread 5 t.indirectee=tso 6 Release t.info=BLACKHOLE 7 ... (e.g. GC) 8 Resume thread 9 Finish evaluation 10 Relaxed t.indirectee=x 11 Load t.info 12 Acquire fence 13 Inspect t.indirectee 14 Release t.info=BLACKHOLE Here Thread A enters thunk `t` but is soon paused, resulting in `t` being lazily blackholed at t=6. Then, at t=10 Thread A finishes evaluation and updates `t.indirectee` with a relaxed store. Meanwhile, Thread B enters the blackhole. Under the old scheme this would introduce an acquire-fence but this would only synchronize with Thread A at t=6. Consequently, the result of the evaluation, `x`, is not visible to Thread B, introducing a data race. We fix this by treating the `indirectee` field as we do all other mutable fields. This means we must always access this field with acquire-loads and release-stores. See #23185. - - - - - f4b53538 by Vladislav Zavialov at 2023-12-20T07:08:02-05:00 docs: Fix link to 051-ghc-base-libraries.rst The proposal is no longer available at the previous URL. - - - - - f7e21fab by Matthew Pickering at 2023-12-21T14:57:40+00:00 hadrian: Build all executables in bin/ folder In the end the bindist creation logic copies them all into the bin folder. There is no benefit to building a specific few binaries in the lib/bin folder anymore. This also removes the ad-hoc logic to copy the touchy and unlit executables from stage0 into stage1. It takes <1s to build so we might as well just build it. - - - - - 0038d052 by Zubin Duggal at 2023-12-22T23:28:00-05:00 testsuite: mark jspace as fragile on i386. This test has been flaky for some time and has been failing consistently on i386-linux since 8e0446df landed. See #24261 - - - - - dfd670a0 by Ben Bellick at 2023-12-24T10:10:31-05:00 Deprecate -ddump-json and introduce -fdiagnostics-as-json Addresses #19278 This commit deprecates the underspecified -ddump-json flag and introduces a newer, well-specified flag -fdiagnostics-as-json. Also included is a JSON schema as part of the documentation. The -ddump-json flag will be slated for removal shortly after this merge. - - - - - 609e6225 by Ben Bellick at 2023-12-24T10:10:31-05:00 Deprecate -ddump-json and introduce -fdiagnostics-as-json Addresses #19278 This commit deprecates the underspecified -ddump-json flag and introduces a newer, well-specified flag -fdiagnostics-as-json. Also included is a JSON schema as part of the documentation. The -ddump-json flag will be slated for removal shortly after this merge. - - - - - 865513b2 by Ömer Sinan Ağacan at 2023-12-24T10:11:13-05:00 Fix BNF in user manual 6.6.8.2: formal syntax for instance declarations - - - - - c247b6be by Zubin Duggal at 2023-12-25T16:01:23-05:00 docs: document permissibility of -XOverloadedLabels (#24249) Document the permissibility introduced by https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0170-unrestricted-overloadedlabels.rst - - - - - e5b7eb59 by Ömer Sinan Ağacan at 2023-12-25T16:02:03-05:00 Fix a code block syntax in user manual sec. 6.8.8.6 - - - - - 2db11c08 by Ben Gamari at 2023-12-29T15:35:48-05:00 genSym: Reimplement via CAS on 32-bit platforms Previously the remaining use of the C implementation on 32-bit platforms resulted in a subtle bug, #24261. This was due to the C object (which used the RTS's `atomic_inc64` macro) being compiled without `-threaded` yet later being used in a threaded compiler. Side-step this issue by using the pure Haskell `genSym` implementation on all platforms. This required implementing `fetchAddWord64Addr#` in terms of CAS on 64-bit platforms. - - - - - 19328a8c by Xiaoyan Ren at 2023-12-29T15:36:30-05:00 Do not color the diagnostic code in error messages (#24172) - - - - - 685b467c by Krzysztof Gogolewski at 2023-12-29T15:37:06-05:00 Enforce that bindings of implicit parameters are lifted Fixes #24298 - - - - - bc4d67b7 by Matthew Craven at 2023-12-31T06:15:42-05:00 StgToCmm: Detect some no-op case-continuations ...and generate no code for them. Fixes #24264. - - - - - 5b603139 by Krzysztof Gogolewski at 2023-12-31T06:16:18-05:00 Revert "testsuite: mark jspace as fragile on i386." This reverts commit 0038d052c8c80b4b430bb2aa1c66d5280be1aa95. The atomicity bug should be fixed by !11802. - - - - - d55216ad by Krzysztof Gogolewski at 2024-01-01T12:05:49-05:00 Refactor: store [[PrimRep]] rather than [Type] in STG StgConApp stored a list of types. This list was used exclusively during unarisation of unboxed sums (mkUbxSum). However, this is at a wrong level of abstraction: STG shouldn't be concerned with Haskell types, only PrimReps. Update the code to store a [[PrimRep]]. Also, there's no point in storing this list when we're not dealing with an unboxed sum. - - - - - 8b340bc7 by Ömer Sinan Ağacan at 2024-01-01T12:06:29-05:00 Kind signatures docs: mention that they're allowed in newtypes - - - - - 989bf8e5 by Zubin Duggal at 2024-01-03T20:08:47-05:00 ci: Ensure we use the correct bindist name for the test artifact when generating release ghcup metadata Fixes #24268 - - - - - 89299a89 by Krzysztof Gogolewski at 2024-01-03T20:09:23-05:00 Refactor: remove calls to typePrimRepArgs The function typePrimRepArgs is just a thin wrapper around typePrimRep, adding a VoidRep if the list is empty. However, in StgToByteCode, we were discarding that VoidRep anyway, so there's no point in calling it. - - - - - c7be0c68 by mmzk1526 at 2024-01-03T20:10:07-05:00 Use "-V" for alex version check for better backward compatibility Fixes #24302. In recent versions of alex, "-v" is used for "--verbose" instead of "-version". - - - - - 67dbcc0a by Krzysztof Gogolewski at 2024-01-05T02:07:18-05:00 Fix VoidRep handling in ghci debugger 'go' inside extractSubTerms was giving a bad result given a VoidRep, attempting to round towards the next multiple of 0. I don't understand much about the debugger but the code should be better than it was. Fixes #24306 - - - - - 90ea574e by Krzysztof Gogolewski at 2024-01-05T02:07:54-05:00 VoidRep-related refactor * In GHC.StgToByteCode, replace bcIdPrimId with idPrimRep, bcIdArgRep with idArgRep, atomPrimRep with stgArgRep1. All of them were duplicates. * In GHC.Stg.Unarise, we were converting a PrimRep to a Type and back to PrimRep. Remove the calls to primRepToType and typePrimRep1 which cancel out. * In GHC.STG.Lint, GHC.StgToCmm, GHC.Types.RepType we were filtering out VoidRep from the result of typePrimRep. But typePrimRep never returns VoidRep - remove the filtering. - - - - - eaf72479 by brian at 2024-01-06T23:03:09-05:00 Add unaligned Addr# primops Implements CLC proposal #154: https://github.com/haskell/core-libraries-committee/issues/154 * add unaligned addr primops * add tests * accept tests * add documentation * fix js primops * uncomment in access ops * use Word64 in tests * apply suggestions * remove extra file * move docs * remove random options * use setByteArray# primop * better naming * update base-exports test * add base-exports for other architectures - - - - - d471d445 by Krzysztof Gogolewski at 2024-01-06T23:03:47-05:00 Remove VoidRep from PrimRep, introduce PrimOrVoidRep This introduces data PrimOrVoidRep = VoidRep | NVRep PrimRep changes typePrimRep1 to return PrimOrVoidRep, and adds a new function typePrimRepU to be used when the argument is definitely non-void. Details in Note [VoidRep] in GHC.Types.RepType. Fixes #19520 - - - - - 48720a07 by Matthew Craven at 2024-01-08T18:57:36-05:00 Apply Note [Sensitivity to unique increment] to LargeRecord - - - - - 9e2e180f by Sebastian Graf at 2024-01-08T18:58:13-05:00 Debugging: Add diffUFM for convenient diffing between UniqFMs - - - - - 948f3e35 by Sebastian Graf at 2024-01-08T18:58:13-05:00 Rename Opt_D_dump_stranal to Opt_D_dump_dmdanal ... and Opt_D_dump_str_signatures to Opt_D_dump_dmd_signatures - - - - - 4e217e3e by Sebastian Graf at 2024-01-08T18:58:13-05:00 Deprecate -ddump-stranal and -ddump-str-signatures ... and suggest -ddump-dmdanal and -ddump-dmd-signatures instead - - - - - 6c613c90 by Sebastian Graf at 2024-01-08T18:58:13-05:00 Move testsuite/tests/stranal to testsuite/tests/dmdanal A separate commit so that the rename is obvious to Git(Lab) - - - - - c929f02b by Sebastian Graf at 2024-01-08T18:58:13-05:00 CoreSubst: Stricten `substBndr` and `cloneBndr` Doing so reduced allocations of `cloneBndr` by about 25%. ``` T9233(normal) ghc/alloc 672,488,656 663,083,216 -1.4% GOOD T9675(optasm) ghc/alloc 423,029,256 415,812,200 -1.7% geo. mean -0.1% minimum -1.7% maximum +0.1% ``` Metric Decrease: T9233 - - - - - e3ca78f3 by Krzysztof Gogolewski at 2024-01-10T17:35:59-05:00 Deprecate -Wsemigroup This warning was used to prepare for Semigroup becoming a superclass of Monoid, and for (<>) being exported from Prelude. This happened in GHC 8.4 in 8ae263ceb3566 and feac0a3bc69fd3. The leftover logic for (<>) has been removed in GHC 9.8, 4d29ecdfcc79. Now the warning does nothing at all and can be deprecated. - - - - - 08d14925 by amesgen at 2024-01-10T17:36:42-05:00 WASM metadata: use correct GHC version - - - - - 7a808419 by Xiaoyan Ren at 2024-01-10T17:37:24-05:00 Allow SCC declarations in TH (#24081) - - - - - 28827c51 by Xiaoyan Ren at 2024-01-10T17:37:24-05:00 Fix prettyprinting of SCC pragmas - - - - - ae9cc1a8 by Matthew Craven at 2024-01-10T17:38:01-05:00 Fix loopification in the presence of void arguments This also removes Note [Void arguments in self-recursive tail calls], which was just misleading. It's important to count void args both in the function's arity and at the call site. Fixes #24295. - - - - - b718b145 by Zubin Duggal at 2024-01-10T17:38:36-05:00 testsuite: Teach testsuite driver about c++ sources - - - - - 09cb57ad by Zubin Duggal at 2024-01-10T17:38:36-05:00 driver: Set -DPROFILING when compiling C++ sources with profiling Earlier, we used to pass all preprocessor flags to the c++ compiler. This meant that -DPROFILING was passed to the c++ compiler because it was a part of C++ flags However, this was incorrect and the behaviour was changed in 8ff3134ed4aa323b0199ad683f72165e51a59ab6. See #21291. But that commit exposed this bug where -DPROFILING was no longer being passed when compiling c++ sources. The fix is to explicitly include -DPROFILING in `opt_cxx` when profiling is enabled to ensure we pass the correct options for the way to both C and C++ compilers Fixes #24286 - - - - - 2cf9dd96 by Zubin Duggal at 2024-01-10T17:38:36-05:00 testsuite: rename objcpp -> objcxx To avoid confusion with C Pre Processsor - - - - - af6932d6 by Simon Peyton Jones at 2024-01-10T17:39:12-05:00 Make TYPE and CONSTRAINT not-apart Issue #24279 showed up a bug in the logic in GHC.Core.Unify.unify_ty which is supposed to make TYPE and CONSTRAINT be not-apart. Easily fixed. - - - - - 4a39b5ff by Zubin Duggal at 2024-01-10T17:39:48-05:00 ci: Fix typo in mk_ghcup_metadata.py There was a missing colon in the fix to #24268 in 989bf8e53c08eb22de716901b914b3607bc8dd08 - - - - - 13503451 by Zubin Duggal at 2024-01-10T17:40:24-05:00 release-ci: remove release-x86_64-linux-deb11-release+boot_nonmoving_gc job There is no reason to have this release build or distribute this variation. This configuration is for testing purposes only. - - - - - afca46a4 by Sebastian Graf at 2024-01-10T17:41:00-05:00 Parser: Add a Note detailing why we need happy's `error` to implement layout - - - - - eaf8a06d by Krzysztof Gogolewski at 2024-01-11T00:43:17+01:00 Turn -Wtype-equality-out-of-scope on by default Also remove -Wnoncanonical-{monoid,monad}-instances from -Wcompat, since they are enabled by default. Refresh wcompat-warnings/ test with new -Wcompat warnings. Part of #24267 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 42bee5aa by Sebastian Graf at 2024-01-12T21:16:21-05:00 Arity: Require called *exactly once* for eta exp with -fpedantic-bottoms (#24296) In #24296, we had a program in which we eta expanded away an error despite the presence of `-fpedantic-bottoms`. This was caused by turning called *at least once* lambdas into one-shot lambdas, while with `-fpedantic-bottoms` it is only sound to eta expand over lambdas that are called *exactly* once. An example can be found in `Note [Combining arity type with demand info]`. Fixes #24296. - - - - - 7e95f738 by Andreas Klebinger at 2024-01-12T21:16:57-05:00 Aarch64: Enable -mfma by default. Fixes #24311 - - - - - e43788d0 by Jason Shipman at 2024-01-14T12:47:38-05:00 Add more instances for Compose: Fractional, RealFrac, Floating, RealFloat CLC proposal #226 https://github.com/haskell/core-libraries-committee/issues/226 - - - - - ae6d8cd2 by Sebastian Graf at 2024-01-14T12:48:15-05:00 Pmc: COMPLETE pragmas associated with Family TyCons should apply to representation TyCons as well (#24326) Fixes #24326. - - - - - c5fc7304 by sheaf at 2024-01-15T14:15:29-05:00 Use lookupOccRn_maybe in TH.lookupName When looking up a value, we want to be able to find both variables and record fields. So we should not use the lookupSameOccRn_maybe function, as we can't know ahead of time which record field namespace a record field with the given textual name will belong to. Fixes #24293 - - - - - da908790 by Krzysztof Gogolewski at 2024-01-15T14:16:05-05:00 Make the build more strict on documentation errors * Detect undefined labels. This can be tested by adding :ref:`nonexistent` to a documentation rst file; attempting to build docs will fail. Fixed the undefined label in `9.8.1-notes.rst`. * Detect errors. While we have plenty of warnings, we can at least enforce that Sphinx does not report errors. Fixed the error in `required_type_arguments.rst`. Unrelated change: I have documented that the `-dlint` enables `-fcatch-nonexhaustive-cases`, as can be verified by checking `enableDLint`. - - - - - 5077416e by Javier Sagredo at 2024-01-16T15:40:06-05:00 Profiling: Adds an option to not start time profiling at startup Using the functionality provided by d89deeba47ce04a5198a71fa4cbc203fe2c90794, this patch creates a new rts flag `--no-automatic-time-samples` which disables the time profiling when starting a program. It is then expected that the user starts it whenever it is needed. Fixes #24337 - - - - - 5776008c by Matthew Pickering at 2024-01-16T15:40:42-05:00 eventlog: Fix off-by-one error in postIPE We were missing the extra_comma from the calculation of the size of the payload of postIPE. This was causing assertion failures when the event would overflow the buffer by one byte, as ensureRoomForVariable event would report there was enough space for `n` bytes but then we would write `n + 1` bytes into the buffer. Fixes #24287 - - - - - 66dc09b1 by Simon Peyton Jones at 2024-01-16T15:41:18-05:00 Improve SpecConstr (esp nofib/spectral/ansi) This MR makes three improvements to SpecConstr: see #24282 * It fixes an outright (and recently-introduced) bug in `betterPat`, which was wrongly forgetting to compare the lengths of the argument lists. * It enhances ConVal to inclue a boolean for work-free-ness, so that the envt can contain non-work-free constructor applications, so that we can do more: see Note [ConVal work-free-ness] * It rejigs `subsumePats` so that it doesn't reverse the list. This can make a difference because, when patterns overlap, we arbitrarily pick the first. There is no "right" way, but this retains the old pre-subsumePats behaviour, thereby "fixing" the regression in #24282. Nofib results +======================================== | spectral/ansi -21.14% | spectral/hartel/comp_lab_zift -0.12% | spectral/hartel/parstof +0.09% | spectral/last-piece -2.32% | spectral/multiplier +6.03% | spectral/para +0.60% | spectral/simple -0.26% +======================================== | geom mean -0.18% +---------------------------------------- The regression in `multiplier` is sad, but it simply replicates GHC's previous behaviour (e.g. GHC 9.6). - - - - - 65da79b3 by Matthew Pickering at 2024-01-16T15:41:54-05:00 hadrian: Reduce Cabal verbosity The comment claims that `simpleUserHooks` decrease verbosity, and it does, but only for the `postConf` phase. The other phases are too verbose with `-V`. At the moment > 5000 lines of the build log are devoted to output from `cabal copy`. So I take the simple approach and just decrease the verbosity level again. If the output of `postConf` is essential then it would be better to implement our own `UserHooks` which doesn't decrease the verbosity for `postConf`. Fixes #24338 - - - - - 16414d7d by Matthew Pickering at 2024-01-17T10:54:59-05:00 Stop retaining old ModGuts throughout subsequent simplifier phases Each phase of the simplifier typically rewrites the majority of ModGuts, so we want to be able to release the old ModGuts as soon as possible. `name_ppr_ctxt` lives throught the whole optimiser phase and it was retaining a reference to `ModGuts`, so we were failing to release the old `ModGuts` until the end of the phase (potentially doubling peak memory usage for that particular phase). This was discovered using eras profiling (#24332) Fixes #24328 - - - - - 7f0879e1 by Matthew Pickering at 2024-01-17T10:55:35-05:00 Update nofib submodule - - - - - 320454d3 by Cheng Shao at 2024-01-17T23:02:40+00:00 ci: bump ci-images for updated wasm image - - - - - 2eca52b4 by Cheng Shao at 2024-01-17T23:06:44+00:00 base: treat all FDs as "nonblocking" on wasm On posix platforms, when performing read/write on FDs, we check the nonblocking flag first. For FDs without this flag (e.g. stdout), we call fdReady() first, which in turn calls poll() to wait for I/O to be available on that FD. This is problematic for wasm32-wasi: although select()/poll() is supported via the poll_oneoff() wasi syscall, that syscall is rather heavyweight and runtime behavior differs in different wasi implementations. The issue is even worse when targeting browsers, given there's no satisfactory way to implement async I/O as a synchronous syscall, so existing JS polyfills for wasi often give up and simply return ENOSYS. Before we have a proper I/O manager that avoids poll_oneoff() for async I/O on wasm, this patch improves the status quo a lot by merely pretending all FDs are "nonblocking". Read/write on FDs will directly invoke read()/write(), which are much more reliably handled in existing wasi implementations, especially those in browsers. Fixes #23275 and the following test cases: T7773 isEOF001 openFile009 T4808 cgrun025 Approved by CLC proposal #234: https://github.com/haskell/core-libraries-committee/issues/234 - - - - - 83c6c710 by Andrew Lelechenko at 2024-01-18T05:21:49-05:00 base: clarify how to disable warnings about partiality of Data.List.{head,tail} - - - - - c4078f2f by Simon Peyton Jones at 2024-01-18T05:22:25-05:00 Fix four bug in handling of (forall cv. body_ty) These bugs are all described in #24335 It's not easy to provoke the bug, hence no test case. - - - - - 119586ea by Alexis King at 2024-01-19T00:08:00-05:00 Always refresh profiling CCSes after running pending initializers Fixes #24171. - - - - - 9718d970 by Oleg Grenrus at 2024-01-19T00:08:36-05:00 Set default-language: GHC2021 in ghc library Go through compiler/ sources, and remove all BangPatterns (and other GHC2021 enabled extensions in these files). - - - - - 3ef71669 by Matthew Pickering at 2024-01-19T21:55:16-05:00 testsuite: Remove unused have_library function Also remove the hence unused testsuite option `--test-package-db`. Fixes #24342 - - - - - 5b7fa20c by Jade at 2024-01-19T21:55:53-05:00 Fix Spelling in the compiler Tracking: #16591 - - - - - 09875f48 by Matthew Pickering at 2024-01-20T12:20:44-05:00 testsuite: Implement `isInTreeCompiler` in a more robust way Just a small refactoring to avoid redundantly specifying the same strings in two different places. - - - - - 0d12b987 by Jade at 2024-01-20T12:21:20-05:00 Change maintainer email from cvs-ghc at haskell.org to ghc-devs at haskell.org. Fixes #22142 - - - - - eebdd316 by Apoorv Ingle at 2024-01-23T13:49:12+00:00 Changes for haskell/haddock#18324 - - - - - 1fa1c00c by Jade at 2024-01-23T19:17:03-05:00 Enhance Documentation of functions exported by Data.Function This patch aims to improve the documentation of functions exported in Data.Function Tracking: #17929 Fixes: #10065 - - - - - ab47a43d by Jade at 2024-01-23T19:17:39-05:00 Improve documentation of hGetLine. - Add explanation for whether a newline is returned - Add examples Fixes #14804 - - - - - dd4af0e5 by Cheng Shao at 2024-01-23T19:18:17-05:00 Fix genapply for cross-compilation by nuking fragile CPP logic This commit fixes incorrectly built genapply when cross compiling (#24347) by nuking all fragile CPP logic in it from the orbit. All target-specific info are now read from DerivedConstants.h at runtime, see added note for details. Also removes a legacy Makefile and adds haskell language server support for genapply. - - - - - 0cda2b8b by Cheng Shao at 2024-01-23T19:18:17-05:00 rts: enable wasm32 register mapping The wasm backend didn't properly make use of all Cmm global registers due to #24347. Now that it is fixed, this patch re-enables full register mapping for wasm32, and we can now generate smaller & faster wasm modules that doesn't always spill arguments onto the stack. Fixes #22460 #24152. - - - - - 0325a6e5 by Greg Steuck at 2024-01-24T01:29:44-05:00 Avoid utf8 in primops.txt.pp comments They don't make it through readFile' without explicitly setting the encoding. See https://gitlab.haskell.org/ghc/ghc/-/issues/17755 - - - - - 1aaf0bd8 by David Binder at 2024-01-24T01:30:20-05:00 Bump hpc and hpc-bin submodule Bump hpc to 0.7.0.1 Bump hpc-bin to commit d1780eb2 - - - - - e693a4e8 by Ben Gamari at 2024-01-24T01:30:56-05:00 testsuite: Ignore stderr in T8089 Otherwise spurious "Killed: 9" messages to stderr may cause the test to fail. Fixes #24361. - - - - - a40f4ab2 by sheaf at 2024-01-24T14:04:33-05:00 Fix FMA instruction on LLVM We were emitting the wrong instructions for fused multiply-add operations on LLVM: - the instruction name is "llvm.fma.f32" or "llvm.fma.f64", not "fmadd" - LLVM does not support other instructions such as "fmsub"; instead we implement these by flipping signs of some arguments - the instruction is an LLVM intrinsic, which requires handling it like a normal function call instead of a machine instruction Fixes #24223 - - - - - 69abc786 by Andrei Borzenkov at 2024-01-24T14:05:09-05:00 Add changelog entry for renaming tuples from (,,...,,) to Tuple<n> (24291) - - - - - 0ac8f385 by Cheng Shao at 2024-01-25T00:27:48-05:00 compiler: remove unused GHC.Linker module The GHC.Linker module is empty and unused, other than as a hack for the make build system. We can remove it now that make is long gone; the note is moved to GHC.Linker.Loader instead. - - - - - 699da01b by Hécate Moonlight at 2024-01-25T00:28:27-05:00 Clarification for newtype constructors when using `coerce` - - - - - b2d8cd85 by Matt Walker at 2024-01-26T09:50:08-05:00 Fix #24308 Add tests for semicolon separated where clauses - - - - - 0da490a1 by Ben Gamari at 2024-01-26T17:34:41-05:00 hsc2hs: Bump submodule - - - - - 3f442fd2 by Ben Gamari at 2024-01-26T17:34:41-05:00 Bump containers submodule to 0.7 - - - - - 82a1c656 by Sebastian Nagel at 2024-01-29T02:32:40-05:00 base: with{Binary}File{Blocking} only annotates own exceptions Fixes #20886 This ensures that inner, unrelated exceptions are not misleadingly annotated with the opened file. - - - - - 9294a086 by Andreas Klebinger at 2024-01-29T02:33:15-05:00 Fix fma warning when using llvm on aarch64. On aarch64 fma is always on so the +fma flag doesn't exist for that target. Hence no need to try and pass +fma to llvm. Fixes #24379 - - - - - ced2e731 by sheaf at 2024-01-29T17:27:12-05:00 No shadowing warnings for NoFieldSelector fields This commit ensures we don't emit shadowing warnings when a user shadows a field defined with NoFieldSelectors. Fixes #24381 - - - - - 8eeadfad by Patrick at 2024-01-29T17:27:51-05:00 Fix bug wrong span of nested_doc_comment #24378 close #24378 1. Update the start position of span in `nested_doc_comment` correctly. and hence the spans of identifiers of haddoc can be computed correctly. 2. add test `HaddockSpanIssueT24378`. - - - - - a557580f by Alexey Radkov at 2024-01-30T19:41:52-05:00 Fix irrelevant dodgy-foreign-imports warning on import f-pointers by value A test *сс018* is attached (not sure about the naming convention though). Note that without the fix, the test fails with the *dodgy-foreign-imports* warning passed to stderr. The warning disappears after the fix. GHC shouldn't warn on imports of natural function pointers from C by value (which is feasible with CApiFFI), such as ```haskell foreign import capi "cc018.h value f" f :: FunPtr (Int -> IO ()) ``` where ```c void (*f)(int); ``` See a related real-world use-case [here](https://gitlab.com/daniel-casanueva/pcre-light/-/merge_requests/17). There, GHC warns on import of C function pointer `pcre_free`. - - - - - ca99efaf by Alexey Radkov at 2024-01-30T19:41:53-05:00 Rename test cc018 -> T24034 - - - - - 88c38dd5 by Ben Gamari at 2024-01-30T19:42:28-05:00 rts/TraverseHeap.c: Ensure that PosixSource.h is included first - - - - - ca2e919e by Simon Peyton Jones at 2024-01-31T09:29:45+00:00 Make decomposeRuleLhs a bit more clever This fixes #24370 by making decomposeRuleLhs undertand dictionary /functions/ as well as plain /dictionaries/ - - - - - 94ce031d by Teo Camarasu at 2024-02-01T05:49:49-05:00 doc: Add -Dn flag to user guide Resolves #24394 - - - - - 31553b11 by Ben Gamari at 2024-02-01T12:21:29-05:00 cmm: Introduce MO_RelaxedRead In hand-written Cmm it can sometimes be necessary to atomically load from memory deep within an expression (e.g. see the `CHECK_GC` macro). This MachOp provides a convenient way to do so without breaking the expression into multiple statements. - - - - - 0785cf81 by Ben Gamari at 2024-02-01T12:21:29-05:00 codeGen: Use relaxed accesses in ticky bumping - - - - - be423dda by Ben Gamari at 2024-02-01T12:21:29-05:00 base: use atomic write when updating timer manager - - - - - 8a310e35 by Ben Gamari at 2024-02-01T12:21:29-05:00 Use relaxed atomics to manipulate TSO status fields - - - - - d6809ee4 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Add necessary barriers when manipulating TSO owner - - - - - 39e3ac5d by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Use `switch` to branch on why_blocked This is a semantics-preserving refactoring. - - - - - 515eb33d by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix synchronization on thread blocking state We now use a release barrier whenever we update a thread's blocking state. This required widening StgTSO.why_blocked as AArch64 does not support atomic writes on 16-bit values. - - - - - eb38812e by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in threadPaused This only affects an assertion in the debug RTS and only needs relaxed ordering. - - - - - 26c48dd6 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in threadStatus# - - - - - 6af43ab4 by Ben Gamari at 2024-02-01T12:21:29-05:00 rts: Fix data race in Interpreter's preemption check - - - - - 9502ad3c by Ben Gamari at 2024-02-01T12:21:29-05:00 rts/Messages: Fix data race - - - - - 60802db5 by Ben Gamari at 2024-02-01T12:21:30-05:00 rts/Prof: Fix data race - - - - - ef8ccef5 by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Use relaxed ordering on dirty/clean info tables updates When changing the dirty/clean state of a mutable object we needn't have any particular ordering. - - - - - 76fe2b75 by Ben Gamari at 2024-02-01T12:21:30-05:00 codeGen: Use relaxed-read in closureInfoPtr - - - - - a6316eb4 by Ben Gamari at 2024-02-01T12:21:30-05:00 STM: Use acquire loads when possible Full sequential consistency is not needed here. - - - - - 6bddfd3d by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Use fence rather than redundant load Previously we would use an atomic load to ensure acquire ordering. However, we now have `ACQUIRE_FENCE_ON`, which allows us to express this more directly. - - - - - 55c65dbc by Ben Gamari at 2024-02-01T12:21:30-05:00 rts: Fix data races in profiling timer - - - - - 856b5e75 by Ben Gamari at 2024-02-01T12:21:30-05:00 Add Note [C11 memory model] - - - - - 6534da24 by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: move generic cmm optimization logic in NCG to a standalone module This commit moves GHC.CmmToAsm.cmmToCmm to a standalone module, GHC.Cmm.GenericOpt. The main motivation is enabling this logic to be run in the wasm backend NCG code, which is defined in other modules that's imported by GHC.CmmToAsm, causing a cyclic dependency issue. - - - - - 87e34888 by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: explicitly disable PIC in wasm32 NCG This commit explicitly disables the ncgPIC flag for the wasm32 target. The wasm backend doesn't support PIC for the time being. - - - - - c6ce242e by Cheng Shao at 2024-02-01T12:22:07-05:00 compiler: enable generic cmm optimizations in wasm backend NCG This commit enables the generic cmm optimizations in other NCGs to be run in the wasm backend as well, followed by a late cmm control-flow optimization pass. The added optimizations do catch some corner cases not handled by the pre-NCG cmm pipeline and are useful in generating smaller CFGs. - - - - - 151dda4e by Andrei Borzenkov at 2024-02-01T12:22:43-05:00 Namespacing for WARNING/DEPRECATED pragmas (#24396) New syntax for WARNING and DEPRECATED pragmas was added, namely namespace specifierss: namespace_spec ::= 'type' | 'data' | {- empty -} warning ::= warning_category namespace_spec namelist strings deprecation ::= namespace_spec namelist strings A new data type was introduced to represent these namespace specifiers: data NamespaceSpecifier = NoSpecifier | TypeNamespaceSpecifier (EpToken "type") | DataNamespaceSpecifier (EpToken "data") Extension field XWarning now contains this NamespaceSpecifier. lookupBindGroupOcc function was changed: it now takes NamespaceSpecifier and checks that the namespace of the found names matches the passed flag. With this change {-# WARNING data D "..." #-} pragma will only affect value namespace and {-# WARNING type D "..." #-} will only affect type namespace. The same logic is applicable to DEPRECATED pragmas. Finding duplicated warnings inside rnSrcWarnDecls now takes into consideration NamespaceSpecifier flag to allow warnings with the same names that refer to different namespaces. - - - - - 38c3afb6 by Bryan Richter at 2024-02-01T12:23:19-05:00 CI: Disable the test-cabal-reinstall job Fixes #24363 - - - - - 27020458 by Matthew Craven at 2024-02-03T01:53:26-05:00 Bump bytestring submodule to something closer to 0.12.1 ...mostly so that 16d6b7e835ffdcf9b894e79f933dd52348dedd0c (which reworks unaligned writes in Builder) and the stuff in https://github.com/haskell/bytestring/pull/631 can see wider testing. The less-terrible code for unaligned writes used in Builder on hosts not known to be ulaigned-friendly also takes less effort for GHC to compile, resulting in a metric decrease for T21839c on some platforms. The metric increase on T21839r is caused by the unrelated commit 750dac33465e7b59100698a330b44de7049a345c. It perhaps warrants further analysis and discussion (see #23822) but is not critical. Metric Decrease: T21839c Metric Increase: T21839r - - - - - cdddeb0f by Rodrigo Mesquita at 2024-02-03T01:54:02-05:00 Work around autotools setting C11 standard in CC/CXX In autoconf >=2.70, C11 is set by default for $CC and $CXX via the -std=...11 flag. In this patch, we split the "-std" flag out of the $CC and $CXX variables, which we traditionally assume to be just the executable name/path, and move it to $CFLAGS/$CXXFLAGS instead. Fixes #24324 - - - - - 5ff7cc26 by Apoorv Ingle at 2024-02-03T13:14:46-06:00 Expand `do` blocks right before typechecking using the `HsExpansion` philosophy. - Fixes #18324 #20020 #23147 #22788 #15598 #22086 #21206 - The change is detailed in - Note [Expanding HsDo with HsExpansion] in `GHC.Tc.Gen.Do` - Note [Doing HsExpansion in the Renamer vs Typechecker] in `GHC.Rename.Expr` expains the rational of doing expansions in type checker as opposed to in the renamer - Adds new datatypes: - `GHC.Hs.Expr.XXExprGhcRn`: new datatype makes this expansion work easier 1. Expansion bits for Expressions, Statements and Patterns in (`ExpandedThingRn`) 2. `PopErrCtxt` a special GhcRn Phase only artifcat to pop the previous error message in the error context stack - `GHC.Basic.Origin` now tracks the reason for expansion in case of Generated This is useful for type checking cf. `GHC.Tc.Gen.Expr.tcExpr` case for `HsLam` - Kills `HsExpansion` and `HsExpanded` as we have inlined them in `XXExprGhcRn` and `XXExprGhcTc` - Ensures warnings such as 1. Pattern match checks 2. Failable patterns 3. non-() return in body statements are preserved - Kill `HsMatchCtxt` in favor of `TcMatchAltChecker` - Testcases: * T18324 T20020 T23147 T22788 T15598 T22086 * T23147b (error message check), * DoubleMatch (match inside a match for pmc check) * pattern-fails (check pattern match with non-refutable pattern, eg. newtype) * Simple-rec (rec statements inside do statment) * T22788 (code snippet from #22788) * DoExpanion1 (Error messages for body statments) * DoExpansion2 (Error messages for bind statements) * DoExpansion3 (Error messages for let statements) Also repoint haddock to the right submodule so that the test (haddockHypsrcTest) pass Metric Increase 'compile_time/bytes allocated': T9020 The testcase is a pathalogical example of a `do`-block with many statements that do nothing. Given that we are expanding the statements into function binds, we will have to bear a (small) 2% cost upfront in the compiler to unroll the statements. - - - - - 0df8ce27 by Vladislav Zavialov at 2024-02-04T03:55:14-05:00 Reduce parser allocations in allocateCommentsP In the most common case, the comment queue is empty, so we can skip the work of processing it. This reduces allocations by about 10% in the parsing001 test. Metric Decrease: MultiLayerModulesRecomp parsing001 - - - - - ae856a82 by Matthew Pickering at 2024-02-05T12:22:39+00:00 ghc-internals fallout - - - - - cfd68290 by Simon Peyton Jones at 2024-02-05T17:58:33-05:00 Stop dropping a case whose binder is demanded This MR fixes #24251. See Note [Case-to-let for strictly-used binders] in GHC.Core.Opt.Simplify.Iteration, plus #24251, for lots of discussion. Final Nofib changes over 0.1%: +----------------------------------------- | imaginary/digits-of-e2 -2.16% | imaginary/rfib -0.15% | real/fluid -0.10% | real/gamteb -1.47% | real/gg -0.20% | real/maillist +0.19% | real/pic -0.23% | real/scs -0.43% | shootout/n-body -0.41% | shootout/spectral-norm -0.12% +======================================== | geom mean -0.05% Pleasingly, overall executable size is down by just over 1%. Compile times (in perf/compiler) wobble around a bit +/- 0.5%, but the geometric mean is -0.1% which seems good. - - - - - e4d137bb by Simon Peyton Jones at 2024-02-05T17:58:33-05:00 Add Note [Bangs in Integer functions] ...to document the bangs in the functions in GHC.Num.Integer - - - - - ce90f12f by Andrei Borzenkov at 2024-02-05T17:59:09-05:00 Hide WARNING/DEPRECATED namespacing under -XExplicitNamespaces (#24396) - - - - - e2ea933f by Simon Peyton Jones at 2024-02-06T10:12:04-05:00 Refactoring in preparation for lazy skolemisation * Make HsMatchContext and HsStmtContext be parameterised over the function name itself, rather than over the pass. See [mc_fun field of FunRhs] in Language.Haskell.Syntax.Expr - Replace types HsMatchContext GhcPs --> HsMatchContextPs HsMatchContext GhcRn --> HsMatchContextRn HsMatchContext GhcTc --> HsMatchContextRn (sic! not Tc) HsStmtContext GhcRn --> HsStmtContextRn - Kill off convertHsMatchCtxt * Split GHC.Tc.Type.BasicTypes.TcSigInfo so that TcCompleteSig (describing a complete user-supplied signature) is its own data type. - Split TcIdSigInfo(CompleteSig, PartialSig) into TcCompleteSig(CSig) TcPartialSig(PSig) - Use TcCompleteSig in tcPolyCheck, CheckGen - Rename types and data constructors: TcIdSigInfo --> TcIdSig TcPatSynInfo(TPSI) --> TcPatSynSig(PatSig) - Shuffle around helper functions: tcSigInfoName (moved to GHC.Tc.Types.BasicTypes) completeSigPolyId_maybe (moved to GHC.Tc.Types.BasicTypes) tcIdSigName (inlined and removed) tcIdSigLoc (introduced) - Rearrange the pattern match in chooseInferredQuantifiers * Rename functions and types: tcMatchesCase --> tcCaseMatches tcMatchesFun --> tcFunBindMatches tcMatchLambda --> tcLambdaMatches tcPats --> tcMatchPats matchActualFunTysRho --> matchActualFunTys matchActualFunTySigma --> matchActualFunTy * Add HasDebugCallStack constraints to: mkBigCoreVarTupTy, mkBigCoreTupTy, boxTy, mkPiTy, mkPiTys, splitAppTys, splitTyConAppNoView_maybe * Use `penv` from the outer context in the inner loop of GHC.Tc.Gen.Pat.tcMultiple * Move tcMkVisFunTy, tcMkInvisFunTy, tcMkScaledFunTys down the file, factor out and export tcMkScaledFunTy. * Move isPatSigCtxt down the file. * Formatting and comments Co-authored-by: Vladislav Zavialov <vlad.z.4096 at gmail.com> - - - - - f5d3e03c by Andrei Borzenkov at 2024-02-06T10:12:04-05:00 Lazy skolemisation for @a-binders (#17594) This patch is a preparation for @a-binders implementation. The main changes are: * Skolemisation is now prepared to deal with @binders. See Note [Skolemisation overview] in GHC.Tc.Utils.Unify. Most of the action is in - Utils.Unify.matchExpectedFunTys - Gen.Pat.tcMatchPats - Gen.Expr.tcPolyExprCheck - Gen.Binds.tcPolyCheck Some accompanying refactoring: * I found that funTyConAppTy_maybe was doing a lot of allocation, and rejigged userTypeError_maybe to avoid calling it. - - - - - 532993c8 by Zubin Duggal at 2024-02-06T10:12:41-05:00 driver: Really don't lose track of nodes when we fail to resolve cycles This fixes a bug in 8db8d2fd1c881032b1b360c032b6d9d072c11723, where we could lose track of acyclic components at the start of an unresolved cycle. We now ensure we never loose track of any of these components. As T24275 demonstrates, a "cyclic" SCC might not really be a true SCC: When viewed without boot files, we have a single SCC ``` [REC main:T24275B [main:T24275B {-# SOURCE #-}, main:T24275A {-# SOURCE #-}] main:T24275A [main:T24275A {-# SOURCE #-}]] ``` But with boot files this turns into ``` [NONREC main:T24275B {-# SOURCE #-} [], REC main:T24275B [main:T24275B {-# SOURCE #-}, main:T24275A {-# SOURCE #-}] main:T24275A {-# SOURCE #-} [main:T24275B], NONREC main:T24275A [main:T24275A {-# SOURCE #-}]] ``` Note that this is truly not an SCC, as no nodes are reachable from T24275B.hs-boot. However, we treat this entire group as a single "SCC" because it seems so when we analyse the graph without taking boot files into account. Indeed, we must return a single ResolvedCycle element in the BuildPlan for this as described in Note [Upsweep]. However, since after resolving this is not a true SCC anymore, `findCycle` fails to find a cycle and we have a sub-optimal error message as a result. To handle this, I extended `findCycle` to not assume its input is an SCC, and to try harder to find cycles in its input. Fixes #24275 - - - - - b35dd613 by Zubin Duggal at 2024-02-06T10:13:17-05:00 GHCi: Lookup breakpoint CCs in the correct module We need to look up breakpoint CCs in the module that the breakpoint points to, and not the current module. Fixes #24327 - - - - - b09e6958 by Zubin Duggal at 2024-02-06T10:13:17-05:00 testsuite: Add test for #24327 - - - - - 569b4c10 by doyougnu at 2024-02-07T03:06:26-05:00 ts: add compile_artifact, ignore_extension flag In b521354216f2821e00d75f088d74081d8b236810 the testsuite gained the capability to collect generic metrics. But this assumed that the test was not linking and producing artifacts and we only wanted to track object files, interface files, or build artifacts from the compiler build. However, some backends, such as the JS backend, produce artifacts when compiling, such as the jsexe directory which we want to track. This patch: - tweaks the testsuite to collect generic metrics on any build artifact in the test directory. - expands the exe_extension function to consider windows and adds the ignore_extension flag. - Modifies certain tests to add the ignore_extension flag. Tests such as heaprof002 expect a .ps file, but on windows without ignore_extensions the testsuite will look for foo.exe.ps. Hence the flag. - adds the size_hello_artifact test - - - - - 75a31379 by doyougnu at 2024-02-07T03:06:26-05:00 ts: add wasm_arch, heapprof002 wasm extension - - - - - c9731d6d by Rodrigo Mesquita at 2024-02-07T03:07:03-05:00 Synchronize bindist configure for #24324 In cdddeb0f1280b40cc194028bbaef36e127175c4c, we set up a workaround for #24324 in the in-tree configure script, but forgot to update the bindist configure script accordingly. This updates it. - - - - - d309f4e7 by Matthew Pickering at 2024-02-07T03:07:38-05:00 distrib/configure: Fix typo in CONF_GCC_LINKER_OPTS_STAGE2 variable Instead we were setting CONF_GCC_LINK_OPTS_STAGE2 which meant that we were missing passing `--target` when invoking the linker. Fixes #24414 - - - - - 77db84ab by Ben Gamari at 2024-02-08T00:35:22-05:00 llvmGen: Adapt to allow use of new pass manager. We now must use `-passes` in place of `-O<n>` due to #21936. Closes #21936. - - - - - 3c9ddf97 by Matthew Pickering at 2024-02-08T00:35:59-05:00 testsuite: Mark length001 as fragile on javascript Modifying the timeout multiplier is not a robust way to get this test to reliably fail. Therefore we mark it as fragile until/if javascript ever supports the stack limit. - - - - - 20b702b5 by Matthew Pickering at 2024-02-08T00:35:59-05:00 Javascript: Don't filter out rtsDeps list This logic appears to be incorrect as it would drop any dependency which was not in a direct dependency of the package being linked. In the ghc-internals split this started to cause errors because `ghc-internal` is not a direct dependency of most packages, and hence important symbols to keep which are hard coded into the js runtime were getting dropped. - - - - - 2df96366 by Ben Gamari at 2024-02-08T00:35:59-05:00 base: Cleanup whitespace in cbits - - - - - 44f6557a by Ben Gamari at 2024-02-08T00:35:59-05:00 Move `base` to `ghc-internal` Here we move a good deal of the implementation of `base` into a new package, `ghc-internal` such that it can be evolved independently from the user-visible interfaces of `base`. While we want to isolate implementation from interfaces, naturally, we would like to avoid turning `base` into a mere set of module re-exports. However, this is a non-trivial undertaking for a variety of reasons: * `base` contains numerous known-key and wired-in things, requiring corresponding changes in the compiler * `base` contains a significant amount of C code and corresponding autoconf logic, which is very fragile and difficult to break apart * `base` has numerous import cycles, which are currently dealt with via carefully balanced `hs-boot` files * We must not break existing users To accomplish this migration, I tried the following approaches: * [Split-GHC.Base]: Break apart the GHC.Base knot to allow incremental migration of modules into ghc-internal: this knot is simply too intertwined to be easily pulled apart, especially given the rather tricky import cycles that it contains) * [Move-Core]: Moving the "core" connected component of base (roughly 150 modules) into ghc-internal. While the Haskell side of this seems tractable, the C dependencies are very subtle to break apart. * [Move-Incrementally]: 1. Move all of base into ghc-internal 2. Examine the module structure and begin moving obvious modules (e.g. leaves of the import graph) back into base 3. Examine the modules remaining in ghc-internal, refactor as necessary to facilitate further moves 4. Go to (2) iterate until the cost/benefit of further moves is insufficient to justify continuing 5. Rename the modules moved into ghc-internal to ensure that they don't overlap with those in base 6. For each module moved into ghc-internal, add a shim module to base with the declarations which should be exposed and any requisite Haddocks (thus guaranteeing that base will be insulated from changes in the export lists of modules in ghc-internal Here I am using the [Move-Incrementally] approach, which is empirically the least painful of the unpleasant options above Bumps haddock submodule. Metric Decrease: haddock.Cabal haddock.base Metric Increase: MultiComponentModulesRecomp T16875 size_hello_artifact - - - - - e8fb2451 by Vladislav Zavialov at 2024-02-08T00:36:36-05:00 Haddock comments on infix constructors (#24221) Rewrite the `HasHaddock` instance for `ConDecl GhcPs` to account for infix constructors. This change fixes a Haddock regression (introduced in 19e80b9af252) that affected leading comments on infix data constructor declarations: -- | Docs for infix constructor | Int :* Bool The comment should be associated with the data constructor (:*), not with its left-hand side Int. - - - - - 9060d55b by Ben Gamari at 2024-02-08T00:37:13-05:00 Add os-string as a boot package Introduces `os-string` submodule. This will be necessary for `filepath-1.5`. - - - - - 9d65235a by Ben Gamari at 2024-02-08T00:37:13-05:00 gitignore: Ignore .hadrian_ghci_multi/ - - - - - d7ee12ea by Ben Gamari at 2024-02-08T00:37:13-05:00 hadrian: Set -this-package-name When constructing the GHC flags for a package Hadrian must take care to set `-this-package-name` in addition to `-this-unit-id`. This hasn't broken until now as we have not had any uses of qualified package imports. However, this will change with `filepath-1.5` and the corresponding `unix` bump, breaking `hadrian/multi-ghci`. - - - - - f2dffd2e by Ben Gamari at 2024-02-08T00:37:13-05:00 Bump filepath to 1.5.0.0 Required bumps of the following submodules: * `directory` * `filepath` * `haskeline` * `process` * `unix` * `hsc2hs` * `Win32` * `semaphore-compat` and the addition of `os-string` as a boot package. - - - - - ab533e71 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Use specific clang assembler when compiling with -fllvm There are situations where LLVM will produce assembly which older gcc toolchains can't handle. For example on Deb10, it seems that LLVM >= 13 produces assembly which the default gcc doesn't support. A more robust solution in the long term is to require a specific LLVM compatible assembler when using -fllvm. Fixes #16354 - - - - - c32b6426 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Update CI images with LLVM 15, ghc-9.6.4 and cabal-install-3.10.2.0 - - - - - 5fcd58be by Matthew Pickering at 2024-02-08T00:37:50-05:00 Update bootstrap plans for 9.4.8 and 9.6.4 - - - - - 707a32f5 by Matthew Pickering at 2024-02-08T00:37:50-05:00 Add alpine 3_18 release job This is mainly experimental and future proofing to enable a smooth transition to newer alpine releases once 3_12 is too old. - - - - - c37931b3 by John Ericson at 2024-02-08T06:39:05-05:00 Generate LLVM min/max bound policy via Hadrian Per #23966, I want the top-level configure to only generate configuration data for Hadrian, not do any "real" tasks on its own. This is part of that effort --- one less file generated by it. (It is still done with a `.in` file, so in a future world non-Hadrian also can easily create this file.) Split modules: - GHC.CmmToLlvm.Config - GHC.CmmToLlvm.Version - GHC.CmmToLlvm.Version.Bounds - GHC.CmmToLlvm.Version.Type This also means we can get rid of the silly `unused.h` introduced in !6803 / 7dfcab2f4bcb7206174ea48857df1883d05e97a2 as temporary kludge. Part of #23966 - - - - - 9f987235 by Apoorv Ingle at 2024-02-08T06:39:42-05:00 Enable mdo statements to use HsExpansions Fixes: #24411 Added test T24411 for regression - - - - - f8429266 by Jade at 2024-02-08T14:56:50+01:00 Adjust test for ghc MR !10993 - - - - - 762b2120 by Jade at 2024-02-08T15:17:15+00:00 Improve Monad, Functor & Applicative docs This patch aims to improve the documentation of Functor, Applicative, Monad and related symbols. The main goal is to make it more consistent and make accessible. See also: !10979 (closed) and !10985 (closed) Ticket #17929 Updates haddock submodule - - - - - 151770ca by Josh Meredith at 2024-02-10T14:28:15-05:00 JavaScript codegen: Use GHC's tag inference where JS backend-specific evaluation inference was previously used (#24309) - - - - - 2e880635 by Zubin Duggal at 2024-02-10T14:28:51-05:00 ci: Allow release-hackage-lint to fail Otherwise it blocks the ghcup metadata pipeline from running. - - - - - b0293f78 by Matthew Pickering at 2024-02-10T14:29:28-05:00 rts: eras profiling mode The eras profiling mode is useful for tracking the life-time of closures. When a closure is written, the current era is recorded in the profiling header. This records the era in which the closure was created. * Enable with -he * User mode: Use functions ghc-experimental module GHC.Profiling.Eras to modify the era * Automatically: --automatic-era-increment, increases the user era on major collections * The first era is era 1 * -he<era> can be used with other profiling modes to select a specific era If you just want to record the era but not to perform heap profiling you can use `-he --no-automatic-heap-samples`. https://well-typed.com/blog/2024/01/ghc-eras-profiling/ Fixes #24332 - - - - - be674a2c by Jade at 2024-02-10T14:30:04-05:00 Adjust error message for trailing whitespace in as-pattern. Fixes #22524 - - - - - 53ef83f9 by doyougnu at 2024-02-10T14:30:47-05:00 gitlab: js: add codeowners Fixes: - #24409 Follow on from: - #21078 and MR !9133 - When we added the JS backend this was forgotten. This patch adds the rightful codeowners. - - - - - 8bbe12f2 by Matthew Pickering at 2024-02-10T14:31:23-05:00 Bump CI images so that alpine3_18 image includes clang15 The only changes here are that clang15 is now installed on the alpine-3_18 image. - - - - - df9fd9f7 by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: handle stored null StablePtr Some Haskell codes unsafely cast StablePtr into ptr to compare against NULL. E.g. in direct-sqlite: if castStablePtrToPtr aggStPtr /= nullPtr then where `aggStPtr` is read (`peek`) from zeroed memory initially. We fix this by giving these StablePtr the same representation as other null pointers. It's safe because StablePtr at offset 0 is unused (for this exact reason). - - - - - 55346ede by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: disable MergeObjsMode test This isn't implemented for JS backend objects. - - - - - aef587f6 by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: add support for linking C sources Support linking C sources with JS output of the JavaScript backend. See the added documentation in the users guide. The implementation simply extends the JS linker to use the objects (.o) that were already produced by the emcc compiler and which were filtered out previously. I've also added some options to control the link with C functions (see the documentation about pragmas). With this change I've successfully compiled the direct-sqlite package which embeds the sqlite.c database code. Some wrappers are still required (see the documentation about wrappers) but everything generic enough to be reused for other libraries have been integrated into rts/js/mem.js. - - - - - b71b392f by Sylvain Henry at 2024-02-12T12:18:42-05:00 JS: avoid EMCC logging spurious failure emcc would sometime output messages like: cache:INFO: generating system asset: symbol_lists/424b44514e43d789148e69e4e7d1c7fdc0350b79.json... (this will be cached in "/emsdk/upstream/emscripten/cache/symbol_lists/424b44514e43d789148e69e4e7d1c7fdc0350b79.json" for subsequent builds) cache:INFO: - ok Cf https://github.com/emscripten-core/emscripten/issues/18607 This breaks our tests matching the stderr output. We avoid this by setting EMCC_LOGGING=0 - - - - - ff2c0cc9 by Simon Peyton Jones at 2024-02-12T12:19:17-05:00 Remove a dead comment Just remove an out of date block of commented-out code, and tidy up the relevant Notes. See #8317. - - - - - bedb4f0d by Teo Camarasu at 2024-02-12T18:50:33-05:00 nonmoving: Add support for heap profiling Add support for heap profiling while using the nonmoving collector. We greatly simply the implementation by disabling concurrent collection for GCs when heap profiling is enabled. This entails that the marked objects on the nonmoving heap are exactly the live objects. Note that we match the behaviour for live bytes accounting by taking the size of objects on the nonmoving heap to be that of the segment's block rather than the object itself. Resolves #22221 - - - - - d0d5acb5 by Teo Camarasu at 2024-02-12T18:51:09-05:00 doc: Add requires prof annotation to options that require it Resolves #24421 - - - - - 6d1e2386 by Alan Zimmerman at 2024-02-13T22:00:28+03:00 EPA: Match changes to HsParTy and HsFunTy - - - - - 57bb8c92 by Cheng Shao at 2024-02-13T14:07:49-05:00 deriveConstants: add needed constants for wasm backend This commit adds needed constants to deriveConstants. They are used by RTS code in the wasm backend to support the JSFFI logic. - - - - - 615eb855 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms The pure Haskell implementation causes i386 regression in unrelated work that can be fixed by using C-based atomic increment, see added comment for details. - - - - - a9918891 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: allow JSFFI for wasm32 This commit allows the javascript calling convention to be used when the target platform is wasm32. - - - - - 8771a53b by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: allow boxed JSVal as a foreign type This commit allows the boxed JSVal type to be used as a foreign argument/result type. - - - - - 053c92b3 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: ensure ctors have the right priority on wasm32 This commit fixes the priorities of ctors generated by GHC codegen on wasm32, see the referred note for details. - - - - - b7942e0a by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: add JSFFI desugar logic for wasm32 This commit adds JSFFI desugar logic for the wasm backend. - - - - - 2c1dca76 by Cheng Shao at 2024-02-13T14:07:49-05:00 compiler: add JavaScriptFFI to supported extension list on wasm32 This commit adds JavaScriptFFI as a supported extension when the target platform is wasm32. - - - - - 9ad0e2b4 by Cheng Shao at 2024-02-13T14:07:49-05:00 rts/ghc-internal: add JSFFI support logic for wasm32 This commit adds rts/ghc-internal logic to support the wasm backend's JSFFI functionality. - - - - - e9ebea66 by Cheng Shao at 2024-02-13T14:07:49-05:00 ghc-internal: fix threadDelay for wasm in browsers This commit fixes broken threadDelay for wasm when it runs in browsers, see added note for detailed explanation. - - - - - f85f3fdb by Cheng Shao at 2024-02-13T14:07:49-05:00 utils: add JSFFI utility code This commit adds JavaScript util code to utils to support the wasm backend's JSFFI functionality: - jsffi/post-link.mjs, a post-linker to process the linked wasm module and emit a small complement JavaScript ESM module to be used with it at runtime - jsffi/prelude.js, a tiny bit of prelude code as the JavaScript side of runtime logic - jsffi/test-runner.mjs, run the jsffi test cases Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - 77e91500 by Cheng Shao at 2024-02-13T14:07:49-05:00 hadrian: distribute jsbits needed for wasm backend's JSFFI support The post-linker.mjs/prelude.js files are now distributed in the bindist libdir, so when using the wasm backend's JSFFI feature, the user wouldn't need to fetch them from a ghc checkout manually. - - - - - c47ba1c3 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: add opts.target_wrapper This commit adds opts.target_wrapper which allows overriding the target wrapper on a per test case basis when testing a cross target. This is used when testing the wasm backend's JSFFI functionality; the rest of the cases are tested using wasmtime, though the jsffi cases are tested using the node.js based test runner. - - - - - 8e048675 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: T22774 should work for wasm JSFFI T22774 works since the wasm backend now supports the JSFFI feature. - - - - - 1d07f9a6 by Cheng Shao at 2024-02-13T14:07:49-05:00 testsuite: add JSFFI test cases for wasm backend This commit adds a few test cases for the wasm backend's JSFFI functionality, as well as a simple README to instruct future contributors to add new test cases. - - - - - b8997080 by Cheng Shao at 2024-02-13T14:07:49-05:00 docs: add documentation for wasm backend JSFFI This commit adds changelog and user facing documentation for the wasm backend's JSFFI feature. - - - - - ffeb000d by David Binder at 2024-02-13T14:08:30-05:00 Add tests from libraries/process/tests and libraries/Win32/tests to GHC These tests were previously part of the libraries, which themselves are submodules of the GHC repository. This commit moves the tests directly to the GHC repository. - - - - - 5a932cf2 by David Binder at 2024-02-13T14:08:30-05:00 Do not execute win32 tests on non-windows runners - - - - - 500d8cb8 by Jade at 2024-02-13T14:09:07-05:00 prevent GHCi (and runghc) from suggesting other symbols when not finding main Fixes: #23996 - - - - - b19ec331 by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: update xxHash to v0.8.2 - - - - - 4a97bdb8 by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: use XXH3_64bits hash on all 64-bit platforms This commit enables XXH3_64bits hash to be used on all 64-bit platforms. Previously it was only enabled on x86_64, so platforms like aarch64 silently falls back to using XXH32 which degrades the hashing function quality. - - - - - ee01de7d by Cheng Shao at 2024-02-13T14:09:46-05:00 rts: define XXH_INLINE_ALL This commit cleans up how we include the xxhash.h header and only define XXH_INLINE_ALL, which is sufficient to inline the xxHash functions without symbol collision. - - - - - 0e01e1db by Alan Zimmerman at 2024-02-14T02:13:22-05:00 EPA: Move EpAnn out of extension points Leaving a few that are too tricky, maybe some other time. Also - remove some unneeded helpers from Parser.y - reduce allocations with strictness annotations Updates haddock submodule Metric Decrease: parsing001 - - - - - de589554 by Andreas Klebinger at 2024-02-14T02:13:59-05:00 Fix ffi callbacks with >6 args and non-64bit args. Check for ptr/int arguments rather than 64-bit width arguments when counting integer register arguments. The old approach broke when we stopped using exclusively W64-sized types to represent sub-word sized integers. Fixes #24314 - - - - - 9c588f19 by Fendor at 2024-02-14T11:05:36+01:00 Adapt to GHC giving better Name's for linking - - - - - 325b7613 by Ben Gamari at 2024-02-14T14:27:45-05:00 rts/EventLog: Place eliminate duplicate strlens Previously many of the `post*` implementations would first compute the length of the event's strings in order to determine the event length. Later we would then end up computing the length yet again in `postString`. Now we instead pass the string length to `postStringLen`, avoiding the repeated work. - - - - - 8aafa51c by Ben Gamari at 2024-02-14T14:27:46-05:00 rts/eventlog: Place upper bound on IPE string field lengths The strings in IPE events may be of unbounded length. Limit the lengths of these fields to 64k characters to ensure that we don't exceed the maximum event length. - - - - - 0e60d52c by Zubin Duggal at 2024-02-14T14:27:46-05:00 rts: drop unused postString function - - - - - d8d1333a by Cheng Shao at 2024-02-14T14:28:23-05:00 compiler/rts: fix wasm unreg regression This commit fixes two wasm unreg regressions caught by a nightly pipeline: - Unknown stg_scheduler_loopzh symbol when compiling scheduler.cmm - Invalid _hs_constructor(101) function name when handling ctor - - - - - 264a4fa9 by Owen Shepherd at 2024-02-15T09:41:06-05:00 feat: Add sortOn to Data.List.NonEmpty Adds `sortOn` to `Data.List.NonEmpty`, and adds comments describing when to use it, compared to `sortWith` or `sortBy . comparing`. The aim is to smooth out the API between `Data.List`, and `Data.List.NonEmpty`. This change has been discussed in the [clc issue](https://github.com/haskell/core-libraries-committee/issues/227). - - - - - b57200de by Fendor at 2024-02-15T09:41:47-05:00 Prefer RdrName over OccName for looking up locations in doc renaming step Looking up by OccName only does not take into account when functions are only imported in a qualified way. Fixes issue #24294 Bump haddock submodule to include regression test - - - - - 8ad02724 by Luite Stegeman at 2024-02-15T17:33:32-05:00 JS: add simple optimizer The simple optimizer reduces the size of the code generated by the JavaScript backend without the complexity and performance penalty of the optimizer in GHCJS. Also see #22736 Metric Decrease: libdir size_hello_artifact - - - - - 20769b36 by Matthew Pickering at 2024-02-15T17:34:07-05:00 base: Expose `--no-automatic-time-samples` in `GHC.RTS.Flags` API This patch builds on 5077416e12cf480fb2048928aa51fa4c8fc22cf1 and modifies the base API to reflect the new RTS flag. CLC proposal #243 - https://github.com/haskell/core-libraries-committee/issues/243 Fixes #24337 - - - - - 778e1db3 by Andrei Borzenkov at 2024-02-16T16:12:07+03:00 Namespace specifiers for fixity signatures - - - - - 08031ada by Teo Camarasu at 2024-02-16T13:37:00-05:00 base: export System.Mem.performBlockingMajorGC The corresponding C function was introduced in ba73a807edbb444c49e0cf21ab2ce89226a77f2e. As part of #22264. Resolves #24228 The CLC proposal was disccused at: https://github.com/haskell/core-libraries-committee/issues/230 Co-authored-by: Ben Gamari <bgamari.foss at gmail.com> - - - - - 1f534c2e by Florian Weimer at 2024-02-16T13:37:42-05:00 Fix C output for modern C initiative GCC 14 on aarch64 rejects the C code written by GHC with this kind of error: error: assignment to ‘ffi_arg’ {aka ‘long unsigned int’} from ‘HsPtr’ {aka ‘void *’} makes integer from pointer without a cast [-Wint-conversion] 68 | *(ffi_arg*)resp = cret; | ^ Add the correct cast. For more information on this see: https://fedoraproject.org/wiki/Changes/PortingToModernC Tested-by: Richard W.M. Jones <rjones at redhat.com> - - - - - 5d3f7862 by Matthew Craven at 2024-02-16T13:38:18-05:00 Bump bytestring submodule to 0.12.1.0 - - - - - 902ebcc2 by Ian-Woo Kim at 2024-02-17T06:01:01-05:00 Add missing BCO handling in scavenge_one. - - - - - 97d26206 by Sylvain Henry at 2024-02-17T06:01:44-05:00 Make cast between words and floats real primops (#24331) First step towards fixing #24331. Replace foreign prim imports with real primops. - - - - - a40e4781 by Sylvain Henry at 2024-02-17T06:01:44-05:00 Perf: add constant folding for bitcast between float and word (#24331) - - - - - 5fd2c00f by Sylvain Henry at 2024-02-17T06:01:44-05:00 Perf: replace stack checks with assertions in casting primops There are RESERVED_STACK_WORDS free words (currently 21) on the stack, so omit the checks. Suggested by Cheng Shao. - - - - - 401dfe7b by Sylvain Henry at 2024-02-17T06:01:44-05:00 Reexport primops from GHC.Float + add deprecation - - - - - 4ab48edb by Ben Gamari at 2024-02-17T06:02:21-05:00 rts/Hash: Don't iterate over chunks if we don't need to free data When freeing a `HashTable` there is no reason to walk over the hash list before freeing it if the user has not given us a `dataFreeFun`. Noticed while looking at #24410. - - - - - bd5a1f91 by Cheng Shao at 2024-02-17T06:03:00-05:00 compiler: add SEQ_CST fence support In addition to existing Acquire/Release fences, this commit adds SEQ_CST fence support to GHC, allowing Cmm code to explicitly emit a fence that enforces total memory ordering. The following logic is added: - The MO_SeqCstFence callish MachOp - The %prim fence_seq_cst() Cmm syntax and the SEQ_CST_FENCE macro in Cmm.h - MO_SeqCstFence lowering logic in every single GHC codegen backend - - - - - 2ce2a493 by Cheng Shao at 2024-02-17T06:03:38-05:00 testsuite: fix hs_try_putmvar002 for targets without pthread.h hs_try_putmvar002 includes pthread.h and doesn't work on targets without this header (e.g. wasm32). It doesn't need to include this header at all. This was previously unnoticed by wasm CI, though recent toolchain upgrade brought in upstream changes that completely removes pthread.h in the single-threaded wasm32-wasi sysroot, therefore we need to handle that change. - - - - - 1fb3974e by Cheng Shao at 2024-02-17T06:03:38-05:00 ci: bump ci-images to use updated wasm image This commit bumps our ci-images revision to use updated wasm image. - - - - - 56e3f097 by Andrew Lelechenko at 2024-02-17T06:04:13-05:00 Bump submodule text to 2.1.1 T17123 allocates less because of improvements to Data.Text.concat in 1a6a06a. Metric Decrease: T17123 - - - - - a7569495 by Cheng Shao at 2024-02-17T06:04:51-05:00 rts: remove redundant rCCCS initialization This commit removes the redundant logic of initializing each Capability's rCCCS to CCS_SYSTEM in initProfiling(). Before initProfiling() is called during RTS startup, each Capability's rCCCS has already been assigned CCS_SYSTEM when they're first initialized. - - - - - 7a0293cc by Ben Gamari at 2024-02-19T07:11:00-05:00 Drop dependence on `touch` This drops GHC's dependence on the `touch` program, instead implementing it within GHC. This eliminates an external dependency and means that we have one fewer program to keep track of in the `configure` script - - - - - 0dbd729e by Andrei Borzenkov at 2024-02-19T07:11:37-05:00 Parser, renamer, type checker for @a-binders (#17594) GHC Proposal 448 introduces binders for invisible type arguments (@a-binders) in various contexts. This patch implements @-binders in lambda patterns and function equations: {-# LANGUAGE TypeAbstractions #-} id1 :: a -> a id1 @t x = x :: t -- @t-binder on the LHS of a function equation higherRank :: (forall a. (Num a, Bounded a) => a -> a) -> (Int8, Int16) higherRank f = (f 42, f 42) ex :: (Int8, Int16) ex = higherRank (\ @a x -> maxBound @a - x ) -- @a-binder in a lambda pattern in an argument -- to a higher-order function Syntax ------ To represent those @-binders in the AST, the list of patterns in Match now uses ArgPat instead of Pat: data Match p body = Match { ... - m_pats :: [LPat p], + m_pats :: [LArgPat p], ... } + data ArgPat pass + = VisPat (XVisPat pass) (LPat pass) + | InvisPat (XInvisPat pass) (HsTyPat (NoGhcTc pass)) + | XArgPat !(XXArgPat pass) The VisPat constructor represents patterns for visible arguments, which include ordinary value-level arguments and required type arguments (neither is prefixed with a @), while InvisPat represents invisible type arguments (prefixed with a @). Parser ------ In the grammar (Parser.y), the lambda and lambda-cases productions of aexp non-terminal were updated to accept argpats instead of apats: aexp : ... - | '\\' apats '->' exp + | '\\' argpats '->' exp ... - | '\\' 'lcases' altslist(apats) + | '\\' 'lcases' altslist(argpats) ... + argpat : apat + | PREFIX_AT atype Function left-hand sides did not require any changes to the grammar, as they were already parsed with productions capable of parsing @-binders. Those binders were being rejected in post-processing (isFunLhs), and now we accept them. In Parser.PostProcess, patterns are constructed with the help of PatBuilder, which is used as an intermediate data structure when disambiguating between FunBind and PatBind. In this patch we define ArgPatBuilder to accompany PatBuilder. ArgPatBuilder is a short-lived data structure produced in isFunLhs and consumed in checkFunBind. Renamer ------- Renaming of @-binders builds upon prior work on type patterns, implemented in 2afbddb0f24, which guarantees proper scoping and shadowing behavior of bound type variables. This patch merely defines rnLArgPatsAndThen to process a mix of visible and invisible patterns: + rnLArgPatsAndThen :: NameMaker -> [LArgPat GhcPs] -> CpsRn [LArgPat GhcRn] + rnLArgPatsAndThen mk = mapM (wrapSrcSpanCps rnArgPatAndThen) where + rnArgPatAndThen (VisPat x p) = ... rnLPatAndThen ... + rnArgPatAndThen (InvisPat _ tp) = ... rnHsTyPat ... Common logic between rnArgPats and rnPats is factored out into the rn_pats_general helper. Type checker ------------ Type-checking of @-binders builds upon prior work on lazy skolemisation, implemented in f5d3e03c56f. This patch extends tcMatchPats to handle @-binders. Now it takes and returns a list of LArgPat rather than LPat: tcMatchPats :: ... - -> [LPat GhcRn] + -> [LArgPat GhcRn] ... - -> TcM ([LPat GhcTc], a) + -> TcM ([LArgPat GhcTc], a) Invisible binders in the Match are matched up with invisible (Specified) foralls in the type. This is done with a new clause in the `loop` worker of tcMatchPats: loop :: [LArgPat GhcRn] -> [ExpPatType] -> TcM ([LArgPat GhcTc], a) loop (L l apat : pats) (ExpForAllPatTy (Bndr tv vis) : pat_tys) ... -- NEW CLAUSE: | InvisPat _ tp <- apat, isSpecifiedForAllTyFlag vis = ... In addition to that, tcMatchPats no longer discards type patterns. This is done by filterOutErasedPats in the desugarer instead. x86_64-linux-deb10-validate+debug_info Metric Increase: MultiLayerModulesTH_OneShot - - - - - 486979b0 by Jade at 2024-02-19T07:12:13-05:00 Add specialized sconcat implementation for Data.Monoid.First and Data.Semigroup.First Approved CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/246 Fixes: #24346 - - - - - 17e309d2 by John Ericson at 2024-02-19T07:12:49-05:00 Fix reST in users guide It appears that aef587f65de642142c1dcba0335a301711aab951 wasn't valid syntax. - - - - - 35b0ad90 by Brandon Chinn at 2024-02-19T07:13:25-05:00 Fix searching for errors in sphinx build - - - - - 4696b966 by Cheng Shao at 2024-02-19T07:14:02-05:00 hadrian: fix wasm backend post linker script permissions The post-link.mjs script was incorrectly copied and installed as a regular data file without executable permission, this commit fixes it. - - - - - a6142e0c by Cheng Shao at 2024-02-19T07:14:40-05:00 testsuite: mark T23540 as fragile on i386 See #24449 for details. - - - - - 249caf0d by Matthew Craven at 2024-02-19T20:36:09-05:00 Add @since annotation to Data.Data.mkConstrTag - - - - - cdd939e7 by Jade at 2024-02-19T20:36:46-05:00 Enhance documentation of Data.Complex - - - - - d04f384f by Ben Gamari at 2024-02-21T04:59:23-05:00 hadrian/bindist: Ensure that phony rules are marked as such Otherwise make may not run the rule if file with the same name as the rule happens to exist. - - - - - efcbad2d by Ben Gamari at 2024-02-21T04:59:23-05:00 hadrian: Generate HSC2HS_EXTRAS variable in bindist installation We must generate the hsc2hs wrapper at bindist installation time since it must contain `--lflag` and `--cflag` arguments which depend upon the installation path. The solution here is to substitute these variables in the configure script (see mk/hsc2hs.in). This is then copied over a dummy wrapper in the install rules. Fixes #24050. - - - - - c540559c by Matthew Pickering at 2024-02-21T04:59:23-05:00 ci: Show --info for installed compiler - - - - - ab9281a2 by Matthew Pickering at 2024-02-21T04:59:23-05:00 configure: Correctly set --target flag for linker opts Previously we were trying to use the FP_CC_SUPPORTS_TARGET with 4 arguments, when it only takes 3 arguments. Instead we need to use the `FP_PROG_CC_LINKER_TARGET` function in order to set the linker flags. Actually fixes #24414 - - - - - 9460d504 by Rodrigo Mesquita at 2024-02-21T04:59:59-05:00 configure: Do not override existing linker flags in FP_LD_NO_FIXUP_CHAINS - - - - - 77629e76 by Andrei Borzenkov at 2024-02-21T05:00:35-05:00 Namespacing for fixity signatures (#14032) Namespace specifiers were added to syntax of fixity signatures: - sigdecl ::= infix prec ops | ... + sigdecl ::= infix prec namespace_spec ops | ... To preserve namespace during renaming MiniFixityEnv type now has separate FastStringEnv fields for names that should be on the term level and for name that should be on the type level. makeMiniFixityEnv function was changed to fill MiniFixityEnv in the right way: - signatures without namespace specifiers fill both fields - signatures with 'data' specifier fill data field only - signatures with 'type' specifier fill type field only Was added helper function lookupMiniFixityEnv that takes care about looking for a name in an appropriate namespace. Updates haddock submodule. Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 84357d11 by Teo Camarasu at 2024-02-21T05:01:11-05:00 rts: only collect live words in nonmoving census when non-concurrent This avoids segfaults when the mutator modifies closures as we examine them. Resolves #24393 - - - - - 9ca56dd3 by Ian-Woo Kim at 2024-02-21T05:01:53-05:00 mutex wrap in refreshProfilingCCSs - - - - - 1387966a by Cheng Shao at 2024-02-21T05:02:32-05:00 rts: remove unused HAVE_C11_ATOMICS macro This commit removes the unused HAVE_C11_ATOMICS macro. We used to have a few places that have fallback paths when HAVE_C11_ATOMICS is not defined, but that is completely redundant, since the FP_CC_SUPPORTS__ATOMICS configure check will fail when the C compiler doesn't support C11 style atomics. There are also many places (e.g. in unreg backend, SMP.h, library cbits, etc) where we unconditionally use C11 style atomics anyway which work in even CentOS 7 (gcc 4.8), the oldest distro we test in our CI, so there's no value in keeping HAVE_C11_ATOMICS. - - - - - 0f40d68f by Andreas Klebinger at 2024-02-21T05:03:09-05:00 RTS: -Ds - make sure incall is non-zero before dereferencing it. Fixes #24445 - - - - - e5886de5 by Ben Gamari at 2024-02-21T05:03:44-05:00 rts/AdjustorPool: Use ExecPage abstraction This is just a minor cleanup I found while reviewing the implementation. - - - - - 826c5b47 by Torsten Schmits at 2024-02-21T13:17:05+01:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 09941666 by Adam Gundry at 2024-02-21T13:53:12+00:00 Define GHC2024 language edition (#24320) See https://github.com/ghc-proposals/ghc-proposals/pull/613. Also fixes #24343 and improves the documentation of language editions. Co-authored-by: Joachim Breitner <mail at joachim-breitner.de> - - - - - 2cff14d5 by Ben Gamari at 2024-02-22T09:35:56-05:00 Bump bounds - - - - - f49376b3 by Ben Gamari at 2024-02-22T09:35:56-05:00 Allow `@since` annotations in export lists Here we extend Haddock to admit `@since` annotations in export lists. These can be attached to most export list items (although not subordinate lists). These annotations supercede the declaration's `@since` annotation in produced Haddocks. - - - - - b5aa93df by Ben Gamari at 2024-02-22T12:09:06-05:00 Allow package-qualified @since declarations - - - - - 8f5957f2 by Ben Gamari at 2024-02-22T13:55:19-05:00 Documentation changes from ghc-internal restructuring Previously many declarations (e.g. `Int`) were declared to have a "home" in `Prelude`. However, now Haddock instead chooses to put these in more specific homes (e.g. `Data.Int`). Given that the "home" decision is driven by heuristics and in general these changes seem quite reasonable I am accepting them: * `Int` moved from `Prelude` to `Data.Int` * `(~)` moved from `Prelude` to `Data.Type.Equality` * `Type` moved from `GHC.Types` to `Data.Kind` * `Maybe` moved from `Prelude` to `Data.Maybe` * `Bool` moved from `Prelude` to `Data.Bool` * `Ordering` moved from `Prelude` to `Data.Ord` As well, more identifiers are now hyperlinked; it's not immediately clear *why*, but it is an improvement nevertheless. - - - - - ec33fec3 by Ben Gamari at 2024-02-22T20:36:24-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 5121a4ed by Ben Gamari at 2024-02-23T06:40:55-05:00 Allow docstrings after exports Here we extend the parser and AST to preserve docstrings following export items. We then extend Haddock to parse `@since` annotations in such docstrings, allowing changes in export structure to be properly documented. Bumps haddock submodule. - - - - - 30cfd251 by Torsten Schmits at 2024-02-24T13:00:42-05:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 0eb2265d by Hécate Moonlight at 2024-02-24T16:02:16-05:00 Improve the synopsis and description of base - - - - - 2e36f5d2 by Jade at 2024-02-24T16:02:51-05:00 Error Messages: Properly align cyclic module error Fixes: #24476 - - - - - bbfb051c by Ben Gamari at 2024-02-24T19:10:23-05:00 Allow docstrings after exports Here we extend the parser and AST to preserve docstrings following export items. We then extend Haddock to parse `@since` annotations in such docstrings, allowing changes in export structure to be properly documented. - - - - - d8d6ad8c by Ben Gamari at 2024-02-24T19:10:23-05:00 ghc-internal: Move modules into GHC.Internal.* namespace Bumps haddock submodule due to testsuite output changes. - - - - - a82af7cd by Ben Gamari at 2024-02-24T19:10:23-05:00 ghc-internal: Rewrite `@since ` to `@since base-` These will be incrementally moved to the export sites in `base` where possible. - - - - - ca3836e1 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Migrate Haddock `not-home` pragmas from `ghc-internal` This ensures that we do not use `base` stub modules as declarations' homes when not appropriate. - - - - - c8cf3e26 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Partially freeze exports of GHC.Base Sadly there are still a few module reexports. However, at least we have decoupled from the exports of `GHC.Internal.Base`. - - - - - 272573c6 by Ben Gamari at 2024-02-24T19:10:23-05:00 Move Haddock named chunks - - - - - 2d8a881d by Ben Gamari at 2024-02-24T19:10:23-05:00 Drop GHC.Internal.Data.Int - - - - - 55c4c385 by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler: Fix mention to `GHC....` modules in wasm desugaring Really, these references should be via known-key names anyways. I have fixed the proximate issue here but have opened #24472 to track the additional needed refactoring. - - - - - 64150911 by Ben Gamari at 2024-02-24T19:10:23-05:00 Accept performance shifts from ghc-internal restructure As expected, Haddock now does more work. Less expected is that some other testcases actually get faster, presumably due to less interface file loading. As well, the size_hello_artifact test regressed a bit when debug information is enabled due to debug information for the new stub symbols. Metric Decrease: T12227 T13056 Metric Increase: haddock.Cabal haddock.base MultiLayerModulesTH_OneShot size_hello_artifact - - - - - 317a915b by Ben Gamari at 2024-02-24T19:10:23-05:00 Expose GHC.Wasm.Prim from ghc-experimental Previously this was only exposed from `ghc-internal` which violates our agreement that users shall not rely on things exposed from that package. Fixes #24479. - - - - - 3bbd2bf2 by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler/tc: Small optimisation of evCallStack Don't lookupIds unless we actually need them. - - - - - 3e5c9e3c by Ben Gamari at 2024-02-24T19:10:23-05:00 compiler/tc: Use toException instead of SomeException - - - - - 125714a6 by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Factor out errorBelch This was useful when debugging - - - - - 3d6aae7c by Ben Gamari at 2024-02-24T19:10:23-05:00 base: Clean up imports of GHC.Stack.CloneStack - - - - - 6900306e by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Move PrimMVar to GHC.Internal.MVar - - - - - 28f8a148 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Move prettyCallStack to GHC.Internal.Stack - - - - - 4892de47 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Explicit dependency to workaround #24436 Currently `ghc -M` fails to account for `.hs-boot` files correctly, leading to issues with cross-package one-shot builds failing. This currently manifests in `GHC.Exception` due to the boot file for `GHC.Internal.Stack`. Work around this by adding an explicit `import`, ensuring that `GHC.Internal.Stack` is built before `GHC.Exception`. See #24436. - - - - - 294c93a5 by Ben Gamari at 2024-02-24T19:10:24-05:00 base: Use displayException in top-level exception handler Happily this also allows us to eliminate a special case for Deadlock exceptions. Implements [CLC #198](https://github.com/haskell/core-libraries-committee/issues/198). - - - - - 732db81d by Ben Gamari at 2024-02-24T19:12:18-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - cf756a25 by Ben Gamari at 2024-02-24T22:11:53-05:00 rts: Fix symbol references in Wasm RTS - - - - - 4e4d47a0 by Jade at 2024-02-26T15:17:20-05:00 GHCi: Improve response to unloading, loading and reloading modules Fixes #13869 - - - - - f3de8a3c by Zubin Duggal at 2024-02-26T15:17:57-05:00 rel-eng/fetch-gitlab.py: Fix name of aarch64 alpine 3_18 release job - - - - - c71bfdff by Cheng Shao at 2024-02-26T15:18:35-05:00 hadrian/hie-bios: pass -j to hadrian This commit passes -j to hadrian in the hadrian/hie-bios scripts. When the user starts HLS in a fresh clone that has just been configured, it takes quite a while for hie-bios to pick up the ghc flags and start actual indexing, due to the fact that the hadrian build step defaulted to -j1, so -j speeds things up and improve HLS user experience in GHC. Also add -j flag to .ghcid to speed up ghcid, and sets the Windows build root to .hie-bios which also works and unifies with other platforms, the previous build root _hie-bios was missing from .gitignore anyway. - - - - - 50bfdb46 by Cheng Shao at 2024-02-26T15:18:35-05:00 ci: enable parallelism in hadrian/ghci scripts This commit enables parallelism when the hadrian/ghci scripts are called in CI. The time bottleneck is in the hadrian build step, but previously the build step wasn't parallelized. - - - - - 61a78231 by Felix Yan at 2024-02-26T15:19:14-05:00 m4: Correctly detect GCC version When calling as `cc`, GCC does not outputs lowercased "gcc" at least in 13.2.1 version here. ``` $ cc --version cc (GCC) 13.2.1 20230801 ... ``` This fails the check and outputs the confusing message: `configure: $CC is not gcc; assuming it's a reasonably new C compiler` This patch makes it check for upper-cased "GCC" too so that it works correctly: ``` checking version of gcc... 13.2.1 ``` - - - - - 001aa539 by Teo Camarasu at 2024-02-27T13:26:46-05:00 Fix formatting in whereFrom docstring Previously it used markdown syntax rather than Haddock syntax for code quotes - - - - - e8034d15 by Teo Camarasu at 2024-02-27T13:26:46-05:00 Move ClosureType type to ghc-internal - Use ClosureType for InfoProv.ipDesc. - Use ClosureType for CloneStack.closureType. - Now ghc-heap re-exports this type from ghc-internal. See the accompanying CLC proposal: https://github.com/haskell/core-libraries-committee/issues/210 Resolves #22600 - - - - - 3da0a551 by Matthew Craven at 2024-02-27T13:27:22-05:00 StgToJS: Simplify ExprInline constructor of ExprResult Its payload was used only for a small optimization in genAlts, avoiding a few assignments for programs of this form: case NormalDataCon arg1 arg2 of x { NormalDataCon x1 x2 -> ... ; } But when compiling with optimizations, this sort of code is generally eliminated by case-of-known-constructor in Core-to-Core. So it doesn't seem worth tracking and cleaning up again in StgToJS. - - - - - 61bc92cc by Cheng Shao at 2024-02-27T16:58:42-05:00 rts: add missing ccs_mutex guard to internal_dlopen See added comment for details. Closes #24423. - - - - - dd29d3b2 by doyougnu at 2024-02-27T16:59:23-05:00 cg: Remove GHC.Cmm.DataFlow.Collections In pursuit of #15560 and #17957 and generally removing redundancy. - - - - - d3a050d2 by Cheng Shao at 2024-02-27T17:00:00-05:00 utils: remove unused lndir from tree Ever since the removal of the make build system, the in tree lndir hasn't been actually built, so this patch removes it. - - - - - 86bf7010 by Ben Gamari at 2024-02-27T19:28:10-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 74b24a9b by Teo Camarasu at 2024-02-28T16:32:58+00:00 rts: avoid checking bdescr of value outside of Haskell heap In nonmovingTidyWeaks we want to check if the key of a weak pointer lives in the non-moving heap. We do this by checking the flags of the block the key lives in. But we need to be careful with values that live outside the Haskell heap, since they will lack a block descriptor and looking for one may lead to a segfault. In this case we should just accept that it isn't on the non-moving heap. Resolves #24492 - - - - - b4cae4ec by Simon Peyton Jones at 2024-02-29T02:10:08-05:00 In mkDataConRep, ensure the in-scope set is right A small change that fixes #24489 - - - - - 3836a110 by Cheng Shao at 2024-02-29T21:25:45-05:00 testsuite: fix T23540 fragility on 32-bit platforms T23540 is fragile on 32-bit platforms. The root cause is usage of `getEvidenceTreesAtPoint`, which internally relies on `Name`'s `Ord` instance, which is indeterministic. The solution is adding a deterministic `Ord` instance for `EvidenceInfo` and sorting the evidence trees before pretty printing. Fixes #24449. - - - - - 960c8d47 by Teo Camarasu at 2024-02-29T21:26:20-05:00 Reduce AtomicModifyIORef increment count This test leads to a lot of contention when N>2 and becomes very slow. Let's reduce the amount of work we do to compensate. Resolves #24490 - - - - - 2e46c8ad by Matthew Pickering at 2024-03-01T05:48:06-05:00 hadrian: Improve parallelism in binary-dist-dir rule I noticed that the "docs" target was needed after the libraries and executables were built. We can improve the parallelism by needing everything at once so that documentation can be built immediately after a library is built for example. - - - - - cb6c11fe by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: Bump windows and freebsd boot compilers to 9.6.4 We have previously bumped the docker images to use 9.6.4, but neglected to bump the windows images until now. - - - - - 30f06996 by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: darwin: Update to 9.6.2 for boot compiler 9.6.4 is currently broken due to #24050 Also update to use LLVM-15 rather than LLVM-11, which is out of date. - - - - - d9d69e12 by Matthew Pickering at 2024-03-01T05:48:07-05:00 Bump minimum bootstrap version to 9.6 - - - - - 67ace1c5 by Matthew Pickering at 2024-03-01T05:48:07-05:00 ci: Enable more documentation building Here we enable documentation building on 1. Darwin: The sphinx toolchain was already installed so we enable html and manpages. 2. Rocky8: Full documentation (toolchain already installed) 3. Alpine: Full documetnation (toolchain already installed) 4. Windows: HTML and manpages (toolchain already installed) Fixes #24465 - - - - - 39583c39 by Matthew Pickering at 2024-03-01T05:48:42-05:00 ci: Bump ci-images to allow updated aarch64-alpine image with llvm15 and clang15 - - - - - d91d00fc by Torsten Schmits at 2024-03-01T15:01:50-05:00 Introduce ListTuplePuns extension This implements Proposal 0475, introducing the `ListTuplePuns` extension which is enabled by default. Disabling this extension makes it invalid to refer to list, tuple and sum type constructors by using built-in syntax like `[Int]`, `(Int, Int)`, `(# Int#, Int# #)` or `(# Int | Int #)`. Instead, this syntax exclusively denotes data constructors for use with `DataKinds`. The conventional way of referring to these data constructors by prefixing them with a single quote (`'(Int, Int)`) is now a parser error. Tuple declarations have been moved to `GHC.Tuple.Prim` and the `Solo` data constructor has been renamed to `MkSolo` (in a previous commit). Unboxed tuples and sums now have real source declarations in `GHC.Types`. Unit and solo types for tuples are now called `Unit`, `Unit#`, `Solo` and `Solo#`. Constraint tuples now have the unambiguous type constructors `CTuple<n>` as well as `CUnit` and `CSolo`, defined in `GHC.Classes` like before. A new parser construct has been added for the unboxed sum data constructor declarations. The type families `Tuple`, `Sum#` etc. that were intended to provide nicer syntax have been omitted from this change set due to inference problems, to be implemented at a later time. See the MR discussion for more info. Updates the submodule utils/haddock. Updates the cabal submodule due to new language extension. Metric Increase: haddock.base Metric Decrease: MultiLayerModulesTH_OneShot size_hello_artifact Proposal document: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0475-tuple-syntax.rst Merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8820 Tracking ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/21294 - - - - - bbdb6286 by Sylvain Henry at 2024-03-01T15:01:50-05:00 JS linker: filter unboxed tuples - - - - - dec6d8d3 by Arnaud Spiwack at 2024-03-01T15:02:30-05:00 Improve error messages coming from non-linear patterns This enriched the `CtOrigin` for non-linear patterns to include data of the pattern that created the constraint (which can be quite useful if it occurs nested in a pattern) as well as an explanation why the pattern is non-restricted in (at least in some cases). - - - - - 6612388e by Arnaud Spiwack at 2024-03-01T15:02:30-05:00 Adjust documentation of linear lets according to committee decision - - - - - 1c064ef1 by Cheng Shao at 2024-03-02T17:11:19-05:00 compiler: start deprecating cmmToRawCmmHook cmmToRawCmmHook was added 4 years ago in d561c8f6244f8280a2483e8753c38e39d34c1f01. Its only user is the Asterius project, which has been archived and deprecated in favor of the ghc wasm backend. This patch starts deprecating cmmToRawCmmHook by placing a DEPRECATED pragma, and actual removal shall happen in a future GHC major release if no issue to oppose the deprecation has been raised in the meantime. - - - - - 9b74845f by Andrew Lelechenko at 2024-03-02T17:11:55-05:00 Data.List.NonEmpty.unzip: use WARNING with category instead of DEPRECATED CLC proposal: https://github.com/haskell/core-libraries-committee/issues/258 - - - - - 61bb5ff6 by Finley McIlwaine at 2024-03-04T09:01:40-08:00 add -fprof-late-overloaded and -fprof-late-overloaded-calls * Refactor late cost centre insertion for extensibility * Add two more late cost centre insertion methods that add SCCs to overloaded top level bindings and call sites with dictionary arguments. * Some tests for the basic functionality of the new insertion methods Resolves: #24500 - - - - - 82ccb801 by Andreas Klebinger at 2024-03-04T19:59:14-05:00 x86-ncg: Fix fma codegen when arguments are globals Fix a bug in the x86 ncg where results would be wrong when the desired output register and one of the input registers were the same global. Also adds a tiny optimization to make use of the memory addressing support when convenient. Fixes #24496 - - - - - 18ad1077 by Matthew Pickering at 2024-03-05T14:22:31-05:00 rel_eng: Update hackage docs upload scripts This adds the upload of ghc-internal and ghc-experimental to our scripts which upload packages to hackage. - - - - - bf47c9ba by Matthew Pickering at 2024-03-05T14:22:31-05:00 docs: Remove stray module comment from GHC.Profiling.Eras - - - - - 37d9b340 by Matthew Pickering at 2024-03-05T14:22:31-05:00 Fix ghc-internal cabal file The file mentioned some artifacts relating to the base library. I have renamed these to the new ghc-internal variants. - - - - - 23f2a478 by Matthew Pickering at 2024-03-05T14:22:31-05:00 Fix haddock source links and hyperlinked source There were a few issues with the hackage links: 1. We were using the package id rather than the package name for the package links. This is fixed by now allowing the template to mention %pkg% or %pkgid% and substituing both appropiatly. 2. The `--haddock-base-url` flag is renamed to `--haddock-for-hackage` as the new base link works on a local or remote hackage server. 3. The "src" path including too much stuff, so cross-package source links were broken as the template was getting double expanded. Fixes #24086 - - - - - 2fa336a9 by Ben Gamari at 2024-03-05T14:23:07-05:00 filepath: Bump submodule to 1.5.2.0 - - - - - 31217944 by Ben Gamari at 2024-03-05T14:23:07-05:00 os-string: Bump submodule to 2.0.2 - - - - - 4074a3f2 by Matthew Pickering at 2024-03-05T21:44:35-05:00 base: Reflect new era profiling RTS flags in GHC.RTS.Flags * -he profiling mode * -he profiling selector * --automatic-era-increment CLC proposal #254 - https://github.com/haskell/core-libraries-committee/issues/254 - - - - - a8c0e31b by Sylvain Henry at 2024-03-05T21:45:14-05:00 JS: faster implementation for some numeric primitives (#23597) Use faster implementations for the following primitives in the JS backend by not using JavaScript's BigInt: - plusInt64 - minusInt64 - minusWord64 - timesWord64 - timesInt64 Co-authored-by: Josh Meredith <joshmeredith2008 at gmail.com> - - - - - 21e3f325 by Cheng Shao at 2024-03-05T21:45:52-05:00 rts: add -xr option to control two step allocator reserved space size This patch adds a -xr RTS option to control the size of virtual memory address space reserved by the two step allocator on a 64-bit platform, see added documentation for explanation. Closes #24498. - - - - - dedcf102 by Cheng Shao at 2024-03-06T13:39:04-05:00 rts: expose HeapAlloc.h as public header This commit exposes HeapAlloc.h as a public header. The intention is to expose HEAP_ALLOCED/HEAP_ALLOCED_GC, so they can be used in assertions in other public headers, and they may also be useful for user code. - - - - - d19441d7 by Cheng Shao at 2024-03-06T13:39:04-05:00 rts: assert pointer is indeed heap allocated in Bdescr() This commit adds an assertion to Bdescr() to assert the pointer is indeed heap allocated. This is useful to rule out RTS bugs that attempt to access non-existent block descriptor of a static closure, #24492 being one such example. - - - - - 9a656a04 by Ben Gamari at 2024-03-06T13:39:39-05:00 ghc-experimental: Add dummy dependencies to work around #23942 This is a temporary measure to improve CI reliability until a proper solution is developed. Works around #23942. - - - - - 1e84b924 by Simon Peyton Jones at 2024-03-06T13:39:39-05:00 Three compile perf improvements with deep nesting These were changes are all triggered by #24471. 1. Make GHC.Core.Opt.SetLevels.lvlMFE behave better when there are many free variables. See Note [Large free-variable sets]. 2. Make GHC.Core.Opt.Arity.floatIn a bit lazier in its Cost argument. This benefits the common case where the ArityType turns out to be nullary. See Note [Care with nested expressions] 3. Make GHC.CoreToStg.Prep.cpeArg behave for deeply-nested expressions. See Note [Eta expansion of arguments in CorePrep] wrinkle (EA2). Compile times go down by up to 4.5%, and much more in artificial cases. (Geo mean of compiler/perf changes is -0.4%.) Metric Decrease: CoOpt_Read T10421 T12425 - - - - - c4b13113 by Hécate Moonlight at 2024-03-06T13:40:17-05:00 Use "module" instead of "library" when applicable in base haddocks - - - - - 9cd9efb4 by Vladislav Zavialov at 2024-03-07T13:01:54+03:00 Rephrase error message to say "visible arguments" (#24318) * Main change: make the error message generated by mkFunTysMsg more accurate by changing "value arguments" to "visible arguments". * Refactor: define a new type synonym VisArity and use it instead of Arity in a few places. It might be the case that there other places in the compiler that should talk about visible arguments rather than value arguments, but I haven't tried to find them all, focusing only on the error message reported in the ticket. - - - - - 4b6e76b5 by Patrick at 2024-03-07T22:09:30+08:00 fix haskell/haddock#24493, with module name introduced in hieAst The accompanies haddoc PR with GHC PR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12153 Two things have been done: 1. Link is introduced to every `X` in `module X where`, since we introduce the module name to HieAst, 2. `{-# LINE 4 "hypsrc-test/src/PositionPragmas.hs" #-}` is added before the `module PositionPragmas where` in ` hypsrc-test/ref/src/PositionPragmas.html `.It ensures only a single hieAst for file `hypsrc-test/src/PositionPragmas.hs` is generated. - - - - - d523a6a7 by Ben Gamari at 2024-03-07T19:40:45-05:00 Bump array submodule - - - - - 7e55003c by Ben Gamari at 2024-03-07T19:40:45-05:00 Bump stm submodule - - - - - 32d337ef by Ben Gamari at 2024-03-07T19:40:45-05:00 Introduce exception context Here we introduce the `ExceptionContext` type and `ExceptionAnnotation` class, allowing dynamically-typed user-defined annotations to be attached to exceptions. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/199 GHC Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/330 - - - - - 39f3d922 by Ben Gamari at 2024-03-07T19:40:46-05:00 testsuite/interface-stability: Update documentation - - - - - fdea7ada by Ben Gamari at 2024-03-07T19:40:46-05:00 ghc-internal: comment formatting - - - - - 4fba42ef by Ben Gamari at 2024-03-07T19:40:46-05:00 compiler: Default and warn ExceptionContext constraints - - - - - 3886a205 by Ben Gamari at 2024-03-07T19:40:46-05:00 base: Introduce exception backtraces Here we introduce the `Backtraces` type and associated machinery for attaching these via `ExceptionContext`. These has a few compile-time regressions (`T15703` and `T9872d`) due to the additional dependencies in the exception machinery. As well, there is a surprisingly large regression in the `size_hello_artifact` test. This appears to be due to various `Integer` and `Read` bits now being reachable at link-time. I believe it should be possible to avoid this but I have accepted the change for now to get the feature merged. CLC Proposal: https://github.com/haskell/core-libraries-committee/issues/199 GHC Proposal: https://github.com/ghc-proposals/ghc-proposals/pull/330 Metric Increase: T15703 T9872d size_hello_artifact - - - - - 18c5409f by Ben Gamari at 2024-03-07T19:40:46-05:00 users guide: Release notes for exception backtrace work - - - - - f849c5fc by Ben Gamari at 2024-03-07T19:40:46-05:00 compiler: Don't show ExceptionContext of GhcExceptions Most GhcExceptions are user-facing errors and therefore the ExceptionContext has little value. Ideally we would enable it in the DEBUG compiler but I am leaving this for future work. - - - - - dc646e6f by Sylvain Henry at 2024-03-07T19:40:46-05:00 Disable T9930fail for the JS target (cf #19174) - - - - - bfc09760 by Alan Zimmerman at 2024-03-07T19:41:22-05:00 Update showAstData to honour blanking of AnnParen Also tweak rendering of SrcSpan to remove extra blank line. - - - - - 50454a29 by Ben Gamari at 2024-03-08T03:32:42-05:00 ghc-internal: Eliminate GHC.Internal.Data.Kind This was simply reexporting things from `ghc-prim`. Instead reexport these directly from `Data.Kind`. Also add build ordering dependency to work around #23942. - - - - - 38a4b6ab by Ben Gamari at 2024-03-08T03:33:18-05:00 rts: Fix SET_HDR initialization of retainer set This fixes a regression in retainer set profiling introduced by b0293f78cb6acf2540389e22bdda420d0ab874da. Prior to that commit the heap traversal word would be initialized by `SET_HDR` using `LDV_RECORD_CREATE`. However, the commit added a `doingLDVProfiling` check in `LDV_RECORD_CREATE`, meaning that this initialization no longer happened. Given that this initialization was awkwardly indirectly anyways, I have fixed this by explicitly initializating the heap traversal word to `NULL` in `SET_PROF_HDR`. This is equivalent to the previous behavior, but much more direct. Fixes #24513. - - - - - 635abccc by Ben Gamari at 2024-03-08T17:09:06-05:00 Bump ghc version to 9.10 - - - - - 2859a637 by Ben Gamari at 2024-03-08T18:26:47-05:00 base: Use strerror_r instead of strerror As noted by #24344, `strerror` is not necessarily thread-safe. Thankfully, POSIX.1-2001 has long offered `strerror_r`, which is safe to use. Fixes #24344. CLC discussion: https://github.com/haskell/core-libraries-committee/issues/249 - - - - - 5b934048 by Ben Gamari at 2024-03-08T18:50:12-05:00 Bump base upper bound - - - - - b30d134e by Ben Gamari at 2024-03-08T18:50:44-05:00 Testsuite output update - - - - - edb9bf77 by Jade at 2024-03-09T03:39:38-05:00 Error messages: Improve Error messages for Data constructors in type signatures. This patch improves the error messages from invalid type signatures by trying to guess what the user did and suggesting an appropriate fix. Partially fixes: #17879 - - - - - cfb197e3 by Patrick at 2024-03-09T03:40:15-05:00 HieAst: add module name #24493 The main purpose of this is to tuck the module name `xxx` in `module xxx where` into the hieAst. It should fix #24493. The following have been done: 1. Renamed and update the `tcg_doc_hdr :: Maybe (LHsDoc GhcRn)` to `tcg_hdr_info :: (Maybe (LHsDoc GhcRn), Maybe (XRec GhcRn ModuleName))` To store the located module name information. 2. update the `RenamedSource` and `RenamedStuff` with extra `Maybe (XRec GhcRn ModuleName)` located module name information. 3. add test `testsuite/tests/hiefile/should_compile/T24493.hs` to ensure the module name is added and update several relevent tests. 4. accompanied submodule haddoc test update MR in https://gitlab.haskell.org/ghc/haddock/-/merge_requests/53 - - - - - 2341d81e by Vaibhav Sagar at 2024-03-09T03:40:54-05:00 GHC.Utils.Binary: fix a couple of typos - - - - - 5580e1bd by Ben Gamari at 2024-03-09T03:41:30-05:00 rts: Drop .wasm suffix from .prof file names This replicates the behavior on Windows, where `Hi.exe` will produce profiling output named `Hi.prof` instead of `Hi.exe.prof`. While in the area I also fixed the extension-stripping logic, which incorrectly rewrote `Hi.exefoo` to `Hi.foo`. Closes #24515. - - - - - 259495ee by Cheng Shao at 2024-03-09T03:41:30-05:00 testsuite: drop exe extension from .hp & .prof filenames See #24515 for details. - - - - - c477a8d2 by Ben Gamari at 2024-03-09T03:42:05-05:00 rts/linker: Enable GOT support on all platforms There is nothing platform-dependent about our GOT implementation and GOT support is needed by `T24171` on i386. - - - - - 2e592857 by Vladislav Zavialov at 2024-03-09T03:42:41-05:00 Drop outdated comment on TcRnIllformedTypePattern This should have been done in 0f0c53a501b but I missed it. - - - - - c554b4da by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/CloneStack: Bounds check array write - - - - - 15c590a5 by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/CloneStack: Don't expose helper functions in header - - - - - e831ce31 by Ben Gamari at 2024-03-09T09:39:20-05:00 base: Move internals of GHC.InfoProv into GHC.InfoProv.Types Such that we can add new helpers into GHC.InfoProv.Types without breakage. - - - - - 6948e24d by Ben Gamari at 2024-03-09T09:39:20-05:00 rts: Lazily decode IPE tables Previously we would eagerly allocate `InfoTableEnt`s for each info table registered in the info table provenance map. However, this costs considerable memory and initialization time. Instead we now lazily decode these tables. This allows us to use one-third the memory *and* opens the door to taking advantage of sharing opportunities within a module. This required considerable reworking since lookupIPE now must be passed its result buffer. - - - - - 9204a04e by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/IPE: Don't expose helper in header - - - - - 308926ff by Ben Gamari at 2024-03-09T09:39:20-05:00 rts/IPE: Share module_name within a Node This allows us to shave a 64-bit word off of the packed IPE entry size. - - - - - bebdea05 by Ben Gamari at 2024-03-09T09:39:20-05:00 IPE: Expose unit ID in InfoTableProv Here we add the unit ID to the info table provenance structure. - - - - - 6519c9ad by Ben Gamari at 2024-03-09T09:39:35-05:00 rts: Refactor GHC.Stack.CloneStack.decode Don't allocate a Ptr constructor per frame. - - - - - ed0b69dc by Ben Gamari at 2024-03-09T09:39:35-05:00 base: Do not expose whereFrom# from GHC.Exts - - - - - 2b1faea9 by Vladislav Zavialov at 2024-03-09T17:38:21-05:00 docs: Update info on TypeAbstractions * Mention TypeAbstractions in 9.10.1-notes.rst * Set the status to "Experimental". * Add a "Since: GHC 9.x" comment to each section. - - - - - f8b88918 by Ben Gamari at 2024-03-09T21:21:46-05:00 ci-images: Bump Alpine image to bootstrap with 9.8.2 - - - - - 705e6927 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Mark T24171 as fragile due to #24512 I will fix this but not in time for 9.10.1-alpha1 - - - - - c74196e1 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Mark linker_unload_native as fragile In particular this fails on platforms without `dlinfo`. I plan to address this but not before 9.10.1-alpha1. - - - - - f4d87f7a by Ben Gamari at 2024-03-09T21:21:46-05:00 configure: Bump version to 9.10 - - - - - 88df9a5f by Ben Gamari at 2024-03-09T21:21:46-05:00 Bump transformers submodule to 0.6.1.1 - - - - - 8176d5e8 by Ben Gamari at 2024-03-09T21:21:46-05:00 testsuite: Increase ulimit for T18623 1 MByte was just too tight and failed intermittently on some platforms (e.g. CentOS 7). Bumping the limit to 8 MByte should provide sufficient headroom. Fixes #23139. - - - - - c74b38a3 by Ben Gamari at 2024-03-09T21:21:46-05:00 base: Bump version to 4.20.0.0 - - - - - b2937fc3 by Ben Gamari at 2024-03-09T21:21:46-05:00 ghc-internal: Set initial version at 9.1001.0 This provides PVP compliance while maintaining a clear correspondence between GHC releases and `ghc-internal` versions. - - - - - 4ae7d868 by Ben Gamari at 2024-03-09T21:21:46-05:00 ghc-prim: Bump version to 0.11.0 - - - - - 50798dc6 by Ben Gamari at 2024-03-09T21:21:46-05:00 template-haskell: Bump version to 2.22.0.0 - - - - - 8564f976 by Ben Gamari at 2024-03-09T21:21:46-05:00 base-exports: Accommodate spurious whitespace changes in 32-bit output It appears that this was - - - - - 9d4f0e98 by Ben Gamari at 2024-03-09T21:21:46-05:00 users-guide: Move exception backtrace relnotes to 9.10 This was previously mistakenly added to the GHC 9.8 release notes. - - - - - 145eae60 by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/rel_eng: Fix name of Rocky8 artifact - - - - - 39c2a630 by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/rel_eng: Fix path of generate_jobs_metadata - - - - - aed034de by Ben Gamari at 2024-03-09T21:21:46-05:00 gitlab/upload: Rework recompression The old `combine` approach was quite fragile due to use of filename globbing. Moreover, it didn't parallelize well. This refactoring makes the goal more obvious, parallelizes better, and is more robust. - - - - - 9bdf3586 by Ben Gamari at 2024-03-09T21:37:44-05:00 Merge branch 'ghc-9.10' into ghc-head - - - - - cec76981 by Ben Gamari at 2024-03-09T21:54:00-05:00 Bump GHC version to 9.11 - - - - - 4c59feb7 by Ben Gamari at 2024-03-09T22:15:01-05:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - dc207d06 by Ben Gamari at 2024-03-10T08:56:08-04:00 configure: Bump GHC version to 9.11 Bumps haddock submodule. - - - - - 8b2513e8 by Ben Gamari at 2024-03-11T01:20:03-04:00 rts/linker: Don't unload code when profiling is enabled The heap census may contain references (e.g. `Counter.identity`) to static data which must be available when the census is reported at the end of execution. Fixes #24512. - - - - - 7810b4c3 by Ben Gamari at 2024-03-11T01:20:03-04:00 rts/linker: Don't unload native objects when dlinfo isn't available To do so is unsafe as we have no way of identifying references to symbols provided by the object. Fixes #24513. Fixes #23993. - - - - - 0590764c by Ben Gamari at 2024-03-11T01:20:39-04:00 rel_eng/upload: Purge both $rel_name/ and $ver/ This is necessary for prereleases, where GHCup accesses the release via `$ver/` - - - - - b85a4631 by Brandon Chinn at 2024-03-12T19:25:56-04:00 Remove duplicate code normalising slashes - - - - - c91946f9 by Brandon Chinn at 2024-03-12T19:25:56-04:00 Simplify regexes with raw strings - - - - - 1a5f53c6 by Brandon Chinn at 2024-03-12T19:25:57-04:00 Don't normalize backslashes in characters - - - - - 7ea971d3 by Andrei Borzenkov at 2024-03-12T19:26:32-04:00 Fix compiler crash caused by implicit RHS quantification in type synonyms (#24470) - - - - - 39f3ac3e by Cheng Shao at 2024-03-12T19:27:11-04:00 Revert "compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms" This reverts commit 615eb855416ce536e02ed935ecc5a6f25519ae16. It was originally intended to fix #24449, but it was merely sweeping the bug under the rug. 3836a110577b5c9343915fd96c1b2c64217e0082 has properly fixed the fragile test, and we no longer need the C version of genSym. Furthermore, the C implementation causes trouble when compiling with clang that targets i386 due to alignment warning and libatomic linking issue, so it makes sense to revert it. - - - - - e6bfb85c by Cheng Shao at 2024-03-12T19:27:11-04:00 compiler: fix out-of-bound memory access of genSym on 32-bit This commit fixes an unnoticed out-of-bound memory access of genSym on 32-bit. ghc_unique_inc is 32-bit sized/aligned on 32-bit platforms, but we mistakenly treat it as a Word64 pointer in genSym, and therefore will accidentally load 2 garbage higher bytes, or with a small but non-zero chance, overwrite something else in the data section depends on how the linker places the data segments. This regression was introduced in !11802 and fixed here. - - - - - 77171cd1 by Ben Orchard at 2024-03-14T09:00:40-04:00 Note mutability of array and address access primops Without an understanding of immutable vs. mutable memory, the index primop family have a potentially non-intuitive type signature: indexOffAddr :: Addr# -> Int# -> a readOffAddr :: Addr# -> Int# -> State# d -> (# State# d, a #) indexOffAddr# might seem like a free generality improvement, which it certainly is not! This change adds a brief note on mutability expectations for most index/read/write access primops. - - - - - 7da7f8f6 by Alan Zimmerman at 2024-03-14T09:01:15-04:00 EPA: Fix regression discarding comments in contexts Closes #24533 - - - - - 73be65ab by Fendor at 2024-03-19T01:42:53-04:00 Fix sharing of 'IfaceTyConInfo' during core to iface type translation During heap analysis, we noticed that during generation of 'mi_extra_decls' we have lots of duplicates for the instances: * `IfaceTyConInfo NotPromoted IfaceNormalTyCon` * `IfaceTyConInfo IsPromoted IfaceNormalTyCon` which should be shared instead of duplicated. This duplication increased the number of live bytes by around 200MB while loading the agda codebase into GHCi. These instances are created during `CoreToIface` translation, in particular `toIfaceTyCon`. The generated core looks like: toIfaceTyCon = \ tc_sjJw -> case $wtoIfaceTyCon tc_sjJw of { (# ww_sjJz, ww1_sjNL, ww2_sjNM #) -> IfaceTyCon ww_sjJz (IfaceTyConInfo ww1_sjNL ww2_sjNM) } whichs removes causes the sharing to work propery. Adding explicit sharing, with NOINLINE annotations, changes the core to: toIfaceTyCon = \ tc_sjJq -> case $wtoIfaceTyCon tc_sjJq of { (# ww_sjNB, ww1_sjNC #) -> IfaceTyCon ww_sjNB ww1_sjNC } which looks much more like sharing is happening. We confirmed via ghc-debug that all duplications were eliminated and the number of live bytes are noticeably reduced. - - - - - bd8209eb by Alan Zimmerman at 2024-03-19T01:43:28-04:00 EPA: Address more 9.10.1-alpha1 regressions from recent changes Closes #24533 Hopefully for good this time - - - - - 31bf85ee by Fendor at 2024-03-19T14:48:08-04:00 Escape multiple arguments in the settings file Uses responseFile syntax. The issue arises when GHC is installed on windows into a location that has a space, for example the user name is 'Fake User'. The $topdir will also contain a space, consequentially. When we resolve the top dir in the string `-I$topdir/mingw/include`, then `words` will turn this single argument into `-I/C/Users/Fake` and `User/.../mingw/include` which trips up the flag argument parser of various tools such as gcc or clang. We avoid this by escaping the $topdir before replacing it in `initSettngs`. Additionally, we allow to escape spaces and quotation marks for arguments in `settings` file. Add regression test case to count the number of options after variable expansion and argument escaping took place. Additionally, we check that escaped spaces and double quotation marks are correctly parsed. - - - - - f45f700e by Matthew Pickering at 2024-03-19T14:48:44-04:00 Read global package database from settings file Before this patch, the global package database was always assumed to be in libdir </> package.conf.d. This causes issues in GHC's build system because there are sometimes situations where the package database you need to use is not located in the same place as the settings file. * The stage1 compiler needs to use stage1 libraries, so we should set "Global Package DB" for the stage1 compiler to the stage1 package database. * Stage 2 cross compilers need to use stage2 libraries, so likewise, we should set the package database path to `_build/stage2/lib/` * The normal situation is where the stage2 compiler uses stage1 libraries. Then everything lines up. * When installing we have rearranged everything so that the settings file and package database line up properly, so then everything should continue to work as before. In this case we set the relative package db path to `package.conf.d`, so it resolves the same as before. * ghc-pkg needs to be modified as well to look in the settings file fo the package database rather than assuming the global package database location relative to the lib folder. * Cabal/cabal-install will work correctly because they query the global package database using `--print-global-package-db`. A reasonable question is why not generate the "right" settings files in the right places in GHC's build system. In order to do this you would need to engineer wrappers for all executables to point to a specific libdir. There are also situations where the same package db is used by two different compilers with two different settings files (think stage2 cross compiler and stage3 compiler). In short, this 10 line patch allows for some reasonable simplifications in Hadrian at very little cost to anything else. Fixes #24502 - - - - - 4c8f1794 by Matthew Pickering at 2024-03-19T14:48:44-04:00 hadrian: Remove stage1 testsuite wrappers logic Now instead of producing wrappers which pass the global package database argument to ghc and ghc-pkg, we write the location of the correct package database into the settings file so you can just use the intree compiler directly. - - - - - da0d8ba5 by Matthew Craven at 2024-03-19T14:49:20-04:00 Remove unused ghc-internal module "GHC.Internal.Constants" - - - - - b56d2761 by Matthew Craven at 2024-03-19T14:49:20-04:00 CorePrep: Rework lowering of BigNat# literals Don't use bigNatFromWord#, because that's terrible: * We shouldn't have to traverse a linked list at run-time to build a BigNat# literal. That's just silly! * The static List object we have to create is much larger than the actual BigNat#'s contents, bloating code size. * We have to read the corresponding interface file, which causes un-tracked implicit dependencies. (#23942) Instead, encode them into the appropriate platform-dependent sequence of bytes, and generate code that copies these bytes at run-time from an Addr# literal into a new ByteArray#. A ByteArray# literal would be the correct thing to generate, but these are not yet supported; see also #17747. Somewhat surprisingly, this change results in a slight reduction in compiler allocations, averaging around 0.5% on ghc's compiler performance tests, including when compiling programs that contain no bignum literals to begin with. The specific cause of this has not been investigated. Since this lowering no longer reads the interface file for GHC.Num.BigNat, the reasoning in Note [Depend on GHC.Num.Integer] is obsoleted. But the story of un-tracked built-in dependencies remains complex, and Note [Tracking dependencies on primitives] now exists to explain this complexity. Additionally, many empty imports have been modified to refer to this new note and comply with its guidance. Several empty imports necessary for other reasons have also been given brief explanations. Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 349ea330 by Fendor at 2024-03-19T14:50:00-04:00 Eliminate thunk in 'IfaceTyCon' Heap analysis showed that `IfaceTyCon` retains a thunk to `IfaceTyConInfo`, defeating the sharing of the most common instances of `IfaceTyConInfo`. We make sure the indirection is removed by adding bang patterns to `IfaceTyCon`. Experimental results on the agda code base, where the `mi_extra_decls` were read from disk: Before this change, we observe around 8654045 instances of: `IfaceTyCon[Name,THUNK_1_0]` But these thunks almost exclusively point to a shared value! Forcing the thunk a little bit more, leads to `ghc-debug` reporting: `IfaceTyCon[Name:Name,IfaceTyConInfo]` and a noticeable reduction of live bytes (on agda ~10%). - - - - - 594bee0b by Krzysztof Gogolewski at 2024-03-19T14:50:36-04:00 Minor misc cleanups - GHC.HsToCore.Foreign.JavaScript: remove dropRuntimeRepArgs; boxed tuples don't take RuntimeRep args - GHC.HsToCore.Foreign.Call: avoid partial pattern matching - GHC.Stg.Unarise: strengthen the assertion; we can assert that non-rubbish literals are unary rather than just non-void - GHC.Tc.Gen.HsType: make sure the fsLit "literal" rule fires - users_guide/using-warnings.rst: remove -Wforall-identifier, now deprecated and does nothing - users_guide/using.rst: fix formatting - andy_cherry/test.T: remove expect_broken_for(23272...), 23272 is fixed The rest are simple cleanups. - - - - - cf55a54b by Ben Gamari at 2024-03-19T14:51:12-04:00 mk/relpath: Fix quoting Previously there were two instances in this script which lacked proper quoting. This resulted in `relpath` invocations in the binary distribution Makefile producing incorrect results on Windows, leading to confusing failures from `sed` and the production of empty package registrations. Fixes #24538. - - - - - 5ff88389 by Bryan Richter at 2024-03-19T14:51:48-04:00 testsuite: Disable T21336a on wasm - - - - - 60023351 by Ben Gamari at 2024-03-19T22:33:10-04:00 hadrian/bindist: Eliminate extraneous `dirname` invocation Previously we would call `dirname` twice per installed library file. We now instead reuse this result. This helps appreciably on Windows, where processes are quite expensive. - - - - - 616ac300 by Ben Gamari at 2024-03-19T22:33:10-04:00 hadrian: Package mingw toolchain in expected location This fixes #24525, a regression due to 41cbaf44a6ab5eb9fa676d65d32df8377898dc89. Specifically, GHC expects to find the mingw32 toolchain in the binary distribution root. However, after this patch it was packaged in the `lib/` directory. - - - - - de9daade by Ben Gamari at 2024-03-19T22:33:11-04:00 gitlab/rel_eng: More upload.sh tweaks - - - - - 1dfe12db by Ben Gamari at 2024-03-19T22:33:11-04:00 rel_eng: Drop dead prepare_docs codepath - - - - - dd2d748b by Ben Gamari at 2024-03-19T22:33:11-04:00 rel_env/recompress_all: unxz before recompressing Previously we would rather compress the xz *again*, before in addition compressing it with the desired scheme. Fixes #24545. - - - - - 9d936c57 by Ben Gamari at 2024-03-19T22:33:11-04:00 mk-ghcup-metadata: Fix directory of testsuite tarball As reported in #24546, the `dlTest` artifact should be extracted into the `testsuite` directory. - - - - - 6d398066 by Ben Gamari at 2024-03-19T22:33:11-04:00 ghcup-metadata: Don't populate dlOutput unless necessary ghcup can apparently infer the output name of an artifact from its URL. Consequently, we should only include the `dlOutput` field when it would differ from the filename of `dlUri`. Fixes #24547. - - - - - 576f8b7e by Zubin Duggal at 2024-03-19T22:33:46-04:00 Revert "Apply shellcheck suggestion to SUBST_TOOLDIR" This reverts commit c82770f57977a2b5add6e1378f234f8dd6153392. The shellcheck suggestion is spurious and results in SUBST_TOOLDIR being a no-op. `set` sets positional arguments for bash, but we want to set the variable given as the first autoconf argument. Fixes #24542 Metric decreases because the paths in the settings file are now shorter, so we allocate less when we read the settings file. ------------------------- Metric Decrease: T12425 T13035 T9198 ------------------------- - - - - - cdfe6e01 by Fendor at 2024-03-19T22:34:22-04:00 Compact serialisation of IfaceAppArgs In #24563, we identified that IfaceAppArgs serialisation tags each cons cell element with a discriminator byte. These bytes add up quickly, blowing up interface files considerably when '-fwrite-if-simplified-core' is enabled. We compact the serialisation by writing out the length of 'IfaceAppArgs', followed by serialising the elements directly without any discriminator byte. This improvement can decrease the size of some interface files by up to 35%. - - - - - 97a2bb1c by Simon Peyton Jones at 2024-03-20T17:11:29+00:00 Expand untyped splices in tcPolyExprCheck Fixes #24559 - - - - - 5f275176 by Alan Zimmerman at 2024-03-20T22:44:12-04:00 EPA: Clean up Exactprint helper functions a bit - Introduce a helper lens to compose on `EpAnn a` vs `a` versions - Rename some prime versions of functions back to non-prime They were renamed during the rework - - - - - da2a10ce by Vladislav Zavialov at 2024-03-20T22:44:48-04:00 Type operators in promoteOccName (#24570) Type operators differ from term operators in that they are lexically classified as (type) constructors, not as (type) variables. Prior to this change, promoteOccName did not account for this difference, causing a scoping issue that affected RequiredTypeArguments. type (!@#) = Bool f = idee (!@#) -- Not in scope: ‘!@#’ (BUG) Now we have a special case in promoteOccName to account for this. - - - - - 247fc0fa by Preetham Gujjula at 2024-03-21T10:19:18-04:00 docs: Remove mention of non-existent Ord instance for Complex The documentation for Data.Complex says that the Ord instance for Complex Float is deficient, but there is no Ord instance for Complex a. The Eq instance for Complex Float is similarly deficient, so we use that as an example instead. - - - - - 6fafc51e by Andrei Borzenkov at 2024-03-21T10:19:54-04:00 Fix TH handling in `pat_to_type_pat` function (#24571) There was missing case for `SplicePat` in `pat_to_type_at` function, hence patterns with splicing that checked against `forall->` doesn't work properly because they fall into the "illegal pattern" case. Code example that is now accepted: g :: forall a -> () g $([p| a |]) = () - - - - - 52072f8e by Sylvain Henry at 2024-03-21T21:01:59-04:00 Type-check default declarations before deriving clauses (#24566) See added Note and #24566. Default declarations must be type-checked before deriving clauses. - - - - - 7dfdf3d9 by Sylvain Henry at 2024-03-21T21:02:40-04:00 Lexer: small perf changes - Use unsafeChr because we know our values to be valid - Remove some unnecessary use of `ord` (return Word8 values directly) - - - - - 864922ef by Sylvain Henry at 2024-03-21T21:02:40-04:00 JS: fix some comments - - - - - 3e0b2b1f by Sebastian Graf at 2024-03-21T21:03:16-04:00 Simplifier: Re-do dependency analysis in abstractFloats (#24551) In #24551, we abstracted a string literal binding over a type variable, triggering a CoreLint error when that binding floated to top-level. The solution implemented in this patch fixes this by re-doing dependency analysis on a simplified recursive let binding that is about to be type abstracted, in order to find the minimal set of type variables to abstract over. See wrinkle (AB5) of Note [Floating and type abstraction] for more details. Fixes #24551 - - - - - 8a8ac65a by Matthew Craven at 2024-03-23T00:20:52-04:00 Improve toInteger @Word32 on 64-bit platforms On 64-bit platforms, every Word32 fits in an Int, so we can convert to Int# without having to perform the overflow check integerFromWord# uses internally. - - - - - 0c48f2b9 by Apoorv Ingle at 2024-03-23T00:21:28-04:00 Fix for #24552 (see testcase T24552) Fixes for a bug in desugaring pattern synonyms matches, introduced while working on on expanding `do`-blocks in #18324 The `matchWrapper` unecessarily (and incorrectly) filtered out the default wild patterns in a match. Now the wild pattern alternative is simply ignored by the pm check as its origin is `Generated`. The current code now matches the expected semantics according to the language spec. - - - - - b72705e9 by Simon Peyton Jones at 2024-03-23T00:22:04-04:00 Print more info about kinds in error messages This fixes #24553, where GHC unhelpfully said error: [GHC-83865] • Expected kind ‘* -> * -> *’, but ‘Foo’ has kind ‘* -> * -> *’ See Note [Showing invisible bits of types in error messages] - - - - - 8f7cfc7e by Tristan Cacqueray at 2024-03-23T00:22:44-04:00 docs: remove the don't use float hint This hint is outdated, ``Complex Float`` are now specialised, and the heap space suggestion needs more nuance so it should be explained in the unboxed/storable array documentation. - - - - - 5bd8ed53 by Andreas Klebinger at 2024-03-23T16:18:33-04:00 NCG: Fix a bug in jump shortcutting. When checking if a jump has more than one destination account for the possibility of some jumps not being representable by a BlockId. We do so by having isJumpishInstr return a `Maybe BlockId` where Nothing represents non-BlockId jump destinations. Fixes #24507 - - - - - 8d67f247 by Ben Gamari at 2024-03-23T16:19:09-04:00 docs: Drop old release notes, add for 9.12.1 - - - - - 7db8c992 by Cheng Shao at 2024-03-25T13:45:46-04:00 rts: fix clang compilation on aarch64 This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h which causes "error: address argument to atomic operation must be a pointer to _Atomic type" when compiling with clang on aarch64. - - - - - 237194ce by Sylvain Henry at 2024-03-25T13:46:27-04:00 Lexer: fix imports for Alex 3.5.1 (#24583) - - - - - 810660b7 by Cheng Shao at 2024-03-25T22:19:16-04:00 libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6 This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which includes numerous upstream libffi fixes, especially https://github.com/libffi/libffi/issues/760. - - - - - d2ba41e8 by Alan Zimmerman at 2024-03-25T22:19:51-04:00 EPA: do not duplicate comments in signature RHS - - - - - 32a8103f by Rodrigo Mesquita at 2024-03-26T21:16:12-04:00 configure: Use LDFLAGS when trying linkers A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to check for a working linker. If either of these fail, we try the next in line. However, we were not considering the `$LDFLAGS` when checking if these linkers worked. So we would pick a linker that does not support the current $LDFLAGS and fail further down the line when we used that linker with those flags. Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not supported by `ld.gold` but that was being picked still. - - - - - bf65a7c3 by Rodrigo Mesquita at 2024-03-26T21:16:48-04:00 bindist: Clean xattrs of bin and lib at configure time For issue #21506, we started cleaning the extended attributes of binaries and libraries from the bindist *after* they were installed to workaround notarisation (#17418), as part of `make install`. However, the `ghc-toolchain` binary that is now shipped with the bindist must be run at `./configure` time. Since we only cleaned the xattributes of the binaries and libs after they were installed, in some situations users would be unable to run `ghc-toolchain` from the bindist, failing at configure time (#24554). In this commit we move the xattr cleaning logic to the configure script. Fixes #24554 - - - - - cfeb70d3 by Rodrigo Mesquita at 2024-03-26T21:17:24-04:00 Revert "NCG: Fix a bug in jump shortcutting." This reverts commit 5bd8ed53dcefe10b72acb5729789e19ceb22df66. Fixes #24586 - - - - - 13223f6d by Serge S. Gulin at 2024-03-27T07:28:51-04:00 JS: `h$rts_isProfiled` is removed from `profiling` and left its version at `rts/js/config.js` - - - - - 0acfe391 by Alan Zimmerman at 2024-03-27T07:29:27-04:00 EPA: Do not extend declaration range for trailine zero len semi The lexer inserts virtual semicolons having zero width. Do not use them to extend the list span of items in a list. - - - - - cd0fb82f by Alan Zimmerman at 2024-03-27T19:33:08+00:00 EPA: Fix FamDecl range The span was incorrect if opt_datafam_kind_sig was empty - - - - - f8f384a8 by Ben Gamari at 2024-03-29T01:23:03-04:00 Fix type of _get_osfhandle foreign import Fixes #24601. - - - - - 00d3ecf0 by Alan Zimmerman at 2024-03-29T12:19:10+00:00 EPA: Extend StringLiteral range to include trailing commas This goes slightly against the exact printing philosophy where trailing decorations should be in an annotation, but the practicalities of adding it to the WarningTxt environment, and the problems caused by deviating do not make a more principles approach worthwhile. - - - - - efab3649 by brandon s allbery kf8nh at 2024-03-31T20:04:01-04:00 clarify Note [Preproccesing invocations] - - - - - c8a4c050 by Ben Gamari at 2024-04-02T12:50:35-04:00 rts: Fix TSAN_ENABLED CPP guard This should be `#if defined(TSAN_ENABLED)`, not `#if TSAN_ENABLED`, lest we suffer warnings. - - - - - e91dad93 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix errors when compiling with TSAN This commit fixes rts compilation errors when compiling with TSAN: - xxx_FENCE macros are redefined and trigger CPP warnings. - Use SIZEOF_W. WORD_SIZE_IN_BITS is provided by MachDeps.h which Cmm.h doesn't include by default. - - - - - a9ab9455 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix clang-specific errors when compiling with TSAN This commit fixes clang-specific rts compilation errors when compiling with TSAN: - clang doesn't have -Wtsan flag - Fix prototype of ghc_tsan_* helper functions - __tsan_atomic_* functions aren't clang built-ins and sanitizer/tsan_interface_atomic.h needs to be included - On macOS, TSAN runtime library is libclang_rt.tsan_osx_dynamic.dylib, not libtsan. -fsanitize-thread as a link-time flag will take care of linking the TSAN runtime library anyway so remove tsan as an rts extra library - - - - - 865bd717 by Cheng Shao at 2024-04-02T12:50:35-04:00 compiler: fix github link to __tsan_memory_order in a comment - - - - - 07cb627c by Cheng Shao at 2024-04-02T12:50:35-04:00 ci: improve TSAN CI jobs - Run TSAN jobs with +thread_sanitizer_cmm which enables Cmm instrumentation as well. - Run TSAN jobs in deb12 which ships gcc-12, a reasonably recent gcc that @bgamari confirms he's using in #GHC:matrix.org. Ideally we should be using latest clang release for latest improvements in sanitizers, though that's left as future work. - Mark TSAN jobs as manual+allow_failure in validate pipelines. The purpose is to demonstrate that we have indeed at least fixed building of TSAN mode in CI without blocking the patch to land, and once merged other people can begin playing with TSAN using their own dev setups and feature branches. - - - - - a1c18c7b by Andrei Borzenkov at 2024-04-02T12:51:11-04:00 Merge tc_infer_hs_type and tc_hs_type into one function using ExpType philosophy (#24299, #23639) This patch implements refactoring which is a prerequisite to updating kind checking of type patterns. This is a huge simplification of the main worker that checks kind of HsType. It also fixes the issues caused by previous code duplication, e.g. that we didn't add module finalizers from splices in inference mode. - - - - - 817e8936 by Rodrigo Mesquita at 2024-04-02T20:13:05-04:00 th: Hide the Language.Haskell.TH.Lib.Internal module from haddock Fixes #24562 - - - - - b36ee57b by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: reenable h$appendToHsString optimization (#24495) The optimization introducing h$appendToHsString wasn't kicking in anymore (while it did in 9.8.1) because of the changes introduced in #23270 (7e0c8b3bab30). This patch reenables the optimization by matching on case-expression, as done in Cmm for unpackCString# standard thunks. The test is also T24495 added in the next commits (two commits for ease of backporting to 9.8). - - - - - 527616e9 by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: fix h$appendToHsString implementation (#24495) h$appendToHsString needs to wrap its argument in an updatable thunk to behave like unpackAppendCString#. Otherwise if a SingleEntry thunk is passed, it is stored as-is in a CONS cell, making the resulting list impossible to deepseq (forcing the thunk doesn't update the contents of the CONS cell)! The added test checks that the optimization kicks in and that h$appendToHsString works as intended. Fix #24495 - - - - - faa30b41 by Simon Peyton Jones at 2024-04-02T20:14:22-04:00 Deal with duplicate tyvars in type declarations GHC was outright crashing before this fix: #24604 - - - - - e0b0c717 by Simon Peyton Jones at 2024-04-02T20:14:58-04:00 Try using MCoercion in exprIsConApp_maybe This is just a simple refactor that makes exprIsConApp_maybe a little bit more direct, simple, and efficient. Metrics: compile_time/bytes allocated geo. mean -0.1% minimum -2.0% maximum -0.0% Not a big gain, but worthwhile given that the code is, if anything, easier to grok. - - - - - 15f4d867 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Initial ./configure support for selecting I/O managers In this patch we just define new CPP vars, but don't yet use them or replace the existing approach. That will follow. The intention here is that every I/O manager can be enabled/disabled at GHC build time (subject to some constraints). More than one I/O manager can be enabled to be built. At least one I/O manager supporting the non-threaded RTS must be enabled as well as at least one supporting the non-threaded RTS. The I/O managers enabled here will become the choices available at runtime at RTS startup (in later patches). The choice can be made with RTS flags. There are separate sets of choices for the threaded and non-threaded RTS ways, because most I/O managers are specific to these ways. Furthermore we must establish a default I/O manager for the threaded and non-threaded RTS. Most I/O managers are platform-specific so there are checks to ensure each one can be enabled on the platform. Such checks are also where (in future) any system dependencies (e.g. libraries) can be checked. The output is a set of CPP flags (in the mk/config.h file), with one flag per named I/O manager: * IOMGR_BUILD_<name> : which ones should be built (some) * IOMGR_DEFAULT_NON_THREADED_<name> : which one is default (exactly one) * IOMGR_DEFAULT_THREADED_<name> : which one is default (exactly one) and a set of derived flags in IOManager.h * IOMGR_ENABLED_<name> : enabled for the current RTS way Note that IOMGR_BUILD_<name> just says that an I/O manager will be built for _some_ RTS way (i.e. threaded or non-threaded). The derived flags IOMGR_ENABLED_<name> in IOManager.h say if each I/O manager is enabled in the "current" RTS way. These are the ones that can be used for conditional compilation of the I/O manager code. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - 85b0f87a by Duncan Coutts at 2024-04-03T01:27:17-04:00 Change the handling of the RTS flag --io-manager= Now instead of it being just used on Windows to select between the WinIO vs the MIO or Win32-legacy I/O managers, it is now used on all platforms for selecting the I/O manager to use. Right now it remains the case that there is only an actual choice on Windows, but that will change later. Document the --io-manager flag in the user guide. This change is also reflected in the RTS flags types in the base library. Deprecate the export of IoSubSystem from GHC.RTS.Flags with a message to import it from GHC.IO.Subsystem. The way the 'IoSubSystem' is detected also changes. Instead of looking at the RTS flag, there is now a C bool global var in the RTS which gets set on startup when the I/O manager is selected. This bool var says whether the selected I/O manager classifies as "native" on Windows, which in practice means the WinIO I/O manager has been selected. Similarly, the is_io_mng_native_p RTS helper function is re-implemented in terms of the selected I/O manager, rather than based on the RTS flags. We do however remove the ./configure --native-io-manager flag because we're bringing the WinIO/MIO/Win32-legacy choice under the new general scheme for selecting I/O managers, and that new scheme involves no ./configure time user choices, just runtime RTS flag choices. - - - - - 1a8f020f by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert {init,stop,exit}IOManager to switch style Rather than ad-hoc cpp conitionals on THREADED_RTS and mingw32_HOST_OS, we use a style where we switch on the I/O manager impl, with cases for each I/O manager impl. - - - - - a5bad3d2 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Split up the CapIOManager content by I/O manager Using the new IOMGR_ENABLED_<name> CPP defines. - - - - - 1d36e609 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert initIOManagerAfterFork and wakeupIOManager to switch style - - - - - c2f26f36 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of waitRead#/Write# from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. - - - - - 457705a8 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of the delay# impl from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. Uses a new IOManager API: syncDelay, following the naming convention of sync* for thread-synchronous I/O & timer/delay operations. As part of porting from cmm to C, we maintain the rule that the why_blocked gets accessed using load acquire and store release atomic memory operations. There was one exception to this rule: in the delay# primop cmm code on posix (not win32), the why_blocked was being updated using a store relaxed, not a store release. I've no idea why. In this convesion I'm playing it safe here and using store release consistently. - - - - - e93058e0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 insertIntoSleepingQueue is no longer public No longer defined in IOManager.h, just a private function in IOManager.c. Since it is no longer called from cmm code, just from syncDelay. It ought to get moved further into the select() I/O manager impl, rather than living in IOManager.c. On the other hand appendToIOBlockedQueue is still called from cmm code in the win32-legacy I/O manager primops async{Read,Write}#, and it is also used by the select() I/O manager. Update the CPP and comments to reflect this. - - - - - 60ce9910 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move anyPendingTimeoutsOrIO impl from .h to .c The implementation is eventually going to need to use more private things, which will drag in unwanted includes into IOManager.h, so it's better to move the impl out of the header file and into the .c file, at the slight cost of it no longer being inline. At the same time, change to the "switch (iomgr_type)" style. - - - - - f70b8108 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Take a simpler approach to gcc warnings in IOManager.c We have lots of functions with conditional implementations for different I/O managers. Some functions, for some I/O managers, naturally have implementations that do nothing or barf. When only one such I/O manager is enabled then the whole function implementation will have an implementation that does nothing or barfs. This then results in warnings from gcc that parameters are unused, or that the function should be marked with attribute noreturn (since barf does not return). The USED_IF_THREADS trick for fine-grained warning supression is fine for just two cases, but an equivalent here would need USED_IF_THE_ONLY_ENABLED_IOMGR_IS_X_OR_Y which would have combinitorial blowup. So we take a coarse grained approach and simply disable these two warnings for the whole file. So we use a GCC pragma, with its handy push/pop support: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" #pragma GCC diagnostic ignored "-Wunused-parameter" ... #pragma GCC diagnostic pop - - - - - b48805b9 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add a new trace class for the iomanager It makes sense now for it to be separate from the scheduler class of tracers. Enabled with +RTS -Do. Document the -Do debug flag in the user guide. - - - - - f0c1f862 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Have the throwTo impl go via (new) IOManager APIs rather than directly operating on the IO manager's data structures. Specifically, when thowing an async exception to a thread that is blocked waiting for I/O or waiting for a timer, then we want to cancel that I/O waiting or cancel the timer. Currently this is done directly in removeFromQueues() in RaiseAsync.c. We want it to go via proper APIs both for modularity but also to let us support multiple I/O managers. So add sync{IO,Delay}Cancel, which is the cancellation for the corresponding sync{IO,Delay}. The implementations of these use the usual "switch (iomgr_type)" style. - - - - - 4f9e9c4e by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move awaitEvent into a proper IOManager API and have the scheduler use it. Previously the scheduler calls awaitEvent directly, and awaitEvent is implemented directly in the RTS I/O managers (select, win32). This relies on the old scheme where there's a single active I/O manager for each platform and RTS way. We want to move that to go via an API in IOManager.{h,c} which can then call out to the active I/O manager. Also take the opportunity to split awaitEvent into two. The existing awaitEvent has a bool wait parameter, to say if the call should be blocking or non-blocking. We split this into two separate functions: pollCompletedTimeoutsOrIO and awaitCompletedTimeoutsOrIO. We split them for a few reasons: they have different post-conditions (specifically the await version is supposed to guarantee that there are threads runnable when it completes). Secondly, it is also anticipated that in future I/O managers the implementations of the two cases will be simpler if they are separated. - - - - - 5ad4b30f by Duncan Coutts at 2024-04-03T01:27:18-04:00 Rename awaitEvent in select and win32 I/O managers These are now just called from IOManager.c and are the per-I/O manager backend impls (whereas previously awaitEvent was the entry point). Follow the new naming convention in the IOManager.{h,c} of awaitCompletedTimeoutsOrIO, with the I/O manager's name as a suffix: so awaitCompletedTimeoutsOrIO{Select,Win32}. - - - - - d30c6bc6 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Tidy up a couple things in Select.{h,c} Use the standard #include {Begin,End}Private.h style rather than RTS_PRIVATE on individual decls. And conditionally build the code for the select I/O manager based on the new CPP IOMGR_ENABLED_SELECT rather than on THREADED_RTS. - - - - - 4161f516 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add an IOManager API for scavenging TSO blocked_info When the GC scavenges a TSO it needs to scavenge the tso->blocked_info but the blocked_info is a big union and what lives there depends on the two->why_blocked, which for I/O-related reasons is something that in principle is the responsibility of the I/O manager and not the GC. So the right thing to do is for the GC to ask the I/O manager to sscavenge the blocked_info if it encounters any I/O-related why_blocked reasons. So we add scavengeTSOIOManager in IOManager.{h,c} with the usual style. Now as it happens, right now, there is no special scavenging to do, so the implementation of scavengeTSOIOManager is a fancy no-op. That's because the select I/O manager uses only the fd and target members, which are not GC pointers, and the win32-legacy I/O manager _ought_ to be using GC-managed heap objects for the StgAsyncIOResult but it is actually usingthe C heap, so again no GC pointers. If the win32-legacy were doing this more sensibly, then scavengeTSOIOManager would be the right place to do the GC magic. Future I/O managers will need GC heap objects in the tso->blocked_info and will make use of this functionality. - - - - - 94a87d21 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add I/O manager API notifyIOManagerCapabilitiesChanged Used in setNumCapabilities. It only does anything for MIO on Posix. Previously it always invoked Haskell code, but that code only did anything on non-Windows (and non-JS), and only threaded. That currently effectively means the MIO I/O manager on Posix. So now it only invokes it for the MIO Posix case. - - - - - 3be6d591 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Select an I/O manager early in RTS startup We need to select the I/O manager to use during startup before the per-cap I/O manager initialisation. - - - - - aaa294d0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Make struct CapIOManager be fully opaque Provide an opaque (forward) definition in Capability.h (since the cap contains a *CapIOManager) and then only provide a full definition in a new file IOManagerInternals.h. This new file is only supposed to be included by the IOManager implementation, not by its users. So that means IOManager.c and individual I/O manager implementations. The posix/Signals.c still needs direct access, but that should be eliminated. Anything that needs direct access either needs to be clearly part of an I/O manager (e.g. the sleect() one) or go via a proper API. - - - - - 877a2a80 by Duncan Coutts at 2024-04-03T01:27:18-04:00 The select() I/O manager does have some global initialisation It's just to make sure an exception CAF is a GC root. - - - - - 9c51473b by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add tracing for the main I/O manager actions Using the new tracer class. Note: The unconditional definition of showIOManager should be compatible with the debugTrace change in 7c7d1f6. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - c7d3e3a3 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Include the default I/O manager in the +RTS --info output Document the extra +RTS --info output in the user guide - - - - - 8023bad4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 waitRead# / waitWrite# do not work for win32-legacy I/O manager Previously it was unclear that they did not work because the code path was shared with other I/O managers (in particular select()). Following the code carefully shows that what actually happens is that the calling thread would block forever: the thread will be put into the blocked queue, but no other action is scheduled that will ever result in it getting unblocked. It's better to just fail loudly in case anyone accidentally calls it, also it's less confusing code. - - - - - 83a74d20 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Conditionally ignore some GCC warnings Some GCC versions don't know about some warnings, and they complain that we're ignoring unknown warnings. So we try to ignore the warning based on the GCC version. - - - - - 1adc6fa4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept changes to base-exports All the changes are in fact not changes at all. Previously, the IoSubSystem data type was defined in GHC.RTS.Flags and exported from both GHC.RTS.Flags and GHC.IO.SubSystem. Now, the data type is defined in GHC.IO.SubSystem and still exported from both modules. Therefore, the same exports and same instances are still available from both modules. But the base-exports records only the defining module, and so it looks like a change when it is fully compatible. Related: we do add a deprecation to the export of the type via GHC.RTS.Flags, telling people to use the export from GHC.IO.SubSystem. Also the sort order for some unrelated Show instances changed. No idea why. The same changes apply in the other versions, with a few more changes due to sort order weirdness. - - - - - 8d950968 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept metric decrease in T12227 I can't think of any good reason that anything in this MR should have changed the number of allocations, up or down. (Yes this is an empty commit.) Metric Decrease: T12227 - - - - - e869605e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Several improvements to the handling of coercions * Make `mkSymCo` and `mkInstCo` smarter Fixes #23642 * Fix return role of `SelCo` in the coercion optimiser. Fixes #23617 * Make the coercion optimiser `opt_trans_rule` work better for newtypes Fixes #23619 - - - - - 1efd0714 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 FloatOut: improve floating for join point See the new Note [Floating join point bindings]. * Completely get rid of the complicated join_ceiling nonsense, which I have never understood. * Do not float join points at all, except perhaps to top level. * Some refactoring around wantToFloat, to treat Rec and NonRec more uniformly - - - - - 9c00154d by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve eta-expansion through call stacks See Note [Eta expanding through CallStacks] in GHC.Core.Opt.Arity This is a one-line change, that fixes an inconsistency - || isCallStackPredTy ty + || isCallStackPredTy ty || isCallStackTy ty - - - - - 95a9a172 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Spelling, layout, pretty-printing only - - - - - bdf1660f by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve exprIsConApp_maybe a little Eliminate a redundant case at birth. This sometimes reduces Simplifier iterations. See Note [Case elim in exprIsConApp_maybe]. - - - - - 609cd32c by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Inline GHC.HsToCore.Pmc.Solver.Types.trvVarInfo When exploring compile-time regressions after meddling with the Simplifier, I discovered that GHC.HsToCore.Pmc.Solver.Types.trvVarInfo was very delicately balanced. It's a small, heavily used, overloaded function and it's important that it inlines. By a fluke it was before, but at various times in my journey it stopped doing so. So I just added an INLINE pragma to it; no sense in depending on a delicately-balanced fluke. - - - - - ae24c9bc by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Slight improvement in WorkWrap Ensure that WorkWrap preserves lambda binders, in case of join points. Sadly I have forgotten why I made this change (it was while I was doing a lot of meddling in the Simplifier, but * it does no harm, * it is slightly more efficient, and * presumably it made something better! Anyway I have kept it in a separate commit. - - - - - e9297181 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Use named record fields for the CastIt { ... } data constructor This is a pure refactor - - - - - b4581e23 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Remove a long-commented-out line Pure refactoring - - - - - e026bdf2 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Simplifier improvements This MR started as: allow the simplifer to do more in one pass, arising from places I could see the simplifier taking two iterations where one would do. But it turned into a larger project, because these changes unexpectedly made inlining blow up, especially join points in deeply-nested cases. The main changes are below. There are also many new or rewritten Notes. Avoiding simplifying repeatedly ~~~~~~~~~~~~~~~ See Note [Avoiding simplifying repeatedly] * The SimplEnv now has a seInlineDepth field, which says how deep in unfoldings we are. See Note [Inline depth] in Simplify.Env. Currently used only for the next point: avoiding repeatedly simplifying coercions. * Avoid repeatedly simplifying coercions. see Note [Avoid re-simplifying coercions] in Simplify.Iteration As you'll see from the Note, this makes use of the seInlineDepth. * Allow Simplify.Iteration.simplAuxBind to inline used-once things. This is another part of Note [Post-inline for single-use things], and is really good for reducing simplifier iterations in situations like case K e of { K x -> blah } wher x is used once in blah. * Make GHC.Core.SimpleOpt.exprIsConApp_maybe do some simple case elimination. Note [Case elim in exprIsConApp_maybe] * Improve the case-merge transformation: - Move the main code to `GHC.Core.Utils.mergeCaseAlts`, to join `filterAlts` and friends. See Note [Merge Nested Cases] in GHC.Core.Utils. - Add a new case for `tagToEnum#`; see wrinkle (MC3). - Add a new case to look through join points: see wrinkle (MC4) postInlineUnconditionally ~~~~~~~~~~~~~~~~~~~~~~~~~ * Allow Simplify.Utils.postInlineUnconditionally to inline variables that are used exactly once. See Note [Post-inline for single-use things]. * Do not postInlineUnconditionally join point, ever. Doing so does not reduce allocation, which is the main point, and with join points that are used a lot it can bloat code. See point (1) of Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration. * Do not postInlineUnconditionally a strict (demanded) binding. It will not allocate a thunk (it'll turn into a case instead) so again the main point of inlining it doesn't hold. Better to check per-call-site. * Improve occurrence analyis for bottoming function calls, to help postInlineUnconditionally. See Note [Bottoming function calls] in GHC.Core.Opt.OccurAnal Inlining generally ~~~~~~~~~~~~~~~~~~ * In GHC.Core.Opt.Simplify.Utils.interestingCallContext, use RhsCtxt NonRecursive (not BoringCtxt) for a plain-seq case. See Note [Seq is boring] Also, wrinkle (SB1), inline in that `seq` context only for INLINE functions (UnfWhen guidance). * In GHC.Core.Opt.Simplify.Utils.interestingArg, - return ValueArg for OtherCon [c1,c2, ...], but - return NonTrivArg for OtherCon [] This makes a function a little less likely to inline if all we know is that the argument is evaluated, but nothing else. * isConLikeUnfolding is no longer true for OtherCon {}. This propagates to exprIsConLike. Con-like-ness has /positive/ information. Join points ~~~~~~~~~~~ * Be very careful about inlining join points. See these two long Notes Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline * When making join points, don't do so if the join point is so small it will immediately be inlined; check uncondInlineJoin. * In GHC.Core.Opt.Simplify.Inline.tryUnfolding, improve the inlining heuristics for join points. In general we /do not/ want to inline join points /even if they are small/. See Note [Duplicating join points] GHC.Core.Opt.Simplify.Iteration. But sometimes we do: see Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline; and the new `isBetterUnfoldingThan` function. * Do not add an unfolding to a join point at birth. This is a tricky one and has a long Note [Do not add unfoldings to join points at birth] It shows up in two places - In `mkDupableAlt` do not add an inlining - (trickier) In `simplLetUnfolding` don't add an unfolding for a fresh join point I am not fully satisifed with this, but it works and is well documented. * In GHC.Core.Unfold.sizeExpr, make jumps small, so that we don't penalise having a non-inlined join point. Performance changes ~~~~~~~~~~~~~~~~~~~ * Binary sizes fall by around 2.6%, according to nofib. * Compile times improve slightly. Here are the figures over 1%. I investiate the biggest differnce in T18304. It's a very small module, just a few hundred nodes. The large percentage difffence is due to a single function that didn't quite inline before, and does now, making code size a bit bigger. I decided gains outweighed the losses. Metrics: compile_time/bytes allocated (changes over +/- 1%) ------------------------------------------------ CoOpt_Singletons(normal) -9.2% GOOD LargeRecord(normal) -23.5% GOOD MultiComponentModulesRecomp(normal) +1.2% MultiLayerModulesTH_OneShot(normal) +4.1% BAD PmSeriesS(normal) -3.8% PmSeriesV(normal) -1.5% T11195(normal) -1.3% T12227(normal) -20.4% GOOD T12545(normal) -3.2% T12707(normal) -2.1% GOOD T13253(normal) -1.2% T13253-spj(normal) +8.1% BAD T13386(normal) -3.1% GOOD T14766(normal) -2.6% GOOD T15164(normal) -1.4% T15304(normal) +1.2% T15630(normal) -8.2% T15630a(normal) NEW T15703(normal) -14.7% GOOD T16577(normal) -2.3% GOOD T17516(normal) -39.7% GOOD T18140(normal) +1.2% T18223(normal) -17.1% GOOD T18282(normal) -5.0% GOOD T18304(normal) +10.8% BAD T18923(normal) -2.9% GOOD T1969(normal) +1.0% T19695(normal) -1.5% T20049(normal) -12.7% GOOD T21839c(normal) -4.1% GOOD T3064(normal) -1.5% T3294(normal) +1.2% BAD T4801(normal) +1.2% T5030(normal) -15.2% GOOD T5321Fun(normal) -2.2% GOOD T6048(optasm) -16.8% GOOD T783(normal) -1.2% T8095(normal) -6.0% GOOD T9630(normal) -4.7% GOOD T9961(normal) +1.9% BAD WWRec(normal) -1.4% info_table_map_perf(normal) -1.3% parsing001(normal) +1.5% geo. mean -2.0% minimum -39.7% maximum +10.8% * Runtimes generally improve. In the testsuite perf/should_run gives: Metrics: runtime/bytes allocated ------------------------------------------ Conversions(normal) -0.3% T13536a(optasm) -41.7% GOOD T4830(normal) -0.1% haddock.Cabal(normal) -0.1% haddock.base(normal) -0.1% haddock.compiler(normal) -0.1% geo. mean -0.8% minimum -41.7% maximum +0.0% * For runtime, nofib is a better test. The news is mostly good. Here are the number more than +/- 0.1%: # bytes allocated ==========================++========== imaginary/digits-of-e1 || -14.40% imaginary/digits-of-e2 || -4.41% imaginary/paraffins || -0.17% imaginary/rfib || -0.15% imaginary/wheel-sieve2 || -0.10% real/compress || -0.47% real/fluid || -0.10% real/fulsom || +0.14% real/gamteb || -1.47% real/gg || -0.20% real/infer || +0.24% real/pic || -0.23% real/prolog || -0.36% real/scs || -0.46% real/smallpt || +4.03% shootout/k-nucleotide || -20.23% shootout/n-body || -0.42% shootout/spectral-norm || -0.13% spectral/boyer2 || -3.80% spectral/constraints || -0.27% spectral/hartel/ida || -0.82% spectral/mate || -20.34% spectral/para || +0.46% spectral/rewrite || +1.30% spectral/sphere || -0.14% ==========================++========== geom mean || -0.59% real/smallpt has a huge nest of local definitions, and I could not pin down a reason for a regression. But there are three big wins! Metric Decrease: CoOpt_Singletons LargeRecord T12227 T12707 T13386 T13536a T14766 T15703 T16577 T17516 T18223 T18282 T18923 T21839c T20049 T5321Fun T5030 T6048 T8095 T9630 T783 Metric Increase: MultiLayerModulesTH_OneShot T13253-spj T18304 T18698a T9961 T3294 - - - - - 27db3c5e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Testsuite message changes from simplifier improvements - - - - - 271a7812 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Account for bottoming functions in OccurAnal This fixes #24582, a small but long-standing bug - - - - - 0fde229f by Ben Gamari at 2024-04-04T07:04:58-04:00 testsuite: Introduce template-haskell-exports test - - - - - 0c4a9686 by Luite Stegeman at 2024-04-04T07:05:39-04:00 Update correct counter in bumpTickyAllocd - - - - - 5f085d3a by Fendor at 2024-04-04T14:47:33-04:00 Replace `SizedSeq` with `FlatBag` for flattened structure LinkedLists are notoriously memory ineffiecient when all we do is traversing a structure. As 'UnlinkedBCO' has been identified as a data structure that impacts the overall memory usage of GHCi sessions, we avoid linked lists and prefer flattened structure for storing. We introduce a new memory efficient representation of sequential elements that has special support for the cases: * Empty * Singleton * Tuple Elements This improves sharing in the 'Empty' case and avoids the overhead of 'Array' until its constant overhead is justified. - - - - - 82cfe10c by Fendor at 2024-04-04T14:47:33-04:00 Compact FlatBag array representation `Array` contains three additional `Word`'s we do not need in `FlatBag`. Move `FlatBag` to `SmallArray`. Expand the API of SmallArray by `sizeofSmallArray` and add common traversal functions, such as `mapSmallArray` and `foldMapSmallArray`. Additionally, allow users to force the elements of a `SmallArray` via `rnfSmallArray`. - - - - - 36a75b80 by Andrei Borzenkov at 2024-04-04T14:48:10-04:00 Change how invisible patterns represented in haskell syntax and TH AST (#24557) Before this patch: data ArgPat p = InvisPat (LHsType p) | VisPat (LPat p) With this patch: data Pat p = ... | InvisPat (LHsType p) ... And the same transformation in the TH land. The rest of the changes is just updating code to handle new AST and writing tests to check if it is possible to create invalid states using TH. Metric Increase: MultiLayerModulesTH_OneShot - - - - - 28009fbc by Matthew Pickering at 2024-04-04T14:48:46-04:00 Fix off by one error in seekBinNoExpand and seekBin - - - - - 9b9e031b by Ben Gamari at 2024-04-04T21:30:08-04:00 compiler: Allow more types in GHCForeignImportPrim For many, many years `GHCForeignImportPrim` has suffered from the rather restrictive limitation of not allowing any non-trivial types in arguments or results. This limitation was justified by the code generator allegely barfing in the presence of such types. However, this restriction appears to originate well before the NCG rewrite and the new NCG does not appear to have any trouble with such types (see the added `T24598` test). Lift this restriction. Fixes #24598. - - - - - 1324b862 by Alan Zimmerman at 2024-04-04T21:30:44-04:00 EPA: Use EpaLocation not SrcSpan in ForeignDecls This allows us to update them for makeDeltaAst in ghc-exactprint - - - - - 19883a23 by Alan Zimmerman at 2024-04-05T16:58:17-04:00 EPA: Use EpaLocation for RecFieldsDotDot So we can update it to a delta position in makeDeltaAst if needed. - - - - - e8724327 by Matthew Pickering at 2024-04-05T16:58:53-04:00 Remove accidentally committed test.hs - - - - - 88cb3e10 by Fendor at 2024-04-08T09:03:34-04:00 Avoid UArray when indexing is not required `UnlinkedBCO`'s can occur many times in the heap. Each `UnlinkedBCO` references two `UArray`'s but never indexes them. They are only needed to encode the elements into a `ByteArray#`. The three words for the lower bound, upper bound and number of elements are essentially unused, thus we replace `UArray` with a wrapper around `ByteArray#`. This saves us up to three words for each `UnlinkedBCO`. Further, to avoid re-allocating these words for `ResolvedBCO`, we repeat the procedure for `ResolvedBCO` and add custom `Binary` and `Show` instances. For example, agda's repl session has around 360_000 UnlinkedBCO's, so avoiding these three words is already saving us around 8MB residency. - - - - - f2cc1107 by Fendor at 2024-04-08T09:04:11-04:00 Never UNPACK `FastMutInt` for counting z-encoded `FastString`s In `FastStringTable`, we count the number of z-encoded FastStrings that exist in a GHC session. We used to UNPACK the counters to not waste memory, but live retainer analysis showed that we allocate a lot of `FastMutInt`s, retained by `mkFastZString`. We lazily compute the `FastZString`, only incrementing the counter when the `FastZString` is forced. The function `mkFastStringWith` calls `mkZFastString` and boxes the `FastMutInt`, leading to the following core: mkFastStringWith = \ mk_fs _ -> = case stringTable of { FastStringTable _ n_zencs segments# _ -> ... case ((mk_fs (I# ...) (FastMutInt n_zencs)) `cast` <Co:2> :: ...) ... Marking this field as `NOUNPACK` avoids this reboxing, eliminating the allocation of a fresh `FastMutInt` on every `FastString` allocation. - - - - - c6def949 by Matthew Pickering at 2024-04-08T16:06:51-04:00 Force in_multi to avoid retaining entire hsc_env - - - - - fbb91a63 by Fendor at 2024-04-08T16:06:51-04:00 Eliminate name thunk in declaration fingerprinting Thunk analysis showed that we have about 100_000 thunks (in agda and `-fwrite-simplified-core`) pointing to the name of the name decl. Forcing this thunk fixes this issue. The thunk created here is retained by the thunk created by forkM, it is better to eagerly force this because the result (a `Name`) is already retained indirectly via the `IfaceDecl`. - - - - - 3b7b0c1c by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Use EpaLocation in WarningTxt This allows us to use an EpDelta if needed when using makeDeltaAst. - - - - - 12b997df by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Move DeltaPos and EpaLocation' into GHC.Types.SrcLoc This allows us to use a NoCommentsLocation for the possibly trailing comma location in a StringLiteral. This in turn allows us to correctly roundtrip via makeDeltaAst. - - - - - 868c8a78 by Fendor at 2024-04-09T08:51:50-04:00 Prefer packed representation for CompiledByteCode As there are many 'CompiledByteCode' objects alive during a GHCi session, representing its element in a more packed manner improves space behaviour at a minimal cost. When running GHCi on the agda codebase, we find around 380 live 'CompiledByteCode' objects. Packing their respective 'UnlinkedByteCode' can save quite some pointers. - - - - - be3bddde by Alan Zimmerman at 2024-04-09T08:52:26-04:00 EPA: Capture all comments in a ClassDecl Hopefully the final fix needed for #24533 - - - - - 3d0806fc by Jade at 2024-04-10T05:39:53-04:00 Validate -main-is flag using parseIdentifier Fixes #24368 - - - - - dd530bb7 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: free error message before returning Fixes a memory leak in rts/linker/PEi386.c - - - - - e008a19a by Alexis King at 2024-04-10T05:40:29-04:00 linker: Avoid linear search when looking up Haskell symbols via dlsym See the primary Note [Looking up symbols in the relevant objects] for a more in-depth explanation. When dynamically loading a Haskell symbol (typical when running a splice or GHCi expression), before this commit we would search for the symbol in all dynamic libraries that were loaded. However, this could be very inefficient when too many packages are loaded (which can happen if there are many package dependencies) because the time to lookup the would be linear in the number of packages loaded. This commit drastically improves symbol loading performance by introducing a mapping from units to the handles of corresponding loaded dlls. These handles are returned by dlopen when we load a dll, and can then be used to look up in a specific dynamic library. Looking up a given Name is now much more precise because we can get lookup its unit in the mapping and lookup the symbol solely in the handles of the dynamic libraries loaded for that unit. In one measurement, the wait time before the expression was executed went from +-38 seconds down to +-2s. This commit also includes Note [Symbols may not be found in pkgs_loaded], explaining the fallback to the old behaviour in case no dll can be found in the unit mapping for a given Name. Fixes #23415 Co-authored-by: Rodrigo Mesquita (@alt-romes) - - - - - dcfaa190 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: Make addDLL a wrapper around loadNativeObj Rewrite the implementation of `addDLL` as a wrapper around the more principled `loadNativeObj` rts linker function. The latter should be preferred while the former is preserved for backwards compatibility. `loadNativeObj` was previously only available on ELF platforms, so this commit further refactors the rts linker to transform loadNativeObj_ELF into loadNativeObj_POSIX, which is available in ELF and MachO platforms. The refactor made it possible to remove the `dl_mutex` mutex in favour of always using `linker_mutex` (rather than a combination of both). Lastly, we implement `loadNativeObj` for Windows too. - - - - - 12931698 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 Use symbol cache in internal interpreter too This commit makes the symbol cache that was used by the external interpreter available for the internal interpreter too. This follows from the analysis in #23415 that suggests the internal interpreter could benefit from this cache too, and that there is no good reason not to have the cache for it too. It also makes it a bit more uniform to have the symbol cache range over both the internal and external interpreter. This commit also refactors the cache into a function which is used by both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the caching logic to `lookupSymbolInDLL` too. - - - - - dccd3ea1 by Ben Gamari at 2024-04-10T05:40:29-04:00 testsuite: Add test for lookupSymbolInNativeObj - - - - - 1b1a92bd by Alan Zimmerman at 2024-04-10T05:41:05-04:00 EPA: Remove unnecessary XRec in CompleteMatchSig The XRec for [LIdP pass] is not needed for exact printing, remove it. - - - - - 6e18ce2b by Ben Gamari at 2024-04-12T08:16:09-04:00 users-guide: Clarify language extension documentation Over the years the users guide's language extension documentation has gone through quite a few refactorings. In the process some of the descriptions have been rendered non-sensical. For instance, the description of `NoImplicitPrelude` actually describes the semantics of `ImplicitPrelude`. To fix this we: * ensure that all extensions are named in their "positive" sense (e.g. `ImplicitPrelude` rather than `NoImplicitPrelude`). * rework the documentation to avoid flag-oriented wording like "enable" and "disable" * ensure that the polarity of the documentation is consistent with reality. Fixes #23895. - - - - - a933aff3 by Zubin Duggal at 2024-04-12T08:16:45-04:00 driver: Make `checkHomeUnitsClosed` faster The implementation of `checkHomeUnitsClosed` was traversing every single path in the unit dependency graph - this grows exponentially and quickly grows to be infeasible on larger unit dependency graphs. Instead we replace this with a faster implementation which follows from the specificiation of the closure property - there is a closure error if there are units which are both are both (transitively) depended upon by home units and (transitively) depend on home units, but are not themselves home units. To compute the set of units required for closure, we first compute the closure of the unit dependency graph, then the transpose of this closure, and find all units that are reachable from the home units in the transpose of the closure. - - - - - 23c3e624 by Andreas Klebinger at 2024-04-12T08:17:21-04:00 RTS: Emit warning when -M < -H Fixes #24487 - - - - - d23afb8c by Ben Gamari at 2024-04-12T08:17:56-04:00 testsuite: Add broken test for CApiFFI with -fprefer-bytecode See #24634. - - - - - a4bb3a51 by Ben Gamari at 2024-04-12T08:18:32-04:00 base: Deprecate GHC.Pack As proposed in #21461. Closes #21540. - - - - - 55eb8c98 by Ben Gamari at 2024-04-12T08:19:08-04:00 ghc-internal: Fix mentions of ghc-internal in deprecation warnings Closes #24609. - - - - - b0fbd181 by Ben Gamari at 2024-04-12T08:19:44-04:00 rts: Implement set_initial_registers for AArch64 Fixes #23680. - - - - - 14c9ec62 by Ben Gamari at 2024-04-12T08:20:20-04:00 ghcup-metadata: Use Debian 9 binaries on Ubuntu 16, 17 Closes #24646. - - - - - 35a1621e by Ben Gamari at 2024-04-12T08:20:55-04:00 Bump unix submodule to 2.8.5.1 Closes #24640. - - - - - a1c24df0 by Finley McIlwaine at 2024-04-12T08:21:31-04:00 Correct default -funfolding-use-threshold in docs - - - - - 0255d03c by Oleg Grenrus at 2024-04-12T08:22:07-04:00 FastString is a __Modified__ UTF-8 - - - - - c3489547 by Matthew Pickering at 2024-04-12T13:13:44-04:00 rts: Improve tracing message when nursery is resized It is sometimes more useful to know how much bigger or smaller the nursery got when it is resized. In particular I am trying to investigate situations where we end up with fragmentation due to the nursery (#24577) - - - - - 5e4f4ba8 by Simon Peyton Jones at 2024-04-12T13:14:20-04:00 Don't generate wrappers for `type data` constructors with StrictData Previously, the logic for checking if a data constructor needs a wrapper or not would take into account whether the constructor's fields have explicit strictness (e.g., `data T = MkT !Int`), but the logic would _not_ take into account whether `StrictData` was enabled. This meant that something like `type data T = MkT Int` would incorrectly generate a wrapper for `MkT` if `StrictData` was enabled, leading to the horrible errors seen in #24620. To fix this, we disable generating wrappers for `type data` constructors altogether. Fixes #24620. Co-authored-by: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - dbdf1995 by Alex Mason at 2024-04-15T15:28:26+10:00 Implements MO_S_Mul2 and MO_U_Mul2 using the UMULH, UMULL and SMULH instructions for AArch64 Also adds a test for MO_S_Mul2 - - - - - 42bd0407 by Teo Camarasu at 2024-04-16T20:06:39-04:00 Make template-haskell a stage1 package Promoting template-haskell from a stage0 to a stage1 package means that we can much more easily refactor template-haskell. We implement this by duplicating the in-tree `template-haskell`. A new `template-haskell-next` library is autogenerated to mirror `template-haskell` `stage1:ghc` to depend on the new interface of the library including the `Binary` instances without adding an explicit dependency on `template-haskell`. This is controlled by the `bootstrap-th` cabal flag When building `template-haskell` modules as part of this vendoring we do not have access to quote syntax, so we cannot use variable quote notation (`'Just`). So we either replace these with hand-written `Name`s or hide the code behind CPP. We can remove the `th_hack` from hadrian, which was required when building stage0 packages using the in-tree `template-haskell` library. For more details see Note [Bootstrapping Template Haskell]. Resolves #23536 Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> Co-Authored-By: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - 3d973e47 by Ben Gamari at 2024-04-16T20:07:15-04:00 Bump parsec submodule to 3.1.17.0 - - - - - 9d38bfa0 by Simon Peyton Jones at 2024-04-16T20:07:51-04:00 Clone CoVars in CorePrep This MR addresses #24463. It's all explained in the new Note [Cloning CoVars and TyVars] - - - - - 0fe2b410 by Andreas Klebinger at 2024-04-16T20:08:27-04:00 NCG: Fix a bug where we errounously removed a required jump instruction. Add a new method to the Instruction class to check if we can eliminate a jump in favour of fallthrough control flow. Fixes #24507 - - - - - 9f99126a by Teo Camarasu at 2024-04-16T20:09:04-04:00 Fix documentation preview from doc-tarball job - Include all the .html files and assets in the job artefacts - Include all the .pdf files in the job artefacts - Mark the artefact as an "exposed" artefact meaning it turns up in the UI. Resolves #24651 - - - - - 3a0642ea by Ben Gamari at 2024-04-16T20:09:39-04:00 rts: Ignore EINTR while polling in timerfd itimer implementation While the RTS does attempt to mask signals, it may be that a foreign library unmasks them. This previously caused benign warnings which we now ignore. See #24610. - - - - - 9a53cd3f by Alan Zimmerman at 2024-04-16T20:10:15-04:00 EPA: Add additional comments field to AnnsModule This is used in exact printing to store comments coming after the `where` keyword but before any comments allocated to imports or decls. It is used in ghc-exactprint, see https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195bf47c17d34fa7 - - - - - e5c43259 by Bryan Richter at 2024-04-16T20:10:51-04:00 Remove unrunnable FreeBSD CI jobs FreeBSD runner supply is inelastic. Currently there is only one, and it's unavailable because of a hardware issue. - - - - - 914eb49a by Ben Gamari at 2024-04-16T20:11:27-04:00 rel-eng: Fix mktemp usage in recompress-all We need a temporary directory, not a file. - - - - - f30e4984 by Teo Camarasu at 2024-04-16T20:12:03-04:00 Fix ghc API link in docs/index.html This was missing part of the unit ID meaning it would 404. Resolves #24674 - - - - - d7a3d6b5 by Ben Gamari at 2024-04-16T20:12:39-04:00 template-haskell: Declare TH.Lib.Internal as not-home Rather than `hide`. Closes #24659. - - - - - 5eaa46e7 by Matthew Pickering at 2024-04-19T02:14:55-04:00 testsuite: Rename isCross() predicate to needsTargetWrapper() isCross() was a misnamed because it assumed that all cross targets would provide a target wrapper, but the two most common cross targets (javascript, wasm) don't need a target wrapper. Therefore we rename this predicate to `needsTargetWrapper()` so situations in the testsuite where we can check whether running executables requires a target wrapper or not. - - - - - 55a9d699 by Simon Peyton Jones at 2024-04-19T02:15:32-04:00 Do not float HNFs out of lambdas This MR adjusts SetLevels so that it is less eager to float a HNF (lambda or constructor application) out of a lambda, unless it gets to top level. Data suggests that this change is a small net win: * nofib bytes-allocated falls by -0.09% (but a couple go up) * perf/should_compile bytes-allocated falls by -0.5% * perf/should_run bytes-allocated falls by -0.1% See !12410 for more detail. When fiddling elsewhere, I also found that this patch had a huge positive effect on the (very delicate) test perf/should_run/T21839r But that improvement doesn't show up in this MR by itself. Metric Decrease: MultiLayerModulesRecomp T15703 parsing001 - - - - - f0701585 by Alan Zimmerman at 2024-04-19T02:16:08-04:00 EPA: Fix comments in mkListSyntaxTy0 Also extend the test to confirm. Addresses #24669, 1 of 4 - - - - - b01c01d4 by Serge S. Gulin at 2024-04-19T02:16:51-04:00 JS: set image `x86_64-linux-deb11-emsdk-closure` for build - - - - - c90c6039 by Alan Zimmerman at 2024-04-19T02:17:27-04:00 EPA: Provide correct span for PatBind And remove unused parameter in checkPatBind Contributes to #24669 - - - - - bee54c24 by Krzysztof Gogolewski at 2024-04-19T11:13:00+02:00 Update quantification order following GHC haskell/haddock#23764 - - - - - 2814eb89 by Ben Gamari at 2024-04-19T18:57:05+02:00 hypsrc-test: Fix output of PositionPragmas.html - - - - - 26036f96 by Alan Zimmerman at 2024-04-19T13:11:08-04:00 EPA: Fix span for PatBuilderAppType Include the location of the prefix @ in the span for InVisPat. Also removes unnecessary annotations from HsTP. Contributes to #24669 - - - - - dba03aab by Matthew Craven at 2024-04-19T13:11:44-04:00 testsuite: Give the pre_cmd for mhu-perf more time - - - - - d31fbf6c by Krzysztof Gogolewski at 2024-04-19T21:04:09-04:00 Fix quantification order for a `op` b and a %m -> b Fixes #23764 Implements https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0640-tyop-quantification-order.rst Updates haddock submodule. - - - - - 385cd1c4 by Sebastian Graf at 2024-04-19T21:04:45-04:00 Make `seq#` a magic Id and inline it in CorePrep (#24124) We can save much code and explanation in Tag Inference and StgToCmm by making `seq#` a known-key Magic Id in `GHC.Internal.IO` and inline this definition in CorePrep. See the updated `Note [seq# magic]`. I also implemented a new `Note [Flatten case-bind]` to get better code for otherwise nested case scrutinees. I renamed the contructors of `ArgInfo` to use an `AI` prefix in order to resolve the clash between `type CpeApp = CoreExpr` and the data constructor of `ArgInfo`, as well as fixed typos in `Note [CorePrep invariants]`. Fixes #24252 and #24124. - - - - - 275e41a9 by Jade at 2024-04-20T11:10:40-04:00 Put the newline after errors instead of before them This mainly has consequences for GHCi but also slightly alters how the output of GHC on the commandline looks. Fixes: #22499 - - - - - dd339c7a by Teo Camarasu at 2024-04-20T11:11:16-04:00 Remove unecessary stage0 packages Historically quite a few packages had to be stage0 as they depended on `template-haskell` and that was stage0. In #23536 we made it so that was no longer the case. This allows us to remove a bunch of packages from this list. A few still remain. A new version of `Win32` is required by `semaphore-compat`. Including `Win32` in the stage0 set requires also including `filepath` because otherwise Hadrian's dependency logic gets confused. Once our boot compiler has a newer version of `Win32` all of these will be able to be dropped. Resolves #24652 - - - - - 2f8e3a25 by Alan Zimmerman at 2024-04-20T11:11:52-04:00 EPA: Avoid duplicated comments in splice decls Contributes to #24669 - - - - - c70b9ddb by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fix typos and namings (fixes #24602) You may noted that I've also changed term of ``` , global "h$vt_double" ||= toJExpr IntV ``` See "IntV" and ``` WaitReadOp -> \[] [fd] -> pure $ PRPrimCall $ returnS (app "h$waidRead" [fd]) ``` See "h$waidRead" - - - - - 3db54f9b by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: trivial checks for variable presence (fixes #24602) - - - - - 777f108f by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fs module imported twice (by emscripten and by ghc-internal). ghc-internal import wrapped in a closure to prevent conflict with emscripten (fixes #24602) Better solution is to use some JavaScript module system like AMD, CommonJS or even UMD. It will be investigated at other issues. At first glance we should try UMD (See https://github.com/umdjs/umd) - - - - - a45a5712 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: thread.js requires h$fds and h$fdReady to be declared for static code analysis, minimal code copied from GHCJS (fixes #24602) I've just copied some old pieces of GHCJS from publicly available sources (See https://github.com/Taneb/shims/blob/a6dd0202dcdb86ad63201495b8b5d9763483eb35/src/io.js#L607). Also I didn't put details to h$fds. I took minimal and left only its object initialization: `var h$fds = {};` - - - - - ad90bf12 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: heap and stack overflows reporting defined as js hard failure (fixes #24602) These errors were treated as a hard failure for browser application. The fix is trivial: just throw error. - - - - - 5962fa52 by Serge S. Gulin at 2024-04-21T16:33:44+03:00 JS: Stubs for code without actual implementation detected by Google Closure Compiler (fixes #24602) These errors were fixed just by introducing stubbed functions with throw for further implementation. - - - - - a0694298 by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add externs to linker (fixes #24602) After enabling jsdoc and built-in google closure compiler types I was needed to deal with the following: 1. Define NodeJS-environment types. I've just copied minimal set of externs from semi-official repo (see https://github.com/externs/nodejs/blob/6c6882c73efcdceecf42e7ba11f1e3e5c9c041f0/v8/nodejs.js#L8). 2. Define Emscripten-environment types: `HEAP8`. Emscripten already provides some externs in our code but it supposed to be run in some module system. And its definitions do not work well in plain bundle. 3. We have some functions which purpose is to add to functions some contextual information via function properties. These functions should be marked as `modifies` to let google closure compiler remove calls if these functions are not used actually by call graph. Such functions are: `h$o`, `h$sti`, `h$init_closure`, `h$setObjInfo`. 4. STG primitives such as registries and stuff from `GHC.StgToJS`. `dXX` properties were already present at externs generator function but they are started from `7`, not from `1`. This message is related: `// fixme does closure compiler bite us here?` - - - - - e58bb29f by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: added both tests: for size and for correctness (fixes #24602) By some reason MacOS builds add to stderr messages like: Ignoring unexpected archive entry: __.SYMDEF ... However I left stderr to `/dev/null` for compatibility with linux CI builds. - - - - - 909f3a9c by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Disable js linker warning for empty symbol table to make js tests running consistent across environments - - - - - 83eb10da by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add special preprocessor for js files due of needing to keep jsdoc comments (fixes #24602) Our js files have defined google closure compiler types at jsdoc entries but these jsdoc entries are removed by cpp preprocessor. I considered that reusing them in javascript-backend would be a nice thing. Right now haskell processor uses `-traditional` option to deal with comments and `//` operators. But now there are following compiler options: `-C` and `-CC`. You can read about them at GCC (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-CC) and CLang (see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-CC). It seems that `-CC` works better for javascript jsdoc than `-traditional`. At least it leaves `/* ... */` comments w/o changes. - - - - - e1cf8dc2 by brandon s allbery kf8nh at 2024-04-22T03:48:26-04:00 fix link in CODEOWNERS It seems that our local Gitlab no longer has documentation for the `CODEOWNERS` file, but the master documentation still does. Use that instead. - - - - - a27c6a49 by Fendor at 2024-04-22T10:13:03+02:00 Adapt to UserData split - - - - - 1efc5a7a by Fendor at 2024-04-22T10:13:03+02:00 Adapt to BinHandle split - - - - - 593f4e04 by Fendor at 2024-04-23T10:19:14-04:00 Add performance regression test for '-fwrite-simplified-core' - - - - - 1ba39b05 by Fendor at 2024-04-23T10:19:14-04:00 Typecheck corebindings lazily during bytecode generation This delays typechecking the corebindings until the bytecode generation happens. We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`. In general, we shouldn't retain values of the hydrated `Type`, as not evaluating the bytecode object keeps it alive. It is better if we retain the unhydrated `IfaceType`. See Note [Hydrating Modules] - - - - - e916fc92 by Alan Zimmerman at 2024-04-23T10:19:50-04:00 EPA: Keep comments in a CaseAlt match The comments now live in the surrounding location, not inside the Match. Make sure we keep them. Closes #24707 - - - - - d2b17f32 by Cheng Shao at 2024-04-23T15:01:22-04:00 driver: force merge objects when building dynamic objects This patch forces the driver to always merge objects when building dynamic objects even when ar -L is supported. It is an oversight of !8887: original rationale of that patch is favoring the relatively cheap ar -L operation over object merging when ar -L is supported, which makes sense but only if we are building static objects! Omitting check for whether we are building dynamic objects will result in broken .so files with undefined reference errors at executable link time when building GHC with llvm-ar. Fixes #22210. - - - - - 209d09f5 by Julian Ospald at 2024-04-23T15:02:03-04:00 Allow non-absolute values for bootstrap GHC variable Fixes #24682 - - - - - 3fff0977 by Matthew Pickering at 2024-04-23T15:02:38-04:00 Don't depend on registerPackage function in Cabal More recent versions of Cabal modify the behaviour of libAbiHash which breaks our usage of registerPackage. It is simpler to inline the part of registerPackage that we need and avoid any additional dependency and complication using the higher-level function introduces. - - - - - c62dc317 by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: remove obsolete ln script This commit removes an obsolete ln script in ghc-bignum/gmp. See 060251c24ad160264ae8553efecbb8bed2f06360 for its original intention, but it's been obsolete for a long time, especially since the removal of the make build system. Hence the house cleaning. - - - - - 6399d52b by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: update gmp to 6.3.0 This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0. The tarball format is now xz, and gmpsrc.patch has been patched into the tarball so hadrian no longer needs to deal with patching logic when building in-tree GMP. - - - - - 65b4b92f by Cheng Shao at 2024-04-25T01:32:02-04:00 hadrian: remove obsolete Patch logic This commit removes obsolete Patch logic from hadrian, given we no longer need to patch the gmp tarball when building in-tree GMP. - - - - - 71f28958 by Cheng Shao at 2024-04-25T01:32:02-04:00 autoconf: remove obsolete patch detection This commit removes obsolete deletection logic of the patch command from autoconf scripts, given we no longer need to patch anything in the GHC build process. - - - - - daeda834 by Sylvain Henry at 2024-04-25T01:32:43-04:00 JS: correctly handle RUBBISH literals (#24664) - - - - - 8a06ddf6 by Matthew Pickering at 2024-04-25T11:16:16-04:00 Linearise ghc-internal and base build This is achieved by requesting the final package database for ghc-internal, which mandates it is fully built as a dependency of configuring the `base` package. This is at the expense of cross-package parrallelism between ghc-internal and the base package. Fixes #24436 - - - - - 94da9365 by Andrei Borzenkov at 2024-04-25T11:16:54-04:00 Fix tuple puns renaming (24702) Move tuple renaming short cutter from `isBuiltInOcc_maybe` to `isPunOcc_maybe`, so we consider incoming module. I also fixed some hidden bugs that raised after the change was done. - - - - - fa03b1fb by Fendor at 2024-04-26T18:03:13-04:00 Refactor the Binary serialisation interface The goal is simplifiy adding deduplication tables to `ModIface` interface serialisation. We identify two main points of interest that make this difficult: 1. UserData hardcodes what `Binary` instances can have deduplication tables. Moreover, it heavily uses partial functions. 2. GHC.Iface.Binary hardcodes the deduplication tables for 'Name' and 'FastString', making it difficult to add more deduplication. Instead of having a single `UserData` record with fields for all the types that can have deduplication tables, we allow to provide custom serialisers for any `Typeable`. These are wrapped in existentials and stored in a `Map` indexed by their respective `TypeRep`. The `Binary` instance of the type to deduplicate still needs to explicitly look up the decoder via `findUserDataReader` and `findUserDataWriter`, which is no worse than the status-quo. `Map` was chosen as microbenchmarks indicate it is the fastest for a small number of keys (< 10). To generalise the deduplication table serialisation mechanism, we introduce the types `ReaderTable` and `WriterTable` which provide a simple interface that is sufficient to implement a general purpose deduplication mechanism for `writeBinIface` and `readBinIface`. This allows us to provide a list of deduplication tables for serialisation that can be extended more easily, for example for `IfaceTyCon`, see the issue https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for more motivation. In addition to this refactoring, we split `UserData` into `ReaderUserData` and `WriterUserData`, to avoid partial functions and reduce overall memory usage, as we need fewer mutable variables. Bump haddock submodule to accomodate for `UserData` split. ------------------------- Metric Increase: MultiLayerModulesTH_Make MultiLayerModulesRecomp T21839c ------------------------- - - - - - bac57298 by Fendor at 2024-04-26T18:03:13-04:00 Split `BinHandle` into `ReadBinHandle` and `WriteBinHandle` A `BinHandle` contains too much information for reading data. For example, it needs to keep a `FastMutInt` and a `IORef BinData`, when the non-mutable variants would suffice. Additionally, this change has the benefit that anyone can immediately tell whether the `BinHandle` is used for reading or writing. Bump haddock submodule BinHandle split. - - - - - 4d6394dd by Simon Peyton Jones at 2024-04-26T18:03:49-04:00 Fix missing escaping-kind check in tcPatSynSig Note [Escaping kind in type signatures] explains how we deal with escaping kinds in type signatures, e.g. f :: forall r (a :: TYPE r). a where the kind of the body is (TYPE r), but `r` is not in scope outside the forall-type. I had missed this subtlety in tcPatSynSig, leading to #24686. This MR fixes it; and a similar bug in tc_top_lhs_type. (The latter is tested by T24686a.) - - - - - 981c2c2c by Alan Zimmerman at 2024-04-26T18:04:25-04:00 EPA: check-exact: check that the roundtrip reproduces the source Closes #24670 - - - - - a8616747 by Andrew Lelechenko at 2024-04-26T18:05:01-04:00 Document that setEnv is not thread-safe - - - - - 1e41de83 by Bryan Richter at 2024-04-26T18:05:37-04:00 CI: Work around frequent Signal 9 errors - - - - - a6d5f9da by Naïm Favier at 2024-04-27T17:52:40-04:00 ghc-internal: add MonadFix instance for (,) Closes https://gitlab.haskell.org/ghc/ghc/-/issues/24288, implements CLC proposal https://github.com/haskell/core-libraries-committee/issues/238. Adds a MonadFix instance for tuples, permitting value recursion in the "native" writer monad and bringing consistency with the existing instance for transformers's WriterT (and, to a lesser extent, for Solo). - - - - - 64feadcd by Rodrigo Mesquita at 2024-04-27T17:53:16-04:00 bindist: Fix xattr cleaning The original fix (725343aa) was incorrect because it used the shell bracket syntax which is the quoting syntax in autoconf, making the test for existence be incorrect and therefore `xattr` was never run. Fixes #24554 - - - - - e2094df3 by damhiya at 2024-04-28T23:52:00+09:00 Make read accepts binary integer formats CLC proposal : https://github.com/haskell/core-libraries-committee/issues/177 - - - - - c62239b7 by Sylvain Henry at 2024-04-29T10:35:00+02:00 Fix tests for T22229 - - - - - 1c2fd963 by Alan Zimmerman at 2024-04-29T23:17:00-04:00 EPA: Preserve comments in Match Pats Closes #24708 Closes #24715 Closes #24734 - - - - - 4189d17e by Sylvain Henry at 2024-04-29T23:17:42-04:00 LLVM: better unreachable default destination in Switch (#24717) See added note. Co-authored-by: Siddharth Bhat <siddu.druid at gmail.com> - - - - - a3725c88 by Cheng Shao at 2024-04-29T23:18:20-04:00 ci: enable wasm jobs for MRs with wasm label This patch enables wasm jobs for MRs with wasm label. Previously the wasm label didn't actually have any effect on the CI pipeline, and full-ci needed to be applied to run wasm jobs which was a waste of runners when working on the wasm backend, hence the fix here. - - - - - 702f7964 by Matthew Pickering at 2024-04-29T23:18:56-04:00 Make interface files and object files depend on inplace .conf file A potential fix for #24737 - - - - - 728af21e by Cheng Shao at 2024-04-30T05:30:23-04:00 utils: remove obsolete vagrant scripts Vagrantfile has long been removed in !5288. This commit further removes the obsolete vagrant scripts in the tree. - - - - - 36f2c342 by Cheng Shao at 2024-04-30T05:31:00-04:00 Update autoconf scripts Scripts taken from autoconf 948ae97ca5703224bd3eada06b7a69f40dd15a02 - - - - - ecbf22a6 by Ben Gamari at 2024-04-30T05:31:36-04:00 ghcup-metadata: Drop output_name field This is entirely redundant to the filename of the URL. There is no compelling reason to name the downloaded file differently from its source. - - - - - c56d728e by Zubin Duggal at 2024-04-30T22:45:09-04:00 testsuite: Handle exceptions in framework_fail when testdir is not initialised When `framework_fail` is called before initialising testdir, it would fail with an exception reporting the testdir not being initialised instead of the actual failure. Ensure we report the actual reason for the failure instead of failing in this way. One way this can manifest is when trying to run a test that doesn't exist using `--only` - - - - - d5bea4d6 by Alan Zimmerman at 2024-04-30T22:45:45-04:00 EPA: Fix range for GADT decl with sig only Closes #24714 - - - - - 4d78c53c by Sylvain Henry at 2024-05-01T17:23:06-04:00 Fix TH dependencies (#22229) Add a dependency between Syntax and Internal (via module reexport). - - - - - 37e38db4 by Sylvain Henry at 2024-05-01T17:23:06-04:00 Bump haddock submodule - - - - - ca13075c by Sylvain Henry at 2024-05-01T17:23:47-04:00 JS: cleanup to prepare for #24743 - - - - - 40026ac3 by Alan Zimmerman at 2024-05-01T22:45:07-04:00 EPA: Preserve comments for PrefixCon Preserve comments in fun (Con {- c1 -} a b) = undefined Closes #24736 - - - - - 92134789 by Hécate Moonlight at 2024-05-01T22:45:42-04:00 Correct `@since` metadata in HpcFlags It was introduced in base-4.20, not 4.22. Fix #24721 - - - - - a580722e by Cheng Shao at 2024-05-02T08:18:45-04:00 testsuite: fix req_target_smp predicate - - - - - ac9c5f84 by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Remove (unused)coarse grained locking. The STM code had a coarse grained locking mode guarded by #defines that was unused. This commit removes the code. - - - - - 917ef81b by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Be more optimistic when validating in-flight transactions. * Don't lock tvars when performing non-committal validation. * If we encounter a locked tvar don't consider it a failure. This means in-flight validation will only fail if committing at the moment of validation is *guaranteed* to fail. This prevents in-flight validation from failing spuriously if it happens in parallel on multiple threads or parallel to thread comitting. - - - - - 167a56a0 by Alan Zimmerman at 2024-05-02T08:19:22-04:00 EPA: fix span for empty \case(s) In instance SDecide Nat where SZero %~ (SSucc _) = Disproved (\case) Ensure the span for the HsLam covers the full construct. Closes #24748 - - - - - 9bae34d8 by doyougnu at 2024-05-02T15:41:08-04:00 testsuite: expand size testing infrastructure - closes #24191 - adds windows_skip, wasm_skip, wasm_arch, find_so, _find_so - path_from_ghcPkg, collect_size_ghc_pkg, collect_object_size, find_non_inplace functions to testsuite - adds on_windows and req_dynamic_ghc predicate to testsuite The design is to not make the testsuite too smart and simply offload to ghc-pkg for locations of object files and directories. - - - - - b85b1199 by Sylvain Henry at 2024-05-02T15:41:49-04:00 GHCi: support inlining breakpoints (#24712) When a breakpoint is inlined, its context may change (e.g. tyvars in scope). We must take this into account and not used the breakpoint tick index as its sole identifier. Each instance of a breakpoint (even with the same tick index) now gets a different "info" index. We also need to distinguish modules: - tick module: module with the break array (tick counters, status, etc.) - info module: module having the CgBreakInfo (info at occurrence site) - - - - - 649c24b9 by Oleg Grenrus at 2024-05-03T20:45:42-04:00 Expose constructors of SNat, SChar and SSymbol in ghc-internal - - - - - d603f199 by Mikolaj Konarski at 2024-05-03T20:46:19-04:00 Add DCoVarSet to PluginProv (!12037) - - - - - ba480026 by Serge S. Gulin at 2024-05-03T20:47:01-04:00 JS: Enable more efficient packing of string data (fixes #24706) - - - - - be1e60ee by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Track in-scope variables in ruleCheckProgram This small patch fixes #24726, by tracking in-scope variables properly in -drule-check. Not hard to do! - - - - - 58408c77 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add a couple more HasCallStack constraints in SimpleOpt Just for debugging, no effect on normal code - - - - - 70e245e8 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add comments to Prep.hs This documentation patch fixes a TODO left over from !12364 - - - - - e5687186 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Use HasDebugCallStack, rather than HasCallStack - - - - - 631cefec by Cheng Shao at 2024-05-03T20:48:17-04:00 driver: always merge objects when possible This patch makes the driver always merge objects with `ld -r` when possible, and only fall back to calling `ar -L` when merge objects command is unavailable. This completely reverts !8887 and !12313, given more fixes in Cabal seems to be needed to avoid breaking certain configurations and the maintainence cost is exceeding the behefits in this case :/ - - - - - 1dacb506 by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump time submodule to 1.14 As requested in #24528. ------------------------- Metric Decrease: ghc_bignum_so rts_so Metric Increase: cabal_syntax_dir rts_so time_dir time_so ------------------------- - - - - - 4941b90e by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump terminfo submodule to current master - - - - - 43d48b44 by Cheng Shao at 2024-05-03T20:49:30-04:00 wasm: use scheduler.postTask() for context switch when available This patch makes use of scheduler.postTask() for JSFFI context switch when it's available. It's a more principled approach than our MessageChannel based setImmediate() implementation, and it's available in latest version of Chromium based browsers. - - - - - 08207501 by Cheng Shao at 2024-05-03T20:50:08-04:00 testsuite: give pre_cmd for mhu-perf 5x time - - - - - bf3d4db0 by Alan Zimmerman at 2024-05-03T20:50:43-04:00 EPA: Preserve comments for pattern synonym sig Closes #24749 - - - - - c49493f2 by Matthew Pickering at 2024-05-04T06:02:57-04:00 tests: Widen acceptance window for dir and so size tests These are testing things which are sometimes out the control of a GHC developer. Therefore we shouldn't fail CI if something about these dependencies change because we can't do anything about it. It is still useful to have these statistics for visualisation in grafana though. Ticket #24759 - - - - - 9562808d by Matthew Pickering at 2024-05-04T06:02:57-04:00 Disable rts_so test It has already manifested large fluctuations and destabilising CI Fixes #24762 - - - - - fc24c5cf by Ryan Scott at 2024-05-04T06:03:33-04:00 unboxedSum{Type,Data}Name: Use GHC.Types as the module Unboxed sum constructors are now defined in the `GHC.Types` module, so if you manually quote an unboxed sum (e.g., `''Sum2#`), you will get a `Name` like: ```hs GHC.Types.Sum2# ``` The `unboxedSumTypeName` function in `template-haskell`, however, mistakenly believes that unboxed sum constructors are defined in `GHC.Prim`, so `unboxedSumTypeName 2` would return an entirely different `Name`: ```hs GHC.Prim.(#|#) ``` This is a problem for Template Haskell users, as it means that they can't be sure which `Name` is the correct one. (Similarly for `unboxedSumDataName`.) This patch fixes the implementations of `unboxedSum{Type,Data}Name` to use `GHC.Types` as the module. For consistency with `unboxedTupleTypeName`, the `unboxedSumTypeName` function now uses the non-punned syntax for unboxed sums (`Sum<N>#`) as the `OccName`. Fixes #24750. - - - - - 7eab4e01 by Alan Zimmerman at 2024-05-04T16:14:55+01:00 EPA: Widen stmtslist to include last semicolon Closes #24754 - - - - - 06f7db40 by Teo Camarasu at 2024-05-05T00:19:38-04:00 doc: Fix type error in hs_try_putmvar example - - - - - af000532 by Moritz Schuler at 2024-05-05T06:30:58-04:00 Fix parsing of module names in CLI arguments closes issue #24732 - - - - - da74e9c9 by Ben Gamari at 2024-05-05T06:31:34-04:00 ghc-platform: Add Setup.hs The Hadrian bootstrapping script relies upon `Setup.hs` to drive its build. Addresses #24761. - - - - - 35d34fde by Alan Zimmerman at 2024-05-05T12:52:40-04:00 EPA: preserve comments in class and data decls Fix checkTyClHdr which was discarding comments. Closes #24755 - - - - - 03c5dfbf by Simon Peyton Jones at 2024-05-05T12:53:15-04:00 Fix a float-out error Ticket #24768 showed that the Simplifier was accidentally destroying a join point. It turned out to be that we were sending a bottoming join point to the top, accidentally abstracting over /other/ join points. Easily fixed. - - - - - adba68e7 by John Ericson at 2024-05-05T19:35:56-04:00 Substitute bindist files with Hadrian not configure The `ghc-toolchain` overhaul will eventually replace all this stuff with something much more cleaned up, but I think it is still worth making this sort of cleanup in the meantime so other untanglings and dead code cleaning can procede. I was able to delete a fair amount of dead code doing this too. `LLVMTarget_CPP` is renamed to / merged with `LLVMTarget` because it wasn't actually turned into a valid CPP identifier. (Original to 1345c7cc42c45e63ab1726a8fd24a7e4d4222467, actually.) Progress on #23966 Co-Authored-By: Sylvain Henry <hsyl20 at gmail.com> - - - - - 18f4ff84 by Alan Zimmerman at 2024-05-05T19:36:32-04:00 EPA: fix mkHsOpTyPV duplicating comments Closes #24753 - - - - - a19201d4 by Matthew Craven at 2024-05-06T19:54:29-04:00 Add test cases for #24664 ...since none are present in the original MR !12463 fixing this issue. - - - - - 46328a49 by Alan Zimmerman at 2024-05-06T19:55:05-04:00 EPA: preserve comments in data decls Closes #24771 - - - - - 3b51995c by Andrei Borzenkov at 2024-05-07T14:39:40-04:00 Rename Solo# data constructor to MkSolo# (#24673) - data Solo# a = (# a #) + data Solo# a = MkSolo# a And `(# foo #)` syntax now becomes just a syntactic sugar for `MkSolo# a`. - - - - - 4d59abf2 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Add the cmm_cpp_is_gcc predicate to the testsuite A future C-- test called T24474-cmm-override-g0 relies on the GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it emitting #defines past the preprocessing stage. Clang, at least, does not do this, so the test would fail if ran on Clang. As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of the workaround we apply as a fix for bug #24474, and the workaround was for GCC-specific behaviour, the test needs to be marked as fragile on other compilers. - - - - - 25b0b404 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Split out the C-- preprocessor, and make it pass -g0 Previously, C-- was processed with the C preprocessor program. This means that it inherited flags passed via -optc. A flag that is somewhat often passed through -optc is -g. At certain -g levels (>=2), GCC starts emitting defines *after* preprocessing, for the purposes of debug info generation. This is not useful for the C-- compiler, and, in fact, causes lexer errors. We can suppress this effect (safely, if supported) via -g0. As a workaround, in older versions of GCC (<=10), GCC only emitted defines if a certain set of -g*3 flags was passed. Newer versions check the debug level. For the former, we filter out those -g*3 flags and, for the latter, we specify -g0 on top of that. As a compatible and effective solution, this change adds a C-- preprocessor distinct from the C compiler and preprocessor, but that keeps its flags. The command line produced for C-- preprocessing now looks like: $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/24474 - - - - - 9b4129a5 by Andreas Klebinger at 2024-05-08T13:24:20-04:00 -fprof-late: Only insert cost centres on functions/non-workfree cafs. They are usually useless and doing so for data values comes with a large compile time/code size overhead. Fixes #24103 - - - - - 259b63d3 by Sebastian Graf at 2024-05-08T13:24:57-04:00 Simplifier: Preserve OccInfo on DataAlt fields when case binder is dead (#24770) See the adjusted `Note [DataAlt occ info]`. This change also has a positive repercussion on `Note [Combine case alts: awkward corner]`. Fixes #24770. We now try not to call `dataConRepStrictness` in `adjustFieldsIdInfo` when all fields are lazy anyway, leading to a 2% ghc/alloc decrease in T9675. Metric Decrease: T9675 - - - - - 31b28cdb by Sebastian Graf at 2024-05-08T13:24:57-04:00 Kill seqRule, discard dead seq# in Prep (#24334) Discarding seq#s in Core land via `seqRule` was problematic; see #24334. So instead we discard certain dead, discardable seq#s in Prep now. See the updated `Note [seq# magic]`. This fixes the symptoms of #24334. - - - - - b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00 Document NcgImpl methods Fixes #19914 - - - - - 4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00 Make renamer to be more flexible with parens in the LHS of the rules We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621 - - - - - ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00 IPE: Eliminate dependency on Read Instead of encoding the closure type as decimal string we now simply represent it as an integer, eliminating the need for `Read` in `GHC.Internal.InfoProv.Types.peekInfoProv`. Closes #24504. ------------------------- Metric Decrease: T24602_perf_size size_hello_artifact ------------------------- - - - - - a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00 testsuite: fix testwsdeque with recent clang This patch fixes compilation of testwsdeque.c with recent versions of clang, which will fail with the error below: ``` testwsdeque.c:95:33: error: warning: format specifies type 'long' but the argument has type 'void *' [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~~ ^ testwsdeque.c:95:39: error: warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~ ^~~ | %lu testwsdeque.c:133:42: error: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types] 133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); | ^~~~~ /workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error: note: passing argument to parameter 'startProc' here 193 | OSThreadProc *startProc, void *param); | ^ 2 warnings and 1 error generated. ``` - - - - - c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00 Rename pre-processor invocation args Small clean up. Uses proper names for the various groups of arguments that make up the pre-processor invocation. - - - - - 2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00 ghc-heap: fix typo in ghc-heap cbits - - - - - fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00 Improve performance of Data.List.sort(By) This patch improves the algorithm to sort lists in base. It does so using two strategies: 1) Use a four-way-merge instead of the 'default' two-way-merge. This is able to save comparisons and allocations. 2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization. This mainly benefits types with a fast (>). Note that this *may* break instances with a *malformed* Ord instance where `a > b` is *not* equal to `compare a b == GT`. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236 Fixes #24280 ------------------------- Metric Decrease: MultiLayerModulesTH_Make T10421 T13719 T15164 T18698a T18698b T1969 T9872a T9961 T18730 WWRec T12425 T15703 ------------------------- - - - - - 1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00 Revert "ghcup-metadata: Drop output_name field" This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f. This breaks the ghcup metadata generation on the nightly jobs. - - - - - daff1e30 by Jannis at 2024-05-12T13:38:35-04:00 Division by constants optimization - - - - - 413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00 Tidy: Add flag to expose unfoldings if they take dictionary arguments. Add the flag `-fexpose-overloaded-unfoldings` to be able to control this behaviour. For ghc's boot libraries file size grew by less than 1% when it was enabled. However I refrained from enabling it by default for now. I've also added a section on specialization more broadly to the users guide. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: T12425 T13386 hard_hole_fits ------------------------- - - - - - c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00 Don't store a GlobalRdrEnv in `mi_globals` for GHCi. GHCi only needs the `mi_globals` field for modules imported with :module +*SomeModule. It uses this field to make the top level environment in `SomeModule` available to the repl. By default, only the first target in the command line parameters is "star" loaded into GHCi. Other modules have to be manually "star" loaded into the repl. Storing the top level GlobalRdrEnv for each module is very wasteful, especially given that we will most likely never need most of these environments. Instead we store only the information needed to reconstruct the top level environment in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements as well as all top level symbols defined in the module (not taking export lists into account) When a particular module is "star-loaded" into GHCi (as the first commandline target, or via an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using the `IfaceTopEnv`. - - - - - d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00 Add perf regression test for `-fwrite-if-simplified-core` - - - - - 2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00 Improve pattern to type pattern transformation (23739) `pat_to_type_pat` function now can handle more patterns: - TuplePat - ListPat - LitPat - NPat - ConPat Allowing these new constructors in type patterns significantly increases possible shapes of type patterns without `type` keyword. This patch also changes how lookups in `lookupOccRnConstr` are performed, because we need to fall back into types when we didn't find a constructor on data level to perform `ConPat` to type transformation properly. - - - - - be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00 hadrian: fix hadrian building with ghc-9.10.1 - - - - - ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00 linters: fix lint-whitespace compilation with ghc-9.10.1 - - - - - a593f284 by Andreas Klebinger at 2024-05-15T07:32:10-04:00 Expand the `inline` rule to look through casts/ticks. Fixes #24808 - - - - - b1e0c313 by Cheng Shao at 2024-05-15T07:32:46-04:00 testsuite: bump PartialDownSweep timeout to 5x on wasm32 - - - - - b2227487 by Fendor at 2024-05-15T17:14:06-04:00 Add Eq and Ord instance to `IfaceType` We add an `Ord` instance so that we can store `IfaceType` in a `Data.Map` container. This is required to deduplicate `IfaceType` while writing `.hi` files to disk. Deduplication has many beneficial consequences to both file size and memory usage, as the deduplication enables implicit sharing of values. See issue #24540 for more motivation. The `Ord` instance would be unnecessary if we used a `TrieMap` instead of `Data.Map` for the deduplication process. While in theory this is clerarly the better option, experiments on the agda code base showed that a `TrieMap` implementation has worse run-time performance characteristics. To the change itself, we mostly derive `Eq` and `Ord`. This requires us to change occurrences of `FastString` with `LexicalFastString`, since `FastString` has no `Ord` instance. We change the definition of `IfLclName` to a newtype of `LexicalFastString`, to make such changes in the future easier. Bump haddock submodule for IfLclName changes - - - - - d368f9a6 by Fendor at 2024-05-15T17:14:06-04:00 Move out LiteralMap to avoid cyclic module dependencies - - - - - 2fcc09fd by Fendor at 2024-05-15T17:14:06-04:00 Add deduplication table for `IfaceType` The type `IfaceType` is a highly redundant, tree-like data structure. While benchmarking, we realised that the high redundancy of `IfaceType` causes high memory consumption in GHCi sessions when byte code is embedded into the `.hi` file via `-fwrite-if-simplified-core` or `-fbyte-code-and-object-code`. Loading such `.hi` files from disk introduces many duplicates of memory expensive values in `IfaceType`, such as `IfaceTyCon`, `IfaceTyConApp`, `IA_Arg` and many more. We improve the memory behaviour of GHCi by adding an additional deduplication table for `IfaceType` to the serialisation of `ModIface`, similar to how we deduplicate `Name`s and `FastString`s. When reading the interface file back, the table allows us to automatically share identical values of `IfaceType`. To provide some numbers, we evaluated this patch on the agda code base. We loaded the full library from the `.hi` files, which contained the embedded core expressions (`-fwrite-if-simplified-core`). Before this patch: * Load time: 11.7 s, 2.5 GB maximum residency. After this patch: * Load time: 7.3 s, 1.7 GB maximum residency. This deduplication has the beneficial side effect to additionally reduce the size of the on-disk interface files tremendously. For example, on agda, we reduce the size of `.hi` files (with `-fwrite-if-simplified-core`): * Before: 101 MB on disk * Now: 24 MB on disk This has even a beneficial side effect on the cabal store. We reduce the size of the store on disk: * Before: 341 MB on disk * Now: 310 MB on disk Note, none of the dependencies have been compiled with `-fwrite-if-simplified-core`, but `IfaceType` occurs in multiple locations in a `ModIface`. We also add IfaceType deduplication table to .hie serialisation and refactor .hie file serialisation to use the same infrastrucutre as `putWithTables`. Bump haddock submodule to accomodate for changes to the deduplication table layout and binary interface. - - - - - 36aa7cf1 by Fendor at 2024-05-15T17:14:06-04:00 Add run-time configurability of `.hi` file compression Introduce the flag `-fwrite-if-compression=<n>` which allows to configure the compression level of writing .hi files. The motivation is that some deduplication operations are too expensive for the average use case. Hence, we introduce multiple compression levels with variable impact on performance, but still reduce the memory residency and `.hi` file size on disk considerably. We introduce three compression levels: * `1`: `Normal` mode. This is the least amount of compression. It deduplicates only `Name` and `FastString`s, and is naturally the fastest compression mode. * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is marginally slower than `Normal` mode. In general, it should be safe to always use `Safe` mode. * `3`: `Full` deduplication mode. Deduplicate as much as we can, resulting in minimal .hi files, but at the cost of additional compilation time. Reading .hi files doesn't need to know the initial compression level, and can always deserialise a `ModIface`, as we write out a byte that indicates the next value has been deduplicated. This allows users to experiment with different compression levels for packages, without recompilation of dependencies. Note, the deduplication also has an additional side effect of reduced memory consumption to implicit sharing of deduplicated elements. See https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for example where that matters. ------------------------- Metric Decrease: MultiLayerModulesDefsGhciWithCore T16875 T21839c T24471 hard_hole_fits libdir ------------------------- - - - - - 1e63a6fb by Matthew Pickering at 2024-05-15T17:14:07-04:00 Introduce regression tests for `.hi` file sizes Add regression tests to track how `-fwrite-if-compression` levels affect the size of `.hi` files. - - - - - 639d742b by M Farkas-Dyck at 2024-05-15T17:14:49-04:00 TTG: ApplicativeStatement exist only in Rn and Tc Co-Authored-By: romes <rodrigo.m.mesquita at gmail.com> - - - - - aa7b336b by Jade at 2024-05-15T23:06:17-04:00 Documentation: Improve documentation for symbols exported from System.IO - - - - - c561de8f by Jade at 2024-05-15T23:06:54-04:00 Improve suggestions for language extensions - When suggesting Language extensions, also suggest Extensions which imply them - Suggest ExplicitForAll and GADTSyntax instead of more specific extensions - Rephrase suggestion to include the term 'Extension' - Also moves some flag specific definitions out of Session.hs into Flags.hs (#24478) Fixes: #24477 Fixes: #24448 Fixes: #10893 - - - - - 4c7ae2a1 by Andreas Klebinger at 2024-05-15T23:07:30-04:00 Testsuite: Check if llvm assembler is available for have_llvm - - - - - bc672166 by Torsten Schmits at 2024-05-15T23:08:06-04:00 refactor quadratic search in warnMissingHomeModules - - - - - 7875e8cb by Torsten Schmits at 2024-05-15T23:08:06-04:00 add test that runs MakeDepend on thousands of modules - - - - - b84b91f5 by Adam Gundry at 2024-05-16T15:32:06-04:00 Representation-polymorphic HasField (fixes #22156) This generalises the HasField class to support representation polymorphism, so that instead of type HasField :: forall {k} . k -> Type -> Type -> Constraint we have type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint - - - - - 05285090 by Matthew Pickering at 2024-05-16T15:32:43-04:00 Bump os-string submodule to 2.0.2.2 Closes #24786 - - - - - 886ab43a by Cheng Shao at 2024-05-17T01:34:50-04:00 rts: do not prefetch mark_closure bdescr in non-moving gc when ASSERTS_ENABLED This commit fixes a small an oversight in !12148: the prefetch logic in non-moving GC may trap in debug RTS because it calls Bdescr() for mark_closure which may be a static one. It's fine in non-debug RTS because even invalid bdescr addresses are prefetched, they will not cause segfaults, so this commit implements the most straightforward fix: don't prefetch mark_closure bdescr when assertions are enabled. - - - - - b38dcf39 by Teo Camarasu at 2024-05-17T01:34:50-04:00 rts: Allocate non-moving segments with megablocks Non-moving segments are 8 blocks long and need to be aligned. Previously we serviced allocations by grabbing 15 blocks, finding an aligned 8 block group in it and returning the rest. This proved to lead to high levels of fragmentation as a de-allocating a segment caused an 8 block gap to form, and this could not be reused for allocation. This patch introduces a segment allocator based around using entire megablocks to service segment allocations in bulk. When there are no free segments, we grab an entire megablock and fill it with aligned segments. As the megablock is free, we can easily guarantee alignment. Any unused segments are placed on a free list. It only makes sense to free segments in bulk when all of the segments in a megablock are freeable. After sweeping, we grab the free list, sort it, and find all groups of segments where they cover the megablock and free them. This introduces a period of time when free segments are not available to the mutator, but the risk that this would lead to excessive allocation is low. Right after sweep, we should have an abundance of partially full segments, and this pruning step is relatively quick. In implementing this we drop the logic that kept NONMOVING_MAX_FREE segments on the free list. We also introduce an eventlog event to log the amount of pruned/retained free segments. See Note [Segment allocation strategy] Resolves #24150 ------------------------- Metric Decrease: T13253 T19695 ------------------------- - - - - - 710665bd by Cheng Shao at 2024-05-17T01:35:30-04:00 rts: fix I/O manager compilation errors for win32 target This patch fixes I/O manager compilation errors for win32 target discovered when cross-compiling to win32 using recent clang: ``` rts/win32/ThrIOManager.c:117:7: error: error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | if (is_io_mng_native_p ()) { | ^ | 117 | if (is_io_mng_native_p ()) { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/fs.c:143:28: error: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 143 | int setErrNoFromWin32Error () { | ^ | void | 143 | int setErrNoFromWin32Error () { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:227:9: error: error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 227 | interruptIOManagerEvent (); | ^ | 227 | interruptIOManagerEvent (); | ^ rts/win32/ConsoleHandler.c:227:9: error: note: did you mean 'getIOManagerEvent'? | 227 | interruptIOManagerEvent (); | ^ rts/include/rts/IOInterface.h:27:10: error: note: 'getIOManagerEvent' declared here 27 | void * getIOManagerEvent (void); | ^ | 27 | void * getIOManagerEvent (void); | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:196:9: error: error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/win32/ConsoleHandler.c:196:9: error: note: did you mean 'postThreadLabel'? | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/eventlog/EventLog.h:118:6: error: note: 'postThreadLabel' declared here 118 | void postThreadLabel(Capability *cap, | ^ | 118 | void postThreadLabel(Capability *cap, | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) ``` - - - - - 28b9cee0 by Rodrigo Mesquita at 2024-05-17T01:36:05-04:00 configure: Check C99-compat for Cmm preprocessor Fixes #24815 - - - - - 8927e0c3 by Andreas Klebinger at 2024-05-17T01:36:41-04:00 Ensure `tcHasFixedRuntimeRep (# #)` returns True. - - - - - 04179044 by doyougnu at 2024-05-17T09:00:32-04:00 testsuite: make find_so regex less general Closes #24759 Background. In MR !12372 we began tracking shared object files and directories sizes for dependencies. However, this broke release builds because release builds alter the filenames swapping "in-place" for a hash. This was not considered in the MR and thus broke release pipelines. Furthermore, the rts_so test was found to be wildly varying and was therefore disabled in !12561. This commit fixes both of these issues: - fix the rts_so test by making the regex less general, now the rts_so test and all other foo.so tests must match "libHS<some-lib>-<version>-<hash|'in-place>-<ghc>". This prevents the rts_so test from accidentally matching different rts variants such as rts_threaded, which was the cause of the wild swings after !12372. - add logic to match either a hash or the string in-place. This should make the find_so function build agnostic. - - - - - 0962b50d by Andreas Klebinger at 2024-05-17T09:01:08-04:00 TagAnalysis: Treat all bottom ids as tagged during analysis. Ticket #24806 showed that we also need to treat dead end thunks as tagged during the analysis. - - - - - 7eb9f184 by Ben Gamari at 2024-05-17T11:23:37-04:00 Remove haddock submodule In preparation for merge into the GHC, as proposed in #23178. - - - - - 47b14dcc by Fendor at 2024-05-17T11:28:17-04:00 Adapt to `IfLclName` newtype changes (cherry picked from commit a711607e29b925f3d69e27c5fde4ba655c711ff1) - - - - - 6cc6681d by Fendor at 2024-05-17T11:28:17-04:00 Add IfaceType deduplication table to interface file serialisation Although we do not really need it in the interface file serialisation, as the deserialisation uses `getWithUserData`, we need to mirror the structure `getWithUserData` expects. Thus, we write essentially an empty `IfaceType` table at the end of the file, as the interface file doesn't reference `IfaceType`. (cherry picked from commit c9bc29c6a708483d2abc3d8ec9262510ce87ca61) - - - - - b9721206 by Ben Gamari at 2024-05-17T11:30:22-04:00 ghc-tags.yaml: Initial commit - - - - - 074e7d8f by Ben Gamari at 2024-05-17T11:31:29-04:00 fourmolu: Add configuration - - - - - 151b1736 by Ben Gamari at 2024-05-17T11:32:52-04:00 Makefile: Rework for use by haddock developers Previously the Makefile was present only for GHC's old make-based build system. Now since the make-based build system is gone we can use it for more useful ends. - - - - - a7dcf13b by Ben Gamari at 2024-05-17T11:36:14-04:00 Reformat with fourmolu Using previously-added configuration and `fourmolu -i .` Note that we exclude the test-cases (`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to formatting. - - - - - 0ea6017b by Ben Gamari at 2024-05-17T11:40:04-04:00 Add 'utils/haddock/' from commit 'a7dcf13bfbb97b20e75cc8ce650e2bb628db4660' git-subtree-dir: utils/haddock git-subtree-mainline: 7eb9f1849b1c72a1c61dee88462b4244550406f3 git-subtree-split: a7dcf13bfbb97b20e75cc8ce650e2bb628db4660 - - - - - aba1d304 by Hécate Moonlight at 2024-05-17T11:40:48-04:00 Add exceptions to the dangling notes list - - - - - 527bfbfb by Hécate Moonlight at 2024-05-17T11:40:52-04:00 Add haddock to the whitespace lint ignore list - - - - - 43274677 by Ben Gamari at 2024-05-17T11:41:20-04:00 git-blame-ignore-revs: Ignore haddock reformatting - - - - - 0e679e37 by Fendor at 2024-05-18T00:27:24-04:00 Pass cpp options to the CC builder in hadrian - - - - - bb40244e by Sylvain Henry at 2024-05-18T00:28:06-04:00 JS: fix allocation constant (fix #24746) - - - - - 646d30ab by Jade at 2024-05-18T19:23:31+02:00 Add highlighting for inline-code snippets in haddock - - - - - 64459a3e by Hécate Moonlight at 2024-05-19T08:42:27-04:00 haddock: Add a .readthedocs.yml file for online documentation - - - - - 7d3d9bbf by Serge S. Gulin at 2024-05-19T18:47:05+00:00 Unicode: General Category size test (related #24789) Added trivial size performance test which involves unicode general category usage via `read`. The `read` itself uses general category to detect spaces. The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789. - - - - - 8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00 EPA: Remove redundant code Remove unused epAnnAnns function various cases for showAstData that no longer exist - - - - - 071d7a1e by Rodrigo Mesquita at 2024-05-20T10:55:16-04:00 Improve docs on closed type families in hs-boots Fixes #24776 - - - - - d9e2c119 by Torsten Schmits at 2024-05-20T10:55:52-04:00 Use default deviation for large-project test This new performance test has the purpose of detecting regressions in complexity in relation to the number of modules in a project, so 1% deviation is way too small to avoid false positives. - - - - - 20b0136a by Ben Gamari at 2024-05-22T00:31:39-04:00 ghcup-metadata: Various fixes from 9.10.1 Use Debian 12/x86-64, Debian 10/aarch64, and Debian 11/aarch64 bindists where possible. - - - - - 6838a7c3 by Sylvain Henry at 2024-05-22T00:32:23-04:00 Reverse arguments to stgCallocBytes (fix #24828) - - - - - f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00 Add log messages for Iface serialisation compression level Fix the label of the number of 'IfaceType' entries in the log message. Add log message for the compression level that is used to serialise a an interface file. Adds `Outputable` instance for 'CompressionIFace'. - - - - - 3bad5d55 by Hécate Moonlight at 2024-05-22T00:33:40-04:00 base: Update doctests outputs ghc-internal: Update doctests outputs - - - - - 9317c6fb by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix the testsuites of the haddock-library - Apply all the metadata revisions from Hackage to the cabal file. - Fix the `ParserSpec.hs` file in the `spec` testsuite of haddock-library. - Make `CHANGES.md` an extra-doc-file instead of an extra-source-file. - - - - - 54073b02 by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix parser of @since pragma The testsuite contained tests for annotations of the form `@since foo-bar-0.5.0`, but the parser was written incorrectly. - - - - - ede6ede3 by Matthew Pickering at 2024-05-22T00:34:57-04:00 Fix nightly pages job It seems likely broken by 9f99126a which moved `index.html` from the root folder into `docs/` folder. Fixes #24840 - - - - - b7bcf729 by Cheng Shao at 2024-05-22T00:35:32-04:00 autoconf: remove unused context diff check This patch removes redundant autoconf check for the context diff program given it isn't actually been used anywhere, especially since make removal. - - - - - ea2fe66e by Hécate Moonlight at 2024-05-22T00:36:13-04:00 haddock: Rework the contributing guide - - - - - 0f302a94 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 haddock: Add module relationships diagrams of haddock-api and haddock-library - - - - - d1a9f34f by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add instructions - - - - - b880ee80 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add SVG outputs - - - - - 6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00 rts: Fix size of StgOrigThunkInfo frames Previously the entry code of the `stg_orig_thunk` frame failed to account for the size of the profiling header as it hard-coded the frame size. Fix this. Fixes #24809. - - - - - c645fe40 by Fendor at 2024-05-22T13:40:05-04:00 Add regression test T24809 for stg_orig_thunk_info_frame size - - - - - 4181aa40 by Andreas Klebinger at 2024-05-22T13:40:42-04:00 bindists: Check for existence of share folder before trying to copy it. This folder isn't distributed in windows bindists A lack of doing so resulted us copying loads of files twice. - - - - - d216510e by Matthew Pickering at 2024-05-22T13:40:42-04:00 Remove ad-hoc installation of mingw toolchain in relocatable bindists This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951 The choice about whether to install mingw is taken in the installation makefile. This is also broken on non-windows systems. The actual issue was the EnableDistroToolchain variable wasn't declared in mk/config.mk and therefore the check to install mingw was failing. - - - - - 7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04:00 testsuite: fix T17920 for wasm backend T17920 was marked as fragile on wasm before; it can be trivially fixed by avoiding calling variadic printf() in cmm. - - - - - c739383b by Cheng Shao at 2024-05-22T21:53:29-04:00 testsuite: bump T22744 timeout to 5x - - - - - c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00 testsuite: don't attempt to detect host cpu features when testing cross ghc The testsuite driver CPU feature detection logic only detects host CPU and only makes sense when we are not testing a cross GHC. - - - - - 3d9e4ce6 by Simon Peyton Jones at 2024-05-22T21:54:43-04:00 Better skolemisation As #24810 showed, it is (a little) better to skolemise en-bloc, so that Note [Let-bound skolems] fires more often. See Note [Skolemisation en bloc] in GHC.Tc.Utils.Instantiate. - - - - - a3cd3a1d by Ryan Scott at 2024-05-22T21:55:19-04:00 Add missing parenthesizePat in cvtp We need to ensure that the output of `cvtp` is parenthesized (at precedence `sigPrec`) so that any pattern signatures with a surrounding pattern signature can parse correctly. Fixes #24837. - - - - - 4bb2a7cc by Hécate Moonlight at 2024-05-22T21:55:59-04:00 [base] Document the memory overhead of ByteArray Add a diagram that shows the constituent parts of a ByteArray and their memory overhead. - - - - - 8b2a016a by Hécate Moonlight at 2024-05-22T21:56:38-04:00 Haddock: Add MR template for Haddock - - - - - ead75532 by Peter Trommler at 2024-05-23T02:28:05-04:00 PPC: Support ELF v2 on powerpc64 big-endian Detect ELF v2 on PowerPC 64-bit systems. Check for `_CALL_ELF` preprocessor macro. Fixes #21191 - - - - - 9d4c10f2 by Hécate Kleidukos at 2024-05-23T02:28:44-04:00 gitlab: Add @Kleidukos to CODEOWNERS for utils/haddock - - - - - 28e64170 by Preetham Gujjula at 2024-05-23T07:20:48-04:00 haddock: Add cabal-fmt to tools for `make style` - - - - - 00126a89 by Andrei Borzenkov at 2024-05-23T07:21:24-04:00 haddock: fix verbosity option parsing - - - - - a3e0b68b by Ryan Hendrickson at 2024-05-23T15:52:03-04:00 base: specify tie-breaking behavior of min, max, and related list/Foldable functions - - - - - bdcc0f37 by doyougnu at 2024-05-24T07:51:18-04:00 cmm: add word <-> double/float bitcast - closes: #25331 This is the last step in the project plan described in #25331. This commit: - adds bitcast operands for x86_64, LLVM, aarch64 - For PPC and i386 we resort to using the cmm implementations - renames conversion MachOps from Conv to Round|Truncate - - - - - f0d257f7 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor Some functions in StgToByteCode were filtering out void arguments. However, StgToByteCode is called after unarisation: the void arguments should have been removed earlier. Instead of filtering out, we assert that the args are non-void. - - - - - 03137fd2 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor `layoutNativeCall` was always called with a `primRepCmmType platform` callback. Hence we can put it inside of `layoutNativeCall` rather than repeat it. - - - - - 27c430f3 by David Binder at 2024-05-24T07:52:38-04:00 haddock: Remove compatibility shims for GHC < 8.4 from haddock-library - - - - - 8dd8a076 by Cheng Shao at 2024-05-24T07:53:14-04:00 compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs This patch makes the STG->Cmm backend avoid saving foreign call target to local when there are no caller-save GlobalRegs. Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a foreign call, we unconditionally save the foreign call target to a temporary local first, then rely on cmmSink to clean it up later, which only happens with -fcmm-sink (implied by -O) and not in unoptimized code. And this is troublesome for the wasm backend NCG, which needs to infer a foreign call target symbol's type signature from the Cmm call site. Previously, the NCG has been emitting incorrect type signatures for unoptimized code, which happens to work with `wasm-ld` most of the time, but this is never future-proof against upstream toolchain updates, and it causes horrible breakages when LTO objects are included in linker input. Hence this patch. - - - - - 986df1ab by Cheng Shao at 2024-05-24T07:53:14-04:00 testsuite: add callee-no-local regression test - - - - - 52d62e2a by Sylvain Henry at 2024-05-24T07:53:57-04:00 Fix HasCallStack leftovers from !12514 / #24726 - - - - - c5e00c35 by crumbtoo at 2024-05-24T07:54:38-04:00 user_guide: Fix typo in MultiWayIf chapter Close #24829 - - - - - bd323b0e by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Ensure that CHANGELOG is included in extra-source-files This was missed in the `ghc-internal` split. Closes #24831. - - - - - 1bfd32e8 by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Fix changelog reference to setBacktraceMechanismState (cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d) - - - - - 43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00 Float/double unboxed literal support for HexFloatLiterals (fix #22155) - - - - - 4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00 Improve test labels for binary interface file size tests Test labels for binary interface file sizes are hard to read and overly verbose at the same time. Extend the name for the metric title, but shorten it in the actual comparison table. - - - - - 14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00 Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present" This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa. - - - - - f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00 Fix default hyperlinked sources pattern Previously this didn't include the `%M` token which manifested as broken links to the hyperlinked sources of reexports of declarations defined in other packages. Fixes haddock#1628. (cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36) - - - - - 42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00 Make DocPaths a proper data type (cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c) - - - - - 53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00 haddock: Bump version to 2.30 (cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602) - - - - - e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00 haddock-api: allow base 4.20 and ghc 9.11 - - - - - e294f7a2 by PHO at 2024-05-24T12:17:55-04:00 Add a flag "threaded" for building haddock with the threaded RTS GHC isn't guaranteed to have a threaded RTS. There should be a way to build it with the vanilla one. (cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d) - - - - - 51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00 Update ticky counter event docs. Add the info about the info table address and json fields. Fixes #23200 - - - - - 98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00 Export extractPromotedList (#24866) This can be useful in plugins. - - - - - 228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00 template-haskell: Move wired-ins to ghc-internal Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so ------------------------- - - - - - 62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00 testsuite: mark tests broken by #24886 Now that `template-haskell` is no longer wired-in. These tests are triggering #24886, and so need to be marked broken. - - - - - 3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00 rts: fix missing function prototypes in ClosureMacros.h - - - - - e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00 UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful. - - - - - d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00 ci: Update ci-images commit for fedora38 image The fedora38 nightly job has been failing for quite a while because `diff` was no longer installed. The ci-images bump explicitly installs `diffutils` into these images so hopefully they now pass again. - - - - - 3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00 Update exactprint docs - - - - - 77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00 Incorporate review feedback - - - - - 87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00 Remove no longer relevant reference to comments - - - - - 05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00 Replace outdated code example - - - - - 45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00 Reword error resulting from missing -XBangPatterns. It can be the result of either a bang pattern or strict binding, so now we say so instead of claiming it must be a bang pattern. Fixes #21032 - - - - - e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00 testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x - - - - - 7a660042 by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: ensure gc_thread/gen_workspace is allocated with proper alignment gc_thread/gen_workspace are required to be aligned by 64 bytes. However, this property has not been properly enforced before, and numerous alignment violations at runtime has been caught by UndefinedBehaviorSanitizer that look like: ``` rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment 0x0000027a3390: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8 rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment 0x0000027a3450: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13 ``` This patch fixes the gc_thread/gen_workspace misalignment issue by explicitly allocating them with alignment constraint. - - - - - c77a48af by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: fix an unaligned load in nonmoving gc This patch fixes an unaligned load in nonmoving gc by ensuring the closure address is properly untagged first before attempting to prefetch its header. The unaligned load is reported by UndefinedBehaviorSanitizer: ``` rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment 0x0042005f3a71: note: pointer points here 00 00 00 98 43 13 8e 12 7f 00 00 50 3c 5f 00 42 00 00 00 58 17 b7 92 12 7f 00 00 89 cb 5e 00 42 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9 ``` This issue had previously gone unnoticed since it didn't really harm runtime correctness, the invalid header address directly loaded from a tagged pointer is only used as prefetch address and will not cause segfaults. However, it still should be corrected because the prefetch would be rendered useless by this issue, and untagging only involves a single bitwise operation without memory access so it's cheap enough to add. - - - - - 05c4fafb by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: use __builtin_offsetof to implement STG_FIELD_OFFSET This patch fixes the STG_FIELD_OFFSET macro definition by using __builtin_offsetof, which is what gcc/clang uses to implement offsetof in standard C. The previous definition that uses NULL pointer involves subtle undefined behavior in C and thus reported by UndefinedBehaviorSanitizer as well: ``` rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58 ``` - - - - - 5ff83bfc by Sylvain Henry at 2024-05-30T14:43:10-04:00 JS: remove useless h$CLOCK_REALTIME (#23202) - - - - - 95ef2d58 by Matthew Pickering at 2024-05-30T14:43:47-04:00 ghcup-metadata: Fix metadata generation There were some syntax errors in the generation script which were preventing it from running. I have tested this with: ``` nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525 ``` which completed successfully. - - - - - 1bc66ee4 by Jakob Bruenker at 2024-05-30T14:44:22-04:00 Add diagrams to Arrows documentation This adds diagrams to the documentation of Arrows, similar to the ones found on https://www.haskell.org/arrows/. It does not add diagrams for ArrowChoice for the time being, mainly because it's not clear to me how to visually distinguish them from the ones for Arrow. Ideally, you might want to do something like highlight the arrows belonging to the same tuple or same Either in common colors, but that's not really possible with unicode. - - - - - d10a1c65 by Matthew Craven at 2024-05-30T23:35:48-04:00 Make UnsafeSNat et al. into pattern synonyms ...so that they do not cause coerce to bypass the nominal role on the corresponding singleton types when they are imported. See Note [Preventing unsafe coercions for singleton types] and the discussion at #23478. This also introduces unsafeWithSNatCo (and analogues for Char and Symbol) so that users can still access the dangerous coercions that importing the real constructors would allow, but only in a very localized way. - - - - - 0958937e by Cheng Shao at 2024-05-30T23:36:25-04:00 hadrian: build C/C++ with split sections when enabled When split sections is enabled, ensure -fsplit-sections is passed to GHC as well when invoking GHC to compile C/C++; and pass -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++ with the hadrian Cc builder. Fixes #23381. - - - - - 02b1f91e by Cheng Shao at 2024-05-30T23:36:25-04:00 driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled When -fsplit-sections is passed to GHC, pass -ffunction-sections -fdata-sections to gcc/clang when building C/C++. Previously, -fsplit-sections was only respected by the NCG/LLVM backends, but not the unregisterised backend; the GHC driver did not pass -fdata-sections and -ffunction-sections to the C compiler, which resulted in excessive executable sizes. Fixes #23381. ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - fd47e2e3 by Cheng Shao at 2024-05-30T23:37:00-04:00 testsuite: mark process005 as fragile on JS - - - - - 34a04ea1 by Matthew Pickering at 2024-05-31T06:08:36-04:00 Add -Wderiving-typeable to -Wall Deriving `Typeable` does nothing, and it hasn't done for a long while. There has also been a warning for a long while which warns you about uselessly deriving it but it wasn't enabled in -Wall. Fixes #24784 - - - - - 75fa7b0b by Matthew Pickering at 2024-05-31T06:08:36-04:00 docs: Fix formatting of changelog entries - - - - - 303c4b33 by Preetham Gujjula at 2024-05-31T06:09:21-04:00 docs: Fix link to injective type families paper Closes #24863 - - - - - df97e9a6 by Ben Gamari at 2024-05-31T06:09:57-04:00 ghc-internal: Fix package description The previous description was inherited from `base` and was inappropriate for `ghc-internal`. Also fix the maintainer and bug reporting fields. Closes #24906. - - - - - bf0737c0 by Cheng Shao at 2024-05-31T06:10:33-04:00 compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans This patch removes special consideration for ArchWasm32 in cmmDoCmmSwitchPlans, which means the compiler will now disable cmmImplementSwitchPlans for wasm unreg backend, just like unreg backend of other targets. We enabled it in the past to workaround some compile-time panic in older versions of LLVM, but those panics are no longer present, hence no need to keep this workaround. - - - - - 7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00 utils: add hie.yaml config file for ghc-config Add hie.yaml to ghc-config project directory so it can be edited using HLS. - - - - - 1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00 hadrian: handle findExecutable "" gracefully hadrian may invoke findExecutable "" at run-time due to a certain program is not found by configure script. Which is fine and findExecutable is supposed to return Nothing in this case. However, on Windows there's a directory bug that throws an exception (see https://github.com/haskell/directory/issues/180), so we might as well use a wrapper for findExecutable and handle exceptions gracefully. - - - - - 4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00 configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails When configure fails to find LLC/OPT/LLVMAS within supported version range, it used to set "llc"/"opt"/"clang" as fallback values. This behavior is particularly troublesome when the user has llc/opt/clang with other versions in their PATH and run the testsuite, since hadrian will incorrectly assume have_llvm=True and pass that to the testsuite driver, resulting in annoying optllvm test failures (#23186). If configure determines llc/opt/clang wouldn't work, then we shouldn't pretend it'll work at all, and the bindist configure will invoke FIND_LLVM_PROG check again at install time anyway. - - - - - 5f1afdf7 by Sylvain Henry at 2024-05-31T15:52:52-04:00 Introduce UniqueSet and use it to replace 'UniqSet Unique' 'UniqSet Unique' represents a set of uniques as a 'Map Unique Unique', which is wasting space (associated key/value are always the same). Fix #23572 and #23605 - - - - - e0aa42b9 by crumbtoo at 2024-05-31T15:53:33-04:00 Improve template-haskell haddocks Closes #15822 - - - - - ae170155 by Olivier Benz at 2024-06-01T09:35:17-04:00 Bump max LLVM version to 19 (not inclusive) - - - - - 92aa65ea by Matthew Pickering at 2024-06-01T09:35:17-04:00 ci: Update CI images to test LLVM 18 The debian12 image in this commit has llvm 18 installed. - - - - - adb1fe42 by Serge S. Gulin at 2024-06-01T09:35:53-04:00 Unicode: make ucd2haskell build-able again ucd2haskell tool used streamly library which version in cabal was out of date. It is updated to the latest version at hackage with deprecated parts rewritten. Also following fixes were applied to existing code in suppose that from its last run the code structure was changed and now it was required to be up to date with actual folder structures: 1. Ghc module path environment got a suffix with `src`. 2. Generated code got 2.1 `GHC.Internal` prefix for `Data.*`. 2.2 `GHC.Unicode.Internal` swapped on `GHC.Internal.Unicode` according to actual structure. - - - - - ad56fd84 by Jade at 2024-06-01T09:36:29-04:00 Replace 'NB' with 'Note' in error messages - - - - - 6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00 compiler: fix -ddump-cmm-raw when compiling .cmm This patch fixes missing -ddump-cmm-raw output when compiling .cmm, which is useful for debugging cmm related codegen issues. - - - - - 1c834ad4 by Ryan Scott at 2024-06-01T09:37:40-04:00 Print namespace specifiers in FixitySig's Outputable instance For whatever reason, the `Outputable` instance for `FixitySig` simply did not print out namespace specifiers, leading to the confusing `-ddump-splices` output seen in #24911. This patch corrects this oversight. Fixes #24911. - - - - - cf49fb5f by Sylvain Henry at 2024-06-01T09:38:19-04:00 Configure: display C++ compiler path - - - - - f9c1ae12 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable PIC for in-tree GMP on wasm32 This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. - - - - - 1a32f828 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable in-tree gmp fft code path for wasm32 This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. - - - - - 06277d56 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: build in-tree GMP with malloc-notreentrant on wasm32 This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. - - - - - 9f614270 by ARATA Mizuki at 2024-06-02T14:02:35-04:00 Set package include paths when assembling .S files Fixes #24839. Co-authored-by: Sylvain Henry <hsyl20 at gmail.com> - - - - - 4998a6ed by Alex Mason at 2024-06-03T02:09:29-04:00 Improve performance of genericWordQuotRem2Op (#22966) Implements the algorithm from compiler-rt's udiv128by64to64default. This rewrite results in a roughly 24x improvement in runtime on AArch64 (and likely any other arch that uses it). - - - - - ae50a8eb by Cheng Shao at 2024-06-03T02:10:05-04:00 testsuite: mark T7773 as fragile on wasm - - - - - c8ece0df by Fendor at 2024-06-03T19:43:22-04:00 Migrate `Finder` component to `OsPath`, fixed #24616 For each module in a GHCi session, we keep alive one `ModLocation`. A `ModLocation` is fairly inefficiently packed, as `String`s are expensive in memory usage. While benchmarking the agda codebase, we concluded that we keep alive around 11MB of `FilePath`'s, solely retained by `ModLocation`. We provide a more densely packed encoding of `ModLocation`, by moving from `FilePath` to `OsPath`. Further, we migrate the full `Finder` component to `OsPath` to avoid unnecessary transformations. As the `Finder` component is well-encapsulated, this requires only a minimal amount of changes in other modules. We introduce pattern synonym for 'ModLocation' which maintains backwards compatibility and avoids breaking consumers of 'ModLocation'. - - - - - 0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00 compiler: emit NaturallyAligned when element type & index type are the same width This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. - - - - - 18f63970 by Sebastian Graf at 2024-06-04T05:05:27-04:00 Parser: Remove unused `apats` rule - - - - - 38757c30 by David Knothe at 2024-06-04T05:05:27-04:00 Implement Or Patterns (#22596) This commit introduces a new language extension, `-XOrPatterns`, as described in GHC Proposal 522. An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ..., `patk` succeed, in this order. See also the summary `Note [Implmentation of OrPatterns]`. Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> - - - - - 395412e8 by Cheng Shao at 2024-06-04T05:06:04-04:00 compiler/ghci/rts: remove stdcall support completely We have formally dropped i386 windows support (#18487) a long time ago. The stdcall foreign call convention is only used by i386 windows, and the legacy logic around it is a significant maintenance burden for future work that adds arm64 windows support (#24603). Therefore, this patch removes stdcall support completely from the compiler as well as the RTS (#24883): - stdcall is still recognized as a FFI calling convention in Haskell syntax. GHC will now unconditionally emit a warning (-Wunsupported-calling-conventions) and treat it as ccall. - Apart from minimum logic to support the parsing and warning logic, all other code paths related to stdcall has been completely stripped from the compiler. - ghci only supports FFI_DEFAULT_ABI and ccall convention from now on. - FFI foreign export adjustor code on all platforms no longer handles the stdcall case and only handles ccall from now on. - The Win32 specific parts of RTS no longer has special code paths for stdcall. This commit is the final nail on the coffin for i386 windows support. Further commits will perform more housecleaning to strip the legacy code paths and pave way for future arm64 windows support. - - - - - d1fe9ab6 by Cheng Shao at 2024-06-04T05:06:04-04:00 rts: remove legacy i386 windows code paths This commit removes some legacy i386 windows related code paths in the RTS, given this target is no longer supported. - - - - - a605e4b2 by Cheng Shao at 2024-06-04T05:06:04-04:00 autoconf: remove i386 windows related logic This commit removes legacy i386 windows logic in autoconf scripts. - - - - - 91e5ac5e by Cheng Shao at 2024-06-04T05:06:04-04:00 llvm-targets: remove i386 windows support This commit removes i386 windows from llvm-targets and the script to generate it. - - - - - 65fe75a4 by Cheng Shao at 2024-06-04T05:06:04-04:00 libraries/utils: remove stdcall related legacy logic This commit removes stdcall related legacy logic in libraries and utils. ccall should be used uniformly for all supported windows hosts from now on. - - - - - d2a83302 by Cheng Shao at 2024-06-04T05:06:04-04:00 testsuite: adapt the testsuite for stdcall removal This patch adjusts test cases to handle the stdcall removal: - Some stdcall usages are replaced with ccall since stdcall doesn't make sense anymore. - We also preserve some stdcall usages, and check in the expected warning messages to ensure GHC always warn about stdcall usages (-Wunsupported-calling-conventions) as expected. - Error code testsuite coverage is slightly improved, -Wunsupported-calling-conventions is now tested. - Obsolete code paths related to i386 windows are also removed. - - - - - cef8f47a by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: minor adjustments for stdcall removal This commit include minor adjustments of documentation related to stdcall removal. - - - - - 54332437 by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: mention i386 Windows removal in 9.12 changelog This commit mentions removal of i386 Windows support and stdcall related change in the 9.12 changelog. - - - - - 2aaea8a1 by Cheng Shao at 2024-06-04T05:06:40-04:00 hadrian: improve user settings documentation This patch adds minor improvements to hadrian user settings documentation: - Add missing `ghc.cpp.opts` case - Remove non-existent `cxx` case - Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't - Add example of passing configure argument to autoconf packages - - - - - 71010381 by Alex Mason at 2024-06-04T12:09:07-04:00 Add AArch64 CLZ, CTZ, RBIT primop implementations. Adds support for emitting the clz and rbit instructions, which are used by GHC.Prim.clz*#, GHC.Prim.ctz*# and GHC.Prim.bitReverse*#. - - - - - 44e2abfb by Cheng Shao at 2024-06-04T12:09:43-04:00 hadrian: add +text_simdutf flavour transformer to allow building text with simdutf This patch adds a +text_simdutf flavour transformer to hadrian to allow downstream packagers and users that build from source to opt-in simdutf support for text, in order to benefit from SIMD speedup at run-time. It's still disabled by default for the time being. - - - - - 077cb2e1 by Cheng Shao at 2024-06-04T12:09:43-04:00 ci: enable +text_simdutf flavour transformer for wasm jobs This commit enables +text_simdutf flavour transformer for wasm jobs, so text is now built with simdutf support for wasm. - - - - - b23746ad by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Use TemplateHaskellQuotes in instance Lift ByteArray Resolves #24852 - - - - - 3fd25743 by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Mark addrToByteArray as NOINLINE This function should never be inlined in order to keep code size small. - - - - - 98ad1ea5 by Cheng Shao at 2024-06-04T22:51:26-04:00 compiler: remove unused CompilerInfo/LinkerInfo types This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. - - - - - 11795244 by Cheng Shao at 2024-06-05T06:33:17-04:00 rts: remove unused PowerPC/IA64 native adjustor code This commit removes unused PowerPC/IA64 native adjustor code which is never actually enabled by autoconf/hadrian. Fixes #24920. - - - - - 5132754b by Sylvain Henry at 2024-06-05T06:33:57-04:00 RTS: fix warnings with doing*Profiling (#24918) - - - - - accc8c33 by Cheng Shao at 2024-06-05T11:35:36-04:00 hadrian: don't depend on inplace/mingw when --enable-distro-toolchain on Windows - - - - - 6ffbd678 by Cheng Shao at 2024-06-05T11:35:37-04:00 autoconf: normalize paths of some build-time dependencies on Windows This commit applies path normalization via cygpath -m to some build-time dependencies on Windows. Without this logic, the /clang64/bin prefixed msys2-style paths cause the build to fail with --enable-distro-toolchain. - - - - - 075dc6d4 by Cheng Shao at 2024-06-05T11:36:12-04:00 hadrian: remove OSDarwin mention from speedHack This commit removes mentioning of OSDarwin from speedHack, since speedHack is purely for i386 and we no longer support i386 darwin (#24921). - - - - - 83235c4c by Cheng Shao at 2024-06-05T11:36:12-04:00 compiler: remove 32-bit darwin logic This commit removes all 32-bit darwin logic from the compiler, given we no longer support 32-bit apple systems (#24921). Also contains a bit more cleanup of obsolete i386 windows logic. - - - - - 1eb99bc3 by Cheng Shao at 2024-06-05T11:36:12-04:00 rts: remove 32-bit darwin/ios logic This commit removes 32-bit darwin/ios related logic from the rts, given we no longer support them (#24921). - - - - - 24f65892 by Cheng Shao at 2024-06-05T11:36:12-04:00 llvm-targets: remove 32-bit darwin/ios targets This commit removes 32-bit darwin/ios targets from llvm-targets given we no longer support them (#24921). - - - - - ccdbd689 by Cheng Shao at 2024-06-05T11:36:12-04:00 testsuite: remove 32-bit darwin logic This commit removes 32-bit darwin logic from the testsuite given it's no longer supported (#24921). Also contains more cleanup of obsolete i386 windows logic. - - - - - 11d661c4 by Cheng Shao at 2024-06-05T11:36:13-04:00 docs: mention 32-bit darwin/ios removal in 9.12 changelog This commit mentions removal of 32-bit darwin/ios support (#24921) in the 9.12 changelog. - - - - - 7c173310 by Georgi Lyubenov at 2024-06-05T15:17:22-04:00 Add firstA and secondA to Data.Bitraversable Please see https://github.com/haskell/core-libraries-committee/issues/172 for related discussion - - - - - 3b6f9fd1 by Ben Gamari at 2024-06-05T15:17:59-04:00 base: Fix name of changelog Fixes #24899. Also place it under `extra-doc-files` to better reflect its nature and avoid triggering unnecessary recompilation if it changes. - - - - - 1f4d2ef7 by Sebastian Graf at 2024-06-05T15:18:34-04:00 Announce Or-patterns in the release notes for GHC 9.12 (#22596) Leftover from !9229. - - - - - 8650338d by Jan Hrček at 2024-06-06T10:39:24-04:00 Improve haddocks of Language.Haskell.Syntax.Pat.Pat - - - - - 2eee65e1 by Cheng Shao at 2024-06-06T10:40:00-04:00 testsuite: bump T7653 timeout for wasm - - - - - 990fed60 by Sylvain Henry at 2024-06-07T14:45:23-04:00 StgToCmm: refactor opTranslate and friends - Change arguments order to avoid `\args -> ...` lambdas - Fix documentation - Rename StgToCmm options ("big" doesn't mean anything) - - - - - 1afad514 by Sylvain Henry at 2024-06-07T14:45:23-04:00 NCG x86: remove dead code (#5444) Since 6755d833af8c21bbad6585144b10e20ac4a0a1ab this code is dead. - - - - - 595c0894 by Cheng Shao at 2024-06-07T14:45:58-04:00 testsuite: skip objc-hi/objcxx-hi when cross compiling objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. - - - - - edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 7f656004 by Ben Gamari at 2024-11-15T13:40:23-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 14 changed files: - .ghcid - + .git-blame-ignore-revs - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs - .gitlab/generate-ci/generate-job-metadata - .gitlab/generate-ci/generate-jobs - − .gitlab/issue_templates/bug.md - + .gitlab/issue_templates/default.md The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6a9ef839796f5eb3dc511857d7d4f58ffe4718c1...7f656004b69f2f4dd09af3f35472420fba739adf -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6a9ef839796f5eb3dc511857d7d4f58ffe4718c1...7f656004b69f2f4dd09af3f35472420fba739adf You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 18:42:24 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 13:42:24 -0500 Subject: [Git][ghc/ghc][wip/hadrian-haddock-opts] hadrian: Allow haddock options to be passed via key-value settings Message-ID: <6737961072da9_18c21270ae54943f7@gitlab.mail> Ben Gamari pushed to branch wip/hadrian-haddock-opts at Glasgow Haskell Compiler / GHC Commits: 9ada3ab7 by Ben Gamari at 2024-11-15T13:42:16-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 2 changed files: - hadrian/doc/user-settings.md - hadrian/src/Flavour.hs Changes: ===================================== hadrian/doc/user-settings.md ===================================== @@ -138,6 +138,9 @@ the right names for them: * `runtest.opts` defines extra arguments passed to `runtest.py` when invoked via the `hadrian test` target. + * `haddock.build-package.opts` defines arguments to be passed to Haddock + when building documentation. + - using a wildcard (`*`) ranges over all possible values for a given "slot"; - `=` entirely overrides the arguments for a given builder in a given context, with the value specified on the right hand side of `=`, while `+=` merely ===================================== hadrian/src/Flavour.hs ===================================== @@ -555,6 +555,7 @@ builderPredicate = builderSetting <&> (\(wstg, wpkg, builderMode) -> BM_CabalConfigure -> builder (Cabal Setup) BM_RunTest -> builder Testsuite BM_Hsc2HsRun -> builder Hsc2Hs + BM_Haddock -> builder (Haddock BuildPackage) ) ) @@ -566,6 +567,7 @@ data BuilderMode = BM_Ghc (Wildcard GhcMode) | BM_CabalConfigure | BM_Hsc2HsRun | BM_RunTest + | BM_Haddock -- | Interpretation-agnostic description of the builder settings -- supported by Hadrian. @@ -606,6 +608,7 @@ builderSetting = , str "cc" *> fmap BM_Cc (wild ccBuilder) <* str "opts" , BM_CabalConfigure <$ str "cabal" <* str "configure" <* str "opts" , BM_Hsc2HsRun <$ str "hsc2hs" <* str "run" <* str "opts" + , BM_Haddock <$ str "haddock" <* str "build-package" <* str "opts" ] , (Wildcard, Wildcard, BM_RunTest) <$ str "runtest" <* str "opts" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ada3ab71ce6ef793fa95549e55014f80e98f037 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ada3ab71ce6ef793fa95549e55014f80e98f037 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 18:51:22 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 13:51:22 -0500 Subject: [Git][ghc/ghc][wip/kill-ioport] 413 commits: TTG HsCmdArrForm: use Fixity via extension point Message-ID: <6737982a610aa_18c21280b4fc100722@gitlab.mail> Ben Gamari pushed to branch wip/kill-ioport at Glasgow Haskell Compiler / GHC Commits: d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - 18eb9eb3 by Ben Gamari at 2024-11-15T13:51:07-05:00 Kill IOPort# This type is unnecessary, having been superceded by `MVar` and a rework of WinIO's blocking logic. See #20947. See https://github.com/haskell/core-libraries-committee/issues/213. - - - - - 17 changed files: - .ghcid - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - .gitmodules - CODEOWNERS - boot - cabal.project-reinstall - compiler/CodeGen.Platform.h - compiler/GHC.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/93442f548f6bbb1f7d471e27c79ffaee99a8bb2d...18eb9eb3a1bc478908756dc66106c9c40519fd3d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/93442f548f6bbb1f7d471e27c79ffaee99a8bb2d...18eb9eb3a1bc478908756dc66106c9c40519fd3d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 18:56:05 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 13:56:05 -0500 Subject: [Git][ghc/ghc][wip/time-splices] 598 commits: Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw Message-ID: <6737994510c61_18c212a8f9801110d3@gitlab.mail> Ben Gamari pushed to branch wip/time-splices at Glasgow Haskell Compiler / GHC Commits: edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - d494f472 by Ben Gamari at 2024-11-15T13:55:49-05:00 compiler: Time splice execution - - - - - 9 changed files: - .ghcid - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/50a8cc330117e3771e56777aedc28ae48fe79619...d494f472ae24c712fbde483064b1984d0f256cb7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/50a8cc330117e3771e56777aedc28ae48fe79619...d494f472ae24c712fbde483064b1984d0f256cb7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 19:02:21 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 14:02:21 -0500 Subject: [Git][ghc/ghc][wip/T24741] Introduce GHC.Tc.Plugin.lookupTHName Message-ID: <67379abd68787_18c212b88ddc112693@gitlab.mail> Ben Gamari pushed to branch wip/T24741 at Glasgow Haskell Compiler / GHC Commits: c829fe20 by Ben Gamari at 2024-11-15T14:02:13-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - 1 changed file: - compiler/GHC/Tc/Plugin.hs Changes: ===================================== compiler/GHC/Tc/Plugin.hs ===================================== @@ -15,6 +15,7 @@ module GHC.Tc.Plugin ( lookupOrig, -- * Looking up Names in the typechecking environment + lookupTHName, tcLookupGlobal, tcLookupTyCon, tcLookupDataCon, @@ -74,6 +75,7 @@ import GHC.Tc.Utils.Env ( TcTyThing ) import GHC.Tc.Types.Evidence ( CoercionHole, EvTerm(..) , EvExpr, EvBindsVar, EvBind, mkGivenEvBind ) import GHC.Types.Var ( EvVar ) +import GHC.Plugins ( thNameToGhcNameIO ) import GHC.Unit.Module ( ModuleName, Module ) import GHC.Types.Name ( OccName, Name ) @@ -90,6 +92,7 @@ import GHC.Core.InstEnv ( InstEnvs ) import GHC.Types.Unique ( Unique ) import GHC.Types.PkgQual ( PkgQual ) +import qualified GHC.Internal.TH.Syntax as TH -- | Perform some IO, typically to interact with an external tool. tcPluginIO :: IO a -> TcPluginM a @@ -108,6 +111,13 @@ findImportedModule mod_name mb_pkg = do lookupOrig :: Module -> OccName -> TcPluginM Name lookupOrig mod = unsafeTcPluginTcM . IfaceEnv.lookupOrig mod +-- | Resolve a @template-haskell@ 'TH.Name' to a GHC 'Name'. +-- +-- @since 9.14.1 +lookupTHName :: TH.Name -> TcPluginM (Maybe Name) +lookupTHName th = do + nc <- hsc_NC <$> getTopEnv + tcPluginIO $ thNameToGhcNameIO nc th tcLookupGlobal :: Name -> TcPluginM TyThing tcLookupGlobal = unsafeTcPluginTcM . TcM.tcLookupGlobal View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c829fe20eea714e344ca2cfd9b85926f585ac021 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c829fe20eea714e344ca2cfd9b85926f585ac021 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 20:16:56 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 15:16:56 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T22003 Message-ID: <6737ac38e69be_18c21211227ac1224c2@gitlab.mail> Ben Gamari pushed new branch wip/T22003 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T22003 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 21:09:22 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 16:09:22 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25485 Message-ID: <6737b882a0ac3_18c21213dbebc1277b@gitlab.mail> Ben Gamari pushed new branch wip/T25485 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25485 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 21:10:30 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 16:10:30 -0500 Subject: [Git][ghc/ghc][wip/T25485] rts/adjustor: Fix stack overrun error in Nativei386 adjustor Message-ID: <6737b8c6ee483_18c21214e0d581279a5@gitlab.mail> Ben Gamari pushed to branch wip/T25485 at Glasgow Haskell Compiler / GHC Commits: 490ca885 by Ben Gamari at 2024-11-15T16:10:21-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 1 changed file: - rts/adjustor/Nativei386.c Changes: ===================================== rts/adjustor/Nativei386.c ===================================== @@ -90,7 +90,7 @@ createAdjustor(StgStablePtr hptr, StgFunPtr wptr, void freeHaskellFunctionPtr(void* ptr) { - struct AdjustorContext context; + struct CCallContext context; free_adjustor(ptr, &context); freeStablePtr(context.hptr); } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/490ca8856e85cafff405782f9352639f17c9e97d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/490ca8856e85cafff405782f9352639f17c9e97d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 15 21:47:33 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 15 Nov 2024 16:47:33 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: gitlab: mention CLC in MR template Message-ID: <6737c17534744_18c2121866f7c14122@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - e1063c5e by Ben Gamari at 2024-11-15T16:47:24-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - d55e1a11 by Ben Gamari at 2024-11-15T16:47:24-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 12 changed files: - .gitlab/merge_request_templates/Default.md - rts/Capability.h - rts/StgCRunAsm.S - rts/adjustor/NativeAmd64Asm.S - rts/adjustor/NativeAmd64MingwAsm.S - rts/adjustor/Nativei386Asm.S - rts/configure.ac - rts/include/rts/Config.h - rts/include/rts/storage/HeapAlloc.h - rts/posix/ticker/TimerFd.c - rts/sm/GC.c - rts/sm/GCThread.h Changes: ===================================== .gitlab/merge_request_templates/Default.md ===================================== @@ -7,7 +7,12 @@ expectations. Also please answer the following question in your MR description:* Please take a few moments to address the following points: - * [ ] if your MR may break existing programs (e.g. touches `base` or causes the + * [ ] if your MR touches `base` (or touches parts of `ghc-internal` used + or re-exported by `base`) more substantially than just amending comments + or documentation, you likely need to raise a + [CLC proposal](https://github.com/haskell/core-libraries-committee#base-package) + before merging it. + * [ ] if your MR may break existing programs (e.g. causes the compiler to reject programs), please describe the expected breakage and add the ~"user-facing" label. This will run ghc/head.hackage> to characterise the effect of your change on Hackage. ===================================== rts/Capability.h ===================================== @@ -29,11 +29,7 @@ // We never want a Capability to overlap a cache line with // anything else, so round it up to a cache line size: -#if defined(s390x_HOST_ARCH) -#define CAPABILITY_ALIGNMENT 256 -#else -#define CAPABILITY_ALIGNMENT 64 -#endif +#define CAPABILITY_ALIGNMENT CACHELINE_SIZE /* A forward declaration of the per-capability data structures belonging to * the I/O manager. It is opaque and only passed by pointer, so the full ===================================== rts/StgCRunAsm.S ===================================== @@ -497,6 +497,6 @@ StgReturn: #endif /* !USE_MINIINTERPRETER */ /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/NativeAmd64Asm.S ===================================== @@ -113,6 +113,6 @@ complex_ccall_ret_code: ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/NativeAmd64MingwAsm.S ===================================== @@ -135,6 +135,6 @@ complex_ccall_ret_code: ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/adjustor/Nativei386Asm.S ===================================== @@ -52,6 +52,6 @@ DECLARE_CSYM(ccall_adjustor) ret /* mark stack as nonexecutable */ -#if defined(__linux__) && defined(__ELF__) +#if defined(HAVE_GNU_NONEXEC_STACK) .section .note.GNU-stack,"", at progbits #endif ===================================== rts/configure.ac ===================================== @@ -83,6 +83,10 @@ AS_IF([test x"${TargetHasSubsectionsViaSymbols}" = x"YES"], [AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1], [Define to 1 if Apple-style dead-stripping is supported.])]) +GHC_GNU_NONEXEC_STACK +AS_IF([test x"$TargetHasGnuNonexecStack" = x"YES"], + [AC_DEFINE([HAVE_GNU_NONEXEC_STACK], [1], [Define (to 1) if GNU-style non-executable stack note is supported])]) + dnl -------------------------------------------------- dnl * Platform header file and syscall feature tests dnl ### checking the state of the local header files and syscalls ### ===================================== rts/include/rts/Config.h ===================================== @@ -82,3 +82,19 @@ code. #else #define MAX_N_CAPABILITIES 1 #endif + +// The host's cacheline size. +// We use 128-bytes here on AArch64 as this is the cache-line size of new Apple +// ARMv8 platforms. +// +// At some point we may want to determine this via `configure`. +#if defined(s390x_HOST_ARCH) +#define CACHELINE_SIZE 256 +#elif defined(aarch64_HOST_ARCH) +#define CACHELINE_SIZE 128 +#elif defined(x86_64_HOST_ARCH) +#define CACHELINE_SIZE 64 +#else +#define CACHELINE_SIZE 64 +#endif + ===================================== rts/include/rts/storage/HeapAlloc.h ===================================== @@ -59,7 +59,7 @@ extern SpinLock gc_alloc_block_sync; struct mblock_address_range { W_ begin, end; W_ padding[6]; // ensure nothing else inhabits this cache line -} ATTRIBUTE_ALIGNED(64); +} ATTRIBUTE_ALIGNED(CACHELINE_SIZE); extern struct mblock_address_range mblock_address_space; # define HEAP_ALLOCED(p) ((W_)(p) >= mblock_address_space.begin && \ ===================================== rts/posix/ticker/TimerFd.c ===================================== @@ -115,7 +115,7 @@ static void *itimer_thread_func(void *_handle_tick) // While the RTS attempts to mask signals, some foreign libraries // may rely on signal delivery may unmask them. Consequently we may // see EINTR. See #24610. - if (errno != -EINTR) { + if (errno != EINTR) { sysErrorBelch("Ticker: poll failed: %s", strerror(errno)); } } ===================================== rts/sm/GC.c ===================================== @@ -153,9 +153,9 @@ static Condition gc_exit_arrived_cv; static Condition gc_exit_leave_now_cv; #else // THREADED_RTS -// Must be aligned to 64-bytes to meet stated 64-byte alignment of gen_workspace +// Must match the alignment of gen_workspace. StgWord8 the_gc_thread[sizeof(gc_thread) + 64 * sizeof(gen_workspace)] - ATTRIBUTE_ALIGNED(64); + ATTRIBUTE_ALIGNED(GEN_WORKSPACE_ALIGNMENT); #endif // THREADED_RTS /* Note [n_gc_threads] ===================================== rts/sm/GCThread.h ===================================== @@ -75,6 +75,14 @@ ------------------------------------------------------------------------- */ +// align so that: +// * no two threads' workspaces fall in the same cache-line +// * computing gct->gens[n] is a shift, not a multiply +// fails if the size is <64, which is why we need the pad above +// We use 128-bytes here as this is the cache-line size of new Apple ARMv8 +// platforms. +#define GEN_WORKSPACE_ALIGNMENT CACHELINE_SIZE + typedef struct gen_workspace_ { generation * gen; // the gen for this workspace struct gc_thread_ * my_gct; // the gc_thread that contains this workspace @@ -101,9 +109,7 @@ typedef struct gen_workspace_ { bdescr * part_list; StgWord n_part_blocks; // count of above StgWord n_part_words; -} gen_workspace ATTRIBUTE_ALIGNED(64); -// align so that computing gct->gens[n] is a shift, not a multiply -// fails if the size is <64, which is why we need the pad above +} gen_workspace ATTRIBUTE_ALIGNED(GEN_WORKSPACE_ALIGNMENT); /* ---------------------------------------------------------------------------- GC thread object View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/16efa1439b7a415f5e3d1cb32bc3b70cf65ab8ed...d55e1a11d401dfab3751f43c6c3a2540c4f02813 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/16efa1439b7a415f5e3d1cb32bc3b70cf65ab8ed...d55e1a11d401dfab3751f43c6c3a2540c4f02813 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 00:06:49 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 15 Nov 2024 19:06:49 -0500 Subject: [Git][ghc/ghc][wip/alpine-i386] 24 commits: testsuite: normalise some versions in callstacks Message-ID: <6737e21990852_17cbea798bf02848b@gitlab.mail> Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC Commits: e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - f4fc4a12 by Ben Gamari at 2024-11-15T19:06:38-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. - - - - - 22261da3 by Ben Gamari at 2024-11-15T19:06:39-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Julian and Mikolaj. - - - - - 5b65ae3b by Ben Gamari at 2024-11-15T19:06:39-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 22546fa9 by Ben Gamari at 2024-11-15T19:06:39-05:00 rts: Eliminate platform-dependent casting Previously serialiseTaskId had some superfluous platform-dependent logic to determine whether or not TaskId OsThreadId is an integer. However, this is unnecessary; we now just unconditionally cast through uintptr_t. - - - - - 30 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - boot - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/HsType.hs - compiler/GHC/Tc/Gen/Pat.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - − distrib/cross-port - hadrian/bindist/config.mk.in - libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs - m4/fp_setup_project_version.m4 - rts/IOManager.c - rts/Linker.c - rts/Task.h - rts/Updates.h - testsuite/driver/testlib.py - testsuite/tests/backpack/should_compile/all.T - testsuite/tests/backpack/should_compile/bkp16.stderr - testsuite/tests/backpack/should_fail/all.T The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/737a50d69d5a6747a1610f33cd7c5d88cffb95a1...22546fa98fde6368f3af8027d044ddcc12936383 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/737a50d69d5a6747a1610f33cd7c5d88cffb95a1...22546fa98fde6368f3af8027d044ddcc12936383 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 10:28:10 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 05:28:10 -0500 Subject: [Git][ghc/ghc][master] rts: Fix EINTR check in timerfd ticker Message-ID: <673873b9f2696_3438e11dcdd873471@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - 1 changed file: - rts/posix/ticker/TimerFd.c Changes: ===================================== rts/posix/ticker/TimerFd.c ===================================== @@ -115,7 +115,7 @@ static void *itimer_thread_func(void *_handle_tick) // While the RTS attempts to mask signals, some foreign libraries // may rely on signal delivery may unmask them. Consequently we may // see EINTR. See #24610. - if (errno != -EINTR) { + if (errno != EINTR) { sysErrorBelch("Ticker: poll failed: %s", strerror(errno)); } } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2c427cb02f7c31398053383d9e9051b55cee7139 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2c427cb02f7c31398053383d9e9051b55cee7139 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 10:28:44 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 05:28:44 -0500 Subject: [Git][ghc/ghc][master] rts: Increase gen_workspace alignment to 128 bytes on AArch64 Message-ID: <673873dc10f28_3438e1290e64780de@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 5 changed files: - rts/Capability.h - rts/include/rts/Config.h - rts/include/rts/storage/HeapAlloc.h - rts/sm/GC.c - rts/sm/GCThread.h Changes: ===================================== rts/Capability.h ===================================== @@ -29,11 +29,7 @@ // We never want a Capability to overlap a cache line with // anything else, so round it up to a cache line size: -#if defined(s390x_HOST_ARCH) -#define CAPABILITY_ALIGNMENT 256 -#else -#define CAPABILITY_ALIGNMENT 64 -#endif +#define CAPABILITY_ALIGNMENT CACHELINE_SIZE /* A forward declaration of the per-capability data structures belonging to * the I/O manager. It is opaque and only passed by pointer, so the full ===================================== rts/include/rts/Config.h ===================================== @@ -82,3 +82,19 @@ code. #else #define MAX_N_CAPABILITIES 1 #endif + +// The host's cacheline size. +// We use 128-bytes here on AArch64 as this is the cache-line size of new Apple +// ARMv8 platforms. +// +// At some point we may want to determine this via `configure`. +#if defined(s390x_HOST_ARCH) +#define CACHELINE_SIZE 256 +#elif defined(aarch64_HOST_ARCH) +#define CACHELINE_SIZE 128 +#elif defined(x86_64_HOST_ARCH) +#define CACHELINE_SIZE 64 +#else +#define CACHELINE_SIZE 64 +#endif + ===================================== rts/include/rts/storage/HeapAlloc.h ===================================== @@ -59,7 +59,7 @@ extern SpinLock gc_alloc_block_sync; struct mblock_address_range { W_ begin, end; W_ padding[6]; // ensure nothing else inhabits this cache line -} ATTRIBUTE_ALIGNED(64); +} ATTRIBUTE_ALIGNED(CACHELINE_SIZE); extern struct mblock_address_range mblock_address_space; # define HEAP_ALLOCED(p) ((W_)(p) >= mblock_address_space.begin && \ ===================================== rts/sm/GC.c ===================================== @@ -153,9 +153,9 @@ static Condition gc_exit_arrived_cv; static Condition gc_exit_leave_now_cv; #else // THREADED_RTS -// Must be aligned to 64-bytes to meet stated 64-byte alignment of gen_workspace +// Must match the alignment of gen_workspace. StgWord8 the_gc_thread[sizeof(gc_thread) + 64 * sizeof(gen_workspace)] - ATTRIBUTE_ALIGNED(64); + ATTRIBUTE_ALIGNED(GEN_WORKSPACE_ALIGNMENT); #endif // THREADED_RTS /* Note [n_gc_threads] ===================================== rts/sm/GCThread.h ===================================== @@ -75,6 +75,14 @@ ------------------------------------------------------------------------- */ +// align so that: +// * no two threads' workspaces fall in the same cache-line +// * computing gct->gens[n] is a shift, not a multiply +// fails if the size is <64, which is why we need the pad above +// We use 128-bytes here as this is the cache-line size of new Apple ARMv8 +// platforms. +#define GEN_WORKSPACE_ALIGNMENT CACHELINE_SIZE + typedef struct gen_workspace_ { generation * gen; // the gen for this workspace struct gc_thread_ * my_gct; // the gc_thread that contains this workspace @@ -101,9 +109,7 @@ typedef struct gen_workspace_ { bdescr * part_list; StgWord n_part_blocks; // count of above StgWord n_part_words; -} gen_workspace ATTRIBUTE_ALIGNED(64); -// align so that computing gct->gens[n] is a shift, not a multiply -// fails if the size is <64, which is why we need the pad above +} gen_workspace ATTRIBUTE_ALIGNED(GEN_WORKSPACE_ALIGNMENT); /* ---------------------------------------------------------------------------- GC thread object View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a0fa4941903272c48b050d24e93eec819eff51bd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a0fa4941903272c48b050d24e93eec819eff51bd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 11:00:09 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 06:00:09 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: rts: Fix EINTR check in timerfd ticker Message-ID: <67387b39a8cb3_3438e171e7c482346@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - e6f02c70 by Ben Gamari at 2024-11-16T05:59:38-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - 4a4b7563 by Ben Gamari at 2024-11-16T05:59:39-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - 7114cce6 by Ben Gamari at 2024-11-16T05:59:39-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 2df3955d by Ben Gamari at 2024-11-16T05:59:39-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 11d8e2ca by Ben Gamari at 2024-11-16T05:59:39-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - af4656c5 by Ben Gamari at 2024-11-16T05:59:39-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - e5f4f4ca by Ben Gamari at 2024-11-16T05:59:39-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - bf2f1d70 by Ben Gamari at 2024-11-16T05:59:40-05:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Fixes #24382. - - - - - 4aa21f7b by ARATA Mizuki at 2024-11-16T05:59:46-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - c05e2e48 by sheaf at 2024-11-16T05:59:54-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - ed17b4c5 by Ben Gamari at 2024-11-16T05:59:54-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 30 changed files: - .gitlab/ci.sh - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Tc/Plugin.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/debug-info.rst - docs/users_guide/exts/equality_constraints.rst - docs/users_guide/release-notes.rst - hadrian/cabal.project - hadrian/hadrian.cabal - hadrian/stack.yaml - rts/Capability.h - rts/RtsFlags.c - rts/Task.h - rts/include/rts/Config.h - rts/include/rts/storage/HeapAlloc.h - rts/posix/ticker/TimerFd.c - rts/sm/GC.c - rts/sm/GCThread.h - + testsuite/tests/rts/T20201a.hs - + testsuite/tests/rts/T20201a.stderr - + testsuite/tests/rts/T20201b.hs - + testsuite/tests/rts/T20201b.stderr - testsuite/tests/rts/all.T - + testsuite/tests/simd/should_run/T25455.hs - + testsuite/tests/simd/should_run/T25455.stdout - testsuite/tests/simd/should_run/all.T - + testsuite/tests/simd/should_run/simd_insert.hs - + testsuite/tests/simd/should_run/simd_insert.stdout The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d55e1a11d401dfab3751f43c6c3a2540c4f02813...ed17b4c500665cf4db48f2600120ecca805f9765 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d55e1a11d401dfab3751f43c6c3a2540c4f02813...ed17b4c500665cf4db48f2600120ecca805f9765 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 12:19:57 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Sat, 16 Nov 2024 07:19:57 -0500 Subject: [Git][ghc/ghc][wip/romes/exceptions-propagate] 3 commits: Fix exception backtraces from GHCi Message-ID: <67388dedec7c1_1aefb52d12d451046@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/exceptions-propagate at Glasgow Haskell Compiler / GHC Commits: b8c08a73 by Rodrigo Mesquita at 2024-11-16T12:19:44+00:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 6d1bf2e8 by Rodrigo Mesquita at 2024-11-16T12:19:45+00:00 base: Add to changelog.md CLC #285 - - - - - 7fb837de by Rodrigo Mesquita at 2024-11-16T12:19:45+00:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 18 changed files: - ghc/GHCi/UI/Monad.hs - libraries/array - libraries/base/changelog.md - libraries/ghci/GHCi/Message.hs - libraries/ghci/GHCi/Run.hs - libraries/stm - testsuite/tests/ghc-e/should_run/ghc-e005.stderr - testsuite/tests/ghci.debugger/scripts/break009.stdout - testsuite/tests/ghci.debugger/scripts/break011.stdout - testsuite/tests/ghci.debugger/scripts/break017.stdout - testsuite/tests/ghci.debugger/scripts/break024.stdout - testsuite/tests/ghci/scripts/Defer02.stderr - testsuite/tests/ghci/scripts/T10501.stderr - testsuite/tests/ghci/scripts/T15325.stderr - testsuite/tests/ghci/scripts/T5557.stdout - testsuite/tests/ghci/scripts/ghci055.stdout - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/patsyn/should_run/ghci.stderr Changes: ===================================== ghc/GHCi/UI/Monad.hs ===================================== @@ -1,4 +1,4 @@ -{-# LANGUAGE FlexibleInstances, DeriveFunctor, DerivingVia #-} +{-# LANGUAGE FlexibleInstances, DeriveFunctor, DerivingVia, CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ----------------------------------------------------------------------------- @@ -212,7 +212,14 @@ data CommandResult deriving Show cmdSuccess :: MonadThrow m => CommandResult -> m (Maybe Bool) -cmdSuccess CommandComplete{ cmdResult = Left e } = throwM e +cmdSuccess CommandComplete{ cmdResult = Left e } = + {- Don't add a backtrace from ghci/ghc to the exception from the user program! -} +#if MIN_VERSION_base(4,21,0) + throwM (NoBacktrace e) +#else + -- NoBacktrace is not available in older compilers + throwM e +#endif cmdSuccess CommandComplete{ cmdResult = Right r } = return r cmdSuccess CommandIncomplete = return $ Just True ===================================== libraries/array ===================================== @@ -1 +1 @@ -Subproject commit c9cb2c1e8762aa83b6e77af82c87a55e03e990e4 +Subproject commit 18dd1439815e43c3e8142cca7b4735c8ad9850ab ===================================== libraries/base/changelog.md ===================================== @@ -39,6 +39,17 @@ `onException`, such as `base`, or the `exceptions` package. * Move `Lift ByteArray` and `Lift Fixed` instances into `base` from `template-haskell`. See [CLC proposal #287](https://github.com/haskell/core-libraries-committee/issues/287). * Make `Debug.Trace.{traceEventIO,traceMarkerIO}` faster when tracing is disabled. See [CLC proposal #291](https://github.com/haskell/core-libraries-committee/issues/291). + * The exception messages were improved according to [CLC proposal #285](https://github.com/haskell/core-libraries-committee/issues/285). In particular: + * Improve the message of the uncaught exception handler + * Make `displayException (SomeException e) = displayException e`. The + additional information that is printed when exceptions are surfaced to + the top-level is added by `uncaughtExceptionHandler`. + * Get rid of the HasCallStack mechanism manually propagated by `ErrorCall` + in favour of the more general HasCallStack exception backtrace + mechanism, to remove duplicate call stacks for uncaught exceptions. + * Freeze the callstack of `error`, `undefined`, `throwIO`, `ioException`, + `ioError` to prevent leaking the implementation of these error functions + into the callstack. ## 4.20.0.0 May 2024 * Shipped with GHC 9.10.1 ===================================== libraries/ghci/GHCi/Message.hs ===================================== @@ -1,6 +1,6 @@ {-# LANGUAGE GADTs, DeriveGeneric, StandaloneDeriving, ScopedTypeVariables, - GeneralizedNewtypeDeriving, ExistentialQuantification, RecordWildCards - #-} + GeneralizedNewtypeDeriving, ExistentialQuantification, RecordWildCards, + CPP #-} {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-orphans #-} -- | @@ -40,6 +40,9 @@ import GHC.Fingerprint import GHC.Conc (pseq, par) import Control.Concurrent import Control.Exception +#if MIN_VERSION_base(4,20,0) +import Control.Exception.Context +#endif import Data.Binary import Data.Binary.Get import Data.Binary.Put @@ -442,7 +445,15 @@ toSerializableException :: SomeException -> SerializableException toSerializableException ex | Just UserInterrupt <- fromException ex = EUserInterrupt | Just (ec::ExitCode) <- fromException ex = (EExitCode ec) - | otherwise = EOtherException (show (ex :: SomeException)) + | otherwise = EOtherException $ +#if MIN_VERSION_base(4,20,0) + -- Exception plus backtrace as seen in `displayExceptionWithInfo` + case displayExceptionContext (someExceptionContext ex) of + "" -> displayException (ex :: SomeException) + cx -> displayException (ex :: SomeException) ++ "\n\n" ++ cx +#else + show (ex :: SomeException) +#endif fromSerializableException :: SerializableException -> SomeException fromSerializableException EUserInterrupt = toException UserInterrupt ===================================== libraries/ghci/GHCi/Run.hs ===================================== @@ -252,7 +252,7 @@ sandboxIO opts io = do -- rethrow :: EvalOpts -> IO a -> IO a rethrow EvalOpts{..} io = - catch io $ \se -> do + catchNoPropagate io $ \(ExceptionWithContext cx se) -> do -- If -fbreak-on-error, we break unconditionally, -- but with care of not breaking twice if breakOnError && not breakOnException @@ -263,7 +263,7 @@ rethrow EvalOpts{..} io = Just UserInterrupt -> return () -- In any other case, we don't want to break _ -> poke exceptionFlag 0 - throwIO se + rethrowIO (ExceptionWithContext cx se) -- -- While we're waiting for the sandbox thread to return a result, if ===================================== libraries/stm ===================================== @@ -1 +1 @@ -Subproject commit cb861ea10065f229bbc5b6a1e2b9bde998f18184 +Subproject commit 07df1050ab5d45244f718eee8a512bb18e7066f6 ===================================== testsuite/tests/ghc-e/should_run/ghc-e005.stderr ===================================== @@ -2,17 +2,21 @@ ghc-e005-prog: Uncaught exception ghc-internal:GHC.Internal.Exception.ErrorCall: foo +HasCallStack backtrace: + error, called at ghc-e005.hs:12:10 in main:Main + + HasCallStack backtrace: throwIO, called at libraries/exceptions/src/Control/Monad/Catch.hs:371:12 in exceptions-0.10.7-inplace:Control.Monad.Catch throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch throwM, called at compiler/GHC/Driver/Monad.hs:167:54 in ghc-9.13-inplace:GHC.Driver.Monad throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at ghc/GHCi/UI/Monad.hs:288:15 in ghc-bin-9.13.20240930-inplace:GHCi.UI.Monad + throwM, called at ghc/GHCi/UI/Monad.hs:295:15 in ghc-bin-9.13.20241115-inplace:GHCi.UI.Monad throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch throwM, called at libraries/haskeline/System/Console/Haskeline/InputT.hs:53:39 in haskeline-0.8.2.1-inplace:System.Console.Haskeline.InputT - throwM, called at ghc/GHCi/UI/Monad.hs:215:52 in ghc-bin-9.13.20240930-inplace:GHCi.UI.Monad + throwM, called at ghc/GHCi/UI/Monad.hs:221:3 in ghc-bin-9.13.20241115-inplace:GHCi.UI.Monad ===================================== testsuite/tests/ghci.debugger/scripts/break009.stdout ===================================== @@ -2,3 +2,10 @@ Breakpoint 0 activated at Test6.hs:5:8-11 Stopped in Main.main, Test6.hs:5:8-11 _result :: a = _ *** Exception: Prelude.head: empty list + +HasCallStack backtrace: + error, called at libraries/ghc-internal/src/GHC/Internal/List.hs:2036:3 in ghc-internal:GHC.Internal.List + errorEmptyList, called at libraries/ghc-internal/src/GHC/Internal/List.hs:96:11 in ghc-internal:GHC.Internal.List + badHead, called at libraries/ghc-internal/src/GHC/Internal/List.hs:90:28 in ghc-internal:GHC.Internal.List + head, called at Test6.hs:1:8 in main:Main + ===================================== testsuite/tests/ghci.debugger/scripts/break011.stdout ===================================== @@ -1,4 +1,8 @@ *** Exception: foo + +HasCallStack backtrace: + error, called at :2:1 in interactive:Ghci1 + Stopped in , _exception :: e = _ Stopped in , @@ -20,8 +24,16 @@ _exception = SomeException (ErrorCall "foo") _result :: a = _ _exception :: SomeException = SomeException (ErrorCall "foo") *** Exception: foo + +HasCallStack backtrace: + error, called at Test7.hs:2:18 in main:Main + Stopped in , _exception :: e = _ Stopped in , _exception :: e = _ *** Exception: foo + +HasCallStack backtrace: + error, called at Test7.hs:2:18 in main:Main + ===================================== testsuite/tests/ghci.debugger/scripts/break017.stdout ===================================== @@ -11,5 +11,9 @@ Printing 1 as = 'b' : 'c' : (_t1::[Char]) Forcing *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :3:17 in interactive:Ghci1 + Printing 2 as = 'b' : 'c' : (_t2::[Char]) ===================================== testsuite/tests/ghci.debugger/scripts/break024.stdout ===================================== @@ -6,6 +6,10 @@ _exception = SomeException Nothing GHC.Internal.IO.Exception.UserError [] "error" Nothing Nothing) *** Exception: user error (error) + +HasCallStack backtrace: + ioError, called at break024.hs:3:22 in main:Main + Stopped in , _exception :: e = _ _exception = SomeException ===================================== testsuite/tests/ghci/scripts/Defer02.stderr ===================================== @@ -1,4 +1,3 @@ - Defer01.hs:10:40: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] • Couldn't match type ‘Char’ with ‘[Char]’ Expected: String @@ -61,6 +60,7 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] In the first argument of ‘(>>)’, namely ‘putChar’ In the expression: putChar >> putChar 'p' In an equation for ‘l’: l = putChar >> putChar 'p' + *** Exception: Defer01.hs:10:40: error: [GHC-83865] • Couldn't match type ‘Char’ with ‘[Char]’ Expected: String @@ -69,17 +69,34 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] In the second argument of ‘(>>)’, namely ‘putStr ','’ In the expression: putStr "Hello World" >> putStr ',' (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:13:5: error: [GHC-83865] • Couldn't match expected type ‘Int’ with actual type ‘Char’ • In the expression: 'p' In an equation for ‘a’: a = 'p' (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:17:9: error: [GHC-39999] • No instance for ‘Eq B’ arising from a use of ‘==’ • In the expression: x == x In an equation for ‘b’: b x = x == x (deferred type error) +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + :10:11: error: [GHC-83865] • Couldn't match type ‘Bool’ with ‘Int’ Expected: C Int @@ -87,12 +104,19 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] • In the first argument of ‘c’, namely ‘(C2 True)’ In the first argument of ‘print’, namely ‘(c (C2 True))’ In the expression: print (c (C2 True)) + *** Exception: Defer01.hs:27:5: error: [GHC-39999] • No instance for ‘Num (a -> a)’ arising from the literal ‘1’ (maybe you haven't applied a function to enough arguments?) • In the expression: 1 In an equation for ‘d’: d = 1 (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:30:5: error: [GHC-83865] • Couldn't match expected type ‘Char -> t’ with actual type ‘Char’ • The function ‘e’ is applied to one visible argument, @@ -101,6 +125,12 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] In an equation for ‘f’: f = e 'q' • Relevant bindings include f :: t (bound at Defer01.hs:30:1) (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:33:8: error: [GHC-25897] • Couldn't match expected type ‘Char’ with actual type ‘a’ ‘a’ is a rigid type variable bound by @@ -114,6 +144,12 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] x :: a (bound at Defer01.hs:33:3) h :: a -> (Char, Char) (bound at Defer01.hs:33:1) (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:38:17: error: [GHC-83865] • Couldn't match expected type ‘Bool’ with actual type ‘T a’ • In the first argument of ‘not’, namely ‘(K a)’ @@ -123,17 +159,29 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] a :: a (bound at Defer01.hs:38:3) i :: a -> () (bound at Defer01.hs:38:1) (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + *** Exception: Defer01.hs:42:5: error: [GHC-39999] • No instance for ‘MyClass a1’ arising from a use of ‘myOp’ • In the expression: myOp 23 In an equation for ‘j’: j = myOp 23 (deferred type error) +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + :16:8: error: [GHC-18872] • Couldn't match type ‘Int’ with ‘Bool’ arising from a use of ‘k’ • In the first argument of ‘print’, namely ‘(k 2)’ In the expression: print (k 2) In an equation for ‘it’: it = print (k 2) + *** Exception: Defer01.hs:49:5: error: [GHC-83865] • Couldn't match expected type: IO a0 with actual type: Char -> IO () @@ -142,3 +190,9 @@ Defer01.hs:49:5: warning: [GHC-83865] [-Wdeferred-type-errors (in -Wdefault)] In the expression: putChar >> putChar 'p' In an equation for ‘l’: l = putChar >> putChar 'p' (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + ===================================== testsuite/tests/ghci/scripts/T10501.stderr ===================================== @@ -1,2 +1,13 @@ *** Exception: Prelude.head: empty list + +HasCallStack backtrace: + error, called at libraries/ghc-internal/src/GHC/Internal/List.hs:2036:3 in ghc-internal:GHC.Internal.List + errorEmptyList, called at libraries/ghc-internal/src/GHC/Internal/List.hs:96:11 in ghc-internal:GHC.Internal.List + badHead, called at libraries/ghc-internal/src/GHC/Internal/List.hs:90:28 in ghc-internal:GHC.Internal.List + head, called at :1:10 in interactive:Ghci1 + *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :1:17 in interactive:Ghci1 + ===================================== testsuite/tests/ghci/scripts/T15325.stderr ===================================== @@ -1,4 +1,3 @@ - T15325.hs:11:7: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)] • No instance for ‘PolyList e0’ arising from a use of ‘f’ • In the expression: f 0 @@ -17,8 +16,15 @@ T15325.hs:11:9: warning: [GHC-39999] [-Wdeferred-type-errors (in -Wdefault)] • In the first argument of ‘f’, namely ‘0’ In the expression: f 0 In an equation for ‘plh’: plh = f 0 + *** Exception: T15325.hs:11:7: error: [GHC-39999] • No instance for ‘PolyList e0’ arising from a use of ‘f’ • In the expression: f 0 In an equation for ‘plh’: plh = f 0 (deferred type error) + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base + ===================================== testsuite/tests/ghci/scripts/T5557.stdout ===================================== @@ -1,2 +1,10 @@ *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :2:12 in interactive:Ghci1 + *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :3:12 in interactive:Ghci1 + ===================================== testsuite/tests/ghci/scripts/ghci055.stdout ===================================== @@ -1,3 +1,7 @@ *** Exception: Prelude.undefined + +HasCallStack backtrace: + undefined, called at :1:7 in interactive:Ghci1 + x :: a = _ y :: Int = 3 ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -249,6 +249,8 @@ module Control.Exception where data MaskingState = Unmasked | MaskedInterruptible | MaskedUninterruptible type NestedAtomically :: * data NestedAtomically = NestedAtomically + type NoBacktrace :: * -> * + newtype NoBacktrace e = NoBacktrace e type NoMethodError :: * newtype NoMethodError = NoMethodError GHC.Internal.Base.String type NonTermination :: * ===================================== testsuite/tests/patsyn/should_run/ghci.stderr ===================================== @@ -1,2 +1,8 @@ *** Exception: :5:5-35: Non-exhaustive patterns in function foo + +HasCallStack backtrace: + collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:168:13 in ghc-internal:GHC.Internal.Exception + toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:88:42 in ghc-internal:GHC.Internal.Exception + throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:434:30 in ghc-internal:GHC.Internal.Control.Exception.Base + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/27e03dfd2f6c5c9442a1518ce8c1ed1a78daa833...7fb837dea74ce699bc71f3a152699d18ab80bd4e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/27e03dfd2f6c5c9442a1518ce8c1ed1a78daa833...7fb837dea74ce699bc71f3a152699d18ab80bd4e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 17:51:04 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 12:51:04 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 11 commits: rts/RtsFlags: Refactor size parsing Message-ID: <6738db88c77ea_1aefb5d86a3095434@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 77dad6d0 by Ben Gamari at 2024-11-16T12:50:32-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - c1408534 by Ben Gamari at 2024-11-16T12:50:32-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - 078f6bf6 by Ben Gamari at 2024-11-16T12:50:32-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 3b120d1c by Ben Gamari at 2024-11-16T12:50:32-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - dd6a7f3c by Ben Gamari at 2024-11-16T12:50:32-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - 875f5adc by Ben Gamari at 2024-11-16T12:50:32-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - e7af443e by Ben Gamari at 2024-11-16T12:50:33-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - 77a9549f by ARATA Mizuki at 2024-11-16T12:50:36-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 875fbbdb by sheaf at 2024-11-16T12:50:38-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - 1f81821e by Ben Gamari at 2024-11-16T12:50:39-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 35006fac by Ben Gamari at 2024-11-16T12:50:39-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 27 changed files: - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Tc/Plugin.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/debug-info.rst - docs/users_guide/exts/equality_constraints.rst - docs/users_guide/release-notes.rst - libraries/base/tests/IO/all.T - rts/RtsFlags.c - rts/Task.h - + testsuite/tests/rts/T20201a.hs - + testsuite/tests/rts/T20201a.stderr - + testsuite/tests/rts/T20201b.hs - + testsuite/tests/rts/T20201b.stderr - testsuite/tests/rts/all.T - + testsuite/tests/simd/should_run/T25455.hs - + testsuite/tests/simd/should_run/T25455.stdout - testsuite/tests/simd/should_run/all.T - + testsuite/tests/simd/should_run/simd_insert.hs - + testsuite/tests/simd/should_run/simd_insert.stdout - + testsuite/tests/simd/should_run/simd_insert_array.hs - + testsuite/tests/simd/should_run/simd_insert_array.stdout - + testsuite/tests/simd/should_run/simd_insert_array_baseline.hs - + testsuite/tests/simd/should_run/simd_insert_array_baseline.stdout - + testsuite/tests/simd/should_run/simd_insert_baseline.hs - + testsuite/tests/simd/should_run/simd_insert_baseline.stdout Changes: ===================================== compiler/GHC/CmmToAsm/X86/CodeGen.hs ===================================== @@ -971,7 +971,6 @@ getRegister' _ _ (CmmMachOp mop []) = pprPanic "getRegister(x86): nullary MachOp" (text $ show mop) getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps - sse4_1 <- sse4_1Enabled avx <- avxEnabled case mop of MO_F_Neg w -> sse2NegCode w x @@ -1068,10 +1067,7 @@ getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps | avx -> vector_float_broadcast_avx l w x | otherwise - -> case w of - W32 | not sse4_1 - -> sorry "32-bit float broadcast requires -msse4 or -fllvm." - _ -> vector_float_broadcast_sse l w x + -> vector_float_broadcast_sse l w x MO_V_Broadcast l w -> vector_int_broadcast l w x @@ -1217,6 +1213,7 @@ getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps ----------------------- + -- TODO: we could use VBROADCASTSS/SD when AVX2 is available. vector_float_broadcast_avx :: Length -> Width -> CmmExpr @@ -1224,11 +1221,8 @@ getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps vector_float_broadcast_avx len w expr = do (dst, exp) <- getSomeReg expr let fmt = VecFormat len (floatScalarFormat w) - code = case w of - W64 -> unitOL $ VSHUF fmt (ImmInt 0) (OpReg dst) dst dst - _ -> toOL [ INSERTPS fmt (ImmInt 0b00_10_0000) (OpReg dst) dst - , VSHUF fmt (ImmInt 0) (OpReg dst) dst dst ] - return $ Fixed fmt dst (exp `appOL` code) + code = VSHUF fmt (ImmInt 0) (OpReg dst) dst dst + return $ Fixed fmt dst (exp `snocOL` code) vector_float_broadcast_sse :: Length -> Width @@ -1237,11 +1231,8 @@ getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps vector_float_broadcast_sse len w expr = do (dst, exp) <- getSomeReg expr let fmt = VecFormat len (floatScalarFormat w) - code = case w of - W64 -> unitOL $ SHUF fmt (ImmInt 0) (OpReg dst) dst - _ -> toOL [ INSERTPS fmt (ImmInt 0b00_10_0000) (OpReg dst) dst - , SHUF fmt (ImmInt 0) (OpReg dst) dst ] - return $ Fixed fmt dst (exp `appOL` code) + code = SHUF fmt (ImmInt 0) (OpReg dst) dst + return $ Fixed fmt dst (exp `snocOL` code) vector_int_broadcast :: Length -> Width @@ -1801,9 +1792,12 @@ getRegister' platform _is32Bit (CmmMachOp mop [x, y, z]) = do -- ternary MachOps -> genFMA3Code l w var x y z -- Ternary vector operations - MO_VF_Insert l W32 | sse4_1 -> vector_float_insert_sse l x y z - | otherwise - -> sorry "FloatX4# operations require either -msse4 or -fllvm" + MO_VF_Insert l W32 | l == 4 -> vector_floatx4_insert_sse sse4_1 x y z + | otherwise -> + sorry $ "FloatX" ++ show l ++ "# insert operations require -fllvm" + -- SIMD NCG TODO: + -- + -- - add support for FloatX8, FloatX16. MO_VF_Insert l W64 -> vector_double_insert avx l x y z MO_V_Insert l W64 -> vector_int_insert_sse l W64 x y z @@ -1814,31 +1808,59 @@ getRegister' platform _is32Bit (CmmMachOp mop [x, y, z]) = do -- ternary MachOps -- SIMD NCG TODO: -- -- - add support for FloatX8, FloatX16. - vector_float_insert_sse :: Length - -> CmmExpr - -> CmmExpr - -> CmmExpr - -> NatM Register - -- FloatX4 - vector_float_insert_sse len at 4 vecExpr valExpr (CmmLit (CmmInt offset _)) - = do - (r, exp) <- getNonClobberedReg valExpr - fn <- getAnyReg vecExpr - let fmt = VecFormat len FmtFloat - imm = litToImm (CmmInt (offset `shiftL` 4) W32) - code dst = exp `appOL` - (fn dst) `snocOL` - (INSERTPS fmt imm (OpReg r) dst) - in return $ Any fmt code - vector_float_insert_sse len _ _ offset + vector_floatx4_insert_sse :: Bool + -> CmmExpr + -> CmmExpr + -> CmmExpr + -> NatM Register + vector_floatx4_insert_sse sse4_1 vecExpr valExpr (CmmLit (CmmInt offset _)) + | sse4_1 = do + (r, exp) <- getNonClobberedReg valExpr + fn <- getAnyReg vecExpr + let fmt = VecFormat 4 FmtFloat + imm = litToImm (CmmInt (offset `shiftL` 4) W32) + code dst = exp `appOL` + (fn dst) `snocOL` + (INSERTPS fmt imm (OpReg r) dst) + in return $ Any fmt code + | otherwise = do -- SSE <= 3 + (r, exp) <- getNonClobberedReg valExpr + fn <- getAnyReg vecExpr + let fmt = VecFormat 4 FmtFloat + tmp <- getNewRegNat fmt + let code dst + = case offset of + 0 -> exp `appOL` + (fn dst) `snocOL` + -- The following MOV compiles to MOVSS instruction and merges two vectors + (MOV fmt (OpReg r) (OpReg dst)) -- dst <- (r[0],dst[1],dst[2],dst[3]) + 1 -> exp `appOL` + (fn dst) `snocOL` + (MOVU fmt (OpReg dst) (OpReg tmp)) `snocOL` -- tmp <- dst + (UNPCKL fmt (OpReg r) dst) `snocOL` -- dst <- (dst[0],r[0],dst[1],r[1]) + (SHUF fmt (ImmInt 0xe4) (OpReg tmp) dst) -- dst <- (dst[0],dst[1],tmp[2],tmp[3]) + 2 -> exp `appOL` + (fn dst) `snocOL` + (MOVU fmt (OpReg dst) (OpReg tmp)) `snocOL` -- tmp <- dst + (MOV fmt (OpReg r) (OpReg tmp)) `snocOL` -- tmp <- (r[0],tmp[1],tmp[2],tmp[3]) with MOVSS + (SHUF fmt (ImmInt 0xc4) (OpReg tmp) dst) -- dst <- (dst[0],dst[1],tmp[0],tmp[3]) + 3 -> exp `appOL` + (fn dst) `snocOL` + (MOVU fmt (OpReg dst) (OpReg tmp)) `snocOL` -- tmp <- dst + (MOV fmt (OpReg r) (OpReg tmp)) `snocOL` -- tmp <- (r[0],tmp[1],tmp[2],tmp[3]) with MOVSS + (SHUF fmt (ImmInt 0x24) (OpReg tmp) dst) -- dst <- (dst[0],dst[1],tmp[2],tmp[0]) + _ -> panic "MO_VF_Insert FloatX4: unsupported offset" + in return $ Any fmt code + vector_floatx4_insert_sse _ _ _ offset = pprPanic "Unsupported vector insert operation" $ vcat - [ text "FloatX" <> ppr len <> text "#" + [ text "FloatX4#" , text "offset:" <+> pdoc platform offset ] + -- SIMD NCG TODO: -- - -- - add support for FloatX8, FloatX16. + -- - add support for DoubleX4#, DoubleX8#. vector_double_insert :: Bool -> Length -> CmmExpr @@ -1857,6 +1879,7 @@ getRegister' platform _is32Bit (CmmMachOp mop [x, y, z]) = do -- ternary MachOps CmmInt 0 _ -> valExp `appOL` vecExp `snocOL` (movu (VecFormat 2 FmtDouble) (OpReg vecReg) (OpReg dst)) `snocOL` + -- The following MOV compiles to MOVSD instruction and merges two vectors (MOV (VecFormat 2 FmtDouble) (OpReg valReg) (OpReg dst)) CmmInt 1 _ -> valExp `appOL` vecExp `snocOL` ===================================== compiler/GHC/CmmToAsm/X86/Instr.hs ===================================== @@ -325,6 +325,7 @@ data Instr -- | Move two 32-bit floats from the high part of an xmm register -- to the low part of another xmm register. | MOVHLPS Format Reg Reg + | UNPCKL Format Operand Reg | PUNPCKLQDQ Format Operand Reg -- Shift @@ -524,6 +525,8 @@ regUsageOfInstr platform instr MOVHLPS fmt src dst -> mkRU [mk fmt src] [mk fmt dst] + UNPCKL fmt src dst + -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] PUNPCKLQDQ fmt src dst -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] @@ -765,6 +768,8 @@ patchRegsOfInstr platform instr env MOVHLPS fmt src dst -> MOVHLPS fmt (env src) (env dst) + UNPCKL fmt src dst + -> UNPCKL fmt (patchOp src) (env dst) PUNPCKLQDQ fmt src dst -> PUNPCKLQDQ fmt (patchOp src) (env dst) ===================================== compiler/GHC/CmmToAsm/X86/Ppr.hs ===================================== @@ -1041,6 +1041,8 @@ pprInstr platform i = case i of MOVHLPS format from to -> pprOpReg (text "movhlps") format (OpReg from) to + UNPCKL format src dst + -> pprFormatOpReg (text "unpckl") format src dst PUNPCKLQDQ format from to -> pprOpReg (text "punpcklqdq") format from to @@ -1343,9 +1345,11 @@ pprInstr platform i = case i of ] where mem = case fmt of + FF32 -> text "vxorps" + FF64 -> text "vxorpd" VecFormat _ FmtFloat -> text "vxorps" VecFormat _ FmtDouble -> text "vxorpd" - _ -> pprPanic "GHC.CmmToAsm.X86.Ppr.pprVxor: elementy type must be Float or Double" + _ -> pprPanic "GHC.CmmToAsm.X86.Ppr.pprVxor: element type must be Float or Double" (ppr fmt) pprInsert :: Line doc -> Format -> Imm -> Operand -> Reg -> doc ===================================== compiler/GHC/Tc/Plugin.hs ===================================== @@ -15,6 +15,7 @@ module GHC.Tc.Plugin ( lookupOrig, -- * Looking up Names in the typechecking environment + lookupTHName, tcLookupGlobal, tcLookupTyCon, tcLookupDataCon, @@ -74,6 +75,7 @@ import GHC.Tc.Utils.Env ( TcTyThing ) import GHC.Tc.Types.Evidence ( CoercionHole, EvTerm(..) , EvExpr, EvBindsVar, EvBind, mkGivenEvBind ) import GHC.Types.Var ( EvVar ) +import GHC.Plugins ( thNameToGhcNameIO ) import GHC.Unit.Module ( ModuleName, Module ) import GHC.Types.Name ( OccName, Name ) @@ -90,6 +92,7 @@ import GHC.Core.InstEnv ( InstEnvs ) import GHC.Types.Unique ( Unique ) import GHC.Types.PkgQual ( PkgQual ) +import qualified GHC.Internal.TH.Syntax as TH -- | Perform some IO, typically to interact with an external tool. tcPluginIO :: IO a -> TcPluginM a @@ -108,6 +111,13 @@ findImportedModule mod_name mb_pkg = do lookupOrig :: Module -> OccName -> TcPluginM Name lookupOrig mod = unsafeTcPluginTcM . IfaceEnv.lookupOrig mod +-- | Resolve a @template-haskell@ 'TH.Name' to a GHC 'Name'. +-- +-- @since 9.14.1 +lookupTHName :: TH.Name -> TcPluginM (Maybe Name) +lookupTHName th = do + nc <- hsc_NC <$> getTopEnv + tcPluginIO $ thNameToGhcNameIO nc th tcLookupGlobal :: Name -> TcPluginM TyThing tcLookupGlobal = unsafeTcPluginTcM . TcM.tcLookupGlobal ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -51,7 +51,7 @@ Cmm ~~~~~~~~~~~~~~~~~~~~ * The functions `getClosureInfoTbl_maybe`, `getClosureInfoTbl`, - `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow + `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow reading of the relevant Closure attributes without reliance on incomplete selectors. ===================================== docs/users_guide/debug-info.rst ===================================== @@ -395,18 +395,6 @@ to a source location. This lookup table is generated by using the ``-finfo-table :implies: :ghc-flag:`-finfo-table-map-with-stack` :implies: :ghc-flag:`-finfo-table-map-with-fallback` -.. ghc-flag:: -finfo-table-map-with-stack - :shortdesc: Include info tables for ``STACK`` closures in the info table - map. - :type: dynamic - :reverse: -fno-info-table-map-with-stack - :category: debugging - - :since: 9.10 - - Include info tables for ``STACK`` closures in the info table map. Note that - this flag is implied by :ghc-flag:`-finfo-table-map`. - .. ghc-flag:: -fno-info-table-map-with-stack :shortdesc: Omit info tables for ``STACK`` closures from the info table map. @@ -423,6 +411,9 @@ to a source location. This lookup table is generated by using the ``-finfo-table ``STACK`` info tables from the info table map and decrease the size of executables with info table profiling information. + Note that :ghc-flag:`-finfo-table-map-with-stack` is implied by + :ghc-flag:`-finfo-table-map`. + .. ghc-flag:: -finfo-table-map-with-fallback :shortdesc: Include info tables with no source location information in the info table map. ===================================== docs/users_guide/exts/equality_constraints.rst ===================================== @@ -6,11 +6,11 @@ Equality constraints and Coercible constraint Equality constraints -------------------- -A type context can include equality constraints of the form ``t1 ~ t2``, -which denote that the types ``t1`` and ``t2`` need to be the same. In -the presence of type families, whether two types are equal cannot -generally be decided locally. Hence, the contexts of function signatures -may include equality constraints, as in the following example: :: +When :extension:`TypeOperators` are enabled, a type context can include equality +constraints of the form ``t1 ~ t2``, which denote that the types ``t1`` and +``t2`` need to be the same. In the presence of type families, whether two types +are equal cannot generally be decided locally. Hence, the contexts of function +signatures may include equality constraints, as in the following example: :: sumCollects :: (Collects c1, Collects c2, Elem c1 ~ Elem c2) => c1 -> c2 -> c2 ===================================== docs/users_guide/release-notes.rst ===================================== @@ -4,4 +4,4 @@ Release notes .. toctree:: :maxdepth: 1 - 9.12.1-notes + 9.14.1-notes ===================================== libraries/base/tests/IO/all.T ===================================== @@ -137,17 +137,20 @@ test('encoding001', [], compile_and_run, ['']) test('encoding002', normal, compile_and_run, ['']) test('encoding003', normal, compile_and_run, ['']) -test('encoding004', [extra_files(['encoded-data/']), js_broken(22374), -# wasi-libc doesn't have cp936, see -# https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/iconv.c#L38 -# and -# https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/codepages.h -# for locales supported by wasi-libc's iconv implementation -when(arch('wasm32'), skip), -# MacOS Sonoma iconv() has a regression that causes this test to fail on the -# CP936 roundtrip. See the ticket for related issues in other projects. -when(opsys('darwin'), fragile(24161)) -], compile_and_run, ['']) +test('encoding004', + [ extra_files(['encoded-data/']), + js_broken(22374), + # wasi-libc doesn't have cp936, see + # https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/iconv.c#L38 + # and + # https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/codepages.h + # for locales supported by wasi-libc's iconv implementation + when(arch('wasm32'), skip), + # MacOS Sonoma iconv() has a regression that causes this test to fail on the + # CP936 roundtrip. See the ticket for related issues in other projects. + when(opsys('darwin'), fragile(24161)), + when(opsys('freebsd'), expect_broken(22003)) + ], compile_and_run, ['']) test('encoding005', normal, compile_and_run, ['']) test('environment001', [], makefile_test, ['environment001-test']) ===================================== rts/RtsFlags.c ===================================== @@ -2148,7 +2148,6 @@ static void initStatsFile (FILE *f) static StgWord64 decodeSize(const char *flag, uint32_t offset, StgWord64 min, StgWord64 max) { - char c; const char *s; StgDouble m; StgWord64 val; @@ -2161,19 +2160,47 @@ decodeSize(const char *flag, uint32_t offset, StgWord64 min, StgWord64 max) } else { - m = atof(s); - c = s[strlen(s)-1]; - - if (c == 't' || c == 'T') - m *= (StgWord64)1024*1024*1024*1024; - else if (c == 'g' || c == 'G') - m *= 1024*1024*1024; - else if (c == 'm' || c == 'M') - m *= 1024*1024; - else if (c == 'k' || c == 'K') - m *= 1024; - else if (c == 'w' || c == 'W') - m *= sizeof(W_); + char *end; + m = strtod(s, &end); + + if (end == s) { + errorBelch("error in RTS option %s: unable to parse number '%s'", flag, s); + stg_exit(EXIT_FAILURE); + } + + StgWord64 unit; + switch (*end) { + case 't': + case 'T': + unit = (StgWord64)1024*1024*1024*1024; + break; + case 'g': + case 'G': + unit = 1024*1024*1024; + break; + case 'm': + case 'M': + unit = 1024*1024; + break; + case 'k': + case 'K': + unit = 1024; + break; + case 'w': + case 'W': + unit = sizeof(W_); + break; + case 'b': + case 'B': + case '\0': + unit = 1; + break; + default: + errorBelch("error in RTS option %s: unknown unit suffix '%c'", flag, *end); + stg_exit(EXIT_FAILURE); + } + + m *= unit; } val = (StgWord64)m; ===================================== rts/Task.h ===================================== @@ -314,18 +314,12 @@ typedef StgWord64 TaskId; // #if defined(THREADED_RTS) INLINE_HEADER TaskId serialiseTaskId (OSThreadId taskID) { -#if defined(freebsd_HOST_OS) || defined(darwin_HOST_OS) - // Here OSThreadId is a pthread_t and pthread_t is a pointer, but within + // Here OSThreadId may be a pthread_t and pthread_t is a pointer, but within // the process we can still use that pointer value as a unique id. - return (TaskId) (size_t) taskID; -#else - // On Windows, Linux and others it's an integral type to start with. - return (TaskId) taskID; -#endif + return (TaskId) (uintptr_t) taskID; } #endif -// // Get a serialisable Id for the Task's OS thread // Needed mainly for logging since the OSThreadId is an opaque type INLINE_HEADER TaskId @@ -334,7 +328,7 @@ serialisableTaskId (Task *task) #if defined(THREADED_RTS) return serialiseTaskId(task->id); #else - return (TaskId) (size_t) task; + return (TaskId) (uintptr_t) task; #endif } ===================================== testsuite/tests/rts/T20201a.hs ===================================== @@ -0,0 +1 @@ +main = putStrLn "hi" ===================================== testsuite/tests/rts/T20201a.stderr ===================================== @@ -0,0 +1 @@ +T20201a: error in RTS option -AturtlesM: unable to parse number 'turtlesM' ===================================== testsuite/tests/rts/T20201b.hs ===================================== @@ -0,0 +1,2 @@ +main = putStrLn "hi" + ===================================== testsuite/tests/rts/T20201b.stderr ===================================== @@ -0,0 +1 @@ +T20201b: error in RTS option -A64z: unknown unit suffix 'z' ===================================== testsuite/tests/rts/all.T ===================================== @@ -587,6 +587,10 @@ test('decodeMyStack_emptyListForMissingFlag', , js_broken(22261) # cloneMyStack# not yet implemented ], compile_and_run, ['']) +# Tests RTS flag parsing. Skipped on JS as it uses a distinct RTS. +test('T20201a', [js_skip, exit_code(1)], compile_and_run, ['-with-rtsopts -AturtlesM']) +test('T20201b', [js_skip, exit_code(1)], compile_and_run, ['-with-rtsopts -A64z']) + test('T22012', [js_skip, extra_ways(['ghci'])], compile_and_run, ['T22012_c.c']) # Skip for JS platform as the JS RTS is always single threaded ===================================== testsuite/tests/simd/should_run/T25455.hs ===================================== @@ -0,0 +1,14 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} + +module Main where + +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +main :: IO () +main = do + let v = packFloatX4# (# 0.0#, 1.0#, 2.0#, 3.0# #) + print $ unpackFloatX4 v ===================================== testsuite/tests/simd/should_run/T25455.stdout ===================================== @@ -0,0 +1 @@ +(0.0,1.0,2.0,3.0) ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -12,13 +12,18 @@ setTestOpts( , when(unregisterised(), skip) , when(arch('wasm32'), skip) , js_skip + ]) + +test('simd_insert_baseline', [], compile_and_run, ['']) +test('simd_insert_array_baseline', [], compile_and_run, ['']) - # Ensure we set the CPU features we have available. - # - # This is especially important with the LLVM backend, as LLVM can otherwise - # produce ABI-incompatible code, e.g. when compiling usage of YMM registers - # with or without -mavx2. - , when(have_cpu_feature('sse4_1'), extra_hc_opts('-msse4')) +# Ensure we set the CPU features we have available. +# +# This is especially important with the LLVM backend, as LLVM can otherwise +# produce ABI-incompatible code, e.g. when compiling usage of YMM registers +# with or without -mavx2. +setTestOpts( + [ when(have_cpu_feature('sse4_1'), extra_hc_opts('-msse4')) , when(have_cpu_feature('avx'), extra_hc_opts('-mavx')) , when(have_cpu_feature('avx2'), extra_hc_opts('-mavx2')) , when(have_cpu_feature('avx512f'), extra_hc_opts('-mavx512f')) @@ -55,6 +60,9 @@ test('simd014', # register on non-x86 architectures. compile_and_run, ['simd014Cmm.cmm']) +test('simd_insert', [], compile_and_run, ['']) +test('simd_insert_array', [], compile_and_run, ['']) + test('T22187', [],compile,['']) test('T22187_run', [],compile_and_run,['']) test('T25062_V16', [], compile_and_run, ['']) @@ -81,3 +89,4 @@ test('T25062_V64' , ['']) test('T25169', [], compile_and_run, ['']) +test('T25455', [], compile_and_run, ['']) ===================================== testsuite/tests/simd/should_run/simd_insert.hs ===================================== @@ -0,0 +1,37 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +unpackDoubleX2 :: DoubleX2# -> (Double, Double) +unpackDoubleX2 v = case unpackDoubleX2# v of + (# a0, a1 #) -> (D# a0, D# a1) + +testFloatX4 :: IO () +testFloatX4 = do + let v = packFloatX4# (# 0.1#, 1.0#, 2.0#, 3.0# #) + print $ unpackFloatX4 v + let w = insertFloatX4# v 7.0# 0# + print $ unpackFloatX4 w + let x = insertFloatX4# v 7.0# 1# + print $ unpackFloatX4 x + let y = insertFloatX4# v 7.0# 2# + print $ unpackFloatX4 y + let z = insertFloatX4# v 7.0# 3# + print $ unpackFloatX4 z + +testDoubleX2 :: IO () +testDoubleX2 = do + let v = packDoubleX2# (# 0.1##, 1.0## #) + print $ unpackDoubleX2 v + let w = insertDoubleX2# v 7.0## 0# + print $ unpackDoubleX2 w + let x = insertDoubleX2# v 7.0## 1# + print $ unpackDoubleX2 x + +main :: IO () +main = do + testFloatX4 + testDoubleX2 ===================================== testsuite/tests/simd/should_run/simd_insert.stdout ===================================== @@ -0,0 +1,8 @@ +(0.1,1.0,2.0,3.0) +(7.0,1.0,2.0,3.0) +(0.1,7.0,2.0,3.0) +(0.1,1.0,7.0,3.0) +(0.1,1.0,2.0,7.0) +(0.1,1.0) +(7.0,1.0) +(0.1,7.0) ===================================== testsuite/tests/simd/should_run/simd_insert_array.hs ===================================== @@ -0,0 +1,49 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +import Control.Monad +import Data.Array.Base +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +unpackDoubleX2 :: DoubleX2# -> (Double, Double) +unpackDoubleX2 v = case unpackDoubleX2# v of + (# a0, a1 #) -> (D# a0, D# a1) + +indexFloatArrayAsFloatX4 :: UArray Int Float -> Int -> FloatX4# +indexFloatArrayAsFloatX4 (UArray l u n ba) i = case i - l of I# i# -> indexFloatArrayAsFloatX4# ba i# + +indexDoubleArrayAsDoubleX2 :: UArray Int Double -> Int -> DoubleX2# +indexDoubleArrayAsDoubleX2 (UArray l u n ba) i = case i - l of I# i# -> indexDoubleArrayAsDoubleX2# ba i# + +someFloatArray :: UArray Int Float +someFloatArray = listArray (0, 7) [111.0, 222.0, 333.0, 444.0, 555.0, 666.0, 777.0, 888.0] + +someDoubleArray :: UArray Int Double +someDoubleArray = listArray (0, 7) [111.0, 222.0, 333.0, 444.0, 555.0, 666.0, 777.0, 888.0] + +testFloatX4 :: IO () +testFloatX4 = forM_ [0,4] $ \i -> do + let v = indexFloatArrayAsFloatX4 someFloatArray i + let w = insertFloatX4# v 123.45# 0# + print $ unpackFloatX4 w + let x = insertFloatX4# v 123.45# 1# + print $ unpackFloatX4 x + let y = insertFloatX4# v 123.45# 2# + print $ unpackFloatX4 y + let z = insertFloatX4# v 123.45# 3# + print $ unpackFloatX4 z + +testDoubleX2 :: IO () +testDoubleX2 = forM_ [0,2,4,6] $ \i -> do + let v = indexDoubleArrayAsDoubleX2 someDoubleArray i + let w = insertDoubleX2# v 123.45## 0# + print $ unpackDoubleX2 w + let x = insertDoubleX2# v 123.45## 1# + print $ unpackDoubleX2 x + +main :: IO () +main = do + testFloatX4 + testDoubleX2 ===================================== testsuite/tests/simd/should_run/simd_insert_array.stdout ===================================== @@ -0,0 +1,16 @@ +(123.45,222.0,333.0,444.0) +(111.0,123.45,333.0,444.0) +(111.0,222.0,123.45,444.0) +(111.0,222.0,333.0,123.45) +(123.45,666.0,777.0,888.0) +(555.0,123.45,777.0,888.0) +(555.0,666.0,123.45,888.0) +(555.0,666.0,777.0,123.45) +(123.45,222.0) +(111.0,123.45) +(123.45,444.0) +(333.0,123.45) +(123.45,666.0) +(555.0,123.45) +(123.45,888.0) +(777.0,123.45) ===================================== testsuite/tests/simd/should_run/simd_insert_array_baseline.hs ===================================== @@ -0,0 +1,49 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +import Control.Monad +import Data.Array.Base +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +unpackDoubleX2 :: DoubleX2# -> (Double, Double) +unpackDoubleX2 v = case unpackDoubleX2# v of + (# a0, a1 #) -> (D# a0, D# a1) + +indexFloatArrayAsFloatX4 :: UArray Int Float -> Int -> FloatX4# +indexFloatArrayAsFloatX4 (UArray l u n ba) i = case i - l of I# i# -> indexFloatArrayAsFloatX4# ba i# + +indexDoubleArrayAsDoubleX2 :: UArray Int Double -> Int -> DoubleX2# +indexDoubleArrayAsDoubleX2 (UArray l u n ba) i = case i - l of I# i# -> indexDoubleArrayAsDoubleX2# ba i# + +someFloatArray :: UArray Int Float +someFloatArray = listArray (0, 7) [111.0, 222.0, 333.0, 444.0, 555.0, 666.0, 777.0, 888.0] + +someDoubleArray :: UArray Int Double +someDoubleArray = listArray (0, 7) [111.0, 222.0, 333.0, 444.0, 555.0, 666.0, 777.0, 888.0] + +testFloatX4 :: IO () +testFloatX4 = forM_ [0,4] $ \i -> do + let v = indexFloatArrayAsFloatX4 someFloatArray i + let w = insertFloatX4# v 123.45# 0# + print $ unpackFloatX4 w + let x = insertFloatX4# v 123.45# 1# + print $ unpackFloatX4 x + let y = insertFloatX4# v 123.45# 2# + print $ unpackFloatX4 y + let z = insertFloatX4# v 123.45# 3# + print $ unpackFloatX4 z + +testDoubleX2 :: IO () +testDoubleX2 = forM_ [0,2,4,6] $ \i -> do + let v = indexDoubleArrayAsDoubleX2 someDoubleArray i + let w = insertDoubleX2# v 123.45## 0# + print $ unpackDoubleX2 w + let x = insertDoubleX2# v 123.45## 1# + print $ unpackDoubleX2 x + +main :: IO () +main = do + testFloatX4 + testDoubleX2 ===================================== testsuite/tests/simd/should_run/simd_insert_array_baseline.stdout ===================================== @@ -0,0 +1,16 @@ +(123.45,222.0,333.0,444.0) +(111.0,123.45,333.0,444.0) +(111.0,222.0,123.45,444.0) +(111.0,222.0,333.0,123.45) +(123.45,666.0,777.0,888.0) +(555.0,123.45,777.0,888.0) +(555.0,666.0,123.45,888.0) +(555.0,666.0,777.0,123.45) +(123.45,222.0) +(111.0,123.45) +(123.45,444.0) +(333.0,123.45) +(123.45,666.0) +(555.0,123.45) +(123.45,888.0) +(777.0,123.45) ===================================== testsuite/tests/simd/should_run/simd_insert_baseline.hs ===================================== @@ -0,0 +1,37 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +unpackDoubleX2 :: DoubleX2# -> (Double, Double) +unpackDoubleX2 v = case unpackDoubleX2# v of + (# a0, a1 #) -> (D# a0, D# a1) + +testFloatX4 :: IO () +testFloatX4 = do + let v = packFloatX4# (# 0.1#, 1.0#, 2.0#, 3.0# #) + print $ unpackFloatX4 v + let w = insertFloatX4# v 7.0# 0# + print $ unpackFloatX4 w + let x = insertFloatX4# v 7.0# 1# + print $ unpackFloatX4 x + let y = insertFloatX4# v 7.0# 2# + print $ unpackFloatX4 y + let z = insertFloatX4# v 7.0# 3# + print $ unpackFloatX4 z + +testDoubleX2 :: IO () +testDoubleX2 = do + let v = packDoubleX2# (# 0.1##, 1.0## #) + print $ unpackDoubleX2 v + let w = insertDoubleX2# v 7.0## 0# + print $ unpackDoubleX2 w + let x = insertDoubleX2# v 7.0## 1# + print $ unpackDoubleX2 x + +main :: IO () +main = do + testFloatX4 + testDoubleX2 ===================================== testsuite/tests/simd/should_run/simd_insert_baseline.stdout ===================================== @@ -0,0 +1,8 @@ +(0.1,1.0,2.0,3.0) +(7.0,1.0,2.0,3.0) +(0.1,7.0,2.0,3.0) +(0.1,1.0,7.0,3.0) +(0.1,1.0,2.0,7.0) +(0.1,1.0) +(7.0,1.0) +(0.1,7.0) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ed17b4c500665cf4db48f2600120ecca805f9765...35006face779416fabcd8d11366de55d6b570f84 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ed17b4c500665cf4db48f2600120ecca805f9765...35006face779416fabcd8d11366de55d6b570f84 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 20:16:42 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Sat, 16 Nov 2024 15:16:42 -0500 Subject: [Git][ghc/ghc][wip/alpine-i386] Update .gitlab-ci.yml Message-ID: <6738fdaac84e9_53e4923c3b44685c@gitlab.mail> Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC Commits: 52176255 by Ben Gamari at 2024-11-16T20:16:40+00:00 Update .gitlab-ci.yml - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: 43a8a0b25fb762808a921039362e3d920594054c + DOCKER_REV: eb92decd8299dec1749bb625042a2581c3467749 # Sequential version number of all cached things. # Bump to invalidate GitLab CI cache. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/52176255ae3d3098564e9d435d48d461b769b4ed -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/52176255ae3d3098564e9d435d48d461b769b4ed You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 21:21:14 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 16:21:14 -0500 Subject: [Git][ghc/ghc][master] 2 commits: rts/RtsFlags: Refactor size parsing Message-ID: <67390cca80e4f_53e497fa2b0534a8@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - 6 changed files: - rts/RtsFlags.c - + testsuite/tests/rts/T20201a.hs - + testsuite/tests/rts/T20201a.stderr - + testsuite/tests/rts/T20201b.hs - + testsuite/tests/rts/T20201b.stderr - testsuite/tests/rts/all.T Changes: ===================================== rts/RtsFlags.c ===================================== @@ -2148,7 +2148,6 @@ static void initStatsFile (FILE *f) static StgWord64 decodeSize(const char *flag, uint32_t offset, StgWord64 min, StgWord64 max) { - char c; const char *s; StgDouble m; StgWord64 val; @@ -2161,19 +2160,47 @@ decodeSize(const char *flag, uint32_t offset, StgWord64 min, StgWord64 max) } else { - m = atof(s); - c = s[strlen(s)-1]; - - if (c == 't' || c == 'T') - m *= (StgWord64)1024*1024*1024*1024; - else if (c == 'g' || c == 'G') - m *= 1024*1024*1024; - else if (c == 'm' || c == 'M') - m *= 1024*1024; - else if (c == 'k' || c == 'K') - m *= 1024; - else if (c == 'w' || c == 'W') - m *= sizeof(W_); + char *end; + m = strtod(s, &end); + + if (end == s) { + errorBelch("error in RTS option %s: unable to parse number '%s'", flag, s); + stg_exit(EXIT_FAILURE); + } + + StgWord64 unit; + switch (*end) { + case 't': + case 'T': + unit = (StgWord64)1024*1024*1024*1024; + break; + case 'g': + case 'G': + unit = 1024*1024*1024; + break; + case 'm': + case 'M': + unit = 1024*1024; + break; + case 'k': + case 'K': + unit = 1024; + break; + case 'w': + case 'W': + unit = sizeof(W_); + break; + case 'b': + case 'B': + case '\0': + unit = 1; + break; + default: + errorBelch("error in RTS option %s: unknown unit suffix '%c'", flag, *end); + stg_exit(EXIT_FAILURE); + } + + m *= unit; } val = (StgWord64)m; ===================================== testsuite/tests/rts/T20201a.hs ===================================== @@ -0,0 +1 @@ +main = putStrLn "hi" ===================================== testsuite/tests/rts/T20201a.stderr ===================================== @@ -0,0 +1 @@ +T20201a: error in RTS option -AturtlesM: unable to parse number 'turtlesM' ===================================== testsuite/tests/rts/T20201b.hs ===================================== @@ -0,0 +1,2 @@ +main = putStrLn "hi" + ===================================== testsuite/tests/rts/T20201b.stderr ===================================== @@ -0,0 +1 @@ +T20201b: error in RTS option -A64z: unknown unit suffix 'z' ===================================== testsuite/tests/rts/all.T ===================================== @@ -587,6 +587,10 @@ test('decodeMyStack_emptyListForMissingFlag', , js_broken(22261) # cloneMyStack# not yet implemented ], compile_and_run, ['']) +# Tests RTS flag parsing. Skipped on JS as it uses a distinct RTS. +test('T20201a', [js_skip, exit_code(1)], compile_and_run, ['-with-rtsopts -AturtlesM']) +test('T20201b', [js_skip, exit_code(1)], compile_and_run, ['-with-rtsopts -A64z']) + test('T22012', [js_skip, extra_ways(['ghci'])], compile_and_run, ['T22012_c.c']) # Skip for JS platform as the JS RTS is always single threaded View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a0fa4941903272c48b050d24e93eec819eff51bd...b7a146e5744bd6d2bc5bed707ec15175368e5bfa -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a0fa4941903272c48b050d24e93eec819eff51bd...b7a146e5744bd6d2bc5bed707ec15175368e5bfa You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 21:21:52 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 16:21:52 -0500 Subject: [Git][ghc/ghc][master] 4 commits: users guide: Mention language extensions in equality constraints discussion Message-ID: <67390cf049aab_53e497fa2c45853f@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 4 changed files: - docs/users_guide/9.14.1-notes.rst - docs/users_guide/debug-info.rst - docs/users_guide/exts/equality_constraints.rst - docs/users_guide/release-notes.rst Changes: ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -51,7 +51,7 @@ Cmm ~~~~~~~~~~~~~~~~~~~~ * The functions `getClosureInfoTbl_maybe`, `getClosureInfoTbl`, - `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow + `getClosurePtrArgs` and `getClosurePtrArgs_maybe` have been added to allow reading of the relevant Closure attributes without reliance on incomplete selectors. ===================================== docs/users_guide/debug-info.rst ===================================== @@ -395,18 +395,6 @@ to a source location. This lookup table is generated by using the ``-finfo-table :implies: :ghc-flag:`-finfo-table-map-with-stack` :implies: :ghc-flag:`-finfo-table-map-with-fallback` -.. ghc-flag:: -finfo-table-map-with-stack - :shortdesc: Include info tables for ``STACK`` closures in the info table - map. - :type: dynamic - :reverse: -fno-info-table-map-with-stack - :category: debugging - - :since: 9.10 - - Include info tables for ``STACK`` closures in the info table map. Note that - this flag is implied by :ghc-flag:`-finfo-table-map`. - .. ghc-flag:: -fno-info-table-map-with-stack :shortdesc: Omit info tables for ``STACK`` closures from the info table map. @@ -423,6 +411,9 @@ to a source location. This lookup table is generated by using the ``-finfo-table ``STACK`` info tables from the info table map and decrease the size of executables with info table profiling information. + Note that :ghc-flag:`-finfo-table-map-with-stack` is implied by + :ghc-flag:`-finfo-table-map`. + .. ghc-flag:: -finfo-table-map-with-fallback :shortdesc: Include info tables with no source location information in the info table map. ===================================== docs/users_guide/exts/equality_constraints.rst ===================================== @@ -6,11 +6,11 @@ Equality constraints and Coercible constraint Equality constraints -------------------- -A type context can include equality constraints of the form ``t1 ~ t2``, -which denote that the types ``t1`` and ``t2`` need to be the same. In -the presence of type families, whether two types are equal cannot -generally be decided locally. Hence, the contexts of function signatures -may include equality constraints, as in the following example: :: +When :extension:`TypeOperators` are enabled, a type context can include equality +constraints of the form ``t1 ~ t2``, which denote that the types ``t1`` and +``t2`` need to be the same. In the presence of type families, whether two types +are equal cannot generally be decided locally. Hence, the contexts of function +signatures may include equality constraints, as in the following example: :: sumCollects :: (Collects c1, Collects c2, Elem c1 ~ Elem c2) => c1 -> c2 -> c2 ===================================== docs/users_guide/release-notes.rst ===================================== @@ -4,4 +4,4 @@ Release notes .. toctree:: :maxdepth: 1 - 9.12.1-notes + 9.14.1-notes View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b7a146e5744bd6d2bc5bed707ec15175368e5bfa...f120e42720dadfdb40e2ffcea480e29343e49a51 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b7a146e5744bd6d2bc5bed707ec15175368e5bfa...f120e42720dadfdb40e2ffcea480e29343e49a51 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 21:22:43 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 16:22:43 -0500 Subject: [Git][ghc/ghc][master] Introduce GHC.Tc.Plugin.lookupTHName Message-ID: <67390d23ae8a_53e49b1ee1461363@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - 1 changed file: - compiler/GHC/Tc/Plugin.hs Changes: ===================================== compiler/GHC/Tc/Plugin.hs ===================================== @@ -15,6 +15,7 @@ module GHC.Tc.Plugin ( lookupOrig, -- * Looking up Names in the typechecking environment + lookupTHName, tcLookupGlobal, tcLookupTyCon, tcLookupDataCon, @@ -74,6 +75,7 @@ import GHC.Tc.Utils.Env ( TcTyThing ) import GHC.Tc.Types.Evidence ( CoercionHole, EvTerm(..) , EvExpr, EvBindsVar, EvBind, mkGivenEvBind ) import GHC.Types.Var ( EvVar ) +import GHC.Plugins ( thNameToGhcNameIO ) import GHC.Unit.Module ( ModuleName, Module ) import GHC.Types.Name ( OccName, Name ) @@ -90,6 +92,7 @@ import GHC.Core.InstEnv ( InstEnvs ) import GHC.Types.Unique ( Unique ) import GHC.Types.PkgQual ( PkgQual ) +import qualified GHC.Internal.TH.Syntax as TH -- | Perform some IO, typically to interact with an external tool. tcPluginIO :: IO a -> TcPluginM a @@ -108,6 +111,13 @@ findImportedModule mod_name mb_pkg = do lookupOrig :: Module -> OccName -> TcPluginM Name lookupOrig mod = unsafeTcPluginTcM . IfaceEnv.lookupOrig mod +-- | Resolve a @template-haskell@ 'TH.Name' to a GHC 'Name'. +-- +-- @since 9.14.1 +lookupTHName :: TH.Name -> TcPluginM (Maybe Name) +lookupTHName th = do + nc <- hsc_NC <$> getTopEnv + tcPluginIO $ thNameToGhcNameIO nc th tcLookupGlobal :: Name -> TcPluginM TyThing tcLookupGlobal = unsafeTcPluginTcM . TcM.tcLookupGlobal View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8e9750324309781531d0d7b1dc66ebfa032c44c8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8e9750324309781531d0d7b1dc66ebfa032c44c8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 21:23:27 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 16:23:27 -0500 Subject: [Git][ghc/ghc][master] x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Message-ID: <67390d4f20d7b_53e49ea2860655d7@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 12 changed files: - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - testsuite/tests/simd/should_run/all.T - + testsuite/tests/simd/should_run/simd_insert.hs - + testsuite/tests/simd/should_run/simd_insert.stdout - + testsuite/tests/simd/should_run/simd_insert_array.hs - + testsuite/tests/simd/should_run/simd_insert_array.stdout - + testsuite/tests/simd/should_run/simd_insert_array_baseline.hs - + testsuite/tests/simd/should_run/simd_insert_array_baseline.stdout - + testsuite/tests/simd/should_run/simd_insert_baseline.hs - + testsuite/tests/simd/should_run/simd_insert_baseline.stdout Changes: ===================================== compiler/GHC/CmmToAsm/X86/CodeGen.hs ===================================== @@ -971,7 +971,6 @@ getRegister' _ _ (CmmMachOp mop []) = pprPanic "getRegister(x86): nullary MachOp" (text $ show mop) getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps - sse4_1 <- sse4_1Enabled avx <- avxEnabled case mop of MO_F_Neg w -> sse2NegCode w x @@ -1068,10 +1067,7 @@ getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps | avx -> vector_float_broadcast_avx l w x | otherwise - -> case w of - W32 | not sse4_1 - -> sorry "32-bit float broadcast requires -msse4 or -fllvm." - _ -> vector_float_broadcast_sse l w x + -> vector_float_broadcast_sse l w x MO_V_Broadcast l w -> vector_int_broadcast l w x @@ -1217,6 +1213,7 @@ getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps ----------------------- + -- TODO: we could use VBROADCASTSS/SD when AVX2 is available. vector_float_broadcast_avx :: Length -> Width -> CmmExpr @@ -1224,11 +1221,8 @@ getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps vector_float_broadcast_avx len w expr = do (dst, exp) <- getSomeReg expr let fmt = VecFormat len (floatScalarFormat w) - code = case w of - W64 -> unitOL $ VSHUF fmt (ImmInt 0) (OpReg dst) dst dst - _ -> toOL [ INSERTPS fmt (ImmInt 0b00_10_0000) (OpReg dst) dst - , VSHUF fmt (ImmInt 0) (OpReg dst) dst dst ] - return $ Fixed fmt dst (exp `appOL` code) + code = VSHUF fmt (ImmInt 0) (OpReg dst) dst dst + return $ Fixed fmt dst (exp `snocOL` code) vector_float_broadcast_sse :: Length -> Width @@ -1237,11 +1231,8 @@ getRegister' platform is32Bit (CmmMachOp mop [x]) = do -- unary MachOps vector_float_broadcast_sse len w expr = do (dst, exp) <- getSomeReg expr let fmt = VecFormat len (floatScalarFormat w) - code = case w of - W64 -> unitOL $ SHUF fmt (ImmInt 0) (OpReg dst) dst - _ -> toOL [ INSERTPS fmt (ImmInt 0b00_10_0000) (OpReg dst) dst - , SHUF fmt (ImmInt 0) (OpReg dst) dst ] - return $ Fixed fmt dst (exp `appOL` code) + code = SHUF fmt (ImmInt 0) (OpReg dst) dst + return $ Fixed fmt dst (exp `snocOL` code) vector_int_broadcast :: Length -> Width @@ -1801,9 +1792,12 @@ getRegister' platform _is32Bit (CmmMachOp mop [x, y, z]) = do -- ternary MachOps -> genFMA3Code l w var x y z -- Ternary vector operations - MO_VF_Insert l W32 | sse4_1 -> vector_float_insert_sse l x y z - | otherwise - -> sorry "FloatX4# operations require either -msse4 or -fllvm" + MO_VF_Insert l W32 | l == 4 -> vector_floatx4_insert_sse sse4_1 x y z + | otherwise -> + sorry $ "FloatX" ++ show l ++ "# insert operations require -fllvm" + -- SIMD NCG TODO: + -- + -- - add support for FloatX8, FloatX16. MO_VF_Insert l W64 -> vector_double_insert avx l x y z MO_V_Insert l W64 -> vector_int_insert_sse l W64 x y z @@ -1814,31 +1808,59 @@ getRegister' platform _is32Bit (CmmMachOp mop [x, y, z]) = do -- ternary MachOps -- SIMD NCG TODO: -- -- - add support for FloatX8, FloatX16. - vector_float_insert_sse :: Length - -> CmmExpr - -> CmmExpr - -> CmmExpr - -> NatM Register - -- FloatX4 - vector_float_insert_sse len at 4 vecExpr valExpr (CmmLit (CmmInt offset _)) - = do - (r, exp) <- getNonClobberedReg valExpr - fn <- getAnyReg vecExpr - let fmt = VecFormat len FmtFloat - imm = litToImm (CmmInt (offset `shiftL` 4) W32) - code dst = exp `appOL` - (fn dst) `snocOL` - (INSERTPS fmt imm (OpReg r) dst) - in return $ Any fmt code - vector_float_insert_sse len _ _ offset + vector_floatx4_insert_sse :: Bool + -> CmmExpr + -> CmmExpr + -> CmmExpr + -> NatM Register + vector_floatx4_insert_sse sse4_1 vecExpr valExpr (CmmLit (CmmInt offset _)) + | sse4_1 = do + (r, exp) <- getNonClobberedReg valExpr + fn <- getAnyReg vecExpr + let fmt = VecFormat 4 FmtFloat + imm = litToImm (CmmInt (offset `shiftL` 4) W32) + code dst = exp `appOL` + (fn dst) `snocOL` + (INSERTPS fmt imm (OpReg r) dst) + in return $ Any fmt code + | otherwise = do -- SSE <= 3 + (r, exp) <- getNonClobberedReg valExpr + fn <- getAnyReg vecExpr + let fmt = VecFormat 4 FmtFloat + tmp <- getNewRegNat fmt + let code dst + = case offset of + 0 -> exp `appOL` + (fn dst) `snocOL` + -- The following MOV compiles to MOVSS instruction and merges two vectors + (MOV fmt (OpReg r) (OpReg dst)) -- dst <- (r[0],dst[1],dst[2],dst[3]) + 1 -> exp `appOL` + (fn dst) `snocOL` + (MOVU fmt (OpReg dst) (OpReg tmp)) `snocOL` -- tmp <- dst + (UNPCKL fmt (OpReg r) dst) `snocOL` -- dst <- (dst[0],r[0],dst[1],r[1]) + (SHUF fmt (ImmInt 0xe4) (OpReg tmp) dst) -- dst <- (dst[0],dst[1],tmp[2],tmp[3]) + 2 -> exp `appOL` + (fn dst) `snocOL` + (MOVU fmt (OpReg dst) (OpReg tmp)) `snocOL` -- tmp <- dst + (MOV fmt (OpReg r) (OpReg tmp)) `snocOL` -- tmp <- (r[0],tmp[1],tmp[2],tmp[3]) with MOVSS + (SHUF fmt (ImmInt 0xc4) (OpReg tmp) dst) -- dst <- (dst[0],dst[1],tmp[0],tmp[3]) + 3 -> exp `appOL` + (fn dst) `snocOL` + (MOVU fmt (OpReg dst) (OpReg tmp)) `snocOL` -- tmp <- dst + (MOV fmt (OpReg r) (OpReg tmp)) `snocOL` -- tmp <- (r[0],tmp[1],tmp[2],tmp[3]) with MOVSS + (SHUF fmt (ImmInt 0x24) (OpReg tmp) dst) -- dst <- (dst[0],dst[1],tmp[2],tmp[0]) + _ -> panic "MO_VF_Insert FloatX4: unsupported offset" + in return $ Any fmt code + vector_floatx4_insert_sse _ _ _ offset = pprPanic "Unsupported vector insert operation" $ vcat - [ text "FloatX" <> ppr len <> text "#" + [ text "FloatX4#" , text "offset:" <+> pdoc platform offset ] + -- SIMD NCG TODO: -- - -- - add support for FloatX8, FloatX16. + -- - add support for DoubleX4#, DoubleX8#. vector_double_insert :: Bool -> Length -> CmmExpr @@ -1857,6 +1879,7 @@ getRegister' platform _is32Bit (CmmMachOp mop [x, y, z]) = do -- ternary MachOps CmmInt 0 _ -> valExp `appOL` vecExp `snocOL` (movu (VecFormat 2 FmtDouble) (OpReg vecReg) (OpReg dst)) `snocOL` + -- The following MOV compiles to MOVSD instruction and merges two vectors (MOV (VecFormat 2 FmtDouble) (OpReg valReg) (OpReg dst)) CmmInt 1 _ -> valExp `appOL` vecExp `snocOL` ===================================== compiler/GHC/CmmToAsm/X86/Instr.hs ===================================== @@ -325,6 +325,7 @@ data Instr -- | Move two 32-bit floats from the high part of an xmm register -- to the low part of another xmm register. | MOVHLPS Format Reg Reg + | UNPCKL Format Operand Reg | PUNPCKLQDQ Format Operand Reg -- Shift @@ -524,6 +525,8 @@ regUsageOfInstr platform instr MOVHLPS fmt src dst -> mkRU [mk fmt src] [mk fmt dst] + UNPCKL fmt src dst + -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] PUNPCKLQDQ fmt src dst -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] @@ -765,6 +768,8 @@ patchRegsOfInstr platform instr env MOVHLPS fmt src dst -> MOVHLPS fmt (env src) (env dst) + UNPCKL fmt src dst + -> UNPCKL fmt (patchOp src) (env dst) PUNPCKLQDQ fmt src dst -> PUNPCKLQDQ fmt (patchOp src) (env dst) ===================================== compiler/GHC/CmmToAsm/X86/Ppr.hs ===================================== @@ -1041,6 +1041,8 @@ pprInstr platform i = case i of MOVHLPS format from to -> pprOpReg (text "movhlps") format (OpReg from) to + UNPCKL format src dst + -> pprFormatOpReg (text "unpckl") format src dst PUNPCKLQDQ format from to -> pprOpReg (text "punpcklqdq") format from to ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -12,13 +12,18 @@ setTestOpts( , when(unregisterised(), skip) , when(arch('wasm32'), skip) , js_skip + ]) + +test('simd_insert_baseline', [], compile_and_run, ['']) +test('simd_insert_array_baseline', [], compile_and_run, ['']) - # Ensure we set the CPU features we have available. - # - # This is especially important with the LLVM backend, as LLVM can otherwise - # produce ABI-incompatible code, e.g. when compiling usage of YMM registers - # with or without -mavx2. - , when(have_cpu_feature('sse4_1'), extra_hc_opts('-msse4')) +# Ensure we set the CPU features we have available. +# +# This is especially important with the LLVM backend, as LLVM can otherwise +# produce ABI-incompatible code, e.g. when compiling usage of YMM registers +# with or without -mavx2. +setTestOpts( + [ when(have_cpu_feature('sse4_1'), extra_hc_opts('-msse4')) , when(have_cpu_feature('avx'), extra_hc_opts('-mavx')) , when(have_cpu_feature('avx2'), extra_hc_opts('-mavx2')) , when(have_cpu_feature('avx512f'), extra_hc_opts('-mavx512f')) @@ -55,6 +60,9 @@ test('simd014', # register on non-x86 architectures. compile_and_run, ['simd014Cmm.cmm']) +test('simd_insert', [], compile_and_run, ['']) +test('simd_insert_array', [], compile_and_run, ['']) + test('T22187', [],compile,['']) test('T22187_run', [],compile_and_run,['']) test('T25062_V16', [], compile_and_run, ['']) ===================================== testsuite/tests/simd/should_run/simd_insert.hs ===================================== @@ -0,0 +1,37 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +unpackDoubleX2 :: DoubleX2# -> (Double, Double) +unpackDoubleX2 v = case unpackDoubleX2# v of + (# a0, a1 #) -> (D# a0, D# a1) + +testFloatX4 :: IO () +testFloatX4 = do + let v = packFloatX4# (# 0.1#, 1.0#, 2.0#, 3.0# #) + print $ unpackFloatX4 v + let w = insertFloatX4# v 7.0# 0# + print $ unpackFloatX4 w + let x = insertFloatX4# v 7.0# 1# + print $ unpackFloatX4 x + let y = insertFloatX4# v 7.0# 2# + print $ unpackFloatX4 y + let z = insertFloatX4# v 7.0# 3# + print $ unpackFloatX4 z + +testDoubleX2 :: IO () +testDoubleX2 = do + let v = packDoubleX2# (# 0.1##, 1.0## #) + print $ unpackDoubleX2 v + let w = insertDoubleX2# v 7.0## 0# + print $ unpackDoubleX2 w + let x = insertDoubleX2# v 7.0## 1# + print $ unpackDoubleX2 x + +main :: IO () +main = do + testFloatX4 + testDoubleX2 ===================================== testsuite/tests/simd/should_run/simd_insert.stdout ===================================== @@ -0,0 +1,8 @@ +(0.1,1.0,2.0,3.0) +(7.0,1.0,2.0,3.0) +(0.1,7.0,2.0,3.0) +(0.1,1.0,7.0,3.0) +(0.1,1.0,2.0,7.0) +(0.1,1.0) +(7.0,1.0) +(0.1,7.0) ===================================== testsuite/tests/simd/should_run/simd_insert_array.hs ===================================== @@ -0,0 +1,49 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +import Control.Monad +import Data.Array.Base +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +unpackDoubleX2 :: DoubleX2# -> (Double, Double) +unpackDoubleX2 v = case unpackDoubleX2# v of + (# a0, a1 #) -> (D# a0, D# a1) + +indexFloatArrayAsFloatX4 :: UArray Int Float -> Int -> FloatX4# +indexFloatArrayAsFloatX4 (UArray l u n ba) i = case i - l of I# i# -> indexFloatArrayAsFloatX4# ba i# + +indexDoubleArrayAsDoubleX2 :: UArray Int Double -> Int -> DoubleX2# +indexDoubleArrayAsDoubleX2 (UArray l u n ba) i = case i - l of I# i# -> indexDoubleArrayAsDoubleX2# ba i# + +someFloatArray :: UArray Int Float +someFloatArray = listArray (0, 7) [111.0, 222.0, 333.0, 444.0, 555.0, 666.0, 777.0, 888.0] + +someDoubleArray :: UArray Int Double +someDoubleArray = listArray (0, 7) [111.0, 222.0, 333.0, 444.0, 555.0, 666.0, 777.0, 888.0] + +testFloatX4 :: IO () +testFloatX4 = forM_ [0,4] $ \i -> do + let v = indexFloatArrayAsFloatX4 someFloatArray i + let w = insertFloatX4# v 123.45# 0# + print $ unpackFloatX4 w + let x = insertFloatX4# v 123.45# 1# + print $ unpackFloatX4 x + let y = insertFloatX4# v 123.45# 2# + print $ unpackFloatX4 y + let z = insertFloatX4# v 123.45# 3# + print $ unpackFloatX4 z + +testDoubleX2 :: IO () +testDoubleX2 = forM_ [0,2,4,6] $ \i -> do + let v = indexDoubleArrayAsDoubleX2 someDoubleArray i + let w = insertDoubleX2# v 123.45## 0# + print $ unpackDoubleX2 w + let x = insertDoubleX2# v 123.45## 1# + print $ unpackDoubleX2 x + +main :: IO () +main = do + testFloatX4 + testDoubleX2 ===================================== testsuite/tests/simd/should_run/simd_insert_array.stdout ===================================== @@ -0,0 +1,16 @@ +(123.45,222.0,333.0,444.0) +(111.0,123.45,333.0,444.0) +(111.0,222.0,123.45,444.0) +(111.0,222.0,333.0,123.45) +(123.45,666.0,777.0,888.0) +(555.0,123.45,777.0,888.0) +(555.0,666.0,123.45,888.0) +(555.0,666.0,777.0,123.45) +(123.45,222.0) +(111.0,123.45) +(123.45,444.0) +(333.0,123.45) +(123.45,666.0) +(555.0,123.45) +(123.45,888.0) +(777.0,123.45) ===================================== testsuite/tests/simd/should_run/simd_insert_array_baseline.hs ===================================== @@ -0,0 +1,49 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +import Control.Monad +import Data.Array.Base +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +unpackDoubleX2 :: DoubleX2# -> (Double, Double) +unpackDoubleX2 v = case unpackDoubleX2# v of + (# a0, a1 #) -> (D# a0, D# a1) + +indexFloatArrayAsFloatX4 :: UArray Int Float -> Int -> FloatX4# +indexFloatArrayAsFloatX4 (UArray l u n ba) i = case i - l of I# i# -> indexFloatArrayAsFloatX4# ba i# + +indexDoubleArrayAsDoubleX2 :: UArray Int Double -> Int -> DoubleX2# +indexDoubleArrayAsDoubleX2 (UArray l u n ba) i = case i - l of I# i# -> indexDoubleArrayAsDoubleX2# ba i# + +someFloatArray :: UArray Int Float +someFloatArray = listArray (0, 7) [111.0, 222.0, 333.0, 444.0, 555.0, 666.0, 777.0, 888.0] + +someDoubleArray :: UArray Int Double +someDoubleArray = listArray (0, 7) [111.0, 222.0, 333.0, 444.0, 555.0, 666.0, 777.0, 888.0] + +testFloatX4 :: IO () +testFloatX4 = forM_ [0,4] $ \i -> do + let v = indexFloatArrayAsFloatX4 someFloatArray i + let w = insertFloatX4# v 123.45# 0# + print $ unpackFloatX4 w + let x = insertFloatX4# v 123.45# 1# + print $ unpackFloatX4 x + let y = insertFloatX4# v 123.45# 2# + print $ unpackFloatX4 y + let z = insertFloatX4# v 123.45# 3# + print $ unpackFloatX4 z + +testDoubleX2 :: IO () +testDoubleX2 = forM_ [0,2,4,6] $ \i -> do + let v = indexDoubleArrayAsDoubleX2 someDoubleArray i + let w = insertDoubleX2# v 123.45## 0# + print $ unpackDoubleX2 w + let x = insertDoubleX2# v 123.45## 1# + print $ unpackDoubleX2 x + +main :: IO () +main = do + testFloatX4 + testDoubleX2 ===================================== testsuite/tests/simd/should_run/simd_insert_array_baseline.stdout ===================================== @@ -0,0 +1,16 @@ +(123.45,222.0,333.0,444.0) +(111.0,123.45,333.0,444.0) +(111.0,222.0,123.45,444.0) +(111.0,222.0,333.0,123.45) +(123.45,666.0,777.0,888.0) +(555.0,123.45,777.0,888.0) +(555.0,666.0,123.45,888.0) +(555.0,666.0,777.0,123.45) +(123.45,222.0) +(111.0,123.45) +(123.45,444.0) +(333.0,123.45) +(123.45,666.0) +(555.0,123.45) +(123.45,888.0) +(777.0,123.45) ===================================== testsuite/tests/simd/should_run/simd_insert_baseline.hs ===================================== @@ -0,0 +1,37 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +unpackDoubleX2 :: DoubleX2# -> (Double, Double) +unpackDoubleX2 v = case unpackDoubleX2# v of + (# a0, a1 #) -> (D# a0, D# a1) + +testFloatX4 :: IO () +testFloatX4 = do + let v = packFloatX4# (# 0.1#, 1.0#, 2.0#, 3.0# #) + print $ unpackFloatX4 v + let w = insertFloatX4# v 7.0# 0# + print $ unpackFloatX4 w + let x = insertFloatX4# v 7.0# 1# + print $ unpackFloatX4 x + let y = insertFloatX4# v 7.0# 2# + print $ unpackFloatX4 y + let z = insertFloatX4# v 7.0# 3# + print $ unpackFloatX4 z + +testDoubleX2 :: IO () +testDoubleX2 = do + let v = packDoubleX2# (# 0.1##, 1.0## #) + print $ unpackDoubleX2 v + let w = insertDoubleX2# v 7.0## 0# + print $ unpackDoubleX2 w + let x = insertDoubleX2# v 7.0## 1# + print $ unpackDoubleX2 x + +main :: IO () +main = do + testFloatX4 + testDoubleX2 ===================================== testsuite/tests/simd/should_run/simd_insert_baseline.stdout ===================================== @@ -0,0 +1,8 @@ +(0.1,1.0,2.0,3.0) +(7.0,1.0,2.0,3.0) +(0.1,7.0,2.0,3.0) +(0.1,1.0,7.0,3.0) +(0.1,1.0,2.0,7.0) +(0.1,1.0) +(7.0,1.0) +(0.1,7.0) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a0e168ec0b6f18ffeddaf8a5dfc68e84563630b8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a0e168ec0b6f18ffeddaf8a5dfc68e84563630b8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 21:24:21 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 16:24:21 -0500 Subject: [Git][ghc/ghc][master] X86 NCG: allow VXOR at scalar floating-point types Message-ID: <67390d85b97b2_53e49eedcd4725fc@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - 4 changed files: - compiler/GHC/CmmToAsm/X86/Ppr.hs - + testsuite/tests/simd/should_run/T25455.hs - + testsuite/tests/simd/should_run/T25455.stdout - testsuite/tests/simd/should_run/all.T Changes: ===================================== compiler/GHC/CmmToAsm/X86/Ppr.hs ===================================== @@ -1345,9 +1345,11 @@ pprInstr platform i = case i of ] where mem = case fmt of + FF32 -> text "vxorps" + FF64 -> text "vxorpd" VecFormat _ FmtFloat -> text "vxorps" VecFormat _ FmtDouble -> text "vxorpd" - _ -> pprPanic "GHC.CmmToAsm.X86.Ppr.pprVxor: elementy type must be Float or Double" + _ -> pprPanic "GHC.CmmToAsm.X86.Ppr.pprVxor: element type must be Float or Double" (ppr fmt) pprInsert :: Line doc -> Format -> Imm -> Operand -> Reg -> doc ===================================== testsuite/tests/simd/should_run/T25455.hs ===================================== @@ -0,0 +1,14 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} + +module Main where + +import GHC.Exts + +unpackFloatX4 :: FloatX4# -> (Float, Float, Float, Float) +unpackFloatX4 v = case unpackFloatX4# v of + (# a0, a1, a2, a3 #) -> (F# a0, F# a1, F# a2, F# a3) + +main :: IO () +main = do + let v = packFloatX4# (# 0.0#, 1.0#, 2.0#, 3.0# #) + print $ unpackFloatX4 v ===================================== testsuite/tests/simd/should_run/T25455.stdout ===================================== @@ -0,0 +1 @@ +(0.0,1.0,2.0,3.0) ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -89,3 +89,4 @@ test('T25062_V64' , ['']) test('T25169', [], compile_and_run, ['']) +test('T25455', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3936bf1bc37c9f8ea662ed4b57a3a28b5a670c54 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3936bf1bc37c9f8ea662ed4b57a3a28b5a670c54 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 21:25:00 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 16:25:00 -0500 Subject: [Git][ghc/ghc][master] rts: Fix platform-dependent pointer casts Message-ID: <67390dac32568_53e49d145207531c@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 1 changed file: - rts/Task.h Changes: ===================================== rts/Task.h ===================================== @@ -314,18 +314,12 @@ typedef StgWord64 TaskId; // #if defined(THREADED_RTS) INLINE_HEADER TaskId serialiseTaskId (OSThreadId taskID) { -#if defined(freebsd_HOST_OS) || defined(darwin_HOST_OS) - // Here OSThreadId is a pthread_t and pthread_t is a pointer, but within + // Here OSThreadId may be a pthread_t and pthread_t is a pointer, but within // the process we can still use that pointer value as a unique id. - return (TaskId) (size_t) taskID; -#else - // On Windows, Linux and others it's an integral type to start with. - return (TaskId) taskID; -#endif + return (TaskId) (uintptr_t) taskID; } #endif -// // Get a serialisable Id for the Task's OS thread // Needed mainly for logging since the OSThreadId is an opaque type INLINE_HEADER TaskId @@ -334,7 +328,7 @@ serialisableTaskId (Task *task) #if defined(THREADED_RTS) return serialiseTaskId(task->id); #else - return (TaskId) (size_t) task; + return (TaskId) (uintptr_t) task; #endif } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d9dff93a3c902cead782b35e8f4003fb766cb4b7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d9dff93a3c902cead782b35e8f4003fb766cb4b7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 21:25:44 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sat, 16 Nov 2024 16:25:44 -0500 Subject: [Git][ghc/ghc][master] testsuite: Mark encoding004 as broken on FreeBSD Message-ID: <67390dd81f894_53e49110105c75532@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 1 changed file: - libraries/base/tests/IO/all.T Changes: ===================================== libraries/base/tests/IO/all.T ===================================== @@ -137,17 +137,20 @@ test('encoding001', [], compile_and_run, ['']) test('encoding002', normal, compile_and_run, ['']) test('encoding003', normal, compile_and_run, ['']) -test('encoding004', [extra_files(['encoded-data/']), js_broken(22374), -# wasi-libc doesn't have cp936, see -# https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/iconv.c#L38 -# and -# https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/codepages.h -# for locales supported by wasi-libc's iconv implementation -when(arch('wasm32'), skip), -# MacOS Sonoma iconv() has a regression that causes this test to fail on the -# CP936 roundtrip. See the ticket for related issues in other projects. -when(opsys('darwin'), fragile(24161)) -], compile_and_run, ['']) +test('encoding004', + [ extra_files(['encoded-data/']), + js_broken(22374), + # wasi-libc doesn't have cp936, see + # https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/iconv.c#L38 + # and + # https://gitlab.haskell.org/ghc/wasi-libc/-/blob/main/libc-top-half/musl/src/locale/codepages.h + # for locales supported by wasi-libc's iconv implementation + when(arch('wasm32'), skip), + # MacOS Sonoma iconv() has a regression that causes this test to fail on the + # CP936 roundtrip. See the ticket for related issues in other projects. + when(opsys('darwin'), fragile(24161)), + when(opsys('freebsd'), expect_broken(22003)) + ], compile_and_run, ['']) test('encoding005', normal, compile_and_run, ['']) test('environment001', [], makefile_test, ['environment001-test']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6d95cdb83d7a15c35d6ee1a675ff891a3ac1ca20 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6d95cdb83d7a15c35d6ee1a675ff891a3ac1ca20 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 16 23:39:36 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Sat, 16 Nov 2024 18:39:36 -0500 Subject: [Git][ghc/ghc][wip/alpine-i386] Update .gitlab-ci.yml Message-ID: <67392d38d508d_53e491a19b588922f@gitlab.mail> Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC Commits: 150558e2 by Ben Gamari at 2024-11-16T23:39:33+00:00 Update .gitlab-ci.yml - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: eb92decd8299dec1749bb625042a2581c3467749 + DOCKER_REV: 81d1757e482e92b3d948538a88049846628e9f62 # Sequential version number of all cached things. # Bump to invalidate GitLab CI cache. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/150558e2481fe5492c6484cf9d3e2177ab8697e5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/150558e2481fe5492c6484cf9d3e2177ab8697e5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 17 14:05:25 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Sun, 17 Nov 2024 09:05:25 -0500 Subject: [Git][ghc/ghc][wip/alpine-i386] 33 commits: Add regression test for #16234 Message-ID: <6739f825a5d83_2ce9f8f72881668d@gitlab.mail> Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC Commits: fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 687228ed by Ben Gamari at 2024-11-17T09:04:18-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. - - - - - f9efb53a by Ben Gamari at 2024-11-17T09:04:18-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Julian and Mikolaj. - - - - - ddc8b523 by Ben Gamari at 2024-11-17T09:04:19-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 20 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/merge_request_templates/Default.md - compile_flags.txt - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/Tc/Plugin.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/debug-info.rst - docs/users_guide/exts/equality_constraints.rst - docs/users_guide/release-notes.rst - libraries/base/tests/IO/all.T - libraries/base/tests/unicode002.stdout - libraries/base/tests/unicode003.hs - libraries/base/tests/unicode003.stdout - libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/150558e2481fe5492c6484cf9d3e2177ab8697e5...ddc8b5231a6828df17d3e3fc676ba0bf7183de10 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/150558e2481fe5492c6484cf9d3e2177ab8697e5...ddc8b5231a6828df17d3e3fc676ba0bf7183de10 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 17 14:33:25 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sun, 17 Nov 2024 09:33:25 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 23 commits: rts/RtsFlags: Refactor size parsing Message-ID: <6739feb535995_2ce9f82df76c3428@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 27b79fc4 by Matthew Pickering at 2024-11-17T09:33:01-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - ac2cc77b by Rodrigo Mesquita at 2024-11-17T09:33:01-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - f4470849 by Rodrigo Mesquita at 2024-11-17T09:33:02-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 39210b29 by Rodrigo Mesquita at 2024-11-17T09:33:02-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 4394a926 by Rodrigo Mesquita at 2024-11-17T09:33:02-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 7e7fb52d by Rodrigo Mesquita at 2024-11-17T09:33:02-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - 426a732c by Rodrigo Mesquita at 2024-11-17T09:33:02-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - e6a76060 by Rodrigo Mesquita at 2024-11-17T09:33:02-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - e1c81f84 by Rodrigo Mesquita at 2024-11-17T09:33:02-05:00 base: Add to changelog.md CLC #285 - - - - - edb77cfc by Rodrigo Mesquita at 2024-11-17T09:33:02-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 6c221e07 by Ben Gamari at 2024-11-17T09:33:03-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - aa225369 by Ben Gamari at 2024-11-17T09:33:03-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 30 changed files: - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Tc/Plugin.hs - compiler/GHC/Utils/Panic/Plain.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/debug-info.rst - docs/users_guide/exts/equality_constraints.rst - docs/users_guide/release-notes.rst - ghc/GHCi/UI/Monad.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/all.T - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/35006face779416fabcd8d11366de55d6b570f84...aa2253694188a937b4aaefffb363db2159df3c4b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/35006face779416fabcd8d11366de55d6b570f84...aa2253694188a937b4aaefffb363db2159df3c4b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 17 18:11:49 2024 From: gitlab at gitlab.haskell.org (Peter Trommler (@trommler)) Date: Sun, 17 Nov 2024 13:11:49 -0500 Subject: [Git][ghc/ghc][wip/ppc64-fix-T25155-T25240] 15 commits: rts: Fix EINTR check in timerfd ticker Message-ID: <673a31e51c9b9_18ffc13fe0c50915@gitlab.mail> Peter Trommler pushed to branch wip/ppc64-fix-T25155-T25240 at Glasgow Haskell Compiler / GHC Commits: 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - da665a52 by Peter Trommler at 2024-11-17T18:11:44+00:00 Fix requirements on T25240 T25240 doesn't need RTS linker, GHCi is sufficient and GHCi can also be dynamically linked. - - - - - ee63b505 by Peter Trommler at 2024-11-17T18:11:44+00:00 Fix requirements for T25155 Loading C objects requires RTS linker. - - - - - 30 changed files: - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Tc/Plugin.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/debug-info.rst - docs/users_guide/exts/equality_constraints.rst - docs/users_guide/release-notes.rst - libraries/base/tests/IO/all.T - rts/Capability.h - rts/RtsFlags.c - rts/Task.h - rts/include/rts/Config.h - rts/include/rts/storage/HeapAlloc.h - rts/posix/ticker/TimerFd.c - rts/sm/GC.c - rts/sm/GCThread.h - testsuite/tests/ghci/linking/T25240/all.T - testsuite/tests/ghci/linking/all.T - + testsuite/tests/rts/T20201a.hs - + testsuite/tests/rts/T20201a.stderr - + testsuite/tests/rts/T20201b.hs - + testsuite/tests/rts/T20201b.stderr - testsuite/tests/rts/all.T - + testsuite/tests/simd/should_run/T25455.hs - + testsuite/tests/simd/should_run/T25455.stdout - testsuite/tests/simd/should_run/all.T - + testsuite/tests/simd/should_run/simd_insert.hs - + testsuite/tests/simd/should_run/simd_insert.stdout - + testsuite/tests/simd/should_run/simd_insert_array.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9c5112c99ef0a16ca8340ecabda02f8dc9a8f4ee...ee63b50550a22c83531cc66a55bfba922b5b8310 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9c5112c99ef0a16ca8340ecabda02f8dc9a8f4ee...ee63b50550a22c83531cc66a55bfba922b5b8310 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 17 21:29:47 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Sun, 17 Nov 2024 16:29:47 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/freebsd Message-ID: <673a604bb82e_18ffc7a6c7866795@gitlab.mail> Ben Gamari pushed new branch wip/freebsd at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/freebsd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 17 21:29:59 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Sun, 17 Nov 2024 16:29:59 -0500 Subject: [Git][ghc/ghc][wip/freebsd] rts/linker: Fix mapping wrap-around logic Message-ID: <673a6057b5aaf_18ffc7a815466949@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: fd3686e4 by Ben Gamari at 2024-11-17T16:29:47-05:00 rts/linker: Fix mapping wrap-around logic Previously the structure of `mmapInRegion` concealed a subtle bug concerning handling of `mmap` returning mappings below the beginning of the desired region. Specifically, we would reset `p = result + bytes` and then again reset `p = region->start` before looping around for another iteration. This resulted in an infinite loop on FreeBSD. Fixes #25492. - - - - - 1 changed file: - rts/linker/MMap.c Changes: ===================================== rts/linker/MMap.c ===================================== @@ -345,12 +345,7 @@ mmapInRegion ( if (result == NULL) { // The mapping failed return NULL; - } else if (result < region->start) { - // Uh oh, we assume that mmap() will only give us a - // an address at or after the requested address. - // Try again. - p = (uint8_t *) result + bytes; - } else if (result < region->end) { + } else if (result >= region->start && result < region->end) { // Success! region->last = (uint8_t *) result + bytes; return result; @@ -358,17 +353,23 @@ mmapInRegion ( // We failed to find a suitable mapping munmap(result, bytes); reportMemoryMap(); - errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " + errorBelch("mmapForLinker: failed to mmap() memory between %p and %p; " "asked for %zu bytes at %p. " "Try specifying an address with +RTS -xm -RTS", - bytes, p); + region->start, region->end, bytes, p); return NULL; - } + } else if (result < region->start) { + // Uh oh, we assume that mmap() will only give us a + // an address at or after the requested address. + // Try again. + p = (uint8_t *) result + bytes; + } else if (result >= region->end) { + // mmap() gave us too high an address; wrap around and try again + wrapped = true; + p = region->start; + } - // mmap() gave us too high an address; wrap around and try again munmap(result, bytes); - wrapped = true; - p = region->start; } } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fd3686e410fdd66d37bc797b0dc157304af6faab -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fd3686e410fdd66d37bc797b0dc157304af6faab You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 17 21:30:35 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Sun, 17 Nov 2024 16:30:35 -0500 Subject: [Git][ghc/ghc][wip/freebsd] rts/linker: Fix out-of-bounds mapping logic Message-ID: <673a607b39aa0_18ffc8cfa646865b@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: e7306479 by Ben Gamari at 2024-11-17T16:30:18-05:00 rts/linker: Fix out-of-bounds mapping logic Previously the structure of `mmapInRegion` concealed a subtle bug concerning handling of `mmap` returning mappings below the beginning of the desired region. Specifically, we would reset `p = result + bytes` and then again reset `p = region->start` before looping around for another iteration. This resulted in an infinite loop on FreeBSD. Fixes #25492. - - - - - 1 changed file: - rts/linker/MMap.c Changes: ===================================== rts/linker/MMap.c ===================================== @@ -345,12 +345,7 @@ mmapInRegion ( if (result == NULL) { // The mapping failed return NULL; - } else if (result < region->start) { - // Uh oh, we assume that mmap() will only give us a - // an address at or after the requested address. - // Try again. - p = (uint8_t *) result + bytes; - } else if (result < region->end) { + } else if (result >= region->start && result < region->end) { // Success! region->last = (uint8_t *) result + bytes; return result; @@ -358,17 +353,23 @@ mmapInRegion ( // We failed to find a suitable mapping munmap(result, bytes); reportMemoryMap(); - errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " + errorBelch("mmapForLinker: failed to mmap() memory between %p and %p; " "asked for %zu bytes at %p. " "Try specifying an address with +RTS -xm -RTS", - bytes, p); + region->start, region->end, bytes, p); return NULL; - } + } else if (result < region->start) { + // Uh oh, we assume that mmap() will only give us a + // an address at or after the requested address. + // Try again. + p = (uint8_t *) result + bytes; + } else if (result >= region->end) { + // mmap() gave us too high an address; wrap around and try again + wrapped = true; + p = region->start; + } - // mmap() gave us too high an address; wrap around and try again munmap(result, bytes); - wrapped = true; - p = region->start; } } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e7306479bfd098f454d6379e0c707f869d943931 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e7306479bfd098f454d6379e0c707f869d943931 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 17 21:44:25 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sun, 17 Nov 2024 16:44:25 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: hadrian: Allow haddock options to be passed via key-value settings Message-ID: <673a63b9e579_18ffc9e68f87619a@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: cf4f23bf by Ben Gamari at 2024-11-17T16:43:57-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 388dc288 by Matthew Pickering at 2024-11-17T16:43:58-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - 98a8621f by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - a12666a3 by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - d7c87ce9 by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - e2d1ecc7 by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 47c12cd0 by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - 71502625 by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 44708fbd by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 274b7910 by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 base: Add to changelog.md CLC #285 - - - - - cf5187f8 by Rodrigo Mesquita at 2024-11-17T16:43:58-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 6132615e by Ben Gamari at 2024-11-17T16:43:59-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 0a0bfc31 by Ben Gamari at 2024-11-17T16:43:59-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 30 changed files: - compiler/GHC/Utils/Panic/Plain.hs - ghc/GHCi/UI/Monad.hs - hadrian/doc/user-settings.md - hadrian/src/Flavour.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr - libraries/base/tests/T24807.stderr - libraries/base/tests/all.T - libraries/base/tests/assert.stderr - libraries/base/tests/readFloat.stderr - − libraries/base/tests/topHandler04.hs - − libraries/base/tests/topHandler04.stderr - libraries/ghc-compact/tests/compact_function.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/aa2253694188a937b4aaefffb363db2159df3c4b...0a0bfc3150c2cfbdfbb574d65521ea63f4a38e3b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/aa2253694188a937b4aaefffb363db2159df3c4b...0a0bfc3150c2cfbdfbb574d65521ea63f4a38e3b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 02:34:33 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sun, 17 Nov 2024 21:34:33 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: hadrian: Allow haddock options to be passed via key-value settings Message-ID: <673aa7b8f1b88_37f98a251bd88975f@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: cc9ec58a by Ben Gamari at 2024-11-17T21:34:21-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - f5defa1d by Matthew Pickering at 2024-11-17T21:34:22-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - da55faea by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - efd36f30 by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - bd55fd31 by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - df869e91 by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 1ebef28b by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - ee45047e by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 15351274 by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 435055bf by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 base: Add to changelog.md CLC #285 - - - - - 9af74f82 by Rodrigo Mesquita at 2024-11-17T21:34:22-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 48ba4761 by Ben Gamari at 2024-11-17T21:34:23-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 129c14fb by Ben Gamari at 2024-11-17T21:34:23-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 30 changed files: - compiler/GHC/Utils/Panic/Plain.hs - ghc/GHCi/UI/Monad.hs - hadrian/doc/user-settings.md - hadrian/src/Flavour.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr - libraries/base/tests/T24807.stderr - libraries/base/tests/all.T - libraries/base/tests/assert.stderr - libraries/base/tests/readFloat.stderr - − libraries/base/tests/topHandler04.hs - − libraries/base/tests/topHandler04.stderr - libraries/ghc-compact/tests/compact_function.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0a0bfc3150c2cfbdfbb574d65521ea63f4a38e3b...129c14fbd48890517022d492a07e535297d7fb35 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0a0bfc3150c2cfbdfbb574d65521ea63f4a38e3b...129c14fbd48890517022d492a07e535297d7fb35 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 05:55:36 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 18 Nov 2024 00:55:36 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: hadrian: Allow haddock options to be passed via key-value settings Message-ID: <673ad6d8c30ff_37f98aa0ee7011433b@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: fe0ac37a by Ben Gamari at 2024-11-18T00:55:22-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 8989bbd2 by Matthew Pickering at 2024-11-18T00:55:23-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - 36a36107 by Rodrigo Mesquita at 2024-11-18T00:55:23-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 6adf20bc by Rodrigo Mesquita at 2024-11-18T00:55:23-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 8b404d92 by Rodrigo Mesquita at 2024-11-18T00:55:23-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - ad10d70b by Rodrigo Mesquita at 2024-11-18T00:55:23-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3aedb803 by Rodrigo Mesquita at 2024-11-18T00:55:23-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - 5e8bf193 by Rodrigo Mesquita at 2024-11-18T00:55:23-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 02f93e98 by Rodrigo Mesquita at 2024-11-18T00:55:24-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 1c4f738a by Rodrigo Mesquita at 2024-11-18T00:55:24-05:00 base: Add to changelog.md CLC #285 - - - - - da8e50c1 by Rodrigo Mesquita at 2024-11-18T00:55:24-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 905dfa72 by Ben Gamari at 2024-11-18T00:55:24-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 12614843 by Ben Gamari at 2024-11-18T00:55:24-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 30 changed files: - compiler/GHC/Utils/Panic/Plain.hs - ghc/GHCi/UI/Monad.hs - hadrian/doc/user-settings.md - hadrian/src/Flavour.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr - libraries/base/tests/T24807.stderr - libraries/base/tests/all.T - libraries/base/tests/assert.stderr - libraries/base/tests/readFloat.stderr - − libraries/base/tests/topHandler04.hs - − libraries/base/tests/topHandler04.stderr - libraries/ghc-compact/tests/compact_function.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/129c14fbd48890517022d492a07e535297d7fb35...12614843567177b62da64f05d0d1cd781ad9db6f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/129c14fbd48890517022d492a07e535297d7fb35...12614843567177b62da64f05d0d1cd781ad9db6f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 09:05:58 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 18 Nov 2024 04:05:58 -0500 Subject: [Git][ghc/ghc][master] hadrian: Allow haddock options to be passed via key-value settings Message-ID: <673b03765ebbf_37f98a11b456c150437@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 2 changed files: - hadrian/doc/user-settings.md - hadrian/src/Flavour.hs Changes: ===================================== hadrian/doc/user-settings.md ===================================== @@ -138,6 +138,9 @@ the right names for them: * `runtest.opts` defines extra arguments passed to `runtest.py` when invoked via the `hadrian test` target. + * `haddock.build-package.opts` defines arguments to be passed to Haddock + when building documentation. + - using a wildcard (`*`) ranges over all possible values for a given "slot"; - `=` entirely overrides the arguments for a given builder in a given context, with the value specified on the right hand side of `=`, while `+=` merely ===================================== hadrian/src/Flavour.hs ===================================== @@ -555,6 +555,7 @@ builderPredicate = builderSetting <&> (\(wstg, wpkg, builderMode) -> BM_CabalConfigure -> builder (Cabal Setup) BM_RunTest -> builder Testsuite BM_Hsc2HsRun -> builder Hsc2Hs + BM_Haddock -> builder (Haddock BuildPackage) ) ) @@ -566,6 +567,7 @@ data BuilderMode = BM_Ghc (Wildcard GhcMode) | BM_CabalConfigure | BM_Hsc2HsRun | BM_RunTest + | BM_Haddock -- | Interpretation-agnostic description of the builder settings -- supported by Hadrian. @@ -606,6 +608,7 @@ builderSetting = , str "cc" *> fmap BM_Cc (wild ccBuilder) <* str "opts" , BM_CabalConfigure <$ str "cabal" <* str "configure" <* str "opts" , BM_Hsc2HsRun <$ str "hsc2hs" <* str "run" <* str "opts" + , BM_Haddock <$ str "haddock" <* str "build-package" <* str "opts" ] , (Wildcard, Wildcard, BM_RunTest) <$ str "runtest" <* str "opts" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/26e8698429be8b4168c6586fdc20d239ef600912 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/26e8698429be8b4168c6586fdc20d239ef600912 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 09:06:45 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 18 Nov 2024 04:06:45 -0500 Subject: [Git][ghc/ghc][master] 10 commits: Exception rethrowing Message-ID: <673b03a580c7d_37f98a1322da41571a8@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 30 changed files: - compiler/GHC/Utils/Panic/Plain.hs - ghc/GHCi/UI/Monad.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr - libraries/base/tests/T24807.stderr - libraries/base/tests/all.T - libraries/base/tests/assert.stderr - libraries/base/tests/readFloat.stderr - − libraries/base/tests/topHandler04.hs - − libraries/base/tests/topHandler04.stderr - libraries/ghc-compact/tests/compact_function.stderr - libraries/ghc-compact/tests/compact_mutable.stderr - libraries/ghc-compact/tests/compact_pinned.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/26e8698429be8b4168c6586fdc20d239ef600912...d9326a48acb5340dc1d67052bdfd8abfb35f5b54 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/26e8698429be8b4168c6586fdc20d239ef600912...d9326a48acb5340dc1d67052bdfd8abfb35f5b54 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 09:07:52 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 18 Nov 2024 04:07:52 -0500 Subject: [Git][ghc/ghc][master] 2 commits: rts/adjustor: Clean up code style of Nativei386 adjustor Message-ID: <673b03e7f2232_37f98a12b16a4161283@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 2 changed files: - rts/adjustor/Nativei386.c - rts/adjustor/Nativei386Asm.S Changes: ===================================== rts/adjustor/Nativei386.c ===================================== @@ -60,38 +60,37 @@ void initAdjustors(void) { void* createAdjustor(StgStablePtr hptr, StgFunPtr wptr, - char *typeString STG_UNUSED - ) + char *typeString STG_UNUSED) { - // The adjustor puts the following things on the stack: - // 1.) %ebp link - // 2.) padding and (a copy of) the arguments - // 3.) a dummy argument - // 4.) hptr - // 5.) return address (for returning to the adjustor) - // All these have to add up to a multiple of 16. - - int sz = totalArgumentSize(typeString); - // first, include everything in frame_size - StgInt frame_size = sz * 4 + 16; - // align to 16 bytes - frame_size = (frame_size + 15) & ~15; - // only count 2.) and 3.) as part of frame_size - frame_size -= 12; - - struct CCallContext context = { - .hptr = hptr, - .wptr = wptr, - .frame_size = frame_size, - .argument_size = sz, - }; - return alloc_adjustor(ccall_pool, &context); + // The adjustor puts the following things on the stack: + // 1. %ebp link + // 2. padding and (a copy of) the arguments + // 3. a dummy argument + // 4. hptr + // 5. return address (for returning to the adjustor) + // All these have to add up to a multiple of 16. + + int sz = totalArgumentSize(typeString); + // first, include everything in frame_size + StgInt frame_size = sz * 4 + 16; + // align to 16 bytes + frame_size = (frame_size + 15) & ~15; + // only count 2.) and 3.) as part of frame_size + frame_size -= 12; + + struct CCallContext context = { + .hptr = hptr, + .wptr = wptr, + .frame_size = frame_size, + .argument_size = sz, + }; + return alloc_adjustor(ccall_pool, &context); } void freeHaskellFunctionPtr(void* ptr) { - struct AdjustorContext context; + struct CCallContext context; free_adjustor(ptr, &context); freeStablePtr(context.hptr); } ===================================== rts/adjustor/Nativei386Asm.S ===================================== @@ -26,28 +26,28 @@ DECLARE_CSYM(ccall_adjustor) // Record a frame pointer. Paired with the `leave` below. pushl %ebp movl %esp, %ebp - + subl FRAME_SIZE_OFF(%eax), %esp // Save %esi and %edi as we need to clobber them to perform the shuffle pushl %esi pushl %edi - + // Shuffle the stack down... leal 8(%ebp), %esi leal 12(%esp), %edi movl ARGUMENT_WORDS_OFF(%eax), %ecx rep movsl - + // Restore %edi and %esi popl %edi popl %esi - + // Perform the call pushl HPTR_OFF(%eax) call *WPTR_OFF(%eax) - + leave ret View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d9326a48acb5340dc1d67052bdfd8abfb35f5b54...39bb6e583d64738db51441a556d499aa93a4fc4a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d9326a48acb5340dc1d67052bdfd8abfb35f5b54...39bb6e583d64738db51441a556d499aa93a4fc4a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 10:56:50 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Mon, 18 Nov 2024 05:56:50 -0500 Subject: [Git][ghc/ghc][ghc-9.12] 25 commits: EPA: Remove AddEpann commit 7 Message-ID: <673b1d721460c_5e4842d2c2478396@gitlab.mail> Zubin pushed to branch ghc-9.12 at Glasgow Haskell Compiler / GHC Commits: b1994328 by Alan Zimmerman at 2024-11-14T16:17:28+05:30 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp (cherry picked from commit dbc77ce804c0f410f3f2894a158d0ee899ce64f5) - - - - - 210b59c4 by Alan Zimmerman at 2024-11-14T16:17:37+05:30 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure (cherry picked from commit 8a6691c3a947a21c7dcc9772d6cc396894c4756f) - - - - - c43414d2 by Alan Zimmerman at 2024-11-14T16:17:49+05:30 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. (cherry picked from commit d5e7990ca9637ebee2293b22815fa0c393231baf) - - - - - 43dd7718 by Alan Zimmerman at 2024-11-14T16:18:00+05:30 EPA: use explicit vertical bar token for ExplicitSum / SumPat (cherry picked from commit f859d61c4832b16ae3b4dd14aad5cb41b0051de3) - - - - - aa59a1ef by Alan Zimmerman at 2024-11-14T16:21:51+05:30 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. (cherry picked from commit 0bc94360908011167284ee4c283c343350cbba78) - - - - - 788ae992 by Alan Zimmerman at 2024-11-14T19:03:38+05:30 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 (cherry picked from commit 9ad9ac63abed33aa48d4df40142d2809bdfd1ff0) - - - - - 344bb0f3 by Alan Zimmerman at 2024-11-14T19:04:35+05:30 EPA: Correctly capture leading semis in decl list Closes #25467 (cherry picked from commit 0614abef967c2ee9fb83955f18460715160a557a) - - - - - 8662d966 by ur4t at 2024-11-14T19:05:02+05:30 GHCi: fix improper location of ghci_history file Fixes #24266 (cherry picked from commit 6f0a62db5dc79640433c61e83ea1427665304869) - - - - - 014126ba by Rodrigo Mesquita at 2024-11-14T19:05:43+05:30 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 (cherry picked from commit 68e2da5a9ed2f0221b0b17a19032d909a1ea1037) - - - - - 3b7dc559 by Andreas Klebinger at 2024-11-14T19:06:05+05:30 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 (cherry picked from commit 1c21e7d4358162342b707f20ae2765ad02affdf3) - - - - - 31a75a91 by Ben Gamari at 2024-11-14T19:06:21+05:30 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. (cherry picked from commit 721ac00d63216e5e6512baba09b6ebb3cc456ebf) - - - - - eccd1ef0 by Ben Gamari at 2024-11-14T19:06:44+05:30 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. (cherry picked from commit c02add17f04c0521f0cb97b4c8511b47f4b639d7) - - - - - 9d431ca7 by Teo Camarasu at 2024-11-14T19:07:03+05:30 docs: link to #14474 in the template-haskell docs (cherry picked from commit 747fd3224f9832a97367aaf7e6085a9b0a26fba9) - - - - - 29923e5f by Peter Trommler at 2024-11-14T19:07:33+05:30 PPC NCG: Implement fmin and fmax (cherry picked from commit fdd9f62ad3deb64dabef438032a1e8c89c98cd99) - - - - - c3fb73d2 by Sebastian Graf at 2024-11-14T19:07:47+05:30 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. (cherry picked from commit 00d58ae18a7ce8db6b2d57261a08ba8c1c2549b5) - - - - - 53d2a948 by Zubin Duggal at 2024-11-14T19:08:09+05:30 release: copy zip files into the correct directory Fixes #25446 (cherry picked from commit 346e4cd1903b2cbcc9bb7c39652666c513eb2a59) - - - - - c29445eb by Zubin Duggal at 2024-11-14T19:08:16+05:30 release: Sign .gz bindists too Fixes #25447 (cherry picked from commit bbdbe2254df1bfc9157cfb409afc93f8157712cd) - - - - - f5b5d1dc by Zubin Duggal at 2024-11-14T19:11:16+05:30 Bump exceptions submodule to 0.10.9 - - - - - ba786681 by Zubin Duggal at 2024-11-14T19:56:41+05:30 Bump file-io submodule to 0.1.4 - - - - - 3a7ffdbb by Zubin Duggal at 2024-11-14T19:56:41+05:30 bump os-string submodule to 2.0.6 - - - - - 53b46fd4 by Zubin Duggal at 2024-11-14T19:56:41+05:30 bump transformers submodule to 0.6.1.2 - - - - - 27dc2664 by Zubin Duggal at 2024-11-14T19:56:41+05:30 Bump directory submodule to v1.3.9.0 - - - - - 80df8808 by Zubin Duggal at 2024-11-14T19:56:41+05:30 Bump Win32 submodule to v2.14.1.0 - - - - - 29bfae2c by Zubin Duggal at 2024-11-14T19:56:41+05:30 Bump filepath submodule to 1.5.3.0 - - - - - 97b0dff2 by Zubin Duggal at 2024-11-14T23:00:10+05:30 Bump file-io submodule to avoid usage of QuasiQuotes - - - - - 25 changed files: - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - compiler/GHC.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Dump.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Hs/ImpExp.hs - compiler/GHC/Hs/Pat.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Annotation.hs - compiler/GHC/Parser/Lexer.x The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8de7406f00c8db25fe93a1e612b2ac258aed4d3d...97b0dff223a6c4cc003adec448104c277f214645 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8de7406f00c8db25fe93a1e612b2ac258aed4d3d...97b0dff223a6c4cc003adec448104c277f214645 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 12:11:49 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Mon, 18 Nov 2024 07:11:49 -0500 Subject: [Git][ghc/ghc][wip/andreask/bound_cmm_folding] 75 commits: Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <673b2f057ac3e_5e4846c1ac4929be@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/bound_cmm_folding at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 06509562 by Andreas Klebinger at 2024-11-18T12:11:42+00:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding operations on literals ensure the result is still within bounds by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - 30 changed files: - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/Cmm/Opt.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Binds.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0e1d0e99991a77f3b09fec18837974f928fddbf9...0650956237454b4f3beea67145d71cdea977ff1c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0e1d0e99991a77f3b09fec18837974f928fddbf9...0650956237454b4f3beea67145d71cdea977ff1c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 12:43:07 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Mon, 18 Nov 2024 07:43:07 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/andreask/inline-docs Message-ID: <673b365b83086_3091e2169b44713dd@gitlab.mail> Andreas Klebinger pushed new branch wip/andreask/inline-docs at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/andreask/inline-docs You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 12:44:10 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Mon, 18 Nov 2024 07:44:10 -0500 Subject: [Git][ghc/ghc][wip/andreask/inline-docs] Clarify INLINE unfolding optimization docs. Message-ID: <673b369a7946a_3091e213e87c715e1@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/inline-docs at Glasgow Haskell Compiler / GHC Commits: be2360b7 by Andreas Klebinger at 2024-11-18T13:23:50+01:00 Clarify INLINE unfolding optimization docs. Fixes #24660 - - - - - 1 changed file: - docs/users_guide/exts/pragmas.rst Changes: ===================================== docs/users_guide/exts/pragmas.rst ===================================== @@ -393,12 +393,15 @@ has a number of other effects: pragmas is to expose functions in ``f``\'s RHS that have rewrite rules, and it's no good if those functions have been optimised away. - So *GHC guarantees to inline precisely the code that you wrote*, no - more and no less. It does this by capturing a copy of the definition + So *GHC guarantees to behave precisely as if it inlined the code that you wrote*. + It does this by capturing a copy of the definition of the function to use for inlining (we call this the "inline-RHS"), - which it leaves untouched, while optimising the ordinarily RHS as - usual. For externally-visible functions the inline-RHS (not the - optimised RHS) is recorded in the interface file. + which it only optimizes in ways which don't break this promise. + For example if inlining is explicitly delayed through phase control GHC will + apply optimizations which happen before the ``INLINE`` pragma becomes + active to the inline-RHS while optimising the ordinarily RHS as usual. + For externally-visible functions + the inline-RHS (not the optimised RHS) is recorded in the interface file. - An ``INLINE`` function is not worker/wrappered by strictness analysis. It's going to be inlined wholesale instead. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/be2360b7849a865e0f1b98129621f6d856fb34e5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/be2360b7849a865e0f1b98129621f6d856fb34e5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 14:03:00 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Mon, 18 Nov 2024 09:03:00 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/ghc-rm-loadExpr Message-ID: <673b49149eac6_3091e27818c47851a@gitlab.mail> Cheng Shao pushed new branch wip/ghc-rm-loadExpr at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/ghc-rm-loadExpr You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 14:58:11 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Mon, 18 Nov 2024 09:58:11 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] fixup! A start on module graphs Message-ID: <673b560392926_3091e2a12fd486067@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: dc510042 by Rodrigo Mesquita at 2024-11-18T14:57:50+00:00 fixup! A start on module graphs - - - - - 4 changed files: - compiler/GHC/CmmToAsm/Reg/Linear.hs - compiler/GHC/Data/Graph/Directed.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Unit/Module/Graph.hs Changes: ===================================== compiler/GHC/CmmToAsm/Reg/Linear.hs ===================================== @@ -843,7 +843,7 @@ allocateRegsAndSpill reading keep spills alloc (r@(VirtualRegWithFormat vr _fmt) Just (InMem slot) | reading -> doSpill (ReadMem slot) | otherwise -> doSpill WriteMem Nothing | reading -> - pprPanic "allocateRegsAndSpill: Cannot read from uninitialized register" (ppr vr) + pprPanic "allocateRegsAndSpill: Cannot read from uninitialized register" (ppr vr <+> ppr assig) -- NOTE: if the input to the NCG contains some -- unreachable blocks with junk code, this panic -- might be triggered. Make sure you only feed ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -14,7 +14,8 @@ module GHC.Data.Graph.Directed ( stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, outgoingG, + reachableG, reachableG', + reachablesG, transposeG, outgoingG, emptyG, findCycle, @@ -28,7 +29,7 @@ module GHC.Data.Graph.Directed ( -- Simple way to classify edges EdgeType(..), classifyEdges, - ReachabilityIndex, reachabilityIndex, emptyGraph, nodeLookupByIx + ReachabilityIndex, reachabilityIndex, emptyGraph, nodeLookupByIx, reachable ) where ------------------------------------------------------------------------------ @@ -358,11 +359,20 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) +-- ROMES:TODO: ADD UNIT TESTS(To the properly defined graph interface) +-- ROMES:TODO: ADD UNIT TESTS(To the mOduleGraph properly defined graph interface) reachableG :: Graph node -> node -> [node] reachableG graph from = map (gr_vertex_to_node graph) result where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) hits = {-# SCC "Digraph.reachable" #-} IM.lookup from_vertex (gr_reachability graph) - result = maybe [] IS.toList hits + result = IS.toList $! IS.insert from_vertex $ expectJust "reachableG2" hits + +-- | DoENS't INCLUDE THE ROOT VERTEX +reachableG' :: Graph node -> node -> [node] +reachableG' graph from = map (gr_vertex_to_node graph) result + where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + hits = {-# SCC "Digraph.reachable" #-} IM.lookup from_vertex (gr_reachability graph) + result = IS.toList $! expectJust "reachableG2" hits outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result @@ -371,9 +381,10 @@ outgoingG graph from = map (gr_vertex_to_node graph) result -- | Given a list of roots return all reachable nodes. reachablesG :: Graph node -> [node] -> [node] -reachablesG graph froms = map (gr_vertex_to_node graph) result +reachablesG graph froms = map (gr_vertex_to_node graph) (IS.toList result) where result = {-# SCC "Digraph.reachable" #-} - concatMap (maybe [] IS.toList . flip IM.lookup (gr_reachability graph)) vs + IS.union (IS.fromList vs) $ + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup (gr_reachability graph)) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] hasVertexG :: Graph node -> node -> Bool @@ -428,31 +439,13 @@ graphEmpty g = lo > hi type IntGraph = G.Graph ---{- --------------------------------------------------------------- ----- Depth first search numbering --------------------------------------------------------------- ----} - ----- Data.Tree has flatten for Tree, but nothing for Forest ---_preorderF :: Forest a -> [a] ---_preorderF ts = concatMap flatten ts - ---{- --------------------------------------------------------------- ----- Finding reachable vertices --------------------------------------------------------------- ----} - ----- This generalizes reachable which was found in Data.Graph ---_reachable :: IntGraph -> [Vertex] -> [Vertex] ---_reachable g vs = _preorderF (G.dfs g vs) - reachableGraph :: IntGraph -> IM.IntMap IS.IntSet reachableGraph g = res where do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) res = IM.fromList [(v, do_one v) | v <- G.vertices g] +-- NB: We also used to have `reachableGraphCyclic`, but it was unused in the source so it was removed. +-- If you need something like that, search the git history for `reachableGraphCyclic`. scc :: IntGraph -> [SCC Vertex] scc graph = map decode forest @@ -465,47 +458,6 @@ scc graph = map decode forest where dec (Node v ts) vs = v : foldr dec vs ts mentions_itself v = v `elem` (graph ! v) -{- unused? -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) --} - {- ************************************************************************ * * @@ -625,3 +577,13 @@ reachabilityIndex = gr_reachability nodeLookupByIx :: Graph node -> Vertex -> node nodeLookupByIx (Graph _ from _ _) v = from v +-- | Reachability query. On graph @g@ and nodes @a@ and @b@, @reachable(g, a, +-- b)@ asks whether @b@ can be reached starting from @a at . +reachable :: Graph node -- ^ @g@ + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +reachable (Graph _ _ to index) a b = IS.member b_i $ expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -624,7 +624,7 @@ createBuildPlan mod_graph maybe_top_mod = -- on the boot file. Set.filter (\(mkNodeKey -> nk) -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `notElem` (mkNodeKey <$> mgReachable mod_graph nk)) $ + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ Set.fromList $ mgReachable mod_graph (NodeKey_Module (key NotBoot)) where @@ -1840,7 +1840,8 @@ checkHomeUnitsClosed ue inverse_closure = transposeG downwards_closure - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = + Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -23,6 +23,7 @@ module GHC.Unit.Module.Graph , moduleGraphNodeModSum , moduleGraphModulesBelow , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -407,5 +408,16 @@ moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- mo mgReachable :: ModuleGraph -> NodeKey -> [ModuleGraphNode] mgReachable mg nk = map summaryNodeSummary modules_below where (td_map, lookup_node) = mg_graph mg - modules_below = fromMaybe [] $ - reachableG td_map <$> lookup_node nk + modules_below = expectJust "mgReachable" $ + reachableG' td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in graph @g@? +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = reachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dc510042fbb87cbed53891ffdad6a8f16a16702b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dc510042fbb87cbed53891ffdad6a8f16a16702b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 15:36:19 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 10:36:19 -0500 Subject: [Git][ghc/ghc][ghc-9.8] Bump filepath submodule to v1.4.301.0 Message-ID: <673b5ef3e854f_290681db4ec399c@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: f0ab9204 by Ben Gamari at 2024-11-18T10:35:38-05:00 Bump filepath submodule to v1.4.301.0 Fixes inappropriate catching of asynchronous exceptions. - - - - - 1 changed file: - libraries/filepath Changes: ===================================== libraries/filepath ===================================== @@ -1 +1 @@ -Subproject commit 9b7803e33950774399aaeec7c4420fe634a6240a +Subproject commit d67762a66eba4ee9b47e1cdfdf277bbd31925e7a View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f0ab92045f7d191ca9966f65f1d573884370f9db -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f0ab92045f7d191ca9966f65f1d573884370f9db You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 16:09:44 2024 From: gitlab at gitlab.haskell.org (sheaf (@sheaf)) Date: Mon, 18 Nov 2024 11:09:44 -0500 Subject: [Git][ghc/ghc][wip/T24382] 80 commits: ghc-internal: strict, unboxed src loc ranges Message-ID: <673b66c8a5efc_290683d082441bc@gitlab.mail> sheaf pushed to branch wip/T24382 at Glasgow Haskell Compiler / GHC Commits: ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - e9ac7c65 by Ben Gamari at 2024-11-18T16:09:36+00:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Fixes #24382. - - - - - 30 changed files: - .gitlab/ci.sh - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Data/BooleanFormula.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5ab2a01dcdfd56832aa0c2b60325e1740c02c0e1...e9ac7c65cd57d3d4e1c91f161feb20451971e17e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5ab2a01dcdfd56832aa0c2b60325e1740c02c0e1...e9ac7c65cd57d3d4e1c91f161feb20451971e17e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 16:14:51 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Mon, 18 Nov 2024 11:14:51 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <673b67fb15f96_290684d2704623@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: 1ee3ed13 by Sjoerd Visscher at 2024-11-18T17:14:43+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/linear_types.rst - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T15279.stderr - testsuite/tests/printer/T18791.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1ee3ed134da468adda3dcab3ddf6c3245110475f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1ee3ed134da468adda3dcab3ddf6c3245110475f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 16:35:23 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 11:35:23 -0500 Subject: [Git][ghc/ghc][wip/freebsd] 18 commits: hadrian: Allow haddock options to be passed via key-value settings Message-ID: <673b6ccbe0442_290686889e0858c@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 952a1243 by Ben Gamari at 2024-11-18T11:02:59-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - a87638b9 by Ben Gamari at 2024-11-18T11:02:59-05:00 testsuite: Unmark T14028 as broken on FreeBSD This now appears to pass on FreeBSD 14. Closes #19723. - - - - - 8b529d99 by Ben Gamari at 2024-11-18T11:02:59-05:00 rts/linker: Fix out-of-bounds mapping logic Previously the structure of `mmapInRegion` concealed a subtle bug concerning handling of `mmap` returning mappings below the beginning of the desired region. Specifically, we would reset `p = result + bytes` and then again reset `p = region->start` before looping around for another iteration. This resulted in an infinite loop on FreeBSD. Fixes #25492. - - - - - a44431ac by Ben Gamari at 2024-11-18T11:02:59-05:00 rts/linker: Clarify debug output - - - - - c074af30 by Ben Gamari at 2024-11-18T11:33:47-05:00 gitlab-ci: Migrate FreeBSD runner tag to FreeBSD 14 - - - - - 30 changed files: - .gitlab/generate-ci/gen_ci.hs - compiler/GHC/Utils/Panic/Plain.hs - ghc/GHCi/UI/Monad.hs - hadrian/doc/user-settings.md - hadrian/src/Flavour.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr - libraries/base/tests/T24807.stderr - libraries/base/tests/all.T - libraries/base/tests/assert.stderr - libraries/base/tests/readFloat.stderr - − libraries/base/tests/topHandler04.hs - − libraries/base/tests/topHandler04.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e7306479bfd098f454d6379e0c707f869d943931...c074af304ca6d138b8d17b78240cd18f774af61a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e7306479bfd098f454d6379e0c707f869d943931...c074af304ca6d138b8d17b78240cd18f774af61a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 16:45:27 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 11:45:27 -0500 Subject: [Git][ghc/ghc][wip/freebsd] gitlab-ci: Reintroduce FreeBSD 14 job Message-ID: <673b6f27b1892_2906882fc809262@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: 6bba4b0a by Ben Gamari at 2024-11-18T11:45:14-05:00 gitlab-ci: Reintroduce FreeBSD 14 job - - - - - 2 changed files: - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml Changes: ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -1130,6 +1130,11 @@ darwin = , fastCI (standardBuilds AArch64 Darwin) ] +freebsd_jobs :: [JobGroup Job] +freebsd_jobs = + [ addValidateRule FreeBSDLabel (standardBuilds Amd64 FreeBSD14) + ] + alpine_x86 :: [JobGroup Job] alpine_x86 = [ -- Fully static build, in theory usable on any linux distribution. @@ -1202,6 +1207,7 @@ job_groups = ++ alpine_x86 ++ alpine_aarch64 ++ cross_jobs + ++ freebsd_jobs mkPlatform :: Arch -> Opsys -> String ===================================== .gitlab/jobs.yaml ===================================== @@ -955,6 +955,71 @@ "ac_cv_func_utimensat": "no" } }, + "nightly-x86_64-freebsd14-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "8 weeks", + "paths": [ + "ghc-x86_64-freebsd14-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-validate", + "BUILD_FLAVOUR": "validate", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "HADRIAN_ARGS": "--docs=no-sphinx", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-validate", + "XZ_OPT": "-9" + } + }, "nightly-x86_64-linux-alpine3_12-int_native-validate+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -3651,6 +3716,72 @@ "ac_cv_func_utimensat": "no" } }, + "release-x86_64-freebsd14-release": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "1 year", + "paths": [ + "ghc-x86_64-freebsd14-release.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-release", + "BUILD_FLAVOUR": "release", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "IGNORE_PERF_FAILURES": "all", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-release", + "XZ_OPT": "-9" + } + }, "release-x86_64-linux-alpine3_12-int_native-release+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -5029,6 +5160,70 @@ "ac_cv_func_utimensat": "no" } }, + "x86_64-freebsd14-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "2 weeks", + "paths": [ + "ghc-x86_64-freebsd14-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-freebsd14-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/)) || ($CI_MERGE_REQUEST_LABELS =~ /.*FreeBSD.*/)))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-validate", + "BUILD_FLAVOUR": "validate", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "HADRIAN_ARGS": "--docs=no-sphinx", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-validate" + } + }, "x86_64-linux-alpine3_12-int_native-validate+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6bba4b0a2bfd90d14cf8dff7dacd9780c03f2612 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6bba4b0a2bfd90d14cf8dff7dacd9780c03f2612 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 17:38:18 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 12:38:18 -0500 Subject: [Git][ghc/ghc][wip/freebsd] 2 commits: gitlab-ci: Migrate FreeBSD runner tag to FreeBSD 14 Message-ID: <673b7b8a77ce6_29068b0958c175a3@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: 79cd76c7 by Ben Gamari at 2024-11-18T12:38:11-05:00 gitlab-ci: Migrate FreeBSD runner tag to FreeBSD 14 - - - - - 2775452c by Ben Gamari at 2024-11-18T12:38:11-05:00 gitlab-ci: Reintroduce FreeBSD 14 job - - - - - 3 changed files: - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml Changes: ===================================== .gitlab/ci.sh ===================================== @@ -325,7 +325,7 @@ function fetch_cabal() { local base_url="https://downloads.haskell.org/~cabal/cabal-install-$v/" case "$(uname)" in Darwin) cabal_url="$base_url/cabal-install-$v-x86_64-apple-darwin17.7.0.tar.xz" ;; - FreeBSD) cabal_url="$base_url/cabal-install-$v-x86_64-freebsd13.tar.xz" ;; + FreeBSD) cabal_url="$base_url/cabal-install-$v-x86_64-freebsd14.tar.xz" ;; *) fail "don't know where to fetch cabal-install for $(uname)" esac echo "Fetching cabal-install from $cabal_url" ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -101,7 +101,7 @@ There are two different modes this script can operate in: data Opsys = Linux LinuxDistro | Darwin - | FreeBSD13 + | FreeBSD14 | Windows deriving (Eq) data LinuxDistro @@ -293,7 +293,7 @@ runnerTag arch (Linux _) = runnerTag AArch64 Darwin = "aarch64-darwin" runnerTag Amd64 Darwin = "x86_64-darwin-m1" runnerTag Amd64 Windows = "new-x86_64-windows" -runnerTag Amd64 FreeBSD13 = "x86_64-freebsd13" +runnerTag Amd64 FreeBSD14 = "x86_64-freebsd14" runnerTag _ _ = error "Invalid arch/opsys" tags :: Arch -> Opsys -> BuildConfig -> [String] @@ -326,7 +326,7 @@ distroName Rocky8 = "rocky8" opsysName :: Opsys -> String opsysName (Linux distro) = "linux-" ++ distroName distro opsysName Darwin = "darwin" -opsysName FreeBSD13 = "freebsd13" +opsysName FreeBSD14 = "freebsd14" opsysName Windows = "windows" archName :: Arch -> String @@ -416,7 +416,7 @@ type Variables = MonoidalMap String [String] a =: b = MonoidalMap (Map.singleton a [b]) opsysVariables :: Arch -> Opsys -> Variables -opsysVariables _ FreeBSD13 = mconcat +opsysVariables _ FreeBSD14 = mconcat [ -- N.B. we use iconv from ports as I see linker errors when we attempt -- to use the "native" iconv embedded in libc as suggested by the -- porting guide [1]. @@ -424,7 +424,7 @@ opsysVariables _ FreeBSD13 = mconcat "CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib" , "HADRIAN_ARGS" =: "--docs=no-sphinx" , "GHC_VERSION" =: "9.6.4" - , "CABAL_INSTALL_VERSION" =: "3.10.2.0" + , "CABAL_INSTALL_VERSION" =: "3.10.3.0" ] opsysVariables arch (Linux distro) = distroVariables arch distro opsysVariables AArch64 (Darwin {}) = @@ -1130,6 +1130,11 @@ darwin = , fastCI (standardBuilds AArch64 Darwin) ] +freebsd_jobs :: [JobGroup Job] +freebsd_jobs = + [ addValidateRule FreeBSDLabel (standardBuilds Amd64 FreeBSD14) + ] + alpine_x86 :: [JobGroup Job] alpine_x86 = [ -- Fully static build, in theory usable on any linux distribution. @@ -1202,6 +1207,7 @@ job_groups = ++ alpine_x86 ++ alpine_aarch64 ++ cross_jobs + ++ freebsd_jobs mkPlatform :: Arch -> Opsys -> String ===================================== .gitlab/jobs.yaml ===================================== @@ -955,6 +955,71 @@ "ac_cv_func_utimensat": "no" } }, + "nightly-x86_64-freebsd14-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "8 weeks", + "paths": [ + "ghc-x86_64-freebsd14-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-validate", + "BUILD_FLAVOUR": "validate", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "HADRIAN_ARGS": "--docs=no-sphinx", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-validate", + "XZ_OPT": "-9" + } + }, "nightly-x86_64-linux-alpine3_12-int_native-validate+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -3651,6 +3716,72 @@ "ac_cv_func_utimensat": "no" } }, + "release-x86_64-freebsd14-release": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "1 year", + "paths": [ + "ghc-x86_64-freebsd14-release.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-release", + "BUILD_FLAVOUR": "release", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "IGNORE_PERF_FAILURES": "all", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-release", + "XZ_OPT": "-9" + } + }, "release-x86_64-linux-alpine3_12-int_native-release+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -5029,6 +5160,70 @@ "ac_cv_func_utimensat": "no" } }, + "x86_64-freebsd14-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "2 weeks", + "paths": [ + "ghc-x86_64-freebsd14-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-freebsd14-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/)) || ($CI_MERGE_REQUEST_LABELS =~ /.*FreeBSD.*/)))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-validate", + "BUILD_FLAVOUR": "validate", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "HADRIAN_ARGS": "--docs=no-sphinx", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-validate" + } + }, "x86_64-linux-alpine3_12-int_native-validate+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6bba4b0a2bfd90d14cf8dff7dacd9780c03f2612...2775452cbd3e2c0612082d62589e86dd11d85095 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6bba4b0a2bfd90d14cf8dff7dacd9780c03f2612...2775452cbd3e2c0612082d62589e86dd11d85095 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 17:44:18 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Mon, 18 Nov 2024 12:44:18 -0500 Subject: [Git][ghc/ghc][wip/T24359] Improve matters wrt equalities in specialisation Message-ID: <673b7cf28e220_29068ae8ea41941e@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 065de8c9 by Simon Peyton Jones at 2024-11-18T17:43:55+00:00 Improve matters wrt equalities in specialisation - - - - - 2 changed files: - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Tc/Gen/Sig.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -847,8 +847,8 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id ; mk_spec_call <- do { ds_call <- dsLExpr the_call ; return $ \ poly_id poly_rhs -> - mkLets ds_lhs_binds $ mkLets ds_rhs_binds $ + mkLets ds_lhs_binds $ mkLetNonRec (localiseId poly_id) poly_rhs $ ds_call } ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -923,21 +923,25 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) -- Quantify ; let (quant_cts, residual_wanted) = getRuleQuantCts wanted quant_preds = ctsPreds quant_cts + (quant_eq_cts, quant_dict_cts) = partitionBag (isEqPred . ctPred) quant_cts ; dvs <- candidateQTyVarsOfTypes (quant_preds ++ seed_tys) ; let grown_tcvs = growThetaTyVars quant_preds (tyCoVarsOfTypes seed_tys) weeded_dvs = weedOutCandidates (`dVarSetIntersectVarSet` grown_tcvs) dvs ; qtkvs <- quantifyTyVars skol_info DefaultNonStandardTyVars weeded_dvs -- Left hand side of the RULE - ; lhs_evs <- mk_quant_evs quant_cts + ; lhs_eq_evs <- mk_quant_evs quant_eq_cts + ; lhs_dict_evs <- mk_quant_evs quant_dict_cts + ; let lhs_evs = lhs_eq_evs ++ lhs_dict_evs ; (implic1, lhs_binds) <- buildImplicationFor tc_lvl skol_info_anon qtkvs lhs_evs residual_wanted -- rhs_binds uses rhs_evs to build `wanted` (NB not just `residual_wanted`) - ; rhs_evs <- mapM newEvVar quant_preds + ; rhs_dict_evs <- mapM newEvVar (ctsPreds quant_dict_cts) + ; let rhs_evs = lhs_eq_evs ++ rhs_dict_evs ; (implic2, rhs_binds) <- buildImplicationFor tc_lvl skol_info_anon qtkvs rhs_evs - (emptyWC { wc_simple = quant_cts }) + (emptyWC { wc_simple = quant_dict_cts }) ; emitImplications (implic1 `unionBags` implic2) @@ -1187,21 +1191,12 @@ tcRule (HsRule { rd_ext = ext lhs_evs rhs_wanted ; emitImplications (lhs_implic `unionBags` rhs_implic) - -- A type error on the LHS of a rule will be reported earlier while solving for - -- lhs_implic. However, we should also drop the rule entirely for cases where - -- compilation continues regardless of the error. For example with - -- `-fdefer-type-errors`, where this ill-typed LHS rule may cause follow-on errors - -- (#24026). - ; if anyBag insolubleImplic lhs_implic - then - return Nothing -- The RULE LHS does not type-check and will be dropped. - else - return . Just $ HsRule { rd_ext = ext - , rd_name = rname - , rd_act = act - , rd_bndrs = mkTcRuleBndrs bndrs (qtkvs ++ tpl_ids) - , rd_lhs = mkHsDictLet lhs_binds lhs' - , rd_rhs = mkHsDictLet rhs_binds rhs' } } + ; return $ Just $ HsRule { rd_ext = ext + , rd_name = rname + , rd_act = act + , rd_bndrs = mkTcRuleBndrs bndrs (qtkvs ++ tpl_ids) + , rd_lhs = mkHsDictLet lhs_binds lhs' + , rd_rhs = mkHsDictLet rhs_binds rhs' } } where mkTcRuleBndrs (RuleBndrs { rb_tyvs = tyvs }) vars = RuleBndrs { rb_ext = noAnn @@ -1509,9 +1504,8 @@ getRuleQuantCts wc = ( simple_yes `andCts` implic_yes , emptyWC { wc_simple = simple_no, wc_impl = implics_no, wc_errors = errs }) where - (simple_yes, simple_no) = partitionBag (rule_quant_ct skol_tvs) simples - (implic_yes, implics_no) = mapAccumBagL (float_implic skol_tvs) - emptyBag implics + (simple_yes, simple_no) = partitionBag (rule_quant_ct skol_tvs) simples + (implic_yes, implics_no) = mapAccumBagL (float_implic skol_tvs) emptyBag implics float_implic :: TcTyCoVarSet -> Cts -> Implication -> (Cts, Implication) float_implic skol_tvs yes1 imp @@ -1521,17 +1515,23 @@ getRuleQuantCts wc new_skol_tvs = skol_tvs `extendVarSetList` ic_skols imp rule_quant_ct :: TcTyCoVarSet -> Ct -> Bool - rule_quant_ct skol_tvs ct = case classifyPredType (ctPred ct) of - EqPred _ t1 t2 - | not (ok_eq t1 t2) - -> False -- Note [RULE quantification over equalities] - _ -> tyCoVarsOfCt ct `disjointVarSet` skol_tvs + rule_quant_ct skol_tvs ct + | insolubleWantedCt ct + = False + | otherwise + = case classifyPredType (ctPred ct) of + EqPred _ t1 t2 + | not (ok_eq t1 t2) + -> False -- Note [RULE quantification over equalities] + _ -> tyCoVarsOfCt ct `disjointVarSet` skol_tvs ok_eq t1 t2 - | t1 `tcEqType` t2 = False - | otherwise = is_fun_app t1 || is_fun_app t2 + | t1 `tcEqType` t2 = False -- Our solving step may have turned it into Refl + | otherwise = True - is_fun_app ty -- ty is of form (F tys) where F is a type function - = case tyConAppTyCon_maybe ty of - Just tc -> isTypeFamilyTyCon tc - Nothing -> False +-- is_fun_app t1 || is_fun_app t2 +-- +-- is_fun_app ty -- ty is of form (F tys) where F is a type function +-- = case tyConAppTyCon_maybe ty of +-- Just tc -> isTypeFamilyTyCon tc +-- Nothing -> False View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/065de8c9775826b335ba0c6d0f56f5395afdd625 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/065de8c9775826b335ba0c6d0f56f5395afdd625 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 17:49:18 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Mon, 18 Nov 2024 12:49:18 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] 4 commits: fixup! fixup! A start on module graphs Message-ID: <673b7e1eca378_29068db71442043e@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 103ba572 by Rodrigo Mesquita at 2024-11-18T15:20:51+00:00 fixup! fixup! A start on module graphs - - - - - f117c422 by Matthew Pickering at 2024-11-18T16:40:18+00:00 Add support for ghc-debug to ghc executable - - - - - ed48da52 by Fendor at 2024-11-18T16:40:25+00:00 Bump ghc-debug submodule - - - - - 3476ec0c by Rodrigo Mesquita at 2024-11-18T17:48:59+00:00 Better getLinkDeps - - - - - 13 changed files: - .gitmodules - compiler/GHC/CmmToAsm/Reg/Linear.hs - compiler/GHC/Data/Graph/Directed.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs - + ghc-debug - ghc/Main.hs - ghc/ghc-bin.cabal.in - hadrian/src/Packages.hs - hadrian/src/Settings/Default.hs - hadrian/src/Settings/Packages.hs - + instructions.md Changes: ===================================== .gitmodules ===================================== @@ -118,3 +118,6 @@ [submodule "libraries/file-io"] path = libraries/file-io url = https://gitlab.haskell.org/ghc/packages/file-io.git +[submodule "ghc-debug"] + path = ghc-debug + url = git at gitlab.haskell.org:ghc/ghc-debug.git ===================================== compiler/GHC/CmmToAsm/Reg/Linear.hs ===================================== @@ -843,7 +843,7 @@ allocateRegsAndSpill reading keep spills alloc (r@(VirtualRegWithFormat vr _fmt) Just (InMem slot) | reading -> doSpill (ReadMem slot) | otherwise -> doSpill WriteMem Nothing | reading -> - pprPanic "allocateRegsAndSpill: Cannot read from uninitialized register" (ppr vr <+> ppr assig) + pprPanic "allocateRegsAndSpill: Cannot read from uninitialized register" (ppr vr) -- NOTE: if the input to the NCG contains some -- unreachable blocks with junk code, this panic -- might be triggered. Make sure you only feed ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -29,7 +29,8 @@ module GHC.Data.Graph.Directed ( -- Simple way to classify edges EdgeType(..), classifyEdges, - ReachabilityIndex, reachabilityIndex, emptyGraph, nodeLookupByIx, reachable + ReachabilityIndex, reachabilityIndex, emptyGraph, nodeLookupByIx, ixLookupByNode, + reachable ) where ------------------------------------------------------------------------------ @@ -577,6 +578,9 @@ reachabilityIndex = gr_reachability nodeLookupByIx :: Graph node -> Vertex -> node nodeLookupByIx (Graph _ from _ _) v = from v +ixLookupByNode :: Graph node -> node -> Maybe Vertex +ixLookupByNode (Graph _ _ to _) v = to v + -- | Reachability query. On graph @g@ and nodes @a@ and @b@, @reachable(g, a, -- b)@ asks whether @b@ can be reached starting from @a at . reachable :: Graph node -- ^ @g@ ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -1840,8 +1840,7 @@ checkHomeUnitsClosed ue inverse_closure = transposeG downwards_closure - upwards_closure = - Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -164,17 +164,18 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found [] = found make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts - | otherwise = - case mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of - [] -> - let (ModNodeKeyWithUid _ uid) = nk - in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts - trans_deps -> - let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) + + | mgMember mod_graph (NodeKey_Module nk) + , let (ModNodeKeyWithUid _ uid) = nk + = make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + + | otherwise + , let trans_deps = mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) + deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + = make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -24,6 +24,7 @@ module GHC.Unit.Module.Graph , moduleGraphModulesBelow , mgReachable , mgQuery + , mgMember , moduleGraphNodes , SummaryNode @@ -411,7 +412,9 @@ mgReachable mg nk = map summaryNodeSummary modules_below where modules_below = expectJust "mgReachable" $ reachableG' td_map <$> lookup_node nk --- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in graph @g@? +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . mgQuery :: ModuleGraph -- ^ @g@ -> NodeKey -- ^ @a@ -> NodeKey -- ^ @b@ @@ -421,3 +424,10 @@ mgQuery mg nka nkb = reachable td_map na nb where na = expectJust "mgQuery:a" $ lookup_node nka nb = expectJust "mgQuery:b" $ lookup_node nkb +-- | Is @k@ in @g@? +mgMember :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @k@ + -> Bool +mgMember mg nk = isJust $ ixLookupByNode td_map =<< k where + (td_map, lookup_node) = mg_graph mg + k = lookup_node nk ===================================== ghc-debug ===================================== @@ -0,0 +1 @@ +Subproject commit 2541e77d2687b8b3b0c1a52bb4790a602ce17d7d ===================================== ghc/Main.hs ===================================== @@ -33,6 +33,7 @@ import GHC.Driver.Backpack ( doBackpack ) import GHC.Driver.Plugins import GHC.Driver.Config.Logger (initLogFlags) import GHC.Driver.Config.Diagnostic +import GHC.Driver.Monad import GHC.Platform import GHC.Platform.Ways @@ -101,6 +102,10 @@ import Data.Bifunctor import GHC.Data.Graph.Directed import qualified Data.List.NonEmpty as NE +#if defined(GHC_DEBUG) +import GHC.Debug.Stub +#endif + ----------------------------------------------------------------------------- -- ToDo: @@ -113,6 +118,13 @@ import qualified Data.List.NonEmpty as NE ----------------------------------------------------------------------------- -- GHC's command-line interface +debugWrapper :: IO a -> IO a +#if defined(GHC_DEBUG) +debugWrapper = withGhcDebug +#else +debugWrapper = id +#endif + main :: IO () main = do hSetBuffering stdout LineBuffering @@ -161,8 +173,10 @@ main = do ShowGhcUsage -> showGhcUsage dflags ShowGhciUsage -> showGhciUsage dflags PrintWithDynFlags f -> putStrLn (f dflags) - Right postLoadMode -> - main' postLoadMode units dflags argv3 flagWarnings + Right postLoadMode -> do + reifyGhc $ \session -> debugWrapper $ + reflectGhc (main' postLoadMode units dflags argv3 flagWarnings) session + main' :: PostLoadMode -> [String] -> DynFlags -> [Located String] -> [Warn] -> Ghc () ===================================== ghc/ghc-bin.cabal.in ===================================== @@ -22,6 +22,11 @@ Flag internal-interpreter Default: False Manual: True +Flag ghc-debug + Description: Build with support for ghc-debug. + Default: False + Manual: True + Flag threaded Description: Link the ghc executable against the threaded RTS Default: True @@ -42,6 +47,10 @@ Executable ghc ghc-boot == @ProjectVersionMunged@, ghc == @ProjectVersionMunged@ + if flag(ghc-debug) + build-depends: ghc-debug-stub + CPP-OPTIONS: -DGHC_DEBUG + if os(windows) Build-Depends: Win32 >= 2.3 && < 2.15 else ===================================== hadrian/src/Packages.hs ===================================== @@ -12,7 +12,7 @@ module Packages ( runGhc, semaphoreCompat, stm, templateHaskell, terminfo, text, time, timeout, transformers, unlit, unix, win32, xhtml, lintersCommon, lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace, - ghcPackages, isGhcPackage, + ghcPackages, isGhcPackage, ghc_debug_convention, ghc_debug_stub, -- * Package information crossPrefix, programName, nonHsMainPackage, programPath, timeoutPath, @@ -43,7 +43,9 @@ ghcPackages = , terminfo, text, time, transformers, unlit, unix, win32, xhtml, fileio , timeout , lintersCommon - , lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace ] + , lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace + , ghc_debug_convention + , ghc_debug_stub ] -- TODO: Optimise by switching to sets of packages. isGhcPackage :: Package -> Bool @@ -134,6 +136,8 @@ unlit = util "unlit" unix = lib "unix" win32 = lib "Win32" xhtml = lib "xhtml" +ghc_debug_convention = lib "ghc-debug-convention" `setPath` "ghc-debug/convention" +ghc_debug_stub = lib "ghc-debug-stub" `setPath` "ghc-debug/stub" lintersCommon = lib "linters-common" `setPath` "linters/linters-common" lintNotes = linter "lint-notes" ===================================== hadrian/src/Settings/Default.hs ===================================== @@ -171,6 +171,8 @@ stage1Packages = do , unlit , xhtml , if winTarget then win32 else unix + , ghc_debug_convention + , ghc_debug_stub ] , when (not cross) [ haddock ===================================== hadrian/src/Settings/Packages.hs ===================================== @@ -117,6 +117,7 @@ packageArgs = do ifM (expr cross) (arg "internal-interpreter") (notStage0 `cabalFlag` "internal-interpreter") + , notStage0 `cabalFlag` "ghc-debug" , ifM stage0 -- We build a threaded stage 1 if the bootstrapping compiler -- supports it. ===================================== instructions.md ===================================== @@ -0,0 +1,45 @@ +# Building GHC + +* Add the following to _build/hadrian.settings + +``` +stage1.*.ghc.hs.opts += -finfo-table-map -fdistinct-constructor-tables +``` + +* Build GHC as normal + +``` +./hadrian/build -j8 +``` + +* The result is a ghc-debug enabled compiler + +# Building a debugger + +* Use the compiler you just built to build ghc-debug + +``` +cd ghc-debug +cabal update +cabal new-build debugger -w ../_build/stage1/bin/ghc +``` + +# Running the debugger + +Modify `test/Test.hs` to implement the debugging thing you want to do. Perhaps +start with `p30`, which is a program to generate a profile. + + +* Start the process you want to debug +``` +GHC_DEBUG_SOCKET=/tmp/ghc-debug build-cabal +``` + +* Start the debugger +``` +cabal new-run debugger -w ... +``` + +* Open a ticket about the memory issue you find. + + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dc510042fbb87cbed53891ffdad6a8f16a16702b...3476ec0cd8ec85693ff241daaf467b6972510201 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dc510042fbb87cbed53891ffdad6a8f16a16702b...3476ec0cd8ec85693ff241daaf467b6972510201 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 18:00:22 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Mon, 18 Nov 2024 13:00:22 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/mp-module-graph Message-ID: <673b80b6d4185_29068f1322c21244@gitlab.mail> Matthew Pickering pushed new branch wip/mp-module-graph at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/mp-module-graph You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 18:13:45 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 13:13:45 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/print-ipe Message-ID: <673b83d969535_29068ffccec2167b@gitlab.mail> Ben Gamari pushed new branch wip/print-ipe at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/print-ipe You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 18:37:32 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 13:37:32 -0500 Subject: [Git][ghc/ghc][wip/freebsd] gitlab-ci: Allow use of newer cabal-install bindists Message-ID: <673b896c1950a_29068144667c2832f@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: 6f551e05 by Ben Gamari at 2024-11-18T13:33:36-05:00 gitlab-ci: Allow use of newer cabal-install bindists Newer cabal-install bindists have internal directory structure. Here we detect and account for the presence of such structure. - - - - - 1 changed file: - .gitlab/ci.sh Changes: ===================================== .gitlab/ci.sh ===================================== @@ -330,8 +330,14 @@ function fetch_cabal() { esac echo "Fetching cabal-install from $cabal_url" curl "$cabal_url" > cabal.tar.xz + tmp="$(tar -tJf cabal.tar.xz | head -n1)" $TAR -xJf cabal.tar.xz - mv cabal "$toolchain/bin" + # Check if the bindist has directory structure + if [[ "$tmp" = "cabal" ]]; then + mv cabal "$toolchain/bin" + else + mv "$tmp/cabal" "$toolchain/bin" + fi ;; esac end_section "fetch cabal" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6f551e05f194923a5bfac0fd1aa01af5b5ebda02 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6f551e05f194923a5bfac0fd1aa01af5b5ebda02 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 21:08:11 2024 From: gitlab at gitlab.haskell.org (John Ericson (@Ericson2314)) Date: Mon, 18 Nov 2024 16:08:11 -0500 Subject: [Git][ghc/ghc][wip/rm-ghc-internal-pack] 337 commits: RTS: expose closure_sizeW_ (#25252) Message-ID: <673bacbba161e_290681ade070416b2@gitlab.mail> John Ericson pushed to branch wip/rm-ghc-internal-pack at Glasgow Haskell Compiler / GHC Commits: d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - ede94e9d by John Ericson at 2024-11-18T16:07:27-05:00 Remove most of `GHC.Internal.Pack` Since bd82ac9f4716e28b185758ae514691d5a50c003f when `GHC.Pack` was deleted, it is no longer used except for one function by the RTS. - - - - - 19 changed files: - .ghcid - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - .gitmodules - CODEOWNERS - boot - cabal.project-reinstall - compile_flags.txt - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/73f4f1ea0f580f49419454948c1bdaa7aff12760...ede94e9d4b326ee0cdb4b5bce3d8eba9e81601fc -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/73f4f1ea0f580f49419454948c1bdaa7aff12760...ede94e9d4b326ee0cdb4b5bce3d8eba9e81601fc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 21:12:35 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 18 Nov 2024 16:12:35 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 15 commits: hadrian: Allow haddock options to be passed via key-value settings Message-ID: <673badc3348ee_290681ad3d7843262@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 617669e8 by sheaf at 2024-11-18T16:12:23-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 6c5b5d00 by Ben Gamari at 2024-11-18T16:12:23-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 30 changed files: - compiler/GHC/Types/Error.hs - compiler/GHC/Unit/Module/Warnings.hs - compiler/GHC/Utils/Panic/Plain.hs - + docs/users_guide/diagnostics-as-json-schema-1_1.json - docs/users_guide/using.rst - ghc/GHCi/UI/Monad.hs - hadrian/doc/user-settings.md - hadrian/src/Flavour.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr - libraries/base/tests/T24807.stderr - libraries/base/tests/all.T - libraries/base/tests/assert.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/12614843567177b62da64f05d0d1cd781ad9db6f...6c5b5d00cee458e81eab03944ce8ace8cbda1441 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/12614843567177b62da64f05d0d1cd781ad9db6f...6c5b5d00cee458e81eab03944ce8ace8cbda1441 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 23:11:30 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 18:11:30 -0500 Subject: [Git][ghc/ghc][wip/freebsd] gitlab-ci: Enable documentation build on FreeBSD 14 Message-ID: <673bc9a2199d5_2951683837e063011@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: fcb504ff by Ben Gamari at 2024-11-18T18:09:39-05:00 gitlab-ci: Enable documentation build on FreeBSD 14 - - - - - 1 changed file: - .gitlab/generate-ci/gen_ci.hs Changes: ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -422,7 +422,6 @@ opsysVariables _ FreeBSD14 = mconcat -- porting guide [1]. -- [1] https://www.freebsd.org/doc/en/books/porters-handbook/using-iconv.html) "CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib" - , "HADRIAN_ARGS" =: "--docs=no-sphinx" , "GHC_VERSION" =: "9.6.4" , "CABAL_INSTALL_VERSION" =: "3.10.3.0" ] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fcb504ff1c7034d9d785a7f7dd89cb668e797f0c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fcb504ff1c7034d9d785a7f7dd89cb668e797f0c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 18 23:46:23 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 18:46:23 -0500 Subject: [Git][ghc/ghc][wip/alpine-i386] 17 commits: hadrian: Allow haddock options to be passed via key-value settings Message-ID: <673bd1cf9d9d2_2951686218f873757@gitlab.mail> Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC Commits: 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 5e572c9f by Ben Gamari at 2024-11-18T18:11:35-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. - - - - - 5beee594 by Ben Gamari at 2024-11-18T18:11:35-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Julian and Mikolaj. - - - - - 579fcef4 by Ben Gamari at 2024-11-18T18:11:35-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 8901e89a by Ben Gamari at 2024-11-18T18:46:10-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 30 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - compiler/GHC/Utils/Panic/Plain.hs - ghc/GHCi/UI/Monad.hs - hadrian/doc/user-settings.md - hadrian/src/Flavour.hs - libraries/array - libraries/base/changelog.md - libraries/base/src/Control/Exception.hs - libraries/base/src/GHC/Exception.hs - libraries/base/tests/IO/T21336/T21336a.stderr - libraries/base/tests/IO/T21336/T21336b.stderr - libraries/base/tests/IO/T4808.stderr - libraries/base/tests/IO/mkdirExists.stderr - libraries/base/tests/IO/openFile002.stderr - libraries/base/tests/IO/openFile002.stderr-mingw32 - libraries/base/tests/IO/withBinaryFile001.stderr - libraries/base/tests/IO/withBinaryFile002.stderr - libraries/base/tests/IO/withFile001.stderr - libraries/base/tests/IO/withFile002.stderr - libraries/base/tests/IO/withFileBlocking001.stderr - libraries/base/tests/IO/withFileBlocking002.stderr - libraries/base/tests/T15349.stderr - libraries/base/tests/T16111.stderr - libraries/base/tests/T19288.stderr - libraries/base/tests/T24807.stderr - libraries/base/tests/all.T - libraries/base/tests/assert.stderr - libraries/base/tests/readFloat.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ddc8b5231a6828df17d3e3fc676ba0bf7183de10...8901e89a99e7ed9008029c1a4d13f44aee7be554 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ddc8b5231a6828df17d3e3fc676ba0bf7183de10...8901e89a99e7ed9008029c1a4d13f44aee7be554 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 01:07:51 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 20:07:51 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25500 Message-ID: <673be4e73139_295168b6d85c75649@gitlab.mail> Ben Gamari pushed new branch wip/T25500 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25500 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 01:16:26 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 20:16:26 -0500 Subject: [Git][ghc/ghc][wip/T25500] ghc-toolchain: Introduce basic flag validation Message-ID: <673be6ea5722_295168d3d434793cd@gitlab.mail> Ben Gamari pushed to branch wip/T25500 at Glasgow Haskell Compiler / GHC Commits: 8cff4a55 by Ben Gamari at 2024-11-18T20:16:05-05:00 ghc-toolchain: Introduce basic flag validation We verify that required flags (currently `--output` and `--triple`) are provided. The implementation is truly awful, but so is getopt. Begins to address #25500. - - - - - 1 changed file: - utils/ghc-toolchain/exe/Main.hs Changes: ===================================== utils/ghc-toolchain/exe/Main.hs ===================================== @@ -35,11 +35,11 @@ import GHC.Toolchain.NormaliseTriple (normaliseTriple) import Text.Read (readMaybe) data Opts = Opts - { optTriple :: String + { optTriple :: Maybe String , optTargetPrefix :: Maybe String , optLocallyExecutable :: Maybe Bool , optLlvmTriple :: Maybe String - , optOutput :: String + , optOutput :: Maybe String , optCc :: ProgOpt , optCxx :: ProgOpt , optCpp :: ProgOpt @@ -82,11 +82,11 @@ emptyFormatOpts = FormatOpts { formatOptInput = error "formatOpts: input" emptyOpts :: Opts emptyOpts = Opts - { optTriple = "" + { optTriple = Nothing , optTargetPrefix = Nothing , optLocallyExecutable = Nothing , optLlvmTriple = Nothing - , optOutput = "" + , optOutput = Nothing , optCc = po0 , optCxx = po0 , optCpp = po0 @@ -129,13 +129,13 @@ _optMergeObjs = Lens optMergeObjs (\x o -> o {optMergeObjs=x}) _optWindres = Lens optWindres (\x o -> o {optWindres=x}) _optLd = Lens optLd (\x o -> o {optLd= x}) -_optTriple :: Lens Opts String +_optTriple :: Lens Opts (Maybe String) _optTriple = Lens optTriple (\x o -> o {optTriple=x}) _optLlvmTriple :: Lens Opts (Maybe String) _optLlvmTriple = Lens optLlvmTriple (\x o -> o {optLlvmTriple=x}) -_optOutput :: Lens Opts String +_optOutput :: Lens Opts (Maybe String) _optOutput = Lens optOutput (\x o -> o {optOutput=x}) _optTargetPrefix :: Lens Opts (Maybe String) @@ -213,7 +213,7 @@ options = , Option [] ["disable-" ++ optName] (NoArg (set lens (Just False))) ("Disable " ++ description) ] - tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple) "TRIPLE") "Target triple" + tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple . Just) "TRIPLE") "Target triple" llvmTripleOpt = Option [] ["llvm-triple"] (ReqArg (set _optLlvmTriple . Just) "LLVM-TRIPLE") "LLVM Target triple" targetPrefixOpt = Option ['T'] ["target-prefix"] (ReqArg (set _optTargetPrefix . Just) "PREFIX") @@ -233,7 +233,7 @@ options = keepTempOpt = Option [] ["keep-temp"] (NoArg (set _optKeepTemp True)) "do not remove temporary files" - outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput) "OUTPUT") + outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput . Just) "OUTPUT") "The output path for the generated target toolchain configuration" formatOpts :: [OptDescr (FormatOpts -> FormatOpts)] @@ -244,6 +244,16 @@ formatOpts = [ "The target file to format") ] +validateOpts :: Opts -> [String] +validateOpts opts = mconcat + [ assertJust _optTriple "missing --triple flag" + , assertJust _optOutput "missing --output flag" + ] + where + assertJust :: Lens Opts (Maybe a) -> String -> [String] + assertJust lens msg = + [ msg | Nothing <- pure $ view lens opts ] + main :: IO () main = do argv <- getArgs @@ -273,14 +283,14 @@ doFormat args = do doConfigure :: [String] -> IO () doConfigure args = do - let (opts0, _nonopts, errs) = getOpt RequireOrder options args + let (opts0, _nonopts, parseErrs) = getOpt RequireOrder options args let opts = foldr (.) id opts0 emptyOpts - case errs of + case parseErrs ++ validateOpts opts of [] -> do let env = Env { verbosity = optVerbosity opts , targetPrefix = case optTargetPrefix opts of Just prefix -> Just prefix - Nothing -> Just $ optTriple opts ++ "-" + Nothing -> Just $ fromMaybe (error "undefined triple") (optTriple opts) ++ "-" , keepTemp = optKeepTemp opts , canLocallyExecute = fromMaybe True (optLocallyExecutable opts) , logContexts = [] @@ -289,7 +299,7 @@ doConfigure args = do case r of Left err -> print err >> exitWith (ExitFailure 2) Right () -> return () - _ -> do + errs -> do mapM_ putStrLn errs putStrLn $ usageInfo "ghc-toolchain" options exitWith (ExitFailure 1) @@ -298,7 +308,7 @@ run :: Opts -> M () run opts = do tgt <- mkTarget opts logDebug $ "Final Target: " ++ show tgt - let file = optOutput opts + let file = fromMaybe (error "undefined --output") (optOutput opts) writeFile file (show tgt) optional :: M a -> M (Maybe a) @@ -390,7 +400,7 @@ ldOverrideWhitelist a = mkTarget :: Opts -> M Target mkTarget opts = do - normalised_triple <- normaliseTriple (optTriple opts) + normalised_triple <- normaliseTriple (fromMaybe (error "missing --triple") (optTriple opts)) -- Use Llvm target if specified, otherwise use triple as llvm target let tgtLlvmTarget = fromMaybe normalised_triple (optLlvmTriple opts) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8cff4a55b8ff5f11109cef741cbf85955f8277fb -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8cff4a55b8ff5f11109cef741cbf85955f8277fb You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 01:25:24 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 20:25:24 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25501 Message-ID: <673be9043b336_295168b6d84881436@gitlab.mail> Ben Gamari pushed new branch wip/T25501 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25501 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 01:31:41 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 20:31:41 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/linker-fixes Message-ID: <673bea7d8677a_295168f3af3488510@gitlab.mail> Ben Gamari pushed new branch wip/linker-fixes at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/linker-fixes You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 01:33:48 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 20:33:48 -0500 Subject: [Git][ghc/ghc][wip/freebsd] configure: Implement ld override whitelist Message-ID: <673beafc28fc1_295168ffd674915ea@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: ff0b3dc2 by Ben Gamari at 2024-11-18T20:21:05-05:00 configure: Implement ld override whitelist Bring `configure` into alignment with `ghc-toolchain`, ensuring that the ld-override logic will only take effect on Linux and Windows. Fixes #25501. - - - - - 1 changed file: - m4/find_ld.m4 Changes: ===================================== m4/find_ld.m4 ===================================== @@ -79,13 +79,16 @@ AC_DEFUN([FIND_LD],[ dnl See #21712. AC_CHECK_TARGET_TOOL([LD], [ld]) ;; - *) + *-linux|*-mingw32) if test "x$enable_ld_override" = "xyes"; then find_ld else AC_CHECK_TARGET_TOOL([LD], [ld]) fi ;; + *) + AC_CHECK_TARGET_TOOL([LD], [ld]) + ;; esac CHECK_LD_COPY_BUG([$1]) ]) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ff0b3dc29ef6ec5c1d092dc3ca0fe420ab08f8f7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ff0b3dc29ef6ec5c1d092dc3ca0fe420ab08f8f7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 02:06:34 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 21:06:34 -0500 Subject: [Git][ghc/ghc][wip/freebsd] gitlab-ci: Use system libffi Message-ID: <673bf2aa69682_29516812ae24c9889f@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: 3b79cd0b by Ben Gamari at 2024-11-18T21:06:20-05:00 gitlab-ci: Use system libffi - - - - - 1 changed file: - .gitlab/generate-ci/gen_ci.hs Changes: ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -421,7 +421,9 @@ opsysVariables _ FreeBSD14 = mconcat -- to use the "native" iconv embedded in libc as suggested by the -- porting guide [1]. -- [1] https://www.freebsd.org/doc/en/books/porters-handbook/using-iconv.html) - "CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib" + "CONFIGURE_ARGS" =: "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib" + , "CONFIGURE_ARGS" =: "--with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib" + , "CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib" , "GHC_VERSION" =: "9.6.4" , "CABAL_INSTALL_VERSION" =: "3.10.3.0" ] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3b79cd0bb4de55b3e88679913c28b9513a3c4e9a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3b79cd0bb4de55b3e88679913c28b9513a3c4e9a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 02:23:06 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 18 Nov 2024 21:23:06 -0500 Subject: [Git][ghc/ghc][master] Include diagnostic reason in -fdiagnostics-as-json Message-ID: <673bf68ac61fd_29516813de1bc105967@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 8 changed files: - compiler/GHC/Types/Error.hs - compiler/GHC/Unit/Module/Warnings.hs - + docs/users_guide/diagnostics-as-json-schema-1_1.json - docs/users_guide/using.rst - testsuite/tests/driver/all.T - testsuite/tests/driver/json.stderr - testsuite/tests/driver/json_warn.hs - testsuite/tests/driver/json_warn.stderr Changes: ===================================== compiler/GHC/Types/Error.hs ===================================== @@ -100,19 +100,23 @@ import GHC.Types.SrcLoc as SrcLoc import GHC.Types.Hint import GHC.Data.FastString (unpackFS) import GHC.Data.StringBuffer (atLine, hGetStringBuffer, len, lexemeToString) + +import GHC.Types.Hint.Ppr () -- Outputable instance +import GHC.Unit.Module.Warnings (WarningCategory(..)) + import GHC.Utils.Json import GHC.Utils.Panic -import GHC.Unit.Module.Warnings (WarningCategory) + +import GHC.Version (cProjectVersion) import Data.Bifunctor import Data.Foldable ( fold, toList ) import Data.List.NonEmpty ( NonEmpty (..) ) import qualified Data.List.NonEmpty as NE import Data.List ( intercalate ) +import Data.Maybe ( maybeToList ) import Data.Typeable ( Typeable ) import Numeric.Natural ( Natural ) import Text.Printf ( printf ) -import GHC.Version (cProjectVersion) -import GHC.Types.Hint.Ppr () -- Outputtable instance {- Note [Messages] ~~~~~~~~~~~~~~~~~~ @@ -393,10 +397,8 @@ newtype ResolvedDiagnosticReason pattern WarningWithFlag :: WarningFlag -> DiagnosticReason pattern WarningWithFlag w = WarningWithFlags (w :| []) -{- -Note [Warnings controlled by multiple flags] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - +{- Note [Warnings controlled by multiple flags] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Diagnostics that started life as flag-controlled warnings have a 'diagnosticReason' of 'WarningWithFlags', giving the flags that control the warning. Usually there is only one flag, but in a few cases multiple flags @@ -563,11 +565,11 @@ instance ToJson DiagnosticCode where {- Note [Diagnostic Message JSON Schema] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The below instance of ToJson must conform to the JSON schema -specified in docs/users_guide/diagnostics-as-json-schema-1_0.json. +specified in docs/users_guide/diagnostics-as-json-schema-1_1.json. When the schema is altered, please bump the version. If the content is altered in a backwards compatible way, update the minor version (e.g. 1.3 ~> 1.4). -If the content is breaking, update the major version (e.g. 1.3 ~> 2.3). +If the content is breaking, update the major version (e.g. 1.3 ~> 2.0). When updating the schema, replace the above file and name it appropriately with the version appended, and change the documentation of the -fdiagnostics-as-json flag to reflect the new schema. @@ -576,25 +578,41 @@ https://json-schema.org -} schemaVersion :: String -schemaVersion = "1.0" +schemaVersion = "1.1" -- See Note [Diagnostic Message JSON Schema] before editing! instance Diagnostic e => ToJson (MsgEnvelope e) where - json m = JSObject [ + json m = JSObject $ [ ("version", JSString schemaVersion), ("ghcVersion", JSString $ "ghc-" ++ cProjectVersion), ("span", json $ errMsgSpan m), ("severity", json $ errMsgSeverity m), ("code", maybe JSNull json (diagnosticCode diag)), ("message", JSArray $ map renderToJSString diagMsg), - ("hints", JSArray $ map (renderToJSString . ppr) (diagnosticHints diag) ) - ] - where diag = errMsgDiagnostic m - opts = defaultDiagnosticOpts @e - style = mkErrStyle (errMsgContext m) - ctx = defaultSDocContext {sdocStyle = style } - diagMsg = filter (not . isEmpty ctx) (unDecorated (diagnosticMessage (opts) diag)) - renderToJSString :: SDoc -> JsonDoc - renderToJSString = JSString . (renderWithContext ctx) + ("hints", JSArray $ map (renderToJSString . ppr) (diagnosticHints diag) ) ] + ++ [ ("reason", reasonJson) + | reasonJson <- maybeToList $ usefulReasonJson_maybe (errMsgReason m) ] + where + diag = errMsgDiagnostic m + opts = defaultDiagnosticOpts @e + style = mkErrStyle (errMsgContext m) + ctx = defaultSDocContext {sdocStyle = style } + diagMsg = filter (not . isEmpty ctx) (unDecorated (diagnosticMessage (opts) diag)) + renderToJSString :: SDoc -> JsonDoc + renderToJSString = JSString . (renderWithContext ctx) + + usefulReasonJson_maybe :: ResolvedDiagnosticReason -> Maybe JsonDoc + usefulReasonJson_maybe (ResolvedDiagnosticReason rea) = + case rea of + WarningWithoutFlag -> Nothing + ErrorWithoutFlag -> Nothing + WarningWithFlags flags -> + Just $ JSObject + [ ("flags", JSArray $ map (JSString . NE.head . warnFlagNames) (NE.toList flags)) + ] + WarningWithCategory (WarningCategory cat) -> + Just $ JSObject + [ ("category", JSString $ unpackFS cat) + ] instance Show (MsgEnvelope DiagnosticMessage) where show = showMsgEnvelope ===================================== compiler/GHC/Unit/Module/Warnings.hs ===================================== @@ -1,6 +1,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} @@ -130,7 +131,8 @@ fromWarningCategory wc = InWarningCategory noAnn NoSourceText (noLocA wc) -- See Note [Warning categories] newtype WarningCategory = WarningCategory FastString - deriving (Binary, Data, Eq, Outputable, Show, Uniquable, NFData) + deriving stock Data + deriving newtype (Binary, Eq, Outputable, Show, Uniquable, NFData) mkWarningCategory :: FastString -> WarningCategory mkWarningCategory = WarningCategory ===================================== docs/users_guide/diagnostics-as-json-schema-1_1.json ===================================== @@ -0,0 +1,134 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "JSON Diagnostic Schema", + "description": "A Schema for specifying GHC diagnostics output as JSON", + "type": "object", + "properties": { + "version": { + "description": "The current JSON schema version this object conforms to", + "type": "string" + }, + "ghcVersion": { + "description": "The GHC version", + "type": "string" + }, + "span": { + "$ref": "#/$defs/span" + }, + "severity": { + "description": "The diagnostic severity", + "type": "string", + "enum": [ + "Warning", + "Error" + ] + }, + "code": { + "description": "The diagnostic code (if it exists)", + "type": [ + "integer", + "null" + ] + }, + "message": { + "description": "The string output of the diagnostic message by GHC", + "type": "array", + "items": { + "type": "string" + } + }, + "hints": { + "description": "The suggested fixes", + "type": "array", + "items": { + "type": "string" + } + }, + "reason" : { + "description": "The GHC flag that was responsible for the emission of the diagnostic message", + "oneOf": [ + { + "type": "object", + "description": "The diagnostic message was controlled by one or more GHC flags", + "properties": { + "flags": { + "type": "array", + "items": { + "description": "The name of a GHC flag controlling the diagnostic message", + "type": "string" + }, + "minItems": 1 + } + }, + "required": ["flags"] + }, + { + "type": "object", + "description": "The diagnostic message was controlled by a GHC diagnostic message category", + "properties": { + "category": { + "description": "The name of the GHC diagnostic message category controlling the diagnostic message", + "type": "string" + } + }, + "required": ["category"] + } + ] + } + }, + "required": [ + "version", + "ghcVersion", + "span", + "severity", + "code", + "message", + "hints" + ], + "additionalProperties": false, + "$defs": { + "span": { + "description": "The span of the diagnostic", + "type": "object", + "properties": { + "file": { + "description": "The file in which the diagnostic occurs", + "type": "string" + }, + "start": { + "description": "The start location of the diagnostic", + "$ref": "#/$defs/location" + }, + "end": { + "description": "The end location of the diagnostic", + "$ref": "#/$defs/location" + } + }, + "required": [ + "file", + "start", + "end" + ], + "additionalProperties": false + }, + "location": { + "description": "A location in a text file", + "type": "object", + "properties": { + "line": { + "description": "The line number", + "type": "integer" + }, + "column": { + "description": "The column number", + "type": "integer" + } + }, + "required": [ + "line", + "column" + ], + "additionalProperties": false + } + } +} ===================================== docs/users_guide/using.rst ===================================== @@ -1424,7 +1424,7 @@ messages and in GHCi: a new line. The structure of the output is described by a `JSON Schema `_. - The schema can be downloaded :download:`here `. + The schema can be downloaded :download:`here `. .. ghc-flag:: -fdiagnostics-color=⟨always|auto|never⟩ :shortdesc: Use colors in error messages ===================================== testsuite/tests/driver/all.T ===================================== @@ -276,7 +276,7 @@ test('T12955', normal, makefile_test, []) test('T12971', [when(opsys('mingw32'), fragile(17945)), ignore_stdout], makefile_test, []) test('json_dump', normal, compile_fail, ['-ddump-json']) test('json', normalise_version('ghc'), compile_fail, ['-fdiagnostics-as-json']) -test('json_warn', normalise_version('ghc'), compile, ['-fdiagnostics-as-json -Wunused-matches']) +test('json_warn', normalise_version('ghc'), compile, ['-fdiagnostics-as-json -Wunused-matches -Wx-partial']) test('json2', normalise_version('ghc-internal', 'base','ghc-prim'), compile, ['-ddump-types -ddump-json -Wno-unsupported-llvm-version']) test('T16167', [normalise_version('ghc'),req_interp,exit_code(1)], run_command, ['{compiler} -x hs -e ":set prog T16167.hs" -ddump-json T16167.hs']) ===================================== testsuite/tests/driver/json.stderr ===================================== @@ -1 +1 @@ -{"version":"1.0","ghcVersion":"ghc-9.11.20240329","span":{"file":"json.hs","start":{"line":9,"column":11},"end":{"line":9,"column":21}},"severity":"Error","code":48010,"message":["Empty list of alternatives in case expression"],"hints":["Perhaps you intended to use the `EmptyCase' extension"]} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json.hs","start":{"line":9,"column":11},"end":{"line":9,"column":21}},"severity":"Error","code":48010,"message":["Empty list of alternatives in case expression"],"hints":["Perhaps you intended to use the `EmptyCase' extension"]} ===================================== testsuite/tests/driver/json_warn.hs ===================================== @@ -2,3 +2,6 @@ module Foo where f :: Int -> Int f x = 5 + +g :: [a] -> a +g = head ===================================== testsuite/tests/driver/json_warn.stderr ===================================== @@ -1 +1,2 @@ -{"version":"1.0","ghcVersion":"ghc-9.9.20230817","span":{"file":"json_warn.hs","start":{"line":4,"column":3},"end":{"line":4,"column":4}},"severity":"Warning","code":40910,"message":["Defined but not used: `x'"],"hints":[]} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json_warn.hs","start":{"line":4,"column":3},"end":{"line":4,"column":4}},"severity":"Warning","code":40910,"message":["Defined but not used: `x'"],"hints":[],"reason":{"flags":["unused-matches"]}} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json_warn.hs","start":{"line":7,"column":5},"end":{"line":7,"column":9}},"severity":"Warning","code":63394,"message":["In the use of `head'\n(imported from Prelude, but defined in GHC.Internal.List):\n\"This is a partial function, it throws an error on empty lists. Use pattern matching, 'Data.List.uncons' or 'Data.Maybe.listToMaybe' instead. Consider refactoring to use \"Data.List.NonEmpty\".\""],"hints":[],"reason":{"category":"x-partial"}} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/831aab2238e682e2977b4959afa100df928cec09 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/831aab2238e682e2977b4959afa100df928cec09 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 02:23:36 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 18 Nov 2024 21:23:36 -0500 Subject: [Git][ghc/ghc][master] rts: Introduce printIPE Message-ID: <673bf6a816b60_29516815202f010892d@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 2 changed files: - rts/IPE.c - rts/include/rts/IPE.h Changes: ===================================== rts/IPE.c ===================================== @@ -277,3 +277,20 @@ void decompressIPEBufferListNodeIfCompressed(IpeBufferListNode *node) { } } + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info) { + InfoProvEnt ipe; + if (lookupIPE(info, &ipe)) { + debugBelch("%p:\n", info); + debugBelch(" name: %s\n", ipe.prov.table_name); + debugBelch(" desc: %" PRIu32 "\n", ipe.prov.closure_desc); + debugBelch(" type: %s\n", ipe.prov.ty_desc); + debugBelch(" label: %s\n", ipe.prov.label); + debugBelch(" module: %s:%s\n", ipe.prov.unit_id, ipe.prov.module); + debugBelch(" src loc: %s:%s\n", ipe.prov.src_file, ipe.prov.src_span); + } else { + debugBelch("%p: no IPE entry\n", info); + } +} +#endif ===================================== rts/include/rts/IPE.h ===================================== @@ -97,3 +97,7 @@ void formatClosureDescIpe(const InfoProvEnt *ipe_buf, char *str_buf); // Returns true on success, initializes `out`. bool lookupIPE(const StgInfoTable *info, InfoProvEnt *out); + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info); +#endif View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3e5bfdd363740926576fb3ee031b94d17f7d955e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3e5bfdd363740926576fb3ee031b94d17f7d955e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 02:28:04 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 18 Nov 2024 21:28:04 -0500 Subject: [Git][ghc/ghc][wip/freebsd] 9 commits: testsuite: Unmark T14028 as broken on FreeBSD Message-ID: <673bf7b48669a_29516813d84ec10919b@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: 918d8382 by Ben Gamari at 2024-11-18T21:27:54-05:00 testsuite: Unmark T14028 as broken on FreeBSD This now appears to pass on FreeBSD 14. Closes #19723. - - - - - d0cca7a2 by Ben Gamari at 2024-11-18T21:27:54-05:00 rts/linker: Fix out-of-bounds mapping logic Previously the structure of `mmapInRegion` concealed a subtle bug concerning handling of `mmap` returning mappings below the beginning of the desired region. Specifically, we would reset `p = result + bytes` and then again reset `p = region->start` before looping around for another iteration. This resulted in an infinite loop on FreeBSD. Fixes #25492. - - - - - d6c2bdef by Ben Gamari at 2024-11-18T21:27:55-05:00 rts/linker: Clarify debug output - - - - - d87a3a2e by Ben Gamari at 2024-11-18T21:27:55-05:00 gitlab-ci: Migrate FreeBSD runner tag to FreeBSD 14 - - - - - 54d87b9f by Ben Gamari at 2024-11-18T21:27:55-05:00 gitlab-ci: Reintroduce FreeBSD 14 job - - - - - aca7c175 by Ben Gamari at 2024-11-18T21:27:55-05:00 gitlab-ci: Allow use of newer cabal-install bindists Newer cabal-install bindists have internal directory structure. Here we detect and account for the presence of such structure. - - - - - 57d5f89a by Ben Gamari at 2024-11-18T21:27:55-05:00 gitlab-ci: Enable documentation build on FreeBSD 14 - - - - - b1ad635d by Ben Gamari at 2024-11-18T21:27:55-05:00 configure: Implement ld override whitelist Bring `configure` into alignment with `ghc-toolchain`, ensuring that the ld-override logic will only take effect on Linux and Windows. Fixes #25501. - - - - - 20268354 by Ben Gamari at 2024-11-18T21:27:56-05:00 gitlab-ci: Use system libffi - - - - - 7 changed files: - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - m4/find_ld.m4 - rts/Linker.c - rts/linker/MMap.c - testsuite/tests/quasiquotation/all.T Changes: ===================================== .gitlab/ci.sh ===================================== @@ -325,13 +325,19 @@ function fetch_cabal() { local base_url="https://downloads.haskell.org/~cabal/cabal-install-$v/" case "$(uname)" in Darwin) cabal_url="$base_url/cabal-install-$v-x86_64-apple-darwin17.7.0.tar.xz" ;; - FreeBSD) cabal_url="$base_url/cabal-install-$v-x86_64-freebsd13.tar.xz" ;; + FreeBSD) cabal_url="$base_url/cabal-install-$v-x86_64-freebsd14.tar.xz" ;; *) fail "don't know where to fetch cabal-install for $(uname)" esac echo "Fetching cabal-install from $cabal_url" curl "$cabal_url" > cabal.tar.xz + tmp="$(tar -tJf cabal.tar.xz | head -n1)" $TAR -xJf cabal.tar.xz - mv cabal "$toolchain/bin" + # Check if the bindist has directory structure + if [[ "$tmp" = "cabal" ]]; then + mv cabal "$toolchain/bin" + else + mv "$tmp/cabal" "$toolchain/bin" + fi ;; esac end_section "fetch cabal" ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -101,7 +101,7 @@ There are two different modes this script can operate in: data Opsys = Linux LinuxDistro | Darwin - | FreeBSD13 + | FreeBSD14 | Windows deriving (Eq) data LinuxDistro @@ -293,7 +293,7 @@ runnerTag arch (Linux _) = runnerTag AArch64 Darwin = "aarch64-darwin" runnerTag Amd64 Darwin = "x86_64-darwin-m1" runnerTag Amd64 Windows = "new-x86_64-windows" -runnerTag Amd64 FreeBSD13 = "x86_64-freebsd13" +runnerTag Amd64 FreeBSD14 = "x86_64-freebsd14" runnerTag _ _ = error "Invalid arch/opsys" tags :: Arch -> Opsys -> BuildConfig -> [String] @@ -326,7 +326,7 @@ distroName Rocky8 = "rocky8" opsysName :: Opsys -> String opsysName (Linux distro) = "linux-" ++ distroName distro opsysName Darwin = "darwin" -opsysName FreeBSD13 = "freebsd13" +opsysName FreeBSD14 = "freebsd14" opsysName Windows = "windows" archName :: Arch -> String @@ -416,15 +416,16 @@ type Variables = MonoidalMap String [String] a =: b = MonoidalMap (Map.singleton a [b]) opsysVariables :: Arch -> Opsys -> Variables -opsysVariables _ FreeBSD13 = mconcat +opsysVariables _ FreeBSD14 = mconcat [ -- N.B. we use iconv from ports as I see linker errors when we attempt -- to use the "native" iconv embedded in libc as suggested by the -- porting guide [1]. -- [1] https://www.freebsd.org/doc/en/books/porters-handbook/using-iconv.html) - "CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib" - , "HADRIAN_ARGS" =: "--docs=no-sphinx" + "CONFIGURE_ARGS" =: "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib" + , "CONFIGURE_ARGS" =: "--with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib" + , "CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib" , "GHC_VERSION" =: "9.6.4" - , "CABAL_INSTALL_VERSION" =: "3.10.2.0" + , "CABAL_INSTALL_VERSION" =: "3.10.3.0" ] opsysVariables arch (Linux distro) = distroVariables arch distro opsysVariables AArch64 (Darwin {}) = @@ -1130,6 +1131,11 @@ darwin = , fastCI (standardBuilds AArch64 Darwin) ] +freebsd_jobs :: [JobGroup Job] +freebsd_jobs = + [ addValidateRule FreeBSDLabel (standardBuilds Amd64 FreeBSD14) + ] + alpine_x86 :: [JobGroup Job] alpine_x86 = [ -- Fully static build, in theory usable on any linux distribution. @@ -1202,6 +1208,7 @@ job_groups = ++ alpine_x86 ++ alpine_aarch64 ++ cross_jobs + ++ freebsd_jobs mkPlatform :: Arch -> Opsys -> String ===================================== .gitlab/jobs.yaml ===================================== @@ -955,6 +955,70 @@ "ac_cv_func_utimensat": "no" } }, + "nightly-x86_64-freebsd14-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "8 weeks", + "paths": [ + "ghc-x86_64-freebsd14-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-validate", + "BUILD_FLAVOUR": "validate", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-validate", + "XZ_OPT": "-9" + } + }, "nightly-x86_64-linux-alpine3_12-int_native-validate+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -3651,6 +3715,72 @@ "ac_cv_func_utimensat": "no" } }, + "release-x86_64-freebsd14-release": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "1 year", + "paths": [ + "ghc-x86_64-freebsd14-release.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-release", + "BUILD_FLAVOUR": "release", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "HADRIAN_ARGS": "--hash-unit-ids", + "IGNORE_PERF_FAILURES": "all", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-release", + "XZ_OPT": "-9" + } + }, "release-x86_64-linux-alpine3_12-int_native-release+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -5029,6 +5159,69 @@ "ac_cv_func_utimensat": "no" } }, + "x86_64-freebsd14-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": false, + "artifacts": { + "expire_in": "2 weeks", + "paths": [ + "ghc-x86_64-freebsd14-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "x86_64-freebsd14-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": null, + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-freebsd14-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/)) || ($CI_MERGE_REQUEST_LABELS =~ /.*FreeBSD.*/)))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-freebsd14" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-x86_64-freebsd14-validate", + "BUILD_FLAVOUR": "validate", + "CABAL_INSTALL_VERSION": "3.10.3.0", + "CONFIGURE_ARGS": "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib --with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib --with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --enable-strict-ghc-toolchain-check", + "GHC_VERSION": "9.6.4", + "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "x86_64-freebsd14-validate" + } + }, "x86_64-linux-alpine3_12-int_native-validate+fully_static": { "after_script": [ ".gitlab/ci.sh save_cache", ===================================== m4/find_ld.m4 ===================================== @@ -79,13 +79,16 @@ AC_DEFUN([FIND_LD],[ dnl See #21712. AC_CHECK_TARGET_TOOL([LD], [ld]) ;; - *) + *-linux|*-mingw32) if test "x$enable_ld_override" = "xyes"; then find_ld else AC_CHECK_TARGET_TOOL([LD], [ld]) fi ;; + *) + AC_CHECK_TARGET_TOOL([LD], [ld]) + ;; esac CHECK_LD_COPY_BUG([$1]) ]) ===================================== rts/Linker.c ===================================== @@ -1111,7 +1111,7 @@ freePreloadObjectFile (ObjectCode *oc) */ void freeObjectCode (ObjectCode *oc) { - IF_DEBUG(linker, ocDebugBelch(oc, "start\n")); + IF_DEBUG(linker, ocDebugBelch(oc, "freeObjectCode: start\n")); // Run finalizers if (oc->type == STATIC_OBJECT && ===================================== rts/linker/MMap.c ===================================== @@ -345,12 +345,7 @@ mmapInRegion ( if (result == NULL) { // The mapping failed return NULL; - } else if (result < region->start) { - // Uh oh, we assume that mmap() will only give us a - // an address at or after the requested address. - // Try again. - p = (uint8_t *) result + bytes; - } else if (result < region->end) { + } else if (result >= region->start && result < region->end) { // Success! region->last = (uint8_t *) result + bytes; return result; @@ -358,17 +353,23 @@ mmapInRegion ( // We failed to find a suitable mapping munmap(result, bytes); reportMemoryMap(); - errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " + errorBelch("mmapForLinker: failed to mmap() memory between %p and %p; " "asked for %zu bytes at %p. " "Try specifying an address with +RTS -xm -RTS", - bytes, p); + region->start, region->end, bytes, p); return NULL; - } + } else if (result < region->start) { + // Uh oh, we assume that mmap() will only give us a + // an address at or after the requested address. + // Try again. + p = (uint8_t *) result + bytes; + } else if (result >= region->end) { + // mmap() gave us too high an address; wrap around and try again + wrapped = true; + p = region->start; + } - // mmap() gave us too high an address; wrap around and try again munmap(result, bytes); - wrapped = true; - p = region->start; } } ===================================== testsuite/tests/quasiquotation/all.T ===================================== @@ -8,6 +8,5 @@ test('T7918', test('T14028', [req_interp, req_rts_linker, only_ways([config.ghc_th_way]), - unless(config.have_ext_interp, skip), - when(opsys('freebsd'), expect_broken(19723))], + unless(config.have_ext_interp, skip)], makefile_test, ['T14028 ghcThWayFlags=' + config.ghc_th_way_flags]) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3b79cd0bb4de55b3e88679913c28b9513a3c4e9a...202683543bde9edb3267ff61b0f990dd61f88b33 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3b79cd0bb4de55b3e88679913c28b9513a3c4e9a...202683543bde9edb3267ff61b0f990dd61f88b33 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 08:17:19 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Tue, 19 Nov 2024 03:17:19 -0500 Subject: [Git][ghc/ghc][wip/T24359] Swizzle order of bindings Message-ID: <673c498f92ab0_37ff5caa93d0487ed@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 9ecaa6aa by Simon Peyton Jones at 2024-11-19T08:16:06+00:00 Swizzle order of bindings - - - - - 1 changed file: - compiler/GHC/HsToCore/Binds.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -847,10 +847,9 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id ; mk_spec_call <- do { ds_call <- dsLExpr the_call ; return $ \ poly_id poly_rhs -> - mkLets ds_rhs_binds $ - mkLets ds_lhs_binds $ mkLetNonRec (localiseId poly_id) poly_rhs $ - ds_call } + mkLets ds_rhs_binds $ + core_call } ; finishSpecPrag mb_poly_rhs (tv_bndrs ++ lhs_evs ++ id_bndrs) core_call View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ecaa6aa54cb3f61410b7319518dfb156fc8b1b9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9ecaa6aa54cb3f61410b7319518dfb156fc8b1b9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 10:56:39 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Tue, 19 Nov 2024 05:56:39 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 70 commits: Handle the special ghc-prim:GHC.Prim module in the compiler Message-ID: <673c6ee732c07_35c6643f0c0091054@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - f0476384 by Rodrigo Mesquita at 2024-11-19T10:55:55+00:00 Improve performance of deriving Show Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: InstanceMatching T12707 T3294 ------------------------ - - - - - 0028a2f9 by Rodrigo Mesquita at 2024-11-19T10:56:13+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - 907f32ff by Rodrigo Mesquita at 2024-11-19T10:56:14+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 30 changed files: - .gitlab/merge_request_templates/Default.md - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/Hs/Utils.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Platform/Ways.hs - compiler/GHC/Prelude/Basic.hs - compiler/GHC/Rename/HsType.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e59b353dc710b92a71f26735d8af961b2cf2eae3...907f32ff9e8a0e8b9f4d1118f39a17b0a0fd9a1b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e59b353dc710b92a71f26735d8af961b2cf2eae3...907f32ff9e8a0e8b9f4d1118f39a17b0a0fd9a1b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 11:58:39 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 19 Nov 2024 06:58:39 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Include diagnostic reason in -fdiagnostics-as-json Message-ID: <673c7d6f92381_1c59c01694a022027@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - bc6992df by Sjoerd Visscher at 2024-11-19T06:58:07-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 41bf1d8a by Sjoerd Visscher at 2024-11-19T06:58:07-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 0f4079d1 by ARATA Mizuki at 2024-11-19T06:58:13-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 23 changed files: - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/StgToCmm/Prim.hs - compiler/GHC/Types/Error.hs - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Finder/Types.hs - compiler/GHC/Unit/Module/Env.hs - compiler/GHC/Unit/Module/Location.hs - compiler/GHC/Unit/Module/Warnings.hs - compiler/GHC/Unit/Types.hs - + docs/users_guide/diagnostics-as-json-schema-1_1.json - docs/users_guide/using.rst - rts/IPE.c - rts/include/rts/IPE.h - testsuite/tests/driver/all.T - testsuite/tests/driver/json.stderr - testsuite/tests/driver/json_warn.hs - testsuite/tests/driver/json_warn.stderr Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -1095,10 +1095,18 @@ primop DoubleLeOp "<=##" Compare Double# -> Double# -> Int# primop DoubleMinOp "minDouble#" GenPrimOp Double# -> Double# -> Double# + {Return the minimum of the arguments. + When the arguments are numerically equal (e.g. @0.0##@ and @-0.0##@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop DoubleMaxOp "maxDouble#" GenPrimOp Double# -> Double# -> Double# + {Return the maximum of the arguments. + When the arguments are numerically equal (e.g. @0.0##@ and @-0.0##@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop DoubleAddOp "+##" GenPrimOp @@ -1269,10 +1277,18 @@ primop FloatLeOp "leFloat#" Compare Float# -> Float# -> Int# primop FloatMinOp "minFloat#" GenPrimOp Float# -> Float# -> Float# + {Return the minimum of the arguments. + When the arguments are numerically equal (e.g. @0.0#@ and @-0.0#@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop FloatMaxOp "maxFloat#" GenPrimOp Float# -> Float# -> Float# + {Return the maximum of the arguments. + When the arguments are numerically equal (e.g. @0.0#@ and @-0.0#@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop FloatAddOp "plusFloat#" GenPrimOp @@ -4109,12 +4125,13 @@ primop VecPackOp "pack#" GenPrimOp primop VecUnpackOp "unpack#" GenPrimOp VECTOR -> VECTUPLE - { Unpack the elements of a vector into an unboxed tuple. #} + { Unpack the elements of a vector into an unboxed tuple. } with vector = ALL_VECTOR_TYPES primop VecInsertOp "insert#" GenPrimOp VECTOR -> SCALAR -> Int# -> VECTOR - { Insert a scalar at the given position in a vector. } + { Insert a scalar at the given position in a vector. + The position must be a compile-time constant. } with effect = CanFail vector = ALL_VECTOR_TYPES @@ -4160,40 +4177,43 @@ primop VecNegOp "negate#" GenPrimOp primop VecIndexByteArrayOp "indexArray#" GenPrimOp ByteArray# -> Int# -> VECTOR - { Read a vector from specified index of immutable array. } + { Read a vector from the specified index of an immutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = CanFail vector = ALL_VECTOR_TYPES primop VecReadByteArrayOp "readArray#" GenPrimOp MutableByteArray# s -> Int# -> State# s -> (# State# s, VECTOR #) - { Read a vector from specified index of mutable array. } + { Read a vector from the specified index of a mutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecWriteByteArrayOp "writeArray#" GenPrimOp MutableByteArray# s -> Int# -> VECTOR -> State# s -> State# s - { Write a vector to specified index of mutable array. } + { Write a vector to the specified index of a mutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecIndexOffAddrOp "indexOffAddr#" GenPrimOp Addr# -> Int# -> VECTOR - { Reads vector; offset in bytes. } + { Reads vector; offset in units of SIMD vectors (not scalar elements). } with effect = CanFail vector = ALL_VECTOR_TYPES primop VecReadOffAddrOp "readOffAddr#" GenPrimOp Addr# -> Int# -> State# s -> (# State# s, VECTOR #) - { Reads vector; offset in bytes. } + { Reads vector; offset in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecWriteOffAddrOp "writeOffAddr#" GenPrimOp Addr# -> Int# -> VECTOR -> State# s -> State# s - { Write vector; offset in bytes. } + { Write vector; offset in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES @@ -4263,7 +4283,7 @@ primop VecFNMSub "fnmsub#" GenPrimOp primop VecShuffleOp "shuffle#" GenPrimOp VECTOR -> VECTOR -> INTVECTUPLE -> VECTOR {Shuffle elements of the concatenation of the input two vectors - into the result vector.} + into the result vector. The indices must be compile-time constants.} with vector = ALL_VECTOR_TYPES primop VecMinOp "min#" GenPrimOp ===================================== compiler/GHC/Driver/Backpack.hs ===================================== @@ -781,7 +781,7 @@ summariseRequirement pn mod_name = do let loc = srcLocSpan (mkSrcLoc (mkFastString (bkp_filename env)) 1 1) let fc = hsc_FC hsc_env - mod <- liftIO $ addHomeModuleToFinder fc home_unit (notBoot mod_name) location + mod <- liftIO $ addHomeModuleToFinder fc home_unit mod_name location HsigFile extra_sig_imports <- liftIO $ findExtraSigImports hsc_env HsigFile mod_name @@ -854,17 +854,14 @@ hsModuleToModSummary home_keys pn hsc_src modname -- To add insult to injury, we don't even actually use -- these filenames to figure out where the hi files go. -- A travesty! - let location0 = mkHomeModLocation2 fopts modname + let location = mkHomeModLocation fopts modname (unsafeEncodeUtf $ unpackFS unit_fs moduleNameSlashes modname) - (case hsc_src of + (case hsc_src of HsigFile -> os "hsig" HsBootFile -> os "hs-boot" HsSrcFile -> os "hs") - -- DANGEROUS: bootifying can POISON the module finder cache - let location = case hsc_src of - HsBootFile -> addBootSuffixLocnOut location0 - _ -> location0 + hsc_src -- This duplicates a pile of logic in GHC.Driver.Make hi_timestamp <- liftIO $ modificationTimeIfExists (ml_hi_file location) hie_timestamp <- liftIO $ modificationTimeIfExists (ml_hie_file location) @@ -893,7 +890,7 @@ hsModuleToModSummary home_keys pn hsc_src modname this_mod <- liftIO $ do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB modname (hscSourceToIsBoot hsc_src)) location + addHomeModuleToFinder fc home_unit modname location hsc_src let ms = ModSummary { ms_mod = this_mod, ms_hsc_src = hsc_src, ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -2123,38 +2123,23 @@ summariseFile hsc_env' home_unit old_summaries src_fn mb_phase maybe_buf <- getPreprocessedImports hsc_env src_fn mb_phase maybe_buf let fopts = initFinderOpts (hsc_dflags hsc_env) - src_path = unsafeEncodeUtf src_fn + (basename, extension) = splitExtension src_fn - is_boot = case takeExtension src_fn of - ".hs-boot" -> IsBoot - ".lhs-boot" -> IsBoot - _ -> NotBoot - - (path_without_boot, hsc_src) - | isHaskellSigFilename src_fn = (src_path, HsigFile) - | IsBoot <- is_boot = (removeBootSuffix src_path, HsBootFile) - | otherwise = (src_path, HsSrcFile) - - -- Make a ModLocation for the Finder, who only has one entry for - -- each @ModuleName@, and therefore needs to use the locations for - -- the non-boot files. - location_without_boot = - mkHomeModLocation fopts pi_mod_name path_without_boot + hsc_src + | isHaskellSigSuffix (drop 1 extension) = HsigFile + | isHaskellBootSuffix (drop 1 extension) = HsBootFile + | otherwise = HsSrcFile -- Make a ModLocation for this file, adding the @-boot@ suffix to -- all paths if the original was a boot file. - location - | IsBoot <- is_boot - = addBootSuffixLocn location_without_boot - | otherwise - = location_without_boot + location = mkHomeModLocation fopts pi_mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf extension) hsc_src -- Tell the Finder cache where it is, so that subsequent calls -- to findModule will find it, even if it's not on any search path mod <- liftIO $ do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB pi_mod_name is_boot) location + addHomeModuleToFinder fc home_unit pi_mod_name location hsc_src liftIO $ makeNewModSummary hsc_env $ MakeNewModSummary { nms_src_fn = src_fn @@ -2184,14 +2169,10 @@ checkSummaryHash -- and it was likely flushed in depanal. This is not technically -- needed when we're called from sumariseModule but it shouldn't -- hurt. - -- Also, only add to finder cache for non-boot modules as the finder cache - -- makes sure to add a boot suffix for boot files. - _ <- do - let fc = hsc_FC hsc_env - gwib = GWIB (ms_mod old_summary) (isBootSummary old_summary) - case ms_hsc_src old_summary of - HsSrcFile -> addModuleToFinder fc gwib location - _ -> return () + let fc = hsc_FC hsc_env + mod = ms_mod old_summary + hsc_src = ms_hsc_src old_summary + addModuleToFinder fc mod location hsc_src hi_timestamp <- modificationTimeIfExists (ml_hi_file location) hie_timestamp <- modificationTimeIfExists (ml_hie_file location) @@ -2243,7 +2224,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p find_it :: IO SummariseResult find_it = do - found <- findImportedModule hsc_env wanted_mod mb_pkg + found <- findImportedModuleWithIsBoot hsc_env wanted_mod is_boot mb_pkg case found of Found location mod | isJust (ml_hs_file location) -> @@ -2261,10 +2242,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p just_found location mod = do -- Adjust location to point to the hs-boot source file, -- hi file, object file, when is_boot says so - let location' = case is_boot of - IsBoot -> addBootSuffixLocn location - NotBoot -> location - src_fn = expectJust "summarise2" (ml_hs_file location') + let src_fn = expectJust "summarise2" (ml_hs_file location) -- Check that it exists -- It might have been deleted since the Finder last found it @@ -2274,7 +2252,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p -- .hs-boot file doesn't exist. Nothing -> return NotThere Just h -> do - fresult <- new_summary_cache_check location' mod src_fn h + fresult <- new_summary_cache_check location mod src_fn h return $ case fresult of Left err -> FoundHomeWithError (moduleUnitId mod, err) Right ms -> FoundHome ms ===================================== compiler/GHC/Driver/MakeFile.hs ===================================== @@ -292,12 +292,12 @@ findDependency :: HscEnv findDependency hsc_env srcloc pkg imp is_boot include_pkg_deps = do -- Find the module; this will be fast because -- we've done it once during downsweep - r <- findImportedModule hsc_env imp pkg + r <- findImportedModuleWithIsBoot hsc_env imp is_boot pkg case r of Found loc _ -- Home package: just depend on the .hi or hi-boot file | isJust (ml_hs_file loc) || include_pkg_deps - -> return (Just (unsafeDecodeUtf $ addBootSuffix_maybe is_boot (ml_hi_file_ospath loc))) + -> return (Just (unsafeDecodeUtf $ ml_hi_file_ospath loc)) -- Not in this package: we don't need a dependency | otherwise ===================================== compiler/GHC/Driver/Phases.hs ===================================== @@ -23,6 +23,7 @@ module GHC.Driver.Phases ( isDynLibSuffix, isHaskellUserSrcSuffix, isHaskellSigSuffix, + isHaskellBootSuffix, isSourceSuffix, isHaskellishTarget, @@ -234,7 +235,7 @@ phaseInputExt Js = "js" phaseInputExt StopLn = "o" haskellish_src_suffixes, backpackish_suffixes, haskellish_suffixes, cish_suffixes, - js_suffixes, haskellish_user_src_suffixes, haskellish_sig_suffixes + js_suffixes, haskellish_user_src_suffixes, haskellish_sig_suffixes, haskellish_boot_suffixes :: [String] -- When a file with an extension in the haskellish_src_suffixes group is -- loaded in --make mode, its imports will be loaded too. @@ -247,7 +248,8 @@ js_suffixes = [ "js" ] -- Will not be deleted as temp files: haskellish_user_src_suffixes = - haskellish_sig_suffixes ++ [ "hs", "lhs", "hs-boot", "lhs-boot" ] + haskellish_sig_suffixes ++ haskellish_boot_suffixes ++ [ "hs", "lhs" ] +haskellish_boot_suffixes = [ "hs-boot", "lhs-boot" ] haskellish_sig_suffixes = [ "hsig", "lhsig" ] backpackish_suffixes = [ "bkp" ] @@ -265,11 +267,12 @@ dynlib_suffixes platform = case platformOS platform of _ -> ["so"] isHaskellishSuffix, isBackpackishSuffix, isHaskellSrcSuffix, isCishSuffix, - isHaskellUserSrcSuffix, isJsSuffix, isHaskellSigSuffix + isHaskellUserSrcSuffix, isJsSuffix, isHaskellSigSuffix, isHaskellBootSuffix :: String -> Bool isHaskellishSuffix s = s `elem` haskellish_suffixes isBackpackishSuffix s = s `elem` backpackish_suffixes isHaskellSigSuffix s = s `elem` haskellish_sig_suffixes +isHaskellBootSuffix s = s `elem` haskellish_boot_suffixes isHaskellSrcSuffix s = s `elem` haskellish_src_suffixes isCishSuffix s = s `elem` cish_suffixes isJsSuffix s = s `elem` js_suffixes ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -734,7 +734,7 @@ runHscPhase pipe_env hsc_env0 input_fn src_flavour = do mod <- do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB mod_name (hscSourceToIsBoot src_flavour)) location + addHomeModuleToFinder fc home_unit mod_name location src_flavour -- Make the ModSummary to hand to hscMain let @@ -777,24 +777,18 @@ mkOneShotModLocation :: PipeEnv -> DynFlags -> HscSource -> ModuleName -> IO Mod mkOneShotModLocation pipe_env dflags src_flavour mod_name = do let PipeEnv{ src_basename=basename, src_suffix=suff } = pipe_env - let location1 = mkHomeModLocation2 fopts mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf suff) - - -- Boot-ify it if necessary - let location2 - | HsBootFile <- src_flavour = addBootSuffixLocnOut location1 - | otherwise = location1 - + let location1 = mkHomeModLocation fopts mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf suff) src_flavour -- Take -ohi into account if present -- This can't be done in mkHomeModuleLocation because -- it only applies to the module being compiles let ohi = outputHi dflags - location3 | Just fn <- ohi = location2{ ml_hi_file_ospath = unsafeEncodeUtf fn } - | otherwise = location2 + location2 | Just fn <- ohi = location1{ ml_hi_file_ospath = unsafeEncodeUtf fn } + | otherwise = location1 let dynohi = dynOutputHi dflags - location4 | Just fn <- dynohi = location3{ ml_dyn_hi_file_ospath = unsafeEncodeUtf fn } - | otherwise = location3 + location3 | Just fn <- dynohi = location2{ ml_dyn_hi_file_ospath = unsafeEncodeUtf fn } + | otherwise = location2 -- Take -o into account if present -- Very like -ohi, but we must *only* do this if we aren't linking @@ -807,11 +801,11 @@ mkOneShotModLocation pipe_env dflags src_flavour mod_name = do location5 | Just ofile <- expl_o_file , let dyn_ofile = fromMaybe (ofile -<.> dynObjectSuf_ dflags) expl_dyn_o_file , isNoLink (ghcLink dflags) - = location4 { ml_obj_file_ospath = unsafeEncodeUtf ofile + = location3 { ml_obj_file_ospath = unsafeEncodeUtf ofile , ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } | Just dyn_ofile <- expl_dyn_o_file - = location4 { ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } - | otherwise = location4 + = location3 { ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } + | otherwise = location3 return location5 where fopts = initFinderOpts dflags ===================================== compiler/GHC/Iface/Load.hs ===================================== @@ -896,9 +896,9 @@ findAndReadIface hsc_env doc_str mod wanted_mod hi_boot_file = do else do let fopts = initFinderOpts dflags -- Look for the file - mb_found <- liftIO (findExactModule fc fopts other_fopts unit_state mhome_unit mod) + mb_found <- liftIO (findExactModule fc fopts other_fopts unit_state mhome_unit mod hi_boot_file) case mb_found of - InstalledFound (addBootSuffixLocn_maybe hi_boot_file -> loc) mod -> do + InstalledFound loc -> do -- See Note [Home module load error] case mhome_unit of Just home_unit ===================================== compiler/GHC/StgToCmm/Prim.hs ===================================== @@ -2713,7 +2713,7 @@ doShuffleOp ty (v1:v2:idxs) res -> emitAssign (CmmLocal res) (CmmMachOp (mo is) [v1,v2]) | otherwise -> pprPanic "doShuffleOp" $ - vcat [ text "shuffle indices must be literals, 0 <= i <" <+> ppr len ] + vcat [ text "shuffle indices must be literals, 0 <= i <" <+> ppr (2 * len) ] | otherwise = pprPanic "doShuffleOp" $ vcat [ text "non-vector argument type:" <+> ppr ty ] ===================================== compiler/GHC/Types/Error.hs ===================================== @@ -100,19 +100,23 @@ import GHC.Types.SrcLoc as SrcLoc import GHC.Types.Hint import GHC.Data.FastString (unpackFS) import GHC.Data.StringBuffer (atLine, hGetStringBuffer, len, lexemeToString) + +import GHC.Types.Hint.Ppr () -- Outputable instance +import GHC.Unit.Module.Warnings (WarningCategory(..)) + import GHC.Utils.Json import GHC.Utils.Panic -import GHC.Unit.Module.Warnings (WarningCategory) + +import GHC.Version (cProjectVersion) import Data.Bifunctor import Data.Foldable ( fold, toList ) import Data.List.NonEmpty ( NonEmpty (..) ) import qualified Data.List.NonEmpty as NE import Data.List ( intercalate ) +import Data.Maybe ( maybeToList ) import Data.Typeable ( Typeable ) import Numeric.Natural ( Natural ) import Text.Printf ( printf ) -import GHC.Version (cProjectVersion) -import GHC.Types.Hint.Ppr () -- Outputtable instance {- Note [Messages] ~~~~~~~~~~~~~~~~~~ @@ -393,10 +397,8 @@ newtype ResolvedDiagnosticReason pattern WarningWithFlag :: WarningFlag -> DiagnosticReason pattern WarningWithFlag w = WarningWithFlags (w :| []) -{- -Note [Warnings controlled by multiple flags] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - +{- Note [Warnings controlled by multiple flags] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Diagnostics that started life as flag-controlled warnings have a 'diagnosticReason' of 'WarningWithFlags', giving the flags that control the warning. Usually there is only one flag, but in a few cases multiple flags @@ -563,11 +565,11 @@ instance ToJson DiagnosticCode where {- Note [Diagnostic Message JSON Schema] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The below instance of ToJson must conform to the JSON schema -specified in docs/users_guide/diagnostics-as-json-schema-1_0.json. +specified in docs/users_guide/diagnostics-as-json-schema-1_1.json. When the schema is altered, please bump the version. If the content is altered in a backwards compatible way, update the minor version (e.g. 1.3 ~> 1.4). -If the content is breaking, update the major version (e.g. 1.3 ~> 2.3). +If the content is breaking, update the major version (e.g. 1.3 ~> 2.0). When updating the schema, replace the above file and name it appropriately with the version appended, and change the documentation of the -fdiagnostics-as-json flag to reflect the new schema. @@ -576,25 +578,41 @@ https://json-schema.org -} schemaVersion :: String -schemaVersion = "1.0" +schemaVersion = "1.1" -- See Note [Diagnostic Message JSON Schema] before editing! instance Diagnostic e => ToJson (MsgEnvelope e) where - json m = JSObject [ + json m = JSObject $ [ ("version", JSString schemaVersion), ("ghcVersion", JSString $ "ghc-" ++ cProjectVersion), ("span", json $ errMsgSpan m), ("severity", json $ errMsgSeverity m), ("code", maybe JSNull json (diagnosticCode diag)), ("message", JSArray $ map renderToJSString diagMsg), - ("hints", JSArray $ map (renderToJSString . ppr) (diagnosticHints diag) ) - ] - where diag = errMsgDiagnostic m - opts = defaultDiagnosticOpts @e - style = mkErrStyle (errMsgContext m) - ctx = defaultSDocContext {sdocStyle = style } - diagMsg = filter (not . isEmpty ctx) (unDecorated (diagnosticMessage (opts) diag)) - renderToJSString :: SDoc -> JsonDoc - renderToJSString = JSString . (renderWithContext ctx) + ("hints", JSArray $ map (renderToJSString . ppr) (diagnosticHints diag) ) ] + ++ [ ("reason", reasonJson) + | reasonJson <- maybeToList $ usefulReasonJson_maybe (errMsgReason m) ] + where + diag = errMsgDiagnostic m + opts = defaultDiagnosticOpts @e + style = mkErrStyle (errMsgContext m) + ctx = defaultSDocContext {sdocStyle = style } + diagMsg = filter (not . isEmpty ctx) (unDecorated (diagnosticMessage (opts) diag)) + renderToJSString :: SDoc -> JsonDoc + renderToJSString = JSString . (renderWithContext ctx) + + usefulReasonJson_maybe :: ResolvedDiagnosticReason -> Maybe JsonDoc + usefulReasonJson_maybe (ResolvedDiagnosticReason rea) = + case rea of + WarningWithoutFlag -> Nothing + ErrorWithoutFlag -> Nothing + WarningWithFlags flags -> + Just $ JSObject + [ ("flags", JSArray $ map (JSString . NE.head . warnFlagNames) (NE.toList flags)) + ] + WarningWithCategory (WarningCategory cat) -> + Just $ JSObject + [ ("category", JSString $ unpackFS cat) + ] instance Show (MsgEnvelope DiagnosticMessage) where show = showMsgEnvelope ===================================== compiler/GHC/Unit/Finder.hs ===================================== @@ -15,6 +15,7 @@ module GHC.Unit.Finder ( FinderCache(..), initFinderCache, findImportedModule, + findImportedModuleWithIsBoot, findPluginModule, findExactModule, findHomeModule, @@ -55,6 +56,7 @@ import GHC.Utils.Panic import GHC.Linker.Types import GHC.Types.PkgQual +import GHC.Types.SourceFile import GHC.Fingerprint import Data.IORef @@ -103,28 +105,28 @@ InstalledNotFound. initFinderCache :: IO FinderCache initFinderCache = do - mod_cache <- newIORef emptyInstalledModuleWithIsBootEnv + mod_cache <- newIORef emptyInstalledModuleEnv file_cache <- newIORef M.empty let flushFinderCaches :: UnitEnv -> IO () flushFinderCaches ue = do - atomicModifyIORef' mod_cache $ \fm -> (filterInstalledModuleWithIsBootEnv is_ext fm, ()) + atomicModifyIORef' mod_cache $ \fm -> (filterInstalledModuleEnv is_ext fm, ()) atomicModifyIORef' file_cache $ \_ -> (M.empty, ()) where - is_ext mod _ = not (isUnitEnvInstalledModule ue (gwib_mod mod)) + is_ext mod _ = not (isUnitEnvInstalledModule ue mod) - addToFinderCache :: InstalledModuleWithIsBoot -> InstalledFindResult -> IO () + addToFinderCache :: InstalledModule -> InstalledFindResult -> IO () addToFinderCache key val = atomicModifyIORef' mod_cache $ \c -> - case (lookupInstalledModuleWithIsBootEnv c key, val) of + case (lookupInstalledModuleEnv c key, val) of -- Don't overwrite an InstalledFound with an InstalledNotFound -- See [Note Monotonic addToFinderCache] (Just InstalledFound{}, InstalledNotFound{}) -> (c, ()) - _ -> (extendInstalledModuleWithIsBootEnv c key val, ()) + _ -> (extendInstalledModuleEnv c key val, ()) - lookupFinderCache :: InstalledModuleWithIsBoot -> IO (Maybe InstalledFindResult) + lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult) lookupFinderCache key = do c <- readIORef mod_cache - return $! lookupInstalledModuleWithIsBootEnv c key + return $! lookupInstalledModuleEnv c key lookupFileCache :: FilePath -> IO Fingerprint lookupFileCache key = do @@ -156,6 +158,13 @@ findImportedModule hsc_env mod pkg_qual = in do findImportedModuleNoHsc fc fopts (hsc_unit_env hsc_env) mhome_unit mod pkg_qual +findImportedModuleWithIsBoot :: HscEnv -> ModuleName -> IsBootInterface -> PkgQual -> IO FindResult +findImportedModuleWithIsBoot hsc_env mod is_boot pkg_qual = do + res <- findImportedModule hsc_env mod pkg_qual + case (res, is_boot) of + (Found loc mod, IsBoot) -> return (Found (addBootSuffixLocn loc) mod) + _ -> return res + findImportedModuleNoHsc :: FinderCache -> FinderOpts @@ -228,15 +237,19 @@ findPluginModule fc fopts units Nothing mod_name = -- reading the interface for a module mentioned by another interface, -- for example (a "system import"). -findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IO InstalledFindResult -findExactModule fc fopts other_fopts unit_state mhome_unit mod = do - case mhome_unit of +findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IsBootInterface -> IO InstalledFindResult +findExactModule fc fopts other_fopts unit_state mhome_unit mod is_boot = do + res <- case mhome_unit of Just home_unit | isHomeInstalledModule home_unit mod -> findInstalledHomeModule fc fopts (homeUnitId home_unit) (moduleName mod) | Just home_fopts <- unitEnv_lookup_maybe (moduleUnit mod) other_fopts -> findInstalledHomeModule fc home_fopts (moduleUnit mod) (moduleName mod) _ -> findPackageModule fc unit_state fopts mod + case (res, is_boot) of + (InstalledFound loc, IsBoot) -> return (InstalledFound (addBootSuffixLocn loc)) + _ -> return res + -- ----------------------------------------------------------------------------- -- Helpers @@ -274,7 +287,7 @@ orIfNotFound this or_this = do homeSearchCache :: FinderCache -> UnitId -> ModuleName -> IO InstalledFindResult -> IO InstalledFindResult homeSearchCache fc home_unit mod_name do_this = do let mod = mkModule home_unit mod_name - modLocationCache fc (notBoot mod) do_this + modLocationCache fc mod do_this findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult findExposedPackageModule fc fopts units mod_name mb_pkg = @@ -296,7 +309,7 @@ findLookupResult fc fopts r = case r of -- with just the location of the thing that was -- instantiated; you probably also need all of the -- implicit locations from the instances - InstalledFound loc _ -> return (Found loc m) + InstalledFound loc -> return (Found loc m) InstalledNoPackage _ -> return (NoPackage (moduleUnit m)) InstalledNotFound fp _ -> return (NotFound{ fr_paths = fmap unsafeDecodeUtf fp, fr_pkg = Just (moduleUnit m) , fr_pkgs_hidden = [] @@ -331,7 +344,7 @@ findLookupResult fc fopts r = case r of , fr_unusables = [] , fr_suggestions = suggest' }) -modLocationCache :: FinderCache -> InstalledModuleWithIsBoot -> IO InstalledFindResult -> IO InstalledFindResult +modLocationCache :: FinderCache -> InstalledModule -> IO InstalledFindResult -> IO InstalledFindResult modLocationCache fc mod do_this = do m <- lookupFinderCache fc mod case m of @@ -341,17 +354,19 @@ modLocationCache fc mod do_this = do addToFinderCache fc mod result return result -addModuleToFinder :: FinderCache -> ModuleWithIsBoot -> ModLocation -> IO () -addModuleToFinder fc mod loc = do - let imod = fmap toUnitId <$> mod - addToFinderCache fc imod (InstalledFound loc (gwib_mod imod)) +addModuleToFinder :: FinderCache -> Module -> ModLocation -> HscSource -> IO () +addModuleToFinder fc mod loc src_flavour = do + let imod = toUnitId <$> mod + unless (src_flavour == HsBootFile) $ + addToFinderCache fc imod (InstalledFound loc) -- This returns a module because it's more convenient for users -addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleNameWithIsBoot -> ModLocation -> IO Module -addHomeModuleToFinder fc home_unit mod_name loc = do - let mod = mkHomeInstalledModule home_unit <$> mod_name - addToFinderCache fc mod (InstalledFound loc (gwib_mod mod)) - return (mkHomeModule home_unit (gwib_mod mod_name)) +addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleName -> ModLocation -> HscSource -> IO Module +addHomeModuleToFinder fc home_unit mod_name loc src_flavour = do + let mod = mkHomeInstalledModule home_unit mod_name + unless (src_flavour == HsBootFile) $ + addToFinderCache fc mod (InstalledFound loc) + return (mkHomeModule home_unit mod_name) -- ----------------------------------------------------------------------------- -- The internal workers @@ -361,7 +376,7 @@ findHomeModule fc fopts home_unit mod_name = do let uid = homeUnitAsUnit home_unit r <- findInstalledHomeModule fc fopts (homeUnitId home_unit) mod_name return $ case r of - InstalledFound loc _ -> Found loc (mkHomeModule home_unit mod_name) + InstalledFound loc -> Found loc (mkHomeModule home_unit mod_name) InstalledNoPackage _ -> NoPackage uid -- impossible InstalledNotFound fps _ -> NotFound { fr_paths = fmap unsafeDecodeUtf fps, @@ -386,7 +401,7 @@ findHomePackageModule fc fopts home_unit mod_name = do let uid = RealUnit (Definite home_unit) r <- findInstalledHomeModule fc fopts home_unit mod_name return $ case r of - InstalledFound loc _ -> Found loc (mkModule uid mod_name) + InstalledFound loc -> Found loc (mkModule uid mod_name) InstalledNoPackage _ -> NoPackage uid -- impossible InstalledNotFound fps _ -> NotFound { fr_paths = fmap unsafeDecodeUtf fps, @@ -456,7 +471,7 @@ findInstalledHomeModule fc fopts home_unit mod_name = do -- This is important only when compiling the base package (where GHC.Prim -- is a home module). if mod `installedModuleEq` gHC_PRIM - then return (InstalledFound (error "GHC.Prim ModLocation") mod) + then return (InstalledFound (error "GHC.Prim ModLocation")) else searchPathExts search_dirs mod exts -- | Prepend the working directory to the search path. @@ -485,11 +500,11 @@ findPackageModule_ :: FinderCache -> FinderOpts -> InstalledModule -> UnitInfo - findPackageModule_ fc fopts mod pkg_conf = do massertPpr (moduleUnit mod == unitId pkg_conf) (ppr (moduleUnit mod) <+> ppr (unitId pkg_conf)) - modLocationCache fc (notBoot mod) $ + modLocationCache fc mod $ -- special case for GHC.Prim; we won't find it in the filesystem. if mod `installedModuleEq` gHC_PRIM - then return (InstalledFound (error "GHC.Prim ModLocation") mod) + then return (InstalledFound (error "GHC.Prim ModLocation")) else let @@ -513,7 +528,7 @@ findPackageModule_ fc fopts mod pkg_conf = do -- don't bother looking for it. let basename = unsafeEncodeUtf $ moduleNameSlashes (moduleName mod) loc = mk_hi_loc one basename - in return $ InstalledFound loc mod + in return $ InstalledFound loc _otherwise -> searchPathExts import_dirs mod [(package_hisuf, mk_hi_loc)] @@ -547,7 +562,7 @@ searchPathExts paths mod exts = search to_search search ((file, loc) : rest) = do b <- doesFileExist file if b - then return $ InstalledFound loc mod + then return $ InstalledFound loc else search rest mkHomeModLocationSearched :: FinderOpts -> ModuleName -> FileExt @@ -589,10 +604,12 @@ mkHomeModLocationSearched fopts mod suff path basename = -- ext -- The filename extension of the source file (usually "hs" or "lhs"). -mkHomeModLocation :: FinderOpts -> ModuleName -> OsPath -> ModLocation -mkHomeModLocation dflags mod src_filename = - let (basename,extension) = OsPath.splitExtension src_filename - in mkHomeModLocation2 dflags mod basename extension +mkHomeModLocation :: FinderOpts -> ModuleName -> OsPath -> FileExt -> HscSource -> ModLocation +mkHomeModLocation dflags mod src_basename ext hsc_src = + let loc = mkHomeModLocation2 dflags mod src_basename ext + in case hsc_src of + HsBootFile -> addBootSuffixLocnOut loc + _ -> loc mkHomeModLocation2 :: FinderOpts -> ModuleName ===================================== compiler/GHC/Unit/Finder/Types.hs ===================================== @@ -30,9 +30,9 @@ data FinderCache = FinderCache { flushFinderCaches :: UnitEnv -> IO () -- ^ remove all the home modules from the cache; package modules are -- assumed to not move around during a session; also flush the file hash -- cache. - , addToFinderCache :: InstalledModuleWithIsBoot -> InstalledFindResult -> IO () + , addToFinderCache :: InstalledModule -> InstalledFindResult -> IO () -- ^ Add a found location to the cache for the module. - , lookupFinderCache :: InstalledModuleWithIsBoot -> IO (Maybe InstalledFindResult) + , lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult) -- ^ Look for a location in the cache. , lookupFileCache :: FilePath -> IO Fingerprint -- ^ Look for the hash of a file in the cache. This should add it to the @@ -40,7 +40,7 @@ data FinderCache = FinderCache { flushFinderCaches :: UnitEnv -> IO () } data InstalledFindResult - = InstalledFound ModLocation InstalledModule + = InstalledFound ModLocation | InstalledNoPackage UnitId | InstalledNotFound [OsPath] (Maybe UnitId) ===================================== compiler/GHC/Unit/Module/Env.hs ===================================== @@ -33,17 +33,6 @@ module GHC.Unit.Module.Env , mergeInstalledModuleEnv , plusInstalledModuleEnv , installedModuleEnvElts - - -- * InstalledModuleWithIsBootEnv - , InstalledModuleWithIsBootEnv - , emptyInstalledModuleWithIsBootEnv - , lookupInstalledModuleWithIsBootEnv - , extendInstalledModuleWithIsBootEnv - , filterInstalledModuleWithIsBootEnv - , delInstalledModuleWithIsBootEnv - , mergeInstalledModuleWithIsBootEnv - , plusInstalledModuleWithIsBootEnv - , installedModuleWithIsBootEnvElts ) where @@ -294,56 +283,3 @@ plusInstalledModuleEnv :: (elt -> elt -> elt) plusInstalledModuleEnv f (InstalledModuleEnv xm) (InstalledModuleEnv ym) = InstalledModuleEnv $ Map.unionWith f xm ym - - --------------------------------------------------------------------- --- InstalledModuleWithIsBootEnv --------------------------------------------------------------------- - --- | A map keyed off of 'InstalledModuleWithIsBoot' -newtype InstalledModuleWithIsBootEnv elt = InstalledModuleWithIsBootEnv (Map InstalledModuleWithIsBoot elt) - -instance Outputable elt => Outputable (InstalledModuleWithIsBootEnv elt) where - ppr (InstalledModuleWithIsBootEnv env) = ppr env - - -emptyInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -emptyInstalledModuleWithIsBootEnv = InstalledModuleWithIsBootEnv Map.empty - -lookupInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> Maybe a -lookupInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m = Map.lookup m e - -extendInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> a -> InstalledModuleWithIsBootEnv a -extendInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m x = InstalledModuleWithIsBootEnv (Map.insert m x e) - -filterInstalledModuleWithIsBootEnv :: (InstalledModuleWithIsBoot -> a -> Bool) -> InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBootEnv a -filterInstalledModuleWithIsBootEnv f (InstalledModuleWithIsBootEnv e) = - InstalledModuleWithIsBootEnv (Map.filterWithKey f e) - -delInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> InstalledModuleWithIsBootEnv a -delInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m = InstalledModuleWithIsBootEnv (Map.delete m e) - -installedModuleWithIsBootEnvElts :: InstalledModuleWithIsBootEnv a -> [(InstalledModuleWithIsBoot, a)] -installedModuleWithIsBootEnvElts (InstalledModuleWithIsBootEnv e) = Map.assocs e - -mergeInstalledModuleWithIsBootEnv - :: (elta -> eltb -> Maybe eltc) - -> (InstalledModuleWithIsBootEnv elta -> InstalledModuleWithIsBootEnv eltc) -- map X - -> (InstalledModuleWithIsBootEnv eltb -> InstalledModuleWithIsBootEnv eltc) -- map Y - -> InstalledModuleWithIsBootEnv elta - -> InstalledModuleWithIsBootEnv eltb - -> InstalledModuleWithIsBootEnv eltc -mergeInstalledModuleWithIsBootEnv f g h (InstalledModuleWithIsBootEnv xm) (InstalledModuleWithIsBootEnv ym) - = InstalledModuleWithIsBootEnv $ Map.mergeWithKey - (\_ x y -> (x `f` y)) - (coerce g) - (coerce h) - xm ym - -plusInstalledModuleWithIsBootEnv :: (elt -> elt -> elt) - -> InstalledModuleWithIsBootEnv elt - -> InstalledModuleWithIsBootEnv elt - -> InstalledModuleWithIsBootEnv elt -plusInstalledModuleWithIsBootEnv f (InstalledModuleWithIsBootEnv xm) (InstalledModuleWithIsBootEnv ym) = - InstalledModuleWithIsBootEnv $ Map.unionWith f xm ym - ===================================== compiler/GHC/Unit/Module/Location.hs ===================================== @@ -13,8 +13,6 @@ module GHC.Unit.Module.Location ) , pattern ModLocation , addBootSuffix - , addBootSuffix_maybe - , addBootSuffixLocn_maybe , addBootSuffixLocn , addBootSuffixLocnOut , removeBootSuffix @@ -25,7 +23,6 @@ where import GHC.Prelude import GHC.Data.OsPath -import GHC.Unit.Types import GHC.Types.SrcLoc import GHC.Utils.Outputable import GHC.Data.FastString (mkFastString) @@ -99,26 +96,10 @@ removeBootSuffix pathWithBootSuffix = Just path -> path Nothing -> error "removeBootSuffix: no -boot suffix" --- | Add the @-boot@ suffix if the @Bool@ argument is @True@ -addBootSuffix_maybe :: IsBootInterface -> OsPath -> OsPath -addBootSuffix_maybe is_boot path = case is_boot of - IsBoot -> addBootSuffix path - NotBoot -> path - -addBootSuffixLocn_maybe :: IsBootInterface -> ModLocation -> ModLocation -addBootSuffixLocn_maybe is_boot locn = case is_boot of - IsBoot -> addBootSuffixLocn locn - _ -> locn - -- | Add the @-boot@ suffix to all file paths associated with the module addBootSuffixLocn :: ModLocation -> ModLocation addBootSuffixLocn locn - = locn { ml_hs_file_ospath = fmap addBootSuffix (ml_hs_file_ospath locn) - , ml_hi_file_ospath = addBootSuffix (ml_hi_file_ospath locn) - , ml_dyn_hi_file_ospath = addBootSuffix (ml_dyn_hi_file_ospath locn) - , ml_obj_file_ospath = addBootSuffix (ml_obj_file_ospath locn) - , ml_dyn_obj_file_ospath = addBootSuffix (ml_dyn_obj_file_ospath locn) - , ml_hie_file_ospath = addBootSuffix (ml_hie_file_ospath locn) } + = addBootSuffixLocnOut locn { ml_hs_file_ospath = fmap addBootSuffix (ml_hs_file_ospath locn) } -- | Add the @-boot@ suffix to all output file paths associated with the -- module, not including the input file itself ===================================== compiler/GHC/Unit/Module/Warnings.hs ===================================== @@ -1,6 +1,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} @@ -130,7 +131,8 @@ fromWarningCategory wc = InWarningCategory noAnn NoSourceText (noLocA wc) -- See Note [Warning categories] newtype WarningCategory = WarningCategory FastString - deriving (Binary, Data, Eq, Outputable, Show, Uniquable, NFData) + deriving stock Data + deriving newtype (Binary, Eq, Outputable, Show, Uniquable, NFData) mkWarningCategory :: FastString -> WarningCategory mkWarningCategory = WarningCategory ===================================== compiler/GHC/Unit/Types.hs ===================================== @@ -84,8 +84,6 @@ module GHC.Unit.Types , GenWithIsBoot (..) , ModuleNameWithIsBoot , ModuleWithIsBoot - , InstalledModuleWithIsBoot - , notBoot ) where @@ -720,8 +718,6 @@ type ModuleNameWithIsBoot = GenWithIsBoot ModuleName type ModuleWithIsBoot = GenWithIsBoot Module -type InstalledModuleWithIsBoot = GenWithIsBoot InstalledModule - instance Binary a => Binary (GenWithIsBoot a) where put_ bh (GWIB { gwib_mod, gwib_isBoot }) = do put_ bh gwib_mod @@ -735,6 +731,3 @@ instance Outputable a => Outputable (GenWithIsBoot a) where ppr (GWIB { gwib_mod, gwib_isBoot }) = hsep $ ppr gwib_mod : case gwib_isBoot of IsBoot -> [ text "{-# SOURCE #-}" ] NotBoot -> [] - -notBoot :: mod -> GenWithIsBoot mod -notBoot gwib_mod = GWIB {gwib_mod, gwib_isBoot = NotBoot} ===================================== docs/users_guide/diagnostics-as-json-schema-1_1.json ===================================== @@ -0,0 +1,134 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "JSON Diagnostic Schema", + "description": "A Schema for specifying GHC diagnostics output as JSON", + "type": "object", + "properties": { + "version": { + "description": "The current JSON schema version this object conforms to", + "type": "string" + }, + "ghcVersion": { + "description": "The GHC version", + "type": "string" + }, + "span": { + "$ref": "#/$defs/span" + }, + "severity": { + "description": "The diagnostic severity", + "type": "string", + "enum": [ + "Warning", + "Error" + ] + }, + "code": { + "description": "The diagnostic code (if it exists)", + "type": [ + "integer", + "null" + ] + }, + "message": { + "description": "The string output of the diagnostic message by GHC", + "type": "array", + "items": { + "type": "string" + } + }, + "hints": { + "description": "The suggested fixes", + "type": "array", + "items": { + "type": "string" + } + }, + "reason" : { + "description": "The GHC flag that was responsible for the emission of the diagnostic message", + "oneOf": [ + { + "type": "object", + "description": "The diagnostic message was controlled by one or more GHC flags", + "properties": { + "flags": { + "type": "array", + "items": { + "description": "The name of a GHC flag controlling the diagnostic message", + "type": "string" + }, + "minItems": 1 + } + }, + "required": ["flags"] + }, + { + "type": "object", + "description": "The diagnostic message was controlled by a GHC diagnostic message category", + "properties": { + "category": { + "description": "The name of the GHC diagnostic message category controlling the diagnostic message", + "type": "string" + } + }, + "required": ["category"] + } + ] + } + }, + "required": [ + "version", + "ghcVersion", + "span", + "severity", + "code", + "message", + "hints" + ], + "additionalProperties": false, + "$defs": { + "span": { + "description": "The span of the diagnostic", + "type": "object", + "properties": { + "file": { + "description": "The file in which the diagnostic occurs", + "type": "string" + }, + "start": { + "description": "The start location of the diagnostic", + "$ref": "#/$defs/location" + }, + "end": { + "description": "The end location of the diagnostic", + "$ref": "#/$defs/location" + } + }, + "required": [ + "file", + "start", + "end" + ], + "additionalProperties": false + }, + "location": { + "description": "A location in a text file", + "type": "object", + "properties": { + "line": { + "description": "The line number", + "type": "integer" + }, + "column": { + "description": "The column number", + "type": "integer" + } + }, + "required": [ + "line", + "column" + ], + "additionalProperties": false + } + } +} ===================================== docs/users_guide/using.rst ===================================== @@ -1424,7 +1424,7 @@ messages and in GHCi: a new line. The structure of the output is described by a `JSON Schema `_. - The schema can be downloaded :download:`here `. + The schema can be downloaded :download:`here `. .. ghc-flag:: -fdiagnostics-color=⟨always|auto|never⟩ :shortdesc: Use colors in error messages ===================================== rts/IPE.c ===================================== @@ -277,3 +277,20 @@ void decompressIPEBufferListNodeIfCompressed(IpeBufferListNode *node) { } } + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info) { + InfoProvEnt ipe; + if (lookupIPE(info, &ipe)) { + debugBelch("%p:\n", info); + debugBelch(" name: %s\n", ipe.prov.table_name); + debugBelch(" desc: %" PRIu32 "\n", ipe.prov.closure_desc); + debugBelch(" type: %s\n", ipe.prov.ty_desc); + debugBelch(" label: %s\n", ipe.prov.label); + debugBelch(" module: %s:%s\n", ipe.prov.unit_id, ipe.prov.module); + debugBelch(" src loc: %s:%s\n", ipe.prov.src_file, ipe.prov.src_span); + } else { + debugBelch("%p: no IPE entry\n", info); + } +} +#endif ===================================== rts/include/rts/IPE.h ===================================== @@ -97,3 +97,7 @@ void formatClosureDescIpe(const InfoProvEnt *ipe_buf, char *str_buf); // Returns true on success, initializes `out`. bool lookupIPE(const StgInfoTable *info, InfoProvEnt *out); + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info); +#endif ===================================== testsuite/tests/driver/all.T ===================================== @@ -276,7 +276,7 @@ test('T12955', normal, makefile_test, []) test('T12971', [when(opsys('mingw32'), fragile(17945)), ignore_stdout], makefile_test, []) test('json_dump', normal, compile_fail, ['-ddump-json']) test('json', normalise_version('ghc'), compile_fail, ['-fdiagnostics-as-json']) -test('json_warn', normalise_version('ghc'), compile, ['-fdiagnostics-as-json -Wunused-matches']) +test('json_warn', normalise_version('ghc'), compile, ['-fdiagnostics-as-json -Wunused-matches -Wx-partial']) test('json2', normalise_version('ghc-internal', 'base','ghc-prim'), compile, ['-ddump-types -ddump-json -Wno-unsupported-llvm-version']) test('T16167', [normalise_version('ghc'),req_interp,exit_code(1)], run_command, ['{compiler} -x hs -e ":set prog T16167.hs" -ddump-json T16167.hs']) ===================================== testsuite/tests/driver/json.stderr ===================================== @@ -1 +1 @@ -{"version":"1.0","ghcVersion":"ghc-9.11.20240329","span":{"file":"json.hs","start":{"line":9,"column":11},"end":{"line":9,"column":21}},"severity":"Error","code":48010,"message":["Empty list of alternatives in case expression"],"hints":["Perhaps you intended to use the `EmptyCase' extension"]} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json.hs","start":{"line":9,"column":11},"end":{"line":9,"column":21}},"severity":"Error","code":48010,"message":["Empty list of alternatives in case expression"],"hints":["Perhaps you intended to use the `EmptyCase' extension"]} ===================================== testsuite/tests/driver/json_warn.hs ===================================== @@ -2,3 +2,6 @@ module Foo where f :: Int -> Int f x = 5 + +g :: [a] -> a +g = head ===================================== testsuite/tests/driver/json_warn.stderr ===================================== @@ -1 +1,2 @@ -{"version":"1.0","ghcVersion":"ghc-9.9.20230817","span":{"file":"json_warn.hs","start":{"line":4,"column":3},"end":{"line":4,"column":4}},"severity":"Warning","code":40910,"message":["Defined but not used: `x'"],"hints":[]} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json_warn.hs","start":{"line":4,"column":3},"end":{"line":4,"column":4}},"severity":"Warning","code":40910,"message":["Defined but not used: `x'"],"hints":[],"reason":{"flags":["unused-matches"]}} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json_warn.hs","start":{"line":7,"column":5},"end":{"line":7,"column":9}},"severity":"Warning","code":63394,"message":["In the use of `head'\n(imported from Prelude, but defined in GHC.Internal.List):\n\"This is a partial function, it throws an error on empty lists. Use pattern matching, 'Data.List.uncons' or 'Data.Maybe.listToMaybe' instead. Consider refactoring to use \"Data.List.NonEmpty\".\""],"hints":[],"reason":{"category":"x-partial"}} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6c5b5d00cee458e81eab03944ce8ace8cbda1441...0f4079d1290ab81a56897f6cca8eaf1328643e49 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6c5b5d00cee458e81eab03944ce8ace8cbda1441...0f4079d1290ab81a56897f6cca8eaf1328643e49 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 12:03:39 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Tue, 19 Nov 2024 07:03:39 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] 2 commits: rts: Introduce printIPE Message-ID: <673c7e9b84684_1c59c0176c90244ca@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 3787bb1a by Ben Gamari at 2024-11-18T18:16:52+00:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 82f3f8fb by Rodrigo Mesquita at 2024-11-19T12:03:30+00:00 fixup! fixup! fixup! A start on module graphs - - - - - 5 changed files: - compiler/GHC/Data/Graph/Directed.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Unit/Module/Graph.hs - rts/IPE.c - rts/include/rts/IPE.h Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -14,8 +14,8 @@ module GHC.Data.Graph.Directed ( stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachableG', - reachablesG, transposeG, outgoingG, + reachableFromG, reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -30,7 +30,7 @@ module GHC.Data.Graph.Directed ( EdgeType(..), classifyEdges, ReachabilityIndex, reachabilityIndex, emptyGraph, nodeLookupByIx, ixLookupByNode, - reachable + reachableQuery ) where ------------------------------------------------------------------------------ @@ -93,6 +93,8 @@ data Graph node = Graph { gr_vertex_to_node :: Vertex -> node, gr_node_to_vertex :: node -> Maybe Vertex, gr_reachability :: ReachabilityIndex + -- ^ We cache a reachability index to answer reachability queries faster. + -- romes:todo: Is it worth it to cache this for all graphs, or should it be ModuleGraph specific? } data Edge node = Edge node node @@ -360,32 +362,29 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) --- ROMES:TODO: ADD UNIT TESTS(To the properly defined graph interface) --- ROMES:TODO: ADD UNIT TESTS(To the mOduleGraph properly defined graph interface) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) +-- | 'reachableFromG' returns in an /unordered/ list the nodes reachable from the given node. +-- The list of nodes /does not/ include the root node! +-- Because we cache a graph reachability index, this operation is very fast. +reachableFromG :: Graph node -> node -> [node] +reachableFromG graph from = map (gr_vertex_to_node graph) result + where from_vertex = expectJust "reachableFromG" (gr_node_to_vertex graph from) hits = {-# SCC "Digraph.reachable" #-} IM.lookup from_vertex (gr_reachability graph) - result = IS.toList $! IS.insert from_vertex $ expectJust "reachableG2" hits - --- | DoENS't INCLUDE THE ROOT VERTEX -reachableG' :: Graph node -> node -> [node] -reachableG' graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - hits = {-# SCC "Digraph.reachable" #-} IM.lookup from_vertex (gr_reachability graph) - result = IS.toList $! expectJust "reachableG2" hits + result = IS.toList $! expectJust "reachableFromG" hits outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] -reachablesG graph froms = map (gr_vertex_to_node graph) (IS.toList result) +reachablesG graph froms = map (gr_vertex_to_node graph) ({-IS.toList-} result) where result = {-# SCC "Digraph.reachable" #-} - IS.union (IS.fromList vs) $ - IS.unions $ map (expectJust "reachablesG" . flip IM.lookup (gr_reachability graph)) vs + reachable (gr_int_graph graph) vs + -- The following would be more efficient, + -- IS.union (IS.fromList vs) $ + -- IS.unions $ map (expectJust "reachablesG" . flip IM.lookup (gr_reachability graph)) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] hasVertexG :: Graph node -> node -> Bool @@ -440,6 +439,26 @@ graphEmpty g = lo > hi type IntGraph = G.Graph +{- +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ +-} + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +{- +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ +-} + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + reachableGraph :: IntGraph -> IM.IntMap IS.IntSet reachableGraph g = res where @@ -567,7 +586,7 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert graph = G.buildG bounds reduced_edges -------------------------------------------------------------------------------- --- Temporary!!!! +-- Reachability -------------------------------------------------------------------------------- type ReachabilityIndex = IM.IntMap IS.IntSet @@ -583,11 +602,11 @@ ixLookupByNode (Graph _ _ to _) v = to v -- | Reachability query. On graph @g@ and nodes @a@ and @b@, @reachable(g, a, -- b)@ asks whether @b@ can be reached starting from @a at . -reachable :: Graph node -- ^ @g@ +reachableQuery :: Graph node -- ^ @g@ -> node -- ^ @a@ -> node -- ^ @b@ -> Bool -- ^ @b@ is reachable from @a@ -reachable (Graph _ _ to index) a b = IS.member b_i $ expectJust "reachable" $ IM.lookup a_i index +reachableQuery (Graph _ _ to index) a b = IS.member b_i $ expectJust "reachable" $ IM.lookup a_i index where a_i = expectJust "reachable:node not in graph" $ to a b_i = expectJust "reachable:node not in graph" $ to b ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -1500,7 +1500,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:reachableFromG graph root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -410,7 +410,7 @@ mgReachable :: ModuleGraph -> NodeKey -> [ModuleGraphNode] mgReachable mg nk = map summaryNodeSummary modules_below where (td_map, lookup_node) = mg_graph mg modules_below = expectJust "mgReachable" $ - reachableG' td_map <$> lookup_node nk + reachableFromG td_map <$> lookup_node nk -- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in -- graph @g@? @@ -419,7 +419,7 @@ mgQuery :: ModuleGraph -- ^ @g@ -> NodeKey -- ^ @a@ -> NodeKey -- ^ @b@ -> Bool -- ^ @b@ is reachable from @a@ -mgQuery mg nka nkb = reachable td_map na nb where +mgQuery mg nka nkb = reachableQuery td_map na nb where (td_map, lookup_node) = mg_graph mg na = expectJust "mgQuery:a" $ lookup_node nka nb = expectJust "mgQuery:b" $ lookup_node nkb ===================================== rts/IPE.c ===================================== @@ -277,3 +277,20 @@ void decompressIPEBufferListNodeIfCompressed(IpeBufferListNode *node) { } } + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info) { + InfoProvEnt ipe; + if (lookupIPE(info, &ipe)) { + debugBelch("%p:\n", info); + debugBelch(" name: %s\n", ipe.prov.table_name); + debugBelch(" desc: %" PRIu32 "\n", ipe.prov.closure_desc); + debugBelch(" type: %s\n", ipe.prov.ty_desc); + debugBelch(" label: %s\n", ipe.prov.label); + debugBelch(" module: %s:%s\n", ipe.prov.unit_id, ipe.prov.module); + debugBelch(" src loc: %s:%s\n", ipe.prov.src_file, ipe.prov.src_span); + } else { + debugBelch("%p: no IPE entry\n", info); + } +} +#endif ===================================== rts/include/rts/IPE.h ===================================== @@ -97,3 +97,7 @@ void formatClosureDescIpe(const InfoProvEnt *ipe_buf, char *str_buf); // Returns true on success, initializes `out`. bool lookupIPE(const StgInfoTable *info, InfoProvEnt *out); + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info); +#endif View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3476ec0cd8ec85693ff241daaf467b6972510201...82f3f8fb852abdbbed7dca82ec4fcd81586f2cb5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3476ec0cd8ec85693ff241daaf467b6972510201...82f3f8fb852abdbbed7dca82ec4fcd81586f2cb5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 12:08:56 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Tue, 19 Nov 2024 07:08:56 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] MP fixes Message-ID: <673c7fd8793f7_1c59c02fd4ec2616b@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 6aed1559 by Matthew Pickering at 2024-11-19T12:08:25+00:00 MP fixes - - - - - 3 changed files: - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs Changes: ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -626,7 +626,7 @@ createBuildPlan mod_graph maybe_top_mod = nodeKeyUnitId nk == uid -- Cheap test && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ Set.fromList $ - mgReachable mod_graph (NodeKey_Module (key NotBoot)) + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -164,18 +164,17 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found [] = found make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts - - | mgMember mod_graph (NodeKey_Module nk) - , let (ModNodeKeyWithUid _ uid) = nk - = make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts - - | otherwise - , let trans_deps = mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) - deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] - = make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) + | otherwise = + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> + let (ModNodeKeyWithUid _ uid) = nk + in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -24,7 +24,6 @@ module GHC.Unit.Module.Graph , moduleGraphModulesBelow , mgReachable , mgQuery - , mgMember , moduleGraphNodes , SummaryNode @@ -74,6 +73,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -389,7 +389,7 @@ type ModNodeKey = ModuleNameWithIsBoot moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - modules_below = mkNodeKey <$> mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid)) + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -406,10 +406,10 @@ moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- mo | otherwise -> r1 : filter_mods (r2:rs) rs -> rs -mgReachable :: ModuleGraph -> NodeKey -> [ModuleGraphNode] -mgReachable mg nk = map summaryNodeSummary modules_below where +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where (td_map, lookup_node) = mg_graph mg - modules_below = expectJust "mgReachable" $ + modules_below = reachableFromG td_map <$> lookup_node nk -- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in @@ -424,10 +424,3 @@ mgQuery mg nka nkb = reachableQuery td_map na nb where na = expectJust "mgQuery:a" $ lookup_node nka nb = expectJust "mgQuery:b" $ lookup_node nkb --- | Is @k@ in @g@? -mgMember :: ModuleGraph -- ^ @g@ - -> NodeKey -- ^ @k@ - -> Bool -mgMember mg nk = isJust $ ixLookupByNode td_map =<< k where - (td_map, lookup_node) = mg_graph mg - k = lookup_node nk View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6aed1559246007bb8c2049b790b2a8613e08e8c6 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6aed1559246007bb8c2049b790b2a8613e08e8c6 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 12:39:13 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Tue, 19 Nov 2024 07:39:13 -0500 Subject: [Git][ghc/ghc][wip/andreask/bound_cmm_folding] 3 commits: Include diagnostic reason in -fdiagnostics-as-json Message-ID: <673c86f1c4e1d_31b1eed1fec2789a@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/bound_cmm_folding at Glasgow Haskell Compiler / GHC Commits: 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 81468057 by Andreas Klebinger at 2024-11-19T13:18:46+01:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - 13 changed files: - compiler/GHC/Cmm/Opt.hs - compiler/GHC/Types/Error.hs - compiler/GHC/Unit/Module/Warnings.hs - + docs/users_guide/diagnostics-as-json-schema-1_1.json - docs/users_guide/using.rst - rts/IPE.c - rts/include/rts/IPE.h - + testsuite/tests/cmm/opt/T24556.cmm - testsuite/tests/cmm/opt/all.T - testsuite/tests/driver/all.T - testsuite/tests/driver/json.stderr - testsuite/tests/driver/json_warn.hs - testsuite/tests/driver/json_warn.stderr Changes: ===================================== compiler/GHC/Cmm/Opt.hs ===================================== @@ -49,6 +49,7 @@ constantFoldExprOpt e = wrapRecExpOpt f e CmmMachOp op' args' -> fromMaybe (CmmMachOp op' args') <$> cmmMachOpFoldOptM cfg op' args' e -> pure e f (CmmRegOff r 0) = pure (CmmReg r) + f (CmmLit (CmmInt x rep)) = pure (CmmLit $ CmmInt (narrowU rep x) rep) f e = pure e constantFoldExpr :: Platform -> CmmExpr -> CmmExpr @@ -88,7 +89,7 @@ cmmMachOpFoldM _ (MO_VF_Broadcast lg _w) exprs = _ -> Nothing cmmMachOpFoldM _ op [CmmLit (CmmInt x rep)] = Just $! case op of - MO_S_Neg _ -> CmmLit (CmmInt (-x) rep) + MO_S_Neg _ -> CmmLit (CmmInt (narrowS rep (-x)) rep) MO_Not _ -> CmmLit (CmmInt (complement x) rep) -- these are interesting: we must first narrow to the @@ -164,9 +165,9 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_S_Lt _ -> Just $! CmmLit (CmmInt (if x_s < y_s then 1 else 0) (wordWidth platform)) MO_S_Le _ -> Just $! CmmLit (CmmInt (if x_s <= y_s then 1 else 0) (wordWidth platform)) - MO_Add r -> Just $! CmmLit (CmmInt (x + y) r) - MO_Sub r -> Just $! CmmLit (CmmInt (x - y) r) - MO_Mul r -> Just $! CmmLit (CmmInt (x * y) r) + MO_Add r -> Just $! CmmLit (CmmInt (narrowU r $ x + y) r) + MO_Sub r -> Just $! CmmLit (CmmInt (narrowS r $ x - y) r) + MO_Mul r -> Just $! CmmLit (CmmInt (narrowU r $ x * y) r) MO_U_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `quot` y_u) r) MO_U_Rem r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `rem` y_u) r) MO_S_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_s `quot` y_s) r) @@ -176,7 +177,7 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_Or r -> Just $! CmmLit (CmmInt (x .|. y) r) MO_Xor r -> Just $! CmmLit (CmmInt (x `xor` y) r) - MO_Shl r -> Just $! CmmLit (CmmInt (x `shiftL` fromIntegral y) r) + MO_Shl r -> Just $! CmmLit (CmmInt (narrowU r $ x `shiftL` fromIntegral y) r) MO_U_Shr r -> Just $! CmmLit (CmmInt (x_u `shiftR` fromIntegral y) r) MO_S_Shr r -> Just $! CmmLit (CmmInt (x_s `shiftR` fromIntegral y) r) ===================================== compiler/GHC/Types/Error.hs ===================================== @@ -100,19 +100,23 @@ import GHC.Types.SrcLoc as SrcLoc import GHC.Types.Hint import GHC.Data.FastString (unpackFS) import GHC.Data.StringBuffer (atLine, hGetStringBuffer, len, lexemeToString) + +import GHC.Types.Hint.Ppr () -- Outputable instance +import GHC.Unit.Module.Warnings (WarningCategory(..)) + import GHC.Utils.Json import GHC.Utils.Panic -import GHC.Unit.Module.Warnings (WarningCategory) + +import GHC.Version (cProjectVersion) import Data.Bifunctor import Data.Foldable ( fold, toList ) import Data.List.NonEmpty ( NonEmpty (..) ) import qualified Data.List.NonEmpty as NE import Data.List ( intercalate ) +import Data.Maybe ( maybeToList ) import Data.Typeable ( Typeable ) import Numeric.Natural ( Natural ) import Text.Printf ( printf ) -import GHC.Version (cProjectVersion) -import GHC.Types.Hint.Ppr () -- Outputtable instance {- Note [Messages] ~~~~~~~~~~~~~~~~~~ @@ -393,10 +397,8 @@ newtype ResolvedDiagnosticReason pattern WarningWithFlag :: WarningFlag -> DiagnosticReason pattern WarningWithFlag w = WarningWithFlags (w :| []) -{- -Note [Warnings controlled by multiple flags] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - +{- Note [Warnings controlled by multiple flags] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Diagnostics that started life as flag-controlled warnings have a 'diagnosticReason' of 'WarningWithFlags', giving the flags that control the warning. Usually there is only one flag, but in a few cases multiple flags @@ -563,11 +565,11 @@ instance ToJson DiagnosticCode where {- Note [Diagnostic Message JSON Schema] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The below instance of ToJson must conform to the JSON schema -specified in docs/users_guide/diagnostics-as-json-schema-1_0.json. +specified in docs/users_guide/diagnostics-as-json-schema-1_1.json. When the schema is altered, please bump the version. If the content is altered in a backwards compatible way, update the minor version (e.g. 1.3 ~> 1.4). -If the content is breaking, update the major version (e.g. 1.3 ~> 2.3). +If the content is breaking, update the major version (e.g. 1.3 ~> 2.0). When updating the schema, replace the above file and name it appropriately with the version appended, and change the documentation of the -fdiagnostics-as-json flag to reflect the new schema. @@ -576,25 +578,41 @@ https://json-schema.org -} schemaVersion :: String -schemaVersion = "1.0" +schemaVersion = "1.1" -- See Note [Diagnostic Message JSON Schema] before editing! instance Diagnostic e => ToJson (MsgEnvelope e) where - json m = JSObject [ + json m = JSObject $ [ ("version", JSString schemaVersion), ("ghcVersion", JSString $ "ghc-" ++ cProjectVersion), ("span", json $ errMsgSpan m), ("severity", json $ errMsgSeverity m), ("code", maybe JSNull json (diagnosticCode diag)), ("message", JSArray $ map renderToJSString diagMsg), - ("hints", JSArray $ map (renderToJSString . ppr) (diagnosticHints diag) ) - ] - where diag = errMsgDiagnostic m - opts = defaultDiagnosticOpts @e - style = mkErrStyle (errMsgContext m) - ctx = defaultSDocContext {sdocStyle = style } - diagMsg = filter (not . isEmpty ctx) (unDecorated (diagnosticMessage (opts) diag)) - renderToJSString :: SDoc -> JsonDoc - renderToJSString = JSString . (renderWithContext ctx) + ("hints", JSArray $ map (renderToJSString . ppr) (diagnosticHints diag) ) ] + ++ [ ("reason", reasonJson) + | reasonJson <- maybeToList $ usefulReasonJson_maybe (errMsgReason m) ] + where + diag = errMsgDiagnostic m + opts = defaultDiagnosticOpts @e + style = mkErrStyle (errMsgContext m) + ctx = defaultSDocContext {sdocStyle = style } + diagMsg = filter (not . isEmpty ctx) (unDecorated (diagnosticMessage (opts) diag)) + renderToJSString :: SDoc -> JsonDoc + renderToJSString = JSString . (renderWithContext ctx) + + usefulReasonJson_maybe :: ResolvedDiagnosticReason -> Maybe JsonDoc + usefulReasonJson_maybe (ResolvedDiagnosticReason rea) = + case rea of + WarningWithoutFlag -> Nothing + ErrorWithoutFlag -> Nothing + WarningWithFlags flags -> + Just $ JSObject + [ ("flags", JSArray $ map (JSString . NE.head . warnFlagNames) (NE.toList flags)) + ] + WarningWithCategory (WarningCategory cat) -> + Just $ JSObject + [ ("category", JSString $ unpackFS cat) + ] instance Show (MsgEnvelope DiagnosticMessage) where show = showMsgEnvelope ===================================== compiler/GHC/Unit/Module/Warnings.hs ===================================== @@ -1,6 +1,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} @@ -130,7 +131,8 @@ fromWarningCategory wc = InWarningCategory noAnn NoSourceText (noLocA wc) -- See Note [Warning categories] newtype WarningCategory = WarningCategory FastString - deriving (Binary, Data, Eq, Outputable, Show, Uniquable, NFData) + deriving stock Data + deriving newtype (Binary, Eq, Outputable, Show, Uniquable, NFData) mkWarningCategory :: FastString -> WarningCategory mkWarningCategory = WarningCategory ===================================== docs/users_guide/diagnostics-as-json-schema-1_1.json ===================================== @@ -0,0 +1,134 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "JSON Diagnostic Schema", + "description": "A Schema for specifying GHC diagnostics output as JSON", + "type": "object", + "properties": { + "version": { + "description": "The current JSON schema version this object conforms to", + "type": "string" + }, + "ghcVersion": { + "description": "The GHC version", + "type": "string" + }, + "span": { + "$ref": "#/$defs/span" + }, + "severity": { + "description": "The diagnostic severity", + "type": "string", + "enum": [ + "Warning", + "Error" + ] + }, + "code": { + "description": "The diagnostic code (if it exists)", + "type": [ + "integer", + "null" + ] + }, + "message": { + "description": "The string output of the diagnostic message by GHC", + "type": "array", + "items": { + "type": "string" + } + }, + "hints": { + "description": "The suggested fixes", + "type": "array", + "items": { + "type": "string" + } + }, + "reason" : { + "description": "The GHC flag that was responsible for the emission of the diagnostic message", + "oneOf": [ + { + "type": "object", + "description": "The diagnostic message was controlled by one or more GHC flags", + "properties": { + "flags": { + "type": "array", + "items": { + "description": "The name of a GHC flag controlling the diagnostic message", + "type": "string" + }, + "minItems": 1 + } + }, + "required": ["flags"] + }, + { + "type": "object", + "description": "The diagnostic message was controlled by a GHC diagnostic message category", + "properties": { + "category": { + "description": "The name of the GHC diagnostic message category controlling the diagnostic message", + "type": "string" + } + }, + "required": ["category"] + } + ] + } + }, + "required": [ + "version", + "ghcVersion", + "span", + "severity", + "code", + "message", + "hints" + ], + "additionalProperties": false, + "$defs": { + "span": { + "description": "The span of the diagnostic", + "type": "object", + "properties": { + "file": { + "description": "The file in which the diagnostic occurs", + "type": "string" + }, + "start": { + "description": "The start location of the diagnostic", + "$ref": "#/$defs/location" + }, + "end": { + "description": "The end location of the diagnostic", + "$ref": "#/$defs/location" + } + }, + "required": [ + "file", + "start", + "end" + ], + "additionalProperties": false + }, + "location": { + "description": "A location in a text file", + "type": "object", + "properties": { + "line": { + "description": "The line number", + "type": "integer" + }, + "column": { + "description": "The column number", + "type": "integer" + } + }, + "required": [ + "line", + "column" + ], + "additionalProperties": false + } + } +} ===================================== docs/users_guide/using.rst ===================================== @@ -1424,7 +1424,7 @@ messages and in GHCi: a new line. The structure of the output is described by a `JSON Schema `_. - The schema can be downloaded :download:`here `. + The schema can be downloaded :download:`here `. .. ghc-flag:: -fdiagnostics-color=⟨always|auto|never⟩ :shortdesc: Use colors in error messages ===================================== rts/IPE.c ===================================== @@ -277,3 +277,20 @@ void decompressIPEBufferListNodeIfCompressed(IpeBufferListNode *node) { } } + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info) { + InfoProvEnt ipe; + if (lookupIPE(info, &ipe)) { + debugBelch("%p:\n", info); + debugBelch(" name: %s\n", ipe.prov.table_name); + debugBelch(" desc: %" PRIu32 "\n", ipe.prov.closure_desc); + debugBelch(" type: %s\n", ipe.prov.ty_desc); + debugBelch(" label: %s\n", ipe.prov.label); + debugBelch(" module: %s:%s\n", ipe.prov.unit_id, ipe.prov.module); + debugBelch(" src loc: %s:%s\n", ipe.prov.src_file, ipe.prov.src_span); + } else { + debugBelch("%p: no IPE entry\n", info); + } +} +#endif ===================================== rts/include/rts/IPE.h ===================================== @@ -97,3 +97,7 @@ void formatClosureDescIpe(const InfoProvEnt *ipe_buf, char *str_buf); // Returns true on success, initializes `out`. bool lookupIPE(const StgInfoTable *info, InfoProvEnt *out); + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info); +#endif ===================================== testsuite/tests/cmm/opt/T24556.cmm ===================================== @@ -0,0 +1,12 @@ +#include "Cmm.h" + +func(W_ buffer) { + I8[buffer] = %lobits8(255 + 45); + I8[buffer+(1)] = %lobits8(310 - 10); + I8[buffer+(2)] = %lobits8(30 * 10); + I8[buffer+(3)] = %lobits8(150 << 1); + // This one comes from test-primops + I64[buffer+(4)] = %zx64(((1 :: bits16) & ((1 :: bits16) & (((516 :: bits16) * (154 :: bits16)) + bits16[buffer + (0 :: bits64)])))); + return(1); +} + ===================================== testsuite/tests/cmm/opt/all.T ===================================== @@ -3,3 +3,8 @@ test('T15188', cmm_src, makefile_test, []) test('T18141', normal, compile, ['']) test('T20142', normal, compile, ['']) + +# Cmm opt should not produce oversized literals in the assembly output. +# We check this by telling the assembler to exit on warnings. +test('T24556', [only_ways('optasm'), cmm_src], compile, ['-O -opta -Xassembler -opta --fatal-warnings']) + ===================================== testsuite/tests/driver/all.T ===================================== @@ -276,7 +276,7 @@ test('T12955', normal, makefile_test, []) test('T12971', [when(opsys('mingw32'), fragile(17945)), ignore_stdout], makefile_test, []) test('json_dump', normal, compile_fail, ['-ddump-json']) test('json', normalise_version('ghc'), compile_fail, ['-fdiagnostics-as-json']) -test('json_warn', normalise_version('ghc'), compile, ['-fdiagnostics-as-json -Wunused-matches']) +test('json_warn', normalise_version('ghc'), compile, ['-fdiagnostics-as-json -Wunused-matches -Wx-partial']) test('json2', normalise_version('ghc-internal', 'base','ghc-prim'), compile, ['-ddump-types -ddump-json -Wno-unsupported-llvm-version']) test('T16167', [normalise_version('ghc'),req_interp,exit_code(1)], run_command, ['{compiler} -x hs -e ":set prog T16167.hs" -ddump-json T16167.hs']) ===================================== testsuite/tests/driver/json.stderr ===================================== @@ -1 +1 @@ -{"version":"1.0","ghcVersion":"ghc-9.11.20240329","span":{"file":"json.hs","start":{"line":9,"column":11},"end":{"line":9,"column":21}},"severity":"Error","code":48010,"message":["Empty list of alternatives in case expression"],"hints":["Perhaps you intended to use the `EmptyCase' extension"]} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json.hs","start":{"line":9,"column":11},"end":{"line":9,"column":21}},"severity":"Error","code":48010,"message":["Empty list of alternatives in case expression"],"hints":["Perhaps you intended to use the `EmptyCase' extension"]} ===================================== testsuite/tests/driver/json_warn.hs ===================================== @@ -2,3 +2,6 @@ module Foo where f :: Int -> Int f x = 5 + +g :: [a] -> a +g = head ===================================== testsuite/tests/driver/json_warn.stderr ===================================== @@ -1 +1,2 @@ -{"version":"1.0","ghcVersion":"ghc-9.9.20230817","span":{"file":"json_warn.hs","start":{"line":4,"column":3},"end":{"line":4,"column":4}},"severity":"Warning","code":40910,"message":["Defined but not used: `x'"],"hints":[]} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json_warn.hs","start":{"line":4,"column":3},"end":{"line":4,"column":4}},"severity":"Warning","code":40910,"message":["Defined but not used: `x'"],"hints":[],"reason":{"flags":["unused-matches"]}} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json_warn.hs","start":{"line":7,"column":5},"end":{"line":7,"column":9}},"severity":"Warning","code":63394,"message":["In the use of `head'\n(imported from Prelude, but defined in GHC.Internal.List):\n\"This is a partial function, it throws an error on empty lists. Use pattern matching, 'Data.List.uncons' or 'Data.Maybe.listToMaybe' instead. Consider refactoring to use \"Data.List.NonEmpty\".\""],"hints":[],"reason":{"category":"x-partial"}} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0650956237454b4f3beea67145d71cdea977ff1c...81468057c2cc66d1159669ad7da0b371799d641e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0650956237454b4f3beea67145d71cdea977ff1c...81468057c2cc66d1159669ad7da0b371799d641e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 12:42:50 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 19 Nov 2024 07:42:50 -0500 Subject: [Git][ghc/ghc][wip/freebsd] testsuite: Mark linker_unload as broken on FreeeBSD Message-ID: <673c87ca1f94e_31b1ee2b221c29871@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: 9a07d830 by Ben Gamari at 2024-11-19T07:42:28-05:00 testsuite: Mark linker_unload as broken on FreeeBSD Due to #25491. - - - - - 1 changed file: - testsuite/tests/rts/linker/all.T Changes: ===================================== testsuite/tests/rts/linker/all.T ===================================== @@ -108,6 +108,7 @@ test('T5435_dyn_gcc', ###################################### test('linker_unload', [extra_files(['LinkerUnload.hs', 'Test.hs']), + when(opsys('freebsd'), expect_broken(25491)), req_rts_linker], makefile_test, ['linker_unload']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9a07d8307dfc0b0ada9bf58f5dc7db1b68836407 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9a07d8307dfc0b0ada9bf58f5dc7db1b68836407 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 13:42:37 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Tue, 19 Nov 2024 08:42:37 -0500 Subject: [Git][ghc/ghc][wip/romes/9557] 6 commits: Include diagnostic reason in -fdiagnostics-as-json Message-ID: <673c95cda4d8d_31b1ee7a4ef042476@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC Commits: 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 909b9295 by Rodrigo Mesquita at 2024-11-19T13:42:19+00:00 Improve performance of deriving Show Significantly improves performance of deriving Show instances by avoiding using the very polymorphic `.` operator in favour of inlining its definition. We were generating tons of applications of it, each which had 3 type arguments! Improves on #9557 ------------------------- Metric Decrease: InstanceMatching T12707 T3294 ------------------------ - - - - - 89d624c4 by Rodrigo Mesquita at 2024-11-19T13:42:23+00:00 Deriving Ord: compare and <= only Since the implementation of CLC proposal #24, the default implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`. This means we no longer need to generate implementations for these methods when stock deriving `Ord`. Rather, just derive the implementation of `compare` and `<=`, and rely on the default implementations for the others. - - - - - 80ef15e3 by Rodrigo Mesquita at 2024-11-19T13:42:23+00:00 Don't eta expand cons when deriving Data This eta expansion was introduced with the initial commit for Linear types. I believe this isn't needed any longer. My guess is it is an artifact from the initial linear types implementation: data constructors are linear, but they shouldn't need to be eta expanded to be used as higher order functions. I suppose in the early days this wasn't true. For instance, this works now: data T x = T x f = \(x :: forall y. y -> T y) -> x True f T -- ok! T is linear, but can be passed where an unrestricted higher order function is expected. I recall there being some magic around to make this work for data constructors... Since this works, there's no need to eta_expand the data constructors in the derived Data instances. - - - - - df5e4f90 by Rodrigo Mesquita at 2024-11-19T13:42:23+00:00 deriving Traversable: Eta reduce more constructor We were generating unnecessarily eta-expanded lambdas in derived Traversable instances (via mkSimpleConMatch2). We can generate smaller code by eta-reducing all trailing arguments which do mention the last type variable - - - - - 19 changed files: - compiler/GHC/Hs/Utils.hs - compiler/GHC/Tc/Deriv/Functor.hs - compiler/GHC/Tc/Deriv/Generate.hs - compiler/GHC/Types/Error.hs - compiler/GHC/Unit/Module/Warnings.hs - + docs/users_guide/diagnostics-as-json-schema-1_1.json - docs/users_guide/using.rst - rts/IPE.c - rts/include/rts/IPE.h - testsuite/tests/deriving/should_compile/T14682.stderr - testsuite/tests/deriving/should_compile/T20496.stderr - testsuite/tests/deriving/should_run/T9576.stderr - testsuite/tests/driver/all.T - testsuite/tests/driver/json.stderr - testsuite/tests/driver/json_warn.hs - testsuite/tests/driver/json_warn.stderr - testsuite/tests/typecheck/should_fail/T15883c.stderr - testsuite/tests/typecheck/should_fail/T15883d.stderr - testsuite/tests/typecheck/should_fail/T15883e.stderr Changes: ===================================== compiler/GHC/Hs/Utils.hs ===================================== @@ -56,7 +56,7 @@ module GHC.Hs.Utils( nlHsTyApp, nlHsTyApps, nlHsVar, nlHsDataCon, nlHsLit, nlHsApp, nlHsApps, nlHsSyntaxApps, nlHsIntLit, nlHsVarApps, - nlHsDo, nlHsOpApp, nlHsPar, nlHsIf, nlHsCase, nlList, + nlHsDo, nlHsOpApp, nlHsLam, nlHsPar, nlHsIf, nlHsCase, nlList, mkLHsTupleExpr, mkLHsVarTuple, missingTupArg, mkLocatedList, nlAscribe, @@ -598,11 +598,15 @@ nlHsDo ctxt stmts = noLocA (mkHsDo ctxt (noLocA stmts)) nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs nlHsOpApp e1 op e2 = noLocA (mkHsOpApp e1 op e2) +nlHsLam :: LMatch GhcPs (LHsExpr GhcPs) -> LHsExpr GhcPs nlHsPar :: IsPass p => LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) nlHsCase :: LHsExpr GhcPs -> [LMatch GhcPs (LHsExpr GhcPs)] -> LHsExpr GhcPs nlList :: [LHsExpr GhcPs] -> LHsExpr GhcPs +nlHsLam match = noLocA $ HsLam noAnn LamSingle + $ mkMatchGroup (Generated OtherExpansion SkipPmc) (noLocA [match]) + nlHsPar e = noLocA (gHsPar e) -- nlHsIf should generate if-expressions which are NOT subject to ===================================== compiler/GHC/Tc/Deriv/Functor.hs ===================================== @@ -689,9 +689,18 @@ mkSimpleConMatch2 ctxt fold extra_pats con insides = do con_expr | null asWithTyVar = nlHsApps con_name asWithoutTyVar | otherwise = - let bs = filterByList argTysTyVarInfo bs_RDRs - vars = filterByLists argTysTyVarInfo bs_Vars as_Vars - in mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) + let -- All trailing b-args can be eta-reduced: + -- (\b1 b2 b3 -> A b1 a2 b2 b3) ==> (\b1 -> A b1 a2) + -- This improves the number of allocations needed to compile + -- the generated code (it is not relevant for correctness) + -- We do this by counting the n of args to keep + keep_n = length $ dropWhileEndLE (== True) argTysTyVarInfo + bs = filterByList (take keep_n argTysTyVarInfo) bs_RDRs + vars = take keep_n $ + filterByLists argTysTyVarInfo bs_Vars as_Vars + in if keep_n == 0 + then nlHsVar con_name + else mkHsLam (noLocA (map nlVarPat bs)) (nlHsApps con_name vars) rhs <- fold con_expr exps return $ mkMatch ctxt (noLocA (extra_pats ++ [pat])) rhs emptyLocalBinds ===================================== compiler/GHC/Tc/Deriv/Generate.hs ===================================== @@ -339,7 +339,7 @@ Several special cases: See function unliftedOrdOp Note [Game plan for deriving Ord] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's a bad idea to define only 'compare', and build the other binary comparisons on top of it; see #2130, #4019. Reason: we don't want to laboriously make a three-way comparison, only to extract a @@ -350,16 +350,22 @@ binary result, something like this: True -> False False -> True -This being said, we can get away with generating full code only for -'compare' and '<' thus saving us generation of other three operators. -Other operators can be cheaply expressed through '<': -a <= b = not $ b < a -a > b = b < a -a >= b = not $ a < b - So for sufficiently small types (few constructors, or all nullary) we generate all methods; for large ones we just use 'compare'. +This being said, we can get away with generating full code only for +'compare' and '<=' thus saving us generation of other three operators. +Other operators can be cheaply expressed through '<=' -- indeed, that's what +the default implementations of >, <, and >= do. + +Historically, derived instances defined '<' and the remaining operators as +cheap expressions in function of it: + a <= b = not $ b < a + a > b = b < a + a >= b = not $ a < b +but since the CLC proposal #24 (see 8f174e06185143674d6cbfee75c30e68805d85b8), +it suffices to derive '<=' and rely on the +default implementation for the others. -} data OrdOp = OrdCompare | OrdLT | OrdLE | OrdGE | OrdGT @@ -417,19 +423,10 @@ gen_Ord_binds loc dit@(DerivInstTys{ dit_rep_tc = tycon other_ops | (last_tag - first_tag) <= 2 -- 1-3 constructors || null non_nullary_cons -- Or it's an enumeration - = [mkOrdOp OrdLT, lE, gT, gE] + = [mkOrdOp OrdLE] | otherwise = [] - negate_expr = nlHsApp (nlHsVar not_RDR) - pats = noLocA [a_Pat, b_Pat] - lE = mkSimpleGeneratedFunBind loc le_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr) - gT = mkSimpleGeneratedFunBind loc gt_RDR pats $ - nlHsApp (nlHsApp (nlHsVar lt_RDR) b_Expr) a_Expr - gE = mkSimpleGeneratedFunBind loc ge_RDR pats $ - negate_expr (nlHsApp (nlHsApp (nlHsVar lt_RDR) a_Expr) b_Expr) - get_tag con = dataConTag con - fIRST_TAG -- We want *zero-based* tags, because that's what -- con2Tag returns (generated by untag_Expr)! @@ -1407,7 +1404,7 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gfoldl_eqn con = ([nlVarPat k_RDR, z_Pat, nlConVarPat con_name as_needed], - foldl' mk_k_app (z_Expr `nlHsApp` (eta_expand_data_con con)) as_needed) + foldl' mk_k_app (z_Expr `nlHsApp` (nlHsVar (getRdrName con))) as_needed) where con_name :: RdrName con_name = getRdrName con @@ -1427,18 +1424,9 @@ gen_Data_binds loc (DerivInstTys{dit_rep_tc = rep_tc}) gunfold_alt dc = mkHsCaseAlt (mk_unfold_pat dc) (mk_unfold_rhs dc) mk_unfold_rhs dc = foldr nlHsApp - (z_Expr `nlHsApp` (eta_expand_data_con dc)) + (z_Expr `nlHsApp` (nlHsVar (getRdrName dc))) (replicate (dataConSourceArity dc) (nlHsVar k_RDR)) - eta_expand_data_con dc = - mkHsLam (noLocA eta_expand_pats) - (foldl nlHsApp (nlHsVar (getRdrName dc)) eta_expand_hsvars) - where - eta_expand_pats = map nlVarPat eta_expand_vars - eta_expand_hsvars = map nlHsVar eta_expand_vars - eta_expand_vars = take (dataConSourceArity dc) as_RDRs - - mk_unfold_pat dc -- Last one is a wild-pat, to avoid -- redundant test, and annoying warning | tag-fIRST_TAG == n_cons-1 = nlWildPat -- Last constructor @@ -2528,21 +2516,21 @@ showParen_Expr showParen_Expr e1 e2 = nlHsApp (nlHsApp (nlHsVar showParen_RDR) e1) e2 nested_compose_Expr :: [LHsExpr GhcPs] -> LHsExpr GhcPs - -nested_compose_Expr [] = panic "nested_compose_expr" -- Arg is always non-empty -nested_compose_Expr [e] = parenify e -nested_compose_Expr (e:es) - = nlHsApp (nlHsApp (nlHsVar compose_RDR) (parenify e)) (nested_compose_Expr es) +nested_compose_Expr = + nlHsLam . mkSimpleMatch (LamAlt LamSingle) (noLocA [z_Pat]) . go + where + -- Previously we used (`.`), but inlining its definition improves compiler + -- performance significantly since we no longer need to typecheck lots of + -- (.) applications (each which needed three type applications, all @String) + go [] = panic "nested_compose_expr" -- Arg is always non-empty + go [e] = nlHsApp e z_Expr + go (e:es) = nlHsApp e (go es) -- impossible_Expr is used in case RHSs that should never happen. -- We generate these to keep the desugarer from complaining that they *might* happen! error_Expr :: FastString -> LHsExpr GhcPs error_Expr string = nlHsApp (nlHsVar error_RDR) (nlHsLit (mkHsStringFS string)) -parenify :: LHsExpr GhcPs -> LHsExpr GhcPs -parenify e@(L _ (HsVar _ _)) = e -parenify e = mkHsPar e - -- genOpApp wraps brackets round the operator application, so that the -- renamer won't subsequently try to re-associate it. genOpApp :: LHsExpr GhcPs -> RdrName -> LHsExpr GhcPs -> LHsExpr GhcPs @@ -2570,10 +2558,9 @@ as_RDRs = [ mkVarUnqual (mkFastString ("a"++show i)) | i <- [(1::Int) .. bs_RDRs = [ mkVarUnqual (mkFastString ("b"++show i)) | i <- [(1::Int) .. ] ] cs_RDRs = [ mkVarUnqual (mkFastString ("c"++show i)) | i <- [(1::Int) .. ] ] -a_Expr, b_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, +a_Expr, c_Expr, z_Expr, ltTag_Expr, eqTag_Expr, gtTag_Expr, false_Expr, true_Expr, pure_Expr, unsafeCodeCoerce_Expr :: LHsExpr GhcPs a_Expr = nlHsVar a_RDR -b_Expr = nlHsVar b_RDR c_Expr = nlHsVar c_RDR z_Expr = nlHsVar z_RDR ltTag_Expr = nlHsVar ltTag_RDR ===================================== compiler/GHC/Types/Error.hs ===================================== @@ -100,19 +100,23 @@ import GHC.Types.SrcLoc as SrcLoc import GHC.Types.Hint import GHC.Data.FastString (unpackFS) import GHC.Data.StringBuffer (atLine, hGetStringBuffer, len, lexemeToString) + +import GHC.Types.Hint.Ppr () -- Outputable instance +import GHC.Unit.Module.Warnings (WarningCategory(..)) + import GHC.Utils.Json import GHC.Utils.Panic -import GHC.Unit.Module.Warnings (WarningCategory) + +import GHC.Version (cProjectVersion) import Data.Bifunctor import Data.Foldable ( fold, toList ) import Data.List.NonEmpty ( NonEmpty (..) ) import qualified Data.List.NonEmpty as NE import Data.List ( intercalate ) +import Data.Maybe ( maybeToList ) import Data.Typeable ( Typeable ) import Numeric.Natural ( Natural ) import Text.Printf ( printf ) -import GHC.Version (cProjectVersion) -import GHC.Types.Hint.Ppr () -- Outputtable instance {- Note [Messages] ~~~~~~~~~~~~~~~~~~ @@ -393,10 +397,8 @@ newtype ResolvedDiagnosticReason pattern WarningWithFlag :: WarningFlag -> DiagnosticReason pattern WarningWithFlag w = WarningWithFlags (w :| []) -{- -Note [Warnings controlled by multiple flags] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - +{- Note [Warnings controlled by multiple flags] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Diagnostics that started life as flag-controlled warnings have a 'diagnosticReason' of 'WarningWithFlags', giving the flags that control the warning. Usually there is only one flag, but in a few cases multiple flags @@ -563,11 +565,11 @@ instance ToJson DiagnosticCode where {- Note [Diagnostic Message JSON Schema] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The below instance of ToJson must conform to the JSON schema -specified in docs/users_guide/diagnostics-as-json-schema-1_0.json. +specified in docs/users_guide/diagnostics-as-json-schema-1_1.json. When the schema is altered, please bump the version. If the content is altered in a backwards compatible way, update the minor version (e.g. 1.3 ~> 1.4). -If the content is breaking, update the major version (e.g. 1.3 ~> 2.3). +If the content is breaking, update the major version (e.g. 1.3 ~> 2.0). When updating the schema, replace the above file and name it appropriately with the version appended, and change the documentation of the -fdiagnostics-as-json flag to reflect the new schema. @@ -576,25 +578,41 @@ https://json-schema.org -} schemaVersion :: String -schemaVersion = "1.0" +schemaVersion = "1.1" -- See Note [Diagnostic Message JSON Schema] before editing! instance Diagnostic e => ToJson (MsgEnvelope e) where - json m = JSObject [ + json m = JSObject $ [ ("version", JSString schemaVersion), ("ghcVersion", JSString $ "ghc-" ++ cProjectVersion), ("span", json $ errMsgSpan m), ("severity", json $ errMsgSeverity m), ("code", maybe JSNull json (diagnosticCode diag)), ("message", JSArray $ map renderToJSString diagMsg), - ("hints", JSArray $ map (renderToJSString . ppr) (diagnosticHints diag) ) - ] - where diag = errMsgDiagnostic m - opts = defaultDiagnosticOpts @e - style = mkErrStyle (errMsgContext m) - ctx = defaultSDocContext {sdocStyle = style } - diagMsg = filter (not . isEmpty ctx) (unDecorated (diagnosticMessage (opts) diag)) - renderToJSString :: SDoc -> JsonDoc - renderToJSString = JSString . (renderWithContext ctx) + ("hints", JSArray $ map (renderToJSString . ppr) (diagnosticHints diag) ) ] + ++ [ ("reason", reasonJson) + | reasonJson <- maybeToList $ usefulReasonJson_maybe (errMsgReason m) ] + where + diag = errMsgDiagnostic m + opts = defaultDiagnosticOpts @e + style = mkErrStyle (errMsgContext m) + ctx = defaultSDocContext {sdocStyle = style } + diagMsg = filter (not . isEmpty ctx) (unDecorated (diagnosticMessage (opts) diag)) + renderToJSString :: SDoc -> JsonDoc + renderToJSString = JSString . (renderWithContext ctx) + + usefulReasonJson_maybe :: ResolvedDiagnosticReason -> Maybe JsonDoc + usefulReasonJson_maybe (ResolvedDiagnosticReason rea) = + case rea of + WarningWithoutFlag -> Nothing + ErrorWithoutFlag -> Nothing + WarningWithFlags flags -> + Just $ JSObject + [ ("flags", JSArray $ map (JSString . NE.head . warnFlagNames) (NE.toList flags)) + ] + WarningWithCategory (WarningCategory cat) -> + Just $ JSObject + [ ("category", JSString $ unpackFS cat) + ] instance Show (MsgEnvelope DiagnosticMessage) where show = showMsgEnvelope ===================================== compiler/GHC/Unit/Module/Warnings.hs ===================================== @@ -1,6 +1,7 @@ {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} @@ -130,7 +131,8 @@ fromWarningCategory wc = InWarningCategory noAnn NoSourceText (noLocA wc) -- See Note [Warning categories] newtype WarningCategory = WarningCategory FastString - deriving (Binary, Data, Eq, Outputable, Show, Uniquable, NFData) + deriving stock Data + deriving newtype (Binary, Eq, Outputable, Show, Uniquable, NFData) mkWarningCategory :: FastString -> WarningCategory mkWarningCategory = WarningCategory ===================================== docs/users_guide/diagnostics-as-json-schema-1_1.json ===================================== @@ -0,0 +1,134 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "JSON Diagnostic Schema", + "description": "A Schema for specifying GHC diagnostics output as JSON", + "type": "object", + "properties": { + "version": { + "description": "The current JSON schema version this object conforms to", + "type": "string" + }, + "ghcVersion": { + "description": "The GHC version", + "type": "string" + }, + "span": { + "$ref": "#/$defs/span" + }, + "severity": { + "description": "The diagnostic severity", + "type": "string", + "enum": [ + "Warning", + "Error" + ] + }, + "code": { + "description": "The diagnostic code (if it exists)", + "type": [ + "integer", + "null" + ] + }, + "message": { + "description": "The string output of the diagnostic message by GHC", + "type": "array", + "items": { + "type": "string" + } + }, + "hints": { + "description": "The suggested fixes", + "type": "array", + "items": { + "type": "string" + } + }, + "reason" : { + "description": "The GHC flag that was responsible for the emission of the diagnostic message", + "oneOf": [ + { + "type": "object", + "description": "The diagnostic message was controlled by one or more GHC flags", + "properties": { + "flags": { + "type": "array", + "items": { + "description": "The name of a GHC flag controlling the diagnostic message", + "type": "string" + }, + "minItems": 1 + } + }, + "required": ["flags"] + }, + { + "type": "object", + "description": "The diagnostic message was controlled by a GHC diagnostic message category", + "properties": { + "category": { + "description": "The name of the GHC diagnostic message category controlling the diagnostic message", + "type": "string" + } + }, + "required": ["category"] + } + ] + } + }, + "required": [ + "version", + "ghcVersion", + "span", + "severity", + "code", + "message", + "hints" + ], + "additionalProperties": false, + "$defs": { + "span": { + "description": "The span of the diagnostic", + "type": "object", + "properties": { + "file": { + "description": "The file in which the diagnostic occurs", + "type": "string" + }, + "start": { + "description": "The start location of the diagnostic", + "$ref": "#/$defs/location" + }, + "end": { + "description": "The end location of the diagnostic", + "$ref": "#/$defs/location" + } + }, + "required": [ + "file", + "start", + "end" + ], + "additionalProperties": false + }, + "location": { + "description": "A location in a text file", + "type": "object", + "properties": { + "line": { + "description": "The line number", + "type": "integer" + }, + "column": { + "description": "The column number", + "type": "integer" + } + }, + "required": [ + "line", + "column" + ], + "additionalProperties": false + } + } +} ===================================== docs/users_guide/using.rst ===================================== @@ -1424,7 +1424,7 @@ messages and in GHCi: a new line. The structure of the output is described by a `JSON Schema `_. - The schema can be downloaded :download:`here `. + The schema can be downloaded :download:`here `. .. ghc-flag:: -fdiagnostics-color=⟨always|auto|never⟩ :shortdesc: Use colors in error messages ===================================== rts/IPE.c ===================================== @@ -277,3 +277,20 @@ void decompressIPEBufferListNodeIfCompressed(IpeBufferListNode *node) { } } + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info) { + InfoProvEnt ipe; + if (lookupIPE(info, &ipe)) { + debugBelch("%p:\n", info); + debugBelch(" name: %s\n", ipe.prov.table_name); + debugBelch(" desc: %" PRIu32 "\n", ipe.prov.closure_desc); + debugBelch(" type: %s\n", ipe.prov.ty_desc); + debugBelch(" label: %s\n", ipe.prov.label); + debugBelch(" module: %s:%s\n", ipe.prov.unit_id, ipe.prov.module); + debugBelch(" src loc: %s:%s\n", ipe.prov.src_file, ipe.prov.src_span); + } else { + debugBelch("%p: no IPE entry\n", info); + } +} +#endif ===================================== rts/include/rts/IPE.h ===================================== @@ -97,3 +97,7 @@ void formatClosureDescIpe(const InfoProvEnt *ipe_buf, char *str_buf); // Returns true on success, initializes `out`. bool lookupIPE(const StgInfoTable *info, InfoProvEnt *out); + +#if defined(DEBUG) +void printIPE(const StgInfoTable *info); +#endif ===================================== testsuite/tests/deriving/should_compile/T14682.stderr ===================================== @@ -5,12 +5,13 @@ Derived class instances: GHC.Internal.Show.showsPrec a (T14682.Foo b1 b2) = GHC.Internal.Show.showParen (a GHC.Classes.>= 11) - ((GHC.Internal.Base..) - (GHC.Internal.Show.showString "Foo ") - ((GHC.Internal.Base..) - (GHC.Internal.Show.showsPrec 11 b1) - ((GHC.Internal.Base..) - GHC.Internal.Show.showSpace (GHC.Internal.Show.showsPrec 11 b2)))) + (\ z + -> GHC.Internal.Show.showString + "Foo " + (GHC.Internal.Show.showsPrec + 11 b1 + (GHC.Internal.Show.showSpace + (GHC.Internal.Show.showsPrec 11 b2 z)))) instance GHC.Internal.TH.Lift.Lift T14682.Foo where GHC.Internal.TH.Lift.lift (T14682.Foo a1 a2) @@ -25,9 +26,8 @@ Derived class instances: instance GHC.Internal.Data.Data.Data T14682.Foo where GHC.Internal.Data.Data.gfoldl k z (T14682.Foo a1 a2) - = ((z (\ a1 a2 -> T14682.Foo a1 a2) `k` a1) `k` a2) - GHC.Internal.Data.Data.gunfold k z _ - = k (k (z (\ a1 a2 -> T14682.Foo a1 a2))) + = ((z T14682.Foo `k` a1) `k` a2) + GHC.Internal.Data.Data.gunfold k z _ = k (k (z T14682.Foo)) GHC.Internal.Data.Data.toConstr (T14682.Foo _ _) = $cFoo GHC.Internal.Data.Data.dataTypeOf _ = $tFoo @@ -46,18 +46,15 @@ Derived class instances: GHC.Types.LT -> GHC.Types.LT GHC.Types.EQ -> (a2 `GHC.Classes.compare` b2) GHC.Types.GT -> GHC.Types.GT - (GHC.Classes.<) a b + (GHC.Classes.<=) a b = case a of T14682.Foo a1 a2 -> case b of T14682.Foo b1 b2 -> case (GHC.Classes.compare a1 b1) of GHC.Types.LT -> GHC.Types.True - GHC.Types.EQ -> (a2 GHC.Classes.< b2) + GHC.Types.EQ -> (a2 GHC.Classes.<= b2) GHC.Types.GT -> GHC.Types.False - (GHC.Classes.<=) a b = GHC.Classes.not ((GHC.Classes.<) b a) - (GHC.Classes.>) a b = (GHC.Classes.<) b a - (GHC.Classes.>=) a b = GHC.Classes.not ((GHC.Classes.<) a b) instance GHC.Internal.Ix.Ix T14682.Foo where GHC.Internal.Ix.range (T14682.Foo a1 a2, T14682.Foo b1 b2) @@ -177,6 +174,24 @@ GHC.Classes.Eq [T14682.Foo] +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.<) = GHC.Classes.$dm< @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>) = GHC.Classes.$dm> @T14682.Foo + + + +==================== Filling in method body ==================== +GHC.Classes.Ord [T14682.Foo] + (GHC.Classes.>=) = GHC.Classes.$dm>= @T14682.Foo + + + ==================== Filling in method body ==================== GHC.Classes.Ord [T14682.Foo] GHC.Classes.max = GHC.Classes.$dmmax @T14682.Foo ===================================== testsuite/tests/deriving/should_compile/T20496.stderr ===================================== @@ -32,5 +32,5 @@ rnd null (MkT _) = False instance Traversable T where - traverse f (MkT a1) = fmap (\ b1 -> MkT b1) (f a1) + traverse f (MkT a1) = fmap MkT (f a1) ===================================== testsuite/tests/deriving/should_run/T9576.stderr ===================================== @@ -2,18 +2,16 @@ T9576: Uncaught exception ghc-internal:GHC.Internal.Control.Exception.Base.TypeE T9576.hs:6:31: error: [GHC-39999] • No instance for ‘Show Foo’ arising from a use of ‘showsPrec’ - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘(showsPrec 11 b1 z)’ + In the expression: showString "MkBar " (showsPrec 11 b1 z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkBar ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkBar ") (showsPrec 11 b1)) + ‘(\ z -> showString "MkBar " (showsPrec 11 b1 z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show Bar’: To see the code I am typechecking, use -ddump-deriv (deferred type error) HasCallStack backtrace: - collectBacktraces, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:92:13 in ghc-internal:GHC.Internal.Exception - toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:84:32 in ghc-internal:GHC.Internal.Exception throw, called at libraries/ghc-internal/src/GHC/Internal/Control/Exception/Base.hs:435:30 in ghc-internal:GHC.Internal.Control.Exception.Base ===================================== testsuite/tests/driver/all.T ===================================== @@ -276,7 +276,7 @@ test('T12955', normal, makefile_test, []) test('T12971', [when(opsys('mingw32'), fragile(17945)), ignore_stdout], makefile_test, []) test('json_dump', normal, compile_fail, ['-ddump-json']) test('json', normalise_version('ghc'), compile_fail, ['-fdiagnostics-as-json']) -test('json_warn', normalise_version('ghc'), compile, ['-fdiagnostics-as-json -Wunused-matches']) +test('json_warn', normalise_version('ghc'), compile, ['-fdiagnostics-as-json -Wunused-matches -Wx-partial']) test('json2', normalise_version('ghc-internal', 'base','ghc-prim'), compile, ['-ddump-types -ddump-json -Wno-unsupported-llvm-version']) test('T16167', [normalise_version('ghc'),req_interp,exit_code(1)], run_command, ['{compiler} -x hs -e ":set prog T16167.hs" -ddump-json T16167.hs']) ===================================== testsuite/tests/driver/json.stderr ===================================== @@ -1 +1 @@ -{"version":"1.0","ghcVersion":"ghc-9.11.20240329","span":{"file":"json.hs","start":{"line":9,"column":11},"end":{"line":9,"column":21}},"severity":"Error","code":48010,"message":["Empty list of alternatives in case expression"],"hints":["Perhaps you intended to use the `EmptyCase' extension"]} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json.hs","start":{"line":9,"column":11},"end":{"line":9,"column":21}},"severity":"Error","code":48010,"message":["Empty list of alternatives in case expression"],"hints":["Perhaps you intended to use the `EmptyCase' extension"]} ===================================== testsuite/tests/driver/json_warn.hs ===================================== @@ -2,3 +2,6 @@ module Foo where f :: Int -> Int f x = 5 + +g :: [a] -> a +g = head ===================================== testsuite/tests/driver/json_warn.stderr ===================================== @@ -1 +1,2 @@ -{"version":"1.0","ghcVersion":"ghc-9.9.20230817","span":{"file":"json_warn.hs","start":{"line":4,"column":3},"end":{"line":4,"column":4}},"severity":"Warning","code":40910,"message":["Defined but not used: `x'"],"hints":[]} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json_warn.hs","start":{"line":4,"column":3},"end":{"line":4,"column":4}},"severity":"Warning","code":40910,"message":["Defined but not used: `x'"],"hints":[],"reason":{"flags":["unused-matches"]}} +{"version":"1.1","ghcVersion":"ghc-9.13.20241113","span":{"file":"json_warn.hs","start":{"line":7,"column":5},"end":{"line":7,"column":9}},"severity":"Warning","code":63394,"message":["In the use of `head'\n(imported from Prelude, but defined in GHC.Internal.List):\n\"This is a partial function, it throws an error on empty lists. Use pattern matching, 'Data.List.uncons' or 'Data.Maybe.listToMaybe' instead. Consider refactoring to use \"Data.List.NonEmpty\".\""],"hints":[],"reason":{"category":"x-partial"}} ===================================== testsuite/tests/typecheck/should_fail/T15883c.stderr ===================================== @@ -1,4 +1,3 @@ - T15883c.hs:14:1: error: [GHC-39999] • No instance for ‘Eq (Foo LiftedRep)’ arising from the superclasses of an instance declaration @@ -22,7 +21,7 @@ T15883c.hs:14:1: error: [GHC-39999] To see the code I am typechecking, use -ddump-deriv T15883c.hs:14:1: error: [GHC-39999] - • Ambiguous type variable ‘a1’ arising from a use of ‘<’ + • Ambiguous type variable ‘a1’ arising from a use of ‘<=’ prevents the constraint ‘(Ord a1)’ from being solved. Probable fix: use a type annotation to specify what ‘a1’ should be. Potentially matching instances: @@ -31,9 +30,10 @@ T15883c.hs:14:1: error: [GHC-39999] ...plus 24 others ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the expression: a1 < b1 - In a case alternative: MkFoo b1 -> (a1 < b1) - In the expression: case b of MkFoo b1 -> (a1 < b1) - When typechecking the code for ‘<’ + • In the expression: a1 <= b1 + In a case alternative: MkFoo b1 -> (a1 <= b1) + In the expression: case b of MkFoo b1 -> (a1 <= b1) + When typechecking the code for ‘<=’ in a derived instance for ‘Ord (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883d.stderr ===================================== @@ -1,4 +1,3 @@ - T15883d.hs:14:1: error: [GHC-39999] • Ambiguous type variable ‘a0’ arising from a use of ‘showsPrec’ prevents the constraint ‘(Show a0)’ from being solved. @@ -9,11 +8,12 @@ T15883d.hs:14:1: error: [GHC-39999] ...plus 29 others ...plus 10 instances involving out-of-scope types (use -fprint-potential-instances to see them all) - • In the second argument of ‘(.)’, namely ‘(showsPrec 11 b1)’ + • In the second argument of ‘showString’, namely + ‘(showsPrec 11 b1 z)’ + In the expression: showString "MkFoo " (showsPrec 11 b1 z) In the second argument of ‘showParen’, namely - ‘((.) (showString "MkFoo ") (showsPrec 11 b1))’ - In the expression: - showParen (a >= 11) ((.) (showString "MkFoo ") (showsPrec 11 b1)) + ‘(\ z -> showString "MkFoo " (showsPrec 11 b1 z))’ When typechecking the code for ‘showsPrec’ in a derived instance for ‘Show (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv + ===================================== testsuite/tests/typecheck/should_fail/T15883e.stderr ===================================== @@ -1,71 +1,26 @@ - -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘d0’ arising from a use of ‘k’ - prevents the constraint ‘(Data d0)’ from being solved. - Probable fix: use a type annotation to specify what ‘d0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: z (\ a1 -> MkFoo a1) `k` a1 - In an equation for ‘GHC.Internal.Data.Data.gfoldl’: - GHC.Internal.Data.Data.gfoldl k z (MkFoo a1) - = (z (\ a1 -> MkFoo a1) `k` a1) - When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ - -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘d0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘d0’ with ‘forall a. a’ + Expected: d0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘d0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘z MkFoo’ + In the expression: z MkFoo `k` a1 When typechecking the code for ‘GHC.Internal.Data.Data.gfoldl’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: d0 (bound at T15883e.hs:16:1) -T15883e.hs:16:1: error: [GHC-39999] - • Ambiguous type variable ‘b0’ arising from a use of ‘k’ - prevents the constraint ‘(Data b0)’ from being solved. - Probable fix: use a type annotation to specify what ‘b0’ should be. - Potentially matching instances: - instance (Data a, Data b) => Data (Either a b) - -- Defined in ‘GHC.Internal.Data.Data’ - instance Data a => Data (Down a) - -- Defined in ‘GHC.Internal.Data.Data’ - ...plus 20 others - ...plus 47 instances involving out-of-scope types - (use -fprint-potential-instances to see them all) - • In the expression: k (z (\ a1 -> MkFoo a1)) - In an equation for ‘GHC.Internal.Data.Data.gunfold’: - GHC.Internal.Data.Data.gunfold k z _ = k (z (\ a1 -> MkFoo a1)) +T15883e.hs:16:1: error: [GHC-91028] + • Couldn't match type ‘b0’ with ‘forall a. a’ + Expected: b0 -> Foo LiftedRep + Actual: (forall a. a) -> Foo LiftedRep + Cannot instantiate unification variable ‘b0’ + with a type involving polytypes: forall a. a + • In the first argument of ‘z’, namely ‘MkFoo’ + In the first argument of ‘k’, namely ‘(z MkFoo)’ + In the expression: k (z MkFoo) When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ in a derived instance for ‘Data (Foo LiftedRep)’: To see the code I am typechecking, use -ddump-deriv - In the instance declaration for ‘Data (Foo LiftedRep)’ -T15883e.hs:16:1: error: [GHC-46956] - • Couldn't match expected type ‘a’ with actual type ‘b0’ - because type variable ‘a’ would escape its scope - This (rigid, skolem) type variable is bound by - a type expected by the context: - forall a. a - at T15883e.hs:16:1-52 - • In the first argument of ‘MkFoo’, namely ‘a1’ - In the expression: MkFoo a1 - In the first argument of ‘z’, namely ‘(\ a1 -> MkFoo a1)’ - When typechecking the code for ‘GHC.Internal.Data.Data.gunfold’ - in a derived instance for ‘Data (Foo LiftedRep)’: - To see the code I am typechecking, use -ddump-deriv - • Relevant bindings include a1 :: b0 (bound at T15883e.hs:16:1) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/907f32ff9e8a0e8b9f4d1118f39a17b0a0fd9a1b...df5e4f90e9c024c9d390b5e53aac87b2e6170eba -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/907f32ff9e8a0e8b9f4d1118f39a17b0a0fd9a1b...df5e4f90e9c024c9d390b5e53aac87b2e6170eba You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 13:44:33 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Tue, 19 Nov 2024 08:44:33 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <673c964172299_31b1ee8c9e704302d@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: 638c3460 by Sjoerd Visscher at 2024-11-19T14:44:27+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/linear_types.rst - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T15279.stderr - testsuite/tests/printer/T18791.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/638c346072fec5773ea1d43160af83bc4fa1488f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/638c346072fec5773ea1d43160af83bc4fa1488f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 16:11:22 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Tue, 19 Nov 2024 11:11:22 -0500 Subject: [Git][ghc/ghc][wip/T24359] Improvements Message-ID: <673cb8aa5321e_1b8ff868133471776@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 8692ff0e by Simon Peyton Jones at 2024-11-19T16:10:58+00:00 Improvements - - - - - 5 changed files: - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Rename/Bind.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl/Instance.hs - compiler/Language/Haskell/Syntax/Binds.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -842,19 +842,26 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id | otherwise = dsTcEvBinds lhs_binds $ \ ds_lhs_binds -> dsTcEvBinds rhs_binds $ \ ds_rhs_binds -> - do { ds_call <- dsLExpr the_call - ; let core_call = mkLets ds_lhs_binds ds_call - - ; mk_spec_call <- do { ds_call <- dsLExpr the_call - ; return $ \ poly_id poly_rhs -> - mkLetNonRec (localiseId poly_id) poly_rhs $ - mkLets ds_rhs_binds $ - core_call } + do { dflags <- getDynFlags + ; ds_call <- dsLExpr the_call + ; let simpl_opts = initSimpleOpts dflags + core_call = mkLets ds_lhs_binds $ + drop_cast $ + simpleOptExpr simpl_opts $ + ds_call + + mk_spec_call poly_id poly_rhs + = mkLetNonRec (localiseId poly_id) poly_rhs $ + mkLets ds_rhs_binds $ + core_call ; finishSpecPrag mb_poly_rhs (tv_bndrs ++ lhs_evs ++ id_bndrs) core_call (tv_bndrs ++ rhs_evs ++ id_bndrs) mk_spec_call inl } + where + drop_cast (Cast e _) = drop_cast e + drop_cast e = e failBecauseOfClassOp :: Id -> DsM (Maybe a) -- There is no point in trying to specialise a class op ===================================== compiler/GHC/Rename/Bind.hs ===================================== @@ -68,13 +68,9 @@ import GHC.Utils.Outputable import GHC.Utils.Panic import GHC.Types.CompleteMatch -import GHC.Types.Unique.Set import GHC.Data.Maybe ( orElse, mapMaybe ) import GHC.Data.List.SetOps ( findDupsEq ) -import GHC.Data.Graph.Directed ( SCC(..) ) -import GHC.Data.Bag -import GHC.Data.Maybe ( orElse ) import GHC.Data.OrdList ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -50,7 +50,7 @@ import GHC.Tc.Utils.Instantiate( topInstantiate, tcInstTypeBndrs ) import GHC.Tc.Utils.Env import GHC.Tc.Types.Origin -import GHC.Tc.Types.Evidence( HsWrapper, (<.>), hsWrapperHasNoBinders ) +import GHC.Tc.Types.Evidence( HsWrapper, (<.>) ) import GHC.Tc.Types.Constraint import GHC.Tc.Zonk.TcType @@ -62,7 +62,6 @@ import GHC.Core.Multiplicity import GHC.Core.Predicate import GHC.Core.Coercion( mkCoVarCo ) import GHC.Core.TyCo.Rep( mkNakedFunTy ) -import GHC.Core.TyCon( isTypeFamilyTyCon ) import GHC.Types.Var import GHC.Types.Var.Set @@ -872,7 +871,7 @@ tcSpecPrags poly_id prag_sigs -------------- tcSpecPrag :: TcId -> Sig GhcRn -> TcM [TcSpecPrag] tcSpecPrag poly_id prag@(SpecSig _ fun_name hs_tys inl) --- See Note [Handling SPECIALISE pragmas] +-- See Note [Handling old-form SPECIALISE pragmas] -- -- The Name fun_name in the SpecSig may not be the same as that of the poly_id -- Example: SPECIALISE for a class method: the Name in the SpecSig is @@ -906,9 +905,7 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) ; tcExtendNameTyVarEnv [(tyVarName tv, tv) | tv <- tv_bndrs] $ tcExtendIdEnv id_bndrs $ do { (L loc spec_e', rho) <- tcInferRho spec_e - ; return (id_bndrs, L loc (unwrap_hs_expr spec_e'), rho) } } - -- unwrap_hs_expr: if the expression looks like (e |> co), simply drop `co` - -- ToDo: document this + ; return (id_bndrs, L loc spec_e', rho) } } -- Solve unification constraints -- c.f. Note [The SimplifyRule Plan] step 1 @@ -963,32 +960,20 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) , spe_rhs_ev_bndrs = rhs_evs , spe_rhs_binds = rhs_binds , spe_inl = inl }] } - where - unwrap_hs_expr e -{- - | ExprWithTySig _ (L _ inner_e) _ <- e - = unwrap_hs_expr inner_e - | XExpr (WrapExpr wrap inner_e) <- e - , hsWrapperHasNoBinders wrap - = unwrap_hs_expr inner_e - | otherwise --} - = e - tcSpecPrag _ prag = pprPanic "tcSpecPrag" (ppr prag) -------------- tcSpecWrapper :: UserTypeCtxt -> TcType -> TcType -> TcM HsWrapper -- A simpler variant of tcSubType, used for SPECIALISE pragmas --- See Note [Handling SPECIALISE pragmas], wrinkle 1 +-- See Note [Handling old-form SPECIALISE pragmas], wrinkle 1 tcSpecWrapper ctxt poly_ty spec_ty = do { (sk_wrap, inst_wrap) <- tcSkolemise Shallow ctxt spec_ty $ \spec_tau -> do { (inst_wrap, tau) <- topInstantiate orig poly_ty ; _ <- unifyType Nothing spec_tau tau -- Deliberately ignore the evidence - -- See Note [Handling SPECIALISE pragmas], + -- See Note [Handling old-form SPECIALISE pragmas], -- wrinkle (2) ; return inst_wrap } ; return (sk_wrap <.> inst_wrap) } @@ -1520,15 +1505,14 @@ getRuleQuantCts wc = False | otherwise = case classifyPredType (ctPred ct) of - EqPred _ t1 t2 - | not (ok_eq t1 t2) + EqPred {} -> False -- Note [RULE quantification over equalities] _ -> tyCoVarsOfCt ct `disjointVarSet` skol_tvs - ok_eq t1 t2 - | t1 `tcEqType` t2 = False -- Our solving step may have turned it into Refl - | otherwise = True - +-- ok_eq t1 t2 +-- | t1 `tcEqType` t2 = False -- Our solving step may have turned it into Refl +-- | otherwise = True +-- -- is_fun_app t1 || is_fun_app t2 -- -- is_fun_app ty -- ty is of form (F tys) where F is a type function ===================================== compiler/GHC/Tc/TyCl/Instance.hs ===================================== @@ -2178,7 +2178,7 @@ mk_meth_spec_prags :: Id -> [LTcSpecPrag] -> [LTcSpecPrag] -> TcSpecPrags -- * spec_prags_from_inst: derived from {-# SPECIALISE instance :: #-} -- These ones have the dfun inside, but [perhaps surprisingly] -- the correct wrapper. - -- See Note [Handling SPECIALISE pragmas] in GHC.Tc.Gen.Bind + -- See Note [Handling old-form SPECIALISE pragmas] in GHC.Tc.Gen.Bind mk_meth_spec_prags meth_id spec_inst_prags spec_prags_for_me = SpecPrags (spec_prags_for_me ++ spec_prags_from_inst) where ===================================== compiler/Language/Haskell/Syntax/Binds.hs ===================================== @@ -370,7 +370,7 @@ data Sig pass -- | A new-form specialisation pragma (see GHC Proposal #493) -- e.g. {-# SPECIALISE f @Int 1 :: Int -> Int #-} - -- See Note [Overview of SPECIALISE pramgas] + -- See Note [Overview of SPECIALISE pragmas] | SpecSigE (XSpecSigE pass) (RuleBndrs pass) (LHsExpr pass) -- Expression to specialise View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8692ff0e19e564a8fb1956670c584bec4637164e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8692ff0e19e564a8fb1956670c584bec4637164e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 16:44:48 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Tue, 19 Nov 2024 11:44:48 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] 3 commits: A start on module graphs Message-ID: <673cc080ada13_3978fedd5b814227@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 01bd0f92 by Rodrigo Mesquita at 2024-11-19T15:56:13+00:00 A start on module graphs - - - - - c71edace by Rodrigo Mesquita at 2024-11-19T15:56:38+00:00 Better getLinkDeps - - - - - 0b67174d by Matthew Pickering at 2024-11-19T15:56:42+00:00 MP fixes - - - - - 4 changed files: - compiler/GHC/Data/Graph/Directed.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -14,7 +14,8 @@ module GHC.Data.Graph.Directed ( stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachableFromG, reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -26,7 +27,10 @@ module GHC.Data.Graph.Directed ( stronglyConnCompFromEdgedVerticesUniqR, -- Simple way to classify edges - EdgeType(..), classifyEdges + EdgeType(..), classifyEdges, + + ReachabilityIndex, reachabilityIndex, emptyGraph, nodeLookupByIx, ixLookupByNode, + reachableQuery ) where ------------------------------------------------------------------------------ @@ -65,8 +69,6 @@ import GHC.Types.Unique import GHC.Types.Unique.FM import qualified Data.IntMap as IM import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S {- ************************************************************************ @@ -89,7 +91,10 @@ Note [Nodes, keys, vertices] data Graph node = Graph { gr_int_graph :: IntGraph, gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex + gr_node_to_vertex :: node -> Maybe Vertex, + gr_reachability :: ReachabilityIndex + -- ^ We cache a reachability index to answer reachability queries faster. + -- romes:todo: Is it worth it to cache this for all graphs, or should it be ModuleGraph specific? } data Edge node = Edge node node @@ -116,7 +121,7 @@ instance (Outputable a, Outputable b) => Outputable (Node a b) where ppr (DigraphNode a b c) = ppr (a, b, c) emptyGraph :: Graph a -emptyGraph = Graph (array (1, 0) []) (error "emptyGraph") (const Nothing) +emptyGraph = Graph (array (1, 0) []) (error "emptyGraph") (const Nothing) mempty -- See Note [Deterministic SCC] graphFromEdgedVertices @@ -127,7 +132,7 @@ graphFromEdgedVertices -> Graph (Node key payload) graphFromEdgedVertices _reduceFn [] = emptyGraph graphFromEdgedVertices reduceFn edged_vertices = - Graph graph vertex_fn (key_vertex . key_extractor) + Graph graph vertex_fn (key_vertex . key_extractor) (reachableGraph graph) where key_extractor = node_key (bounds, vertex_fn, key_vertex, numbered_nodes) = reduceFn edged_vertices key_extractor @@ -357,41 +362,31 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] +-- | 'reachableFromG' returns in an /unordered/ list the nodes reachable from the given node. +-- The list of nodes /does not/ include the root node! +-- Because we cache a graph reachability index, this operation is very fast. +reachableFromG :: Graph node -> node -> [node] +reachableFromG graph from = map (gr_vertex_to_node graph) result + where from_vertex = expectJust "reachableFromG" (gr_node_to_vertex graph from) + hits = {-# SCC "Digraph.reachable" #-} IM.lookup from_vertex (gr_reachability graph) + result = IS.toList $! expectJust "reachableFromG" hits outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] -reachablesG graph froms = map (gr_vertex_to_node graph) result +reachablesG graph froms = map (gr_vertex_to_node graph) ({-IS.toList-} result) where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs + -- The following would be more efficient, + -- IS.union (IS.fromList vs) $ + -- IS.unions $ map (expectJust "reachablesG" . flip IM.lookup (gr_reachability graph)) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node @@ -403,9 +398,12 @@ edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph where v2n = gr_vertex_to_node graph transposeG :: Graph node -> Graph node -transposeG graph = Graph (G.transposeG (gr_int_graph graph)) +transposeG graph = Graph g' (gr_vertex_to_node graph) (gr_node_to_vertex graph) + (reachableGraph g') + where + g' = G.transposeG (gr_int_graph graph) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) @@ -466,6 +464,8 @@ reachableGraph g = res where do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) res = IM.fromList [(v, do_one v) | v <- G.vertices g] +-- NB: We also used to have `reachableGraphCyclic`, but it was unused in the source so it was removed. +-- If you need something like that, search the git history for `reachableGraphCyclic`. scc :: IntGraph -> [SCC Vertex] scc graph = map decode forest @@ -478,45 +478,6 @@ scc graph = map decode forest where dec (Node v ts) vs = v : foldr dec vs ts mentions_itself v = v `elem` (graph ! v) -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) - {- ************************************************************************ * * @@ -616,10 +577,36 @@ graphFromVerticesAndAdjacency -- do the same thing for the other one for backcompat reasons. -> Graph (Node key payload) graphFromVerticesAndAdjacency [] _ = emptyGraph -graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vertex . key_extractor) +graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vertex . key_extractor) (reachableGraph graph) where key_extractor = node_key (bounds, vertex_node, key_vertex, _) = reduceNodesIntoVerticesOrd vertices key_extractor key_vertex_pair (a, b) = (expectJust "graphFromVerticesAndAdjacency" $ key_vertex a, expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + +-------------------------------------------------------------------------------- +-- Reachability +-------------------------------------------------------------------------------- + +type ReachabilityIndex = IM.IntMap IS.IntSet + +reachabilityIndex :: Graph a -> ReachabilityIndex +reachabilityIndex = gr_reachability + +nodeLookupByIx :: Graph node -> Vertex -> node +nodeLookupByIx (Graph _ from _ _) v = from v + +ixLookupByNode :: Graph node -> node -> Maybe Vertex +ixLookupByNode (Graph _ _ to _) v = to v + +-- | Reachability query. On graph @g@ and nodes @a@ and @b@, @reachable(g, a, +-- b)@ asks whether @b@ can be reached starting from @a at . +reachableQuery :: Graph node -- ^ @g@ + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +reachableQuery (Graph _ _ to index) a b = IS.member b_i $ expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,8 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +613,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1500,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:reachableFromG graph root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1829,8 +1832,11 @@ checkHomeUnitsClosed ue -- downwards closure of graph downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + = graphFromEdgedVerticesUniq [ DigraphNode uid uid deps + | (uid_k, deps_k) <- IM.toList $ reachabilityIndex graph + , let uid = node_key $ nodeLookupByIx graph uid_k + , let deps = map (node_key . nodeLookupByIx graph) (IS.toList deps_k) + ] inverse_closure = transposeG downwards_closure ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -72,6 +73,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +155,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (Graph SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,13 +175,9 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = moduleGraphNodes False new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps - mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +197,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +210,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = moduleGraphNodes False (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +387,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +405,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + reachableFromG td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = reachableQuery td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6aed1559246007bb8c2049b790b2a8613e08e8c6...0b67174d08c3f1c19c02d43e50dec778c0709742 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6aed1559246007bb8c2049b790b2a8613e08e8c6...0b67174d08c3f1c19c02d43e50dec778c0709742 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 19:04:50 2024 From: gitlab at gitlab.haskell.org (Hassan Al-Awwadi (@hassan.awwadi)) Date: Tue, 19 Nov 2024 14:04:50 -0500 Subject: [Git][ghc/ghc][wip/ttg/types/basic] 77 commits: Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <673ce15272c14_274fb234c27c2939@gitlab.mail> Hassan Al-Awwadi pushed to branch wip/ttg/types/basic at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44faa32d by Hassan Al-Awwadi at 2024-11-19T20:03:54+01:00 Move types from GHC.Types.Basic to L.H.S.* This cuts a few different edges between L.H.S and GHC.Types.Basic * RuleName is moved to L.H.S.Basic * fdTopLevel (TopLevelFlag) has been moved to the extension field of FamilyDecl * OverlapMode has been moved to L.H.S.OverlapPragma * SourceText has been moved to its extension fields * NonCanonical has been moved to its extension constructor * InlinePragma has been moved to L.H.S.InlinePragma * SourceText and Arity have been moved to its extension point * Activation and InlineSpec have also been moved to L.H.S.InlinePragma * And some general churn as functions and instances move to new locations * GHC.Hs.OverlapPragma contains ghc specifics for L.H.S.OverlapPragma and * GHC.Hs.InlinePragma contains ghc specifics for L.H.S.InlinePragma * TyConFlavour definition is moved to GHC.Hs.Basic to avoid cyclical dependency ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - 30 changed files: - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC/Builtin/PrimOps/Ids.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/InstEnv.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Pipeline.hs - compiler/GHC/Core/Opt/Pipeline/Types.hs - compiler/GHC/Core/Opt/Simplify.hs - compiler/GHC/Core/Opt/Simplify/Env.hs - compiler/GHC/Core/Opt/Simplify/Inline.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d509252912af7aa6b746911e0aa3844812c77a21...44faa32d68c9d9b4e059a65316e9d57404f207dd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d509252912af7aa6b746911e0aa3844812c77a21...44faa32d68c9d9b4e059a65316e9d57404f207dd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 19:05:26 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 19 Nov 2024 14:05:26 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T15503 Message-ID: <673ce1766df2e_274fb2383ed42955e@gitlab.mail> Ben Gamari pushed new branch wip/T15503 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T15503 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 19:06:58 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 19 Nov 2024 14:06:58 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/adjustor-count Message-ID: <673ce1d2456fa_274fb24b762031256@gitlab.mail> Ben Gamari pushed new branch wip/adjustor-count at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/adjustor-count You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 19:07:54 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 19 Nov 2024 14:07:54 -0500 Subject: [Git][ghc/ghc][wip/T15503] rts: Allow ExecPage to allocate anywhere in address space Message-ID: <673ce20a5fda2_274fb24b1c3432967@gitlab.mail> Ben Gamari pushed to branch wip/T15503 at Glasgow Haskell Compiler / GHC Commits: 81861b88 by Ben Gamari at 2024-11-19T14:07:46-05:00 rts: Allow ExecPage to allocate anywhere in address space Currently the ExecPage facility has two users: * GHCi, for constructing info tables, and * the adjustor allocation path Despite neither of these have any spatial locality constraints ExecPage was using the linker's `mmapAnonForLinker`, which tries hard to ensure that mappings end up nearby the executable image. This makes adjustor allocation needlessly subject to fragmentation concerns. We now instead return less constrained mappings, improving the robustness of the mechanism. Addresses #25503. - - - - - 3 changed files: - rts/ExecPage.c - rts/linker/MMap.c - rts/linker/MMap.h Changes: ===================================== rts/ExecPage.c ===================================== @@ -10,7 +10,7 @@ #include "linker/MMap.h" ExecPage *allocateExecPage(void) { - ExecPage *page = (ExecPage *) mmapAnonForLinker(getPageSize()); + ExecPage *page = (ExecPage *) mmapAnon(getPageSize()); return page; } ===================================== rts/linker/MMap.c ===================================== @@ -207,6 +207,12 @@ memoryAccessToProt(MemoryAccess access) } } +void * +mmapAnon (size_t bytes) +{ + return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); +} + // // Returns NULL on failure. // @@ -410,6 +416,15 @@ mmapForLinker (size_t bytes, MemoryAccess access, uint32_t flags, int fd, int of return result; } +/* + * Map read/write pages anywhere in memory. Returns NULL on failure. + */ +void * +mmapAnon (size_t bytes) +{ + return mmapAnywhere(bytes, MEM_READ_WRITE_THEN_READ_EXECUTE, MAP_ANONYMOUS, -1, 0); +} + /* * Map read/write pages in low memory. Returns NULL on failure. */ ===================================== rts/linker/MMap.h ===================================== @@ -64,7 +64,11 @@ typedef enum { extern void *mmap_32bit_base; -// Map read/write anonymous memory. +// Map read/write anonymous memory anywhere in memory. +void *mmapAnon(size_t bytes); + +// Map read/write anonymous memory, enforcing the constraint of +// placing the mapping within 4GB of the executable image. void *mmapAnonForLinker (size_t bytes); // Change protection of previous mapping memory. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81861b88ad635521e91b55d54106b4ccdd494b15 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81861b88ad635521e91b55d54106b4ccdd494b15 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 19:38:54 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 19 Nov 2024 14:38:54 -0500 Subject: [Git][ghc/ghc][master] 2 commits: Don't store boot locations in finder cache Message-ID: <673ce94e8c7f7_274fb2876950421c8@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11 changed files: - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Finder/Types.hs - compiler/GHC/Unit/Module/Env.hs - compiler/GHC/Unit/Module/Location.hs - compiler/GHC/Unit/Types.hs Changes: ===================================== compiler/GHC/Driver/Backpack.hs ===================================== @@ -781,7 +781,7 @@ summariseRequirement pn mod_name = do let loc = srcLocSpan (mkSrcLoc (mkFastString (bkp_filename env)) 1 1) let fc = hsc_FC hsc_env - mod <- liftIO $ addHomeModuleToFinder fc home_unit (notBoot mod_name) location + mod <- liftIO $ addHomeModuleToFinder fc home_unit mod_name location HsigFile extra_sig_imports <- liftIO $ findExtraSigImports hsc_env HsigFile mod_name @@ -854,17 +854,14 @@ hsModuleToModSummary home_keys pn hsc_src modname -- To add insult to injury, we don't even actually use -- these filenames to figure out where the hi files go. -- A travesty! - let location0 = mkHomeModLocation2 fopts modname + let location = mkHomeModLocation fopts modname (unsafeEncodeUtf $ unpackFS unit_fs moduleNameSlashes modname) - (case hsc_src of + (case hsc_src of HsigFile -> os "hsig" HsBootFile -> os "hs-boot" HsSrcFile -> os "hs") - -- DANGEROUS: bootifying can POISON the module finder cache - let location = case hsc_src of - HsBootFile -> addBootSuffixLocnOut location0 - _ -> location0 + hsc_src -- This duplicates a pile of logic in GHC.Driver.Make hi_timestamp <- liftIO $ modificationTimeIfExists (ml_hi_file location) hie_timestamp <- liftIO $ modificationTimeIfExists (ml_hie_file location) @@ -893,7 +890,7 @@ hsModuleToModSummary home_keys pn hsc_src modname this_mod <- liftIO $ do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB modname (hscSourceToIsBoot hsc_src)) location + addHomeModuleToFinder fc home_unit modname location hsc_src let ms = ModSummary { ms_mod = this_mod, ms_hsc_src = hsc_src, ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -2123,38 +2123,23 @@ summariseFile hsc_env' home_unit old_summaries src_fn mb_phase maybe_buf <- getPreprocessedImports hsc_env src_fn mb_phase maybe_buf let fopts = initFinderOpts (hsc_dflags hsc_env) - src_path = unsafeEncodeUtf src_fn + (basename, extension) = splitExtension src_fn - is_boot = case takeExtension src_fn of - ".hs-boot" -> IsBoot - ".lhs-boot" -> IsBoot - _ -> NotBoot - - (path_without_boot, hsc_src) - | isHaskellSigFilename src_fn = (src_path, HsigFile) - | IsBoot <- is_boot = (removeBootSuffix src_path, HsBootFile) - | otherwise = (src_path, HsSrcFile) - - -- Make a ModLocation for the Finder, who only has one entry for - -- each @ModuleName@, and therefore needs to use the locations for - -- the non-boot files. - location_without_boot = - mkHomeModLocation fopts pi_mod_name path_without_boot + hsc_src + | isHaskellSigSuffix (drop 1 extension) = HsigFile + | isHaskellBootSuffix (drop 1 extension) = HsBootFile + | otherwise = HsSrcFile -- Make a ModLocation for this file, adding the @-boot@ suffix to -- all paths if the original was a boot file. - location - | IsBoot <- is_boot - = addBootSuffixLocn location_without_boot - | otherwise - = location_without_boot + location = mkHomeModLocation fopts pi_mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf extension) hsc_src -- Tell the Finder cache where it is, so that subsequent calls -- to findModule will find it, even if it's not on any search path mod <- liftIO $ do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB pi_mod_name is_boot) location + addHomeModuleToFinder fc home_unit pi_mod_name location hsc_src liftIO $ makeNewModSummary hsc_env $ MakeNewModSummary { nms_src_fn = src_fn @@ -2184,14 +2169,10 @@ checkSummaryHash -- and it was likely flushed in depanal. This is not technically -- needed when we're called from sumariseModule but it shouldn't -- hurt. - -- Also, only add to finder cache for non-boot modules as the finder cache - -- makes sure to add a boot suffix for boot files. - _ <- do - let fc = hsc_FC hsc_env - gwib = GWIB (ms_mod old_summary) (isBootSummary old_summary) - case ms_hsc_src old_summary of - HsSrcFile -> addModuleToFinder fc gwib location - _ -> return () + let fc = hsc_FC hsc_env + mod = ms_mod old_summary + hsc_src = ms_hsc_src old_summary + addModuleToFinder fc mod location hsc_src hi_timestamp <- modificationTimeIfExists (ml_hi_file location) hie_timestamp <- modificationTimeIfExists (ml_hie_file location) @@ -2243,7 +2224,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p find_it :: IO SummariseResult find_it = do - found <- findImportedModule hsc_env wanted_mod mb_pkg + found <- findImportedModuleWithIsBoot hsc_env wanted_mod is_boot mb_pkg case found of Found location mod | isJust (ml_hs_file location) -> @@ -2261,10 +2242,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p just_found location mod = do -- Adjust location to point to the hs-boot source file, -- hi file, object file, when is_boot says so - let location' = case is_boot of - IsBoot -> addBootSuffixLocn location - NotBoot -> location - src_fn = expectJust "summarise2" (ml_hs_file location') + let src_fn = expectJust "summarise2" (ml_hs_file location) -- Check that it exists -- It might have been deleted since the Finder last found it @@ -2274,7 +2252,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p -- .hs-boot file doesn't exist. Nothing -> return NotThere Just h -> do - fresult <- new_summary_cache_check location' mod src_fn h + fresult <- new_summary_cache_check location mod src_fn h return $ case fresult of Left err -> FoundHomeWithError (moduleUnitId mod, err) Right ms -> FoundHome ms ===================================== compiler/GHC/Driver/MakeFile.hs ===================================== @@ -292,12 +292,12 @@ findDependency :: HscEnv findDependency hsc_env srcloc pkg imp is_boot include_pkg_deps = do -- Find the module; this will be fast because -- we've done it once during downsweep - r <- findImportedModule hsc_env imp pkg + r <- findImportedModuleWithIsBoot hsc_env imp is_boot pkg case r of Found loc _ -- Home package: just depend on the .hi or hi-boot file | isJust (ml_hs_file loc) || include_pkg_deps - -> return (Just (unsafeDecodeUtf $ addBootSuffix_maybe is_boot (ml_hi_file_ospath loc))) + -> return (Just (unsafeDecodeUtf $ ml_hi_file_ospath loc)) -- Not in this package: we don't need a dependency | otherwise ===================================== compiler/GHC/Driver/Phases.hs ===================================== @@ -23,6 +23,7 @@ module GHC.Driver.Phases ( isDynLibSuffix, isHaskellUserSrcSuffix, isHaskellSigSuffix, + isHaskellBootSuffix, isSourceSuffix, isHaskellishTarget, @@ -234,7 +235,7 @@ phaseInputExt Js = "js" phaseInputExt StopLn = "o" haskellish_src_suffixes, backpackish_suffixes, haskellish_suffixes, cish_suffixes, - js_suffixes, haskellish_user_src_suffixes, haskellish_sig_suffixes + js_suffixes, haskellish_user_src_suffixes, haskellish_sig_suffixes, haskellish_boot_suffixes :: [String] -- When a file with an extension in the haskellish_src_suffixes group is -- loaded in --make mode, its imports will be loaded too. @@ -247,7 +248,8 @@ js_suffixes = [ "js" ] -- Will not be deleted as temp files: haskellish_user_src_suffixes = - haskellish_sig_suffixes ++ [ "hs", "lhs", "hs-boot", "lhs-boot" ] + haskellish_sig_suffixes ++ haskellish_boot_suffixes ++ [ "hs", "lhs" ] +haskellish_boot_suffixes = [ "hs-boot", "lhs-boot" ] haskellish_sig_suffixes = [ "hsig", "lhsig" ] backpackish_suffixes = [ "bkp" ] @@ -265,11 +267,12 @@ dynlib_suffixes platform = case platformOS platform of _ -> ["so"] isHaskellishSuffix, isBackpackishSuffix, isHaskellSrcSuffix, isCishSuffix, - isHaskellUserSrcSuffix, isJsSuffix, isHaskellSigSuffix + isHaskellUserSrcSuffix, isJsSuffix, isHaskellSigSuffix, isHaskellBootSuffix :: String -> Bool isHaskellishSuffix s = s `elem` haskellish_suffixes isBackpackishSuffix s = s `elem` backpackish_suffixes isHaskellSigSuffix s = s `elem` haskellish_sig_suffixes +isHaskellBootSuffix s = s `elem` haskellish_boot_suffixes isHaskellSrcSuffix s = s `elem` haskellish_src_suffixes isCishSuffix s = s `elem` cish_suffixes isJsSuffix s = s `elem` js_suffixes ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -734,7 +734,7 @@ runHscPhase pipe_env hsc_env0 input_fn src_flavour = do mod <- do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB mod_name (hscSourceToIsBoot src_flavour)) location + addHomeModuleToFinder fc home_unit mod_name location src_flavour -- Make the ModSummary to hand to hscMain let @@ -777,24 +777,18 @@ mkOneShotModLocation :: PipeEnv -> DynFlags -> HscSource -> ModuleName -> IO Mod mkOneShotModLocation pipe_env dflags src_flavour mod_name = do let PipeEnv{ src_basename=basename, src_suffix=suff } = pipe_env - let location1 = mkHomeModLocation2 fopts mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf suff) - - -- Boot-ify it if necessary - let location2 - | HsBootFile <- src_flavour = addBootSuffixLocnOut location1 - | otherwise = location1 - + let location1 = mkHomeModLocation fopts mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf suff) src_flavour -- Take -ohi into account if present -- This can't be done in mkHomeModuleLocation because -- it only applies to the module being compiles let ohi = outputHi dflags - location3 | Just fn <- ohi = location2{ ml_hi_file_ospath = unsafeEncodeUtf fn } - | otherwise = location2 + location2 | Just fn <- ohi = location1{ ml_hi_file_ospath = unsafeEncodeUtf fn } + | otherwise = location1 let dynohi = dynOutputHi dflags - location4 | Just fn <- dynohi = location3{ ml_dyn_hi_file_ospath = unsafeEncodeUtf fn } - | otherwise = location3 + location3 | Just fn <- dynohi = location2{ ml_dyn_hi_file_ospath = unsafeEncodeUtf fn } + | otherwise = location2 -- Take -o into account if present -- Very like -ohi, but we must *only* do this if we aren't linking @@ -807,11 +801,11 @@ mkOneShotModLocation pipe_env dflags src_flavour mod_name = do location5 | Just ofile <- expl_o_file , let dyn_ofile = fromMaybe (ofile -<.> dynObjectSuf_ dflags) expl_dyn_o_file , isNoLink (ghcLink dflags) - = location4 { ml_obj_file_ospath = unsafeEncodeUtf ofile + = location3 { ml_obj_file_ospath = unsafeEncodeUtf ofile , ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } | Just dyn_ofile <- expl_dyn_o_file - = location4 { ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } - | otherwise = location4 + = location3 { ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } + | otherwise = location3 return location5 where fopts = initFinderOpts dflags ===================================== compiler/GHC/Iface/Load.hs ===================================== @@ -896,9 +896,9 @@ findAndReadIface hsc_env doc_str mod wanted_mod hi_boot_file = do else do let fopts = initFinderOpts dflags -- Look for the file - mb_found <- liftIO (findExactModule fc fopts other_fopts unit_state mhome_unit mod) + mb_found <- liftIO (findExactModule fc fopts other_fopts unit_state mhome_unit mod hi_boot_file) case mb_found of - InstalledFound (addBootSuffixLocn_maybe hi_boot_file -> loc) mod -> do + InstalledFound loc -> do -- See Note [Home module load error] case mhome_unit of Just home_unit ===================================== compiler/GHC/Unit/Finder.hs ===================================== @@ -15,6 +15,7 @@ module GHC.Unit.Finder ( FinderCache(..), initFinderCache, findImportedModule, + findImportedModuleWithIsBoot, findPluginModule, findExactModule, findHomeModule, @@ -55,6 +56,7 @@ import GHC.Utils.Panic import GHC.Linker.Types import GHC.Types.PkgQual +import GHC.Types.SourceFile import GHC.Fingerprint import Data.IORef @@ -103,28 +105,28 @@ InstalledNotFound. initFinderCache :: IO FinderCache initFinderCache = do - mod_cache <- newIORef emptyInstalledModuleWithIsBootEnv + mod_cache <- newIORef emptyInstalledModuleEnv file_cache <- newIORef M.empty let flushFinderCaches :: UnitEnv -> IO () flushFinderCaches ue = do - atomicModifyIORef' mod_cache $ \fm -> (filterInstalledModuleWithIsBootEnv is_ext fm, ()) + atomicModifyIORef' mod_cache $ \fm -> (filterInstalledModuleEnv is_ext fm, ()) atomicModifyIORef' file_cache $ \_ -> (M.empty, ()) where - is_ext mod _ = not (isUnitEnvInstalledModule ue (gwib_mod mod)) + is_ext mod _ = not (isUnitEnvInstalledModule ue mod) - addToFinderCache :: InstalledModuleWithIsBoot -> InstalledFindResult -> IO () + addToFinderCache :: InstalledModule -> InstalledFindResult -> IO () addToFinderCache key val = atomicModifyIORef' mod_cache $ \c -> - case (lookupInstalledModuleWithIsBootEnv c key, val) of + case (lookupInstalledModuleEnv c key, val) of -- Don't overwrite an InstalledFound with an InstalledNotFound -- See [Note Monotonic addToFinderCache] (Just InstalledFound{}, InstalledNotFound{}) -> (c, ()) - _ -> (extendInstalledModuleWithIsBootEnv c key val, ()) + _ -> (extendInstalledModuleEnv c key val, ()) - lookupFinderCache :: InstalledModuleWithIsBoot -> IO (Maybe InstalledFindResult) + lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult) lookupFinderCache key = do c <- readIORef mod_cache - return $! lookupInstalledModuleWithIsBootEnv c key + return $! lookupInstalledModuleEnv c key lookupFileCache :: FilePath -> IO Fingerprint lookupFileCache key = do @@ -156,6 +158,13 @@ findImportedModule hsc_env mod pkg_qual = in do findImportedModuleNoHsc fc fopts (hsc_unit_env hsc_env) mhome_unit mod pkg_qual +findImportedModuleWithIsBoot :: HscEnv -> ModuleName -> IsBootInterface -> PkgQual -> IO FindResult +findImportedModuleWithIsBoot hsc_env mod is_boot pkg_qual = do + res <- findImportedModule hsc_env mod pkg_qual + case (res, is_boot) of + (Found loc mod, IsBoot) -> return (Found (addBootSuffixLocn loc) mod) + _ -> return res + findImportedModuleNoHsc :: FinderCache -> FinderOpts @@ -228,15 +237,19 @@ findPluginModule fc fopts units Nothing mod_name = -- reading the interface for a module mentioned by another interface, -- for example (a "system import"). -findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IO InstalledFindResult -findExactModule fc fopts other_fopts unit_state mhome_unit mod = do - case mhome_unit of +findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IsBootInterface -> IO InstalledFindResult +findExactModule fc fopts other_fopts unit_state mhome_unit mod is_boot = do + res <- case mhome_unit of Just home_unit | isHomeInstalledModule home_unit mod -> findInstalledHomeModule fc fopts (homeUnitId home_unit) (moduleName mod) | Just home_fopts <- unitEnv_lookup_maybe (moduleUnit mod) other_fopts -> findInstalledHomeModule fc home_fopts (moduleUnit mod) (moduleName mod) _ -> findPackageModule fc unit_state fopts mod + case (res, is_boot) of + (InstalledFound loc, IsBoot) -> return (InstalledFound (addBootSuffixLocn loc)) + _ -> return res + -- ----------------------------------------------------------------------------- -- Helpers @@ -274,7 +287,7 @@ orIfNotFound this or_this = do homeSearchCache :: FinderCache -> UnitId -> ModuleName -> IO InstalledFindResult -> IO InstalledFindResult homeSearchCache fc home_unit mod_name do_this = do let mod = mkModule home_unit mod_name - modLocationCache fc (notBoot mod) do_this + modLocationCache fc mod do_this findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult findExposedPackageModule fc fopts units mod_name mb_pkg = @@ -296,7 +309,7 @@ findLookupResult fc fopts r = case r of -- with just the location of the thing that was -- instantiated; you probably also need all of the -- implicit locations from the instances - InstalledFound loc _ -> return (Found loc m) + InstalledFound loc -> return (Found loc m) InstalledNoPackage _ -> return (NoPackage (moduleUnit m)) InstalledNotFound fp _ -> return (NotFound{ fr_paths = fmap unsafeDecodeUtf fp, fr_pkg = Just (moduleUnit m) , fr_pkgs_hidden = [] @@ -331,7 +344,7 @@ findLookupResult fc fopts r = case r of , fr_unusables = [] , fr_suggestions = suggest' }) -modLocationCache :: FinderCache -> InstalledModuleWithIsBoot -> IO InstalledFindResult -> IO InstalledFindResult +modLocationCache :: FinderCache -> InstalledModule -> IO InstalledFindResult -> IO InstalledFindResult modLocationCache fc mod do_this = do m <- lookupFinderCache fc mod case m of @@ -341,17 +354,19 @@ modLocationCache fc mod do_this = do addToFinderCache fc mod result return result -addModuleToFinder :: FinderCache -> ModuleWithIsBoot -> ModLocation -> IO () -addModuleToFinder fc mod loc = do - let imod = fmap toUnitId <$> mod - addToFinderCache fc imod (InstalledFound loc (gwib_mod imod)) +addModuleToFinder :: FinderCache -> Module -> ModLocation -> HscSource -> IO () +addModuleToFinder fc mod loc src_flavour = do + let imod = toUnitId <$> mod + unless (src_flavour == HsBootFile) $ + addToFinderCache fc imod (InstalledFound loc) -- This returns a module because it's more convenient for users -addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleNameWithIsBoot -> ModLocation -> IO Module -addHomeModuleToFinder fc home_unit mod_name loc = do - let mod = mkHomeInstalledModule home_unit <$> mod_name - addToFinderCache fc mod (InstalledFound loc (gwib_mod mod)) - return (mkHomeModule home_unit (gwib_mod mod_name)) +addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleName -> ModLocation -> HscSource -> IO Module +addHomeModuleToFinder fc home_unit mod_name loc src_flavour = do + let mod = mkHomeInstalledModule home_unit mod_name + unless (src_flavour == HsBootFile) $ + addToFinderCache fc mod (InstalledFound loc) + return (mkHomeModule home_unit mod_name) -- ----------------------------------------------------------------------------- -- The internal workers @@ -361,7 +376,7 @@ findHomeModule fc fopts home_unit mod_name = do let uid = homeUnitAsUnit home_unit r <- findInstalledHomeModule fc fopts (homeUnitId home_unit) mod_name return $ case r of - InstalledFound loc _ -> Found loc (mkHomeModule home_unit mod_name) + InstalledFound loc -> Found loc (mkHomeModule home_unit mod_name) InstalledNoPackage _ -> NoPackage uid -- impossible InstalledNotFound fps _ -> NotFound { fr_paths = fmap unsafeDecodeUtf fps, @@ -386,7 +401,7 @@ findHomePackageModule fc fopts home_unit mod_name = do let uid = RealUnit (Definite home_unit) r <- findInstalledHomeModule fc fopts home_unit mod_name return $ case r of - InstalledFound loc _ -> Found loc (mkModule uid mod_name) + InstalledFound loc -> Found loc (mkModule uid mod_name) InstalledNoPackage _ -> NoPackage uid -- impossible InstalledNotFound fps _ -> NotFound { fr_paths = fmap unsafeDecodeUtf fps, @@ -456,7 +471,7 @@ findInstalledHomeModule fc fopts home_unit mod_name = do -- This is important only when compiling the base package (where GHC.Prim -- is a home module). if mod `installedModuleEq` gHC_PRIM - then return (InstalledFound (error "GHC.Prim ModLocation") mod) + then return (InstalledFound (error "GHC.Prim ModLocation")) else searchPathExts search_dirs mod exts -- | Prepend the working directory to the search path. @@ -485,11 +500,11 @@ findPackageModule_ :: FinderCache -> FinderOpts -> InstalledModule -> UnitInfo - findPackageModule_ fc fopts mod pkg_conf = do massertPpr (moduleUnit mod == unitId pkg_conf) (ppr (moduleUnit mod) <+> ppr (unitId pkg_conf)) - modLocationCache fc (notBoot mod) $ + modLocationCache fc mod $ -- special case for GHC.Prim; we won't find it in the filesystem. if mod `installedModuleEq` gHC_PRIM - then return (InstalledFound (error "GHC.Prim ModLocation") mod) + then return (InstalledFound (error "GHC.Prim ModLocation")) else let @@ -513,7 +528,7 @@ findPackageModule_ fc fopts mod pkg_conf = do -- don't bother looking for it. let basename = unsafeEncodeUtf $ moduleNameSlashes (moduleName mod) loc = mk_hi_loc one basename - in return $ InstalledFound loc mod + in return $ InstalledFound loc _otherwise -> searchPathExts import_dirs mod [(package_hisuf, mk_hi_loc)] @@ -547,7 +562,7 @@ searchPathExts paths mod exts = search to_search search ((file, loc) : rest) = do b <- doesFileExist file if b - then return $ InstalledFound loc mod + then return $ InstalledFound loc else search rest mkHomeModLocationSearched :: FinderOpts -> ModuleName -> FileExt @@ -589,10 +604,12 @@ mkHomeModLocationSearched fopts mod suff path basename = -- ext -- The filename extension of the source file (usually "hs" or "lhs"). -mkHomeModLocation :: FinderOpts -> ModuleName -> OsPath -> ModLocation -mkHomeModLocation dflags mod src_filename = - let (basename,extension) = OsPath.splitExtension src_filename - in mkHomeModLocation2 dflags mod basename extension +mkHomeModLocation :: FinderOpts -> ModuleName -> OsPath -> FileExt -> HscSource -> ModLocation +mkHomeModLocation dflags mod src_basename ext hsc_src = + let loc = mkHomeModLocation2 dflags mod src_basename ext + in case hsc_src of + HsBootFile -> addBootSuffixLocnOut loc + _ -> loc mkHomeModLocation2 :: FinderOpts -> ModuleName ===================================== compiler/GHC/Unit/Finder/Types.hs ===================================== @@ -30,9 +30,9 @@ data FinderCache = FinderCache { flushFinderCaches :: UnitEnv -> IO () -- ^ remove all the home modules from the cache; package modules are -- assumed to not move around during a session; also flush the file hash -- cache. - , addToFinderCache :: InstalledModuleWithIsBoot -> InstalledFindResult -> IO () + , addToFinderCache :: InstalledModule -> InstalledFindResult -> IO () -- ^ Add a found location to the cache for the module. - , lookupFinderCache :: InstalledModuleWithIsBoot -> IO (Maybe InstalledFindResult) + , lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult) -- ^ Look for a location in the cache. , lookupFileCache :: FilePath -> IO Fingerprint -- ^ Look for the hash of a file in the cache. This should add it to the @@ -40,7 +40,7 @@ data FinderCache = FinderCache { flushFinderCaches :: UnitEnv -> IO () } data InstalledFindResult - = InstalledFound ModLocation InstalledModule + = InstalledFound ModLocation | InstalledNoPackage UnitId | InstalledNotFound [OsPath] (Maybe UnitId) ===================================== compiler/GHC/Unit/Module/Env.hs ===================================== @@ -33,17 +33,6 @@ module GHC.Unit.Module.Env , mergeInstalledModuleEnv , plusInstalledModuleEnv , installedModuleEnvElts - - -- * InstalledModuleWithIsBootEnv - , InstalledModuleWithIsBootEnv - , emptyInstalledModuleWithIsBootEnv - , lookupInstalledModuleWithIsBootEnv - , extendInstalledModuleWithIsBootEnv - , filterInstalledModuleWithIsBootEnv - , delInstalledModuleWithIsBootEnv - , mergeInstalledModuleWithIsBootEnv - , plusInstalledModuleWithIsBootEnv - , installedModuleWithIsBootEnvElts ) where @@ -294,56 +283,3 @@ plusInstalledModuleEnv :: (elt -> elt -> elt) plusInstalledModuleEnv f (InstalledModuleEnv xm) (InstalledModuleEnv ym) = InstalledModuleEnv $ Map.unionWith f xm ym - - --------------------------------------------------------------------- --- InstalledModuleWithIsBootEnv --------------------------------------------------------------------- - --- | A map keyed off of 'InstalledModuleWithIsBoot' -newtype InstalledModuleWithIsBootEnv elt = InstalledModuleWithIsBootEnv (Map InstalledModuleWithIsBoot elt) - -instance Outputable elt => Outputable (InstalledModuleWithIsBootEnv elt) where - ppr (InstalledModuleWithIsBootEnv env) = ppr env - - -emptyInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -emptyInstalledModuleWithIsBootEnv = InstalledModuleWithIsBootEnv Map.empty - -lookupInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> Maybe a -lookupInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m = Map.lookup m e - -extendInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> a -> InstalledModuleWithIsBootEnv a -extendInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m x = InstalledModuleWithIsBootEnv (Map.insert m x e) - -filterInstalledModuleWithIsBootEnv :: (InstalledModuleWithIsBoot -> a -> Bool) -> InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBootEnv a -filterInstalledModuleWithIsBootEnv f (InstalledModuleWithIsBootEnv e) = - InstalledModuleWithIsBootEnv (Map.filterWithKey f e) - -delInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> InstalledModuleWithIsBootEnv a -delInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m = InstalledModuleWithIsBootEnv (Map.delete m e) - -installedModuleWithIsBootEnvElts :: InstalledModuleWithIsBootEnv a -> [(InstalledModuleWithIsBoot, a)] -installedModuleWithIsBootEnvElts (InstalledModuleWithIsBootEnv e) = Map.assocs e - -mergeInstalledModuleWithIsBootEnv - :: (elta -> eltb -> Maybe eltc) - -> (InstalledModuleWithIsBootEnv elta -> InstalledModuleWithIsBootEnv eltc) -- map X - -> (InstalledModuleWithIsBootEnv eltb -> InstalledModuleWithIsBootEnv eltc) -- map Y - -> InstalledModuleWithIsBootEnv elta - -> InstalledModuleWithIsBootEnv eltb - -> InstalledModuleWithIsBootEnv eltc -mergeInstalledModuleWithIsBootEnv f g h (InstalledModuleWithIsBootEnv xm) (InstalledModuleWithIsBootEnv ym) - = InstalledModuleWithIsBootEnv $ Map.mergeWithKey - (\_ x y -> (x `f` y)) - (coerce g) - (coerce h) - xm ym - -plusInstalledModuleWithIsBootEnv :: (elt -> elt -> elt) - -> InstalledModuleWithIsBootEnv elt - -> InstalledModuleWithIsBootEnv elt - -> InstalledModuleWithIsBootEnv elt -plusInstalledModuleWithIsBootEnv f (InstalledModuleWithIsBootEnv xm) (InstalledModuleWithIsBootEnv ym) = - InstalledModuleWithIsBootEnv $ Map.unionWith f xm ym - ===================================== compiler/GHC/Unit/Module/Location.hs ===================================== @@ -13,8 +13,6 @@ module GHC.Unit.Module.Location ) , pattern ModLocation , addBootSuffix - , addBootSuffix_maybe - , addBootSuffixLocn_maybe , addBootSuffixLocn , addBootSuffixLocnOut , removeBootSuffix @@ -25,7 +23,6 @@ where import GHC.Prelude import GHC.Data.OsPath -import GHC.Unit.Types import GHC.Types.SrcLoc import GHC.Utils.Outputable import GHC.Data.FastString (mkFastString) @@ -99,26 +96,10 @@ removeBootSuffix pathWithBootSuffix = Just path -> path Nothing -> error "removeBootSuffix: no -boot suffix" --- | Add the @-boot@ suffix if the @Bool@ argument is @True@ -addBootSuffix_maybe :: IsBootInterface -> OsPath -> OsPath -addBootSuffix_maybe is_boot path = case is_boot of - IsBoot -> addBootSuffix path - NotBoot -> path - -addBootSuffixLocn_maybe :: IsBootInterface -> ModLocation -> ModLocation -addBootSuffixLocn_maybe is_boot locn = case is_boot of - IsBoot -> addBootSuffixLocn locn - _ -> locn - -- | Add the @-boot@ suffix to all file paths associated with the module addBootSuffixLocn :: ModLocation -> ModLocation addBootSuffixLocn locn - = locn { ml_hs_file_ospath = fmap addBootSuffix (ml_hs_file_ospath locn) - , ml_hi_file_ospath = addBootSuffix (ml_hi_file_ospath locn) - , ml_dyn_hi_file_ospath = addBootSuffix (ml_dyn_hi_file_ospath locn) - , ml_obj_file_ospath = addBootSuffix (ml_obj_file_ospath locn) - , ml_dyn_obj_file_ospath = addBootSuffix (ml_dyn_obj_file_ospath locn) - , ml_hie_file_ospath = addBootSuffix (ml_hie_file_ospath locn) } + = addBootSuffixLocnOut locn { ml_hs_file_ospath = fmap addBootSuffix (ml_hs_file_ospath locn) } -- | Add the @-boot@ suffix to all output file paths associated with the -- module, not including the input file itself ===================================== compiler/GHC/Unit/Types.hs ===================================== @@ -84,8 +84,6 @@ module GHC.Unit.Types , GenWithIsBoot (..) , ModuleNameWithIsBoot , ModuleWithIsBoot - , InstalledModuleWithIsBoot - , notBoot ) where @@ -720,8 +718,6 @@ type ModuleNameWithIsBoot = GenWithIsBoot ModuleName type ModuleWithIsBoot = GenWithIsBoot Module -type InstalledModuleWithIsBoot = GenWithIsBoot InstalledModule - instance Binary a => Binary (GenWithIsBoot a) where put_ bh (GWIB { gwib_mod, gwib_isBoot }) = do put_ bh gwib_mod @@ -735,6 +731,3 @@ instance Outputable a => Outputable (GenWithIsBoot a) where ppr (GWIB { gwib_mod, gwib_isBoot }) = hsep $ ppr gwib_mod : case gwib_isBoot of IsBoot -> [ text "{-# SOURCE #-}" ] NotBoot -> [] - -notBoot :: mod -> GenWithIsBoot mod -notBoot gwib_mod = GWIB {gwib_mod, gwib_isBoot = NotBoot} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3e5bfdd363740926576fb3ee031b94d17f7d955e...64c9529295001268cd983e0c5e9f0ff5b9b31748 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3e5bfdd363740926576fb3ee031b94d17f7d955e...64c9529295001268cd983e0c5e9f0ff5b9b31748 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 19:39:35 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 19 Nov 2024 14:39:35 -0500 Subject: [Git][ghc/ghc][master] Better documentation for floating-point min/max and SIMD primitives Message-ID: <673ce9775ea43_274fb2859ff8459d@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 2 changed files: - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/StgToCmm/Prim.hs Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -1095,10 +1095,18 @@ primop DoubleLeOp "<=##" Compare Double# -> Double# -> Int# primop DoubleMinOp "minDouble#" GenPrimOp Double# -> Double# -> Double# + {Return the minimum of the arguments. + When the arguments are numerically equal (e.g. @0.0##@ and @-0.0##@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop DoubleMaxOp "maxDouble#" GenPrimOp Double# -> Double# -> Double# + {Return the maximum of the arguments. + When the arguments are numerically equal (e.g. @0.0##@ and @-0.0##@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop DoubleAddOp "+##" GenPrimOp @@ -1269,10 +1277,18 @@ primop FloatLeOp "leFloat#" Compare Float# -> Float# -> Int# primop FloatMinOp "minFloat#" GenPrimOp Float# -> Float# -> Float# + {Return the minimum of the arguments. + When the arguments are numerically equal (e.g. @0.0#@ and @-0.0#@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop FloatMaxOp "maxFloat#" GenPrimOp Float# -> Float# -> Float# + {Return the maximum of the arguments. + When the arguments are numerically equal (e.g. @0.0#@ and @-0.0#@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop FloatAddOp "plusFloat#" GenPrimOp @@ -4109,12 +4125,13 @@ primop VecPackOp "pack#" GenPrimOp primop VecUnpackOp "unpack#" GenPrimOp VECTOR -> VECTUPLE - { Unpack the elements of a vector into an unboxed tuple. #} + { Unpack the elements of a vector into an unboxed tuple. } with vector = ALL_VECTOR_TYPES primop VecInsertOp "insert#" GenPrimOp VECTOR -> SCALAR -> Int# -> VECTOR - { Insert a scalar at the given position in a vector. } + { Insert a scalar at the given position in a vector. + The position must be a compile-time constant. } with effect = CanFail vector = ALL_VECTOR_TYPES @@ -4160,40 +4177,43 @@ primop VecNegOp "negate#" GenPrimOp primop VecIndexByteArrayOp "indexArray#" GenPrimOp ByteArray# -> Int# -> VECTOR - { Read a vector from specified index of immutable array. } + { Read a vector from the specified index of an immutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = CanFail vector = ALL_VECTOR_TYPES primop VecReadByteArrayOp "readArray#" GenPrimOp MutableByteArray# s -> Int# -> State# s -> (# State# s, VECTOR #) - { Read a vector from specified index of mutable array. } + { Read a vector from the specified index of a mutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecWriteByteArrayOp "writeArray#" GenPrimOp MutableByteArray# s -> Int# -> VECTOR -> State# s -> State# s - { Write a vector to specified index of mutable array. } + { Write a vector to the specified index of a mutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecIndexOffAddrOp "indexOffAddr#" GenPrimOp Addr# -> Int# -> VECTOR - { Reads vector; offset in bytes. } + { Reads vector; offset in units of SIMD vectors (not scalar elements). } with effect = CanFail vector = ALL_VECTOR_TYPES primop VecReadOffAddrOp "readOffAddr#" GenPrimOp Addr# -> Int# -> State# s -> (# State# s, VECTOR #) - { Reads vector; offset in bytes. } + { Reads vector; offset in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecWriteOffAddrOp "writeOffAddr#" GenPrimOp Addr# -> Int# -> VECTOR -> State# s -> State# s - { Write vector; offset in bytes. } + { Write vector; offset in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES @@ -4263,7 +4283,7 @@ primop VecFNMSub "fnmsub#" GenPrimOp primop VecShuffleOp "shuffle#" GenPrimOp VECTOR -> VECTOR -> INTVECTUPLE -> VECTOR {Shuffle elements of the concatenation of the input two vectors - into the result vector.} + into the result vector. The indices must be compile-time constants.} with vector = ALL_VECTOR_TYPES primop VecMinOp "min#" GenPrimOp ===================================== compiler/GHC/StgToCmm/Prim.hs ===================================== @@ -2713,7 +2713,7 @@ doShuffleOp ty (v1:v2:idxs) res -> emitAssign (CmmLocal res) (CmmMachOp (mo is) [v1,v2]) | otherwise -> pprPanic "doShuffleOp" $ - vcat [ text "shuffle indices must be literals, 0 <= i <" <+> ppr len ] + vcat [ text "shuffle indices must be literals, 0 <= i <" <+> ppr (2 * len) ] | otherwise = pprPanic "doShuffleOp" $ vcat [ text "non-vector argument type:" <+> ppr ty ] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/11bad98d67ae5557eae1dd965f0457b78b496ecc -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/11bad98d67ae5557eae1dd965f0457b78b496ecc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 21:56:16 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 19 Nov 2024 16:56:16 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/backports-9.8 Message-ID: <673d098011bb6_274fb2104909c6325c@gitlab.mail> Ben Gamari pushed new branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/backports-9.8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 23:21:53 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Tue, 19 Nov 2024 18:21:53 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/fix-bytecode-hpc Message-ID: <673d1d91b6060_2faf38c9414698c8@gitlab.mail> Cheng Shao pushed new branch wip/fix-bytecode-hpc at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/fix-bytecode-hpc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 19 23:34:06 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Tue, 19 Nov 2024 18:34:06 -0500 Subject: [Git][ghc/ghc][wip/fix-bytecode-hpc] driver: fix hpc unresolved symbol issue in TH with -fprefer-byte-code Message-ID: <673d206e9a99e_2faf3826208c73058@gitlab.mail> Cheng Shao pushed to branch wip/fix-bytecode-hpc at Glasgow Haskell Compiler / GHC Commits: 07a3e51f by Cheng Shao at 2024-11-19T23:33:38+00:00 driver: fix hpc unresolved symbol issue in TH with -fprefer-byte-code - - - - - 10 changed files: - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/StgToCmm/Config.hs - compiler/GHC/StgToCmm/Hpc.hs - compiler/GHC/Unit/Module/ModGuts.hs - testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs Changes: ===================================== compiler/GHC/Driver/Config/StgToCmm.hs ===================================== @@ -38,7 +38,6 @@ initStgToCmmConfig dflags mod = StgToCmmConfig -- flags , stgToCmmLoopification = gopt Opt_Loopification dflags , stgToCmmAlignCheck = gopt Opt_AlignmentSanitisation dflags - , stgToCmmOptHpc = gopt Opt_Hpc dflags , stgToCmmFastPAPCalls = gopt Opt_FastPAPCalls dflags , stgToCmmSCCProfiling = sccProfilingEnabled dflags , stgToCmmEagerBlackHole = gopt Opt_EagerBlackHoling dflags ===================================== compiler/GHC/Driver/Hooks.hs ===================================== @@ -48,7 +48,6 @@ import GHC.Types.Basic import GHC.Types.CostCentre import GHC.Types.IPE import GHC.Types.Meta -import GHC.Types.HpcInfo import GHC.Unit.Module import GHC.Unit.Module.ModSummary @@ -149,7 +148,7 @@ data Hooks = Hooks -> IO (Either Type (HValue, [Linkable], PkgsLoaded)))) , createIservProcessHook :: !(Maybe (CreateProcess -> IO ProcessHandle)) , stgToCmmHook :: !(Maybe (StgToCmmConfig -> InfoTableProvMap -> [TyCon] -> CollectedCCs - -> [CgStgTopBinding] -> HpcInfo -> CgStream CmmGroup ModuleLFInfos)) + -> [CgStgTopBinding] -> CgStream CmmGroup ModuleLFInfos)) , cmmToRawCmmHook :: !(forall a . Maybe (DynFlags -> Maybe Module -> CgStream CmmGroupSRTs a -> IO (CgStream RawCmmGroup a))) } ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -248,7 +248,6 @@ import GHC.Types.Name.Cache ( initNameCache ) import GHC.Types.Name.Reader import GHC.Types.Name.Ppr import GHC.Types.TyThing -import GHC.Types.HpcInfo import GHC.Types.Unique.Supply (uniqFromTag) import GHC.Types.Unique.Set @@ -1980,7 +1979,6 @@ hscGenHardCode hsc_env cgguts location output_filename = do cg_foreign = foreign_stubs0, cg_foreign_files = foreign_files, cg_dep_pkgs = dependencies, - cg_hpc_info = hpc_info, cg_spt_entries = spt_entries, cg_binds = late_binds, cg_ccs = late_local_ccs @@ -2084,7 +2082,7 @@ hscGenHardCode hsc_env cgguts location output_filename = do cmms <- {-# SCC "StgToCmm" #-} doCodeGen hsc_env this_mod denv data_tycons cost_centre_info - stg_binds hpc_info + stg_binds ------------------ Code output ----------------------- rawcmms0 <- {-# SCC "cmmToRawCmm" #-} @@ -2291,13 +2289,12 @@ This reduces residency towards the end of the CodeGen phase significantly doCodeGen :: HscEnv -> Module -> InfoTableProvMap -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -- ^ Bindings come already annotated with fvs - -> HpcInfo -> IO (CgStream CmmGroupSRTs CmmCgInfos) -- Note we produce a 'Stream' of CmmGroups, so that the -- backend can be run incrementally. Otherwise it generates all -- the C-- up front, which has a significant space cost. doCodeGen hsc_env this_mod denv data_tycons - cost_centre_info stg_binds_w_fvs hpc_info = do + cost_centre_info stg_binds_w_fvs = do let dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env hooks = hsc_hooks hsc_env @@ -2308,14 +2305,14 @@ doCodeGen hsc_env this_mod denv data_tycons putDumpFileMaybe logger Opt_D_dump_stg_final "Final STG:" FormatSTG (pprGenStgTopBindings stg_ppr_opts stg_binds_w_fvs) - let stg_to_cmm dflags mod a b c d e = case stgToCmmHook hooks of - Nothing -> StgToCmm.codeGen logger tmpfs (initStgToCmmConfig dflags mod) a b c d e - Just h -> (,emptyDetUFM) <$> h (initStgToCmmConfig dflags mod) a b c d e + let stg_to_cmm dflags mod a b c d = case stgToCmmHook hooks of + Nothing -> StgToCmm.codeGen logger tmpfs (initStgToCmmConfig dflags mod) a b c d + Just h -> (,emptyDetUFM) <$> h (initStgToCmmConfig dflags mod) a b c d let cmm_stream :: CgStream CmmGroup (ModuleLFInfos, DetUniqFM) -- See Note [Forcing of stg_binds] cmm_stream = stg_binds_w_fvs `seqList` {-# SCC "StgToCmm" #-} - stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs hpc_info + stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs -- codegen consumes a stream of CmmGroup, and produces a new -- stream of CmmGroup (not necessarily synchronised: one ===================================== compiler/GHC/HsToCore/Coverage.hs ===================================== @@ -117,7 +117,7 @@ hpcInitCode platform this_mod (HpcInfo tickCount hashNo) = initializerCStub platform fn_name decls body where fn_name = mkInitializerStubLabel this_mod (fsLit "hpc") - decls = text "extern StgWord64 " <> tickboxes <> text "[]" <> semi + decls = text "StgWord64 " <> tickboxes <> brackets (int tickCount) <> semi body = text "hs_hpc_module" <> parens (hcat (punctuate comma [ doubleQuotes full_name_str, ===================================== compiler/GHC/Iface/Tidy.hs ===================================== @@ -407,7 +407,6 @@ tidyProgram opts (ModGuts { mg_module = mod , mg_deps = deps , mg_foreign = foreign_stubs , mg_foreign_files = foreign_files - , mg_hpc_info = hpc_info , mg_modBreaks = modBreaks , mg_boot_exports = boot_exports }) = do @@ -480,7 +479,6 @@ tidyProgram opts (ModGuts { mg_module = mod , cg_foreign = all_foreign_stubs , cg_foreign_files = foreign_files , cg_dep_pkgs = dep_direct_pkgs deps - , cg_hpc_info = hpc_info , cg_modBreaks = modBreaks , cg_spt_entries = spt_entries } @@ -1567,4 +1565,3 @@ mustExposeTyCon no_trim_types exports tc exported_con con = any (`elemNameSet` exports) (dataConName con : dataConFieldLabels con) -} - ===================================== compiler/GHC/StgToCmm.hs ===================================== @@ -24,7 +24,6 @@ import GHC.StgToCmm.Layout import GHC.StgToCmm.Utils import GHC.StgToCmm.Closure import GHC.StgToCmm.Config -import GHC.StgToCmm.Hpc import GHC.StgToCmm.Ticky import GHC.StgToCmm.Types (ModuleLFInfos) import GHC.StgToCmm.CgUtils (CgStream) @@ -38,7 +37,6 @@ import GHC.Stg.Syntax import GHC.Types.CostCentre import GHC.Types.IPE -import GHC.Types.HpcInfo import GHC.Types.Id import GHC.Types.Id.Info import GHC.Types.RepType @@ -52,7 +50,6 @@ import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.Multiplicity -import GHC.Unit.Module import GHC.Utils.Error import GHC.Utils.Outputable @@ -77,13 +74,12 @@ codeGen :: Logger -> [TyCon] -> CollectedCCs -- (Local/global) cost-centres needing declaring/registering. -> [CgStgTopBinding] -- Bindings to convert - -> HpcInfo -> CgStream CmmGroup (ModuleLFInfos, DetUniqFM) -- See Note [Deterministic Uniques in the CG] on CgStream -- Output as a stream, so codegen can -- be interleaved with output codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons - cost_centre_info stg_binds hpc_info + cost_centre_info stg_binds = do { -- cg: run the code generator, and yield the resulting CmmGroup -- Using an IORef to store the state is a bit crude, but otherwise -- we would need to add a state monad layer which regresses @@ -118,7 +114,7 @@ codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons yield cmm return a - ; cg (mkModuleInit cost_centre_info (stgToCmmThisModule cfg) hpc_info) + ; cg (mkModuleInit cost_centre_info) ; mapM_ (cg . cgTopBinding logger tmpfs cfg) stg_binds -- Put datatype_stuff after code_stuff, because the @@ -281,13 +277,10 @@ cgTopRhs cfg rec bndr (StgRhsClosure fvs cc upd_flag args body _typ) mkModuleInit :: CollectedCCs -- cost centre info - -> Module - -> HpcInfo -> FCode () -mkModuleInit cost_centre_info this_mod hpc_info - = do { initHpc this_mod hpc_info - ; initCostCentres cost_centre_info +mkModuleInit cost_centre_info + = do { initCostCentres cost_centre_info } ===================================== compiler/GHC/StgToCmm/Config.hs ===================================== @@ -46,7 +46,6 @@ data StgToCmmConfig = StgToCmmConfig ---------------------------------- Flags -------------------------------------- , stgToCmmLoopification :: !Bool -- ^ Loopification enabled (cf @-floopification@) , stgToCmmAlignCheck :: !Bool -- ^ Insert alignment check (cf @-falignment-sanitisation@) - , stgToCmmOptHpc :: !Bool -- ^ perform code generation for code coverage , stgToCmmFastPAPCalls :: !Bool -- ^ , stgToCmmSCCProfiling :: !Bool -- ^ Check if cost-centre profiling is enabled , stgToCmmEagerBlackHole :: !Bool -- ^ ===================================== compiler/GHC/StgToCmm/Hpc.hs ===================================== @@ -6,13 +6,11 @@ -- ----------------------------------------------------------------------------- -module GHC.StgToCmm.Hpc ( initHpc, mkTickBox ) where +module GHC.StgToCmm.Hpc ( mkTickBox ) where import GHC.Prelude import GHC.Platform -import GHC.StgToCmm.Monad -import GHC.StgToCmm.Utils import GHC.Cmm.Graph import GHC.Cmm.Expr @@ -20,9 +18,7 @@ import GHC.Cmm.CLabel import GHC.Cmm.Utils import GHC.Unit.Module -import GHC.Types.HpcInfo -import Control.Monad mkTickBox :: Platform -> Module -> Int -> CmmAGraph mkTickBox platform mod n @@ -34,16 +30,3 @@ mkTickBox platform mod n tick_box = cmmIndex platform W64 (CmmLit $ CmmLabel $ mkHpcTicksLabel $ mod) n - --- | Emit top-level tables for HPC and return code to initialise -initHpc :: Module -> HpcInfo -> FCode () -initHpc _ NoHpcInfo{} - = return () -initHpc this_mod (HpcInfo tickCount _hashNo) - = do do_hpc <- stgToCmmOptHpc <$> getStgToCmmConfig - when do_hpc $ - emitDataLits (mkHpcTicksLabel this_mod) - [ CmmInt 0 W64 - | _ <- take tickCount [0 :: Int ..] - ] - ===================================== compiler/GHC/Unit/Module/ModGuts.hs ===================================== @@ -141,7 +141,6 @@ data CgGuts cg_foreign_files :: ![(ForeignSrcLang, FilePath)], cg_dep_pkgs :: !(Set UnitId), -- ^ Dependent packages, used to -- generate #includes for C code gen - cg_hpc_info :: !HpcInfo, -- ^ Program coverage tick box information cg_modBreaks :: !(Maybe ModBreaks), -- ^ Module breakpoints cg_spt_entries :: [SptEntry] -- ^ Static pointer table entries for static forms defined in ===================================== testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs ===================================== @@ -34,7 +34,6 @@ import GHC.Stg.FVs import GHC.Stg.Syntax import GHC.StgToCmm (codeGen) import GHC.Types.CostCentre (emptyCollectedCCs) -import GHC.Types.HpcInfo (emptyHpcInfo) import GHC.Types.IPE (emptyInfoTableProvMap) import GHC.Types.Unique.DSM import GHC.Unit.Home @@ -70,14 +69,12 @@ cmmOfSummary summ = do tycons = [] ccs = emptyCollectedCCs stg' = fmap fst (depSortWithAnnotStgPgm (ms_mod summ) stg) - hpcinfo = emptyHpcInfo False tmpfs = hsc_tmpfs env - stg_to_cmm dflags mod = codeGen logger tmpfs (initStgToCmmConfig dflags mod) (groups, _infos) <- liftIO $ fmap fst $ runUDSMT (initDUniqSupply 't' 0) $ collectAll $ - stg_to_cmm dflags (ms_mod summ) infotable tycons ccs stg' hpcinfo + codeGen logger tmpfs (initStgToCmmConfig dflags (ms_mod summ)) infotable tycons ccs stg' return groups frontend :: DynFlags -> HscEnv -> ModSummary -> IO ModGuts View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/07a3e51fa2394f89266d4cf8e86762d88a0568a7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/07a3e51fa2394f89266d4cf8e86762d88a0568a7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 10:46:21 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 20 Nov 2024 05:46:21 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] driver: Always link against "base" package when one shot linking Message-ID: <673dbdfd91c6c_2ebb4a21903096933@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 36138977 by Matthew Pickering at 2024-11-20T16:16:10+05:30 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 13 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,16 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl use a different base if they are going to guarantee it is available. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,28 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + :since: 9.12.1 + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3613897714089f4470d8700afc0dcee4741b126d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3613897714089f4470d8700afc0dcee4741b126d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 10:46:31 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 20 Nov 2024 05:46:31 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] 120 commits: linker: add --optimistic-linking flag Message-ID: <673dbe0789920_2ebb4a219080976bd@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 9462345b by Matthew Pickering at 2024-11-20T10:46:19+00:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 30 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot - compiler/GHC/Core/Coercion/Opt.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CprAnal.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3613897714089f4470d8700afc0dcee4741b126d...9462345b647339eecd02d34b887be4989a7f65c3 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3613897714089f4470d8700afc0dcee4741b126d...9462345b647339eecd02d34b887be4989a7f65c3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 10:48:18 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Wed, 20 Nov 2024 05:48:18 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] 74 commits: Handle the special ghc-prim:GHC.Prim module in the compiler Message-ID: <673dbe71ef9fe_2ebb4a1f72f099964@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - ed8e2959 by Rodrigo Mesquita at 2024-11-20T10:43:51+00:00 A start on module graphs - - - - - cc45826a by Rodrigo Mesquita at 2024-11-20T10:43:51+00:00 Better getLinkDeps - - - - - f5fb1722 by Matthew Pickering at 2024-11-20T10:43:52+00:00 MP fixes - - - - - 454f6e6d by Rodrigo Mesquita at 2024-11-20T10:43:52+00:00 should have worked The reason why it didn't was because `reachablesG` was constructing an index from a cyclic graph -- which didn't work then. In the next commit this is done by `cyclicGraphReachability`. - - - - - c227ee54 by Rodrigo Mesquita at 2024-11-20T10:44:26+00:00 Refactor. Creates a proper abstraction for reachability index out of Graph. This reachability index is then cached by ModuleGraph. Note change in confusing downwards closure of home units check, since it looked like we were doing a no-op. - - - - - 30 changed files: - .gitlab/merge_request_templates/Default.md - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/Reg/Liveness.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/JS/Make.hs - compiler/GHC/Linker/Deps.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0b67174d08c3f1c19c02d43e50dec778c0709742...c227ee5434f79b8f7fd32b8a78270221e4c49f6b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0b67174d08c3f1c19c02d43e50dec778c0709742...c227ee5434f79b8f7fd32b8a78270221e4c49f6b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 11:50:54 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 20 Nov 2024 06:50:54 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] 2 commits: Teach sphinx about since in ghc-flags Message-ID: <673dcd1e5e19d_23a3851a30c4633c4@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 0477f522 by Zubin Duggal at 2024-11-20T17:20:39+05:30 Teach sphinx about since in ghc-flags - - - - - d0d4b554 by Matthew Pickering at 2024-11-20T17:20:39+05:30 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 14 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/flags.py - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,16 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl use a different base if they are going to guarantee it is available. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/flags.py ===================================== @@ -632,7 +632,7 @@ def setup(app): override_arg = {'override': True} if sphinx_version >= parse_version('1.8') else {} # Add ghc-flag directive, and override the class with our own - app.add_object_type('ghc-flag', 'ghc-flag') + app.add_object_type('ghc-flag', 'ghc-flag', doc_field_types=[Field('since', label='Introduced in GHC version', names=['since'])]) app.add_directive_to_domain('std', 'ghc-flag', Flag, **override_arg) # Add extension directive, and override the class with our own ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,28 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + :since: 9.12.1 + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9462345b647339eecd02d34b887be4989a7f65c3...d0d4b554b041cfee834be5d4525568289340c3c3 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9462345b647339eecd02d34b887be4989a7f65c3...d0d4b554b041cfee834be5d4525568289340c3c3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 12:22:56 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Wed, 20 Nov 2024 07:22:56 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] fixup! Refactor. Message-ID: <673dd4a035bc0_23a38535a64c6421f@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 1d75365a by Rodrigo Mesquita at 2024-11-20T11:53:29+00:00 fixup! Refactor. - - - - - 1 changed file: - compiler/GHC/Data/Graph/Directed/Reachability.hs Changes: ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -163,6 +163,6 @@ isReachableMany (ReachabilityIndex index _ to) roots b = IS.member b_i $ IS.unions $ map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i - where roots_i = map (expectJust "reachablesQuery:node not in graph" . to) roots + where roots_i = [ v | Just v <- map to roots ] b_i = expectJust "reachablesQuery:node not in graph" $ to b View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1d75365aaca6eef9de39d5f3cc6e7e682315f7aa -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1d75365aaca6eef9de39d5f3cc6e7e682315f7aa You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 12:28:10 2024 From: gitlab at gitlab.haskell.org (Adriaan Leijnse (@aidylns)) Date: Wed, 20 Nov 2024 07:28:10 -0500 Subject: [Git][ghc/ghc][wip/aidylns/ttg-remove-hsunboundvar-via-hshole] 2 commits: Use rnUnboundVar in HsVar underscore case Message-ID: <673dd5da8aaa6_23a38543966c652dc@gitlab.mail> Adriaan Leijnse pushed to branch wip/aidylns/ttg-remove-hsunboundvar-via-hshole at Glasgow Haskell Compiler / GHC Commits: 78a161d3 by Adriaan Leijnse at 2024-11-20T12:26:00+00:00 Use rnUnboundVar in HsVar underscore case - - - - - bdaba97f by Adriaan Leijnse at 2024-11-20T12:26:32+00:00 Check for underscore equality in Parser To keep the code as similar in behavior to the original HsUnboundVar implementation as possible. - - - - - 4 changed files: - compiler/GHC/Parser/Errors/Ppr.hs - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/Expr.hs - compiler/GHC/Tc/Gen/App.hs Changes: ===================================== compiler/GHC/Parser/Errors/Ppr.hs ===================================== @@ -39,6 +39,7 @@ import Data.List.NonEmpty (NonEmpty((:|))) import GHC.Hs.Pat (Pat(..), LPat) import GHC.Hs.Extension import GHC.Parser.Annotation (noAnn) +import GHC.Types.Name (isUnderscore, HasOccName (..)) instance Diagnostic PsMessage where @@ -842,7 +843,7 @@ instance Diagnostic PsMessage where -- Sadly 'foreign import' still barfs 'parse error' because -- 'import' is a keyword -- looks_like :: RdrName -> LHsExpr GhcPsErr -> Bool -- AZ - looks_like s (L _ (HsVar _ (L _ v))) = v == s + looks_like s (L _ (HsVar _ (L _ v))) | not (isUnderscore (occName v)) = v == s looks_like s (L _ (HsApp _ lhs _)) = looks_like s lhs looks_like _ _ = False ===================================== compiler/GHC/Parser/PostProcess.hs ===================================== @@ -1208,6 +1208,7 @@ checkContextExpr orig_expr@(L (EpAnn l _ cs) _) = = check (opi ++ [open_tok], close_tok : cpi, csi) expr check (oparens,cparens,cs) (L _ (HsVar _ (L (EpAnn _ (NameAnnOnly (NameParens open closed) []) _) name))) | name == nameRdrName (dataConName unitDataCon) + , not (isUnderscore (occName name)) = mkCTuple (oparens ++ [open], closed : cparens, cs) [] check _ _ = unprocessed @@ -2867,6 +2868,7 @@ mkRecConstrOrUpdate -> PV (HsExpr GhcPs) mkRecConstrOrUpdate _ (L _ (HsVar _ (L l c))) _lrec (fbinds,dd) anns | isRdrDataCon c + , not (isUnderscore (occName c)) = do let (fs, ps) = partitionEithers fbinds case ps of ===================================== compiler/GHC/Rename/Expr.hs ===================================== @@ -321,12 +321,9 @@ rnUnboundVar (L l v) = do uniq <- newUnique return (HsVar (Unbound ()) (L l (mkUnboundNameRdr_ uniq v noSrcSpan)), emptyFVs) -rnExpr (HsVar NoExtField (L l v)) +rnExpr (HsVar NoExtField lv@(L l v)) | isUnderscore (rdrNameOcc v) - = do - -- TODO: use rnUnboundVar/deduplicate? - uniq <- newUnique - return (HsVar (Unbound ()) (L l (mkUnboundNameRdr_ uniq v noSrcSpan)), emptyFVs) + = rnUnboundVar lv rnExpr (HsVar NoExtField locatedRdrName@(L l v)) | otherwise = do { dflags <- getDynFlags ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -956,7 +956,7 @@ tcVDQ conc_tvs (tvb, inner_ty) arg ; tc_inst_forall_arg conc_tvs (tvb, inner_ty) hs_wc_ty } -- Convert a HsExpr into the equivalent HsType. --- See [RequiredTypeArguments and the T2T mapping] +-- See Note [RequiredTypeArguments and the T2T mapping] expr_to_type :: LHsExpr GhcRn -> TcM (LHsWcType GhcRn) expr_to_type earg = case stripParensLHsExpr earg of View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9eb5ce46901dbebf38e90f411e06b9c7e036c21f...bdaba97fe7dd32561402ac76a47775940ebb0bb0 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9eb5ce46901dbebf38e90f411e06b9c7e036c21f...bdaba97fe7dd32561402ac76a47775940ebb0bb0 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 12:48:02 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Wed, 20 Nov 2024 07:48:02 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] Improve reachability queries on ModuleGraph Message-ID: <673dda82a7d02_23a38561e9b468171@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 895e0c00 by Rodrigo Mesquita at 2024-11-20T12:40:44+00:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to _ Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. - - - - - 7 changed files: - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/ghc.cabal.in Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -8,13 +8,14 @@ module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq, - graphFromVerticesAndAdjacency, + graphFromVerticesAndAdjacency, emptyGraph, SCC(..), Node(..), G.flattenSCC, G.flattenSCCs, stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -43,7 +44,6 @@ module GHC.Data.Graph.Directed ( -- removed them since they were not used anywhere in GHC. ------------------------------------------------------------------------------ - import GHC.Prelude import GHC.Utils.Misc ( sortWith, count ) @@ -60,13 +60,13 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph ( Vertex, Bounds, SCC(..) ) -- Used in the underlying representation -import Data.Tree import GHC.Types.Unique import GHC.Types.Unique.FM -import qualified Data.IntMap as IM -import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S + +-- The graph internals are defined in the .Internal module so they can be +-- imported by GHC.Data.Graph.Directed.Reachability while still allowing this +-- module to export it abstractly. +import GHC.Data.Graph.Directed.Internal {- ************************************************************************ @@ -86,14 +86,6 @@ Note [Nodes, keys, vertices] arranged densely in 0.n -} -data Graph node = Graph { - gr_int_graph :: IntGraph, - gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex - } - -data Edge node = Edge node node - {-| Representation for nodes of the Graph. * The @payload@ is user data, just carried around in this module @@ -357,51 +349,22 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] - outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] reachablesG graph froms = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node -verticesG :: Graph node -> [node] -verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) - -edgesG :: Graph node -> [Edge node] -edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) - where v2n = gr_vertex_to_node graph - transposeG :: Graph node -> Graph node transposeG graph = Graph (G.transposeG (gr_int_graph graph)) (gr_vertex_to_node graph) @@ -410,112 +373,10 @@ transposeG graph = Graph (G.transposeG (gr_int_graph graph)) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -{- -************************************************************************ -* * -* Showing Graphs -* * -************************************************************************ --} - -instance Outputable node => Outputable (Graph node) where - ppr graph = vcat [ - hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), - hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) - ] - -instance Outputable node => Outputable (Edge node) where - ppr (Edge from to) = ppr from <+> text "->" <+> ppr to - graphEmpty :: G.Graph -> Bool graphEmpty g = lo > hi where (lo, hi) = bounds g -{- -************************************************************************ -* * -* IntGraphs -* * -************************************************************************ --} - -type IntGraph = G.Graph - -{- ------------------------------------------------------------- --- Depth first search numbering ------------------------------------------------------------- --} - --- Data.Tree has flatten for Tree, but nothing for Forest -preorderF :: Forest a -> [a] -preorderF ts = concatMap flatten ts - -{- ------------------------------------------------------------- --- Finding reachable vertices ------------------------------------------------------------- --} - --- This generalizes reachable which was found in Data.Graph -reachable :: IntGraph -> [Vertex] -> [Vertex] -reachable g vs = preorderF (G.dfs g vs) - -reachableGraph :: IntGraph -> IM.IntMap IS.IntSet -reachableGraph g = res - where - do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) - res = IM.fromList [(v, do_one v) | v <- G.vertices g] - -scc :: IntGraph -> [SCC Vertex] -scc graph = map decode forest - where - forest = {-# SCC "Digraph.scc" #-} G.scc graph - - decode (Node v []) | mentions_itself v = CyclicSCC [v] - | otherwise = AcyclicSCC v - decode other = CyclicSCC (dec other []) - where dec (Node v ts) vs = v : foldr dec vs ts - mentions_itself v = v `elem` (graph ! v) - -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) {- ************************************************************************ @@ -623,3 +484,4 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + ===================================== compiler/GHC/Data/Graph/Directed/Internal.hs ===================================== @@ -0,0 +1,79 @@ +module GHC.Data.Graph.Directed.Internal where + +import GHC.Prelude +import GHC.Utils.Outputable + +import Data.Array +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) -- Used in the underlying representation +import Data.Tree + +data Graph node = Graph { + gr_int_graph :: IntGraph, + gr_vertex_to_node :: Vertex -> node, + gr_node_to_vertex :: node -> Maybe Vertex +} + +data Edge node = Edge node node + +------------------------------------------------------------ +-- Nodes and Edges +------------------------------------------------------------ + +verticesG :: Graph node -> [node] +verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) + +edgesG :: Graph node -> [Edge node] +edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) + where v2n = gr_vertex_to_node graph + +------------------------------------------------------------ +-- Showing Graphs +------------------------------------------------------------ + +instance Outputable node => Outputable (Graph node) where + ppr graph = vcat [ + hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), + hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) + ] + +instance Outputable node => Outputable (Edge node) where + ppr (Edge from to) = ppr from <+> text "->" <+> ppr to + +{- +************************************************************************ +* * +* IntGraphs +* * +************************************************************************ +-} + +type IntGraph = G.Graph + +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + +scc :: IntGraph -> [SCC Vertex] +scc graph = map decode forest + where + forest = {-# SCC "Digraph.scc" #-} G.scc graph + + decode (Node v []) | mentions_itself v = CyclicSCC [v] + | otherwise = AcyclicSCC v + decode other = CyclicSCC (dec other []) + where dec (Node v ts) vs = v : foldr dec vs ts + mentions_itself v = v `elem` (graph ! v) + ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -0,0 +1,168 @@ +-- | An abstract interface for a fast reachability data structure constructed +-- from a 'GHC.Data.Graph.Directed' graph. +module GHC.Data.Graph.Directed.Reachability + ( ReachabilityIndex + + -- * Constructing a reachability index + , graphReachability, cyclicGraphReachability + + -- * Reachability queries + , allReachable, allReachableMany + , isReachable, isReachableMany + ) + where + +import GHC.Prelude +import GHC.Data.Maybe + +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) + +import Data.Array ((!)) +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS + +import GHC.Data.Graph.Directed.Internal + +-------------------------------------------------------------------------------- +-- * Reachability index +-------------------------------------------------------------------------------- + +-- | The abstract data structure for fast reachability queries +data ReachabilityIndex node = ReachabilityIndex { + index :: IM.IntMap IS.IntSet, + from_vertex :: Vertex -> node, + to_vertex :: node -> Maybe Vertex +} + +-------------------------------------------------------------------------------- +-- * Construction +-------------------------------------------------------------------------------- + +-- | Construct a 'ReachabilityIndex' from an acyclic 'Graph'. +-- If the graph can have cycles, use 'cyclicGraphReachability' +graphReachability :: Graph node -> ReachabilityIndex node +graphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraph, from_vertex = from, to_vertex = to} + where + reachableGraph :: IM.IntMap IS.IntSet + reachableGraph = IM.fromList [(v, do_one v) | v <- G.vertices g] + + do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) + +-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. +cyclicGraphReachability :: Graph node -> ReachabilityIndex node +cyclicGraphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} + where + reachableGraphCyclic :: IM.IntMap IS.IntSet + reachableGraphCyclic = foldl' add_one_comp mempty comps + + neighboursOf v = g!v + + comps = scc g + + -- To avoid divergence on cyclic input, we build the result + -- strongly connected component by component, in topological + -- order. For each SCC, we know that: + -- + -- * All vertices in the component can reach all other vertices + -- in the component ("local" reachables) + -- + -- * Other reachable vertices ("remote" reachables) must come + -- from earlier components, either via direct neighbourhood, or + -- transitively from earlier reachability map + -- + -- This allows us to build the extension of the reachability map + -- directly, without any self-reference, thereby avoiding a loop. + add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet + add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier + where + earlier_neighbours = neighboursOf v + earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours + all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) + add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier + where + all_locals = IS.fromList vs + local v = IS.delete v all_locals + -- Arguably, for a cyclic SCC we should include each + -- vertex in its own reachable set. However, this could + -- lead to a lot of extra pain in client code to avoid + -- looping when traversing the reachability map. + all_neighbours = IS.fromList (concatMap neighboursOf vs) + earlier_neighbours = all_neighbours IS.\\ all_locals + earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) + all_remotes = IS.unions (earlier_neighbours : earlier_further) + +-------------------------------------------------------------------------------- +-- * Reachability queries +-------------------------------------------------------------------------------- + +-- | 'allReachable' returns the nodes reachable from the given @root@ node. +-- +-- Properties: +-- * The list of nodes /does not/ include the @root@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(1)$ complexity. +-- +-- If you need a topologically sorted list, consider using the functions exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead. +allReachable :: ReachabilityIndex node -> node {-^ The @root@ node -} -> [node] {-^ All nodes reachable from @root@ -} +allReachable (ReachabilityIndex index from to) root = map from result + where root_i = expectJust "reachableFrom" (to root) + hits = {-# SCC "allReachable" #-} IM.lookup root_i index + result = IS.toList $! expectJust "reachableFrom" hits + +-- | 'allReachableMany' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes /does not/ include the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableMany :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = {-# SCC "allReachableMany" #-} + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i + +-- | Fast reachability query. +-- +-- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ +-- asks whether @b@ can be reached through @g@ starting from @a at . +-- +-- Properties: +-- * No self loops, i.e. @isReachable _ a a == False@ +-- * This function has $O(1)$ complexity. +isReachable :: ReachabilityIndex node {-^ @g@ -} + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +isReachable (ReachabilityIndex index _ to) a b = + IS.member b_i $ + expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + +-- | Fast reachability query with many roots. +-- +-- On graph @g@ with many nodes @roots@ and node @b@, @isReachableMany g as b@ +-- asks whether @b@ can be reached through @g@ from any of the @roots at . +-- +-- Properties: +-- * No self loops, i.e. @isReachableMany _ [a] a == False@ +-- * This function is $O(n)$ in the number of roots +isReachableMany :: ReachabilityIndex node -- ^ @g@ + -> [node] -- ^ @roots@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from any of the @roots@ +isReachableMany (ReachabilityIndex index _ to) roots b = + IS.member b_i $ + IS.unions $ + map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i + where roots_i = [ v | Just v <- map to roots ] + b_i = expectJust "reachablesQuery:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,7 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import GHC.Data.Graph.Directed.Reachability -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +612,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1499,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:allReachable (graphReachability graph) root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1821,20 +1823,15 @@ checkHomeUnitsClosed ue | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)] where home_id_set = unitEnv_keys $ ue_home_unit_graph ue - bad_unit_ids = upwards_closure Set.\\ home_id_set + bad_unit_ids = upwards_closure Set.\\ home_id_set {- Remove all home units reached, keep only bad nodes -} rootLoc = mkGeneralSrcSpan (fsLit "") - graph :: Graph (Node UnitId UnitId) - graph = graphFromEdgedVerticesUniq graphNodes + downwards_closure :: Graph (Node UnitId UnitId) + downwards_closure = graphFromEdgedVerticesUniq graphNodes - -- downwards closure of graph - downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + inverse_closure = graphReachability $ transposeG downwards_closure - inverse_closure = transposeG downwards_closure - - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ allReachableMany inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -49,6 +50,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Data.Maybe import GHC.Data.Graph.Directed +import GHC.Data.Graph.Directed.Reachability import GHC.Driver.Backend import GHC.Driver.DynFlags @@ -72,6 +74,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +156,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,12 +176,11 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = mkTransDeps new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +201,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +214,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +391,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +409,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + ===================================== compiler/ghc.cabal.in ===================================== @@ -444,6 +444,8 @@ Library GHC.Data.Graph.Color GHC.Data.Graph.Collapse GHC.Data.Graph.Directed + GHC.Data.Graph.Directed.Internal + GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.Inductive.Graph GHC.Data.Graph.Inductive.PatriciaTree GHC.Data.Graph.Ops View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/895e0c0089a38e9dcfcc8b6f0b19390eee2ee903 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/895e0c0089a38e9dcfcc8b6f0b19390eee2ee903 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 13:00:26 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 20 Nov 2024 08:00:26 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] 2 commits: Teach sphinx about since in ghc-flags Message-ID: <673ddd6aef5f8_23a385722d60721e@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 53ee77a1 by Zubin Duggal at 2024-11-20T18:30:01+05:30 Teach sphinx about since in ghc-flags - - - - - b6e3803f by Matthew Pickering at 2024-11-20T18:30:01+05:30 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 14 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/flags.py - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,16 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl use a different base if they are going to guarantee it is available. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/flags.py ===================================== @@ -627,12 +627,13 @@ def purge_flags(app, env, docname): ### Initialization def setup(app): + from sphinx.util.docfields import Field # The override argument to add_directive_to_domain is only supported by >= 1.8 sphinx_version = parse_version(sphinx.__version__) override_arg = {'override': True} if sphinx_version >= parse_version('1.8') else {} # Add ghc-flag directive, and override the class with our own - app.add_object_type('ghc-flag', 'ghc-flag') + app.add_object_type('ghc-flag', 'ghc-flag', doc_field_types=[Field('since', label='Introduced in GHC version', names=['since'])]) app.add_directive_to_domain('std', 'ghc-flag', Flag, **override_arg) # Add extension directive, and override the class with our own ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,28 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + :since: 9.12.1 + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d0d4b554b041cfee834be5d4525568289340c3c3...b6e3803f3eff54da1d07a52b6f2aaf32bbc76db8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d0d4b554b041cfee834be5d4525568289340c3c3...b6e3803f3eff54da1d07a52b6f2aaf32bbc76db8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 13:04:55 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Wed, 20 Nov 2024 08:04:55 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] Improve reachability queries on ModuleGraph Message-ID: <673dde774b2c8_23a385789b1473097@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 328f97f1 by Rodrigo Mesquita at 2024-11-20T13:03:42+00:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. - - - - - 7 changed files: - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/ghc.cabal.in Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -8,13 +8,14 @@ module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq, - graphFromVerticesAndAdjacency, + graphFromVerticesAndAdjacency, emptyGraph, SCC(..), Node(..), G.flattenSCC, G.flattenSCCs, stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -43,7 +44,6 @@ module GHC.Data.Graph.Directed ( -- removed them since they were not used anywhere in GHC. ------------------------------------------------------------------------------ - import GHC.Prelude import GHC.Utils.Misc ( sortWith, count ) @@ -60,13 +60,13 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph ( Vertex, Bounds, SCC(..) ) -- Used in the underlying representation -import Data.Tree import GHC.Types.Unique import GHC.Types.Unique.FM -import qualified Data.IntMap as IM -import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S + +-- The graph internals are defined in the .Internal module so they can be +-- imported by GHC.Data.Graph.Directed.Reachability while still allowing this +-- module to export it abstractly. +import GHC.Data.Graph.Directed.Internal {- ************************************************************************ @@ -86,14 +86,6 @@ Note [Nodes, keys, vertices] arranged densely in 0.n -} -data Graph node = Graph { - gr_int_graph :: IntGraph, - gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex - } - -data Edge node = Edge node node - {-| Representation for nodes of the Graph. * The @payload@ is user data, just carried around in this module @@ -357,51 +349,22 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] - outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] reachablesG graph froms = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node -verticesG :: Graph node -> [node] -verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) - -edgesG :: Graph node -> [Edge node] -edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) - where v2n = gr_vertex_to_node graph - transposeG :: Graph node -> Graph node transposeG graph = Graph (G.transposeG (gr_int_graph graph)) (gr_vertex_to_node graph) @@ -410,112 +373,10 @@ transposeG graph = Graph (G.transposeG (gr_int_graph graph)) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -{- -************************************************************************ -* * -* Showing Graphs -* * -************************************************************************ --} - -instance Outputable node => Outputable (Graph node) where - ppr graph = vcat [ - hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), - hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) - ] - -instance Outputable node => Outputable (Edge node) where - ppr (Edge from to) = ppr from <+> text "->" <+> ppr to - graphEmpty :: G.Graph -> Bool graphEmpty g = lo > hi where (lo, hi) = bounds g -{- -************************************************************************ -* * -* IntGraphs -* * -************************************************************************ --} - -type IntGraph = G.Graph - -{- ------------------------------------------------------------- --- Depth first search numbering ------------------------------------------------------------- --} - --- Data.Tree has flatten for Tree, but nothing for Forest -preorderF :: Forest a -> [a] -preorderF ts = concatMap flatten ts - -{- ------------------------------------------------------------- --- Finding reachable vertices ------------------------------------------------------------- --} - --- This generalizes reachable which was found in Data.Graph -reachable :: IntGraph -> [Vertex] -> [Vertex] -reachable g vs = preorderF (G.dfs g vs) - -reachableGraph :: IntGraph -> IM.IntMap IS.IntSet -reachableGraph g = res - where - do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) - res = IM.fromList [(v, do_one v) | v <- G.vertices g] - -scc :: IntGraph -> [SCC Vertex] -scc graph = map decode forest - where - forest = {-# SCC "Digraph.scc" #-} G.scc graph - - decode (Node v []) | mentions_itself v = CyclicSCC [v] - | otherwise = AcyclicSCC v - decode other = CyclicSCC (dec other []) - where dec (Node v ts) vs = v : foldr dec vs ts - mentions_itself v = v `elem` (graph ! v) - -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) {- ************************************************************************ @@ -623,3 +484,4 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + ===================================== compiler/GHC/Data/Graph/Directed/Internal.hs ===================================== @@ -0,0 +1,79 @@ +module GHC.Data.Graph.Directed.Internal where + +import GHC.Prelude +import GHC.Utils.Outputable + +import Data.Array +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) -- Used in the underlying representation +import Data.Tree + +data Graph node = Graph { + gr_int_graph :: IntGraph, + gr_vertex_to_node :: Vertex -> node, + gr_node_to_vertex :: node -> Maybe Vertex +} + +data Edge node = Edge node node + +------------------------------------------------------------ +-- Nodes and Edges +------------------------------------------------------------ + +verticesG :: Graph node -> [node] +verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) + +edgesG :: Graph node -> [Edge node] +edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) + where v2n = gr_vertex_to_node graph + +------------------------------------------------------------ +-- Showing Graphs +------------------------------------------------------------ + +instance Outputable node => Outputable (Graph node) where + ppr graph = vcat [ + hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), + hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) + ] + +instance Outputable node => Outputable (Edge node) where + ppr (Edge from to) = ppr from <+> text "->" <+> ppr to + +{- +************************************************************************ +* * +* IntGraphs +* * +************************************************************************ +-} + +type IntGraph = G.Graph + +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + +scc :: IntGraph -> [SCC Vertex] +scc graph = map decode forest + where + forest = {-# SCC "Digraph.scc" #-} G.scc graph + + decode (Node v []) | mentions_itself v = CyclicSCC [v] + | otherwise = AcyclicSCC v + decode other = CyclicSCC (dec other []) + where dec (Node v ts) vs = v : foldr dec vs ts + mentions_itself v = v `elem` (graph ! v) + ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -0,0 +1,168 @@ +-- | An abstract interface for a fast reachability data structure constructed +-- from a 'GHC.Data.Graph.Directed' graph. +module GHC.Data.Graph.Directed.Reachability + ( ReachabilityIndex + + -- * Constructing a reachability index + , graphReachability, cyclicGraphReachability + + -- * Reachability queries + , allReachable, allReachableMany + , isReachable, isReachableMany + ) + where + +import GHC.Prelude +import GHC.Data.Maybe + +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) + +import Data.Array ((!)) +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS + +import GHC.Data.Graph.Directed.Internal + +-------------------------------------------------------------------------------- +-- * Reachability index +-------------------------------------------------------------------------------- + +-- | The abstract data structure for fast reachability queries +data ReachabilityIndex node = ReachabilityIndex { + index :: IM.IntMap IS.IntSet, + from_vertex :: Vertex -> node, + to_vertex :: node -> Maybe Vertex +} + +-------------------------------------------------------------------------------- +-- * Construction +-------------------------------------------------------------------------------- + +-- | Construct a 'ReachabilityIndex' from an acyclic 'Graph'. +-- If the graph can have cycles, use 'cyclicGraphReachability' +graphReachability :: Graph node -> ReachabilityIndex node +graphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraph, from_vertex = from, to_vertex = to} + where + reachableGraph :: IM.IntMap IS.IntSet + reachableGraph = IM.fromList [(v, do_one v) | v <- G.vertices g] + + do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) + +-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. +cyclicGraphReachability :: Graph node -> ReachabilityIndex node +cyclicGraphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} + where + reachableGraphCyclic :: IM.IntMap IS.IntSet + reachableGraphCyclic = foldl' add_one_comp mempty comps + + neighboursOf v = g!v + + comps = scc g + + -- To avoid divergence on cyclic input, we build the result + -- strongly connected component by component, in topological + -- order. For each SCC, we know that: + -- + -- * All vertices in the component can reach all other vertices + -- in the component ("local" reachables) + -- + -- * Other reachable vertices ("remote" reachables) must come + -- from earlier components, either via direct neighbourhood, or + -- transitively from earlier reachability map + -- + -- This allows us to build the extension of the reachability map + -- directly, without any self-reference, thereby avoiding a loop. + add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet + add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier + where + earlier_neighbours = neighboursOf v + earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours + all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) + add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier + where + all_locals = IS.fromList vs + local v = IS.delete v all_locals + -- Arguably, for a cyclic SCC we should include each + -- vertex in its own reachable set. However, this could + -- lead to a lot of extra pain in client code to avoid + -- looping when traversing the reachability map. + all_neighbours = IS.fromList (concatMap neighboursOf vs) + earlier_neighbours = all_neighbours IS.\\ all_locals + earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) + all_remotes = IS.unions (earlier_neighbours : earlier_further) + +-------------------------------------------------------------------------------- +-- * Reachability queries +-------------------------------------------------------------------------------- + +-- | 'allReachable' returns the nodes reachable from the given @root@ node. +-- +-- Properties: +-- * The list of nodes /does not/ include the @root@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(1)$ complexity. +-- +-- If you need a topologically sorted list, consider using the functions exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead. +allReachable :: ReachabilityIndex node -> node {-^ The @root@ node -} -> [node] {-^ All nodes reachable from @root@ -} +allReachable (ReachabilityIndex index from to) root = map from result + where root_i = expectJust "reachableFrom" (to root) + hits = {-# SCC "allReachable" #-} IM.lookup root_i index + result = IS.toList $! expectJust "reachableFrom" hits + +-- | 'allReachableMany' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes /does not/ include the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableMany :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = {-# SCC "allReachableMany" #-} + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i + +-- | Fast reachability query. +-- +-- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ +-- asks whether @b@ can be reached through @g@ starting from @a at . +-- +-- Properties: +-- * No self loops, i.e. @isReachable _ a a == False@ +-- * This function has $O(1)$ complexity. +isReachable :: ReachabilityIndex node {-^ @g@ -} + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +isReachable (ReachabilityIndex index _ to) a b = + IS.member b_i $ + expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + +-- | Fast reachability query with many roots. +-- +-- On graph @g@ with many nodes @roots@ and node @b@, @isReachableMany g as b@ +-- asks whether @b@ can be reached through @g@ from any of the @roots at . +-- +-- Properties: +-- * No self loops, i.e. @isReachableMany _ [a] a == False@ +-- * This function is $O(n)$ in the number of roots +isReachableMany :: ReachabilityIndex node -- ^ @g@ + -> [node] -- ^ @roots@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from any of the @roots@ +isReachableMany (ReachabilityIndex index _ to) roots b = + IS.member b_i $ + IS.unions $ + map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i + where roots_i = [ v | Just v <- map to roots ] + b_i = expectJust "reachablesQuery:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,7 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import GHC.Data.Graph.Directed.Reachability -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +612,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1499,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:allReachable (graphReachability graph) root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1821,20 +1823,15 @@ checkHomeUnitsClosed ue | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)] where home_id_set = unitEnv_keys $ ue_home_unit_graph ue - bad_unit_ids = upwards_closure Set.\\ home_id_set + bad_unit_ids = upwards_closure Set.\\ home_id_set {- Remove all home units reached, keep only bad nodes -} rootLoc = mkGeneralSrcSpan (fsLit "") - graph :: Graph (Node UnitId UnitId) - graph = graphFromEdgedVerticesUniq graphNodes + downwards_closure :: Graph (Node UnitId UnitId) + downwards_closure = graphFromEdgedVerticesUniq graphNodes - -- downwards closure of graph - downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + inverse_closure = graphReachability $ transposeG downwards_closure - inverse_closure = transposeG downwards_closure - - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ allReachableMany inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -49,6 +50,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Data.Maybe import GHC.Data.Graph.Directed +import GHC.Data.Graph.Directed.Reachability import GHC.Driver.Backend import GHC.Driver.DynFlags @@ -72,6 +74,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +156,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,12 +176,11 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = mkTransDeps new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +201,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +214,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +391,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +409,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + ===================================== compiler/ghc.cabal.in ===================================== @@ -444,6 +444,8 @@ Library GHC.Data.Graph.Color GHC.Data.Graph.Collapse GHC.Data.Graph.Directed + GHC.Data.Graph.Directed.Internal + GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.Inductive.Graph GHC.Data.Graph.Inductive.PatriciaTree GHC.Data.Graph.Ops View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/328f97f1856d014582d35f4854df66626cc4ff65 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/328f97f1856d014582d35f4854df66626cc4ff65 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 13:44:47 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Wed, 20 Nov 2024 08:44:47 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] driver: Always link against "base" package when one shot linking Message-ID: <673de7cfb81fe_23a385ab4b2c766cc@gitlab.mail> Andreas Klebinger pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: d544099d by Matthew Pickering at 2024-11-20T14:24:45+01:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 13 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,17 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl link against a different base package by default. +dnl If the package is unavailable it will simply not be linked against. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,26 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + + By default the compiler will link against the ``base`` and ``rts`` package, this + flag controls what the ``base`` package linked against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d544099dd7e8c6c3cca16f586ae631da0f4cc6a8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d544099dd7e8c6c3cca16f586ae631da0f4cc6a8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 13:45:27 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Wed, 20 Nov 2024 08:45:27 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] 120 commits: linker: add --optimistic-linking flag Message-ID: <673de7f71c55b_23a385ac424877386@gitlab.mail> Andreas Klebinger pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - f3f206b1 by Matthew Pickering at 2024-11-20T14:25:23+01:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 30 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot - compiler/GHC/Core/Coercion/Opt.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CprAnal.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d544099dd7e8c6c3cca16f586ae631da0f4cc6a8...f3f206b1f7c9b493c57cd941027d47923bb47c15 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d544099dd7e8c6c3cca16f586ae631da0f4cc6a8...f3f206b1f7c9b493c57cd941027d47923bb47c15 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 13:52:20 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 20 Nov 2024 08:52:20 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] 2 commits: Teach sphinx about since in ghc-flags Message-ID: <673de994cf4ad_3a60be153d1c793a2@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 53ee77a1 by Zubin Duggal at 2024-11-20T18:30:01+05:30 Teach sphinx about since in ghc-flags - - - - - b6e3803f by Matthew Pickering at 2024-11-20T18:30:01+05:30 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 14 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/flags.py - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,16 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl use a different base if they are going to guarantee it is available. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/flags.py ===================================== @@ -627,12 +627,13 @@ def purge_flags(app, env, docname): ### Initialization def setup(app): + from sphinx.util.docfields import Field # The override argument to add_directive_to_domain is only supported by >= 1.8 sphinx_version = parse_version(sphinx.__version__) override_arg = {'override': True} if sphinx_version >= parse_version('1.8') else {} # Add ghc-flag directive, and override the class with our own - app.add_object_type('ghc-flag', 'ghc-flag') + app.add_object_type('ghc-flag', 'ghc-flag', doc_field_types=[Field('since', label='Introduced in GHC version', names=['since'])]) app.add_directive_to_domain('std', 'ghc-flag', Flag, **override_arg) # Add extension directive, and override the class with our own ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,28 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + :since: 9.12.1 + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f3f206b1f7c9b493c57cd941027d47923bb47c15...b6e3803f3eff54da1d07a52b6f2aaf32bbc76db8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f3f206b1f7c9b493c57cd941027d47923bb47c15...b6e3803f3eff54da1d07a52b6f2aaf32bbc76db8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 14:00:07 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 20 Nov 2024 09:00:07 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] driver: Always link against "base" package when one shot linking Message-ID: <673deb6779fd7_3a60be153d1c80048@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: b24632a2 by Matthew Pickering at 2024-11-20T19:29:56+05:30 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 13 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,17 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl link against a different base package by default. +dnl If the package is unavailable it will simply not be linked against. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,28 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + :since: 9.12.1 + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b24632a297eeacdf380035c23f5afb0c7952fc60 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b24632a297eeacdf380035c23f5afb0c7952fc60 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 14:00:38 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 20 Nov 2024 09:00:38 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] hadrian: Accept unused imports in filepath Message-ID: <673deb864a709_3a60be1ddeb8807fd@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 1db0547d by Ben Gamari at 2024-11-20T08:59:37-05:00 hadrian: Accept unused imports in filepath As noted in filepath#241 [1], `filepath-1.4.301.0` is not `-Werror`-clean. [1] https://github.com/haskell/filepath/issues/241 - - - - - 1 changed file: - hadrian/src/Settings/Warnings.hs Changes: ===================================== hadrian/src/Settings/Warnings.hs ===================================== @@ -26,6 +26,7 @@ ghcWarningsArgs = do mconcat [ stage0 ? mconcat [ libraryPackage ? pure [ "-fno-warn-deprecated-flags" ] + , package filepath ? pure [ "-fno-warn-unused-imports" ] , package terminfo ? pure [ "-fno-warn-unused-imports" ] , package transformers ? pure [ "-fno-warn-unused-matches" , "-fno-warn-unused-imports" ] ] @@ -38,6 +39,7 @@ ghcWarningsArgs = do , package directory ? pure [ "-Wno-unused-imports" , "-Wno-deprecations" -- https://gitlab.haskell.org/ghc/ghc/-/issues/24240 ] + , package filepath ? pure [ "-fno-warn-unused-imports" ] , package ghc ? pure [ "-Wcpp-undef" , "-Wincomplete-uni-patterns" , "-Wincomplete-record-updates" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1db0547dadc60431d381fdbf2c70d40e5438da77 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1db0547dadc60431d381fdbf2c70d40e5438da77 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 15:18:00 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 20 Nov 2024 10:18:00 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] driver: Always link against "base" package when one shot linking Message-ID: <673dfda821d4a_39d2013b7a189969e@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 32017a7f by Matthew Pickering at 2024-11-20T20:47:50+05:30 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 13 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,17 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl link against a different base package by default. +dnl If the package is unavailable it will simply not be linked against. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,27 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/32017a7f0d1005700e7ca7e4e0c03881a3715db6 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/32017a7f0d1005700e7ca7e4e0c03881a3715db6 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 15:23:35 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Wed, 20 Nov 2024 10:23:35 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] Improve reachability queries on ModuleGraph Message-ID: <673dfef71a14d_39d2012041d01017f5@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 9f540e48 by Rodrigo Mesquita at 2024-11-20T14:49:37+00:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. ------------------------- Metric Decrease: mhu-perf ------------------------- - - - - - 7 changed files: - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/ghc.cabal.in Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -8,13 +8,14 @@ module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq, - graphFromVerticesAndAdjacency, + graphFromVerticesAndAdjacency, emptyGraph, SCC(..), Node(..), G.flattenSCC, G.flattenSCCs, stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -43,7 +44,6 @@ module GHC.Data.Graph.Directed ( -- removed them since they were not used anywhere in GHC. ------------------------------------------------------------------------------ - import GHC.Prelude import GHC.Utils.Misc ( sortWith, count ) @@ -60,13 +60,13 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph ( Vertex, Bounds, SCC(..) ) -- Used in the underlying representation -import Data.Tree import GHC.Types.Unique import GHC.Types.Unique.FM -import qualified Data.IntMap as IM -import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S + +-- The graph internals are defined in the .Internal module so they can be +-- imported by GHC.Data.Graph.Directed.Reachability while still allowing this +-- module to export it abstractly. +import GHC.Data.Graph.Directed.Internal {- ************************************************************************ @@ -86,14 +86,6 @@ Note [Nodes, keys, vertices] arranged densely in 0.n -} -data Graph node = Graph { - gr_int_graph :: IntGraph, - gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex - } - -data Edge node = Edge node node - {-| Representation for nodes of the Graph. * The @payload@ is user data, just carried around in this module @@ -357,51 +349,22 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] - outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] reachablesG graph froms = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node -verticesG :: Graph node -> [node] -verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) - -edgesG :: Graph node -> [Edge node] -edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) - where v2n = gr_vertex_to_node graph - transposeG :: Graph node -> Graph node transposeG graph = Graph (G.transposeG (gr_int_graph graph)) (gr_vertex_to_node graph) @@ -410,112 +373,10 @@ transposeG graph = Graph (G.transposeG (gr_int_graph graph)) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -{- -************************************************************************ -* * -* Showing Graphs -* * -************************************************************************ --} - -instance Outputable node => Outputable (Graph node) where - ppr graph = vcat [ - hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), - hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) - ] - -instance Outputable node => Outputable (Edge node) where - ppr (Edge from to) = ppr from <+> text "->" <+> ppr to - graphEmpty :: G.Graph -> Bool graphEmpty g = lo > hi where (lo, hi) = bounds g -{- -************************************************************************ -* * -* IntGraphs -* * -************************************************************************ --} - -type IntGraph = G.Graph - -{- ------------------------------------------------------------- --- Depth first search numbering ------------------------------------------------------------- --} - --- Data.Tree has flatten for Tree, but nothing for Forest -preorderF :: Forest a -> [a] -preorderF ts = concatMap flatten ts - -{- ------------------------------------------------------------- --- Finding reachable vertices ------------------------------------------------------------- --} - --- This generalizes reachable which was found in Data.Graph -reachable :: IntGraph -> [Vertex] -> [Vertex] -reachable g vs = preorderF (G.dfs g vs) - -reachableGraph :: IntGraph -> IM.IntMap IS.IntSet -reachableGraph g = res - where - do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) - res = IM.fromList [(v, do_one v) | v <- G.vertices g] - -scc :: IntGraph -> [SCC Vertex] -scc graph = map decode forest - where - forest = {-# SCC "Digraph.scc" #-} G.scc graph - - decode (Node v []) | mentions_itself v = CyclicSCC [v] - | otherwise = AcyclicSCC v - decode other = CyclicSCC (dec other []) - where dec (Node v ts) vs = v : foldr dec vs ts - mentions_itself v = v `elem` (graph ! v) - -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) {- ************************************************************************ @@ -623,3 +484,4 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + ===================================== compiler/GHC/Data/Graph/Directed/Internal.hs ===================================== @@ -0,0 +1,79 @@ +module GHC.Data.Graph.Directed.Internal where + +import GHC.Prelude +import GHC.Utils.Outputable + +import Data.Array +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) -- Used in the underlying representation +import Data.Tree + +data Graph node = Graph { + gr_int_graph :: IntGraph, + gr_vertex_to_node :: Vertex -> node, + gr_node_to_vertex :: node -> Maybe Vertex +} + +data Edge node = Edge node node + +------------------------------------------------------------ +-- Nodes and Edges +------------------------------------------------------------ + +verticesG :: Graph node -> [node] +verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) + +edgesG :: Graph node -> [Edge node] +edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) + where v2n = gr_vertex_to_node graph + +------------------------------------------------------------ +-- Showing Graphs +------------------------------------------------------------ + +instance Outputable node => Outputable (Graph node) where + ppr graph = vcat [ + hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), + hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) + ] + +instance Outputable node => Outputable (Edge node) where + ppr (Edge from to) = ppr from <+> text "->" <+> ppr to + +{- +************************************************************************ +* * +* IntGraphs +* * +************************************************************************ +-} + +type IntGraph = G.Graph + +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + +scc :: IntGraph -> [SCC Vertex] +scc graph = map decode forest + where + forest = {-# SCC "Digraph.scc" #-} G.scc graph + + decode (Node v []) | mentions_itself v = CyclicSCC [v] + | otherwise = AcyclicSCC v + decode other = CyclicSCC (dec other []) + where dec (Node v ts) vs = v : foldr dec vs ts + mentions_itself v = v `elem` (graph ! v) + ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -0,0 +1,168 @@ +-- | An abstract interface for a fast reachability data structure constructed +-- from a 'GHC.Data.Graph.Directed' graph. +module GHC.Data.Graph.Directed.Reachability + ( ReachabilityIndex + + -- * Constructing a reachability index + , graphReachability, cyclicGraphReachability + + -- * Reachability queries + , allReachable, allReachableMany + , isReachable, isReachableMany + ) + where + +import GHC.Prelude +import GHC.Data.Maybe + +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) + +import Data.Array ((!)) +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS + +import GHC.Data.Graph.Directed.Internal + +-------------------------------------------------------------------------------- +-- * Reachability index +-------------------------------------------------------------------------------- + +-- | The abstract data structure for fast reachability queries +data ReachabilityIndex node = ReachabilityIndex { + index :: IM.IntMap IS.IntSet, + from_vertex :: Vertex -> node, + to_vertex :: node -> Maybe Vertex +} + +-------------------------------------------------------------------------------- +-- * Construction +-------------------------------------------------------------------------------- + +-- | Construct a 'ReachabilityIndex' from an acyclic 'Graph'. +-- If the graph can have cycles, use 'cyclicGraphReachability' +graphReachability :: Graph node -> ReachabilityIndex node +graphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraph, from_vertex = from, to_vertex = to} + where + reachableGraph :: IM.IntMap IS.IntSet + reachableGraph = IM.fromList [(v, do_one v) | v <- G.vertices g] + + do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) + +-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. +cyclicGraphReachability :: Graph node -> ReachabilityIndex node +cyclicGraphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} + where + reachableGraphCyclic :: IM.IntMap IS.IntSet + reachableGraphCyclic = foldl' add_one_comp mempty comps + + neighboursOf v = g!v + + comps = scc g + + -- To avoid divergence on cyclic input, we build the result + -- strongly connected component by component, in topological + -- order. For each SCC, we know that: + -- + -- * All vertices in the component can reach all other vertices + -- in the component ("local" reachables) + -- + -- * Other reachable vertices ("remote" reachables) must come + -- from earlier components, either via direct neighbourhood, or + -- transitively from earlier reachability map + -- + -- This allows us to build the extension of the reachability map + -- directly, without any self-reference, thereby avoiding a loop. + add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet + add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier + where + earlier_neighbours = neighboursOf v + earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours + all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) + add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier + where + all_locals = IS.fromList vs + local v = IS.delete v all_locals + -- Arguably, for a cyclic SCC we should include each + -- vertex in its own reachable set. However, this could + -- lead to a lot of extra pain in client code to avoid + -- looping when traversing the reachability map. + all_neighbours = IS.fromList (concatMap neighboursOf vs) + earlier_neighbours = all_neighbours IS.\\ all_locals + earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) + all_remotes = IS.unions (earlier_neighbours : earlier_further) + +-------------------------------------------------------------------------------- +-- * Reachability queries +-------------------------------------------------------------------------------- + +-- | 'allReachable' returns the nodes reachable from the given @root@ node. +-- +-- Properties: +-- * The list of nodes /does not/ include the @root@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(1)$ complexity. +-- +-- If you need a topologically sorted list, consider using the functions exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead. +allReachable :: ReachabilityIndex node -> node {-^ The @root@ node -} -> [node] {-^ All nodes reachable from @root@ -} +allReachable (ReachabilityIndex index from to) root = map from result + where root_i = expectJust "reachableFrom" (to root) + hits = {-# SCC "allReachable" #-} IM.lookup root_i index + result = IS.toList $! expectJust "reachableFrom" hits + +-- | 'allReachableMany' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes /does not/ include the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableMany :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = {-# SCC "allReachableMany" #-} + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i + +-- | Fast reachability query. +-- +-- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ +-- asks whether @b@ can be reached through @g@ starting from @a at . +-- +-- Properties: +-- * No self loops, i.e. @isReachable _ a a == False@ +-- * This function has $O(1)$ complexity. +isReachable :: ReachabilityIndex node {-^ @g@ -} + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +isReachable (ReachabilityIndex index _ to) a b = + IS.member b_i $ + expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + +-- | Fast reachability query with many roots. +-- +-- On graph @g@ with many nodes @roots@ and node @b@, @isReachableMany g as b@ +-- asks whether @b@ can be reached through @g@ from any of the @roots at . +-- +-- Properties: +-- * No self loops, i.e. @isReachableMany _ [a] a == False@ +-- * This function is $O(n)$ in the number of roots +isReachableMany :: ReachabilityIndex node -- ^ @g@ + -> [node] -- ^ @roots@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from any of the @roots@ +isReachableMany (ReachabilityIndex index _ to) roots b = + IS.member b_i $ + IS.unions $ + map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i + where roots_i = [ v | Just v <- map to roots ] + b_i = expectJust "reachablesQuery:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,7 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import GHC.Data.Graph.Directed.Reachability -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +612,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1499,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:allReachable (graphReachability graph) root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1821,20 +1823,15 @@ checkHomeUnitsClosed ue | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)] where home_id_set = unitEnv_keys $ ue_home_unit_graph ue - bad_unit_ids = upwards_closure Set.\\ home_id_set + bad_unit_ids = upwards_closure Set.\\ home_id_set {- Remove all home units reached, keep only bad nodes -} rootLoc = mkGeneralSrcSpan (fsLit "") - graph :: Graph (Node UnitId UnitId) - graph = graphFromEdgedVerticesUniq graphNodes + downwards_closure :: Graph (Node UnitId UnitId) + downwards_closure = graphFromEdgedVerticesUniq graphNodes - -- downwards closure of graph - downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + inverse_closure = graphReachability $ transposeG downwards_closure - inverse_closure = transposeG downwards_closure - - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ allReachableMany inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -49,6 +50,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Data.Maybe import GHC.Data.Graph.Directed +import GHC.Data.Graph.Directed.Reachability import GHC.Driver.Backend import GHC.Driver.DynFlags @@ -72,6 +74,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +156,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,12 +176,11 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = mkTransDeps new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +201,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +214,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +391,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +409,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + ===================================== compiler/ghc.cabal.in ===================================== @@ -444,6 +444,8 @@ Library GHC.Data.Graph.Color GHC.Data.Graph.Collapse GHC.Data.Graph.Directed + GHC.Data.Graph.Directed.Internal + GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.Inductive.Graph GHC.Data.Graph.Inductive.PatriciaTree GHC.Data.Graph.Ops View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9f540e481278a782f0de8e6cedf770c09d0de315 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9f540e481278a782f0de8e6cedf770c09d0de315 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 15:23:55 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Wed, 20 Nov 2024 10:23:55 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] Improve reachability queries on ModuleGraph Message-ID: <673dff0bae015_39d2011f3ca4102596@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 48f02c05 by Rodrigo Mesquita at 2024-11-20T15:23:39+00:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. ------------------------- Metric Decrease: mhu-perf ------------------------- - - - - - 9 changed files: - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -8,13 +8,14 @@ module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq, - graphFromVerticesAndAdjacency, + graphFromVerticesAndAdjacency, emptyGraph, SCC(..), Node(..), G.flattenSCC, G.flattenSCCs, stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -43,7 +44,6 @@ module GHC.Data.Graph.Directed ( -- removed them since they were not used anywhere in GHC. ------------------------------------------------------------------------------ - import GHC.Prelude import GHC.Utils.Misc ( sortWith, count ) @@ -60,13 +60,13 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph ( Vertex, Bounds, SCC(..) ) -- Used in the underlying representation -import Data.Tree import GHC.Types.Unique import GHC.Types.Unique.FM -import qualified Data.IntMap as IM -import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S + +-- The graph internals are defined in the .Internal module so they can be +-- imported by GHC.Data.Graph.Directed.Reachability while still allowing this +-- module to export it abstractly. +import GHC.Data.Graph.Directed.Internal {- ************************************************************************ @@ -86,14 +86,6 @@ Note [Nodes, keys, vertices] arranged densely in 0.n -} -data Graph node = Graph { - gr_int_graph :: IntGraph, - gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex - } - -data Edge node = Edge node node - {-| Representation for nodes of the Graph. * The @payload@ is user data, just carried around in this module @@ -357,51 +349,22 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] - outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] reachablesG graph froms = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node -verticesG :: Graph node -> [node] -verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) - -edgesG :: Graph node -> [Edge node] -edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) - where v2n = gr_vertex_to_node graph - transposeG :: Graph node -> Graph node transposeG graph = Graph (G.transposeG (gr_int_graph graph)) (gr_vertex_to_node graph) @@ -410,112 +373,10 @@ transposeG graph = Graph (G.transposeG (gr_int_graph graph)) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -{- -************************************************************************ -* * -* Showing Graphs -* * -************************************************************************ --} - -instance Outputable node => Outputable (Graph node) where - ppr graph = vcat [ - hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), - hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) - ] - -instance Outputable node => Outputable (Edge node) where - ppr (Edge from to) = ppr from <+> text "->" <+> ppr to - graphEmpty :: G.Graph -> Bool graphEmpty g = lo > hi where (lo, hi) = bounds g -{- -************************************************************************ -* * -* IntGraphs -* * -************************************************************************ --} - -type IntGraph = G.Graph - -{- ------------------------------------------------------------- --- Depth first search numbering ------------------------------------------------------------- --} - --- Data.Tree has flatten for Tree, but nothing for Forest -preorderF :: Forest a -> [a] -preorderF ts = concatMap flatten ts - -{- ------------------------------------------------------------- --- Finding reachable vertices ------------------------------------------------------------- --} - --- This generalizes reachable which was found in Data.Graph -reachable :: IntGraph -> [Vertex] -> [Vertex] -reachable g vs = preorderF (G.dfs g vs) - -reachableGraph :: IntGraph -> IM.IntMap IS.IntSet -reachableGraph g = res - where - do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) - res = IM.fromList [(v, do_one v) | v <- G.vertices g] - -scc :: IntGraph -> [SCC Vertex] -scc graph = map decode forest - where - forest = {-# SCC "Digraph.scc" #-} G.scc graph - - decode (Node v []) | mentions_itself v = CyclicSCC [v] - | otherwise = AcyclicSCC v - decode other = CyclicSCC (dec other []) - where dec (Node v ts) vs = v : foldr dec vs ts - mentions_itself v = v `elem` (graph ! v) - -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) {- ************************************************************************ @@ -623,3 +484,4 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + ===================================== compiler/GHC/Data/Graph/Directed/Internal.hs ===================================== @@ -0,0 +1,79 @@ +module GHC.Data.Graph.Directed.Internal where + +import GHC.Prelude +import GHC.Utils.Outputable + +import Data.Array +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) -- Used in the underlying representation +import Data.Tree + +data Graph node = Graph { + gr_int_graph :: IntGraph, + gr_vertex_to_node :: Vertex -> node, + gr_node_to_vertex :: node -> Maybe Vertex +} + +data Edge node = Edge node node + +------------------------------------------------------------ +-- Nodes and Edges +------------------------------------------------------------ + +verticesG :: Graph node -> [node] +verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) + +edgesG :: Graph node -> [Edge node] +edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) + where v2n = gr_vertex_to_node graph + +------------------------------------------------------------ +-- Showing Graphs +------------------------------------------------------------ + +instance Outputable node => Outputable (Graph node) where + ppr graph = vcat [ + hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), + hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) + ] + +instance Outputable node => Outputable (Edge node) where + ppr (Edge from to) = ppr from <+> text "->" <+> ppr to + +{- +************************************************************************ +* * +* IntGraphs +* * +************************************************************************ +-} + +type IntGraph = G.Graph + +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + +scc :: IntGraph -> [SCC Vertex] +scc graph = map decode forest + where + forest = {-# SCC "Digraph.scc" #-} G.scc graph + + decode (Node v []) | mentions_itself v = CyclicSCC [v] + | otherwise = AcyclicSCC v + decode other = CyclicSCC (dec other []) + where dec (Node v ts) vs = v : foldr dec vs ts + mentions_itself v = v `elem` (graph ! v) + ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -0,0 +1,168 @@ +-- | An abstract interface for a fast reachability data structure constructed +-- from a 'GHC.Data.Graph.Directed' graph. +module GHC.Data.Graph.Directed.Reachability + ( ReachabilityIndex + + -- * Constructing a reachability index + , graphReachability, cyclicGraphReachability + + -- * Reachability queries + , allReachable, allReachableMany + , isReachable, isReachableMany + ) + where + +import GHC.Prelude +import GHC.Data.Maybe + +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) + +import Data.Array ((!)) +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS + +import GHC.Data.Graph.Directed.Internal + +-------------------------------------------------------------------------------- +-- * Reachability index +-------------------------------------------------------------------------------- + +-- | The abstract data structure for fast reachability queries +data ReachabilityIndex node = ReachabilityIndex { + index :: IM.IntMap IS.IntSet, + from_vertex :: Vertex -> node, + to_vertex :: node -> Maybe Vertex +} + +-------------------------------------------------------------------------------- +-- * Construction +-------------------------------------------------------------------------------- + +-- | Construct a 'ReachabilityIndex' from an acyclic 'Graph'. +-- If the graph can have cycles, use 'cyclicGraphReachability' +graphReachability :: Graph node -> ReachabilityIndex node +graphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraph, from_vertex = from, to_vertex = to} + where + reachableGraph :: IM.IntMap IS.IntSet + reachableGraph = IM.fromList [(v, do_one v) | v <- G.vertices g] + + do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) + +-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. +cyclicGraphReachability :: Graph node -> ReachabilityIndex node +cyclicGraphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} + where + reachableGraphCyclic :: IM.IntMap IS.IntSet + reachableGraphCyclic = foldl' add_one_comp mempty comps + + neighboursOf v = g!v + + comps = scc g + + -- To avoid divergence on cyclic input, we build the result + -- strongly connected component by component, in topological + -- order. For each SCC, we know that: + -- + -- * All vertices in the component can reach all other vertices + -- in the component ("local" reachables) + -- + -- * Other reachable vertices ("remote" reachables) must come + -- from earlier components, either via direct neighbourhood, or + -- transitively from earlier reachability map + -- + -- This allows us to build the extension of the reachability map + -- directly, without any self-reference, thereby avoiding a loop. + add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet + add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier + where + earlier_neighbours = neighboursOf v + earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours + all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) + add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier + where + all_locals = IS.fromList vs + local v = IS.delete v all_locals + -- Arguably, for a cyclic SCC we should include each + -- vertex in its own reachable set. However, this could + -- lead to a lot of extra pain in client code to avoid + -- looping when traversing the reachability map. + all_neighbours = IS.fromList (concatMap neighboursOf vs) + earlier_neighbours = all_neighbours IS.\\ all_locals + earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) + all_remotes = IS.unions (earlier_neighbours : earlier_further) + +-------------------------------------------------------------------------------- +-- * Reachability queries +-------------------------------------------------------------------------------- + +-- | 'allReachable' returns the nodes reachable from the given @root@ node. +-- +-- Properties: +-- * The list of nodes /does not/ include the @root@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(1)$ complexity. +-- +-- If you need a topologically sorted list, consider using the functions exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead. +allReachable :: ReachabilityIndex node -> node {-^ The @root@ node -} -> [node] {-^ All nodes reachable from @root@ -} +allReachable (ReachabilityIndex index from to) root = map from result + where root_i = expectJust "reachableFrom" (to root) + hits = {-# SCC "allReachable" #-} IM.lookup root_i index + result = IS.toList $! expectJust "reachableFrom" hits + +-- | 'allReachableMany' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes /does not/ include the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableMany :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = {-# SCC "allReachableMany" #-} + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i + +-- | Fast reachability query. +-- +-- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ +-- asks whether @b@ can be reached through @g@ starting from @a at . +-- +-- Properties: +-- * No self loops, i.e. @isReachable _ a a == False@ +-- * This function has $O(1)$ complexity. +isReachable :: ReachabilityIndex node {-^ @g@ -} + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +isReachable (ReachabilityIndex index _ to) a b = + IS.member b_i $ + expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + +-- | Fast reachability query with many roots. +-- +-- On graph @g@ with many nodes @roots@ and node @b@, @isReachableMany g as b@ +-- asks whether @b@ can be reached through @g@ from any of the @roots at . +-- +-- Properties: +-- * No self loops, i.e. @isReachableMany _ [a] a == False@ +-- * This function is $O(n)$ in the number of roots +isReachableMany :: ReachabilityIndex node -- ^ @g@ + -> [node] -- ^ @roots@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from any of the @roots@ +isReachableMany (ReachabilityIndex index _ to) roots b = + IS.member b_i $ + IS.unions $ + map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i + where roots_i = [ v | Just v <- map to roots ] + b_i = expectJust "reachablesQuery:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,7 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import GHC.Data.Graph.Directed.Reachability -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +612,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1499,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:allReachable (graphReachability graph) root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1821,20 +1823,15 @@ checkHomeUnitsClosed ue | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)] where home_id_set = unitEnv_keys $ ue_home_unit_graph ue - bad_unit_ids = upwards_closure Set.\\ home_id_set + bad_unit_ids = upwards_closure Set.\\ home_id_set {- Remove all home units reached, keep only bad nodes -} rootLoc = mkGeneralSrcSpan (fsLit "") - graph :: Graph (Node UnitId UnitId) - graph = graphFromEdgedVerticesUniq graphNodes + downwards_closure :: Graph (Node UnitId UnitId) + downwards_closure = graphFromEdgedVerticesUniq graphNodes - -- downwards closure of graph - downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + inverse_closure = graphReachability $ transposeG downwards_closure - inverse_closure = transposeG downwards_closure - - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ allReachableMany inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -49,6 +50,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Data.Maybe import GHC.Data.Graph.Directed +import GHC.Data.Graph.Directed.Reachability import GHC.Driver.Backend import GHC.Driver.DynFlags @@ -72,6 +74,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +156,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,12 +176,11 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = mkTransDeps new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +201,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +214,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +391,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +409,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + ===================================== compiler/ghc.cabal.in ===================================== @@ -444,6 +444,8 @@ Library GHC.Data.Graph.Color GHC.Data.Graph.Collapse GHC.Data.Graph.Directed + GHC.Data.Graph.Directed.Internal + GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.Inductive.Graph GHC.Data.Graph.Inductive.PatriciaTree GHC.Data.Graph.Ops ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -66,6 +66,7 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -67,6 +67,8 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal +GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/48f02c056e4534d6eb4c5eb5238dbad924072826 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/48f02c056e4534d6eb4c5eb5238dbad924072826 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 15:52:15 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 20 Nov 2024 10:52:15 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] rel-notes: Note backport of #22010 Message-ID: <673e05af83a13_39d2017f4d4c11114b@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 88d2ee34 by Ben Gamari at 2024-11-20T10:51:55-05:00 rel-notes: Note backport of #22010 - - - - - 1 changed file: - docs/users_guide/9.8.4-notes.rst Changes: ===================================== docs/users_guide/9.8.4-notes.rst ===================================== @@ -18,6 +18,8 @@ Compiler have expose the same module name (:ghc-ticket:`25122`). - Adjust the demand signature of the ``prompt#`` to avoid invalid optimisation of non-terminating programs (:ghc-ticket:`25439`). +- GHC's internal ``Unique`` type has been widened to 64-bits on 32-bit architectures, avoiding + potential miscompilations on large projects (:ghc-ticket:`22010`). Packaging --------- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88d2ee349ca812c52ff1d2363c7c7e7a45cf9c18 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88d2ee349ca812c52ff1d2363c7c7e7a45cf9c18 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 17:20:42 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 20 Nov 2024 12:20:42 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: Don't store boot locations in finder cache Message-ID: <673e1a6a492f6_39d201c32e7c1293cf@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 46c53f87 by sheaf at 2024-11-20T12:20:09-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 25 changed files: - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/StgToCmm/Prim.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Finder/Types.hs - compiler/GHC/Unit/Module/Env.hs - compiler/GHC/Unit/Module/Location.hs - compiler/GHC/Unit/Types.hs - testsuite/tests/linear/should_fail/LinearConfusedDollar.stderr - + testsuite/tests/linear/should_fail/T25185.hs - + testsuite/tests/linear/should_fail/T25185.stderr - testsuite/tests/linear/should_fail/all.T - + testsuite/tests/simd/should_run/T25486.hs - + testsuite/tests/simd/should_run/T25486.stdout - testsuite/tests/simd/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -1095,10 +1095,18 @@ primop DoubleLeOp "<=##" Compare Double# -> Double# -> Int# primop DoubleMinOp "minDouble#" GenPrimOp Double# -> Double# -> Double# + {Return the minimum of the arguments. + When the arguments are numerically equal (e.g. @0.0##@ and @-0.0##@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop DoubleMaxOp "maxDouble#" GenPrimOp Double# -> Double# -> Double# + {Return the maximum of the arguments. + When the arguments are numerically equal (e.g. @0.0##@ and @-0.0##@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop DoubleAddOp "+##" GenPrimOp @@ -1269,10 +1277,18 @@ primop FloatLeOp "leFloat#" Compare Float# -> Float# -> Int# primop FloatMinOp "minFloat#" GenPrimOp Float# -> Float# -> Float# + {Return the minimum of the arguments. + When the arguments are numerically equal (e.g. @0.0#@ and @-0.0#@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop FloatMaxOp "maxFloat#" GenPrimOp Float# -> Float# -> Float# + {Return the maximum of the arguments. + When the arguments are numerically equal (e.g. @0.0#@ and @-0.0#@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop FloatAddOp "plusFloat#" GenPrimOp @@ -4109,12 +4125,13 @@ primop VecPackOp "pack#" GenPrimOp primop VecUnpackOp "unpack#" GenPrimOp VECTOR -> VECTUPLE - { Unpack the elements of a vector into an unboxed tuple. #} + { Unpack the elements of a vector into an unboxed tuple. } with vector = ALL_VECTOR_TYPES primop VecInsertOp "insert#" GenPrimOp VECTOR -> SCALAR -> Int# -> VECTOR - { Insert a scalar at the given position in a vector. } + { Insert a scalar at the given position in a vector. + The position must be a compile-time constant. } with effect = CanFail vector = ALL_VECTOR_TYPES @@ -4160,40 +4177,43 @@ primop VecNegOp "negate#" GenPrimOp primop VecIndexByteArrayOp "indexArray#" GenPrimOp ByteArray# -> Int# -> VECTOR - { Read a vector from specified index of immutable array. } + { Read a vector from the specified index of an immutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = CanFail vector = ALL_VECTOR_TYPES primop VecReadByteArrayOp "readArray#" GenPrimOp MutableByteArray# s -> Int# -> State# s -> (# State# s, VECTOR #) - { Read a vector from specified index of mutable array. } + { Read a vector from the specified index of a mutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecWriteByteArrayOp "writeArray#" GenPrimOp MutableByteArray# s -> Int# -> VECTOR -> State# s -> State# s - { Write a vector to specified index of mutable array. } + { Write a vector to the specified index of a mutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecIndexOffAddrOp "indexOffAddr#" GenPrimOp Addr# -> Int# -> VECTOR - { Reads vector; offset in bytes. } + { Reads vector; offset in units of SIMD vectors (not scalar elements). } with effect = CanFail vector = ALL_VECTOR_TYPES primop VecReadOffAddrOp "readOffAddr#" GenPrimOp Addr# -> Int# -> State# s -> (# State# s, VECTOR #) - { Reads vector; offset in bytes. } + { Reads vector; offset in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecWriteOffAddrOp "writeOffAddr#" GenPrimOp Addr# -> Int# -> VECTOR -> State# s -> State# s - { Write vector; offset in bytes. } + { Write vector; offset in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES @@ -4263,7 +4283,7 @@ primop VecFNMSub "fnmsub#" GenPrimOp primop VecShuffleOp "shuffle#" GenPrimOp VECTOR -> VECTOR -> INTVECTUPLE -> VECTOR {Shuffle elements of the concatenation of the input two vectors - into the result vector.} + into the result vector. The indices must be compile-time constants.} with vector = ALL_VECTOR_TYPES primop VecMinOp "min#" GenPrimOp ===================================== compiler/GHC/CmmToAsm/Format.hs ===================================== @@ -273,6 +273,9 @@ instance Show RegWithFormat where instance Uniquable RegWithFormat where getUnique = getUnique . regWithFormat_reg +instance Outputable VirtualRegWithFormat where + ppr (VirtualRegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt + instance Outputable RegWithFormat where ppr (RegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt ===================================== compiler/GHC/CmmToAsm/X86/Instr.hs ===================================== @@ -373,8 +373,9 @@ regUsageOfInstr platform instr | otherwise -> usageRW fmt src dst MOVD fmt src dst -> - -- NB: MOVD/MOVQ always zero any remaining upper part of destination - mkRU (use_R fmt src []) (use_R (movdOutFormat fmt) dst []) + -- NB: MOVD and MOVQ always zero any remaining upper part of destination, + -- so the destination is "written" not "modified". + usageRW' fmt (movdOutFormat fmt) src dst CMOV _ fmt src dst -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MOVZxL fmt src dst -> usageRW fmt src dst MOVSxL fmt src dst -> usageRW fmt src dst @@ -475,7 +476,7 @@ regUsageOfInstr platform instr -- vector instructions VBROADCAST fmt src dst -> mkRU (use_R fmt src []) [mk fmt dst] - VEXTRACT fmt _off src dst -> mkRU [mk fmt src] (use_R fmt dst []) + VEXTRACT fmt _off src dst -> usageRW fmt (OpReg src) dst INSERTPS fmt (ImmInt off) src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst | not doesNotReadDst]) [mk fmt dst] where @@ -488,12 +489,12 @@ regUsageOfInstr platform instr INSERTPS fmt _off src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst]) [mk fmt dst] - VMOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVL fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVH fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - VMOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) + VMOVU fmt src dst -> usageRW fmt src dst + MOVU fmt src dst -> usageRW fmt src dst + MOVL fmt src dst -> usageRM fmt src dst + MOVH fmt src dst -> usageRM fmt src dst + MOVDQU fmt src dst -> usageRW fmt src dst + VMOVDQU fmt src dst -> usageRW fmt src dst PXOR fmt (OpReg src) dst | src == dst @@ -531,11 +532,12 @@ regUsageOfInstr platform instr -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MINMAX _ _ fmt src dst - -> mkRU (use_R fmt src $ use_R fmt dst []) (use_R fmt dst []) + -> usageRM fmt src dst VMINMAX _ _ fmt src1 src2 dst -> mkRU (use_R fmt src1 [mk fmt src2]) [mk fmt dst] _other -> panic "regUsage: unrecognised instr" where + -- # Definitions -- -- Written: If the operand is a register, it's written. If it's an @@ -551,6 +553,11 @@ regUsageOfInstr platform instr usageRW fmt op (OpAddr ea) = mkRUR (use_R fmt op $! use_EA ea []) usageRW _ _ _ = panic "X86.RegInfo.usageRW: no match" + usageRW' :: HasDebugCallStack => Format -> Format -> Operand -> Operand -> RegUsage + usageRW' fmt1 fmt2 op (OpReg reg) = mkRU (use_R fmt1 op []) [mk fmt2 reg] + usageRW' fmt1 _ op (OpAddr ea) = mkRUR (use_R fmt1 op $! use_EA ea []) + usageRW' _ _ _ _ = panic "X86.RegInfo.usageRW: no match" + -- 2 operand form; first operand Read; second Modified usageRM :: HasDebugCallStack => Format -> Operand -> Operand -> RegUsage usageRM fmt op (OpReg reg) = mkRU (use_R fmt op [mk fmt reg]) [mk fmt reg] ===================================== compiler/GHC/Driver/Backpack.hs ===================================== @@ -781,7 +781,7 @@ summariseRequirement pn mod_name = do let loc = srcLocSpan (mkSrcLoc (mkFastString (bkp_filename env)) 1 1) let fc = hsc_FC hsc_env - mod <- liftIO $ addHomeModuleToFinder fc home_unit (notBoot mod_name) location + mod <- liftIO $ addHomeModuleToFinder fc home_unit mod_name location HsigFile extra_sig_imports <- liftIO $ findExtraSigImports hsc_env HsigFile mod_name @@ -854,17 +854,14 @@ hsModuleToModSummary home_keys pn hsc_src modname -- To add insult to injury, we don't even actually use -- these filenames to figure out where the hi files go. -- A travesty! - let location0 = mkHomeModLocation2 fopts modname + let location = mkHomeModLocation fopts modname (unsafeEncodeUtf $ unpackFS unit_fs moduleNameSlashes modname) - (case hsc_src of + (case hsc_src of HsigFile -> os "hsig" HsBootFile -> os "hs-boot" HsSrcFile -> os "hs") - -- DANGEROUS: bootifying can POISON the module finder cache - let location = case hsc_src of - HsBootFile -> addBootSuffixLocnOut location0 - _ -> location0 + hsc_src -- This duplicates a pile of logic in GHC.Driver.Make hi_timestamp <- liftIO $ modificationTimeIfExists (ml_hi_file location) hie_timestamp <- liftIO $ modificationTimeIfExists (ml_hie_file location) @@ -893,7 +890,7 @@ hsModuleToModSummary home_keys pn hsc_src modname this_mod <- liftIO $ do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB modname (hscSourceToIsBoot hsc_src)) location + addHomeModuleToFinder fc home_unit modname location hsc_src let ms = ModSummary { ms_mod = this_mod, ms_hsc_src = hsc_src, ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -2123,38 +2123,23 @@ summariseFile hsc_env' home_unit old_summaries src_fn mb_phase maybe_buf <- getPreprocessedImports hsc_env src_fn mb_phase maybe_buf let fopts = initFinderOpts (hsc_dflags hsc_env) - src_path = unsafeEncodeUtf src_fn + (basename, extension) = splitExtension src_fn - is_boot = case takeExtension src_fn of - ".hs-boot" -> IsBoot - ".lhs-boot" -> IsBoot - _ -> NotBoot - - (path_without_boot, hsc_src) - | isHaskellSigFilename src_fn = (src_path, HsigFile) - | IsBoot <- is_boot = (removeBootSuffix src_path, HsBootFile) - | otherwise = (src_path, HsSrcFile) - - -- Make a ModLocation for the Finder, who only has one entry for - -- each @ModuleName@, and therefore needs to use the locations for - -- the non-boot files. - location_without_boot = - mkHomeModLocation fopts pi_mod_name path_without_boot + hsc_src + | isHaskellSigSuffix (drop 1 extension) = HsigFile + | isHaskellBootSuffix (drop 1 extension) = HsBootFile + | otherwise = HsSrcFile -- Make a ModLocation for this file, adding the @-boot@ suffix to -- all paths if the original was a boot file. - location - | IsBoot <- is_boot - = addBootSuffixLocn location_without_boot - | otherwise - = location_without_boot + location = mkHomeModLocation fopts pi_mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf extension) hsc_src -- Tell the Finder cache where it is, so that subsequent calls -- to findModule will find it, even if it's not on any search path mod <- liftIO $ do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB pi_mod_name is_boot) location + addHomeModuleToFinder fc home_unit pi_mod_name location hsc_src liftIO $ makeNewModSummary hsc_env $ MakeNewModSummary { nms_src_fn = src_fn @@ -2184,14 +2169,10 @@ checkSummaryHash -- and it was likely flushed in depanal. This is not technically -- needed when we're called from sumariseModule but it shouldn't -- hurt. - -- Also, only add to finder cache for non-boot modules as the finder cache - -- makes sure to add a boot suffix for boot files. - _ <- do - let fc = hsc_FC hsc_env - gwib = GWIB (ms_mod old_summary) (isBootSummary old_summary) - case ms_hsc_src old_summary of - HsSrcFile -> addModuleToFinder fc gwib location - _ -> return () + let fc = hsc_FC hsc_env + mod = ms_mod old_summary + hsc_src = ms_hsc_src old_summary + addModuleToFinder fc mod location hsc_src hi_timestamp <- modificationTimeIfExists (ml_hi_file location) hie_timestamp <- modificationTimeIfExists (ml_hie_file location) @@ -2243,7 +2224,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p find_it :: IO SummariseResult find_it = do - found <- findImportedModule hsc_env wanted_mod mb_pkg + found <- findImportedModuleWithIsBoot hsc_env wanted_mod is_boot mb_pkg case found of Found location mod | isJust (ml_hs_file location) -> @@ -2261,10 +2242,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p just_found location mod = do -- Adjust location to point to the hs-boot source file, -- hi file, object file, when is_boot says so - let location' = case is_boot of - IsBoot -> addBootSuffixLocn location - NotBoot -> location - src_fn = expectJust "summarise2" (ml_hs_file location') + let src_fn = expectJust "summarise2" (ml_hs_file location) -- Check that it exists -- It might have been deleted since the Finder last found it @@ -2274,7 +2252,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p -- .hs-boot file doesn't exist. Nothing -> return NotThere Just h -> do - fresult <- new_summary_cache_check location' mod src_fn h + fresult <- new_summary_cache_check location mod src_fn h return $ case fresult of Left err -> FoundHomeWithError (moduleUnitId mod, err) Right ms -> FoundHome ms ===================================== compiler/GHC/Driver/MakeFile.hs ===================================== @@ -292,12 +292,12 @@ findDependency :: HscEnv findDependency hsc_env srcloc pkg imp is_boot include_pkg_deps = do -- Find the module; this will be fast because -- we've done it once during downsweep - r <- findImportedModule hsc_env imp pkg + r <- findImportedModuleWithIsBoot hsc_env imp is_boot pkg case r of Found loc _ -- Home package: just depend on the .hi or hi-boot file | isJust (ml_hs_file loc) || include_pkg_deps - -> return (Just (unsafeDecodeUtf $ addBootSuffix_maybe is_boot (ml_hi_file_ospath loc))) + -> return (Just (unsafeDecodeUtf $ ml_hi_file_ospath loc)) -- Not in this package: we don't need a dependency | otherwise ===================================== compiler/GHC/Driver/Phases.hs ===================================== @@ -23,6 +23,7 @@ module GHC.Driver.Phases ( isDynLibSuffix, isHaskellUserSrcSuffix, isHaskellSigSuffix, + isHaskellBootSuffix, isSourceSuffix, isHaskellishTarget, @@ -234,7 +235,7 @@ phaseInputExt Js = "js" phaseInputExt StopLn = "o" haskellish_src_suffixes, backpackish_suffixes, haskellish_suffixes, cish_suffixes, - js_suffixes, haskellish_user_src_suffixes, haskellish_sig_suffixes + js_suffixes, haskellish_user_src_suffixes, haskellish_sig_suffixes, haskellish_boot_suffixes :: [String] -- When a file with an extension in the haskellish_src_suffixes group is -- loaded in --make mode, its imports will be loaded too. @@ -247,7 +248,8 @@ js_suffixes = [ "js" ] -- Will not be deleted as temp files: haskellish_user_src_suffixes = - haskellish_sig_suffixes ++ [ "hs", "lhs", "hs-boot", "lhs-boot" ] + haskellish_sig_suffixes ++ haskellish_boot_suffixes ++ [ "hs", "lhs" ] +haskellish_boot_suffixes = [ "hs-boot", "lhs-boot" ] haskellish_sig_suffixes = [ "hsig", "lhsig" ] backpackish_suffixes = [ "bkp" ] @@ -265,11 +267,12 @@ dynlib_suffixes platform = case platformOS platform of _ -> ["so"] isHaskellishSuffix, isBackpackishSuffix, isHaskellSrcSuffix, isCishSuffix, - isHaskellUserSrcSuffix, isJsSuffix, isHaskellSigSuffix + isHaskellUserSrcSuffix, isJsSuffix, isHaskellSigSuffix, isHaskellBootSuffix :: String -> Bool isHaskellishSuffix s = s `elem` haskellish_suffixes isBackpackishSuffix s = s `elem` backpackish_suffixes isHaskellSigSuffix s = s `elem` haskellish_sig_suffixes +isHaskellBootSuffix s = s `elem` haskellish_boot_suffixes isHaskellSrcSuffix s = s `elem` haskellish_src_suffixes isCishSuffix s = s `elem` cish_suffixes isJsSuffix s = s `elem` js_suffixes ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -734,7 +734,7 @@ runHscPhase pipe_env hsc_env0 input_fn src_flavour = do mod <- do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB mod_name (hscSourceToIsBoot src_flavour)) location + addHomeModuleToFinder fc home_unit mod_name location src_flavour -- Make the ModSummary to hand to hscMain let @@ -777,24 +777,18 @@ mkOneShotModLocation :: PipeEnv -> DynFlags -> HscSource -> ModuleName -> IO Mod mkOneShotModLocation pipe_env dflags src_flavour mod_name = do let PipeEnv{ src_basename=basename, src_suffix=suff } = pipe_env - let location1 = mkHomeModLocation2 fopts mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf suff) - - -- Boot-ify it if necessary - let location2 - | HsBootFile <- src_flavour = addBootSuffixLocnOut location1 - | otherwise = location1 - + let location1 = mkHomeModLocation fopts mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf suff) src_flavour -- Take -ohi into account if present -- This can't be done in mkHomeModuleLocation because -- it only applies to the module being compiles let ohi = outputHi dflags - location3 | Just fn <- ohi = location2{ ml_hi_file_ospath = unsafeEncodeUtf fn } - | otherwise = location2 + location2 | Just fn <- ohi = location1{ ml_hi_file_ospath = unsafeEncodeUtf fn } + | otherwise = location1 let dynohi = dynOutputHi dflags - location4 | Just fn <- dynohi = location3{ ml_dyn_hi_file_ospath = unsafeEncodeUtf fn } - | otherwise = location3 + location3 | Just fn <- dynohi = location2{ ml_dyn_hi_file_ospath = unsafeEncodeUtf fn } + | otherwise = location2 -- Take -o into account if present -- Very like -ohi, but we must *only* do this if we aren't linking @@ -807,11 +801,11 @@ mkOneShotModLocation pipe_env dflags src_flavour mod_name = do location5 | Just ofile <- expl_o_file , let dyn_ofile = fromMaybe (ofile -<.> dynObjectSuf_ dflags) expl_dyn_o_file , isNoLink (ghcLink dflags) - = location4 { ml_obj_file_ospath = unsafeEncodeUtf ofile + = location3 { ml_obj_file_ospath = unsafeEncodeUtf ofile , ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } | Just dyn_ofile <- expl_dyn_o_file - = location4 { ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } - | otherwise = location4 + = location3 { ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } + | otherwise = location3 return location5 where fopts = initFinderOpts dflags ===================================== compiler/GHC/Iface/Load.hs ===================================== @@ -896,9 +896,9 @@ findAndReadIface hsc_env doc_str mod wanted_mod hi_boot_file = do else do let fopts = initFinderOpts dflags -- Look for the file - mb_found <- liftIO (findExactModule fc fopts other_fopts unit_state mhome_unit mod) + mb_found <- liftIO (findExactModule fc fopts other_fopts unit_state mhome_unit mod hi_boot_file) case mb_found of - InstalledFound (addBootSuffixLocn_maybe hi_boot_file -> loc) mod -> do + InstalledFound loc -> do -- See Note [Home module load error] case mhome_unit of Just home_unit ===================================== compiler/GHC/StgToCmm/Prim.hs ===================================== @@ -2713,7 +2713,7 @@ doShuffleOp ty (v1:v2:idxs) res -> emitAssign (CmmLocal res) (CmmMachOp (mo is) [v1,v2]) | otherwise -> pprPanic "doShuffleOp" $ - vcat [ text "shuffle indices must be literals, 0 <= i <" <+> ppr len ] + vcat [ text "shuffle indices must be literals, 0 <= i <" <+> ppr (2 * len) ] | otherwise = pprPanic "doShuffleOp" $ vcat [ text "non-vector argument type:" <+> ppr ty ] ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -569,6 +569,7 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted , eaql_arg_ty = sc_arg_ty , eaql_larg = larg@(L arg_loc rn_expr) , eaql_tc_fun = tc_head + , eaql_fun_ue = head_ue , eaql_args = inst_args , eaql_encl = arg_influences_enclosing_call , eaql_res_rho = app_res_rho }) @@ -578,7 +579,8 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted ; traceTc "tcEValArgQL {" (vcat [ text "app_res_rho:" <+> ppr app_res_rho , text "exp_arg_ty:" <+> ppr exp_arg_ty - , text "args:" <+> ppr inst_args ]) + , text "args:" <+> ppr inst_args + , text "mult:" <+> ppr mult]) ; ds_flag <- getDeepSubsumptionFlag ; (wrap, arg') @@ -587,6 +589,9 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted do { -- Emit saved-up constraints, /under/ the tcSkolemise -- See (QLA4) in Note [Quick Look at value arguments] emitConstraints wanted + -- Emit saved-up usages /under/ the tcScalingUsage. + -- See (QLA5) in Note [Quick Look at value arguments] + ; tcEmitBindingUsage head_ue -- Unify with context if we have not already done so -- See (QLA4) in Note [Quick Look at value arguments] @@ -1630,6 +1635,41 @@ This turned out to be more subtle than I expected. Wrinkles: (kappa = [forall a. a->a]). Now we resume typechecking argument [], and we must take advantage of what we have now discovered about `kappa`, to typecheck [] :: [forall a. a->a] + +(QLA5) In the quicklook pass, we don't scale multiplicities. Since arguments + aren't typechecked yet, we don't know their free variable usages + anyway. But, in a nested call, the head of an application chain is fully + typechecked. + + In order for the multiplicities in the head to be properly scaled, we store + the head's usage environment in the eaql_fun_ue field. Then, when we do the + full-typechecking pass, we can emit the head's usage environment where we + would have typechecked the head in a naive algorithm. + +(QLA6) `quickLookArg` is supposed to capture the result of partially typechecking + the argument, so it can be resumed later. "Capturing" should include all + generated type-class/equality constraints and Linear-Haskell usage info. There + are two calls in `quickLookArg1` that might generate such constraints: + + - `tcInferAppHead_maybe`. This can generat Linear-Haskell usage info, via + the call to `tcEmitBindingUsage` in `check_local_id`, which is called + indirectly by `tcInferAppHead_maybe`. + + In contrast, `tcInferAppHead_maybe` does not generate any type-class or + equality constraints, because it doesn't instantiate any functions. [But + see #25493 and #25494 for why this isn't quite true today.] + + - `tcInstFun` generates lots of type-class and equality constraints, as it + instantiates the function. But it generates no usage info, because that + comes only from the call to `check_local_id`, whose usage info is captured + in the call to `tcInferAppHead_maybe` in `quickLookArg1`. + + Conclusion: in quickLookArg1: + - capture usage information (but not constraints) + for the call to `tcInferAppHead_maybe` + - capture constraints (but not usage information) + for the call to `tcInstFun` + -} quickLookArg :: QLFlag -> AppCtxt @@ -1697,7 +1737,12 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) do { ((rn_fun, fun_ctxt), rn_args) <- splitHsApps arg -- Step 1: get the type of the head of the argument - ; mb_fun_ty <- tcInferAppHead_maybe rn_fun + ; (fun_ue, mb_fun_ty) <- tcCollectingUsage $ tcInferAppHead_maybe rn_fun + -- tcCollectingUsage: the use of an Id at the head generates usage-info + -- See the call to `tcEmitBindingUsage` in `check_local_id`. So we must + -- capture and save it in the `EValArgQL`. See (QLA6) in + -- Note [Quick Look at value arguments] + ; traceTc "quickLookArg {" $ vcat [ text "arg:" <+> ppr arg , text "orig_arg_rho:" <+> ppr orig_arg_rho @@ -1714,6 +1759,9 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) ; ((inst_args, app_res_rho), wanted) <- captureConstraints $ tcInstFun do_ql True tc_head fun_sigma rn_args + -- We must capture type-class and equality constraints here, but + -- not equality constraints. See (QLA6) in Note [Quick Look at + -- value arguments] ; traceTc "quickLookArg 2" $ vcat [ text "arg:" <+> ppr arg @@ -1746,6 +1794,7 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) , eaql_arg_ty = sc_arg_ty , eaql_larg = larg , eaql_tc_fun = tc_head + , eaql_fun_ue = fun_ue , eaql_args = inst_args , eaql_wanted = wanted , eaql_encl = arg_influences_enclosing_call ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -57,7 +57,7 @@ import GHC.Tc.Zonk.TcType import GHC.Core.FamInstEnv ( FamInstEnvs ) -import GHC.Core.UsageEnv ( singleUsageUE ) +import GHC.Core.UsageEnv ( singleUsageUE, UsageEnv ) import GHC.Core.PatSyn( PatSyn, patSynName ) import GHC.Core.ConLike( ConLike(..) ) import GHC.Core.DataCon @@ -178,6 +178,7 @@ data HsExprArg (p :: TcPass) where -- See Note [HsExprArg] , eaql_larg :: LHsExpr GhcRn -- Original application, for -- location and error msgs , eaql_tc_fun :: (HsExpr GhcTc, AppCtxt) -- Typechecked head + , eaql_fun_ue :: UsageEnv -- Usage environment of the typechecked head (QLA5) , eaql_args :: [HsExprArg 'TcpInst] -- Args: instantiated, not typechecked , eaql_wanted :: WantedConstraints , eaql_encl :: Bool -- True <=> we have already qlUnified ===================================== compiler/GHC/Tc/Utils/Monad.hs ===================================== @@ -1412,7 +1412,7 @@ tcCollectingUsage thing_inside tcScalingUsage :: Mult -> TcM a -> TcM a tcScalingUsage mult thing_inside = do { (usage, result) <- tcCollectingUsage thing_inside - ; traceTc "tcScalingUsage" (ppr mult) + ; traceTc "tcScalingUsage" $ vcat [ppr mult, ppr usage] ; tcEmitBindingUsage $ scaleUE mult usage ; return result } ===================================== compiler/GHC/Unit/Finder.hs ===================================== @@ -15,6 +15,7 @@ module GHC.Unit.Finder ( FinderCache(..), initFinderCache, findImportedModule, + findImportedModuleWithIsBoot, findPluginModule, findExactModule, findHomeModule, @@ -55,6 +56,7 @@ import GHC.Utils.Panic import GHC.Linker.Types import GHC.Types.PkgQual +import GHC.Types.SourceFile import GHC.Fingerprint import Data.IORef @@ -103,28 +105,28 @@ InstalledNotFound. initFinderCache :: IO FinderCache initFinderCache = do - mod_cache <- newIORef emptyInstalledModuleWithIsBootEnv + mod_cache <- newIORef emptyInstalledModuleEnv file_cache <- newIORef M.empty let flushFinderCaches :: UnitEnv -> IO () flushFinderCaches ue = do - atomicModifyIORef' mod_cache $ \fm -> (filterInstalledModuleWithIsBootEnv is_ext fm, ()) + atomicModifyIORef' mod_cache $ \fm -> (filterInstalledModuleEnv is_ext fm, ()) atomicModifyIORef' file_cache $ \_ -> (M.empty, ()) where - is_ext mod _ = not (isUnitEnvInstalledModule ue (gwib_mod mod)) + is_ext mod _ = not (isUnitEnvInstalledModule ue mod) - addToFinderCache :: InstalledModuleWithIsBoot -> InstalledFindResult -> IO () + addToFinderCache :: InstalledModule -> InstalledFindResult -> IO () addToFinderCache key val = atomicModifyIORef' mod_cache $ \c -> - case (lookupInstalledModuleWithIsBootEnv c key, val) of + case (lookupInstalledModuleEnv c key, val) of -- Don't overwrite an InstalledFound with an InstalledNotFound -- See [Note Monotonic addToFinderCache] (Just InstalledFound{}, InstalledNotFound{}) -> (c, ()) - _ -> (extendInstalledModuleWithIsBootEnv c key val, ()) + _ -> (extendInstalledModuleEnv c key val, ()) - lookupFinderCache :: InstalledModuleWithIsBoot -> IO (Maybe InstalledFindResult) + lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult) lookupFinderCache key = do c <- readIORef mod_cache - return $! lookupInstalledModuleWithIsBootEnv c key + return $! lookupInstalledModuleEnv c key lookupFileCache :: FilePath -> IO Fingerprint lookupFileCache key = do @@ -156,6 +158,13 @@ findImportedModule hsc_env mod pkg_qual = in do findImportedModuleNoHsc fc fopts (hsc_unit_env hsc_env) mhome_unit mod pkg_qual +findImportedModuleWithIsBoot :: HscEnv -> ModuleName -> IsBootInterface -> PkgQual -> IO FindResult +findImportedModuleWithIsBoot hsc_env mod is_boot pkg_qual = do + res <- findImportedModule hsc_env mod pkg_qual + case (res, is_boot) of + (Found loc mod, IsBoot) -> return (Found (addBootSuffixLocn loc) mod) + _ -> return res + findImportedModuleNoHsc :: FinderCache -> FinderOpts @@ -228,15 +237,19 @@ findPluginModule fc fopts units Nothing mod_name = -- reading the interface for a module mentioned by another interface, -- for example (a "system import"). -findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IO InstalledFindResult -findExactModule fc fopts other_fopts unit_state mhome_unit mod = do - case mhome_unit of +findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IsBootInterface -> IO InstalledFindResult +findExactModule fc fopts other_fopts unit_state mhome_unit mod is_boot = do + res <- case mhome_unit of Just home_unit | isHomeInstalledModule home_unit mod -> findInstalledHomeModule fc fopts (homeUnitId home_unit) (moduleName mod) | Just home_fopts <- unitEnv_lookup_maybe (moduleUnit mod) other_fopts -> findInstalledHomeModule fc home_fopts (moduleUnit mod) (moduleName mod) _ -> findPackageModule fc unit_state fopts mod + case (res, is_boot) of + (InstalledFound loc, IsBoot) -> return (InstalledFound (addBootSuffixLocn loc)) + _ -> return res + -- ----------------------------------------------------------------------------- -- Helpers @@ -274,7 +287,7 @@ orIfNotFound this or_this = do homeSearchCache :: FinderCache -> UnitId -> ModuleName -> IO InstalledFindResult -> IO InstalledFindResult homeSearchCache fc home_unit mod_name do_this = do let mod = mkModule home_unit mod_name - modLocationCache fc (notBoot mod) do_this + modLocationCache fc mod do_this findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult findExposedPackageModule fc fopts units mod_name mb_pkg = @@ -296,7 +309,7 @@ findLookupResult fc fopts r = case r of -- with just the location of the thing that was -- instantiated; you probably also need all of the -- implicit locations from the instances - InstalledFound loc _ -> return (Found loc m) + InstalledFound loc -> return (Found loc m) InstalledNoPackage _ -> return (NoPackage (moduleUnit m)) InstalledNotFound fp _ -> return (NotFound{ fr_paths = fmap unsafeDecodeUtf fp, fr_pkg = Just (moduleUnit m) , fr_pkgs_hidden = [] @@ -331,7 +344,7 @@ findLookupResult fc fopts r = case r of , fr_unusables = [] , fr_suggestions = suggest' }) -modLocationCache :: FinderCache -> InstalledModuleWithIsBoot -> IO InstalledFindResult -> IO InstalledFindResult +modLocationCache :: FinderCache -> InstalledModule -> IO InstalledFindResult -> IO InstalledFindResult modLocationCache fc mod do_this = do m <- lookupFinderCache fc mod case m of @@ -341,17 +354,19 @@ modLocationCache fc mod do_this = do addToFinderCache fc mod result return result -addModuleToFinder :: FinderCache -> ModuleWithIsBoot -> ModLocation -> IO () -addModuleToFinder fc mod loc = do - let imod = fmap toUnitId <$> mod - addToFinderCache fc imod (InstalledFound loc (gwib_mod imod)) +addModuleToFinder :: FinderCache -> Module -> ModLocation -> HscSource -> IO () +addModuleToFinder fc mod loc src_flavour = do + let imod = toUnitId <$> mod + unless (src_flavour == HsBootFile) $ + addToFinderCache fc imod (InstalledFound loc) -- This returns a module because it's more convenient for users -addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleNameWithIsBoot -> ModLocation -> IO Module -addHomeModuleToFinder fc home_unit mod_name loc = do - let mod = mkHomeInstalledModule home_unit <$> mod_name - addToFinderCache fc mod (InstalledFound loc (gwib_mod mod)) - return (mkHomeModule home_unit (gwib_mod mod_name)) +addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleName -> ModLocation -> HscSource -> IO Module +addHomeModuleToFinder fc home_unit mod_name loc src_flavour = do + let mod = mkHomeInstalledModule home_unit mod_name + unless (src_flavour == HsBootFile) $ + addToFinderCache fc mod (InstalledFound loc) + return (mkHomeModule home_unit mod_name) -- ----------------------------------------------------------------------------- -- The internal workers @@ -361,7 +376,7 @@ findHomeModule fc fopts home_unit mod_name = do let uid = homeUnitAsUnit home_unit r <- findInstalledHomeModule fc fopts (homeUnitId home_unit) mod_name return $ case r of - InstalledFound loc _ -> Found loc (mkHomeModule home_unit mod_name) + InstalledFound loc -> Found loc (mkHomeModule home_unit mod_name) InstalledNoPackage _ -> NoPackage uid -- impossible InstalledNotFound fps _ -> NotFound { fr_paths = fmap unsafeDecodeUtf fps, @@ -386,7 +401,7 @@ findHomePackageModule fc fopts home_unit mod_name = do let uid = RealUnit (Definite home_unit) r <- findInstalledHomeModule fc fopts home_unit mod_name return $ case r of - InstalledFound loc _ -> Found loc (mkModule uid mod_name) + InstalledFound loc -> Found loc (mkModule uid mod_name) InstalledNoPackage _ -> NoPackage uid -- impossible InstalledNotFound fps _ -> NotFound { fr_paths = fmap unsafeDecodeUtf fps, @@ -456,7 +471,7 @@ findInstalledHomeModule fc fopts home_unit mod_name = do -- This is important only when compiling the base package (where GHC.Prim -- is a home module). if mod `installedModuleEq` gHC_PRIM - then return (InstalledFound (error "GHC.Prim ModLocation") mod) + then return (InstalledFound (error "GHC.Prim ModLocation")) else searchPathExts search_dirs mod exts -- | Prepend the working directory to the search path. @@ -485,11 +500,11 @@ findPackageModule_ :: FinderCache -> FinderOpts -> InstalledModule -> UnitInfo - findPackageModule_ fc fopts mod pkg_conf = do massertPpr (moduleUnit mod == unitId pkg_conf) (ppr (moduleUnit mod) <+> ppr (unitId pkg_conf)) - modLocationCache fc (notBoot mod) $ + modLocationCache fc mod $ -- special case for GHC.Prim; we won't find it in the filesystem. if mod `installedModuleEq` gHC_PRIM - then return (InstalledFound (error "GHC.Prim ModLocation") mod) + then return (InstalledFound (error "GHC.Prim ModLocation")) else let @@ -513,7 +528,7 @@ findPackageModule_ fc fopts mod pkg_conf = do -- don't bother looking for it. let basename = unsafeEncodeUtf $ moduleNameSlashes (moduleName mod) loc = mk_hi_loc one basename - in return $ InstalledFound loc mod + in return $ InstalledFound loc _otherwise -> searchPathExts import_dirs mod [(package_hisuf, mk_hi_loc)] @@ -547,7 +562,7 @@ searchPathExts paths mod exts = search to_search search ((file, loc) : rest) = do b <- doesFileExist file if b - then return $ InstalledFound loc mod + then return $ InstalledFound loc else search rest mkHomeModLocationSearched :: FinderOpts -> ModuleName -> FileExt @@ -589,10 +604,12 @@ mkHomeModLocationSearched fopts mod suff path basename = -- ext -- The filename extension of the source file (usually "hs" or "lhs"). -mkHomeModLocation :: FinderOpts -> ModuleName -> OsPath -> ModLocation -mkHomeModLocation dflags mod src_filename = - let (basename,extension) = OsPath.splitExtension src_filename - in mkHomeModLocation2 dflags mod basename extension +mkHomeModLocation :: FinderOpts -> ModuleName -> OsPath -> FileExt -> HscSource -> ModLocation +mkHomeModLocation dflags mod src_basename ext hsc_src = + let loc = mkHomeModLocation2 dflags mod src_basename ext + in case hsc_src of + HsBootFile -> addBootSuffixLocnOut loc + _ -> loc mkHomeModLocation2 :: FinderOpts -> ModuleName ===================================== compiler/GHC/Unit/Finder/Types.hs ===================================== @@ -30,9 +30,9 @@ data FinderCache = FinderCache { flushFinderCaches :: UnitEnv -> IO () -- ^ remove all the home modules from the cache; package modules are -- assumed to not move around during a session; also flush the file hash -- cache. - , addToFinderCache :: InstalledModuleWithIsBoot -> InstalledFindResult -> IO () + , addToFinderCache :: InstalledModule -> InstalledFindResult -> IO () -- ^ Add a found location to the cache for the module. - , lookupFinderCache :: InstalledModuleWithIsBoot -> IO (Maybe InstalledFindResult) + , lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult) -- ^ Look for a location in the cache. , lookupFileCache :: FilePath -> IO Fingerprint -- ^ Look for the hash of a file in the cache. This should add it to the @@ -40,7 +40,7 @@ data FinderCache = FinderCache { flushFinderCaches :: UnitEnv -> IO () } data InstalledFindResult - = InstalledFound ModLocation InstalledModule + = InstalledFound ModLocation | InstalledNoPackage UnitId | InstalledNotFound [OsPath] (Maybe UnitId) ===================================== compiler/GHC/Unit/Module/Env.hs ===================================== @@ -33,17 +33,6 @@ module GHC.Unit.Module.Env , mergeInstalledModuleEnv , plusInstalledModuleEnv , installedModuleEnvElts - - -- * InstalledModuleWithIsBootEnv - , InstalledModuleWithIsBootEnv - , emptyInstalledModuleWithIsBootEnv - , lookupInstalledModuleWithIsBootEnv - , extendInstalledModuleWithIsBootEnv - , filterInstalledModuleWithIsBootEnv - , delInstalledModuleWithIsBootEnv - , mergeInstalledModuleWithIsBootEnv - , plusInstalledModuleWithIsBootEnv - , installedModuleWithIsBootEnvElts ) where @@ -294,56 +283,3 @@ plusInstalledModuleEnv :: (elt -> elt -> elt) plusInstalledModuleEnv f (InstalledModuleEnv xm) (InstalledModuleEnv ym) = InstalledModuleEnv $ Map.unionWith f xm ym - - --------------------------------------------------------------------- --- InstalledModuleWithIsBootEnv --------------------------------------------------------------------- - --- | A map keyed off of 'InstalledModuleWithIsBoot' -newtype InstalledModuleWithIsBootEnv elt = InstalledModuleWithIsBootEnv (Map InstalledModuleWithIsBoot elt) - -instance Outputable elt => Outputable (InstalledModuleWithIsBootEnv elt) where - ppr (InstalledModuleWithIsBootEnv env) = ppr env - - -emptyInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -emptyInstalledModuleWithIsBootEnv = InstalledModuleWithIsBootEnv Map.empty - -lookupInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> Maybe a -lookupInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m = Map.lookup m e - -extendInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> a -> InstalledModuleWithIsBootEnv a -extendInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m x = InstalledModuleWithIsBootEnv (Map.insert m x e) - -filterInstalledModuleWithIsBootEnv :: (InstalledModuleWithIsBoot -> a -> Bool) -> InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBootEnv a -filterInstalledModuleWithIsBootEnv f (InstalledModuleWithIsBootEnv e) = - InstalledModuleWithIsBootEnv (Map.filterWithKey f e) - -delInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> InstalledModuleWithIsBootEnv a -delInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m = InstalledModuleWithIsBootEnv (Map.delete m e) - -installedModuleWithIsBootEnvElts :: InstalledModuleWithIsBootEnv a -> [(InstalledModuleWithIsBoot, a)] -installedModuleWithIsBootEnvElts (InstalledModuleWithIsBootEnv e) = Map.assocs e - -mergeInstalledModuleWithIsBootEnv - :: (elta -> eltb -> Maybe eltc) - -> (InstalledModuleWithIsBootEnv elta -> InstalledModuleWithIsBootEnv eltc) -- map X - -> (InstalledModuleWithIsBootEnv eltb -> InstalledModuleWithIsBootEnv eltc) -- map Y - -> InstalledModuleWithIsBootEnv elta - -> InstalledModuleWithIsBootEnv eltb - -> InstalledModuleWithIsBootEnv eltc -mergeInstalledModuleWithIsBootEnv f g h (InstalledModuleWithIsBootEnv xm) (InstalledModuleWithIsBootEnv ym) - = InstalledModuleWithIsBootEnv $ Map.mergeWithKey - (\_ x y -> (x `f` y)) - (coerce g) - (coerce h) - xm ym - -plusInstalledModuleWithIsBootEnv :: (elt -> elt -> elt) - -> InstalledModuleWithIsBootEnv elt - -> InstalledModuleWithIsBootEnv elt - -> InstalledModuleWithIsBootEnv elt -plusInstalledModuleWithIsBootEnv f (InstalledModuleWithIsBootEnv xm) (InstalledModuleWithIsBootEnv ym) = - InstalledModuleWithIsBootEnv $ Map.unionWith f xm ym - ===================================== compiler/GHC/Unit/Module/Location.hs ===================================== @@ -13,8 +13,6 @@ module GHC.Unit.Module.Location ) , pattern ModLocation , addBootSuffix - , addBootSuffix_maybe - , addBootSuffixLocn_maybe , addBootSuffixLocn , addBootSuffixLocnOut , removeBootSuffix @@ -25,7 +23,6 @@ where import GHC.Prelude import GHC.Data.OsPath -import GHC.Unit.Types import GHC.Types.SrcLoc import GHC.Utils.Outputable import GHC.Data.FastString (mkFastString) @@ -99,26 +96,10 @@ removeBootSuffix pathWithBootSuffix = Just path -> path Nothing -> error "removeBootSuffix: no -boot suffix" --- | Add the @-boot@ suffix if the @Bool@ argument is @True@ -addBootSuffix_maybe :: IsBootInterface -> OsPath -> OsPath -addBootSuffix_maybe is_boot path = case is_boot of - IsBoot -> addBootSuffix path - NotBoot -> path - -addBootSuffixLocn_maybe :: IsBootInterface -> ModLocation -> ModLocation -addBootSuffixLocn_maybe is_boot locn = case is_boot of - IsBoot -> addBootSuffixLocn locn - _ -> locn - -- | Add the @-boot@ suffix to all file paths associated with the module addBootSuffixLocn :: ModLocation -> ModLocation addBootSuffixLocn locn - = locn { ml_hs_file_ospath = fmap addBootSuffix (ml_hs_file_ospath locn) - , ml_hi_file_ospath = addBootSuffix (ml_hi_file_ospath locn) - , ml_dyn_hi_file_ospath = addBootSuffix (ml_dyn_hi_file_ospath locn) - , ml_obj_file_ospath = addBootSuffix (ml_obj_file_ospath locn) - , ml_dyn_obj_file_ospath = addBootSuffix (ml_dyn_obj_file_ospath locn) - , ml_hie_file_ospath = addBootSuffix (ml_hie_file_ospath locn) } + = addBootSuffixLocnOut locn { ml_hs_file_ospath = fmap addBootSuffix (ml_hs_file_ospath locn) } -- | Add the @-boot@ suffix to all output file paths associated with the -- module, not including the input file itself ===================================== compiler/GHC/Unit/Types.hs ===================================== @@ -84,8 +84,6 @@ module GHC.Unit.Types , GenWithIsBoot (..) , ModuleNameWithIsBoot , ModuleWithIsBoot - , InstalledModuleWithIsBoot - , notBoot ) where @@ -720,8 +718,6 @@ type ModuleNameWithIsBoot = GenWithIsBoot ModuleName type ModuleWithIsBoot = GenWithIsBoot Module -type InstalledModuleWithIsBoot = GenWithIsBoot InstalledModule - instance Binary a => Binary (GenWithIsBoot a) where put_ bh (GWIB { gwib_mod, gwib_isBoot }) = do put_ bh gwib_mod @@ -735,6 +731,3 @@ instance Outputable a => Outputable (GenWithIsBoot a) where ppr (GWIB { gwib_mod, gwib_isBoot }) = hsep $ ppr gwib_mod : case gwib_isBoot of IsBoot -> [ text "{-# SOURCE #-}" ] NotBoot -> [] - -notBoot :: mod -> GenWithIsBoot mod -notBoot gwib_mod = GWIB {gwib_mod, gwib_isBoot = NotBoot} ===================================== testsuite/tests/linear/should_fail/LinearConfusedDollar.stderr ===================================== @@ -1,3 +1,7 @@ +LinearConfusedDollar.hs:12:3: error: [GHC-18872] + • Couldn't match type ‘Many’ with ‘One’ + arising from multiplicity of ‘x’ + • In an equation for ‘g’: g x = f $ x LinearConfusedDollar.hs:12:7: error: [GHC-83865] • Couldn't match type ‘One’ with ‘Many’ @@ -6,3 +10,4 @@ LinearConfusedDollar.hs:12:7: error: [GHC-83865] • In the first argument of ‘($)’, namely ‘f’ In the expression: f $ x In an equation for ‘g’: g x = f $ x + ===================================== testsuite/tests/linear/should_fail/T25185.hs ===================================== @@ -0,0 +1,10 @@ +{-# LANGUAGE LinearTypes #-} +{-# LANGUAGE ImpredicativeTypes #-} + +module T25185 where + +f :: Int -> Int +f x = x + +g :: Int %1 -> Int +g y = f y ===================================== testsuite/tests/linear/should_fail/T25185.stderr ===================================== @@ -0,0 +1,5 @@ +T25185.hs:10:3: error: [GHC-18872] + • Couldn't match type ‘Many’ with ‘One’ + arising from multiplicity of ‘y’ + • In an equation for ‘g’: g y = f y + ===================================== testsuite/tests/linear/should_fail/all.T ===================================== @@ -53,3 +53,4 @@ test('LinearLet9', normal, compile_fail, ['']) test('LinearLet10', normal, compile_fail, ['']) test('T25081', normal, compile_fail, ['']) test('T24961', normal, compile_fail, ['']) +test('T25185', normal, compile_fail, ['']) ===================================== testsuite/tests/simd/should_run/T25486.hs ===================================== @@ -0,0 +1,48 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} + +module Main where + +import GHC.Exts +import GHC.IO +import Data.Array.Base +import Data.Array.IO.Internals +import Control.Monad +import Foreign.Marshal.Array + +writeFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatX4OffAddr# addr i v s, () #) + +writeAsFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeAsFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatOffAddrAsFloatX4# addr i v s, () #) + +writeFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatX4Array# mba i# v s, () #) + +writeAsFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeAsFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatArrayAsFloatX4# mba i# v s, () #) + +main :: IO () +main = do + let v = packFloatX4# (# 0.1#, 1.1#, 2.2#, 3.3# #) + + xs <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print xs + + ys <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeAsFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print ys + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeFloatX4 ma 1 v + print =<< getElems ma + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeAsFloatX4 ma 1 v + print =<< getElems ma ===================================== testsuite/tests/simd/should_run/T25486.stdout ===================================== @@ -0,0 +1,4 @@ +[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,0.1,1.1,2.2,3.3,12.0,13.0,14.0,15.0] +[0.0,1.0,0.1,1.1,2.2,3.3,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0] +[0.0,1.0,2.0,3.0,0.1,1.1,2.2,3.3,8.0,9.0] +[0.0,0.1,1.1,2.2,3.3,5.0,6.0,7.0,8.0,9.0] ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -90,3 +90,4 @@ test('T25062_V64' test('T25169', [], compile_and_run, ['']) test('T25455', [], compile_and_run, ['']) +test('T25486', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0f4079d1290ab81a56897f6cca8eaf1328643e49...46c53f87d75130ce4a87d54029ec264bba378ac5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0f4079d1290ab81a56897f6cca8eaf1328643e49...46c53f87d75130ce4a87d54029ec264bba378ac5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 17:45:29 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Wed, 20 Nov 2024 12:45:29 -0500 Subject: [Git][ghc/ghc][wip/T24359] More improvements Message-ID: <673e20391d6a5_12f88cbf4148409b@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 9d743a53 by Simon Peyton Jones at 2024-11-20T17:45:04+00:00 More improvements - - - - - 3 changed files: - compiler/GHC/Core/InstEnv.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Tc/TyCl/Instance.hs Changes: ===================================== compiler/GHC/Core/InstEnv.hs ===================================== @@ -927,11 +927,8 @@ Here are the moving parts: * That info is recorded in the `cir_is_coherent` field of `OneInst`, and thence transferred to the `ep_is_coherent` field of the `EvBind` for the dictionary. -* `GHC.HsToCore.Binds.dsHsWrapper` desugars the evidence application (f d) into - (nospec f d) if `d` is incoherent. It has to do a dependency analysis to - determine transitive dependencies, but we need to do that anyway. - See Note [Desugaring non-canonical evidence] in GHC.HsToCore.Binds. - +* In the desugarer we exploit this info: + see Note [Desugaring non-canonical evidence] in GHC.HsToCore.Expr. See also Note [nospecId magic] in GHC.Types.Id.Make. -} ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -826,7 +826,7 @@ dsSpec mb_poly_rhs (SpecPrag poly_id spec_co spec_inl) spec_bndrs (\_ poly_rhs -> core_app poly_rhs) spec_inl -dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id +dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id , spe_tv_bndrs = tv_bndrs , spe_id_bndrs = id_bndrs , spe_lhs_ev_bndrs = lhs_evs @@ -843,7 +843,9 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id = dsTcEvBinds lhs_binds $ \ ds_lhs_binds -> dsTcEvBinds rhs_binds $ \ ds_rhs_binds -> do { dflags <- getDynFlags - ; ds_call <- dsLExpr the_call + ; ds_call <- zapUnspecables $ + -- zapUnspecables: see Note [Desugaring RULE left hand sides] + dsLExpr the_call ; let simpl_opts = initSimpleOpts dflags core_call = mkLets ds_lhs_binds $ drop_cast $ ===================================== compiler/GHC/Tc/TyCl/Instance.hs ===================================== @@ -2002,7 +2002,17 @@ tcMethodBody skol_info clas tyvars dfun_ev_vars inst_tys tcMethodBodyHelp sig_fn sel_id local_meth_id (L bind_loc lm_bind) ; global_meth_id <- addInlinePrags global_meth_id prags - ; spec_prags <- tcSpecPrags global_meth_id prags + ; spec_prags <- tcExtendIdEnv1 (idName sel_id) global_meth_id $ + -- tcExtendIdEnv1: tricky point: a SPECIALISE pragma in prags + -- mentions sel_name but the pragma is really for global_meth_id. + -- So we bind sel_name to global_meth_id, just in the pragmas. + -- Example: + -- instance C [a] where + -- op :: forall b. Ord b => b -> a -> a + -- {-# SPECIALISE b @Int #-} + -- The speclalisation is for the `op` for this instance decl, not + -- for the gloabal selector-id, of course. + tcSpecPrags global_meth_id prags ; let specs = mk_meth_spec_prags global_meth_id spec_inst_prags spec_prags export = ABE { abe_poly = global_meth_id View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9d743a53bb51b4e0e5f94873048236b5b41894f6 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9d743a53bb51b4e0e5f94873048236b5b41894f6 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 19:00:34 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 20 Nov 2024 14:00:34 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] 120 commits: linker: add --optimistic-linking flag Message-ID: <673e31d26c29d_32968615586049273@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - bf4e5562 by Matthew Pickering at 2024-11-20T19:00:12+00:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 30 changed files: - .ghcid - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs - compiler/GHC/Builtin/Types/Prim.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Coercion.hs-boot - compiler/GHC/Core/Coercion/Opt.hs - compiler/GHC/Core/DataCon.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/CprAnal.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/32017a7f0d1005700e7ca7e4e0c03881a3715db6...bf4e5562736b3217702d19a86acf5bbe04f73a08 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/32017a7f0d1005700e7ca7e4e0c03881a3715db6...bf4e5562736b3217702d19a86acf5bbe04f73a08 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 23:10:51 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 20 Nov 2024 18:10:51 -0500 Subject: [Git][ghc/ghc][master] 2 commits: Add test for #25185 Message-ID: <673e6c7b2bb48_9ba012840d8994a9@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 7 changed files: - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Utils/Monad.hs - testsuite/tests/linear/should_fail/LinearConfusedDollar.stderr - + testsuite/tests/linear/should_fail/T25185.hs - + testsuite/tests/linear/should_fail/T25185.stderr - testsuite/tests/linear/should_fail/all.T Changes: ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -569,6 +569,7 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted , eaql_arg_ty = sc_arg_ty , eaql_larg = larg@(L arg_loc rn_expr) , eaql_tc_fun = tc_head + , eaql_fun_ue = head_ue , eaql_args = inst_args , eaql_encl = arg_influences_enclosing_call , eaql_res_rho = app_res_rho }) @@ -578,7 +579,8 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted ; traceTc "tcEValArgQL {" (vcat [ text "app_res_rho:" <+> ppr app_res_rho , text "exp_arg_ty:" <+> ppr exp_arg_ty - , text "args:" <+> ppr inst_args ]) + , text "args:" <+> ppr inst_args + , text "mult:" <+> ppr mult]) ; ds_flag <- getDeepSubsumptionFlag ; (wrap, arg') @@ -587,6 +589,9 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted do { -- Emit saved-up constraints, /under/ the tcSkolemise -- See (QLA4) in Note [Quick Look at value arguments] emitConstraints wanted + -- Emit saved-up usages /under/ the tcScalingUsage. + -- See (QLA5) in Note [Quick Look at value arguments] + ; tcEmitBindingUsage head_ue -- Unify with context if we have not already done so -- See (QLA4) in Note [Quick Look at value arguments] @@ -1630,6 +1635,41 @@ This turned out to be more subtle than I expected. Wrinkles: (kappa = [forall a. a->a]). Now we resume typechecking argument [], and we must take advantage of what we have now discovered about `kappa`, to typecheck [] :: [forall a. a->a] + +(QLA5) In the quicklook pass, we don't scale multiplicities. Since arguments + aren't typechecked yet, we don't know their free variable usages + anyway. But, in a nested call, the head of an application chain is fully + typechecked. + + In order for the multiplicities in the head to be properly scaled, we store + the head's usage environment in the eaql_fun_ue field. Then, when we do the + full-typechecking pass, we can emit the head's usage environment where we + would have typechecked the head in a naive algorithm. + +(QLA6) `quickLookArg` is supposed to capture the result of partially typechecking + the argument, so it can be resumed later. "Capturing" should include all + generated type-class/equality constraints and Linear-Haskell usage info. There + are two calls in `quickLookArg1` that might generate such constraints: + + - `tcInferAppHead_maybe`. This can generat Linear-Haskell usage info, via + the call to `tcEmitBindingUsage` in `check_local_id`, which is called + indirectly by `tcInferAppHead_maybe`. + + In contrast, `tcInferAppHead_maybe` does not generate any type-class or + equality constraints, because it doesn't instantiate any functions. [But + see #25493 and #25494 for why this isn't quite true today.] + + - `tcInstFun` generates lots of type-class and equality constraints, as it + instantiates the function. But it generates no usage info, because that + comes only from the call to `check_local_id`, whose usage info is captured + in the call to `tcInferAppHead_maybe` in `quickLookArg1`. + + Conclusion: in quickLookArg1: + - capture usage information (but not constraints) + for the call to `tcInferAppHead_maybe` + - capture constraints (but not usage information) + for the call to `tcInstFun` + -} quickLookArg :: QLFlag -> AppCtxt @@ -1697,7 +1737,12 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) do { ((rn_fun, fun_ctxt), rn_args) <- splitHsApps arg -- Step 1: get the type of the head of the argument - ; mb_fun_ty <- tcInferAppHead_maybe rn_fun + ; (fun_ue, mb_fun_ty) <- tcCollectingUsage $ tcInferAppHead_maybe rn_fun + -- tcCollectingUsage: the use of an Id at the head generates usage-info + -- See the call to `tcEmitBindingUsage` in `check_local_id`. So we must + -- capture and save it in the `EValArgQL`. See (QLA6) in + -- Note [Quick Look at value arguments] + ; traceTc "quickLookArg {" $ vcat [ text "arg:" <+> ppr arg , text "orig_arg_rho:" <+> ppr orig_arg_rho @@ -1714,6 +1759,9 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) ; ((inst_args, app_res_rho), wanted) <- captureConstraints $ tcInstFun do_ql True tc_head fun_sigma rn_args + -- We must capture type-class and equality constraints here, but + -- not equality constraints. See (QLA6) in Note [Quick Look at + -- value arguments] ; traceTc "quickLookArg 2" $ vcat [ text "arg:" <+> ppr arg @@ -1746,6 +1794,7 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) , eaql_arg_ty = sc_arg_ty , eaql_larg = larg , eaql_tc_fun = tc_head + , eaql_fun_ue = fun_ue , eaql_args = inst_args , eaql_wanted = wanted , eaql_encl = arg_influences_enclosing_call ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -57,7 +57,7 @@ import GHC.Tc.Zonk.TcType import GHC.Core.FamInstEnv ( FamInstEnvs ) -import GHC.Core.UsageEnv ( singleUsageUE ) +import GHC.Core.UsageEnv ( singleUsageUE, UsageEnv ) import GHC.Core.PatSyn( PatSyn, patSynName ) import GHC.Core.ConLike( ConLike(..) ) import GHC.Core.DataCon @@ -178,6 +178,7 @@ data HsExprArg (p :: TcPass) where -- See Note [HsExprArg] , eaql_larg :: LHsExpr GhcRn -- Original application, for -- location and error msgs , eaql_tc_fun :: (HsExpr GhcTc, AppCtxt) -- Typechecked head + , eaql_fun_ue :: UsageEnv -- Usage environment of the typechecked head (QLA5) , eaql_args :: [HsExprArg 'TcpInst] -- Args: instantiated, not typechecked , eaql_wanted :: WantedConstraints , eaql_encl :: Bool -- True <=> we have already qlUnified ===================================== compiler/GHC/Tc/Utils/Monad.hs ===================================== @@ -1412,7 +1412,7 @@ tcCollectingUsage thing_inside tcScalingUsage :: Mult -> TcM a -> TcM a tcScalingUsage mult thing_inside = do { (usage, result) <- tcCollectingUsage thing_inside - ; traceTc "tcScalingUsage" (ppr mult) + ; traceTc "tcScalingUsage" $ vcat [ppr mult, ppr usage] ; tcEmitBindingUsage $ scaleUE mult usage ; return result } ===================================== testsuite/tests/linear/should_fail/LinearConfusedDollar.stderr ===================================== @@ -1,3 +1,7 @@ +LinearConfusedDollar.hs:12:3: error: [GHC-18872] + • Couldn't match type ‘Many’ with ‘One’ + arising from multiplicity of ‘x’ + • In an equation for ‘g’: g x = f $ x LinearConfusedDollar.hs:12:7: error: [GHC-83865] • Couldn't match type ‘One’ with ‘Many’ @@ -6,3 +10,4 @@ LinearConfusedDollar.hs:12:7: error: [GHC-83865] • In the first argument of ‘($)’, namely ‘f’ In the expression: f $ x In an equation for ‘g’: g x = f $ x + ===================================== testsuite/tests/linear/should_fail/T25185.hs ===================================== @@ -0,0 +1,10 @@ +{-# LANGUAGE LinearTypes #-} +{-# LANGUAGE ImpredicativeTypes #-} + +module T25185 where + +f :: Int -> Int +f x = x + +g :: Int %1 -> Int +g y = f y ===================================== testsuite/tests/linear/should_fail/T25185.stderr ===================================== @@ -0,0 +1,5 @@ +T25185.hs:10:3: error: [GHC-18872] + • Couldn't match type ‘Many’ with ‘One’ + arising from multiplicity of ‘y’ + • In an equation for ‘g’: g y = f y + ===================================== testsuite/tests/linear/should_fail/all.T ===================================== @@ -53,3 +53,4 @@ test('LinearLet9', normal, compile_fail, ['']) test('LinearLet10', normal, compile_fail, ['']) test('T25081', normal, compile_fail, ['']) test('T24961', normal, compile_fail, ['']) +test('T25185', normal, compile_fail, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/11bad98d67ae5557eae1dd965f0457b78b496ecc...374e18e5e79125375a49432da939abbb36268c8a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/11bad98d67ae5557eae1dd965f0457b78b496ecc...374e18e5e79125375a49432da939abbb36268c8a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 23:11:32 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 20 Nov 2024 18:11:32 -0500 Subject: [Git][ghc/ghc][master] x86 NCG: fix regUsageOfInstr for VMOVU & friends Message-ID: <673e6ca46c798_9ba01272540104019@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 5 changed files: - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - + testsuite/tests/simd/should_run/T25486.hs - + testsuite/tests/simd/should_run/T25486.stdout - testsuite/tests/simd/should_run/all.T Changes: ===================================== compiler/GHC/CmmToAsm/Format.hs ===================================== @@ -273,6 +273,9 @@ instance Show RegWithFormat where instance Uniquable RegWithFormat where getUnique = getUnique . regWithFormat_reg +instance Outputable VirtualRegWithFormat where + ppr (VirtualRegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt + instance Outputable RegWithFormat where ppr (RegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt ===================================== compiler/GHC/CmmToAsm/X86/Instr.hs ===================================== @@ -373,8 +373,9 @@ regUsageOfInstr platform instr | otherwise -> usageRW fmt src dst MOVD fmt src dst -> - -- NB: MOVD/MOVQ always zero any remaining upper part of destination - mkRU (use_R fmt src []) (use_R (movdOutFormat fmt) dst []) + -- NB: MOVD and MOVQ always zero any remaining upper part of destination, + -- so the destination is "written" not "modified". + usageRW' fmt (movdOutFormat fmt) src dst CMOV _ fmt src dst -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MOVZxL fmt src dst -> usageRW fmt src dst MOVSxL fmt src dst -> usageRW fmt src dst @@ -475,7 +476,7 @@ regUsageOfInstr platform instr -- vector instructions VBROADCAST fmt src dst -> mkRU (use_R fmt src []) [mk fmt dst] - VEXTRACT fmt _off src dst -> mkRU [mk fmt src] (use_R fmt dst []) + VEXTRACT fmt _off src dst -> usageRW fmt (OpReg src) dst INSERTPS fmt (ImmInt off) src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst | not doesNotReadDst]) [mk fmt dst] where @@ -488,12 +489,12 @@ regUsageOfInstr platform instr INSERTPS fmt _off src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst]) [mk fmt dst] - VMOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVL fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVH fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - VMOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) + VMOVU fmt src dst -> usageRW fmt src dst + MOVU fmt src dst -> usageRW fmt src dst + MOVL fmt src dst -> usageRM fmt src dst + MOVH fmt src dst -> usageRM fmt src dst + MOVDQU fmt src dst -> usageRW fmt src dst + VMOVDQU fmt src dst -> usageRW fmt src dst PXOR fmt (OpReg src) dst | src == dst @@ -531,11 +532,12 @@ regUsageOfInstr platform instr -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MINMAX _ _ fmt src dst - -> mkRU (use_R fmt src $ use_R fmt dst []) (use_R fmt dst []) + -> usageRM fmt src dst VMINMAX _ _ fmt src1 src2 dst -> mkRU (use_R fmt src1 [mk fmt src2]) [mk fmt dst] _other -> panic "regUsage: unrecognised instr" where + -- # Definitions -- -- Written: If the operand is a register, it's written. If it's an @@ -551,6 +553,11 @@ regUsageOfInstr platform instr usageRW fmt op (OpAddr ea) = mkRUR (use_R fmt op $! use_EA ea []) usageRW _ _ _ = panic "X86.RegInfo.usageRW: no match" + usageRW' :: HasDebugCallStack => Format -> Format -> Operand -> Operand -> RegUsage + usageRW' fmt1 fmt2 op (OpReg reg) = mkRU (use_R fmt1 op []) [mk fmt2 reg] + usageRW' fmt1 _ op (OpAddr ea) = mkRUR (use_R fmt1 op $! use_EA ea []) + usageRW' _ _ _ _ = panic "X86.RegInfo.usageRW: no match" + -- 2 operand form; first operand Read; second Modified usageRM :: HasDebugCallStack => Format -> Operand -> Operand -> RegUsage usageRM fmt op (OpReg reg) = mkRU (use_R fmt op [mk fmt reg]) [mk fmt reg] ===================================== testsuite/tests/simd/should_run/T25486.hs ===================================== @@ -0,0 +1,48 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} + +module Main where + +import GHC.Exts +import GHC.IO +import Data.Array.Base +import Data.Array.IO.Internals +import Control.Monad +import Foreign.Marshal.Array + +writeFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatX4OffAddr# addr i v s, () #) + +writeAsFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeAsFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatOffAddrAsFloatX4# addr i v s, () #) + +writeFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatX4Array# mba i# v s, () #) + +writeAsFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeAsFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatArrayAsFloatX4# mba i# v s, () #) + +main :: IO () +main = do + let v = packFloatX4# (# 0.1#, 1.1#, 2.2#, 3.3# #) + + xs <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print xs + + ys <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeAsFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print ys + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeFloatX4 ma 1 v + print =<< getElems ma + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeAsFloatX4 ma 1 v + print =<< getElems ma ===================================== testsuite/tests/simd/should_run/T25486.stdout ===================================== @@ -0,0 +1,4 @@ +[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,0.1,1.1,2.2,3.3,12.0,13.0,14.0,15.0] +[0.0,1.0,0.1,1.1,2.2,3.3,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0] +[0.0,1.0,2.0,3.0,0.1,1.1,2.2,3.3,8.0,9.0] +[0.0,0.1,1.1,2.2,3.3,5.0,6.0,7.0,8.0,9.0] ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -90,3 +90,4 @@ test('T25062_V64' test('T25169', [], compile_and_run, ['']) test('T25455', [], compile_and_run, ['']) +test('T25486', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1fc02399fcc82a222033919c8d3c5db4b382cb97 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1fc02399fcc82a222033919c8d3c5db4b382cb97 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 23:22:54 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 20 Nov 2024 18:22:54 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25509 Message-ID: <673e6f4eac4d_9ba016c1b7811066b@gitlab.mail> Ben Gamari pushed new branch wip/T25509 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25509 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 23:24:19 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 20 Nov 2024 18:24:19 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] hadrian-ghci-multi: Pass -this-package-name in unit response files Message-ID: <673e6fa3c2931_9ba0162f2a0114979@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: e267aa7f by Ben Gamari at 2024-11-20T18:19:58-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - 1 changed file: - hadrian/src/Rules/ToolArgs.hs Changes: ===================================== hadrian/src/Rules/ToolArgs.hs ===================================== @@ -86,9 +86,10 @@ multiSetup pkg_s = do let rexp m = ["-reexported-module", m] let hidir = root "interfaces" pkgPath p writeFile' (resp_file root p) (intercalate "\n" (th_hack arg_list - ++ modules cd + ++ modules cd ++ concatMap rexp (reexportModules cd) - ++ ["-outputdir", hidir])) + ++ ["-outputdir", hidir, + "-this-package-name", pkgName p])) return (resp_file root p) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e267aa7fa2cfc10e97571d14a76ca9a0dc4a668f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e267aa7fa2cfc10e97571d14a76ca9a0dc4a668f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 23:38:55 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 20 Nov 2024 18:38:55 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] gitlab-ci: Enable Sphinx output on CentOS 7 Message-ID: <673e730ff245a_9ba01a7be1c1218cb@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 669d193d by Ben Gamari at 2024-11-20T18:38:25-05:00 gitlab-ci: Enable Sphinx output on CentOS 7 This is the last platform with Sphinx disabled. - - - - - 1 changed file: - .gitlab/gen_ci.hs Changes: ===================================== .gitlab/gen_ci.hs ===================================== @@ -448,8 +448,7 @@ distroVariables :: LinuxDistro -> Variables distroVariables Alpine312 = alpineVariables distroVariables Alpine318 = alpineVariables distroVariables Centos7 = mconcat [ - "HADRIAN_ARGS" =: "--docs=no-sphinx" - , "BROKEN_TESTS" =: "T22012" -- due to #23979 + "BROKEN_TESTS" =: "T22012" -- due to #23979 ] distroVariables Fedora33 = mconcat -- LLC/OPT do not work for some reason in our fedora images View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/669d193d9dbaff49695dbd627a5dd0f92e848279 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/669d193d9dbaff49695dbd627a5dd0f92e848279 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 23:39:47 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 20 Nov 2024 18:39:47 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] gitlab-ci: Enable Sphinx output on CentOS 7 Message-ID: <673e7343bf182_9ba016c1b8c1222a0@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 1d6a3cb1 by Ben Gamari at 2024-11-20T18:39:37-05:00 gitlab-ci: Enable Sphinx output on CentOS 7 This is the last platform with Sphinx disabled. - - - - - 1 changed file: - .gitlab/gen_ci.hs Changes: ===================================== .gitlab/gen_ci.hs ===================================== @@ -448,7 +448,7 @@ distroVariables :: LinuxDistro -> Variables distroVariables Alpine312 = alpineVariables distroVariables Alpine318 = alpineVariables distroVariables Centos7 = mconcat [ - "HADRIAN_ARGS" =: "--docs=no-sphinx" + "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs" , "BROKEN_TESTS" =: "T22012" -- due to #23979 ] distroVariables Fedora33 = mconcat View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1d6a3cb1272bb9bf078dfe4481c2e7ccb5e0a4bc -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1d6a3cb1272bb9bf078dfe4481c2e7ccb5e0a4bc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 20 23:55:37 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Wed, 20 Nov 2024 18:55:37 -0500 Subject: [Git][ghc/ghc][wip/T24359] Improvements Message-ID: <673e76f99321a_9ba01d83a9c125874@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: ce734a61 by Simon Peyton Jones at 2024-11-20T23:55:13+00:00 Improvements - - - - - 5 changed files: - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/HsToCore/Types.hs - compiler/GHC/Tc/Gen/Sig.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -75,7 +75,6 @@ import GHC.Data.Maybe import GHC.Data.OrdList import GHC.Data.Graph.Directed import GHC.Data.Bag -import qualified Data.Set as S import GHC.Utils.Constants (debugIsOn) import GHC.Utils.Misc @@ -857,6 +856,7 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id mkLets ds_rhs_binds $ core_call + ; tracePm "dsSpec1" (vcat [ ppr poly_id $$ ppr ds_call $$ ppr core_call]) ; finishSpecPrag mb_poly_rhs (tv_bndrs ++ lhs_evs ++ id_bndrs) core_call (tv_bndrs ++ rhs_evs ++ id_bndrs) mk_spec_call @@ -1443,29 +1443,34 @@ dsEvBinds ev_binds thing_inside thing_inside (core_bind:core_binds) } go [] thing_inside = thing_inside [] - ds_component unspecables (AcyclicSCC node) = (NonRec v rhs, new_unspecables) + ds_component mb_unspecables (AcyclicSCC node) = (NonRec v rhs, new_unspecables) where ((v, rhs), (this_canonical, deps)) = unpack_node node - transitively_unspecable = is_unspecable this_canonical || any is_unspecable_dep deps - is_unspecable_dep dep = dep `S.member` unspecables - new_unspecables - | transitively_unspecable = S.singleton v - | otherwise = mempty - ds_component unspecables (CyclicSCC nodes) = (Rec pairs, new_unspecables) + new_unspecables = case mb_unspecables of + Nothing -> [] + Just unspecs | transitively_unspecable -> [v] + | otherwise -> [] + where + transitively_unspecable = is_unspecable this_canonical + || any (`elemVarSet` unspecs) deps + + ds_component mb_unspecables (CyclicSCC nodes) = (Rec pairs, new_unspecables) where (pairs, direct_canonicity) = unzip $ map unpack_node nodes - is_unspecable_remote dep = dep `S.member` unspecables - transitively_unspecable = or [ is_unspecable this_canonical || any is_unspecable_remote deps - | (this_canonical, deps) <- direct_canonicity ] + new_unspecables = case mb_unspecables of + Nothing -> [] + Just unspecs | transitively_unspecable -> map fst pairs + | otherwise -> [] + where + transitively_unspecable + = or [ is_unspecable this_canonical + || any (`elemVarSet` unspecs) deps + | (this_canonical, deps) <- direct_canonicity ] -- Bindings from a given SCC are transitively specialisable if -- all are specialisable and all their remote dependencies are -- also specialisable; see Note [Desugaring non-canonical evidence] - new_unspecables - | transitively_unspecable = S.fromList [ v | (v, _) <- pairs] - | otherwise = mempty - unpack_node DigraphNode { node_key = v, node_payload = (canonical, rhs), node_dependencies = deps } = ((v, rhs), (canonical, deps)) ===================================== compiler/GHC/HsToCore/Expr.hs ===================================== @@ -62,6 +62,7 @@ import GHC.Types.Id import GHC.Types.Id.Info import GHC.Types.Id.Make import GHC.Types.Var( isInvisibleAnonPiTyBinder ) +import GHC.Types.Var.Set( isEmptyVarSet, elemVarSet ) import GHC.Types.Basic import GHC.Types.SrcLoc import GHC.Types.Tickish @@ -76,7 +77,6 @@ import GHC.Utils.Misc import GHC.Utils.Outputable as Outputable import GHC.Utils.Panic import Control.Monad -import qualified Data.Set as S {- ************************************************************************ @@ -793,15 +793,15 @@ ds_app_finish :: Id -> [CoreExpr] -> DsM CoreExpr -- See Note [nospecId magic] in GHC.Types.Id.Make for what `nospec` does. -- See Note [Desugaring non-canonical evidence] ds_app_finish fun_id core_args - = do { unspecables <- getUnspecables + = do { mb_unspecables <- getUnspecables ; let fun_ty = idType fun_id free_dicts = exprsFreeVarsList [ e | (e,pi_bndr) <- core_args `zip` fst (splitPiTys fun_ty) , isInvisibleAnonPiTyBinder pi_bndr ] - is_unspecable_var v = v `S.member` unspecables - fun | not (S.null unspecables) -- Fast path - , any (is_unspecable_var) free_dicts + fun | Just unspecables <- mb_unspecables + , not (isEmptyVarSet unspecables) -- Fast path + , any (`elemVarSet` unspecables) free_dicts = Var nospecId `App` Type fun_ty `App` Var fun_id | otherwise = Var fun_id @@ -958,7 +958,8 @@ Wrinkle: We definitely can't desugar that LHS into this! nospec (f @Int d1) d2 - This is done by zapping the unspecables in `dsRule`. + This is done by zapping the unspecables in `dsRule` to Nothing. That `Nothing` + says not to collet unspecables at all. Note [Desugaring explicit lists] ===================================== compiler/GHC/HsToCore/Monad.hs ===================================== @@ -94,7 +94,8 @@ import GHC.Unit.Module.ModGuts import GHC.Types.Name.Reader import GHC.Types.SourceFile import GHC.Types.Id -import GHC.Types.Var (EvId) +import GHC.Types.Var (EvVar) +import GHC.Types.Var.Set( VarSet, emptyVarSet, extendVarSetList ) import GHC.Types.SrcLoc import GHC.Types.TypeEnv import GHC.Types.Unique.Supply @@ -117,7 +118,6 @@ import qualified GHC.Data.Strict as Strict import Data.IORef import GHC.Driver.Env.KnotVars -import qualified Data.Set as S import GHC.IO.Unsafe (unsafeInterleaveIO) {- @@ -406,7 +406,7 @@ mkDsEnvs unit_env mod rdr_env type_env fam_inst_env ptc msg_var cc_st_var lcl_env = DsLclEnv { dsl_meta = emptyNameEnv , dsl_loc = real_span , dsl_nablas = initNablas - , dsl_unspecables = mempty + , dsl_unspecables = Just emptyVarSet } in (gbl_env, lcl_env) @@ -469,13 +469,17 @@ getPmNablas = do { env <- getLclEnv; return (dsl_nablas env) } updPmNablas :: Nablas -> DsM a -> DsM a updPmNablas nablas = updLclEnv (\env -> env { dsl_nablas = nablas }) -addUnspecables :: S.Set EvId -> DsM a -> DsM a -addUnspecables unspecables = updLclEnv (\env -> env{ dsl_unspecables = unspecables `mappend` dsl_unspecables env }) +addUnspecables :: [EvVar] -> DsM a -> DsM a +addUnspecables new_unspecables + = updLclEnv (\env -> case dsl_unspecables env of + Nothing -> env + Just us -> env { dsl_unspecables + = Just (us `extendVarSetList` new_unspecables) }) zapUnspecables :: DsM a -> DsM a -zapUnspecables = updLclEnv (\env -> env{ dsl_unspecables = mempty }) +zapUnspecables = updLclEnv (\env -> env{ dsl_unspecables = Nothing }) -getUnspecables :: DsM (S.Set EvId) +getUnspecables :: DsM (Maybe VarSet) getUnspecables = dsl_unspecables <$> getLclEnv getSrcSpanDs :: DsM SrcSpan ===================================== compiler/GHC/HsToCore/Types.hs ===================================== @@ -14,27 +14,34 @@ module GHC.HsToCore.Types ( import GHC.Prelude (Int) import Data.IORef -import qualified Data.Set as S import GHC.Types.CostCentre.State import GHC.Types.Error import GHC.Types.Name.Env import GHC.Types.SrcLoc import GHC.Types.Var +import GHC.Types.Var.Set import GHC.Types.Name.Reader (GlobalRdrEnv) + import GHC.Hs (LForeignDecl, HsExpr, GhcTc) + import GHC.Tc.Types (TcRnIf, IfGblEnv, IfLclEnv) + import GHC.HsToCore.Pmc.Types (Nablas) import GHC.HsToCore.Errors.Types + import GHC.Core (CoreExpr) import GHC.Core.FamInstEnv import GHC.Utils.Outputable as Outputable import GHC.Unit.Module import GHC.Driver.Hooks (DsForeignsHook) import GHC.Data.OrdList (OrdList) + import GHC.Types.ForeignStubs (ForeignStubs) import GHC.Types.CompleteMatch +import Data.Maybe( Maybe ) + {- ************************************************************************ * * @@ -80,9 +87,11 @@ data DsLclEnv -- ^ See Note [Long-distance information] in "GHC.HsToCore.Pmc". -- The set of reaching values Nablas is augmented as we walk inwards, refined -- through each pattern match in turn - , dsl_unspecables :: S.Set EvVar - -- ^ See Note [Desugaring non-canonical evidence]: this field collects - -- all un-specialisable evidence variables in scope. + + , dsl_unspecables :: Maybe VarSet + -- ^ See Note [Desugaring non-canonical evidence] + -- This field collects all un-specialisable evidence variables in scope. + -- Nothing <=> don't collect this info (used for the LHS of Rules) } -- Inside [| |] brackets, the desugarer looks ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -898,6 +898,7 @@ tcSpecPrag poly_id prag@(SpecSig _ fun_name hs_tys inl) tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) = do { -- Typecheck the expression, spec_e, capturing its constraints let skol_info_anon = SpecESkol nm + ; traceTc "tcSpecPrag: specSigE1" (ppr nm $$ ppr spec_e) ; skol_info <- mkSkolemInfo skol_info_anon ; (tc_lvl, wanted, (id_bndrs, spec_e', rho)) <- pushLevelAndCaptureConstraints $ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ce734a61c8e8cbdb4b004daa86658ee8d2184365 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ce734a61c8e8cbdb4b004daa86658ee8d2184365 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 02:36:59 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Wed, 20 Nov 2024 21:36:59 -0500 Subject: [Git][ghc/ghc][wip/fix-bytecode-hpc] 4 commits: Add test for #25185 Message-ID: <673e9ccb2819d_1708462a7a4c73578@gitlab.mail> Cheng Shao pushed to branch wip/fix-bytecode-hpc at Glasgow Haskell Compiler / GHC Commits: 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - fdc0d695 by Cheng Shao at 2024-11-21T02:35:51+00:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 26 changed files: - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/StgToCmm/Config.hs - compiler/GHC/StgToCmm/Hpc.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Unit/Module/ModGuts.hs - + testsuite/tests/bytecode/T25510/Makefile - + testsuite/tests/bytecode/T25510/T25510A.hs - + testsuite/tests/bytecode/T25510/T25510B.hs - + testsuite/tests/bytecode/T25510/all.T - testsuite/tests/linear/should_fail/LinearConfusedDollar.stderr - + testsuite/tests/linear/should_fail/T25185.hs - + testsuite/tests/linear/should_fail/T25185.stderr - testsuite/tests/linear/should_fail/all.T - + testsuite/tests/simd/should_run/T25486.hs - + testsuite/tests/simd/should_run/T25486.stdout - testsuite/tests/simd/should_run/all.T - testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs Changes: ===================================== compiler/GHC/CmmToAsm/Format.hs ===================================== @@ -273,6 +273,9 @@ instance Show RegWithFormat where instance Uniquable RegWithFormat where getUnique = getUnique . regWithFormat_reg +instance Outputable VirtualRegWithFormat where + ppr (VirtualRegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt + instance Outputable RegWithFormat where ppr (RegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt ===================================== compiler/GHC/CmmToAsm/X86/Instr.hs ===================================== @@ -373,8 +373,9 @@ regUsageOfInstr platform instr | otherwise -> usageRW fmt src dst MOVD fmt src dst -> - -- NB: MOVD/MOVQ always zero any remaining upper part of destination - mkRU (use_R fmt src []) (use_R (movdOutFormat fmt) dst []) + -- NB: MOVD and MOVQ always zero any remaining upper part of destination, + -- so the destination is "written" not "modified". + usageRW' fmt (movdOutFormat fmt) src dst CMOV _ fmt src dst -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MOVZxL fmt src dst -> usageRW fmt src dst MOVSxL fmt src dst -> usageRW fmt src dst @@ -475,7 +476,7 @@ regUsageOfInstr platform instr -- vector instructions VBROADCAST fmt src dst -> mkRU (use_R fmt src []) [mk fmt dst] - VEXTRACT fmt _off src dst -> mkRU [mk fmt src] (use_R fmt dst []) + VEXTRACT fmt _off src dst -> usageRW fmt (OpReg src) dst INSERTPS fmt (ImmInt off) src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst | not doesNotReadDst]) [mk fmt dst] where @@ -488,12 +489,12 @@ regUsageOfInstr platform instr INSERTPS fmt _off src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst]) [mk fmt dst] - VMOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVL fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVH fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - VMOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) + VMOVU fmt src dst -> usageRW fmt src dst + MOVU fmt src dst -> usageRW fmt src dst + MOVL fmt src dst -> usageRM fmt src dst + MOVH fmt src dst -> usageRM fmt src dst + MOVDQU fmt src dst -> usageRW fmt src dst + VMOVDQU fmt src dst -> usageRW fmt src dst PXOR fmt (OpReg src) dst | src == dst @@ -531,11 +532,12 @@ regUsageOfInstr platform instr -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MINMAX _ _ fmt src dst - -> mkRU (use_R fmt src $ use_R fmt dst []) (use_R fmt dst []) + -> usageRM fmt src dst VMINMAX _ _ fmt src1 src2 dst -> mkRU (use_R fmt src1 [mk fmt src2]) [mk fmt dst] _other -> panic "regUsage: unrecognised instr" where + -- # Definitions -- -- Written: If the operand is a register, it's written. If it's an @@ -551,6 +553,11 @@ regUsageOfInstr platform instr usageRW fmt op (OpAddr ea) = mkRUR (use_R fmt op $! use_EA ea []) usageRW _ _ _ = panic "X86.RegInfo.usageRW: no match" + usageRW' :: HasDebugCallStack => Format -> Format -> Operand -> Operand -> RegUsage + usageRW' fmt1 fmt2 op (OpReg reg) = mkRU (use_R fmt1 op []) [mk fmt2 reg] + usageRW' fmt1 _ op (OpAddr ea) = mkRUR (use_R fmt1 op $! use_EA ea []) + usageRW' _ _ _ _ = panic "X86.RegInfo.usageRW: no match" + -- 2 operand form; first operand Read; second Modified usageRM :: HasDebugCallStack => Format -> Operand -> Operand -> RegUsage usageRM fmt op (OpReg reg) = mkRU (use_R fmt op [mk fmt reg]) [mk fmt reg] ===================================== compiler/GHC/Driver/Config/StgToCmm.hs ===================================== @@ -38,7 +38,6 @@ initStgToCmmConfig dflags mod = StgToCmmConfig -- flags , stgToCmmLoopification = gopt Opt_Loopification dflags , stgToCmmAlignCheck = gopt Opt_AlignmentSanitisation dflags - , stgToCmmOptHpc = gopt Opt_Hpc dflags , stgToCmmFastPAPCalls = gopt Opt_FastPAPCalls dflags , stgToCmmSCCProfiling = sccProfilingEnabled dflags , stgToCmmEagerBlackHole = gopt Opt_EagerBlackHoling dflags ===================================== compiler/GHC/Driver/Hooks.hs ===================================== @@ -48,7 +48,6 @@ import GHC.Types.Basic import GHC.Types.CostCentre import GHC.Types.IPE import GHC.Types.Meta -import GHC.Types.HpcInfo import GHC.Unit.Module import GHC.Unit.Module.ModSummary @@ -149,7 +148,7 @@ data Hooks = Hooks -> IO (Either Type (HValue, [Linkable], PkgsLoaded)))) , createIservProcessHook :: !(Maybe (CreateProcess -> IO ProcessHandle)) , stgToCmmHook :: !(Maybe (StgToCmmConfig -> InfoTableProvMap -> [TyCon] -> CollectedCCs - -> [CgStgTopBinding] -> HpcInfo -> CgStream CmmGroup ModuleLFInfos)) + -> [CgStgTopBinding] -> CgStream CmmGroup ModuleLFInfos)) , cmmToRawCmmHook :: !(forall a . Maybe (DynFlags -> Maybe Module -> CgStream CmmGroupSRTs a -> IO (CgStream RawCmmGroup a))) } ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -248,7 +248,6 @@ import GHC.Types.Name.Cache ( initNameCache ) import GHC.Types.Name.Reader import GHC.Types.Name.Ppr import GHC.Types.TyThing -import GHC.Types.HpcInfo import GHC.Types.Unique.Supply (uniqFromTag) import GHC.Types.Unique.Set @@ -1980,7 +1979,6 @@ hscGenHardCode hsc_env cgguts location output_filename = do cg_foreign = foreign_stubs0, cg_foreign_files = foreign_files, cg_dep_pkgs = dependencies, - cg_hpc_info = hpc_info, cg_spt_entries = spt_entries, cg_binds = late_binds, cg_ccs = late_local_ccs @@ -2084,7 +2082,7 @@ hscGenHardCode hsc_env cgguts location output_filename = do cmms <- {-# SCC "StgToCmm" #-} doCodeGen hsc_env this_mod denv data_tycons cost_centre_info - stg_binds hpc_info + stg_binds ------------------ Code output ----------------------- rawcmms0 <- {-# SCC "cmmToRawCmm" #-} @@ -2291,13 +2289,12 @@ This reduces residency towards the end of the CodeGen phase significantly doCodeGen :: HscEnv -> Module -> InfoTableProvMap -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -- ^ Bindings come already annotated with fvs - -> HpcInfo -> IO (CgStream CmmGroupSRTs CmmCgInfos) -- Note we produce a 'Stream' of CmmGroups, so that the -- backend can be run incrementally. Otherwise it generates all -- the C-- up front, which has a significant space cost. doCodeGen hsc_env this_mod denv data_tycons - cost_centre_info stg_binds_w_fvs hpc_info = do + cost_centre_info stg_binds_w_fvs = do let dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env hooks = hsc_hooks hsc_env @@ -2308,14 +2305,14 @@ doCodeGen hsc_env this_mod denv data_tycons putDumpFileMaybe logger Opt_D_dump_stg_final "Final STG:" FormatSTG (pprGenStgTopBindings stg_ppr_opts stg_binds_w_fvs) - let stg_to_cmm dflags mod a b c d e = case stgToCmmHook hooks of - Nothing -> StgToCmm.codeGen logger tmpfs (initStgToCmmConfig dflags mod) a b c d e - Just h -> (,emptyDetUFM) <$> h (initStgToCmmConfig dflags mod) a b c d e + let stg_to_cmm dflags mod a b c d = case stgToCmmHook hooks of + Nothing -> StgToCmm.codeGen logger tmpfs (initStgToCmmConfig dflags mod) a b c d + Just h -> (,emptyDetUFM) <$> h (initStgToCmmConfig dflags mod) a b c d let cmm_stream :: CgStream CmmGroup (ModuleLFInfos, DetUniqFM) -- See Note [Forcing of stg_binds] cmm_stream = stg_binds_w_fvs `seqList` {-# SCC "StgToCmm" #-} - stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs hpc_info + stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs -- codegen consumes a stream of CmmGroup, and produces a new -- stream of CmmGroup (not necessarily synchronised: one ===================================== compiler/GHC/HsToCore/Coverage.hs ===================================== @@ -117,7 +117,7 @@ hpcInitCode platform this_mod (HpcInfo tickCount hashNo) = initializerCStub platform fn_name decls body where fn_name = mkInitializerStubLabel this_mod (fsLit "hpc") - decls = text "extern StgWord64 " <> tickboxes <> text "[]" <> semi + decls = text "StgWord64 " <> tickboxes <> brackets (int tickCount) <> semi body = text "hs_hpc_module" <> parens (hcat (punctuate comma [ doubleQuotes full_name_str, ===================================== compiler/GHC/Iface/Tidy.hs ===================================== @@ -407,7 +407,6 @@ tidyProgram opts (ModGuts { mg_module = mod , mg_deps = deps , mg_foreign = foreign_stubs , mg_foreign_files = foreign_files - , mg_hpc_info = hpc_info , mg_modBreaks = modBreaks , mg_boot_exports = boot_exports }) = do @@ -480,7 +479,6 @@ tidyProgram opts (ModGuts { mg_module = mod , cg_foreign = all_foreign_stubs , cg_foreign_files = foreign_files , cg_dep_pkgs = dep_direct_pkgs deps - , cg_hpc_info = hpc_info , cg_modBreaks = modBreaks , cg_spt_entries = spt_entries } @@ -1567,4 +1565,3 @@ mustExposeTyCon no_trim_types exports tc exported_con con = any (`elemNameSet` exports) (dataConName con : dataConFieldLabels con) -} - ===================================== compiler/GHC/StgToCmm.hs ===================================== @@ -24,7 +24,6 @@ import GHC.StgToCmm.Layout import GHC.StgToCmm.Utils import GHC.StgToCmm.Closure import GHC.StgToCmm.Config -import GHC.StgToCmm.Hpc import GHC.StgToCmm.Ticky import GHC.StgToCmm.Types (ModuleLFInfos) import GHC.StgToCmm.CgUtils (CgStream) @@ -38,7 +37,6 @@ import GHC.Stg.Syntax import GHC.Types.CostCentre import GHC.Types.IPE -import GHC.Types.HpcInfo import GHC.Types.Id import GHC.Types.Id.Info import GHC.Types.RepType @@ -52,7 +50,6 @@ import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.Multiplicity -import GHC.Unit.Module import GHC.Utils.Error import GHC.Utils.Outputable @@ -77,13 +74,12 @@ codeGen :: Logger -> [TyCon] -> CollectedCCs -- (Local/global) cost-centres needing declaring/registering. -> [CgStgTopBinding] -- Bindings to convert - -> HpcInfo -> CgStream CmmGroup (ModuleLFInfos, DetUniqFM) -- See Note [Deterministic Uniques in the CG] on CgStream -- Output as a stream, so codegen can -- be interleaved with output codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons - cost_centre_info stg_binds hpc_info + cost_centre_info stg_binds = do { -- cg: run the code generator, and yield the resulting CmmGroup -- Using an IORef to store the state is a bit crude, but otherwise -- we would need to add a state monad layer which regresses @@ -118,7 +114,7 @@ codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons yield cmm return a - ; cg (mkModuleInit cost_centre_info (stgToCmmThisModule cfg) hpc_info) + ; cg (mkModuleInit cost_centre_info) ; mapM_ (cg . cgTopBinding logger tmpfs cfg) stg_binds -- Put datatype_stuff after code_stuff, because the @@ -281,13 +277,10 @@ cgTopRhs cfg rec bndr (StgRhsClosure fvs cc upd_flag args body _typ) mkModuleInit :: CollectedCCs -- cost centre info - -> Module - -> HpcInfo -> FCode () -mkModuleInit cost_centre_info this_mod hpc_info - = do { initHpc this_mod hpc_info - ; initCostCentres cost_centre_info +mkModuleInit cost_centre_info + = do { initCostCentres cost_centre_info } ===================================== compiler/GHC/StgToCmm/Config.hs ===================================== @@ -46,7 +46,6 @@ data StgToCmmConfig = StgToCmmConfig ---------------------------------- Flags -------------------------------------- , stgToCmmLoopification :: !Bool -- ^ Loopification enabled (cf @-floopification@) , stgToCmmAlignCheck :: !Bool -- ^ Insert alignment check (cf @-falignment-sanitisation@) - , stgToCmmOptHpc :: !Bool -- ^ perform code generation for code coverage , stgToCmmFastPAPCalls :: !Bool -- ^ , stgToCmmSCCProfiling :: !Bool -- ^ Check if cost-centre profiling is enabled , stgToCmmEagerBlackHole :: !Bool -- ^ ===================================== compiler/GHC/StgToCmm/Hpc.hs ===================================== @@ -6,13 +6,11 @@ -- ----------------------------------------------------------------------------- -module GHC.StgToCmm.Hpc ( initHpc, mkTickBox ) where +module GHC.StgToCmm.Hpc ( mkTickBox ) where import GHC.Prelude import GHC.Platform -import GHC.StgToCmm.Monad -import GHC.StgToCmm.Utils import GHC.Cmm.Graph import GHC.Cmm.Expr @@ -20,9 +18,7 @@ import GHC.Cmm.CLabel import GHC.Cmm.Utils import GHC.Unit.Module -import GHC.Types.HpcInfo -import Control.Monad mkTickBox :: Platform -> Module -> Int -> CmmAGraph mkTickBox platform mod n @@ -34,16 +30,3 @@ mkTickBox platform mod n tick_box = cmmIndex platform W64 (CmmLit $ CmmLabel $ mkHpcTicksLabel $ mod) n - --- | Emit top-level tables for HPC and return code to initialise -initHpc :: Module -> HpcInfo -> FCode () -initHpc _ NoHpcInfo{} - = return () -initHpc this_mod (HpcInfo tickCount _hashNo) - = do do_hpc <- stgToCmmOptHpc <$> getStgToCmmConfig - when do_hpc $ - emitDataLits (mkHpcTicksLabel this_mod) - [ CmmInt 0 W64 - | _ <- take tickCount [0 :: Int ..] - ] - ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -569,6 +569,7 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted , eaql_arg_ty = sc_arg_ty , eaql_larg = larg@(L arg_loc rn_expr) , eaql_tc_fun = tc_head + , eaql_fun_ue = head_ue , eaql_args = inst_args , eaql_encl = arg_influences_enclosing_call , eaql_res_rho = app_res_rho }) @@ -578,7 +579,8 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted ; traceTc "tcEValArgQL {" (vcat [ text "app_res_rho:" <+> ppr app_res_rho , text "exp_arg_ty:" <+> ppr exp_arg_ty - , text "args:" <+> ppr inst_args ]) + , text "args:" <+> ppr inst_args + , text "mult:" <+> ppr mult]) ; ds_flag <- getDeepSubsumptionFlag ; (wrap, arg') @@ -587,6 +589,9 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted do { -- Emit saved-up constraints, /under/ the tcSkolemise -- See (QLA4) in Note [Quick Look at value arguments] emitConstraints wanted + -- Emit saved-up usages /under/ the tcScalingUsage. + -- See (QLA5) in Note [Quick Look at value arguments] + ; tcEmitBindingUsage head_ue -- Unify with context if we have not already done so -- See (QLA4) in Note [Quick Look at value arguments] @@ -1630,6 +1635,41 @@ This turned out to be more subtle than I expected. Wrinkles: (kappa = [forall a. a->a]). Now we resume typechecking argument [], and we must take advantage of what we have now discovered about `kappa`, to typecheck [] :: [forall a. a->a] + +(QLA5) In the quicklook pass, we don't scale multiplicities. Since arguments + aren't typechecked yet, we don't know their free variable usages + anyway. But, in a nested call, the head of an application chain is fully + typechecked. + + In order for the multiplicities in the head to be properly scaled, we store + the head's usage environment in the eaql_fun_ue field. Then, when we do the + full-typechecking pass, we can emit the head's usage environment where we + would have typechecked the head in a naive algorithm. + +(QLA6) `quickLookArg` is supposed to capture the result of partially typechecking + the argument, so it can be resumed later. "Capturing" should include all + generated type-class/equality constraints and Linear-Haskell usage info. There + are two calls in `quickLookArg1` that might generate such constraints: + + - `tcInferAppHead_maybe`. This can generat Linear-Haskell usage info, via + the call to `tcEmitBindingUsage` in `check_local_id`, which is called + indirectly by `tcInferAppHead_maybe`. + + In contrast, `tcInferAppHead_maybe` does not generate any type-class or + equality constraints, because it doesn't instantiate any functions. [But + see #25493 and #25494 for why this isn't quite true today.] + + - `tcInstFun` generates lots of type-class and equality constraints, as it + instantiates the function. But it generates no usage info, because that + comes only from the call to `check_local_id`, whose usage info is captured + in the call to `tcInferAppHead_maybe` in `quickLookArg1`. + + Conclusion: in quickLookArg1: + - capture usage information (but not constraints) + for the call to `tcInferAppHead_maybe` + - capture constraints (but not usage information) + for the call to `tcInstFun` + -} quickLookArg :: QLFlag -> AppCtxt @@ -1697,7 +1737,12 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) do { ((rn_fun, fun_ctxt), rn_args) <- splitHsApps arg -- Step 1: get the type of the head of the argument - ; mb_fun_ty <- tcInferAppHead_maybe rn_fun + ; (fun_ue, mb_fun_ty) <- tcCollectingUsage $ tcInferAppHead_maybe rn_fun + -- tcCollectingUsage: the use of an Id at the head generates usage-info + -- See the call to `tcEmitBindingUsage` in `check_local_id`. So we must + -- capture and save it in the `EValArgQL`. See (QLA6) in + -- Note [Quick Look at value arguments] + ; traceTc "quickLookArg {" $ vcat [ text "arg:" <+> ppr arg , text "orig_arg_rho:" <+> ppr orig_arg_rho @@ -1714,6 +1759,9 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) ; ((inst_args, app_res_rho), wanted) <- captureConstraints $ tcInstFun do_ql True tc_head fun_sigma rn_args + -- We must capture type-class and equality constraints here, but + -- not equality constraints. See (QLA6) in Note [Quick Look at + -- value arguments] ; traceTc "quickLookArg 2" $ vcat [ text "arg:" <+> ppr arg @@ -1746,6 +1794,7 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) , eaql_arg_ty = sc_arg_ty , eaql_larg = larg , eaql_tc_fun = tc_head + , eaql_fun_ue = fun_ue , eaql_args = inst_args , eaql_wanted = wanted , eaql_encl = arg_influences_enclosing_call ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -57,7 +57,7 @@ import GHC.Tc.Zonk.TcType import GHC.Core.FamInstEnv ( FamInstEnvs ) -import GHC.Core.UsageEnv ( singleUsageUE ) +import GHC.Core.UsageEnv ( singleUsageUE, UsageEnv ) import GHC.Core.PatSyn( PatSyn, patSynName ) import GHC.Core.ConLike( ConLike(..) ) import GHC.Core.DataCon @@ -178,6 +178,7 @@ data HsExprArg (p :: TcPass) where -- See Note [HsExprArg] , eaql_larg :: LHsExpr GhcRn -- Original application, for -- location and error msgs , eaql_tc_fun :: (HsExpr GhcTc, AppCtxt) -- Typechecked head + , eaql_fun_ue :: UsageEnv -- Usage environment of the typechecked head (QLA5) , eaql_args :: [HsExprArg 'TcpInst] -- Args: instantiated, not typechecked , eaql_wanted :: WantedConstraints , eaql_encl :: Bool -- True <=> we have already qlUnified ===================================== compiler/GHC/Tc/Utils/Monad.hs ===================================== @@ -1412,7 +1412,7 @@ tcCollectingUsage thing_inside tcScalingUsage :: Mult -> TcM a -> TcM a tcScalingUsage mult thing_inside = do { (usage, result) <- tcCollectingUsage thing_inside - ; traceTc "tcScalingUsage" (ppr mult) + ; traceTc "tcScalingUsage" $ vcat [ppr mult, ppr usage] ; tcEmitBindingUsage $ scaleUE mult usage ; return result } ===================================== compiler/GHC/Unit/Module/ModGuts.hs ===================================== @@ -141,7 +141,6 @@ data CgGuts cg_foreign_files :: ![(ForeignSrcLang, FilePath)], cg_dep_pkgs :: !(Set UnitId), -- ^ Dependent packages, used to -- generate #includes for C code gen - cg_hpc_info :: !HpcInfo, -- ^ Program coverage tick box information cg_modBreaks :: !(Maybe ModBreaks), -- ^ Module breakpoints cg_spt_entries :: [SptEntry] -- ^ Static pointer table entries for static forms defined in ===================================== testsuite/tests/bytecode/T25510/Makefile ===================================== @@ -0,0 +1,7 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T25510c: + '$(TEST_HC)' $(ghcThWayFlags) -fhpc -fbyte-code-and-object-code -c T25510A.hs + '$(TEST_HC)' $(ghcThWayFlags) -fhpc -fprefer-byte-code -c T25510B.hs ===================================== testsuite/tests/bytecode/T25510/T25510A.hs ===================================== @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskellQuotes #-} + +module T25510A where + +import Language.Haskell.TH + +a :: Q Exp +a = [| 114514 |] ===================================== testsuite/tests/bytecode/T25510/T25510B.hs ===================================== @@ -0,0 +1,7 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T25510B where + +import T25510A + +b = $(a) ===================================== testsuite/tests/bytecode/T25510/all.T ===================================== @@ -0,0 +1,10 @@ +test('T25510', [ + req_th, + js_skip +], multimod_compile, ['T25510B', '-fhpc -fbyte-code-and-object-code -fprefer-byte-code -v0']) + +test('T25510c', [ + extra_files(['T25510A.hs', 'T25510B.hs']), + req_th, + js_skip +], makefile_test, ['T25510c ghcThWayFlags=' + config.ghc_th_way_flags]) ===================================== testsuite/tests/linear/should_fail/LinearConfusedDollar.stderr ===================================== @@ -1,3 +1,7 @@ +LinearConfusedDollar.hs:12:3: error: [GHC-18872] + • Couldn't match type ‘Many’ with ‘One’ + arising from multiplicity of ‘x’ + • In an equation for ‘g’: g x = f $ x LinearConfusedDollar.hs:12:7: error: [GHC-83865] • Couldn't match type ‘One’ with ‘Many’ @@ -6,3 +10,4 @@ LinearConfusedDollar.hs:12:7: error: [GHC-83865] • In the first argument of ‘($)’, namely ‘f’ In the expression: f $ x In an equation for ‘g’: g x = f $ x + ===================================== testsuite/tests/linear/should_fail/T25185.hs ===================================== @@ -0,0 +1,10 @@ +{-# LANGUAGE LinearTypes #-} +{-# LANGUAGE ImpredicativeTypes #-} + +module T25185 where + +f :: Int -> Int +f x = x + +g :: Int %1 -> Int +g y = f y ===================================== testsuite/tests/linear/should_fail/T25185.stderr ===================================== @@ -0,0 +1,5 @@ +T25185.hs:10:3: error: [GHC-18872] + • Couldn't match type ‘Many’ with ‘One’ + arising from multiplicity of ‘y’ + • In an equation for ‘g’: g y = f y + ===================================== testsuite/tests/linear/should_fail/all.T ===================================== @@ -53,3 +53,4 @@ test('LinearLet9', normal, compile_fail, ['']) test('LinearLet10', normal, compile_fail, ['']) test('T25081', normal, compile_fail, ['']) test('T24961', normal, compile_fail, ['']) +test('T25185', normal, compile_fail, ['']) ===================================== testsuite/tests/simd/should_run/T25486.hs ===================================== @@ -0,0 +1,48 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} + +module Main where + +import GHC.Exts +import GHC.IO +import Data.Array.Base +import Data.Array.IO.Internals +import Control.Monad +import Foreign.Marshal.Array + +writeFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatX4OffAddr# addr i v s, () #) + +writeAsFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeAsFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatOffAddrAsFloatX4# addr i v s, () #) + +writeFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatX4Array# mba i# v s, () #) + +writeAsFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeAsFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatArrayAsFloatX4# mba i# v s, () #) + +main :: IO () +main = do + let v = packFloatX4# (# 0.1#, 1.1#, 2.2#, 3.3# #) + + xs <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print xs + + ys <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeAsFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print ys + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeFloatX4 ma 1 v + print =<< getElems ma + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeAsFloatX4 ma 1 v + print =<< getElems ma ===================================== testsuite/tests/simd/should_run/T25486.stdout ===================================== @@ -0,0 +1,4 @@ +[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,0.1,1.1,2.2,3.3,12.0,13.0,14.0,15.0] +[0.0,1.0,0.1,1.1,2.2,3.3,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0] +[0.0,1.0,2.0,3.0,0.1,1.1,2.2,3.3,8.0,9.0] +[0.0,0.1,1.1,2.2,3.3,5.0,6.0,7.0,8.0,9.0] ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -90,3 +90,4 @@ test('T25062_V64' test('T25169', [], compile_and_run, ['']) test('T25455', [], compile_and_run, ['']) +test('T25486', [], compile_and_run, ['']) ===================================== testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs ===================================== @@ -34,7 +34,6 @@ import GHC.Stg.FVs import GHC.Stg.Syntax import GHC.StgToCmm (codeGen) import GHC.Types.CostCentre (emptyCollectedCCs) -import GHC.Types.HpcInfo (emptyHpcInfo) import GHC.Types.IPE (emptyInfoTableProvMap) import GHC.Types.Unique.DSM import GHC.Unit.Home @@ -70,14 +69,12 @@ cmmOfSummary summ = do tycons = [] ccs = emptyCollectedCCs stg' = fmap fst (depSortWithAnnotStgPgm (ms_mod summ) stg) - hpcinfo = emptyHpcInfo False tmpfs = hsc_tmpfs env - stg_to_cmm dflags mod = codeGen logger tmpfs (initStgToCmmConfig dflags mod) (groups, _infos) <- liftIO $ fmap fst $ runUDSMT (initDUniqSupply 't' 0) $ collectAll $ - stg_to_cmm dflags (ms_mod summ) infotable tycons ccs stg' hpcinfo + codeGen logger tmpfs (initStgToCmmConfig dflags (ms_mod summ)) infotable tycons ccs stg' return groups frontend :: DynFlags -> HscEnv -> ModSummary -> IO ModGuts View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/07a3e51fa2394f89266d4cf8e86762d88a0568a7...fdc0d695a80079aa239674f58e1680bfb01f5003 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/07a3e51fa2394f89266d4cf8e86762d88a0568a7...fdc0d695a80079aa239674f58e1680bfb01f5003 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 04:17:57 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 20 Nov 2024 23:17:57 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] gitlab-ci: Enable Sphinx output on CentOS 7 Message-ID: <673eb475139e7_2f9c942ab4946083@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 4c776e77 by Ben Gamari at 2024-11-20T23:17:45-05:00 gitlab-ci: Enable Sphinx output on CentOS 7 This is the last platform with Sphinx disabled. - - - - - 2 changed files: - .gitlab/gen_ci.hs - .gitlab/jobs.yaml Changes: ===================================== .gitlab/gen_ci.hs ===================================== @@ -448,7 +448,7 @@ distroVariables :: LinuxDistro -> Variables distroVariables Alpine312 = alpineVariables distroVariables Alpine318 = alpineVariables distroVariables Centos7 = mconcat [ - "HADRIAN_ARGS" =: "--docs=no-sphinx" + "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs" , "BROKEN_TESTS" =: "T22012" -- due to #23979 ] distroVariables Fedora33 = mconcat ===================================== .gitlab/jobs.yaml ===================================== @@ -1087,7 +1087,7 @@ "BROKEN_TESTS": "T22012", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "TEST_ENV": "x86_64-linux-centos7-validate", "XZ_OPT": "-9" } @@ -3087,7 +3087,7 @@ "BROKEN_TESTS": "T22012", "BUILD_FLAVOUR": "release+no_split_sections", "CONFIGURE_ARGS": "", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs", "IGNORE_PERF_FAILURES": "all", "TEST_ENV": "x86_64-linux-centos7-release+no_split_sections", "XZ_OPT": "-9" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c776e7727d48c9f05a233e6df42c86aba191e8f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c776e7727d48c9f05a233e6df42c86aba191e8f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 11:51:39 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 21 Nov 2024 06:51:39 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] Improve reachability queries on ModuleGraph Message-ID: <673f1ecb250d_6a1342f4e784974b@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 6871f252 by Rodrigo Mesquita at 2024-11-21T11:47:13+00:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, due to how the implementation of `getLinkDeps` uses the graph, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - 9 changed files: - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -8,13 +8,14 @@ module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq, - graphFromVerticesAndAdjacency, + graphFromVerticesAndAdjacency, emptyGraph, SCC(..), Node(..), G.flattenSCC, G.flattenSCCs, stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -43,7 +44,6 @@ module GHC.Data.Graph.Directed ( -- removed them since they were not used anywhere in GHC. ------------------------------------------------------------------------------ - import GHC.Prelude import GHC.Utils.Misc ( sortWith, count ) @@ -60,13 +60,13 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph ( Vertex, Bounds, SCC(..) ) -- Used in the underlying representation -import Data.Tree import GHC.Types.Unique import GHC.Types.Unique.FM -import qualified Data.IntMap as IM -import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S + +-- The graph internals are defined in the .Internal module so they can be +-- imported by GHC.Data.Graph.Directed.Reachability while still allowing this +-- module to export it abstractly. +import GHC.Data.Graph.Directed.Internal {- ************************************************************************ @@ -86,14 +86,6 @@ Note [Nodes, keys, vertices] arranged densely in 0.n -} -data Graph node = Graph { - gr_int_graph :: IntGraph, - gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex - } - -data Edge node = Edge node node - {-| Representation for nodes of the Graph. * The @payload@ is user data, just carried around in this module @@ -357,51 +349,22 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] - outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] reachablesG graph froms = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node -verticesG :: Graph node -> [node] -verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) - -edgesG :: Graph node -> [Edge node] -edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) - where v2n = gr_vertex_to_node graph - transposeG :: Graph node -> Graph node transposeG graph = Graph (G.transposeG (gr_int_graph graph)) (gr_vertex_to_node graph) @@ -410,112 +373,10 @@ transposeG graph = Graph (G.transposeG (gr_int_graph graph)) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -{- -************************************************************************ -* * -* Showing Graphs -* * -************************************************************************ --} - -instance Outputable node => Outputable (Graph node) where - ppr graph = vcat [ - hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), - hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) - ] - -instance Outputable node => Outputable (Edge node) where - ppr (Edge from to) = ppr from <+> text "->" <+> ppr to - graphEmpty :: G.Graph -> Bool graphEmpty g = lo > hi where (lo, hi) = bounds g -{- -************************************************************************ -* * -* IntGraphs -* * -************************************************************************ --} - -type IntGraph = G.Graph - -{- ------------------------------------------------------------- --- Depth first search numbering ------------------------------------------------------------- --} - --- Data.Tree has flatten for Tree, but nothing for Forest -preorderF :: Forest a -> [a] -preorderF ts = concatMap flatten ts - -{- ------------------------------------------------------------- --- Finding reachable vertices ------------------------------------------------------------- --} - --- This generalizes reachable which was found in Data.Graph -reachable :: IntGraph -> [Vertex] -> [Vertex] -reachable g vs = preorderF (G.dfs g vs) - -reachableGraph :: IntGraph -> IM.IntMap IS.IntSet -reachableGraph g = res - where - do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) - res = IM.fromList [(v, do_one v) | v <- G.vertices g] - -scc :: IntGraph -> [SCC Vertex] -scc graph = map decode forest - where - forest = {-# SCC "Digraph.scc" #-} G.scc graph - - decode (Node v []) | mentions_itself v = CyclicSCC [v] - | otherwise = AcyclicSCC v - decode other = CyclicSCC (dec other []) - where dec (Node v ts) vs = v : foldr dec vs ts - mentions_itself v = v `elem` (graph ! v) - -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) {- ************************************************************************ @@ -623,3 +484,4 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + ===================================== compiler/GHC/Data/Graph/Directed/Internal.hs ===================================== @@ -0,0 +1,79 @@ +module GHC.Data.Graph.Directed.Internal where + +import GHC.Prelude +import GHC.Utils.Outputable + +import Data.Array +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) -- Used in the underlying representation +import Data.Tree + +data Graph node = Graph { + gr_int_graph :: IntGraph, + gr_vertex_to_node :: Vertex -> node, + gr_node_to_vertex :: node -> Maybe Vertex +} + +data Edge node = Edge node node + +------------------------------------------------------------ +-- Nodes and Edges +------------------------------------------------------------ + +verticesG :: Graph node -> [node] +verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) + +edgesG :: Graph node -> [Edge node] +edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) + where v2n = gr_vertex_to_node graph + +------------------------------------------------------------ +-- Showing Graphs +------------------------------------------------------------ + +instance Outputable node => Outputable (Graph node) where + ppr graph = vcat [ + hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), + hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) + ] + +instance Outputable node => Outputable (Edge node) where + ppr (Edge from to) = ppr from <+> text "->" <+> ppr to + +{- +************************************************************************ +* * +* IntGraphs +* * +************************************************************************ +-} + +type IntGraph = G.Graph + +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + +scc :: IntGraph -> [SCC Vertex] +scc graph = map decode forest + where + forest = {-# SCC "Digraph.scc" #-} G.scc graph + + decode (Node v []) | mentions_itself v = CyclicSCC [v] + | otherwise = AcyclicSCC v + decode other = CyclicSCC (dec other []) + where dec (Node v ts) vs = v : foldr dec vs ts + mentions_itself v = v `elem` (graph ! v) + ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -0,0 +1,168 @@ +-- | An abstract interface for a fast reachability data structure constructed +-- from a 'GHC.Data.Graph.Directed' graph. +module GHC.Data.Graph.Directed.Reachability + ( ReachabilityIndex + + -- * Constructing a reachability index + , graphReachability, cyclicGraphReachability + + -- * Reachability queries + , allReachable, allReachableMany + , isReachable, isReachableMany + ) + where + +import GHC.Prelude +import GHC.Data.Maybe + +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) + +import Data.Array ((!)) +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS + +import GHC.Data.Graph.Directed.Internal + +-------------------------------------------------------------------------------- +-- * Reachability index +-------------------------------------------------------------------------------- + +-- | The abstract data structure for fast reachability queries +data ReachabilityIndex node = ReachabilityIndex { + index :: IM.IntMap IS.IntSet, + from_vertex :: Vertex -> node, + to_vertex :: node -> Maybe Vertex +} + +-------------------------------------------------------------------------------- +-- * Construction +-------------------------------------------------------------------------------- + +-- | Construct a 'ReachabilityIndex' from an acyclic 'Graph'. +-- If the graph can have cycles, use 'cyclicGraphReachability' +graphReachability :: Graph node -> ReachabilityIndex node +graphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraph, from_vertex = from, to_vertex = to} + where + reachableGraph :: IM.IntMap IS.IntSet + reachableGraph = IM.fromList [(v, do_one v) | v <- G.vertices g] + + do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) + +-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. +cyclicGraphReachability :: Graph node -> ReachabilityIndex node +cyclicGraphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} + where + reachableGraphCyclic :: IM.IntMap IS.IntSet + reachableGraphCyclic = foldl' add_one_comp mempty comps + + neighboursOf v = g!v + + comps = scc g + + -- To avoid divergence on cyclic input, we build the result + -- strongly connected component by component, in topological + -- order. For each SCC, we know that: + -- + -- * All vertices in the component can reach all other vertices + -- in the component ("local" reachables) + -- + -- * Other reachable vertices ("remote" reachables) must come + -- from earlier components, either via direct neighbourhood, or + -- transitively from earlier reachability map + -- + -- This allows us to build the extension of the reachability map + -- directly, without any self-reference, thereby avoiding a loop. + add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet + add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier + where + earlier_neighbours = neighboursOf v + earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours + all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) + add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier + where + all_locals = IS.fromList vs + local v = IS.delete v all_locals + -- Arguably, for a cyclic SCC we should include each + -- vertex in its own reachable set. However, this could + -- lead to a lot of extra pain in client code to avoid + -- looping when traversing the reachability map. + all_neighbours = IS.fromList (concatMap neighboursOf vs) + earlier_neighbours = all_neighbours IS.\\ all_locals + earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) + all_remotes = IS.unions (earlier_neighbours : earlier_further) + +-------------------------------------------------------------------------------- +-- * Reachability queries +-------------------------------------------------------------------------------- + +-- | 'allReachable' returns the nodes reachable from the given @root@ node. +-- +-- Properties: +-- * The list of nodes /does not/ include the @root@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(1)$ complexity. +-- +-- If you need a topologically sorted list, consider using the functions exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead. +allReachable :: ReachabilityIndex node -> node {-^ The @root@ node -} -> [node] {-^ All nodes reachable from @root@ -} +allReachable (ReachabilityIndex index from to) root = map from result + where root_i = expectJust "reachableFrom" (to root) + hits = {-# SCC "allReachable" #-} IM.lookup root_i index + result = IS.toList $! expectJust "reachableFrom" hits + +-- | 'allReachableMany' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes /does not/ include the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableMany :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = {-# SCC "allReachableMany" #-} + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i + +-- | Fast reachability query. +-- +-- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ +-- asks whether @b@ can be reached through @g@ starting from @a at . +-- +-- Properties: +-- * No self loops, i.e. @isReachable _ a a == False@ +-- * This function has $O(1)$ complexity. +isReachable :: ReachabilityIndex node {-^ @g@ -} + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +isReachable (ReachabilityIndex index _ to) a b = + IS.member b_i $ + expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + +-- | Fast reachability query with many roots. +-- +-- On graph @g@ with many nodes @roots@ and node @b@, @isReachableMany g as b@ +-- asks whether @b@ can be reached through @g@ from any of the @roots at . +-- +-- Properties: +-- * No self loops, i.e. @isReachableMany _ [a] a == False@ +-- * This function is $O(n)$ in the number of roots +isReachableMany :: ReachabilityIndex node -- ^ @g@ + -> [node] -- ^ @roots@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from any of the @roots@ +isReachableMany (ReachabilityIndex index _ to) roots b = + IS.member b_i $ + IS.unions $ + map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i + where roots_i = [ v | Just v <- map to roots ] + b_i = expectJust "reachablesQuery:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,7 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import GHC.Data.Graph.Directed.Reachability -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +612,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1499,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:allReachable (graphReachability graph) root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1821,20 +1823,15 @@ checkHomeUnitsClosed ue | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)] where home_id_set = unitEnv_keys $ ue_home_unit_graph ue - bad_unit_ids = upwards_closure Set.\\ home_id_set + bad_unit_ids = upwards_closure Set.\\ home_id_set {- Remove all home units reached, keep only bad nodes -} rootLoc = mkGeneralSrcSpan (fsLit "") - graph :: Graph (Node UnitId UnitId) - graph = graphFromEdgedVerticesUniq graphNodes + downwards_closure :: Graph (Node UnitId UnitId) + downwards_closure = graphFromEdgedVerticesUniq graphNodes - -- downwards closure of graph - downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + inverse_closure = graphReachability $ transposeG downwards_closure - inverse_closure = transposeG downwards_closure - - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ allReachableMany inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -49,6 +50,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Data.Maybe import GHC.Data.Graph.Directed +import GHC.Data.Graph.Directed.Reachability import GHC.Driver.Backend import GHC.Driver.DynFlags @@ -72,6 +74,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +156,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,12 +176,11 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = mkTransDeps new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +201,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +214,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +391,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +409,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + ===================================== compiler/ghc.cabal.in ===================================== @@ -444,6 +444,8 @@ Library GHC.Data.Graph.Color GHC.Data.Graph.Collapse GHC.Data.Graph.Directed + GHC.Data.Graph.Directed.Internal + GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.Inductive.Graph GHC.Data.Graph.Inductive.PatriciaTree GHC.Data.Graph.Ops ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -66,6 +66,7 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -67,6 +67,8 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal +GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6871f252565284a278003d7958b0b40eae0e89ca -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6871f252565284a278003d7958b0b40eae0e89ca You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 11:54:08 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 21 Nov 2024 06:54:08 -0500 Subject: [Git][ghc/ghc][wip/romes/graph-compact-easy] Improve reachability queries on ModuleGraph Message-ID: <673f1f60edc51_6a1342cbb18521a2@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/graph-compact-easy at Glasgow Haskell Compiler / GHC Commits: 83e84702 by Rodrigo Mesquita at 2024-11-21T11:53:45+00:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - 9 changed files: - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -8,13 +8,14 @@ module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq, - graphFromVerticesAndAdjacency, + graphFromVerticesAndAdjacency, emptyGraph, SCC(..), Node(..), G.flattenSCC, G.flattenSCCs, stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -43,7 +44,6 @@ module GHC.Data.Graph.Directed ( -- removed them since they were not used anywhere in GHC. ------------------------------------------------------------------------------ - import GHC.Prelude import GHC.Utils.Misc ( sortWith, count ) @@ -60,13 +60,13 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph ( Vertex, Bounds, SCC(..) ) -- Used in the underlying representation -import Data.Tree import GHC.Types.Unique import GHC.Types.Unique.FM -import qualified Data.IntMap as IM -import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S + +-- The graph internals are defined in the .Internal module so they can be +-- imported by GHC.Data.Graph.Directed.Reachability while still allowing this +-- module to export it abstractly. +import GHC.Data.Graph.Directed.Internal {- ************************************************************************ @@ -86,14 +86,6 @@ Note [Nodes, keys, vertices] arranged densely in 0.n -} -data Graph node = Graph { - gr_int_graph :: IntGraph, - gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex - } - -data Edge node = Edge node node - {-| Representation for nodes of the Graph. * The @payload@ is user data, just carried around in this module @@ -357,51 +349,22 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] - outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] reachablesG graph froms = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node -verticesG :: Graph node -> [node] -verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) - -edgesG :: Graph node -> [Edge node] -edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) - where v2n = gr_vertex_to_node graph - transposeG :: Graph node -> Graph node transposeG graph = Graph (G.transposeG (gr_int_graph graph)) (gr_vertex_to_node graph) @@ -410,112 +373,10 @@ transposeG graph = Graph (G.transposeG (gr_int_graph graph)) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -{- -************************************************************************ -* * -* Showing Graphs -* * -************************************************************************ --} - -instance Outputable node => Outputable (Graph node) where - ppr graph = vcat [ - hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), - hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) - ] - -instance Outputable node => Outputable (Edge node) where - ppr (Edge from to) = ppr from <+> text "->" <+> ppr to - graphEmpty :: G.Graph -> Bool graphEmpty g = lo > hi where (lo, hi) = bounds g -{- -************************************************************************ -* * -* IntGraphs -* * -************************************************************************ --} - -type IntGraph = G.Graph - -{- ------------------------------------------------------------- --- Depth first search numbering ------------------------------------------------------------- --} - --- Data.Tree has flatten for Tree, but nothing for Forest -preorderF :: Forest a -> [a] -preorderF ts = concatMap flatten ts - -{- ------------------------------------------------------------- --- Finding reachable vertices ------------------------------------------------------------- --} - --- This generalizes reachable which was found in Data.Graph -reachable :: IntGraph -> [Vertex] -> [Vertex] -reachable g vs = preorderF (G.dfs g vs) - -reachableGraph :: IntGraph -> IM.IntMap IS.IntSet -reachableGraph g = res - where - do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) - res = IM.fromList [(v, do_one v) | v <- G.vertices g] - -scc :: IntGraph -> [SCC Vertex] -scc graph = map decode forest - where - forest = {-# SCC "Digraph.scc" #-} G.scc graph - - decode (Node v []) | mentions_itself v = CyclicSCC [v] - | otherwise = AcyclicSCC v - decode other = CyclicSCC (dec other []) - where dec (Node v ts) vs = v : foldr dec vs ts - mentions_itself v = v `elem` (graph ! v) - -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) {- ************************************************************************ @@ -623,3 +484,4 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + ===================================== compiler/GHC/Data/Graph/Directed/Internal.hs ===================================== @@ -0,0 +1,79 @@ +module GHC.Data.Graph.Directed.Internal where + +import GHC.Prelude +import GHC.Utils.Outputable + +import Data.Array +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) -- Used in the underlying representation +import Data.Tree + +data Graph node = Graph { + gr_int_graph :: IntGraph, + gr_vertex_to_node :: Vertex -> node, + gr_node_to_vertex :: node -> Maybe Vertex +} + +data Edge node = Edge node node + +------------------------------------------------------------ +-- Nodes and Edges +------------------------------------------------------------ + +verticesG :: Graph node -> [node] +verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) + +edgesG :: Graph node -> [Edge node] +edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) + where v2n = gr_vertex_to_node graph + +------------------------------------------------------------ +-- Showing Graphs +------------------------------------------------------------ + +instance Outputable node => Outputable (Graph node) where + ppr graph = vcat [ + hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), + hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) + ] + +instance Outputable node => Outputable (Edge node) where + ppr (Edge from to) = ppr from <+> text "->" <+> ppr to + +{- +************************************************************************ +* * +* IntGraphs +* * +************************************************************************ +-} + +type IntGraph = G.Graph + +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + +scc :: IntGraph -> [SCC Vertex] +scc graph = map decode forest + where + forest = {-# SCC "Digraph.scc" #-} G.scc graph + + decode (Node v []) | mentions_itself v = CyclicSCC [v] + | otherwise = AcyclicSCC v + decode other = CyclicSCC (dec other []) + where dec (Node v ts) vs = v : foldr dec vs ts + mentions_itself v = v `elem` (graph ! v) + ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -0,0 +1,168 @@ +-- | An abstract interface for a fast reachability data structure constructed +-- from a 'GHC.Data.Graph.Directed' graph. +module GHC.Data.Graph.Directed.Reachability + ( ReachabilityIndex + + -- * Constructing a reachability index + , graphReachability, cyclicGraphReachability + + -- * Reachability queries + , allReachable, allReachableMany + , isReachable, isReachableMany + ) + where + +import GHC.Prelude +import GHC.Data.Maybe + +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) + +import Data.Array ((!)) +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS + +import GHC.Data.Graph.Directed.Internal + +-------------------------------------------------------------------------------- +-- * Reachability index +-------------------------------------------------------------------------------- + +-- | The abstract data structure for fast reachability queries +data ReachabilityIndex node = ReachabilityIndex { + index :: IM.IntMap IS.IntSet, + from_vertex :: Vertex -> node, + to_vertex :: node -> Maybe Vertex +} + +-------------------------------------------------------------------------------- +-- * Construction +-------------------------------------------------------------------------------- + +-- | Construct a 'ReachabilityIndex' from an acyclic 'Graph'. +-- If the graph can have cycles, use 'cyclicGraphReachability' +graphReachability :: Graph node -> ReachabilityIndex node +graphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraph, from_vertex = from, to_vertex = to} + where + reachableGraph :: IM.IntMap IS.IntSet + reachableGraph = IM.fromList [(v, do_one v) | v <- G.vertices g] + + do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) + +-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. +cyclicGraphReachability :: Graph node -> ReachabilityIndex node +cyclicGraphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} + where + reachableGraphCyclic :: IM.IntMap IS.IntSet + reachableGraphCyclic = foldl' add_one_comp mempty comps + + neighboursOf v = g!v + + comps = scc g + + -- To avoid divergence on cyclic input, we build the result + -- strongly connected component by component, in topological + -- order. For each SCC, we know that: + -- + -- * All vertices in the component can reach all other vertices + -- in the component ("local" reachables) + -- + -- * Other reachable vertices ("remote" reachables) must come + -- from earlier components, either via direct neighbourhood, or + -- transitively from earlier reachability map + -- + -- This allows us to build the extension of the reachability map + -- directly, without any self-reference, thereby avoiding a loop. + add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet + add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier + where + earlier_neighbours = neighboursOf v + earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours + all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) + add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier + where + all_locals = IS.fromList vs + local v = IS.delete v all_locals + -- Arguably, for a cyclic SCC we should include each + -- vertex in its own reachable set. However, this could + -- lead to a lot of extra pain in client code to avoid + -- looping when traversing the reachability map. + all_neighbours = IS.fromList (concatMap neighboursOf vs) + earlier_neighbours = all_neighbours IS.\\ all_locals + earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) + all_remotes = IS.unions (earlier_neighbours : earlier_further) + +-------------------------------------------------------------------------------- +-- * Reachability queries +-------------------------------------------------------------------------------- + +-- | 'allReachable' returns the nodes reachable from the given @root@ node. +-- +-- Properties: +-- * The list of nodes /does not/ include the @root@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(1)$ complexity. +-- +-- If you need a topologically sorted list, consider using the functions exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead. +allReachable :: ReachabilityIndex node -> node {-^ The @root@ node -} -> [node] {-^ All nodes reachable from @root@ -} +allReachable (ReachabilityIndex index from to) root = map from result + where root_i = expectJust "reachableFrom" (to root) + hits = {-# SCC "allReachable" #-} IM.lookup root_i index + result = IS.toList $! expectJust "reachableFrom" hits + +-- | 'allReachableMany' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes /does not/ include the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableMany :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = {-# SCC "allReachableMany" #-} + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i + +-- | Fast reachability query. +-- +-- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ +-- asks whether @b@ can be reached through @g@ starting from @a at . +-- +-- Properties: +-- * No self loops, i.e. @isReachable _ a a == False@ +-- * This function has $O(1)$ complexity. +isReachable :: ReachabilityIndex node {-^ @g@ -} + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +isReachable (ReachabilityIndex index _ to) a b = + IS.member b_i $ + expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + +-- | Fast reachability query with many roots. +-- +-- On graph @g@ with many nodes @roots@ and node @b@, @isReachableMany g as b@ +-- asks whether @b@ can be reached through @g@ from any of the @roots at . +-- +-- Properties: +-- * No self loops, i.e. @isReachableMany _ [a] a == False@ +-- * This function is $O(n)$ in the number of roots +isReachableMany :: ReachabilityIndex node -- ^ @g@ + -> [node] -- ^ @roots@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from any of the @roots@ +isReachableMany (ReachabilityIndex index _ to) roots b = + IS.member b_i $ + IS.unions $ + map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i + where roots_i = [ v | Just v <- map to roots ] + b_i = expectJust "reachablesQuery:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,7 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import GHC.Data.Graph.Directed.Reachability -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +612,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1499,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:allReachable (graphReachability graph) root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1821,20 +1823,15 @@ checkHomeUnitsClosed ue | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)] where home_id_set = unitEnv_keys $ ue_home_unit_graph ue - bad_unit_ids = upwards_closure Set.\\ home_id_set + bad_unit_ids = upwards_closure Set.\\ home_id_set {- Remove all home units reached, keep only bad nodes -} rootLoc = mkGeneralSrcSpan (fsLit "") - graph :: Graph (Node UnitId UnitId) - graph = graphFromEdgedVerticesUniq graphNodes + downwards_closure :: Graph (Node UnitId UnitId) + downwards_closure = graphFromEdgedVerticesUniq graphNodes - -- downwards closure of graph - downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + inverse_closure = graphReachability $ transposeG downwards_closure - inverse_closure = transposeG downwards_closure - - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ allReachableMany inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -49,6 +50,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Data.Maybe import GHC.Data.Graph.Directed +import GHC.Data.Graph.Directed.Reachability import GHC.Driver.Backend import GHC.Driver.DynFlags @@ -72,6 +74,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +156,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,12 +176,11 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = mkTransDeps new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +201,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +214,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +391,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +409,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + ===================================== compiler/ghc.cabal.in ===================================== @@ -444,6 +444,8 @@ Library GHC.Data.Graph.Color GHC.Data.Graph.Collapse GHC.Data.Graph.Directed + GHC.Data.Graph.Directed.Internal + GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.Inductive.Graph GHC.Data.Graph.Inductive.PatriciaTree GHC.Data.Graph.Ops ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -66,6 +66,7 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -67,6 +67,8 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal +GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/83e84702e2344285f17c5353d236290d243dacab -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/83e84702e2344285f17c5353d236290d243dacab You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 12:47:36 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 21 Nov 2024 07:47:36 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: x86 NCG: fix regUsageOfInstr for VMOVU & friends Message-ID: <673f2be8231d6_30ce3b1de86846373@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 9c7c03c8 by Brandon Chinn at 2024-11-21T07:47:21-05:00 Fix CRLF in multiline strings (#25375) - - - - - 5cffc92d by Matthew Pickering at 2024-11-21T07:47:22-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 24 changed files: - .gitattributes - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Parser/String.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/exts/multiline_strings.rst - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T - + testsuite/tests/parser/should_run/T25375.hs - + testsuite/tests/parser/should_run/T25375.stdout - testsuite/tests/parser/should_run/all.T - + testsuite/tests/simd/should_run/T25486.hs - + testsuite/tests/simd/should_run/T25486.stdout - testsuite/tests/simd/should_run/all.T Changes: ===================================== .gitattributes ===================================== @@ -2,3 +2,4 @@ # don't convert anything on checkout * text=auto eol=lf mk/win32-tarballs.md5sum text=auto eol=LF +testsuite/tests/parser/should_run/T25375.hs text=auto eol=crlf ===================================== compiler/GHC/CmmToAsm/Format.hs ===================================== @@ -273,6 +273,9 @@ instance Show RegWithFormat where instance Uniquable RegWithFormat where getUnique = getUnique . regWithFormat_reg +instance Outputable VirtualRegWithFormat where + ppr (VirtualRegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt + instance Outputable RegWithFormat where ppr (RegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt ===================================== compiler/GHC/CmmToAsm/X86/Instr.hs ===================================== @@ -373,8 +373,9 @@ regUsageOfInstr platform instr | otherwise -> usageRW fmt src dst MOVD fmt src dst -> - -- NB: MOVD/MOVQ always zero any remaining upper part of destination - mkRU (use_R fmt src []) (use_R (movdOutFormat fmt) dst []) + -- NB: MOVD and MOVQ always zero any remaining upper part of destination, + -- so the destination is "written" not "modified". + usageRW' fmt (movdOutFormat fmt) src dst CMOV _ fmt src dst -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MOVZxL fmt src dst -> usageRW fmt src dst MOVSxL fmt src dst -> usageRW fmt src dst @@ -475,7 +476,7 @@ regUsageOfInstr platform instr -- vector instructions VBROADCAST fmt src dst -> mkRU (use_R fmt src []) [mk fmt dst] - VEXTRACT fmt _off src dst -> mkRU [mk fmt src] (use_R fmt dst []) + VEXTRACT fmt _off src dst -> usageRW fmt (OpReg src) dst INSERTPS fmt (ImmInt off) src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst | not doesNotReadDst]) [mk fmt dst] where @@ -488,12 +489,12 @@ regUsageOfInstr platform instr INSERTPS fmt _off src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst]) [mk fmt dst] - VMOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVL fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVH fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - VMOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) + VMOVU fmt src dst -> usageRW fmt src dst + MOVU fmt src dst -> usageRW fmt src dst + MOVL fmt src dst -> usageRM fmt src dst + MOVH fmt src dst -> usageRM fmt src dst + MOVDQU fmt src dst -> usageRW fmt src dst + VMOVDQU fmt src dst -> usageRW fmt src dst PXOR fmt (OpReg src) dst | src == dst @@ -531,11 +532,12 @@ regUsageOfInstr platform instr -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MINMAX _ _ fmt src dst - -> mkRU (use_R fmt src $ use_R fmt dst []) (use_R fmt dst []) + -> usageRM fmt src dst VMINMAX _ _ fmt src1 src2 dst -> mkRU (use_R fmt src1 [mk fmt src2]) [mk fmt dst] _other -> panic "regUsage: unrecognised instr" where + -- # Definitions -- -- Written: If the operand is a register, it's written. If it's an @@ -551,6 +553,11 @@ regUsageOfInstr platform instr usageRW fmt op (OpAddr ea) = mkRUR (use_R fmt op $! use_EA ea []) usageRW _ _ _ = panic "X86.RegInfo.usageRW: no match" + usageRW' :: HasDebugCallStack => Format -> Format -> Operand -> Operand -> RegUsage + usageRW' fmt1 fmt2 op (OpReg reg) = mkRU (use_R fmt1 op []) [mk fmt2 reg] + usageRW' fmt1 _ op (OpAddr ea) = mkRUR (use_R fmt1 op $! use_EA ea []) + usageRW' _ _ _ _ = panic "X86.RegInfo.usageRW: no match" + -- 2 operand form; first operand Read; second Modified usageRM :: HasDebugCallStack => Format -> Operand -> Operand -> RegUsage usageRM fmt op (OpReg reg) = mkRU (use_R fmt op [mk fmt reg]) [mk fmt reg] ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Parser/String.hs ===================================== @@ -261,6 +261,7 @@ lexMultilineString = lexStringWith processChars processChars processChars :: HasChar c => [c] -> Either (c, LexErr) [c] processChars = collapseGaps -- Step 1 + >>> normalizeEOL >>> expandLeadingTabs -- Step 3 >>> rmCommonWhitespacePrefix -- Step 4 >>> collapseOnlyWsLines -- Step 5 @@ -268,6 +269,19 @@ lexMultilineString = lexStringWith processChars processChars >>> rmLastNewline -- Step 7b >>> resolveEscapes -- Step 8 + -- Normalize line endings to LF. The spec dictates that lines should be + -- split on newline characters and rejoined with ``\n``. But because we + -- aren't actually splitting/rejoining, we'll manually normalize here + normalizeEOL :: HasChar c => [c] -> [c] + normalizeEOL = + let go = \case + Char '\r' : c@(Char '\n') : cs -> c : go cs + c@(Char '\r') : cs -> setChar '\n' c : go cs + c@(Char '\f') : cs -> setChar '\n' c : go cs + c : cs -> c : go cs + [] -> [] + in go + -- expands all tabs, since the lexer will verify that tabs can only appear -- as leading indentation expandLeadingTabs :: HasChar c => [c] -> [c] ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,17 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl link against a different base package by default. +dnl If the package is unavailable it will simply not be linked against. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/exts/multiline_strings.rst ===================================== @@ -14,7 +14,9 @@ With this extension, GHC now recognizes multiline string literals with ``"""`` d Normal string literals are lexed, then string gaps are collapsed, then escape characters are resolved. Multiline string literals add the following post-processing steps between collapsing string gaps and resolving escape characters: -#. Split the string by newlines +#. Split the string by newline characters + + * Includes ``\r\n``, ``\r``, ``\n``, ``\f`` #. Replace leading tabs with spaces up to the next tab stop @@ -24,7 +26,9 @@ Normal string literals are lexed, then string gaps are collapsed, then escape ch #. Join the string back with ``\n`` delimiters -#. If the first character of the string is a newline, remove it +#. If the first character of the string is ``\n``, remove it + +#. If the last character of the string is ``\n``, remove it Examples ~~~~~~~~ ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,27 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) ===================================== testsuite/tests/parser/should_run/T25375.hs ===================================== @@ -0,0 +1,38 @@ +{-# LANGUAGE MultilineStrings #-} + +str1 = unlines + [ "aaa" + , "bbb" + , "ccc" + ] + +str2 = "aaa\n\ + \bbb\n\ + \ccc\n" + +str3 = """ + aaa + bbb + ccc + """ + +str4 = """ + + aaa + bbb + ccc + + """ + +str5 = """ + aaa + bbb + ccc\n + """ + +main = do + print str1 + print str2 + print str3 + print str4 + print str5 ===================================== testsuite/tests/parser/should_run/T25375.stdout ===================================== @@ -0,0 +1,5 @@ +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc" +"\naaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" ===================================== testsuite/tests/parser/should_run/all.T ===================================== @@ -23,3 +23,4 @@ test('RecordDotSyntax5', normal, compile_and_run, ['']) test('ListTuplePunsConstraints', extra_files(['ListTuplePunsConstraints.hs']), ghci_script, ['ListTuplePunsConstraints.script']) test('MultilineStrings', normal, compile_and_run, ['']) test('MultilineStringsOverloaded', normal, compile_and_run, ['']) +test('T25375', normal, compile_and_run, ['']) ===================================== testsuite/tests/simd/should_run/T25486.hs ===================================== @@ -0,0 +1,48 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} + +module Main where + +import GHC.Exts +import GHC.IO +import Data.Array.Base +import Data.Array.IO.Internals +import Control.Monad +import Foreign.Marshal.Array + +writeFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatX4OffAddr# addr i v s, () #) + +writeAsFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeAsFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatOffAddrAsFloatX4# addr i v s, () #) + +writeFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatX4Array# mba i# v s, () #) + +writeAsFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeAsFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatArrayAsFloatX4# mba i# v s, () #) + +main :: IO () +main = do + let v = packFloatX4# (# 0.1#, 1.1#, 2.2#, 3.3# #) + + xs <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print xs + + ys <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeAsFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print ys + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeFloatX4 ma 1 v + print =<< getElems ma + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeAsFloatX4 ma 1 v + print =<< getElems ma ===================================== testsuite/tests/simd/should_run/T25486.stdout ===================================== @@ -0,0 +1,4 @@ +[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,0.1,1.1,2.2,3.3,12.0,13.0,14.0,15.0] +[0.0,1.0,0.1,1.1,2.2,3.3,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0] +[0.0,1.0,2.0,3.0,0.1,1.1,2.2,3.3,8.0,9.0] +[0.0,0.1,1.1,2.2,3.3,5.0,6.0,7.0,8.0,9.0] ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -90,3 +90,4 @@ test('T25062_V64' test('T25169', [], compile_and_run, ['']) test('T25455', [], compile_and_run, ['']) +test('T25486', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/46c53f87d75130ce4a87d54029ec264bba378ac5...5cffc92d345cab38274c7a6a45baa72eab62bd94 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/46c53f87d75130ce4a87d54029ec264bba378ac5...5cffc92d345cab38274c7a6a45baa72eab62bd94 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 13:59:47 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Thu, 21 Nov 2024 08:59:47 -0500 Subject: [Git][ghc/ghc][wip/T24359] More Message-ID: <673f3cd3b319c_25f6c9c8104870a3@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 44529c5f by Simon Peyton Jones at 2024-11-21T13:59:34+00:00 More - - - - - 5 changed files: - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/HsToCore/Errors/Ppr.hs - compiler/GHC/Tc/Gen/Bind.hs - compiler/GHC/Tc/Gen/Sig.hs - testsuite/tests/typecheck/should_compile/tc212.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -822,7 +822,7 @@ dsSpec mb_poly_rhs (SpecPrag poly_id spec_co spec_inl) = dsHsWrapper spec_app $ \core_app -> finishSpecPrag mb_poly_rhs spec_bndrs (core_app (Var poly_id)) - spec_bndrs (\_ poly_rhs -> core_app poly_rhs) + spec_bndrs (\poly_rhs _ -> core_app poly_rhs) spec_inl dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id @@ -845,16 +845,21 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id ; ds_call <- zapUnspecables $ -- zapUnspecables: see Note [Desugaring RULE left hand sides] dsLExpr the_call + ; tracePm "dsSpec1" (vcat + [ ppr poly_id + , text "lhs_binds" <+> ppr lhs_binds + , text "ds_lhs_binds" <+> ppr ds_lhs_binds + , text "ds_call" <+> ppr ds_call ]) + ; let simpl_opts = initSimpleOpts dflags core_call = mkLets ds_lhs_binds $ drop_cast $ simpleOptExpr simpl_opts $ ds_call - mk_spec_call poly_id poly_rhs - = mkLetNonRec (localiseId poly_id) poly_rhs $ - mkLets ds_rhs_binds $ - core_call + mk_spec_call fn_body lhs_args + = mkLets ds_rhs_binds $ + mkCoreApps fn_body lhs_args ; tracePm "dsSpec1" (vcat [ ppr poly_id $$ ppr ds_call $$ ppr core_call]) ; finishSpecPrag mb_poly_rhs @@ -876,7 +881,7 @@ failBecauseOfClassOp poly_id finishSpecPrag :: Maybe CoreExpr -- See the first param of dsSpec -> [Var] -- Binders, over LHS and RHS -> CoreExpr -- LHS pattern - -> [Var] -> (Id -> CoreExpr -> CoreExpr) -- Make spec RHS given function body + -> [Var] -> (CoreExpr -> [CoreExpr] -> CoreExpr) -- Make spec RHS given function body -> InlinePragma -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) finishSpecPrag mb_poly_rhs @@ -913,7 +918,7 @@ finishSpecPrag mb_poly_rhs spec_ty = mkLamTypes spec_bndrs (exprType rule_lhs) spec_rhs = mkLams spec_bndrs $ - mk_spec_rhs poly_id poly_rhs + mk_spec_rhs poly_rhs rule_lhs_args ; dsWarnOrphanRule rule ===================================== compiler/GHC/HsToCore/Errors/Ppr.hs ===================================== @@ -109,7 +109,7 @@ instance Diagnostic DsMessage where , text "is not bound in RULE lhs"]) 2 (vcat [ text "Orig bndrs:" <+> ppr orig_bndrs , text "Orig lhs:" <+> ppr orig_lhs - , text "optimised lhs:" <+> ppr lhs2 ]) + , text "Optimised lhs:" <+> ppr lhs2 ]) pp_bndr b | isTyVar b = text "type variable" <+> quotes (ppr b) ===================================== compiler/GHC/Tc/Gen/Bind.hs ===================================== @@ -896,9 +896,11 @@ mkExport prag_fn residual insoluble qtvs theta ; poly_id <- mkInferredPolyId residual insoluble qtvs theta poly_name mb_sig mono_ty -- NB: poly_id has a zonked type - ; poly_id <- addInlinePrags poly_id prag_sigs - ; spec_prags <- tcSpecPrags poly_id prag_sigs - -- tcPrags requires a zonked poly_id + ; poly_id <- addInlinePrags poly_id prag_sigs + ; spec_prags <- tcExtendIdEnv1 poly_name poly_id $ + tcSpecPrags poly_id prag_sigs + -- tcSpecPrags requires a zonked poly_id. It also needs poly_id to + -- be in the type env (so we can typecheck the SPECIALISE expression -- See Note [Impedance matching] -- NB: we have already done checkValidType, including an ambiguity check, @@ -1266,27 +1268,6 @@ The impedance matcher can do defaulting: in the above example, we default to Integer because of Num. See #7173. If we're dealing with a nondefaultable class, impedance matching can fail. See #23427. -Note [SPECIALISE pragmas] -~~~~~~~~~~~~~~~~~~~~~~~~~ -There is no point in a SPECIALISE pragma for a non-overloaded function: - reverse :: [a] -> [a] - {-# SPECIALISE reverse :: [Int] -> [Int] #-} - -But SPECIALISE INLINE *can* make sense for GADTS: - data Arr e where - ArrInt :: !Int -> ByteArray# -> Arr Int - ArrPair :: !Int -> Arr e1 -> Arr e2 -> Arr (e1, e2) - - (!:) :: Arr e -> Int -> e - {-# SPECIALISE INLINE (!:) :: Arr Int -> Int -> Int #-} - {-# SPECIALISE INLINE (!:) :: Arr (a, b) -> Int -> (a, b) #-} - (ArrInt _ ba) !: (I# i) = I# (indexIntArray# ba i) - (ArrPair _ a1 a2) !: i = (a1 !: i, a2 !: i) - -When (!:) is specialised it becomes non-recursive, and can usefully -be inlined. Scary! So we only warn for SPECIALISE *without* INLINE -for a non-overloaded function. - ************************************************************************ * * tcMonoBinds ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -73,7 +73,7 @@ import GHC.Types.Name.Env import GHC.Types.SrcLoc import GHC.Builtin.Names( mkUnboundName ) -import GHC.Unit.Module( getModule ) +import GHC.Unit.Module( Module, getModule ) import GHC.Utils.Misc as Utils ( singleton ) import GHC.Utils.Outputable @@ -845,6 +845,27 @@ Some wrinkles regardless of XXX. It's sort of polymorphic in XXX. This is useful: we use the same wrapper to transform each of the class ops, as well as the dict. That's what goes on in GHC.Tc.TyCl.Instance.mk_meth_spec_prags + +Note [SPECIALISE pragmas] +~~~~~~~~~~~~~~~~~~~~~~~~~ +There is no point in a SPECIALISE pragma for a non-overloaded function: + reverse :: [a] -> [a] + {-# SPECIALISE reverse :: [Int] -> [Int] #-} + +But SPECIALISE INLINE *can* make sense for GADTS: + data Arr e where + ArrInt :: !Int -> ByteArray# -> Arr Int + ArrPair :: !Int -> Arr e1 -> Arr e2 -> Arr (e1, e2) + + (!:) :: Arr e -> Int -> e + {-# SPECIALISE INLINE (!:) :: Arr Int -> Int -> Int #-} + {-# SPECIALISE INLINE (!:) :: Arr (a, b) -> Int -> (a, b) #-} + (ArrInt _ ba) !: (I# i) = I# (indexIntArray# ba i) + (ArrPair _ a1 a2) !: i = (a1 !: i, a2 !: i) + +When (!:) is specialised it becomes non-recursive, and can usefully +be inlined. Scary! So we only warn for SPECIALISE *without* INLINE +for a non-overloaded function. -} tcSpecPrags :: Id -> [LSig GhcRn] @@ -921,25 +942,21 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) -- Quantify ; let (quant_cts, residual_wanted) = getRuleQuantCts wanted quant_preds = ctsPreds quant_cts - (quant_eq_cts, quant_dict_cts) = partitionBag (isEqPred . ctPred) quant_cts ; dvs <- candidateQTyVarsOfTypes (quant_preds ++ seed_tys) ; let grown_tcvs = growThetaTyVars quant_preds (tyCoVarsOfTypes seed_tys) weeded_dvs = weedOutCandidates (`dVarSetIntersectVarSet` grown_tcvs) dvs ; qtkvs <- quantifyTyVars skol_info DefaultNonStandardTyVars weeded_dvs -- Left hand side of the RULE - ; lhs_eq_evs <- mk_quant_evs quant_eq_cts - ; lhs_dict_evs <- mk_quant_evs quant_dict_cts - ; let lhs_evs = lhs_eq_evs ++ lhs_dict_evs + ; lhs_evs <- mk_quant_evs quant_cts ; (implic1, lhs_binds) <- buildImplicationFor tc_lvl skol_info_anon qtkvs lhs_evs residual_wanted -- rhs_binds uses rhs_evs to build `wanted` (NB not just `residual_wanted`) - ; rhs_dict_evs <- mapM newEvVar (ctsPreds quant_dict_cts) - ; let rhs_evs = lhs_eq_evs ++ rhs_dict_evs + ; rhs_evs <- mapM newEvVar quant_preds ; (implic2, rhs_binds) <- buildImplicationFor tc_lvl skol_info_anon qtkvs rhs_evs - (emptyWC { wc_simple = quant_dict_cts }) + (emptyWC { wc_simple = quant_cts }) ; emitImplications (implic1 `unionBags` implic2) @@ -985,15 +1002,13 @@ tcSpecWrapper ctxt poly_ty spec_ty tcImpPrags :: [LSig GhcRn] -> TcM [LTcSpecPrag] -- SPECIALISE pragmas for imported things tcImpPrags prags - = do { this_mod <- getModule - ; dflags <- getDynFlags + = do { dflags <- getDynFlags + ; traceTc "tcImpPrags1" (ppr prags) ; if (not_specialising dflags) then return [] else do - { pss <- mapAndRecoverM (wrapLocMA tcImpSpec) - [L loc (name,prag) - | (L loc prag@(SpecSig _ (L _ name) _ _)) <- prags - , not (nameIsLocalOrFrom this_mod name) ] + { this_mod <- getModule + ; pss <- mapAndRecoverM (wrapLocMA (tcImpSpec this_mod)) prags ; return $ concatMap (\(L l ps) -> map (L (locA l)) ps) pss } } where -- Ignore SPECIALISE pragmas for imported things @@ -1003,8 +1018,10 @@ tcImpPrags prags not_specialising dflags = not (gopt Opt_Specialise dflags) || not (backendRespectsSpecialise (backend dflags)) -tcImpSpec :: (Name, Sig GhcRn) -> TcM [TcSpecPrag] -tcImpSpec (name, prag) +tcImpSpec :: Module -> Sig GhcRn -> TcM [TcSpecPrag] +tcImpSpec this_mod prag + | Just name <- is_spec_prag prag -- It's a specialisation pragma + , not (nameIsLocalOrFrom this_mod name) -- The Id is imported = do { id <- tcLookupId name ; if hasSomeUnfolding (realIdUnfolding id) -- See Note [SPECIALISE pragmas for imported Ids] @@ -1012,6 +1029,12 @@ tcImpSpec (name, prag) else do { let dia = TcRnSpecialiseNotVisible name ; addDiagnosticTc dia ; return [] } } + | otherwise + = return [] + where + is_spec_prag (SpecSig _ (L _ nm) _ _) = Just nm + is_spec_prag (SpecSigE nm _ _ _) = Just nm + is_spec_prag _ = Nothing {- Note [SPECIALISE pragmas for imported Ids] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== testsuite/tests/typecheck/should_compile/tc212.hs ===================================== @@ -4,5 +4,6 @@ module ShouldCompile where -- A specialise pragma with no type signature -fac n = fac (n + 1) +-- fac :: Num a => a -> a +fac n = n -- fac (n + 1) {-# SPECIALISE fac :: Int -> Int #-} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/44529c5f99b6c6d35523420bf3c57801bcca47e3 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/44529c5f99b6c6d35523420bf3c57801bcca47e3 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 14:05:58 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Thu, 21 Nov 2024 09:05:58 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <673f3e46ca23_25f6c91963749139d@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: b8bf5b2a by Sjoerd Visscher at 2024-11-21T15:05:51+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/linear_types.rst - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T15279.stderr - testsuite/tests/printer/T18791.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b8bf5b2ab70abd341f9ab04f1328a7d512989fa6 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b8bf5b2ab70abd341f9ab04f1328a7d512989fa6 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 15:18:28 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 21 Nov 2024 10:18:28 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Fix CRLF in multiline strings (#25375) Message-ID: <673f4f447cff6_25f6c95de8b4107070@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 9049e46c by Brandon Chinn at 2024-11-21T10:18:07-05:00 Fix CRLF in multiline strings (#25375) - - - - - 3369685d by Rodrigo Mesquita at 2024-11-21T10:18:08-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - e25afd6e by Cheng Shao at 2024-11-21T10:18:08-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 29 changed files: - .gitattributes - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Parser/String.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/StgToCmm/Config.hs - compiler/GHC/StgToCmm/Hpc.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModGuts.hs - compiler/ghc.cabal.in - docs/users_guide/exts/multiline_strings.rst - + testsuite/tests/bytecode/T25510/Makefile - + testsuite/tests/bytecode/T25510/T25510A.hs - + testsuite/tests/bytecode/T25510/T25510B.hs - + testsuite/tests/bytecode/T25510/all.T - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - + testsuite/tests/parser/should_run/T25375.hs - + testsuite/tests/parser/should_run/T25375.stdout - testsuite/tests/parser/should_run/all.T - testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs Changes: ===================================== .gitattributes ===================================== @@ -2,3 +2,4 @@ # don't convert anything on checkout * text=auto eol=lf mk/win32-tarballs.md5sum text=auto eol=LF +testsuite/tests/parser/should_run/T25375.hs text=auto eol=crlf ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -8,13 +8,14 @@ module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq, - graphFromVerticesAndAdjacency, + graphFromVerticesAndAdjacency, emptyGraph, SCC(..), Node(..), G.flattenSCC, G.flattenSCCs, stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -43,7 +44,6 @@ module GHC.Data.Graph.Directed ( -- removed them since they were not used anywhere in GHC. ------------------------------------------------------------------------------ - import GHC.Prelude import GHC.Utils.Misc ( sortWith, count ) @@ -60,13 +60,13 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph ( Vertex, Bounds, SCC(..) ) -- Used in the underlying representation -import Data.Tree import GHC.Types.Unique import GHC.Types.Unique.FM -import qualified Data.IntMap as IM -import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S + +-- The graph internals are defined in the .Internal module so they can be +-- imported by GHC.Data.Graph.Directed.Reachability while still allowing this +-- module to export it abstractly. +import GHC.Data.Graph.Directed.Internal {- ************************************************************************ @@ -86,14 +86,6 @@ Note [Nodes, keys, vertices] arranged densely in 0.n -} -data Graph node = Graph { - gr_int_graph :: IntGraph, - gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex - } - -data Edge node = Edge node node - {-| Representation for nodes of the Graph. * The @payload@ is user data, just carried around in this module @@ -357,51 +349,22 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] - outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] reachablesG graph froms = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node -verticesG :: Graph node -> [node] -verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) - -edgesG :: Graph node -> [Edge node] -edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) - where v2n = gr_vertex_to_node graph - transposeG :: Graph node -> Graph node transposeG graph = Graph (G.transposeG (gr_int_graph graph)) (gr_vertex_to_node graph) @@ -410,112 +373,10 @@ transposeG graph = Graph (G.transposeG (gr_int_graph graph)) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -{- -************************************************************************ -* * -* Showing Graphs -* * -************************************************************************ --} - -instance Outputable node => Outputable (Graph node) where - ppr graph = vcat [ - hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), - hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) - ] - -instance Outputable node => Outputable (Edge node) where - ppr (Edge from to) = ppr from <+> text "->" <+> ppr to - graphEmpty :: G.Graph -> Bool graphEmpty g = lo > hi where (lo, hi) = bounds g -{- -************************************************************************ -* * -* IntGraphs -* * -************************************************************************ --} - -type IntGraph = G.Graph - -{- ------------------------------------------------------------- --- Depth first search numbering ------------------------------------------------------------- --} - --- Data.Tree has flatten for Tree, but nothing for Forest -preorderF :: Forest a -> [a] -preorderF ts = concatMap flatten ts - -{- ------------------------------------------------------------- --- Finding reachable vertices ------------------------------------------------------------- --} - --- This generalizes reachable which was found in Data.Graph -reachable :: IntGraph -> [Vertex] -> [Vertex] -reachable g vs = preorderF (G.dfs g vs) - -reachableGraph :: IntGraph -> IM.IntMap IS.IntSet -reachableGraph g = res - where - do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) - res = IM.fromList [(v, do_one v) | v <- G.vertices g] - -scc :: IntGraph -> [SCC Vertex] -scc graph = map decode forest - where - forest = {-# SCC "Digraph.scc" #-} G.scc graph - - decode (Node v []) | mentions_itself v = CyclicSCC [v] - | otherwise = AcyclicSCC v - decode other = CyclicSCC (dec other []) - where dec (Node v ts) vs = v : foldr dec vs ts - mentions_itself v = v `elem` (graph ! v) - -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) {- ************************************************************************ @@ -623,3 +484,4 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + ===================================== compiler/GHC/Data/Graph/Directed/Internal.hs ===================================== @@ -0,0 +1,79 @@ +module GHC.Data.Graph.Directed.Internal where + +import GHC.Prelude +import GHC.Utils.Outputable + +import Data.Array +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) -- Used in the underlying representation +import Data.Tree + +data Graph node = Graph { + gr_int_graph :: IntGraph, + gr_vertex_to_node :: Vertex -> node, + gr_node_to_vertex :: node -> Maybe Vertex +} + +data Edge node = Edge node node + +------------------------------------------------------------ +-- Nodes and Edges +------------------------------------------------------------ + +verticesG :: Graph node -> [node] +verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) + +edgesG :: Graph node -> [Edge node] +edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) + where v2n = gr_vertex_to_node graph + +------------------------------------------------------------ +-- Showing Graphs +------------------------------------------------------------ + +instance Outputable node => Outputable (Graph node) where + ppr graph = vcat [ + hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), + hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) + ] + +instance Outputable node => Outputable (Edge node) where + ppr (Edge from to) = ppr from <+> text "->" <+> ppr to + +{- +************************************************************************ +* * +* IntGraphs +* * +************************************************************************ +-} + +type IntGraph = G.Graph + +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + +scc :: IntGraph -> [SCC Vertex] +scc graph = map decode forest + where + forest = {-# SCC "Digraph.scc" #-} G.scc graph + + decode (Node v []) | mentions_itself v = CyclicSCC [v] + | otherwise = AcyclicSCC v + decode other = CyclicSCC (dec other []) + where dec (Node v ts) vs = v : foldr dec vs ts + mentions_itself v = v `elem` (graph ! v) + ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -0,0 +1,168 @@ +-- | An abstract interface for a fast reachability data structure constructed +-- from a 'GHC.Data.Graph.Directed' graph. +module GHC.Data.Graph.Directed.Reachability + ( ReachabilityIndex + + -- * Constructing a reachability index + , graphReachability, cyclicGraphReachability + + -- * Reachability queries + , allReachable, allReachableMany + , isReachable, isReachableMany + ) + where + +import GHC.Prelude +import GHC.Data.Maybe + +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) + +import Data.Array ((!)) +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS + +import GHC.Data.Graph.Directed.Internal + +-------------------------------------------------------------------------------- +-- * Reachability index +-------------------------------------------------------------------------------- + +-- | The abstract data structure for fast reachability queries +data ReachabilityIndex node = ReachabilityIndex { + index :: IM.IntMap IS.IntSet, + from_vertex :: Vertex -> node, + to_vertex :: node -> Maybe Vertex +} + +-------------------------------------------------------------------------------- +-- * Construction +-------------------------------------------------------------------------------- + +-- | Construct a 'ReachabilityIndex' from an acyclic 'Graph'. +-- If the graph can have cycles, use 'cyclicGraphReachability' +graphReachability :: Graph node -> ReachabilityIndex node +graphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraph, from_vertex = from, to_vertex = to} + where + reachableGraph :: IM.IntMap IS.IntSet + reachableGraph = IM.fromList [(v, do_one v) | v <- G.vertices g] + + do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) + +-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. +cyclicGraphReachability :: Graph node -> ReachabilityIndex node +cyclicGraphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} + where + reachableGraphCyclic :: IM.IntMap IS.IntSet + reachableGraphCyclic = foldl' add_one_comp mempty comps + + neighboursOf v = g!v + + comps = scc g + + -- To avoid divergence on cyclic input, we build the result + -- strongly connected component by component, in topological + -- order. For each SCC, we know that: + -- + -- * All vertices in the component can reach all other vertices + -- in the component ("local" reachables) + -- + -- * Other reachable vertices ("remote" reachables) must come + -- from earlier components, either via direct neighbourhood, or + -- transitively from earlier reachability map + -- + -- This allows us to build the extension of the reachability map + -- directly, without any self-reference, thereby avoiding a loop. + add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet + add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier + where + earlier_neighbours = neighboursOf v + earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours + all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) + add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier + where + all_locals = IS.fromList vs + local v = IS.delete v all_locals + -- Arguably, for a cyclic SCC we should include each + -- vertex in its own reachable set. However, this could + -- lead to a lot of extra pain in client code to avoid + -- looping when traversing the reachability map. + all_neighbours = IS.fromList (concatMap neighboursOf vs) + earlier_neighbours = all_neighbours IS.\\ all_locals + earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) + all_remotes = IS.unions (earlier_neighbours : earlier_further) + +-------------------------------------------------------------------------------- +-- * Reachability queries +-------------------------------------------------------------------------------- + +-- | 'allReachable' returns the nodes reachable from the given @root@ node. +-- +-- Properties: +-- * The list of nodes /does not/ include the @root@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(1)$ complexity. +-- +-- If you need a topologically sorted list, consider using the functions exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead. +allReachable :: ReachabilityIndex node -> node {-^ The @root@ node -} -> [node] {-^ All nodes reachable from @root@ -} +allReachable (ReachabilityIndex index from to) root = map from result + where root_i = expectJust "reachableFrom" (to root) + hits = {-# SCC "allReachable" #-} IM.lookup root_i index + result = IS.toList $! expectJust "reachableFrom" hits + +-- | 'allReachableMany' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes /does not/ include the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableMany :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = {-# SCC "allReachableMany" #-} + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i + +-- | Fast reachability query. +-- +-- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ +-- asks whether @b@ can be reached through @g@ starting from @a at . +-- +-- Properties: +-- * No self loops, i.e. @isReachable _ a a == False@ +-- * This function has $O(1)$ complexity. +isReachable :: ReachabilityIndex node {-^ @g@ -} + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +isReachable (ReachabilityIndex index _ to) a b = + IS.member b_i $ + expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + +-- | Fast reachability query with many roots. +-- +-- On graph @g@ with many nodes @roots@ and node @b@, @isReachableMany g as b@ +-- asks whether @b@ can be reached through @g@ from any of the @roots at . +-- +-- Properties: +-- * No self loops, i.e. @isReachableMany _ [a] a == False@ +-- * This function is $O(n)$ in the number of roots +isReachableMany :: ReachabilityIndex node -- ^ @g@ + -> [node] -- ^ @roots@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from any of the @roots@ +isReachableMany (ReachabilityIndex index _ to) roots b = + IS.member b_i $ + IS.unions $ + map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i + where roots_i = [ v | Just v <- map to roots ] + b_i = expectJust "reachablesQuery:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Config/StgToCmm.hs ===================================== @@ -38,7 +38,6 @@ initStgToCmmConfig dflags mod = StgToCmmConfig -- flags , stgToCmmLoopification = gopt Opt_Loopification dflags , stgToCmmAlignCheck = gopt Opt_AlignmentSanitisation dflags - , stgToCmmOptHpc = gopt Opt_Hpc dflags , stgToCmmFastPAPCalls = gopt Opt_FastPAPCalls dflags , stgToCmmSCCProfiling = sccProfilingEnabled dflags , stgToCmmEagerBlackHole = gopt Opt_EagerBlackHoling dflags ===================================== compiler/GHC/Driver/Hooks.hs ===================================== @@ -48,7 +48,6 @@ import GHC.Types.Basic import GHC.Types.CostCentre import GHC.Types.IPE import GHC.Types.Meta -import GHC.Types.HpcInfo import GHC.Unit.Module import GHC.Unit.Module.ModSummary @@ -149,7 +148,7 @@ data Hooks = Hooks -> IO (Either Type (HValue, [Linkable], PkgsLoaded)))) , createIservProcessHook :: !(Maybe (CreateProcess -> IO ProcessHandle)) , stgToCmmHook :: !(Maybe (StgToCmmConfig -> InfoTableProvMap -> [TyCon] -> CollectedCCs - -> [CgStgTopBinding] -> HpcInfo -> CgStream CmmGroup ModuleLFInfos)) + -> [CgStgTopBinding] -> CgStream CmmGroup ModuleLFInfos)) , cmmToRawCmmHook :: !(forall a . Maybe (DynFlags -> Maybe Module -> CgStream CmmGroupSRTs a -> IO (CgStream RawCmmGroup a))) } ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -248,7 +248,6 @@ import GHC.Types.Name.Cache ( initNameCache ) import GHC.Types.Name.Reader import GHC.Types.Name.Ppr import GHC.Types.TyThing -import GHC.Types.HpcInfo import GHC.Types.Unique.Supply (uniqFromTag) import GHC.Types.Unique.Set @@ -1980,7 +1979,6 @@ hscGenHardCode hsc_env cgguts location output_filename = do cg_foreign = foreign_stubs0, cg_foreign_files = foreign_files, cg_dep_pkgs = dependencies, - cg_hpc_info = hpc_info, cg_spt_entries = spt_entries, cg_binds = late_binds, cg_ccs = late_local_ccs @@ -2084,7 +2082,7 @@ hscGenHardCode hsc_env cgguts location output_filename = do cmms <- {-# SCC "StgToCmm" #-} doCodeGen hsc_env this_mod denv data_tycons cost_centre_info - stg_binds hpc_info + stg_binds ------------------ Code output ----------------------- rawcmms0 <- {-# SCC "cmmToRawCmm" #-} @@ -2291,13 +2289,12 @@ This reduces residency towards the end of the CodeGen phase significantly doCodeGen :: HscEnv -> Module -> InfoTableProvMap -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -- ^ Bindings come already annotated with fvs - -> HpcInfo -> IO (CgStream CmmGroupSRTs CmmCgInfos) -- Note we produce a 'Stream' of CmmGroups, so that the -- backend can be run incrementally. Otherwise it generates all -- the C-- up front, which has a significant space cost. doCodeGen hsc_env this_mod denv data_tycons - cost_centre_info stg_binds_w_fvs hpc_info = do + cost_centre_info stg_binds_w_fvs = do let dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env hooks = hsc_hooks hsc_env @@ -2308,14 +2305,14 @@ doCodeGen hsc_env this_mod denv data_tycons putDumpFileMaybe logger Opt_D_dump_stg_final "Final STG:" FormatSTG (pprGenStgTopBindings stg_ppr_opts stg_binds_w_fvs) - let stg_to_cmm dflags mod a b c d e = case stgToCmmHook hooks of - Nothing -> StgToCmm.codeGen logger tmpfs (initStgToCmmConfig dflags mod) a b c d e - Just h -> (,emptyDetUFM) <$> h (initStgToCmmConfig dflags mod) a b c d e + let stg_to_cmm dflags mod a b c d = case stgToCmmHook hooks of + Nothing -> StgToCmm.codeGen logger tmpfs (initStgToCmmConfig dflags mod) a b c d + Just h -> (,emptyDetUFM) <$> h (initStgToCmmConfig dflags mod) a b c d let cmm_stream :: CgStream CmmGroup (ModuleLFInfos, DetUniqFM) -- See Note [Forcing of stg_binds] cmm_stream = stg_binds_w_fvs `seqList` {-# SCC "StgToCmm" #-} - stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs hpc_info + stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs -- codegen consumes a stream of CmmGroup, and produces a new -- stream of CmmGroup (not necessarily synchronised: one ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,7 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import GHC.Data.Graph.Directed.Reachability -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +612,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1499,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:allReachable (graphReachability graph) root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1821,20 +1823,15 @@ checkHomeUnitsClosed ue | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)] where home_id_set = unitEnv_keys $ ue_home_unit_graph ue - bad_unit_ids = upwards_closure Set.\\ home_id_set + bad_unit_ids = upwards_closure Set.\\ home_id_set {- Remove all home units reached, keep only bad nodes -} rootLoc = mkGeneralSrcSpan (fsLit "") - graph :: Graph (Node UnitId UnitId) - graph = graphFromEdgedVerticesUniq graphNodes + downwards_closure :: Graph (Node UnitId UnitId) + downwards_closure = graphFromEdgedVerticesUniq graphNodes - -- downwards closure of graph - downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + inverse_closure = graphReachability $ transposeG downwards_closure - inverse_closure = transposeG downwards_closure - - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ allReachableMany inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/HsToCore/Coverage.hs ===================================== @@ -117,7 +117,7 @@ hpcInitCode platform this_mod (HpcInfo tickCount hashNo) = initializerCStub platform fn_name decls body where fn_name = mkInitializerStubLabel this_mod (fsLit "hpc") - decls = text "extern StgWord64 " <> tickboxes <> text "[]" <> semi + decls = text "StgWord64 " <> tickboxes <> brackets (int tickCount) <> semi body = text "hs_hpc_module" <> parens (hcat (punctuate comma [ doubleQuotes full_name_str, ===================================== compiler/GHC/Iface/Tidy.hs ===================================== @@ -407,7 +407,6 @@ tidyProgram opts (ModGuts { mg_module = mod , mg_deps = deps , mg_foreign = foreign_stubs , mg_foreign_files = foreign_files - , mg_hpc_info = hpc_info , mg_modBreaks = modBreaks , mg_boot_exports = boot_exports }) = do @@ -480,7 +479,6 @@ tidyProgram opts (ModGuts { mg_module = mod , cg_foreign = all_foreign_stubs , cg_foreign_files = foreign_files , cg_dep_pkgs = dep_direct_pkgs deps - , cg_hpc_info = hpc_info , cg_modBreaks = modBreaks , cg_spt_entries = spt_entries } @@ -1567,4 +1565,3 @@ mustExposeTyCon no_trim_types exports tc exported_con con = any (`elemNameSet` exports) (dataConName con : dataConFieldLabels con) -} - ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Parser/String.hs ===================================== @@ -261,6 +261,7 @@ lexMultilineString = lexStringWith processChars processChars processChars :: HasChar c => [c] -> Either (c, LexErr) [c] processChars = collapseGaps -- Step 1 + >>> normalizeEOL >>> expandLeadingTabs -- Step 3 >>> rmCommonWhitespacePrefix -- Step 4 >>> collapseOnlyWsLines -- Step 5 @@ -268,6 +269,19 @@ lexMultilineString = lexStringWith processChars processChars >>> rmLastNewline -- Step 7b >>> resolveEscapes -- Step 8 + -- Normalize line endings to LF. The spec dictates that lines should be + -- split on newline characters and rejoined with ``\n``. But because we + -- aren't actually splitting/rejoining, we'll manually normalize here + normalizeEOL :: HasChar c => [c] -> [c] + normalizeEOL = + let go = \case + Char '\r' : c@(Char '\n') : cs -> c : go cs + c@(Char '\r') : cs -> setChar '\n' c : go cs + c@(Char '\f') : cs -> setChar '\n' c : go cs + c : cs -> c : go cs + [] -> [] + in go + -- expands all tabs, since the lexer will verify that tabs can only appear -- as leading indentation expandLeadingTabs :: HasChar c => [c] -> [c] ===================================== compiler/GHC/StgToCmm.hs ===================================== @@ -24,7 +24,6 @@ import GHC.StgToCmm.Layout import GHC.StgToCmm.Utils import GHC.StgToCmm.Closure import GHC.StgToCmm.Config -import GHC.StgToCmm.Hpc import GHC.StgToCmm.Ticky import GHC.StgToCmm.Types (ModuleLFInfos) import GHC.StgToCmm.CgUtils (CgStream) @@ -38,7 +37,6 @@ import GHC.Stg.Syntax import GHC.Types.CostCentre import GHC.Types.IPE -import GHC.Types.HpcInfo import GHC.Types.Id import GHC.Types.Id.Info import GHC.Types.RepType @@ -52,7 +50,6 @@ import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.Multiplicity -import GHC.Unit.Module import GHC.Utils.Error import GHC.Utils.Outputable @@ -77,13 +74,12 @@ codeGen :: Logger -> [TyCon] -> CollectedCCs -- (Local/global) cost-centres needing declaring/registering. -> [CgStgTopBinding] -- Bindings to convert - -> HpcInfo -> CgStream CmmGroup (ModuleLFInfos, DetUniqFM) -- See Note [Deterministic Uniques in the CG] on CgStream -- Output as a stream, so codegen can -- be interleaved with output codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons - cost_centre_info stg_binds hpc_info + cost_centre_info stg_binds = do { -- cg: run the code generator, and yield the resulting CmmGroup -- Using an IORef to store the state is a bit crude, but otherwise -- we would need to add a state monad layer which regresses @@ -118,7 +114,7 @@ codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons yield cmm return a - ; cg (mkModuleInit cost_centre_info (stgToCmmThisModule cfg) hpc_info) + ; cg (mkModuleInit cost_centre_info) ; mapM_ (cg . cgTopBinding logger tmpfs cfg) stg_binds -- Put datatype_stuff after code_stuff, because the @@ -281,13 +277,10 @@ cgTopRhs cfg rec bndr (StgRhsClosure fvs cc upd_flag args body _typ) mkModuleInit :: CollectedCCs -- cost centre info - -> Module - -> HpcInfo -> FCode () -mkModuleInit cost_centre_info this_mod hpc_info - = do { initHpc this_mod hpc_info - ; initCostCentres cost_centre_info +mkModuleInit cost_centre_info + = do { initCostCentres cost_centre_info } ===================================== compiler/GHC/StgToCmm/Config.hs ===================================== @@ -46,7 +46,6 @@ data StgToCmmConfig = StgToCmmConfig ---------------------------------- Flags -------------------------------------- , stgToCmmLoopification :: !Bool -- ^ Loopification enabled (cf @-floopification@) , stgToCmmAlignCheck :: !Bool -- ^ Insert alignment check (cf @-falignment-sanitisation@) - , stgToCmmOptHpc :: !Bool -- ^ perform code generation for code coverage , stgToCmmFastPAPCalls :: !Bool -- ^ , stgToCmmSCCProfiling :: !Bool -- ^ Check if cost-centre profiling is enabled , stgToCmmEagerBlackHole :: !Bool -- ^ ===================================== compiler/GHC/StgToCmm/Hpc.hs ===================================== @@ -6,13 +6,11 @@ -- ----------------------------------------------------------------------------- -module GHC.StgToCmm.Hpc ( initHpc, mkTickBox ) where +module GHC.StgToCmm.Hpc ( mkTickBox ) where import GHC.Prelude import GHC.Platform -import GHC.StgToCmm.Monad -import GHC.StgToCmm.Utils import GHC.Cmm.Graph import GHC.Cmm.Expr @@ -20,9 +18,7 @@ import GHC.Cmm.CLabel import GHC.Cmm.Utils import GHC.Unit.Module -import GHC.Types.HpcInfo -import Control.Monad mkTickBox :: Platform -> Module -> Int -> CmmAGraph mkTickBox platform mod n @@ -34,16 +30,3 @@ mkTickBox platform mod n tick_box = cmmIndex platform W64 (CmmLit $ CmmLabel $ mkHpcTicksLabel $ mod) n - --- | Emit top-level tables for HPC and return code to initialise -initHpc :: Module -> HpcInfo -> FCode () -initHpc _ NoHpcInfo{} - = return () -initHpc this_mod (HpcInfo tickCount _hashNo) - = do do_hpc <- stgToCmmOptHpc <$> getStgToCmmConfig - when do_hpc $ - emitDataLits (mkHpcTicksLabel this_mod) - [ CmmInt 0 W64 - | _ <- take tickCount [0 :: Int ..] - ] - ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -49,6 +50,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Data.Maybe import GHC.Data.Graph.Directed +import GHC.Data.Graph.Directed.Reachability import GHC.Driver.Backend import GHC.Driver.DynFlags @@ -72,6 +74,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +156,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,12 +176,11 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = mkTransDeps new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +201,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +214,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +391,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +409,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + ===================================== compiler/GHC/Unit/Module/ModGuts.hs ===================================== @@ -141,7 +141,6 @@ data CgGuts cg_foreign_files :: ![(ForeignSrcLang, FilePath)], cg_dep_pkgs :: !(Set UnitId), -- ^ Dependent packages, used to -- generate #includes for C code gen - cg_hpc_info :: !HpcInfo, -- ^ Program coverage tick box information cg_modBreaks :: !(Maybe ModBreaks), -- ^ Module breakpoints cg_spt_entries :: [SptEntry] -- ^ Static pointer table entries for static forms defined in ===================================== compiler/ghc.cabal.in ===================================== @@ -444,6 +444,8 @@ Library GHC.Data.Graph.Color GHC.Data.Graph.Collapse GHC.Data.Graph.Directed + GHC.Data.Graph.Directed.Internal + GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.Inductive.Graph GHC.Data.Graph.Inductive.PatriciaTree GHC.Data.Graph.Ops ===================================== docs/users_guide/exts/multiline_strings.rst ===================================== @@ -14,7 +14,9 @@ With this extension, GHC now recognizes multiline string literals with ``"""`` d Normal string literals are lexed, then string gaps are collapsed, then escape characters are resolved. Multiline string literals add the following post-processing steps between collapsing string gaps and resolving escape characters: -#. Split the string by newlines +#. Split the string by newline characters + + * Includes ``\r\n``, ``\r``, ``\n``, ``\f`` #. Replace leading tabs with spaces up to the next tab stop @@ -24,7 +26,9 @@ Normal string literals are lexed, then string gaps are collapsed, then escape ch #. Join the string back with ``\n`` delimiters -#. If the first character of the string is a newline, remove it +#. If the first character of the string is ``\n``, remove it + +#. If the last character of the string is ``\n``, remove it Examples ~~~~~~~~ ===================================== testsuite/tests/bytecode/T25510/Makefile ===================================== @@ -0,0 +1,7 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T25510c: + '$(TEST_HC)' $(ghcThWayFlags) -fhpc -fbyte-code-and-object-code -c T25510A.hs + '$(TEST_HC)' $(ghcThWayFlags) -fhpc -fprefer-byte-code -c T25510B.hs ===================================== testsuite/tests/bytecode/T25510/T25510A.hs ===================================== @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskellQuotes #-} + +module T25510A where + +import Language.Haskell.TH + +a :: Q Exp +a = [| 114514 |] ===================================== testsuite/tests/bytecode/T25510/T25510B.hs ===================================== @@ -0,0 +1,7 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T25510B where + +import T25510A + +b = $(a) ===================================== testsuite/tests/bytecode/T25510/all.T ===================================== @@ -0,0 +1,10 @@ +test('T25510', [ + req_th, + js_skip +], multimod_compile, ['T25510B', '-fhpc -fbyte-code-and-object-code -fprefer-byte-code -v0']) + +test('T25510c', [ + extra_files(['T25510A.hs', 'T25510B.hs']), + req_th, + js_skip +], makefile_test, ['T25510c ghcThWayFlags=' + config.ghc_th_way_flags]) ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -66,6 +66,7 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -67,6 +67,8 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal +GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps ===================================== testsuite/tests/parser/should_run/T25375.hs ===================================== @@ -0,0 +1,38 @@ +{-# LANGUAGE MultilineStrings #-} + +str1 = unlines + [ "aaa" + , "bbb" + , "ccc" + ] + +str2 = "aaa\n\ + \bbb\n\ + \ccc\n" + +str3 = """ + aaa + bbb + ccc + """ + +str4 = """ + + aaa + bbb + ccc + + """ + +str5 = """ + aaa + bbb + ccc\n + """ + +main = do + print str1 + print str2 + print str3 + print str4 + print str5 ===================================== testsuite/tests/parser/should_run/T25375.stdout ===================================== @@ -0,0 +1,5 @@ +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc" +"\naaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" ===================================== testsuite/tests/parser/should_run/all.T ===================================== @@ -23,3 +23,4 @@ test('RecordDotSyntax5', normal, compile_and_run, ['']) test('ListTuplePunsConstraints', extra_files(['ListTuplePunsConstraints.hs']), ghci_script, ['ListTuplePunsConstraints.script']) test('MultilineStrings', normal, compile_and_run, ['']) test('MultilineStringsOverloaded', normal, compile_and_run, ['']) +test('T25375', normal, compile_and_run, ['']) ===================================== testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs ===================================== @@ -34,7 +34,6 @@ import GHC.Stg.FVs import GHC.Stg.Syntax import GHC.StgToCmm (codeGen) import GHC.Types.CostCentre (emptyCollectedCCs) -import GHC.Types.HpcInfo (emptyHpcInfo) import GHC.Types.IPE (emptyInfoTableProvMap) import GHC.Types.Unique.DSM import GHC.Unit.Home @@ -70,14 +69,12 @@ cmmOfSummary summ = do tycons = [] ccs = emptyCollectedCCs stg' = fmap fst (depSortWithAnnotStgPgm (ms_mod summ) stg) - hpcinfo = emptyHpcInfo False tmpfs = hsc_tmpfs env - stg_to_cmm dflags mod = codeGen logger tmpfs (initStgToCmmConfig dflags mod) (groups, _infos) <- liftIO $ fmap fst $ runUDSMT (initDUniqSupply 't' 0) $ collectAll $ - stg_to_cmm dflags (ms_mod summ) infotable tycons ccs stg' hpcinfo + codeGen logger tmpfs (initStgToCmmConfig dflags (ms_mod summ)) infotable tycons ccs stg' return groups frontend :: DynFlags -> HscEnv -> ModSummary -> IO ModGuts View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5cffc92d345cab38274c7a6a45baa72eab62bd94...e25afd6e05a0fd4ade7f6223cf790b53878dbfb2 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5cffc92d345cab38274c7a6a45baa72eab62bd94...e25afd6e05a0fd4ade7f6223cf790b53878dbfb2 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 16:45:03 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 21 Nov 2024 11:45:03 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/romes/restore-ecwl Message-ID: <673f638f29e96_2cbe9738202082862@gitlab.mail> Rodrigo Mesquita pushed new branch wip/romes/restore-ecwl at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/romes/restore-ecwl You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 16:51:11 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Thu, 21 Nov 2024 11:51:11 -0500 Subject: [Git][ghc/ghc][wip/romes/restore-ecwl] 7 commits: Don't store boot locations in finder cache Message-ID: <673f64ff8ff00_2cbe973d5450871f1@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/restore-ecwl at Glasgow Haskell Compiler / GHC Commits: 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - bfeb8ab2 by Rodrigo Mesquita at 2024-11-21T16:50:49+00:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 26 changed files: - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/StgToCmm/Prim.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Finder/Types.hs - compiler/GHC/Unit/Module/Env.hs - compiler/GHC/Unit/Module/Location.hs - compiler/GHC/Unit/Types.hs - libraries/ghc-internal/src/GHC/Internal/Exception.hs - testsuite/tests/linear/should_fail/LinearConfusedDollar.stderr - + testsuite/tests/linear/should_fail/T25185.hs - + testsuite/tests/linear/should_fail/T25185.stderr - testsuite/tests/linear/should_fail/all.T - + testsuite/tests/simd/should_run/T25486.hs - + testsuite/tests/simd/should_run/T25486.stdout - testsuite/tests/simd/should_run/all.T Changes: ===================================== compiler/GHC/Builtin/primops.txt.pp ===================================== @@ -1095,10 +1095,18 @@ primop DoubleLeOp "<=##" Compare Double# -> Double# -> Int# primop DoubleMinOp "minDouble#" GenPrimOp Double# -> Double# -> Double# + {Return the minimum of the arguments. + When the arguments are numerically equal (e.g. @0.0##@ and @-0.0##@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop DoubleMaxOp "maxDouble#" GenPrimOp Double# -> Double# -> Double# + {Return the maximum of the arguments. + When the arguments are numerically equal (e.g. @0.0##@ and @-0.0##@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop DoubleAddOp "+##" GenPrimOp @@ -1269,10 +1277,18 @@ primop FloatLeOp "leFloat#" Compare Float# -> Float# -> Int# primop FloatMinOp "minFloat#" GenPrimOp Float# -> Float# -> Float# + {Return the minimum of the arguments. + When the arguments are numerically equal (e.g. @0.0#@ and @-0.0#@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop FloatMaxOp "maxFloat#" GenPrimOp Float# -> Float# -> Float# + {Return the maximum of the arguments. + When the arguments are numerically equal (e.g. @0.0#@ and @-0.0#@) + or one of the arguments is not-a-number (NaN), + it is unspecified which one is returned.} with commutable = True primop FloatAddOp "plusFloat#" GenPrimOp @@ -4109,12 +4125,13 @@ primop VecPackOp "pack#" GenPrimOp primop VecUnpackOp "unpack#" GenPrimOp VECTOR -> VECTUPLE - { Unpack the elements of a vector into an unboxed tuple. #} + { Unpack the elements of a vector into an unboxed tuple. } with vector = ALL_VECTOR_TYPES primop VecInsertOp "insert#" GenPrimOp VECTOR -> SCALAR -> Int# -> VECTOR - { Insert a scalar at the given position in a vector. } + { Insert a scalar at the given position in a vector. + The position must be a compile-time constant. } with effect = CanFail vector = ALL_VECTOR_TYPES @@ -4160,40 +4177,43 @@ primop VecNegOp "negate#" GenPrimOp primop VecIndexByteArrayOp "indexArray#" GenPrimOp ByteArray# -> Int# -> VECTOR - { Read a vector from specified index of immutable array. } + { Read a vector from the specified index of an immutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = CanFail vector = ALL_VECTOR_TYPES primop VecReadByteArrayOp "readArray#" GenPrimOp MutableByteArray# s -> Int# -> State# s -> (# State# s, VECTOR #) - { Read a vector from specified index of mutable array. } + { Read a vector from the specified index of a mutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecWriteByteArrayOp "writeArray#" GenPrimOp MutableByteArray# s -> Int# -> VECTOR -> State# s -> State# s - { Write a vector to specified index of mutable array. } + { Write a vector to the specified index of a mutable array. + The index is counted in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecIndexOffAddrOp "indexOffAddr#" GenPrimOp Addr# -> Int# -> VECTOR - { Reads vector; offset in bytes. } + { Reads vector; offset in units of SIMD vectors (not scalar elements). } with effect = CanFail vector = ALL_VECTOR_TYPES primop VecReadOffAddrOp "readOffAddr#" GenPrimOp Addr# -> Int# -> State# s -> (# State# s, VECTOR #) - { Reads vector; offset in bytes. } + { Reads vector; offset in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES primop VecWriteOffAddrOp "writeOffAddr#" GenPrimOp Addr# -> Int# -> VECTOR -> State# s -> State# s - { Write vector; offset in bytes. } + { Write vector; offset in units of SIMD vectors (not scalar elements). } with effect = ReadWriteEffect can_fail_warning = YesWarnCanFail vector = ALL_VECTOR_TYPES @@ -4263,7 +4283,7 @@ primop VecFNMSub "fnmsub#" GenPrimOp primop VecShuffleOp "shuffle#" GenPrimOp VECTOR -> VECTOR -> INTVECTUPLE -> VECTOR {Shuffle elements of the concatenation of the input two vectors - into the result vector.} + into the result vector. The indices must be compile-time constants.} with vector = ALL_VECTOR_TYPES primop VecMinOp "min#" GenPrimOp ===================================== compiler/GHC/CmmToAsm/Format.hs ===================================== @@ -273,6 +273,9 @@ instance Show RegWithFormat where instance Uniquable RegWithFormat where getUnique = getUnique . regWithFormat_reg +instance Outputable VirtualRegWithFormat where + ppr (VirtualRegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt + instance Outputable RegWithFormat where ppr (RegWithFormat reg fmt) = ppr reg <+> dcolon <+> ppr fmt ===================================== compiler/GHC/CmmToAsm/X86/Instr.hs ===================================== @@ -373,8 +373,9 @@ regUsageOfInstr platform instr | otherwise -> usageRW fmt src dst MOVD fmt src dst -> - -- NB: MOVD/MOVQ always zero any remaining upper part of destination - mkRU (use_R fmt src []) (use_R (movdOutFormat fmt) dst []) + -- NB: MOVD and MOVQ always zero any remaining upper part of destination, + -- so the destination is "written" not "modified". + usageRW' fmt (movdOutFormat fmt) src dst CMOV _ fmt src dst -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MOVZxL fmt src dst -> usageRW fmt src dst MOVSxL fmt src dst -> usageRW fmt src dst @@ -475,7 +476,7 @@ regUsageOfInstr platform instr -- vector instructions VBROADCAST fmt src dst -> mkRU (use_R fmt src []) [mk fmt dst] - VEXTRACT fmt _off src dst -> mkRU [mk fmt src] (use_R fmt dst []) + VEXTRACT fmt _off src dst -> usageRW fmt (OpReg src) dst INSERTPS fmt (ImmInt off) src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst | not doesNotReadDst]) [mk fmt dst] where @@ -488,12 +489,12 @@ regUsageOfInstr platform instr INSERTPS fmt _off src dst -> mkRU ((use_R fmt src []) ++ [mk fmt dst]) [mk fmt dst] - VMOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVL fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVH fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - MOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) - VMOVDQU fmt src dst -> mkRU (use_R fmt src []) (use_R fmt dst []) + VMOVU fmt src dst -> usageRW fmt src dst + MOVU fmt src dst -> usageRW fmt src dst + MOVL fmt src dst -> usageRM fmt src dst + MOVH fmt src dst -> usageRM fmt src dst + MOVDQU fmt src dst -> usageRW fmt src dst + VMOVDQU fmt src dst -> usageRW fmt src dst PXOR fmt (OpReg src) dst | src == dst @@ -531,11 +532,12 @@ regUsageOfInstr platform instr -> mkRU (use_R fmt src [mk fmt dst]) [mk fmt dst] MINMAX _ _ fmt src dst - -> mkRU (use_R fmt src $ use_R fmt dst []) (use_R fmt dst []) + -> usageRM fmt src dst VMINMAX _ _ fmt src1 src2 dst -> mkRU (use_R fmt src1 [mk fmt src2]) [mk fmt dst] _other -> panic "regUsage: unrecognised instr" where + -- # Definitions -- -- Written: If the operand is a register, it's written. If it's an @@ -551,6 +553,11 @@ regUsageOfInstr platform instr usageRW fmt op (OpAddr ea) = mkRUR (use_R fmt op $! use_EA ea []) usageRW _ _ _ = panic "X86.RegInfo.usageRW: no match" + usageRW' :: HasDebugCallStack => Format -> Format -> Operand -> Operand -> RegUsage + usageRW' fmt1 fmt2 op (OpReg reg) = mkRU (use_R fmt1 op []) [mk fmt2 reg] + usageRW' fmt1 _ op (OpAddr ea) = mkRUR (use_R fmt1 op $! use_EA ea []) + usageRW' _ _ _ _ = panic "X86.RegInfo.usageRW: no match" + -- 2 operand form; first operand Read; second Modified usageRM :: HasDebugCallStack => Format -> Operand -> Operand -> RegUsage usageRM fmt op (OpReg reg) = mkRU (use_R fmt op [mk fmt reg]) [mk fmt reg] ===================================== compiler/GHC/Driver/Backpack.hs ===================================== @@ -781,7 +781,7 @@ summariseRequirement pn mod_name = do let loc = srcLocSpan (mkSrcLoc (mkFastString (bkp_filename env)) 1 1) let fc = hsc_FC hsc_env - mod <- liftIO $ addHomeModuleToFinder fc home_unit (notBoot mod_name) location + mod <- liftIO $ addHomeModuleToFinder fc home_unit mod_name location HsigFile extra_sig_imports <- liftIO $ findExtraSigImports hsc_env HsigFile mod_name @@ -854,17 +854,14 @@ hsModuleToModSummary home_keys pn hsc_src modname -- To add insult to injury, we don't even actually use -- these filenames to figure out where the hi files go. -- A travesty! - let location0 = mkHomeModLocation2 fopts modname + let location = mkHomeModLocation fopts modname (unsafeEncodeUtf $ unpackFS unit_fs moduleNameSlashes modname) - (case hsc_src of + (case hsc_src of HsigFile -> os "hsig" HsBootFile -> os "hs-boot" HsSrcFile -> os "hs") - -- DANGEROUS: bootifying can POISON the module finder cache - let location = case hsc_src of - HsBootFile -> addBootSuffixLocnOut location0 - _ -> location0 + hsc_src -- This duplicates a pile of logic in GHC.Driver.Make hi_timestamp <- liftIO $ modificationTimeIfExists (ml_hi_file location) hie_timestamp <- liftIO $ modificationTimeIfExists (ml_hie_file location) @@ -893,7 +890,7 @@ hsModuleToModSummary home_keys pn hsc_src modname this_mod <- liftIO $ do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB modname (hscSourceToIsBoot hsc_src)) location + addHomeModuleToFinder fc home_unit modname location hsc_src let ms = ModSummary { ms_mod = this_mod, ms_hsc_src = hsc_src, ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -2123,38 +2123,23 @@ summariseFile hsc_env' home_unit old_summaries src_fn mb_phase maybe_buf <- getPreprocessedImports hsc_env src_fn mb_phase maybe_buf let fopts = initFinderOpts (hsc_dflags hsc_env) - src_path = unsafeEncodeUtf src_fn + (basename, extension) = splitExtension src_fn - is_boot = case takeExtension src_fn of - ".hs-boot" -> IsBoot - ".lhs-boot" -> IsBoot - _ -> NotBoot - - (path_without_boot, hsc_src) - | isHaskellSigFilename src_fn = (src_path, HsigFile) - | IsBoot <- is_boot = (removeBootSuffix src_path, HsBootFile) - | otherwise = (src_path, HsSrcFile) - - -- Make a ModLocation for the Finder, who only has one entry for - -- each @ModuleName@, and therefore needs to use the locations for - -- the non-boot files. - location_without_boot = - mkHomeModLocation fopts pi_mod_name path_without_boot + hsc_src + | isHaskellSigSuffix (drop 1 extension) = HsigFile + | isHaskellBootSuffix (drop 1 extension) = HsBootFile + | otherwise = HsSrcFile -- Make a ModLocation for this file, adding the @-boot@ suffix to -- all paths if the original was a boot file. - location - | IsBoot <- is_boot - = addBootSuffixLocn location_without_boot - | otherwise - = location_without_boot + location = mkHomeModLocation fopts pi_mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf extension) hsc_src -- Tell the Finder cache where it is, so that subsequent calls -- to findModule will find it, even if it's not on any search path mod <- liftIO $ do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB pi_mod_name is_boot) location + addHomeModuleToFinder fc home_unit pi_mod_name location hsc_src liftIO $ makeNewModSummary hsc_env $ MakeNewModSummary { nms_src_fn = src_fn @@ -2184,14 +2169,10 @@ checkSummaryHash -- and it was likely flushed in depanal. This is not technically -- needed when we're called from sumariseModule but it shouldn't -- hurt. - -- Also, only add to finder cache for non-boot modules as the finder cache - -- makes sure to add a boot suffix for boot files. - _ <- do - let fc = hsc_FC hsc_env - gwib = GWIB (ms_mod old_summary) (isBootSummary old_summary) - case ms_hsc_src old_summary of - HsSrcFile -> addModuleToFinder fc gwib location - _ -> return () + let fc = hsc_FC hsc_env + mod = ms_mod old_summary + hsc_src = ms_hsc_src old_summary + addModuleToFinder fc mod location hsc_src hi_timestamp <- modificationTimeIfExists (ml_hi_file location) hie_timestamp <- modificationTimeIfExists (ml_hie_file location) @@ -2243,7 +2224,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p find_it :: IO SummariseResult find_it = do - found <- findImportedModule hsc_env wanted_mod mb_pkg + found <- findImportedModuleWithIsBoot hsc_env wanted_mod is_boot mb_pkg case found of Found location mod | isJust (ml_hs_file location) -> @@ -2261,10 +2242,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p just_found location mod = do -- Adjust location to point to the hs-boot source file, -- hi file, object file, when is_boot says so - let location' = case is_boot of - IsBoot -> addBootSuffixLocn location - NotBoot -> location - src_fn = expectJust "summarise2" (ml_hs_file location') + let src_fn = expectJust "summarise2" (ml_hs_file location) -- Check that it exists -- It might have been deleted since the Finder last found it @@ -2274,7 +2252,7 @@ summariseModule hsc_env' home_unit old_summary_map is_boot (L _ wanted_mod) mb_p -- .hs-boot file doesn't exist. Nothing -> return NotThere Just h -> do - fresult <- new_summary_cache_check location' mod src_fn h + fresult <- new_summary_cache_check location mod src_fn h return $ case fresult of Left err -> FoundHomeWithError (moduleUnitId mod, err) Right ms -> FoundHome ms ===================================== compiler/GHC/Driver/MakeFile.hs ===================================== @@ -292,12 +292,12 @@ findDependency :: HscEnv findDependency hsc_env srcloc pkg imp is_boot include_pkg_deps = do -- Find the module; this will be fast because -- we've done it once during downsweep - r <- findImportedModule hsc_env imp pkg + r <- findImportedModuleWithIsBoot hsc_env imp is_boot pkg case r of Found loc _ -- Home package: just depend on the .hi or hi-boot file | isJust (ml_hs_file loc) || include_pkg_deps - -> return (Just (unsafeDecodeUtf $ addBootSuffix_maybe is_boot (ml_hi_file_ospath loc))) + -> return (Just (unsafeDecodeUtf $ ml_hi_file_ospath loc)) -- Not in this package: we don't need a dependency | otherwise ===================================== compiler/GHC/Driver/Phases.hs ===================================== @@ -23,6 +23,7 @@ module GHC.Driver.Phases ( isDynLibSuffix, isHaskellUserSrcSuffix, isHaskellSigSuffix, + isHaskellBootSuffix, isSourceSuffix, isHaskellishTarget, @@ -234,7 +235,7 @@ phaseInputExt Js = "js" phaseInputExt StopLn = "o" haskellish_src_suffixes, backpackish_suffixes, haskellish_suffixes, cish_suffixes, - js_suffixes, haskellish_user_src_suffixes, haskellish_sig_suffixes + js_suffixes, haskellish_user_src_suffixes, haskellish_sig_suffixes, haskellish_boot_suffixes :: [String] -- When a file with an extension in the haskellish_src_suffixes group is -- loaded in --make mode, its imports will be loaded too. @@ -247,7 +248,8 @@ js_suffixes = [ "js" ] -- Will not be deleted as temp files: haskellish_user_src_suffixes = - haskellish_sig_suffixes ++ [ "hs", "lhs", "hs-boot", "lhs-boot" ] + haskellish_sig_suffixes ++ haskellish_boot_suffixes ++ [ "hs", "lhs" ] +haskellish_boot_suffixes = [ "hs-boot", "lhs-boot" ] haskellish_sig_suffixes = [ "hsig", "lhsig" ] backpackish_suffixes = [ "bkp" ] @@ -265,11 +267,12 @@ dynlib_suffixes platform = case platformOS platform of _ -> ["so"] isHaskellishSuffix, isBackpackishSuffix, isHaskellSrcSuffix, isCishSuffix, - isHaskellUserSrcSuffix, isJsSuffix, isHaskellSigSuffix + isHaskellUserSrcSuffix, isJsSuffix, isHaskellSigSuffix, isHaskellBootSuffix :: String -> Bool isHaskellishSuffix s = s `elem` haskellish_suffixes isBackpackishSuffix s = s `elem` backpackish_suffixes isHaskellSigSuffix s = s `elem` haskellish_sig_suffixes +isHaskellBootSuffix s = s `elem` haskellish_boot_suffixes isHaskellSrcSuffix s = s `elem` haskellish_src_suffixes isCishSuffix s = s `elem` cish_suffixes isJsSuffix s = s `elem` js_suffixes ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -734,7 +734,7 @@ runHscPhase pipe_env hsc_env0 input_fn src_flavour = do mod <- do let home_unit = hsc_home_unit hsc_env let fc = hsc_FC hsc_env - addHomeModuleToFinder fc home_unit (GWIB mod_name (hscSourceToIsBoot src_flavour)) location + addHomeModuleToFinder fc home_unit mod_name location src_flavour -- Make the ModSummary to hand to hscMain let @@ -777,24 +777,18 @@ mkOneShotModLocation :: PipeEnv -> DynFlags -> HscSource -> ModuleName -> IO Mod mkOneShotModLocation pipe_env dflags src_flavour mod_name = do let PipeEnv{ src_basename=basename, src_suffix=suff } = pipe_env - let location1 = mkHomeModLocation2 fopts mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf suff) - - -- Boot-ify it if necessary - let location2 - | HsBootFile <- src_flavour = addBootSuffixLocnOut location1 - | otherwise = location1 - + let location1 = mkHomeModLocation fopts mod_name (unsafeEncodeUtf basename) (unsafeEncodeUtf suff) src_flavour -- Take -ohi into account if present -- This can't be done in mkHomeModuleLocation because -- it only applies to the module being compiles let ohi = outputHi dflags - location3 | Just fn <- ohi = location2{ ml_hi_file_ospath = unsafeEncodeUtf fn } - | otherwise = location2 + location2 | Just fn <- ohi = location1{ ml_hi_file_ospath = unsafeEncodeUtf fn } + | otherwise = location1 let dynohi = dynOutputHi dflags - location4 | Just fn <- dynohi = location3{ ml_dyn_hi_file_ospath = unsafeEncodeUtf fn } - | otherwise = location3 + location3 | Just fn <- dynohi = location2{ ml_dyn_hi_file_ospath = unsafeEncodeUtf fn } + | otherwise = location2 -- Take -o into account if present -- Very like -ohi, but we must *only* do this if we aren't linking @@ -807,11 +801,11 @@ mkOneShotModLocation pipe_env dflags src_flavour mod_name = do location5 | Just ofile <- expl_o_file , let dyn_ofile = fromMaybe (ofile -<.> dynObjectSuf_ dflags) expl_dyn_o_file , isNoLink (ghcLink dflags) - = location4 { ml_obj_file_ospath = unsafeEncodeUtf ofile + = location3 { ml_obj_file_ospath = unsafeEncodeUtf ofile , ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } | Just dyn_ofile <- expl_dyn_o_file - = location4 { ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } - | otherwise = location4 + = location3 { ml_dyn_obj_file_ospath = unsafeEncodeUtf dyn_ofile } + | otherwise = location3 return location5 where fopts = initFinderOpts dflags ===================================== compiler/GHC/Iface/Load.hs ===================================== @@ -896,9 +896,9 @@ findAndReadIface hsc_env doc_str mod wanted_mod hi_boot_file = do else do let fopts = initFinderOpts dflags -- Look for the file - mb_found <- liftIO (findExactModule fc fopts other_fopts unit_state mhome_unit mod) + mb_found <- liftIO (findExactModule fc fopts other_fopts unit_state mhome_unit mod hi_boot_file) case mb_found of - InstalledFound (addBootSuffixLocn_maybe hi_boot_file -> loc) mod -> do + InstalledFound loc -> do -- See Note [Home module load error] case mhome_unit of Just home_unit ===================================== compiler/GHC/StgToCmm/Prim.hs ===================================== @@ -2713,7 +2713,7 @@ doShuffleOp ty (v1:v2:idxs) res -> emitAssign (CmmLocal res) (CmmMachOp (mo is) [v1,v2]) | otherwise -> pprPanic "doShuffleOp" $ - vcat [ text "shuffle indices must be literals, 0 <= i <" <+> ppr len ] + vcat [ text "shuffle indices must be literals, 0 <= i <" <+> ppr (2 * len) ] | otherwise = pprPanic "doShuffleOp" $ vcat [ text "non-vector argument type:" <+> ppr ty ] ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -569,6 +569,7 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted , eaql_arg_ty = sc_arg_ty , eaql_larg = larg@(L arg_loc rn_expr) , eaql_tc_fun = tc_head + , eaql_fun_ue = head_ue , eaql_args = inst_args , eaql_encl = arg_influences_enclosing_call , eaql_res_rho = app_res_rho }) @@ -578,7 +579,8 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted ; traceTc "tcEValArgQL {" (vcat [ text "app_res_rho:" <+> ppr app_res_rho , text "exp_arg_ty:" <+> ppr exp_arg_ty - , text "args:" <+> ppr inst_args ]) + , text "args:" <+> ppr inst_args + , text "mult:" <+> ppr mult]) ; ds_flag <- getDeepSubsumptionFlag ; (wrap, arg') @@ -587,6 +589,9 @@ tcValArg _ (EValArgQL { eaql_wanted = wanted do { -- Emit saved-up constraints, /under/ the tcSkolemise -- See (QLA4) in Note [Quick Look at value arguments] emitConstraints wanted + -- Emit saved-up usages /under/ the tcScalingUsage. + -- See (QLA5) in Note [Quick Look at value arguments] + ; tcEmitBindingUsage head_ue -- Unify with context if we have not already done so -- See (QLA4) in Note [Quick Look at value arguments] @@ -1630,6 +1635,41 @@ This turned out to be more subtle than I expected. Wrinkles: (kappa = [forall a. a->a]). Now we resume typechecking argument [], and we must take advantage of what we have now discovered about `kappa`, to typecheck [] :: [forall a. a->a] + +(QLA5) In the quicklook pass, we don't scale multiplicities. Since arguments + aren't typechecked yet, we don't know their free variable usages + anyway. But, in a nested call, the head of an application chain is fully + typechecked. + + In order for the multiplicities in the head to be properly scaled, we store + the head's usage environment in the eaql_fun_ue field. Then, when we do the + full-typechecking pass, we can emit the head's usage environment where we + would have typechecked the head in a naive algorithm. + +(QLA6) `quickLookArg` is supposed to capture the result of partially typechecking + the argument, so it can be resumed later. "Capturing" should include all + generated type-class/equality constraints and Linear-Haskell usage info. There + are two calls in `quickLookArg1` that might generate such constraints: + + - `tcInferAppHead_maybe`. This can generat Linear-Haskell usage info, via + the call to `tcEmitBindingUsage` in `check_local_id`, which is called + indirectly by `tcInferAppHead_maybe`. + + In contrast, `tcInferAppHead_maybe` does not generate any type-class or + equality constraints, because it doesn't instantiate any functions. [But + see #25493 and #25494 for why this isn't quite true today.] + + - `tcInstFun` generates lots of type-class and equality constraints, as it + instantiates the function. But it generates no usage info, because that + comes only from the call to `check_local_id`, whose usage info is captured + in the call to `tcInferAppHead_maybe` in `quickLookArg1`. + + Conclusion: in quickLookArg1: + - capture usage information (but not constraints) + for the call to `tcInferAppHead_maybe` + - capture constraints (but not usage information) + for the call to `tcInstFun` + -} quickLookArg :: QLFlag -> AppCtxt @@ -1697,7 +1737,12 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) do { ((rn_fun, fun_ctxt), rn_args) <- splitHsApps arg -- Step 1: get the type of the head of the argument - ; mb_fun_ty <- tcInferAppHead_maybe rn_fun + ; (fun_ue, mb_fun_ty) <- tcCollectingUsage $ tcInferAppHead_maybe rn_fun + -- tcCollectingUsage: the use of an Id at the head generates usage-info + -- See the call to `tcEmitBindingUsage` in `check_local_id`. So we must + -- capture and save it in the `EValArgQL`. See (QLA6) in + -- Note [Quick Look at value arguments] + ; traceTc "quickLookArg {" $ vcat [ text "arg:" <+> ppr arg , text "orig_arg_rho:" <+> ppr orig_arg_rho @@ -1714,6 +1759,9 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) ; ((inst_args, app_res_rho), wanted) <- captureConstraints $ tcInstFun do_ql True tc_head fun_sigma rn_args + -- We must capture type-class and equality constraints here, but + -- not equality constraints. See (QLA6) in Note [Quick Look at + -- value arguments] ; traceTc "quickLookArg 2" $ vcat [ text "arg:" <+> ppr arg @@ -1746,6 +1794,7 @@ quickLookArg1 ctxt larg@(L _ arg) sc_arg_ty@(Scaled _ orig_arg_rho) , eaql_arg_ty = sc_arg_ty , eaql_larg = larg , eaql_tc_fun = tc_head + , eaql_fun_ue = fun_ue , eaql_args = inst_args , eaql_wanted = wanted , eaql_encl = arg_influences_enclosing_call ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -57,7 +57,7 @@ import GHC.Tc.Zonk.TcType import GHC.Core.FamInstEnv ( FamInstEnvs ) -import GHC.Core.UsageEnv ( singleUsageUE ) +import GHC.Core.UsageEnv ( singleUsageUE, UsageEnv ) import GHC.Core.PatSyn( PatSyn, patSynName ) import GHC.Core.ConLike( ConLike(..) ) import GHC.Core.DataCon @@ -178,6 +178,7 @@ data HsExprArg (p :: TcPass) where -- See Note [HsExprArg] , eaql_larg :: LHsExpr GhcRn -- Original application, for -- location and error msgs , eaql_tc_fun :: (HsExpr GhcTc, AppCtxt) -- Typechecked head + , eaql_fun_ue :: UsageEnv -- Usage environment of the typechecked head (QLA5) , eaql_args :: [HsExprArg 'TcpInst] -- Args: instantiated, not typechecked , eaql_wanted :: WantedConstraints , eaql_encl :: Bool -- True <=> we have already qlUnified ===================================== compiler/GHC/Tc/Utils/Monad.hs ===================================== @@ -1412,7 +1412,7 @@ tcCollectingUsage thing_inside tcScalingUsage :: Mult -> TcM a -> TcM a tcScalingUsage mult thing_inside = do { (usage, result) <- tcCollectingUsage thing_inside - ; traceTc "tcScalingUsage" (ppr mult) + ; traceTc "tcScalingUsage" $ vcat [ppr mult, ppr usage] ; tcEmitBindingUsage $ scaleUE mult usage ; return result } ===================================== compiler/GHC/Unit/Finder.hs ===================================== @@ -15,6 +15,7 @@ module GHC.Unit.Finder ( FinderCache(..), initFinderCache, findImportedModule, + findImportedModuleWithIsBoot, findPluginModule, findExactModule, findHomeModule, @@ -55,6 +56,7 @@ import GHC.Utils.Panic import GHC.Linker.Types import GHC.Types.PkgQual +import GHC.Types.SourceFile import GHC.Fingerprint import Data.IORef @@ -103,28 +105,28 @@ InstalledNotFound. initFinderCache :: IO FinderCache initFinderCache = do - mod_cache <- newIORef emptyInstalledModuleWithIsBootEnv + mod_cache <- newIORef emptyInstalledModuleEnv file_cache <- newIORef M.empty let flushFinderCaches :: UnitEnv -> IO () flushFinderCaches ue = do - atomicModifyIORef' mod_cache $ \fm -> (filterInstalledModuleWithIsBootEnv is_ext fm, ()) + atomicModifyIORef' mod_cache $ \fm -> (filterInstalledModuleEnv is_ext fm, ()) atomicModifyIORef' file_cache $ \_ -> (M.empty, ()) where - is_ext mod _ = not (isUnitEnvInstalledModule ue (gwib_mod mod)) + is_ext mod _ = not (isUnitEnvInstalledModule ue mod) - addToFinderCache :: InstalledModuleWithIsBoot -> InstalledFindResult -> IO () + addToFinderCache :: InstalledModule -> InstalledFindResult -> IO () addToFinderCache key val = atomicModifyIORef' mod_cache $ \c -> - case (lookupInstalledModuleWithIsBootEnv c key, val) of + case (lookupInstalledModuleEnv c key, val) of -- Don't overwrite an InstalledFound with an InstalledNotFound -- See [Note Monotonic addToFinderCache] (Just InstalledFound{}, InstalledNotFound{}) -> (c, ()) - _ -> (extendInstalledModuleWithIsBootEnv c key val, ()) + _ -> (extendInstalledModuleEnv c key val, ()) - lookupFinderCache :: InstalledModuleWithIsBoot -> IO (Maybe InstalledFindResult) + lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult) lookupFinderCache key = do c <- readIORef mod_cache - return $! lookupInstalledModuleWithIsBootEnv c key + return $! lookupInstalledModuleEnv c key lookupFileCache :: FilePath -> IO Fingerprint lookupFileCache key = do @@ -156,6 +158,13 @@ findImportedModule hsc_env mod pkg_qual = in do findImportedModuleNoHsc fc fopts (hsc_unit_env hsc_env) mhome_unit mod pkg_qual +findImportedModuleWithIsBoot :: HscEnv -> ModuleName -> IsBootInterface -> PkgQual -> IO FindResult +findImportedModuleWithIsBoot hsc_env mod is_boot pkg_qual = do + res <- findImportedModule hsc_env mod pkg_qual + case (res, is_boot) of + (Found loc mod, IsBoot) -> return (Found (addBootSuffixLocn loc) mod) + _ -> return res + findImportedModuleNoHsc :: FinderCache -> FinderOpts @@ -228,15 +237,19 @@ findPluginModule fc fopts units Nothing mod_name = -- reading the interface for a module mentioned by another interface, -- for example (a "system import"). -findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IO InstalledFindResult -findExactModule fc fopts other_fopts unit_state mhome_unit mod = do - case mhome_unit of +findExactModule :: FinderCache -> FinderOpts -> UnitEnvGraph FinderOpts -> UnitState -> Maybe HomeUnit -> InstalledModule -> IsBootInterface -> IO InstalledFindResult +findExactModule fc fopts other_fopts unit_state mhome_unit mod is_boot = do + res <- case mhome_unit of Just home_unit | isHomeInstalledModule home_unit mod -> findInstalledHomeModule fc fopts (homeUnitId home_unit) (moduleName mod) | Just home_fopts <- unitEnv_lookup_maybe (moduleUnit mod) other_fopts -> findInstalledHomeModule fc home_fopts (moduleUnit mod) (moduleName mod) _ -> findPackageModule fc unit_state fopts mod + case (res, is_boot) of + (InstalledFound loc, IsBoot) -> return (InstalledFound (addBootSuffixLocn loc)) + _ -> return res + -- ----------------------------------------------------------------------------- -- Helpers @@ -274,7 +287,7 @@ orIfNotFound this or_this = do homeSearchCache :: FinderCache -> UnitId -> ModuleName -> IO InstalledFindResult -> IO InstalledFindResult homeSearchCache fc home_unit mod_name do_this = do let mod = mkModule home_unit mod_name - modLocationCache fc (notBoot mod) do_this + modLocationCache fc mod do_this findExposedPackageModule :: FinderCache -> FinderOpts -> UnitState -> ModuleName -> PkgQual -> IO FindResult findExposedPackageModule fc fopts units mod_name mb_pkg = @@ -296,7 +309,7 @@ findLookupResult fc fopts r = case r of -- with just the location of the thing that was -- instantiated; you probably also need all of the -- implicit locations from the instances - InstalledFound loc _ -> return (Found loc m) + InstalledFound loc -> return (Found loc m) InstalledNoPackage _ -> return (NoPackage (moduleUnit m)) InstalledNotFound fp _ -> return (NotFound{ fr_paths = fmap unsafeDecodeUtf fp, fr_pkg = Just (moduleUnit m) , fr_pkgs_hidden = [] @@ -331,7 +344,7 @@ findLookupResult fc fopts r = case r of , fr_unusables = [] , fr_suggestions = suggest' }) -modLocationCache :: FinderCache -> InstalledModuleWithIsBoot -> IO InstalledFindResult -> IO InstalledFindResult +modLocationCache :: FinderCache -> InstalledModule -> IO InstalledFindResult -> IO InstalledFindResult modLocationCache fc mod do_this = do m <- lookupFinderCache fc mod case m of @@ -341,17 +354,19 @@ modLocationCache fc mod do_this = do addToFinderCache fc mod result return result -addModuleToFinder :: FinderCache -> ModuleWithIsBoot -> ModLocation -> IO () -addModuleToFinder fc mod loc = do - let imod = fmap toUnitId <$> mod - addToFinderCache fc imod (InstalledFound loc (gwib_mod imod)) +addModuleToFinder :: FinderCache -> Module -> ModLocation -> HscSource -> IO () +addModuleToFinder fc mod loc src_flavour = do + let imod = toUnitId <$> mod + unless (src_flavour == HsBootFile) $ + addToFinderCache fc imod (InstalledFound loc) -- This returns a module because it's more convenient for users -addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleNameWithIsBoot -> ModLocation -> IO Module -addHomeModuleToFinder fc home_unit mod_name loc = do - let mod = mkHomeInstalledModule home_unit <$> mod_name - addToFinderCache fc mod (InstalledFound loc (gwib_mod mod)) - return (mkHomeModule home_unit (gwib_mod mod_name)) +addHomeModuleToFinder :: FinderCache -> HomeUnit -> ModuleName -> ModLocation -> HscSource -> IO Module +addHomeModuleToFinder fc home_unit mod_name loc src_flavour = do + let mod = mkHomeInstalledModule home_unit mod_name + unless (src_flavour == HsBootFile) $ + addToFinderCache fc mod (InstalledFound loc) + return (mkHomeModule home_unit mod_name) -- ----------------------------------------------------------------------------- -- The internal workers @@ -361,7 +376,7 @@ findHomeModule fc fopts home_unit mod_name = do let uid = homeUnitAsUnit home_unit r <- findInstalledHomeModule fc fopts (homeUnitId home_unit) mod_name return $ case r of - InstalledFound loc _ -> Found loc (mkHomeModule home_unit mod_name) + InstalledFound loc -> Found loc (mkHomeModule home_unit mod_name) InstalledNoPackage _ -> NoPackage uid -- impossible InstalledNotFound fps _ -> NotFound { fr_paths = fmap unsafeDecodeUtf fps, @@ -386,7 +401,7 @@ findHomePackageModule fc fopts home_unit mod_name = do let uid = RealUnit (Definite home_unit) r <- findInstalledHomeModule fc fopts home_unit mod_name return $ case r of - InstalledFound loc _ -> Found loc (mkModule uid mod_name) + InstalledFound loc -> Found loc (mkModule uid mod_name) InstalledNoPackage _ -> NoPackage uid -- impossible InstalledNotFound fps _ -> NotFound { fr_paths = fmap unsafeDecodeUtf fps, @@ -456,7 +471,7 @@ findInstalledHomeModule fc fopts home_unit mod_name = do -- This is important only when compiling the base package (where GHC.Prim -- is a home module). if mod `installedModuleEq` gHC_PRIM - then return (InstalledFound (error "GHC.Prim ModLocation") mod) + then return (InstalledFound (error "GHC.Prim ModLocation")) else searchPathExts search_dirs mod exts -- | Prepend the working directory to the search path. @@ -485,11 +500,11 @@ findPackageModule_ :: FinderCache -> FinderOpts -> InstalledModule -> UnitInfo - findPackageModule_ fc fopts mod pkg_conf = do massertPpr (moduleUnit mod == unitId pkg_conf) (ppr (moduleUnit mod) <+> ppr (unitId pkg_conf)) - modLocationCache fc (notBoot mod) $ + modLocationCache fc mod $ -- special case for GHC.Prim; we won't find it in the filesystem. if mod `installedModuleEq` gHC_PRIM - then return (InstalledFound (error "GHC.Prim ModLocation") mod) + then return (InstalledFound (error "GHC.Prim ModLocation")) else let @@ -513,7 +528,7 @@ findPackageModule_ fc fopts mod pkg_conf = do -- don't bother looking for it. let basename = unsafeEncodeUtf $ moduleNameSlashes (moduleName mod) loc = mk_hi_loc one basename - in return $ InstalledFound loc mod + in return $ InstalledFound loc _otherwise -> searchPathExts import_dirs mod [(package_hisuf, mk_hi_loc)] @@ -547,7 +562,7 @@ searchPathExts paths mod exts = search to_search search ((file, loc) : rest) = do b <- doesFileExist file if b - then return $ InstalledFound loc mod + then return $ InstalledFound loc else search rest mkHomeModLocationSearched :: FinderOpts -> ModuleName -> FileExt @@ -589,10 +604,12 @@ mkHomeModLocationSearched fopts mod suff path basename = -- ext -- The filename extension of the source file (usually "hs" or "lhs"). -mkHomeModLocation :: FinderOpts -> ModuleName -> OsPath -> ModLocation -mkHomeModLocation dflags mod src_filename = - let (basename,extension) = OsPath.splitExtension src_filename - in mkHomeModLocation2 dflags mod basename extension +mkHomeModLocation :: FinderOpts -> ModuleName -> OsPath -> FileExt -> HscSource -> ModLocation +mkHomeModLocation dflags mod src_basename ext hsc_src = + let loc = mkHomeModLocation2 dflags mod src_basename ext + in case hsc_src of + HsBootFile -> addBootSuffixLocnOut loc + _ -> loc mkHomeModLocation2 :: FinderOpts -> ModuleName ===================================== compiler/GHC/Unit/Finder/Types.hs ===================================== @@ -30,9 +30,9 @@ data FinderCache = FinderCache { flushFinderCaches :: UnitEnv -> IO () -- ^ remove all the home modules from the cache; package modules are -- assumed to not move around during a session; also flush the file hash -- cache. - , addToFinderCache :: InstalledModuleWithIsBoot -> InstalledFindResult -> IO () + , addToFinderCache :: InstalledModule -> InstalledFindResult -> IO () -- ^ Add a found location to the cache for the module. - , lookupFinderCache :: InstalledModuleWithIsBoot -> IO (Maybe InstalledFindResult) + , lookupFinderCache :: InstalledModule -> IO (Maybe InstalledFindResult) -- ^ Look for a location in the cache. , lookupFileCache :: FilePath -> IO Fingerprint -- ^ Look for the hash of a file in the cache. This should add it to the @@ -40,7 +40,7 @@ data FinderCache = FinderCache { flushFinderCaches :: UnitEnv -> IO () } data InstalledFindResult - = InstalledFound ModLocation InstalledModule + = InstalledFound ModLocation | InstalledNoPackage UnitId | InstalledNotFound [OsPath] (Maybe UnitId) ===================================== compiler/GHC/Unit/Module/Env.hs ===================================== @@ -33,17 +33,6 @@ module GHC.Unit.Module.Env , mergeInstalledModuleEnv , plusInstalledModuleEnv , installedModuleEnvElts - - -- * InstalledModuleWithIsBootEnv - , InstalledModuleWithIsBootEnv - , emptyInstalledModuleWithIsBootEnv - , lookupInstalledModuleWithIsBootEnv - , extendInstalledModuleWithIsBootEnv - , filterInstalledModuleWithIsBootEnv - , delInstalledModuleWithIsBootEnv - , mergeInstalledModuleWithIsBootEnv - , plusInstalledModuleWithIsBootEnv - , installedModuleWithIsBootEnvElts ) where @@ -294,56 +283,3 @@ plusInstalledModuleEnv :: (elt -> elt -> elt) plusInstalledModuleEnv f (InstalledModuleEnv xm) (InstalledModuleEnv ym) = InstalledModuleEnv $ Map.unionWith f xm ym - - --------------------------------------------------------------------- --- InstalledModuleWithIsBootEnv --------------------------------------------------------------------- - --- | A map keyed off of 'InstalledModuleWithIsBoot' -newtype InstalledModuleWithIsBootEnv elt = InstalledModuleWithIsBootEnv (Map InstalledModuleWithIsBoot elt) - -instance Outputable elt => Outputable (InstalledModuleWithIsBootEnv elt) where - ppr (InstalledModuleWithIsBootEnv env) = ppr env - - -emptyInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -emptyInstalledModuleWithIsBootEnv = InstalledModuleWithIsBootEnv Map.empty - -lookupInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> Maybe a -lookupInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m = Map.lookup m e - -extendInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> a -> InstalledModuleWithIsBootEnv a -extendInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m x = InstalledModuleWithIsBootEnv (Map.insert m x e) - -filterInstalledModuleWithIsBootEnv :: (InstalledModuleWithIsBoot -> a -> Bool) -> InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBootEnv a -filterInstalledModuleWithIsBootEnv f (InstalledModuleWithIsBootEnv e) = - InstalledModuleWithIsBootEnv (Map.filterWithKey f e) - -delInstalledModuleWithIsBootEnv :: InstalledModuleWithIsBootEnv a -> InstalledModuleWithIsBoot -> InstalledModuleWithIsBootEnv a -delInstalledModuleWithIsBootEnv (InstalledModuleWithIsBootEnv e) m = InstalledModuleWithIsBootEnv (Map.delete m e) - -installedModuleWithIsBootEnvElts :: InstalledModuleWithIsBootEnv a -> [(InstalledModuleWithIsBoot, a)] -installedModuleWithIsBootEnvElts (InstalledModuleWithIsBootEnv e) = Map.assocs e - -mergeInstalledModuleWithIsBootEnv - :: (elta -> eltb -> Maybe eltc) - -> (InstalledModuleWithIsBootEnv elta -> InstalledModuleWithIsBootEnv eltc) -- map X - -> (InstalledModuleWithIsBootEnv eltb -> InstalledModuleWithIsBootEnv eltc) -- map Y - -> InstalledModuleWithIsBootEnv elta - -> InstalledModuleWithIsBootEnv eltb - -> InstalledModuleWithIsBootEnv eltc -mergeInstalledModuleWithIsBootEnv f g h (InstalledModuleWithIsBootEnv xm) (InstalledModuleWithIsBootEnv ym) - = InstalledModuleWithIsBootEnv $ Map.mergeWithKey - (\_ x y -> (x `f` y)) - (coerce g) - (coerce h) - xm ym - -plusInstalledModuleWithIsBootEnv :: (elt -> elt -> elt) - -> InstalledModuleWithIsBootEnv elt - -> InstalledModuleWithIsBootEnv elt - -> InstalledModuleWithIsBootEnv elt -plusInstalledModuleWithIsBootEnv f (InstalledModuleWithIsBootEnv xm) (InstalledModuleWithIsBootEnv ym) = - InstalledModuleWithIsBootEnv $ Map.unionWith f xm ym - ===================================== compiler/GHC/Unit/Module/Location.hs ===================================== @@ -13,8 +13,6 @@ module GHC.Unit.Module.Location ) , pattern ModLocation , addBootSuffix - , addBootSuffix_maybe - , addBootSuffixLocn_maybe , addBootSuffixLocn , addBootSuffixLocnOut , removeBootSuffix @@ -25,7 +23,6 @@ where import GHC.Prelude import GHC.Data.OsPath -import GHC.Unit.Types import GHC.Types.SrcLoc import GHC.Utils.Outputable import GHC.Data.FastString (mkFastString) @@ -99,26 +96,10 @@ removeBootSuffix pathWithBootSuffix = Just path -> path Nothing -> error "removeBootSuffix: no -boot suffix" --- | Add the @-boot@ suffix if the @Bool@ argument is @True@ -addBootSuffix_maybe :: IsBootInterface -> OsPath -> OsPath -addBootSuffix_maybe is_boot path = case is_boot of - IsBoot -> addBootSuffix path - NotBoot -> path - -addBootSuffixLocn_maybe :: IsBootInterface -> ModLocation -> ModLocation -addBootSuffixLocn_maybe is_boot locn = case is_boot of - IsBoot -> addBootSuffixLocn locn - _ -> locn - -- | Add the @-boot@ suffix to all file paths associated with the module addBootSuffixLocn :: ModLocation -> ModLocation addBootSuffixLocn locn - = locn { ml_hs_file_ospath = fmap addBootSuffix (ml_hs_file_ospath locn) - , ml_hi_file_ospath = addBootSuffix (ml_hi_file_ospath locn) - , ml_dyn_hi_file_ospath = addBootSuffix (ml_dyn_hi_file_ospath locn) - , ml_obj_file_ospath = addBootSuffix (ml_obj_file_ospath locn) - , ml_dyn_obj_file_ospath = addBootSuffix (ml_dyn_obj_file_ospath locn) - , ml_hie_file_ospath = addBootSuffix (ml_hie_file_ospath locn) } + = addBootSuffixLocnOut locn { ml_hs_file_ospath = fmap addBootSuffix (ml_hs_file_ospath locn) } -- | Add the @-boot@ suffix to all output file paths associated with the -- module, not including the input file itself ===================================== compiler/GHC/Unit/Types.hs ===================================== @@ -84,8 +84,6 @@ module GHC.Unit.Types , GenWithIsBoot (..) , ModuleNameWithIsBoot , ModuleWithIsBoot - , InstalledModuleWithIsBoot - , notBoot ) where @@ -720,8 +718,6 @@ type ModuleNameWithIsBoot = GenWithIsBoot ModuleName type ModuleWithIsBoot = GenWithIsBoot Module -type InstalledModuleWithIsBoot = GenWithIsBoot InstalledModule - instance Binary a => Binary (GenWithIsBoot a) where put_ bh (GWIB { gwib_mod, gwib_isBoot }) = do put_ bh gwib_mod @@ -735,6 +731,3 @@ instance Outputable a => Outputable (GenWithIsBoot a) where ppr (GWIB { gwib_mod, gwib_isBoot }) = hsep $ ppr gwib_mod : case gwib_isBoot of IsBoot -> [ text "{-# SOURCE #-}" ] NotBoot -> [] - -notBoot :: mod -> GenWithIsBoot mod -notBoot gwib_mod = GWIB {gwib_mod, gwib_isBoot = NotBoot} ===================================== libraries/ghc-internal/src/GHC/Internal/Exception.hs ===================================== @@ -8,6 +8,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ViewPatterns #-} {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- @@ -52,7 +53,7 @@ module GHC.Internal.Exception , ratioZeroDenomException , underflowException -- ** 'ErrorCall' - , ErrorCall(..) + , ErrorCall(.., ErrorCallWithLocation) , errorCallException , errorCallWithCallStackException , toExceptionWithBacktrace @@ -178,7 +179,11 @@ data ErrorCall = ErrorCall String , Ord -- ^ @since base-4.7.0.0 ) -{-# COMPLETE ErrorCall #-} +{-# DEPRECATED ErrorCallWithLocation "ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively." #-} +pattern ErrorCallWithLocation :: String -> String -> ErrorCall +pattern ErrorCallWithLocation err loc <- ErrorCall ((\err -> (err, error "ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively.")) -> (err, loc)) + where ErrorCallWithLocation err _ = ErrorCall err +{-# COMPLETE ErrorCallWithLocation #-} -- | @since base-4.0.0.0 instance Exception ErrorCall ===================================== testsuite/tests/linear/should_fail/LinearConfusedDollar.stderr ===================================== @@ -1,3 +1,7 @@ +LinearConfusedDollar.hs:12:3: error: [GHC-18872] + • Couldn't match type ‘Many’ with ‘One’ + arising from multiplicity of ‘x’ + • In an equation for ‘g’: g x = f $ x LinearConfusedDollar.hs:12:7: error: [GHC-83865] • Couldn't match type ‘One’ with ‘Many’ @@ -6,3 +10,4 @@ LinearConfusedDollar.hs:12:7: error: [GHC-83865] • In the first argument of ‘($)’, namely ‘f’ In the expression: f $ x In an equation for ‘g’: g x = f $ x + ===================================== testsuite/tests/linear/should_fail/T25185.hs ===================================== @@ -0,0 +1,10 @@ +{-# LANGUAGE LinearTypes #-} +{-# LANGUAGE ImpredicativeTypes #-} + +module T25185 where + +f :: Int -> Int +f x = x + +g :: Int %1 -> Int +g y = f y ===================================== testsuite/tests/linear/should_fail/T25185.stderr ===================================== @@ -0,0 +1,5 @@ +T25185.hs:10:3: error: [GHC-18872] + • Couldn't match type ‘Many’ with ‘One’ + arising from multiplicity of ‘y’ + • In an equation for ‘g’: g y = f y + ===================================== testsuite/tests/linear/should_fail/all.T ===================================== @@ -53,3 +53,4 @@ test('LinearLet9', normal, compile_fail, ['']) test('LinearLet10', normal, compile_fail, ['']) test('T25081', normal, compile_fail, ['']) test('T24961', normal, compile_fail, ['']) +test('T25185', normal, compile_fail, ['']) ===================================== testsuite/tests/simd/should_run/T25486.hs ===================================== @@ -0,0 +1,48 @@ +{-# LANGUAGE MagicHash, UnboxedTuples #-} + +module Main where + +import GHC.Exts +import GHC.IO +import Data.Array.Base +import Data.Array.IO.Internals +import Control.Monad +import Foreign.Marshal.Array + +writeFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatX4OffAddr# addr i v s, () #) + +writeAsFloatX4OffAddr :: Ptr Float -> Int -> FloatX4# -> IO () +writeAsFloatX4OffAddr (Ptr addr) (I# i) v = + IO $ \s -> (# writeFloatOffAddrAsFloatX4# addr i v s, () #) + +writeFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatX4Array# mba i# v s, () #) + +writeAsFloatX4 :: IOUArray Int Float -> Int -> FloatX4# -> IO () +writeAsFloatX4 (IOUArray (STUArray l _ _ mba)) i v = case i - l of + I# i# -> IO $ \s -> (# writeFloatArrayAsFloatX4# mba i# v s, () #) + +main :: IO () +main = do + let v = packFloatX4# (# 0.1#, 1.1#, 2.2#, 3.3# #) + + xs <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print xs + + ys <- withArray ([0..15] :: [Float]) $ \ptr -> do + writeAsFloatX4OffAddr ptr 2 v + peekArray 16 ptr + print ys + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeFloatX4 ma 1 v + print =<< getElems ma + + ma <- newListArray (0, 9) ([0..9] :: [Float]) + writeAsFloatX4 ma 1 v + print =<< getElems ma ===================================== testsuite/tests/simd/should_run/T25486.stdout ===================================== @@ -0,0 +1,4 @@ +[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,0.1,1.1,2.2,3.3,12.0,13.0,14.0,15.0] +[0.0,1.0,0.1,1.1,2.2,3.3,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0] +[0.0,1.0,2.0,3.0,0.1,1.1,2.2,3.3,8.0,9.0] +[0.0,0.1,1.1,2.2,3.3,5.0,6.0,7.0,8.0,9.0] ===================================== testsuite/tests/simd/should_run/all.T ===================================== @@ -90,3 +90,4 @@ test('T25062_V64' test('T25169', [], compile_and_run, ['']) test('T25455', [], compile_and_run, ['']) +test('T25486', [], compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/70e19389cde8b1e8a87402b908a78ff889fca56f...bfeb8ab24a8280e6f4c4fa8d0bf9cb1f39ad5c0f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/70e19389cde8b1e8a87402b908a78ff889fca56f...bfeb8ab24a8280e6f4c4fa8d0bf9cb1f39ad5c0f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 18:24:36 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Thu, 21 Nov 2024 13:24:36 -0500 Subject: [Git][ghc/ghc][wip/alpine-i386] 4 commits: gitlab-ci: Bump ci-images Message-ID: <673f7ae441817_3306fa155be495975@gitlab.mail> Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC Commits: 2c73ddf0 by Ben Gamari at 2024-11-21T13:24:15-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 991207c3 by Ben Gamari at 2024-11-21T13:24:18-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Julian and Mikolaj. - - - - - 2c8899b3 by Ben Gamari at 2024-11-21T13:24:18-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 7ebbd0fd by Ben Gamari at 2024-11-21T13:24:18-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 4 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - rts/Linker.c Changes: ===================================== .gitlab-ci.yml ===================================== @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: efc1ab81236eb37e20cb287ec77aebb6c6341098 + DOCKER_REV: eb4d3389fd62e4f7321a0c8799014ec1f4da0708 # Sequential version number of all cached things. # Bump to invalidate GitLab CI cache. ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -415,6 +415,13 @@ type Variables = MonoidalMap String [String] (=:) :: String -> String -> Variables a =: b = MonoidalMap (Map.singleton a [b]) +type TestName = String + +brokenTest :: TestName -- ^ test name + -> String -- ^ explanation of breakage + -> Variables +brokenTest test _why = "BROKEN_TESTS" =: test + opsysVariables :: Arch -> Opsys -> Variables opsysVariables _ FreeBSD13 = mconcat [ -- N.B. we use iconv from ports as I see linker errors when we attempt @@ -463,13 +470,16 @@ alpineVariables arch = mconcat $ [ -- Due to #20266 "CONFIGURE_ARGS" =: "--disable-ld-override" , "INSTALL_CONFIGURE_ARGS" =: "--disable-ld-override" - -- encoding004: due to lack of locale support - -- T10458, ghcilink002: due to #17869 - , "BROKEN_TESTS" =: "encoding004 T10458" + , brokenTest "encoding004" "due to lack of locale support" + , brokenTest "T10458" "#17869" + ] ++ + [ mconcat [ brokenTest test "#25498" | test <- ["simd009", "T25062_V16", "T25169", "T22187_run"] ] + | I386 <- [arch] ] ++ + [ brokenTest "T22033" "#25497" | I386 <- [arch] ] ++ [-- Bootstrap compiler has incorrectly configured target triple #25200 "CONFIGURE_ARGS" =: "--enable-ignore-build-platform-mismatch --build=aarch64-unknown-linux --host=aarch64-unknown-linux --target=aarch64-unknown-linux" - | AArch64 <- [arch] + | AArch64 <- [arch] ] @@ -479,7 +489,7 @@ distroVariables arch Alpine318 = alpineVariables arch distroVariables arch Alpine320 = alpineVariables arch distroVariables _ Centos7 = mconcat [ "HADRIAN_ARGS" =: "--docs=no-sphinx" - , "BROKEN_TESTS" =: "T22012" -- due to #23979 + , brokenTest "T22012" "#23979" ] distroVariables _ Fedora33 = mconcat -- LLC/OPT do not work for some reason in our fedora images @@ -1138,6 +1148,7 @@ alpine_x86 = -- Dynamically linked build, suitable for building your own static executables on alpine , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken vanilla)) , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine320) (splitSectionsBroken vanilla)) + , allowFailureGroup (standardBuildsWithConfig I386 (Linux Alpine320) (splitSectionsBroken vanilla)) ] where -- ghcilink002 broken due to #17869 ===================================== .gitlab/jobs.yaml ===================================== @@ -315,6 +315,69 @@ "TEST_ENV": "aarch64-linux-deb12-validate+llvm" } }, + "i386-linux-alpine3_20-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "2 weeks", + "paths": [ + "ghc-i386-linux-alpine3_20-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bi386-linux-alpine3_20-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "validate", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-validate" + } + }, "i386-linux-deb10-validate": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -759,6 +822,70 @@ "XZ_OPT": "-9" } }, + "nightly-i386-linux-alpine3_20-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "8 weeks", + "paths": [ + "ghc-i386-linux-alpine3_20-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "validate", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-validate", + "XZ_OPT": "-9" + } + }, "nightly-i386-linux-deb10-validate": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -3450,6 +3577,72 @@ "XZ_OPT": "-9" } }, + "release-i386-linux-alpine3_20-release+no_split_sections": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "1 year", + "paths": [ + "ghc-i386-linux-alpine3_20-release+no_split_sections.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-release+no_split_sections", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "release+no_split_sections", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "HADRIAN_ARGS": "--hash-unit-ids", + "IGNORE_PERF_FAILURES": "all", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-release+no_split_sections", + "XZ_OPT": "-9" + } + }, "release-i386-linux-deb10-release+no_split_sections": { "after_script": [ ".gitlab/ci.sh save_cache", ===================================== rts/Linker.c ===================================== @@ -821,6 +821,13 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymTy NULL); } +#if defined(OBJFORMAT_ELF) + // Resolve references to the GOT if we know the origin object + if (dependent && strncmp(lbl, "_GLOBAL_OFFSET_TABLE_", 21) == 0) { + return dependent->info->got_start; + } +#endif + if (!ghciLookupSymbolInfo(symhash, lbl, &pinfo)) { IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl)); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8901e89a99e7ed9008029c1a4d13f44aee7be554...7ebbd0fdf42261869d74887873bb067015adbbb5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8901e89a99e7ed9008029c1a4d13f44aee7be554...7ebbd0fdf42261869d74887873bb067015adbbb5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 18:29:19 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Thu, 21 Nov 2024 13:29:19 -0500 Subject: [Git][ghc/ghc][wip/alpine-i386] 3 commits: gitlab-ci: Add release job for i386/Alpine Message-ID: <673f7bff7cc2_3306fa167efc965c9@gitlab.mail> Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC Commits: 2ee248a2 by Ben Gamari at 2024-11-21T13:28:39-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 1e4a63db by Ben Gamari at 2024-11-21T13:29:07-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - a518af63 by Ben Gamari at 2024-11-21T13:29:07-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 3 changed files: - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - rts/Linker.c Changes: ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -415,6 +415,13 @@ type Variables = MonoidalMap String [String] (=:) :: String -> String -> Variables a =: b = MonoidalMap (Map.singleton a [b]) +type TestName = String + +brokenTest :: TestName -- ^ test name + -> String -- ^ explanation of breakage + -> Variables +brokenTest test _why = "BROKEN_TESTS" =: test + opsysVariables :: Arch -> Opsys -> Variables opsysVariables _ FreeBSD13 = mconcat [ -- N.B. we use iconv from ports as I see linker errors when we attempt @@ -463,13 +470,16 @@ alpineVariables arch = mconcat $ [ -- Due to #20266 "CONFIGURE_ARGS" =: "--disable-ld-override" , "INSTALL_CONFIGURE_ARGS" =: "--disable-ld-override" - -- encoding004: due to lack of locale support - -- T10458, ghcilink002: due to #17869 - , "BROKEN_TESTS" =: "encoding004 T10458" + , brokenTest "encoding004" "due to lack of locale support" + , brokenTest "T10458" "#17869" + ] ++ + [ mconcat [ brokenTest test "#25498" | test <- ["simd009", "T25062_V16", "T25169", "T22187_run"] ] + | I386 <- [arch] ] ++ + [ brokenTest "T22033" "#25497" | I386 <- [arch] ] ++ [-- Bootstrap compiler has incorrectly configured target triple #25200 "CONFIGURE_ARGS" =: "--enable-ignore-build-platform-mismatch --build=aarch64-unknown-linux --host=aarch64-unknown-linux --target=aarch64-unknown-linux" - | AArch64 <- [arch] + | AArch64 <- [arch] ] @@ -479,7 +489,7 @@ distroVariables arch Alpine318 = alpineVariables arch distroVariables arch Alpine320 = alpineVariables arch distroVariables _ Centos7 = mconcat [ "HADRIAN_ARGS" =: "--docs=no-sphinx" - , "BROKEN_TESTS" =: "T22012" -- due to #23979 + , brokenTest "T22012" "#23979" ] distroVariables _ Fedora33 = mconcat -- LLC/OPT do not work for some reason in our fedora images @@ -1138,6 +1148,7 @@ alpine_x86 = -- Dynamically linked build, suitable for building your own static executables on alpine , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken vanilla)) , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine320) (splitSectionsBroken vanilla)) + , allowFailureGroup (standardBuildsWithConfig I386 (Linux Alpine320) (splitSectionsBroken vanilla)) ] where -- ghcilink002 broken due to #17869 ===================================== .gitlab/jobs.yaml ===================================== @@ -315,6 +315,69 @@ "TEST_ENV": "aarch64-linux-deb12-validate+llvm" } }, + "i386-linux-alpine3_20-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "2 weeks", + "paths": [ + "ghc-i386-linux-alpine3_20-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bi386-linux-alpine3_20-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "validate", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-validate" + } + }, "i386-linux-deb10-validate": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -759,6 +822,70 @@ "XZ_OPT": "-9" } }, + "nightly-i386-linux-alpine3_20-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "8 weeks", + "paths": [ + "ghc-i386-linux-alpine3_20-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "validate", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-validate", + "XZ_OPT": "-9" + } + }, "nightly-i386-linux-deb10-validate": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -3450,6 +3577,72 @@ "XZ_OPT": "-9" } }, + "release-i386-linux-alpine3_20-release+no_split_sections": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "1 year", + "paths": [ + "ghc-i386-linux-alpine3_20-release+no_split_sections.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-release+no_split_sections", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "release+no_split_sections", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "HADRIAN_ARGS": "--hash-unit-ids", + "IGNORE_PERF_FAILURES": "all", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-release+no_split_sections", + "XZ_OPT": "-9" + } + }, "release-i386-linux-deb10-release+no_split_sections": { "after_script": [ ".gitlab/ci.sh save_cache", ===================================== rts/Linker.c ===================================== @@ -821,6 +821,13 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymTy NULL); } +#if defined(OBJFORMAT_ELF) + // Resolve references to the GOT if we know the origin object + if (dependent && strncmp(lbl, "_GLOBAL_OFFSET_TABLE_", 21) == 0) { + return dependent->info->got_start; + } +#endif + if (!ghciLookupSymbolInfo(symhash, lbl, &pinfo)) { IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl)); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7ebbd0fdf42261869d74887873bb067015adbbb5...a518af6307e8dc9366d1341bb5669ff83bab8734 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7ebbd0fdf42261869d74887873bb067015adbbb5...a518af6307e8dc9366d1341bb5669ff83bab8734 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 18:34:07 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Thu, 21 Nov 2024 13:34:07 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] Deleted 1 commit: gitlab-ci: Enable Sphinx output on CentOS 7 Message-ID: <673f7d1fa531c_3306fa3f0c78971b2@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below. Deleted commits: 4c776e77 by Ben Gamari at 2024-11-20T23:17:45-05:00 gitlab-ci: Enable Sphinx output on CentOS 7 This is the last platform with Sphinx disabled. - - - - - 2 changed files: - .gitlab/gen_ci.hs - .gitlab/jobs.yaml Changes: ===================================== .gitlab/gen_ci.hs ===================================== @@ -448,7 +448,7 @@ distroVariables :: LinuxDistro -> Variables distroVariables Alpine312 = alpineVariables distroVariables Alpine318 = alpineVariables distroVariables Centos7 = mconcat [ - "HADRIAN_ARGS" =: "--docs=no-sphinx" + "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs" , "BROKEN_TESTS" =: "T22012" -- due to #23979 ] distroVariables Fedora33 = mconcat ===================================== .gitlab/jobs.yaml ===================================== @@ -1087,7 +1087,7 @@ "BROKEN_TESTS": "T22012", "BUILD_FLAVOUR": "validate", "CONFIGURE_ARGS": "", - "HADRIAN_ARGS": "--docs=no-sphinx", + "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "TEST_ENV": "x86_64-linux-centos7-validate", "XZ_OPT": "-9" } @@ -3087,7 +3087,7 @@ "BROKEN_TESTS": "T22012", "BUILD_FLAVOUR": "release+no_split_sections", "CONFIGURE_ARGS": "", - "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx", + "HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs", "IGNORE_PERF_FAILURES": "all", "TEST_ENV": "x86_64-linux-centos7-release+no_split_sections", "XZ_OPT": "-9" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c776e7727d48c9f05a233e6df42c86aba191e8f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4c776e7727d48c9f05a233e6df42c86aba191e8f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 19:08:41 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 21 Nov 2024 14:08:41 -0500 Subject: [Git][ghc/ghc][master] Fix CRLF in multiline strings (#25375) Message-ID: <673f8539a90b5_bbeebbc4307964f@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 6 changed files: - .gitattributes - compiler/GHC/Parser/String.hs - docs/users_guide/exts/multiline_strings.rst - + testsuite/tests/parser/should_run/T25375.hs - + testsuite/tests/parser/should_run/T25375.stdout - testsuite/tests/parser/should_run/all.T Changes: ===================================== .gitattributes ===================================== @@ -2,3 +2,4 @@ # don't convert anything on checkout * text=auto eol=lf mk/win32-tarballs.md5sum text=auto eol=LF +testsuite/tests/parser/should_run/T25375.hs text=auto eol=crlf ===================================== compiler/GHC/Parser/String.hs ===================================== @@ -261,6 +261,7 @@ lexMultilineString = lexStringWith processChars processChars processChars :: HasChar c => [c] -> Either (c, LexErr) [c] processChars = collapseGaps -- Step 1 + >>> normalizeEOL >>> expandLeadingTabs -- Step 3 >>> rmCommonWhitespacePrefix -- Step 4 >>> collapseOnlyWsLines -- Step 5 @@ -268,6 +269,19 @@ lexMultilineString = lexStringWith processChars processChars >>> rmLastNewline -- Step 7b >>> resolveEscapes -- Step 8 + -- Normalize line endings to LF. The spec dictates that lines should be + -- split on newline characters and rejoined with ``\n``. But because we + -- aren't actually splitting/rejoining, we'll manually normalize here + normalizeEOL :: HasChar c => [c] -> [c] + normalizeEOL = + let go = \case + Char '\r' : c@(Char '\n') : cs -> c : go cs + c@(Char '\r') : cs -> setChar '\n' c : go cs + c@(Char '\f') : cs -> setChar '\n' c : go cs + c : cs -> c : go cs + [] -> [] + in go + -- expands all tabs, since the lexer will verify that tabs can only appear -- as leading indentation expandLeadingTabs :: HasChar c => [c] -> [c] ===================================== docs/users_guide/exts/multiline_strings.rst ===================================== @@ -14,7 +14,9 @@ With this extension, GHC now recognizes multiline string literals with ``"""`` d Normal string literals are lexed, then string gaps are collapsed, then escape characters are resolved. Multiline string literals add the following post-processing steps between collapsing string gaps and resolving escape characters: -#. Split the string by newlines +#. Split the string by newline characters + + * Includes ``\r\n``, ``\r``, ``\n``, ``\f`` #. Replace leading tabs with spaces up to the next tab stop @@ -24,7 +26,9 @@ Normal string literals are lexed, then string gaps are collapsed, then escape ch #. Join the string back with ``\n`` delimiters -#. If the first character of the string is a newline, remove it +#. If the first character of the string is ``\n``, remove it + +#. If the last character of the string is ``\n``, remove it Examples ~~~~~~~~ ===================================== testsuite/tests/parser/should_run/T25375.hs ===================================== @@ -0,0 +1,38 @@ +{-# LANGUAGE MultilineStrings #-} + +str1 = unlines + [ "aaa" + , "bbb" + , "ccc" + ] + +str2 = "aaa\n\ + \bbb\n\ + \ccc\n" + +str3 = """ + aaa + bbb + ccc + """ + +str4 = """ + + aaa + bbb + ccc + + """ + +str5 = """ + aaa + bbb + ccc\n + """ + +main = do + print str1 + print str2 + print str3 + print str4 + print str5 ===================================== testsuite/tests/parser/should_run/T25375.stdout ===================================== @@ -0,0 +1,5 @@ +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" +"aaa\nbbb\nccc" +"\naaa\nbbb\nccc\n" +"aaa\nbbb\nccc\n" ===================================== testsuite/tests/parser/should_run/all.T ===================================== @@ -23,3 +23,4 @@ test('RecordDotSyntax5', normal, compile_and_run, ['']) test('ListTuplePunsConstraints', extra_files(['ListTuplePunsConstraints.hs']), ghci_script, ['ListTuplePunsConstraints.script']) test('MultilineStrings', normal, compile_and_run, ['']) test('MultilineStringsOverloaded', normal, compile_and_run, ['']) +test('T25375', normal, compile_and_run, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7bd407a67cd7810d3ff1e6d18885555175383a35 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7bd407a67cd7810d3ff1e6d18885555175383a35 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 19:09:24 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 21 Nov 2024 14:09:24 -0500 Subject: [Git][ghc/ghc][master] Improve reachability queries on ModuleGraph Message-ID: <673f85644c77d_bbeeb3c9b64826f4@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - 9 changed files: - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout Changes: ===================================== compiler/GHC/Data/Graph/Directed.hs ===================================== @@ -8,13 +8,14 @@ module GHC.Data.Graph.Directed ( Graph, graphFromEdgedVerticesOrd, graphFromEdgedVerticesUniq, - graphFromVerticesAndAdjacency, + graphFromVerticesAndAdjacency, emptyGraph, SCC(..), Node(..), G.flattenSCC, G.flattenSCCs, stronglyConnCompG, topologicalSortG, verticesG, edgesG, hasVertexG, - reachableG, reachablesG, transposeG, allReachable, allReachableCyclic, outgoingG, + reachablesG, + transposeG, outgoingG, emptyG, findCycle, @@ -43,7 +44,6 @@ module GHC.Data.Graph.Directed ( -- removed them since they were not used anywhere in GHC. ------------------------------------------------------------------------------ - import GHC.Prelude import GHC.Utils.Misc ( sortWith, count ) @@ -60,13 +60,13 @@ import qualified Data.Set as Set import qualified Data.Graph as G import Data.Graph ( Vertex, Bounds, SCC(..) ) -- Used in the underlying representation -import Data.Tree import GHC.Types.Unique import GHC.Types.Unique.FM -import qualified Data.IntMap as IM -import qualified Data.IntSet as IS -import qualified Data.Map as M -import qualified Data.Set as S + +-- The graph internals are defined in the .Internal module so they can be +-- imported by GHC.Data.Graph.Directed.Reachability while still allowing this +-- module to export it abstractly. +import GHC.Data.Graph.Directed.Internal {- ************************************************************************ @@ -86,14 +86,6 @@ Note [Nodes, keys, vertices] arranged densely in 0.n -} -data Graph node = Graph { - gr_int_graph :: IntGraph, - gr_vertex_to_node :: Vertex -> node, - gr_node_to_vertex :: node -> Maybe Vertex - } - -data Edge node = Edge node node - {-| Representation for nodes of the Graph. * The @payload@ is user data, just carried around in this module @@ -357,51 +349,22 @@ topologicalSortG :: Graph node -> [node] topologicalSortG graph = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.topSort" #-} G.topSort (gr_int_graph graph) -reachableG :: Graph node -> node -> [node] -reachableG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) - result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) [from_vertex] - outgoingG :: Graph node -> node -> [node] outgoingG graph from = map (gr_vertex_to_node graph) result - where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from) + where from_vertex = expectJust "outgoingG" (gr_node_to_vertex graph from) result = gr_int_graph graph ! from_vertex --- | Given a list of roots return all reachable nodes. +-- | Given a list of roots, return all reachable nodes in topological order. +-- Implemented using a depth-first traversal. reachablesG :: Graph node -> [node] -> [node] reachablesG graph froms = map (gr_vertex_to_node graph) result where result = {-# SCC "Digraph.reachable" #-} reachable (gr_int_graph graph) vs vs = [ v | Just v <- map (gr_node_to_vertex graph) froms ] --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Only works on acyclic input. -allReachable :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachable = all_reachable reachableGraph - --- | Efficiently construct a map which maps each key to it's set of transitive --- dependencies. Less efficient than @allReachable@, but works on cyclic input as well. -allReachableCyclic :: Ord key => Graph node -> (node -> key) -> M.Map key (S.Set key) -allReachableCyclic = all_reachable reachableGraphCyclic - -all_reachable :: Ord key => (IntGraph -> IM.IntMap IS.IntSet) -> Graph node -> (node -> key) -> M.Map key (S.Set key) -all_reachable int_reachables (Graph g from _) keyOf = - M.fromList [(k, IS.foldr (\v' vs -> keyOf (from v') `S.insert` vs) S.empty vs) - | (v, vs) <- IM.toList int_graph - , let k = keyOf (from v)] - where - int_graph = int_reachables g - hasVertexG :: Graph node -> node -> Bool hasVertexG graph node = isJust $ gr_node_to_vertex graph node -verticesG :: Graph node -> [node] -verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) - -edgesG :: Graph node -> [Edge node] -edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) - where v2n = gr_vertex_to_node graph - transposeG :: Graph node -> Graph node transposeG graph = Graph (G.transposeG (gr_int_graph graph)) (gr_vertex_to_node graph) @@ -410,112 +373,10 @@ transposeG graph = Graph (G.transposeG (gr_int_graph graph)) emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -{- -************************************************************************ -* * -* Showing Graphs -* * -************************************************************************ --} - -instance Outputable node => Outputable (Graph node) where - ppr graph = vcat [ - hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), - hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) - ] - -instance Outputable node => Outputable (Edge node) where - ppr (Edge from to) = ppr from <+> text "->" <+> ppr to - graphEmpty :: G.Graph -> Bool graphEmpty g = lo > hi where (lo, hi) = bounds g -{- -************************************************************************ -* * -* IntGraphs -* * -************************************************************************ --} - -type IntGraph = G.Graph - -{- ------------------------------------------------------------- --- Depth first search numbering ------------------------------------------------------------- --} - --- Data.Tree has flatten for Tree, but nothing for Forest -preorderF :: Forest a -> [a] -preorderF ts = concatMap flatten ts - -{- ------------------------------------------------------------- --- Finding reachable vertices ------------------------------------------------------------- --} - --- This generalizes reachable which was found in Data.Graph -reachable :: IntGraph -> [Vertex] -> [Vertex] -reachable g vs = preorderF (G.dfs g vs) - -reachableGraph :: IntGraph -> IM.IntMap IS.IntSet -reachableGraph g = res - where - do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup res) (g ! v)) - res = IM.fromList [(v, do_one v) | v <- G.vertices g] - -scc :: IntGraph -> [SCC Vertex] -scc graph = map decode forest - where - forest = {-# SCC "Digraph.scc" #-} G.scc graph - - decode (Node v []) | mentions_itself v = CyclicSCC [v] - | otherwise = AcyclicSCC v - decode other = CyclicSCC (dec other []) - where dec (Node v ts) vs = v : foldr dec vs ts - mentions_itself v = v `elem` (graph ! v) - -reachableGraphCyclic :: IntGraph -> IM.IntMap IS.IntSet -reachableGraphCyclic g = foldl' add_one_comp mempty comps - where - neighboursOf v = g!v - - comps = scc g - - -- To avoid divergence on cyclic input, we build the result - -- strongly connected component by component, in topological - -- order. For each SCC, we know that: - -- - -- * All vertices in the component can reach all other vertices - -- in the component ("local" reachables) - -- - -- * Other reachable vertices ("remote" reachables) must come - -- from earlier components, either via direct neighbourhood, or - -- transitively from earlier reachability map - -- - -- This allows us to build the extension of the reachability map - -- directly, without any self-reference, thereby avoiding a loop. - add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet - add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier - where - earlier_neighbours = neighboursOf v - earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours - all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) - add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier - where - all_locals = IS.fromList vs - local v = IS.delete v all_locals - -- Arguably, for a cyclic SCC we should include each - -- vertex in its own reachable set. However, this could - -- lead to a lot of extra pain in client code to avoid - -- looping when traversing the reachability map. - all_neighbours = IS.fromList (concatMap neighboursOf vs) - earlier_neighbours = all_neighbours IS.\\ all_locals - earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) - all_remotes = IS.unions (earlier_neighbours : earlier_further) {- ************************************************************************ @@ -623,3 +484,4 @@ graphFromVerticesAndAdjacency vertices edges = Graph graph vertex_node (key_vert expectJust "graphFromVerticesAndAdjacency" $ key_vertex b) reduced_edges = map key_vertex_pair edges graph = G.buildG bounds reduced_edges + ===================================== compiler/GHC/Data/Graph/Directed/Internal.hs ===================================== @@ -0,0 +1,79 @@ +module GHC.Data.Graph.Directed.Internal where + +import GHC.Prelude +import GHC.Utils.Outputable + +import Data.Array +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) -- Used in the underlying representation +import Data.Tree + +data Graph node = Graph { + gr_int_graph :: IntGraph, + gr_vertex_to_node :: Vertex -> node, + gr_node_to_vertex :: node -> Maybe Vertex +} + +data Edge node = Edge node node + +------------------------------------------------------------ +-- Nodes and Edges +------------------------------------------------------------ + +verticesG :: Graph node -> [node] +verticesG graph = map (gr_vertex_to_node graph) $ G.vertices (gr_int_graph graph) + +edgesG :: Graph node -> [Edge node] +edgesG graph = map (\(v1, v2) -> Edge (v2n v1) (v2n v2)) $ G.edges (gr_int_graph graph) + where v2n = gr_vertex_to_node graph + +------------------------------------------------------------ +-- Showing Graphs +------------------------------------------------------------ + +instance Outputable node => Outputable (Graph node) where + ppr graph = vcat [ + hang (text "Vertices:") 2 (vcat (map ppr $ verticesG graph)), + hang (text "Edges:") 2 (vcat (map ppr $ edgesG graph)) + ] + +instance Outputable node => Outputable (Edge node) where + ppr (Edge from to) = ppr from <+> text "->" <+> ppr to + +{- +************************************************************************ +* * +* IntGraphs +* * +************************************************************************ +-} + +type IntGraph = G.Graph + +------------------------------------------------------------ +-- Depth first search numbering +------------------------------------------------------------ + +-- Data.Tree has flatten for Tree, but nothing for Forest +preorderF :: Forest a -> [a] +preorderF ts = concatMap flatten ts + +------------------------------------------------------------ +-- Finding reachable vertices +------------------------------------------------------------ + +-- This generalizes reachable which was found in Data.Graph +reachable :: IntGraph -> [Vertex] -> [Vertex] +reachable g vs = preorderF (G.dfs g vs) + +scc :: IntGraph -> [SCC Vertex] +scc graph = map decode forest + where + forest = {-# SCC "Digraph.scc" #-} G.scc graph + + decode (Node v []) | mentions_itself v = CyclicSCC [v] + | otherwise = AcyclicSCC v + decode other = CyclicSCC (dec other []) + where dec (Node v ts) vs = v : foldr dec vs ts + mentions_itself v = v `elem` (graph ! v) + ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -0,0 +1,168 @@ +-- | An abstract interface for a fast reachability data structure constructed +-- from a 'GHC.Data.Graph.Directed' graph. +module GHC.Data.Graph.Directed.Reachability + ( ReachabilityIndex + + -- * Constructing a reachability index + , graphReachability, cyclicGraphReachability + + -- * Reachability queries + , allReachable, allReachableMany + , isReachable, isReachableMany + ) + where + +import GHC.Prelude +import GHC.Data.Maybe + +import qualified Data.Graph as G +import Data.Graph ( Vertex, SCC(..) ) + +import Data.Array ((!)) +import qualified Data.IntMap as IM +import qualified Data.IntSet as IS + +import GHC.Data.Graph.Directed.Internal + +-------------------------------------------------------------------------------- +-- * Reachability index +-------------------------------------------------------------------------------- + +-- | The abstract data structure for fast reachability queries +data ReachabilityIndex node = ReachabilityIndex { + index :: IM.IntMap IS.IntSet, + from_vertex :: Vertex -> node, + to_vertex :: node -> Maybe Vertex +} + +-------------------------------------------------------------------------------- +-- * Construction +-------------------------------------------------------------------------------- + +-- | Construct a 'ReachabilityIndex' from an acyclic 'Graph'. +-- If the graph can have cycles, use 'cyclicGraphReachability' +graphReachability :: Graph node -> ReachabilityIndex node +graphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraph, from_vertex = from, to_vertex = to} + where + reachableGraph :: IM.IntMap IS.IntSet + reachableGraph = IM.fromList [(v, do_one v) | v <- G.vertices g] + + do_one v = IS.unions (IS.fromList (g ! v) : mapMaybe (flip IM.lookup reachableGraph) (g ! v)) + +-- | Construct a 'ReachabilityIndex' from a 'Graph' which may have cycles. +cyclicGraphReachability :: Graph node -> ReachabilityIndex node +cyclicGraphReachability (Graph g from to) = + ReachabilityIndex{index = reachableGraphCyclic, from_vertex = from, to_vertex = to} + where + reachableGraphCyclic :: IM.IntMap IS.IntSet + reachableGraphCyclic = foldl' add_one_comp mempty comps + + neighboursOf v = g!v + + comps = scc g + + -- To avoid divergence on cyclic input, we build the result + -- strongly connected component by component, in topological + -- order. For each SCC, we know that: + -- + -- * All vertices in the component can reach all other vertices + -- in the component ("local" reachables) + -- + -- * Other reachable vertices ("remote" reachables) must come + -- from earlier components, either via direct neighbourhood, or + -- transitively from earlier reachability map + -- + -- This allows us to build the extension of the reachability map + -- directly, without any self-reference, thereby avoiding a loop. + add_one_comp :: IM.IntMap IS.IntSet -> SCC Vertex -> IM.IntMap IS.IntSet + add_one_comp earlier (AcyclicSCC v) = IM.insert v all_remotes earlier + where + earlier_neighbours = neighboursOf v + earlier_further = mapMaybe (flip IM.lookup earlier) earlier_neighbours + all_remotes = IS.unions (IS.fromList earlier_neighbours : earlier_further) + add_one_comp earlier (CyclicSCC vs) = IM.union (IM.fromList [(v, local v `IS.union` all_remotes) | v <- vs]) earlier + where + all_locals = IS.fromList vs + local v = IS.delete v all_locals + -- Arguably, for a cyclic SCC we should include each + -- vertex in its own reachable set. However, this could + -- lead to a lot of extra pain in client code to avoid + -- looping when traversing the reachability map. + all_neighbours = IS.fromList (concatMap neighboursOf vs) + earlier_neighbours = all_neighbours IS.\\ all_locals + earlier_further = mapMaybe (flip IM.lookup earlier) (IS.toList earlier_neighbours) + all_remotes = IS.unions (earlier_neighbours : earlier_further) + +-------------------------------------------------------------------------------- +-- * Reachability queries +-------------------------------------------------------------------------------- + +-- | 'allReachable' returns the nodes reachable from the given @root@ node. +-- +-- Properties: +-- * The list of nodes /does not/ include the @root@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(1)$ complexity. +-- +-- If you need a topologically sorted list, consider using the functions exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead. +allReachable :: ReachabilityIndex node -> node {-^ The @root@ node -} -> [node] {-^ All nodes reachable from @root@ -} +allReachable (ReachabilityIndex index from to) root = map from result + where root_i = expectJust "reachableFrom" (to root) + hits = {-# SCC "allReachable" #-} IM.lookup root_i index + result = IS.toList $! expectJust "reachableFrom" hits + +-- | 'allReachableMany' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes /does not/ include the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableMany :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = {-# SCC "allReachableMany" #-} + IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i + +-- | Fast reachability query. +-- +-- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ +-- asks whether @b@ can be reached through @g@ starting from @a at . +-- +-- Properties: +-- * No self loops, i.e. @isReachable _ a a == False@ +-- * This function has $O(1)$ complexity. +isReachable :: ReachabilityIndex node {-^ @g@ -} + -> node -- ^ @a@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +isReachable (ReachabilityIndex index _ to) a b = + IS.member b_i $ + expectJust "reachable" $ IM.lookup a_i index + where a_i = expectJust "reachable:node not in graph" $ to a + b_i = expectJust "reachable:node not in graph" $ to b + +-- | Fast reachability query with many roots. +-- +-- On graph @g@ with many nodes @roots@ and node @b@, @isReachableMany g as b@ +-- asks whether @b@ can be reached through @g@ from any of the @roots at . +-- +-- Properties: +-- * No self loops, i.e. @isReachableMany _ [a] a == False@ +-- * This function is $O(n)$ in the number of roots +isReachableMany :: ReachabilityIndex node -- ^ @g@ + -> [node] -- ^ @roots@ + -> node -- ^ @b@ + -> Bool -- ^ @b@ is reachable from any of the @roots@ +isReachableMany (ReachabilityIndex index _ to) roots b = + IS.member b_i $ + IS.unions $ + map (expectJust "reachablesQuery" . flip IM.lookup index) roots_i + where roots_i = [ v | Just v <- map to roots ] + b_i = expectJust "reachablesQuery:node not in graph" $ to b + ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -7,6 +7,7 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE BlockArguments #-} +{-# LANGUAGE ViewPatterns #-} -- ----------------------------------------------------------------------------- -- @@ -149,6 +150,7 @@ import GHC.Types.Unique import GHC.Iface.Errors.Types import qualified GHC.Data.Word64Set as W +import GHC.Data.Graph.Directed.Reachability -- ----------------------------------------------------------------------------- -- Loading the program @@ -610,20 +612,20 @@ createBuildPlan mod_graph maybe_top_mod = mresolved_cycle = collapseSCC (topSortWithBoot nodes) in acyclic ++ [either UnresolvedCycle ResolvedCycle mresolved_cycle] ++ toBuildPlan sccs [] - (mg, lookup_node) = moduleGraphNodes False (mgModSummaries' mod_graph) - trans_deps_map = allReachable mg (mkNodeKey . node_payload) -- Compute the intermediate modules between a file and its hs-boot file. -- See Step 2a in Note [Upsweep] boot_path mn uid = - map (summaryNodeSummary . expectJust "toNode" . lookup_node) $ Set.toList $ + Set.toList $ -- Don't include the boot module itself - Set.delete (NodeKey_Module (key IsBoot)) $ + Set.filter ((/= NodeKey_Module (key IsBoot)) . mkNodeKey) $ -- Keep intermediate dependencies: as per Step 2a in Note [Upsweep], these are -- the transitive dependencies of the non-boot file which transitively depend -- on the boot file. - Set.filter (\nk -> nodeKeyUnitId nk == uid -- Cheap test - && (NodeKey_Module (key IsBoot)) `Set.member` expectJust "dep_on_boot" (M.lookup nk trans_deps_map)) $ - expectJust "not_boot_dep" (M.lookup (NodeKey_Module (key NotBoot)) trans_deps_map) + Set.filter (\(mkNodeKey -> nk) -> + nodeKeyUnitId nk == uid -- Cheap test + && mgQuery mod_graph nk (NodeKey_Module (key IsBoot))) $ + Set.fromList $ + expectJust "not_boot_dep" (mgReachable mod_graph (NodeKey_Module (key NotBoot))) where key ib = ModNodeKeyWithUid (GWIB mn ib) uid @@ -1497,7 +1499,7 @@ topSortModules drop_hs_boot_nodes summaries mb_root_mod = node | otherwise = throwGhcException (ProgramError "module does not exist") - in graphFromEdgedVerticesUniq (seq root (reachableG graph root)) + in graphFromEdgedVerticesUniq (seq root (root:allReachable (graphReachability graph) root)) newtype ModNodeMap a = ModNodeMap { unModNodeMap :: Map.Map ModNodeKey a } deriving (Functor, Traversable, Foldable) @@ -1821,20 +1823,15 @@ checkHomeUnitsClosed ue | otherwise = [singleMessage $ mkPlainErrorMsgEnvelope rootLoc $ DriverHomePackagesNotClosed (Set.toList bad_unit_ids)] where home_id_set = unitEnv_keys $ ue_home_unit_graph ue - bad_unit_ids = upwards_closure Set.\\ home_id_set + bad_unit_ids = upwards_closure Set.\\ home_id_set {- Remove all home units reached, keep only bad nodes -} rootLoc = mkGeneralSrcSpan (fsLit "") - graph :: Graph (Node UnitId UnitId) - graph = graphFromEdgedVerticesUniq graphNodes + downwards_closure :: Graph (Node UnitId UnitId) + downwards_closure = graphFromEdgedVerticesUniq graphNodes - -- downwards closure of graph - downwards_closure - = graphFromEdgedVerticesUniq [ DigraphNode uid uid (Set.toList deps) - | (uid, deps) <- M.toList (allReachable graph node_key)] + inverse_closure = graphReachability $ transposeG downwards_closure - inverse_closure = transposeG downwards_closure - - upwards_closure = Set.fromList $ map node_key $ reachablesG inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] + upwards_closure = Set.fromList $ map node_key $ allReachableMany inverse_closure [DigraphNode uid uid [] | uid <- Set.toList home_id_set] all_unit_direct_deps :: UniqMap UnitId (Set.Set UnitId) all_unit_direct_deps ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -51,7 +51,6 @@ import Control.Monad import Control.Applicative import qualified Data.Set as Set -import qualified Data.Map as M import Data.List (isSuffixOf) import System.FilePath @@ -166,16 +165,16 @@ get_link_deps opts pls maybe_normal_osuf span mods = do make_deps_loop found@(found_units, found_mods) (nk:nexts) | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts | otherwise = - case M.lookup (NodeKey_Module nk) (mgTransDeps mod_graph) of - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) trans_deps - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- Set.toList trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - Nothing -> + case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of + Nothing -> let (ModNodeKeyWithUid _ uid) = nk in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts + Just trans_deps -> + let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) + -- See #936 and the ghci.prog007 test for why we have to continue traversing through + -- boot modules. + todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] + in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -18,11 +18,12 @@ module GHC.Unit.Module.Graph , mgModSummaries , mgModSummaries' , mgLookupModule - , mgTransDeps , showModMsg , moduleGraphNodeModule , moduleGraphNodeModSum , moduleGraphModulesBelow + , mgReachable + , mgQuery , moduleGraphNodes , SummaryNode @@ -49,6 +50,7 @@ import qualified GHC.LanguageExtensions as LangExt import GHC.Data.Maybe import GHC.Data.Graph.Directed +import GHC.Data.Graph.Directed.Reachability import GHC.Driver.Backend import GHC.Driver.DynFlags @@ -72,6 +74,7 @@ import Data.Bifunctor import Data.Function import Data.List (sort) import GHC.Data.List.SetOps +import GHC.Stack -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -153,7 +156,7 @@ instance Outputable ModNodeKeyWithUid where -- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] - , mg_trans_deps :: Map.Map NodeKey (Set.Set NodeKey) + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -173,12 +176,11 @@ unionMG a b = let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b in ModuleGraph { mg_mss = new_mss - , mg_trans_deps = mkTransDeps new_mss + , mg_graph = mkTransDeps new_mss } - -mgTransDeps :: ModuleGraph -> Map.Map NodeKey (Set.Set NodeKey) -mgTransDeps = mg_trans_deps +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -199,7 +201,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] Map.empty +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -212,14 +214,9 @@ isTemplateHaskellOrQQNonBoot ms = extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph extendMG ModuleGraph{..} deps ms = ModuleGraph { mg_mss = ModuleNode deps ms : mg_mss - , mg_trans_deps = mkTransDeps (ModuleNode deps ms : mg_mss) + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) } -mkTransDeps :: [ModuleGraphNode] -> Map.Map NodeKey (Set.Set NodeKey) -mkTransDeps mss = - let (gg, _lookup_node) = moduleGraphNodes False mss - in allReachable gg (mkNodeKey . node_payload) - extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph extendMGInst mg uid depUnitId = mg { mg_mss = InstantiationNode uid depUnitId : mg_mss mg @@ -394,12 +391,9 @@ type ModNodeKey = ModuleNameWithIsBoot -- boot module and the non-boot module can be reached, it only returns the -- non-boot one. moduleGraphModulesBelow :: ModuleGraph -> UnitId -> ModuleNameWithIsBoot -> Set ModNodeKeyWithUid -moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- modules_below] +moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- modules_below ] where - td_map = mgTransDeps mg - - modules_below = maybe [] Set.toList $ Map.lookup (NodeKey_Module (ModNodeKeyWithUid mn uid)) td_map - + modules_below = maybe [] (map mkNodeKey) (mgReachable mg (NodeKey_Module (ModNodeKeyWithUid mn uid))) filtered_mods = Set.fromDistinctAscList . filter_mods . sort -- IsBoot and NotBoot modules are necessarily consecutive in the sorted list @@ -415,3 +409,22 @@ moduleGraphModulesBelow mg uid mn = filtered_mods $ [ mn | NodeKey_Module mn <- in r' : filter_mods rs | otherwise -> r1 : filter_mods (r2:rs) rs -> rs + +mgReachable :: HasCallStack => ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk + +-- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in +-- graph @g@? +-- INVARIANT: Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb + ===================================== compiler/ghc.cabal.in ===================================== @@ -444,6 +444,8 @@ Library GHC.Data.Graph.Color GHC.Data.Graph.Collapse GHC.Data.Graph.Directed + GHC.Data.Graph.Directed.Internal + GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.Inductive.Graph GHC.Data.Graph.Inductive.PatriciaTree GHC.Data.Graph.Ops ===================================== testsuite/tests/count-deps/CountDepsAst.stdout ===================================== @@ -66,6 +66,7 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -67,6 +67,8 @@ GHC.Data.FastString.Env GHC.Data.FiniteMap GHC.Data.FlatBag GHC.Data.Graph.Directed +GHC.Data.Graph.Directed.Internal +GHC.Data.Graph.Directed.Reachability GHC.Data.Graph.UnVar GHC.Data.List.Infinite GHC.Data.List.SetOps View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7575709b7de56daf01f1b6e59dd63ebc53266aef -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7575709b7de56daf01f1b6e59dd63ebc53266aef You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 19:09:55 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Thu, 21 Nov 2024 14:09:55 -0500 Subject: [Git][ghc/ghc][wip/linker-fixes] 2 commits: rts/linker: Fix out-of-bounds mapping logic Message-ID: <673f8583178ed_bbeeb36c8c48566d@gitlab.mail> Ben Gamari pushed to branch wip/linker-fixes at Glasgow Haskell Compiler / GHC Commits: c0ab3ac7 by Ben Gamari at 2024-11-21T14:09:45-05:00 rts/linker: Fix out-of-bounds mapping logic Previously the structure of `mmapInRegion` concealed a subtle bug concerning handling of `mmap` returning mappings below the beginning of the desired region. Specifically, we would reset `p = result + bytes` and then again reset `p = region->start` before looping around for another iteration. This resulted in an infinite loop on FreeBSD. Fixes #25492. - - - - - 2ecfccff by Ben Gamari at 2024-11-21T14:09:45-05:00 rts/linker: Clarify debug output - - - - - 2 changed files: - rts/Linker.c - rts/linker/MMap.c Changes: ===================================== rts/Linker.c ===================================== @@ -1118,7 +1118,7 @@ freePreloadObjectFile (ObjectCode *oc) */ void freeObjectCode (ObjectCode *oc) { - IF_DEBUG(linker, ocDebugBelch(oc, "start\n")); + IF_DEBUG(linker, ocDebugBelch(oc, "freeObjectCode: start\n")); // Run finalizers if (oc->type == STATIC_OBJECT && ===================================== rts/linker/MMap.c ===================================== @@ -345,12 +345,7 @@ mmapInRegion ( if (result == NULL) { // The mapping failed return NULL; - } else if (result < region->start) { - // Uh oh, we assume that mmap() will only give us a - // an address at or after the requested address. - // Try again. - p = (uint8_t *) result + bytes; - } else if (result < region->end) { + } else if (result >= region->start && result < region->end) { // Success! region->last = (uint8_t *) result + bytes; return result; @@ -358,17 +353,23 @@ mmapInRegion ( // We failed to find a suitable mapping munmap(result, bytes); reportMemoryMap(); - errorBelch("mmapForLinker: failed to mmap() memory below 2Gb; " + errorBelch("mmapForLinker: failed to mmap() memory between %p and %p; " "asked for %zu bytes at %p. " "Try specifying an address with +RTS -xm -RTS", - bytes, p); + region->start, region->end, bytes, p); return NULL; - } + } else if (result < region->start) { + // Uh oh, we assume that mmap() will only give us a + // an address at or after the requested address. + // Try bump forward by a bit and try again. + p = (uint8_t *) p + bytes; + } else if (result >= region->end) { + // mmap() gave us too high an address; wrap around and try again + wrapped = true; + p = region->start; + } - // mmap() gave us too high an address; wrap around and try again munmap(result, bytes); - wrapped = true; - p = region->start; } } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/acb1982db98821ef54022cc140ca9f4b3ef1bf66...2ecfccffcd39fc724997bebb45c4bab86c28790a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/acb1982db98821ef54022cc140ca9f4b3ef1bf66...2ecfccffcd39fc724997bebb45c4bab86c28790a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 21 19:10:10 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 21 Nov 2024 14:10:10 -0500 Subject: [Git][ghc/ghc][master] driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code Message-ID: <673f85923f8b7_bbeebbc4f8863d@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 14 changed files: - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/StgToCmm/Config.hs - compiler/GHC/StgToCmm/Hpc.hs - compiler/GHC/Unit/Module/ModGuts.hs - + testsuite/tests/bytecode/T25510/Makefile - + testsuite/tests/bytecode/T25510/T25510A.hs - + testsuite/tests/bytecode/T25510/T25510B.hs - + testsuite/tests/bytecode/T25510/all.T - testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs Changes: ===================================== compiler/GHC/Driver/Config/StgToCmm.hs ===================================== @@ -38,7 +38,6 @@ initStgToCmmConfig dflags mod = StgToCmmConfig -- flags , stgToCmmLoopification = gopt Opt_Loopification dflags , stgToCmmAlignCheck = gopt Opt_AlignmentSanitisation dflags - , stgToCmmOptHpc = gopt Opt_Hpc dflags , stgToCmmFastPAPCalls = gopt Opt_FastPAPCalls dflags , stgToCmmSCCProfiling = sccProfilingEnabled dflags , stgToCmmEagerBlackHole = gopt Opt_EagerBlackHoling dflags ===================================== compiler/GHC/Driver/Hooks.hs ===================================== @@ -48,7 +48,6 @@ import GHC.Types.Basic import GHC.Types.CostCentre import GHC.Types.IPE import GHC.Types.Meta -import GHC.Types.HpcInfo import GHC.Unit.Module import GHC.Unit.Module.ModSummary @@ -149,7 +148,7 @@ data Hooks = Hooks -> IO (Either Type (HValue, [Linkable], PkgsLoaded)))) , createIservProcessHook :: !(Maybe (CreateProcess -> IO ProcessHandle)) , stgToCmmHook :: !(Maybe (StgToCmmConfig -> InfoTableProvMap -> [TyCon] -> CollectedCCs - -> [CgStgTopBinding] -> HpcInfo -> CgStream CmmGroup ModuleLFInfos)) + -> [CgStgTopBinding] -> CgStream CmmGroup ModuleLFInfos)) , cmmToRawCmmHook :: !(forall a . Maybe (DynFlags -> Maybe Module -> CgStream CmmGroupSRTs a -> IO (CgStream RawCmmGroup a))) } ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -248,7 +248,6 @@ import GHC.Types.Name.Cache ( initNameCache ) import GHC.Types.Name.Reader import GHC.Types.Name.Ppr import GHC.Types.TyThing -import GHC.Types.HpcInfo import GHC.Types.Unique.Supply (uniqFromTag) import GHC.Types.Unique.Set @@ -1980,7 +1979,6 @@ hscGenHardCode hsc_env cgguts location output_filename = do cg_foreign = foreign_stubs0, cg_foreign_files = foreign_files, cg_dep_pkgs = dependencies, - cg_hpc_info = hpc_info, cg_spt_entries = spt_entries, cg_binds = late_binds, cg_ccs = late_local_ccs @@ -2084,7 +2082,7 @@ hscGenHardCode hsc_env cgguts location output_filename = do cmms <- {-# SCC "StgToCmm" #-} doCodeGen hsc_env this_mod denv data_tycons cost_centre_info - stg_binds hpc_info + stg_binds ------------------ Code output ----------------------- rawcmms0 <- {-# SCC "cmmToRawCmm" #-} @@ -2291,13 +2289,12 @@ This reduces residency towards the end of the CodeGen phase significantly doCodeGen :: HscEnv -> Module -> InfoTableProvMap -> [TyCon] -> CollectedCCs -> [CgStgTopBinding] -- ^ Bindings come already annotated with fvs - -> HpcInfo -> IO (CgStream CmmGroupSRTs CmmCgInfos) -- Note we produce a 'Stream' of CmmGroups, so that the -- backend can be run incrementally. Otherwise it generates all -- the C-- up front, which has a significant space cost. doCodeGen hsc_env this_mod denv data_tycons - cost_centre_info stg_binds_w_fvs hpc_info = do + cost_centre_info stg_binds_w_fvs = do let dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env hooks = hsc_hooks hsc_env @@ -2308,14 +2305,14 @@ doCodeGen hsc_env this_mod denv data_tycons putDumpFileMaybe logger Opt_D_dump_stg_final "Final STG:" FormatSTG (pprGenStgTopBindings stg_ppr_opts stg_binds_w_fvs) - let stg_to_cmm dflags mod a b c d e = case stgToCmmHook hooks of - Nothing -> StgToCmm.codeGen logger tmpfs (initStgToCmmConfig dflags mod) a b c d e - Just h -> (,emptyDetUFM) <$> h (initStgToCmmConfig dflags mod) a b c d e + let stg_to_cmm dflags mod a b c d = case stgToCmmHook hooks of + Nothing -> StgToCmm.codeGen logger tmpfs (initStgToCmmConfig dflags mod) a b c d + Just h -> (,emptyDetUFM) <$> h (initStgToCmmConfig dflags mod) a b c d let cmm_stream :: CgStream CmmGroup (ModuleLFInfos, DetUniqFM) -- See Note [Forcing of stg_binds] cmm_stream = stg_binds_w_fvs `seqList` {-# SCC "StgToCmm" #-} - stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs hpc_info + stg_to_cmm dflags this_mod denv data_tycons cost_centre_info stg_binds_w_fvs -- codegen consumes a stream of CmmGroup, and produces a new -- stream of CmmGroup (not necessarily synchronised: one ===================================== compiler/GHC/HsToCore/Coverage.hs ===================================== @@ -117,7 +117,7 @@ hpcInitCode platform this_mod (HpcInfo tickCount hashNo) = initializerCStub platform fn_name decls body where fn_name = mkInitializerStubLabel this_mod (fsLit "hpc") - decls = text "extern StgWord64 " <> tickboxes <> text "[]" <> semi + decls = text "StgWord64 " <> tickboxes <> brackets (int tickCount) <> semi body = text "hs_hpc_module" <> parens (hcat (punctuate comma [ doubleQuotes full_name_str, ===================================== compiler/GHC/Iface/Tidy.hs ===================================== @@ -407,7 +407,6 @@ tidyProgram opts (ModGuts { mg_module = mod , mg_deps = deps , mg_foreign = foreign_stubs , mg_foreign_files = foreign_files - , mg_hpc_info = hpc_info , mg_modBreaks = modBreaks , mg_boot_exports = boot_exports }) = do @@ -480,7 +479,6 @@ tidyProgram opts (ModGuts { mg_module = mod , cg_foreign = all_foreign_stubs , cg_foreign_files = foreign_files , cg_dep_pkgs = dep_direct_pkgs deps - , cg_hpc_info = hpc_info , cg_modBreaks = modBreaks , cg_spt_entries = spt_entries } @@ -1567,4 +1565,3 @@ mustExposeTyCon no_trim_types exports tc exported_con con = any (`elemNameSet` exports) (dataConName con : dataConFieldLabels con) -} - ===================================== compiler/GHC/StgToCmm.hs ===================================== @@ -24,7 +24,6 @@ import GHC.StgToCmm.Layout import GHC.StgToCmm.Utils import GHC.StgToCmm.Closure import GHC.StgToCmm.Config -import GHC.StgToCmm.Hpc import GHC.StgToCmm.Ticky import GHC.StgToCmm.Types (ModuleLFInfos) import GHC.StgToCmm.CgUtils (CgStream) @@ -38,7 +37,6 @@ import GHC.Stg.Syntax import GHC.Types.CostCentre import GHC.Types.IPE -import GHC.Types.HpcInfo import GHC.Types.Id import GHC.Types.Id.Info import GHC.Types.RepType @@ -52,7 +50,6 @@ import GHC.Core.DataCon import GHC.Core.TyCon import GHC.Core.Multiplicity -import GHC.Unit.Module import GHC.Utils.Error import GHC.Utils.Outputable @@ -77,13 +74,12 @@ codeGen :: Logger -> [TyCon] -> CollectedCCs -- (Local/global) cost-centres needing declaring/registering. -> [CgStgTopBinding] -- Bindings to convert - -> HpcInfo -> CgStream CmmGroup (ModuleLFInfos, DetUniqFM) -- See Note [Deterministic Uniques in the CG] on CgStream -- Output as a stream, so codegen can -- be interleaved with output codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons - cost_centre_info stg_binds hpc_info + cost_centre_info stg_binds = do { -- cg: run the code generator, and yield the resulting CmmGroup -- Using an IORef to store the state is a bit crude, but otherwise -- we would need to add a state monad layer which regresses @@ -118,7 +114,7 @@ codeGen logger tmpfs cfg (InfoTableProvMap denv _ _) data_tycons yield cmm return a - ; cg (mkModuleInit cost_centre_info (stgToCmmThisModule cfg) hpc_info) + ; cg (mkModuleInit cost_centre_info) ; mapM_ (cg . cgTopBinding logger tmpfs cfg) stg_binds -- Put datatype_stuff after code_stuff, because the @@ -281,13 +277,10 @@ cgTopRhs cfg rec bndr (StgRhsClosure fvs cc upd_flag args body _typ) mkModuleInit :: CollectedCCs -- cost centre info - -> Module - -> HpcInfo -> FCode () -mkModuleInit cost_centre_info this_mod hpc_info - = do { initHpc this_mod hpc_info - ; initCostCentres cost_centre_info +mkModuleInit cost_centre_info + = do { initCostCentres cost_centre_info } ===================================== compiler/GHC/StgToCmm/Config.hs ===================================== @@ -46,7 +46,6 @@ data StgToCmmConfig = StgToCmmConfig ---------------------------------- Flags -------------------------------------- , stgToCmmLoopification :: !Bool -- ^ Loopification enabled (cf @-floopification@) , stgToCmmAlignCheck :: !Bool -- ^ Insert alignment check (cf @-falignment-sanitisation@) - , stgToCmmOptHpc :: !Bool -- ^ perform code generation for code coverage , stgToCmmFastPAPCalls :: !Bool -- ^ , stgToCmmSCCProfiling :: !Bool -- ^ Check if cost-centre profiling is enabled , stgToCmmEagerBlackHole :: !Bool -- ^ ===================================== compiler/GHC/StgToCmm/Hpc.hs ===================================== @@ -6,13 +6,11 @@ -- ----------------------------------------------------------------------------- -module GHC.StgToCmm.Hpc ( initHpc, mkTickBox ) where +module GHC.StgToCmm.Hpc ( mkTickBox ) where import GHC.Prelude import GHC.Platform -import GHC.StgToCmm.Monad -import GHC.StgToCmm.Utils import GHC.Cmm.Graph import GHC.Cmm.Expr @@ -20,9 +18,7 @@ import GHC.Cmm.CLabel import GHC.Cmm.Utils import GHC.Unit.Module -import GHC.Types.HpcInfo -import Control.Monad mkTickBox :: Platform -> Module -> Int -> CmmAGraph mkTickBox platform mod n @@ -34,16 +30,3 @@ mkTickBox platform mod n tick_box = cmmIndex platform W64 (CmmLit $ CmmLabel $ mkHpcTicksLabel $ mod) n - --- | Emit top-level tables for HPC and return code to initialise -initHpc :: Module -> HpcInfo -> FCode () -initHpc _ NoHpcInfo{} - = return () -initHpc this_mod (HpcInfo tickCount _hashNo) - = do do_hpc <- stgToCmmOptHpc <$> getStgToCmmConfig - when do_hpc $ - emitDataLits (mkHpcTicksLabel this_mod) - [ CmmInt 0 W64 - | _ <- take tickCount [0 :: Int ..] - ] - ===================================== compiler/GHC/Unit/Module/ModGuts.hs ===================================== @@ -141,7 +141,6 @@ data CgGuts cg_foreign_files :: ![(ForeignSrcLang, FilePath)], cg_dep_pkgs :: !(Set UnitId), -- ^ Dependent packages, used to -- generate #includes for C code gen - cg_hpc_info :: !HpcInfo, -- ^ Program coverage tick box information cg_modBreaks :: !(Maybe ModBreaks), -- ^ Module breakpoints cg_spt_entries :: [SptEntry] -- ^ Static pointer table entries for static forms defined in ===================================== testsuite/tests/bytecode/T25510/Makefile ===================================== @@ -0,0 +1,7 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T25510c: + '$(TEST_HC)' $(ghcThWayFlags) -fhpc -fbyte-code-and-object-code -c T25510A.hs + '$(TEST_HC)' $(ghcThWayFlags) -fhpc -fprefer-byte-code -c T25510B.hs ===================================== testsuite/tests/bytecode/T25510/T25510A.hs ===================================== @@ -0,0 +1,8 @@ +{-# LANGUAGE TemplateHaskellQuotes #-} + +module T25510A where + +import Language.Haskell.TH + +a :: Q Exp +a = [| 114514 |] ===================================== testsuite/tests/bytecode/T25510/T25510B.hs ===================================== @@ -0,0 +1,7 @@ +{-# LANGUAGE TemplateHaskell #-} + +module T25510B where + +import T25510A + +b = $(a) ===================================== testsuite/tests/bytecode/T25510/all.T ===================================== @@ -0,0 +1,10 @@ +test('T25510', [ + req_th, + js_skip +], multimod_compile, ['T25510B', '-fhpc -fbyte-code-and-object-code -fprefer-byte-code -v0']) + +test('T25510c', [ + extra_files(['T25510A.hs', 'T25510B.hs']), + req_th, + js_skip +], makefile_test, ['T25510c ghcThWayFlags=' + config.ghc_th_way_flags]) ===================================== testsuite/tests/wasm/should_run/control-flow/LoadCmmGroup.hs ===================================== @@ -34,7 +34,6 @@ import GHC.Stg.FVs import GHC.Stg.Syntax import GHC.StgToCmm (codeGen) import GHC.Types.CostCentre (emptyCollectedCCs) -import GHC.Types.HpcInfo (emptyHpcInfo) import GHC.Types.IPE (emptyInfoTableProvMap) import GHC.Types.Unique.DSM import GHC.Unit.Home @@ -70,14 +69,12 @@ cmmOfSummary summ = do tycons = [] ccs = emptyCollectedCCs stg' = fmap fst (depSortWithAnnotStgPgm (ms_mod summ) stg) - hpcinfo = emptyHpcInfo False tmpfs = hsc_tmpfs env - stg_to_cmm dflags mod = codeGen logger tmpfs (initStgToCmmConfig dflags mod) (groups, _infos) <- liftIO $ fmap fst $ runUDSMT (initDUniqSupply 't' 0) $ collectAll $ - stg_to_cmm dflags (ms_mod summ) infotable tycons ccs stg' hpcinfo + codeGen logger tmpfs (initStgToCmmConfig dflags (ms_mod summ)) infotable tycons ccs stg' return groups frontend :: DynFlags -> HscEnv -> ModSummary -> IO ModGuts View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bcbcdaaf2df58e3b7a2756d044c4169a724e03d9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bcbcdaaf2df58e3b7a2756d044c4169a724e03d9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 01:32:31 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Thu, 21 Nov 2024 20:32:31 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T13897 Message-ID: <673fdf2f4212e_6822314e2f44138@gitlab.mail> Ben Gamari pushed new branch wip/T13897 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T13897 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 01:39:31 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Thu, 21 Nov 2024 20:39:31 -0500 Subject: [Git][ghc/ghc][wip/freebsd] 2 commits: gitlab-ci: Prefer system toolchain on FreeBSD Message-ID: <673fe0d3ef949_6822322444446025@gitlab.mail> Ben Gamari pushed to branch wip/freebsd at Glasgow Haskell Compiler / GHC Commits: fd54336a by Ben Gamari at 2024-11-21T20:38:42-05:00 gitlab-ci: Prefer system toolchain on FreeBSD It's not uncommon to find machines with gcc installed via ports. We should be using the system's default clang-based toolchain instead. - - - - - 0584a454 by Ben Gamari at 2024-11-21T20:39:25-05:00 testsuite: Mark T21969 as broken on FreeBSD Due to #25512. - - - - - 2 changed files: - .gitlab/generate-ci/gen_ci.hs - testsuite/tests/concurrent/should_run/all.T Changes: ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -424,6 +424,9 @@ opsysVariables _ FreeBSD14 = mconcat "CONFIGURE_ARGS" =: "--with-iconv-includes=/usr/local/include --with-iconv-libraries=/usr/local/lib" , "CONFIGURE_ARGS" =: "--with-system-libffi --with-ffi-includes=/usr/local/include --with-ffi-libraries=/usr/local/lib" , "CONFIGURE_ARGS" =: "--with-gmp-includes=/usr/local/include --with-gmp-libraries=/usr/local/lib" + -- Prefer to use the system's clang-based toolchain and not gcc + , "CC" =: "cc" + , "CXX" =: "c++" , "GHC_VERSION" =: "9.6.4" , "CABAL_INSTALL_VERSION" =: "3.10.3.0" ] ===================================== testsuite/tests/concurrent/should_run/all.T ===================================== @@ -268,6 +268,7 @@ test('T21651', test('T21969', [ only_ways(['threaded1','threaded2', 'nonmoving_thr', 'profthreaded']), when(opsys('mingw32'),skip), # uses POSIX pipes + when(opsys('freebsd'), expect_broken(25512)), extra_run_opts('50000'), run_timeout_multiplier(0.3), # default timeout seems to be 300, but lockups happen quickly req_target_smp, View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9a07d8307dfc0b0ada9bf58f5dc7db1b68836407...0584a4546924f8a8dfcfc63a3c1ecd960691d533 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9a07d8307dfc0b0ada9bf58f5dc7db1b68836407...0584a4546924f8a8dfcfc63a3c1ecd960691d533 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 08:58:20 2024 From: gitlab at gitlab.haskell.org (Fabricio Nascimento (@fabu)) Date: Fri, 22 Nov 2024 03:58:20 -0500 Subject: [Git][ghc/ghc][wip/fabu/T24848-meaningful-return] 342 commits: Demand: Combine examples into Note (#25107) Message-ID: <674047ac2166a_79a8abe6b88861@gitlab.mail> Fabricio Nascimento pushed to branch wip/fabu/T24848-meaningful-return at Glasgow Haskell Compiler / GHC Commits: 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 506daa08 by Fabricio de Sousa Nascimento at 2024-11-22T17:56:24+09:00 Implements the proposal for MeaningfulMainReturn extension at https://github.com/ghc-proposals/ghc-proposals/pull/631 Aside from adding the extension, it adds the errors and warnings. It does not make the extension default as this would be done later. Closes #24848 - - - - - 20 changed files: - .ghcid - .gitattributes - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - .gitmodules - CODEOWNERS - boot - cabal.project-reinstall - compile_flags.txt - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/432326cb90ba61e7ce091d9e44e418a589e20920...506daa08f5808b70fb9242deb54175cabf55203c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/432326cb90ba61e7ce091d9e44e418a589e20920...506daa08f5808b70fb9242deb54175cabf55203c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 10:43:21 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Fri, 22 Nov 2024 05:43:21 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] 7 commits: Add test for #25185 Message-ID: <67406049d7b41_2260c41f21b04017d@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - dd7deafb by Matthew Pickering at 2024-11-22T10:43:17+00:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 30 changed files: - .gitattributes - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Parser/String.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/StgToCmm/Config.hs - compiler/GHC/StgToCmm/Hpc.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Head.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModGuts.hs - compiler/GHC/Unit/State.hs - compiler/ghc.cabal.in - distrib/configure.ac.in - docs/users_guide/exts/multiline_strings.rst The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bf4e5562736b3217702d19a86acf5bbe04f73a08...dd7deafb0f1934f6744cc94cd30aedb13e715a75 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bf4e5562736b3217702d19a86acf5bbe04f73a08...dd7deafb0f1934f6744cc94cd30aedb13e715a75 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 11:15:46 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Fri, 22 Nov 2024 06:15:46 -0500 Subject: [Git][ghc/ghc][wip/romes/restore-ecwl] Re-introduce ErrorCallWithLocation with a deprecation pragma Message-ID: <674067e2b6d6e_2260c4526bb044846@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/restore-ecwl at Glasgow Haskell Compiler / GHC Commits: 63edd2cd by Rodrigo Mesquita at 2024-11-22T11:15:32+00:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 5 changed files: - libraries/ghc-internal/src/GHC/Internal/Exception.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/Exception.hs ===================================== @@ -8,6 +8,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ViewPatterns #-} {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- @@ -52,7 +53,7 @@ module GHC.Internal.Exception , ratioZeroDenomException , underflowException -- ** 'ErrorCall' - , ErrorCall(..) + , ErrorCall(.., ErrorCallWithLocation) , errorCallException , errorCallWithCallStackException , toExceptionWithBacktrace @@ -178,7 +179,11 @@ data ErrorCall = ErrorCall String , Ord -- ^ @since base-4.7.0.0 ) -{-# COMPLETE ErrorCall #-} +{-# DEPRECATED ErrorCallWithLocation "ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively." #-} +pattern ErrorCallWithLocation :: String -> String -> ErrorCall +pattern ErrorCallWithLocation err loc <- ErrorCall ((\err -> (err, error "ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively.")) -> (err, loc)) + where ErrorCallWithLocation err _ = ErrorCall err +{-# COMPLETE ErrorCallWithLocation #-} -- | @since base-4.0.0.0 instance Exception ErrorCall ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5305,6 +5307,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5274,6 +5276,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5451,6 +5453,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5305,6 +5307,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/63edd2cdb6eee16e667f0413f2bd6b191e668bef -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/63edd2cdb6eee16e667f0413f2bd6b191e668bef You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 11:21:27 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Fri, 22 Nov 2024 06:21:27 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] driver: Always link against "base" package when one shot linking Message-ID: <674069371d3a0_2260c4644614452c3@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 8741231d by Matthew Pickering at 2024-11-22T16:51:11+05:30 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 14 changed files: - .gitlab/hello.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== .gitlab/hello.hs ===================================== @@ -26,7 +26,8 @@ fakeSettings = sToolSettings = ToolSettings {}, sTargetPlatform = genericPlatform, - sPlatformMisc = PlatformMisc {} + sPlatformMisc = PlatformMisc {}, + sUnitSettings = UnitSettings { unitSettings_baseUnitId = "base" } } fakeDynFlags :: DynFlags ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,17 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl link against a different base package by default. +dnl If the package is unavailable it will simply not be linked against. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,27 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8741231d53b5149400e217eacb415734b681d9f6 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8741231d53b5149400e217eacb415734b681d9f6 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 12:11:25 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Fri, 22 Nov 2024 07:11:25 -0500 Subject: [Git][ghc/ghc][wip/romes/restore-ecwl] 4 commits: Fix CRLF in multiline strings (#25375) Message-ID: <674074eda08d1_33976815ac0c729e@gitlab.mail> Zubin pushed to branch wip/romes/restore-ecwl at Glasgow Haskell Compiler / GHC Commits: 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - d186f6aa by Rodrigo Mesquita at 2024-11-22T12:11:22+00:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 30 changed files: - .gitattributes - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Parser/String.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/StgToCmm/Config.hs - compiler/GHC/StgToCmm/Hpc.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModGuts.hs - compiler/ghc.cabal.in - docs/users_guide/exts/multiline_strings.rst - libraries/ghc-internal/src/GHC/Internal/Exception.hs - + testsuite/tests/bytecode/T25510/Makefile - + testsuite/tests/bytecode/T25510/T25510A.hs - + testsuite/tests/bytecode/T25510/T25510B.hs - + testsuite/tests/bytecode/T25510/all.T - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/63edd2cdb6eee16e667f0413f2bd6b191e668bef...d186f6aa60d94430b82cdc26890761efc42b4145 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/63edd2cdb6eee16e667f0413f2bd6b191e668bef...d186f6aa60d94430b82cdc26890761efc42b4145 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 15:20:31 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 22 Nov 2024 10:20:31 -0500 Subject: [Git][ghc/ghc] Deleted branch wip/ci-fixes Message-ID: <6740a13fb9ec7_62d41151fe45053f@gitlab.mail> Ben Gamari deleted branch wip/ci-fixes at Glasgow Haskell Compiler / GHC -- You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 15:21:04 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 22 Nov 2024 10:21:04 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/ci-fixes Message-ID: <6740a160d2f53_62d41140ed8507ed@gitlab.mail> Ben Gamari pushed new branch wip/ci-fixes at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/ci-fixes You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 16:33:04 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 22 Nov 2024 11:33:04 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/test-fixes Message-ID: <6740b2409f4cd_389babc50c3621d@gitlab.mail> Ben Gamari pushed new branch wip/test-fixes at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/test-fixes You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 16:50:28 2024 From: gitlab at gitlab.haskell.org (Brandon Chinn (@brandonchinn178)) Date: Fri, 22 Nov 2024 11:50:28 -0500 Subject: [Git][ghc/ghc][wip/interpolated-strings] 346 commits: Demand: Combine examples into Note (#25107) Message-ID: <6740b6547c084_389ba963700400ca@gitlab.mail> Brandon Chinn pushed to branch wip/interpolated-strings at Glasgow Haskell Compiler / GHC Commits: 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 77b0f77f by Brandon Chinn at 2024-11-22T08:49:55-08:00 Unify ITstring + ITstringMulti - - - - - 9bec117d by Brandon Chinn at 2024-11-22T08:49:55-08:00 Unify HsString + HsMultilineString - - - - - f4f58a30 by Brandon Chinn at 2024-11-22T08:49:56-08:00 Move multiline string processing functions to top-level - - - - - cec6174c by Brandon Chinn at 2024-11-22T08:49:56-08:00 Always use processCharsSingle to get StringLexError - - - - - 51a05a7e by Brandon Chinn at 2024-11-22T08:49:56-08:00 Implement interpolated strings - - - - - 20 changed files: - .ghcid - .gitattributes - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - .gitmodules - CODEOWNERS - boot - cabal.project-reinstall - compile_flags.txt - compiler/GHC.hs - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Types.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8e7eae73deb6ddf26024d1fa1d1570c321fb8164...51a05a7e32961b33bb8c7b8634bf938af0bd481b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8e7eae73deb6ddf26024d1fa1d1570c321fb8164...51a05a7e32961b33bb8c7b8634bf938af0bd481b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 17:43:16 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 22 Nov 2024 12:43:16 -0500 Subject: [Git][ghc/ghc][wip/T24359] Work in progress Message-ID: <6740c2b480251_30d6c720aad060067@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 70ab85ca by Simon Peyton Jones at 2024-11-22T17:42:56+00:00 Work in progress ..won't compile yet - - - - - 2 changed files: - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Tc/Gen/Sig.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -820,11 +820,17 @@ dsSpec mb_poly_rhs (SpecPrag poly_id spec_co spec_inl) -- perhaps with the body of the lambda wrapped in some WpLets -- E.g. /\a \(d:Eq a). let d2 = $df d in [] (Maybe a) d2 = dsHsWrapper spec_app $ \core_app -> - finishSpecPrag mb_poly_rhs - spec_bndrs (core_app (Var poly_id)) - spec_bndrs (\poly_rhs _ -> core_app poly_rhs) - spec_inl + do { dflags <- getDynFlags + ; case decomposeRuleLhs dflags spec_bndrs (core_app (Var poly_id)) + (mkVarSet spec_bndrs) of { + Left msg -> do { diagnosticDs msg; return Nothing } ; + Right (rule_bndrs, poly_id, rule_lhs_args) -> + + ; let poly_rhs = specFunBody poly_id mb_poly_rhs + ; finishSpecPrag rule_bndrs poly_id rule_lhs_args + rule_bndrs (core_app poly_rhs) spec_inl +{- dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id , spe_tv_bndrs = tv_bndrs , spe_id_bndrs = id_bndrs @@ -869,6 +875,57 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id where drop_cast (Cast e _) = drop_cast e drop_cast e = e +-} + +dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id + , spe_tv_bndrs = tv_bndrs + , spe_id_bndrs = id_bndrs + , spe_lhs_ev_bndrs = lhs_evs + , spe_lhs_binds = lhs_binds + , spe_lhs_call = the_call + , spe_inl = inl }) + -- SpecPragE case: See Note [Handling new-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig + | isJust (isClassOpId_maybe poly_id) + = failBecauseOfClassOp poly_id + + | otherwise + = dsTcEvBinds lhs_binds $ \ ds_lhs_binds -> + do { dflags <- getDynFlags + ; ds_call <- zapUnspecables $ + -- zapUnspecables: see Note [Desugaring RULE left hand sides] + dsLExpr the_call + ; tracePm "dsSpec1" (vcat + [ ppr poly_id + , text "lhs_binds" <+> ppr lhs_binds + , text "ds_lhs_binds" <+> ppr ds_lhs_binds + , text "ds_call" <+> ppr ds_call ]) + + ; let simpl_opts = initSimpleOpts dflags + core_call = drop_cast $ + simpleOptExpr simpl_opts $ + ds_call + + lhs_id_bndrs = filterOut (`elemVarSet` exprFreeVars core_call) $ + id_bndrs ++ bindersOfBinds ds_lhs_binds + -- All the vars in core_call that should be quantified + + rhs_const_binds :: [CoreBind] + rhs_const_binds = get_const_ev_binds lhs_evs ds_lhs_binds + + spec_id_bndrs = filterOut (`elemVarSet` const_bndrs) lhs_id_bndrs + + fn_body = specFunBody poly_id mb_poly_rhs + + spec_body = mkLets rhs_const_binds $ + mkCoreApps fn_body lhs_args + + ; tracePm "dsSpec1" (vcat [ ppr poly_id $$ ppr ds_call $$ ppr core_call]) + ; finishSpecPrag mb_poly_rhs + (tv_bndrs ++ lhs_id_bndrs) core_call + (tv_bndrs ++ spec_id_bndrs) spec_body inl } + where + drop_cast (Cast e _) = drop_cast e + drop_cast e = e failBecauseOfClassOp :: Id -> DsM (Maybe a) -- There is no point in trying to specialise a class op @@ -878,21 +935,11 @@ failBecauseOfClassOp poly_id = do { diagnosticDs (DsUselessSpecialiseForClassMethodSelector poly_id) ; return Nothing } -finishSpecPrag :: Maybe CoreExpr -- See the first param of dsSpec - -> [Var] -- Binders, over LHS and RHS - -> CoreExpr -- LHS pattern - -> [Var] -> (CoreExpr -> [CoreExpr] -> CoreExpr) -- Make spec RHS given function body - -> InlinePragma +finishSpecPrag :: [Var] -> Id -> [CoreExpr] -- LHS pattern + -> [Var] -> CoreExpr -> InlinePragma -- Specialised form -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) -finishSpecPrag mb_poly_rhs - lhs_bndrs rule_lhs - spec_bndrs mk_spec_rhs - spec_inl - = do { dflags <- getDynFlags - ; case decomposeRuleLhs dflags lhs_bndrs rule_lhs (mkVarSet lhs_bndrs) of { - Left msg -> do { diagnosticDs msg; return Nothing } ; - Right (rule_bndrs, poly_id, rule_lhs_args) -> - +finishSpecPrag rule_bndrs poly_id rule_bndrs rhs_lhs_args + spec_bndrs spec_body spec_inl do { this_mod <- getModule ; uniq <- newUnique ; let poly_name = idName poly_id @@ -914,11 +961,11 @@ finishSpecPrag mb_poly_rhs rule = mkSpecRule dflags this_mod False rule_act (text "USPEC") poly_id rule_bndrs rule_lhs_args - (mkVarApps (Var spec_id) lhs_bndrs) + (mkVarApps (Var spec_id) spec_bndrs) - spec_ty = mkLamTypes spec_bndrs (exprType rule_lhs) - spec_rhs = mkLams spec_bndrs $ - mk_spec_rhs poly_rhs rule_lhs_args + rule_lhs_ty = exprType (mkVarApps poly_id rule_lhs_args) + spec_ty = mkLamTypes spec_bndrs rule_lhs_ty + spec_rhs = mkLams spec_bndrs spec_body ; dsWarnOrphanRule rule ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -929,6 +929,20 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) do { (L loc spec_e', rho) <- tcInferRho spec_e ; return (id_bndrs, L loc spec_e', rho) } } + ; (qtkvs, qevs, ev_binds, insol) <- simplifyInfer TopLevel tc_lvl NoRestrictions + [] [(nm,rho)] wanted + + ; return [SpecPragE { spe_poly_id = poly_id + , spe_tv_bndrs = qtkvs + , spe_id_bndrs = id_bndrs + , spe_lhs_ev_bndrs = qevs + , spe_lhs_binds = ev_binds + , spe_lhs_call = spec_e' + , spe_rhs_ev_bndrs = [] + , spe_rhs_binds = emptyTcEvBinds + , spe_inl = inl }] } + +{- -- Solve unification constraints -- c.f. Note [The SimplifyRule Plan] step 1 ; cloned_wanted <- cloneWC wanted -- See Note [Simplify cloned constraints] @@ -978,7 +992,7 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) , spe_rhs_ev_bndrs = rhs_evs , spe_rhs_binds = rhs_binds , spe_inl = inl }] } - +-} tcSpecPrag _ prag = pprPanic "tcSpecPrag" (ppr prag) -------------- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/70ab85cadc6de073566347ec423906a205792bee -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/70ab85cadc6de073566347ec423906a205792bee You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 18:13:15 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 22 Nov 2024 13:13:15 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] testsuite: Bump compile timeout of T22744 Message-ID: <6740c9bb69840_3006221bdb7c20489@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 1b2f40f9 by Ben Gamari at 2024-11-22T13:12:51-05:00 testsuite: Bump compile timeout of T22744 This has failed repeatedly on Darwin. - - - - - 1 changed file: - testsuite/tests/perf/compiler/all.T Changes: ===================================== testsuite/tests/perf/compiler/all.T ===================================== @@ -692,7 +692,7 @@ test('T22744', req_interp, pre_cmd('$MAKE -s --no-print-directory T22744'), extra_files(['genT22744']), - compile_timeout_multiplier(2) + compile_timeout_multiplier(3) ], multimod_compile, ['T22744', '-v0']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1b2f40f996640a528c2039ec51cacc5b8c305f89 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1b2f40f996640a528c2039ec51cacc5b8c305f89 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 19:10:36 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Fri, 22 Nov 2024 14:10:36 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/andreask/compacting_gc_crash Message-ID: <6740d72c47de2_219fdd60bc74642f9@gitlab.mail> Andreas Klebinger pushed new branch wip/andreask/compacting_gc_crash at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/andreask/compacting_gc_crash You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 19:23:05 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Fri, 22 Nov 2024 14:23:05 -0500 Subject: [Git][ghc/ghc][wip/andreask/compacting_gc_crash] Compacting GC: Handle black holes in large objects. Message-ID: <6740da191dac8_219fdd746aa87061d@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/compacting_gc_crash at Glasgow Haskell Compiler / GHC Commits: 88c67134 by Andreas Klebinger at 2024-11-22T20:03:12+01:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 2 changed files: - rts/sm/Compact.c - rts/sm/Evac.c Changes: ===================================== rts/sm/Compact.c ===================================== @@ -68,6 +68,10 @@ pointer. ------------------------------------------------------------------------- */ +static /* STATIC_INLINE */ P_ +thread_obj (const StgInfoTable *info, P_ p); + + STATIC_INLINE W_ UNTAG_PTR(W_ p) { @@ -567,6 +571,13 @@ update_fwd_large( bdescr *bd ) // nothing to follow continue; + // See Note [Black holes in large objects] in Evac.c for why. + case BLACKHOLE: + { + thread_obj(info, p); + continue; + } + case MUT_ARR_PTRS_CLEAN: case MUT_ARR_PTRS_DIRTY: case MUT_ARR_PTRS_FROZEN_CLEAN: ===================================== rts/sm/Evac.c ===================================== @@ -1112,6 +1112,8 @@ evacuate_BLACKHOLE(StgClosure **p) return; } + // Note [Black holes in large objects] + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // blackholes *can* be in a large object: when raiseAsync() creates an // AP_STACK the payload might be large enough to create a large object. // See #14497. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88c67134a556fa6061fb854518697cbb285cf3e5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88c67134a556fa6061fb854518697cbb285cf3e5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 21:52:08 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 22 Nov 2024 16:52:08 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 15 commits: Fix CRLF in multiline strings (#25375) Message-ID: <6740fd08e1ece_219fdd113bd24942b2@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 2fe56dbe by Ben Gamari at 2024-11-22T16:51:48-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 7dfb17ca by Ben Gamari at 2024-11-22T16:51:48-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - a972735f by Ben Gamari at 2024-11-22T16:51:48-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 8297a2e7 by Ben Gamari at 2024-11-22T16:51:48-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - e048e087 by Cheng Shao at 2024-11-22T16:51:48-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 107310ce by Drew Fenwick at 2024-11-22T16:51:53-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - 35532039 by Rodrigo Mesquita at 2024-11-22T16:51:53-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 8a69f763 by Ben Gamari at 2024-11-22T16:51:54-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - 3d27c501 by Ben Gamari at 2024-11-22T16:51:54-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - b672f876 by Ben Gamari at 2024-11-22T16:51:54-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - 560600e6 by Ben Gamari at 2024-11-22T16:51:55-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - 3a4d58e2 by Ben Gamari at 2024-11-22T16:51:55-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - 30 changed files: - .gitattributes - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Parser/String.hs - compiler/GHC/StgToCmm.hs - compiler/GHC/StgToCmm/Config.hs - compiler/GHC/StgToCmm/Hpc.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModGuts.hs - compiler/ghc.cabal.in - docs/users_guide/exts/multiline_strings.rst - docs/users_guide/exts/type_abstractions.rst - libraries/ghc-internal/src/GHC/Internal/Exception.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs - rts/Linker.c - testsuite/driver/testlib.py - + testsuite/tests/bytecode/T25510/Makefile - + testsuite/tests/bytecode/T25510/T25510A.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e25afd6e05a0fd4ade7f6223cf790b53878dbfb2...3a4d58e25cb1fd0c33f6c7dab7235b7a715a9492 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e25afd6e05a0fd4ade7f6223cf790b53878dbfb2...3a4d58e25cb1fd0c33f6c7dab7235b7a715a9492 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 22 21:56:59 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 22 Nov 2024 16:56:59 -0500 Subject: [Git][ghc/ghc][wip/T25509] hadrian-ghci-multi: Pass -this-package-name in unit response files Message-ID: <6740fe2b87eec_219fdd139f3cc106950@gitlab.mail> Ben Gamari pushed to branch wip/T25509 at Glasgow Haskell Compiler / GHC Commits: c73dc2da by Ben Gamari at 2024-11-22T16:56:52-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - 1 changed file: - hadrian/src/Rules/ToolArgs.hs Changes: ===================================== hadrian/src/Rules/ToolArgs.hs ===================================== @@ -99,7 +99,8 @@ multiSetup pkg_s = do writeFile' (resp_file root p) (intercalate "\n" (normalise_ghc arg_list ++ modules cd ++ concatMap rexp (reexportModules cd) - ++ ["-outputdir", hidir])) + ++ ["-outputdir", hidir, + "-this-package-name", pkgName p])) return (resp_file root p) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c73dc2da30e56fb266123fcea4b11eae72dfee49 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c73dc2da30e56fb266123fcea4b11eae72dfee49 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 04:32:32 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 22 Nov 2024 23:32:32 -0500 Subject: [Git][ghc/ghc][master] 4 commits: gitlab-ci: Bump ci-images Message-ID: <67415ae0808a6_3d094c1143d845e@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 4 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - rts/Linker.c Changes: ===================================== .gitlab-ci.yml ===================================== @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: efc1ab81236eb37e20cb287ec77aebb6c6341098 + DOCKER_REV: eb4d3389fd62e4f7321a0c8799014ec1f4da0708 # Sequential version number of all cached things. # Bump to invalidate GitLab CI cache. ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -415,6 +415,13 @@ type Variables = MonoidalMap String [String] (=:) :: String -> String -> Variables a =: b = MonoidalMap (Map.singleton a [b]) +type TestName = String + +brokenTest :: TestName -- ^ test name + -> String -- ^ explanation of breakage + -> Variables +brokenTest test _why = "BROKEN_TESTS" =: test + opsysVariables :: Arch -> Opsys -> Variables opsysVariables _ FreeBSD13 = mconcat [ -- N.B. we use iconv from ports as I see linker errors when we attempt @@ -463,13 +470,16 @@ alpineVariables arch = mconcat $ [ -- Due to #20266 "CONFIGURE_ARGS" =: "--disable-ld-override" , "INSTALL_CONFIGURE_ARGS" =: "--disable-ld-override" - -- encoding004: due to lack of locale support - -- T10458, ghcilink002: due to #17869 - , "BROKEN_TESTS" =: "encoding004 T10458" + , brokenTest "encoding004" "due to lack of locale support" + , brokenTest "T10458" "#17869" + ] ++ + [ mconcat [ brokenTest test "#25498" | test <- ["simd009", "T25062_V16", "T25169", "T22187_run"] ] + | I386 <- [arch] ] ++ + [ brokenTest "T22033" "#25497" | I386 <- [arch] ] ++ [-- Bootstrap compiler has incorrectly configured target triple #25200 "CONFIGURE_ARGS" =: "--enable-ignore-build-platform-mismatch --build=aarch64-unknown-linux --host=aarch64-unknown-linux --target=aarch64-unknown-linux" - | AArch64 <- [arch] + | AArch64 <- [arch] ] @@ -479,7 +489,7 @@ distroVariables arch Alpine318 = alpineVariables arch distroVariables arch Alpine320 = alpineVariables arch distroVariables _ Centos7 = mconcat [ "HADRIAN_ARGS" =: "--docs=no-sphinx" - , "BROKEN_TESTS" =: "T22012" -- due to #23979 + , brokenTest "T22012" "#23979" ] distroVariables _ Fedora33 = mconcat -- LLC/OPT do not work for some reason in our fedora images @@ -1138,6 +1148,7 @@ alpine_x86 = -- Dynamically linked build, suitable for building your own static executables on alpine , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken vanilla)) , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine320) (splitSectionsBroken vanilla)) + , allowFailureGroup (standardBuildsWithConfig I386 (Linux Alpine320) (splitSectionsBroken vanilla)) ] where -- ghcilink002 broken due to #17869 ===================================== .gitlab/jobs.yaml ===================================== @@ -315,6 +315,69 @@ "TEST_ENV": "aarch64-linux-deb12-validate+llvm" } }, + "i386-linux-alpine3_20-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "2 weeks", + "paths": [ + "ghc-i386-linux-alpine3_20-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bi386-linux-alpine3_20-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "validate", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-validate" + } + }, "i386-linux-deb10-validate": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -759,6 +822,70 @@ "XZ_OPT": "-9" } }, + "nightly-i386-linux-alpine3_20-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "8 weeks", + "paths": [ + "ghc-i386-linux-alpine3_20-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "validate", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-validate", + "XZ_OPT": "-9" + } + }, "nightly-i386-linux-deb10-validate": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -3450,6 +3577,72 @@ "XZ_OPT": "-9" } }, + "release-i386-linux-alpine3_20-release+no_split_sections": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "1 year", + "paths": [ + "ghc-i386-linux-alpine3_20-release+no_split_sections.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-release+no_split_sections", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "release+no_split_sections", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "HADRIAN_ARGS": "--hash-unit-ids", + "IGNORE_PERF_FAILURES": "all", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-release+no_split_sections", + "XZ_OPT": "-9" + } + }, "release-i386-linux-deb10-release+no_split_sections": { "after_script": [ ".gitlab/ci.sh save_cache", ===================================== rts/Linker.c ===================================== @@ -821,6 +821,13 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymTy NULL); } +#if defined(OBJFORMAT_ELF) + // Resolve references to the GOT if we know the origin object + if (dependent && strncmp(lbl, "_GLOBAL_OFFSET_TABLE_", 21) == 0) { + return dependent->info->got_start; + } +#endif + if (!ghciLookupSymbolInfo(symhash, lbl, &pinfo)) { IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl)); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bcbcdaaf2df58e3b7a2756d044c4169a724e03d9...490d4d0a1cbd9757aab7e06916c0a20c72028370 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bcbcdaaf2df58e3b7a2756d044c4169a724e03d9...490d4d0a1cbd9757aab7e06916c0a20c72028370 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 04:33:06 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 22 Nov 2024 23:33:06 -0500 Subject: [Git][ghc/ghc][master] compiler: remove unused GHC.Linker.Loader.loadExpr Message-ID: <67415b024216_3d094c19c760757a@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 1 changed file: - compiler/GHC/Linker/Loader.hs Changes: ===================================== compiler/GHC/Linker/Loader.hs ===================================== @@ -17,7 +17,6 @@ module GHC.Linker.Loader , showLoaderState , getLoaderState -- * Load & Unload - , loadExpr , loadDecls , loadPackages , loadModule @@ -589,52 +588,6 @@ preloadLib interp hsc_env lib_paths framework_paths pls lib_spec = do , "Try using a dynamic library instead." ] - -{- ********************************************************************** - - Link a byte-code expression - - ********************************************************************* -} - --- | Load a single expression, /including/ first loading packages and --- modules that this expression depends on. --- --- Raises an IO exception ('ProgramError') if it can't find a compiled --- version of the dependents to load. --- -loadExpr :: Interp -> HscEnv -> SrcSpan -> UnlinkedBCO -> IO ForeignHValue -loadExpr interp hsc_env span root_ul_bco = do - -- Initialise the linker (if it's not been done already) - initLoaderState interp hsc_env - - -- Take lock for the actual work. - modifyLoaderState interp $ \pls0 -> do - -- Load the packages and modules required - (pls, ok, _, _) <- loadDependencies interp hsc_env pls0 span needed_mods - if failed ok - then throwGhcExceptionIO (ProgramError "") - else do - -- Load the expression itself - -- Load the necessary packages and linkables - let le = linker_env pls - bco_ix = mkNameEnv [(unlinkedBCOName root_ul_bco, 0)] - resolved <- linkBCO interp (pkgs_loaded pls) le bco_ix root_ul_bco - [root_hvref] <- createBCOs interp [resolved] - fhv <- mkFinalizedHValue interp root_hvref - return (pls, fhv) - where - free_names = uniqDSetToList (bcoFreeNames root_ul_bco) - - needed_mods :: [Module] - needed_mods = [ nameModule n | n <- free_names, - isExternalName n, -- Names from other modules - not (isWiredInName n) -- Exclude wired-in names - ] -- (see note below) - -- Exclude wired-in names because we may not have read - -- their interface files, so getLinkDeps will fail - -- All wired-in names are in the base package, which we link - -- by default, so we can safely ignore them here. - initLinkDepsOpts :: HscEnv -> LinkDepsOpts initLinkDepsOpts hsc_env = opts where View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/536cdf097c1331f7771df189912d898eaf2c6445 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/536cdf097c1331f7771df189912d898eaf2c6445 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 04:33:55 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 22 Nov 2024 23:33:55 -0500 Subject: [Git][ghc/ghc][master] Fix a non-compiling example in the type abstractions docs Message-ID: <67415b33a1271_3d094c65d6c81226d@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - 1 changed file: - docs/users_guide/exts/type_abstractions.rst Changes: ===================================== docs/users_guide/exts/type_abstractions.rst ===================================== @@ -54,7 +54,7 @@ part of the type argument using type constructors. For a somewhat-contrived example:: - foo :: (Num a) => Maybe [a] -> String + foo :: (Show a, Num a) => Maybe [a] -> String foo (Nothing @[t]) = show (0 :: t) foo (Just @[t] xs) = show (sum xs :: t) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6ee35024b482b5c629211d8b5c1cf4d3ce5dd888 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6ee35024b482b5c629211d8b5c1cf4d3ce5dd888 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 04:34:27 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 22 Nov 2024 23:34:27 -0500 Subject: [Git][ghc/ghc][master] Re-introduce ErrorCallWithLocation with a deprecation pragma Message-ID: <67415b53e41e5_3d094c13e68815225@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 5 changed files: - libraries/ghc-internal/src/GHC/Internal/Exception.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/Exception.hs ===================================== @@ -8,6 +8,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ViewPatterns #-} {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- @@ -52,7 +53,7 @@ module GHC.Internal.Exception , ratioZeroDenomException , underflowException -- ** 'ErrorCall' - , ErrorCall(..) + , ErrorCall(.., ErrorCallWithLocation) , errorCallException , errorCallWithCallStackException , toExceptionWithBacktrace @@ -178,7 +179,11 @@ data ErrorCall = ErrorCall String , Ord -- ^ @since base-4.7.0.0 ) -{-# COMPLETE ErrorCall #-} +{-# DEPRECATED ErrorCallWithLocation "ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively." #-} +pattern ErrorCallWithLocation :: String -> String -> ErrorCall +pattern ErrorCallWithLocation err loc <- ErrorCall ((\err -> (err, error "ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively.")) -> (err, loc)) + where ErrorCallWithLocation err _ = ErrorCall err +{-# COMPLETE ErrorCallWithLocation #-} -- | @since base-4.0.0.0 instance Exception ErrorCall ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5305,6 +5307,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5274,6 +5276,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5451,6 +5453,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5305,6 +5307,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d1172e20f29e6fbf53fa95726492bdb998c52582 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d1172e20f29e6fbf53fa95726492bdb998c52582 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 04:35:27 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 22 Nov 2024 23:35:27 -0500 Subject: [Git][ghc/ghc][master] 2 commits: testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Message-ID: <67415b8fd3791_3d094ce5df821759@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - 2 changed files: - testsuite/driver/testlib.py - testsuite/tests/ghc-api/exactprint/all.T Changes: ===================================== testsuite/driver/testlib.py ===================================== @@ -1627,6 +1627,11 @@ async def test_common_work(name: TestName, opts, do_ways = [] config.hadrian_deps |= getTestOpts().hadrian_deps + # Skip tests which require hadrian dependencies if we are testing + # an out-of-tree compiler as Hadrian is unavailable. See #13897. + if not config.in_tree_compiler and getTestOpts().hadrian_deps - {'test:ghc'}: + do_ways = [] + # Run the required tests... for way in do_ways: if stopping(): ===================================== testsuite/tests/ghc-api/exactprint/all.T ===================================== @@ -1,3 +1,5 @@ +setTestOpts(req_hadrian_deps(['test:check-exact'])) + test('RenameCase1', ignore_stderr, makefile_test, ['RenameCase1']) test('LayoutLet2', ignore_stderr, makefile_test, ['LayoutLet2']) test('LayoutLet3', ignore_stderr, makefile_test, ['LayoutLet3']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d1172e20f29e6fbf53fa95726492bdb998c52582...c37d7a2e983f9c00a1c5da1fae4cb2a6b94a112b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d1172e20f29e6fbf53fa95726492bdb998c52582...c37d7a2e983f9c00a1c5da1fae4cb2a6b94a112b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 04:36:12 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 22 Nov 2024 23:36:12 -0500 Subject: [Git][ghc/ghc][master] ghc-internal: Fix a few cases of missing Haddock markup Message-ID: <67415bbca1c98_3d094c5b24e4271bf@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - 1 changed file: - libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs Changes: ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs ===================================== @@ -368,11 +368,11 @@ fdToHandle' fdint mb_type is_socket filepath iomode binary = do mkHandleFromFD fd fd_type filepath iomode is_socket enc --- | Turn an existing file descriptor into a Handle. This is used by +-- | Turn an existing file descriptor into a 'Handle'. This is used by -- various external libraries to make Handles. -- --- Makes a binary Handle. This is for historical reasons; it should --- probably be a text Handle with the default encoding and newline +-- Makes a binary 'Handle'. This is for historical reasons; it should +-- probably be a text 'Handle' with the default encoding and newline -- translation instead. fdToHandle :: Posix.FD -> IO Handle fdToHandle fdint = do @@ -389,8 +389,8 @@ fdToHandle fdint = do mkHandleFromFD fd fd_type fd_str iomode False{-non-block-} Nothing -- bin mode --- | Turn an existing Handle into a file descriptor. This function throws an --- IOError if the Handle does not reference a file descriptor. +-- | Turn an existing 'Handle' into a file descriptor. This function throws an +-- 'IOError' if the 'Handle' does not reference a file descriptor. -- -- @since base-4.10.0.0 handleToFd :: Handle -> IO FD.FD View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/454ce95735f1b275a4774c7b3b5e2cd773639922 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/454ce95735f1b275a4774c7b3b5e2cd773639922 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 04:36:40 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Fri, 22 Nov 2024 23:36:40 -0500 Subject: [Git][ghc/ghc][master] 2 commits: testsuite/GHCiPrimCall : Add missing Makefile includes Message-ID: <67415bd8cecd8_3d094c13e6c4273a9@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - 2 changed files: - testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile - testsuite/tests/rts/ipe/IpeStats/Makefile Changes: ===================================== testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile ===================================== @@ -1,3 +1,7 @@ +TOP=../../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + .PHONY: GHCiPrimCall GHCiPrimCall: '$(TEST_HC)' $(TEST_HC_OPTS) -fPIC -v0 -c GHCiPrimCall_cmm.cmm ===================================== testsuite/tests/rts/ipe/IpeStats/Makefile ===================================== @@ -22,16 +22,16 @@ SKIPPED_SELECTOR := 'Tables skipped: [0-9]+' # statistics. ipe_stats: - @NoOmit="$$($$TEST_HC $$TEST_HC_OPTS -fforce-recomp -finfo-table-map -dipe-stats Fold.hs)" ; \ + @NoOmit="$$('$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -finfo-table-map -dipe-stats Fold.hs)" ; \ Stack=$$(echo $$NoOmit | grep -Eo $(STACK_SELECTOR) | grep -Eo '[0-9]+$$') ; \ Fallback=$$(echo $$NoOmit | grep -Eo $(FALLBACK_SELECTOR) | grep -Eo '[0-9]+$$') ; \ Skipped=$$(echo $$NoOmit | grep -Eo $(SKIPPED_SELECTOR) | grep -Eo '[0-9]+$$') ; \ Both=$$(expr $$Stack + $$Fallback) ; \ - OmitStack="$$($$TEST_HC $$TEST_HC_OPTS -fforce-recomp -finfo-table-map -fno-info-table-map-with-stack -dipe-stats Fold.hs)" ; \ + OmitStack="$$('$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -finfo-table-map -fno-info-table-map-with-stack -dipe-stats Fold.hs)" ; \ SkippedStack=$$(echo $$OmitStack | grep -Eo $(SKIPPED_SELECTOR) | grep -Eo '[0-9]+$$') ; \ - OmitFallback="$$($$TEST_HC $$TEST_HC_OPTS -fforce-recomp -finfo-table-map -fno-info-table-map-with-fallback -dipe-stats Fold.hs)" ; \ + OmitFallback="$$('$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -finfo-table-map -fno-info-table-map-with-fallback -dipe-stats Fold.hs)" ; \ SkippedFallback=$$(echo $$OmitFallback| grep -Eo $(SKIPPED_SELECTOR) | grep -Eo '[0-9]+$$') ; \ - OmitBoth="$$($$TEST_HC $$TEST_HC_OPTS -fforce-recomp -finfo-table-map -fno-info-table-map-with-stack -fno-info-table-map-with-fallback -dipe-stats Fold.hs)" ; \ + OmitBoth="$$('$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -finfo-table-map -fno-info-table-map-with-stack -fno-info-table-map-with-fallback -dipe-stats Fold.hs)" ; \ SkippedBoth=$$(echo $$OmitBoth| grep -Eo $(SKIPPED_SELECTOR) | grep -Eo '[0-9]+$$') ; \ echo "Baseline number of skipped tables: $$Skipped\n" ; \ echo "Baseline number of stack tables: $$Stack" ; \ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/454ce95735f1b275a4774c7b3b5e2cd773639922...a021a4934dd6792a0d3ac614416a2db4ce265350 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/454ce95735f1b275a4774c7b3b5e2cd773639922...a021a4934dd6792a0d3ac614416a2db4ce265350 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 10:30:57 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Sat, 23 Nov 2024 05:30:57 -0500 Subject: [Git][ghc/ghc][wip/andreask/compacting_gc_crash] Compacting GC: Handle black holes in large objects. Message-ID: <6741aee1d8217_320eea24197c65790@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/compacting_gc_crash at Glasgow Haskell Compiler / GHC Commits: 6cee2272 by Andreas Klebinger at 2024-11-23T11:11:03+01:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 5 changed files: - rts/sm/Compact.c - rts/sm/Evac.c - + testsuite/tests/rts/T14497-compact.hs - + testsuite/tests/rts/T14497-compact.stdout - testsuite/tests/rts/all.T Changes: ===================================== rts/sm/Compact.c ===================================== @@ -68,6 +68,10 @@ pointer. ------------------------------------------------------------------------- */ +static /* STATIC_INLINE */ P_ +thread_obj (const StgInfoTable *info, P_ p); + + STATIC_INLINE W_ UNTAG_PTR(W_ p) { @@ -567,6 +571,13 @@ update_fwd_large( bdescr *bd ) // nothing to follow continue; + // See Note [Black holes in large objects] in Evac.c for why. + case BLACKHOLE: + { + thread_obj(info, p); + continue; + } + case MUT_ARR_PTRS_CLEAN: case MUT_ARR_PTRS_DIRTY: case MUT_ARR_PTRS_FROZEN_CLEAN: ===================================== rts/sm/Evac.c ===================================== @@ -1112,6 +1112,8 @@ evacuate_BLACKHOLE(StgClosure **p) return; } + // Note [Black holes in large objects] + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // blackholes *can* be in a large object: when raiseAsync() creates an // AP_STACK the payload might be large enough to create a large object. // See #14497. ===================================== testsuite/tests/rts/T14497-compact.hs ===================================== @@ -0,0 +1,13 @@ +module Main (main) where + +import System.Timeout + +fuc :: Integer -> Integer +fuc 0 = 1 +fuc n = n * fuc (n - 1) + +main :: IO () +main = do + let x = fuc 30000 + timeout 500 (print x) + print (x > 0) ===================================== testsuite/tests/rts/T14497-compact.stdout ===================================== @@ -0,0 +1 @@ +True ===================================== testsuite/tests/rts/all.T ===================================== @@ -444,6 +444,13 @@ test('T13894', js_skip, compile_and_run, ['']) # this test fails with the profasm way on some machines but not others, # so we just skip it. test('T14497', [omit_ways(['profasm']), multi_cpu_race], compile_and_run, ['-O']) +# The issue in the above test also happened with compaction enabled. +test('T14497-compact', + [ extra_files(['T14497.hs']) + , omit_ways(['profasm']) + , multi_cpu_race + , extra_run_opts('+RTS -c -RTS') + ] , compile_and_run, ['-O']) test('T14695', [js_broken(22359), ignore_stderr], makefile_test, ['T14695']) test('T14702', [ ignore_stdout , when(unregisterised(), skip) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6cee2272f75edcd85cb950e98d1d390964f17add -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6cee2272f75edcd85cb950e98d1d390964f17add You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 14:55:23 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Sat, 23 Nov 2024 09:55:23 -0500 Subject: [Git][ghc/ghc][ghc-9.8] 7 commits: Bump unix submodule to 2.8.6.0 Message-ID: <6741ecdbe8e81_faafe40363484732@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: e6cc8610 by Ben Gamari at 2024-11-19T11:53:29-05:00 Bump unix submodule to 2.8.6.0 - - - - - ea2ea2d5 by Ben Gamari at 2024-11-19T16:54:17-05:00 ghci: Don't rely on Uniques in BRK_FUN This is a partial backport of the treatment given to modules names in !10448, removing the dependence of BRK_FUN on the representation of `Unique`. - - - - - f4f6c1cd by Jaro Reinders at 2024-11-19T16:54:17-05:00 Refactor Unique to be represented by Word64 In #22010 we established that Int was not always sufficient to store all the uniques we generate during compilation on 32-bit platforms. This commit addresses that problem by using Word64 instead of Int for uniques. The core of the change is in GHC.Core.Types.Unique and GHC.Core.Types.Unique.Supply. However, the representation of uniques is used in many other places, so those needed changes too. Additionally, the RTS has been extended with an atomic_inc64 operation. One major change from this commit is the introduction of the Word64Set and Word64Map data types. These are adapted versions of IntSet and IntMap from the containers package. These are planned to be upstreamed in the future. As a natural consequence of these changes, the compiler will be a bit slower and take more space on 32-bit platforms. Our CI tests indicate around a 5% residency increase. Metric Increase: CoOpt_Read CoOpt_Singletons LargeRecord ManyAlternatives ManyConstructors MultiComponentModules MultiComponentModulesRecomp MultiLayerModulesTH_OneShot RecordUpdPerf T10421 T10547 T12150 T12227 T12234 T12425 T12707 T13035 T13056 T13253 T13253-spj T13379 T13386 T13719 T14683 T14697 T14766 T15164 T15703 T16577 T16875 T17516 T18140 T18223 T18282 T18304 T18698a T18698b T18923 T1969 T19695 T20049 T21839c T3064 T3294 T4801 T5030 T5321FD T5321Fun T5631 T5642 T5837 T6048 T783 T8095 T9020 T9198 T9233 T9630 T9675 T9872a T9872b T9872b_defer T9872c T9872d T9961 TcPlugin_RewritePerf UniqLoop WWRec hard_hole_fits (cherry picked from commit 9edcb1fb02d799acd4a7d0c145796aecb6e54ea3) - - - - - 1db0547d by Ben Gamari at 2024-11-20T08:59:37-05:00 hadrian: Accept unused imports in filepath As noted in filepath#241 [1], `filepath-1.4.301.0` is not `-Werror`-clean. [1] https://github.com/haskell/filepath/issues/241 - - - - - 88d2ee34 by Ben Gamari at 2024-11-20T10:51:55-05:00 rel-notes: Note backport of #22010 - - - - - e267aa7f by Ben Gamari at 2024-11-20T18:19:58-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - 1b2f40f9 by Ben Gamari at 2024-11-22T13:12:51-05:00 testsuite: Bump compile timeout of T22744 This has failed repeatedly on Darwin. - - - - - 21 changed files: - compiler/GHC/Builtin/Uniques.hs - compiler/GHC/ByteCode/Asm.hs - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/ByteCode/Types.hs - compiler/GHC/Cmm/CommonBlockElim.hs - compiler/GHC/Cmm/Dataflow/Collections.hs - compiler/GHC/Cmm/Dataflow/Label.hs - compiler/GHC/Cmm/Dominators.hs - compiler/GHC/Cmm/LRegSet.hs - compiler/GHC/Cmm/Sink.hs - compiler/GHC/CmmToAsm/CFG.hs - compiler/GHC/CmmToAsm/CFG/Dominators.hs - compiler/GHC/CmmToAsm/Wasm/Asm.hs - compiler/GHC/CmmToAsm/Wasm/FromCmm.hs - compiler/GHC/CmmToAsm/Wasm/Types.hs - compiler/GHC/CmmToLlvm/Base.hs - compiler/GHC/Core/Opt/Monad.hs - compiler/GHC/Core/Opt/Pipeline.hs - compiler/GHC/Core/Opt/Simplify/Monad.hs - compiler/GHC/Data/Graph/UnVar.hs - + compiler/GHC/Data/Word64Map.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f0ab92045f7d191ca9966f65f1d573884370f9db...1b2f40f996640a528c2039ec51cacc5b8c305f89 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f0ab92045f7d191ca9966f65f1d573884370f9db...1b2f40f996640a528c2039ec51cacc5b8c305f89 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 15:43:38 2024 From: gitlab at gitlab.haskell.org (Sven Tennie (@supersven)) Date: Sat, 23 Nov 2024 10:43:38 -0500 Subject: [Git][ghc/ghc][wip/supersven/riscv-vectors] 244 commits: testsuite: Normalise trailing digits from hole fits output Message-ID: <6741f82a6f2eb_faafe626560875a0@gitlab.mail> Sven Tennie pushed to branch wip/supersven/riscv-vectors at Glasgow Haskell Compiler / GHC Commits: d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - 454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - b7c7c1d7 by Sven Tennie at 2024-11-23T14:58:42+01:00 WIP: Trying to get simd000 test green - - - - - 8aa8c7d1 by Sven Tennie at 2024-11-23T14:59:47+01:00 WIP: simd000 - hacked further - - - - - a79a3b2d by Sven Tennie at 2024-11-23T14:59:50+01:00 WIP - - - - - 558d858c by Sven Tennie at 2024-11-23T14:59:50+01:00 simd000 green - - - - - 8d40dd20 by Sven Tennie at 2024-11-23T14:59:50+01:00 simd001 green - - - - - 5530dbaa by Sven Tennie at 2024-11-23T14:59:50+01:00 simd003 green - - - - - 8cdc5e26 by Sven Tennie at 2024-11-23T14:59:50+01:00 simd006 green - - - - - 62ac5e40 by Sven Tennie at 2024-11-23T14:59:50+01:00 simd007 green - - - - - e754d719 by Sven Tennie at 2024-11-23T14:59:50+01:00 simd008 && simd009 green - - - - - 265d3ba7 by Sven Tennie at 2024-11-23T14:59:50+01:00 Fix int expr cases - - - - - 75332633 by Sven Tennie at 2024-11-23T14:59:50+01:00 Vector FMA - - - - - 2d381484 by Sven Tennie at 2024-11-23T14:59:50+01:00 Add TAB char operator - - - - - 133d0fe3 by Sven Tennie at 2024-11-23T16:43:02+01:00 Fix vector ccalls - - - - - 5 changed files: - .ghcid - .gitattributes - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0682aed34baf0f7a4767d1d1571982851086f7dc...133d0fe37a8775646845b6ced809af6598432225 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0682aed34baf0f7a4767d1d1571982851086f7dc...133d0fe37a8775646845b6ced809af6598432225 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 19:41:15 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Sat, 23 Nov 2024 14:41:15 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/improve-ci-nix Message-ID: <67422fdb3919d_26a895dd5a41872f@gitlab.mail> Cheng Shao pushed new branch wip/improve-ci-nix at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/improve-ci-nix You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 23 23:41:03 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Sat, 23 Nov 2024 18:41:03 -0500 Subject: [Git][ghc/ghc][wip/T24359] Better now Message-ID: <6742680f780da_b391b2eaa4011711@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: dea62ed9 by Simon Peyton Jones at 2024-11-23T23:40:43+00:00 Better now - - - - - 5 changed files: - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Solver.hs - compiler/GHC/Tc/Zonk/Type.hs - testsuite/tests/typecheck/should_compile/tc212.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -795,14 +795,14 @@ dsSpecs :: CoreExpr -- Its rhs -- See Note [Overview of SPECIALISE pragmas] in GHC.Tc.Gen.Sig dsSpecs _ IsDefaultMethod = return (nilOL, []) dsSpecs poly_rhs (SpecPrags sps) - = do { pairs <- mapMaybeM (dsLSpec (Just poly_rhs)) sps + = do { pairs <- mapMaybeM (dsLSpec poly_rhs) sps ; let (spec_binds_s, rules) = unzip pairs ; return (concatOL spec_binds_s, rules) } -dsLSpec :: Maybe CoreExpr -> Located TcSpecPrag +dsLSpec :: CoreExpr -> Located TcSpecPrag -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) -dsLSpec mb_poly_rhs (L loc prag) - = putSrcSpanDs loc $ dsSpec mb_poly_rhs prag +dsLSpec poly_rhs (L loc prag) + = putSrcSpanDs loc $ dsSpec (Just poly_rhs) prag dsSpec :: Maybe CoreExpr -- Just rhs => RULE is for a local binding -- Nothing => RULE is for an imported Id @@ -821,14 +821,13 @@ dsSpec mb_poly_rhs (SpecPrag poly_id spec_co spec_inl) -- E.g. /\a \(d:Eq a). let d2 = $df d in [] (Maybe a) d2 = dsHsWrapper spec_app $ \core_app -> do { dflags <- getDynFlags + ; let poly_rhs = specFunBody poly_id mb_poly_rhs ; case decomposeRuleLhs dflags spec_bndrs (core_app (Var poly_id)) (mkVarSet spec_bndrs) of { Left msg -> do { diagnosticDs msg; return Nothing } ; Right (rule_bndrs, poly_id, rule_lhs_args) -> - - ; let poly_rhs = specFunBody poly_id mb_poly_rhs - ; finishSpecPrag rule_bndrs poly_id rule_lhs_args - rule_bndrs (core_app poly_rhs) spec_inl + finishSpecPrag rule_bndrs poly_id rule_lhs_args + rule_bndrs (core_app poly_rhs) spec_inl } } {- dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id @@ -878,8 +877,8 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id -} dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id - , spe_tv_bndrs = tv_bndrs , spe_id_bndrs = id_bndrs + , spe_tv_bndrs = tv_bndrs , spe_lhs_ev_bndrs = lhs_evs , spe_lhs_binds = lhs_binds , spe_lhs_call = the_call @@ -896,6 +895,7 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id dsLExpr the_call ; tracePm "dsSpec1" (vcat [ ppr poly_id + , text "tv_bndrs" <+> ppr tv_bndrs , text "lhs_binds" <+> ppr lhs_binds , text "ds_lhs_binds" <+> ppr ds_lhs_binds , text "ds_call" <+> ppr ds_call ]) @@ -905,28 +905,65 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id simpleOptExpr simpl_opts $ ds_call - lhs_id_bndrs = filterOut (`elemVarSet` exprFreeVars core_call) $ - id_bndrs ++ bindersOfBinds ds_lhs_binds - -- All the vars in core_call that should be quantified + lhs_id_bndrs = id_bndrs ++ lhs_evs ++ bindersOfBinds ds_lhs_binds + id_bndr_set = mkVarSet lhs_id_bndrs + -- lhs_id_bndrs: all the Ids in core_call that should be quantified + -- These are the ones free in core_call that are local + -- to this specialisation, not global + + rule_bndrs = scopedSort (exprSomeFreeVarsList quantify_me core_call) + quantify_me v = isTyVar v || v `elemVarSet` id_bndr_set + -- Quantify over all tyvars; but only over Ids boundx explicitly + -- this is a terrible hack. What about local SPECIALISE pragmas + -- that mention some in-scope TyVar? rhs_const_binds :: [CoreBind] rhs_const_binds = get_const_ev_binds lhs_evs ds_lhs_binds + const_bndrs = mkVarSet (bindersOfBinds rhs_const_binds) - spec_id_bndrs = filterOut (`elemVarSet` const_bndrs) lhs_id_bndrs + spec_bndrs = filterOut (`elemVarSet` const_bndrs) rule_bndrs fn_body = specFunBody poly_id mb_poly_rhs - spec_body = mkLets rhs_const_binds $ - mkCoreApps fn_body lhs_args - - ; tracePm "dsSpec1" (vcat [ ppr poly_id $$ ppr ds_call $$ ppr core_call]) - ; finishSpecPrag mb_poly_rhs - (tv_bndrs ++ lhs_id_bndrs) core_call - (tv_bndrs ++ spec_id_bndrs) spec_body inl } + ; tracePm "dsSpec2" (vcat [ text "poly_id" <+> ppr poly_id + , text "ds_call" <+> ppr ds_call + , text "core_call" <+> ppr core_call + , text "core_call fvs" <+> ppr (exprFreeVars core_call) + , text "lhs_evs" <+> ppr lhs_evs + , text "id_bndrs" <+> ppr id_bndrs + , text "lhs_id_bndrs" <+> ppr lhs_id_bndrs + , text "rhs_const_binds" <+> ppr rhs_const_binds + ]) + + ; case collectArgs core_call of + (Var fn_id, lhs_args) + -> assertPpr (fn_id == poly_id) (ppr fn_id $$ ppr poly_id) $ + finishSpecPrag + rule_bndrs poly_id lhs_args + spec_bndrs spec_body inl + where + spec_body = mkLets rhs_const_binds $ + mkCoreApps fn_body lhs_args + + _other -> do { diagnosticDs (DsRuleLhsTooComplicated ds_call core_call) + ; return Nothing } } where drop_cast (Cast e _) = drop_cast e drop_cast e = e +get_const_ev_binds :: [EvVar] -> [CoreBind] -> [CoreBind] +get_const_ev_binds evs ev_binds + = go (mkVarSet evs) ev_binds + where + go :: VarSet -> [CoreBind] -> [CoreBind] + go _ [] = [] + go qevs (bind : binds) + | all (isEmptyVarSet . exprSomeFreeVars (`elemVarSet` qevs)) $ + rhssOfBind bind + = bind : go qevs binds + | otherwise + = go (qevs `extendVarSetList` bindersOf bind) binds + failBecauseOfClassOp :: Id -> DsM (Maybe a) -- There is no point in trying to specialise a class op -- Moreover, classops don't (currently) have an inl_sat arity set @@ -938,16 +975,16 @@ failBecauseOfClassOp poly_id finishSpecPrag :: [Var] -> Id -> [CoreExpr] -- LHS pattern -> [Var] -> CoreExpr -> InlinePragma -- Specialised form -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) -finishSpecPrag rule_bndrs poly_id rule_bndrs rhs_lhs_args +finishSpecPrag rule_bndrs poly_id rule_lhs_args spec_bndrs spec_body spec_inl - do { this_mod <- getModule + = do { this_mod <- getModule ; uniq <- newUnique + ; dflags <- getDynFlags ; let poly_name = idName poly_id spec_occ = mkSpecOcc (getOccName poly_name) spec_name = mkInternalName uniq spec_occ (getSrcSpan poly_name) - poly_rhs = specFunBody poly_id mb_poly_rhs id_inl = idInlinePragma poly_id - inl_prag = specFunInlinePrag mb_poly_rhs poly_id id_inl spec_inl + inl_prag = specFunInlinePrag poly_id id_inl spec_inl rule_act = specRuleActivation id_inl spec_inl simpl_opts = initSimpleOpts dflags @@ -963,7 +1000,7 @@ finishSpecPrag rule_bndrs poly_id rule_bndrs rhs_lhs_args poly_id rule_bndrs rule_lhs_args (mkVarApps (Var spec_id) spec_bndrs) - rule_lhs_ty = exprType (mkVarApps poly_id rule_lhs_args) + rule_lhs_ty = exprType (mkApps (Var poly_id) rule_lhs_args) spec_ty = mkLamTypes spec_bndrs rule_lhs_ty spec_rhs = mkLams spec_bndrs spec_body @@ -972,13 +1009,13 @@ finishSpecPrag rule_bndrs poly_id rule_bndrs rhs_lhs_args ; tracePm "dsSpec" (vcat [ text "fun:" <+> ppr poly_id , text "spec_bndrs:" <+> ppr spec_bndrs + , text "spec_body:" <+> ppr spec_body , text "args:" <+> ppr rule_lhs_args ]) ; return (Just (unitOL (spec_id, spec_rhs), rule)) -- NB: do *not* use makeCorePair on (spec_id,spec_rhs), because -- makeCorePair overwrites the unfolding, which we have -- just created using specUnfolding - } } } - where + } specFunBody :: Id -> Maybe CoreExpr -> CoreExpr specFunBody _ (Just rhs) @@ -992,19 +1029,17 @@ specFunBody poly_id Nothing | otherwise = pprPanic "dsImpSpecs" (ppr poly_id) -- The type checker has checked that it *has* an unfolding -specFunInlinePrag :: Maybe CoreExpr -> Id -> InlinePragma +specFunInlinePrag :: Id -> InlinePragma -> InlinePragma -> InlinePragma -- See Note [Activation pragmas for SPECIALISE] -specFunInlinePrag mb_poly_rhs poly_id id_inl spec_inl +specFunInlinePrag poly_id id_inl spec_inl | not (isDefaultInlinePragma spec_inl) = spec_inl - | not is_local_id -- See Note [Specialising imported functions] - -- in OccurAnal + | isGlobalId poly_id -- See Note [Specialising imported functions] + -- in OccurAnal , isStrongLoopBreaker (idOccInfo poly_id) = neverInlinePragma | otherwise = id_inl -- Get the INLINE pragma from SPECIALISE declaration, or, -- failing that, from the original Id - where - is_local_id = isJust mb_poly_rhs specRuleActivation :: InlinePragma -> InlinePragma -> Activation specRuleActivation id_inl spec_inl ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -37,9 +37,9 @@ import {-# SOURCE #-} GHC.Tc.Gen.Expr ( tcInferRho, tcCheckMonoExpr ) import GHC.Tc.Errors.Types ( FixedRuntimeRepProvenance(..), TcRnMessage(..) ) import GHC.Tc.Gen.HsType import GHC.Tc.Solver( reportUnsolvedEqualities, pushLevelAndSolveEqualitiesX - , growThetaTyVars ) + , emitResidualConstraints ) import GHC.Tc.Solver.Solve( solveWanteds ) -import GHC.Tc.Solver.Monad( runTcS ) +import GHC.Tc.Solver.Monad( runTcS, runTcSWithEvBinds ) import GHC.Tc.Validity ( checkValidType ) import GHC.Tc.Utils.Monad @@ -50,7 +50,7 @@ import GHC.Tc.Utils.Instantiate( topInstantiate, tcInstTypeBndrs ) import GHC.Tc.Utils.Env import GHC.Tc.Types.Origin -import GHC.Tc.Types.Evidence( HsWrapper, (<.>) ) +import GHC.Tc.Types.Evidence( HsWrapper, (<.>), emptyTcEvBinds, TcEvBinds(..) ) import GHC.Tc.Types.Constraint import GHC.Tc.Zonk.TcType @@ -921,22 +921,31 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) let skol_info_anon = SpecESkol nm ; traceTc "tcSpecPrag: specSigE1" (ppr nm $$ ppr spec_e) ; skol_info <- mkSkolemInfo skol_info_anon - ; (tc_lvl, wanted, (id_bndrs, spec_e', rho)) + ; (rhs_tclvl, wanted, (tv_bndrs, id_bndrs, spec_e')) <- pushLevelAndCaptureConstraints $ do { (tv_bndrs, id_bndrs) <- tcRuleBndrs skol_info bndrs ; tcExtendNameTyVarEnv [(tyVarName tv, tv) | tv <- tv_bndrs] $ tcExtendIdEnv id_bndrs $ - do { (L loc spec_e', rho) <- tcInferRho spec_e - ; return (id_bndrs, L loc spec_e', rho) } } + do { (L loc spec_e', _rho) <- tcInferRho spec_e + ; return (tv_bndrs, id_bndrs, L loc spec_e') } } - ; (qtkvs, qevs, ev_binds, insol) <- simplifyInfer TopLevel tc_lvl NoRestrictions - [] [(nm,rho)] wanted + ; ev_binds_var <- newTcEvBinds + ; wanted <- setTcLevel rhs_tclvl $ + runTcSWithEvBinds ev_binds_var $ + solveWanteds wanted + + ; let quant_cts = approximateWC False wanted + ; qevs <- mk_quant_evs quant_cts + + ; emitResidualConstraints rhs_tclvl skol_info_anon ev_binds_var + emptyVarSet tv_bndrs qevs + wanted ; return [SpecPragE { spe_poly_id = poly_id - , spe_tv_bndrs = qtkvs + , spe_tv_bndrs = tv_bndrs , spe_id_bndrs = id_bndrs , spe_lhs_ev_bndrs = qevs - , spe_lhs_binds = ev_binds + , spe_lhs_binds = TcEvBinds ev_binds_var , spe_lhs_call = spec_e' , spe_rhs_ev_bndrs = [] , spe_rhs_binds = emptyTcEvBinds ===================================== compiler/GHC/Tc/Solver.hs ===================================== @@ -16,7 +16,7 @@ module GHC.Tc.Solver( tcNormalise, approximateWC, -- Exported for plugins to use - captureTopConstraints, + captureTopConstraints, emitResidualConstraints, simplifyTopWanteds, @@ -968,14 +968,17 @@ simplifyInfer top_lvl rhs_tclvl infer_mode sigs name_taus wanteds ; bound_theta_vars <- mapM TcM.newEvVar bound_theta ; let full_theta = map idType bound_theta_vars - ; skol_info <- mkSkolemInfo (InferSkol [ (name, mkPhiTy full_theta ty) - | (name, ty) <- name_taus ]) + skol_info = InferSkol [ (name, mkPhiTy full_theta ty) + | (name, ty) <- name_taus ] + -- mkPhiTy: we don't add the quantified variables here, because + -- they are also bound in ic_skols and we want them to be tidied + -- uniformly. } -- Now emit the residual constraint - ; emitResidualConstraints rhs_tclvl ev_binds_var - name_taus co_vars qtvs bound_theta_vars + ; emitResidualConstraints rhs_tclvl skol_info ev_binds_var + co_vars qtvs bound_theta_vars wanted_transformed -- All done! @@ -992,13 +995,12 @@ simplifyInfer top_lvl rhs_tclvl infer_mode sigs name_taus wanteds partial_sigs = filter isPartialSig sigs -------------------- -emitResidualConstraints :: TcLevel -> EvBindsVar - -> [(Name, TcTauType)] +emitResidualConstraints :: TcLevel -> SkolemInfoAnon -> EvBindsVar -> CoVarSet -> [TcTyVar] -> [EvVar] -> WantedConstraints -> TcM () -- Emit the remaining constraints from the RHS. -emitResidualConstraints rhs_tclvl ev_binds_var - name_taus co_vars qtvs full_theta_vars wanteds +emitResidualConstraints rhs_tclvl skol_info ev_binds_var + co_vars qtvs full_theta_vars wanteds | isEmptyWC wanteds = return () @@ -1031,13 +1033,6 @@ emitResidualConstraints rhs_tclvl ev_binds_var ; emitConstraints (emptyWC { wc_simple = outer_simple , wc_impl = implics }) } - where - full_theta = map idType full_theta_vars - skol_info = InferSkol [ (name, mkPhiTy full_theta ty) - | (name, ty) <- name_taus ] - -- We don't add the quantified variables here, because they are - -- also bound in ic_skols and we want them to be tidied - -- uniformly. -------------------- findInferredDiff :: TcThetaType -> TcThetaType -> TcM TcThetaType @@ -1286,7 +1281,7 @@ decideQuantification :: TopLevelFlag -> TcLevel -> InferMode - -> SkolemInfo + -> SkolemInfoAnon -> [(Name, TcTauType)] -- Variables to be generalised -> [TcIdSigInst] -- Partial type signatures (if any) -> WantedConstraints -- Candidate theta; already zonked @@ -1818,13 +1813,13 @@ defaultTyVarsAndSimplify rhs_tclvl candidates ------------------ decideQuantifiedTyVars - :: SkolemInfo + :: SkolemInfoAnon -> [(Name,TcType)] -- Annotated theta and (name,tau) pairs -> [TcIdSigInst] -- Partial signatures -> [PredType] -- Candidates, zonked -> TcM [TyVar] -- Fix what tyvars we are going to quantify over, and quantify them -decideQuantifiedTyVars skol_info name_taus psigs candidates +decideQuantifiedTyVars skol_info_anon name_taus psigs candidates = do { -- Why psig_tys? We try to quantify over everything free in here -- See Note [Quantification and partial signatures] -- Wrinkles 2 and 3 @@ -1855,6 +1850,7 @@ decideQuantifiedTyVars skol_info name_taus psigs candidates , text "grown_tcvs =" <+> ppr grown_tcvs , text "dvs =" <+> ppr dvs_plus]) + ; skol_info <- mkSkolemInfo skol_info_anon ; quantifyTyVars skol_info DefaultNonStandardTyVars dvs_plus } ------------------ ===================================== compiler/GHC/Tc/Zonk/Type.hs ===================================== @@ -863,7 +863,8 @@ zonkLTcSpecPrags ps , spe_lhs_binds = lhs_binds, spe_rhs_binds = rhs_binds , spe_lhs_call = spec_e , spe_inl = inl })) - = runZonkBndrT (zonkCoreBndrsX tv_bndrs) $ \tv_bndrs' -> + = setZonkType SkolemiseFlexi $ + runZonkBndrT (zonkCoreBndrsX tv_bndrs) $ \tv_bndrs' -> runZonkBndrT (zonkCoreBndrsX id_bndrs) $ \id_bndrs' -> runZonkBndrT (zonkCoreBndrsX lhs_evs) $ \lhs_evs' -> runZonkBndrT (zonkTcEvBinds lhs_binds) $ \lhs_binds' -> ===================================== testsuite/tests/typecheck/should_compile/tc212.hs ===================================== @@ -5,5 +5,5 @@ module ShouldCompile where -- A specialise pragma with no type signature -- fac :: Num a => a -> a -fac n = n -- fac (n + 1) +fac n = fac (n + 1) {-# SPECIALISE fac :: Int -> Int #-} View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dea62ed9184a5c0fa24d6496a87711a762827c3f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dea62ed9184a5c0fa24d6496a87711a762827c3f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 24 00:25:38 2024 From: gitlab at gitlab.haskell.org (Brandon Chinn (@brandonchinn178)) Date: Sat, 23 Nov 2024 19:25:38 -0500 Subject: [Git][ghc/ghc][wip/interpolated-strings] Implement interpolated strings Message-ID: <674272825664f_b391b646dc4148d5@gitlab.mail> Brandon Chinn pushed to branch wip/interpolated-strings at Glasgow Haskell Compiler / GHC Commits: f7cdd5a8 by Brandon Chinn at 2024-11-23T16:22:10-08:00 Implement interpolated strings - - - - - 7 changed files: - compiler/GHC/Hs/Expr.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Lexer.x - compiler/GHC/Parser/String.hs - compiler/GHC/Rename/Expr.hs - compiler/Language/Haskell/Syntax/Expr.hs - compiler/Language/Haskell/Syntax/Extension.hs Changes: ===================================== compiler/GHC/Hs/Expr.hs ===================================== @@ -254,6 +254,9 @@ type instance XIPVar GhcRn = NoExtField type instance XIPVar GhcTc = DataConCantHappen type instance XOverLitE (GhcPass _) = NoExtField type instance XLitE (GhcPass _) = NoExtField +type instance XInterString (GhcPass _) = NoExtField +type instance XInterStringRaw (GhcPass _) = NoExtField +type instance XInterStringExp (GhcPass _) = NoExtField type instance XLam (GhcPass _) = EpAnnLam type instance XApp (GhcPass _) = NoExtField ===================================== compiler/GHC/Parser.y ===================================== @@ -729,6 +729,11 @@ are the most common patterns, rewritten as regular expressions for clarity: CHAR { L _ (ITchar _ _) } STRING { L _ (ITstring _ _ StringTypeSingle) } STRING_MULTI { L _ (ITstring _ _ StringTypeMulti) } + STRING_INTER_BEGIN { L _ (ITstringInterBegin _) } + STRING_INTER_RAW { L _ (ITstringInterRaw _ _) } + STRING_INTER_EXP_OPEN { L _ ITstringInterExpOpen } + STRING_INTER_EXP_CLOSE { L _ ITstringInterExpClose } + STRING_INTER_END { L _ (ITstringInterEnd _) } INTEGER { L _ (ITinteger _) } RATIONAL { L _ (ITrational _) } @@ -3113,6 +3118,8 @@ aexp2 :: { ECP } -- into HsOverLit when -XOverloadedStrings is on. -- | STRING { sL (getLoc $1) (HsOverLit $! mkHsIsString (getSTRINGs $1) -- (getSTRING $1) noExtField) } + | stringInter {% fmap ecpFromExp + (ams1 $1 (HsInterString NoExtField $! unLoc $1)) } | INTEGER { ECP $ mkHsOverLitPV (sL1a $1 $ mkHsIntegral (getINTEGER $1)) } | RATIONAL { ECP $ mkHsOverLitPV (sL1a $1 $ mkHsFractional (getRATIONAL $1)) } @@ -3707,6 +3714,14 @@ ipvar :: { Located HsIPName } overloaded_label :: { Located (SourceText, FastString) } : LABELVARID { sL1 $1 (getLABELVARIDs $1, getLABELVARID $1) } +----------------------------------------------------------------------------- +-- Interpolated strings +-- See Note [Interpolated strings] in GHC.Parser.String + +stringInter :: { [Either FastString (LHsExpr GhcPs)] } + -- TODO(bchinn): break out recursive stringInterPart rule + : STRING_INTER_BEGIN (STRING_INTER_RAW | STRING_INTER_EXP_OPEN exp STRING_INTER_EXP_CLOSE)* STRING_INTER_END { undefined } + ----------------------------------------------------------------------------- -- Warnings and deprecations ===================================== compiler/GHC/Parser/Lexer.x ===================================== @@ -170,7 +170,7 @@ $idchar = [$small $large $digit $uniidchar \'] $unigraphic = \x06 -- Trick Alex into handling Unicode. See Note [Unicode in Alex]. $graphic = [$small $large $symbol $digit $idchar $special $unigraphic \"\'] -$charesc = [a b f n r t v \\ \" \' \&] +$charesc = [a b f n r t v \\ \" \' \& \$] $binit = 0-1 $octit = 0-7 @@ -228,8 +228,9 @@ $docsym = [\| \^ \* \$] -- character sets can be subtracted, not strings @escape = \\ ( $charesc | @ascii | @decimal | o @octal | x @hexadecimal ) @escapechar = \\ ( $charesc # \& | @ascii | @decimal | o @octal | x @hexadecimal ) - at stringchar = ($graphic # [\\ \"]) | $space | @escape | @gap - at char = ($graphic # [\\ \']) | $space | @escapechar + at stringchar = ($graphic # [\\ \"]) | $space | @escape | @gap + at char = ($graphic # [\\ \']) | $space | @escapechar + at stringinterchar = ($graphic # [\\ \" \$]) | $space | @escape | @gap -- normal signed numerical literals can only be explicitly negative, -- not explicitly positive (contrast @exponent) @@ -629,6 +630,21 @@ $unigraphic / { isSmartQuote } { smart_quote_error } (\" | \"\") / ([\n .] # \") { tok_string_multi_content } } +-- See Note [Interpolated strings] +<0> { + s \" { \span _ _ _ -> pushLexState string_inter_content >> pure (L span (ITstringInterBegin StringTypeSingle)) } + -- TODO(bchinn): interpolated multiline strings +} + +-- TODO(bchinn): add string_inter state to all <0> states that can be in an interpolated string + { + @stringinterchar* { tok_string_inter_raw } + \$ \{ { \span _ _ _ -> pushLexState string_inter >> pure (L span ITstringInterExpOpen) } + \" { \span _ _ _ -> popLexState >> pure (L span (ITstringInterEnd StringTypeSingle)) } + + -- TODO(bchinn): check for smart quotes +} + <0> { \'\' { token ITtyQuote } @@ -923,6 +939,13 @@ data Token | ITchar SourceText Char -- Note [Literal source text] in "GHC.Types.SourceText" | ITstring SourceText FastString StringType -- Note [Literal source text] in "GHC.Types.SourceText" + -- See Note [Interpolated strings] + | ITstringInterBegin StringType + | ITstringInterRaw SourceText RawLexedString -- Note [Literal source text] in "GHC.Types.SourceText" + | ITstringInterExpOpen + | ITstringInterExpClose + | ITstringInterEnd StringType + | ITinteger IntegralLit -- Note [Literal source text] in "GHC.Types.SourceText" | ITrational FractionalLit @@ -1672,8 +1695,11 @@ open_brace span _str _len _buf2 = do setContext (NoLayout:ctx) return (L span ITocurly) close_brace span _str _len _buf2 = do - popContext - return (L span ITccurly) + ctx <- getContext + sc <- getLexState + if null ctx && sc == string_inter + then popLexState >> pure (L span ITstringInterExpClose) + else popContext >> pure (L span ITccurly) qvarid, qconid :: StringBuffer -> Int -> Token qvarid buf len = ITqvarid $! splitQualName buf len False ===================================== compiler/GHC/Parser/String.hs ===================================== @@ -8,6 +8,10 @@ module GHC.Parser.String ( StringType (..), lexString, + -- * Raw strings + RawLexedString, + lexStringRaw, + -- * Unicode smart quote helpers isDoubleSmartQuote, isSingleSmartQuote, @@ -17,8 +21,11 @@ import GHC.Prelude hiding (getChar) import Control.Arrow ((>>>)) import Control.Monad (when) +import Data.Bifunctor (first) import Data.Char (chr, ord) import qualified Data.Foldable1 as Foldable1 +import Data.Functor.Identity (Identity (..)) +import Data.List (unsnoc) import qualified Data.List.NonEmpty as NonEmpty import Data.Maybe (listToMaybe, mapMaybe) import GHC.Data.StringBuffer (StringBuffer) @@ -259,6 +266,75 @@ isSingleSmartQuote = \case '’' -> True _ -> False +-- ----------------------------------------------------------------------------- +-- Interpolated strings + +-- | A string that's been validated to be lexically correct, but still +-- contains the raw string lexed, without anything resolved. +newtype RawLexedString = RawLexedString {unRawLexedString :: String} + +-- | Load and validate the string in the given StringBuffer. +-- +-- e.g. Lexing "a\nb" will return RawLexedString ['a', '\\', 'n', 'b']. +lexStringRaw :: Int -> StringBuffer -> Either StringLexError RawLexedString +lexStringRaw len buf = RawLexedString (bufferChars len buf) <$ validateString len buf + +fromRawLexedStringSingle :: RawLexedString -> String +fromRawLexedStringSingle (RawLexedString s) = + case processCharsSingle s of + Right s' -> s' + Left _ -> panic "Unexpectedly got an error when re-lexing the string" + +fromRawLexedStringMulti :: (RawLexedString, [(x, RawLexedString)]) -> (String, [(x, String)]) +fromRawLexedStringMulti s = + case processCharsMulti (to s) of + Just s' -> from s' + Nothing -> panic "Unexpectedly got an error when re-lexing the string" + where + to (pre, parts) = InterMultiString pre parts + from (InterMultiString pre parts) = (pre, parts) + +{- +Note [Interpolated strings] +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Interpolated string syntax was accepted in this proposal: +https://github.com/ghc-proposals/ghc-proposals/pull/570 + +Interpolated strings are syntax sugar for + +Interpolated strings are implemented in the following manner: + +1. Lexer takes the string as input: + + s"Hello ${Text.toUpper name}!" + + and outputs the following tokens: + + [ ITstringInterBegin src StringTypeSingle + , ITstringInterRaw src "Hello " + , ITstringInterExpOpen src + , ITqvarid ("Text.toUpper", "name") + , ITvarid "name" + , ITstringInterExpClose src + , ITstringInterRaw src "!" + , ITstringInterEnd src StringTypeSingle + ] + +2. The parser will then parse the tokens into the following HsExpr: + + HsInterString ext + [ HsInterRaw ext "Hello " + , HsInterExp ext $ + HsApp ext + (HsVar ext 'Text.toUpper) + (HsVar ext 'name) + , HsInterRaw ext "!" + ] + +3. This will then be desugared into +-} + -- ----------------------------------------------------------------------------- -- Multiline strings @@ -268,20 +344,54 @@ isSingleSmartQuote = \case -- and rejoining lines, and instead manually find newline characters, -- for performance. processCharsMulti :: String -> Maybe String -processCharsMulti = - collapseGaps -- Step 1 - >>> normalizeEOL - >>> expandLeadingTabs -- Step 3 - >>> rmCommonWhitespacePrefix -- Step 4 - >>> collapseOnlyWsLines -- Step 5 - >>> rmFirstNewline -- Step 7a - >>> rmLastNewline -- Step 7b - >>> resolveEscapesMaybe -- Step 8 +processCharsMulti = fmap from . processCharsMulti' . to + where + -- Convert a normal multiline string to/from an interpolated multiline string + -- with no interpolated expressions. + to s = InterMultiString s [] + from = \case + InterMultiString s [] -> s + _ -> panic "Got unexpected result when processing characters in multiline string" + +-- | An interpolated, multiline string to be processed. +-- +-- `x` here will only ever be instantiated as `HsExpr`, but we'll leave it general to ensure +-- we never modify it, we only ever propagate it. +-- +-- We represent this as a list of (x, String) tuples instead of [Either x String] to guarantee +-- that we don't have to handle two raw Strings next to each other. +data InterMultiString x = + InterMultiString + String -- ^ beginning of the string before the first interpolated expr + [(x, String)] -- ^ (expr, raw string) interleaved groups + +-- Run the given function over all raw strings, ignoring expressions +overRaw :: (String -> String) -> InterMultiString x -> InterMultiString x +overRaw f = runIdentity . overRawM (Identity . f) + +overRawM :: Monad m => (String -> m String) -> InterMultiString x -> m (InterMultiString x) +overRawM f (InterMultiString pre parts) = InterMultiString <$> f pre <*> (traverse . traverse) f parts + +-- | Process multiline characters generally, for both normal multiline strings and interpolated +-- multiline strings. +processCharsMulti' :: InterMultiString x -> Maybe (InterMultiString x) +processCharsMulti' = + overRaw collapseGaps -- Step 1 + >>> overRaw normalizeEOL + >>> expandLeadingTabs -- Step 3 + >>> rmCommonWhitespacePrefix -- Step 4 + >>> collapseOnlyWsLines -- Step 5 + >>> rmFirstNewline -- Step 7a + >>> rmLastNewline -- Step 7b + >>> overRawM resolveEscapesMaybe -- Step 8 -- | Expands all tabs blindly, since the lexer will verify that tabs can only appear -- as leading indentation -expandLeadingTabs :: String -> String -expandLeadingTabs = go 0 +expandLeadingTabs :: InterMultiString x -> InterMultiString x +expandLeadingTabs = + -- we can expand each raw string part independently, because leading + -- indentation will never contain an interpolated expression + overRaw $ go 0 where go !col = \case c@'\t' : cs -> @@ -303,21 +413,27 @@ normalizeEOL = go c : cs -> c : go cs [] -> [] -rmCommonWhitespacePrefix :: String -> String -rmCommonWhitespacePrefix cs0 = go cs0 +rmCommonWhitespacePrefix :: InterMultiString x -> InterMultiString x +rmCommonWhitespacePrefix s0 = + -- Whitespace prefix, by definition, only comes after newline characters, and there can + -- never be an interpolated expr within a whitespace prefix (since the expr would end + -- the prefix). So we can use a plain `map` to just process the string parts, because + -- the "drop prefix" logic will never span over multiple parts. + map (first go) parts where - commonWSPrefix = getCommonWsPrefix cs0 + -- treat interpolated exprs as a single, non-space character string + commonWSPrefix = getCommonWsPrefix $ case s0 of InterMultiString pre parts -> pre ++ concatMap snd parts go = \case - c@'\n' : cs -> c : go (dropLine commonWSPrefix cs) + c@'\n' : cs -> c : go (dropPrefix commonWSPrefix cs) c : cs -> c : go cs [] -> [] -- drop x characters from the string, or up to a newline, whichever comes first - dropLine !x = \case + dropPrefix !x = \case cs | x <= 0 -> cs cs@('\n' : _) -> cs - _ : cs -> dropLine (x - 1) cs + _ : cs -> dropPrefix (x - 1) cs [] -> [] -- | See step 4 in Note [Multiline string literals] @@ -334,30 +450,42 @@ getCommonWsPrefix s = . drop 1 -- ignore first line in calculation $ lines s -collapseOnlyWsLines :: String -> String -collapseOnlyWsLines = go +collapseOnlyWsLines :: InterMultiString x -> InterMultiString x +collapseOnlyWsLines (InterMultiString pre parts) = + let pre' = go (null parts) pre + parts' = [(expr, go isLast s) | ((expr, s), isLast) <- withIsLast parts] + in InterMultiString pre' parts' where - go = \case - c@'\n' : cs | Just cs' <- checkAllWs cs -> c : go cs' + go isLast = \case + c@'\n' : cs | Just cs' <- checkAllWs isLast cs -> c : go cs' c : cs -> c : go cs [] -> [] - checkAllWs = \case + checkAllWs isLast = \case -- got all the way to a newline or the end of the string, return cs@('\n' : _) -> Just cs - cs@[] -> Just cs + cs@[] | isLast -> Just cs -- found whitespace, continue c : cs | is_space c -> checkAllWs cs -- anything else, stop _ -> Nothing -rmFirstNewline :: String -> String -rmFirstNewline = \case - '\n' : cs -> cs - cs -> cs + -- annotate every element with a Bool indicating if it's the last element + withIsLast :: [a] -> [(a, Bool)] + withIsLast xs = zip xs $ (False <$ init xs) ++ [True] -rmLastNewline :: String -> String -rmLastNewline = go +rmFirstNewline :: InterMultiString x -> InterMultiString x +rmFirstNewline = \case + InterMultiString ('\n' : pre) parts -> InterMultiString pre parts + s -> s + +rmLastNewline :: InterMultiString x -> InterMultiString x +rmLastNewline (InterMultiString pre parts) = + case unsnoc parts of + Nothing -> + InterMultiString (go pre) parts + Just (parts0, (x, lastLine)) -> + InterMultiString pre (parts0 ++ [(x, go lastLine)]) where go = \case [] -> [] ===================================== compiler/GHC/Rename/Expr.hs ===================================== @@ -390,6 +390,9 @@ rnExpr (HsOverLit x lit) return (HsApp noExtField (noLocA neg) (noLocA (HsOverLit x lit')) , fvs ) } +rnExpr (HsInterString x ty parts) + = undefined -- TODO(bchinn) + rnExpr (HsApp x fun arg) = do { (fun',fvFun) <- rnLExpr fun ; (arg',fvArg) <- rnLExpr arg ===================================== compiler/Language/Haskell/Syntax/Expr.hs ===================================== @@ -346,19 +346,24 @@ data HsExpr p -- erroring expression will be written after -- solving. See Note [Holes] in GHC.Tc.Types.Constraint. - - | HsOverLabel (XOverLabel p) FastString -- ^ Overloaded label (Note [Overloaded labels] in GHC.OverloadedLabels) | HsIPVar (XIPVar p) HsIPName -- ^ Implicit parameter (not in use after typechecking) + | HsOverLit (XOverLitE p) (HsOverLit p) -- ^ Overloaded literals | HsLit (XLitE p) (HsLit p) -- ^ Simple (non-overloaded) literals + | -- | See Note [Interpolated strings] + HsInterString + (XInterString p) + HsStringType + [Either FastString (LHsExpr p)] + -- | Lambda, Lambda-case, and Lambda-cases | HsLam (XLam p) HsLamVariant -- ^ Tells whether this is for lambda, \case, or \cases ===================================== compiler/Language/Haskell/Syntax/Extension.hs ===================================== @@ -410,6 +410,9 @@ type family XOverLabel x type family XIPVar x type family XOverLitE x type family XLitE x +type family XInterString x +type family XInterStringRaw x +type family XInterStringExp x type family XLam x type family XLamCase x type family XApp x View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f7cdd5a88193dee78d9603217645f99ff8be9727 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f7cdd5a88193dee78d9603217645f99ff8be9727 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sun Nov 24 11:49:27 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Sun, 24 Nov 2024 06:49:27 -0500 Subject: [Git][ghc/ghc][wip/base-unit-hash] driver: Always link against "base" package when one shot linking Message-ID: <674312c7dbd93_2b93d13d75343942d@gitlab.mail> Zubin pushed to branch wip/base-unit-hash at Glasgow Haskell Compiler / GHC Commits: 82c34f27 by Matthew Pickering at 2024-11-24T17:19:07+05:30 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 14 changed files: - .gitlab/hello.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== .gitlab/hello.hs ===================================== @@ -1,5 +1,6 @@ {-# OPTIONS_GHC -Wall -Wno-missing-fields #-} +import GHC.Unit.Types (stringToUnitId) import GHC hiding (parseModule) import GHC.Data.StringBuffer import GHC.Driver.Config.Parser @@ -26,7 +27,8 @@ fakeSettings = sToolSettings = ToolSettings {}, sTargetPlatform = genericPlatform, - sPlatformMisc = PlatformMisc {} + sPlatformMisc = PlatformMisc {}, + sUnitSettings = UnitSettings { unitSettings_baseUnitId = stringToUnitId "base" } } fakeDynFlags :: DynFlags ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1484,6 +1491,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,17 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl link against a different base package by default. +dnl If the package is unavailable it will simply not be linked against. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,27 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/82c34f27578fbcb3c7adc03ab4cd2c69a9a71046 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/82c34f27578fbcb3c7adc03ab4cd2c69a9a71046 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 01:26:01 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Sun, 24 Nov 2024 20:26:01 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 14 commits: gitlab-ci: Bump ci-images Message-ID: <6743d229122bb_2c2c521210ec6423f@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - 454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - 340aed44 by Ben Gamari at 2024-11-24T20:25:25-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - 5002fa3d by Simon Hengel at 2024-11-24T20:25:33-05:00 Refactoring: Use `OnOff` more consistently for `Extension` - - - - - 21 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Types/Hint/Ppr.hs - docs/users_guide/exts/type_abstractions.rst - hadrian/src/Rules/ToolArgs.hs - libraries/ghc-internal/src/GHC/Internal/Exception.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs - rts/Linker.c - testsuite/driver/testlib.py - testsuite/tests/ghc-api/exactprint/all.T - testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - testsuite/tests/rts/ipe/IpeStats/Makefile Changes: ===================================== .gitlab-ci.yml ===================================== @@ -2,7 +2,7 @@ variables: GIT_SSL_NO_VERIFY: "1" # Commit of ghc/ci-images repository from which to pull Docker images - DOCKER_REV: efc1ab81236eb37e20cb287ec77aebb6c6341098 + DOCKER_REV: eb4d3389fd62e4f7321a0c8799014ec1f4da0708 # Sequential version number of all cached things. # Bump to invalidate GitLab CI cache. ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -415,6 +415,13 @@ type Variables = MonoidalMap String [String] (=:) :: String -> String -> Variables a =: b = MonoidalMap (Map.singleton a [b]) +type TestName = String + +brokenTest :: TestName -- ^ test name + -> String -- ^ explanation of breakage + -> Variables +brokenTest test _why = "BROKEN_TESTS" =: test + opsysVariables :: Arch -> Opsys -> Variables opsysVariables _ FreeBSD13 = mconcat [ -- N.B. we use iconv from ports as I see linker errors when we attempt @@ -463,13 +470,16 @@ alpineVariables arch = mconcat $ [ -- Due to #20266 "CONFIGURE_ARGS" =: "--disable-ld-override" , "INSTALL_CONFIGURE_ARGS" =: "--disable-ld-override" - -- encoding004: due to lack of locale support - -- T10458, ghcilink002: due to #17869 - , "BROKEN_TESTS" =: "encoding004 T10458" + , brokenTest "encoding004" "due to lack of locale support" + , brokenTest "T10458" "#17869" + ] ++ + [ mconcat [ brokenTest test "#25498" | test <- ["simd009", "T25062_V16", "T25169", "T22187_run"] ] + | I386 <- [arch] ] ++ + [ brokenTest "T22033" "#25497" | I386 <- [arch] ] ++ [-- Bootstrap compiler has incorrectly configured target triple #25200 "CONFIGURE_ARGS" =: "--enable-ignore-build-platform-mismatch --build=aarch64-unknown-linux --host=aarch64-unknown-linux --target=aarch64-unknown-linux" - | AArch64 <- [arch] + | AArch64 <- [arch] ] @@ -479,7 +489,7 @@ distroVariables arch Alpine318 = alpineVariables arch distroVariables arch Alpine320 = alpineVariables arch distroVariables _ Centos7 = mconcat [ "HADRIAN_ARGS" =: "--docs=no-sphinx" - , "BROKEN_TESTS" =: "T22012" -- due to #23979 + , brokenTest "T22012" "#23979" ] distroVariables _ Fedora33 = mconcat -- LLC/OPT do not work for some reason in our fedora images @@ -1138,6 +1148,7 @@ alpine_x86 = -- Dynamically linked build, suitable for building your own static executables on alpine , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken vanilla)) , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine320) (splitSectionsBroken vanilla)) + , allowFailureGroup (standardBuildsWithConfig I386 (Linux Alpine320) (splitSectionsBroken vanilla)) ] where -- ghcilink002 broken due to #17869 ===================================== .gitlab/jobs.yaml ===================================== @@ -315,6 +315,69 @@ "TEST_ENV": "aarch64-linux-deb12-validate+llvm" } }, + "i386-linux-alpine3_20-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "2 weeks", + "paths": [ + "ghc-i386-linux-alpine3_20-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bi386-linux-alpine3_20-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "validate", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-validate" + } + }, "i386-linux-deb10-validate": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -759,6 +822,70 @@ "XZ_OPT": "-9" } }, + "nightly-i386-linux-alpine3_20-validate": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "8 weeks", + "paths": [ + "ghc-i386-linux-alpine3_20-validate.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "validate", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-validate", + "XZ_OPT": "-9" + } + }, "nightly-i386-linux-deb10-validate": { "after_script": [ ".gitlab/ci.sh save_cache", @@ -3450,6 +3577,72 @@ "XZ_OPT": "-9" } }, + "release-i386-linux-alpine3_20-release+no_split_sections": { + "after_script": [ + ".gitlab/ci.sh save_cache", + ".gitlab/ci.sh save_test_output", + ".gitlab/ci.sh clean", + "cat ci_timings" + ], + "allow_failure": true, + "artifacts": { + "expire_in": "1 year", + "paths": [ + "ghc-i386-linux-alpine3_20-release+no_split_sections.tar.xz", + "junit.xml", + "unexpected-test-output.tar.gz" + ], + "reports": { + "junit": "junit.xml" + }, + "when": "always" + }, + "cache": { + "key": "i386-linux-alpine3_20-$CACHE_REV", + "paths": [ + "cabal-cache", + "toolchain" + ] + }, + "dependencies": [], + "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV", + "needs": [ + { + "artifacts": false, + "job": "hadrian-ghc-in-ghci" + } + ], + "rules": [ + { + "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)", + "when": "on_success" + } + ], + "script": [ + "sudo chown ghc:ghc -R .", + ".gitlab/ci.sh setup", + ".gitlab/ci.sh configure", + ".gitlab/ci.sh build_hadrian", + ".gitlab/ci.sh test_hadrian" + ], + "stage": "full-build", + "tags": [ + "x86_64-linux" + ], + "variables": { + "BIGNUM_BACKEND": "gmp", + "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-release+no_split_sections", + "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033", + "BUILD_FLAVOUR": "release+no_split_sections", + "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "HADRIAN_ARGS": "--hash-unit-ids", + "IGNORE_PERF_FAILURES": "all", + "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check", + "RUNTEST_ARGS": "", + "TEST_ENV": "i386-linux-alpine3_20-release+no_split_sections", + "XZ_OPT": "-9" + } + }, "release-i386-linux-deb10-release+no_split_sections": { "after_script": [ ".gitlab/ci.sh save_cache", ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -729,16 +729,6 @@ newtype FlushOut = FlushOut (IO ()) defaultFlushOut :: FlushOut defaultFlushOut = FlushOut $ hFlush stdout - - -data OnOff a = On a - | Off a - deriving (Eq, Show) - -instance Outputable a => Outputable (OnOff a) where - ppr (On x) = text "On" <+> ppr x - ppr (Off x) = text "Off" <+> ppr x - -- OnOffs accumulate in reverse order, so we use foldr in order to -- process them in the right order flattenExtensionFlags :: Maybe Language -> [OnOff LangExt.Extension] -> EnumSet LangExt.Extension ===================================== compiler/GHC/Driver/Flags.hs ===================================== @@ -29,6 +29,7 @@ module GHC.Driver.Flags , minusWcompatOpts , unusedBindsFlags + , OnOff(..) , TurnOnFlag , turnOn , turnOff @@ -77,6 +78,14 @@ instance Binary Language where instance NFData Language where rnf x = x `seq` () +data OnOff a = On a + | Off a + deriving (Eq, Show) + +instance Outputable a => Outputable (OnOff a) where + ppr (On x) = text "On" <+> ppr x + ppr (Off x) = text "Off" <+> ppr x + type TurnOnFlag = Bool -- True <=> we are turning the flag on -- False <=> we are turning the flag off turnOn :: TurnOnFlag; turnOn = True @@ -269,78 +278,77 @@ extensionNames ext = mk (extensionDeprecation ext) (extensionName ext : exte ++ mk (ExtensionDeprecatedFor [ext]) (extensionDeprecatedNames ext) where mk depr = map (\name -> (depr, name)) - -impliedXFlags :: [(LangExt.Extension, TurnOnFlag, LangExt.Extension)] +impliedXFlags :: [(LangExt.Extension, OnOff LangExt.Extension)] impliedXFlags -- See Note [Updating flag description in the User's Guide] - = [ (LangExt.RankNTypes, turnOn, LangExt.ExplicitForAll) - , (LangExt.QuantifiedConstraints, turnOn, LangExt.ExplicitForAll) - , (LangExt.ScopedTypeVariables, turnOn, LangExt.ExplicitForAll) - , (LangExt.LiberalTypeSynonyms, turnOn, LangExt.ExplicitForAll) - , (LangExt.ExistentialQuantification, turnOn, LangExt.ExplicitForAll) - , (LangExt.FlexibleInstances, turnOn, LangExt.TypeSynonymInstances) - , (LangExt.FunctionalDependencies, turnOn, LangExt.MultiParamTypeClasses) - , (LangExt.MultiParamTypeClasses, turnOn, LangExt.ConstrainedClassMethods) -- c.f. #7854 - , (LangExt.TypeFamilyDependencies, turnOn, LangExt.TypeFamilies) + = [ (LangExt.RankNTypes, On LangExt.ExplicitForAll) + , (LangExt.QuantifiedConstraints, On LangExt.ExplicitForAll) + , (LangExt.ScopedTypeVariables, On LangExt.ExplicitForAll) + , (LangExt.LiberalTypeSynonyms, On LangExt.ExplicitForAll) + , (LangExt.ExistentialQuantification, On LangExt.ExplicitForAll) + , (LangExt.FlexibleInstances, On LangExt.TypeSynonymInstances) + , (LangExt.FunctionalDependencies, On LangExt.MultiParamTypeClasses) + , (LangExt.MultiParamTypeClasses, On LangExt.ConstrainedClassMethods) -- c.f. #7854 + , (LangExt.TypeFamilyDependencies, On LangExt.TypeFamilies) - , (LangExt.RebindableSyntax, turnOff, LangExt.ImplicitPrelude) -- NB: turn off! + , (LangExt.RebindableSyntax, Off LangExt.ImplicitPrelude) -- NB: turn off! - , (LangExt.DerivingVia, turnOn, LangExt.DerivingStrategies) + , (LangExt.DerivingVia, On LangExt.DerivingStrategies) - , (LangExt.GADTs, turnOn, LangExt.GADTSyntax) - , (LangExt.GADTs, turnOn, LangExt.MonoLocalBinds) - , (LangExt.TypeFamilies, turnOn, LangExt.MonoLocalBinds) + , (LangExt.GADTs, On LangExt.GADTSyntax) + , (LangExt.GADTs, On LangExt.MonoLocalBinds) + , (LangExt.TypeFamilies, On LangExt.MonoLocalBinds) - , (LangExt.TypeFamilies, turnOn, LangExt.KindSignatures) -- Type families use kind signatures - , (LangExt.PolyKinds, turnOn, LangExt.KindSignatures) -- Ditto polymorphic kinds + , (LangExt.TypeFamilies, On LangExt.KindSignatures) -- Type families use kind signatures + , (LangExt.PolyKinds, On LangExt.KindSignatures) -- Ditto polymorphic kinds -- TypeInType is now just a synonym for a couple of other extensions. - , (LangExt.TypeInType, turnOn, LangExt.DataKinds) - , (LangExt.TypeInType, turnOn, LangExt.PolyKinds) - , (LangExt.TypeInType, turnOn, LangExt.KindSignatures) + , (LangExt.TypeInType, On LangExt.DataKinds) + , (LangExt.TypeInType, On LangExt.PolyKinds) + , (LangExt.TypeInType, On LangExt.KindSignatures) -- Standalone kind signatures are a replacement for CUSKs. - , (LangExt.StandaloneKindSignatures, turnOff, LangExt.CUSKs) + , (LangExt.StandaloneKindSignatures, Off LangExt.CUSKs) -- AutoDeriveTypeable is not very useful without DeriveDataTypeable - , (LangExt.AutoDeriveTypeable, turnOn, LangExt.DeriveDataTypeable) + , (LangExt.AutoDeriveTypeable, On LangExt.DeriveDataTypeable) -- We turn this on so that we can export associated type -- type synonyms in subordinates (e.g. MyClass(type AssocType)) - , (LangExt.TypeFamilies, turnOn, LangExt.ExplicitNamespaces) - , (LangExt.TypeOperators, turnOn, LangExt.ExplicitNamespaces) + , (LangExt.TypeFamilies, On LangExt.ExplicitNamespaces) + , (LangExt.TypeOperators, On LangExt.ExplicitNamespaces) - , (LangExt.ImpredicativeTypes, turnOn, LangExt.RankNTypes) + , (LangExt.ImpredicativeTypes, On LangExt.RankNTypes) -- Record wild-cards implies field disambiguation -- Otherwise if you write (C {..}) you may well get -- stuff like " 'a' not in scope ", which is a bit silly -- if the compiler has just filled in field 'a' of constructor 'C' - , (LangExt.RecordWildCards, turnOn, LangExt.DisambiguateRecordFields) + , (LangExt.RecordWildCards, On LangExt.DisambiguateRecordFields) - , (LangExt.ParallelArrays, turnOn, LangExt.ParallelListComp) + , (LangExt.ParallelArrays, On LangExt.ParallelListComp) - , (LangExt.JavaScriptFFI, turnOn, LangExt.InterruptibleFFI) + , (LangExt.JavaScriptFFI, On LangExt.InterruptibleFFI) - , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFunctor) - , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFoldable) + , (LangExt.DeriveTraversable, On LangExt.DeriveFunctor) + , (LangExt.DeriveTraversable, On LangExt.DeriveFoldable) -- Duplicate record fields require field disambiguation - , (LangExt.DuplicateRecordFields, turnOn, LangExt.DisambiguateRecordFields) + , (LangExt.DuplicateRecordFields, On LangExt.DisambiguateRecordFields) - , (LangExt.TemplateHaskell, turnOn, LangExt.TemplateHaskellQuotes) - , (LangExt.Strict, turnOn, LangExt.StrictData) + , (LangExt.TemplateHaskell, On LangExt.TemplateHaskellQuotes) + , (LangExt.Strict, On LangExt.StrictData) -- Historically only UnboxedTuples was required for unboxed sums to work. -- To avoid breaking code, we make UnboxedTuples imply UnboxedSums. - , (LangExt.UnboxedTuples, turnOn, LangExt.UnboxedSums) + , (LangExt.UnboxedTuples, On LangExt.UnboxedSums) -- The extensions needed to declare an H98 unlifted data type - , (LangExt.UnliftedDatatypes, turnOn, LangExt.DataKinds) - , (LangExt.UnliftedDatatypes, turnOn, LangExt.StandaloneKindSignatures) + , (LangExt.UnliftedDatatypes, On LangExt.DataKinds) + , (LangExt.UnliftedDatatypes, On LangExt.StandaloneKindSignatures) -- See Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind - , (LangExt.LinearTypes, turnOn, LangExt.MonoLocalBinds) + , (LangExt.LinearTypes, On LangExt.MonoLocalBinds) ] ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -2925,13 +2925,18 @@ unSetExtensionFlag f = upd (unSetExtensionFlag' f) setExtensionFlag', unSetExtensionFlag' :: LangExt.Extension -> DynFlags -> DynFlags setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps where - deps = [ if turn_on then setExtensionFlag' d - else unSetExtensionFlag' d - | (f', turn_on, d) <- impliedXFlags, f' == f ] + deps :: [DynFlags -> DynFlags] + deps = [ setExtension d + | (f', d) <- impliedXFlags, f' == f ] -- When you set f, set the ones it implies -- NB: use setExtensionFlag recursively, in case the implied flags -- implies further flags + setExtension :: OnOff LangExt.Extension -> DynFlags -> DynFlags + setExtension = \ case + On extension -> setExtensionFlag' extension + Off extension -> unSetExtensionFlag' extension + unSetExtensionFlag' f dflags = xopt_unset dflags f -- When you un-set f, however, we don't un-set the things it implies -- (except for -fno-glasgow-exts, which is treated specially) ===================================== compiler/GHC/Linker/Loader.hs ===================================== @@ -17,7 +17,6 @@ module GHC.Linker.Loader , showLoaderState , getLoaderState -- * Load & Unload - , loadExpr , loadDecls , loadPackages , loadModule @@ -589,52 +588,6 @@ preloadLib interp hsc_env lib_paths framework_paths pls lib_spec = do , "Try using a dynamic library instead." ] - -{- ********************************************************************** - - Link a byte-code expression - - ********************************************************************* -} - --- | Load a single expression, /including/ first loading packages and --- modules that this expression depends on. --- --- Raises an IO exception ('ProgramError') if it can't find a compiled --- version of the dependents to load. --- -loadExpr :: Interp -> HscEnv -> SrcSpan -> UnlinkedBCO -> IO ForeignHValue -loadExpr interp hsc_env span root_ul_bco = do - -- Initialise the linker (if it's not been done already) - initLoaderState interp hsc_env - - -- Take lock for the actual work. - modifyLoaderState interp $ \pls0 -> do - -- Load the packages and modules required - (pls, ok, _, _) <- loadDependencies interp hsc_env pls0 span needed_mods - if failed ok - then throwGhcExceptionIO (ProgramError "") - else do - -- Load the expression itself - -- Load the necessary packages and linkables - let le = linker_env pls - bco_ix = mkNameEnv [(unlinkedBCOName root_ul_bco, 0)] - resolved <- linkBCO interp (pkgs_loaded pls) le bco_ix root_ul_bco - [root_hvref] <- createBCOs interp [resolved] - fhv <- mkFinalizedHValue interp root_hvref - return (pls, fhv) - where - free_names = uniqDSetToList (bcoFreeNames root_ul_bco) - - needed_mods :: [Module] - needed_mods = [ nameModule n | n <- free_names, - isExternalName n, -- Names from other modules - not (isWiredInName n) -- Exclude wired-in names - ] -- (see note below) - -- Exclude wired-in names because we may not have read - -- their interface files, so getLinkDeps will fail - -- All wired-in names are in the base package, which we link - -- by default, so we can safely ignore them here. - initLinkDepsOpts :: HscEnv -> LinkDepsOpts initLinkDepsOpts hsc_env = opts where ===================================== compiler/GHC/Types/Hint/Ppr.hs ===================================== @@ -403,9 +403,7 @@ pprImpliedExtensions extension = case implied of xs -> parens $ "implied by" <+> unquotedListWith "and" xs where implied = map (quotes . ppr) . filter (\ext -> extensionDeprecation ext == ExtensionNotDeprecated) - . map (\(impl, _, _) -> impl) - . filter (\(_, t, orig) -> orig == extension && t == turnOn) - $ impliedXFlags + $ [impl | (impl, On orig) <- impliedXFlags, orig == extension] pprPrefixUnqual :: Name -> SDoc pprPrefixUnqual name = ===================================== docs/users_guide/exts/type_abstractions.rst ===================================== @@ -54,7 +54,7 @@ part of the type argument using type constructors. For a somewhat-contrived example:: - foo :: (Num a) => Maybe [a] -> String + foo :: (Show a, Num a) => Maybe [a] -> String foo (Nothing @[t]) = show (0 :: t) foo (Just @[t] xs) = show (sum xs :: t) ===================================== hadrian/src/Rules/ToolArgs.hs ===================================== @@ -99,7 +99,8 @@ multiSetup pkg_s = do writeFile' (resp_file root p) (intercalate "\n" (normalise_ghc arg_list ++ modules cd ++ concatMap rexp (reexportModules cd) - ++ ["-outputdir", hidir])) + ++ ["-outputdir", hidir, + "-this-package-name", pkgName p])) return (resp_file root p) ===================================== libraries/ghc-internal/src/GHC/Internal/Exception.hs ===================================== @@ -8,6 +8,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ViewPatterns #-} {-# OPTIONS_HADDOCK not-home #-} ----------------------------------------------------------------------------- @@ -52,7 +53,7 @@ module GHC.Internal.Exception , ratioZeroDenomException , underflowException -- ** 'ErrorCall' - , ErrorCall(..) + , ErrorCall(.., ErrorCallWithLocation) , errorCallException , errorCallWithCallStackException , toExceptionWithBacktrace @@ -178,7 +179,11 @@ data ErrorCall = ErrorCall String , Ord -- ^ @since base-4.7.0.0 ) -{-# COMPLETE ErrorCall #-} +{-# DEPRECATED ErrorCallWithLocation "ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively." #-} +pattern ErrorCallWithLocation :: String -> String -> ErrorCall +pattern ErrorCallWithLocation err loc <- ErrorCall ((\err -> (err, error "ErrorCallWithLocation has been deprecated in favour of ErrorCall (which does not have a location). Backtraces are now handled by the backtrace exception mechanisms exclusively.")) -> (err, loc)) + where ErrorCallWithLocation err _ = ErrorCall err +{-# COMPLETE ErrorCallWithLocation #-} -- | @since base-4.0.0.0 instance Exception ErrorCall ===================================== libraries/ghc-internal/src/GHC/Internal/IO/Handle/FD.hs ===================================== @@ -368,11 +368,11 @@ fdToHandle' fdint mb_type is_socket filepath iomode binary = do mkHandleFromFD fd fd_type filepath iomode is_socket enc --- | Turn an existing file descriptor into a Handle. This is used by +-- | Turn an existing file descriptor into a 'Handle'. This is used by -- various external libraries to make Handles. -- --- Makes a binary Handle. This is for historical reasons; it should --- probably be a text Handle with the default encoding and newline +-- Makes a binary 'Handle'. This is for historical reasons; it should +-- probably be a text 'Handle' with the default encoding and newline -- translation instead. fdToHandle :: Posix.FD -> IO Handle fdToHandle fdint = do @@ -389,8 +389,8 @@ fdToHandle fdint = do mkHandleFromFD fd fd_type fd_str iomode False{-non-block-} Nothing -- bin mode --- | Turn an existing Handle into a file descriptor. This function throws an --- IOError if the Handle does not reference a file descriptor. +-- | Turn an existing 'Handle' into a file descriptor. This function throws an +-- 'IOError' if the 'Handle' does not reference a file descriptor. -- -- @since base-4.10.0.0 handleToFd :: Handle -> IO FD.FD ===================================== rts/Linker.c ===================================== @@ -821,6 +821,13 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymTy NULL); } +#if defined(OBJFORMAT_ELF) + // Resolve references to the GOT if we know the origin object + if (dependent && strncmp(lbl, "_GLOBAL_OFFSET_TABLE_", 21) == 0) { + return dependent->info->got_start; + } +#endif + if (!ghciLookupSymbolInfo(symhash, lbl, &pinfo)) { IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl)); ===================================== testsuite/driver/testlib.py ===================================== @@ -1627,6 +1627,11 @@ async def test_common_work(name: TestName, opts, do_ways = [] config.hadrian_deps |= getTestOpts().hadrian_deps + # Skip tests which require hadrian dependencies if we are testing + # an out-of-tree compiler as Hadrian is unavailable. See #13897. + if not config.in_tree_compiler and getTestOpts().hadrian_deps - {'test:ghc'}: + do_ways = [] + # Run the required tests... for way in do_ways: if stopping(): ===================================== testsuite/tests/ghc-api/exactprint/all.T ===================================== @@ -1,3 +1,5 @@ +setTestOpts(req_hadrian_deps(['test:check-exact'])) + test('RenameCase1', ignore_stderr, makefile_test, ['RenameCase1']) test('LayoutLet2', ignore_stderr, makefile_test, ['LayoutLet2']) test('LayoutLet3', ignore_stderr, makefile_test, ['LayoutLet3']) ===================================== testsuite/tests/ghci/should_run/GHCiPrimCall/Makefile ===================================== @@ -1,3 +1,7 @@ +TOP=../../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + .PHONY: GHCiPrimCall GHCiPrimCall: '$(TEST_HC)' $(TEST_HC_OPTS) -fPIC -v0 -c GHCiPrimCall_cmm.cmm ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5305,6 +5307,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1300.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5274,6 +5276,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5451,6 +5453,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -232,6 +232,7 @@ module Control.Exception where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -349,6 +350,7 @@ module Control.Exception.Base where data Deadlock = Deadlock type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException @@ -5305,6 +5307,7 @@ module GHC.Exception where data CallStack = ... type ErrorCall :: * data ErrorCall = ErrorCall GHC.Internal.Base.String + pattern ErrorCallWithLocation :: GHC.Internal.Base.String -> GHC.Internal.Base.String -> ErrorCall type Exception :: * -> Constraint class (ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable e, GHC.Internal.Show.Show e) => Exception e where toException :: e -> SomeException ===================================== testsuite/tests/rts/ipe/IpeStats/Makefile ===================================== @@ -22,16 +22,16 @@ SKIPPED_SELECTOR := 'Tables skipped: [0-9]+' # statistics. ipe_stats: - @NoOmit="$$($$TEST_HC $$TEST_HC_OPTS -fforce-recomp -finfo-table-map -dipe-stats Fold.hs)" ; \ + @NoOmit="$$('$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -finfo-table-map -dipe-stats Fold.hs)" ; \ Stack=$$(echo $$NoOmit | grep -Eo $(STACK_SELECTOR) | grep -Eo '[0-9]+$$') ; \ Fallback=$$(echo $$NoOmit | grep -Eo $(FALLBACK_SELECTOR) | grep -Eo '[0-9]+$$') ; \ Skipped=$$(echo $$NoOmit | grep -Eo $(SKIPPED_SELECTOR) | grep -Eo '[0-9]+$$') ; \ Both=$$(expr $$Stack + $$Fallback) ; \ - OmitStack="$$($$TEST_HC $$TEST_HC_OPTS -fforce-recomp -finfo-table-map -fno-info-table-map-with-stack -dipe-stats Fold.hs)" ; \ + OmitStack="$$('$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -finfo-table-map -fno-info-table-map-with-stack -dipe-stats Fold.hs)" ; \ SkippedStack=$$(echo $$OmitStack | grep -Eo $(SKIPPED_SELECTOR) | grep -Eo '[0-9]+$$') ; \ - OmitFallback="$$($$TEST_HC $$TEST_HC_OPTS -fforce-recomp -finfo-table-map -fno-info-table-map-with-fallback -dipe-stats Fold.hs)" ; \ + OmitFallback="$$('$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -finfo-table-map -fno-info-table-map-with-fallback -dipe-stats Fold.hs)" ; \ SkippedFallback=$$(echo $$OmitFallback| grep -Eo $(SKIPPED_SELECTOR) | grep -Eo '[0-9]+$$') ; \ - OmitBoth="$$($$TEST_HC $$TEST_HC_OPTS -fforce-recomp -finfo-table-map -fno-info-table-map-with-stack -fno-info-table-map-with-fallback -dipe-stats Fold.hs)" ; \ + OmitBoth="$$('$(TEST_HC)' $(TEST_HC_OPTS) -fforce-recomp -finfo-table-map -fno-info-table-map-with-stack -fno-info-table-map-with-fallback -dipe-stats Fold.hs)" ; \ SkippedBoth=$$(echo $$OmitBoth| grep -Eo $(SKIPPED_SELECTOR) | grep -Eo '[0-9]+$$') ; \ echo "Baseline number of skipped tables: $$Skipped\n" ; \ echo "Baseline number of stack tables: $$Stack" ; \ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3a4d58e25cb1fd0c33f6c7dab7235b7a715a9492...5002fa3d7de76eef72a34414a21949d93e9cfe63 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3a4d58e25cb1fd0c33f6c7dab7235b7a715a9492...5002fa3d7de76eef72a34414a21949d93e9cfe63 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 06:04:06 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 25 Nov 2024 01:04:06 -0500 Subject: [Git][ghc/ghc][wip/T24744] 75 commits: Remove obsolete cross-port script Message-ID: <674413564d689_cc53f8df66c833f9@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - 454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - e197b4db by Serge S. Gulin at 2024-11-25T09:03:44+03:00 Basic cleanup - - - - - abb92844 by Serge S. Gulin at 2024-11-25T09:03:44+03:00 Add trivial optimizations for `unpackCString` and `unpackCStringUtf8` - - - - - a7e0484f by Serge S. Gulin at 2024-11-25T09:03:44+03:00 Enable static args - - - - - 16ebc88f by Serge S. Gulin at 2024-11-25T09:03:44+03:00 Alternate way "Enable static args" - - - - - 30 changed files: - .gitattributes - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/merge_request_templates/Default.md - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Parser.y The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/89cb8cb6545ef52ee07c582646bc34f1ed17e3b4...16ebc88f87c729f529d7f5553bf834c6463830db -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/89cb8cb6545ef52ee07c582646bc34f1ed17e3b4...16ebc88f87c729f529d7f5553bf834c6463830db You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 08:56:17 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 03:56:17 -0500 Subject: [Git][ghc/ghc][master] hadrian-ghci-multi: Pass -this-package-name in unit response files Message-ID: <67443bb1719ca_326c3028a9ec48478@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 6e1fbda7 by Ben Gamari at 2024-11-25T03:55:44-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - 1 changed file: - hadrian/src/Rules/ToolArgs.hs Changes: ===================================== hadrian/src/Rules/ToolArgs.hs ===================================== @@ -99,7 +99,8 @@ multiSetup pkg_s = do writeFile' (resp_file root p) (intercalate "\n" (normalise_ghc arg_list ++ modules cd ++ concatMap rexp (reexportModules cd) - ++ ["-outputdir", hidir])) + ++ ["-outputdir", hidir, + "-this-package-name", pkgName p])) return (resp_file root p) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6e1fbda7deaa44d9ce759234bbff920022c2c542 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6e1fbda7deaa44d9ce759234bbff920022c2c542 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 08:57:16 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 03:57:16 -0500 Subject: [Git][ghc/ghc][master] Refactoring: Use `OnOff` more consistently for `Extension` Message-ID: <67443bec912e9_326c3021e1e85162a@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a05e4a9b by Simon Hengel at 2024-11-25T03:56:33-05:00 Refactoring: Use `OnOff` more consistently for `Extension` - - - - - 4 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Types/Hint/Ppr.hs Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -729,16 +729,6 @@ newtype FlushOut = FlushOut (IO ()) defaultFlushOut :: FlushOut defaultFlushOut = FlushOut $ hFlush stdout - - -data OnOff a = On a - | Off a - deriving (Eq, Show) - -instance Outputable a => Outputable (OnOff a) where - ppr (On x) = text "On" <+> ppr x - ppr (Off x) = text "Off" <+> ppr x - -- OnOffs accumulate in reverse order, so we use foldr in order to -- process them in the right order flattenExtensionFlags :: Maybe Language -> [OnOff LangExt.Extension] -> EnumSet LangExt.Extension ===================================== compiler/GHC/Driver/Flags.hs ===================================== @@ -29,6 +29,7 @@ module GHC.Driver.Flags , minusWcompatOpts , unusedBindsFlags + , OnOff(..) , TurnOnFlag , turnOn , turnOff @@ -77,6 +78,14 @@ instance Binary Language where instance NFData Language where rnf x = x `seq` () +data OnOff a = On a + | Off a + deriving (Eq, Show) + +instance Outputable a => Outputable (OnOff a) where + ppr (On x) = text "On" <+> ppr x + ppr (Off x) = text "Off" <+> ppr x + type TurnOnFlag = Bool -- True <=> we are turning the flag on -- False <=> we are turning the flag off turnOn :: TurnOnFlag; turnOn = True @@ -269,78 +278,77 @@ extensionNames ext = mk (extensionDeprecation ext) (extensionName ext : exte ++ mk (ExtensionDeprecatedFor [ext]) (extensionDeprecatedNames ext) where mk depr = map (\name -> (depr, name)) - -impliedXFlags :: [(LangExt.Extension, TurnOnFlag, LangExt.Extension)] +impliedXFlags :: [(LangExt.Extension, OnOff LangExt.Extension)] impliedXFlags -- See Note [Updating flag description in the User's Guide] - = [ (LangExt.RankNTypes, turnOn, LangExt.ExplicitForAll) - , (LangExt.QuantifiedConstraints, turnOn, LangExt.ExplicitForAll) - , (LangExt.ScopedTypeVariables, turnOn, LangExt.ExplicitForAll) - , (LangExt.LiberalTypeSynonyms, turnOn, LangExt.ExplicitForAll) - , (LangExt.ExistentialQuantification, turnOn, LangExt.ExplicitForAll) - , (LangExt.FlexibleInstances, turnOn, LangExt.TypeSynonymInstances) - , (LangExt.FunctionalDependencies, turnOn, LangExt.MultiParamTypeClasses) - , (LangExt.MultiParamTypeClasses, turnOn, LangExt.ConstrainedClassMethods) -- c.f. #7854 - , (LangExt.TypeFamilyDependencies, turnOn, LangExt.TypeFamilies) + = [ (LangExt.RankNTypes, On LangExt.ExplicitForAll) + , (LangExt.QuantifiedConstraints, On LangExt.ExplicitForAll) + , (LangExt.ScopedTypeVariables, On LangExt.ExplicitForAll) + , (LangExt.LiberalTypeSynonyms, On LangExt.ExplicitForAll) + , (LangExt.ExistentialQuantification, On LangExt.ExplicitForAll) + , (LangExt.FlexibleInstances, On LangExt.TypeSynonymInstances) + , (LangExt.FunctionalDependencies, On LangExt.MultiParamTypeClasses) + , (LangExt.MultiParamTypeClasses, On LangExt.ConstrainedClassMethods) -- c.f. #7854 + , (LangExt.TypeFamilyDependencies, On LangExt.TypeFamilies) - , (LangExt.RebindableSyntax, turnOff, LangExt.ImplicitPrelude) -- NB: turn off! + , (LangExt.RebindableSyntax, Off LangExt.ImplicitPrelude) -- NB: turn off! - , (LangExt.DerivingVia, turnOn, LangExt.DerivingStrategies) + , (LangExt.DerivingVia, On LangExt.DerivingStrategies) - , (LangExt.GADTs, turnOn, LangExt.GADTSyntax) - , (LangExt.GADTs, turnOn, LangExt.MonoLocalBinds) - , (LangExt.TypeFamilies, turnOn, LangExt.MonoLocalBinds) + , (LangExt.GADTs, On LangExt.GADTSyntax) + , (LangExt.GADTs, On LangExt.MonoLocalBinds) + , (LangExt.TypeFamilies, On LangExt.MonoLocalBinds) - , (LangExt.TypeFamilies, turnOn, LangExt.KindSignatures) -- Type families use kind signatures - , (LangExt.PolyKinds, turnOn, LangExt.KindSignatures) -- Ditto polymorphic kinds + , (LangExt.TypeFamilies, On LangExt.KindSignatures) -- Type families use kind signatures + , (LangExt.PolyKinds, On LangExt.KindSignatures) -- Ditto polymorphic kinds -- TypeInType is now just a synonym for a couple of other extensions. - , (LangExt.TypeInType, turnOn, LangExt.DataKinds) - , (LangExt.TypeInType, turnOn, LangExt.PolyKinds) - , (LangExt.TypeInType, turnOn, LangExt.KindSignatures) + , (LangExt.TypeInType, On LangExt.DataKinds) + , (LangExt.TypeInType, On LangExt.PolyKinds) + , (LangExt.TypeInType, On LangExt.KindSignatures) -- Standalone kind signatures are a replacement for CUSKs. - , (LangExt.StandaloneKindSignatures, turnOff, LangExt.CUSKs) + , (LangExt.StandaloneKindSignatures, Off LangExt.CUSKs) -- AutoDeriveTypeable is not very useful without DeriveDataTypeable - , (LangExt.AutoDeriveTypeable, turnOn, LangExt.DeriveDataTypeable) + , (LangExt.AutoDeriveTypeable, On LangExt.DeriveDataTypeable) -- We turn this on so that we can export associated type -- type synonyms in subordinates (e.g. MyClass(type AssocType)) - , (LangExt.TypeFamilies, turnOn, LangExt.ExplicitNamespaces) - , (LangExt.TypeOperators, turnOn, LangExt.ExplicitNamespaces) + , (LangExt.TypeFamilies, On LangExt.ExplicitNamespaces) + , (LangExt.TypeOperators, On LangExt.ExplicitNamespaces) - , (LangExt.ImpredicativeTypes, turnOn, LangExt.RankNTypes) + , (LangExt.ImpredicativeTypes, On LangExt.RankNTypes) -- Record wild-cards implies field disambiguation -- Otherwise if you write (C {..}) you may well get -- stuff like " 'a' not in scope ", which is a bit silly -- if the compiler has just filled in field 'a' of constructor 'C' - , (LangExt.RecordWildCards, turnOn, LangExt.DisambiguateRecordFields) + , (LangExt.RecordWildCards, On LangExt.DisambiguateRecordFields) - , (LangExt.ParallelArrays, turnOn, LangExt.ParallelListComp) + , (LangExt.ParallelArrays, On LangExt.ParallelListComp) - , (LangExt.JavaScriptFFI, turnOn, LangExt.InterruptibleFFI) + , (LangExt.JavaScriptFFI, On LangExt.InterruptibleFFI) - , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFunctor) - , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFoldable) + , (LangExt.DeriveTraversable, On LangExt.DeriveFunctor) + , (LangExt.DeriveTraversable, On LangExt.DeriveFoldable) -- Duplicate record fields require field disambiguation - , (LangExt.DuplicateRecordFields, turnOn, LangExt.DisambiguateRecordFields) + , (LangExt.DuplicateRecordFields, On LangExt.DisambiguateRecordFields) - , (LangExt.TemplateHaskell, turnOn, LangExt.TemplateHaskellQuotes) - , (LangExt.Strict, turnOn, LangExt.StrictData) + , (LangExt.TemplateHaskell, On LangExt.TemplateHaskellQuotes) + , (LangExt.Strict, On LangExt.StrictData) -- Historically only UnboxedTuples was required for unboxed sums to work. -- To avoid breaking code, we make UnboxedTuples imply UnboxedSums. - , (LangExt.UnboxedTuples, turnOn, LangExt.UnboxedSums) + , (LangExt.UnboxedTuples, On LangExt.UnboxedSums) -- The extensions needed to declare an H98 unlifted data type - , (LangExt.UnliftedDatatypes, turnOn, LangExt.DataKinds) - , (LangExt.UnliftedDatatypes, turnOn, LangExt.StandaloneKindSignatures) + , (LangExt.UnliftedDatatypes, On LangExt.DataKinds) + , (LangExt.UnliftedDatatypes, On LangExt.StandaloneKindSignatures) -- See Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind - , (LangExt.LinearTypes, turnOn, LangExt.MonoLocalBinds) + , (LangExt.LinearTypes, On LangExt.MonoLocalBinds) ] ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -2925,13 +2925,18 @@ unSetExtensionFlag f = upd (unSetExtensionFlag' f) setExtensionFlag', unSetExtensionFlag' :: LangExt.Extension -> DynFlags -> DynFlags setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps where - deps = [ if turn_on then setExtensionFlag' d - else unSetExtensionFlag' d - | (f', turn_on, d) <- impliedXFlags, f' == f ] + deps :: [DynFlags -> DynFlags] + deps = [ setExtension d + | (f', d) <- impliedXFlags, f' == f ] -- When you set f, set the ones it implies -- NB: use setExtensionFlag recursively, in case the implied flags -- implies further flags + setExtension :: OnOff LangExt.Extension -> DynFlags -> DynFlags + setExtension = \ case + On extension -> setExtensionFlag' extension + Off extension -> unSetExtensionFlag' extension + unSetExtensionFlag' f dflags = xopt_unset dflags f -- When you un-set f, however, we don't un-set the things it implies -- (except for -fno-glasgow-exts, which is treated specially) ===================================== compiler/GHC/Types/Hint/Ppr.hs ===================================== @@ -403,9 +403,7 @@ pprImpliedExtensions extension = case implied of xs -> parens $ "implied by" <+> unquotedListWith "and" xs where implied = map (quotes . ppr) . filter (\ext -> extensionDeprecation ext == ExtensionNotDeprecated) - . map (\(impl, _, _) -> impl) - . filter (\(_, t, orig) -> orig == extension && t == turnOn) - $ impliedXFlags + $ [impl | (impl, On orig) <- impliedXFlags, orig == extension] pprPrefixUnqual :: Name -> SDoc pprPrefixUnqual name = View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a05e4a9b04a3a43c2172f4d68471d5b4053ad367 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a05e4a9b04a3a43c2172f4d68471d5b4053ad367 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 11:59:53 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 06:59:53 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: hadrian-ghci-multi: Pass -this-package-name in unit response files Message-ID: <674466b95f6f1_1508f43bc4b47043b@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 6e1fbda7 by Ben Gamari at 2024-11-25T03:55:44-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - a05e4a9b by Simon Hengel at 2024-11-25T03:56:33-05:00 Refactoring: Use `OnOff` more consistently for `Extension` - - - - - e6abf191 by Matthew Pickering at 2024-11-25T06:59:01-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - c90ad82d by Cheng Shao at 2024-11-25T06:59:01-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - 13e98ee3 by Cheng Shao at 2024-11-25T06:59:04-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - 5869af9e by Arnaud Spiwack at 2024-11-25T06:59:17-05:00 Add test for #25515 - - - - - 1006727a by Arnaud Spiwack at 2024-11-25T06:59:17-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - fe261953 by Wang Xin at 2024-11-25T06:59:21-05:00 Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform This commit requires that the LLVM used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c667983e1baf05. Actually we should not rely on LLVM, so the only way to solve this problem is to implement the LoongArch backend. - - - - - 48541640 by Wang Xin at 2024-11-25T06:59:21-05:00 Add new type for codemodel - - - - - 22 changed files: - .gitlab-ci.yml - .gitlab/hello.hs - compiler/GHC/CmmToLlvm.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Types/Hint/Ppr.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - hadrian/src/Rules/ToolArgs.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T - + testsuite/tests/linear/should_compile/T25515.hs - testsuite/tests/linear/should_compile/all.T Changes: ===================================== .gitlab-ci.yml ===================================== @@ -289,7 +289,7 @@ lint-author: - *drafts-can-fail-lint lint-ci-config: - image: nixos/nix:2.14.1 + image: nixos/nix:2.25.2 extends: .lint # We don't need history/submodules in this job variables: @@ -299,10 +299,16 @@ lint-ci-config: - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf # Note [Nix-in-Docker] # ~~~~~~~~~~~~~~~~~~~~ - # FIXME: This is a workaround for a Nix-in-Docker issue. See + # The nixos/nix default config is max-jobs=1 and cores=$(logical + # cores num) which doesn't play nice with our $CPUS convention. We + # fix it before invoking any nix build to avoid oversubscribing + # while allowing a reasonable degree of parallelism. + # FIXME: Disabling build-users-group=nixbld is a workaround for a Nix-in-Docker issue. See # https://gitlab.haskell.org/ghc/head.hackage/-/issues/38#note_560487 for # discussion. - - nix-shell -p gnused --run "sed -i -e 's/nixbld//' /etc/nix/nix.conf" + - echo "cores = $CPUS" >> /etc/nix/nix.conf + - echo "max-jobs = $CPUS" >> /etc/nix/nix.conf + - nix run nixpkgs#gnused -- -i -e 's/ nixbld//' /etc/nix/nix.conf script: - nix run .gitlab/generate-ci#generate-jobs # 1 if .gitlab/generate_jobs changed the output of the generated config @@ -632,6 +638,8 @@ hackage-doc-tarball: source-tarball: stage: full-build + needs: + - hadrian-ghc-in-ghci tags: - x86_64-linux image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:$DOCKER_REV" @@ -653,6 +661,8 @@ source-tarball: generate-hadrian-bootstrap-sources: stage: full-build + needs: + - hadrian-ghc-in-ghci tags: - x86_64-linux image: "$DOCKER_IMAGE" @@ -1107,7 +1117,7 @@ project-version: .ghcup-metadata: stage: deploy - image: nixos/nix:2.14.1 + image: nixos/nix:2.25.2 dependencies: null tags: - x86_64-linux @@ -1117,7 +1127,9 @@ project-version: before_script: - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf # FIXME: See Note [Nix-in-Docker] - - nix-shell -p gnused --run "sed -i -e 's/nixbld//' /etc/nix/nix.conf" + - echo "cores = $CPUS" >> /etc/nix/nix.conf + - echo "max-jobs = $CPUS" >> /etc/nix/nix.conf + - nix run nixpkgs#gnused -- -i -e 's/ nixbld//' /etc/nix/nix.conf - nix-channel --update - cat version.sh # Calculate the project version @@ -1182,7 +1194,7 @@ ghcup-metadata-nightly: artifacts: false - job: project-version script: - - nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml" + - nix shell -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml" rules: - if: $NIGHTLY @@ -1220,7 +1232,7 @@ ghcup-metadata-release: # No explicit needs for release pipeline as we assume we need everything and everything will pass. extends: .ghcup-metadata script: - - nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --release-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml" + - nix shell -f .gitlab/rel_eng -c ghcup-metadata --release-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml" rules: - if: '$RELEASE_JOB == "yes"' ===================================== .gitlab/hello.hs ===================================== @@ -1,5 +1,6 @@ {-# OPTIONS_GHC -Wall -Wno-missing-fields #-} +import GHC.Unit.Types (stringToUnitId) import GHC hiding (parseModule) import GHC.Data.StringBuffer import GHC.Driver.Config.Parser @@ -26,7 +27,8 @@ fakeSettings = sToolSettings = ToolSettings {}, sTargetPlatform = genericPlatform, - sPlatformMisc = PlatformMisc {} + sPlatformMisc = PlatformMisc {}, + sUnitSettings = UnitSettings { unitSettings_baseUnitId = stringToUnitId "base" } } fakeDynFlags :: DynFlags ===================================== compiler/GHC/CmmToLlvm.hs ===================================== @@ -221,7 +221,12 @@ cmmMetaLlvmPrelude = do case platformArch platform of ArchX86_64 | llvmCgAvxEnabled cfg -> [mkStackAlignmentMeta 32] _ -> [] - module_flags_metas <- mkModuleFlagsMeta stack_alignment_metas + let codel_model_metas = + case platformArch platform of + -- FIXME: We should not rely on LLVM + ArchLoongArch64 -> [mkCodeModelMeta CMMedium] + _ -> [] + module_flags_metas <- mkModuleFlagsMeta (stack_alignment_metas ++ codel_model_metas) let metas = tbaa_metas ++ module_flags_metas cfg <- getConfig renderLlvm (ppLlvmMetas cfg metas) @@ -244,6 +249,15 @@ mkStackAlignmentMeta :: Integer -> ModuleFlag mkStackAlignmentMeta alignment = ModuleFlag MFBError "override-stack-alignment" (MetaLit $ LMIntLit alignment i32) +-- LLVM's @LLVM::CodeModel::Model@ enumeration +data CodeModel = CMMedium + +-- Pass -mcmodel=medium option to LLVM on LoongArch64 +mkCodeModelMeta :: CodeModel -> ModuleFlag +mkCodeModelMeta codemodel = + ModuleFlag MFBError "Code Model" (MetaLit $ LMIntLit n i32) + where + n = case codemodel of CMMedium -> 3 -- as of LLVM 17 -- ----------------------------------------------------------------------------- -- | Marks variables as used where necessary ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -729,16 +736,6 @@ newtype FlushOut = FlushOut (IO ()) defaultFlushOut :: FlushOut defaultFlushOut = FlushOut $ hFlush stdout - - -data OnOff a = On a - | Off a - deriving (Eq, Show) - -instance Outputable a => Outputable (OnOff a) where - ppr (On x) = text "On" <+> ppr x - ppr (Off x) = text "Off" <+> ppr x - -- OnOffs accumulate in reverse order, so we use foldr in order to -- process them in the right order flattenExtensionFlags :: Maybe Language -> [OnOff LangExt.Extension] -> EnumSet LangExt.Extension @@ -1484,6 +1481,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Flags.hs ===================================== @@ -29,6 +29,7 @@ module GHC.Driver.Flags , minusWcompatOpts , unusedBindsFlags + , OnOff(..) , TurnOnFlag , turnOn , turnOff @@ -77,6 +78,14 @@ instance Binary Language where instance NFData Language where rnf x = x `seq` () +data OnOff a = On a + | Off a + deriving (Eq, Show) + +instance Outputable a => Outputable (OnOff a) where + ppr (On x) = text "On" <+> ppr x + ppr (Off x) = text "Off" <+> ppr x + type TurnOnFlag = Bool -- True <=> we are turning the flag on -- False <=> we are turning the flag off turnOn :: TurnOnFlag; turnOn = True @@ -269,78 +278,77 @@ extensionNames ext = mk (extensionDeprecation ext) (extensionName ext : exte ++ mk (ExtensionDeprecatedFor [ext]) (extensionDeprecatedNames ext) where mk depr = map (\name -> (depr, name)) - -impliedXFlags :: [(LangExt.Extension, TurnOnFlag, LangExt.Extension)] +impliedXFlags :: [(LangExt.Extension, OnOff LangExt.Extension)] impliedXFlags -- See Note [Updating flag description in the User's Guide] - = [ (LangExt.RankNTypes, turnOn, LangExt.ExplicitForAll) - , (LangExt.QuantifiedConstraints, turnOn, LangExt.ExplicitForAll) - , (LangExt.ScopedTypeVariables, turnOn, LangExt.ExplicitForAll) - , (LangExt.LiberalTypeSynonyms, turnOn, LangExt.ExplicitForAll) - , (LangExt.ExistentialQuantification, turnOn, LangExt.ExplicitForAll) - , (LangExt.FlexibleInstances, turnOn, LangExt.TypeSynonymInstances) - , (LangExt.FunctionalDependencies, turnOn, LangExt.MultiParamTypeClasses) - , (LangExt.MultiParamTypeClasses, turnOn, LangExt.ConstrainedClassMethods) -- c.f. #7854 - , (LangExt.TypeFamilyDependencies, turnOn, LangExt.TypeFamilies) + = [ (LangExt.RankNTypes, On LangExt.ExplicitForAll) + , (LangExt.QuantifiedConstraints, On LangExt.ExplicitForAll) + , (LangExt.ScopedTypeVariables, On LangExt.ExplicitForAll) + , (LangExt.LiberalTypeSynonyms, On LangExt.ExplicitForAll) + , (LangExt.ExistentialQuantification, On LangExt.ExplicitForAll) + , (LangExt.FlexibleInstances, On LangExt.TypeSynonymInstances) + , (LangExt.FunctionalDependencies, On LangExt.MultiParamTypeClasses) + , (LangExt.MultiParamTypeClasses, On LangExt.ConstrainedClassMethods) -- c.f. #7854 + , (LangExt.TypeFamilyDependencies, On LangExt.TypeFamilies) - , (LangExt.RebindableSyntax, turnOff, LangExt.ImplicitPrelude) -- NB: turn off! + , (LangExt.RebindableSyntax, Off LangExt.ImplicitPrelude) -- NB: turn off! - , (LangExt.DerivingVia, turnOn, LangExt.DerivingStrategies) + , (LangExt.DerivingVia, On LangExt.DerivingStrategies) - , (LangExt.GADTs, turnOn, LangExt.GADTSyntax) - , (LangExt.GADTs, turnOn, LangExt.MonoLocalBinds) - , (LangExt.TypeFamilies, turnOn, LangExt.MonoLocalBinds) + , (LangExt.GADTs, On LangExt.GADTSyntax) + , (LangExt.GADTs, On LangExt.MonoLocalBinds) + , (LangExt.TypeFamilies, On LangExt.MonoLocalBinds) - , (LangExt.TypeFamilies, turnOn, LangExt.KindSignatures) -- Type families use kind signatures - , (LangExt.PolyKinds, turnOn, LangExt.KindSignatures) -- Ditto polymorphic kinds + , (LangExt.TypeFamilies, On LangExt.KindSignatures) -- Type families use kind signatures + , (LangExt.PolyKinds, On LangExt.KindSignatures) -- Ditto polymorphic kinds -- TypeInType is now just a synonym for a couple of other extensions. - , (LangExt.TypeInType, turnOn, LangExt.DataKinds) - , (LangExt.TypeInType, turnOn, LangExt.PolyKinds) - , (LangExt.TypeInType, turnOn, LangExt.KindSignatures) + , (LangExt.TypeInType, On LangExt.DataKinds) + , (LangExt.TypeInType, On LangExt.PolyKinds) + , (LangExt.TypeInType, On LangExt.KindSignatures) -- Standalone kind signatures are a replacement for CUSKs. - , (LangExt.StandaloneKindSignatures, turnOff, LangExt.CUSKs) + , (LangExt.StandaloneKindSignatures, Off LangExt.CUSKs) -- AutoDeriveTypeable is not very useful without DeriveDataTypeable - , (LangExt.AutoDeriveTypeable, turnOn, LangExt.DeriveDataTypeable) + , (LangExt.AutoDeriveTypeable, On LangExt.DeriveDataTypeable) -- We turn this on so that we can export associated type -- type synonyms in subordinates (e.g. MyClass(type AssocType)) - , (LangExt.TypeFamilies, turnOn, LangExt.ExplicitNamespaces) - , (LangExt.TypeOperators, turnOn, LangExt.ExplicitNamespaces) + , (LangExt.TypeFamilies, On LangExt.ExplicitNamespaces) + , (LangExt.TypeOperators, On LangExt.ExplicitNamespaces) - , (LangExt.ImpredicativeTypes, turnOn, LangExt.RankNTypes) + , (LangExt.ImpredicativeTypes, On LangExt.RankNTypes) -- Record wild-cards implies field disambiguation -- Otherwise if you write (C {..}) you may well get -- stuff like " 'a' not in scope ", which is a bit silly -- if the compiler has just filled in field 'a' of constructor 'C' - , (LangExt.RecordWildCards, turnOn, LangExt.DisambiguateRecordFields) + , (LangExt.RecordWildCards, On LangExt.DisambiguateRecordFields) - , (LangExt.ParallelArrays, turnOn, LangExt.ParallelListComp) + , (LangExt.ParallelArrays, On LangExt.ParallelListComp) - , (LangExt.JavaScriptFFI, turnOn, LangExt.InterruptibleFFI) + , (LangExt.JavaScriptFFI, On LangExt.InterruptibleFFI) - , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFunctor) - , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFoldable) + , (LangExt.DeriveTraversable, On LangExt.DeriveFunctor) + , (LangExt.DeriveTraversable, On LangExt.DeriveFoldable) -- Duplicate record fields require field disambiguation - , (LangExt.DuplicateRecordFields, turnOn, LangExt.DisambiguateRecordFields) + , (LangExt.DuplicateRecordFields, On LangExt.DisambiguateRecordFields) - , (LangExt.TemplateHaskell, turnOn, LangExt.TemplateHaskellQuotes) - , (LangExt.Strict, turnOn, LangExt.StrictData) + , (LangExt.TemplateHaskell, On LangExt.TemplateHaskellQuotes) + , (LangExt.Strict, On LangExt.StrictData) -- Historically only UnboxedTuples was required for unboxed sums to work. -- To avoid breaking code, we make UnboxedTuples imply UnboxedSums. - , (LangExt.UnboxedTuples, turnOn, LangExt.UnboxedSums) + , (LangExt.UnboxedTuples, On LangExt.UnboxedSums) -- The extensions needed to declare an H98 unlifted data type - , (LangExt.UnliftedDatatypes, turnOn, LangExt.DataKinds) - , (LangExt.UnliftedDatatypes, turnOn, LangExt.StandaloneKindSignatures) + , (LangExt.UnliftedDatatypes, On LangExt.DataKinds) + , (LangExt.UnliftedDatatypes, On LangExt.StandaloneKindSignatures) -- See Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind - , (LangExt.LinearTypes, turnOn, LangExt.MonoLocalBinds) + , (LangExt.LinearTypes, On LangExt.MonoLocalBinds) ] ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } @@ -2925,13 +2934,18 @@ unSetExtensionFlag f = upd (unSetExtensionFlag' f) setExtensionFlag', unSetExtensionFlag' :: LangExt.Extension -> DynFlags -> DynFlags setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps where - deps = [ if turn_on then setExtensionFlag' d - else unSetExtensionFlag' d - | (f', turn_on, d) <- impliedXFlags, f' == f ] + deps :: [DynFlags -> DynFlags] + deps = [ setExtension d + | (f', d) <- impliedXFlags, f' == f ] -- When you set f, set the ones it implies -- NB: use setExtensionFlag recursively, in case the implied flags -- implies further flags + setExtension :: OnOff LangExt.Extension -> DynFlags -> DynFlags + setExtension = \ case + On extension -> setExtensionFlag' extension + Off extension -> unSetExtensionFlag' extension + unSetExtensionFlag' f dflags = xopt_unset dflags f -- When you un-set f, however, we don't un-set the things it implies -- (except for -fno-glasgow-exts, which is treated specially) ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Tc/Gen/Expr.hs ===================================== @@ -575,12 +575,7 @@ tcExpr expr@(RecordCon { rcon_con = L loc con_name ; checkTc (conLikeHasBuilder con_like) $ nonBidirectionalErr (conLikeName con_like) - ; rbinds' <- tcRecordBinds con_like (map scaledThing arg_tys) rbinds - -- It is currently not possible for a record to have - -- multiplicities. When they do, `tcRecordBinds` will take - -- scaled types instead. Meanwhile, it's safe to take - -- `scaledThing` above, as we know all the multiplicities are - -- Many. + ; rbinds' <- tcRecordBinds con_like arg_tys rbinds ; let rcon_tc = mkHsWrap con_wrap con_expr expr' = RecordCon { rcon_ext = rcon_tc @@ -1632,7 +1627,7 @@ This extends OK when the field types are universally quantified. tcRecordBinds :: ConLike - -> [TcType] -- Expected type for each field + -> [Scaled TcType] -- Expected type for each field -> HsRecordBinds GhcRn -> TcM (HsRecordBinds GhcTc) @@ -1661,18 +1656,18 @@ fieldCtxt :: FieldLabelString -> SDoc fieldCtxt field_name = text "In the" <+> quotes (ppr field_name) <+> text "field of a record" -tcRecordField :: ConLike -> Assoc Name Type +tcRecordField :: ConLike -> Assoc Name (Scaled Type) -> LFieldOcc GhcRn -> LHsExpr GhcRn -> TcM (Maybe (LFieldOcc GhcTc, LHsExpr GhcTc)) tcRecordField con_like flds_w_tys (L loc (FieldOcc rdr (L l sel_name))) rhs - | Just field_ty <- assocMaybe flds_w_tys sel_name + | Just (Scaled field_mult field_ty) <- assocMaybe flds_w_tys sel_name = addErrCtxt (fieldCtxt field_lbl) $ - do { rhs' <- tcCheckPolyExprNC rhs field_ty + do { rhs' <- tcScalingUsage field_mult $ tcCheckPolyExprNC rhs field_ty ; hasFixedRuntimeRep_syntactic (FRRRecordCon rdr (unLoc rhs')) field_ty ; let field_id = mkUserLocal (nameOccName sel_name) (nameUnique sel_name) - ManyTy field_ty (locA loc) + field_mult field_ty (locA loc) -- Yuk: the field_id has the *unique* of the selector Id -- (so we can find it easily) -- but is a LocalId with the appropriate type of the RHS ===================================== compiler/GHC/Types/Hint/Ppr.hs ===================================== @@ -403,9 +403,7 @@ pprImpliedExtensions extension = case implied of xs -> parens $ "implied by" <+> unquotedListWith "and" xs where implied = map (quotes . ppr) . filter (\ext -> extensionDeprecation ext == ExtensionNotDeprecated) - . map (\(impl, _, _) -> impl) - . filter (\(_, t, orig) -> orig == extension && t == turnOn) - $ impliedXFlags + $ [impl | (impl, On orig) <- impliedXFlags, orig == extension] pprPrefixUnqual :: Name -> SDoc pprPrefixUnqual name = ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,17 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl link against a different base package by default. +dnl If the package is unavailable it will simply not be linked against. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,27 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== hadrian/src/Rules/ToolArgs.hs ===================================== @@ -99,7 +99,8 @@ multiSetup pkg_s = do writeFile' (resp_file root p) (intercalate "\n" (normalise_ghc arg_list ++ modules cd ++ concatMap rexp (reexportModules cd) - ++ ["-outputdir", hidir])) + ++ ["-outputdir", hidir, + "-this-package-name", pkgName p])) return (resp_file root p) ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) ===================================== testsuite/tests/linear/should_compile/T25515.hs ===================================== @@ -0,0 +1,8 @@ +{-# LANGUAGE LinearTypes #-} + +module T25515 where + +data C = MkC { unc :: Int } + +f :: Int %1 -> C +f x = MkC { unc = x } ===================================== testsuite/tests/linear/should_compile/all.T ===================================== @@ -47,3 +47,4 @@ test('LinearLet', normal, compile, ['']) test('LinearLetPoly', normal, compile, ['']) test('LinearListComprehension', normal, compile, ['-dlinear-core-lint']) test('OmitFieldPat', normal, compile, ['-dcore-lint']) +test('T25515', normal, compile, ['-dcore-lint']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5002fa3d7de76eef72a34414a21949d93e9cfe63...48541640867ffc3fd23ae91cc3949be6a0f3cf81 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5002fa3d7de76eef72a34414a21949d93e9cfe63...48541640867ffc3fd23ae91cc3949be6a0f3cf81 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 12:36:48 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Mon, 25 Nov 2024 07:36:48 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/bump-darwin-sdk Message-ID: <67446f605ed96_fc3971dc37497783@gitlab.mail> Cheng Shao pushed new branch wip/bump-darwin-sdk at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/bump-darwin-sdk You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 13:16:55 2024 From: gitlab at gitlab.haskell.org (Torsten Schmits (@torsten.schmits)) Date: Mon, 25 Nov 2024 08:16:55 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/torsten.schmits/persistent-worker-test-2024-11-25 Message-ID: <674478c78aa3_fc39743ad501110b9@gitlab.mail> Torsten Schmits pushed new branch wip/torsten.schmits/persistent-worker-test-2024-11-25 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/torsten.schmits/persistent-worker-test-2024-11-25 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 14:30:42 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 09:30:42 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: driver: Always link against "base" package when one shot linking Message-ID: <67448a12cf2c5_c057ebc7c8236ee@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 87694d2d by Matthew Pickering at 2024-11-25T09:29:45-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 7ee162d7 by Andreas Klebinger at 2024-11-25T09:29:46-05:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 4bdfa851 by Cheng Shao at 2024-11-25T09:29:46-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - d1569c23 by Cheng Shao at 2024-11-25T09:29:49-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - 705e917a by Simon Hengel at 2024-11-25T09:29:55-05:00 Refactoring: Remove `pSupportedExts` from `ParserOpts` This is never used for lexing / parsing. It is only used by `GHC.Parser.Header.getOptions`. - - - - - d0b2a851 by Arnaud Spiwack at 2024-11-25T09:29:59-05:00 Add test for #25515 - - - - - 127aa5b3 by Arnaud Spiwack at 2024-11-25T09:29:59-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - 30 changed files: - .gitlab-ci.yml - .gitlab/hello.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Config/Parser.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Parser/HaddockLex.x - compiler/GHC/Parser/Header.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - ghc/GHCi/UI.hs - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - rts/sm/Compact.c - rts/sm/Evac.c - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T - testsuite/tests/ghc-api/T10942.hs - + testsuite/tests/linear/should_compile/T25515.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/rts/T14497-compact.hs - + testsuite/tests/rts/T14497-compact.stdout The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/48541640867ffc3fd23ae91cc3949be6a0f3cf81...127aa5b39ca6c858a26942bbd75321da04651e95 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/48541640867ffc3fd23ae91cc3949be6a0f3cf81...127aa5b39ca6c858a26942bbd75321da04651e95 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 16:31:09 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Mon, 25 Nov 2024 11:31:09 -0500 Subject: [Git][ghc/ghc][wip/andreask/bound_cmm_folding] Cmm constant folding: Narrow results to operations bitwidth. Message-ID: <6744a64dce98a_32b005bd510161c4@gitlab.mail> Andreas Klebinger pushed to branch wip/andreask/bound_cmm_folding at Glasgow Haskell Compiler / GHC Commits: ee1488e5 by Andreas Klebinger at 2024-11-25T17:11:11+01:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - 3 changed files: - compiler/GHC/Cmm/Opt.hs - + testsuite/tests/cmm/opt/T24556.cmm - testsuite/tests/cmm/opt/all.T Changes: ===================================== compiler/GHC/Cmm/Opt.hs ===================================== @@ -49,6 +49,7 @@ constantFoldExprOpt e = wrapRecExpOpt f e CmmMachOp op' args' -> fromMaybe (CmmMachOp op' args') <$> cmmMachOpFoldOptM cfg op' args' e -> pure e f (CmmRegOff r 0) = pure (CmmReg r) + f (CmmLit (CmmInt x rep)) = pure (CmmLit $ CmmInt (narrowU rep x) rep) f e = pure e constantFoldExpr :: Platform -> CmmExpr -> CmmExpr @@ -88,7 +89,7 @@ cmmMachOpFoldM _ (MO_VF_Broadcast lg _w) exprs = _ -> Nothing cmmMachOpFoldM _ op [CmmLit (CmmInt x rep)] = Just $! case op of - MO_S_Neg _ -> CmmLit (CmmInt (-x) rep) + MO_S_Neg _ -> CmmLit (CmmInt (narrowS rep (-x)) rep) MO_Not _ -> CmmLit (CmmInt (complement x) rep) -- these are interesting: we must first narrow to the @@ -164,9 +165,9 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_S_Lt _ -> Just $! CmmLit (CmmInt (if x_s < y_s then 1 else 0) (wordWidth platform)) MO_S_Le _ -> Just $! CmmLit (CmmInt (if x_s <= y_s then 1 else 0) (wordWidth platform)) - MO_Add r -> Just $! CmmLit (CmmInt (x + y) r) - MO_Sub r -> Just $! CmmLit (CmmInt (x - y) r) - MO_Mul r -> Just $! CmmLit (CmmInt (x * y) r) + MO_Add r -> Just $! CmmLit (CmmInt (narrowU r $ x + y) r) + MO_Sub r -> Just $! CmmLit (CmmInt (narrowS r $ x - y) r) + MO_Mul r -> Just $! CmmLit (CmmInt (narrowU r $ x * y) r) MO_U_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `quot` y_u) r) MO_U_Rem r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `rem` y_u) r) MO_S_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_s `quot` y_s) r) @@ -176,7 +177,7 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_Or r -> Just $! CmmLit (CmmInt (x .|. y) r) MO_Xor r -> Just $! CmmLit (CmmInt (x `xor` y) r) - MO_Shl r -> Just $! CmmLit (CmmInt (x `shiftL` fromIntegral y) r) + MO_Shl r -> Just $! CmmLit (CmmInt (narrowU r $ x `shiftL` fromIntegral y) r) MO_U_Shr r -> Just $! CmmLit (CmmInt (x_u `shiftR` fromIntegral y) r) MO_S_Shr r -> Just $! CmmLit (CmmInt (x_s `shiftR` fromIntegral y) r) ===================================== testsuite/tests/cmm/opt/T24556.cmm ===================================== @@ -0,0 +1,12 @@ +#include "Cmm.h" + +func(W_ buffer) { + I8[buffer] = %lobits8(255 + 45); + I8[buffer+(1)] = %lobits8(310 - 10); + I8[buffer+(2)] = %lobits8(30 * 10); + I8[buffer+(3)] = %lobits8(150 << 1); + // This one comes from test-primops + I64[buffer+(4)] = %zx64(((1 :: bits16) & ((1 :: bits16) & (((516 :: bits16) * (154 :: bits16)) + bits16[buffer + (0 :: W_)])))); + return(1); +} + ===================================== testsuite/tests/cmm/opt/all.T ===================================== @@ -3,3 +3,8 @@ test('T15188', cmm_src, makefile_test, []) test('T18141', normal, compile, ['']) test('T20142', normal, compile, ['']) + +# Cmm opt should not produce oversized literals in the assembly output. +# We check this by telling the assembler to exit on warnings. +test('T24556', [only_ways('optasm'), cmm_src], compile, ['-O -opta -Xassembler -opta --fatal-warnings']) + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ee1488e591ba9fe5d7385bb897c2d93b1bf48b09 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ee1488e591ba9fe5d7385bb897c2d93b1bf48b09 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 16:43:47 2024 From: gitlab at gitlab.haskell.org (Andreas Klebinger (@AndreasK)) Date: Mon, 25 Nov 2024 11:43:47 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/andreask/prof_docs Message-ID: <6744a9431b01b_32b00522347c1873e@gitlab.mail> Andreas Klebinger pushed new branch wip/andreask/prof_docs at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/andreask/prof_docs You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 17:35:32 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 25 Nov 2024 12:35:32 -0500 Subject: [Git][ghc/ghc][wip/T24744] 2 commits: Alternate way "Enable static args" Message-ID: <6744b564530fa_bd694bc4804471@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 3edea9e1 by Serge S. Gulin at 2024-11-25T20:34:05+03:00 Alternate way "Enable static args" - - - - - 02c3c58b by Serge S. Gulin at 2024-11-25T20:35:14+03:00 Remove useless premature optimization - - - - - 3 changed files: - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Monad.hs Changes: ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -100,25 +100,6 @@ genApp -> [StgArg] -> G (JStgStat, ExprResult) genApp ctx i args - -- Test case T23479_2 - -- See: https://github.com/ghcjs/ghcjs/blob/b7711fbca7c3f43a61f1dba526e6f2a2656ef44c/src/Gen2/Generator.hs#L876 - -- Comment by Luite Stegeman - -- Special cases for JSString literals. - -- We could handle unpackNBytes# here, but that's probably not common - -- enough to warrant a special case. - -- See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/#note_503978 - -- Comment by Jeffrey Young - -- We detect if the Id is unsafeUnpackJSStringUtf8## applied to a string literal, - -- if so then we convert the unsafeUnpack to a call to h$decode. - | [StgVarArg v] <- args - , idName i == unsafeUnpackJSStringUtf8ShShName - -- See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588 - -- Comment by Josh Meredith - -- `typex_expr` can throw an error for certain bindings so it's important - -- that this condition comes after matching on the function name - , [top] <- concatMap typex_expr (ctxTarget ctx) - = (,ExprInline) . (|=) top . app hdDecodeUtf8Z <$> varsForId v - -- Test case T23479_1 | [StgLitArg (LitString bs)] <- args , Just d <- decodeModifiedUTF8 bs ===================================== compiler/GHC/StgToJS/CodeGen.hs ===================================== @@ -59,7 +59,6 @@ import qualified Control.Monad.Trans.State.Strict as State import GHC.Utils.Outputable hiding ((<>)) import qualified Data.Set as S -import Data.List (nub) import Data.Monoid import Control.Monad import System.Directory @@ -328,10 +327,11 @@ genToplevelRhs i rhs = case rhs of eid <- identForEntryId i idt <- identFS <$> identForId i body <- genBody (initExprCtx i) R2 args body typ - global_occs <- globalOccs body + lids <- globalOccs body + -- Regenerate idents from lids to restore right order of representatives. + -- Representatives have occurrence order which can be mixed. + lidents <- concat <$> traverse identsForId lids let eidt = identFS eid - let lidents = map global_ident global_occs - let lids = nub $ map global_id global_occs let lidents' = map identFS lidents CIStaticRefs sr0 <- genStaticRefsRhs rhs let sri = filter (`notElem` lidents') sr0 ===================================== compiler/GHC/StgToJS/Monad.hs ===================================== @@ -153,26 +153,23 @@ getGlobalIdCache = State.gets (ggsGlobalIdCache . gsGroup) setGlobalIdCache :: GlobalIdCache -> G () setGlobalIdCache v = State.modify (\s -> s { gsGroup = (gsGroup s) { ggsGlobalIdCache = v}}) - data GlobalOcc = GlobalOcc - { global_ident :: !Ident - , global_id :: !Id + { global_id :: !Id , global_count :: !Word } instance Outputable GlobalOcc where ppr g = hang (text "GlobalOcc") 2 $ vcat - [ hcat [text "Ident: ", ppr (global_ident g)] - , hcat [text "Id:", ppr (global_id g)] + [ hcat [text "Id:", ppr (global_id g)] , hcat [text "Count:", ppr (global_count g)] ] --- | Return number of occurrences of every global id used in the given JStgStat. +-- | Return occurrences of every global id used in the given JStgStat. -- Sort by increasing occurrence count. -globalOccs :: JStgStat -> G [GlobalOcc] +globalOccs :: JStgStat -> G [Id] globalOccs jst = do GlobalIdCache gidc <- getGlobalIdCache - -- build a map form Ident Unique to (Ident, Id, Count) + -- build a map form Ident Unique to (Id, Count) let cmp_cnt g1 g2 = compare (global_count g1) (global_count g2) inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 } @@ -186,7 +183,7 @@ globalOccs jst = do Just (_k,gid) -> -- add it to the list of already found global ids. Increasing -- count by 1 - let g = GlobalOcc i gid 1 + let g = GlobalOcc gid 1 in go (addToUFM_C inc gids i g) is - pure $ go emptyUFM (identsS jst) + pure $ map global_id $ go emptyUFM $ identsS jst View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/16ebc88f87c729f529d7f5553bf834c6463830db...02c3c58b5491dac950ea14f0243fd869d1671086 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/16ebc88f87c729f529d7f5553bf834c6463830db...02c3c58b5491dac950ea14f0243fd869d1671086 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 17:39:03 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 25 Nov 2024 12:39:03 -0500 Subject: [Git][ghc/ghc][wip/T24744] 8 commits: hadrian-ghci-multi: Pass -this-package-name in unit response files Message-ID: <6744b6376cf5a_bd694bc46c465c7@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 6e1fbda7 by Ben Gamari at 2024-11-25T03:55:44-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - a05e4a9b by Simon Hengel at 2024-11-25T03:56:33-05:00 Refactoring: Use `OnOff` more consistently for `Extension` - - - - - 88575a4d by Serge S. Gulin at 2024-11-25T20:38:36+03:00 Basic cleanup - - - - - 23566ce7 by Serge S. Gulin at 2024-11-25T20:38:36+03:00 Add trivial optimizations for `unpackCString` and `unpackCStringUtf8` - - - - - cdedc572 by Serge S. Gulin at 2024-11-25T20:38:36+03:00 Enable static args - - - - - 46aafb1a by Serge S. Gulin at 2024-11-25T20:38:36+03:00 Alternate way "Enable static args" - - - - - 6828c3d2 by Serge S. Gulin at 2024-11-25T20:38:36+03:00 Alternate way "Enable static args" - - - - - b3691a29 by Serge S. Gulin at 2024-11-25T20:38:36+03:00 Remove useless premature optimization - - - - - 16 changed files: - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/Arg.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Expr.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/StgToJS/Linker/Linker.hs - compiler/GHC/StgToJS/Monad.hs - compiler/GHC/StgToJS/Object.hs - compiler/GHC/StgToJS/Symbols.hs - compiler/GHC/StgToJS/Types.hs - compiler/GHC/Types/Hint/Ppr.hs - hadrian/src/Rules/ToolArgs.hs - rts/js/string.js Changes: ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -729,16 +729,6 @@ newtype FlushOut = FlushOut (IO ()) defaultFlushOut :: FlushOut defaultFlushOut = FlushOut $ hFlush stdout - - -data OnOff a = On a - | Off a - deriving (Eq, Show) - -instance Outputable a => Outputable (OnOff a) where - ppr (On x) = text "On" <+> ppr x - ppr (Off x) = text "Off" <+> ppr x - -- OnOffs accumulate in reverse order, so we use foldr in order to -- process them in the right order flattenExtensionFlags :: Maybe Language -> [OnOff LangExt.Extension] -> EnumSet LangExt.Extension ===================================== compiler/GHC/Driver/Flags.hs ===================================== @@ -29,6 +29,7 @@ module GHC.Driver.Flags , minusWcompatOpts , unusedBindsFlags + , OnOff(..) , TurnOnFlag , turnOn , turnOff @@ -77,6 +78,14 @@ instance Binary Language where instance NFData Language where rnf x = x `seq` () +data OnOff a = On a + | Off a + deriving (Eq, Show) + +instance Outputable a => Outputable (OnOff a) where + ppr (On x) = text "On" <+> ppr x + ppr (Off x) = text "Off" <+> ppr x + type TurnOnFlag = Bool -- True <=> we are turning the flag on -- False <=> we are turning the flag off turnOn :: TurnOnFlag; turnOn = True @@ -269,78 +278,77 @@ extensionNames ext = mk (extensionDeprecation ext) (extensionName ext : exte ++ mk (ExtensionDeprecatedFor [ext]) (extensionDeprecatedNames ext) where mk depr = map (\name -> (depr, name)) - -impliedXFlags :: [(LangExt.Extension, TurnOnFlag, LangExt.Extension)] +impliedXFlags :: [(LangExt.Extension, OnOff LangExt.Extension)] impliedXFlags -- See Note [Updating flag description in the User's Guide] - = [ (LangExt.RankNTypes, turnOn, LangExt.ExplicitForAll) - , (LangExt.QuantifiedConstraints, turnOn, LangExt.ExplicitForAll) - , (LangExt.ScopedTypeVariables, turnOn, LangExt.ExplicitForAll) - , (LangExt.LiberalTypeSynonyms, turnOn, LangExt.ExplicitForAll) - , (LangExt.ExistentialQuantification, turnOn, LangExt.ExplicitForAll) - , (LangExt.FlexibleInstances, turnOn, LangExt.TypeSynonymInstances) - , (LangExt.FunctionalDependencies, turnOn, LangExt.MultiParamTypeClasses) - , (LangExt.MultiParamTypeClasses, turnOn, LangExt.ConstrainedClassMethods) -- c.f. #7854 - , (LangExt.TypeFamilyDependencies, turnOn, LangExt.TypeFamilies) + = [ (LangExt.RankNTypes, On LangExt.ExplicitForAll) + , (LangExt.QuantifiedConstraints, On LangExt.ExplicitForAll) + , (LangExt.ScopedTypeVariables, On LangExt.ExplicitForAll) + , (LangExt.LiberalTypeSynonyms, On LangExt.ExplicitForAll) + , (LangExt.ExistentialQuantification, On LangExt.ExplicitForAll) + , (LangExt.FlexibleInstances, On LangExt.TypeSynonymInstances) + , (LangExt.FunctionalDependencies, On LangExt.MultiParamTypeClasses) + , (LangExt.MultiParamTypeClasses, On LangExt.ConstrainedClassMethods) -- c.f. #7854 + , (LangExt.TypeFamilyDependencies, On LangExt.TypeFamilies) - , (LangExt.RebindableSyntax, turnOff, LangExt.ImplicitPrelude) -- NB: turn off! + , (LangExt.RebindableSyntax, Off LangExt.ImplicitPrelude) -- NB: turn off! - , (LangExt.DerivingVia, turnOn, LangExt.DerivingStrategies) + , (LangExt.DerivingVia, On LangExt.DerivingStrategies) - , (LangExt.GADTs, turnOn, LangExt.GADTSyntax) - , (LangExt.GADTs, turnOn, LangExt.MonoLocalBinds) - , (LangExt.TypeFamilies, turnOn, LangExt.MonoLocalBinds) + , (LangExt.GADTs, On LangExt.GADTSyntax) + , (LangExt.GADTs, On LangExt.MonoLocalBinds) + , (LangExt.TypeFamilies, On LangExt.MonoLocalBinds) - , (LangExt.TypeFamilies, turnOn, LangExt.KindSignatures) -- Type families use kind signatures - , (LangExt.PolyKinds, turnOn, LangExt.KindSignatures) -- Ditto polymorphic kinds + , (LangExt.TypeFamilies, On LangExt.KindSignatures) -- Type families use kind signatures + , (LangExt.PolyKinds, On LangExt.KindSignatures) -- Ditto polymorphic kinds -- TypeInType is now just a synonym for a couple of other extensions. - , (LangExt.TypeInType, turnOn, LangExt.DataKinds) - , (LangExt.TypeInType, turnOn, LangExt.PolyKinds) - , (LangExt.TypeInType, turnOn, LangExt.KindSignatures) + , (LangExt.TypeInType, On LangExt.DataKinds) + , (LangExt.TypeInType, On LangExt.PolyKinds) + , (LangExt.TypeInType, On LangExt.KindSignatures) -- Standalone kind signatures are a replacement for CUSKs. - , (LangExt.StandaloneKindSignatures, turnOff, LangExt.CUSKs) + , (LangExt.StandaloneKindSignatures, Off LangExt.CUSKs) -- AutoDeriveTypeable is not very useful without DeriveDataTypeable - , (LangExt.AutoDeriveTypeable, turnOn, LangExt.DeriveDataTypeable) + , (LangExt.AutoDeriveTypeable, On LangExt.DeriveDataTypeable) -- We turn this on so that we can export associated type -- type synonyms in subordinates (e.g. MyClass(type AssocType)) - , (LangExt.TypeFamilies, turnOn, LangExt.ExplicitNamespaces) - , (LangExt.TypeOperators, turnOn, LangExt.ExplicitNamespaces) + , (LangExt.TypeFamilies, On LangExt.ExplicitNamespaces) + , (LangExt.TypeOperators, On LangExt.ExplicitNamespaces) - , (LangExt.ImpredicativeTypes, turnOn, LangExt.RankNTypes) + , (LangExt.ImpredicativeTypes, On LangExt.RankNTypes) -- Record wild-cards implies field disambiguation -- Otherwise if you write (C {..}) you may well get -- stuff like " 'a' not in scope ", which is a bit silly -- if the compiler has just filled in field 'a' of constructor 'C' - , (LangExt.RecordWildCards, turnOn, LangExt.DisambiguateRecordFields) + , (LangExt.RecordWildCards, On LangExt.DisambiguateRecordFields) - , (LangExt.ParallelArrays, turnOn, LangExt.ParallelListComp) + , (LangExt.ParallelArrays, On LangExt.ParallelListComp) - , (LangExt.JavaScriptFFI, turnOn, LangExt.InterruptibleFFI) + , (LangExt.JavaScriptFFI, On LangExt.InterruptibleFFI) - , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFunctor) - , (LangExt.DeriveTraversable, turnOn, LangExt.DeriveFoldable) + , (LangExt.DeriveTraversable, On LangExt.DeriveFunctor) + , (LangExt.DeriveTraversable, On LangExt.DeriveFoldable) -- Duplicate record fields require field disambiguation - , (LangExt.DuplicateRecordFields, turnOn, LangExt.DisambiguateRecordFields) + , (LangExt.DuplicateRecordFields, On LangExt.DisambiguateRecordFields) - , (LangExt.TemplateHaskell, turnOn, LangExt.TemplateHaskellQuotes) - , (LangExt.Strict, turnOn, LangExt.StrictData) + , (LangExt.TemplateHaskell, On LangExt.TemplateHaskellQuotes) + , (LangExt.Strict, On LangExt.StrictData) -- Historically only UnboxedTuples was required for unboxed sums to work. -- To avoid breaking code, we make UnboxedTuples imply UnboxedSums. - , (LangExt.UnboxedTuples, turnOn, LangExt.UnboxedSums) + , (LangExt.UnboxedTuples, On LangExt.UnboxedSums) -- The extensions needed to declare an H98 unlifted data type - , (LangExt.UnliftedDatatypes, turnOn, LangExt.DataKinds) - , (LangExt.UnliftedDatatypes, turnOn, LangExt.StandaloneKindSignatures) + , (LangExt.UnliftedDatatypes, On LangExt.DataKinds) + , (LangExt.UnliftedDatatypes, On LangExt.StandaloneKindSignatures) -- See Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind - , (LangExt.LinearTypes, turnOn, LangExt.MonoLocalBinds) + , (LangExt.LinearTypes, On LangExt.MonoLocalBinds) ] ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -2925,13 +2925,18 @@ unSetExtensionFlag f = upd (unSetExtensionFlag' f) setExtensionFlag', unSetExtensionFlag' :: LangExt.Extension -> DynFlags -> DynFlags setExtensionFlag' f dflags = foldr ($) (xopt_set dflags f) deps where - deps = [ if turn_on then setExtensionFlag' d - else unSetExtensionFlag' d - | (f', turn_on, d) <- impliedXFlags, f' == f ] + deps :: [DynFlags -> DynFlags] + deps = [ setExtension d + | (f', d) <- impliedXFlags, f' == f ] -- When you set f, set the ones it implies -- NB: use setExtensionFlag recursively, in case the implied flags -- implies further flags + setExtension :: OnOff LangExt.Extension -> DynFlags -> DynFlags + setExtension = \ case + On extension -> setExtensionFlag' extension + Off extension -> unSetExtensionFlag' extension + unSetExtensionFlag' f dflags = xopt_unset dflags f -- When you un-set f, however, we don't un-set the things it implies -- (except for -fno-glasgow-exts, which is treated specially) ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -100,25 +100,6 @@ genApp -> [StgArg] -> G (JStgStat, ExprResult) genApp ctx i args - -- Test case T23479_2 - -- See: https://github.com/ghcjs/ghcjs/blob/b7711fbca7c3f43a61f1dba526e6f2a2656ef44c/src/Gen2/Generator.hs#L876 - -- Comment by Luite Stegeman - -- Special cases for JSString literals. - -- We could handle unpackNBytes# here, but that's probably not common - -- enough to warrant a special case. - -- See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/#note_503978 - -- Comment by Jeffrey Young - -- We detect if the Id is unsafeUnpackJSStringUtf8## applied to a string literal, - -- if so then we convert the unsafeUnpack to a call to h$decode. - | [StgVarArg v] <- args - , idName i == unsafeUnpackJSStringUtf8ShShName - -- See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588 - -- Comment by Josh Meredith - -- `typex_expr` can throw an error for certain bindings so it's important - -- that this condition comes after matching on the function name - , [top] <- concatMap typex_expr (ctxTarget ctx) - = (,ExprInline) . (|=) top . app hdDecodeUtf8Z <$> varsForId v - -- Test case T23479_1 | [StgLitArg (LitString bs)] <- args , Just d <- decodeModifiedUTF8 bs @@ -157,6 +138,24 @@ genApp ctx i args , ExprInline ) + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringName + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringUtf8Name + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + -- let-no-escape | Just n <- ctxLneBindingStackSize ctx i = do ===================================== compiler/GHC/StgToJS/Arg.hs ===================================== @@ -22,9 +22,6 @@ module GHC.StgToJS.Arg , genIdArgI , genIdStackArgI , allocConStatic - , allocUnboxedConStatic - , allocateStaticList - , jsStaticArg , jsStaticArgs ) where @@ -215,7 +212,7 @@ allocConStatic (identFS -> to) cc con args = do emitStatic to (StaticUnboxed $ StaticUnboxedBool True) cc' | otherwise = do e <- identFS <$> identForDataConWorker con - emitStatic to (StaticData e []) cc' + emitStatic to (StaticScalar $ StaticApp SAKData e []) cc' allocConStatic' cc' [x] | isUnboxableCon con = case x of @@ -234,7 +231,7 @@ allocConStatic (identFS -> to) cc con args = do _ -> panic "allocConStatic: invalid args for consDataCon" else do e <- identFS <$> identForDataConWorker con - emitStatic to (StaticData e xs) cc' + emitStatic to (StaticScalar $ StaticApp SAKData e xs) cc' -- | Allocate unboxed constructors allocUnboxedConStatic :: DataCon -> [StaticArg] -> StaticArg ===================================== compiler/GHC/StgToJS/CodeGen.hs ===================================== @@ -327,25 +327,26 @@ genToplevelRhs i rhs = case rhs of eid <- identForEntryId i idt <- identFS <$> identForId i body <- genBody (initExprCtx i) R2 args body typ - global_occs <- globalOccs body + lids <- globalOccs body + -- Regenerate idents from lids to restore right order of representatives. + -- Representatives have occurrence order which can be mixed. + lidents <- concat <$> traverse identsForId lids let eidt = identFS eid - let lidents = map global_ident global_occs - let lids = map global_id global_occs let lidents' = map identFS lidents CIStaticRefs sr0 <- genStaticRefsRhs rhs let sri = filter (`notElem` lidents') sr0 sr = CIStaticRefs sri et <- genEntryType args ll <- loadLiveFun lids - (static, regs, upd) <- + (appK, regs, upd) <- if et == CIThunk then do r <- updateThunk - pure (StaticThunk (Just (eidt, map StaticObjArg lidents')), CIRegs 0 [PtrV],r) - else return (StaticFun eidt (map StaticObjArg lidents'), - (if null lidents then CIRegs 1 (concatMap idJSRep args) - else CIRegs 0 (PtrV : concatMap idJSRep args)) - , mempty) + pure (SAKThunk, CIRegs 0 [PtrV], r) + else + let regs = if null lidents then CIRegs 1 (concatMap idJSRep args) + else CIRegs 0 (PtrV : concatMap idJSRep args) + in pure (SAKFun, regs, mempty) setcc <- ifProfiling $ if et == CIThunk then enterCostCentreThunk @@ -359,5 +360,5 @@ genToplevelRhs i rhs = case rhs of , ciStatic = sr } ccId <- costCentreStackLbl cc - emitStatic idt static ccId + emitStatic idt (StaticScalar $ StaticApp appK eidt $ map StaticObjArg lidents') ccId return $ (FuncStat eid [] (ll <> upd <> setcc <> body)) ===================================== compiler/GHC/StgToJS/Expr.hs ===================================== @@ -606,6 +606,32 @@ genCase ctx bnd e at alts l , ExprInline ) + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringName + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringUtf8Name + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + | isInlineExpr e = do bndi <- identsForId bnd let ctx' = ctxSetTop bnd ===================================== compiler/GHC/StgToJS/Ids.hs ===================================== @@ -155,7 +155,7 @@ cachedIdentForId i mi id_type = do -- Now update the GlobalId cache, if required - let update_global_cache = isGlobalId i && isNothing mi && id_type == IdPlain + let update_global_cache = isGlobalId i && id_type == IdPlain -- fixme also allow caching entries for lifting? when (update_global_cache) $ do ===================================== compiler/GHC/StgToJS/Linker/Linker.hs ===================================== @@ -24,8 +24,6 @@ module GHC.StgToJS.Linker.Linker ( jsLinkBinary , jsLink , embedJsFile - , staticInitStat - , staticDeclStat , mkExportedFuns , mkExportedModFuns , computeLinkDependencies @@ -1253,27 +1251,22 @@ staticInitStat :: StaticInfo -> JS.JStat staticInitStat (StaticInfo i sv mcc) = jStgStatToJS $ case sv of - StaticData con args -> appS hdStiStr $ add_cc_arg - [ global i - , global con - , jsStaticArgs args - ] - StaticFun f args -> appS hdStiStr $ add_cc_arg - [ global i - , global f - , jsStaticArgs args - ] - StaticList args mt -> appS hdStlStr $ add_cc_arg - [ global i - , jsStaticArgs args - , toJExpr $ maybe null_ (toJExpr . TxtI) mt - ] - StaticThunk (Just (f,args)) -> appS hdStcStr $ add_cc_arg - [ global i - , global f - , jsStaticArgs args - ] - _ -> mempty + StaticScalar (StaticApp k app args) -> appS + (if k == SAKThunk then hdStcStr else hdStiStr) + $ add_cc_arg + [ global i + , global app + , jsStaticArgs args + ] + + StaticList args mt -> appS hdStlStr + $ add_cc_arg + [ global i + , jsStaticArgs args + , toJExpr $ maybe null_ (toJExpr . TxtI) mt + ] + + StaticUnboxed _ -> mempty where -- add optional cost-center argument add_cc_arg as = case mcc of @@ -1286,20 +1279,15 @@ staticDeclStat (StaticInfo global_name static_value _) = jStgStatToJS decl where global_ident = name global_name decl_init v = global_ident ||= v - decl_no_init = appS hdDiStr [toJExpr global_ident] decl = case static_value of StaticUnboxed u -> decl_init (unboxed_expr u) - StaticThunk Nothing -> decl_no_init -- CAF initialized in an alternative way _ -> decl_init (app hdDStr []) unboxed_expr = \case StaticUnboxedBool b -> app hdPStr [toJExpr b] StaticUnboxedInt i -> app hdPStr [toJExpr i] StaticUnboxedDouble d -> app hdPStr [toJExpr (unSaneDouble d)] - -- GHCJS used a function wrapper for this: - -- StaticUnboxedString str -> ApplExpr (initStr str) [] - -- But we are defining it statically for now. StaticUnboxedString str -> initStr str StaticUnboxedStringOffset {} -> 0 ===================================== compiler/GHC/StgToJS/Monad.hs ===================================== @@ -153,26 +153,23 @@ getGlobalIdCache = State.gets (ggsGlobalIdCache . gsGroup) setGlobalIdCache :: GlobalIdCache -> G () setGlobalIdCache v = State.modify (\s -> s { gsGroup = (gsGroup s) { ggsGlobalIdCache = v}}) - data GlobalOcc = GlobalOcc - { global_ident :: !Ident - , global_id :: !Id + { global_id :: !Id , global_count :: !Word } instance Outputable GlobalOcc where ppr g = hang (text "GlobalOcc") 2 $ vcat - [ hcat [text "Ident: ", ppr (global_ident g)] - , hcat [text "Id:", ppr (global_id g)] + [ hcat [text "Id:", ppr (global_id g)] , hcat [text "Count:", ppr (global_count g)] ] --- | Return number of occurrences of every global id used in the given JStgStat. +-- | Return occurrences of every global id used in the given JStgStat. -- Sort by increasing occurrence count. -globalOccs :: JStgStat -> G [GlobalOcc] +globalOccs :: JStgStat -> G [Id] globalOccs jst = do GlobalIdCache gidc <- getGlobalIdCache - -- build a map form Ident Unique to (Ident, Id, Count) + -- build a map form Ident Unique to (Id, Count) let cmp_cnt g1 g2 = compare (global_count g1) (global_count g2) inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 } @@ -186,7 +183,7 @@ globalOccs jst = do Just (_k,gid) -> -- add it to the list of already found global ids. Increasing -- count by 1 - let g = GlobalOcc i gid 1 + let g = GlobalOcc gid 1 in go (addToUFM_C inc gids i g) is - pure $ go emptyUFM (identsS jst) + pure $ map global_id $ go emptyUFM $ identsS jst ===================================== compiler/GHC/StgToJS/Object.hs ===================================== @@ -615,16 +615,16 @@ instance Binary StaticInfo where get bh = StaticInfo <$> get bh <*> get bh <*> get bh instance Binary StaticVal where - put_ bh (StaticFun f args) = putByte bh 1 >> put_ bh f >> put_ bh args - put_ bh (StaticThunk t) = putByte bh 2 >> put_ bh t - put_ bh (StaticUnboxed u) = putByte bh 3 >> put_ bh u - put_ bh (StaticData dc args) = putByte bh 4 >> put_ bh dc >> put_ bh args - put_ bh (StaticList xs t) = putByte bh 5 >> put_ bh xs >> put_ bh t + put_ bh (StaticScalar (StaticApp SAKFun f args)) = putByte bh 1 >> put_ bh f >> put_ bh args + put_ bh (StaticScalar (StaticApp SAKThunk f args)) = putByte bh 2 >> put_ bh f >> put_ bh args + put_ bh (StaticUnboxed u) = putByte bh 3 >> put_ bh u + put_ bh (StaticScalar (StaticApp SAKData dc args)) = putByte bh 4 >> put_ bh dc >> put_ bh args + put_ bh (StaticList xs t) = putByte bh 5 >> put_ bh xs >> put_ bh t get bh = getByte bh >>= \case - 1 -> StaticFun <$> get bh <*> get bh - 2 -> StaticThunk <$> get bh + 1 -> StaticScalar <$> (StaticApp SAKFun <$> get bh <*> get bh) + 2 -> StaticScalar <$> (StaticApp SAKThunk <$> get bh <*> get bh) 3 -> StaticUnboxed <$> get bh - 4 -> StaticData <$> get bh <*> get bh + 4 -> StaticScalar <$> (StaticApp SAKData <$> get bh <*> get bh) 5 -> StaticList <$> get bh <*> get bh n -> error ("Binary get bh StaticVal: invalid tag " ++ show n) ===================================== compiler/GHC/StgToJS/Symbols.hs ===================================== @@ -849,9 +849,6 @@ unknown = fsLit "" typeof :: FastString typeof = fsLit "typeof" -hdRawStr :: FastString -hdRawStr = fsLit "h$rstr" - throwStr :: FastString throwStr = fsLit "throw" @@ -1213,8 +1210,6 @@ hdStlStr = fsLit "h$stl" hdStiStr :: FastString hdStiStr = fsLit "h$sti" -hdStrStr :: FastString -hdStrStr = fsLit "h$str" ------------------------------ Pack/Unpack -------------------------------------------- hdDecodeUtf8Z :: FastString ===================================== compiler/GHC/StgToJS/Types.hs ===================================== @@ -231,18 +231,25 @@ data StaticInfo = StaticInfo , siCC :: !(Maybe Ident) -- ^ optional CCS name } deriving stock (Eq, Show) +data StaticAppKind + = SAKFun + -- ^ heap object for function + | SAKThunk + -- ^ heap object for CAF + | SAKData + -- ^ regular datacon app + deriving stock (Eq, Show) + +-- Static scalar application +data StaticApp = StaticApp StaticAppKind !FastString [StaticArg] + deriving stock (Eq, Show) + data StaticVal - = StaticFun !FastString [StaticArg] - -- ^ heap object for function - | StaticThunk !(Maybe (FastString,[StaticArg])) - -- ^ heap object for CAF (field is Nothing when thunk is initialized in an - -- alternative way, like string thunks through h$str) - | StaticUnboxed !StaticUnboxed + = StaticUnboxed !StaticUnboxed -- ^ unboxed constructor (Bool, Int, Double etc) - | StaticData !FastString [StaticArg] - -- ^ regular datacon app | StaticList [StaticArg] (Maybe FastString) -- ^ list initializer (with optional tail) + | StaticScalar StaticApp deriving stock (Eq, Show) data StaticUnboxed ===================================== compiler/GHC/Types/Hint/Ppr.hs ===================================== @@ -403,9 +403,7 @@ pprImpliedExtensions extension = case implied of xs -> parens $ "implied by" <+> unquotedListWith "and" xs where implied = map (quotes . ppr) . filter (\ext -> extensionDeprecation ext == ExtensionNotDeprecated) - . map (\(impl, _, _) -> impl) - . filter (\(_, t, orig) -> orig == extension && t == turnOn) - $ impliedXFlags + $ [impl | (impl, On orig) <- impliedXFlags, orig == extension] pprPrefixUnqual :: Name -> SDoc pprPrefixUnqual name = ===================================== hadrian/src/Rules/ToolArgs.hs ===================================== @@ -99,7 +99,8 @@ multiSetup pkg_s = do writeFile' (resp_file root p) (intercalate "\n" (normalise_ghc arg_list ++ modules cd ++ concatMap rexp (reexportModules cd) - ++ ["-outputdir", hidir])) + ++ ["-outputdir", hidir, + "-this-package-name", pkgName p])) return (resp_file root p) ===================================== rts/js/string.js ===================================== @@ -1,53 +1,5 @@ //#OPTIONS: CPP -// encode a string constant -function h$str(s) { - var enc = null; - return function() { - if(enc === null) { - enc = h$encodeModifiedUtf8(s); - } - return enc; - } -} - -// encode a packed string -// since \0 is used to separate strings (and a common occurrence) -// we add the following mapping: -// - \0 -> \cz\0 -// - \cz -> \cz\cz -// -// decoding to bytes, the following is produced: -// - \cz\0 -> C0 80 -// - \cz\cz -> 1A -// -// additionally, for dealing with raw binary data we have an escape sequence -// to pack base64 encoded runs: -// -// - \cz\xNN -> followed by NN-0x1f (31 decimal) bytes of base64 encoded -// data. supported range: 0x20 .. 0x9f (1-128 bytes data) -// - -function h$pstr(s) { - var enc = null; - return function() { - if(enc === null) { - enc = h$encodePackedUtf8(s); - } - return enc; - } -} -// encode a raw string from bytes -function h$rstr(d) { - var enc = null; - return function() { - if(enc === null) { - enc = h$rawStringData(d); - } - return enc; - } -} - // these aren't added to the CAFs, so the list stays in mem indefinitely, is that a problem? #ifdef GHCJS_PROF function h$strt(str, cc) { return MK_LAZY_CC(function() { return h$toHsString(str, cc); }, cc); } @@ -265,10 +217,27 @@ function h$encodeUtf8(str) { return h$encodeUtf8Internal(str, false, false); } +// encode a string constant function h$encodeModifiedUtf8(str) { return h$encodeUtf8Internal(str, true, false); } +// encode a packed string +// since \0 is used to separate strings (and a common occurrence) +// we add the following mapping: +// - \0 -> \cz\0 +// - \cz -> \cz\cz +// +// decoding to bytes, the following is produced: +// - \cz\0 -> C0 80 +// - \cz\cz -> 1A +// +// additionally, for dealing with raw binary data we have an escape sequence +// to pack base64 encoded runs: +// +// - \cz\xNN -> followed by NN-0x1f (31 decimal) bytes of base64 encoded +// data. supported range: 0x20 .. 0x9f (1-128 bytes data) +// function h$encodePackedUtf8(str) { return h$encodeUtf8Internal(str, false, true); } @@ -759,6 +728,30 @@ function h$appendToHsStringA(str, appendTo) { return r; } +// unpack utf8 string, append to existing Haskell string +#ifdef GHCJS_PROF +function h$appendToHsString(str, appendTo, cc) { +#else +function h$appendToHsString(str, appendTo) { +#endif + var i = str.length - 1; + // we need to make an updatable thunk here + // if we embed the given closure in a CONS cell. + // (#24495) + var r = i == 0 ? appendTo : MK_UPD_THUNK(appendTo); + while(i>=0) { + // Copied from h$toHsString + var cp = str.charCodeAt(i); + if(cp >= 0xDC00 && cp <= 0xDFFF && i > 0) { + --i; + cp = (cp - 0xDC00) + (str.charCodeAt(i) - 0xD800) * 1024 + 0x10000; + } + r = MK_CONS_CC(cp, r, cc); + --i; + } + return r; +} + // throw e wrapped in a GHCJS.Prim.JSException in the current thread function h$throwJSException(e) { // create a JSException object and wrap it in a SomeException View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/02c3c58b5491dac950ea14f0243fd869d1671086...b3691a29fc2e80df4af3c2f75fdc7fd45afb47c1 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/02c3c58b5491dac950ea14f0243fd869d1671086...b3691a29fc2e80df4af3c2f75fdc7fd45afb47c1 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 17:44:14 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Mon, 25 Nov 2024 12:44:14 -0500 Subject: [Git][ghc/ghc][wip/T24359] More work in progress Message-ID: <6744b76e57a03_bd69431623046959@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 3c96f6bc by Simon Peyton Jones at 2024-11-25T17:43:50+00:00 More work in progress won't actually compile yet - - - - - 5 changed files: - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/HsToCore.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Tc/Gen/Sig.hs - testsuite/tests/simplCore/should_compile/simpl016.stderr Changes: ===================================== compiler/GHC/Core/SimpleOpt.hs ===================================== @@ -8,7 +8,7 @@ module GHC.Core.SimpleOpt ( SimpleOpts (..), defaultSimpleOpts, -- ** Simple expression optimiser - simpleOptPgm, simpleOptExpr, simpleOptExprWith, + simpleOptPgm, simpleOptExpr, simpleOptExprNoOccAnal, simpleOptExprWith, -- ** Join points joinPointBinding_maybe, joinPointBindings_maybe, @@ -146,6 +146,16 @@ simpleOptExpr opts expr -- It's a bit painful to call exprFreeVars, because it makes -- three passes instead of two (occ-anal, and go) +simpleOptExprNoOccAnal :: HasDebugCallStack => SimpleOpts -> CoreExpr -> CoreExpr +-- Same as simpleOptExpr but without occurrence analysis +-- Result: we don't inline evidence bindings, which is useful for the specialiser +simpleOptExprNoOccAnal opts expr + = simpl_opt_expr init_env expr + where + init_env = (emptyEnv opts) { soe_subst = init_subst } + init_subst = mkEmptySubst (mkInScopeSet (exprFreeVars expr)) + -- It's potentially important to make a proper in-scope set + simpleOptExprWith :: HasDebugCallStack => SimpleOpts -> Subst -> InExpr -> OutExpr -- See Note [The simple optimiser] simpleOptExprWith opts subst expr ===================================== compiler/GHC/HsToCore.hs ===================================== @@ -71,7 +71,7 @@ import GHC.Data.SizedSeq ( sizeSS ) import GHC.Utils.Error import GHC.Utils.Outputable -import GHC.Utils.Panic.Plain +import GHC.Utils.Panic import GHC.Utils.Misc import GHC.Utils.Monad import GHC.Utils.Logger @@ -294,9 +294,24 @@ deSugar hsc_env dsImpSpecs :: [LTcSpecPrag] -> DsM (OrdList (Id,CoreExpr), [CoreRule]) dsImpSpecs imp_specs - = do { spec_prs <- mapMaybeM (dsSpec Nothing . unLoc) imp_specs + = do { spec_prs <- mapMaybeM spec_one imp_specs ; let (spec_binds, spec_rules) = unzip spec_prs ; return (concatOL spec_binds, spec_rules) } + where + spec_one (L _ prag) = dsSpec (get_rhs prag) prag + + get_rhs (SpecPrag poly_id _ _) = get_rhs1 poly_id + get_rhs (SpecPragE { spe_poly_id = poly_id }) = get_rhs1 poly_id + + get_rhs1 poly_id + | Just unfolding <- maybeUnfoldingTemplate (realIdUnfolding poly_id) + = unfolding -- Imported Id; this is its unfolding + -- Use realIdUnfolding so we get the unfolding + -- even when it is a loop breaker. + -- We want to specialise recursive functions! + | otherwise = pprPanic "dsImpSpecs" (ppr poly_id) + -- The type checker has checked that it *has* an unfolding + combineEvBinds :: [CoreBind] -> [(Id,CoreExpr)] -> [CoreBind] -- Top-level bindings can include coercion bindings, but not via superclasses ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -802,14 +802,12 @@ dsSpecs poly_rhs (SpecPrags sps) dsLSpec :: CoreExpr -> Located TcSpecPrag -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) dsLSpec poly_rhs (L loc prag) - = putSrcSpanDs loc $ dsSpec (Just poly_rhs) prag + = putSrcSpanDs loc $ dsSpec poly_rhs prag -dsSpec :: Maybe CoreExpr -- Just rhs => RULE is for a local binding - -- Nothing => RULE is for an imported Id - -- rhs is in the Id's unfolding +dsSpec :: CoreExpr -- RHS to be specialised -> TcSpecPrag -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) -dsSpec mb_poly_rhs (SpecPrag poly_id spec_co spec_inl) +dsSpec poly_rhs (SpecPrag poly_id spec_co spec_inl) -- SpecPrag case: See Note [Handling old-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig | isJust (isClassOpId_maybe poly_id) = failBecauseOfClassOp poly_id @@ -821,13 +819,12 @@ dsSpec mb_poly_rhs (SpecPrag poly_id spec_co spec_inl) -- E.g. /\a \(d:Eq a). let d2 = $df d in [] (Maybe a) d2 = dsHsWrapper spec_app $ \core_app -> do { dflags <- getDynFlags - ; let poly_rhs = specFunBody poly_id mb_poly_rhs ; case decomposeRuleLhs dflags spec_bndrs (core_app (Var poly_id)) (mkVarSet spec_bndrs) of { Left msg -> do { diagnosticDs msg; return Nothing } ; Right (rule_bndrs, poly_id, rule_lhs_args) -> - finishSpecPrag rule_bndrs poly_id rule_lhs_args - rule_bndrs (core_app poly_rhs) spec_inl } } + finishSpecPrag poly_rhs rule_bndrs poly_id rule_lhs_args + rule_bndrs core_app spec_inl } } {- dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id @@ -876,7 +873,7 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id drop_cast e = e -} -dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id +dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id , spe_id_bndrs = id_bndrs , spe_tv_bndrs = tv_bndrs , spe_lhs_ev_bndrs = lhs_evs @@ -889,8 +886,7 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id | otherwise = dsTcEvBinds lhs_binds $ \ ds_lhs_binds -> - do { dflags <- getDynFlags - ; ds_call <- zapUnspecables $ + do { ds_call <- zapUnspecables $ -- zapUnspecables: see Note [Desugaring RULE left hand sides] dsLExpr the_call ; tracePm "dsSpec1" (vcat @@ -900,30 +896,37 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id , text "ds_lhs_binds" <+> ppr ds_lhs_binds , text "ds_call" <+> ppr ds_call ]) + ; dflags <- getDynFlags ; let simpl_opts = initSimpleOpts dflags - core_call = drop_cast $ - simpleOptExpr simpl_opts $ - ds_call + core_call = simpleOptExprNoOccAnal simpl_opts $ + mkLets ds_lhs_binds ds_call + + ; case prepareSpecLHS lhs_evs core_call of { + Nothing -> do { diagnosticDs (DsRuleLhsTooComplicated ds_call core_call) + ; return Nothing } ; - lhs_id_bndrs = id_bndrs ++ lhs_evs ++ bindersOfBinds ds_lhs_binds - id_bndr_set = mkVarSet lhs_id_bndrs + Just (qevs, rhs_const_binds, fn_id, lhs_args) -> + + + assertPpr (fn_id == poly_id) (ppr fn_id $$ ppr poly_id) $ + do { let lhs_id_bndrs = mkVarSet id_bndrs `unionVarSet` + qevs `unionVarSet` + mkVarSet (bindersOfBinds rhs_const_binds) -- lhs_id_bndrs: all the Ids in core_call that should be quantified -- These are the ones free in core_call that are local -- to this specialisation, not global - rule_bndrs = scopedSort (exprSomeFreeVarsList quantify_me core_call) - quantify_me v = isTyVar v || v `elemVarSet` id_bndr_set - -- Quantify over all tyvars; but only over Ids boundx explicitly + rule_bndrs = scopedSort (exprsSomeFreeVarsList quantify_me lhs_args) + quantify_me v = isTyVar v || v `elemVarSet` id_bndrs + -- Quantify over all tyvars; but only over Ids bound explicitly -- this is a terrible hack. What about local SPECIALISE pragmas -- that mention some in-scope TyVar? - rhs_const_binds :: [CoreBind] - rhs_const_binds = get_const_ev_binds lhs_evs ds_lhs_binds - const_bndrs = mkVarSet (bindersOfBinds rhs_const_binds) + const_bndrs = mkVarSet (bindersOfBinds rhs_const_binds) + spec_bndrs = filterOut (`elemVarSet` const_bndrs) rule_bndrs - spec_bndrs = filterOut (`elemVarSet` const_bndrs) rule_bndrs - - fn_body = specFunBody poly_id mb_poly_rhs + mk_spec_body fn_body = mkLets rhs_const_binds $ + mkCoreApps fn_body lhs_args ; tracePm "dsSpec2" (vcat [ text "poly_id" <+> ppr poly_id , text "ds_call" <+> ppr ds_call @@ -935,34 +938,36 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id , text "rhs_const_binds" <+> ppr rhs_const_binds ]) - ; case collectArgs core_call of - (Var fn_id, lhs_args) - -> assertPpr (fn_id == poly_id) (ppr fn_id $$ ppr poly_id) $ - finishSpecPrag + ; finishSpecPrag poly_rhs rule_bndrs poly_id lhs_args - spec_bndrs spec_body inl - where - spec_body = mkLets rhs_const_binds $ - mkCoreApps fn_body lhs_args + spec_bndrs mk_spec_body inl } } } - _other -> do { diagnosticDs (DsRuleLhsTooComplicated ds_call core_call) - ; return Nothing } } +prepareSpecLHS :: [EvVar] -> CoreExpr -> Maybe ([CoreBind], Id, [CoreExpr]) +prepareSpecLHS evs the_call + = go (mkVarSet evs) [] the_call where - drop_cast (Cast e _) = drop_cast e - drop_cast e = e - -get_const_ev_binds :: [EvVar] -> [CoreBind] -> [CoreBind] -get_const_ev_binds evs ev_binds - = go (mkVarSet evs) ev_binds - where - go :: VarSet -> [CoreBind] -> [CoreBind] - go _ [] = [] - go qevs (bind : binds) + go :: IdSet + -> [CoreBind] -- Reversed list of constant evidence bindings + -> CoreExpr + -> Maybe (IdSet, [CoreBind], Id, [CoreExpr]) + go qevs acc (Cast e co) + = go qevs acc e + go qevs acc (Let bind e) + | not (all isDictId bndrs) -- A normal 'let' is too complicated + = Nothing | all (isEmptyVarSet . exprSomeFreeVars (`elemVarSet` qevs)) $ rhssOfBind bind - = bind : go qevs binds + = go qevs (bind:acc) e | otherwise - = go (qevs `extendVarSetList` bindersOf bind) binds + = go (qevs `extendVarSetList` bndrs) acc e + where + bndrs = bindersOf bind + + go qevs acc e + | (Var fun, args) <- collectArgs e + = Just (qevs, reverse acc, fun, args) + | otherwise + = Nothing failBecauseOfClassOp :: Id -> DsM (Maybe a) -- There is no point in trying to specialise a class op @@ -972,11 +977,18 @@ failBecauseOfClassOp poly_id = do { diagnosticDs (DsUselessSpecialiseForClassMethodSelector poly_id) ; return Nothing } -finishSpecPrag :: [Var] -> Id -> [CoreExpr] -- LHS pattern - -> [Var] -> CoreExpr -> InlinePragma -- Specialised form +finishSpecPrag :: CoreExpr -- RHS to specialise + -> [Var] -> Id -> [CoreExpr] -- RULE LHS pattern + -> [Var] -> (CoreExpr -> CoreExpr) -> InlinePragma -- Specialised form -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) -finishSpecPrag rule_bndrs poly_id rule_lhs_args - spec_bndrs spec_body spec_inl +finishSpecPrag poly_rhs rule_bndrs poly_id rule_args + spec_bndrs mk_spec_body spec_inl + -- The RULE looks like + -- RULE "USPEC" forall rule_bndrs. f rule_args = $sf spec_bndrs + -- The specialised function looks like + -- $sf spec_bndrs = mk_spec_body + -- We also use mk_spec_body to specialise the methods in f's stable unfolding + -- NB: spec_bindrs is a subset of rule_bndrs = do { this_mod <- getModule ; uniq <- newUnique ; dflags <- getDynFlags @@ -989,46 +1001,32 @@ finishSpecPrag rule_bndrs poly_id rule_lhs_args simpl_opts = initSimpleOpts dflags fn_unf = realIdUnfolding poly_id - spec_unf = specUnfolding simpl_opts spec_bndrs mk_app rule_lhs_args fn_unf - mk_app e = mkApps e rule_lhs_args + spec_unf = specUnfolding simpl_opts spec_bndrs mk_spec_body rule_args fn_unf spec_id = mkLocalId spec_name ManyTy spec_ty -- Specialised binding is toplevel, hence Many. `setInlinePragma` inl_prag `setIdUnfolding` spec_unf rule = mkSpecRule dflags this_mod False rule_act (text "USPEC") - poly_id rule_bndrs rule_lhs_args + poly_id rule_bndrs rule_args (mkVarApps (Var spec_id) spec_bndrs) - rule_lhs_ty = exprType (mkApps (Var poly_id) rule_lhs_args) - spec_ty = mkLamTypes spec_bndrs rule_lhs_ty - spec_rhs = mkLams spec_bndrs spec_body + rule_ty = exprType (mkApps (Var poly_id) rule_args) + spec_ty = mkLamTypes spec_bndrs rule_ty + spec_rhs = mkLams spec_bndrs (mk_spec_body poly_rhs) ; dsWarnOrphanRule rule ; tracePm "dsSpec" (vcat [ text "fun:" <+> ppr poly_id , text "spec_bndrs:" <+> ppr spec_bndrs - , text "spec_body:" <+> ppr spec_body - , text "args:" <+> ppr rule_lhs_args ]) + , text "args:" <+> ppr rule_args ]) ; return (Just (unitOL (spec_id, spec_rhs), rule)) -- NB: do *not* use makeCorePair on (spec_id,spec_rhs), because -- makeCorePair overwrites the unfolding, which we have -- just created using specUnfolding } -specFunBody :: Id -> Maybe CoreExpr -> CoreExpr -specFunBody _ (Just rhs) - = rhs -- Local Id; this is its rhs -specFunBody poly_id Nothing - | Just unfolding <- maybeUnfoldingTemplate (realIdUnfolding poly_id) - = unfolding -- Imported Id; this is its unfolding - -- Use realIdUnfolding so we get the unfolding - -- even when it is a loop breaker. - -- We want to specialise recursive functions! - | otherwise = pprPanic "dsImpSpecs" (ppr poly_id) - -- The type checker has checked that it *has* an unfolding - specFunInlinePrag :: Id -> InlinePragma -> InlinePragma -> InlinePragma -- See Note [Activation pragmas for SPECIALISE] ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -941,6 +941,14 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) emptyVarSet tv_bndrs qevs wanted + ; traceTc "tcSpecPrag:SpecSigE" $ + vcat [ text "nm:" <+> ppr nm + , text "tv_bndrs:" <+> ppr tv_bndrs + , text "id_bndrs:" <+> ppr id_bndrs + , text "qevs:" <+> ppr qevs + , text "spec_e:" <+> ppr spec_e' + , text "inl:" <+> ppr inl ] + ; return [SpecPragE { spe_poly_id = poly_id , spe_tv_bndrs = tv_bndrs , spe_id_bndrs = id_bndrs ===================================== testsuite/tests/simplCore/should_compile/simpl016.stderr ===================================== @@ -1,10 +0,0 @@ - -simpl016.hs:7:1: warning: [GHC-40548] - Forall'd constraint ‘Num b’ is not bound in RULE lhs - Orig bndrs: [b, $dNum] - Orig lhs: let { - $dEq :: Eq Int - [LclId] - $dEq = GHC.Classes.$fEqInt } in - delta' @Int @b $dEq - optimised lhs: delta' @Int @b $dEq View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3c96f6bc145a6ae7247ea46c841b38e429f72295 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3c96f6bc145a6ae7247ea46c841b38e429f72295 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 17:50:20 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 25 Nov 2024 12:50:20 -0500 Subject: [Git][ghc/ghc][wip/T24744] Fix tests Message-ID: <6744b8dc715d9_bd6944035444934@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: f92ed806 by Serge S. Gulin at 2024-11-25T20:49:23+03:00 Fix tests - - - - - 7 changed files: - compiler/GHC/StgToJS/Apply.hs - testsuite/tests/javascript/Makefile - testsuite/tests/javascript/T23479_1.hs → testsuite/tests/javascript/T23479.hs - testsuite/tests/javascript/T23479_1.stdout → testsuite/tests/javascript/T23479.stdout - testsuite/tests/javascript/T23479_2.hs → testsuite/tests/javascript/T24744.hs - testsuite/tests/javascript/T23479_2.stdout → testsuite/tests/javascript/T24744.stdout - testsuite/tests/javascript/all.T Changes: ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -100,7 +100,7 @@ genApp -> [StgArg] -> G (JStgStat, ExprResult) genApp ctx i args - -- Test case T23479_1 + -- Test case T23479 | [StgLitArg (LitString bs)] <- args , Just d <- decodeModifiedUTF8 bs , idName i == unsafeUnpackJSStringUtf8ShShName ===================================== testsuite/tests/javascript/Makefile ===================================== @@ -13,20 +13,20 @@ T24495: # check that the optimization occurred for -02 1 time (1 for unfloated lits) grep -c appendToHsStringA T24495.dump-js -T23479_1: - '$(TEST_HC)' $(TEST_HC_OPTS) T23479_1.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file - ./T23479_1 +T23479: + '$(TEST_HC)' $(TEST_HC_OPTS) T23479.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file + ./T23479 # check that the optimization occurred - grep -c "h\$$r1 = \"test_val_1\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_2\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_3\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_80_local" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_80_global" T23479_1.dump-js || true + grep -c "h\$$r1 = \"test_val_1\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_2\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_3\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_80_local" T23479.dump-js + grep -c "h\$$r1 = \"test_val_80_global" T23479.dump-js || true -T23479_2: - '$(TEST_HC)' $(TEST_HC_OPTS) T23479_2.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file - ./T23479_2 - grep -c "h\$$r1 = \"test_val_1\"" T23479_2.dump-js - grep -c "h\$$r1 = \"test_val_80_local_once" T23479_2.dump-js +T24744: + '$(TEST_HC)' $(TEST_HC_OPTS) T24744.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file + ./T24744 + grep -c "h\$$r1 = \"test_val_1\"" T24744.dump-js + grep -c "h\$$r1 = \"test_val_80_local_once" T24744.dump-js # check that the optimization occurred - grep -c "h\$$r1 = h\$$decodeUtf8z" T23479_2.dump-js + grep -c "h\$$r1 = h\$$decodeUtf8z" T24744.dump-js ===================================== testsuite/tests/javascript/T23479_1.hs → testsuite/tests/javascript/T23479.hs ===================================== ===================================== testsuite/tests/javascript/T23479_1.stdout → testsuite/tests/javascript/T23479.stdout ===================================== ===================================== testsuite/tests/javascript/T23479_2.hs → testsuite/tests/javascript/T24744.hs ===================================== ===================================== testsuite/tests/javascript/T23479_2.stdout → testsuite/tests/javascript/T24744.stdout ===================================== ===================================== testsuite/tests/javascript/all.T ===================================== @@ -23,5 +23,5 @@ test('T22455', normal, compile_and_run, ['-ddisable-js-minifier']) test('T23565', normal, compile_and_run, ['']) test('T24495', normal, makefile_test, ['T24495']) -test('T23479_1', normal, makefile_test, ['T23479_1']) -test('T23479_2', normal, makefile_test, ['T23479_2']) +test('T23479', normal, makefile_test, ['T23479']) +test('T24744', normal, makefile_test, ['T24744']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f92ed806c8f300860e6930c34aac7d81647b5a5f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f92ed806c8f300860e6930c34aac7d81647b5a5f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 18:07:40 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 25 Nov 2024 13:07:40 -0500 Subject: [Git][ghc/ghc][wip/T24744] Fix tests Message-ID: <6744bcec766a6_bd694626cf4515e0@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 14240362 by Serge S. Gulin at 2024-11-25T21:07:31+03:00 Fix tests - - - - - 1 changed file: - testsuite/tests/javascript/Makefile Changes: ===================================== testsuite/tests/javascript/Makefile ===================================== @@ -29,4 +29,4 @@ T24744: grep -c "h\$$r1 = \"test_val_1\"" T24744.dump-js grep -c "h\$$r1 = \"test_val_80_local_once" T24744.dump-js # check that the optimization occurred - grep -c "h\$$r1 = h\$$decodeUtf8z" T24744.dump-js + grep -c "h\$$stc(h\$$mainZCMainzitestzuvalzu80zulocal,h\$$mainZCMainzitestzuvalzu80zulocal_e,[h\$$mainZCMainzimain7_1,h\$$mainZCMainzimain7_2,h\$$ghczmprimZCGHCziCStringziunpackCStringzh])" T24744.jsexe/out.js View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/14240362d4f521f129f4b00f4beda45f5c73575f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/14240362d4f521f129f4b00f4beda45f5c73575f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 18:21:06 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 25 Nov 2024 13:21:06 -0500 Subject: [Git][ghc/ghc][wip/T24744] Alternate way "Enable static args" Message-ID: <6744c012a97ff_bd69472a10053287@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 0a380815 by Serge S. Gulin at 2024-11-25T21:20:53+03:00 Alternate way "Enable static args" - - - - - 1 changed file: - compiler/GHC/StgToJS/Monad.hs Changes: ===================================== compiler/GHC/StgToJS/Monad.hs ===================================== @@ -173,6 +173,8 @@ globalOccs jst = do let cmp_cnt g1 g2 = compare (global_count g1) (global_count g2) inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 } + + go :: UniqFM Id GlobalOcc -> [Ident] -> [GlobalOcc] go gids = \case [] -> -- return global Ids used locally sorted by increased use L.sortBy cmp_cnt $ nonDetEltsUFM gids @@ -184,6 +186,6 @@ globalOccs jst = do -- add it to the list of already found global ids. Increasing -- count by 1 let g = GlobalOcc gid 1 - in go (addToUFM_C inc gids i g) is + in go (addToUFM_C inc gids gid g) is pure $ map global_id $ go emptyUFM $ identsS jst View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a3808150f0c2a0f6dc10560f943b77aca72ac52 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0a3808150f0c2a0f6dc10560f943b77aca72ac52 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 18:41:08 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 25 Nov 2024 13:41:08 -0500 Subject: [Git][ghc/ghc][wip/T24744] Fix tests Message-ID: <6744c4c474bc1_bd6949469d459634@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 86809572 by Serge S. Gulin at 2024-11-25T21:37:53+03:00 Fix tests - - - - - 1 changed file: - testsuite/tests/javascript/Makefile Changes: ===================================== testsuite/tests/javascript/Makefile ===================================== @@ -29,4 +29,4 @@ T24744: grep -c "h\$$r1 = \"test_val_1\"" T24744.dump-js grep -c "h\$$r1 = \"test_val_80_local_once" T24744.dump-js # check that the optimization occurred - grep -c "h\$$stc(h\$$mainZCMainzitestzuvalzu80zulocal,h\$$mainZCMainzitestzuvalzu80zulocal_e,[h\$$mainZCMainzimain7_1,h\$$mainZCMainzimain7_2,h\$$ghczmprimZCGHCziCStringziunpackCStringzh])" T24744.jsexe/out.js + grep -c "h\$$stc(h\$$mainZCMainzitestzuvalzu80zulocal,h\$$mainZCMainzitestzuvalzu80zulocal_e,[h\$$ghczmprimZCGHCziCStringziunpackCStringzh,h\$$mainZCMainzimain7_1,h\$$mainZCMainzimain7_2])" T24744.jsexe/out.js View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8680957222bc126cbfe69554d6fdde482a0eb2a5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8680957222bc126cbfe69554d6fdde482a0eb2a5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 18:50:34 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Mon, 25 Nov 2024 13:50:34 -0500 Subject: [Git][ghc/ghc][wip/T24744] Fix tests Message-ID: <6744c6fa8d917_bd694a2ad3c6138c@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 5d0d86f7 by Serge S. Gulin at 2024-11-25T21:50:20+03:00 Fix tests - - - - - 1 changed file: - testsuite/tests/javascript/Makefile Changes: ===================================== testsuite/tests/javascript/Makefile ===================================== @@ -29,4 +29,4 @@ T24744: grep -c "h\$$r1 = \"test_val_1\"" T24744.dump-js grep -c "h\$$r1 = \"test_val_80_local_once" T24744.dump-js # check that the optimization occurred - grep -c "h\$$stc(h\$$mainZCMainzitestzuvalzu80zulocal,h\$$mainZCMainzitestzuvalzu80zulocal_e,[h\$$ghczmprimZCGHCziCStringziunpackCStringzh,h\$$mainZCMainzimain7_1,h\$$mainZCMainzimain7_2])" T24744.jsexe/out.js + grep -c "h\$$stc(h\$$mainZCMainzitestzuvalzu80zulocal,h\$$mainZCMainzitestzuvalzu80zulocal_e,\[h\$$ghczmprimZCGHCziCStringziunpackCStringzh,h\$$mainZCMainzimain7_1,h\$$mainZCMainzimain7_2\])" T24744.jsexe/out.js View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5d0d86f7a331238df51794b733a47277720ab04c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5d0d86f7a331238df51794b733a47277720ab04c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:01:26 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 14:01:26 -0500 Subject: [Git][ghc/ghc][master] driver: Always link against "base" package when one shot linking Message-ID: <6744c9862d59b_bd694b76e3476128@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 14 changed files: - .gitlab/hello.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/packages.rst - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T Changes: ===================================== .gitlab/hello.hs ===================================== @@ -1,5 +1,6 @@ {-# OPTIONS_GHC -Wall -Wno-missing-fields #-} +import GHC.Unit.Types (stringToUnitId) import GHC hiding (parseModule) import GHC.Data.StringBuffer import GHC.Driver.Config.Parser @@ -26,7 +27,8 @@ fakeSettings = sToolSettings = ToolSettings {}, sTargetPlatform = genericPlatform, - sPlatformMisc = PlatformMisc {} + sPlatformMisc = PlatformMisc {}, + sUnitSettings = UnitSettings { unitSettings_baseUnitId = stringToUnitId "base" } } fakeDynFlags :: DynFlags ===================================== compiler/GHC/Driver/DynFlags.hs ===================================== @@ -62,6 +62,10 @@ module GHC.Driver.DynFlags ( versionedAppDir, versionedFilePath, extraGccViaCFlags, globalPackageDatabasePath, + -- + baseUnitId, + + -- * Include specifications IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes, addImplicitQuoteInclude, @@ -165,6 +169,8 @@ data DynFlags = DynFlags { -- formerly Settings ghcNameVersion :: {-# UNPACK #-} !GhcNameVersion, fileSettings :: {-# UNPACK #-} !FileSettings, + unitSettings :: {-# UNPACK #-} !UnitSettings, + targetPlatform :: Platform, -- Filled in by SysTools toolSettings :: {-# UNPACK #-} !ToolSettings, platformMisc :: {-# UNPACK #-} !PlatformMisc, @@ -634,6 +640,7 @@ defaultDynFlags mySettings = splitInfo = Nothing, ghcNameVersion = sGhcNameVersion mySettings, + unitSettings = sUnitSettings mySettings, fileSettings = sFileSettings mySettings, toolSettings = sToolSettings mySettings, targetPlatform = sTargetPlatform mySettings, @@ -1474,6 +1481,11 @@ versionedAppDir appname platform = do versionedFilePath :: ArchOS -> FilePath versionedFilePath platform = uniqueSubdir platform +-- | Access the unit-id of the version of `base` which we will automatically link +-- against. +baseUnitId :: DynFlags -> UnitId +baseUnitId dflags = unitSettings_baseUnitId (unitSettings dflags) + -- SDoc ------------------------------------------- -- | Initialize the pretty-printing options ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -80,6 +80,9 @@ module GHC.Driver.Session ( safeDirectImpsReq, safeImplicitImpsReq, unsafeFlags, unsafeFlagsForInfer, + -- ** base + baseUnitId, + -- ** System tool settings and locations Settings(..), sProgramName, @@ -390,6 +393,7 @@ settings :: DynFlags -> Settings settings dflags = Settings { sGhcNameVersion = ghcNameVersion dflags , sFileSettings = fileSettings dflags + , sUnitSettings = unitSettings dflags , sTargetPlatform = targetPlatform dflags , sToolSettings = toolSettings dflags , sPlatformMisc = platformMisc dflags @@ -488,6 +492,10 @@ opt_las dflags = toolSettings_opt_las $ toolSettings dflags opt_i :: DynFlags -> [String] opt_i dflags= toolSettings_opt_i $ toolSettings dflags + +setBaseUnitId :: String -> DynP () +setBaseUnitId s = upd $ \d -> d { unitSettings = UnitSettings (stringToUnitId s) } + ----------------------------------------------------------------------------- {- @@ -2053,6 +2061,7 @@ package_flags_deps = [ (NoArg (setGeneralFlag Opt_DistrustAllPackages)) , make_ord_flag defFlag "trust" (HasArg trustPackage) , make_ord_flag defFlag "distrust" (HasArg distrustPackage) + , make_ord_flag defFlag "base-unit-id" (HasArg setBaseUnitId) ] where setPackageEnv env = upd $ \s -> s { packageEnv = Just env } ===================================== compiler/GHC/Settings.hs ===================================== @@ -5,6 +5,7 @@ module GHC.Settings ( Settings (..) , ToolSettings (..) , FileSettings (..) + , UnitSettings(..) , GhcNameVersion (..) , Platform (..) , PlatformMisc (..) @@ -73,6 +74,7 @@ import GHC.Prelude import GHC.Utils.CliOption import GHC.Utils.Fingerprint import GHC.Platform +import GHC.Unit.Types data Settings = Settings { sGhcNameVersion :: {-# UNPACk #-} !GhcNameVersion @@ -80,12 +82,15 @@ data Settings = Settings , sTargetPlatform :: Platform -- Filled in by SysTools , sToolSettings :: {-# UNPACK #-} !ToolSettings , sPlatformMisc :: {-# UNPACK #-} !PlatformMisc + , sUnitSettings :: !UnitSettings -- You shouldn't need to look things up in rawSettings directly. -- They should have their own fields instead. , sRawSettings :: [(String, String)] } +data UnitSettings = UnitSettings { unitSettings_baseUnitId :: !UnitId } + -- | Settings for other executables GHC calls. -- -- Probably should further split down by phase, or split between ===================================== compiler/GHC/Settings/IO.hs ===================================== @@ -19,6 +19,7 @@ import GHC.Utils.Panic import GHC.ResponseFile import GHC.Settings import GHC.SysTools.BaseDir +import GHC.Unit.Types import Data.Char import Control.Monad.Trans.Except @@ -174,6 +175,8 @@ initSettings top_dir = do ghcWithInterpreter <- getBooleanSetting "Use interpreter" useLibFFI <- getBooleanSetting "Use LibFFI" + baseUnitId <- getSetting "base unit-id" + return $ Settings { sGhcNameVersion = GhcNameVersion { ghcNameVersion_programName = "ghc" @@ -188,6 +191,11 @@ initSettings top_dir = do , fileSettings_globalPackageDatabase = globalpkgdb_path } + , sUnitSettings = UnitSettings + { + unitSettings_baseUnitId = stringToUnitId baseUnitId + } + , sToolSettings = ToolSettings { toolSettings_ldSupportsCompactUnwind = ldSupportsCompactUnwind , toolSettings_ldSupportsFilelist = ldSupportsFilelist ===================================== compiler/GHC/Unit/State.hs ===================================== @@ -364,9 +364,13 @@ initUnitConfig dflags cached_dbs home_units = autoLink | not (gopt Opt_AutoLinkPackages dflags) = [] - -- By default we add ghc-internal & rts to the preload units (when they are + -- By default we add base, ghc-internal and rts to the preload units (when they are -- found in the unit database) except when we are building them - | otherwise = filter (hu_id /=) [ghcInternalUnitId, rtsUnitId] + -- + -- Since "base" is not wired in, then the unit-id is discovered + -- from the settings file by default, but can be overriden by power-users + -- by specifying `-base-unit-id` flag. + | otherwise = filter (hu_id /=) [baseUnitId dflags, ghcInternalUnitId, rtsUnitId] -- if the home unit is indefinite, it means we are type-checking it only -- (not producing any code). Hence we can use virtual units instantiated ===================================== distrib/configure.ac.in ===================================== @@ -366,6 +366,17 @@ if test "x$UseLibdw" = "xYES" ; then fi AC_SUBST(UseLibdw) +dnl What is the version of the base library which we are going to use? +dnl The user can use BASE_UNIT_ID at install time to point the compiler to +dnl link against a different base package by default. +dnl If the package is unavailable it will simply not be linked against. +BaseUnitId=@BaseUnitId@ +if test -n "$BASE_UNIT_ID"; then + BaseUnitId="$BASE_UNIT_ID" +fi + +AC_SUBST(BaseUnitId) + FP_SETTINGS # We get caught by ===================================== docs/users_guide/packages.rst ===================================== @@ -239,9 +239,27 @@ The GHC command line options that control packages are: :type: dynamic :category: - By default, GHC will automatically link in the ``base`` and ``rts`` + By default, GHC will automatically link in the ``base``, ``ghc-internal`` and ``rts`` packages. This flag disables that behaviour. + The unit-id of the ``base`` package which is automatically linked can be set using + the :ghc-flag:`-base-unit-id ⟨unit-id⟩` flag. + +.. ghc-flag:: -base-unit-id ⟨unit-id⟩ + :shortdesc: The unit-id of the "base" package, which will be automatically linked. + :type: dynamic + :category: + + By default the compiler will link against the ``base``, ``ghc-internal``, + and ``rts`` package, this flag controls what the ``base`` package linked + against is. + + You should only need to pass this flag if you really know what you are doing. + Distributors can set a default unit-id for base at install time by specifying + the ``BASE_UNIT_ID`` environment variable. + + + .. ghc-flag:: -this-unit-id ⟨unit-id⟩ :shortdesc: Compile to be part of unit (i.e. package) ⟨unit-id⟩ ===================================== hadrian/bindist/Makefile ===================================== @@ -142,6 +142,7 @@ lib/settings : config.mk @echo ',("Use LibFFI", "$(UseLibffiForAdjustors)")' >> $@ @echo ',("RTS expects libdw", "$(GhcRtsWithLibdw)")' >> $@ @echo ',("Relative Global Package DB", "package.conf.d")' >> $@ + @echo ',("base unit-id", "$(BaseUnitId)")' >> $@ @echo "]" >> $@ # We need to install binaries relative to libraries. ===================================== hadrian/bindist/config.mk.in ===================================== @@ -134,6 +134,7 @@ CrossCompiling = @CrossCompiling@ CrossCompilePrefix = @CrossCompilePrefix@ GhcUnregisterised = @Unregisterised@ EnableDistroToolchain = @SettingsUseDistroMINGW@ +BaseUnitId = @BaseUnitId@ # The THREADED_RTS requires `BaseReg` to be in a register and the # `GhcUnregisterised` mode doesn't allow that. ===================================== hadrian/src/Rules/Generate.hs ===================================== @@ -435,6 +435,7 @@ bindistRules = do , interpolateVar "UseLibdw" $ fmap yesNo $ interp $ getFlag UseLibdw , interpolateVar "UseLibffiForAdjustors" $ yesNo <$> getTarget tgtUseLibffiForAdjustors , interpolateVar "GhcWithSMP" $ yesNo <$> targetSupportsSMP + , interpolateVar "BaseUnitId" $ pkgUnitId Stage1 base ] where interp = interpretInContext (semiEmptyTarget Stage2) @@ -471,6 +472,14 @@ generateSettings settingsFile = do Stage2 -> get_pkg_db Stage1 Stage3 -> get_pkg_db Stage2 + -- The unit-id of the base package which is always linked against (#25382) + base_unit_id <- expr $ do + case stage of + Stage0 {} -> error "Unable to generate settings for stage0" + Stage1 -> pkgUnitId Stage1 base + Stage2 -> pkgUnitId Stage1 base + Stage3 -> pkgUnitId Stage2 base + let rel_pkg_db = makeRelativeNoSysLink (dropFileName settingsFile) package_db_path settings <- traverse sequence $ @@ -531,6 +540,7 @@ generateSettings settingsFile = do , ("Use LibFFI", expr $ yesNo <$> useLibffiForAdjustors) , ("RTS expects libdw", yesNo <$> getFlag UseLibdw) , ("Relative Global Package DB", pure rel_pkg_db) + , ("base unit-id", pure base_unit_id) ] let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")" pure $ case settings of ===================================== testsuite/tests/driver/Makefile ===================================== @@ -808,3 +808,8 @@ T23339B: "$(TEST_HC)" -tmpdir "$(PWD)/tmp" $(TEST_HC_OPTS) -v0 T23339B.hs -finfo-table-map # Check that the file is kept and is the right one find . -name "*.c" -exec cat {} \; | grep "init__ip_init" + +# Test that base is linked against implicitly +T25382: + "$(TEST_HC)" $(TEST_HC_OPTS) -c T25382.hs + "$(TEST_HC)" $(TEST_HC_OPTS) T25382.o -o main ===================================== testsuite/tests/driver/T25382.hs ===================================== @@ -0,0 +1,7 @@ +module Main where + +import Data.Complex + +main = do + x <- readLn :: IO (Complex Int) + print $ realPart x ===================================== testsuite/tests/driver/all.T ===================================== @@ -330,3 +330,4 @@ test('T23944', [unless(have_dynamic(), skip), extra_files(['T23944A.hs'])], mult test('T24286', [cxx_src, unless(have_profiling(), skip), extra_files(['T24286.cpp'])], compile, ['-prof -no-hs-main']) test('T24839', [unless(arch('x86_64') or arch('aarch64'), skip), extra_files(["t24839_sub.S"])], compile_and_run, ['t24839_sub.S']) test('t25150', [extra_files(["t25150"])], multimod_compile, ['Main.hs', '-v0 -working-dir t25150/dir a.c']) +test('T25382', normal, makefile_test, []) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7536181d54e929397716dedcef7f04975a699373 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7536181d54e929397716dedcef7f04975a699373 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:01:53 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 14:01:53 -0500 Subject: [Git][ghc/ghc][master] Compacting GC: Handle black holes in large objects. Message-ID: <6744c9a17b6d2_bd694d02b2c803b0@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 5 changed files: - rts/sm/Compact.c - rts/sm/Evac.c - + testsuite/tests/rts/T14497-compact.hs - + testsuite/tests/rts/T14497-compact.stdout - testsuite/tests/rts/all.T Changes: ===================================== rts/sm/Compact.c ===================================== @@ -68,6 +68,10 @@ pointer. ------------------------------------------------------------------------- */ +static /* STATIC_INLINE */ P_ +thread_obj (const StgInfoTable *info, P_ p); + + STATIC_INLINE W_ UNTAG_PTR(W_ p) { @@ -567,6 +571,13 @@ update_fwd_large( bdescr *bd ) // nothing to follow continue; + // See Note [Black holes in large objects] in Evac.c for why. + case BLACKHOLE: + { + thread_obj(info, p); + continue; + } + case MUT_ARR_PTRS_CLEAN: case MUT_ARR_PTRS_DIRTY: case MUT_ARR_PTRS_FROZEN_CLEAN: ===================================== rts/sm/Evac.c ===================================== @@ -1112,6 +1112,8 @@ evacuate_BLACKHOLE(StgClosure **p) return; } + // Note [Black holes in large objects] + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // blackholes *can* be in a large object: when raiseAsync() creates an // AP_STACK the payload might be large enough to create a large object. // See #14497. ===================================== testsuite/tests/rts/T14497-compact.hs ===================================== @@ -0,0 +1,13 @@ +module Main (main) where + +import System.Timeout + +fuc :: Integer -> Integer +fuc 0 = 1 +fuc n = n * fuc (n - 1) + +main :: IO () +main = do + let x = fuc 30000 + timeout 500 (print x) + print (x > 0) ===================================== testsuite/tests/rts/T14497-compact.stdout ===================================== @@ -0,0 +1 @@ +True ===================================== testsuite/tests/rts/all.T ===================================== @@ -444,6 +444,13 @@ test('T13894', js_skip, compile_and_run, ['']) # this test fails with the profasm way on some machines but not others, # so we just skip it. test('T14497', [omit_ways(['profasm']), multi_cpu_race], compile_and_run, ['-O']) +# The issue in the above test also happened with compaction enabled. +test('T14497-compact', + [ extra_files(['T14497.hs']) + , omit_ways(['profasm']) + , multi_cpu_race + , extra_run_opts('+RTS -c -RTS') + ] , compile_and_run, ['-O']) test('T14695', [js_broken(22359), ignore_stderr], makefile_test, ['T14695']) test('T14702', [ ignore_stdout , when(unregisterised(), skip) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7f90f319531c312a074d21688b05f664f0d173fc -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7f90f319531c312a074d21688b05f664f0d173fc You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:02:39 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 14:02:39 -0500 Subject: [Git][ghc/ghc][master] ci: minor nix-in-docker improvements Message-ID: <6744c9cf6081a_bd69411780e4831e1@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== @@ -289,7 +289,7 @@ lint-author: - *drafts-can-fail-lint lint-ci-config: - image: nixos/nix:2.14.1 + image: nixos/nix:2.25.2 extends: .lint # We don't need history/submodules in this job variables: @@ -299,10 +299,16 @@ lint-ci-config: - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf # Note [Nix-in-Docker] # ~~~~~~~~~~~~~~~~~~~~ - # FIXME: This is a workaround for a Nix-in-Docker issue. See + # The nixos/nix default config is max-jobs=1 and cores=$(logical + # cores num) which doesn't play nice with our $CPUS convention. We + # fix it before invoking any nix build to avoid oversubscribing + # while allowing a reasonable degree of parallelism. + # FIXME: Disabling build-users-group=nixbld is a workaround for a Nix-in-Docker issue. See # https://gitlab.haskell.org/ghc/head.hackage/-/issues/38#note_560487 for # discussion. - - nix-shell -p gnused --run "sed -i -e 's/nixbld//' /etc/nix/nix.conf" + - echo "cores = $CPUS" >> /etc/nix/nix.conf + - echo "max-jobs = $CPUS" >> /etc/nix/nix.conf + - nix run nixpkgs#gnused -- -i -e 's/ nixbld//' /etc/nix/nix.conf script: - nix run .gitlab/generate-ci#generate-jobs # 1 if .gitlab/generate_jobs changed the output of the generated config @@ -1107,7 +1113,7 @@ project-version: .ghcup-metadata: stage: deploy - image: nixos/nix:2.14.1 + image: nixos/nix:2.25.2 dependencies: null tags: - x86_64-linux @@ -1117,7 +1123,9 @@ project-version: before_script: - echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf # FIXME: See Note [Nix-in-Docker] - - nix-shell -p gnused --run "sed -i -e 's/nixbld//' /etc/nix/nix.conf" + - echo "cores = $CPUS" >> /etc/nix/nix.conf + - echo "max-jobs = $CPUS" >> /etc/nix/nix.conf + - nix run nixpkgs#gnused -- -i -e 's/ nixbld//' /etc/nix/nix.conf - nix-channel --update - cat version.sh # Calculate the project version @@ -1182,7 +1190,7 @@ ghcup-metadata-nightly: artifacts: false - job: project-version script: - - nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml" + - nix shell -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml" rules: - if: $NIGHTLY @@ -1220,7 +1228,7 @@ ghcup-metadata-release: # No explicit needs for release pipeline as we assume we need everything and everything will pass. extends: .ghcup-metadata script: - - nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --release-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml" + - nix shell -f .gitlab/rel_eng -c ghcup-metadata --release-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml" rules: - if: '$RELEASE_JOB == "yes"' View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/291388e18b5b61a02a43cc153a642fd67d6127c4 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/291388e18b5b61a02a43cc153a642fd67d6127c4 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:03:28 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 14:03:28 -0500 Subject: [Git][ghc/ghc][master] ci: avoid depending on stack job for test-bootstrap jobs Message-ID: <6744ca0078ca9_bd694b6cdbc86146@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== @@ -638,6 +638,8 @@ hackage-doc-tarball: source-tarball: stage: full-build + needs: + - hadrian-ghc-in-ghci tags: - x86_64-linux image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:$DOCKER_REV" @@ -659,6 +661,8 @@ source-tarball: generate-hadrian-bootstrap-sources: stage: full-build + needs: + - hadrian-ghc-in-ghci tags: - x86_64-linux image: "$DOCKER_IMAGE" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e684c40693577f47b1e6984f4c7994859edef6ad -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e684c40693577f47b1e6984f4c7994859edef6ad You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:04:15 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 14:04:15 -0500 Subject: [Git][ghc/ghc][master] Refactoring: Remove `pSupportedExts` from `ParserOpts` Message-ID: <6744ca2f96b8c_bd694e106e0895e5@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00 Refactoring: Remove `pSupportedExts` from `ParserOpts` This is never used for lexing / parsing. It is only used by `GHC.Parser.Header.getOptions`. - - - - - 13 changed files: - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Config/Parser.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Parser/HaddockLex.x - compiler/GHC/Parser/Header.hs - compiler/GHC/Parser/Lexer.x - ghc/GHCi/UI.hs - testsuite/tests/ghc-api/T10942.hs - utils/check-exact/Parsers.hs - utils/haddock/haddock-api/src/Haddock.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker.hs - utils/haddock/haddock-api/src/Haddock/GhcUtils.hs Changes: ===================================== compiler/GHC/Driver/Backpack.hs ===================================== @@ -24,7 +24,7 @@ import GHC.Driver.Backend -- In a separate module because it hooks into the parser. import GHC.Driver.Backpack.Syntax import GHC.Driver.Config.Finder (initFinderOpts) -import GHC.Driver.Config.Parser (initParserOpts) +import GHC.Driver.Config.Parser import GHC.Driver.Config.Diagnostic import GHC.Driver.Monad import GHC.Driver.Session @@ -100,7 +100,7 @@ doBackpack [src_filename] = do dflags0 <- getDynFlags let dflags1 = dflags0 let parser_opts1 = initParserOpts dflags1 - (p_warns, src_opts) <- liftIO $ getOptionsFromFile parser_opts1 src_filename + (p_warns, src_opts) <- liftIO $ getOptionsFromFile parser_opts1 (supportedLanguagePragmas dflags1) src_filename (dflags, unhandled_flags, warns) <- liftIO $ parseDynamicFilePragma dflags1 src_opts modifySession (hscSetFlags dflags) logger <- getLogger -- Get the logger after having set the session flags, ===================================== compiler/GHC/Driver/Config/Parser.hs ===================================== @@ -1,5 +1,6 @@ module GHC.Driver.Config.Parser ( initParserOpts + , supportedLanguagePragmas ) where @@ -17,9 +18,10 @@ initParserOpts = mkParserOpts <$> extensionFlags <*> initDiagOpts - <*> (supportedLanguagesAndExtensions . platformArchOS . targetPlatform) <*> safeImportsOn <*> gopt Opt_Haddock <*> gopt Opt_KeepRawTokenStream <*> const True -- use LINE/COLUMN to update the internal location +supportedLanguagePragmas :: DynFlags -> [String] +supportedLanguagePragmas = supportedLanguagesAndExtensions . platformArchOS . targetPlatform ===================================== compiler/GHC/Driver/Pipeline/Execute.hs ===================================== @@ -657,7 +657,7 @@ getFileArgs :: HscEnv -> FilePath -> IO ((DynFlags, Messages PsMessage, Messages getFileArgs hsc_env input_fn = do let dflags0 = hsc_dflags hsc_env parser_opts = initParserOpts dflags0 - (warns0, src_opts) <- getOptionsFromFile parser_opts input_fn + (warns0, src_opts) <- getOptionsFromFile parser_opts (supportedLanguagePragmas dflags0) input_fn (dflags1, unhandled_flags, warns) <- parseDynamicFilePragma dflags0 src_opts checkProcessArgsResult unhandled_flags ===================================== compiler/GHC/Driver/Session.hs ===================================== @@ -3167,7 +3167,7 @@ setMainIs arg = parse parse_main_f arg -- dummy parser state. p_state str = initParserState - (mkParserOpts mempty emptyDiagOpts [] False False False True) + (mkParserOpts mempty emptyDiagOpts False False False True) (stringToStringBuffer str) (mkRealSrcLoc (mkFastString []) 1 1) ===================================== compiler/GHC/Parser/HaddockLex.x ===================================== @@ -175,7 +175,6 @@ validateIdentWith identParser mloc str0 = pflags = mkParserOpts (EnumSet.fromList [LangExt.MagicHash]) dopts - [] False False False False dopts = emptyDiagOpts buffer = stringBufferFromByteString str0 ===================================== compiler/GHC/Parser/Header.hs ===================================== @@ -168,14 +168,15 @@ mkPrelImports this_mod loc implicit_prelude import_decls -- -- Throws a 'SourceError' if flag parsing fails (including unsupported flags.) getOptionsFromFile :: ParserOpts + -> [String] -- ^ Supported LANGUAGE pragmas -> FilePath -- ^ Input file -> IO (Messages PsMessage, [Located String]) -- ^ Parsed options, if any. -getOptionsFromFile opts filename +getOptionsFromFile opts supported filename = Exception.bracket (openBinaryFile filename ReadMode) (hClose) (\handle -> do - (warns, opts) <- fmap (getOptions' opts) + (warns, opts) <- fmap (getOptions' opts supported) (lazyGetToks opts' filename handle) seqList opts $ seqList (bagToList $ getMessages warns) @@ -249,20 +250,22 @@ getToks popts filename buf = lexAll pstate -- -- Throws a 'SourceError' if flag parsing fails (including unsupported flags.) getOptions :: ParserOpts + -> [String] -- ^ Supported LANGUAGE pragmas -> StringBuffer -- ^ Input Buffer -> FilePath -- ^ Source filename. Used for location info. -> (Messages PsMessage,[Located String]) -- ^ warnings and parsed options. -getOptions opts buf filename - = getOptions' opts (getToks opts filename buf) +getOptions opts supported buf filename + = getOptions' opts supported (getToks opts filename buf) -- The token parser is written manually because Happy can't -- return a partial result when it encounters a lexer error. -- We want to extract options before the buffer is passed through -- CPP, so we can't use the same trick as 'getImports'. getOptions' :: ParserOpts + -> [String] -> [Located Token] -- Input buffer -> (Messages PsMessage,[Located String]) -- Options. -getOptions' opts toks +getOptions' opts supported toks = parseToks toks where parseToks (open:close:xs) @@ -296,7 +299,7 @@ getOptions' opts toks parseToks xs = (unionManyMessages $ mapMaybe mkMessage xs ,[]) parseLanguage ((L loc (ITconid fs)):rest) - = fmap (checkExtension opts (L loc fs) :) $ + = fmap (checkExtension supported (L loc fs) :) $ case rest of (L _loc ITcomma):more -> parseLanguage more (L _loc ITclose_prag):more -> parseToks more @@ -446,13 +449,13 @@ checkProcessArgsResult flags ----------------------------------------------------------------------------- -checkExtension :: ParserOpts -> Located FastString -> Located String -checkExtension opts (L l ext) +checkExtension :: [String] -> Located FastString -> Located String +checkExtension supported (L l ext) -- Checks if a given extension is valid, and if so returns -- its corresponding flag. Otherwise it throws an exception. - = if ext' `elem` (pSupportedExts opts) + = if ext' `elem` supported then L l ("-X"++ext') - else unsupportedExtnError opts l ext' + else unsupportedExtnError supported l ext' where ext' = unpackFS ext @@ -460,9 +463,9 @@ languagePragParseError :: SrcSpan -> a languagePragParseError loc = throwErr loc $ PsErrParseLanguagePragma -unsupportedExtnError :: ParserOpts -> SrcSpan -> String -> a -unsupportedExtnError opts loc unsup = - throwErr loc $ PsErrUnsupportedExt unsup (pSupportedExts opts) +unsupportedExtnError :: [String] -> SrcSpan -> String -> a +unsupportedExtnError supported loc unsup = + throwErr loc $ PsErrUnsupportedExt unsup supported optionsParseError :: String -> SrcSpan -> a -- #15053 optionsParseError str loc = ===================================== compiler/GHC/Parser/Lexer.x ===================================== @@ -2419,8 +2419,6 @@ data ParserOpts = ParserOpts { pExtsBitmap :: !ExtsBitmap -- ^ bitmap of permitted extensions , pDiagOpts :: !DiagOpts -- ^ Options to construct diagnostic messages. - , pSupportedExts :: [String] - -- ^ supported extensions (only used for suggestions in error messages) } pWarningFlags :: ParserOpts -> EnumSet WarningFlag @@ -2890,7 +2888,6 @@ data ExtBits mkParserOpts :: EnumSet LangExt.Extension -- ^ permitted language extensions enabled -> DiagOpts -- ^ diagnostic options - -> [String] -- ^ Supported Languages and Extensions -> Bool -- ^ are safe imports on? -> Bool -- ^ keeping Haddock comment tokens -> Bool -- ^ keep regular comment tokens @@ -2902,12 +2899,11 @@ mkParserOpts -> ParserOpts -- ^ Given exactly the information needed, set up the 'ParserOpts' -mkParserOpts extensionFlags diag_opts supported +mkParserOpts extensionFlags diag_opts safeImports isHaddock rawTokStream usePosPrags = ParserOpts { pDiagOpts = diag_opts , pExtsBitmap = safeHaskellBit .|. langExtBits .|. optBits - , pSupportedExts = supported } where safeHaskellBit = SafeHaskellBit `setBitIf` safeImports ===================================== ghc/GHCi/UI.hs ===================================== @@ -55,7 +55,7 @@ import GHC.Driver.Ppr hiding (printForUser) import GHC.Utils.Error hiding (traceCmd) import GHC.Driver.Monad ( modifySession ) import GHC.Driver.Make ( newIfaceCache, ModIfaceCache(..) ) -import GHC.Driver.Config.Parser (initParserOpts) +import GHC.Driver.Config.Parser import GHC.Driver.Config.Diagnostic import qualified GHC import GHC ( LoadHowMuch(..), Target(..), TargetId(..), @@ -1253,7 +1253,8 @@ enqueueCommands cmds = do -- The return value True indicates success, as in `runOneCommand`. runStmt :: GhciMonad m => String -> SingleStep -> m (Maybe GHC.ExecResult) runStmt input step = do - pflags <- initParserOpts <$> GHC.getInteractiveDynFlags + dflags <- GHC.getInteractiveDynFlags + let pflags = initParserOpts dflags -- In GHCi, we disable `-fdefer-type-errors`, as well as `-fdefer-type-holes` -- and `-fdefer-out-of-scope-variables` for **naked expressions**. The -- declarations and statements are not affected. @@ -1262,8 +1263,8 @@ runStmt input step = do let source = progname st let line = line_number st - -- Add any LANGUAGE/OPTIONS_GHC pragmas we find find. - set_pragmas pflags + -- Add any LANGUAGE/OPTIONS_GHC pragmas we find. + set_pragmas pflags (supportedLanguagePragmas dflags) if | GHC.isStmt pflags input -> do hsc_env <- GHC.getSession @@ -1298,9 +1299,9 @@ runStmt input step = do run_imports imports = mapM_ (addImportToContext . unLoc) imports - set_pragmas pflags = + set_pragmas pflags supported = let stringbuf = stringToStringBuffer input - (_msgs, loc_opts) = Header.getOptions pflags stringbuf "" + (_msgs, loc_opts) = Header.getOptions pflags supported stringbuf "" opts = unLoc <$> loc_opts in setOptions opts ===================================== testsuite/tests/ghc-api/T10942.hs ===================================== @@ -21,4 +21,4 @@ main = do parser_opts = initParserOpts dflags' setSessionDynFlags dflags' stringBuffer <- liftIO $ hGetStringBuffer filename - liftIO $ print (map unLoc (snd $ getOptions parser_opts stringBuffer filename)) + liftIO $ print (map unLoc (snd $ getOptions parser_opts (supportedLanguagePragmas dflags) stringBuffer filename)) ===================================== utils/check-exact/Parsers.hs ===================================== @@ -348,7 +348,7 @@ initDynFlags file = do -- Based on GHC backpack driver doBackPack dflags0 <- GHC.getSessionDynFlags let parser_opts0 = GHC.initParserOpts dflags0 - (_, src_opts) <- GHC.liftIO $ GHC.getOptionsFromFile parser_opts0 file + (_, src_opts) <- GHC.liftIO $ GHC.getOptionsFromFile parser_opts0 (GHC.supportedLanguagePragmas dflags0) file (dflags1, _, _) <- GHC.parseDynamicFilePragma dflags0 src_opts -- Turn this on last to avoid T10942 let dflags2 = dflags1 `GHC.gopt_set` GHC.Opt_KeepRawTokenStream @@ -376,7 +376,7 @@ initDynFlagsPure fp s = do -- no reason to use it. dflags0 <- GHC.getSessionDynFlags let parser_opts0 = GHC.initParserOpts dflags0 - let (_, pragmaInfo) = GHC.getOptions parser_opts0 (GHC.stringToStringBuffer $ s) fp + let (_, pragmaInfo) = GHC.getOptions parser_opts0 (GHC.supportedLanguagePragmas dflags0) (GHC.stringToStringBuffer $ s) fp (dflags1, _, _) <- GHC.parseDynamicFilePragma dflags0 pragmaInfo -- Turn this on last to avoid T10942 let dflags2 = dflags1 `GHC.gopt_set` GHC.Opt_KeepRawTokenStream ===================================== utils/haddock/haddock-api/src/Haddock.hs ===================================== @@ -82,7 +82,7 @@ import Haddock.Version import Haddock.InterfaceFile import Haddock.Options import Haddock.Utils -import Haddock.GhcUtils (modifySessionDynFlags, setOutputDir, getSupportedLanguagesAndExtensions) +import Haddock.GhcUtils (modifySessionDynFlags, setOutputDir) import Haddock.Compat (getProcessID) -------------------------------------------------------------------------------- @@ -228,7 +228,6 @@ haddockWithGhc ghc args = handleTopExceptions $ do , piPackageVersion = fromMaybe (makeVersion []) (optPackageVersion flags) } - languagesAndExtensions = getSupportedLanguagesAndExtensions ifaces -- Dump an "interface file" (.haddock file), if requested. forM_ (optDumpInterfaceFile flags) $ \path -> liftIO $ do @@ -239,7 +238,7 @@ haddockWithGhc ghc args = handleTopExceptions $ do } -- Render the interfaces. - liftIO $ renderStep dflags languagesAndExtensions parserOpts logger unit_state flags sinceQual qual packages ifaces + liftIO $ renderStep dflags parserOpts logger unit_state flags sinceQual qual packages ifaces -- If we were not given any input files, error if documentation was -- requested @@ -252,7 +251,7 @@ haddockWithGhc ghc args = handleTopExceptions $ do packages <- liftIO $ readInterfaceFiles name_cache (readIfaceArgs flags) noChecks -- Render even though there are no input files (usually contents/index). - liftIO $ renderStep dflags [] parserOpts logger unit_state flags sinceQual qual packages [] + liftIO $ renderStep dflags parserOpts logger unit_state flags sinceQual qual packages [] -- | Run the GHC action using a temporary output directory withTempOutputDir :: Ghc a -> Ghc a @@ -306,8 +305,6 @@ readPackagesAndProcessModules flags files = do renderStep :: DynFlags - -> [String] - -- ^ Supported languages and extensions based on architecture and OS -> ParserOpts -> Logger -> UnitState @@ -317,7 +314,7 @@ renderStep -> [(DocPaths, Visibility, FilePath, InterfaceFile)] -> [Interface] -> IO () -renderStep dflags languagesAndExtensions parserOpts logger unit_state flags sinceQual nameQual pkgs interfaces = do +renderStep dflags parserOpts logger unit_state flags sinceQual nameQual pkgs interfaces = do updateHTMLXRefs (map (\(docPath, _ifaceFilePath, _showModules, ifaceFile) -> ( case baseUrl flags of Nothing -> docPathsHtml docPath @@ -333,7 +330,7 @@ renderStep dflags languagesAndExtensions parserOpts logger unit_state flags sinc (DocPaths {docPathsSources=Just path}, _, _, ifile) <- pkgs iface <- ifInstalledIfaces ifile return (instMod iface, path) - render dflags languagesAndExtensions parserOpts logger unit_state flags sinceQual nameQual interfaces installedIfaces extSrcMap + render dflags parserOpts logger unit_state flags sinceQual nameQual interfaces installedIfaces extSrcMap where -- get package name from unit-id packageName :: Unit -> String @@ -345,8 +342,6 @@ renderStep dflags languagesAndExtensions parserOpts logger unit_state flags sinc -- | Render the interfaces with whatever backend is specified in the flags. render :: DynFlags - -> [String] - -- ^ Supported languages and extensions based on architecture and OS -> ParserOpts -> Logger -> UnitState @@ -357,7 +352,7 @@ render -> [(FilePath, PackageInterfaces)] -> Map Module FilePath -> IO () -render dflags languagesAndExtensions parserOpts logger unit_state flags sinceQual qual ifaces packages extSrcMap = do +render dflags parserOpts logger unit_state flags sinceQual qual ifaces packages extSrcMap = do let packageInfo = PackageInfo { piPackageName = fromMaybe (PackageName mempty) $ optPackageName flags @@ -560,7 +555,7 @@ render dflags languagesAndExtensions parserOpts logger unit_state flags sinceQua when (Flag_HyperlinkedSource `elem` flags && not (null ifaces)) $ do withTiming logger "ppHyperlinkedSource" (const ()) $ do _ <- {-# SCC ppHyperlinkedSource #-} - ppHyperlinkedSource (verbosity flags) (isJust (optOneShot flags)) languagesAndExtensions odir libDir opt_source_css pretty srcMap ifaces + ppHyperlinkedSource (verbosity flags) (isJust (optOneShot flags)) odir libDir opt_source_css pretty srcMap ifaces return () ===================================== utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker.hs ===================================== @@ -42,8 +42,6 @@ ppHyperlinkedSource :: Verbosity -> Bool -- ^ In one-shot mode - -> [String] - -- ^ Supported languages and extensions based on architecture and OS -> FilePath -- ^ Output directory -> FilePath @@ -57,14 +55,14 @@ ppHyperlinkedSource -> [Interface] -- ^ Interfaces for which we create source -> IO () -ppHyperlinkedSource verbosity isOneShot languagesAndExtensions outdir libdir mstyle pretty srcs' ifaces = do +ppHyperlinkedSource verbosity isOneShot outdir libdir mstyle pretty srcs' ifaces = do createDirectoryIfMissing True srcdir unless isOneShot $ do let cssFile = fromMaybe (defaultCssFile libdir) mstyle copyFile cssFile $ srcdir srcCssFile copyFile (libdir "html" highlightScript) $ srcdir highlightScript - mapM_ (ppHyperlinkedModuleSource verbosity languagesAndExtensions srcdir pretty srcs) ifaces + mapM_ (ppHyperlinkedModuleSource verbosity srcdir pretty srcs) ifaces where srcdir = outdir hypSrcDir srcs = (srcs', M.mapKeys moduleName srcs') @@ -72,14 +70,12 @@ ppHyperlinkedSource verbosity isOneShot languagesAndExtensions outdir libdir ms -- | Generate hyperlinked source for particular interface. ppHyperlinkedModuleSource :: Verbosity - -> [String] - -- ^ Supported languages and extensions based on architecture and OS -> FilePath -> Bool -> SrcMaps -> Interface -> IO () -ppHyperlinkedModuleSource verbosity languagesAndExtensions srcdir pretty srcs iface = do +ppHyperlinkedModuleSource verbosity srcdir pretty srcs iface = do -- Parse the GHC-produced HIE file nc <- freshNameCache HieFile @@ -128,7 +124,6 @@ ppHyperlinkedModuleSource verbosity languagesAndExtensions srcdir pretty srcs if Lexer.mkParserOpts (dflags.extensionFlags) (initDiagOpts dflags) - languagesAndExtensions (safeImportsOn dflags) False -- lex Haddocks as comment tokens True -- produce comment tokens ===================================== utils/haddock/haddock-api/src/Haddock/GhcUtils.hs ===================================== @@ -47,7 +47,6 @@ import GHC.Data.StringBuffer (StringBuffer) import qualified GHC.Data.StringBuffer as S import GHC.Driver.Session import GHC.HsToCore.Docs hiding (sigNameNoLoc) -import GHC.Platform (Platform (..)) import GHC.Types.Name import GHC.Types.SrcLoc (advanceSrcLoc) import GHC.Types.Var @@ -65,7 +64,7 @@ import GHC.Utils.Outputable (Outputable, SDocContext, ppr) import qualified GHC.Utils.Outputable as Outputable import GHC.Utils.Panic (panic) -import Haddock.Types (DocName, DocNameI, Interface (..), XRecCond) +import Haddock.Types (DocName, DocNameI, XRecCond) moduleString :: Module -> String moduleString = moduleNameString . moduleName @@ -618,14 +617,6 @@ setOutputDir dir dynFlags = , dumpDir = Just dir } -getSupportedLanguagesAndExtensions - :: [Interface] - -> [String] -getSupportedLanguagesAndExtensions [] = [] -getSupportedLanguagesAndExtensions (iface : _) = do - let dflags = ifaceDynFlags iface - in supportedLanguagesAndExtensions dflags.targetPlatform.platformArchOS - ------------------------------------------------------------------------------- -- * 'StringBuffer' and 'ByteString' View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/caaf53881d5cc82ebff617f39ad5363429d2eccf -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/caaf53881d5cc82ebff617f39ad5363429d2eccf You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:04:38 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 14:04:38 -0500 Subject: [Git][ghc/ghc][master] 2 commits: Add test for #25515 Message-ID: <6744ca46c070a_bd6941587f2c9100@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Add test for #25515 - - - - - 9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - 3 changed files: - compiler/GHC/Tc/Gen/Expr.hs - + testsuite/tests/linear/should_compile/T25515.hs - testsuite/tests/linear/should_compile/all.T Changes: ===================================== compiler/GHC/Tc/Gen/Expr.hs ===================================== @@ -575,12 +575,7 @@ tcExpr expr@(RecordCon { rcon_con = L loc con_name ; checkTc (conLikeHasBuilder con_like) $ nonBidirectionalErr (conLikeName con_like) - ; rbinds' <- tcRecordBinds con_like (map scaledThing arg_tys) rbinds - -- It is currently not possible for a record to have - -- multiplicities. When they do, `tcRecordBinds` will take - -- scaled types instead. Meanwhile, it's safe to take - -- `scaledThing` above, as we know all the multiplicities are - -- Many. + ; rbinds' <- tcRecordBinds con_like arg_tys rbinds ; let rcon_tc = mkHsWrap con_wrap con_expr expr' = RecordCon { rcon_ext = rcon_tc @@ -1632,7 +1627,7 @@ This extends OK when the field types are universally quantified. tcRecordBinds :: ConLike - -> [TcType] -- Expected type for each field + -> [Scaled TcType] -- Expected type for each field -> HsRecordBinds GhcRn -> TcM (HsRecordBinds GhcTc) @@ -1661,18 +1656,18 @@ fieldCtxt :: FieldLabelString -> SDoc fieldCtxt field_name = text "In the" <+> quotes (ppr field_name) <+> text "field of a record" -tcRecordField :: ConLike -> Assoc Name Type +tcRecordField :: ConLike -> Assoc Name (Scaled Type) -> LFieldOcc GhcRn -> LHsExpr GhcRn -> TcM (Maybe (LFieldOcc GhcTc, LHsExpr GhcTc)) tcRecordField con_like flds_w_tys (L loc (FieldOcc rdr (L l sel_name))) rhs - | Just field_ty <- assocMaybe flds_w_tys sel_name + | Just (Scaled field_mult field_ty) <- assocMaybe flds_w_tys sel_name = addErrCtxt (fieldCtxt field_lbl) $ - do { rhs' <- tcCheckPolyExprNC rhs field_ty + do { rhs' <- tcScalingUsage field_mult $ tcCheckPolyExprNC rhs field_ty ; hasFixedRuntimeRep_syntactic (FRRRecordCon rdr (unLoc rhs')) field_ty ; let field_id = mkUserLocal (nameOccName sel_name) (nameUnique sel_name) - ManyTy field_ty (locA loc) + field_mult field_ty (locA loc) -- Yuk: the field_id has the *unique* of the selector Id -- (so we can find it easily) -- but is a LocalId with the appropriate type of the RHS ===================================== testsuite/tests/linear/should_compile/T25515.hs ===================================== @@ -0,0 +1,8 @@ +{-# LANGUAGE LinearTypes #-} + +module T25515 where + +data C = MkC { unc :: Int } + +f :: Int %1 -> C +f x = MkC { unc = x } ===================================== testsuite/tests/linear/should_compile/all.T ===================================== @@ -47,3 +47,4 @@ test('LinearLet', normal, compile, ['']) test('LinearLetPoly', normal, compile, ['']) test('LinearListComprehension', normal, compile, ['-dlinear-core-lint']) test('OmitFieldPat', normal, compile, ['-dcore-lint']) +test('T25515', normal, compile, ['-dcore-lint']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/caaf53881d5cc82ebff617f39ad5363429d2eccf...9279619f09a9449a35ac467c1c2ff7380fca9d06 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/caaf53881d5cc82ebff617f39ad5363429d2eccf...9279619f09a9449a35ac467c1c2ff7380fca9d06 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:16:41 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 25 Nov 2024 14:16:41 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25521 Message-ID: <6744cd1941b4a_bd69417ffdcc10301c@gitlab.mail> Ben Gamari pushed new branch wip/T25521 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25521 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:20:27 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 25 Nov 2024 14:20:27 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] compiler: Fix bootstrapping with 9.8.3 Message-ID: <6744cdfb92b1b_bd69419669b81061cc@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: a3d29cb1 by Ben Gamari at 2024-11-25T14:19:14-05:00 compiler: Fix bootstrapping with 9.8.3 Bump the CPP in genSym to ensure that we don't look for `ghc_unique_counter64` in any compilers earlier than 9.8.4. - - - - - 1 changed file: - compiler/cbits/genSym.c Changes: ===================================== compiler/cbits/genSym.c ===================================== @@ -9,7 +9,7 @@ // // The CPP is thus about the RTS version GHC is linked against, and not the // version of the GHC being built. -#if !MIN_VERSION_GLASGOW_HASKELL(9,7,0,0) +#if !MIN_VERSION_GLASGOW_HASKELL(9,8,4,0) HsWord64 ghc_unique_counter64 = 0; #endif #if !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a3d29cb113f315d2c32e88f86a69316e6877489a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a3d29cb113f315d2c32e88f86a69316e6877489a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:20:44 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Mon, 25 Nov 2024 14:20:44 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] compiler: Fix bootstrapping with 9.8.3 Message-ID: <6744ce0c4a62d_bd6941868f2010631b@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 7a274a7f by Ben Gamari at 2024-11-25T14:20:29-05:00 compiler: Fix bootstrapping with 9.8.3 Bump the CPP in genSym to ensure that we don't look for `ghc_unique_counter64` in any compilers earlier than 9.8.4. Inconsistency noticed in #25519. - - - - - 1 changed file: - compiler/cbits/genSym.c Changes: ===================================== compiler/cbits/genSym.c ===================================== @@ -9,7 +9,7 @@ // // The CPP is thus about the RTS version GHC is linked against, and not the // version of the GHC being built. -#if !MIN_VERSION_GLASGOW_HASKELL(9,7,0,0) +#if !MIN_VERSION_GLASGOW_HASKELL(9,8,4,0) HsWord64 ghc_unique_counter64 = 0; #endif #if !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7a274a7f71c30b556b20152bdd2996aa106ac9a5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7a274a7f71c30b556b20152bdd2996aa106ac9a5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 19:34:47 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Mon, 25 Nov 2024 14:34:47 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: driver: Always link against "base" package when one shot linking Message-ID: <6744d1579131_269f4527e534670d@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00 Refactoring: Remove `pSupportedExts` from `ParserOpts` This is never used for lexing / parsing. It is only used by `GHC.Parser.Header.getOptions`. - - - - - 41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Add test for #25515 - - - - - 9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - 3e618b9e by Andreas Klebinger at 2024-11-25T14:34:38-05:00 Clarify INLINE unfolding optimization docs. Fixes #24660 - - - - - b5bd6dd6 by Cheng Shao at 2024-11-25T14:34:39-05:00 rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin to align it with aarch64-darwin. This allows us to get rid of the horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing linker warnings and testsuite failures on macOS 15. Fixes #25504. - - - - - 30 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/hello.hs - .gitlab/jobs.yaml - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Config/Parser.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Parser/HaddockLex.x - compiler/GHC/Parser/Header.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/exts/pragmas.rst - docs/users_guide/packages.rst - ghc/GHCi/UI.hs - hadrian/bindist/Makefile - hadrian/bindist/config.mk.in - hadrian/src/Rules/Generate.hs - rts/rts.cabal - rts/sm/Compact.c - rts/sm/Evac.c - testsuite/tests/driver/Makefile - + testsuite/tests/driver/T25382.hs - testsuite/tests/driver/all.T - testsuite/tests/ghc-api/T10942.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/127aa5b39ca6c858a26942bbd75321da04651e95...b5bd6dd6c4b02507de6a71cbd153855b714b5525 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/127aa5b39ca6c858a26942bbd75321da04651e95...b5bd6dd6c4b02507de6a71cbd153855b714b5525 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Mon Nov 25 23:45:53 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Mon, 25 Nov 2024 18:45:53 -0500 Subject: [Git][ghc/ghc][wip/T24359] Fix build Message-ID: <67450c316f2b2_27fcc916268c85875@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: b785e255 by Simon Peyton Jones at 2024-11-25T23:45:20+00:00 Fix build - - - - - 2 changed files: - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/HsToCore/Binds.hs Changes: ===================================== compiler/GHC/Core/SimpleOpt.hs ===================================== @@ -147,14 +147,13 @@ simpleOptExpr opts expr -- three passes instead of two (occ-anal, and go) simpleOptExprNoOccAnal :: HasDebugCallStack => SimpleOpts -> CoreExpr -> CoreExpr --- Same as simpleOptExpr but without occurrence analysis +-- A variant of simpleOptExpr but without occurrence analysis -- Result: we don't inline evidence bindings, which is useful for the specialiser simpleOptExprNoOccAnal opts expr - = simpl_opt_expr init_env expr + = simple_opt_expr init_env expr where init_env = (emptyEnv opts) { soe_subst = init_subst } init_subst = mkEmptySubst (mkInScopeSet (exprFreeVars expr)) - -- It's potentially important to make a proper in-scope set simpleOptExprWith :: HasDebugCallStack => SimpleOpts -> Subst -> InExpr -> OutExpr -- See Note [The simple optimiser] ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -42,7 +42,7 @@ import GHC.HsToCore.Pmc ( addTyCs, pmcGRHSs ) import GHC.Hs -- lots of things import GHC.Core -- lots of things -import GHC.Core.SimpleOpt ( simpleOptExpr ) +import GHC.Core.SimpleOpt import GHC.Core.Opt.OccurAnal ( occurAnalyseExpr ) import GHC.Core.InstEnv ( CanonicalEvidence(..) ) import GHC.Core.Make @@ -917,7 +917,7 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id -- to this specialisation, not global rule_bndrs = scopedSort (exprsSomeFreeVarsList quantify_me lhs_args) - quantify_me v = isTyVar v || v `elemVarSet` id_bndrs + quantify_me v = isTyVar v || v `elemVarSet` lhs_id_bndrs -- Quantify over all tyvars; but only over Ids bound explicitly -- this is a terrible hack. What about local SPECIALISE pragmas -- that mention some in-scope TyVar? @@ -942,15 +942,15 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id rule_bndrs poly_id lhs_args spec_bndrs mk_spec_body inl } } } -prepareSpecLHS :: [EvVar] -> CoreExpr -> Maybe ([CoreBind], Id, [CoreExpr]) +prepareSpecLHS :: [EvVar] -> CoreExpr -> Maybe (VarSet, [CoreBind], Id, [CoreExpr]) prepareSpecLHS evs the_call = go (mkVarSet evs) [] the_call where - go :: IdSet + go :: VarSet -> [CoreBind] -- Reversed list of constant evidence bindings -> CoreExpr -> Maybe (IdSet, [CoreBind], Id, [CoreExpr]) - go qevs acc (Cast e co) + go qevs acc (Cast e _) = go qevs acc e go qevs acc (Let bind e) | not (all isDictId bndrs) -- A normal 'let' is too complicated View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b785e255a2c7994ba6f7baa25815024967e89912 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b785e255a2c7994ba6f7baa25815024967e89912 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 00:03:08 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Mon, 25 Nov 2024 19:03:08 -0500 Subject: [Git][ghc/ghc][wip/T24359] Tidy up a bit Message-ID: <6745103cc5a0_27fcc92aec0c86748@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 0335a934 by Simon Peyton Jones at 2024-11-26T00:02:37+00:00 Tidy up a bit - - - - - 4 changed files: - compiler/GHC/Hs/Binds.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Zonk/Type.hs Changes: ===================================== compiler/GHC/Hs/Binds.hs ===================================== @@ -840,22 +840,12 @@ data TcSpecPrag -- ^ The Id to be specialised, a wrapper that specialises the -- polymorphic function, and inlining spec for the specialised function - | SpecPragE { spe_poly_id :: Id -- THe Id being specialised - , spe_tv_bndrs :: [TyVar] - , spe_id_bndrs :: [Id] - - , spe_lhs_ev_bndrs :: [EvVar] - , spe_lhs_binds :: TcEvBinds - , spe_lhs_call :: LHsExpr GhcTc -- The LHS of the RULE: a call of f - -- spe_lhs_binds closes spe_call using variables in - -- spe_tv_bndrs, spe_id_bndrs, spe_lhs_ev_bndrs - - , spe_rhs_ev_bndrs :: [EvVar] - , spe_rhs_binds :: TcEvBinds - -- spe_rhs_binds closes spe_call using variables in - -- spe_tv_bndrs, spe_id_bndrs, spe_rhs_ev_bndrs - - , spe_inl :: InlinePragma } + | SpecPragE { spe_poly_id :: Id -- THe Id being specialised + , spe_tv_bndrs :: [TyVar] + , spe_id_bndrs :: [Id] + , spe_ev_bndrs :: [EvVar] + , spe_call :: LHsExpr GhcTc -- The LHS of the RULE: a call of f + , spe_inl :: InlinePragma } noSpecPrags :: TcSpecPrags noSpecPrags = SpecPrags [] @@ -1004,7 +994,7 @@ instance Outputable TcSpecPrag where ppr (SpecPrag var _ inl) = text (extractSpecPragName $ inl_src inl) <+> pprSpec var (text "") inl ppr (SpecPragE { spe_tv_bndrs = tv_bndrs, spe_id_bndrs = id_bndrs - , spe_lhs_call = spec_e, spe_inl = inl }) + , spe_call = spec_e, spe_inl = inl }) = text (extractSpecPragName $ inl_src inl) <+> hang (ppr (tv_bndrs ++ id_bndrs)) 2 (pprLExpr spec_e) ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -873,33 +873,28 @@ dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id drop_cast e = e -} -dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id - , spe_id_bndrs = id_bndrs - , spe_tv_bndrs = tv_bndrs - , spe_lhs_ev_bndrs = lhs_evs - , spe_lhs_binds = lhs_binds - , spe_lhs_call = the_call - , spe_inl = inl }) +dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id + , spe_tv_bndrs = tv_bndrs + , spe_id_bndrs = id_bndrs + , spe_ev_bndrs = lhs_evs + , spe_call = the_call + , spe_inl = inl }) -- SpecPragE case: See Note [Handling new-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig | isJust (isClassOpId_maybe poly_id) = failBecauseOfClassOp poly_id | otherwise - = dsTcEvBinds lhs_binds $ \ ds_lhs_binds -> - do { ds_call <- zapUnspecables $ + = do { ds_call <- zapUnspecables $ -- zapUnspecables: see Note [Desugaring RULE left hand sides] dsLExpr the_call ; tracePm "dsSpec1" (vcat [ ppr poly_id , text "tv_bndrs" <+> ppr tv_bndrs - , text "lhs_binds" <+> ppr lhs_binds - , text "ds_lhs_binds" <+> ppr ds_lhs_binds , text "ds_call" <+> ppr ds_call ]) ; dflags <- getDynFlags ; let simpl_opts = initSimpleOpts dflags - core_call = simpleOptExprNoOccAnal simpl_opts $ - mkLets ds_lhs_binds ds_call + core_call = simpleOptExprNoOccAnal simpl_opts ds_call ; case prepareSpecLHS lhs_evs core_call of { Nothing -> do { diagnosticDs (DsRuleLhsTooComplicated ds_call core_call) ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -50,7 +50,7 @@ import GHC.Tc.Utils.Instantiate( topInstantiate, tcInstTypeBndrs ) import GHC.Tc.Utils.Env import GHC.Tc.Types.Origin -import GHC.Tc.Types.Evidence( HsWrapper, (<.>), emptyTcEvBinds, TcEvBinds(..) ) +import GHC.Tc.Types.Evidence( HsWrapper(..), (<.>), TcEvBinds(..) ) import GHC.Tc.Types.Constraint import GHC.Tc.Zonk.TcType @@ -949,15 +949,13 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) , text "spec_e:" <+> ppr spec_e' , text "inl:" <+> ppr inl ] - ; return [SpecPragE { spe_poly_id = poly_id - , spe_tv_bndrs = tv_bndrs - , spe_id_bndrs = id_bndrs - , spe_lhs_ev_bndrs = qevs - , spe_lhs_binds = TcEvBinds ev_binds_var - , spe_lhs_call = spec_e' - , spe_rhs_ev_bndrs = [] - , spe_rhs_binds = emptyTcEvBinds - , spe_inl = inl }] } + ; let lhs_call = mkLHsWrap (WpLet (TcEvBinds ev_binds_var)) spec_e' + ; return [SpecPragE { spe_poly_id = poly_id + , spe_tv_bndrs = tv_bndrs + , spe_id_bndrs = id_bndrs + , spe_ev_bndrs = qevs + , spe_call = lhs_call + , spe_inl = inl }] } {- -- Solve unification constraints ===================================== compiler/GHC/Tc/Zonk/Type.hs ===================================== @@ -859,25 +859,21 @@ zonkLTcSpecPrags ps ; return (L loc (SpecPrag id' co_fn' inl)) } zonk_prag (L loc (SpecPragE { spe_poly_id = poly_id , spe_tv_bndrs = tv_bndrs, spe_id_bndrs = id_bndrs - , spe_lhs_ev_bndrs = lhs_evs, spe_rhs_ev_bndrs = rhs_evs - , spe_lhs_binds = lhs_binds, spe_rhs_binds = rhs_binds - , spe_lhs_call = spec_e + , spe_ev_bndrs = lhs_evs + , spe_call = spec_e , spe_inl = inl })) = setZonkType SkolemiseFlexi $ runZonkBndrT (zonkCoreBndrsX tv_bndrs) $ \tv_bndrs' -> runZonkBndrT (zonkCoreBndrsX id_bndrs) $ \id_bndrs' -> runZonkBndrT (zonkCoreBndrsX lhs_evs) $ \lhs_evs' -> - runZonkBndrT (zonkTcEvBinds lhs_binds) $ \lhs_binds' -> - runZonkBndrT (zonkCoreBndrsX rhs_evs) $ \rhs_evs' -> - runZonkBndrT (zonkTcEvBinds rhs_binds) $ \rhs_binds' -> do { poly_id' <- zonkIdOcc poly_id -- Does not need to be under all these binders, but no harm ; spec_e' <- zonkLExpr spec_e - ; return (L loc (SpecPragE { spe_poly_id = poly_id' - , spe_tv_bndrs = tv_bndrs', spe_id_bndrs = id_bndrs' - , spe_lhs_ev_bndrs = lhs_evs', spe_rhs_ev_bndrs = rhs_evs' - , spe_lhs_binds = lhs_binds', spe_rhs_binds = rhs_binds' - , spe_lhs_call = spec_e' - , spe_inl = inl })) } + ; return (L loc (SpecPragE { spe_poly_id = poly_id' + , spe_tv_bndrs = tv_bndrs' + , spe_id_bndrs = id_bndrs' + , spe_ev_bndrs = lhs_evs' + , spe_call = spec_e' + , spe_inl = inl })) } {- ************************************************************************ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0335a934a66e76d89012d042cb857d35e3c01990 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0335a934a66e76d89012d042cb857d35e3c01990 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 08:35:23 2024 From: gitlab at gitlab.haskell.org (Apoorv Ingle (@ani)) Date: Tue, 26 Nov 2024 03:35:23 -0500 Subject: [Git][ghc/ghc][wip/spj-apporv-Oct24] remove adhoc addthingCtxt and remove location from PopErrCtxt HsExprs Message-ID: <6745884b31742_1181d71c8144222f9@gitlab.mail> Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC Commits: 3f5c3ae5 by Apoorv Ingle at 2024-11-26T00:34:32-08:00 remove adhoc addthingCtxt and remove location from PopErrCtxt HsExprs - - - - - 6 changed files: - compiler/GHC/Hs/Expr.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Do.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Tc/Gen/Head.hs Changes: ===================================== compiler/GHC/Hs/Expr.hs ===================================== @@ -548,7 +548,7 @@ data XXExprGhcRn } | PopErrCtxt -- A hint for typechecker to pop - {-# UNPACK #-} !(LHsExpr GhcRn) -- the top of the error context stack + {-# UNPACK #-} !(HsExpr GhcRn) -- the top of the error context stack -- Does not presist post renaming phase -- See Part 3. of Note [Expanding HsDo with XXExprGhcRn] -- in `GHC.Tc.Gen.Do` @@ -945,7 +945,7 @@ ppr_infix_expr _ = Nothing ppr_infix_expr_rn :: XXExprGhcRn -> Maybe SDoc ppr_infix_expr_rn (ExpandedThingRn thing _) = ppr_infix_hs_expansion thing -ppr_infix_expr_rn (PopErrCtxt (L _ a)) = ppr_infix_expr a +ppr_infix_expr_rn (PopErrCtxt a) = ppr_infix_expr a ppr_infix_expr_rn (HsRecSelRn f) = Just (pprInfixOcc f) ppr_infix_expr_tc :: XXExprGhcTc -> Maybe SDoc @@ -1062,7 +1062,7 @@ hsExprNeedsParens prec = go go_x_rn :: XXExprGhcRn -> Bool go_x_rn (ExpandedThingRn thing _ ) = hsExpandedNeedsParens thing - go_x_rn (PopErrCtxt (L _ a)) = hsExprNeedsParens prec a + go_x_rn (PopErrCtxt a) = hsExprNeedsParens prec a go_x_rn (HsRecSelRn{}) = False hsExpandedNeedsParens :: HsThingRn -> Bool @@ -1114,9 +1114,9 @@ isAtomicHsExpr (XExpr x) go_x_tc (HsRecSelTc{}) = True go_x_rn :: XXExprGhcRn -> Bool - go_x_rn (ExpandedThingRn thing _) = isAtomicExpandedThingRn thing - go_x_rn (PopErrCtxt (L _ a)) = isAtomicHsExpr a - go_x_rn (HsRecSelRn{}) = True + go_x_rn (ExpandedThingRn thing _) = isAtomicExpandedThingRn thing + go_x_rn (PopErrCtxt a) = isAtomicHsExpr a + go_x_rn (HsRecSelRn{}) = True isAtomicExpandedThingRn :: HsThingRn -> Bool isAtomicExpandedThingRn (OrigExpr e) = isAtomicHsExpr e ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -1717,7 +1717,7 @@ repE e@(XExpr (ExpandedThingRn o x)) | otherwise = notHandled (ThExpressionForm e) -repE (XExpr (PopErrCtxt (L _ e))) = repE e +repE (XExpr (PopErrCtxt e)) = repE e repE (XExpr (HsRecSelRn (FieldOcc _ (L _ x)))) = repE (HsVar noExtField (noLocA x)) repE e@(HsPragE _ (HsPragSCC {}) _) = notHandled (ThCostCentres e) ===================================== compiler/GHC/Tc/Gen/App.hs ===================================== @@ -402,14 +402,14 @@ tcApp rn_expr exp_res_ty -- Step 2: Infer the type of `fun`, the head of the application ; (tc_fun, fun_sigma) <- tcInferAppHead fun ; let tc_head = (tc_fun, fun_ctxt) - ; traceTc "tcApp 1" (ppr rn_fun) + -- Step 3: Instantiate the function type (taking a quick look at args) ; do_ql <- wantQuickLook rn_fun ; (inst_args, app_res_rho) <- setQLInstLevel do_ql $ -- See (TCAPP1) and (TCAPP2) in -- Note [tcApp: typechecking applications] tcInstFun do_ql True tc_head fun_sigma rn_args - ; traceTc "tcApp 2" (ppr rn_fun) + ; case do_ql of NoQL -> do { traceTc "tcApp:NoQL" (ppr rn_fun $$ ppr app_res_rho) @@ -417,7 +417,7 @@ tcApp rn_expr exp_res_ty -- See Note [Unify with expected type before typechecking arguments] ; res_wrap <- checkResultTy rn_expr tc_head inst_args app_res_rho exp_res_ty - ; traceTc "tcApp valArgs" (ppr inst_args) + -- Step 4.2: typecheck the arguments ; tc_args <- tcValArgs NoQL inst_args -- Step 4.3: wrap up ===================================== compiler/GHC/Tc/Gen/Do.hs ===================================== @@ -95,7 +95,7 @@ expand_do_stmts doFlavour (stmt@(L _ (LetStmt _ bs)) : lstmts) = -- ------------------------------------------------ -- let x = e ; stmts ~~> let x = e in stmts'xo do expand_stmts <- expand_do_stmts doFlavour lstmts - let expansion = genHsLet bs (genPopErrCtxtExpr expand_stmts) + let expansion = genHsLet bs (genPopErrCtxtExpr . unLoc $ expand_stmts) return $ mkExpandedStmtAt (noAnnSrcSpan generatedSrcSpan) stmt doFlavour expansion expand_do_stmts doFlavour (stmt@(L _loc (BindStmt xbsrn pat e)): lstmts) @@ -108,7 +108,7 @@ expand_do_stmts doFlavour (stmt@(L _loc (BindStmt xbsrn pat e)): lstmts) -- ------------------------------------------------------- -- pat <- e ; stmts ~~> (>>=) e f = do expand_stmts <- expand_do_stmts doFlavour lstmts - failable_expr <- mk_failable_expr doFlavour pat (genPopErrCtxtExpr expand_stmts) fail_op + failable_expr <- mk_failable_expr doFlavour pat (genPopErrCtxtExpr . unLoc $ expand_stmts) fail_op let expansion = genHsExpApps bind_op -- (>>=) [ e , failable_expr ] @@ -126,7 +126,7 @@ expand_do_stmts doFlavour (stmt@(L _loc (BodyStmt _ e (SyntaxExprRn then_op) _)) do expand_stmts_expr <- expand_do_stmts doFlavour lstmts let expansion = genHsExpApps then_op -- (>>) [ e - , genPopErrCtxtExpr expand_stmts_expr ] + , genPopErrCtxtExpr . unLoc $ expand_stmts_expr ] return $ mkExpandedStmtAt (noAnnSrcSpan generatedSrcSpan) stmt doFlavour expansion expand_do_stmts doFlavour @@ -561,10 +561,10 @@ It stores the original statement (with location) and the expanded expression -- | Wrap a located expression with a `PopErrCtxt` -mkPopErrCtxtExpr :: LHsExpr GhcRn -> HsExpr GhcRn +mkPopErrCtxtExpr :: HsExpr GhcRn -> HsExpr GhcRn mkPopErrCtxtExpr a = XExpr (PopErrCtxt a) -genPopErrCtxtExpr :: LHsExpr GhcRn -> LHsExpr GhcRn +genPopErrCtxtExpr :: HsExpr GhcRn -> LHsExpr GhcRn genPopErrCtxtExpr a = wrapGenSpan $ mkPopErrCtxtExpr a -- | Build an expression using the extension constructor `XExpr`, ===================================== compiler/GHC/Tc/Gen/Expr.hs ===================================== @@ -709,35 +709,14 @@ tcExpr (SectionR {}) ty = pprPanic "tcExpr:SectionR" (ppr ty) tcXExpr :: XXExprGhcRn -> ExpRhoType -> TcM (HsExpr GhcTc) -tcXExpr (PopErrCtxt (L loc e)) res_ty +tcXExpr (PopErrCtxt e) res_ty = popErrCtxt $ -- See Part 3 of Note [Expanding HsDo with XXExprGhcRn] in `GHC.Tc.Gen.Do` - setSrcSpanA loc $ tcExpr e res_ty tcXExpr (ExpandedThingRn o@(OrigStmt stmt flav) e) res_ty = addThingCtxt o $ - mkExpandedStmtTc stmt flav <$> tcExpr e res_ty -{- -tcXExpr xe@(ExpandedThingRn o e') res_ty - | OrigStmt ls@(L loc s) flav <- o - , HsLet x binds e <- e' - = do { (binds', e') <- setSrcSpanA loc $ - addStmtCtxt s flav $ - tcLocalBinds binds $ - tcMonoExprNC e res_ty -- NB: Do not call tcMonoExpr here as it adds - -- a duplicate error context - ; return $ mkExpandedStmtTc ls flav (HsLet x binds' e') - } - - | OrigStmt s@(L loc LastStmt{}) flav <- o - = setSrcSpanA loc $ - addStmtCtxt (unLoc s) flav $ - mkExpandedStmtTc s flav <$> tcApp e' res_ty + mkExpandedStmtTc stmt flav <$> tcExpr e res_ty - | OrigStmt ls@(L loc _) flav <- o - = setSrcSpanA loc $ - mkExpandedStmtTc ls flav <$> tcApp (XExpr xe) res_ty --} -- For record selection tcXExpr xe res_ty = tcApp (XExpr xe) res_ty ===================================== compiler/GHC/Tc/Gen/Head.hs ===================================== @@ -555,10 +555,6 @@ tcInferAppHead_maybe fun _ -> return Nothing addHeadCtxt :: AppCtxt -> TcM a -> TcM a -addHeadCtxt (VAExpansion (OrigStmt (L loc stmt) flav) _ _) thing_inside = - do setSrcSpanA loc $ - addStmtCtxt stmt flav - thing_inside addHeadCtxt fun_ctxt thing_inside | not (isGoodSrcSpan fun_loc) -- noSrcSpan => no arguments = thing_inside -- => context is already set @@ -1255,15 +1251,12 @@ mis-match in the number of value arguments. ********************************************************************* -} addThingCtxt :: HsThingRn -> TcRn a -> TcRn a --- addThingCtxt (OrigExpr e) thing_inside = addExprCtxt e thing_inside + addThingCtxt (OrigStmt (L loc stmt) flav) thing_inside = do - gen <- inGeneratedCode - if gen - then setSrcSpanA loc $ addStmtCtxt stmt flav $ setInGeneratedCode $ thing_inside - -- If we are in generated code, we need to set the error context at the correct - -- location and then switch context back into generated code to do the thing_inside - -- See Note [Rebindable syntax and XXExprGhcRn] - else addStmtCtxt stmt flav $ thing_inside + setSrcSpanA loc $ + addStmtCtxt stmt flav $ + thing_inside +-- addThingCtxt (OrigExpr e) thing_inside = addExprCtxt e thing_inside addThingCtxt _ thing_inside = thing_inside addStmtCtxt :: ExprStmt GhcRn -> HsDoFlavour -> TcRn a -> TcRn a View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3f5c3ae5dba3f20abd7160a1986f478337caec42 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3f5c3ae5dba3f20abd7160a1986f478337caec42 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 09:41:29 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Tue, 26 Nov 2024 04:41:29 -0500 Subject: [Git][ghc/ghc][wip/T24744] 3 commits: Enable static args Message-ID: <674597c9edee2_1181d75bf52c291d3@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: b9f928f4 by Serge S. Gulin at 2024-11-26T12:40:57+03:00 Enable static args - - - - - be43cbca by Serge S. Gulin at 2024-11-26T12:41:07+03:00 Remove useless premature optimization - - - - - 8503e8b9 by Serge S. Gulin at 2024-11-26T12:41:07+03:00 Fix tests - - - - - 10 changed files: - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/StgToJS/Monad.hs - testsuite/tests/javascript/Makefile - testsuite/tests/javascript/T23479_1.hs → testsuite/tests/javascript/T23479.hs - testsuite/tests/javascript/T23479_1.stdout → testsuite/tests/javascript/T23479.stdout - testsuite/tests/javascript/T23479_2.hs → testsuite/tests/javascript/T24744.hs - testsuite/tests/javascript/T23479_2.stdout → testsuite/tests/javascript/T24744.stdout - testsuite/tests/javascript/all.T Changes: ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -100,26 +100,7 @@ genApp -> [StgArg] -> G (JStgStat, ExprResult) genApp ctx i args - -- Test case T23479_2 - -- See: https://github.com/ghcjs/ghcjs/blob/b7711fbca7c3f43a61f1dba526e6f2a2656ef44c/src/Gen2/Generator.hs#L876 - -- Comment by Luite Stegeman - -- Special cases for JSString literals. - -- We could handle unpackNBytes# here, but that's probably not common - -- enough to warrant a special case. - -- See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/#note_503978 - -- Comment by Jeffrey Young - -- We detect if the Id is unsafeUnpackJSStringUtf8## applied to a string literal, - -- if so then we convert the unsafeUnpack to a call to h$decode. - | [StgVarArg v] <- args - , idName i == unsafeUnpackJSStringUtf8ShShName - -- See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588 - -- Comment by Josh Meredith - -- `typex_expr` can throw an error for certain bindings so it's important - -- that this condition comes after matching on the function name - , [top] <- concatMap typex_expr (ctxTarget ctx) - = (,ExprInline) . (|=) top . app hdDecodeUtf8Z <$> varsForId v - - -- Test case T23479_1 + -- Test case T23479 | [StgLitArg (LitString bs)] <- args , Just d <- decodeModifiedUTF8 bs , idName i == unsafeUnpackJSStringUtf8ShShName ===================================== compiler/GHC/StgToJS/CodeGen.hs ===================================== @@ -327,10 +327,11 @@ genToplevelRhs i rhs = case rhs of eid <- identForEntryId i idt <- identFS <$> identForId i body <- genBody (initExprCtx i) R2 args body typ - global_occs <- globalOccs body + lids <- globalOccs body + -- Regenerate idents from lids to restore right order of representatives. + -- Representatives have occurrence order which can be mixed. + lidents <- concat <$> traverse identsForId lids let eidt = identFS eid - let lidents = map global_ident global_occs - let lids = map global_id global_occs let lidents' = map identFS lidents CIStaticRefs sr0 <- genStaticRefsRhs rhs let sri = filter (`notElem` lidents') sr0 ===================================== compiler/GHC/StgToJS/Ids.hs ===================================== @@ -155,7 +155,7 @@ cachedIdentForId i mi id_type = do -- Now update the GlobalId cache, if required - let update_global_cache = isGlobalId i && isNothing mi && id_type == IdPlain + let update_global_cache = isGlobalId i && id_type == IdPlain -- fixme also allow caching entries for lifting? when (update_global_cache) $ do ===================================== compiler/GHC/StgToJS/Monad.hs ===================================== @@ -153,29 +153,28 @@ getGlobalIdCache = State.gets (ggsGlobalIdCache . gsGroup) setGlobalIdCache :: GlobalIdCache -> G () setGlobalIdCache v = State.modify (\s -> s { gsGroup = (gsGroup s) { ggsGlobalIdCache = v}}) - data GlobalOcc = GlobalOcc - { global_ident :: !Ident - , global_id :: !Id + { global_id :: !Id , global_count :: !Word } instance Outputable GlobalOcc where ppr g = hang (text "GlobalOcc") 2 $ vcat - [ hcat [text "Ident: ", ppr (global_ident g)] - , hcat [text "Id:", ppr (global_id g)] + [ hcat [text "Id:", ppr (global_id g)] , hcat [text "Count:", ppr (global_count g)] ] --- | Return number of occurrences of every global id used in the given JStgStat. +-- | Return occurrences of every global id used in the given JStgStat. -- Sort by increasing occurrence count. -globalOccs :: JStgStat -> G [GlobalOcc] +globalOccs :: JStgStat -> G [Id] globalOccs jst = do GlobalIdCache gidc <- getGlobalIdCache - -- build a map form Ident Unique to (Ident, Id, Count) + -- build a map form Ident Unique to (Id, Count) let cmp_cnt g1 g2 = compare (global_count g1) (global_count g2) inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 } + + go :: UniqFM Id GlobalOcc -> [Ident] -> [GlobalOcc] go gids = \case [] -> -- return global Ids used locally sorted by increased use L.sortBy cmp_cnt $ nonDetEltsUFM gids @@ -186,7 +185,7 @@ globalOccs jst = do Just (_k,gid) -> -- add it to the list of already found global ids. Increasing -- count by 1 - let g = GlobalOcc i gid 1 - in go (addToUFM_C inc gids i g) is + let g = GlobalOcc gid 1 + in go (addToUFM_C inc gids gid g) is - pure $ go emptyUFM (identsS jst) + pure $ map global_id $ go emptyUFM $ identsS jst ===================================== testsuite/tests/javascript/Makefile ===================================== @@ -13,20 +13,20 @@ T24495: # check that the optimization occurred for -02 1 time (1 for unfloated lits) grep -c appendToHsStringA T24495.dump-js -T23479_1: - '$(TEST_HC)' $(TEST_HC_OPTS) T23479_1.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file - ./T23479_1 +T23479: + '$(TEST_HC)' $(TEST_HC_OPTS) T23479.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file + ./T23479 # check that the optimization occurred - grep -c "h\$$r1 = \"test_val_1\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_2\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_3\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_80_local" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_80_global" T23479_1.dump-js || true + grep -c "h\$$r1 = \"test_val_1\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_2\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_3\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_80_local" T23479.dump-js + grep -c "h\$$r1 = \"test_val_80_global" T23479.dump-js || true -T23479_2: - '$(TEST_HC)' $(TEST_HC_OPTS) T23479_2.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file - ./T23479_2 - grep -c "h\$$r1 = \"test_val_1\"" T23479_2.dump-js - grep -c "h\$$r1 = \"test_val_80_local_once" T23479_2.dump-js +T24744: + '$(TEST_HC)' $(TEST_HC_OPTS) T24744.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file + ./T24744 + grep -c "h\$$r1 = \"test_val_1\"" T24744.dump-js + grep -c "h\$$r1 = \"test_val_80_local_once" T24744.dump-js # check that the optimization occurred - grep -c "h\$$r1 = h\$$decodeUtf8z" T23479_2.dump-js + grep -c "h\$$stc(h\$$mainZCMainzitestzuvalzu80zulocal,h\$$mainZCMainzitestzuvalzu80zulocal_e,\[h\$$ghczmprimZCGHCziCStringziunpackCStringzh,h\$$mainZCMainzimain7_1,h\$$mainZCMainzimain7_2\])" T24744.jsexe/out.js ===================================== testsuite/tests/javascript/T23479_1.hs → testsuite/tests/javascript/T23479.hs ===================================== ===================================== testsuite/tests/javascript/T23479_1.stdout → testsuite/tests/javascript/T23479.stdout ===================================== ===================================== testsuite/tests/javascript/T23479_2.hs → testsuite/tests/javascript/T24744.hs ===================================== ===================================== testsuite/tests/javascript/T23479_2.stdout → testsuite/tests/javascript/T24744.stdout ===================================== ===================================== testsuite/tests/javascript/all.T ===================================== @@ -23,5 +23,5 @@ test('T22455', normal, compile_and_run, ['-ddisable-js-minifier']) test('T23565', normal, compile_and_run, ['']) test('T24495', normal, makefile_test, ['T24495']) -test('T23479_1', normal, makefile_test, ['T23479_1']) -test('T23479_2', normal, makefile_test, ['T23479_2']) +test('T23479', normal, makefile_test, ['T23479']) +test('T24744', normal, makefile_test, ['T24744']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5d0d86f7a331238df51794b733a47277720ab04c...8503e8b9c550899761a725cf51c66809a1f74e3b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5d0d86f7a331238df51794b733a47277720ab04c...8503e8b9c550899761a725cf51c66809a1f74e3b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 10:58:22 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Tue, 26 Nov 2024 05:58:22 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <6745a9ce13060_299676115ecc2433@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: 224a7cf4 by Sjoerd Visscher at 2024-11-26T11:58:13+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/linear_types.rst - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T15279.stderr - testsuite/tests/printer/T18791.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/224a7cf4e76c0690a986caffe4f3ab28a3bd0198 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/224a7cf4e76c0690a986caffe4f3ab28a3bd0198 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 10:58:53 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Tue, 26 Nov 2024 05:58:53 -0500 Subject: [Git][ghc/ghc][wip/T18462] 104 commits: Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial Message-ID: <6745a9eda033a_299676cd1a42941@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - 454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - 6e1fbda7 by Ben Gamari at 2024-11-25T03:55:44-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - a05e4a9b by Simon Hengel at 2024-11-25T03:56:33-05:00 Refactoring: Use `OnOff` more consistently for `Extension` - - - - - 7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00 Refactoring: Remove `pSupportedExts` from `ParserOpts` This is never used for lexing / parsing. It is only used by `GHC.Parser.Header.getOptions`. - - - - - 41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Add test for #25515 - - - - - 9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - 7d5d12a3 by Sjoerd Visscher at 2024-11-26T11:58:40+01:00 Multiplicity annotation on records - - - - - 30 changed files: - .gitattributes - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/hello.hs - .gitlab/jobs.yaml - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/224a7cf4e76c0690a986caffe4f3ab28a3bd0198...7d5d12a3f94188eedd2a2cd9895ddeea665b57ad -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/224a7cf4e76c0690a986caffe4f3ab28a3bd0198...7d5d12a3f94188eedd2a2cd9895ddeea665b57ad You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 11:27:52 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Tue, 26 Nov 2024 06:27:52 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/ghc-9.12-rc1 Message-ID: <6745b0b8370a5_2996763afffc472e@gitlab.mail> Zubin pushed new branch wip/ghc-9.12-rc1 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/ghc-9.12-rc1 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 11:36:12 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Tue, 26 Nov 2024 06:36:12 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <6745b2ac59849_299676595ce09827@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: d11f4264 by Sjoerd Visscher at 2024-11-26T12:36:05+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/linear_types.rst - libraries/array - libraries/stm - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d11f426455515095fe5f1fadaceeed87dd9b53af -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d11f426455515095fe5f1fadaceeed87dd9b53af You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 11:47:44 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Tue, 26 Nov 2024 06:47:44 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/romes/refator-modulegraph Message-ID: <6745b560a6e87_6f8ebdd1c1616d@gitlab.mail> Rodrigo Mesquita pushed new branch wip/romes/refator-modulegraph at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/romes/refator-modulegraph You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 12:31:00 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Tue, 26 Nov 2024 07:31:00 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-rc1] 3 commits: Bump os-string submodule to 2.0.8 Message-ID: <6745bf8494a0_6f8e4d15341933c@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-rc1 at Glasgow Haskell Compiler / GHC Commits: 0121b76f by Zubin Duggal at 2024-11-26T18:00:38+05:30 Bump os-string submodule to 2.0.8 - - - - - 962ceb50 by Zubin Duggal at 2024-11-26T18:00:38+05:30 Bump file-io submodule to avoid usage of QuasiQuotes - - - - - 7bc6877f by Zubin Duggal at 2024-11-26T18:00:38+05:30 Bump filepath submodule to 1.5.4.0 - - - - - 4 changed files: - hadrian/src/Settings/Warnings.hs - libraries/file-io - libraries/filepath - libraries/os-string Changes: ===================================== hadrian/src/Settings/Warnings.hs ===================================== @@ -72,7 +72,7 @@ ghcWarningsArgs = do , "-Wno-unused-imports" ] , package terminfo ? pure [ "-Wno-unused-imports", "-Wno-deriving-typeable" ] , package stm ? pure [ "-Wno-deriving-typeable" ] - , package osString ? pure [ "-Wno-deriving-typeable" ] + , package osString ? pure [ "-Wno-deriving-typeable", "-Wno-unused-imports" ] , package parsec ? pure [ "-Wno-deriving-typeable" ] , package cabal ? pure [ "-Wno-deriving-typeable" ] , package cabalSyntax ? pure [ "-Wno-deriving-typeable" ] ===================================== libraries/file-io ===================================== @@ -1 +1 @@ -Subproject commit a5d9e1cad53736e0f95a7a1dce53637eef30eda0 +Subproject commit 9cf6e1514186e48bed0ea45480348b7babc15b47 ===================================== libraries/filepath ===================================== @@ -1 +1 @@ -Subproject commit a9c3f18976b643cf698e60fed4fdfb869df3eef3 +Subproject commit 65b0f8f31aac4a306135e27734988327f8eb1e6f ===================================== libraries/os-string ===================================== @@ -1 +1 @@ -Subproject commit 2cb0a50fa6fe9ed775e59b58f6c304b00ec6cf84 +Subproject commit 4b5efedcd2da9314edda80d973a44e67020370db View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2006f7db971a29a5c5b2110bc177c42a1cb09efa...7bc6877fd5d41c6d5900678ad5e73ed30f366569 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2006f7db971a29a5c5b2110bc177c42a1cb09efa...7bc6877fd5d41c6d5900678ad5e73ed30f366569 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 13:23:30 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Tue, 26 Nov 2024 08:23:30 -0500 Subject: [Git][ghc/ghc][wip/romes/refator-modulegraph] Refactor ModuleGraph interface Message-ID: <6745cbd29e6b5_6f8e7fe9282887c@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/refator-modulegraph at Glasgow Haskell Compiler / GHC Commits: d846d9ad by Rodrigo Mesquita at 2024-11-26T13:23:13+00:00 Refactor ModuleGraph interface The 'ModuleGraph' abstraction represents the relationship and strucutre of the modules being compiled. This structure is meant to be constructed once at the start of compilation, and never changed again. However, it's exposed interface was confusing and exposed too many footguns which led to inneficient usages of the ModuleGraph. This commit improves significantly the exported interface of ModuleGraph, taking into consideration the recent improvements around reachability queries. Since the ModuleGraph graphs and related structures (HPT, EPS) are performance critical in the sense that somewhat simple mistakes can cause bad leaks and non-linear memory usage, we want to have proper APIs that guide efficient usage. This is a good step in that direction. - - - - - 6 changed files: - compiler/GHC.hs - compiler/GHC/Driver/Env.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModSummary.hs Changes: ===================================== compiler/GHC.hs ===================================== @@ -74,7 +74,7 @@ module GHC ( compileToCoreModule, compileToCoreSimplified, -- * Inspecting the module structure of the program - ModuleGraph, emptyMG, mapMG, mkModuleGraph, mgModSummaries, + ModuleGraph, emptyMG, mgMap, mkModuleGraph, mgModSummaries, mgLookupModule, ModSummary(..), ms_mod_name, ModLocation(..), pattern ModLocation, @@ -874,7 +874,7 @@ setProgramDynFlags_ invalidate_needed dflags = do -- invalidateModSummaryCache :: GhcMonad m => m () invalidateModSummaryCache = - modifySession $ \h -> h { hsc_mod_graph = mapMG inval (hsc_mod_graph h) } + modifySession $ \h -> h { hsc_mod_graph = mgMap inval (hsc_mod_graph h) } where inval ms = ms { ms_hs_hash = fingerprint0 } ===================================== compiler/GHC/Driver/Env.hs ===================================== @@ -41,6 +41,8 @@ where import GHC.Prelude +import GHC.Builtin.Names ( gHC_PRIM ) + import GHC.Driver.DynFlags import GHC.Driver.Errors ( printOrThrowDiagnostics ) import GHC.Driver.Errors.Types ( GhcMessage ) @@ -70,8 +72,6 @@ import GHC.Types.Name import GHC.Types.Name.Env import GHC.Types.TyThing -import GHC.Builtin.Names ( gHC_PRIM ) - import GHC.Data.Maybe import GHC.Utils.Exception as Ex @@ -274,9 +274,11 @@ hptSomeThingsBelowUs extract include_hi_boot hsc_env uid mn mg = hsc_mod_graph hsc_env in [ thing - | - -- Find each non-hi-boot module below me - (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) <- Set.toList (moduleGraphModulesBelow mg uid mn) + -- "Finding each non-hi-boot module below me" maybe could be cached in the module + -- graph to avoid filtering the boots out of the transitive closure out + -- every time this is called + | (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) + <- Set.toList (moduleGraphModulesBelow mg uid mn) , include_hi_boot || (is_boot == NotBoot) -- unsavoury: when compiling the base package with --make, we @@ -292,7 +294,11 @@ hptSomeThingsBelowUs extract include_hi_boot hsc_env uid mn Nothing -> pprTrace "WARNING in hptSomeThingsBelowUs" msg mempty msg = vcat [text "missing module" <+> ppr mod, text "When starting from" <+> ppr mn, - text "below:" <+> ppr (moduleGraphModulesBelow mg uid mn), + -- ROMES:TODO: does the best message require + -- moduleGraphModulesBelow? it would be best to avoid the + -- computation, but, most importantly, not to expose this + -- function from ModuleGraph. + -- text "below:" <+> ppr (moduleGraphModulesBelow mg uid mn), text "Probable cause: out-of-date interface files"] -- This really shouldn't happen, but see #962 , thing <- things ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -1453,7 +1453,7 @@ oneShotMsg logger recomp = batchMsg :: Messager batchMsg = batchMsgWith (\_ _ _ _ -> empty) batchMultiMsg :: Messager -batchMultiMsg = batchMsgWith (\_ _ _ node -> brackets (ppr (moduleGraphNodeUnitId node))) +batchMultiMsg = batchMsgWith (\_ _ _ node -> brackets (ppr (mgNodeUnitId node))) batchMsgWith :: (HscEnv -> (Int, Int) -> RecompileRequired -> ModuleGraphNode -> SDoc) -> Messager batchMsgWith extra hsc_env_start mod_index recomp node = @@ -1469,7 +1469,7 @@ batchMsgWith extra hsc_env_start mod_index recomp node = LinkNode {} -> "Linking" InstantiationNode {} -> "Instantiating" ModuleNode {} -> "Compiling" - hsc_env = hscSetActiveUnitId (moduleGraphNodeUnitId node) hsc_env_start + hsc_env = hscSetActiveUnitId (mgNodeUnitId node) hsc_env_start dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env state = hsc_units hsc_env ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -250,11 +250,9 @@ depanalPartial diag_wrapper msg excluded_mods allow_dup_roots = do -- cached finder data. liftIO $ flushFinderCaches (hsc_FC hsc_env) (hsc_unit_env hsc_env) - (errs, graph_nodes) <- liftIO $ downsweep + (errs, mod_graph) <- liftIO $ downsweep hsc_env diag_wrapper msg (mgModSummaries old_graph) excluded_mods allow_dup_roots - let - mod_graph = mkModuleGraph graph_nodes return (unionManyMessages errs, mod_graph) -- | Collect the instantiations of dependencies to create 'InstantiationNode' work graph nodes. @@ -289,7 +287,7 @@ linkNodes summaries uid hue = ofile = outputFile_ dflags unit_nodes :: [NodeKey] - unit_nodes = map mkNodeKey (filter ((== uid) . moduleGraphNodeUnitId) summaries) + unit_nodes = map mkNodeKey (filter ((== uid) . mgNodeUnitId) summaries) -- Issue a warning for the confusing case where the user -- said '-o foo' but we're not going to do any linking. -- We attempt linking if either (a) one of the modules is @@ -632,13 +630,18 @@ createBuildPlan mod_graph maybe_top_mod = -- An environment mapping a module to its hs-boot file and all nodes on the path between the two, if one exists boot_modules = mkModuleEnv - [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) | m@(ModuleNode _ ms) <- (mgModSummaries' mod_graph), isBootSummary ms == IsBoot] + [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) + | m@(ModuleNode _ ms) <- mgModSummaries' mod_graph + , isBootSummary ms == IsBoot] select_boot_modules :: [ModuleGraphNode] -> [ModuleGraphNode] select_boot_modules = mapMaybe (fmap fst . get_boot_module) get_boot_module :: ModuleGraphNode -> Maybe (ModuleGraphNode, [ModuleGraphNode]) - get_boot_module m = case m of ModuleNode _ ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing + get_boot_module (ModuleNode _ ms) + | HsSrcFile <- ms_hsc_src ms + = lookupModuleEnv boot_modules (ms_mod ms) + get_boot_module _ = Nothing -- Any cycles should be resolved now collapseSCC :: [SCC ModuleGraphNode] -> Either [ModuleGraphNode] [(Either ModuleGraphNode ModuleGraphNodeWithBootFile)] @@ -668,8 +671,8 @@ createBuildPlan mod_graph maybe_top_mod = in - assertPpr (sum (map countMods build_plan) == length (mgModSummaries' mod_graph)) - (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (length (mgModSummaries' mod_graph )))]) + assertPpr (sum (map countMods build_plan) == lengthMG mod_graph) + (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (lengthMG mod_graph))]) build_plan mkWorkerLimit :: DynFlags -> IO WorkerLimit @@ -1142,7 +1145,7 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do !build_map <- getBuildMap hug_var <- gets hug_var -- 1. Get the direct dependencies of this module - let direct_deps = nodeDependencies False mod + let direct_deps = mgNodeDependencies False mod -- It's really important to force build_deps, or the whole buildMap is retained, -- which would retain all the result variables, preventing us from collecting them -- after they are no longer used. @@ -1150,14 +1153,14 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do let !build_action = case mod of InstantiationNode uid iu -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeInstantiationNode mod_idx n_mods hug uid iu return (Nothing, deps) ModuleNode _build_deps ms -> let !old_hmi = M.lookup (msKey ms) old_hpt rehydrate_mods = mapMaybe nodeKeyModName <$> rehydrate_nodes - in withCurrentUnit (moduleGraphNodeUnitId mod) $ do + in withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps hmi <- executeCompileNode mod_idx n_mods old_hmi hug rehydrate_mods ms -- Write the HMI to an external cache (if one exists) @@ -1166,9 +1169,9 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do -- This global MVar is incrementally modified in order to avoid having to -- recreate the HPT before compiling each module which leads to a quadratic amount of work. liftIO $ modifyMVar_ hug_var (return . addHomeModInfoToHug hmi) - return (Just hmi, addToModuleNameSet (moduleGraphNodeUnitId mod) (ms_mod_name ms) deps ) + return (Just hmi, addToModuleNameSet (mgNodeUnitId mod) (ms_mod_name ms) deps ) LinkNode _nks uid -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeLinkNode hug (mod_idx, n_mods) uid direct_deps return (Nothing, deps) @@ -1570,7 +1573,7 @@ downsweep :: HscEnv -> Bool -- True <=> allow multiple targets to have -- the same module name; this is -- very useful for ghc -M - -> IO ([DriverMessages], [ModuleGraphNode]) + -> IO ([DriverMessages], ModuleGraph) -- The non-error elements of the returned list all have distinct -- (Modules, IsBoot) identifiers, unless the Bool is true in -- which case there can be repeats @@ -1595,7 +1598,7 @@ downsweep_imports :: HscEnv -> [ModuleName] -> Bool -> ([(UnitId, DriverMessages)], [ModSummary]) - -> IO ([DriverMessages], [ModuleGraphNode]) + -> IO ([DriverMessages], ModuleGraph) downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, rootSummariesOk) = do let root_map = mkRootMap rootSummariesOk @@ -1620,7 +1623,7 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro th_enabled_nodes <- enableCodeGenForTH logger tmpfs unit_env all_nodes if null all_root_errs then return (all_errs, th_enabled_nodes) - else pure $ (all_root_errs, []) + else pure $ (all_root_errs, emptyMG) where -- Dependencies arising on a unit (backpack and module linking deps) unitModuleNodes :: [ModuleGraphNode] -> UnitId -> HomeUnitEnv -> [Either (Messages DriverMessage) ModuleGraphNode] @@ -1870,7 +1873,7 @@ enableCodeGenForTH -> TmpFs -> UnitEnv -> [ModuleGraphNode] - -> IO [ModuleGraphNode] + -> IO ModuleGraph enableCodeGenForTH logger tmpfs unit_env = enableCodeGenWhen logger tmpfs TFL_CurrentModule TFL_GhcSession unit_env @@ -1893,19 +1896,19 @@ enableCodeGenWhen -> TempFileLifetime -> UnitEnv -> [ModuleGraphNode] - -> IO [ModuleGraphNode] + -> IO ModuleGraph enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = - mapM enable_code_gen mod_graph + mgMapM enable_code_gen mg where defaultBackendOf ms = platformDefaultBackend (targetPlatform $ ue_unitFlags (ms_unitid ms) unit_env) - enable_code_gen :: ModuleGraphNode -> IO ModuleGraphNode - enable_code_gen n@(ModuleNode deps ms) + enable_code_gen :: ModSummary -> IO ModSummary + enable_code_gen ms | ModSummary { ms_location = ms_location , ms_hsc_src = HsSrcFile , ms_hspp_opts = dflags } <- ms - , Just enable_spec <- mkNodeKey n `Map.lookup` needs_codegen_map = + , Just enable_spec <- needs_codegen_map (NodeKey_Module (msKey ms)) = if | nocode_enable ms -> do let new_temp_file suf dynsuf = do tn <- newTempName logger tmpfs (tmpDir dflags) staticLife suf @@ -1937,7 +1940,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = , ms_hspp_opts = updOptLevel 0 $ new_dflags } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' -- If -fprefer-byte-code then satisfy dependency by enabling bytecode (if normal object not enough) -- we only get to this case if the default backend is already generating object files, but we need dynamic @@ -1947,21 +1950,21 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ByteCodeAndObjectCode } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' | dynamic_too_enable enable_spec ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_BuildDynamicToo } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' | ext_interp_enable ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ExternalInterpreter } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' - | otherwise -> return n + | otherwise -> return ms enable_code_gen ms = return ms @@ -2018,23 +2021,23 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = lcl_dflags = ms_hspp_opts ms internalInterpreter = not (gopt Opt_ExternalInterpreter lcl_dflags) - (mg, lookup_node) = moduleGraphNodes False mod_graph - - mk_needed_set roots = Set.fromList $ map (mkNodeKey . node_payload) $ reachablesG mg (map (expectJust "needs_th" . lookup_node) roots) + mg = mkModuleGraph mod_graph - needs_obj_set, needs_bc_set :: Set.Set NodeKey - needs_obj_set = mk_needed_set need_obj_set + needs_obj_set, needs_bc_set :: NodeKey -> Bool + needs_obj_set = mgQueryMany mg need_obj_set - needs_bc_set = mk_needed_set need_bc_set + needs_bc_set = mgQueryMany mg need_bc_set -- A map which tells us how to enable code generation for a NodeKey - needs_codegen_map :: Map.Map NodeKey CodeGenEnable - needs_codegen_map = + needs_codegen_map :: NodeKey -> Maybe CodeGenEnable + needs_codegen_map nk = -- Another option here would be to just produce object code, rather than both object and -- byte code - Map.unionWith (\_ _ -> EnableByteCodeAndObject) - (Map.fromList $ [(m, EnableObject) | m <- Set.toList needs_obj_set]) - (Map.fromList $ [(m, EnableByteCode) | m <- Set.toList needs_bc_set]) + case (needs_obj_set nk, needs_bc_set nk) of + (True, True) -> Just EnableByteCodeAndObject + (True, False) -> Just EnableObject + (False, True) -> Just EnableByteCode + (False, False) -> Nothing -- The direct dependencies of modules which require object code need_obj_set = @@ -2470,14 +2473,14 @@ cyclicModuleErr mss Just path -> mkPlainErrorMsgEnvelope src_span $ GhcDriverMessage $ DriverModuleGraphCycle path where - src_span = maybe noSrcSpan (mkFileSrcSpan . ms_location) (moduleGraphNodeModSum (head path)) + src_span = maybe noSrcSpan (mkFileSrcSpan . ms_location) (mgNodeModSum (head path)) where graph :: [Node NodeKey ModuleGraphNode] graph = [ DigraphNode { node_payload = ms , node_key = mkNodeKey ms - , node_dependencies = nodeDependencies False ms + , node_dependencies = mgNodeDependencies False ms } | ms <- mss ] ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -2,52 +2,106 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveTraversable #-} +-- | A module graph should be constructed once and never change from there onwards. +-- +-- The only operations should be for building the 'ModuleGraph' +-- (once and for all -- no update-like/insert-like functions) +-- and querying the structure in various ways, e.g. to determine reachability. +-- +-- We should avoid exposing fields like 'mg_mss' since it may be a footgun +-- trying to use the nodes directly... We do still expose it, but it feels like +-- all its use cases would be better served by a more proper ModuleGraph +-- abstraction module GHC.Unit.Module.Graph - ( ModuleGraph - , ModuleGraphNode(..) - , nodeDependencies + ( + -- * Construct a module graph + -- + -- | A module graph should be constructed once by downsweep and never modified. + ModuleGraph , emptyMG , mkModuleGraph - , extendMG - , extendMGInst - , extendMG' - , unionMG - , isTemplateHaskellOrQQNonBoot - , filterToposortToModules - , mapMG + + -- * Nodes in a module graph + -- + -- | The user-facing nodes in a module graph are 'ModuleGraphNode's. + -- There are a few things which we can query out of each 'ModuleGraphNode': + -- + -- - 'mgNodeDependencies' gets the immediate dependencies of this node + -- - 'mgNodeUnitId' returns the 'UnitId' of that node + -- - 'mgNodeModSum' extracts the 'ModSummary' of a node if exists + , ModuleGraphNode(..) + , mgNodeDependencies + , mgNodeModSum + , mgNodeUnitId + + -- * Module graph operations + , lengthMG + + -- ** 'ModSummary' operations + -- + -- | A couple of operations on the module graph allow access to the + -- 'ModSummary's of the modules in it contained. + -- + -- In particular, 'mapMG' and 'mapMGM' allow updating these 'ModSummary's + -- (without changing the 'ModuleGraph' structure itself!). + -- 'mgModSummaries' lists out all 'ModSummary's, and + -- 'mgLookupModule' looks up a 'ModSummary' for a given module. + , mgMap, mgMapM , mgModSummaries - , mgModSummaries' , mgLookupModule - , showModMsg - , moduleGraphNodeModule - , moduleGraphNodeModSum - , moduleGraphModulesBelow + + -- ** Reachability queries + -- + -- | A module graph explains the structure and relationship between the + -- modules being compiled. Often times, this structure is relevant to + -- answer reachability queries -- is X reachable from Y; or, what is the + -- transitive closure of Z? , mgReachable , mgQuery - + , mgQueryMany + + -- ** Other operations + -- + -- | These operations allow more-internal-than-ideal access to the + -- ModuleGraph structure. Ideally, we could restructure the code using + -- these functions to avoid deconstructing/reconstructing the ModuleGraph + -- and instead extend the "proper interface" of the ModuleGraph to achieve + -- what is currently done but through a better abstraction. + , mgModSummaries' , moduleGraphNodes - , SummaryNode - , summaryNodeSummary + , moduleGraphModulesBelow -- needed for 'hptSomeThingsBelowUs', + -- but I think we could be more clever and cache + -- the graph-ixs of boot modules to efficiently + -- filter them out of the returned list. + -- hptInstancesBelow is re-doing that work every + -- time it's called. + , filterToposortToModules + -- * Keys into the 'ModuleGraph' , NodeKey(..) + , mkNodeKey , nodeKeyUnitId , nodeKeyModName , ModNodeKey - , mkNodeKey + , ModNodeKeyWithUid(..) , msKey + -- ** Internal node representation + -- + -- | 'SummaryNode' is the internal representation for each node stored in + -- the graph. It's not immediately clear to me why users do depend on them. + , SummaryNode + , summaryNodeSummary + , summaryNodeKey - , moduleGraphNodeUnitId - - , ModNodeKeyWithUid(..) + -- * Utilities + , showModMsg ) where import GHC.Prelude import GHC.Platform -import qualified GHC.LanguageExtensions as LangExt - import GHC.Data.Maybe import GHC.Data.Graph.Directed import GHC.Data.Graph.Directed.Reachability @@ -73,7 +127,44 @@ import GHC.Linker.Static.Utils import Data.Bifunctor import Data.Function import Data.List (sort) -import GHC.Data.List.SetOps +import Control.Monad + +-- | A '@ModuleGraph@' contains all the nodes from the home package (only). See +-- '@ModuleGraphNode@' for information about the nodes. +-- +-- Modules need to be compiled. hs-boots need to be typechecked before +-- the associated "real" module so modules with {-# SOURCE #-} imports can be +-- built. Instantiations also need to be typechecked to ensure that the module +-- fits the signature. Substantiation typechecking is roughly comparable to the +-- check that the module and its hs-boot agree. +-- +-- The graph is not necessarily stored in topologically-sorted order. Use +-- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. +data ModuleGraph = ModuleGraph + { mg_mss :: [ModuleGraphNode] + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) + -- A cached transitive dependency calculation so that a lot of work is not + -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) + } + +-- | Why do we ever need to construct empty graphs? Is it because of one shot mode? +emptyMG :: ModuleGraph +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) + +-- | Construct a module graph. This function should be the only entry point for +-- building a 'ModuleGraph', since it is supposed to be built once and never modified. +-- +-- If you ever find the need to build a 'ModuleGraph' iteratively, don't +-- add insert and update functions to the API since they become footguns. +-- Instead, design an API that allows iterative construction without posterior +-- modification, perhaps like what is done for building arrays from mutable +-- arrays. +mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph +mkModuleGraph = foldr (flip extendMG') emptyMG + +-------------------------------------------------------------------------------- +-- * Module Graph Nodes +-------------------------------------------------------------------------------- -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -87,16 +178,36 @@ data ModuleGraphNode -- | Link nodes are whether are are creating a linked product (ie executable/shared object etc) for a unit. | LinkNode [NodeKey] UnitId -moduleGraphNodeModule :: ModuleGraphNode -> Maybe ModuleName -moduleGraphNodeModule mgn = ms_mod_name <$> (moduleGraphNodeModSum mgn) +-- | Collect the immediate dependencies of a ModuleGraphNode, +-- optionally avoiding hs-boot dependencies. +-- If the drop_hs_boot_nodes flag is False, and if this is a .hs and there is +-- an equivalent .hs-boot, add a link from the former to the latter. This +-- has the effect of detecting bogus cases where the .hs-boot depends on the +-- .hs, by introducing a cycle. Additionally, it ensures that we will always +-- process the .hs-boot before the .hs, and so the HomePackageTable will always +-- have the most up to date information. +mgNodeDependencies :: Bool -> ModuleGraphNode -> [NodeKey] +mgNodeDependencies drop_hs_boot_nodes = \case + LinkNode deps _uid -> deps + InstantiationNode uid iuid -> + NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) + ModuleNode deps _ms -> + map drop_hs_boot deps + where + -- Drop hs-boot nodes by using HsSrcFile as the key + hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature + | otherwise = IsBoot + + drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) uid)) + drop_hs_boot x = x -moduleGraphNodeModSum :: ModuleGraphNode -> Maybe ModSummary -moduleGraphNodeModSum (InstantiationNode {}) = Nothing -moduleGraphNodeModSum (LinkNode {}) = Nothing -moduleGraphNodeModSum (ModuleNode _ ms) = Just ms +mgNodeModSum :: ModuleGraphNode -> Maybe ModSummary +mgNodeModSum (InstantiationNode {}) = Nothing +mgNodeModSum (LinkNode {}) = Nothing +mgNodeModSum (ModuleNode _ ms) = Just ms -moduleGraphNodeUnitId :: ModuleGraphNode -> UnitId -moduleGraphNodeUnitId mgn = +mgNodeUnitId :: ModuleGraphNode -> UnitId +mgNodeUnitId mgn = case mgn of InstantiationNode uid _iud -> uid ModuleNode _ ms -> toUnitId (moduleUnit (ms_mod ms)) @@ -114,79 +225,43 @@ instance Eq ModuleGraphNode where instance Ord ModuleGraphNode where compare = compare `on` mkNodeKey -data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit - | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid - | NodeKey_Link !UnitId - deriving (Eq, Ord) - -instance Outputable NodeKey where - ppr nk = pprNodeKey nk +-------------------------------------------------------------------------------- +-- * Module Graph operations +-------------------------------------------------------------------------------- -pprNodeKey :: NodeKey -> SDoc -pprNodeKey (NodeKey_Unit iu) = ppr iu -pprNodeKey (NodeKey_Module mk) = ppr mk -pprNodeKey (NodeKey_Link uid) = ppr uid +-- | Returns the number of nodes in a 'ModuleGraph' +lengthMG :: ModuleGraph -> Int +lengthMG = length . mg_mss -nodeKeyUnitId :: NodeKey -> UnitId -nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu -nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk -nodeKeyUnitId (NodeKey_Link uid) = uid - -nodeKeyModName :: NodeKey -> Maybe ModuleName -nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) -nodeKeyModName _ = Nothing - -data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot - , mnkUnitId :: !UnitId } deriving (Eq, Ord) - -instance Outputable ModNodeKeyWithUid where - ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib - --- | A '@ModuleGraph@' contains all the nodes from the home package (only). See --- '@ModuleGraphNode@' for information about the nodes. --- --- Modules need to be compiled. hs-boots need to be typechecked before --- the associated "real" module so modules with {-# SOURCE #-} imports can be --- built. Instantiations also need to be typechecked to ensure that the module --- fits the signature. Substantiation typechecking is roughly comparable to the --- check that the module and its hs-boot agree. --- --- The graph is not necessarily stored in topologically-sorted order. Use --- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. -data ModuleGraph = ModuleGraph - { mg_mss :: [ModuleGraphNode] - , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) - -- A cached transitive dependency calculation so that a lot of work is not - -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) - } +-------------------------------------------------------------------------------- +-- ** ModSummaries +-------------------------------------------------------------------------------- -- | Map a function 'f' over all the 'ModSummaries'. --- To preserve invariants 'f' can't change the isBoot status. -mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph -mapMG f mg at ModuleGraph{..} = mg +-- To preserve invariants, 'f' can't change the isBoot status. +mgMap :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph +mgMap f mg at ModuleGraph{..} = mg { mg_mss = flip fmap mg_mss $ \case InstantiationNode uid iuid -> InstantiationNode uid iuid LinkNode uid nks -> LinkNode uid nks ModuleNode deps ms -> ModuleNode deps (f ms) } -unionMG :: ModuleGraph -> ModuleGraph -> ModuleGraph -unionMG a b = - let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b - in ModuleGraph { - mg_mss = new_mss - , mg_graph = mkTransDeps new_mss - } - -mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False +-- | Map a function 'f' over all the 'ModSummaries', in 'IO'. +-- To preserve invariants, 'f' can't change the isBoot status. +mgMapM :: (ModSummary -> IO ModSummary) -> ModuleGraph -> IO ModuleGraph +mgMapM f mg at ModuleGraph{..} = do + mss' <- forM mg_mss $ \case + InstantiationNode uid iuid -> pure $ InstantiationNode uid iuid + LinkNode uid nks -> pure $ LinkNode uid nks + ModuleNode deps ms -> ModuleNode deps <$> (f ms) + return mg + { mg_mss = mss' + } mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] -mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] -mgModSummaries' = mg_mss - -- | Look up a ModSummary in the ModuleGraph -- Looks up the non-boot ModSummary -- Linear in the size of the module graph @@ -199,128 +274,53 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss = Just ms go _ = Nothing -emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) - -isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool -isTemplateHaskellOrQQNonBoot ms = - (xopt LangExt.TemplateHaskell (ms_hspp_opts ms) - || xopt LangExt.QuasiQuotes (ms_hspp_opts ms)) && - (isBootSummary ms == NotBoot) - --- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is --- not an element of the ModuleGraph. -extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph -extendMG ModuleGraph{..} deps ms = ModuleGraph - { mg_mss = ModuleNode deps ms : mg_mss - , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) - } - -extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph -extendMGInst mg uid depUnitId = mg - { mg_mss = InstantiationNode uid depUnitId : mg_mss mg - } - -extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph -extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } +-------------------------------------------------------------------------------- +-- ** Reachability +-------------------------------------------------------------------------------- -extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph -extendMG' mg = \case - InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId - ModuleNode deps ms -> extendMG mg deps ms - LinkNode deps uid -> extendMGLink mg uid deps - -mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph -mkModuleGraph = foldr (flip extendMG') emptyMG - --- | This function filters out all the instantiation nodes from each SCC of a --- topological sort. Use this with care, as the resulting "strongly connected components" --- may not really be strongly connected in a direct way, as instantiations have been --- removed. It would probably be best to eliminate uses of this function where possible. -filterToposortToModules - :: [SCC ModuleGraphNode] -> [SCC ModSummary] -filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case - InstantiationNode _ _ -> Nothing - LinkNode{} -> Nothing - ModuleNode _deps node -> Just node - where - -- This higher order function is somewhat bogus, - -- as the definition of "strongly connected component" - -- is not necessarily respected. - mapMaybeSCC :: (a -> Maybe b) -> SCC a -> Maybe (SCC b) - mapMaybeSCC f = \case - AcyclicSCC a -> AcyclicSCC <$> f a - CyclicSCC as -> case mapMaybe f as of - [] -> Nothing - [a] -> Just $ AcyclicSCC a - as -> Just $ CyclicSCC as - -showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc -showModMsg dflags _ (LinkNode {}) = - let staticLink = case ghcLink dflags of - LinkStaticLib -> True - _ -> False - - platform = targetPlatform dflags - arch_os = platformArchOS platform - exe_file = exeFileName arch_os staticLink (outputFile_ dflags) - in text exe_file -showModMsg _ _ (InstantiationNode _uid indef_unit) = - ppr $ instUnitInstanceOf indef_unit -showModMsg dflags recomp (ModuleNode _ mod_summary) = - if gopt Opt_HideSourcePaths dflags - then text mod_str - else hsep $ - [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') - , char '(' - , text (op $ msHsFilePath mod_summary) <> char ',' - , message, char ')' ] - - where - op = normalise - mod_str = moduleNameString (moduleName (ms_mod mod_summary)) ++ - hscSourceString (ms_hsc_src mod_summary) - dyn_file = op $ msDynObjFilePath mod_summary - obj_file = op $ msObjFilePath mod_summary - files = [ obj_file ] - ++ [ dyn_file | gopt Opt_BuildDynamicToo dflags ] - ++ [ "interpreted" | gopt Opt_ByteCodeAndObjectCode dflags ] - message = case backendSpecialModuleSource (backend dflags) recomp of - Just special -> text special - Nothing -> foldr1 (\ofile rest -> ofile <> comma <+> rest) (map text files) - - - -type SummaryNode = Node Int ModuleGraphNode +-- | Return all nodes reachable from the given 'NodeKey'. +mgReachable :: ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk -summaryNodeKey :: SummaryNode -> Int -summaryNodeKey = node_key +-- | Reachability Query. +-- +-- @mgQuery(g, a, b)@ asks: +-- Can we reach @b@ from @a@ in graph @g@? +-- +-- Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb -summaryNodeSummary :: SummaryNode -> ModuleGraphNode -summaryNodeSummary = node_payload +-- | Many roots reachability Query. +-- +-- @mgQuery(g, roots, b)@ asks: +-- Can we reach @b@ from any of the @roots@ in graph @g@? +-- +-- Node @b@ must be in @g at . +mgQueryMany :: ModuleGraph -- ^ @g@ + -> [NodeKey] -- ^ @roots@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @roots@ +mgQueryMany mg roots nkb = isReachableMany td_map nroots nb where + (td_map, lookup_node) = mg_graph mg + nroots = mapMaybe lookup_node roots + nb = expectJust "mgQuery:b" $ lookup_node nkb --- | Collect the immediate dependencies of a ModuleGraphNode, --- optionally avoiding hs-boot dependencies. --- If the drop_hs_boot_nodes flag is False, and if this is a .hs and there is --- an equivalent .hs-boot, add a link from the former to the latter. This --- has the effect of detecting bogus cases where the .hs-boot depends on the --- .hs, by introducing a cycle. Additionally, it ensures that we will always --- process the .hs-boot before the .hs, and so the HomePackageTable will always --- have the most up to date information. -nodeDependencies :: Bool -> ModuleGraphNode -> [NodeKey] -nodeDependencies drop_hs_boot_nodes = \case - LinkNode deps _uid -> deps - InstantiationNode uid iuid -> - NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) - ModuleNode deps _ms -> - map drop_hs_boot deps - where - -- Drop hs-boot nodes by using HsSrcFile as the key - hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature - | otherwise = IsBoot +-------------------------------------------------------------------------------- +-- ** Other operations (read haddocks on export list) +-------------------------------------------------------------------------------- - drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) uid)) - drop_hs_boot x = x +mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] +mgModSummaries' = mg_mss -- | Turn a list of graph nodes into an efficient queriable graph. -- The first boolean parameter indicates whether nodes corresponding to hs-boot files @@ -340,16 +340,16 @@ moduleGraphNodes drop_hs_boot_nodes summaries = ModuleNode __deps ms | isBootSummary ms == IsBoot, drop_hs_boot_nodes -- Using nodeDependencies here converts dependencies on other -- boot files to dependencies on dependencies on non-boot files. - -> Left (ms_mod ms, nodeDependencies drop_hs_boot_nodes s) + -> Left (ms_mod ms, mgNodeDependencies drop_hs_boot_nodes s) _ -> normal_case where normal_case = - let lkup_key = ms_mod <$> moduleGraphNodeModSum s + let lkup_key = ms_mod <$> mgNodeModSum s extra = (lkup_key >>= \key -> Map.lookup key boot_summaries) in Right $ DigraphNode s key $ out_edge_keys $ (fromMaybe [] extra - ++ nodeDependencies drop_hs_boot_nodes s) + ++ mgNodeDependencies drop_hs_boot_nodes s) numbered_summaries = zip summaries [1..] @@ -370,20 +370,6 @@ moduleGraphNodes drop_hs_boot_nodes summaries = out_edge_keys = mapMaybe lookup_key -- If we want keep_hi_boot_nodes, then we do lookup_key with -- IsBoot; else False -newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } - deriving (Functor, Traversable, Foldable) - -mkNodeKey :: ModuleGraphNode -> NodeKey -mkNodeKey = \case - InstantiationNode _ iu -> NodeKey_Unit iu - ModuleNode _ x -> NodeKey_Module $ msKey x - LinkNode _ uid -> NodeKey_Link uid - -msKey :: ModSummary -> ModNodeKeyWithUid -msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) - -type ModNodeKey = ModuleNameWithIsBoot - -- | This function returns all the modules belonging to the home-unit that can -- be reached by following the given dependencies. Additionally, if both the @@ -409,21 +395,150 @@ moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- mo | otherwise -> r1 : filter_mods (r2:rs) rs -> rs -mgReachable :: ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] -mgReachable mg nk = map summaryNodeSummary <$> modules_below where - (td_map, lookup_node) = mg_graph mg - modules_below = - allReachable td_map <$> lookup_node nk +-- | This function filters out all the instantiation nodes from each SCC of a +-- topological sort. Use this with care, as the resulting "strongly connected components" +-- may not really be strongly connected in a direct way, as instantiations have been +-- removed. It would probably be best to eliminate uses of this function where possible. +filterToposortToModules + :: [SCC ModuleGraphNode] -> [SCC ModSummary] +filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case + InstantiationNode _ _ -> Nothing + LinkNode{} -> Nothing + ModuleNode _deps node -> Just node + where + -- This higher order function is somewhat bogus, + -- as the definition of "strongly connected component" + -- is not necessarily respected. + mapMaybeSCC :: (a -> Maybe b) -> SCC a -> Maybe (SCC b) + mapMaybeSCC f = \case + AcyclicSCC a -> AcyclicSCC <$> f a + CyclicSCC as -> case mapMaybe f as of + [] -> Nothing + [a] -> Just $ AcyclicSCC a + as -> Just $ CyclicSCC as --- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in --- graph @g@? --- INVARIANT: Both @a@ and @b@ must be in @g at . -mgQuery :: ModuleGraph -- ^ @g@ - -> NodeKey -- ^ @a@ - -> NodeKey -- ^ @b@ - -> Bool -- ^ @b@ is reachable from @a@ -mgQuery mg nka nkb = isReachable td_map na nb where - (td_map, lookup_node) = mg_graph mg - na = expectJust "mgQuery:a" $ lookup_node nka - nb = expectJust "mgQuery:b" $ lookup_node nkb +-------------------------------------------------------------------------------- +-- * Keys into ModuleGraph +-------------------------------------------------------------------------------- + +data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit + | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid + | NodeKey_Link !UnitId + deriving (Eq, Ord) + +instance Outputable NodeKey where + ppr (NodeKey_Unit iu) = ppr iu + ppr (NodeKey_Module mk) = ppr mk + ppr (NodeKey_Link uid) = ppr uid + +mkNodeKey :: ModuleGraphNode -> NodeKey +mkNodeKey = \case + InstantiationNode _ iu -> NodeKey_Unit iu + ModuleNode _ x -> NodeKey_Module $ msKey x + LinkNode _ uid -> NodeKey_Link uid + +nodeKeyUnitId :: NodeKey -> UnitId +nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu +nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk +nodeKeyUnitId (NodeKey_Link uid) = uid + +nodeKeyModName :: NodeKey -> Maybe ModuleName +nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) +nodeKeyModName _ = Nothing + +type ModNodeKey = ModuleNameWithIsBoot +data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot + , mnkUnitId :: !UnitId } deriving (Eq, Ord) + +instance Outputable ModNodeKeyWithUid where + ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib + +msKey :: ModSummary -> ModNodeKeyWithUid +msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) + +-------------------------------------------------------------------------------- +-- ** Internal node representation (exposed) +-------------------------------------------------------------------------------- + +type SummaryNode = Node Int ModuleGraphNode + +summaryNodeKey :: SummaryNode -> Int +summaryNodeKey = node_key + +summaryNodeSummary :: SummaryNode -> ModuleGraphNode +summaryNodeSummary = node_payload + +-------------------------------------------------------------------------------- +-- * Misc utilities +-------------------------------------------------------------------------------- + +showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc +showModMsg dflags _ (LinkNode {}) = + let staticLink = case ghcLink dflags of + LinkStaticLib -> True + _ -> False + + platform = targetPlatform dflags + arch_os = platformArchOS platform + exe_file = exeFileName arch_os staticLink (outputFile_ dflags) + in text exe_file +showModMsg _ _ (InstantiationNode _uid indef_unit) = + ppr $ instUnitInstanceOf indef_unit +showModMsg dflags recomp (ModuleNode _ mod_summary) = + if gopt Opt_HideSourcePaths dflags + then text mod_str + else hsep $ + [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') + , char '(' + , text (op $ msHsFilePath mod_summary) <> char ',' + , message, char ')' ] + + where + op = normalise + mod_str = moduleNameString (moduleName (ms_mod mod_summary)) ++ + hscSourceString (ms_hsc_src mod_summary) + dyn_file = op $ msDynObjFilePath mod_summary + obj_file = op $ msObjFilePath mod_summary + files = [ obj_file ] + ++ [ dyn_file | gopt Opt_BuildDynamicToo dflags ] + ++ [ "interpreted" | gopt Opt_ByteCodeAndObjectCode dflags ] + message = case backendSpecialModuleSource (backend dflags) recomp of + Just special -> text special + Nothing -> foldr1 (\ofile rest -> ofile <> comma <+> rest) (map text files) + +-------------------------------------------------------------------------------- +-- * Internal methods for module graph +-- +-- These are *really* meant to be internal! +-- Don't expose them without careful consideration about the invariants +-- described in the export list haddocks. +-------------------------------------------------------------------------------- + +newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } + deriving (Functor, Traversable, Foldable) + +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False + +extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph +extendMG' mg = \case + InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId + ModuleNode deps ms -> extendMG mg deps ms + LinkNode deps uid -> extendMGLink mg uid deps + +-- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is +-- not an element of the ModuleGraph. +extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph +extendMG ModuleGraph{..} deps ms = ModuleGraph + { mg_mss = ModuleNode deps ms : mg_mss + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) + } + +extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph +extendMGInst mg uid depUnitId = mg + { mg_mss = InstantiationNode uid depUnitId : mg_mss mg + } + +extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph +extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } ===================================== compiler/GHC/Unit/Module/ModSummary.hs ===================================== @@ -24,12 +24,14 @@ module GHC.Unit.Module.ModSummary , msDynObjFileOsPath , msDeps , isBootSummary + , isTemplateHaskellOrQQNonBoot , findTarget ) where import GHC.Prelude +import qualified GHC.LanguageExtensions as LangExt import GHC.Hs import GHC.Driver.DynFlags @@ -163,6 +165,12 @@ msDynObjFileOsPath ms = ml_dyn_obj_file_ospath (ms_location ms) isBootSummary :: ModSummary -> IsBootInterface isBootSummary ms = if ms_hsc_src ms == HsBootFile then IsBoot else NotBoot +isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool +isTemplateHaskellOrQQNonBoot ms = + (xopt LangExt.TemplateHaskell (ms_hspp_opts ms) + || xopt LangExt.QuasiQuotes (ms_hspp_opts ms)) && + (isBootSummary ms == NotBoot) + ms_mnwib :: ModSummary -> ModuleNameWithIsBoot ms_mnwib ms = GWIB (ms_mod_name ms) (isBootSummary ms) @@ -206,4 +214,3 @@ findTarget ms ts = _ `matches` _ = False - View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d846d9ad8f139a159b0d8c56227710c765e20f03 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d846d9ad8f139a159b0d8c56227710c765e20f03 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 13:25:55 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 26 Nov 2024 08:25:55 -0500 Subject: [Git][ghc/ghc][master] Clarify INLINE unfolding optimization docs. Message-ID: <6745cc63db7e3_6f8e7e11d4362ca@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00 Clarify INLINE unfolding optimization docs. Fixes #24660 - - - - - 1 changed file: - docs/users_guide/exts/pragmas.rst Changes: ===================================== docs/users_guide/exts/pragmas.rst ===================================== @@ -393,12 +393,15 @@ has a number of other effects: pragmas is to expose functions in ``f``\'s RHS that have rewrite rules, and it's no good if those functions have been optimised away. - So *GHC guarantees to inline precisely the code that you wrote*, no - more and no less. It does this by capturing a copy of the definition + So *GHC guarantees to behave precisely as if it inlined the code that you wrote*. + It does this by capturing a copy of the definition of the function to use for inlining (we call this the "inline-RHS"), - which it leaves untouched, while optimising the ordinarily RHS as - usual. For externally-visible functions the inline-RHS (not the - optimised RHS) is recorded in the interface file. + which it only optimizes in ways which don't break this promise. + For example if inlining is explicitly delayed through phase control GHC will + apply optimizations which happen before the ``INLINE`` pragma becomes + active to the inline-RHS while optimising the ordinarily RHS as usual. + For externally-visible functions + the inline-RHS (not the optimised RHS) is recorded in the interface file. - An ``INLINE`` function is not worker/wrappered by strictness analysis. It's going to be inlined wholesale instead. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fcc3ae6ec74725804364742f864ded7038e3520d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/fcc3ae6ec74725804364742f864ded7038e3520d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 13:26:30 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 26 Nov 2024 08:26:30 -0500 Subject: [Git][ghc/ghc][master] rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack Message-ID: <6745cc8626e0d_6f8e80760437842@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00 rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin to align it with aarch64-darwin. This allows us to get rid of the horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing linker warnings and testsuite failures on macOS 15. Fixes #25504. - - - - - 3 changed files: - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - rts/rts.cabal Changes: ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -444,7 +444,7 @@ opsysVariables AArch64 (Darwin {}) = ] opsysVariables Amd64 (Darwin {}) = mconcat [ "NIX_SYSTEM" =: "x86_64-darwin" - , "MACOSX_DEPLOYMENT_TARGET" =: "10.13" + , "MACOSX_DEPLOYMENT_TARGET" =: "11.0" -- "# Only Sierra and onwards supports clock_gettime. See #12858" , "ac_cv_func_clock_gettime" =: "no" -- # Only newer OS Xs support utimensat. See #17895 ===================================== .gitlab/jobs.yaml ===================================== @@ -1072,7 +1072,7 @@ "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "LANG": "en_US.UTF-8", - "MACOSX_DEPLOYMENT_TARGET": "10.13", + "MACOSX_DEPLOYMENT_TARGET": "11.0", "NIX_SYSTEM": "x86_64-darwin", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-darwin-validate", @@ -3834,7 +3834,7 @@ "IGNORE_PERF_FAILURES": "all", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "LANG": "en_US.UTF-8", - "MACOSX_DEPLOYMENT_TARGET": "10.13", + "MACOSX_DEPLOYMENT_TARGET": "11.0", "NIX_SYSTEM": "x86_64-darwin", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-darwin-release", @@ -5213,7 +5213,7 @@ "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "LANG": "en_US.UTF-8", - "MACOSX_DEPLOYMENT_TARGET": "10.13", + "MACOSX_DEPLOYMENT_TARGET": "11.0", "NIX_SYSTEM": "x86_64-darwin", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-darwin-validate", ===================================== rts/rts.cabal ===================================== @@ -332,8 +332,6 @@ library if os(osx) ld-options: "-Wl,-search_paths_first" - -- See Note [fd_set_overflow] - "-Wl,-U,___darwin_check_fd_set_overflow" -- See Note [Undefined symbols in the RTS] "-Wl,-undefined,dynamic_lookup" if !arch(x86_64) && !arch(aarch64) @@ -549,48 +547,6 @@ library -- We don't want to compile posix/ticker/*.c, these will be #included -- from Ticker.c - --- Note [fd_set_overflow] --- ~~~~~~~~~~~~~~~~~~~~~~ --- In this note is the very sad tale of __darwin_fd_set_overflow. --- The 8.10.5 release was broken because it was built in an environment --- where the libraries were provided by XCode 12.*, these libraries introduced --- a reference to __darwin_fd_set_overflow via the FD_SET macro which is used in --- Select.c. Unfortunately, this symbol is not available with XCode 11.* which --- led to a linker error when trying to link anything. This is almost certainly --- a bug in XCode but we still have to work around it. - --- Undefined symbols for architecture x86_64: --- "___darwin_check_fd_set_overflow", referenced from: --- _awaitEvent in libHSrts.a(Select.o) --- ld: symbol(s) not found for architecture x86_64 - --- One way to fix this is to upgrade your version of xcode, but this would --- force the upgrade on users prematurely. Fortunately it also seems safe to pass --- the linker option "-Wl,-U,___darwin_check_fd_set_overflow" because the usage of --- the symbol is guarded by a guard to check if it's defined. - --- __header_always_inline int --- __darwin_check_fd_set(int _a, const void *_b) --- { --- if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) { ---#if defined(_DARWIN_UNLIMITED_SELECT) || defined(_DARWIN_C_SOURCE) --- return __darwin_check_fd_set_overflow(_a, _b, 1); ---#else --- return __darwin_check_fd_set_overflow(_a, _b, 0); ---#endif --- } else { --- return 1; --- } ---} - --- Across the internet there are many other reports of this issue --- See: https://github.com/mono/mono/issues/19393 --- , https://github.com/sitsofe/fio/commit/b6a1e63a1ff607692a3caf3c2db2c3d575ba2320 - --- The issue was originally reported in #19950 - - -- Note [Undefined symbols in the RTS] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- The RTS is built with a number of `-u` flags. This is to handle cyclic View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88c4fe1d8a3bdbedf3972fde12f663a974cc2191 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/88c4fe1d8a3bdbedf3972fde12f663a974cc2191 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 13:57:23 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 26 Nov 2024 08:57:23 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Clarify INLINE unfolding optimization docs. Message-ID: <6745d3c35e360_6f8ef10aa4413b2@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00 Clarify INLINE unfolding optimization docs. Fixes #24660 - - - - - 88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00 rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin to align it with aarch64-darwin. This allows us to get rid of the horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing linker warnings and testsuite failures on macOS 15. Fixes #25504. - - - - - 5e0649cb by doyougnu at 2024-11-26T08:57:03-05:00 ghc-experimental: expose GHC.RTS.Flags, GHC.Stats See this CLC proposal: - https://github.com/haskell/core-libraries-committee/issues/289 and this CLC proposal for background: - https://github.com/haskell/core-libraries-committee/issues/288 Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 8522f16f by Wang Xin at 2024-11-26T08:57:08-05:00 Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform With the Medium code model, the jump range of the generated jump instruction is larger than that of the Small code model. It's a temporary fix of the problem descriped in https://gitlab.haskell .org/ghc/ghc/-/issues/25495. This commit requires that the LLVM used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c6679 83e1baf05, i.e., version 8.0 and later. Actually we should not rely on LLVM, so the only way to solve this problem is to implement the LoongArch backend. Add new type for codemodel - - - - - 11 changed files: - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - compiler/GHC/CmmToLlvm.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/pragmas.rst - libraries/ghc-experimental/ghc-experimental.cabal.in - + libraries/ghc-experimental/src/GHC/RTS/Flags/Experimental.hs - + libraries/ghc-experimental/src/GHC/Stats/Experimental.hs - rts/rts.cabal - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 Changes: ===================================== .gitlab/generate-ci/gen_ci.hs ===================================== @@ -444,7 +444,7 @@ opsysVariables AArch64 (Darwin {}) = ] opsysVariables Amd64 (Darwin {}) = mconcat [ "NIX_SYSTEM" =: "x86_64-darwin" - , "MACOSX_DEPLOYMENT_TARGET" =: "10.13" + , "MACOSX_DEPLOYMENT_TARGET" =: "11.0" -- "# Only Sierra and onwards supports clock_gettime. See #12858" , "ac_cv_func_clock_gettime" =: "no" -- # Only newer OS Xs support utimensat. See #17895 ===================================== .gitlab/jobs.yaml ===================================== @@ -1072,7 +1072,7 @@ "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "LANG": "en_US.UTF-8", - "MACOSX_DEPLOYMENT_TARGET": "10.13", + "MACOSX_DEPLOYMENT_TARGET": "11.0", "NIX_SYSTEM": "x86_64-darwin", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-darwin-validate", @@ -3834,7 +3834,7 @@ "IGNORE_PERF_FAILURES": "all", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "LANG": "en_US.UTF-8", - "MACOSX_DEPLOYMENT_TARGET": "10.13", + "MACOSX_DEPLOYMENT_TARGET": "11.0", "NIX_SYSTEM": "x86_64-darwin", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-darwin-release", @@ -5213,7 +5213,7 @@ "HADRIAN_ARGS": "--docs=no-sphinx-pdfs", "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check", "LANG": "en_US.UTF-8", - "MACOSX_DEPLOYMENT_TARGET": "10.13", + "MACOSX_DEPLOYMENT_TARGET": "11.0", "NIX_SYSTEM": "x86_64-darwin", "RUNTEST_ARGS": "", "TEST_ENV": "x86_64-darwin-validate", ===================================== compiler/GHC/CmmToLlvm.hs ===================================== @@ -221,7 +221,12 @@ cmmMetaLlvmPrelude = do case platformArch platform of ArchX86_64 | llvmCgAvxEnabled cfg -> [mkStackAlignmentMeta 32] _ -> [] - module_flags_metas <- mkModuleFlagsMeta stack_alignment_metas + let codel_model_metas = + case platformArch platform of + -- FIXME: We should not rely on LLVM + ArchLoongArch64 -> [mkCodeModelMeta CMMedium] + _ -> [] + module_flags_metas <- mkModuleFlagsMeta (stack_alignment_metas ++ codel_model_metas) let metas = tbaa_metas ++ module_flags_metas cfg <- getConfig renderLlvm (ppLlvmMetas cfg metas) @@ -244,6 +249,15 @@ mkStackAlignmentMeta :: Integer -> ModuleFlag mkStackAlignmentMeta alignment = ModuleFlag MFBError "override-stack-alignment" (MetaLit $ LMIntLit alignment i32) +-- LLVM's @LLVM::CodeModel::Model@ enumeration +data CodeModel = CMMedium + +-- Pass -mcmodel=medium option to LLVM on LoongArch64 +mkCodeModelMeta :: CodeModel -> ModuleFlag +mkCodeModelMeta codemodel = + ModuleFlag MFBError "Code Model" (MetaLit $ LMIntLit n i32) + where + n = case codemodel of CMMedium -> 3 -- as of LLVM 8 -- ----------------------------------------------------------------------------- -- | Marks variables as used where necessary ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -58,6 +58,16 @@ Cmm ``ghc-experimental`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- ``ghc-experimental`` now exposes ``GHC.RTS.Flags`` and ``GHC.Stats`` as + ``GHC.RTS.Flags.Experimental`` and ``GHC.Stats.Experimental``. These are + *also* exposed in ``base``, however the ``base`` versions will be deprecated as + part of the split base project. See `CLC proposal 289 + `__. + Downstream consumers of these flags are encouraged to migrate to the + ``ghc-experimental`` versions. + + + ``template-haskell`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== docs/users_guide/exts/pragmas.rst ===================================== @@ -393,12 +393,15 @@ has a number of other effects: pragmas is to expose functions in ``f``\'s RHS that have rewrite rules, and it's no good if those functions have been optimised away. - So *GHC guarantees to inline precisely the code that you wrote*, no - more and no less. It does this by capturing a copy of the definition + So *GHC guarantees to behave precisely as if it inlined the code that you wrote*. + It does this by capturing a copy of the definition of the function to use for inlining (we call this the "inline-RHS"), - which it leaves untouched, while optimising the ordinarily RHS as - usual. For externally-visible functions the inline-RHS (not the - optimised RHS) is recorded in the interface file. + which it only optimizes in ways which don't break this promise. + For example if inlining is explicitly delayed through phase control GHC will + apply optimizations which happen before the ``INLINE`` pragma becomes + active to the inline-RHS while optimising the ordinarily RHS as usual. + For externally-visible functions + the inline-RHS (not the optimised RHS) is recorded in the interface file. - An ``INLINE`` function is not worker/wrappered by strictness analysis. It's going to be inlined wholesale instead. ===================================== libraries/ghc-experimental/ghc-experimental.cabal.in ===================================== @@ -35,6 +35,8 @@ library GHC.Profiling.Eras GHC.TypeLits.Experimental GHC.TypeNats.Experimental + GHC.RTS.Flags.Experimental + GHC.Stats.Experimental Prelude.Experimental if arch(wasm32) exposed-modules: GHC.Wasm.Prim ===================================== libraries/ghc-experimental/src/GHC/RTS/Flags/Experimental.hs ===================================== @@ -0,0 +1,54 @@ +-- | +-- Module : GHC.RTS.Flags.Experimental +-- Copyright : (c) The University of Glasgow, 1994-2000 +-- License : see libraries/ghc-experimental/LICENSE +-- +-- Maintainer : ghc-devs at haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- /The API of this module is unstable and is coupled to GHC's internals./ As +-- such if you depend on it, you should expect to follow GHC's releases. This +-- API could change without warning. +-- +-- Descriptions of flags can be seen in +-- , +-- or by running RTS help message using @+RTS --help at . +-- +-- + +module GHC.RTS.Flags.Experimental + ( RtsTime + , RTSFlags (..) + , GiveGCStats (..) + , GCFlags (..) + , ConcFlags (..) + , MiscFlags (..) + , IoManagerFlag (..) + , DebugFlags (..) + , DoCostCentres (..) + , CCFlags (..) + , DoHeapProfile (..) + , ProfFlags (..) + , DoTrace (..) + , TraceFlags (..) + , TickyFlags (..) + , ParFlags (..) + , HpcFlags (..) + , {-# DEPRECATED "import GHC.IO.SubSystem (IoSubSystem (..))" #-} + IoSubSystem (..) + , getRTSFlags + , getGCFlags + , getConcFlags + , getMiscFlags + , getDebugFlags + , getCCFlags + , getProfFlags + , getTraceFlags + , getTickyFlags + , getParFlags + , getHpcFlags + ) where + +import GHC.Internal.RTS.Flags +import GHC.Internal.IO.SubSystem (IoSubSystem(..)) ===================================== libraries/ghc-experimental/src/GHC/Stats/Experimental.hs ===================================== @@ -0,0 +1,27 @@ +{-# LANGUAGE Safe #-} + +-- | +-- Module : RTS.Stats.Experimental +-- Copyright : (c) The University of Glasgow, 1994-2000 +-- License : see libraries/ghc-experimental/LICENSE +-- +-- Maintainer : ghc-devs at haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- This module provides access to internal garbage collection and +-- memory usage statistics. These statistics are not available unless +-- a program is run with the @-T@ RTS flag. +-- +-- /The API of this module is unstable and is coupled to GHC's internals./ As +-- such if you depend on it, you should expect to follow GHC's releases. This +-- API could change without warning. + +module GHC.Stats.Experimental + ( -- * Runtime statistics + RTSStats(..), GCDetails(..), RtsTime + , getRTSStats + , getRTSStatsEnabled + ) where + +import GHC.Internal.Stats ===================================== rts/rts.cabal ===================================== @@ -332,8 +332,6 @@ library if os(osx) ld-options: "-Wl,-search_paths_first" - -- See Note [fd_set_overflow] - "-Wl,-U,___darwin_check_fd_set_overflow" -- See Note [Undefined symbols in the RTS] "-Wl,-undefined,dynamic_lookup" if !arch(x86_64) && !arch(aarch64) @@ -549,48 +547,6 @@ library -- We don't want to compile posix/ticker/*.c, these will be #included -- from Ticker.c - --- Note [fd_set_overflow] --- ~~~~~~~~~~~~~~~~~~~~~~ --- In this note is the very sad tale of __darwin_fd_set_overflow. --- The 8.10.5 release was broken because it was built in an environment --- where the libraries were provided by XCode 12.*, these libraries introduced --- a reference to __darwin_fd_set_overflow via the FD_SET macro which is used in --- Select.c. Unfortunately, this symbol is not available with XCode 11.* which --- led to a linker error when trying to link anything. This is almost certainly --- a bug in XCode but we still have to work around it. - --- Undefined symbols for architecture x86_64: --- "___darwin_check_fd_set_overflow", referenced from: --- _awaitEvent in libHSrts.a(Select.o) --- ld: symbol(s) not found for architecture x86_64 - --- One way to fix this is to upgrade your version of xcode, but this would --- force the upgrade on users prematurely. Fortunately it also seems safe to pass --- the linker option "-Wl,-U,___darwin_check_fd_set_overflow" because the usage of --- the symbol is guarded by a guard to check if it's defined. - --- __header_always_inline int --- __darwin_check_fd_set(int _a, const void *_b) --- { --- if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) { ---#if defined(_DARWIN_UNLIMITED_SELECT) || defined(_DARWIN_C_SOURCE) --- return __darwin_check_fd_set_overflow(_a, _b, 1); ---#else --- return __darwin_check_fd_set_overflow(_a, _b, 0); ---#endif --- } else { --- return 1; --- } ---} - --- Across the internet there are many other reports of this issue --- See: https://github.com/mono/mono/issues/19393 --- , https://github.com/sitsofe/fio/commit/b6a1e63a1ff607692a3caf3c2db2c3d575ba2320 - --- The issue was originally reported in #19950 - - -- Note [Undefined symbols in the RTS] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- The RTS is built with a number of `-u` flags. This is to handle cyclic ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout ===================================== @@ -6155,6 +6155,157 @@ module GHC.Profiling.Eras where incrementUserEra :: GHC.Types.Word -> GHC.Types.IO GHC.Types.Word setUserEra :: GHC.Types.Word -> GHC.Types.IO () +module GHC.RTS.Flags.Experimental where + -- Safety: None + type CCFlags :: * + data CCFlags = CCFlags {doCostCentres :: DoCostCentres, profilerTicks :: GHC.Types.Int, msecsPerTick :: GHC.Types.Int} + type ConcFlags :: * + data ConcFlags = ConcFlags {ctxtSwitchTime :: RtsTime, ctxtSwitchTicks :: GHC.Types.Int} + type DebugFlags :: * + data DebugFlags = DebugFlags {scheduler :: GHC.Types.Bool, interpreter :: GHC.Types.Bool, weak :: GHC.Types.Bool, gccafs :: GHC.Types.Bool, gc :: GHC.Types.Bool, nonmoving_gc :: GHC.Types.Bool, block_alloc :: GHC.Types.Bool, sanity :: GHC.Types.Bool, stable :: GHC.Types.Bool, prof :: GHC.Types.Bool, linker :: GHC.Types.Bool, apply :: GHC.Types.Bool, stm :: GHC.Types.Bool, squeeze :: GHC.Types.Bool, hpc :: GHC.Types.Bool, sparks :: GHC.Types.Bool} + type DoCostCentres :: * + data DoCostCentres = CostCentresNone | CostCentresSummary | CostCentresVerbose | CostCentresAll | CostCentresJSON + type DoHeapProfile :: * + data DoHeapProfile = NoHeapProfiling | HeapByCCS | HeapByMod | HeapByDescr | HeapByType | HeapByRetainer | HeapByLDV | HeapByClosureType | HeapByInfoTable | HeapByEra + type DoTrace :: * + data DoTrace = TraceNone | TraceEventLog | TraceStderr + type GCFlags :: * + data GCFlags + = GCFlags {statsFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath, + giveStats :: GiveGCStats, + maxStkSize :: GHC.Internal.Word.Word32, + initialStkSize :: GHC.Internal.Word.Word32, + stkChunkSize :: GHC.Internal.Word.Word32, + stkChunkBufferSize :: GHC.Internal.Word.Word32, + maxHeapSize :: GHC.Internal.Word.Word32, + minAllocAreaSize :: GHC.Internal.Word.Word32, + largeAllocLim :: GHC.Internal.Word.Word32, + nurseryChunkSize :: GHC.Internal.Word.Word32, + minOldGenSize :: GHC.Internal.Word.Word32, + heapSizeSuggestion :: GHC.Internal.Word.Word32, + heapSizeSuggestionAuto :: GHC.Types.Bool, + oldGenFactor :: GHC.Types.Double, + returnDecayFactor :: GHC.Types.Double, + pcFreeHeap :: GHC.Types.Double, + generations :: GHC.Internal.Word.Word32, + squeezeUpdFrames :: GHC.Types.Bool, + compact :: GHC.Types.Bool, + compactThreshold :: GHC.Types.Double, + sweep :: GHC.Types.Bool, + ringBell :: GHC.Types.Bool, + idleGCDelayTime :: RtsTime, + doIdleGC :: GHC.Types.Bool, + heapBase :: GHC.Types.Word, + allocLimitGrace :: GHC.Types.Word, + numa :: GHC.Types.Bool, + numaMask :: GHC.Types.Word} + type GiveGCStats :: * + data GiveGCStats = NoGCStats | CollectGCStats | OneLineGCStats | SummaryGCStats | VerboseGCStats + type HpcFlags :: * + data HpcFlags = HpcFlags {readTixFile :: GHC.Types.Bool, writeTixFile :: GHC.Types.Bool} + type IoManagerFlag :: * + data IoManagerFlag = IoManagerFlagAuto | IoManagerFlagSelect | IoManagerFlagMIO | IoManagerFlagWinIO | IoManagerFlagWin32Legacy + type IoSubSystem :: * + data IoSubSystem = IoPOSIX | IoNative + type MiscFlags :: * + data MiscFlags = MiscFlags {tickInterval :: RtsTime, installSignalHandlers :: GHC.Types.Bool, installSEHHandlers :: GHC.Types.Bool, generateCrashDumpFile :: GHC.Types.Bool, generateStackTrace :: GHC.Types.Bool, machineReadable :: GHC.Types.Bool, disableDelayedOsMemoryReturn :: GHC.Types.Bool, internalCounters :: GHC.Types.Bool, linkerAlwaysPic :: GHC.Types.Bool, linkerMemBase :: GHC.Types.Word, ioManager :: IoManagerFlag, numIoWorkerThreads :: GHC.Internal.Word.Word32} + type ParFlags :: * + data ParFlags = ParFlags {nCapabilities :: GHC.Internal.Word.Word32, migrate :: GHC.Types.Bool, maxLocalSparks :: GHC.Internal.Word.Word32, parGcEnabled :: GHC.Types.Bool, parGcGen :: GHC.Internal.Word.Word32, parGcLoadBalancingEnabled :: GHC.Types.Bool, parGcLoadBalancingGen :: GHC.Internal.Word.Word32, parGcNoSyncWithIdle :: GHC.Internal.Word.Word32, parGcThreads :: GHC.Internal.Word.Word32, setAffinity :: GHC.Types.Bool} + type ProfFlags :: * + data ProfFlags + = ProfFlags {doHeapProfile :: DoHeapProfile, + heapProfileInterval :: RtsTime, + heapProfileIntervalTicks :: GHC.Types.Word, + startHeapProfileAtStartup :: GHC.Types.Bool, + startTimeProfileAtStartup :: GHC.Types.Bool, + showCCSOnException :: GHC.Types.Bool, + automaticEraIncrement :: GHC.Types.Bool, + maxRetainerSetSize :: GHC.Types.Word, + ccsLength :: GHC.Types.Word, + modSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + descrSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + typeSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccsSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + retainerSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + bioSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + eraSelector :: GHC.Types.Word} + type RTSFlags :: * + data RTSFlags = RTSFlags {gcFlags :: GCFlags, concurrentFlags :: ConcFlags, miscFlags :: MiscFlags, debugFlags :: DebugFlags, costCentreFlags :: CCFlags, profilingFlags :: ProfFlags, traceFlags :: TraceFlags, tickyFlags :: TickyFlags, parFlags :: ParFlags, hpcFlags :: HpcFlags} + type RtsTime :: * + type RtsTime = GHC.Internal.Word.Word64 + type TickyFlags :: * + data TickyFlags = TickyFlags {showTickyStats :: GHC.Types.Bool, tickyFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath} + type TraceFlags :: * + data TraceFlags = TraceFlags {tracing :: DoTrace, timestamp :: GHC.Types.Bool, traceScheduler :: GHC.Types.Bool, traceGc :: GHC.Types.Bool, traceNonmovingGc :: GHC.Types.Bool, sparksSampled :: GHC.Types.Bool, sparksFull :: GHC.Types.Bool, user :: GHC.Types.Bool} + getCCFlags :: GHC.Types.IO CCFlags + getConcFlags :: GHC.Types.IO ConcFlags + getDebugFlags :: GHC.Types.IO DebugFlags + getGCFlags :: GHC.Types.IO GCFlags + getHpcFlags :: GHC.Types.IO HpcFlags + getMiscFlags :: GHC.Types.IO MiscFlags + getParFlags :: GHC.Types.IO ParFlags + getProfFlags :: GHC.Types.IO ProfFlags + getRTSFlags :: GHC.Types.IO RTSFlags + getTickyFlags :: GHC.Types.IO TickyFlags + getTraceFlags :: GHC.Types.IO TraceFlags + +module GHC.Stats.Experimental where + -- Safety: Safe + type GCDetails :: * + data GCDetails + = GCDetails {gcdetails_gen :: GHC.Internal.Word.Word32, + gcdetails_threads :: GHC.Internal.Word.Word32, + gcdetails_allocated_bytes :: GHC.Internal.Word.Word64, + gcdetails_live_bytes :: GHC.Internal.Word.Word64, + gcdetails_large_objects_bytes :: GHC.Internal.Word.Word64, + gcdetails_compact_bytes :: GHC.Internal.Word.Word64, + gcdetails_slop_bytes :: GHC.Internal.Word.Word64, + gcdetails_mem_in_use_bytes :: GHC.Internal.Word.Word64, + gcdetails_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_max_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_block_fragmentation_bytes :: GHC.Internal.Word.Word64, + gcdetails_sync_elapsed_ns :: RtsTime, + gcdetails_cpu_ns :: RtsTime, + gcdetails_elapsed_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_cpu_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_elapsed_ns :: RtsTime} + type RTSStats :: * + data RTSStats + = RTSStats {gcs :: GHC.Internal.Word.Word32, + major_gcs :: GHC.Internal.Word.Word32, + allocated_bytes :: GHC.Internal.Word.Word64, + max_live_bytes :: GHC.Internal.Word.Word64, + max_large_objects_bytes :: GHC.Internal.Word.Word64, + max_compact_bytes :: GHC.Internal.Word.Word64, + max_slop_bytes :: GHC.Internal.Word.Word64, + max_mem_in_use_bytes :: GHC.Internal.Word.Word64, + cumulative_live_bytes :: GHC.Internal.Word.Word64, + copied_bytes :: GHC.Internal.Word.Word64, + par_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_max_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + init_cpu_ns :: RtsTime, + init_elapsed_ns :: RtsTime, + mutator_cpu_ns :: RtsTime, + mutator_elapsed_ns :: RtsTime, + gc_cpu_ns :: RtsTime, + gc_elapsed_ns :: RtsTime, + cpu_ns :: RtsTime, + elapsed_ns :: RtsTime, + nonmoving_gc_sync_cpu_ns :: RtsTime, + nonmoving_gc_sync_elapsed_ns :: RtsTime, + nonmoving_gc_sync_max_elapsed_ns :: RtsTime, + nonmoving_gc_cpu_ns :: RtsTime, + nonmoving_gc_elapsed_ns :: RtsTime, + nonmoving_gc_max_elapsed_ns :: RtsTime, + gc :: GCDetails} + type RtsTime :: * + type RtsTime = GHC.Internal.Int.Int64 + getRTSStats :: GHC.Types.IO RTSStats + getRTSStatsEnabled :: GHC.Types.IO GHC.Types.Bool + module GHC.TypeLits.Experimental where -- Safety: Safe-Inferred appendSSymbol :: forall (a :: GHC.Types.Symbol) (b :: GHC.Types.Symbol). GHC.Internal.TypeLits.SSymbol a -> GHC.Internal.TypeLits.SSymbol b -> GHC.Internal.TypeLits.SSymbol (GHC.Internal.TypeLits.AppendSymbol a b) @@ -10558,9 +10709,31 @@ instance forall a. GHC.Internal.Data.String.IsString a => GHC.Internal.Data.Stri instance forall a. (a ~ GHC.Types.Char) => GHC.Internal.Data.String.IsString [a] -- Defined in ‘GHC.Internal.Data.String’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. (GHC.Internal.Enum.Enum a, GHC.Internal.Enum.Bounded a, GHC.Classes.Eq a) => GHC.Internal.Enum.Enum (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Internal.IsList.IsList GHC.Internal.Stack.Types.CallStack -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList [a] -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.IsList’ @@ -10569,6 +10742,8 @@ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Functor.ZipList.ZipL instance forall a. GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ @@ -10576,6 +10751,24 @@ instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Inter instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.FunPtr a) -- Defined in ‘GHC.Internal.Ptr’ instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC.Internal.Ptr’ instance GHC.Internal.Show.Show GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Classes.Eq GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Double -- Defined in ‘GHC.Classes’ @@ -10610,6 +10803,8 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC. instance forall a. GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.Base.Void -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Classes.Eq GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Classes.Eq GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’ instance GHC.Classes.Ord GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Double -- Defined in ‘GHC.Classes’ ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 ===================================== @@ -6158,6 +6158,157 @@ module GHC.Profiling.Eras where incrementUserEra :: GHC.Types.Word -> GHC.Types.IO GHC.Types.Word setUserEra :: GHC.Types.Word -> GHC.Types.IO () +module GHC.RTS.Flags.Experimental where + -- Safety: None + type CCFlags :: * + data CCFlags = CCFlags {doCostCentres :: DoCostCentres, profilerTicks :: GHC.Types.Int, msecsPerTick :: GHC.Types.Int} + type ConcFlags :: * + data ConcFlags = ConcFlags {ctxtSwitchTime :: RtsTime, ctxtSwitchTicks :: GHC.Types.Int} + type DebugFlags :: * + data DebugFlags = DebugFlags {scheduler :: GHC.Types.Bool, interpreter :: GHC.Types.Bool, weak :: GHC.Types.Bool, gccafs :: GHC.Types.Bool, gc :: GHC.Types.Bool, nonmoving_gc :: GHC.Types.Bool, block_alloc :: GHC.Types.Bool, sanity :: GHC.Types.Bool, stable :: GHC.Types.Bool, prof :: GHC.Types.Bool, linker :: GHC.Types.Bool, apply :: GHC.Types.Bool, stm :: GHC.Types.Bool, squeeze :: GHC.Types.Bool, hpc :: GHC.Types.Bool, sparks :: GHC.Types.Bool} + type DoCostCentres :: * + data DoCostCentres = CostCentresNone | CostCentresSummary | CostCentresVerbose | CostCentresAll | CostCentresJSON + type DoHeapProfile :: * + data DoHeapProfile = NoHeapProfiling | HeapByCCS | HeapByMod | HeapByDescr | HeapByType | HeapByRetainer | HeapByLDV | HeapByClosureType | HeapByInfoTable | HeapByEra + type DoTrace :: * + data DoTrace = TraceNone | TraceEventLog | TraceStderr + type GCFlags :: * + data GCFlags + = GCFlags {statsFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath, + giveStats :: GiveGCStats, + maxStkSize :: GHC.Internal.Word.Word32, + initialStkSize :: GHC.Internal.Word.Word32, + stkChunkSize :: GHC.Internal.Word.Word32, + stkChunkBufferSize :: GHC.Internal.Word.Word32, + maxHeapSize :: GHC.Internal.Word.Word32, + minAllocAreaSize :: GHC.Internal.Word.Word32, + largeAllocLim :: GHC.Internal.Word.Word32, + nurseryChunkSize :: GHC.Internal.Word.Word32, + minOldGenSize :: GHC.Internal.Word.Word32, + heapSizeSuggestion :: GHC.Internal.Word.Word32, + heapSizeSuggestionAuto :: GHC.Types.Bool, + oldGenFactor :: GHC.Types.Double, + returnDecayFactor :: GHC.Types.Double, + pcFreeHeap :: GHC.Types.Double, + generations :: GHC.Internal.Word.Word32, + squeezeUpdFrames :: GHC.Types.Bool, + compact :: GHC.Types.Bool, + compactThreshold :: GHC.Types.Double, + sweep :: GHC.Types.Bool, + ringBell :: GHC.Types.Bool, + idleGCDelayTime :: RtsTime, + doIdleGC :: GHC.Types.Bool, + heapBase :: GHC.Types.Word, + allocLimitGrace :: GHC.Types.Word, + numa :: GHC.Types.Bool, + numaMask :: GHC.Types.Word} + type GiveGCStats :: * + data GiveGCStats = NoGCStats | CollectGCStats | OneLineGCStats | SummaryGCStats | VerboseGCStats + type HpcFlags :: * + data HpcFlags = HpcFlags {readTixFile :: GHC.Types.Bool, writeTixFile :: GHC.Types.Bool} + type IoManagerFlag :: * + data IoManagerFlag = IoManagerFlagAuto | IoManagerFlagSelect | IoManagerFlagMIO | IoManagerFlagWinIO | IoManagerFlagWin32Legacy + type IoSubSystem :: * + data IoSubSystem = IoPOSIX | IoNative + type MiscFlags :: * + data MiscFlags = MiscFlags {tickInterval :: RtsTime, installSignalHandlers :: GHC.Types.Bool, installSEHHandlers :: GHC.Types.Bool, generateCrashDumpFile :: GHC.Types.Bool, generateStackTrace :: GHC.Types.Bool, machineReadable :: GHC.Types.Bool, disableDelayedOsMemoryReturn :: GHC.Types.Bool, internalCounters :: GHC.Types.Bool, linkerAlwaysPic :: GHC.Types.Bool, linkerMemBase :: GHC.Types.Word, ioManager :: IoManagerFlag, numIoWorkerThreads :: GHC.Internal.Word.Word32} + type ParFlags :: * + data ParFlags = ParFlags {nCapabilities :: GHC.Internal.Word.Word32, migrate :: GHC.Types.Bool, maxLocalSparks :: GHC.Internal.Word.Word32, parGcEnabled :: GHC.Types.Bool, parGcGen :: GHC.Internal.Word.Word32, parGcLoadBalancingEnabled :: GHC.Types.Bool, parGcLoadBalancingGen :: GHC.Internal.Word.Word32, parGcNoSyncWithIdle :: GHC.Internal.Word.Word32, parGcThreads :: GHC.Internal.Word.Word32, setAffinity :: GHC.Types.Bool} + type ProfFlags :: * + data ProfFlags + = ProfFlags {doHeapProfile :: DoHeapProfile, + heapProfileInterval :: RtsTime, + heapProfileIntervalTicks :: GHC.Types.Word, + startHeapProfileAtStartup :: GHC.Types.Bool, + startTimeProfileAtStartup :: GHC.Types.Bool, + showCCSOnException :: GHC.Types.Bool, + automaticEraIncrement :: GHC.Types.Bool, + maxRetainerSetSize :: GHC.Types.Word, + ccsLength :: GHC.Types.Word, + modSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + descrSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + typeSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccsSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + retainerSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + bioSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + eraSelector :: GHC.Types.Word} + type RTSFlags :: * + data RTSFlags = RTSFlags {gcFlags :: GCFlags, concurrentFlags :: ConcFlags, miscFlags :: MiscFlags, debugFlags :: DebugFlags, costCentreFlags :: CCFlags, profilingFlags :: ProfFlags, traceFlags :: TraceFlags, tickyFlags :: TickyFlags, parFlags :: ParFlags, hpcFlags :: HpcFlags} + type RtsTime :: * + type RtsTime = GHC.Internal.Word.Word64 + type TickyFlags :: * + data TickyFlags = TickyFlags {showTickyStats :: GHC.Types.Bool, tickyFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath} + type TraceFlags :: * + data TraceFlags = TraceFlags {tracing :: DoTrace, timestamp :: GHC.Types.Bool, traceScheduler :: GHC.Types.Bool, traceGc :: GHC.Types.Bool, traceNonmovingGc :: GHC.Types.Bool, sparksSampled :: GHC.Types.Bool, sparksFull :: GHC.Types.Bool, user :: GHC.Types.Bool} + getCCFlags :: GHC.Types.IO CCFlags + getConcFlags :: GHC.Types.IO ConcFlags + getDebugFlags :: GHC.Types.IO DebugFlags + getGCFlags :: GHC.Types.IO GCFlags + getHpcFlags :: GHC.Types.IO HpcFlags + getMiscFlags :: GHC.Types.IO MiscFlags + getParFlags :: GHC.Types.IO ParFlags + getProfFlags :: GHC.Types.IO ProfFlags + getRTSFlags :: GHC.Types.IO RTSFlags + getTickyFlags :: GHC.Types.IO TickyFlags + getTraceFlags :: GHC.Types.IO TraceFlags + +module GHC.Stats.Experimental where + -- Safety: Safe + type GCDetails :: * + data GCDetails + = GCDetails {gcdetails_gen :: GHC.Internal.Word.Word32, + gcdetails_threads :: GHC.Internal.Word.Word32, + gcdetails_allocated_bytes :: GHC.Internal.Word.Word64, + gcdetails_live_bytes :: GHC.Internal.Word.Word64, + gcdetails_large_objects_bytes :: GHC.Internal.Word.Word64, + gcdetails_compact_bytes :: GHC.Internal.Word.Word64, + gcdetails_slop_bytes :: GHC.Internal.Word.Word64, + gcdetails_mem_in_use_bytes :: GHC.Internal.Word.Word64, + gcdetails_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_max_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_block_fragmentation_bytes :: GHC.Internal.Word.Word64, + gcdetails_sync_elapsed_ns :: RtsTime, + gcdetails_cpu_ns :: RtsTime, + gcdetails_elapsed_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_cpu_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_elapsed_ns :: RtsTime} + type RTSStats :: * + data RTSStats + = RTSStats {gcs :: GHC.Internal.Word.Word32, + major_gcs :: GHC.Internal.Word.Word32, + allocated_bytes :: GHC.Internal.Word.Word64, + max_live_bytes :: GHC.Internal.Word.Word64, + max_large_objects_bytes :: GHC.Internal.Word.Word64, + max_compact_bytes :: GHC.Internal.Word.Word64, + max_slop_bytes :: GHC.Internal.Word.Word64, + max_mem_in_use_bytes :: GHC.Internal.Word.Word64, + cumulative_live_bytes :: GHC.Internal.Word.Word64, + copied_bytes :: GHC.Internal.Word.Word64, + par_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_max_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + init_cpu_ns :: RtsTime, + init_elapsed_ns :: RtsTime, + mutator_cpu_ns :: RtsTime, + mutator_elapsed_ns :: RtsTime, + gc_cpu_ns :: RtsTime, + gc_elapsed_ns :: RtsTime, + cpu_ns :: RtsTime, + elapsed_ns :: RtsTime, + nonmoving_gc_sync_cpu_ns :: RtsTime, + nonmoving_gc_sync_elapsed_ns :: RtsTime, + nonmoving_gc_sync_max_elapsed_ns :: RtsTime, + nonmoving_gc_cpu_ns :: RtsTime, + nonmoving_gc_elapsed_ns :: RtsTime, + nonmoving_gc_max_elapsed_ns :: RtsTime, + gc :: GCDetails} + type RtsTime :: * + type RtsTime = GHC.Internal.Int.Int64 + getRTSStats :: GHC.Types.IO RTSStats + getRTSStatsEnabled :: GHC.Types.IO GHC.Types.Bool + module GHC.TypeLits.Experimental where -- Safety: Safe-Inferred appendSSymbol :: forall (a :: GHC.Types.Symbol) (b :: GHC.Types.Symbol). GHC.Internal.TypeLits.SSymbol a -> GHC.Internal.TypeLits.SSymbol b -> GHC.Internal.TypeLits.SSymbol (GHC.Internal.TypeLits.AppendSymbol a b) @@ -10561,9 +10712,31 @@ instance forall a. GHC.Internal.Data.String.IsString a => GHC.Internal.Data.Stri instance forall a. (a ~ GHC.Types.Char) => GHC.Internal.Data.String.IsString [a] -- Defined in ‘GHC.Internal.Data.String’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. (GHC.Internal.Enum.Enum a, GHC.Internal.Enum.Bounded a, GHC.Classes.Eq a) => GHC.Internal.Enum.Enum (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Internal.IsList.IsList GHC.Internal.Stack.Types.CallStack -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList [a] -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.IsList’ @@ -10572,6 +10745,8 @@ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Functor.ZipList.ZipL instance forall a. GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ @@ -10579,6 +10754,24 @@ instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Inter instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.FunPtr a) -- Defined in ‘GHC.Internal.Ptr’ instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC.Internal.Ptr’ instance GHC.Internal.Show.Show GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Classes.Eq GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Double -- Defined in ‘GHC.Classes’ @@ -10613,6 +10806,8 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC. instance forall a. GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.Base.Void -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Classes.Eq GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Classes.Eq GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’ instance GHC.Classes.Ord GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Double -- Defined in ‘GHC.Classes’ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b5bd6dd6c4b02507de6a71cbd153855b714b5525...8522f16f0e1de5601d1ca60b16b1e82f941f04bd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b5bd6dd6c4b02507de6a71cbd153855b714b5525...8522f16f0e1de5601d1ca60b16b1e82f941f04bd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 14:36:56 2024 From: gitlab at gitlab.haskell.org (Sjoerd Visscher (@trac-sjoerd_visscher)) Date: Tue, 26 Nov 2024 09:36:56 -0500 Subject: [Git][ghc/ghc][wip/T18462] Multiplicity annotation on records Message-ID: <6745dd0839844_1bac5d28cc88335b2@gitlab.mail> Sjoerd Visscher pushed to branch wip/T18462 at Glasgow Haskell Compiler / GHC Commits: e8c9f759 by Sjoerd Visscher at 2024-11-26T15:36:43+01:00 Multiplicity annotation on records - - - - - 30 changed files: - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/PostProcess.hs - compiler/GHC/Rename/HsType.hs - compiler/GHC/Rename/Pat.hs - compiler/GHC/Tc/Gen/App.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/TyCl.hs - compiler/GHC/ThToHs.hs - compiler/Language/Haskell/Syntax/Type.hs - docs/users_guide/9.14.1-notes.rst - docs/users_guide/exts/linear_types.rst - testsuite/tests/ghc-api/exactprint/Test20239.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr - testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr - + testsuite/tests/linear/should_compile/NonLinearRecord.hs - testsuite/tests/linear/should_compile/all.T - + testsuite/tests/linear/should_fail/LinearRecFieldMany.hs - + testsuite/tests/linear/should_fail/LinearRecFieldMany.stderr - testsuite/tests/linear/should_fail/all.T - testsuite/tests/parser/should_compile/DumpParsedAst.stderr - testsuite/tests/parser/should_compile/DumpRenamedAst.stderr - testsuite/tests/parser/should_compile/DumpSemis.stderr - testsuite/tests/parser/should_compile/KindSigs.stderr - testsuite/tests/parser/should_compile/T14189.stderr - testsuite/tests/parser/should_compile/T15279.stderr - testsuite/tests/printer/T18791.stderr The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e8c9f759d0e5ceb9f0ace974243bea766c8fe7ff -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e8c9f759d0e5ceb9f0ace974243bea766c8fe7ff You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 15:09:32 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Tue, 26 Nov 2024 10:09:32 -0500 Subject: [Git][ghc/ghc][wip/T24744] 3 commits: JS: Basic cleanup for unused stuff to simplify things. Message-ID: <6745e4acbeaef_173d93bc4e422910@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: ab159771 by Serge S. Gulin at 2024-11-26T17:55:29+03:00 JS: Basic cleanup for unused stuff to simplify things. 1. Make `staticInitStat`, `staticDeclStat`, `allocUnboxedConStatic`, `allocateStaticList`, `jsStaticArg` local to modules. 2. Remove unused `hdRawStr`, `hdStrStr` from Haskell and JavaScript (`h$pstr`, `h$rstr`, `h$str`). 3. Introduce a special type `StaticAppKind` enumeration and `StaticApp` to represent boxed scalar static applications. Originally, StaticThunk supported to pass Maybe when it became Nothing for initializied thunks in an alternatie way but it is not used anymore. - - - - - 4f4ad9d6 by Serge S. Gulin at 2024-11-26T17:56:17+03:00 JS: Add trivial optimizations for `unpackCString` and `unpackCStringUtf8`. It became possible due of introduction strings unfloating at Sinker pass (#13185). Earns few more bytes at optimizations. - - - - - 59a558d7 by Serge S. Gulin at 2024-11-26T17:56:17+03:00 JS: Specialize unpackCString# CAFs (fixes #24744) Code analysis shown that such optimization would be possible out of the box if `cachedIdentForId` allowed to do that for Haskell `Id`s which are represented by few JavaScript `Ident`s. It is a usual for strings which are represented at JavaScript as a pair of 2 values: the string content and the offset where to start reading actual string from the full content. Usually offset is 0 but technically we need to allow such complex structures to be treated as "global". Enabling it there shown that `genToplevelRhs` and `globalOccs` had inaccuracies in their implementations: 1. `globalOccs` operated over JavaScript's `Ident`s but for complex structures it didn't pay attention to the fact that different Idents actually could be pointed to same Id. Now the algo is changed to calculate occurencies for Ids. 2. `genToplevelRhs` didn't assume that different Idents pointed to same Id can have mixed order of occurence. But actually the order is important. Strings are encoded into 2 variables where first is content and second is offset and their order are not interchangeable. It is fixed by regeneration Idents from collected Ids which is fine because all Idents generation is passed through the Cache and they are quasi-stable. - - - - - 17 changed files: - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/Arg.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Expr.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/StgToJS/Linker/Linker.hs - compiler/GHC/StgToJS/Monad.hs - compiler/GHC/StgToJS/Object.hs - compiler/GHC/StgToJS/Symbols.hs - compiler/GHC/StgToJS/Types.hs - rts/js/string.js - testsuite/tests/javascript/Makefile - testsuite/tests/javascript/T23479_1.hs → testsuite/tests/javascript/T23479.hs - testsuite/tests/javascript/T23479_1.stdout → testsuite/tests/javascript/T23479.stdout - testsuite/tests/javascript/T23479_2.hs → testsuite/tests/javascript/T24744.hs - testsuite/tests/javascript/T23479_2.stdout → testsuite/tests/javascript/T24744.stdout - testsuite/tests/javascript/all.T Changes: ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -100,7 +100,7 @@ genApp -> [StgArg] -> G (JStgStat, ExprResult) genApp ctx i args - -- Test case T23479_2 + -- Test case moved to T24744 -- See: https://github.com/ghcjs/ghcjs/blob/b7711fbca7c3f43a61f1dba526e6f2a2656ef44c/src/Gen2/Generator.hs#L876 -- Comment by Luite Stegeman -- Special cases for JSString literals. @@ -119,7 +119,7 @@ genApp ctx i args , [top] <- concatMap typex_expr (ctxTarget ctx) = (,ExprInline) . (|=) top . app hdDecodeUtf8Z <$> varsForId v - -- Test case T23479_1 + -- Test case T23479 | [StgLitArg (LitString bs)] <- args , Just d <- decodeModifiedUTF8 bs , idName i == unsafeUnpackJSStringUtf8ShShName @@ -157,6 +157,24 @@ genApp ctx i args , ExprInline ) + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringName + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | [StgLitArg (LitString bs)] <- args + , Just d <- decodeModifiedUTF8 bs + , idName i == unpackCStringUtf8Name + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + -- let-no-escape | Just n <- ctxLneBindingStackSize ctx i = do ===================================== compiler/GHC/StgToJS/Arg.hs ===================================== @@ -22,9 +22,6 @@ module GHC.StgToJS.Arg , genIdArgI , genIdStackArgI , allocConStatic - , allocUnboxedConStatic - , allocateStaticList - , jsStaticArg , jsStaticArgs ) where @@ -215,7 +212,7 @@ allocConStatic (identFS -> to) cc con args = do emitStatic to (StaticUnboxed $ StaticUnboxedBool True) cc' | otherwise = do e <- identFS <$> identForDataConWorker con - emitStatic to (StaticData e []) cc' + emitStatic to (StaticScalar $ StaticApp SAKData e []) cc' allocConStatic' cc' [x] | isUnboxableCon con = case x of @@ -234,7 +231,7 @@ allocConStatic (identFS -> to) cc con args = do _ -> panic "allocConStatic: invalid args for consDataCon" else do e <- identFS <$> identForDataConWorker con - emitStatic to (StaticData e xs) cc' + emitStatic to (StaticScalar $ StaticApp SAKData e xs) cc' -- | Allocate unboxed constructors allocUnboxedConStatic :: DataCon -> [StaticArg] -> StaticArg ===================================== compiler/GHC/StgToJS/CodeGen.hs ===================================== @@ -327,25 +327,26 @@ genToplevelRhs i rhs = case rhs of eid <- identForEntryId i idt <- identFS <$> identForId i body <- genBody (initExprCtx i) R2 args body typ - global_occs <- globalOccs body + lids <- globalOccs body + -- Regenerate idents from lids to restore right order of representatives. + -- Representatives have occurrence order which can be mixed. + lidents <- concat <$> traverse identsForId lids let eidt = identFS eid - let lidents = map global_ident global_occs - let lids = map global_id global_occs let lidents' = map identFS lidents CIStaticRefs sr0 <- genStaticRefsRhs rhs let sri = filter (`notElem` lidents') sr0 sr = CIStaticRefs sri et <- genEntryType args ll <- loadLiveFun lids - (static, regs, upd) <- + (appK, regs, upd) <- if et == CIThunk then do r <- updateThunk - pure (StaticThunk (Just (eidt, map StaticObjArg lidents')), CIRegs 0 [PtrV],r) - else return (StaticFun eidt (map StaticObjArg lidents'), - (if null lidents then CIRegs 1 (concatMap idJSRep args) - else CIRegs 0 (PtrV : concatMap idJSRep args)) - , mempty) + pure (SAKThunk, CIRegs 0 [PtrV], r) + else + let regs = if null lidents then CIRegs 1 (concatMap idJSRep args) + else CIRegs 0 (PtrV : concatMap idJSRep args) + in pure (SAKFun, regs, mempty) setcc <- ifProfiling $ if et == CIThunk then enterCostCentreThunk @@ -359,5 +360,5 @@ genToplevelRhs i rhs = case rhs of , ciStatic = sr } ccId <- costCentreStackLbl cc - emitStatic idt static ccId + emitStatic idt (StaticScalar $ StaticApp appK eidt $ map StaticObjArg lidents') ccId return $ (FuncStat eid [] (ll <> upd <> setcc <> body)) ===================================== compiler/GHC/StgToJS/Expr.hs ===================================== @@ -606,6 +606,32 @@ genCase ctx bnd e at alts l , ExprInline ) + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringName + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsStringA" [toJExpr d] + , ExprInline + ) + + | StgLit (LitString bs) <- e + , [GenStgAlt DEFAULT _ rhs] <- alts + , StgApp i args <- rhs + , idName i == unpackCStringUtf8Name + , [StgVarArg b'] <- args + , bnd == b' + , Just d <- decodeModifiedUTF8 bs + , [top] <- concatMap typex_expr (ctxTarget ctx) + = return + ( top |= app "h$toHsString" [toJExpr d] + , ExprInline + ) + | isInlineExpr e = do bndi <- identsForId bnd let ctx' = ctxSetTop bnd ===================================== compiler/GHC/StgToJS/Ids.hs ===================================== @@ -155,7 +155,7 @@ cachedIdentForId i mi id_type = do -- Now update the GlobalId cache, if required - let update_global_cache = isGlobalId i && isNothing mi && id_type == IdPlain + let update_global_cache = isGlobalId i && id_type == IdPlain -- fixme also allow caching entries for lifting? when (update_global_cache) $ do ===================================== compiler/GHC/StgToJS/Linker/Linker.hs ===================================== @@ -24,8 +24,6 @@ module GHC.StgToJS.Linker.Linker ( jsLinkBinary , jsLink , embedJsFile - , staticInitStat - , staticDeclStat , mkExportedFuns , mkExportedModFuns , computeLinkDependencies @@ -1253,27 +1251,22 @@ staticInitStat :: StaticInfo -> JS.JStat staticInitStat (StaticInfo i sv mcc) = jStgStatToJS $ case sv of - StaticData con args -> appS hdStiStr $ add_cc_arg - [ global i - , global con - , jsStaticArgs args - ] - StaticFun f args -> appS hdStiStr $ add_cc_arg - [ global i - , global f - , jsStaticArgs args - ] - StaticList args mt -> appS hdStlStr $ add_cc_arg - [ global i - , jsStaticArgs args - , toJExpr $ maybe null_ (toJExpr . TxtI) mt - ] - StaticThunk (Just (f,args)) -> appS hdStcStr $ add_cc_arg - [ global i - , global f - , jsStaticArgs args - ] - _ -> mempty + StaticScalar (StaticApp k app args) -> appS + (if k == SAKThunk then hdStcStr else hdStiStr) + $ add_cc_arg + [ global i + , global app + , jsStaticArgs args + ] + + StaticList args mt -> appS hdStlStr + $ add_cc_arg + [ global i + , jsStaticArgs args + , toJExpr $ maybe null_ (toJExpr . TxtI) mt + ] + + StaticUnboxed _ -> mempty where -- add optional cost-center argument add_cc_arg as = case mcc of @@ -1286,20 +1279,15 @@ staticDeclStat (StaticInfo global_name static_value _) = jStgStatToJS decl where global_ident = name global_name decl_init v = global_ident ||= v - decl_no_init = appS hdDiStr [toJExpr global_ident] decl = case static_value of StaticUnboxed u -> decl_init (unboxed_expr u) - StaticThunk Nothing -> decl_no_init -- CAF initialized in an alternative way _ -> decl_init (app hdDStr []) unboxed_expr = \case StaticUnboxedBool b -> app hdPStr [toJExpr b] StaticUnboxedInt i -> app hdPStr [toJExpr i] StaticUnboxedDouble d -> app hdPStr [toJExpr (unSaneDouble d)] - -- GHCJS used a function wrapper for this: - -- StaticUnboxedString str -> ApplExpr (initStr str) [] - -- But we are defining it statically for now. StaticUnboxedString str -> initStr str StaticUnboxedStringOffset {} -> 0 ===================================== compiler/GHC/StgToJS/Monad.hs ===================================== @@ -153,29 +153,28 @@ getGlobalIdCache = State.gets (ggsGlobalIdCache . gsGroup) setGlobalIdCache :: GlobalIdCache -> G () setGlobalIdCache v = State.modify (\s -> s { gsGroup = (gsGroup s) { ggsGlobalIdCache = v}}) - data GlobalOcc = GlobalOcc - { global_ident :: !Ident - , global_id :: !Id + { global_id :: !Id , global_count :: !Word } instance Outputable GlobalOcc where ppr g = hang (text "GlobalOcc") 2 $ vcat - [ hcat [text "Ident: ", ppr (global_ident g)] - , hcat [text "Id:", ppr (global_id g)] + [ hcat [text "Id:", ppr (global_id g)] , hcat [text "Count:", ppr (global_count g)] ] --- | Return number of occurrences of every global id used in the given JStgStat. +-- | Return occurrences of every global id used in the given JStgStat. -- Sort by increasing occurrence count. -globalOccs :: JStgStat -> G [GlobalOcc] +globalOccs :: JStgStat -> G [Id] globalOccs jst = do GlobalIdCache gidc <- getGlobalIdCache - -- build a map form Ident Unique to (Ident, Id, Count) + -- build a map form Ident Unique to (Id, Count) let cmp_cnt g1 g2 = compare (global_count g1) (global_count g2) inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 } + + go :: UniqFM Id GlobalOcc -> [Ident] -> [GlobalOcc] go gids = \case [] -> -- return global Ids used locally sorted by increased use L.sortBy cmp_cnt $ nonDetEltsUFM gids @@ -186,7 +185,7 @@ globalOccs jst = do Just (_k,gid) -> -- add it to the list of already found global ids. Increasing -- count by 1 - let g = GlobalOcc i gid 1 - in go (addToUFM_C inc gids i g) is + let g = GlobalOcc gid 1 + in go (addToUFM_C inc gids gid g) is - pure $ go emptyUFM (identsS jst) + pure $ map global_id $ go emptyUFM $ identsS jst ===================================== compiler/GHC/StgToJS/Object.hs ===================================== @@ -615,16 +615,16 @@ instance Binary StaticInfo where get bh = StaticInfo <$> get bh <*> get bh <*> get bh instance Binary StaticVal where - put_ bh (StaticFun f args) = putByte bh 1 >> put_ bh f >> put_ bh args - put_ bh (StaticThunk t) = putByte bh 2 >> put_ bh t - put_ bh (StaticUnboxed u) = putByte bh 3 >> put_ bh u - put_ bh (StaticData dc args) = putByte bh 4 >> put_ bh dc >> put_ bh args - put_ bh (StaticList xs t) = putByte bh 5 >> put_ bh xs >> put_ bh t + put_ bh (StaticScalar (StaticApp SAKFun f args)) = putByte bh 1 >> put_ bh f >> put_ bh args + put_ bh (StaticScalar (StaticApp SAKThunk f args)) = putByte bh 2 >> put_ bh f >> put_ bh args + put_ bh (StaticUnboxed u) = putByte bh 3 >> put_ bh u + put_ bh (StaticScalar (StaticApp SAKData dc args)) = putByte bh 4 >> put_ bh dc >> put_ bh args + put_ bh (StaticList xs t) = putByte bh 5 >> put_ bh xs >> put_ bh t get bh = getByte bh >>= \case - 1 -> StaticFun <$> get bh <*> get bh - 2 -> StaticThunk <$> get bh + 1 -> StaticScalar <$> (StaticApp SAKFun <$> get bh <*> get bh) + 2 -> StaticScalar <$> (StaticApp SAKThunk <$> get bh <*> get bh) 3 -> StaticUnboxed <$> get bh - 4 -> StaticData <$> get bh <*> get bh + 4 -> StaticScalar <$> (StaticApp SAKData <$> get bh <*> get bh) 5 -> StaticList <$> get bh <*> get bh n -> error ("Binary get bh StaticVal: invalid tag " ++ show n) ===================================== compiler/GHC/StgToJS/Symbols.hs ===================================== @@ -849,9 +849,6 @@ unknown = fsLit "" typeof :: FastString typeof = fsLit "typeof" -hdRawStr :: FastString -hdRawStr = fsLit "h$rstr" - throwStr :: FastString throwStr = fsLit "throw" @@ -1213,8 +1210,6 @@ hdStlStr = fsLit "h$stl" hdStiStr :: FastString hdStiStr = fsLit "h$sti" -hdStrStr :: FastString -hdStrStr = fsLit "h$str" ------------------------------ Pack/Unpack -------------------------------------------- hdDecodeUtf8Z :: FastString ===================================== compiler/GHC/StgToJS/Types.hs ===================================== @@ -231,18 +231,25 @@ data StaticInfo = StaticInfo , siCC :: !(Maybe Ident) -- ^ optional CCS name } deriving stock (Eq, Show) +data StaticAppKind + = SAKFun + -- ^ heap object for function + | SAKThunk + -- ^ heap object for CAF + | SAKData + -- ^ regular datacon app + deriving stock (Eq, Show) + +-- Static scalar application +data StaticApp = StaticApp StaticAppKind !FastString [StaticArg] + deriving stock (Eq, Show) + data StaticVal - = StaticFun !FastString [StaticArg] - -- ^ heap object for function - | StaticThunk !(Maybe (FastString,[StaticArg])) - -- ^ heap object for CAF (field is Nothing when thunk is initialized in an - -- alternative way, like string thunks through h$str) - | StaticUnboxed !StaticUnboxed + = StaticUnboxed !StaticUnboxed -- ^ unboxed constructor (Bool, Int, Double etc) - | StaticData !FastString [StaticArg] - -- ^ regular datacon app | StaticList [StaticArg] (Maybe FastString) -- ^ list initializer (with optional tail) + | StaticScalar StaticApp deriving stock (Eq, Show) data StaticUnboxed ===================================== rts/js/string.js ===================================== @@ -1,53 +1,5 @@ //#OPTIONS: CPP -// encode a string constant -function h$str(s) { - var enc = null; - return function() { - if(enc === null) { - enc = h$encodeModifiedUtf8(s); - } - return enc; - } -} - -// encode a packed string -// since \0 is used to separate strings (and a common occurrence) -// we add the following mapping: -// - \0 -> \cz\0 -// - \cz -> \cz\cz -// -// decoding to bytes, the following is produced: -// - \cz\0 -> C0 80 -// - \cz\cz -> 1A -// -// additionally, for dealing with raw binary data we have an escape sequence -// to pack base64 encoded runs: -// -// - \cz\xNN -> followed by NN-0x1f (31 decimal) bytes of base64 encoded -// data. supported range: 0x20 .. 0x9f (1-128 bytes data) -// - -function h$pstr(s) { - var enc = null; - return function() { - if(enc === null) { - enc = h$encodePackedUtf8(s); - } - return enc; - } -} -// encode a raw string from bytes -function h$rstr(d) { - var enc = null; - return function() { - if(enc === null) { - enc = h$rawStringData(d); - } - return enc; - } -} - // these aren't added to the CAFs, so the list stays in mem indefinitely, is that a problem? #ifdef GHCJS_PROF function h$strt(str, cc) { return MK_LAZY_CC(function() { return h$toHsString(str, cc); }, cc); } @@ -265,10 +217,27 @@ function h$encodeUtf8(str) { return h$encodeUtf8Internal(str, false, false); } +// encode a string constant function h$encodeModifiedUtf8(str) { return h$encodeUtf8Internal(str, true, false); } +// encode a packed string +// since \0 is used to separate strings (and a common occurrence) +// we add the following mapping: +// - \0 -> \cz\0 +// - \cz -> \cz\cz +// +// decoding to bytes, the following is produced: +// - \cz\0 -> C0 80 +// - \cz\cz -> 1A +// +// additionally, for dealing with raw binary data we have an escape sequence +// to pack base64 encoded runs: +// +// - \cz\xNN -> followed by NN-0x1f (31 decimal) bytes of base64 encoded +// data. supported range: 0x20 .. 0x9f (1-128 bytes data) +// function h$encodePackedUtf8(str) { return h$encodeUtf8Internal(str, false, true); } @@ -759,6 +728,30 @@ function h$appendToHsStringA(str, appendTo) { return r; } +// unpack utf8 string, append to existing Haskell string +#ifdef GHCJS_PROF +function h$appendToHsString(str, appendTo, cc) { +#else +function h$appendToHsString(str, appendTo) { +#endif + var i = str.length - 1; + // we need to make an updatable thunk here + // if we embed the given closure in a CONS cell. + // (#24495) + var r = i == 0 ? appendTo : MK_UPD_THUNK(appendTo); + while(i>=0) { + // Copied from h$toHsString + var cp = str.charCodeAt(i); + if(cp >= 0xDC00 && cp <= 0xDFFF && i > 0) { + --i; + cp = (cp - 0xDC00) + (str.charCodeAt(i) - 0xD800) * 1024 + 0x10000; + } + r = MK_CONS_CC(cp, r, cc); + --i; + } + return r; +} + // throw e wrapped in a GHCJS.Prim.JSException in the current thread function h$throwJSException(e) { // create a JSException object and wrap it in a SomeException ===================================== testsuite/tests/javascript/Makefile ===================================== @@ -13,20 +13,21 @@ T24495: # check that the optimization occurred for -02 1 time (1 for unfloated lits) grep -c appendToHsStringA T24495.dump-js -T23479_1: - '$(TEST_HC)' $(TEST_HC_OPTS) T23479_1.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file - ./T23479_1 +T23479: + '$(TEST_HC)' $(TEST_HC_OPTS) T23479.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file + ./T23479 # check that the optimization occurred - grep -c "h\$$r1 = \"test_val_1\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_2\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_3\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_80_local" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_80_global" T23479_1.dump-js || true + grep -c "h\$$r1 = \"test_val_1\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_2\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_3\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_80_local" T23479.dump-js + grep -c "h\$$r1 = \"test_val_80_global" T23479.dump-js || true -T23479_2: - '$(TEST_HC)' $(TEST_HC_OPTS) T23479_2.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file - ./T23479_2 - grep -c "h\$$r1 = \"test_val_1\"" T23479_2.dump-js - grep -c "h\$$r1 = \"test_val_80_local_once" T23479_2.dump-js +T24744: + '$(TEST_HC)' $(TEST_HC_OPTS) T24744.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file + ./T24744 + grep -c "h\$$r1 = \"test_val_1\"" T24744.dump-js + grep -c "h\$$r1 = \"test_val_80_local_once" T24744.dump-js # check that the optimization occurred grep -c "h\$$r1 = h\$$decodeUtf8z" T23479_2.dump-js + grep -c "h\$$stc(h\$$mainZCMainzitestzuvalzu80zulocal,h\$$mainZCMainzitestzuvalzu80zulocal_e,\[h\$$ghczmprimZCGHCziCStringziunpackCStringzh,h\$$mainZCMainzimain7_1,h\$$mainZCMainzimain7_2\])" T24744.jsexe/out.js ===================================== testsuite/tests/javascript/T23479_1.hs → testsuite/tests/javascript/T23479.hs ===================================== ===================================== testsuite/tests/javascript/T23479_1.stdout → testsuite/tests/javascript/T23479.stdout ===================================== ===================================== testsuite/tests/javascript/T23479_2.hs → testsuite/tests/javascript/T24744.hs ===================================== ===================================== testsuite/tests/javascript/T23479_2.stdout → testsuite/tests/javascript/T24744.stdout ===================================== ===================================== testsuite/tests/javascript/all.T ===================================== @@ -23,5 +23,5 @@ test('T22455', normal, compile_and_run, ['-ddisable-js-minifier']) test('T23565', normal, compile_and_run, ['']) test('T24495', normal, makefile_test, ['T24495']) -test('T23479_1', normal, makefile_test, ['T23479_1']) -test('T23479_2', normal, makefile_test, ['T23479_2']) +test('T23479', normal, makefile_test, ['T23479']) +test('T24744', normal, makefile_test, ['T24744']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8503e8b9c550899761a725cf51c66809a1f74e3b...59a558d7280723d4c6149ec331baca069f044f93 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8503e8b9c550899761a725cf51c66809a1f74e3b...59a558d7280723d4c6149ec331baca069f044f93 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 15:10:23 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Tue, 26 Nov 2024 10:10:23 -0500 Subject: [Git][ghc/ghc][wip/T24744] 12 commits: driver: Always link against "base" package when one shot linking Message-ID: <6745e4df3e779_173d93ea34423310@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: 7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00 Refactoring: Remove `pSupportedExts` from `ParserOpts` This is never used for lexing / parsing. It is only used by `GHC.Parser.Header.getOptions`. - - - - - 41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Add test for #25515 - - - - - 9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00 Clarify INLINE unfolding optimization docs. Fixes #24660 - - - - - 88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00 rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin to align it with aarch64-darwin. This allows us to get rid of the horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing linker warnings and testsuite failures on macOS 15. Fixes #25504. - - - - - ff23b86b by Serge S. Gulin at 2024-11-26T18:09:57+03:00 JS: Basic cleanup for unused stuff to simplify things. 1. Make `staticInitStat`, `staticDeclStat`, `allocUnboxedConStatic`, `allocateStaticList`, `jsStaticArg` local to modules. 2. Remove unused `hdRawStr`, `hdStrStr` from Haskell and JavaScript (`h$pstr`, `h$rstr`, `h$str`). 3. Introduce a special type `StaticAppKind` enumeration and `StaticApp` to represent boxed scalar static applications. Originally, StaticThunk supported to pass Maybe when it became Nothing for initializied thunks in an alternatie way but it is not used anymore. - - - - - 8e6c75b1 by Serge S. Gulin at 2024-11-26T18:09:57+03:00 JS: Add trivial optimizations for `unpackCString` and `unpackCStringUtf8`. It became possible due of introduction strings unfloating at Sinker pass (#13185). Earns few more bytes at optimizations. - - - - - c2f77764 by Serge S. Gulin at 2024-11-26T18:09:57+03:00 JS: Specialize unpackCString# CAFs (fixes #24744) Code analysis shown that such optimization would be possible out of the box if `cachedIdentForId` allowed to do that for Haskell `Id`s which are represented by few JavaScript `Ident`s. It is a usual for strings which are represented at JavaScript as a pair of 2 values: the string content and the offset where to start reading actual string from the full content. Usually offset is 0 but technically we need to allow such complex structures to be treated as "global". Enabling it there shown that `genToplevelRhs` and `globalOccs` had inaccuracies in their implementations: 1. `globalOccs` operated over JavaScript's `Ident`s but for complex structures it didn't pay attention to the fact that different Idents actually could be pointed to same Id. Now the algo is changed to calculate occurencies for Ids. 2. `genToplevelRhs` didn't assume that different Idents pointed to same Id can have mixed order of occurence. But actually the order is important. Strings are encoded into 2 variables where first is content and second is offset and their order are not interchangeable. It is fixed by regeneration Idents from collected Ids which is fine because all Idents generation is passed through the Cache and they are quasi-stable. - - - - - 30 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/hello.hs - .gitlab/jobs.yaml - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Config/Parser.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Parser/HaddockLex.x - compiler/GHC/Parser/Header.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Settings.hs - compiler/GHC/Settings/IO.hs - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/Arg.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Expr.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/StgToJS/Linker/Linker.hs - compiler/GHC/StgToJS/Monad.hs - compiler/GHC/StgToJS/Object.hs - compiler/GHC/StgToJS/Symbols.hs - compiler/GHC/StgToJS/Types.hs - compiler/GHC/Tc/Gen/Expr.hs - compiler/GHC/Unit/State.hs - distrib/configure.ac.in - docs/users_guide/exts/pragmas.rst - docs/users_guide/packages.rst - ghc/GHCi/UI.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/59a558d7280723d4c6149ec331baca069f044f93...c2f77764c89258251733ecb51cbca82766ef6133 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/59a558d7280723d4c6149ec331baca069f044f93...c2f77764c89258251733ecb51cbca82766ef6133 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 15:25:42 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 26 Nov 2024 10:25:42 -0500 Subject: [Git][ghc/ghc][wip/T24382] 35 commits: Include diagnostic reason in -fdiagnostics-as-json Message-ID: <6745e876601e2_173d9336211c36087@gitlab.mail> Ben Gamari pushed to branch wip/T24382 at Glasgow Haskell Compiler / GHC Commits: 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - 454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - 6e1fbda7 by Ben Gamari at 2024-11-25T03:55:44-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - a05e4a9b by Simon Hengel at 2024-11-25T03:56:33-05:00 Refactoring: Use `OnOff` more consistently for `Extension` - - - - - 7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00 Refactoring: Remove `pSupportedExts` from `ParserOpts` This is never used for lexing / parsing. It is only used by `GHC.Parser.Header.getOptions`. - - - - - 41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Add test for #25515 - - - - - 9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00 Clarify INLINE unfolding optimization docs. Fixes #24660 - - - - - 88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00 rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin to align it with aarch64-darwin. This allows us to get rid of the horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing linker warnings and testsuite failures on macOS 15. Fixes #25504. - - - - - 9ad346ec by Ben Gamari at 2024-11-26T10:25:14-05:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Also includes necessary Hadrian bootstrap plan bump. Fixes #24382. - - - - - 30 changed files: - .gitattributes - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/hello.hs - .gitlab/jobs.yaml - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Config/Parser.hs - compiler/GHC/Driver/Config/StgToCmm.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Phases.hs - compiler/GHC/Driver/Pipeline/Execute.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Parser/HaddockLex.x The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e9ac7c65cd57d3d4e1c91f161feb20451971e17e...9ad346ec8bfa22a2843f8d2c8d998133d0715702 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e9ac7c65cd57d3d4e1c91f161feb20451971e17e...9ad346ec8bfa22a2843f8d2c8d998133d0715702 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 17:09:55 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Tue, 26 Nov 2024 12:09:55 -0500 Subject: [Git][ghc/ghc][wip/T24359] More improvements Message-ID: <674600e34f672_306cfe2575ec47866@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 8a1e9b60 by Simon Peyton Jones at 2024-11-26T17:09:21+00:00 More improvements Pretty much done except for TH stuff - - - - - 17 changed files: - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/TyCo/FVs.hs - compiler/GHC/Driver/Config.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/HsToCore/Expr.hs - compiler/GHC/Tc/Errors/Ppr.hs - testsuite/tests/parser/should_compile/OpaqueParseWarn1.stderr - testsuite/tests/parser/should_fail/T7848.stderr - testsuite/tests/simplCore/should_compile/T15445.stderr - testsuite/tests/simplCore/should_compile/T4398.stderr - + testsuite/tests/simplCore/should_fail/T25117a.hs - + testsuite/tests/simplCore/should_fail/T25117a.stderr - + testsuite/tests/simplCore/should_fail/T25117b.hs - + testsuite/tests/simplCore/should_fail/T25117b.stderr - testsuite/tests/simplCore/should_fail/all.T Changes: ===================================== compiler/GHC/Core/Opt/CSE.hs ===================================== @@ -631,6 +631,9 @@ Notes: doing this if there are no RULES; and other things being equal it delays optimisation to delay inlining (#17409) +* There can be a subtle order-dependency, as described in #25526; + it may matter whether we end up with f=g or g=f. + ---- Historical note --- ===================================== compiler/GHC/Core/Opt/Simplify/Utils.hs ===================================== @@ -360,11 +360,17 @@ data ArgSpec -- Coercion is optimised instance Outputable ArgInfo where - ppr (ArgInfo { ai_fun = fun, ai_args = args, ai_dmds = dmds }) + ppr (ArgInfo { ai_fun = fun, ai_args = args, ai_dmds = dmds, ai_rewrite = rewrite }) = text "ArgInfo" <+> braces (sep [ text "fun =" <+> ppr fun , text "dmds(first 10) =" <+> ppr (take 10 dmds) - , text "args =" <+> ppr args ]) + , text "args =" <+> ppr args + , text "rewrite =" <+> ppr rewrite ]) + +instance Outputable RewriteCall where + ppr (TryRules ac _rules) = text "TryRules" <+> ppr ac + ppr TryInlining = text "TryInlining" + ppr TryNothing = text "TryNothing" instance Outputable ArgSpec where ppr (ValArg { as_arg = arg }) = text "ValArg" <+> ppr arg @@ -449,7 +455,7 @@ mkRewriteCall :: Id -> RuleEnv -> RewriteCall mkRewriteCall fun rule_env | not (null rules) = TryRules n_required rules | canUnfold unf = TryInlining - | otherwise = TryNothing + | otherwise = pprTrace "mkRewriteCall" (ppr fun) TryNothing where n_required = maximum (map ruleArity rules) rules = getRules rule_env fun ===================================== compiler/GHC/Core/SimpleOpt.hs ===================================== @@ -8,7 +8,7 @@ module GHC.Core.SimpleOpt ( SimpleOpts (..), defaultSimpleOpts, -- ** Simple expression optimiser - simpleOptPgm, simpleOptExpr, simpleOptExprNoOccAnal, simpleOptExprWith, + simpleOptPgm, simpleOptExpr, simpleOptExprNoInline, simpleOptExprWith, -- ** Join points joinPointBinding_maybe, joinPointBindings_maybe, @@ -96,6 +96,8 @@ data SimpleOpts = SimpleOpts { so_uf_opts :: !UnfoldingOpts -- ^ Unfolding options , so_co_opts :: !OptCoercionOpts -- ^ Coercion optimiser options , so_eta_red :: !Bool -- ^ Eta reduction on? + , so_inline :: !Bool -- ^ False <=> do no inlining whatsoever, + -- even for trivial or used-once things } -- | Default options for the Simple optimiser. @@ -104,6 +106,7 @@ defaultSimpleOpts = SimpleOpts { so_uf_opts = defaultUnfoldingOpts , so_co_opts = OptCoercionOpts { optCoercionEnabled = False } , so_eta_red = False + , so_inline = True } simpleOptExpr :: HasDebugCallStack => SimpleOpts -> CoreExpr -> CoreExpr @@ -146,13 +149,15 @@ simpleOptExpr opts expr -- It's a bit painful to call exprFreeVars, because it makes -- three passes instead of two (occ-anal, and go) -simpleOptExprNoOccAnal :: HasDebugCallStack => SimpleOpts -> CoreExpr -> CoreExpr --- A variant of simpleOptExpr but without occurrence analysis +simpleOptExprNoInline :: HasDebugCallStack => SimpleOpts -> CoreExpr -> CoreExpr +-- A variant of simpleOptExpr, but without +-- occurrence analysis or inlining of any kind. -- Result: we don't inline evidence bindings, which is useful for the specialiser -simpleOptExprNoOccAnal opts expr +simpleOptExprNoInline opts expr = simple_opt_expr init_env expr where - init_env = (emptyEnv opts) { soe_subst = init_subst } + init_opts = opts { so_inline = False } + init_env = (emptyEnv init_opts) { soe_subst = init_subst } init_subst = mkEmptySubst (mkInScopeSet (exprFreeVars expr)) simpleOptExprWith :: HasDebugCallStack => SimpleOpts -> Subst -> InExpr -> OutExpr @@ -464,7 +469,7 @@ simple_bind_pair :: SimpleOptEnv -- (simple_bind_pair subst in_var out_rhs) -- either extends subst with (in_var -> out_rhs) -- or returns Nothing -simple_bind_pair env@(SOE { soe_inl = inl_env, soe_subst = subst }) +simple_bind_pair env@(SOE { soe_inl = inl_env, soe_subst = subst, soe_opts = opts }) in_bndr mb_out_bndr clo@(rhs_env, in_rhs) top_level | Type ty <- in_rhs -- let a::* = TYPE ty in @@ -506,6 +511,7 @@ simple_bind_pair env@(SOE { soe_inl = inl_env, soe_subst = subst }) pre_inline_unconditionally :: Bool pre_inline_unconditionally + | not (so_inline opts) = False -- Not if so_inline is False | isExportedId in_bndr = False | stable_unf = False | not active = False -- Note [Inline prag in simplOpt] @@ -557,13 +563,14 @@ simple_out_bind_pair :: SimpleOptEnv -> InId -> Maybe OutId -> OutExpr -> OccInfo -> Bool -> Bool -> TopLevelFlag -> (SimpleOptEnv, Maybe (OutVar, OutExpr)) -simple_out_bind_pair env in_bndr mb_out_bndr out_rhs +simple_out_bind_pair env@(SOE { soe_subst = subst, soe_opts = opts }) + in_bndr mb_out_bndr out_rhs occ_info active stable_unf top_level | assertPpr (isNonCoVarId in_bndr) (ppr in_bndr) -- Type and coercion bindings are caught earlier -- See Note [Core type and coercion invariant] post_inline_unconditionally - = ( env' { soe_subst = extendIdSubst (soe_subst env) in_bndr out_rhs } + = ( env' { soe_subst = extendIdSubst subst in_bndr out_rhs } , Nothing) | otherwise @@ -576,6 +583,7 @@ simple_out_bind_pair env in_bndr mb_out_bndr out_rhs post_inline_unconditionally :: Bool post_inline_unconditionally + | not (so_inline opts) = False -- Not if so_inline is False | isExportedId in_bndr = False -- Note [Exported Ids and trivial RHSs] | stable_unf = False -- Note [Stable unfoldings and postInlineUnconditionally] | not active = False -- in GHC.Core.Opt.Simplify.Utils @@ -848,7 +856,7 @@ too. Achieving all this is surprisingly tricky: (MC1) We must compulsorily unfold MkAge to a cast. See Note [Compulsory newtype unfolding] in GHC.Types.Id.Make -(MC2) We must compulsorily unfolding coerce on the rule LHS, yielding +(MC2) We must compulsorily unfold coerce on the rule LHS, yielding forall a b (dict :: Coercible * a b). map @a @b (\(x :: a) -> case dict of MkCoercible (co :: a ~R# b) -> x |> co) = ... @@ -865,7 +873,6 @@ too. Achieving all this is surprisingly tricky: Unfortunately, this still abstracts over a Coercible dictionary. We really want it to abstract over the ~R# evidence. So, we have Desugar.unfold_coerce, which transforms the above to - Desugar) forall a b (co :: a ~R# b). let dict = MkCoercible @* @a @b co in @@ -890,7 +897,7 @@ too. Achieving all this is surprisingly tricky: (MC4) The map/coerce rule is the only compelling reason for having a RULE that quantifies over a coercion variable, something that is otherwise Very Deeply - Suspicous. See Note [Casts in the template] in GHC.Core.Rules. Ugh! + Suspicious. See Note [Casts in the template] in GHC.Core.Rules. Ugh! This is all a fair amount of special-purpose hackery, but it's for a good cause. And it won't hurt other RULES and such that it comes across. ===================================== compiler/GHC/Core/TyCo/FVs.hs ===================================== @@ -1043,41 +1043,44 @@ types/kinds are fully settled and zonked. -- be reordered unnecessarily. This is specified in Note [ScopedSort] -- See also Note [Ordering of implicit variables] in "GHC.Rename.HsType" -scopedSort :: [TyCoVar] -> [TyCoVar] +scopedSort :: [Var] -> [Var] scopedSort = go [] [] where - go :: [TyCoVar] -- already sorted, in reverse order + go :: [Var] -- already sorted, in reverse order -> [TyCoVarSet] -- each set contains all the variables which must be placed -- before the tv corresponding to the set; they are accumulations - -- of the fvs in the sorted tvs' kinds + -- of the fvs in the sorted Var's types - -- This list is in 1-to-1 correspondence with the sorted tyvars + -- This list is in 1-to-1 correspondence with the sorted Vars -- INVARIANT: -- all (\tl -> all (`subVarSet` head tl) (tail tl)) (tails fv_list) -- That is, each set in the list is a superset of all later sets. - -> [TyCoVar] -- yet to be sorted - -> [TyCoVar] + -> [Var] -- yet to be sorted + -> [Var] go acc _fv_list [] = reverse acc go acc fv_list (tv:tvs) = go acc' fv_list' tvs where (acc', fv_list') = insert tv acc fv_list - insert :: TyCoVar -- var to insert - -> [TyCoVar] -- sorted list, in reverse order + insert :: Var -- var to insert + -> [Var] -- sorted list, in reverse order -> [TyCoVarSet] -- list of fvs, as above - -> ([TyCoVar], [TyCoVarSet]) -- augmented lists - insert tv [] [] = ([tv], [tyCoVarsOfType (tyVarKind tv)]) - insert tv (a:as) (fvs:fvss) - | tv `elemVarSet` fvs - , (as', fvss') <- insert tv as fvss - = (a:as', fvs `unionVarSet` fv_tv : fvss') - - | otherwise - = (tv:a:as, fvs `unionVarSet` fv_tv : fvs : fvss) + -> ([Var], [TyCoVarSet]) -- augmented lists + -- Generally we put the new Var at the front of the accumulating list + -- (leading to a stable sort) unless there is are reason to put it later. + insert v [] [] = ([v], [tyCoVarsOfType (varType v)]) + insert v (a:as) (fvs:fvss) + | (isTyVar v && isId a) || (v `elemVarSet` fvs) + -- (a) put Ids after TyVars, and (b) respect dependencies + , (as', fvss') <- insert v as fvss + = (a:as', fvs `unionVarSet` fv_v : fvss') + + | otherwise -- Put `v` at the front + = (v:a:as, fvs `unionVarSet` fv_v : fvs : fvss) where - fv_tv = tyCoVarsOfType (tyVarKind tv) + fv_v = tyCoVarsOfType (varType v) -- lists not in correspondence insert _ _ _ = panic "scopedSort" ===================================== compiler/GHC/Driver/Config.hs ===================================== @@ -25,6 +25,7 @@ initSimpleOpts dflags = SimpleOpts { so_uf_opts = unfoldingOpts dflags , so_co_opts = initOptCoercionOpts dflags , so_eta_red = gopt Opt_DoEtaReduction dflags + , so_inline = True } -- | Extract GHCi options from DynFlags and step ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -809,9 +809,6 @@ dsSpec :: CoreExpr -- RHS to be specialised -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) dsSpec poly_rhs (SpecPrag poly_id spec_co spec_inl) -- SpecPrag case: See Note [Handling old-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig - | isJust (isClassOpId_maybe poly_id) - = failBecauseOfClassOp poly_id - | (spec_bndrs, spec_app) <- collectHsWrapBinders spec_co -- spec_co looks like -- \spec_bndrs. [] spec_args @@ -826,53 +823,6 @@ dsSpec poly_rhs (SpecPrag poly_id spec_co spec_inl) finishSpecPrag poly_rhs rule_bndrs poly_id rule_lhs_args rule_bndrs core_app spec_inl } } -{- -dsSpec mb_poly_rhs (SpecPragE { spe_poly_id = poly_id - , spe_tv_bndrs = tv_bndrs - , spe_id_bndrs = id_bndrs - , spe_lhs_ev_bndrs = lhs_evs - , spe_lhs_binds = lhs_binds - , spe_lhs_call = the_call - , spe_rhs_ev_bndrs = rhs_evs - , spe_rhs_binds = rhs_binds - , spe_inl = inl }) - -- SpecPragE case: See Note [Handling new-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig - | isJust (isClassOpId_maybe poly_id) - = failBecauseOfClassOp poly_id - - | otherwise - = dsTcEvBinds lhs_binds $ \ ds_lhs_binds -> - dsTcEvBinds rhs_binds $ \ ds_rhs_binds -> - do { dflags <- getDynFlags - ; ds_call <- zapUnspecables $ - -- zapUnspecables: see Note [Desugaring RULE left hand sides] - dsLExpr the_call - ; tracePm "dsSpec1" (vcat - [ ppr poly_id - , text "lhs_binds" <+> ppr lhs_binds - , text "ds_lhs_binds" <+> ppr ds_lhs_binds - , text "ds_call" <+> ppr ds_call ]) - - ; let simpl_opts = initSimpleOpts dflags - core_call = mkLets ds_lhs_binds $ - drop_cast $ - simpleOptExpr simpl_opts $ - ds_call - - mk_spec_call fn_body lhs_args - = mkLets ds_rhs_binds $ - mkCoreApps fn_body lhs_args - - ; tracePm "dsSpec1" (vcat [ ppr poly_id $$ ppr ds_call $$ ppr core_call]) - ; finishSpecPrag mb_poly_rhs - (tv_bndrs ++ lhs_evs ++ id_bndrs) core_call - (tv_bndrs ++ rhs_evs ++ id_bndrs) mk_spec_call - inl } - where - drop_cast (Cast e _) = drop_cast e - drop_cast e = e --} - dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id , spe_tv_bndrs = tv_bndrs , spe_id_bndrs = id_bndrs @@ -880,13 +830,9 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id , spe_call = the_call , spe_inl = inl }) -- SpecPragE case: See Note [Handling new-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig - | isJust (isClassOpId_maybe poly_id) - = failBecauseOfClassOp poly_id + = do { ds_call <- zapUnspecables $ -- zapUnspecables: see + dsLExpr the_call -- Note [Desugaring RULE left hand sides] - | otherwise - = do { ds_call <- zapUnspecables $ - -- zapUnspecables: see Note [Desugaring RULE left hand sides] - dsLExpr the_call ; tracePm "dsSpec1" (vcat [ ppr poly_id , text "tv_bndrs" <+> ppr tv_bndrs @@ -894,16 +840,13 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id ; dflags <- getDynFlags ; let simpl_opts = initSimpleOpts dflags - core_call = simpleOptExprNoOccAnal simpl_opts ds_call - - ; case prepareSpecLHS lhs_evs core_call of { + core_call = simpleOptExprNoInline simpl_opts ds_call + ; case prepareSpecLHS poly_id lhs_evs core_call of { Nothing -> do { diagnosticDs (DsRuleLhsTooComplicated ds_call core_call) ; return Nothing } ; - Just (qevs, rhs_const_binds, fn_id, lhs_args) -> - + Just (qevs, rhs_const_binds, lhs_args) -> - assertPpr (fn_id == poly_id) (ppr fn_id $$ ppr poly_id) $ do { let lhs_id_bndrs = mkVarSet id_bndrs `unionVarSet` qevs `unionVarSet` mkVarSet (bindersOfBinds rhs_const_binds) @@ -937,14 +880,15 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id rule_bndrs poly_id lhs_args spec_bndrs mk_spec_body inl } } } -prepareSpecLHS :: [EvVar] -> CoreExpr -> Maybe (VarSet, [CoreBind], Id, [CoreExpr]) -prepareSpecLHS evs the_call +prepareSpecLHS :: Id -> [EvVar] -> CoreExpr + -> Maybe (VarSet, [CoreBind], [CoreExpr]) +prepareSpecLHS poly_id evs the_call = go (mkVarSet evs) [] the_call where go :: VarSet -> [CoreBind] -- Reversed list of constant evidence bindings -> CoreExpr - -> Maybe (IdSet, [CoreBind], Id, [CoreExpr]) + -> Maybe (IdSet, [CoreBind], [CoreExpr]) go qevs acc (Cast e _) = go qevs acc e go qevs acc (Let bind e) @@ -960,24 +904,29 @@ prepareSpecLHS evs the_call go qevs acc e | (Var fun, args) <- collectArgs e - = Just (qevs, reverse acc, fun, args) + = assertPpr (fun == poly_id) (ppr fun $$ ppr poly_id) $ + Just (qevs, reverse acc, args) | otherwise = Nothing -failBecauseOfClassOp :: Id -> DsM (Maybe a) --- There is no point in trying to specialise a class op --- Moreover, classops don't (currently) have an inl_sat arity set --- (it would be Just 0) and that in turn makes makeCorePair bleat -failBecauseOfClassOp poly_id - = do { diagnosticDs (DsUselessSpecialiseForClassMethodSelector poly_id) - ; return Nothing } - finishSpecPrag :: CoreExpr -- RHS to specialise -> [Var] -> Id -> [CoreExpr] -- RULE LHS pattern -> [Var] -> (CoreExpr -> CoreExpr) -> InlinePragma -- Specialised form -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) finishSpecPrag poly_rhs rule_bndrs poly_id rule_args spec_bndrs mk_spec_body spec_inl + | isJust (isClassOpId_maybe poly_id) + = do { diagnosticDs (DsUselessSpecialiseForClassMethodSelector poly_id) + ; return Nothing } -- There is no point in trying to specialise a class op + -- Moreover, classops don't (currently) have an inl_sat arity set + -- (it would be Just 0) and that in turn makes makeCorePair bleat + + | no_act_spec && isNeverActive rule_act + = do { diagnosticDs (DsUselessSpecialiseForNoInlineFunction poly_id) + ; return Nothing } -- Function is NOINLINE, and the specialisation inherits that + -- See Note [Activation pragmas for SPECIALISE] + + | otherwise -- The RULE looks like -- RULE "USPEC" forall rule_bndrs. f rule_args = $sf spec_bndrs -- The specialised function looks like @@ -990,16 +939,13 @@ finishSpecPrag poly_rhs rule_bndrs poly_id rule_args ; let poly_name = idName poly_id spec_occ = mkSpecOcc (getOccName poly_name) spec_name = mkInternalName uniq spec_occ (getSrcSpan poly_name) - id_inl = idInlinePragma poly_id - inl_prag = specFunInlinePrag poly_id id_inl spec_inl - rule_act = specRuleActivation id_inl spec_inl simpl_opts = initSimpleOpts dflags fn_unf = realIdUnfolding poly_id spec_unf = specUnfolding simpl_opts spec_bndrs mk_spec_body rule_args fn_unf spec_id = mkLocalId spec_name ManyTy spec_ty -- Specialised binding is toplevel, hence Many. - `setInlinePragma` inl_prag + `setInlinePragma` specFunInlinePrag poly_id id_inl spec_inl `setIdUnfolding` spec_unf rule = mkSpecRule dflags this_mod False rule_act (text "USPEC") @@ -1021,6 +967,19 @@ finishSpecPrag poly_rhs rule_bndrs poly_id rule_args -- makeCorePair overwrites the unfolding, which we have -- just created using specUnfolding } + where + -- See Note [Activation pragmas for SPECIALISE] + -- no_act_spec is True if the user didn't write an explicit + -- phase specification in the SPECIALISE pragma + id_inl = idInlinePragma poly_id + inl_prag_act = inlinePragmaActivation id_inl + spec_prag_act = inlinePragmaActivation spec_inl + no_act_spec = case inlinePragmaSpec spec_inl of + NoInline _ -> isNeverActive spec_prag_act + Opaque _ -> isNeverActive spec_prag_act + _ -> isAlwaysActive spec_prag_act + rule_act | no_act_spec = inl_prag_act -- Inherit + | otherwise = spec_prag_act -- Specified by user specFunInlinePrag :: Id -> InlinePragma -> InlinePragma -> InlinePragma @@ -1034,21 +993,6 @@ specFunInlinePrag poly_id id_inl spec_inl -- Get the INLINE pragma from SPECIALISE declaration, or, -- failing that, from the original Id -specRuleActivation :: InlinePragma -> InlinePragma -> Activation -specRuleActivation id_inl spec_inl - | no_act_spec = inl_prag_act -- Inherit - | otherwise = spec_prag_act -- Specified by user - where - -- See Note [Activation pragmas for SPECIALISE] - -- no_act_spec is True if the user didn't write an explicit - -- phase specification in the SPECIALISE pragma - inl_prag_act = inlinePragmaActivation id_inl - spec_prag_act = inlinePragmaActivation spec_inl - no_act_spec = case inlinePragmaSpec spec_inl of - NoInline _ -> isNeverActive spec_prag_act - Opaque _ -> isNeverActive spec_prag_act - _ -> isAlwaysActive spec_prag_act - dsWarnOrphanRule :: CoreRule -> DsM () dsWarnOrphanRule rule = when (ruleIsOrphan rule) $ ===================================== compiler/GHC/HsToCore/Expr.hs ===================================== @@ -696,8 +696,7 @@ ds_app (XExpr (HsRecSelTc (FieldOcc { foLabel = L _ sel_id }))) _hs_args core_ar = ds_app_rec_sel sel_id sel_id core_args ds_app (HsVar _ lfun) hs_args core_args - = do { tracePm "ds_app" (ppr lfun <+> ppr core_args) - ; ds_app_var lfun hs_args core_args } + = ds_app_var lfun hs_args core_args ds_app e _hs_args core_args = do { core_e <- dsExpr e ===================================== compiler/GHC/Tc/Errors/Ppr.hs ===================================== @@ -1397,7 +1397,7 @@ instance Diagnostic TcRnMessage where where sigs = sig1 : sig2 : otherSigs TcRnSpecSigShape spec_e -> mkSimpleDecorated $ - hang (text "Illegal form of SPECIALISE pragma") + hang (text "Illegal form of SPECIALISE pragma:") 2 (ppr spec_e) TcRnUnexpectedStandaloneDerivingDecl -> mkSimpleDecorated $ text "Illegal standalone deriving declaration" ===================================== testsuite/tests/parser/should_compile/OpaqueParseWarn1.stderr ===================================== @@ -1,3 +1,3 @@ - OpaqueParseWarn1.hs:6:1: warning: [GHC-38524] Ignoring useless SPECIALISE pragma for NOINLINE function: ‘f’ + ===================================== testsuite/tests/parser/should_fail/T7848.stderr ===================================== @@ -1,11 +1,10 @@ - -T7848.hs:10:9: error: [GHC-25897] - • Couldn't match expected type ‘Char’ with actual type ‘a’ +T7848.hs:10:24: error: [GHC-25897] + • Couldn't match expected type ‘a’ with actual type ‘Char’ ‘a’ is a rigid type variable bound by - the type signature for: - (&) :: forall a. a - at T7848.hs:10:9-35 - • In the pragma: {-# SPECIALIZE (&) :: a #-} + an expression type signature: + forall a. a + at T7848.hs:10:31 + • In the expression: (&) :: a In an equation for ‘x’: x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h) = y @@ -15,3 +14,4 @@ T7848.hs:10:9: error: [GHC-25897] {-# INLINE (&) #-} {-# SPECIALIZE (&) :: a #-} (&) = 'c' + ===================================== testsuite/tests/simplCore/should_compile/T15445.stderr ===================================== @@ -8,6 +8,7 @@ Rule fired: Class op show (BUILTIN) Rule fired: USPEC plusTwoRec @Int (T15445a) Rule fired: Class op enumFromTo (BUILTIN) Rule fired: Class op show (BUILTIN) +Rule fired: USPEC plusTwoRec @Int (T15445a) Rule fired: Class op enumFromTo (BUILTIN) Rule fired: eftIntList (GHC.Internal.Enum) Rule fired: ># (BUILTIN) ===================================== testsuite/tests/simplCore/should_compile/T4398.stderr ===================================== @@ -1,6 +1,6 @@ - T4398.hs:6:11: warning: [GHC-40548] Forall'd constraint ‘Ord a’ is not bound in RULE lhs Orig bndrs: [a, $dOrd, x, y] Orig lhs: f @a ((\ ($dOrd :: Ord a) -> x) $dOrd) y - optimised lhs: f @a x y + Optimised lhs: f @a x y + ===================================== testsuite/tests/simplCore/should_fail/T25117a.hs ===================================== @@ -0,0 +1,6 @@ +module T25117a where + +f :: Ord a => a -> a +f = f + +{-# SPECIALISE let x = 2 in f x #-} ===================================== testsuite/tests/simplCore/should_fail/T25117a.stderr ===================================== @@ -0,0 +1,2 @@ +T25117a.hs:6:1: error: [GHC-93944] + Illegal form of SPECIALISE pragma: let x = 2 in f x ===================================== testsuite/tests/simplCore/should_fail/T25117b.hs ===================================== @@ -0,0 +1,7 @@ +module T25117b where + +f :: Num a => a -> a +f = f + +-- We don't allow old-form multiple type ascriptions +{-# SPECIALISE forall . f :: Int->Int, Float->Float #-} ===================================== testsuite/tests/simplCore/should_fail/T25117b.stderr ===================================== @@ -0,0 +1,2 @@ +T25117b.hs:6:1: error: [GHC-62037] + SPECIALIZE expression doesn't support multiple specialize type ascriptions ===================================== testsuite/tests/simplCore/should_fail/all.T ===================================== @@ -1,3 +1,5 @@ test('T7411', [expect_broken_for(7411, ['optasm', 'optllvm', 'threaded2', 'dyn']), exit_code(1)], compile_and_run, ['']) +test('T25117a', normal, compile_fail, ['']) +test('T25117b', normal, compile_fail, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8a1e9b601bd61853050db3d8a783004ed0dc487c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8a1e9b601bd61853050db3d8a783004ed0dc487c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 17:10:30 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Tue, 26 Nov 2024 12:10:30 -0500 Subject: [Git][ghc/ghc][wip/T24359] 153 commits: Add since tag for -fwrite-if-compression in user guide. Message-ID: <674601065a074_306cfe2b7e60487ef@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - 454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - 6e1fbda7 by Ben Gamari at 2024-11-25T03:55:44-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - a05e4a9b by Simon Hengel at 2024-11-25T03:56:33-05:00 Refactoring: Use `OnOff` more consistently for `Extension` - - - - - 7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00 Refactoring: Remove `pSupportedExts` from `ParserOpts` This is never used for lexing / parsing. It is only used by `GHC.Parser.Header.getOptions`. - - - - - 41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Add test for #25515 - - - - - 9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00 Clarify INLINE unfolding optimization docs. Fixes #24660 - - - - - 88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00 rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin to align it with aarch64-darwin. This allows us to get rid of the horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing linker warnings and testsuite failures on macOS 15. Fixes #25504. - - - - - dd10cc92 by Simon Peyton Jones at 2024-11-26T17:10:02+00:00 Just a start on specialising expressions Addresses #24359. Just a start, does not compile. - - - - - 01556240 by Simon Peyton Jones at 2024-11-26T17:10:02+00:00 More progress (Still does not compile.) - - - - - 30df08e1 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 More progress - - - - - 45bbb5c8 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Wibble - - - - - 7a037c71 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 More progress - - - - - 1590faa2 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 More progress - - - - - ff4fc8b6 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Finally runnable! - - - - - f809566c by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Progress - - - - - cabbefee by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Working I think - - - - - 0bc8a00f by Andrei Borzenkov at 2024-11-26T17:10:03+00:00 Fix derivations conflict in parser, disambiguate them in post-process - - - - - 0033bfd3 by Alan Zimmerman at 2024-11-26T17:10:03+00:00 Fix exact printing for RuleBndrs This puts the exact print annotations inside a TTG extension point in RuleBndrs. It also adds an exact print case for SpecSigE - - - - - f43abff8 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Wibble imports - - - - - a09e973d by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Typo in comments - - - - - 3e6d8e66 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Wibbles - - - - - 69a02fd7 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Go via new route for simple SPECIALISE pragmas - - - - - 1d9df121 by Simon Peyton Jones at 2024-11-26T17:10:03+00:00 Further work - - - - - e4c639de by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Wibble - - - - - de49af1d by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Fix build - - - - - 00aaade0 by Alan Zimmerman at 2024-11-26T17:10:04+00:00 Fix PostProcess/Parser/Exact print annotations It compiles, is now stuck on something related to the main work. - - - - - f5b5ddfe by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 More small fixes - - - - - c992d69b by sheaf at 2024-11-26T17:10:04+00:00 fix exact-print for SpecPragE - - - - - 701f798e by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Thinking about equalities and casts in SpecSigE - - - - - 31b2c97d by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Improve matters wrt equalities in specialisation - - - - - d7879a14 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Swizzle order of bindings - - - - - c41eafa4 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Improvements - - - - - 7cae3a74 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 More improvements - - - - - 9384fd08 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Improvements - - - - - ab29f192 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 More - - - - - 9c5965c8 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Work in progress ..won't compile yet - - - - - 1aa1a5b3 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Better now - - - - - 518d279f by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 More work in progress won't actually compile yet - - - - - 6f239575 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Fix build - - - - - 196ce7d6 by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 Tidy up a bit - - - - - 4e13fd7e by Simon Peyton Jones at 2024-11-26T17:10:04+00:00 More improvements Pretty much done except for TH stuff - - - - - 30 changed files: - .gitattributes - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/hello.hs - .gitlab/jobs.yaml - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/InstEnv.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/TyCo/FVs.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/CoreToIface.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8a1e9b601bd61853050db3d8a783004ed0dc487c...4e13fd7ea984334e0d4b52f8c09318b2661a1b77 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8a1e9b601bd61853050db3d8a783004ed0dc487c...4e13fd7ea984334e0d4b52f8c09318b2661a1b77 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 17:41:45 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Tue, 26 Nov 2024 12:41:45 -0500 Subject: [Git][ghc/ghc][wip/T24359] Add no-op warning Message-ID: <674608594af94_21458ad6790449e1@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 718eb687 by Simon Peyton Jones at 2024-11-26T17:40:12+00:00 Add no-op warning - - - - - 1 changed file: - compiler/GHC/HsToCore/Binds.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -926,6 +926,10 @@ finishSpecPrag poly_rhs rule_bndrs poly_id rule_args ; return Nothing } -- Function is NOINLINE, and the specialisation inherits that -- See Note [Activation pragmas for SPECIALISE] + | all is_nop_arg rule_args + = do { diagnosticDs (DsUselessSpecialiseForNoInlineFunction poly_id) + ; return Nothing } -- Specialisation does nothing + | otherwise -- The RULE looks like -- RULE "USPEC" forall rule_bndrs. f rule_args = $sf spec_bndrs @@ -981,6 +985,13 @@ finishSpecPrag poly_rhs rule_bndrs poly_id rule_args rule_act | no_act_spec = inl_prag_act -- Inherit | otherwise = spec_prag_act -- Specified by user + is_nop_arg (Type {}) = True + is_nop_arg (Coercion {}) = True + is_nop_arg (Cast e _) = is_nop_arg e + is_nop_arg (Tick _ e) = is_nop_arg e + is_nop_arg (Var x) = x `elem` spec_bndrs + is_nop_arg _ = False + specFunInlinePrag :: Id -> InlinePragma -> InlinePragma -> InlinePragma -- See Note [Activation pragmas for SPECIALISE] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/718eb6876511a9aa2262ce897f562b5642975e1a -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/718eb6876511a9aa2262ce897f562b5642975e1a You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 18:25:44 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 26 Nov 2024 13:25:44 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] testsuite: bump T22744 timeout to 5x Message-ID: <674612a8b723a_21458a3092384607c@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 0768fe93 by Cheng Shao at 2024-11-26T13:25:31-05:00 testsuite: bump T22744 timeout to 5x - - - - - 1 changed file: - testsuite/tests/perf/compiler/all.T Changes: ===================================== testsuite/tests/perf/compiler/all.T ===================================== @@ -692,7 +692,7 @@ test('T22744', req_interp, pre_cmd('$MAKE -s --no-print-directory T22744'), extra_files(['genT22744']), - compile_timeout_multiplier(3) + compile_timeout_multiplier(5) ], multimod_compile, ['T22744', '-v0']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0768fe933ade0962a324f407e839d21c4469cc23 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0768fe933ade0962a324f407e839d21c4469cc23 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 19:43:53 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Tue, 26 Nov 2024 14:43:53 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/boot-lib-testing Message-ID: <674624f948e90_21458a722eb45192a@gitlab.mail> Ben Gamari pushed new branch wip/boot-lib-testing at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/boot-lib-testing You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 20:47:26 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Tue, 26 Nov 2024 15:47:26 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/mpickering/get-link-deps Message-ID: <674633de6c3f6_21458aa5e9ac590a5@gitlab.mail> Matthew Pickering pushed new branch wip/mpickering/get-link-deps at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/mpickering/get-link-deps You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 21:07:54 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 26 Nov 2024 16:07:54 -0500 Subject: [Git][ghc/ghc][master] ghc-experimental: expose GHC.RTS.Flags, GHC.Stats Message-ID: <674638aa13620_21458abfa1bc624a7@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 53f978c0 by doyougnu at 2024-11-26T16:07:26-05:00 ghc-experimental: expose GHC.RTS.Flags, GHC.Stats See this CLC proposal: - https://github.com/haskell/core-libraries-committee/issues/289 and this CLC proposal for background: - https://github.com/haskell/core-libraries-committee/issues/288 Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 6 changed files: - docs/users_guide/9.14.1-notes.rst - libraries/ghc-experimental/ghc-experimental.cabal.in - + libraries/ghc-experimental/src/GHC/RTS/Flags/Experimental.hs - + libraries/ghc-experimental/src/GHC/Stats/Experimental.hs - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 Changes: ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -58,6 +58,16 @@ Cmm ``ghc-experimental`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- ``ghc-experimental`` now exposes ``GHC.RTS.Flags`` and ``GHC.Stats`` as + ``GHC.RTS.Flags.Experimental`` and ``GHC.Stats.Experimental``. These are + *also* exposed in ``base``, however the ``base`` versions will be deprecated as + part of the split base project. See `CLC proposal 289 + `__. + Downstream consumers of these flags are encouraged to migrate to the + ``ghc-experimental`` versions. + + + ``template-haskell`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== libraries/ghc-experimental/ghc-experimental.cabal.in ===================================== @@ -35,6 +35,8 @@ library GHC.Profiling.Eras GHC.TypeLits.Experimental GHC.TypeNats.Experimental + GHC.RTS.Flags.Experimental + GHC.Stats.Experimental Prelude.Experimental if arch(wasm32) exposed-modules: GHC.Wasm.Prim ===================================== libraries/ghc-experimental/src/GHC/RTS/Flags/Experimental.hs ===================================== @@ -0,0 +1,54 @@ +-- | +-- Module : GHC.RTS.Flags.Experimental +-- Copyright : (c) The University of Glasgow, 1994-2000 +-- License : see libraries/ghc-experimental/LICENSE +-- +-- Maintainer : ghc-devs at haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- /The API of this module is unstable and is coupled to GHC's internals./ As +-- such if you depend on it, you should expect to follow GHC's releases. This +-- API could change without warning. +-- +-- Descriptions of flags can be seen in +-- , +-- or by running RTS help message using @+RTS --help at . +-- +-- + +module GHC.RTS.Flags.Experimental + ( RtsTime + , RTSFlags (..) + , GiveGCStats (..) + , GCFlags (..) + , ConcFlags (..) + , MiscFlags (..) + , IoManagerFlag (..) + , DebugFlags (..) + , DoCostCentres (..) + , CCFlags (..) + , DoHeapProfile (..) + , ProfFlags (..) + , DoTrace (..) + , TraceFlags (..) + , TickyFlags (..) + , ParFlags (..) + , HpcFlags (..) + , {-# DEPRECATED "import GHC.IO.SubSystem (IoSubSystem (..))" #-} + IoSubSystem (..) + , getRTSFlags + , getGCFlags + , getConcFlags + , getMiscFlags + , getDebugFlags + , getCCFlags + , getProfFlags + , getTraceFlags + , getTickyFlags + , getParFlags + , getHpcFlags + ) where + +import GHC.Internal.RTS.Flags +import GHC.Internal.IO.SubSystem (IoSubSystem(..)) ===================================== libraries/ghc-experimental/src/GHC/Stats/Experimental.hs ===================================== @@ -0,0 +1,27 @@ +{-# LANGUAGE Safe #-} + +-- | +-- Module : RTS.Stats.Experimental +-- Copyright : (c) The University of Glasgow, 1994-2000 +-- License : see libraries/ghc-experimental/LICENSE +-- +-- Maintainer : ghc-devs at haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- This module provides access to internal garbage collection and +-- memory usage statistics. These statistics are not available unless +-- a program is run with the @-T@ RTS flag. +-- +-- /The API of this module is unstable and is coupled to GHC's internals./ As +-- such if you depend on it, you should expect to follow GHC's releases. This +-- API could change without warning. + +module GHC.Stats.Experimental + ( -- * Runtime statistics + RTSStats(..), GCDetails(..), RtsTime + , getRTSStats + , getRTSStatsEnabled + ) where + +import GHC.Internal.Stats ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout ===================================== @@ -6155,6 +6155,157 @@ module GHC.Profiling.Eras where incrementUserEra :: GHC.Types.Word -> GHC.Types.IO GHC.Types.Word setUserEra :: GHC.Types.Word -> GHC.Types.IO () +module GHC.RTS.Flags.Experimental where + -- Safety: None + type CCFlags :: * + data CCFlags = CCFlags {doCostCentres :: DoCostCentres, profilerTicks :: GHC.Types.Int, msecsPerTick :: GHC.Types.Int} + type ConcFlags :: * + data ConcFlags = ConcFlags {ctxtSwitchTime :: RtsTime, ctxtSwitchTicks :: GHC.Types.Int} + type DebugFlags :: * + data DebugFlags = DebugFlags {scheduler :: GHC.Types.Bool, interpreter :: GHC.Types.Bool, weak :: GHC.Types.Bool, gccafs :: GHC.Types.Bool, gc :: GHC.Types.Bool, nonmoving_gc :: GHC.Types.Bool, block_alloc :: GHC.Types.Bool, sanity :: GHC.Types.Bool, stable :: GHC.Types.Bool, prof :: GHC.Types.Bool, linker :: GHC.Types.Bool, apply :: GHC.Types.Bool, stm :: GHC.Types.Bool, squeeze :: GHC.Types.Bool, hpc :: GHC.Types.Bool, sparks :: GHC.Types.Bool} + type DoCostCentres :: * + data DoCostCentres = CostCentresNone | CostCentresSummary | CostCentresVerbose | CostCentresAll | CostCentresJSON + type DoHeapProfile :: * + data DoHeapProfile = NoHeapProfiling | HeapByCCS | HeapByMod | HeapByDescr | HeapByType | HeapByRetainer | HeapByLDV | HeapByClosureType | HeapByInfoTable | HeapByEra + type DoTrace :: * + data DoTrace = TraceNone | TraceEventLog | TraceStderr + type GCFlags :: * + data GCFlags + = GCFlags {statsFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath, + giveStats :: GiveGCStats, + maxStkSize :: GHC.Internal.Word.Word32, + initialStkSize :: GHC.Internal.Word.Word32, + stkChunkSize :: GHC.Internal.Word.Word32, + stkChunkBufferSize :: GHC.Internal.Word.Word32, + maxHeapSize :: GHC.Internal.Word.Word32, + minAllocAreaSize :: GHC.Internal.Word.Word32, + largeAllocLim :: GHC.Internal.Word.Word32, + nurseryChunkSize :: GHC.Internal.Word.Word32, + minOldGenSize :: GHC.Internal.Word.Word32, + heapSizeSuggestion :: GHC.Internal.Word.Word32, + heapSizeSuggestionAuto :: GHC.Types.Bool, + oldGenFactor :: GHC.Types.Double, + returnDecayFactor :: GHC.Types.Double, + pcFreeHeap :: GHC.Types.Double, + generations :: GHC.Internal.Word.Word32, + squeezeUpdFrames :: GHC.Types.Bool, + compact :: GHC.Types.Bool, + compactThreshold :: GHC.Types.Double, + sweep :: GHC.Types.Bool, + ringBell :: GHC.Types.Bool, + idleGCDelayTime :: RtsTime, + doIdleGC :: GHC.Types.Bool, + heapBase :: GHC.Types.Word, + allocLimitGrace :: GHC.Types.Word, + numa :: GHC.Types.Bool, + numaMask :: GHC.Types.Word} + type GiveGCStats :: * + data GiveGCStats = NoGCStats | CollectGCStats | OneLineGCStats | SummaryGCStats | VerboseGCStats + type HpcFlags :: * + data HpcFlags = HpcFlags {readTixFile :: GHC.Types.Bool, writeTixFile :: GHC.Types.Bool} + type IoManagerFlag :: * + data IoManagerFlag = IoManagerFlagAuto | IoManagerFlagSelect | IoManagerFlagMIO | IoManagerFlagWinIO | IoManagerFlagWin32Legacy + type IoSubSystem :: * + data IoSubSystem = IoPOSIX | IoNative + type MiscFlags :: * + data MiscFlags = MiscFlags {tickInterval :: RtsTime, installSignalHandlers :: GHC.Types.Bool, installSEHHandlers :: GHC.Types.Bool, generateCrashDumpFile :: GHC.Types.Bool, generateStackTrace :: GHC.Types.Bool, machineReadable :: GHC.Types.Bool, disableDelayedOsMemoryReturn :: GHC.Types.Bool, internalCounters :: GHC.Types.Bool, linkerAlwaysPic :: GHC.Types.Bool, linkerMemBase :: GHC.Types.Word, ioManager :: IoManagerFlag, numIoWorkerThreads :: GHC.Internal.Word.Word32} + type ParFlags :: * + data ParFlags = ParFlags {nCapabilities :: GHC.Internal.Word.Word32, migrate :: GHC.Types.Bool, maxLocalSparks :: GHC.Internal.Word.Word32, parGcEnabled :: GHC.Types.Bool, parGcGen :: GHC.Internal.Word.Word32, parGcLoadBalancingEnabled :: GHC.Types.Bool, parGcLoadBalancingGen :: GHC.Internal.Word.Word32, parGcNoSyncWithIdle :: GHC.Internal.Word.Word32, parGcThreads :: GHC.Internal.Word.Word32, setAffinity :: GHC.Types.Bool} + type ProfFlags :: * + data ProfFlags + = ProfFlags {doHeapProfile :: DoHeapProfile, + heapProfileInterval :: RtsTime, + heapProfileIntervalTicks :: GHC.Types.Word, + startHeapProfileAtStartup :: GHC.Types.Bool, + startTimeProfileAtStartup :: GHC.Types.Bool, + showCCSOnException :: GHC.Types.Bool, + automaticEraIncrement :: GHC.Types.Bool, + maxRetainerSetSize :: GHC.Types.Word, + ccsLength :: GHC.Types.Word, + modSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + descrSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + typeSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccsSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + retainerSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + bioSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + eraSelector :: GHC.Types.Word} + type RTSFlags :: * + data RTSFlags = RTSFlags {gcFlags :: GCFlags, concurrentFlags :: ConcFlags, miscFlags :: MiscFlags, debugFlags :: DebugFlags, costCentreFlags :: CCFlags, profilingFlags :: ProfFlags, traceFlags :: TraceFlags, tickyFlags :: TickyFlags, parFlags :: ParFlags, hpcFlags :: HpcFlags} + type RtsTime :: * + type RtsTime = GHC.Internal.Word.Word64 + type TickyFlags :: * + data TickyFlags = TickyFlags {showTickyStats :: GHC.Types.Bool, tickyFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath} + type TraceFlags :: * + data TraceFlags = TraceFlags {tracing :: DoTrace, timestamp :: GHC.Types.Bool, traceScheduler :: GHC.Types.Bool, traceGc :: GHC.Types.Bool, traceNonmovingGc :: GHC.Types.Bool, sparksSampled :: GHC.Types.Bool, sparksFull :: GHC.Types.Bool, user :: GHC.Types.Bool} + getCCFlags :: GHC.Types.IO CCFlags + getConcFlags :: GHC.Types.IO ConcFlags + getDebugFlags :: GHC.Types.IO DebugFlags + getGCFlags :: GHC.Types.IO GCFlags + getHpcFlags :: GHC.Types.IO HpcFlags + getMiscFlags :: GHC.Types.IO MiscFlags + getParFlags :: GHC.Types.IO ParFlags + getProfFlags :: GHC.Types.IO ProfFlags + getRTSFlags :: GHC.Types.IO RTSFlags + getTickyFlags :: GHC.Types.IO TickyFlags + getTraceFlags :: GHC.Types.IO TraceFlags + +module GHC.Stats.Experimental where + -- Safety: Safe + type GCDetails :: * + data GCDetails + = GCDetails {gcdetails_gen :: GHC.Internal.Word.Word32, + gcdetails_threads :: GHC.Internal.Word.Word32, + gcdetails_allocated_bytes :: GHC.Internal.Word.Word64, + gcdetails_live_bytes :: GHC.Internal.Word.Word64, + gcdetails_large_objects_bytes :: GHC.Internal.Word.Word64, + gcdetails_compact_bytes :: GHC.Internal.Word.Word64, + gcdetails_slop_bytes :: GHC.Internal.Word.Word64, + gcdetails_mem_in_use_bytes :: GHC.Internal.Word.Word64, + gcdetails_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_max_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_block_fragmentation_bytes :: GHC.Internal.Word.Word64, + gcdetails_sync_elapsed_ns :: RtsTime, + gcdetails_cpu_ns :: RtsTime, + gcdetails_elapsed_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_cpu_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_elapsed_ns :: RtsTime} + type RTSStats :: * + data RTSStats + = RTSStats {gcs :: GHC.Internal.Word.Word32, + major_gcs :: GHC.Internal.Word.Word32, + allocated_bytes :: GHC.Internal.Word.Word64, + max_live_bytes :: GHC.Internal.Word.Word64, + max_large_objects_bytes :: GHC.Internal.Word.Word64, + max_compact_bytes :: GHC.Internal.Word.Word64, + max_slop_bytes :: GHC.Internal.Word.Word64, + max_mem_in_use_bytes :: GHC.Internal.Word.Word64, + cumulative_live_bytes :: GHC.Internal.Word.Word64, + copied_bytes :: GHC.Internal.Word.Word64, + par_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_max_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + init_cpu_ns :: RtsTime, + init_elapsed_ns :: RtsTime, + mutator_cpu_ns :: RtsTime, + mutator_elapsed_ns :: RtsTime, + gc_cpu_ns :: RtsTime, + gc_elapsed_ns :: RtsTime, + cpu_ns :: RtsTime, + elapsed_ns :: RtsTime, + nonmoving_gc_sync_cpu_ns :: RtsTime, + nonmoving_gc_sync_elapsed_ns :: RtsTime, + nonmoving_gc_sync_max_elapsed_ns :: RtsTime, + nonmoving_gc_cpu_ns :: RtsTime, + nonmoving_gc_elapsed_ns :: RtsTime, + nonmoving_gc_max_elapsed_ns :: RtsTime, + gc :: GCDetails} + type RtsTime :: * + type RtsTime = GHC.Internal.Int.Int64 + getRTSStats :: GHC.Types.IO RTSStats + getRTSStatsEnabled :: GHC.Types.IO GHC.Types.Bool + module GHC.TypeLits.Experimental where -- Safety: Safe-Inferred appendSSymbol :: forall (a :: GHC.Types.Symbol) (b :: GHC.Types.Symbol). GHC.Internal.TypeLits.SSymbol a -> GHC.Internal.TypeLits.SSymbol b -> GHC.Internal.TypeLits.SSymbol (GHC.Internal.TypeLits.AppendSymbol a b) @@ -10558,9 +10709,31 @@ instance forall a. GHC.Internal.Data.String.IsString a => GHC.Internal.Data.Stri instance forall a. (a ~ GHC.Types.Char) => GHC.Internal.Data.String.IsString [a] -- Defined in ‘GHC.Internal.Data.String’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. (GHC.Internal.Enum.Enum a, GHC.Internal.Enum.Bounded a, GHC.Classes.Eq a) => GHC.Internal.Enum.Enum (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Internal.IsList.IsList GHC.Internal.Stack.Types.CallStack -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList [a] -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.IsList’ @@ -10569,6 +10742,8 @@ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Functor.ZipList.ZipL instance forall a. GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ @@ -10576,6 +10751,24 @@ instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Inter instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.FunPtr a) -- Defined in ‘GHC.Internal.Ptr’ instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC.Internal.Ptr’ instance GHC.Internal.Show.Show GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Classes.Eq GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Double -- Defined in ‘GHC.Classes’ @@ -10610,6 +10803,8 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC. instance forall a. GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.Base.Void -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Classes.Eq GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Classes.Eq GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’ instance GHC.Classes.Ord GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Double -- Defined in ‘GHC.Classes’ ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 ===================================== @@ -6158,6 +6158,157 @@ module GHC.Profiling.Eras where incrementUserEra :: GHC.Types.Word -> GHC.Types.IO GHC.Types.Word setUserEra :: GHC.Types.Word -> GHC.Types.IO () +module GHC.RTS.Flags.Experimental where + -- Safety: None + type CCFlags :: * + data CCFlags = CCFlags {doCostCentres :: DoCostCentres, profilerTicks :: GHC.Types.Int, msecsPerTick :: GHC.Types.Int} + type ConcFlags :: * + data ConcFlags = ConcFlags {ctxtSwitchTime :: RtsTime, ctxtSwitchTicks :: GHC.Types.Int} + type DebugFlags :: * + data DebugFlags = DebugFlags {scheduler :: GHC.Types.Bool, interpreter :: GHC.Types.Bool, weak :: GHC.Types.Bool, gccafs :: GHC.Types.Bool, gc :: GHC.Types.Bool, nonmoving_gc :: GHC.Types.Bool, block_alloc :: GHC.Types.Bool, sanity :: GHC.Types.Bool, stable :: GHC.Types.Bool, prof :: GHC.Types.Bool, linker :: GHC.Types.Bool, apply :: GHC.Types.Bool, stm :: GHC.Types.Bool, squeeze :: GHC.Types.Bool, hpc :: GHC.Types.Bool, sparks :: GHC.Types.Bool} + type DoCostCentres :: * + data DoCostCentres = CostCentresNone | CostCentresSummary | CostCentresVerbose | CostCentresAll | CostCentresJSON + type DoHeapProfile :: * + data DoHeapProfile = NoHeapProfiling | HeapByCCS | HeapByMod | HeapByDescr | HeapByType | HeapByRetainer | HeapByLDV | HeapByClosureType | HeapByInfoTable | HeapByEra + type DoTrace :: * + data DoTrace = TraceNone | TraceEventLog | TraceStderr + type GCFlags :: * + data GCFlags + = GCFlags {statsFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath, + giveStats :: GiveGCStats, + maxStkSize :: GHC.Internal.Word.Word32, + initialStkSize :: GHC.Internal.Word.Word32, + stkChunkSize :: GHC.Internal.Word.Word32, + stkChunkBufferSize :: GHC.Internal.Word.Word32, + maxHeapSize :: GHC.Internal.Word.Word32, + minAllocAreaSize :: GHC.Internal.Word.Word32, + largeAllocLim :: GHC.Internal.Word.Word32, + nurseryChunkSize :: GHC.Internal.Word.Word32, + minOldGenSize :: GHC.Internal.Word.Word32, + heapSizeSuggestion :: GHC.Internal.Word.Word32, + heapSizeSuggestionAuto :: GHC.Types.Bool, + oldGenFactor :: GHC.Types.Double, + returnDecayFactor :: GHC.Types.Double, + pcFreeHeap :: GHC.Types.Double, + generations :: GHC.Internal.Word.Word32, + squeezeUpdFrames :: GHC.Types.Bool, + compact :: GHC.Types.Bool, + compactThreshold :: GHC.Types.Double, + sweep :: GHC.Types.Bool, + ringBell :: GHC.Types.Bool, + idleGCDelayTime :: RtsTime, + doIdleGC :: GHC.Types.Bool, + heapBase :: GHC.Types.Word, + allocLimitGrace :: GHC.Types.Word, + numa :: GHC.Types.Bool, + numaMask :: GHC.Types.Word} + type GiveGCStats :: * + data GiveGCStats = NoGCStats | CollectGCStats | OneLineGCStats | SummaryGCStats | VerboseGCStats + type HpcFlags :: * + data HpcFlags = HpcFlags {readTixFile :: GHC.Types.Bool, writeTixFile :: GHC.Types.Bool} + type IoManagerFlag :: * + data IoManagerFlag = IoManagerFlagAuto | IoManagerFlagSelect | IoManagerFlagMIO | IoManagerFlagWinIO | IoManagerFlagWin32Legacy + type IoSubSystem :: * + data IoSubSystem = IoPOSIX | IoNative + type MiscFlags :: * + data MiscFlags = MiscFlags {tickInterval :: RtsTime, installSignalHandlers :: GHC.Types.Bool, installSEHHandlers :: GHC.Types.Bool, generateCrashDumpFile :: GHC.Types.Bool, generateStackTrace :: GHC.Types.Bool, machineReadable :: GHC.Types.Bool, disableDelayedOsMemoryReturn :: GHC.Types.Bool, internalCounters :: GHC.Types.Bool, linkerAlwaysPic :: GHC.Types.Bool, linkerMemBase :: GHC.Types.Word, ioManager :: IoManagerFlag, numIoWorkerThreads :: GHC.Internal.Word.Word32} + type ParFlags :: * + data ParFlags = ParFlags {nCapabilities :: GHC.Internal.Word.Word32, migrate :: GHC.Types.Bool, maxLocalSparks :: GHC.Internal.Word.Word32, parGcEnabled :: GHC.Types.Bool, parGcGen :: GHC.Internal.Word.Word32, parGcLoadBalancingEnabled :: GHC.Types.Bool, parGcLoadBalancingGen :: GHC.Internal.Word.Word32, parGcNoSyncWithIdle :: GHC.Internal.Word.Word32, parGcThreads :: GHC.Internal.Word.Word32, setAffinity :: GHC.Types.Bool} + type ProfFlags :: * + data ProfFlags + = ProfFlags {doHeapProfile :: DoHeapProfile, + heapProfileInterval :: RtsTime, + heapProfileIntervalTicks :: GHC.Types.Word, + startHeapProfileAtStartup :: GHC.Types.Bool, + startTimeProfileAtStartup :: GHC.Types.Bool, + showCCSOnException :: GHC.Types.Bool, + automaticEraIncrement :: GHC.Types.Bool, + maxRetainerSetSize :: GHC.Types.Word, + ccsLength :: GHC.Types.Word, + modSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + descrSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + typeSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccsSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + retainerSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + bioSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + eraSelector :: GHC.Types.Word} + type RTSFlags :: * + data RTSFlags = RTSFlags {gcFlags :: GCFlags, concurrentFlags :: ConcFlags, miscFlags :: MiscFlags, debugFlags :: DebugFlags, costCentreFlags :: CCFlags, profilingFlags :: ProfFlags, traceFlags :: TraceFlags, tickyFlags :: TickyFlags, parFlags :: ParFlags, hpcFlags :: HpcFlags} + type RtsTime :: * + type RtsTime = GHC.Internal.Word.Word64 + type TickyFlags :: * + data TickyFlags = TickyFlags {showTickyStats :: GHC.Types.Bool, tickyFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath} + type TraceFlags :: * + data TraceFlags = TraceFlags {tracing :: DoTrace, timestamp :: GHC.Types.Bool, traceScheduler :: GHC.Types.Bool, traceGc :: GHC.Types.Bool, traceNonmovingGc :: GHC.Types.Bool, sparksSampled :: GHC.Types.Bool, sparksFull :: GHC.Types.Bool, user :: GHC.Types.Bool} + getCCFlags :: GHC.Types.IO CCFlags + getConcFlags :: GHC.Types.IO ConcFlags + getDebugFlags :: GHC.Types.IO DebugFlags + getGCFlags :: GHC.Types.IO GCFlags + getHpcFlags :: GHC.Types.IO HpcFlags + getMiscFlags :: GHC.Types.IO MiscFlags + getParFlags :: GHC.Types.IO ParFlags + getProfFlags :: GHC.Types.IO ProfFlags + getRTSFlags :: GHC.Types.IO RTSFlags + getTickyFlags :: GHC.Types.IO TickyFlags + getTraceFlags :: GHC.Types.IO TraceFlags + +module GHC.Stats.Experimental where + -- Safety: Safe + type GCDetails :: * + data GCDetails + = GCDetails {gcdetails_gen :: GHC.Internal.Word.Word32, + gcdetails_threads :: GHC.Internal.Word.Word32, + gcdetails_allocated_bytes :: GHC.Internal.Word.Word64, + gcdetails_live_bytes :: GHC.Internal.Word.Word64, + gcdetails_large_objects_bytes :: GHC.Internal.Word.Word64, + gcdetails_compact_bytes :: GHC.Internal.Word.Word64, + gcdetails_slop_bytes :: GHC.Internal.Word.Word64, + gcdetails_mem_in_use_bytes :: GHC.Internal.Word.Word64, + gcdetails_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_max_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_block_fragmentation_bytes :: GHC.Internal.Word.Word64, + gcdetails_sync_elapsed_ns :: RtsTime, + gcdetails_cpu_ns :: RtsTime, + gcdetails_elapsed_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_cpu_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_elapsed_ns :: RtsTime} + type RTSStats :: * + data RTSStats + = RTSStats {gcs :: GHC.Internal.Word.Word32, + major_gcs :: GHC.Internal.Word.Word32, + allocated_bytes :: GHC.Internal.Word.Word64, + max_live_bytes :: GHC.Internal.Word.Word64, + max_large_objects_bytes :: GHC.Internal.Word.Word64, + max_compact_bytes :: GHC.Internal.Word.Word64, + max_slop_bytes :: GHC.Internal.Word.Word64, + max_mem_in_use_bytes :: GHC.Internal.Word.Word64, + cumulative_live_bytes :: GHC.Internal.Word.Word64, + copied_bytes :: GHC.Internal.Word.Word64, + par_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_max_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + init_cpu_ns :: RtsTime, + init_elapsed_ns :: RtsTime, + mutator_cpu_ns :: RtsTime, + mutator_elapsed_ns :: RtsTime, + gc_cpu_ns :: RtsTime, + gc_elapsed_ns :: RtsTime, + cpu_ns :: RtsTime, + elapsed_ns :: RtsTime, + nonmoving_gc_sync_cpu_ns :: RtsTime, + nonmoving_gc_sync_elapsed_ns :: RtsTime, + nonmoving_gc_sync_max_elapsed_ns :: RtsTime, + nonmoving_gc_cpu_ns :: RtsTime, + nonmoving_gc_elapsed_ns :: RtsTime, + nonmoving_gc_max_elapsed_ns :: RtsTime, + gc :: GCDetails} + type RtsTime :: * + type RtsTime = GHC.Internal.Int.Int64 + getRTSStats :: GHC.Types.IO RTSStats + getRTSStatsEnabled :: GHC.Types.IO GHC.Types.Bool + module GHC.TypeLits.Experimental where -- Safety: Safe-Inferred appendSSymbol :: forall (a :: GHC.Types.Symbol) (b :: GHC.Types.Symbol). GHC.Internal.TypeLits.SSymbol a -> GHC.Internal.TypeLits.SSymbol b -> GHC.Internal.TypeLits.SSymbol (GHC.Internal.TypeLits.AppendSymbol a b) @@ -10561,9 +10712,31 @@ instance forall a. GHC.Internal.Data.String.IsString a => GHC.Internal.Data.Stri instance forall a. (a ~ GHC.Types.Char) => GHC.Internal.Data.String.IsString [a] -- Defined in ‘GHC.Internal.Data.String’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. (GHC.Internal.Enum.Enum a, GHC.Internal.Enum.Bounded a, GHC.Classes.Eq a) => GHC.Internal.Enum.Enum (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Internal.IsList.IsList GHC.Internal.Stack.Types.CallStack -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList [a] -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.IsList’ @@ -10572,6 +10745,8 @@ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Functor.ZipList.ZipL instance forall a. GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ @@ -10579,6 +10754,24 @@ instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Inter instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.FunPtr a) -- Defined in ‘GHC.Internal.Ptr’ instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC.Internal.Ptr’ instance GHC.Internal.Show.Show GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Classes.Eq GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Double -- Defined in ‘GHC.Classes’ @@ -10613,6 +10806,8 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC. instance forall a. GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.Base.Void -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Classes.Eq GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Classes.Eq GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’ instance GHC.Classes.Ord GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Double -- Defined in ‘GHC.Classes’ View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/53f978c0badd96c845ed936698b99fc225d8da48 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/53f978c0badd96c845ed936698b99fc225d8da48 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 21:08:41 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 26 Nov 2024 16:08:41 -0500 Subject: [Git][ghc/ghc][master] Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform Message-ID: <674638d99138e_21458ac0fa1c664b9@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: e70d4140 by Wang Xin at 2024-11-26T16:08:10-05:00 Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform With the Medium code model, the jump range of the generated jump instruction is larger than that of the Small code model. It's a temporary fix of the problem descriped in https://gitlab.haskell .org/ghc/ghc/-/issues/25495. This commit requires that the LLVM used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c6679 83e1baf05, i.e., version 8.0 and later. Actually we should not rely on LLVM, so the only way to solve this problem is to implement the LoongArch backend. Add new type for codemodel - - - - - 1 changed file: - compiler/GHC/CmmToLlvm.hs Changes: ===================================== compiler/GHC/CmmToLlvm.hs ===================================== @@ -221,7 +221,12 @@ cmmMetaLlvmPrelude = do case platformArch platform of ArchX86_64 | llvmCgAvxEnabled cfg -> [mkStackAlignmentMeta 32] _ -> [] - module_flags_metas <- mkModuleFlagsMeta stack_alignment_metas + let codel_model_metas = + case platformArch platform of + -- FIXME: We should not rely on LLVM + ArchLoongArch64 -> [mkCodeModelMeta CMMedium] + _ -> [] + module_flags_metas <- mkModuleFlagsMeta (stack_alignment_metas ++ codel_model_metas) let metas = tbaa_metas ++ module_flags_metas cfg <- getConfig renderLlvm (ppLlvmMetas cfg metas) @@ -244,6 +249,15 @@ mkStackAlignmentMeta :: Integer -> ModuleFlag mkStackAlignmentMeta alignment = ModuleFlag MFBError "override-stack-alignment" (MetaLit $ LMIntLit alignment i32) +-- LLVM's @LLVM::CodeModel::Model@ enumeration +data CodeModel = CMMedium + +-- Pass -mcmodel=medium option to LLVM on LoongArch64 +mkCodeModelMeta :: CodeModel -> ModuleFlag +mkCodeModelMeta codemodel = + ModuleFlag MFBError "Code Model" (MetaLit $ LMIntLit n i32) + where + n = case codemodel of CMMedium -> 3 -- as of LLVM 8 -- ----------------------------------------------------------------------------- -- | Marks variables as used where necessary View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e70d41406b5d5638b42c4d8222cd03e76bbfeb86 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e70d41406b5d5638b42c4d8222cd03e76bbfeb86 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Tue Nov 26 21:39:25 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Tue, 26 Nov 2024 16:39:25 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: ghc-experimental: expose GHC.RTS.Flags, GHC.Stats Message-ID: <6746400d5c5c9_21458a113232868725@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 53f978c0 by doyougnu at 2024-11-26T16:07:26-05:00 ghc-experimental: expose GHC.RTS.Flags, GHC.Stats See this CLC proposal: - https://github.com/haskell/core-libraries-committee/issues/289 and this CLC proposal for background: - https://github.com/haskell/core-libraries-committee/issues/288 Metric Decrease: MultiLayerModulesTH_OneShot - - - - - e70d4140 by Wang Xin at 2024-11-26T16:08:10-05:00 Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform With the Medium code model, the jump range of the generated jump instruction is larger than that of the Small code model. It's a temporary fix of the problem descriped in https://gitlab.haskell .org/ghc/ghc/-/issues/25495. This commit requires that the LLVM used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c6679 83e1baf05, i.e., version 8.0 and later. Actually we should not rely on LLVM, so the only way to solve this problem is to implement the LoongArch backend. Add new type for codemodel - - - - - fc8e58c5 by Andreas Klebinger at 2024-11-26T16:39:01-05:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - 14cdea0d by Ben Gamari at 2024-11-26T16:39:02-05:00 ghc-toolchain: Introduce basic flag validation We verify that required flags (currently `--output` and `--triple`) are provided. The implementation is truly awful, but so is getopt. Begins to address #25500. - - - - - 869d8805 by Ben Gamari at 2024-11-26T16:39:03-05:00 configure: Implement ld override whitelist Bring `configure` into alignment with `ghc-toolchain`, ensuring that the ld-override logic will only take effect on Linux and Windows. Fixes #25501. - - - - - 04320b03 by Ben Gamari at 2024-11-26T16:39:03-05:00 rts: Allow ExecPage to allocate anywhere in address space Currently the ExecPage facility has two users: * GHCi, for constructing info tables, and * the adjustor allocation path Despite neither of these have any spatial locality constraints ExecPage was using the linker's `mmapAnonForLinker`, which tries hard to ensure that mappings end up nearby the executable image. This makes adjustor allocation needlessly subject to fragmentation concerns. We now instead return less constrained mappings, improving the robustness of the mechanism. Addresses #25503. - - - - - 3e679889 by Ben Gamari at 2024-11-26T16:39:04-05:00 base: Fix incorrect mentions of GHC.Internal.Numeric These were incorrectly changed by the automated refactoring of the `ghc-internal` migration. Fixes #25521. - - - - - 23 changed files: - compiler/GHC/Builtin/Names.hs - compiler/GHC/Cmm/Opt.hs - compiler/GHC/CmmToLlvm.hs - docs/users_guide/9.14.1-notes.rst - libraries/base/src/Data/Char.hs - libraries/base/src/Data/Semigroup.hs - libraries/base/src/Prelude.hs - libraries/ghc-experimental/ghc-experimental.cabal.in - + libraries/ghc-experimental/src/GHC/RTS/Flags/Experimental.hs - + libraries/ghc-experimental/src/GHC/Stats/Experimental.hs - libraries/ghc-internal/src/GHC/Internal/Base.hs - libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs - libraries/ghc-internal/src/GHC/Internal/Read.hs - libraries/ghc-internal/src/GHC/Internal/Real.hs - m4/find_ld.m4 - rts/ExecPage.c - rts/linker/MMap.c - rts/linker/MMap.h - + testsuite/tests/cmm/opt/T24556.cmm - testsuite/tests/cmm/opt/all.T - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 - utils/ghc-toolchain/exe/Main.hs Changes: ===================================== compiler/GHC/Builtin/Names.hs ===================================== @@ -279,7 +279,7 @@ basicKnownKeyNames -- Dynamic toDynName, - -- GHC.Internal.Numeric stuff + -- Numeric stuff negateName, minusName, geName, eqName, mkRationalBase2Name, mkRationalBase10Name, ===================================== compiler/GHC/Cmm/Opt.hs ===================================== @@ -49,6 +49,7 @@ constantFoldExprOpt e = wrapRecExpOpt f e CmmMachOp op' args' -> fromMaybe (CmmMachOp op' args') <$> cmmMachOpFoldOptM cfg op' args' e -> pure e f (CmmRegOff r 0) = pure (CmmReg r) + f (CmmLit (CmmInt x rep)) = pure (CmmLit $ CmmInt (narrowU rep x) rep) f e = pure e constantFoldExpr :: Platform -> CmmExpr -> CmmExpr @@ -88,7 +89,7 @@ cmmMachOpFoldM _ (MO_VF_Broadcast lg _w) exprs = _ -> Nothing cmmMachOpFoldM _ op [CmmLit (CmmInt x rep)] = Just $! case op of - MO_S_Neg _ -> CmmLit (CmmInt (-x) rep) + MO_S_Neg _ -> CmmLit (CmmInt (narrowS rep (-x)) rep) MO_Not _ -> CmmLit (CmmInt (complement x) rep) -- these are interesting: we must first narrow to the @@ -164,9 +165,9 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_S_Lt _ -> Just $! CmmLit (CmmInt (if x_s < y_s then 1 else 0) (wordWidth platform)) MO_S_Le _ -> Just $! CmmLit (CmmInt (if x_s <= y_s then 1 else 0) (wordWidth platform)) - MO_Add r -> Just $! CmmLit (CmmInt (x + y) r) - MO_Sub r -> Just $! CmmLit (CmmInt (x - y) r) - MO_Mul r -> Just $! CmmLit (CmmInt (x * y) r) + MO_Add r -> Just $! CmmLit (CmmInt (narrowU r $ x + y) r) + MO_Sub r -> Just $! CmmLit (CmmInt (narrowS r $ x - y) r) + MO_Mul r -> Just $! CmmLit (CmmInt (narrowU r $ x * y) r) MO_U_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `quot` y_u) r) MO_U_Rem r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `rem` y_u) r) MO_S_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_s `quot` y_s) r) @@ -176,7 +177,7 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_Or r -> Just $! CmmLit (CmmInt (x .|. y) r) MO_Xor r -> Just $! CmmLit (CmmInt (x `xor` y) r) - MO_Shl r -> Just $! CmmLit (CmmInt (x `shiftL` fromIntegral y) r) + MO_Shl r -> Just $! CmmLit (CmmInt (narrowU r $ x `shiftL` fromIntegral y) r) MO_U_Shr r -> Just $! CmmLit (CmmInt (x_u `shiftR` fromIntegral y) r) MO_S_Shr r -> Just $! CmmLit (CmmInt (x_s `shiftR` fromIntegral y) r) ===================================== compiler/GHC/CmmToLlvm.hs ===================================== @@ -221,7 +221,12 @@ cmmMetaLlvmPrelude = do case platformArch platform of ArchX86_64 | llvmCgAvxEnabled cfg -> [mkStackAlignmentMeta 32] _ -> [] - module_flags_metas <- mkModuleFlagsMeta stack_alignment_metas + let codel_model_metas = + case platformArch platform of + -- FIXME: We should not rely on LLVM + ArchLoongArch64 -> [mkCodeModelMeta CMMedium] + _ -> [] + module_flags_metas <- mkModuleFlagsMeta (stack_alignment_metas ++ codel_model_metas) let metas = tbaa_metas ++ module_flags_metas cfg <- getConfig renderLlvm (ppLlvmMetas cfg metas) @@ -244,6 +249,15 @@ mkStackAlignmentMeta :: Integer -> ModuleFlag mkStackAlignmentMeta alignment = ModuleFlag MFBError "override-stack-alignment" (MetaLit $ LMIntLit alignment i32) +-- LLVM's @LLVM::CodeModel::Model@ enumeration +data CodeModel = CMMedium + +-- Pass -mcmodel=medium option to LLVM on LoongArch64 +mkCodeModelMeta :: CodeModel -> ModuleFlag +mkCodeModelMeta codemodel = + ModuleFlag MFBError "Code Model" (MetaLit $ LMIntLit n i32) + where + n = case codemodel of CMMedium -> 3 -- as of LLVM 8 -- ----------------------------------------------------------------------------- -- | Marks variables as used where necessary ===================================== docs/users_guide/9.14.1-notes.rst ===================================== @@ -58,6 +58,16 @@ Cmm ``ghc-experimental`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- ``ghc-experimental`` now exposes ``GHC.RTS.Flags`` and ``GHC.Stats`` as + ``GHC.RTS.Flags.Experimental`` and ``GHC.Stats.Experimental``. These are + *also* exposed in ``base``, however the ``base`` versions will be deprecated as + part of the split base project. See `CLC proposal 289 + `__. + Downstream consumers of these flags are encouraged to migrate to the + ``ghc-experimental`` versions. + + + ``template-haskell`` library ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ===================================== libraries/base/src/Data/Char.hs ===================================== @@ -42,7 +42,7 @@ module Data.Char , digitToInt , intToDigit - -- * GHC.Internal.Numeric representations + -- * Numeric representations , ord , chr ===================================== libraries/base/src/Data/Semigroup.hs ===================================== @@ -89,7 +89,7 @@ module Data.Semigroup ( , First(..) , Last(..) , WrappedMonoid(..) - -- * Re-exported monoids from GHC.Internal.Data.Monoid + -- * Re-exported monoids , Dual(..) , Endo(..) , All(..) ===================================== libraries/base/src/Prelude.hs ===================================== @@ -47,11 +47,11 @@ module Prelude ( -- ** Numbers - -- *** GHC.Internal.Numeric types + -- *** Numeric types Int, Integer, Float, Double, Rational, Word, - -- *** GHC.Internal.Numeric type classes + -- *** Numeric type classes Num((+), (-), (*), negate, abs, signum, fromInteger), Real(toRational), Integral(quot, rem, div, mod, quotRem, divMod, toInteger), @@ -63,7 +63,7 @@ module Prelude ( encodeFloat, exponent, significand, scaleFloat, isNaN, isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2), - -- *** GHC.Internal.Numeric functions + -- *** Numeric functions subtract, even, odd, gcd, lcm, (^), (^^), fromIntegral, realToFrac, ===================================== libraries/ghc-experimental/ghc-experimental.cabal.in ===================================== @@ -35,6 +35,8 @@ library GHC.Profiling.Eras GHC.TypeLits.Experimental GHC.TypeNats.Experimental + GHC.RTS.Flags.Experimental + GHC.Stats.Experimental Prelude.Experimental if arch(wasm32) exposed-modules: GHC.Wasm.Prim ===================================== libraries/ghc-experimental/src/GHC/RTS/Flags/Experimental.hs ===================================== @@ -0,0 +1,54 @@ +-- | +-- Module : GHC.RTS.Flags.Experimental +-- Copyright : (c) The University of Glasgow, 1994-2000 +-- License : see libraries/ghc-experimental/LICENSE +-- +-- Maintainer : ghc-devs at haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- /The API of this module is unstable and is coupled to GHC's internals./ As +-- such if you depend on it, you should expect to follow GHC's releases. This +-- API could change without warning. +-- +-- Descriptions of flags can be seen in +-- , +-- or by running RTS help message using @+RTS --help at . +-- +-- + +module GHC.RTS.Flags.Experimental + ( RtsTime + , RTSFlags (..) + , GiveGCStats (..) + , GCFlags (..) + , ConcFlags (..) + , MiscFlags (..) + , IoManagerFlag (..) + , DebugFlags (..) + , DoCostCentres (..) + , CCFlags (..) + , DoHeapProfile (..) + , ProfFlags (..) + , DoTrace (..) + , TraceFlags (..) + , TickyFlags (..) + , ParFlags (..) + , HpcFlags (..) + , {-# DEPRECATED "import GHC.IO.SubSystem (IoSubSystem (..))" #-} + IoSubSystem (..) + , getRTSFlags + , getGCFlags + , getConcFlags + , getMiscFlags + , getDebugFlags + , getCCFlags + , getProfFlags + , getTraceFlags + , getTickyFlags + , getParFlags + , getHpcFlags + ) where + +import GHC.Internal.RTS.Flags +import GHC.Internal.IO.SubSystem (IoSubSystem(..)) ===================================== libraries/ghc-experimental/src/GHC/Stats/Experimental.hs ===================================== @@ -0,0 +1,27 @@ +{-# LANGUAGE Safe #-} + +-- | +-- Module : RTS.Stats.Experimental +-- Copyright : (c) The University of Glasgow, 1994-2000 +-- License : see libraries/ghc-experimental/LICENSE +-- +-- Maintainer : ghc-devs at haskell.org +-- Stability : internal +-- Portability : non-portable (GHC extensions) +-- +-- This module provides access to internal garbage collection and +-- memory usage statistics. These statistics are not available unless +-- a program is run with the @-T@ RTS flag. +-- +-- /The API of this module is unstable and is coupled to GHC's internals./ As +-- such if you depend on it, you should expect to follow GHC's releases. This +-- API could change without warning. + +module GHC.Stats.Experimental + ( -- * Runtime statistics + RTSStats(..), GCDetails(..), RtsTime + , getRTSStats + , getRTSStatsEnabled + ) where + +import GHC.Internal.Stats ===================================== libraries/ghc-internal/src/GHC/Internal/Base.hs ===================================== @@ -2355,7 +2355,7 @@ getTag :: forall {lev :: Levity} (a :: TYPE (BoxedRep lev)) getTag = dataToTag# ---------------------------------------------- --- GHC.Internal.Numeric primops +-- Numeric primops ---------------------------------------------- -- Definitions of the boxed PrimOps; these will be ===================================== libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs ===================================== @@ -47,7 +47,7 @@ module GHC.Internal.Foreign.C.Types , CLLong(..), CULLong(..), CBool(..) , CIntPtr(..), CUIntPtr(..), CIntMax(..), CUIntMax(..) - -- ** GHC.Internal.Numeric types + -- ** Numeric types -- | These types are represented as @newtype at s of basic -- foreign types, and are instances of -- 'Prelude.Eq', 'Prelude.Ord', 'Prelude.Num', 'Prelude.Read', ===================================== libraries/ghc-internal/src/GHC/Internal/Read.hs ===================================== @@ -551,7 +551,7 @@ instance Read L.Lexeme where readList = readListDefault -------------------------------------------------------------- --- GHC.Internal.Numeric instances of Read +-- Numeric instances of Read -------------------------------------------------------------- readNumber :: Num a => (L.Lexeme -> ReadPrec a) -> ReadPrec a ===================================== libraries/ghc-internal/src/GHC/Internal/Real.hs ===================================== @@ -360,7 +360,7 @@ numericEnumFrom :: (Fractional a) => a -> [a] {-# INLINE numericEnumFrom #-} -- See Note [Inline Enum method helpers] in GHC.Internal.Enum numericEnumFrom n = go 0 where - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k in n' : go (k + 1) @@ -369,7 +369,7 @@ numericEnumFromThen :: (Fractional a) => a -> a -> [a] numericEnumFromThen n m = go 0 where step = m - n - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k * step in n' : go (k + 1) @@ -386,7 +386,7 @@ numericEnumFromThenTo e1 e2 !e3 !predicate | e2 >= e1 = (<= e3 + mid) | otherwise = (>= e3 + mid) -{- Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] +{- Note [Numeric Stability of Enumerating Floating Numbers] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When enumerate floating numbers, we could add the increment to the last number at every run (as what we did previously): ===================================== m4/find_ld.m4 ===================================== @@ -79,13 +79,16 @@ AC_DEFUN([FIND_LD],[ dnl See #21712. AC_CHECK_TARGET_TOOL([LD], [ld]) ;; - *) + *-linux|*-mingw32) if test "x$enable_ld_override" = "xyes"; then find_ld else AC_CHECK_TARGET_TOOL([LD], [ld]) fi ;; + *) + AC_CHECK_TARGET_TOOL([LD], [ld]) + ;; esac CHECK_LD_COPY_BUG([$1]) ]) ===================================== rts/ExecPage.c ===================================== @@ -10,7 +10,7 @@ #include "linker/MMap.h" ExecPage *allocateExecPage(void) { - ExecPage *page = (ExecPage *) mmapAnonForLinker(getPageSize()); + ExecPage *page = (ExecPage *) mmapAnon(getPageSize()); return page; } ===================================== rts/linker/MMap.c ===================================== @@ -207,6 +207,12 @@ memoryAccessToProt(MemoryAccess access) } } +void * +mmapAnon (size_t bytes) +{ + return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); +} + // // Returns NULL on failure. // @@ -410,6 +416,15 @@ mmapForLinker (size_t bytes, MemoryAccess access, uint32_t flags, int fd, int of return result; } +/* + * Map read/write pages anywhere in memory. Returns NULL on failure. + */ +void * +mmapAnon (size_t bytes) +{ + return mmapAnywhere(bytes, MEM_READ_WRITE_THEN_READ_EXECUTE, MAP_ANONYMOUS, -1, 0); +} + /* * Map read/write pages in low memory. Returns NULL on failure. */ ===================================== rts/linker/MMap.h ===================================== @@ -64,7 +64,11 @@ typedef enum { extern void *mmap_32bit_base; -// Map read/write anonymous memory. +// Map read/write anonymous memory anywhere in memory. +void *mmapAnon(size_t bytes); + +// Map read/write anonymous memory, enforcing the constraint of +// placing the mapping within 4GB of the executable image. void *mmapAnonForLinker (size_t bytes); // Change protection of previous mapping memory. ===================================== testsuite/tests/cmm/opt/T24556.cmm ===================================== @@ -0,0 +1,12 @@ +#include "Cmm.h" + +func(W_ buffer) { + I8[buffer] = %lobits8(255 + 45); + I8[buffer+(1)] = %lobits8(310 - 10); + I8[buffer+(2)] = %lobits8(30 * 10); + I8[buffer+(3)] = %lobits8(150 << 1); + // This one comes from test-primops + I64[buffer+(4)] = %zx64(((1 :: bits16) & ((1 :: bits16) & (((516 :: bits16) * (154 :: bits16)) + bits16[buffer + (0 :: W_)])))); + return(1); +} + ===================================== testsuite/tests/cmm/opt/all.T ===================================== @@ -3,3 +3,8 @@ test('T15188', cmm_src, makefile_test, []) test('T18141', normal, compile, ['']) test('T20142', normal, compile, ['']) + +# Cmm opt should not produce oversized literals in the assembly output. +# We check this by telling the assembler to exit on warnings. +test('T24556', [only_ways('optasm'), cmm_src], compile, ['-O -opta -Xassembler -opta --fatal-warnings']) + ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout ===================================== @@ -6155,6 +6155,157 @@ module GHC.Profiling.Eras where incrementUserEra :: GHC.Types.Word -> GHC.Types.IO GHC.Types.Word setUserEra :: GHC.Types.Word -> GHC.Types.IO () +module GHC.RTS.Flags.Experimental where + -- Safety: None + type CCFlags :: * + data CCFlags = CCFlags {doCostCentres :: DoCostCentres, profilerTicks :: GHC.Types.Int, msecsPerTick :: GHC.Types.Int} + type ConcFlags :: * + data ConcFlags = ConcFlags {ctxtSwitchTime :: RtsTime, ctxtSwitchTicks :: GHC.Types.Int} + type DebugFlags :: * + data DebugFlags = DebugFlags {scheduler :: GHC.Types.Bool, interpreter :: GHC.Types.Bool, weak :: GHC.Types.Bool, gccafs :: GHC.Types.Bool, gc :: GHC.Types.Bool, nonmoving_gc :: GHC.Types.Bool, block_alloc :: GHC.Types.Bool, sanity :: GHC.Types.Bool, stable :: GHC.Types.Bool, prof :: GHC.Types.Bool, linker :: GHC.Types.Bool, apply :: GHC.Types.Bool, stm :: GHC.Types.Bool, squeeze :: GHC.Types.Bool, hpc :: GHC.Types.Bool, sparks :: GHC.Types.Bool} + type DoCostCentres :: * + data DoCostCentres = CostCentresNone | CostCentresSummary | CostCentresVerbose | CostCentresAll | CostCentresJSON + type DoHeapProfile :: * + data DoHeapProfile = NoHeapProfiling | HeapByCCS | HeapByMod | HeapByDescr | HeapByType | HeapByRetainer | HeapByLDV | HeapByClosureType | HeapByInfoTable | HeapByEra + type DoTrace :: * + data DoTrace = TraceNone | TraceEventLog | TraceStderr + type GCFlags :: * + data GCFlags + = GCFlags {statsFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath, + giveStats :: GiveGCStats, + maxStkSize :: GHC.Internal.Word.Word32, + initialStkSize :: GHC.Internal.Word.Word32, + stkChunkSize :: GHC.Internal.Word.Word32, + stkChunkBufferSize :: GHC.Internal.Word.Word32, + maxHeapSize :: GHC.Internal.Word.Word32, + minAllocAreaSize :: GHC.Internal.Word.Word32, + largeAllocLim :: GHC.Internal.Word.Word32, + nurseryChunkSize :: GHC.Internal.Word.Word32, + minOldGenSize :: GHC.Internal.Word.Word32, + heapSizeSuggestion :: GHC.Internal.Word.Word32, + heapSizeSuggestionAuto :: GHC.Types.Bool, + oldGenFactor :: GHC.Types.Double, + returnDecayFactor :: GHC.Types.Double, + pcFreeHeap :: GHC.Types.Double, + generations :: GHC.Internal.Word.Word32, + squeezeUpdFrames :: GHC.Types.Bool, + compact :: GHC.Types.Bool, + compactThreshold :: GHC.Types.Double, + sweep :: GHC.Types.Bool, + ringBell :: GHC.Types.Bool, + idleGCDelayTime :: RtsTime, + doIdleGC :: GHC.Types.Bool, + heapBase :: GHC.Types.Word, + allocLimitGrace :: GHC.Types.Word, + numa :: GHC.Types.Bool, + numaMask :: GHC.Types.Word} + type GiveGCStats :: * + data GiveGCStats = NoGCStats | CollectGCStats | OneLineGCStats | SummaryGCStats | VerboseGCStats + type HpcFlags :: * + data HpcFlags = HpcFlags {readTixFile :: GHC.Types.Bool, writeTixFile :: GHC.Types.Bool} + type IoManagerFlag :: * + data IoManagerFlag = IoManagerFlagAuto | IoManagerFlagSelect | IoManagerFlagMIO | IoManagerFlagWinIO | IoManagerFlagWin32Legacy + type IoSubSystem :: * + data IoSubSystem = IoPOSIX | IoNative + type MiscFlags :: * + data MiscFlags = MiscFlags {tickInterval :: RtsTime, installSignalHandlers :: GHC.Types.Bool, installSEHHandlers :: GHC.Types.Bool, generateCrashDumpFile :: GHC.Types.Bool, generateStackTrace :: GHC.Types.Bool, machineReadable :: GHC.Types.Bool, disableDelayedOsMemoryReturn :: GHC.Types.Bool, internalCounters :: GHC.Types.Bool, linkerAlwaysPic :: GHC.Types.Bool, linkerMemBase :: GHC.Types.Word, ioManager :: IoManagerFlag, numIoWorkerThreads :: GHC.Internal.Word.Word32} + type ParFlags :: * + data ParFlags = ParFlags {nCapabilities :: GHC.Internal.Word.Word32, migrate :: GHC.Types.Bool, maxLocalSparks :: GHC.Internal.Word.Word32, parGcEnabled :: GHC.Types.Bool, parGcGen :: GHC.Internal.Word.Word32, parGcLoadBalancingEnabled :: GHC.Types.Bool, parGcLoadBalancingGen :: GHC.Internal.Word.Word32, parGcNoSyncWithIdle :: GHC.Internal.Word.Word32, parGcThreads :: GHC.Internal.Word.Word32, setAffinity :: GHC.Types.Bool} + type ProfFlags :: * + data ProfFlags + = ProfFlags {doHeapProfile :: DoHeapProfile, + heapProfileInterval :: RtsTime, + heapProfileIntervalTicks :: GHC.Types.Word, + startHeapProfileAtStartup :: GHC.Types.Bool, + startTimeProfileAtStartup :: GHC.Types.Bool, + showCCSOnException :: GHC.Types.Bool, + automaticEraIncrement :: GHC.Types.Bool, + maxRetainerSetSize :: GHC.Types.Word, + ccsLength :: GHC.Types.Word, + modSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + descrSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + typeSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccsSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + retainerSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + bioSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + eraSelector :: GHC.Types.Word} + type RTSFlags :: * + data RTSFlags = RTSFlags {gcFlags :: GCFlags, concurrentFlags :: ConcFlags, miscFlags :: MiscFlags, debugFlags :: DebugFlags, costCentreFlags :: CCFlags, profilingFlags :: ProfFlags, traceFlags :: TraceFlags, tickyFlags :: TickyFlags, parFlags :: ParFlags, hpcFlags :: HpcFlags} + type RtsTime :: * + type RtsTime = GHC.Internal.Word.Word64 + type TickyFlags :: * + data TickyFlags = TickyFlags {showTickyStats :: GHC.Types.Bool, tickyFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath} + type TraceFlags :: * + data TraceFlags = TraceFlags {tracing :: DoTrace, timestamp :: GHC.Types.Bool, traceScheduler :: GHC.Types.Bool, traceGc :: GHC.Types.Bool, traceNonmovingGc :: GHC.Types.Bool, sparksSampled :: GHC.Types.Bool, sparksFull :: GHC.Types.Bool, user :: GHC.Types.Bool} + getCCFlags :: GHC.Types.IO CCFlags + getConcFlags :: GHC.Types.IO ConcFlags + getDebugFlags :: GHC.Types.IO DebugFlags + getGCFlags :: GHC.Types.IO GCFlags + getHpcFlags :: GHC.Types.IO HpcFlags + getMiscFlags :: GHC.Types.IO MiscFlags + getParFlags :: GHC.Types.IO ParFlags + getProfFlags :: GHC.Types.IO ProfFlags + getRTSFlags :: GHC.Types.IO RTSFlags + getTickyFlags :: GHC.Types.IO TickyFlags + getTraceFlags :: GHC.Types.IO TraceFlags + +module GHC.Stats.Experimental where + -- Safety: Safe + type GCDetails :: * + data GCDetails + = GCDetails {gcdetails_gen :: GHC.Internal.Word.Word32, + gcdetails_threads :: GHC.Internal.Word.Word32, + gcdetails_allocated_bytes :: GHC.Internal.Word.Word64, + gcdetails_live_bytes :: GHC.Internal.Word.Word64, + gcdetails_large_objects_bytes :: GHC.Internal.Word.Word64, + gcdetails_compact_bytes :: GHC.Internal.Word.Word64, + gcdetails_slop_bytes :: GHC.Internal.Word.Word64, + gcdetails_mem_in_use_bytes :: GHC.Internal.Word.Word64, + gcdetails_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_max_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_block_fragmentation_bytes :: GHC.Internal.Word.Word64, + gcdetails_sync_elapsed_ns :: RtsTime, + gcdetails_cpu_ns :: RtsTime, + gcdetails_elapsed_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_cpu_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_elapsed_ns :: RtsTime} + type RTSStats :: * + data RTSStats + = RTSStats {gcs :: GHC.Internal.Word.Word32, + major_gcs :: GHC.Internal.Word.Word32, + allocated_bytes :: GHC.Internal.Word.Word64, + max_live_bytes :: GHC.Internal.Word.Word64, + max_large_objects_bytes :: GHC.Internal.Word.Word64, + max_compact_bytes :: GHC.Internal.Word.Word64, + max_slop_bytes :: GHC.Internal.Word.Word64, + max_mem_in_use_bytes :: GHC.Internal.Word.Word64, + cumulative_live_bytes :: GHC.Internal.Word.Word64, + copied_bytes :: GHC.Internal.Word.Word64, + par_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_max_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + init_cpu_ns :: RtsTime, + init_elapsed_ns :: RtsTime, + mutator_cpu_ns :: RtsTime, + mutator_elapsed_ns :: RtsTime, + gc_cpu_ns :: RtsTime, + gc_elapsed_ns :: RtsTime, + cpu_ns :: RtsTime, + elapsed_ns :: RtsTime, + nonmoving_gc_sync_cpu_ns :: RtsTime, + nonmoving_gc_sync_elapsed_ns :: RtsTime, + nonmoving_gc_sync_max_elapsed_ns :: RtsTime, + nonmoving_gc_cpu_ns :: RtsTime, + nonmoving_gc_elapsed_ns :: RtsTime, + nonmoving_gc_max_elapsed_ns :: RtsTime, + gc :: GCDetails} + type RtsTime :: * + type RtsTime = GHC.Internal.Int.Int64 + getRTSStats :: GHC.Types.IO RTSStats + getRTSStatsEnabled :: GHC.Types.IO GHC.Types.Bool + module GHC.TypeLits.Experimental where -- Safety: Safe-Inferred appendSSymbol :: forall (a :: GHC.Types.Symbol) (b :: GHC.Types.Symbol). GHC.Internal.TypeLits.SSymbol a -> GHC.Internal.TypeLits.SSymbol b -> GHC.Internal.TypeLits.SSymbol (GHC.Internal.TypeLits.AppendSymbol a b) @@ -10558,9 +10709,31 @@ instance forall a. GHC.Internal.Data.String.IsString a => GHC.Internal.Data.Stri instance forall a. (a ~ GHC.Types.Char) => GHC.Internal.Data.String.IsString [a] -- Defined in ‘GHC.Internal.Data.String’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. (GHC.Internal.Enum.Enum a, GHC.Internal.Enum.Bounded a, GHC.Classes.Eq a) => GHC.Internal.Enum.Enum (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Internal.IsList.IsList GHC.Internal.Stack.Types.CallStack -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList [a] -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.IsList’ @@ -10569,6 +10742,8 @@ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Functor.ZipList.ZipL instance forall a. GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ @@ -10576,6 +10751,24 @@ instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Inter instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.FunPtr a) -- Defined in ‘GHC.Internal.Ptr’ instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC.Internal.Ptr’ instance GHC.Internal.Show.Show GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Classes.Eq GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Double -- Defined in ‘GHC.Classes’ @@ -10610,6 +10803,8 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC. instance forall a. GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.Base.Void -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Classes.Eq GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Classes.Eq GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’ instance GHC.Classes.Ord GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Double -- Defined in ‘GHC.Classes’ ===================================== testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 ===================================== @@ -6158,6 +6158,157 @@ module GHC.Profiling.Eras where incrementUserEra :: GHC.Types.Word -> GHC.Types.IO GHC.Types.Word setUserEra :: GHC.Types.Word -> GHC.Types.IO () +module GHC.RTS.Flags.Experimental where + -- Safety: None + type CCFlags :: * + data CCFlags = CCFlags {doCostCentres :: DoCostCentres, profilerTicks :: GHC.Types.Int, msecsPerTick :: GHC.Types.Int} + type ConcFlags :: * + data ConcFlags = ConcFlags {ctxtSwitchTime :: RtsTime, ctxtSwitchTicks :: GHC.Types.Int} + type DebugFlags :: * + data DebugFlags = DebugFlags {scheduler :: GHC.Types.Bool, interpreter :: GHC.Types.Bool, weak :: GHC.Types.Bool, gccafs :: GHC.Types.Bool, gc :: GHC.Types.Bool, nonmoving_gc :: GHC.Types.Bool, block_alloc :: GHC.Types.Bool, sanity :: GHC.Types.Bool, stable :: GHC.Types.Bool, prof :: GHC.Types.Bool, linker :: GHC.Types.Bool, apply :: GHC.Types.Bool, stm :: GHC.Types.Bool, squeeze :: GHC.Types.Bool, hpc :: GHC.Types.Bool, sparks :: GHC.Types.Bool} + type DoCostCentres :: * + data DoCostCentres = CostCentresNone | CostCentresSummary | CostCentresVerbose | CostCentresAll | CostCentresJSON + type DoHeapProfile :: * + data DoHeapProfile = NoHeapProfiling | HeapByCCS | HeapByMod | HeapByDescr | HeapByType | HeapByRetainer | HeapByLDV | HeapByClosureType | HeapByInfoTable | HeapByEra + type DoTrace :: * + data DoTrace = TraceNone | TraceEventLog | TraceStderr + type GCFlags :: * + data GCFlags + = GCFlags {statsFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath, + giveStats :: GiveGCStats, + maxStkSize :: GHC.Internal.Word.Word32, + initialStkSize :: GHC.Internal.Word.Word32, + stkChunkSize :: GHC.Internal.Word.Word32, + stkChunkBufferSize :: GHC.Internal.Word.Word32, + maxHeapSize :: GHC.Internal.Word.Word32, + minAllocAreaSize :: GHC.Internal.Word.Word32, + largeAllocLim :: GHC.Internal.Word.Word32, + nurseryChunkSize :: GHC.Internal.Word.Word32, + minOldGenSize :: GHC.Internal.Word.Word32, + heapSizeSuggestion :: GHC.Internal.Word.Word32, + heapSizeSuggestionAuto :: GHC.Types.Bool, + oldGenFactor :: GHC.Types.Double, + returnDecayFactor :: GHC.Types.Double, + pcFreeHeap :: GHC.Types.Double, + generations :: GHC.Internal.Word.Word32, + squeezeUpdFrames :: GHC.Types.Bool, + compact :: GHC.Types.Bool, + compactThreshold :: GHC.Types.Double, + sweep :: GHC.Types.Bool, + ringBell :: GHC.Types.Bool, + idleGCDelayTime :: RtsTime, + doIdleGC :: GHC.Types.Bool, + heapBase :: GHC.Types.Word, + allocLimitGrace :: GHC.Types.Word, + numa :: GHC.Types.Bool, + numaMask :: GHC.Types.Word} + type GiveGCStats :: * + data GiveGCStats = NoGCStats | CollectGCStats | OneLineGCStats | SummaryGCStats | VerboseGCStats + type HpcFlags :: * + data HpcFlags = HpcFlags {readTixFile :: GHC.Types.Bool, writeTixFile :: GHC.Types.Bool} + type IoManagerFlag :: * + data IoManagerFlag = IoManagerFlagAuto | IoManagerFlagSelect | IoManagerFlagMIO | IoManagerFlagWinIO | IoManagerFlagWin32Legacy + type IoSubSystem :: * + data IoSubSystem = IoPOSIX | IoNative + type MiscFlags :: * + data MiscFlags = MiscFlags {tickInterval :: RtsTime, installSignalHandlers :: GHC.Types.Bool, installSEHHandlers :: GHC.Types.Bool, generateCrashDumpFile :: GHC.Types.Bool, generateStackTrace :: GHC.Types.Bool, machineReadable :: GHC.Types.Bool, disableDelayedOsMemoryReturn :: GHC.Types.Bool, internalCounters :: GHC.Types.Bool, linkerAlwaysPic :: GHC.Types.Bool, linkerMemBase :: GHC.Types.Word, ioManager :: IoManagerFlag, numIoWorkerThreads :: GHC.Internal.Word.Word32} + type ParFlags :: * + data ParFlags = ParFlags {nCapabilities :: GHC.Internal.Word.Word32, migrate :: GHC.Types.Bool, maxLocalSparks :: GHC.Internal.Word.Word32, parGcEnabled :: GHC.Types.Bool, parGcGen :: GHC.Internal.Word.Word32, parGcLoadBalancingEnabled :: GHC.Types.Bool, parGcLoadBalancingGen :: GHC.Internal.Word.Word32, parGcNoSyncWithIdle :: GHC.Internal.Word.Word32, parGcThreads :: GHC.Internal.Word.Word32, setAffinity :: GHC.Types.Bool} + type ProfFlags :: * + data ProfFlags + = ProfFlags {doHeapProfile :: DoHeapProfile, + heapProfileInterval :: RtsTime, + heapProfileIntervalTicks :: GHC.Types.Word, + startHeapProfileAtStartup :: GHC.Types.Bool, + startTimeProfileAtStartup :: GHC.Types.Bool, + showCCSOnException :: GHC.Types.Bool, + automaticEraIncrement :: GHC.Types.Bool, + maxRetainerSetSize :: GHC.Types.Word, + ccsLength :: GHC.Types.Word, + modSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + descrSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + typeSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + ccsSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + retainerSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + bioSelector :: GHC.Internal.Maybe.Maybe GHC.Internal.Base.String, + eraSelector :: GHC.Types.Word} + type RTSFlags :: * + data RTSFlags = RTSFlags {gcFlags :: GCFlags, concurrentFlags :: ConcFlags, miscFlags :: MiscFlags, debugFlags :: DebugFlags, costCentreFlags :: CCFlags, profilingFlags :: ProfFlags, traceFlags :: TraceFlags, tickyFlags :: TickyFlags, parFlags :: ParFlags, hpcFlags :: HpcFlags} + type RtsTime :: * + type RtsTime = GHC.Internal.Word.Word64 + type TickyFlags :: * + data TickyFlags = TickyFlags {showTickyStats :: GHC.Types.Bool, tickyFile :: GHC.Internal.Maybe.Maybe GHC.Internal.IO.FilePath} + type TraceFlags :: * + data TraceFlags = TraceFlags {tracing :: DoTrace, timestamp :: GHC.Types.Bool, traceScheduler :: GHC.Types.Bool, traceGc :: GHC.Types.Bool, traceNonmovingGc :: GHC.Types.Bool, sparksSampled :: GHC.Types.Bool, sparksFull :: GHC.Types.Bool, user :: GHC.Types.Bool} + getCCFlags :: GHC.Types.IO CCFlags + getConcFlags :: GHC.Types.IO ConcFlags + getDebugFlags :: GHC.Types.IO DebugFlags + getGCFlags :: GHC.Types.IO GCFlags + getHpcFlags :: GHC.Types.IO HpcFlags + getMiscFlags :: GHC.Types.IO MiscFlags + getParFlags :: GHC.Types.IO ParFlags + getProfFlags :: GHC.Types.IO ProfFlags + getRTSFlags :: GHC.Types.IO RTSFlags + getTickyFlags :: GHC.Types.IO TickyFlags + getTraceFlags :: GHC.Types.IO TraceFlags + +module GHC.Stats.Experimental where + -- Safety: Safe + type GCDetails :: * + data GCDetails + = GCDetails {gcdetails_gen :: GHC.Internal.Word.Word32, + gcdetails_threads :: GHC.Internal.Word.Word32, + gcdetails_allocated_bytes :: GHC.Internal.Word.Word64, + gcdetails_live_bytes :: GHC.Internal.Word.Word64, + gcdetails_large_objects_bytes :: GHC.Internal.Word.Word64, + gcdetails_compact_bytes :: GHC.Internal.Word.Word64, + gcdetails_slop_bytes :: GHC.Internal.Word.Word64, + gcdetails_mem_in_use_bytes :: GHC.Internal.Word.Word64, + gcdetails_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_max_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + gcdetails_block_fragmentation_bytes :: GHC.Internal.Word.Word64, + gcdetails_sync_elapsed_ns :: RtsTime, + gcdetails_cpu_ns :: RtsTime, + gcdetails_elapsed_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_cpu_ns :: RtsTime, + gcdetails_nonmoving_gc_sync_elapsed_ns :: RtsTime} + type RTSStats :: * + data RTSStats + = RTSStats {gcs :: GHC.Internal.Word.Word32, + major_gcs :: GHC.Internal.Word.Word32, + allocated_bytes :: GHC.Internal.Word.Word64, + max_live_bytes :: GHC.Internal.Word.Word64, + max_large_objects_bytes :: GHC.Internal.Word.Word64, + max_compact_bytes :: GHC.Internal.Word.Word64, + max_slop_bytes :: GHC.Internal.Word.Word64, + max_mem_in_use_bytes :: GHC.Internal.Word.Word64, + cumulative_live_bytes :: GHC.Internal.Word.Word64, + copied_bytes :: GHC.Internal.Word.Word64, + par_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_max_copied_bytes :: GHC.Internal.Word.Word64, + cumulative_par_balanced_copied_bytes :: GHC.Internal.Word.Word64, + init_cpu_ns :: RtsTime, + init_elapsed_ns :: RtsTime, + mutator_cpu_ns :: RtsTime, + mutator_elapsed_ns :: RtsTime, + gc_cpu_ns :: RtsTime, + gc_elapsed_ns :: RtsTime, + cpu_ns :: RtsTime, + elapsed_ns :: RtsTime, + nonmoving_gc_sync_cpu_ns :: RtsTime, + nonmoving_gc_sync_elapsed_ns :: RtsTime, + nonmoving_gc_sync_max_elapsed_ns :: RtsTime, + nonmoving_gc_cpu_ns :: RtsTime, + nonmoving_gc_elapsed_ns :: RtsTime, + nonmoving_gc_max_elapsed_ns :: RtsTime, + gc :: GCDetails} + type RtsTime :: * + type RtsTime = GHC.Internal.Int.Int64 + getRTSStats :: GHC.Types.IO RTSStats + getRTSStatsEnabled :: GHC.Types.IO GHC.Types.Bool + module GHC.TypeLits.Experimental where -- Safety: Safe-Inferred appendSSymbol :: forall (a :: GHC.Types.Symbol) (b :: GHC.Types.Symbol). GHC.Internal.TypeLits.SSymbol a -> GHC.Internal.TypeLits.SSymbol b -> GHC.Internal.TypeLits.SSymbol (GHC.Internal.TypeLits.AppendSymbol a b) @@ -10561,9 +10712,31 @@ instance forall a. GHC.Internal.Data.String.IsString a => GHC.Internal.Data.Stri instance forall a. (a ~ GHC.Types.Char) => GHC.Internal.Data.String.IsString [a] -- Defined in ‘GHC.Internal.Data.String’ instance forall a. GHC.Internal.Enum.Bounded a => GHC.Internal.Enum.Bounded (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. (GHC.Internal.Enum.Enum a, GHC.Internal.Enum.Bounded a, GHC.Classes.Eq a) => GHC.Internal.Enum.Enum (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Generics.Generic GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Internal.IsList.IsList GHC.Internal.Stack.Types.CallStack -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList [a] -- Defined in ‘GHC.Internal.IsList’ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.IsList’ @@ -10572,6 +10745,8 @@ instance forall a. GHC.Internal.IsList.IsList (GHC.Internal.Functor.ZipList.ZipL instance forall a. GHC.Internal.Ix.Ix a => GHC.Internal.Ix.Ix (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Num.Num a => GHC.Internal.Num.Num (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Read.Read a => GHC.Internal.Read.Read (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Read.Read GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance forall a. GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.Real a => GHC.Internal.Real.Real (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ instance forall a. GHC.Internal.Real.RealFrac a => GHC.Internal.Real.RealFrac (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’ @@ -10579,6 +10754,24 @@ instance forall a. GHC.Internal.Show.Show a => GHC.Internal.Show.Show (GHC.Inter instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.FunPtr a) -- Defined in ‘GHC.Internal.Ptr’ instance forall a. GHC.Internal.Show.Show (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC.Internal.Ptr’ instance GHC.Internal.Show.Show GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.CCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ConcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DebugFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoCostCentres -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoHeapProfile -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GCFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.HpcFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.MiscFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ParFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.ProfFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.RTSFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TickyFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.RTS.Flags.TraceFlags -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.GCDetails -- Defined in ‘GHC.Internal.Stats’ +instance GHC.Internal.Show.Show GHC.Internal.Stats.RTSStats -- Defined in ‘GHC.Internal.Stats’ instance GHC.Classes.Eq GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Eq GHC.Types.Double -- Defined in ‘GHC.Classes’ @@ -10613,6 +10806,8 @@ instance forall a. GHC.Classes.Eq (GHC.Internal.Ptr.Ptr a) -- Defined in ‘GHC. instance forall a. GHC.Classes.Eq a => GHC.Classes.Eq (GHC.Internal.Base.NonEmpty a) -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.Base.Void -- Defined in ‘GHC.Internal.Base’ instance GHC.Classes.Eq GHC.Internal.IO.MaskingState -- Defined in ‘GHC.Internal.IO’ +instance GHC.Classes.Eq GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’ +instance GHC.Classes.Eq GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’ instance GHC.Classes.Ord GHC.Types.Bool -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Char -- Defined in ‘GHC.Classes’ instance GHC.Classes.Ord GHC.Types.Double -- Defined in ‘GHC.Classes’ ===================================== utils/ghc-toolchain/exe/Main.hs ===================================== @@ -35,11 +35,11 @@ import GHC.Toolchain.NormaliseTriple (normaliseTriple) import Text.Read (readMaybe) data Opts = Opts - { optTriple :: String + { optTriple :: Maybe String , optTargetPrefix :: Maybe String , optLocallyExecutable :: Maybe Bool , optLlvmTriple :: Maybe String - , optOutput :: String + , optOutput :: Maybe String , optCc :: ProgOpt , optCxx :: ProgOpt , optCpp :: ProgOpt @@ -82,11 +82,11 @@ emptyFormatOpts = FormatOpts { formatOptInput = error "formatOpts: input" emptyOpts :: Opts emptyOpts = Opts - { optTriple = "" + { optTriple = Nothing , optTargetPrefix = Nothing , optLocallyExecutable = Nothing , optLlvmTriple = Nothing - , optOutput = "" + , optOutput = Nothing , optCc = po0 , optCxx = po0 , optCpp = po0 @@ -129,13 +129,13 @@ _optMergeObjs = Lens optMergeObjs (\x o -> o {optMergeObjs=x}) _optWindres = Lens optWindres (\x o -> o {optWindres=x}) _optLd = Lens optLd (\x o -> o {optLd= x}) -_optTriple :: Lens Opts String +_optTriple :: Lens Opts (Maybe String) _optTriple = Lens optTriple (\x o -> o {optTriple=x}) _optLlvmTriple :: Lens Opts (Maybe String) _optLlvmTriple = Lens optLlvmTriple (\x o -> o {optLlvmTriple=x}) -_optOutput :: Lens Opts String +_optOutput :: Lens Opts (Maybe String) _optOutput = Lens optOutput (\x o -> o {optOutput=x}) _optTargetPrefix :: Lens Opts (Maybe String) @@ -213,7 +213,7 @@ options = , Option [] ["disable-" ++ optName] (NoArg (set lens (Just False))) ("Disable " ++ description) ] - tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple) "TRIPLE") "Target triple" + tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple . Just) "TRIPLE") "Target triple" llvmTripleOpt = Option [] ["llvm-triple"] (ReqArg (set _optLlvmTriple . Just) "LLVM-TRIPLE") "LLVM Target triple" targetPrefixOpt = Option ['T'] ["target-prefix"] (ReqArg (set _optTargetPrefix . Just) "PREFIX") @@ -233,7 +233,7 @@ options = keepTempOpt = Option [] ["keep-temp"] (NoArg (set _optKeepTemp True)) "do not remove temporary files" - outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput) "OUTPUT") + outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput . Just) "OUTPUT") "The output path for the generated target toolchain configuration" formatOpts :: [OptDescr (FormatOpts -> FormatOpts)] @@ -244,6 +244,16 @@ formatOpts = [ "The target file to format") ] +validateOpts :: Opts -> [String] +validateOpts opts = mconcat + [ assertJust _optTriple "missing --triple flag" + , assertJust _optOutput "missing --output flag" + ] + where + assertJust :: Lens Opts (Maybe a) -> String -> [String] + assertJust lens msg = + [ msg | Nothing <- pure $ view lens opts ] + main :: IO () main = do argv <- getArgs @@ -273,14 +283,14 @@ doFormat args = do doConfigure :: [String] -> IO () doConfigure args = do - let (opts0, _nonopts, errs) = getOpt RequireOrder options args + let (opts0, _nonopts, parseErrs) = getOpt RequireOrder options args let opts = foldr (.) id opts0 emptyOpts - case errs of + case parseErrs ++ validateOpts opts of [] -> do let env = Env { verbosity = optVerbosity opts , targetPrefix = case optTargetPrefix opts of Just prefix -> Just prefix - Nothing -> Just $ optTriple opts ++ "-" + Nothing -> Just $ fromMaybe (error "undefined triple") (optTriple opts) ++ "-" , keepTemp = optKeepTemp opts , canLocallyExecute = fromMaybe True (optLocallyExecutable opts) , logContexts = [] @@ -289,7 +299,7 @@ doConfigure args = do case r of Left err -> print err >> exitWith (ExitFailure 2) Right () -> return () - _ -> do + errs -> do mapM_ putStrLn errs putStrLn $ usageInfo "ghc-toolchain" options exitWith (ExitFailure 1) @@ -298,7 +308,7 @@ run :: Opts -> M () run opts = do tgt <- mkTarget opts logDebug $ "Final Target: " ++ show tgt - let file = optOutput opts + let file = fromMaybe (error "undefined --output") (optOutput opts) writeFile file (show tgt) optional :: M a -> M (Maybe a) @@ -390,7 +400,7 @@ ldOverrideWhitelist a = mkTarget :: Opts -> M Target mkTarget opts = do - normalised_triple <- normaliseTriple (optTriple opts) + normalised_triple <- normaliseTriple (fromMaybe (error "missing --triple") (optTriple opts)) -- Use Llvm target if specified, otherwise use triple as llvm target let tgtLlvmTarget = fromMaybe normalised_triple (optLlvmTriple opts) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8522f16f0e1de5601d1ca60b16b1e82f941f04bd...3e679889ad102edf634a82920c24f63e311643f5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8522f16f0e1de5601d1ca60b16b1e82f941f04bd...3e679889ad102edf634a82920c24f63e311643f5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 06:01:47 2024 From: gitlab at gitlab.haskell.org (Serge S. Gulin (@gulin.serge)) Date: Wed, 27 Nov 2024 01:01:47 -0500 Subject: [Git][ghc/ghc][wip/T24744] JS: Specialize unpackCString# CAFs (fixes #24744) Message-ID: <6746b5cbbd32b_374fad49318086540@gitlab.mail> Serge S. Gulin pushed to branch wip/T24744 at Glasgow Haskell Compiler / GHC Commits: a420e23f by Serge S. Gulin at 2024-11-27T09:01:25+03:00 JS: Specialize unpackCString# CAFs (fixes #24744) Code analysis shown that such optimization would be possible out of the box if `cachedIdentForId` allowed to do that for Haskell `Id`s which are represented by few JavaScript `Ident`s. It is a usual for strings which are represented at JavaScript as a pair of 2 values: the string content and the offset where to start reading actual string from the full content. Usually offset is 0 but technically we need to allow such complex structures to be treated as "global". Enabling it there shown that `genToplevelRhs` and `globalOccs` had inaccuracies in their implementations: 1. `globalOccs` operated over JavaScript's `Ident`s but for complex structures it didn't pay attention to the fact that different Idents actually could be pointed to same Id. Now the algo is changed to calculate occurencies for Ids. 2. `genToplevelRhs` didn't assume that different Idents pointed to same Id can have mixed order of occurence. But actually the order is important. Strings are encoded into 2 variables where first is content and second is offset and their order are not interchangeable. It is fixed by regeneration Idents from collected Ids which is fine because all Idents generation is passed through the Cache and they are quasi-stable. - - - - - 10 changed files: - compiler/GHC/StgToJS/Apply.hs - compiler/GHC/StgToJS/CodeGen.hs - compiler/GHC/StgToJS/Ids.hs - compiler/GHC/StgToJS/Monad.hs - testsuite/tests/javascript/Makefile - testsuite/tests/javascript/T23479_1.hs → testsuite/tests/javascript/T23479.hs - testsuite/tests/javascript/T23479_1.stdout → testsuite/tests/javascript/T23479.stdout - testsuite/tests/javascript/T23479_2.hs → testsuite/tests/javascript/T24744.hs - testsuite/tests/javascript/T23479_2.stdout → testsuite/tests/javascript/T24744.stdout - testsuite/tests/javascript/all.T Changes: ===================================== compiler/GHC/StgToJS/Apply.hs ===================================== @@ -100,7 +100,7 @@ genApp -> [StgArg] -> G (JStgStat, ExprResult) genApp ctx i args - -- Test case T23479_2 + -- Test case moved to T24744 -- See: https://github.com/ghcjs/ghcjs/blob/b7711fbca7c3f43a61f1dba526e6f2a2656ef44c/src/Gen2/Generator.hs#L876 -- Comment by Luite Stegeman -- Special cases for JSString literals. @@ -119,7 +119,7 @@ genApp ctx i args , [top] <- concatMap typex_expr (ctxTarget ctx) = (,ExprInline) . (|=) top . app hdDecodeUtf8Z <$> varsForId v - -- Test case T23479_1 + -- Test case T23479 | [StgLitArg (LitString bs)] <- args , Just d <- decodeModifiedUTF8 bs , idName i == unsafeUnpackJSStringUtf8ShShName ===================================== compiler/GHC/StgToJS/CodeGen.hs ===================================== @@ -327,10 +327,11 @@ genToplevelRhs i rhs = case rhs of eid <- identForEntryId i idt <- identFS <$> identForId i body <- genBody (initExprCtx i) R2 args body typ - global_occs <- globalOccs body + lids <- globalOccs body + -- Regenerate idents from lids to restore right order of representatives. + -- Representatives have occurrence order which can be mixed. + lidents <- concat <$> traverse identsForId lids let eidt = identFS eid - let lidents = map global_ident global_occs - let lids = map global_id global_occs let lidents' = map identFS lidents CIStaticRefs sr0 <- genStaticRefsRhs rhs let sri = filter (`notElem` lidents') sr0 ===================================== compiler/GHC/StgToJS/Ids.hs ===================================== @@ -155,7 +155,7 @@ cachedIdentForId i mi id_type = do -- Now update the GlobalId cache, if required - let update_global_cache = isGlobalId i && isNothing mi && id_type == IdPlain + let update_global_cache = isGlobalId i && id_type == IdPlain -- fixme also allow caching entries for lifting? when (update_global_cache) $ do ===================================== compiler/GHC/StgToJS/Monad.hs ===================================== @@ -153,29 +153,28 @@ getGlobalIdCache = State.gets (ggsGlobalIdCache . gsGroup) setGlobalIdCache :: GlobalIdCache -> G () setGlobalIdCache v = State.modify (\s -> s { gsGroup = (gsGroup s) { ggsGlobalIdCache = v}}) - data GlobalOcc = GlobalOcc - { global_ident :: !Ident - , global_id :: !Id + { global_id :: !Id , global_count :: !Word } instance Outputable GlobalOcc where ppr g = hang (text "GlobalOcc") 2 $ vcat - [ hcat [text "Ident: ", ppr (global_ident g)] - , hcat [text "Id:", ppr (global_id g)] + [ hcat [text "Id:", ppr (global_id g)] , hcat [text "Count:", ppr (global_count g)] ] --- | Return number of occurrences of every global id used in the given JStgStat. +-- | Return occurrences of every global id used in the given JStgStat. -- Sort by increasing occurrence count. -globalOccs :: JStgStat -> G [GlobalOcc] +globalOccs :: JStgStat -> G [Id] globalOccs jst = do GlobalIdCache gidc <- getGlobalIdCache - -- build a map form Ident Unique to (Ident, Id, Count) + -- build a map form Ident Unique to (Id, Count) let cmp_cnt g1 g2 = compare (global_count g1) (global_count g2) inc g1 g2 = g1 { global_count = global_count g1 + global_count g2 } + + go :: UniqFM Id GlobalOcc -> [Ident] -> [GlobalOcc] go gids = \case [] -> -- return global Ids used locally sorted by increased use L.sortBy cmp_cnt $ nonDetEltsUFM gids @@ -186,7 +185,7 @@ globalOccs jst = do Just (_k,gid) -> -- add it to the list of already found global ids. Increasing -- count by 1 - let g = GlobalOcc i gid 1 - in go (addToUFM_C inc gids i g) is + let g = GlobalOcc gid 1 + in go (addToUFM_C inc gids gid g) is - pure $ go emptyUFM (identsS jst) + pure $ map global_id $ go emptyUFM $ identsS jst ===================================== testsuite/tests/javascript/Makefile ===================================== @@ -13,20 +13,21 @@ T24495: # check that the optimization occurred for -02 1 time (1 for unfloated lits) grep -c appendToHsStringA T24495.dump-js -T23479_1: - '$(TEST_HC)' $(TEST_HC_OPTS) T23479_1.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file - ./T23479_1 +T23479: + '$(TEST_HC)' $(TEST_HC_OPTS) T23479.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file + ./T23479 # check that the optimization occurred - grep -c "h\$$r1 = \"test_val_1\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_2\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_3\"" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_80_local" T23479_1.dump-js - grep -c "h\$$r1 = \"test_val_80_global" T23479_1.dump-js || true + grep -c "h\$$r1 = \"test_val_1\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_2\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_3\"" T23479.dump-js + grep -c "h\$$r1 = \"test_val_80_local" T23479.dump-js + grep -c "h\$$r1 = \"test_val_80_global" T23479.dump-js || true -T23479_2: - '$(TEST_HC)' $(TEST_HC_OPTS) T23479_2.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file - ./T23479_2 - grep -c "h\$$r1 = \"test_val_1\"" T23479_2.dump-js - grep -c "h\$$r1 = \"test_val_80_local_once" T23479_2.dump-js +T24744: + '$(TEST_HC)' $(TEST_HC_OPTS) T24744.hs -v0 -O2 -dsuppress-uniques -ddump-js -ddump-to-file + ./T24744 + grep -c "h\$$r1 = \"test_val_1\"" T24744.dump-js + grep -c "h\$$r1 = \"test_val_80_local_once" T24744.dump-js # check that the optimization occurred grep -c "h\$$r1 = h\$$decodeUtf8z" T23479_2.dump-js + grep -c "h\$$stc(h\$$mainZCMainzitestzuvalzu80zulocal,h\$$mainZCMainzitestzuvalzu80zulocal_e,\[h\$$ghczmprimZCGHCziCStringziunpackCStringzh,h\$$mainZCMainzimain7_1,h\$$mainZCMainzimain7_2\])" T24744.jsexe/out.js ===================================== testsuite/tests/javascript/T23479_1.hs → testsuite/tests/javascript/T23479.hs ===================================== ===================================== testsuite/tests/javascript/T23479_1.stdout → testsuite/tests/javascript/T23479.stdout ===================================== ===================================== testsuite/tests/javascript/T23479_2.hs → testsuite/tests/javascript/T24744.hs ===================================== ===================================== testsuite/tests/javascript/T23479_2.stdout → testsuite/tests/javascript/T24744.stdout ===================================== ===================================== testsuite/tests/javascript/all.T ===================================== @@ -23,5 +23,5 @@ test('T22455', normal, compile_and_run, ['-ddisable-js-minifier']) test('T23565', normal, compile_and_run, ['']) test('T24495', normal, makefile_test, ['T24495']) -test('T23479_1', normal, makefile_test, ['T23479_1']) -test('T23479_2', normal, makefile_test, ['T23479_2']) +test('T23479', normal, makefile_test, ['T23479']) +test('T24744', normal, makefile_test, ['T24744']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a420e23fbc4874e8dadd7794d7163a2c89a1e442 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a420e23fbc4874e8dadd7794d7163a2c89a1e442 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 06:40:37 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 01:40:37 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Cmm constant folding: Narrow results to operations bitwidth. Message-ID: <6746bee581d7a_374fad75718c1021b2@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: c0880501 by Andreas Klebinger at 2024-11-27T01:40:05-05:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - 7c0ede54 by Ben Gamari at 2024-11-27T01:40:06-05:00 ghc-toolchain: Introduce basic flag validation We verify that required flags (currently `--output` and `--triple`) are provided. The implementation is truly awful, but so is getopt. Begins to address #25500. - - - - - 56287124 by Ben Gamari at 2024-11-27T01:40:07-05:00 configure: Implement ld override whitelist Bring `configure` into alignment with `ghc-toolchain`, ensuring that the ld-override logic will only take effect on Linux and Windows. Fixes #25501. - - - - - 5086c56a by Ben Gamari at 2024-11-27T01:40:08-05:00 rts: Allow ExecPage to allocate anywhere in address space Currently the ExecPage facility has two users: * GHCi, for constructing info tables, and * the adjustor allocation path Despite neither of these have any spatial locality constraints ExecPage was using the linker's `mmapAnonForLinker`, which tries hard to ensure that mappings end up nearby the executable image. This makes adjustor allocation needlessly subject to fragmentation concerns. We now instead return less constrained mappings, improving the robustness of the mechanism. Addresses #25503. - - - - - 685b39e7 by Ben Gamari at 2024-11-27T01:40:08-05:00 base: Fix incorrect mentions of GHC.Internal.Numeric These were incorrectly changed by the automated refactoring of the `ghc-internal` migration. Fixes #25521. - - - - - 16 changed files: - compiler/GHC/Builtin/Names.hs - compiler/GHC/Cmm/Opt.hs - libraries/base/src/Data/Char.hs - libraries/base/src/Data/Semigroup.hs - libraries/base/src/Prelude.hs - libraries/ghc-internal/src/GHC/Internal/Base.hs - libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs - libraries/ghc-internal/src/GHC/Internal/Read.hs - libraries/ghc-internal/src/GHC/Internal/Real.hs - m4/find_ld.m4 - rts/ExecPage.c - rts/linker/MMap.c - rts/linker/MMap.h - + testsuite/tests/cmm/opt/T24556.cmm - testsuite/tests/cmm/opt/all.T - utils/ghc-toolchain/exe/Main.hs Changes: ===================================== compiler/GHC/Builtin/Names.hs ===================================== @@ -279,7 +279,7 @@ basicKnownKeyNames -- Dynamic toDynName, - -- GHC.Internal.Numeric stuff + -- Numeric stuff negateName, minusName, geName, eqName, mkRationalBase2Name, mkRationalBase10Name, ===================================== compiler/GHC/Cmm/Opt.hs ===================================== @@ -49,6 +49,7 @@ constantFoldExprOpt e = wrapRecExpOpt f e CmmMachOp op' args' -> fromMaybe (CmmMachOp op' args') <$> cmmMachOpFoldOptM cfg op' args' e -> pure e f (CmmRegOff r 0) = pure (CmmReg r) + f (CmmLit (CmmInt x rep)) = pure (CmmLit $ CmmInt (narrowU rep x) rep) f e = pure e constantFoldExpr :: Platform -> CmmExpr -> CmmExpr @@ -88,7 +89,7 @@ cmmMachOpFoldM _ (MO_VF_Broadcast lg _w) exprs = _ -> Nothing cmmMachOpFoldM _ op [CmmLit (CmmInt x rep)] = Just $! case op of - MO_S_Neg _ -> CmmLit (CmmInt (-x) rep) + MO_S_Neg _ -> CmmLit (CmmInt (narrowS rep (-x)) rep) MO_Not _ -> CmmLit (CmmInt (complement x) rep) -- these are interesting: we must first narrow to the @@ -164,9 +165,9 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_S_Lt _ -> Just $! CmmLit (CmmInt (if x_s < y_s then 1 else 0) (wordWidth platform)) MO_S_Le _ -> Just $! CmmLit (CmmInt (if x_s <= y_s then 1 else 0) (wordWidth platform)) - MO_Add r -> Just $! CmmLit (CmmInt (x + y) r) - MO_Sub r -> Just $! CmmLit (CmmInt (x - y) r) - MO_Mul r -> Just $! CmmLit (CmmInt (x * y) r) + MO_Add r -> Just $! CmmLit (CmmInt (narrowU r $ x + y) r) + MO_Sub r -> Just $! CmmLit (CmmInt (narrowS r $ x - y) r) + MO_Mul r -> Just $! CmmLit (CmmInt (narrowU r $ x * y) r) MO_U_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `quot` y_u) r) MO_U_Rem r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `rem` y_u) r) MO_S_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_s `quot` y_s) r) @@ -176,7 +177,7 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_Or r -> Just $! CmmLit (CmmInt (x .|. y) r) MO_Xor r -> Just $! CmmLit (CmmInt (x `xor` y) r) - MO_Shl r -> Just $! CmmLit (CmmInt (x `shiftL` fromIntegral y) r) + MO_Shl r -> Just $! CmmLit (CmmInt (narrowU r $ x `shiftL` fromIntegral y) r) MO_U_Shr r -> Just $! CmmLit (CmmInt (x_u `shiftR` fromIntegral y) r) MO_S_Shr r -> Just $! CmmLit (CmmInt (x_s `shiftR` fromIntegral y) r) ===================================== libraries/base/src/Data/Char.hs ===================================== @@ -42,7 +42,7 @@ module Data.Char , digitToInt , intToDigit - -- * GHC.Internal.Numeric representations + -- * Numeric representations , ord , chr ===================================== libraries/base/src/Data/Semigroup.hs ===================================== @@ -89,7 +89,7 @@ module Data.Semigroup ( , First(..) , Last(..) , WrappedMonoid(..) - -- * Re-exported monoids from GHC.Internal.Data.Monoid + -- * Re-exported monoids , Dual(..) , Endo(..) , All(..) ===================================== libraries/base/src/Prelude.hs ===================================== @@ -47,11 +47,11 @@ module Prelude ( -- ** Numbers - -- *** GHC.Internal.Numeric types + -- *** Numeric types Int, Integer, Float, Double, Rational, Word, - -- *** GHC.Internal.Numeric type classes + -- *** Numeric type classes Num((+), (-), (*), negate, abs, signum, fromInteger), Real(toRational), Integral(quot, rem, div, mod, quotRem, divMod, toInteger), @@ -63,7 +63,7 @@ module Prelude ( encodeFloat, exponent, significand, scaleFloat, isNaN, isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2), - -- *** GHC.Internal.Numeric functions + -- *** Numeric functions subtract, even, odd, gcd, lcm, (^), (^^), fromIntegral, realToFrac, ===================================== libraries/ghc-internal/src/GHC/Internal/Base.hs ===================================== @@ -2355,7 +2355,7 @@ getTag :: forall {lev :: Levity} (a :: TYPE (BoxedRep lev)) getTag = dataToTag# ---------------------------------------------- --- GHC.Internal.Numeric primops +-- Numeric primops ---------------------------------------------- -- Definitions of the boxed PrimOps; these will be ===================================== libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs ===================================== @@ -47,7 +47,7 @@ module GHC.Internal.Foreign.C.Types , CLLong(..), CULLong(..), CBool(..) , CIntPtr(..), CUIntPtr(..), CIntMax(..), CUIntMax(..) - -- ** GHC.Internal.Numeric types + -- ** Numeric types -- | These types are represented as @newtype at s of basic -- foreign types, and are instances of -- 'Prelude.Eq', 'Prelude.Ord', 'Prelude.Num', 'Prelude.Read', ===================================== libraries/ghc-internal/src/GHC/Internal/Read.hs ===================================== @@ -551,7 +551,7 @@ instance Read L.Lexeme where readList = readListDefault -------------------------------------------------------------- --- GHC.Internal.Numeric instances of Read +-- Numeric instances of Read -------------------------------------------------------------- readNumber :: Num a => (L.Lexeme -> ReadPrec a) -> ReadPrec a ===================================== libraries/ghc-internal/src/GHC/Internal/Real.hs ===================================== @@ -360,7 +360,7 @@ numericEnumFrom :: (Fractional a) => a -> [a] {-# INLINE numericEnumFrom #-} -- See Note [Inline Enum method helpers] in GHC.Internal.Enum numericEnumFrom n = go 0 where - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k in n' : go (k + 1) @@ -369,7 +369,7 @@ numericEnumFromThen :: (Fractional a) => a -> a -> [a] numericEnumFromThen n m = go 0 where step = m - n - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k * step in n' : go (k + 1) @@ -386,7 +386,7 @@ numericEnumFromThenTo e1 e2 !e3 !predicate | e2 >= e1 = (<= e3 + mid) | otherwise = (>= e3 + mid) -{- Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] +{- Note [Numeric Stability of Enumerating Floating Numbers] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When enumerate floating numbers, we could add the increment to the last number at every run (as what we did previously): ===================================== m4/find_ld.m4 ===================================== @@ -79,13 +79,16 @@ AC_DEFUN([FIND_LD],[ dnl See #21712. AC_CHECK_TARGET_TOOL([LD], [ld]) ;; - *) + *-linux|*-mingw32) if test "x$enable_ld_override" = "xyes"; then find_ld else AC_CHECK_TARGET_TOOL([LD], [ld]) fi ;; + *) + AC_CHECK_TARGET_TOOL([LD], [ld]) + ;; esac CHECK_LD_COPY_BUG([$1]) ]) ===================================== rts/ExecPage.c ===================================== @@ -10,7 +10,7 @@ #include "linker/MMap.h" ExecPage *allocateExecPage(void) { - ExecPage *page = (ExecPage *) mmapAnonForLinker(getPageSize()); + ExecPage *page = (ExecPage *) mmapAnon(getPageSize()); return page; } ===================================== rts/linker/MMap.c ===================================== @@ -207,6 +207,12 @@ memoryAccessToProt(MemoryAccess access) } } +void * +mmapAnon (size_t bytes) +{ + return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); +} + // // Returns NULL on failure. // @@ -410,6 +416,15 @@ mmapForLinker (size_t bytes, MemoryAccess access, uint32_t flags, int fd, int of return result; } +/* + * Map read/write pages anywhere in memory. Returns NULL on failure. + */ +void * +mmapAnon (size_t bytes) +{ + return mmapAnywhere(bytes, MEM_READ_WRITE_THEN_READ_EXECUTE, MAP_ANONYMOUS, -1, 0); +} + /* * Map read/write pages in low memory. Returns NULL on failure. */ ===================================== rts/linker/MMap.h ===================================== @@ -64,7 +64,11 @@ typedef enum { extern void *mmap_32bit_base; -// Map read/write anonymous memory. +// Map read/write anonymous memory anywhere in memory. +void *mmapAnon(size_t bytes); + +// Map read/write anonymous memory, enforcing the constraint of +// placing the mapping within 4GB of the executable image. void *mmapAnonForLinker (size_t bytes); // Change protection of previous mapping memory. ===================================== testsuite/tests/cmm/opt/T24556.cmm ===================================== @@ -0,0 +1,12 @@ +#include "Cmm.h" + +func(W_ buffer) { + I8[buffer] = %lobits8(255 + 45); + I8[buffer+(1)] = %lobits8(310 - 10); + I8[buffer+(2)] = %lobits8(30 * 10); + I8[buffer+(3)] = %lobits8(150 << 1); + // This one comes from test-primops + I64[buffer+(4)] = %zx64(((1 :: bits16) & ((1 :: bits16) & (((516 :: bits16) * (154 :: bits16)) + bits16[buffer + (0 :: W_)])))); + return(1); +} + ===================================== testsuite/tests/cmm/opt/all.T ===================================== @@ -3,3 +3,8 @@ test('T15188', cmm_src, makefile_test, []) test('T18141', normal, compile, ['']) test('T20142', normal, compile, ['']) + +# Cmm opt should not produce oversized literals in the assembly output. +# We check this by telling the assembler to exit on warnings. +test('T24556', [only_ways('optasm'), cmm_src], compile, ['-O -opta -Xassembler -opta --fatal-warnings']) + ===================================== utils/ghc-toolchain/exe/Main.hs ===================================== @@ -35,11 +35,11 @@ import GHC.Toolchain.NormaliseTriple (normaliseTriple) import Text.Read (readMaybe) data Opts = Opts - { optTriple :: String + { optTriple :: Maybe String , optTargetPrefix :: Maybe String , optLocallyExecutable :: Maybe Bool , optLlvmTriple :: Maybe String - , optOutput :: String + , optOutput :: Maybe String , optCc :: ProgOpt , optCxx :: ProgOpt , optCpp :: ProgOpt @@ -82,11 +82,11 @@ emptyFormatOpts = FormatOpts { formatOptInput = error "formatOpts: input" emptyOpts :: Opts emptyOpts = Opts - { optTriple = "" + { optTriple = Nothing , optTargetPrefix = Nothing , optLocallyExecutable = Nothing , optLlvmTriple = Nothing - , optOutput = "" + , optOutput = Nothing , optCc = po0 , optCxx = po0 , optCpp = po0 @@ -129,13 +129,13 @@ _optMergeObjs = Lens optMergeObjs (\x o -> o {optMergeObjs=x}) _optWindres = Lens optWindres (\x o -> o {optWindres=x}) _optLd = Lens optLd (\x o -> o {optLd= x}) -_optTriple :: Lens Opts String +_optTriple :: Lens Opts (Maybe String) _optTriple = Lens optTriple (\x o -> o {optTriple=x}) _optLlvmTriple :: Lens Opts (Maybe String) _optLlvmTriple = Lens optLlvmTriple (\x o -> o {optLlvmTriple=x}) -_optOutput :: Lens Opts String +_optOutput :: Lens Opts (Maybe String) _optOutput = Lens optOutput (\x o -> o {optOutput=x}) _optTargetPrefix :: Lens Opts (Maybe String) @@ -213,7 +213,7 @@ options = , Option [] ["disable-" ++ optName] (NoArg (set lens (Just False))) ("Disable " ++ description) ] - tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple) "TRIPLE") "Target triple" + tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple . Just) "TRIPLE") "Target triple" llvmTripleOpt = Option [] ["llvm-triple"] (ReqArg (set _optLlvmTriple . Just) "LLVM-TRIPLE") "LLVM Target triple" targetPrefixOpt = Option ['T'] ["target-prefix"] (ReqArg (set _optTargetPrefix . Just) "PREFIX") @@ -233,7 +233,7 @@ options = keepTempOpt = Option [] ["keep-temp"] (NoArg (set _optKeepTemp True)) "do not remove temporary files" - outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput) "OUTPUT") + outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput . Just) "OUTPUT") "The output path for the generated target toolchain configuration" formatOpts :: [OptDescr (FormatOpts -> FormatOpts)] @@ -244,6 +244,16 @@ formatOpts = [ "The target file to format") ] +validateOpts :: Opts -> [String] +validateOpts opts = mconcat + [ assertJust _optTriple "missing --triple flag" + , assertJust _optOutput "missing --output flag" + ] + where + assertJust :: Lens Opts (Maybe a) -> String -> [String] + assertJust lens msg = + [ msg | Nothing <- pure $ view lens opts ] + main :: IO () main = do argv <- getArgs @@ -273,14 +283,14 @@ doFormat args = do doConfigure :: [String] -> IO () doConfigure args = do - let (opts0, _nonopts, errs) = getOpt RequireOrder options args + let (opts0, _nonopts, parseErrs) = getOpt RequireOrder options args let opts = foldr (.) id opts0 emptyOpts - case errs of + case parseErrs ++ validateOpts opts of [] -> do let env = Env { verbosity = optVerbosity opts , targetPrefix = case optTargetPrefix opts of Just prefix -> Just prefix - Nothing -> Just $ optTriple opts ++ "-" + Nothing -> Just $ fromMaybe (error "undefined triple") (optTriple opts) ++ "-" , keepTemp = optKeepTemp opts , canLocallyExecute = fromMaybe True (optLocallyExecutable opts) , logContexts = [] @@ -289,7 +299,7 @@ doConfigure args = do case r of Left err -> print err >> exitWith (ExitFailure 2) Right () -> return () - _ -> do + errs -> do mapM_ putStrLn errs putStrLn $ usageInfo "ghc-toolchain" options exitWith (ExitFailure 1) @@ -298,7 +308,7 @@ run :: Opts -> M () run opts = do tgt <- mkTarget opts logDebug $ "Final Target: " ++ show tgt - let file = optOutput opts + let file = fromMaybe (error "undefined --output") (optOutput opts) writeFile file (show tgt) optional :: M a -> M (Maybe a) @@ -390,7 +400,7 @@ ldOverrideWhitelist a = mkTarget :: Opts -> M Target mkTarget opts = do - normalised_triple <- normaliseTriple (optTriple opts) + normalised_triple <- normaliseTriple (fromMaybe (error "missing --triple") (optTriple opts)) -- Use Llvm target if specified, otherwise use triple as llvm target let tgtLlvmTarget = fromMaybe normalised_triple (optLlvmTriple opts) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3e679889ad102edf634a82920c24f63e311643f5...685b39e72fcffb3a82eaf600443b22567ac09ef9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3e679889ad102edf634a82920c24f63e311643f5...685b39e72fcffb3a82eaf600443b22567ac09ef9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 08:28:19 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Wed, 27 Nov 2024 03:28:19 -0500 Subject: [Git][ghc/ghc][wip/T24359] Remove accidental trace Message-ID: <6746d823c0723_374fade621841291c9@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 0295f87c by Simon Peyton Jones at 2024-11-27T08:28:05+00:00 Remove accidental trace - - - - - 1 changed file: - compiler/GHC/Core/Opt/Simplify/Utils.hs Changes: ===================================== compiler/GHC/Core/Opt/Simplify/Utils.hs ===================================== @@ -455,7 +455,7 @@ mkRewriteCall :: Id -> RuleEnv -> RewriteCall mkRewriteCall fun rule_env | not (null rules) = TryRules n_required rules | canUnfold unf = TryInlining - | otherwise = pprTrace "mkRewriteCall" (ppr fun) TryNothing + | otherwise = TryNothing where n_required = maximum (map ruleArity rules) rules = getRules rule_env fun View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0295f87c7d484a6a7795356115c2e9ea973f58b4 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0295f87c7d484a6a7795356115c2e9ea973f58b4 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 10:14:58 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Wed, 27 Nov 2024 05:14:58 -0500 Subject: [Git][ghc/ghc][wip/mp-module-graph] 72 commits: Handle the special ghc-prim:GHC.Prim module in the compiler Message-ID: <6746f12220593_1adcb33041fc90925@gitlab.mail> Matthew Pickering pushed to branch wip/mp-module-graph at Glasgow Haskell Compiler / GHC Commits: d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 48f02c05 by Rodrigo Mesquita at 2024-11-20T15:23:39+00:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. ------------------------- Metric Decrease: mhu-perf ------------------------- - - - - - 739947f1 by Matthew Pickering at 2024-11-27T09:40:42+00:00 WIP external grpah - - - - - 434881db by Matthew Pickering at 2024-11-27T09:40:42+00:00 getLinkDeps and ExternalNode - - - - - 30 changed files: - .gitlab/merge_request_templates/Default.md - boot - compile_flags.txt - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/TyCon.hs - compiler/GHC/Data/FastString.hs - compiler/GHC/Data/Graph/Directed.hs - + compiler/GHC/Data/Graph/Directed/Internal.hs - + compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Data/StringBuffer.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Lazy.hs - compiler/GHC/Data/Word64Map/Strict.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Errors/Ppr.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/Iface/Ext/Ast.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/49563cd6593e4c132a722727e483b4892b5215c3...434881db760a50184ce899ed7f4bfdd66df13a42 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/49563cd6593e4c132a722727e483b4892b5215c3...434881db760a50184ce899ed7f4bfdd66df13a42 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 11:03:35 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Wed, 27 Nov 2024 06:03:35 -0500 Subject: [Git][ghc/ghc][wip/romes/refator-modulegraph] Refactor ModuleGraph interface Message-ID: <6746fc87ba9f3_1adcb356aa68939cf@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/refator-modulegraph at Glasgow Haskell Compiler / GHC Commits: 062076f1 by Rodrigo Mesquita at 2024-11-27T11:03:15+00:00 Refactor ModuleGraph interface The 'ModuleGraph' abstraction represents the relationship and strucutre of the modules being compiled. This structure is meant to be constructed once at the start of compilation, and never changed again. However, it's exposed interface was confusing and exposed too many footguns which led to inneficient usages of the ModuleGraph. This commit improves significantly the exported interface of ModuleGraph, taking into consideration the recent improvements around reachability queries. Since the ModuleGraph graphs and related structures (HPT, EPS) are performance critical in the sense that somewhat simple mistakes can cause bad leaks and non-linear memory usage, we want to have proper APIs that guide efficient usage. This is a good step in that direction. - - - - - 8 changed files: - compiler/GHC.hs - compiler/GHC/Driver/Env.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModSummary.hs - testsuite/tests/ghc-api/downsweep/OldModLocation.hs - testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs Changes: ===================================== compiler/GHC.hs ===================================== @@ -74,7 +74,7 @@ module GHC ( compileToCoreModule, compileToCoreSimplified, -- * Inspecting the module structure of the program - ModuleGraph, emptyMG, mapMG, mkModuleGraph, mgModSummaries, + ModuleGraph, emptyMG, mgMap, mkModuleGraph, mgModSummaries, mgLookupModule, ModSummary(..), ms_mod_name, ModLocation(..), pattern ModLocation, @@ -874,7 +874,7 @@ setProgramDynFlags_ invalidate_needed dflags = do -- invalidateModSummaryCache :: GhcMonad m => m () invalidateModSummaryCache = - modifySession $ \h -> h { hsc_mod_graph = mapMG inval (hsc_mod_graph h) } + modifySession $ \h -> h { hsc_mod_graph = mgMap inval (hsc_mod_graph h) } where inval ms = ms { ms_hs_hash = fingerprint0 } ===================================== compiler/GHC/Driver/Env.hs ===================================== @@ -41,6 +41,8 @@ where import GHC.Prelude +import GHC.Builtin.Names ( gHC_PRIM ) + import GHC.Driver.DynFlags import GHC.Driver.Errors ( printOrThrowDiagnostics ) import GHC.Driver.Errors.Types ( GhcMessage ) @@ -70,8 +72,6 @@ import GHC.Types.Name import GHC.Types.Name.Env import GHC.Types.TyThing -import GHC.Builtin.Names ( gHC_PRIM ) - import GHC.Data.Maybe import GHC.Utils.Exception as Ex @@ -274,9 +274,11 @@ hptSomeThingsBelowUs extract include_hi_boot hsc_env uid mn mg = hsc_mod_graph hsc_env in [ thing - | - -- Find each non-hi-boot module below me - (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) <- Set.toList (moduleGraphModulesBelow mg uid mn) + -- "Finding each non-hi-boot module below me" maybe could be cached in the module + -- graph to avoid filtering the boots out of the transitive closure out + -- every time this is called + | (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) + <- Set.toList (moduleGraphModulesBelow mg uid mn) , include_hi_boot || (is_boot == NotBoot) -- unsavoury: when compiling the base package with --make, we ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -1453,7 +1453,7 @@ oneShotMsg logger recomp = batchMsg :: Messager batchMsg = batchMsgWith (\_ _ _ _ -> empty) batchMultiMsg :: Messager -batchMultiMsg = batchMsgWith (\_ _ _ node -> brackets (ppr (moduleGraphNodeUnitId node))) +batchMultiMsg = batchMsgWith (\_ _ _ node -> brackets (ppr (mgNodeUnitId node))) batchMsgWith :: (HscEnv -> (Int, Int) -> RecompileRequired -> ModuleGraphNode -> SDoc) -> Messager batchMsgWith extra hsc_env_start mod_index recomp node = @@ -1469,7 +1469,7 @@ batchMsgWith extra hsc_env_start mod_index recomp node = LinkNode {} -> "Linking" InstantiationNode {} -> "Instantiating" ModuleNode {} -> "Compiling" - hsc_env = hscSetActiveUnitId (moduleGraphNodeUnitId node) hsc_env_start + hsc_env = hscSetActiveUnitId (mgNodeUnitId node) hsc_env_start dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env state = hsc_units hsc_env ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -250,11 +250,9 @@ depanalPartial diag_wrapper msg excluded_mods allow_dup_roots = do -- cached finder data. liftIO $ flushFinderCaches (hsc_FC hsc_env) (hsc_unit_env hsc_env) - (errs, graph_nodes) <- liftIO $ downsweep + (errs, mod_graph) <- liftIO $ downsweep hsc_env diag_wrapper msg (mgModSummaries old_graph) excluded_mods allow_dup_roots - let - mod_graph = mkModuleGraph graph_nodes return (unionManyMessages errs, mod_graph) -- | Collect the instantiations of dependencies to create 'InstantiationNode' work graph nodes. @@ -289,7 +287,7 @@ linkNodes summaries uid hue = ofile = outputFile_ dflags unit_nodes :: [NodeKey] - unit_nodes = map mkNodeKey (filter ((== uid) . moduleGraphNodeUnitId) summaries) + unit_nodes = map mkNodeKey (filter ((== uid) . mgNodeUnitId) summaries) -- Issue a warning for the confusing case where the user -- said '-o foo' but we're not going to do any linking. -- We attempt linking if either (a) one of the modules is @@ -632,13 +630,18 @@ createBuildPlan mod_graph maybe_top_mod = -- An environment mapping a module to its hs-boot file and all nodes on the path between the two, if one exists boot_modules = mkModuleEnv - [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) | m@(ModuleNode _ ms) <- (mgModSummaries' mod_graph), isBootSummary ms == IsBoot] + [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) + | m@(ModuleNode _ ms) <- mgModSummaries' mod_graph + , isBootSummary ms == IsBoot] select_boot_modules :: [ModuleGraphNode] -> [ModuleGraphNode] select_boot_modules = mapMaybe (fmap fst . get_boot_module) get_boot_module :: ModuleGraphNode -> Maybe (ModuleGraphNode, [ModuleGraphNode]) - get_boot_module m = case m of ModuleNode _ ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing + get_boot_module (ModuleNode _ ms) + | HsSrcFile <- ms_hsc_src ms + = lookupModuleEnv boot_modules (ms_mod ms) + get_boot_module _ = Nothing -- Any cycles should be resolved now collapseSCC :: [SCC ModuleGraphNode] -> Either [ModuleGraphNode] [(Either ModuleGraphNode ModuleGraphNodeWithBootFile)] @@ -668,8 +671,8 @@ createBuildPlan mod_graph maybe_top_mod = in - assertPpr (sum (map countMods build_plan) == length (mgModSummaries' mod_graph)) - (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (length (mgModSummaries' mod_graph )))]) + assertPpr (sum (map countMods build_plan) == lengthMG mod_graph) + (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (lengthMG mod_graph))]) build_plan mkWorkerLimit :: DynFlags -> IO WorkerLimit @@ -1142,7 +1145,7 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do !build_map <- getBuildMap hug_var <- gets hug_var -- 1. Get the direct dependencies of this module - let direct_deps = nodeDependencies False mod + let direct_deps = mgNodeDependencies False mod -- It's really important to force build_deps, or the whole buildMap is retained, -- which would retain all the result variables, preventing us from collecting them -- after they are no longer used. @@ -1150,14 +1153,14 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do let !build_action = case mod of InstantiationNode uid iu -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeInstantiationNode mod_idx n_mods hug uid iu return (Nothing, deps) ModuleNode _build_deps ms -> let !old_hmi = M.lookup (msKey ms) old_hpt rehydrate_mods = mapMaybe nodeKeyModName <$> rehydrate_nodes - in withCurrentUnit (moduleGraphNodeUnitId mod) $ do + in withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps hmi <- executeCompileNode mod_idx n_mods old_hmi hug rehydrate_mods ms -- Write the HMI to an external cache (if one exists) @@ -1166,9 +1169,9 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do -- This global MVar is incrementally modified in order to avoid having to -- recreate the HPT before compiling each module which leads to a quadratic amount of work. liftIO $ modifyMVar_ hug_var (return . addHomeModInfoToHug hmi) - return (Just hmi, addToModuleNameSet (moduleGraphNodeUnitId mod) (ms_mod_name ms) deps ) + return (Just hmi, addToModuleNameSet (mgNodeUnitId mod) (ms_mod_name ms) deps ) LinkNode _nks uid -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeLinkNode hug (mod_idx, n_mods) uid direct_deps return (Nothing, deps) @@ -1570,7 +1573,7 @@ downsweep :: HscEnv -> Bool -- True <=> allow multiple targets to have -- the same module name; this is -- very useful for ghc -M - -> IO ([DriverMessages], [ModuleGraphNode]) + -> IO ([DriverMessages], ModuleGraph) -- The non-error elements of the returned list all have distinct -- (Modules, IsBoot) identifiers, unless the Bool is true in -- which case there can be repeats @@ -1595,7 +1598,7 @@ downsweep_imports :: HscEnv -> [ModuleName] -> Bool -> ([(UnitId, DriverMessages)], [ModSummary]) - -> IO ([DriverMessages], [ModuleGraphNode]) + -> IO ([DriverMessages], ModuleGraph) downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, rootSummariesOk) = do let root_map = mkRootMap rootSummariesOk @@ -1620,7 +1623,7 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro th_enabled_nodes <- enableCodeGenForTH logger tmpfs unit_env all_nodes if null all_root_errs then return (all_errs, th_enabled_nodes) - else pure $ (all_root_errs, []) + else pure $ (all_root_errs, emptyMG) where -- Dependencies arising on a unit (backpack and module linking deps) unitModuleNodes :: [ModuleGraphNode] -> UnitId -> HomeUnitEnv -> [Either (Messages DriverMessage) ModuleGraphNode] @@ -1870,7 +1873,7 @@ enableCodeGenForTH -> TmpFs -> UnitEnv -> [ModuleGraphNode] - -> IO [ModuleGraphNode] + -> IO ModuleGraph enableCodeGenForTH logger tmpfs unit_env = enableCodeGenWhen logger tmpfs TFL_CurrentModule TFL_GhcSession unit_env @@ -1893,19 +1896,19 @@ enableCodeGenWhen -> TempFileLifetime -> UnitEnv -> [ModuleGraphNode] - -> IO [ModuleGraphNode] -enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = - mapM enable_code_gen mod_graph + -> IO ModuleGraph +enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = do + mgMapM enable_code_gen mg where defaultBackendOf ms = platformDefaultBackend (targetPlatform $ ue_unitFlags (ms_unitid ms) unit_env) - enable_code_gen :: ModuleGraphNode -> IO ModuleGraphNode - enable_code_gen n@(ModuleNode deps ms) + enable_code_gen :: ModSummary -> IO ModSummary + enable_code_gen ms | ModSummary { ms_location = ms_location , ms_hsc_src = HsSrcFile , ms_hspp_opts = dflags } <- ms - , Just enable_spec <- mkNodeKey n `Map.lookup` needs_codegen_map = + , Just enable_spec <- needs_codegen_map (NodeKey_Module (msKey ms)) = if | nocode_enable ms -> do let new_temp_file suf dynsuf = do tn <- newTempName logger tmpfs (tmpDir dflags) staticLife suf @@ -1937,7 +1940,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = , ms_hspp_opts = updOptLevel 0 $ new_dflags } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' -- If -fprefer-byte-code then satisfy dependency by enabling bytecode (if normal object not enough) -- we only get to this case if the default backend is already generating object files, but we need dynamic @@ -1947,21 +1950,21 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ByteCodeAndObjectCode } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' | dynamic_too_enable enable_spec ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_BuildDynamicToo } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' | ext_interp_enable ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ExternalInterpreter } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' - | otherwise -> return n + | otherwise -> return ms enable_code_gen ms = return ms @@ -2018,23 +2021,23 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = lcl_dflags = ms_hspp_opts ms internalInterpreter = not (gopt Opt_ExternalInterpreter lcl_dflags) - (mg, lookup_node) = moduleGraphNodes False mod_graph - - mk_needed_set roots = Set.fromList $ map (mkNodeKey . node_payload) $ reachablesG mg (map (expectJust "needs_th" . lookup_node) roots) + mg = mkModuleGraph mod_graph - needs_obj_set, needs_bc_set :: Set.Set NodeKey - needs_obj_set = mk_needed_set need_obj_set + needs_obj_set, needs_bc_set :: NodeKey -> Bool + needs_obj_set k = k `elem` need_obj_set || mgQueryMany mg need_obj_set k - needs_bc_set = mk_needed_set need_bc_set + needs_bc_set k = k `elem` need_obj_set || mgQueryMany mg need_bc_set k -- A map which tells us how to enable code generation for a NodeKey - needs_codegen_map :: Map.Map NodeKey CodeGenEnable - needs_codegen_map = + needs_codegen_map :: NodeKey -> Maybe CodeGenEnable + needs_codegen_map nk = -- Another option here would be to just produce object code, rather than both object and -- byte code - Map.unionWith (\_ _ -> EnableByteCodeAndObject) - (Map.fromList $ [(m, EnableObject) | m <- Set.toList needs_obj_set]) - (Map.fromList $ [(m, EnableByteCode) | m <- Set.toList needs_bc_set]) + case (needs_obj_set nk, needs_bc_set nk) of + (True, True) -> Just EnableByteCodeAndObject + (True, False) -> Just EnableObject + (False, True) -> Just EnableByteCode + (False, False) -> Nothing -- The direct dependencies of modules which require object code need_obj_set = @@ -2470,14 +2473,14 @@ cyclicModuleErr mss Just path -> mkPlainErrorMsgEnvelope src_span $ GhcDriverMessage $ DriverModuleGraphCycle path where - src_span = maybe noSrcSpan (mkFileSrcSpan . ms_location) (moduleGraphNodeModSum (head path)) + src_span = maybe noSrcSpan (mkFileSrcSpan . ms_location) (mgNodeModSum (head path)) where graph :: [Node NodeKey ModuleGraphNode] graph = [ DigraphNode { node_payload = ms , node_key = mkNodeKey ms - , node_dependencies = nodeDependencies False ms + , node_dependencies = mgNodeDependencies False ms } | ms <- mss ] ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -2,52 +2,106 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveTraversable #-} +-- | A module graph should be constructed once and never change from there onwards. +-- +-- The only operations should be for building the 'ModuleGraph' +-- (once and for all -- no update-like/insert-like functions) +-- and querying the structure in various ways, e.g. to determine reachability. +-- +-- We should avoid exposing fields like 'mg_mss' since it may be a footgun +-- trying to use the nodes directly... We do still expose it, but it feels like +-- all its use cases would be better served by a more proper ModuleGraph +-- abstraction module GHC.Unit.Module.Graph - ( ModuleGraph - , ModuleGraphNode(..) - , nodeDependencies + ( + -- * Construct a module graph + -- + -- | A module graph should be constructed once by downsweep and never modified. + ModuleGraph , emptyMG , mkModuleGraph - , extendMG - , extendMGInst - , extendMG' - , unionMG - , isTemplateHaskellOrQQNonBoot - , filterToposortToModules - , mapMG + + -- * Nodes in a module graph + -- + -- | The user-facing nodes in a module graph are 'ModuleGraphNode's. + -- There are a few things which we can query out of each 'ModuleGraphNode': + -- + -- - 'mgNodeDependencies' gets the immediate dependencies of this node + -- - 'mgNodeUnitId' returns the 'UnitId' of that node + -- - 'mgNodeModSum' extracts the 'ModSummary' of a node if exists + , ModuleGraphNode(..) + , mgNodeDependencies + , mgNodeModSum + , mgNodeUnitId + + -- * Module graph operations + , lengthMG + + -- ** 'ModSummary' operations + -- + -- | A couple of operations on the module graph allow access to the + -- 'ModSummary's of the modules in it contained. + -- + -- In particular, 'mapMG' and 'mapMGM' allow updating these 'ModSummary's + -- (without changing the 'ModuleGraph' structure itself!). + -- 'mgModSummaries' lists out all 'ModSummary's, and + -- 'mgLookupModule' looks up a 'ModSummary' for a given module. + , mgMap, mgMapM , mgModSummaries - , mgModSummaries' , mgLookupModule - , showModMsg - , moduleGraphNodeModule - , moduleGraphNodeModSum - , moduleGraphModulesBelow + + -- ** Reachability queries + -- + -- | A module graph explains the structure and relationship between the + -- modules being compiled. Often times, this structure is relevant to + -- answer reachability queries -- is X reachable from Y; or, what is the + -- transitive closure of Z? , mgReachable , mgQuery - + , mgQueryMany + + -- ** Other operations + -- + -- | These operations allow more-internal-than-ideal access to the + -- ModuleGraph structure. Ideally, we could restructure the code using + -- these functions to avoid deconstructing/reconstructing the ModuleGraph + -- and instead extend the "proper interface" of the ModuleGraph to achieve + -- what is currently done but through a better abstraction. + , mgModSummaries' , moduleGraphNodes - , SummaryNode - , summaryNodeSummary + , moduleGraphModulesBelow -- needed for 'hptSomeThingsBelowUs', + -- but I think we could be more clever and cache + -- the graph-ixs of boot modules to efficiently + -- filter them out of the returned list. + -- hptInstancesBelow is re-doing that work every + -- time it's called. + , filterToposortToModules + -- * Keys into the 'ModuleGraph' , NodeKey(..) + , mkNodeKey , nodeKeyUnitId , nodeKeyModName , ModNodeKey - , mkNodeKey + , ModNodeKeyWithUid(..) , msKey + -- ** Internal node representation + -- + -- | 'SummaryNode' is the internal representation for each node stored in + -- the graph. It's not immediately clear to me why users do depend on them. + , SummaryNode + , summaryNodeSummary + , summaryNodeKey - , moduleGraphNodeUnitId - - , ModNodeKeyWithUid(..) + -- * Utilities + , showModMsg ) where import GHC.Prelude import GHC.Platform -import qualified GHC.LanguageExtensions as LangExt - import GHC.Data.Maybe import GHC.Data.Graph.Directed import GHC.Data.Graph.Directed.Reachability @@ -73,7 +127,44 @@ import GHC.Linker.Static.Utils import Data.Bifunctor import Data.Function import Data.List (sort) -import GHC.Data.List.SetOps +import Control.Monad + +-- | A '@ModuleGraph@' contains all the nodes from the home package (only). See +-- '@ModuleGraphNode@' for information about the nodes. +-- +-- Modules need to be compiled. hs-boots need to be typechecked before +-- the associated "real" module so modules with {-# SOURCE #-} imports can be +-- built. Instantiations also need to be typechecked to ensure that the module +-- fits the signature. Substantiation typechecking is roughly comparable to the +-- check that the module and its hs-boot agree. +-- +-- The graph is not necessarily stored in topologically-sorted order. Use +-- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. +data ModuleGraph = ModuleGraph + { mg_mss :: [ModuleGraphNode] + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) + -- A cached transitive dependency calculation so that a lot of work is not + -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) + } + +-- | Why do we ever need to construct empty graphs? Is it because of one shot mode? +emptyMG :: ModuleGraph +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) + +-- | Construct a module graph. This function should be the only entry point for +-- building a 'ModuleGraph', since it is supposed to be built once and never modified. +-- +-- If you ever find the need to build a 'ModuleGraph' iteratively, don't +-- add insert and update functions to the API since they become footguns. +-- Instead, design an API that allows iterative construction without posterior +-- modification, perhaps like what is done for building arrays from mutable +-- arrays. +mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph +mkModuleGraph = foldr (flip extendMG') emptyMG + +-------------------------------------------------------------------------------- +-- * Module Graph Nodes +-------------------------------------------------------------------------------- -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -87,16 +178,36 @@ data ModuleGraphNode -- | Link nodes are whether are are creating a linked product (ie executable/shared object etc) for a unit. | LinkNode [NodeKey] UnitId -moduleGraphNodeModule :: ModuleGraphNode -> Maybe ModuleName -moduleGraphNodeModule mgn = ms_mod_name <$> (moduleGraphNodeModSum mgn) +-- | Collect the immediate dependencies of a ModuleGraphNode, +-- optionally avoiding hs-boot dependencies. +-- If the drop_hs_boot_nodes flag is False, and if this is a .hs and there is +-- an equivalent .hs-boot, add a link from the former to the latter. This +-- has the effect of detecting bogus cases where the .hs-boot depends on the +-- .hs, by introducing a cycle. Additionally, it ensures that we will always +-- process the .hs-boot before the .hs, and so the HomePackageTable will always +-- have the most up to date information. +mgNodeDependencies :: Bool -> ModuleGraphNode -> [NodeKey] +mgNodeDependencies drop_hs_boot_nodes = \case + LinkNode deps _uid -> deps + InstantiationNode uid iuid -> + NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) + ModuleNode deps _ms -> + map drop_hs_boot deps + where + -- Drop hs-boot nodes by using HsSrcFile as the key + hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature + | otherwise = IsBoot + + drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) uid)) + drop_hs_boot x = x -moduleGraphNodeModSum :: ModuleGraphNode -> Maybe ModSummary -moduleGraphNodeModSum (InstantiationNode {}) = Nothing -moduleGraphNodeModSum (LinkNode {}) = Nothing -moduleGraphNodeModSum (ModuleNode _ ms) = Just ms +mgNodeModSum :: ModuleGraphNode -> Maybe ModSummary +mgNodeModSum (InstantiationNode {}) = Nothing +mgNodeModSum (LinkNode {}) = Nothing +mgNodeModSum (ModuleNode _ ms) = Just ms -moduleGraphNodeUnitId :: ModuleGraphNode -> UnitId -moduleGraphNodeUnitId mgn = +mgNodeUnitId :: ModuleGraphNode -> UnitId +mgNodeUnitId mgn = case mgn of InstantiationNode uid _iud -> uid ModuleNode _ ms -> toUnitId (moduleUnit (ms_mod ms)) @@ -114,79 +225,43 @@ instance Eq ModuleGraphNode where instance Ord ModuleGraphNode where compare = compare `on` mkNodeKey -data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit - | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid - | NodeKey_Link !UnitId - deriving (Eq, Ord) - -instance Outputable NodeKey where - ppr nk = pprNodeKey nk +-------------------------------------------------------------------------------- +-- * Module Graph operations +-------------------------------------------------------------------------------- -pprNodeKey :: NodeKey -> SDoc -pprNodeKey (NodeKey_Unit iu) = ppr iu -pprNodeKey (NodeKey_Module mk) = ppr mk -pprNodeKey (NodeKey_Link uid) = ppr uid +-- | Returns the number of nodes in a 'ModuleGraph' +lengthMG :: ModuleGraph -> Int +lengthMG = length . mg_mss -nodeKeyUnitId :: NodeKey -> UnitId -nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu -nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk -nodeKeyUnitId (NodeKey_Link uid) = uid - -nodeKeyModName :: NodeKey -> Maybe ModuleName -nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) -nodeKeyModName _ = Nothing - -data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot - , mnkUnitId :: !UnitId } deriving (Eq, Ord) - -instance Outputable ModNodeKeyWithUid where - ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib - --- | A '@ModuleGraph@' contains all the nodes from the home package (only). See --- '@ModuleGraphNode@' for information about the nodes. --- --- Modules need to be compiled. hs-boots need to be typechecked before --- the associated "real" module so modules with {-# SOURCE #-} imports can be --- built. Instantiations also need to be typechecked to ensure that the module --- fits the signature. Substantiation typechecking is roughly comparable to the --- check that the module and its hs-boot agree. --- --- The graph is not necessarily stored in topologically-sorted order. Use --- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. -data ModuleGraph = ModuleGraph - { mg_mss :: [ModuleGraphNode] - , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) - -- A cached transitive dependency calculation so that a lot of work is not - -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) - } +-------------------------------------------------------------------------------- +-- ** ModSummaries +-------------------------------------------------------------------------------- -- | Map a function 'f' over all the 'ModSummaries'. --- To preserve invariants 'f' can't change the isBoot status. -mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph -mapMG f mg at ModuleGraph{..} = mg +-- To preserve invariants, 'f' can't change the isBoot status. +mgMap :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph +mgMap f mg at ModuleGraph{..} = mg { mg_mss = flip fmap mg_mss $ \case InstantiationNode uid iuid -> InstantiationNode uid iuid LinkNode uid nks -> LinkNode uid nks ModuleNode deps ms -> ModuleNode deps (f ms) } -unionMG :: ModuleGraph -> ModuleGraph -> ModuleGraph -unionMG a b = - let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b - in ModuleGraph { - mg_mss = new_mss - , mg_graph = mkTransDeps new_mss - } - -mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False +-- | Map a function 'f' over all the 'ModSummaries', in 'IO'. +-- To preserve invariants, 'f' can't change the isBoot status. +mgMapM :: (ModSummary -> IO ModSummary) -> ModuleGraph -> IO ModuleGraph +mgMapM f mg at ModuleGraph{..} = do + mss' <- forM mg_mss $ \case + InstantiationNode uid iuid -> pure $ InstantiationNode uid iuid + LinkNode uid nks -> pure $ LinkNode uid nks + ModuleNode deps ms -> ModuleNode deps <$> (f ms) + return mg + { mg_mss = mss' + } mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] -mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] -mgModSummaries' = mg_mss - -- | Look up a ModSummary in the ModuleGraph -- Looks up the non-boot ModSummary -- Linear in the size of the module graph @@ -199,128 +274,53 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss = Just ms go _ = Nothing -emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) - -isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool -isTemplateHaskellOrQQNonBoot ms = - (xopt LangExt.TemplateHaskell (ms_hspp_opts ms) - || xopt LangExt.QuasiQuotes (ms_hspp_opts ms)) && - (isBootSummary ms == NotBoot) - --- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is --- not an element of the ModuleGraph. -extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph -extendMG ModuleGraph{..} deps ms = ModuleGraph - { mg_mss = ModuleNode deps ms : mg_mss - , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) - } - -extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph -extendMGInst mg uid depUnitId = mg - { mg_mss = InstantiationNode uid depUnitId : mg_mss mg - } - -extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph -extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } +-------------------------------------------------------------------------------- +-- ** Reachability +-------------------------------------------------------------------------------- -extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph -extendMG' mg = \case - InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId - ModuleNode deps ms -> extendMG mg deps ms - LinkNode deps uid -> extendMGLink mg uid deps - -mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph -mkModuleGraph = foldr (flip extendMG') emptyMG - --- | This function filters out all the instantiation nodes from each SCC of a --- topological sort. Use this with care, as the resulting "strongly connected components" --- may not really be strongly connected in a direct way, as instantiations have been --- removed. It would probably be best to eliminate uses of this function where possible. -filterToposortToModules - :: [SCC ModuleGraphNode] -> [SCC ModSummary] -filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case - InstantiationNode _ _ -> Nothing - LinkNode{} -> Nothing - ModuleNode _deps node -> Just node - where - -- This higher order function is somewhat bogus, - -- as the definition of "strongly connected component" - -- is not necessarily respected. - mapMaybeSCC :: (a -> Maybe b) -> SCC a -> Maybe (SCC b) - mapMaybeSCC f = \case - AcyclicSCC a -> AcyclicSCC <$> f a - CyclicSCC as -> case mapMaybe f as of - [] -> Nothing - [a] -> Just $ AcyclicSCC a - as -> Just $ CyclicSCC as - -showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc -showModMsg dflags _ (LinkNode {}) = - let staticLink = case ghcLink dflags of - LinkStaticLib -> True - _ -> False - - platform = targetPlatform dflags - arch_os = platformArchOS platform - exe_file = exeFileName arch_os staticLink (outputFile_ dflags) - in text exe_file -showModMsg _ _ (InstantiationNode _uid indef_unit) = - ppr $ instUnitInstanceOf indef_unit -showModMsg dflags recomp (ModuleNode _ mod_summary) = - if gopt Opt_HideSourcePaths dflags - then text mod_str - else hsep $ - [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') - , char '(' - , text (op $ msHsFilePath mod_summary) <> char ',' - , message, char ')' ] - - where - op = normalise - mod_str = moduleNameString (moduleName (ms_mod mod_summary)) ++ - hscSourceString (ms_hsc_src mod_summary) - dyn_file = op $ msDynObjFilePath mod_summary - obj_file = op $ msObjFilePath mod_summary - files = [ obj_file ] - ++ [ dyn_file | gopt Opt_BuildDynamicToo dflags ] - ++ [ "interpreted" | gopt Opt_ByteCodeAndObjectCode dflags ] - message = case backendSpecialModuleSource (backend dflags) recomp of - Just special -> text special - Nothing -> foldr1 (\ofile rest -> ofile <> comma <+> rest) (map text files) - - - -type SummaryNode = Node Int ModuleGraphNode +-- | Return all nodes reachable from the given 'NodeKey'. +mgReachable :: ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk -summaryNodeKey :: SummaryNode -> Int -summaryNodeKey = node_key +-- | Reachability Query. +-- +-- @mgQuery(g, a, b)@ asks: +-- Can we reach @b@ from @a@ in graph @g@? +-- +-- Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb -summaryNodeSummary :: SummaryNode -> ModuleGraphNode -summaryNodeSummary = node_payload +-- | Many roots reachability Query. +-- +-- @mgQuery(g, roots, b)@ asks: +-- Can we reach @b@ from any of the @roots@ in graph @g@? +-- +-- Node @b@ must be in @g at . +mgQueryMany :: ModuleGraph -- ^ @g@ + -> [NodeKey] -- ^ @roots@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @roots@ +mgQueryMany mg roots nkb = isReachableMany td_map nroots nb where + (td_map, lookup_node) = mg_graph mg + nroots = mapMaybe lookup_node roots + nb = expectJust "mgQuery:b" $ lookup_node nkb --- | Collect the immediate dependencies of a ModuleGraphNode, --- optionally avoiding hs-boot dependencies. --- If the drop_hs_boot_nodes flag is False, and if this is a .hs and there is --- an equivalent .hs-boot, add a link from the former to the latter. This --- has the effect of detecting bogus cases where the .hs-boot depends on the --- .hs, by introducing a cycle. Additionally, it ensures that we will always --- process the .hs-boot before the .hs, and so the HomePackageTable will always --- have the most up to date information. -nodeDependencies :: Bool -> ModuleGraphNode -> [NodeKey] -nodeDependencies drop_hs_boot_nodes = \case - LinkNode deps _uid -> deps - InstantiationNode uid iuid -> - NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) - ModuleNode deps _ms -> - map drop_hs_boot deps - where - -- Drop hs-boot nodes by using HsSrcFile as the key - hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature - | otherwise = IsBoot +-------------------------------------------------------------------------------- +-- ** Other operations (read haddocks on export list) +-------------------------------------------------------------------------------- - drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) uid)) - drop_hs_boot x = x +mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] +mgModSummaries' = mg_mss -- | Turn a list of graph nodes into an efficient queriable graph. -- The first boolean parameter indicates whether nodes corresponding to hs-boot files @@ -340,16 +340,16 @@ moduleGraphNodes drop_hs_boot_nodes summaries = ModuleNode __deps ms | isBootSummary ms == IsBoot, drop_hs_boot_nodes -- Using nodeDependencies here converts dependencies on other -- boot files to dependencies on dependencies on non-boot files. - -> Left (ms_mod ms, nodeDependencies drop_hs_boot_nodes s) + -> Left (ms_mod ms, mgNodeDependencies drop_hs_boot_nodes s) _ -> normal_case where normal_case = - let lkup_key = ms_mod <$> moduleGraphNodeModSum s + let lkup_key = ms_mod <$> mgNodeModSum s extra = (lkup_key >>= \key -> Map.lookup key boot_summaries) in Right $ DigraphNode s key $ out_edge_keys $ (fromMaybe [] extra - ++ nodeDependencies drop_hs_boot_nodes s) + ++ mgNodeDependencies drop_hs_boot_nodes s) numbered_summaries = zip summaries [1..] @@ -370,20 +370,6 @@ moduleGraphNodes drop_hs_boot_nodes summaries = out_edge_keys = mapMaybe lookup_key -- If we want keep_hi_boot_nodes, then we do lookup_key with -- IsBoot; else False -newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } - deriving (Functor, Traversable, Foldable) - -mkNodeKey :: ModuleGraphNode -> NodeKey -mkNodeKey = \case - InstantiationNode _ iu -> NodeKey_Unit iu - ModuleNode _ x -> NodeKey_Module $ msKey x - LinkNode _ uid -> NodeKey_Link uid - -msKey :: ModSummary -> ModNodeKeyWithUid -msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) - -type ModNodeKey = ModuleNameWithIsBoot - -- | This function returns all the modules belonging to the home-unit that can -- be reached by following the given dependencies. Additionally, if both the @@ -409,21 +395,150 @@ moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- mo | otherwise -> r1 : filter_mods (r2:rs) rs -> rs -mgReachable :: ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] -mgReachable mg nk = map summaryNodeSummary <$> modules_below where - (td_map, lookup_node) = mg_graph mg - modules_below = - allReachable td_map <$> lookup_node nk +-- | This function filters out all the instantiation nodes from each SCC of a +-- topological sort. Use this with care, as the resulting "strongly connected components" +-- may not really be strongly connected in a direct way, as instantiations have been +-- removed. It would probably be best to eliminate uses of this function where possible. +filterToposortToModules + :: [SCC ModuleGraphNode] -> [SCC ModSummary] +filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case + InstantiationNode _ _ -> Nothing + LinkNode{} -> Nothing + ModuleNode _deps node -> Just node + where + -- This higher order function is somewhat bogus, + -- as the definition of "strongly connected component" + -- is not necessarily respected. + mapMaybeSCC :: (a -> Maybe b) -> SCC a -> Maybe (SCC b) + mapMaybeSCC f = \case + AcyclicSCC a -> AcyclicSCC <$> f a + CyclicSCC as -> case mapMaybe f as of + [] -> Nothing + [a] -> Just $ AcyclicSCC a + as -> Just $ CyclicSCC as --- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in --- graph @g@? --- INVARIANT: Both @a@ and @b@ must be in @g at . -mgQuery :: ModuleGraph -- ^ @g@ - -> NodeKey -- ^ @a@ - -> NodeKey -- ^ @b@ - -> Bool -- ^ @b@ is reachable from @a@ -mgQuery mg nka nkb = isReachable td_map na nb where - (td_map, lookup_node) = mg_graph mg - na = expectJust "mgQuery:a" $ lookup_node nka - nb = expectJust "mgQuery:b" $ lookup_node nkb +-------------------------------------------------------------------------------- +-- * Keys into ModuleGraph +-------------------------------------------------------------------------------- + +data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit + | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid + | NodeKey_Link !UnitId + deriving (Eq, Ord) + +instance Outputable NodeKey where + ppr (NodeKey_Unit iu) = ppr iu + ppr (NodeKey_Module mk) = ppr mk + ppr (NodeKey_Link uid) = ppr uid + +mkNodeKey :: ModuleGraphNode -> NodeKey +mkNodeKey = \case + InstantiationNode _ iu -> NodeKey_Unit iu + ModuleNode _ x -> NodeKey_Module $ msKey x + LinkNode _ uid -> NodeKey_Link uid + +nodeKeyUnitId :: NodeKey -> UnitId +nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu +nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk +nodeKeyUnitId (NodeKey_Link uid) = uid + +nodeKeyModName :: NodeKey -> Maybe ModuleName +nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) +nodeKeyModName _ = Nothing + +type ModNodeKey = ModuleNameWithIsBoot +data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot + , mnkUnitId :: !UnitId } deriving (Eq, Ord) + +instance Outputable ModNodeKeyWithUid where + ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib + +msKey :: ModSummary -> ModNodeKeyWithUid +msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) + +-------------------------------------------------------------------------------- +-- ** Internal node representation (exposed) +-------------------------------------------------------------------------------- + +type SummaryNode = Node Int ModuleGraphNode + +summaryNodeKey :: SummaryNode -> Int +summaryNodeKey = node_key + +summaryNodeSummary :: SummaryNode -> ModuleGraphNode +summaryNodeSummary = node_payload + +-------------------------------------------------------------------------------- +-- * Misc utilities +-------------------------------------------------------------------------------- + +showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc +showModMsg dflags _ (LinkNode {}) = + let staticLink = case ghcLink dflags of + LinkStaticLib -> True + _ -> False + + platform = targetPlatform dflags + arch_os = platformArchOS platform + exe_file = exeFileName arch_os staticLink (outputFile_ dflags) + in text exe_file +showModMsg _ _ (InstantiationNode _uid indef_unit) = + ppr $ instUnitInstanceOf indef_unit +showModMsg dflags recomp (ModuleNode _ mod_summary) = + if gopt Opt_HideSourcePaths dflags + then text mod_str + else hsep $ + [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') + , char '(' + , text (op $ msHsFilePath mod_summary) <> char ',' + , message, char ')' ] + + where + op = normalise + mod_str = moduleNameString (moduleName (ms_mod mod_summary)) ++ + hscSourceString (ms_hsc_src mod_summary) + dyn_file = op $ msDynObjFilePath mod_summary + obj_file = op $ msObjFilePath mod_summary + files = [ obj_file ] + ++ [ dyn_file | gopt Opt_BuildDynamicToo dflags ] + ++ [ "interpreted" | gopt Opt_ByteCodeAndObjectCode dflags ] + message = case backendSpecialModuleSource (backend dflags) recomp of + Just special -> text special + Nothing -> foldr1 (\ofile rest -> ofile <> comma <+> rest) (map text files) + +-------------------------------------------------------------------------------- +-- * Internal methods for module graph +-- +-- These are *really* meant to be internal! +-- Don't expose them without careful consideration about the invariants +-- described in the export list haddocks. +-------------------------------------------------------------------------------- + +newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } + deriving (Functor, Traversable, Foldable) + +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False + +extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph +extendMG' mg = \case + InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId + ModuleNode deps ms -> extendMG mg deps ms + LinkNode deps uid -> extendMGLink mg uid deps + +-- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is +-- not an element of the ModuleGraph. +extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph +extendMG ModuleGraph{..} deps ms = ModuleGraph + { mg_mss = ModuleNode deps ms : mg_mss + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) + } + +extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph +extendMGInst mg uid depUnitId = mg + { mg_mss = InstantiationNode uid depUnitId : mg_mss mg + } + +extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph +extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } ===================================== compiler/GHC/Unit/Module/ModSummary.hs ===================================== @@ -24,12 +24,14 @@ module GHC.Unit.Module.ModSummary , msDynObjFileOsPath , msDeps , isBootSummary + , isTemplateHaskellOrQQNonBoot , findTarget ) where import GHC.Prelude +import qualified GHC.LanguageExtensions as LangExt import GHC.Hs import GHC.Driver.DynFlags @@ -163,6 +165,12 @@ msDynObjFileOsPath ms = ml_dyn_obj_file_ospath (ms_location ms) isBootSummary :: ModSummary -> IsBootInterface isBootSummary ms = if ms_hsc_src ms == HsBootFile then IsBoot else NotBoot +isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool +isTemplateHaskellOrQQNonBoot ms = + (xopt LangExt.TemplateHaskell (ms_hspp_opts ms) + || xopt LangExt.QuasiQuotes (ms_hspp_opts ms)) && + (isBootSummary ms == NotBoot) + ms_mnwib :: ModSummary -> ModuleNameWithIsBoot ms_mnwib ms = GWIB (ms_mod_name ms) (isBootSummary ms) @@ -206,4 +214,3 @@ findTarget ms ts = _ `matches` _ = False - ===================================== testsuite/tests/ghc-api/downsweep/OldModLocation.hs ===================================== @@ -61,7 +61,7 @@ main = do -- using the 'location' parameter we'd end up using the old location of -- the "B" module in this test. Make sure that doesn't happen. - hPrint stderr $ sort (map (ml_hs_file . ms_location) (mapMaybe moduleGraphNodeModSum nodes)) + hPrint stderr $ sort (map (ml_hs_file . ms_location) (mapMaybe mgNodeModSum nodes)) writeMod :: [String] -> IO () writeMod src@(head -> stripPrefix "module " -> Just (takeWhile (/=' ') -> mod)) ===================================== testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs ===================================== @@ -171,7 +171,7 @@ go label mods cnd = hsc_env <- getSession (_, nodes) <- liftIO $ downsweep hsc_env mkUnknownDiagnostic Nothing [] [] False - it label $ cnd (mapMaybe moduleGraphNodeModSum nodes) + it label $ cnd (mapMaybe mgNodeModSum nodes) writeMod :: [String] -> IO () View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/062076f1469da23aa81bcc8bf87038141f71dc2e -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/062076f1469da23aa81bcc8bf87038141f71dc2e You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 12:01:17 2024 From: gitlab at gitlab.haskell.org (Matthew Pickering (@mpickering)) Date: Wed, 27 Nov 2024 07:01:17 -0500 Subject: [Git][ghc/ghc][wip/mpickering/get-link-deps] 3 commits: WIP external grpah Message-ID: <67470a0dc29c1_18219f2b61dc10298@gitlab.mail> Matthew Pickering pushed to branch wip/mpickering/get-link-deps at Glasgow Haskell Compiler / GHC Commits: 739947f1 by Matthew Pickering at 2024-11-27T09:40:42+00:00 WIP external grpah - - - - - 434881db by Matthew Pickering at 2024-11-27T09:40:42+00:00 getLinkDeps and ExternalNode - - - - - edb7f8a7 by Matthew Pickering at 2024-11-27T12:00:23+00:00 missing file - - - - - 13 changed files: - compiler/GHC/Data/Graph/Directed/Reachability.hs - compiler/GHC/Driver/Backpack.hs - compiler/GHC/Driver/Errors/Ppr.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Unit/External.hs - + compiler/GHC/Unit/Module/External/Graph.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModIface.hs - compiler/ghc.cabal.in Changes: ===================================== compiler/GHC/Data/Graph/Directed/Reachability.hs ===================================== @@ -7,7 +7,7 @@ module GHC.Data.Graph.Directed.Reachability , graphReachability, cyclicGraphReachability -- * Reachability queries - , allReachable, allReachableMany + , allReachable, allReachableMany, allReachableManyWithRoots , isReachable, isReachableMany ) where @@ -129,6 +129,23 @@ allReachableMany (ReachabilityIndex index from to) roots = map from (IS.toList h hits = {-# SCC "allReachableMany" #-} IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i +-- | 'allReachableManyWithRoots' returns all nodes reachable from the many given @roots at . +-- +-- Properties: +-- * The list of nodes includes the @roots@ node! +-- * The list of nodes is deterministically ordered, but according to an +-- internal order determined by the indices attributed to graph nodes. +-- * This function has $O(n)$ complexity where $n$ is the number of @roots at . +-- +-- If you need a topologically sorted list, consider using the functions +-- exposed from 'GHC.Data.Graph.Directed' on 'Graph' instead ('reachableG'). +allReachableManyWithRoots :: ReachabilityIndex node -> [node] {-^ The @roots@ -} -> [node] {-^ All nodes reachable from all @roots@ -} +allReachableManyWithRoots (ReachabilityIndex index from to) roots = map from (IS.toList hits) + where roots_i = [ v | Just v <- map to roots ] + hits = IS.union (IS.fromList roots_i) + (IS.unions $ map (expectJust "reachablesG" . flip IM.lookup index) roots_i) + + -- | Fast reachability query. -- -- On graph @g@ with nodes @a@ and @b@, @isReachable g a b@ ===================================== compiler/GHC/Driver/Backpack.hs ===================================== @@ -589,6 +589,7 @@ mkBackpackMsg = do MustCompile -> empty RecompBecause reason -> text " [" <> pprWithUnitState state (ppr reason) <> text "]" LinkNode _ _ -> showMsg (text "Linking ") empty + PackageNode {} -> showMsg (text "Package ") empty -- | 'PprStyle' for Backpack messages; here we usually want the module to -- be qualified (so we can tell how it was instantiated.) But we try not ===================================== compiler/GHC/Driver/Errors/Ppr.hs ===================================== @@ -261,6 +261,7 @@ instance Diagnostic DriverMessage where ppr_node (ModuleNode _deps m) = text "module" <+> ppr_ms m ppr_node (InstantiationNode _uid u) = text "instantiated unit" <+> ppr u ppr_node (LinkNode uid _) = pprPanic "LinkNode should not be in a cycle" (ppr uid) + ppr_node (PackageNode uid _) = pprPanic "PackageNode should not be in a cycle" (ppr uid) ppr_ms :: ModSummary -> SDoc ppr_ms ms = quotes (ppr (moduleName (ms_mod ms))) <+> ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -1470,6 +1470,7 @@ batchMsgWith extra hsc_env_start mod_index recomp node = LinkNode {} -> "Linking" InstantiationNode {} -> "Instantiating" ModuleNode {} -> "Compiling" + PackageNode {} -> "Loading" hsc_env = hscSetActiveUnitId (moduleGraphNodeUnitId node) hsc_env_start dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -1107,7 +1107,16 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do where collect_result res_var = runMaybeT (waitResult res_var) - n_mods = sum (map countMods plan) + -- Just used for an assertion + count_mods :: BuildPlan -> Int + count_mods (SingleModule m) = count_m m + count_mods (ResolvedCycle ns) = length ns + count_mods (UnresolvedCycle ns) = length ns + + count_m (PackageNode {}) = 0 + count_m _ = 1 + + n_mods = sum (map count_mods plan) buildLoop :: [BuildPlan] -> BuildM (Maybe [ModuleGraphNode], [MakeAction]) @@ -1138,7 +1147,6 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do -> ModuleGraphNode -- The node we are compiling -> BuildM MakeAction buildSingleModule rehydrate_nodes origin mod = do - mod_idx <- nodeId !build_map <- getBuildMap hug_var <- gets hug_var -- 1. Get the direct dependencies of this module @@ -1147,17 +1155,20 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do -- which would retain all the result variables, preventing us from collecting them -- after they are no longer used. !build_deps = getDependencies direct_deps build_map - let !build_action = + !build_action <- case mod of InstantiationNode uid iu -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + mod_idx <- nodeId + return $ withCurrentUnit (moduleGraphNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeInstantiationNode mod_idx n_mods hug uid iu return (Nothing, deps) - ModuleNode _build_deps ms -> + ModuleNode _build_deps ms -> do let !old_hmi = M.lookup (msKey ms) old_hpt rehydrate_mods = mapMaybe nodeKeyModName <$> rehydrate_nodes - in withCurrentUnit (moduleGraphNodeUnitId mod) $ do + mod_idx <- nodeId + return $ withCurrentUnit (moduleGraphNodeUnitId mod) $ do + (hug, deps) <- wait_deps_hug hug_var build_deps hmi <- executeCompileNode mod_idx n_mods old_hmi hug rehydrate_mods ms -- Write the HMI to an external cache (if one exists) @@ -1168,10 +1179,12 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do liftIO $ modifyMVar_ hug_var (return . addHomeModInfoToHug hmi) return (Just hmi, addToModuleNameSet (moduleGraphNodeUnitId mod) (ms_mod_name ms) deps ) LinkNode _nks uid -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + mod_idx <- nodeId + return $ withCurrentUnit (moduleGraphNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeLinkNode hug (mod_idx, n_mods) uid direct_deps return (Nothing, deps) + PackageNode {} -> return $ return (Nothing, mempty) res_var <- liftIO newEmptyMVar @@ -1285,8 +1298,6 @@ upsweep n_jobs hsc_env hmi_cache diag_wrapper mHscMessage old_hpt build_plan = d toCache :: [HomeModInfo] -> M.Map (ModNodeKeyWithUid) HomeModInfo toCache hmis = M.fromList ([(miKey $ hm_iface hmi, hmi) | hmi <- hmis]) -miKey :: ModIface -> ModNodeKeyWithUid -miKey hmi = ModNodeKeyWithUid (mi_mnwib hmi) ((toUnitId $ moduleUnit (mi_module hmi))) upsweep_inst :: HscEnv -> Maybe Messager @@ -1709,9 +1720,10 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro Nothing excl_mods case mb_s of NotThere -> loopImports ss done summarised - External _ -> do - (other_deps, done', summarised') <- loopImports ss done summarised - return (other_deps, done', summarised') + External uid -> do + let done' = loopUnit done [uid] + (other_deps, done'', summarised') <- loopImports ss done' summarised + return (NodeKey_ExternalUnit uid : other_deps, done'', summarised') FoundInstantiation iud -> do (other_deps, done', summarised') <- loopImports ss done summarised return (NodeKey_Unit iud : other_deps, done', summarised') @@ -1729,6 +1741,16 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro GWIB { gwib_mod = L loc mod, gwib_isBoot = is_boot } = gwib wanted_mod = L loc mod + loopUnit :: Map.Map NodeKey ModuleGraphNode -> [UnitId] -> Map.Map NodeKey ModuleGraphNode + loopUnit cache [] = cache + loopUnit cache (u:uxs) = do + let nk = (NodeKey_ExternalUnit u) + case Map.lookup nk cache of + Just {} -> loopUnit cache uxs + Nothing -> case unitDepends <$> lookupUnitId (hsc_units hsc_env) u of + Just us -> loopUnit (loopUnit (Map.insert nk (PackageNode us u) cache) us) uxs + Nothing -> panic "bad" + getRootSummary :: [ModuleName] -> M.Map (UnitId, FilePath) ModSummary -> ===================================== compiler/GHC/Driver/MakeFile.hs ===================================== @@ -221,6 +221,7 @@ processDeps _ _ _ _ _ (AcyclicSCC (InstantiationNode _uid node)) GhcDriverMessage $ DriverInstantiationNodeInDependencyGeneration node processDeps _dflags _ _ _ _ (AcyclicSCC (LinkNode {})) = return () +processDeps _dflags _ _ _ _ (AcyclicSCC (PackageNode {})) = return () processDeps dflags hsc_env excl_mods root hdl (AcyclicSCC (ModuleNode _ node)) = do { let extra_suffixes = depSuffixes dflags ===================================== compiler/GHC/Iface/Load.hs ===================================== @@ -108,6 +108,7 @@ import GHC.Unit.Home import GHC.Unit.Home.ModInfo import GHC.Unit.Finder import GHC.Unit.Env +import GHC.Unit.Module.External.Graph import GHC.Data.Maybe @@ -119,6 +120,8 @@ import GHC.Driver.Env.KnotVars import {-# source #-} GHC.Driver.Main (loadIfaceByteCode) import GHC.Iface.Errors.Types import Data.Function ((&)) +import qualified Data.Set as Set +import GHC.Unit.Module.Graph {- ************************************************************************ @@ -407,6 +410,21 @@ loadInterfaceWithException doc mod_name where_from let ctx = initSDocContext dflags defaultUserStyle withIfaceErr ctx (loadInterface doc mod_name where_from) +-- | Load all interfaces from the home package, presumes that this operation +-- can be completed by traversing from the already loaded home packages. + +-- This operation is used just before TH splices are run. + +-- The first time this is run +-- A field in the EPS tracks which home modules are fully loaded +_loadHomePackageInterfacesBelow :: ModNodeKeyWithUid -> IfM lcl () +_loadHomePackageInterfacesBelow mn = do + graph <- eps_module_graph <$> getEps + let key = ExternalModuleKey mn + if isFullyLoadedModule key graph + then return () + else return () + ------------------ loadInterface :: SDoc -> Module -> WhereFrom -> IfM lcl (MaybeErr MissingInterfaceError ModIface) @@ -515,6 +533,12 @@ loadInterface doc_str mod from ; new_eps_complete_matches <- tcIfaceCompleteMatches (mi_complete_matches iface) ; purged_hsc_env <- getTopEnv + ; let direct_deps = map (uncurry (flip ModNodeKeyWithUid)) $ (Set.toList (dep_direct_mods $ mi_deps iface)) + ; let !module_graph_key = + if moduleUnitId mod `elem` hsc_all_home_unit_ids hsc_env + then Just $ NodeHomePackage (miKey iface) (map ExternalModuleKey direct_deps) + else Nothing + ; let final_iface = iface & set_mi_decls (panic "No mi_decls in PIT") & set_mi_insts (panic "No mi_insts in PIT") @@ -555,6 +579,9 @@ loadInterface doc_str mod from eps_iface_bytecode = add_bytecode (eps_iface_bytecode eps), eps_rule_base = extendRuleBaseList (eps_rule_base eps) new_eps_rules, + eps_module_graph = case module_graph_key of + Just k -> extendExternalModuleGraph k (eps_module_graph eps) + Nothing -> eps_module_graph eps, eps_complete_matches = eps_complete_matches eps ++ new_eps_complete_matches, eps_inst_env = extendInstEnvList (eps_inst_env eps) ===================================== compiler/GHC/Linker/Deps.hs ===================================== @@ -121,8 +121,8 @@ get_link_deps opts pls maybe_normal_osuf span mods = do then follow_deps (filterOut isInteractiveModule mods) emptyUniqDSet emptyUniqDSet; else do - (pkgs, mmods) <- unzip <$> mapM get_mod_info all_home_mods - return (catMaybes mmods, unionManyUniqDSets (init_pkg_set : pkgs)) + mmods <- mapM get_mod_info all_home_mods + return (catMaybes mmods, mkUniqDSet all_dep_pkgs) let -- 2. Exclude ones already linked @@ -152,44 +152,19 @@ get_link_deps opts pls maybe_normal_osuf span mods = do mod_graph = ldModuleGraph opts unit_env = ldUnitEnv opts - -- This code is used in `--make` mode to calculate the home package and unit dependencies - -- for a set of modules. - -- - -- It is significantly more efficient to use the shared transitive dependency - -- calculation than to compute the transitive dependency set in the same manner as oneShot mode. - - -- It is also a matter of correctness to use the module graph so that dependencies between home units - -- is resolved correctly. - make_deps_loop :: (UniqDSet UnitId, Set.Set NodeKey) -> [ModNodeKeyWithUid] -> (UniqDSet UnitId, Set.Set NodeKey) - make_deps_loop found [] = found - make_deps_loop found@(found_units, found_mods) (nk:nexts) - | NodeKey_Module nk `Set.member` found_mods = make_deps_loop found nexts - | otherwise = - case fmap mkNodeKey <$> mgReachable mod_graph (NodeKey_Module nk) of - Nothing -> - let (ModNodeKeyWithUid _ uid) = nk - in make_deps_loop (addOneToUniqDSet found_units uid, found_mods) nexts - Just trans_deps -> - let deps = Set.insert (NodeKey_Module nk) (Set.fromList trans_deps) - -- See #936 and the ghci.prog007 test for why we have to continue traversing through - -- boot modules. - todo_boot_mods = [ModNodeKeyWithUid (GWIB mn NotBoot) uid | NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid) <- trans_deps] - in make_deps_loop (found_units, deps `Set.union` found_mods) (todo_boot_mods ++ nexts) - mkNk m = ModNodeKeyWithUid (GWIB (moduleName m) NotBoot) (moduleUnitId m) - (init_pkg_set, all_deps) = make_deps_loop (emptyUniqDSet, Set.empty) $ map mkNk (filterOut isInteractiveModule mods) + all_deps = mgReachableLoop mod_graph $ map (NodeKey_Module . mkNk) (filterOut isInteractiveModule mods) - all_home_mods = [with_uid | NodeKey_Module with_uid <- Set.toList all_deps] + all_home_mods = [with_uid | NodeKey_Module with_uid <- map mkNodeKey all_deps] + all_dep_pkgs = [uid | NodeKey_ExternalUnit uid <- map mkNodeKey all_deps] get_mod_info (ModNodeKeyWithUid gwib uid) = case lookupHug (ue_home_unit_graph unit_env) uid (gwib_mod gwib) of Just hmi -> let iface = (hm_iface hmi) - mmod = case mi_hsc_src iface of - HsBootFile -> link_boot_mod_error (mi_module iface) - _ -> return $ Just (mi_module iface) - - in (mkUniqDSet $ Set.toList $ dep_direct_pkgs (mi_deps iface),) <$> mmod + in case mi_hsc_src iface of + HsBootFile -> link_boot_mod_error (mi_module iface) + _ -> return $ Just (mi_module iface) Nothing -> throwProgramError opts $ text "getLinkDeps: Home module not loaded" <+> ppr (gwib_mod gwib) <+> ppr uid ===================================== compiler/GHC/Unit/External.hs ===================================== @@ -32,6 +32,7 @@ import GHC.Types.TypeEnv import GHC.Types.Unique.DSet import GHC.Linker.Types (Linkable) +import GHC.Unit.Module.External.Graph import Data.IORef @@ -70,6 +71,7 @@ initExternalPackageState = EPS , eps_PIT = emptyPackageIfaceTable , eps_free_holes = emptyInstalledModuleEnv , eps_PTE = emptyTypeEnv + , eps_module_graph = emptyExternalModuleGraph , eps_iface_bytecode = emptyModuleEnv , eps_inst_env = emptyInstEnv , eps_fam_inst_env = emptyFamInstEnv @@ -137,6 +139,8 @@ data ExternalPackageState -- for every import, so cache it here. When the PIT -- gets filled in we can drop these entries. + eps_module_graph :: ExternalModuleGraph, + eps_PTE :: !PackageTypeEnv, -- ^ Result of typechecking all the external package -- interface files we have sucked in. The domain of ===================================== compiler/GHC/Unit/Module/External/Graph.hs ===================================== @@ -0,0 +1,83 @@ +-- | Like GHC.Unit.Module.Graph but for the ExternalModuleGraph which +-- is stored in the EPS. +module GHC.Unit.Module.External.Graph where + +import GHC.Prelude +import GHC.Unit.Module.Graph +import GHC.Data.Graph.Directed.Reachability +import GHC.Data.Graph.Directed +import qualified Data.Map as M +import qualified Data.Set as S +import Data.Maybe + +data ExternalKey = ExternalModuleKey ModNodeKeyWithUid deriving (Eq, Ord) + +data ExternalGraphNode = NodeHomePackage { + externalNodeKey :: ModNodeKeyWithUid + , externalNodeDeps :: [ExternalKey] } + +externalKey :: ExternalGraphNode -> ExternalKey +externalKey (NodeHomePackage k _) = ExternalModuleKey k + +type ExternalNode = Node Int ExternalGraphNode + +data ExternalModuleGraph = ExternalModuleGraph + { external_nodes :: [ExternalGraphNode] + , external_trans :: (ReachabilityIndex ExternalNode, ExternalKey -> Maybe ExternalNode) + , external_fully_loaded :: !(S.Set ExternalKey) } + +emptyExternalModuleGraph :: ExternalModuleGraph +emptyExternalModuleGraph = ExternalModuleGraph [] (graphReachability emptyGraph, const Nothing) S.empty + +extendExternalModuleGraph :: ExternalGraphNode -> ExternalModuleGraph -> ExternalModuleGraph +extendExternalModuleGraph node graph = mkExternalModuleGraph (node : external_nodes graph) (external_fully_loaded graph) + +setFullyLoadedModule :: ExternalKey -> ExternalModuleGraph -> ExternalModuleGraph +setFullyLoadedModule key graph = graph { external_fully_loaded = S.insert key (external_fully_loaded graph)} + +isFullyLoadedModule :: ExternalKey -> ExternalModuleGraph -> Bool +isFullyLoadedModule key graph = S.member key (external_fully_loaded graph) + +mkExternalModuleGraph :: [ExternalGraphNode] -> S.Set ExternalKey -> ExternalModuleGraph +mkExternalModuleGraph nodes loaded = + ExternalModuleGraph { + external_nodes = nodes + , external_trans = let (g, f) = (externalGraphNodes nodes) + in (graphReachability g, f) + , external_fully_loaded = loaded } + + + +-- | Turn a list of graph nodes into an efficient queriable graph. +-- The first boolean parameter indicates whether nodes corresponding to hs-boot files +-- should be collapsed into their relevant hs nodes. +externalGraphNodes :: + [ExternalGraphNode] + -> (Graph ExternalNode, ExternalKey -> Maybe ExternalNode) +externalGraphNodes summaries = + (graphFromEdgedVerticesUniq nodes, lookup_node) + where + -- Map from module to extra boot summary dependencies which need to be merged in + nodes = map go numbered_summaries + + where + go (s, key) = DigraphNode s key $ out_edge_keys $ + (externalNodeDeps s) + + numbered_summaries = zip summaries [1..] + + lookup_node :: ExternalKey -> Maybe ExternalNode + lookup_node key = M.lookup key node_map + + lookup_key :: ExternalKey -> Maybe Int + lookup_key = fmap node_key . lookup_node + + node_map :: M.Map ExternalKey ExternalNode + node_map = + M.fromList [ (externalKey s, node) + | node <- nodes + , let s = node_payload node + ] + + out_edge_keys :: [ExternalKey] -> [Int] + out_edge_keys = mapMaybe lookup_key \ No newline at end of file ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -9,8 +9,6 @@ module GHC.Unit.Module.Graph , emptyMG , mkModuleGraph , extendMG - , extendMGInst - , extendMG' , unionMG , isTemplateHaskellOrQQNonBoot , filterToposortToModules @@ -23,6 +21,7 @@ module GHC.Unit.Module.Graph , moduleGraphNodeModSum , moduleGraphModulesBelow , mgReachable + , mgReachableLoop , mgQuery , moduleGraphNodes @@ -87,6 +86,8 @@ data ModuleGraphNode | ModuleNode [NodeKey] ModSummary -- | Link nodes are whether are are creating a linked product (ie executable/shared object etc) for a unit. | LinkNode [NodeKey] UnitId + -- | Package dependency + | PackageNode [UnitId] UnitId moduleGraphNodeModule :: ModuleGraphNode -> Maybe ModuleName moduleGraphNodeModule mgn = ms_mod_name <$> (moduleGraphNodeModSum mgn) @@ -95,6 +96,7 @@ moduleGraphNodeModSum :: ModuleGraphNode -> Maybe ModSummary moduleGraphNodeModSum (InstantiationNode {}) = Nothing moduleGraphNodeModSum (LinkNode {}) = Nothing moduleGraphNodeModSum (ModuleNode _ ms) = Just ms +moduleGraphNodeModSum (PackageNode {}) = Nothing moduleGraphNodeUnitId :: ModuleGraphNode -> UnitId moduleGraphNodeUnitId mgn = @@ -102,12 +104,14 @@ moduleGraphNodeUnitId mgn = InstantiationNode uid _iud -> uid ModuleNode _ ms -> toUnitId (moduleUnit (ms_mod ms)) LinkNode _ uid -> uid + PackageNode _ uid -> uid instance Outputable ModuleGraphNode where ppr = \case InstantiationNode _ iuid -> ppr iuid ModuleNode nks ms -> ppr (msKey ms) <+> ppr nks LinkNode uid _ -> text "LN:" <+> ppr uid + PackageNode _ uid -> text "P:" <+> ppr uid instance Eq ModuleGraphNode where (==) = (==) `on` mkNodeKey @@ -118,6 +122,7 @@ instance Ord ModuleGraphNode where data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid | NodeKey_Link !UnitId + | NodeKey_ExternalUnit !UnitId deriving (Eq, Ord) instance Outputable NodeKey where @@ -127,11 +132,13 @@ pprNodeKey :: NodeKey -> SDoc pprNodeKey (NodeKey_Unit iu) = ppr iu pprNodeKey (NodeKey_Module mk) = ppr mk pprNodeKey (NodeKey_Link uid) = ppr uid +pprNodeKey (NodeKey_ExternalUnit uid) = ppr uid nodeKeyUnitId :: NodeKey -> UnitId nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk nodeKeyUnitId (NodeKey_Link uid) = uid +nodeKeyUnitId (NodeKey_ExternalUnit uid) = uid nodeKeyModName :: NodeKey -> Maybe ModuleName nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) @@ -140,6 +147,7 @@ nodeKeyModName _ = Nothing data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot , mnkUnitId :: !UnitId } deriving (Eq, Ord) + instance Outputable ModNodeKeyWithUid where ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib @@ -157,6 +165,7 @@ instance Outputable ModNodeKeyWithUid where data ModuleGraph = ModuleGraph { mg_mss :: [ModuleGraphNode] , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) + , mg_loop_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -- A cached transitive dependency calculation so that a lot of work is not -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) } @@ -169,6 +178,7 @@ mapMG f mg at ModuleGraph{..} = mg InstantiationNode uid iuid -> InstantiationNode uid iuid LinkNode uid nks -> LinkNode uid nks ModuleNode deps ms -> ModuleNode deps (f ms) + PackageNode deps uid -> PackageNode deps uid } unionMG :: ModuleGraph -> ModuleGraph -> ModuleGraph @@ -177,11 +187,15 @@ unionMG a b = in ModuleGraph { mg_mss = new_mss , mg_graph = mkTransDeps new_mss + , mg_loop_graph = mkTransLoopDeps new_mss } mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False +mkTransLoopDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransLoopDeps = first cyclicGraphReachability . moduleGraphNodes True + mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] @@ -201,7 +215,7 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss go _ = Nothing emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) (graphReachability emptyGraph, const Nothing) isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool isTemplateHaskellOrQQNonBoot ms = @@ -211,28 +225,15 @@ isTemplateHaskellOrQQNonBoot ms = -- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is -- not an element of the ModuleGraph. -extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph -extendMG ModuleGraph{..} deps ms = ModuleGraph - { mg_mss = ModuleNode deps ms : mg_mss - , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) - } - -extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph -extendMGInst mg uid depUnitId = mg - { mg_mss = InstantiationNode uid depUnitId : mg_mss mg - } - -extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph -extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } - -extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph -extendMG' mg = \case - InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId - ModuleNode deps ms -> extendMG mg deps ms - LinkNode deps uid -> extendMGLink mg uid deps +extendMG :: ModuleGraph -> ModuleGraphNode -> ModuleGraph +extendMG ModuleGraph{..} node = mkModuleGraph (node : mg_mss) mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph -mkModuleGraph = foldr (flip extendMG') emptyMG +mkModuleGraph nodes = ModuleGraph + { mg_mss = nodes + , mg_graph = mkTransDeps nodes + , mg_loop_graph = mkTransLoopDeps nodes + } -- | This function filters out all the instantiation nodes from each SCC of a -- topological sort. Use this with care, as the resulting "strongly connected components" @@ -241,9 +242,8 @@ mkModuleGraph = foldr (flip extendMG') emptyMG filterToposortToModules :: [SCC ModuleGraphNode] -> [SCC ModSummary] filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case - InstantiationNode _ _ -> Nothing - LinkNode{} -> Nothing ModuleNode _deps node -> Just node + _ -> Nothing where -- This higher order function is somewhat bogus, -- as the definition of "strongly connected component" @@ -266,6 +266,7 @@ showModMsg dflags _ (LinkNode {}) = arch_os = platformArchOS platform exe_file = exeFileName arch_os staticLink (outputFile_ dflags) in text exe_file +showModMsg _ _ (PackageNode _deps uid) = ppr uid showModMsg _ _ (InstantiationNode _uid indef_unit) = ppr $ instUnitInstanceOf indef_unit showModMsg dflags recomp (ModuleNode _ mod_summary) = @@ -315,6 +316,7 @@ nodeDependencies drop_hs_boot_nodes = \case NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) ModuleNode deps _ms -> map drop_hs_boot deps + PackageNode deps _ -> map NodeKey_ExternalUnit deps where -- Drop hs-boot nodes by using HsSrcFile as the key hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature @@ -379,6 +381,7 @@ mkNodeKey = \case InstantiationNode _ iu -> NodeKey_Unit iu ModuleNode _ x -> NodeKey_Module $ msKey x LinkNode _ uid -> NodeKey_Link uid + PackageNode _ uid -> NodeKey_ExternalUnit uid msKey :: ModSummary -> ModNodeKeyWithUid msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) @@ -416,6 +419,14 @@ mgReachable mg nk = map summaryNodeSummary <$> modules_below where modules_below = allReachable td_map <$> lookup_node nk +-- | Things which are reachable if hs-boot files are ignored. Used by 'getLinkDeps' +mgReachableLoop :: ModuleGraph -> [NodeKey] -> [ModuleGraphNode] +mgReachableLoop mg nk = map summaryNodeSummary modules_below where + (td_map, lookup_node) = mg_loop_graph mg + modules_below = + allReachableManyWithRoots td_map (mapMaybe lookup_node nk) + + -- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in -- graph @g@? -- INVARIANT: Both @a@ and @b@ must be in @g at . ===================================== compiler/GHC/Unit/Module/ModIface.hs ===================================== @@ -82,6 +82,7 @@ module GHC.Unit.Module.ModIface , IfaceImport(..) , mi_boot , mi_fix + , miKey , mi_semantic_module , mi_free_holes , mi_mnwib @@ -125,6 +126,7 @@ import GHC.Utils.Binary import Control.DeepSeq import Control.Exception +import GHC.Unit.Module.Graph (ModNodeKeyWithUid(..)) {- Note [Interface file stages] @@ -362,6 +364,9 @@ data ModIface_ (phase :: ModIfacePhase) -- See Note [Sharing of ModIface]. } +miKey :: ModIface -> ModNodeKeyWithUid +miKey hmi = ModNodeKeyWithUid (mi_mnwib hmi) ((toUnitId $ moduleUnit (mi_module hmi))) + -- Enough information to reconstruct the top level environment for a module data IfaceTopEnv = IfaceTopEnv ===================================== compiler/ghc.cabal.in ===================================== @@ -940,6 +940,7 @@ Library GHC.Unit.Module.Deps GHC.Unit.Module.Env GHC.Unit.Module.Graph + GHC.Unit.Module.External.Graph GHC.Unit.Module.Imported GHC.Unit.Module.Location GHC.Unit.Module.ModDetails View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7d7d1f1ab1cbccd049d6c48ee82b6413396e5ba3...edb7f8a713b13c5878a7057396f2236c88efb99b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7d7d1f1ab1cbccd049d6c48ee82b6413396e5ba3...edb7f8a713b13c5878a7057396f2236c88efb99b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 12:16:24 2024 From: gitlab at gitlab.haskell.org (sheaf (@sheaf)) Date: Wed, 27 Nov 2024 07:16:24 -0500 Subject: [Git][ghc/ghc][wip/T24359] 2 commits: Hadrian: use / when making filepaths absolute Message-ID: <67470d9844040_18219f42a11c121ba@gitlab.mail> sheaf pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 23538038 by sheaf at 2024-11-27T13:16:00+01:00 Hadrian: use / when making filepaths absolute In Hadrian, we are careful to use -/- rather than </>, in order to use / instead of \ in filepaths. However, this gets ruined by the use of makeAbsolute from System.Directory, which, on Windows, changes back forward slashes to backslashes. - - - - - 4034f989 by sheaf at 2024-11-27T13:16:00+01:00 TH support for new SPECIALISE syntax - - - - - 9 changed files: - compiler/GHC/Builtin/Names/TH.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/ThToHs.hs - hadrian/src/Hadrian/Utilities.hs - hadrian/src/Rules/CabalReinstall.hs - hadrian/src/Rules/Test.hs - hadrian/src/Settings/Builders/Cabal.hs - hadrian/src/Settings/Builders/Ghc.hs - libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs Changes: ===================================== compiler/GHC/Builtin/Names/TH.hs ===================================== @@ -75,7 +75,7 @@ templateHaskellNames = [ funDName, valDName, dataDName, newtypeDName, typeDataDName, tySynDName, classDName, instanceWithOverlapDName, standaloneDerivWithStrategyDName, sigDName, kiSigDName, forImpDName, - pragInlDName, pragOpaqueDName, pragSpecDName, pragSpecInlDName, pragSpecInstDName, + pragInlDName, pragOpaqueDName, pragSpecDName, pragSpecEDName, pragSpecInstDName, pragRuleDName, pragCompleteDName, pragAnnDName, pragSCCFunDName, pragSCCFunNamedDName, defaultSigDName, defaultDName, dataFamilyDName, openTypeFamilyDName, closedTypeFamilyDName, @@ -386,7 +386,7 @@ recSName = libFun (fsLit "recS") recSIdKey -- data Dec = ... funDName, valDName, dataDName, newtypeDName, typeDataDName, tySynDName, classDName, instanceWithOverlapDName, sigDName, kiSigDName, forImpDName, pragInlDName, - pragSpecDName, pragSpecInlDName, pragSpecInstDName, pragRuleDName, + pragSpecDName, pragSpecEDName, pragSpecInstDName, pragRuleDName, pragAnnDName, pragSCCFunDName, pragSCCFunNamedDName, standaloneDerivWithStrategyDName, defaultSigDName, defaultDName, dataInstDName, newtypeInstDName, tySynInstDName, dataFamilyDName, @@ -410,7 +410,7 @@ forImpDName = libFun (fsLit "forImpD") pragInlDName = libFun (fsLit "pragInlD") pragInlDIdKey pragOpaqueDName = libFun (fsLit "pragOpaqueD") pragOpaqueDIdKey pragSpecDName = libFun (fsLit "pragSpecD") pragSpecDIdKey -pragSpecInlDName = libFun (fsLit "pragSpecInlD") pragSpecInlDIdKey +pragSpecEDName = libFun (fsLit "pragSpecED") pragSpecEDIdKey pragSpecInstDName = libFun (fsLit "pragSpecInstD") pragSpecInstDIdKey pragRuleDName = libFun (fsLit "pragRuleD") pragRuleDIdKey pragCompleteDName = libFun (fsLit "pragCompleteD") pragCompleteDIdKey @@ -955,7 +955,7 @@ recSIdKey = mkPreludeMiscIdUnique 316 -- data Dec = ... funDIdKey, valDIdKey, dataDIdKey, newtypeDIdKey, tySynDIdKey, classDIdKey, instanceWithOverlapDIdKey, instanceDIdKey, sigDIdKey, forImpDIdKey, - pragInlDIdKey, pragSpecDIdKey, pragSpecInlDIdKey, pragSpecInstDIdKey, + pragInlDIdKey, pragSpecDIdKey, pragSpecEDIdKey, pragSpecInstDIdKey, pragRuleDIdKey, pragAnnDIdKey, defaultSigDIdKey, dataFamilyDIdKey, openTypeFamilyDIdKey, closedTypeFamilyDIdKey, dataInstDIdKey, newtypeInstDIdKey, tySynInstDIdKey, standaloneDerivWithStrategyDIdKey, @@ -975,7 +975,7 @@ sigDIdKey = mkPreludeMiscIdUnique 328 forImpDIdKey = mkPreludeMiscIdUnique 329 pragInlDIdKey = mkPreludeMiscIdUnique 330 pragSpecDIdKey = mkPreludeMiscIdUnique 331 -pragSpecInlDIdKey = mkPreludeMiscIdUnique 332 +pragSpecEDIdKey = mkPreludeMiscIdUnique 332 pragSpecInstDIdKey = mkPreludeMiscIdUnique 333 pragRuleDIdKey = mkPreludeMiscIdUnique 334 pragAnnDIdKey = mkPreludeMiscIdUnique 335 ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -800,28 +800,37 @@ repDefD (L loc (DefaultDecl _ _ tys)) = do { tys1 <- repLTys tys repRuleD :: LRuleDecl GhcRn -> MetaM (SrcSpan, Core (M TH.Dec)) repRuleD (L loc (HsRule { rd_name = n , rd_act = act - , rd_bndrs = RuleBndrs { rb_tyvs = m_ty_bndrs, rb_tmvs = tm_bndrs } + , rd_bndrs = bndrs , rd_lhs = lhs , rd_rhs = rhs })) + = fmap (locA loc, ) <$> + repRuleBinders bndrs $ \ ty_bndrs' tm_bndrs' -> + do { n' <- coreStringLit $ unLoc n + ; act' <- repPhases act + ; lhs' <- repLE lhs + ; rhs' <- repLE rhs + ; repPragRule n' ty_bndrs' tm_bndrs' lhs' rhs' act' } + +repRuleBinders :: RuleBndrs GhcRn + -> (Core (Maybe [M (TH.TyVarBndr ())]) -> Core [M TH.RuleBndr] -> MetaM (Core (M a))) + -> MetaM (Core (M a)) +repRuleBinders (RuleBndrs { rb_tyvs = m_ty_bndrs, rb_tmvs = tm_bndrs }) thing_inside = do { let ty_bndrs = fromMaybe [] m_ty_bndrs - ; rule <- addHsTyVarBinds FreshNamesOnly ty_bndrs $ \ ex_bndrs -> - do { let tm_bndr_names = concatMap ruleBndrNames tm_bndrs - ; ss <- mkGenSyms tm_bndr_names - ; rule <- addBinds ss $ - do { elt_ty <- wrapName tyVarBndrUnitTyConName - ; ty_bndrs' <- return $ case m_ty_bndrs of - Nothing -> coreNothing' (mkListTy elt_ty) - Just _ -> coreJust' (mkListTy elt_ty) ex_bndrs - ; tm_bndrs' <- repListM ruleBndrTyConName - repRuleBndr - tm_bndrs - ; n' <- coreStringLit $ unLoc n - ; act' <- repPhases act - ; lhs' <- repLE lhs - ; rhs' <- repLE rhs - ; repPragRule n' ty_bndrs' tm_bndrs' lhs' rhs' act' } - ; wrapGenSyms ss rule } - ; return (locA loc, rule) } + ; addHsTyVarBinds FreshNamesOnly ty_bndrs $ \ ex_bndrs -> + do { let tm_bndr_names = concatMap ruleBndrNames tm_bndrs + ; ss <- mkGenSyms tm_bndr_names + ; x <- addBinds ss $ + do { elt_ty <- wrapName tyVarBndrUnitTyConName + ; ty_bndrs' <- return $ case m_ty_bndrs of + Nothing -> coreNothing' (mkListTy elt_ty) + Just _ -> coreJust' (mkListTy elt_ty) ex_bndrs + ; tm_bndrs' <- repListM ruleBndrTyConName + repRuleBndr + tm_bndrs + ; thing_inside ty_bndrs' tm_bndrs' + } + ; wrapGenSyms ss x } + } ruleBndrNames :: LRuleBndr GhcRn -> [Name] ruleBndrNames (L _ (RuleBndr _ n)) = [unLoc n] @@ -992,8 +1001,9 @@ rep_sig (L loc (FixSig _ fix_sig)) = rep_fix_d (locA loc) fix_sig rep_sig (L loc (InlineSig _ nm ispec))= rep_inline nm ispec (locA loc) rep_sig (L loc (SpecSig _ nm tys ispec)) = concatMapM (\t -> rep_specialise nm t ispec (locA loc)) tys -rep_sig (L _ sig@(SpecSigE {})) - = pprPanic "No TH for SPECIALISE yet" (ppr sig) +rep_sig (L loc (SpecSigE _nm bndrs expr ispec)) + = fmap ( \ d -> [(locA loc, d)]) $ + rep_specialiseE bndrs expr ispec rep_sig (L loc (SpecInstSig _ ty)) = rep_specialiseInst ty (locA loc) rep_sig (L _ (MinimalSig {})) = notHandled ThMinimalPragmas rep_sig (L loc (SCCFunSig _ nm str)) = rep_sccFun nm str (locA loc) @@ -1096,23 +1106,39 @@ rep_inline nm ispec loc ; return [(loc, pragma)] } +rep_inline_phases :: InlinePragma -> MetaM (Core (Maybe TH.Inline), Core TH.Phases) +rep_inline_phases (InlinePragma { inl_act = act, inl_inline = inl }) + = do { phases <- repPhases act + ; inl <- if noUserInlineSpec inl + -- SPECIALISE + then dataCon nothingDataConName + -- SPECIALISE INLINE + else do { MkC inl1 <- repInline inl + ; dataCon' justDataConName [inl1] } + ; return (inl, phases) } + rep_specialise :: LocatedN Name -> LHsSigType GhcRn -> InlinePragma -> SrcSpan -> MetaM [(SrcSpan, Core (M TH.Dec))] rep_specialise nm ty ispec loc + -- Old form SPECIALISE pragmas = do { nm1 <- lookupLOcc nm ; ty1 <- repHsSigType ty - ; phases <- repPhases $ inl_act ispec - ; let inline = inl_inline ispec - ; pragma <- if noUserInlineSpec inline - then -- SPECIALISE - repPragSpec nm1 ty1 phases - else -- SPECIALISE INLINE - do { inline1 <- repInline inline - ; repPragSpecInl nm1 ty1 inline1 phases } + ; (inl, phases) <- rep_inline_phases ispec + ; pragma <- repPragSpec nm1 ty1 inl phases ; return [(loc, pragma)] } +rep_specialiseE :: RuleBndrs GhcRn -> LHsExpr GhcRn -> InlinePragma + -> MetaM (Core (M TH.Dec)) +rep_specialiseE bndrs e ispec + -- New form SPECIALISE pragmas + = repRuleBinders bndrs $ \ ty_bndrs tm_bndrs -> + do { (inl, phases) <- rep_inline_phases ispec + ; exp <- repLE e + ; repPragSpecE ty_bndrs tm_bndrs exp inl phases + } + rep_specialiseInst :: LHsSigType GhcRn -> SrcSpan -> MetaM [(SrcSpan, Core (M TH.Dec))] rep_specialiseInst ty loc @@ -2751,15 +2777,18 @@ repPragInl (MkC nm) (MkC inline) (MkC rm) (MkC phases) repPragOpaque :: Core TH.Name -> MetaM (Core (M TH.Dec)) repPragOpaque (MkC nm) = rep2 pragOpaqueDName [nm] -repPragSpec :: Core TH.Name -> Core (M TH.Type) -> Core TH.Phases +repPragSpec :: Core TH.Name -> Core (M TH.Type) -> Core (Maybe (TH.Inline)) + -> Core TH.Phases -> MetaM (Core (M TH.Dec)) -repPragSpec (MkC nm) (MkC ty) (MkC phases) - = rep2 pragSpecDName [nm, ty, phases] - -repPragSpecInl :: Core TH.Name -> Core (M TH.Type) -> Core TH.Inline - -> Core TH.Phases -> MetaM (Core (M TH.Dec)) -repPragSpecInl (MkC nm) (MkC ty) (MkC inline) (MkC phases) - = rep2 pragSpecInlDName [nm, ty, inline, phases] +repPragSpec (MkC nm) (MkC ty) (MkC inline) (MkC phases) + = rep2 pragSpecDName [nm, ty, inline, phases] + +repPragSpecE :: Core (Maybe [M (TH.TyVarBndr ())]) -> Core [(M TH.RuleBndr)] + -> Core (M TH.Exp) + -> Core (Maybe (TH.Inline)) -> Core TH.Phases + -> MetaM (Core (M TH.Dec)) +repPragSpecE (MkC ty_bndrs) (MkC tm_bndrs) (MkC expr) (MkC inline) (MkC phases) + = rep2 pragSpecEDName [ty_bndrs, tm_bndrs, expr, inline, phases] repPragSpecInst :: Core (M TH.Type) -> MetaM (Core (M TH.Dec)) repPragSpecInst (MkC ty) = rep2 pragSpecInstDName [ty] ===================================== compiler/GHC/ThToHs.hs ===================================== @@ -898,21 +898,7 @@ cvtPragmaD (OpaqueP nm) cvtPragmaD (SpecialiseP nm ty inline phases) = do { nm' <- vNameN nm ; ty' <- cvtSigType ty - ; let src TH.NoInline = fsLit "{-# SPECIALISE NOINLINE" - src TH.Inline = fsLit "{-# SPECIALISE INLINE" - src TH.Inlinable = fsLit "{-# SPECIALISE INLINE" - ; let (inline', dflt, srcText) = case inline of - Just inline1 -> (cvtInline inline1 (toSrcTxt inline1), dfltActivation inline1, - toSrcTxt inline1) - Nothing -> (NoUserInlinePrag, AlwaysActive, - SourceText $ fsLit "{-# SPECIALISE") - where - toSrcTxt a = SourceText $ src a - ; let ip = InlinePragma { inl_src = srcText - , inl_inline = inline' - , inl_rule = Hs.FunLike - , inl_act = cvtPhases phases dflt - , inl_sat = Nothing } + ; let ip = cvtInlinePhases inline phases ; returnJustLA $ Hs.SigD noExtField $ SpecSig noAnn nm' [ty'] ip } cvtPragmaD (SpecialiseInstP ty) @@ -920,6 +906,16 @@ cvtPragmaD (SpecialiseInstP ty) ; returnJustLA $ Hs.SigD noExtField $ SpecInstSig (noAnn, (SourceText $ fsLit "{-# SPECIALISE")) ty' } +cvtPragmaD (SpecialiseEP ty_bndrs tm_bndrs exp inline phases) + = do { ty_bndrs' <- traverse cvtTvs ty_bndrs + ; tm_bndrs' <- mapM cvtRuleBndr tm_bndrs + ; let ip = cvtInlinePhases inline phases + ; exp' <- cvtl exp + ; let bndrs' = RuleBndrs { rb_ext = noAnn, rb_tyvs = ty_bndrs', rb_tmvs = tm_bndrs' } + ; returnJustLA $ Hs.SigD noExtField $ + SpecSigE noAnn bndrs' exp' ip + } + cvtPragmaD (RuleP nm ty_bndrs tm_bndrs lhs rhs phases) = do { let nm' = mkFastString nm ; rd_name' <- returnLA nm' @@ -1000,6 +996,24 @@ cvtRuleBndr (TypedRuleVar n ty) ; ty' <- cvtType ty ; returnLA $ Hs.RuleBndrSig noAnn n' $ mkHsPatSigType noAnn ty' } +cvtInlinePhases :: Maybe Inline -> Phases -> InlinePragma +cvtInlinePhases inline phases = + let src TH.NoInline = fsLit "{-# SPECIALISE NOINLINE" + src TH.Inline = fsLit "{-# SPECIALISE INLINE" + src TH.Inlinable = fsLit "{-# SPECIALISE INLINE" + (inline', dflt, srcText) = case inline of + Just inline1 -> (cvtInline inline1 (toSrcTxt inline1), dfltActivation inline1, + toSrcTxt inline1) + Nothing -> (NoUserInlinePrag, AlwaysActive, + SourceText $ fsLit "{-# SPECIALISE") + where + toSrcTxt a = SourceText $ src a + in InlinePragma { inl_src = srcText + , inl_inline = inline' + , inl_rule = Hs.FunLike + , inl_act = cvtPhases phases dflt + , inl_sat = Nothing } + --------------------------------------------------- -- Declarations --------------------------------------------------- ===================================== hadrian/src/Hadrian/Utilities.hs ===================================== @@ -7,7 +7,7 @@ module Hadrian.Utilities ( quote, yesNo, parseYesNo, zeroOne, -- * FilePath manipulation - unifyPath, (-/-), makeRelativeNoSysLink, + unifyPath, (-/-), makeRelativeNoSysLink, makeAbsolute, -- * Accessing Shake's type-indexed map insertExtra, lookupExtra, userSetting, @@ -57,6 +57,7 @@ import qualified System.Directory.Extra as IO import qualified System.Info.Extra as IO import qualified System.IO as IO import System.IO.Error (isPermissionError) +import qualified System.FilePath.Posix as Posix -- | Extract a value from a singleton list, or terminate with an error message -- if the list does not contain exactly one value. @@ -146,6 +147,14 @@ a -/- b infixr 6 -/- +-- | Like 'System.Directory.makeAbsolute' from @directory@, but always +-- using forward slashes. +makeAbsolute :: FilePath -> IO FilePath +makeAbsolute fp = do + cwd <- IO.getCurrentDirectory + let fp' = cwd -/- fp + return $ Posix.normalise fp' + -- | This is like Posix makeRelative, but assumes no sys links in the input -- paths. This allows the result to start with possibly many "../"s. Input -- paths must both be relative, or be on the same drive ===================================== hadrian/src/Rules/CabalReinstall.hs ===================================== @@ -55,10 +55,10 @@ cabalBuildRules = do distDir <- Context.distDir (vanillaContext Stage1 rts) let rtsIncludeDir = distDir -/- "include" - libdir <- liftIO . IO.makeAbsolute =<< stageLibPath Stage1 - work_dir <- liftIO $ IO.makeAbsolute $ root -/- "stage-cabal" + libdir <- liftIO . makeAbsolute =<< stageLibPath Stage1 + work_dir <- liftIO $ makeAbsolute $ root -/- "stage-cabal" let outputDir = work_dir -/- "bin" - includeDir <- liftIO $ IO.makeAbsolute rtsIncludeDir + includeDir <- liftIO $ makeAbsolute rtsIncludeDir createDirectory outputDir @@ -95,7 +95,7 @@ cabalBuildRules = do -- Just symlink these for now -- TODO: build these with cabal as well forM_ iserv_targets $ \(_bin_pkg,bin_path') -> do - bin_path <- liftIO $ IO.makeAbsolute bin_path' + bin_path <- liftIO $ makeAbsolute bin_path' let orig_filename = takeFileName bin_path output_file = outputDir -/- orig_filename liftIO $ do ===================================== hadrian/src/Rules/Test.hs ===================================== @@ -195,7 +195,7 @@ testRules = do -- get relative path for the given program in the given stage let relative_path_stage s p = programPath =<< programContext s p let make_absolute rel_path = do - abs_path <- liftIO (IO.makeAbsolute rel_path) + abs_path <- liftIO (makeAbsolute rel_path) fixAbsolutePathOnWindows abs_path rel_ghc_pkg <- relative_path_stage Stage1 ghcPkg ===================================== hadrian/src/Settings/Builders/Cabal.hs ===================================== @@ -11,7 +11,6 @@ import Settings.Builders.Common import qualified Settings.Builders.Common as S import Control.Exception (assert) import qualified Data.Set as Set -import System.Directory import Settings.Program (programContext) import GHC.Toolchain (ccLinkProgram, tgtCCompilerLink) import GHC.Toolchain.Program (prgFlags) ===================================== hadrian/src/Settings/Builders/Ghc.hs ===================================== @@ -12,7 +12,6 @@ import Settings.Warnings import qualified Context as Context import Rules.Libffi (libffiName) import qualified Data.Set as Set -import System.Directory import Data.Version.Extra ghcBuilderArgs :: Args ===================================== libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs ===================================== @@ -2164,7 +2164,9 @@ data Pragma = InlineP Name Inline RuleMatch Phases | OpaqueP Name -- ^ @{ {\-\# OPAQUE T #-} }@ | SpecialiseP Name Type (Maybe Inline) Phases - -- ^ @{ {\-\# SPECIALISE [INLINE] [phases] T #-} }@ + -- ^ @{ {\-\# SPECIALISE [INLINE] [phases] nm :: ty #-} }@ + | SpecialiseEP (Maybe [TyVarBndr ()]) [RuleBndr] Exp (Maybe Inline) Phases + -- ^ @{ {\-\# SPECIALISE [INLINE] [phases] exp #-} }@ | SpecialiseInstP Type -- ^ @{ {\-\# SPECIALISE instance I #-} }@ | RuleP String (Maybe [TyVarBndr ()]) [RuleBndr] Exp Exp Phases View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0295f87c7d484a6a7795356115c2e9ea973f58b4...4034f989d7522d30e3299160ae6412d18636b524 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0295f87c7d484a6a7795356115c2e9ea973f58b4...4034f989d7522d30e3299160ae6412d18636b524 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 12:17:31 2024 From: gitlab at gitlab.haskell.org (sheaf (@sheaf)) Date: Wed, 27 Nov 2024 07:17:31 -0500 Subject: [Git][ghc/ghc][wip/T24359] TH support for new SPECIALISE syntax Message-ID: <67470ddbe9a2a_18219f3f4120130e8@gitlab.mail> sheaf pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: f2ed0396 by sheaf at 2024-11-27T13:17:18+01:00 TH support for new SPECIALISE syntax - - - - - 4 changed files: - compiler/GHC/Builtin/Names/TH.hs - compiler/GHC/HsToCore/Quote.hs - compiler/GHC/ThToHs.hs - libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs Changes: ===================================== compiler/GHC/Builtin/Names/TH.hs ===================================== @@ -75,7 +75,7 @@ templateHaskellNames = [ funDName, valDName, dataDName, newtypeDName, typeDataDName, tySynDName, classDName, instanceWithOverlapDName, standaloneDerivWithStrategyDName, sigDName, kiSigDName, forImpDName, - pragInlDName, pragOpaqueDName, pragSpecDName, pragSpecInlDName, pragSpecInstDName, + pragInlDName, pragOpaqueDName, pragSpecDName, pragSpecEDName, pragSpecInstDName, pragRuleDName, pragCompleteDName, pragAnnDName, pragSCCFunDName, pragSCCFunNamedDName, defaultSigDName, defaultDName, dataFamilyDName, openTypeFamilyDName, closedTypeFamilyDName, @@ -386,7 +386,7 @@ recSName = libFun (fsLit "recS") recSIdKey -- data Dec = ... funDName, valDName, dataDName, newtypeDName, typeDataDName, tySynDName, classDName, instanceWithOverlapDName, sigDName, kiSigDName, forImpDName, pragInlDName, - pragSpecDName, pragSpecInlDName, pragSpecInstDName, pragRuleDName, + pragSpecDName, pragSpecEDName, pragSpecInstDName, pragRuleDName, pragAnnDName, pragSCCFunDName, pragSCCFunNamedDName, standaloneDerivWithStrategyDName, defaultSigDName, defaultDName, dataInstDName, newtypeInstDName, tySynInstDName, dataFamilyDName, @@ -410,7 +410,7 @@ forImpDName = libFun (fsLit "forImpD") pragInlDName = libFun (fsLit "pragInlD") pragInlDIdKey pragOpaqueDName = libFun (fsLit "pragOpaqueD") pragOpaqueDIdKey pragSpecDName = libFun (fsLit "pragSpecD") pragSpecDIdKey -pragSpecInlDName = libFun (fsLit "pragSpecInlD") pragSpecInlDIdKey +pragSpecEDName = libFun (fsLit "pragSpecED") pragSpecEDIdKey pragSpecInstDName = libFun (fsLit "pragSpecInstD") pragSpecInstDIdKey pragRuleDName = libFun (fsLit "pragRuleD") pragRuleDIdKey pragCompleteDName = libFun (fsLit "pragCompleteD") pragCompleteDIdKey @@ -955,7 +955,7 @@ recSIdKey = mkPreludeMiscIdUnique 316 -- data Dec = ... funDIdKey, valDIdKey, dataDIdKey, newtypeDIdKey, tySynDIdKey, classDIdKey, instanceWithOverlapDIdKey, instanceDIdKey, sigDIdKey, forImpDIdKey, - pragInlDIdKey, pragSpecDIdKey, pragSpecInlDIdKey, pragSpecInstDIdKey, + pragInlDIdKey, pragSpecDIdKey, pragSpecEDIdKey, pragSpecInstDIdKey, pragRuleDIdKey, pragAnnDIdKey, defaultSigDIdKey, dataFamilyDIdKey, openTypeFamilyDIdKey, closedTypeFamilyDIdKey, dataInstDIdKey, newtypeInstDIdKey, tySynInstDIdKey, standaloneDerivWithStrategyDIdKey, @@ -975,7 +975,7 @@ sigDIdKey = mkPreludeMiscIdUnique 328 forImpDIdKey = mkPreludeMiscIdUnique 329 pragInlDIdKey = mkPreludeMiscIdUnique 330 pragSpecDIdKey = mkPreludeMiscIdUnique 331 -pragSpecInlDIdKey = mkPreludeMiscIdUnique 332 +pragSpecEDIdKey = mkPreludeMiscIdUnique 332 pragSpecInstDIdKey = mkPreludeMiscIdUnique 333 pragRuleDIdKey = mkPreludeMiscIdUnique 334 pragAnnDIdKey = mkPreludeMiscIdUnique 335 ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -800,28 +800,37 @@ repDefD (L loc (DefaultDecl _ _ tys)) = do { tys1 <- repLTys tys repRuleD :: LRuleDecl GhcRn -> MetaM (SrcSpan, Core (M TH.Dec)) repRuleD (L loc (HsRule { rd_name = n , rd_act = act - , rd_bndrs = RuleBndrs { rb_tyvs = m_ty_bndrs, rb_tmvs = tm_bndrs } + , rd_bndrs = bndrs , rd_lhs = lhs , rd_rhs = rhs })) + = fmap (locA loc, ) <$> + repRuleBinders bndrs $ \ ty_bndrs' tm_bndrs' -> + do { n' <- coreStringLit $ unLoc n + ; act' <- repPhases act + ; lhs' <- repLE lhs + ; rhs' <- repLE rhs + ; repPragRule n' ty_bndrs' tm_bndrs' lhs' rhs' act' } + +repRuleBinders :: RuleBndrs GhcRn + -> (Core (Maybe [M (TH.TyVarBndr ())]) -> Core [M TH.RuleBndr] -> MetaM (Core (M a))) + -> MetaM (Core (M a)) +repRuleBinders (RuleBndrs { rb_tyvs = m_ty_bndrs, rb_tmvs = tm_bndrs }) thing_inside = do { let ty_bndrs = fromMaybe [] m_ty_bndrs - ; rule <- addHsTyVarBinds FreshNamesOnly ty_bndrs $ \ ex_bndrs -> - do { let tm_bndr_names = concatMap ruleBndrNames tm_bndrs - ; ss <- mkGenSyms tm_bndr_names - ; rule <- addBinds ss $ - do { elt_ty <- wrapName tyVarBndrUnitTyConName - ; ty_bndrs' <- return $ case m_ty_bndrs of - Nothing -> coreNothing' (mkListTy elt_ty) - Just _ -> coreJust' (mkListTy elt_ty) ex_bndrs - ; tm_bndrs' <- repListM ruleBndrTyConName - repRuleBndr - tm_bndrs - ; n' <- coreStringLit $ unLoc n - ; act' <- repPhases act - ; lhs' <- repLE lhs - ; rhs' <- repLE rhs - ; repPragRule n' ty_bndrs' tm_bndrs' lhs' rhs' act' } - ; wrapGenSyms ss rule } - ; return (locA loc, rule) } + ; addHsTyVarBinds FreshNamesOnly ty_bndrs $ \ ex_bndrs -> + do { let tm_bndr_names = concatMap ruleBndrNames tm_bndrs + ; ss <- mkGenSyms tm_bndr_names + ; x <- addBinds ss $ + do { elt_ty <- wrapName tyVarBndrUnitTyConName + ; ty_bndrs' <- return $ case m_ty_bndrs of + Nothing -> coreNothing' (mkListTy elt_ty) + Just _ -> coreJust' (mkListTy elt_ty) ex_bndrs + ; tm_bndrs' <- repListM ruleBndrTyConName + repRuleBndr + tm_bndrs + ; thing_inside ty_bndrs' tm_bndrs' + } + ; wrapGenSyms ss x } + } ruleBndrNames :: LRuleBndr GhcRn -> [Name] ruleBndrNames (L _ (RuleBndr _ n)) = [unLoc n] @@ -992,8 +1001,9 @@ rep_sig (L loc (FixSig _ fix_sig)) = rep_fix_d (locA loc) fix_sig rep_sig (L loc (InlineSig _ nm ispec))= rep_inline nm ispec (locA loc) rep_sig (L loc (SpecSig _ nm tys ispec)) = concatMapM (\t -> rep_specialise nm t ispec (locA loc)) tys -rep_sig (L _ sig@(SpecSigE {})) - = pprPanic "No TH for SPECIALISE yet" (ppr sig) +rep_sig (L loc (SpecSigE _nm bndrs expr ispec)) + = fmap ( \ d -> [(locA loc, d)]) $ + rep_specialiseE bndrs expr ispec rep_sig (L loc (SpecInstSig _ ty)) = rep_specialiseInst ty (locA loc) rep_sig (L _ (MinimalSig {})) = notHandled ThMinimalPragmas rep_sig (L loc (SCCFunSig _ nm str)) = rep_sccFun nm str (locA loc) @@ -1096,23 +1106,39 @@ rep_inline nm ispec loc ; return [(loc, pragma)] } +rep_inline_phases :: InlinePragma -> MetaM (Core (Maybe TH.Inline), Core TH.Phases) +rep_inline_phases (InlinePragma { inl_act = act, inl_inline = inl }) + = do { phases <- repPhases act + ; inl <- if noUserInlineSpec inl + -- SPECIALISE + then dataCon nothingDataConName + -- SPECIALISE INLINE + else do { MkC inl1 <- repInline inl + ; dataCon' justDataConName [inl1] } + ; return (inl, phases) } + rep_specialise :: LocatedN Name -> LHsSigType GhcRn -> InlinePragma -> SrcSpan -> MetaM [(SrcSpan, Core (M TH.Dec))] rep_specialise nm ty ispec loc + -- Old form SPECIALISE pragmas = do { nm1 <- lookupLOcc nm ; ty1 <- repHsSigType ty - ; phases <- repPhases $ inl_act ispec - ; let inline = inl_inline ispec - ; pragma <- if noUserInlineSpec inline - then -- SPECIALISE - repPragSpec nm1 ty1 phases - else -- SPECIALISE INLINE - do { inline1 <- repInline inline - ; repPragSpecInl nm1 ty1 inline1 phases } + ; (inl, phases) <- rep_inline_phases ispec + ; pragma <- repPragSpec nm1 ty1 inl phases ; return [(loc, pragma)] } +rep_specialiseE :: RuleBndrs GhcRn -> LHsExpr GhcRn -> InlinePragma + -> MetaM (Core (M TH.Dec)) +rep_specialiseE bndrs e ispec + -- New form SPECIALISE pragmas + = repRuleBinders bndrs $ \ ty_bndrs tm_bndrs -> + do { (inl, phases) <- rep_inline_phases ispec + ; exp <- repLE e + ; repPragSpecE ty_bndrs tm_bndrs exp inl phases + } + rep_specialiseInst :: LHsSigType GhcRn -> SrcSpan -> MetaM [(SrcSpan, Core (M TH.Dec))] rep_specialiseInst ty loc @@ -2751,15 +2777,18 @@ repPragInl (MkC nm) (MkC inline) (MkC rm) (MkC phases) repPragOpaque :: Core TH.Name -> MetaM (Core (M TH.Dec)) repPragOpaque (MkC nm) = rep2 pragOpaqueDName [nm] -repPragSpec :: Core TH.Name -> Core (M TH.Type) -> Core TH.Phases +repPragSpec :: Core TH.Name -> Core (M TH.Type) -> Core (Maybe (TH.Inline)) + -> Core TH.Phases -> MetaM (Core (M TH.Dec)) -repPragSpec (MkC nm) (MkC ty) (MkC phases) - = rep2 pragSpecDName [nm, ty, phases] - -repPragSpecInl :: Core TH.Name -> Core (M TH.Type) -> Core TH.Inline - -> Core TH.Phases -> MetaM (Core (M TH.Dec)) -repPragSpecInl (MkC nm) (MkC ty) (MkC inline) (MkC phases) - = rep2 pragSpecInlDName [nm, ty, inline, phases] +repPragSpec (MkC nm) (MkC ty) (MkC inline) (MkC phases) + = rep2 pragSpecDName [nm, ty, inline, phases] + +repPragSpecE :: Core (Maybe [M (TH.TyVarBndr ())]) -> Core [(M TH.RuleBndr)] + -> Core (M TH.Exp) + -> Core (Maybe (TH.Inline)) -> Core TH.Phases + -> MetaM (Core (M TH.Dec)) +repPragSpecE (MkC ty_bndrs) (MkC tm_bndrs) (MkC expr) (MkC inline) (MkC phases) + = rep2 pragSpecEDName [ty_bndrs, tm_bndrs, expr, inline, phases] repPragSpecInst :: Core (M TH.Type) -> MetaM (Core (M TH.Dec)) repPragSpecInst (MkC ty) = rep2 pragSpecInstDName [ty] ===================================== compiler/GHC/ThToHs.hs ===================================== @@ -898,21 +898,7 @@ cvtPragmaD (OpaqueP nm) cvtPragmaD (SpecialiseP nm ty inline phases) = do { nm' <- vNameN nm ; ty' <- cvtSigType ty - ; let src TH.NoInline = fsLit "{-# SPECIALISE NOINLINE" - src TH.Inline = fsLit "{-# SPECIALISE INLINE" - src TH.Inlinable = fsLit "{-# SPECIALISE INLINE" - ; let (inline', dflt, srcText) = case inline of - Just inline1 -> (cvtInline inline1 (toSrcTxt inline1), dfltActivation inline1, - toSrcTxt inline1) - Nothing -> (NoUserInlinePrag, AlwaysActive, - SourceText $ fsLit "{-# SPECIALISE") - where - toSrcTxt a = SourceText $ src a - ; let ip = InlinePragma { inl_src = srcText - , inl_inline = inline' - , inl_rule = Hs.FunLike - , inl_act = cvtPhases phases dflt - , inl_sat = Nothing } + ; let ip = cvtInlinePhases inline phases ; returnJustLA $ Hs.SigD noExtField $ SpecSig noAnn nm' [ty'] ip } cvtPragmaD (SpecialiseInstP ty) @@ -920,6 +906,16 @@ cvtPragmaD (SpecialiseInstP ty) ; returnJustLA $ Hs.SigD noExtField $ SpecInstSig (noAnn, (SourceText $ fsLit "{-# SPECIALISE")) ty' } +cvtPragmaD (SpecialiseEP ty_bndrs tm_bndrs exp inline phases) + = do { ty_bndrs' <- traverse cvtTvs ty_bndrs + ; tm_bndrs' <- mapM cvtRuleBndr tm_bndrs + ; let ip = cvtInlinePhases inline phases + ; exp' <- cvtl exp + ; let bndrs' = RuleBndrs { rb_ext = noAnn, rb_tyvs = ty_bndrs', rb_tmvs = tm_bndrs' } + ; returnJustLA $ Hs.SigD noExtField $ + SpecSigE noAnn bndrs' exp' ip + } + cvtPragmaD (RuleP nm ty_bndrs tm_bndrs lhs rhs phases) = do { let nm' = mkFastString nm ; rd_name' <- returnLA nm' @@ -1000,6 +996,24 @@ cvtRuleBndr (TypedRuleVar n ty) ; ty' <- cvtType ty ; returnLA $ Hs.RuleBndrSig noAnn n' $ mkHsPatSigType noAnn ty' } +cvtInlinePhases :: Maybe Inline -> Phases -> InlinePragma +cvtInlinePhases inline phases = + let src TH.NoInline = fsLit "{-# SPECIALISE NOINLINE" + src TH.Inline = fsLit "{-# SPECIALISE INLINE" + src TH.Inlinable = fsLit "{-# SPECIALISE INLINE" + (inline', dflt, srcText) = case inline of + Just inline1 -> (cvtInline inline1 (toSrcTxt inline1), dfltActivation inline1, + toSrcTxt inline1) + Nothing -> (NoUserInlinePrag, AlwaysActive, + SourceText $ fsLit "{-# SPECIALISE") + where + toSrcTxt a = SourceText $ src a + in InlinePragma { inl_src = srcText + , inl_inline = inline' + , inl_rule = Hs.FunLike + , inl_act = cvtPhases phases dflt + , inl_sat = Nothing } + --------------------------------------------------- -- Declarations --------------------------------------------------- ===================================== libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs ===================================== @@ -2164,7 +2164,9 @@ data Pragma = InlineP Name Inline RuleMatch Phases | OpaqueP Name -- ^ @{ {\-\# OPAQUE T #-} }@ | SpecialiseP Name Type (Maybe Inline) Phases - -- ^ @{ {\-\# SPECIALISE [INLINE] [phases] T #-} }@ + -- ^ @{ {\-\# SPECIALISE [INLINE] [phases] nm :: ty #-} }@ + | SpecialiseEP (Maybe [TyVarBndr ()]) [RuleBndr] Exp (Maybe Inline) Phases + -- ^ @{ {\-\# SPECIALISE [INLINE] [phases] exp #-} }@ | SpecialiseInstP Type -- ^ @{ {\-\# SPECIALISE instance I #-} }@ | RuleP String (Maybe [TyVarBndr ()]) [RuleBndr] Exp Exp Phases View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f2ed0396c6d890b4251cd73ce148eace791df9fb -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f2ed0396c6d890b4251cd73ce148eace791df9fb You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 12:20:55 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 07:20:55 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Cmm constant folding: Narrow results to operations bitwidth. Message-ID: <67470ea753feb_18219f6250d4171d9@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 0ffb8c18 by Andreas Klebinger at 2024-11-27T07:20:39-05:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - 091f0167 by Ben Gamari at 2024-11-27T07:20:40-05:00 ghc-toolchain: Introduce basic flag validation We verify that required flags (currently `--output` and `--triple`) are provided. The implementation is truly awful, but so is getopt. Begins to address #25500. - - - - - 3a7021cb by Ben Gamari at 2024-11-27T07:20:41-05:00 rts: Allow ExecPage to allocate anywhere in address space Currently the ExecPage facility has two users: * GHCi, for constructing info tables, and * the adjustor allocation path Despite neither of these have any spatial locality constraints ExecPage was using the linker's `mmapAnonForLinker`, which tries hard to ensure that mappings end up nearby the executable image. This makes adjustor allocation needlessly subject to fragmentation concerns. We now instead return less constrained mappings, improving the robustness of the mechanism. Addresses #25503. - - - - - 76bc29cf by Ben Gamari at 2024-11-27T07:20:42-05:00 base: Fix incorrect mentions of GHC.Internal.Numeric These were incorrectly changed by the automated refactoring of the `ghc-internal` migration. Fixes #25521. - - - - - 15 changed files: - compiler/GHC/Builtin/Names.hs - compiler/GHC/Cmm/Opt.hs - libraries/base/src/Data/Char.hs - libraries/base/src/Data/Semigroup.hs - libraries/base/src/Prelude.hs - libraries/ghc-internal/src/GHC/Internal/Base.hs - libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs - libraries/ghc-internal/src/GHC/Internal/Read.hs - libraries/ghc-internal/src/GHC/Internal/Real.hs - rts/ExecPage.c - rts/linker/MMap.c - rts/linker/MMap.h - + testsuite/tests/cmm/opt/T24556.cmm - testsuite/tests/cmm/opt/all.T - utils/ghc-toolchain/exe/Main.hs Changes: ===================================== compiler/GHC/Builtin/Names.hs ===================================== @@ -279,7 +279,7 @@ basicKnownKeyNames -- Dynamic toDynName, - -- GHC.Internal.Numeric stuff + -- Numeric stuff negateName, minusName, geName, eqName, mkRationalBase2Name, mkRationalBase10Name, ===================================== compiler/GHC/Cmm/Opt.hs ===================================== @@ -49,6 +49,7 @@ constantFoldExprOpt e = wrapRecExpOpt f e CmmMachOp op' args' -> fromMaybe (CmmMachOp op' args') <$> cmmMachOpFoldOptM cfg op' args' e -> pure e f (CmmRegOff r 0) = pure (CmmReg r) + f (CmmLit (CmmInt x rep)) = pure (CmmLit $ CmmInt (narrowU rep x) rep) f e = pure e constantFoldExpr :: Platform -> CmmExpr -> CmmExpr @@ -88,7 +89,7 @@ cmmMachOpFoldM _ (MO_VF_Broadcast lg _w) exprs = _ -> Nothing cmmMachOpFoldM _ op [CmmLit (CmmInt x rep)] = Just $! case op of - MO_S_Neg _ -> CmmLit (CmmInt (-x) rep) + MO_S_Neg _ -> CmmLit (CmmInt (narrowS rep (-x)) rep) MO_Not _ -> CmmLit (CmmInt (complement x) rep) -- these are interesting: we must first narrow to the @@ -164,9 +165,9 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_S_Lt _ -> Just $! CmmLit (CmmInt (if x_s < y_s then 1 else 0) (wordWidth platform)) MO_S_Le _ -> Just $! CmmLit (CmmInt (if x_s <= y_s then 1 else 0) (wordWidth platform)) - MO_Add r -> Just $! CmmLit (CmmInt (x + y) r) - MO_Sub r -> Just $! CmmLit (CmmInt (x - y) r) - MO_Mul r -> Just $! CmmLit (CmmInt (x * y) r) + MO_Add r -> Just $! CmmLit (CmmInt (narrowU r $ x + y) r) + MO_Sub r -> Just $! CmmLit (CmmInt (narrowS r $ x - y) r) + MO_Mul r -> Just $! CmmLit (CmmInt (narrowU r $ x * y) r) MO_U_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `quot` y_u) r) MO_U_Rem r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `rem` y_u) r) MO_S_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_s `quot` y_s) r) @@ -176,7 +177,7 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_Or r -> Just $! CmmLit (CmmInt (x .|. y) r) MO_Xor r -> Just $! CmmLit (CmmInt (x `xor` y) r) - MO_Shl r -> Just $! CmmLit (CmmInt (x `shiftL` fromIntegral y) r) + MO_Shl r -> Just $! CmmLit (CmmInt (narrowU r $ x `shiftL` fromIntegral y) r) MO_U_Shr r -> Just $! CmmLit (CmmInt (x_u `shiftR` fromIntegral y) r) MO_S_Shr r -> Just $! CmmLit (CmmInt (x_s `shiftR` fromIntegral y) r) ===================================== libraries/base/src/Data/Char.hs ===================================== @@ -42,7 +42,7 @@ module Data.Char , digitToInt , intToDigit - -- * GHC.Internal.Numeric representations + -- * Numeric representations , ord , chr ===================================== libraries/base/src/Data/Semigroup.hs ===================================== @@ -89,7 +89,7 @@ module Data.Semigroup ( , First(..) , Last(..) , WrappedMonoid(..) - -- * Re-exported monoids from GHC.Internal.Data.Monoid + -- * Re-exported monoids , Dual(..) , Endo(..) , All(..) ===================================== libraries/base/src/Prelude.hs ===================================== @@ -47,11 +47,11 @@ module Prelude ( -- ** Numbers - -- *** GHC.Internal.Numeric types + -- *** Numeric types Int, Integer, Float, Double, Rational, Word, - -- *** GHC.Internal.Numeric type classes + -- *** Numeric type classes Num((+), (-), (*), negate, abs, signum, fromInteger), Real(toRational), Integral(quot, rem, div, mod, quotRem, divMod, toInteger), @@ -63,7 +63,7 @@ module Prelude ( encodeFloat, exponent, significand, scaleFloat, isNaN, isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2), - -- *** GHC.Internal.Numeric functions + -- *** Numeric functions subtract, even, odd, gcd, lcm, (^), (^^), fromIntegral, realToFrac, ===================================== libraries/ghc-internal/src/GHC/Internal/Base.hs ===================================== @@ -2355,7 +2355,7 @@ getTag :: forall {lev :: Levity} (a :: TYPE (BoxedRep lev)) getTag = dataToTag# ---------------------------------------------- --- GHC.Internal.Numeric primops +-- Numeric primops ---------------------------------------------- -- Definitions of the boxed PrimOps; these will be ===================================== libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs ===================================== @@ -47,7 +47,7 @@ module GHC.Internal.Foreign.C.Types , CLLong(..), CULLong(..), CBool(..) , CIntPtr(..), CUIntPtr(..), CIntMax(..), CUIntMax(..) - -- ** GHC.Internal.Numeric types + -- ** Numeric types -- | These types are represented as @newtype at s of basic -- foreign types, and are instances of -- 'Prelude.Eq', 'Prelude.Ord', 'Prelude.Num', 'Prelude.Read', ===================================== libraries/ghc-internal/src/GHC/Internal/Read.hs ===================================== @@ -551,7 +551,7 @@ instance Read L.Lexeme where readList = readListDefault -------------------------------------------------------------- --- GHC.Internal.Numeric instances of Read +-- Numeric instances of Read -------------------------------------------------------------- readNumber :: Num a => (L.Lexeme -> ReadPrec a) -> ReadPrec a ===================================== libraries/ghc-internal/src/GHC/Internal/Real.hs ===================================== @@ -360,7 +360,7 @@ numericEnumFrom :: (Fractional a) => a -> [a] {-# INLINE numericEnumFrom #-} -- See Note [Inline Enum method helpers] in GHC.Internal.Enum numericEnumFrom n = go 0 where - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k in n' : go (k + 1) @@ -369,7 +369,7 @@ numericEnumFromThen :: (Fractional a) => a -> a -> [a] numericEnumFromThen n m = go 0 where step = m - n - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k * step in n' : go (k + 1) @@ -386,7 +386,7 @@ numericEnumFromThenTo e1 e2 !e3 !predicate | e2 >= e1 = (<= e3 + mid) | otherwise = (>= e3 + mid) -{- Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] +{- Note [Numeric Stability of Enumerating Floating Numbers] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When enumerate floating numbers, we could add the increment to the last number at every run (as what we did previously): ===================================== rts/ExecPage.c ===================================== @@ -10,7 +10,7 @@ #include "linker/MMap.h" ExecPage *allocateExecPage(void) { - ExecPage *page = (ExecPage *) mmapAnonForLinker(getPageSize()); + ExecPage *page = (ExecPage *) mmapAnon(getPageSize()); return page; } ===================================== rts/linker/MMap.c ===================================== @@ -207,6 +207,12 @@ memoryAccessToProt(MemoryAccess access) } } +void * +mmapAnon (size_t bytes) +{ + return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); +} + // // Returns NULL on failure. // @@ -410,6 +416,15 @@ mmapForLinker (size_t bytes, MemoryAccess access, uint32_t flags, int fd, int of return result; } +/* + * Map read/write pages anywhere in memory. Returns NULL on failure. + */ +void * +mmapAnon (size_t bytes) +{ + return mmapAnywhere(bytes, MEM_READ_WRITE_THEN_READ_EXECUTE, MAP_ANONYMOUS, -1, 0); +} + /* * Map read/write pages in low memory. Returns NULL on failure. */ ===================================== rts/linker/MMap.h ===================================== @@ -64,7 +64,11 @@ typedef enum { extern void *mmap_32bit_base; -// Map read/write anonymous memory. +// Map read/write anonymous memory anywhere in memory. +void *mmapAnon(size_t bytes); + +// Map read/write anonymous memory, enforcing the constraint of +// placing the mapping within 4GB of the executable image. void *mmapAnonForLinker (size_t bytes); // Change protection of previous mapping memory. ===================================== testsuite/tests/cmm/opt/T24556.cmm ===================================== @@ -0,0 +1,12 @@ +#include "Cmm.h" + +func(W_ buffer) { + I8[buffer] = %lobits8(255 + 45); + I8[buffer+(1)] = %lobits8(310 - 10); + I8[buffer+(2)] = %lobits8(30 * 10); + I8[buffer+(3)] = %lobits8(150 << 1); + // This one comes from test-primops + I64[buffer+(4)] = %zx64(((1 :: bits16) & ((1 :: bits16) & (((516 :: bits16) * (154 :: bits16)) + bits16[buffer + (0 :: W_)])))); + return(1); +} + ===================================== testsuite/tests/cmm/opt/all.T ===================================== @@ -3,3 +3,8 @@ test('T15188', cmm_src, makefile_test, []) test('T18141', normal, compile, ['']) test('T20142', normal, compile, ['']) + +# Cmm opt should not produce oversized literals in the assembly output. +# We check this by telling the assembler to exit on warnings. +test('T24556', [only_ways('optasm'), cmm_src], compile, ['-O -opta -Xassembler -opta --fatal-warnings']) + ===================================== utils/ghc-toolchain/exe/Main.hs ===================================== @@ -35,11 +35,11 @@ import GHC.Toolchain.NormaliseTriple (normaliseTriple) import Text.Read (readMaybe) data Opts = Opts - { optTriple :: String + { optTriple :: Maybe String , optTargetPrefix :: Maybe String , optLocallyExecutable :: Maybe Bool , optLlvmTriple :: Maybe String - , optOutput :: String + , optOutput :: Maybe String , optCc :: ProgOpt , optCxx :: ProgOpt , optCpp :: ProgOpt @@ -82,11 +82,11 @@ emptyFormatOpts = FormatOpts { formatOptInput = error "formatOpts: input" emptyOpts :: Opts emptyOpts = Opts - { optTriple = "" + { optTriple = Nothing , optTargetPrefix = Nothing , optLocallyExecutable = Nothing , optLlvmTriple = Nothing - , optOutput = "" + , optOutput = Nothing , optCc = po0 , optCxx = po0 , optCpp = po0 @@ -129,13 +129,13 @@ _optMergeObjs = Lens optMergeObjs (\x o -> o {optMergeObjs=x}) _optWindres = Lens optWindres (\x o -> o {optWindres=x}) _optLd = Lens optLd (\x o -> o {optLd= x}) -_optTriple :: Lens Opts String +_optTriple :: Lens Opts (Maybe String) _optTriple = Lens optTriple (\x o -> o {optTriple=x}) _optLlvmTriple :: Lens Opts (Maybe String) _optLlvmTriple = Lens optLlvmTriple (\x o -> o {optLlvmTriple=x}) -_optOutput :: Lens Opts String +_optOutput :: Lens Opts (Maybe String) _optOutput = Lens optOutput (\x o -> o {optOutput=x}) _optTargetPrefix :: Lens Opts (Maybe String) @@ -213,7 +213,7 @@ options = , Option [] ["disable-" ++ optName] (NoArg (set lens (Just False))) ("Disable " ++ description) ] - tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple) "TRIPLE") "Target triple" + tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple . Just) "TRIPLE") "Target triple" llvmTripleOpt = Option [] ["llvm-triple"] (ReqArg (set _optLlvmTriple . Just) "LLVM-TRIPLE") "LLVM Target triple" targetPrefixOpt = Option ['T'] ["target-prefix"] (ReqArg (set _optTargetPrefix . Just) "PREFIX") @@ -233,7 +233,7 @@ options = keepTempOpt = Option [] ["keep-temp"] (NoArg (set _optKeepTemp True)) "do not remove temporary files" - outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput) "OUTPUT") + outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput . Just) "OUTPUT") "The output path for the generated target toolchain configuration" formatOpts :: [OptDescr (FormatOpts -> FormatOpts)] @@ -244,6 +244,16 @@ formatOpts = [ "The target file to format") ] +validateOpts :: Opts -> [String] +validateOpts opts = mconcat + [ assertJust _optTriple "missing --triple flag" + , assertJust _optOutput "missing --output flag" + ] + where + assertJust :: Lens Opts (Maybe a) -> String -> [String] + assertJust lens msg = + [ msg | Nothing <- pure $ view lens opts ] + main :: IO () main = do argv <- getArgs @@ -273,14 +283,14 @@ doFormat args = do doConfigure :: [String] -> IO () doConfigure args = do - let (opts0, _nonopts, errs) = getOpt RequireOrder options args + let (opts0, _nonopts, parseErrs) = getOpt RequireOrder options args let opts = foldr (.) id opts0 emptyOpts - case errs of + case parseErrs ++ validateOpts opts of [] -> do let env = Env { verbosity = optVerbosity opts , targetPrefix = case optTargetPrefix opts of Just prefix -> Just prefix - Nothing -> Just $ optTriple opts ++ "-" + Nothing -> Just $ fromMaybe (error "undefined triple") (optTriple opts) ++ "-" , keepTemp = optKeepTemp opts , canLocallyExecute = fromMaybe True (optLocallyExecutable opts) , logContexts = [] @@ -289,7 +299,7 @@ doConfigure args = do case r of Left err -> print err >> exitWith (ExitFailure 2) Right () -> return () - _ -> do + errs -> do mapM_ putStrLn errs putStrLn $ usageInfo "ghc-toolchain" options exitWith (ExitFailure 1) @@ -298,7 +308,7 @@ run :: Opts -> M () run opts = do tgt <- mkTarget opts logDebug $ "Final Target: " ++ show tgt - let file = optOutput opts + let file = fromMaybe (error "undefined --output") (optOutput opts) writeFile file (show tgt) optional :: M a -> M (Maybe a) @@ -390,7 +400,7 @@ ldOverrideWhitelist a = mkTarget :: Opts -> M Target mkTarget opts = do - normalised_triple <- normaliseTriple (optTriple opts) + normalised_triple <- normaliseTriple (fromMaybe (error "missing --triple") (optTriple opts)) -- Use Llvm target if specified, otherwise use triple as llvm target let tgtLlvmTarget = fromMaybe normalised_triple (optLlvmTriple opts) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/685b39e72fcffb3a82eaf600443b22567ac09ef9...76bc29cfd7e9afa19eb8b48453d08872e5bf5f3f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/685b39e72fcffb3a82eaf600443b22567ac09ef9...76bc29cfd7e9afa19eb8b48453d08872e5bf5f3f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 12:57:05 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Wed, 27 Nov 2024 07:57:05 -0500 Subject: [Git][ghc/ghc][wip/T24359] Disable nop-check temporarily Message-ID: <674717215cb83_18219f94b38027323@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 6f626e65 by Simon Peyton Jones at 2024-11-27T12:56:41+00:00 Disable nop-check temporarily .. to allow libraries to build.. - - - - - 1 changed file: - compiler/GHC/HsToCore/Binds.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -926,9 +926,9 @@ finishSpecPrag poly_rhs rule_bndrs poly_id rule_args ; return Nothing } -- Function is NOINLINE, and the specialisation inherits that -- See Note [Activation pragmas for SPECIALISE] - | all is_nop_arg rule_args - = do { diagnosticDs (DsUselessSpecialiseForNoInlineFunction poly_id) - ; return Nothing } -- Specialisation does nothing +-- | all is_nop_arg rule_args +-- = do { diagnosticDs (DsUselessSpecialiseForNoInlineFunction poly_id) +-- ; return Nothing } -- Specialisation does nothing | otherwise -- The RULE looks like View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6f626e658e6908590e5b4f86252abc5ec514cd07 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6f626e658e6908590e5b4f86252abc5ec514cd07 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 13:28:43 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 27 Nov 2024 08:28:43 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-rc1] 2 commits: Add haskeline to stage0Packages Message-ID: <67471e8b5dbec_18f17f130f888347@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-rc1 at Glasgow Haskell Compiler / GHC Commits: 90b49376 by Zubin Duggal at 2024-11-27T18:55:49+05:30 Add haskeline to stage0Packages Otherwise we link against boot inplace and boot unix as boot haskeline depends on boot unix. - - - - - 77f340a2 by Zubin Duggal at 2024-11-27T18:58:23+05:30 Fix ghc-e005 after HasCallstack changes - - - - - 2 changed files: - hadrian/src/Settings/Default.hs - testsuite/tests/ghc-e/should_run/ghc-e005.stderr Changes: ===================================== hadrian/src/Settings/Default.hs ===================================== @@ -94,6 +94,7 @@ stage0Packages = do , ghcPlatform , ghcToolchain , ghci + , haskeline , haddockApi , haddockLibrary , haddock ===================================== testsuite/tests/ghc-e/should_run/ghc-e005.stderr ===================================== @@ -4,19 +4,3 @@ foo HasCallStack backtrace: error, called at ghc-e005.hs:12:10 in main:Main - - -HasCallStack backtrace: - throwIO, called at libraries/exceptions/src/Control/Monad/Catch.hs:371:12 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at compiler/GHC/Driver/Monad.hs:167:54 in ghc-9.13-inplace:GHC.Driver.Monad - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at ghc/GHCi/UI/Monad.hs:295:15 in ghc-bin-9.13.20241115-inplace:GHCi.UI.Monad - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/exceptions/src/Control/Monad/Catch.hs:490:21 in exceptions-0.10.7-inplace:Control.Monad.Catch - throwM, called at libraries/haskeline/System/Console/Haskeline/InputT.hs:53:39 in haskeline-0.8.2.1-inplace:System.Console.Haskeline.InputT - throwM, called at ghc/GHCi/UI/Monad.hs:221:3 in ghc-bin-9.13.20241115-inplace:GHCi.UI.Monad - View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7bc6877fd5d41c6d5900678ad5e73ed30f366569...77f340a24561cea8a6f2ada296b3ea356ab1823c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7bc6877fd5d41c6d5900678ad5e73ed30f366569...77f340a24561cea8a6f2ada296b3ea356ab1823c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 13:49:05 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 27 Nov 2024 08:49:05 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-rc1] 2 commits: Bump file-io submodule to 0.1.5 Message-ID: <67472351625b_18f17f2ec82c884f@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-rc1 at Glasgow Haskell Compiler / GHC Commits: 9478b5ae by Zubin Duggal at 2024-11-27T19:02:38+05:30 Bump file-io submodule to 0.1.5 - - - - - f593c178 by Zubin Duggal at 2024-11-27T19:18:43+05:30 Bump ghc-prim and template-haskell versions - - - - - 7 changed files: - libraries/exceptions - libraries/file-io - libraries/ghc-bignum/ghc-bignum.cabal - libraries/ghc-compact/ghc-compact.cabal - libraries/ghc-prim/ghc-prim.cabal - libraries/template-haskell/template-haskell.cabal.in - libraries/text Changes: ===================================== libraries/exceptions ===================================== @@ -1 +1 @@ -Subproject commit 0b6abb3ac433c7d1d5c6f6a5a45b37f7c486e33b +Subproject commit 8e55b720f45db91f4895f710863ef9dbc10fe569 ===================================== libraries/file-io ===================================== @@ -1 +1 @@ -Subproject commit 9cf6e1514186e48bed0ea45480348b7babc15b47 +Subproject commit 21303160b5dd91d6197bd1d20a8796ba2a819d4e ===================================== libraries/ghc-bignum/ghc-bignum.cabal ===================================== @@ -77,7 +77,7 @@ library ForeignFunctionInterface build-depends: - ghc-prim >= 0.5.1.0 && < 0.12 + ghc-prim >= 0.5.1.0 && < 0.14 hs-source-dirs: src/ include-dirs: include/ ===================================== libraries/ghc-compact/ghc-compact.cabal ===================================== @@ -39,7 +39,7 @@ library UnboxedTuples CPP - build-depends: ghc-prim >= 0.5.3 && < 0.12, + build-depends: ghc-prim >= 0.5.3 && < 0.14, base >= 4.9.0 && < 4.22, bytestring >= 0.10.6.0 && <0.13 ghc-options: -Wall ===================================== libraries/ghc-prim/ghc-prim.cabal ===================================== @@ -1,6 +1,6 @@ cabal-version: 2.2 name: ghc-prim -version: 0.11.0 +version: 0.13.0 -- NOTE: Don't forget to update ./changelog.md license: BSD-3-Clause license-file: LICENSE ===================================== libraries/template-haskell/template-haskell.cabal.in ===================================== @@ -3,7 +3,7 @@ -- template-haskell.cabal. name: template-haskell -version: 2.22.1.0 +version: 2.23.0.0 -- NOTE: Don't forget to update ./changelog.md license: BSD3 license-file: LICENSE ===================================== libraries/text ===================================== @@ -1 +1 @@ -Subproject commit ee0a8f8b9a4bd3fdad23e9ac0db56e7f08ce35cd +Subproject commit b86564cae8d7262c7c4e7afe7a9163c83de3f175 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/77f340a24561cea8a6f2ada296b3ea356ab1823c...f593c1780bd32afbaf703664a26ba03be65c8d57 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/77f340a24561cea8a6f2ada296b3ea356ab1823c...f593c1780bd32afbaf703664a26ba03be65c8d57 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 14:09:27 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Wed, 27 Nov 2024 09:09:27 -0500 Subject: [Git][ghc/ghc][wip/romes/refator-modulegraph] Refactor ModuleGraph interface Message-ID: <67472817d23bd_18f17f5a4894132e0@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/refator-modulegraph at Glasgow Haskell Compiler / GHC Commits: 0bd2b8c3 by Rodrigo Mesquita at 2024-11-27T14:09:00+00:00 Refactor ModuleGraph interface The 'ModuleGraph' abstraction represents the relationship and strucutre of the modules being compiled. This structure is meant to be constructed once at the start of compilation, and never changed again. However, it's exposed interface was confusing and exposed too many footguns which led to inneficient usages of the ModuleGraph. This commit improves significantly the exported interface of ModuleGraph, taking into consideration the recent improvements around reachability queries. Since the ModuleGraph graphs and related structures (HPT, EPS) are performance critical in the sense that somewhat simple mistakes can cause bad leaks and non-linear memory usage, we want to have proper APIs that guide efficient usage. This is a good step in that direction. - - - - - 8 changed files: - compiler/GHC.hs - compiler/GHC/Driver/Env.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModSummary.hs - testsuite/tests/ghc-api/downsweep/OldModLocation.hs - testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs Changes: ===================================== compiler/GHC.hs ===================================== @@ -74,7 +74,7 @@ module GHC ( compileToCoreModule, compileToCoreSimplified, -- * Inspecting the module structure of the program - ModuleGraph, emptyMG, mapMG, mkModuleGraph, mgModSummaries, + ModuleGraph, emptyMG, mgMap, mkModuleGraph, mgModSummaries, mgLookupModule, ModSummary(..), ms_mod_name, ModLocation(..), pattern ModLocation, @@ -874,7 +874,7 @@ setProgramDynFlags_ invalidate_needed dflags = do -- invalidateModSummaryCache :: GhcMonad m => m () invalidateModSummaryCache = - modifySession $ \h -> h { hsc_mod_graph = mapMG inval (hsc_mod_graph h) } + modifySession $ \h -> h { hsc_mod_graph = mgMap inval (hsc_mod_graph h) } where inval ms = ms { ms_hs_hash = fingerprint0 } ===================================== compiler/GHC/Driver/Env.hs ===================================== @@ -41,6 +41,8 @@ where import GHC.Prelude +import GHC.Builtin.Names ( gHC_PRIM ) + import GHC.Driver.DynFlags import GHC.Driver.Errors ( printOrThrowDiagnostics ) import GHC.Driver.Errors.Types ( GhcMessage ) @@ -70,8 +72,6 @@ import GHC.Types.Name import GHC.Types.Name.Env import GHC.Types.TyThing -import GHC.Builtin.Names ( gHC_PRIM ) - import GHC.Data.Maybe import GHC.Utils.Exception as Ex @@ -274,9 +274,11 @@ hptSomeThingsBelowUs extract include_hi_boot hsc_env uid mn mg = hsc_mod_graph hsc_env in [ thing - | - -- Find each non-hi-boot module below me - (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) <- Set.toList (moduleGraphModulesBelow mg uid mn) + -- "Finding each non-hi-boot module below me" maybe could be cached in the module + -- graph to avoid filtering the boots out of the transitive closure out + -- every time this is called + | (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) + <- Set.toList (moduleGraphModulesBelow mg uid mn) , include_hi_boot || (is_boot == NotBoot) -- unsavoury: when compiling the base package with --make, we ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -1453,7 +1453,7 @@ oneShotMsg logger recomp = batchMsg :: Messager batchMsg = batchMsgWith (\_ _ _ _ -> empty) batchMultiMsg :: Messager -batchMultiMsg = batchMsgWith (\_ _ _ node -> brackets (ppr (moduleGraphNodeUnitId node))) +batchMultiMsg = batchMsgWith (\_ _ _ node -> brackets (ppr (mgNodeUnitId node))) batchMsgWith :: (HscEnv -> (Int, Int) -> RecompileRequired -> ModuleGraphNode -> SDoc) -> Messager batchMsgWith extra hsc_env_start mod_index recomp node = @@ -1469,7 +1469,7 @@ batchMsgWith extra hsc_env_start mod_index recomp node = LinkNode {} -> "Linking" InstantiationNode {} -> "Instantiating" ModuleNode {} -> "Compiling" - hsc_env = hscSetActiveUnitId (moduleGraphNodeUnitId node) hsc_env_start + hsc_env = hscSetActiveUnitId (mgNodeUnitId node) hsc_env_start dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env state = hsc_units hsc_env ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -250,11 +250,9 @@ depanalPartial diag_wrapper msg excluded_mods allow_dup_roots = do -- cached finder data. liftIO $ flushFinderCaches (hsc_FC hsc_env) (hsc_unit_env hsc_env) - (errs, graph_nodes) <- liftIO $ downsweep + (errs, mod_graph) <- liftIO $ downsweep hsc_env diag_wrapper msg (mgModSummaries old_graph) excluded_mods allow_dup_roots - let - mod_graph = mkModuleGraph graph_nodes return (unionManyMessages errs, mod_graph) -- | Collect the instantiations of dependencies to create 'InstantiationNode' work graph nodes. @@ -289,7 +287,7 @@ linkNodes summaries uid hue = ofile = outputFile_ dflags unit_nodes :: [NodeKey] - unit_nodes = map mkNodeKey (filter ((== uid) . moduleGraphNodeUnitId) summaries) + unit_nodes = map mkNodeKey (filter ((== uid) . mgNodeUnitId) summaries) -- Issue a warning for the confusing case where the user -- said '-o foo' but we're not going to do any linking. -- We attempt linking if either (a) one of the modules is @@ -632,13 +630,18 @@ createBuildPlan mod_graph maybe_top_mod = -- An environment mapping a module to its hs-boot file and all nodes on the path between the two, if one exists boot_modules = mkModuleEnv - [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) | m@(ModuleNode _ ms) <- (mgModSummaries' mod_graph), isBootSummary ms == IsBoot] + [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) + | m@(ModuleNode _ ms) <- mgModSummaries' mod_graph + , isBootSummary ms == IsBoot] select_boot_modules :: [ModuleGraphNode] -> [ModuleGraphNode] select_boot_modules = mapMaybe (fmap fst . get_boot_module) get_boot_module :: ModuleGraphNode -> Maybe (ModuleGraphNode, [ModuleGraphNode]) - get_boot_module m = case m of ModuleNode _ ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing + get_boot_module (ModuleNode _ ms) + | HsSrcFile <- ms_hsc_src ms + = lookupModuleEnv boot_modules (ms_mod ms) + get_boot_module _ = Nothing -- Any cycles should be resolved now collapseSCC :: [SCC ModuleGraphNode] -> Either [ModuleGraphNode] [(Either ModuleGraphNode ModuleGraphNodeWithBootFile)] @@ -668,8 +671,8 @@ createBuildPlan mod_graph maybe_top_mod = in - assertPpr (sum (map countMods build_plan) == length (mgModSummaries' mod_graph)) - (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (length (mgModSummaries' mod_graph )))]) + assertPpr (sum (map countMods build_plan) == lengthMG mod_graph) + (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (lengthMG mod_graph))]) build_plan mkWorkerLimit :: DynFlags -> IO WorkerLimit @@ -1142,7 +1145,7 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do !build_map <- getBuildMap hug_var <- gets hug_var -- 1. Get the direct dependencies of this module - let direct_deps = nodeDependencies False mod + let direct_deps = mgNodeDependencies False mod -- It's really important to force build_deps, or the whole buildMap is retained, -- which would retain all the result variables, preventing us from collecting them -- after they are no longer used. @@ -1150,14 +1153,14 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do let !build_action = case mod of InstantiationNode uid iu -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeInstantiationNode mod_idx n_mods hug uid iu return (Nothing, deps) ModuleNode _build_deps ms -> let !old_hmi = M.lookup (msKey ms) old_hpt rehydrate_mods = mapMaybe nodeKeyModName <$> rehydrate_nodes - in withCurrentUnit (moduleGraphNodeUnitId mod) $ do + in withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps hmi <- executeCompileNode mod_idx n_mods old_hmi hug rehydrate_mods ms -- Write the HMI to an external cache (if one exists) @@ -1166,9 +1169,9 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do -- This global MVar is incrementally modified in order to avoid having to -- recreate the HPT before compiling each module which leads to a quadratic amount of work. liftIO $ modifyMVar_ hug_var (return . addHomeModInfoToHug hmi) - return (Just hmi, addToModuleNameSet (moduleGraphNodeUnitId mod) (ms_mod_name ms) deps ) + return (Just hmi, addToModuleNameSet (mgNodeUnitId mod) (ms_mod_name ms) deps ) LinkNode _nks uid -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeLinkNode hug (mod_idx, n_mods) uid direct_deps return (Nothing, deps) @@ -1570,7 +1573,7 @@ downsweep :: HscEnv -> Bool -- True <=> allow multiple targets to have -- the same module name; this is -- very useful for ghc -M - -> IO ([DriverMessages], [ModuleGraphNode]) + -> IO ([DriverMessages], ModuleGraph) -- The non-error elements of the returned list all have distinct -- (Modules, IsBoot) identifiers, unless the Bool is true in -- which case there can be repeats @@ -1595,7 +1598,7 @@ downsweep_imports :: HscEnv -> [ModuleName] -> Bool -> ([(UnitId, DriverMessages)], [ModSummary]) - -> IO ([DriverMessages], [ModuleGraphNode]) + -> IO ([DriverMessages], ModuleGraph) downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, rootSummariesOk) = do let root_map = mkRootMap rootSummariesOk @@ -1620,7 +1623,7 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro th_enabled_nodes <- enableCodeGenForTH logger tmpfs unit_env all_nodes if null all_root_errs then return (all_errs, th_enabled_nodes) - else pure $ (all_root_errs, []) + else pure $ (all_root_errs, emptyMG) where -- Dependencies arising on a unit (backpack and module linking deps) unitModuleNodes :: [ModuleGraphNode] -> UnitId -> HomeUnitEnv -> [Either (Messages DriverMessage) ModuleGraphNode] @@ -1870,7 +1873,7 @@ enableCodeGenForTH -> TmpFs -> UnitEnv -> [ModuleGraphNode] - -> IO [ModuleGraphNode] + -> IO ModuleGraph enableCodeGenForTH logger tmpfs unit_env = enableCodeGenWhen logger tmpfs TFL_CurrentModule TFL_GhcSession unit_env @@ -1893,19 +1896,19 @@ enableCodeGenWhen -> TempFileLifetime -> UnitEnv -> [ModuleGraphNode] - -> IO [ModuleGraphNode] -enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = - mapM enable_code_gen mod_graph + -> IO ModuleGraph +enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = do + mgMapM enable_code_gen mg where defaultBackendOf ms = platformDefaultBackend (targetPlatform $ ue_unitFlags (ms_unitid ms) unit_env) - enable_code_gen :: ModuleGraphNode -> IO ModuleGraphNode - enable_code_gen n@(ModuleNode deps ms) + enable_code_gen :: ModSummary -> IO ModSummary + enable_code_gen ms | ModSummary { ms_location = ms_location , ms_hsc_src = HsSrcFile , ms_hspp_opts = dflags } <- ms - , Just enable_spec <- mkNodeKey n `Map.lookup` needs_codegen_map = + , Just enable_spec <- needs_codegen_map (NodeKey_Module (msKey ms)) = if | nocode_enable ms -> do let new_temp_file suf dynsuf = do tn <- newTempName logger tmpfs (tmpDir dflags) staticLife suf @@ -1937,7 +1940,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = , ms_hspp_opts = updOptLevel 0 $ new_dflags } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' -- If -fprefer-byte-code then satisfy dependency by enabling bytecode (if normal object not enough) -- we only get to this case if the default backend is already generating object files, but we need dynamic @@ -1947,21 +1950,21 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ByteCodeAndObjectCode } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' | dynamic_too_enable enable_spec ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_BuildDynamicToo } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' | ext_interp_enable ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ExternalInterpreter } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' - | otherwise -> return n + | otherwise -> return ms enable_code_gen ms = return ms @@ -2018,23 +2021,23 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = lcl_dflags = ms_hspp_opts ms internalInterpreter = not (gopt Opt_ExternalInterpreter lcl_dflags) - (mg, lookup_node) = moduleGraphNodes False mod_graph - - mk_needed_set roots = Set.fromList $ map (mkNodeKey . node_payload) $ reachablesG mg (map (expectJust "needs_th" . lookup_node) roots) + mg = mkModuleGraph mod_graph - needs_obj_set, needs_bc_set :: Set.Set NodeKey - needs_obj_set = mk_needed_set need_obj_set + needs_obj_set, needs_bc_set :: NodeKey -> Bool + needs_obj_set k = mgQueryMany mg need_obj_set k || k `elem` need_obj_set - needs_bc_set = mk_needed_set need_bc_set + needs_bc_set k = mgQueryMany mg need_bc_set k || k `elem` need_bc_set -- A map which tells us how to enable code generation for a NodeKey - needs_codegen_map :: Map.Map NodeKey CodeGenEnable - needs_codegen_map = + needs_codegen_map :: NodeKey -> Maybe CodeGenEnable + needs_codegen_map nk = -- Another option here would be to just produce object code, rather than both object and -- byte code - Map.unionWith (\_ _ -> EnableByteCodeAndObject) - (Map.fromList $ [(m, EnableObject) | m <- Set.toList needs_obj_set]) - (Map.fromList $ [(m, EnableByteCode) | m <- Set.toList needs_bc_set]) + case (needs_obj_set nk, needs_bc_set nk) of + (True, True) -> Just EnableByteCodeAndObject + (True, False) -> Just EnableObject + (False, True) -> Just EnableByteCode + (False, False) -> Nothing -- The direct dependencies of modules which require object code need_obj_set = @@ -2470,14 +2473,14 @@ cyclicModuleErr mss Just path -> mkPlainErrorMsgEnvelope src_span $ GhcDriverMessage $ DriverModuleGraphCycle path where - src_span = maybe noSrcSpan (mkFileSrcSpan . ms_location) (moduleGraphNodeModSum (head path)) + src_span = maybe noSrcSpan (mkFileSrcSpan . ms_location) (mgNodeModSum (head path)) where graph :: [Node NodeKey ModuleGraphNode] graph = [ DigraphNode { node_payload = ms , node_key = mkNodeKey ms - , node_dependencies = nodeDependencies False ms + , node_dependencies = mgNodeDependencies False ms } | ms <- mss ] ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -2,52 +2,106 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveTraversable #-} +-- | A module graph should be constructed once and never change from there onwards. +-- +-- The only operations should be for building the 'ModuleGraph' +-- (once and for all -- no update-like/insert-like functions) +-- and querying the structure in various ways, e.g. to determine reachability. +-- +-- We should avoid exposing fields like 'mg_mss' since it may be a footgun +-- trying to use the nodes directly... We do still expose it, but it feels like +-- all its use cases would be better served by a more proper ModuleGraph +-- abstraction module GHC.Unit.Module.Graph - ( ModuleGraph - , ModuleGraphNode(..) - , nodeDependencies + ( + -- * Construct a module graph + -- + -- | A module graph should be constructed once by downsweep and never modified. + ModuleGraph , emptyMG , mkModuleGraph - , extendMG - , extendMGInst - , extendMG' - , unionMG - , isTemplateHaskellOrQQNonBoot - , filterToposortToModules - , mapMG + + -- * Nodes in a module graph + -- + -- | The user-facing nodes in a module graph are 'ModuleGraphNode's. + -- There are a few things which we can query out of each 'ModuleGraphNode': + -- + -- - 'mgNodeDependencies' gets the immediate dependencies of this node + -- - 'mgNodeUnitId' returns the 'UnitId' of that node + -- - 'mgNodeModSum' extracts the 'ModSummary' of a node if exists + , ModuleGraphNode(..) + , mgNodeDependencies + , mgNodeModSum + , mgNodeUnitId + + -- * Module graph operations + , lengthMG + + -- ** 'ModSummary' operations + -- + -- | A couple of operations on the module graph allow access to the + -- 'ModSummary's of the modules in it contained. + -- + -- In particular, 'mapMG' and 'mapMGM' allow updating these 'ModSummary's + -- (without changing the 'ModuleGraph' structure itself!). + -- 'mgModSummaries' lists out all 'ModSummary's, and + -- 'mgLookupModule' looks up a 'ModSummary' for a given module. + , mgMap, mgMapM , mgModSummaries - , mgModSummaries' , mgLookupModule - , showModMsg - , moduleGraphNodeModule - , moduleGraphNodeModSum - , moduleGraphModulesBelow + + -- ** Reachability queries + -- + -- | A module graph explains the structure and relationship between the + -- modules being compiled. Often times, this structure is relevant to + -- answer reachability queries -- is X reachable from Y; or, what is the + -- transitive closure of Z? , mgReachable , mgQuery - + , mgQueryMany + + -- ** Other operations + -- + -- | These operations allow more-internal-than-ideal access to the + -- ModuleGraph structure. Ideally, we could restructure the code using + -- these functions to avoid deconstructing/reconstructing the ModuleGraph + -- and instead extend the "proper interface" of the ModuleGraph to achieve + -- what is currently done but through a better abstraction. + , mgModSummaries' , moduleGraphNodes - , SummaryNode - , summaryNodeSummary + , moduleGraphModulesBelow -- needed for 'hptSomeThingsBelowUs', + -- but I think we could be more clever and cache + -- the graph-ixs of boot modules to efficiently + -- filter them out of the returned list. + -- hptInstancesBelow is re-doing that work every + -- time it's called. + , filterToposortToModules + -- * Keys into the 'ModuleGraph' , NodeKey(..) + , mkNodeKey , nodeKeyUnitId , nodeKeyModName , ModNodeKey - , mkNodeKey + , ModNodeKeyWithUid(..) , msKey + -- ** Internal node representation + -- + -- | 'SummaryNode' is the internal representation for each node stored in + -- the graph. It's not immediately clear to me why users do depend on them. + , SummaryNode + , summaryNodeSummary + , summaryNodeKey - , moduleGraphNodeUnitId - - , ModNodeKeyWithUid(..) + -- * Utilities + , showModMsg ) where import GHC.Prelude import GHC.Platform -import qualified GHC.LanguageExtensions as LangExt - import GHC.Data.Maybe import GHC.Data.Graph.Directed import GHC.Data.Graph.Directed.Reachability @@ -73,7 +127,44 @@ import GHC.Linker.Static.Utils import Data.Bifunctor import Data.Function import Data.List (sort) -import GHC.Data.List.SetOps +import Control.Monad + +-- | A '@ModuleGraph@' contains all the nodes from the home package (only). See +-- '@ModuleGraphNode@' for information about the nodes. +-- +-- Modules need to be compiled. hs-boots need to be typechecked before +-- the associated "real" module so modules with {-# SOURCE #-} imports can be +-- built. Instantiations also need to be typechecked to ensure that the module +-- fits the signature. Substantiation typechecking is roughly comparable to the +-- check that the module and its hs-boot agree. +-- +-- The graph is not necessarily stored in topologically-sorted order. Use +-- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. +data ModuleGraph = ModuleGraph + { mg_mss :: [ModuleGraphNode] + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) + -- A cached transitive dependency calculation so that a lot of work is not + -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) + } + +-- | Why do we ever need to construct empty graphs? Is it because of one shot mode? +emptyMG :: ModuleGraph +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) + +-- | Construct a module graph. This function should be the only entry point for +-- building a 'ModuleGraph', since it is supposed to be built once and never modified. +-- +-- If you ever find the need to build a 'ModuleGraph' iteratively, don't +-- add insert and update functions to the API since they become footguns. +-- Instead, design an API that allows iterative construction without posterior +-- modification, perhaps like what is done for building arrays from mutable +-- arrays. +mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph +mkModuleGraph = foldr (flip extendMG') emptyMG + +-------------------------------------------------------------------------------- +-- * Module Graph Nodes +-------------------------------------------------------------------------------- -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -87,16 +178,36 @@ data ModuleGraphNode -- | Link nodes are whether are are creating a linked product (ie executable/shared object etc) for a unit. | LinkNode [NodeKey] UnitId -moduleGraphNodeModule :: ModuleGraphNode -> Maybe ModuleName -moduleGraphNodeModule mgn = ms_mod_name <$> (moduleGraphNodeModSum mgn) +-- | Collect the immediate dependencies of a ModuleGraphNode, +-- optionally avoiding hs-boot dependencies. +-- If the drop_hs_boot_nodes flag is False, and if this is a .hs and there is +-- an equivalent .hs-boot, add a link from the former to the latter. This +-- has the effect of detecting bogus cases where the .hs-boot depends on the +-- .hs, by introducing a cycle. Additionally, it ensures that we will always +-- process the .hs-boot before the .hs, and so the HomePackageTable will always +-- have the most up to date information. +mgNodeDependencies :: Bool -> ModuleGraphNode -> [NodeKey] +mgNodeDependencies drop_hs_boot_nodes = \case + LinkNode deps _uid -> deps + InstantiationNode uid iuid -> + NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) + ModuleNode deps _ms -> + map drop_hs_boot deps + where + -- Drop hs-boot nodes by using HsSrcFile as the key + hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature + | otherwise = IsBoot + + drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) uid)) + drop_hs_boot x = x -moduleGraphNodeModSum :: ModuleGraphNode -> Maybe ModSummary -moduleGraphNodeModSum (InstantiationNode {}) = Nothing -moduleGraphNodeModSum (LinkNode {}) = Nothing -moduleGraphNodeModSum (ModuleNode _ ms) = Just ms +mgNodeModSum :: ModuleGraphNode -> Maybe ModSummary +mgNodeModSum (InstantiationNode {}) = Nothing +mgNodeModSum (LinkNode {}) = Nothing +mgNodeModSum (ModuleNode _ ms) = Just ms -moduleGraphNodeUnitId :: ModuleGraphNode -> UnitId -moduleGraphNodeUnitId mgn = +mgNodeUnitId :: ModuleGraphNode -> UnitId +mgNodeUnitId mgn = case mgn of InstantiationNode uid _iud -> uid ModuleNode _ ms -> toUnitId (moduleUnit (ms_mod ms)) @@ -114,79 +225,43 @@ instance Eq ModuleGraphNode where instance Ord ModuleGraphNode where compare = compare `on` mkNodeKey -data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit - | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid - | NodeKey_Link !UnitId - deriving (Eq, Ord) - -instance Outputable NodeKey where - ppr nk = pprNodeKey nk +-------------------------------------------------------------------------------- +-- * Module Graph operations +-------------------------------------------------------------------------------- -pprNodeKey :: NodeKey -> SDoc -pprNodeKey (NodeKey_Unit iu) = ppr iu -pprNodeKey (NodeKey_Module mk) = ppr mk -pprNodeKey (NodeKey_Link uid) = ppr uid +-- | Returns the number of nodes in a 'ModuleGraph' +lengthMG :: ModuleGraph -> Int +lengthMG = length . mg_mss -nodeKeyUnitId :: NodeKey -> UnitId -nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu -nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk -nodeKeyUnitId (NodeKey_Link uid) = uid - -nodeKeyModName :: NodeKey -> Maybe ModuleName -nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) -nodeKeyModName _ = Nothing - -data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot - , mnkUnitId :: !UnitId } deriving (Eq, Ord) - -instance Outputable ModNodeKeyWithUid where - ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib - --- | A '@ModuleGraph@' contains all the nodes from the home package (only). See --- '@ModuleGraphNode@' for information about the nodes. --- --- Modules need to be compiled. hs-boots need to be typechecked before --- the associated "real" module so modules with {-# SOURCE #-} imports can be --- built. Instantiations also need to be typechecked to ensure that the module --- fits the signature. Substantiation typechecking is roughly comparable to the --- check that the module and its hs-boot agree. --- --- The graph is not necessarily stored in topologically-sorted order. Use --- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. -data ModuleGraph = ModuleGraph - { mg_mss :: [ModuleGraphNode] - , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) - -- A cached transitive dependency calculation so that a lot of work is not - -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) - } +-------------------------------------------------------------------------------- +-- ** ModSummaries +-------------------------------------------------------------------------------- -- | Map a function 'f' over all the 'ModSummaries'. --- To preserve invariants 'f' can't change the isBoot status. -mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph -mapMG f mg at ModuleGraph{..} = mg +-- To preserve invariants, 'f' can't change the isBoot status. +mgMap :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph +mgMap f mg at ModuleGraph{..} = mg { mg_mss = flip fmap mg_mss $ \case InstantiationNode uid iuid -> InstantiationNode uid iuid LinkNode uid nks -> LinkNode uid nks ModuleNode deps ms -> ModuleNode deps (f ms) } -unionMG :: ModuleGraph -> ModuleGraph -> ModuleGraph -unionMG a b = - let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b - in ModuleGraph { - mg_mss = new_mss - , mg_graph = mkTransDeps new_mss - } - -mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False +-- | Map a function 'f' over all the 'ModSummaries', in 'IO'. +-- To preserve invariants, 'f' can't change the isBoot status. +mgMapM :: (ModSummary -> IO ModSummary) -> ModuleGraph -> IO ModuleGraph +mgMapM f mg at ModuleGraph{..} = do + mss' <- forM mg_mss $ \case + InstantiationNode uid iuid -> pure $ InstantiationNode uid iuid + LinkNode uid nks -> pure $ LinkNode uid nks + ModuleNode deps ms -> ModuleNode deps <$> (f ms) + return mg + { mg_mss = mss' + } mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] -mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] -mgModSummaries' = mg_mss - -- | Look up a ModSummary in the ModuleGraph -- Looks up the non-boot ModSummary -- Linear in the size of the module graph @@ -199,128 +274,53 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss = Just ms go _ = Nothing -emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) - -isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool -isTemplateHaskellOrQQNonBoot ms = - (xopt LangExt.TemplateHaskell (ms_hspp_opts ms) - || xopt LangExt.QuasiQuotes (ms_hspp_opts ms)) && - (isBootSummary ms == NotBoot) - --- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is --- not an element of the ModuleGraph. -extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph -extendMG ModuleGraph{..} deps ms = ModuleGraph - { mg_mss = ModuleNode deps ms : mg_mss - , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) - } - -extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph -extendMGInst mg uid depUnitId = mg - { mg_mss = InstantiationNode uid depUnitId : mg_mss mg - } - -extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph -extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } +-------------------------------------------------------------------------------- +-- ** Reachability +-------------------------------------------------------------------------------- -extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph -extendMG' mg = \case - InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId - ModuleNode deps ms -> extendMG mg deps ms - LinkNode deps uid -> extendMGLink mg uid deps - -mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph -mkModuleGraph = foldr (flip extendMG') emptyMG - --- | This function filters out all the instantiation nodes from each SCC of a --- topological sort. Use this with care, as the resulting "strongly connected components" --- may not really be strongly connected in a direct way, as instantiations have been --- removed. It would probably be best to eliminate uses of this function where possible. -filterToposortToModules - :: [SCC ModuleGraphNode] -> [SCC ModSummary] -filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case - InstantiationNode _ _ -> Nothing - LinkNode{} -> Nothing - ModuleNode _deps node -> Just node - where - -- This higher order function is somewhat bogus, - -- as the definition of "strongly connected component" - -- is not necessarily respected. - mapMaybeSCC :: (a -> Maybe b) -> SCC a -> Maybe (SCC b) - mapMaybeSCC f = \case - AcyclicSCC a -> AcyclicSCC <$> f a - CyclicSCC as -> case mapMaybe f as of - [] -> Nothing - [a] -> Just $ AcyclicSCC a - as -> Just $ CyclicSCC as - -showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc -showModMsg dflags _ (LinkNode {}) = - let staticLink = case ghcLink dflags of - LinkStaticLib -> True - _ -> False - - platform = targetPlatform dflags - arch_os = platformArchOS platform - exe_file = exeFileName arch_os staticLink (outputFile_ dflags) - in text exe_file -showModMsg _ _ (InstantiationNode _uid indef_unit) = - ppr $ instUnitInstanceOf indef_unit -showModMsg dflags recomp (ModuleNode _ mod_summary) = - if gopt Opt_HideSourcePaths dflags - then text mod_str - else hsep $ - [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') - , char '(' - , text (op $ msHsFilePath mod_summary) <> char ',' - , message, char ')' ] - - where - op = normalise - mod_str = moduleNameString (moduleName (ms_mod mod_summary)) ++ - hscSourceString (ms_hsc_src mod_summary) - dyn_file = op $ msDynObjFilePath mod_summary - obj_file = op $ msObjFilePath mod_summary - files = [ obj_file ] - ++ [ dyn_file | gopt Opt_BuildDynamicToo dflags ] - ++ [ "interpreted" | gopt Opt_ByteCodeAndObjectCode dflags ] - message = case backendSpecialModuleSource (backend dflags) recomp of - Just special -> text special - Nothing -> foldr1 (\ofile rest -> ofile <> comma <+> rest) (map text files) - - - -type SummaryNode = Node Int ModuleGraphNode +-- | Return all nodes reachable from the given 'NodeKey'. +mgReachable :: ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk -summaryNodeKey :: SummaryNode -> Int -summaryNodeKey = node_key +-- | Reachability Query. +-- +-- @mgQuery(g, a, b)@ asks: +-- Can we reach @b@ from @a@ in graph @g@? +-- +-- Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb -summaryNodeSummary :: SummaryNode -> ModuleGraphNode -summaryNodeSummary = node_payload +-- | Many roots reachability Query. +-- +-- @mgQuery(g, roots, b)@ asks: +-- Can we reach @b@ from any of the @roots@ in graph @g@? +-- +-- Node @b@ must be in @g at . +mgQueryMany :: ModuleGraph -- ^ @g@ + -> [NodeKey] -- ^ @roots@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @roots@ +mgQueryMany mg roots nkb = isReachableMany td_map nroots nb where + (td_map, lookup_node) = mg_graph mg + nroots = mapMaybe lookup_node roots + nb = expectJust "mgQuery:b" $ lookup_node nkb --- | Collect the immediate dependencies of a ModuleGraphNode, --- optionally avoiding hs-boot dependencies. --- If the drop_hs_boot_nodes flag is False, and if this is a .hs and there is --- an equivalent .hs-boot, add a link from the former to the latter. This --- has the effect of detecting bogus cases where the .hs-boot depends on the --- .hs, by introducing a cycle. Additionally, it ensures that we will always --- process the .hs-boot before the .hs, and so the HomePackageTable will always --- have the most up to date information. -nodeDependencies :: Bool -> ModuleGraphNode -> [NodeKey] -nodeDependencies drop_hs_boot_nodes = \case - LinkNode deps _uid -> deps - InstantiationNode uid iuid -> - NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) - ModuleNode deps _ms -> - map drop_hs_boot deps - where - -- Drop hs-boot nodes by using HsSrcFile as the key - hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature - | otherwise = IsBoot +-------------------------------------------------------------------------------- +-- ** Other operations (read haddocks on export list) +-------------------------------------------------------------------------------- - drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) uid)) - drop_hs_boot x = x +mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] +mgModSummaries' = mg_mss -- | Turn a list of graph nodes into an efficient queriable graph. -- The first boolean parameter indicates whether nodes corresponding to hs-boot files @@ -340,16 +340,16 @@ moduleGraphNodes drop_hs_boot_nodes summaries = ModuleNode __deps ms | isBootSummary ms == IsBoot, drop_hs_boot_nodes -- Using nodeDependencies here converts dependencies on other -- boot files to dependencies on dependencies on non-boot files. - -> Left (ms_mod ms, nodeDependencies drop_hs_boot_nodes s) + -> Left (ms_mod ms, mgNodeDependencies drop_hs_boot_nodes s) _ -> normal_case where normal_case = - let lkup_key = ms_mod <$> moduleGraphNodeModSum s + let lkup_key = ms_mod <$> mgNodeModSum s extra = (lkup_key >>= \key -> Map.lookup key boot_summaries) in Right $ DigraphNode s key $ out_edge_keys $ (fromMaybe [] extra - ++ nodeDependencies drop_hs_boot_nodes s) + ++ mgNodeDependencies drop_hs_boot_nodes s) numbered_summaries = zip summaries [1..] @@ -370,20 +370,6 @@ moduleGraphNodes drop_hs_boot_nodes summaries = out_edge_keys = mapMaybe lookup_key -- If we want keep_hi_boot_nodes, then we do lookup_key with -- IsBoot; else False -newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } - deriving (Functor, Traversable, Foldable) - -mkNodeKey :: ModuleGraphNode -> NodeKey -mkNodeKey = \case - InstantiationNode _ iu -> NodeKey_Unit iu - ModuleNode _ x -> NodeKey_Module $ msKey x - LinkNode _ uid -> NodeKey_Link uid - -msKey :: ModSummary -> ModNodeKeyWithUid -msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) - -type ModNodeKey = ModuleNameWithIsBoot - -- | This function returns all the modules belonging to the home-unit that can -- be reached by following the given dependencies. Additionally, if both the @@ -409,21 +395,150 @@ moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- mo | otherwise -> r1 : filter_mods (r2:rs) rs -> rs -mgReachable :: ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] -mgReachable mg nk = map summaryNodeSummary <$> modules_below where - (td_map, lookup_node) = mg_graph mg - modules_below = - allReachable td_map <$> lookup_node nk +-- | This function filters out all the instantiation nodes from each SCC of a +-- topological sort. Use this with care, as the resulting "strongly connected components" +-- may not really be strongly connected in a direct way, as instantiations have been +-- removed. It would probably be best to eliminate uses of this function where possible. +filterToposortToModules + :: [SCC ModuleGraphNode] -> [SCC ModSummary] +filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case + InstantiationNode _ _ -> Nothing + LinkNode{} -> Nothing + ModuleNode _deps node -> Just node + where + -- This higher order function is somewhat bogus, + -- as the definition of "strongly connected component" + -- is not necessarily respected. + mapMaybeSCC :: (a -> Maybe b) -> SCC a -> Maybe (SCC b) + mapMaybeSCC f = \case + AcyclicSCC a -> AcyclicSCC <$> f a + CyclicSCC as -> case mapMaybe f as of + [] -> Nothing + [a] -> Just $ AcyclicSCC a + as -> Just $ CyclicSCC as --- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in --- graph @g@? --- INVARIANT: Both @a@ and @b@ must be in @g at . -mgQuery :: ModuleGraph -- ^ @g@ - -> NodeKey -- ^ @a@ - -> NodeKey -- ^ @b@ - -> Bool -- ^ @b@ is reachable from @a@ -mgQuery mg nka nkb = isReachable td_map na nb where - (td_map, lookup_node) = mg_graph mg - na = expectJust "mgQuery:a" $ lookup_node nka - nb = expectJust "mgQuery:b" $ lookup_node nkb +-------------------------------------------------------------------------------- +-- * Keys into ModuleGraph +-------------------------------------------------------------------------------- + +data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit + | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid + | NodeKey_Link !UnitId + deriving (Eq, Ord) + +instance Outputable NodeKey where + ppr (NodeKey_Unit iu) = ppr iu + ppr (NodeKey_Module mk) = ppr mk + ppr (NodeKey_Link uid) = ppr uid + +mkNodeKey :: ModuleGraphNode -> NodeKey +mkNodeKey = \case + InstantiationNode _ iu -> NodeKey_Unit iu + ModuleNode _ x -> NodeKey_Module $ msKey x + LinkNode _ uid -> NodeKey_Link uid + +nodeKeyUnitId :: NodeKey -> UnitId +nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu +nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk +nodeKeyUnitId (NodeKey_Link uid) = uid + +nodeKeyModName :: NodeKey -> Maybe ModuleName +nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) +nodeKeyModName _ = Nothing + +type ModNodeKey = ModuleNameWithIsBoot +data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot + , mnkUnitId :: !UnitId } deriving (Eq, Ord) + +instance Outputable ModNodeKeyWithUid where + ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib + +msKey :: ModSummary -> ModNodeKeyWithUid +msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) + +-------------------------------------------------------------------------------- +-- ** Internal node representation (exposed) +-------------------------------------------------------------------------------- + +type SummaryNode = Node Int ModuleGraphNode + +summaryNodeKey :: SummaryNode -> Int +summaryNodeKey = node_key + +summaryNodeSummary :: SummaryNode -> ModuleGraphNode +summaryNodeSummary = node_payload + +-------------------------------------------------------------------------------- +-- * Misc utilities +-------------------------------------------------------------------------------- + +showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc +showModMsg dflags _ (LinkNode {}) = + let staticLink = case ghcLink dflags of + LinkStaticLib -> True + _ -> False + + platform = targetPlatform dflags + arch_os = platformArchOS platform + exe_file = exeFileName arch_os staticLink (outputFile_ dflags) + in text exe_file +showModMsg _ _ (InstantiationNode _uid indef_unit) = + ppr $ instUnitInstanceOf indef_unit +showModMsg dflags recomp (ModuleNode _ mod_summary) = + if gopt Opt_HideSourcePaths dflags + then text mod_str + else hsep $ + [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') + , char '(' + , text (op $ msHsFilePath mod_summary) <> char ',' + , message, char ')' ] + + where + op = normalise + mod_str = moduleNameString (moduleName (ms_mod mod_summary)) ++ + hscSourceString (ms_hsc_src mod_summary) + dyn_file = op $ msDynObjFilePath mod_summary + obj_file = op $ msObjFilePath mod_summary + files = [ obj_file ] + ++ [ dyn_file | gopt Opt_BuildDynamicToo dflags ] + ++ [ "interpreted" | gopt Opt_ByteCodeAndObjectCode dflags ] + message = case backendSpecialModuleSource (backend dflags) recomp of + Just special -> text special + Nothing -> foldr1 (\ofile rest -> ofile <> comma <+> rest) (map text files) + +-------------------------------------------------------------------------------- +-- * Internal methods for module graph +-- +-- These are *really* meant to be internal! +-- Don't expose them without careful consideration about the invariants +-- described in the export list haddocks. +-------------------------------------------------------------------------------- + +newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } + deriving (Functor, Traversable, Foldable) + +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False + +extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph +extendMG' mg = \case + InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId + ModuleNode deps ms -> extendMG mg deps ms + LinkNode deps uid -> extendMGLink mg uid deps + +-- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is +-- not an element of the ModuleGraph. +extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph +extendMG ModuleGraph{..} deps ms = ModuleGraph + { mg_mss = ModuleNode deps ms : mg_mss + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) + } + +extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph +extendMGInst mg uid depUnitId = mg + { mg_mss = InstantiationNode uid depUnitId : mg_mss mg + } + +extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph +extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } ===================================== compiler/GHC/Unit/Module/ModSummary.hs ===================================== @@ -24,12 +24,14 @@ module GHC.Unit.Module.ModSummary , msDynObjFileOsPath , msDeps , isBootSummary + , isTemplateHaskellOrQQNonBoot , findTarget ) where import GHC.Prelude +import qualified GHC.LanguageExtensions as LangExt import GHC.Hs import GHC.Driver.DynFlags @@ -163,6 +165,12 @@ msDynObjFileOsPath ms = ml_dyn_obj_file_ospath (ms_location ms) isBootSummary :: ModSummary -> IsBootInterface isBootSummary ms = if ms_hsc_src ms == HsBootFile then IsBoot else NotBoot +isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool +isTemplateHaskellOrQQNonBoot ms = + (xopt LangExt.TemplateHaskell (ms_hspp_opts ms) + || xopt LangExt.QuasiQuotes (ms_hspp_opts ms)) && + (isBootSummary ms == NotBoot) + ms_mnwib :: ModSummary -> ModuleNameWithIsBoot ms_mnwib ms = GWIB (ms_mod_name ms) (isBootSummary ms) @@ -206,4 +214,3 @@ findTarget ms ts = _ `matches` _ = False - ===================================== testsuite/tests/ghc-api/downsweep/OldModLocation.hs ===================================== @@ -61,7 +61,7 @@ main = do -- using the 'location' parameter we'd end up using the old location of -- the "B" module in this test. Make sure that doesn't happen. - hPrint stderr $ sort (map (ml_hs_file . ms_location) (mapMaybe moduleGraphNodeModSum nodes)) + hPrint stderr $ sort (map (ml_hs_file . ms_location) (mapMaybe mgNodeModSum nodes)) writeMod :: [String] -> IO () writeMod src@(head -> stripPrefix "module " -> Just (takeWhile (/=' ') -> mod)) ===================================== testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs ===================================== @@ -171,7 +171,7 @@ go label mods cnd = hsc_env <- getSession (_, nodes) <- liftIO $ downsweep hsc_env mkUnknownDiagnostic Nothing [] [] False - it label $ cnd (mapMaybe moduleGraphNodeModSum nodes) + it label $ cnd (mapMaybe mgNodeModSum nodes) writeMod :: [String] -> IO () View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0bd2b8c386622edf2def3eb1dd2d803cea66441b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0bd2b8c386622edf2def3eb1dd2d803cea66441b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 14:37:06 2024 From: gitlab at gitlab.haskell.org (adam (@adamse)) Date: Wed, 27 Nov 2024 09:37:06 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/ase/rts-help Message-ID: <67472e9240c24_18f17f917b702931@gitlab.mail> adam pushed new branch wip/ase/rts-help at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/ase/rts-help You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 14:37:42 2024 From: gitlab at gitlab.haskell.org (adam (@adamse)) Date: Wed, 27 Nov 2024 09:37:42 -0500 Subject: [Git][ghc/ghc][wip/ase/rts-help] mention -Iw in +RTS -? Message-ID: <67472eb6d59e6_18f17f91846c295c6@gitlab.mail> adam pushed to branch wip/ase/rts-help at Glasgow Haskell Compiler / GHC Commits: 794d0e86 by Adam Sandberg Ericsson at 2024-11-27T14:37:18+00:00 mention -Iw in +RTS -? - - - - - 1 changed file: - rts/RtsFlags.c Changes: ===================================== rts/RtsFlags.c ===================================== @@ -361,6 +361,7 @@ usage_text[] = { " -w Use mark-region for the oldest generation (experimental)", #if defined(THREADED_RTS) " -I Perform full GC after idle time (default: 0.3, 0 == off)", +" -Iw Minimum wait time between idle GC runs (default: 0, 0 == no min wait time)", #endif "", " -T Collect GC statistics (useful for in-program statistics access)", View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/794d0e863dc3ef51134a841cec0cfce48a238950 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/794d0e863dc3ef51134a841cec0cfce48a238950 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 15:01:09 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Wed, 27 Nov 2024 10:01:09 -0500 Subject: [Git][ghc/ghc][wip/T24359] Fix build Message-ID: <674734357744b_22b0731543ac67b8@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 6155e4a8 by Simon Peyton Jones at 2024-11-27T15:00:37+00:00 Fix build - - - - - 2 changed files: - compiler/GHC/HsToCore/Binds.hs - libraries/ghc-boot-th/GHC/Internal/TH/Ppr.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -985,12 +985,14 @@ finishSpecPrag poly_rhs rule_bndrs poly_id rule_args rule_act | no_act_spec = inl_prag_act -- Inherit | otherwise = spec_prag_act -- Specified by user +{- is_nop_arg (Type {}) = True is_nop_arg (Coercion {}) = True is_nop_arg (Cast e _) = is_nop_arg e is_nop_arg (Tick _ e) = is_nop_arg e is_nop_arg (Var x) = x `elem` spec_bndrs is_nop_arg _ = False +-} specFunInlinePrag :: Id -> InlinePragma -> InlinePragma -> InlinePragma ===================================== libraries/ghc-boot-th/GHC/Internal/TH/Ppr.hs ===================================== @@ -653,21 +653,20 @@ instance Ppr Pragma where <+> sep [ pprName' Applied n <+> dcolon , nest 2 $ ppr ty ] <+> text "#-}" + ppr (SpecialiseEP ty_bndrs tm_bndrs spec_e inline phases) + = sep [ text "{-# SPECIALISE" + <+> maybe empty ppr inline + <+> ppr phases + , nest 2 $ sep [ ppr_ty_forall ty_bndrs <+> ppr_tm_forall ty_bndrs tm_bndrs + , nest 2 (ppr spec_e) ] + <+> text "#-}" ] ppr (SpecialiseInstP inst) = text "{-# SPECIALISE instance" <+> ppr inst <+> text "#-}" ppr (RuleP n ty_bndrs tm_bndrs lhs rhs phases) = sep [ text "{-# RULES" <+> pprString n <+> ppr phases - , nest 4 $ ppr_ty_forall ty_bndrs <+> ppr_tm_forall ty_bndrs + , nest 4 $ ppr_ty_forall ty_bndrs <+> ppr_tm_forall ty_bndrs tm_bndrs <+> ppr lhs , nest 4 $ char '=' <+> ppr rhs <+> text "#-}" ] - where ppr_ty_forall Nothing = empty - ppr_ty_forall (Just bndrs) = text "forall" - <+> fsep (map ppr bndrs) - <+> char '.' - ppr_tm_forall Nothing | null tm_bndrs = empty - ppr_tm_forall _ = text "forall" - <+> fsep (map ppr tm_bndrs) - <+> char '.' ppr (AnnP tgt expr) = text "{-# ANN" <+> target1 tgt <+> ppr expr <+> text "#-}" where target1 ModuleAnnotation = text "module" @@ -681,6 +680,17 @@ instance Ppr Pragma where ppr (SCCP nm str) = text "{-# SCC" <+> pprName' Applied nm <+> maybe empty pprString str <+> text "#-}" +ppr_ty_forall :: Maybe [TyVarBndr ()] -> Doc +ppr_ty_forall Nothing = empty +ppr_ty_forall (Just bndrs) = text "forall" + <+> fsep (map ppr bndrs) + <+> char '.' + +ppr_tm_forall :: Maybe [TyVarBndr ()] -> [RuleBndr] -> Doc +ppr_tm_forall Nothing [] = empty +ppr_tm_forall _ tm_bndrs = text "forall" + <+> fsep (map ppr tm_bndrs) + <+> char '.' ------------------------------ instance Ppr Inline where ppr NoInline = text "NOINLINE" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6155e4a8562f9943f976d4496c95d07651a6a554 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6155e4a8562f9943f976d4496c95d07651a6a554 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 15:13:25 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 27 Nov 2024 10:13:25 -0500 Subject: [Git][ghc/ghc][wip/backports-9.8] 2 commits: testsuite: Skip T22744 due to #22524 Message-ID: <674737155dd12_22b07323f85c90fe@gitlab.mail> Ben Gamari pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC Commits: 22559ece by Ben Gamari at 2024-11-27T10:09:54-05:00 testsuite: Skip T22744 due to #22524 This test has been routinely timing out on Darwin; this is being investigated but for the time being we will disable it to move ahead with the 9.8.4 release. - - - - - a3401159 by Mario Blažević at 2024-11-27T10:13:19-05:00 Bumped the upper bound of text to <2.2 (cherry picked from commit 471b267294bc5f17e4864ce9bb2f221c4d47eac8) - - - - - 3 changed files: - linters/lint-commit-msg/lint-commit-msg.cabal - linters/lint-submodule-refs/lint-submodule-refs.cabal - testsuite/tests/perf/compiler/all.T Changes: ===================================== linters/lint-commit-msg/lint-commit-msg.cabal ===================================== @@ -26,4 +26,4 @@ executable lint-commit-msg base >= 4.14 && < 5, text - >= 1.2 && < 2.1 + >= 1.2 && < 2.2 ===================================== linters/lint-submodule-refs/lint-submodule-refs.cabal ===================================== @@ -15,7 +15,7 @@ executable lint-submodule-refs base >= 4.14 && < 5, text - >= 1.2 && < 2.1, + >= 1.2 && < 2.2, linters-common ghc-options: ===================================== testsuite/tests/perf/compiler/all.T ===================================== @@ -692,7 +692,7 @@ test('T22744', req_interp, pre_cmd('$MAKE -s --no-print-directory T22744'), extra_files(['genT22744']), - compile_timeout_multiplier(5) + skip, # due to #25524 ], multimod_compile, ['T22744', '-v0']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0768fe933ade0962a324f407e839d21c4469cc23...a3401159f2846605abb517e71af463df47398e72 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0768fe933ade0962a324f407e839d21c4469cc23...a3401159f2846605abb517e71af463df47398e72 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 16:41:17 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 11:41:17 -0500 Subject: [Git][ghc/ghc][master] Cmm constant folding: Narrow results to operations bitwidth. Message-ID: <67474badf1f09_3e071cbf60887131@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: df42ba16 by Andreas Klebinger at 2024-11-27T11:40:49-05:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - 3 changed files: - compiler/GHC/Cmm/Opt.hs - + testsuite/tests/cmm/opt/T24556.cmm - testsuite/tests/cmm/opt/all.T Changes: ===================================== compiler/GHC/Cmm/Opt.hs ===================================== @@ -49,6 +49,7 @@ constantFoldExprOpt e = wrapRecExpOpt f e CmmMachOp op' args' -> fromMaybe (CmmMachOp op' args') <$> cmmMachOpFoldOptM cfg op' args' e -> pure e f (CmmRegOff r 0) = pure (CmmReg r) + f (CmmLit (CmmInt x rep)) = pure (CmmLit $ CmmInt (narrowU rep x) rep) f e = pure e constantFoldExpr :: Platform -> CmmExpr -> CmmExpr @@ -88,7 +89,7 @@ cmmMachOpFoldM _ (MO_VF_Broadcast lg _w) exprs = _ -> Nothing cmmMachOpFoldM _ op [CmmLit (CmmInt x rep)] = Just $! case op of - MO_S_Neg _ -> CmmLit (CmmInt (-x) rep) + MO_S_Neg _ -> CmmLit (CmmInt (narrowS rep (-x)) rep) MO_Not _ -> CmmLit (CmmInt (complement x) rep) -- these are interesting: we must first narrow to the @@ -164,9 +165,9 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_S_Lt _ -> Just $! CmmLit (CmmInt (if x_s < y_s then 1 else 0) (wordWidth platform)) MO_S_Le _ -> Just $! CmmLit (CmmInt (if x_s <= y_s then 1 else 0) (wordWidth platform)) - MO_Add r -> Just $! CmmLit (CmmInt (x + y) r) - MO_Sub r -> Just $! CmmLit (CmmInt (x - y) r) - MO_Mul r -> Just $! CmmLit (CmmInt (x * y) r) + MO_Add r -> Just $! CmmLit (CmmInt (narrowU r $ x + y) r) + MO_Sub r -> Just $! CmmLit (CmmInt (narrowS r $ x - y) r) + MO_Mul r -> Just $! CmmLit (CmmInt (narrowU r $ x * y) r) MO_U_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `quot` y_u) r) MO_U_Rem r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `rem` y_u) r) MO_S_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_s `quot` y_s) r) @@ -176,7 +177,7 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_Or r -> Just $! CmmLit (CmmInt (x .|. y) r) MO_Xor r -> Just $! CmmLit (CmmInt (x `xor` y) r) - MO_Shl r -> Just $! CmmLit (CmmInt (x `shiftL` fromIntegral y) r) + MO_Shl r -> Just $! CmmLit (CmmInt (narrowU r $ x `shiftL` fromIntegral y) r) MO_U_Shr r -> Just $! CmmLit (CmmInt (x_u `shiftR` fromIntegral y) r) MO_S_Shr r -> Just $! CmmLit (CmmInt (x_s `shiftR` fromIntegral y) r) ===================================== testsuite/tests/cmm/opt/T24556.cmm ===================================== @@ -0,0 +1,12 @@ +#include "Cmm.h" + +func(W_ buffer) { + I8[buffer] = %lobits8(255 + 45); + I8[buffer+(1)] = %lobits8(310 - 10); + I8[buffer+(2)] = %lobits8(30 * 10); + I8[buffer+(3)] = %lobits8(150 << 1); + // This one comes from test-primops + I64[buffer+(4)] = %zx64(((1 :: bits16) & ((1 :: bits16) & (((516 :: bits16) * (154 :: bits16)) + bits16[buffer + (0 :: W_)])))); + return(1); +} + ===================================== testsuite/tests/cmm/opt/all.T ===================================== @@ -3,3 +3,8 @@ test('T15188', cmm_src, makefile_test, []) test('T18141', normal, compile, ['']) test('T20142', normal, compile, ['']) + +# Cmm opt should not produce oversized literals in the assembly output. +# We check this by telling the assembler to exit on warnings. +test('T24556', [only_ways('optasm'), cmm_src], compile, ['-O -opta -Xassembler -opta --fatal-warnings']) + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/df42ba16418257e30a7f8805ac725df51aef5720 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/df42ba16418257e30a7f8805ac725df51aef5720 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 16:41:53 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 11:41:53 -0500 Subject: [Git][ghc/ghc][master] ghc-toolchain: Introduce basic flag validation Message-ID: <67474bd15beda_3e071cbcdcc899fe@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: bf3db97e by Ben Gamari at 2024-11-27T11:41:26-05:00 ghc-toolchain: Introduce basic flag validation We verify that required flags (currently `--output` and `--triple`) are provided. The implementation is truly awful, but so is getopt. Begins to address #25500. - - - - - 1 changed file: - utils/ghc-toolchain/exe/Main.hs Changes: ===================================== utils/ghc-toolchain/exe/Main.hs ===================================== @@ -35,11 +35,11 @@ import GHC.Toolchain.NormaliseTriple (normaliseTriple) import Text.Read (readMaybe) data Opts = Opts - { optTriple :: String + { optTriple :: Maybe String , optTargetPrefix :: Maybe String , optLocallyExecutable :: Maybe Bool , optLlvmTriple :: Maybe String - , optOutput :: String + , optOutput :: Maybe String , optCc :: ProgOpt , optCxx :: ProgOpt , optCpp :: ProgOpt @@ -82,11 +82,11 @@ emptyFormatOpts = FormatOpts { formatOptInput = error "formatOpts: input" emptyOpts :: Opts emptyOpts = Opts - { optTriple = "" + { optTriple = Nothing , optTargetPrefix = Nothing , optLocallyExecutable = Nothing , optLlvmTriple = Nothing - , optOutput = "" + , optOutput = Nothing , optCc = po0 , optCxx = po0 , optCpp = po0 @@ -129,13 +129,13 @@ _optMergeObjs = Lens optMergeObjs (\x o -> o {optMergeObjs=x}) _optWindres = Lens optWindres (\x o -> o {optWindres=x}) _optLd = Lens optLd (\x o -> o {optLd= x}) -_optTriple :: Lens Opts String +_optTriple :: Lens Opts (Maybe String) _optTriple = Lens optTriple (\x o -> o {optTriple=x}) _optLlvmTriple :: Lens Opts (Maybe String) _optLlvmTriple = Lens optLlvmTriple (\x o -> o {optLlvmTriple=x}) -_optOutput :: Lens Opts String +_optOutput :: Lens Opts (Maybe String) _optOutput = Lens optOutput (\x o -> o {optOutput=x}) _optTargetPrefix :: Lens Opts (Maybe String) @@ -213,7 +213,7 @@ options = , Option [] ["disable-" ++ optName] (NoArg (set lens (Just False))) ("Disable " ++ description) ] - tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple) "TRIPLE") "Target triple" + tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple . Just) "TRIPLE") "Target triple" llvmTripleOpt = Option [] ["llvm-triple"] (ReqArg (set _optLlvmTriple . Just) "LLVM-TRIPLE") "LLVM Target triple" targetPrefixOpt = Option ['T'] ["target-prefix"] (ReqArg (set _optTargetPrefix . Just) "PREFIX") @@ -233,7 +233,7 @@ options = keepTempOpt = Option [] ["keep-temp"] (NoArg (set _optKeepTemp True)) "do not remove temporary files" - outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput) "OUTPUT") + outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput . Just) "OUTPUT") "The output path for the generated target toolchain configuration" formatOpts :: [OptDescr (FormatOpts -> FormatOpts)] @@ -244,6 +244,16 @@ formatOpts = [ "The target file to format") ] +validateOpts :: Opts -> [String] +validateOpts opts = mconcat + [ assertJust _optTriple "missing --triple flag" + , assertJust _optOutput "missing --output flag" + ] + where + assertJust :: Lens Opts (Maybe a) -> String -> [String] + assertJust lens msg = + [ msg | Nothing <- pure $ view lens opts ] + main :: IO () main = do argv <- getArgs @@ -273,14 +283,14 @@ doFormat args = do doConfigure :: [String] -> IO () doConfigure args = do - let (opts0, _nonopts, errs) = getOpt RequireOrder options args + let (opts0, _nonopts, parseErrs) = getOpt RequireOrder options args let opts = foldr (.) id opts0 emptyOpts - case errs of + case parseErrs ++ validateOpts opts of [] -> do let env = Env { verbosity = optVerbosity opts , targetPrefix = case optTargetPrefix opts of Just prefix -> Just prefix - Nothing -> Just $ optTriple opts ++ "-" + Nothing -> Just $ fromMaybe (error "undefined triple") (optTriple opts) ++ "-" , keepTemp = optKeepTemp opts , canLocallyExecute = fromMaybe True (optLocallyExecutable opts) , logContexts = [] @@ -289,7 +299,7 @@ doConfigure args = do case r of Left err -> print err >> exitWith (ExitFailure 2) Right () -> return () - _ -> do + errs -> do mapM_ putStrLn errs putStrLn $ usageInfo "ghc-toolchain" options exitWith (ExitFailure 1) @@ -298,7 +308,7 @@ run :: Opts -> M () run opts = do tgt <- mkTarget opts logDebug $ "Final Target: " ++ show tgt - let file = optOutput opts + let file = fromMaybe (error "undefined --output") (optOutput opts) writeFile file (show tgt) optional :: M a -> M (Maybe a) @@ -390,7 +400,7 @@ ldOverrideWhitelist a = mkTarget :: Opts -> M Target mkTarget opts = do - normalised_triple <- normaliseTriple (optTriple opts) + normalised_triple <- normaliseTriple (fromMaybe (error "missing --triple") (optTriple opts)) -- Use Llvm target if specified, otherwise use triple as llvm target let tgtLlvmTarget = fromMaybe normalised_triple (optLlvmTriple opts) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bf3db97e5f2ec4caaf436d7ac4d7ade706737106 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bf3db97e5f2ec4caaf436d7ac4d7ade706737106 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 16:42:34 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 11:42:34 -0500 Subject: [Git][ghc/ghc][master] rts: Allow ExecPage to allocate anywhere in address space Message-ID: <67474bfa357ed_3e071cbf54092771@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a104508d by Ben Gamari at 2024-11-27T11:42:03-05:00 rts: Allow ExecPage to allocate anywhere in address space Currently the ExecPage facility has two users: * GHCi, for constructing info tables, and * the adjustor allocation path Despite neither of these have any spatial locality constraints ExecPage was using the linker's `mmapAnonForLinker`, which tries hard to ensure that mappings end up nearby the executable image. This makes adjustor allocation needlessly subject to fragmentation concerns. We now instead return less constrained mappings, improving the robustness of the mechanism. Addresses #25503. - - - - - 3 changed files: - rts/ExecPage.c - rts/linker/MMap.c - rts/linker/MMap.h Changes: ===================================== rts/ExecPage.c ===================================== @@ -10,7 +10,7 @@ #include "linker/MMap.h" ExecPage *allocateExecPage(void) { - ExecPage *page = (ExecPage *) mmapAnonForLinker(getPageSize()); + ExecPage *page = (ExecPage *) mmapAnon(getPageSize()); return page; } ===================================== rts/linker/MMap.c ===================================== @@ -207,6 +207,12 @@ memoryAccessToProt(MemoryAccess access) } } +void * +mmapAnon (size_t bytes) +{ + return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); +} + // // Returns NULL on failure. // @@ -410,6 +416,15 @@ mmapForLinker (size_t bytes, MemoryAccess access, uint32_t flags, int fd, int of return result; } +/* + * Map read/write pages anywhere in memory. Returns NULL on failure. + */ +void * +mmapAnon (size_t bytes) +{ + return mmapAnywhere(bytes, MEM_READ_WRITE_THEN_READ_EXECUTE, MAP_ANONYMOUS, -1, 0); +} + /* * Map read/write pages in low memory. Returns NULL on failure. */ ===================================== rts/linker/MMap.h ===================================== @@ -64,7 +64,11 @@ typedef enum { extern void *mmap_32bit_base; -// Map read/write anonymous memory. +// Map read/write anonymous memory anywhere in memory. +void *mmapAnon(size_t bytes); + +// Map read/write anonymous memory, enforcing the constraint of +// placing the mapping within 4GB of the executable image. void *mmapAnonForLinker (size_t bytes); // Change protection of previous mapping memory. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a104508d2ea5bbc61c4a756dca42fc043b329709 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a104508d2ea5bbc61c4a756dca42fc043b329709 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 16:43:19 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 11:43:19 -0500 Subject: [Git][ghc/ghc][master] base: Fix incorrect mentions of GHC.Internal.Numeric Message-ID: <67474c27151c9_3e071c80a00c97357@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: c3fc9b86 by Ben Gamari at 2024-11-27T11:42:39-05:00 base: Fix incorrect mentions of GHC.Internal.Numeric These were incorrectly changed by the automated refactoring of the `ghc-internal` migration. Fixes #25521. - - - - - 8 changed files: - compiler/GHC/Builtin/Names.hs - libraries/base/src/Data/Char.hs - libraries/base/src/Data/Semigroup.hs - libraries/base/src/Prelude.hs - libraries/ghc-internal/src/GHC/Internal/Base.hs - libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs - libraries/ghc-internal/src/GHC/Internal/Read.hs - libraries/ghc-internal/src/GHC/Internal/Real.hs Changes: ===================================== compiler/GHC/Builtin/Names.hs ===================================== @@ -279,7 +279,7 @@ basicKnownKeyNames -- Dynamic toDynName, - -- GHC.Internal.Numeric stuff + -- Numeric stuff negateName, minusName, geName, eqName, mkRationalBase2Name, mkRationalBase10Name, ===================================== libraries/base/src/Data/Char.hs ===================================== @@ -42,7 +42,7 @@ module Data.Char , digitToInt , intToDigit - -- * GHC.Internal.Numeric representations + -- * Numeric representations , ord , chr ===================================== libraries/base/src/Data/Semigroup.hs ===================================== @@ -89,7 +89,7 @@ module Data.Semigroup ( , First(..) , Last(..) , WrappedMonoid(..) - -- * Re-exported monoids from GHC.Internal.Data.Monoid + -- * Re-exported monoids , Dual(..) , Endo(..) , All(..) ===================================== libraries/base/src/Prelude.hs ===================================== @@ -47,11 +47,11 @@ module Prelude ( -- ** Numbers - -- *** GHC.Internal.Numeric types + -- *** Numeric types Int, Integer, Float, Double, Rational, Word, - -- *** GHC.Internal.Numeric type classes + -- *** Numeric type classes Num((+), (-), (*), negate, abs, signum, fromInteger), Real(toRational), Integral(quot, rem, div, mod, quotRem, divMod, toInteger), @@ -63,7 +63,7 @@ module Prelude ( encodeFloat, exponent, significand, scaleFloat, isNaN, isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2), - -- *** GHC.Internal.Numeric functions + -- *** Numeric functions subtract, even, odd, gcd, lcm, (^), (^^), fromIntegral, realToFrac, ===================================== libraries/ghc-internal/src/GHC/Internal/Base.hs ===================================== @@ -2355,7 +2355,7 @@ getTag :: forall {lev :: Levity} (a :: TYPE (BoxedRep lev)) getTag = dataToTag# ---------------------------------------------- --- GHC.Internal.Numeric primops +-- Numeric primops ---------------------------------------------- -- Definitions of the boxed PrimOps; these will be ===================================== libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs ===================================== @@ -47,7 +47,7 @@ module GHC.Internal.Foreign.C.Types , CLLong(..), CULLong(..), CBool(..) , CIntPtr(..), CUIntPtr(..), CIntMax(..), CUIntMax(..) - -- ** GHC.Internal.Numeric types + -- ** Numeric types -- | These types are represented as @newtype at s of basic -- foreign types, and are instances of -- 'Prelude.Eq', 'Prelude.Ord', 'Prelude.Num', 'Prelude.Read', ===================================== libraries/ghc-internal/src/GHC/Internal/Read.hs ===================================== @@ -551,7 +551,7 @@ instance Read L.Lexeme where readList = readListDefault -------------------------------------------------------------- --- GHC.Internal.Numeric instances of Read +-- Numeric instances of Read -------------------------------------------------------------- readNumber :: Num a => (L.Lexeme -> ReadPrec a) -> ReadPrec a ===================================== libraries/ghc-internal/src/GHC/Internal/Real.hs ===================================== @@ -360,7 +360,7 @@ numericEnumFrom :: (Fractional a) => a -> [a] {-# INLINE numericEnumFrom #-} -- See Note [Inline Enum method helpers] in GHC.Internal.Enum numericEnumFrom n = go 0 where - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k in n' : go (k + 1) @@ -369,7 +369,7 @@ numericEnumFromThen :: (Fractional a) => a -> a -> [a] numericEnumFromThen n m = go 0 where step = m - n - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k * step in n' : go (k + 1) @@ -386,7 +386,7 @@ numericEnumFromThenTo e1 e2 !e3 !predicate | e2 >= e1 = (<= e3 + mid) | otherwise = (>= e3 + mid) -{- Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] +{- Note [Numeric Stability of Enumerating Floating Numbers] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When enumerate floating numbers, we could add the increment to the last number at every run (as what we did previously): View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c3fc9b861fd00a85a4fcbd9960b8242d9fabe04b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c3fc9b861fd00a85a4fcbd9960b8242d9fabe04b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 16:49:31 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Wed, 27 Nov 2024 11:49:31 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/T25528 Message-ID: <67474d9bc899_3e071cbc3f499243@gitlab.mail> Ben Gamari pushed new branch wip/T25528 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/T25528 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 17:14:29 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 12:14:29 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Cmm constant folding: Narrow results to operations bitwidth. Message-ID: <6747537531600_3e071cb7ed001064a@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: df42ba16 by Andreas Klebinger at 2024-11-27T11:40:49-05:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - bf3db97e by Ben Gamari at 2024-11-27T11:41:26-05:00 ghc-toolchain: Introduce basic flag validation We verify that required flags (currently `--output` and `--triple`) are provided. The implementation is truly awful, but so is getopt. Begins to address #25500. - - - - - a104508d by Ben Gamari at 2024-11-27T11:42:03-05:00 rts: Allow ExecPage to allocate anywhere in address space Currently the ExecPage facility has two users: * GHCi, for constructing info tables, and * the adjustor allocation path Despite neither of these have any spatial locality constraints ExecPage was using the linker's `mmapAnonForLinker`, which tries hard to ensure that mappings end up nearby the executable image. This makes adjustor allocation needlessly subject to fragmentation concerns. We now instead return less constrained mappings, improving the robustness of the mechanism. Addresses #25503. - - - - - c3fc9b86 by Ben Gamari at 2024-11-27T11:42:39-05:00 base: Fix incorrect mentions of GHC.Internal.Numeric These were incorrectly changed by the automated refactoring of the `ghc-internal` migration. Fixes #25521. - - - - - 3f04e373 by sheaf at 2024-11-27T12:13:57-05:00 Add checkExact to toolTargets This change means that the Hadrian multi target will include exactprint. In particular, this means that HLS will work on exactprint inside the GHC tree. - - - - - dc7952b3 by Arnaud Spiwack at 2024-11-27T12:14:13-05:00 Add test for #25428 - - - - - 6b1c6b95 by Arnaud Spiwack at 2024-11-27T12:14:13-05:00 Don't bypass MonoLocalBind in empty patterns Fixes #25428 - - - - - 20 changed files: - compiler/GHC/Builtin/Names.hs - compiler/GHC/Cmm/Opt.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Tc/Gen/Bind.hs - hadrian/src/Rules/ToolArgs.hs - libraries/base/src/Data/Char.hs - libraries/base/src/Data/Semigroup.hs - libraries/base/src/Prelude.hs - libraries/ghc-internal/src/GHC/Internal/Base.hs - libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs - libraries/ghc-internal/src/GHC/Internal/Read.hs - libraries/ghc-internal/src/GHC/Internal/Real.hs - rts/ExecPage.c - rts/linker/MMap.c - rts/linker/MMap.h - + testsuite/tests/cmm/opt/T24556.cmm - testsuite/tests/cmm/opt/all.T - + testsuite/tests/linear/should_compile/T25428.hs - testsuite/tests/linear/should_compile/all.T - utils/ghc-toolchain/exe/Main.hs Changes: ===================================== compiler/GHC/Builtin/Names.hs ===================================== @@ -279,7 +279,7 @@ basicKnownKeyNames -- Dynamic toDynName, - -- GHC.Internal.Numeric stuff + -- Numeric stuff negateName, minusName, geName, eqName, mkRationalBase2Name, mkRationalBase10Name, ===================================== compiler/GHC/Cmm/Opt.hs ===================================== @@ -49,6 +49,7 @@ constantFoldExprOpt e = wrapRecExpOpt f e CmmMachOp op' args' -> fromMaybe (CmmMachOp op' args') <$> cmmMachOpFoldOptM cfg op' args' e -> pure e f (CmmRegOff r 0) = pure (CmmReg r) + f (CmmLit (CmmInt x rep)) = pure (CmmLit $ CmmInt (narrowU rep x) rep) f e = pure e constantFoldExpr :: Platform -> CmmExpr -> CmmExpr @@ -88,7 +89,7 @@ cmmMachOpFoldM _ (MO_VF_Broadcast lg _w) exprs = _ -> Nothing cmmMachOpFoldM _ op [CmmLit (CmmInt x rep)] = Just $! case op of - MO_S_Neg _ -> CmmLit (CmmInt (-x) rep) + MO_S_Neg _ -> CmmLit (CmmInt (narrowS rep (-x)) rep) MO_Not _ -> CmmLit (CmmInt (complement x) rep) -- these are interesting: we must first narrow to the @@ -164,9 +165,9 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_S_Lt _ -> Just $! CmmLit (CmmInt (if x_s < y_s then 1 else 0) (wordWidth platform)) MO_S_Le _ -> Just $! CmmLit (CmmInt (if x_s <= y_s then 1 else 0) (wordWidth platform)) - MO_Add r -> Just $! CmmLit (CmmInt (x + y) r) - MO_Sub r -> Just $! CmmLit (CmmInt (x - y) r) - MO_Mul r -> Just $! CmmLit (CmmInt (x * y) r) + MO_Add r -> Just $! CmmLit (CmmInt (narrowU r $ x + y) r) + MO_Sub r -> Just $! CmmLit (CmmInt (narrowS r $ x - y) r) + MO_Mul r -> Just $! CmmLit (CmmInt (narrowU r $ x * y) r) MO_U_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `quot` y_u) r) MO_U_Rem r | y /= 0 -> Just $! CmmLit (CmmInt (x_u `rem` y_u) r) MO_S_Quot r | y /= 0 -> Just $! CmmLit (CmmInt (x_s `quot` y_s) r) @@ -176,7 +177,7 @@ cmmMachOpFoldM platform mop [CmmLit (CmmInt x xrep), CmmLit (CmmInt y _)] MO_Or r -> Just $! CmmLit (CmmInt (x .|. y) r) MO_Xor r -> Just $! CmmLit (CmmInt (x `xor` y) r) - MO_Shl r -> Just $! CmmLit (CmmInt (x `shiftL` fromIntegral y) r) + MO_Shl r -> Just $! CmmLit (CmmInt (narrowU r $ x `shiftL` fromIntegral y) r) MO_U_Shr r -> Just $! CmmLit (CmmInt (x_u `shiftR` fromIntegral y) r) MO_S_Shr r -> Just $! CmmLit (CmmInt (x_s `shiftR` fromIntegral y) r) ===================================== compiler/GHC/Driver/Flags.hs ===================================== @@ -347,7 +347,7 @@ impliedXFlags , (LangExt.UnliftedDatatypes, On LangExt.DataKinds) , (LangExt.UnliftedDatatypes, On LangExt.StandaloneKindSignatures) - -- See Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind + -- See (NVP3) in Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind , (LangExt.LinearTypes, On LangExt.MonoLocalBinds) ] ===================================== compiler/GHC/Tc/Gen/Bind.hs ===================================== @@ -682,7 +682,6 @@ it's all cool; each signature has distinct type variables from the renamer.) {- Note [Non-variable pattern bindings aren't linear] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - A fundamental limitation of the typechecking algorithm is that we cannot have a binding which, at the same time, - is linear in its rhs @@ -694,17 +693,35 @@ https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0111-linear To address this we to do a few things -- When a pattern is annotated with a multiplicity annotation `let %q pat = rhs +- (NVP1) When a pattern is annotated with a multiplicity annotation `let %q pat = rhs in body` (note: multiplicity-annotated bindings are always parsed as a PatBind, see Note [Multiplicity annotations] in Language.Haskell.Syntax.Binds), - then the let is never generalised (we use the NoGen plan). -- Whenever the typechecker infers an AbsBind *and* the inner binding is a + then the let is never generalised (we use the NoGen plan). We do this with a + dedicated test in decideGeneralisationPlan. +- (NVP2) Whenever the typechecker infers an AbsBind *and* the inner binding is a non-variable PatBind, then the multiplicity of the binding is inferred to be - Many. This is a little infelicitous: sometimes the typechecker infers an - AbsBind where it didn't need to. This may cause some programs to be spuriously - rejected, when NoMonoLocalBinds is on. -- LinearLet implies MonoLocalBinds to avoid the AbsBind case altogether. - + Many. We do this by calling manyIfPats in tcPolyInfer. This is a little + infelicitous: sometimes the typechecker infers an AbsBind where it didn't need + to. This may cause some programs to be spuriously rejected, when + NoMonoLocalBinds is on. +- (NVP3) LinearLet implies MonoLocalBinds to avoid the AbsBind case altogether. +- (NVP4) Wrinkle: even when other conditions (including MonoLocalBinds), GHC + will generalise some binders, namely so-called closed binding groups. We need + to make sure that the test for (NVP1) has priority over the test for closed + binders. +- (NVP5) Wrinkle: Closed binding groups (NVP4) are usually fine to type with + multiplicity Many. But there's one exception: when there's no binder at all, + the binding group is considered closed. Even if the rhs contains arbitrary + variables. + + f :: () %1 -> Bool + f x = let !() = x in True + + If we consider `!() = x` as a generalisable group (which does nothing anyway), + then (NVP2) will infer the pattern as multiplicity Many, and reject the + function. We don't want that, see also #25428. So we take care not to + generalise in this case, by excluding the no-binder case from automatic + generalisation in decideGeneralisationPlan. -} tcPolyInfer @@ -722,7 +739,7 @@ tcPolyInfer top_lvl rec_tc prag_fn tc_sig_fn bind_list ; apply_mr <- checkMonomorphismRestriction mono_infos bind_list -- AbsBinds which are PatBinds can't be linear. - -- See Note [Non-variable pattern bindings aren't linear] + -- See (NVP2) in Note [Non-variable pattern bindings aren't linear] ; manyIfPats binds' ; traceTc "tcPolyInfer" (ppr apply_mr $$ ppr (map mbi_sig mono_infos)) @@ -1826,12 +1843,17 @@ decideGeneralisationPlan dflags top_lvl closed sig_fn lbinds -- See Note [Always generalise top-level bindings] | has_mult_anns_and_pats = False - -- See Note [Non-variable pattern bindings aren't linear] + -- See (NVP1) and (NVP4) in Note [Non-variable pattern bindings aren't linear] - | IsGroupClosed _ True <- closed = True + | IsGroupClosed _ True <- closed + , not (null binders) = True -- The 'True' means that all of the group's -- free vars have ClosedTypeId=True; so we can ignore - -- -XMonoLocalBinds, and generalise anyway + -- -XMonoLocalBinds, and generalise anyway. + -- Except if 'fv' is empty: there is no binder to generalise, so + -- generalising does nothing. And trying to generalise hurts linear + -- types (see #25428). So we don't force it. + -- See (NVP5) in Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind. | has_partial_sigs = True -- See Note [Partial type signatures and generalisation] ===================================== hadrian/src/Rules/ToolArgs.hs ===================================== @@ -146,6 +146,7 @@ mkToolTarget es p = do toolTargets :: [Package] toolTargets = [ cabalSyntax , cabal + , checkExact , compiler , directory , process ===================================== libraries/base/src/Data/Char.hs ===================================== @@ -42,7 +42,7 @@ module Data.Char , digitToInt , intToDigit - -- * GHC.Internal.Numeric representations + -- * Numeric representations , ord , chr ===================================== libraries/base/src/Data/Semigroup.hs ===================================== @@ -89,7 +89,7 @@ module Data.Semigroup ( , First(..) , Last(..) , WrappedMonoid(..) - -- * Re-exported monoids from GHC.Internal.Data.Monoid + -- * Re-exported monoids , Dual(..) , Endo(..) , All(..) ===================================== libraries/base/src/Prelude.hs ===================================== @@ -47,11 +47,11 @@ module Prelude ( -- ** Numbers - -- *** GHC.Internal.Numeric types + -- *** Numeric types Int, Integer, Float, Double, Rational, Word, - -- *** GHC.Internal.Numeric type classes + -- *** Numeric type classes Num((+), (-), (*), negate, abs, signum, fromInteger), Real(toRational), Integral(quot, rem, div, mod, quotRem, divMod, toInteger), @@ -63,7 +63,7 @@ module Prelude ( encodeFloat, exponent, significand, scaleFloat, isNaN, isInfinite, isDenormalized, isIEEE, isNegativeZero, atan2), - -- *** GHC.Internal.Numeric functions + -- *** Numeric functions subtract, even, odd, gcd, lcm, (^), (^^), fromIntegral, realToFrac, ===================================== libraries/ghc-internal/src/GHC/Internal/Base.hs ===================================== @@ -2355,7 +2355,7 @@ getTag :: forall {lev :: Levity} (a :: TYPE (BoxedRep lev)) getTag = dataToTag# ---------------------------------------------- --- GHC.Internal.Numeric primops +-- Numeric primops ---------------------------------------------- -- Definitions of the boxed PrimOps; these will be ===================================== libraries/ghc-internal/src/GHC/Internal/Foreign/C/Types.hs ===================================== @@ -47,7 +47,7 @@ module GHC.Internal.Foreign.C.Types , CLLong(..), CULLong(..), CBool(..) , CIntPtr(..), CUIntPtr(..), CIntMax(..), CUIntMax(..) - -- ** GHC.Internal.Numeric types + -- ** Numeric types -- | These types are represented as @newtype at s of basic -- foreign types, and are instances of -- 'Prelude.Eq', 'Prelude.Ord', 'Prelude.Num', 'Prelude.Read', ===================================== libraries/ghc-internal/src/GHC/Internal/Read.hs ===================================== @@ -551,7 +551,7 @@ instance Read L.Lexeme where readList = readListDefault -------------------------------------------------------------- --- GHC.Internal.Numeric instances of Read +-- Numeric instances of Read -------------------------------------------------------------- readNumber :: Num a => (L.Lexeme -> ReadPrec a) -> ReadPrec a ===================================== libraries/ghc-internal/src/GHC/Internal/Real.hs ===================================== @@ -360,7 +360,7 @@ numericEnumFrom :: (Fractional a) => a -> [a] {-# INLINE numericEnumFrom #-} -- See Note [Inline Enum method helpers] in GHC.Internal.Enum numericEnumFrom n = go 0 where - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k in n' : go (k + 1) @@ -369,7 +369,7 @@ numericEnumFromThen :: (Fractional a) => a -> a -> [a] numericEnumFromThen n m = go 0 where step = m - n - -- See Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] + -- See Note [Numeric Stability of Enumerating Floating Numbers] go !k = let !n' = n + k * step in n' : go (k + 1) @@ -386,7 +386,7 @@ numericEnumFromThenTo e1 e2 !e3 !predicate | e2 >= e1 = (<= e3 + mid) | otherwise = (>= e3 + mid) -{- Note [GHC.Internal.Numeric Stability of Enumerating Floating Numbers] +{- Note [Numeric Stability of Enumerating Floating Numbers] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When enumerate floating numbers, we could add the increment to the last number at every run (as what we did previously): ===================================== rts/ExecPage.c ===================================== @@ -10,7 +10,7 @@ #include "linker/MMap.h" ExecPage *allocateExecPage(void) { - ExecPage *page = (ExecPage *) mmapAnonForLinker(getPageSize()); + ExecPage *page = (ExecPage *) mmapAnon(getPageSize()); return page; } ===================================== rts/linker/MMap.c ===================================== @@ -207,6 +207,12 @@ memoryAccessToProt(MemoryAccess access) } } +void * +mmapAnon (size_t bytes) +{ + return VirtualAlloc(NULL, bytes, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); +} + // // Returns NULL on failure. // @@ -410,6 +416,15 @@ mmapForLinker (size_t bytes, MemoryAccess access, uint32_t flags, int fd, int of return result; } +/* + * Map read/write pages anywhere in memory. Returns NULL on failure. + */ +void * +mmapAnon (size_t bytes) +{ + return mmapAnywhere(bytes, MEM_READ_WRITE_THEN_READ_EXECUTE, MAP_ANONYMOUS, -1, 0); +} + /* * Map read/write pages in low memory. Returns NULL on failure. */ ===================================== rts/linker/MMap.h ===================================== @@ -64,7 +64,11 @@ typedef enum { extern void *mmap_32bit_base; -// Map read/write anonymous memory. +// Map read/write anonymous memory anywhere in memory. +void *mmapAnon(size_t bytes); + +// Map read/write anonymous memory, enforcing the constraint of +// placing the mapping within 4GB of the executable image. void *mmapAnonForLinker (size_t bytes); // Change protection of previous mapping memory. ===================================== testsuite/tests/cmm/opt/T24556.cmm ===================================== @@ -0,0 +1,12 @@ +#include "Cmm.h" + +func(W_ buffer) { + I8[buffer] = %lobits8(255 + 45); + I8[buffer+(1)] = %lobits8(310 - 10); + I8[buffer+(2)] = %lobits8(30 * 10); + I8[buffer+(3)] = %lobits8(150 << 1); + // This one comes from test-primops + I64[buffer+(4)] = %zx64(((1 :: bits16) & ((1 :: bits16) & (((516 :: bits16) * (154 :: bits16)) + bits16[buffer + (0 :: W_)])))); + return(1); +} + ===================================== testsuite/tests/cmm/opt/all.T ===================================== @@ -3,3 +3,8 @@ test('T15188', cmm_src, makefile_test, []) test('T18141', normal, compile, ['']) test('T20142', normal, compile, ['']) + +# Cmm opt should not produce oversized literals in the assembly output. +# We check this by telling the assembler to exit on warnings. +test('T24556', [only_ways('optasm'), cmm_src], compile, ['-O -opta -Xassembler -opta --fatal-warnings']) + ===================================== testsuite/tests/linear/should_compile/T25428.hs ===================================== @@ -0,0 +1,6 @@ +{-# language LinearTypes #-} + +module T25428 where + +f :: () %1 -> Int +f x = let !() = x in 0 ===================================== testsuite/tests/linear/should_compile/all.T ===================================== @@ -48,3 +48,4 @@ test('LinearLetPoly', normal, compile, ['']) test('LinearListComprehension', normal, compile, ['-dlinear-core-lint']) test('OmitFieldPat', normal, compile, ['-dcore-lint']) test('T25515', normal, compile, ['-dcore-lint']) +test('T25428', normal, compile, ['']) ===================================== utils/ghc-toolchain/exe/Main.hs ===================================== @@ -35,11 +35,11 @@ import GHC.Toolchain.NormaliseTriple (normaliseTriple) import Text.Read (readMaybe) data Opts = Opts - { optTriple :: String + { optTriple :: Maybe String , optTargetPrefix :: Maybe String , optLocallyExecutable :: Maybe Bool , optLlvmTriple :: Maybe String - , optOutput :: String + , optOutput :: Maybe String , optCc :: ProgOpt , optCxx :: ProgOpt , optCpp :: ProgOpt @@ -82,11 +82,11 @@ emptyFormatOpts = FormatOpts { formatOptInput = error "formatOpts: input" emptyOpts :: Opts emptyOpts = Opts - { optTriple = "" + { optTriple = Nothing , optTargetPrefix = Nothing , optLocallyExecutable = Nothing , optLlvmTriple = Nothing - , optOutput = "" + , optOutput = Nothing , optCc = po0 , optCxx = po0 , optCpp = po0 @@ -129,13 +129,13 @@ _optMergeObjs = Lens optMergeObjs (\x o -> o {optMergeObjs=x}) _optWindres = Lens optWindres (\x o -> o {optWindres=x}) _optLd = Lens optLd (\x o -> o {optLd= x}) -_optTriple :: Lens Opts String +_optTriple :: Lens Opts (Maybe String) _optTriple = Lens optTriple (\x o -> o {optTriple=x}) _optLlvmTriple :: Lens Opts (Maybe String) _optLlvmTriple = Lens optLlvmTriple (\x o -> o {optLlvmTriple=x}) -_optOutput :: Lens Opts String +_optOutput :: Lens Opts (Maybe String) _optOutput = Lens optOutput (\x o -> o {optOutput=x}) _optTargetPrefix :: Lens Opts (Maybe String) @@ -213,7 +213,7 @@ options = , Option [] ["disable-" ++ optName] (NoArg (set lens (Just False))) ("Disable " ++ description) ] - tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple) "TRIPLE") "Target triple" + tripleOpt = Option ['t'] ["triple"] (ReqArg (set _optTriple . Just) "TRIPLE") "Target triple" llvmTripleOpt = Option [] ["llvm-triple"] (ReqArg (set _optLlvmTriple . Just) "LLVM-TRIPLE") "LLVM Target triple" targetPrefixOpt = Option ['T'] ["target-prefix"] (ReqArg (set _optTargetPrefix . Just) "PREFIX") @@ -233,7 +233,7 @@ options = keepTempOpt = Option [] ["keep-temp"] (NoArg (set _optKeepTemp True)) "do not remove temporary files" - outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput) "OUTPUT") + outputOpt = Option ['o'] ["output"] (ReqArg (set _optOutput . Just) "OUTPUT") "The output path for the generated target toolchain configuration" formatOpts :: [OptDescr (FormatOpts -> FormatOpts)] @@ -244,6 +244,16 @@ formatOpts = [ "The target file to format") ] +validateOpts :: Opts -> [String] +validateOpts opts = mconcat + [ assertJust _optTriple "missing --triple flag" + , assertJust _optOutput "missing --output flag" + ] + where + assertJust :: Lens Opts (Maybe a) -> String -> [String] + assertJust lens msg = + [ msg | Nothing <- pure $ view lens opts ] + main :: IO () main = do argv <- getArgs @@ -273,14 +283,14 @@ doFormat args = do doConfigure :: [String] -> IO () doConfigure args = do - let (opts0, _nonopts, errs) = getOpt RequireOrder options args + let (opts0, _nonopts, parseErrs) = getOpt RequireOrder options args let opts = foldr (.) id opts0 emptyOpts - case errs of + case parseErrs ++ validateOpts opts of [] -> do let env = Env { verbosity = optVerbosity opts , targetPrefix = case optTargetPrefix opts of Just prefix -> Just prefix - Nothing -> Just $ optTriple opts ++ "-" + Nothing -> Just $ fromMaybe (error "undefined triple") (optTriple opts) ++ "-" , keepTemp = optKeepTemp opts , canLocallyExecute = fromMaybe True (optLocallyExecutable opts) , logContexts = [] @@ -289,7 +299,7 @@ doConfigure args = do case r of Left err -> print err >> exitWith (ExitFailure 2) Right () -> return () - _ -> do + errs -> do mapM_ putStrLn errs putStrLn $ usageInfo "ghc-toolchain" options exitWith (ExitFailure 1) @@ -298,7 +308,7 @@ run :: Opts -> M () run opts = do tgt <- mkTarget opts logDebug $ "Final Target: " ++ show tgt - let file = optOutput opts + let file = fromMaybe (error "undefined --output") (optOutput opts) writeFile file (show tgt) optional :: M a -> M (Maybe a) @@ -390,7 +400,7 @@ ldOverrideWhitelist a = mkTarget :: Opts -> M Target mkTarget opts = do - normalised_triple <- normaliseTriple (optTriple opts) + normalised_triple <- normaliseTriple (fromMaybe (error "missing --triple") (optTriple opts)) -- Use Llvm target if specified, otherwise use triple as llvm target let tgtLlvmTarget = fromMaybe normalised_triple (optLlvmTriple opts) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/76bc29cfd7e9afa19eb8b48453d08872e5bf5f3f...6b1c6b958a3791d1c584d968034fbe4883124772 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/76bc29cfd7e9afa19eb8b48453d08872e5bf5f3f...6b1c6b958a3791d1c584d968034fbe4883124772 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 17:44:16 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Wed, 27 Nov 2024 12:44:16 -0500 Subject: [Git][ghc/ghc][wip/T24359] Capture bound tyvars of rules in zonker Message-ID: <67475a70220c6_3e071c117525411109e@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 17c7320d by Simon Peyton Jones at 2024-11-27T17:42:18+00:00 Capture bound tyvars of rules in zonker - - - - - 4 changed files: - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Zonk/Env.hs - compiler/GHC/Tc/Zonk/Type.hs Changes: ===================================== compiler/GHC/Runtime/Eval.hs ===================================== @@ -135,6 +135,7 @@ import Control.Monad import Control.Monad.Catch as MC import Data.Array import Data.Dynamic +import Data.IORef( newIORef ) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.List (find,intercalate) @@ -1072,8 +1073,10 @@ parseInstanceHead str = withSession $ \hsc_env0 -> do (ty, _) <- liftIO $ runInteractiveHsc hsc_env0 $ do hsc_env <- getHscEnv ty <- hscParseType str - ioMsgMaybe $ hoistTcRnMessage $ tcRnType hsc_env SkolemiseFlexi True ty - + skol_tv_ref <- liftIO (newIORef []) + ioMsgMaybe $ hoistTcRnMessage $ + tcRnType hsc_env (SkolemiseFlexi skol_tv_ref) True ty + -- I'm not sure what to do about those zonked skolems return ty -- Get all the constraints required of a dictionary binding ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -957,57 +957,6 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) , spe_call = lhs_call , spe_inl = inl }] } -{- - -- Solve unification constraints - -- c.f. Note [The SimplifyRule Plan] step 1 - ; cloned_wanted <- cloneWC wanted -- See Note [Simplify cloned constraints] - ; _ <- setTcLevel tc_lvl $ runTcS $ solveWanteds cloned_wanted - - -- Apply the unifications - -- c.f. Note [The SimplifyRule Plan] step 2 - ; wanted <- liftZonkM $ zonkWC wanted - ; seed_tys <- liftZonkM (mapM zonkTcType (rho : map idType id_bndrs)) - - -- Quantify - ; let (quant_cts, residual_wanted) = getRuleQuantCts wanted - quant_preds = ctsPreds quant_cts - ; dvs <- candidateQTyVarsOfTypes (quant_preds ++ seed_tys) - ; let grown_tcvs = growThetaTyVars quant_preds (tyCoVarsOfTypes seed_tys) - weeded_dvs = weedOutCandidates (`dVarSetIntersectVarSet` grown_tcvs) dvs - ; qtkvs <- quantifyTyVars skol_info DefaultNonStandardTyVars weeded_dvs - - -- Left hand side of the RULE - ; lhs_evs <- mk_quant_evs quant_cts - ; (implic1, lhs_binds) <- buildImplicationFor tc_lvl skol_info_anon - qtkvs lhs_evs residual_wanted - - -- rhs_binds uses rhs_evs to build `wanted` (NB not just `residual_wanted`) - ; rhs_evs <- mapM newEvVar quant_preds - ; (implic2, rhs_binds) <- buildImplicationFor tc_lvl skol_info_anon - qtkvs rhs_evs - (emptyWC { wc_simple = quant_cts }) - - ; emitImplications (implic1 `unionBags` implic2) - - ; traceTc "tcSpecPrag:SpecSigE" $ - vcat [ text "nm:" <+> ppr nm - , text "bndrs:" <+> ppr bndrs - , text "spec_e:" <+> ppr spec_e - , text "tv/id bndrs:" <+> ppr qtkvs <+> ppr id_bndrs - , text "lhs_evs:" <+> ppr lhs_evs - , text "rhs_evs:" <+> ppr rhs_evs - , text "spec_e:" <+> ppr spec_e' - , text "inl:" <+> ppr inl ] - ; return [SpecPragE { spe_poly_id = poly_id - , spe_tv_bndrs = qtkvs - , spe_id_bndrs = id_bndrs - , spe_lhs_ev_bndrs = lhs_evs - , spe_lhs_binds = lhs_binds - , spe_lhs_call = spec_e' - , spe_rhs_ev_bndrs = rhs_evs - , spe_rhs_binds = rhs_binds - , spe_inl = inl }] } --} tcSpecPrag _ prag = pprPanic "tcSpecPrag" (ppr prag) -------------- ===================================== compiler/GHC/Tc/Zonk/Env.hs ===================================== @@ -61,10 +61,14 @@ data ZonkEnv -- -- See Note [Un-unified unification variables] data ZonkFlexi - = DefaultFlexi -- ^ Default unbound unification variables to Any - | SkolemiseFlexi -- ^ Skolemise unbound unification variables - -- See Note [Zonking the LHS of a RULE] + = DefaultFlexi -- ^ Default unbound unification variables to Any + + | SkolemiseFlexi -- ^ Skolemise unbound unification variables + (IORef [TyVar]) -- See Note [Zonking the LHS of a RULE] + -- Records the tyvars thus skolemised + | RuntimeUnkFlexi -- ^ Used in the GHCi debugger + | NoFlexi -- ^ Panic on unfilled meta-variables -- See Note [Error on unconstrained meta-variables] -- in GHC.Tc.Utils.TcMType ===================================== compiler/GHC/Tc/Zonk/Type.hs ===================================== @@ -380,7 +380,7 @@ zonkTyVarBinderX (Bndr tv vis) zonkTyVarOcc :: HasDebugCallStack => TcTyVar -> ZonkTcM Type zonkTyVarOcc tv - = do { ZonkEnv { ze_tv_env = tv_env } <- getZonkEnv + = do { ZonkEnv { ze_tv_env = tv_env, ze_flexi = zonk_flexi } <- getZonkEnv ; let lookup_in_tv_env -- Look up in the env just as we do for Ids = case lookupVarEnv tv_env tv of @@ -394,7 +394,7 @@ zonkTyVarOcc tv zonk_meta ref Flexi = do { kind <- zonkTcTypeToTypeX (tyVarKind tv) - ; ty <- commitFlexi tv kind + ; ty <- lift $ commitFlexi zonk_flexi tv kind ; lift $ liftZonkM $ writeMetaTyVarRef tv ref ty -- Belt and braces ; finish_meta ty } @@ -442,50 +442,47 @@ lookupTyVarX tv Nothing -> pprPanic "lookupTyVarOcc" (ppr tv $$ ppr tv_env) ; return res } -commitFlexi :: TcTyVar -> Kind -> ZonkTcM Type -commitFlexi tv zonked_kind - = do { flexi <- ze_flexi <$> getZonkEnv - ; lift $ case flexi of - SkolemiseFlexi -> return (mkTyVarTy (mkTyVar name zonked_kind)) - - DefaultFlexi - -- Normally, RuntimeRep variables are defaulted in GHC.Tc.Utils.TcMType.defaultTyVar - -- But that sees only type variables that appear in, say, an inferred type. - -- Defaulting here, in the zonker, is needed to catch e.g. - -- y :: Bool - -- y = (\x -> True) undefined - -- We need *some* known RuntimeRep for the x and undefined, but no one - -- will choose it until we get here, in the zonker. - | isRuntimeRepTy zonked_kind - -> do { traceTc "Defaulting flexi tyvar to LiftedRep:" (pprTyVar tv) - ; return liftedRepTy } - | isLevityTy zonked_kind - -> do { traceTc "Defaulting flexi tyvar to Lifted:" (pprTyVar tv) - ; return liftedDataConTy } - | isMultiplicityTy zonked_kind - -> do { traceTc "Defaulting flexi tyvar to Many:" (pprTyVar tv) - ; return manyDataConTy } - | Just (ConcreteFRR origin) <- isConcreteTyVar_maybe tv - -> do { addErr $ TcRnZonkerMessage (ZonkerCannotDefaultConcrete origin) - ; return (anyTypeOfKind zonked_kind) } - | otherwise - -> do { traceTc "Defaulting flexi tyvar to ZonkAny:" (pprTyVar tv) - -- See Note [Any types] in GHC.Builtin.Types, esp wrinkle (Any4) - ; newZonkAnyType zonked_kind } - - RuntimeUnkFlexi - -> do { traceTc "Defaulting flexi tyvar to RuntimeUnk:" (pprTyVar tv) - ; return (mkTyVarTy (mkTcTyVar name zonked_kind RuntimeUnk)) } - -- This is where RuntimeUnks are born: - -- otherwise-unconstrained unification variables are - -- turned into RuntimeUnks as they leave the - -- typechecker's monad - - NoFlexi -> pprPanic "NoFlexi" (ppr tv <+> dcolon <+> ppr zonked_kind) } - - where - name = tyVarName tv - +commitFlexi :: ZonkFlexi -> TcTyVar -> Kind -> TcM Type +commitFlexi NoFlexi tv zonked_kind + = pprPanic "NoFlexi" (ppr tv <+> dcolon <+> ppr zonked_kind) + +commitFlexi (SkolemiseFlexi tvs_ref) tv zonked_kind + = do { let skol_tv = mkTyVar (tyVarName tv) zonked_kind + ; updTcRef tvs_ref (skol_tv :) + ; return (mkTyVarTy skol_tv) } + +commitFlexi RuntimeUnkFlexi tv zonked_kind + = do { traceTc "Defaulting flexi tyvar to RuntimeUnk:" (pprTyVar tv) + ; return (mkTyVarTy (mkTcTyVar (tyVarName tv) zonked_kind RuntimeUnk)) } + -- This is where RuntimeUnks are born: + -- otherwise-unconstrained unification variables are + -- turned into RuntimeUnks as they leave the + -- typechecker's monad + +commitFlexi DefaultFlexi tv zonked_kind + -- Normally, RuntimeRep variables are defaulted in GHC.Tc.Utils.TcMType.defaultTyVar + -- But that sees only type variables that appear in, say, an inferred type. + -- Defaulting here, in the zonker, is needed to catch e.g. + -- y :: Bool + -- y = (\x -> True) undefined + -- We need *some* known RuntimeRep for the x and undefined, but no one + -- will choose it until we get here, in the zonker. + | isRuntimeRepTy zonked_kind + = do { traceTc "Defaulting flexi tyvar to LiftedRep:" (pprTyVar tv) + ; return liftedRepTy } + | isLevityTy zonked_kind + = do { traceTc "Defaulting flexi tyvar to Lifted:" (pprTyVar tv) + ; return liftedDataConTy } + | isMultiplicityTy zonked_kind + = do { traceTc "Defaulting flexi tyvar to Many:" (pprTyVar tv) + ; return manyDataConTy } + | Just (ConcreteFRR origin) <- isConcreteTyVar_maybe tv + = do { addErr $ TcRnZonkerMessage (ZonkerCannotDefaultConcrete origin) + ; return (anyTypeOfKind zonked_kind) } + | otherwise + = do { traceTc "Defaulting flexi tyvar to ZonkAny:" (pprTyVar tv) + -- See Note [Any types] in GHC.Builtin.Types, esp wrinkle (Any4) + ; newZonkAnyType zonked_kind } zonkCoVarOcc :: CoVar -> ZonkTcM Coercion zonkCoVarOcc cv @@ -858,22 +855,25 @@ zonkLTcSpecPrags ps ; id' <- zonkIdOcc id ; return (L loc (SpecPrag id' co_fn' inl)) } zonk_prag (L loc (SpecPragE { spe_poly_id = poly_id - , spe_tv_bndrs = tv_bndrs, spe_id_bndrs = id_bndrs + , spe_tv_bndrs = tv_bndrs + , spe_id_bndrs = id_bndrs , spe_ev_bndrs = lhs_evs , spe_call = spec_e , spe_inl = inl })) - = setZonkType SkolemiseFlexi $ - runZonkBndrT (zonkCoreBndrsX tv_bndrs) $ \tv_bndrs' -> - runZonkBndrT (zonkCoreBndrsX id_bndrs) $ \id_bndrs' -> - runZonkBndrT (zonkCoreBndrsX lhs_evs) $ \lhs_evs' -> - do { poly_id' <- zonkIdOcc poly_id -- Does not need to be under all these binders, but no harm - ; spec_e' <- zonkLExpr spec_e - ; return (L loc (SpecPragE { spe_poly_id = poly_id' - , spe_tv_bndrs = tv_bndrs' - , spe_id_bndrs = id_bndrs' - , spe_ev_bndrs = lhs_evs' - , spe_call = spec_e' - , spe_inl = inl })) } + = do { skol_tvs_ref <- lift $ newTcRef [] + ; setZonkType (SkolemiseFlexi skol_tvs_ref) $ + runZonkBndrT (zonkCoreBndrsX tv_bndrs) $ \tv_bndrs' -> + runZonkBndrT (zonkCoreBndrsX id_bndrs) $ \id_bndrs' -> + runZonkBndrT (zonkCoreBndrsX lhs_evs) $ \lhs_evs' -> + do { poly_id' <- zonkIdOcc poly_id -- Does not need to be under all these binders, but no harm + ; spec_e' <- zonkLExpr spec_e + ; skol_tvs <- lift $ readTcRef skol_tvs_ref + ; return (L loc (SpecPragE { spe_poly_id = poly_id' + , spe_tv_bndrs = skol_tvs ++ tv_bndrs' + , spe_id_bndrs = id_bndrs' + , spe_ev_bndrs = lhs_evs' + , spe_call = spec_e' + , spe_inl = inl })) } } {- ************************************************************************ @@ -1690,13 +1690,20 @@ zonkRule :: RuleDecl GhcTc -> ZonkTcM (RuleDecl GhcTc) zonkRule rule@(HsRule { rd_bndrs = bndrs , rd_lhs = lhs , rd_rhs = rhs }) - = zonkRuleBndrs bndrs $ \ new_bndrs -> - do { -- See Note [Zonking the LHS of a RULE] - ; new_lhs <- setZonkType SkolemiseFlexi $ zonkLExpr lhs - ; new_rhs <- zonkLExpr rhs - ; return $ rule { rd_bndrs = new_bndrs - , rd_lhs = new_lhs - , rd_rhs = new_rhs } } + = do { skol_tvs_ref <- lift $ newTcRef [] + ; setZonkType (SkolemiseFlexi skol_tvs_ref) $ + zonkRuleBndrs bndrs $ \ new_bndrs -> + do { -- See Note [Zonking the LHS of a RULE] + ; new_lhs <- zonkLExpr lhs + ; skol_tvs <- lift $ readTcRef skol_tvs_ref + ; new_rhs <- setZonkType DefaultFlexi $ zonkLExpr rhs + ; return $ rule { rd_bndrs = add_tvs skol_tvs new_bndrs + , rd_lhs = new_lhs + , rd_rhs = new_rhs } } } + where + add_tvs :: [TyVar] -> RuleBndrs GhcTc -> RuleBndrs GhcTc + add_tvs tvs rbs@(RuleBndrs { rb_tmvs = bndrs }) + = rbs { rb_tmvs = map (noLocA . RuleBndr noAnn . noLocA) tvs ++ bndrs } zonkRuleBndrs :: RuleBndrs GhcTc -> (RuleBndrs GhcTc -> ZonkTcM a) -> ZonkTcM a View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/17c7320d8479bdff67051ce27a46957dfa2c1824 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/17c7320d8479bdff67051ce27a46957dfa2c1824 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 18:15:26 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Wed, 27 Nov 2024 13:15:26 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-rc1] Bump ghc-prim and template-haskell versions Message-ID: <674761be58cb6_3e071c13601181165a@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-rc1 at Glasgow Haskell Compiler / GHC Commits: b4ea3a38 by Zubin Duggal at 2024-11-27T23:44:51+05:30 Bump ghc-prim and template-haskell versions - - - - - 7 changed files: - libraries/exceptions - libraries/ghc-bignum/ghc-bignum.cabal - libraries/ghc-compact/ghc-compact.cabal - libraries/ghc-experimental/ghc-experimental.cabal.in - libraries/ghc-prim/ghc-prim.cabal - libraries/template-haskell/template-haskell.cabal.in - libraries/text Changes: ===================================== libraries/exceptions ===================================== @@ -1 +1 @@ -Subproject commit 0b6abb3ac433c7d1d5c6f6a5a45b37f7c486e33b +Subproject commit 8e55b720f45db91f4895f710863ef9dbc10fe569 ===================================== libraries/ghc-bignum/ghc-bignum.cabal ===================================== @@ -77,7 +77,7 @@ library ForeignFunctionInterface build-depends: - ghc-prim >= 0.5.1.0 && < 0.12 + ghc-prim >= 0.5.1.0 && < 0.14 hs-source-dirs: src/ include-dirs: include/ ===================================== libraries/ghc-compact/ghc-compact.cabal ===================================== @@ -39,7 +39,7 @@ library UnboxedTuples CPP - build-depends: ghc-prim >= 0.5.3 && < 0.12, + build-depends: ghc-prim >= 0.5.3 && < 0.14, base >= 4.9.0 && < 4.22, bytestring >= 0.10.6.0 && <0.13 ghc-options: -Wall ===================================== libraries/ghc-experimental/ghc-experimental.cabal.in ===================================== @@ -41,6 +41,6 @@ library other-extensions: build-depends: base >=4.20 && < 4.22, ghc-internal == @ProjectVersionForLib at .*, - ghc-prim >= 0.11 && < 0.12 + ghc-prim >= 0.11 && < 0.14 hs-source-dirs: src default-language: Haskell2010 ===================================== libraries/ghc-prim/ghc-prim.cabal ===================================== @@ -1,6 +1,6 @@ cabal-version: 2.2 name: ghc-prim -version: 0.11.0 +version: 0.13.0 -- NOTE: Don't forget to update ./changelog.md license: BSD-3-Clause license-file: LICENSE ===================================== libraries/template-haskell/template-haskell.cabal.in ===================================== @@ -3,7 +3,7 @@ -- template-haskell.cabal. name: template-haskell -version: 2.22.1.0 +version: 2.23.0.0 -- NOTE: Don't forget to update ./changelog.md license: BSD3 license-file: LICENSE ===================================== libraries/text ===================================== @@ -1 +1 @@ -Subproject commit ee0a8f8b9a4bd3fdad23e9ac0db56e7f08ce35cd +Subproject commit b86564cae8d7262c7c4e7afe7a9163c83de3f175 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b4ea3a38d20f7656f2b15cbe6bebd6535201b456 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b4ea3a38d20f7656f2b15cbe6bebd6535201b456 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 22:38:56 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Wed, 27 Nov 2024 17:38:56 -0500 Subject: [Git][ghc/ghc][wip/T24359] Some refactoring Message-ID: <67479f80cf94f_bd5398a5da4101175@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 766facaa by Simon Peyton Jones at 2024-11-27T22:36:56+00:00 Some refactoring Move scopedSort to GHC.Core.Predicate, so that it can call isEvVar - - - - - 30 changed files: - compiler/GHC/Builtin/PrimOps/Ids.hs - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Predicate.hs - compiler/GHC/Core/Tidy.hs - compiler/GHC/Core/TyCo/FVs.hs - compiler/GHC/Core/TyCo/Ppr.hs - compiler/GHC/Core/TyCo/Tidy.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Type.hs-boot - compiler/GHC/Core/Unify.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/HsToCore/Foreign/Call.hs - compiler/GHC/Iface/Decl.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Rename/Names.hs - compiler/GHC/Runtime/Debugger.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Runtime/Heap/Inspect.hs - compiler/GHC/StgToByteCode.hs - compiler/GHC/Tc/Deriv.hs - compiler/GHC/Tc/Errors.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Gen/Bind.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Tc/Solver/Default.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/766facaa7ecd24b16548a625618db7e11f7e9620 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/766facaa7ecd24b16548a625618db7e11f7e9620 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Wed Nov 27 23:34:13 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Wed, 27 Nov 2024 18:34:13 -0500 Subject: [Git][ghc/ghc][wip/T24359] Wibble scopedSort Message-ID: <6747ac7513c9f_389958122c80668e0@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: facbd5cd by Simon Peyton Jones at 2024-11-27T23:33:56+00:00 Wibble scopedSort - - - - - 1 changed file: - compiler/GHC/Core/Predicate.hs Changes: ===================================== compiler/GHC/Core/Predicate.hs ===================================== @@ -594,7 +594,7 @@ scopedSort = go [] [] insert v [] [] = ([v], [tyCoVarsOfType (varType v)]) insert v (a:as) (fvs:fvss) | (isTyVar v && isId a) || -- TyVars precede Ids - (isEvVar v && not (isEvVar a)) || -- DictIds precede non-DictIds + (isEvVar v && isId a && not (isEvVar a)) || -- DictIds precede non-DictIds (v `elemVarSet` fvs) -- (a) put Ids after TyVars, and (b) respect dependencies , (as', fvss') <- insert v as fvss View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/facbd5cdf67e34810505a2a5c131c82418ee95ff -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/facbd5cdf67e34810505a2a5c131c82418ee95ff You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 04:44:50 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 23:44:50 -0500 Subject: [Git][ghc/ghc][master] Add checkExact to toolTargets Message-ID: <6747f54221384_1c2b029470f058228@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: a362b943 by sheaf at 2024-11-27T23:44:28-05:00 Add checkExact to toolTargets This change means that the Hadrian multi target will include exactprint. In particular, this means that HLS will work on exactprint inside the GHC tree. - - - - - 1 changed file: - hadrian/src/Rules/ToolArgs.hs Changes: ===================================== hadrian/src/Rules/ToolArgs.hs ===================================== @@ -146,6 +146,7 @@ mkToolTarget es p = do toolTargets :: [Package] toolTargets = [ cabalSyntax , cabal + , checkExact , compiler , directory , process View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a362b9434da723cc8e5b75f0f2df38155d2183a5 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a362b9434da723cc8e5b75f0f2df38155d2183a5 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 04:45:45 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Wed, 27 Nov 2024 23:45:45 -0500 Subject: [Git][ghc/ghc][master] 2 commits: Add test for #25428 Message-ID: <6747f579dc891_1c2b02ad8914629cf@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: e6c957e4 by Arnaud Spiwack at 2024-11-27T23:45:09-05:00 Add test for #25428 - - - - - 52d97f4e by Arnaud Spiwack at 2024-11-27T23:45:09-05:00 Don't bypass MonoLocalBind in empty patterns Fixes #25428 - - - - - 4 changed files: - compiler/GHC/Driver/Flags.hs - compiler/GHC/Tc/Gen/Bind.hs - + testsuite/tests/linear/should_compile/T25428.hs - testsuite/tests/linear/should_compile/all.T Changes: ===================================== compiler/GHC/Driver/Flags.hs ===================================== @@ -347,7 +347,7 @@ impliedXFlags , (LangExt.UnliftedDatatypes, On LangExt.DataKinds) , (LangExt.UnliftedDatatypes, On LangExt.StandaloneKindSignatures) - -- See Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind + -- See (NVP3) in Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind , (LangExt.LinearTypes, On LangExt.MonoLocalBinds) ] ===================================== compiler/GHC/Tc/Gen/Bind.hs ===================================== @@ -682,7 +682,6 @@ it's all cool; each signature has distinct type variables from the renamer.) {- Note [Non-variable pattern bindings aren't linear] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - A fundamental limitation of the typechecking algorithm is that we cannot have a binding which, at the same time, - is linear in its rhs @@ -694,17 +693,35 @@ https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0111-linear To address this we to do a few things -- When a pattern is annotated with a multiplicity annotation `let %q pat = rhs +- (NVP1) When a pattern is annotated with a multiplicity annotation `let %q pat = rhs in body` (note: multiplicity-annotated bindings are always parsed as a PatBind, see Note [Multiplicity annotations] in Language.Haskell.Syntax.Binds), - then the let is never generalised (we use the NoGen plan). -- Whenever the typechecker infers an AbsBind *and* the inner binding is a + then the let is never generalised (we use the NoGen plan). We do this with a + dedicated test in decideGeneralisationPlan. +- (NVP2) Whenever the typechecker infers an AbsBind *and* the inner binding is a non-variable PatBind, then the multiplicity of the binding is inferred to be - Many. This is a little infelicitous: sometimes the typechecker infers an - AbsBind where it didn't need to. This may cause some programs to be spuriously - rejected, when NoMonoLocalBinds is on. -- LinearLet implies MonoLocalBinds to avoid the AbsBind case altogether. - + Many. We do this by calling manyIfPats in tcPolyInfer. This is a little + infelicitous: sometimes the typechecker infers an AbsBind where it didn't need + to. This may cause some programs to be spuriously rejected, when + NoMonoLocalBinds is on. +- (NVP3) LinearLet implies MonoLocalBinds to avoid the AbsBind case altogether. +- (NVP4) Wrinkle: even when other conditions (including MonoLocalBinds), GHC + will generalise some binders, namely so-called closed binding groups. We need + to make sure that the test for (NVP1) has priority over the test for closed + binders. +- (NVP5) Wrinkle: Closed binding groups (NVP4) are usually fine to type with + multiplicity Many. But there's one exception: when there's no binder at all, + the binding group is considered closed. Even if the rhs contains arbitrary + variables. + + f :: () %1 -> Bool + f x = let !() = x in True + + If we consider `!() = x` as a generalisable group (which does nothing anyway), + then (NVP2) will infer the pattern as multiplicity Many, and reject the + function. We don't want that, see also #25428. So we take care not to + generalise in this case, by excluding the no-binder case from automatic + generalisation in decideGeneralisationPlan. -} tcPolyInfer @@ -722,7 +739,7 @@ tcPolyInfer top_lvl rec_tc prag_fn tc_sig_fn bind_list ; apply_mr <- checkMonomorphismRestriction mono_infos bind_list -- AbsBinds which are PatBinds can't be linear. - -- See Note [Non-variable pattern bindings aren't linear] + -- See (NVP2) in Note [Non-variable pattern bindings aren't linear] ; manyIfPats binds' ; traceTc "tcPolyInfer" (ppr apply_mr $$ ppr (map mbi_sig mono_infos)) @@ -1826,12 +1843,17 @@ decideGeneralisationPlan dflags top_lvl closed sig_fn lbinds -- See Note [Always generalise top-level bindings] | has_mult_anns_and_pats = False - -- See Note [Non-variable pattern bindings aren't linear] + -- See (NVP1) and (NVP4) in Note [Non-variable pattern bindings aren't linear] - | IsGroupClosed _ True <- closed = True + | IsGroupClosed _ True <- closed + , not (null binders) = True -- The 'True' means that all of the group's -- free vars have ClosedTypeId=True; so we can ignore - -- -XMonoLocalBinds, and generalise anyway + -- -XMonoLocalBinds, and generalise anyway. + -- Except if 'fv' is empty: there is no binder to generalise, so + -- generalising does nothing. And trying to generalise hurts linear + -- types (see #25428). So we don't force it. + -- See (NVP5) in Note [Non-variable pattern bindings aren't linear] in GHC.Tc.Gen.Bind. | has_partial_sigs = True -- See Note [Partial type signatures and generalisation] ===================================== testsuite/tests/linear/should_compile/T25428.hs ===================================== @@ -0,0 +1,6 @@ +{-# language LinearTypes #-} + +module T25428 where + +f :: () %1 -> Int +f x = let !() = x in 0 ===================================== testsuite/tests/linear/should_compile/all.T ===================================== @@ -48,3 +48,4 @@ test('LinearLetPoly', normal, compile, ['']) test('LinearListComprehension', normal, compile, ['-dlinear-core-lint']) test('OmitFieldPat', normal, compile, ['-dcore-lint']) test('T25515', normal, compile, ['-dcore-lint']) +test('T25428', normal, compile, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a362b9434da723cc8e5b75f0f2df38155d2183a5...52d97f4ecd37bf598560dbded2d50649db5cfe1d -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a362b9434da723cc8e5b75f0f2df38155d2183a5...52d97f4ecd37bf598560dbded2d50649db5cfe1d You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 05:16:39 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 28 Nov 2024 00:16:39 -0500 Subject: [Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: Add checkExact to toolTargets Message-ID: <6747fcb7cda6d_1c2b02dd453c663fa@gitlab.mail> Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: a362b943 by sheaf at 2024-11-27T23:44:28-05:00 Add checkExact to toolTargets This change means that the Hadrian multi target will include exactprint. In particular, this means that HLS will work on exactprint inside the GHC tree. - - - - - e6c957e4 by Arnaud Spiwack at 2024-11-27T23:45:09-05:00 Add test for #25428 - - - - - 52d97f4e by Arnaud Spiwack at 2024-11-27T23:45:09-05:00 Don't bypass MonoLocalBind in empty patterns Fixes #25428 - - - - - c63fb951 by Ben Gamari at 2024-11-28T00:16:32-05:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Also includes necessary Hadrian bootstrap plan bump. Fixes #24382. - - - - - 3a986d1f by Adam Sandberg Ericsson at 2024-11-28T00:16:32-05:00 mention -Iw in +RTS -? - - - - - 26e60bb4 by Ben Gamari at 2024-11-28T00:16:32-05:00 gitlab-ci: Set GIT_SUBMODULE_FORCE_HTTPS GitLab recommends using `https://` to clone submodules and provides the `GIT_SUBMODULE_FORCE_HTTPS` variable to force this. Fixes #25528. - - - - - 8 changed files: - .gitlab-ci.yml - .gitlab/ci.sh - compiler/GHC/Driver/Flags.hs - compiler/GHC/Tc/Gen/Bind.hs - hadrian/bootstrap/plan-9_10_1.json - hadrian/bootstrap/plan-9_6_1.json - hadrian/bootstrap/plan-9_6_2.json - hadrian/bootstrap/plan-9_6_3.json The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6b1c6b958a3791d1c584d968034fbe4883124772...26e60bb43e0db3d129bceb328935dafa621655d8 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6b1c6b958a3791d1c584d968034fbe4883124772...26e60bb43e0db3d129bceb328935dafa621655d8 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 08:06:44 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Thu, 28 Nov 2024 03:06:44 -0500 Subject: [Git][ghc/ghc][wip/T24359] Import wibble Message-ID: <67482494cc95a_59fdd5410dc3995a@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: b1168631 by Simon Peyton Jones at 2024-11-28T08:06:30+00:00 Import wibble - - - - - 1 changed file: - compiler/GHC/Rename/Names.hs Changes: ===================================== compiler/GHC/Rename/Names.hs ===================================== @@ -54,7 +54,6 @@ import GHC.Iface.Load ( loadSrcInterface ) import GHC.Iface.Syntax ( IfaceDefault, fromIfaceWarnings ) import GHC.Builtin.Names import GHC.Parser.PostProcess ( setRdrNameSpace ) -import GHC.Core.Type import GHC.Core.TyCo.Tidy import GHC.Core.PatSyn import GHC.Core.TyCon ( TyCon, tyConName ) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b1168631c411276aa62f8a686fa4f927a995af8c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b1168631c411276aa62f8a686fa4f927a995af8c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 09:01:22 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Thu, 28 Nov 2024 04:01:22 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-rc1] Bump ghc-prim and template-haskell versions Message-ID: <67483162a007a_59fdd8d42584564c@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-rc1 at Glasgow Haskell Compiler / GHC Commits: 6fc1fa3b by Zubin Duggal at 2024-11-28T14:31:01+05:30 Bump ghc-prim and template-haskell versions - - - - - 11 changed files: - ghc/ghc-bin.cabal.in - libraries/exceptions - libraries/ghc-bignum/ghc-bignum.cabal - libraries/ghc-compact/ghc-compact.cabal - libraries/ghc-experimental/ghc-experimental.cabal.in - libraries/ghc-heap/ghc-heap.cabal.in - libraries/ghc-internal/ghc-internal.cabal.in - libraries/ghc-prim/ghc-prim.cabal - libraries/ghci/ghci.cabal.in - libraries/template-haskell/template-haskell.cabal.in - libraries/text Changes: ===================================== ghc/ghc-bin.cabal.in ===================================== @@ -57,7 +57,7 @@ Executable ghc -- NB: this is never built by the bootstrapping GHC+libraries Build-depends: deepseq >= 1.4 && < 1.6, - ghc-prim >= 0.5.0 && < 0.12, + ghc-prim >= 0.5.0 && < 0.14, ghci == @ProjectVersionMunged@, haskeline == 0.8.*, exceptions == 0.10.*, ===================================== libraries/exceptions ===================================== @@ -1 +1 @@ -Subproject commit 0b6abb3ac433c7d1d5c6f6a5a45b37f7c486e33b +Subproject commit 8e55b720f45db91f4895f710863ef9dbc10fe569 ===================================== libraries/ghc-bignum/ghc-bignum.cabal ===================================== @@ -77,7 +77,7 @@ library ForeignFunctionInterface build-depends: - ghc-prim >= 0.5.1.0 && < 0.12 + ghc-prim >= 0.5.1.0 && < 0.14 hs-source-dirs: src/ include-dirs: include/ ===================================== libraries/ghc-compact/ghc-compact.cabal ===================================== @@ -39,7 +39,7 @@ library UnboxedTuples CPP - build-depends: ghc-prim >= 0.5.3 && < 0.12, + build-depends: ghc-prim >= 0.5.3 && < 0.14, base >= 4.9.0 && < 4.22, bytestring >= 0.10.6.0 && <0.13 ghc-options: -Wall ===================================== libraries/ghc-experimental/ghc-experimental.cabal.in ===================================== @@ -41,6 +41,6 @@ library other-extensions: build-depends: base >=4.20 && < 4.22, ghc-internal == @ProjectVersionForLib at .*, - ghc-prim >= 0.11 && < 0.12 + ghc-prim >= 0.11 && < 0.14 hs-source-dirs: src default-language: Haskell2010 ===================================== libraries/ghc-heap/ghc-heap.cabal.in ===================================== @@ -23,7 +23,7 @@ library default-language: Haskell2010 build-depends: base >= 4.9.0 && < 5.0 - , ghc-prim > 0.2 && < 0.12 + , ghc-prim > 0.2 && < 0.14 , rts == 1.0.* , containers >= 0.6.2.1 && < 0.8 ===================================== libraries/ghc-internal/ghc-internal.cabal.in ===================================== @@ -91,7 +91,7 @@ Library build-depends: rts == 1.0.*, - ghc-prim >= 0.11 && < 0.12, + ghc-prim >= 0.11 && < 0.14, ghc-bignum >= 1.0 && < 2.0 exposed-modules: ===================================== libraries/ghc-prim/ghc-prim.cabal ===================================== @@ -1,6 +1,6 @@ cabal-version: 2.2 name: ghc-prim -version: 0.11.0 +version: 0.13.0 -- NOTE: Don't forget to update ./changelog.md license: BSD-3-Clause license-file: LICENSE ===================================== libraries/ghci/ghci.cabal.in ===================================== @@ -90,7 +90,7 @@ library -- ghc-internal instead of ignoring the deprecation warning in GHCi.TH -- and GHCi.CreateBCO when we require ghc-internal of the bootstrap -- compiler - ghc-prim >= 0.5.0 && < 0.12, + ghc-prim >= 0.5.0 && < 0.14, binary == 0.8.*, bytestring >= 0.10 && < 0.13, containers >= 0.5 && < 0.8, ===================================== libraries/template-haskell/template-haskell.cabal.in ===================================== @@ -3,7 +3,7 @@ -- template-haskell.cabal. name: template-haskell -version: 2.22.1.0 +version: 2.23.0.0 -- NOTE: Don't forget to update ./changelog.md license: BSD3 license-file: LICENSE ===================================== libraries/text ===================================== @@ -1 +1 @@ -Subproject commit ee0a8f8b9a4bd3fdad23e9ac0db56e7f08ce35cd +Subproject commit b86564cae8d7262c7c4e7afe7a9163c83de3f175 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6fc1fa3bdc8f53acdb19e47145789274060e498f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6fc1fa3bdc8f53acdb19e47145789274060e498f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 11:57:36 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Thu, 28 Nov 2024 06:57:36 -0500 Subject: [Git][ghc/ghc][wip/trace-foreign-calls-edsko] 4930 commits: [haddock @ 2002-04-04 16:23:43 by simonmar] Message-ID: <67485aaff0d69_59fdd10aa5185766a@gitlab.mail> Zubin pushed to branch wip/trace-foreign-calls-edsko at Glasgow Haskell Compiler / GHC Commits: 2b39cd94 by Simon Marlow at 2002-04-04T16:23:43+00:00 [haddock @ 2002-04-04 16:23:43 by simonmar] This is Haddock, my stab at a Haskell documentation tool. It's not quite ready for release yet, but I'm putting it in the repository so others can take a look. It uses a locally modified version of the hssource parser, extended with support for GHC extensions and documentation annotations. - - - - - 99ede94f by Simon Marlow at 2002-04-04T16:24:10+00:00 [haddock @ 2002-04-04 16:24:10 by simonmar] forgot one file - - - - - 8363294c by Simon Marlow at 2002-04-05T13:58:15+00:00 [haddock @ 2002-04-05 13:58:15 by simonmar] Remap names in the exported declarations to be "closer" to the current module. eg. if an exported declaration mentions a type 'T' which is imported from module A then re-exported from the current module, then links from the type or indeed the documentation will point to the current module rather than module A. This is to support better hiding: module A won't be referred to in the generated output. - - - - - 1570cbc1 by Simon Marlow at 2002-04-05T13:58:23+00:00 [haddock @ 2002-04-05 13:58:23 by simonmar] update the TODO list - - - - - 3a62f96b by Simon Marlow at 2002-04-05T14:11:51+00:00 [haddock @ 2002-04-05 14:11:51 by simonmar] Fix the anchor for a class declaration - - - - - c5d9a471 by Simon Marlow at 2002-04-05T14:18:41+00:00 [haddock @ 2002-04-05 14:18:41 by simonmar] remove underlines on visited links - - - - - 97280525 by Simon Marlow at 2002-04-05T16:11:47+00:00 [haddock @ 2002-04-05 16:11:47 by simonmar] - Update to generate more correct HTML. - Use our own non-overloaded table combinators, as the overloaded versions were giving me a headache. The improved type safety caught several errors in the HTML generation. - - - - - 9acd3a4d by Simon Marlow at 2002-04-05T16:32:19+00:00 [haddock @ 2002-04-05 16:32:19 by simonmar] Add width property to the title, and add TD.children for the module contents page. - - - - - ec9a0847 by Simon Marlow at 2002-04-08T16:39:56+00:00 [haddock @ 2002-04-08 16:39:56 by simonmar] Fix a problem with exports of the form T(..). - - - - - e4627dc8 by Simon Marlow at 2002-04-08T16:41:38+00:00 [haddock @ 2002-04-08 16:41:37 by simonmar] - Add our own versions of Html & BlockTable for the time being. - Add support for generating an index to the HTML backend - - - - - 2d73fd75 by Simon Marlow at 2002-04-09T11:23:24+00:00 [haddock @ 2002-04-09 11:23:24 by simonmar] Add '-- /' as a synonym for '-- |', for compatibility with IDoc. - - - - - 3675464e by Simon Marlow at 2002-04-09T11:33:55+00:00 [haddock @ 2002-04-09 11:33:54 by simonmar] - add the <...> syntax for marking up URLs in documentation - Make the output for data & class declarations more compact when there aren't any documentation annotations on the individual methods or constructors respectively. - - - - - 5077f5b1 by Simon Marlow at 2002-04-09T11:36:04+00:00 [haddock @ 2002-04-09 11:36:04 by simonmar] Update the TODO list - - - - - 9e83c54d by Simon Marlow at 2002-04-10T10:50:06+00:00 [haddock @ 2002-04-10 10:50:06 by simonmar] Use explicit 'px' suffix on pixel sizes; IE seems to prefer them - - - - - 052de51c by Simon Marlow at 2002-04-10T13:23:13+00:00 [haddock @ 2002-04-10 13:23:13 by simonmar] Lex URLs as a single token to avoid having to escape special characters inside the URL string. - - - - - 47187edb by Simon Marlow at 2002-04-10T13:23:55+00:00 [haddock @ 2002-04-10 13:23:55 by simonmar] Not sure why I made the constructor name for a record declaration into a TyCls name, but change it back into a Var name anyhow. - - - - - 3dc6aa81 by Simon Marlow at 2002-04-10T13:26:10+00:00 [haddock @ 2002-04-10 13:26:09 by simonmar] Lots of changes, including: - add index support to the HTML backend - clean up the renamer, put it into a monad - propogate unresolved names to the top level and report them in a nicer way - various bugfixes - - - - - c2a70a72 by Simon Marlow at 2002-04-10T13:32:39+00:00 [haddock @ 2002-04-10 13:32:39 by simonmar] Skeleton documentation - - - - - 50c98d17 by Simon Marlow at 2002-04-10T13:37:23+00:00 [haddock @ 2002-04-10 13:37:23 by simonmar] Update the TODO list, separate into pre-1.0 and post-1.0 items - - - - - f3778be6 by Simon Marlow at 2002-04-10T14:30:58+00:00 [haddock @ 2002-04-10 14:30:58 by simonmar] Add an introduction - - - - - cfbaf9f7 by Simon Marlow at 2002-04-10T14:59:51+00:00 [haddock @ 2002-04-10 14:59:51 by simonmar] Sort the module tree - - - - - 76bd7b34 by Simon Marlow at 2002-04-10T15:50:11+00:00 [haddock @ 2002-04-10 15:50:10 by simonmar] Generate a little table of contents at the top of the module doc (only if the module actually contains some section headings, though). - - - - - bb8560a1 by Simon Marlow at 2002-04-10T16:10:26+00:00 [haddock @ 2002-04-10 16:10:26 by simonmar] Now we understand (or at least don't barf on) type signatures in patterns such as you might find when scoped type variables are in use. - - - - - 86c2a026 by Simon Marlow at 2002-04-10T16:10:49+00:00 [haddock @ 2002-04-10 16:10:49 by simonmar] more updates - - - - - 1c052b0e by Simon Marlow at 2002-04-10T16:28:05+00:00 [haddock @ 2002-04-10 16:28:05 by simonmar] Parse errors in doc strings are now reported as warnings rather that causing the whole thing to fall over. It still needs cleaning up (the warning is emitted with trace) but this will do for the time being. - - - - - ace03e8f by Simon Marlow at 2002-04-10T16:38:03+00:00 [haddock @ 2002-04-10 16:38:03 by simonmar] update again - - - - - 69006c3e by Simon Marlow at 2002-04-11T13:38:02+00:00 [haddock @ 2002-04-11 13:38:02 by simonmar] mention Opera - - - - - fe9b10f8 by Simon Marlow at 2002-04-11T13:40:31+00:00 [haddock @ 2002-04-11 13:40:30 by simonmar] - copy haddock.css into the same place as the generated HTML - new option: --css <file> specifies the style sheet to use - new option: -o <dir> specifies the directory in which to generate the output. - because Haddock now needs to know where to find its default stylesheet, we have to have a wrapper script and do the haddock-inplace thing (Makefile code copied largely from fptools/happy). - - - - - 106adbbe by Simon Marlow at 2002-04-24T15:12:41+00:00 [haddock @ 2002-04-24 15:12:41 by simonmar] Stop slurping comment lines when we see a row of dashes longer than length 2: these are useful as separators. - - - - - 995d3f9e by Simon Marlow at 2002-04-24T15:14:12+00:00 [haddock @ 2002-04-24 15:14:11 by simonmar] Grok the kind of module headers we use in fptools/libraries, and pass the "portability", "stability", and "maintainer" strings through into the generated HTML. If the module header doesn't match the pattern, then we don't include the info in the HTML. - - - - - e14da136 by Simon Marlow at 2002-04-24T15:16:57+00:00 [haddock @ 2002-04-24 15:16:57 by simonmar] Done module headers now. - - - - - 2ca8dfd4 by Simon Marlow at 2002-04-24T15:57:48+00:00 [haddock @ 2002-04-24 15:57:47 by simonmar] Handle gcons in export lists (a common extension). - - - - - 044cea81 by Simon Marlow at 2002-04-25T14:20:12+00:00 [haddock @ 2002-04-25 14:20:12 by simonmar] Add the little lambda icon - - - - - 63955027 by Simon Marlow at 2002-04-25T14:40:05+00:00 [haddock @ 2002-04-25 14:40:05 by simonmar] - Add support for named chunks of documentation which can be referenced from the export list. - Copy the icon from $libdir to the destination in HTML mode. - - - - - 36e3f913 by Simon Marlow at 2002-04-25T16:48:36+00:00 [haddock @ 2002-04-25 16:48:36 by simonmar] More keyboard bashing - - - - - 7ae18dd0 by Simon Marlow at 2002-04-26T08:43:33+00:00 [haddock @ 2002-04-26 08:43:33 by simonmar] Package util reqd. to compile with 4.08.2 - - - - - bbd5fbab by Simon Marlow at 2002-04-26T10:13:00+00:00 [haddock @ 2002-04-26 10:13:00 by simonmar] Include $(GHC_HAPPY_OPTS) when compiling HsParser - - - - - 31c53d79 by Simon Marlow at 2002-04-26T11:18:57+00:00 [haddock @ 2002-04-26 11:18:56 by simonmar] - support for fundeps (partially contributed by Brett Letner - thanks Brett). - make it build with GHC 4.08.2 - - - - - c415ce76 by Simon Marlow at 2002-04-26T13:15:02+00:00 [haddock @ 2002-04-26 13:15:02 by simonmar] Move the explicit formatting of the little table for the stability/portability/maintainer info from the HTML into the CSS, and remove the explicit table size (just right-align it). - - - - - 520ee21a by Simon Marlow at 2002-04-26T16:01:44+00:00 [haddock @ 2002-04-26 16:01:44 by simonmar] Yet more keyboard bashing - this is pretty much complete now. - - - - - 2ae37179 by Simon Marlow at 2002-04-26T16:02:14+00:00 [haddock @ 2002-04-26 16:02:14 by simonmar] Add a couple of things I forgot about - - - - - b7211e04 by Simon Marlow at 2002-04-29T15:28:12+00:00 [haddock @ 2002-04-29 15:28:12 by simonmar] bugfix for declBinders on a NewTypeDecl - - - - - 640c154a by Simon Marlow at 2002-04-29T15:28:54+00:00 [haddock @ 2002-04-29 15:28:54 by simonmar] Allow '-- |' style annotations on constructors and record fields. - - - - - 393f258a by Simon Marlow at 2002-04-29T15:37:32+00:00 [haddock @ 2002-04-29 15:37:32 by simonmar] syntax fix - - - - - 8a2c2549 by Simon Marlow at 2002-04-29T15:37:48+00:00 [haddock @ 2002-04-29 15:37:48 by simonmar] Add an example - - - - - db88f8a2 by Simon Marlow at 2002-04-29T15:55:46+00:00 [haddock @ 2002-04-29 15:55:46 by simonmar] remove a trace - - - - - 2b0248e0 by Simon Marlow at 2002-04-29T15:56:19+00:00 [haddock @ 2002-04-29 15:56:19 by simonmar] Fix for 'make install' - - - - - 120453a0 by Simon Marlow at 2002-04-29T15:56:39+00:00 [haddock @ 2002-04-29 15:56:39 by simonmar] Install the auxilliary bits - - - - - 950e6dbb by Simon Marlow at 2002-04-29T15:57:30+00:00 [haddock @ 2002-04-29 15:57:30 by simonmar] Add BinDist bits - - - - - 154b9d71 by Simon Marlow at 2002-05-01T11:02:52+00:00 [haddock @ 2002-05-01 11:02:52 by simonmar] update - - - - - ba6c39fa by Simon Marlow at 2002-05-01T11:03:26+00:00 [haddock @ 2002-05-01 11:03:26 by simonmar] Add another item - - - - - bacb5e33 by Simon Marlow at 2002-05-03T08:50:00+00:00 [haddock @ 2002-05-03 08:50:00 by simonmar] Fix some typos. - - - - - 54c87895 by Sven Panne at 2002-05-05T19:40:51+00:00 [haddock @ 2002-05-05 19:40:51 by panne] As a temporary hack/workaround for a bug in GHC's simplifier, don't pass Happy the -c option for generating the parsers in this subdir. Furthermore, disable -O for HaddocParse, too. - - - - - e6c08703 by Simon Marlow at 2002-05-06T09:51:10+00:00 [haddock @ 2002-05-06 09:51:10 by simonmar] Add RPM spec file (thanks to Tom Moertel <tom-rpms at moertel.com>) - - - - - 7b8fa8e7 by Simon Marlow at 2002-05-06T12:29:26+00:00 [haddock @ 2002-05-06 12:29:26 by simonmar] Add missing type signature (a different workaround for the bug in GHC's simplifier). - - - - - cd0e300d by Simon Marlow at 2002-05-06T12:30:09+00:00 [haddock @ 2002-05-06 12:30:09 by simonmar] Remove workaround for simplifier bug in previous revision. - - - - - 687e68fa by Simon Marlow at 2002-05-06T12:32:32+00:00 [haddock @ 2002-05-06 12:32:32 by simonmar] Allow empty data declarations (another GHC extension). - - - - - 8f29f696 by Simon Marlow at 2002-05-06T12:49:21+00:00 [haddock @ 2002-05-06 12:49:21 by simonmar] Fix silly bug in named documentation block lookup. - - - - - 8e0059af by Simon Marlow at 2002-05-06T13:02:42+00:00 [haddock @ 2002-05-06 13:02:42 by simonmar] Add another named chunk with a different name - - - - - 68f8a896 by Simon Marlow at 2002-05-06T13:32:32+00:00 [haddock @ 2002-05-06 13:32:32 by simonmar] Be more lenient about extra paragraph breaks - - - - - 65fc31db by Simon Marlow at 2002-05-07T15:36:36+00:00 [haddock @ 2002-05-07 15:36:36 by simonmar] DocEmpty is a right and left-unit of DocAppend (remove it in the smart constructor). - - - - - adc81078 by Simon Marlow at 2002-05-07T15:37:15+00:00 [haddock @ 2002-05-07 15:37:15 by simonmar] Allow code blocks to be denoted with bird-tracks in addition to [...]. - - - - - 1283a3c1 by Simon Marlow at 2002-05-08T11:21:56+00:00 [haddock @ 2002-05-08 11:21:56 by simonmar] Add a facility for specifying options that affect Haddock's treatment of the module. Options are given at the top of the module in a comma-separated list, beginning with '-- #'. eg. -- # prune, hide, ignore-exports Options currently available, with their meanings: prune: ignore declarations which have no documentation annotations ignore-exports: act as if the export list were not specified (i.e. export everything local to the module). hide: do not include this module in the generated documentation, but propagate any exported definitions to modules which re-export them. There's a slight change in the semantics for re-exporting a full module by giving 'module M' in the export list: if module M does not have the 'hide' option, then the documentation will now just contain a reference to module M rather than the full inlined contents of that module. These features, and some other changes in the pipeline, are the result of discussions between myself and Manuel Chakravarty <chak at cse.unsw.edu.au> (author of IDoc) yesterday. Also: some cleanups, use a Writer monad to collect error messages in some places instead of just printing them with trace. - - - - - a2239cf5 by Simon Marlow at 2002-05-08T11:22:30+00:00 [haddock @ 2002-05-08 11:22:30 by simonmar] Update to test new features. - - - - - 6add955f by Simon Marlow at 2002-05-08T13:37:25+00:00 [haddock @ 2002-05-08 13:37:25 by simonmar] Change the markup for typewriter-font from [...] to @... at . The reasoning is that the '@' symbol is much less likely to be needed than square brackets, and we don't want to have to escape square brackets in code fragments. This will be mildly painful in the short term, but it's better to get the change out of the way as early as possible. - - - - - cda06447 by Simon Marlow at 2002-05-08T13:39:56+00:00 [haddock @ 2002-05-08 13:39:56 by simonmar] Allow nested-style comments to be used as documentation annotations too. eg. {-| ... -} is equivalent to -- | ... An extra space can also be left after the comment opener: {- | ... -}. The only version that isn't allowed is {-# ... -}, because this syntax overlaps with Haskell pragmas; use {- # ... -} instead. - - - - - db23f65e by Simon Marlow at 2002-05-08T14:48:41+00:00 [haddock @ 2002-05-08 14:48:39 by simonmar] Add support for existential quantifiers on constructors. - - - - - adce3794 by Simon Marlow at 2002-05-08T15:43:25+00:00 [haddock @ 2002-05-08 15:43:25 by simonmar] update - - - - - 62a1f436 by Simon Marlow at 2002-05-08T15:44:10+00:00 [haddock @ 2002-05-08 15:44:10 by simonmar] Update to version 0.2 - - - - - f6a24ba3 by Simon Marlow at 2002-05-09T08:48:29+00:00 [haddock @ 2002-05-09 08:48:29 by simonmar] typo - - - - - 9f9522a4 by Simon Marlow at 2002-05-09T10:33:14+00:00 [haddock @ 2002-05-09 10:33:14 by simonmar] oops, left out '/' from the special characters in the last change. - - - - - 14abcb39 by Simon Marlow at 2002-05-09T10:34:44+00:00 [haddock @ 2002-05-09 10:34:44 by simonmar] Fix buglet - - - - - b8d878be by Simon Marlow at 2002-05-09T10:35:00+00:00 [haddock @ 2002-05-09 10:35:00 by simonmar] Give a more useful instance of Show for Module. - - - - - f7bfd626 by Simon Marlow at 2002-05-09T10:37:07+00:00 [haddock @ 2002-05-09 10:37:07 by simonmar] The last commit to Main.lhs broke the delicate balance of laziness which was being used to avoid computing the dependency graph of modules. So I finally bit the bullet and did a proper topological sort of the module graph, which turned out to be easy (stealing the Digraph module from GHC - this really ought to be in the libraries somewhere). - - - - - b481c1d0 by Simon Marlow at 2002-05-09T10:37:25+00:00 [haddock @ 2002-05-09 10:37:25 by simonmar] another item done - - - - - 032e2b42 by Simon Marlow at 2002-05-09T10:44:15+00:00 [haddock @ 2002-05-09 10:44:15 by simonmar] Don't consider a module re-export as having documentation, for the purposes of deciding whether we need a Synopsis section or not. - - - - - 5fb45e92 by Simon Marlow at 2002-05-09T11:10:55+00:00 [haddock @ 2002-05-09 11:10:55 by simonmar] Add a special case for list types in ppHsAType - - - - - 1937e428 by Simon Marlow at 2002-05-09T12:43:06+00:00 [haddock @ 2002-05-09 12:43:06 by simonmar] Type synonyms can accept a ctype on the RHS, to match GHC. - - - - - 0f16ce56 by Simon Marlow at 2002-05-09T12:45:19+00:00 [haddock @ 2002-05-09 12:45:19 by simonmar] Add 'stdcall' keyword - - - - - 29b0d7d2 by Simon Marlow at 2002-05-09T13:35:45+00:00 [haddock @ 2002-05-09 13:35:45 by simonmar] Add System Requirements section - - - - - bf14dddd by Simon Marlow at 2002-05-09T13:36:11+00:00 [haddock @ 2002-05-09 13:36:11 by simonmar] Test existential types, amongst other things - - - - - 502f8f6f by Simon Marlow at 2002-05-09T13:37:35+00:00 [haddock @ 2002-05-09 13:37:35 by simonmar] Print the module name in a doc-string parse error - - - - - ca1f8d49 by Simon Marlow at 2002-05-09T13:38:04+00:00 [haddock @ 2002-05-09 13:38:04 by simonmar] Add dependency - - - - - 8d3d91ff by Simon Marlow at 2002-05-09T15:37:57+00:00 [haddock @ 2002-05-09 15:37:57 by simonmar] Add the changelog/release notes - - - - - f3960959 by Simon Marlow at 2002-05-09T15:47:47+00:00 [haddock @ 2002-05-09 15:47:47 by simonmar] mention the backquote-style of markup - - - - - 089fb6e6 by Simon Marlow at 2002-05-09T15:59:45+00:00 [haddock @ 2002-05-09 15:59:45 by simonmar] update - - - - - bdd3be0b by Simon Marlow at 2002-05-09T15:59:56+00:00 [haddock @ 2002-05-09 15:59:56 by simonmar] Document changes since 0.1 - - - - - 00fc4af8 by Simon Marlow at 2002-05-10T08:22:48+00:00 [haddock @ 2002-05-10 08:22:48 by simonmar] oops, update to version 0.2 - - - - - a8a79041 by Simon Marlow at 2002-05-10T16:05:08+00:00 [haddock @ 2002-05-10 16:05:08 by simonmar] Only include a mini-contents if there are 2 or more sections - - - - - 06653319 by Simon Marlow at 2002-05-13T09:13:12+00:00 [haddock @ 2002-05-13 09:13:12 by simonmar] fix typos - - - - - 1402b19b by Simon Marlow at 2002-05-13T10:14:22+00:00 [haddock @ 2002-05-13 10:14:22 by simonmar] Allow backquote as the right-hand quote as well as the left-hand quote, as suggested by Dean Herrington. Clean up the grammar a litte. - - - - - dcd5320d by Simon Marlow at 2002-05-13T10:44:10+00:00 [haddock @ 2002-05-13 10:44:10 by simonmar] a couple more things, prioritise a bit - - - - - a90130c4 by Simon Marlow at 2002-05-13T15:19:03+00:00 [haddock @ 2002-05-13 15:19:03 by simonmar] Cope with datatypes which have documentation on the constructor but not the type itself, and records which have documentation on the fields but not the constructor. (Thanks to Ross Paterson for pointing out the bugs). - - - - - a774d432 by Simon Marlow at 2002-05-13T15:20:54+00:00 [haddock @ 2002-05-13 15:20:54 by simonmar] Fix one of the record examples - - - - - 2d1d5218 by Simon Marlow at 2002-05-15T12:44:35+00:00 [haddock @ 2002-05-15 12:44:35 by simonmar] Preserve the newline before a bird-track, but only within a paragraph. - - - - - 1554c09a by Simon Marlow at 2002-05-15T13:03:02+00:00 [haddock @ 2002-05-15 13:03:01 by simonmar] Reworking of the internals to support documenting function arguments (the Most Wanted new feature by the punters). The old method of keeping parsed documentation in a Name -> Doc mapping wasn't going to cut it for anntations on type components, where there's no name to attach the documentation to, so I've moved to storing all the documentation in the abstract syntax. Previously some of the documentation was left in the abstract syntax by the parser, but was later extracted into the mapping. In order to avoid having to parameterise the abstract syntax over the type of documentation stored in it, we have to parse the documentation at the same time as we parse the Haskell source (well, I suppose we could store 'Either String Doc' in the HsSyn, but that's clunky). One upshot is that documentation is now parsed eagerly, and documentation parse errors are fatal (but have better line numbers in the error message). The new story simplifies matters for the code that processes the source modules, because we don't have to maintain the extra Name->Doc mapping, and it should improve efficiency a little too. New features: - Function arguments and return values can now have doc annotations. - If you refer to a qualified name in a doc string, eg. 'IO.putStr', then Haddock will emit a hyperlink even if the identifier is not in scope, so you don't have to make sure everything referred to from the documentation is imported. - several bugs & minor infelicities fixed. - - - - - 57344dc3 by Simon Marlow at 2002-05-15T13:03:19+00:00 [haddock @ 2002-05-15 13:03:19 by simonmar] Bump to version 0.3 - - - - - b2791812 by Simon Marlow at 2002-05-15T13:03:41+00:00 [haddock @ 2002-05-15 13:03:41 by simonmar] update - - - - - fead183e by Simon Marlow at 2002-05-15T13:10:15+00:00 [haddock @ 2002-05-15 13:10:15 by simonmar] Rename Foo.hs to Test.hs, and add a Makefile - - - - - b0b1f89f by Simon Marlow at 2002-05-15T13:16:07+00:00 [haddock @ 2002-05-15 13:16:07 by simonmar] - Remove the note about function argument docs not being implemented - Note that qualified identifiers can be used to point to entities that aren't in scope. - - - - - 5665f31a by Simon Marlow at 2002-05-15T13:28:46+00:00 [haddock @ 2002-05-15 13:28:46 by simonmar] Patch to add support for GHC-style primitive strings ".."#, from Ross Paterson. - - - - - 0564505d by Simon Marlow at 2002-05-17T10:51:57+00:00 [haddock @ 2002-05-17 10:51:57 by simonmar] Fix bugs in qualified name handling (A.B.f was returned as B.f) - - - - - 10e7311c by Simon Marlow at 2002-05-21T10:24:52+00:00 [haddock @ 2002-05-21 10:24:52 by simonmar] - Use an alternate tabular layout for datatypes, which is more compact - Fix some problems with the function argument documentation - - - - - 2f91c2a6 by Simon Marlow at 2002-05-21T10:27:40+00:00 [haddock @ 2002-05-21 10:27:40 by simonmar] add a few more test cases - - - - - 01c2ddd2 by Simon Marlow at 2002-05-21T10:28:33+00:00 [haddock @ 2002-05-21 10:28:33 by simonmar] Rearrange a bit, and add support for tabular datatype rendering - - - - - a4e4c5f8 by Simon Marlow at 2002-05-27T09:03:52+00:00 [haddock @ 2002-05-27 09:03:51 by simonmar] Lots of changes: - instances of a class are listed with the class, and instances involving a datatype are listed with that type. Derived instances aren't included at the moment: the calculation to find the instance head for a derived instance is non-trivial. - some formatting changes; use rows with specified height rather than cellspacing in some places. - various fixes (source file links were wrong, amongst others) - - - - - 48722e68 by Simon Marlow at 2002-05-27T12:30:38+00:00 [haddock @ 2002-05-27 12:30:37 by simonmar] - Put function arguments *before* the doc for the function, as suggested by Sven Panne. This looks nicer when the function documentation is long. - Switch to using bold for binders at the definition site, and use underline for keywords. This makes the binder stand out more. - - - - - 657204d2 by Simon Marlow at 2002-05-27T13:19:49+00:00 [haddock @ 2002-05-27 13:19:49 by simonmar] Fix bug: we weren't renaming HsDocCommentNamed in renameDecl - - - - - 592aae66 by Simon Marlow at 2002-05-27T14:10:27+00:00 [haddock @ 2002-05-27 14:10:27 by simonmar] Fix some bugs in the rendering of qualified type signatures. - - - - - 69c8f763 by Simon Marlow at 2002-05-27T14:36:45+00:00 [haddock @ 2002-05-27 14:36:45 by simonmar] warning message tweak - - - - - 16e64e21 by Simon Marlow at 2002-05-27T14:53:53+00:00 [haddock @ 2002-05-27 14:53:53 by simonmar] hyperlinked identifiers should be in <tt> - - - - - 8d5e4783 by Simon Marlow at 2002-05-27T15:56:45+00:00 [haddock @ 2002-05-27 15:56:45 by simonmar] Do something sensible for modules which don't export anything (except instances). - - - - - 9d3ef811 by Simon Marlow at 2002-05-28T10:12:50+00:00 [haddock @ 2002-05-28 10:12:50 by simonmar] Rename the module documentation properly (bug reported by Sven Panne). - - - - - ef03a1cc by Simon Marlow at 2002-05-28T10:13:04+00:00 [haddock @ 2002-05-28 10:13:04 by simonmar] Add some more test cases - - - - - 92baa0e8 by Simon Marlow at 2002-05-28T11:17:55+00:00 [haddock @ 2002-05-28 11:17:55 by simonmar] If an identifier doesn't lex, then just replace it by a DocString. - - - - - a3156213 by Simon Marlow at 2002-05-28T16:16:19+00:00 [haddock @ 2002-05-28 16:16:19 by simonmar] Only link to names in the current module which are actually listed in the documentation. A name may be exported but not present in the documentation if it is exported as part of a 'module M' export specifier. - - - - - 31acf941 by Simon Marlow at 2002-05-28T16:17:11+00:00 [haddock @ 2002-05-28 16:17:11 by simonmar] update - - - - - 7e474ebf by Sigbjorn Finne at 2002-05-28T22:42:08+00:00 [haddock @ 2002-05-28 22:42:08 by sof] Handle lone occurrences of '/', e.g., -- | This/that. [did this in the lexer rather than in the parser, as I couldn't see a way not to introduce an S/R conflict that way.] - - - - - 093f7e53 by Simon Marlow at 2002-05-29T09:09:49+00:00 [haddock @ 2002-05-29 09:09:49 by simonmar] Back out previous change until we can find a better way to do this. - - - - - 9234389c by Simon Marlow at 2002-05-29T13:19:06+00:00 [haddock @ 2002-05-29 13:19:06 by simonmar] Make the markup syntax a little more friendly: - single quotes are now interpreted literally unless they surround a valid Haskell identifier. So for example now there's no need to escape a single quote used as an apostrophe. - text to the right of a bird track is now literal (if you want marked-up text in a code block, use @...@). - - - - - b3333526 by Simon Marlow at 2002-05-29T13:38:51+00:00 [haddock @ 2002-05-29 13:38:51 by simonmar] Document recent changes to markup syntax - - - - - f93641d6 by Simon Marlow at 2002-05-29T15:27:18+00:00 [haddock @ 2002-05-29 15:27:18 by simonmar] Include the instances in abstract data types too - - - - - 613f21e3 by Simon Marlow at 2002-06-03T13:05:58+00:00 [haddock @ 2002-06-03 13:05:57 by simonmar] Allow exporting of individual class methods and record selectors. For these we have to invent the correct type signature, which we do in the simplest possible way (i.e. no context reduction nonsense in the class case). - - - - - 14b36807 by Simon Marlow at 2002-06-03T13:20:00+00:00 [haddock @ 2002-06-03 13:20:00 by simonmar] Fix linking to qualified names again (thanks to Sven Panne for pointing out the bug). - - - - - 95b10eac by Simon Marlow at 2002-06-03T13:46:48+00:00 [haddock @ 2002-06-03 13:46:48 by simonmar] Fix for exporting record selectors from a newtype declaration - - - - - 272f932e by Simon Marlow at 2002-06-03T13:56:38+00:00 [haddock @ 2002-06-03 13:56:38 by simonmar] update to version 0.3 - - - - - 1c0a3bed by Simon Marlow at 2002-06-03T14:05:07+00:00 [haddock @ 2002-06-03 14:05:07 by simonmar] Add changes in version 0.3 - - - - - 145b4626 by Simon Marlow at 2002-06-03T14:12:38+00:00 [haddock @ 2002-06-03 14:12:38 by simonmar] Render class names as proper binders - - - - - 052106b3 by Simon Marlow at 2002-06-03T14:15:10+00:00 [haddock @ 2002-06-03 14:15:10 by simonmar] update, and separate into bugs, features, and cosmetic items. - - - - - 854f4914 by Simon Marlow at 2002-06-03T14:16:13+00:00 [haddock @ 2002-06-03 14:16:13 by simonmar] More test cases - - - - - 466922c8 by Simon Marlow at 2002-06-03T14:16:56+00:00 [haddock @ 2002-06-03 14:16:56 by simonmar] Example from the paper - - - - - 9962a045 by Simon Marlow at 2002-06-03T14:17:49+00:00 [haddock @ 2002-06-03 14:17:49 by simonmar] A debugging version of the style-sheet, which gives some tables coloured backgrounds so we can see what's going on. - - - - - f16b79db by Simon Marlow at 2002-06-03T14:19:46+00:00 [haddock @ 2002-06-03 14:19:46 by simonmar] typo - - - - - 620db27b by Simon Marlow at 2002-06-03T14:48:32+00:00 [haddock @ 2002-06-03 14:48:32 by simonmar] oops, fix markup bugs - - - - - 53fd105c by Simon Marlow at 2002-06-05T09:05:07+00:00 [haddock @ 2002-06-05 09:05:07 by simonmar] Keep foreign imports when there is no export list (bug reported by Sven Panne). - - - - - 6d98989c by Simon Marlow at 2002-06-05T09:12:02+00:00 [haddock @ 2002-06-05 09:12:02 by simonmar] Identifiers in single quotes can be symbol names too (bug reported by Hal Daume). - - - - - 001811e5 by Sven Panne at 2002-06-08T14:03:36+00:00 [haddock @ 2002-06-08 14:03:36 by panne] Tiny workaround for the fact that Haddock currently ignores HsImportSpecs: Let the local_orig_env take precedence. This is no real solution at all, but improves things sometimes, e.g. in my GLUT documentation. :-) - - - - - 504d19c9 by Simon Marlow at 2002-06-11T09:23:25+00:00 [haddock @ 2002-06-11 09:23:25 by simonmar] portability nit - - - - - e13b5af4 by Simon Marlow at 2002-06-20T12:38:07+00:00 [haddock @ 2002-06-20 12:38:07 by simonmar] Empty declaration fixes. - - - - - f467a9b6 by Simon Marlow at 2002-06-20T12:39:02+00:00 [haddock @ 2002-06-20 12:39:01 by simonmar] Add support for a "prologue" - a description for the whole library, placed on the contents page before the module list. - - - - - b8dbfe20 by Simon Marlow at 2002-06-21T12:43:06+00:00 [haddock @ 2002-06-21 12:43:06 by simonmar] When we have a single code block paragraph, don't place it in <pre>..</pre>, just use <tt>..</tt> to avoid generating extra vertical white space in some browsers. - - - - - 4831dbbd by Simon Marlow at 2002-06-21T15:50:42+00:00 [haddock @ 2002-06-21 15:50:42 by simonmar] Add support for reading and writing interface files(!) This turned out to be quite easy, and necessary to get decent hyperlinks between the documentation for separate packages in the libraries. The functionality isn't quite complete yet: for a given package of modules, you'd like to say "the HTML for these modules lives in directory <dir>" (currently they are assumed to be all in the same place). Two new flags: --dump-interface=FILE dump an interface file in FILE --read-interface=FILE read interface from FILE an interface file describes *all* the modules being processed. Only the exported names are kept in the interface: if you re-export a name from a module in another interface the signature won't be copied. This is a compromise to keep the size of the interfaces sensible. Also, I added another useful option: --no-implicit-prelude avoids trying to import the Prelude. Previously this was the default, but now importing the Prelude from elsewhere makes sense if you also read in an interface containing the Prelude module, so Haddock imports the Prelude implicitly according to the Haskell spec. - - - - - d3640a19 by Sven Panne at 2002-06-23T14:54:00+00:00 [haddock @ 2002-06-23 14:54:00 by panne] Make it compile with newer GHCs - - - - - 780c506b by Sven Panne at 2002-06-23T15:44:31+00:00 [haddock @ 2002-06-23 15:44:31 by panne] Cleaned up build root handling and added more docs - - - - - 45290d2e by Simon Marlow at 2002-06-24T14:37:43+00:00 [haddock @ 2002-06-24 14:37:42 by simonmar] When reading an interface, allow a file path offset to be specified which represents the path to the HTML files for the modules specified by that interface. The path may be either relative (to the location of the HTML for this package), or absolute. The syntax is --read-interface=PATH,FILE where PATH is the path to the HTML, and FILE is the filename containing the interface. - - - - - 4e2b9ae6 by Simon Marlow at 2002-07-03T16:01:08+00:00 [haddock @ 2002-07-03 16:01:07 by simonmar] Handle import specs properly, include 'hiding'. Haddock now has a complete implementation of the Haskell module system (more or less; I won't claim it's 100% correct). - - - - - 9a9aa1a8 by Simon Marlow at 2002-07-03T16:18:16+00:00 [haddock @ 2002-07-03 16:18:16 by simonmar] Update - - - - - 560c3026 by Simon Marlow at 2002-07-04T14:56:10+00:00 [haddock @ 2002-07-04 14:56:10 by simonmar] Clean up the code that constructs the exported declarations, and fix a couple of bugs along the way. Now if you import a class hiding one of the methods, then re-export the class, the version in the documentation will correctly have the appropriate method removed. - - - - - 2c26e77d by Simon Marlow at 2002-07-04T15:26:13+00:00 [haddock @ 2002-07-04 15:26:13 by simonmar] More bugfixes to the export handling - - - - - 03e0710d by Simon Marlow at 2002-07-09T10:12:10+00:00 [haddock @ 2002-07-09 10:12:10 by simonmar] Don't require that the list type comes from "Prelude" for it to be treated as special syntax (sometimes it comes from Data.List or maybe even GHC.Base). - - - - - 44f3891a by Simon Marlow at 2002-07-09T10:12:51+00:00 [haddock @ 2002-07-09 10:12:51 by simonmar] commented-out debugging code - - - - - 97280873 by Krasimir Angelov at 2002-07-09T16:33:33+00:00 [haddock @ 2002-07-09 16:33:31 by krasimir] 'Microsoft HTML Help' support - - - - - 3dc04655 by Simon Marlow at 2002-07-10T09:40:56+00:00 [haddock @ 2002-07-10 09:40:56 by simonmar] Fix for rendering of the (->) type constructor, from Ross Paterson. - - - - - c9f149c6 by Simon Marlow at 2002-07-10T10:26:11+00:00 [haddock @ 2002-07-10 10:26:11 by simonmar] Tweaks to the MS Help support: the extra files are now only generated if you ask for them (--ms-help). - - - - - e8acc1e6 by Simon Marlow at 2002-07-10T10:57:10+00:00 [haddock @ 2002-07-10 10:57:10 by simonmar] Document all the new options since 0.3 - - - - - 8bb85544 by Simon Marlow at 2002-07-10T10:58:31+00:00 [haddock @ 2002-07-10 10:58:31 by simonmar] Sort the options a bit - - - - - abc0dd59 by Simon Marlow at 2002-07-15T09:19:38+00:00 [haddock @ 2002-07-15 09:19:38 by simonmar] Fix a bug in mkExportItems when processing a module without an explicit export list. We were placing one copy of a declaration for each binder in the declaration, which for a data type would mean one copy of the whole declaration per constructor or record selector. - - - - - dde65bb9 by Simon Marlow at 2002-07-15T09:54:16+00:00 [haddock @ 2002-07-15 09:54:16 by simonmar] merge rev. 1.35 - - - - - bd7eb8c4 by Simon Marlow at 2002-07-15T10:14:31+00:00 [haddock @ 2002-07-15 10:14:30 by simonmar] Be a bit more liberal in the kind of commenting styles we allow, as suggested by Malcolm Wallace. Mostly this consists of allowing doc comments either side of a separator token. In an export list, a section heading is now allowed before the comma, as well as after it. eg. module M where ( T(..) -- * a section heading , f -- * another section heading , g ) In record fields, doc comments are allowed anywhere (previously a doc-next was allowed only after the comma, and a doc-before was allowed only before the comma). eg. data R = C { -- | describes 'f' f :: Int -- | describes 'g' , g :: Int } - - - - - 8f6dfe34 by Simon Marlow at 2002-07-15T10:21:56+00:00 [haddock @ 2002-07-15 10:21:56 by simonmar] Mention alternative commenting styles. - - - - - fc515bb7 by Simon Marlow at 2002-07-15T16:16:50+00:00 [haddock @ 2002-07-15 16:16:50 by simonmar] Allow multiple sections/subsections before and after a comma in the export list. Also at the same time I made the syntax a little stricter (multiple commas now aren't allowed between export specs). - - - - - 80a97e74 by Simon Marlow at 2002-07-19T09:13:10+00:00 [haddock @ 2002-07-19 09:13:10 by simonmar] Allow special id's ([], (), etc.) to be used in an import declaration. - - - - - a69d7378 by Simon Marlow at 2002-07-19T09:59:02+00:00 [haddock @ 2002-07-19 09:59:02 by simonmar] Allow special id's ([], (), etc.) to be used in an import declarations. - - - - - d205fa60 by Simon Marlow at 2002-07-19T10:00:16+00:00 [haddock @ 2002-07-19 10:00:16 by simonmar] Relax the restrictions which require doc comments to be followed by semi colons - in some cases this isn't necessary. Now you can write module M where { -- | some doc class C where {} } without needing to put a semicolon before the class declaration. - - - - - e9301e14 by Simon Marlow at 2002-07-23T08:24:09+00:00 [haddock @ 2002-07-23 08:24:09 by simonmar] A new TODO list item - - - - - e5d77586 by Simon Marlow at 2002-07-23T08:40:56+00:00 [haddock @ 2002-07-23 08:40:56 by simonmar] - update the acknowledgements - remove the paragraph that described how to use explicit layout with doc comments; it isn't relevant any more. - - - - - 78a94137 by Simon Marlow at 2002-07-23T08:43:02+00:00 [haddock @ 2002-07-23 08:43:02 by simonmar] more tests - - - - - 5c320927 by Simon Marlow at 2002-07-23T08:43:26+00:00 [haddock @ 2002-07-23 08:43:26 by simonmar] Updates for version 0.4 - - - - - 488e99ae by Simon Marlow at 2002-07-23T09:10:46+00:00 [haddock @ 2002-07-23 09:10:46 by simonmar] Fix the %changelog (rpm complained that it wasn't in the right order) - - - - - a77bb373 by Simon Marlow at 2002-07-23T09:12:38+00:00 [haddock @ 2002-07-23 09:12:38 by simonmar] Another item for the TODO list - - - - - f1ec1813 by Simon Marlow at 2002-07-23T10:18:46+00:00 [haddock @ 2002-07-23 10:18:46 by simonmar] Add a version banner when invoked with -v - - - - - 1d44cadf by Simon Marlow at 2002-07-24T09:28:19+00:00 [haddock @ 2002-07-24 09:28:19 by simonmar] Remove ^Ms - - - - - 4d8d5e94 by Simon Marlow at 2002-07-24T09:42:18+00:00 [haddock @ 2002-07-24 09:42:17 by simonmar] Patches to quieten ghc -Wall, from those nice folks at Galois. - - - - - d6edc43e by Simon Marlow at 2002-07-25T14:37:29+00:00 [haddock @ 2002-07-25 14:37:28 by simonmar] Patch to allow simple hyperlinking to an arbitrary location in another module's documentation, from Volker Stolz. Now in a doc comment: #foo# creates <a name="foo"></a> And you can use the form "M\#foo" to hyperlink to the label 'foo' in module 'M'. Note that the backslash is necessary for now. - - - - - b34d18fa by Simon Marlow at 2002-08-02T09:08:22+00:00 [haddock @ 2002-08-02 09:08:22 by simonmar] The <TT> and <PRE> environments seem to use a font that is a little too small in IE. Compensate. (suggestion from Daan Leijen). - - - - - 8106b086 by Simon Marlow at 2002-08-02T09:25:23+00:00 [haddock @ 2002-08-02 09:25:20 by simonmar] Remove <P>..</P> from around list items, to reduce excess whitespace between the items of bulleted and ordered lists. (Suggestion from Daan Leijen). - - - - - c1acff8f by Simon Marlow at 2002-08-05T09:03:49+00:00 [haddock @ 2002-08-05 09:03:49 by simonmar] update - - - - - f968661c by Simon Marlow at 2002-11-11T09:32:57+00:00 [haddock @ 2002-11-11 09:32:57 by simonmar] Fix cut-n-pasto - - - - - 12d02619 by Simon Marlow at 2002-11-13T09:49:46+00:00 [haddock @ 2002-11-13 09:49:46 by simonmar] Small bugfix in the --read-interface option parsing from Brett Letner. - - - - - 30e32d5e by Ross Paterson at 2003-01-16T15:07:57+00:00 [haddock @ 2003-01-16 15:07:57 by ross] Adjust for the new exception libraries (as well as the old ones). - - - - - 871f65df by Sven Panne at 2003-02-20T21:31:40+00:00 [haddock @ 2003-02-20 21:31:40 by panne] * Add varsyms and consyms to index * Exclude empty entries from index - - - - - bc42cc87 by Sven Panne at 2003-02-24T21:26:29+00:00 [haddock @ 2003-02-24 21:26:29 by panne] Don't convert a "newtype" to a single-constructor "data" for non-abstractly exported types, they are quite different regarding strictness/pattern matching. Now a "data" without any constructors is only emitted for an abstractly exported type, regardless if it is actually a "newtype" or a "data". - - - - - 0c2a1d99 by Sven Panne at 2003-03-08T19:02:38+00:00 [haddock @ 2003-03-08 19:02:38 by panne] Fixed some broken/redirected/canonicalized links found by a very picky link checker. - - - - - 25459269 by Sven Panne at 2003-03-09T21:13:43+00:00 [haddock @ 2003-03-09 21:13:43 by panne] Don't append a fragment to non-defining index entries, only documents with a defining occurrence have a name anchor. - - - - - 6be4db86 by Sven Panne at 2003-03-10T21:34:25+00:00 [haddock @ 2003-03-10 21:34:24 by panne] Escape fragments. This fixes e.g. links to operators. - - - - - eb12972c by Ross Paterson at 2003-04-25T10:50:06+00:00 [haddock @ 2003-04-25 10:50:05 by ross] An 80% solution to generating derived instances. A complete solution would duplicate the instance inference logic, but if a type variable occurs as a constructor argument, then we can just propagate the derived class to the variable. But we know nothing of the constraints on any type variables that occur elsewhere. For example, the declarations data Either a b = Left a | Right b deriving (Eq, Ord) data Ptr a = Ptr Addr# deriving (Eq, Ord) newtype IORef a = IORef (STRef RealWorld a) deriving Eq yield the instances (Eq a, Eq b) => Eq (Either a b) (Ord a, Ord b) => Ord (Either a b) Eq (Ptr a) Ord (Ptr a) (??? a) => Eq (IORef a) The last example shows the limits of this local analysis. Note that a type variable may be in both categories: then we know a constraint, but there may be more, or a stronger constraint, e.g. data Tree a = Node a [Tree a] deriving Eq yields (Eq a, ??? a) => Eq (Tree a) - - - - - de886f78 by Simon Marlow at 2003-04-25T11:17:55+00:00 [haddock @ 2003-04-25 11:17:55 by simonmar] Some updates, including moving the derived instance item down to the bottom of the list now that Ross has contributed some code that does the job for common cases. - - - - - 1b52cffd by Simon Marlow at 2003-04-30T14:02:32+00:00 [haddock @ 2003-04-30 14:02:32 by simonmar] When installing on Windows, run cygpath over $(HADDOCKLIB) so that haddock (a mingw program, built by GHC) can understand it. You still need to be in a cygwin environment to run Haddock, because of the shell script wrapper. - - - - - d4f638de by Simon Marlow at 2003-05-06T10:04:47+00:00 [haddock @ 2003-05-06 10:04:47 by simonmar] Catch another case of a paragraph containing just a DocMonospaced that should turn into a DocCodeBlock. - - - - - 4162b2b9 by Simon Marlow at 2003-05-06T10:11:44+00:00 [haddock @ 2003-05-06 10:11:44 by simonmar] Add some more code-block tests. - - - - - 4f5802c8 by Simon Marlow at 2003-05-06T10:14:52+00:00 [haddock @ 2003-05-06 10:14:52 by simonmar] Don't turn a single DocCodeBlock into a DocMonospaced, because that tends to remove the line breaks in the code. - - - - - ef8c45f7 by Simon Marlow at 2003-05-21T15:07:21+00:00 [haddock @ 2003-05-21 15:07:21 by simonmar] Only omit the module contents when there are no section headings at all. - - - - - bcee1e75 by Sigbjorn Finne at 2003-05-30T16:50:45+00:00 [haddock @ 2003-05-30 16:50:45 by sof] cygpath: for now, steer clear of --mixed - - - - - 30567af3 by Sigbjorn Finne at 2003-05-30T17:59:28+00:00 [haddock @ 2003-05-30 17:59:28 by sof] oops, drop test defn from prev commit - - - - - b0856e7d by Simon Marlow at 2003-06-03T09:55:26+00:00 [haddock @ 2003-06-03 09:55:26 by simonmar] Two small fixes to make the output valid HTML 4.01 (transitional). Thanks to Malcolm Wallace for pointing out the problems. - - - - - 70e137ea by Simon Marlow at 2003-07-28T13:30:35+00:00 [haddock @ 2003-07-28 13:30:35 by simonmar] Add tests for a couple of bugs. - - - - - 122bd578 by Simon Marlow at 2003-07-28T13:31:25+00:00 [haddock @ 2003-07-28 13:31:25 by simonmar] Add documentation for anchors. - - - - - 0bd27cb2 by Simon Marlow at 2003-07-28T13:31:46+00:00 [haddock @ 2003-07-28 13:31:46 by simonmar] Update - - - - - 08052d42 by Simon Marlow at 2003-07-28T13:32:12+00:00 [haddock @ 2003-07-28 13:32:12 by simonmar] layout tweak. - - - - - 13942749 by Simon Marlow at 2003-07-28T13:33:03+00:00 [haddock @ 2003-07-28 13:33:03 by simonmar] Differentiate links to types/classes from links to variables/constructors with a prefix ("t:" and "v:" respectively). - - - - - d7f493b9 by Simon Marlow at 2003-07-28T13:35:17+00:00 [haddock @ 2003-07-28 13:35:16 by simonmar] When a module A exports another module's contents via 'module B', then modules which import entities from B re-exported by A should link to B.foo rather than A.foo. See examples/Bug2.hs. - - - - - d94cf705 by Simon Marlow at 2003-07-28T13:36:14+00:00 [haddock @ 2003-07-28 13:36:14 by simonmar] Update to version 0.5 - - - - - dbb776cd by Sven Panne at 2003-07-28T14:02:43+00:00 [haddock @ 2003-07-28 14:02:43 by panne] * Updated to version 0.5 * Automagically generate configure if it is not there - - - - - 6cfeee53 by Simon Marlow at 2003-07-28T14:32:43+00:00 [haddock @ 2003-07-28 14:32:42 by simonmar] Update to avoid using hslibs with GHC >= 5.04 - - - - - a1ce838f by Simon Marlow at 2003-07-28T14:33:37+00:00 [haddock @ 2003-07-28 14:33:37 by simonmar] Update for 0.5 - - - - - c0fe6493 by Simon Marlow at 2003-07-28T14:53:22+00:00 [haddock @ 2003-07-28 14:53:22 by simonmar] Markup fix - - - - - 6ea31596 by Sven Panne at 2003-07-28T16:40:45+00:00 [haddock @ 2003-07-28 16:40:45 by panne] Make it compile with GHC >= 6.01 - - - - - afcd30fc by Simon Marlow at 2003-07-30T15:04:52+00:00 [haddock @ 2003-07-30 15:04:52 by simonmar] Pay attention to import specs when building the the import env, as well as the orig env. This may fix some wrong links in documentation when import specs are being used. - - - - - 17c3137f by Simon Marlow at 2003-07-30T16:05:41+00:00 [haddock @ 2003-07-30 16:05:40 by simonmar] Rename instances based on the import_env for the module in which they are to be displayed. This should give, in many cases, better links for the types and classes mentioned in the instance head. This involves keeping around the import_env in the iface until the end, because instances are not collected up until all the modules have been processed. Fortunately it doesn't seem to affect performance much. Instance heads are now attached to ExportDecls, rather than the HTML backend passing around a separate mapping for instances. This is a cleanup. - - - - - 3d3b5c87 by Sven Panne at 2003-08-04T10:18:24+00:00 [haddock @ 2003-08-04 10:18:24 by panne] Don't print parentheses around one-element contexts - - - - - 9e3f3f2d by Simon Marlow at 2003-08-04T12:59:47+00:00 [haddock @ 2003-08-04 12:59:47 by simonmar] A couple of TODOs. - - - - - e9d8085c by Simon Marlow at 2003-08-05T14:10:31+00:00 [haddock @ 2003-08-05 14:10:31 by simonmar] I'm not sure why, but it seems that the index entries for non-defining occurrences of entities did not have an anchor - the link just pointed to the module. This fixes it. - - - - - ff5c7d6d by Simon Marlow at 2003-08-15T14:42:59+00:00 [haddock @ 2003-08-15 14:42:59 by simonmar] Convert the lexer to Alex, and fix a bug in the process. - - - - - 1aa077bf by Simon Marlow at 2003-08-15T15:00:18+00:00 [haddock @ 2003-08-15 15:00:18 by simonmar] Update - - - - - d3de1e38 by Simon Marlow at 2003-08-15T15:01:03+00:00 [haddock @ 2003-08-15 15:01:03 by simonmar] wibbles - - - - - b40ece3b by Simon Marlow at 2003-08-18T10:04:47+00:00 [haddock @ 2003-08-18 10:04:47 by simonmar] Lex the 'mdo' keyword as 'do'. - - - - - 8f9a1146 by Simon Marlow at 2003-08-18T11:48:24+00:00 [haddock @ 2003-08-18 11:48:24 by simonmar] Two bugs from Sven. - - - - - ea54ebc0 by Simon Marlow at 2003-08-18T11:48:46+00:00 [haddock @ 2003-08-18 11:48:46 by simonmar] Fixes to the new lexer. - - - - - d5f6a4b5 by Simon Marlow at 2003-08-19T09:09:03+00:00 [haddock @ 2003-08-19 09:09:03 by simonmar] Further wibbles to the syntax. - - - - - 6bbdadb7 by Sven Panne at 2003-08-26T18:45:35+00:00 [haddock @ 2003-08-26 18:45:35 by panne] Use autoreconf instead of autoconf - - - - - 32e889cb by Sven Panne at 2003-08-26T19:01:19+00:00 [haddock @ 2003-08-26 19:01:18 by panne] Made option handling a bit more consistent with other tools, in particular: Every program in fptools should output * version info on stdout and terminate successfully when -V or --version * usage info on stdout and terminate successfully when -? or --help * usage info on stderr and terminate unsuccessfully when an unknown option is given. - - - - - 5d156a91 by Sven Panne at 2003-08-26T19:20:55+00:00 [haddock @ 2003-08-26 19:20:55 by panne] Make it *very* clear that we terminate when given a -V/--version flag - - - - - e6577265 by Sven Panne at 2003-08-27T07:50:03+00:00 [haddock @ 2003-08-27 07:50:02 by panne] * Made -D a short option for --dump-interface. * Made -m a short option for --ms-help. * Made -n a short option for --no-implicit-prelude. * Made -c a short option for --css. * Removed DocBook options from executable (they didn't do anything), but mark them as reserved in the docs. Note that the short option for DocBook output is now -S (from SGML) instead of -d. The latter is now a short option for --debug. * The order of the Options in the documentation now matches the order printed by Haddock itself. Note: Although changing the names of options is often a bad idea, I'd really like to make the options for the programs in fptools more consistent and compatible to the ones used in common GNU programs. - - - - - d303ff98 by Simon Marlow at 2003-09-10T08:23:48+00:00 [haddock @ 2003-09-10 08:23:48 by simonmar] Add doc subdir. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 9a70e46a by Simon Marlow at 2003-09-10T08:24:32+00:00 [haddock @ 2003-09-10 08:24:32 by simonmar] Install these files in $(datadir), not $(libdir), since they're architecture independent. Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - bbb87e7a by Simon Marlow at 2003-09-10T08:25:31+00:00 [haddock @ 2003-09-10 08:25:31 by simonmar] Haddock's supplementary HTML bits now live in $(datadir), not $(libdir). Patch contributed by: Ian Lynagh <igloo at earth.li>. - - - - - 3587c24b by Simon Marlow at 2003-09-22T10:34:38+00:00 [haddock @ 2003-09-22 10:34:38 by simonmar] Allow installing of docs. - - - - - d510b517 by Sven Panne at 2003-10-11T08:10:44+00:00 [haddock @ 2003-10-11 08:10:44 by panne] Include architecture-independent files in file list - - - - - 187d7618 by Sigbjorn Finne at 2003-10-20T17:19:24+00:00 [haddock @ 2003-10-20 17:19:22 by sof] support for i-parameters + zip comprehensions - - - - - b6c7a273 by Simon Marlow at 2003-11-03T14:24:24+00:00 [haddock @ 2003-11-03 14:24:24 by simonmar] Update TODO file. - - - - - 58513e33 by Simon Marlow at 2003-11-05T11:22:04+00:00 [haddock @ 2003-11-05 11:22:04 by simonmar] Remove the last of the uses of 'trace' to emit warnings, and tidy up a couple of places where duplicate warnings were being emitted. - - - - - 33a78846 by Simon Marlow at 2003-11-05T11:30:53+00:00 [haddock @ 2003-11-05 11:30:52 by simonmar] - Suppress warnings about unknown imported modules by default. - Add a -v/--verbose flag to re-enable these warnings. The general idea is to suppress the "Warning: unknown module: Prelude" warnings which most Haddock users will see every time, and which aren't terribly useful. - - - - - a969de7f by Simon Marlow at 2003-11-05T12:30:28+00:00 [haddock @ 2003-11-05 12:30:28 by simonmar] - Remove the emboldening of index entries for defining locations. This isn't useful, and breaks abstractions. - If an entity is re-exported by a module but the module doesn't include documentation for that entity (perhaps because it is re-exported by 'module M'), then don't attempt to hyperlink to the documentation from the index. Instead, just list that module in the index, to indicate that the entity is exported from there. - - - - - f14ea82a by Simon Marlow at 2003-11-05T15:15:59+00:00 [haddock @ 2003-11-05 15:15:59 by simonmar] Index overhaul: - no more separate type/class and variable/function indices - the index now makes a distinction between different entities with the same name. One example is a type constructor with the same name as a data constructor, but another example is simply a function with the same name exported by two different modules. For example, the index entry for 'catch' now looks like this: catch 1 (Function) Control.Exception 2 (Function) GHC.Exception, Prelude, System.IO, System.IO.Error making it clear that there are two different 'catch'es, but one of them is exported by several modules. - Each index page now has the index contents (A B C ...) at the top. Please let me know if you really hate any of this. - - - - - 01a25ca6 by Simon Marlow at 2003-11-05T15:16:38+00:00 [haddock @ 2003-11-05 15:16:38 by simonmar] Update - - - - - 1a7ccb86 by Simon Marlow at 2003-11-05T17:16:05+00:00 [haddock @ 2003-11-05 17:16:04 by simonmar] Support for generating a single unified index for several packages. --use-index=URL turns off normal index generation, causes Index links to point to URL. --gen-index generates an combined index from the specified interfaces. Currently doesn't work exactly right, because the interfaces don't contain the iface_reexported info. I'll need to fix that up. - - - - - a2bca16d by Simon Marlow at 2003-11-06T10:44:52+00:00 [haddock @ 2003-11-06 10:44:52 by simonmar] Include iface_reexported in the .haddock file. This unfortunately bloats the file (40% for base). If this gets to be a problem we can always apply the dictionary trick that GHC uses for squashing .hi files. - - - - - 0a09c293 by Simon Marlow at 2003-11-06T12:39:47+00:00 [haddock @ 2003-11-06 12:39:46 by simonmar] - Add definition lists, marked up like this: -- | This is a definition list: -- -- [@foo@] The description of @foo at . -- -- [@bar@] The description of @bar at . Cunningly, the [] characters are not treated specially unless a [ is found at the beginning of a paragraph, in which case the ] becomes special in the following text. - Add --use-contents and --gen-contents, along the lines of --use-index and --gen-index added yesterday. Now we can generate a combined index and contents for the whole of the hierarchical libraries, and in theory the index/contents on the system could be updated as new packages are added. - - - - - fe1b3460 by Simon Marlow at 2003-11-06T14:47:36+00:00 [haddock @ 2003-11-06 14:47:36 by simonmar] Remove the 'Parent' button - it is of dubious use, and often points into thin air. - - - - - db6d762f by Simon Marlow at 2003-11-06T16:48:14+00:00 [haddock @ 2003-11-06 16:48:11 by simonmar] - Include the OptHide setting in the interface, so we don't include hidden modules in the combined index/contents. - Add a -k/--package flag to set the package name for the current set of modules. The package name for each module is now shown in the right-hand column of the contents, in a combined contents page. - - - - - 7d71718b by Simon Marlow at 2003-11-06T16:50:28+00:00 [haddock @ 2003-11-06 16:50:28 by simonmar] Add -k/--package docs - - - - - ef43949d by Simon Marlow at 2003-11-06T16:51:23+00:00 [haddock @ 2003-11-06 16:51:23 by simonmar] Bump to 0.6 - - - - - 1c419e06 by Simon Marlow at 2003-11-06T16:51:50+00:00 [haddock @ 2003-11-06 16:51:50 by simonmar] update - - - - - 69422327 by Simon Marlow at 2003-11-10T14:41:06+00:00 [haddock @ 2003-11-10 14:41:05 by simonmar] Re-exporting names from a different package is problematic, because we don't have access to the full documentation for the entity. Currently Haddock just ignores entities with no documentation, but this results in bogus-looking empty documentation for many of the modules in the haskell98 package. So: - the documentation will now just list the name, as a link pointing to the location of the actual documentation. - now we don't attempt to link to these re-exported entities if they are referred to by the current module. Additionally: - If there is no documentation in the current module, include just the Synopsis section (rather than just the documentation section, as it was before). This just looks nicer and was on the TODO list. - - - - - 3c3fc433 by Simon Marlow at 2003-11-10T14:51:59+00:00 [haddock @ 2003-11-10 14:51:59 by simonmar] Fix for getReExports: take into account names which are not visible because they are re-exported from a different package. - - - - - 31c8437b by Simon Marlow at 2003-11-10T15:10:53+00:00 [haddock @ 2003-11-10 15:10:53 by simonmar] Version 0.6 changes - - - - - a7c2430b by Simon Marlow at 2003-11-10T15:15:58+00:00 [haddock @ 2003-11-10 15:15:58 by simonmar] getReExports: one error case that isn't - - - - - 00cc459c by Simon Marlow at 2003-11-10T16:15:19+00:00 [haddock @ 2003-11-10 16:15:18 by simonmar] copyright update - - - - - ca62408d by Simon Marlow at 2003-11-11T09:57:25+00:00 [haddock @ 2003-11-11 09:57:25 by simonmar] Version 0.6 - - - - - 3acbf818 by Simon Marlow at 2003-11-11T12:10:44+00:00 [haddock @ 2003-11-11 12:10:44 by simonmar] Go back to producing just the documentation section, rather than just the synopsis section, for a module with no documentation annotations. One reason is that the synopsis section tries to link each entity to its documentation on the same page. Also, the doc section anchors each entity, and it lists instances which the synopsis doesn't. - - - - - 6c90abc2 by Simon Marlow at 2003-11-12T10:03:39+00:00 [haddock @ 2003-11-12 10:03:39 by simonmar] 2002 -> 2003 - - - - - 090bbc4c by Simon Marlow at 2003-11-28T12:08:00+00:00 [haddock @ 2003-11-28 12:08:00 by simonmar] update - - - - - 8096a832 by Simon Marlow at 2003-11-28T12:09:58+00:00 [haddock @ 2003-11-28 12:09:58 by simonmar] Fix some of the problems with Haddock generating pages that are too wide. Now we only specify 'nowrap' when it is necessary to avoid a code box getting squashed up by the text to the right of it. - - - - - 35294929 by Sven Panne at 2003-12-29T17:16:31+00:00 [haddock @ 2003-12-29 17:16:31 by panne] Updated my email address - - - - - cdb697bf by Simon Marlow at 2004-01-08T10:14:24+00:00 [haddock @ 2004-01-08 10:14:24 by simonmar] Add instructions for using GHC to pre-process source for feeding to Haddock. - - - - - 8dfc491f by Simon Marlow at 2004-01-09T12:45:46+00:00 [haddock @ 2004-01-09 12:45:46 by simonmar] Add -optP-P to example ghc command line. - - - - - ac41b820 by Simon Marlow at 2004-02-03T11:02:03+00:00 [haddock @ 2004-02-03 11:02:03 by simonmar] Fix bug in index generation - - - - - f4e7edcb by Simon Marlow at 2004-02-10T11:51:16+00:00 [haddock @ 2004-02-10 11:51:16 by simonmar] Don't throw away whitespace at the beginning of a line (experimental fix). - - - - - 68e212d2 by Simon Marlow at 2004-02-10T12:10:08+00:00 [haddock @ 2004-02-10 12:10:08 by simonmar] Fix for previous commit: I now realise why the whitespace was stripped from the beginning of the line. Work around it. - - - - - e7d7f2df by Sven Panne at 2004-02-10T18:38:45+00:00 [haddock @ 2004-02-10 18:38:45 by panne] Make Haddock link with the latest relocated monad transformer package - - - - - 992d4225 by Simon Marlow at 2004-02-16T10:21:35+00:00 [haddock @ 2004-02-16 10:21:35 by simonmar] Add a TODO - - - - - 1ac55326 by Simon Marlow at 2004-03-12T11:33:39+00:00 [haddock @ 2004-03-12 11:33:39 by simonmar] Add an item. - - - - - 0478e903 by Simon Marlow at 2004-03-15T12:24:05+00:00 [haddock @ 2004-03-15 12:24:05 by simonmar] Add an item. - - - - - 6f26d21a by Simon Marlow at 2004-03-18T14:21:29+00:00 [haddock @ 2004-03-18 14:21:29 by simonmar] Fix URL - - - - - 19b6bb99 by Simon Marlow at 2004-03-22T14:09:03+00:00 [haddock @ 2004-03-22 14:09:03 by simonmar] getReExports was bogus: we should really look in the import_env to find the documentation for an entity which we are re-exporting without documentation. Suggested by: Ross Paterson (patch modified by me). - - - - - 5c756031 by Simon Marlow at 2004-03-24T09:42:11+00:00 [haddock @ 2004-03-24 09:42:10 by simonmar] hiding bug from Ross Paterson (fixed in rev 1.59 of Main.hs) - - - - - 1b692e6c by Simon Marlow at 2004-03-24T10:10:50+00:00 [haddock @ 2004-03-24 10:10:50 by simonmar] mkExportItems fix & simplification: we should be looking at the actual exported names (calculated earlier) to figure out which subordinates of a declaration are exported. This means that if you export a record, and name its fields separately in the export list, the fields will still be visible in the documentation for the constructor. - - - - - 90e5e294 by Simon Marlow at 2004-03-24T10:12:08+00:00 [haddock @ 2004-03-24 10:12:08 by simonmar] Make restrictCons take into account record field names too (removing a ToDo). - - - - - 2600efa4 by Simon Marlow at 2004-03-24T10:16:17+00:00 [haddock @ 2004-03-24 10:16:17 by simonmar] Record export tests. - - - - - 6a8575c7 by Simon Marlow at 2004-03-25T09:35:14+00:00 [haddock @ 2004-03-25 09:35:14 by simonmar] restrictTo: fix for restricting a newtype with a record field. - - - - - dcf55a8d by Simon Marlow at 2004-03-25T10:01:42+00:00 [haddock @ 2004-03-25 10:01:42 by simonmar] Fix duplicate instance bug - - - - - f49aa758 by Simon Marlow at 2004-03-25T10:02:41+00:00 [haddock @ 2004-03-25 10:02:41 by simonmar] Duplicate instance bug. - - - - - 7b87344c by Simon Marlow at 2004-03-25T10:29:56+00:00 [haddock @ 2004-03-25 10:29:56 by simonmar] If a name is imported from two places, one hidden and one not, choose the unhidden one to link to. Also, when there's only a hidden module to link to, don't try linking to it. - - - - - 40f44d7b by Simon Marlow at 2004-03-25T15:17:24+00:00 [haddock @ 2004-03-25 15:17:23 by simonmar] Add support for collaspible parts of the page, with a +/- button and a bit of JavaScript. Make the instances collapsible, and collapse them by default. This makes documentation with long lists of instances (eg. the Prelude) much easier to read. Maybe we should give other documentation sections the same treatment. - - - - - 9b64dc0f by Simon Marlow at 2004-03-25T15:20:55+00:00 [haddock @ 2004-03-25 15:20:55 by simonmar] Update - - - - - c2fff7f2 by Simon Marlow at 2004-03-25T15:45:10+00:00 [haddock @ 2004-03-25 15:45:10 by simonmar] Eliminate some unnecessary spaces in the HTML rendering - - - - - b7948ff0 by Simon Marlow at 2004-03-25T16:00:37+00:00 [haddock @ 2004-03-25 16:00:36 by simonmar] Remove all that indentation in the generated HTML to keep the file sizes down. - - - - - da2bb4ca by Sven Panne at 2004-03-27T09:57:58+00:00 [haddock @ 2004-03-27 09:57:57 by panne] Added the new-born haddock.js to the build process and the documentation. - - - - - b99e6f8c by Sven Panne at 2004-03-27T10:32:20+00:00 [haddock @ 2004-03-27 10:32:20 by panne] "type" is a required attribute of the "script" element - - - - - 562b185a by Sven Panne at 2004-03-27T12:52:34+00:00 [haddock @ 2004-03-27 12:52:34 by panne] Add a doctype for the contents page, too. - - - - - f6a99c2d by Simon Marlow at 2004-04-14T10:03:25+00:00 [haddock @ 2004-04-14 10:03:25 by simonmar] fix for single-line comment syntax - - - - - de366303 by Simon Marlow at 2004-04-20T13:08:04+00:00 [haddock @ 2004-04-20 13:08:04 by simonmar] Allow a 'type' declaration to include documentation comments. These will be ignored by Haddock, but at least one user (Johannes Waldmann) finds this feature useful, and it's easy to add. - - - - - fd78f51e by Simon Marlow at 2004-05-07T15:14:56+00:00 [haddock @ 2004-05-07 15:14:56 by simonmar] - update copyright - add version to abstract - - - - - 59f53e32 by Sven Panne at 2004-05-09T14:39:53+00:00 [haddock @ 2004-05-09 14:39:53 by panne] Fix the fix for single-line comment syntax, ------------------------------------------- is now a valid comment line again. - - - - - 8b18f2fe by Simon Marlow at 2004-05-10T10:11:51+00:00 [haddock @ 2004-05-10 10:11:51 by simonmar] Update - - - - - 225a491d by Ross Paterson at 2004-05-19T13:10:23+00:00 [haddock @ 2004-05-19 13:10:23 by ross] Make the handling of "deriving" slightly smarter, by ignoring data constructor arguments that are identical to the lhs. Now handles things like data Tree a = Leaf a | Branch (Tree a) (Tree a) deriving ... - - - - - 37588686 by Mike Thomas at 2004-05-21T06:38:14+00:00 [haddock @ 2004-05-21 06:38:14 by mthomas] Windows exe extensions (bin remains for Unix). - - - - - cf2b9152 by Simon Marlow at 2004-05-25T09:34:54+00:00 [haddock @ 2004-05-25 09:34:54 by simonmar] Add some TODO items - - - - - 4d29cdfc by Simon Marlow at 2004-05-25T10:41:46+00:00 [haddock @ 2004-05-25 10:41:46 by simonmar] Complain if -h is used with --gen-index or --gen-contents, because it'll overwrite the new index/contents. - - - - - 2e0771e0 by Mike Thomas at 2004-05-28T20:17:55+00:00 [haddock @ 2004-05-28 20:17:55 by mthomas] Windows: search for templates in executable directory. Unix: Haddock tries cwd first rather than error if no -l arg. - - - - - 8d10bde1 by Sven Panne at 2004-06-05T16:53:34+00:00 [haddock @ 2004-06-05 16:53:34 by panne] Misc. rpm spec file cleanup, including: * make BuildRoot handling more consistent * added default file attributes * consistent defines and tags - - - - - 59974349 by Sven Panne at 2004-06-05T18:01:00+00:00 [haddock @ 2004-06-05 18:01:00 by panne] More rpm spec file cleanup, including: * added some BuildRequires * changed packager to me, so people can complain at the right place :-] * consistently refer to haskell.org instead of www.haskell.org - - - - - b94d4903 by Simon Marlow at 2004-07-01T11:08:58+00:00 [haddock @ 2004-07-01 11:08:57 by simonmar] Update to the +/- buttons: use a resized image rather than a <button>. Still seeing some strange effects in Konqueror, so might need to use a fixed-size image instead. - - - - - d5278f67 by Sven Panne at 2004-07-04T15:15:55+00:00 [haddock @ 2004-07-04 15:15:55 by panne] Install pictures for +/- pictures, too (JPEG is a strange format for graphics like this, I would have expected GIF or PNG here.) Things look fine with Konqueror and Netscape on Linux now, the only downside is that the cursor doesn't change when positioned above the "button". - - - - - 46dec6c5 by Sven Panne at 2004-07-13T17:59:28+00:00 [haddock @ 2004-07-13 17:59:28 by panne] A quote is a valid part of a Haskell identifier, but it would interfere with an ECMA script string delimiter, so escape it there. - - - - - 1d7bc432 by Simon Marlow at 2004-07-22T08:54:06+00:00 [haddock @ 2004-07-22 08:54:06 by simonmar] Add single quote to $ident, so you can say eg. 'foldl'' to refer to foldl' (the longest match rule is our friend). Bug reported by Adrian Hey <ahey at iee.org> - - - - - f183618b by Krasimir Angelov at 2004-07-27T22:59:35+00:00 [haddock @ 2004-07-27 22:58:23 by krasimir] Add basic support for Microsoft HTML Help 2.0 - - - - - d515d0c2 by Krasimir Angelov at 2004-07-27T23:02:36+00:00 [haddock @ 2004-07-27 23:02:36 by krasimir] escape names in the index - - - - - a5f1be23 by Krasimir Angelov at 2004-07-27T23:05:21+00:00 [haddock @ 2004-07-27 23:05:21 by krasimir] Add jsFile, plusFile and minusFile to the file list - - - - - c4fb4881 by Krasimir Angelov at 2004-07-28T22:12:10+00:00 [haddock @ 2004-07-28 22:12:09 by krasimir] bugfix. Move contentsHtmlFile, indexHtmlFile and subIndexHtmlFile functions to HaddockUtil.hs module to make them accessible from HaddockHH2.hs - - - - - 64d30b1d by Krasimir Angelov at 2004-07-30T22:15:47+00:00 [haddock @ 2004-07-30 22:15:45 by krasimir] more stuffs - support for separated compilation of packages - the contents page now uses DHTML TreeView - fixed copyFile bug - - - - - 133c8c5c by Krasimir Angelov at 2004-07-31T12:04:38+00:00 [haddock @ 2004-07-31 12:04:37 by krasimir] make the DHtmlTree in contents page more portable. The +/- buttons are replaced with new images which looks more beatiful. - - - - - 79040963 by Krasimir Angelov at 2004-07-31T13:10:20+00:00 [haddock @ 2004-07-31 13:10:20 by krasimir] Make DHtmlTree compatible with Mozila browser - - - - - 1a55dc90 by Krasimir Angelov at 2004-07-31T14:52:55+00:00 [haddock @ 2004-07-31 14:52:55 by krasimir] fix - - - - - 85ce0237 by Krasimir Angelov at 2004-07-31T14:53:28+00:00 [haddock @ 2004-07-31 14:53:28 by krasimir] HtmlHelp 1.x - - - - - 3c0c53ba by Krasimir Angelov at 2004-07-31T20:35:21+00:00 [haddock @ 2004-07-31 20:35:21 by krasimir] Added support for DevHelp - - - - - d42b5af1 by Krasimir Angelov at 2004-07-31T21:17:51+00:00 [haddock @ 2004-07-31 21:17:51 by krasimir] Document new features in HtmlHelp - - - - - 790fe21e by Krasimir Angelov at 2004-08-01T15:14:02+00:00 [haddock @ 2004-08-01 15:14:02 by krasimir] add missing imports - - - - - fd7cc6bc by Krasimir Angelov at 2004-08-01T19:52:08+00:00 [haddock @ 2004-08-01 19:52:06 by krasimir] fix some bugs. Now I have got the entire libraries documentation in HtmlHelp 2.0 format. - - - - - 94ad7ac8 by Krasimir Angelov at 2004-08-01T19:53:50+00:00 [haddock @ 2004-08-01 19:53:50 by krasimir] I forgot to add the new +/- images - - - - - f0c65388 by Krasimir Angelov at 2004-08-02T16:25:53+00:00 [haddock @ 2004-08-02 16:25:53 by krasimir] Add root node to the table of contents. All modules in tree are not children of the root - - - - - f50bd85d by Sven Panne at 2004-08-02T18:17:46+00:00 [haddock @ 2004-08-02 18:17:46 by panne] Mainly DocBook fixes - - - - - 09527ce3 by Sven Panne at 2004-08-02T20:02:29+00:00 [haddock @ 2004-08-02 20:02:29 by panne] Fixed -o/--odir handling. Generating the output, especially the directory handling, is getting a bit convoluted nowadays... - - - - - c8fbacfa by Sven Panne at 2004-08-02T20:31:13+00:00 [haddock @ 2004-08-02 20:31:13 by panne] Warning police - - - - - 37830bff by Sven Panne at 2004-08-02T20:32:29+00:00 [haddock @ 2004-08-02 20:32:28 by panne] Nuked dead code - - - - - 13847171 by Sven Panne at 2004-08-02T21:12:27+00:00 [haddock @ 2004-08-02 21:12:25 by panne] Use pathJoin instead of low-level list-based manipulation for FilePaths - - - - - c711d61e by Sven Panne at 2004-08-02T21:16:02+00:00 [haddock @ 2004-08-02 21:16:02 by panne] Removed WinDoze CRs - - - - - b1f7dc88 by Sven Panne at 2004-08-03T19:35:59+00:00 [haddock @ 2004-08-03 19:35:59 by panne] Fixed spelling of "http-equiv" attribute - - - - - dd5f394e by Sven Panne at 2004-08-03T19:44:03+00:00 [haddock @ 2004-08-03 19:44:03 by panne] Pacify W3C validator: * Added document encoding (currently UTF-8, not sure if this is completely correct) * Fixed syntax of `id' attributes * Added necessary `alt' attribute for +/- images Small layout improvement: * Added space after +/- images (still not perfect, but better than before) - - - - - 919c47c6 by Sigbjorn Finne at 2004-08-03T19:45:11+00:00 [haddock @ 2004-08-03 19:45:11 by sof] make it compile with <= ghc-6.1 - - - - - 4d6f01d8 by Sigbjorn Finne at 2004-08-03T19:45:30+00:00 [haddock @ 2004-08-03 19:45:30 by sof] ffi wibble - - - - - 4770643a by Sven Panne at 2004-08-03T20:47:46+00:00 [haddock @ 2004-08-03 20:47:46 by panne] Fixed CSS for button style. Note that only "0" is a valid measure without a unit! - - - - - 14aaf2e5 by Sven Panne at 2004-08-03T21:07:59+00:00 [haddock @ 2004-08-03 21:07:58 by panne] Improved spacing of dynamic module tree - - - - - 97c3579a by Simon Marlow at 2004-08-09T11:03:04+00:00 [haddock @ 2004-08-09 11:03:04 by simonmar] Add FormatVersion Patch submitted by: George Russell <ger at informatik.uni-bremen.de> - - - - - af7f8c03 by Simon Marlow at 2004-08-09T11:55:07+00:00 [haddock @ 2004-08-09 11:55:05 by simonmar] Add support for a short description for each module, which is included in the contents. The short description should be given in a "Description: " field of the header. Included in this patch are changes that make the format of the header a little more flexible. From the comments: -- all fields in the header are optional and have the form -- -- [spaces1][field name][spaces] ":" -- [text]"\n" ([spaces2][space][text]"\n" | [spaces]"\n")* -- where each [spaces2] should have [spaces1] as a prefix. -- -- Thus for the key "Description", -- -- > Description : this is a -- > rather long -- > -- > description -- > -- > The module comment starts here -- -- the value will be "this is a .. description" and the rest will begin -- at "The module comment". The header fields must be in the following order: Module, Description, Copyright, License, Maintainer, Stability, Portability. Patches submitted by: George Russell <ger at informatik.uni-bremen.de>, with a few small changes be me, mostly to merge with other recent changes. ToDo: document the module header. - - - - - 7b865ad3 by Simon Marlow at 2004-08-10T14:09:57+00:00 [haddock @ 2004-08-10 14:09:57 by simonmar] Fixes for DevHelp/HtmlHelp following introduction of short module description. - - - - - 814766cd by Simon Marlow at 2004-08-10T14:33:46+00:00 [haddock @ 2004-08-10 14:33:45 by simonmar] Fixes to installation under Windows. - - - - - 39cf9ede by Simon Marlow at 2004-08-12T12:08:23+00:00 [haddock @ 2004-08-12 12:08:23 by simonmar] Avoid using string-gap tricks. - - - - - b6d78551 by Simon Marlow at 2004-08-13T10:53:21+00:00 [haddock @ 2004-08-13 10:53:21 by simonmar] Update - - - - - eaae7417 by Simon Marlow at 2004-08-13T10:53:50+00:00 [haddock @ 2004-08-13 10:53:50 by simonmar] Test for primes in quoted links - - - - - 68c34f06 by Sven Panne at 2004-08-16T19:59:38+00:00 [haddock @ 2004-08-16 19:59:36 by panne] XMLification - - - - - 7f45a6f9 by Sven Panne at 2004-08-18T16:42:54+00:00 [haddock @ 2004-08-18 16:42:54 by panne] Re-added indices + minor fixes - - - - - 8a5dd97c by Sigbjorn Finne at 2004-08-25T17:15:42+00:00 [haddock @ 2004-08-25 17:15:42 by sof] backquote HADDOCK_VERSION defn for <= ghc-6.0.x; believe this is only needed under mingw - - - - - 4b1b42ea by Sven Panne at 2004-08-26T20:08:50+00:00 [haddock @ 2004-08-26 20:08:49 by panne] SGML is dead, long live DocBook XML! Note: The BuildRequires tags in the spec files are still incomplete and the documentation about the DocBook tools needs to be updated, too. Stay tuned... - - - - - 8d52cedb by Sven Panne at 2004-08-26T21:03:19+00:00 [haddock @ 2004-08-26 21:03:19 by panne] Updated BuildRequires tags. Alas, there seems to be no real standard here, so your mileage may vary... At least the current specs should work on SuSE Linux. - - - - - e6982912 by Sigbjorn Finne at 2004-08-30T15:44:59+00:00 [haddock @ 2004-08-30 15:44:59 by sof] escape HADDOCK_VERSION double quotes on all platforms when compiling with <=6.0.x - - - - - b3fbc867 by Simon Marlow at 2004-08-31T13:09:42+00:00 [haddock @ 2004-08-31 13:09:42 by simonmar] Avoid GHC/shell versionitis and create Version.hs - - - - - c359e16a by Sven Panne at 2004-09-05T19:12:33+00:00 [haddock @ 2004-09-05 19:12:32 by panne] * HTML documentation for "foo.xml" goes into directory "foo" again, not "foo-html". This is nicer and consistent with the behaviour for building the docs from SGML. * Disabled building PostScript documentation in the spec files for now, there are some strange issues with the FO->PS conversion for some files which have to be clarified first. - - - - - c68b1eba by Sven Panne at 2004-09-24T07:04:38+00:00 [haddock @ 2004-09-24 07:04:38 by panne] Switched the default state for instances and the module hierarchy to non-collapsed. This can be reversed when we finally use cookies from JavaScript to have a more persistent state. Previously going back and forth in the documentation was simply too annoying because everything was collapsed again and therefore the documentation was not easily navigatable. - - - - - dfb32615 by Simon Marlow at 2004-09-30T08:21:29+00:00 [haddock @ 2004-09-30 08:21:29 by simonmar] Add a feature request - - - - - 45ff783c by Sven Panne at 2004-10-23T19:54:00+00:00 [haddock @ 2004-10-23 19:54:00 by panne] Improved the Cygwin/MinGW chaos a little bit. There is still confusion about host platform vs. target platform... - - - - - 5f644714 by Krasimir Angelov at 2004-10-28T16:01:51+00:00 [haddock @ 2004-10-28 16:01:51 by krasimir] update for ghc-6.3+ - - - - - 92d9753e by Sven Panne at 2004-11-01T16:39:01+00:00 [haddock @ 2004-11-01 16:39:01 by panne] Revert previous commit: It's Network.URI which should be changed, not Haddock. - - - - - 05f70f6e by Simon Marlow at 2005-01-04T16:15:51+00:00 [haddock @ 2005-01-04 16:15:51 by simonmar] parser fix: allow qualified specialids. - - - - - 47870837 by Simon Marlow at 2005-01-04T16:16:54+00:00 [haddock @ 2005-01-04 16:16:54 by simonmar] Add a test - - - - - ff11fc2c by Ross Paterson at 2005-01-10T19:18:22+00:00 [haddock @ 2005-01-10 19:18:22 by ross] Render non-ASCII characters using numeric character references, to simplify charset issues. There's a META tag saying the charset is UTF-8, but GHC outputs characters as raw bytes. Ideally we need an encoding on the input side too, primarily in comments, because source files containing non-ASCII characters aren't portable between locales. - - - - - eba2fc4e by Simon Marlow at 2005-01-11T10:44:37+00:00 [haddock @ 2005-01-11 10:44:37 by simonmar] Remove string gap - - - - - b899a381 by Ross Paterson at 2005-01-13T11:41:33+00:00 [haddock @ 2005-01-13 11:41:33 by ross] recognize SGML-style numeric character references &#ddd; or &#xhhhh; and translate them into Chars. - - - - - 106e3cf0 by Ross Paterson at 2005-01-13T14:43:41+00:00 [haddock @ 2005-01-13 14:43:41 by ross] also allow uppercase X in hexadecimal character references (like SGML) - - - - - e8f54f25 by Ross Paterson at 2005-01-13T14:44:24+00:00 [haddock @ 2005-01-13 14:44:24 by ross] Describe numeric character references. - - - - - 914ccdce by Sven Panne at 2005-01-15T18:44:48+00:00 [haddock @ 2005-01-15 18:44:45 by panne] Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later. - - - - - 6ab20e84 by Sven Panne at 2005-01-16T12:18:26+00:00 [haddock @ 2005-01-16 12:18:26 by panne] Trim imports - - - - - efb81da9 by Sven Panne at 2005-01-16T12:58:08+00:00 [haddock @ 2005-01-16 12:58:03 by panne] Correctly handle the new order of arguments for the combining function given to fromListWith. - - - - - e27b5834 by Sven Panne at 2005-01-16T14:14:41+00:00 [haddock @ 2005-01-16 14:14:39 by panne] Data.Map.unions is left-biased. - - - - - dae3cc3e by Sven Panne at 2005-01-16T14:22:44+00:00 [haddock @ 2005-01-16 14:22:44 by panne] Added the last missing "flip" to get identical HTML output as previous versions. - - - - - 951d8408 by Sven Panne at 2005-01-16T14:37:10+00:00 [haddock @ 2005-01-16 14:37:10 by panne] Refactored Text.PrettyPrint legacy hell into a separate module. - - - - - f1c4b892 by Sven Panne at 2005-01-16T15:41:25+00:00 [haddock @ 2005-01-16 15:41:21 by panne] Cleaned up imports and dropped support for GHC < 5.03, it never worked, anyway. - - - - - 60824c6e by Simon Marlow at 2005-01-18T10:02:48+00:00 [haddock @ 2005-01-18 10:02:48 by simonmar] Add a TODO - - - - - a8c82f23 by Krasimir Angelov at 2005-01-28T23:19:39+00:00 [haddock @ 2005-01-28 23:19:39 by krasimir] import Foreign/Foreign.C are required for Windows - - - - - d8450a23 by Simon Marlow at 2005-02-02T16:23:04+00:00 [haddock @ 2005-02-02 16:23:00 by simonmar] Revamp the linking strategy in Haddock. Now name resolution is done in two phases: - first resolve everything to original names, like a Haskell compiler would. - then, figure out the "home" location for every entity, and point all the links to there. The home location is the lowest non-hidden module in the import hierarchy that documents the entity. If there are multiple candidates, one is chosen at random. Also: - Haddock should not generate any HTML with dangling links any more. Unlinked references are just rendered as plain text. - Error reporting is better: if we can't find a link destination for an entity reference, we now emit a warning. - - - - - 1cce71d0 by Simon Marlow at 2005-02-03T13:42:19+00:00 [haddock @ 2005-02-03 13:42:19 by simonmar] - add --ignore-all-exports flag, which behaves as if every module has the ignore-exports attribute (requested by Chris Ryder). - add --hide option to hide a module on the command line. - add --use-package option to get Haddock info for a package from ghc-pkg (largely untested). - remove reexports from the .haddock file, they aren't used any more. - - - - - 767123ef by Ross Paterson at 2005-02-03T16:17:37+00:00 [haddock @ 2005-02-03 16:17:37 by ross] fix typo for < 6.3 - - - - - 0c680c04 by Simon Marlow at 2005-02-04T12:03:31+00:00 [haddock @ 2005-02-04 12:03:31 by simonmar] Fix bug in renameExportItems that meant links in instances weren't being renamed properly. - - - - - ff7abe5f by Simon Marlow at 2005-02-04T12:15:53+00:00 [haddock @ 2005-02-04 12:15:52 by simonmar] Add attribute #not-home, to indicate that the current module should not be considered to be a home module for the each entity it exports, unless there is no other module that exports the entity. - - - - - fc2cfd27 by Simon Marlow at 2005-02-04T12:40:02+00:00 [haddock @ 2005-02-04 12:40:02 by simonmar] Update the documentation w.r.t. home modules and the not-home attribute. - - - - - 26b8ddf7 by Ross Paterson at 2005-02-04T13:36:06+00:00 [haddock @ 2005-02-04 13:36:05 by ross] sort lists of instances by - arity of the type constructors (so higher-kinded instances come first) - name of the class - argument types - - - - - 26bfb19c by Simon Marlow at 2005-02-23T15:57:12+00:00 [haddock @ 2005-02-23 15:57:12 by simonmar] Fix documentation regarding the module attributes. - - - - - 9c3afd02 by Simon Marlow at 2005-02-28T16:18:17+00:00 [haddock @ 2005-02-28 16:18:17 by simonmar] version 0.7 - - - - - a95fd63f by Simon Marlow at 2005-02-28T16:22:08+00:00 [haddock @ 2005-02-28 16:22:08 by simonmar] Attempt to fix the layout of the package names in the contents. Having tried just about everything, the only thing I can get to work reliably is to make the package names line up on a fixed offset from the left margin. This obviously isn't ideal, so anyone else that would like to have a go at improving it is welcome. One option is to remove the +/- buttons from the contents list and go back to a plain table. The contents page now uses CSS for layout rather than tables. It seems that most browsers have different interpretations of CSS layout, so only the simplest things lead to consistent results. - - - - - 905d42f7 by Simon Marlow at 2005-03-01T17:16:42+00:00 [haddock @ 2005-03-01 17:16:40 by simonmar] Another attempt at lining up the package names on the contents page. Now, they line up with Konqueror, and almost line up with Firefox & IE (different layout in each case). - - - - - a0e1d178 by Wolfgang Thaller at 2005-03-09T08:28:39+00:00 [haddock @ 2005-03-09 08:28:39 by wolfgang] Hack haddock's lexer to accept the output from Apple's broken version of cpp (Apple's cpp leaves #pragma set_debug_pwd directives in it's output). - - - - - 9e1eb784 by Simon Marlow at 2005-04-22T14:27:15+00:00 [haddock @ 2005-04-22 14:27:15 by simonmar] Add a TODO item - - - - - 23281f78 by Ross Paterson at 2005-05-18T12:41:59+00:00 [haddock @ 2005-05-18 12:41:59 by ross] fix 3 bugs in --use-package, and document it. - - - - - 00074a68 by Sven Panne at 2005-05-21T12:35:29+00:00 [haddock @ 2005-05-21 12:35:29 by panne] Warning/versionitis police - - - - - 341fa822 by Simon Marlow at 2005-06-15T15:43:21+00:00 [haddock @ 2005-06-15 15:43:21 by simonmar] Allow "licence" as an alternate spelling of "license" - - - - - 3b953f8b by Simon Marlow at 2005-06-16T08:14:12+00:00 [haddock @ 2005-06-16 08:14:12 by simonmar] wibble - - - - - abfd9826 by Simon Marlow at 2005-06-27T14:46:40+00:00 [haddock @ 2005-06-27 14:46:40 by simonmar] name hierarchical HTML files as A-B-C.html instead of A.B.C.html. The old way confused Apache because the extensions are sometimes interpreted as having special meanings. - - - - - a01eea00 by Simon Marlow at 2005-08-04T13:59:40+00:00 [haddock @ 2005-08-04 13:59:40 by simonmar] 0.7 changes - - - - - 170ef87e by Simon Marlow at 2005-08-04T15:08:03+00:00 [haddock @ 2005-08-04 15:08:03 by simonmar] spec file from Jens Peterson - - - - - 7621fde4 by Simon Marlow at 2005-08-04T15:59:30+00:00 [haddock @ 2005-08-04 15:59:30 by simonmar] replace mingw tests with $(Windows) - - - - - a20739bb by Sven Panne at 2005-08-05T07:01:12+00:00 [haddock @ 2005-08-05 07:01:12 by panne] Reverted to previous version (but with bumped version number), the last commit broke RPM building on SuSE systems due to differently named dependencies. As a clarification: All .spec files in the repository have to work at least on SuSE, because that's the system I'm using. And as "Mr. Building Police", I reserve me the right to keep them that way... >:-) It might very well be the case that we need different .spec files for different platforms, so packagers which are unhappy with the current .spec files should contact me, stating the actual problems. - - - - - 4afb15cf by Simon Marlow at 2005-10-05T10:51:45+00:00 [haddock @ 2005-10-05 10:51:45 by simonmar] Add a bug - - - - - 60f69f82 by Simon Marlow at 2005-10-05T12:52:03+00:00 [haddock @ 2005-10-05 12:52:03 by simonmar] Document new behaviour of -s option - - - - - f7e520ca by Simon Marlow at 2005-10-10T15:02:55+00:00 [haddock @ 2005-10-10 15:02:55 by simonmar] extractRecSel: ignore non-record constructors (fixes a crash when using datatypes with a mixture of record and non-record style constructors). - - - - - b2edbedb by Simon Marlow at 2005-10-14T09:44:21+00:00 Start CHANGES for 0.8 - - - - - 21c7ac8d by Simon Marlow at 2005-10-14T23:11:19+00:00 First cut of Cabal build system - - - - - 766cecdd by Simon Marlow at 2005-10-29T08:14:43+00:00 Add configure script and Makefile for the docs Add a separate configure script and build system for building the documentation. The configure and Makefile code is stolen from fptools. This is left as a separate build system so that the main Cabal setup doesn't require a Unix build environment or DocBook XML tools. - - - - - aa36c783 by Duncan Coutts at 2006-01-17T19:29:55+00:00 Add a --wiki=URL flag to add a per-module link to a correspondng wiki page. So each html page gets an extra link (placed next to the source code and contents links) to a corresponding wiki page. The idea is to let readers contribute their own notes, examples etc to the documentation. Also slightly tidy up the code for the --source option. - - - - - e06e2da2 by Simon Marlow at 2006-01-18T09:28:15+00:00 TODO: documnet --wiki - - - - - 17adfda9 by Duncan Coutts at 2006-01-19T20:17:59+00:00 Add an optional wiki link for each top level exported name. In each module, for each "top level" exported entity we add a hyper link to a corresponding wiki page. The link url gets the name of the exported entity as a '#'-style anchor, so if there is an anchor in the page with that name then the users browser should jump directly to it. By "top level" we mean functions, classes, class members and data types (data, type, newtype), but not data constructors, class instances or data type class membership. The link is added at the right of the page and in a small font. Hopefully this is the right balance of visibility/distraction. We also include a link to the wiki base url in the contents and index pages. - - - - - f52324bb by Duncan Coutts at 2006-01-19T20:28:27+00:00 Rewrite pathJoin to only add a path separator when necessary. When the path ends in a file seperator there is no need to add another. Now using "--wiki=http://blah.com/foo/" should do the right thing. (Code snippet adapted from Isaac's FilePath package.) - - - - - 43bb89fa by Duncan Coutts at 2006-01-21T17:15:27+00:00 Teach haddock about line pragmas and add accurate source code links Teach haddock about C and Haskell style line pragmas. Extend the lexer/parser's source location tracking to include the file name as well as line/column. This way each AST item that is tagged with a SrcLoc gets the original file name too. Use this original file name to add source links to each exported item, in the same visual style as the wiki links. Note that the per-export source links are to the defining module rather than whichever module haddock pretends it is exported from. This is what we want for source code links. The source code link URL can also contain the name of the export so one could implement jumping to the actual location of the function in the file if it were linked to an html version of the source rather than just plain text. The name can be selected with the %N wild card. So for linking to the raw source code one might use: --source=http://darcs/haskell.org/foo/%F Or for linking to html syntax highlighted code: --source=http://darcs/haskell.org/foo/%M.html#%N - - - - - edd9f229 by Duncan Coutts at 2006-01-22T00:02:00+00:00 Extend URL variable expansion syntax and add source links to the contents page Like the wiki link on the contents and index page, add a source code link too. Extend the wiki & source URL variable expansion syntax. The original syntax was: %F for the source file name (the .hs version only, not the .lhs or .hs.pp one) %M for the module name (with '.' replaced by '/') The new syntax is: %F or %{FILE} for the original source file name %M or %{MODULE} for the module name (no replacements) %N or %{NAME} for the function/type export name %K or %{KIND} for a type/value flag "t" or "v" with these extensions: %{MODULE/./c} to replace the '.' module seperator with any other char c %{VAR|some text with the % char in it} which means if the VAR is not in use in this URL context then "" else replace the given text with the '%' char replaced by the string value of the VAR. This extension allows us to construct URLs wit optional parts, since the module/file name is not available for the URL in the contents/index pages and the value/type name is not available for the URL at the top level of each module. - - - - - eb3c6ada by Duncan Coutts at 2006-01-23T13:42:34+00:00 Remove the complex substitutions and add more command line flags instead. Instead of incomprehensable URL substitutions like ${MODULE/./-|?m=%} we now use three seperate command line flags for the top level, per-module and per-entity source and wiki links. They are: --source-base, --source-module, --source-entity --comments-base, --comments-module, --comments-entity We leave -s, --source as an alias for --source-module which is how that option behaved previously. The long forms of the substitutions are still available, ${FILE} ${MODULE} etc and the only non-trivial substitution is ${MODULE/./c} to replace the '.' characters in the module name with any other character c. eg ${MODULE/./-} Seperating the source and wiki url flags has the added bonus that they can be turned on or off individually. So users can have per-module links for example without having to also have per-entity links.` - - - - - a2f0f2af by Duncan Coutts at 2006-01-23T13:54:52+00:00 Make the --help output fit in 80 columns. This is a purely cosmetic patch, feel free to ignore it. The only trickery going on is that we don't display the deprecated -s, --source flags in the help message, but we do still accept them. - - - - - 2d3a4b0c by Duncan Coutts at 2006-01-23T14:12:16+00:00 Add documentation for the new --source-* and --comments-* command line options - - - - - 1a82a297 by Simon Marlow at 2006-01-23T17:03:27+00:00 fix markup - - - - - 100d464a by Duncan Coutts at 2006-01-23T18:31:13+00:00 remove a couple TODO items that have been done The --wiki, or rather the --comment-* options are now documented. There is probably no need to have haddock invoke unlit or cpp itself since it can now pick up the line pragmas to get the source locations right. Tools like Cabal will arrange for preprocessors to be run so there is less of a need for tools like haddock to do it themselves. - - - - - 3162fa91 by Simon Marlow at 2006-01-24T14:21:56+00:00 add a test I had lying around - - - - - 98947063 by Simon Marlow at 2006-01-31T13:52:54+00:00 add scabal-version field - - - - - c41876e6 by Neil Mitchell at 2006-02-26T17:48:21+00:00 Add Hoogle output option - - - - - f86fb9c0 by Simon Marlow at 2006-03-08T09:15:20+00:00 add haskell.vim Contributed by Brad Bowman <bsb at bereft.net>, thanks! - - - - - 35d3c511 by benjamin.franksen at 2006-03-03T22:39:54+00:00 fixed libdir (/html was missing) - - - - - 4d08fd7d by Simon Marlow at 2006-03-10T11:13:31+00:00 add PatternGuards extension - - - - - 3f095e70 by Simon Marlow at 2006-03-13T11:40:42+00:00 bug fixes from Brad Bowman - - - - - 8610849d by Sven Panne at 2006-03-19T17:02:56+00:00 Fixed Cabal/RPM build - - - - - 34a994d6 by sven.panne at 2006-04-20T12:39:23+00:00 Avoid pattern guards Due to the use of pattern guards in Haddock, GHC was called with -fglasgow-exts. This in turn enables bang patterns, too, which broke the Haddock build. Removing some unnecessary pattern guards seemed to be the better way of fixing this instead of using a pragma to disable pattern guards. - - - - - bb523f51 by Ross Paterson at 2006-04-24T09:03:25+00:00 extend 'deriving' heuristic a little If an argument of a data constructor has a type variable head, it is irreducible and the same type class can be copied into the constraint. (Formerly we just did this for type variable arguments.) - - - - - dab9fe7a by Simon Marlow at 2006-04-26T10:02:31+00:00 record an idea - - - - - 748b7078 by Simon Marlow at 2006-05-08T08:28:53+00:00 add section about deriving - - - - - 11252ea1 by Simon Marlow at 2006-05-24T15:43:10+00:00 replace a fatal error in lexChar with a parseError - - - - - 382c9411 by Simon Marlow at 2006-05-24T15:45:47+00:00 add a bug - - - - - b79272f5 by Simon Marlow at 2006-05-24T15:46:29+00:00 add a bug report - - - - - 912edf65 by David Waern at 2006-07-10T19:09:23+00:00 Initial modifications -- doesn't compile - - - - - a3c7ba99 by David Waern at 2006-07-11T00:54:19+00:00 More porting work -- doesn't compile - - - - - 0a173d19 by David Waern at 2006-07-11T11:30:03+00:00 Make the repos temporarily compile and illustrate a problem - - - - - bad316de by David Waern at 2006-07-11T15:43:47+00:00 Progress on the porting process - - - - - bbf12d02 by David Waern at 2006-07-11T23:07:44+00:00 More progress on the porting -- first pass starting to shape up - - - - - de580ba2 by David Waern at 2006-07-20T17:48:30+00:00 More progress -- still on phase1 - - - - - 75a917a2 by David Waern at 2006-07-23T18:22:43+00:00 More work on pass1 -- mostly done - - - - - 6697b3f7 by David Waern at 2006-07-23T22:17:40+00:00 More work, started working on the renaming phase -- this code will need a cleanup soon :) - - - - - 82a5bcbb by David Waern at 2006-07-29T16:16:43+00:00 Add instances, build renaming environment, start on the renamer - - - - - c3f8f4f1 by David Waern at 2006-07-29T21:37:48+00:00 Complete the renamer - - - - - 7e00d464 by David Waern at 2006-07-30T21:01:57+00:00 Start porting the Html renderer - - - - - f04ce121 by David Waern at 2006-08-09T20:04:56+00:00 More Html rendering progress - - - - - 20c21b53 by David Waern at 2006-08-10T17:37:47+00:00 More progress - - - - - d7097e0d by David Waern at 2006-08-11T20:31:51+00:00 Cleanup - - - - - a7351e86 by David Waern at 2006-08-12T11:44:47+00:00 Render H98 Data declarations - - - - - 3fb2208e by David Waern at 2006-08-12T17:15:34+00:00 Perfect rendering of Test.hs - - - - - 454fd062 by David Waern at 2006-08-13T21:57:08+00:00 Misc fixes and interface load/save - - - - - 7ef7e7be by David Waern at 2006-08-14T00:56:07+00:00 Some refactoring - - - - - a7d3efef by David Waern at 2006-08-19T20:07:55+00:00 Adapt to latest GHC - - - - - 5fc3c0d7 by David Waern at 2006-08-20T21:28:11+00:00 Move interface read/write to its own module + some cleanup - - - - - 037e011c by David Waern at 2006-08-20T21:38:24+00:00 Small cleanup - - - - - da3a1023 by David Waern at 2006-09-03T16:05:22+00:00 Change mode to BatchCompile to avoid GHC API bug - - - - - 3cc9be3b by David Waern at 2006-09-03T16:06:59+00:00 Starting work on GADT rendering - - - - - 94506037 by David Waern at 2006-09-03T20:02:48+00:00 Compensate for change of export list order in GHC - - - - - c2cec4eb by David Waern at 2006-09-04T20:53:01+00:00 Rename a function - - - - - 9a9735ba by David Waern at 2006-09-05T15:51:21+00:00 Change version number to 2.0 - - - - - 3758a714 by David Waern at 2006-09-05T15:51:49+00:00 Align comment properly - - - - - 68478d9e by David Waern at 2006-09-15T18:03:00+00:00 Remove interface reading/writing code and use the GHC api for creating package environments instead - - - - - d2eedd95 by David Waern at 2006-09-15T18:05:29+00:00 Change the executable name to haddock-ghc-nolib - - - - - fcfbcf66 by David Waern at 2006-09-15T18:05:45+00:00 Small source code cleanup - - - - - d08eb017 by David Waern at 2006-09-15T18:06:21+00:00 Remove handling of --package flag - - - - - b8a4cf53 by David Waern at 2006-09-15T18:07:16+00:00 Remove commented-out code - - - - - bef0a684 by David Waern at 2006-09-15T18:37:57+00:00 Don't warn about missing links to () - - - - - e7d25fd7 by David Waern at 2006-09-15T19:50:49+00:00 Remove Interface and Binary2 modules - - - - - 9894f2a1 by David Waern at 2006-09-15T19:53:43+00:00 Remove debug printing from HaddockHtml - - - - - a0e7455d by David Waern at 2006-09-16T00:16:29+00:00 Comments only - - - - - d5b26fa7 by David Waern at 2006-09-16T00:16:57+00:00 Refactor PackageData creation code and start on building the doc env propery (unfinished) - - - - - 06aaa779 by David Waern at 2006-09-16T00:19:25+00:00 Better comments in Main.hs - - - - - 1a52d1b4 by David Waern at 2006-09-18T22:17:11+00:00 Comments and spacing change - - - - - e5a97767 by David Waern at 2006-09-21T17:02:45+00:00 Remove unnecessary fmapM import in Main - - - - - 9d0f9d3a by David Waern at 2006-09-22T18:07:07+00:00 Make import list in HaddockHtml prettier - - - - - 3452f662 by David Waern at 2006-09-22T18:08:47+00:00 Refactor context rendering - - - - - 12d0a6d0 by David Waern at 2006-09-22T18:09:52+00:00 Do proper HsType rendering (inser parentheses correctly) - - - - - 2c20c2f9 by David Waern at 2006-09-22T18:10:45+00:00 Fix a bug in Main.toHsType - - - - - c5396443 by David Waern at 2006-09-22T18:11:16+00:00 Skip external package modules sort for now - - - - - 3fb95547 by David Waern at 2006-09-22T20:35:40+00:00 Take away trailin "2" on all previously clashing type names - - - - - 2174755f by David Waern at 2006-09-22T20:51:43+00:00 Remove unused imports in Main - - - - - 1e9f7a39 by David Waern at 2006-09-22T20:52:11+00:00 Fix a comment in Main - - - - - 32d9e028 by David Waern at 2006-10-05T16:40:11+00:00 Merge with changes to ghc HEAD - - - - - 3058c8f5 by David Waern at 2006-10-05T16:41:02+00:00 Comment fixes - - - - - b9c217ec by David Waern at 2006-10-05T16:49:59+00:00 Filter out more builtin type constructors from warning messages - - - - - 67e7d252 by David Waern at 2006-10-05T19:38:22+00:00 Refactoring -- better structured pass1 - - - - - cd21c0c1 by David Waern at 2006-10-05T19:44:42+00:00 Remove read/dump interface flags - - - - - 313f9e69 by David Waern at 2006-10-05T19:49:26+00:00 Remove unused pretty printing - - - - - 480f09d1 by David Waern at 2006-12-28T13:22:24+00:00 Update to build with latest GHC HEAD - - - - - 63dccfcb by David Waern at 2007-01-05T01:38:45+00:00 Fixed a bug so that --ghc-flag works correctly - - - - - 3117dadc by David Waern at 2006-12-29T18:53:39+00:00 Automatically get the GHC lib dir - - - - - 9dc84a5c by David Waern at 2006-12-29T19:58:53+00:00 Comments - - - - - 0b0237cc by David Waern at 2007-01-05T16:48:30+00:00 Collect docs based on SrcLoc, syncing with removal of DeclEntity from GHC - - - - - a962c256 by David Waern at 2007-01-05T17:02:47+00:00 Add tabs in haddock.cabal - - - - - 0ca30c97 by David Waern at 2007-01-05T17:04:11+00:00 Add GHCUtils.hs - - - - - c0ab9abe by David Waern at 2007-01-10T11:43:08+00:00 Change package name to haddock-ghc, version 0.1 - - - - - 38e18b27 by David Waern at 2007-01-12T12:03:52+00:00 No binder name for foreign exports - - - - - d18587ab by David Waern at 2007-01-12T12:08:15+00:00 Temp record - - - - - ba6251a0 by David Waern at 2007-01-12T18:27:55+00:00 Remove read/dump-interface (again) - - - - - f4ba2b39 by David Waern at 2007-01-12T18:31:36+00:00 Remove DocOption, use the GHC type - - - - - 511be8bd by David Waern at 2007-01-12T18:32:41+00:00 Use exceptions instead of Either when loading package info - - - - - 0f2144d8 by David Waern at 2007-01-12T18:33:23+00:00 Small type change - - - - - 77507eb7 by David Waern at 2007-01-12T18:33:59+00:00 Remove interface file read/write - - - - - 0ea1e14f by David Waern at 2007-01-17T21:40:26+00:00 Add trace_ppr to GHCUtils - - - - - 3878b493 by David Waern at 2007-01-17T21:40:53+00:00 Sort external package modules and build a doc env - - - - - 8dc323fc by David Waern at 2007-01-17T21:42:41+00:00 Remove comment - - - - - f4c5b097 by David Waern at 2007-01-18T23:22:18+00:00 Add haddock-ghc.cabal and remove ghc option pragma in source file - - - - - da242b2c by David Waern at 2007-01-18T23:22:46+00:00 Remove some tabs - - - - - 288ed096 by David Waern at 2007-01-18T23:39:28+00:00 Moved the defaultErrorHandler to scope only over sortAndCheckModules for now - - - - - 4dd150fe by David Waern at 2007-02-03T21:23:56+00:00 Let restrictCons handle infix constructors - - - - - 97893442 by David Waern at 2007-02-04T16:26:00+00:00 Render infix data constructors - - - - - da89db72 by David Waern at 2007-02-04T16:26:33+00:00 CHange project name to Haddock-GHC - - - - - e93d48af by David Waern at 2007-02-04T16:59:08+00:00 Render infix type constructors properly - - - - - 357bc99b by David Waern at 2007-02-04T17:37:08+00:00 Insert spaces around infix function names - - - - - ab6cfc49 by David Waern at 2007-02-04T17:59:54+00:00 Do not list entities without documentation - - - - - 04249c7e by David Waern at 2007-02-04T19:16:25+00:00 Add GADT support (quite untested) - - - - - 2c223f8d by David Waern at 2007-02-04T19:25:10+00:00 Add package file write/save again! - - - - - b07ed218 by David Waern at 2007-02-04T19:33:02+00:00 Comment out minf_iface based stuff - - - - - 953d1fa7 by David Waern at 2007-02-05T00:12:23+00:00 Solve conflicts - - - - - 593247fc by David Waern at 2007-02-06T19:48:48+00:00 Remove -package flag, GHC's can be used instead - - - - - f658ded2 by David Waern at 2007-02-06T20:50:44+00:00 Start for support of ATs - - - - - 97f9e913 by David Waern at 2007-02-06T20:52:27+00:00 Wibble - - - - - 2ce8e4cf by David Waern at 2007-02-16T12:09:49+00:00 Add the DocOptions change - - - - - dee4a9b5 by David Waern at 2007-03-06T01:24:48+00:00 Wibble - - - - - 7cb99d18 by David Waern at 2007-03-06T01:24:58+00:00 Change version to 2.0 and executable name to haddock - - - - - c5aa02bc by David Waern at 2007-03-08T15:59:49+00:00 Go back to -B flag - - - - - 3a349201 by David Waern at 2007-03-09T13:31:59+00:00 Better exception handling and parsing of GHC flags - - - - - 05a69b71 by David Waern at 2007-03-09T17:45:44+00:00 Remove commented-out DocEntity printing - - - - - 755032cb by davve at dtek.chalmers.se at 2007-03-23T23:30:20+00:00 Remove a file that shouldn't be here - - - - - a7077e5f by davve at dtek.chalmers.se at 2007-03-24T03:58:48+00:00 Remove an import - - - - - 6f55aa8b by davve at dtek.chalmers.se at 2007-03-25T00:46:48+00:00 Start work on Haddock API - - - - - f0199480 by davve at dtek.chalmers.se at 2007-03-25T00:56:36+00:00 Prettify some comments - - - - - f952f9d1 by davve at dtek.chalmers.se at 2007-03-25T00:56:53+00:00 Remove ppr in HaddockTypes - - - - - bc594904 by davve at dtek.chalmers.se at 2007-03-25T00:57:53+00:00 Remove commented out doc env inference - - - - - 11ebf08d by davve at dtek.chalmers.se at 2007-03-25T01:23:25+00:00 De-flatten the namespace - - - - - f696b4bc by davve at dtek.chalmers.se at 2007-03-25T03:21:48+00:00 Add missing stuff to API - - - - - 9a2a04c3 by davve at dtek.chalmers.se at 2007-03-25T03:22:02+00:00 Wibble - - - - - 7d04a6d5 by davve at dtek.chalmers.se at 2007-03-25T03:22:08+00:00 Avoid a GHC bug with parseStaticFlags [] - - - - - 4d2820ba by davve at dtek.chalmers.se at 2007-03-26T04:57:01+00:00 Add fall-through case to mkExportItem - - - - - 6ebc8950 by Stefan O'Rear at 2007-03-26T04:14:53+00:00 Add shebang line to Setup.lhs - - - - - 80966ec5 by davve at dtek.chalmers.se at 2007-03-26T05:24:26+00:00 Fix stupid compile error - - - - - 1ea1385d by davve at dtek.chalmers.se at 2007-04-05T17:19:56+00:00 Do save/read of interface files properly - - - - - 0e4f6541 by David Waern at 2007-04-10T21:08:36+00:00 Add version to ghc dependency - - - - - b0499b63 by David Waern at 2007-04-10T21:37:08+00:00 Change package name to haddock - - - - - 9d50d27e by David Waern at 2007-04-24T00:22:14+00:00 Use filepath package instead of FilePath - - - - - 87c7fcdf by David Waern at 2007-07-10T21:03:04+00:00 Add new package dependencies - - - - - 4768709c by David Waern at 2007-07-11T20:37:11+00:00 Follow changes to record constructor representation - - - - - b9a02fee by Simon Marlow at 2007-05-30T14:00:48+00:00 update to compile with the latest GHC & Cabal - - - - - c0ebdc01 by David Waern at 2007-07-11T21:35:45+00:00 Fix conflicts - - - - - 97f7afd4 by David Waern at 2007-07-11T21:52:38+00:00 Follow changes to the GHC API - - - - - a5b7b58f by David Waern at 2007-07-12T20:36:48+00:00 Call parseStaticFlags before newSession - - - - - f7f50dbc by David Waern at 2007-08-01T21:52:58+00:00 Better indentation in haddock.cabal - - - - - d84e52ad by David Waern at 2007-08-02T00:08:18+00:00 Wibble - - - - - a23f494a by David Waern at 2007-08-02T00:08:24+00:00 Be better at trying to load all module dependencies (debugging) - - - - - ee917f13 by David Waern at 2007-08-03T18:48:08+00:00 Load all targets explicitly (checkModule doesn't chase dependencies anymore) - - - - - 5182d631 by David Waern at 2007-08-16T16:48:55+00:00 Finalize support for links to other packages - - - - - dfd1e3da by David Waern at 2007-08-16T16:51:11+00:00 Fix haddock comment errors in Haddock.Types - - - - - 50c0d83e by David Waern at 2007-08-16T16:51:37+00:00 Remove a debug import - - - - - d84b7c2b by David Waern at 2007-08-16T17:06:30+00:00 Rename PackageData to HaddockPackage - - - - - 3b52cb9f by David Waern at 2007-08-16T17:09:42+00:00 Simplify some comments - - - - - 66fa68d9 by David Waern at 2007-08-16T17:11:38+00:00 Comment the HaddockPackage definition - - - - - 8674c761 by David Waern at 2007-08-16T17:25:54+00:00 Improve code layout in Main - - - - - 571a3a0b by David Waern at 2007-08-16T17:32:13+00:00 Remove explict module imports in Main - - - - - d31b3cb0 by David Waern at 2007-08-16T17:36:23+00:00 Correct comments - - - - - 7f8a9f2b by David Waern at 2007-08-16T17:39:50+00:00 Fix layout problems in Haddock.Types - - - - - 9f421d7f by David Waern at 2007-08-17T11:16:48+00:00 Move options out of Main into Haddock.Options - - - - - 80042b63 by David Waern at 2007-08-17T11:26:59+00:00 Small comment/layout fixes - - - - - b141b982 by David Waern at 2007-08-17T11:28:28+00:00 Change project name from Haddock-GHC to Haddock - - - - - dbeb4a81 by David Waern at 2007-08-17T11:41:05+00:00 Add top module comment to all files - - - - - ce99cc9e by David Waern at 2007-08-17T14:53:04+00:00 Factor out typechecking phase into Haddock.Typecheck - - - - - 6bf75d9e by David Waern at 2007-08-17T16:55:35+00:00 Factor out package code to Haddock.Packages - - - - - b396db37 by David Waern at 2007-08-29T22:40:23+00:00 Major refactoring - - - - - 3d4f95ee by David Waern at 2007-08-29T23:26:24+00:00 Rename HaddockModule to Interface and a few more refactorings - - - - - c55326db by David Waern at 2007-08-29T23:48:03+00:00 Some comment cleanup - - - - - 9a84fc46 by David Waern at 2007-08-29T23:49:29+00:00 Add some modules that I forgot to add earlier - - - - - 4536dce2 by David Waern at 2007-08-29T23:55:24+00:00 Wibble - - - - - 9b7f0206 by David Waern at 2007-08-30T16:03:29+00:00 Wibble - - - - - c52c050a by David Waern at 2007-08-30T16:30:37+00:00 Rename HaddockModule to Interface - - - - - eae2995f by David Waern at 2007-08-30T16:42:59+00:00 Simplify createInterfaces - - - - - 53f99caa by David Waern at 2007-09-29T00:04:31+00:00 Add build-type: Simple to the cabal file - - - - - 0d3103a8 by David Waern at 2007-09-29T00:04:58+00:00 Add containers and array dependency - - - - - 6acf5f30 by David Waern at 2007-09-29T00:13:36+00:00 Prettify the cabal file - - - - - 87c1e378 by David Waern at 2007-09-29T13:16:39+00:00 FIX: consym data headers with more than two variables - - - - - b67fc16a by David Waern at 2007-09-29T14:01:32+00:00 FIX: prefix types used as operators should be quoted - - - - - a8f925bc by David Waern at 2007-09-29T14:02:26+00:00 Use isSymOcc from OccName instead of isConSym - - - - - fc330701 by David Waern at 2007-09-29T14:15:37+00:00 Use isLexConSym/isLexVarSym from OccName - - - - - e4f3dbad by David Waern at 2007-09-29T15:01:08+00:00 FIX: do not quote varsym type operators - - - - - 402207d2 by David Waern at 2007-09-29T15:01:50+00:00 Wibble - - - - - f9d89ef0 by David Waern at 2007-09-29T15:17:40+00:00 Take care when pp tyvars - add parens on syms - - - - - 849e2a77 by David Waern at 2007-10-01T21:56:39+00:00 Go back to using a ModuleMap instead of LookupMod - fixes a bug - - - - - 549dbac6 by David Waern at 2007-10-02T01:05:19+00:00 Improve parsing of doc options - - - - - a36021b8 by David Waern at 2007-10-02T23:05:00+00:00 FIX: double arrows in constructor contexts - - - - - d03bf347 by David Waern at 2007-10-09T16:14:05+00:00 Add a simple test suite - - - - - c252c140 by David Waern at 2007-10-17T16:02:28+00:00 Add --optghc=.. style flag passing to GHC - - - - - cce6c1b3 by David Waern at 2007-10-18T22:03:20+00:00 Add support for --read-interface again - - - - - 33d059c0 by David Waern at 2007-10-18T22:30:18+00:00 Refactoring -- get rid of Haddock.Packages - - - - - f9ed0a4c by David Waern at 2007-10-18T22:34:36+00:00 Name changes - - - - - 8a1c816f by David Waern at 2007-10-20T14:24:23+00:00 Add --ghc-version option - - - - - 4925aaa1 by David Waern at 2007-10-21T14:34:26+00:00 Add some Outputable utils - - - - - 69e7e47f by David Waern at 2007-10-21T14:35:49+00:00 FIX: Ord for OrdName was not comparing modules - - - - - 5a4ae535 by David Waern at 2007-10-21T21:18:48+00:00 Wibble - - - - - 03d48e20 by David Waern at 2007-10-24T15:52:56+00:00 Remove Main from "other modules" - - - - - c66f6d82 by David Waern at 2007-10-24T16:37:18+00:00 Make it possible to run haddock on itself - - - - - 21d156d8 by David Waern at 2007-10-25T14:02:14+00:00 Don't set boot modules as targets - - - - - f8bcf91c by David Waern at 2007-10-31T22:11:17+00:00 Add optimisation flags - - - - - 7ac758f2 by David Waern at 2007-11-04T09:48:28+00:00 Go back to loading only targets (seems to work now) - - - - - 4862aae1 by David Waern at 2007-11-05T22:24:57+00:00 Do full compilation of modules -- temporary fix for GHC API problem - - - - - 697e1517 by David Waern at 2007-11-05T22:25:50+00:00 Don't warn about not being able to link to wired/system/builtin-names - - - - - 892186da by David Waern at 2007-11-06T00:49:21+00:00 Filter out instances with TyCons that are not exported - - - - - 9548314c by David Waern at 2007-11-06T09:37:14+00:00 Wibble - - - - - 5cafd627 by David Waern at 2007-11-08T01:43:07+00:00 Filter out all non-vanilla type sigs - - - - - 04621830 by David Waern at 2007-11-08T01:45:13+00:00 Synch loading of names from .haddock files with GHC's name cache - - - - - 88d37f77 by David Waern at 2007-11-08T01:46:21+00:00 Remove commented-out code - - - - - 6409c911 by David Waern at 2007-11-08T01:56:00+00:00 Small bugfix and cleanup in getDeclFromTyCls - - - - - af59d9c2 by David Waern at 2007-11-08T02:08:44+00:00 Remove OrdName stuff - - - - - 3a615e2e by David Waern at 2007-11-08T02:13:41+00:00 Update runtests.hs following changes to haddock - - - - - 01f3314e by David Waern at 2007-11-08T02:33:01+00:00 Complain if we can't link to wired-in names - - - - - fcafb5d1 by David Waern at 2007-11-09T02:40:16+00:00 Don't exit when there are no file arguments - - - - - 194bc332 by David Waern at 2007-11-09T02:55:37+00:00 Wibble - - - - - dbe4cb55 by David Waern at 2007-11-09T02:56:14+00:00 Wibble - - - - - 82869fda by David Waern at 2007-11-10T17:01:43+00:00 Introduce InstalledInterface structure and add more stuff to the .haddock files We introduce InstalledInterface capturing the part of Interface that is stored in the interface files. We change the ppHtmlContents and ppHtmllIndex to take this structure instead of a partial Interface. We add stuff like the doc map and exported names to the .haddock file (via InstalledInterface). - - - - - d6bb57bf by David Waern at 2007-11-10T17:19:48+00:00 FIX: contents and index should include external package modules when --gen-contents/--gen-index - - - - - e8814716 by David Waern at 2007-11-11T00:29:27+00:00 Remove lDocLinkName and its use in Html backend - - - - - 6f9bd702 by David Waern at 2007-11-11T00:50:57+00:00 Do some refactoring in the html backend This also merges an old patch by Augustsson: Wed Jul 12 19:54:36 CEST 2006 lennart.augustsson at credit-suisse.com * Print type definitions like signatures if given arrows. - - - - - 09d0ce24 by Malcolm.Wallace at 2006-07-20T13:13:57+00:00 mention HsColour in the docs, next to option flags for linking to source code - - - - - 24da6c34 by Malcolm.Wallace at 2006-07-20T13:14:50+00:00 change doc references to CVS to give darcs repository location instead - - - - - 74d52cd6 by David Waern at 2007-11-11T00:55:33+00:00 Update copyright - - - - - fcaa3b4f by Duncan Coutts at 2006-09-08T13:41:00+00:00 Eliminate dep on network by doing a little cut'n'paste haddock depending on the network causes a circular dependency at least if you want to build the network lib with haddock docs. - - - - - 10cc9bda by David Waern at 2007-11-11T02:09:41+00:00 Fix conflicts - - - - - 4e3acd39 by David Waern at 2007-11-11T02:21:19+00:00 Manual merge of a patch from Duncan Coutts that removes the dependency on mtl - - - - - fa9070da by Neil Mitchell at 2006-09-29T15:52:03+00:00 Do not generate an empty table if there are no exports, this fixes a <table></table> tag being generated, which is not valid HTML 4.01 - - - - - d7431c85 by David Waern at 2007-11-11T02:28:50+00:00 Fix conflicts - - - - - f87e8f98 by Simon Marlow at 2006-10-10T11:37:16+00:00 changes for 0.8 - - - - - db929565 by Simon Marlow at 2006-10-10T12:07:12+00:00 fix the name of the source file - - - - - 8220aa4b by Simon Marlow at 2006-10-11T14:17:37+00:00 Rename haddock.js to haddock-util.js haddock.js will be run automatically by Windows when you type 'haddock' if it is found on the PATH, so rename to avoid confusion. Spotted by Adrian Hey. - - - - - 6bccdaa1 by sven.panne at 2006-10-12T15:28:23+00:00 Cabal's sdist does not generate "-src.tar.gz" files, but ".tar.gz" ones - - - - - d3f3fc19 by Simon Marlow at 2006-12-06T16:05:07+00:00 add todo item for --maintainer - - - - - 2da7e269 by Simon Marlow at 2006-12-15T15:52:00+00:00 TODO: do something better about re-exported symbols from another package - - - - - 42d85549 by David Waern at 2007-11-11T02:30:59+00:00 Fix conflicts - - - - - 5e7ef6e5 by Neil Mitchell at 2007-01-11T15:41:15+00:00 Never do spliting index files into many - - - - - f3d4aebe by Neil Mitchell at 2007-01-11T17:07:09+00:00 Add searching on the index page - - - - - bad3ab66 by Neil Mitchell at 2007-01-11T18:17:46+00:00 Delete dead code, now there is only one index page - - - - - cd09eedb by Neil Mitchell at 2007-01-11T18:21:19+00:00 Delete more stuff that is no longer required - - - - - e2806646 by David Waern at 2007-11-11T02:41:53+00:00 Fix conflicts - - - - - a872a823 by Neil Mitchell at 2007-01-11T18:51:43+00:00 Make the index be in case-insensitive alphabetic order - - - - - 8bddd9d7 by Neil Mitchell at 2007-02-06T17:49:12+00:00 Do not create empty tables for data declarations which don't have any constructors, instances or comments. Gets better HTML 4.01 compliance - - - - - 036b8120 by David Waern at 2007-11-11T02:56:58+00:00 Fix conflicts - - - - - f50c1639 by Conal Elliott at 2007-02-14T21:54:00+00:00 added substitution %{FILE///c} - - - - - 402e166a by David Waern at 2007-11-11T03:35:46+00:00 Manual merge of old patch: Sat Apr 21 04:36:43 CEST 2007 Roberto Zunino <zunrob at users.sf.net> * URL expansion for %%, %L, %{LINE} - - - - - 2f264fbd by David Waern at 2007-11-11T03:40:33+00:00 Manual merge of an old patch: Thu Apr 19 20:23:40 CEST 2007 Wolfgang Jeltsch <g9ks157k at acme.softbase.org> * bug fix When Haddock was invoked with the --ignore-all-exports flag but the ignore-exports module attribute wasn't used, hyperlinks weren't created for non-exported names. This fix might not be as clean as one would wish (since --ignore-all-exports now results in ignore_all_exports = True *and* an additional OptIgnoreExports option for every module) but at least the bug seems to be resolved now. - - - - - 7d7ae106 by sven.panne at 2007-09-02T12:18:02+00:00 Install LICENSE in the correct place - - - - - 66eaa924 by David Waern at 2007-11-11T19:02:46+00:00 Fix a bug that made haddock loop - - - - - 4ed47b58 by David Waern at 2007-11-11T19:03:09+00:00 Rename java-script file (this wasn't merge correctly) - - - - - d569534a by David Waern at 2007-11-11T19:06:44+00:00 Don't require -B <ghc-libdir> when no argument files Change readInterfaceFile to take a Maybe Session, to avoid having to pass -B <ghc-libdir> to Haddock when there're no source files to process. This is nice when computing contents/index for external packages. - - - - - 373368bc by Neil Mitchell at 2007-01-11T18:22:44+00:00 Change from tabs to spaces in the ppHtmlIndex function - - - - - 6b063a77 by Neil Mitchell at 2007-01-12T12:17:46+00:00 Rewrite much of the index searching code, previously was too slow to execute on the base library with IE, the new version guarantees less than O(log n) operations be performed, where n is the number in the list (before was always O(n)) - - - - - bfad00b7 by David Waern at 2007-11-11T23:33:53+00:00 Fix conflicts - - - - - cd2dcc09 by Neil Mitchell at 2007-01-12T12:25:01+00:00 Make the max number of results 75 instead of 50, to allow map searching in the base library to work - - - - - 3ae74764 by Neil Mitchell at 2007-01-12T12:58:17+00:00 Make the search box in a form so that enter does the default search - - - - - 142103e5 by David Waern at 2007-11-12T00:03:18+00:00 Merge patch from the old branch: Fri Aug 31 13:21:45 CEST 2007 Duncan Coutts <duncan at haskell.org> * Add category: Development to .cabal file Otherwise it appears on the hackage website in the "Unclassified" category. - - - - - 22ec2ddb by David Waern at 2007-11-25T01:55:29+00:00 A a list of small improvements to the TODO file - - - - - eb0129f4 by Wolfgang Jeltsch at 2007-12-03T23:47:55+00:00 addition of type equality support (at least for HTML generation) - - - - - 816a7e22 by David Waern at 2007-12-08T15:46:26+00:00 Handle class operators correctly when rendering predicates - - - - - 68baaad2 by David Waern at 2007-12-08T16:15:54+00:00 Code layout changes - - - - - 09b77fb4 by David Waern at 2007-12-08T16:16:03+00:00 Handle infix operators correctly in the Type -> HsType translation - - - - - 31c36da2 by David Waern at 2007-12-08T16:24:27+00:00 Add ppLParendTypes/ppLParendType - - - - - b17cc818 by David Waern at 2007-12-08T16:26:12+00:00 Use ppParendType when printing types args in predicates - - - - - ffd1f2cf by David Waern at 2007-12-08T16:45:06+00:00 Fix rendering of instance heads to handle infix operators This is also a refactoring to share this code for rendering predicates. - - - - - ff886d45 by David Waern at 2007-12-08T17:27:46+00:00 Fix rendering of class operators - - - - - e2fcbb9e by David Waern at 2007-12-08T17:59:28+00:00 Fix a bug (use ppTyName instead of ppName to print names in type apps) - - - - - 79a1056e by David Waern at 2007-12-08T21:25:18+00:00 Update tests - - - - - 867741ac by David Waern at 2007-12-08T21:25:49+00:00 Give a diff on test failure - - - - - 7e5eb274 by David Waern at 2008-01-05T14:33:45+00:00 Add DrIFT commands - - - - - 3656454d by David Waern at 2008-01-05T20:26:00+00:00 Add "cabal-version: >= 1.2" to the cabal file - - - - - 77974efc by Simon Marlow at 2007-12-20T09:52:44+00:00 add an item - - - - - f6ac1708 by Simon Marlow at 2007-12-06T14:00:10+00:00 Source links must point to the original module, not the referring module - - - - - eda1d5c9 by David Waern at 2008-01-06T14:40:52+00:00 Manual merge of a patch to the 0.8 branch Thu Dec 6 15:00:10 CET 2007 Simon Marlow <simonmar at microsoft.com> * Source links must point to the original module, not the referring module - - - - - 378f4085 by David Waern at 2008-01-06T16:03:45+00:00 Change stability from stable to experimental - - - - - 8bdafe44 by David Waern at 2008-01-06T16:14:22+00:00 Add haskell.vim (it had been removed somehow) - - - - - ea34d02e by David Waern at 2008-01-06T16:36:57+00:00 Change version to 2.0.0.0 - - - - - 34631ac0 by David Waern at 2008-01-06T16:44:57+00:00 Add missing modules to the cabal file - - - - - 9e142935 by David Waern at 2008-01-06T17:25:42+00:00 Depend on ghc >= 6.8.2 && < 6.9 - - - - - 59f9eeaa by Simon Marlow at 2007-12-20T10:43:04+00:00 add build scripts - - - - - 1c29ae30 by Simon Marlow at 2007-12-20T10:47:07+00:00 update version number - - - - - fe16a3e4 by Simon Marlow at 2007-12-20T10:48:03+00:00 update version - - - - - f688530f by Simon Marlow at 2007-12-20T10:48:29+00:00 doc updates - - - - - ce71b611 by David Waern at 2008-01-07T13:46:32+00:00 Change version in docs and spec - - - - - 03ab8d6f by David Waern at 2008-01-07T13:47:38+00:00 Manually merge over changes to CHANGES for 0.9 - - - - - 39f1b042 by David Waern at 2008-01-07T15:17:41+00:00 Remove the -use-package flag, we don't support it anyway - - - - - 7274a544 by David Waern at 2008-01-07T15:33:05+00:00 Update CHANGES for 2.0.0.0 - - - - - 96594f5d by David Waern at 2008-01-07T15:46:49+00:00 Wibble - - - - - f4c5a4c4 by David Waern at 2008-01-07T15:55:36+00:00 Change url to repo in documentation - - - - - 8a4c77f0 by David Waern at 2008-01-07T16:00:54+00:00 Update CHANGES - - - - - cb3a9288 by David Waern at 2008-01-07T16:02:55+00:00 Documentation fix - - - - - d8e45539 by David Waern at 2008-01-07T16:12:00+00:00 Update docs to say that Haddock accets .lhs files and module names - - - - - 4b5ce824 by David Waern at 2008-01-07T16:12:25+00:00 Document -B option - - - - - 47274262 by David Waern at 2008-01-07T16:23:07+00:00 Update CHANGES - - - - - 7ff314a9 by David Waern at 2008-01-07T16:23:20+00:00 Remove --use-package, --package & --no-implicit.. flags from docs - - - - - 6c3819c0 by David Waern at 2008-01-07T16:23:52+00:00 Remove --no-implicit-prelide flag - - - - - 1b14ae40 by David Waern at 2008-01-07T16:32:26+00:00 Update the "Using literate or pre-processed source" section - - - - - 0117f620 by David Waern at 2008-01-07T16:41:55+00:00 Document the --optghc flag - - - - - 087ab1cf by David Waern at 2008-01-07T16:42:10+00:00 Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 - - - - - 7253951e by David Waern at 2008-01-07T16:48:40+00:00 Document OPTIONS_HADDOCK - - - - - 3b6bdcf6 by David Waern at 2008-01-07T16:56:54+00:00 Wibble - - - - - 3025adf9 by David Waern at 2008-01-07T17:08:14+00:00 Wibble - - - - - 5f30f1a0 by David Waern at 2008-01-07T17:15:44+00:00 Change synopsis field to description - - - - - 1673f54b by David Waern at 2008-01-07T17:18:21+00:00 Change my email address in the cabal file - - - - - 55aa9808 by David Waern at 2008-01-07T18:18:02+00:00 Add documentation for readInterfaceFile - - - - - eaea417f by David Waern at 2008-01-07T18:21:30+00:00 Export necessary stuff from Distribution.Haddock - - - - - 7ea18759 by David Waern at 2008-01-07T18:31:49+00:00 Remove dep on Cabal - - - - - 7b79c74e by David Waern at 2008-01-07T18:33:49+00:00 Remove dep on process - - - - - ce3054e6 by David Waern at 2008-01-16T23:01:21+00:00 Add feature-requsts from Henning Thielemann to TODO - - - - - 0c08f1ec by David Waern at 2008-01-16T23:03:02+00:00 Record a bug in TODO - - - - - b04605f3 by David Waern at 2008-01-23T16:59:06+00:00 Add a bug reported by Ross to TODO - - - - - 5b17c030 by David Waern at 2008-01-23T18:05:53+00:00 A a bug report to TODO - - - - - 1c993b0d by David Waern at 2008-01-25T16:30:25+00:00 Accept test output - - - - - c22fc0d0 by David Waern at 2008-01-25T16:34:49+00:00 Accept test output - - - - - 4b795811 by David Waern at 2008-01-25T16:38:37+00:00 Change Hidden.hs (test) to use OPTIONS_HADDOCK - - - - - c124dbd9 by David Waern at 2008-01-25T16:39:23+00:00 Accept test output - - - - - ec6f6eea by David Waern at 2008-01-25T16:42:08+00:00 Add Hidden.html.ref to tests - - - - - 1dc9610c by David Waern at 2008-02-02T20:50:51+00:00 Add a comment about UNPACK bug in TODO - - - - - 2d3f7081 by David Waern at 2008-02-09T22:33:24+00:00 Change the representation of DocNames Ross Paterson reported a bug where links would point to the defining module instead of the "best" module for an identifier (e.g Int pointing to GHC.Base instead of Data.Int). This patch fixes this problem by refactoring the way renamed names are represented. Instead of representing them by: > data DocName = Link Name | NoLink Name they are now represented as such: > data DocName = Documented Name Module | Undocumented Name and the the link-env looks like this: > type LinkEnv = Map Name Module There are several reasons for this. First of all, the bug was caused by changing the module part of Names during the renaming process, without changing the Unique field. This caused names to be overwritten during the loading of .haddock files (which caches names using the NameCache of the GHC session). So we might create new Uniques during renaming to fix this (but I'm not sure that would be problem-free). Instead, we just keep the Name and add the Module where the name is best documented, since it can be useful to keep the original Name around (for e.g. source-code location info and for users of the Haddock API). Also, the names Link/NoLink don't really make sense, since wether to use links or not is entirely up to the users of DocName. In the process of following this change into H.Backends.Html I removed the assumption that binder names are Undocumented (which was just an unnecessary assumption, the OccName is the only thing needed to render these). This will probably make it possible to get rid of the renamer and replace it with a traversal from SYB or Uniplate. Since DocName has changed, InterfaceFile has changed so this patch also increments the file-format version. No backwards-compatibility is implemented. - - - - - 0f28c921 by David Waern at 2008-02-09T23:00:36+00:00 H.GHC.Utils: remove unused imports/exports - - - - - 0c44cad5 by David Waern at 2008-02-10T00:28:13+00:00 H.GHC.Utils: add some functions that were removed by mistake - - - - - e3452f49 by David Waern at 2008-02-10T00:28:48+00:00 Fix some trivial warnings in H.InterfaceFile - - - - - a6d74644 by David Waern at 2008-02-10T00:48:06+00:00 Update the version message to fit in small terminals - - - - - 76c9cd3e by David Waern at 2008-02-10T14:47:39+00:00 Remove bugs from TODO that don't apply anymore since the port - - - - - 5e10e090 by David Waern at 2008-02-10T15:22:47+00:00 Remove bugs from TODO that weren't actual bugs - - - - - fef70878 by David Waern at 2008-02-10T15:23:44+00:00 Remove yet another item from TODO that was not an actual bug - - - - - e1af47b8 by David Waern at 2008-02-11T10:25:57+00:00 Bump the version number to 2.1.0 Since the exported datatype DocName has changed, we need to bump the major version number. Let's also drop the fourth version component, it's not that useful. - - - - - e3be7825 by David Waern at 2008-04-11T14:29:04+00:00 Add a bug to TODO - - - - - cb6574be by David Waern at 2008-04-11T16:00:45+00:00 Use the in-place haddock when running tests - - - - - c6d7af0d by David Waern at 2008-04-11T16:09:16+00:00 Turn off GHC warnings when running tests - - - - - 7f61b546 by David Waern at 2008-04-11T17:24:00+00:00 Add a flag for turning off all warnings - - - - - 883b8422 by David Waern at 2008-04-12T14:02:18+00:00 Fix printing of data binders - - - - - 2a0db8fc by David Waern at 2008-04-12T18:52:46+00:00 Fix missing parenthesis in constructor args bug - - - - - 1b3ac3f9 by David Waern at 2008-04-12T18:57:23+00:00 Simplify test suite and add tests I move all tests into one single directory to simplify things, and add a test for the last bug that was fixed. - - - - - 8f178376 by David Waern at 2008-04-12T19:00:15+00:00 Add a script for copying test output to "expected" output - - - - - 193e3a03 by David Waern at 2008-04-12T19:16:37+00:00 Remove two fixed bugs from TODO - - - - - ddc9130c by David Waern at 2008-04-12T19:37:06+00:00 Update test README - - - - - 956069c0 by David Waern at 2008-05-01T12:16:14+00:00 Update version number in spec and docs - - - - - 5478621c by David Waern at 2008-05-01T12:28:12+00:00 Remove claim of backwards compatibility from docs for readInterfaceFile - - - - - 4a16dea9 by David Waern at 2008-05-01T12:33:04+00:00 Update CHANGES - - - - - 804216fb by David Waern at 2008-05-01T12:43:16+00:00 Add a synopsis - - - - - fd0c84d5 by David Waern at 2008-05-01T12:44:44+00:00 Add Haddock.DocName to the cabal file - - - - - 9f4a7439 by David Waern at 2008-05-01T12:45:53+00:00 Remove -fglasgow-exts and -fasm - - - - - aee7c145 by David Waern at 2008-05-01T12:54:01+00:00 Add LANGUAGE pragmas to source files - - - - - 9a58428b by David Waern at 2008-05-01T12:54:19+00:00 Add extensions to cabal file - - - - - 494f1bee by David Waern at 2008-05-01T13:12:09+00:00 Export DocName in the API - - - - - c938196b by David Waern at 2008-05-01T13:12:19+00:00 Add hide options to some source files - - - - - 236e86af by Neil Mitchell at 2008-06-07T20:45:10+00:00 Rewrite the --hoogle flag support - - - - - 6d910950 by Neil Mitchell at 2008-06-14T10:56:50+00:00 Simplify the newtype/data outputting in Hoogle, as haddock does it automatically - - - - - f87a95a8 by Neil Mitchell at 2008-06-14T12:10:18+00:00 Add initial structure for outputting documentation as well, but does not yet output anything - - - - - 7c3bce54 by Neil Mitchell at 2008-06-14T12:27:07+00:00 Remove <document comment> from the Hoogle output - - - - - 9504a325 by Neil Mitchell at 2008-06-16T06:33:21+00:00 Default to "main" if there is no package, otherwise will clobber hoogle's hoogle info - - - - - 4a794a79 by Neil Mitchell at 2008-06-16T06:53:29+00:00 Change packageName to packageStr, as it better reflects the information stored in it - - - - - 7abc9baf by Neil Mitchell at 2008-06-16T07:09:49+00:00 Add modulePkgInfo to Haddock.GHC.Utils, which gives back package name and version info - - - - - 8ca11514 by Neil Mitchell at 2008-06-16T07:13:48+00:00 Change Hoogle to take the package name and package version separately - - - - - a6da452d by Neil Mitchell at 2008-06-18T11:29:46+00:00 In Hoogle do not list things that are not local to this module - - - - - 974b76b7 by David Waern at 2008-06-19T18:40:13+00:00 Be more consistent with GHC API naming in H.GHC.Utils - - - - - 2facb4eb by David Waern at 2008-06-19T19:03:03+00:00 Update test output - - - - - c501de72 by David Waern at 2008-06-26T20:26:49+00:00 Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. - - - - - ac4c6836 by David Waern at 2008-06-26T20:33:08+00:00 Update CHANGES - - - - - 9d21c60a by David Waern at 2008-06-26T20:34:53+00:00 Update README - - - - - 741448f0 by David Waern at 2008-06-26T21:12:57+00:00 Improve wording in the help message - - - - - b1b42b11 by David Waern at 2008-06-30T10:16:17+00:00 Rename ForeignType - - - - - 6d6c2b34 by David Waern at 2008-06-30T10:25:09+00:00 Rename TyFamily - - - - - 8d1125ed by David Waern at 2008-06-30T10:37:21+00:00 Rename type patterns - - - - - 7610a4cb by David Waern at 2008-06-30T10:45:07+00:00 Rename associated types - - - - - 8eeba14c by David Waern at 2008-06-30T10:47:41+00:00 Remove the TODO file now that we have a trac - - - - - 1af5b25b by David Waern at 2008-07-02T18:19:28+00:00 Render type family declarations (untested) - - - - - ceb99797 by David Waern at 2008-07-02T18:24:06+00:00 Remove redundant check for summary when rendering data types - - - - - b36a58e0 by David Waern at 2008-07-02T22:01:38+00:00 More support for type families and associated types Now we just need to render the instances - - - - - 78784879 by David Waern at 2008-07-07T22:13:58+00:00 Remove filtering of instances We were filtering out all instances for types with unknown names. This was probably an attempt to filter out instances for internal types. I am removing the filtering for the moment, and will try to fix this properly later. - - - - - 3e758dad by David Waern at 2008-06-30T18:50:30+00:00 Run haddock in-place during testing - - - - - d9dab0ce by David Waern at 2008-07-08T21:04:32+00:00 Remove index.html and doc-index.html from output, they should not be versioned - - - - - 3e6c4681 by David Waern at 2008-07-08T21:06:42+00:00 Update test output following change to instance filtering - - - - - e34a3f14 by David Waern at 2008-07-12T16:48:28+00:00 Stop using the map from exported names to declarations During creation of the interface, we were using two maps: one from exported names to declarations, and one from all defined names in the module to declarations. The first contained subordinate names while the second one didn't. The first map was never used to look up names not defined in the associated module, so if we add subordinate names to the second map, we could use it everywhere. That's that this patch does. This simplifies code because we don't have to pass around two maps everywhere. We now store the map from locally defined things in the interface structure instead of the one from exported names. - - - - - 2e1d2766 by David Waern at 2008-07-12T16:55:21+00:00 Get the all locally defined names from GHC API We previously had some code to compute all locally defined names in a module including subordinate names. We don't need it since we can get the names from modInfoTyThings in the GHC API. - - - - - bf637994 by David Waern at 2008-07-13T13:09:16+00:00 Refactoring in H.Interface.Create We were creating a doc map, a declaration map and a list of entities separately by going through the HsGroup. These structures were all used to build the interface of a module. Instead of doing this, we can start by creating a list of declarations from the HsGroup, then collect the docs directly from this list (instead of using the list of entities), creating a documentation map. We no longer need the Entity data type, and we can store a single map from names to declarations and docs in the interface, instead of the declaration map and the doc map. This way, there is only one place where we filter out the declarations that we don't want, and we can remove a lot of code. Another advantage of this is that we can create the exports directly out of the list of declarations when we export the full module contents. (Previously we did a look up for each name to find the declarations). This is faster and removes another point where we depend on names to identify exported declarations, which is good because it eliminates problems with instances (which don't have names). - - - - - 547e410e by David Waern at 2008-07-13T13:34:51+00:00 Remove FastString import and FSLIT macro in H.I.Create -- they were unused - - - - - 693759d1 by David Waern at 2008-07-13T13:36:23+00:00 Remove unused import from H.I.Create - - - - - cde6e7fb by David Waern at 2008-07-13T13:51:54+00:00 Small touches - - - - - 96de8f1d by David Waern at 2008-07-20T11:21:46+00:00 Preparation for rendering instances as separate declarations We want to be able to render instances as separate declarations. So we remove the Name argument of ExportDecl, since instances are nameless. This patch also contains the first steps needed to gather type family instances and display them in the backend, but the implementation is far from complete. Because of this, we don't actually show the instances yet. - - - - - b0f824fb by David Waern at 2008-07-20T15:53:08+00:00 Follow changes to ExportDecl in Hoogle - - - - - 1192eff3 by Neil Mitchell at 2008-06-26T00:28:10+00:00 Change how the Hoogle backend outputs classes, adding the context in - - - - - 7a0d1464 by Neil Mitchell at 2008-06-26T00:28:46+00:00 Remove the indent utility function from Hoogle backend - - - - - 3361241b by Neil Mitchell at 2008-06-26T09:45:09+00:00 Add support for Hoogle writing ForeignImport/ForeignExport properly - - - - - 795ad3bf by Neil Mitchell at 2008-06-26T12:15:25+00:00 Flesh out the Hoogle code to render documentation - - - - - 23277995 by Neil Mitchell at 2008-06-26T14:56:41+00:00 Fix a bug in the Hoogle backend, unordered lists were being written out <ul>...</u> - - - - - db739b27 by Neil Mitchell at 2008-06-26T15:09:54+00:00 Remove any white space around a <li> element - - - - - f2e6bb8c by Neil Mitchell at 2008-07-10T15:30:47+00:00 Remove the TODO in the Hoogle HTML generation, was already done - - - - - 693ec9a3 by Neil Mitchell at 2008-07-10T15:53:00+00:00 Put brackets round operators in more places in the Hoogle output - - - - - 842313aa by Neil Mitchell at 2008-07-10T16:01:25+00:00 Print type signatures with brackets around the name - - - - - cf93deb0 by David Waern at 2008-07-20T17:04:22+00:00 Bump version number to 2.2.0 - - - - - 30e6a8d1 by David Waern at 2008-07-20T17:04:41+00:00 Resolve conflicts in H.B.Hoogle - - - - - 1f0071c9 by David Waern at 2008-07-23T23:05:01+00:00 Add "all" command to runtests.hs that runs all tests despite failures - - - - - f2723023 by David Waern at 2008-07-23T23:08:39+00:00 Update tests/README - - - - - c0304a11 by David Waern at 2008-07-23T23:21:15+00:00 Be compatible with GHC 6.8.3 The cabal file is converted to use the "new" syntax with explicit Library and Executable sections. We define the __GHC_PATCHLEVEL__ symbol using a conditinal cpp-options field in the cabal file. (Ideally, Cabal would define the symbol for us, like it does for __GLASGOW_HASKELL__). We use these symbols to #ifdef around a small difference between 6.8.2 and 6.8.3. Previously, we only supported GHC 6.8.2 officially but the dependencies field said "ghc <= 6.9". This was just for convenience when testing against the (then compatible) HEAD version of GHC, and was left in the release by mistake. Now, we support both GHC 6.8.2 and 6.8.3 and the dependencies field correctly reflects this. - - - - - 88a5fe71 by David Waern at 2008-07-23T23:54:16+00:00 Depend on the currently available ghc-paths versions only - - - - - 8738d97b by David Waern at 2008-07-24T10:50:44+00:00 FIX haskell/haddock#44: Propagate parenthesis level when printing documented types - - - - - 05339119 by David Waern at 2008-07-24T16:06:18+00:00 Drop unnecessary parenthesis in types, put in by the user We were putting in parenthesis were the user did. Let's remove this since it just clutters up the types. The types are readable anyway since we print parens around infix operators and do not rely on fixity levels. When doing this I discovered that we were relying on user parenthesis when printin types like (a `O` b) c. This patchs fixes this problem so that parenthesis are always inserted around an infix op application in case it is applied to further arguments, or if it's an arguments to a type constructor. Tests are updated. - - - - - b3a99828 by David Waern at 2008-07-24T10:19:43+00:00 Print parenthesis around non-atomic banged types Fixes half of haskell/haddock#44 - - - - - ab5238e0 by David Waern at 2008-07-24T22:07:49+00:00 Add a reference file for the TypeFamilies test - - - - - 1941cc11 by David Waern at 2008-07-25T17:15:53+00:00 Simplify definition of pretty and trace_ppr - - - - - e3bfa33c by David Waern at 2008-07-25T17:18:27+00:00 Warning messages Output a warning when filtering out data/type instances and associated types in instances. We don't show these in the documentation yet, and we need to let the user know. - - - - - 9b85fc89 by David Waern at 2008-07-25T17:45:40+00:00 Doc: Mention Hoogle in the Introduction - - - - - afb2dd60 by David Waern at 2008-07-25T17:49:00+00:00 Doc: update -B description - - - - - 584c0c91 by David Waern at 2008-07-25T18:11:38+00:00 Doc: describe -w flag - - - - - 77619c24 by David Waern at 2008-07-28T12:29:07+00:00 Remove TODO from cabal file - - - - - 96717d5f by David Waern at 2008-07-28T12:29:27+00:00 Support type equality predicates - - - - - c2fd2330 by David Waern at 2008-07-29T19:45:14+00:00 Move unL from H.B.Hoogle to H.GHC.Utils I like Neil's shorter unL better than unLoc from the GHC API. - - - - - c4c3bf6a by David Waern at 2008-07-29T19:47:36+00:00 Do not export ATs when not in list of subitems - - - - - bf9a7b85 by David Waern at 2008-08-03T11:42:59+00:00 Filter out ForeignExports - - - - - df59fcb0 by David Waern at 2008-08-03T14:02:51+00:00 Filter out more declarations The previous refactorings in H.I.Create introduced a few bugs. Filtering of some types of declarations that we don't handle was removed. This patch fixes this. - - - - - 2f8a958b by David Waern at 2008-08-03T15:24:07+00:00 Move reL to H.GHC.Utils so we can use it everywhere - - - - - 8ec15efd by David Waern at 2008-08-03T15:25:00+00:00 Use isVanillaLSig from GHC API instead of home brewn function - - - - - 300f93a2 by David Waern at 2008-08-03T15:25:27+00:00 Filter out separately exported ATs This is a quick and dirty hack to get rid of separately exported ATs. We haven't decided how to handle them yet. No warning message is given. - - - - - 8776d1ec by David Waern at 2008-08-03T16:21:21+00:00 Filter out more declarations and keep only vanilla type sigs in classes - - - - - ea07eada by David Waern at 2008-08-03T16:48:00+00:00 Fix layout - - - - - dd5e8199 by David Waern at 2008-08-03T16:50:52+00:00 Move some utility functions from H.I.Create to H.GHC.Utils - - - - - 4a1dbd72 by David Waern at 2008-08-03T17:39:55+00:00 Do not filter out doc declarations - - - - - 0bc8dca4 by David Waern at 2008-08-03T17:47:26+00:00 Filter out separately exported ATs (take two) - - - - - af970fe8 by David Waern at 2008-08-03T22:39:17+00:00 Update CHANGES - - - - - 5436ad24 by David Waern at 2008-08-03T22:40:20+00:00 Bump version number to 2.2.1 - - - - - d66de448 by David Waern at 2008-08-05T19:00:32+00:00 Remove version restriction on ghc-paths - - - - - 534b1364 by David Waern at 2008-08-05T19:04:35+00:00 Bump version to 2.2.2 and update CHANGES - - - - - 549188ff by David Waern at 2008-08-05T19:16:49+00:00 Fix CHANGES - - - - - 0d156bb4 by Luke Plant at 2008-08-11T15:20:59+00:00 invoking haddock clarification and help - - - - - 748295cc by David Waern at 2008-08-11T18:56:37+00:00 Doc: say that the --hoogle option is functional - - - - - 43301db4 by David Waern at 2008-08-05T19:26:08+00:00 Change ghc version dependency to >= 6.8.2 - - - - - 3e5a53b6 by David Waern at 2008-08-10T22:42:05+00:00 Make H.GHC.Utils build with GHC HEAD - - - - - 7568ace0 by David Waern at 2008-08-11T19:41:54+00:00 Import Control.OldException instead of C.Exception when using ghc >= 6.9 We should really test for base version instead, but I don't currently know which version to test for. - - - - - b71ae991 by David Waern at 2008-08-12T22:40:39+00:00 Make our .haddock file version number depend on the GHC version We need to do this, since our .haddock format can potentially change whenever GHC's version changes (even when only the patchlevel changes). - - - - - 6307ce3f by David Waern at 2008-08-12T22:49:57+00:00 Remove matching on NoteTy in AttachInstances, it has been removed - - - - - 2dbcfd5f by David Waern at 2008-08-12T23:02:02+00:00 Comment out H.GHC.loadPackages - it is unused and doesn't build with ghc >= 6.9 - - - - - c74db5c2 by David Waern at 2008-08-12T23:03:58+00:00 Hide <.> from GHC import in Hoogle only for ghc <= 6.8.3 - - - - - 69a44ebb by David Waern at 2008-08-12T23:11:12+00:00 Follow changes to parseDynamic/StaticFlags - - - - - 5881f3f0 by David Waern at 2008-08-13T21:43:58+00:00 Add __GHC_PATCHLEVEL__ symbol also when building the library - - - - - 8574dc11 by David Waern at 2008-08-13T21:44:17+00:00 Follow move of package string functions from PackageConfig to Module - - - - - c9baa77f by David Waern at 2008-08-13T21:45:29+00:00 Follow extensible exceptions changes - - - - - 9092de15 by David Waern at 2008-08-13T21:46:20+00:00 Update test following Haddock version change - - - - - ebe569a4 by David Waern at 2008-08-13T21:46:54+00:00 Follow changes to parseDynamic- parseStaticFlags in GHC - - - - - b8a5ffd3 by David Waern at 2008-08-13T21:47:36+00:00 Follow changes to Binary in GHC 6.9 - - - - - edfda1cc by David Waern at 2008-08-13T21:50:17+00:00 Change ghc version dependency to >= 6.8.2 && <= 6.9 - - - - - d59be1cf by Neil Mitchell at 2008-08-12T16:02:53+00:00 Output all items, even if they are not defined in this module - ensures map comes from Prelude, not just GHC.Base - - - - - dda93b9f by Neil Mitchell at 2008-08-12T21:37:32+00:00 Add support for type synonyms to Hoogle, was accidentally missing before (woops!) - - - - - b6ee795c by Neil Mitchell at 2008-08-13T14:03:24+00:00 Generalise Hoogle.doc and add a docWith - - - - - 415e1bb2 by Neil Mitchell at 2008-08-13T14:03:46+00:00 Make Hoogle add documentation to a package - - - - - 790a1202 by Neil Mitchell at 2008-08-18T12:52:43+00:00 Use the same method to put out signatures as class methods in the Hoogle backend - - - - - ded37eba by Neil Mitchell at 2008-08-18T12:53:04+00:00 Remove Explicit top-level forall's when pretty-printing signatures - - - - - 6468c722 by Neil Mitchell at 2008-08-20T07:59:13+00:00 Simplify the code by removing not-to-important use of <.> in the Hoogle back end - - - - - 788c3a8b by Neil Mitchell at 2008-08-21T18:20:24+00:00 In the hoogle back end, markup definition lists using <i>, not <b> - - - - - 77d4b000 by Ian Lynagh at 2008-08-14T10:49:14+00:00 Add a Makefile for GHC's build system. Still won't work yet, but we're closer - - - - - 920440d7 by Ian Lynagh at 2008-08-27T18:06:46+00:00 Add haddock.wrapper - - - - - bcda925f by Ian Lynagh at 2008-08-27T18:07:02+00:00 Add a manual Cabal flag to control the ghc-paths dependency - - - - - 04d194e2 by Ian Lynagh at 2008-08-27T20:41:27+00:00 Update extensions in Cabal file Use ScopedTypeVariables instead of PatternSignatures - - - - - 12480043 by Ian Lynagh at 2008-08-27T20:41:55+00:00 Increase the upper bound on the GHC version number - - - - - b1f809a5 by Ian Lynagh at 2008-08-27T21:32:22+00:00 Fix some warnings - - - - - aea0453d by Ian Lynagh at 2008-08-28T14:22:29+00:00 Fixes for using haddock in a GHC build tree - - - - - ad23bf86 by Ian Lynagh at 2008-08-28T21:14:27+00:00 Don't use Cabal wrappers on Windows - - - - - 35858e4c by Ian Lynagh at 2008-08-29T00:07:42+00:00 Fix in-tree haddock on Windows - - - - - c2642066 by Ian Lynagh at 2008-09-03T22:35:53+00:00 follow library changes - - - - - 2eb55d50 by Ian Lynagh at 2008-09-07T18:52:51+00:00 bindist fixes - - - - - 3daa5b59 by Ian Lynagh at 2008-09-10T16:58:18+00:00 We need to tell haddock that its datasubdir is . or it can't find package.conf - - - - - 388fd8c2 by Ian Lynagh at 2008-09-10T19:47:44+00:00 Fix haddock inplace on Windows - - - - - 70a641c1 by Ian Lynagh at 2008-09-10T22:15:44+00:00 Fix installed haddock on Windows - - - - - 83c1e997 by Neil Mitchell at 2008-09-11T10:48:55+00:00 Import GHC.Paths if not IN_GHC_TREE, seems to match the use of GHC.Paths functions much better - - - - - b452519b by Ian Lynagh at 2008-09-12T12:58:24+00:00 Add a LANGUAGE ForeignFunctionInterface pragma - - - - - afbd592c by Ian Lynagh at 2008-09-12T12:59:13+00:00 Wibble imports - - - - - 547ac4ad by Ian Lynagh at 2008-09-14T15:34:22+00:00 Add a "#!/bin/sh" to haddock.wrapper - - - - - f207a807 by Ian Lynagh at 2008-09-15T10:02:32+00:00 Use "exec" when calling haddock in the wrapper - - - - - 2ee68509 by Thomas Schilling at 2008-09-15T09:09:16+00:00 Port Haddock.Interface to new GHC API. This required one bigger change: 'readInterfaceFile' used to take an optional 'Session' argument. This was used to optionally update the name cache of an existing GHC session. This does not work with the new GHC API, because an active session requires the function to return a 'GhcMonad' action, but this is not possible if no session is provided. The solution is to use an argument of functions for reading and updating the name cache and to make the function work for any monad that embeds IO, so it's result type can adapt to the calling context. While refactoring, I tried to make the code a little more self-documenting, mostly turning comments into function names. - - - - - 3bb96431 by Thomas Schilling at 2008-09-15T09:09:37+00:00 Reflect GHC API changes. - - - - - 2e60f714 by Thomas Schilling at 2008-09-15T09:10:37+00:00 Port Haddock.GHC.Typecheck to new GHC API. - - - - - 9cfd4cff by Thomas Schilling at 2008-09-15T09:11:00+00:00 Port Haddock.GHC to new GHC API. - - - - - caffa003 by Thomas Schilling at 2008-09-15T09:11:25+00:00 Port Main to new GHC API. - - - - - 069a4608 by Ian Lynagh at 2008-09-21T11:19:00+00:00 Fix paths used on Windows frmo a GHC tree: There is no whare directory - - - - - 7ceee1f7 by Ian Lynagh at 2008-09-21T12:20:16+00:00 Fix the in-tree haddock on Windows - - - - - 0d486514 by Ian Lynagh at 2008-09-23T18:06:58+00:00 Increase the GHC upper bound from 6.11 to 6.13 - - - - - f092c414 by Neil Mitchell at 2008-09-11T14:56:07+00:00 Do not wrap __ in brackets - - - - - 036bdd13 by Ian Lynagh at 2008-09-28T01:42:35+00:00 Fix building haddock when GhcProfiled=YES - - - - - 01434a89 by David Waern at 2008-09-24T20:24:21+00:00 Add PatternSignatures LANGUAGE pragma to Main and Utils - - - - - 1671a750 by David Waern at 2008-10-02T22:57:25+00:00 For source links, get original module from declaration name instead of environment. Getting it from the environment must have been a remnant from the times when we were using unqualified names (versions 0.x). - - - - - a25dde99 by David Waern at 2008-10-02T22:59:57+00:00 Remove ifaceEnv from Interface - it's no longer used - - - - - 610993da by David Waern at 2008-10-02T23:04:58+00:00 Write a comment about source links for type instance declarations - - - - - 5a96b5d5 by Thomas Schilling at 2008-10-03T10:45:08+00:00 Follow GHC API change of parseModule. - - - - - 5a943ae5 by Ian Lynagh at 2008-10-03T15:56:58+00:00 TAG 2008-10-03 - - - - - 76cdd6ae by Thomas Schilling at 2008-10-08T12:29:50+00:00 Only load modules once when typechecking with GHC. This still doesn't fix the memory leak since the typechecked source is retained and then processed separately. To fix the leak, modules must be processed directly after typechecking. - - - - - 7074d251 by David Waern at 2008-10-09T23:53:54+00:00 Interleave typechecking with interface creation At the same time, we fix a bug where the list of interfaces were processed in the wrong order, when building the links and renaming the interfaces. - - - - - 4b9b2b2d by David Waern at 2008-10-09T23:54:49+00:00 Add some strictness annotations in Interface We add some strictness annotations to the fields of Interface, so that less GHC data is hold on to during processing. - - - - - 22035628 by David Waern at 2008-10-10T20:02:31+00:00 Remove typecheckFiles and MonadUtils import from H.GHC.Typeccheck - - - - - be637ad3 by David Waern at 2008-10-10T20:33:38+00:00 Make Haddock build with GHC 6.8.2 - - - - - 523b3404 by David Waern at 2008-10-10T21:08:09+00:00 Fix documentation for createInterfaces - - - - - e1556702 by David Waern at 2008-10-10T21:26:19+00:00 Hide H.Utils in library - - - - - a8e751c3 by David Waern at 2008-10-10T21:34:59+00:00 Add back .haddock file versioning based on GHC version It was accidentally removed in the patch for GHC 6.8.2 compatibility - - - - - 06fb3c01 by David Waern at 2008-10-10T21:47:15+00:00 Bump version number to 2.3.0 - - - - - ff087fce by David Waern at 2008-10-10T22:35:49+00:00 Add support for DocPic The support for DocPic was merged into the GHC source long ago, but the support in Haddock was forgotten. Thanks Peter Gavin for submitting this fix! - - - - - 3af85bf6 by David Waern at 2008-10-10T23:34:05+00:00 Update tests - - - - - 0966873c by Simon Marlow at 2008-10-10T14:43:04+00:00 no need for handleErrMsg now, we don't throw any ErrMsgs - - - - - f1870de3 by Clemens Fruhwirth at 2008-10-10T13:29:36+00:00 Compile with wrapper but remove it for dist-install - - - - - 7b440dc2 by David Waern at 2008-10-11T14:02:25+00:00 Remove interface from LinksInfo It was there to know the documentation home module when creating a wiki link, but we already know this since we have the DocName. - - - - - e5729e6a by David Waern at 2008-10-15T20:49:18+00:00 Wibble - - - - - b2a8e01a by David Waern at 2008-10-15T21:03:36+00:00 Use type synonyms for declarations and docs in H.I.Create - - - - - be71a15b by David Waern at 2008-10-15T21:12:17+00:00 Comment out unused type family stuff completely - - - - - 91aaf075 by David Waern at 2008-10-15T21:49:04+00:00 Wibble - - - - - 42ba4eb4 by David Waern at 2008-10-15T21:53:53+00:00 Move convenient type synonym to H.Types - - - - - db11b723 by David Waern at 2008-10-15T22:14:07+00:00 Add DeclInfo to H.Types - - - - - 193552b6 by David Waern at 2008-10-15T22:15:01+00:00 Add subordinates with docs to the declaration map The only place in the code where we want the subordinates for a declaration is right after having looked up the declaration in the map. And since we include subordinates in the map, we might as well take the opportunity to store those subordinates that belong to a particular declaration together with that declaration. We also store the documentation for each subordinate. - - - - - 31e6eebc by David Waern at 2008-10-16T17:18:47+00:00 Wibble - - - - - 0dcbd79f by David Waern at 2008-10-16T20:58:42+00:00 Fix haskell/haddock#61 We were not getting docs for re-exported class methods. This was because we were looking up the docs in a map made from the declarations in the current module being rendered. Obviously, re-exported class methods come from another module. Class methods and ATs were the only thing we were looking up using the doc map, everything else we found in the ExporItems. So now I've put subordinate docs in the ExportItem's directly, to make things a bit more consistent. To do this, I added subordinates to the the declarations in the declaration map. This was easy since we were computing subordinates anyway, to store stand-alone in the map. I added a new type synonym 'DeclInfo', which is what we call what is now stored in the map. This little refactoring removes duplicate code to retrieve subordinates and documentation from the HsGroup. - - - - - de47f20a by David Waern at 2008-10-16T22:06:35+00:00 Document function and improve its layout - - - - - e74e625a by Thomas Schilling at 2008-10-20T11:12:57+00:00 Force interface more aggressively. For running Haddock on GHC this reduces memory usage by about 50 MB on a 32 bit system. A heap profile shows total memory usage peak at about 100 MB, but actual usage is at around 300 MB even with compacting GC (+RTS -c). - - - - - b63ac9a1 by David Waern at 2008-10-20T20:25:50+00:00 Make renamer consistent Instead of explicitly making some binders Undocumented, treat all names the same way (that is, try to find a Documented name). - - - - - f6de0bb0 by Ian Lynagh at 2008-09-19T00:54:43+00:00 TAG GHC 6.10 fork - - - - - 74599cd0 by David Waern at 2008-10-20T21:13:24+00:00 Do not save hidden modules in the .haddock file We were saving interfaces of all processed modules including those hidden using {-# OPTIONS_HADDOCK hide #-} in the .haddock file. This caused broken links when generating the index for the libraries that come with GHC. This patch excludes modules with hidden documentation when writing .haddock files. It should fix the above problem. - - - - - 7b6742e9 by David Waern at 2008-10-21T19:54:52+00:00 Do not save hidden modules in the .haddock file (also for ghc >= 6.9) When writing the first patch, I forgot to do the fix in both branches of an #if macro. - - - - - b99b1951 by David Waern at 2008-10-22T20:04:18+00:00 Remove subordinate map and its usage It is not needed now that we store subordinate names in the DeclInfo map. - - - - - da97cddc by David Waern at 2008-10-22T20:11:46+00:00 Tidy up code in H.I.Create a little Remove commented out half-done type instance support, and remove DeclWithDoc synonym. - - - - - 6afa76f3 by David Waern at 2008-10-22T21:17:29+00:00 Fix warnings in H.GHC.Utils - - - - - 171ea1e8 by David Waern at 2008-10-22T21:35:04+00:00 Fix warnings in H.Utils - - - - - c8cb3b91 by David Waern at 2008-10-22T21:36:49+00:00 Wibble - - - - - 767fa06a by David Waern at 2008-10-27T19:59:04+00:00 Make named doc comments into ExportDoc instead of ExportDecl Fixes a crash when processing modules without export lists containing named docs. - - - - - e638bbc6 by David Waern at 2008-11-02T22:21:10+00:00 Add HCAR entry - - - - - 92b4ffcf by David Waern at 2008-11-02T22:44:19+00:00 Update CHANGES - - - - - 84d4da6e by David Waern at 2008-11-03T11:25:04+00:00 Add failing test for template haskell crash - - - - - 2a9cd2b1 by David Waern at 2008-11-04T21:13:44+00:00 Add tests/TH.hs - - - - - 8a59348e by David Waern at 2008-11-04T21:30:26+00:00 TAG 2.3.0 - - - - - 54f70d31 by Thomas Schilling at 2008-10-24T17:04:08+00:00 Enable framed view of the HTML documentation. This patch introduces: - A page that displays the documentation in a framed view. The left side will show a full module index. Clicking a module name will show it in the right frame. If Javascript is enabled, the left side is split again to show the modules at the top and a very short synopsis for the module currently displayed on the right. - Code to generate the mini-synopsis for each module and the mini module index ("index-frames.html"). - CSS rules for the mini-synopsis. - A very small amount of javascript to update the mini-synopsis (but only if inside a frame.) Some perhaps controversial things: - Sharing code was very difficult, so there is a small amount of code duplication. - The amount of generated pages has been doubled, since every module now also gets a mini-synopsis. The overhead should not be too much, but I haven't checked. Alternatively, the mini-synopsis could also be generated using Javascript if we properly annotate the actual synopsis. - - - - - 5d7ea5a6 by David Waern at 2008-11-04T23:20:17+00:00 Follow change to ExportDecl in frames code - - - - - 60e16308 by David Waern at 2008-11-04T23:35:26+00:00 Update CHANGES - - - - - d63fd26d by David Waern at 2008-11-04T23:37:43+00:00 Bump version number - - - - - c1660c39 by David Waern at 2008-11-04T23:44:46+00:00 Update CHANGES - - - - - 995ab384 by David Waern at 2008-11-04T23:55:21+00:00 Remove .ref files from tests/output/ - - - - - 1abbbe75 by David Waern at 2008-11-04T23:57:41+00:00 Output version info before running tests - - - - - 649b182f by David Waern at 2008-11-05T22:45:37+00:00 Add ANNOUNCE message - - - - - c36ae0bb by David Waern at 2008-11-05T23:15:35+00:00 Update ANNOUNCE - - - - - 9c4f3d40 by David Waern at 2008-11-05T23:18:30+00:00 Wibble - - - - - 5aac87ce by David Waern at 2008-11-06T21:07:48+00:00 Depend on base 4.* when using GHC >= 6.9, otherwise 3.* - - - - - b9796a74 by David Waern at 2008-11-06T21:13:40+00:00 Bump version to 2.4.1 and update CHANGES - - - - - d4b26baa by David Waern at 2008-11-06T21:26:33+00:00 Depend on base 4.0.* instead of 4.* - - - - - 2cb0903c by David Waern at 2008-11-06T21:46:53+00:00 Fix warnings in H.B.HH and H.B.HH2 - - - - - e568e89a by David Waern at 2008-11-06T21:47:12+00:00 Fix warnings in Haddock.ModuleTree - - - - - 9dc14fbd by David Waern at 2008-11-06T21:47:52+00:00 Fix warnings in Haddock.Version - - - - - 02ac197c by David Waern at 2008-11-06T21:51:31+00:00 Fix warnings in H.InterfaceFile and H.Options - - - - - 63e7439a by David Waern at 2008-11-06T21:59:45+00:00 Fix warnings in H.GHC.Typecheck - - - - - 4bca5b68 by David Waern at 2008-11-08T13:43:42+00:00 Set HscTarget to HscNothing instead of HscAsm There used to be a bug in the GHC API that prevented us from setting this value. - - - - - 07357aec by David Waern at 2008-11-09T22:27:00+00:00 Re-export NameCache and friends from Distribution.Haddock - - - - - ea554b5a by David Waern at 2008-11-09T23:14:10+00:00 Add Haddock.GHC.Utils to other-modules in library - - - - - 74aecfd7 by David Waern at 2008-11-10T01:18:57+00:00 Export DocName in the library - - - - - 241a58b3 by David Waern at 2008-11-10T01:19:18+00:00 Document the functions in H.DocName - - - - - edc2ef1b by David Waern at 2008-11-10T01:20:52+00:00 Export H.DocName in the library - - - - - 4f588d55 by David Waern at 2008-11-10T01:29:14+00:00 Make DocName an instance of NamedThing - - - - - b4647244 by David Waern at 2008-11-15T22:58:18+00:00 Reflect version bump in test suite - - - - - 4bee8ce2 by David Waern at 2008-11-15T22:58:45+00:00 Update tests For unknown reasons, test output for Bug1 and Test has changed for the better. - - - - - 1690e2f9 by David Waern at 2008-11-15T22:59:33+00:00 Store hidden modules in .haddock files We store documentation for an entity in the 'InstalledInterface' of the definition site module, and never in the same structure for a module which re-exports the entity. So when a client of the Haddock library wants to look up some documentation, he/she might need to access a hidden module. But we currently don't store hidden modules in the .haddock files. So we add the hidden modules and the Haddock options to the .haddock files. The options will be used to filter the module list to obtain the visible modules only, which is necessary for generating the contents and index for installed packages. - - - - - 8add6435 by David Waern at 2008-11-16T14:35:50+00:00 Bump major version number due to .haddock file format change - - - - - 48bfcf82 by David Waern at 2008-11-23T14:32:52+00:00 Update tests to account for version number bump - - - - - 0bbd1738 by David Waern at 2008-11-23T14:33:31+00:00 HADDOCK_DATA_DIR changed to haddock_datadir - - - - - 5088b78c by David Waern at 2008-11-23T17:13:21+00:00 FIX haskell/haddock#45: generate two anchors for each name We generate two anchor tags for each name, one where we don't escape the name and one where we URI-encode it. This is for compatibility between IE and Opera. Test output is updated. - - - - - 5ee5ca3b by Neil Mitchell at 2008-11-27T14:38:11+00:00 Drop HsDocTy annotations, they mess up pretty printing and also have a bracketing bug (#2584) - - - - - 51c014e9 by Roman Cheplyaka at 2008-11-27T22:27:36+00:00 Allow referring to a specific section within a module in a module link Fixes haskell/haddock#65 - - - - - 4094bdc5 by David Waern at 2008-11-28T21:13:33+00:00 Update tests following anchor change - - - - - f89552dd by Thomas Schilling at 2008-11-29T16:16:20+00:00 Haddock really shouldn't try to overwrite files. - - - - - 98127499 by David Waern at 2008-12-07T14:09:15+00:00 Solve conflict - - - - - 319356c5 by David Waern at 2008-10-22T21:16:55+00:00 Add -Wall -Werror to ghc-options - - - - - 3c4968c9 by David Waern at 2008-11-04T23:38:56+00:00 TAG 2.4.0 - - - - - 4b21e003 by David Waern at 2008-11-06T21:14:04+00:00 TAG 2.4.1 - - - - - 8e0cad5c by David Waern at 2008-12-07T14:12:54+00:00 Remove -Werror - - - - - 299d6deb by David Waern at 2008-12-07T14:25:18+00:00 Remove -Wall, we'll focus on warnings after 6.10.2 is out - - - - - 5f4216b6 by David Waern at 2008-12-07T20:58:05+00:00 Resolve conflict properly - - - - - 67d774e7 by Neil Mitchell at 2008-12-15T11:44:26+00:00 Make forall's in constructors explicit, i.e. data Foo = Foo {foo :: Eq a => a} - - - - - 61851792 by Neil Mitchell at 2008-12-18T15:39:39+00:00 Try and find a better package name than "main" for Hoogle, goes wrong when working on an executable rather than a library - - - - - 2fab8554 by David Waern at 2008-12-08T23:19:48+00:00 Make visible names from ExportItems Instead of a complicated calculation of visible names out of GHC's export items, we can get them straight out of the already calculated ExportItems. The ExportItems should represent exactly those items that are visible in an interface. If store all the exported sub-names in ExportDecl instead of only those with documentation, the calculation becomes very simple. So we do this change as well (should perhaps have been a separate patch). This should fix the problem with names from ghc-prim not appearing in the link environment. - - - - - 7caadd8c by Ian Lynagh at 2008-12-11T17:01:04+00:00 Wrap the GHC usage with defaultCleanupHandler This fixes a bug where haddock leaves /tmp/ghc* directories uncleaned. - - - - - 7c9fc9a5 by David Waern at 2009-01-02T21:38:27+00:00 Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. - - - - - 119e4e05 by David Waern at 2009-01-06T23:34:17+00:00 Do not process boot modules We should of course not try to produce documentation for boot modules! The reason this has worked in the past is that the output of "real" modules overwrites the output of boot modules later in the process. However, this causes a subtle link environment problem. So let's get rid of this stupid behaviour. We avoid processing boot modules, but we continue to typecheck them. - - - - - c285b9d2 by David Waern at 2009-01-08T18:03:36+00:00 Export modules also when coming from external packages This seems to have regressed since a refactoring that was part of the 2.3.0 release. - - - - - 24031c17 by David Waern at 2009-01-10T15:26:26+00:00 Change version to 2.4.2 - no need to go to 2.5.0 - - - - - 864d1c3f by David Waern at 2009-01-10T15:35:20+00:00 Update tests to account for version number change - - - - - 524ba886 by David Waern at 2009-01-10T18:29:17+00:00 Add test for Template Haskell splicing - - - - - 05e6e003 by David Waern at 2009-01-10T19:35:42+00:00 Fix Trac haskell/haddock#68: Turn on compilation via C for Template Haskell packages We can't use HscNothing if we need to run code coming from modules inside the processed package during typechecking, which is the case for some packages using Template Haskell. This could be improved, to e.g. use HscInterpreted and HscNothing where possible, instead of using HscC for all modules in the package. - - - - - 2b2bafa1 by David Waern at 2009-01-10T20:22:25+00:00 Only use needsTemplateHaskell when compiling with GHC 6.10.2 or above - - - - - bedc3a93 by Ian Lynagh at 2009-01-11T14:58:41+00:00 Fix the location of INPLACE_PKG_CONF; fixes the build Spotted by Conal Elliott - - - - - 943107c8 by David Waern at 2009-01-20T19:27:39+00:00 Document H.I.Create.collectDocs better - - - - - c6252e37 by David Waern at 2009-01-20T19:29:51+00:00 Fix Trac haskell/haddock#59: TH-generated declarations disappearing This patch was contributed by Joachim Breitner (nomeata). - - - - - 3568a6af by David Waern at 2009-01-21T21:41:48+00:00 Do not indicate that a constructor argument is unboxed We only show the strictness annotation for an unboxed constructor argument. The fact that it is unboxed is an implementation detail and should not be part of the module interface. - - - - - 562a4523 by David Waern at 2009-01-22T18:53:49+00:00 Fix Trac haskell/haddock#50: do not attach docs to pragmas or other kinds of non-declarations We now filter out everything that is not a proper Haskell declaration before collecting the docs and attaching them to declarations. - - - - - 6fdf21c2 by David Waern at 2009-01-22T19:48:09+00:00 Add test for quasi quotation. No reference output yet. - - - - - dc4100fd by David Waern at 2009-01-22T19:57:47+00:00 Improve quasi-quotation test and add reference output - - - - - 908b74bb by David Waern at 2009-01-23T23:22:03+00:00 Filter out separately exported associated types in a smarter way - - - - - f6b42ecb by David Waern at 2009-01-24T16:54:39+00:00 Correct spelling mistake in error message - - - - - 24e4245d by David Waern at 2009-01-24T17:48:03+00:00 Correct comment - - - - - b5e8462f by David Waern at 2009-02-07T13:22:29+00:00 Do not show a subordinate at the top level if its parent is also exported See note in the source code for more info. - - - - - 4b09de57 by David Waern at 2009-02-07T13:53:53+00:00 Update test following change to top level subordinates - - - - - 76379896 by David Waern at 2009-02-07T13:58:04+00:00 Remove html files in the tests/output/ directory which have been accidentally added - - - - - 1a6d8b10 by Joachim Breitner at 2009-02-20T10:29:43+00:00 Typo in comment - - - - - fec367d0 by David Waern at 2009-02-24T20:21:17+00:00 Fix small bug The rule is to prefer type constructors to other things when an identifier in a doc string can refer to multiple things. This stopped working with newer GHC versions (due to a tiny change in the GHC renamer). We implement this rule in the HTML backend for now, instead of fixing it in GHC, since we will move renaming of doc strings to Haddock in the future anyway. - - - - - 9b4172eb by David Waern at 2009-02-25T20:04:38+00:00 Fix bad error handling with newer GHCs When support for GHC 6.10 was added, an error handler was installed only around the typechecking phase. This had the effect that errors thrown during dependency chasing were caught in the top-level exception handler and not printed with enough detail. With this patch we wrap the error handler around all our usage of the Ghc monad. - - - - - de2df363 by Simon Peyton Jones at 2009-02-02T16:47:42+00:00 Hide funTyConName, now exported by TypeRep - - - - - 4d40a29f by Ian Lynagh at 2009-02-12T18:57:49+00:00 Don't build the library when building in the GHC tree - - - - - 1cd0abe4 by Ian Lynagh at 2009-02-13T13:58:53+00:00 Add a ghc.mk - - - - - 3d814eeb by Ian Lynagh at 2009-02-13T18:50:28+00:00 do .depend generation for haddock with the stage1 compiler This is a bit of a hack. We mkdepend with stage1 as if .depend depends on the stage2 compiler then make goes wrong: haddock's .depend gets included, which means that make won't reload until it's built, but we can't build it without the stage2 compiler. We therefore build the stage2 compiler before its .depend file is available, and so compilation fails. - - - - - b55036a4 by Ian Lynagh at 2009-02-25T01:38:13+00:00 Give haddock a wrapper on unix in the new GHC build system - - - - - 9eabfe68 by Ian Lynagh at 2009-02-25T19:21:32+00:00 Create inplace/lib/html in the new GHC build system - - - - - 93af30c7 by Ian Lynagh at 2008-11-07T19:18:23+00:00 TAG GHC 6.10.1 release - - - - - 06e6e34a by Thomas Schilling at 2009-02-24T18:11:00+00:00 Define __GHC_PATCHLEVEL__ for recent version of GHC (stable). - - - - - 680e6ed8 by Thomas Schilling at 2009-02-24T18:12:26+00:00 'needsTemplateHaskell' is not defined in current stable GHC. - - - - - 6c5619df by David Waern at 2009-02-25T22:15:23+00:00 Hide fynTyConName only for recent GHC versions - - - - - 6b2344f1 by Ian Lynagh at 2009-02-26T00:49:56+00:00 Add the module to one of haddocks warnings - - - - - e5d11c70 by David Waern at 2009-02-27T21:37:20+00:00 Bug fix We tried to filter out subordinates that were already exported through their parent. This didn't work properly since we were in some cases looking at the grand-parent and not the parent. We now properly compute all the parent-child relations of a declaration, and use this information to get the parent of a subordinate. We also didn't consider record fields with multiple parents. This is now handled correctly. We don't currently support separately exported associated types. But when we do, they should be handled correctly by this process too. Also slightly improved the warning message that we give when filtering out subordinates. - - - - - 10a79a60 by David Waern at 2009-02-27T22:08:08+00:00 Fix error message conflict The module name is already written in the beginning of the message, as seems to be the convention in Haddock. Perhaps not so clear, but we should change it everywhere in that case. Leaving it as it is for now. - - - - - c5055c7f by David Waern at 2009-02-27T22:15:17+00:00 Shorten warning message - - - - - a72fed3a by David Waern at 2009-02-28T00:53:55+00:00 Do not show package name in warning message - - - - - a5daccb2 by Ian Lynagh at 2009-03-01T14:59:35+00:00 Install haddock in the new GHC build system - - - - - dfdb025c by Ian Lynagh at 2009-03-07T23:56:29+00:00 Relax base dependency to < 4.2, not < 4.1 - - - - - 5769c8b4 by David Waern at 2009-03-21T14:58:52+00:00 Bump .haddock file version number (due to change of format) - - - - - f1b8f67b by David Waern at 2009-03-21T14:59:26+00:00 Define __GHC_PATCHLEVEL__=1 when using ghc-6.10.1 - - - - - 23f78831 by David Waern at 2009-03-21T16:40:52+00:00 Update CHANGES - - - - - 7d2735e9 by David Waern at 2009-03-21T16:50:33+00:00 Update ANNOUNCE - - - - - 0771e00a by David Waern at 2009-03-21T16:54:40+00:00 Update ANNOUNCE, again - - - - - 81a6942a by David Waern at 2009-03-21T17:50:06+00:00 Don't be too verbose in CHANGES - - - - - 29861dcf by David Waern at 2009-03-21T18:03:31+00:00 TAG 2.4.2 - - - - - a585f285 by David Waern at 2009-03-21T19:20:29+00:00 Require Cabal >= 1.2.3 - - - - - 7c611662 by David Waern at 2009-03-21T19:21:48+00:00 TAG 2.4.2 with cabal-version >= 1.2.3 - - - - - 23b7deff by Simon Marlow at 2009-03-20T15:43:42+00:00 new GHC build system: use shell-wrappers macro - - - - - 25f8afe7 by Ian Lynagh at 2009-03-21T19:13:53+00:00 Fix (with a hack?) haddock in teh new build system - - - - - 6a29a37e by David Waern at 2009-03-24T22:10:15+00:00 Remove unnecessary LANGUAGE pragma - - - - - 954da57d by David Waern at 2009-03-24T22:21:23+00:00 Fix warnings in H.B.DevHelp - - - - - 1619f1df by David Waern at 2009-03-26T23:20:44+00:00 -Wall police in H.B.Html - - - - - b211e13b by Simon Marlow at 2009-03-24T13:00:56+00:00 install Haddock's html stuff - - - - - 78e0b107 by David Waern at 2008-12-07T19:58:53+00:00 Add verbosity flag and utils, remove "verbose" flag - - - - - 913dae06 by David Waern at 2008-12-07T20:01:05+00:00 Add some basic "verbose" mode logging in H.Interface - - - - - 1cbff3bf by David Waern at 2009-03-27T00:07:26+00:00 Fix conflicts - - - - - 22f82032 by David Waern at 2009-03-27T21:15:11+00:00 Remove H.GHC.Typecheck - - - - - 81557804 by David Waern at 2009-03-27T21:19:22+00:00 Remove docNameOrig and use getName everywhere instead - - - - - d8267213 by David Waern at 2009-03-27T21:21:46+00:00 Use docNameOcc instead of nameOccName . getName - - - - - 5d55deab by David Waern at 2009-03-27T21:33:04+00:00 Remove H.DocName and put DocName in H.Types - - - - - 8ba72611 by David Waern at 2009-03-27T22:06:26+00:00 Document DocName - - - - - 605f8ca5 by David Waern at 2009-03-27T22:45:21+00:00 -Wall police - - - - - e4da93ae by David Waern at 2009-03-27T23:12:53+00:00 -Wall police in H.B.Hoogle - - - - - bb255519 by David Waern at 2009-03-27T23:41:28+00:00 Define Foldable and Traversable instances for Located - - - - - f1195cfe by David Waern at 2009-03-27T23:51:34+00:00 Wibble - - - - - 23818d7c by David Waern at 2009-03-28T00:03:55+00:00 -Wall police in H.I.Rename - - - - - 0f050d67 by David Waern at 2009-03-28T00:15:15+00:00 -Wall police in H.I.AttachInstances - - - - - 0f3fe038 by David Waern at 2009-03-28T21:09:41+00:00 Wibble - - - - - 275d4865 by David Waern at 2009-03-28T21:27:06+00:00 Layout fix - - - - - 54ff0ef8 by David Waern at 2009-03-28T21:59:07+00:00 -Wall police in H.I.Create - - - - - 7f58b117 by David Waern at 2009-03-28T22:10:19+00:00 -Wall police in H.Interface - - - - - f0c03b44 by David Waern at 2009-03-28T22:22:59+00:00 -Wall police in Main - - - - - 29da355c by David Waern at 2009-03-28T22:23:39+00:00 Turn on -Wall -Werror - - - - - 446d3060 by David Waern at 2009-04-01T20:40:30+00:00 hlint police - - - - - 3867c9fc by David Waern at 2009-04-01T20:48:42+00:00 hlint police - - - - - bd1f1600 by David Waern at 2009-04-01T20:58:02+00:00 hlint police - - - - - e0e90866 by David Waern at 2009-04-05T12:42:53+00:00 Move H.GHC.Utils to H.GhcUtils - - - - - 9cbd426b by David Waern at 2009-04-05T12:57:21+00:00 Remove Haddock.GHC and move its (small) contents to Main - - - - - b5c2cbfd by David Waern at 2009-04-05T13:07:04+00:00 Fix whitespace and stylistic issues in Main - - - - - 3c04aa56 by porges at 2008-12-07T08:22:19+00:00 add unicode output - - - - - 607918da by David Waern at 2009-04-26T15:09:43+00:00 Resolve conflict - - - - - 4bec6b6b by Simon Marlow at 2009-05-13T10:00:31+00:00 fix markup - - - - - 436ad6f4 by Simon Marlow at 2009-03-23T11:54:45+00:00 clean up - - - - - bdcd1398 by Simon Marlow at 2009-03-24T10:36:45+00:00 new GHC build system: add $(exeext) - - - - - 9c0972f3 by Simon Marlow at 2009-03-24T11:04:31+00:00 update for new GHC build system layout - - - - - d0f3f83a by Ian Lynagh at 2009-03-29T15:31:43+00:00 GHC new build system fixes - - - - - 5a8245c2 by Ian Lynagh at 2009-04-04T20:44:23+00:00 Tweak new build system - - - - - 9c6f2d7b by Simon Marlow at 2009-05-13T10:01:27+00:00 add build instructions for GHC - - - - - 66d07c76 by Ian Lynagh at 2009-05-31T00:37:53+00:00 Quote program paths in ghc.mk - - - - - bb7de2cd by Ian Lynagh at 2009-06-03T22:57:55+00:00 Use a bang pattern on an unlifted binding - - - - - 3ad283fc by Ian Lynagh at 2009-06-13T16:17:50+00:00 Include haddock in GHC bindists - - - - - ac447ff4 by David Waern at 2009-06-24T21:07:50+00:00 Delete Haddock.Exception and move contents to Haddock.Types Only a few lines of code that mainly declares a type - why not just put it in Haddock.Types. - - - - - 4464fb9b by David Waern at 2009-06-24T22:23:23+00:00 Add Haddock module headers Add a proper Haddock module header to each module, with a more finegrained copyright. If you feel mis-accreditted, please correct any copyright notice! The maintainer field is set to haddock at projects.haskell.org. Next step is to add a brief description to each module. - - - - - 5f4c95dd by David Waern at 2009-06-24T22:39:44+00:00 Fix spelling error - - - - - 6d074cdb by David Waern at 2009-06-25T21:53:56+00:00 Document Interface and InstalledInterface better - - - - - d0cbd183 by David Waern at 2009-06-27T12:46:46+00:00 Remove misplaced whitespace in H.I.Rename - - - - - fa381c49 by David Waern at 2009-06-27T13:26:03+00:00 Fix haskell/haddock#104 - create output directory if missing - - - - - 91fb77ae by Ian Lynagh at 2009-06-25T15:59:50+00:00 TAG 2009-06-25 - - - - - 0d853f40 by Simon Peyton Jones at 2009-07-02T15:35:22+00:00 Follow extra field in ConDecl - - - - - b201735d by Ian Lynagh at 2009-07-05T16:50:35+00:00 Update Makefile for the new GHC build system - - - - - df6c0092 by Ian Lynagh at 2009-07-05T17:01:13+00:00 Resolve conflicts - - - - - 1066870a by Ian Lynagh at 2009-07-05T17:01:48+00:00 Remove the -Wwarn hack in the GHC build system - - - - - 7e856076 by Ian Lynagh at 2009-07-05T17:17:59+00:00 Fix warnings - - - - - 5d4cd958 by Ian Lynagh at 2009-07-05T19:35:40+00:00 Bump version number Cabal needs to distinguish between haddocks having a --verbose and --verbosity flag - - - - - 6ee07c99 by David Waern at 2009-07-06T20:14:57+00:00 Wibble - - - - - 2308b66f by David Waern at 2009-07-06T20:24:20+00:00 Clearer printing of versions by runtests.hs - - - - - d4b5d9ab by David Waern at 2009-07-06T21:22:42+00:00 Fix (invisible) bug introduced by unicode patch - - - - - 2caca8d8 by David Waern at 2009-07-06T21:44:10+00:00 Use HscAsm instead of HscC when using TH - - - - - 18f3b755 by David Waern at 2009-07-06T22:10:22+00:00 Update HCAR entry (by Janis) - - - - - a72ac9db by David Waern at 2009-07-06T23:01:35+00:00 Follow HsRecTy change with an #if __GLASGOW_HASKEL__ >= 611 - - - - - 549135d2 by David Waern at 2009-07-06T23:11:41+00:00 Remove unused functions from Haddock.Utils - - - - - b450134a by Isaac Dupree at 2009-07-11T14:59:00+00:00 revert to split-index for large indices - remove the search-box, because browsers have search-for-text abilities anyway. - pick 150 items in index as the arbitrary time at which to split it - notice the bug that identifiers starting with non-ASCII characters won't be listed in split-index, but don't bother to fix it yet (see ticket haskell/haddock#116, http://trac.haskell.org/haddock/ticket/116 ) - - - - - 78a5661e by Isaac Dupree at 2009-07-20T15:37:18+00:00 Implement GADT records in HTML backend - - - - - 4e163555 by Isaac Dupree at 2009-07-21T22:03:25+00:00 add test for GADT records - - - - - 79aa4d6e by David Waern at 2009-07-23T20:40:37+00:00 Update test suite following version bump - - - - - 5932c011 by David Waern at 2009-08-02T10:25:39+00:00 Fix documentation bug - - - - - a6970fca by David Waern at 2009-08-12T23:08:53+00:00 Remove support for ghc 6.8.* from .cabal file - - - - - c1695902 by Ian Lynagh at 2009-07-07T13:35:45+00:00 Fix unused import warnings - - - - - fb6df7f9 by Ian Lynagh at 2009-07-16T00:20:31+00:00 Use cProjectVersion directly rather than going through compilerInfo Fixes the build after changes in GHC - - - - - 548cdd66 by Simon Marlow at 2009-07-28T14:27:04+00:00 follow changes in GHC's ForeignType - - - - - 9395aaa0 by David Waern at 2009-08-13T22:17:33+00:00 Switch from PatternSignatures to ScopedTypeVariables in Main - - - - - eebf39bd by David Waern at 2009-08-14T17:14:28+00:00 Version .haddock files made with GHC 6.10.3/4 correclty - - - - - 58f3e735 by David Waern at 2009-08-14T17:19:37+00:00 Support GHC 6.10.* and 6.11.* only - - - - - 5f63cecc by David Waern at 2009-08-14T22:03:20+00:00 Do not version .haddock file based on GHC patchlevel version We require that the instances of Binary that we use from GHC will not change between patchlevel versions. - - - - - d519de9f by David Waern at 2009-08-14T23:50:00+00:00 Update CHANGES - - - - - 35dccf5c by David Waern at 2009-08-14T23:51:38+00:00 Update version number everywhere - - - - - 6d363fea by David Waern at 2009-08-15T09:46:49+00:00 Update ANNOUNCE - - - - - c7ee6bc2 by David Waern at 2009-08-15T09:47:13+00:00 Remove -Werror Forgot that Hackage doesn't like it. - - - - - a125c12b by David Waern at 2009-08-15T09:49:50+00:00 Require Cabal >= 1.6 - - - - - adb2f560 by Isaac Dupree at 2009-08-12T03:47:14+00:00 Cross-Package Documentation version 4 - - - - - 3d6dc04d by David Waern at 2009-08-15T23:42:57+00:00 Put all the IN_GHC_TREE stuff inside getGhcLibDir - - - - - 56624097 by David Waern at 2009-08-15T23:52:03+00:00 Add --print-ghc-libdir - - - - - f15d3ccb by David Waern at 2009-08-16T00:37:52+00:00 Read base.haddock when running tests We can now test cross-package docs. - - - - - 283f0fb9 by David Waern at 2009-08-16T00:50:59+00:00 Update test output - we now have more links - - - - - 673d1004 by David Waern at 2009-08-16T01:26:08+00:00 Read process.haddock when running tests - - - - - 0d127f82 by David Waern at 2009-08-16T01:43:04+00:00 Add a test for cross-package documentation - - - - - f94db967 by Ian Lynagh at 2009-08-16T18:42:44+00:00 Follow GHC build system changes - - - - - 5151278a by Isaac Dupree at 2009-08-16T19:58:05+00:00 make cross-package list types look nicer - - - - - c41e8228 by Isaac Dupree at 2009-08-18T01:47:47+00:00 Haddock.Convert: export more functions This lets us remove some code in Haddock.Interface.AttachInstances - - - - - 2e5fa398 by Isaac Dupree at 2009-08-18T02:11:05+00:00 switch AttachInstances to use synify code It changed an instance from showing ((,) a b) to (a, b) because my synify code is more sophisticated; I hope the latter is a good thing rather than a bad thing aesthetically, here. But this definitely reduces code duplication! - - - - - b8b07123 by Isaac Dupree at 2009-08-18T02:23:31+00:00 Find instances using GHC, which is more complete. In particular, it works cross-package. An intermediate patch also moved the instance-finding into createInterface, but that move turned out not to be necessary, so if we want to do that, it'd go in a separate patch. (Is that possible? Or will we need GHC to have loaded all the modules first, before we can go searching for the instances (e.g. if the modules are recursive or something)?) - - - - - 6959b451 by Isaac Dupree at 2009-08-17T00:37:18+00:00 fix preprocessor conditional sense - - - - - 942823af by Isaac Dupree at 2009-08-16T22:46:48+00:00 remove ghc 6.8 conditionals from Haddock.Interface - - - - - 4b3ad888 by Isaac Dupree at 2009-08-18T20:24:38+00:00 Fix GHC 6.11 build in Haddock.Convert - - - - - 0a89c5ab by Isaac Dupree at 2009-08-23T00:08:58+00:00 hacks to make it compile without fnArgDocsn - - - - - 7b3bed43 by Isaac Dupree at 2009-08-23T03:01:28+00:00 less big-Map-based proper extraction of constructor subdocs - - - - - b21c279a by Isaac Dupree at 2009-08-23T03:02:06+00:00 Html: remove unnecessary+troublesome GHC. qualifications - - - - - 96c97115 by Isaac Dupree at 2009-08-23T03:08:03+00:00 Move doc parsing/lexing into Haddock for ghc>=6.11 - - - - - e1cec02d by Isaac Dupree at 2009-08-23T05:08:14+00:00 get rid of unused DocMap parameter in Html - - - - - 66960c59 by Isaac Dupree at 2009-08-23T05:54:20+00:00 fix horrible named-docs-disappearing bug :-) - - - - - a9d7eff3 by Isaac Dupree at 2009-08-23T06:26:36+00:00 re-implement function-argument docs ..on top of the lexParseRn work. This patch doesn't change the InstalledInterface format, and thus, it does not work cross-package, but that will be easy to add subsequently. - - - - - 8bf6852c by Isaac Dupree at 2009-08-23T07:26:05+00:00 cross-package fnArgDocs. WARNING: changes .haddock binary format While breaking the format, I took the opportunity to unrename the DocMap that's saved to disk, because there's really no reason that we want to know what *another* package's favorite place to link a Name to was. (Is that true? Or might we want to know, someday?) Also, I added instance Binary Map in InterfaceFile. It makes the code a little simpler without changing anything of substance. Also it lets us add another Map hidden inside another Map (fnArgsDocs in instDocMap) without having really-convoluted serialization code. Instances are neat! I don't understand why this change to InterfaceFile seemed to subtly break binary compatibility all by itself, but no matter, I'll just roll it into the greater format-changing patch. Done! - - - - - 30115a64 by Isaac Dupree at 2009-08-23T18:22:47+00:00 Improve behavior for unfindable .haddock - - - - - aa364bda by Isaac Dupree at 2009-08-23T18:28:16+00:00 add comment for FnArgsDoc type - - - - - 49b23a99 by Isaac Dupree at 2009-08-23T21:52:48+00:00 bugfix: restore fnArgDocs for type-synonyms - - - - - f65f9467 by Isaac Dupree at 2009-08-23T22:06:55+00:00 Backends.Hoogle: eliminate warnings - - - - - a292d216 by Isaac Dupree at 2009-08-23T22:10:24+00:00 Haddock.Convert: eliminate warnings - - - - - 5546cd20 by Isaac Dupree at 2009-08-23T22:12:31+00:00 Haddock.Interface.Rename: eliminate warnings - - - - - 0a9798b6 by Isaac Dupree at 2009-08-23T22:18:47+00:00 Main.hs: remove ghc<6.9 conditionals - - - - - e8f9867f by Isaac Dupree at 2009-08-23T22:27:46+00:00 Main.hs: eliminate warnings (except for OldException) - - - - - 61c64247 by Isaac Dupree at 2009-08-23T22:41:01+00:00 move get*LibDir code in Main.hs, to +consistent code, -duplication - - - - - 948f1e69 by Isaac Dupree at 2009-08-23T23:14:26+00:00 Main.hs: OldException->Exception: which eliminates warnings - - - - - 3d5d5e03 by Isaac Dupree at 2009-08-23T23:20:11+00:00 GhcUtils: ghc >= 6.10 - - - - - 2771d657 by Isaac Dupree at 2009-08-23T23:21:55+00:00 InterfaceFile: ghc >= 6.10 - - - - - d9f2b9d1 by Isaac Dupree at 2009-08-23T23:22:58+00:00 Types: ghc >= 6.10 - - - - - ca39210e by Isaac Dupree at 2009-08-23T23:23:26+00:00 ModuleTree: ghc >= 6.10 - - - - - 883c4e59 by Isaac Dupree at 2009-08-23T23:24:04+00:00 Backends.DevHelp: ghc >= 6.10 - - - - - 04667df5 by Isaac Dupree at 2009-08-23T23:24:37+00:00 Backends.Html: ghc >= 6.10 - - - - - a9f7f25f by Isaac Dupree at 2009-08-23T23:25:24+00:00 Utils: ghc >= 6.10 - - - - - b7105022 by Isaac Dupree at 2009-08-23T23:37:47+00:00 eliminate haskell98 dependency, following GHC's example It turns out I/we already had, and it was only a matter of deleting it from the cabal file. - - - - - 292e0911 by Isaac Dupree at 2009-08-24T01:22:44+00:00 refactor out subordinatesWithNoDocs dep of inferenced-decls fix - - - - - c2ed46a2 by Isaac Dupree at 2009-08-24T01:24:03+00:00 Eradicate wrong runtime warning for type-inferenced exported-functions see the long comment in the patch for why I did it this way :-) - - - - - 4ac0b57c by David Waern at 2009-09-04T22:56:20+00:00 Clean up tyThingToHsSynSig a little Factor out noLoc and use the case construct. Also rename the function to tyThingToLHsDecl, since it doesn't just create type signatures. - - - - - 28ab9201 by David Waern at 2009-09-04T22:58:50+00:00 Wibble - - - - - 0d9fe6d0 by David Waern at 2009-09-06T18:39:30+00:00 Add more copyright owners to H.I.AttachInstances - - - - - 122441b1 by David Waern at 2009-09-06T18:44:12+00:00 Style police - - - - - 1fa79463 by David Waern at 2009-09-06T18:57:45+00:00 Move toHsInstHead to Haddock.Convert and call it synifyInstHead - - - - - 0d42a8aa by David Waern at 2009-09-06T21:11:38+00:00 Use colordiff to display test results if available - - - - - ea9d8e03 by Simon Marlow at 2009-08-24T08:46:14+00:00 Follow changes in GHC's interface file format Word32 instead of Int for FastString and Name offsets - - - - - 537e051e by Simon Marlow at 2009-07-29T14:16:53+00:00 define unpackPackageId (it was removed from GHC) - - - - - 50c63aa7 by David Waern at 2009-09-09T23:18:03+00:00 Remove commented-out code - - - - - 511631fe by David Waern at 2009-09-09T23:19:05+00:00 Correct copyright in H.I.ParseModuleHeader - - - - - 898ec768 by David Waern at 2009-09-11T11:22:29+00:00 Use Map.fromList/toList intead of fromAscList/toAscList when serializing Maps This fixes the missing docs problem. The Eq and Ord instances for Name uses the unique number in Name. This number is created at deserialization time by GHC's magic Binary instance for Name, and it is random. Thus, fromAscList can't be used at deserialization time, even though toAscList was used at serialization time. - - - - - 37bec0d5 by Simon Peyton Jones at 2009-09-11T08:28:04+00:00 Track change in HsType - - - - - eb3a97c3 by Ian Lynagh at 2009-09-11T16:07:09+00:00 Allow building with base 4.2 - - - - - bb4205ed by Ian Lynagh at 2009-09-22T13:50:02+00:00 Loosen the GHC dependency - - - - - 5c75deb2 by Ian Lynagh at 2009-09-22T14:08:39+00:00 Fix building with GHC >= 6.12 - - - - - fb131481 by David Waern at 2009-09-11T11:24:48+00:00 Update runtests.hs to work with GHC 6.11 - - - - - ac3a419d by David Waern at 2009-09-11T11:25:14+00:00 Update CrossPackageDocs test - - - - - ec65c3c6 by David Waern at 2009-09-11T11:25:40+00:00 Add reference output for CrossPackageDocs - - - - - 520c2758 by Ian Lynagh at 2009-10-25T17:26:40+00:00 Fix installation in the GHC build system - - - - - 28b3d7df by Ian Lynagh at 2009-11-05T15:57:27+00:00 GHC build system: Make *nix installation work in paths containing spaces - - - - - 5c9bb541 by David Waern at 2009-11-14T11:56:39+00:00 Track change in HsType for the right compiler version - - - - - 905097ce by David Waern at 2009-11-14T12:10:47+00:00 hlint police - - - - - 04920630 by Ian Lynagh at 2009-11-20T13:46:30+00:00 Use defaultObjectTarget rather than HscAsm This fixes haddock when we don't have a native code generator - - - - - 966eb079 by David Waern at 2009-11-15T12:32:21+00:00 Remove commented-out code - - - - - 37f00fc4 by David Waern at 2009-11-22T13:58:48+00:00 Make runtests.hs strip links before diffing Generates easier to read diffs when tests fail. The content of the links is not important anyway since it is not taken into account by the tests. - - - - - 3a9bb8ef by David Waern at 2009-11-22T14:05:06+00:00 Follow findProgramOnPath signature change in runtests.hs - - - - - b26b9e5a by David Waern at 2009-11-22T14:08:40+00:00 Follow removal of GHC.MVar from base in CrossPackageDocs - - - - - f4d90ae4 by David Waern at 2009-11-22T14:48:47+00:00 Make copy.hs strip link contents before copying No more updating of reference files when URLs in links changes. - - - - - 4c9c420d by David Waern at 2009-11-22T15:26:41+00:00 Update test reference output * More links (Int, Float etc) * Stripped link contents - - - - - a62b80e3 by David Waern at 2009-11-23T23:19:39+00:00 Update CrossPackageDocs reference output - Remove GHC.MVar import (removed from base) - Strip link contents - - - - - 43491394 by David Waern at 2009-11-23T23:20:00+00:00 Update test reference files with comments on instances - - - - - 0d370a0b by David Waern at 2009-11-23T23:25:16+00:00 Bump version number - - - - - 2293113e by David Waern at 2009-11-24T20:55:49+00:00 Comments on instances Implementing this was a little trickier than I thought, since we need to match up instances from the renamed syntax with instances represented by InstEnv.Instance. This is due to the current design of Haddock, which matches comments with declarations from the renamed syntax, while getting the list of instances of a class/family directly using the GHC API. - Works for class instances only (Haddock has no support for type family instances yet) - The comments are rendered to the right of the instance head in the HTML output - No change to the .haddock file format - Works for normal user-written instances only. No comments are added on derived or TH-generated instances - - - - - bf586f29 by David Waern at 2009-11-27T22:05:15+00:00 Whitespace police - - - - - b8f03afa by David Waern at 2009-11-27T22:11:46+00:00 Remove bad whitespace and commented-out pieces - - - - - 90b8ee90 by David Waern at 2009-11-27T22:15:04+00:00 Whitespace police - - - - - b5ede900 by David Waern at 2009-11-27T22:15:50+00:00 Whitespace police - - - - - e3fddbfe by David Waern at 2009-11-28T13:37:59+00:00 Remove Name from DocInstance It's not used. - - - - - 9502786c by David Waern at 2009-11-28T13:56:54+00:00 Require at least GHC 6.12 While regression testing Haddock, I found a bug that happens with GHC 6.10.3, but not with GHC 6.12-rc2 (haven't tried 6.10.4). I don't have time to track it down. I think we should just always require the latest major GHC version. The time spent on making Haddock work with older versions is too high compared to the time spent on bugfixing, refactoring and features. - - - - - 8fa688d8 by David Waern at 2009-11-28T15:05:03+00:00 Remove cruft due to compatibility with older GHCs - - - - - 46fbbe9d by David Waern at 2009-11-28T15:07:50+00:00 Add a documentation header to Haddock.Convert - - - - - c3d2cc4a by David Waern at 2009-11-28T15:10:14+00:00 Remove unused H.Utils.FastMutInt2 - - - - - 490aba80 by David Waern at 2009-11-28T15:36:36+00:00 Rename Distribution.Haddock into Documentation.Haddock - - - - - 33ee2397 by David Waern at 2009-11-28T15:36:47+00:00 Fix error message - - - - - a5a3b950 by David Waern at 2009-11-28T16:58:39+00:00 Add a test flag that brings in QuickCheck - - - - - fa049e13 by David Waern at 2009-11-28T19:32:18+00:00 Say that we want quickcheck 2 - - - - - f32b0d9b by David Waern at 2009-11-28T19:32:40+00:00 Add an Arbitrary instance for HsDoc - - - - - da9a8bd7 by David Waern at 2009-11-28T20:15:30+00:00 Rename HsDoc back into Doc - - - - - edb60101 by David Waern at 2009-11-28T22:16:16+00:00 Move H.Interface.Parse/Lex to H.Parse/Lex These are not just used to build Interfaces. - - - - - 0656a9b8 by David Waern at 2009-11-28T23:12:14+00:00 Update version number in test suite - - - - - 5e8c6f4a by David Waern at 2009-12-21T14:12:41+00:00 Improve doc of DocName - - - - - 7868e551 by Ian Lynagh at 2009-09-22T10:43:03+00:00 TAG GHC 6.12-branch created - - - - - 0452a3ea by Ian Lynagh at 2009-12-15T12:46:07+00:00 TAG GHC 6.12.1 release - - - - - 65e9be62 by David Waern at 2009-12-21T16:58:58+00:00 Update CHANGES - - - - - 145cee32 by David Waern at 2009-12-21T16:59:09+00:00 TAG 2.6.0 - - - - - 3c552008 by David Waern at 2009-12-22T17:11:14+00:00 Update ANNOUNCE - - - - - 931f9db4 by David Waern at 2010-01-22T19:57:17+00:00 Convert haddock.vim to use unix newlines - - - - - 4e56588f by David Waern at 2010-01-22T22:11:17+00:00 Remove unnecessary (and inexplicable) uses of nub - - - - - 744bb4d1 by David Waern at 2010-01-22T22:12:14+00:00 Follow move of parser and lexer - - - - - e34bab14 by David Waern at 2010-01-22T22:49:13+00:00 Use findProgramLocation instead of findProgramOnPath in runtests.hs - - - - - 8d39891b by Isaac Dupree at 2010-01-14T18:53:18+00:00 fix html arg-doc off-by-one and silliness - - - - - 9401f2e9 by David Waern at 2010-01-22T22:57:03+00:00 Create a test for function argument docs - - - - - 507a82d7 by David Waern at 2010-01-22T23:24:47+00:00 Put parenthesis around type signature arguments of function type - - - - - 8a305c28 by David Waern at 2010-01-23T17:26:59+00:00 Add reference file for the FunArgs test - - - - - 1309d5e1 by David Waern at 2010-01-24T16:05:08+00:00 Improve FunArg test and update Test.html.ref - - - - - 2990f055 by Yitzchak Gale at 2010-02-14T16:03:46+00:00 Do not generate illegal character in HTML ID attribute. - - - - - c5bcab7a by David Waern at 2010-02-22T22:10:30+00:00 Fix Haddock markup error in comment - - - - - c6416a73 by David Waern at 2010-02-24T22:55:08+00:00 Large additions to the Haddock API Also improved and added more doc comments. - - - - - 57d289d7 by David Waern at 2010-02-24T22:58:02+00:00 Remove unused ifaceLocals - - - - - 80528d93 by David Waern at 2010-02-25T21:05:09+00:00 Add HaddockModInfo to the API - - - - - 82806848 by David Waern at 2010-02-25T21:05:27+00:00 Wibble - - - - - 744cad4c by David Waern at 2010-02-25T23:30:59+00:00 Make it possible to run a single test - - - - - 6a806e4c by David Waern at 2010-03-14T14:19:39+00:00 Bump version number - - - - - a5a8e4a7 by David Waern at 2010-03-14T14:36:35+00:00 Update ANNOUNCE - - - - - 6f05435e by Simon Hengel at 2010-03-15T20:52:42+00:00 Add missing dependencies for 'library' in haddock.cabal - - - - - faefe2bd by David Waern at 2010-03-15T22:29:37+00:00 Solve conflicts - - - - - 9808ad52 by David Waern at 2010-03-15T22:51:21+00:00 Bump version number - - - - - eb0bf60b by David Waern at 2010-03-15T22:52:32+00:00 Update CHANGES - - - - - f95cd891 by David Waern at 2010-03-15T23:01:06+00:00 Add Paths_haddock to other-modules of library - - - - - 65997b0a by David Waern at 2010-03-15T23:14:59+00:00 Update CHANGES - - - - - 7e251731 by David Waern at 2010-03-15T23:15:30+00:00 Bump version number - - - - - c9cd0ddc by David Waern at 2010-03-16T00:28:34+00:00 Fix warning - - - - - 1cac2d93 by Simon Peyton Jones at 2010-01-04T15:22:16+00:00 Fix imports for new location of splitKindFunTys - - - - - 474f26f6 by Simon Peyton Jones at 2010-02-10T14:36:06+00:00 Update Haddock for quasiquotes - - - - - 0dcc06c0 by Simon Peyton Jones at 2010-02-10T10:59:45+00:00 Track changes in HsTyVarBndr - - - - - 2d84733a by Simon Peyton Jones at 2010-02-10T14:52:44+00:00 Track HsSyn chnages - - - - - 9e3adb8b by Ian Lynagh at 2010-02-20T17:09:42+00:00 Resolve conflicts - - - - - a3e72ff8 by Simon Peyton Jones at 2010-03-04T13:05:16+00:00 Track change in HsUtils; and use a nicer function not an internal one - - - - - 27994854 by David Waern at 2010-03-18T22:22:27+00:00 Fix build with GHC 6.12.1 - - - - - 11f6e488 by David Waern at 2010-03-18T22:24:09+00:00 Bump version in test reference files - - - - - 0ef2f11b by David Waern at 2010-03-20T00:56:30+00:00 Fix library part of cabal file when in ghc tree - - - - - 3f6146ff by Mark Lentczner at 2010-03-20T22:30:11+00:00 First, experimental XHTML rendering switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString) - - - - - b8ab329b by Mark Lentczner at 2010-03-20T22:54:01+00:00 apply changes to Html.hs to Xhtml/*.hs incorporate changes that were made between the time Html.hs was copied and split into Xhtml.hs and Xhtml/*.hs includes patchs after "Wibble" (!) through "Fix build with GHC 6.12.1" - - - - - 73df2433 by Ian Lynagh at 2010-03-20T21:56:37+00:00 Follow LazyUniqFM->UniqFM in GHC - - - - - db4f602b by David Waern at 2010-03-29T22:00:01+00:00 Fix build with GHC 6.12 - - - - - d8dca088 by Simon Hengel at 2010-04-02T16:39:55+00:00 Add missing dependencies to cabal file - - - - - e2adc437 by Simon Hengel at 2010-04-02T14:08:40+00:00 Add markup support for interactive examples - - - - - e882ac05 by Simon Hengel at 2010-04-02T14:11:53+00:00 Add tests for interactive examples - - - - - 5a07a6d3 by David Waern at 2010-04-07T17:05:20+00:00 Propagate source positions from Lex.x to Parse.y - - - - - 6493b46f by David Waern at 2010-04-07T21:48:57+00:00 Let runtests.hs die when haddock has not been built - - - - - 5e34423e by David Waern at 2010-04-07T22:01:13+00:00 Make runtests.hs slightly more readable - - - - - 321d59b3 by David Waern at 2010-04-07T22:13:27+00:00 Fix haskell/haddock#75 Add colons to the $ident character set. - - - - - 37b08b8d by David Waern at 2010-04-08T00:32:52+00:00 Fix haskell/haddock#118 Avoid being too greedy when lexing URL markup (<..>), in order to allow multiple URLs on the same line. Do the same thing with <<..>> and #..#. - - - - - df8feac9 by David Waern at 2010-04-08T00:57:33+00:00 Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. - - - - - 1ca6f84b by David Waern at 2010-04-08T01:03:06+00:00 Add ghc-prim to test suite deps - - - - - 27371e3a by Simon Hengel at 2010-04-08T19:26:34+00:00 Let parsing fails on paragraphs that are immediately followed by an example This is more consistent with the way we treat code blocks. - - - - - 83096e4a by David Waern at 2010-04-08T21:20:00+00:00 Improve function name - - - - - 439983ce by David Waern at 2010-04-10T10:46:14+00:00 Fix haskell/haddock#112 No link was generated for 'Addr#' in a doc comment. The reason was simply that the identifier didn't parse. We were using parseIdentifier from the GHC API, with a parser state built from 'defaultDynFlags'. If we pass the dynflags of the module instead, the right options are turned on on while parsing the identifer (in this case -XMagicHash), and the parse succeeds. - - - - - 5c0d35d7 by David Waern at 2010-04-10T10:54:06+00:00 Rename startGhc into withGhc - - - - - dca081fa by Simon Hengel at 2010-04-12T19:09:16+00:00 Add documentation for interactive examples - - - - - c7f26bfa by David Waern at 2010-04-13T00:51:51+00:00 Slight fix to the documentation of examples - - - - - 06eb7c4c by David Waern at 2010-04-13T00:57:05+00:00 Rename Interactive Examples into Examples (and simplify explanation) - - - - - 264830cb by David Waern at 2010-05-10T20:07:27+00:00 Update CHANGES with info about 2.6.1 - - - - - 8e5d4514 by Simon Hengel at 2010-04-18T18:16:54+00:00 Add unit tests for parser - - - - - 68297f40 by David Waern at 2010-05-10T21:53:37+00:00 Improve testsuite README - - - - - f04eb6e4 by David Waern at 2010-05-11T19:14:31+00:00 Re-organise the testsuite structure - - - - - a360f710 by David Waern at 2010-05-11T19:18:03+00:00 Shorten function name - - - - - 1d5dd359 by David Waern at 2010-05-11T21:40:02+00:00 Update runtests.hs following testsuite re-organisation - - - - - ffebe217 by David Waern at 2010-05-11T21:40:10+00:00 Update runtests.hs to use base-4.2.0.1 - - - - - 635de402 by David Waern at 2010-05-11T21:41:11+00:00 Update runparsetests.hs following testsuite reorganisation - - - - - 72137910 by Ian Lynagh at 2010-05-06T20:43:06+00:00 Fix build - - - - - 1a80b76e by Ian Lynagh at 2010-05-06T22:25:29+00:00 Remove redundant import - - - - - 1031a80c by Simon Peyton Jones at 2010-05-07T13:21:09+00:00 Minor wibbles to HsBang stuff - - - - - dd8e7fe5 by Ian Lynagh at 2010-05-08T15:22:00+00:00 GHC build system: Follow "rm" variable changes - - - - - 7f5e6748 by David Waern at 2010-05-13T11:53:02+00:00 Fix build with GHC 6.12.2 - - - - - 7953d4d8 by David Waern at 2010-05-13T18:45:01+00:00 Fixes to comments only - - - - - 8ae8eb64 by David Waern at 2010-05-13T18:57:26+00:00 ModuleMap -> IfaceMap - - - - - 1c3eadc6 by David Waern at 2010-05-13T19:03:13+00:00 Fix whitespace style issues - - - - - e96783c0 by David Waern at 2010-05-13T19:08:53+00:00 Fix comment - - - - - c998a78b by David Waern at 2010-05-13T19:39:00+00:00 Position the module header the same way everywhere Silly, but nice with some consistency :-) - - - - - b48a714e by David Waern at 2010-05-13T19:41:32+00:00 Position of module header, this time in the HTML backends - - - - - f9bfb12e by David Waern at 2010-05-13T19:43:05+00:00 Two newlines between declarations in Main - - - - - 071d44c7 by David Waern at 2010-05-13T19:44:21+00:00 Newlines in Convert - - - - - 036346db by David Waern at 2010-05-13T19:46:47+00:00 Fix a few stylistic issues in H.InterfaceFile - - - - - f0b8379e by David Waern at 2010-05-13T19:47:53+00:00 Add newlines to H.ModuleTree - - - - - 27409f8e by David Waern at 2010-05-13T19:51:10+00:00 Fix stylistic issues in H.Utils - - - - - 24774a11 by David Waern at 2010-05-13T20:00:43+00:00 Structure H.Types better - - - - - 7b6f5e40 by David Waern at 2010-05-13T20:01:04+00:00 Remove bad Arbitrary instance - - - - - fac9f1f6 by David Waern at 2010-05-13T20:05:50+00:00 Get rid of H.Utils.pathJoin and use System.FilePath.joinPath instead - - - - - fe6d00c4 by David Waern at 2010-05-13T20:51:55+00:00 Export a couple of more types from the API - - - - - b2e33a5f by David Waern at 2010-05-13T21:27:51+00:00 Improve doc comment for Interface - - - - - c585f2ce by David Waern at 2010-05-13T21:30:14+00:00 Improve documentation of Haddock.Interface - - - - - e6791db2 by David Waern at 2010-05-13T22:07:35+00:00 Remove meaningless comments - - - - - 7801b390 by David Waern at 2010-05-14T17:53:33+00:00 Remove unused modules - - - - - f813e937 by David Waern at 2010-05-14T17:55:17+00:00 Re-direct compilation output to a temporary directory Also add a flag --no-tmp-comp-dir that can be used to get the old behaviour of writing compilation files to GHC's output directory (default "."). - - - - - e56737ec by David Waern at 2010-05-14T18:06:11+00:00 Wibble - - - - - e40b0447 by David Waern at 2010-05-14T19:01:52+00:00 Move flag evaluation code from Main to Haddock.Options Determining the value of "singular" flags (by e.g. taking the last occurrence of the flag) and other flag evaluation should done in Haddock.Options which is the module that is supposed to define the command line interface. This makes Main a bit easier on the eyes as well. - - - - - 27091f57 by David Waern at 2010-05-14T19:05:10+00:00 Wibble - - - - - c658cf61 by David Waern at 2010-05-14T19:06:49+00:00 Re-order things in Haddock.Options a bit - - - - - 8cfdd342 by David Waern at 2010-05-14T19:20:29+00:00 De-tabify Haddock.Options and fix other whitespace issues - - - - - 0df16b62 by David Waern at 2010-05-14T19:25:07+00:00 Improve comments - - - - - 80b38e2b by David Waern at 2010-05-14T19:26:42+00:00 Whitespace police - - - - - fe580255 by David Waern at 2010-05-14T19:31:23+00:00 Wibbles to comments - - - - - a2b43fad by David Waern at 2010-05-14T20:24:32+00:00 Move some more flag functions to Haddock.Options - - - - - 3f895547 by David Waern at 2010-05-14T20:37:12+00:00 Make renderStep a top-level function in Main - - - - - 5cdca11d by David Waern at 2010-05-14T20:39:27+00:00 Spelling in comment - - - - - ad98d14c by David Waern at 2010-05-14T20:40:26+00:00 Comment fixes - - - - - 0bb9218f by David Waern at 2010-05-14T20:49:01+00:00 Whitespace police - - - - - 0f0a533f by David Waern at 2010-05-15T16:42:29+00:00 Improve description of --dump-interface - - - - - 5b2833ac by David Waern at 2010-05-15T17:16:53+00:00 Document --no-tmp-comp-dir - - - - - 8160b170 by David Waern at 2010-05-15T17:18:59+00:00 Wibble - - - - - 570dbe33 by David Waern at 2010-05-18T21:15:38+00:00 HLint police - - - - - 204e425f by David Waern at 2010-05-18T21:16:30+00:00 HLint police - - - - - 6db657ac by David Waern at 2010-05-18T21:16:37+00:00 Wibble - - - - - b942ccd7 by Simon Marlow at 2010-06-02T08:27:30+00:00 Interrupted disappeared in GHC 6.13 (GHC ticket haskell/haddock#4100) - - - - - 3b94a819 by Simon Marlow at 2010-06-02T08:45:08+00:00 Allow base-4.3 - - - - - c5a1fb7c by Simon Marlow at 2010-06-02T09:03:04+00:00 Fix compilation with GHC 6.13 - - - - - 6181296c by David Waern at 2010-06-08T21:09:05+00:00 Display name of prologue file when parsing it fails - - - - - 7cbc6f60 by Ian Lynagh at 2010-06-13T16:20:25+00:00 Remove redundant imports - - - - - 980c804b by Simon Marlow at 2010-06-22T08:41:50+00:00 isLocalAndTypeInferenced: fix for local module names overlapping package modules - - - - - d74d4a12 by Simon Marlow at 2010-06-23T12:03:27+00:00 Unresolved identifiers in Doc get replaced with DocMonospaced rather than plain strings - - - - - d8546783 by Simon Marlow at 2010-06-30T12:45:17+00:00 LaTeX backend (new options: --latex, --latex-style=<style>) - - - - - 437afa9e by David Waern at 2010-07-01T12:02:44+00:00 Fix a few stylistic whitespace issues in LaTeX backend - - - - - 85bc1fae by David Waern at 2010-07-01T15:42:45+00:00 Make runtest.hs work with GHC 6.12.3 (we should really stop hard coding this) - - - - - 7d2eb86f by David Waern at 2010-07-01T15:43:33+00:00 Update test following Simon's patch to render unresolved names in monospaced font - - - - - 08fcbcd2 by David Waern at 2010-07-01T16:12:18+00:00 Warning police - - - - - d04a8d7a by David Waern at 2010-07-04T14:53:39+00:00 Fix a bug in attachInstances We didn't look for instance docs in all the interfaces of the package. This had the effect of instance docs not always showing up under a declaration. I took the opportunity to clean up the code in H.I.AttachInstances a bit as well. More cleanup is needed, however. - - - - - d10344eb by Simon Hengel at 2010-07-10T09:19:04+00:00 Add missing dependencies to cabal file - - - - - 24090531 by Mark Lentczner at 2010-03-21T04:51:16+00:00 add exports to Xhtml modules - - - - - 84f9a333 by Mark Lentczner at 2010-04-03T19:14:22+00:00 clean up Doc formatting code - add CSS for lists - renderToString now uses showHtml since prettyHtml messes up <pre> sections - - - - - bebccf52 by Mark Lentczner at 2010-04-04T04:51:08+00:00 tweak list css - - - - - 0c2aeb5e by Mark Lentczner at 2010-04-04T06:24:14+00:00 all decls now generate Html not HtmlTable - ppDecl return Html, and so now do all of the functions it calls - added some internal tables to some decls, which is wrong, and will have to be fixed - decl "Box" functions became "Elem" functions to make clear they aren't in a table anymore (see Layout.hs) - docBox went away, as only used in one place (and its days are numbered) - cleaned up logic in a number of places, removed dead code - added maybeDocToHtml which simplified a number of places in the code - - - - - dbf73e6e by Mark Lentczner at 2010-04-05T05:02:43+00:00 clean up processExport and place a div around each decl - - - - - e25b7e9f by Mark Lentczner at 2010-04-10T21:23:21+00:00 data decls are now a sequence of paragraphs, not a table - - - - - 89ee0294 by Mark Lentczner at 2010-04-10T21:29:16+00:00 removed commented out code that can't be maintained - - - - - d466f536 by Mark Lentczner at 2010-04-12T04:56:27+00:00 removed declWithDoc and cleaned up data decls in summary - - - - - ed755832 by Mark Lentczner at 2010-04-12T05:07:53+00:00 merge in markupExample changes - - - - - c36f51fd by Mark Lentczner at 2010-04-25T04:56:37+00:00 made record fields be an unordList, not a table - - - - - ed3a28d6 by Mark Lentczner at 2010-04-25T05:23:28+00:00 fixed surround of instance and constructor tables - - - - - 0e35bbc4 by Mark Lentczner at 2010-04-25T05:36:59+00:00 fix class member boxes in summary - - - - - 5041749b by Mark Lentczner at 2010-04-25T05:38:35+00:00 remove unused bodyBox - - - - - e91724db by Mark Lentczner at 2010-04-25T06:26:10+00:00 fixed javascript quoting/escpaing issue - - - - - f4abbb73 by Mark Lentczner at 2010-05-03T23:04:31+00:00 adjust css for current markup - - - - - e75fec4c by Mark Lentczner at 2010-05-04T06:14:34+00:00 added assoicated types and methods back into class decls - - - - - 84169323 by Mark Lentczner at 2010-05-24T13:13:42+00:00 merge in changes from the big-whitespace cleanup - - - - - 3c1c872e by Mark Lentczner at 2010-06-11T21:03:58+00:00 adjust synopsis and bottom bar spacing - - - - - 3c1f9ef7 by Mark Lentczner at 2010-06-11T21:14:44+00:00 fix missing space in "module" lines in synoposis - - - - - 9a137e6d by Mark Lentczner at 2010-06-11T21:34:08+00:00 changed tt elements to code elements - - - - - 50f71ef1 by Mark Lentczner at 2010-06-11T23:27:46+00:00 factored out ppInstances - - - - - 3b9a9de5 by Mark Lentczner at 2010-06-17T17:36:01+00:00 push single constructors (newtype) onto line with decl - - - - - e0f8f2ec by Mark Lentczner at 2010-06-17T22:20:56+00:00 remove <++> connector - - - - - 56c075dd by Mark Lentczner at 2010-07-13T05:26:21+00:00 change to new page structure - - - - - 04be6ca7 by Mark Lentczner at 2010-07-14T04:21:55+00:00 constructors and args as dl lists, built in Layout.hs - - - - - 65aeafc2 by Mark Lentczner at 2010-07-14T05:38:32+00:00 better interface to subDecls - - - - - 72032189 by Mark Lentczner at 2010-07-14T07:04:10+00:00 made subDecl tables looks just so - - - - - b782eca2 by Mark Lentczner at 2010-07-14T16:00:54+00:00 convert args to SubDecl format - - - - - cc75e98f by Mark Lentczner at 2010-07-14T16:28:53+00:00 convert instances to SubDecl - - - - - 34e2aa5a by Mark Lentczner at 2010-07-14T21:07:32+00:00 removing old table cruft from Layout.hs - - - - - d5810d95 by Mark Lentczner at 2010-07-14T21:54:58+00:00 methods and associated types in new layout scheme - - - - - 65ef9579 by Mark Lentczner at 2010-07-14T23:43:42+00:00 clean up synopsis lists - - - - - e523318f by Mark Lentczner at 2010-07-15T05:02:26+00:00 clean up of anchors - - - - - 1215dfc5 by Mark Lentczner at 2010-07-15T23:53:01+00:00 added two new themes and rough css switcher - - - - - 7f0fd36f by Mark Lentczner at 2010-07-16T04:57:38+00:00 fixed package catpion, added style menu - - - - - 0dd4999c by Mark Lentczner at 2010-07-16T20:12:39+00:00 new output for mini_ pages - - - - - 64b2810b by Mark Lentczner at 2010-07-16T20:58:41+00:00 reformat index-frames - - - - - 3173f555 by Mark Lentczner at 2010-07-16T22:41:53+00:00 convert index to new markup - - - - - b0a4b7c9 by Mark Lentczner at 2010-07-17T04:07:22+00:00 convert index.html to new markup, adjust module markup - - - - - 8261ae1e by Mark Lentczner at 2010-07-17T05:07:29+00:00 classing styling of ancillary pages - - - - - 2a4fb025 by Mark Lentczner at 2010-07-17T05:11:45+00:00 clean up Layout.hs: no more vanillaTable - - - - - 87eec685 by Mark Lentczner at 2010-07-17T05:35:16+00:00 clean up Util.hs - - - - - d304e9b0 by Mark Lentczner at 2010-07-17T05:38:50+00:00 qualify import of XHtml as XHtml - - - - - 7dc05807 by Mark Lentczner at 2010-07-17T06:17:53+00:00 factored out head element generation - - - - - 9cdaec9e by Mark Lentczner at 2010-07-17T06:44:54+00:00 refactored out main page body generation - - - - - 8a51019e by Mark Lentczner at 2010-07-17T06:48:20+00:00 moved footer into only place that used it - - - - - efa479da by Mark Lentczner at 2010-07-17T18:48:30+00:00 styling auxillary pages for tibbe and snappy themes - - - - - 81de5509 by Mark Lentczner at 2010-07-18T04:41:38+00:00 fixed alphabet on index page, and styling of it and packages in module lists - - - - - 20718c1a by Mark Lentczner at 2010-07-18T05:34:29+00:00 cleaned up div functions in Layout.hs - - - - - 60d50453 by Mark Lentczner at 2010-07-18T05:48:39+00:00 added content div to main pages - - - - - ed16561c by Mark Lentczner at 2010-07-18T06:12:22+00:00 add .doc class to documentation blocks - - - - - f5c781b0 by Mark Lentczner at 2010-07-19T05:20:53+00:00 refactoring of anchor ID and fragment handling - - - - - a69a93bf by Mark Lentczner at 2010-07-19T05:35:55+00:00 remove an explicit bold tag - replace with .def class - - - - - d76c7225 by Mark Lentczner at 2010-07-19T06:56:15+00:00 rename Haddock.Backends.Xhtml.Util to Utils - - - - - 5a58c0da by David Waern at 2010-07-21T13:30:54+00:00 Remove trailing whitespace in Haddock.Backends.Xhtml - - - - - 0652aa17 by David Waern at 2010-07-21T13:33:21+00:00 Align a few comments - - - - - 785776c3 by David Waern at 2010-07-21T13:39:04+00:00 Remove trailing whitespace in H.B.X.Decl - - - - - 71a30710 by David Waern at 2010-07-21T13:44:27+00:00 Remove more trailing whitespace - - - - - 38750394 by David Waern at 2010-07-21T13:50:43+00:00 Style police - - - - - 3023d940 by David Waern at 2010-07-21T14:01:22+00:00 Style police in H.B.X.Decl - - - - - df16e9e6 by David Waern at 2010-07-21T14:14:45+00:00 Style police in H.B.X.DocMarkup - - - - - 6020e321 by David Waern at 2010-07-21T14:17:32+00:00 More style police - - - - - 86ad8bf5 by David Waern at 2010-07-21T14:21:02+00:00 Style police in H.B.Xhtml - - - - - aea27d03 by David Waern at 2010-07-21T14:42:03+00:00 Fix warnings in LaTeX backend - - - - - 2aff34a9 by David Waern at 2010-07-21T14:50:46+00:00 Style police in LaTeX backend (mainly more newlines) - - - - - e517162d by David Waern at 2010-07-21T15:05:47+00:00 Doc sections in Main - - - - - b971aa0c by David Waern at 2010-07-21T15:06:17+00:00 Trailing whitespace in Documentation.Haddock - - - - - f11628fb by David Waern at 2010-07-21T15:07:06+00:00 Trailing whitespace in Haddock.Convert - - - - - cbaf284c by David Waern at 2010-07-21T15:08:11+00:00 Style police in Haddock.GhcUtils - - - - - 71feb77b by David Waern at 2010-07-21T15:09:06+00:00 Style police in Haddock.InterfaceFile - - - - - 0a9c80e6 by David Waern at 2010-07-21T15:11:33+00:00 Whitespace police - - - - - 6168376c by David Waern at 2010-07-21T15:16:35+00:00 Style police in Haddock.Utils - - - - - 9fe4dd90 by David Waern at 2010-07-21T15:19:31+00:00 Add -fwarn-tabs - - - - - a000d752 by Mark Lentczner at 2010-07-20T17:25:52+00:00 move CSS Theme functions into Themes.hs - - - - - b52b440f by Mark Lentczner at 2010-07-20T17:29:35+00:00 add Thomas Schilling's theme - - - - - e43fa7e8 by Mark Lentczner at 2010-07-21T04:49:34+00:00 correct icon used with Snappy theme - - - - - ba5092d3 by Mark Lentczner at 2010-07-21T04:56:47+00:00 apply Tibbe's updates to his theme - - - - - 7804eef6 by Mark Lentczner at 2010-07-21T05:15:49+00:00 space between "Style" and the downward triangle - - - - - 7131d4c6 by Mark Lentczner at 2010-07-21T17:43:35+00:00 merge with David's source cleanups - - - - - ee65f1cb by David Waern at 2010-07-22T16:50:46+00:00 Fix a bug where we allowed --hoogle, --latex, etc without input files - - - - - e413ff7a by David Waern at 2010-07-22T17:21:58+00:00 Improve function name - - - - - a0fd14f3 by Simon Marlow at 2010-06-30T15:34:32+00:00 fix warnings - - - - - 31f73d2a by David Waern at 2010-07-22T19:29:41+00:00 Solve conflicts - - - - - d563b4a5 by Simon Marlow at 2010-06-30T15:34:37+00:00 fix warning - - - - - 412b6469 by David Waern at 2010-07-22T19:31:28+00:00 Solve conflict - - - - - 35174b94 by Ian Lynagh at 2010-07-06T17:27:16+00:00 Follow mkPState argument order change - - - - - b5c3585c by Simon Marlow at 2010-07-14T08:49:21+00:00 common up code for instance rendering - - - - - d8009560 by Simon Marlow at 2010-07-14T12:37:11+00:00 fix warnings - - - - - a6d88695 by David Waern at 2010-07-24T15:33:33+00:00 Fix build with ghc < 6.13 - - - - - 94cf9de1 by David Waern at 2010-07-24T15:34:37+00:00 Remove conflict left-over - - - - - 313b15c0 by Mark Lentczner at 2010-07-21T22:09:04+00:00 reorganization of nhaddock.css with tibbe - - - - - 9defed80 by Mark Lentczner at 2010-07-21T22:42:14+00:00 further cleanup of nhaddock.css, float TOC, support aux. pages - - - - - 6d944c1b by Mark Lentczner at 2010-07-22T06:22:23+00:00 remove old HTML backend - - - - - b3e8cba5 by Mark Lentczner at 2010-07-22T06:43:32+00:00 remove --html-help support - it was old, out-of-date, and mostly missing - - - - - d2654a08 by Mark Lentczner at 2010-07-22T21:45:34+00:00 tweaks to nhaddock.css - - - - - f73b285c by Mark Lentczner at 2010-07-23T06:19:35+00:00 command like processing for theme selection The bulk of the change is threadnig the selected theme set through functions in Xhtml.hs so that the selected themes can be used when generating the page output. There isn't much going on in most of these changes, just passing it along. The real work is all done in Themes.hs. - - - - - 8bddc90d by Mark Lentczner at 2010-07-23T06:58:31+00:00 drop --themes support, add named theme support decided that --themes was silly - no one would do that, just use multiple --theme arguments made --theme a synonym for --css and -c made those arguments, if no file is found, look up the argument as the name of a built in theme all of this let's haddock be invoked with "--theme=classic" for example. - - - - - 20cafd4f by Mark Lentczner at 2010-07-23T17:44:29+00:00 rename --default-themes to --built-in-themes - - - - - 0fe41307 by Mark Lentczner at 2010-07-23T18:33:02+00:00 tweaks to theme for info table, headings, and tables - - - - - cba4fee0 by Mark Lentczner at 2010-07-23T19:13:59+00:00 tweaks for dl layout, though still not used - - - - - 463fa294 by Mark Lentczner at 2010-07-23T21:07:19+00:00 tweak look of mini pages, keywords, and preblocks - - - - - 5472fc02 by Mark Lentczner at 2010-07-24T05:36:15+00:00 slide out Synopsis drawer - - - - - 9d5d5de5 by Mark Lentczner at 2010-07-24T06:02:42+00:00 extend package header and footer to edges of page - - - - - a47c91a2 by Mark Lentczner at 2010-07-24T06:28:44+00:00 fields are def lists, tweak css for style menu, mini pages, arguments - - - - - ca20f23b by Mark Lentczner at 2010-07-24T16:55:22+00:00 excisting last vestiges of the --xhtml flag - - - - - 71fb012e by Mark Lentczner at 2010-07-25T18:47:49+00:00 change how collapsing sections are done make whole .caption be the target improve javascript for class toggling have plus/minus images come from .css, not img tags - - - - - c168c8d3 by Mark Lentczner at 2010-07-26T00:32:05+00:00 reorganize files in the html lib data dir - - - - - 93324301 by Mark Lentczner at 2010-07-26T01:27:42+00:00 cleaned up Themes.hs - - - - - ad3b5dd4 by Mark Lentczner at 2010-07-26T02:39:15+00:00 make module list use new collapsers - - - - - 1df9bfc6 by Mark Lentczner at 2010-07-27T19:09:25+00:00 remove Tibbe theme - - - - - 8b9b01b3 by Mark Lentczner at 2010-07-27T20:04:03+00:00 move themes into html dir with .theme and .std-theme extensions - - - - - a7beb965 by Mark Lentczner at 2010-07-27T21:06:34+00:00 give a class to empty dd elements so they can be hidden - - - - - a258c117 by Mark Lentczner at 2010-07-27T21:23:58+00:00 remove custom version of copyFile in Xhtml.hs - - - - - b70dba6e by Mark Lentczner at 2010-07-27T22:12:45+00:00 apply margin changes to pre and headings as per group decision, and small cleanups - - - - - e6f722a2 by Mark Lentczner at 2010-07-28T00:03:12+00:00 make info block and package bar links be floatable by placing them first in the dom tree - - - - - c8278867 by Mark Lentczner at 2010-07-28T19:01:18+00:00 styling source links on declarations - - - - - 88fdc399 by Mark Lentczner at 2010-07-29T01:12:46+00:00 styling tweaks don't generate an empty li for absent style menu in links area update css for Classic and Snappy to handle: dl lists links in package header and in declarations floating of links and info block in package and module headers - - - - - 8a75b213 by Ian Lynagh at 2010-07-30T20:21:46+00:00 Fix build in GHC tree - - - - - ce8e18b3 by Simon Hengel at 2010-08-03T18:37:26+00:00 Adapt paths to data files in cabal file - - - - - 9701a455 by Simon Hengel at 2010-08-07T13:20:27+00:00 Add missing dependency to cabal file - - - - - 01b838d1 by Mark Lentczner at 2010-07-30T20:19:40+00:00 improved synopsis drawer: on click, not hover - - - - - 7b6f3e59 by Mark Lentczner at 2010-07-30T23:38:55+00:00 put the synopsis back in the other themes - - - - - 7b2904c9 by Mark Lentczner at 2010-08-11T11:11:26+00:00 close arrows on expanded synopsis drawer - - - - - ea19e177 by Mark Lentczner at 2010-08-12T21:16:45+00:00 width and font changes removed the max width restrictions on the page as a whole and the synopsis made the main font size smaller (nominally 14pt) and then tweaked most font sizes (relative) to be more consistent - - - - - 5ced00c0 by Mark Lentczner at 2010-08-13T15:09:55+00:00 implemented YUI's CSS font approach - - - - - 2799c548 by Mark Lentczner at 2010-08-13T15:11:59+00:00 adjusted margin to 2em, 1 wasn't enough - - - - - 58f06893 by Mark Lentczner at 2010-08-13T15:48:44+00:00 removed underlining on hover for named anchors headings in interface lost thier a element, no need, just put id on heading css for a elements now only applies to those with href attribute - - - - - 7aced4c4 by Mark Lentczner at 2010-08-13T15:50:22+00:00 more space between elements - - - - - 5a3c1cce by Mark Lentczner at 2010-08-13T16:43:43+00:00 adjusted font sizes of auxilary pages per new scheme - - - - - 487539ef by Mark Lentczner at 2010-08-13T21:43:41+00:00 add Frames button and clean up frames.html - - - - - c1a140b6 by Mark Lentczner at 2010-08-13T22:17:48+00:00 move frames button to js - - - - - b0bdb68e by Mark Lentczner at 2010-08-14T03:44:46+00:00 build style menu in javascript moved to javascript, so as to not polute the content with the style menu removed menu building code in Themes.hs removed onclick in Utils.hs changed text of button in header from "Source code" to "Source" more consistent with links in rest of page - - - - - 43ab7120 by Mark Lentczner at 2010-08-16T15:15:37+00:00 font size and margin tweaks - - - - - c0b68652 by Mark Lentczner at 2010-08-17T18:19:52+00:00 clean up collapser logics javascript code for collapasble sections cleaned up rewrote class utilities in javascript to be more robust refactored utilities for generating collapsable sections made toc be same color as synopsis module list has needed clear attribute in CSS - - - - - 5d573427 by Mark Lentczner at 2010-08-17T23:06:02+00:00 don't collapse entries in module list when clicking on links - - - - - 8c307c4a by Mark Lentczner at 2010-08-17T23:21:43+00:00 add missing data file to .cabal - - - - - 414bcfcf by Mark Lentczner at 2010-08-17T23:28:47+00:00 remove synopsis when in frames - - - - - ba0fa98a by Mark Lentczner at 2010-08-18T16:16:11+00:00 layout tweeks - mini page font size, toc color, etc. - - - - - 63c1bed1 by Mark Lentczner at 2010-08-18T19:50:02+00:00 margin fiddling - - - - - c311c094 by Mark Lentczner at 2010-08-20T01:37:55+00:00 better synopsis handling logic - no flashing - - - - - f1fe5fa8 by Mark Lentczner at 2010-08-20T01:41:06+00:00 fix small layout issues mini frames should have same size top heading give info block dts some padding so they don't collide in some browsers - - - - - 0de84d77 by Mark Lentczner at 2010-08-20T02:13:09+00:00 made style changing and cookies storage robust - - - - - 1ef064f9 by Thomas Schilling at 2010-08-04T13:12:22+00:00 Make synopsis frame behave properly in Firefox. In Firefox, pressing the back button first reverted the synopsis frame, and only clicking the back button a second time would update the main frame. - - - - - dd1c9a94 by Mark Lentczner at 2010-08-21T01:46:19+00:00 remove Snappy theme - - - - - 2353a90d by Mark Lentczner at 2010-08-25T05:16:19+00:00 fix occasional v.scroll bars on pre blocks (I think) - - - - - 459b8bf1 by Simon Hengel at 2010-08-08T10:12:45+00:00 Add createInterfaces' (a more high-level alternative to createInterfaces) to Haddock API - - - - - b1b68675 by David Waern at 2010-08-26T20:31:58+00:00 Follow recent API additions with some refactorings Simon Hegel's patch prompted me to do some refactorings in Main, Haddock.Documentation and Haddock.Interface. - - - - - 264d4d67 by David Waern at 2010-08-26T21:40:59+00:00 Get rid of GhcModule and related cruft We can get everything we need directly from TypecheckedModule. - - - - - 0feacec2 by Mark Lentczner at 2010-08-26T23:44:13+00:00 fixed CSS for ordered lists and def lists in doc blocks - - - - - 2997e0c2 by Mark Lentczner at 2010-08-26T23:45:03+00:00 support both kinds of enumerated lists in doc markup The documentation for Haddock says enumerated lists can use either of (1) first item 2. second item The second form wasn't actually supported - - - - - 5d4ddeec by Mark Lentczner at 2010-08-27T21:29:48+00:00 fix broken header link margins - - - - - 614456ba by Mark Lentczner at 2010-08-27T22:16:19+00:00 fix table of contents CSS - - - - - 03f329a2 by David Waern at 2010-08-28T16:36:09+00:00 Update tests following switch to the Xhtml backend - - - - - ca689fa2 by Mark Lentczner at 2010-08-28T18:25:16+00:00 fix def lists - - - - - 18e1d3d2 by Mark Lentczner at 2010-08-28T18:26:18+00:00 push footer to bottom of window - - - - - b0ab8d82 by David Waern at 2010-08-28T22:04:32+00:00 Whitespace police - - - - - 2d217977 by David Waern at 2010-08-29T12:44:45+00:00 Remove Snappy data files - - - - - 01e27d5f by David Waern at 2010-08-29T13:03:28+00:00 Add source entity path to --read-interface You can now use this flag like this: --read-interface=<html path>,<source entity path>,<.haddock file> By "source entity path" I mean the same thing that is specified with the --source-entity flag. The purpose of this is to be able to specify the source entity path per package, to allow source links to work in the presence of cross-package documentation. When given two arguments or less the --read-interface flag behaves as before. - - - - - 20bf4aaa by David Waern at 2010-08-29T13:11:03+00:00 Naming wibbles - - - - - ad22463f by Mark Lentczner at 2010-08-29T15:14:54+00:00 make portability block be a table - solves layout issues - - - - - 97bd1ae6 by Mark Lentczner at 2010-08-29T15:17:42+00:00 update golden test for Test due to portability box change - - - - - d37e139e by Mark Lentczner at 2010-08-29T17:07:17+00:00 move TOC and Info blocks down 0.5em to improve layout issue w/Test.hs - - - - - acf52501 by David Waern at 2010-08-29T17:32:36+00:00 Allow building with ghc < 6.16 - - - - - 1cb34ed8 by Ian Lynagh at 2010-07-24T23:18:49+00:00 Flatten the dynflags before parsing - - - - - b36845b4 by Ian Lynagh at 2010-07-24T23:26:49+00:00 Follow flattenLanguageFlags -> flattenExtensionFlags rename - - - - - 7f7fcc7e by David Waern at 2010-08-29T17:46:23+00:00 Use flattenExtensionFlags with ghc >= 6.13 only - - - - - 13cf9411 by Ian Lynagh at 2010-08-01T18:09:54+00:00 Make the main haddock script versioned, and make plain "haddock" a symlink - - - - - 495cbff2 by Ian Lynagh at 2010-08-18T18:57:24+00:00 Fix installation in the GHC build system Data-files are now in subdirectories, so we need to handle that - - - - - 88ebab0a by Ian Lynagh at 2010-08-18T19:43:53+00:00 GHC build system: Add all the data files to BINDIST_EXTRAS - - - - - 65837172 by David Waern at 2010-08-29T20:12:34+00:00 Update Test - - - - - 094bbaa2 by David Waern at 2010-08-29T20:55:14+00:00 Revert update to Test - - - - - a881cfb3 by David Waern at 2010-08-31T18:24:15+00:00 Bump version number - - - - - 1fc8a3eb by David Waern at 2010-08-31T22:32:27+00:00 Update ANNOUNCE - - - - - ee1df9d0 by David Waern at 2010-08-31T22:33:11+00:00 Update CHANGES - - - - - 394cc854 by David Waern at 2010-08-31T22:33:23+00:00 Update interface file versioning to work with ghc 6.14/15 - - - - - 7d03b79b by David Waern at 2010-08-31T22:36:00+00:00 Update test output following version change - - - - - a48d82d1 by Mark Lentczner at 2010-09-01T04:29:35+00:00 sort options in doc to match --help output removed --html-help option, as it is no longer supported - - - - - 06561aeb by Mark Lentczner at 2010-09-01T05:29:32+00:00 update options documentation rewrote doc for --html added doc for --theme and --built-in-themes added --use-contents and --gen-contents - - - - - 57dea832 by Mark Lentczner at 2010-09-01T05:31:27+00:00 slight wording change about Frames mode - - - - - fa1f6da3 by David Waern at 2010-09-01T10:57:44+00:00 Update doc configure script to find docbook stylesheets on arch linux - - - - - addff770 by David Waern at 2010-09-01T11:02:29+00:00 Wibble - - - - - 8399006d by David Waern at 2010-09-01T11:19:21+00:00 Replace ghci> with >>> in example syntax - - - - - 35074cf8 by David Waern at 2010-09-01T19:03:27+00:00 Improve docs for --no-tmp-comp-dir - - - - - 0f8f8cfd by David Waern at 2010-09-02T11:22:27+00:00 Add a list of contributors to the user guide Break out everyone thanked in the `Acknowledgements` chapter into a separate contributor list and add everyone from `darcs show authors`. We consider everyone who is thanked to be a contributor as a conservative estimation :-) I have added some more contributors that I know about, who were not in the darcs history, but others may be missing. So please add anyone that you think is missing from the list. - - - - - 42ccf099 by David Waern at 2010-09-02T11:29:22+00:00 Update copyright years in license - - - - - 0d560479 by David Waern at 2010-09-02T11:38:52+00:00 Update release instructions - - - - - 72ab7796 by David Waern at 2010-09-02T19:27:08+00:00 Add a note to ANNOUNCE - - - - - bf9d9c5d by David Waern at 2010-09-02T19:27:48+00:00 H.Utils needs FFI on Win+MinGW - - - - - 048ae44a by Mark Lentczner at 2010-09-04T23:19:47+00:00 make TOC group header identifiers validate - - - - - 8c6faf36 by Simon Michael at 2010-09-22T07:12:34+00:00 add hints for cleaner darcs show authors output - - - - - 9909bd17 by Simon Michael at 2010-09-22T17:58:06+00:00 print haddock coverage info on stdout when generating docs A module's haddockable items are its exports and the module itself. The output is lightly formatted so you can align the :'s and sort for readability. - - - - - 6da72171 by David Waern at 2010-10-03T21:31:24+00:00 Style wibble - - - - - 2f8d8e4d by Tobias Brandt at 2010-08-27T07:01:21+00:00 adding the option to fully qualify identifiers - - - - - 833be6c6 by Tobias Brandt at 2010-08-27T15:50:28+00:00 adding support for local and relative name qualification - - - - - df15c4e9 by Tobias Brandt at 2010-08-27T15:56:37+00:00 corrected qualification help message - - - - - 449e9ce1 by David Waern at 2010-10-16T17:34:30+00:00 Solve conflicts - - - - - 3469bda5 by David Waern at 2010-10-16T18:42:40+00:00 Use "qual" as an abbreviation for qualification instead of "quali" for consistency - - - - - 97c2d728 by David Waern at 2010-10-16T18:47:07+00:00 Style police - - - - - ce14fbea by David Waern at 2010-10-16T21:15:25+00:00 Style police - - - - - fdf29e9d by David Waern at 2010-10-17T00:30:44+00:00 Add a pointer to the style guide - - - - - 8e6b44e8 by rrnewton at 2010-10-24T03:19:28+00:00 Change to index pages: include an 'All' option even when subdividing A-Z. - - - - - 755b131c by David Waern at 2010-11-14T19:39:36+00:00 Bump version - - - - - d0345a04 by David Waern at 2010-11-14T19:41:59+00:00 TAG 2.8.1 - - - - - f6221508 by Simon Peyton Jones at 2010-09-13T09:53:00+00:00 Adapt to minor changes in internal GHC functions - - - - - 1290713d by Ian Lynagh at 2010-09-15T10:37:18+00:00 Remove duplicate Outputable instance for Data.Map.Map - - - - - 87f69eef by Ian Lynagh at 2010-09-21T15:01:10+00:00 Bump GHC dep upper bound - - - - - af36e087 by Ian Lynagh at 2010-09-21T15:12:02+00:00 Fix up __GLASGOW_HASKELL__ tests - - - - - ad67716c by Ian Lynagh at 2010-09-21T20:31:35+00:00 Don't build haddock is HADDOCK_DOCS is NO - - - - - 63b3f1f5 by Ian Lynagh at 2010-09-21T21:39:51+00:00 Fixes for when HADDOCK_DOCS=NO - - - - - e92bfa42 by Ian Lynagh at 2010-09-29T21:15:38+00:00 Fix URL creation on Windows: Use / not \ in URLs. Fixes haskell/haddock#4353 - - - - - 66c55e05 by Ian Lynagh at 2010-09-30T17:03:34+00:00 Tidy up haddock symlink installation In particular, it now doesn't get created if we aren't installing haddock. - - - - - 549b5556 by Ian Lynagh at 2010-10-23T21:17:14+00:00 Follow extension-flattening change in GHC - - - - - d7c2f72b by David Waern at 2010-11-14T20:17:55+00:00 Bump version to 2.8.2 - - - - - 6989a3a9 by David Waern at 2010-11-14T20:26:01+00:00 Solve conflict - - - - - 055c6910 by Ian Lynagh at 2010-09-22T15:36:20+00:00 Bump GHC dep - - - - - c96c0763 by Simon Marlow at 2010-10-27T11:09:44+00:00 follow changes in the GHC API - - - - - 45907129 by David Waern at 2010-11-07T14:00:58+00:00 Update the HCAR entry - - - - - 61940b95 by David Waern at 2010-11-07T14:07:34+00:00 Make the HCAR entry smaller - - - - - aa590b7d by David Waern at 2010-11-14T21:30:59+00:00 Update HCAR entry with November 2010 version - - - - - 587f9847 by David Waern at 2010-11-14T23:48:17+00:00 Require ghc >= 7.0 - - - - - ff5c647c by David Waern at 2010-11-14T23:49:09+00:00 TAG 2.8.2 - - - - - 937fcb4f by David Waern at 2010-11-14T23:49:45+00:00 Solve conflict - - - - - 8e5d0c1a by David Waern at 2010-11-15T21:09:50+00:00 Remove code for ghc < 7 - - - - - 3d47b70a by David Waern at 2010-11-15T21:11:06+00:00 Fix bad merge - - - - - 7f4a0d8a by David Waern at 2010-11-15T21:13:57+00:00 Remove more ghc < 7 code - - - - - 9ee34b50 by David Waern at 2010-11-15T21:31:25+00:00 Match all AsyncExceptions in exception handler - - - - - 42849c70 by David Waern at 2010-11-15T21:35:31+00:00 Just say "internal error" instead of "internal Haddock or GHC error" - - - - - c88c809b by David Waern at 2010-11-15T21:44:19+00:00 Remove docNameOcc under the motto "don't name compositions" - - - - - b798fc7c by David Waern at 2010-11-15T23:27:13+00:00 Wibble - - - - - 2228197e by David Waern at 2010-11-15T23:28:24+00:00 Rename the HCAR entry file - - - - - 8a3f9090 by David Waern at 2010-11-16T00:05:29+00:00 Remove Haskell 2010 extensions from .cabal file - - - - - c7a0c597 by David Waern at 2010-11-16T00:10:28+00:00 Style wibbles - - - - - cde707a5 by David Waern at 2010-11-16T00:12:00+00:00 Remove LANGUAGE ForeignFunctionInterface pragmas - - - - - 1dbda8ed by David Waern at 2010-11-16T00:17:21+00:00 Make a little more use of DoAndIfThenElse - - - - - 4c45ff6e by David Waern at 2010-11-16T00:59:41+00:00 hlint police - - - - - d2feaf09 by David Waern at 2010-11-16T01:14:15+00:00 hlint police - - - - - 99876e97 by David Waern at 2010-11-20T19:06:00+00:00 Haddock documentation updates - - - - - 65ce6987 by David Waern at 2010-11-20T19:42:51+00:00 Follow the style guide closer in Haddock.Types and improve docs - - - - - 28ca304a by tob.brandt at 2010-11-20T17:04:40+00:00 add full qualification for undocumented names - - - - - d61341e3 by David Waern at 2010-11-20T20:04:15+00:00 Re-structure qualification code a little - - - - - 0057e4d6 by David Waern at 2010-11-20T20:07:55+00:00 Re-order functions - - - - - d7279afd by David Waern at 2010-11-21T03:39:54+00:00 Add BangPatterns to alex and happy source files - - - - - 629fe60e by tob.brandt at 2010-11-23T23:35:11+00:00 documentation for qualification - - - - - 37031cee by David Waern at 2010-11-23T21:06:44+00:00 Update CHANGES - don't mention 2.8.2, we won't release it - - - - - f2489e19 by David Waern at 2010-12-01T21:57:11+00:00 Update deps of runtests.hs to work with ghc 7.0.1 - - - - - d3657e9a by David Waern at 2010-12-01T22:04:57+00:00 Make tests compile with ghc 7.0.1 - - - - - a2f09d9b by David Waern at 2010-12-01T22:06:59+00:00 Update tests following version bump - - - - - 50883ebb by David Waern at 2010-12-06T14:09:18+00:00 Update tests following recent changes - - - - - fc2fadeb by David Waern at 2010-12-06T14:17:29+00:00 Add a flag --pretty-html for rendering indented html with newlines - - - - - 30832ef2 by David Waern at 2010-12-06T14:17:35+00:00 Use --pretty-html when running the test suite. Makes it easier to compare output - - - - - a0b81b31 by David Waern at 2010-12-06T14:18:27+00:00 Wibble - - - - - 3aaa23fe by David Waern at 2010-12-06T14:19:29+00:00 Haddockify ppHtml comments - - - - - 24bb24f0 by David Waern at 2010-12-06T14:23:15+00:00 Remove --debug. It was't used, and --verbosity should take its place - - - - - 6bc076e5 by David Waern at 2010-12-06T14:25:37+00:00 Rename golden-tests into html-tests. "golden tests" sounds strange - - - - - 53301e55 by David Waern at 2010-12-06T14:26:26+00:00 QUALI -> QUAL in the description --qual for consistency - - - - - 98b6affb by David Waern at 2010-12-06T21:54:02+00:00 Bump version - - - - - 371bf1b3 by David Waern at 2010-12-06T22:08:55+00:00 Update tests following version bump - - - - - 25be762d by David Waern at 2010-12-06T22:21:03+00:00 Update CHANGES - - - - - 7c7dac71 by David Waern at 2010-12-06T22:33:43+00:00 Update ANNOUNCE - - - - - 30d7a5f2 by Simon Peyton Jones at 2010-11-15T08:38:38+00:00 Alex generates BangPatterns, so make Lex.x accept them (It'd be better for Alex to generate this pragma.) - - - - - 605e8018 by Simon Marlow at 2010-11-17T11:37:24+00:00 Add {-# LANGUAGE BangPatterns #-} to mollify GHC - - - - - a46607ba by David Waern at 2010-12-07T14:08:10+00:00 Solve conflicts - - - - - b28cda66 by David Waern at 2010-12-09T20:41:35+00:00 Docs: Mention that \ is a special character in markup - - - - - a435bfdd by Ian Lynagh at 2010-11-17T14:01:19+00:00 TAG GHC 7.0.1 release - - - - - 5a15a05a by David Waern at 2010-12-11T17:51:19+00:00 Fix indentation problem - - - - - 4232289a by Lennart Kolmodin at 2010-12-17T18:32:03+00:00 Revise haddock.cabal given that we now require ghc-7 default-language should be Haskell2010, slight new semantics for extensions. Rewrite into clearer dependencies of base and Cabal. - - - - - a36302dc by David Waern at 2010-12-19T17:12:37+00:00 Update CHANGES - - - - - 7c8b85b3 by David Waern at 2010-12-19T17:14:24+00:00 Bump version - - - - - cff22813 by Ian Lynagh at 2011-01-05T18:24:27+00:00 Write hoogle output in utf8; fixes GHC build on Windows - - - - - c7e762ea by David Waern at 2011-01-22T00:00:35+00:00 Put title outside doc div when HTML:fying title+prologue Avoids indenting the title, and makes more sense since the title is not a doc string anyway. - - - - - 5f639054 by David Waern at 2011-01-22T16:09:44+00:00 Fix spelling error - contributed by Marco Silva - - - - - c11dce78 by Ian Lynagh at 2011-01-07T02:33:11+00:00 Follow GHC build system changes - - - - - 101cfaf5 by David Waern at 2011-01-08T14:06:44+00:00 Bump version - - - - - af62348b by David Waern at 2011-01-08T14:07:07+00:00 TAG 2.9.2 - - - - - 4d1f6461 by Ian Lynagh at 2011-01-07T23:06:57+00:00 Name the haddock script haddock-ghc-7.0.2 instead of haddock-7.0.2; haskell/haddock#4882 "7.0.2" looked like a haddock version number before - - - - - 8ee4d5d3 by Simon Peyton Jones at 2011-01-10T17:31:12+00:00 Update Haddock to reflect change in hs_tyclds field of HsGroup - - - - - 06f3e3db by Ian Lynagh at 2011-03-03T15:02:37+00:00 TAG GHC 7.0.2 release - - - - - 7de0667d by David Waern at 2011-03-10T22:47:13+00:00 Update CHANGES - - - - - 33a9f1c8 by David Waern at 2011-03-10T22:47:31+00:00 Fix build with ghc 7.0.1 - - - - - 4616f861 by David Waern at 2011-03-10T22:47:50+00:00 TAG 2.9.2-actual - - - - - 0dab5e3c by Simon Hengel at 2011-04-08T15:53:01+00:00 Set shell script for unit tests back to work - - - - - 85c54dee by Simon Hengel at 2011-04-08T16:01:24+00:00 Set unit tests back to work Here "ghci>" was still used instead of ">>>". - - - - - 1cea9b78 by Simon Hengel at 2011-04-08T16:25:36+00:00 Update runtests.hs for GHC 7.0.2 - - - - - 8e5b3bbb by Simon Hengel at 2011-04-08T16:28:49+00:00 Update Haddock version in *.html.ref - - - - - 2545e955 by Simon Hengel at 2011-04-08T17:09:28+00:00 Add support for blank lines in the result of examples Result lines that only contain the string "<BLANKLINE>" are treated as a blank line. - - - - - adf64d2e by Simon Hengel at 2011-04-08T17:36:50+00:00 Add documentation for "support for blank lines in the result of examples" - - - - - c51352ca by David Waern at 2011-05-21T23:57:56+00:00 Improve a haddock comment - - - - - 7419cf2c by David Waern at 2011-05-22T15:41:52+00:00 Use cabal's test suite support to run the test suite This gives up proper dependency tracking of the test script. - - - - - 7770070c by David Waern at 2011-05-22T01:45:44+00:00 We don't need to send DocOptions nor a flag to mkExportItems - - - - - 9d95b7b6 by David Waern at 2011-05-22T21:39:03+00:00 Fix a bug - - - - - 1f93699b by David Waern at 2011-05-22T21:40:21+00:00 Break out fullContentsOf, give it a better name and some documentation The documentation describes how we want this function to eventually behave, once we have fixed a few problems with the current implementation. - - - - - 9a86432f by David Waern at 2011-05-22T21:53:52+00:00 Fix some stylistic issues in mkExportItems - - - - - c271ff0c by David Waern at 2011-05-22T22:09:11+00:00 Indentation - - - - - 93e602b1 by David Waern at 2011-06-10T01:35:31+00:00 Add git commits since switchover: darcs format (followed by a conflict resolution): commit 6f92cdd12d1354dfbd80f8323ca333bea700896a Merge: f420cc4 28df3a1 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Thu May 19 17:54:34 2011 +0100 Merge remote branch 'origin/master' into ghc-generics commit 28df3a119f770fdfe85c687dd73d5f6712b8e7d0 Author: Max Bolingbroke <batterseapower at hotmail.com> Date: Sat May 14 22:37:02 2011 +0100 Unicode fix for getExecDir on Windows commit 89813e729be8bce26765b95419a171a7826f6d70 Merge: 6df3a04 797ab27 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 9 11:55:17 2011 +0100 Merge branch 'ghc-new-co' commit 6df3a040da3dbddee67c6e30a892f87e6b164383 Author: Ian Lynagh <igloo at earth.li> Date: Sun May 8 17:05:50 2011 +0100 Follow changes in SDoc commit f420cc48b9259f0b1afd2438b12f9a2bde57053d Author: Jose Pedro Magalhaes <jpm at cs.uu.nl> Date: Wed May 4 17:31:52 2011 +0200 Adapt haddock to the removal of HsNumTy and TypePat. commit 797ab27bdccf39c73ccad374fea265f124cb52ea Merge: 1d81436 5a91450 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:05:03 2011 +0100 Merge remote branch 'origin/master' into ghc-new-co commit 1d8143659a81cf9611668348e33fd0775c7ab1d2 Author: Simon Peyton Jones <simonpj at microsoft.com> Date: Mon May 2 12:03:46 2011 +0100 Wibbles for ghc-new-co branch commit 5a91450e2ea5a93c70bd3904b022445c9cc82488 Author: Ian Lynagh <igloo at earth.li> Date: Fri Apr 22 00:51:56 2011 +0100 Follow defaultDynFlags change in GHC - - - - - 498da5ae by David Waern at 2011-06-11T00:33:33+00:00 * Merge in git patch from Michal Terepeta >From 6fc71d067738ef4b7de159327bb6dc3d0596be29 Mon Sep 17 00:00:00 2001 From: Michal Terepeta <michal.terepeta at gmail.com> Date: Sat, 14 May 2011 19:18:22 +0200 Subject: [PATCH] Follow the change of TypeSig in GHC. This follows the change in GHC to make TypeSig take a list of names (instead of just one); GHC ticket haskell/haddock#1595. This should also improve the Haddock output in case the user writes a type signature that refers to many names: -- | Some comment.. foo, bar :: ... will now generate the expected output with one signature for both names. - - - - - 094607fe by Ian Lynagh at 2011-06-17T19:10:29+01:00 Fix build - - - - - 8fa35740 by Ian Lynagh at 2011-06-26T21:06:40+01:00 Bump GHC dep to allow 7.2 - - - - - e4d2ca3c by Ian Lynagh at 2011-07-07T23:06:28+01:00 Relax base dep - - - - - b948fde9 by Ian Lynagh at 2011-07-28T16:39:45+01:00 GHC build system: Don't install the datafiles twice - - - - - f82f6d70 by Simon Marlow at 2011-08-11T12:08:15+01:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - b341cc12 by Max Bolingbroke at 2011-08-22T20:25:27+01:00 Fix compilation with no-pred-ty GHC - - - - - 30494581 by Max Bolingbroke at 2011-08-23T10:20:54+01:00 Remaining fixes for PredTy removal - - - - - 0b197138 by Max Bolingbroke at 2011-08-26T08:27:45+01:00 Rename factKind to constraintKind - - - - - a379bec5 by Max Bolingbroke at 2011-09-04T12:54:47+01:00 Deal with change to IParam handling in GHC - - - - - f94e421b by Max Bolingbroke at 2011-09-06T17:34:31+01:00 Adapt Haddock for the ConstraintKind extension changes - - - - - 8821e5cc by Max Bolingbroke at 2011-09-09T08:24:59+01:00 Ignore associated type defaults (just as we ignore default methods) - - - - - 31a0afd4 by Max Bolingbroke at 2011-09-09T09:06:00+01:00 Merge branch 'no-pred-ty' of ssh://darcs.haskell.org/srv/darcs/haddock into no-pred-ty - - - - - dd3b530a by Max Bolingbroke at 2011-09-09T14:10:25+01:00 Merge branch 'no-pred-ty' Conflicts: src/Haddock/Convert.hs - - - - - 5f25ec96 by Max Bolingbroke at 2011-09-09T14:10:40+01:00 Replace FactTuple with ConstraintTuple - - - - - cd30b9cc by David Waern at 2011-09-26T02:17:55+02:00 Bump to version 2.9.3 - - - - - 4fbfd397 by Max Bolingbroke at 2011-09-27T14:55:21+01:00 Follow changes to BinIface Name serialization - - - - - 92257d90 by David Waern at 2011-09-30T23:45:07+02:00 Fix problem with test files not added to distribution tarball - - - - - 00255bda by David Waern at 2011-09-30T23:48:24+02:00 Merge branch 'development' - - - - - 5421264f by David Waern at 2011-10-01T01:25:39+02:00 Merge in darcs patch from Simon Meier: Wed Jun 1 19:41:16 CEST 2011 iridcode at gmail.com * prettier haddock coverage info The new coverage info rendering uses less horizontal space. This reduces the number of unnecessary line-wrappings. Moreover, the most important information, how much has been documented already, is now put up front. Hopefully, this makes it more likely that a library author is bothered by the low coverage of his modules and fixes that issue ;-) - - - - - 07d318ef by David Waern at 2011-10-01T01:34:10+02:00 Use printException instead of deprecated printExceptionAndWarnings - - - - - 40d52ee4 by David Waern at 2011-10-01T01:41:13+02:00 Merge in darcs pach: Mon Apr 11 18:09:54 JST 2011 Liyang HU <haddock at liyang.hu> * Remember collapsed sections in index.html / haddock-util.js - - - - - 279d6dd4 by David Waern at 2011-10-01T01:55:45+02:00 Merge in darcs patch: Joachim Breitner <mail at joachim-breitner.de>**20110619201645 Ignore-this: f6c51228205b0902ad5bfad5040b989a As reported on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=578301, generating the global index takes much too long if type-level (with lots of auto-generated types) is installed. The patch avoids a quadratic runtime in the subfunction getIfaceIndex of ppHtmlIndex by using a temporary set. Runtime improvement observed here from 25.36s to 2.86s. - - - - - d1612383 by David Waern at 2011-10-01T01:56:48+02:00 Merge branch 'development' - - - - - 347520c1 by David Waern at 2011-10-01T01:56:54+02:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9a0c95e8 by David Waern at 2011-10-01T02:19:10+02:00 Improve .cabal file - - - - - 6967dc64 by Ian Lynagh at 2011-10-01T01:34:06+01:00 Follow changes to ForeignImport/ForeignExport in GHC - - - - - 565cb26b by Simon Marlow at 2011-10-04T00:15:04+02:00 Hack this to make it work with both Alex 2.x and Alex 3.x. Unicode in documentation strings is (still) mangled. I don't think it's possible to make it so that we get the current behaviour with Alex 2.x but magic Unicode support if you use Alex 3.x. At some point we have to decide that Alex 3.x is a requirement, then we can do Unicode. - - - - - 8b74f512 by David Waern at 2011-10-04T00:18:17+02:00 Requre ghc >= 7.2 - - - - - 271d360c by David Waern at 2011-10-04T00:22:50+02:00 Bump version to 2.9.4 - - - - - 37f3edb0 by David Waern at 2011-10-06T02:30:21+02:00 Add alex and happy to build-tools. - - - - - 7ac2bb6e by David Terei at 2011-10-12T14:02:55-07:00 Add safe haskell indication to haddock output - - - - - 42c91a47 by David Terei at 2011-10-12T14:06:03-07:00 Fix CSS issue with info table not being contained in module header - - - - - 0eddab6c by David Terei at 2011-10-12T14:06:58-07:00 Add safe haskell indication to haddock output - - - - - 3df058eb by David Terei at 2011-10-12T14:07:07-07:00 Fix CSS issue with info table not being contained in module header - - - - - a40a6c3f by David Waern at 2011-10-22T11:29:06+02:00 Bump .haddock file version since the format has changed recently - - - - - 8a6254be by David Waern at 2011-10-22T11:30:42+02:00 Merge branch 'development' - - - - - 642e3e02 by David Waern at 2011-10-23T21:23:39+02:00 Sort import list - - - - - 36371cf8 by David Waern at 2011-10-23T22:48:18+02:00 Remove NEW_GHC_LAYOUT conditional. - - - - - 5604b499 by David Waern at 2011-10-27T00:15:03+02:00 Add --print-ghc-path. - - - - - 463499fa by David Waern at 2011-10-27T00:16:22+02:00 Make testsuite able to find its dependencies automatically. - - - - - a3506172 by Ryan Newton at 2011-11-05T05:59:58-04:00 Improved declNames internal error. Added a case to handle DocD. - - - - - 001b8baf by David Waern at 2011-11-05T20:37:29+01:00 Rename copy.hs -> accept.hs. - - - - - 55d808d3 by David Waern at 2011-11-05T23:30:02+01:00 Fix build. - - - - - deb5c3be by David Waern at 2011-11-06T00:01:47+01:00 Merge branch 'master' of http://darcs.haskell.org/haddock - - - - - 9b663554 by David Waern at 2011-11-06T00:03:45+01:00 Merge https://github.com/rrnewton/haddock - - - - - 1abb0ff6 by David Waern at 2011-11-06T01:20:37+01:00 Use getDeclMainBinder instead of declNames. - - - - - 4b005c01 by David Waern at 2011-11-06T19:09:53+01:00 Fix build. - - - - - c2c51bc7 by Ian Lynagh at 2011-11-06T23:01:33+00:00 Remove -DNEW_GHC_LAYOUT in ghc.mk - - - - - f847d703 by Jose Pedro Magalhaes at 2011-11-11T09:07:39+00:00 New kind-polymorphic core This big patch implements a kind-polymorphic core for GHC. The current implementation focuses on making sure that all kind-monomorphic programs still work in the new core; it is not yet guaranteed that kind-polymorphic programs (using the new -XPolyKinds flag) will work. For more information, see http://haskell.org/haskellwiki/GHC/Kinds - - - - - 7d7c3b09 by Jose Pedro Magalhaes at 2011-11-16T21:42:22+01:00 Follow changes to tuple sorts in master - - - - - 8430e03e by Simon Peyton Jones at 2011-11-17T10:20:27+00:00 Remove redundant imports - - - - - d1b06832 by Ian Lynagh at 2011-11-19T01:33:21+00:00 Follow GHC build system change to the way we call rm - - - - - 9e2230ed by David Waern at 2011-11-24T15:00:24+01:00 Fix a bug in test runner and get rid of regex-compat dependency. - - - - - 52039b21 by David Waern at 2011-11-24T23:55:36+01:00 Avoid haskell98 dependency in test - - - - - 92e1220d by David Waern at 2011-11-25T00:03:33+01:00 Avoid depency on regex-compat also in accept.hs. - - - - - ddac6b6f by David Waern at 2011-11-25T02:13:38+01:00 Accept test output. - - - - - 5a720455 by David Waern at 2011-11-25T02:16:20+01:00 Some more changes to test scripts. - - - - - 170a9004 by David Waern at 2011-11-25T02:30:41+01:00 Add flag --interface-version. - - - - - d225576c by David Waern at 2011-11-25T02:39:26+01:00 Remove #ifs for older compiler versions. - - - - - f0d0a4f5 by David Waern at 2011-11-26T04:20:12+01:00 Give preference to type over data constructors for doc comment links at renaming time. Previously this was done in the backends. Also, warn when a doc comment refers to something that is in scope but which we don't have the .haddock file for. These changes mean we can make DocIdentifier [a] into DocIdentifier a. - - - - - eef0e776 by David Waern at 2011-11-26T17:01:06+01:00 Allow doc comments to link to out-of-scope things (#78). (A bug that should have been fixed long ago.) - - - - - 565ad529 by David Waern at 2011-11-26T19:56:21+01:00 Update tests. - - - - - fb3ce7b9 by David Waern at 2011-11-26T21:44:28+01:00 Cleanup. - - - - - d0328126 by David Waern at 2011-11-26T22:10:28+01:00 Fix module reference bug. - - - - - c03765f8 by David Waern at 2011-12-03T05:20:20+01:00 Slightly better behaviour on top-levels without type signatures. - Docs don't get attached to the next top-level with signature by mistake. - If there's an export list and the top-level is part of it, its doc comment shows up in the documentation. - - - - - 48461d31 by David Waern at 2011-12-03T05:38:10+01:00 Add a test for Unicode doc comments. - - - - - 549c4b4e by David Waern at 2011-12-03T19:07:55+01:00 Cleanup. - - - - - 7bfecf91 by David Waern at 2011-12-03T20:13:08+01:00 More cleanup. - - - - - 14fab722 by Ian Lynagh at 2011-12-12T21:21:35+00:00 Update dependencies and binaryInterfaceVersion - - - - - 469e6568 by Ian Lynagh at 2011-12-18T12:56:16+00:00 Fix (untested) building from source tarball without alex/happy haddock's .cabal file was declaring that it needed alex and happy to build, but in the GHC source tarballs it doesn't. - - - - - 895c9a8c by David Waern at 2011-12-27T12:57:43+01:00 Go back to having a doc, sub and decl map instead of one big decl map. This setup makes more sense since when we add value bindings to the processed declarations (for type inference), we will have multiple declarations which should share documentation. Also, we already have a separate doc map for instances which we can now merge into the main doc map. Another benefit is that we don't need the DeclInfo type any longer. - - - - - 736767d9 by David Waern at 2011-12-27T13:33:41+01:00 Merge ../../../haddock Conflicts: src/Haddock/InterfaceFile.hs - - - - - 20016f79 by David Waern at 2011-12-27T13:57:23+01:00 Bump version. - - - - - 31f276fb by David Waern at 2011-12-27T13:57:32+01:00 Merge ../ghc/utils/haddock - - - - - 95b367cd by David Waern at 2011-12-27T14:57:29+01:00 Update tests following version bump. - - - - - fa3c94cd by David Waern at 2011-12-27T14:57:51+01:00 Get rid of quite unnecessary use of different lists. - - - - - 9c4d3c54 by David Waern at 2011-12-27T15:26:42+01:00 Cleanup. - - - - - 2caf9f90 by David Waern at 2011-12-27T16:18:05+01:00 Wibbles. - - - - - 3757d09b by David Waern at 2011-12-27T20:50:26+01:00 Complete support for inferring types for top-level bindings. - - - - - 53418734 by David Waern at 2011-12-28T15:02:13+01:00 Minor fixes and cleanup. - - - - - 0c9d0385 by Ian Lynagh at 2012-01-03T18:31:29+00:00 Follow rename of Instance to ClsInst in GHC - - - - - c9bc969a by Simon Hengel at 2012-01-12T21:28:14+01:00 Make sure that generated xhtml is valid (close haskell/haddock#186) Thanks to Phyx. - - - - - 836a0b9a by David Waern at 2012-02-01T02:30:05+01:00 Fix bug introduced in my recent refactoring. - - - - - c7d733eb by David Waern at 2012-02-01T02:30:26+01:00 Cleanup mkMaps and avoid quadratic behaviour. - - - - - da3cda8f by David Waern at 2012-02-01T02:56:56+01:00 Require ghc >= 7.4. - - - - - 83a3287e by David Waern at 2012-02-01T02:57:36+01:00 Update CHANGES. - - - - - 93408f0b by Simon Hengel at 2012-02-04T00:48:04+01:00 Add reference renderings - - - - - 49d00d2c by Simon Hengel at 2012-02-04T00:48:25+01:00 Set unit tests for parser back to work - - - - - eb450980 by Simon Hengel at 2012-02-04T00:49:07+01:00 Add .gitignore - - - - - a841602c by Simon Hengel at 2012-02-04T00:49:16+01:00 Add .ghci file - - - - - 8861199d by Simon Hengel at 2012-02-04T00:49:29+01:00 tests/html-tests/copy.hs: Use mapM_ instead of mapM So we do net get a list of () on stdout when running with runhaskell. - - - - - b477d9b5 by Simon Hengel at 2012-02-04T00:49:46+01:00 Remove index files from golden tests - - - - - 9dbda34e by Simon Hengel at 2012-02-04T00:49:57+01:00 Add /tests/html-tests/tests/*index*.ref to .gitignore - - - - - a9434817 by Simon Hengel at 2012-02-04T00:50:04+01:00 Add DocWarning to Doc The Xhtml backend has special markup for that, Hoogle and LaTeX reuse what we have for DocEmphasis. - - - - - de2fb6fa by Simon Hengel at 2012-02-04T00:50:13+01:00 Add support for module warnings - - - - - 0640920e by Simon Hengel at 2012-02-04T00:50:21+01:00 Add tests for module warnings - - - - - 30ce0d77 by Simon Hengel at 2012-02-04T00:50:29+01:00 Add support for warnings - - - - - bb367960 by Simon Hengel at 2012-02-04T00:50:37+01:00 Add tests for warnings - - - - - 6af1dc2d by Simon Hengel at 2012-02-04T00:50:50+01:00 Expand type signatures in export list (fixes haskell/haddock#192) - - - - - a06cbf25 by Simon Hengel at 2012-02-04T00:51:04+01:00 Expand type signatures for modules without explicit export list - - - - - 57dda796 by Simon Hengel at 2012-02-04T00:51:15+01:00 Remove obsolete TODO - - - - - 270c3253 by David Waern at 2012-02-04T00:51:24+01:00 Fix issues in support for warnings. * Match against local names only. * Simplify (it's OK to map over the warnings). - - - - - 683634bd by David Waern at 2012-02-04T00:55:11+01:00 Some cleanup and make sure we filter warnings through exports. - - - - - 210cb4ca by David Waern at 2012-02-04T03:01:30+01:00 Merge branch 'fix-for-186' of https://github.com/sol/haddock into ghc-7.4 - - - - - e8db9031 by David Waern at 2012-02-04T03:07:51+01:00 Style police. - - - - - 261f9462 by David Waern at 2012-02-04T03:20:16+01:00 Update tests. - - - - - 823cfc7c by David Waern at 2012-02-04T03:21:12+01:00 Use mapM_ in accept.hs as well. - - - - - 873dd619 by David Waern at 2012-02-04T03:21:33+01:00 Remove copy.hs - use accept.hs instead. - - - - - 0e31a14a by David Waern at 2012-02-04T03:47:33+01:00 Use <> instead of mappend. - - - - - 2ff7544f by David Waern at 2012-02-04T03:48:55+01:00 Remove code for older ghc versions. - - - - - dacf2786 by David Waern at 2012-02-04T15:52:51+01:00 Clean up some code from last SoC project. - - - - - 00cbb117 by David Waern at 2012-02-04T21:43:49+01:00 Mostly hlint-inspired cleanup. - - - - - 7dc86cc2 by Simon Peyton Jones at 2012-02-06T09:14:41+00:00 Track changes in HsDecls - - - - - f91f82fe by Ian Lynagh at 2012-02-16T13:40:11+00:00 Follow changes in GHC caused by the CAPI CTYPE pragma - - - - - a0ea6b0b by Ian Lynagh at 2012-02-22T02:26:12+00:00 Follow changes in GHC - - - - - b23b07d1 by Simon Peyton Jones at 2012-03-02T16:36:41+00:00 Follow changes in data representation from the big PolyKinds commit - - - - - 43406022 by Simon Hengel at 2012-03-05T11:18:34+01:00 Save/restore global state for static flags when running GHC actions This is necessary if we want to run createInterfaces (from Documentation.Haddock) multiple times in the same process. - - - - - 9fba16fe by Paolo Capriotti at 2012-03-06T10:57:33+00:00 Update .gitignore. - - - - - a9325044 by Simon Peyton Jones at 2012-03-14T17:35:42+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - fd48065a by Iavor Diatchki at 2012-03-15T22:43:35-07:00 Add support for type-level literals. - - - - - 2e8206dd by Simon Peyton Jones at 2012-03-16T14:18:22+00:00 Follow changes to tcdKindSig (Trac haskell/haddock#5937) - - - - - 93e13319 by Simon Peyton Jones at 2012-03-17T01:04:05+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock Conflicts: src/Haddock/Convert.hs - - - - - d253fa71 by Iavor Diatchki at 2012-03-19T20:12:18-07:00 Merge remote-tracking branch 'origin/master' into type-nats - - - - - fc40acc8 by Iavor Diatchki at 2012-03-19T20:31:27-07:00 Add a missing case for type literals. - - - - - fd2ad699 by Iavor Diatchki at 2012-03-24T13:28:29-07:00 Rename variable to avoid shadowing warning. - - - - - 9369dd3c by Simon Peyton Jones at 2012-03-26T09:14:23+01:00 Follow refactoring of TyClDecl/HsTyDefn - - - - - 38825ca5 by Simon Peyton Jones at 2012-03-26T09:14:37+01:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - 4324ac0f by David Waern at 2012-04-01T01:51:19+02:00 Disable unicode test. - - - - - 3165b750 by David Waern at 2012-04-01T01:51:34+02:00 Take reader environment directly from TypecheckedSource. - - - - - 213b644c by David Waern at 2012-04-01T01:55:20+02:00 Cleanup. - - - - - 3118b4ba by David Waern at 2012-04-01T02:16:15+02:00 Don't filter out unexported names from the four maps - fixes a regression. - - - - - d6524e17 by David Waern at 2012-04-01T02:40:34+02:00 Fix crash when using --qual. Naughty GHC API! - - - - - ea3c43d8 by Henning Thielemann at 2012-04-01T13:03:07+02:00 add QualOption type for distinction between qualification argument given by the user and the actual qualification for a concrete module - - - - - 5422ff05 by Henning Thielemann at 2012-04-01T16:25:02+02:00 emit an error message when the --qual option is used incorrectly - - - - - 026e3404 by David Waern at 2012-04-01T18:10:30+02:00 Don't crash on unicode strings in doc comments. - - - - - ce006632 by David Waern at 2012-04-01T20:13:35+02:00 Add test for --ignore-all-exports flag/ignore-exports pragma. - - - - - 6e4dd33c by David Waern at 2012-04-01T20:21:03+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.4 - - - - - 734ae124 by Henning Thielemann at 2012-04-01T20:22:10+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - 622f9ba5 by David Waern at 2012-04-01T21:26:13+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 55ce17cb by Henning Thielemann at 2012-04-01T22:03:25+02:00 'abbreviate' qualification style - basic support Currently we ignore the package a module is imported from. This means that a module import would shadow another one with the same module name from a different package. - - - - - c85314ef by David Waern at 2012-04-01T22:05:12+02:00 Check qualification option before processing modules. - - - - - ae4b626c by Henning Thielemann at 2012-04-02T00:19:36+02:00 abbreviated qualification: use Packages.lookupModuleInAllPackages for finding the package that a module belongs to - - - - - 60bdbcf5 by Henning Thielemann at 2012-04-02T00:25:31+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - df44301d by Henning Thielemann at 2012-04-02T00:29:05+02:00 qualification style 'abbreviated' -> 'aliased' - - - - - f4192a64 by David Waern at 2012-04-02T01:05:47+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - 7ba09067 by David Terei at 2012-04-04T15:08:21-07:00 Fix reporting of modules safe haskell mode (#5989) - - - - - d0cc33d0 by David Terei at 2012-04-06T15:50:41+01:00 Fix reporting of modules safe haskell mode (#5989) - - - - - 6e3434c5 by Simon Peyton Jones at 2012-04-20T18:37:46+01:00 Track changes in HsSyn - - - - - 22014ed0 by Simon Peyton Jones at 2012-05-11T22:45:15+01:00 Follow changes to LHsTyVarBndrs - - - - - d9a07b24 by David Waern at 2012-05-15T01:46:35+02:00 Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4 - - - - - a6c4ebc6 by David Waern at 2012-05-16T02:18:32+02:00 Update CHANGES. - - - - - 8e181d29 by David Waern at 2012-05-16T02:27:56+02:00 Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4 - - - - - e358210d by David Waern at 2012-05-16T02:35:33+02:00 Mention the new aliased --qual mode in CHANGES. - - - - - efd36a28 by David Waern at 2012-05-16T21:33:13+02:00 Bump version number. - - - - - d6b3af14 by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for deprecated record field - - - - - 927f800e by Simon Hengel at 2012-05-17T19:08:20+02:00 Use >>= instead of fmap and join - - - - - 048b41d5 by Simon Hengel at 2012-05-17T19:08:20+02:00 newtype-wrap Doc nodes for things that may have warnings attached - - - - - e3a89fc3 by Simon Hengel at 2012-05-17T19:08:20+02:00 Attach warnings to `Documentation` type - - - - - 5d4cc43d by Simon Hengel at 2012-05-17T19:08:20+02:00 Simplify lookupWarning - - - - - cf8ae69d by Simon Hengel at 2012-05-17T19:08:20+02:00 Add test for haskell/haddock#205 - - - - - cb409b19 by Simon Peyton Jones at 2012-05-25T08:30:11+01:00 Follow changes in LHsTyVarBndrs - - - - - 2d5f4179 by Simon Hengel at 2012-05-26T19:21:29+02:00 Add Applicative instance for (GenRnM a) - - - - - e4373060 by Simon Hengel at 2012-05-26T19:21:33+02:00 Use a map for warnings, as suggested by @waern - - - - - 597a68c7 by Simon Hengel at 2012-05-27T08:48:24+02:00 Add an optional label to URLs - - - - - ef1ac7fe by Simon Hengel at 2012-05-27T08:48:24+02:00 Add support for hyperlink labels to parser - - - - - 41f2adce by Simon Hengel at 2012-05-27T08:48:24+02:00 Add golden test for hyperlinks - - - - - 83d5e764 by Simon Hengel at 2012-05-27T08:50:02+02:00 Use LANGUAGE pragmas instead of default-extensions in cabal file - - - - - ddb755e5 by Simon Hengel at 2012-05-27T08:50:02+02:00 Fix typo in comment - - - - - 110676b4 by Simon Hengel at 2012-05-27T08:50:02+02:00 Add a type signature for a where-binding - - - - - 7d9ba2a0 by Ian Lynagh at 2012-06-12T14:38:01+01:00 Follow changes in GHC - - - - - 47c704f2 by Ian Lynagh at 2012-06-12T18:52:16+01:00 Follow changes in GHC - - - - - e1efe1ab by Simon Peyton Jones at 2012-06-13T17:25:29+01:00 Follow changes for the implementation of implicit parameters - - - - - 69abc81c by Ian Lynagh at 2012-06-19T22:52:58+01:00 Follow changes in base - - - - - 9d074a21 by Paolo Capriotti at 2012-06-22T18:26:47+01:00 Use right docMap to get decl documentation. - - - - - e3292ef6 by Ian Lynagh at 2012-07-15T01:31:19+01:00 Follow changes in GHC - - - - - ceae56b0 by Ian Lynagh at 2012-07-16T21:22:48+01:00 Fix haddock following some GHC changes Passing _|_ as the Settings for defaultDynFlags no longer works well enough - - - - - 9df72735 by Paolo Capriotti at 2012-07-19T16:49:32+01:00 Forward port changes from stable. - - - - - 572f5fcf by Ian Lynagh at 2012-07-19T20:38:26+01:00 Merge branch 'master' of darcs.haskell.org:/srv/darcs//haddock - - - - - 9195aca4 by Paolo Capriotti at 2012-07-20T10:27:28+01:00 Update dependencies. - - - - - 33db3923 by Ian Lynagh at 2012-07-20T17:54:43+01:00 Build with GHC 7.7 - - - - - 925a2cea by David Waern at 2012-07-23T16:50:40+02:00 Merge branch 'dev' of https://github.com/sol/haddock into ghc-7.6 Conflicts: src/Haddock/InterfaceFile.hs - - - - - d710ef97 by David Waern at 2012-07-23T16:52:07+02:00 Bump version number. - - - - - eb0c2f83 by David Waern at 2012-07-23T16:57:58+02:00 Update CHANGES. - - - - - b3f56943 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Hide "internal" instances This fixes haskell/haddock#37 (http://trac.haskell.org/haddock/ticket/37) Precisely, we show an instance iff its class and all the types are exported by non-hidden modules. - - - - - a70aa412 by Roman Cheplyaka at 2012-07-27T13:00:13+03:00 Tests for hiding instances (#37) - - - - - c0f4aa58 by Simon Hengel at 2012-07-27T13:00:13+03:00 Add an other test for hiding instances (#37) - - - - - a7ed6268 by Ian Lynagh at 2012-08-07T14:48:13+01:00 Follow changes in GHC - - - - - 0ab30d38 by Ian Lynagh at 2012-08-13T22:12:27+01:00 Improve haddock memory usage - - - - - 0eaa4e30 by Ian Lynagh at 2012-08-13T23:58:46+01:00 Improve haddock memory usage - - - - - 659d26cf by Ian Lynagh at 2012-08-14T13:16:48+01:00 Remove some temporary pragmas I accidentally recorded - - - - - d97fceb6 by Simon Hengel at 2012-08-25T13:19:34+02:00 Add missing dependency to library - - - - - 4c910697 by Simon Hengel at 2012-08-28T07:39:14+02:00 Move .ghci to project root - - - - - fc3c601a by Simon Hengel at 2012-08-28T07:39:14+02:00 accept.hs: Ignore some files - - - - - 1af9b984 by Simon Hengel at 2012-08-28T07:40:04+02:00 Update reference renderings (bump version) - - - - - 980dc253 by Simon Hengel at 2012-08-28T07:40:32+02:00 Update reference renderings (remove links for ()) - - - - - 33651dbf by Simon Hengel at 2012-08-28T07:41:50+02:00 Update documentation of `runInteractiveProcess` in reference rendering - - - - - 7ab25078 by David Waern at 2012-09-07T10:38:50+02:00 Merge branch 'hiddenInstances2' of http://github.com/feuerbach/haddock into ghc-7.6 - - - - - c3de3a4b by David Waern at 2012-09-07T14:29:27+02:00 Follow changes in GHC. - - - - - 298c43ac by David Waern at 2012-09-07T14:59:24+02:00 Update CHANGES. - - - - - e797993a by David Waern at 2012-09-07T15:21:30+02:00 Update ANNOUNCE. - - - - - d0b44790 by David Waern at 2012-09-07T15:22:43+02:00 Merge branch 'hidden-instances' into ghc-7.6 - - - - - 41a4adc8 by Simon Hengel at 2012-09-08T12:08:37+02:00 Update doc/README - - - - - 71ad1040 by Simon Hengel at 2012-09-08T12:17:17+02:00 Add documentation for URL labels - - - - - 9bb41afd by Simon Peyton Jones at 2012-09-20T18:14:26+01:00 Follow data type changes in the tc-untouchables branch Relating entirely to SynTyConRhs - - - - - b8139bfa by Simon Hengel at 2012-09-21T14:24:16+02:00 Disable Unicode test for now - - - - - a5fafdd7 by Simon Hengel at 2012-09-21T14:35:45+02:00 Update TypeOperators test for GHC 7.6.1 Type operators can't be used as type variables anymore! - - - - - 6ccf0025 by Simon Hengel at 2012-09-21T16:02:24+02:00 Remove (Monad (Either e)) instance from ref. rendering of CrossPackageDocs I do not really understand why the behavior changed, so I'll open a ticket, so that we can further investigate. - - - - - b5c6c138 by Ian Lynagh at 2012-09-27T02:00:57+01:00 Follow changes in GHC build system - - - - - b98eded0 by David Waern at 2012-09-27T15:37:02+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 76cc2051 by David Waern at 2012-09-27T15:48:19+02:00 Update hidden instances tests. - - - - - aeaa1c59 by David Waern at 2012-09-28T10:21:32+02:00 Make API buildable with GHC 7.6. - - - - - d76be1b0 by Simon Peyton Jones at 2012-09-28T15:57:05+01:00 Merge remote-tracking branch 'origin/master' into tc-untouchables - - - - - a1922af8 by David Waern at 2012-09-28T19:50:20+02:00 Fix spurious superclass constraints bug. - - - - - bc41bdbb by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove old examples - - - - - bed7d3dd by Simon Hengel at 2012-10-01T11:30:51+02:00 Adapt parsetests for GHC 7.6.1 - - - - - dcdb22bb by Simon Hengel at 2012-10-01T11:30:51+02:00 Add test-suite section for parsetests to cabal file + get rid of HUnit dependency - - - - - 1e5263c9 by Simon Hengel at 2012-10-01T11:30:51+02:00 Remove test flag from cabal file This was not really used. - - - - - 4beee98b by David Waern at 2012-09-28T23:42:28+02:00 Merge branch 'ghc-7.6' of http://darcs.haskell.org/haddock into ghc-7.6 - - - - - 11dd2256 by Ian Lynagh at 2012-10-03T16:17:35+01:00 Follow change in GHC build system - - - - - fbd77962 by Simon Hengel at 2012-10-03T18:49:40+02:00 Remove redundant dependency from cabal file - - - - - 09218989 by Simon Hengel at 2012-10-04T16:03:05+02:00 Fix typo - - - - - 93a2d5f9 by Simon Hengel at 2012-10-04T16:11:41+02:00 Remove trailing whitespace from cabal file - - - - - c8b46cd3 by Simon Hengel at 2012-10-04T16:12:17+02:00 Export Haddock's main entry point from library - - - - - b411e77b by Simon Hengel at 2012-10-04T16:29:46+02:00 Depend on library for executable The main motivation for this is to increase build speed. In GHC's source tree the library is not build, but all modules are now required for the executable, so that GHC's validate will now detect build failures for the library. - - - - - f8f0979f by Simon Hengel at 2012-10-05T00:32:57+02:00 Set executable flag for Setup.lhs - - - - - dd045998 by Simon Hengel at 2012-10-07T16:44:06+02:00 Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. - - - - - 7b39c3ae by Simon Hengel at 2012-10-07T17:05:45+02:00 cross-package test: re-export IsString instead of Monad There is a monad instance for Q, which is not available on platforms that do not have GHCi support. This caused CrossPackageDocs to fail on those platforms. Re-exporting IsString should test the same thing, but it works on all platforms. - - - - - 0700c605 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Fix some warnings - - - - - f78eca79 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Make -Wall proof - - - - - 6beec041 by Simon Hengel at 2012-10-07T19:06:34+02:00 runtests.hs: Use listToMaybe/fromMaybe instead of safeHead/maybe - - - - - 44b8ce86 by Ian Lynagh at 2012-10-08T21:59:46+01:00 Follow changes in GHC - - - - - 6da5f702 by Simon Hengel at 2012-10-09T11:16:19+02:00 Update .ghci - - - - - 9ac1a1b9 by Kazu Yamamoto at 2012-10-09T12:45:31+02:00 Add markup support for properties - - - - - 1944cb42 by Simon Hengel at 2012-10-09T12:45:31+02:00 Simplify lexing/parsing of properties In contrast to what we do for examples, we do not really need to capture the "prompt" here. - - - - - bffd8e62 by Simon Hengel at 2012-10-09T13:40:14+02:00 Add HTML test for properties - - - - - 2fe9c5cb by Simon Hengel at 2012-10-09T13:40:21+02:00 Add unit tests for properties - - - - - 874e361b by Simon Hengel at 2012-10-09T13:40:33+02:00 Bump interface version - - - - - 2506cc37 by Simon Hengel at 2012-10-09T15:15:04+02:00 Fix parser bug - - - - - 743d2b7d by Simon Hengel at 2012-10-09T15:31:06+02:00 Allow to load interface files with compatible versions - - - - - 981a1660 by Simon Hengel at 2012-10-10T10:32:05+02:00 Export more types from Documentation.Haddock (fixes haskell/haddock#216) - - - - - dff7dc76 by Simon Hengel at 2012-10-10T11:15:19+02:00 Update ANNOUNCE and CHANGES - - - - - edd2bb01 by Simon Hengel at 2012-10-10T11:22:50+02:00 Bump version - - - - - 5039163b by Simon Hengel at 2012-10-10T13:56:04+02:00 Fix typo in documentation - - - - - e4ce34da by Simon Hengel at 2012-10-10T14:28:35+02:00 Add documentation for properties - - - - - 9555ebca by Simon Hengel at 2012-10-11T10:49:04+02:00 Remove redundant if-defs, more source documentation - - - - - 87aa67e1 by Simon Hengel at 2012-10-11T12:32:51+02:00 Adapt cabal file - - - - - c44c1dee by Simon Hengel at 2012-10-11T12:41:58+02:00 Require ghc 7.6 - - - - - 8383bc34 by Simon Hengel at 2012-10-11T12:50:24+02:00 Bump version - - - - - 1030eb38 by Simon Hengel at 2012-10-11T12:55:44+02:00 Update ANNOUNCE and CHANGES - - - - - 74955088 by Simon Hengel at 2012-10-12T09:49:31+02:00 Improve note about `binaryInterfaceVersion` (thanks David) - - - - - ee30f6b7 by Simon Hengel at 2012-10-13T13:40:59+02:00 Update version in html tests, rpm spec file, and user manual - - - - - f2861f18 by Simon Hengel at 2012-10-13T14:40:33+02:00 Remove unused MonadFix constraint - - - - - dfdf1a74 by Simon Hengel at 2012-10-13T15:15:38+02:00 Minor code simplification - - - - - 4ecd1e70 by Simon Hengel at 2012-10-13T15:33:43+02:00 Increase code locality - - - - - f7df5cc9 by Simon Hengel at 2012-10-13T16:03:12+02:00 Minor code simplification - - - - - e737eb6e by Simon Hengel at 2012-10-13T19:03:04+02:00 Handle HsExplicitListTy in renameer (fixes haskell/haddock#213) - - - - - c2dc8f17 by Simon Hengel at 2012-10-13T20:46:31+02:00 Better error messages - - - - - 14d48b4c by Simon Hengel at 2012-10-14T00:21:07+02:00 Simplify RnM type - - - - - 6c2cc547 by Simon Hengel at 2012-10-14T00:23:35+02:00 Simplify lookupRn - - - - - bc77ce85 by Simon Hengel at 2012-10-14T01:51:32+02:00 Organize unite tests hierarchically - - - - - 2306d117 by Simon Hengel at 2012-10-14T10:34:58+02:00 Handle more cases in renameType - - - - - 8a864203 by Simon Hengel at 2012-10-14T11:47:59+02:00 Add mini_HiddenInstances.html.ref and mini_HiddenInstancesB.html.ref - - - - - 3a978eca by Simon Hengel at 2012-10-14T11:49:28+02:00 Add /tests/html-tests/output/ to .gitignore - - - - - db18888a by Simon Hengel at 2012-10-14T13:38:21+02:00 Allow haddock markup in deprecation messages - - - - - e7cfee9f by Simon Hengel at 2012-10-14T14:00:23+02:00 If parsing of deprecation message fails, include it verbatim - - - - - 242a85be by Simon Hengel at 2012-10-14T14:13:24+02:00 Add description for PruneWithWarning test - - - - - 43d33df1 by Simon Hengel at 2012-10-14T15:40:53+02:00 Minor formatting change - - - - - 22768c44 by Simon Hengel at 2012-10-14T16:03:43+02:00 Properly handle deprecation messages for re-exported things (fixes haskell/haddock#220) - - - - - cb4b9111 by Simon Hengel at 2012-10-14T17:30:28+02:00 Add build artifacts for documentation to .gitignore - - - - - 854cd8de by Simon Hengel at 2012-10-14T23:34:51+02:00 unit-tests: Improve readability Add IsString instance for (Doc RdrName) + use <> instead of DocAppend. - - - - - c4446d54 by Simon Hengel at 2012-10-14T23:37:21+02:00 unit-tests: Minor refactoring Rename parse to parseParas. - - - - - 04f2703c by Simon Hengel at 2012-10-15T00:36:42+02:00 Fix typo - - - - - 3d109e44 by Simon Hengel at 2012-10-15T10:30:07+02:00 Add description for DeprecatedReExport test - - - - - 84f0985c by Simon Hengel at 2012-10-15T14:54:19+02:00 Move resources to /resources directory - - - - - a5de7ca6 by Simon Hengel at 2012-10-15T15:46:18+02:00 Move HTML tests to directory /html-test/ - - - - - e21f727d by Simon Hengel at 2012-10-15T19:32:42+02:00 Move HTML reference renderings to /html-test/ref/ - - - - - 3a3c6c75 by Simon Hengel at 2012-10-15T19:32:42+02:00 Copy css, images, etc. on accept - - - - - 40ead6dc by Simon Hengel at 2012-10-15T19:32:42+02:00 Move unit tests to /test directory - - - - - 99a28231 by Simon Hengel at 2012-10-15T19:32:42+02:00 Fix Setup.lhs /usr/bin/runhaskell is not installed on all systems. - - - - - 95faf45e by Simon Hengel at 2012-10-15T19:32:42+02:00 Make test management scripts more robust * They are now independent from the current directory, and hence can be called from everywhere * On UNIX/Linux they can now be run as scripts - - - - - 027aaa2d by Simon Hengel at 2012-10-15T19:53:40+02:00 Add 'dev' flag to cabal file, that builds without -O2 That way --disable-optimization can be used, which decreases build time considerably. - - - - - e0266ede by Simon Hengel at 2012-10-15T20:03:43+02:00 Add test case for "spurious superclass constraints bug" - - - - - 52a2aa92 by Simon Hengel at 2012-10-15T20:28:55+02:00 Adapt accept.lhs, so that it ignores more index files - - - - - 53530781 by Simon Hengel at 2012-10-15T20:49:39+02:00 Rename html-test/runtests.lhs to html-test/run.lhs - - - - - 84518797 by Simon Hengel at 2012-10-15T20:49:39+02:00 Move source files for HTML tests to html-test/src - - - - - a911dc6c by Simon Hengel at 2012-10-15T20:49:39+02:00 Adapt output directory for HTML tests - - - - - d3c15857 by Ian Lynagh at 2012-10-16T16:54:43+01:00 Follow dopt->gopt rename - - - - - 956665a5 by Simon Hengel at 2012-10-18T08:42:48+02:00 Update html-test/README - - - - - 903b1029 by Simon Hengel at 2012-10-18T08:50:26+02:00 Use markdown for html-test/README - - - - - 150b4d63 by Ian Lynagh at 2012-10-18T16:36:00+01:00 Follow changes in GHC: 'flags' has been renamed 'generalFlags' - - - - - 41e04ff9 by Simon Hengel at 2012-11-28T09:54:35+01:00 Export missing types from Documentation.Haddock - - - - - 9be59237 by Ian Lynagh at 2012-11-30T23:20:47+00:00 Update dependencies - - - - - e06842f5 by Simon Hengel at 2012-12-07T20:58:05+01:00 Bump version - - - - - e3dbede0 by Simon Hengel at 2012-12-07T20:58:05+01:00 Add missing test files to cabal file (fixes haskell/haddock#230) - - - - - ee0dcca7 by Simon Hengel at 2012-12-07T20:58:05+01:00 Update CHANGES - - - - - 51601bdb by Simon Peyton Jones at 2012-12-19T17:28:35+00:00 Track changes in UNPACK pragma stuff - - - - - f2573bc1 by Richard Eisenberg at 2012-12-21T20:56:25-05:00 Implement overlapping type family instances. An ordered, overlapping type family instance is introduced by 'type instance where', followed by equations. See the new section in the user manual (7.7.2.2) for details. The canonical example is Boolean equality at the type level: type family Equals (a :: k) (b :: k) :: Bool type instance where Equals a a = True Equals a b = False A branched family instance, such as this one, checks its equations in order and applies only the first the matches. As explained in the note [Instance checking within groups] in FamInstEnv.lhs, we must be careful not to simplify, say, (Equals Int b) to False, because b might later unify with Int. This commit includes all of the commits on the overlapping-tyfams branch. SPJ requested that I combine all my commits over the past several months into one monolithic commit. The following GHC repos are affected: ghc, testsuite, utils/haddock, libraries/template-haskell, and libraries/dph. Here are some details for the interested: - The definition of CoAxiom has been moved from TyCon.lhs to a new file CoAxiom.lhs. I made this decision because of the number of definitions necessary to support BranchList. - BranchList is a GADT whose type tracks whether it is a singleton list or not-necessarily-a-singleton-list. The reason I introduced this type is to increase static checking of places where GHC code assumes that a FamInst or CoAxiom is indeed a singleton. This assumption takes place roughly 10 times throughout the code. I was worried that a future change to GHC would invalidate the assumption, and GHC might subtly fail to do the right thing. By explicitly labeling CoAxioms and FamInsts as being Unbranched (singleton) or Branched (not-necessarily-singleton), we make this assumption explicit and checkable. Furthermore, to enforce the accuracy of this label, the list of branches of a CoAxiom or FamInst is stored using a BranchList, whose constructors constrain its type index appropriately. I think that the decision to use BranchList is probably the most controversial decision I made from a code design point of view. Although I provide conversions to/from ordinary lists, it is more efficient to use the brList... functions provided in CoAxiom than always to convert. The use of these functions does not wander far from the core CoAxiom/FamInst logic. BranchLists are motivated and explained in the note [Branched axioms] in CoAxiom.lhs. - The CoAxiom type has changed significantly. You can see the new type in CoAxiom.lhs. It uses a CoAxBranch type to track branches of the CoAxiom. Correspondingly various functions producing and consuming CoAxioms had to change, including the binary layout of interface files. - To get branched axioms to work correctly, it is important to have a notion of type "apartness": two types are apart if they cannot unify, and no substitution of variables can ever get them to unify, even after type family simplification. (This is different than the normal failure to unify because of the type family bit.) This notion in encoded in tcApartTys, in Unify.lhs. Because apartness is finer-grained than unification, the tcUnifyTys now calls tcApartTys. - CoreLinting axioms has been updated, both to reflect the new form of CoAxiom and to enforce the apartness rules of branch application. The formalization of the new rules is in docs/core-spec/core-spec.pdf. - The FamInst type (in types/FamInstEnv.lhs) has changed significantly, paralleling the changes to CoAxiom. Of course, this forced minor changes in many files. - There are several new Notes in FamInstEnv.lhs, including one discussing confluent overlap and why we're not doing it. - lookupFamInstEnv, lookupFamInstEnvConflicts, and lookup_fam_inst_env' (the function that actually does the work) have all been more-or-less completely rewritten. There is a Note [lookup_fam_inst_env' implementation] describing the implementation. One of the changes that affects other files is to change the type of matches from a pair of (FamInst, [Type]) to a new datatype (which now includes the index of the matching branch). This seemed a better design. - The TySynInstD constructor in Template Haskell was updated to use the new datatype TySynEqn. I also bumped the TH version number, requiring changes to DPH cabal files. (That's why the DPH repo has an overlapping-tyfams branch.) - As SPJ requested, I refactored some of the code in HsDecls: * splitting up TyDecl into SynDecl and DataDecl, correspondingly changing HsTyDefn to HsDataDefn (with only one constructor) * splitting FamInstD into TyFamInstD and DataFamInstD and splitting FamInstDecl into DataFamInstDecl and TyFamInstDecl * making the ClsInstD take a ClsInstDecl, for parallelism with InstDecl's other constructors * changing constructor TyFamily into FamDecl * creating a FamilyDecl type that stores the details for a family declaration; this is useful because FamilyDecls can appear in classes but other decls cannot * restricting the associated types and associated type defaults for a * class to be the new, more restrictive types * splitting cid_fam_insts into cid_tyfam_insts and cid_datafam_insts, according to the new types * perhaps one or two more that I'm overlooking None of these changes has far-reaching implications. - The user manual, section 7.7.2.2, is updated to describe the new type family instances. - - - - - f788d0fb by Simon Peyton Jones at 2012-12-23T15:49:58+00:00 Track changes in HsBang - - - - - ca460a0c by Simon Peyton Jones at 2012-12-23T15:50:28+00:00 Merge branch 'master' of http://darcs.haskell.org//haddock - - - - - f078fea6 by Simon Peyton Jones at 2013-01-02T08:33:13+00:00 Use InstEnv.instanceSig rather than instanceHead (name change) - - - - - 88e41305 by Simon Peyton Jones at 2013-01-14T17:10:27+00:00 Track change to HsBang type - - - - - e1ad4e19 by Kazu Yamamoto at 2013-02-01T11:59:24+09:00 Merge branch 'ghc-7.6' into ghc-7.6-merge-2 Conflicts: haddock.cabal src/Haddock/Interface/AttachInstances.hs src/Haddock/Interface/Create.hs src/Haddock/Interface/LexParseRn.hs src/Haddock/InterfaceFile.hs src/Haddock/Types.hs Only GHC HEAD can compile this. GHC 7.6.x cannot compile this. Some test fail. - - - - - 62bec012 by Kazu Yamamoto at 2013-02-06T11:12:28+09:00 Using tcSplitSigmaTy in instanceHead' (FIXME is resolved.) - - - - - 013fd2e4 by Kazu Yamamoto at 2013-02-06T17:56:21+09:00 Refactoring instanceHead'. - - - - - 3148ce0e by Kazu Yamamoto at 2013-02-07T17:45:10+09:00 Using new syntax in html-test/src/GADTRecords.hs. - - - - - 626dabe7 by Gabor Greif at 2013-02-15T22:42:01+01:00 Typo - - - - - 1eb667ae by Ian Lynagh at 2013-02-16T17:02:07+00:00 Follow changes in base - - - - - 3ef8253a by Ian Lynagh at 2013-03-01T23:23:57+00:00 Follow changes in GHC's build system - - - - - 1a265a3c by Ian Lynagh at 2013-03-03T23:12:07+00:00 Follow changes in GHC build system - - - - - 69941c79 by Max Bolingbroke at 2013-03-10T09:38:28-07:00 Use Alex 3's Unicode support to properly lex source files as UTF-8 Signed-off-by: David Waern <david.waern at gmail.com> - - - - - ea687dad by Simon Peyton Jones at 2013-03-15T14:16:10+00:00 Adapt to tcRnGetInfo returning family instances too This API change was part of the fix to Trac haskell/haddock#4175. But it offers new information to Haddock: the type-family instances, as well as the class instances, of this type. This patch just drops the new information on the floor, but there's an open opportunity to use it in the information that Haddock displays. - - - - - 971a30b0 by Andreas Voellmy at 2013-05-19T20:47:39+01:00 Fix for haskell/haddock#7879. Changed copy of utils/haddock/html/resources/html to use "cp -RL" rather than "cp -R". This allows users to run validate in a build tree, where the build tree was setup using lndir with a relative path to the source directory. - - - - - 31fb7694 by Ian Lynagh at 2013-05-19T20:47:49+01:00 Use "cp -L" when making $(INPLACE_LIB)/latex too - - - - - e9952233 by Simon Hengel at 2013-06-01T18:06:50+02:00 Add -itest to .ghci - - - - - b06873b3 by Mateusz Kowalczyk at 2013-06-01T18:06:50+02:00 Workaround for a failing build with --enable-tests. - - - - - e7858d16 by Simon Hengel at 2013-06-01T19:29:28+02:00 Fix broken test - - - - - 0690acb1 by Richard Eisenberg at 2013-06-21T14:08:25+01:00 Updates to reflect changes in HsDecls to support closed type families. - - - - - 7fd347ec by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 53ed81b6 by Simon Hengel at 2013-07-08T10:28:48+02:00 Fix failing test - - - - - 931c4f4f by Richard Eisenberg at 2013-07-24T13:15:59+01:00 Remove (error "synifyKind") to use WithinType, to allow haddock to process base. - - - - - 55a9c804 by Richard Eisenberg at 2013-08-02T15:54:55+01:00 Changes to reflect changes in GHC's type HsTyVarBndr - - - - - b6e9226c by Mathieu Boespflug at 2013-08-04T10:39:43-07:00 Output Copright and License keys in Xhtml backend. This information is as relevant in the documentation as it is in the source files themselves. Signed-off-by: David Waern <david.waern at gmail.com> - - - - - 4c66028a by David Waern at 2013-08-04T15:27:36-07:00 Bump interface file version. - - - - - 67340163 by David Waern at 2013-08-09T16:12:51-07:00 Update tests. - - - - - 2087569b by Mateusz Kowalczyk at 2013-08-25T09:24:13+02:00 Add spec tests. This adds tests for all elements we can create during regular parsing. This also adds tests for text with unicode in it. - - - - - 97f36a11 by Mateusz Kowalczyk at 2013-08-27T06:59:12+01:00 Fix ticket haskell/haddock#247. I do the same thing that the XHTML backend does: give these no special treatment and just act as if they are regular functions. - - - - - 60681b4f by Mateusz Kowalczyk at 2013-08-27T21:22:48+02:00 LaTeX tests setup - - - - - fa4c27b2 by Mateusz Kowalczyk at 2013-09-02T23:21:43+01:00 Fixes haskell/haddock#253 - - - - - 1a202490 by Mateusz Kowalczyk at 2013-09-03T01:12:50+01:00 Use Hspec instead of nanospec This is motivated by the fact that Haddock tests are not ran by the GHC's ‘validate’ script so we're pretty liberal on dependencies in that area. Full Hspec gives us some nice features such as Quickcheck integration. - - - - - 8cde3b20 by David Luposchainsky at 2013-09-08T07:27:28-05:00 Fix AMP warnings Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - d10661f2 by Herbert Valerio Riedel at 2013-09-11T15:15:01+02:00 Update Git repo URL in `.cabal` file - - - - - 16a44eb5 by Richard Eisenberg at 2013-09-17T09:34:26-04:00 Revision to reflect new role annotation syntax in GHC. - - - - - 4b9833b9 by Herbert Valerio Riedel at 2013-09-18T10:15:28+02:00 Add missing `traverse` method for `GenLocated` As `Traversable` needs at least one of `traverse` or `sequenceA` to be overridden. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - b71fed5d by Simon Hengel at 2013-09-18T22:43:34+02:00 Add test helper - - - - - 4fc1ea86 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#231 - - - - - 435872f6 by Mateusz Kowalczyk at 2013-09-18T22:43:34+02:00 Fixes haskell/haddock#256 We inject -dynamic-too into flags before we run all our actions in the GHC monad. - - - - - b8b24abb by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Add new field to DynFlags - - - - - 49558795 by Simon Hengel at 2013-09-18T22:43:35+02:00 Fallback to ./resources when Cabal data is not found (so that themes are found during development) - - - - - bf79d05c by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Fixes haskell/haddock#5 - - - - - e1baebc2 by Mateusz Kowalczyk at 2013-09-18T22:43:35+02:00 Print missing documentation. Fixes haskell/haddock#258. - - - - - 02ea74de by Austin Seipp at 2013-10-09T10:52:22-05:00 Don't consider StaticFlags when parsing arguments. Instead, discard any static flags before parsing the command line using GHC's DynFlags parser. See http://ghc.haskell.org/trac/ghc/ticket/8276 Based off a patch from Simon Hengel. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 704fd5bb by Simon Hengel at 2013-11-09T00:15:13+01:00 Update HTML tests - - - - - f9fed49e by Simon Hengel at 2013-11-10T18:43:58+01:00 Bump version - - - - - 97ae1999 by Simon Peyton Jones at 2013-11-25T17:25:14+00:00 Track changes in HsSpliceTy data constructor - - - - - 59ad8268 by Simon Peyton Jones at 2014-01-10T18:17:43+00:00 Adapt to small change in Pretty's exports - - - - - 8b12e6aa by Simon Hengel at 2014-01-12T14:48:35-06:00 Some code simplification by using traverse - - - - - fc5ea9a2 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix warnings in test helper - - - - - 6dbb3ba5 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Add ByteString version of Attoparsec - - - - - 968d7774 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 One pass parser and tests. We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing. - - - - - 37a07c9c by Simon Hengel at 2014-01-12T14:48:35-06:00 Rename Haddock.ParseSpec to Haddock.ParserSpec - - - - - f0f68fe9 by Simon Hengel at 2014-01-12T14:48:35-06:00 Don't append newline to parseString input We also check that we have parsed everything with endOfInput. - - - - - 95d60093 by Simon Hengel at 2014-01-12T14:48:35-06:00 Fix totality, unicode, examples, paragraph parsing Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu at fuuzetsu.co.uk if you need the full commit history. - - - - - 7d99108c by Simon Hengel at 2014-01-12T14:48:35-06:00 Update acceptance tests - - - - - d1b59640 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Support for bold. Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs - - - - - 4b412b39 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Allow for headings inside function documentation. LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs - - - - - fdcca428 by Mateusz Kowalczyk at 2014-01-12T14:48:35-06:00 Per-module extension flags and language listing. Any extensions that are not enabled by a used language (Haskell2010 &c) will be shown. Furthermore, any implicitly enabled are also going to be shown. While we could eliminate this either by using the GHC API or a dirty hack, I opted not to: if a user doesn't want the implied flags to show, they are recommended to use enable extensions more carefully or individually. Perhaps this will encourage users to not enable the most powerful flags needlessly. Enabled with show-extensions. Conflicts: src/Haddock/InterfaceFile.hs - - - - - 368942a2 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Bump interface version There were some breaking changes over the last few patches so we bump the interface version. This causes a big problem with testing: 1. To generate cross package docs, we first need to generate docs for the package used. 2. To generate package docs with new interface version, we need to use Haddock which has the version bumped. 3. To get Haddock with the version bump, we first need to test cross package docs 4. GOTO 1 So the problem is the chicken and the egg problem. It seems that the only solution would be to generate some interface files on the fly but it is non-trivial. To run this test, you'll have to: * build Haddock without the test (make sure everything else passes) * rebuild the packages used in the test with your shiny new binary making sure they are visible to Haddock * remove the ‘_hidden’ suffix and re-run the tests Note: because the packages currently used for this test are those provided by GHC, it's probably non-trivial to just re-build them. Preferably something less tedious to rebuild should be used and something that is not subject to change. - - - - - 124ae7a9 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow for nesting of paragraphs under lists. The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - c7913535 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Allow escaping in URLs and pictures. Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs - - - - - 32326680 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update documentation. - - - - - fbef6406 by Mateusz Kowalczyk at 2014-01-12T14:48:36-06:00 Update maintainer - - - - - b40e82f4 by Mateusz Kowalczyk at 2014-01-13T02:39:25-06:00 Fixes haskell/haddock#271 Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - f4eafbf8 by Gergő Érdi at 2014-01-19T15:35:16-06:00 Support for -XPatternSynonyms Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - a8939591 by Austin Seipp at 2014-01-29T08:09:04-06:00 Update CPP check for __GLASGOW_HASKELL__ Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 30d7e9d5 by Gergő Érdi at 2014-01-31T00:15:01+08:00 <+>: Don't insert a space when concatenating empty nodes - - - - - a25ccd4d by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Fix @ code blocks In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output. - - - - - 0f67305a by Mateusz Kowalczyk at 2014-01-30T17:22:34+01:00 Update tests This updates tests due to Haddock Trac haskell/haddock#271 fix and due to removal of TypeHoles as an extension from GHC. - - - - - 157322a7 by Gergő Érdi at 2014-01-31T01:03:17+08:00 Handle infix vs prefix names correctly everywhere, by explicitly specifying the context The basic idea is that "a" and "+" are either pretty-printed as "a" and "(+)" or "`a`" and "+" - - - - - aa6d9685 by Mateusz Kowalczyk at 2014-01-30T17:21:50+00:00 Correct whitespace in ‘hidden’ test for <+> change - - - - - 121872f0 by Mateusz Kowalczyk at 2014-02-09T17:59:12+00:00 Document module header. Fixes Haddock Trac haskell/haddock#270. - - - - - e3253746 by Mateusz Kowalczyk at 2014-02-10T21:37:48+00:00 Insert a space between module link and description Fixes Haddock Trac haskell/haddock#277. - - - - - 771d2384 by Mateusz Kowalczyk at 2014-02-10T23:27:21+00:00 Ensure a space between type signature and ‘Source’ This is briefly related to Haddock Trac haskell/haddock#249 and employs effectively the suggested fix _but_ it doesn't actually fix the reported issue. This commit simply makes copying the full line a bit less of a pain. - - - - - 8cda9eff by nand at 2014-02-11T15:48:30+00:00 Add support for type/data families This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 3f22c510 by nand at 2014-02-11T15:53:50+00:00 Improve display of poly-kinded type operators This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - effb2d6b by nand at 2014-02-11T15:56:50+00:00 Add test case for PatternSynonyms This just tests various stuff including poly-kinded patterns and operator patterns to make sure the rendering isn't broken. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - b38faf0d by Niklas Haas at 2014-02-13T21:53:32+00:00 Get rid of re-implementation of sortBy I have no idea what this was doing lying around here, and due to the usage of tuples it's actually slower, too. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - ac1e0413 by Mateusz Kowalczyk at 2014-02-13T23:57:16+00:00 Only warn about missing docs when docs are missing This fixes the ‘Missing documentation for…’ message for modules with 100% coverage. - - - - - cae2e36a by Niklas Haas at 2014-02-15T21:56:18+00:00 Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - 8bea5c3a by Mateusz Kowalczyk at 2014-02-19T05:11:34+00:00 Use a bespoke data type to indicate fixity This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment. - - - - - 5b52d57c by Niklas Haas at 2014-02-22T21:31:03+01:00 Strip a single leading space from bird tracks (#201) This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch. - - - - - 5a1315a5 by Simon Hengel at 2014-02-22T21:55:35+01:00 Turn a source code comment into specs - - - - - 784cfe58 by Mateusz Kowalczyk at 2014-02-23T05:02:22+00:00 Update test case for lifted GADT type rendering The parsing of these seems to have been fixed by GHC folk and it now renders differently. IMHO it now renders in a better way so I'm updating the test to reflect this. - - - - - c3c88c2f by Mateusz Kowalczyk at 2014-02-23T06:37:14+00:00 Don't shadow ‘strip’. -Wall complains - - - - - 293031d8 by Niklas Haas at 2014-02-23T15:21:52+01:00 Make ImplicitParams render correctly (#260) This introduces a new precedence level for single contexts (because implicit param contexts always need parens around them, but other types of contexts don't necessarily, even when alone) - - - - - 4200842d by Niklas Haas at 2014-02-23T15:37:13+01:00 Lower precedence of equality constraints This drops them to the new precedence pREC_CTX, which makes single eqaulity constraints show up as (a ~ b) => ty, in line with GHC's rendering. Additional tests added to make sure other type operators render as intended. Current behavior matches GHC - - - - - b59e3227 by Niklas Haas at 2014-02-23T16:11:22+01:00 Add RankNTypes test case to ImplicitParams.hs This test actually tests what haskell/haddock#260 originally reported - I omitted the RankNTypes scenario from the original fix because I realized it's not relevant to the underlying issue and indeed, this renders as intended now. Still good to have more tests. - - - - - c373dbf7 by Mateusz Kowalczyk at 2014-02-24T06:09:54+00:00 Fix rendering of Contents when links are present Fixes Haddock Trac haskell/haddock#267. - - - - - 9ecb0e56 by Mateusz Kowalczyk at 2014-02-24T06:26:50+00:00 Fix wording in the docs - - - - - 4f4dcd8e by Mateusz Kowalczyk at 2014-02-27T03:00:33+00:00 Change rendering of duplicate record field docs See Haddock Trac haskell/haddock#195. We now change this behaviour to only rendering the documentation attached to the first instance of a duplicate field. Perhaps we could improve this by rendering the first instance that has documentation attached to it but for now, we'll stick with this. - - - - - ad8aa609 by Niklas Haas at 2014-03-08T09:43:26+01:00 Render fixity information Affects functions, type synonyms, type families, class names, data type names, constructors, data families, associated TFs/DFs, type synonyms, pattern synonyms and everything else I could think of. - - - - - 6a39c917 by Niklas Haas at 2014-03-09T07:43:39+01:00 Reorder topDeclElem to move the source/wiki links to the top They appear in the same position due to the float: right attribute but now they're always at the top of the box instead of at the bottom. - - - - - 2d34b3b4 by Niklas Haas at 2014-03-09T07:53:46+01:00 Use optLast instead of listToMaybe for sourceUrls/wikiUrls This lets you override them using eg. cabal haddock --haddock-options, which can come in handy if you want to use a different layout or URL for your source code links than cabal-install generates. - - - - - 0eff4624 by Niklas Haas at 2014-03-09T07:53:46+01:00 Differentiate between TH splices (line-links) and regular names This adds a new type of source code link, to a specific line rather than a specific declaration/name - this is used to link to the location of a TH splice that defines a certain name. Rather hefty changes throughout and still one unresolved issue (the line URLs aren't parsed from the third form of --read-interface which means they're currently restricted to same-interface links). Not sure if this issue is really worth all the hassle, especially since we could just use line links in general. This commit also contains some cleanup/clarification of the types in Haddock.Backends.Xhtml.Decl and shortens some overlong lines in the process. Notably, the Bool parameter was replaced by a Unicode type synonym to help clarify its presence in type signatures. - - - - - 66d6f77b by Niklas Haas at 2014-03-09T20:02:43+01:00 Group similar fixities together Identical fixities declared for the same line should now render using syntax like: infix 4 <, >=, >, <= - - - - - 6587f9f5 by Mateusz Kowalczyk at 2014-03-10T04:24:18+00:00 Update changelog - - - - - 7387ddad by Niklas Haas at 2014-03-11T10:26:04+01:00 Include fixity information in the Interface file This resolves fixity information not appearing across package borders. The binary file version has been increased accordingly. - - - - - ab46ef44 by Niklas Haas at 2014-03-11T10:26:04+01:00 Update changelog - - - - - 565cab6f by Niklas Haas at 2014-03-11T10:26:04+01:00 Update appearance of fixity annotations This moves them in-line with their corresponding lines, similar to a presentation envision by @hvr and described in #ghc. Redundant operator names are also omitted when no ambiguity is present. - - - - - 5d7afd67 by Niklas Haas at 2014-03-11T10:26:05+01:00 Filter family instances of hidden types Currently, this check does not extend to hidden right hand sides, although it probably should hide them in that case. - - - - - ec291b0c by Niklas Haas at 2014-03-11T10:26:05+01:00 Add documentation for --source-entity-line - - - - - 0922e581 by Niklas Haas at 2014-03-11T10:37:32+01:00 Revert "Reorder topDeclElem to move the source/wiki links to the top" This reverts commit 843c42c4179526a2ad3526e4c7d38cbf4d50001d. This change is no longer needed with the new rendering style, and it messes with copy/pasting lines. - - - - - 30618e8b by Mateusz Kowalczyk at 2014-03-11T09:41:07+00:00 Bump version to 2.15.0 - - - - - adf3f1bb by Mateusz Kowalczyk at 2014-03-11T09:41:09+00:00 Fix up some whitespace - - - - - 8905f57d by Niklas Haas at 2014-03-13T19:18:06+00:00 Hide RHS of TFs with non-exported right hand sides Not sure what to do about data families yet, since technically it would not make a lot of sense to display constructors that cannot be used by the user. - - - - - 5c44d5c2 by Niklas Haas at 2014-03-13T19:18:08+00:00 Add UnicodeSyntax alternatives for * and -> I could not find a cleaner way to do this other than checking for string equality with the given built-in types. But seeing as it's actually equivalent to string rewriting in GHC's implementation of UnicodeSyntax, it's probably fitting. - - - - - b04a63e6 by Niklas Haas at 2014-03-13T19:18:10+00:00 Display minimal complete definitions for type classes This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+. I also cleaned up some of the places in which ExportDecl is used to make adding fields easier in the future. Lots of test cases have been updated since they now render with minimality information. - - - - - a4a20b16 by Niklas Haas at 2014-03-13T19:18:12+00:00 Strip links from recently added html tests These were accidentally left there when the tests were originally added - - - - - d624f315 by Mateusz Kowalczyk at 2014-03-13T19:19:31+00:00 Update changelog - - - - - d27a21ac by Mateusz Kowalczyk at 2014-03-13T21:19:07+00:00 Always read in prologue files as UTF8 (#286). - - - - - 54b2fd78 by Mateusz Kowalczyk at 2014-03-13T21:28:09+00:00 Style only - - - - - fa4fe650 by Simon Hengel at 2014-03-15T09:04:18+01:00 Add Fuuzetsu maintainers field in cabal file - - - - - f83484b7 by Niklas Haas at 2014-03-15T18:20:24+00:00 Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. - - - - - 0099d276 by Niklas Haas at 2014-03-15T18:20:26+00:00 Fix issue haskell/haddock#281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. - - - - - 1f9687bd by Mateusz Kowalczyk at 2014-03-21T17:48:37+00:00 Please cabal sdist - - - - - 75542693 by Mateusz Kowalczyk at 2014-03-22T16:36:16+00:00 Drop needless --split-objs which slows us down. Involves tiny cleanup of all the dynflag bindings. Fixes haskell/haddock#292. - - - - - 31214dc3 by Herbert Valerio Riedel at 2014-03-23T18:01:01+01:00 Fix a few typos Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 0b73e638 by Mateusz Kowalczyk at 2014-03-31T05:34:36+01:00 Print kind signatures on GADTs - - - - - 2bab42f3 by Mateusz Kowalczyk at 2014-03-31T16:53:25+01:00 Add default for new PlatformConstraints field - - - - - 42647c5f by Mateusz Kowalczyk at 2014-03-31T18:29:04+01:00 Drop leading whitespace in @-style blocks. Fixes haskell/haddock#201. - - - - - 98208294 by Niklas Haas at 2014-03-31T20:09:58+02:00 Crash when exporting record selectors of data family instances This fixes bug haskell/haddock#294. This also fixes a related but never-before-mentioned bug about the display of GADT record selectors with non-polymorphic type signatures. Note: Associated data type constructors fail to show up if nothing is exported that they could be attached to. Exporting any of the data types in the instance head, or the class + data family itself, causes them to show up, but in the absence of either of these, exporting just the associated data type with the constructor itself will result in it being hidden. The only scenario I can come up that would involve this kind of situation involved OverlappingInstances, and even then it can be mitigated by just exporting the class itself, so I'm not going to solve it since the logic would most likely be very complicated. - - - - - 3832d171 by Mateusz Kowalczyk at 2014-04-01T19:07:33+01:00 Make CHANGES consistent with what's now in 2.14.2 - - - - - c386ae89 by Mateusz Kowalczyk at 2014-04-01T19:18:36+01:00 Actually bundle extra spec tests in sdist - - - - - bd57a6d3 by Mateusz Kowalczyk at 2014-04-03T21:13:48+01:00 Update test cases for GHC bug haskell/haddock#8945, Haddock haskell/haddock#188 The order of signature groups has been corrected upstream. Here we add a test case and update some existing test-cases to reflect this change. We remove grouped signature in test cases that we can (Minimal, BugDeprecated &c) so that the test is as self-contained as possible. - - - - - 708b88b1 by Mateusz Kowalczyk at 2014-04-03T21:16:07+01:00 Enforce strict GHC version in cabal file This stops people with 7.6.3 trying to install 2.15.x which clearly won't work. Unfortunately we shipped 2.14.x without realising this. - - - - - 60334f7c by Mateusz Kowalczyk at 2014-04-03T21:19:24+01:00 Initialise some new PlatformConstants fields - - - - - ea77f668 by Mateusz Kowalczyk at 2014-04-11T16:52:23+01:00 We don't actually want unicode here - - - - - 0b651cae by Mateusz Kowalczyk at 2014-04-11T18:13:30+01:00 Parse identifiers with ^ and ⋆ in them. Fixes haskell/haddock#298. - - - - - e8ad0f5f by Mateusz Kowalczyk at 2014-04-11T18:47:41+01:00 Ignore version string during HTML tests. - - - - - de489089 by Mateusz Kowalczyk at 2014-04-11T18:59:30+01:00 Update CHANGES to follow 2.14.3 - - - - - beb464a9 by Gergő Érdi at 2014-04-13T16:31:10+08:00 remove Origin flag from LHsBindsLR - - - - - cb16f07c by Herbert Valerio Riedel at 2014-04-21T17:16:50+02:00 Replace local `die` by new `System.Exit.die` Starting with GHC 7.10, System.Exit exports the new `die` which is essentially the same as Haddock.Util.die, so this commit changes Haddock.Util.die to be a simple re-export of System.Exit.die. See also https://ghc.haskell.org/trac/ghc/ticket/9016 for more details. Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org> - - - - - 9b9b23c7 by Mateusz Kowalczyk at 2014-05-03T15:40:11+02:00 Disambiguate ‘die’ in test runners. - - - - - 5d28a2b8 by Mateusz Kowalczyk at 2014-05-05T09:19:49+02:00 Prepare modules for parser split. We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type. - - - - - d3967ff3 by Mateusz Kowalczyk at 2014-05-05T11:00:41+02:00 Move parser + parser tests out to own package. We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes. - - - - - 522a448d by Mateusz Kowalczyk at 2014-05-05T11:14:47+02:00 Move out Show and Eq instances to Types They are much more useful to the users here. - - - - - 11a6f0f2 by Mateusz Kowalczyk at 2014-05-06T13:50:31+02:00 Remove no longer necessary parser error handling. We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places. - - - - - 6992c924 by Mateusz Kowalczyk at 2014-05-14T02:23:55+02:00 Please the GHC build-system. As I can not figure out how to do this properly, if we're in GHC tree, we treat the library as being the same package. If we're not in the tree, we require that the library be installed separately. - - - - - 7a8ad763 by Mateusz Kowalczyk at 2014-05-14T14:50:25+02:00 Update issue tracker URL - - - - - f616c521 by Mateusz Kowalczyk at 2014-05-14T14:53:32+02:00 Update issue tracker URL for haddock-library - - - - - 66580ded by Gergő Érdi at 2014-05-25T14:24:16+08:00 Accomodate change in PatSyn representation - - - - - 0e43b988 by Mateusz Kowalczyk at 2014-05-29T03:15:29+02:00 Revert "Accomodate change in PatSyn representation" This reverts commit 57aa591362d7c8ba21285fccd6a958629a422091. I am reverting this because I pushed it to master when it was meant to stay on a wip-branch. Sorry Gergo and everyone who had trouble due to this. - - - - - e10d7ec8 by Mateusz Kowalczyk at 2014-05-29T03:24:11+02:00 Revert "Revert "Accomodate change in PatSyn representation"" This reverts commit e110e6e70e40eed06c06676fd2e62578da01d295. Apparently as per GHC commit ac2796e6ddbd54c5762c53e2fcf29f20ea162fd5 this was actually intended. Embarrasing for me. - - - - - 5861aca9 by Mateusz Kowalczyk at 2014-06-05T19:49:27+02:00 Clear up highlighting of identifiers with ‘'’s. - - - - - d7cc420f by Simon Peyton Jones at 2014-06-06T12:41:09+01:00 Follow change in patSynSig - - - - - 938b4fd8 by Mateusz Kowalczyk at 2014-06-12T07:24:29+02:00 Slightly update the readme. Style-sheets are no longer a recent thing, dead links, old maintainers, different formats. - - - - - c7799dea by Mateusz Kowalczyk at 2014-06-18T00:05:56+02:00 Update cabal files Update repository urls, use subdir property for haddock-library and use a separate versioning scheme for haddock-library in preparation for release. - - - - - a2750b6a by Simon Hengel at 2014-06-18T11:01:18+08:00 Compatibility with older versions of base and bytestring - - - - - 009b4b03 by Simon Hengel at 2014-06-18T11:14:01+08:00 Enable travis-ci for haddock-library - - - - - 9b5862eb by Simon Hengel at 2014-06-18T11:14:01+08:00 haddock-library: Do not depend on haddock-library in test suite I think you either add src to hs-source-dirs or the library to build-depends. But doing both does not make sense (AFAICT). - - - - - fb1f3279 by Simon Hengel at 2014-06-18T11:49:05+08:00 haddock-library: Use -Wall for specs - - - - - 649340e1 by Mateusz Kowalczyk at 2014-06-18T06:58:54+02:00 Use Travis with multiple GHC versions When using HEAD, we build haddock-library directly from repository as a dependency (and thanks to --enable-tests, the tests get ran anyway). In all other cases, we manually run the tests on haddock-library only and don't test the main project. - - - - - d7eeeec2 by Mateusz Kowalczyk at 2014-06-18T07:49:04+02:00 Comment improvements + few words in cabal file - - - - - 0f8db914 by Simon Hengel at 2014-06-18T13:52:23+08:00 Use doctest to check examples in documentation - - - - - 2888a8dc by Simon Hengel at 2014-06-18T14:16:48+08:00 Remove doctest dependency (so that we can use haddock-library with doctest) - - - - - 626d5e85 by Mateusz Kowalczyk at 2014-06-18T08:41:25+02:00 Travis tweaks - - - - - 41d4f9cc by Mateusz Kowalczyk at 2014-06-18T08:58:43+02:00 Don't actually forget to install specified GHC. - - - - - c6aa512a by John MacFarlane at 2014-06-18T10:43:57-07:00 Removed reliance on LambdaCase (which breaks build with ghc 7.4). - - - - - b9b93b6f by John MacFarlane at 2014-06-18T10:54:56-07:00 Fixed haddock warnings. - - - - - a41b0ab5 by Mateusz Kowalczyk at 2014-06-19T01:20:10+02:00 Update Travis, bump version - - - - - 864bf62a by Mateusz Kowalczyk at 2014-06-25T10:36:54+02:00 Fix anchors. Closes haskell/haddock#308. - - - - - 53df91bb by Mateusz Kowalczyk at 2014-06-25T15:04:49+02:00 Drop DocParagraph from front of headers I can not remember why they were wrapped in paragraphs to begin with and it seems unnecessary now that I test it. Closes haskell/haddock#307. - - - - - 29b5f2fa by Mateusz Kowalczyk at 2014-06-25T15:17:20+02:00 Don't mangle append order for nested lists. The benefit of this is that the ‘top-level’ element of such lists is properly wrapped in <p> tags so any CSS working with these will be applied properly. It also just makes more sense. Pointed out at jgm/pandoc#1346. - - - - - 05cb6e9c by Mateusz Kowalczyk at 2014-06-25T15:19:45+02:00 Bump haddock-library to 1.1.0 for release - - - - - 70feab15 by Iavor Diatchki at 2014-07-01T03:37:07-07:00 Propagate overloading-mode for instance declarations in haddock (#9242) - - - - - d4ca34a7 by Simon Peyton Jones at 2014-07-14T16:23:15+01:00 Adapt to new definition of HsDecls.TyFamEqn This is a knock-on from the refactoring from Trac haskell/haddock#9063. I'll push the corresponding changes to GHC shortly. - - - - - f91e2276 by Edward Z. Yang at 2014-07-21T08:14:19-07:00 Track GHC PackageId to PackageKey renaming. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - b010f9ef by Edward Z. Yang at 2014-07-25T16:28:46-07:00 Track changes for module reexports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: src/Haddock/Interface/Create.hs - - - - - 8b85f9f9 by Mateusz Kowalczyk at 2014-07-28T13:25:43+02:00 Catch mid-line URLs. Fixes haskell/haddock#314. - - - - - 4c613a78 by Edward Z. Yang at 2014-08-05T03:11:00-07:00 Track type signature change of lookupModuleInAllPackages Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - e80b051c by Edward Z. Yang at 2014-08-05T17:34:26+01:00 If GhcProfiled, also build Haddock profiled. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f9cccd29 by Edward Z. Yang at 2014-08-07T14:23:35+01:00 Ignore TAGS files. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 00b3af52 by Mateusz Kowalczyk at 2014-08-08T04:58:19+02:00 Update to attoparsec-0.12.1.1 There seems to be memory and speed improvement. - - - - - 5457dc71 by Mateusz Kowalczyk at 2014-08-08T18:24:02+02:00 Fix forgotten src - - - - - 3520cb04 by Mateusz Kowalczyk at 2014-08-14T20:19:07+01:00 Bump down the version for master to 2.14.4 - - - - - dc98c21b by Mateusz Kowalczyk at 2014-08-14T20:23:27+01:00 Revert "Track type signature change of lookupModuleInAllPackages" This reverts commit d59fec2c9551b5662a3507c0011e32a09a9c118f. - - - - - 3f2038c0 by Mateusz Kowalczyk at 2014-08-14T20:23:31+01:00 Revert "Track changes for module reexports." This reverts commit b99b57c0df072d12b67816b45eca2a03cb1da96d. - - - - - 56d4e49e by Mateusz Kowalczyk at 2014-08-14T20:23:42+01:00 Revert "Track GHC PackageId to PackageKey renaming." This reverts commit 8ac42d3327473939c013551750425cac191ff0fd. - - - - - 726ea3cb by Mateusz Kowalczyk at 2014-08-14T20:23:47+01:00 Revert "Adapt to new definition of HsDecls.TyFamEqn" This reverts commit cb96b4f1ed0462b4a394b9fda6612c3bea9886bd. - - - - - 61a88ff0 by Mateusz Kowalczyk at 2014-08-14T20:23:52+01:00 Revert "Propagate overloading-mode for instance declarations in haddock (#9242)" This reverts commit 8d20ca8d5a9bee73252ff2035ec45f9c03d0820c. - - - - - a32ba674 by Mateusz Kowalczyk at 2014-08-14T20:26:03+01:00 Revert "Disambiguate ‘die’ in test runners." This reverts commit dba02d6df32534aac5d257f2d28596238d248942. - - - - - f335820f by Mateusz Kowalczyk at 2014-08-14T20:26:09+01:00 Revert "Replace local `die` by new `System.Exit.die`" This reverts commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5. - - - - - 107078e4 by Mateusz Kowalczyk at 2014-08-14T20:27:34+01:00 Merge branch 'reverts' This reverts any changes that were made to have Haddock compile with 7.9. When 7.10 release comes, we can simply re-apply all the patches and any patches that occur on ghc-head branch from now on. This allows us to build master with 7.8.3 - - - - - b44b3871 by Mateusz Kowalczyk at 2014-08-15T02:47:40+01:00 Fix haskell/haddock#313 by doing some list munging. I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly. - - - - - e1a62cde by Mateusz Kowalczyk at 2014-08-15T02:52:56+01:00 Stop testing haskell/haddock#188. Because the change is in GHC 7.9 and we now work against 7.8.3, this test no longer makes sense. We revert it until 7.10 becomes the standard version. If anything, there should be a test for this in GHC itself. - - - - - 54e8286d by Mateusz Kowalczyk at 2014-08-15T05:31:57+01:00 Add haskell/haddock#313 to CHANGES - - - - - 9df7ad5d by Simon Hengel at 2014-08-20T11:25:32+08:00 Fix warning - - - - - ee2574d6 by Simon Hengel at 2014-08-20T12:07:01+08:00 Fix travis builds - - - - - 384cf2e6 by Simon Hengel at 2014-08-20T12:14:31+08:00 Require GHC 7.8.3 - - - - - d4779863 by Simon Hengel at 2014-08-22T12:14:16+08:00 Move Haddock API to a separate package - - - - - 80f3e0e1 by Simon Hengel at 2014-08-22T14:57:38+08:00 Bump version to 2.15.0 and add version constraints - - - - - 309a94ce by Simon Hengel at 2014-08-22T15:18:06+08:00 Add deprecated compatibility module - - - - - 4d1e4e3f by Luite Stegeman at 2014-08-22T20:46:45+02:00 export things to allow customizing how the Ghc session is run - - - - - 47884591 by Luite Stegeman at 2014-08-22T20:46:51+02:00 ghc 7.8.2 compatibility - - - - - 5ea94e2c by Luite Stegeman at 2014-08-22T22:08:58+02:00 install dependencies for haddock-api on travis - - - - - 9fb845b2 by Mateusz Kowalczyk at 2014-08-23T10:09:34+01:00 Move sources under haddock-api/src - - - - - 85817dc4 by Mateusz Kowalczyk at 2014-08-23T10:10:48+01:00 Remove compat stuff - - - - - 151c6169 by Niklas Haas at 2014-08-24T08:14:10+02:00 Fix extra whitespace on signatures and update all test cases This was long overdue, now running ./accept.lhs on a clean test from master will not generate a bunch of changes. - - - - - d320e0d2 by Niklas Haas at 2014-08-24T08:14:35+02:00 Omit unnecessary foralls and fix haskell/haddock#315 This also fixes haskell/haddock#86. - - - - - bdafe108 by Mateusz Kowalczyk at 2014-08-24T15:06:46+01:00 Update CHANGES - - - - - fafa6d6e by Mateusz Kowalczyk at 2014-08-24T15:14:23+01:00 Delete few unused/irrelevant/badly-place files. - - - - - 3634923d by Duncan Coutts at 2014-08-27T13:49:31+01:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. - - - - - 539a7e70 by Herbert Valerio Riedel at 2014-08-31T11:36:32+02:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 9e3a0e5b by Mateusz Kowalczyk at 2014-08-31T12:54:43+01:00 Bump version in doc - - - - - 4a177525 by Mateusz Kowalczyk at 2014-08-31T13:01:23+01:00 Bump haddock-library version - - - - - f99c1384 by Mateusz Kowalczyk at 2014-08-31T13:05:25+01:00 Remove references to deleted files - - - - - 5e51a247 by Mateusz Kowalczyk at 2014-08-31T14:18:44+01:00 Make the doc parser not complain - - - - - 2cedb49a by Mateusz Kowalczyk at 2014-09-03T03:33:15+01:00 CONTRIBUTING file for issues - - - - - 88027143 by Mateusz Kowalczyk at 2014-09-04T00:46:59+01:00 Mention --print-missing-docs - - - - - 42f6754f by Alan Zimmerman at 2014-09-05T18:13:24-05:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e712719e by Austin Seipp at 2014-09-09T01:03:27-05:00 Fix import of 'empty' due to AMP. Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 71c29755 by Herbert Valerio Riedel at 2014-09-09T17:35:20+02:00 Bump `base` constraint for AMP - - - - - 0bf9f3ed by Mateusz Kowalczyk at 2014-09-12T19:18:32+01:00 Delete stale ANNOUNCE - - - - - cac89ee6 by Krzysztof Gogolewski at 2014-09-14T17:17:09+02:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 4d683426 by Edward Z. Yang at 2014-09-18T13:38:11-07:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 80697fd5 by Herbert Valerio Riedel at 2014-09-19T00:07:52+02:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. - - - - - c015eb70 by Herbert Valerio Riedel at 2014-09-19T00:10:36+02:00 Revert "Followup changes to addition of -fwarn-context-quantification" This reverts commit 4023817d7c0e46db012ba2eea28022626841ca9b temporarily as the respective feature hasn't landed in GHC HEAD yet, but this commit blocks later commits from being referenced in GHC HEAD. - - - - - 38ded784 by Edward Z. Yang at 2014-09-18T15:32:15-07:00 Revert "Revert "Followup changes to addition of -fwarn-context-quantification"" This reverts commit db14fd8ab4fab43694139bc203808b814eafb2dc. It's in HEAD now. - - - - - f55d59c9 by Herbert Valerio Riedel at 2014-09-26T19:18:28+02:00 Revert "Fix import of 'empty' due to AMP." This reverts commit 0cc5bc85e9fca92ab712b68a2ba2c0dd9d3d79f4 since it turns out we don't need to re-export `empty` from Control.Monad after all. - - - - - 467050f1 by David Feuer at 2014-10-09T20:07:36-04:00 Fix improper lazy IO use Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. - - - - - cc47b699 by Edward Z. Yang at 2014-10-09T21:38:19-07:00 Fix use-after-close lazy IO bug Make `getPrologue` force `parseParas dflags str` before returning. Without this, it will attempt to read from the file after it is closed, with unspecified and generally bad results. Signed-off-by: David Feuer <David.Feuer at gmail.com> Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 87babcbe by Austin Seipp at 2014-10-20T20:05:27-05:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - ab259516 by Austin Seipp at 2014-10-20T20:07:01-05:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - b918093c by Mateusz Kowalczyk at 2014-10-29T03:59:39+00:00 Experimental support for collapsable headers Closes haskell/haddock#335 - - - - - 849db129 by Mateusz Kowalczyk at 2014-10-29T10:07:26+01:00 Experimental support for collapsable headers (cherry picked from commit e2ed3b9d8dfab09f1b1861dbc8e74f08e137ebcc) - - - - - a4cc4789 by Herbert Valerio Riedel at 2014-10-31T11:08:26+01:00 Collapse user-defined section by default (re haskell/haddock#335) - - - - - 9da1b33e by Yuras Shumovich at 2014-10-31T16:11:04-05:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - c625aefc by Austin Seipp at 2014-10-31T19:34:10-05:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - c7738e5e by Simon Hengel at 2014-11-02T07:25:30+08:00 Remove -fobject-code from .ghci (this slows down reloads on modifications) - - - - - d4a86e95 by Simon Hengel at 2014-11-03T09:26:11+08:00 Get rid of StandaloneDeriving - - - - - a974e311 by Simon Hengel at 2014-11-03T09:26:11+08:00 Derive more instances - - - - - 8aa0c4d7 by Simon Hengel at 2014-11-03T09:27:08+08:00 Remove unused language extensions - - - - - 3052d46a by Simon Hengel at 2014-11-03T09:30:46+08:00 Minor refactoring - - - - - 4281d3cb by Simon Hengel at 2014-11-03T09:30:46+08:00 parser: Try to parse definition lists right before text paragraphs - - - - - 8ba12bf9 by Simon Hengel at 2014-11-03T09:34:19+08:00 Add support for markdown links (closes haskell/haddock#336) - - - - - a2f8d747 by Simon Hengel at 2014-11-03T09:34:19+08:00 Allow markdown links at the beginning of a paragraph - - - - - 53b11207 by Simon Hengel at 2014-11-03T09:34:20+08:00 Update documentation - - - - - 652267c6 by Simon Hengel at 2014-11-03T09:34:20+08:00 Add support for markdown images - - - - - 9d667502 by Simon Hengel at 2014-11-03T09:34:20+08:00 Allow an optional colon after the closing bracket of definition lists This is to disambiguate them from markdown links and will be require with a future release. - - - - - 8167fc32 by Mateusz Kowalczyk at 2014-11-04T01:16:51+00:00 whitespace only - - - - - 3da62981 by Mateusz Kowalczyk at 2014-11-04T01:17:31+00:00 Fix re-exports of built-in type families Fixes haskell/haddock#310 - - - - - edc76b34 by Mateusz Kowalczyk at 2014-11-04T02:54:28+00:00 Turn some uses of error into recoverable warnings This should at the very least not abort when something weird happens. It does feel like we should have a type that carries these errors until the end however as the user might not see them unless they are printed at the end. - - - - - 0a137400 by Mateusz Kowalczyk at 2014-11-04T04:09:44+00:00 Fix warnings - - - - - d068fc21 by Mateusz Kowalczyk at 2014-11-04T21:04:07+00:00 Fix parsing of identifiers written in infix way - - - - - 1a9f2f3d by Simon Hengel at 2014-11-08T11:32:42+08:00 Minor code simplification - - - - - 6475e9b1 by Simon Hengel at 2014-11-08T17:28:33+08:00 newtype-wrap parser monad - - - - - dc1ea105 by Herbert Valerio Riedel at 2014-11-15T11:55:43+01:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - fbb1aca4 by Simon Hengel at 2014-11-16T08:51:38+08:00 State intention rather than implementation details in Haddock comment - - - - - 97851ab2 by Simon Hengel at 2014-11-16T10:20:19+08:00 (wip) Add support for @since (closes haskell/haddock#26) - - - - - 34bcd18e by Gergő Érdi at 2014-11-20T22:35:38+08:00 Update Haddock to new pattern synonym type signature syntax - - - - - 304b7dc3 by Jan Stolarek at 2014-11-20T17:48:43+01:00 Follow changes from haskell/haddock#9812 - - - - - 920f9b03 by Richard Eisenberg at 2014-11-20T16:52:50-05:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 0bfe4e78 by Alan Zimmerman at 2014-11-21T11:23:09-06:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 356ed45a by Thomas Winant at 2014-11-28T16:11:22-06:00 Support for PartialTypeSignatures - - - - - 5dc8f3b1 by Gergő Érdi at 2014-11-29T15:39:09+08:00 For pattern synonyms, render "pattern" as a keyword - - - - - fe704480 by Mateusz Kowalczyk at 2014-12-09T03:38:32+00:00 List new module in cabal file - - - - - b9ad5a29 by Mateusz Kowalczyk at 2014-12-10T00:58:24+00:00 Allow the parser to spit out meta-info Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes haskell/haddock#26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves. - - - - - 765af0e3 by Mateusz Kowalczyk at 2014-12-10T01:17:19+00:00 Update doctest parts of comments - - - - - 8670272b by jpmoresmau at 2014-12-10T01:35:31+00:00 header could contain several lines Closes haskell/haddock#348 - - - - - 4f9ae4f3 by Mateusz Kowalczyk at 2014-12-12T06:22:31+00:00 Revert "Merge branch 'reverts'" This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - e974ac94 by Duncan Coutts at 2014-12-12T06:26:11+00:00 Changes due to ghc api changes in package representation Also fix a bug with finding the package name and version given a module. This had become wrong due to the package key changes (it was very hacky in the first place). We now look up the package key in the package db to get the package info properly. Conflicts: haddock-api/src/Haddock.hs - - - - - 2f3a2365 by Herbert Valerio Riedel at 2014-12-12T06:26:51+00:00 Import Data.Word w/o import-list This is needed to keep the compilation warning free (and thus pass GHC's ./validate) regardless of whether Word is re-exported from Prelude or not See https://ghc.haskell.org/trac/ghc/ticket/9531 for more details - - - - - 1dbd6390 by Alan Zimmerman at 2014-12-12T06:32:07+00:00 Follow changes to TypeAnnot in GHC HEAD Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - bb6ff1f4 by Mateusz Kowalczyk at 2014-12-12T06:35:07+00:00 Bump ‘base’ constraint Follows the similar commit made on ghc-head branch - - - - - 466fe4ab by Krzysztof Gogolewski at 2014-12-12T06:37:42+00:00 Followup changes to addition of -fwarn-context-quantification (GHC Trac haskell/haddock#4426) - - - - - 97e080c9 by Edward Z. Yang at 2014-12-12T06:39:35+00:00 Properly render package ID (not package key) in index, fixes haskell/haddock#329. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> Conflicts: haddock-api/src/Haddock/ModuleTree.hs - - - - - 20b2af56 by Herbert Valerio Riedel at 2014-12-12T06:42:50+00:00 Disambiguate string-literals GHC fails type-inference with `OverloadedStrings` + `Data.Foldable.elem` otherwise. Conflicts: haddock-library/src/Documentation/Haddock/Parser.hs - - - - - b3ad269d by Austin Seipp at 2014-12-12T06:44:14+00:00 Add an .arcconfig file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - 072df0dd by Austin Seipp at 2014-12-12T06:45:01+00:00 Add .arclint file. Signed-off-by: Austin Seipp <austin at well-typed.com> - - - - - dbb9294a by Herbert Valerio Riedel at 2014-12-12T06:46:17+00:00 Collapse user-defined section by default (re haskell/haddock#335) Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs - - - - - f23ab545 by Yuras Shumovich at 2014-12-12T06:46:41+00:00 reflect ForeignType constructore removal Reviewers: austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D358 - - - - - 753a4b67 by Austin Seipp at 2014-12-12T06:46:51+00:00 Remove overlapping pattern match Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8954e8f5 by Herbert Valerio Riedel at 2014-12-12T06:50:53+00:00 Make compatible with `deepseq-1.4.0.0` ...by not relying on the default method implementation of `rnf` - - - - - d2b06d61 by Gergő Érdi at 2014-12-12T07:07:30+00:00 Update Haddock to new pattern synonym type signature syntax Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 1ff02426 by Jan Stolarek at 2014-12-12T07:13:24+00:00 Follow changes from haskell/haddock#9812 Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - 06ad7600 by Richard Eisenberg at 2014-12-12T07:13:43+00:00 Changes to reflect refactoring in GHC as part of haskell/haddock#7484 - - - - - 8fd2aa8b by Alan Zimmerman at 2014-12-12T07:22:25+00:00 Follow API changes in D426 Signed-off-by: Austin Seipp <aseipp at pobox.com> Conflicts: haddock-api/src/Haddock/Backends/LaTeX.hs haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs - - - - - 95c3db98 by Thomas Winant at 2014-12-12T07:35:49+00:00 Support for PartialTypeSignatures Conflicts: haddock-api/src/Haddock/Backends/Xhtml/Decl.hs haddock-api/src/Haddock/Convert.hs haddock-api/src/Haddock/Interface/Create.hs - - - - - 45494428 by Gergő Érdi at 2014-12-12T07:36:18+00:00 For pattern synonyms, render "pattern" as a keyword - - - - - a237e3eb by Mateusz Kowalczyk at 2014-12-12T12:27:13+00:00 Various fixups and bumps for next release - - - - - 22918bcd by Herbert Valerio Riedel at 2014-12-14T10:11:47+01:00 Remove redundant wild-card pattern match (this would otherwise cause a build-failure with `-Werror`) - - - - - 1d6ce947 by Herbert Valerio Riedel at 2014-12-14T10:17:06+01:00 Treat GHC 7.10 the same as GHC 7.9 ...since the current GHC 7.9 is going to become GHC 7.10 real-soon-now anyway - - - - - f434ea89 by Herbert Valerio Riedel at 2014-12-14T18:26:50+01:00 Fixup ghc.mk (follow-up to 1739375eb23342) This makes the GHC build-system aware of the data-files to be copied into the bindist (as haddock.cabal doesn't list those anymore) - - - - - 6fb839eb by Mateusz Kowalczyk at 2014-12-17T09:28:59+00:00 Only keep one Version instead of blindly appending - - - - - 40645489 by Mateusz Kowalczyk at 2014-12-18T07:09:44+00:00 Fix dependency version - - - - - 8b3b927b by Mateusz Kowalczyk at 2014-12-18T07:14:23+00:00 Print missing docs by default Adds --no-print-missing-docs - - - - - 59666694 by Mateusz Kowalczyk at 2014-12-18T07:21:37+00:00 update changelog - - - - - aa6d168e by Mateusz Kowalczyk at 2014-12-18T07:30:58+00:00 Update docs for @since - - - - - 2d7043ee by Luite Stegeman at 2014-12-19T18:29:35-06:00 hide projectVersion from DynFlags since it clashes with Haddock.Version.projectVersion - - - - - aaa70fc0 by Luite Stegeman at 2014-12-22T15:58:43+01:00 Add missing import for standalone haddock-api package - - - - - 9ce01269 by Herbert Valerio Riedel at 2014-12-22T17:48:45+01:00 Reset ghc-head with master's tree (this is an overwriting git merge of master into ghc-head) - - - - - fcd6fec1 by Herbert Valerio Riedel at 2014-12-22T17:51:52+01:00 Bump versions for ghc-7.11 - - - - - 525ec900 by Mateusz Kowalczyk at 2014-12-23T13:36:24+00:00 travis-ci: test with HEAD - - - - - cbf494b5 by Simon Peyton Jones at 2014-12-23T15:22:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 50e01c99 by Mateusz Kowalczyk at 2014-12-29T15:28:47+00:00 Make travis use 7.10.x - - - - - 475e60b0 by Njagi Mwaniki at 2014-12-29T15:30:44+00:00 Turn the README into GitHub Markdown format. Closes haskell/haddock#354 - - - - - 8cacf48e by Luite Stegeman at 2015-01-05T16:25:37+01:00 bump haddock-api ghc dependency to allow release candidate and first release - - - - - 6ed6cf1f by Simon Peyton Jones at 2015-01-06T16:37:47+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 8b484f33 by Simon Peyton Jones at 2015-01-08T15:50:22+00:00 Track naming change in DataCon - - - - - 23c5c0b5 by Alan Zimmerman at 2015-01-16T10:15:11-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - e7a5532c by JP Moresmau at 2015-01-22T17:19:03+00:00 Ignore warnings, install Cabal 1.22 - - - - - 86942c84 by jpmoresmau at 2015-01-22T17:19:04+00:00 solve dataDir ambiguity - - - - - 5ceb743e by jpmoresmau at 2015-01-22T19:17:32+00:00 support GHC 7.10: no Safe-Inferred, Foldable instance - - - - - 6a3b3fb5 by Mateusz Kowalczyk at 2015-01-22T19:32:10+00:00 Update test files Test: a correct behaviour for fields comma-separating values. I'm surprised we had no bug open for this. Maybe it affects how haskell/haddock#301 renders now but I doubt. Operators: Seems GHC is giving us a new order for operators, something must have changed on their side again. cc @haasn , this makes the fixity to the side not match the order on the LHS which is a bit unpleasant. Maybe the fixity can be made to match the GHC order? Bug335: We expand examples by default now. Bug310: Now inferred safe. - - - - - 708f8b2f by jpmoresmau at 2015-01-22T19:36:59+00:00 Links to source location of class instance definitions - - - - - 5cf8a6da by Vincent Berthoux at 2015-01-22T19:59:58+00:00 Filter '\r' from comments due to Windows problems. On Windows this was causing newline to be rendered twice in code blocks. Closes haskell/haddock#359, fixes haskell/haddock#356. - - - - - 1749e6f0 by Mateusz Kowalczyk at 2015-01-22T20:31:27+00:00 Changelog only - - - - - c8145f90 by Mateusz Kowalczyk at 2015-01-22T23:34:05+00:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. - - - - - 14248254 by Mateusz Kowalczyk at 2015-01-22T23:43:18+00:00 Sort out some module import warnings - - - - - d8a38989 by Simon Peyton Jones at 2015-01-23T07:10:16-06:00 Track naming change in DataCon (cherry picked from commit 04cf63d0195837ed52075ed7d2676e71831e8a0b) - - - - - d3ac6ae4 by Alan Zimmerman at 2015-01-23T07:17:19-06:00 Follow API changes in D538 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit d61bbc75890e4eb0ad508b9c2a27b91f691213e6) - - - - - 4c1ffeb0 by Simon Peyton Jones at 2015-02-10T12:10:33+00:00 Track changes in HsSyn for quasi-quotes - - - - - 775d20f7 by Mateusz Kowalczyk at 2015-03-15T08:11:48+01:00 --package-name and --package-version flags Used for --hoogle amongst other things. Now we need to teach cabal to use it. The situation is still a bit sub-par because if the flags aren't passed in, the crash will occur. Closes haskell/haddock#353. (cherry picked from commit 8e06728afb0784128ab2df0be7a5d7a191d30ff4) - - - - - f9245e72 by Phil Ruffwind at 2015-03-16T04:32:01-04:00 Prevent Synopsis from using up too much horizontal space When long type signatures occur in the Synopsis, the element is stretched beyond the width of the window. Scrollbars don't appear, so it's impossible to read anything when this happens. - - - - - cd8fa415 by Mateusz Kowalczyk at 2015-03-17T21:59:39+00:00 Update changelog Closes haskell/haddock#151 due to 71170fc77962f10d7d001e3b8bc8b92bfeda99bc - - - - - b5248b47 by Ben Gamari at 2015-03-25T17:12:17+00:00 Make the error encountered when a package can't be found more user-friendly Closes haskell/haddock#369 - - - - - b756b772 by Mateusz Kowalczyk at 2015-03-26T16:31:40+00:00 Remove now redundant imports - - - - - 5ea5e8dd by Mateusz Kowalczyk at 2015-03-26T16:45:52+00:00 Update test to account for \r filtering - - - - - 6539bfb3 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Test for anchor defaulting I delete the old tests because it turns out that: * test runner would never put them in scope of each other even with imports so just one would suffice * test runner actually needed some hacking to keep links so in the end we would end up with no anchors making them useless - - - - - 1a01d950 by Mateusz Kowalczyk at 2015-03-27T00:20:09+00:00 Clearly default to variables in out of scope case - - - - - 7943abe8 by Mateusz Kowalczyk at 2015-03-27T01:14:11+00:00 Fix Hoogle display of constructors Fixes haskell/haddock#361 - - - - - 6d6e587e by Mateusz Kowalczyk at 2015-03-27T01:45:18+00:00 Fully qualify names in Hoogle instances output Closes haskell/haddock#263 - - - - - 52dac365 by Mateusz Kowalczyk at 2015-03-27T01:55:01+00:00 Update changelog - - - - - ca5af9a8 by Mateusz Kowalczyk at 2015-03-27T02:43:55+00:00 Output method documentation in Hoogle backend One thing of note is that we no longer preserve grouping of methods and print each method on its own line. We could preserve it if no documentation is present for any methods in the group if someone asks for it though. Fixes haskell/haddock#259 - - - - - a33f0c10 by Mateusz Kowalczyk at 2015-03-27T03:04:21+00:00 Don't print instance safety information in Hoogle Fixes haskell/haddock#168 - - - - - df6c935a by Mateusz Kowalczyk at 2015-03-28T00:11:47+00:00 Post-release version bumps and changelog - - - - - dde8f7c0 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Loosen bounds on haddock-* - - - - - de93bf89 by Mateusz Kowalczyk at 2015-03-28T20:39:10+00:00 Expand response files in arguments Closes haskell/haddock#285 - - - - - 1f0b0856 by Zejun Wu at 2015-04-26T16:35:35-07:00 Do not insert anchor for section headings in contents box - - - - - 860439d7 by Simon Peyton Jones at 2015-05-01T09:36:47+01:00 Track change in API of TyCon - - - - - a32f3e5f by Adam Gundry at 2015-05-04T15:32:59+01:00 Track API changes to support empty closed type familes - - - - - 77e98bee by Ben Gamari at 2015-05-06T20:17:08+01:00 Ignore doc/haddock.{ps,pdf} - - - - - 663d0204 by Murray Campbell at 2015-05-11T04:47:37-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> - - - - - 8bb0dcf5 by Murray Campbell at 2015-05-11T06:35:06-05:00 Change ModuleTree Node to carry PackageKey and SourcePackageId to resolve haskell/haddock#385 Signed-off-by: Austin Seipp <aseipp at pobox.com> (cherry picked from commit 2380f07c430c525b205ce2eae6dab23c8388d899) - - - - - bad900ea by Adam Bergmark at 2015-05-11T15:29:39+01:00 haddock-library: require GHC >= 7.4 `Data.Monoid.<>` was added in base-4.5/GHC-7.4 Closes haskell/haddock#394 Signed-off-by: Mateusz Kowalczyk <fuuzetsu at fuuzetsu.co.uk> - - - - - daceff85 by Simon Peyton Jones at 2015-05-13T12:04:21+01:00 Track the new location of setRdrNameSpace - - - - - 1937d1c4 by Alan Zimmerman at 2015-05-25T21:27:15+02:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - ee0fb6c2 by Łukasz Hanuszczak at 2015-05-27T11:51:31+02:00 Create simple method for indentation parsing. - - - - - 7d6fcad5 by Łukasz Hanuszczak at 2015-05-27T21:36:13+02:00 Make nested lists count indentation according to first item. - - - - - d6819398 by Łukasz Hanuszczak at 2015-05-27T22:46:13+02:00 Add simple test case for arbitrary-depth list nesting. - - - - - 2929c54d by Łukasz Hanuszczak at 2015-06-03T02:11:31+02:00 Add arbitrary-indent spec test for parser. - - - - - 9a0a9bb0 by Mateusz Kowalczyk at 2015-06-03T05:25:29+01:00 Update docs with info on new list nesting rule Fixes haskell/haddock#278 through commits from PR haskell/haddock#401 - - - - - 12efc92c by Mateusz Kowalczyk at 2015-06-03T05:29:26+01:00 Update some meta data at the top of the docs - - - - - 765ee49f by Bartosz Nitka at 2015-06-07T08:40:59-07:00 Add some Hacking docs for getting started - - - - - 19aaf851 by Bartosz Nitka at 2015-06-07T08:44:30-07:00 Fix markdown - - - - - 2a90cb70 by Mateusz Kowalczyk at 2015-06-08T15:08:36+01:00 Refine hacking instructions slightly - - - - - 0894da6e by Thomas Winant at 2015-06-08T23:47:28-05:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 10a9bb76 by Emanuel Borsboom at 2015-06-12T02:46:23+01:00 Build executable with '-threaded' (fixes haskell/haddock#399) - - - - - 7696b94f by Mateusz Kowalczyk at 2015-06-12T02:59:19+01:00 Update changelog for -threaded Closes haskell/haddock#400 - - - - - d3c118ec by Bartosz Nitka at 2015-06-12T03:00:58+01:00 Fix haddock: internal error: spliceURL UnhelpfulSpan (#207) Inferred type signatures don't have SrcSpans, so let's use the one from the declaration. I've tested this manually on the test-case from haskell/haddock#207, but I got stuck at trying to run the test-suite. - - - - - b67e843b by Mateusz Kowalczyk at 2015-06-12T03:01:50+01:00 Changelog for haskell/haddock#207 Fixes haskell/haddock#207, closes haskell/haddock#402 - - - - - 841d785e by jpmoresmau at 2015-06-12T16:03:16+01:00 Attach to instance location the name that has the same location file Fixes haskell/haddock#383 - - - - - 98791cae by Mateusz Kowalczyk at 2015-06-12T16:08:27+01:00 Update changelog Closes haskell/haddock#398 - - - - - 7c0b5a87 by Phil Ruffwind at 2015-06-12T13:07:25-04:00 Fix alignment of Source links in instance table in Firefox Due to a Firefox bug [1], a combination of 'whitespace: nowrap' on the parent element with 'float: right' on the inner element can cause the floated element to be displaced downwards for no apparent reason. To work around this, the left side is wrapped in its own <span> and set to 'float: left'. As a precautionary measure to prevent the parent element from collapsing entirely, we also add the classic "clearfix" hack. The latter is not strictly needed but it helps prevent bugs if the layout is altered again in the future. Fixes haskell/haddock#384. Remark: line 159 of src/Haddock/Backends/Xhtml/Layout.hs was indented to prevent confusion over the operator precedence of (<+>) vs (<<). [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=488725 - - - - - cfe86e73 by Mateusz Kowalczyk at 2015-06-14T10:49:01+01:00 Update tests for the CSS changes - - - - - 2d4983c1 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding for Haskell source parser module. - - - - - 29548785 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement function for tagging parsed chunks with source spans. - - - - - 6a5e4074 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement simple string chunking based on HsColour library. - - - - - 6e52291f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create basic token classification method. - - - - - da971a27 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Adapt source span tagging to work with current whitespace handling. - - - - - 4feb5a22 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add record accessors to exports of hyperlinker parser module. - - - - - a8cc4e39 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Make parser module export all types and associated accessors. - - - - - fb8d468f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple HTML renderer for parsed source file. - - - - - 80747822 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for specifying the CSS file path in HTML source renderer. - - - - - 994dc1f5 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix identifier recognition in Haskell source parser. - - - - - b1bd0430 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix comment recognition in Haskell source parser. - - - - - 11db85ae by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for recognizing compiler pragmas in source parser. - - - - - 736c7bd3 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create scaffolding of module for associating tokens with AST names. - - - - - 7e149bc2 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement utility method for extracting variable identifiers from AST. - - - - - 32eb640a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Create simple mechanism for associating tokens with AST names. - - - - - d4eba5bc by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add dummy support for hyperlinking named tokens. - - - - - 2b76141f by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matcher bug causing wrong items being hyperlinked. - - - - - 2d48002e by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Constrain elements exported by hyperlinker modules. - - - - - 9715eec6 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for type token recognition. - - - - - 8fa401cb by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Add support for binding token recognition. - - - - - d062400b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement go-to-definition mechanism for local bindings. - - - - - f4dc229b by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Implement module export- and import-list item hyperlinking. - - - - - c9a46d58 by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix span matching to allow parenthesized operators hyperlinking. - - - - - 03aad95a by Łukasz Hanuszczak at 2015-06-30T22:37:48+02:00 Fix weird hyperlinking of parenthesized operators. - - - - - b4694a7d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for type declaration anchors. - - - - - 7358d2d2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for top-level function declaration anchors. - - - - - dfc24b24 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix external anchors to contain HTML file extension. - - - - - a045926c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Refactor the way AST names are handled within detailed tokens. - - - - - c76049b4 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement hyperlinking of imported module names. - - - - - 2d2a1572 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix parsing of single line comments with broken up newlines. - - - - - 11afdcf2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix bug with improper newline handling. - - - - - 8137f104 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issues with escaped newlines in comments. - - - - - 34759b19 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for parsing C preprocessor macros. - - - - - 09f0f847 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for parser module of source hyperlinker. - - - - - 709a8389 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add some documentation for AST module of source hyperlinker. - - - - - 4df5c227 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add command line option for generating hyperlinked source. - - - - - 7a755ea2 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Extend module interface with rich source token stream field. - - - - - 494f4ab1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement source tokenization during interface creation process. - - - - - 5f21c953 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create hyperlinker module and plug it into the Haddock pipeline. - - - - - 0cc8a216 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for providing custom CSS files for hyperlinked source. - - - - - a32bbdc1 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add support for fancy highlighting upon hovering over identifier. - - - - - d16d642a by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make source hyperlinker generate output in apropriate directory. - - - - - ae12953d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Create module with hyperlinker utility functions. - - - - - 6d4952c5 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make external hyperlinks point to locations specified by source URLs. - - - - - 8417555d by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Rewrite source generation to fixed links and directory structure. - - - - - ce9cec01 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Add basic support for cross-package hyperlink generation. - - - - - 7eaf025c by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Disable generating hyperlinks for module references. - - - - - a50bf92e by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make Haddock generate source for all interfaces (also hidden ones). - - - - - f5ae2838 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Prevent source parser from throwing exception when lexing fails. - - - - - db9ffbe0 by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Implement workaround for Chrome highlighting issues. - - - - - 0b6b453b by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate correct anchors for data constructors. - - - - - c86d38bc by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Make hyperlinker generate anchors for record field declarations. - - - - - 063abf7f by Łukasz Hanuszczak at 2015-06-30T22:37:49+02:00 Fix issue with hyperlink highlight styling in Chrome browser. - - - - - 880fc611 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking constructor names in patters. - - - - - c9e89b95 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record patterns. - - - - - 17a11996 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add support for hyperlinking field names in record expressions. - - - - - 0eef932d by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Make hyperlinker respect pretty-printer flag and add documentation. - - - - - f87c1776 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Unexpose hyperlinker modules in Cabal configuration. - - - - - 4c9e2b06 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Setup HSpec framework for Haddock API package. - - - - - 4b20cb30 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add basic tests related to comment parsing. - - - - - 6842e919 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add tests related to parsing basic language constructs. - - - - - 87bffb35 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add simple tests for do-notation parsing. - - - - - e7af1841 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add very simple QuickCheck properties for source parser spec. - - - - - c84efcf1 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Create simple test runner for hyperlinker tests. - - - - - 76b90447 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for basic identifier hyperlinking. - - - - - 0fbf4df6 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for operator hyperlinking. - - - - - 731aa039 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for constructor hyperlinking. - - - - - 995a78a2 by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for record expressions and patterns hyperlinking. - - - - - 3566875a by Łukasz Hanuszczak at 2015-06-30T22:37:50+02:00 Add test case for literal syntax highlighting. - - - - - 68469a35 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add hyperlinker test runner to .cabal and .gitignore files. - - - - - aa946c93 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Adapt hyperlinker test runner to have the same interface as HTML one. - - - - - ce34da16 by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Fix hyperlinker test runner file paths and add pretty-printing option. - - - - - 0d7dd65e by Łukasz Hanuszczak at 2015-06-30T22:38:33+02:00 Add reference files for hyperlinker test cases. - - - - - efa4a1e0 by Łukasz Hanuszczak at 2015-07-01T00:47:32+02:00 Make hyperlinker test runner strip local links from generated source. - - - - - 3e96e584 by Łukasz Hanuszczak at 2015-07-01T01:14:59+02:00 Create simple script for accepting hyperlinker test case references. - - - - - 526fe610 by Łukasz Hanuszczak at 2015-07-01T01:16:41+02:00 Re-accept hyperlinker test cases with local references stripped out. - - - - - 892e2cb3 by Łukasz Hanuszczak at 2015-07-01T01:22:09+02:00 Fix bug with diffing wrong files in hyperlinker test runner. - - - - - 9ff46039 by Łukasz Hanuszczak at 2015-07-01T18:04:46+02:00 Remove unused dependencies in Haddock API spec configuration. - - - - - 47969c07 by Łukasz Hanuszczak at 2015-07-01T18:32:19+02:00 Add support for hyperlinking synonyms in patterns. - - - - - a73449e0 by Łukasz Hanuszczak at 2015-07-01T18:33:44+02:00 Create test case for hyperlinking @-patterns. - - - - - c2077ed8 by Łukasz Hanuszczak at 2015-07-01T19:06:04+02:00 Add support for hyperlinking universally quantified type variables. - - - - - 68017342 by Łukasz Hanuszczak at 2015-07-01T19:28:32+02:00 Create hyperlinker test case with quantified type variables. - - - - - 51c01a78 by Łukasz Hanuszczak at 2015-07-01T19:34:22+02:00 Add scoped type variables test for polymorphism test case. - - - - - 13181ae2 by Łukasz Hanuszczak at 2015-07-01T19:56:27+02:00 Add record wildcards test for records hyperlinking test case. - - - - - 991b81dd by Łukasz Hanuszczak at 2015-07-01T21:01:42+02:00 Document some functions in XHTML utlity module. - - - - - 98c8dfe5 by Łukasz Hanuszczak at 2015-07-01T22:25:21+02:00 Make hyperlinker render qualified names as one entity. - - - - - 75e13b9b by Łukasz Hanuszczak at 2015-07-01T22:27:38+02:00 Add qualified name test for identifiers hyperlinking test case. - - - - - de1e143f by Łukasz Hanuszczak at 2015-07-02T12:32:59+02:00 Fix crash happening when hyperlinking type family declarations. - - - - - 7a8fb175 by Łukasz Hanuszczak at 2015-07-02T12:47:03+02:00 Add support for anchoring data family constructor declarations. - - - - - 3b404e49 by Łukasz Hanuszczak at 2015-07-02T13:31:05+02:00 Improve support for hyperlinking type families. - - - - - 59eb7143 by Łukasz Hanuszczak at 2015-07-02T13:33:34+02:00 Add hyperlinker test case for checking type and type family declarations. - - - - - d1cda0c0 by Łukasz Hanuszczak at 2015-07-02T13:41:38+02:00 Fix issue with operators being recognized as preprocessor directives. - - - - - da206c9d by Łukasz Hanuszczak at 2015-07-02T17:18:12+02:00 Fix broken tests for parsing and hyperlinking hash operators. - - - - - 53750d1b by Łukasz Hanuszczak at 2015-07-02T18:53:28+02:00 Add support for anchoring signatures in type class declarations. - - - - - 1fa5bb10 by Łukasz Hanuszczak at 2015-07-02T19:04:47+02:00 Make hyperlinker generate anchors only to top-level value bindings. - - - - - a542305c by Łukasz Hanuszczak at 2015-07-02T19:05:58+02:00 Create hyperlinker test case for type classes. - - - - - b0dd4581 by Łukasz Hanuszczak at 2015-07-04T16:28:26+02:00 Update docs with information about source hyperlinking. - - - - - 9795302a by Łukasz Hanuszczak at 2015-07-04T16:52:15+02:00 Update docs on using `--read-interface` option. - - - - - 9acdc002 by Łukasz Hanuszczak at 2015-07-04T17:15:26+02:00 Remove potentially dangerous record access in hyperlinker AST module. - - - - - fb3ab7be by Łukasz Hanuszczak at 2015-07-04T17:40:10+02:00 Make Haddock generate warnings about potential misuse of hyperlinker. - - - - - a324c504 by Łukasz Hanuszczak at 2015-07-04T17:43:22+02:00 Fix incorrect specification of source style option in doc file. - - - - - 3f01a8e4 by Łukasz Hanuszczak at 2015-07-05T17:06:36+02:00 Refactor source path mapping to use modules as indices. - - - - - ac70f5b1 by Łukasz Hanuszczak at 2015-07-05T17:47:34+02:00 Fix bug where not all module interfaces were added to source mapping. - - - - - f5e57da9 by Łukasz Hanuszczak at 2015-07-06T16:39:57+02:00 Extract main hyperlinker types to separate module. - - - - - 43974905 by Łukasz Hanuszczak at 2015-07-06T16:52:13+02:00 Move source paths types to hyperlinker types module. - - - - - 3e236055 by Łukasz Hanuszczak at 2015-07-06T17:06:19+02:00 Add support for hyperlinking modules in import lists. - - - - - 58233d9f by Łukasz Hanuszczak at 2015-07-06T17:26:49+02:00 Add short documentation for hyperlinker source map type. - - - - - 14da016d by Łukasz Hanuszczak at 2015-07-06T18:07:20+02:00 Fix bug with module name being hyperlinked to `Prelude`. - - - - - 8f79db52 by Łukasz Hanuszczak at 2015-07-06T18:23:47+02:00 Fix problem with spec build in Haddock API configuration. - - - - - e7cc056c by Adam Sandberg Eriksson at 2015-07-07T23:22:21+01:00 StrictData: print correct strictness marks - - - - - e8253ca8 by Mateusz Kowalczyk at 2015-07-07T23:58:28+01:00 Update changelog - - - - - 0aba676b by Mateusz Kowalczyk at 2015-07-07T23:58:33+01:00 Relax upper bound on GHC a bit - - - - - 7a595381 by Mateusz Kowalczyk at 2015-07-07T23:58:52+01:00 Delete trailing whitespace - - - - - 50976d5e by Adam Sandberg Eriksson at 2015-07-08T15:03:04+02:00 StrictData: changes in HsBang type - - - - - 83b045fa by Mateusz Kowalczyk at 2015-07-11T14:35:18+01:00 Fix expansion icon for user-collapsible sections Closes haskell/haddock#412 - - - - - b2a3b0d1 by Mateusz Kowalczyk at 2015-07-22T22:03:21+01:00 Make some version changes after 2.16.1 release - - - - - a8294423 by Ben Gamari at 2015-07-27T13:16:07+02:00 Merge pull request haskell/haddock#422 from adamse/adamse-D1033 Merge for GHC D1033 - - - - - c0173f17 by randen at 2015-07-30T14:49:08-07:00 Break the response file by line termination rather than spaces, since spaces may be within the parameters. This simple approach avoids having the need for any quoting and/or escaping (although a newline char will not be possible in a parameter and has no escape mechanism to allow it). - - - - - 47c0ca14 by Alan Zimmerman at 2015-07-31T10:41:52+02:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - 45a9d770 by Mateusz Kowalczyk at 2015-07-31T09:47:43+01:00 Update changelog - - - - - 347a20a3 by Phil Ruffwind at 2015-08-02T23:15:26+01:00 Avoid JavaScript error during page load in non-frame mode In non-frame mode, parent.window.synopsis refers to the synopsis div rather than the nonexistent frame. Unfortunately, the script wrongly assumes that if it exists it must be a frame, leading to an error where it tries to access the nonexistent attribute 'replace' of an undefined value (synopsis.location). Closes haskell/haddock#406 - - - - - 54ebd519 by Phil Ruffwind at 2015-08-02T23:27:10+01:00 Link to the definitions to themselves Currently, the definitions already have an anchor tag that allows URLs with fragment identifiers to locate them, but it is rather inconvenient to obtain such a URL (so-called "permalink") as it would require finding the a link to the corresponding item in the Synopsis or elsewhere. This commit adds hyperlinks to the definitions themselves, allowing users to obtain links to them easily. To preserve the original aesthetics of the definitions, we alter the color of the link so as to be identical to what it was, except it now has a hover effect indicating that it is clickable. Additionally, the anchor now uses the 'id' attribute instead of the (obsolete) 'name' attribute. Closes haskell/haddock#407 - - - - - 02cc8bb7 by Phil Ruffwind at 2015-08-02T23:28:02+01:00 Fix typo in Haddock.Backends.Xhtml.Layout: divSynposis -> divSynopsis Closes haskell/haddock#408 - - - - - 2eb0a458 by Phil Ruffwind at 2015-08-02T23:30:07+01:00 Fix record field alignment when name is too long Change <dl> to <ul> and use display:table rather than floats to layout the record fields. This avoids bug haskell/haddock#301 that occurs whenever the field name gets too long. Slight aesthetic change: the entire cell of the field's source code is now shaded gray rather than just the area where text exists. Fixes haskell/haddock#301. Closes haskell/haddock#421 - - - - - 7abb3402 by Łukasz Hanuszczak at 2015-08-02T23:32:14+01:00 Add some utility definitions for generating line anchors. - - - - - e0b1d79b by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Make hyperlinked source renderer generate line anchors. - - - - - 24dd4c9f by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Re-accept test cases after adding line anchors for each of them. - - - - - 0372cfcb by Łukasz Hanuszczak at 2015-08-02T23:32:15+01:00 Override source line flags when source hyperlinker is enabled. - - - - - a81bcd07 by Mateusz Kowalczyk at 2015-08-02T23:58:25+01:00 Update tests to follow HTML changes - - - - - d2d7426f by Łukasz Hanuszczak at 2015-08-06T20:54:59+02:00 Fix quote syntax for promoted types. - - - - - 668cf029 by Łukasz Hanuszczak at 2015-08-06T21:12:00+02:00 Apply promoted type quoting to type-level consing. - - - - - 89f8e7c6 by Łukasz Hanuszczak at 2015-08-06T21:17:10+02:00 Extend advanced types test case with other examples. - - - - - 86494bca by Łukasz Hanuszczak at 2015-08-06T21:22:06+02:00 Rename advanced types test case and accept new output. - - - - - dbb7c7c0 by Adam Sandberg Eriksson at 2015-08-09T23:01:05+02:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 2a7704fa by Ben Gamari at 2015-08-10T13:18:05+02:00 Merge pull request haskell/haddock#433 from adamse/split-hsbang HsBang is split into HsSrcBang and HsImplBang - - - - - 891954bc by Thomas Miedema at 2015-08-15T14:51:18+02:00 Follow changes in GHC build system - - - - - b55d32ab by Mateusz Kowalczyk at 2015-08-21T18:06:09+01:00 Make Travis use 7.10.2 - - - - - 97348b51 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Move SYB utilities to standalone module. - - - - - 748ec081 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement `everywhere` transformation in SYB module. - - - - - 011cc543 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Implement generic transformation constructor. - - - - - b9510db2 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Create simple utility module for type specialization. - - - - - 43229fa6 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Make type of type specialization function more general. - - - - - fd844e90 by Łukasz Hanuszczak at 2015-08-21T18:22:29+01:00 Add basic HTML test case for checking instance specialization. - - - - - 6ea0ad04 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Make HTML class instance printer take optional signature argument. - - - - - 65aa41b6 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Refactor instance head type to record instead of a meaningless tuple. - - - - - 3fc3bede by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add expandable method section for each class instance declaration. - - - - - 99ceb107 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Move dummy post-family instances for `DocName` to `Types` module. - - - - - e98f4708 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create convenience functions for type specialization module. - - - - - b947552f by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Hook type specialization logic with HTML pretty-printer. - - - - - dcaa8030 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create stub functions for sugaring specialized types. - - - - - fa84bc65 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement list syntax sugaring logic for specialized types. - - - - - e8b05b07 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement tuple syntax sugaring logic for specialized types. - - - - - 68a2e5bc by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Get rid of code duplication in type specialization module. - - - - - 4721c336 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create scaffolding of a framework for renaming specialized types. - - - - - 271b488d by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in missing cases in specialized type renaming function. - - - - - bfa5f2a4 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Remove code duplication in specialized type renamer. - - - - - ea6bd0e8 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Change state of the type renaming monad. - - - - - 77c5496e by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Implement simple mechanism for generating new type names. - - - - - 91bfb48b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fill in stub behaviour with actual environment renaming. - - - - - d244517b by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix logic behind binder type renaming. - - - - - f3c5e360 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Add SYB-like utility function for performing stateful queries. - - - - - eb3f9154 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Create function for retrieving free variables from given type. - - - - - a94561d3 by Łukasz Hanuszczak at 2015-08-21T18:22:30+01:00 Fix compilation error caused by incorrect type signature. - - - - - 8bb707cf by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Move `SetName` class definition to types module. - - - - - 5800b13b by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Hook type renamer with instance method HTML pretty-printer. - - - - - 6a480164 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some test cases for type renamer. - - - - - 839842f7 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized signatures refer to original signature declaration. - - - - - 4880f7c9 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make specialized methods be nicely formatted again. - - - - - ab5a6a2e by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Attach source locations to the specialized class methods. - - - - - 43f8a559 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Extend instances test case to also test multi-name type signatures. - - - - - 59bc751c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix tab-based indentation in instances test case. - - - - - c2126815 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Improve placement of instance methods expander button. - - - - - 0a32e287 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add new data type declaration to instance specialization test case. - - - - - 5281af1f by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Make type renamer first try single-letter names as alternatives. - - - - - 7d509475 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix type renamer bug with incorrect names being generated. - - - - - 0f35bf7c by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Add some documentation and refactor type specialization module. - - - - - da1d0803 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix another bug where type renamer was generating incorrect names. - - - - - cd39b5cb by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Refactor type renamer to rebinding and pure renaming phases. - - - - - 850251f4 by Łukasz Hanuszczak at 2015-08-21T18:22:31+01:00 Fix unwitting compilation bug. - - - - - e5e9fc01 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Integrate instance specification type into class instance definition. - - - - - 825b0ea0 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer neccessary instance specification type. - - - - - cdba44eb by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix declaration converter to use more appropriate mode for methods. - - - - - bc45c309 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug with types not being specialized at all. - - - - - 5d8e5d89 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix bug where instance expander was opening wrong section. - - - - - 6001ee41 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix another type renamer bug where not all names were rebound. - - - - - 5f58ce2a by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Fix yet another renamer bug where some names were not unique. - - - - - 8265e521 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split instance subsection layout method to top-level declarations. - - - - - e5e66298 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Rearrange layout of instance methods in generated documentation. - - - - - a50b4eea by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Get rid of no longer used layout method. - - - - - 2ff36ec2 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach section title to the instance methods block. - - - - - 7ac15300 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Add basic tests for associated types in instances test case. - - - - - db0ea2f9 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Attach associated types information to instance header. - - - - - 71cad4d5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details section contain associated types information. - - - - - deee2809 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Improve look of rendered associated families in instance details. - - - - - 839d13a5 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Introduce alternative type for family declarations. - - - - - d397f03f by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Make instance details record use new type for family declarations. - - - - - 2b23fe97 by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Split printer of type family header to separate functions. - - - - - c3498cdc by Łukasz Hanuszczak at 2015-08-21T18:22:32+01:00 Implement HTML renderer for pseudo-family declarations. - - - - - c12bbb04 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Apply type specializer to associated type family declarations. - - - - - 2fd69ff2 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Create helper method for specializing type signatures. - - - - - 475826e7 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Refactor specializer module to be independent from XHTML backend. - - - - - f00b431c by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add some documentation for instance head specializer. - - - - - a9fef2dc by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix bug with missing space in documentation for associated types. - - - - - 50e29056 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with incorrect instance details sections being expanded. - - - - - e6dfdd03 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by adding instance details section. - - - - - 75565b2a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make section identifier of instance details more GHC-independent. - - - - - add0c23e by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Re-accept tests after applying deterministic section identifiers. - - - - - 878f2534 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Make identifier generation also architecture-independent. - - - - - 48be69f8 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Fix issue with instance expander hijacking type hyperlink click. - - - - - 47830c1f by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Get rid of dreadful hashing function for generating identifiers. - - - - - 956cd5af by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Move `InstOrigin` type declaration to more appropriate module. - - - - - bf672ed3 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Accept tests affected by changes related to instance expander. - - - - - 8f2a949a by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add examples with type operators to the instances test case. - - - - - 64600a84 by Łukasz Hanuszczak at 2015-08-21T18:22:33+01:00 Add basic support for sugaring infix type operators. - - - - - 747d71b8 by Łukasz Hanuszczak at 2015-08-21T18:22:34+01:00 Add support for sugaring built-in function syntax. - - - - - d4696ffb by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Remove default methods from Hoogle class output. - - - - - bf0e09d7 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add fixity declarations in Hoogle backend output. - - - - - 90e91a51 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix bug with incorrect fixities being generated in Hoogle backend. - - - - - 48f11d35 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve class type family declarations output in Hoogle backend. - - - - - 661e8e8f by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Add missing default family equations in Hoogle output. - - - - - e2d64103 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Improve formatting of class details output in Hoogle backend. - - - - - 490fc377 by Łukasz Hanuszczak at 2015-08-21T18:31:31+01:00 Fix weird-looking Hoogle output for familyless classes. - - - - - ea115b64 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create script file for new HTML test runner. - - - - - 609913d3 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Set default behaviour if no arguments given. - - - - - dc115f67 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for providing optional arguments for test runner. - - - - - d93ec867 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve output of test runner error messages. - - - - - 0be9fe12 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add support for executing Haddock process in test runner. - - - - - 4e4d00d9 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Add GHC path to test runner configuration. - - - - - d67a2086 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make GHC path a test runner command-line argument. - - - - - c810079a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Extend test runner configuration with Haddock arguments. - - - - - fee18845 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor test runner and create stub functions. - - - - - ff7c161f by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make test runner actually run Haddock executable. - - - - - 391f73e6 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with test runner not producing any output files. - - - - - 81a74e2d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Setup skeleton of framework for running tests. - - - - - f8a79ec4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Fix bug with modules not being found in global search mode. - - - - - 7e700b4d by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make Haddock standard output redirection be more configurable. - - - - - 53b4c17a by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Incorporate old, ugly functions for comparing output files. - - - - - 8277c8aa by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Refactor architecture of test runner output checking functions. - - - - - 587bb414 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement actual diffing mechanism. - - - - - 9ed2b5e4 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Improve code style to match popular guidelines. - - - - - 14bffaf8 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Make it possible to choose alternative diff tool. - - - - - 5cdfb005 by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Create stub methods for processing test output as XML documents. - - - - - 7ef8e12e by Łukasz Hanuszczak at 2015-08-22T23:40:26+02:00 Implement link-stripping logic as simple SYB transformation. - - - - - 8a1fcd4f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Incorporate link stripping to output diffing mechanism. - - - - - 37dba2bc by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement footer-stripping logic. - - - - - 9cd52120 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Add missing dependencies in Cabal configuration file. - - - - - e0f83c6e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix issue with output being printed in incorrect order. - - - - - 0a94fbb0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to run tests without generating diff. - - - - - 76a58c6f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor HTML test suite boilerplate to external package. - - - - - af41e6b0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utilities for storing directory configuration. - - - - - d8f0698f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move IO-dependent config of HTML test suite to test package. - - - - - 17369fa0 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Enable all compiler warnings in Haddock test package configuration. - - - - - 9d03b47a by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Move Haddock runner of HTML test suite to Haddock test package. - - - - - 4b3483c5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 03754194 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience wrappers to simplify in test entry points. - - - - - 27476ab7 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adjust module visibility and items they export. - - - - - c40002ba by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Remove no longer useful test option. - - - - - 55ab2541 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Change extension of test files used for diffing. - - - - - 136bf4e4 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Refactor and simplify XHTML helper module of test package. - - - - - 69f7e3df by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix typo in link stripper of HTML test suite runner. - - - - - 0c3c1c6b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create convenience script for running specific HTML tests. - - - - - 489e1b05 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement utility functions for conditional link stripping. - - - - - 0f985dc3 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt `hypsrc-test` module to work with new testing framework. - - - - - 927406f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Implement output accepting mechanism in test package. - - - - - 8545715e by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Create utility function for recursive obtaining directory contents. - - - - - cb70381f by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make Haddock test package more generic. - - - - - 019599b5 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix path handling in test runner. - - - - - 399b985b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Make it possible to specify ignored files for test output. - - - - - 41b3d93d by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Adapt HTML test runner to use new ignoring functionality. - - - - - e2091c8b by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Fix bug with not all test output files being checked. - - - - - b22134f9 by Łukasz Hanuszczak at 2015-08-22T23:40:27+02:00 Specify ignored files for hyperlinker source test runner. - - - - - 3301dfa1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Copy test runner script for hyperlinked source case. - - - - - d39a6dfa by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner invoking Haddock in incorrect mode. - - - - - f32c8ff3 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix path handling in test module loader. - - - - - 10f94ee9 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make test runner ignore test packages with no modules. - - - - - 5dc4239c by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create test runner entry points for LaTeX test suite. - - - - - 58d1f7cf by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with unnecessary checking old test output. - - - - - c7ce76e1 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Re-implement test acceptance functionality. - - - - - 13bbabe8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix warning about no longer needed definition. - - - - - 958a99b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Adapt Cabal configuration to execute LaTeX suite with new runner. - - - - - 550ff663 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Setup test suite for Hoogle backend. - - - - - 3aa969c4 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Make Hoogle backend create output directory if needed. - - - - - eb085b02 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Add appropriate .gitignore entry and configure Hoogle test suite. - - - - - a50bf915 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Fix bug with test runner failing when run on multiple test packages. - - - - - bf5368b8 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create simple test cases for Hoogle backend. - - - - - 6121ba4b by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Create helper function for conversion between XML and XHTML. - - - - - cb516061 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Refactor existing code to use XHTML printer instead of XML one. - - - - - e2de8c82 by Łukasz Hanuszczak at 2015-08-22T23:40:28+02:00 Improve portability of test runner scripts. - - - - - 9563e774 by Łukasz Hanuszczak at 2015-08-22T23:43:16+02:00 Remove redundant import statement. - - - - - 55353df1 by Łukasz Hanuszczak at 2015-08-24T23:09:20+02:00 Fix bug with accepting to non-existing directory. - - - - - 00a334ca by Łukasz Hanuszczak at 2015-08-24T23:09:47+02:00 Accept output for Hoogle and LaTeX backends. - - - - - 29191d8b by Łukasz Hanuszczak at 2015-08-24T23:14:18+02:00 Get rid of obsolete testing utilities. - - - - - bbb25db3 by Łukasz Hanuszczak at 2015-08-24T23:18:50+02:00 Update sandbox setup guide to work with Haddock test package. - - - - - cfd45248 by Łukasz Hanuszczak at 2015-08-24T23:51:30+02:00 Make Travis aware of Haddock test package. - - - - - 74185b7a by Łukasz Hanuszczak at 2015-08-25T17:41:59+02:00 Fix test suite failure when used with Stack. - - - - - 18769697 by Łukasz Hanuszczak at 2015-08-25T18:02:09+02:00 Add sample Stack setup to the hacking guide. - - - - - 22715eeb by Łukasz Hanuszczak at 2015-08-25T18:04:47+02:00 Fix Markdown formatting of README file. - - - - - b49ec386 by Łukasz Hanuszczak at 2015-08-25T18:13:36+02:00 Setup Haddock executable path in Travis configuration. - - - - - 5d29eb03 by Eric Seidel at 2015-08-30T09:55:58-07:00 account for changes to ipClass - - - - - f111740a by Ben Gamari at 2015-09-02T13:20:37+02:00 Merge pull request haskell/haddock#443 from bgamari/ghc-head account for changes to ipClass - - - - - a2654bf6 by Jan Stolarek at 2015-09-03T01:32:57+02:00 Follow changes from haskell/haddock#6018 - - - - - 2678bafe by Richard Eisenberg at 2015-09-21T12:00:47-04:00 React to refactoring CoAxiom branch lists. - - - - - ebc56e24 by Edward Z. Yang at 2015-09-21T11:53:46-07:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4a8c4198 by Tamar Christina at 2015-09-27T13:59:08+02:00 Create Process: removed PhaseFailed - - - - - 7e99b790 by Oleg Grenrus at 2015-09-27T20:52:10+03:00 Generate docs for orphan instances - - - - - 32e932e2 by Oleg Grenrus at 2015-09-28T07:21:11+03:00 Have source links for orphan instances - - - - - c2eb9f4f by Oleg Grenrus at 2015-09-28T07:24:58+03:00 Print orphan instances header only if required - - - - - ff96f978 by Oleg Grenrus at 2015-09-28T07:40:54+03:00 Add orphan instances link to contents box - - - - - d72490a6 by Oleg Grenrus at 2015-09-28T16:37:44+03:00 Fix orphan instance collapsing - - - - - 25d3dfe5 by Ben Gamari at 2015-10-03T12:38:09+02:00 Merge pull request haskell/haddock#448 from Mistuke/fix-silent-death-of-runInteractive Remove PhaseFailed - - - - - 1e45e43b by Edward Z. Yang at 2015-10-11T13:10:10-07:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b1370ac1 by Adam Gundry at 2015-10-16T16:26:42+01:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 60bef421 by Simon Peyton Jones at 2015-10-26T12:52:36+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 4c1898ca by Simon Peyton Jones at 2015-10-27T14:24:56+00:00 Track change to PatSyn.patSynSig - - - - - 25108e85 by Simon Peyton Jones at 2015-10-27T17:34:18+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - 693643ac by Ben Gamari at 2015-10-28T14:33:06+01:00 Account for Typeable changes The treatment of type families changed. - - - - - cd7c2221 by Simon Peyton Jones at 2015-10-30T13:03:51+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - 712032cb by Herbert Valerio Riedel at 2015-10-31T11:01:45+01:00 Relax upper bound on `base` to allow base-4.9 - - - - - 0bfa0475 by Simon Peyton Jones at 2015-10-31T19:08:13+00:00 More adaption to wildcard-refactor - - - - - 0a3c0cb7 by Simon Peyton Jones at 2015-10-31T22:14:43+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor Conflicts: haddock-api/src/Haddock/Convert.hs - - - - - c4fd4ec9 by Alan Zimmerman at 2015-11-01T11:16:34+01:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 42cdd882 by Matthew Pickering at 2015-11-06T20:02:16+00:00 Change for IEThingWith - - - - - f368b7be by Ben Gamari at 2015-11-11T11:35:51+01:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - e32965b8 by Simon Peyton Jones at 2015-11-13T12:18:17+00:00 Merge with origin/head - - - - - ebcf795a by Edward Z. Yang at 2015-11-13T21:56:27-08:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4e23989f by Simon Peyton Jones at 2015-11-18T11:32:54+00:00 Wibbles to Haddock - - - - - 2289cd4a by Simon Peyton Jones at 2015-11-20T23:12:49+00:00 Merge remote-tracking branch 'origin/ghc-head' into wip/spj-wildcard-refactor - - - - - 695975a6 by Alan Zimmerman at 2015-11-21T21:16:12+02:00 Update to match GHC wip/T11019 - - - - - bbba21e7 by Simon Peyton Jones at 2015-11-23T13:54:31+00:00 merge with origin/ghc-head - - - - - 3d664258 by Simon Peyton Jones at 2015-11-23T17:17:18+00:00 Wibble - - - - - e64cf586 by Herbert Valerio Riedel at 2015-12-05T00:29:55+01:00 Canonicalise Monad instances - - - - - a2de15a7 by Alan Zimmerman at 2015-12-05T17:33:52+02:00 Matching changes for haskell/haddock#11028 - - - - - cc29a3e4 by Alan Zimmerman at 2015-12-05T19:45:33+02:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 95dd15d1 by Richard Eisenberg at 2015-12-11T17:33:39-06:00 Update for type=kinds - - - - - cb5fd9ed by Herbert Valerio Riedel at 2015-12-14T15:07:30+00:00 Bump versions for ghc-7.11 - - - - - 4f286d96 by Simon Peyton Jones at 2015-12-14T15:10:56+00:00 Eliminate instanceHead' in favour of GHC's instanceSig This is made possible by the elimination of "silent superclass parameters" in GHC - - - - - 13ea2733 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Remove redundant constraints from haddock, discovered by -fwarn-redundant-constraints - - - - - 098df8b8 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track changes in HsSyn for quasi-quotes - - - - - 716a64de by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track change in API of TyCon - - - - - 77a66bca by Adam Gundry at 2015-12-14T15:10:58+00:00 Track API changes to support empty closed type familes - - - - - f2808305 by Simon Peyton Jones at 2015-12-14T15:10:58+00:00 Track the new location of setRdrNameSpace - - - - - ba8b08a4 by Alan Zimmerman at 2015-12-14T15:10:59+00:00 ApiAnnotations : strings in warnings do not return SourceText The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. - - - - - a4ded87e by Thomas Winant at 2015-12-14T15:14:05+00:00 Update after wild card renaming refactoring in D613 Summary: * Move `Post*` type instances to `Haddock.Types` as other modules than `Haddock.Interface.Rename` will rely on these type instances. * Update after wild card renaming refactoring in D613. Reviewers: simonpj, austin Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D954 GHC Trac Issues: haskell/haddock#10098 - - - - - 25c78107 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: print correct strictness marks - - - - - 6cbc41c4 by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 StrictData: changes in HsBang type - - - - - ad46821a by Alan Zimmerman at 2015-12-14T15:14:06+00:00 Replace (SourceText,FastString) with WithSourceText data type Phab:D907 introduced SourceText for a number of data types, by replacing FastString with (SourceText,FastString). Since this has an Outputable instance, no warnings are generated when ppr is called on it, but unexpected output is generated. See Phab:D1096 for an example of this. Replace the (SourceText,FastString) tuples with a new data type data WithSourceText = WithSourceText SourceText FastString Trac ticket: haskell/haddock#10692 - - - - - abc0ae5b by Adam Sandberg Eriksson at 2015-12-14T15:14:06+00:00 HsBang is split into HsSrcBang and HsImplBang With recent changes in GHC handling of strictness annotations in Haddock is simplified. - - - - - 3308d06c by Thomas Miedema at 2015-12-14T15:14:07+00:00 Follow changes in GHC build system - - - - - 6c763deb by Eric Seidel at 2015-12-14T15:14:07+00:00 account for changes to ipClass - - - - - ae5b4eac by Jan Stolarek at 2015-12-14T15:17:00+00:00 Follow changes from haskell/haddock#6018 - - - - - ffbc40e0 by Richard Eisenberg at 2015-12-14T15:17:02+00:00 React to refactoring CoAxiom branch lists. - - - - - d1f531e9 by Edward Z. Yang at 2015-12-14T15:17:02+00:00 Track msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 79f73754 by Tamar Christina at 2015-12-14T15:17:02+00:00 Create Process: removed PhaseFailed - - - - - 3d37bebb by Edward Z. Yang at 2015-12-14T15:20:46+00:00 s/PackageKey/UnitId/g and s/packageKey/unitId/g Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 5f8a9e44 by Adam Gundry at 2015-12-14T15:20:48+00:00 Roughly fix up haddock for DuplicateRecordFields changes This compiles, but will probably need more work to produce good documentation when the DuplicateRecordFields extension is used. - - - - - 79dda70f by Simon Peyton Jones at 2015-12-14T15:26:02+00:00 Track wip/spj-wildcard-refactor on main repo - - - - - 959930fb by Simon Peyton Jones at 2015-12-14T15:37:50+00:00 Follow changes to HsTYpe Not yet complete (but on a wip/ branch) - - - - - e18a8df5 by Simon Peyton Jones at 2015-12-14T15:37:52+00:00 Work on updating Haddock to wip/spj-wildard-recactor Still incomplete - - - - - aa35ab52 by Simon Peyton Jones at 2015-12-14T15:40:18+00:00 More adaption to wildcard-refactor - - - - - 8ceef94b by Simon Peyton Jones at 2015-12-14T15:46:04+00:00 Track change to PatSyn.patSynSig - - - - - cd81e83d by Ben Gamari at 2015-12-14T15:46:06+00:00 Account for Typeable changes The treatment of type families changed. - - - - - 63c9117c by Herbert Valerio Riedel at 2015-12-14T15:46:34+00:00 Relax upper bound on `base` to allow base-4.9 - - - - - a484c613 by Alan Zimmerman at 2015-12-14T15:47:46+00:00 Matching change GHC haskell/haddock#11017 BooleanFormula located - - - - - 2c26fa51 by Matthew Pickering at 2015-12-14T15:47:47+00:00 Change for IEThingWith - - - - - 593baa0f by Ben Gamari at 2015-12-14T15:49:21+00:00 Eliminate support for deprecated GADT syntax Follows from GHC D1460. - - - - - b6b5ca78 by Edward Z. Yang at 2015-12-14T15:49:54+00:00 Undo msHsFilePath change. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b5b0e072 by Alan Zimmerman at 2015-12-14T15:54:20+00:00 Update to match GHC wip/T11019 - - - - - 14ddeb68 by Simon Peyton Jones at 2015-12-14T15:54:22+00:00 Wibble - - - - - 10a90ad8 by Herbert Valerio Riedel at 2015-12-14T15:54:22+00:00 Canonicalise Monad instances - - - - - ed68ac50 by Alan Zimmerman at 2015-12-14T15:55:48+00:00 Matching changes for haskell/haddock#11028 - - - - - 3f7e5a2d by Alan Zimmerman at 2015-12-14T15:55:49+00:00 Placeholder for record style GADT declaration A GADT Declaration is now presented as CmmCondBranch :: {..} -> CmmNode O C cml_pred :: CmmExpr cml_true, cml_false :: !Label cml_likely :: Maybe Bool for CmmCondBranch :: { -- conditional branch cml_pred :: CmmExpr, cml_true, cml_false :: ULabel, cml_likely :: Maybe Bool -- likely result of the conditional, -- if known } -> CmmNode O C - - - - - 6543a73f by Richard Eisenberg at 2015-12-14T15:59:55+00:00 Update for type=kinds - - - - - 193a5c48 by Matthew Pickering at 2015-12-14T18:17:00+00:00 Changes to compile with 8.0 - - - - - add669ec by Matthew Pickering at 2015-12-14T18:47:12+00:00 Warnings - - - - - 223f3fb4 by Ben Gamari at 2015-12-15T23:45:05+01:00 Update for D1200 - - - - - d058388f by Ben Gamari at 2015-12-16T05:40:17-05:00 Types: Add Outputable[Bndr] DocName instances - - - - - 62ecd7fb by Ben Gamari at 2015-12-16T09:23:09-05:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ddbc187a by Ben Gamari at 2015-12-16T17:54:55+01:00 Update for D1200 - - - - - cec83b52 by Ben Gamari at 2015-12-16T17:54:55+01:00 Types: Add Outputable[Bndr] DocName instances - - - - - d12ecc98 by Ben Gamari at 2015-12-16T17:54:55+01:00 Fix fallout from wildcards refactoring The wildcard refactoring was introduced a new type of signature, `ClassOpSig`, which is carried by typeclasses. The original patch adapting Haddock for this change missed a few places where this constructor needed to be handled, resulting in no class methods in documentation produced by Haddock. Additionally, this moves and renames the `isVanillaLSig` helper from GHC's HsBinds module into GhcUtils, since it is only used by Haddock. - - - - - ada1616f by Ben Gamari at 2015-12-16T17:54:58+01:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a4f0383d by Ben Gamari at 2015-12-16T23:32:38+01:00 Fix Hyperlinker GHC.con_names is now GHC.getConNames - - - - - a10e6849 by Ben Gamari at 2015-12-20T00:54:11+01:00 Merge remote-tracking branch 'mrhania/testing-framework-improvements' into ghc-head - - - - - f078b4fd by Ben Gamari at 2015-12-20T00:59:51+01:00 test: Compatibility with Cabal 1.23 - - - - - 88a511a9 by Ben Gamari at 2015-12-20T01:14:35+01:00 Merge remote-tracking branch 'phadej/orphans' into ghc-head - - - - - 4e250f36 by Ben Gamari at 2015-12-20T01:14:52+01:00 Add html-test for orphan instances output - - - - - 87fffbad by Alan Zimmerman at 2015-12-20T09:50:42+02:00 Update for GHC trac#11258 Adding locations to RdrName in FieldOcc and AmbiguousFieldOcc - - - - - 6b7e51c9 by idontgetoutmuch at 2015-12-20T21:01:47+00:00 Merge pull request haskell/haddock#1 from haskell/ghc-head Ghc head - - - - - 229c1fb5 by Dominic Steinitz at 2015-12-21T07:19:16+00:00 Handle inline math with mathjax. - - - - - 57902d66 by Dominic Steinitz at 2015-12-21T08:07:11+00:00 Fix the documentation for haddock itself. Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs - - - - - 0e69f236 by Herbert Valerio Riedel at 2015-12-21T18:30:43+01:00 Fix-up left-over assumptions of GHC 7.12 into GHC 8.0 - - - - - c67f8444 by Simon Peyton Jones at 2015-12-22T16:26:56+00:00 Follow removal of NamedWildCard from HsType - - - - - da40327a by Ben Gamari at 2015-12-23T14:15:28+01:00 html-test/Operators: Clear up ambiguous types For reasons that aren't entirely clear a class with ambiguous types was accepted by GHC <8.0. I've added a functional dependency to clear up this ambiguity. - - - - - 541b7fa4 by Ben Gamari at 2015-12-23T14:18:51+01:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 0febc947 by Ben Gamari at 2015-12-24T00:30:20+01:00 hoogle-test/AssocTypes: Allow AmbiguousTypes GHC 8.0 complains otherwise - - - - - 25810841 by Ben Gamari at 2015-12-24T00:33:18+01:00 OrphanInstances: Accept test output - - - - - 841987f3 by Ben Gamari at 2015-12-25T11:03:11+01:00 Merge remote-tracking branch 'idontgetoutmuch/ghc-head' into ghc-head - - - - - 358391f0 by Ben Gamari at 2015-12-26T10:44:50+01:00 Add missing import - - - - - a8896885 by Ben Gamari at 2015-12-26T10:45:27+01:00 travis: Use Travis containers - - - - - 85e82134 by Herbert Valerio Riedel at 2015-12-30T17:25:39+01:00 tweak version bounds for GHC-8.1 - - - - - 672a5f75 by randen at 2016-01-01T23:45:25-08:00 The Haddock part for fully gcc-like response files " driver/Main.hs * Moved the response file handling into ResponseFile.hs, updating import section as appropriate. * driver/ResponseFile.hs * New file. In anticipation that maybe some day this could be provided by another library, and to make it possible to unit test, this functionality is pulled out of the Main.hs module, and expanded to support the style/format of response files which gcc uses. * The specification for the format of response files which gcc generates and consumes, seems to be best derived from the gcc code itself (libiberty/argv.c), so that is what has been done here. * This is intended to fix haskell/haddock#379 * driver-test/Main.hs * New file for testing code in the driver source tree * driver-test/ResponseFileSpec.hs * Tests, adapted/adopted from the same gcc code where the escaping/unescaping is from, in the hspec style of unit tests * haddock.cabal * Add the driver-test test-suite. Introduces a new library dependency (upon hspec) for the haddock driver target in the haddock.cabal file, but practically, this should not be a problem as the haddock-api tests already depend on hspec. - - - - - 498781df by Ben Gamari at 2016-01-06T13:41:04+01:00 Version bumps and changelog - - - - - 8451e46a by Ben Gamari at 2016-01-06T13:47:17+01:00 Merge remote-tracking branch 'randen/bug468' - - - - - fb2d9181 by Ben Gamari at 2016-01-06T08:14:42-05:00 Add ResponseFile to OtherModules - - - - - 2cb2d2e3 by Ben Gamari at 2016-01-06T14:35:00+01:00 Merge branch 'master' into ghc-head - - - - - 913477d4 by Eric Seidel at 2016-01-11T14:57:57-08:00 deal with un-wiring of IP class - - - - - c557a4b3 by Alan Zimmerman at 2016-01-15T11:14:35+02:00 Update to match wip/T11430 in GHC - - - - - 3e135093 by Alan Zimmerman at 2016-01-16T18:21:59+01:00 Update to match wip/T11430 in GHC - - - - - c48ef2f9 by Ben Gamari at 2016-01-18T09:50:06+01:00 Merge remote-tracking branch 'gridaphobe/ghc-head' into ghc-head - - - - - 9138a1b0 by Eric Seidel at 2016-01-18T12:50:15+01:00 deal with un-wiring of IP class (cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f) - - - - - b48c172e by Joachim Breitner at 2016-01-19T00:11:38+01:00 Make sure --mathjax affects all written HTML files This fixes haskell/haddock#475. - - - - - af61fe63 by Ryan Scott at 2016-02-07T23:25:57+01:00 Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes haskell/haddock#473) - - - - - b6458693 by Ben Gamari at 2016-02-07T23:29:27+01:00 Merge pull request haskell/haddock#477 from haskell/issue-475 Make sure --mathjax affects all written HTML files - - - - - adcc0071 by Ben Gamari at 2016-02-07T23:34:52+01:00 Merge branch 'master' into ghc-head - - - - - d0404e61 by Ben Gamari at 2016-02-08T12:46:49+01:00 doc: Switch to Sphinx - - - - - acb153b3 by Ben Gamari at 2016-02-08T12:46:56+01:00 Document --use-unicode flag - - - - - c20bdf1d by Ben Gamari at 2016-02-08T13:41:24+01:00 Fix GHC and haddock-library dependency bounds - - - - - 8d946801 by Ben Gamari at 2016-02-08T14:54:56+01:00 testsuite: Rework handling of output sanitization Previously un-cleaned artifacts were kept as reference output, making it difficult to tell what has changed and causing spurious changes in the version control history. Here we rework this, cleaning the output during acceptance. To accomplish this it was necessary to move to strict I/O to ensure the reference handle was closed before accept attempts to open the reference file. - - - - - c465705d by Ben Gamari at 2016-02-08T15:36:05+01:00 test: Compare on dump For reasons I don't understand the Xml representations differ despite their textual representations being identical. - - - - - 1ec0227a by Ben Gamari at 2016-02-08T15:36:05+01:00 html-test: Accept test output - - - - - eefbd63a by Ben Gamari at 2016-02-08T15:36:08+01:00 hypsrc-test: Accept test output And fix impredicative Polymorphism testcase. - - - - - d1df4372 by Ben Gamari at 2016-02-08T15:40:44+01:00 Merge branch 'fix-up-testsuite' - - - - - 206a3859 by Phil Ruffwind at 2016-02-08T17:51:21+01:00 Move the permalinks to "#" on the right side Since pull request haskell/haddock#407, the identifiers have been permalinked to themselves, but this makes it difficult to copy the identifier by double-clicking. To work around this usability problem, the permalinks are now placed on the far right adjacent to "Source", indicated by "#". Also, 'namedAnchor' now uses 'id' instead of 'name' (which is obsolete). - - - - - 6c89fa03 by Phil Ruffwind at 2016-02-08T17:54:44+01:00 Update tests for previous commit - - - - - effaa832 by Ben Gamari at 2016-02-08T17:56:17+01:00 Merge branch 'anchors-redux' - - - - - 9a2bec90 by Ben Gamari at 2016-02-08T17:58:40+01:00 Use -fprint-unicode-syntax when --use-unicode is enabled This allows GHC to render `*` as its Unicode representation, among other things. - - - - - 28ecac5b by Ben Gamari at 2016-02-11T18:53:03+01:00 Merge pull request haskell/haddock#480 from bgamari/sphinx Move documentation to ReStructuredText - - - - - 222e5920 by Ryan Scott at 2016-02-11T15:42:42-05:00 Collapse type/data family instances by default - - - - - a80ac03b by Ryan Scott at 2016-02-11T20:17:09-05:00 Ensure expanded family instances render correctly - - - - - 7f985231 by Ben Gamari at 2016-02-12T10:04:22+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - d4eda086 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Various cleanups - - - - - 79bee48d by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show kind signatures for type family variables Addresses GHC haskell/haddock#11588. - - - - - b2981d98 by Ben Gamari at 2016-02-18T00:05:56+01:00 Xhtml.Decl: Show 'where ...' after closed type family Seems like we should ideally show the actual equations as well but that seems like it would be a fair amount of work - - - - - cfc0e621 by Ben Gamari at 2016-02-18T22:48:12+01:00 Merge pull request haskell/haddock#483 from bgamari/T11588 Fix GHC haskell/haddock#11588 This fixes GHC haskell/haddock#11588: * Show where ... after closed type families * Show kind signatures on type family type variables - - - - - 256e8a0d by Ben Gamari at 2016-02-18T23:15:39+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 32402036 by Richard Eisenberg at 2016-02-24T13:21:44-05:00 Follow-on changes to support RuntimeRep - - - - - 2b1c572d by Matthew Pickering at 2016-03-04T21:04:02+00:00 Remove unused functions - - - - - eb906f50 by Richard Eisenberg at 2016-03-13T21:17:20+01:00 Follow-on changes to support RuntimeRep (cherry picked from commit ab954263a793d8ced734459d6194a5d89214b66c) - - - - - 8c34ef34 by Richard Eisenberg at 2016-03-14T23:47:23-04:00 Changes due to fix for GHC#11648. - - - - - 0e022014 by Richard Eisenberg at 2016-03-15T14:06:45+01:00 Changes due to fix for GHC#11648. (cherry picked from commit bb994de1ab0c76d1aaf1e39c54158db2526d31f1) - - - - - ed3f78ab by Rik Steenkamp at 2016-04-02T22:20:36+01:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 - - - - - d3210042 by Rik Steenkamp at 2016-04-04T15:43:32+02:00 Fix printing of pattern synonym types Removes the call to `patSynType :: PatSyn -> Type` in `Convert.hs` as this function will be removed from GHC. Instead, we use the function `patSynSig` and build the `HsDecl` manually. This also fixes the printing of the two contexts and the quantified type variables in a pattern synonym type. Reviewers: goldfire, bgamari, mpickering Differential Revision: https://phabricator.haskell.org/D2048 (cherry picked from commit 3ddcbd6b8e6884bd95028381176eb33bee6896fb) - - - - - 236eec90 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 692ee7e0 by Ben Gamari at 2016-04-10T23:40:15+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. - - - - - 79619f57 by Ben Gamari at 2016-04-10T23:46:22+02:00 doc: Only install if BUILD_SPHINX_HTML==YES Fixes GHC haskell/haddock#11818. (cherry picked from commit c6d6a18d85e5e2d9bb5904e6919e8a8d7e31c4c5) - - - - - 3358ccb4 by Ben Gamari at 2016-04-10T23:47:27+02:00 doc: Fix option references (cherry picked from commit f915fb3c74328fb994235bbbd42092a691539197) - - - - - 264949b1 by Ben Gamari at 2016-04-16T17:50:23+02:00 Merge pull request haskell/haddock#482 from RyanGlScott/ghc-head Collapse type/data family instances by default - - - - - 478c483a by Ben Gamari at 2016-04-16T17:51:09+02:00 Merge pull request haskell/haddock#489 from mpickering/unused-functions Remove some unused functions - - - - - c94e55f0 by Ryan Scott at 2016-04-16T17:57:54+02:00 Collapse type/data family instances by default (cherry picked from commit 2da130a8db8f995c119b544fad807533236cf088) - - - - - 31e633d3 by Ryan Scott at 2016-04-16T17:58:06+02:00 Ensure expanded family instances render correctly (cherry picked from commit 1338b5d7c32939de6bbc31af0049477e4f847103) - - - - - 03e4d197 by Matthew Pickering at 2016-04-16T17:58:21+02:00 Remove unused functions (cherry picked from commit b89d1c2456bdb2d4208d94ded56155f7088a37d0) - - - - - ed4116f6 by Ben Gamari at 2016-04-20T10:46:57+02:00 ghc: Install files for needed --hyperlinked-source - - - - - 0be999c4 by Ben Gamari at 2016-04-20T11:37:54+02:00 ghc: Install files for needed --hyperlinked-source (cherry picked from commit 5c82c9fc2d21ddaae4a2470f1c375426968f19c6) - - - - - 4d17544c by Simon Peyton Jones at 2016-04-20T12:42:28+01:00 Track change to HsGroup This relates to a big GHC patch for Trac haskell/haddock#11348 - - - - - 1700a50d by Ben Gamari at 2016-05-01T13:19:27+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. - - - - - 0b7c8125 by Ben Gamari at 2016-05-01T13:21:43+02:00 doc: At long last fix ghc.mk The variable reference was incorrectly escaped, meaning that Sphinx documentation was never installed. (cherry picked from commit 609018dd09c4ffe27f9248b2d8b50f6196cd42b9) - - - - - af115ce0 by Ryan Scott at 2016-05-04T22:15:50-04:00 Render Haddocks for derived instances Currently, one can document top-level instance declarations, but derived instances (both those in `deriving` clauses and standalone `deriving` instances) do not enjoy the same privilege. This makes the necessary changes to the Haddock API to enable rendering Haddock comments for derived instances. This is part of a fix for Trac haskell/haddock#11768. - - - - - 76fa1edc by Ben Gamari at 2016-05-10T18:13:25+02:00 haddock-test: A bit of refactoring for debuggability - - - - - 7d4c4b20 by Ben Gamari at 2016-05-10T18:13:25+02:00 Create: Mark a comment as TODO - - - - - 2a6d0c90 by Ben Gamari at 2016-05-10T18:13:25+02:00 html-test: Update reference output - - - - - bd60913d by Ben Gamari at 2016-05-10T18:13:25+02:00 hypsrc-test: Fix reference file path in cabal file It appears the haddock insists on prefixing --hyperlinked-sourcer output with directory which the source appeared in. - - - - - c1548057 by Ben Gamari at 2016-05-10T18:22:12+02:00 doc: Update extra-source-files in Cabal file - - - - - 41d5bae3 by Ben Gamari at 2016-05-10T18:29:21+02:00 Bump versions - - - - - ca75b779 by Ben Gamari at 2016-05-11T16:03:44+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 4e3cfd62 by Ben Gamari at 2016-05-11T16:06:45+02:00 Merge remote-tracking branch 'RyanGlScott/ghc-head' into ghc-head - - - - - a2379970 by Ben Gamari at 2016-05-11T23:15:11+02:00 doc: Add clean targets - - - - - f275212e by Ben Gamari at 2016-05-11T23:15:14+02:00 doc: Add html as an all-target for ghc Otherwise the html documentation won't be installed for binary-dist. - - - - - 388fc0af by Ben Gamari at 2016-05-12T09:49:12+02:00 Update CHANGES - - - - - bad81ad5 by Ben Gamari at 2016-05-12T09:49:38+02:00 Version bump - - - - - c01688a7 by Ben Gamari at 2016-05-12T10:04:58+02:00 Revert "Version bump" This bump was a bit premature. This reverts commit 7b238d9c5be9b07aa2d10df323b5c7b8d1634dc8. - - - - - 7ed05724 by Ben Gamari at 2016-05-12T10:05:33+02:00 doc: Fix GHC clean rule Apparently GHC's build system doesn't permit wildcards in clean paths. - - - - - 5d9611f4 by Ben Gamari at 2016-05-12T17:43:50+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 653566b2 by Ben Gamari at 2016-05-14T09:57:31+02:00 Version bump to 2.17.2 - - - - - b355c439 by Ben Gamari at 2016-05-14T09:57:51+02:00 doc: Use `$(MAKE)` instead of `make` This is necessary to ensure we use gmake. - - - - - 8a18537d by Ben Gamari at 2016-05-14T10:15:45+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - b3290ef1 by Sebastian Meric de Bellefon at 2016-05-14T11:29:47-04:00 Fix haskell/haddock#303. Hide footer when printing The "Produced by Haddock" footer was overlapping the page's body when printing. This patch hides the footer with a css media rule. - - - - - b4a76f89 by Sebastian Meric de Bellefon at 2016-05-15T02:12:46-04:00 Fix haskell/haddock#280. Parsing of module header The initial newlines were counted as indentation spaces, thus disturbing the parsing of next lines - - - - - ba797c9e by Ben Gamari at 2016-05-16T14:53:46+02:00 doc: Vendorize alabaster Sphinx theme Alabaster is now the default sphinx theme and is a significant improvement over the previous default that it's worthproviding it when unavailable (e.g. Sphinx <1.3). - - - - - c9283e44 by Ben Gamari at 2016-05-16T14:55:17+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 1c9ea198 by Sebastian Méric de Bellefon at 2016-05-16T12:30:40-04:00 Merge pull request haskell/haddock#502 from Helkafen/master Fix haskell/haddock#303. Hide footer when printing - - - - - 33631016 by Ben Gamari at 2016-05-16T19:56:11+02:00 Revert "doc: Vendorize alabaster Sphinx theme" This ended up causes far too many issues to be worthwhile. We'll just have to live with inconsistent haddock documentation. This reverts commit cec21957001143794e71bcd9420283df18e7de40. - - - - - 93317d26 by Ben Gamari at 2016-05-16T19:56:11+02:00 cabal: Fix README path - - - - - c8695b22 by Ben Gamari at 2016-05-16T19:58:51+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 0b50eaaa by Ben Gamari at 2016-05-16T21:02:08+02:00 doc: Use whichever theme sphinx deems appropriate - - - - - 857c1c9c by Ben Gamari at 2016-05-16T21:07:08+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 15fc5637 by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Remove redundant imports - - - - - 132ddc6a by Ben Gamari at 2016-05-22T12:43:59+02:00 Create: Better debug output For tracking down haskell/haddock#505 - - - - - 2252a149 by Ben Gamari at 2016-05-22T12:43:59+02:00 Don't consider default class ops when looking for decls When we are looking for an operation within a class we don't care about `default`-type declarations. This was the cause of haskell/haddock#505. - - - - - 4886b2ec by Oleg Grenrus at 2016-05-24T16:19:48+03:00 UnfelpfulSpan line number omitted Kind of resolves https://github.com/haskell/haddock/issues/508 - - - - - a4befd36 by Oleg Grenrus at 2016-05-24T16:53:35+03:00 Change Hyperlinked lexer to know about DataKinds ticks - - - - - f45cb52e by David Feuer at 2016-05-24T18:48:53-04:00 Make parser state a newtype Previously, it was `data` wrapping a `Maybe`, which seems a bit silly. Obviously, this can be changed back if anyone wants to add more fields some day. - - - - - 05013dd7 by Sebastian Meric de Bellefon at 2016-05-24T22:03:55-04:00 remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) Frames are a bit broken, ignored by Hackage, and considered obsolete in general. This patch disables frames generation. The mini_*.html files are still used in the synopsis. - - - - - b8163a88 by Ben Gamari at 2016-05-25T14:44:15+02:00 Merge pull request haskell/haddock#507 from bgamari/T505 Fix haskell/haddock#505 - - - - - ea1b30c6 by Sebastian Meric de Bellefon at 2016-05-25T14:17:00-04:00 Update CHANGES - - - - - eddfc258 by Sebastian Méric de Bellefon at 2016-05-25T15:17:40-04:00 Merge pull request haskell/haddock#514 from Helkafen/frames remove framed view of the HTML documentation (see haskell/haddock#114 and haskell/haddock#274) - - - - - 0e506818 by Alex Biehl at 2016-05-26T12:43:09+02:00 Remove misplaced haddock comment - - - - - a07d28c0 by Ben Gamari at 2016-05-27T11:34:59+02:00 Merge pull request haskell/haddock#515 from alexbiehl/master Remove misplaced haddock comment - - - - - 9001d267 by Ben Gamari at 2016-05-27T11:35:46+02:00 Merge pull request haskell/haddock#513 from treeowl/newtype-since Make parser state a newtype - - - - - 74e1a018 by Sebastian Méric de Bellefon at 2016-05-28T17:28:15-04:00 Merge pull request haskell/haddock#504 from Helkafen/issue-280 Fix haskell/haddock#280. Parsing of module header - - - - - 37557f4f by Alan Zimmerman at 2016-05-29T23:36:50+02:00 Matching changes for haskell/haddock#12105 - - - - - 7d09e5d6 by Sebastian Meric de Bellefon at 2016-06-03T18:07:48-04:00 Version bumps (2.17.3, 1.4.2) - - - - - 85b4bc15 by Sebastian Méric de Bellefon at 2016-06-06T18:35:13-04:00 Merge pull request haskell/haddock#521 from Helkafen/master Version bumps (2.17.3, 1.4.2) - - - - - e95f0dee by Sebastian Meric de Bellefon at 2016-06-06T19:11:35-04:00 publish haddock-test library - - - - - 4de40586 by Sebastian Méric de Bellefon at 2016-06-06T20:26:30-04:00 Merge pull request haskell/haddock#512 from phadej/oleg-fixes Fixes for haskell/haddock#508 and haskell/haddock#510 - - - - - ddfd0789 by Dominic Steinitz at 2016-06-09T09:27:28+01:00 Documentation for LaTeX markup. - - - - - 697a503a by Dominic Steinitz at 2016-06-09T09:33:59+01:00 Fix spelling mistake. - - - - - 246f6fff by Dominic Steinitz at 2016-06-09T09:37:15+01:00 Camel case MathJax. - - - - - 4684bd23 by Dominic Steinitz at 2016-06-09T09:44:53+01:00 Fix math typo and add link. - - - - - f20c037c by Simon Peyton Jones at 2016-06-13T18:26:03+01:00 Follow changes to LHsSigWcType - - - - - 0c58996d by Simon Peyton Jones at 2016-06-15T12:56:01+01:00 Follow GHC re-adding FunTy - - - - - 401b5ca7 by Sebastian Méric de Bellefon at 2016-06-15T12:16:47-04:00 Merge pull request haskell/haddock#525 from idontgetoutmuch/master Documentation for LaTeX markup. - - - - - 92d263b7 by Sebastian Méric de Bellefon at 2016-06-15T12:17:29-04:00 Merge pull request haskell/haddock#522 from Helkafen/master publish haddock-test library - - - - - 0953a2ca by Sebastian Meric de Bellefon at 2016-06-16T00:46:46-04:00 Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 65453e14 by Ben Gamari at 2016-06-16T11:16:32+02:00 ocean: Ensure that synopsis fully covers other content Previously MathJax content was being rendered on top of the synopsis due to ambiguous z-ordering. Here we explicitly give the synopsis block a higher z-index to ensure it is rendered on top. Fixes haskell/haddock#531. - - - - - 68e411a1 by Sebastian Méric de Bellefon at 2016-06-16T23:34:39-04:00 Merge pull request haskell/haddock#534 from bgamari/T531 ocean: Ensure that synopsis fully covers other content - - - - - fad6491b by Sebastian Méric de Bellefon at 2016-06-18T23:57:20-04:00 Merge pull request haskell/haddock#533 from Helkafen/master Copyright holders shown on several lines. Fix haskell/haddock#279 - - - - - 6108e21b by Sebastian Meric de Bellefon at 2016-06-22T23:08:28-04:00 do not create empty src directory Fix haskell/haddock#536. - - - - - 1ef23823 by Sebastian Méric de Bellefon at 2016-06-24T00:04:48-04:00 Merge pull request haskell/haddock#537 from Helkafen/master do not create empty src directory - - - - - 966baa96 by Omari Norman at 2016-06-29T21:59:34-04:00 Add $ as a special character If this character is not escaped, documentation built with Haddock 2.17.2 will fail. This was not an issue with 2.16 series, which causes builds to fail and there is nothing in the docs or error message giving a clue about why builds that used to succeed now don't. - - - - - 324adb60 by Ben Gamari at 2016-07-01T12:18:51+02:00 GhcUtils: Changes for multi-pattern signatures - - - - - d7571675 by Ömer Sinan Ağacan at 2016-07-21T13:30:47+02:00 Add support for unboxed sums - - - - - 29d0907b by Simon Marlow at 2016-07-22T13:55:48+01:00 Disable NFData instances for GHC types when GHC >= 8.2 - - - - - 702d95f3 by Simon Marlow at 2016-08-02T15:57:30+02:00 Disable NFData instances for GHC types when GHC >= 8.0.2 (cherry picked from commit a3309e797c42dae9bccdeb17ce52fcababbaff8a) - - - - - f4fa79c3 by Ben Gamari at 2016-08-07T13:51:18+02:00 ghc.mk: Don't attempt to install html/frames.html The frames business has been removed. - - - - - 9cd63daf by Ben Gamari at 2016-08-07T13:51:40+02:00 Haddock.Types: More precise version guard This allows haddock to be built with GHC 8.0.2 pre-releases. - - - - - f3d7e03f by Mateusz Kowalczyk at 2016-08-29T20:47:45+01:00 Merge pull request haskell/haddock#538 from massysett/master Add $ as a special character - - - - - 16dbf7fd by Bartosz Nitka at 2016-09-20T19:44:04+01:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 - - - - - 7c31c1ff by Bartosz Nitka at 2016-09-27T17:32:22-04:00 Fix rendering of class methods for Eq and Ord See haskell/haddock#549 and GHC issue haskell/haddock#12519 (cherry picked from commit 073d899a8f94ddec698f617a38d3420160a7fd0b) - - - - - 33a90dce by Ryan Scott at 2016-09-30T20:53:41-04:00 Haddock changes for T10598 See https://ghc.haskell.org/trac/ghc/ticket/10598 - - - - - 1f32f7cb by Ben Gamari at 2016-10-13T20:01:26-04:00 Update for refactoring of NameCache - - - - - 1678ff2e by Ben Gamari at 2016-11-15T17:42:48-05:00 Bump upper bound on base - - - - - 9262a7c5 by Alan Zimmerman at 2016-12-07T21:14:28+02:00 Match changes in GHC wip/T3384 branch - - - - - ac0eaf1a by Ben Gamari at 2016-12-09T09:48:41-05:00 haddock-api: Don't use stdcall calling convention on 64-bit Windows See GHC haskell/haddock#12890. - - - - - 04afe4f7 by Alan Zimmerman at 2016-12-12T20:07:21+02:00 Matching changes for GHC wip/T12942 - - - - - e1d1701d by Ben Gamari at 2016-12-13T16:50:41-05:00 Bump base upper bound - - - - - 3d3eacd1 by Alan Zimmerman at 2017-01-10T16:59:38+02:00 HsIParamTy now has a Located name - - - - - 7dbceefd by Kyrill Briantsev at 2017-01-12T13:23:50+03:00 Prevent GHC API from doing optimization passes. - - - - - d48d1e33 by Richard Eisenberg at 2017-01-19T08:41:41-05:00 Upstream changes re levity polymorphism - - - - - 40c25ed6 by Alan Zimmerman at 2017-01-26T15:16:18+02:00 Changes to match haskell/haddock#13163 in GHC - - - - - 504f586d by Ben Gamari at 2017-02-02T17:19:37-05:00 Kill remaining static flags - - - - - 49147ea0 by Justus Adam at 2017-03-02T15:33:34+01:00 Adding MDoc to exports of Documentation.Haddock - - - - - 1cfba9b4 by Justus Adam at 2017-03-09T11:41:44+01:00 Also exposing toInstalledIface - - - - - 53f0c0dd by Ben Gamari at 2017-03-09T13:10:08-05:00 Bump for GHC 8.3 - - - - - c7902d2e by Ben Gamari at 2017-03-09T23:46:02-05:00 Bump for GHC 8.2 - - - - - 4f3a74f8 by Ben Gamari at 2017-03-10T10:21:55-05:00 Merge branch 'ghc-head' - - - - - e273b72f by Richard Eisenberg at 2017-03-14T13:34:04-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - 6ec3d436 by Richard Eisenberg at 2017-03-14T15:15:52-04:00 Update Haddock w.r.t. new HsImplicitBndrs - - - - - eee3cda1 by Ben Gamari at 2017-03-15T15:19:59-04:00 Adapt to EnumSet - - - - - 017cf58e by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 736d6773 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 475f84a0 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 13240b53 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - cd16d529 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 3bea97ae by Edward Z. Yang at 2017-03-15T22:50:46-07:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - b2b051ce by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 0f082795 by Edward Z. Yang at 2017-03-15T22:50:46-07:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 20ef63c9 by Edward Z. Yang at 2017-03-22T13:48:12-07:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 45692dcb by Edward Z. Yang at 2017-03-22T14:11:25-07:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 4eae8caf by Ben Gamari at 2017-03-23T09:25:33-04:00 Merge commit '240bc38b94ed2d0af27333b23392d03eeb615e82' into HEAD - - - - - 0bbe03f5 by Ben Gamari at 2017-03-23T09:27:28-04:00 haddock-api: Bump bound on GHC - - - - - 65f3ac9d by Alex Biehl at 2017-03-23T17:36:11+01:00 Merge pull request haskell/haddock#581 from JustusAdam/master Adding more exports to Documentation.Haddock - - - - - 37d49a47 by Alex Biehl at 2017-03-23T17:39:14+01:00 Merge pull request haskell/haddock#568 from awson/ghc-head Prevent GHC API from doing optimization passes. - - - - - 1ed047e4 by Brian Huffman at 2017-03-23T17:45:58+01:00 Print any user-supplied kind signatures on type parameters. This applies to type parameters on data, newtype, type, and class declarations, and also to forall-bound type vars in type signatures. - - - - - 1b78ca5c by Brian Huffman at 2017-03-23T17:45:58+01:00 Update test suite to expect kind annotations on type parameters. - - - - - a856b162 by Alex Biehl at 2017-03-23T17:49:32+01:00 Include travis build indication badge - - - - - 8e2e2c56 by Ben Gamari at 2017-03-23T17:20:08-04:00 haddock-api: Bump bound on GHC - - - - - 4d2d9995 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Correctly handle Backpack identity/semantic modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 26d6c150b31bc4580ab17cfd07b6e7f9afe10737) - - - - - a650e20f by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Add a field marking if interface is a signature or not. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 930cfbe58e2e87f5a4d431d89a3c204934e6e858) - - - - - caa282c2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render signature module tree separately from modules. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 2067a2d0afa9cef381d26fb7140b67c62f433fc0) - - - - - 49684884 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Documentation. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 0671abfe7e8ceae2269467a30b77ed9d9656e2cc) - - - - - 4dcfeb1a by Edward Z. Yang at 2017-03-23T17:20:08-04:00 More docs. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 3d77b373dd5807d5d956719dd7c849a11534fa6a) - - - - - 74dd19d2 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 TODO on moduleExports. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 94610e9b446324f4231fa6ad4c6ac51e4eba8c0e) - - - - - a9b19a23 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Better Backpack support with signature merging. When we merge signatures, we gain exports that don't necessarily have a source-level declaration corresponding to them. This meant Haddock dropped them. There are two big limitations: * If there's no export list, we won't report inherited signatures. * If the type has a subordinate, the current hiDecl implementation doesn't reconstitute them. These are probably worth fixing eventually, but this gets us to minimum viable functionality. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 6cc832dfb1de6088a4abcaae62b25a7e944d55c3) - - - - - d3631064 by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Fix haddock-test to work with latest version of Cabal. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit bf3c4d72a0fda38561376eac7eda216158783267) - - - - - ef2148fc by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Annotate signature docs with (signature) Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 07b88c5d4e79b87a319fbb08f8ea01dbb41063c1) - - - - - 2f29518b by Edward Z. Yang at 2017-03-23T17:20:08-04:00 Render help documentation link next to (signature) in title. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit 4eb765ca4205c79539d60b7afa9b7e261a4a49fe) - - - - - 37de047d by Phil Ruffwind at 2017-04-03T11:57:14+02:00 Update MathJax URL MathJax is shutting down their CDN: https://www.mathjax.org/cdn-shutting-down/ They recommend migrating to cdnjs. - - - - - e9d24ba8 by David C. Turner at 2017-04-03T14:58:01+02:00 Add highlight for :target to ocean.css - - - - - 4819a202 by Alex Biehl at 2017-04-11T19:36:48+02:00 Allow base-4.10 for haddock-test - - - - - 44cec69c by Alex Biehl at 2017-04-11T19:39:22+02:00 cabal.project for haddock-api, haddock-library and haddock-test - - - - - 935d0f6a by Alex Biehl at 2017-04-11T19:46:29+02:00 Move dist scripts to scripts/ - - - - - 128e150c by Alex Biehl at 2017-04-11T20:34:46+02:00 Add haddock to cabal.project - - - - - cc8e08ea by Alex Biehl at 2017-04-11T20:35:08+02:00 Read files for hyperlinker eagerly This also exposes Documentation.Haddock.Utf8 - - - - - 152dda78 by Alex Biehl at 2017-04-11T20:37:06+02:00 Explicit import list ofr Control.DeepSeq in Haddock.Interface.Create - - - - - 501b33c4 by Kyrill Briantsev at 2017-04-11T21:01:42+02:00 Prevent GHC API from doing optimization passes. - - - - - c9f3f5ff by Alexander Biehl at 2017-04-12T16:36:53+02:00 Add @alexbiehl as maintaner - - - - - 76f214cc by Alex Biehl at 2017-04-13T07:27:18+02:00 Disable doctest with ghc-8.3 Currently doctest doesn't support ghc-head - - - - - 46b4f5fc by Edward Z. Yang at 2017-04-22T20:38:26-07:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - f0555235 by Alex Biehl at 2017-04-25T10:08:48+02:00 Travis: Use ghc-8.2.1 on master - - - - - 966ea348 by Alex Biehl at 2017-04-25T10:32:01+02:00 Travis: Verbose cabal output cf. https://travis-ci.org/haskell/haddock/jobs/225512194#L377 - - - - - 36972bcd by Alex Biehl at 2017-04-25T10:40:43+02:00 Use travis_retry for cabal invocations - - - - - b3a09d2c by Alex Biehl at 2017-04-25T17:02:20+02:00 Use new MathJax URL in html-test 18ed871afb82560d5433b2f53e31b4db9353a74e switched to a new MathJax URL but didn't update the tests. - - - - - ae331e5f by Alexander Biehl at 2017-04-25T17:02:20+02:00 Expand signatures for class declarations - - - - - e573c65a by Alexander Biehl at 2017-04-25T17:02:20+02:00 Hoogle: Correctly print classes with associated data types - - - - - 3fc6be9b by Edward Z. Yang at 2017-04-25T17:02:20+02:00 Render (signature) only if it actually is a signature! I forgot a conditional, oops! Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> (cherry picked from commit a0c4790e15a2d3fab8d830eee8fcd639fe6d39c9) - - - - - 6725c060 by Herbert Valerio Riedel at 2017-04-25T17:02:20+02:00 `html-test --accept` deltas to reference samples - - - - - 7d444d61 by Alex Biehl at 2017-04-26T07:13:50+02:00 Remove anything related to obsolete frames mode - - - - - b888972c by Alex Biehl at 2017-04-26T07:49:10+02:00 Cherry-picked remaining commits from haddock-2.17.4-release (#603) * Release haddock/haddock-api 2.17.4 and haddock-library 1.4.3 * Set version bounds for haddock-library NB: This allows GHC 8.2.1's base * Set version bounds for haddock & haddock-api The version bounds support GHC 8.2 * Merge (temporary) v2.17.3 branch into v2.17 This allows us to delete the v2.17.3 branch * Fixup changelog * Pin down haddock-api to a single version as otherwise `haddock`'s package version has no proper meaning * fix source-repo spec for haddock-api - - - - - 4161099b by Alex Biehl at 2017-04-26T11:11:20+02:00 Update changelog to reflect news in HEAD - - - - - eed72cb8 by Alex Biehl at 2017-04-26T11:11:20+02:00 Markdownify changelog - - - - - 5815cea1 by Alex Biehl at 2017-04-26T11:32:33+02:00 Bump to 2.18.0 (#605) - - - - - a551d558 by Alex Biehl at 2017-04-29T22:00:25+02:00 Update attoparsec-0.12.1.1 to attoparsec-0.13.1.0 - - - - - ea164a8d by Sergey Vinokurov at 2017-04-29T22:42:36+02:00 Improve error message - - - - - 2e10122f by Alex Biehl at 2017-04-30T10:07:46+02:00 Correctly remember collapsed sections (#608) Now the "collapsed" cookie stores which sections have changed state instead of which are collapsed. - - - - - f9b24d99 by Alex Biehl at 2017-05-01T17:40:36+02:00 Lazily decode docMap and argMap (#610) These are only used in case of a doc reexport so most of the time decoding these is wasted work. - - - - - 2372af62 by Alex Biehl at 2017-05-01T21:59:23+02:00 Fix Binary instance for InstalledInterface (#611) (#610) introduced lazy decoding for docs from InstalledInterface but forgot to remove the original calls to get and put_ - - - - - 6c633c13 by Nathan Collins at 2017-05-11T11:47:55+02:00 Improve documenation of Haddock markup (#614) * Improve documentation of Haddock markup. - document that Haddock supports inferring types top-level functions with without type signatures, but also explain why using this feature is discouraged. Looks like this feature has been around since version 2.0.0.0 in 2008! - rework the "Module description" section: - move the general discussion of field formatting to the section intro and add examples illustrating the prose for multiline fields. - mention that newlines are preserved in some multiline fields, but not in others (I also noticed that commas in the `Copyright` field are not preserved; I'll look into this bug later). - add a subsection for the module description fields documentation, and put the field keywords in code formatting (double back ticks) instead of double quotes, to be consistent with the typesetting of keywords in other parts of the documentation. - mention that "Named chunks" are not supported in the long-form "Module description" documentation. - fix formatting of keywords in the "Module attributes" section. Perhaps these errors were left over from an automatic translation to ReST from some other format as part of the transition to using Sphinx for Haddock documentation? Also, add a missing reference here; it just said "See ?"! - update footnote about special treatment for re-exporting partially imported modules not being implemented. In my tests it's not implemented at all -- I tried re-exporting both `import B hiding (f)` and `import B (a, b)` style partial imports, and in both cases got the same result as with full imports `import B`: I only get a module reference. * Rework the `Controlling the documentation structure` section. My main goal was to better explain how to use Haddock without an export list, since that's my most common use case, but I hope I improved the section overall: - remove the incomplete `Omitting the export list` section and fold it into the other sections. In particular, summarize the differences between using and not using an export list -- i.e. control over what and in what order is documented -- in the section lead. - add "realistic" examples that use the structure markup, both with and without an export list. I wanted a realistic example here to capture how it can be useful to explain the relationship between a group of functions in a section, in addition to documenting their individual APIs. - make it clear that you can associate documentation chunks with documentation sections when you aren't using an export list, and that doing it in the most obvious way -- i.e. with `-- |`, as you can in the export list -- doesn't work without an export list. It took me a while to figure this out the first time, since the docs didn't explain it at all before. - add a "no export list" example to the section header section. - add more cross references. * Add examples of gotchas for markup in `@...@`. I'm not sure this will help anyone, since I think most people first learn about `@...@` by reading other people's Haddocks, but I've documented the mistakes which I've made and then gotten confused by. * Use consistent Capitalization of Titles. Some titles were in usual title caps, and others only had the first word capitalized. I chose making them all use title caps because that seems to make the cross references look better. - - - - - d4734f45 by Ben Gamari at 2017-05-12T20:36:08+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 93883f37 by Alex Biehl at 2017-05-12T21:02:33+02:00 Haddock: Fix broken lazy IO in prologue reading (#615) We previously used withFile in conjunction with hGetContents. The list returned by the latter wasn't completely forced by the time we left the withFile block, meaning that we would try to read from a closed handle. - - - - - 5b8f179c by Alex Biehl at 2017-05-13T12:48:10+02:00 Consequently use inClass and notInClass in haddock-library (#617) These allow attoparsec to do some clever lookup optimization - - - - - 77984b82 by Doug Wilson at 2017-05-27T17:37:38+02:00 Don't enable compilation for template haskell (#624) This is no longer necessary after ghc commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa - - - - - 5a3de2b4 by Doug Wilson at 2017-05-27T19:54:53+02:00 Improve Syb code (#621) Specialize.hs and Ast.hs are modified to have their Syb code not recurse into Name or Id in HsSyn types. Specialize.hs is refactored to have fewer calls to Syb functions. Syb.hs has some foldl calls replaced with foldl' calls. There is still a lot of performance on the floor of Ast.hs. The RenamedSource is traversed many times, and lookupBySpan is very inefficient. everywhereBut and lookupBySpan dominate the runtime whenever --hyperlinked-source is passed. - - - - - 3d35a949 by Alex Biehl at 2017-05-30T19:01:37+02:00 Clear fixme comment (#625) - - - - - 2a44bd0c by Alex Biehl at 2017-05-30T19:02:12+02:00 Make haddock-library and haddock-api warning free (#626) - - - - - bd1a0e42 by Alex Biehl at 2017-06-01T10:40:33+02:00 Include `driver-test/*.hs` sdist (#630) This lead to haskell/haddock#629. - - - - - 184a3ab6 by Doug Wilson at 2017-06-03T12:02:08+02:00 Disable pattern match warnings (#628) This disables the pattern match checker which can be very expensive in some cases. The disabled warnings include: * Opt_WarnIncompletePatterns * Opt_WarnIncompleteUniPatterns * Opt_WarnIncompletePatternsRecUpd * Opt_WarnOverlappingPatterns - - - - - 0cf68004 by Alex Biehl at 2017-06-03T20:37:28+02:00 Allow user defined signatures for pattern synonyms (#631) - - - - - 7f51a58a by Alex Biehl at 2017-06-04T11:56:38+02:00 Use NameSet for isExported check (#632) - - - - - d8f044a9 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Match new AST as per GHC wip/new-tree-one-param See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow - - - - - da1254e3 by Alan Zimmerman at 2017-06-05T22:26:55+02:00 Rename extension index tags - - - - - 538c7514 by Christiaan Baaij at 2017-06-09T08:26:43+02:00 Haddock support for bundled pattern synonyms (#627) * Haddock support for bundled pattern synonyms * Add fixities to bundled pattern synonyms * Add bundled pattern synonyms to the synopsis * Store bundled pattern fixities in expItemFixities * Add test for bundled pattern synonyms * Stop threading fixities * Include bundled pattern synonyms for re-exported data types Sadly, fixity information isn't found for re-exported data types * Support for pattern synonyms * Modify tests after haskell/haddock#631 * Test some reexport variations * Also lookup bundled pattern synonyms from `InstalledInterface`s * Check isExported for bundled pattern synonyms * Pattern synonym is exported check * Always look for pattern synonyms in the current module Another overlooked cornercase * Account for types named twice in export lists Also introduce a fast function for nubbing on a `Name` and use it throughout the code base. * correct fixities for reexported pattern synonyms * Fuse concatMap and map * Remove obsolete import * Add pattern synonyms to visible exports * Fix test * Remove corner case - - - - - a050bffd by Doug Wilson at 2017-06-21T09:27:33+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#636) There is some performance improvement. GHC compiler: | version | bytes allocated | cpu_seconds --------------------------------- | before | 56057108648 | 41.0 | after | 51592019560 | 35.1 base: | version | bytes allocated | cpu_seconds --------------------------------- | before | 25174011784 | 14.6 | after | 23712637272 | 13.1 Cabal: | version | bytes allocated | cpu_seconds --------------------------------- | before | 18754966920 | 12.6 | after | 18198208864 | 11.6 - - - - - 5d06b871 by Doug Wilson at 2017-06-22T20:23:29+02:00 Use new function getNameToInstancesIndex instead of tcRnGetInfo (#639) * Use new function getNameToInstancesIndex instead of tcRnGetInfo There is some significant performance improvement in the ghc testsuite. haddock.base: -23.3% haddock.Cabal: -16.7% haddock.compiler: -19.8% * Remove unused imports - - - - - b11bb73a by Alex Biehl at 2017-06-23T14:44:41+02:00 Lookup fixities for reexports without subordinates (#642) So we agree that reexported declarations which do not have subordinates (for example top-level functions) shouldn't have gotten fixities reexported according to the current logic. I wondered why for example Prelude.($) which is obviously reexported from GHC.Base has fixities attached (c.f. http://hackage.haskell.org/package/base-4.9.1.0/docs/Prelude.html#v:-36-). The reason is this: In mkMaps we lookup all the subordinates of top-level declarations, of course top-level functions don't have subordinates so for them the resulting list is empty. In haskell/haddock#644 I established the invariant that there won't be any empty lists in the subordinate map. Without the patch from haskell/haddock#642 top-level functions now started to fail reexporting their fixities. - - - - - d2a6dad6 by Alex Biehl at 2017-06-23T18:30:45+02:00 Don't include names with empty subordinates in maps (#644) These are unecessary anyway and just blow up interface size - - - - - 69c2aac4 by Alex Biehl at 2017-06-29T19:54:49+02:00 Make per-argument docs for class methods work again (#648) * Make per-argument docs for class methods work again * Test case - - - - - c9448d54 by Bartosz Nitka at 2017-07-02T12:12:01+02:00 Fix haddock: internal error: links: UnhelpfulSpan (#561) * Fix haddock: internal error: links: UnhelpfulSpan This fixes haskell/haddock#554 for me. I believe this is another fall out of `wildcard-refactor`, like haskell/haddock#549. * Comment to clarify why we take the methods name location - - - - - d4f29eb7 by Alex Biehl at 2017-07-03T19:43:04+02:00 Document record fields when DuplicateRecordFields is enabled (#649) - - - - - 9d6e3423 by Yuji Yamamoto at 2017-07-03T22:37:58+02:00 Fix test failures on Windows (#564) * Ignore .stack-work * Fix for windows: use nul instead of /dev/null * Fix for windows: canonicalize line separator * Also normalize osx line endings - - - - - 7d81e8b3 by Yuji Yamamoto at 2017-07-04T16:13:12+02:00 Avoid errors on non UTF-8 Windows (#566) * Avoid errors on non UTF-8 Windows Problem ==== haddock exits with errors like below: `(1)` ``` haddock: internal error: <stderr>: hPutChar: invalid argument (invalid character) ``` `(2)` ``` haddock: internal error: Language\Haskell\HsColour\Anchors.hs: hGetContents: invalid argument (invalid byte sequence) ``` `(1)` is caused by printing [the "bullet" character](http://www.fileformat.info/info/unicode/char/2022/index.htm) onto stderr. For example, this warning contains it: ``` Language\Haskell\HsColour\ANSI.hs:62:10: warning: [-Wmissing-methods] • No explicit implementation for ‘toEnum’ • In the instance declaration for ‘Enum Highlight’ ``` `(2)` is caused when the input file of `readFile` contains some Unicode characters. In the case above, '⇒' is the cause. Environment ---- OS: Windows 10 haddock: 2.17.3 GHC: 8.0.1 Solution ==== Add `hSetEncoding handle utf8` to avoid the errors. Note ==== - I found the detailed causes by these changes for debugging: - https://github.com/haskell/haddock/commit/8f29edb6b02691c1cf4c479f6c6f3f922b35a55b - https://github.com/haskell/haddock/commit/1dd23bf2065a1e1f2c14d0f4abd847c906b4ecb4 - These errors happen even after executing `chcp 65001` on the console. According to the debug code, `hGetEncoding stderr` returns `CP932` regardless of the console encoding. * Avoid 'internal error: <stderr>: hPutChar: invalid argument (invalid character)' non UTF-8 Windows Better solution for 59411754a6db41d17820733c076e6a72bcdbd82b's (1) - - - - - eded67d2 by Alex Biehl at 2017-07-07T19:17:15+02:00 Remove redudant import warning (#651) - - - - - 05114757 by Alex Biehl at 2017-07-08T00:33:12+02:00 Avoid missing home module warning (#652) * Avoid missing home module warning * Update haddock-library.cabal - - - - - e9cfc902 by Bryn Edwards at 2017-07-17T07:51:20+02:00 Fix haskell/haddock#249 (#655) - - - - - eb02792b by Herbert Valerio Riedel at 2017-07-20T09:09:15+02:00 Fix compilation of lib:haddock-library w/ GHC < 8 - - - - - 9200bfbc by Alex Biehl at 2017-07-20T09:20:38+02:00 Prepare 2.18.1 release (#657) - - - - - 46ddd22c by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Tweak haddock-api.cabal for pending release - - - - - 85e33d29 by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Avoid trivial use of LambdaCase otherwise we can't test w/ e.g. GHC 7.4.2 - - - - - 3afb4bfe by Herbert Valerio Riedel at 2017-07-20T10:05:14+02:00 Refactor .cabal to use sub-lib for vendored lib A practical benefit is that we can control the build-depends and also avoid some recompilation between library and test-suite. - - - - - e56a552e by Herbert Valerio Riedel at 2017-07-20T10:17:48+02:00 haddock-api: add changelog pointing to haddock's changelog This addresses https://github.com/haskell/haddock/issues/638#issuecomment-309283297 - - - - - 2222ff0d by Herbert Valerio Riedel at 2017-07-20T10:19:56+02:00 Drop obsolete/misleading `stability: experimental` This .cabal property has long been considered obsolete - - - - - 9b882905 by Alex Biehl at 2017-07-20T11:25:54+02:00 Beef up haddock description (#658) * Beef up haddock description * Handle empty lines - - - - - bb60e95c by Herbert Valerio Riedel at 2017-07-20T12:08:53+02:00 Import @aisamanra's Haddock cheatsheet from https://github.com/aisamanra/haddock-cheatsheet - - - - - 0761e456 by Herbert Valerio Riedel at 2017-07-20T12:12:55+02:00 Add cheatsheet to haddock.cabal - - - - - 2ece0f0f by Herbert Valerio Riedel at 2017-07-20T12:18:38+02:00 Mention new-build in README - - - - - 947b7865 by Herbert Valerio Riedel at 2017-07-20T12:32:16+02:00 Update README Also improves markup and removes/fixes redundant/obsolete parts [skip ci] - - - - - 785e09ad by Alex Biehl at 2017-07-27T07:28:57+02:00 Bump haddock to 2.18.2, haddock-library to 1.4.5 - - - - - e3ff1ca3 by Alex Biehl at 2017-07-31T20:15:32+02:00 Move `DocMarkup` from haddock-api to haddock-library (#659) * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG - - - - - cda7c20c by Alex Biehl at 2017-07-31T20:35:49+02:00 Fixup haddock - - - - - 583b6812 by Alex Biehl at 2017-07-31T21:20:45+02:00 Changelog for haddock-library - - - - - bac6a0eb by Alex Biehl at 2017-07-31T21:50:24+02:00 Prepare haddock-library-1.4.5 release - - - - - 58ce6877 by Moritz Drexl at 2017-08-05T16:44:40+02:00 Fix renaming after instance signature specializing (#660) * rework rename * Add regression test for Bug 613 * update tests * update changelog - - - - - b8137ec8 by Tim Baumann at 2017-08-06T11:33:38+02:00 Fix: Generate pattern signatures for constructors exported as patterns (#663) * Fix pretty-printing of pattern signatures Pattern synonyms can have up to two contexts, both having a different semantic meaning: The first holds the constraints required to perform the matching, the second contains the constraints provided by a successful pattern match. When the first context is empty but the second is not it is necessary to render the first, empty context. * Generate pattern synonym signatures for ctors exported as patterns This fixes haskell/haddock#653. * Simplify extractPatternSyn It is not necessary to generate the simplest type signature since it will be simplified when pretty-printed. * Add changelog entries for PR haskell/haddock#663 * Fix extractPatternSyn error message - - - - - d037086b by Alex Biehl at 2017-08-06T12:43:25+02:00 Bump haddock-library - - - - - 99d7e792 by Alex Biehl at 2017-08-06T12:44:07+02:00 Bump haddock-library in haddock-api - - - - - 94802a5b by Alex Biehl at 2017-08-06T13:18:02+02:00 Provide --show-interface option to dump interfaces (#645) * WIP: Provide --show-interface option to dump interfaces Like ghcs own --show-iface this flag dumps a binary interface file to stdout in a human (and machine) readable fashion. Currently it uses json as output format. * Fill all the jsonNull stubs * Rework Bifunctor instance of DocH, update changelog and documentation * replace changelog, bring DocMarkupH doc back * Update CHANGES.md * Update CHANGES.md * Move Control.Arrow up It would result in unused import if the Bifunctor instance is not generated. - - - - - c662e476 by Ryan Scott at 2017-08-14T21:00:21-04:00 Adapt to haskell/haddock#14060 - - - - - b891eb73 by Alex Biehl at 2017-08-16T08:24:48+02:00 Bifoldable and Bitraversable for DocH and MetaDoc - - - - - 021bb56c by Alex Biehl at 2017-08-16T09:06:40+02:00 Refactoring: Make doc renaming monadic This allows us to later throw warnings if can't find an identifier - - - - - 39fbf022 by Alex Biehl at 2017-08-19T20:35:27+02:00 Hyperlinker: Avoid linear lookup in enrichToken (#669) * Make Span strict in Position * Hyperlinker: Use a proper map to enrich tokens - - - - - e13baedd by Alex Biehl at 2017-08-21T20:05:42+02:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 27dd6e87 by Alex Biehl at 2017-08-21T22:06:35+02:00 Drop Avails from export list - - - - - 86b247e2 by Alex Biehl at 2017-08-22T08:44:22+02:00 Bump ghc version for haddock-api tests - - - - - d4607ca0 by Alex Biehl at 2017-08-22T08:45:17+02:00 Revert "Drop Avails from export list" This reverts commit a850ba86d88a4fb9c0bd175453a2580e544e3def. - - - - - c9c54c30 by Alex Biehl at 2017-08-22T09:26:01+02:00 IntefaceFile version - - - - - a85b7c02 by Ben Gamari at 2017-08-22T09:29:52-04:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 34e976f5 by Ben Gamari at 2017-08-22T17:40:06+02:00 haddock: Add Documentation.Haddock.Markup to other-modules - - - - - 577abf06 by Ryan Scott at 2017-08-23T14:47:29-04:00 Update for haskell/haddock#14131 - - - - - da68fc55 by Florian Eggenhofer at 2017-08-27T18:21:56+02:00 Generate an index for package content search (#662) Generate an index for package content search - - - - - 39e62302 by Alex Biehl at 2017-08-27T18:50:16+02:00 Content search for haddock html doc - - - - - 91fd6fb2 by Alex Biehl at 2017-08-28T18:39:58+02:00 Fix tests for content search - - - - - b4a3798a by Alex Biehl at 2017-08-28T18:44:08+02:00 Add search button to #page-menu - - - - - 25a7ca65 by Alex Biehl at 2017-08-28T18:47:43+02:00 Load javascript below the fold - - - - - 8d323c1a by Alex Biehl at 2017-08-28T18:49:22+02:00 Accept tests - - - - - c5dac557 by Alex Biehl at 2017-08-28T19:14:55+02:00 Content search css - - - - - 89a5af57 by Paolo Veronelli at 2017-08-29T07:42:13+02:00 Removed `nowrap` for interface method sigs (#674) with nowrap the interfaces method sigs would expand at libitum - - - - - a505f6f7 by Alex Biehl at 2017-08-29T08:05:33+02:00 Include subordinates in content index - - - - - 4bb698c4 by Alexander Biehl at 2017-08-29T11:40:19+02:00 QuickNav: Make docbase configurable - - - - - c783bf44 by Alexander Biehl at 2017-08-29T11:48:36+02:00 QuickNav: Also use baseUrl for doc-index.json request - - - - - 47017510 by Alex Biehl at 2017-08-29T17:56:47+02:00 Fix test fallout (again) - - - - - 924fc318 by Alex Biehl at 2017-08-30T09:24:56+02:00 Write meta.json when generating html output (#676) - - - - - 717dea52 by Alex Biehl at 2017-09-01T09:20:34+02:00 Use relative URL when no docBaseUrl given - - - - - e5d85f3b by Alex Biehl at 2017-09-01T09:35:19+02:00 Add missing js files to data-files (#677) - - - - - 95b9231a by Alex Biehl at 2017-09-01T11:01:36+02:00 Rename "Search" tab to "Quick Jump" - - - - - da0ead0b by Alex Biehl at 2017-09-01T13:03:49+02:00 Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger - - - - - de7da594 by Ben Gamari at 2017-09-05T06:49:55-04:00 Account for "Remember the AvailInfo for each IE" As of GHC commit f609374a55bdcf3b79f3a299104767aae2ffbf21 GHC retains the AvailInfo associated with each IE. @alexbiehl has a patch making proper use of this change, but this is just to keep things building. - - - - - b05cd3b3 by Ben Gamari at 2017-09-14T07:55:07-04:00 Bump upper bound on base - - - - - 79db899e by Herbert Valerio Riedel at 2017-09-21T23:27:52+02:00 Make compatible with Prelude.<> export in GHC 8.4/base-4.11 - - - - - 3405dd52 by Tim Baumann at 2017-09-23T22:02:01+02:00 Add compile step that bundles and compresses JS files (#684) * Add compile step that bundles and compresses JS files Also, manage dependencies on third-party JS libraries using NPM. * Compile JS from TypeScript * Enable 'noImplicitAny' in TypeScript * QuickJump: use JSX syntax * Generate source maps from TypeScript for easier debugging * TypeScript: more accurate type * Separate quick jump css file from ocean theme - - - - - df0b5742 by Alex Biehl at 2017-09-29T21:15:40+02:00 Bump base for haddock-library and haddock-test - - - - - 62b12ea0 by Merijn Verstraaten at 2017-10-04T16:03:13+02:00 Inhibit output of coverage information for hidden modules. (#687) * Inhibit output of coverage information for hidden modules. * Add changelog entry. - - - - - 8daf8bc1 by Alexander Biehl at 2017-10-05T11:27:05+02:00 Don't use subMap in attachInstances - - - - - ad75114e by Alexander Biehl at 2017-10-05T11:27:58+02:00 Revert "Don't use subMap in attachInstances" This reverts commit 3adf5bcb1a6c5326ab33dc77b4aa229a91d91ce9. - - - - - 7d4aa02f by Alex Biehl at 2017-10-08T15:32:28+02:00 Precise Haddock: Use Avails for export resolution (#688) * Use Avails for export resolution * Support reexported modules * Factor out availExportItem * Use avails for fullModuleExports * Don't use subMap in attachInstances * lookupDocs without subMap * Completely remove subMap * Only calculate unqualified modules when explicit export list is given * Refactor * Refine comment * return * Fix * Refactoring * Split avail if declaration is not exported itself * Move avail splitting - - - - - b9b4faa8 by Alex Biehl at 2017-10-08T19:38:21+02:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 43325295 by Alex Biehl at 2017-10-08T20:18:46+02:00 Fix merge fallout - - - - - c6423cc0 by Alex Biehl at 2017-10-08T20:36:12+02:00 Copy QuickJump files over - - - - - 1db587c3 by Tim Baumann at 2017-10-09T18:33:09+02:00 Use <details> element for collapsibles (#690) * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes haskell/haddock#560. - - - - - 1b54c64b by Tim Baumann at 2017-10-10T09:50:59+02:00 Quick Jump: Show error when loading 'doc-index.json' failed (#691) - - - - - 910f716d by Veronika Romashkina at 2017-10-24T07:36:20+02:00 Fix tiny typo in docs (#693) - - - - - b21de7e5 by Ryan Scott at 2017-10-24T13:07:15+02:00 Overhaul Haddock's rendering of kind signatures (#681) * Overhaul Haddock's rendering of kind signatures * Strip off kind signatures when specializing As an added bonus, this lets us remove an ugly hack specifically for `(->)`. Yay! * Update due to 0390e4a0f61e37bd1dcc24a36d499e92f2561b67 * @alexbiehl's suggestions * Import injectiveVarsOfBinder from GHC - - - - - 6704405c by Ryan Scott at 2017-10-28T07:10:27+02:00 Fix Haddock rendering of kind-indexed data family instances (#694) - - - - - 470f6b9c by Alex Biehl at 2017-10-30T08:45:51+01:00 Add QuickJump version to meta.json (#696) - - - - - b89eccdf by Alex Biehl at 2017-10-30T10:15:49+01:00 Put Quickjump behind --quickjump flag (#697) - - - - - 3095fb58 by Alex Biehl at 2017-10-30T19:09:06+01:00 Add build command to package.json - - - - - f223fda9 by Alex Biehl at 2017-10-30T19:10:39+01:00 Decrease threshold for fuzzy matching - - - - - 80245dda by Edward Z. Yang at 2017-10-31T20:35:05+01:00 Supported reexported-modules via --reexport flag. Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu> - - - - - 7e389742 by Alex Biehl at 2017-10-31T20:37:56+01:00 Correct missing title in changelog - - - - - 1a2a1c03 by Alex Biehl at 2017-10-31T20:59:07+01:00 Copy quickjump.css for nicer error messages - - - - - db234bb9 by Alex Biehl at 2017-10-31T21:31:18+01:00 Reexported modules: Report warnings if argument cannot be parsed or ... module cannot be found - - - - - eea8a205 by Carlo Hamalainen at 2017-10-31T21:43:14+01:00 More general type for nameCacheFromGhc. (#539) - - - - - 580eb42a by Alex Biehl at 2017-10-31T21:46:52+01:00 Remote tab - - - - - 0e599498 by Alex Biehl at 2017-10-31T21:48:55+01:00 Merge remote-tracking branch 'origin/master' into ghc-head - - - - - 7b8539bb by Alex Biehl at 2017-10-31T22:28:34+01:00 fullModuleContents traverses exports in declaration order - - - - - 0c91fbf2 by Alex Biehl at 2017-10-31T22:32:31+01:00 Remove excessive use of list comprehensions - - - - - f7356e02 by Alex Biehl at 2017-11-01T19:11:03+01:00 Make better use of AvailInfo - - - - - f3e512d5 by Alex Biehl at 2017-11-02T12:16:22+01:00 Always return documentation for exported subordinates ... event if they have no documentation (e.g. noDocForDecl) By using the information in the AvailInfo we don't need additional export checks. - - - - - 7cf58898 by Alan Zimmerman at 2017-11-07T08:28:03+02:00 Match changes for Trees that Grow in GHC - - - - - e5105a41 by Alan Zimmerman at 2017-11-08T17:21:58+02:00 Match Trees That Grow - - - - - 55178266 by Alan Zimmerman at 2017-11-11T22:20:31+02:00 Match Trees that Grow in GHC for HsExpr - - - - - 2082ab02 by Ryan Scott at 2017-11-14T15:27:03+01:00 Actually render infix type operators as infix (#703) * Actually render infix type operators as infix * Account for things like `(f :*: g) p`, too - - - - - c52ab7d0 by Alan Zimmerman at 2017-11-14T23:14:26+02:00 Clean up use of PlaceHolder, to match TTG - - - - - 81cc9851 by Moritz Angermann at 2017-11-20T07:52:49+01:00 Declare use of `Paths_haddock` module in other-modules (#705) This was detected by `-Wmissing-home-modules` - - - - - f9d27598 by Moritz Angermann at 2017-11-20T12:47:34+01:00 Drop Paths_haddock from ghc.mk (#707) With haskell/haddock#705 and haskell/haddock#706, the custom addition should not be necessary any more. # Conflicts: # ghc.mk - - - - - f34818dc by Moritz Angermann at 2017-11-20T12:47:59+01:00 Add autogen-modules (#706) > Packages using 'cabal-version: >= 1.25' and the autogenerated module Paths_* must include it also on the 'autogen-modules' field besides 'exposed-modules' and 'other-modules'. This specifies that the module does not come with the package and is generated on setup. Modules built with a custom Setup.hs script also go here to ensure that commands like sdist don't fail. # Conflicts: # haddock.cabal - - - - - bb43a0aa by Ben Gamari at 2017-11-21T15:50:12-05:00 Revert "Clean up use of PlaceHolder, to match TTG" This reverts commit 134a7bb054ea730b13c8629a76232d73e3ace049. - - - - - af9ebb2b by Ben Gamari at 2017-11-21T15:50:14-05:00 Revert "Match Trees that Grow in GHC for HsExpr" This reverts commit 9f054dc365379c66668de6719840918190ae6e44. - - - - - 5d35c3af by Ben Gamari at 2017-11-21T15:50:15-05:00 Revert "Match Trees That Grow" This reverts commit 73a26af844ac50b8bec39de11d64452a6286b00c. - - - - - 99a8e43b by Ben Gamari at 2017-11-21T16:36:06-05:00 Revert "Match changes for Trees that Grow in GHC" This reverts commit 01eeeb048acd2dd05ff6471ae148a97cf0720547. - - - - - c4d650c2 by Ben Gamari at 2017-12-04T15:06:07-05:00 Bump GHC version - - - - - 027b2274 by Ben Gamari at 2017-12-04T17:06:31-05:00 Bump GHC bound to 8.4.* - - - - - 58eaf755 by Alex Biehl at 2017-12-06T15:44:24+01:00 Update changelog - - - - - d68f5584 by Simon Peyton Jones at 2017-12-07T14:39:56+00:00 Track changes to follow Trac haskell/haddock#14529 This tracks the refactoring of HsDecl.ConDecl. - - - - - dc519d6b by Alec Theriault at 2018-01-06T08:20:43-08:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - 8285118c by Alec Theriault at 2018-01-13T12:12:37+01:00 Constructor and pattern synonym argument docs (#709) * Support Haddocks on constructor arguments This is in conjunction with https://phabricator.haskell.org/D4094. Adds support for rendering Haddock's on (non-record) constructor arguments, both for regular and GADT constructors. * Support haddocks on pattern synonym arguments It appears that GHC already parsed these - we just weren't using them. In the process of doing this, I tried to deduplicate some code around handling patterns. * Update the markup guide Add some information about the new support for commenting constructor arguments, and mention pattern synonyms and GADT-style constructors. * Overhaul LaTeX support for data/pattern decls This includes at least * fixing several bugs that resulted in invalid LaTeX * fixing GADT data declaration headers * overhaul handling of record fields * overhaul handling of GADT constructors * overhaul handling of bundled patterns * add support for constructor argument docs * Support GADT record constructors This means changes what existing HTML docs look like. As for LaTeX, looks like GADT records were never even supported. Now they are. * Clean up code/comments Made code/comments consistent between the LaTeX and XHTML backend when possible. * Update changelog * Patch post-rebase regressions * Another post-rebase change We want return values to be documentable on record GADT constructors. - - - - - ca4fabb4 by Alec Theriault at 2018-01-15T17:12:18-08:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 4c472fea by Ryan Scott at 2018-01-19T10:44:02+01:00 Fix haskell/haddock#732 (#733) - - - - - bff14dbd by Alex Biehl at 2018-01-19T15:33:30+01:00 extractDecl: Extract associated types correctly (#736) - - - - - a2a94a73 by Alex Biehl at 2018-01-19T15:34:40+01:00 extractDecl: Extract associated types correctly (#736) - - - - - 26df93dc by Alex Biehl at 2018-01-20T10:18:22+01:00 haddock-api: bump ghc to ^>= 8.4 - - - - - f65aeb1d by Alex Biehl at 2018-01-20T19:18:20+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - 0e721b97 by Alex Biehl at 2018-01-20T19:20:19+01:00 Fix duplicate declarations and TypeFamilies specifics - - - - - cb6234f6 by Ben Gamari at 2018-01-26T13:40:55-05:00 Merge remote-tracking branch 'harpocrates/fix/missing-orphan-instances' into ghc-head - - - - - 0fc28554 by Alec Theriault at 2018-02-01T14:58:18+01:00 Pass to GHC visible modules for instance filtering The GHC-side `getNameToInstancesIndex` filters out incorrectly some instances because it is not aware of what modules are visible. On the Haddock side, we need to pass in the modules we are processing. On the GHC side, we need to check against _those_ modules when checking if an instance is visible. - - - - - b9123772 by Alec Theriault at 2018-02-01T14:58:18+01:00 Update the GblRdrEnv when processing modules Without a complete environment, we will miss some instances that were encountered during typechecking. - - - - - 0c12e274 by Ryan Scott at 2018-02-01T14:58:18+01:00 Fix haskell/haddock#548 by rendering datatype kinds more carefully (#702) - - - - - 8876d20b by Alec Theriault at 2018-02-01T14:58:18+01:00 Use the GHC lexer for the Hyperlinker backend (#714) * Start changing to use GHC lexer * better cpp * Change SrcSpan to RealSrcSpan * Remove error * Try to stop too many open files * wip * wip * Revert "wip" This reverts commit b605510a195f26315e3d8ca90e6d95a6737553e1. Conflicts: haddock-api/haddock-api.cabal haddock-api/src/Haddock/Interface.hs * Remove pointless 'caching' * Use dlist rather than lists when finding vars * Use a map rather than list * Delete bogus comment * Rebase followup Things now run using the GHC lexer. There are still - stray debug statements - unnecessary changes w.r.t. master * Cleaned up differences w.r.t. current Haddock HEAD Things are looking good. quasiquotes in particular look beautiful: the TH ones (with Haskell source inside) colour/link their contents too! Haven't yet begun to check for possible performance problems. * Support CPP and top-level pragmas The support for these is hackier - but no more hacky than the existing support. * Tests pass, CPP is better recognized The tests were in some cases altered: I consider the new output to be more correct than the old one.... * Fix shrinking of source without tabs in test * Replace 'Position'/'Span' with GHC counterparts Replaces 'Position' -> 'GHC.RealSrcLoc' and 'Span' -> 'GHC.RealSrcSpan'. * Nits * Forgot entry in .cabal * Update changelog - - - - - 95c6a771 by Alec Theriault at 2018-02-01T14:58:18+01:00 Clickable anchors for headings (#716) See haskell/haddock#579. This just adds an <a> tag around the heading, pointing to the heading itself. - - - - - 21463d28 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump: Matches on function names weight more than matches in ... module names. - - - - - 8023af39 by Alex Biehl at 2018-02-01T14:58:18+01:00 Treat escaped \] better in definition lists (#717) This fixes haskell/haddock#546. - - - - - e4866dc1 by Alex Biehl at 2018-02-01T14:58:18+01:00 Remove scanner, takeWhile1_ already takes care of escaping - - - - - 9bcaa49d by Alex Biehl at 2018-02-01T14:58:18+01:00 Take until line feed - - - - - 01d2af93 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Add simple framework for running parser fixtures (#668) * Add simple framework for running parser fixtures * Compatible with tree-diff-0.0.0.1 * Use parseParas to parse fixtures This allows to test all syntactic constructs available in haddock markup. - - - - - 31128417 by Alec Theriault at 2018-02-01T14:58:18+01:00 Patch flaky parser test (#720) * Patch flaky parser test This test was a great idea, but it doesn't port over too well to using the GHC lexer. GHC rewrites its input a bit - nothing surprising, but we need to guard against those cases for the test. * Change instance head * Change use site - - - - - 9704f214 by Herbert Valerio Riedel at 2018-02-01T14:58:18+01:00 Include secondary LICENSE file in source dist - - - - - 51f25074 by Oleg Grenrus at 2018-02-01T14:58:18+01:00 Grid Tables (#718) * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example - - - - - 670d6200 by Alex Biehl at 2018-02-01T14:58:18+01:00 Add grid table example to cheatsheet (pdf and svg need to be regenerated thought) - - - - - 4262dec9 by Alec Theriault at 2018-02-01T14:58:18+01:00 Fix infinite loop when specializing instance heads (#723) * Fix infinite loop when specializing instance heads The bug can only be triggered from TH, hence why it went un-noticed for so long. * Add test for haskell/haddock#679 and haskell/haddock#710 - - - - - 67ecd803 by Alec Theriault at 2018-02-01T14:58:18+01:00 Filter RTS arguments from 'ghc-options' arguments (#725) This fixes haskell/haddock#666. - - - - - 7db26992 by Alex Biehl at 2018-02-01T14:58:18+01:00 Quickjump Scrollable overlay - - - - - da9ff634 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Hyperlinker: Adjust parser to new PFailed constructor - - - - - 7b7cf8cb by Alexander Biehl at 2018-02-01T14:58:18+01:00 Specialize: Add missing IdP annotations - - - - - 78cd7231 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Convert: Correct pass type - - - - - a2d0f590 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Warning free compilation - - - - - cd861cf3 by Alexander Biehl at 2018-02-01T14:58:18+01:00 hadock-2.19.0 / haddock-api-2.19.0 / haddock-library-1.5.0 - - - - - c6651b72 by Alexander Biehl at 2018-02-01T14:58:18+01:00 Adjust changelogs - - - - - 1e93da0b by Alexander Biehl at 2018-02-01T14:58:18+01:00 haddock-library: Info about breaking changes - - - - - f9b11db8 by Alec Theriault at 2018-02-02T12:36:02+01:00 Properly color pragma contents in hyperlinker The hyperlinker backend now classifies the content of pragmas as 'TkPragma'. That means that in something like '{-# INLINE foo #-}', 'foo' still gets classified as a pragma token. - - - - - c40b0043 by Alec Theriault at 2018-02-02T12:36:02+01:00 Support the new 'ITcolumn_prag' token - - - - - 4a2a4d39 by Alex Biehl at 2018-02-03T12:11:55+01:00 QuickJump: Mitigate encoding problems on Windows - - - - - bb34503a by Alex Biehl at 2018-02-04T18:39:31+01:00 Use withBinaryFile - - - - - 637605bf by Herbert Valerio Riedel at 2018-02-05T09:48:32+01:00 Try GHC 8.4.1 for Travis CI job - - - - - 7abb67e4 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 try harder to build w/ GHC 8.4.1 - - - - - 8255cc98 by Herbert Valerio Riedel at 2018-02-05T10:05:42+01:00 Add `SPDX-License-Identifier` as alised for "license" module header tokens C.f. SPDX 2.1 - Appendix V https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b The tag should appear on its own line in the source file, generally as part of a comment. SPDX-License-Identifier: <SPDX License Expression> Cherry-picked from haskell/haddock#743 - - - - - 267cd23d by Herbert Valerio Riedel at 2018-02-05T10:24:34+01:00 Make test-suite SMP compatible - - - - - 95d4bf40 by Alec Theriault at 2018-02-05T22:01:04+01:00 Hyperlink pattern synonyms and 'module' imports (#744) Links to pattern synonyms are now generated, as well as links from modules in import lists. Fixes haskell/haddock#731. - - - - - 67838dcd by Alec Theriault at 2018-02-06T08:23:36+01:00 Don't warn about missing '~' (#746) This manually filters out '~' from the list of things to warn about. It truly makes no sense to warn on this since '~' has nothing it could link to - it is magical. This fixes haskell/haddock#532. - - - - - ab6c3f9f by Alec Theriault at 2018-02-06T08:24:47+01:00 Don't barf on 'HsSpliceTy' (#745) This handles 'HsSpliceTy's by replacing them with what they expand to. IIUC everything that is happening, 'renameHsSpliceTy' should not be able to fail for the inputs we feed it from GHC. This fixes haskell/haddock#574. - - - - - 92bf95ad by Alex Biehl at 2018-02-06T08:28:23+01:00 Rename: renameHsSpliceTy ttg - - - - - 3130b1e1 by Alex Biehl at 2018-02-06T09:02:14+01:00 Expand SigDs - - - - - c72adae5 by Alex Biehl at 2018-02-06T09:20:51+01:00 fullModuleContents: support named docs - - - - - de2e4dbf by Alex Biehl at 2018-02-06T13:56:17+01:00 Hyperlinker: Also link pattern synonym arguments - - - - - b7c98237 by Alex Biehl at 2018-02-09T18:44:23+01:00 Expand SigD in a better place In https://github.com/haskell/haddock/issues/287 we found that haddock-2.19.0 would miss documentation on class methods with multiples names. This patch uses expandSigDecls in a more sensible place. - - - - - 8f598b27 by Alec Theriault at 2018-02-11T12:29:56+01:00 Add module tooltips to linked identifiers (#753) No more clicking to figure out whether your bytestring is strict or lazy! - - - - - d812e65d by Alec Theriault at 2018-02-11T12:31:44+01:00 Add 'show' option to complement 'hide' (#752) * Add 'show' option to complement 'hide' The behaviour is for flags passed in the command line to override flags in file headers. In the command line, later flags override earlier ones. Fixes haskell/haddock#751 and haskell/haddock#266. * Add a '--show-all' option - - - - - 6676cecb by Alex Biehl at 2018-02-18T11:07:15-05:00 QuickJump: Mitigate encoding problems on Windows (cherry picked from commit 86292c54bfee2343aee84559ec01f1fc68f52231) - - - - - e753dd88 by Alex Biehl at 2018-02-18T17:59:54+01:00 Use withBinaryFile - - - - - 724dc881 by Tamar Christina at 2018-02-19T05:34:49+01:00 Haddock: support splitted include paths. (#689) - - - - - 9b6d6f50 by Alex Biehl at 2018-02-19T05:57:02+01:00 Teach the HTML backend how to render methods with multiple names - - - - - a74aa754 by Alexander Biehl at 2018-02-19T10:04:34+01:00 Hoogle/Latex: Remove use of partial function - - - - - 66d8bb0e by Alec Theriault at 2018-02-25T16:04:01+01:00 Fix file handle leak (#763) (#764) Brought back some mistakenly deleted code for handling encoding and eager reading of files from e0ada1743cb722d2f82498a95b201f3ffb303137. - - - - - bb92d03d by Alex Biehl at 2018-03-02T14:21:23+01:00 Enable running test suite with stock haddock and ghc using ``` $ cabal new-run -- html-test --haddock-path=$(which haddock) --ghc-path=$(which ghc) ``` - - - - - dddb3cb2 by Alex Biehl at 2018-03-02T15:43:21+01:00 Make testsuite work with haddock-1.19.0 release (#766) - - - - - f38636ed by Alec Theriault at 2018-03-02T15:48:36+01:00 Support unicode operators, proper modules Unicode operators are a pretty big thing in Haskell, so supporting linking them seems like it outweighs the cost of the extra machinery to force Attoparsec to look for unicode. Fixes haskell/haddock#458. - - - - - 09d89f7c by Alec Theriault at 2018-03-02T15:48:43+01:00 Remove bang pattern - - - - - d150a687 by Alex Biehl at 2018-03-02T15:48:48+01:00 fix test - - - - - d6fd71a5 by Alex Biehl at 2018-03-02T16:22:38+01:00 haddock-test: Be more explicit which packages to pass We now pass `-hide-all-packages` to haddock when invoking the testsuite. This ensures we don't accidentally pick up any dependencies up through ghc.env files. - - - - - 0932c78c by Alex Biehl at 2018-03-02T17:50:38+01:00 Revert "fix test" This reverts commit 1ac2f9569242f6cb074ba6e577285a4c33ae1197. - - - - - 52516029 by Alex Biehl at 2018-03-02T18:16:50+01:00 Fix Bug548 for real - - - - - 89df9eb5 by Alex Biehl at 2018-03-05T18:28:19+01:00 Hyperlinker: Links for TyOps, class methods and associated types - - - - - d019a4cb by Ryan Scott at 2018-03-06T13:43:56-05:00 Updates for haskell/haddock#13324 - - - - - 6d5a42ce by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump haddock-2.19.0.1, haddock-api-2.19.0.1, haddock-library-1.5.0.1 - - - - - c0e6f380 by Alex Biehl at 2018-03-10T18:25:57+01:00 Update changelogs for haddock-2.19.0.1 and haddock-library-1.5.0.1 - - - - - 500da489 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Update to QC 2.11 - - - - - ce8362e9 by Herbert Valerio Riedel at 2018-03-10T18:25:57+01:00 Restore backward-compat with base-4.5 through base-4.8 - - - - - baae4435 by Alex Biehl at 2018-03-10T18:25:57+01:00 Bump lower bound for haddock-library - - - - - 10b7a73e by Alex Biehl at 2018-03-10T18:25:57+01:00 Haddock: Straighten out base bound - - - - - a6096f7b by Alex Biehl at 2018-03-13T08:45:06+01:00 extractDecl: Extract constructor patterns from data family instances (#776) * extractDecl: Allow extraction of data family instance constructors * extractDecl: extract data family instance constructors - - - - - ba4a0744 by Simon Jakobi at 2018-03-14T08:26:42+01:00 Readme: Update GHC version (#778) - - - - - 8de157d4 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for definition lists - - - - - 425b46f9 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for links - - - - - d53945d8 by Simon Jakobi at 2018-03-14T20:39:29+01:00 Add fixture test for inline links - - - - - f1dc7c99 by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Slightly unmangle output - - - - - 0879d31c by Simon Jakobi at 2018-03-14T20:39:29+01:00 fixtures: Prevent stdout buffering - - - - - 1f9e5f1b by Simon Jakobi at 2018-03-14T20:39:29+01:00 haddock-library.cabal: Clean up GHC options - - - - - 066b891a by Simon Jakobi at 2018-03-14T20:39:29+01:00 Make a proper definition for the <link> parser - - - - - 573d6ba7 by Alec Theriault at 2018-03-21T09:16:57+01:00 Show where instances are defined (#748) * Indicate source module of instances Above instance, we now also display a link to the module where the instance was defined. This is sometimes helpful in figuring out what to import. * Source module for type/data families too * Remove parens * Accept tests - - - - - 99b5d28b by Alex Biehl at 2018-03-21T09:20:36+01:00 Prepare changelog for next release - - - - - 482d3a93 by Alex Biehl at 2018-03-23T15:57:36+01:00 Useful cost centres, timers and allocation counters (#785) * Add some useful cost-centres for profiling * Add withTiming for each haddock phase Invoking haddock with `--optghc=-ddump-timings` now shows the amount of time spent and the number of allocated bytes for each phase. - - - - - 773b41bb by Alec Theriault at 2018-03-27T08:35:59+02:00 @since includes package name (#749) * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too. - - - - - e42c57bc by Alex Biehl at 2018-03-27T08:42:50+02:00 haddock-2.19.1, haddock-api-2.19.1, haddock-library-1.6.0 - - - - - 8373a529 by Alex Biehl at 2018-03-28T10:17:11+02:00 Bump haddock and haddock-api to 2.20.0 - - - - - 5038eddd by Jack Henahan at 2018-04-03T13:28:12+02:00 Clear search string on hide for haskell/haddock#781 (#789) - - - - - 920ca1eb by Alex Biehl at 2018-04-03T16:35:50+02:00 Travis: Build with ghc-8.4.2 (#793) - - - - - a232f0eb by Alan Zimmerman at 2018-04-07T14:14:32+02:00 Match changes in GHC for D4199 Removing HasSourceText and SourceTextX classes. - - - - - ab85060b by Alan Zimmerman at 2018-04-09T21:20:24+02:00 Match GHC changes for TTG - - - - - 739302b6 by Alan Zimmerman at 2018-04-13T13:31:44+02:00 Match GHC for TTG implemented on HsBinds, D4581 - - - - - 2f56d3cb by Ryan Scott at 2018-04-19T11:42:58-04:00 Bump upper bound on base to < 4.13 See https://ghc.haskell.org/trac/ghc/ticket/15018. - - - - - a49df92a by Alex Biehl at 2018-04-20T07:31:44+02:00 Don't treat fixity signatures like declarations - - - - - d02c103b by Ryan Scott at 2018-04-24T11:20:11-04:00 Add regression test for haskell/haddock#413 Fixes haskell/haddock#413. - - - - - c7577f52 by Ryan Scott at 2018-04-24T13:51:06-07:00 Improve the Hoogle backend's treatment of type families (#808) Fixes parts 1 and 2 of haskell/haddock#806. - - - - - d88f85b1 by Alec Theriault at 2018-04-25T11:24:07-07:00 Replace 'attoparsec' with 'parsec' (#799) * Remove attoparsec with parsec and start fixing failed parses * Make tests pass * Fix encoding issues The Haddock parser no longer needs to worry about bytestrings. All the internal parsing work in haddock-library happens over 'Text'. * Remove attoparsec vendor * Fix stuff broken in 'attoparsec' -> 'parsec' * hyperlinks * codeblocks * examples Pretty much all issues are due to attoparsec's backtracking failure behaviour vs. parsec's non-backtracking failure behaviour. * Fix small TODOs * Missing quote + Haddocks * Better handle spaces before/after paragraphs * Address review comments - - - - - fc25e2fe by Alan Zimmerman at 2018-04-27T15:36:53+02:00 Match changes in GHC for TTG - - - - - 06175f91 by Herbert Valerio Riedel at 2018-05-01T18:11:09+02:00 Merge branch 'ghc-head' with 'ghc-8.4' - - - - - 879caaa8 by Alec Theriault at 2018-05-07T18:53:15-07:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 3e0120cb by Simon Jakobi at 2018-05-07T19:00:18-07:00 Add docs for some DocH constructors (#814) - - - - - 0a32c6db by Alec Theriault at 2018-05-08T02:15:45-07:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 8816e783 by Simon Jakobi at 2018-05-08T10:48:11-07:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - ad60366f by Ryan Scott at 2018-05-10T11:19:47-04:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - 03b7cc3b by Ryan Scott at 2018-05-10T11:24:38-04:00 Wibbles - - - - - b03dd563 by Chaitanya Koparkar at 2018-05-10T11:44:58-04:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 9f298a40 by Ben Gamari at 2018-05-13T17:36:04-04:00 Account for refactoring of LitString - - - - - ea3dabe7 by Ryan Scott at 2018-05-16T09:21:43-04:00 Merge pull request haskell/haddock#826 from haskell/T825 Remove Hoogle backend hack that butchers infix datatype names - - - - - 0d234f7c by Alec Theriault at 2018-05-23T11:29:05+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 15fc9712 by Simon Jakobi at 2018-05-31T04:17:47+02:00 Adjust to new HsDocString internals - - - - - 6f1e19a8 by Ben Gamari at 2018-06-02T16:18:58-04:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 0d0355d9 by Ryan Scott at 2018-06-04T21:26:59-04:00 DerivingVia changes - - - - - 0d93475a by Simon Jakobi at 2018-06-05T19:47:05+02:00 Bump a few dependency bounds (#845) - - - - - 5cbef804 by Alec Theriault at 2018-06-05T19:47:16+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 9094c56f by Alec Theriault at 2018-06-05T22:53:25+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 70188719 by Simon Jakobi at 2018-06-08T22:20:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - 495cd1fc by Chaitanya Koparkar at 2018-06-13T23:01:34+02:00 Use the response file utilities defined in `base` (#821) Summary: The response file related modules were recently copied from `haddock` into `base`. This patch removes them from `haddock`. GHC Trac Issues: haskell/haddock#13896 - - - - - 81088732 by Ben Gamari at 2018-06-13T23:01:34+02:00 Account for refactoring of LitString - - - - - 7baf6587 by Simon Jakobi at 2018-06-13T23:05:08+02:00 Adjust to new HsDocString internals - - - - - bb61464d by Ben Gamari at 2018-06-13T23:05:22+02:00 Remove ParallelArrays and Data Parallel Haskell - - - - - 5d8cb87f by Ryan Scott at 2018-06-13T23:39:30+02:00 DerivingVia changes - - - - - 73d373a3 by Alec Theriault at 2018-06-13T23:39:30+02:00 Extract docs from strict/unpacked constructor args (#839) This fixes haskell/haddock#836. - - - - - 4865e254 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Remove `ITtildehsh` token - - - - - b867db54 by Alec Theriault at 2018-06-13T23:39:30+02:00 Filter out CRLFs in hyperlinker backend (#813) This prevents spurious lines from appearing in the final output. - - - - - 9598e392 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Add docs for some DocH constructors (#814) - - - - - 8a59035b by Alec Theriault at 2018-06-13T23:39:30+02:00 Remove 'TokenGroup' from Hyperlinker (#818) Since the hyperlinker backend now relies on the GHC tokenizer, something like 'Bar.Baz.foo' already gets bunched together into one token (as opposed to being spread across 'Bar', '.', 'Baz', '.', and 'foo'). - - - - - 29350fc8 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about out of scope identifiers. (#819) - - - - - 2590bbd9 by Ryan Scott at 2018-06-13T23:39:30+02:00 Remove Hoogle backend hack that butchers infix datatype names - - - - - a9939fdc by Ryan Scott at 2018-06-13T23:39:30+02:00 Wibbles - - - - - a22f7df4 by Alec Theriault at 2018-06-13T23:39:30+02:00 Use `ClassOpSig` instead of `TypeSig` for class methods (#835) * Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix haskell/haddock#834. * Accept html-test output - - - - - 8741015d by Simon Jakobi at 2018-06-13T23:39:30+02:00 Bump a few dependency bounds (#845) - - - - - 4791e1cc by Alec Theriault at 2018-06-13T23:39:30+02:00 Improve hyperlinker's 'spanToNewline' (#846) 'spanToNewline' is used to help break apart the source into lines which can then be partioned into CPP and non-CPP chunks. It is important that 'spanToNewline' not break apart tokens, so it needs to properly handle things like * block comments, possibly nested * string literals, possibly multi-line * CPP macros, possibly multi-line String literals in particular were not being properly handled. The fix is to to fall back in 'Text.Read.lex' to help lex things that are not comments. Fixes haskell/haddock#837. - - - - - 311d3216 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Renamer: Warn about ambiguous identifiers (#831) * Renamer: Warn about ambiguous identifiers Example: Warning: 'elem' is ambiguous. It is defined * in ‘Data.Foldable’ * at /home/simon/tmp/hdk/src/Lib.hs:7:1 You may be able to disambiguate the identifier by qualifying it or by hiding some imports. Defaulting to 'elem' defined at /home/simon/tmp/hdk/src/Lib.hs:7:1 Fixes haskell/haddock#830. * Deduplicate warnings Fixes haskell/haddock#832. - - - - - d0577817 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Complete FixitySig and FamilyDecl pattern matches - - - - - 055b3aa7 by Simon Jakobi at 2018-06-13T23:39:30+02:00 Fix redundant import warnings - - - - - f9ce19b1 by Simon Jakobi at 2018-06-13T23:49:52+02:00 html-test: Accept output - - - - - 04604ea7 by Simon Jakobi at 2018-06-13T23:54:37+02:00 Bump bounds on Cabal - - - - - 0713b692 by Simon Jakobi at 2018-06-14T00:00:12+02:00 Merge branch 'ghc-head' into ghc-head-update-3 - - - - - c6a56bfd by Simon Jakobi at 2018-06-14T02:33:27+02:00 Bump ghc bound for haddock-api spec test-suite - - - - - 119d04b2 by Simon Jakobi at 2018-06-14T12:37:48+02:00 Travis: `--allow-newer` for all packages - - - - - 0e876e2c by Alex Biehl at 2018-06-14T15:28:52+02:00 Merge pull request haskell/haddock#857 from sjakobi/ghc-head-update-3 Update ghc-head - - - - - 5be46454 by Alec Theriault at 2018-06-14T21:42:45+02:00 Improved handling of interfaces in 'haddock-test' (#851) This should now work with an inplace GHC where (for instance) HTML directories may not be properly recorded in the package DB. - - - - - 96ab1387 by Vladislav Zavialov at 2018-06-14T17:06:21-04:00 Handle -XStarIsType - - - - - e518f8c4 by Ben Gamari at 2018-06-14T17:48:00-04:00 Revert unintentional reversion of fix of haskell/haddock#548 - - - - - 01b9f96d by Alan Zimmerman at 2018-06-19T11:52:22+02:00 Match changes in GHC for haskell/haddock#14259 - - - - - 7f8c8298 by Ben Gamari at 2018-06-19T18:14:27-04:00 Bump GHC version to 8.6 - - - - - 11c6b5d2 by Ryan Scott at 2018-06-19T23:17:31-04:00 Remove HsEqTy and XEqTy - - - - - b33347c2 by Herbert Valerio Riedel at 2018-06-20T23:14:52+02:00 Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. - - - - - f0d2460e by Herbert Valerio Riedel at 2018-06-20T23:28:46+02:00 Update Travis CI job - - - - - ef239223 by Herbert Valerio Riedel at 2018-06-20T23:32:41+02:00 Drop GHC HEAD from CI and update GHC to 8.4.3 It's a waste of resource to even try to build this branch w/ ghc-head; so let's not do that... - - - - - 41c4a9fa by Ben Gamari at 2018-06-20T18:26:20-04:00 Bump GHC version to 8.7 - - - - - 8be593dc by Herbert Valerio Riedel at 2018-06-21T22:32:15+02:00 Update CI job to use GHC 8.7.* - - - - - b91d334a by Simon Jakobi at 2018-06-30T13:41:38+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section - - - - - f707d848 by Alec Theriault at 2018-07-05T10:43:35-04:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. - - - - - a6d2b8dc by Alec Theriault at 2018-07-06T10:06:32-04:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case - - - - - 13819f71 by Alan Zimmerman at 2018-07-15T19:33:51+02:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 - - - - - c346aa78 by Simon Jakobi at 2018-07-19T12:29:32+02:00 haddock-library: Bump bounds for containers - - - - - 722e733c by Simon Jakobi at 2018-07-19T13:36:45+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] - - - - - f0bd83fd by Alec Theriault at 2018-07-19T14:39:57+02:00 Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. - - - - - 394053a8 by Simon Jakobi at 2018-07-19T14:58:07+02:00 haddock-library: Bump bounds for containers - - - - - 1bda11a2 by Alec Theriault at 2018-07-20T09:04:03+02:00 Add HEAD.hackage overlay (#887) * Add HEAD.hackage overlay * Add HCPKG variable - - - - - c7b4ab45 by Alec Theriault at 2018-07-20T12:01:16+02:00 Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test - - - - - c05d32ad by Alec Theriault at 2018-07-20T12:01:49+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output - - - - - 24b39ee4 by Alec Theriault at 2018-07-20T12:02:16+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. - - - - - cb9d2099 by Simon Jakobi at 2018-07-20T13:39:29+02:00 README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) - - - - - 133f24f5 by Alec Theriault at 2018-07-20T13:39:29+02:00 Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) - - - - - 11024149 by Alec Theriault at 2018-07-20T13:39:29+02:00 Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) - - - - - de0c139e by Simon Jakobi at 2018-07-20T13:39:29+02:00 tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) - - - - - 6435e952 by Alec Theriault at 2018-07-20T13:39:29+02:00 Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) - - - - - 1461af39 by Alec Theriault at 2018-07-20T13:39:29+02:00 Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) - - - - - 69d3bde1 by Alec Theriault at 2018-07-20T13:49:47+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) - - - - - 6a5c73c7 by Alec Theriault at 2018-07-20T13:50:00+02:00 Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests - - - - - 92ca94c6 by Alec Theriault at 2018-07-20T13:55:36+02:00 Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) - - - - - 981bc7fa by Simon Jakobi at 2018-07-20T15:06:06+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers - - - - - 27e7c0c5 by Simon Jakobi at 2018-07-20T15:09:05+02:00 Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 49e1a415 by Simon Jakobi at 2018-07-20T16:02:02+02:00 Update the ghc-8.6 branch (#889) * Revert "Bump GHC version to 8.6" This was applied to the wrong branch; there's now a `ghc-8.6` branch; ghc-head is always supposed to point to GHC HEAD, i.e. an odd major version. The next version bump to `ghc-head` is supposed to go from e.g. 8.5 to 8.7 This reverts commit 5e3cf5d8868323079ff5494a8225b0467404a5d1. * README updates (#856) * README: Remove mentions of master branch * README: Add instructions for using html-test * README: Change command to run _all_ the testsuites * README: Add project overview section (cherry picked from commit 61d6f935da97eb96685f07bf385102c2dbc2a33c) * Export more fixities for Hoogle (#871) This exports fixities for more things, including class methods and type-level operators. (cherry picked from commit 88316b972e3d47197b1019111bae0f7f87275fce) * Avoid line breaks due to line length in Hoogle (#868) * Avoid line breaks due to line length in Hoogle Hoogle operates in a line-oriented fashion, so we should avoid ever breaking due to long lines. One way of doing this non-intrusively is to modify the 'DynFlags' that are threaded through the 'Hoogle' module (note this is anyways only passed through for use in the various 'showSDoc' functions). * Amend test case (cherry picked from commit 657b1b3d519545f8d4ca048c06210d6cbf0f0da0) * tyThingToLHsDecl: Preserve type synonyms that contain a forall (#880) * tyThingToLHsDecls: Preserve type synonyms that contain a forall Fixes haskell/haddock#879. * Add Note [Invariant: Never expand type synonyms] * Clarify Note [Invariant: Never expand type synonyms] (cherry picked from commit c3eb3f0581f69e816f9453b1747a9f2a3ba02bb9) * Fix HEAD html-test (#860) * Update tests for 'StarIsType' * Accept tests * Revert "Update tests for 'StarIsType'" This reverts commit 7f0c01383bbba6dc5af554ee82988d2cf44e407a. * Refactor handling of parens in types (#874) * Fix type parenthesization in Hoogle backend Ported the logic in the HTML and LaTeX backends for adding in parens into something top-level in 'GhcUtil'. Calling that from the Hoogle backend fixes haskell/haddock#873. * Remove parenthesizing logic from LaTeX and XHTML backends Now, the only times that parenthesis in types are added in any backend is through the explicit 'HsParTy' constructor. Precedence is also represented as its own datatype. * List out cases explicitly vs. catch-all * Fix printing of parens for QuantifiedConstraints The priority of printing 'forall' types was just one too high. Fixes haskell/haddock#877. * Accept HTML output for quantified contexts test * Preserve docs on type family instances (#867) * Preserve docs on type family instances The only problem was that the instance location was slightly off for type family instances. * Accept output (cherry picked from commit 133e9c2c168db19c1135479f7ab144c4e33af2a4) * Fix broken instance source links (#869) The problem manifests itself in instances that are defined in modules other than the module where the class is defined. The fix is just to thread through the 'Module' of the instance further along. Since orphan instances appear to already have been working, I didn't do anything there. (cherry picked from commit 2de7c2acf9b1ec85b09027a8bb58bf8512e91c05) * Add some more unicode related tests (#872) This has been fixed for sure ever since we switched from attoparsec to parsec. Parts of it may have been working before that, but there was a point where this would have failed (see haskell/haddock#191). A regression test never hurt anyone. :) (cherry picked from commit 5ec7715d418bfac0f26aec6039792a99a6e89370) * Misc tests (#858) * More tests * spliced types * constructor/pattern argument docs * strictness marks on fields with argument docs * latex test cases need seperate directory * Accept tests * Additional tests for the identifier parser (#816) * Add tests for the identifier parser * docs: Clarify how to delimit identifiers (cherry picked from commit 0861affeca4d72938f05a2eceddfae2c19199071) - - - - - 5ca14bed by Simon Jakobi at 2018-07-20T16:05:47+02:00 Revert "Revert "Bump GHC version to 8.6"" That commit didn't belong onto the ghc-8.6 branch. This reverts commit acbaef3b9daf1d2dea10017964bf886e77a8e967. - - - - - 2dd600dd by Simon Jakobi at 2018-07-20T16:18:21+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. - - - - - fceb2422 by Simon Jakobi at 2018-07-20T16:18:21+02:00 outOfScope: Recommend qualifying the identifier - - - - - acea5d23 by Simon Jakobi at 2018-07-20T16:19:35+02:00 outOfScope: Recommend qualifying the identifier (cherry picked from commit 73707ed58d879cc04cb644c5dab88c39ca1465b7) - - - - - 1a83ca55 by Simon Jakobi at 2018-07-20T16:19:35+02:00 Don't warn about ambiguous identifiers when the candidate names belong to the same type This also changes the defaulting heuristic for ambiguous identifiers. We now prefer local names primarily, and type constructors or class names secondarily. Partially fixes haskell/haddock#854. (cherry picked from commit d504a2864a4e1982e142cf88c023e7caeea3b76f) - - - - - 48374451 by Masahiro Sakai at 2018-07-20T17:06:42+02:00 Add # as a special character (#884) '#' has special meaning used for anchors and can be escaped using backslash. Therefore it would be nice to be listed as special characters. - - - - - 5e1a5275 by Alec Theriault at 2018-07-20T23:37:24+02:00 Let `haddock-test` bypass interface version check (#890) This means `haddock-test` might * crash during deserialization * deserialize incorrectly Still - it means things _might_ work where they were previously sure not to. - - - - - 27286754 by Yuji Yamamoto at 2018-07-23T08:16:01+02:00 Avoid "invalid argument (invalid character)" on non-unicode Windows (#892) Steps to reproduce and the error message ==== ``` > stack haddock basement ... snip ... Warning: 'A' is out of scope. Warning: 'haddock: internal error: <stdout>: commitBuffer: invalid argument (invalid character) ``` Environment ==== OS: Windows 10 ver. 1709 haddock: [HEAD of ghc-8.4 when I reproduce the error](https://github.com/haskell/haddock/commit/532b209d127e4cecdbf7e9e3dcf4f653a5605b5a). (I had to use this version to avoid another probrem already fixed in HEAD) GHC: 8.4.3 stack: Version 1.7.1, Git revision 681c800873816c022739ca7ed14755e85a579565 (5807 commits) x86_64 hpack-0.28.2 Related pull request ==== https://github.com/haskell/haddock/pull/566 - - - - - 6729d361 by Alec Theriault at 2018-07-23T13:52:56-07:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). - - - - - 8cf4e6b5 by Ryan Scott at 2018-07-27T11:28:03-04:00 eqTyCon_RDR now lives in TysWiredIn After GHC commit http://git.haskell.org/ghc.git/commit/f265008fb6f70830e7e92ce563f6d83833cef071 - - - - - 1ad251a6 by Alan Zimmerman at 2018-07-30T13:28:09-04:00 Match XFieldOcc rename in GHC Trac haskell/haddock#15386 (cherry picked from commit e3926b50ab8a7269fd6904b06e881745f08bc5d6) - - - - - 8aea2492 by Richard Eisenberg at 2018-08-02T10:54:17-04:00 Update against new HsImplicitBndrs - - - - - e42cada9 by Alec Theriault at 2018-08-04T17:51:30+02:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 0e852512 by Alex Biehl at 2018-08-06T13:04:02+02:00 Make --package-version optional for --hoogle generation (#899) * Make --package-version optional for --hoogle generation * Import mkVersion * It's makeVersion not mkVersion - - - - - d2abd684 by Noel Bourke at 2018-08-21T09:34:18+02:00 Remove unnecessary backslashes from docs (#908) On https://haskell-haddock.readthedocs.io/en/latest/markup.html#special-characters the backslash and backtick special characters showed up with an extra backslash before them – I think the escaping is not (or no longer) needed for those characters in rst. - - - - - 7a578a9e by Matthew Pickering at 2018-08-21T09:34:50+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - aa3d4db3 by Matthew Pickering at 2018-08-21T09:37:34+02:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 - - - - - ede91744 by Alec Theriault at 2018-08-21T09:42:52+02:00 Better test output when Haddock crashes on a test (#902) In particular: we report the tests that crashed seperately from the tests that produced incorrect output. In order for tests to pass (and exit 0), they must not crash and must produce the right output. - - - - - 4a872b84 by Guillaume Bouchard at 2018-08-21T09:45:57+02:00 Fix a typo (#878) - - - - - 4dbf7595 by Ben Sklaroff at 2018-08-21T12:04:09-04:00 Add ITcomment_line_prag token to Hyperlinker Parser This token is necessary for parsing #line pragmas inside nested comments. Reviewers: bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D4935 - - - - - 9170b2a9 by Ben Gamari at 2018-08-21T17:55:15-04:00 Merge pull request haskell/haddock#893 from harpocrates/get-name-to-instances Accumulate explicitly which modules to load for 'attachInstances' - - - - - d57b57cc by Ben Gamari at 2018-08-21T17:59:13-04:00 Merge branch 'ghc-head' of github.com:haskell/haddock into ghc-head - - - - - 14601ca2 by Alec Theriault at 2018-08-21T19:09:37-04:00 Accumulate explicitly which modules to load for 'attachInstances' The old approach to fixing haskell/haddock#469, while correct, consumes a lot of memory. We ended up with a HUGE 'GblRdrEnv' in 'ic_rn_gbl_env'. However, 'getNameToInstancesIndex' takes that environment and compresses it down to a much smaller 'ModuleSet'. Now, we compute that 'ModuleSet' explicitly as we process modules. That way we can just tell 'getNameToInstancesIndex' what modules to load (instead of it trying to compute that information from the interactive context). (cherry picked from commit 5c7c596c51d69b92164e9ba920157b36ce2b2ec1) - - - - - 438c645e by Matthew Pickering at 2018-08-21T19:12:39-04:00 Load plugins when starting a GHC session (#905) Fixes haskell/haddock#900 (cherry picked from commit e6aa8fb47b9477cc5ef5e46097524fe83e080f6d) - - - - - a80c5161 by Alec Theriault at 2018-08-21T22:06:40-07:00 Better rendering of unboxed sums/tuples * adds space after/before the '#' marks * properly reify 'HsSumTy' in 'synifyType' - - - - - 88456cc1 by Alec Theriault at 2018-08-21T22:06:40-07:00 Handle promoted tuples in 'synifyType' When we have a fully applied promoted tuple, we can expand it out properly. - - - - - fd1c1094 by Alec Theriault at 2018-08-21T22:19:34-07:00 Accept test cases - - - - - 6e80d9e0 by Alec Theriault at 2018-08-21T22:24:03-07:00 Merge pull request haskell/haddock#914 from harpocrates/feature/unboxed-stuff Better rendering of unboxed sums, unboxed tuples, promoted tuples. - - - - - 181a23f1 by Ben Gamari at 2018-08-23T15:53:48-04:00 Merge remote-tracking branch 'origin/ghc-8.6' into ghc-8.6 - - - - - 3a18c1d8 by Alec Theriault at 2018-08-27T14:15:25-07:00 Properly synify promoted list types We reconstruct promoted list literals whenever possible. That means that 'synifyType' produces '[Int, Bool, ()] instead of (Int ': (() ': (Bool ': ([] :: [Type])))) - - - - - b4794946 by Alec Theriault at 2018-09-03T07:19:55-07:00 Only look at visible types when synifying a 'HsListTy' The other types are still looked at when considering whether to make a kind signature or not. - - - - - a231fce2 by Alec Theriault at 2018-09-03T07:38:10-07:00 Merge pull request haskell/haddock#922 from harpocrates/promoted-lists Properly synify promoted list types - - - - - 0fdf044e by Ningning Xie at 2018-09-15T10:25:58-04:00 Update according to GHC Core changes - - - - - 7379b115 by Ningning Xie at 2018-09-15T15:40:18-04:00 update dataFullSig to work with Co Quantification This should have been in the previous patch, but wasn't. - - - - - cf84a046 by Alec Theriault at 2018-09-17T20:12:18-07:00 Fix/add to various docs * Add documentation for a bunch of previously undocumented options (fixes haskell/haddock#870) * Extend the documentation of `--hoogle` considerably (see haskell/haddock#807) * Describe how to add docs to `deriving` clauses (fixes haskell/haddock#912) * Fix inaccurate docs about hyperlinking infix identifiers (fixes haskell/haddock#780) - - - - - ae017935 by Alec Theriault at 2018-09-22T08:32:16-07:00 Update Travis - - - - - d95ae753 by Alec Theriault at 2018-09-22T09:34:10-07:00 Accept failing tests Also silence orphan warnings. - - - - - f3e67024 by Alec Theriault at 2018-09-22T09:41:23-07:00 Bump haddock-api-2.21.0, haddock-library-1.7.0 * Update CHANGELOGS * Update new versions in Cabal files * Purge references to ghc-8.4/master branches in README - - - - - 3f136d4a by Alec Theriault at 2018-09-22T10:53:31-07:00 Turn haddock-library into a minor release Fix some version bounds in haddock-library too. - - - - - b9def006 by Alec Theriault at 2018-09-22T13:07:35-07:00 keep cabal.project file - - - - - 4909aca7 by Alec Theriault at 2018-10-16T09:36:30-07:00 Build on 7.4 and 7.8 - - - - - 99d20a28 by Herbert Valerio Riedel at 2018-10-16T18:45:52+02:00 Minor tweak to package description - - - - - a8059618 by Herbert Valerio Riedel at 2018-10-16T18:47:24+02:00 Merge pull request haskell/haddock#945 haddock-api 2.21.0 and haddock-library 1.6.1 release - - - - - 2d9bdfc1 by Alec Theriault at 2018-10-16T10:54:21-07:00 Bump haddock-library to 1.7.0 The 1.6.1 release should've been a major bump, since types in the `Documentation.Haddock.Parser.Monad` module changed. This version makes that module internal (as it morally should be). - - - - - ed340cef by Alec Theriault at 2018-10-16T14:59:13-07:00 Merge branch 'ghc-8.4' into ghc-8.6 - - - - - 2821a8df by Alec Theriault at 2018-10-16T15:14:48-07:00 Merge branch 'ghc-8.6' into ghc-head - - - - - a722dc84 by Alec Theriault at 2018-10-16T16:28:55-07:00 Latex type families (#734) * Support for type families in LaTeX The code is ported over from the XHTML backend. * Refactor XHTML and LaTeX family handling This is mostly a consolidation effort: stripping extra exports, inlining some short definitions, and trying to make the backends match. The LaTeX backend now has preliminary support for data families, although the only the data instance head is printed (not the actual constructors). Both backends also now use "newtype" for newtype data family instances. * Add some tests - - - - - 63377496 by Alec Theriault at 2018-10-16T16:39:07-07:00 Update changelog - - - - - 099a0110 by Alec Theriault at 2018-10-16T16:49:28-07:00 Merge pull request haskell/haddock#942 from harpocrates/update-docs Fix & add to documentation - - - - - 0927416f by Alec Theriault at 2018-10-16T16:50:14-07:00 Set UTF-8 encoding before writing files (#934) This should fix haskell/haddock#929, as well as guard against future problems of this sort in other places. Basically replaces 'writeFile' (which selects the users default locale) with 'writeUtf8File' (which always uses utf8). - - - - - 83b7b017 by Alec Theriault at 2018-10-16T17:42:05-07:00 Output pattern synonyms in Hoogle backend (#947) * Output pattern synonyms in Hoogle backend We were previously weren't outputting _any_ pattern synonyms, bundled or not. Now, we output both. Fixes haskell/haddock#946. * Update changelog - - - - - 81e5033d by Alec Theriault at 2018-10-16T18:04:40-07:00 Release `haddock{,-api}-2.22.0` This version will accompany ghc-8.6.2 - - - - - 9661744e by Alex Biehl at 2018-10-18T08:14:32-07:00 Add NewOcean theme And make it the default theme. - - - - - 7ae6d722 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Improve appearance and readability These changes include: - use latest Haskell's logo colors - decrease #content width to improve readability - use nicer font - improve sizes and distances - - - - - 37f8703d by NunoAlexandre at 2018-10-18T08:14:32-07:00 Include custom font in the html head - - - - - 1d5e1d79 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Update html test reference files - - - - - 53b7651f by NunoAlexandre at 2018-10-18T08:14:32-07:00 Make it responsive - It makes small screens taking more space than larger ones - fixes a few issues present in small screens currently - make it look good across different screen sizes. - - - - - 6aa1aeb1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make the style consistent with hackage Several things are addressed here: - better responsive behaviour on the header - better space usage - consistent colors overall - other nit PR comments - - - - - 3a250c5c by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Place the package name before the menu links This supports the expected responsive menu design, where the package name appears above the menu links. - - - - - cae699b3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update html-test reference files The package name element in the package-header is now a div instead of a paragraph, and it is now above the menu ul.links instead of below. - - - - - 2ec7fd2d by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve synopsis style and code - Use CSS3 instead of loading pictures to show "+" and "-" symbols - Drop redundant code - - - - - 0c874c01 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Decrease space between code blocks There was too much space between code blocks as pointed out by reviewers. - - - - - 85568ce2 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Add an initial-scale property to all haddock pages This solves an issue reported about the content looking incredibly small on mobile devices. - - - - - c1538926 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Address several PR comments - Darken text color like done for hackage - Move synopsis to left side - Make table of contents stick to the left on wide screens - Wrap links to avoid page overflow - Improve expand/collapse buttons - Fix issue with content size on mobile devices - Fix issue with font-size on landscape mode - Increase width of the content - Change colors of table of contents and synopsis - Etc - - - - - e6639e5f by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make synopsis scrollable on wide screens When the synopsis is longer than the screen, you can’t see its end and you can't scroll down either, making the content unreachable. - - - - - 1f0591ff by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve information density - Reduce font size - Improve space between and within code blocks - Improve alignments - Improve spacing within sub-blocks - - - - - bf083097 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Minor adjustments Bring in some adjustments made to hackage: - link colors - page header show everything when package title is too long - - - - - 10375fc7 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix responsive triggers overlap issue The min and max width triggers have the same values, which caused the style resolution to take an intersection of both style declarations when the screen resolution had the size of the limts (say 1280px), causing an odd behaviour and look. - - - - - 95ff2f95 by NunoAlexandre at 2018-10-18T08:14:32-07:00 Fix issue with menu alignment on firefox Reported and described here: https://github.com/haskell/haddock/pull/721#issuecomment-374668869 - - - - - dc86587e by Alex Biehl at 2018-10-18T08:14:32-07:00 Changelog entry for NewOcean - - - - - 27195e47 by Herbert Valerio Riedel at 2018-10-18T08:14:32-07:00 html-test --accept - - - - - 83f4f9c0 by Alex Biehl at 2018-10-18T08:14:32-07:00 Avoid name shadowing - - - - - 231487f1 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font to PT Sans Also migrate some general text related changes from hackage. - - - - - 313db81a by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Use 'flex' to fix header alignment - - - - - 5087367b by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Misc of tweaks - Update link colors to hackage scheme - Tune spacing between content elements - Update footer style - Fix and improve code blocks identation - - - - - b08020df by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update font in Xhtml.hs to PT Sans - - - - - 78ce06e3 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Improve code blocks styling - Fix and improve spacing - Improve colors and borders - - - - - 81262d20 by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Make package-header caption backward-compatible The current html generator of this branch wraps the package-header caption as a div, which does not work (without style adjustments) with the old themes. Changing it from div to span does the trick, without needing to adjust the old stylesheets. - - - - - dc4475cb by Nuno Alexandre at 2018-10-18T08:14:32-07:00 Update test-suite reference html pages - - - - - 393d35d8 by Alec Theriault at 2018-10-18T08:25:36-07:00 Accept tests - - - - - a94484ba by Alec Theriault at 2018-10-21T10:29:29-07:00 Fix CHANGELOG - - - - - 8797eca3 by Alec Theriault at 2018-10-21T10:36:19-07:00 Update 'data-files' to include NewOcean stuff - - - - - 1ae51e4a by Simon Jakobi at 2018-10-23T11:29:14+02:00 Fix typo in a warning - - - - - 009ad8e8 by Alec Theriault at 2018-10-24T12:47:47-07:00 Update JS dependencies This was done via `npm audit fix`. I think this fixes haskell/haddock#903 along with some more serious vulnerabilities that nobody seems to have noticed. - - - - - 051994db by Alec Theriault at 2018-10-24T17:31:09-07:00 Resurrect the style-switcher This fixes haskell/haddock#810. Looks like things were broken during the quickjump refactor of the JS. For the (git) record: I do not think the style switcher is a good idea. I'm fixing it for the same reason @mzero added it; as an answer to "rumblings from some that they didn't want their pixels changed on bit" - - - - - 2a1d620f by Alec Theriault at 2018-10-24T17:38:07-07:00 Fix copy-pasta error in data-files - - - - - ed5bfb7f by Alec Theriault at 2018-10-24T20:42:14-07:00 Fix the synopsis button Here's these changes are supposed to do: * put the synopsis back on the right side * properly have it on the edge of the screen on wide screens * adjust the background of the synopsis to match the button (otherwise the grey blends in with what is underneath) * get rid of the dotted purple line * the synopsis contents are now scrollable even when in wide screens (this has been a long-standing bug) - - - - - 883fd74b by Alec Theriault at 2018-10-25T20:16:46-07:00 Avoid more conflicts in generated ids (#954) This fixes haskell/haddock#953 by passing more names into the generated ids. - - - - - ea54e331 by Alec Theriault at 2018-10-25T21:07:12-07:00 Don't hide bullets in method docs I think thst CSS was meant only to deal with fields and the effect on bullets was accidental. Fixes haskell/haddock#926. - - - - - 9a14ef4a by Alec Theriault at 2018-10-25T22:02:07-07:00 Indent more things + slightly smaller font - - - - - b9f17e29 by Alec Theriault at 2018-10-25T22:10:01-07:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 096a3cfa by Alec Theriault at 2018-10-25T22:24:38-07:00 Accept HTML output - - - - - 2669517d by Alec Theriault at 2018-10-26T09:02:35-07:00 User manual + stuff for building GHC docs - - - - - 46b27687 by Alec Theriault at 2018-10-26T09:10:59-07:00 Make 'Contents' in NewOcean scrollable This only happens if the contents block on the left is so big that it doesn't fit (vertically) on the page. If that happens, we want it to be scrollable. - - - - - 3443dd94 by Alec Theriault at 2018-10-26T09:36:46-07:00 Revert "Make 'Contents' in NewOcean scrollable" This reverts commit f909ffd8353d6463fd5dd184998a32aa98d5c922. I missed the fact this also forces the 'Contents' to always go down to the bottom of the page. - - - - - ed081424 by Alec Theriault at 2018-10-26T14:22:23-07:00 Avoid some partiality AFAICT this wasn't causing any crashes, but that's mostly because we happen not to be forcing `pkgStr` when it would diverge. We come dangerously close to doing that in `ppHtmlIndex`. Fixes haskell/haddock#569. - - - - - 6a5bec41 by Alec Theriault at 2018-10-27T10:05:04-07:00 Fix documentation in `haddock-api` (#957) * Fix misplaced Haddocks in Haddock itself Haddock should be able to generate documentation for 'haddock-api' again. * Make CI check that documentation can be built. * Add back a doc that is OK - - - - - 5100450a by Matthew Yacavone at 2018-10-27T14:51:38-04:00 More explicit foralls (GHC Proposal 0007) - - - - - 8771a6b0 by Alec Theriault at 2018-11-05T13:58:11-08:00 Only run MathJax on entities with "mathjax" class (#960) Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes haskell/haddock#959. - - - - - bd7ff5c5 by Alec Theriault at 2018-11-05T15:54:22-08:00 Deduplicate some work in 'AttachInstances' Perf only change: * avoid needlessly union-ing maps * avoid synify-ing instances twice Took this opportunity to add some docs too - - - - - cf99fd8f by Alec Theriault at 2018-11-05T15:54:22-08:00 Specialize some SYB functions Perf only change: * Add a 'SPECIALIZE' pragma to help GHC optimize a 'Data a =>' constraint * Manually specialize the needlessly general type of 'specializeTyVarBndrs' - - - - - 4f91c473 by Alec Theriault at 2018-11-05T15:54:22-08:00 Improve perf of renaming Perf only change: * don't look up type variable names (they're never in the environment) * use a difference list for accumulating missing names * more efficient 'Functor'/'Applicative' instances for 'RnM' - - - - - 4bbab0d4 by Alec Theriault at 2018-11-05T15:54:22-08:00 Faster 'Text' driven parser combinators Perf only change: * use 'getParserState'/'setParserState' to make 'Text'-optimized parser combinators * minimize uses of 'Data.Text.{pack,unpack,cons,snoc}' - - - - - fa430c02 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support hyperlink labels with inline markup The parser for pictures hasn't been properly adjusted yet. - - - - - c1431035 by Alec Theriault at 2018-11-06T12:03:24-08:00 Support (and flatten) inline markup in image links Inline markup is supported in image links but, as per the [commonmark recommendation][0], it is stripped back to a plain text representation. [0]: https://spec.commonmark.org/0.28/#example-547 - - - - - d4ee1ba5 by Alec Theriault at 2018-11-06T12:03:24-08:00 Accept test case - - - - - 8088aeb1 by Alec Theriault at 2018-11-06T12:03:24-08:00 Fix/add to haddock-library test suite - - - - - e78f644d by Alec Theriault at 2018-11-06T13:26:31-08:00 Bump version bounds - - - - - 644335eb by Alec Theriault at 2018-11-06T13:53:30-08:00 Merge pull request haskell/haddock#875 from harpocrates/feature/markup-in-hyperlinks Inline markup in markdown-style links and images - - - - - e173ed0d by Alec Theriault at 2018-11-07T12:37:18-08:00 Fix issues around plus/minus * swap the minimize unicode to something more intuitive * use new unicode expander/collapser for instance lists * address some alignment issues in the "index" page - - - - - b2d92df7 by Alec Theriault at 2018-11-07T13:41:57-08:00 Allow "Contents" summary to scroll in a fixed div In the unfortunate event that the "Contents" summary doesn't fit vertically (like in the "Prelude"), it will be scrollable. - - - - - ca704c23 by Alec Theriault at 2018-11-07T13:45:15-08:00 Accept HTML output changes - - - - - 82c0ec6d by Alec Theriault at 2018-11-07T18:12:54-08:00 overflow-y 'scroll' -> 'auto' - - - - - 571d7657 by Alec Theriault at 2018-11-08T19:44:12-08:00 Clicking on "Contents" navigates to top of page - - - - - 8065a012 by Alec Theriault at 2018-11-08T19:44:17-08:00 Space out functions more Also, functions and data decls now have the same space before and after them. - - - - - cc650ede by Alec Theriault at 2018-11-09T08:13:35-08:00 Merge branch 'ghc-8.6' into wip/new-ocean - - - - - 65f8c17f by Alec Theriault at 2018-11-10T14:04:06-08:00 Update changelog - - - - - 20473847 by Alec Theriault at 2018-11-10T14:21:40-08:00 Replace oplus/ominus expander/collapser icons with triangles - - - - - 16592957 by Alec Theriault at 2018-11-10T14:35:10-08:00 Merge pull request haskell/haddock#949 from haskell/wip/new-ocean Introduce NewOcean theme. - - - - - 357cefe1 by Alec Theriault at 2018-11-10T16:02:13-08:00 Merge branch 'ghc-8.6' into ghc-head - - - - - de612267 by Alec Theriault at 2018-11-11T20:01:21-08:00 Rename 'NewOcean' theme to 'Linuwial' - - - - - 954b5baa by Alec Theriault at 2018-11-12T08:33:18-08:00 Add blockquote styling Matches b71da1feabf33efbbc517ac376bb690b5a604c2f from hackage-server. Fixes haskell/haddock#967. - - - - - d32c0b0b by Fangyi Zhou at 2018-11-12T10:24:13-08:00 Fix some broken links (#15733) Summary: For links in subpackages as well. https://phabricator.haskell.org/D5257 Test Plan: Manually verify links Reviewers: mpickering, bgamari, osa1 Reviewed By: osa1 GHC Trac Issues: haskell/haddock#15733 Differential Revision: https://phabricator.haskell.org/D5262 - - - - - 41098b1f by Alp Mestanogullari at 2018-11-15T22:40:09+01:00 Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change It got introduced in ghc/ghc at ae2c9b40f5b6bf272251d1f4107c60003f541b62. - - - - - c5c1c7e0 by Alec Theriault at 2018-11-15T13:48:13-08:00 Merge pull request haskell/haddock#970 from alpmestan/alp/fix-promotionflag Follow GHC HEAD's HsTypes.Promoted -> BasicTypes.PromotionFlag change - - - - - 6473d3a4 by Shayan-Najd at 2018-11-23T01:38:49+01:00 [TTG: Handling Source Locations] Foundation and Pat Trac Issues haskell/haddock#15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`) - - - - - 7a088dfe by Alec Theriault at 2018-11-26T11:11:28-08:00 More uniform handling of `forall`'s in HTML/LaTeX * don't forget to print explicit `forall`'s when there are arg docs * when printing an explicit `forall`, print all tyvars Fixes haskell/haddock#973 - - - - - d735e570 by Alec Theriault at 2018-12-12T08:42:09-08:00 Fix warnings, accept output * remove redundant imports (only brought to light due to recent work for improving redundant import detection) * fix a bug that was casuing exports to appear in reverse order * fix something in haddock-library that prevented compilation on old GHC's - - - - - a3852f8a by Zejun Wu at 2018-12-14T09:37:47-05:00 Output better debug infromation on internal error in extractDecl This will make investigation of haskell/haddock#979 easier - - - - - 2eccb5b9 by Alec Theriault at 2018-12-17T09:25:10-05:00 Refactor names + unused functions (#982) This commit should not introduce any change in functionality! * consistently use `getOccString` to convert `Name`s to strings * compare names directly when possible (instead of comparing strings) * get rid of unused utility functions - - - - - e82e4df8 by Alec Theriault at 2018-12-20T16:16:30-05:00 Load plugins when compiling each module (#983) * WIP: Load (typechecker) plugins from language pragmas * Revert "Load plugins when starting a GHC session (#905)" This reverts commit 72d82e52f2a6225686d9668790ac33c1d1743193. * Simplify plugin initialization code - - - - - 96e86f38 by Alec Theriault at 2018-12-23T10:23:20-05:00 Properly synify and render promoted type variables (#985) * Synify and render properly promoted type variables Fixes haskell/haddock#923. * Accept output - - - - - 23343345 by Alec Theriault at 2018-12-27T16:39:38-05:00 Remove `haddock-test`'s dep. on `syb` (#987) The functionality is easily inlined into one short function: `gmapEverywhere`. This doesn't warrant pulling in another package. - - - - - d0734f21 by Alec Theriault at 2018-12-27T16:39:52-05:00 Address deprecation warnings in `haddock-test` (#988) Fixes haskell/haddock#885. - - - - - 4d9f144e by mynguyen at 2018-12-30T23:42:26-05:00 Visible kind application haddock update - - - - - ffe0e9ed by Alec Theriault at 2019-01-07T13:55:22-08:00 Print kinded tyvars in constructors for Hoogle (#993) Fixes haskell/haddock#992 - - - - - 2e18b55d by Alec Theriault at 2019-01-10T16:42:45-08:00 Accept new output `GHC.Maybe` -> `Data.Maybe` (#996) Since 53874834b779ad0dfbcde6650069c37926da1b79 in GHC, "GHC.Maybe" is marked as `not-home`. That changes around some test output. - - - - - 055da666 by Gabor Greif at 2019-01-22T14:41:51+01:00 Lone typofix - - - - - 01bb71c9 by Alec Theriault at 2019-01-23T11:46:46-08:00 Keep forall on H98 existential data constructors (#1003) The information about whether or not there is a source-level `forall` is already available on a `ConDecl` (as `con_forall`), so we should use it instead of always assuming `False`! Fixes haskell/haddock#1002. - - - - - f9b9bc0e by Ryan Scott at 2019-01-27T09:28:12-08:00 Fix haskell/haddock#1004 with a pinch of dropForAlls - - - - - 5cfcdd0a by Alec Theriault at 2019-01-28T16:49:57-08:00 Loosen 'QuickCheck' and 'hspec' bounds It looks like the new versions don't cause any breakage and loosening the bounds helps deps fit in one stack resolver. - - - - - 3545d3dd by Alec Theriault at 2019-01-31T01:37:25-08:00 Use `.hie` files for the Hyperlinker backend (#977) # Summary This is a large architectural change to the Hyperlinker. * extract link (and now also type) information from `.hie` instead of doing ad-hoc SYB traversals of the `RenamedSource`. Also adds a superb type-on-hover feature (#715). * re-engineer the lexer to avoid needless string conversions. By going directly through GHC's `P` monad and taking bytestring slices, we avoid a ton of allocation and have better handling of position pragmas and CPP. In terms of performance, the Haddock side of things has gotten _much_ more efficient. Unfortunately, much of this is cancelled out by the increased GHC workload for generating `.hie` files. For the full set of boot libs (including `ghc`-the-library) * the sum of total time went down by 9-10% overall * the sum of total allocations went down by 6-7% # Motivation Haddock is moving towards working entirely over `.hi` and `.hie` files. This change means we no longer need the `RenamedSource` from `TypecheckedModule` (something which is _not_ in `.hi` files). # Details Along the way a bunch of things were fixed: * Cross package (and other) links are now more reliable (#496) * The lexer tries to recover from errors on every line (instead of at CPP boundaries) * `LINE`/`COLUMN` pragmas are taken into account * filter out zero length tokens before rendering * avoid recomputing the `ModuleName`-based `SrcMap` * remove the last use of `Documentation.Haddock.Utf8` (see haskell/haddock#998) * restructure temporary folder logic for `.hi`/`.hie` model - - - - - 2ded3359 by Herbert Valerio Riedel at 2019-02-02T12:06:12+01:00 Update/modernise haddock-library.cabal file - - - - - 62b93451 by Herbert Valerio Riedel at 2019-02-02T12:19:31+01:00 Tentatively declare support for unreleased base-4.13/ghc-8.8 - - - - - 6041e767 by Herbert Valerio Riedel at 2019-02-02T16:04:32+01:00 Normalise LICENSE text w/ cabal's BSD2 template Also, correct the `.cabal` files to advertise `BSD2` instead of the incorrect `BSD3` license. - - - - - 0b459d7f by Alec Theriault at 2019-02-02T18:06:12-08:00 CI: fetch GHC from validate artifact Should help make CI be less broken - - - - - 6b5c07cf by Alec Theriault at 2019-02-02T18:06:12-08:00 Fix some Hyperlinker test suite fallout * Amend `ParserSpec` to match new Hyperlinker API - pass in compiler info - strip out null tokens * Make `hypsrc-test` pass reliably - strip out `local-*` ids - strip out `line-*` ids from the `ClangCppBug` test - re-accept output - - - - - ded34791 by Nathan Collins at 2019-02-02T18:31:23-08:00 Update README instructions for Stack No need to `stack install` Haddock to test it. Indeed, `stack install` changes the `haddock` on user's `PATH` if `~/.local/bin` is on user's `PATH` which may not be desirable when hacking on Haddock. - - - - - 723298c9 by Alec Theriault at 2019-02-03T09:11:05-08:00 Remove `Documentation.Haddock.Utf8` The circumstances under which this module appeared are completely gone. The Hyperlinker backend no longer needs this module (it uses the more efficient `Encoding` module from `ghc`). Why no deprecation? Because this module really shouldn't exist! - It isn't used in `haddock-library`/`haddock-api` anymore - It was copy pasted directly from `utf8-string` - Folks seeking a boot-lib only solution can use `ghc`'s `Encoding` - - - - - 51050006 by Alec Theriault at 2019-02-03T22:58:58-08:00 Miscellaneous improvements to `Convert` (#1020) Now that Haddock is moving towards working entirely over `.hi` and `.hie` files, all declarations and types are going to be synthesized via the `Convert` module. In preparation for this change, here are a bunch of fixes to this module: * Add kind annotations to type variables in `forall`'s whose kind is not `Type`, unless the kind can be inferred from some later use of the variable. See `implicitForAll` and `noKindTyVars` in particular if you wish to dive into this. * Properly detect `HsQualTy` in `synifyType`. This is done by following suit with what GHC's `toIfaceTypeX` does and checking the first argument of `FunTy{} :: Type` to see if it classified as a given/wanted in the typechecker (see `isPredTy`). * Beef up the logic around figuring out when an explicit `forall` is needed. This includes: observing if any of the type variables will need kind signatures, if the inferred type variable order _without_ a forall will still match the one GHC claims, and some other small things. * Add some (not yet used) functionality for default levity polymorphic type signatures. This functionality similar to `fprint-explicit-runtime-reps`. Couple other smaller fixes only worth mentioning: * Show the family result signature only when it isn't `Type` * Fix rendering of implicit parameters in the LaTeX and Hoogle backends * Better handling of the return kind of polykinded H98 data declarations * Class decls produced by `tyThingToLHsDecl` now contain associated type defaults and default method signatures when appropriate * Filter out more `forall`'s in pattern synonyms - - - - - 841980c4 by Oleg Grenrus at 2019-02-04T08:44:25-08:00 Make a fixture of weird parsing of lists (#997) The second example is interesting. If there's a list directly after the header, and that list has deeper structure, the parser is confused: It finds two lists: - One with the first nested element, - everything after it I'm not trying to fix this, as I'm not even sure this is a bug, and not a feature. - - - - - 7315c0c8 by Ryan Scott at 2019-02-04T12:17:56-08:00 Fix haskell/haddock#1015 with dataConUserTyVars (#1022) The central trick in this patch is to use `dataConUserTyVars` instead of `univ_tvs ++ ex_tvs`, which displays the foralls in a GADT constructor in a way that's more faithful to how the user originally wrote it. Fixes haskell/haddock#1015. - - - - - ee0b49a3 by Ryan Scott at 2019-02-04T15:25:17-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. - - - - - 1c850dc8 by Alan Zimmerman at 2019-02-05T21:54:18+02:00 Matching changes in GHC for haskell/haddock#16236 - - - - - ab03c38e by Simon Marlow at 2019-02-06T08:07:33+00:00 Merge pull request haskell/haddock#1014 from hvr/pr/bsd2-normalise Normalise LICENSE text w/ cabal's BSD2 template - - - - - 5a92ccae by Alec Theriault at 2019-02-10T06:21:55-05:00 Merge remote-tracking branch 'gitlab/wip/T16236-2' into ghc-head - - - - - c0485a1d by Alec Theriault at 2019-02-10T03:32:52-08:00 Removes `haddock-test`s dependency on `xml`/`xhtml` (#1027) This means that `html-test`, `latex-test`, `hoogle-test`, and `hypsrc-test` now only depend on GHC boot libs. So we should now be able to build and run these as part of GHC's testsuite. \o/ The reference output has changed very slightly, in three ways: * we don't convert quotes back into `&quot;` as the `xml` lib did * we don't add extra `&nbsp;` as the `xml` lib did * we now remove the entire footer `div` (instead of just emptying it) - - - - - 65a448e3 by Alec Theriault at 2019-02-11T12:27:41-05:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - 360ca937 by Alec Theriault at 2019-02-13T11:36:11-05:00 Clean up logic for guessing `-B` and `--lib` (#1026) Haddock built with the `in-ghc-tree` flag tries harder to find the GHC lib folder and its own resources. This should make it possible to use `in-ghc-tree`-built Haddock without having to specify the `-B` and `--lib` options (just how you can use in-tree GHC without always specifying the `-B` option). The logic to do this relies on `getExecutablePath`, so we only get this auto-detection on platforms where this function works. - - - - - d583e364 by Alec Theriault at 2019-02-16T10:41:22-05:00 Fix tests broken by GHC Changes in 19626218566ea709b5f6f287d3c296b0c4021de2 affected some of the hyperlinker output. Accepted the new output (hovering over a `..` now shows you what that wildcard binds). Also fixed some stray deprecation warnings. - - - - - da0c42cc by Vladislav Zavialov at 2019-02-17T11:39:19+03:00 Parser changes to match !380 - - - - - ab96bed7 by Ryan Scott at 2019-02-18T04:44:08-05:00 Bump ghc version to 8.9 - - - - - 44b7c714 by Alec Theriault at 2019-02-22T05:49:43-08:00 Match GHC changes for T16185 `FunTy` now has an `AnonArgFlag` that indicates whether the arrow is a `t1 => t2` or `t1 -> t2`. This commit shouldn't change any functionality in Haddock. - - - - - 2ee653b1 by Alec Theriault at 2019-02-24T18:53:33-08:00 Update .travis.yml Points to the new GHC CI artifact. - - - - - 90939d71 by Alec Theriault at 2019-02-25T00:42:41-08:00 Support value/type namespaces on identifier links Identifier links can be prefixed with a 'v' or 't' to indicate the value or type namespace of the desired identifier. For example: -- | Some link to a value: v'Data.Functor.Identity' -- -- Some link to a type: t'Data.Functor.Identity' The default is still the type (with a warning about the ambiguity) - - - - - d6ed496c by Alec Theriault at 2019-02-25T00:42:46-08:00 Better identifier parsing * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental). - - - - - 3c3b404c by Alec Theriault at 2019-02-25T22:12:11-08:00 Fix standalone deriving docs Docs on standalone deriving decls for classes with associated types should be associated with the class instance, not the associated type instance. Fixes haskell/haddock#1033 - - - - - d51ef69e by Alec Theriault at 2019-02-26T19:14:59-08:00 Fix bogus identifier defaulting This avoids a situation in which an identifier would get defaulted to a completely different identifier. Prior to this commit, the 'Bug1035' test case would hyperlink 'Foo' into 'Bar'! Fixes haskell/haddock#1035. - - - - - 88cbbdc7 by Ryan Scott at 2019-02-27T10:14:03-05:00 Visible dependent quantification (#16326) changes - - - - - 0dcf6cee by Xia Li-yao at 2019-02-27T21:53:27-05:00 Menu item controlling which instances are expanded/collapsed (#1007) Adds a menu item (like "Quick Jump") for options related to displaying instances. This provides functionality for: * expanding/collapsing all instances on the currently opened page * controlling whether instances are expanded/collapsed by default * controlling whether the state of instances should be "remembered" This new functionality is implemented in Typescript in `details-helper`. The built-in-themes style switcher also got a revamp so that all three of QuickJump, the style switcher, and instance preferences now have the same style and implementation structure. See also: https://mail.haskell.org/pipermail/haskell-cafe/2019-January/130495.html Fixes haskell/haddock#698. Co-authored-by: Lysxia <lysxia at gmail.com> Co-authored-by: Nathan Collins <conathan at galois.com> - - - - - 3828c0fb by Alec Theriault at 2019-02-28T12:42:49-05:00 `--show-interface` should output to stdout. (#1040) Fixes haskell/haddock#864. - - - - - a50f4cda by gbaz at 2019-03-01T07:43:16-08:00 Increase contrast of Linuwal theme (#1037) This is to address the concern that, on less nice and older screens, some of the shades of grey blend in too easily with the white background. * darken the font slightly * darken slightly the grey behind type signatures and such * add a border and round the corners on code blocks * knock the font down by one point - - - - - ab4d41de by Alec Theriault at 2019-03-03T09:23:26-08:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 12f509eb by Ben Gamari at 2019-03-04T22:13:20-05:00 Remove reference to Opt_SplitObjs flag Split-objects has been removed. - - - - - 5b3e4c9a by Ryan Scott at 2019-03-06T19:16:24-05:00 Update html-test output to reflect haskell/haddock#16391 changes - - - - - fc228af1 by Alec Theriault at 2019-03-09T08:29:23-08:00 Match changes for "Stop inferring over-polymorphic kinds" The `hsq_ext` field of `HsQTvs` is now just the implicit variables (instead of also including information about which of these variables are dependent). This commit shouldn't change any functionality in Haddock. - - - - - 6ac109eb by Alec Theriault at 2019-03-09T11:22:55-08:00 Add .hi, .dyn_hi, etc files to .gitignore Fixes haskell/haddock#1030. - - - - - b55f0c05 by Alec Theriault at 2019-03-09T11:22:55-08:00 Better support for default methods in classes * default methods now get rendered differently * default associated types get rendered * fix a forgotten `s/TypeSig/ClassOpSig/` refactor in LaTeX backend * LaTeX backend now renders default method signatures NB: there is still no way to document default class members and the NB: LaTeX backend still crashes on associated types - - - - - 10aea0cf by Alec Theriault at 2019-03-09T11:22:55-08:00 Avoid multi-line `emph` in LaTeX backend `markupWarning` often processes inputs which span across paragraphs. Unfortunately, LaTeX's `emph` is not made to handle this (and will crash). Fixes haskell/haddock#936. - - - - - d22dc2c9 by Alec Theriault at 2019-03-09T11:22:55-08:00 Many LaTeX backend fixes After this commit, we can run with `--latex` on all boot libraries without crashing (although the generated LaTeX still fails to compile in a handful of larger packages like `ghc` and `base`). * Add newlines after all block elements in LaTeX. This is important to prevent the final output from being more an more indented. See the `latext-test/src/Example` test case for a sample of this. * Support associated types in class declarations (but not yet defaults) * Several small issues for producing compiling LaTeX; - avoid empy `\haddockbeginargs` lists (ex: `type family Any`) - properly escape identifiers depending on context (ex: `Int#`) - add `vbox` around `itemize`/`enumerate` (so they can be in tables) * Several spacing fixes: - limit the width of `Pretty`-arranged monospaced code - cut out extra space characters in export lists - only escape spaces if there are _multiple_ spaces - allow type signatures to be multiline (even without docs) * Remove uninteresting and repetitive `main.tex`/`haddock.sty` files from `latex-test` test reference output. Fixes haskell/haddock#935, haskell/haddock#929 (LaTeX docs for `text` build & compile) Fixes haskell/haddock#727, haskell/haddock#930 (I think both are really about type families...) - - - - - 0e6cee00 by Alec Theriault at 2019-03-29T12:11:56-07:00 Remove workaround for now-fixed Clang CPP bug (#1028) Before LLVM 6.0.1 (or 10.0 on Apple LLVM), there was a bug where lines that started with an octothorpe but turned out not to lex like pragmas would have an extra line added after them. Since this bug has been fixed upstream and that it doesn't have dire consequences anyways, the workaround is not really worth it anymore - we can just tell people to update their clang version (or re-structure their pragma code). - - - - - ce05434d by Alan Zimmerman at 2019-03-29T12:12:11-07:00 Matching changes in GHC for haskell/haddock#16236 (cherry picked from commit 3ee6526d4ae7bf4deb7cd1caf24b3d7355573576) - - - - - d85766b2 by Ben Gamari at 2019-03-29T12:14:04-07:00 Bump GHC to 8.8 - - - - - 5a82cbaf by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Redo ParseModuleHeader - - - - - b9033348 by Oleg Grenrus at 2019-05-05T13:02:00-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - bb55c8f4 by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove outdated `.ghci` files and `scripts` The `.ghci` files are actively annoying when trying to `cabal v2-repl`. As for the `scripts`, the distribution workflow is completely different. - - - - - 5ee244dc by Alec Theriault at 2019-05-13T16:10:07-07:00 Remove obsolete arcanist files + STYLE Now that GHC is hosted on Gitlab, the arcanist files don't make sense anymore. The STYLE file contains nothing more than a dead link too. - - - - - d07c1928 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Redo ParseModuleHeader - - - - - 492762d2 by Oleg Grenrus at 2019-05-13T16:41:43-07:00 Comment C, which clarifies why e.g. ReadP is not enough - - - - - af2ac773 by Ryan Scott at 2019-05-14T17:22:13-04:00 Changes for haskell/haddock#16110/#16356 - - - - - 6820ed0d by Alec Theriault at 2019-05-17T08:51:27-07:00 Unbreak haskell/haddock#1004 test case `fail` is no longer part of `Monad`. - - - - - 6bf7be98 by Alec Theriault at 2019-05-17T08:51:27-07:00 Fix haskell/haddock#1063 with better parenthesization logic for contexts The only other change in html/hoogle/hyperlinker output for the boot libraries that this caused is a fix to some Hoogle output for implicit params. ``` $ diff -r _build/docs/ old_docs diff -r _build/docs/html/libraries/base/base.txt old_docs/html/libraries/base/base.txt 13296c13296 < assertError :: (?callStack :: CallStack) => Bool -> a -> a --- > assertError :: ?callStack :: CallStack => Bool -> a -> a ``` - - - - - b5716b61 by Ryan Scott at 2019-05-22T17:24:32-04:00 Match changes with haskell/haddock#14332 - - - - - c115abf6 by Alec Theriault at 2019-05-26T16:01:58-04:00 Remove Haddock's dependency on `Cabal` At this point, Haddock depended on Cabal-the-library solely for a verbosity parser (which misleadingly accepts all sorts of verbosity options that Haddock never uses). Now, the only dependency on Cabal is for `haddock-test` (which uses Cabal to locate the Haddock interface files of a couple boot libraries). - - - - - e5b2d4a3 by Alec Theriault at 2019-05-26T16:16:25-04:00 Regression test: promoted lists in associated types When possible, associated types with promoted lists should use the promoted list literal syntax (instead of repeated applications of ': and '[]). This was fixed in 2122de5473fd5b434af690ff9ccb1a2e58491f8c. Closes haskell/haddock#466, - - - - - cc5ad5d3 by Alec Theriault at 2019-05-26T17:55:54-04:00 Merge branch 'ghc-8.6' into ghc-8.8 - - - - - 4b3301a6 by Alec Theriault at 2019-05-26T17:57:52-04:00 Release haddock-2.23, haddock-library-1.8.0 Tentatively adjust bounds and changelogs for the release to be bundled with GHC 8.8.1. - - - - - 69c7cfce by Matthew Pickering at 2019-05-30T10:54:27+01:00 Update hyperlinker tests for new types in .hie files - - - - - 29b7e738 by Zubin Duggal at 2019-05-30T10:57:51+01:00 update for new way to store hiefile headers - - - - - aeca5d5f by Zubin Duggal at 2019-06-04T18:57:42-04:00 update for new way to store hiefile headers - - - - - ba2ca518 by Ben Gamari at 2019-06-07T23:11:14+00:00 Update test output for introduction of Safe-Inferred - - - - - 3a975a6c by Ryan Scott at 2019-07-03T12:06:27-04:00 Changes for haskell/haddock#15247 - - - - - 0df46555 by Zubin Duggal at 2019-07-22T10:52:50+01:00 Fix haddockHypsrcTest - - - - - 2688686b by Sylvain Henry at 2019-09-12T23:19:39+02:00 Fix for GHC module renaming - - - - - 9ec0f3fc by Alec Theriault at 2019-09-20T03:21:00-04:00 Fix Travis CI, loosen .cabal bounds (#1089) Tentatively for the 2.23 release: * updated Travis CI to work again * tweaked bounds in the `.cabal` files * adjusted `extra-source-files` to properly identify test files - - - - - ca559beb by Matthías Páll Gissurarson at 2019-09-28T12:14:40-04:00 Small change in to facilitate extended typed-holes (#1090) This change has no functional effect on haddock itself, it just changes one pattern to use `_ (` rather than `_(`, so that we may use `_(` as a token for extended typed-holes later. - - - - - 02e28976 by Vladislav Zavialov at 2019-09-28T12:17:45-04:00 Remove spaces around @-patterns (#1093) This is needed to compile `haddock` when [GHC Proposal haskell/haddock#229](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0229-whitespace-bang-patterns.rst) is implemented. - - - - - 83cbbf55 by Alexis King at 2019-09-30T21:12:42-04:00 Fix the ignore-exports option (#1082) The `ignore-exports` option has been broken since haskell/haddock#688, as mentioned in https://github.com/haskell/haddock/pull/766#issue-172505043. This PR fixes it. - - - - - e127e0ab by Ben Gamari at 2019-10-06T15:12:06-04:00 Fix a few haddock issues - - - - - 3a0f5c89 by Zubin Duggal at 2019-10-07T17:56:13-04:00 Fix crash when there are no srcspans in the file due to CPP - - - - - 339c5ff8 by Alec Theriault at 2019-10-07T17:56:13-04:00 Prefer un-hyperlinked sources to no sources It is possible to fail to extract an HIE ast. This is however not a reason to produce _no_ output - we should still make a colorized HTML page. - - - - - d47ef478 by Alec Theriault at 2019-10-07T17:56:13-04:00 Add a regression test for haskell/haddock#1091 Previously, this input would crash Haddock. - - - - - ed7c8b0f by Alec Theriault at 2019-10-07T20:56:48-04:00 Add Hyperlinker test cases for TH-related stuff Hopefully this will guard against regressions around quasiquotes, TH quotes, and TH splices. - - - - - d00436ab by Andreas Klebinger at 2019-10-21T15:53:03+02:00 Refactor for withTiming changes. - - - - - 4230e712 by Ben Gamari at 2019-10-22T09:36:37-04:00 Merge pull request haskell/haddock#1101 from AndreasPK/withTimingRefactor Refactor for withTiming changes. - - - - - d155c5f4 by Ryan Scott at 2019-10-23T10:37:17-04:00 Reify oversaturated data family instances correctly (#1103) This fixes haskell/haddock#1103 by adapting the corresponding patch for GHC (see https://gitlab.haskell.org/ghc/ghc/issues/17296 and https://gitlab.haskell.org/ghc/ghc/merge_requests/1877). - - - - - 331a5adf by Sebastian Graf at 2019-10-25T17:14:40+02:00 Refactor for OutputableBndrId changes - - - - - 48a490e0 by Ben Gamari at 2019-10-27T10:16:16-04:00 Merge pull request haskell/haddock#1105 from sgraf812/wip/flexible-outputable Refactor for OutputableBndrId changes - - - - - f62a7dfc by Sebastian Graf at 2019-11-01T11:54:16+00:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - d9b242ed by Ryan Scott at 2019-11-03T13:20:03-05:00 Changes from haskell/haddock#14579 We now have a top-level `tyConAppNeedsKindSig` function, which means that we can delete lots of code in `Convert`. (cherry picked from commit cfd682c5fd03b099a3d78c44f9279faf56a0ac70) - - - - - dfd42406 by Sebastian Graf at 2019-11-04T07:02:14-05:00 Define `XRec` for location information and get rid of `HasSrcSpan` In https://gitlab.haskell.org/ghc/ghc/merge_requests/1970 I propose a simpler way to encode location information into the GHC and Haddock AST while incurring no cost for e.g. TH which doesn't need location information. These are just changes that have to happen in lock step. - - - - - 0b15be7c by Ben Gamari at 2019-11-09T13:21:33-05:00 Import isRuntimeRepVar from Type rather than TyCoRep isRuntimeRepVar is not longer exported from TyCoRep due to ghc#17441. - - - - - 091f7283 by Ben Gamari at 2019-11-10T12:47:06-05:00 Bump to GHC 8.10 - - - - - e88c71f2 by Ben Gamari at 2019-11-14T00:22:24-05:00 Merge pull request haskell/haddock#1110 from haskell/wip/T17441 Import isRuntimeRepVar from Type rather than TyCoRep - - - - - 4e0bbc17 by Ben Gamari at 2019-11-14T00:22:45-05:00 Version bumps for GHC 8.11 - - - - - 0e85ceb4 by Ben Gamari at 2019-11-15T11:59:45-05:00 Bump to GHC 8.10 - - - - - 00d6d68b by Ben Gamari at 2019-11-16T18:35:58-05:00 Bump ghc version to 8.11 - - - - - dde1fc3f by Ben Gamari at 2019-11-16T20:40:37-05:00 Drop support for base 4.13 - - - - - f52e331d by Vladislav Zavialov at 2019-11-24T13:02:28+03:00 Update Hyperlinker.Parser.classify to use ITdollar - - - - - 1ad96198 by Vladislav Zavialov at 2019-11-28T16:12:33+03:00 Remove HasSrcSpan (#17494) - - - - - 651afd70 by Herbert Valerio Riedel at 2019-12-08T12:08:16+01:00 Document error-prone conditional definition of instances This can easily trip up people if one isn't aware of it. Usually it's better to avoid this kind of conditionality especially for typeclasses for which there's an compat-package as conditional instances like these tend to fragment the ecosystem into those packages that go the extra mile to provide backward compat via those compat-packages and those that fail to do so. - - - - - b521af56 by Herbert Valerio Riedel at 2019-12-08T12:09:54+01:00 Fix build-failure regression for base < 4.7 The `$>` operator definition is available only since base-4.7 which unfortunately wasn't caught before release to Hackage (but has been fixed up by a metadata-revision) This commit introduces a `CompatPrelude` module which allows to reduce the amount of CPP by ousting it to a central location, i.e. the new `CompatPrelude` module. This pattern also tends to reduce the tricks needed to silence unused import warnings. Addresses haskell/haddock#1119 - - - - - 556c375d by Sylvain Henry at 2020-01-02T19:01:55+01:00 Fix after Iface modules renaming - - - - - bd6c53e5 by Sylvain Henry at 2020-01-07T00:48:48+01:00 hsyl20-modules-renamer - - - - - fb23713b by Ryan Scott at 2020-01-08T07:41:13-05:00 Changes for GHC#17608 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2372 - - - - - 4a4dd382 by Ryan Scott at 2020-01-25T08:08:26-05:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - e782a44d by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename PackageConfig into UnitInfo - - - - - ba3c9f05 by Sylvain Henry at 2020-01-26T02:12:37+01:00 Rename lookupPackage - - - - - ab37f9b3 by Ben Gamari at 2020-01-29T13:00:44-05:00 Merge pull request haskell/haddock#1125 from haskell/wip/T17566-take-two Changes for GHC#17566 - - - - - 3ebd5ae0 by Ryan Scott at 2020-01-31T05:56:50-05:00 Merge branch 'wip-hsyl20-package-refactor' into ghc-head - - - - - 602a747e by Richard Eisenberg at 2020-02-04T09:05:43+00:00 Echo GHC's removal of PlaceHolder module This goes with GHC's !2083. - - - - - ccfe5679 by Sylvain Henry at 2020-02-10T10:13:56+01:00 Module hierarchy: runtime (cf haskell/haddock#13009) - - - - - 554914ce by Cale Gibbard at 2020-02-10T16:10:39-05:00 Fix build of haddock in stage1 We have to use the correct version of the GHC API, but the version of the compiler itself doesn't matter. - - - - - 5b6fa2a7 by John Ericson at 2020-02-10T16:18:07-05:00 Noramlize `tested-with` fields in cabal files - - - - - e6eb3ebe by Vladislav Zavialov at 2020-02-16T13:25:26+03:00 No MonadFail/Alternative for P - - - - - 90e181f7 by Ben Gamari at 2020-02-18T14:13:47-05:00 Merge pull request haskell/haddock#1129 from obsidiansystems/wip/fix-stage1-build Fix build of haddock in stage1 - - - - - 93b64636 by Sylvain Henry at 2020-02-19T11:20:27+01:00 Modules: Driver (#13009) - - - - - da4f6c7b by Vladislav Zavialov at 2020-02-22T15:33:02+03:00 Use RealSrcSpan in InstMap - - - - - 479b1b50 by Ben Gamari at 2020-02-23T10:28:13-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 55ecacf0 by Sylvain Henry at 2020-02-25T15:18:27+01:00 Modules: Core (#13009) - - - - - 60867b3b by Vladislav Zavialov at 2020-02-28T15:53:52+03:00 Ignore the BufLoc/BufSpan added in GHC's !2516 - - - - - 1e5506d3 by Sylvain Henry at 2020-03-02T12:32:43+01:00 Modules: Core (#13009) - - - - - 6fb53177 by Richard Eisenberg at 2020-03-09T14:49:40+00:00 Changes in GHC's !1913. - - - - - 30b792ea by Ben Gamari at 2020-03-16T12:45:02-04:00 Merge pull request haskell/haddock#1130 from hsyl20/wip/hsyl20-modules-core2 Modules: Core (#13009) - - - - - cd761ffa by Sylvain Henry at 2020-03-18T15:24:00+01:00 Modules: Types - - - - - b6646486 by Ben Gamari at 2020-03-18T14:42:43-04:00 Merge pull request haskell/haddock#1133 from hsyl20/wip/hsyl20/modules/types Modules: Types - - - - - 9325d734 by Kleidukos at 2020-03-19T12:38:31-04:00 Replace the 'caption' class so that the collapsible sections are shown - - - - - 5e2bb555 by Kleidukos at 2020-03-19T12:38:31-04:00 Force ghc-8.8.3 - - - - - c6fcd0aa by Kleidukos at 2020-03-19T12:38:31-04:00 Update test fixtures - - - - - 5c849cb1 by Sylvain Henry at 2020-03-20T09:34:39+01:00 Modules: Types - - - - - 7f439155 by Alec Theriault at 2020-03-20T20:17:01-04:00 Merge branch 'ghc-8.8' into ghc-8.10 - - - - - b7904e5c by Alina Banerjee at 2020-03-20T20:24:17-04:00 Update parsing to strip whitespace from table cells (#1074) * Update parsing to strip leading & trailing whitespace from table cells * Update fixture data to disallow whitespaces at both ends in table cells * Add test case for whitespaces stripped from both ends of table cells * Update table reference test data for html tests - - - - - b9d60a59 by Alec Theriault at 2020-03-22T11:46:42-04:00 Clean up warnings * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal` - - - - - 0c317dbe by Alec Theriault at 2020-03-22T18:46:54-04:00 Fix NPM security warnings This was done by calling `npm audit fix`. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. - - - - - 6e306242 by Alec Theriault at 2020-03-22T20:10:52-04:00 Tentative 2.24 release Adjusted changelogs and versions in `.cabal` files in preparation for the upcoming release bundled with GHC 8.10. - - - - - 1bfb4645 by Ben Gamari at 2020-03-23T16:40:54-04:00 Merge commit '3c2944c037263b426c4fe60a3424c27b852ea71c' into HEAD More changes from the GHC types module refactoring. - - - - - be8c6f3d by Alec Theriault at 2020-03-26T20:10:53-04:00 Update `.travis.yml` to work with GHC 8.10.1 * Regenerated the Travis file with `haskell-ci` * Beef up `.cabal` files with more `tested-with` information - - - - - b025a9c6 by Alec Theriault at 2020-03-26T20:10:53-04:00 Update README Removed some out of date links/info, added some more useful links. * badge to Hackage * update old trac link * `ghc-head` => `ghc-8.10` * `cabal new-*` is now `cabal v2-*` and it should Just Work * `--test-option='--accept'` is the way to accept testsuite output - - - - - 564d889a by Alec Theriault at 2020-03-27T20:34:33-04:00 Fix crash in `haddock-library` on unicode space Our quickcheck tests for `haddock-library` stumbled across an edge case input that was causing Haddock to crash: it was a unicode space character. The root cause of the crash is that we were implicitly assuming that if a space character was not " \t\f\v\r", it would have to be "\n". We fix this by instead defining horizontal space as: any space character that is not '\n'. Fixes haskell/haddock#1142 - - - - - 2d360ba1 by Alec Theriault at 2020-03-27T21:57:32-04:00 Disallow qualified uses of reserved identifiers This a GHC bug (https://gitlab.haskell.org/ghc/ghc/issues/14109) too, but it is a relatively easy fix in Haddock. Note that the fix must live in `haddock-api` instead of `haddock-library` because we can only really decide if an identifier is a reserved one by asking the GHC lexer. Fixes haskell/haddock#952 - - - - - 47ae22ed by Alec Theriault at 2020-03-28T13:36:25-04:00 Remove unused `Haddock.Utils` functions * removed functions in `Haddock.Utils` that were not used anywhere (or exported from the `haddock-api` package) * moved GHC-specific utils from `Haddock.Utils` to `Haddock.GhcUtils` - - - - - c0291245 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use TTG empty extensions to remove some `error`'s None of these error cases should ever have been reachable, so this is just a matter of leveraging the type system to assert this. * Use the `NoExtCon` and `noExtCon` to handle case matches for no extension constructors, instead of throwing an `error`. * Use the extension field of `HsSpliceTy` to ensure that this variant of `HsType` cannot exist in an `HsType DocNameI`. - - - - - 0aff8dc4 by Alec Theriault at 2020-03-28T13:36:25-04:00 Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL` * `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes haskell/haddock#978 - - - - - bf6f2fb7 by Alec Theriault at 2020-03-28T13:36:25-04:00 Cleanup up GHC flags in `.cabal` files * enable more useful warning flags in `haddock-api`, handle the new warnings generated * remove `-fwarn-tabs` (now we'd use `-Wtabs`, but this has been in `-Wall` for a while now) - - - - - c576fbf1 by Alec Theriault at 2020-03-28T13:36:25-04:00 `haddock-library` document header level Document the fact the header level is going to always be between 1 and 6 inclusive. Along the way, I also optimized the parsing code a bit. - - - - - 71bce0ee by Alec Theriault at 2020-03-28T14:26:27-04:00 Disallow links in section headers This is quite straightforward to implement, since we already had a function `docToHtmlNoAnchors` (which we used to generate the link in the sidebar "Contents"). This breaks test `Bug387`, but that test case has aged badly: we now automatically generate anchors for all headings, so manually adding an anchor in a section makes no sense. Nested anchors are, as pointed out in haskell/haddock#1054, disallowed by the HTML standard. Fixes haskell/haddock#1054 - - - - - b461b0ed by Sylvain Henry at 2020-03-30T10:34:23+02:00 Modules: type checker - - - - - cd8cd1ee by Ben Gamari at 2020-03-31T12:45:02-04:00 Merge pull request haskell/haddock#1152 from hsyl20/wip/hsyl20/modules/tc Module renaming - - - - - 5e8f8ea7 by Felix Yan at 2020-04-01T17:58:06-07:00 Allow QuickCheck 2.14 Builds fine and all tests pass. - - - - - dc6b1633 by Sylvain Henry at 2020-04-05T16:43:44+02:00 Module renaming: amend previous patch - - - - - eee2f4ae by Ryan Scott at 2020-04-05T09:04:43-07:00 Fix haskell/haddock#1050 by filtering out invisible AppTy arguments This makes the `synifyType` case for `AppTy` more intelligent by taking into consideration the visibilities of each `AppTy` argument and filtering out any invisible arguments, as they aren't intended to be displayed in the source code. (See haskell/haddock#1050 for an example of what can happen if you fail to filter these out.) Along the way, I noticed that a special `synifyType` case for `AppTy t1 (CoercionTy {})` could be consolidated with the case below it, so I took the opportunity to tidy this up. - - - - - 23eb99e8 by Ben Gamari at 2020-04-07T11:19:58-04:00 Merge pull request haskell/haddock#1154 from hsyl20/wip/hsyl20/modules/tc Module renaming: amend previous patch - - - - - 072d994d by Ryan Scott at 2020-04-07T19:32:47-04:00 Make NoExtCon fields strict These changes are a part of a fix for [GHC#17992](https://gitlab.haskell.org/ghc/ghc/issues/17992). - - - - - d8ebf6c8 by Ignat Insarov at 2020-04-09T21:15:01-04:00 Recode Doc to Json. (#1159) * Recode Doc to Json. * More descriptive field labels. - - - - - 52df4b4e by Sylvain Henry at 2020-04-10T12:39:18+02:00 Module renaming - - - - - d9ab8ec8 by Cale Gibbard at 2020-04-14T11:43:34-04:00 Add instance of XCollectPat for DocNameI - - - - - 323d221d by Cale Gibbard at 2020-04-14T11:43:34-04:00 Rename XCollectPat -> CollectPass - - - - - 2df80867 by Alec Theriault at 2020-04-15T07:30:51-07:00 Prune docstrings that are never rendered When first creating a Haddock interface, trim `ifaceDocMap` and `ifaceArgMap` to not include docstrings that can never appear in the final output. Besides checking with GHC which names are exported, we also need to keep all the docs attached to instance declarations (it is much tougher to detect when an instance is fully private). This change means: * slightly smaller interface files (7% reduction on boot libs) * slightly less work to do processing docstrings that aren't used * no warnings in Haddock's output about private docstrings (see haskell/haddock#1070) I've tested manually that this does not affect any of the boot library generated docs (the only change in output was some small re-ordering in a handful of instance lists). This should mean no docstrings have been incorrectly dropped. - - - - - f49c90cc by Alec Theriault at 2020-04-15T07:30:51-07:00 Don't warn about missing links in miminal sigs When renaming the Haddock interface, never emit warnings when renaming a minimal signature. Also added some documention around `renameInterface`. Minimal signatures intentionally include references to potentially un-exported methods (see the discussion in haskell/haddock#330), so it is expected that they will not always have a link destination. On the principle that warnings should always be resolvable, this shouldn't produce a warning. See haskell/haddock#1070. - - - - - a9eda64d by Ben Gamari at 2020-04-17T09:27:35-04:00 Merge pull request haskell/haddock#1160 from hsyl20/wip/hsyl20/modules/systools Module renaming - - - - - f40d7879 by Cale Gibbard at 2020-04-20T11:30:38-04:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ttg-con-pat - - - - - a50e7753 by Ben Gamari at 2020-04-20T11:36:10-04:00 Merge pull request haskell/haddock#1165 from obsidiansystems/wip/ttg-con-pat Trees that Grow refactor (GHC !2553) - - - - - 6a24795c by Alec Theriault at 2020-04-21T08:06:45-07:00 Fallback to `hiDecl` when `extractDecl` fails Sometimes, the declaration being exported is a subdecl (for instance, a record accessor getting exported at the top-level). For these cases, Haddock has to find a way to produce some synthetic sensible top-level declaration. This is done with `extractDecl`. As is shown by haskell/haddock#1067, this is sometimes impossible to do just at a syntactic level (for instance when the subdecl is re-exported). In these cases, the only sensible thing to do is to try to reify a declaration based on a GHC `TyThing` via `hiDecl`. - - - - - eee1a8b7 by Sylvain Henry at 2020-04-24T15:46:05+02:00 Module structure - - - - - 50b9259c by Iñaki at 2020-04-25T18:38:11-04:00 Add support for custom section anchors (#1179) This allows to have stable anchors for groups, even if the set of groups in the documentation is altered. The syntax for setting the anchor of a group is -- * Group name #desiredAnchor# Which will produce an html anchor of the form '#g:desiredAnchor' Co-authored-by: Iñaki García Etxebarria <git at inaki.blueleaf.cc> - - - - - 4003c97a by Ben Gamari at 2020-04-26T09:35:15-04:00 Merge pull request haskell/haddock#1166 from hsyl20/wip/hsyl20/modules/utils Module structure - - - - - 5206ab60 by Sylvain Henry at 2020-04-27T16:47:39+02:00 Renamed UnitInfo fields - - - - - c32c333b by Sylvain Henry at 2020-04-27T17:32:58+02:00 UnitId has been renamed into Unit - - - - - 3e87db64 by Sylvain Henry at 2020-04-27T17:36:00+02:00 Fix for GHC.Unit.* modules - - - - - ae3323a7 by Ben Gamari at 2020-04-29T12:36:37-04:00 Merge pull request haskell/haddock#1183 from hsyl20/wip/hsyl20/unitid Refactoring of Unit code - - - - - b105564a by Artem Pelenitsyn at 2020-05-03T08:14:10+01:00 add dependency on exceptions because GHC.Exception was boiled down (ghc haskell/haddock#18075) - - - - - 9857eff3 by Zubin Duggal at 2020-05-04T18:48:25+01:00 Atomic update of NameCache in readHieFile - - - - - 86bbb226 by Sylvain Henry at 2020-05-14T16:36:27+02:00 Fix after Config module renaming - - - - - a4bbdbc2 by Gert-Jan Bottu at 2020-05-15T22:09:44+02:00 Explicit Specificity Support for Haddock - - - - - 46199daf by Ben Gamari at 2020-05-19T09:59:56-04:00 Merge pull request haskell/haddock#1192 from hsyl20/hsyl20/modules-config Fix after Config module renaming - - - - - f9a9d2ba by Gert-Jan Bottu at 2020-05-20T16:48:38-04:00 Explicit Specificity Support for Haddock - - - - - 55c5b7ea by Ben Gamari at 2020-05-21T00:32:02-04:00 Merge commit 'a8d7e66da4dcc3b242103271875261604be42d6e' into ghc-head - - - - - a566557f by Cale Gibbard at 2020-05-21T16:02:06-04:00 isBootSummary now produces a result of type IsBootInterface - - - - - ea52f905 by Zubin Duggal at 2020-05-24T17:55:48+01:00 update for hiefile-typeclass-info - - - - - 49ba7a67 by Willem Van Onsem at 2020-05-25T12:23:01-04:00 Use floor over round to calculate the percentage (#1195) If we compile documentation where only a small fraction is undocumented, it is misleading to see 100% coverage - 99% is more intuitive. Fixes haskell/haddock#1194 - - - - - c025ebf1 by Ben Gamari at 2020-05-29T14:32:42-04:00 Merge pull request haskell/haddock#1185 from obsidiansystems/boot-disambig isBootSummary now produces a result of type IsBootInterface - - - - - 74ab9415 by Ben Gamari at 2020-05-29T20:23:39-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - b40be944 by Ben Gamari at 2020-06-03T17:02:31-04:00 testsuite: Update expected output for simplified subsumption - - - - - 624be71c by Ryan Scott at 2020-06-05T12:43:23-04:00 Changes for GHC#18191 See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3337. - - - - - fbd8f7ce by Sylvain Henry at 2020-06-08T15:31:47+02:00 Fix after unit refactoring - - - - - 743fda4d by Ben Gamari at 2020-06-09T12:09:58-04:00 Merge pull request haskell/haddock#1202 from hsyl20/wip/hsyl20/unitid-ii Fix after unit refactoring - - - - - d07a06a9 by Ryan Scott at 2020-06-13T07:16:55-04:00 Use HsForAllTelescope (GHC#18235) - - - - - 389bb60d by Ben Gamari at 2020-06-13T15:30:52-04:00 haddock: Bounds bumps for GHC 8.12 - - - - - 7a377f5f by Ben Gamari at 2020-06-17T14:53:16-04:00 Merge pull request haskell/haddock#1199 from bgamari/wip/ghc-8.12 haddock: Bounds bumps for GHC 8.12 - - - - - 9fd9e586 by Krzysztof Gogolewski at 2020-06-17T16:09:07-04:00 Adapt Haddock to LinearTypes See ghc/ghc!852. - - - - - 46fe7636 by Ben Gamari at 2020-06-18T14:20:02-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - 35a3c9e2 by Zubin Duggal at 2020-06-21T21:19:18+05:30 Use functions exported from HsToCore - - - - - 8abe3928 by Ben Gamari at 2020-06-24T13:53:39-04:00 Merge pull request haskell/haddock#1204 from wz1000/wip/haddock-hstocore Use functions exported from GHC.HsToCore.Docs - - - - - 22f2c937 by Matthías Páll Gissurarson at 2020-06-26T19:07:03+02:00 Adapt Haddock for QualifiedDo - - - - - 3f6208d7 by Vladislav Zavialov at 2020-06-28T14:28:16+03:00 Handle LexicalNegation's ITprefixminus - - - - - 03a19f41 by Sylvain Henry at 2020-07-02T09:37:38+02:00 Rename hsctarget into backend - - - - - ea17ff23 by Andreas Klebinger at 2020-07-02T17:44:18+02:00 Update for UniqFM changes. - - - - - 9872f2f3 by Ben Gamari at 2020-07-09T10:39:19-04:00 Merge pull request haskell/haddock#1209 from AndreasPK/wip/typed_uniqfm Update for UniqFM changes. - - - - - 68f7b668 by Krzysztof Gogolewski at 2020-07-12T18:16:57+02:00 Sync with GHC removing {-# CORE #-} pragma See ghc ticket haskell/haddock#18048 - - - - - eb372681 by Sylvain Henry at 2020-07-20T11:41:30+02:00 Rename hscTarget into backend - - - - - fb7f78bf by Ben Gamari at 2020-07-21T12:15:25-04:00 Merge pull request haskell/haddock#1214 from hsyl20/wip/hsyl20/hadrian/ncg Rename hscTarget into backend - - - - - 1e8f5b56 by Ben Gamari at 2020-07-23T09:11:50-04:00 Merge commit '904dce0cafe0a241dd3ef355775db47fc12f434d' into ghc-head - - - - - d8fd1775 by Zubin Duggal at 2020-07-23T18:46:40+05:30 Update for modular ping pong - - - - - 8416f872 by Ben Gamari at 2020-07-23T09:35:03-04:00 Merge pull request haskell/haddock#1200 from wz1000/wip/wz1000-modular-ping-pong Modular ping pong - - - - - a24a8577 by Ben Gamari at 2020-07-28T15:23:36-04:00 Bump GHC version to 9.0 - - - - - 6a51c9dd by Sylvain Henry at 2020-08-05T18:47:05+02:00 Fix after Outputable refactoring - - - - - c05e1c99 by Ben Gamari at 2020-08-10T14:41:41-04:00 Merge pull request haskell/haddock#1223 from hsyl20/wip/hsyl20/dynflags/exception Fix after Outputable refactoring - - - - - d964f15b by Sylvain Henry at 2020-08-12T11:58:49+02:00 Fix after HomeUnit - - - - - 8e6d5b23 by Ben Gamari at 2020-08-12T14:25:30-04:00 Merge pull request haskell/haddock#1225 from hsyl20/wip/hsyl20/plugins/homeunit Fix after HomeUnit - - - - - 8c7880fe by Sylvain Henry at 2020-08-17T14:13:29+02:00 Remove Ord FastString instance - - - - - 8ea410db by Alex Biehl at 2020-08-19T10:56:32+02:00 Another round of `npm audit fix` (#1228) This should shut down the warnings on Github. Note that the security issues seem to have been entirely in the build dependencies, since the output JS has not changed. Last NPM dependency audit happend in d576b2327e2bc117f912fe0a9d595e9ae62614e0 Co-authored-by: Alex Biehl <alex.biehl at target.com> - - - - - 7af6e2a8 by Ben Gamari at 2020-08-31T13:59:34-04:00 Merge pull request haskell/haddock#1226 from hsyl20/wip/hsyl20/fs_ord Remove Ord FastString instance - - - - - ffbc8702 by Alan Zimmerman at 2020-09-07T21:47:41+01:00 Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - a93f1268 by Alan Zimmerman at 2020-09-07T23:11:38+01:00 Merge pull request haskell/haddock#1232 from haskell/wip/T18639-remove-generated-pragma, Match GHC for haskell/haddock#18639, remove GENERATED pragma - - - - - 1f605d50 by Ben Gamari at 2020-09-14T18:30:01-04:00 Bump GHC version to 9.1 - - - - - 6599df62 by Vladislav Zavialov at 2020-09-18T14:05:15+03:00 Bump base upper bound to 4.16 - - - - - a01b3c43 by Ben Gamari at 2020-09-22T15:41:48-04:00 Update hypsrc-test for QuickLook This appears to be a spurious change. - - - - - e9cc6cac by Vladislav Zavialov at 2020-09-26T21:00:12+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 30e3ca7c by Sylvain Henry at 2020-09-29T11:18:32-04:00 Update for parser (#1234) - - - - - b172f3e3 by Vladislav Zavialov at 2020-09-30T01:01:30+03:00 Updates for the new linear types syntax: a %p -> b - - - - - 0b9c08d3 by Sylvain Henry at 2020-09-30T11:02:33+02:00 Adapt to GHC parser changes - - - - - b9540b7a by Sylvain Henry at 2020-10-12T09:13:38-04:00 Don't pass the HomeUnitId (#1239) - - - - - 34762e80 by HaskellMouse at 2020-10-13T12:58:04+03:00 Changed tests due to unification of `Nat` and `Natural` in the follwing merge request: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3583 - - - - - 256f86b6 by Vladislav Zavialov at 2020-10-15T10:48:03+03:00 Add whitespace in: map ($ v) - - - - - 4a3f711b by Alan Zimmerman at 2020-10-19T08:57:27+01:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled - - - - - 072cdd21 by Alan Zimmerman at 2020-10-21T14:48:28-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 9e09a445 by Alan Zimmerman at 2020-10-21T23:53:34-04:00 Match GHC, adding IsUnicodeSyntax field to HsFunTy and HsScaled (cherry picked from commit a7d1d8e034d25612d5d08ed8fdbf6f472aded4a1) - - - - - 636d7de3 by Sylvain Henry at 2020-10-26T14:31:54-04:00 GHC.Driver.Types refactoring (#1242) - - - - - a597f000 by Ryan Scott at 2020-10-29T04:18:05-04:00 Adapt to the removal of Hs{Boxed,Constraint}Tuple See ghc/ghc!4097 and GHC#18723. - - - - - b96660fb by Ryan Scott at 2020-10-30T04:53:05-04:00 Adapt to HsConDecl{H98,GADT}Details split Needed for GHC#18844. - - - - - c287d82c by Ryan Scott at 2020-10-30T19:35:59-04:00 Adapt to HsOuterTyVarBndrs These changes accompany ghc/ghc!4107, which aims to be a fix for haskell/haddock#16762. - - - - - a34c31a1 by Ryan Scott at 2020-11-13T13:38:34-05:00 Adapt to splitPiTysInvisible being renamed to splitInvisPiTys This is a part of !4434, a fix for GHC#18939. - - - - - 66ea459d by Sylvain Henry at 2020-11-16T10:59:30+01:00 Fix after Plugins moved into HscEnv - - - - - 508556d8 by Ben Gamari at 2020-11-18T15:47:40-05:00 Merge pull request haskell/haddock#1253 from hsyl20/wip/hsyl20/plugins/hscenv Fix after Plugins moved into HscEnv - - - - - 620fec1a by Andreas Klebinger at 2020-11-24T20:51:59+01:00 Update for changes in GHC's Pretty - - - - - 01cc13ab by Richard Eisenberg at 2020-11-25T23:18:35-05:00 Avoid GHC#18932. - - - - - 8d29ba21 by Cale Gibbard at 2020-11-25T23:18:35-05:00 Add type arguments to PrefixCon - - - - - 414d5f87 by Sylvain Henry at 2020-11-30T17:06:04+01:00 DynFlags's unit fields moved to HscEnv - - - - - e356668c by Ben Gamari at 2020-11-30T11:11:37-05:00 Merge pull request haskell/haddock#1258 from hsyl20/wip/hsyl20/hscenv/unitstate Unit fields moved from DynFlags to HscEnv - - - - - 7cf552f1 by Ben Gamari at 2020-12-03T10:31:27-05:00 Merge pull request haskell/haddock#1257 from AndreasPK/wip/andreask/opt_dumps Update for changes in GHC's Pretty - - - - - fc0871c3 by Veronika Romashkina at 2020-12-08T16:35:33+01:00 Fix docs links from Darcs to GitHub in intro (#1262) - - - - - 7059e808 by Veronika Romashkina at 2020-12-08T16:36:16+01:00 Use gender neutral word in docs (#1260) - - - - - 1b16e5ee by Maximilian Tagher at 2020-12-08T16:40:03+01:00 Allow scrolling search results (#1235) Closes https://github.com/haskell/haddock/issues/1231 - - - - - 8a118c01 by dependabot[bot] at 2020-12-08T16:40:25+01:00 Bump bl from 1.2.2 to 1.2.3 in /haddock-api/resources/html (#1255) Bumps [bl](https://github.com/rvagg/bl) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/rvagg/bl/releases) - [Commits](https://github.com/rvagg/bl/compare/v1.2.2...v1.2.3) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - c89ff587 by Xia Li-yao at 2020-12-08T16:42:17+01:00 Allow more characters in anchor following module reference (#1220) - - - - - 14af7d64 by Xia Li-yao at 2020-12-08T16:43:05+01:00 Add dangling changes from branches ghc-8.6 and ghc-8.8 (#1243) * Fix multiple typos and inconsistencies in doc/markup.rst Note: I noticed some overlap with haskell/haddock#1112 from @wygulmage and haskell/haddock#1081 from @parsonsmatt after creating these proposed changes - mea culpa for not looking at the open PRs sooner. * Fix haskell/haddock#1113 If no Signatures, no section of index.html * Change the formatting of missing link destinations The current formatting of the missing link destination does not really help user to understand the reasons of the missing link. To address this, I've changed the formatting in two ways: - the missing link symbol name is now fully qualified. This way you immediately know which haskell module cannot be linked. It is then easier to understand why this module does not have documentation (hidden module or broken documentation). - one line per missing link, that's more readable now that symbol name can be longer due to qualification. For example, before haddock was listing missing symbol such as: ``` could not find link destinations for: Word8 Word16 mapMaybe ``` Now it is listed as: ``` could not find link destinations for: - Data.Word.Word8 - Data.Word.Word16 - Data.Maybe.mapMaybe ``` * Add `--ignore-link-symbol` command line argument This argument can be used multiples time. A missing link to a symbol listed by `--ignore-link-symbol` won't trigger "missing link" warning. * Forbid spaces in anchors (#1148) * Improve error messages with context information (#1060) Co-authored-by: Matt Audesse <matt at mattaudesse.com> Co-authored-by: Mike Pilgrem <mpilgrem at users.noreply.github.com> Co-authored-by: Guillaume Bouchard <guillaume.bouchard at tweag.io> Co-authored-by: Pepe Iborra <pepeiborra at gmail.com> - - - - - 89e3af13 by tomjaguarpaw at 2020-12-08T18:00:04+01:00 Enable two warnings (#1245) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - c3320f8d by Willem Van Onsem at 2020-12-08T18:26:55+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 685df308 by Alex Biehl at 2020-12-08T20:06:26+01:00 Changes for GHC#17566 See https://gitlab.haskell.org/ghc/ghc/merge_requests/2469 - - - - - be3ec3c0 by Alex Biehl at 2020-12-08T20:06:26+01:00 Import intercalate - - - - - 32c33912 by Matthías Páll Gissurarson at 2020-12-08T21:15:30+01:00 Adapt Haddock for QualifiedDo - - - - - 31696088 by Alex Biehl at 2020-12-08T22:06:02+01:00 Fix haddock-library tests - - - - - fbc0998a by Alex Biehl at 2020-12-08T23:08:23+01:00 Move to GitHub CI (#1266) * Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell at v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up - - - - - 5b946b9a by tomjaguarpaw at 2020-12-10T19:01:41+01:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - bc5a408f by dependabot[bot] at 2020-12-10T19:02:16+01:00 Bump ini from 1.3.5 to 1.3.7 in /haddock-api/resources/html (#1269) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7. - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7) Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - d02995f1 by Andrew Martin at 2020-12-14T16:48:40-05:00 Update for boxed rep - - - - - a381aeff by Ben Gamari at 2020-12-15T15:13:30-05:00 Revert "Enable two warnings (#1245) (#1268)" As this does not build on GHC `master`. This reverts commit 7936692badfe38f23ae95b51fb7bd7c2ff7e9bce. - - - - - a63c0a9e by Ben Gamari at 2020-12-15T15:17:59-05:00 Revert "Update for boxed rep" This reverts commit 4ffb30d8b637ccebecc81ce610f0af451ac8088d. - - - - - 53bfbb29 by Ben Gamari at 2020-12-15T15:37:24-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - bae76a30 by Ben Gamari at 2020-12-16T02:44:42+00:00 Update output for nullary TyConApp optimisation (ghc/ghc!2952) - - - - - 4b733b57 by Krzysztof Gogolewski at 2020-12-16T20:03:14+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. - - - - - ee463bd3 by Ryan Scott at 2020-12-16T16:55:23-05:00 Adapt to HsCoreTy (formerly NewHsTypeX) becoming a type synonym Needed for !4417, the fix for GHC#15706 and GHC#18914. - - - - - ed0b02f8 by tomjaguarpaw at 2020-12-19T10:17:19+00:00 Enable two warnings (#1245) (#1268) because they will be soon be added to -Wall. See https://gitlab.haskell.org/ghc/ghc/-/issues/15656 - - - - - d80bf8f5 by Sylvain Henry at 2020-12-21T10:09:25+01:00 Fix after binder collect changes - - - - - bf4c9d32 by Adam Gundry at 2020-12-23T21:35:01+00:00 Adapt to changes to GlobalRdrElt and AvailInfo Needed for ghc/ghc!4467 - - - - - 37736c4c by John Ericson at 2020-12-28T12:27:02-05:00 Support a new ghc --make node type for parallel backpack upsweep - - - - - 717bdeac by Vladislav Zavialov at 2020-12-29T10:50:02+03:00 Inline and fix getGADTConTypeG The getGADTConTypeG used HsRecTy, which is at odds with GHC issue haskell/haddock#18782. I noticed that getGADTConTypeG was only used in the Hoogle backend. Interestingly, when handling H98 constructors, Hoogle converts RecCon to PrefixCon (see Haddock.Backends.Hoogle.ppCtor). So I changed getGADTConTypeG to handle RecConGADT in the same manner as PrefixConGADT, and after this simplification moved it into the 'where' clause of ppCtor, to the only place where it is used. The practical effect of this change is as follows. Consider this example: data TestH98 = T98 { bar::Int } data TestGADT where TG :: { foo :: Int } -> TestGADT Before this patch, haddock --hoogle used to produce: T98 :: Int -> TestH98 [TG] :: {foo :: Int} -> TestGADT Notice how the record syntax was discarded in T98 but not TG. With this patch, we always produce signatures without record syntax: T98 :: Int -> TestH98 [TG] :: Int -> TestGADT I suspect this might also be a bugfix, as currently Hoogle doesn't seem to render GADT record constructors properly. - - - - - cb1b8c56 by Andreas Abel at 2020-12-30T21:12:37+01:00 Build instructions: haddock-library and -api first! - - - - - b947f6ad by Ben Gamari at 2020-12-31T13:04:19-05:00 Merge pull request haskell/haddock#1281 from obsidiansystems/wip/backpack-j Changes to support -j with backpack - - - - - 120e1cfd by Hécate Moonlight at 2021-01-04T19:54:58+01:00 Merge pull request haskell/haddock#1282 from andreasabel/master Build instructions: haddock-library and -api first! - - - - - fd45e41a by Ben Gamari at 2021-01-05T16:14:31-05:00 Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0 - - - - - b471bdec by Ben Gamari at 2021-01-05T16:23:02-05:00 Merge commit '1e56f63c3197e7ca1c1e506e083c2bad25d08793' into ghc-9.0 - - - - - 81cdbc41 by Alex Biehl at 2021-01-09T12:14:41+01:00 Prepare Haddock for being a GHC Plugin - - - - - b646d952 by Alex Biehl at 2021-01-09T12:14:41+01:00 Make Haddock a GHC Plugin - - - - - cc044674 by Alex Biehl at 2021-01-09T12:14:41+01:00 Add -j[n] CLI param to Haddock executable It translates to `--ghcopt=-j[n]` - - - - - 84a04073 by Alex Biehl at 2021-01-09T12:14:41+01:00 Abstract Monad for interface creation I found that when running as a plugin the lookupName function (which runs in Ghc monad) does not work correctly from the typeCheckResultAction hook. Instead, we abstracted the monad used when creating interfaces, so that access to GHC session specific parts is explicit and so that the TcM can provide their (correct) implementation of lookupName. - - - - - 5be2c4f7 by Alex Biehl at 2021-01-09T12:14:41+01:00 Accept tests - - - - - 8cefee9d by Alex Biehl at 2021-01-09T16:10:47+01:00 Add missing dependency for mtl - - - - - 3681f919 by Ben Gamari at 2021-01-13T18:39:25-05:00 Merge remote-tracking branch 'origin/ghc-9.0' into ghc-head - - - - - 33c6b152 by Hécate Moonlight at 2021-01-14T16:04:20+01:00 Merge pull request haskell/haddock#1273 from hsyl20/wip/hsyl20/arrows Fix after binder collect changes - - - - - 70d13e8e by Joachim Breitner at 2021-01-22T19:03:45+01:00 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) - - - - - 7d6dd57a by John Ericson at 2021-01-22T22:02:02+00:00 Add `NoGhcTc` instance now that it's not closed - - - - - e5fdaf0a by Alan Zimmerman at 2021-01-23T22:57:44+00:00 Merge pull request haskell/haddock#1293 from obsidiansystems/wip/fix-18936 Add `NoGhcTc` instance now that it's not closed - - - - - 989a1e05 by Oleg Grenrus at 2021-01-24T16:11:46+03:00 Add import list to Data.List - - - - - 368e144a by Ben Gamari at 2021-01-28T22:15:48+01:00 Adapt to "Make PatSyn immutable" - - - - - abe66c21 by Alfredo Di Napoli at 2021-02-01T08:05:35+01:00 Rename pprLogErrMsg to new name - - - - - e600e75c by Hécate Moonlight at 2021-02-05T14:53:00+01:00 Move CI to ghc-9.0 - - - - - dd492961 by Vladislav Zavialov at 2021-02-05T14:53:00+01:00 Update cabal.project and README build instructions - - - - - 31bd292a by Hécate Moonlight at 2021-02-05T15:03:56+01:00 Merge pull request haskell/haddock#1296 from Kleidukos/ghc-9.0 Merge the late additions to ghc-8.10 into ghc-9.0 - - - - - 6388989e by Vladislav Zavialov at 2021-02-05T17:41:57+03:00 Cleanup: fix build warnings - - - - - f99407ef by Daniel Rogozin at 2021-02-05T18:11:48+03:00 type level characters support for haddock (required for haskell/haddock#11342) - - - - - d8c6b26f by Hécate Moonlight at 2021-02-05T17:44:50+01:00 Add a CONTRIBUTING.md file - - - - - 6a01ad98 by Hécate Moonlight at 2021-02-05T17:58:16+01:00 Merge pull request haskell/haddock#1312 from Kleidukos/proper-branch-etiquette Add a CONTRIBUTING.md file - - - - - 955eecc4 by Vladislav Zavialov at 2021-02-05T20:29:00+03:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into ghc-head - - - - - 47b3d6ab by Hécate Moonlight at 2021-02-05T19:09:38+01:00 Amend the CONTRIBUTING.md file - - - - - 23de6137 by Hécate Moonlight at 2021-02-05T19:16:49+01:00 Merge pull request haskell/haddock#1313 from Kleidukos/amend-contributing Amend the CONTRIBUTING.md file - - - - - 69026b59 by Krzysztof Gogolewski at 2021-02-05T23:05:56+01:00 Display linear/multiplicity arrows correctly (#1238) Previously we were ignoring multiplicity and displayed a %1 -> b as a -> b. (cherry picked from commit b4b4d896d2d68d6c48e7db7bfe95c185ca0709cb) - - - - - ea026b78 by Oleg Grenrus at 2021-02-06T17:14:45+01:00 Add import list to Data.List - - - - - 5204326f by Hécate Moonlight at 2021-02-06T17:15:44+01:00 Merge pull request haskell/haddock#1316 from Kleidukos/explicit-imports-to-data-list Add import list to Data.List - - - - - 1f4d2136 by Ben Gamari at 2021-02-06T11:53:31-05:00 Merge remote-tracking branch 'origin/ghc-head' into wip/ghc-head-merge - - - - - 13f0d09a by Ben Gamari at 2021-02-06T11:53:45-05:00 Fix partial record selector warning - - - - - 5c115f7e by Ben Gamari at 2021-02-06T11:55:52-05:00 Merge commit 'a917dfd29f3103b69378138477514cbfa38558a9' into wip/ghc-head-merge - - - - - b6fd8b75 by Ben Gamari at 2021-02-06T12:01:31-05:00 Merge commit '41964cb2fd54b5a10f8c0f28147015b7d5ad2c02' into wip/ghc-head-merge - - - - - a967194c by Ben Gamari at 2021-02-06T18:30:35-05:00 Merge branch 'wip/ghc-head-merge' into ghc-head - - - - - 1f4c3a91 by MorrowM at 2021-02-07T01:52:33+02:00 Fix search div not scrolling - - - - - 684b1287 by Iñaki García Etxebarria at 2021-02-07T16:13:04+01:00 Add support for labeled module references Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label". - - - - - bdb55a5d by Hécate Moonlight at 2021-02-07T16:18:10+01:00 Merge pull request haskell/haddock#1319 from alexbiehl/alex/compat Backward compat: Add support for labeled module references - - - - - 6ca70991 by Hécate Moonlight at 2021-02-07T16:21:29+01:00 Merge pull request haskell/haddock#1314 from tweag/show-linear-backport Backport haskell/haddock#1238 (linear types) to ghc-9.0 - - - - - d9d73298 by Alex Biehl at 2021-02-07T17:46:25+01:00 Remove dubious parseModLink Instead construct the ModLink value directly when parsing. - - - - - 33b4d020 by Hécate Moonlight at 2021-02-07T17:52:05+01:00 Merge pull request haskell/haddock#1320 from haskell/alex/fix Remove dubious parseModLink - - - - - 54211316 by Hécate Moonlight at 2021-02-07T18:12:07+01:00 Merge pull request haskell/haddock#1318 from MorrowM/ghc-9.0 Fix search div not scrolling - - - - - 19db679e by alexbiehl-gc at 2021-02-07T18:14:46+01:00 Merge pull request haskell/haddock#1317 from bgamari/wip/ghc-head-merge Merge ghc-8.10 into ghc-head - - - - - 6bc1e9e4 by Willem Van Onsem at 2021-02-07T18:25:30+01:00 simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - c8537cf8 by alexbiehl-gc at 2021-02-07T18:30:40+01:00 Merge pull request haskell/haddock#1322 from haskell/alex/forward-port simplify calculating percentages fixing haskell/haddock#1194 (#1236) - - - - - 2d47ae4e by alexbiehl-gc at 2021-02-07T18:39:59+01:00 Merge branch 'ghc-head' into ghc-9.0 - - - - - 849e4733 by Hécate Moonlight at 2021-02-07T18:43:19+01:00 Merge pull request haskell/haddock#1321 from Kleidukos/ghc-9.0 Merge ghc-9.0 into ghc-head - - - - - ee6095d7 by Sylvain Henry at 2021-02-08T11:36:38+01:00 Update for Logger - - - - - 4ad688c9 by Alex Biehl at 2021-02-08T18:11:24+01:00 Merge pull request haskell/haddock#1310 from hsyl20/wip/hsyl20/logger2 Logger refactoring - - - - - 922a9e0e by Ben Gamari at 2021-02-08T12:54:33-05:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - 991649d2 by Sylvain Henry at 2021-02-09T10:55:17+01:00 Fix to build with HEAD - - - - - a8348dc2 by Hécate Moonlight at 2021-02-09T10:58:51+01:00 Merge pull request haskell/haddock#1327 from hsyl20/wip/hsyl20/logger2 Fix to build with HEAD - - - - - 0abdbca6 by Fendor at 2021-02-09T20:06:15+01:00 Add UnitId to Target record - - - - - d5790a0e by Alex Biehl at 2021-02-11T10:32:32+01:00 Stable sort for (data/newtype) instances - - - - - 8e6036f5 by Alex Biehl at 2021-02-11T10:32:32+01:00 Also make TyLit deterministic - - - - - f76d2945 by Hécate Moonlight at 2021-02-11T11:00:31+01:00 Merge pull request haskell/haddock#1329 from hsyl20/hsyl20/stabe_iface Stable sort for instances - - - - - 5e0469ea by Oleg Grenrus at 2021-02-14T15:28:15+02:00 Add import list to Data.List in Haddock.Interface.Create - - - - - fa57cd24 by Hécate Moonlight at 2021-02-14T17:19:27+01:00 Merge pull request haskell/haddock#1331 from phadej/more-explicit-data-list-imports Add import list to Data.List in Haddock.Interface.Create - - - - - f0cd629c by Hécate Moonlight at 2021-02-21T00:22:01+01:00 Merge pull request haskell/haddock#1311 from fendor/wip/add-targetUnitId-to-target Add UnitId to Target record - - - - - 674ef723 by Joachim Breitner at 2021-02-22T10:39:18+01:00 html-test: Always set language from ghc-9.2 on, the “default” langauge of GHC is expected to change more wildly. To prepare for that (and unblock https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4853), this sets the language for all the test files to `Haskell2010`. This should insolate this test suite against changes to the default. Cherry-picked from https://github.com/haskell/haddock/pull/1341 - - - - - f072d623 by Hécate Moonlight at 2021-02-22T10:56:51+01:00 Merge pull request haskell/haddock#1342 from nomeata/joachim/haskell2010-in-tests-ghc-head html-test: Always set language - - - - - caebbfca by Hécate Moonlight at 2021-02-22T11:53:07+01:00 Clean-up of Interface and Interface.Create's imports and pragmata - - - - - f6caa89d by Hécate Moonlight at 2021-02-22T11:54:58+01:00 Merge pull request haskell/haddock#1345 from Kleidukos/head/fix-interface-imports [ghc-head] Clean-up of Interface and Interface.Create's imports and pragmata - - - - - 7395c9cb by Hécate Moonlight at 2021-02-22T18:44:57+01:00 Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 6e9fb5d5 by Hécate Moonlight at 2021-02-22T18:45:28+01:00 Merge pull request haskell/haddock#1348 from Kleidukos/head/explicit-imports-interface Explicit imports for Haddock.Interface and Haddock.Interface.Create - - - - - 9198b118 by Alan Zimmerman at 2021-02-22T20:04:24+00:00 Context becomes a Maybe in the GHC AST This prevents noLoc's appearing in the ParsedSource. Match the change in GHC. - - - - - 0af20f64 by Hécate Moonlight at 2021-02-23T12:36:12+01:00 Fix the call-site of guessTarget in Interface.hs Explicit the imports from GHC.HsToCore.Docs - - - - - b7886885 by Hécate Moonlight at 2021-02-23T12:37:54+01:00 Merge pull request haskell/haddock#1349 from Kleidukos/fix-interface-guesstarget-call Fix the call-site of guessTarget in Interface.hs - - - - - 9cf041ba by Sylvain Henry at 2021-02-24T11:08:20+01:00 Fix haddockHypsrcTest output in ghc-head - - - - - b194182a by Hécate Moonlight at 2021-02-24T11:12:36+01:00 Merge pull request haskell/haddock#1351 from hsyl20/wip/hsyl20/fix-head Fix haddockHypsrcTest output in ghc-head - - - - - 3ce8b375 by Shayne Fletcher at 2021-03-06T09:55:03-05:00 Add ITproj to parser - - - - - d2abf762 by Ben Gamari at 2021-03-06T19:26:49-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - a0f6047d by Andrew Martin at 2021-03-07T11:25:23-05:00 Update for boxed rep - - - - - 6f63c99e by Ben Gamari at 2021-03-10T13:20:21-05:00 Update for "FastString: Use FastMutInt instead of IORef Int" - - - - - e13f01df by Luke Lau at 2021-03-10T15:38:40-05:00 Implement template-haskell's putDoc This catches up to GHC using the new extractTHDocs function, which returns documentation added via the putDoc function (provided it was compiled with Opt_Haddock). Since it's already a map from names -> docs, there's no need to do traversal etc. It also matches the change from the argument map being made an IntMap rather than a Map Int - - - - - 89263d94 by Alan Zimmerman at 2021-03-15T17:15:26+00:00 Match changes in GHC AST for in-tree API Annotations As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418 - - - - - 28db1934 by Alan Zimmerman at 2021-03-15T20:40:09+00:00 Change some type family test results. It is not clear to me whether the original was printing incorrectly (since we did not have the TopLevel flag before now), or if this behaviour is expected. For the time being I am assuming the former. - - - - - 7c11c989 by Sylvain Henry at 2021-03-22T10:05:19+01:00 Fix after NameCache changes - - - - - addbde15 by Sylvain Henry at 2021-03-22T10:05:19+01:00 NameCache doesn't store a UniqSupply anymore - - - - - 15ec6cec by Ben Gamari at 2021-03-22T17:53:44-04:00 Bump GHC version to 9.2 - - - - - dbd6aa63 by Hécate Moonlight at 2021-03-24T14:28:36+01:00 Merge pull request haskell/haddock#1365 from hsyl20/wip/hsyl20/iface1 NameCache refactoring - - - - - 2d32da7e by Oleg Grenrus at 2021-03-27T01:12:00+02:00 Specialization of Data.List - - - - - 32b84fa6 by Fendor at 2021-03-27T10:50:17+01:00 Add UnitId to Target record This way we always know to which home-unit a given target belongs to. So far, there only exists a single home-unit at a time, but it enables having multiple home-units at the same time. - - - - - 54bf9f0e by Hécate Moonlight at 2021-03-28T14:08:35+02:00 Merge pull request haskell/haddock#1368 from fendor/target-unit-id-revert Add UnitId to Target record - - - - - 7dea168a by Alan Zimmerman at 2021-03-29T08:45:52+01:00 EPA : Rename ApiAnn to EpAnn - - - - - 72967f65 by Alfredo Di Napoli at 2021-03-29T09:47:01+02:00 pprError changed name in GHC - - - - - 4bc61035 by Alan Zimmerman at 2021-03-29T16:16:27-04:00 EPA : Rename ApiAnn to EpAnn - - - - - 108d031d by Ben Gamari at 2021-03-29T18:49:36-04:00 Merge commit '36418c4f70d7d2b179a77925b3ad5caedb08c9b5' into HEAD - - - - - 1444f700 by Ben Gamari at 2021-03-31T09:18:39-04:00 Merge pull request haskell/haddock#1370 from adinapoli/wip/adinapoli-diag-reason-severity Rename pprError to mkParserErr - - - - - d3087b79 by Ben Gamari at 2021-03-31T11:34:17-04:00 Merge commit 'd8d8024ad6796549a8d3b5512dabf3288d14e30f' into ghc-head - - - - - 170b79e9 by Ben Gamari at 2021-03-31T12:24:56-04:00 Merge remote-tracking branch 'upstream/ghc-head' into ghc-head - - - - - db0d6bae by Ben Gamari at 2021-04-10T09:34:35-04:00 Bump GHC version to 9.3 - - - - - a9f2c421 by Alan Zimmerman at 2021-04-19T18:26:46-04:00 Update for EPA changes in GHC (cherry picked from commit cafb48118f7c111020663776845897e225607b41) - - - - - 1ee4b7c7 by Sylvain Henry at 2021-05-11T10:00:06+02:00 Removal of HsVersions.h (#1388) * Update for EPA changes in GHC * Account for HsVersions.h removal Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - 79e819e9 by Hécate Moonlight at 2021-05-11T10:14:47+02:00 Revert "Removal of HsVersions.h (#1388)" This reverts commit 72118896464f94d81f10c52f5d9261efcacc57a6. - - - - - 3dbd3f8b by Alan Zimmerman at 2021-05-11T10:15:17+02:00 Update for EPA changes in GHC - - - - - 2ce80c17 by Sylvain Henry at 2021-05-11T10:15:19+02:00 Account for HsVersions.h removal - - - - - 00e4c918 by Christiaan Baaij at 2021-05-13T08:21:56+02:00 Add Haddock support for the OPAQUE pragma (#1380) - - - - - 8f9049b2 by Hécate Moonlight at 2021-05-13T08:40:22+02:00 fixup! Use GHC 9.2 in CI runner - - - - - 27ddec38 by Alan Zimmerman at 2021-05-13T22:51:20+01:00 EPA: match changes from GHC T19834 - - - - - f8a1d714 by Felix Yan at 2021-05-14T17:10:04+02:00 Allow hspec 2.8 (#1389) All tests are passing. - - - - - df44453b by Divam Narula at 2021-05-20T15:42:42+02:00 Update ref, the variables got renamed. (#1391) This is due to ghc/ghc!5555 which caused a change in ModDetails in case of NoBackend. Now the initModDetails is used to recreate the ModDetails from interface and in-memory ModDetails is not used. - - - - - e46bfc87 by Alan Zimmerman at 2021-05-20T19:05:09+01:00 Remove Maybe from HsQualTy Match changes in GHC for haskell/haddock#19845 - - - - - 79bd7b62 by Shayne Fletcher at 2021-05-22T08:20:39+10:00 FieldOcc: rename extFieldOcc to foExt - - - - - 6ed68c74 by Ben Gamari at 2021-05-21T22:29:30-04:00 Merge commit '3b6a8774bdb543dad59b2618458b07feab8a55e9' into ghc-head - - - - - f9a02d34 by Alfredo Di Napoli at 2021-05-24T13:53:00+02:00 New Parser diagnostics interface - - - - - 392807d0 by Ben Gamari at 2021-05-24T09:57:40-04:00 Merge pull request haskell/haddock#1394 from adinapoli/wip/adinapoli-align-ps-messages Align Haddock to use the new Parser diagnostics interface - - - - - 33023cd8 by Ben Gamari at 2021-05-24T11:19:16-04:00 Revert "Add Haddock support for the OPAQUE pragma (#1380)" This reverts commit a1337c599ef7720b0482a25c55f11794112496dc. The GHC patch associated with this change is not yet ready to be merged. - - - - - 8c005af7 by Ben Simms at 2021-05-28T07:56:20+02:00 CI configuration for ghc-head (#1395) - - - - - 1e947612 by Hécate Moonlight at 2021-05-28T12:27:35+02:00 Use GHC 9.2 in CI runner (#1378) - - - - - e6fa10ab by CGenie at 2021-05-31T09:02:13+02:00 Add page about common errors (#1396) * Update index.rst Common errors page * Create common-errors.rst * Update common-errors.rst * Use GHC 9.2 in CI runner (#1378) * [haddock-api] remove .hspec-failures Co-authored-by: Hécate Moonlight <Kleidukos at users.noreply.github.com> - - - - - abc72a8d by Sylvain Henry at 2021-06-01T10:02:06+02:00 Adapt Haddock to Logger and Parser changes (#1399) - - - - - 91373656 by Zubin Duggal at 2021-06-01T20:45:10+02:00 Update haddockHypSrc tests since we now compute slighly more type info (#1397) - - - - - ed712822 by Marcin Szamotulski at 2021-06-02T08:54:33+02:00 Added myself to contributors - - - - - 49fdbcb7 by Marcin Szamotulski at 2021-06-02T08:57:24+02:00 Document multi component support - - - - - 9ddc8d7d by Hécate Moonlight at 2021-06-02T09:35:55+02:00 Merge pull request haskell/haddock#1379 from coot/coot/document-multi-component-support Document multi component support - - - - - 585b5c5e by Ben Simms at 2021-06-02T19:46:54+02:00 Update CONTRIBUTING.md (#1402) - - - - - 1df4a605 by Ben Simms at 2021-06-02T19:47:14+02:00 Update CONTRIBUTING.md (#1403) - - - - - 58ea43d2 by sheaf at 2021-06-02T22:09:06+02:00 Update Haddock Bug873 to account for renaming - - - - - c5d0ab23 by Vladislav Zavialov at 2021-06-10T13:35:42+03:00 HsToken in FunTy, RecConGADT - - - - - 1ae2f40c by Hécate Moonlight at 2021-06-11T11:19:09+02:00 Update the CI badges - - - - - 6fdc4de2 by Sylvain Henry at 2021-06-28T19:21:17+02:00 Fix mkParserOpts (#1411) - - - - - 18201670 by Alfredo Di Napoli at 2021-07-05T07:55:12+02:00 Rename getErrorMessages Lexer import This commit renames the Lexer import in `Hyperlinker.Parser` from `getErrorMessages` to `getPsErrorMessages` to eliminate the ambiguity with the `getErrorMessages` function defined in `GHC.Types.Error`. - - - - - 23173ca3 by Ben Gamari at 2021-07-07T11:31:44-04:00 Merge pull request haskell/haddock#1413 from adinapoli/wip/adinapoli-issue-19920 Rename getErrorMessages Lexer import - - - - - b3dc4ed8 by Alan Zimmerman at 2021-07-28T22:30:59+01:00 EPA: match changes from GHC T19834 (cherry picked from commit 2fec1b44e0ee7e263286709aa528b4ecb99ac6c2) - - - - - 5f177278 by Ben Gamari at 2021-08-06T01:17:37-04:00 Merge commit '2a966c8ca37' into HEAD - - - - - cdd81d08 by Marcin Szamotulski at 2021-08-08T17:19:06+02:00 coot/multiple packages (ghc-9.2) (#1418) - - - - - be0d71f1 by Marcin Szamotulski at 2021-08-16T08:46:03+02:00 coot/multiple package (ghc-head) (#1419) * FromJSON class Aeson style FromJSON class with Parsec based json parser. * doc-index.json file for multiple packages When creating haddock summary page for multiple packages render doc-index.json file using contents of all found 'doc-index.json' files. * Render doc-index.json When rendering html, render doc-index.json file independently of maybe_index_url option. doc-index.json file is useful now even if maybe_index_url is not `Nothing`. * base url option New `Flag_BaseURL` which configures from where static files are loaded (--base-url). If given and not equal "." static files are not coppied, as this indicates that they are not read from the the directory where we'd copy them. The default value is ".". - - - - - 3b09dbdf by Hécate Moonlight at 2021-10-07T23:26:03+02:00 Update GHC 9.2 to latest pre-release in CI - - - - - 7ac55417 by Zubin Duggal at 2021-10-11T12:10:19+02:00 Enable Haddock tests in GHC windows CI (#1428) * testsuite: strip windows line endings for haddock * hyperlinker: Work around double escaping (#19236) * deterministic SCC - - - - - 1cb81f25 by Andrew Lelechenko at 2021-10-12T15:23:19+02:00 haddock-library does not depend on bytestring or transformers (#1426) - - - - - a890b9aa by sheaf at 2021-10-15T22:19:42+02:00 update haddockHypsrcTest for GHC MR !6705 (#1430) - - - - - 42a55c6c by Sylvain Henry at 2021-10-15T22:20:10+02:00 Fix after PkgQual refactoring (#1429) - - - - - 91659238 by Alan Zimmerman at 2021-10-28T18:57:10+01:00 Update for changes in GHC for branch wip/az/no-srcspan-anno-instances - - - - - acf23e60 by Vladislav Zavialov at 2021-11-05T02:09:47+03:00 Do not use forall as an identifier See GHC ticket haskell/haddock#20609 - - - - - c565db0e by Krzysztof Gogolewski at 2021-11-27T02:42:35+01:00 Update after NoExtCon -> DataConCantHappen rename - - - - - b5f55590 by Artem Pelenitsyn at 2021-11-27T11:14:17+01:00 fix CI for 9.2 (#1436) - - - - - 25cd621e by Matthew Pickering at 2021-12-02T11:46:54+00:00 Update html-test for Data.List revert - - - - - 1d5ff85f by malteneuss at 2021-12-15T07:56:55+01:00 Add hint about inline link issue (#1444) - - - - - 791fde81 by Sylvain Henry at 2021-12-16T09:29:51+01:00 Bump ghc-head (#1445) * Update after NoExtCon -> DataConCantHappen rename * Update html-test for Data.List revert * Fix for new Plugins datatype Co-authored-by: Krzysztof Gogolewski <krzysztof.gogolewski at tweag.io> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 44236317 by Sylvain Henry at 2021-12-17T09:39:00+01:00 Fix for new Plugins datatype - - - - - 80ada0fa by Hécate Moonlight at 2021-12-17T17:28:48+01:00 Remove ghc-head workflow (#1446) Contributions of GHC glue code are now done on the GHC gitlab, not in the GitHub repo anymore. - - - - - 49e171cd by Matthew Pickering at 2021-12-28T09:47:09+00:00 Remove use of ExtendedModSummary - - - - - 0e91b5ea by askeblad at 2022-01-04T09:18:35+01:00 update URLs - - - - - 9f13c212 by Hécate Moonlight at 2022-02-25T10:19:46+01:00 Fix solver for GHC 9.2 - - - - - 386751a1 by Meng Weng Wong at 2022-02-25T19:19:11+01:00 IDoc link has bitrotted; replaced with web.archive.org cache. (#1454) - - - - - d877cbe6 by Hécate Moonlight at 2022-02-25T19:21:58+01:00 Fix haddock user guide (#1456) - - - - - cc47f036 by Andrew Lelechenko at 2022-03-04T17:29:36+01:00 Allow text-2.0 in haddock-library (#1459) - - - - - 7b3685a3 by malteneuss at 2022-03-07T19:27:24+01:00 Add multi-line style hint to style section (#1460) - - - - - c51088b8 by John Ericson at 2022-03-11T16:46:26+01:00 Fix CollectPass instance to match TTG refactor Companion to GHC !7614 (https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7614) - - - - - b882195b by Vladislav Zavialov at 2022-03-14T20:32:30+01:00 Link to (~) - - - - - 877349b8 by Christiaan Baaij at 2022-03-16T09:20:43+01:00 Add Haddock support for the OPAQUE pragma - - - - - 0ea22721 by askeblad at 2022-03-16T09:44:27+01:00 typos (#1464) - - - - - a6d13da1 by Matthew Pickering at 2022-03-22T13:41:17+00:00 Minimum changes needed for compilation with hi-haddock With hi-haddock, of course there is a much large refactoring of haddock which could be achieved but that is left for a future patch which can implemented at any time independently of GHC. - - - - - e7ac9129 by Matthew Pickering at 2022-03-22T21:17:50+00:00 Update test output - - - - - 6d916214 by Matthew Pickering at 2022-03-24T15:06:26+00:00 Merge branch 'wip/opaque_pragma' into 'ghc-head' Add Haddock support for the OPAQUE pragma See merge request ghc/haddock!2 - - - - - 42208183 by Steve Hart at 2022-03-25T20:43:50+01:00 Fix CI (#1467) * CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed. - - - - - 9676fd79 by Steve Hart at 2022-03-25T21:33:34+01:00 Make links in Synopsis functional again (#1458) Commit e41c1cbe9f0476997eac7b4a3f17cbc6b2262faf added a call to e.preventDefault() when handling click events that reach a toggle element. This prevents the browser from following hyperlinks within the Synopsis section when they are clicked by a user. This commit restores functioning hyperlinks within the Synopsis section by removing the call to e.preventDefault(), as it does not appear to be necessary, and removing it increases the flexibility of the details-helper code. - - - - - d1edd637 by sheaf at 2022-04-01T12:02:02+02:00 Keep track of promotion ticks in HsOpTy Keeping track of promotion ticks in HsOpTy allows us to properly pretty-print promoted constructors such as lists. - - - - - 9dcb2dfc by Jakob Brünker at 2022-04-01T15:46:22+00:00 Add support for \cases See merge request ghc/ghc!7873 - - - - - b0412ee5 by askeblad at 2022-04-06T17:47:57+02:00 spelling errors (#1471) - - - - - 6b18829b by Vladislav Zavialov at 2022-04-06T18:53:58+02:00 Rename [] to List - - - - - 2d046691 by Vladislav Zavialov at 2022-04-07T20:25:54+03:00 HsToken ConDeclGADT con_dcolon - - - - - 90b43da4 by Steve Hart at 2022-04-12T13:29:46+02:00 Parse Markdown links at beginning of line within a paragraph (#1470) * Catch Markdown links at beginning of line within paragraph Per Issue haskell/haddock#774, Markdown links were being parsed as ordinary text when they occurred at the beginning of a line other than the first line of the paragraph. This occurred because the parser was not interpreting a left square bracket as a special character that could delimit special markup. A space character was considered a special character, so, if a space occurred at the beginning of the new line, then the parser would interpret the space by itself and then continue parsing, thereby catching the Markdown link. '\n' was not treated as a special character, so the parser did not catch a Markdown link that may have followed. Note that this will allow for Markdown links that are not surrounded by spaces. For example, the following text includes a Markdown link that will be parsed: Hello, world[label](url) This is consistent with how the parser handles other types of markup. * Remove obsolete documentation hint Commit 6b9aeafddf20efc65d3725c16e3fc43a20aac343 should eliminate the need for the workaround suggested in the documentation. - - - - - 5b08312d by Hécate Moonlight at 2022-04-12T13:36:38+02:00 Force ghc-9.2 in the cabal.project - - - - - 0d0ea349 by dependabot[bot] at 2022-04-12T13:57:41+02:00 Bump path-parse from 1.0.5 to 1.0.7 in /haddock-api/resources/html (#1469) Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.5 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 2b9fc65e by dependabot[bot] at 2022-04-12T13:57:54+02:00 Bump copy-props from 2.0.4 to 2.0.5 in /haddock-api/resources/html (#1468) Bumps [copy-props](https://github.com/gulpjs/copy-props) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/gulpjs/copy-props/releases) - [Changelog](https://github.com/gulpjs/copy-props/blob/master/CHANGELOG.md) - [Commits](https://github.com/gulpjs/copy-props/compare/2.0.4...2.0.5) --- updated-dependencies: - dependency-name: copy-props dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - ea98a6fb by Ben Gamari at 2022-04-23T22:54:37-04:00 Update for GHC 9.4 - - - - - 9e11864f by Ben Gamari at 2022-04-25T16:24:31-04:00 Merge remote-tracking branch 'upstream/ghc-9.2' into ghc-head - - - - - f83cc506 by Ben Gamari at 2022-04-25T17:00:25-04:00 Bump ghc version to 9.5 - - - - - e01c2e7d by Ben Gamari at 2022-04-28T16:19:04-04:00 Revert "Bump ghc-head (#1445)" This reverts commit b29a78ef6926101338f62e84f456dac8659dc9d2. This should not have been merged. - - - - - a2b5ee8c by Ben Gamari at 2022-04-28T16:19:24-04:00 Merge commit '2627a86c' into ghc-head - - - - - 0c6fe4f9 by Ben Gamari at 2022-04-29T10:05:54-04:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-9.4 - - - - - b6e5cb0a by Ben Gamari at 2022-04-29T11:46:06-04:00 Revert "HsToken ConDeclGADT con_dcolon" This reverts commit 24208496649a02d5f87373052c430ea4a97842c5. - - - - - 15a62888 by Ben Gamari at 2022-04-29T15:12:55-04:00 Bump base upper bound - - - - - 165b9031 by Ben Gamari at 2022-04-29T23:58:38-04:00 Update test output - - - - - e0c3e5da by Phil de Joux at 2022-05-02T14:46:38+02:00 Add hlint action .hlint.yaml with ignores & CPP. (#1475) - - - - - ead1158d by Raphael Das Gupta at 2022-05-02T14:46:48+02:00 fix grammar in docs: "can the" → "can be" (#1477) - - - - - cff97944 by Ben Gamari at 2022-05-02T18:38:56-04:00 Allow base-4.17 - - - - - e4ecb201 by Phil de Joux at 2022-05-03T13:14:55+02:00 Remove unused imports that GHC warned about. (#1480) - - - - - 222890b1 by Phil de Joux at 2022-05-03T13:15:46+02:00 Follow hlint suggestion to remove redundant bang. (#1479) - - - - - 058b671f by Phil de Joux at 2022-05-03T13:34:04+02:00 Follow hlint, remove language pragmas in libs. (#1478) - - - - - 0a645049 by Ben Simms at 2022-05-03T14:19:24+02:00 Keep track of ordered list indexes and render them (#1407) * Keep track of ordered list indexes and render them * Rename some identifiers to clarify - - - - - f0433304 by Norman Ramsey at 2022-05-04T15:13:34-04:00 update for changes in GHC API - - - - - 3740cf71 by Emily Martins at 2022-05-06T18:23:48+02:00 Add link to the readthedocs in cabal description to show on hackage. (cherry picked from commit 52e2d40d47295c02d3181aac0c53028e730f1e3b) - - - - - 5d754f1e by Hécate Moonlight at 2022-05-06T18:44:57+02:00 remove Bug873 - - - - - 968fc267 by Hécate Moonlight at 2022-05-06T18:48:28+02:00 Ignore "Use second" HLint suggestion. It increases laziness. - - - - - 02d14e97 by Jade Lovelace at 2022-05-07T17:42:08+02:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` - - - - - b22b87ed by Artem Pelenitsyn at 2022-05-08T16:19:47+02:00 fix parsing trailing quotes in backticked identifiers (#1408) (#1483) - - - - - 80ae107b by Alex Biehl at 2022-05-08T16:37:16+02:00 Fix "Defined by not used" error (cherry picked from commit 6e02a620a26c3a44f98675dd1b93b08070c36c0a) - - - - - 4c838e84 by Hécate Moonlight at 2022-05-08T16:37:16+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - fc9827b4 by Hécate Moonlight at 2022-05-08T16:40:40+02:00 Fix the changelog and bump the version of haddock-library on ghc-9.2 - - - - - b153b555 by Xia Li-yao at 2022-05-20T17:52:42+02:00 Hide synopsis from search when hidden (#1486) Fix haskell/haddock#1451 - - - - - f3e38b85 by Marcin Szamotulski at 2022-05-21T23:32:31+02:00 Allow to hide interfaces when rendering multiple components (#1487) This is useful when one wishes to `--gen-contents` when rendering multiple components, but one does not want to render all modules. This is in particular useful when adding base package. - - - - - f942863b by Marcin Szamotulski at 2022-05-24T08:29:59+02:00 Check if doc-index.json exists before reading it (#1488) - - - - - 31e92982 by Marcin Szamotulski at 2022-05-25T16:22:13+02:00 Version bump 2.26.1 (#1489) * Version bump 2.26.1 We extended format accepted by `--read-interface` option, which requires updating the minor version. * Update documentation of --read-interface option - - - - - 7cc873e0 by sheaf at 2022-05-25T16:42:31+02:00 Updated HaddockHypsrcTest output for record update changes (MR !7981) - - - - - cd196942 by Marcin Szamotulski at 2022-05-25T20:28:47+02:00 Use visibility to decide which interfaces are included in quickjump (#1490) This is also consistent with how html index is build. See haskell/cabal#7669 for rationale behind this decision. - - - - - 00c713c5 by Hécate Moonlight at 2022-05-26T17:09:15+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 2f3039f1 by Hécate Moonlight at 2022-05-26T17:10:59+02:00 Add code of conduct and hspec failure files in .gitignore - - - - - 63a5650c by romes at 2022-05-31T12:43:22+01:00 TTG: Match new GHC AST - - - - - dd7d1617 by romes at 2022-06-02T16:11:00+01:00 Update for IE changes in !8228 - - - - - c23aaab7 by cydparser at 2022-06-06T08:48:14+02:00 Fix and improve CI (#1495) * Pin GHC version before creating the freeze file * Use newest action versions * Improve caching * Avoid unnecessarily reinstalling GHC * Use GHC 9.2.2 for CI Co-authored-by: Cyd Wise <cwise at tripshot.com> - - - - - c156fa77 by Hécate Moonlight at 2022-06-06T11:59:35+02:00 Add Mergify configuration (#1496) - - - - - 2dba4188 by Hécate Moonlight at 2022-06-06T16:12:50+02:00 Bump haddock's version in cabal file to 2.26.1 (#1497) - - - - - d7d4b8b9 by Marcin Szamotulski at 2022-06-07T06:09:40+00:00 Render module tree per package in the content page (#1492) * Render module tree per package in the content page When rendering content page for multiple packages it is useful to split the module tree per package. Package names in this patch are inferred from haddock's interface file names. * Write PackageInfo into interface file To keep interface file format backward compatible, instead of using `Binary` instance for `InterfaceFile` we introduce functions to serialise and deserialise, which depends on the interface file version. - - - - - 77765665 by Mike Pilgrem at 2022-06-12T21:57:19+01:00 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - b0e079b0 by mergify[bot] at 2022-06-13T11:49:37+00:00 Merge pull request haskell/haddock#1108 from mpilgrem/fix783 Fix haskell/haddock#783 Don't show button if --quickjump not present - - - - - 6c0292b1 by Hécate Moonlight at 2022-06-21T17:21:08+02:00 Update the contribution guide - - - - - e413b9fa by dependabot[bot] at 2022-06-21T23:38:19+02:00 Bump shell-quote from 1.6.1 to 1.7.3 in /haddock-api/resources/html (#1500) Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.6.1 to 1.7.3. - [Release notes](https://github.com/substack/node-shell-quote/releases) - [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md) - [Commits](https://github.com/substack/node-shell-quote/compare/1.6.1...1.7.3) --- updated-dependencies: - dependency-name: shell-quote dependency-type: indirect ... Signed-off-by: dependabot[bot] <support at github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - - - - - 29d0ef70 by romes at 2022-07-06T11:29:39+02:00 TTG: AST Updates for !8308 - - - - - 1bae7c87 by Alan Zimmerman at 2022-07-06T22:50:43+01:00 Match GHC changes for T21805 This brings in a newtype for FieldLabelString - - - - - 6fe8b988 by Phil de Joux at 2022-07-16T20:54:26+00:00 Bump hlint version to 3.4.1, the version with counts. (#1503) Redo the counts available with the --default option. - - - - - 48fb43af by Phil de Joux at 2022-07-19T09:32:55+02:00 Follow hlint suggestion: unused LANGUAGE pragma. (#1504) * Follow hlint suggestion: unused LANGUAGE pragma. * Ignore within modules to pass linting and pass tests. - - - - - c1cf1fa7 by Phil de Joux at 2022-07-24T13:45:59+02:00 Follow hlint suggestion: redundant $. (#1505) * Follow hlint suggestion: redundant $. * Remove $ and surplus blank lines in Operators. - - - - - 74777eb2 by Jade Lovelace at 2022-07-29T11:02:41+01:00 Fix hyperlinks to external items and modules (#1482) Fixes haskell/haddock#1481. There were two bugs in this: * We were assuming that we were always getting a relative path to the module in question, while Nix gives us file:// URLs sometimes. This change checks for those and stops prepending `..` to them. * We were not linking to the file under the module. This seems to have been a regression introduced by haskell/haddock#977. That is, the URLs were going to something like file:///nix/store/3bwbsy0llxxn1pixx3ll02alln56ivxy-ghc-9.0.2-doc/share/doc/ghc/html/libraries/base-4.15.1.0/src which does not have the appropriate HTML file or fragment for the item in question at the end. There is a remaining instance of the latter bug, but not in the hyperlinker: the source links to items reexported from other modules are also not including the correct file name. e.g. the reexport of Entity in esqueleto, from persistent. NOTE: This needs to get tested with relative-path located modules. It seems correct for Nix based on my testing. Testing strategy: ``` nix-shell '<nixpkgs>' --pure -A haskell.packages.ghc922.aeson mkdir /tmp/aesonbuild && cd /tmp/aesonbuild export out=/tmp/aesonbuild/out genericBuild ln -sf $HOME/co/haddock/haddock-api/resources . ./Setup haddock --with-haddock=$HOME/path/to/haddock/exec --hyperlink-source ``` (cherry picked from commit ab53ccf089ea703b767581ac14be0f6c78a7678a) - - - - - faa4cfcf by Hécate Moonlight at 2022-07-29T20:31:20+02:00 Merge pull request haskell/haddock#1516 from duog/9-4-backport-fix-hyperlinks Backport 9-4: Fix hyperlinks to external items and modules (#1482) - - - - - 5d2450f3 by Ben Gamari at 2022-08-05T17:41:15-04:00 Merge remote-tracking branch 'origin/ghc-9.4' - - - - - 63954f73 by Ben Gamari at 2022-08-05T19:08:36-04:00 Clean up build and testsuite for GHC 9.4 - - - - - d4568cb8 by Hécate Moonlight at 2022-08-05T19:10:49-04:00 Bump the versions - - - - - 505583a4 by Ben Gamari at 2022-08-06T13:58:27-04:00 Merge pull request haskell/haddock#1518 from bgamari/wip/ghc-9.4-merge Merge GHC 9.4 into `main` - - - - - 5706f6a4 by Ben Gamari at 2022-08-06T22:57:21-04:00 html-test: Testsuite changes for GHC 9.4.1 - - - - - 5f2a45a2 by Ben Gamari at 2022-08-15T14:33:05-04:00 doc: Fix a few minor ReST issues Sphinx was complaining about too-short title underlines. - - - - - 220e6410 by Ben Gamari at 2022-08-15T14:41:24-04:00 Merge branch 'main' into ghc-head - - - - - fbeb1b02 by Ben Gamari at 2022-08-15T14:45:16-04:00 Updates for GHC 9.5 - - - - - eee562eb by Vladislav Zavialov at 2022-08-15T14:46:13-04:00 HsToken ConDeclGADT con_dcolon - - - - - c5f073db by Ben Gamari at 2022-08-15T16:55:35-04:00 Updates for GHC 9.5 - - - - - 3f7ab242 by Vladislav Zavialov at 2022-08-15T16:55:35-04:00 HsToken ConDeclGADT con_dcolon - - - - - a18e473d by Ben Gamari at 2022-08-16T08:35:19-04:00 Merge branch 'wip/ghc-head-bump' into ghc-head - - - - - af0ff3a4 by M Farkas-Dyck at 2022-09-15T21:16:05+00:00 Disuse `mapLoc`. - - - - - a748fc38 by Matthew Farkas-Dyck at 2022-09-17T10:44:18+00:00 Scrub partiality about `NewOrData`. - - - - - 2758fb6c by John Ericson at 2022-09-18T03:27:37+02:00 Test output changed because of change to `base` Spooky, but I guess that is intended? - - - - - a7eec128 by Torsten Schmits at 2022-09-21T11:06:55+02:00 update tests for the move of tuples to GHC.Tuple.Prim - - - - - 461e7b9d by Ross Paterson at 2022-09-24T22:01:25+00:00 match implementation of GHC proposal haskell/haddock#106 (Define Kinds Without Promotion) - - - - - f7fd77ef by sheaf at 2022-10-17T14:53:01+02:00 Update Haddock for GHC MR !8563 (configuration of diagnostics) - - - - - 3d3e85ab by Vladislav Zavialov at 2022-10-22T23:04:06+03:00 Class layout info - - - - - cbde4cb0 by Simon Peyton Jones at 2022-10-25T23:19:18+01:00 Adapt to Constraint-vs-Type See haskell/haddock#21623 and !8750 - - - - - 7108ba96 by Tom Smeding at 2022-11-01T22:33:23+01:00 Remove outdated footnote about module re-exports The footnote is invalid with GHC 9.2.4 (and possibly earlier): the described behaviour in the main text works fine. - - - - - 206c6bc7 by Hécate Moonlight at 2022-11-01T23:00:46+01:00 Merge pull request haskell/haddock#1534 from tomsmeding/patch-1 - - - - - a57b4c4b by Andrew Lelechenko at 2022-11-21T00:39:52+00:00 Support mtl-2.3 - - - - - e9d62453 by Simon Peyton Jones at 2022-11-25T13:49:12+01:00 Track small API change in TyCon.hs - - - - - eb1c73f7 by Ben Gamari at 2022-12-07T08:46:21-05:00 Update for GhC 9.6 - - - - - 063268dd by Ben Gamari at 2022-12-07T11:26:32-05:00 Merge remote-tracking branch 'upstream/ghc-head' into HEAD - - - - - 4ca722fe by Ben Gamari at 2022-12-08T14:43:26-05:00 Bump bounds to accomodate base-4.18 - - - - - 340b7511 by Vladislav Zavialov at 2022-12-10T12:31:28+00:00 HsToken in HsAppKindTy - - - - - 946226ec by Ben Gamari at 2022-12-13T20:12:56-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - fd8faa66 by Ben Gamari at 2022-12-22T13:44:28-05:00 Bump GHC version to 9.7 - - - - - 2958aa9c by Ben Gamari at 2022-12-22T14:49:16-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 9e0fefd8 by Andrei Borzenkov at 2023-01-30T14:02:04+04:00 Rename () to Unit, Rename (,,...,,) to Tuple<n> - - - - - eb3968b5 by Ben Gamari at 2023-03-10T02:32:43-05:00 Bump versions for ghc-9.6 release - - - - - 4aeead36 by Adam Gundry at 2023-03-23T13:53:47+01:00 Adapt to warning categories changes - - - - - 642d8d60 by sheaf at 2023-03-29T13:35:56+02:00 Adapt to record field refactor This commit adapts to the changes in GHC MR !8686, which overhauls the treatment of record fields in the renamer, adding separate record field namespaces and entirely removing the GreName datatype. - - - - - ac8d4333 by doyougnu at 2023-03-29T11:11:44-04:00 Update UniqMap API - - - - - 7866fc86 by Ben Orchard at 2023-04-20T11:29:33+02:00 update classify with new tokens - - - - - ffcdd683 by Finley McIlwaine at 2023-04-24T09:36:18-06:00 Remove index-state - - - - - 05b70982 by Finley McIlwaine at 2023-04-26T08:16:31-06:00 `renameInterface` space leak fixes - Change logic for accumulation of names for which link warnings will be generated - Change handling of `--ignore-link-symbol` to allow qualified and unqualified names. Added to CHANGES.md - Some formatting changes and comments here and there - - - - - e5697d7c by Finley McIlwaine at 2023-04-27T18:46:36-06:00 Messy things - ghc-debug dependency and instrumentation - cabal.project custom with-compiler - hie.yaml files - traces and such - - - - - 0b8ef80b by Finley McIlwaine at 2023-05-02T18:08:52-06:00 Stop retaining GRE closures GRE closures should never be necessary to Haddock, so we never want to keep them on the heap. Despite that, they are retained by a lot of the data structures that Haddock makes use of. - Attempt to fix that situation by adding strictness to various computations and pruning the `ifaceInstances` field of `Interface` to a much thinner data type. - Removes the `ifaceFamInstances` field, as it was never used. - Move some of the attach instances types (e.g. `SimpleType`) to the types module - - - - - 8bda991b by Finley McIlwaine at 2023-05-08T16:07:51-06:00 Memory usage fixes - Refactor `ifaceDeclMap` to drastically reduce memory footprint. We no longer store all declarations associated with a given name, since we only cared to determine if the only declaration associated with a name was a value declaration. Change the `DeclMap` type to better reflect this. - Drop pre-renaming export items after the renaming step. Since the Hoogle backend used the pre-renamed export items, this isn't trivial. We now generate Hoogle output for exported declarations during the renaming step (if Hoogle output /should/ be generated), and store that with the renamed export item. - Slightly refactor Hoogle backend to handle the above change and allow for early generation of Hoogle output. - Remove the `ifaceRnDocMap` and `ifaceRnArgMap` fields of the `Interface` type, as they were never used. - Remove some unnecessary strictness - Remove a lot of dead code from `Syb` module - - - - - 1611ac0c by Finley McIlwaine at 2023-05-09T11:51:57-06:00 Unify ErrMsgM and IfM - Delete ErrMsgM, stop accumulating warnings in a writer - Make IfM a state monad, print warnings directly to stdout, move IfM type into types module - Drop ErrMsg = String synonym - Unset IORefs from plugin after they are read, preventing unnecessary retention of interfaces - - - - - 42d696ab by Finley McIlwaine at 2023-05-11T15:52:07-06:00 Thunk leak fixes The strictness introduced in this commit was motivated by observing thunk leaks in the eventlog2html output. - Refactor attach instances list comprehension to avoid large intermediate thunks - Refactor some HTML backend list comprehensions to avoid large intermediate thunks - Avoid thunks accumulating in documentation types or documentation parser - A lot of orphan NFData instances to allow us to force documentation values - - - - - 68561cf6 by Finley McIlwaine at 2023-05-11T17:02:10-06:00 Remove GHC debug dep - - - - - 10519e3d by Finley McIlwaine at 2023-05-15T12:40:48-06:00 Force HIE file path Removes a potential retainer of `ModSummary`s - - - - - 1e4a6ec6 by Finley McIlwaine at 2023-05-15T14:20:34-06:00 Re-add index-state, with-compiler, delete hie.yamls - - - - - a2363fe9 by Hécate Moonlight at 2023-05-15T22:45:16+02:00 Merge pull request haskell/haddock#1594 from FinleyMcIlwaine/finley/ghc-9.6-mem-fixes Reduce memory usage - - - - - e8a78383 by Finley McIlwaine at 2023-05-17T12:19:16-06:00 Merge branch ghc-9.6 into ghc-head - - - - - 22e25581 by Finley McIlwaine at 2023-05-17T12:20:23-06:00 Merge branch 'ghc-head' of gitlab.haskell.org:ghc/haddock into ghc-head - - - - - 41bbf0df by Bartłomiej Cieślar at 2023-05-24T08:57:58+02:00 changes to the WarningTxt cases Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - c686ba9b by Hécate Moonlight at 2023-06-01T14:03:02-06:00 Port the remains of Hi-Haddock - - - - - 9d8a85fd by Hécate Moonlight at 2023-06-01T14:03:06-06:00 Stdout for tests - - - - - 36331d07 by Finley McIlwaine at 2023-06-01T14:06:02-06:00 Formatting, organize imports - - - - - a06059b1 by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix empty context confusion in Convert module - - - - - 379346ae by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix associated type families in Hoogle output - - - - - fc6ea7ed by Finley McIlwaine at 2023-06-01T14:06:04-06:00 Fix test refs Accept several changes in Hoogle tests: Pretty printing logic no longer prints the `(Proxy (Proxy (...))` chain in Bug806 with parentheses. Since this test was only meant to verify that line breaks do not occur, accept the change. `tyThingToLHsDecl` is called for class and data declarations, which ends up "synifying" the type variables and giving unlifted types kind signatures. As a result, type variables of kind `Type -> Type` are now printed with kind signatures in Hoogle output. This could be changed by manually drop kind signatures from class variables in the Hoogle backend if the behavior is deemed unacceptable. Sometimes subordinate declarations are exported separate from their parent declarations (e.g. record selectors). In this case, a type signature is cobbled together for the export item in `extractDecl`. Since this type signature is very manually constructed, it may lack kind signatures of decls constructed from `tyThingToLHsDecl`. An example of this is the `type-sigs` Hoogle test. Change `*` to `Type` in Hoogle test refs. I don't think this will break Hoogle behavior, since it appears to not consider type signatures in search. I have not fully verified this. - - - - - e14b7e58 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix LaTeX backend test refs Changes to GHC pretty printing code have resulted in some differences to Haddock's LaTeX output. - Type variables are printed explicitly quantified in the LinearTypes test - Wildcard types in type family equations are now printed numbered, e.g. _1 _2, in the TypeFamilies3 test - Combined signatures in DefaultSignatures test are now documented as separate signatures - - - - - 41b5b296 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and test source updates - Stop using kind `*` in html test sources - Add TypeOperators where necessary to avoid warnings and future errors - Rename some test modules to match their module names - - - - - c640e2a2 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Fix missing deprecation warnings on record fields `lookupOccEnv` was used to resolve `OccNames` with warnings attached, but it doesn't look in the record field namespace. Thus, if a record field had a warning attached, it would not resolve and the warning map would not include it. This commit fixes by using `lookupOccEnv_WithFields` instead. - - - - - fad0c462 by Finley McIlwaine at 2023-06-01T14:06:05-06:00 Formatting and some comments - - - - - 751fd023 by Finley McIlwaine at 2023-06-01T14:11:41-06:00 Accept HTML test diffs All diffs now boil down to the expected differences resulting from declarations being reified from TyThings in hi-haddock. Surface syntax now has much less control over the syntax used in the documentation. - - - - - d835c845 by Finley McIlwaine at 2023-06-01T14:11:45-06:00 Adapt to new load' type - - - - - dcf776c4 by Finley McIlwaine at 2023-06-01T14:13:13-06:00 Update mkWarningMap and moduleWarning - - - - - 8e8432fd by Finley McIlwaine at 2023-06-01T14:28:54-06:00 Revert load' changes - - - - - aeb2982c by Finley McIlwaine at 2023-06-01T14:40:24-06:00 Accept change to Instances test in html-test Link to Data.Tuple instead of GHC.Tuple.Prim - - - - - 8adfdbac by Finley McIlwaine at 2023-06-01T15:53:17-06:00 Reset ghc dep to ^>= 9.6 - - - - - 2b1ce93d by Finley McIlwaine at 2023-06-06T07:50:04-06:00 Update CHANGES.md, user guide, recomp avoidance * Add --trace-args flag for tracing arguments received to standard output * Avoid recompiling due to changes in optimization flags * Update users guide and changes.md - - - - - f3da6676 by Finley McIlwaine at 2023-06-06T14:12:56-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - bf36c467 by Matthew Pickering at 2023-06-07T10:16:09+01:00 Revert back to e16e20d592a6f5d9ed1af17b77fafd6495242345 Neither of these MRs are ready to land yet which causes issues with other MRs which are ready to land and need haddock changes. - - - - - 421510a9 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 atSign has no unicode variant Prior to this change, atSign was defined as follows: atSign unicode = text (if unicode then "@" else "@") Yes, this is the same symbol '\64' and not your font playing tricks on you. Now we define: atSign = char '@' Both the LaTeX and the Xhtml backend are updated accordingly. - - - - - 3785c276 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 LaTeX: fix printing of type variable bindings Consider this type signature: kindOf :: forall {k} (a :: k). Proxy a -> Proxy k Prior to this fix, the LaTeX backend rendered it like this: kindOf :: forall k a. Proxy a -> Proxy k Now we preserve explicit specificity and kind annotations. - - - - - 0febf3a8 by Vladislav Zavialov at 2023-06-07T09:36:30+00:00 Add support for invisible binders in type declarations - - - - - 13e33bb3 by Finley McIlwaine at 2023-06-08T07:51:59-06:00 Add "Avoiding Recompilation" section to docs This section is a bit of a WIP due to the unstable nature of hi-haddock and the lack of tooling supporting it, but its a good start. - - - - - 3e5340ce by Finley McIlwaine at 2023-06-08T07:54:27-06:00 Add note about stubdir to recompilation docs - - - - - db7e84dc by Finley at 2023-06-08T08:11:03-06:00 Merge pull request haskell/haddock#1597 from haskell/finley/hi-haddock-9.6 hi-haddock for ghc 9.6 - - - - - 4e085d17 by Finley McIlwaine at 2023-06-14T13:41:06-06:00 Replace SYB traversals - - - - - 7b39aec5 by Finley McIlwaine at 2023-06-14T14:20:17-06:00 Test ref accepts, remove unused HaddockClsInst - - - - - df9c2090 by Finley McIlwaine at 2023-06-15T08:02:51-06:00 Use batchMsg for progress reporting during load With hi-haddock as is, there is an awkward silence during the load operation. This commit makes haddock use the default `batchMsg` Messager for progress reporting, and makes the default GHC verbosity level 1, so the user can see what GHC is doing. - - - - - f23679a8 by Hécate Moonlight at 2023-06-15T20:31:53+02:00 Merge pull request haskell/haddock#1600 from haskell/finley/hi-haddock-optim - - - - - a7982192 by Finley McIlwaine at 2023-06-15T15:02:16-06:00 hi-haddock squashed - - - - - c34f0c8d by Finley McIlwaine at 2023-06-15T16:22:03-06:00 Merge remote-tracking branch 'origin/ghc-9.6' into finley/hi-haddock-squashed - - - - - 40452797 by Bartłomiej Cieślar at 2023-06-16T12:26:04+02:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - e58673bf by Ben Gamari at 2023-06-16T09:33:35-04:00 Bump GHC version to 9.8 - - - - - 74bdf972 by Ben Gamari at 2023-06-16T09:36:18-04:00 Merge commit 'fcaaad06770a26d35d4aafd65772dedadf17669c' into ghc-head - - - - - 418ee3dc by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Remove NFData SourceText, IfaceWarnings updates The NFData SourceText instance is now available in GHC Handle mod_iface mi_warns now being IfaceWarnings - - - - - 62f31380 by Finley McIlwaine at 2023-06-20T15:39:05-04:00 Accept Instances.hs test output Due to ghc!10469. - - - - - a8f2fc0e by Ben Gamari at 2023-06-20T15:48:08-04:00 Test fixes for "Fix associated data family doc structure items" Associated data families were being given their own export DocStructureItems, which resulted in them being documented separately from their classes in haddocks. This commit fixes it. - - - - - cb1ac33e by Bartłomiej Cieślar at 2023-06-21T12:56:02-04:00 Changes related to MR !10283 MR !10283 changes the alternatives for WarningTxt pass. This MR reflects those changes in the haddock codebase. Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com> - - - - - 9933e10b by Ben Gamari at 2023-06-21T12:56:02-04:00 Bump GHC version to 9.8 - - - - - fe8c18b6 by Ben Gamari at 2023-06-21T15:36:29-04:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - c61a0d5b by Ben Gamari at 2023-06-21T16:10:51-04:00 Bump GHC version to 9.9 - - - - - 0c2a756e by sheaf at 2023-07-07T13:45:12+02:00 Avoid incomplete record update in Haddock Hoogle This commit avoids running into an incomplete record update warning in the Hoogle backend of Haddock. This was only noticed now, because incomplete record updates were broken in GHC 9.6. Now that they are fixed, we have to avoid running into them! - - - - - f9b952a7 by Ben Gamari at 2023-07-21T11:58:05-04:00 Bump base bound to <4.20 For GHC 9.8. - - - - - 1b27e151 by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Check for puns (see ghc#23368) - - - - - 457341fd by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Remove fake exports for (~), List, and Tuple<n> The old reasoning no longer applies, nowadays those names can be mentioned in export lists. - - - - - bf3dcddf by Vladislav Zavialov at 2023-08-02T10:42:11+00:00 Fix pretty-printing of Solo and MkSolo - - - - - 495b2241 by Matthew Pickering at 2023-09-01T13:02:07+02:00 Fix issue with duplicate reexported definitions (T23616) When a class method was reexported, it's default methods were also showing up in the generated html page. The simplest and most non-invasive fix is to not look for the default method if we are just exporting the class method.. because the backends are just showing default methods when the whole class is exported. In general it would be worthwhile to rewrite this bit of code I think as the logic and what gets included is split over `lookupDocs` and `availExportDecl` it would be clearer to combine the two. The result of lookupDocs is always just passed to availExportDecl so it seems simpler and more obvious to just write the function directly. - - - - - 6551824d by Finley McIlwaine at 2023-09-05T13:06:57-07:00 Remove fake export of `FUN` from Prelude This prevents `data FUN` from being shown at the top of the Prelude docs. Fixes \#23920 on GHC. - - - - - 9ab5a448 by Alan Zimmerman at 2023-09-08T18:26:53+01:00 Match changes in wip/az/T23885-unicode-funtycon - - - - - 4d08364e by Alan Zimmerman at 2023-10-31T19:46:45+00:00 EPA: match changes in GHC - EPA: Comments in AnchorOperation - EPA: Remove EpaEofComment - - - - - e7da0d25 by Alan Zimmerman at 2023-11-05T11:20:31+00:00 EPA: match changes in GHC, l2l cleanup - - - - - 4ceac14d by Alan Zimmerman at 2023-11-11T15:16:41+00:00 EPA: Replace Anchor with EpaLocation Match GHC - - - - - 94fb8d47 by Alan Zimmerman at 2023-11-29T18:10:26+00:00 Match GHC, No comments in EpaDelta for comments - - - - - 32d208e1 by Vladislav Zavialov at 2023-12-12T20:41:36+03:00 EPA: Match changes to LHsToken removal - - - - - eebdd316 by Apoorv Ingle at 2024-01-23T13:49:12+00:00 Changes for haskell/haddock#18324 - - - - - ae856a82 by Matthew Pickering at 2024-02-05T12:22:39+00:00 ghc-internals fallout - - - - - f8429266 by Jade at 2024-02-08T14:56:50+01:00 Adjust test for ghc MR !10993 - - - - - 6d1e2386 by Alan Zimmerman at 2024-02-13T22:00:28+03:00 EPA: Match changes to HsParTy and HsFunTy - - - - - 9c588f19 by Fendor at 2024-02-14T11:05:36+01:00 Adapt to GHC giving better Name's for linking - - - - - 778e1db3 by Andrei Borzenkov at 2024-02-16T16:12:07+03:00 Namespace specifiers for fixity signatures - - - - - 826c5b47 by Torsten Schmits at 2024-02-21T13:17:05+01:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 2cff14d5 by Ben Gamari at 2024-02-22T09:35:56-05:00 Bump bounds - - - - - f49376b3 by Ben Gamari at 2024-02-22T09:35:56-05:00 Allow `@since` annotations in export lists Here we extend Haddock to admit `@since` annotations in export lists. These can be attached to most export list items (although not subordinate lists). These annotations supercede the declaration's `@since` annotation in produced Haddocks. - - - - - b5aa93df by Ben Gamari at 2024-02-22T12:09:06-05:00 Allow package-qualified @since declarations - - - - - 8f5957f2 by Ben Gamari at 2024-02-22T13:55:19-05:00 Documentation changes from ghc-internal restructuring Previously many declarations (e.g. `Int`) were declared to have a "home" in `Prelude`. However, now Haddock instead chooses to put these in more specific homes (e.g. `Data.Int`). Given that the "home" decision is driven by heuristics and in general these changes seem quite reasonable I am accepting them: * `Int` moved from `Prelude` to `Data.Int` * `(~)` moved from `Prelude` to `Data.Type.Equality` * `Type` moved from `GHC.Types` to `Data.Kind` * `Maybe` moved from `Prelude` to `Data.Maybe` * `Bool` moved from `Prelude` to `Data.Bool` * `Ordering` moved from `Prelude` to `Data.Ord` As well, more identifiers are now hyperlinked; it's not immediately clear *why*, but it is an improvement nevertheless. - - - - - ec33fec3 by Ben Gamari at 2024-02-22T20:36:24-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 30cfd251 by Torsten Schmits at 2024-02-24T13:00:42-05:00 rename GHC.Tuple.Prim to GHC.Tuple - - - - - 732db81d by Ben Gamari at 2024-02-24T19:12:18-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 86bf7010 by Ben Gamari at 2024-02-27T19:28:10-05:00 Merge remote-tracking branch 'origin/ghc-head' into HEAD - - - - - 4b6e76b5 by Patrick at 2024-03-07T22:09:30+08:00 fix haskell/haddock#24493, with module name introduced in hieAst The accompanies haddoc PR with GHC PR https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12153 Two things have been done: 1. Link is introduced to every `X` in `module X where`, since we introduce the module name to HieAst, 2. `{-# LINE 4 "hypsrc-test/src/PositionPragmas.hs" #-}` is added before the `module PositionPragmas where` in ` hypsrc-test/ref/src/PositionPragmas.html `.It ensures only a single hieAst for file `hypsrc-test/src/PositionPragmas.hs` is generated. - - - - - 635abccc by Ben Gamari at 2024-03-08T17:09:06-05:00 Bump ghc version to 9.10 - - - - - 5b934048 by Ben Gamari at 2024-03-08T18:50:12-05:00 Bump base upper bound - - - - - b30d134e by Ben Gamari at 2024-03-08T18:50:44-05:00 Testsuite output update - - - - - 9bdf3586 by Ben Gamari at 2024-03-09T21:37:44-05:00 Merge branch 'ghc-9.10' into ghc-head - - - - - cec76981 by Ben Gamari at 2024-03-09T21:54:00-05:00 Bump GHC version to 9.11 - - - - - 4c59feb7 by Ben Gamari at 2024-03-09T22:15:01-05:00 Merge remote-tracking branch 'origin/ghc-head' into ghc-head - - - - - dc207d06 by Ben Gamari at 2024-03-10T08:56:08-04:00 configure: Bump GHC version to 9.11 Bumps haddock submodule. - - - - - 8b2513e8 by Ben Gamari at 2024-03-11T01:20:03-04:00 rts/linker: Don't unload code when profiling is enabled The heap census may contain references (e.g. `Counter.identity`) to static data which must be available when the census is reported at the end of execution. Fixes #24512. - - - - - 7810b4c3 by Ben Gamari at 2024-03-11T01:20:03-04:00 rts/linker: Don't unload native objects when dlinfo isn't available To do so is unsafe as we have no way of identifying references to symbols provided by the object. Fixes #24513. Fixes #23993. - - - - - 0590764c by Ben Gamari at 2024-03-11T01:20:39-04:00 rel_eng/upload: Purge both $rel_name/ and $ver/ This is necessary for prereleases, where GHCup accesses the release via `$ver/` - - - - - b85a4631 by Brandon Chinn at 2024-03-12T19:25:56-04:00 Remove duplicate code normalising slashes - - - - - c91946f9 by Brandon Chinn at 2024-03-12T19:25:56-04:00 Simplify regexes with raw strings - - - - - 1a5f53c6 by Brandon Chinn at 2024-03-12T19:25:57-04:00 Don't normalize backslashes in characters - - - - - 7ea971d3 by Andrei Borzenkov at 2024-03-12T19:26:32-04:00 Fix compiler crash caused by implicit RHS quantification in type synonyms (#24470) - - - - - 39f3ac3e by Cheng Shao at 2024-03-12T19:27:11-04:00 Revert "compiler: make genSym use C-based atomic increment on non-JS 32-bit platforms" This reverts commit 615eb855416ce536e02ed935ecc5a6f25519ae16. It was originally intended to fix #24449, but it was merely sweeping the bug under the rug. 3836a110577b5c9343915fd96c1b2c64217e0082 has properly fixed the fragile test, and we no longer need the C version of genSym. Furthermore, the C implementation causes trouble when compiling with clang that targets i386 due to alignment warning and libatomic linking issue, so it makes sense to revert it. - - - - - e6bfb85c by Cheng Shao at 2024-03-12T19:27:11-04:00 compiler: fix out-of-bound memory access of genSym on 32-bit This commit fixes an unnoticed out-of-bound memory access of genSym on 32-bit. ghc_unique_inc is 32-bit sized/aligned on 32-bit platforms, but we mistakenly treat it as a Word64 pointer in genSym, and therefore will accidentally load 2 garbage higher bytes, or with a small but non-zero chance, overwrite something else in the data section depends on how the linker places the data segments. This regression was introduced in !11802 and fixed here. - - - - - 77171cd1 by Ben Orchard at 2024-03-14T09:00:40-04:00 Note mutability of array and address access primops Without an understanding of immutable vs. mutable memory, the index primop family have a potentially non-intuitive type signature: indexOffAddr :: Addr# -> Int# -> a readOffAddr :: Addr# -> Int# -> State# d -> (# State# d, a #) indexOffAddr# might seem like a free generality improvement, which it certainly is not! This change adds a brief note on mutability expectations for most index/read/write access primops. - - - - - 7da7f8f6 by Alan Zimmerman at 2024-03-14T09:01:15-04:00 EPA: Fix regression discarding comments in contexts Closes #24533 - - - - - 73be65ab by Fendor at 2024-03-19T01:42:53-04:00 Fix sharing of 'IfaceTyConInfo' during core to iface type translation During heap analysis, we noticed that during generation of 'mi_extra_decls' we have lots of duplicates for the instances: * `IfaceTyConInfo NotPromoted IfaceNormalTyCon` * `IfaceTyConInfo IsPromoted IfaceNormalTyCon` which should be shared instead of duplicated. This duplication increased the number of live bytes by around 200MB while loading the agda codebase into GHCi. These instances are created during `CoreToIface` translation, in particular `toIfaceTyCon`. The generated core looks like: toIfaceTyCon = \ tc_sjJw -> case $wtoIfaceTyCon tc_sjJw of { (# ww_sjJz, ww1_sjNL, ww2_sjNM #) -> IfaceTyCon ww_sjJz (IfaceTyConInfo ww1_sjNL ww2_sjNM) } whichs removes causes the sharing to work propery. Adding explicit sharing, with NOINLINE annotations, changes the core to: toIfaceTyCon = \ tc_sjJq -> case $wtoIfaceTyCon tc_sjJq of { (# ww_sjNB, ww1_sjNC #) -> IfaceTyCon ww_sjNB ww1_sjNC } which looks much more like sharing is happening. We confirmed via ghc-debug that all duplications were eliminated and the number of live bytes are noticeably reduced. - - - - - bd8209eb by Alan Zimmerman at 2024-03-19T01:43:28-04:00 EPA: Address more 9.10.1-alpha1 regressions from recent changes Closes #24533 Hopefully for good this time - - - - - 31bf85ee by Fendor at 2024-03-19T14:48:08-04:00 Escape multiple arguments in the settings file Uses responseFile syntax. The issue arises when GHC is installed on windows into a location that has a space, for example the user name is 'Fake User'. The $topdir will also contain a space, consequentially. When we resolve the top dir in the string `-I$topdir/mingw/include`, then `words` will turn this single argument into `-I/C/Users/Fake` and `User/.../mingw/include` which trips up the flag argument parser of various tools such as gcc or clang. We avoid this by escaping the $topdir before replacing it in `initSettngs`. Additionally, we allow to escape spaces and quotation marks for arguments in `settings` file. Add regression test case to count the number of options after variable expansion and argument escaping took place. Additionally, we check that escaped spaces and double quotation marks are correctly parsed. - - - - - f45f700e by Matthew Pickering at 2024-03-19T14:48:44-04:00 Read global package database from settings file Before this patch, the global package database was always assumed to be in libdir </> package.conf.d. This causes issues in GHC's build system because there are sometimes situations where the package database you need to use is not located in the same place as the settings file. * The stage1 compiler needs to use stage1 libraries, so we should set "Global Package DB" for the stage1 compiler to the stage1 package database. * Stage 2 cross compilers need to use stage2 libraries, so likewise, we should set the package database path to `_build/stage2/lib/` * The normal situation is where the stage2 compiler uses stage1 libraries. Then everything lines up. * When installing we have rearranged everything so that the settings file and package database line up properly, so then everything should continue to work as before. In this case we set the relative package db path to `package.conf.d`, so it resolves the same as before. * ghc-pkg needs to be modified as well to look in the settings file fo the package database rather than assuming the global package database location relative to the lib folder. * Cabal/cabal-install will work correctly because they query the global package database using `--print-global-package-db`. A reasonable question is why not generate the "right" settings files in the right places in GHC's build system. In order to do this you would need to engineer wrappers for all executables to point to a specific libdir. There are also situations where the same package db is used by two different compilers with two different settings files (think stage2 cross compiler and stage3 compiler). In short, this 10 line patch allows for some reasonable simplifications in Hadrian at very little cost to anything else. Fixes #24502 - - - - - 4c8f1794 by Matthew Pickering at 2024-03-19T14:48:44-04:00 hadrian: Remove stage1 testsuite wrappers logic Now instead of producing wrappers which pass the global package database argument to ghc and ghc-pkg, we write the location of the correct package database into the settings file so you can just use the intree compiler directly. - - - - - da0d8ba5 by Matthew Craven at 2024-03-19T14:49:20-04:00 Remove unused ghc-internal module "GHC.Internal.Constants" - - - - - b56d2761 by Matthew Craven at 2024-03-19T14:49:20-04:00 CorePrep: Rework lowering of BigNat# literals Don't use bigNatFromWord#, because that's terrible: * We shouldn't have to traverse a linked list at run-time to build a BigNat# literal. That's just silly! * The static List object we have to create is much larger than the actual BigNat#'s contents, bloating code size. * We have to read the corresponding interface file, which causes un-tracked implicit dependencies. (#23942) Instead, encode them into the appropriate platform-dependent sequence of bytes, and generate code that copies these bytes at run-time from an Addr# literal into a new ByteArray#. A ByteArray# literal would be the correct thing to generate, but these are not yet supported; see also #17747. Somewhat surprisingly, this change results in a slight reduction in compiler allocations, averaging around 0.5% on ghc's compiler performance tests, including when compiling programs that contain no bignum literals to begin with. The specific cause of this has not been investigated. Since this lowering no longer reads the interface file for GHC.Num.BigNat, the reasoning in Note [Depend on GHC.Num.Integer] is obsoleted. But the story of un-tracked built-in dependencies remains complex, and Note [Tracking dependencies on primitives] now exists to explain this complexity. Additionally, many empty imports have been modified to refer to this new note and comply with its guidance. Several empty imports necessary for other reasons have also been given brief explanations. Metric Decrease: MultiLayerModulesTH_OneShot - - - - - 349ea330 by Fendor at 2024-03-19T14:50:00-04:00 Eliminate thunk in 'IfaceTyCon' Heap analysis showed that `IfaceTyCon` retains a thunk to `IfaceTyConInfo`, defeating the sharing of the most common instances of `IfaceTyConInfo`. We make sure the indirection is removed by adding bang patterns to `IfaceTyCon`. Experimental results on the agda code base, where the `mi_extra_decls` were read from disk: Before this change, we observe around 8654045 instances of: `IfaceTyCon[Name,THUNK_1_0]` But these thunks almost exclusively point to a shared value! Forcing the thunk a little bit more, leads to `ghc-debug` reporting: `IfaceTyCon[Name:Name,IfaceTyConInfo]` and a noticeable reduction of live bytes (on agda ~10%). - - - - - 594bee0b by Krzysztof Gogolewski at 2024-03-19T14:50:36-04:00 Minor misc cleanups - GHC.HsToCore.Foreign.JavaScript: remove dropRuntimeRepArgs; boxed tuples don't take RuntimeRep args - GHC.HsToCore.Foreign.Call: avoid partial pattern matching - GHC.Stg.Unarise: strengthen the assertion; we can assert that non-rubbish literals are unary rather than just non-void - GHC.Tc.Gen.HsType: make sure the fsLit "literal" rule fires - users_guide/using-warnings.rst: remove -Wforall-identifier, now deprecated and does nothing - users_guide/using.rst: fix formatting - andy_cherry/test.T: remove expect_broken_for(23272...), 23272 is fixed The rest are simple cleanups. - - - - - cf55a54b by Ben Gamari at 2024-03-19T14:51:12-04:00 mk/relpath: Fix quoting Previously there were two instances in this script which lacked proper quoting. This resulted in `relpath` invocations in the binary distribution Makefile producing incorrect results on Windows, leading to confusing failures from `sed` and the production of empty package registrations. Fixes #24538. - - - - - 5ff88389 by Bryan Richter at 2024-03-19T14:51:48-04:00 testsuite: Disable T21336a on wasm - - - - - 60023351 by Ben Gamari at 2024-03-19T22:33:10-04:00 hadrian/bindist: Eliminate extraneous `dirname` invocation Previously we would call `dirname` twice per installed library file. We now instead reuse this result. This helps appreciably on Windows, where processes are quite expensive. - - - - - 616ac300 by Ben Gamari at 2024-03-19T22:33:10-04:00 hadrian: Package mingw toolchain in expected location This fixes #24525, a regression due to 41cbaf44a6ab5eb9fa676d65d32df8377898dc89. Specifically, GHC expects to find the mingw32 toolchain in the binary distribution root. However, after this patch it was packaged in the `lib/` directory. - - - - - de9daade by Ben Gamari at 2024-03-19T22:33:11-04:00 gitlab/rel_eng: More upload.sh tweaks - - - - - 1dfe12db by Ben Gamari at 2024-03-19T22:33:11-04:00 rel_eng: Drop dead prepare_docs codepath - - - - - dd2d748b by Ben Gamari at 2024-03-19T22:33:11-04:00 rel_env/recompress_all: unxz before recompressing Previously we would rather compress the xz *again*, before in addition compressing it with the desired scheme. Fixes #24545. - - - - - 9d936c57 by Ben Gamari at 2024-03-19T22:33:11-04:00 mk-ghcup-metadata: Fix directory of testsuite tarball As reported in #24546, the `dlTest` artifact should be extracted into the `testsuite` directory. - - - - - 6d398066 by Ben Gamari at 2024-03-19T22:33:11-04:00 ghcup-metadata: Don't populate dlOutput unless necessary ghcup can apparently infer the output name of an artifact from its URL. Consequently, we should only include the `dlOutput` field when it would differ from the filename of `dlUri`. Fixes #24547. - - - - - 576f8b7e by Zubin Duggal at 2024-03-19T22:33:46-04:00 Revert "Apply shellcheck suggestion to SUBST_TOOLDIR" This reverts commit c82770f57977a2b5add6e1378f234f8dd6153392. The shellcheck suggestion is spurious and results in SUBST_TOOLDIR being a no-op. `set` sets positional arguments for bash, but we want to set the variable given as the first autoconf argument. Fixes #24542 Metric decreases because the paths in the settings file are now shorter, so we allocate less when we read the settings file. ------------------------- Metric Decrease: T12425 T13035 T9198 ------------------------- - - - - - cdfe6e01 by Fendor at 2024-03-19T22:34:22-04:00 Compact serialisation of IfaceAppArgs In #24563, we identified that IfaceAppArgs serialisation tags each cons cell element with a discriminator byte. These bytes add up quickly, blowing up interface files considerably when '-fwrite-if-simplified-core' is enabled. We compact the serialisation by writing out the length of 'IfaceAppArgs', followed by serialising the elements directly without any discriminator byte. This improvement can decrease the size of some interface files by up to 35%. - - - - - 97a2bb1c by Simon Peyton Jones at 2024-03-20T17:11:29+00:00 Expand untyped splices in tcPolyExprCheck Fixes #24559 - - - - - 5f275176 by Alan Zimmerman at 2024-03-20T22:44:12-04:00 EPA: Clean up Exactprint helper functions a bit - Introduce a helper lens to compose on `EpAnn a` vs `a` versions - Rename some prime versions of functions back to non-prime They were renamed during the rework - - - - - da2a10ce by Vladislav Zavialov at 2024-03-20T22:44:48-04:00 Type operators in promoteOccName (#24570) Type operators differ from term operators in that they are lexically classified as (type) constructors, not as (type) variables. Prior to this change, promoteOccName did not account for this difference, causing a scoping issue that affected RequiredTypeArguments. type (!@#) = Bool f = idee (!@#) -- Not in scope: ‘!@#’ (BUG) Now we have a special case in promoteOccName to account for this. - - - - - 247fc0fa by Preetham Gujjula at 2024-03-21T10:19:18-04:00 docs: Remove mention of non-existent Ord instance for Complex The documentation for Data.Complex says that the Ord instance for Complex Float is deficient, but there is no Ord instance for Complex a. The Eq instance for Complex Float is similarly deficient, so we use that as an example instead. - - - - - 6fafc51e by Andrei Borzenkov at 2024-03-21T10:19:54-04:00 Fix TH handling in `pat_to_type_pat` function (#24571) There was missing case for `SplicePat` in `pat_to_type_at` function, hence patterns with splicing that checked against `forall->` doesn't work properly because they fall into the "illegal pattern" case. Code example that is now accepted: g :: forall a -> () g $([p| a |]) = () - - - - - 52072f8e by Sylvain Henry at 2024-03-21T21:01:59-04:00 Type-check default declarations before deriving clauses (#24566) See added Note and #24566. Default declarations must be type-checked before deriving clauses. - - - - - 7dfdf3d9 by Sylvain Henry at 2024-03-21T21:02:40-04:00 Lexer: small perf changes - Use unsafeChr because we know our values to be valid - Remove some unnecessary use of `ord` (return Word8 values directly) - - - - - 864922ef by Sylvain Henry at 2024-03-21T21:02:40-04:00 JS: fix some comments - - - - - 3e0b2b1f by Sebastian Graf at 2024-03-21T21:03:16-04:00 Simplifier: Re-do dependency analysis in abstractFloats (#24551) In #24551, we abstracted a string literal binding over a type variable, triggering a CoreLint error when that binding floated to top-level. The solution implemented in this patch fixes this by re-doing dependency analysis on a simplified recursive let binding that is about to be type abstracted, in order to find the minimal set of type variables to abstract over. See wrinkle (AB5) of Note [Floating and type abstraction] for more details. Fixes #24551 - - - - - 8a8ac65a by Matthew Craven at 2024-03-23T00:20:52-04:00 Improve toInteger @Word32 on 64-bit platforms On 64-bit platforms, every Word32 fits in an Int, so we can convert to Int# without having to perform the overflow check integerFromWord# uses internally. - - - - - 0c48f2b9 by Apoorv Ingle at 2024-03-23T00:21:28-04:00 Fix for #24552 (see testcase T24552) Fixes for a bug in desugaring pattern synonyms matches, introduced while working on on expanding `do`-blocks in #18324 The `matchWrapper` unecessarily (and incorrectly) filtered out the default wild patterns in a match. Now the wild pattern alternative is simply ignored by the pm check as its origin is `Generated`. The current code now matches the expected semantics according to the language spec. - - - - - b72705e9 by Simon Peyton Jones at 2024-03-23T00:22:04-04:00 Print more info about kinds in error messages This fixes #24553, where GHC unhelpfully said error: [GHC-83865] • Expected kind ‘* -> * -> *’, but ‘Foo’ has kind ‘* -> * -> *’ See Note [Showing invisible bits of types in error messages] - - - - - 8f7cfc7e by Tristan Cacqueray at 2024-03-23T00:22:44-04:00 docs: remove the don't use float hint This hint is outdated, ``Complex Float`` are now specialised, and the heap space suggestion needs more nuance so it should be explained in the unboxed/storable array documentation. - - - - - 5bd8ed53 by Andreas Klebinger at 2024-03-23T16:18:33-04:00 NCG: Fix a bug in jump shortcutting. When checking if a jump has more than one destination account for the possibility of some jumps not being representable by a BlockId. We do so by having isJumpishInstr return a `Maybe BlockId` where Nothing represents non-BlockId jump destinations. Fixes #24507 - - - - - 8d67f247 by Ben Gamari at 2024-03-23T16:19:09-04:00 docs: Drop old release notes, add for 9.12.1 - - - - - 7db8c992 by Cheng Shao at 2024-03-25T13:45:46-04:00 rts: fix clang compilation on aarch64 This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h which causes "error: address argument to atomic operation must be a pointer to _Atomic type" when compiling with clang on aarch64. - - - - - 237194ce by Sylvain Henry at 2024-03-25T13:46:27-04:00 Lexer: fix imports for Alex 3.5.1 (#24583) - - - - - 810660b7 by Cheng Shao at 2024-03-25T22:19:16-04:00 libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6 This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which includes numerous upstream libffi fixes, especially https://github.com/libffi/libffi/issues/760. - - - - - d2ba41e8 by Alan Zimmerman at 2024-03-25T22:19:51-04:00 EPA: do not duplicate comments in signature RHS - - - - - 32a8103f by Rodrigo Mesquita at 2024-03-26T21:16:12-04:00 configure: Use LDFLAGS when trying linkers A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to check for a working linker. If either of these fail, we try the next in line. However, we were not considering the `$LDFLAGS` when checking if these linkers worked. So we would pick a linker that does not support the current $LDFLAGS and fail further down the line when we used that linker with those flags. Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not supported by `ld.gold` but that was being picked still. - - - - - bf65a7c3 by Rodrigo Mesquita at 2024-03-26T21:16:48-04:00 bindist: Clean xattrs of bin and lib at configure time For issue #21506, we started cleaning the extended attributes of binaries and libraries from the bindist *after* they were installed to workaround notarisation (#17418), as part of `make install`. However, the `ghc-toolchain` binary that is now shipped with the bindist must be run at `./configure` time. Since we only cleaned the xattributes of the binaries and libs after they were installed, in some situations users would be unable to run `ghc-toolchain` from the bindist, failing at configure time (#24554). In this commit we move the xattr cleaning logic to the configure script. Fixes #24554 - - - - - cfeb70d3 by Rodrigo Mesquita at 2024-03-26T21:17:24-04:00 Revert "NCG: Fix a bug in jump shortcutting." This reverts commit 5bd8ed53dcefe10b72acb5729789e19ceb22df66. Fixes #24586 - - - - - 13223f6d by Serge S. Gulin at 2024-03-27T07:28:51-04:00 JS: `h$rts_isProfiled` is removed from `profiling` and left its version at `rts/js/config.js` - - - - - 0acfe391 by Alan Zimmerman at 2024-03-27T07:29:27-04:00 EPA: Do not extend declaration range for trailine zero len semi The lexer inserts virtual semicolons having zero width. Do not use them to extend the list span of items in a list. - - - - - cd0fb82f by Alan Zimmerman at 2024-03-27T19:33:08+00:00 EPA: Fix FamDecl range The span was incorrect if opt_datafam_kind_sig was empty - - - - - f8f384a8 by Ben Gamari at 2024-03-29T01:23:03-04:00 Fix type of _get_osfhandle foreign import Fixes #24601. - - - - - 00d3ecf0 by Alan Zimmerman at 2024-03-29T12:19:10+00:00 EPA: Extend StringLiteral range to include trailing commas This goes slightly against the exact printing philosophy where trailing decorations should be in an annotation, but the practicalities of adding it to the WarningTxt environment, and the problems caused by deviating do not make a more principles approach worthwhile. - - - - - efab3649 by brandon s allbery kf8nh at 2024-03-31T20:04:01-04:00 clarify Note [Preproccesing invocations] - - - - - c8a4c050 by Ben Gamari at 2024-04-02T12:50:35-04:00 rts: Fix TSAN_ENABLED CPP guard This should be `#if defined(TSAN_ENABLED)`, not `#if TSAN_ENABLED`, lest we suffer warnings. - - - - - e91dad93 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix errors when compiling with TSAN This commit fixes rts compilation errors when compiling with TSAN: - xxx_FENCE macros are redefined and trigger CPP warnings. - Use SIZEOF_W. WORD_SIZE_IN_BITS is provided by MachDeps.h which Cmm.h doesn't include by default. - - - - - a9ab9455 by Cheng Shao at 2024-04-02T12:50:35-04:00 rts: fix clang-specific errors when compiling with TSAN This commit fixes clang-specific rts compilation errors when compiling with TSAN: - clang doesn't have -Wtsan flag - Fix prototype of ghc_tsan_* helper functions - __tsan_atomic_* functions aren't clang built-ins and sanitizer/tsan_interface_atomic.h needs to be included - On macOS, TSAN runtime library is libclang_rt.tsan_osx_dynamic.dylib, not libtsan. -fsanitize-thread as a link-time flag will take care of linking the TSAN runtime library anyway so remove tsan as an rts extra library - - - - - 865bd717 by Cheng Shao at 2024-04-02T12:50:35-04:00 compiler: fix github link to __tsan_memory_order in a comment - - - - - 07cb627c by Cheng Shao at 2024-04-02T12:50:35-04:00 ci: improve TSAN CI jobs - Run TSAN jobs with +thread_sanitizer_cmm which enables Cmm instrumentation as well. - Run TSAN jobs in deb12 which ships gcc-12, a reasonably recent gcc that @bgamari confirms he's using in #GHC:matrix.org. Ideally we should be using latest clang release for latest improvements in sanitizers, though that's left as future work. - Mark TSAN jobs as manual+allow_failure in validate pipelines. The purpose is to demonstrate that we have indeed at least fixed building of TSAN mode in CI without blocking the patch to land, and once merged other people can begin playing with TSAN using their own dev setups and feature branches. - - - - - a1c18c7b by Andrei Borzenkov at 2024-04-02T12:51:11-04:00 Merge tc_infer_hs_type and tc_hs_type into one function using ExpType philosophy (#24299, #23639) This patch implements refactoring which is a prerequisite to updating kind checking of type patterns. This is a huge simplification of the main worker that checks kind of HsType. It also fixes the issues caused by previous code duplication, e.g. that we didn't add module finalizers from splices in inference mode. - - - - - 817e8936 by Rodrigo Mesquita at 2024-04-02T20:13:05-04:00 th: Hide the Language.Haskell.TH.Lib.Internal module from haddock Fixes #24562 - - - - - b36ee57b by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: reenable h$appendToHsString optimization (#24495) The optimization introducing h$appendToHsString wasn't kicking in anymore (while it did in 9.8.1) because of the changes introduced in #23270 (7e0c8b3bab30). This patch reenables the optimization by matching on case-expression, as done in Cmm for unpackCString# standard thunks. The test is also T24495 added in the next commits (two commits for ease of backporting to 9.8). - - - - - 527616e9 by Sylvain Henry at 2024-04-02T20:13:46-04:00 JS: fix h$appendToHsString implementation (#24495) h$appendToHsString needs to wrap its argument in an updatable thunk to behave like unpackAppendCString#. Otherwise if a SingleEntry thunk is passed, it is stored as-is in a CONS cell, making the resulting list impossible to deepseq (forcing the thunk doesn't update the contents of the CONS cell)! The added test checks that the optimization kicks in and that h$appendToHsString works as intended. Fix #24495 - - - - - faa30b41 by Simon Peyton Jones at 2024-04-02T20:14:22-04:00 Deal with duplicate tyvars in type declarations GHC was outright crashing before this fix: #24604 - - - - - e0b0c717 by Simon Peyton Jones at 2024-04-02T20:14:58-04:00 Try using MCoercion in exprIsConApp_maybe This is just a simple refactor that makes exprIsConApp_maybe a little bit more direct, simple, and efficient. Metrics: compile_time/bytes allocated geo. mean -0.1% minimum -2.0% maximum -0.0% Not a big gain, but worthwhile given that the code is, if anything, easier to grok. - - - - - 15f4d867 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Initial ./configure support for selecting I/O managers In this patch we just define new CPP vars, but don't yet use them or replace the existing approach. That will follow. The intention here is that every I/O manager can be enabled/disabled at GHC build time (subject to some constraints). More than one I/O manager can be enabled to be built. At least one I/O manager supporting the non-threaded RTS must be enabled as well as at least one supporting the non-threaded RTS. The I/O managers enabled here will become the choices available at runtime at RTS startup (in later patches). The choice can be made with RTS flags. There are separate sets of choices for the threaded and non-threaded RTS ways, because most I/O managers are specific to these ways. Furthermore we must establish a default I/O manager for the threaded and non-threaded RTS. Most I/O managers are platform-specific so there are checks to ensure each one can be enabled on the platform. Such checks are also where (in future) any system dependencies (e.g. libraries) can be checked. The output is a set of CPP flags (in the mk/config.h file), with one flag per named I/O manager: * IOMGR_BUILD_<name> : which ones should be built (some) * IOMGR_DEFAULT_NON_THREADED_<name> : which one is default (exactly one) * IOMGR_DEFAULT_THREADED_<name> : which one is default (exactly one) and a set of derived flags in IOManager.h * IOMGR_ENABLED_<name> : enabled for the current RTS way Note that IOMGR_BUILD_<name> just says that an I/O manager will be built for _some_ RTS way (i.e. threaded or non-threaded). The derived flags IOMGR_ENABLED_<name> in IOManager.h say if each I/O manager is enabled in the "current" RTS way. These are the ones that can be used for conditional compilation of the I/O manager code. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - 85b0f87a by Duncan Coutts at 2024-04-03T01:27:17-04:00 Change the handling of the RTS flag --io-manager= Now instead of it being just used on Windows to select between the WinIO vs the MIO or Win32-legacy I/O managers, it is now used on all platforms for selecting the I/O manager to use. Right now it remains the case that there is only an actual choice on Windows, but that will change later. Document the --io-manager flag in the user guide. This change is also reflected in the RTS flags types in the base library. Deprecate the export of IoSubSystem from GHC.RTS.Flags with a message to import it from GHC.IO.Subsystem. The way the 'IoSubSystem' is detected also changes. Instead of looking at the RTS flag, there is now a C bool global var in the RTS which gets set on startup when the I/O manager is selected. This bool var says whether the selected I/O manager classifies as "native" on Windows, which in practice means the WinIO I/O manager has been selected. Similarly, the is_io_mng_native_p RTS helper function is re-implemented in terms of the selected I/O manager, rather than based on the RTS flags. We do however remove the ./configure --native-io-manager flag because we're bringing the WinIO/MIO/Win32-legacy choice under the new general scheme for selecting I/O managers, and that new scheme involves no ./configure time user choices, just runtime RTS flag choices. - - - - - 1a8f020f by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert {init,stop,exit}IOManager to switch style Rather than ad-hoc cpp conitionals on THREADED_RTS and mingw32_HOST_OS, we use a style where we switch on the I/O manager impl, with cases for each I/O manager impl. - - - - - a5bad3d2 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Split up the CapIOManager content by I/O manager Using the new IOMGR_ENABLED_<name> CPP defines. - - - - - 1d36e609 by Duncan Coutts at 2024-04-03T01:27:17-04:00 Convert initIOManagerAfterFork and wakeupIOManager to switch style - - - - - c2f26f36 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of waitRead#/Write# from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. - - - - - 457705a8 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move most of the delay# impl from cmm to C Moves it into the IOManager.c where we can follow the new pattern of switching on the selected I/O manager. Uses a new IOManager API: syncDelay, following the naming convention of sync* for thread-synchronous I/O & timer/delay operations. As part of porting from cmm to C, we maintain the rule that the why_blocked gets accessed using load acquire and store release atomic memory operations. There was one exception to this rule: in the delay# primop cmm code on posix (not win32), the why_blocked was being updated using a store relaxed, not a store release. I've no idea why. In this convesion I'm playing it safe here and using store release consistently. - - - - - e93058e0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 insertIntoSleepingQueue is no longer public No longer defined in IOManager.h, just a private function in IOManager.c. Since it is no longer called from cmm code, just from syncDelay. It ought to get moved further into the select() I/O manager impl, rather than living in IOManager.c. On the other hand appendToIOBlockedQueue is still called from cmm code in the win32-legacy I/O manager primops async{Read,Write}#, and it is also used by the select() I/O manager. Update the CPP and comments to reflect this. - - - - - 60ce9910 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move anyPendingTimeoutsOrIO impl from .h to .c The implementation is eventually going to need to use more private things, which will drag in unwanted includes into IOManager.h, so it's better to move the impl out of the header file and into the .c file, at the slight cost of it no longer being inline. At the same time, change to the "switch (iomgr_type)" style. - - - - - f70b8108 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Take a simpler approach to gcc warnings in IOManager.c We have lots of functions with conditional implementations for different I/O managers. Some functions, for some I/O managers, naturally have implementations that do nothing or barf. When only one such I/O manager is enabled then the whole function implementation will have an implementation that does nothing or barfs. This then results in warnings from gcc that parameters are unused, or that the function should be marked with attribute noreturn (since barf does not return). The USED_IF_THREADS trick for fine-grained warning supression is fine for just two cases, but an equivalent here would need USED_IF_THE_ONLY_ENABLED_IOMGR_IS_X_OR_Y which would have combinitorial blowup. So we take a coarse grained approach and simply disable these two warnings for the whole file. So we use a GCC pragma, with its handy push/pop support: #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" #pragma GCC diagnostic ignored "-Wunused-parameter" ... #pragma GCC diagnostic pop - - - - - b48805b9 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add a new trace class for the iomanager It makes sense now for it to be separate from the scheduler class of tracers. Enabled with +RTS -Do. Document the -Do debug flag in the user guide. - - - - - f0c1f862 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Have the throwTo impl go via (new) IOManager APIs rather than directly operating on the IO manager's data structures. Specifically, when thowing an async exception to a thread that is blocked waiting for I/O or waiting for a timer, then we want to cancel that I/O waiting or cancel the timer. Currently this is done directly in removeFromQueues() in RaiseAsync.c. We want it to go via proper APIs both for modularity but also to let us support multiple I/O managers. So add sync{IO,Delay}Cancel, which is the cancellation for the corresponding sync{IO,Delay}. The implementations of these use the usual "switch (iomgr_type)" style. - - - - - 4f9e9c4e by Duncan Coutts at 2024-04-03T01:27:18-04:00 Move awaitEvent into a proper IOManager API and have the scheduler use it. Previously the scheduler calls awaitEvent directly, and awaitEvent is implemented directly in the RTS I/O managers (select, win32). This relies on the old scheme where there's a single active I/O manager for each platform and RTS way. We want to move that to go via an API in IOManager.{h,c} which can then call out to the active I/O manager. Also take the opportunity to split awaitEvent into two. The existing awaitEvent has a bool wait parameter, to say if the call should be blocking or non-blocking. We split this into two separate functions: pollCompletedTimeoutsOrIO and awaitCompletedTimeoutsOrIO. We split them for a few reasons: they have different post-conditions (specifically the await version is supposed to guarantee that there are threads runnable when it completes). Secondly, it is also anticipated that in future I/O managers the implementations of the two cases will be simpler if they are separated. - - - - - 5ad4b30f by Duncan Coutts at 2024-04-03T01:27:18-04:00 Rename awaitEvent in select and win32 I/O managers These are now just called from IOManager.c and are the per-I/O manager backend impls (whereas previously awaitEvent was the entry point). Follow the new naming convention in the IOManager.{h,c} of awaitCompletedTimeoutsOrIO, with the I/O manager's name as a suffix: so awaitCompletedTimeoutsOrIO{Select,Win32}. - - - - - d30c6bc6 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Tidy up a couple things in Select.{h,c} Use the standard #include {Begin,End}Private.h style rather than RTS_PRIVATE on individual decls. And conditionally build the code for the select I/O manager based on the new CPP IOMGR_ENABLED_SELECT rather than on THREADED_RTS. - - - - - 4161f516 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add an IOManager API for scavenging TSO blocked_info When the GC scavenges a TSO it needs to scavenge the tso->blocked_info but the blocked_info is a big union and what lives there depends on the two->why_blocked, which for I/O-related reasons is something that in principle is the responsibility of the I/O manager and not the GC. So the right thing to do is for the GC to ask the I/O manager to sscavenge the blocked_info if it encounters any I/O-related why_blocked reasons. So we add scavengeTSOIOManager in IOManager.{h,c} with the usual style. Now as it happens, right now, there is no special scavenging to do, so the implementation of scavengeTSOIOManager is a fancy no-op. That's because the select I/O manager uses only the fd and target members, which are not GC pointers, and the win32-legacy I/O manager _ought_ to be using GC-managed heap objects for the StgAsyncIOResult but it is actually usingthe C heap, so again no GC pointers. If the win32-legacy were doing this more sensibly, then scavengeTSOIOManager would be the right place to do the GC magic. Future I/O managers will need GC heap objects in the tso->blocked_info and will make use of this functionality. - - - - - 94a87d21 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add I/O manager API notifyIOManagerCapabilitiesChanged Used in setNumCapabilities. It only does anything for MIO on Posix. Previously it always invoked Haskell code, but that code only did anything on non-Windows (and non-JS), and only threaded. That currently effectively means the MIO I/O manager on Posix. So now it only invokes it for the MIO Posix case. - - - - - 3be6d591 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Select an I/O manager early in RTS startup We need to select the I/O manager to use during startup before the per-cap I/O manager initialisation. - - - - - aaa294d0 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Make struct CapIOManager be fully opaque Provide an opaque (forward) definition in Capability.h (since the cap contains a *CapIOManager) and then only provide a full definition in a new file IOManagerInternals.h. This new file is only supposed to be included by the IOManager implementation, not by its users. So that means IOManager.c and individual I/O manager implementations. The posix/Signals.c still needs direct access, but that should be eliminated. Anything that needs direct access either needs to be clearly part of an I/O manager (e.g. the sleect() one) or go via a proper API. - - - - - 877a2a80 by Duncan Coutts at 2024-04-03T01:27:18-04:00 The select() I/O manager does have some global initialisation It's just to make sure an exception CAF is a GC root. - - - - - 9c51473b by Duncan Coutts at 2024-04-03T01:27:18-04:00 Add tracing for the main I/O manager actions Using the new tracer class. Note: The unconditional definition of showIOManager should be compatible with the debugTrace change in 7c7d1f6. Co-authored-by: Pi Delport <pi at well-typed.com> - - - - - c7d3e3a3 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Include the default I/O manager in the +RTS --info output Document the extra +RTS --info output in the user guide - - - - - 8023bad4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 waitRead# / waitWrite# do not work for win32-legacy I/O manager Previously it was unclear that they did not work because the code path was shared with other I/O managers (in particular select()). Following the code carefully shows that what actually happens is that the calling thread would block forever: the thread will be put into the blocked queue, but no other action is scheduled that will ever result in it getting unblocked. It's better to just fail loudly in case anyone accidentally calls it, also it's less confusing code. - - - - - 83a74d20 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Conditionally ignore some GCC warnings Some GCC versions don't know about some warnings, and they complain that we're ignoring unknown warnings. So we try to ignore the warning based on the GCC version. - - - - - 1adc6fa4 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept changes to base-exports All the changes are in fact not changes at all. Previously, the IoSubSystem data type was defined in GHC.RTS.Flags and exported from both GHC.RTS.Flags and GHC.IO.SubSystem. Now, the data type is defined in GHC.IO.SubSystem and still exported from both modules. Therefore, the same exports and same instances are still available from both modules. But the base-exports records only the defining module, and so it looks like a change when it is fully compatible. Related: we do add a deprecation to the export of the type via GHC.RTS.Flags, telling people to use the export from GHC.IO.SubSystem. Also the sort order for some unrelated Show instances changed. No idea why. The same changes apply in the other versions, with a few more changes due to sort order weirdness. - - - - - 8d950968 by Duncan Coutts at 2024-04-03T01:27:18-04:00 Accept metric decrease in T12227 I can't think of any good reason that anything in this MR should have changed the number of allocations, up or down. (Yes this is an empty commit.) Metric Decrease: T12227 - - - - - e869605e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Several improvements to the handling of coercions * Make `mkSymCo` and `mkInstCo` smarter Fixes #23642 * Fix return role of `SelCo` in the coercion optimiser. Fixes #23617 * Make the coercion optimiser `opt_trans_rule` work better for newtypes Fixes #23619 - - - - - 1efd0714 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 FloatOut: improve floating for join point See the new Note [Floating join point bindings]. * Completely get rid of the complicated join_ceiling nonsense, which I have never understood. * Do not float join points at all, except perhaps to top level. * Some refactoring around wantToFloat, to treat Rec and NonRec more uniformly - - - - - 9c00154d by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve eta-expansion through call stacks See Note [Eta expanding through CallStacks] in GHC.Core.Opt.Arity This is a one-line change, that fixes an inconsistency - || isCallStackPredTy ty + || isCallStackPredTy ty || isCallStackTy ty - - - - - 95a9a172 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Spelling, layout, pretty-printing only - - - - - bdf1660f by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Improve exprIsConApp_maybe a little Eliminate a redundant case at birth. This sometimes reduces Simplifier iterations. See Note [Case elim in exprIsConApp_maybe]. - - - - - 609cd32c by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Inline GHC.HsToCore.Pmc.Solver.Types.trvVarInfo When exploring compile-time regressions after meddling with the Simplifier, I discovered that GHC.HsToCore.Pmc.Solver.Types.trvVarInfo was very delicately balanced. It's a small, heavily used, overloaded function and it's important that it inlines. By a fluke it was before, but at various times in my journey it stopped doing so. So I just added an INLINE pragma to it; no sense in depending on a delicately-balanced fluke. - - - - - ae24c9bc by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Slight improvement in WorkWrap Ensure that WorkWrap preserves lambda binders, in case of join points. Sadly I have forgotten why I made this change (it was while I was doing a lot of meddling in the Simplifier, but * it does no harm, * it is slightly more efficient, and * presumably it made something better! Anyway I have kept it in a separate commit. - - - - - e9297181 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Use named record fields for the CastIt { ... } data constructor This is a pure refactor - - - - - b4581e23 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Remove a long-commented-out line Pure refactoring - - - - - e026bdf2 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Simplifier improvements This MR started as: allow the simplifer to do more in one pass, arising from places I could see the simplifier taking two iterations where one would do. But it turned into a larger project, because these changes unexpectedly made inlining blow up, especially join points in deeply-nested cases. The main changes are below. There are also many new or rewritten Notes. Avoiding simplifying repeatedly ~~~~~~~~~~~~~~~ See Note [Avoiding simplifying repeatedly] * The SimplEnv now has a seInlineDepth field, which says how deep in unfoldings we are. See Note [Inline depth] in Simplify.Env. Currently used only for the next point: avoiding repeatedly simplifying coercions. * Avoid repeatedly simplifying coercions. see Note [Avoid re-simplifying coercions] in Simplify.Iteration As you'll see from the Note, this makes use of the seInlineDepth. * Allow Simplify.Iteration.simplAuxBind to inline used-once things. This is another part of Note [Post-inline for single-use things], and is really good for reducing simplifier iterations in situations like case K e of { K x -> blah } wher x is used once in blah. * Make GHC.Core.SimpleOpt.exprIsConApp_maybe do some simple case elimination. Note [Case elim in exprIsConApp_maybe] * Improve the case-merge transformation: - Move the main code to `GHC.Core.Utils.mergeCaseAlts`, to join `filterAlts` and friends. See Note [Merge Nested Cases] in GHC.Core.Utils. - Add a new case for `tagToEnum#`; see wrinkle (MC3). - Add a new case to look through join points: see wrinkle (MC4) postInlineUnconditionally ~~~~~~~~~~~~~~~~~~~~~~~~~ * Allow Simplify.Utils.postInlineUnconditionally to inline variables that are used exactly once. See Note [Post-inline for single-use things]. * Do not postInlineUnconditionally join point, ever. Doing so does not reduce allocation, which is the main point, and with join points that are used a lot it can bloat code. See point (1) of Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration. * Do not postInlineUnconditionally a strict (demanded) binding. It will not allocate a thunk (it'll turn into a case instead) so again the main point of inlining it doesn't hold. Better to check per-call-site. * Improve occurrence analyis for bottoming function calls, to help postInlineUnconditionally. See Note [Bottoming function calls] in GHC.Core.Opt.OccurAnal Inlining generally ~~~~~~~~~~~~~~~~~~ * In GHC.Core.Opt.Simplify.Utils.interestingCallContext, use RhsCtxt NonRecursive (not BoringCtxt) for a plain-seq case. See Note [Seq is boring] Also, wrinkle (SB1), inline in that `seq` context only for INLINE functions (UnfWhen guidance). * In GHC.Core.Opt.Simplify.Utils.interestingArg, - return ValueArg for OtherCon [c1,c2, ...], but - return NonTrivArg for OtherCon [] This makes a function a little less likely to inline if all we know is that the argument is evaluated, but nothing else. * isConLikeUnfolding is no longer true for OtherCon {}. This propagates to exprIsConLike. Con-like-ness has /positive/ information. Join points ~~~~~~~~~~~ * Be very careful about inlining join points. See these two long Notes Note [Duplicating join points] in GHC.Core.Opt.Simplify.Iteration Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline * When making join points, don't do so if the join point is so small it will immediately be inlined; check uncondInlineJoin. * In GHC.Core.Opt.Simplify.Inline.tryUnfolding, improve the inlining heuristics for join points. In general we /do not/ want to inline join points /even if they are small/. See Note [Duplicating join points] GHC.Core.Opt.Simplify.Iteration. But sometimes we do: see Note [Inlining join points] in GHC.Core.Opt.Simplify.Inline; and the new `isBetterUnfoldingThan` function. * Do not add an unfolding to a join point at birth. This is a tricky one and has a long Note [Do not add unfoldings to join points at birth] It shows up in two places - In `mkDupableAlt` do not add an inlining - (trickier) In `simplLetUnfolding` don't add an unfolding for a fresh join point I am not fully satisifed with this, but it works and is well documented. * In GHC.Core.Unfold.sizeExpr, make jumps small, so that we don't penalise having a non-inlined join point. Performance changes ~~~~~~~~~~~~~~~~~~~ * Binary sizes fall by around 2.6%, according to nofib. * Compile times improve slightly. Here are the figures over 1%. I investiate the biggest differnce in T18304. It's a very small module, just a few hundred nodes. The large percentage difffence is due to a single function that didn't quite inline before, and does now, making code size a bit bigger. I decided gains outweighed the losses. Metrics: compile_time/bytes allocated (changes over +/- 1%) ------------------------------------------------ CoOpt_Singletons(normal) -9.2% GOOD LargeRecord(normal) -23.5% GOOD MultiComponentModulesRecomp(normal) +1.2% MultiLayerModulesTH_OneShot(normal) +4.1% BAD PmSeriesS(normal) -3.8% PmSeriesV(normal) -1.5% T11195(normal) -1.3% T12227(normal) -20.4% GOOD T12545(normal) -3.2% T12707(normal) -2.1% GOOD T13253(normal) -1.2% T13253-spj(normal) +8.1% BAD T13386(normal) -3.1% GOOD T14766(normal) -2.6% GOOD T15164(normal) -1.4% T15304(normal) +1.2% T15630(normal) -8.2% T15630a(normal) NEW T15703(normal) -14.7% GOOD T16577(normal) -2.3% GOOD T17516(normal) -39.7% GOOD T18140(normal) +1.2% T18223(normal) -17.1% GOOD T18282(normal) -5.0% GOOD T18304(normal) +10.8% BAD T18923(normal) -2.9% GOOD T1969(normal) +1.0% T19695(normal) -1.5% T20049(normal) -12.7% GOOD T21839c(normal) -4.1% GOOD T3064(normal) -1.5% T3294(normal) +1.2% BAD T4801(normal) +1.2% T5030(normal) -15.2% GOOD T5321Fun(normal) -2.2% GOOD T6048(optasm) -16.8% GOOD T783(normal) -1.2% T8095(normal) -6.0% GOOD T9630(normal) -4.7% GOOD T9961(normal) +1.9% BAD WWRec(normal) -1.4% info_table_map_perf(normal) -1.3% parsing001(normal) +1.5% geo. mean -2.0% minimum -39.7% maximum +10.8% * Runtimes generally improve. In the testsuite perf/should_run gives: Metrics: runtime/bytes allocated ------------------------------------------ Conversions(normal) -0.3% T13536a(optasm) -41.7% GOOD T4830(normal) -0.1% haddock.Cabal(normal) -0.1% haddock.base(normal) -0.1% haddock.compiler(normal) -0.1% geo. mean -0.8% minimum -41.7% maximum +0.0% * For runtime, nofib is a better test. The news is mostly good. Here are the number more than +/- 0.1%: # bytes allocated ==========================++========== imaginary/digits-of-e1 || -14.40% imaginary/digits-of-e2 || -4.41% imaginary/paraffins || -0.17% imaginary/rfib || -0.15% imaginary/wheel-sieve2 || -0.10% real/compress || -0.47% real/fluid || -0.10% real/fulsom || +0.14% real/gamteb || -1.47% real/gg || -0.20% real/infer || +0.24% real/pic || -0.23% real/prolog || -0.36% real/scs || -0.46% real/smallpt || +4.03% shootout/k-nucleotide || -20.23% shootout/n-body || -0.42% shootout/spectral-norm || -0.13% spectral/boyer2 || -3.80% spectral/constraints || -0.27% spectral/hartel/ida || -0.82% spectral/mate || -20.34% spectral/para || +0.46% spectral/rewrite || +1.30% spectral/sphere || -0.14% ==========================++========== geom mean || -0.59% real/smallpt has a huge nest of local definitions, and I could not pin down a reason for a regression. But there are three big wins! Metric Decrease: CoOpt_Singletons LargeRecord T12227 T12707 T13386 T13536a T14766 T15703 T16577 T17516 T18223 T18282 T18923 T21839c T20049 T5321Fun T5030 T6048 T8095 T9630 T783 Metric Increase: MultiLayerModulesTH_OneShot T13253-spj T18304 T18698a T9961 T3294 - - - - - 27db3c5e by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Testsuite message changes from simplifier improvements - - - - - 271a7812 by Simon Peyton Jones at 2024-04-03T01:27:55-04:00 Account for bottoming functions in OccurAnal This fixes #24582, a small but long-standing bug - - - - - 0fde229f by Ben Gamari at 2024-04-04T07:04:58-04:00 testsuite: Introduce template-haskell-exports test - - - - - 0c4a9686 by Luite Stegeman at 2024-04-04T07:05:39-04:00 Update correct counter in bumpTickyAllocd - - - - - 5f085d3a by Fendor at 2024-04-04T14:47:33-04:00 Replace `SizedSeq` with `FlatBag` for flattened structure LinkedLists are notoriously memory ineffiecient when all we do is traversing a structure. As 'UnlinkedBCO' has been identified as a data structure that impacts the overall memory usage of GHCi sessions, we avoid linked lists and prefer flattened structure for storing. We introduce a new memory efficient representation of sequential elements that has special support for the cases: * Empty * Singleton * Tuple Elements This improves sharing in the 'Empty' case and avoids the overhead of 'Array' until its constant overhead is justified. - - - - - 82cfe10c by Fendor at 2024-04-04T14:47:33-04:00 Compact FlatBag array representation `Array` contains three additional `Word`'s we do not need in `FlatBag`. Move `FlatBag` to `SmallArray`. Expand the API of SmallArray by `sizeofSmallArray` and add common traversal functions, such as `mapSmallArray` and `foldMapSmallArray`. Additionally, allow users to force the elements of a `SmallArray` via `rnfSmallArray`. - - - - - 36a75b80 by Andrei Borzenkov at 2024-04-04T14:48:10-04:00 Change how invisible patterns represented in haskell syntax and TH AST (#24557) Before this patch: data ArgPat p = InvisPat (LHsType p) | VisPat (LPat p) With this patch: data Pat p = ... | InvisPat (LHsType p) ... And the same transformation in the TH land. The rest of the changes is just updating code to handle new AST and writing tests to check if it is possible to create invalid states using TH. Metric Increase: MultiLayerModulesTH_OneShot - - - - - 28009fbc by Matthew Pickering at 2024-04-04T14:48:46-04:00 Fix off by one error in seekBinNoExpand and seekBin - - - - - 9b9e031b by Ben Gamari at 2024-04-04T21:30:08-04:00 compiler: Allow more types in GHCForeignImportPrim For many, many years `GHCForeignImportPrim` has suffered from the rather restrictive limitation of not allowing any non-trivial types in arguments or results. This limitation was justified by the code generator allegely barfing in the presence of such types. However, this restriction appears to originate well before the NCG rewrite and the new NCG does not appear to have any trouble with such types (see the added `T24598` test). Lift this restriction. Fixes #24598. - - - - - 1324b862 by Alan Zimmerman at 2024-04-04T21:30:44-04:00 EPA: Use EpaLocation not SrcSpan in ForeignDecls This allows us to update them for makeDeltaAst in ghc-exactprint - - - - - 19883a23 by Alan Zimmerman at 2024-04-05T16:58:17-04:00 EPA: Use EpaLocation for RecFieldsDotDot So we can update it to a delta position in makeDeltaAst if needed. - - - - - e8724327 by Matthew Pickering at 2024-04-05T16:58:53-04:00 Remove accidentally committed test.hs - - - - - 88cb3e10 by Fendor at 2024-04-08T09:03:34-04:00 Avoid UArray when indexing is not required `UnlinkedBCO`'s can occur many times in the heap. Each `UnlinkedBCO` references two `UArray`'s but never indexes them. They are only needed to encode the elements into a `ByteArray#`. The three words for the lower bound, upper bound and number of elements are essentially unused, thus we replace `UArray` with a wrapper around `ByteArray#`. This saves us up to three words for each `UnlinkedBCO`. Further, to avoid re-allocating these words for `ResolvedBCO`, we repeat the procedure for `ResolvedBCO` and add custom `Binary` and `Show` instances. For example, agda's repl session has around 360_000 UnlinkedBCO's, so avoiding these three words is already saving us around 8MB residency. - - - - - f2cc1107 by Fendor at 2024-04-08T09:04:11-04:00 Never UNPACK `FastMutInt` for counting z-encoded `FastString`s In `FastStringTable`, we count the number of z-encoded FastStrings that exist in a GHC session. We used to UNPACK the counters to not waste memory, but live retainer analysis showed that we allocate a lot of `FastMutInt`s, retained by `mkFastZString`. We lazily compute the `FastZString`, only incrementing the counter when the `FastZString` is forced. The function `mkFastStringWith` calls `mkZFastString` and boxes the `FastMutInt`, leading to the following core: mkFastStringWith = \ mk_fs _ -> = case stringTable of { FastStringTable _ n_zencs segments# _ -> ... case ((mk_fs (I# ...) (FastMutInt n_zencs)) `cast` <Co:2> :: ...) ... Marking this field as `NOUNPACK` avoids this reboxing, eliminating the allocation of a fresh `FastMutInt` on every `FastString` allocation. - - - - - c6def949 by Matthew Pickering at 2024-04-08T16:06:51-04:00 Force in_multi to avoid retaining entire hsc_env - - - - - fbb91a63 by Fendor at 2024-04-08T16:06:51-04:00 Eliminate name thunk in declaration fingerprinting Thunk analysis showed that we have about 100_000 thunks (in agda and `-fwrite-simplified-core`) pointing to the name of the name decl. Forcing this thunk fixes this issue. The thunk created here is retained by the thunk created by forkM, it is better to eagerly force this because the result (a `Name`) is already retained indirectly via the `IfaceDecl`. - - - - - 3b7b0c1c by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Use EpaLocation in WarningTxt This allows us to use an EpDelta if needed when using makeDeltaAst. - - - - - 12b997df by Alan Zimmerman at 2024-04-08T16:07:27-04:00 EPA: Move DeltaPos and EpaLocation' into GHC.Types.SrcLoc This allows us to use a NoCommentsLocation for the possibly trailing comma location in a StringLiteral. This in turn allows us to correctly roundtrip via makeDeltaAst. - - - - - 868c8a78 by Fendor at 2024-04-09T08:51:50-04:00 Prefer packed representation for CompiledByteCode As there are many 'CompiledByteCode' objects alive during a GHCi session, representing its element in a more packed manner improves space behaviour at a minimal cost. When running GHCi on the agda codebase, we find around 380 live 'CompiledByteCode' objects. Packing their respective 'UnlinkedByteCode' can save quite some pointers. - - - - - be3bddde by Alan Zimmerman at 2024-04-09T08:52:26-04:00 EPA: Capture all comments in a ClassDecl Hopefully the final fix needed for #24533 - - - - - 3d0806fc by Jade at 2024-04-10T05:39:53-04:00 Validate -main-is flag using parseIdentifier Fixes #24368 - - - - - dd530bb7 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: free error message before returning Fixes a memory leak in rts/linker/PEi386.c - - - - - e008a19a by Alexis King at 2024-04-10T05:40:29-04:00 linker: Avoid linear search when looking up Haskell symbols via dlsym See the primary Note [Looking up symbols in the relevant objects] for a more in-depth explanation. When dynamically loading a Haskell symbol (typical when running a splice or GHCi expression), before this commit we would search for the symbol in all dynamic libraries that were loaded. However, this could be very inefficient when too many packages are loaded (which can happen if there are many package dependencies) because the time to lookup the would be linear in the number of packages loaded. This commit drastically improves symbol loading performance by introducing a mapping from units to the handles of corresponding loaded dlls. These handles are returned by dlopen when we load a dll, and can then be used to look up in a specific dynamic library. Looking up a given Name is now much more precise because we can get lookup its unit in the mapping and lookup the symbol solely in the handles of the dynamic libraries loaded for that unit. In one measurement, the wait time before the expression was executed went from +-38 seconds down to +-2s. This commit also includes Note [Symbols may not be found in pkgs_loaded], explaining the fallback to the old behaviour in case no dll can be found in the unit mapping for a given Name. Fixes #23415 Co-authored-by: Rodrigo Mesquita (@alt-romes) - - - - - dcfaa190 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 rts: Make addDLL a wrapper around loadNativeObj Rewrite the implementation of `addDLL` as a wrapper around the more principled `loadNativeObj` rts linker function. The latter should be preferred while the former is preserved for backwards compatibility. `loadNativeObj` was previously only available on ELF platforms, so this commit further refactors the rts linker to transform loadNativeObj_ELF into loadNativeObj_POSIX, which is available in ELF and MachO platforms. The refactor made it possible to remove the `dl_mutex` mutex in favour of always using `linker_mutex` (rather than a combination of both). Lastly, we implement `loadNativeObj` for Windows too. - - - - - 12931698 by Rodrigo Mesquita at 2024-04-10T05:40:29-04:00 Use symbol cache in internal interpreter too This commit makes the symbol cache that was used by the external interpreter available for the internal interpreter too. This follows from the analysis in #23415 that suggests the internal interpreter could benefit from this cache too, and that there is no good reason not to have the cache for it too. It also makes it a bit more uniform to have the symbol cache range over both the internal and external interpreter. This commit also refactors the cache into a function which is used by both `lookupSymbol` and also by `lookupSymbolInDLL`, extending the caching logic to `lookupSymbolInDLL` too. - - - - - dccd3ea1 by Ben Gamari at 2024-04-10T05:40:29-04:00 testsuite: Add test for lookupSymbolInNativeObj - - - - - 1b1a92bd by Alan Zimmerman at 2024-04-10T05:41:05-04:00 EPA: Remove unnecessary XRec in CompleteMatchSig The XRec for [LIdP pass] is not needed for exact printing, remove it. - - - - - 6e18ce2b by Ben Gamari at 2024-04-12T08:16:09-04:00 users-guide: Clarify language extension documentation Over the years the users guide's language extension documentation has gone through quite a few refactorings. In the process some of the descriptions have been rendered non-sensical. For instance, the description of `NoImplicitPrelude` actually describes the semantics of `ImplicitPrelude`. To fix this we: * ensure that all extensions are named in their "positive" sense (e.g. `ImplicitPrelude` rather than `NoImplicitPrelude`). * rework the documentation to avoid flag-oriented wording like "enable" and "disable" * ensure that the polarity of the documentation is consistent with reality. Fixes #23895. - - - - - a933aff3 by Zubin Duggal at 2024-04-12T08:16:45-04:00 driver: Make `checkHomeUnitsClosed` faster The implementation of `checkHomeUnitsClosed` was traversing every single path in the unit dependency graph - this grows exponentially and quickly grows to be infeasible on larger unit dependency graphs. Instead we replace this with a faster implementation which follows from the specificiation of the closure property - there is a closure error if there are units which are both are both (transitively) depended upon by home units and (transitively) depend on home units, but are not themselves home units. To compute the set of units required for closure, we first compute the closure of the unit dependency graph, then the transpose of this closure, and find all units that are reachable from the home units in the transpose of the closure. - - - - - 23c3e624 by Andreas Klebinger at 2024-04-12T08:17:21-04:00 RTS: Emit warning when -M < -H Fixes #24487 - - - - - d23afb8c by Ben Gamari at 2024-04-12T08:17:56-04:00 testsuite: Add broken test for CApiFFI with -fprefer-bytecode See #24634. - - - - - a4bb3a51 by Ben Gamari at 2024-04-12T08:18:32-04:00 base: Deprecate GHC.Pack As proposed in #21461. Closes #21540. - - - - - 55eb8c98 by Ben Gamari at 2024-04-12T08:19:08-04:00 ghc-internal: Fix mentions of ghc-internal in deprecation warnings Closes #24609. - - - - - b0fbd181 by Ben Gamari at 2024-04-12T08:19:44-04:00 rts: Implement set_initial_registers for AArch64 Fixes #23680. - - - - - 14c9ec62 by Ben Gamari at 2024-04-12T08:20:20-04:00 ghcup-metadata: Use Debian 9 binaries on Ubuntu 16, 17 Closes #24646. - - - - - 35a1621e by Ben Gamari at 2024-04-12T08:20:55-04:00 Bump unix submodule to 2.8.5.1 Closes #24640. - - - - - a1c24df0 by Finley McIlwaine at 2024-04-12T08:21:31-04:00 Correct default -funfolding-use-threshold in docs - - - - - 0255d03c by Oleg Grenrus at 2024-04-12T08:22:07-04:00 FastString is a __Modified__ UTF-8 - - - - - c3489547 by Matthew Pickering at 2024-04-12T13:13:44-04:00 rts: Improve tracing message when nursery is resized It is sometimes more useful to know how much bigger or smaller the nursery got when it is resized. In particular I am trying to investigate situations where we end up with fragmentation due to the nursery (#24577) - - - - - 5e4f4ba8 by Simon Peyton Jones at 2024-04-12T13:14:20-04:00 Don't generate wrappers for `type data` constructors with StrictData Previously, the logic for checking if a data constructor needs a wrapper or not would take into account whether the constructor's fields have explicit strictness (e.g., `data T = MkT !Int`), but the logic would _not_ take into account whether `StrictData` was enabled. This meant that something like `type data T = MkT Int` would incorrectly generate a wrapper for `MkT` if `StrictData` was enabled, leading to the horrible errors seen in #24620. To fix this, we disable generating wrappers for `type data` constructors altogether. Fixes #24620. Co-authored-by: Ryan Scott <ryan.gl.scott at gmail.com> - - - - - dbdf1995 by Alex Mason at 2024-04-15T15:28:26+10:00 Implements MO_S_Mul2 and MO_U_Mul2 using the UMULH, UMULL and SMULH instructions for AArch64 Also adds a test for MO_S_Mul2 - - - - - 42bd0407 by Teo Camarasu at 2024-04-16T20:06:39-04:00 Make template-haskell a stage1 package Promoting template-haskell from a stage0 to a stage1 package means that we can much more easily refactor template-haskell. We implement this by duplicating the in-tree `template-haskell`. A new `template-haskell-next` library is autogenerated to mirror `template-haskell` `stage1:ghc` to depend on the new interface of the library including the `Binary` instances without adding an explicit dependency on `template-haskell`. This is controlled by the `bootstrap-th` cabal flag When building `template-haskell` modules as part of this vendoring we do not have access to quote syntax, so we cannot use variable quote notation (`'Just`). So we either replace these with hand-written `Name`s or hide the code behind CPP. We can remove the `th_hack` from hadrian, which was required when building stage0 packages using the in-tree `template-haskell` library. For more details see Note [Bootstrapping Template Haskell]. Resolves #23536 Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> Co-Authored-By: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - 3d973e47 by Ben Gamari at 2024-04-16T20:07:15-04:00 Bump parsec submodule to 3.1.17.0 - - - - - 9d38bfa0 by Simon Peyton Jones at 2024-04-16T20:07:51-04:00 Clone CoVars in CorePrep This MR addresses #24463. It's all explained in the new Note [Cloning CoVars and TyVars] - - - - - 0fe2b410 by Andreas Klebinger at 2024-04-16T20:08:27-04:00 NCG: Fix a bug where we errounously removed a required jump instruction. Add a new method to the Instruction class to check if we can eliminate a jump in favour of fallthrough control flow. Fixes #24507 - - - - - 9f99126a by Teo Camarasu at 2024-04-16T20:09:04-04:00 Fix documentation preview from doc-tarball job - Include all the .html files and assets in the job artefacts - Include all the .pdf files in the job artefacts - Mark the artefact as an "exposed" artefact meaning it turns up in the UI. Resolves #24651 - - - - - 3a0642ea by Ben Gamari at 2024-04-16T20:09:39-04:00 rts: Ignore EINTR while polling in timerfd itimer implementation While the RTS does attempt to mask signals, it may be that a foreign library unmasks them. This previously caused benign warnings which we now ignore. See #24610. - - - - - 9a53cd3f by Alan Zimmerman at 2024-04-16T20:10:15-04:00 EPA: Add additional comments field to AnnsModule This is used in exact printing to store comments coming after the `where` keyword but before any comments allocated to imports or decls. It is used in ghc-exactprint, see https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195bf47c17d34fa7 - - - - - e5c43259 by Bryan Richter at 2024-04-16T20:10:51-04:00 Remove unrunnable FreeBSD CI jobs FreeBSD runner supply is inelastic. Currently there is only one, and it's unavailable because of a hardware issue. - - - - - 914eb49a by Ben Gamari at 2024-04-16T20:11:27-04:00 rel-eng: Fix mktemp usage in recompress-all We need a temporary directory, not a file. - - - - - f30e4984 by Teo Camarasu at 2024-04-16T20:12:03-04:00 Fix ghc API link in docs/index.html This was missing part of the unit ID meaning it would 404. Resolves #24674 - - - - - d7a3d6b5 by Ben Gamari at 2024-04-16T20:12:39-04:00 template-haskell: Declare TH.Lib.Internal as not-home Rather than `hide`. Closes #24659. - - - - - 5eaa46e7 by Matthew Pickering at 2024-04-19T02:14:55-04:00 testsuite: Rename isCross() predicate to needsTargetWrapper() isCross() was a misnamed because it assumed that all cross targets would provide a target wrapper, but the two most common cross targets (javascript, wasm) don't need a target wrapper. Therefore we rename this predicate to `needsTargetWrapper()` so situations in the testsuite where we can check whether running executables requires a target wrapper or not. - - - - - 55a9d699 by Simon Peyton Jones at 2024-04-19T02:15:32-04:00 Do not float HNFs out of lambdas This MR adjusts SetLevels so that it is less eager to float a HNF (lambda or constructor application) out of a lambda, unless it gets to top level. Data suggests that this change is a small net win: * nofib bytes-allocated falls by -0.09% (but a couple go up) * perf/should_compile bytes-allocated falls by -0.5% * perf/should_run bytes-allocated falls by -0.1% See !12410 for more detail. When fiddling elsewhere, I also found that this patch had a huge positive effect on the (very delicate) test perf/should_run/T21839r But that improvement doesn't show up in this MR by itself. Metric Decrease: MultiLayerModulesRecomp T15703 parsing001 - - - - - f0701585 by Alan Zimmerman at 2024-04-19T02:16:08-04:00 EPA: Fix comments in mkListSyntaxTy0 Also extend the test to confirm. Addresses #24669, 1 of 4 - - - - - b01c01d4 by Serge S. Gulin at 2024-04-19T02:16:51-04:00 JS: set image `x86_64-linux-deb11-emsdk-closure` for build - - - - - c90c6039 by Alan Zimmerman at 2024-04-19T02:17:27-04:00 EPA: Provide correct span for PatBind And remove unused parameter in checkPatBind Contributes to #24669 - - - - - bee54c24 by Krzysztof Gogolewski at 2024-04-19T11:13:00+02:00 Update quantification order following GHC haskell/haddock#23764 - - - - - 2814eb89 by Ben Gamari at 2024-04-19T18:57:05+02:00 hypsrc-test: Fix output of PositionPragmas.html - - - - - 26036f96 by Alan Zimmerman at 2024-04-19T13:11:08-04:00 EPA: Fix span for PatBuilderAppType Include the location of the prefix @ in the span for InVisPat. Also removes unnecessary annotations from HsTP. Contributes to #24669 - - - - - dba03aab by Matthew Craven at 2024-04-19T13:11:44-04:00 testsuite: Give the pre_cmd for mhu-perf more time - - - - - d31fbf6c by Krzysztof Gogolewski at 2024-04-19T21:04:09-04:00 Fix quantification order for a `op` b and a %m -> b Fixes #23764 Implements https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0640-tyop-quantification-order.rst Updates haddock submodule. - - - - - 385cd1c4 by Sebastian Graf at 2024-04-19T21:04:45-04:00 Make `seq#` a magic Id and inline it in CorePrep (#24124) We can save much code and explanation in Tag Inference and StgToCmm by making `seq#` a known-key Magic Id in `GHC.Internal.IO` and inline this definition in CorePrep. See the updated `Note [seq# magic]`. I also implemented a new `Note [Flatten case-bind]` to get better code for otherwise nested case scrutinees. I renamed the contructors of `ArgInfo` to use an `AI` prefix in order to resolve the clash between `type CpeApp = CoreExpr` and the data constructor of `ArgInfo`, as well as fixed typos in `Note [CorePrep invariants]`. Fixes #24252 and #24124. - - - - - 275e41a9 by Jade at 2024-04-20T11:10:40-04:00 Put the newline after errors instead of before them This mainly has consequences for GHCi but also slightly alters how the output of GHC on the commandline looks. Fixes: #22499 - - - - - dd339c7a by Teo Camarasu at 2024-04-20T11:11:16-04:00 Remove unecessary stage0 packages Historically quite a few packages had to be stage0 as they depended on `template-haskell` and that was stage0. In #23536 we made it so that was no longer the case. This allows us to remove a bunch of packages from this list. A few still remain. A new version of `Win32` is required by `semaphore-compat`. Including `Win32` in the stage0 set requires also including `filepath` because otherwise Hadrian's dependency logic gets confused. Once our boot compiler has a newer version of `Win32` all of these will be able to be dropped. Resolves #24652 - - - - - 2f8e3a25 by Alan Zimmerman at 2024-04-20T11:11:52-04:00 EPA: Avoid duplicated comments in splice decls Contributes to #24669 - - - - - c70b9ddb by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fix typos and namings (fixes #24602) You may noted that I've also changed term of ``` , global "h$vt_double" ||= toJExpr IntV ``` See "IntV" and ``` WaitReadOp -> \[] [fd] -> pure $ PRPrimCall $ returnS (app "h$waidRead" [fd]) ``` See "h$waidRead" - - - - - 3db54f9b by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: trivial checks for variable presence (fixes #24602) - - - - - 777f108f by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: fs module imported twice (by emscripten and by ghc-internal). ghc-internal import wrapped in a closure to prevent conflict with emscripten (fixes #24602) Better solution is to use some JavaScript module system like AMD, CommonJS or even UMD. It will be investigated at other issues. At first glance we should try UMD (See https://github.com/umdjs/umd) - - - - - a45a5712 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: thread.js requires h$fds and h$fdReady to be declared for static code analysis, minimal code copied from GHCJS (fixes #24602) I've just copied some old pieces of GHCJS from publicly available sources (See https://github.com/Taneb/shims/blob/a6dd0202dcdb86ad63201495b8b5d9763483eb35/src/io.js#L607). Also I didn't put details to h$fds. I took minimal and left only its object initialization: `var h$fds = {};` - - - - - ad90bf12 by Serge S. Gulin at 2024-04-21T16:33:43+03:00 JS: heap and stack overflows reporting defined as js hard failure (fixes #24602) These errors were treated as a hard failure for browser application. The fix is trivial: just throw error. - - - - - 5962fa52 by Serge S. Gulin at 2024-04-21T16:33:44+03:00 JS: Stubs for code without actual implementation detected by Google Closure Compiler (fixes #24602) These errors were fixed just by introducing stubbed functions with throw for further implementation. - - - - - a0694298 by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add externs to linker (fixes #24602) After enabling jsdoc and built-in google closure compiler types I was needed to deal with the following: 1. Define NodeJS-environment types. I've just copied minimal set of externs from semi-official repo (see https://github.com/externs/nodejs/blob/6c6882c73efcdceecf42e7ba11f1e3e5c9c041f0/v8/nodejs.js#L8). 2. Define Emscripten-environment types: `HEAP8`. Emscripten already provides some externs in our code but it supposed to be run in some module system. And its definitions do not work well in plain bundle. 3. We have some functions which purpose is to add to functions some contextual information via function properties. These functions should be marked as `modifies` to let google closure compiler remove calls if these functions are not used actually by call graph. Such functions are: `h$o`, `h$sti`, `h$init_closure`, `h$setObjInfo`. 4. STG primitives such as registries and stuff from `GHC.StgToJS`. `dXX` properties were already present at externs generator function but they are started from `7`, not from `1`. This message is related: `// fixme does closure compiler bite us here?` - - - - - e58bb29f by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: added both tests: for size and for correctness (fixes #24602) By some reason MacOS builds add to stderr messages like: Ignoring unexpected archive entry: __.SYMDEF ... However I left stderr to `/dev/null` for compatibility with linux CI builds. - - - - - 909f3a9c by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Disable js linker warning for empty symbol table to make js tests running consistent across environments - - - - - 83eb10da by Serge S. Gulin at 2024-04-21T16:34:07+03:00 JS: Add special preprocessor for js files due of needing to keep jsdoc comments (fixes #24602) Our js files have defined google closure compiler types at jsdoc entries but these jsdoc entries are removed by cpp preprocessor. I considered that reusing them in javascript-backend would be a nice thing. Right now haskell processor uses `-traditional` option to deal with comments and `//` operators. But now there are following compiler options: `-C` and `-CC`. You can read about them at GCC (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-CC) and CLang (see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-CC). It seems that `-CC` works better for javascript jsdoc than `-traditional`. At least it leaves `/* ... */` comments w/o changes. - - - - - e1cf8dc2 by brandon s allbery kf8nh at 2024-04-22T03:48:26-04:00 fix link in CODEOWNERS It seems that our local Gitlab no longer has documentation for the `CODEOWNERS` file, but the master documentation still does. Use that instead. - - - - - a27c6a49 by Fendor at 2024-04-22T10:13:03+02:00 Adapt to UserData split - - - - - 1efc5a7a by Fendor at 2024-04-22T10:13:03+02:00 Adapt to BinHandle split - - - - - 593f4e04 by Fendor at 2024-04-23T10:19:14-04:00 Add performance regression test for '-fwrite-simplified-core' - - - - - 1ba39b05 by Fendor at 2024-04-23T10:19:14-04:00 Typecheck corebindings lazily during bytecode generation This delays typechecking the corebindings until the bytecode generation happens. We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`. In general, we shouldn't retain values of the hydrated `Type`, as not evaluating the bytecode object keeps it alive. It is better if we retain the unhydrated `IfaceType`. See Note [Hydrating Modules] - - - - - e916fc92 by Alan Zimmerman at 2024-04-23T10:19:50-04:00 EPA: Keep comments in a CaseAlt match The comments now live in the surrounding location, not inside the Match. Make sure we keep them. Closes #24707 - - - - - d2b17f32 by Cheng Shao at 2024-04-23T15:01:22-04:00 driver: force merge objects when building dynamic objects This patch forces the driver to always merge objects when building dynamic objects even when ar -L is supported. It is an oversight of !8887: original rationale of that patch is favoring the relatively cheap ar -L operation over object merging when ar -L is supported, which makes sense but only if we are building static objects! Omitting check for whether we are building dynamic objects will result in broken .so files with undefined reference errors at executable link time when building GHC with llvm-ar. Fixes #22210. - - - - - 209d09f5 by Julian Ospald at 2024-04-23T15:02:03-04:00 Allow non-absolute values for bootstrap GHC variable Fixes #24682 - - - - - 3fff0977 by Matthew Pickering at 2024-04-23T15:02:38-04:00 Don't depend on registerPackage function in Cabal More recent versions of Cabal modify the behaviour of libAbiHash which breaks our usage of registerPackage. It is simpler to inline the part of registerPackage that we need and avoid any additional dependency and complication using the higher-level function introduces. - - - - - c62dc317 by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: remove obsolete ln script This commit removes an obsolete ln script in ghc-bignum/gmp. See 060251c24ad160264ae8553efecbb8bed2f06360 for its original intention, but it's been obsolete for a long time, especially since the removal of the make build system. Hence the house cleaning. - - - - - 6399d52b by Cheng Shao at 2024-04-25T01:32:02-04:00 ghc-bignum: update gmp to 6.3.0 This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0. The tarball format is now xz, and gmpsrc.patch has been patched into the tarball so hadrian no longer needs to deal with patching logic when building in-tree GMP. - - - - - 65b4b92f by Cheng Shao at 2024-04-25T01:32:02-04:00 hadrian: remove obsolete Patch logic This commit removes obsolete Patch logic from hadrian, given we no longer need to patch the gmp tarball when building in-tree GMP. - - - - - 71f28958 by Cheng Shao at 2024-04-25T01:32:02-04:00 autoconf: remove obsolete patch detection This commit removes obsolete deletection logic of the patch command from autoconf scripts, given we no longer need to patch anything in the GHC build process. - - - - - daeda834 by Sylvain Henry at 2024-04-25T01:32:43-04:00 JS: correctly handle RUBBISH literals (#24664) - - - - - 8a06ddf6 by Matthew Pickering at 2024-04-25T11:16:16-04:00 Linearise ghc-internal and base build This is achieved by requesting the final package database for ghc-internal, which mandates it is fully built as a dependency of configuring the `base` package. This is at the expense of cross-package parrallelism between ghc-internal and the base package. Fixes #24436 - - - - - 94da9365 by Andrei Borzenkov at 2024-04-25T11:16:54-04:00 Fix tuple puns renaming (24702) Move tuple renaming short cutter from `isBuiltInOcc_maybe` to `isPunOcc_maybe`, so we consider incoming module. I also fixed some hidden bugs that raised after the change was done. - - - - - fa03b1fb by Fendor at 2024-04-26T18:03:13-04:00 Refactor the Binary serialisation interface The goal is simplifiy adding deduplication tables to `ModIface` interface serialisation. We identify two main points of interest that make this difficult: 1. UserData hardcodes what `Binary` instances can have deduplication tables. Moreover, it heavily uses partial functions. 2. GHC.Iface.Binary hardcodes the deduplication tables for 'Name' and 'FastString', making it difficult to add more deduplication. Instead of having a single `UserData` record with fields for all the types that can have deduplication tables, we allow to provide custom serialisers for any `Typeable`. These are wrapped in existentials and stored in a `Map` indexed by their respective `TypeRep`. The `Binary` instance of the type to deduplicate still needs to explicitly look up the decoder via `findUserDataReader` and `findUserDataWriter`, which is no worse than the status-quo. `Map` was chosen as microbenchmarks indicate it is the fastest for a small number of keys (< 10). To generalise the deduplication table serialisation mechanism, we introduce the types `ReaderTable` and `WriterTable` which provide a simple interface that is sufficient to implement a general purpose deduplication mechanism for `writeBinIface` and `readBinIface`. This allows us to provide a list of deduplication tables for serialisation that can be extended more easily, for example for `IfaceTyCon`, see the issue https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for more motivation. In addition to this refactoring, we split `UserData` into `ReaderUserData` and `WriterUserData`, to avoid partial functions and reduce overall memory usage, as we need fewer mutable variables. Bump haddock submodule to accomodate for `UserData` split. ------------------------- Metric Increase: MultiLayerModulesTH_Make MultiLayerModulesRecomp T21839c ------------------------- - - - - - bac57298 by Fendor at 2024-04-26T18:03:13-04:00 Split `BinHandle` into `ReadBinHandle` and `WriteBinHandle` A `BinHandle` contains too much information for reading data. For example, it needs to keep a `FastMutInt` and a `IORef BinData`, when the non-mutable variants would suffice. Additionally, this change has the benefit that anyone can immediately tell whether the `BinHandle` is used for reading or writing. Bump haddock submodule BinHandle split. - - - - - 4d6394dd by Simon Peyton Jones at 2024-04-26T18:03:49-04:00 Fix missing escaping-kind check in tcPatSynSig Note [Escaping kind in type signatures] explains how we deal with escaping kinds in type signatures, e.g. f :: forall r (a :: TYPE r). a where the kind of the body is (TYPE r), but `r` is not in scope outside the forall-type. I had missed this subtlety in tcPatSynSig, leading to #24686. This MR fixes it; and a similar bug in tc_top_lhs_type. (The latter is tested by T24686a.) - - - - - 981c2c2c by Alan Zimmerman at 2024-04-26T18:04:25-04:00 EPA: check-exact: check that the roundtrip reproduces the source Closes #24670 - - - - - a8616747 by Andrew Lelechenko at 2024-04-26T18:05:01-04:00 Document that setEnv is not thread-safe - - - - - 1e41de83 by Bryan Richter at 2024-04-26T18:05:37-04:00 CI: Work around frequent Signal 9 errors - - - - - a6d5f9da by Naïm Favier at 2024-04-27T17:52:40-04:00 ghc-internal: add MonadFix instance for (,) Closes https://gitlab.haskell.org/ghc/ghc/-/issues/24288, implements CLC proposal https://github.com/haskell/core-libraries-committee/issues/238. Adds a MonadFix instance for tuples, permitting value recursion in the "native" writer monad and bringing consistency with the existing instance for transformers's WriterT (and, to a lesser extent, for Solo). - - - - - 64feadcd by Rodrigo Mesquita at 2024-04-27T17:53:16-04:00 bindist: Fix xattr cleaning The original fix (725343aa) was incorrect because it used the shell bracket syntax which is the quoting syntax in autoconf, making the test for existence be incorrect and therefore `xattr` was never run. Fixes #24554 - - - - - e2094df3 by damhiya at 2024-04-28T23:52:00+09:00 Make read accepts binary integer formats CLC proposal : https://github.com/haskell/core-libraries-committee/issues/177 - - - - - c62239b7 by Sylvain Henry at 2024-04-29T10:35:00+02:00 Fix tests for T22229 - - - - - 1c2fd963 by Alan Zimmerman at 2024-04-29T23:17:00-04:00 EPA: Preserve comments in Match Pats Closes #24708 Closes #24715 Closes #24734 - - - - - 4189d17e by Sylvain Henry at 2024-04-29T23:17:42-04:00 LLVM: better unreachable default destination in Switch (#24717) See added note. Co-authored-by: Siddharth Bhat <siddu.druid at gmail.com> - - - - - a3725c88 by Cheng Shao at 2024-04-29T23:18:20-04:00 ci: enable wasm jobs for MRs with wasm label This patch enables wasm jobs for MRs with wasm label. Previously the wasm label didn't actually have any effect on the CI pipeline, and full-ci needed to be applied to run wasm jobs which was a waste of runners when working on the wasm backend, hence the fix here. - - - - - 702f7964 by Matthew Pickering at 2024-04-29T23:18:56-04:00 Make interface files and object files depend on inplace .conf file A potential fix for #24737 - - - - - 728af21e by Cheng Shao at 2024-04-30T05:30:23-04:00 utils: remove obsolete vagrant scripts Vagrantfile has long been removed in !5288. This commit further removes the obsolete vagrant scripts in the tree. - - - - - 36f2c342 by Cheng Shao at 2024-04-30T05:31:00-04:00 Update autoconf scripts Scripts taken from autoconf 948ae97ca5703224bd3eada06b7a69f40dd15a02 - - - - - ecbf22a6 by Ben Gamari at 2024-04-30T05:31:36-04:00 ghcup-metadata: Drop output_name field This is entirely redundant to the filename of the URL. There is no compelling reason to name the downloaded file differently from its source. - - - - - c56d728e by Zubin Duggal at 2024-04-30T22:45:09-04:00 testsuite: Handle exceptions in framework_fail when testdir is not initialised When `framework_fail` is called before initialising testdir, it would fail with an exception reporting the testdir not being initialised instead of the actual failure. Ensure we report the actual reason for the failure instead of failing in this way. One way this can manifest is when trying to run a test that doesn't exist using `--only` - - - - - d5bea4d6 by Alan Zimmerman at 2024-04-30T22:45:45-04:00 EPA: Fix range for GADT decl with sig only Closes #24714 - - - - - 4d78c53c by Sylvain Henry at 2024-05-01T17:23:06-04:00 Fix TH dependencies (#22229) Add a dependency between Syntax and Internal (via module reexport). - - - - - 37e38db4 by Sylvain Henry at 2024-05-01T17:23:06-04:00 Bump haddock submodule - - - - - ca13075c by Sylvain Henry at 2024-05-01T17:23:47-04:00 JS: cleanup to prepare for #24743 - - - - - 40026ac3 by Alan Zimmerman at 2024-05-01T22:45:07-04:00 EPA: Preserve comments for PrefixCon Preserve comments in fun (Con {- c1 -} a b) = undefined Closes #24736 - - - - - 92134789 by Hécate Moonlight at 2024-05-01T22:45:42-04:00 Correct `@since` metadata in HpcFlags It was introduced in base-4.20, not 4.22. Fix #24721 - - - - - a580722e by Cheng Shao at 2024-05-02T08:18:45-04:00 testsuite: fix req_target_smp predicate - - - - - ac9c5f84 by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Remove (unused)coarse grained locking. The STM code had a coarse grained locking mode guarded by #defines that was unused. This commit removes the code. - - - - - 917ef81b by Andreas Klebinger at 2024-05-02T08:18:45-04:00 STM: Be more optimistic when validating in-flight transactions. * Don't lock tvars when performing non-committal validation. * If we encounter a locked tvar don't consider it a failure. This means in-flight validation will only fail if committing at the moment of validation is *guaranteed* to fail. This prevents in-flight validation from failing spuriously if it happens in parallel on multiple threads or parallel to thread comitting. - - - - - 167a56a0 by Alan Zimmerman at 2024-05-02T08:19:22-04:00 EPA: fix span for empty \case(s) In instance SDecide Nat where SZero %~ (SSucc _) = Disproved (\case) Ensure the span for the HsLam covers the full construct. Closes #24748 - - - - - 9bae34d8 by doyougnu at 2024-05-02T15:41:08-04:00 testsuite: expand size testing infrastructure - closes #24191 - adds windows_skip, wasm_skip, wasm_arch, find_so, _find_so - path_from_ghcPkg, collect_size_ghc_pkg, collect_object_size, find_non_inplace functions to testsuite - adds on_windows and req_dynamic_ghc predicate to testsuite The design is to not make the testsuite too smart and simply offload to ghc-pkg for locations of object files and directories. - - - - - b85b1199 by Sylvain Henry at 2024-05-02T15:41:49-04:00 GHCi: support inlining breakpoints (#24712) When a breakpoint is inlined, its context may change (e.g. tyvars in scope). We must take this into account and not used the breakpoint tick index as its sole identifier. Each instance of a breakpoint (even with the same tick index) now gets a different "info" index. We also need to distinguish modules: - tick module: module with the break array (tick counters, status, etc.) - info module: module having the CgBreakInfo (info at occurrence site) - - - - - 649c24b9 by Oleg Grenrus at 2024-05-03T20:45:42-04:00 Expose constructors of SNat, SChar and SSymbol in ghc-internal - - - - - d603f199 by Mikolaj Konarski at 2024-05-03T20:46:19-04:00 Add DCoVarSet to PluginProv (!12037) - - - - - ba480026 by Serge S. Gulin at 2024-05-03T20:47:01-04:00 JS: Enable more efficient packing of string data (fixes #24706) - - - - - be1e60ee by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Track in-scope variables in ruleCheckProgram This small patch fixes #24726, by tracking in-scope variables properly in -drule-check. Not hard to do! - - - - - 58408c77 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add a couple more HasCallStack constraints in SimpleOpt Just for debugging, no effect on normal code - - - - - 70e245e8 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Add comments to Prep.hs This documentation patch fixes a TODO left over from !12364 - - - - - e5687186 by Simon Peyton Jones at 2024-05-03T20:47:37-04:00 Use HasDebugCallStack, rather than HasCallStack - - - - - 631cefec by Cheng Shao at 2024-05-03T20:48:17-04:00 driver: always merge objects when possible This patch makes the driver always merge objects with `ld -r` when possible, and only fall back to calling `ar -L` when merge objects command is unavailable. This completely reverts !8887 and !12313, given more fixes in Cabal seems to be needed to avoid breaking certain configurations and the maintainence cost is exceeding the behefits in this case :/ - - - - - 1dacb506 by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump time submodule to 1.14 As requested in #24528. ------------------------- Metric Decrease: ghc_bignum_so rts_so Metric Increase: cabal_syntax_dir rts_so time_dir time_so ------------------------- - - - - - 4941b90e by Ben Gamari at 2024-05-03T20:48:53-04:00 Bump terminfo submodule to current master - - - - - 43d48b44 by Cheng Shao at 2024-05-03T20:49:30-04:00 wasm: use scheduler.postTask() for context switch when available This patch makes use of scheduler.postTask() for JSFFI context switch when it's available. It's a more principled approach than our MessageChannel based setImmediate() implementation, and it's available in latest version of Chromium based browsers. - - - - - 08207501 by Cheng Shao at 2024-05-03T20:50:08-04:00 testsuite: give pre_cmd for mhu-perf 5x time - - - - - bf3d4db0 by Alan Zimmerman at 2024-05-03T20:50:43-04:00 EPA: Preserve comments for pattern synonym sig Closes #24749 - - - - - c49493f2 by Matthew Pickering at 2024-05-04T06:02:57-04:00 tests: Widen acceptance window for dir and so size tests These are testing things which are sometimes out the control of a GHC developer. Therefore we shouldn't fail CI if something about these dependencies change because we can't do anything about it. It is still useful to have these statistics for visualisation in grafana though. Ticket #24759 - - - - - 9562808d by Matthew Pickering at 2024-05-04T06:02:57-04:00 Disable rts_so test It has already manifested large fluctuations and destabilising CI Fixes #24762 - - - - - fc24c5cf by Ryan Scott at 2024-05-04T06:03:33-04:00 unboxedSum{Type,Data}Name: Use GHC.Types as the module Unboxed sum constructors are now defined in the `GHC.Types` module, so if you manually quote an unboxed sum (e.g., `''Sum2#`), you will get a `Name` like: ```hs GHC.Types.Sum2# ``` The `unboxedSumTypeName` function in `template-haskell`, however, mistakenly believes that unboxed sum constructors are defined in `GHC.Prim`, so `unboxedSumTypeName 2` would return an entirely different `Name`: ```hs GHC.Prim.(#|#) ``` This is a problem for Template Haskell users, as it means that they can't be sure which `Name` is the correct one. (Similarly for `unboxedSumDataName`.) This patch fixes the implementations of `unboxedSum{Type,Data}Name` to use `GHC.Types` as the module. For consistency with `unboxedTupleTypeName`, the `unboxedSumTypeName` function now uses the non-punned syntax for unboxed sums (`Sum<N>#`) as the `OccName`. Fixes #24750. - - - - - 7eab4e01 by Alan Zimmerman at 2024-05-04T16:14:55+01:00 EPA: Widen stmtslist to include last semicolon Closes #24754 - - - - - 06f7db40 by Teo Camarasu at 2024-05-05T00:19:38-04:00 doc: Fix type error in hs_try_putmvar example - - - - - af000532 by Moritz Schuler at 2024-05-05T06:30:58-04:00 Fix parsing of module names in CLI arguments closes issue #24732 - - - - - da74e9c9 by Ben Gamari at 2024-05-05T06:31:34-04:00 ghc-platform: Add Setup.hs The Hadrian bootstrapping script relies upon `Setup.hs` to drive its build. Addresses #24761. - - - - - 35d34fde by Alan Zimmerman at 2024-05-05T12:52:40-04:00 EPA: preserve comments in class and data decls Fix checkTyClHdr which was discarding comments. Closes #24755 - - - - - 03c5dfbf by Simon Peyton Jones at 2024-05-05T12:53:15-04:00 Fix a float-out error Ticket #24768 showed that the Simplifier was accidentally destroying a join point. It turned out to be that we were sending a bottoming join point to the top, accidentally abstracting over /other/ join points. Easily fixed. - - - - - adba68e7 by John Ericson at 2024-05-05T19:35:56-04:00 Substitute bindist files with Hadrian not configure The `ghc-toolchain` overhaul will eventually replace all this stuff with something much more cleaned up, but I think it is still worth making this sort of cleanup in the meantime so other untanglings and dead code cleaning can procede. I was able to delete a fair amount of dead code doing this too. `LLVMTarget_CPP` is renamed to / merged with `LLVMTarget` because it wasn't actually turned into a valid CPP identifier. (Original to 1345c7cc42c45e63ab1726a8fd24a7e4d4222467, actually.) Progress on #23966 Co-Authored-By: Sylvain Henry <hsyl20 at gmail.com> - - - - - 18f4ff84 by Alan Zimmerman at 2024-05-05T19:36:32-04:00 EPA: fix mkHsOpTyPV duplicating comments Closes #24753 - - - - - a19201d4 by Matthew Craven at 2024-05-06T19:54:29-04:00 Add test cases for #24664 ...since none are present in the original MR !12463 fixing this issue. - - - - - 46328a49 by Alan Zimmerman at 2024-05-06T19:55:05-04:00 EPA: preserve comments in data decls Closes #24771 - - - - - 3b51995c by Andrei Borzenkov at 2024-05-07T14:39:40-04:00 Rename Solo# data constructor to MkSolo# (#24673) - data Solo# a = (# a #) + data Solo# a = MkSolo# a And `(# foo #)` syntax now becomes just a syntactic sugar for `MkSolo# a`. - - - - - 4d59abf2 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Add the cmm_cpp_is_gcc predicate to the testsuite A future C-- test called T24474-cmm-override-g0 relies on the GCC-specific behaviour of -g3 implying -dD, which, in turn, leads to it emitting #defines past the preprocessing stage. Clang, at least, does not do this, so the test would fail if ran on Clang. As the behaviour here being tested is ``-optCmmP-g3'' undoing effects of the workaround we apply as a fix for bug #24474, and the workaround was for GCC-specific behaviour, the test needs to be marked as fragile on other compilers. - - - - - 25b0b404 by Arsen Arsenović at 2024-05-07T14:40:24-04:00 Split out the C-- preprocessor, and make it pass -g0 Previously, C-- was processed with the C preprocessor program. This means that it inherited flags passed via -optc. A flag that is somewhat often passed through -optc is -g. At certain -g levels (>=2), GCC starts emitting defines *after* preprocessing, for the purposes of debug info generation. This is not useful for the C-- compiler, and, in fact, causes lexer errors. We can suppress this effect (safely, if supported) via -g0. As a workaround, in older versions of GCC (<=10), GCC only emitted defines if a certain set of -g*3 flags was passed. Newer versions check the debug level. For the former, we filter out those -g*3 flags and, for the latter, we specify -g0 on top of that. As a compatible and effective solution, this change adds a C-- preprocessor distinct from the C compiler and preprocessor, but that keeps its flags. The command line produced for C-- preprocessing now looks like: $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/24474 - - - - - 9b4129a5 by Andreas Klebinger at 2024-05-08T13:24:20-04:00 -fprof-late: Only insert cost centres on functions/non-workfree cafs. They are usually useless and doing so for data values comes with a large compile time/code size overhead. Fixes #24103 - - - - - 259b63d3 by Sebastian Graf at 2024-05-08T13:24:57-04:00 Simplifier: Preserve OccInfo on DataAlt fields when case binder is dead (#24770) See the adjusted `Note [DataAlt occ info]`. This change also has a positive repercussion on `Note [Combine case alts: awkward corner]`. Fixes #24770. We now try not to call `dataConRepStrictness` in `adjustFieldsIdInfo` when all fields are lazy anyway, leading to a 2% ghc/alloc decrease in T9675. Metric Decrease: T9675 - - - - - 31b28cdb by Sebastian Graf at 2024-05-08T13:24:57-04:00 Kill seqRule, discard dead seq# in Prep (#24334) Discarding seq#s in Core land via `seqRule` was problematic; see #24334. So instead we discard certain dead, discardable seq#s in Prep now. See the updated `Note [seq# magic]`. This fixes the symptoms of #24334. - - - - - b2682534 by Rodrigo Mesquita at 2024-05-10T01:47:51-04:00 Document NcgImpl methods Fixes #19914 - - - - - 4d3acbcf by Zejun Wu at 2024-05-10T01:48:28-04:00 Make renamer to be more flexible with parens in the LHS of the rules We used to reject LHS like `(f a) b` in RULES and requires it to be written as `f a b`. It will be handy to allow both as the expression may be more readable with extra parens in some cases when infix operator is involved. Espceially when TemplateHaskell is used, extra parens may be added out of user's control and result in "valid" rules being rejected and there are not always ways to workaround it. Fixes #24621 - - - - - ab840ce6 by Ben Gamari at 2024-05-10T01:49:04-04:00 IPE: Eliminate dependency on Read Instead of encoding the closure type as decimal string we now simply represent it as an integer, eliminating the need for `Read` in `GHC.Internal.InfoProv.Types.peekInfoProv`. Closes #24504. ------------------------- Metric Decrease: T24602_perf_size size_hello_artifact ------------------------- - - - - - a9979f55 by Cheng Shao at 2024-05-10T01:49:43-04:00 testsuite: fix testwsdeque with recent clang This patch fixes compilation of testwsdeque.c with recent versions of clang, which will fail with the error below: ``` testwsdeque.c:95:33: error: warning: format specifies type 'long' but the argument has type 'void *' [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~~ ^ testwsdeque.c:95:39: error: warning: format specifies type 'int' but the argument has type 'StgWord' (aka 'unsigned long') [-Wformat] 95 | barf("FAIL: %ld %d %d", p, n, val); | ~~ ^~~ | %lu testwsdeque.c:133:42: error: error: incompatible function pointer types passing 'void (void *)' to parameter of type 'OSThreadProc *' (aka 'void *(*)(void *)') [-Wincompatible-function-pointer-types] 133 | createOSThread(&ids[n], "thief", thief, (void*)(StgWord)n); | ^~~~~ /workspace/ghc/_build/stage1/lib/../lib/x86_64-linux-ghc-9.11.20240502/rts-1.0.2/include/rts/OSThreads.h:193:51: error: note: passing argument to parameter 'startProc' here 193 | OSThreadProc *startProc, void *param); | ^ 2 warnings and 1 error generated. ``` - - - - - c2b33fc9 by Rodrigo Mesquita at 2024-05-10T01:50:20-04:00 Rename pre-processor invocation args Small clean up. Uses proper names for the various groups of arguments that make up the pre-processor invocation. - - - - - 2b1af08b by Cheng Shao at 2024-05-10T01:50:55-04:00 ghc-heap: fix typo in ghc-heap cbits - - - - - fc2d6de1 by Jade at 2024-05-10T21:07:16-04:00 Improve performance of Data.List.sort(By) This patch improves the algorithm to sort lists in base. It does so using two strategies: 1) Use a four-way-merge instead of the 'default' two-way-merge. This is able to save comparisons and allocations. 2) Use `(>) a b` over `compare a b == GT` and allow inlining and specialization. This mainly benefits types with a fast (>). Note that this *may* break instances with a *malformed* Ord instance where `a > b` is *not* equal to `compare a b == GT`. CLC proposal: https://github.com/haskell/core-libraries-committee/issues/236 Fixes #24280 ------------------------- Metric Decrease: MultiLayerModulesTH_Make T10421 T13719 T15164 T18698a T18698b T1969 T9872a T9961 T18730 WWRec T12425 T15703 ------------------------- - - - - - 1012e8aa by Matthew Pickering at 2024-05-10T21:07:52-04:00 Revert "ghcup-metadata: Drop output_name field" This reverts commit ecbf22a6ac397a791204590f94c0afa82e29e79f. This breaks the ghcup metadata generation on the nightly jobs. - - - - - daff1e30 by Jannis at 2024-05-12T13:38:35-04:00 Division by constants optimization - - - - - 413217ba by Andreas Klebinger at 2024-05-12T13:39:11-04:00 Tidy: Add flag to expose unfoldings if they take dictionary arguments. Add the flag `-fexpose-overloaded-unfoldings` to be able to control this behaviour. For ghc's boot libraries file size grew by less than 1% when it was enabled. However I refrained from enabling it by default for now. I've also added a section on specialization more broadly to the users guide. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: T12425 T13386 hard_hole_fits ------------------------- - - - - - c5d89412 by Zubin Duggal at 2024-05-13T22:19:53-04:00 Don't store a GlobalRdrEnv in `mi_globals` for GHCi. GHCi only needs the `mi_globals` field for modules imported with :module +*SomeModule. It uses this field to make the top level environment in `SomeModule` available to the repl. By default, only the first target in the command line parameters is "star" loaded into GHCi. Other modules have to be manually "star" loaded into the repl. Storing the top level GlobalRdrEnv for each module is very wasteful, especially given that we will most likely never need most of these environments. Instead we store only the information needed to reconstruct the top level environment in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements as well as all top level symbols defined in the module (not taking export lists into account) When a particular module is "star-loaded" into GHCi (as the first commandline target, or via an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using the `IfaceTopEnv`. - - - - - d65bf4a2 by Fendor at 2024-05-13T22:20:30-04:00 Add perf regression test for `-fwrite-if-simplified-core` - - - - - 2c0f8ddb by Andrei Borzenkov at 2024-05-13T22:21:07-04:00 Improve pattern to type pattern transformation (23739) `pat_to_type_pat` function now can handle more patterns: - TuplePat - ListPat - LitPat - NPat - ConPat Allowing these new constructors in type patterns significantly increases possible shapes of type patterns without `type` keyword. This patch also changes how lookups in `lookupOccRnConstr` are performed, because we need to fall back into types when we didn't find a constructor on data level to perform `ConPat` to type transformation properly. - - - - - be514bb4 by Cheng Shao at 2024-05-13T22:21:43-04:00 hadrian: fix hadrian building with ghc-9.10.1 - - - - - ad38e954 by Cheng Shao at 2024-05-13T22:21:43-04:00 linters: fix lint-whitespace compilation with ghc-9.10.1 - - - - - a593f284 by Andreas Klebinger at 2024-05-15T07:32:10-04:00 Expand the `inline` rule to look through casts/ticks. Fixes #24808 - - - - - b1e0c313 by Cheng Shao at 2024-05-15T07:32:46-04:00 testsuite: bump PartialDownSweep timeout to 5x on wasm32 - - - - - b2227487 by Fendor at 2024-05-15T17:14:06-04:00 Add Eq and Ord instance to `IfaceType` We add an `Ord` instance so that we can store `IfaceType` in a `Data.Map` container. This is required to deduplicate `IfaceType` while writing `.hi` files to disk. Deduplication has many beneficial consequences to both file size and memory usage, as the deduplication enables implicit sharing of values. See issue #24540 for more motivation. The `Ord` instance would be unnecessary if we used a `TrieMap` instead of `Data.Map` for the deduplication process. While in theory this is clerarly the better option, experiments on the agda code base showed that a `TrieMap` implementation has worse run-time performance characteristics. To the change itself, we mostly derive `Eq` and `Ord`. This requires us to change occurrences of `FastString` with `LexicalFastString`, since `FastString` has no `Ord` instance. We change the definition of `IfLclName` to a newtype of `LexicalFastString`, to make such changes in the future easier. Bump haddock submodule for IfLclName changes - - - - - d368f9a6 by Fendor at 2024-05-15T17:14:06-04:00 Move out LiteralMap to avoid cyclic module dependencies - - - - - 2fcc09fd by Fendor at 2024-05-15T17:14:06-04:00 Add deduplication table for `IfaceType` The type `IfaceType` is a highly redundant, tree-like data structure. While benchmarking, we realised that the high redundancy of `IfaceType` causes high memory consumption in GHCi sessions when byte code is embedded into the `.hi` file via `-fwrite-if-simplified-core` or `-fbyte-code-and-object-code`. Loading such `.hi` files from disk introduces many duplicates of memory expensive values in `IfaceType`, such as `IfaceTyCon`, `IfaceTyConApp`, `IA_Arg` and many more. We improve the memory behaviour of GHCi by adding an additional deduplication table for `IfaceType` to the serialisation of `ModIface`, similar to how we deduplicate `Name`s and `FastString`s. When reading the interface file back, the table allows us to automatically share identical values of `IfaceType`. To provide some numbers, we evaluated this patch on the agda code base. We loaded the full library from the `.hi` files, which contained the embedded core expressions (`-fwrite-if-simplified-core`). Before this patch: * Load time: 11.7 s, 2.5 GB maximum residency. After this patch: * Load time: 7.3 s, 1.7 GB maximum residency. This deduplication has the beneficial side effect to additionally reduce the size of the on-disk interface files tremendously. For example, on agda, we reduce the size of `.hi` files (with `-fwrite-if-simplified-core`): * Before: 101 MB on disk * Now: 24 MB on disk This has even a beneficial side effect on the cabal store. We reduce the size of the store on disk: * Before: 341 MB on disk * Now: 310 MB on disk Note, none of the dependencies have been compiled with `-fwrite-if-simplified-core`, but `IfaceType` occurs in multiple locations in a `ModIface`. We also add IfaceType deduplication table to .hie serialisation and refactor .hie file serialisation to use the same infrastrucutre as `putWithTables`. Bump haddock submodule to accomodate for changes to the deduplication table layout and binary interface. - - - - - 36aa7cf1 by Fendor at 2024-05-15T17:14:06-04:00 Add run-time configurability of `.hi` file compression Introduce the flag `-fwrite-if-compression=<n>` which allows to configure the compression level of writing .hi files. The motivation is that some deduplication operations are too expensive for the average use case. Hence, we introduce multiple compression levels with variable impact on performance, but still reduce the memory residency and `.hi` file size on disk considerably. We introduce three compression levels: * `1`: `Normal` mode. This is the least amount of compression. It deduplicates only `Name` and `FastString`s, and is naturally the fastest compression mode. * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is marginally slower than `Normal` mode. In general, it should be safe to always use `Safe` mode. * `3`: `Full` deduplication mode. Deduplicate as much as we can, resulting in minimal .hi files, but at the cost of additional compilation time. Reading .hi files doesn't need to know the initial compression level, and can always deserialise a `ModIface`, as we write out a byte that indicates the next value has been deduplicated. This allows users to experiment with different compression levels for packages, without recompilation of dependencies. Note, the deduplication also has an additional side effect of reduced memory consumption to implicit sharing of deduplicated elements. See https://gitlab.haskell.org/ghc/ghc/-/issues/24540 for example where that matters. ------------------------- Metric Decrease: MultiLayerModulesDefsGhciWithCore T16875 T21839c T24471 hard_hole_fits libdir ------------------------- - - - - - 1e63a6fb by Matthew Pickering at 2024-05-15T17:14:07-04:00 Introduce regression tests for `.hi` file sizes Add regression tests to track how `-fwrite-if-compression` levels affect the size of `.hi` files. - - - - - 639d742b by M Farkas-Dyck at 2024-05-15T17:14:49-04:00 TTG: ApplicativeStatement exist only in Rn and Tc Co-Authored-By: romes <rodrigo.m.mesquita at gmail.com> - - - - - aa7b336b by Jade at 2024-05-15T23:06:17-04:00 Documentation: Improve documentation for symbols exported from System.IO - - - - - c561de8f by Jade at 2024-05-15T23:06:54-04:00 Improve suggestions for language extensions - When suggesting Language extensions, also suggest Extensions which imply them - Suggest ExplicitForAll and GADTSyntax instead of more specific extensions - Rephrase suggestion to include the term 'Extension' - Also moves some flag specific definitions out of Session.hs into Flags.hs (#24478) Fixes: #24477 Fixes: #24448 Fixes: #10893 - - - - - 4c7ae2a1 by Andreas Klebinger at 2024-05-15T23:07:30-04:00 Testsuite: Check if llvm assembler is available for have_llvm - - - - - bc672166 by Torsten Schmits at 2024-05-15T23:08:06-04:00 refactor quadratic search in warnMissingHomeModules - - - - - 7875e8cb by Torsten Schmits at 2024-05-15T23:08:06-04:00 add test that runs MakeDepend on thousands of modules - - - - - b84b91f5 by Adam Gundry at 2024-05-16T15:32:06-04:00 Representation-polymorphic HasField (fixes #22156) This generalises the HasField class to support representation polymorphism, so that instead of type HasField :: forall {k} . k -> Type -> Type -> Constraint we have type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint - - - - - 05285090 by Matthew Pickering at 2024-05-16T15:32:43-04:00 Bump os-string submodule to 2.0.2.2 Closes #24786 - - - - - 886ab43a by Cheng Shao at 2024-05-17T01:34:50-04:00 rts: do not prefetch mark_closure bdescr in non-moving gc when ASSERTS_ENABLED This commit fixes a small an oversight in !12148: the prefetch logic in non-moving GC may trap in debug RTS because it calls Bdescr() for mark_closure which may be a static one. It's fine in non-debug RTS because even invalid bdescr addresses are prefetched, they will not cause segfaults, so this commit implements the most straightforward fix: don't prefetch mark_closure bdescr when assertions are enabled. - - - - - b38dcf39 by Teo Camarasu at 2024-05-17T01:34:50-04:00 rts: Allocate non-moving segments with megablocks Non-moving segments are 8 blocks long and need to be aligned. Previously we serviced allocations by grabbing 15 blocks, finding an aligned 8 block group in it and returning the rest. This proved to lead to high levels of fragmentation as a de-allocating a segment caused an 8 block gap to form, and this could not be reused for allocation. This patch introduces a segment allocator based around using entire megablocks to service segment allocations in bulk. When there are no free segments, we grab an entire megablock and fill it with aligned segments. As the megablock is free, we can easily guarantee alignment. Any unused segments are placed on a free list. It only makes sense to free segments in bulk when all of the segments in a megablock are freeable. After sweeping, we grab the free list, sort it, and find all groups of segments where they cover the megablock and free them. This introduces a period of time when free segments are not available to the mutator, but the risk that this would lead to excessive allocation is low. Right after sweep, we should have an abundance of partially full segments, and this pruning step is relatively quick. In implementing this we drop the logic that kept NONMOVING_MAX_FREE segments on the free list. We also introduce an eventlog event to log the amount of pruned/retained free segments. See Note [Segment allocation strategy] Resolves #24150 ------------------------- Metric Decrease: T13253 T19695 ------------------------- - - - - - 710665bd by Cheng Shao at 2024-05-17T01:35:30-04:00 rts: fix I/O manager compilation errors for win32 target This patch fixes I/O manager compilation errors for win32 target discovered when cross-compiling to win32 using recent clang: ``` rts/win32/ThrIOManager.c:117:7: error: error: call to undeclared function 'is_io_mng_native_p'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 117 | if (is_io_mng_native_p ()) { | ^ | 117 | if (is_io_mng_native_p ()) { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/fs.c:143:28: error: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] 143 | int setErrNoFromWin32Error () { | ^ | void | 143 | int setErrNoFromWin32Error () { | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:227:9: error: error: call to undeclared function 'interruptIOManagerEvent'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 227 | interruptIOManagerEvent (); | ^ | 227 | interruptIOManagerEvent (); | ^ rts/win32/ConsoleHandler.c:227:9: error: note: did you mean 'getIOManagerEvent'? | 227 | interruptIOManagerEvent (); | ^ rts/include/rts/IOInterface.h:27:10: error: note: 'getIOManagerEvent' declared here 27 | void * getIOManagerEvent (void); | ^ | 27 | void * getIOManagerEvent (void); | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) rts/win32/ConsoleHandler.c:196:9: error: error: call to undeclared function 'setThreadLabel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/win32/ConsoleHandler.c:196:9: error: note: did you mean 'postThreadLabel'? | 196 | setThreadLabel(cap, t, "signal handler thread"); | ^ rts/eventlog/EventLog.h:118:6: error: note: 'postThreadLabel' declared here 118 | void postThreadLabel(Capability *cap, | ^ | 118 | void postThreadLabel(Capability *cap, | ^ 1 error generated. `x86_64-w64-mingw32-clang' failed in phase `C Compiler'. (Exit code: 1) ``` - - - - - 28b9cee0 by Rodrigo Mesquita at 2024-05-17T01:36:05-04:00 configure: Check C99-compat for Cmm preprocessor Fixes #24815 - - - - - 8927e0c3 by Andreas Klebinger at 2024-05-17T01:36:41-04:00 Ensure `tcHasFixedRuntimeRep (# #)` returns True. - - - - - 04179044 by doyougnu at 2024-05-17T09:00:32-04:00 testsuite: make find_so regex less general Closes #24759 Background. In MR !12372 we began tracking shared object files and directories sizes for dependencies. However, this broke release builds because release builds alter the filenames swapping "in-place" for a hash. This was not considered in the MR and thus broke release pipelines. Furthermore, the rts_so test was found to be wildly varying and was therefore disabled in !12561. This commit fixes both of these issues: - fix the rts_so test by making the regex less general, now the rts_so test and all other foo.so tests must match "libHS<some-lib>-<version>-<hash|'in-place>-<ghc>". This prevents the rts_so test from accidentally matching different rts variants such as rts_threaded, which was the cause of the wild swings after !12372. - add logic to match either a hash or the string in-place. This should make the find_so function build agnostic. - - - - - 0962b50d by Andreas Klebinger at 2024-05-17T09:01:08-04:00 TagAnalysis: Treat all bottom ids as tagged during analysis. Ticket #24806 showed that we also need to treat dead end thunks as tagged during the analysis. - - - - - 7eb9f184 by Ben Gamari at 2024-05-17T11:23:37-04:00 Remove haddock submodule In preparation for merge into the GHC, as proposed in #23178. - - - - - 47b14dcc by Fendor at 2024-05-17T11:28:17-04:00 Adapt to `IfLclName` newtype changes (cherry picked from commit a711607e29b925f3d69e27c5fde4ba655c711ff1) - - - - - 6cc6681d by Fendor at 2024-05-17T11:28:17-04:00 Add IfaceType deduplication table to interface file serialisation Although we do not really need it in the interface file serialisation, as the deserialisation uses `getWithUserData`, we need to mirror the structure `getWithUserData` expects. Thus, we write essentially an empty `IfaceType` table at the end of the file, as the interface file doesn't reference `IfaceType`. (cherry picked from commit c9bc29c6a708483d2abc3d8ec9262510ce87ca61) - - - - - b9721206 by Ben Gamari at 2024-05-17T11:30:22-04:00 ghc-tags.yaml: Initial commit - - - - - 074e7d8f by Ben Gamari at 2024-05-17T11:31:29-04:00 fourmolu: Add configuration - - - - - 151b1736 by Ben Gamari at 2024-05-17T11:32:52-04:00 Makefile: Rework for use by haddock developers Previously the Makefile was present only for GHC's old make-based build system. Now since the make-based build system is gone we can use it for more useful ends. - - - - - a7dcf13b by Ben Gamari at 2024-05-17T11:36:14-04:00 Reformat with fourmolu Using previously-added configuration and `fourmolu -i .` Note that we exclude the test-cases (`./{hoogle,html-hypsrc,latex}-test`) as they are sensitive to formatting. - - - - - 0ea6017b by Ben Gamari at 2024-05-17T11:40:04-04:00 Add 'utils/haddock/' from commit 'a7dcf13bfbb97b20e75cc8ce650e2bb628db4660' git-subtree-dir: utils/haddock git-subtree-mainline: 7eb9f1849b1c72a1c61dee88462b4244550406f3 git-subtree-split: a7dcf13bfbb97b20e75cc8ce650e2bb628db4660 - - - - - aba1d304 by Hécate Moonlight at 2024-05-17T11:40:48-04:00 Add exceptions to the dangling notes list - - - - - 527bfbfb by Hécate Moonlight at 2024-05-17T11:40:52-04:00 Add haddock to the whitespace lint ignore list - - - - - 43274677 by Ben Gamari at 2024-05-17T11:41:20-04:00 git-blame-ignore-revs: Ignore haddock reformatting - - - - - 0e679e37 by Fendor at 2024-05-18T00:27:24-04:00 Pass cpp options to the CC builder in hadrian - - - - - bb40244e by Sylvain Henry at 2024-05-18T00:28:06-04:00 JS: fix allocation constant (fix #24746) - - - - - 646d30ab by Jade at 2024-05-18T19:23:31+02:00 Add highlighting for inline-code snippets in haddock - - - - - 64459a3e by Hécate Moonlight at 2024-05-19T08:42:27-04:00 haddock: Add a .readthedocs.yml file for online documentation - - - - - 7d3d9bbf by Serge S. Gulin at 2024-05-19T18:47:05+00:00 Unicode: General Category size test (related #24789) Added trivial size performance test which involves unicode general category usage via `read`. The `read` itself uses general category to detect spaces. The purpose for this test is to measure outcome of applying improvements at General Category representation in code discussed at #24789. - - - - - 8e04efcf by Alan Zimmerman at 2024-05-19T21:29:34-04:00 EPA: Remove redundant code Remove unused epAnnAnns function various cases for showAstData that no longer exist - - - - - 071d7a1e by Rodrigo Mesquita at 2024-05-20T10:55:16-04:00 Improve docs on closed type families in hs-boots Fixes #24776 - - - - - d9e2c119 by Torsten Schmits at 2024-05-20T10:55:52-04:00 Use default deviation for large-project test This new performance test has the purpose of detecting regressions in complexity in relation to the number of modules in a project, so 1% deviation is way too small to avoid false positives. - - - - - 20b0136a by Ben Gamari at 2024-05-22T00:31:39-04:00 ghcup-metadata: Various fixes from 9.10.1 Use Debian 12/x86-64, Debian 10/aarch64, and Debian 11/aarch64 bindists where possible. - - - - - 6838a7c3 by Sylvain Henry at 2024-05-22T00:32:23-04:00 Reverse arguments to stgCallocBytes (fix #24828) - - - - - f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00 Add log messages for Iface serialisation compression level Fix the label of the number of 'IfaceType' entries in the log message. Add log message for the compression level that is used to serialise a an interface file. Adds `Outputable` instance for 'CompressionIFace'. - - - - - 3bad5d55 by Hécate Moonlight at 2024-05-22T00:33:40-04:00 base: Update doctests outputs ghc-internal: Update doctests outputs - - - - - 9317c6fb by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix the testsuites of the haddock-library - Apply all the metadata revisions from Hackage to the cabal file. - Fix the `ParserSpec.hs` file in the `spec` testsuite of haddock-library. - Make `CHANGES.md` an extra-doc-file instead of an extra-source-file. - - - - - 54073b02 by David Binder at 2024-05-22T00:34:21-04:00 haddock: Fix parser of @since pragma The testsuite contained tests for annotations of the form `@since foo-bar-0.5.0`, but the parser was written incorrectly. - - - - - ede6ede3 by Matthew Pickering at 2024-05-22T00:34:57-04:00 Fix nightly pages job It seems likely broken by 9f99126a which moved `index.html` from the root folder into `docs/` folder. Fixes #24840 - - - - - b7bcf729 by Cheng Shao at 2024-05-22T00:35:32-04:00 autoconf: remove unused context diff check This patch removes redundant autoconf check for the context diff program given it isn't actually been used anywhere, especially since make removal. - - - - - ea2fe66e by Hécate Moonlight at 2024-05-22T00:36:13-04:00 haddock: Rework the contributing guide - - - - - 0f302a94 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 haddock: Add module relationships diagrams of haddock-api and haddock-library - - - - - d1a9f34f by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add instructions - - - - - b880ee80 by Hécate Moonlight at 2024-05-22T00:36:52-04:00 Add SVG outputs - - - - - 6d7e6ad8 by Ben Gamari at 2024-05-22T13:40:05-04:00 rts: Fix size of StgOrigThunkInfo frames Previously the entry code of the `stg_orig_thunk` frame failed to account for the size of the profiling header as it hard-coded the frame size. Fix this. Fixes #24809. - - - - - c645fe40 by Fendor at 2024-05-22T13:40:05-04:00 Add regression test T24809 for stg_orig_thunk_info_frame size - - - - - 4181aa40 by Andreas Klebinger at 2024-05-22T13:40:42-04:00 bindists: Check for existence of share folder before trying to copy it. This folder isn't distributed in windows bindists A lack of doing so resulted us copying loads of files twice. - - - - - d216510e by Matthew Pickering at 2024-05-22T13:40:42-04:00 Remove ad-hoc installation of mingw toolchain in relocatable bindists This reverts 616ac30026e8dd7d2ebb98d92dde071eedf5d951 The choice about whether to install mingw is taken in the installation makefile. This is also broken on non-windows systems. The actual issue was the EnableDistroToolchain variable wasn't declared in mk/config.mk and therefore the check to install mingw was failing. - - - - - 7b4c1998 by Cheng Shao at 2024-05-22T21:52:52-04:00 testsuite: fix T17920 for wasm backend T17920 was marked as fragile on wasm before; it can be trivially fixed by avoiding calling variadic printf() in cmm. - - - - - c739383b by Cheng Shao at 2024-05-22T21:53:29-04:00 testsuite: bump T22744 timeout to 5x - - - - - c4c6d714 by Cheng Shao at 2024-05-22T21:54:06-04:00 testsuite: don't attempt to detect host cpu features when testing cross ghc The testsuite driver CPU feature detection logic only detects host CPU and only makes sense when we are not testing a cross GHC. - - - - - 3d9e4ce6 by Simon Peyton Jones at 2024-05-22T21:54:43-04:00 Better skolemisation As #24810 showed, it is (a little) better to skolemise en-bloc, so that Note [Let-bound skolems] fires more often. See Note [Skolemisation en bloc] in GHC.Tc.Utils.Instantiate. - - - - - a3cd3a1d by Ryan Scott at 2024-05-22T21:55:19-04:00 Add missing parenthesizePat in cvtp We need to ensure that the output of `cvtp` is parenthesized (at precedence `sigPrec`) so that any pattern signatures with a surrounding pattern signature can parse correctly. Fixes #24837. - - - - - 4bb2a7cc by Hécate Moonlight at 2024-05-22T21:55:59-04:00 [base] Document the memory overhead of ByteArray Add a diagram that shows the constituent parts of a ByteArray and their memory overhead. - - - - - 8b2a016a by Hécate Moonlight at 2024-05-22T21:56:38-04:00 Haddock: Add MR template for Haddock - - - - - ead75532 by Peter Trommler at 2024-05-23T02:28:05-04:00 PPC: Support ELF v2 on powerpc64 big-endian Detect ELF v2 on PowerPC 64-bit systems. Check for `_CALL_ELF` preprocessor macro. Fixes #21191 - - - - - 9d4c10f2 by Hécate Kleidukos at 2024-05-23T02:28:44-04:00 gitlab: Add @Kleidukos to CODEOWNERS for utils/haddock - - - - - 28e64170 by Preetham Gujjula at 2024-05-23T07:20:48-04:00 haddock: Add cabal-fmt to tools for `make style` - - - - - 00126a89 by Andrei Borzenkov at 2024-05-23T07:21:24-04:00 haddock: fix verbosity option parsing - - - - - a3e0b68b by Ryan Hendrickson at 2024-05-23T15:52:03-04:00 base: specify tie-breaking behavior of min, max, and related list/Foldable functions - - - - - bdcc0f37 by doyougnu at 2024-05-24T07:51:18-04:00 cmm: add word <-> double/float bitcast - closes: #25331 This is the last step in the project plan described in #25331. This commit: - adds bitcast operands for x86_64, LLVM, aarch64 - For PPC and i386 we resort to using the cmm implementations - renames conversion MachOps from Conv to Round|Truncate - - - - - f0d257f7 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor Some functions in StgToByteCode were filtering out void arguments. However, StgToByteCode is called after unarisation: the void arguments should have been removed earlier. Instead of filtering out, we assert that the args are non-void. - - - - - 03137fd2 by Krzysztof Gogolewski at 2024-05-24T07:51:55-04:00 StgToByteCode: minor refactor `layoutNativeCall` was always called with a `primRepCmmType platform` callback. Hence we can put it inside of `layoutNativeCall` rather than repeat it. - - - - - 27c430f3 by David Binder at 2024-05-24T07:52:38-04:00 haddock: Remove compatibility shims for GHC < 8.4 from haddock-library - - - - - 8dd8a076 by Cheng Shao at 2024-05-24T07:53:14-04:00 compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs This patch makes the STG->Cmm backend avoid saving foreign call target to local when there are no caller-save GlobalRegs. Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a foreign call, we unconditionally save the foreign call target to a temporary local first, then rely on cmmSink to clean it up later, which only happens with -fcmm-sink (implied by -O) and not in unoptimized code. And this is troublesome for the wasm backend NCG, which needs to infer a foreign call target symbol's type signature from the Cmm call site. Previously, the NCG has been emitting incorrect type signatures for unoptimized code, which happens to work with `wasm-ld` most of the time, but this is never future-proof against upstream toolchain updates, and it causes horrible breakages when LTO objects are included in linker input. Hence this patch. - - - - - 986df1ab by Cheng Shao at 2024-05-24T07:53:14-04:00 testsuite: add callee-no-local regression test - - - - - 52d62e2a by Sylvain Henry at 2024-05-24T07:53:57-04:00 Fix HasCallStack leftovers from !12514 / #24726 - - - - - c5e00c35 by crumbtoo at 2024-05-24T07:54:38-04:00 user_guide: Fix typo in MultiWayIf chapter Close #24829 - - - - - bd323b0e by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Ensure that CHANGELOG is included in extra-source-files This was missed in the `ghc-internal` split. Closes #24831. - - - - - 1bfd32e8 by Ben Gamari at 2024-05-24T07:55:15-04:00 base: Fix changelog reference to setBacktraceMechanismState (cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d) - - - - - 43e8e4f3 by Sylvain Henry at 2024-05-24T12:16:43-04:00 Float/double unboxed literal support for HexFloatLiterals (fix #22155) - - - - - 4a7f4713 by Fendor at 2024-05-24T12:17:19-04:00 Improve test labels for binary interface file size tests Test labels for binary interface file sizes are hard to read and overly verbose at the same time. Extend the name for the metric title, but shorten it in the actual comparison table. - - - - - 14e554cf by Zubin Duggal at 2024-05-24T12:17:55-04:00 Revert "Fix haskell/haddock#783 Don't show button if --quickjump not present" This reverts commit 7776566531e72c415f66dd3b13da9041c52076aa. - - - - - f56838c3 by Ben Gamari at 2024-05-24T12:17:55-04:00 Fix default hyperlinked sources pattern Previously this didn't include the `%M` token which manifested as broken links to the hyperlinked sources of reexports of declarations defined in other packages. Fixes haddock#1628. (cherry picked from commit 1432bcc943d41736eca491ecec4eb9a6304dab36) - - - - - 42efa62c by Ben Gamari at 2024-05-24T12:17:55-04:00 Make DocPaths a proper data type (cherry picked from commit 7f3a5c4da0023ae47b4c376c9b1ea2d706c94d8c) - - - - - 53d9ceb3 by Ben Gamari at 2024-05-24T12:17:55-04:00 haddock: Bump version to 2.30 (cherry picked from commit 994989ed3d535177e57b778629726aeabe8c7602) - - - - - e4db1112 by Zubin Duggal at 2024-05-24T12:17:55-04:00 haddock-api: allow base 4.20 and ghc 9.11 - - - - - e294f7a2 by PHO at 2024-05-24T12:17:55-04:00 Add a flag "threaded" for building haddock with the threaded RTS GHC isn't guaranteed to have a threaded RTS. There should be a way to build it with the vanilla one. (cherry picked from commit 75a94e010fb5b0236c670d22b04f5472397dc15d) - - - - - 51165bc9 by Andreas Klebinger at 2024-05-25T10:58:03-04:00 Update ticky counter event docs. Add the info about the info table address and json fields. Fixes #23200 - - - - - 98597ad5 by Sylvain Henry at 2024-05-25T10:58:45-04:00 Export extractPromotedList (#24866) This can be useful in plugins. - - - - - 228dcae6 by Teo Camarasu at 2024-05-28T13:12:24+00:00 template-haskell: Move wired-ins to ghc-internal Thus we make `template-haskell` reinstallable and keep it as the public API for Template Haskell. All of the wired-in identifiers are moved to `ghc-internal`. This necessitates also moving much of `ghc-boot-th` into `ghc-internal`. These modules are then re-exported from `ghc-boot-th` and `template-haskell`. To avoid a dependency on `template-haskell` from `lib:ghc`, we instead depend on the TH ASTs via `ghc-boot-th`. As `template-haskell` no longer has special status, we can drop the logic adding an implicit dependency on `template-haskell` when using TH. We can also drop the `template-haskell-next` package, which was previously used when bootstrapping. When bootstrapping, we need to vendor the TH AST modules from `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap` cabal flag as before. See Note [Bootstrapping Template Haskell]. We split out a GHC.Internal.TH.Lift module resolving #24752. This module is only built when not bootstrapping. Resolves #24703 ------------------------- Metric Increase: ghc_boot_th_dir ghc_boot_th_so ------------------------- - - - - - 62dded28 by Teo Camarasu at 2024-05-28T13:12:24+00:00 testsuite: mark tests broken by #24886 Now that `template-haskell` is no longer wired-in. These tests are triggering #24886, and so need to be marked broken. - - - - - 3ca72ad9 by Cheng Shao at 2024-05-30T02:57:06-04:00 rts: fix missing function prototypes in ClosureMacros.h - - - - - e0029e3d by Andreas Klebinger at 2024-05-30T02:57:43-04:00 UnliftedFFITypes: Allow `(# #)` as argument when it's the only argument. This allows representing functions like: int foo(void); to be imported like this: foreign import ccall "a_number_c" c_number :: (# #) -> Int64# Which can be useful when the imported function isn't implicitly stateful. - - - - - d0401335 by Matthew Pickering at 2024-05-30T02:58:19-04:00 ci: Update ci-images commit for fedora38 image The fedora38 nightly job has been failing for quite a while because `diff` was no longer installed. The ci-images bump explicitly installs `diffutils` into these images so hopefully they now pass again. - - - - - 3c97c74a by Jan Hrček at 2024-05-30T02:58:58-04:00 Update exactprint docs - - - - - 77760cd7 by Jan Hrček at 2024-05-30T02:58:58-04:00 Incorporate review feedback - - - - - 87591368 by Jan Hrček at 2024-05-30T02:58:58-04:00 Remove no longer relevant reference to comments - - - - - 05f4f142 by Jan Hrček at 2024-05-30T02:58:59-04:00 Replace outdated code example - - - - - 45a4a5f3 by Andreas Klebinger at 2024-05-30T02:59:34-04:00 Reword error resulting from missing -XBangPatterns. It can be the result of either a bang pattern or strict binding, so now we say so instead of claiming it must be a bang pattern. Fixes #21032 - - - - - e17f2df9 by Cheng Shao at 2024-05-30T03:00:10-04:00 testsuite: bump MultiLayerModulesDefsGhciReload timeout to 10x - - - - - 7a660042 by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: ensure gc_thread/gen_workspace is allocated with proper alignment gc_thread/gen_workspace are required to be aligned by 64 bytes. However, this property has not been properly enforced before, and numerous alignment violations at runtime has been caught by UndefinedBehaviorSanitizer that look like: ``` rts/sm/GC.c:1167:8: runtime error: member access within misaligned address 0x0000027a3390 for type 'gc_thread' (aka 'struct gc_thread_'), which requires 64 byte alignment 0x0000027a3390: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1167:8 rts/sm/GC.c:1184:13: runtime error: member access within misaligned address 0x0000027a3450 for type 'gen_workspace' (aka 'struct gen_workspace_'), which requires 64 byte alignment 0x0000027a3450: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/GC.c:1184:13 ``` This patch fixes the gc_thread/gen_workspace misalignment issue by explicitly allocating them with alignment constraint. - - - - - c77a48af by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: fix an unaligned load in nonmoving gc This patch fixes an unaligned load in nonmoving gc by ensuring the closure address is properly untagged first before attempting to prefetch its header. The unaligned load is reported by UndefinedBehaviorSanitizer: ``` rts/sm/NonMovingMark.c:921:9: runtime error: member access within misaligned address 0x0042005f3a71 for type 'StgClosure' (aka 'struct StgClosure_'), which requires 8 byte alignment 0x0042005f3a71: note: pointer points here 00 00 00 98 43 13 8e 12 7f 00 00 50 3c 5f 00 42 00 00 00 58 17 b7 92 12 7f 00 00 89 cb 5e 00 42 ^ SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/sm/NonMovingMark.c:921:9 ``` This issue had previously gone unnoticed since it didn't really harm runtime correctness, the invalid header address directly loaded from a tagged pointer is only used as prefetch address and will not cause segfaults. However, it still should be corrected because the prefetch would be rendered useless by this issue, and untagging only involves a single bitwise operation without memory access so it's cheap enough to add. - - - - - 05c4fafb by Cheng Shao at 2024-05-30T14:42:29-04:00 rts: use __builtin_offsetof to implement STG_FIELD_OFFSET This patch fixes the STG_FIELD_OFFSET macro definition by using __builtin_offsetof, which is what gcc/clang uses to implement offsetof in standard C. The previous definition that uses NULL pointer involves subtle undefined behavior in C and thus reported by UndefinedBehaviorSanitizer as well: ``` rts/Capability.h:243:58: runtime error: member access within null pointer of type 'Capability' (aka 'struct Capability_') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Capability.h:243:58 ``` - - - - - 5ff83bfc by Sylvain Henry at 2024-05-30T14:43:10-04:00 JS: remove useless h$CLOCK_REALTIME (#23202) - - - - - 95ef2d58 by Matthew Pickering at 2024-05-30T14:43:47-04:00 ghcup-metadata: Fix metadata generation There were some syntax errors in the generation script which were preventing it from running. I have tested this with: ``` nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="2024-05-27" --pipeline-id=95534 --version=9.11.20240525 ``` which completed successfully. - - - - - 1bc66ee4 by Jakob Bruenker at 2024-05-30T14:44:22-04:00 Add diagrams to Arrows documentation This adds diagrams to the documentation of Arrows, similar to the ones found on https://www.haskell.org/arrows/. It does not add diagrams for ArrowChoice for the time being, mainly because it's not clear to me how to visually distinguish them from the ones for Arrow. Ideally, you might want to do something like highlight the arrows belonging to the same tuple or same Either in common colors, but that's not really possible with unicode. - - - - - d10a1c65 by Matthew Craven at 2024-05-30T23:35:48-04:00 Make UnsafeSNat et al. into pattern synonyms ...so that they do not cause coerce to bypass the nominal role on the corresponding singleton types when they are imported. See Note [Preventing unsafe coercions for singleton types] and the discussion at #23478. This also introduces unsafeWithSNatCo (and analogues for Char and Symbol) so that users can still access the dangerous coercions that importing the real constructors would allow, but only in a very localized way. - - - - - 0958937e by Cheng Shao at 2024-05-30T23:36:25-04:00 hadrian: build C/C++ with split sections when enabled When split sections is enabled, ensure -fsplit-sections is passed to GHC as well when invoking GHC to compile C/C++; and pass -ffunction-sections -fdata-sections to gcc/clang when compiling C/C++ with the hadrian Cc builder. Fixes #23381. - - - - - 02b1f91e by Cheng Shao at 2024-05-30T23:36:25-04:00 driver: build C/C++ with -ffunction-sections -fdata-sections when split sections is enabled When -fsplit-sections is passed to GHC, pass -ffunction-sections -fdata-sections to gcc/clang when building C/C++. Previously, -fsplit-sections was only respected by the NCG/LLVM backends, but not the unregisterised backend; the GHC driver did not pass -fdata-sections and -ffunction-sections to the C compiler, which resulted in excessive executable sizes. Fixes #23381. ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - fd47e2e3 by Cheng Shao at 2024-05-30T23:37:00-04:00 testsuite: mark process005 as fragile on JS - - - - - 34a04ea1 by Matthew Pickering at 2024-05-31T06:08:36-04:00 Add -Wderiving-typeable to -Wall Deriving `Typeable` does nothing, and it hasn't done for a long while. There has also been a warning for a long while which warns you about uselessly deriving it but it wasn't enabled in -Wall. Fixes #24784 - - - - - 75fa7b0b by Matthew Pickering at 2024-05-31T06:08:36-04:00 docs: Fix formatting of changelog entries - - - - - 303c4b33 by Preetham Gujjula at 2024-05-31T06:09:21-04:00 docs: Fix link to injective type families paper Closes #24863 - - - - - df97e9a6 by Ben Gamari at 2024-05-31T06:09:57-04:00 ghc-internal: Fix package description The previous description was inherited from `base` and was inappropriate for `ghc-internal`. Also fix the maintainer and bug reporting fields. Closes #24906. - - - - - bf0737c0 by Cheng Shao at 2024-05-31T06:10:33-04:00 compiler: remove ArchWasm32 special case in cmmDoCmmSwitchPlans This patch removes special consideration for ArchWasm32 in cmmDoCmmSwitchPlans, which means the compiler will now disable cmmImplementSwitchPlans for wasm unreg backend, just like unreg backend of other targets. We enabled it in the past to workaround some compile-time panic in older versions of LLVM, but those panics are no longer present, hence no need to keep this workaround. - - - - - 7eda4bd2 by Cheng Shao at 2024-05-31T15:52:04-04:00 utils: add hie.yaml config file for ghc-config Add hie.yaml to ghc-config project directory so it can be edited using HLS. - - - - - 1e5752f6 by Cheng Shao at 2024-05-31T15:52:05-04:00 hadrian: handle findExecutable "" gracefully hadrian may invoke findExecutable "" at run-time due to a certain program is not found by configure script. Which is fine and findExecutable is supposed to return Nothing in this case. However, on Windows there's a directory bug that throws an exception (see https://github.com/haskell/directory/issues/180), so we might as well use a wrapper for findExecutable and handle exceptions gracefully. - - - - - 4eb5ad09 by Cheng Shao at 2024-05-31T15:52:05-04:00 configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails When configure fails to find LLC/OPT/LLVMAS within supported version range, it used to set "llc"/"opt"/"clang" as fallback values. This behavior is particularly troublesome when the user has llc/opt/clang with other versions in their PATH and run the testsuite, since hadrian will incorrectly assume have_llvm=True and pass that to the testsuite driver, resulting in annoying optllvm test failures (#23186). If configure determines llc/opt/clang wouldn't work, then we shouldn't pretend it'll work at all, and the bindist configure will invoke FIND_LLVM_PROG check again at install time anyway. - - - - - 5f1afdf7 by Sylvain Henry at 2024-05-31T15:52:52-04:00 Introduce UniqueSet and use it to replace 'UniqSet Unique' 'UniqSet Unique' represents a set of uniques as a 'Map Unique Unique', which is wasting space (associated key/value are always the same). Fix #23572 and #23605 - - - - - e0aa42b9 by crumbtoo at 2024-05-31T15:53:33-04:00 Improve template-haskell haddocks Closes #15822 - - - - - ae170155 by Olivier Benz at 2024-06-01T09:35:17-04:00 Bump max LLVM version to 19 (not inclusive) - - - - - 92aa65ea by Matthew Pickering at 2024-06-01T09:35:17-04:00 ci: Update CI images to test LLVM 18 The debian12 image in this commit has llvm 18 installed. - - - - - adb1fe42 by Serge S. Gulin at 2024-06-01T09:35:53-04:00 Unicode: make ucd2haskell build-able again ucd2haskell tool used streamly library which version in cabal was out of date. It is updated to the latest version at hackage with deprecated parts rewritten. Also following fixes were applied to existing code in suppose that from its last run the code structure was changed and now it was required to be up to date with actual folder structures: 1. Ghc module path environment got a suffix with `src`. 2. Generated code got 2.1 `GHC.Internal` prefix for `Data.*`. 2.2 `GHC.Unicode.Internal` swapped on `GHC.Internal.Unicode` according to actual structure. - - - - - ad56fd84 by Jade at 2024-06-01T09:36:29-04:00 Replace 'NB' with 'Note' in error messages - - - - - 6346c669 by Cheng Shao at 2024-06-01T09:37:04-04:00 compiler: fix -ddump-cmm-raw when compiling .cmm This patch fixes missing -ddump-cmm-raw output when compiling .cmm, which is useful for debugging cmm related codegen issues. - - - - - 1c834ad4 by Ryan Scott at 2024-06-01T09:37:40-04:00 Print namespace specifiers in FixitySig's Outputable instance For whatever reason, the `Outputable` instance for `FixitySig` simply did not print out namespace specifiers, leading to the confusing `-ddump-splices` output seen in #24911. This patch corrects this oversight. Fixes #24911. - - - - - cf49fb5f by Sylvain Henry at 2024-06-01T09:38:19-04:00 Configure: display C++ compiler path - - - - - f9c1ae12 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable PIC for in-tree GMP on wasm32 This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. - - - - - 1a32f828 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: disable in-tree gmp fft code path for wasm32 This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. - - - - - 06277d56 by Cheng Shao at 2024-06-02T14:01:55-04:00 hadrian: build in-tree GMP with malloc-notreentrant on wasm32 This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. - - - - - 9f614270 by ARATA Mizuki at 2024-06-02T14:02:35-04:00 Set package include paths when assembling .S files Fixes #24839. Co-authored-by: Sylvain Henry <hsyl20 at gmail.com> - - - - - 4998a6ed by Alex Mason at 2024-06-03T02:09:29-04:00 Improve performance of genericWordQuotRem2Op (#22966) Implements the algorithm from compiler-rt's udiv128by64to64default. This rewrite results in a roughly 24x improvement in runtime on AArch64 (and likely any other arch that uses it). - - - - - ae50a8eb by Cheng Shao at 2024-06-03T02:10:05-04:00 testsuite: mark T7773 as fragile on wasm - - - - - c8ece0df by Fendor at 2024-06-03T19:43:22-04:00 Migrate `Finder` component to `OsPath`, fixed #24616 For each module in a GHCi session, we keep alive one `ModLocation`. A `ModLocation` is fairly inefficiently packed, as `String`s are expensive in memory usage. While benchmarking the agda codebase, we concluded that we keep alive around 11MB of `FilePath`'s, solely retained by `ModLocation`. We provide a more densely packed encoding of `ModLocation`, by moving from `FilePath` to `OsPath`. Further, we migrate the full `Finder` component to `OsPath` to avoid unnecessary transformations. As the `Finder` component is well-encapsulated, this requires only a minimal amount of changes in other modules. We introduce pattern synonym for 'ModLocation' which maintains backwards compatibility and avoids breaking consumers of 'ModLocation'. - - - - - 0cff083a by Cheng Shao at 2024-06-03T19:43:58-04:00 compiler: emit NaturallyAligned when element type & index type are the same width This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. - - - - - 18f63970 by Sebastian Graf at 2024-06-04T05:05:27-04:00 Parser: Remove unused `apats` rule - - - - - 38757c30 by David Knothe at 2024-06-04T05:05:27-04:00 Implement Or Patterns (#22596) This commit introduces a new language extension, `-XOrPatterns`, as described in GHC Proposal 522. An or-pattern `pat1; ...; patk` succeeds iff one of the patterns `pat1`, ..., `patk` succeed, in this order. See also the summary `Note [Implmentation of OrPatterns]`. Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com> - - - - - 395412e8 by Cheng Shao at 2024-06-04T05:06:04-04:00 compiler/ghci/rts: remove stdcall support completely We have formally dropped i386 windows support (#18487) a long time ago. The stdcall foreign call convention is only used by i386 windows, and the legacy logic around it is a significant maintenance burden for future work that adds arm64 windows support (#24603). Therefore, this patch removes stdcall support completely from the compiler as well as the RTS (#24883): - stdcall is still recognized as a FFI calling convention in Haskell syntax. GHC will now unconditionally emit a warning (-Wunsupported-calling-conventions) and treat it as ccall. - Apart from minimum logic to support the parsing and warning logic, all other code paths related to stdcall has been completely stripped from the compiler. - ghci only supports FFI_DEFAULT_ABI and ccall convention from now on. - FFI foreign export adjustor code on all platforms no longer handles the stdcall case and only handles ccall from now on. - The Win32 specific parts of RTS no longer has special code paths for stdcall. This commit is the final nail on the coffin for i386 windows support. Further commits will perform more housecleaning to strip the legacy code paths and pave way for future arm64 windows support. - - - - - d1fe9ab6 by Cheng Shao at 2024-06-04T05:06:04-04:00 rts: remove legacy i386 windows code paths This commit removes some legacy i386 windows related code paths in the RTS, given this target is no longer supported. - - - - - a605e4b2 by Cheng Shao at 2024-06-04T05:06:04-04:00 autoconf: remove i386 windows related logic This commit removes legacy i386 windows logic in autoconf scripts. - - - - - 91e5ac5e by Cheng Shao at 2024-06-04T05:06:04-04:00 llvm-targets: remove i386 windows support This commit removes i386 windows from llvm-targets and the script to generate it. - - - - - 65fe75a4 by Cheng Shao at 2024-06-04T05:06:04-04:00 libraries/utils: remove stdcall related legacy logic This commit removes stdcall related legacy logic in libraries and utils. ccall should be used uniformly for all supported windows hosts from now on. - - - - - d2a83302 by Cheng Shao at 2024-06-04T05:06:04-04:00 testsuite: adapt the testsuite for stdcall removal This patch adjusts test cases to handle the stdcall removal: - Some stdcall usages are replaced with ccall since stdcall doesn't make sense anymore. - We also preserve some stdcall usages, and check in the expected warning messages to ensure GHC always warn about stdcall usages (-Wunsupported-calling-conventions) as expected. - Error code testsuite coverage is slightly improved, -Wunsupported-calling-conventions is now tested. - Obsolete code paths related to i386 windows are also removed. - - - - - cef8f47a by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: minor adjustments for stdcall removal This commit include minor adjustments of documentation related to stdcall removal. - - - - - 54332437 by Cheng Shao at 2024-06-04T05:06:04-04:00 docs: mention i386 Windows removal in 9.12 changelog This commit mentions removal of i386 Windows support and stdcall related change in the 9.12 changelog. - - - - - 2aaea8a1 by Cheng Shao at 2024-06-04T05:06:40-04:00 hadrian: improve user settings documentation This patch adds minor improvements to hadrian user settings documentation: - Add missing `ghc.cpp.opts` case - Remove non-existent `cxx` case - Clarify `cc.c.opts` also works for C++, while `cc.deps.opts` doesn't - Add example of passing configure argument to autoconf packages - - - - - 71010381 by Alex Mason at 2024-06-04T12:09:07-04:00 Add AArch64 CLZ, CTZ, RBIT primop implementations. Adds support for emitting the clz and rbit instructions, which are used by GHC.Prim.clz*#, GHC.Prim.ctz*# and GHC.Prim.bitReverse*#. - - - - - 44e2abfb by Cheng Shao at 2024-06-04T12:09:43-04:00 hadrian: add +text_simdutf flavour transformer to allow building text with simdutf This patch adds a +text_simdutf flavour transformer to hadrian to allow downstream packagers and users that build from source to opt-in simdutf support for text, in order to benefit from SIMD speedup at run-time. It's still disabled by default for the time being. - - - - - 077cb2e1 by Cheng Shao at 2024-06-04T12:09:43-04:00 ci: enable +text_simdutf flavour transformer for wasm jobs This commit enables +text_simdutf flavour transformer for wasm jobs, so text is now built with simdutf support for wasm. - - - - - b23746ad by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Use TemplateHaskellQuotes in instance Lift ByteArray Resolves #24852 - - - - - 3fd25743 by Teo Camarasu at 2024-06-04T22:50:50-04:00 base: Mark addrToByteArray as NOINLINE This function should never be inlined in order to keep code size small. - - - - - 98ad1ea5 by Cheng Shao at 2024-06-04T22:51:26-04:00 compiler: remove unused CompilerInfo/LinkerInfo types This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. - - - - - 11795244 by Cheng Shao at 2024-06-05T06:33:17-04:00 rts: remove unused PowerPC/IA64 native adjustor code This commit removes unused PowerPC/IA64 native adjustor code which is never actually enabled by autoconf/hadrian. Fixes #24920. - - - - - 5132754b by Sylvain Henry at 2024-06-05T06:33:57-04:00 RTS: fix warnings with doing*Profiling (#24918) - - - - - accc8c33 by Cheng Shao at 2024-06-05T11:35:36-04:00 hadrian: don't depend on inplace/mingw when --enable-distro-toolchain on Windows - - - - - 6ffbd678 by Cheng Shao at 2024-06-05T11:35:37-04:00 autoconf: normalize paths of some build-time dependencies on Windows This commit applies path normalization via cygpath -m to some build-time dependencies on Windows. Without this logic, the /clang64/bin prefixed msys2-style paths cause the build to fail with --enable-distro-toolchain. - - - - - 075dc6d4 by Cheng Shao at 2024-06-05T11:36:12-04:00 hadrian: remove OSDarwin mention from speedHack This commit removes mentioning of OSDarwin from speedHack, since speedHack is purely for i386 and we no longer support i386 darwin (#24921). - - - - - 83235c4c by Cheng Shao at 2024-06-05T11:36:12-04:00 compiler: remove 32-bit darwin logic This commit removes all 32-bit darwin logic from the compiler, given we no longer support 32-bit apple systems (#24921). Also contains a bit more cleanup of obsolete i386 windows logic. - - - - - 1eb99bc3 by Cheng Shao at 2024-06-05T11:36:12-04:00 rts: remove 32-bit darwin/ios logic This commit removes 32-bit darwin/ios related logic from the rts, given we no longer support them (#24921). - - - - - 24f65892 by Cheng Shao at 2024-06-05T11:36:12-04:00 llvm-targets: remove 32-bit darwin/ios targets This commit removes 32-bit darwin/ios targets from llvm-targets given we no longer support them (#24921). - - - - - ccdbd689 by Cheng Shao at 2024-06-05T11:36:12-04:00 testsuite: remove 32-bit darwin logic This commit removes 32-bit darwin logic from the testsuite given it's no longer supported (#24921). Also contains more cleanup of obsolete i386 windows logic. - - - - - 11d661c4 by Cheng Shao at 2024-06-05T11:36:13-04:00 docs: mention 32-bit darwin/ios removal in 9.12 changelog This commit mentions removal of 32-bit darwin/ios support (#24921) in the 9.12 changelog. - - - - - 7c173310 by Georgi Lyubenov at 2024-06-05T15:17:22-04:00 Add firstA and secondA to Data.Bitraversable Please see https://github.com/haskell/core-libraries-committee/issues/172 for related discussion - - - - - 3b6f9fd1 by Ben Gamari at 2024-06-05T15:17:59-04:00 base: Fix name of changelog Fixes #24899. Also place it under `extra-doc-files` to better reflect its nature and avoid triggering unnecessary recompilation if it changes. - - - - - 1f4d2ef7 by Sebastian Graf at 2024-06-05T15:18:34-04:00 Announce Or-patterns in the release notes for GHC 9.12 (#22596) Leftover from !9229. - - - - - 8650338d by Jan Hrček at 2024-06-06T10:39:24-04:00 Improve haddocks of Language.Haskell.Syntax.Pat.Pat - - - - - 2eee65e1 by Cheng Shao at 2024-06-06T10:40:00-04:00 testsuite: bump T7653 timeout for wasm - - - - - 990fed60 by Sylvain Henry at 2024-06-07T14:45:23-04:00 StgToCmm: refactor opTranslate and friends - Change arguments order to avoid `\args -> ...` lambdas - Fix documentation - Rename StgToCmm options ("big" doesn't mean anything) - - - - - 1afad514 by Sylvain Henry at 2024-06-07T14:45:23-04:00 NCG x86: remove dead code (#5444) Since 6755d833af8c21bbad6585144b10e20ac4a0a1ab this code is dead. - - - - - 595c0894 by Cheng Shao at 2024-06-07T14:45:58-04:00 testsuite: skip objc-hi/objcxx-hi when cross compiling objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. - - - - - edfe6140 by qqwy at 2024-06-08T11:23:54-04:00 Replace '?callStack' implicit param with HasCallStack in GHC.Internal.Exception.throw - - - - - 35a64220 by Cheng Shao at 2024-06-08T11:24:30-04:00 rts: cleanup inlining logic This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. - - - - - 9ea90ed2 by Andrew Lelechenko at 2024-06-08T11:25:06-04:00 CODEOWNERS: add @core-libraries to track base interface changes A low-tech tactical solution for #24919 - - - - - 580fef7b by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update CHANGELOG to reflect current version - - - - - 391ecff5 by Ben Gamari at 2024-06-09T01:27:21-04:00 ghc-internal: Update prologue.txt to reflect package description - - - - - 3dca3b7d by Ben Gamari at 2024-06-09T01:27:57-04:00 compiler: Clarify comment regarding need for MOVABS The comment wasn't clear in stating that it was only applicable to immediate source and memory target operands. - - - - - 6bd850e8 by doyougnu at 2024-06-09T21:02:14-04:00 JS: establish single source of truth for symbols In pursuit of: #22736. This MR moves ad-hoc symbols used throughout the js backend into a single symbols file. Why? First, this cleans up the code by removing ad-hoc strings created on the fly and therefore makes the code more maintainable. Second, it makes it much easier to eventually type these identifiers. - - - - - f3017dd3 by Cheng Shao at 2024-06-09T21:02:49-04:00 rts: replace ad-hoc MYTASK_USE_TLV with proper CC_SUPPORTS_TLS This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. - - - - - e17d7e8c by Ben Gamari at 2024-06-11T05:25:21-04:00 users-guide: Fix stylistic issues in 9.12 release notes - - - - - 8a8a982a by Hugo Peters at 2024-06-11T05:25:57-04:00 fix typo in the simplifier debug output: baling -> bailing - - - - - 16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00 haddock: Correct the Makefile to take into account Darwin systems - - - - - a2f60da5 by Hécate Kleidukos at 2024-06-12T03:08:35-04:00 haddock: Remove obsolete links to github.com/haskell/haddock in the docs - - - - - de4395cd by qqwy at 2024-06-12T03:09:12-04:00 Add `__GLASGOW_HASKELL_ASSERTS_IGNORED__` as CPP macro name if `-fasserts-ignored is set. This allows users to create their own Control.Exception.assert-like functionality that does something other than raising an `AssertFailed` exception. Fixes #24967 - - - - - 0e9c4dee by Ryan Hendrickson at 2024-06-12T03:09:53-04:00 compiler: add hint to TcRnBadlyStaged message - - - - - 2747cd34 by Simon Peyton Jones at 2024-06-12T12:51:37-04:00 Fix a QuickLook bug This MR fixes the bug exposed by #24676. The problem was that quickLookArg was trying to avoid calling tcInstFun unnecessarily; but it was in fact necessary. But that in turn forced me into a significant refactoring, putting more fields into EValArgQL. Highlights: see Note [Quick Look overview] in GHC.Tc.Gen.App * Instantiation variables are now distinguishable from ordinary unification variables, by level number = QLInstVar. This is treated like "level infinity". See Note [The QLInstVar TcLevel] in GHC.Tc.Utils.TcType. * In `tcApp`, we don't track the instantiation variables in a set Delta any more; instead, we just tell them apart by their level number. * EValArgQL now much more clearly captures the "half-done" state of typechecking an argument, ready for later resumption. See Note [Quick Look at value arguments] in GHC.Tc.Gen.App * Elminated a bogus (never used) fast-path in GHC.Tc.Utils.Instantiate.instCallConstraints See Note [Possible fast path for equality constraints] Many other small refactorings. - - - - - 1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00 Fix non-compiling extensible record `HasField` example - - - - - 97b141a3 by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Fix hyperlinker source urls (#24907) This fixes a bug introduced by f56838c36235febb224107fa62334ebfe9941aba Links to external modules in the hyperlinker are uniformly generated using splicing the template given to us instead of attempting to construct the url in an ad-hoc manner. - - - - - 954f864c by Zubin Duggal at 2024-06-12T12:52:55-04:00 haddock: Add name anchor to external source urls from documentation page URLs for external source links from documentation pages were missing a splice location for the name. Fixes #24912 - - - - - b0b64177 by Simon Peyton Jones at 2024-06-12T12:53:31-04:00 Prioritise nominal equalities The main payload of this patch is * Prioritise nominal equalities in the constraint solver. This ameliorates the incompleteness of solving for representational constraints over newtypes: see #24887. See (EX2) in Note [Decomposing newtype equalities] in GHC.Tc.Solver.Equality In doing this patch I tripped over some other things that I refactored: * Move `isCoVarType` from `GHC.Core.Type` to `GHC.Core.Predicate` where it seems more at home. * Clarify the "rewrite role" of a constraint. I was very puzzled about what the role of, say `(Eq a)` might be, but see the new Note [The rewrite-role of a constraint]. In doing so I made predTypeEqRel crash when given a non-equality. Usually it expects an equality; but it was being mis-used for the above rewrite-role stuff. - - - - - cb7c1b83 by Liam Goodacre at 2024-06-12T12:54:09-04:00 compiler: missing-deriving-strategies suggested fix Extends the missing-deriving-strategies warning with a suggested fix that includes which deriving strategies were assumed. For info about the warning, see comments for `TcRnNoDerivStratSpecified`, `TcRnNoDerivingClauseStrategySpecified`, & `TcRnNoStandaloneDerivingStrategySpecified`. For info about the suggested fix, see `SuggestExplicitDerivingClauseStrategies` & `SuggestExplicitStandalanoDerivingStrategy`. docs: Rewords missing-deriving-strategies to mention the suggested fix. Resolves #24955 - - - - - 4e36d3a3 by Jan Hrček at 2024-06-12T12:54:48-04:00 Further haddocks improvements in Language.Haskell.Syntax.Pat.Pat - - - - - 558353f4 by Cheng Shao at 2024-06-12T12:55:24-04:00 rts: use page sized mblocks on wasm This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. - - - - - b3cc5366 by Matthew Pickering at 2024-06-12T23:06:57-04:00 compiler: Make ghc-experimental not wired in If you need to wire in definitions, then place them in ghc-internal and reexport them from ghc-experimental. Ticket #24903 - - - - - 700eeab9 by Hécate Kleidukos at 2024-06-12T23:07:37-04:00 base: Use a more appropriate unicode arrow for the ByteArray diagram This commit rectifies the usage of a unicode arrow in favour of one that doesn't provoke mis-alignment. - - - - - cca7de25 by Matthew Pickering at 2024-06-12T23:08:14-04:00 ghcup-metadata: Fix debian version ranges This was caught by `ghcup-ci` failing and attempting to install a deb12 bindist on deb11. ``` configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got in ArSupportsDashL_STAGE0. Defaulting to False. bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so) ``` Fixes #24974 - - - - - 7b23ce8b by Pierre Le Marre at 2024-06-13T15:35:04-04:00 ucd2haskell: remove Streamly dependency + misc - Remove dead code. - Remove `streamly` dependency. - Process files with `bytestring`. - Replace Unicode files parsers with the corresponding ones from the package `unicode-data-parser`. - Simplify cabal file and rename module - Regenerate `ghc-internal` Unicode files with new header - - - - - 4570319f by Jacco Krijnen at 2024-06-13T15:35:41-04:00 Document how to run haddocks tests (#24976) Also remove ghc 9.7 requirement - - - - - fb629e24 by amesgen at 2024-06-14T00:28:20-04:00 compiler: refactor lower_CmmExpr_Ptr - - - - - def46c8c by amesgen at 2024-06-14T00:28:20-04:00 compiler: handle CmmRegOff in lower_CmmExpr_Ptr - - - - - ce76bf78 by Simon Peyton Jones at 2024-06-14T00:28:56-04:00 Small documentation update in Quick Look - - - - - 19bcfc9b by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Add hack for #24623 ..Th bug in #24623 is randomly triggered by this MR!.. - - - - - 7a08a025 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Various fixes to type-tidying This MR was triggered by #24868, but I found a number of bugs and infelicities in type-tidying as I went along. Highlights: * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid using the OccNames of /bound/ variables when tidying /free/ variables; see the call to `tidyAvoiding`. That avoid the gratuitous renaming which was the cause of #24868. See Note [tidyAvoiding] in GHC.Core.TyCo.Tidy * Refactor and document the tidying of open types. See GHC.Core.TyCo.Tidy Note [Tidying open types] Note [Tidying is idempotent] * Tidy the coercion variable in HoleCo. That's important so that tidied types have tidied kinds. * Some small renaming to make things consistent. In particular the "X" forms return a new TidyEnv. E.g. tidyOpenType :: TidyEnv -> Type -> Type tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type) - - - - - 2eac0288 by Simon Peyton Jones at 2024-06-14T14:44:19-04:00 Wibble - - - - - e5d24cc2 by Simon Peyton Jones at 2024-06-14T14:44:20-04:00 Wibbles - - - - - 246bc3a4 by Simon Peyton Jones at 2024-06-14T14:44:56-04:00 Localise a case-binder in SpecConstr.mkSeqs This small change fixes #24944 See (SCF1) in Note [SpecConstr and strict fields] - - - - - a5994380 by Sylvain Henry at 2024-06-15T03:20:29-04:00 PPC: display foreign label in panic message (cf #23969) - - - - - bd95553a by Rodrigo Mesquita at 2024-06-15T03:21:06-04:00 cmm: Parse MO_BSwap primitive operation Parsing this operation allows it to be tested using `test-primops` in a subsequent MR. - - - - - e0099721 by Andrew Lelechenko at 2024-06-16T17:57:38-04:00 Make flip representation polymorphic, similar to ($) and (&) CLC proposal: https://github.com/haskell/core-libraries-committee/issues/245 - - - - - 118a1292 by Alan Zimmerman at 2024-06-16T17:58:15-04:00 EPA: Add location to Match Pats list So we can freely modify the pats and the following item spacing will still be valid when exact printing. Closes #24862 - - - - - db343324 by Fabricio de Sousa Nascimento at 2024-06-17T10:01:51-04:00 compiler: Rejects RULES whose LHS immediately fails to type-check Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This happens when we have a RULE that does not type check, and enable `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an immediately LHS type error. Fixes #24026 - - - - - e7a95662 by Dylan Thinnes at 2024-06-17T10:02:35-04:00 Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) Use runHsc' in runHsc so that both functions can't fall out of sync We're currently copying parts of GHC code to get structured warnings in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics` locally. Once we get this function into GHC we can drop the copied code in future versions of HLS. - - - - - d70abb49 by sheaf at 2024-06-18T18:47:20-04:00 Clarify -XGADTs enables existential quantification Even though -XGADTs does not turn on -XExistentialQuantification, it does allow the user of existential quantification syntax, without needing to use GADT-style syntax. Fixes #20865 - - - - - 13fdf788 by David Binder at 2024-06-18T18:48:02-04:00 Add RTS flag --read-tix-file (GHC Proposal 612) This commit introduces the RTS flag `--read-tix-file=<yes|no>` which controls whether a preexisting .tix file is read in at the beginning of a program run. The default is currently `--read-tix-file=yes` but will change to `--read-tix-file=no` in a future release of GHC. For this reason, whenever a .tix file is read in a warning is emitted to stderr. This warning can be silenced by explicitly passing the `--read-tix-file=yes` option. Details can be found in the GHC proposal cited below. Users can query whether this flag has been used with the help of the module `GHC.RTS.Flags`. A new field `readTixFile` was added to the record `HpcFlags`. These changes have been discussed and approved in - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612 - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276 - - - - - f0e3cb6a by Fendor at 2024-06-18T18:48:38-04:00 Improve sharing of duplicated values in `ModIface`, fixes #24723 As a `ModIface` often contains duplicated values that are not necessarily shared, we improve sharing by serialising the `ModIface` to an in-memory byte array. Serialisation uses deduplication tables, and deserialisation implicitly shares duplicated values. This helps reducing the peak memory usage while compiling in `--make` mode. The peak memory usage is especially smaller when generating interface files with core expressions (`-fwrite-if-simplified-core`). On agda, this reduces the peak memory usage: * `2.2 GB` to `1.9 GB` for a ghci session. On `lib:Cabal`, we report: * `570 MB` to `500 MB` for a ghci session * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc There is a small impact on execution time, around 2% on the agda code base. - - - - - 1bab7dde by Fendor at 2024-06-18T18:48:38-04:00 Avoid unneccessarily re-serialising the `ModIface` To reduce memory usage of `ModIface`, we serialise `ModIface` to an in-memory byte array, which implicitly shares duplicated values. This serialised byte array can be reused to avoid work when we actually write the `ModIface` to disk. We introduce a new field to `ModIface` which allows us to save the byte array, and write it direclty to disk if the `ModIface` wasn't changed after the initial serialisation. This requires us to change absolute offsets, for example to jump to the deduplication table for `Name` or `FastString` with relative offsets, as the deduplication byte array doesn't contain header information, such as fingerprints. To allow us to dump the binary blob to disk, we need to replace all absolute offsets with relative ones. We introduce additional helpers for `ModIface` binary serialisation, which construct relocatable binary blobs. We say the binary blob is relocatable, if the binary representation can be moved and does not contain any absolute offsets. Further, we introduce new primitives for `Binary` that allow to create relocatable binaries, such as `forwardGetRel` and `forwardPutRel`. ------------------------- Metric Decrease: MultiLayerModulesDefsGhcWithCore Metric Increase: MultiComponentModules MultiLayerModules T10421 T12150 T12234 T12425 T13035 T13253-spj T13701 T13719 T14697 T15703 T16875 T18698b T18140 T18304 T18698a T18730 T18923 T20049 T24582 T5837 T6048 T9198 T9961 mhu-perf ------------------------- These metric increases may look bad, but they are all completely benign, we simply allocate 1 MB per module for `shareIface`. As this allocation is quite quick, it has a negligible impact on run-time performance. In fact, the performance difference wasn't measurable on my local machine. Reducing the size of the pre-allocated 1 MB buffer avoids these test failures, but also requires us to reallocate the buffer if the interface file is too big. These reallocations *did* have an impact on performance, which is why I have opted to accept all these metric increases, as the number of allocated bytes is merely a guidance. This 1MB allocation increase causes a lot of tests to fail that generally have a low allocation number. E.g., increasing from 40MB to 41MB is a 2.5% increase. In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a, T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin job, where the number of allocated bytes seems to be lower than in other jobs. The tests T16875 and T18698b fail on i386-linux for the same reason. - - - - - 099992df by Andreas Klebinger at 2024-06-18T18:49:14-04:00 Improve documentation of @Any@ type. In particular mention possible uses for non-lifted types. Fixes #23100. - - - - - 5e75412b by Jakob Bruenker at 2024-06-18T18:49:51-04:00 Update user guide to indicate support for 64-tuples - - - - - 4f5da595 by Andreas Klebinger at 2024-06-18T18:50:28-04:00 lint notes: Add more info to notes.stdout When fixing a note reference CI fails with a somewhat confusing diff. See #21123. This commit adds a line to the output file being compared which hopefully makes it clear this is the list of broken refs, not all refs. Fixes #21123 - - - - - 1eb15c61 by Jakob Bruenker at 2024-06-18T18:51:04-04:00 docs: Update mention of ($) type in user guide Fixes #24909 - - - - - 1d66c9e3 by Jan Hrček at 2024-06-18T18:51:47-04:00 Remove duplicate Anno instances - - - - - 8ea0ba95 by Sven Tennie at 2024-06-18T18:52:23-04:00 AArch64: Delete unused RegNos This has the additional benefit of getting rid of the -1 encoding (real registers start at 0.) - - - - - 325422e0 by Sjoerd Visscher at 2024-06-18T18:53:04-04:00 Bump stm submodule to current master - - - - - 64fba310 by Cheng Shao at 2024-06-18T18:53:40-04:00 testsuite: bump T17572 timeout on wasm32 - - - - - eb612fbc by Sven Tennie at 2024-06-19T06:46:00-04:00 AArch64: Simplify BL instruction The BL constructor carried unused data in its third argument. - - - - - b0300503 by Alan Zimmerman at 2024-06-19T06:46:36-04:00 TTG: Move SourceText from `Fixity` to `FixitySig` It is only used there, simplifies the use of `Fixity` in the rest of the code, and is moved into a TTG extension point. Precedes !12842, to simplify it - - - - - 842e119b by Rodrigo Mesquita at 2024-06-19T06:47:13-04:00 base: Deprecate some .Internal modules Deprecates the following modules according to clc-proposal #217: https://github.com/haskell/core-libraries-committee/issues/217 * GHC.TypeNats.Internal * GHC.TypeLits.Internal * GHC.ExecutionStack.Internal Closes #24998 - - - - - 24e89c40 by Jacco Krijnen at 2024-06-20T07:21:27-04:00 ttg: Use List instead of Bag in AST for LHsBindsLR Considering that the parser used to create a Bag of binds using a cons-based approach, it can be also done using lists. The operations in the compiler don't really require Bag. By using lists, there is no dependency on GHC.Data.Bag anymore from the AST. Progress towards #21592 - - - - - 04f5bb85 by Simon Peyton Jones at 2024-06-20T07:22:03-04:00 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. See Note [Tracking Given equalities] and Note [Let-bound skolems] both in GHC.Tc.Solver.InertSet. Then * Test LocalGivenEqs succeeds for a different reason than before; see (LBS2) in Note [Let-bound skolems] * New test T24938a succeeds because of (LBS2), whereas it failed before. * Test LocalGivenEqs2 now fails, as it should. * Test T224938, the repro from the ticket, fails, as it should. - - - - - 9a757a27 by Simon Peyton Jones at 2024-06-20T07:22:40-04:00 Fix demand signatures for join points This MR tackles #24623 and #23113 The main change is to give a clearer notion of "worker/wrapper arity", esp for join points. See GHC.Core.Opt.DmdAnal Note [Worker/wrapper arity and join points] This Note is a good summary of what this MR does: (1) The "worker/wrapper arity" of an Id is * For non-join-points: idArity * The join points: the join arity (Id part only of course) This is the number of args we will use in worker/wrapper. See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`. (2) A join point's demand-signature arity may exceed the Id's worker/wrapper arity. See the `arity_ok` assertion in `mkWwBodies`. (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond the worker/wrapper arity. (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper arity (re)-computed by workWrapArity. - - - - - 5e8faaf1 by Jan Hrček at 2024-06-20T07:23:20-04:00 Update haddocks of Import/Export AST types - - - - - cd512234 by Hécate Kleidukos at 2024-06-20T07:24:02-04:00 haddock: Update bounds in cabal files and remove allow-newer stanza in cabal.project - - - - - 8a8ff8f2 by Rodrigo Mesquita at 2024-06-20T07:24:38-04:00 cmm: Don't parse MO_BSwap for W8 Don't support parsing bswap8, since bswap8 is not really an operation and would have to be implemented as a no-op (and currently is not implemented at all). Fixes #25002 - - - - - 5cc472f5 by sheaf at 2024-06-20T07:25:14-04:00 Delete unused testsuite files These files were committed by mistake in !11902. This commit simply removes them. - - - - - 7b079378 by Matthew Pickering at 2024-06-20T07:25:50-04:00 Remove left over debugging pragma from 2016 This pragma was accidentally introduced in 648fd73a7b8fbb7955edc83330e2910428e76147 The top-level cost centres lead to a lack of optimisation when compiling with profiling. - - - - - c872e09b by Hécate Kleidukos at 2024-06-20T19:28:36-04:00 haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default This commit enables some extensions and GHC flags in the cabal file in a way that allows us to reduce the amount of prologuing on top of each file. We also prefix the usage of some List functions that removes ambiguity when they are also exported from the Prelude, like foldl'. In general, this has the effect of pointing out more explicitly that a linked list is used. Metric Increase: haddock.Cabal haddock.base haddock.compiler - - - - - 8c87d4e1 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 Add test case for #23586 - - - - - 568de8a5 by Arnaud Spiwack at 2024-06-20T19:29:12-04:00 When matching functions in rewrite rules: ignore multiplicity When matching a template variable to an expression, we check that it has the same type as the matched expression. But if the variable `f` has type `A -> B` while the expression `e` has type `A %1 -> B`, the match was previously rejected. A principled solution would have `f` substituted by `\(%Many x) -> e x` or some other appropriate coercion. But since linearity is not properly checked in Core, we can be cheeky and simply ignore multiplicity while matching. Much easier. This has forced a change in the linter which, when `-dlinear-core-lint` is off, must consider that `a -> b` and `a %1 -> b` are equal. This is achieved by adding an argument to configure the behaviour of `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour which ignores multiplicities when comparing two `FunTy`. Fixes #24725. - - - - - c8a8727e by Simon Peyton Jones at 2024-06-20T19:29:12-04:00 Faster type equality This MR speeds up type equality, triggered by perf regressions that showed up when fixing #24725 by parameterising type equality over whether to ignore multiplicity. The changes are: * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised type-equality function, which we have always had! `nonDetCmpType` remains, but I did not invest effort in refactoring or optimising it. * Type equality is parameterised by - whether to expand synonyms - whether to respect multiplicities - whether it has a RnEnv2 environment In this MR I systematically specialise it for static values of these parameters. Much more direct and predictable than before. See Note [Specialising type equality] * We want to avoid comparing kinds if possible. I refactored how this happens, at least for `eqType`. See Note [Casts and coercions in type comparison] * To make Lint fast, we want to avoid allocating a thunk for <msg> in ensureEqTypes ty1 ty2 <msg> because the test almost always succeeds, and <msg> isn't needed. See Note [INLINE ensureEqTys] Metric Decrease: T13386 T5030 - - - - - 21fc180b by Ryan Hendrickson at 2024-06-22T10:40:55-04:00 base: Add inits1 and tails1 to Data.List - - - - - d640a3b6 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Derive previously hand-written `Lift` instances (#14030) This is possible now that #22229 is fixed. - - - - - 33fee6a2 by Sebastian Graf at 2024-06-22T10:41:32-04:00 Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) After #22229 had been fixed, we can finally derive the `Lift` instance for the TH AST, as proposed by Ryan Scott in https://mail.haskell.org/pipermail/libraries/2015-September/026117.html. Fixes #14030, #14296, #21759 and #24560. The residency of T24471 increases by 13% because we now load `AnnLookup` from its interface file, which transitively loads the whole TH AST. Unavoidable and not terrible, I think. Metric Increase: T24471 - - - - - 383c01a8 by Matthew Pickering at 2024-06-22T10:42:08-04:00 bindist: Use complete relative paths when cding to directories If a user has configured CDPATH on their system then `cd lib` may change into an unexpected directory during the installation process. If you write `cd ./lib` then it will not consult `CDPATH` to determine what you mean. I have added a check on ghcup-ci to verify that the bindist installation works in this situation. Fixes #24951 - - - - - 5759133f by Hécate Kleidukos at 2024-06-22T10:42:49-04:00 haddock: Use the more precise SDocContext instead of DynFlags The pervasive usage of DynFlags (the parsed command-line options passed to ghc) blurs the border between different components of Haddock, and especially those that focus solely on printing text on the screen. In order to improve the understanding of the real dependencies of a function, the pretty-printer options are made concrete earlier in the pipeline instead of late when pretty-printing happens. This also has the advantage of clarifying which functions actually require DynFlags for purposes other than pretty-printing, thus making the interactions between Haddock and GHC more understandable when exploring the code base. See Henry, Ericson, Young. "Modularizing GHC". https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022 - - - - - 749e089b by Alexander McKenna at 2024-06-22T10:43:24-04:00 Add INLINE [1] pragma to compareInt / compareWord To allow rules to be written on the concrete implementation of `compare` for `Int` and `Word`, we need to have an `INLINE [1]` pragma on these functions, following the `matching_overloaded_methods_in_rules` note in `GHC.Classes`. CLC proposal https://github.com/haskell/core-libraries-committee/issues/179 Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/22643 - - - - - db033639 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ci: Enable strict ghc-toolchain setting for bindists - - - - - 14308a8f by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Improve parse failure error Improves the error message for when `ghc-toolchain` fails to read a valid `Target` value from a file (in doFormat mode). - - - - - 6e7cfff1 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: ghc-toolchain related options in configure - - - - - 958d6931 by Matthew Pickering at 2024-06-24T17:21:15-04:00 ci: Fail when bindist configure fails when installing bindist It is better to fail earlier if the configure step fails rather than carrying on for a more obscure error message. - - - - - f48d157d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 ghc-toolchain: Fix error logging indentation - - - - - f1397104 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 bindist: Correct default.target substitution The substitution on `default.target.in` must be done after `PREP_TARGET_FILE` is called -- that macro is responsible for setting the variables that will be effectively substituted in the target file. Otherwise, the target file is invalid. Fixes #24792 #24574 - - - - - 665e653e by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 configure: Prefer tool name over tool path It is non-obvious whether the toolchain configuration should use full-paths to tools or simply their names. In addressing #24574, we've decided to prefer executable names over paths, ultimately, because the bindist configure script already does this, thus is the default in ghcs out there. Updates the in-tree configure script to prefer tool names (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to ignore the full-path-result of `findExecutable`, which it previously used over the program name. This change doesn't undo the fix in bd92182cd56140ffb2f68ec01492e5aa6333a8fc because `AC_CHECK_TOOL` still takes into account the target triples, unlike `AC_CHECK_PROG/AC_PATH_PROG`. - - - - - 463716c2 by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 dist: Don't forget to configure JavascriptCPP We introduced a configuration step for the javascript preprocessor, but only did so for the in-tree configure script. This commit makes it so that we also configure the javascript preprocessor in the configure shipped in the compiler bindist. - - - - - e99cd73d by Rodrigo Mesquita at 2024-06-24T17:21:15-04:00 distrib: LlvmTarget in distrib/configure LlvmTarget was being set and substituted in the in-tree configure, but not in the configure shipped in the bindist. We want to set the LlvmTarget to the canonical LLVM name of the platform that GHC is targetting. Currently, that is going to be the boostrapped llvm target (hence the code which sets LlvmTarget=bootstrap_llvm_target). - - - - - 4199aafe by Matthew Pickering at 2024-06-24T17:21:51-04:00 Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) - - - - - f599d816 by Matthew Pickering at 2024-06-24T17:21:51-04:00 ci: Add 9_10 bootstrap testing job - - - - - 8f4b799d by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags Follow up to !12931 - - - - - 210cf1cd by Hécate Kleidukos at 2024-06-24T17:22:30-04:00 haddock: Remove cabal file linting rule This will be reintroduced with a properly ignored commit when the cabal files are themselves formatted for good. - - - - - 7fe85b13 by Peter Trommler at 2024-06-24T22:03:41-04:00 PPC NCG: Fix sign hints in C calls Sign hints for parameters are in the second component of the pair. Fixes #23034 - - - - - 949a0e0b by Andrew Lelechenko at 2024-06-24T22:04:17-04:00 base: fix missing changelog entries - - - - - 1bfa9111 by Andreas Klebinger at 2024-06-26T21:49:53-04:00 GHCi interpreter: Tag constructor closures when possible. When evaluating PUSH_G try to tag the reference we are pushing if it's a constructor. This is potentially helpful for performance and required to fix #24870. - - - - - caf44a2d by Andrew Lelechenko at 2024-06-26T21:50:30-04:00 Implement Data.List.compareLength and Data.List.NonEmpty.compareLength `compareLength xs n` is a safer and faster alternative to `compare (length xs) n`. The latter would force and traverse the entire spine (potentially diverging), while the former traverses as few elements as possible. The implementation is carefully designed to maintain as much laziness as possible. As per https://github.com/haskell/core-libraries-committee/issues/257 - - - - - f4606ae0 by Serge S. Gulin at 2024-06-26T21:51:05-04:00 Unicode: adding compact version of GeneralCategory (resolves #24789) The following features are applied: 1. Lookup code like Cmm-switches (draft implementation proposed by Sylvain Henry @hsyl20) 2. Nested ifs (logarithmic search vs linear search) (the idea proposed by Sylvain Henry @hsyl20) ------------------------- Metric Decrease: size_hello_artifact size_hello_unicode ------------------------- - - - - - 0e424304 by Hécate Kleidukos at 2024-06-26T21:51:44-04:00 haddock: Restructure import statements This commit removes idiosyncrasies that have accumulated with the years in how import statements were laid out, and defines clear but simple guidelines in the CONTRIBUTING.md file. - - - - - 9b8ddaaf by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Rename test for #24725 I must have fumbled my tabs when I copy/pasted the issue number in 8c87d4e1136ae6d28e92b8af31d78ed66224ee16. - - - - - b0944623 by Arnaud Spiwack at 2024-06-26T21:52:23-04:00 Add original reproducer for #24725 - - - - - 77ce65a5 by Matthew Pickering at 2024-06-27T07:57:14-04:00 Expand LLVM version matching regex for compability with bsd systems sed on BSD systems (such as darwin) does not support the + operation. Therefore we take the simple minded approach of manually expanding group+ to groupgroup*. Fixes #24999 - - - - - bdfe4a9e by Matthew Pickering at 2024-06-27T07:57:14-04:00 ci: On darwin configure LLVMAS linker to match LLC and OPT toolchain The version check was previously broken so the toolchain was not detected at all. - - - - - 07e03a69 by Matthew Pickering at 2024-06-27T07:57:15-04:00 Update nixpkgs commit for darwin toolchain One dependency (c-ares) changed where it hosted the releases which breaks the build with the old nixpkgs commit. - - - - - 144afed7 by Rodrigo Mesquita at 2024-06-27T07:57:50-04:00 base: Add changelog entry for #24998 - - - - - eebe1658 by Sylvain Henry at 2024-06-28T07:13:26-04:00 X86/DWARF: support no tables-next-to-code and asm-shortcutting (#22792) - Without TNTC (tables-next-to-code), we must be careful to not duplicate labels in pprNatCmmDecl. Especially, as a CmmProc is identified by the label of its entry block (and not of its info table), we can't reuse the same label to delimit the block end and the proc end. - We generate debug infos from Cmm blocks. However, when asm-shortcutting is enabled, some blocks are dropped at the asm codegen stage and some labels in the DebugBlocks become missing. We fix this by filtering the generated debug-info after the asm codegen to only keep valid infos. Also add some related documentation. - - - - - 6e86d82b by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: handle JMP to ForeignLabels (#23969) - - - - - 9e4b4b0a by Sylvain Henry at 2024-06-28T07:14:06-04:00 PPC NCG: support loading 64-bit value on 32-bit arch (#23969) - - - - - 50caef3e by Sylvain Henry at 2024-06-28T07:14:46-04:00 Fix warnings in genapply - - - - - 37139b17 by Matthew Pickering at 2024-06-28T07:15:21-04:00 libraries: Update os-string to 2.0.4 This updates the os-string submodule to 2.0.4 which removes the usage of `TemplateHaskell` pragma. - - - - - 0f3d3bd6 by Sylvain Henry at 2024-06-30T00:47:40-04:00 Bump array submodule - - - - - 354c350c by Sylvain Henry at 2024-06-30T00:47:40-04:00 GHCi: Don't use deprecated sizeofMutableByteArray# - - - - - 35d65098 by Ben Gamari at 2024-06-30T00:47:40-04:00 primops: Undeprecate addr2Int# and int2Addr# addr2Int# and int2Addr# were marked as deprecated with the introduction of the OCaml code generator (1dfaee318171836b32f6b33a14231c69adfdef2f) due to its use of tagged integers. However, this backend has long vanished and `base` has all along been using `addr2Int#` in the Show instance for Ptr. While it's unlikely that we will have another backend which has tagged integers, we may indeed support platforms which have tagged pointers. Consequently we undeprecate the operations but warn the user that the operations may not be portable. - - - - - 3157d817 by Sylvain Henry at 2024-06-30T00:47:41-04:00 primops: Undeprecate par# par# is still used in base and it's not clear how to replace it with spark# (see #24825) - - - - - c8d5b959 by Ben Gamari at 2024-06-30T00:47:41-04:00 Primops: Make documentation generation more efficient Previously we would do a linear search through all primop names, doing a String comparison on the name of each when preparing the HsDocStringMap. Fix this. - - - - - 65165fe4 by Ben Gamari at 2024-06-30T00:47:41-04:00 primops: Ensure that deprecations are properly tracked We previously failed to insert DEPRECATION pragmas into GHC.Prim's ModIface, meaning that they would appear in the Haddock documentation but not issue warnings. Fix this. See #19629. Haddock also needs to be fixed: https://github.com/haskell/haddock/issues/223 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - bc1d435e by Mario Blažević at 2024-06-30T00:48:20-04:00 Improved pretty-printing of unboxed TH sums and tuples, fixes #24997 - - - - - 0d170eaf by Zubin Duggal at 2024-07-04T11:08:41-04:00 compiler: Turn `FinderCache` into a record of operations so that GHC API clients can have full control over how its state is managed by overriding `hsc_FC`. Also removes the `uncacheModule` function as this wasn't being used by anything since 1893ba12fe1fa2ade35a62c336594afcd569736e Fixes #23604 - - - - - 4664997d by Teo Camarasu at 2024-07-04T11:09:18-04:00 Add HasCallStack to T23221 This makes the test a bit easier to debug - - - - - 66919dcc by Teo Camarasu at 2024-07-04T11:09:18-04:00 rts: use live words to estimate heap size We use live words rather than live blocks to determine the size of the heap for determining memory retention. Most of the time these two metrics align, but they can come apart in normal usage when using the nonmoving collector. The nonmoving collector leads to a lot of partially occupied blocks. So, using live words is more accurate. They can also come apart when the heap is suffering from high levels fragmentation caused by small pinned objects, but in this case, the block size is the more accurate metric. Since this case is best avoided anyway. It is ok to accept the trade-off that we might try (and probably) fail to return more memory in this case. See also the Note [Statistics for retaining memory] Resolves #23397 - - - - - 8dfca66a by Oleg Grenrus at 2024-07-04T11:09:55-04:00 Add reflections of GHC.TypeLits/Nats type families ------------------------- Metric Increase: ghc_experimental_dir ghc_experimental_so ------------------------- - - - - - 6c469bd2 by Adam Gundry at 2024-07-04T11:10:33-04:00 Correct -Wpartial-fields warning to say "Definition" rather than "Use" Fixes #24710. The message and documentation for `-Wpartial-fields` were misleading as (a) the warning occurs at definition sites rather than use sites, and (b) the warning relates to the definition of a field independently of the selector function (e.g. because record updates are also partial). - - - - - 977b6b64 by Max Ulidtko at 2024-07-04T11:11:11-04:00 GHCi: Support local Prelude Fixes #10920, an issue where GHCi bails out when started alongside a file named Prelude.hs or Prelude.lhs (even empty file suffices). The in-source Note [GHCi and local Preludes] documents core reasoning. Supplementary changes: * add debug traces for module lookups under -ddump-if-trace; * drop stale comment in GHC.Iface.Load; * reduce noise in -v3 traces from GHC.Utils.TmpFs; * new test, which also exercizes HomeModError. - - - - - 87cf4111 by Ryan Scott at 2024-07-04T11:11:47-04:00 Add missing gParPat in cvtp's ViewP case When converting a `ViewP` using `cvtp`, we need to ensure that the view pattern is parenthesized so that the resulting code will parse correctly when roundtripped back through GHC's parser. Fixes #24894. - - - - - b05613c5 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation for module cycle errors (see #18516) This removes the re-export of cyclicModuleErr from the top-level GHC module. - - - - - 70389749 by Adam Gundry at 2024-07-04T11:12:23-04:00 Use structured error representation when reloading a nonexistent module - - - - - 680ade3d by sheaf at 2024-07-04T11:12:23-04:00 Use structured errors for a Backpack instantiation error - - - - - 97c6d6de by sheaf at 2024-07-04T11:12:23-04:00 Move mkFileSrcSpan to GHC.Unit.Module.Location - - - - - f9e7bd9b by Adriaan Leijnse at 2024-07-04T11:12:59-04:00 ttg: Remove SourceText from OverloadedLabel Progress towards #21592 - - - - - 00d63245 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: GHC.Prelude -> Prelude Refactor occurrences to GHC.Prelude with Prelude within Language/Haskell. Progress towards #21592 - - - - - cc846ea5 by Alexander Foremny at 2024-07-04T11:12:59-04:00 AST: remove occurrences of GHC.Unit.Module.ModuleName `GHC.Unit.Module` re-exports `ModuleName` from `Language.Haskell.Syntax.Module.Name`. Progress towards #21592 - - - - - 24c7d287 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move Data instance definition for ModuleName to GHC.Unit.Types To remove the dependency on GHC.Utils.Misc inside Language.Haskell.Syntax.Module.Name, the instance definition is moved from there into GHC.Unit.Types. Progress towards #21592 - - - - - 6cbba381 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move negateOverLitVal into GHC.Hs.Lit The function negateOverLitVal is not used within Language.Haskell and therefore can be moved to the respective module inside GHC.Hs. Progress towards #21592 - - - - - 611aa7c6 by Fabian Kirchner at 2024-07-04T11:12:59-04:00 AST: move conDetailsArity into GHC.Rename.Module The function conDetailsArity is only used inside GHC.Rename.Module. We therefore move it there from Language.Haskell.Syntax.Lit. Progress towards #21592 - - - - - 1b968d16 by Mauricio at 2024-07-04T11:12:59-04:00 AST: Remove GHC.Utils.Assert from GHC Simple cleanup. Progress towards #21592 - - - - - 3d192e5d by Fabian Kirchner at 2024-07-04T11:12:59-04:00 ttg: extract Specificity, ForAllTyFlag and helper functions from GHC.Types.Var Progress towards #21592 Specificity, ForAllTyFlag and its' helper functions are extracted from GHC.Types.Var and moved into a new module Language.Haskell.Syntax.Specificity. Note: Eventually (i.e. after Language.Haskell.Syntax.Decls does not depend on GHC.* anymore) these should be moved into Language.Haskell.Syntax.Decls. At this point, this would cause cyclic dependencies. - - - - - 257d1adc by Adowrath at 2024-07-04T11:12:59-04:00 ttg: Split HsSrcBang, remove ref to DataCon from Syntax.Type Progress towards #21592 This splits HsSrcBang up, creating the new HsBang within `Language.Haskell.Syntax.Basic`. `HsBang` holds the unpackedness and strictness information, while `HsSrcBang` only adds the SourceText for usage within the compiler directly. Inside the AST, to preserve the SourceText, it is hidden behind the pre-existing extension point `XBindTy`. All other occurrences of `HsSrcBang` were adapted to deconstruct the inner `HsBang`, and when interacting with the `BindTy` constructor, the hidden `SourceText` is extracted/inserted into the `XBindTy` extension point. `GHC.Core.DataCon` exports both `HsSrcBang` and `HsBang` for convenience. A constructor function `mkHsSrcBang` that takes all individual components has been added. Two exceptions has been made though: - The `Outputable HsSrcBang` instance is replaced by `Outputable HsBang`. While being only GHC-internal, the only place it's used is in outputting `HsBangTy` constructors -- which already have `HsBang`. It wouldn't make sense to reconstruct a `HsSrcBang` just to ignore the `SourceText` anyway. - The error `TcRnUnexpectedAnnotation` did not use the `SourceText`, so it too now only holds a `HsBang`. - - - - - 24757fec by Mauricio at 2024-07-04T11:12:59-04:00 AST: Moved definitions that use GHC.Utils.Panic to GHC namespace Progress towards #21592 - - - - - 9be49379 by Mike Pilgrem at 2024-07-04T11:13:41-04:00 Fix #25032 Refer to Cabal's `includes` field, not `include-files` - - - - - 9e2ecf14 by Andrew Lelechenko at 2024-07-04T11:14:17-04:00 base: fix more missing changelog entries - - - - - a82121b3 by Peter Trommler at 2024-07-04T11:14:53-04:00 X86 NCG: Fix argument promotion in foreign C calls Promote 8 bit and 16 bit signed arguments by sign extension. Fixes #25018 - - - - - fab13100 by Bryan Richter at 2024-07-04T11:15:29-04:00 Add .gitlab/README.md with creds instructions - - - - - 564981bd by Matthew Pickering at 2024-07-05T07:35:29-04:00 configure: Set LD_STAGE0 appropiately when 9.10.1 is used as a boot compiler In 9.10.1 the "ld command" has been removed, so we fall back to using the more precise "merge objects command" when it's available as LD_STAGE0 is only used to set the object merging command in hadrian. Fixes #24949 - - - - - a949c792 by Matthew Pickering at 2024-07-05T07:35:29-04:00 hadrian: Don't build ghci object files for ./hadrian/ghci target There is some convoluted logic which determines whether we build ghci object files are not. In any case, if you set `ghcDynPrograms = pure False` then it forces them to be built. Given we aren't ever building executables with this flavour it's fine to leave `ghcDynPrograms` as the default and it should be a bit faster to build less. Also fixes #24949 - - - - - 48bd8f8e by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Remove STG dump from ticky_ghc flavour transformer This adds 10-15 minutes to build time, it is a better strategy to precisely enable dumps for the modules which show up prominently in a ticky profile. Given I am one of the only people regularly building ticky compilers I think it's worthwhile to remove these. Fixes #23635 - - - - - 5b1aefb7 by Matthew Pickering at 2024-07-05T07:36:06-04:00 hadrian: Add dump_stg flavour transformer This allows you to write `--flavour=default+ticky_ghc+dump_stg` if you really want STG for all modules. - - - - - ab2b60b6 by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtToInstrs type There's no need to hand `Nothing`s around... (there was no case with a `BlockId`.) - - - - - 71a7fa8c by Sven Tennie at 2024-07-08T15:03:41-04:00 AArch64: Simplify stmtsToInstrs type The `BlockId` parameter (`bid`) is never used, only handed around. Deleting it simplifies the surrounding code. - - - - - 8bf6fd68 by Simon Peyton Jones at 2024-07-08T15:04:17-04:00 Fix eta-expansion in Prep As #25033 showed, we were eta-expanding in a way that broke a join point, which messed up Note [CorePrep invariants]. The fix is rather easy. See Wrinkle (EA1) of Note [Eta expansion of arguments in CorePrep] - - - - - 96acf823 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 One-shot Haddock - - - - - 74ec4c06 by Sjoerd Visscher at 2024-07-09T06:16:14-04:00 Remove haddock-stdout test option Superseded by output handling of Hadrian - - - - - ed8a8f0b by Rodrigo Mesquita at 2024-07-09T06:16:51-04:00 ghc-boot: Relax Cabal bound Fixes #25013 - - - - - 3f9548fe by Matthew Pickering at 2024-07-09T06:17:36-04:00 ci: Unset ALEX/HAPPY variables when testing bootstrap jobs Ticket #24826 reports a regression in 9.10.1 when building from a source distribution. This patch is an attempt to reproduce the issue on CI by more aggressively removing `alex` and `happy` from the environment. - - - - - aba2c9d4 by Andrea Bedini at 2024-07-09T06:17:36-04:00 hadrian: Ignore build-tool-depends fields in cabal files hadrian does not utilise the build-tool-depends fields in cabal files and their presence can cause issues when building source distribution (see #24826) Ideally Cabal would support building "full" source distributions which would remove the need for workarounds in hadrian but for now we can patch the build-tool-depends out of the cabal files. Fixes #24826 - - - - - 12bb9e7b by Matthew Pickering at 2024-07-09T06:18:12-04:00 testsuite: Don't attempt to link when checking whether a way is supported It is sufficient to check that the simple test file compiles as it will fail if there are not the relevant library files for the requested way. If you break a way so badly that even a simple executable fails to link (as I did for profiled dynamic way), it will just mean the tests for that way are skipped on CI rather than displayed. - - - - - 46ec0a8e by Torsten Schmits at 2024-07-09T13:37:02+02:00 Improve docs for NondecreasingIndentation The text stated that this affects indentation of layouts nested in do expressions, while it actually affects that of do layouts nested in any other. - - - - - dddc9dff by Zubin Duggal at 2024-07-12T11:41:24-04:00 compiler: Fingerprint -fwrite-if-simplified-core We need to recompile if this flag is changed because later modules might depend on the simplified core for this module if -fprefer-bytecode is enabled. Fixes #24656 - - - - - 145a6477 by Matthew Pickering at 2024-07-12T11:42:00-04:00 Add support for building profiled dynamic way The main payload of this change is to hadrian. * Default settings will produced dynamic profiled objects * `-fexternal-interpreter` is turned on in some situations when there is an incompatibility between host GHC and the way attempting to be built. * Very few changes actually needed to GHC There are also necessary changes to the bootstrap plans to work with the vendored Cabal dependency. These changes should ideally be reverted by the next GHC release. In hadrian support is added for building profiled dynamic libraries (nothing too exciting to see there) Updates hadrian to use a vendored Cabal submodule, it is important that we replace this usage with a released version of Cabal library before the 9.12 release. Fixes #21594 ------------------------- Metric Increase: libdir ------------------------- - - - - - 414a6950 by Matthew Pickering at 2024-07-12T11:42:00-04:00 testsuite: Make find_so regex more precise The hash contains lowercase [a-z0-9] and crucially not _p which meant we sometimes matched on `libHS.._p` profiled shared libraries rather than the normal shared library. - - - - - dee035bf by Alex Mason at 2024-07-12T11:42:41-04:00 ncg(aarch64): Add fsqrt instruction, byteSwap primitives [#24956] Implements the FSQRT machop using native assembly rather than a C call. Implements MO_BSwap by producing assembly to do the byte swapping instead of producing a foreign call a C function. In `tar`, the hot loop for `deserialise` got almost 4x faster by avoiding the foreign call which caused spilling live variables to the stack -- this means the loop did 4x more memory read/writing than necessary in that particular case! - - - - - 5104ee61 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: use m32 allocator for sections when NEED_PLT (#24432) Use M32 allocator to avoid fragmentation when allocating ELF sections. We already did this when NEED_PLT was undefined. Failing to do this led to relocations impossible to fulfil (#24432). - - - - - 52d66984 by Sylvain Henry at 2024-07-12T11:43:23-04:00 RTS: allow M32 allocation outside of 4GB range when assuming -fPIC - - - - - c34fef56 by Sylvain Henry at 2024-07-12T11:43:23-04:00 Linker: fix stub offset Remove unjustified +8 offset that leads to memory corruption (cf discussion in #24432). - - - - - 280e4bf5 by Simon Peyton Jones at 2024-07-12T11:43:59-04:00 Make type-equality on synonyms a bit faster This MR make equality fast for (S tys1 `eqType` S tys2), where S is a non-forgetful type synonym. It doesn't affect compile-time allocation much, but then comparison doesn't allocate anyway. But it seems like a Good Thing anyway. See Note [Comparing type synonyms] in GHC.Core.TyCo.Compare and Note [Forgetful type synonyms] in GHC.Core.TyCon Addresses #25009. - - - - - cb83c347 by Alan Zimmerman at 2024-07-12T11:44:35-04:00 EPA: Bring back SrcSpan in EpaDelta When processing files in ghc-exactprint, the usual workflow is to first normalise it with makeDeltaAst, and then operate on it. But we need the original locations to operate on it, in terms of finding things. So restore the original SrcSpan for reference in EpaDelta - - - - - 7bcda869 by Matthew Pickering at 2024-07-12T11:45:11-04:00 Update alpine release job to 3.20 alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. - - - - - 43aa99b8 by Matthew Pickering at 2024-07-12T11:45:11-04:00 testsuite: workaround bug in python-3.12 There is some unexplained change to binding behaviour in python-3.12 which requires moving this import from the top-level into the scope of the function. I didn't feel any particular desire to do a deep investigation as to why this changed as the code works when modified like this. No one in the python IRC channel seemed to know what the problem was. - - - - - e3914028 by Adam Sandberg Ericsson at 2024-07-12T11:45:47-04:00 initialise mmap_32bit_base during RTS startup #24847 - - - - - 86b8ecee by Hécate Kleidukos at 2024-07-12T11:46:27-04:00 haddock: Only fetch supported languages and extensions once per Interface list 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. - - - - - 4f85366f by sheaf at 2024-07-13T05:58:14-04:00 Testsuite: use py-cpuinfo to compute CPU features This replaces the rather hacky logic we had in place for checking CPU features. In particular, this means that feature availability now works properly on Windows. - - - - - 41f1354d by Matthew Pickering at 2024-07-13T05:58:51-04:00 testsuite: Replace $CC with $TEST_CC 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 - - - - - 572fbc44 by sheaf at 2024-07-15T08:30:32-04:00 isIrrefutableHsPat: consider COMPLETE pragmas 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 - - - - - 84dadea9 by Zubin Duggal at 2024-07-15T08:31:09-04:00 haddock: Handle non-hs files, so that haddock can generate documentation for modules with foreign imports and template haskell. Fixes #24964 - - - - - 0b4ff9fa by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of warnings/deprecations from dependent packages in `InstalledInterface` and use this to propagate these on items re-exported from dependent packages. Fixes #25037 - - - - - b8b4b212 by Zubin Duggal at 2024-07-15T12:12:30-04:00 haddock: Keep track of instance source locations in `InstalledInterface` and use this to add source locations on out of package instances Fixes #24929 - - - - - 559a7a7c by Matthew Pickering at 2024-07-15T12:13:05-04:00 ci: Refactor job_groups definition, split up by platform 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. - - - - - 20383006 by Matthew Pickering at 2024-07-16T11:48:25+01:00 ci: Replace debian 10 with debian 12 on validation jobs Since debian 10 is now EOL we migrate onwards to debian 12 as the basis for most platform independent validation jobs. - - - - - 12d3b66c by Matthew Pickering at 2024-07-17T13:22:37-04:00 ghcup-metadata: Fix use of arch argument 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 - - - - - bace981e by Matthew Pickering at 2024-07-19T10:14:02-04:00 testsuite: Delay querying ghc-pkg to find .so dirs until test is run 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. - - - - - 478de1ab by Torsten Schmits at 2024-07-19T10:14:37-04:00 Add `complete` pragmas for backwards compat patsyns `ModLocation` and `ModIface` !12347 and !12582 introduced breaking changes to these two constructors and mitigated that with pattern synonyms. - - - - - b57792a8 by Matthew Pickering at 2024-07-19T10:15:13-04:00 ci: Fix ghcup-metadata generation (again) I made some mistakes in 203830065b81fe29003c1640a354f11661ffc604 * 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 ``` - - - - - 1fa35b64 by Andreas Klebinger at 2024-07-19T17:35:20+02:00 Revert "Allow non-absolute values for bootstrap GHC variable" 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 209d09f52363b261b900cf042934ae1e81e2caa7. - - - - - 55117e13 by Simon Peyton Jones at 2024-07-24T02:41:12-04:00 Fix bad bug in mkSynonymTyCon, re forgetfulness As #25094 showed, the previous tests for forgetfulness was plain wrong, when there was a forgetful synonym in the RHS of a synonym. - - - - - a8362630 by Sergey Vinokurov at 2024-07-24T12:22:45-04:00 Define Eq1, Ord1, Show1 and Read1 instances for basic Generic representation types 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 https://gitlab.haskell.org/ghc/ghc/-/issues/24312. - - - - - de5d9852 by Simon Peyton Jones at 2024-07-24T12:23:22-04:00 Address #25055, by disabling case-of-runRW# in Gentle phase See Note [Case-of-case and full laziness] in GHC.Driver.Config.Core.Opt.Simplify - - - - - 3f89ab92 by Andreas Klebinger at 2024-07-25T14:12:54+02:00 Fix -freg-graphs for FP and AARch64 NCG (#24941). 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. - - - - - f6b4c1c9 by Simon Peyton Jones at 2024-07-27T09:45:44-04:00 Fix nasty bug in occurrence analyser 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 - - - - - 646ee207 by Torsten Schmits at 2024-07-27T09:46:20-04:00 add missing cell in flavours table - - - - - ec2eafdb by Ben Gamari at 2024-07-28T20:51:12+02:00 users-guide: Drop mention of dead __PARALLEL_HASKELL__ macro This has not existed for over a decade. - - - - - e2f2a56e by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Add tests for 25081 - - - - - 23f50640 by Arnaud Spiwack at 2024-07-28T22:21:07-04:00 Scale multiplicity in list comprehension Fixes #25081 - - - - - d2648289 by romes at 2024-07-30T01:38:12-04:00 TTG HsCmdArrForm: use Fixity via extension point 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 at posteo.de> Co-authored-by: Alan Zimmerman <alan.zimm at gmail.com> - - - - - e258ad54 by Matthew Pickering at 2024-07-30T01:38:48-04:00 ghcup-metadata: More metadata fixes * Incorrect version range on the alpine bindists * Missing underscore in "unknown_versioning" Fixes #25119 - - - - - 72b54c07 by Rodrigo Mesquita at 2024-08-01T00:47:29-04:00 Deriving-via one-shot strict state Monad instances 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 - - - - - bfe4b3d3 by doyougnu at 2024-08-01T00:48:06-04:00 Rts linker: add case for pc-rel 64 relocation part of the upstream haskell.nix patches - - - - - 5843c7e3 by doyougnu at 2024-08-01T00:48:42-04:00 RTS linker: aarch64: better debug information Dump better debugging information when a symbol address is null. Part of the haskell.nix patches upstream project Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - c2e9c581 by Rodrigo Mesquita at 2024-08-01T00:49:18-04:00 base: Add haddocks to HasExceptionContext Fixes #25091 - - - - - f954f428 by Sylvain Henry at 2024-08-01T00:49:59-04:00 Only lookup ghcversion.h file in the RTS include-dirs by default. The code was introduced in 3549c952b535803270872adaf87262f2df0295a4. It used `getPackageIncludePath` which name doesn't convey that it looks into all include paths of the preload units too. So this behavior is probably unintentional and it should be ok to change it. Fix #25106 - - - - - 951ce3d5 by Matthew Pickering at 2024-08-01T00:50:35-04:00 driver: Fix -Wmissing-home-modules when multiple units have the same module name 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 - - - - - bae1fea4 by sheaf at 2024-08-01T00:51:15-04:00 PMC: suggest in-scope COMPLETE sets when possible 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 - - - - - ff158fcd by Tommy Bidne at 2024-08-02T01:14:32+12:00 Print exception metadata in default handler 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. - - - - - 8b2f70a2 by Andrei Borzenkov at 2024-08-01T23:00:46-04:00 Type syntax in expressions (#24159, #24572, #24226) 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 at gmail.com> - - - - - 66e7f57d by Brandon Chinn at 2024-08-01T21:50:58-07:00 Implement MultilineStrings (#24390) 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. - - - - - cf47b96f by Rodrigo Mesquita at 2024-08-03T05:59:40-04:00 hi: Stable sort avails Sorting the Avails in DocStructures is required to produce fully deterministic interface files in presence of re-exported modules. Fixes #25104 - - - - - af2ae742 by M. Taimoor Zaeem at 2024-08-03T18:52:50+05:00 haddock: decrease margin on top of small headings - - - - - a1e42e7a by Rodrigo Mesquita at 2024-08-05T21:03:04-04:00 hi: Deterministic ImportedMods in Usages 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 - - - - - eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00 testsuite: extend size performance tests with gzip (fixes #25046) The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric. Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case. 2 groups of tests are added: 1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler). 2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used. - - - - - d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: @since for backtraceDesired Fixes point 1 in #25052 - - - - - bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00 ghc-internal: No trailing whitespace in exceptions Fixes #25052 - - - - - 62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Add since annotation for -fkeep-auto-rules. This partially addresses #25082. - - - - - 5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00 Mention `-fkeep-auto-rules` in release notes. It was added earlier but hadn't appeared in any release notes yet. Partially addresses #25082. - - - - - 7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00 Cmm: don't perform unsound optimizations on 32-bit compiler hosts - beef61351b240967b49169d27a9a19565cf3c4af enabled the use of MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends - 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG backend However we store some literal values as `Int` in the compiler. As a result, some Cmm optimizations transformed target 64-bit literals into compiler `Int`. If the compiler is 32-bit, this leads to computing with wrong literals (see #24893 and #24700). This patch disables these Cmm optimizations for 32-bit compilers. This is unsatisfying (optimizations shouldn't be compiler-word-size dependent) but it fixes the bug and it makes the patch easy to backport. A proper fix would be much more invasive but it shall be implemented in the future. Co-authored-by: amesgen <amesgen at amesgen.de> - - - - - d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00 docs: Update info on RequiredTypeArguments Add a section on "types in terms" that were implemented in 8b2f70a202 and remove the now outdated suggestion of using `type` for them. - - - - - 39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00 JS: fix minor typo in base's jsbits - - - - - e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00 RTS: remove hack to force old cabal to build a library with only JS sources Need to extend JSC externs with Emscripten RTS definitions to avoid JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts. Fix #25138 Some recompilation avoidance tests now fail. This is tracked with the other instances of this failure in #23013. My hunch is that they were working by chance when we used the emcc linker. Metric Decrease: T24602_perf_size - - - - - d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00 Support multiline strings in type literals (#25132) - - - - - 610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00 JS: fix callback documentation (#24377) Fix #24377 - - - - - 6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00 haddock: Build haddock-api and haddock-library using hadrian We build these two packages as regular boot library dependencies rather than using the `in-ghc-tree` flag to include the source files into the haddock executable. The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built from hackage can still find the location of the GHC bindist using `ghc-paths`. Addresses #24834 This causes a metric decrease under non-release flavours because under these flavours libraries are compiled with optimisation but executables are not. Since we move the bulk of the code from the haddock executable to the haddock-api library, we see a metric decrease on the validate flavours. Metric Decrease: haddock.Cabal haddock.base haddock.compiler - - - - - 51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add an extension field to HsRecFields This is the Right Thing to Do™. And it prepares for storing a multiplicity coercion there. First step of the plan outlined here and below https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091 - - - - - 4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Add test for #24961 - - - - - 623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00 Ensures that omitted record fields in pattern have multiplicity Many Omitted fields were simply ignored in the type checker and produced incorrect Core code. Fixes #24961 Metric Increase: RecordUpdPerf - - - - - c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00 AARCH64 linker: skip NONE relocations This patch is part of the patches upstreamed from haskell.nix. See https://github.com/input-output-hk/haskell.nix/pull/1960 for the original report/patch. - - - - - 682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00 Support multiline strings in TH - - - - - ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00 Extend -reexported-module flag to support module renaming The -reexported-module flag now supports renaming -rexported-modules. ``` -rexported-module "A as B" ``` This feature is only relevant to multi-component sessions. Fixes #25139 - - - - - e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00 Don't restrict eta-reduction of linear functions This commit simply removes code. All the supporting implementation has been done as part of !12883. Closes #25129 - - - - - 2bb4156e by sheaf at 2024-08-14T14:28:56-04:00 Allow @ character in C labels Generated symbol names can include the '@' character, for example when using `__attribute__((vectorcall))`. - - - - - 7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00 Linker: replace blind tuple with a datatype + docs - - - - - bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00 isIrrefutableHsPat: look up ConLikes in the HscEnv At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors in the RdrEnv, which meant that we lacked fallibility information for out-of-scope constructors (which can arise from Template Haskell splices). Instead, we use 'lookupGREInfo', which looks up the information in the type environment. This was the correct function to call all along, but was not used in 572fbc44 due to import cycle reasons. The appropriate functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env', which avoids import cycles. Fixes #25164 - - - - - 4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00 Linker: some refactoring to prepare for #24886 - Rename LoadedBCOs into LazyBCOs - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field from the BCOs constructor - Rename Linkable's LM constructor into Linkable: in the past we had LM and LP for Module and Package, now we only have the former. - Rename Unlinked into LinkablePart (and linkableUnlinked into linkableParts) - Use NonEmpty to encode invariant in Linkable's linkableParts type - Add helpers: linkableLibs, linkableBCOs, etc. - Add documentation - Remove partial nameOfObject - Rename nameOfObject_maybe into linkablePartPath - Rename byteCodeOfObject into linkablePartAllBCOs. - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C stub. Document the fact that LazyBCOs are returned in this case (contrary to linkableBCOs which only returns non-lazy ones) Refactoring done while trying to understand how to adapt the linker code to support the JS backend too (cf #24886). - - - - - fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00 Implements the Exportable Named Default proposal (#24305) This squashed commit adds support for exportable named defaults, the accepted GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409 The proposal extends the Haskell '98 declarations default (Int, Double) which were implicitly always applying to Num class alone, to allow specifying an arbitrary single-parameter class: default IsString (Text, String) The effect of this declaration would be to eliminate the ambiguous type errors around string literals when OverloadedStrings extension is active. The declaration by itself has effect only in its module, so the proposal also adds the ability to export class defaults: module MyModule (default IsIstring) Once the language extension is published and established, we can consider using it in base and other libraries. See Note [Named default declarations] in GHC.Tc.Gen.Default for implementation details. - - - - - 1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00 Make kick-out more selective This MR revised the crucial kick-out criteria in the constraint solver. Ticket #24984 showed an example in which * We were kicking out unnecessarily * That gave rise to extra work, of course * But it /also/ led to exponentially-sized coercions due to lack of sharing in coercions (something we want to fix separately #20264) This MR sharpens up the kick-out criteria; specifially in (KK2) we look only under type family applications if (fs>=fw). This forced me to understand the existing kick-out story, and I ended up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet. Especially look at the new `Note [The KickOut Criteria]` The proof of termination is not air-tight, but it is better than before, and both Richard and I think it's correct :-). - - - - - 88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00 testsuite: remove undesired -fasm flag from test ways This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. - - - - - 3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00 ghci: fix isMinTTY.h casing for Windows targets This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` - - - - - 5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00 compiler: Fix pretty printing of ticked prefix constructors (#24237) - - - - - ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00 Fix #15773 Clarify further -rtsopts 'defaults' in docs - - - - - 05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00 Improve efficiency of `assertError` (#24625) ... by moving `lazy` to the exception-throwing branch. It's all documented in `Note [Strictness of assertError]`. - - - - - c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00 GHCi debugger: drop record name spaces for Ids When binding new local variables at a breakpoint, we should create Ids with variable namespace, and not record field namespace. Otherwise the rest of the compiler falls over because the IdDetails are wrong. Fixes #25109 - - - - - bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00 base: Final deprecation of GHC.Pack The timeline mandated by #21461 has come to its term and after two years and four minor releases, we are finally removing GHC.Pack from base. Closes #21536 - - - - - 5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00 JS: support rubbish static literals (#25177) Support for rubbish dynamic literals was added in #24664. This patch does the same for static literals. Fix #25177 - - - - - b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00 haddock docs: prefix comes before, postfix comes after - - - - - 6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00 haddock: include package info with --show-interface - - - - - 7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00 Document the (x86) SIMD macros. Fixes #25021. - - - - - 05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00 ghc-internal: Derive version from ghc's version Fixes #25005 - - - - - 73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00 base: Deprecate GHC.Desugar See https://github.com/haskell/core-libraries-committee/issues/216. This will be removed in GHC 9.14. - - - - - 821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00 compiler: Store ForeignStubs and foreign C files in interfaces This data is used alongside Core bindings to reconstruct intermediate build products when linking Template Haskell splices with bytecode. Since foreign stubs and files are generated in the pipeline, they were lost with only Core bindings stored in interfaces. The interface codec type `IfaceForeign` contains a simplified representation of `ForeignStubs` and the set of foreign sources that were manually added by the user. When the backend phase writes an interface, `mkFullIface` calls `encodeIfaceForeign` to read foreign source file contents and assemble `IfaceForeign`. After the recompilation status check of an upstream module, `initWholeCoreBindings` calls `decodeIfaceForeign` to restore `ForeignStubs` and write the contents of foreign sources to the file system as temporary files. The restored foreign inputs are then processed by `hscInteractive` in the same manner as in a regular pipeline. When linking the stub objects for splices, they are excluded from suffix adjustment for the interpreter way through a new flag in `Unlinked`. For details about these processes, please consult Note [Foreign stubs and TH bytecode linking]. Metric Decrease: T13701 - - - - - f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00 git: remove a.out and include it in .gitignore a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. - - - - - 1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00 docs: Fix code-block syntax on old sphinx version This code-block directive breaks the deb9 sphinx build. Fixes #25201 - - - - - 27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00 JS: add basic support for POSIX *at functions (#25190) openat/fstatat/unlinkat/dup are now used in the recent release of the `directory` and `file-io` packages. As such, these functions are (indirectly) used in the following tests one we'll bump the `directory` submodule (see !13122): - openFile008 - jsOptimizer - T20509 - bkpcabal02 - bkpcabal03 - bkpcabal04 - - - - - c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00 Update directory submodule to latest master The primary reason for this bump is to fix the warning from `ghc-pkg check`: ``` Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory ``` This also requires adding the `file-io` package as a boot library (which is discussed in #25145) Fixes #23594 #25145 - - - - - 4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Fix aarch64-alpine target platform description We are producing bindists where the target triple is aarch64-alpine-linux when it should be aarch64-unknown-linux This is because the bootstrapped compiler originally set the target triple to `aarch64-alpine-linux` which is when propagated forwards by setting `bootstrap_target` from the bootstrap compiler target. In order to break this chain we explicitly specify build/host/target for aarch64-alpine. This requires a new configure flag `--enable-ignore-` which just switches off a validation check that the target platform of the bootstrap compiler is the same as the build platform. It is the same, but the name is just wrong. These commits can be removed when the bootstrap compiler has the correct target triple (I looked into patching this on ci-images, but it looked hard to do correctly as the build/host platform is not in the settings file). Fixes #25200 - - - - - e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00 Bump nixpkgs commit for gen_ci script - - - - - 63a27091 by doyougnu at 2024-08-26T20:39:30-04:00 rts: win32: emit additional debugging information -- migration from haskell.nix - - - - - aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00 Only export defaults when NamedDefaults are enabled (#25206) This is a reinterpretation of GHC Proposal #409 that avoids a breaking change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal" Consider a module M that has no explicit export list: module M where default (Rational) Should it export the default (Rational)? The proposal says "yes", and there's a test case for that: default/DefaultImport04.hs However, as it turns out, this change in behavior breaks existing programs, e.g. the colour-2.3.6 package can no longer be compiled, as reported in #25206. In this patch, we make implicit exports of defaults conditional on the NamedDefaults extension. This fix is unintrusive and compliant with the existing proposal text (i.e. it does not require a proposal amendment). Should the proposal be amended, we can go for a simpler solution, such as requiring all defaults to be exported explicitly. Test case: testsuite/tests/default/T25206.hs - - - - - 3a5bebf8 by Matthew Pickering at 2024-08-28T14:16:42-04:00 simplifier: Fix space leak during demand analysis The lazy structure (a list) in a strict field in `DmdType` is not fully forced which leads to a very large thunk build-up. It seems there is likely still more work to be done here as it seems we may be trading space usage for work done. For now, this is the right choice as rather than using all the memory on my computer, compilation just takes a little bit longer. See #25196 - - - - - c2525e9e by Ryan Scott at 2024-08-28T14:17:17-04:00 Add missing parenthesizeHsType in cvtp's InvisP case We need to ensure that when we convert an `InvisP` (invisible type pattern) to a `Pat`, we parenthesize it (at precedence `appPrec`) so that patterns such as `@(a :: k)` will parse correctly when roundtripped back through the parser. Fixes #25209. - - - - - 1499764f by Sjoerd Visscher at 2024-08-29T16:52:56+02:00 Haddock: Add no-compilation flag This flag makes sure to avoid recompilation of the code when generating documentation by only reading the .hi and .hie files, and throw an error if it can't find them. - - - - - 768fe644 by Andreas Klebinger at 2024-09-03T13:15:20-04:00 Add functions to check for weakly pinned arrays. This commit adds `isByteArrayWeaklyPinned#` and `isMutableByteArrayWeaklyPinned#` primops. These check if a bytearray is *weakly* pinned. Which means it can still be explicitly moved by the user via compaction but won't be moved by the RTS. This moves us one more stop closer to nailing down #22255. - - - - - b16605e7 by Arsen Arsenović at 2024-09-03T13:16:05-04:00 ghc-toolchain: Don't leave stranded a.outs when testing for -g0 This happened because, when ghc-toolchain tests for -g0, it does so by compiling an empty program. This compilation creates an a.out. Since we create a temporary directory, lets place the test program compilation in it also, so that it gets cleaned up. Fixes: 25b0b40467d0a12601497117c0ad14e1fcab0b74 Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/25203 - - - - - 83e70b14 by Torsten Schmits at 2024-09-03T13:16:41-04:00 Build foreign objects for TH with interpreter's way when loading from iface Fixes #25211 When linking bytecode for TH from interface core bindings with `-fprefer-byte-code`, foreign sources are loaded from the interface as well and compiled to object code in an ad-hoc manner. The results are then loaded by the interpreter, whose way may differ from the current build's target way. This patch ensures that foreign objects are compiled with the interpreter's way. - - - - - 0d3bc2fa by Cheng Shao at 2024-09-04T07:20:06-04:00 rts: fix checkClosure error message This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. - - - - - fb0a4e5c by Sven Tennie at 2024-09-04T07:20:43-04:00 MO_AcquireFence: Less restrictive barrier GCC and CLang translate the built-in `atomic_thread_fence(memory_order_acquire)` to `dmb ishld`, which is a bit less restrictive than `dmb ish` (which also implies stores.) - - - - - a45f1488 by Fendor at 2024-09-04T20:22:00-04:00 testsuite: Add support to capture performance metrics via 'perf' Performance metrics collected via 'perf' can be more accurate for run-time performance than GHC's rts, due to the usage of hardware counters. We allow performance tests to also record PMU events according to 'perf list'. - - - - - ce61fca5 by Fendor at 2024-09-04T20:22:00-04:00 gitlab-ci: Add nightly job for running the testsuite with perf profiling support - - - - - 6dfb9471 by Fendor at 2024-09-04T20:22:00-04:00 Enable perf profiling for compiler performance tests - - - - - da306610 by sheaf at 2024-09-04T20:22:41-04:00 RecordCon lookup: don't allow a TyCon This commit adds extra logic when looking up a record constructor. If GHC.Rename.Env.lookupOccRnConstr returns a TyCon (as it may, due to the logic explained in Note [Pattern to type (P2T) conversion]), we emit an error saying that the data constructor is not in scope. This avoids the compiler falling over shortly thereafter, in the call to 'lookupConstructorInfo' inside 'GHC.Rename.Env.lookupRecFieldOcc', because the record constructor would not have been a ConLike. Fixes #25056 - - - - - 9c354beb by Matthew Pickering at 2024-09-04T20:23:16-04:00 Use deterministic names for temporary files When there are multiple threads they can race to create a temporary file, in some situations the thread will create ghc_1.c and in some it will create ghc_2.c. This filename ends up in the debug info for object files after compiling a C file, therefore contributes to object nondeterminism. In order to fix this we store a prefix in `TmpFs` which serves to namespace temporary files. The prefix is populated from the counter in TmpFs when the TmpFs is forked. Therefore the TmpFs must be forked outside the thread which consumes it, in a deterministic order, so each thread always receives a TmpFs with the same prefix. This assumes that after the initial TmpFs is created, all other TmpFs are created from forking the original TmpFs. Which should have been try anyway as otherwise there would be file collisions and non-determinism. Fixes #25224 - - - - - 59906975 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 Silence x-partial in Haddock.Backends.Xhtml This is an unfortunate consequence of two mechanisms: * GHC provides (possibly-empty) lists of names * The functions that retrieve those names are not equipped to do error reporting, and thus accept these lists at face value. They will have to be attached an effect for error reporting in a later refactoring - - - - - 8afbab62 by Hécate Kleidukos at 2024-09-05T10:57:15-04:00 hadrian: Support loading haddock in ghci There is one tricky aspect with wired-in packages where the boot package is built with `-this-unit-id ghc` but the dependency is reported as `-package-id ghc-9.6...`. This has never been fixed in GHC as the situation of loading wired-in packages into the multi-repl seems like quite a niche feature that is always just easier to workaround. - - - - - 6cac9eb8 by Matthew Pickering at 2024-09-05T10:57:15-04:00 hadrian/multi: Load all targets when ./hadrian/ghci-multi is called This seems to make a bit more sense than just loading `ghc` component (and dependencies). - - - - - 7d84df86 by Matthew Pickering at 2024-09-05T10:57:51-04:00 ci: Beef up determinism interface test There have recently been some determinism issues with the simplifier and documentation. We enable more things to test in the ABI test to check that we produce interface files deterministically. - - - - - 5456e02e by Sylvain Henry at 2024-09-06T11:57:01+02:00 Transform some StgRhsClosure into StgRhsCon after unarisation (#25166) Before unarisation we may have code like: Test.foo :: Test.D [GblId, Unf=OtherCon []] = \u [] case (# |_| #) [GHC.Types.(##)] of sat_sAw [Occ=Once1] { __DEFAULT -> Test.D [GHC.Types.True sat_sAw]; }; After unarisation we get: Test.foo :: Test.D [GblId, Unf=OtherCon []] = {} \u [] Test.D [GHC.Types.True 2#]; Notice that it's still an Updatable closure for no reason anymore. This patch transforms appropriate StgRhsClosures into StgRhsCons after unarisation, allowing these closures to be statically allocated. Now we get the expected: Test.foo :: Test.D [GblId, Unf=OtherCon []] = Test.D! [GHC.Types.True 2#]; Fix #25166 To avoid duplicating code, this patch refactors the mk(Top)StgRhs functions and put them in a GHC.Stg.Make module alongside the new mk(Top)StgRhsCon_maybe functions. - - - - - 958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00 haddock: Add missing requirements.txt for the online manual - - - - - 573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00 AArch64: Implement takeRegRegMoveInstr This has likely been forgotten. - - - - - 20b0de7d by Hécate Kleidukos at 2024-09-08T14:19:28-04:00 haddock: Configuration fix for ReadTheDocs - - - - - 03055c71 by Sylvain Henry at 2024-09-09T14:58:15-04:00 JS: fake support for native adjustors (#25159) The JS backend doesn't support adjustors (I believe) and in any case if it ever supports them it will be a native support, not one via libffi. - - - - - 5bf0e6bc by Sylvain Henry at 2024-09-09T14:58:56-04:00 JS: remove redundant h$lstat It was introduced a second time by mistake in 27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190) - - - - - ffbc2ab0 by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Refactor only newSysLocalDs * Change newSysLocalDs to take a scaled type * Add newSysLocalMDs that takes a type and makes a ManyTy local Lots of files touched, nothing deep. - - - - - 7124e4ad by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Don't introduce 'nospec' on the LHS of a RULE This patch address #25160. The main payload is: * When desugaring the LHS of a RULE, do not introduce the `nospec` call for non-canonical evidence. See GHC.Core.InstEnv Note [Coherence and specialisation: overview] The `nospec` call usually introdued in `dsHsWrapper`, but we don't want it on the LHS of a RULE (that's what caused #25160). So now `dsHsWrapper` takes a flag to say if it's on the LHS of a RULE. See wrinkle (NC1) in `Note [Desugaring non-canonical evidence]` in GHC.HsToCore.Binds. But I think this flag will go away again when I have finished with my (entirely separate) speciaise-on-values patch (#24359). All this meant I had to re-understand the `nospec` stuff and coherence, and that in turn made me do some refactoring, and add a lot of new documentation The big change is that in GHC.Core.InstEnv, I changed the /type synonym/ `Canonical` into a /data type/ `CanonicalEvidence` and documented it a lot better. That in turn made me realise that CalLStacks were being treated with a bit of a hack, which I documented in `Note [CallStack and ExecptionContext hack]`. - - - - - 663daf8d by Simon Peyton Jones at 2024-09-10T00:40:37-04:00 Add defaulting of equalities This MR adds one new defaulting strategy to the top-level defaulting story: see Note [Defaulting equalities] in GHC.Tc.Solver. This resolves #25029 and #25125, which showed that users were accidentally relying on a GHC bug, which was fixed by commit 04f5bb85c8109843b9ac2af2a3e26544d05e02f4 Author: Simon Peyton Jones <simon.peytonjones at gmail.com> Date: Wed Jun 12 17:44:59 2024 +0100 Fix untouchability test This MR fixes #24938. The underlying problem was tha the test for "does this implication bring in scope any equalities" was plain wrong. This fix gave rise to a number of user complaints; but the improved defaulting story of this MR largely resolves them. On the way I did a bit of refactoring, of course * Completely restructure the extremely messy top-level defaulting code. The new code is in GHC.Tc.Solver.tryDefaulting, and is much, much, much esaier to grok. - - - - - e28cd021 by Andrzej Rybczak at 2024-09-10T00:41:18-04:00 Don't name a binding pattern It's a keyword when PatternSynonyms are set. - - - - - b09571e2 by Simon Peyton Jones at 2024-09-10T00:41:54-04:00 Do not use an error thunk for an absent dictionary In worker/wrapper we were using an error thunk for an absent dictionary, but that works very badly for -XDictsStrict, or even (as #24934 showed) in some complicated cases involving strictness analysis and unfoldings. This MR just uses RubbishLit for dictionaries. Simple. No test case, sadly because our only repro case is rather complicated. - - - - - 8bc9f5f6 by Hécate Kleidukos at 2024-09-10T00:42:34-04:00 haddock: Remove support for applehelp format in the Manual - - - - - 9ca15506 by doyougnu at 2024-09-10T10:46:38-04:00 RTS linker: add support for hidden symbols (#25191) Add linker support for hidden symbols. We basically treat them as weak symbols. Patch upstreamed from haskell.nix Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3b2dc826 by Sven Tennie at 2024-09-10T10:47:14-04:00 Fix C warnings (#25237) GCC 14 treats the fixed warnings as errors by default. I.e. we're gaining GCC 14 compatibility with these fixes. - - - - - 05715994 by Sylvain Henry at 2024-09-10T10:47:55-04:00 JS: fix codegen of static string data Before this patch, when string literals are made trivial, we would generate `h$("foo")` instead of `h$str("foo")`. This was introduced by mistake in 6bd850e887b82c5a28bdacf5870d3dc2fc0f5091. - - - - - 949ebced by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Re-organise cross-OS compatibility layer - - - - - 84ac9a99 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Remove CPP for obsolete GHC and Cabal versions - - - - - 370d1599 by Hécate Kleidukos at 2024-09-10T19:19:40-04:00 haddock: Move the changelog file to the 'extra-doc-files' section in the cabal file - - - - - cfbff65a by Simon Peyton Jones at 2024-09-10T19:20:16-04:00 Add ZonkAny and document it This MR fixed #24817 by adding ZonkAny, which takes a Nat argument. See Note [Any types] in GHC.Builtin.Types, especially wrinkle (Any4). - - - - - 0167e472 by Matthew Pickering at 2024-09-11T02:41:42-04:00 hadrian: Make sure ffi headers are built before using a compiler When we are using ffi adjustors then we rely on `ffi.h` and `ffitarget.h` files during code generation when compiling stubs. Therefore we need to add this dependency to the build system (which this patch does). Reproducer, configure with `--enable-libffi-adjustors` and then build "_build/stage1/libraries/ghc-prim/build/GHC/Types.p_o". Observe that this fails before this patch and works afterwards. Fixes #24864 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 0f696958 by Rodrigo Mesquita at 2024-09-11T02:42:18-04:00 base: Deprecate BCO primops exports from GHC.Exts See https://github.com/haskell/core-libraries-committee/issues/212. These reexports will be removed in GHC 9.14. - - - - - cf0e7729 by Alan Zimmerman at 2024-09-11T02:42:54-04:00 EPA: Remove Anchor = EpaLocation synonym This just causes confusion. - - - - - 8e462f4d by Andrew Lelechenko at 2024-09-11T22:20:37-04:00 Bump submodule deepseq to 1.5.1.0 - - - - - aa4500ae by Sebastian Graf at 2024-09-11T22:21:13-04:00 User's guide: Fix the "no-backtracking" example of -XOrPatterns (#25250) Fixes #25250. - - - - - 1c479c01 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add Native Code Generator (NCG) This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 51b678e1 by Sven Tennie at 2024-09-12T10:39:38+00:00 Adjust test timings for slower computers Increase the delays a bit to be able to run these tests on slower computers. The reference was a Lichee Pi 4a RISCV64 machine. - - - - - a0e41741 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add RTS linker This architecture wasn't supported before. Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - d365b1d4 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Ignore divbyzero test The architecture's behaviour differs from the test's expectations. See comment in code why this is okay. - - - - - abf3d699 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Enable MulMayOflo_full test It works and thus can be tested. - - - - - 38c7ea8c by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: LibffiAdjustor: Ensure code caches are flushed RISCV64 needs a specific code flushing sequence (involving fence.i) when new code is created/loaded. - - - - - 7edc6965 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add additional linker symbols for builtins We're relying on some GCC/Clang builtins. These need to be visible to the linker (and not be stripped away.) - - - - - 92ad3d42 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Add GHCi support As we got a RTS linker for this architecture now, we can enable GHCi for it. - - - - - a145f701 by Sven Tennie at 2024-09-12T10:39:38+00:00 RISCV64: Set codeowners of the NCG - - - - - 8e6d58cf by Sven Tennie at 2024-09-12T10:39:38+00:00 Add test for C calling convention Ensure that parameters and return values are correctly processed. A dedicated test (like this) helps to get the subtleties of calling conventions easily right. The test is failing for WASM32 and marked as fragile to not forget to investigate this (#25249). - - - - - fff55592 by Torsten Schmits at 2024-09-12T21:50:34-04:00 finder: Add `IsBootInterface` to finder cache keys - - - - - cdf530df by Alan Zimmerman at 2024-09-12T21:51:10-04:00 EPA: Sync ghc-exactprint to GHC - - - - - 1374349b by Sebastian Graf at 2024-09-13T07:52:11-04:00 DmdAnal: Fast path for `multDmdType` (#25196) This is in order to counter a regression exposed by SpecConstr. Fixes #25196. - - - - - 80769bc9 by Andrew Lelechenko at 2024-09-13T07:52:47-04:00 Bump submodule array to 0.5.8.0 - - - - - 49ac3fb8 by Sylvain Henry at 2024-09-16T10:33:01-04:00 Linker: add support for extra built-in symbols (#25155) See added Note [Extra RTS symbols] and new user guide entry. Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 3939a8bf by Samuel Thibault at 2024-09-16T10:33:44-04:00 GNU/Hurd: Add getExecutablePath support GNU/Hurd exposes it as /proc/self/exe just like on Linux. - - - - - d3b19851 by Sylvain Henry at 2024-09-17T11:03:28-04:00 RTS: expose closure_sizeW_ (#25252) C code using the closure_sizeW macro can't be linked with the RTS linker without this patch. It fails with: ghc-9.11.20240911: Failed to lookup symbol: closure_sizeW_ Fix #25252 Co-authored-by: Hamish Mackenzie <Hamish.K.Mackenzie at gmail.com> Co-authored-by: Moritz Angermann <moritz.angermann at gmail.com> - - - - - 137bf74d by Sebastian Graf at 2024-09-17T11:04:05-04:00 HsExpr: Inline `HsWrap` into `WrapExpr` This nice refactoring was suggested by Simon during review: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13261#note_583374 Fixes #25264. - - - - - 7fd9e5e2 by Sebastian Graf at 2024-09-17T11:04:05-04:00 Pmc: Improve Desugaring of overloaded list patterns (#25257) This actually makes things simpler. Fixes #25257. - - - - - e4169ba9 by Ben Gamari at 2024-09-18T07:55:28-04:00 configure: Correctly report when subsections-via-symbols is disabled As noted in #24962, currently subsections-via-symbols is disabled on AArch64/Darwin due to alleged breakage. However, `configure` reports to the user that it is enabled. Fix this. - - - - - 9d20a787 by Mario Blažević at 2024-09-18T07:56:08-04:00 Modified the default export implementation to match the amended spec - - - - - 35eb4f42 by Sylvain Henry at 2024-09-18T07:57:00-04:00 FFI: don't ppr Id/Var symbols with debug info (#25255) Even if `-dpp-debug` is enabled we should still generate valid C code. So we disable debug info printing when rendering with Code style. - - - - - 9e96dad8 by Sebastian Graf at 2024-09-21T17:47:59-04:00 Demand: Combine examples into Note (#25107) Just a leftover from !13060. Fixes #25107. - - - - - 21aaa34b by sheaf at 2024-09-21T17:48:36-04:00 Use x86_64-unknown-windows-gnu target for LLVM on Windows - - - - - 992a7624 by sheaf at 2024-09-21T17:48:36-04:00 LLVM: use -relocation-model=pic on Windows This is necessary to avoid the segfaults reported in #22487. Fixes #22487 - - - - - c50d29be by Ryan Hendrickson at 2024-09-21T17:49:15-04:00 compiler: Use type abstractions when deriving For deriving newtype and deriving via, in order to bring type variables needed for the coercions into scope, GHC generates type signatures for derived class methods. As a simplification, drop the type signatures and instead use type abstractions to bring method type variables into scope. - - - - - f04fd0ae by Zubin Duggal at 2024-09-21T17:49:51-04:00 driver: Ensure we run driverPlugin for staticPlugins (#25217) driverPlugins are only run when the plugin state changes. This meant they were never run for static plugins, as their state never changes. We need to keep track of whether a static plugin has been initialised to ensure we run static driver plugins at least once. This necessitates an additional field in the `StaticPlugin` constructor as this state has to be bundled with the plugin itself, as static plugins have no name/identifier we can use to otherwise reference them - - - - - 620becd7 by Andreas Klebinger at 2024-09-21T17:50:27-04:00 Allow unknown fd device types for setNonBlockingMode. This allows fds with a unknown device type to have blocking mode set. This happens for example for fds from the inotify subsystem. Fixes #25199. - - - - - c76e25b3 by Hécate Kleidukos at 2024-09-21T17:51:07-04:00 Use Hackage version of Cabal 3.14.0.0 for Hadrian. We remove the vendored Cabal submodule. Also update the bootstrap plans Fixes #25086 - - - - - 6c83fd7f by Zubin Duggal at 2024-09-21T17:51:07-04:00 ci: Ensure we source ci.sh in any jobs that run commands outside of ci.sh ci.sh sets up the toolchain environment, including paths for the cabal directory, the toolchain binaries etc. If we run any commands outside of ci.sh, unless we source ci.sh we will use the wrong values for these environment variables. In particular, I ran into an issue where the cabal invocation `hadrian/ghci` was using an old index state despite `ci.sh setup` updating and setting the correct index state. This is because `ci.sh` sets the `CABAL_DIR` to a different place, which is where the index was downloaded to, but we were using the default cabal directory outside ci.sh The solution is to source the correct environment `ci.sh` using `. ci.sh setup` - - - - - 9586998d by Sven Tennie at 2024-09-21T17:51:43-04:00 ghc-toolchain: Set -fuse-ld even for ld.bfd This reflects the behaviour of the autoconf scripts. - - - - - d7016e0d by Sylvain Henry at 2024-09-21T17:52:24-04:00 Parser: be more careful when lexing extended literals (#25258) Previously we would lex invalid prefixes like "8#Int3" as [8#Int, 3]. A side-effect of this patch is that we now allow negative unsigned extended literals. They trigger an overflow warning later anyway. - - - - - ca67d7cb by Zubin Duggal at 2024-09-22T02:34:06-04:00 rts: Ensure we dump new Cost Centres added by freshly loaded objects to the eventlog. To do this, we keep track of the ID of the last cost centre we dumped in DUMPED_CC_ID, and call dumpCostCentresToEventLog from refreshProfilingCCSs, which will dump all the new cost centres up to the one we already dumped in DUMPED_CC_ID. Fixes #24148 - - - - - c0df5aa9 by Alan Zimmerman at 2024-09-22T02:34:42-04:00 EPA: Replace AnnsModule am_main with EpTokens Working towards removing `AddEpAnn` - - - - - 2a551cd5 by Matthew Pickering at 2024-09-24T16:33:50+05:30 ci: Run abi-test on test-abi label - - - - - ab4039ac by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 testsuite: Add a test for object determinism Extends the abi_test with an object determinism check Also includes a standalone test to be run by developers manually when debugging issues with determinism. - - - - - d62c18d8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Sampling uniques in the CG To achieve object determinism, the passes processing Cmm and the rest of the code generation pipeline musn't create new uniques which are non-deterministic. This commit changes occurrences of non-deterministic unique sampling within these code generation passes by a deterministic unique sampling strategy by propagating and threading through a deterministic incrementing counter in them. The threading is done implicitly with `UniqDSM` and `UniqDSMT`. Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded through all passes to guarantee uniques in different passes are unique amongst them altogether. Specifically, the same `DUniqSupply` must be threaded through the CG Streaming pipeline, starting with Driver.Main calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and `codeOutput` in sequence. To thread resources through the `Stream` abstraction, we use the `UniqDSMT` transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will thread the `DUniqSupply` through every pass applied to the `Stream`, for every element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in code generation which that carries through the deterministic unique supply. See Note [Deterministic Uniques in the CG] - - - - - 3bbe4af4 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Cmm unique renaming pass To achieve object determinism, we need to prevent the non-deterministic uniques from leaking into the object code. We can do this by deterministically renaming the non-external uniques in the Cmm groups that are yielded right after StgToCmm. The key to deterministic renaming is observing that the order of declarations, instructions, and data in the Cmm groups are already deterministic (modulo other determinism bugs), regardless of the uniques. We traverse the Cmm AST in this deterministic order and rename the uniques, incrementally, in the order they are found, thus making them deterministic. This renaming is guarded by -fobject-determinism which is disabled by default for now. This is one of the key passes for object determinism. Read about the overview of object determinism and a more detailed explanation of this pass in: * Note [Object determinism] * Note [Renaming uniques deterministically] Significantly closes the gap to #12935 - - - - - 8357ed50 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: DCmmGroup vs CmmGroup Part of our strategy in producing deterministic objects, namely, renaming all Cmm uniques in order, depend on the object code produced having a deterministic order (say, A_closure always comes before B_closure). However, the use of LabelMaps in the Cmm representation invalidated this requirement because the LabelMaps elements would already be in a non-deterministic order (due to the original uniques), and the renaming in sequence wouldn't work because of that non-deterministic order. Therefore, we now start off with lists in CmmGroup (which preserve the original order), and convert them into LabelMaps (for performance in the code generator) after the uniques of the list elements have been renamed. See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935. Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - 0e675fb8 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: Don't print unique in pprFullName This unique was leaking as part of the profiling description in info tables when profiling was enabled, despite not providing information relevant to the profile. - - - - - 340f58b0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: UDFM for distinct-constructor-tables In order to produce deterministic objects when compiling with -distinct-constructor-tables, we also have to update the data constructor map to be backed by a deterministic unique map (UDFM) rather than a non-deterministic one (UniqMap). - - - - - 282f37a0 by Rodrigo Mesquita at 2024-09-24T16:33:50+05:30 determinism: InfoTableMap uniques in generateCgIPEStub Fixes object determinism when using -finfo-table-map Make sure to also deterministically rename the IPE map (as per Note [Renaming uniques deterministically]), and to use a deterministic unique supply when creating new labels for the IPE information to guarantee deterministic objects when IPE information is requested. Note that the Cmm group produced in generateCgIPEStub must /not/ be renamed because renaming uniques is not idempotent, and the references to the previously renamed code in the IPE Cmm group would be renamed twice and become invalid references to non-existent symbols. We do need to det-rename the InfoTableMap that is created in the conversion from Core to Stg. This is not a problem since that map won't refer any already renamed names (since it was created before the renaming). - - - - - 7b37afc9 by Zubin Duggal at 2024-09-24T16:33:50+05:30 ci: Allow abi-test to fail. We are not fully deterministic yet, see #12935 for work that remains to be done. - - - - - a63ee33a by Simon Peyton Jones at 2024-09-25T17:08:24-04:00 Add Given injectivity for built-in type families Ticket #24845 asks (reasonably enough) that if we have [G] a+b ~ 0 then we also know [G] a ~ 0, b ~ 0 and similar injectivity-like facts for other built-in type families. The status quo was that we never generate evidence for injectivity among Givens -- but it is quite reasonnable to do so. All we need is to have /evidence/ for the new constraints This MR implements that goal. I also took the opportunity to * Address #24978: refactoring UnivCo * Fix #25248, which was a consequences of the previous formulation of UnivCo As a result this MR touches a lot of code. The big things are: * Coercion constructor UnivCo now takes a [Coercion] as argument to express the coercions on which the UnivCo depends. A nice consequence is that UnivCoProvenance now has no free variables, simpler in a number of places. * Coercion constructors AxiomInstCo and AxiomRuleCo are combined into AxiomCo. The new AxiomCo, carries a (slightly oddly named) CoAxiomRule, which itself is a sum type of the various forms of built-in axiom. See Note [CoAxiomRule] in GHC.Core.Coercion.Axiom A merit of this is that we can separate the case of open and closed type families, and eliminate the redundant `BranchIndex` in the former case. * Much better representation for data BuiltInSynFamily, which means we no longer need to enumerate built-in axioms as well as built-in tycons. * There is a massive refactor in GHC.Builtin.Types.Literals, which contains all the built-in axioms for type-level operations (arithmetic, append, cons etc). A big change is that instead of redundantly having (a) a hand-written matcher, and (b) a template-based "proves" function, which were hard to keep in sync, the two are derive from one set of human-supplied info. See GHC.Builtin.Types.Literals.mkRewriteAxiom, and friends. * Significant changes in GHC.Tc.Solver.Equality to account for the new opportunity for Given/Given equalities. Smaller things * Improve pretty-printing to avoid parens around atomic coercions. * Do proper eqType in findMatchingIrreds, not `eqTypeNoKindCheck`. Looks like a bug, Richard agrees. * coercionLKind and coercionRKind are hot functions. I refactored the implementation (which I had to change anyway) to increase sharing. See Note [coercionKind performance] in GHC.Core.Coercion * I wrote a new Note [Finding orphan names] in GHC.Core.FVs about orphan names * I improved the `is_concrete` flag in GHC.Core.Type.buildSynTyCon, to avoid calling tyConsOfType. I forget exactly why I did this, but it's definitely better now. * I moved some code from GHC.Tc.Types.Constraint into GHC.Tc.Types.CtLocEnv and I renamed the module GHC.Tc.Types.CtLocEnv to GHC.Tc.Types.CtLoc - - - - - dd8ef342 by Ryan Scott at 2024-09-25T17:09:01-04:00 Resolve ambiguous method-bound type variables in vanilla defaults and GND When defining an instance of a class with a "vanilla" default, such as in the following example (from #14266): ```hs class A t where f :: forall x m. Monoid x => t m -> m f = <blah> instance A [] ``` We have to reckon with the fact that the type of `x` (bound by the type signature for the `f` method) is ambiguous. If we don't deal with the ambiguity somehow, then when we generate the following code: ```hs instance A [] where f = $dmf @[] -- NB: the type of `x` is still ambiguous ``` Then the generated code will not typecheck. (Issue #25148 is a more recent example of the same problem.) To fix this, we bind the type variables from the method's original type signature using `TypeAbstractions` and instantiate `$dmf` with them using `TypeApplications`: ```hs instance A [] where f @x @m = $dmf @[] @x @m -- `x` is no longer ambiguous ``` Note that we only do this for vanilla defaults and not for generic defaults (i.e., defaults using `DefaultSignatures`). For the full details, see `Note [Default methods in instances] (Wrinkle: Ambiguous types from vanilla method type signatures)`. The same problem arose in the code generated by `GeneralizedNewtypeDeriving`, as we also fix it here using the same technique. This time, we can take advantage of the fact that `GeneralizedNewtypeDeriving`-generated code _already_ brings method-bound type variables into scope via `TypeAbstractions` (after !13190), so it is very straightforward to visibly apply the type variables on the right-hand sides of equations. See `Note [GND and ambiguity]`. Fixes #14266. Fixes #25148. - - - - - 0a4da5d2 by ARATA Mizuki at 2024-09-25T17:09:41-04:00 Document primitive string literals and desugaring of string literals Fixes #17474 and #17974 Co-authored-by: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org> - - - - - ad0731ad by Zubin Duggal at 2024-09-25T17:10:18-04:00 rts: Fix segfault when using non-moving GC with profiling `nonMovingCollect()` swaps out the `static_flag` value used as a sentinel for `gct->scavenged_static_objects`, but the subsequent call `resetStaticObjectForProfiling()` sees the old value of `static_flag` used as the sentinel and segfaults. So we must call `resetStaticObjectForProfiling()` before calling `nonMovingCollect()` as otherwise it looks for the incorrect sentinel value Fixes #25232 and #23958 Also teach the testsuite driver about nonmoving profiling ways and stop disabling metric collection when nonmoving GC is enabled. - - - - - e7a26d7a by Sylvain Henry at 2024-09-25T17:11:00-04:00 Fix interaction between fork and kqueue (#24672) A kqueue file descriptor isn't inherited by a child created with fork. As such we mustn't try to close this file descriptor as we would close a random one, e.g. the one used by timerfd. Fix #24672 - - - - - 6863503c by Simon Peyton Jones at 2024-09-25T17:11:37-04:00 Improve GHC.Tc.Solver.defaultEquality This MR improves GHC.Tc.Solver.defaultEquality to solve #25251. The main change is to use checkTyEqRhs to check the equality, so that we do promotion properly. But within that we needed a small enhancement to LC_Promote. See Note [Defaulting equalites] (DE4) and (DE5) The tricky case is (alas) hard to trigger, so I have not added a regression test. - - - - - 97a6c6c3 by Sylvain Henry at 2024-09-25T17:12:18-04:00 JS: fix h$withCStringOnHeap helper (#25288) strlen returns the length of the string without the \0 terminating byte, hence CString weren't properly allocated on the heap (ending \0 byte was missing). - - - - - 5f7c20bc by Ben Gamari at 2024-09-26T04:14:05-04:00 base: Propagate `error` CallStack to thrown exception Previously `errorCallWithCallStackException` failed to propagate its `CallStack` argument, which represents the call-chain of the preceding `error` call, to the exception that it returned. Consequently, the call-stack of `error` calls were quite useless. Unfortunately, this is the second time that I have fixed this but it seems the first must have been lost in rebasing. Fixes a bug in the implementation of CLC proposal 164 <https://github.com/haskell/core-libraries-committee/issues/164> Fixes #24807. - - - - - c20d5186 by Matthew Pickering at 2024-09-26T04:14:42-04:00 driver: Fix -working-dir for foreign files -working-dir definitely needs more serious testing, there are some easy ways to test this. * Modify Cabal to call ghc using -working-dir rather than changing directory. * Modify the testsuite to run ghc using `-working-dir` rather than running GHC with cwd = temporary directory. However this will have to wait until after 9.12. Fixes #25150 - - - - - 88eaa7ac by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: reuse predError, succError, toEnumError Reuse predError, succError, and toEnumError when deriving Enum instances to avoid generating different error strings per instance. E.g. before this patch for every instance for a type FOO we would generate a string: "pred{FOO}: tried to take `pred' of first tag in enumeration"# - - - - - e9fa1163 by Sylvain Henry at 2024-09-26T04:15:24-04:00 Enum deriving: generate better code (#16364) Generate better code for Enum.toEnum: check both the lower and the upper bounds at once with an unsigned comparison. Initially I've used a type ascription with a call to 'fromIntegral', hence the slight refactoring of nlAscribe. Using 'fromIntegral' was problematic (too low in the module hierarchy) so 'enumIntToWord' was introduced instead. Combined with the previous commit, T21839c ghc/alloc decrease by 5% Metric Decrease: T21839c - - - - - 383af074 by Sylvain Henry at 2024-09-26T04:16:06-04:00 Core: add absorb rules for binary or/and (#16351) Rules: x or (x and y) ==> x x and (x or y) ==> x - - - - - 783c8b29 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Don't compile `asBox` with -fprof-late The `asBox` function is intended to store exactly the closure which the user passes to it. Placing a cost centre on asBox introduces a thunk, which violates this expectation and can change the result of using asBox when profiling is enabled. See #25212 for more details and ample opportunity to discuss if this is a bug or not. - - - - - 0967dcc7 by Matthew Pickering at 2024-09-26T12:07:44-04:00 Fix normalisation of .prof files Fix 1: If a cost centre contained CAF then the normalisation was corrupted, now only check if CAF is at the start of a line. Fix 2: "no location info" contain a space, which messed up the next normalisation logic which assumed that columns didn't have spaced in. - - - - - 9eda1cb9 by Matthew Pickering at 2024-09-26T12:07:44-04:00 testsuite: Fix normalisation of prof_files removing newlines These normalisation steps were collapsing lines together, which made subsequent normalisation steps fail. ``` foo x y z CAF x y z qux x y z ``` was getting normalised to ``` foo x y z qux x y z ``` which means that subsequent line based filters would not work correctly. - - - - - 2b25f9e2 by Matthew Pickering at 2024-09-26T12:07:44-04:00 packaging: Enable late-ccs for release flavour This enables late cost centres when building profiled libraries and subsequently greatly improves the resolution of cost centre stacks when profiling. This patch also introduces the `grep_prof` test modifier which is used to apply a further filter to the .prof file before they are compared. Fixes #21732 ------------------------- Metric Increase: libdir ------------------------- - - - - - bb030d0d by Brandon Chinn at 2024-09-26T12:08:21-04:00 Replace manual string lexing (#25158) Metric Increase: MultilineStringsPerf This commit replaces the manual string lexing logic with native Alex lexing syntax. This aligns the lexer much closer to the Haskell Report, making it easier to see how the implementation and spec relate. This slightly increases memory usage when compiling multiline strings because we now have two distinct phases: lexing the multiline string with Alex and post-processing the string afterwards. Before, these were done at the same time, but separating them allows us to push as much logic into normal Alex lexing as possible. Since multiline strings are a new feature, this regression shouldn't be too noticeable. We can optimize this over time. - - - - - 16742987 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Revert !4655: Stop 'import "base" Prelude' removing implicit Prelude import This behaviour is problematic for the principle reason that `import Prelude` may not refer to the `base` package, and in which case importing an entirely unrelated module causing your implicit prelude to leave the scope is extremely surprising. See the added test for this example. Discussion on #17045. The secondary reason for reverting this patch is that "base" can't be a wired in package any more (see #24903), so we have to remove special logic which singles out base from the compiler. The rule for implicit shadowing is now simply: * If you write import Prelude (..) then you don't get an implicit prelude import * If you write import "foobar" Prelude (..) for all pkgs foobar, you get an implicit import of prelude. If you want to write a package import of Prelude, then you can enable `NoImplicitPrelude` for the module in question to recover the behaviour of ghc-9.2-9.10. Fixes #17045 - - - - - 57c50f41 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Rename COMPILING_BASE_PACKAGE to COMPILING_GHC_INTERNAL_PACKAGE The COMPILING_BASE_PACKAGE macro is concerned with issues defining symbols and using symbols in the same compilation unit. However, these symbols now exist in ghc-internal rather than base, so we should rename the macro accordingly. The code is guards is likely never used as we never produce windows DLLs but it is simpler to just perform the renaming for now. These days there is little doubt that this macro defined in this ad-hoc manner would be permitted to exist, but these days are not those days. Fixes #25221 - - - - - 70764243 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Preload ghc-internal rather than base This occurence of baseUnitId was missed when moving the bulk of internal definitions into `ghc-internal`. We need to remove this preloading of `base` now because `base` should not be wired in. Towards #24903 - - - - - 12915609 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Remove Data.List compat warning There is currently a warning implemented in -Wcompat which warns you when importing Data.List in a non-qualified manner. ``` A.hs:3:8: warning: [-Wcompat-unqualified-imports] To ensure compatibility with future core libraries changes imports to Data.List should be either qualified or have an explicit import list. | 3 | import Data.List | ^^^^^^^^^ Ok, one module loaded. ``` GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/17244 CLC discussion: https://groups.google.com/g/haskell-core-libraries/c/q3zHLmzBa5E This warning was implemented as part of the migration to making Data.List monomorphic again (and to be used like Data.Set, Data.Map etc). That doesn't seem like it happened, and I imagine that the current CLC would require a new proposal anyway in order to do that now. It's not clear in any case what "future core libraries changes" we are waiting to happen before this warning can be removed. Given the first phase of the proposal has lasted 5 years it doesn't seem that anyone is motivated to carry the proposal to completion. It does seem a bit unnecessary to include a warning in the compiler about "future changes to the module" when there's no timeline or volunteer to implement these changes. The removal of this warning was discussed again at: https://github.com/haskell/core-libraries-committee/issues/269 During the discussion there was no new enthusiasm to move onto the next stages of the proposal so we are removing the warning to unblock the reinstallable "base" project (#24903) Fixes #24904 - - - - - d4e4d498 by Matthew Pickering at 2024-09-26T12:08:57-04:00 Move Control.Monad.Zip into ghc-internal mzip is wired in and therefore needs to be in ghc-internal. Fixes #25222 Towards #24903 - - - - - d3dacdfb by Matthew Pickering at 2024-09-26T12:08:57-04:00 Unwire the base package This patch just removes all the functions related to wiring-in the base package and the `-this-unit-id=base` flag from the cabal file. After this commit "base" becomes just like any other package and the door is opened to moving base into an external repo and releasing base on a separate schedule to the rest of ghc. Closes #24903 - - - - - 1b39363b by Patrick at 2024-09-27T06:10:19-04:00 Add entity information to HieFile #24544 Enhanced HieFile to capture entity information for identifiers, enabling better support for language tools and protocols. See issue #24544 for more details. Work have been done: * Introduction of new data type `EntityInfo` in `GHC.Iface.Ext.Types`. * Add extra field `hie_entity_infos :: NameEntityInfo` to `HieFile` to store the mapping from entity name to corresponding entity infos in `GHC.Iface.Ext.Types`. * Compute `EntityInfo` for each entity name in the HieAst from `TyThing, Id, OccName` when generating the `HieFile` in `GHC.Iface.Ext.Ast`. * Add test T24544 to test the generation of `EntityInfo`. - - - - - 4f3618d8 by sheaf at 2024-09-27T06:10:57-04:00 The X86 SIMD patch. This commit adds support for 128 bit wide SIMD vectors and vector operations to GHC's X86 native code generator. Main changes: - Introduction of vector formats (`GHC.CmmToAsm.Format`) - Introduction of 128-bit virtual register (`GHC.Platform.Reg`), and removal of unused Float virtual register. - Refactor of `GHC.Platform.Reg.Class.RegClass`: it now only contains two classes, `RcInteger` (for general purpose registers) and `RcFloatOrVector` (for registers that can be used for scalar floating point values as well as vectors). - Modify `GHC.CmmToAsm.X86.Instr.regUsageOfInstr` to keep track of which format each register is used at, so that the register allocator can know if it needs to spill the entire vector register or just the lower 64 bits. - Modify spill/load/reg-2-reg code to account for vector registers (`GHC.CmmToAsm.X86.Instr.{mkSpillInstr, mkLoadInstr, mkRegRegMoveInstr, takeRegRegMoveInstr}`). - Modify the register allocator code (`GHC.CmmToAsm.Reg.*`) to propagate the format we are storing in any given register, for instance changing `Reg` to `RegFormat` or `GlobalReg` to `GlobalRegUse`. - Add logic to lower vector `MachOp`s to X86 assembly (see `GHC.CmmToAsm.X86.CodeGen`) - Minor cleanups to genprimopcode, to remove the llvm_only attribute which is no longer applicable. Tests for this feature are provided in the "testsuite/tests/simd" directory. Fixes #7741 Keeping track of register formats adds a small memory overhead to the register allocator (in particular, regUsageOfInstr now allocates more to keep track of the `Format` each register is used at). This explains the following metric increases. ------------------------- Metric Increase: T12707 T13035 T13379 T3294 T4801 T5321FD T5321Fun T783 ------------------------- - - - - - 10e431ef by sheaf at 2024-09-27T06:10:57-04:00 Use xmm registers in genapply This commit updates genapply to use xmm, ymm and zmm registers, for stg_ap_v16/stg_ap_v32/stg_ap_v64, respectively. It also updates the Cmm lexer and parser to produce Cmm vectors rather than 128/256/512 bit wide scalars for V16/V32/V64, removing bits128, bits256 and bits512 in favour of vectors. The Cmm Lint check is weakened for vectors, as (in practice, e.g. on X86) it is okay to use a single vector register to hold multiple different types of data, and we don't know just from seeing e.g. "XMM1" how to interpret the 128 bits of data within. Fixes #25062 - - - - - 8238fb2d by sheaf at 2024-09-27T06:10:57-04:00 Add vector fused multiply-add operations This commit adds fused multiply add operations such as `fmaddDoubleX2#`. These are handled both in the X86 NCG and the LLVM backends. - - - - - 2cb7b748 by sheaf at 2024-09-27T06:10:57-04:00 Add vector shuffle primops This adds vector shuffle primops, such as ``` shuffleFloatX4# :: FloatX4# -> FloatX4# -> (# Int#, Int#, Int#, Int# #) -> FloatX4# ``` which shuffle the components of the input two vectors into the output vector. NB: the indices must be compile time literals, to match the X86 SHUFPD instruction immediate and the LLVM shufflevector instruction. These are handled in the X86 NCG and the LLVM backend. Tested in simd009. - - - - - 0d2428d6 by sheaf at 2024-09-27T06:10:57-04:00 Add Broadcast MachOps This adds proper MachOps for broadcast instructions, allowing us to produce better code for broadcasting a value than simply packing that value (doing many vector insertions in a row). These are lowered in the X86 NCG and LLVM backends. In the LLVM backend, it uses the previously introduced shuffle instructions. - - - - - e6c19a41 by sheaf at 2024-09-27T06:10:57-04:00 Fix treatment of signed zero in vector negation This commit fixes the handling of signed zero in floating-point vector negation. A slight hack was introduced to work around the fact that Cmm doesn't currently have a notion of signed floating point literals (see get_float_broadcast_value_reg). This can be removed once CmmFloat can express the value -0.0. The simd006 test has been updated to use a stricter notion of equality of floating-point values, which ensure the validity of this change. - - - - - f496ff7f by sheaf at 2024-09-27T06:10:57-04:00 Add min/max primops This commit adds min/max primops, such as minDouble# :: Double# -> Double# -> Double# minFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# minWord16X8# :: Word16X8# -> Word16X8# -> Word16X8# These are supported in: - the X86, AArch64 and PowerPC NCGs, - the LLVM backend, - the WebAssembly and JavaScript backends. Fixes #25120 - - - - - 5dd2a423 by sheaf at 2024-09-27T06:10:57-04:00 Add test for C calls & SIMD vectors - - - - - f824e1ee by sheaf at 2024-09-27T06:10:58-04:00 Add test for #25169 - - - - - d54db7f3 by sheaf at 2024-09-27T06:10:58-04:00 Fix #25169 using Plan A from the ticket We now compile certain low-level Cmm functions in the RTS multiple times, with different levels of vector support. We then dispatch at runtime in the RTS, based on what instructions are supported. See Note [realArgRegsCover] in GHC.Cmm.CallConv. Fixes #25169 ------------------------- Metric Increase: T10421 T12425 T18730 T1969 T9198 ------------------------- - - - - - d5f8778a by sheaf at 2024-09-27T06:10:58-04:00 Fix C calls with SIMD vectors This commit fixes the code generation for C calls, to take into account the calling convention. This is particularly tricky on Windows, where all vectors are expected to be passed by reference. See Note [The Windows X64 C calling convention] in GHC.CmmToAsm.X86.CodeGen. - - - - - f64bd564 by sheaf at 2024-09-27T06:10:58-04:00 X86 CodeGen: refactor getRegister CmmLit This refactors the code dealing with loading literals into registers, removing duplication and putting all the code in a single place. It also changes which XOR instruction is used to place a zero value into a register, so that we use VPXOR for a 128-bit integer vector when AVX is supported. - - - - - ab12de6b by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall: promote arg before calling evalArgs The job of evalArgs is to ensure each argument is put into a temporary register, so that it can then be loaded directly into one of the argument registers for the C call, without the generated code clobbering any other register used for argument passing. However, if we promote arguments after calling evalArgs, there is the possibility that the code used for the promotion will clobber a register, defeating the work of evalArgs. To avoid this, we first promote arguments, and only then call evalArgs. - - - - - 8fd12429 by sheaf at 2024-09-27T06:10:58-04:00 X86 genCCall64: simplify loadArg code This commit simplifies the argument loading code by making the assumption that it is safe to directly load the argument into register, because doing so will not clobber any previous assignments. This assumption is borne from the use of 'evalArgs', which evaluates any arguments which might necessitate non-trivial code generation into separate temporary registers. - - - - - 12504a9f by sheaf at 2024-09-27T06:10:58-04:00 LLVM: propagate GlobalRegUse information This commit ensures we keep track of how any particular global register is being used in the LLVM backend. This informs the LLVM type annotations, and avoids type mismatches of the following form: argument is not of expected type '<2 x double>' call ccc <2 x double> (<2 x double>) (<4 x i32> arg) - - - - - 2bb1e8df by Cheng Shao at 2024-09-27T06:11:35-04:00 Link bytecode from interface-stored core bindings in oneshot mode !13042 Part of #T25090 If the flag `-fprefer-byte-code` is given when compiling a module containing TH, GHC will use Core bindings stored in interfaces to compile and link bytecode for splices. This was only implemented for `--make` mode initially, so this commit adds the same mechanism to oneshot mode (`-c`). When an interface is loaded into the EPS in `loadInterface` that has dehydrated Core bindings, an entry is added to the new field `eps_iface_bytecode`, containing an IO action that produces a bytecode `Linkable`, lazily processing the `mi_extra_decls` by calling `loadIfaceByteCode`. When Template Haskell dependencies are resolved in `getLinkDeps`, this action is looked up after loading a module's interface. If it exists, the action is evaluated and the bytecode is added to the set of `Linkable`s used for execution of the splice; otherwise it falls back on the traditional object file. Metric Decrease: MultiLayerModules T13701 - - - - - 7cb7172e by Matthew Pickering at 2024-09-27T06:12:12-04:00 ci: Fix variable inheritence for ghcup-metadata testing job Downstream in ghcup-ci we use the CONFIGURE_ARGS variable to determine how to setup all the different jobs. On the downstream trigger this was being inherited from the default setting in .gitlab.yml file. Therefore this led to job failures as the necessary CONFIGURE_ARGS were not being passed to the configure script when installing the bindist. See docs: * https://docs.gitlab.com/ee/ci/yaml/#inherit * https://docs.gitlab.com/ee/ci/yaml/#triggerforward 1. inherit:variables:fals - This stops the global variables being inherited into the job and hence forwarded onto the downstream job. 2. trigger:forward:* - yaml_variables: true (default) pass yaml variables to downstream, this is important to pass the upstream pipeline id to downstream. - pipeline_variables: false (default) but don't pass pipeline variables (normal environment variables). Fixes #25294 - - - - - 9ffd6163 by Leo at 2024-09-27T16:26:01+05:30 Fix typo in Prelude doc for (>>=) Fix a minor typo ("equivialent" instead of "equivalent") in the documentation for (>>=) in the prelude. - - - - - 5745dbd3 by Vladislav Zavialov at 2024-09-27T16:26:52+05:30 Wildcard binders in type declarations (#23501) Add support for wildcard binders in type declarations: type Const a b = a -- BEFORE: the `b` had to be named -- even if unused on the RHS type Const a _ = a -- AFTER: the compiler accepts -- a wildcard binder `_` The new feature is part of GHC Proposal #425 "Invisible binders in type declarations", and more specifically its amendment #641. Just like a named binder, a wildcard binder `_` may be: * plain: _ * kinded: (_ :: k -> Type) * invisible, plain: @_ * invisible, kinded: @(_ :: k -> Type) Those new forms of binders are allowed to occur on the LHSs of data, newtype, type, class, and type/data family declarations: data D _ = ... newtype N _ = ... type T _ = ... class C _ where ... type family F _ data family DF _ (Test case: testsuite/tests/typecheck/should_compile/T23501a.hs) However, we choose to reject them in forall telescopes and type family result variable binders (the latter being part of the TypeFamilyDependencies extension): type family Fd a = _ -- disallowed (WildcardBndrInTyFamResultVar) fn :: forall _. Int -- disallowed (WildcardBndrInForallTelescope) (Test case: testsuite/tests/rename/should_fail/T23501_fail.hs) See the new Notes: * Note [Type variable binders] * Note [Wildcard binders in disallowed contexts] To accommodate the new forms of binders, HsTyVarBndr was changed as follows (demonstrated without x-fields for clarity) -- BEFORE (ignoring x-fields and locations) data HsTyVarBndr flag = UserTyVar flag Name | KindedTyVar flag Name HsKind -- AFTER (ignoring x-fields and locations) data HsTyVarBndr flag = HsTvb flag HsBndrVar HsBndrKind data HsBndrVar = HsBndrVar Name | HsBndrWildCard data HsBndrKind = HsBndrNoKind | HsBndrKind LHsKind The rest of the patch is downstream from this change. To avoid a breaking change to the TH AST, we generate fresh names to replace wildcard binders instead of adding a dedicated representation for them (as discussed in #641). And to put a cherry on top of the cake, we now allow wildcards in kind-polymorphic type variable binders in constructor patterns, see Note [Type patterns: binders and unifiers] and the tyPatToBndr function in GHC.Tc.Gen.HsType; example: fn (MkT @(_ :: forall k. k -> Type) _ _) = ... (Test case: testsuite/tests/typecheck/should_compile/T23501b.hs) - - - - - ff2bdca2 by Matthew Pickering at 2024-09-27T16:27:08+05:30 ci: Push perf notes from wasm jobs It was observed in #25299 that we were failing to push performance numbers from the wasm jobs. In future we might want to remove this ad-hoc check but for now it's easier to add another special case. Towards #25299 - - - - - 4c76f75c by Zubin Duggal at 2024-09-27T16:44:00+05:30 Bump GHC version to 9.12 - - - - - e4ac1b0d by Zubin Duggal at 2024-09-27T19:12:24+05:30 Bump GHC version to 9.13 - - - - - da20cac1 by Andreas Klebinger at 2024-10-02T22:18:48-04:00 SpecConstr: Introduce a separate argument limit for forced specs. We used to put no limit at all on specializations forced via the SPEC argument. This isn't always reasonable so we introduce a very high limit that applies to forced specializations, a flag to control it, and we now emit a warning if we fail a specialization because we exceed the warning. Fixes #25197 - - - - - 39497eed by Andreas Klebinger at 2024-10-02T22:19:24-04:00 ghc-experimental: Expose primops and ghc extensions via GHC.PrimOps This will be the new place for functions that would have gone into GHC.Exts in the past but are not stable enough to do so now. Addresses #25242 - - - - - e9dc2690 by Sylvain Henry at 2024-10-02T22:20:06-04:00 RTS: cleanup timerfd file descriptors after a fork (#25280) When we init a timerfd-based ticker, we should be careful to cleanup the old file descriptors (e.g. after a fork). - - - - - 64e876bc by Rodrigo Mesquita at 2024-10-02T22:20:43-04:00 determinism: Deterministic MonadGetUnique LlvmM Update LlvmM to thread a unique deterministic supply (using UniqDSMT), and use it in the MonadGetUnique instance. This makes uniques sampled from LlvmM deterministic, which guarantees object determinism with -fllvm. Fixes #25274 - - - - - 36bbb167 by Matthew Pickering at 2024-10-02T22:21:18-04:00 Bump LLVM upper bound to allow LLVM 19 Also bumps the ci-images commit so that the deb12 images uses LLVM 19 for testing. ------------------------- Metric Decrease: size_hello_artifact_gzip size_hello_unicode_gzip ------------------------- Fixes #25295 - - - - - 0029ca91 by Matthew Pickering at 2024-10-02T22:21:54-04:00 configure: Allow happy-2.0.2 happy-2.0.2 can be used to compile GHC. happy-2.0 and 2.0.1 have bugs which make it unsuitable to use. The version bound is now == 1.20.* || >= 2.0.2 && < 2.1 Fixes #25276 - - - - - 92976985 by ARATA Mizuki at 2024-10-02T22:22:35-04:00 Use bundled llc/opt on Windows (#22438) - - - - - af59749a by Matthew Pickering at 2024-10-02T22:23:11-04:00 Fix registerArch for riscv64 The register allocator doesn't support vector registers on riscv64, therefore advertise as NoVectors. Fixes #25314 - - - - - a49e66fc by Matthew Pickering at 2024-10-02T22:23:11-04:00 riscv: Avoid using csrr instruction to test for vector registers The csrr instruction isn't allowed in qemu user-mode, and raises an illegal instruction error when it is encountered. Therefore for now, we just hard-code that there is no support for vector registers since the rest of the compiler doesn't support vector registers for riscv. Fixes #25312 - - - - - 115a30e9 by Andreas Klebinger at 2024-10-02T22:23:11-04:00 Add support for fp min/max to riscv Fixes #25313 - - - - - f28b5992 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite/perf: Report better error message on malformed note Previously a malformed perf note resulted in very poor errors. Here we slight improve this situation. - - - - - 51377508 by Ben Gamari at 2024-10-02T22:23:47-04:00 testsuite: Handle division-by-zero more gracefully Previously we would fail with an ZeroDivisionError. Fixes #25321 - - - - - 50490075 by Matthew Pickering at 2024-10-03T05:55:13-04:00 ci: Add nightly & release ubuntu-22.04 jobs This adds build of bindists on ubuntu-22.04 on nightly and release pipelines. We also update ghcup-metadata to provide ubuntu-22.04 bindists on ubuntu-22.04. Fixes #25317 - - - - - 9cf1cef5 by Zubin Duggal at 2024-10-03T05:55:49-04:00 haddock: Bump binary interface version to 46. This allows haddock to give good error messages when being used on mismatched interface files. We bump to 46 since GHC 9.12 uses version 45: https://gitlab.haskell.org/ghc/ghc/-/commit/362afd632032ee8f174690c3ffe0015076b83ce6 This should have been done in e4ac1b0d281b85a0144d1ef6f84a1df00e236052 but was overlooked. - - - - - 2293c0b7 by Andreas Klebinger at 2024-10-03T05:56:25-04:00 Change versionig of ghc-experimental to follow ghc versions. Just like ghc-internal it will now use the @ProjectVersionForLib@ macro for versioning. This means for ghc=9.10.1, ghc-experimental's version will be 9.1001.0 and so on. This fixes #25289 - - - - - 876d6e0e by Ben Gamari at 2024-10-04T15:07:53+01:00 base: Add `HasCallStack` constraint to `ioError` As proposed in core-libraries-committee#275. - - - - - 9bfd9fd0 by Matthew Pickering at 2024-10-04T15:08:03+01:00 Fix toException method for ExceptionWithContext Fixes #25235 - - - - - ac004028 by Matthew Pickering at 2024-10-04T15:09:07+01:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - bcb293f2 by Cheng Shao at 2024-10-04T17:59:28-04:00 testsuite: remove accidentally checked in debug print logic - - - - - 68e2da5a by Rodrigo Mesquita at 2024-10-05T10:36:15-04:00 Deprecation for WarnCompatUnqualifiedImports Fixes #25330 - - - - - 4327f0e8 by Andrew Lelechenko at 2024-10-05T10:36:52-04:00 Restrict Data.List.NonEmpty.unzip to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b) Implementing the final phase of CLC proposal https://github.com/haskell/core-libraries-committee/issues/86 - - - - - ceca9efb by Cheng Shao at 2024-10-06T02:18:31+00:00 driver: fix runWorkerLimit on wasm This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. - - - - - 135fd1ac by Torsten Schmits at 2024-10-06T02:18:31+00:00 Parallelize getRootSummary computations in dep analysis downsweep This reuses the upsweep step's infrastructure to process batches of modules in parallel. I benchmarked this by running `ghc -M` on two sets of 10,000 modules; one with a linear dependency chain and the other with a binary tree. Comparing different values for the number of modules per thread suggested an optimum at `length targets `div` (n_cap * 2)`, with results similar to this one (6 cores, 12 threads): ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 1.775 s ± 0.026 s [User: 1.377 s, System: 0.399 s] Range (min … max): 1.757 s … 1.793 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 876.2 ms ± 20.9 ms [User: 1833.2 ms, System: 518.6 ms] Range (min … max): 856.2 ms … 898.0 ms 3 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 793.5 ms ± 23.2 ms [User: 2318.9 ms, System: 718.6 ms] Range (min … max): 771.9 ms … 818.0 ms 3 runs ``` Results don't differ much when the batch size is reduced to a quarter of that, but there's significant thread scheduling overhead for a size of 1: ``` Benchmark 1: linear 1 jobs Time (mean ± σ): 2.611 s ± 0.029 s [User: 2.851 s, System: 0.783 s] Range (min … max): 2.591 s … 2.632 s 2 runs Benchmark 2: linear 6 jobs Time (mean ± σ): 1.189 s ± 0.007 s [User: 2.707 s, System: 1.103 s] Range (min … max): 1.184 s … 1.194 s 2 runs Benchmark 3: linear 12 jobs Time (mean ± σ): 1.097 s ± 0.006 s [User: 2.938 s, System: 1.300 s] Range (min … max): 1.093 s … 1.101 s 2 runs ``` Larger batches also slightly worsen performance. - - - - - 535a2117 by Daniel Díaz at 2024-10-06T09:51:46-04:00 Clarify the meaning of "exactly once" in LinearTypes Solves documentaion issue #25084. - - - - - 92f8939a by Krzysztof Gogolewski at 2024-10-06T09:52:22-04:00 Only allow (a => b) :: Constraint rather than CONSTRAINT rep Fixes #25243 - - - - - 4a2f0f13 by Alan Zimmerman at 2024-10-07T05:16:54-04:00 EPA: Remove unused hsCaseAnnsRest We never populate it, so remove it. - - - - - 5099057b by John Paul Adrian Glaubitz at 2024-10-07T05:17:40-04:00 rts: Fix invocation of __ieee_set_fp_control() on alpha-linux Fixes the following error when building GHC on alpha-linux: rts/posix/Signals.c: In function ‘initDefaultHandlers’: rts/posix/Signals.c:709:5: error: error: implicit declaration of function ‘ieee_set_fp_control’ [-Wimplicit-function-declaration] 709 | ieee_set_fp_control(0); | ^~~~~~~~~~~~~~~~~~~ | 709 | ieee_set_fp_control(0); | - - - - - c9590ba0 by Teo Camarasu at 2024-10-07T05:18:17-04:00 Add changelog entries for !12479 - - - - - bf9c9566 by Matthew Pickering at 2024-10-07T13:19:30-04:00 javascript: Read fields of ObjectBlock lazily When linking a module with a large dependency footprint too much of the object files were forced during linking. This lead to a large amount of memory taken up by thunks which would never be forced On the PartialDownsweep test this halves the memory required (from 25G to 13G). Towards #25324 ------------------------- Metric Increase: size_hello_obj ------------------------- - - - - - 571329df by Matthew Pickering at 2024-10-07T13:20:06-04:00 ci: Run the i386 validation job when i386 label is set This is helpful when making changes to base and must update the javascript and i386 base exports files. - - - - - e68f9aaf by Matthew Pickering at 2024-10-07T13:20:42-04:00 Rewrite partitionByWorkerSize to avoid pattern match checker bug With `-g3` the pattern match checker would warn about these incomplete patterns. This affects the debug_info builds on CI. ``` Pattern match(es) are non-exhaustive In an equation for ‘go’: Patterns of type ‘[a]’, ‘[a]’, ‘[SpecFailWarning]’ not matched: (_:_) _ _ | 2514 | go [] small warnings = (small, warnings) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... ``` Workaround for #25338 - - - - - d915dc8b by Arnaud Spiwack at 2024-10-07T19:23:00-04:00 Remove the wrapper/coercion-passing logic for submultiplicity checks Instead, we use a dedicated DelayedError, which is emitted systematically on submultiplicity checks, but is suppressed if we can indeed solve the submultiplicity constraint with a reflexivity coercion. This way, we don't have to return anything from `tcSubMult`, which now looks like a regular constraint check, the rest is implementation detail. This removes all of the strange boilerplate that I'd been struggling with under the previous implementation. Even if submultiplicity checks are not properly constraints, this way it's contained entirely within a `WantedConstraint`. Much more pleasant. Closes #25128. - - - - - 1d226116 by Sven Tennie at 2024-10-07T19:23:37-04:00 AArch64: Implement switch/jump tables (#19912) This improves the performance of Cmm switch statements (compared to a chain of if statements.) - - - - - 3fe621dd by Mario Blažević at 2024-10-07T19:24:18-04:00 Fixes #25256, missing parens inside TH-printed pattern type signature - - - - - ea4b4391 by ARATA Mizuki at 2024-10-07T19:24:59-04:00 Better documentation for floatRange function Closes #16479 - - - - - ff09205c by Andreas Klebinger at 2024-10-07T19:25:35-04:00 Adjust progress message for hadrian to include cwd. Fixes #25335 - - - - - 5fd320da by Sven Tennie at 2024-10-07T19:26:12-04:00 CCallConv test: Align argument types The C calling convention / standard requires that arguments and their values are of the same type. - - - - - c6e5fd3d by Cheng Shao at 2024-10-07T19:26:47-04:00 hadrian: remove unused ghciWithDebugger field from flavour config This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. - - - - - 9c9c790d by sheaf at 2024-10-07T19:27:23-04:00 user's guide: update docs for X86 CPU flags This commit updates the section of the user's guide pertaining to X86 feature flags with the following changes: - the NCG backend now supports SIMD, so remove all text that says the contrary, - the LLVM backend does not "automatically detect" features, so remove any text that makes that claim. - - - - - a1ecc826 by Sven Tennie at 2024-10-08T13:36:03-04:00 ci: RISCV64 cross-compile testing This adds a validation job which tests that we can build a riscv64 cross compiler and build a simple program using it. We do not currently run the whole testsuite. Towards #25254 Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - d5c2577f by Arnaud Spiwack at 2024-10-08T13:36:44-04:00 Remove unused accumulators in partition_errors - - - - - 55609880 by Andrzej Rybczak at 2024-10-09T16:41:46-04:00 Fix typo in the @since annotation of annotateIO - - - - - ef481813 by Alan Zimmerman at 2024-10-09T16:42:23-04:00 EPA: Remove [AddEpAnn] from (most of) HsExpr EPA: introduce EpAnnLam for lambda annotationsi, and remove `glAA` from `Parser.y`, it is the same as `glR` EPA: Remove unused annotation from XOpApp EPA: Use EpToken for XNPat and XNegApp EPA: specific anns for XExplicitTuple / XTuplePat / sumPatParens. EPA: Use specific annotation for MultiIf EPA: Move annotations into FunRhs EPA: Remove [AddEpAnn] from SigPat and ExprWithTySig EPA: Remove [AddEpAnn] from ArithSeq EPA: Remove [AddEpAnn] from HsProc EPA: Remove [AddEpAnn] from HsStatic EPA: Remove [AddEpAnn] from BindStmt EPA: Remove [AddEpAnn] from TransStmt EPA: Remove [AddEpAnn] from HsTypedSplice EPA: Remove [AddEpAnn] from HsUntypedSpliceExpr - - - - - 69960230 by Fabian Thorand at 2024-10-10T19:03:59+00:00 Handle exceptions from IO manager backend If an IO manager backend throws, it will not actually have registered the file descriptor. However, at that point, the IO manager state was already updated to assume the file descriptor is being tracked, leading to errors and an eventual deadlock down the line as documented in the issue #21969. The fix for this is to undo the IO manager state change in case the backend throws (just as we already do when the backend signals that the file type is not supported). The exception then bubbles up to user code. That way we make sure that 1. the bookkeeping state of the IO manager is consistent with the actions taken by the backend, even in the presence of unexpected failures, and 2. the error is not silent and visible to user code, making failures easier to debug. - - - - - 1587cccf by Hassan Al-Awwadi at 2024-10-11T03:52:36-04:00 Put RdrName in the foExt field of FieldOcc The main purpose of this commit is to rip RdrName out of FieldOcc, in accordance with #21592, and as a side note it has simplified the method we use to deal with ambiguity somewhat. To do the first, we make FieldOccs store (LIdP p) instead of always storing Located RdrName, and moved the readername to the extension points where necessary. For the second, well, we just turn an ambiguous RdrName into a unbound Name through mkUnboundName. Later during disambiguateRecordBinds of the type checking phase, we will try and do type-directed disambiguation based on the rdrName field (for now), so this hack works out fine. See Note [Ambiguous FieldOcc in record updates] for more details. There are two additional minor changes in this commit: * The HsRecSel constructor of HsExpr has been moved to the extension constuctors, since its really GHC specific. * HsProjection no longer has a Located DotFieldOcc as a field, but just a regular DotFieldOcc, since DotFieldOcc already wraps a located FieldLabelString co-authored by: @Jade <Jade512 at proton.me> @alt-romes <rodrigo.m.mesquita at gmail.com> - - - - - 2338a971 by Cheng Shao at 2024-10-11T03:53:13-04:00 driver: bail out when -fllvm is passed to GHC not configured with LLVM This patch makes GHC bail out with an proper error message when it's not configured with LLVM but users attempt to pass -fllvm, see #25011 and added comment for details. Fixes #25011 Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com> - - - - - 78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00 configure: Find C++ probing when GCC version is the latest but G++ is old #23118 - - - - - 083703a1 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Consider Wanteds with rewriters as insoluble This MR fixes #25325 See GHC.Tc.Types.Constraint, Note [Insoluble Wanteds], especially (IW2) There is a small change in the error message for T14172, but it looks entirely acceptable to me. - - - - - 0dfaeb66 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Wibbles - - - - - 09d24d82 by Simon Peyton Jones at 2024-10-11T03:54:32-04:00 Spelling errors - - - - - 694489ed by sheaf at 2024-10-11T03:55:14-04:00 LLVM: use sse4.2 instead of sse42 LLVM expects the former instead of the latter since version 3.4. Fixes #25019 - - - - - 06ae8507 by sheaf at 2024-10-11T03:55:14-04:00 LLVM: make SSE4.2 imply +popcnt For consistency with the NCG as well as with Clang and GCC, we make the SSE4.2 feature flag imply +popcnt when using the LLVM backend. Fixes #25353 - - - - - 3fe843c7 by Cheng Shao at 2024-10-11T03:55:50-04:00 Drop obsolete libffi Makefile This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. - - - - - df70405c by Ben Gamari at 2024-10-11T03:56:26-04:00 ghc-internal: Fix incomplete matches on IOError As noted in #25362, these incomplete matches were previously not being warned about. They were easily addressed by use of `GHC.Internal.Event.Windows.withException`. Closes #25362. - - - - - 8584504b by Matthew Pickering at 2024-10-11T03:57:02-04:00 compiler: Fix orientation of GHC.Hs.Doc boot file We should be free to import things from Language.Haskell.Syntax in GHC modules. Therefore the the boot file for the loop between ImpExp and GHC.Hs.Doc was in the wrong place. Issue #21592 - - - - - d029f170 by Ben Gamari at 2024-10-11T23:43:17-04:00 testsuite: Normalise trailing digits from hole fits output The type variables in the holes fit output from `abstract_refinement_hole_fits` is quite sensitive to compiler configuration. Specifically, a slight change in the inlining behavior of `throw` changes type variable naming in `(>>=)` and a few others. Ideally we would make hole fits output more deterministic but in the meantime we simply normalise this difference away as it not relevant to the test's goal. - - - - - da5d7d0d by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Add test for #25066 - - - - - eb7ddae1 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Fix #25066 As noted in #25066, the exception backtrace proposal introduced a rather subtle performance regression due to simplification producing Core which the demand analyser concludes may diverge with a precise exception. The nature of the problem is more completely described in the new Note [Hiding precise exception signature in throw]. The (rather hacky) solution we use here hides the problematic optimisation through judicious use of `noinline`. Ultimately however we will want a more principled solution (e.g. #23847). Fixes #255066 CLC proposal: https://github.com/haskell/core-libraries-committee/issues/290 Metric Decrease: T9872d - - - - - 0060ece7 by Ben Gamari at 2024-10-11T23:43:17-04:00 base: Improve documentation of Control.Exception.Backtrace - - - - - 18f532f3 by Ben Gamari at 2024-10-11T23:43:53-04:00 Bump process submodule to v1.6.25.0 - - - - - a9a3badf by Hassan Al-Awwadi at 2024-10-11T23:44:29-04:00 Move HsInteger and HsRat to an extension constructor These constructors were only used during the TC stage, or during template haskell. It seemed clear that it was independent of the source syntax represented in L.H.S, and thus we removed it according to #21592. - - - - - 4dd30cba by Artem Pelenitsyn at 2024-10-11T23:45:09-04:00 Docs: Linear types: link Strict Patterns subsection Also, fix a bug in RST with missing newline before a listing. Co-authored-by: Arnaud Spiwack <arnaud at spiwack.net> - - - - - adca5f2b by Ben Gamari at 2024-10-11T23:45:45-04:00 users guide: Address remaining TODOs in eventlog format docs Closes #25296. - - - - - 9291c125 by Sylvain Henry at 2024-10-11T23:46:26-04:00 Fix z-encoding of tuples (#25364) Tuples with prefix/suffix strings weren't always properly encoded with their shortcut notations. Fix this. - - - - - c08b68bc by Sven Tennie at 2024-10-11T23:47:01-04:00 Delete constants that can be deduced There are macros in MachRegs.h to figure those out. - - - - - 8b402da2 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: Handle broken symlinks properly when creating source dist directories If we have a broken symlink in the repository, don't try to `need` the symlink or the target of the symlink. Attempting to do so has `shake` attempt to read the target to compute its hash, which fails because the target doesn't exist. - - - - - 16f97667 by Zubin Duggal at 2024-10-12T20:36:57+00:00 hadrian: exclude cabal.project.symlink.broken from source archives Cabal 3.14 introduced a broken symlink in its testsuite. Unfortunately, this broke our source distribution as we use use `tar --dereference` to avoid issues with symlink compatibility on windows, and `tar --dereference` chokes when it encounters any broken symlinks. We can't get rid of `--dereference` because symlinks are generally broken on windows, so the only option is to exclude this file from source archives. see also https://github.com/haskell/cabal/issues/10442 - - - - - f1a2c9fc by Zubin Duggal at 2024-10-12T20:36:57+00:00 Bump Cabal submodule to 3.14 Metric Decrease: MultiLayerModulesTH_OneShot Metric Increase: haddock.Cabal - - - - - 745dd590 by Ben Gamari at 2024-10-14T09:13:12-04:00 users-guide: Document GHCi :where command Resolve #24509. - - - - - e9cc4699 by Alan Zimmerman at 2024-10-14T09:13:48-04:00 EPA: Remove [AddEpAnn] from IE, Pat and some Tys EPA: Remove [AddEpAnn] from LazyPat EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat EPA: Remove [AddEpAnn] from HsFieldBind EPA: Remove [AddEpAnn] from PatSynBind EPA: Remove [AddEpAnn] from IPBind EPA: Remove [AddEpAnn] from FixSig EPA: Remove [AddEpAnn] from activation rules EPA: Remove [AddEpann] from SpecInstSig EPA: Remove [AddEpAnn] from MinimalSig EPA: Remove [AddEpAnn] from SCCFunSig EPA: Remove [AddEpAnn] from CompleteMatchSig EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig EPA: Remove [AddEpAnn] from IEThingAbs EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith EPA: Remove [AddEpAnn] from IEModuleContents EPA: Remove [AddEpAnn] from HsOpTy EPA: Remove [AddEpAnn] for various binders EPA: Remove [AddEpAnn] for HsIParamTy - - - - - 81a570bf by Sebastian Graf at 2024-10-14T22:15:31-04:00 Desugaring, plus -Wincomplete-record-selectors This commit does several related things: * Major refactor of the handling of applications in the desugarer. Now all applications are handled in `dsApp`, `ds_app` and related functions. This dramatically simplifies the code and removes complicated cruft that had accumulated. Hooray. Fixes #25281. * Improve the handling of -Wincomplete-record-selectors. We now incorporate the result type of unsaturated record selector applications as well as consider long-distance information in getField applications. Plus, the implmentation now builds the improved `dsApp` stuff above, so it is much easier to understand. Plus, incorporates improved error message wording suggested by Adam Gundry in !12685. Fixes #24824, #24891 See the long Note [Detecting incomplete record selectors] * Add -Wincomplete-record-selectors to -Wall, as specified in GHC Proposal 516. To do this, I also had to add -Wno-incomplete-record-selectors to the build flags for Cabal in GHC's CI. See hadrian/src/Settings/Warnings.hs. We can remove this when Cabal is updated so that it doesn't trigger the warning: https://github.com/haskell/cabal/issues/10402 2.6% decrease in compile time allocation in RecordUpPerf Metric Decrease: RecordUpdPerf - - - - - ae7bc08e by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Elmininate incomplete record selectors This patch is a pure refactor of GHC's source code, to avoid the use of partial record selectors. It was provoked by adding -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified), which in turn showed up lots of places where GHC was using incomplete record selectors. This patch does mostly-simple refactoring to make it clear to the pattern match checker that there is in fact no partiality. There is one externally-visible change: I changed the data type HoleFit to split out the two cases data HoleFit = TcHoleFit TcHoleFit | RawHoleFit SDoc data TcHoleFit = HoleFit { ...lots of fields } There are large swathes of code that just deal with `TcHoleFit`, and having it as a separate data types makes it apparent that `RawHoleFit` can't occur. This makes it much better -- but the change is visible in the HolePlugin interface. I decided that there are so few clients of this API that it's worth the change. I moved several functions from Language.Haskell.Syntax to GHC.Hs. Reason, when instantiated at (GhcPass _), the extension data construtcor is guaranteed unused, and that justifies omitted patterns in these functions. By putting them in GHC.Hs.X I can specialise the type for (GhcPass _) and thereby make the function total. An interesting side-light is that there were a few local function definitions without a type signature, like this one in GHC.Parser.Header convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i) This is fully closed, and so is generalised; but that generalises it to any old pass, not (GhcPass _), so GHC rightly complains about the use of the selector `ideclPkgQual`. I added a type signature to `i`, thus convImport (L _ (i::ImportDecl GhcPs)) = (ideclPkgQual i, reLoc $ ideclName i) which specialised the function enough to make the record selector complete. Quite a surprising consequence of local let-generalisation! - - - - - 6a067226 by Simon Peyton Jones at 2024-10-14T22:15:31-04:00 Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi In the main MR, -Wall now includes -Wincomplete-record-selectors. However `hadrian-multi` has many, many warnings about incomplete record selectors, so this patch stops those warnings being treated as errors. (See discussion on !13308.) A better fix would be to remove the use of incomplete record selectors, since each of them represents a potential crash. - - - - - edeafc14 by Ben Gamari at 2024-10-14T22:16:08-04:00 users-guide: Document field coalescence - - - - - 55b83587 by ARATA Mizuki at 2024-10-14T22:16:49-04:00 LLVM backend: Use correct rounding for Float literals Fixes #22033 - - - - - e59fe5c6 by Hassan Al-Awwadi at 2024-10-15T08:25:33+00:00 Changed import from Ghc. module to L.H.S module Progresses #21592 For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for - - - - - ab1767d5 by Simon Peyton Jones at 2024-10-15T23:45:04-04:00 Add a release-notes entry for -Wincomplete-record-selectors - - - - - 6f0a62db by ur4t at 2024-10-16T15:33:43+00:00 GHCi: fix improper location of ghci_history file Fixes #24266 - - - - - 5f67db48 by Alan Zimmerman at 2024-10-17T05:18:43-04:00 EPA: Remove [AddEpAnn] commit 3 EPA: Remove [AddEpAnn] from HsDocTy EPA: Remove [AddEpAnn] from HsBangTy EPA: Remove [AddEpAnn] from HsExplicitListTy EPA: Remove [AddEpAnn] from HsExplicitTupleTy EPA: Remove [AddEpAnn] from HsTypedBracket EPA: Remove [AddEpAnn] from HsUntypedBracket EPA: Remove [AddEpAnn] from PatBuilderOpApp EPA: break out 'EpToken "|"' from ClassDecl anns EPA: Remove [AddEpAnn] from ClassDecl EPA: Remove [AddEpAnn] from SynDecl - - - - - fbbbd010 by Daan Rijks at 2024-10-17T05:19:19-04:00 Expand the haddocks for Control.Category - - - - - 076c1a10 by Andrew Lelechenko at 2024-10-17T05:19:19-04:00 documentation: more examples for Control.Category - - - - - 90891962 by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: mitigate host/target word size mismatch in BCOByteArray serialization This patch mitigates a severe host/target word size mismatch issue in BCOByteArray serialization logic introduced since !12142, see added note for detailed explanation. - - - - - 839ac52e by Cheng Shao at 2024-10-17T16:41:18+00:00 ghci: use plain malloc for mkConInfoTable on non-TNTC platforms This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. - - - - - a998f69d by Cheng Shao at 2024-10-17T16:41:18+00:00 ghc-internal: add missing CPPs for wasm This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. - - - - - 71a471e7 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: rename prelude.js to prelude.mjs This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. - - - - - 33d9db17 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: add __wrapped_freeJSVal This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. - - - - - 0d0a16a8 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: correct stale link in comment - - - - - 90a35c41 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: drop interpretBCO support from non-dyn ways on wasm This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. - - - - - 98a32ec5 by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: don't build predefined GloblRegs for wasm PIC mode This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. - - - - - bef94bde by Cheng Shao at 2024-10-17T16:41:18+00:00 rts: fix conflicting StgRun definitions on wasm This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. - - - - - a6a82cdb by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: use targetSupportsRPaths predicate This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. - - - - - f232c872 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. - - - - - 577c1819 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: enable internal-interpreter for ghc-bin stage0 This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. - - - - - c247f2ee by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: fix CFLAGS for gmp shared objs on wasm This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. - - - - - 775410fd by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: re-enable PIC for gmp on wasm This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. - - - - - b45080a3 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian: add the host_fully_static flavour transformer This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. - - - - - 5043507c by Cheng Shao at 2024-10-17T16:41:18+00:00 ci: update wasm jobs configuration This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. - - - - - 2956a3f7 by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/testsuite: implement config.cross logic This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). - - - - - 8c74a0ed by Cheng Shao at 2024-10-17T16:41:18+00:00 hadrian/compiler: implement targetRTSLinkerOnlySupportsSharedLibs This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. - - - - - b4c3c340 by Cheng Shao at 2024-10-17T16:41:18+00:00 testsuite: don't use host cpu features when testing cross ghc This patch disables CPU feature detection logic when testing cross GHC, since those features don't make sense for the target anyway. - - - - - 3c21b696 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: implement & use req_plugins predicate This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. - - - - - 93b8af80 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: make use of config.interp_force_dyn This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. - - - - - 94673d41 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T17572 timeout - - - - - 2b5efc2d by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: bump T22744 pre_cmd timeout - - - - - 45102e2a by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip terminfo_so for cross ghc - - - - - 05e40406 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: fix shared library size tests for cross ghc This commit fixes shared library size tests (e.g. array_so in testsuite/tests/perf/size/all.T) when testing cross ghc. Previously, if shared library file extension of host and target differs, those tests will fail with framework errors due to not finding the right files. - - - - - fa68f833 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip ghc api tests that attempt to spawn processes inside wasm This commit skips a few ghc api tests on wasm, since they would attempt to spawn processes inside wasm, which is not supported at all. - - - - - 1241c04e by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: skip T22840 due to broken -dtag-inference-checks on wasm - - - - - 78c8b900 by Cheng Shao at 2024-10-17T16:41:19+00:00 testsuite: ensure $(ghciWayFlags) can be overridden This commit revises boilerplate.mk in testsuite as well as a few other places, to ensure the tests that do make use of $(ghciWayFlags) can receive the right $(ghciWayFlags) from testsuite driver config. - - - - - 47989ecc by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip rdynamic on wasm - - - - - fefb4ea1 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: skip T2615 on wasm This commit marks T2615 as skip on wasm, given LD_* environment variables aren't supported on wasm anyway. - - - - - 77c79762 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: mark MultiLayerModulesTH_Make/MultiLayerModulesTH_OneShot as fragile on wasm - - - - - 69bb4745 by Cheng Shao at 2024-10-17T16:41:24+00:00 testsuite: fix T16180 on wasm This commit fixes T16180 on wasm once TH support is flipped on. The fix is simply adding right asm code for wasm. - - - - - 621c753d by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: fix -fexternal-interpreter flag for JS backend Previously, -fexternal-interpreter is broken for JS backend, since GHC would attempt to launch a non-existent ghc-iserv* executable. This commit fixes it by adjusting pattern matching order in setTopSessionDynFlags. - - - - - 80aa8983 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: use interpreterDynamic predicate in preloadLib This commit use the interpreterDynamic predicate in preloadLib to decide if we should do dynLoadObjs instead of loadObj. Previously we used hostIsDynamic which was only written with non-cross internal interpreter in mind. The testsuite is also adjusted to remove hard-wired -fPIC flag for cbits (doesn't work in i386 RTS linker in vanilla way, #25260) and properly pass ghc_th_way_flags to ghc. - - - - - 74411461 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix Cmm dynamic CLabels for wasm This commit fixes the handling of dynamic CLabels for the wasm backend. Just do the simplest handling: preserve the original CLabel, both unreg/NCG backends can handle them properly without issue. - - - - - f6abaf13 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary compile-time flags for wasm PIC mode This commit adds necessary compile-time flags when compiling for wasm PIC mode, see added comment for detailed explanation. - - - - - 9745fcfb by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: add necessary link-time flags for wasm shared libs This commit adds necessary link-time flags for wasm shared libs, see added comments for detailed explanation. - - - - - 649aae00 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: enforce -fno-use-rpaths for wasm This commit ensures the GHC driver never passes any RPATH-related link-time flags on wasm, which is not supported at all. - - - - - 47baa904 by Cheng Shao at 2024-10-17T16:41:24+00:00 driver: ensure static archives are picked when linking static .wasm modules This commit ensures static archives are picked when linking .wasm modules which are supposed to be fully static, even when ghc may be invoked with -dynamic, see added comment for explanation. - - - - - fc3a5591 by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix dynamic_too_enable for targets that require dynamic libraries This commit fixes dynamic_too_enable for targets whose RTS linker can only load dynamic code. - - - - - 94ef949e by Cheng Shao at 2024-10-17T16:41:24+00:00 compiler: fix checkNonStdWay for targets that require dynamic libraries This commit fixes checkNonStdWay to ensure that for targets whose RTS linker can only load dynamic code, the dynamic way of object is selected. - - - - - 88e99248 by Cheng Shao at 2024-10-17T16:41:24+00:00 ghc-bin: enforce dynamic way when the target requires so This commit makes ghc-bin use dynamic way when it is doing interactive stuff on certain targets whose RTS linker can only handle dynamic code. - - - - - 549582ef by Cheng Shao at 2024-10-17T16:41:24+00:00 hadrian/ghci: add wasm dyld This commit adds the wasm dynamic linker implementation, as well as ghci logic to call it and hadrian logic to install it to the correct location. See the top-level note in utils/jsffi/dyld.mjs for more details. - - - - - b562e3a6 by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: fix getGccSearchDirectory for wasm target This commit fixes getGccSearchDirectory logic for wasm target, ensures the correct search directory containing libc.so etc can be found by GHC. getGccSearchDirectory is also exported so it can be used elsewhere to obtain the wasi-sdk libdir and pass to the dyld script. - - - - - 2d6107dc by Cheng Shao at 2024-10-17T16:41:29+00:00 driver: add wasm backend iserv logic This commit adds wasm backend iserv logic to the driver, see added comments for explanation. - - - - - 61f5baa5 by Cheng Shao at 2024-10-17T16:41:29+00:00 compiler: add PIC support to wasm backend NCG This commit adds support for generating PIC to the wasm backend NCG. - - - - - 652e7239 by Cheng Shao at 2024-10-17T16:41:29+00:00 hadrian/compiler: flip on support for shared libs & ghci for wasm This commit flips on the support for shared libs and ghci for the wasm target, given all required support logic has been added in previous commits. - - - - - 74a1f681 by Cheng Shao at 2024-10-17T16:41:29+00:00 testsuite: flip on support for shared libs, TH & ghci for wasm This commit flips on support for shared libs, TH & ghci for wasm in the testsuite, given support has been landed in previous commits. - - - - - 525d451e by Cheng Shao at 2024-10-17T23:03:34-04:00 Revert "compiler: start deprecating cmmToRawCmmHook" This reverts commit 1c064ef1f3e1aa2afc996e962ad53effa99ec5f4. Turns out the GHC-WPC project does use it to observe Cmm in the pipeline, see #25363. - - - - - 5bcfefd5 by Cheng Shao at 2024-10-17T23:04:09-04:00 rts: fix pointer overflow undefined behavior in bytecode interpreter This patch fixes an unnoticed undefined behavior in the bytecode interpreter. It can be caught by building `rts/Interpreter.c` with `-fsanitize=pointer-overflow`, the warning message is something like: ``` rts/Interpreter.c:1369:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1369:13 rts/Interpreter.c:1265:13: runtime error: addition of unsigned offset to 0x004200197660 overflowed to 0x004200197658 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1265:13 rts/Interpreter.c:1645:13: runtime error: addition of unsigned offset to 0x0042000b22f8 overflowed to 0x0042000b22f0 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior rts/Interpreter.c:1645:13 ``` Whenever we do something like `SpW(-1)`, the negative argument is implicitly converted to an unsigned integer type and causes pointer arithmetic overflow. It happens to be harmless for most targets since overflowing would wrap the result to desired value, but it's still coincidental and undefined behavior. Furthermore, it causes real damage to the wasm backend, given clang-20 will emit invalid wasm code that crashes at run-time for this kind of C code! (see https://github.com/llvm/llvm-project/issues/108770) The fix here is adding some explicit casts to ensure we always use the signed `ptrdiff_t` type as right hand operand of pointer arithmetic. - - - - - eb67875f by Matthew Craven at 2024-10-18T12:18:35+00:00 Bump transformers submodule The svg image files mentioned in transformers.cabal were previously not checked in, which broke sdist generation. - - - - - 366a1109 by Matthew Craven at 2024-10-18T12:18:35+00:00 Remove reference to non-existent file in haddock.cabal - - - - - 826852e9 by Matthew Craven at 2024-10-18T12:18:35+00:00 Move tests T11462 and T11525 into tests/tcplugins - - - - - dbe27152 by Matthew Craven at 2024-10-18T12:18:35+00:00 Repair the 'build-cabal' hadrian target Fixes #23117. Fixes #23281. Fixes #23490. This required: * Updating the bit-rotted compiler/Setup.hs and its setup-depends * Listing a few recently-added libraries and utilities in cabal.project-reinstall * Setting allow-boot-library-installs to 'True' since Cabal now considers the 'ghc' package itself a boot library for the purposes of this flag Additionally, the allow-newer block in cabal.project-reinstall was removed. This block was probably added because when the libraries/Cabal submodule is too new relative to the cabal-install executable, solving the setup-depends for any package with a custom setup requires building an old Cabal (from Hackage) against the in-tree version of base, and this can fail un-necessarily due to tight version bounds on base. However, the blind allow-newer can also cause the solver to go berserk and choose a stupid build plan that has no business succeeding, and the failures when this happens are dreadfully confusing. (See #23281 and #24363.) Why does setup-depends solving insist on an old version of Cabal? See: https://github.com/haskell/cabal/blob/0a0b33983b0f022b9697f7df3a69358ee9061a89/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1393-L1410 The right solution here is probably to use the in-tree cabal-install from libraries/Cabal/cabal-install with the build-cabal target rather than whatever the environment happens to provide. But this is left for future work. - - - - - b3c00c62 by Matthew Craven at 2024-10-18T12:18:35+00:00 Revert "CI: Disable the test-cabal-reinstall job" This reverts commit 38c3afb64d3ffc42f12163c6f0f0d5c414aa8255. - - - - - a04959b8 by Daneel Yaitskov at 2024-10-19T09:34:15-04:00 base: speed up traceEventIO and friends when eventlogging is turned off #17949 Check the RTS flag before doing any work with the given lazy string. Fix #17949 Co-authored-by: Michael Peyton Jones <me at michaelpj.com> Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Matthew Pickering <matthewtpickering at gmail.com> - - - - - eff16c22 by Matthew Pickering at 2024-10-19T21:55:55-04:00 ci: Add support for ONLY_JOBS variable to trigger any validation pipeline By setting the ONLY_JOBS variable to the name of the job (or multiple jobs), the resulting pipeline will include a validation job for that pipeline. For example - if you set ONLY_JOBS="x86_64-linux-ubuntu22_04-validate" then a ubuntu22_04 job will be included in the validation pipeline. This is useful for testing specific jobs. Fixes #25332 - - - - - 280b6278 by Zubin Duggal at 2024-10-19T21:56:31-04:00 rel-eng: ghcup metadata generation: generated yaml anchors with meaningful names (cherry picked from commit d83f5bd730a8aef37d8a38b3560590d9798f8e45) - - - - - 25edf849 by Alan Zimmerman at 2024-10-19T21:57:08-04:00 EPA: Remove [AddEpAnn] Commit 4 EPA: Remove [AddEpAnn] from DataDecl This is quite a big change. The most important part is moving the annotations into HsDataDefn, using a specific annotation data type. It has a knock-on to everything that uses HsDataDefn EPA: Remove [AddEpAnn] for FunDep EPA: Remove [AddEpann] from FamilyDecl EPA: Remove [AddEpAnn] From InjectivityAnn EPA: Remove [AddEpAnn] from DefaultDecl EPA: Remove [AddEpAnn] from RuleDecls EPA: Remove [AddEpAnn] from Warnings - - - - - d5f42045 by Luite Stegeman at 2024-10-20T16:34:47-04:00 Interpreter: Add locking for communication with external interpreter This adds locking to communication with the external interpreter to prevent concurrent tasks interfering with each other. This fixes Template Haskell with the external interpreter in parallel (-j) builds. Fixes #25083 - - - - - d6bfea76 by Matthew James Kraai at 2024-10-20T16:35:29-04:00 Use monospace font for "Either a b" in fmap docs The documentation for fmap shows "`Either a b`" in the default font instead of showing "Either a b" in a monospace font. - - - - - 4bc7f9c8 by Luite Stegeman at 2024-10-20T16:36:15-04:00 Parser: remove non-ASCII characters from Parser.y Non-ASCII characters in the source causes a problem with the default Haskell Language Server setup in VSCode. Two characters seems to have been left in by accident. Workaround for #25396 - - - - - 7f61ed4e by Alan Zimmerman at 2024-10-21T06:39:45-04:00 EPA: Remove [AddEpAnn] Commit 5 EPA: Remove [AddEpAnn] from AnnPragma EPA: Remove [AddEpAnn] From ForeignDecl EPA: Remove [AddEpAnn] from RoleAnnotDecl EPA: Remove [AddEpAnn] from StandaloneKindSig EPA: Remove [AddEpAnn] From HsDeriving EPA: Remove [AddEpAnn] from ConDeclField EPA: Remove [AddEpAnn] from ConDeclGADT EPA: Remove [AddEpAnn] from ConDeclH98 EPA: Remove [AddEpAnn] from ClsInstDecl - - - - - f8694fe7 by Cheng Shao at 2024-10-21T06:40:21-04:00 wasm: bump dyld v8 heap size limit This patch adds `--max-old-space-size=8192` to wasm dyld shebang arguments to bump V8 heap size limit. The default limit (`heap_size_limit` returned by `v8.getHeapStatistics()`) is dynamically determined and a bit too low under certain workloads, and V8 would waste too much CPU time to garbage collect old generation heap more aggressively. Bumping the limit to 8G doesn't imply dyld would really take that much memory at run-time, but it lessens V8 heap stress significantly. - - - - - d328d173 by Luite Stegeman at 2024-10-21T12:39:18+00:00 Add requestTickyCounterSamples to GHC.Internal.Profiling This allows the user to request ticky counters to be written to the eventlog at specific times. See #24645 - - - - - 71765b1d by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Move defaulting code into a new module GHC.Tc.Solver had reached 4,000 lines -- although quite a lot of them are comments. This MR * Adds the new module GHC.Tc.Solver.Default, which has all the complex, but well modularised, defaulting code * Moves a bit of code from GHC.Tc.Solver into the existing GHC.Tc.Solver.Solve. Notably solveWanteds and simplifyWantedsTcM, which are called from GHC.Tc.Solver.Default It's a pure refactor. No code changes. - - - - - a398227b by Simon Peyton Jones at 2024-10-21T20:55:00-04:00 Improve the generalisation code in Solver.simplifyInfer The code in `decideQuantification` has become quite complicated. This MR straightens it out, adds a new Note, and on the way fixes #25266. See especially Note [decideAndPromoteTyVars] which is is where all the action happens in this MR. - - - - - 148059fe by Andrzej Rybczak at 2024-10-21T20:55:40-04:00 Adjust catches to properly rethrow exceptions https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13302 implemented exception rethrowing proposal, but it didn't adjust `catches`. This fixes it. - - - - - 25121dbc by doyougnu at 2024-10-22T09:38:18-04:00 linker: add --optimistic-linking flag This patch adds: - the --optimistic-linking flag which binds unknown symbols in the runtime linker to 0xDEADBEEF instead of exiting with failure - The test T25240 which tests these flags using dead code in the FFI system. - closes #25240 This patch is part of the upstreaming haskell.nix patches project. - - - - - f19e076d by doyougnu at 2024-10-22T09:38:18-04:00 ghc-internal: hide linkerOptimistic in MiscFlags - - - - - edc02197 by Cheng Shao at 2024-10-22T09:38:54-04:00 hadrian: fix bindist executable wrapper logic for cross targets This commit fixes an oversight of hadrian wrapper generation logic: when doing cross compilation, `wrapper` is called on executable names with cross prefix, therefore we must use `isSuffixOf` when matching to take the cross prefix into account. Also add missing cross prefix to ghci wrapper content and fix hsc2hs wrapper logic. - - - - - edf3bdf5 by Andreas Klebinger at 2024-10-22T16:30:42-04:00 mkTick: Push ticks through unsafeCoerce#. unsafeCoerce# doesn't exist at runtime so we should treat it like a Cast for the purpose of mkTick. This means if we have `{-# SCC foo #-} (unsafeCoerce# trivial_expr))` we now push the scope part of the cost centre up to `trivial_expr` at which point we can discard it completely if the expression is trivial enough. This fixes #25212. - - - - - 1bdb1317 by Cheng Shao at 2024-10-22T16:31:17-04:00 hadrian: enable late-CCS for perf flavour as well This patch enables late-CCS for perf flavour so that the testsuite can pass for perf as well. Fixes #25308. - - - - - fde12aba by Cheng Shao at 2024-10-22T16:31:54-04:00 hadrian: make sure ghc-bin internal-interpreter is disabled for stage0 when not cross compiling This patch disables internal-interpreter flag for stage0 ghc-bin when not cross compiling, see added comment for explanation. Fixes #25406. - - - - - 6ab8d751 by ignatiusm at 2024-10-24T01:23:35-04:00 Improve heap overflow exception message (#25198) Catch heap overflow exceptions and suggest using `+RTS -M<size>`. Fix #25198 - - - - - b3f7fb80 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 determinism: Interface re-export list det In 'DocStructureItem' we want to make sure the 'Avails' are sorted, for interface file determinism. This commit introduces 'DetOrdAvails', a newtype that should only be constructed by sorting Avails with 'sortAvails' unless the avails are known to be deterministically ordered. This newtype is used by 'DocStructureItem' where 'Avails' was previously used to ensure the list of avails is deterministically sorted by construction. Note: Even though we order the constructors and avails in the interface file, the order of constructors in the haddock output is still determined from the order of declaration in the source. This was also true before, when the list of constructors in the interface file <docs> section was non-deterministic. Some haddock tests such as "ConstructorArgs" observe this (check the order of constructors in out/ConstructorArgs.html vs src/ConstructorArgs.hs vs its interface file) The updated tests are caused by haddock corners where the order in the source is not preserved (and was non-deterministic before this PR): * Module header in the latex backend * Re-export of pattern synonyms associated to a datatype (#25342) Fixes #25304 - - - - - e39c8c99 by Rodrigo Mesquita at 2024-10-24T01:24:12-04:00 Revert "ci: Allow abi-test to fail." After #25304, the abi-test with interface and object determinism succeeds. This reverts commit 7b37afc9f3e79559055488998ee73187886a0e00. - - - - - 7b1b0c6d by Alan Zimmerman at 2024-10-24T13:07:02-04:00 EPA: reduce [AddEpann] in AnnList Remove it from the `al_rest` field, and make `AnnList` parameterized on a type to be used in `al_rest`, for the various use cases. - - - - - 4a00731e by Rodrigo Mesquita at 2024-10-24T13:07:38-04:00 Fix -fobject-determinism flag definition The flag should be defined as an fflag to make sure the -fno-object-determinism flag is also an available option. Fixes #25397 - - - - - 55e4b9f2 by Sebastian Graf at 2024-10-25T07:01:54-04:00 CorePrep: Attach evaldUnfolding to floats to detect more values See `Note [Pin evaluatedness on floats]`. - - - - - 9f57c96d by Sebastian Graf at 2024-10-25T07:01:54-04:00 Make DataCon workers strict in strict fields (#20749) This patch tweaks `exprIsConApp_maybe`, `exprIsHNF` and friends, and Demand Analysis so that they exploit and maintain strictness of DataCon workers. See `Note [Strict fields in Core]` for details. Very little needed to change, and it puts field seq insertion done by Tag Inference into a new perspective: That of *implementing* strict field semantics. Before Tag Inference, DataCon workers are strict. Afterwards they are effectively lazy and field seqs happen around use sites. History has shown that there is no other way to guarantee taggedness and thus the STG Strict Field Invariant. Knock-on changes: * I reworked the whole narrative around "Tag inference". It's now called "EPT enforcement" and I recycyled the different overview Notes into `Note [EPT enforcement]`. * `exprIsHNF` previously used `exprOkForSpeculation` on unlifted arguments instead of recursing into `exprIsHNF`. That regressed the termination analysis in CPR analysis (which simply calls out to `exprIsHNF`), so I made it call `exprOkForSpeculation`, too. * There's a small regression in Demand Analysis, visible in the changed test output of T16859: Previously, a field seq on a variable would give that variable a "used exactly once" demand, now it's "used at least once", because `dmdTransformDataConSig` accounts for future uses of the field that actually all go through the case binder (and hence won't re-enter the potential thunk). The difference should hardly be observable. * The Simplifier's fast path for data constructors only applies to lazy data constructors now. I observed regressions involving Data.Binary.Put's `Pair` data type. * Unfortunately, T21392 does no longer reproduce after this patch, so I marked it as "not broken" in order to track whether we regress again in the future. Fixes #20749, the satisfying conclusion of an annoying saga (cf. the ideas in #21497 and #22475). Compiler perf generally improves, sometimes drastically: Baseline Test Metric value New value Change -------------------------------------------------------------------------------- ManyConstructors(normal) ghc/alloc 3,629,760,116 3,711,852,800 +2.3% BAD MultiLayerModulesTH_OneShot(normal) ghc/alloc 2,502,735,440 2,565,282,888 +2.5% BAD T12707(normal) ghc/alloc 804,399,798 791,807,320 -1.6% GOOD T17516(normal) ghc/alloc 964,987,744 1,008,383,520 +4.5% T18140(normal) ghc/alloc 75,381,152 49,860,560 -33.9% GOOD T18698b(normal) ghc/alloc 232,614,457 184,262,736 -20.8% GOOD T18923(normal) ghc/alloc 62,002,368 58,301,408 -6.0% GOOD T20049(normal) ghc/alloc 75,719,168 70,494,368 -6.9% GOOD T3294(normal) ghc/alloc 1,237,925,833 1,157,638,992 -6.5% GOOD T9233(normal) ghc/alloc 686,490,105 635,166,688 -7.5% GOOD geo. mean -0.7% minimum -33.9% maximum +4.5% I looked at T17516. It seems we do a few more simplifier iterations and end up with a larger program. It seems that some things inline more, while other things inline less. I don't see low-hanging fruit. I also looked at MultiLayerModulesTH_OneShot. It appears we generate a strange join point in the `getUnique` method of `Uniquable GHC.Unit.Types.Module` that should better call-site inline, but does not. Perhaps with !11492. NoFib does not seem affected much either: +-------------------------------++--+------------+-----------+---------------+-----------+ | || | base/ | std. err. | T20749/ (rel) | std. err. | +===============================++==+============+===========+===============+===========+ | spectral/last-piece || | 7.263e8 | 0.0% | +0.62% | 0.0% | +===============================++==+============+===========+===============+===========+ | geom mean || | +0.00% | | | | +-------------------------------++--+------------+-----------+---------------+-----------+ I had a look at last-piece. Nothing changes in stg-final, but there is a bit of ... movement around Data.Map.insert's use of GHC.Exts.lazy that is gone in stg-final. Co-Authored-By: Jaro Reinders <jaro.reinders at gmail.com> Metric Decrease: T12707 T18140 T18698b T18923 T19695 T20049 T3294 T9233 T21839c Metric Increase: ManyConstructors MultiLayerModulesTH_OneShot - - - - - 0225249a by Simon Peyton Jones at 2024-10-25T07:02:32-04:00 Some renaming This is a pure refactor, tidying up some inconsistent naming: isEqPred --> isEqClassPred isEqPrimPred --> isEqPred isReprEqPrimPred --> isReprEqPred mkPrimEqPred --> mkNomEqPred mkReprPrimEqPred --> mkReprEqPred mkPrimEqPredRold --> mkEqPredRole Plus I moved mkNomEqPred, mkReprEqPred, mkEqPredRolek from GHC.Core.Coercion to GHC.Core.Predicate where they belong. That means that Coercion imports Predicate rather than vice versa -- better. - - - - - 15a3456b by Ryan Hendrickson at 2024-10-25T07:02:32-04:00 compiler: Fix deriving with method constraints See Note [Inferred contexts from method constraints] Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com> - - - - - dbc77ce8 by Alan Zimmerman at 2024-10-25T18:20:13+01:00 EPA: Remove AddEpann commit 7 EPA: Remove [AddEpAnn] from HYPHEN in Parser.y The return value is never used, as it is part of the backpack configuration parsing. EPA: Remove last [AddEpAnn] usages Remove residual usage in GHC. It is still used - In haddock TTG extension point definitions (to be removed) - Some check-exact residual, to be removed - Comments around DisambECP in PostProcess EPA: Clean up [AddEpAnn] from check-exact There is one left, to be cleaned up when we remove AddEpann itself EPA: Remove [AddEpAnn] from haddock The TTG extension points need a value, it is not critical what that value is, in most cases. EPA: Remove AddEpAnn from HsRuleAnn EPA: Remove AddEpAnn from HsCmdArrApp - - - - - 23ddcc01 by Simon Peyton Jones at 2024-10-26T12:44:34-04:00 Fix optimisation of InstCo It turned out (#25387) that the fix to #15725 was not quite right: commit 48efbc04bd45d806c52376641e1a7ed7278d1ec7 Date: Mon Oct 15 10:25:02 2018 +0200 Fix #15725 with an extra Sym Optimising InstCo is quite subtle, and the invariants surrounding the LiftingContext in the coercion optimiser were not stated explicitly. This patch refactors the InstCo optimisation, and documents these invariants. See * Note [Optimising InstCo] * Note [The LiftingContext in optCoercion] I also did some refactoring of course: * Instead of a Bool swap-flag, I am not using GHC.Types.Basic.SwapFlag * I added some invariant-checking the coercion-construction functions in GHC.Core.Coercion.Opt. (Sadly these invariants don't hold during typechecking, becuase the types are un-zonked, so I can't put these checks in GHC.Core.Coercion.) - - - - - 589fea7f by Cheng Shao at 2024-10-27T05:36:38-04:00 ghcid: use multi repl for ghcid - - - - - d52a0475 by Andrew Lelechenko at 2024-10-27T05:37:13-04:00 documentation: add motivating section to Control.Monad.Fix - - - - - 301c3b54 by Cheng Shao at 2024-10-27T05:37:49-04:00 wasm: fix safari console error message related to import("node:timers") This patch fixes the wasm backend JSFFI prelude script to avoid calling `import("node:timers")` on non-deno hosts. Safari doesn't like it and would print an error message to the console. Fixes https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/issues/13. - - - - - 9f02dfb5 by Simon Peyton Jones at 2024-10-27T15:10:08-04:00 Add a missing tidy in UnivCo We were failing to tidy the argument coercions of a UnivCo, which led directly to #25391. The fix is, happily, trivial. I don't have a small repro case (it came up when building horde-ad, which uses typechecker plugins). It should be possible to make a repro case, by using a plugin (which builds a UnivCo) but I decided it was not worth the bother. The bug is egregious and easily fixed. - - - - - 853050c3 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 Bump text submodule to 2.1.2 - - - - - 90746a59 by Andrew Lelechenko at 2024-10-27T15:10:44-04:00 hadrian: allow -Wunused-imports for text package - - - - - 8a6691c3 by Alan Zimmerman at 2024-10-27T19:44:48+00:00 EPA: Remove AddEpAnn Commit 8/final EPA: Remove AddEpAnn from AnnList EPA: Remove AddEpAnn from GrhsAnn This is the last actual use EPA: Remove NameAdornment from NameAnn Also rework AnnContext to use EpToken, and AnnParen EPA: Remove AddEpAnn. Final removal There are now none left, except for in a large note/comment in PostProcess, describing the historical transition to the disambiguation infrastructure - - - - - d5e7990c by Alan Zimmerman at 2024-10-28T21:41:05+00:00 EPA: Remove AnnKeywordId. This was used as part of AddEpAnn, and is no longer needed. Also remove all the haddock comments about which of are attached to the various parts of the AST. This is now clearly captured in the appropriate TTG extension points, and the `ExactPrint.hs` file. - - - - - e08b8370 by Serge S. Gulin at 2024-10-29T23:17:01-04:00 JS: Re-add optimization for literal strings in genApp (fixes #23479) Based on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588/ Co-authored-by: Sylvain Henry <sylvain at haskus.fr> Co-authored-by: Andrei Borzenkov <root at sandwitch.dev> Co-authored-by: Danil Berestov <goosedb at yandex.ru> ------------------------- Metric Decrease: T25046_perf_size_gzip size_hello_artifact size_hello_artifact_gzip size_hello_unicode size_hello_unicode_gzip ------------------------- - - - - - e3496ef6 by Cheng Shao at 2024-10-29T23:17:37-04:00 compiler: remove unused hscDecls/hscDeclsWithLocation This patch removes unused `hscDecls`/`hscDeclsWithLocation` functions from the compiler, to reduce maintenance burden when doing refactorings related to ghci. - - - - - b1eed26f by Cheng Shao at 2024-10-29T23:18:13-04:00 testsuite: add T25414 test case marked as broken This commit adds T25414 test case to demonstrate #25414. It is marked as broken and will be fixed by the next commit. - - - - - e70009bc by Cheng Shao at 2024-10-29T23:18:13-04:00 driver: fix foreign stub handling logic in hscParsedDecls This patch fixes foreign stub handling logic in `hscParsedDecls`. Previously foreign stubs were simply ignored here, so any feature that involve foreign stubs would not work in ghci (e.g. CApiFFI). The patch reuses `generateByteCode` logic and eliminates a large chunk of duplicate logic that implements Core to bytecode generation pipeline here. Fixes #25414. - - - - - 1d7cd7fe by Andreas Klebinger at 2024-10-30T19:14:28-04:00 Add since tag for -fwrite-if-compression in user guide. Partial fix for #25395 - - - - - b349fd1b by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: Remove some unused functions - - - - - f859d61c by Alan Zimmerman at 2024-10-30T19:15:04-04:00 EPA: use explicit vertical bar token for ExplicitSum / SumPat - - - - - 721ac00d by Ben Gamari at 2024-10-31T08:37:38-04:00 rts/Disassembler: Fix encoding of BRK_FUN instruction The offset of the CC field was not updated after the encoding change in b85b11994e0130ff2401dd4bbdf52330e0bcf776. Fix this. Fixes #25374. - - - - - 0bc94360 by Alan Zimmerman at 2024-10-31T08:38:15-04:00 EPA: Bring in last EpToken usages For import declarations, NameAnnCommas and NPlusKPat. And remove anchor, it is the same as epaLocationRealSrcSpan. - - - - - 0b11cdc0 by sheaf at 2024-10-31T08:38:55-04:00 Assert that ctEvCoercion is called on an equality Calling 'ctEvCoercion' on non-equality constraints is always incorrect. We add an assertion to this function to detect such cases; for example a type-checking plugin might erroneously do this. - - - - - ea458779 by doyougnu at 2024-11-01T18:11:33-04:00 ghc-internal: strict, unboxed src loc ranges - closes: #20449 - See CLC proposal: #55 - - - - - 778ac793 by Kazuki Okamoto at 2024-11-01T18:12:13-04:00 No haddock markup in doctest line - - - - - cf0deeaf by Andreas Klebinger at 2024-11-02T17:54:52-04:00 Reword -fexpose-overloaded-unfoldings docs. This should make them slightly clearer. Fixes #24844 Co-authored-by: Sylvain Henry <sylvain at haskus.fr> - - - - - 1c21e7d4 by Andreas Klebinger at 2024-11-02T17:55:29-04:00 Compile T25062 simd tests even if we can't run them. Helps avoid them being utterly broken. Fixes #25341 - - - - - 573cad4b by Cheng Shao at 2024-11-02T17:56:04-04:00 Remove unused USE_REPORT_PRELUDE code paths from the tree This patch removes unused `USE_REPORT_PRELUDE` code paths from the tree. They have been present since the first git revision 4fb94ae5e5d632748fa2e6c35e259eccc5a1a3f4, and might have been useful for debugging purposes many years ago, but these code paths are never actually built. Removing these ease maintenance of relevant modules in the future, and also allows us to get rid of `CPP` extension in those modules as a nice byproduct. - - - - - 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - 51b84193 by Matthew Pickering at 2024-11-28T17:26:57+05:30 Build base and boot libs with trace-foreign-calls Currently based on ghc-9.10.1-alpha3. Co-authored-with: Edsko de Vries <edsko at well-typed.com> - - - - - eb512443 by Zubin Duggal at 2024-11-28T17:26:57+05:30 ignore safe errors - - - - - 10 changed files: - .ghcid - + .git-blame-ignore-revs - .gitignore - .gitlab-ci.yml - + .gitlab/README.md - .gitlab/ci.sh - .gitlab/darwin/nix/sources.json - .gitlab/darwin/toolchain.nix - .gitlab/generate-ci/flake.lock - .gitlab/generate-ci/gen_ci.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7c5290f6faf80c5d905d40523578dc9cf9ad97fa...eb5124433e78cc6f0953c2633f1bb534978151b7 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7c5290f6faf80c5d905d40523578dc9cf9ad97fa...eb5124433e78cc6f0953c2633f1bb534978151b7 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 12:53:55 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Thu, 28 Nov 2024 07:53:55 -0500 Subject: [Git][ghc/ghc][wip/ghc-9.12-rc1] testsuite: Also match placeholders when normalising callsites Message-ID: <674867e339d_3379171e6a54921d5@gitlab.mail> Zubin pushed to branch wip/ghc-9.12-rc1 at Glasgow Haskell Compiler / GHC Commits: 5d938345 by Zubin Duggal at 2024-11-28T18:23:25+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites (cherry picked from commit 2807f91bfb0b1e60ea8668622eae344e9ff5d840) - - - - - 1 changed file: - testsuite/driver/testlib.py Changes: ===================================== testsuite/driver/testlib.py ===================================== @@ -2857,7 +2857,7 @@ def normalise_whitespace(s: str) -> str: # Merge contiguous whitespace characters into a single space. return ' '.join(s.split()) -callSite_re = re.compile(r', called at (.+):[\d]+:[\d]+ in [\w\-\.]+:') +callSite_re = re.compile(r', called at (.+):[\d]+:[\d]+ in [<>\w\-\.]+:') def normalise_callstacks(s: str) -> str: opts = getTestOpts() View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5d938345841e3dff6a1dfa129202ba939a4564c9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5d938345841e3dff6a1dfa129202ba939a4564c9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 15:27:14 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 28 Nov 2024 10:27:14 -0500 Subject: [Git][ghc/ghc][master] hadrian: Bump directory bound to >=1.3.9 Message-ID: <67488bd2ce534_337917808f2c1081cc@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 7890f2d8 by Ben Gamari at 2024-11-28T10:26:46-05:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Also includes necessary Hadrian bootstrap plan bump. Fixes #24382. - - - - - 5 changed files: - .gitlab/ci.sh - hadrian/bootstrap/plan-9_10_1.json - hadrian/bootstrap/plan-9_6_1.json - hadrian/bootstrap/plan-9_6_2.json - hadrian/bootstrap/plan-9_6_3.json The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7890f2d8526dd90584eaa181ab10bd30d90e6743 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/7890f2d8526dd90584eaa181ab10bd30d90e6743 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 15:27:42 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 28 Nov 2024 10:27:42 -0500 Subject: [Git][ghc/ghc][master] mention -Iw in +RTS -? Message-ID: <67488bee88c3e_3379178031f81111ac@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 0fd43ea6 by Adam Sandberg Ericsson at 2024-11-28T10:27:22-05:00 mention -Iw in +RTS -? - - - - - 1 changed file: - rts/RtsFlags.c Changes: ===================================== rts/RtsFlags.c ===================================== @@ -361,6 +361,7 @@ usage_text[] = { " -w Use mark-region for the oldest generation (experimental)", #if defined(THREADED_RTS) " -I Perform full GC after idle time (default: 0.3, 0 == off)", +" -Iw Minimum wait time between idle GC runs (default: 0, 0 == no min wait time)", #endif "", " -T Collect GC statistics (useful for in-program statistics access)", View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0fd43ea61272d8424fdd90bcd2fcf5fd54ef4bec -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0fd43ea61272d8424fdd90bcd2fcf5fd54ef4bec You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 15:28:26 2024 From: gitlab at gitlab.haskell.org (Marge Bot (@marge-bot)) Date: Thu, 28 Nov 2024 10:28:26 -0500 Subject: [Git][ghc/ghc][master] gitlab-ci: Set GIT_SUBMODULE_FORCE_HTTPS Message-ID: <67488c1ad0d0b_3379178086bc11684d@gitlab.mail> Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 6cf579b9 by Ben Gamari at 2024-11-28T10:27:59-05:00 gitlab-ci: Set GIT_SUBMODULE_FORCE_HTTPS GitLab recommends using `https://` to clone submodules and provides the `GIT_SUBMODULE_FORCE_HTTPS` variable to force this. Fixes #25528. - - - - - 1 changed file: - .gitlab-ci.yml Changes: ===================================== .gitlab-ci.yml ===================================== @@ -22,6 +22,9 @@ variables: GIT_SUBMODULE_STRATEGY: "normal" + # GitLab recommends using https:, not ssh:, to clone submodules. See #25528. + GIT_SUBMODULE_FORCE_HTTPS: 1 + # Makes ci.sh isolate CABAL_DIR HERMETIC: "YES" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6cf579b948eee4ba5a6da9ca342c25f669aefdd4 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6cf579b948eee4ba5a6da9ca342c25f669aefdd4 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 16:27:23 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Thu, 28 Nov 2024 11:27:23 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/ci-improve-git-fetch Message-ID: <674899eb274d2_e2c002d5dac879b1@gitlab.mail> Cheng Shao pushed new branch wip/ci-improve-git-fetch at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/ci-improve-git-fetch You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 18:48:39 2024 From: gitlab at gitlab.haskell.org (Cheng Shao (@TerrorJack)) Date: Thu, 28 Nov 2024 13:48:39 -0500 Subject: [Git][ghc/ghc] Pushed new branch wip/fix-cross-breakarray Message-ID: <6748bb0754234_e2c008e39381044b2@gitlab.mail> Cheng Shao pushed new branch wip/fix-cross-breakarray at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/fix-cross-breakarray You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 22:41:26 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Thu, 28 Nov 2024 17:41:26 -0500 Subject: [Git][ghc/ghc][wip/T24359] Constant dictionaries can depend on /type/ variables Message-ID: <6748f1967a9fb_e2c00103944412394d@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: a8625e28 by Simon Peyton Jones at 2024-11-28T22:40:46+00:00 Constant dictionaries can depend on /type/ variables - - - - - 1 changed file: - compiler/GHC/HsToCore/Binds.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -785,6 +785,52 @@ The restrictions are: 4. Unlifted binds may not be recursive. Checked in second clause of ds_val_bind. +Note [Desugaring SPECIALISE pragmas] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Suppose we have f :: forall a b. (Ord a, Eq b) => a -> b -> b, and a pragma + + {-# SPECIALISE forall x. f @[a] @[Int] x 3 #-} + +The SPECIALISE pragma has an expression that desugars to something like + + forall @a (d:Ord a) (x:[a]). + let d2:Ord [a] = $dfOrdList d + d3:Eq [Int] = $dfEqList $dfEqInt + in f @[a] @[Int] d2 d3 x 3 + +We want to get + + RULE forall a (d2:Ord a) (d3:Eq [Int]) (x:[a]). + f @[a] @[Int] d2 d3 x 3 = $sf d2 x + + $sf :: forall a. Ord [a] => a -> Int + $sf = /\a. d2 x. + let d3 = $dfEqList $dfEqInt + in @[a] @[Int] d2 d3 x 3 + +Notice that +* We want to quantify the RULE over the free vars of the /call/ inside all + those dictionary bindings. + +* The LHS of the RULE wants to mention that call, again shorn of the dictionary + bindings + +* Where the dictionary binding depends only on constants, we move it to the specialised + function body. That is crucial -- it makes those specialised methods available in the + specialised body. This are the `const_dict_binds`. + +* Where the dicionary binding depends on locally-quanitified dictionries, we just discard + the binding, and pass the dictionary to the specialised function directly. No type-class + specialisation arises thereby. + +Some wrinkles: + +(DS1) The `const-dict_binds` /can/ depend on locally-quantifed type vaiables. + For example, if we have + instance Monad (ST s) where ... + the the dictionary for (Monad (ST s)) is effectlvely a constant dictionary. This + is important to get specialisation for such types. Emxample in test T8331. + -} ------------------------ @@ -863,6 +909,7 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id prepareSpecLHS :: Id -> [EvVar] -> CoreExpr -> Maybe (VarSet, [CoreBind], [CoreExpr]) +-- See Note [Desugaring SPECIALISE pragmas] prepareSpecLHS poly_id evs the_call = go (mkVarSet evs) [] the_call where @@ -875,7 +922,7 @@ prepareSpecLHS poly_id evs the_call go qevs acc (Let bind e) | not (all isDictId bndrs) -- A normal 'let' is too complicated = Nothing - | all (isEmptyVarSet . exprSomeFreeVars (`elemVarSet` qevs)) $ + | all (isEmptyVarSet . exprSomeFreeVars (is_quant_id qevs)) $ rhssOfBind bind = go qevs (bind:acc) e | otherwise @@ -890,6 +937,9 @@ prepareSpecLHS poly_id evs the_call | otherwise = Nothing + is_quant_id qevs v = isId v && v `elemVarSet` qevs + -- See Note [Desugaring SPECIALISE pragmas] wrinkle (DS1) + finishSpecPrag :: CoreExpr -- RHS to specialise -> [Var] -> Id -> [CoreExpr] -- RULE LHS pattern -> [Var] -> (CoreExpr -> CoreExpr) -> InlinePragma -- Specialised form View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a8625e2829d038038fc1dbb1d4a035a5d23ee925 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a8625e2829d038038fc1dbb1d4a035a5d23ee925 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Thu Nov 28 23:04:51 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Thu, 28 Nov 2024 18:04:51 -0500 Subject: [Git][ghc/ghc][wip/T25445b] Work in progres on linting applications Message-ID: <6748f713f0bbf_32e801bc6ec994d4@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445b at Glasgow Haskell Compiler / GHC Commits: d20da364 by Simon Peyton Jones at 2024-11-28T23:04:15+00:00 Work in progres on linting applications - - - - - 1 changed file: - compiler/GHC/Core/Lint.hs Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -1454,7 +1454,17 @@ subtype of the required type, as one would expect. -- Returns the *result* of applying the function to arguments. -- e.g. f :: Int -> Bool -> Int would return `Int` as result type. lintCoreArgs :: (OutType, UsageEnv) -> [CoreArg] -> LintM (OutType, UsageEnv) -lintCoreArgs (fun_ty, fun_ue) args = foldM lintCoreArg (fun_ty, fun_ue) args +lintCoreArgs (fun_ty, fun_ue) args + = do { in_scope <- getInScope + ; let init_subst = mkEmptySubst in_scope + go subst (fun_ty,fun_ue) [] + = (substTy subst fun_ty, fun_ue) + + + go subst (fun_ty, fun_ue) all_args@(Type ty:args) + | + + ; go init_subst (fun_ty, fun_ue) args } lintCoreArg :: (OutType, UsageEnv) -> CoreArg -> LintM (OutType, UsageEnv) @@ -1811,7 +1821,7 @@ lintLinearBinder doc actual_usage described_usage -- 1. Lint var types or kinds (possibly substituting) -- 2. Add the binder to the in scope set, and if its a coercion var, -- we may extend the substitution to reflect its (possibly) new kind -lintBinders :: BindingSite -> [InVar] -> ([OutVar] -> LintM a) -> LintM a +lintBinders :: HasDebugCallStack => BindingSite -> [InVar] -> ([OutVar] -> LintM a) -> LintM a lintBinders _ [] linterF = linterF [] lintBinders site (var:vars) linterF = lintBinder site var $ \var' -> lintBinders site vars $ \ vars' -> @@ -1819,28 +1829,28 @@ lintBinders site (var:vars) linterF = lintBinder site var $ \var' -> -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism] -lintBinder :: BindingSite -> InVar -> (OutVar -> LintM a) -> LintM a +lintBinder :: HasDebugCallStack => BindingSite -> InVar -> (OutVar -> LintM a) -> LintM a lintBinder site var linterF | isTyCoVar var = lintTyCoBndr var linterF | otherwise = lintIdBndr NotTopLevel site var linterF -lintTyCoBndr :: TyCoVar -> (OutTyCoVar -> LintM a) -> LintM a +lintTyCoBndr :: HasDebugCallStack => TyCoVar -> (OutTyCoVar -> LintM a) -> LintM a lintTyCoBndr tcv thing_inside = do { tcv_type' <- lintTypeAndSubst (varType tcv) - ; let tcv_kind = typeKind tcv_type' + ; let tcv_kind' = typeKind tcv_type' -- See (FORALL1) and (FORALL2) in GHC.Core.Type ; if (isTyVar tcv) then -- Check that in (forall (a:ki). blah) we have ki:Type - lintL (isLiftedTypeKind tcv_kind) $ + lintL (isLiftedTypeKind tcv_kind') $ hang (text "TyVar whose kind does not have kind Type:") - 2 (ppr tcv <+> dcolon <+> ppr tcv_type' <+> dcolon <+> ppr (typeKind tcv_kind)) + 2 (ppr tcv <+> dcolon <+> ppr tcv_type' <+> dcolon <+> ppr tcv_kind') else -- Check that in (forall (cv::ty). blah), -- then ty looks like (t1 ~# t2) lintL (isCoVarType tcv_type') $ text "CoVar with non-coercion type:" <+> pprTyVar tcv - ; addInScopeTyCoVar tcv tcv_kind thing_inside } + ; addInScopeTyCoVar tcv tcv_type' thing_inside } lintIdBndrs :: forall a. TopLevelFlag -> [InId] -> ([OutId] -> LintM a) -> LintM a lintIdBndrs top_lvl ids thing_inside @@ -2021,7 +2031,7 @@ lintForAllBody tcv body_ty -- See Note [Phantom type variables in kinds] in GHC.Core.Type -- The kind of (forall cv. th) is liftedTypeKind, so no -- need to check for skolem-escape in the CoVar case - body_kind <- substTyM body_ty + body_kind <- substTyM (typeKind body_ty) ; when (isTyVar tcv) $ case occCheckExpand [tcv] body_kind of Just {} -> return () @@ -2149,13 +2159,14 @@ lint_app msg !kfn arg_tys ; go_app in_scope kfb tas } go_app in_scope (ForAllTy (Bndr kv _vis) kfn) (ta:tas) - = do { let kv_kind = varType kv - ; ka <- substTyM (typeKind ta) + = do { ta' <- substTyM ta + ; let kv_kind = varType kv + ka = typeKind ta' ; unless (ka `eqType` kv_kind) $ addErrL (lint_app_fail_msg kfn arg_tys msg (text "Forall:" <+> (ppr kv $$ ppr kv_kind $$ - ppr ta <+> dcolon <+> ppr ka))) - ; let kind' = substTy (extendTCvSubst (mkEmptySubst in_scope) kv ta) kfn + ppr ta' <+> dcolon <+> ppr ka))) + ; let kind' = substTy (extendTCvSubst (mkEmptySubst in_scope) kv ta') kfn ; go_app in_scope kind' tas } go_app _ kfn ta @@ -2166,7 +2177,7 @@ lint_app msg !kfn arg_tys -- explicitly and don't capture them as free variables. Otherwise this binder might -- become a thunk that get's allocated in the hot code path. -- See Note [Avoiding compiler perf traps when constructing error messages.] -lint_app_fail_msg :: (Outputable a1, Outputable a2) => a1 -> a2 -> SDoc -> SDoc -> SDoc +lint_app_fail_msg :: OutKind -> [InType] -> SDoc -> SDoc -> SDoc lint_app_fail_msg kfn arg_tys msg extra = vcat [ hang (text "Kind application error in") 2 msg , nest 2 (text "Function kind =" <+> ppr kfn) @@ -2348,8 +2359,9 @@ lintCoercion co@(TyConAppCo r tc cos) | otherwise = do { checkTyCon tc ; mapM_ lintCoercion cos - ; lint_co_app co (tyConKind tc) (map coercionLKind cos) - ; lint_co_app co (tyConKind tc) (map coercionRKind cos) + ; let tc_kind = tyConKind tc + ; lint_co_app co tc_kind (map coercionLKind cos) + ; lint_co_app co tc_kind (map coercionRKind cos) ; zipWithM_ (lintRole co) (tyConRoleListX r tc) (map coercionRole cos) } @@ -2361,7 +2373,9 @@ lintCoercion co@(AppCo co1 co2) | otherwise = do { lintCoercion co1 ; lintCoercion co2 - ; Pair lk1 rk1 <- substCoKindM co1 + ; let !(Pair lt1 rt1) = coercionKind co1 + ; lk1 <- substTyM (typeKind lt1) + ; rk1 <- substTyM (typeKind rt1) ; lint_co_app co lk1 [coercionLKind co2] ; lint_co_app co rk1 [coercionRKind co2] @@ -3337,10 +3351,10 @@ addErrL msg = LintM $ \ env (warns,errs) -> addWarnL :: SDoc -> LintM () addWarnL msg = LintM $ \ env (warns,errs) -> - fromBoxedLResult (Just (), (addMsg False env warns msg, errs)) + fromBoxedLResult (Just (), (addMsg True env warns msg, errs)) addMsg :: Bool -> LintEnv -> Bag SDoc -> SDoc -> Bag SDoc -addMsg is_error env msgs msg +addMsg show_context env msgs msg = assertPpr (notNull loc_msgs) msg $ msgs `snocBag` mk_msg msg where @@ -3349,8 +3363,9 @@ addMsg is_error env msgs msg cxt_doc = vcat [ vcat $ reverse $ map snd loc_msgs , text "Substitution:" <+> ppr (le_subst env) ] - context | is_error = cxt_doc - | otherwise = whenPprDebug cxt_doc + + context | show_context = cxt_doc + | otherwise = whenPprDebug cxt_doc -- Print voluminous info for Lint errors -- but not for warnings @@ -3403,7 +3418,7 @@ addInScopeId in_id out_ty thing_inside | isJoinId out_id = extendVarSet join_set in_id -- Overwrite with new arity | otherwise = delVarSet join_set in_id -- Remove any existing binding -addInScopeTyCoVar :: InTyCoVar -> OutType -> (OutTyCoVar -> LintM a) -> LintM a +addInScopeTyCoVar :: HasDebugCallStack => InTyCoVar -> OutType -> (OutTyCoVar -> LintM a) -> LintM a addInScopeTyCoVar tcv tcv_kind thing_inside = LintM $ \ env@(LE { le_in_vars = in_vars, le_subst = subst }) errs -> let (tcv', subst') = subst_bndr subst @@ -3449,8 +3464,10 @@ getSubst = LintM (\ env errs -> fromBoxedLResult (Just (le_subst env), errs)) substTyM :: InType -> LintM OutType -- Apply the substitution to the type -- The substitution is usually empty, so this is usually a no-op -substTyM ty = LintM $ \ env errs -> - fromBoxedLResult (Just (substTy (le_subst env) ty), errs) +substTyM ty + = do { subst <- getSubst + ; checkWarnL (isEmptyTCvSubst subst) (ppr subst) + ; return (substTy subst ty) } getUEAliases :: LintM (NameEnv UsageEnv) getUEAliases = LintM (\ env errs -> fromBoxedLResult (Just (le_ue_aliases env), errs)) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d20da364748dc77dc7590411636c818daf8fa33f -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d20da364748dc77dc7590411636c818daf8fa33f You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 11:19:16 2024 From: gitlab at gitlab.haskell.org (Rodrigo Mesquita (@alt-romes)) Date: Fri, 29 Nov 2024 06:19:16 -0500 Subject: [Git][ghc/ghc][wip/romes/refator-modulegraph] Refactor ModuleGraph interface Message-ID: <6749a33421793_7ca1e372dc841636@gitlab.mail> Rodrigo Mesquita pushed to branch wip/romes/refator-modulegraph at Glasgow Haskell Compiler / GHC Commits: b6656976 by Rodrigo Mesquita at 2024-11-29T11:18:26+00:00 Refactor ModuleGraph interface The 'ModuleGraph' abstraction represents the relationship and strucutre of the modules being compiled. This structure is meant to be constructed once at the start of compilation, and never changed again. However, it's exposed interface was confusing and exposed too many footguns which led to inneficient usages of the ModuleGraph. This commit improves significantly the exported interface of ModuleGraph, taking into consideration the recent improvements around reachability queries. Since the ModuleGraph graphs and related structures (HPT, EPS) are performance critical in the sense that somewhat simple mistakes can cause bad leaks and non-linear memory usage, we want to have proper APIs that guide efficient usage. This is a good step in that direction. - - - - - 8 changed files: - compiler/GHC.hs - compiler/GHC/Driver/Env.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Make.hs - compiler/GHC/Unit/Module/Graph.hs - compiler/GHC/Unit/Module/ModSummary.hs - testsuite/tests/ghc-api/downsweep/OldModLocation.hs - testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs Changes: ===================================== compiler/GHC.hs ===================================== @@ -74,7 +74,7 @@ module GHC ( compileToCoreModule, compileToCoreSimplified, -- * Inspecting the module structure of the program - ModuleGraph, emptyMG, mapMG, mkModuleGraph, mgModSummaries, + ModuleGraph, emptyMG, mgMap, mkModuleGraph, mgModSummaries, mgLookupModule, ModSummary(..), ms_mod_name, ModLocation(..), pattern ModLocation, @@ -874,7 +874,7 @@ setProgramDynFlags_ invalidate_needed dflags = do -- invalidateModSummaryCache :: GhcMonad m => m () invalidateModSummaryCache = - modifySession $ \h -> h { hsc_mod_graph = mapMG inval (hsc_mod_graph h) } + modifySession $ \h -> h { hsc_mod_graph = mgMap inval (hsc_mod_graph h) } where inval ms = ms { ms_hs_hash = fingerprint0 } ===================================== compiler/GHC/Driver/Env.hs ===================================== @@ -41,6 +41,8 @@ where import GHC.Prelude +import GHC.Builtin.Names ( gHC_PRIM ) + import GHC.Driver.DynFlags import GHC.Driver.Errors ( printOrThrowDiagnostics ) import GHC.Driver.Errors.Types ( GhcMessage ) @@ -70,8 +72,6 @@ import GHC.Types.Name import GHC.Types.Name.Env import GHC.Types.TyThing -import GHC.Builtin.Names ( gHC_PRIM ) - import GHC.Data.Maybe import GHC.Utils.Exception as Ex @@ -274,9 +274,11 @@ hptSomeThingsBelowUs extract include_hi_boot hsc_env uid mn mg = hsc_mod_graph hsc_env in [ thing - | - -- Find each non-hi-boot module below me - (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) <- Set.toList (moduleGraphModulesBelow mg uid mn) + -- "Finding each non-hi-boot module below me" maybe could be cached in the module + -- graph to avoid filtering the boots out of the transitive closure out + -- every time this is called + | (ModNodeKeyWithUid (GWIB { gwib_mod = mod, gwib_isBoot = is_boot }) mod_uid) + <- Set.toList (moduleGraphModulesBelow mg uid mn) , include_hi_boot || (is_boot == NotBoot) -- unsavoury: when compiling the base package with --make, we ===================================== compiler/GHC/Driver/Main.hs ===================================== @@ -1453,7 +1453,7 @@ oneShotMsg logger recomp = batchMsg :: Messager batchMsg = batchMsgWith (\_ _ _ _ -> empty) batchMultiMsg :: Messager -batchMultiMsg = batchMsgWith (\_ _ _ node -> brackets (ppr (moduleGraphNodeUnitId node))) +batchMultiMsg = batchMsgWith (\_ _ _ node -> brackets (ppr (mgNodeUnitId node))) batchMsgWith :: (HscEnv -> (Int, Int) -> RecompileRequired -> ModuleGraphNode -> SDoc) -> Messager batchMsgWith extra hsc_env_start mod_index recomp node = @@ -1469,7 +1469,7 @@ batchMsgWith extra hsc_env_start mod_index recomp node = LinkNode {} -> "Linking" InstantiationNode {} -> "Instantiating" ModuleNode {} -> "Compiling" - hsc_env = hscSetActiveUnitId (moduleGraphNodeUnitId node) hsc_env_start + hsc_env = hscSetActiveUnitId (mgNodeUnitId node) hsc_env_start dflags = hsc_dflags hsc_env logger = hsc_logger hsc_env state = hsc_units hsc_env ===================================== compiler/GHC/Driver/Make.hs ===================================== @@ -250,11 +250,9 @@ depanalPartial diag_wrapper msg excluded_mods allow_dup_roots = do -- cached finder data. liftIO $ flushFinderCaches (hsc_FC hsc_env) (hsc_unit_env hsc_env) - (errs, graph_nodes) <- liftIO $ downsweep + (errs, mod_graph) <- liftIO $ downsweep hsc_env diag_wrapper msg (mgModSummaries old_graph) excluded_mods allow_dup_roots - let - mod_graph = mkModuleGraph graph_nodes return (unionManyMessages errs, mod_graph) -- | Collect the instantiations of dependencies to create 'InstantiationNode' work graph nodes. @@ -289,7 +287,7 @@ linkNodes summaries uid hue = ofile = outputFile_ dflags unit_nodes :: [NodeKey] - unit_nodes = map mkNodeKey (filter ((== uid) . moduleGraphNodeUnitId) summaries) + unit_nodes = map mkNodeKey (filter ((== uid) . mgNodeUnitId) summaries) -- Issue a warning for the confusing case where the user -- said '-o foo' but we're not going to do any linking. -- We attempt linking if either (a) one of the modules is @@ -632,13 +630,18 @@ createBuildPlan mod_graph maybe_top_mod = -- An environment mapping a module to its hs-boot file and all nodes on the path between the two, if one exists boot_modules = mkModuleEnv - [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) | m@(ModuleNode _ ms) <- (mgModSummaries' mod_graph), isBootSummary ms == IsBoot] + [ (ms_mod ms, (m, boot_path (ms_mod_name ms) (ms_unitid ms))) + | m@(ModuleNode _ ms) <- mgModSummaries' mod_graph + , isBootSummary ms == IsBoot] select_boot_modules :: [ModuleGraphNode] -> [ModuleGraphNode] select_boot_modules = mapMaybe (fmap fst . get_boot_module) get_boot_module :: ModuleGraphNode -> Maybe (ModuleGraphNode, [ModuleGraphNode]) - get_boot_module m = case m of ModuleNode _ ms | HsSrcFile <- ms_hsc_src ms -> lookupModuleEnv boot_modules (ms_mod ms); _ -> Nothing + get_boot_module (ModuleNode _ ms) + | HsSrcFile <- ms_hsc_src ms + = lookupModuleEnv boot_modules (ms_mod ms) + get_boot_module _ = Nothing -- Any cycles should be resolved now collapseSCC :: [SCC ModuleGraphNode] -> Either [ModuleGraphNode] [(Either ModuleGraphNode ModuleGraphNodeWithBootFile)] @@ -668,8 +671,8 @@ createBuildPlan mod_graph maybe_top_mod = in - assertPpr (sum (map countMods build_plan) == length (mgModSummaries' mod_graph)) - (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (length (mgModSummaries' mod_graph )))]) + assertPpr (sum (map countMods build_plan) == lengthMG mod_graph) + (vcat [text "Build plan missing nodes:", (text "PLAN:" <+> ppr (sum (map countMods build_plan))), (text "GRAPH:" <+> ppr (lengthMG mod_graph))]) build_plan mkWorkerLimit :: DynFlags -> IO WorkerLimit @@ -1142,7 +1145,7 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do !build_map <- getBuildMap hug_var <- gets hug_var -- 1. Get the direct dependencies of this module - let direct_deps = nodeDependencies False mod + let direct_deps = mgNodeDependencies False mod -- It's really important to force build_deps, or the whole buildMap is retained, -- which would retain all the result variables, preventing us from collecting them -- after they are no longer used. @@ -1150,14 +1153,14 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do let !build_action = case mod of InstantiationNode uid iu -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeInstantiationNode mod_idx n_mods hug uid iu return (Nothing, deps) ModuleNode _build_deps ms -> let !old_hmi = M.lookup (msKey ms) old_hpt rehydrate_mods = mapMaybe nodeKeyModName <$> rehydrate_nodes - in withCurrentUnit (moduleGraphNodeUnitId mod) $ do + in withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps hmi <- executeCompileNode mod_idx n_mods old_hmi hug rehydrate_mods ms -- Write the HMI to an external cache (if one exists) @@ -1166,9 +1169,9 @@ interpretBuildPlan hug mhmi_cache old_hpt plan = do -- This global MVar is incrementally modified in order to avoid having to -- recreate the HPT before compiling each module which leads to a quadratic amount of work. liftIO $ modifyMVar_ hug_var (return . addHomeModInfoToHug hmi) - return (Just hmi, addToModuleNameSet (moduleGraphNodeUnitId mod) (ms_mod_name ms) deps ) + return (Just hmi, addToModuleNameSet (mgNodeUnitId mod) (ms_mod_name ms) deps ) LinkNode _nks uid -> do - withCurrentUnit (moduleGraphNodeUnitId mod) $ do + withCurrentUnit (mgNodeUnitId mod) $ do (hug, deps) <- wait_deps_hug hug_var build_deps executeLinkNode hug (mod_idx, n_mods) uid direct_deps return (Nothing, deps) @@ -1570,7 +1573,7 @@ downsweep :: HscEnv -> Bool -- True <=> allow multiple targets to have -- the same module name; this is -- very useful for ghc -M - -> IO ([DriverMessages], [ModuleGraphNode]) + -> IO ([DriverMessages], ModuleGraph) -- The non-error elements of the returned list all have distinct -- (Modules, IsBoot) identifiers, unless the Bool is true in -- which case there can be repeats @@ -1595,7 +1598,7 @@ downsweep_imports :: HscEnv -> [ModuleName] -> Bool -> ([(UnitId, DriverMessages)], [ModSummary]) - -> IO ([DriverMessages], [ModuleGraphNode]) + -> IO ([DriverMessages], ModuleGraph) downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, rootSummariesOk) = do let root_map = mkRootMap rootSummariesOk @@ -1620,7 +1623,7 @@ downsweep_imports hsc_env old_summaries excl_mods allow_dup_roots (root_errs, ro th_enabled_nodes <- enableCodeGenForTH logger tmpfs unit_env all_nodes if null all_root_errs then return (all_errs, th_enabled_nodes) - else pure $ (all_root_errs, []) + else pure $ (all_root_errs, emptyMG) where -- Dependencies arising on a unit (backpack and module linking deps) unitModuleNodes :: [ModuleGraphNode] -> UnitId -> HomeUnitEnv -> [Either (Messages DriverMessage) ModuleGraphNode] @@ -1870,7 +1873,7 @@ enableCodeGenForTH -> TmpFs -> UnitEnv -> [ModuleGraphNode] - -> IO [ModuleGraphNode] + -> IO ModuleGraph enableCodeGenForTH logger tmpfs unit_env = enableCodeGenWhen logger tmpfs TFL_CurrentModule TFL_GhcSession unit_env @@ -1893,19 +1896,19 @@ enableCodeGenWhen -> TempFileLifetime -> UnitEnv -> [ModuleGraphNode] - -> IO [ModuleGraphNode] -enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = - mapM enable_code_gen mod_graph + -> IO ModuleGraph +enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = do + mgMapM enable_code_gen mg where defaultBackendOf ms = platformDefaultBackend (targetPlatform $ ue_unitFlags (ms_unitid ms) unit_env) - enable_code_gen :: ModuleGraphNode -> IO ModuleGraphNode - enable_code_gen n@(ModuleNode deps ms) + enable_code_gen :: ModSummary -> IO ModSummary + enable_code_gen ms | ModSummary { ms_location = ms_location , ms_hsc_src = HsSrcFile , ms_hspp_opts = dflags } <- ms - , Just enable_spec <- mkNodeKey n `Map.lookup` needs_codegen_map = + , Just enable_spec <- needs_codegen_map (NodeKey_Module (msKey ms)) = if | nocode_enable ms -> do let new_temp_file suf dynsuf = do tn <- newTempName logger tmpfs (tmpDir dflags) staticLife suf @@ -1937,7 +1940,7 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = , ms_hspp_opts = updOptLevel 0 $ new_dflags } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' -- If -fprefer-byte-code then satisfy dependency by enabling bytecode (if normal object not enough) -- we only get to this case if the default backend is already generating object files, but we need dynamic @@ -1947,21 +1950,21 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ByteCodeAndObjectCode } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' | dynamic_too_enable enable_spec ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_BuildDynamicToo } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' | ext_interp_enable ms -> do let ms' = ms { ms_hspp_opts = gopt_set (ms_hspp_opts ms) Opt_ExternalInterpreter } -- Recursive call to catch the other cases - enable_code_gen (ModuleNode deps ms') + enable_code_gen ms' - | otherwise -> return n + | otherwise -> return ms enable_code_gen ms = return ms @@ -2018,23 +2021,23 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph = lcl_dflags = ms_hspp_opts ms internalInterpreter = not (gopt Opt_ExternalInterpreter lcl_dflags) - (mg, lookup_node) = moduleGraphNodes False mod_graph - - mk_needed_set roots = Set.fromList $ map (mkNodeKey . node_payload) $ reachablesG mg (map (expectJust "needs_th" . lookup_node) roots) + mg = mkModuleGraph mod_graph - needs_obj_set, needs_bc_set :: Set.Set NodeKey - needs_obj_set = mk_needed_set need_obj_set + needs_obj_set, needs_bc_set :: NodeKey -> Bool + needs_obj_set k = mgQueryMany mg need_obj_set k || k `elem` need_obj_set - needs_bc_set = mk_needed_set need_bc_set + needs_bc_set k = mgQueryMany mg need_bc_set k || k `elem` need_bc_set -- A map which tells us how to enable code generation for a NodeKey - needs_codegen_map :: Map.Map NodeKey CodeGenEnable - needs_codegen_map = + needs_codegen_map :: NodeKey -> Maybe CodeGenEnable + needs_codegen_map nk = -- Another option here would be to just produce object code, rather than both object and -- byte code - Map.unionWith (\_ _ -> EnableByteCodeAndObject) - (Map.fromList $ [(m, EnableObject) | m <- Set.toList needs_obj_set]) - (Map.fromList $ [(m, EnableByteCode) | m <- Set.toList needs_bc_set]) + case (needs_obj_set nk, needs_bc_set nk) of + (True, True) -> Just EnableByteCodeAndObject + (True, False) -> Just EnableObject + (False, True) -> Just EnableByteCode + (False, False) -> Nothing -- The direct dependencies of modules which require object code need_obj_set = @@ -2470,14 +2473,14 @@ cyclicModuleErr mss Just path -> mkPlainErrorMsgEnvelope src_span $ GhcDriverMessage $ DriverModuleGraphCycle path where - src_span = maybe noSrcSpan (mkFileSrcSpan . ms_location) (moduleGraphNodeModSum (head path)) + src_span = maybe noSrcSpan (mkFileSrcSpan . ms_location) (mgNodeModSum (head path)) where graph :: [Node NodeKey ModuleGraphNode] graph = [ DigraphNode { node_payload = ms , node_key = mkNodeKey ms - , node_dependencies = nodeDependencies False ms + , node_dependencies = mgNodeDependencies False ms } | ms <- mss ] ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -2,52 +2,106 @@ {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveTraversable #-} +-- | A module graph should be constructed once and never change from there onwards. +-- +-- The only operations should be for building the 'ModuleGraph' +-- (once and for all -- no update-like/insert-like functions) +-- and querying the structure in various ways, e.g. to determine reachability. +-- +-- We should avoid exposing fields like 'mg_mss' since it may be a footgun +-- trying to use the nodes directly... We do still expose it, but it feels like +-- all its use cases would be better served by a more proper ModuleGraph +-- abstraction module GHC.Unit.Module.Graph - ( ModuleGraph - , ModuleGraphNode(..) - , nodeDependencies + ( + -- * Construct a module graph + -- + -- | A module graph should be constructed once by downsweep and never modified. + ModuleGraph , emptyMG , mkModuleGraph - , extendMG - , extendMGInst - , extendMG' - , unionMG - , isTemplateHaskellOrQQNonBoot - , filterToposortToModules - , mapMG + + -- * Nodes in a module graph + -- + -- | The user-facing nodes in a module graph are 'ModuleGraphNode's. + -- There are a few things which we can query out of each 'ModuleGraphNode': + -- + -- - 'mgNodeDependencies' gets the immediate dependencies of this node + -- - 'mgNodeUnitId' returns the 'UnitId' of that node + -- - 'mgNodeModSum' extracts the 'ModSummary' of a node if exists + , ModuleGraphNode(..) + , mgNodeDependencies + , mgNodeModSum + , mgNodeUnitId + + -- * Module graph operations + , lengthMG + + -- ** 'ModSummary' operations + -- + -- | A couple of operations on the module graph allow access to the + -- 'ModSummary's of the modules in it contained. + -- + -- In particular, 'mapMG' and 'mapMGM' allow updating these 'ModSummary's + -- (without changing the 'ModuleGraph' structure itself!). + -- 'mgModSummaries' lists out all 'ModSummary's, and + -- 'mgLookupModule' looks up a 'ModSummary' for a given module. + , mgMap, mgMapM , mgModSummaries - , mgModSummaries' , mgLookupModule - , showModMsg - , moduleGraphNodeModule - , moduleGraphNodeModSum - , moduleGraphModulesBelow + + -- ** Reachability queries + -- + -- | A module graph explains the structure and relationship between the + -- modules being compiled. Often times, this structure is relevant to + -- answer reachability queries -- is X reachable from Y; or, what is the + -- transitive closure of Z? , mgReachable , mgQuery - + , mgQueryMany + + -- ** Other operations + -- + -- | These operations allow more-internal-than-ideal access to the + -- ModuleGraph structure. Ideally, we could restructure the code using + -- these functions to avoid deconstructing/reconstructing the ModuleGraph + -- and instead extend the "proper interface" of the ModuleGraph to achieve + -- what is currently done but through a better abstraction. + , mgModSummaries' , moduleGraphNodes - , SummaryNode - , summaryNodeSummary + , moduleGraphModulesBelow -- needed for 'hptSomeThingsBelowUs', + -- but I think we could be more clever and cache + -- the graph-ixs of boot modules to efficiently + -- filter them out of the returned list. + -- hptInstancesBelow is re-doing that work every + -- time it's called. + , filterToposortToModules + -- * Keys into the 'ModuleGraph' , NodeKey(..) + , mkNodeKey , nodeKeyUnitId , nodeKeyModName , ModNodeKey - , mkNodeKey + , ModNodeKeyWithUid(..) , msKey + -- ** Internal node representation + -- + -- | 'SummaryNode' is the internal representation for each node stored in + -- the graph. It's not immediately clear to me why users do depend on them. + , SummaryNode + , summaryNodeSummary + , summaryNodeKey - , moduleGraphNodeUnitId - - , ModNodeKeyWithUid(..) + -- * Utilities + , showModMsg ) where import GHC.Prelude import GHC.Platform -import qualified GHC.LanguageExtensions as LangExt - import GHC.Data.Maybe import GHC.Data.Graph.Directed import GHC.Data.Graph.Directed.Reachability @@ -73,7 +127,44 @@ import GHC.Linker.Static.Utils import Data.Bifunctor import Data.Function import Data.List (sort) -import GHC.Data.List.SetOps +import Control.Monad + +-- | A '@ModuleGraph@' contains all the nodes from the home package (only). See +-- '@ModuleGraphNode@' for information about the nodes. +-- +-- Modules need to be compiled. hs-boots need to be typechecked before +-- the associated "real" module so modules with {-# SOURCE #-} imports can be +-- built. Instantiations also need to be typechecked to ensure that the module +-- fits the signature. Substantiation typechecking is roughly comparable to the +-- check that the module and its hs-boot agree. +-- +-- The graph is not necessarily stored in topologically-sorted order. Use +-- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. +data ModuleGraph = ModuleGraph + { mg_mss :: [ModuleGraphNode] + , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) + -- A cached transitive dependency calculation so that a lot of work is not + -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) + } + +-- | Why do we ever need to construct empty graphs? Is it because of one shot mode? +emptyMG :: ModuleGraph +emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) + +-- | Construct a module graph. This function should be the only entry point for +-- building a 'ModuleGraph', since it is supposed to be built once and never modified. +-- +-- If you ever find the need to build a 'ModuleGraph' iteratively, don't +-- add insert and update functions to the API since they become footguns. +-- Instead, design an API that allows iterative construction without posterior +-- modification, perhaps like what is done for building arrays from mutable +-- arrays. +mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph +mkModuleGraph = foldr (flip extendMG') emptyMG + +-------------------------------------------------------------------------------- +-- * Module Graph Nodes +-------------------------------------------------------------------------------- -- | A '@ModuleGraphNode@' is a node in the '@ModuleGraph@'. -- Edges between nodes mark dependencies arising from module imports @@ -87,16 +178,36 @@ data ModuleGraphNode -- | Link nodes are whether are are creating a linked product (ie executable/shared object etc) for a unit. | LinkNode [NodeKey] UnitId -moduleGraphNodeModule :: ModuleGraphNode -> Maybe ModuleName -moduleGraphNodeModule mgn = ms_mod_name <$> (moduleGraphNodeModSum mgn) +-- | Collect the immediate dependencies of a ModuleGraphNode, +-- optionally avoiding hs-boot dependencies. +-- If the drop_hs_boot_nodes flag is False, and if this is a .hs and there is +-- an equivalent .hs-boot, add a link from the former to the latter. This +-- has the effect of detecting bogus cases where the .hs-boot depends on the +-- .hs, by introducing a cycle. Additionally, it ensures that we will always +-- process the .hs-boot before the .hs, and so the HomePackageTable will always +-- have the most up to date information. +mgNodeDependencies :: Bool -> ModuleGraphNode -> [NodeKey] +mgNodeDependencies drop_hs_boot_nodes = \case + LinkNode deps _uid -> deps + InstantiationNode uid iuid -> + NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) + ModuleNode deps _ms -> + map drop_hs_boot deps + where + -- Drop hs-boot nodes by using HsSrcFile as the key + hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature + | otherwise = IsBoot + + drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) uid)) + drop_hs_boot x = x -moduleGraphNodeModSum :: ModuleGraphNode -> Maybe ModSummary -moduleGraphNodeModSum (InstantiationNode {}) = Nothing -moduleGraphNodeModSum (LinkNode {}) = Nothing -moduleGraphNodeModSum (ModuleNode _ ms) = Just ms +mgNodeModSum :: ModuleGraphNode -> Maybe ModSummary +mgNodeModSum (InstantiationNode {}) = Nothing +mgNodeModSum (LinkNode {}) = Nothing +mgNodeModSum (ModuleNode _ ms) = Just ms -moduleGraphNodeUnitId :: ModuleGraphNode -> UnitId -moduleGraphNodeUnitId mgn = +mgNodeUnitId :: ModuleGraphNode -> UnitId +mgNodeUnitId mgn = case mgn of InstantiationNode uid _iud -> uid ModuleNode _ ms -> toUnitId (moduleUnit (ms_mod ms)) @@ -114,79 +225,43 @@ instance Eq ModuleGraphNode where instance Ord ModuleGraphNode where compare = compare `on` mkNodeKey -data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit - | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid - | NodeKey_Link !UnitId - deriving (Eq, Ord) - -instance Outputable NodeKey where - ppr nk = pprNodeKey nk +-------------------------------------------------------------------------------- +-- * Module Graph operations +-------------------------------------------------------------------------------- -pprNodeKey :: NodeKey -> SDoc -pprNodeKey (NodeKey_Unit iu) = ppr iu -pprNodeKey (NodeKey_Module mk) = ppr mk -pprNodeKey (NodeKey_Link uid) = ppr uid +-- | Returns the number of nodes in a 'ModuleGraph' +lengthMG :: ModuleGraph -> Int +lengthMG = length . mg_mss -nodeKeyUnitId :: NodeKey -> UnitId -nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu -nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk -nodeKeyUnitId (NodeKey_Link uid) = uid - -nodeKeyModName :: NodeKey -> Maybe ModuleName -nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) -nodeKeyModName _ = Nothing - -data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot - , mnkUnitId :: !UnitId } deriving (Eq, Ord) - -instance Outputable ModNodeKeyWithUid where - ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib - --- | A '@ModuleGraph@' contains all the nodes from the home package (only). See --- '@ModuleGraphNode@' for information about the nodes. --- --- Modules need to be compiled. hs-boots need to be typechecked before --- the associated "real" module so modules with {-# SOURCE #-} imports can be --- built. Instantiations also need to be typechecked to ensure that the module --- fits the signature. Substantiation typechecking is roughly comparable to the --- check that the module and its hs-boot agree. --- --- The graph is not necessarily stored in topologically-sorted order. Use --- 'GHC.topSortModuleGraph' and 'GHC.Data.Graph.Directed.flattenSCC' to achieve this. -data ModuleGraph = ModuleGraph - { mg_mss :: [ModuleGraphNode] - , mg_graph :: (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) - -- A cached transitive dependency calculation so that a lot of work is not - -- repeated whenever the transitive dependencies need to be calculated (for example, hptInstances) - } +-------------------------------------------------------------------------------- +-- ** ModSummaries +-------------------------------------------------------------------------------- -- | Map a function 'f' over all the 'ModSummaries'. --- To preserve invariants 'f' can't change the isBoot status. -mapMG :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph -mapMG f mg at ModuleGraph{..} = mg +-- To preserve invariants, 'f' can't change the isBoot status. +mgMap :: (ModSummary -> ModSummary) -> ModuleGraph -> ModuleGraph +mgMap f mg at ModuleGraph{..} = mg { mg_mss = flip fmap mg_mss $ \case InstantiationNode uid iuid -> InstantiationNode uid iuid LinkNode uid nks -> LinkNode uid nks ModuleNode deps ms -> ModuleNode deps (f ms) } -unionMG :: ModuleGraph -> ModuleGraph -> ModuleGraph -unionMG a b = - let new_mss = nubOrdBy compare $ mg_mss a `mappend` mg_mss b - in ModuleGraph { - mg_mss = new_mss - , mg_graph = mkTransDeps new_mss - } - -mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) -mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False +-- | Map a function 'f' over all the 'ModSummaries', in 'IO'. +-- To preserve invariants, 'f' can't change the isBoot status. +mgMapM :: (ModSummary -> IO ModSummary) -> ModuleGraph -> IO ModuleGraph +mgMapM f mg at ModuleGraph{..} = do + mss' <- forM mg_mss $ \case + InstantiationNode uid iuid -> pure $ InstantiationNode uid iuid + LinkNode uid nks -> pure $ LinkNode uid nks + ModuleNode deps ms -> ModuleNode deps <$> (f ms) + return mg + { mg_mss = mss' + } mgModSummaries :: ModuleGraph -> [ModSummary] mgModSummaries mg = [ m | ModuleNode _ m <- mgModSummaries' mg ] -mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] -mgModSummaries' = mg_mss - -- | Look up a ModSummary in the ModuleGraph -- Looks up the non-boot ModSummary -- Linear in the size of the module graph @@ -199,128 +274,53 @@ mgLookupModule ModuleGraph{..} m = listToMaybe $ mapMaybe go mg_mss = Just ms go _ = Nothing -emptyMG :: ModuleGraph -emptyMG = ModuleGraph [] (graphReachability emptyGraph, const Nothing) - -isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool -isTemplateHaskellOrQQNonBoot ms = - (xopt LangExt.TemplateHaskell (ms_hspp_opts ms) - || xopt LangExt.QuasiQuotes (ms_hspp_opts ms)) && - (isBootSummary ms == NotBoot) - --- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is --- not an element of the ModuleGraph. -extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph -extendMG ModuleGraph{..} deps ms = ModuleGraph - { mg_mss = ModuleNode deps ms : mg_mss - , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) - } - -extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph -extendMGInst mg uid depUnitId = mg - { mg_mss = InstantiationNode uid depUnitId : mg_mss mg - } - -extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph -extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } +-------------------------------------------------------------------------------- +-- ** Reachability +-------------------------------------------------------------------------------- -extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph -extendMG' mg = \case - InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId - ModuleNode deps ms -> extendMG mg deps ms - LinkNode deps uid -> extendMGLink mg uid deps - -mkModuleGraph :: [ModuleGraphNode] -> ModuleGraph -mkModuleGraph = foldr (flip extendMG') emptyMG - --- | This function filters out all the instantiation nodes from each SCC of a --- topological sort. Use this with care, as the resulting "strongly connected components" --- may not really be strongly connected in a direct way, as instantiations have been --- removed. It would probably be best to eliminate uses of this function where possible. -filterToposortToModules - :: [SCC ModuleGraphNode] -> [SCC ModSummary] -filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case - InstantiationNode _ _ -> Nothing - LinkNode{} -> Nothing - ModuleNode _deps node -> Just node - where - -- This higher order function is somewhat bogus, - -- as the definition of "strongly connected component" - -- is not necessarily respected. - mapMaybeSCC :: (a -> Maybe b) -> SCC a -> Maybe (SCC b) - mapMaybeSCC f = \case - AcyclicSCC a -> AcyclicSCC <$> f a - CyclicSCC as -> case mapMaybe f as of - [] -> Nothing - [a] -> Just $ AcyclicSCC a - as -> Just $ CyclicSCC as - -showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc -showModMsg dflags _ (LinkNode {}) = - let staticLink = case ghcLink dflags of - LinkStaticLib -> True - _ -> False - - platform = targetPlatform dflags - arch_os = platformArchOS platform - exe_file = exeFileName arch_os staticLink (outputFile_ dflags) - in text exe_file -showModMsg _ _ (InstantiationNode _uid indef_unit) = - ppr $ instUnitInstanceOf indef_unit -showModMsg dflags recomp (ModuleNode _ mod_summary) = - if gopt Opt_HideSourcePaths dflags - then text mod_str - else hsep $ - [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') - , char '(' - , text (op $ msHsFilePath mod_summary) <> char ',' - , message, char ')' ] - - where - op = normalise - mod_str = moduleNameString (moduleName (ms_mod mod_summary)) ++ - hscSourceString (ms_hsc_src mod_summary) - dyn_file = op $ msDynObjFilePath mod_summary - obj_file = op $ msObjFilePath mod_summary - files = [ obj_file ] - ++ [ dyn_file | gopt Opt_BuildDynamicToo dflags ] - ++ [ "interpreted" | gopt Opt_ByteCodeAndObjectCode dflags ] - message = case backendSpecialModuleSource (backend dflags) recomp of - Just special -> text special - Nothing -> foldr1 (\ofile rest -> ofile <> comma <+> rest) (map text files) - - - -type SummaryNode = Node Int ModuleGraphNode +-- | Return all nodes reachable from the given 'NodeKey'. +mgReachable :: ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] +mgReachable mg nk = map summaryNodeSummary <$> modules_below where + (td_map, lookup_node) = mg_graph mg + modules_below = + allReachable td_map <$> lookup_node nk -summaryNodeKey :: SummaryNode -> Int -summaryNodeKey = node_key +-- | Reachability Query. +-- +-- @mgQuery(g, a, b)@ asks: +-- Can we reach @b@ from @a@ in graph @g@? +-- +-- Both @a@ and @b@ must be in @g at . +mgQuery :: ModuleGraph -- ^ @g@ + -> NodeKey -- ^ @a@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @a@ +mgQuery mg nka nkb = isReachable td_map na nb where + (td_map, lookup_node) = mg_graph mg + na = expectJust "mgQuery:a" $ lookup_node nka + nb = expectJust "mgQuery:b" $ lookup_node nkb -summaryNodeSummary :: SummaryNode -> ModuleGraphNode -summaryNodeSummary = node_payload +-- | Many roots reachability Query. +-- +-- @mgQuery(g, roots, b)@ asks: +-- Can we reach @b@ from any of the @roots@ in graph @g@? +-- +-- Node @b@ must be in @g at . +mgQueryMany :: ModuleGraph -- ^ @g@ + -> [NodeKey] -- ^ @roots@ + -> NodeKey -- ^ @b@ + -> Bool -- ^ @b@ is reachable from @roots@ +mgQueryMany mg roots nkb = isReachableMany td_map nroots nb where + (td_map, lookup_node) = mg_graph mg + nroots = mapMaybe lookup_node roots + nb = expectJust "mgQuery:b" $ lookup_node nkb --- | Collect the immediate dependencies of a ModuleGraphNode, --- optionally avoiding hs-boot dependencies. --- If the drop_hs_boot_nodes flag is False, and if this is a .hs and there is --- an equivalent .hs-boot, add a link from the former to the latter. This --- has the effect of detecting bogus cases where the .hs-boot depends on the --- .hs, by introducing a cycle. Additionally, it ensures that we will always --- process the .hs-boot before the .hs, and so the HomePackageTable will always --- have the most up to date information. -nodeDependencies :: Bool -> ModuleGraphNode -> [NodeKey] -nodeDependencies drop_hs_boot_nodes = \case - LinkNode deps _uid -> deps - InstantiationNode uid iuid -> - NodeKey_Module . (\mod -> ModNodeKeyWithUid (GWIB mod NotBoot) uid) <$> uniqDSetToList (instUnitHoles iuid) - ModuleNode deps _ms -> - map drop_hs_boot deps - where - -- Drop hs-boot nodes by using HsSrcFile as the key - hs_boot_key | drop_hs_boot_nodes = NotBoot -- is regular mod or signature - | otherwise = IsBoot +-------------------------------------------------------------------------------- +-- ** Other operations (read haddocks on export list) +-------------------------------------------------------------------------------- - drop_hs_boot (NodeKey_Module (ModNodeKeyWithUid (GWIB mn IsBoot) uid)) = (NodeKey_Module (ModNodeKeyWithUid (GWIB mn hs_boot_key) uid)) - drop_hs_boot x = x +mgModSummaries' :: ModuleGraph -> [ModuleGraphNode] +mgModSummaries' = mg_mss -- | Turn a list of graph nodes into an efficient queriable graph. -- The first boolean parameter indicates whether nodes corresponding to hs-boot files @@ -340,16 +340,16 @@ moduleGraphNodes drop_hs_boot_nodes summaries = ModuleNode __deps ms | isBootSummary ms == IsBoot, drop_hs_boot_nodes -- Using nodeDependencies here converts dependencies on other -- boot files to dependencies on dependencies on non-boot files. - -> Left (ms_mod ms, nodeDependencies drop_hs_boot_nodes s) + -> Left (ms_mod ms, mgNodeDependencies drop_hs_boot_nodes s) _ -> normal_case where normal_case = - let lkup_key = ms_mod <$> moduleGraphNodeModSum s + let lkup_key = ms_mod <$> mgNodeModSum s extra = (lkup_key >>= \key -> Map.lookup key boot_summaries) in Right $ DigraphNode s key $ out_edge_keys $ (fromMaybe [] extra - ++ nodeDependencies drop_hs_boot_nodes s) + ++ mgNodeDependencies drop_hs_boot_nodes s) numbered_summaries = zip summaries [1..] @@ -370,20 +370,6 @@ moduleGraphNodes drop_hs_boot_nodes summaries = out_edge_keys = mapMaybe lookup_key -- If we want keep_hi_boot_nodes, then we do lookup_key with -- IsBoot; else False -newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } - deriving (Functor, Traversable, Foldable) - -mkNodeKey :: ModuleGraphNode -> NodeKey -mkNodeKey = \case - InstantiationNode _ iu -> NodeKey_Unit iu - ModuleNode _ x -> NodeKey_Module $ msKey x - LinkNode _ uid -> NodeKey_Link uid - -msKey :: ModSummary -> ModNodeKeyWithUid -msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) - -type ModNodeKey = ModuleNameWithIsBoot - -- | This function returns all the modules belonging to the home-unit that can -- be reached by following the given dependencies. Additionally, if both the @@ -409,21 +395,150 @@ moduleGraphModulesBelow mg uid mn = filtered_mods [ mn | NodeKey_Module mn <- mo | otherwise -> r1 : filter_mods (r2:rs) rs -> rs -mgReachable :: ModuleGraph -> NodeKey -> Maybe [ModuleGraphNode] -mgReachable mg nk = map summaryNodeSummary <$> modules_below where - (td_map, lookup_node) = mg_graph mg - modules_below = - allReachable td_map <$> lookup_node nk +-- | This function filters out all the instantiation nodes from each SCC of a +-- topological sort. Use this with care, as the resulting "strongly connected components" +-- may not really be strongly connected in a direct way, as instantiations have been +-- removed. It would probably be best to eliminate uses of this function where possible. +filterToposortToModules + :: [SCC ModuleGraphNode] -> [SCC ModSummary] +filterToposortToModules = mapMaybe $ mapMaybeSCC $ \case + InstantiationNode _ _ -> Nothing + LinkNode{} -> Nothing + ModuleNode _deps node -> Just node + where + -- This higher order function is somewhat bogus, + -- as the definition of "strongly connected component" + -- is not necessarily respected. + mapMaybeSCC :: (a -> Maybe b) -> SCC a -> Maybe (SCC b) + mapMaybeSCC f = \case + AcyclicSCC a -> AcyclicSCC <$> f a + CyclicSCC as -> case mapMaybe f as of + [] -> Nothing + [a] -> Just $ AcyclicSCC a + as -> Just $ CyclicSCC as --- | Reachability Query. @mgQuery(g, a, b)@ asks: Can we reach @b@ from @a@ in --- graph @g@? --- INVARIANT: Both @a@ and @b@ must be in @g at . -mgQuery :: ModuleGraph -- ^ @g@ - -> NodeKey -- ^ @a@ - -> NodeKey -- ^ @b@ - -> Bool -- ^ @b@ is reachable from @a@ -mgQuery mg nka nkb = isReachable td_map na nb where - (td_map, lookup_node) = mg_graph mg - na = expectJust "mgQuery:a" $ lookup_node nka - nb = expectJust "mgQuery:b" $ lookup_node nkb +-------------------------------------------------------------------------------- +-- * Keys into ModuleGraph +-------------------------------------------------------------------------------- + +data NodeKey = NodeKey_Unit {-# UNPACK #-} !InstantiatedUnit + | NodeKey_Module {-# UNPACK #-} !ModNodeKeyWithUid + | NodeKey_Link !UnitId + deriving (Eq, Ord) + +instance Outputable NodeKey where + ppr (NodeKey_Unit iu) = ppr iu + ppr (NodeKey_Module mk) = ppr mk + ppr (NodeKey_Link uid) = ppr uid + +mkNodeKey :: ModuleGraphNode -> NodeKey +mkNodeKey = \case + InstantiationNode _ iu -> NodeKey_Unit iu + ModuleNode _ x -> NodeKey_Module $ msKey x + LinkNode _ uid -> NodeKey_Link uid + +nodeKeyUnitId :: NodeKey -> UnitId +nodeKeyUnitId (NodeKey_Unit iu) = instUnitInstanceOf iu +nodeKeyUnitId (NodeKey_Module mk) = mnkUnitId mk +nodeKeyUnitId (NodeKey_Link uid) = uid + +nodeKeyModName :: NodeKey -> Maybe ModuleName +nodeKeyModName (NodeKey_Module mk) = Just (gwib_mod $ mnkModuleName mk) +nodeKeyModName _ = Nothing + +type ModNodeKey = ModuleNameWithIsBoot +data ModNodeKeyWithUid = ModNodeKeyWithUid { mnkModuleName :: !ModuleNameWithIsBoot + , mnkUnitId :: !UnitId } deriving (Eq, Ord) + +instance Outputable ModNodeKeyWithUid where + ppr (ModNodeKeyWithUid mnwib uid) = ppr uid <> colon <> ppr mnwib + +msKey :: ModSummary -> ModNodeKeyWithUid +msKey ms = ModNodeKeyWithUid (ms_mnwib ms) (ms_unitid ms) + +-------------------------------------------------------------------------------- +-- ** Internal node representation (exposed) +-------------------------------------------------------------------------------- + +type SummaryNode = Node Int ModuleGraphNode + +summaryNodeKey :: SummaryNode -> Int +summaryNodeKey = node_key + +summaryNodeSummary :: SummaryNode -> ModuleGraphNode +summaryNodeSummary = node_payload + +-------------------------------------------------------------------------------- +-- * Misc utilities +-------------------------------------------------------------------------------- + +showModMsg :: DynFlags -> Bool -> ModuleGraphNode -> SDoc +showModMsg dflags _ (LinkNode {}) = + let staticLink = case ghcLink dflags of + LinkStaticLib -> True + _ -> False + + platform = targetPlatform dflags + arch_os = platformArchOS platform + exe_file = exeFileName arch_os staticLink (outputFile_ dflags) + in text exe_file +showModMsg _ _ (InstantiationNode _uid indef_unit) = + ppr $ instUnitInstanceOf indef_unit +showModMsg dflags recomp (ModuleNode _ mod_summary) = + if gopt Opt_HideSourcePaths dflags + then text mod_str + else hsep $ + [ text (mod_str ++ replicate (max 0 (16 - length mod_str)) ' ') + , char '(' + , text (op $ msHsFilePath mod_summary) <> char ',' + , message, char ')' ] + + where + op = normalise + mod_str = moduleNameString (moduleName (ms_mod mod_summary)) ++ + hscSourceString (ms_hsc_src mod_summary) + dyn_file = op $ msDynObjFilePath mod_summary + obj_file = op $ msObjFilePath mod_summary + files = [ obj_file ] + ++ [ dyn_file | gopt Opt_BuildDynamicToo dflags ] + ++ [ "interpreted" | gopt Opt_ByteCodeAndObjectCode dflags ] + message = case backendSpecialModuleSource (backend dflags) recomp of + Just special -> text special + Nothing -> foldr1 (\ofile rest -> ofile <> comma <+> rest) (map text files) + +-------------------------------------------------------------------------------- +-- * Internal methods for module graph +-- +-- These are *really* meant to be internal! +-- Don't expose them without careful consideration about the invariants +-- described in the export list haddocks. +-------------------------------------------------------------------------------- + +newtype NodeMap a = NodeMap { unNodeMap :: Map.Map NodeKey a } + deriving (Functor, Traversable, Foldable) + +mkTransDeps :: [ModuleGraphNode] -> (ReachabilityIndex SummaryNode, NodeKey -> Maybe SummaryNode) +mkTransDeps = first graphReachability {- module graph is acyclic -} . moduleGraphNodes False + +extendMG' :: ModuleGraph -> ModuleGraphNode -> ModuleGraph +extendMG' mg = \case + InstantiationNode uid depUnitId -> extendMGInst mg uid depUnitId + ModuleNode deps ms -> extendMG mg deps ms + LinkNode deps uid -> extendMGLink mg uid deps + +-- | Add an ExtendedModSummary to ModuleGraph. Assumes that the new ModSummary is +-- not an element of the ModuleGraph. +extendMG :: ModuleGraph -> [NodeKey] -> ModSummary -> ModuleGraph +extendMG ModuleGraph{..} deps ms = ModuleGraph + { mg_mss = ModuleNode deps ms : mg_mss + , mg_graph = mkTransDeps (ModuleNode deps ms : mg_mss) + } + +extendMGInst :: ModuleGraph -> UnitId -> InstantiatedUnit -> ModuleGraph +extendMGInst mg uid depUnitId = mg + { mg_mss = InstantiationNode uid depUnitId : mg_mss mg + } + +extendMGLink :: ModuleGraph -> UnitId -> [NodeKey] -> ModuleGraph +extendMGLink mg uid nks = mg { mg_mss = LinkNode nks uid : mg_mss mg } ===================================== compiler/GHC/Unit/Module/ModSummary.hs ===================================== @@ -24,12 +24,14 @@ module GHC.Unit.Module.ModSummary , msDynObjFileOsPath , msDeps , isBootSummary + , isTemplateHaskellOrQQNonBoot , findTarget ) where import GHC.Prelude +import qualified GHC.LanguageExtensions as LangExt import GHC.Hs import GHC.Driver.DynFlags @@ -163,6 +165,12 @@ msDynObjFileOsPath ms = ml_dyn_obj_file_ospath (ms_location ms) isBootSummary :: ModSummary -> IsBootInterface isBootSummary ms = if ms_hsc_src ms == HsBootFile then IsBoot else NotBoot +isTemplateHaskellOrQQNonBoot :: ModSummary -> Bool +isTemplateHaskellOrQQNonBoot ms = + (xopt LangExt.TemplateHaskell (ms_hspp_opts ms) + || xopt LangExt.QuasiQuotes (ms_hspp_opts ms)) && + (isBootSummary ms == NotBoot) + ms_mnwib :: ModSummary -> ModuleNameWithIsBoot ms_mnwib ms = GWIB (ms_mod_name ms) (isBootSummary ms) @@ -206,4 +214,3 @@ findTarget ms ts = _ `matches` _ = False - ===================================== testsuite/tests/ghc-api/downsweep/OldModLocation.hs ===================================== @@ -61,7 +61,7 @@ main = do -- using the 'location' parameter we'd end up using the old location of -- the "B" module in this test. Make sure that doesn't happen. - hPrint stderr $ sort (map (ml_hs_file . ms_location) (mapMaybe moduleGraphNodeModSum nodes)) + hPrint stderr $ sort (map (ml_hs_file . ms_location) (mapMaybe mgNodeModSum $ mgModSummaries' nodes)) writeMod :: [String] -> IO () writeMod src@(head -> stripPrefix "module " -> Just (takeWhile (/=' ') -> mod)) ===================================== testsuite/tests/ghc-api/downsweep/PartialDownsweep.hs ===================================== @@ -171,7 +171,7 @@ go label mods cnd = hsc_env <- getSession (_, nodes) <- liftIO $ downsweep hsc_env mkUnknownDiagnostic Nothing [] [] False - it label $ cnd (mapMaybe moduleGraphNodeModSum nodes) + it label $ cnd (mapMaybe mgNodeModSum $ mgModSummaries' nodes) writeMod :: [String] -> IO () View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6656976228dad970bbab4a7ab144b5e07f83882 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b6656976228dad970bbab4a7ab144b5e07f83882 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 12:30:33 2024 From: gitlab at gitlab.haskell.org (Zubin (@wz1000)) Date: Fri, 29 Nov 2024 07:30:33 -0500 Subject: [Git][ghc/ghc] Pushed new tag ghc-9.12.1-rc1 Message-ID: <6749b3e9333d1_7ca1e67041c4577f@gitlab.mail> Zubin pushed new tag ghc-9.12.1-rc1 at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/ghc-9.12.1-rc1 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 13:40:50 2024 From: gitlab at gitlab.haskell.org (sheaf (@sheaf)) Date: Fri, 29 Nov 2024 08:40:50 -0500 Subject: [Git][ghc/ghc][wip/T24359] fix TH tests Message-ID: <6749c462a627a_7ca1e82825048138@gitlab.mail> sheaf pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: a0f0e094 by sheaf at 2024-11-29T14:40:40+01:00 fix TH tests - - - - - 4 changed files: - compiler/GHC/Builtin/Names/TH.hs - compiler/GHC/HsToCore/Quote.hs - libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs - libraries/template-haskell/Language/Haskell/TH/Lib.hs Changes: ===================================== compiler/GHC/Builtin/Names/TH.hs ===================================== @@ -75,7 +75,9 @@ templateHaskellNames = [ funDName, valDName, dataDName, newtypeDName, typeDataDName, tySynDName, classDName, instanceWithOverlapDName, standaloneDerivWithStrategyDName, sigDName, kiSigDName, forImpDName, - pragInlDName, pragOpaqueDName, pragSpecDName, pragSpecEDName, pragSpecInstDName, + pragInlDName, pragOpaqueDName, + pragSpecDName, pragSpecInlDName, pragSpecEDName, pragSpecInlEDName, + pragSpecInstDName, pragRuleDName, pragCompleteDName, pragAnnDName, pragSCCFunDName, pragSCCFunNamedDName, defaultSigDName, defaultDName, dataFamilyDName, openTypeFamilyDName, closedTypeFamilyDName, @@ -386,7 +388,8 @@ recSName = libFun (fsLit "recS") recSIdKey -- data Dec = ... funDName, valDName, dataDName, newtypeDName, typeDataDName, tySynDName, classDName, instanceWithOverlapDName, sigDName, kiSigDName, forImpDName, pragInlDName, - pragSpecDName, pragSpecEDName, pragSpecInstDName, pragRuleDName, + pragSpecDName, pragSpecInlDName, pragSpecEDName, pragSpecInlEDName, + pragSpecInstDName, pragRuleDName, pragAnnDName, pragSCCFunDName, pragSCCFunNamedDName, standaloneDerivWithStrategyDName, defaultSigDName, defaultDName, dataInstDName, newtypeInstDName, tySynInstDName, dataFamilyDName, @@ -410,7 +413,9 @@ forImpDName = libFun (fsLit "forImpD") pragInlDName = libFun (fsLit "pragInlD") pragInlDIdKey pragOpaqueDName = libFun (fsLit "pragOpaqueD") pragOpaqueDIdKey pragSpecDName = libFun (fsLit "pragSpecD") pragSpecDIdKey +pragSpecInlDName = libFun (fsLit "pragSpecInlD") pragSpecInlDIdKey pragSpecEDName = libFun (fsLit "pragSpecED") pragSpecEDIdKey +pragSpecInlEDName = libFun (fsLit "pragSpecInlED") pragSpecInlEDIdKey pragSpecInstDName = libFun (fsLit "pragSpecInstD") pragSpecInstDIdKey pragRuleDName = libFun (fsLit "pragRuleD") pragRuleDIdKey pragCompleteDName = libFun (fsLit "pragCompleteD") pragCompleteDIdKey @@ -955,14 +960,15 @@ recSIdKey = mkPreludeMiscIdUnique 316 -- data Dec = ... funDIdKey, valDIdKey, dataDIdKey, newtypeDIdKey, tySynDIdKey, classDIdKey, instanceWithOverlapDIdKey, instanceDIdKey, sigDIdKey, forImpDIdKey, - pragInlDIdKey, pragSpecDIdKey, pragSpecEDIdKey, pragSpecInstDIdKey, + pragInlDIdKey, pragSpecDIdKey, pragSpecInlDIdKey, pragSpecInstDIdKey, pragRuleDIdKey, pragAnnDIdKey, defaultSigDIdKey, dataFamilyDIdKey, openTypeFamilyDIdKey, closedTypeFamilyDIdKey, dataInstDIdKey, newtypeInstDIdKey, tySynInstDIdKey, standaloneDerivWithStrategyDIdKey, infixLWithSpecDIdKey, infixRWithSpecDIdKey, infixNWithSpecDIdKey, roleAnnotDIdKey, patSynDIdKey, patSynSigDIdKey, pragCompleteDIdKey, implicitParamBindDIdKey, kiSigDIdKey, defaultDIdKey, pragOpaqueDIdKey, - typeDataDIdKey, pragSCCFunDKey, pragSCCFunNamedDKey :: Unique + typeDataDIdKey, pragSCCFunDKey, pragSCCFunNamedDKey, + pragSpecEDIdKey, pragSpecInlEDIdKey :: Unique funDIdKey = mkPreludeMiscIdUnique 320 valDIdKey = mkPreludeMiscIdUnique 321 dataDIdKey = mkPreludeMiscIdUnique 322 @@ -975,7 +981,7 @@ sigDIdKey = mkPreludeMiscIdUnique 328 forImpDIdKey = mkPreludeMiscIdUnique 329 pragInlDIdKey = mkPreludeMiscIdUnique 330 pragSpecDIdKey = mkPreludeMiscIdUnique 331 -pragSpecEDIdKey = mkPreludeMiscIdUnique 332 +pragSpecInlDIdKey = mkPreludeMiscIdUnique 332 pragSpecInstDIdKey = mkPreludeMiscIdUnique 333 pragRuleDIdKey = mkPreludeMiscIdUnique 334 pragAnnDIdKey = mkPreludeMiscIdUnique 335 @@ -1001,6 +1007,8 @@ pragOpaqueDIdKey = mkPreludeMiscIdUnique 354 typeDataDIdKey = mkPreludeMiscIdUnique 355 pragSCCFunDKey = mkPreludeMiscIdUnique 356 pragSCCFunNamedDKey = mkPreludeMiscIdUnique 357 +pragSpecEDIdKey = mkPreludeMiscIdUnique 358 +pragSpecInlEDIdKey = mkPreludeMiscIdUnique 359 -- type Cxt = ... cxtIdKey :: Unique ===================================== compiler/GHC/HsToCore/Quote.hs ===================================== @@ -1002,7 +1002,7 @@ rep_sig (L loc (InlineSig _ nm ispec))= rep_inline nm ispec (locA loc) rep_sig (L loc (SpecSig _ nm tys ispec)) = concatMapM (\t -> rep_specialise nm t ispec (locA loc)) tys rep_sig (L loc (SpecSigE _nm bndrs expr ispec)) - = fmap ( \ d -> [(locA loc, d)]) $ + = fmap (\ d -> [(locA loc, d)]) $ rep_specialiseE bndrs expr ispec rep_sig (L loc (SpecInstSig _ ty)) = rep_specialiseInst ty (locA loc) rep_sig (L _ (MinimalSig {})) = notHandled ThMinimalPragmas @@ -1106,15 +1106,14 @@ rep_inline nm ispec loc ; return [(loc, pragma)] } -rep_inline_phases :: InlinePragma -> MetaM (Core (Maybe TH.Inline), Core TH.Phases) +rep_inline_phases :: InlinePragma -> MetaM (Maybe (Core TH.Inline), Core TH.Phases) rep_inline_phases (InlinePragma { inl_act = act, inl_inline = inl }) = do { phases <- repPhases act ; inl <- if noUserInlineSpec inl -- SPECIALISE - then dataCon nothingDataConName + then return Nothing -- SPECIALISE INLINE - else do { MkC inl1 <- repInline inl - ; dataCon' justDataConName [inl1] } + else Just <$> repInline inl ; return (inl, phases) } rep_specialise :: LocatedN Name -> LHsSigType GhcRn -> InlinePragma @@ -2777,18 +2776,26 @@ repPragInl (MkC nm) (MkC inline) (MkC rm) (MkC phases) repPragOpaque :: Core TH.Name -> MetaM (Core (M TH.Dec)) repPragOpaque (MkC nm) = rep2 pragOpaqueDName [nm] -repPragSpec :: Core TH.Name -> Core (M TH.Type) -> Core (Maybe (TH.Inline)) +repPragSpec :: Core TH.Name -> Core (M TH.Type) -> Maybe (Core (TH.Inline)) -> Core TH.Phases -> MetaM (Core (M TH.Dec)) -repPragSpec (MkC nm) (MkC ty) (MkC inline) (MkC phases) - = rep2 pragSpecDName [nm, ty, inline, phases] +repPragSpec (MkC nm) (MkC ty) mb_inl (MkC phases) + = case mb_inl of + Nothing -> + rep2 pragSpecDName [nm, ty, phases] + Just (MkC inl) -> + rep2 pragSpecInlDName [nm, ty, inl, phases] repPragSpecE :: Core (Maybe [M (TH.TyVarBndr ())]) -> Core [(M TH.RuleBndr)] -> Core (M TH.Exp) - -> Core (Maybe (TH.Inline)) -> Core TH.Phases + -> Maybe (Core TH.Inline) -> Core TH.Phases -> MetaM (Core (M TH.Dec)) -repPragSpecE (MkC ty_bndrs) (MkC tm_bndrs) (MkC expr) (MkC inline) (MkC phases) - = rep2 pragSpecEDName [ty_bndrs, tm_bndrs, expr, inline, phases] +repPragSpecE (MkC ty_bndrs) (MkC tm_bndrs) (MkC expr) mb_inl (MkC phases) + = case mb_inl of + Nothing -> + rep2 pragSpecEDName [ty_bndrs, tm_bndrs, expr, phases] + Just (MkC inl) -> + rep2 pragSpecInlEDName [ty_bndrs, tm_bndrs, expr, inl, phases] repPragSpecInst :: Core (M TH.Type) -> MetaM (Core (M TH.Dec)) repPragSpecInst (MkC ty) = rep2 pragSpecInstDName [ty] ===================================== libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs ===================================== @@ -565,6 +565,31 @@ pragSpecInlD n ty inline phases ty1 <- ty pure $ PragmaD $ SpecialiseP n ty1 (Just inline) phases +pragSpecED :: Quote m + => Maybe [m (TyVarBndr ())] -> [m RuleBndr] + -> m Exp + -> Phases + -> m Dec +pragSpecED ty_bndrs tm_bndrs expr phases + = do + ty_bndrs1 <- traverse sequenceA ty_bndrs + tm_bndrs1 <- sequenceA tm_bndrs + expr1 <- expr + pure $ PragmaD $ SpecialiseEP ty_bndrs1 tm_bndrs1 expr1 Nothing phases + +pragSpecInlED :: Quote m + => Maybe [m (TyVarBndr ())] -> [m RuleBndr] + -> m Exp + -> Inline + -> Phases + -> m Dec +pragSpecInlED ty_bndrs tm_bndrs expr inl phases + = do + ty_bndrs1 <- traverse sequenceA ty_bndrs + tm_bndrs1 <- sequenceA tm_bndrs + expr1 <- expr + pure $ PragmaD $ SpecialiseEP ty_bndrs1 tm_bndrs1 expr1 (Just inl) phases + pragSpecInstD :: Quote m => m Type -> m Dec pragSpecInstD ty = do ===================================== libraries/template-haskell/Language/Haskell/TH/Lib.hs ===================================== @@ -122,7 +122,9 @@ module Language.Haskell.TH.Lib ( -- **** Pragmas ruleVar, typedRuleVar, valueAnnotation, typeAnnotation, moduleAnnotation, - pragInlD, pragSpecD, pragSpecInlD, pragSpecInstD, pragRuleD, pragAnnD, + pragInlD, pragSpecD, pragSpecInlD, + pragSpecED, pragSpecInlED, + pragSpecInstD, pragRuleD, pragAnnD, pragLineD, pragCompleteD, -- **** Pattern Synonyms View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a0f0e094bf6bec16489b9205195547e9209468fb -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a0f0e094bf6bec16489b9205195547e9209468fb You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 14:06:02 2024 From: gitlab at gitlab.haskell.org (sheaf (@sheaf)) Date: Fri, 29 Nov 2024 09:06:02 -0500 Subject: [Git][ghc/ghc][wip/T24359] fix parsing of expression SPECIALISE INLINE Message-ID: <6749ca4acb082_7ca1ea382fc532f@gitlab.mail> sheaf pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: d6280b35 by sheaf at 2024-11-29T15:05:56+01:00 fix parsing of expression SPECIALISE INLINE - - - - - 3 changed files: - compiler/GHC/Parser.y - testsuite/tests/th/TH_pragma.hs - testsuite/tests/th/TH_pragma.stderr Changes: ===================================== compiler/GHC/Parser.y ===================================== @@ -2768,15 +2768,18 @@ sigdecl :: { LHsDecl GhcPs } | '{-# SPECIALISE' activation rule_foralls infixexp sigtypes_maybe '#-}' {% runPV (unECP $4) >>= \ $4 -> do let inl_prag = mkInlinePragma (getSPEC_PRAGs $1) - (NoUserInlinePrag, FunLike) - (snd $2) - spec <- mkSpecSig inl_prag (AnnSpecSig (glR $1) (epTok $6) Nothing (fst $2)) $3 $4 $5 + (NoUserInlinePrag, FunLike) + (snd $2) + spec <- mkSpecSig inl_prag (AnnSpecSig (glR $1) (epTok $6) (fmap fst $5) (fst $2)) $3 $4 $5 amsA' $ sLL $1 $> $ SigD noExtField spec } - | '{-# SPECIALISE_INLINE' activation qvar '::' sigtypes1 '#-}' - {% amsA' (sLL $1 $> $ SigD noExtField (SpecSig (AnnSpecSig (glR $1) (epTok $6) (Just $ epUniTok $4) (fst $2)) $3 (fromOL $5) - (mkInlinePragma (getSPEC_INLINE_PRAGs $1) - (getSPEC_INLINE $1) (snd $2)))) } + | '{-# SPECIALISE_INLINE' activation rule_foralls infixexp sigtypes_maybe '#-}' + {% runPV (unECP $4) >>= \ $4 -> do + let inl_prag = mkInlinePragma (getSPEC_INLINE_PRAGs $1) + (getSPEC_INLINE $1) + (snd $2) + spec <- mkSpecSig inl_prag (AnnSpecSig (glR $1) (epTok $6) (fmap fst $5) (fst $2)) $3 $4 $5 + amsA' $ sLL $1 $> $ SigD noExtField spec } | '{-# SPECIALISE' 'instance' inst_type '#-}' {% amsA' (sLL $1 $> $ SigD noExtField (SpecInstSig ((glR $1,epTok $2,epTok $4), (getSPEC_PRAGs $1)) $3)) } ===================================== testsuite/tests/th/TH_pragma.hs ===================================== @@ -10,3 +10,7 @@ $( [d| foo :: Int -> Int $( [d| bar :: Num a => a -> a {-# SPECIALISE INLINE [~1] bar :: Float -> Float #-} bar x = x * 10 |] ) + +$( [d| baz :: Num a => a -> a + {-# SPECIALISE INLINE [~1] baz @Double #-} + baz x = x * 10 |] ) ===================================== testsuite/tests/th/TH_pragma.stderr ===================================== @@ -14,3 +14,11 @@ TH_pragma.hs:(10,2)-(12,33): Splicing declarations bar :: Num a => a -> a {-# SPECIALISE INLINE [~1] bar :: Float -> Float #-} bar x = (x * 10) +TH_pragma.hs:(14,2)-(16,33): Splicing declarations + [d| baz :: Num a => a -> a + {-# SPECIALISE INLINE [~1] baz @Double #-} + baz x = x * 10 |] + ======> + baz :: Num a => a -> a + {-# SPECIALISE INLINE [~1] baz @Double #-} + baz x = (x * 10) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d6280b35adf296d327053ae799d76e20d157dfbd -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d6280b35adf296d327053ae799d76e20d157dfbd You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 17:33:13 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 29 Nov 2024 12:33:13 -0500 Subject: [Git][ghc/ghc][wip/T25445b] Lint applications better Message-ID: <6749fad9cf721_3d16fe6f93ac11375a@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445b at Glasgow Haskell Compiler / GHC Commits: a886a5de by Simon Peyton Jones at 2024-11-29T17:31:53+00:00 Lint applications better Notably lint_app2 - - - - - 3 changed files: - compiler/GHC/Core/Lint.hs - compiler/GHC/Iface/Type.hs - testsuite/tests/perf/compiler/genT14766.py Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -889,10 +889,10 @@ lintCoreExpr (Cast expr co) -- markAllJoinsBad: see Note [Join points and casts] ; lintCoercion co + ; lintRole co Representational (coercionRole co) ; Pair from_ty to_ty <- substCoKindM co ; checkValueType (typeKind to_ty) $ text "target of cast" <+> quotes (ppr co) - ; lintRole co Representational (coercionRole co) ; ensureEqTys from_ty expr_ty (mkCastErr expr co from_ty expr_ty) ; return (to_ty, ue) } @@ -959,20 +959,24 @@ lintCoreExpr e@(Let (Rec pairs) body) lintCoreExpr e@(App _ _) | Var fun <- fun , fun `hasKey` runRWKey + -- See Note [Linting of runRW#] -- N.B. we may have an over-saturated application of the form: -- runRW (\s -> \x -> ...) y - , ty_arg1 : ty_arg2 : arg3 : rest <- args - = do { fun_pair1 <- lintCoreArg (idType fun, zeroUE) ty_arg1 - ; (fun_ty2, ue2) <- lintCoreArg fun_pair1 ty_arg2 - -- See Note [Linting of runRW#] - ; let lintRunRWCont :: CoreArg -> LintM (OutType, UsageEnv) - lintRunRWCont expr@(Lam _ _) = - lintJoinLams 1 (Just fun) expr - lintRunRWCont other = markAllJoinsBad $ lintCoreExpr other + , ty_arg1 : ty_arg2 : cont_arg : rest <- args + = do { let lint_rw_cont :: CoreArg -> Mult -> UsageEnv -> LintM (OutType, UsageEnv) + lint_rw_cont expr@(Lam _ _) mult fun_ue + = do { (arg_ty, arg_ue) <- lintJoinLams 1 (Just fun) expr + ; let app_ue = addUE fun_ue (scaleUE mult arg_ue) + ; return (arg_ty, app_ue) } + + lint_rw_cont expr mult ue + = lintValArg expr mult ue -- TODO: Look through ticks? - ; (arg3_ty, ue3) <- lintRunRWCont arg3 - ; app_ty <- lintValApp arg3 fun_ty2 arg3_ty ue2 ue3 - ; lintCoreArgs app_ty rest } + + ; runrw_pr <- lint_app2 (text "runRW# expression") + lintTyArg lint_rw_cont + (idType fun) zeroUE [ty_arg1,ty_arg2,cont_arg] + ; lintCoreArgs runrw_pr rest } | otherwise = do { fun_pair <- lintCoreFun fun (length args) @@ -1008,8 +1012,7 @@ lintCoreExpr (Lam var expr) lintCoreExpr (Case scrut var alt_ty alts) = lintCaseExpr scrut var alt_ty alts --- This case can't happen; linting types in expressions gets routed through --- lintCoreArgs +-- This case can't happen; linting types in expressions gets routed through lintTyArg lintCoreExpr (Type ty) = failWithL (text "Type found as expression" <+> ppr ty) @@ -1453,42 +1456,28 @@ subtype of the required type, as one would expect. -- Takes the functions type and arguments as argument. -- Returns the *result* of applying the function to arguments. -- e.g. f :: Int -> Bool -> Int would return `Int` as result type. -lintCoreArgs :: (OutType, UsageEnv) -> [CoreArg] -> LintM (OutType, UsageEnv) +lintCoreArgs :: (OutType, UsageEnv) -> [InExpr] -> LintM (OutType, UsageEnv) lintCoreArgs (fun_ty, fun_ue) args - = do { in_scope <- getInScope - ; let init_subst = mkEmptySubst in_scope - go subst (fun_ty,fun_ue) [] - = (substTy subst fun_ty, fun_ue) - + = lint_app2 (text "expression") + lintTyArg lintValArg fun_ty fun_ue args - go subst (fun_ty, fun_ue) all_args@(Type ty:args) - | - - ; go init_subst (fun_ty, fun_ue) args } - -lintCoreArg :: (OutType, UsageEnv) -> CoreArg -> LintM (OutType, UsageEnv) +lintTyArg :: InExpr -> LintM OutType -- Type argument -lintCoreArg (fun_ty, ue) (Type arg_ty) +lintTyArg (Type arg_ty) = do { checkL (not (isCoercionTy arg_ty)) (text "Unnecessary coercion-to-type injection:" <+> ppr arg_ty) - ; arg_ty' <- lintTypeAndSubst arg_ty - ; res <- lintTyApp fun_ty arg_ty' - ; return (res, ue) } - --- Coercion argument -lintCoreArg (fun_ty, ue) (Coercion co) - = do { addLoc (InCo co) (lintCoercion co) - ; res <- lintCoApp fun_ty co - ; return (res, ue) } - --- Other value argument -lintCoreArg (fun_ty, fun_ue) arg + ; lintTypeAndSubst arg_ty } +lintTyArg arg + = failWithL (hang (text "Expected type argument but found") 2 (ppr arg)) + +lintValArg :: InExpr -> Mult -> UsageEnv -> LintM (OutType, UsageEnv) +lintValArg arg mult fun_ue = do { (arg_ty, arg_ue) <- markAllJoinsBad $ lintCoreExpr arg -- See Note [Representation polymorphism invariants] in GHC.Core - ; flags <- getLintFlags + ; flags <- getLintFlags ; when (lf_check_fixed_rep flags) $ -- Only check that 'arg_ty' has a fixed RuntimeRep -- if 'lf_check_fixed_rep' is on. @@ -1497,7 +1486,8 @@ lintCoreArg (fun_ty, fun_ue) arg <+> ppr arg <+> dcolon <+> parens (ppr arg_ty <+> dcolon <+> ppr (typeKind arg_ty))) } - ; lintValApp arg fun_ty arg_ty fun_ue arg_ue } + ; let app_ue = addUE fun_ue (scaleUE mult arg_ue) + ; return (arg_ty, app_ue) } ----------------- lintAltBinders :: UsageEnv @@ -1559,26 +1549,6 @@ lintTyApp fun_ty arg_ty | otherwise = failWithL (mkTyAppMsg fun_ty arg_ty) ------------------ -lintCoApp :: OutType -> InCoercion -> LintM OutType -lintCoApp fun_ty co - = do { co_ty <- substTyM (coercionType co) - - ; if | Just (cv,body_ty) <- splitForAllCoVar_maybe fun_ty - , let cv_ty = idType cv - , cv_ty `eqType` co_ty - -> do { in_scope <- getInScope - ; let init_subst = mkEmptySubst in_scope - subst = extendCvSubst init_subst cv co - ; return (substTy subst body_ty) } - - | Just (_, _, arg_ty', res_ty') <- splitFunTy_maybe fun_ty - , co_ty `eqType` arg_ty' - -> return (res_ty') - - | otherwise - -> failWithL (mkCoAppMsg fun_ty co) } - ----------------- -- | @lintValApp arg fun_ty arg_ty@ lints an application of @fun arg@ @@ -2110,78 +2080,78 @@ lintTyLit (CharTyLit _) = return () ----------------- lint_ty_app :: InType -> OutKind -> [InType] -> LintM () -lint_ty_app msg_ty fun_kind arg_tys - -- See Note [Avoiding compiler perf traps when constructing error messages.] - = do { mapM_ lintType arg_tys - ; lint_app (text "type" <+> quotes (ppr msg_ty)) fun_kind arg_tys } +lint_ty_app ty = lint_tyco_app (text "type" <+> quotes (ppr ty)) ----------------- -lint_co_app :: Coercion -> OutKind -> [InType] -> LintM () -lint_co_app msg_ty k tys +lint_co_app :: HasDebugCallStack => Coercion -> OutKind -> [InType] -> LintM () +lint_co_app co = lint_tyco_app (text "coercion" <+> quotes (ppr co)) + +lint_tyco_app :: SDoc -> OutKind -> [InType] -> LintM () +lint_tyco_app msg fun_kind arg_tys -- See Note [Avoiding compiler perf traps when constructing error messages.] - = lint_app (text "coercion" <+> quotes (ppr msg_ty)) k tys + = do { _ <- lint_app2 msg (\ty -> do { lintType ty; substTyM ty }) + (\ty _ _ -> do { lintType ty; ki <- substTyM (typeKind ty); return (ki,()) }) + fun_kind () arg_tys + ; return () } ---------------- -lint_app :: SDoc -> OutKind -> [InType] -> LintM () --- (lint_app d fun_kind arg_tys) --- We have an application (f arg_ty1 .. arg_tyn), --- where f :: fun_kind - --- If you edit this function, you may need to update the GHC formalism --- See Note [GHC Formalism] --- --- Being strict in the kind here avoids quite a few pointless thunks --- reducing allocations by ~5% -lint_app msg !kfn arg_tys +lint_app2 :: Outputable a => SDoc + -> (a -> LintM OutType) -- Lint the thing and return its value + -> (a -> Mult -> acc -> LintM (OutKind, acc)) -- Lint the thing and return its type + -> OutType -> acc -> [a] -> LintM (OutType,acc) +{-# INLINE lint_app2 #-} -- Very few call sites +-- 'acc' is either () for types, or UsageEnv for terms +lint_app2 msg lint_val lint_ty !orig_fun_ty acc all_args = do { !in_scope <- getInScope -- We need the in_scope set to satisfy the invariant in -- Note [The substitution invariant] in GHC.Core.TyCo.Subst -- Forcing the in scope set eagerly here reduces allocations by up to 4%. - ; go_app in_scope kfn arg_tys - } - where - -- We use explicit recursion instead of a fold here to avoid go_app becoming - -- an allocated function closure. This reduced allocations by up to 7% for some - -- modules. - go_app :: InScopeSet -> OutKind -> [InType] -> LintM () - go_app !in_scope !kfn ta - | Just kfn' <- coreView kfn - = go_app in_scope kfn' ta - - go_app _in_scope _kfn [] = return () - - go_app in_scope fun_kind@(FunTy _ _ kfa kfb) (ta:tas) - = do { ka <- substTyM (typeKind ta) - ; unless (ka `eqType` kfa) $ - addErrL (lint_app_fail_msg kfn arg_tys msg - (text "Fun:" <+> (ppr fun_kind $$ ppr ta <+> dcolon <+> ppr ka))) - ; go_app in_scope kfb tas } - - go_app in_scope (ForAllTy (Bndr kv _vis) kfn) (ta:tas) - = do { ta' <- substTyM ta - ; let kv_kind = varType kv - ka = typeKind ta' - ; unless (ka `eqType` kv_kind) $ - addErrL (lint_app_fail_msg kfn arg_tys msg - (text "Forall:" <+> (ppr kv $$ ppr kv_kind $$ - ppr ta' <+> dcolon <+> ppr ka))) - ; let kind' = substTy (extendTCvSubst (mkEmptySubst in_scope) kv ta') kfn - ; go_app in_scope kind' tas } - - go_app _ kfn ta - = failWithL (lint_app_fail_msg kfn arg_tys msg - (text "Not a fun:" <+> (ppr kfn $$ ppr ta))) + ; let init_subst = mkEmptySubst in_scope + + go subst fun_ty acc [] = return (substTy subst fun_ty, acc) + + go subst fun_ty@(FunTy _ mult exp_arg_ty res_ty) acc (arg:args) + = do { (arg_ty, acc') <- lint_ty arg mult acc + ; ensureEqTys (substTy subst exp_arg_ty) arg_ty $ + lint_app_fail_msg msg orig_fun_ty all_args + (text "Fun:" <+> (vcat [ text "fun_ty:" <+> ppr fun_ty + , text "exp_arg_ty:" <+> ppr exp_arg_ty + , text "arg:" <+> ppr arg <+> dcolon <+> ppr arg_ty ])) + ; go subst res_ty acc' args } + + go subst (ForAllTy (Bndr tv _vis) body_ty) acc (arg:args) + = do { arg' <- lint_val arg + ; let tv_kind = substTy subst (varType tv) + karg' = typeKind arg' + subst' = extendTCvSubst subst tv arg' + ; ensureEqTys karg' tv_kind $ + lint_app_fail_msg msg orig_fun_ty all_args + (hang (text "Forall:" <+> (ppr tv $$ ppr tv_kind)) + 2 (ppr arg' <+> dcolon <+> ppr karg')) + ; go subst' body_ty acc args } + + go subst fun_ty acc args + | Just fun_ty' <- coreView fun_ty + = go subst fun_ty' acc args + + | not (isEmptyTCvSubst subst) -- See Note [Care with kind instantiation] + = go init_subst (substTy subst fun_ty) acc args + + | otherwise + = failWithL (lint_app_fail_msg msg orig_fun_ty all_args + (text "Not a fun:" <+> (ppr fun_ty $$ ppr args))) + + ; go init_subst orig_fun_ty acc all_args } -- This is a top level definition to ensure we pass all variables of the error message -- explicitly and don't capture them as free variables. Otherwise this binder might -- become a thunk that get's allocated in the hot code path. -- See Note [Avoiding compiler perf traps when constructing error messages.] -lint_app_fail_msg :: OutKind -> [InType] -> SDoc -> SDoc -> SDoc -lint_app_fail_msg kfn arg_tys msg extra - = vcat [ hang (text "Kind application error in") 2 msg - , nest 2 (text "Function kind =" <+> ppr kfn) - , nest 2 (text "Arg types =" <+> ppr arg_tys) +lint_app_fail_msg :: (Outputable a2) => SDoc -> OutType -> a2 -> SDoc -> SDoc +lint_app_fail_msg msg kfn arg_tys extra + = vcat [ hang (text "Application error in") 2 msg + , nest 2 (text "Function type =" <+> ppr kfn) + , nest 2 (text "Args =" <+> ppr arg_tys) , extra ] {- ********************************************************************* @@ -2322,7 +2292,7 @@ substCoKindM co ; rk' <- substTyM rk ; return (Pair lk' rk') } -lintCoercion :: InCoercion -> LintM () +lintCoercion :: HasDebugCallStack => InCoercion -> LintM () -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism] @@ -2402,15 +2372,16 @@ lintCoercion co@(ForAllCo { fco_tcv = tcv, fco_visL = visL, fco_visR = visR ; ensureEqTys (varType tcv') lk $ text "Kind mis-match in ForallCo" <+> ppr co +-- TODO: these calls are expensive -- Assuming kind_co :: k1 ~ k2 -- Need to check that -- (forall (tcv:k1). lty) and -- (forall (tcv:k2). rty[(tcv:k2) |> sym kind_co/tcv]) -- are both well formed. Easiest way is to call lintForAllBody -- for each; there is actually no need to do the funky substitution - ; let (Pair lty rty, body_role) = coercionKindRole body_co - ; lintForAllBody tcv' lty - ; lintForAllBody tcv' rty +-- ; let (Pair lty rty, body_role) = coercionKindRole body_co +-- ; lintForAllBody tcv' lty +-- ; lintForAllBody tcv' rty ; when (isCoVar tcv) $ do { lintL (visL == coreTyLamForAllTyFlag && visR == coreTyLamForAllTyFlag) $ @@ -2421,7 +2392,7 @@ lintCoercion co@(ForAllCo { fco_tcv = tcv, fco_visL = visL, fco_visR = visR -- See (FC6) in Note [ForAllCo] in GHC.Core.TyCo.Rep } - ; when (body_role == Nominal) $ + ; when (coercionRole body_co == Nominal) $ lintL (visL `eqForAllVis` visR) $ text "Nominal ForAllCo has mismatched visibilities: " <+> ppr co } } @@ -3418,11 +3389,11 @@ addInScopeId in_id out_ty thing_inside | isJoinId out_id = extendVarSet join_set in_id -- Overwrite with new arity | otherwise = delVarSet join_set in_id -- Remove any existing binding -addInScopeTyCoVar :: HasDebugCallStack => InTyCoVar -> OutType -> (OutTyCoVar -> LintM a) -> LintM a -addInScopeTyCoVar tcv tcv_kind thing_inside +addInScopeTyCoVar :: InTyCoVar -> OutType -> (OutTyCoVar -> LintM a) -> LintM a +addInScopeTyCoVar tcv tcv_type thing_inside = LintM $ \ env@(LE { le_in_vars = in_vars, le_subst = subst }) errs -> let (tcv', subst') = subst_bndr subst - env' = env { le_in_vars = extendVarEnv in_vars tcv (tcv, tcv_kind) + env' = env { le_in_vars = extendVarEnv in_vars tcv (tcv, tcv_type) , le_subst = subst' } in unLintM (thing_inside tcv') env' errs where @@ -3430,11 +3401,13 @@ addInScopeTyCoVar tcv tcv_kind thing_inside | isEmptyTCvSubst subst -- No change in kind , not (tcv `elemInScopeSet` in_scope) -- No change in unique = -- Do not extend the substitution, just the in-scope set - assertPpr (varType tcv `eqType` tcv_kind) - (ppr tcv $$ ppr (varType tcv) $$ ppr tcv_kind) $ + (if (varType tcv `eqType` tcv_type) then (\x->x) else + pprTrace "addInScopeTyCoVar" ( + vcat [ text "tcv" <+> ppr tcv <+> dcolon <+> ppr (varType tcv) + , text "tcv_type" <+> ppr tcv_type ])) $ (tcv, subst `extendSubstInScope` tcv) - | let tcv' = uniqAway in_scope (setVarType tcv tcv_kind) + | let tcv' = uniqAway in_scope (setVarType tcv tcv_type) = (tcv', extendTCvSubstWithClone subst tcv tcv') where in_scope = substInScopeSet subst @@ -3769,14 +3742,6 @@ mkTyAppMsg ty arg_ty hang (text "Type argument:") 4 (ppr arg_ty <+> dcolon <+> ppr (typeKind arg_ty))] -mkCoAppMsg :: Type -> Coercion -> SDoc -mkCoAppMsg fun_ty co - = vcat [ text "Illegal coercion application:" - , hang (text "Function type:") - 4 (ppr fun_ty) - , hang (text "Coercion argument:") - 4 (ppr co <+> dcolon <+> ppr (coercionType co))] - emptyRec :: CoreExpr -> SDoc emptyRec e = hang (text "Empty Rec binding:") 2 (ppr e) ===================================== compiler/GHC/Iface/Type.hs ===================================== @@ -1980,7 +1980,7 @@ ppr_co ctxt_prec (IfaceFunCo r co_mult co1 co2) mb_conc _ = Nothing ppr_co _ (IfaceTyConAppCo r tc cos) - = parens (pprIfaceCoTcApp topPrec tc cos) <> ppr_role r + = parens (text "tcapp" <+> pprIfaceCoTcApp topPrec tc cos) <> ppr_role r ppr_co ctxt_prec (IfaceAppCo co1 co2) = maybeParen ctxt_prec appPrec $ ppr_co funPrec co1 <+> pprParendIfaceCoercion co2 @@ -2038,8 +2038,8 @@ ppr_special_co ctxt_prec doc cos (sep [doc, nest 4 (sep (map pprParendIfaceCoercion cos))]) pprIfAxRule :: IfaceAxiomRule -> SDoc -pprIfAxRule (IfaceAR_X n) = ppr n -pprIfAxRule (IfaceAR_U n) = ppr n +pprIfAxRule (IfaceAR_X n) = ppr n <> text "axx" +pprIfAxRule (IfaceAR_U n) = ppr n <> text "axu" pprIfAxRule (IfaceAR_B n i) = ppr n <> brackets (int i) ppr_role :: Role -> SDoc ===================================== testsuite/tests/perf/compiler/genT14766.py ===================================== @@ -1,8 +1,12 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -N_VARS = 100 -N_BINDS = 50 +# N_VARS = 100 +# N_BINDS = 50 + +N_VARS = 600 +# N_VARS = 10 +N_BINDS = 1 tyvars = ' '.join('v{i}'.format(i=i) for i in range(N_VARS)) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a886a5de1f2649239868a39937898c1a5abe7ab6 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a886a5de1f2649239868a39937898c1a5abe7ab6 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 17:43:28 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 29 Nov 2024 12:43:28 -0500 Subject: [Git][ghc/ghc][wip/T24359] Further improvements Message-ID: <6749fd402835a_3d16fe7f1944115598@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 91d508f1 by Simon Peyton Jones at 2024-11-29T17:38:55+00:00 Further improvements ...mainly documentation - - - - - 6 changed files: - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/HsToCore.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Zonk/Type.hs - testsuite/tests/simplCore/should_fail/T25117b.stderr Changes: ===================================== compiler/GHC/Core/Opt/Simplify/Iteration.hs ===================================== @@ -1159,15 +1159,15 @@ simplExprF :: SimplEnv -> SimplM (SimplFloats, OutExpr) simplExprF !env e !cont -- See Note [Bangs in the Simplifier] - = {- pprTrace "simplExprF" (vcat - [ ppr e - , text "cont =" <+> ppr cont - , text "inscope =" <+> ppr (seInScope env) - , text "tvsubst =" <+> ppr (seTvSubst env) - , text "idsubst =" <+> ppr (seIdSubst env) - , text "cvsubst =" <+> ppr (seCvSubst env) - ]) $ -} - simplExprF1 env e cont +-- = pprTrace "simplExprF" (vcat +-- [ ppr e +-- , text "cont =" <+> ppr cont +-- , text "inscope =" <+> ppr (seInScope env) +-- , text "tvsubst =" <+> ppr (seTvSubst env) +-- , text "idsubst =" <+> ppr (seIdSubst env) +-- , text "cvsubst =" <+> ppr (seCvSubst env) +-- ]) $ + = simplExprF1 env e cont simplExprF1 :: HasDebugCallStack => SimplEnv -> InExpr -> SimplCont @@ -2514,7 +2514,7 @@ field of the ArgInfo record is the state of a little state-machine: If we inline `f` before simplifying `BIG` well use preInlineUnconditionally, and we'll simplify BIG once, at x's occurrence, rather than twice. -* GHC.Core.Opt.Simplify.Utils. mkRewriteCall: if there are no rules, and no +* GHC.Core.Opt.Simplify.Utils.mkRewriteCall: if there are no rules, and no unfolding, we can skip both TryRules and TryInlining, which saves work. Note [Avoid redundant simplification] ===================================== compiler/GHC/HsToCore.hs ===================================== @@ -54,7 +54,7 @@ import GHC.Core.SimpleOpt ( simpleOptPgm, simpleOptExpr ) import GHC.Core.Utils import GHC.Core.Unfold.Make import GHC.Core.Coercion -import GHC.Core.Predicate( mkNomEqPred ) +import GHC.Core.Predicate( scopedSort, mkNomEqPred ) import GHC.Core.DataCon ( dataConWrapId ) import GHC.Core.Make import GHC.Core.Rules @@ -461,7 +461,10 @@ dsRule (L loc (HsRule { rd_name = name , rd_lhs = lhs , rd_rhs = rhs })) = putSrcSpanDs (locA loc) $ - do { let bndrs' = [var | L _ (RuleBndr _ (L _ var)) <- vars] + do { let bndrs' = scopedSort [var | L _ (RuleBndr _ (L _ var)) <- vars] + -- The scopedSort is because the binders may not + -- be in dependency order; see wrinkle (FTV1) in + -- Note [Free tyvars on rule LHS] in GHC.Tc.Zonk.Type ; lhs' <- unsetGOptM Opt_EnableRewriteRules $ unsetWOptM Opt_WarnIdentities $ ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -884,16 +884,16 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id Nothing -> do { diagnosticDs (DsRuleLhsTooComplicated ds_call core_call) ; return Nothing } ; - Just (bndr_set, rhs_const_binds, lhs_args) -> + Just (bndr_set, spec_const_binds, lhs_args) -> - do { let const_bndrs = mkVarSet (bindersOfBinds rhs_const_binds) + do { let const_bndrs = mkVarSet (bindersOfBinds spec_const_binds) all_bndrs = bndr_set `unionVarSet` const_bndrs -- all_bndrs: all binders in core_call that should be quantified rule_bndrs = scopedSort (exprsSomeFreeVarsList (`elemVarSet` all_bndrs) lhs_args) - spec_bndrs = filterOut (`elemVarSet` const_bndrs) rule_bndrs + spec_bndrs = filterOut (`elemVarSet` const_bndrs) rule_bndrs - mk_spec_body fn_body = mkLets rhs_const_binds $ + mk_spec_body fn_body = mkLets spec_const_binds $ mkCoreApps fn_body lhs_args ; tracePm "dsSpec" (vcat [ text "poly_id" <+> ppr poly_id @@ -901,7 +901,7 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id , text "ds_call" <+> ppr ds_call , text "core_call" <+> ppr core_call , text "core_call fvs" <+> ppr (exprFreeVars core_call) - , text "rhs_const_binds" <+> ppr rhs_const_binds ]) + , text "spec_const_binds" <+> ppr spec_const_binds ]) ; finishSpecPrag poly_rhs rule_bndrs poly_id lhs_args @@ -922,7 +922,7 @@ prepareSpecLHS poly_id evs the_call go qevs acc (Let bind e) | not (all isDictId bndrs) -- A normal 'let' is too complicated = Nothing - | all (isEmptyVarSet . exprSomeFreeVars (is_quant_id qevs)) $ + | all (transfer_to_spec_rhs qevs) $ rhssOfBind bind = go qevs (bind:acc) e | otherwise @@ -937,7 +937,11 @@ prepareSpecLHS poly_id evs the_call | otherwise = Nothing - is_quant_id qevs v = isId v && v `elemVarSet` qevs + transfer_to_spec_rhs qevs rhs + = exprIsTrivial rhs + || isEmptyVarSet (exprSomeFreeVars is_quant_id rhs) + where + is_quant_id v = isId v && v `elemVarSet` qevs -- See Note [Desugaring SPECIALISE pragmas] wrinkle (DS1) finishSpecPrag :: CoreExpr -- RHS to specialise ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -700,11 +700,10 @@ Note [Handling new-form SPECIALISE pragmas] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New-form SPECIALISE pragmas are described by GHC Proposal #493. -The thing in the SpecPragE is very, very like the LHS of a RULE +The pragma takes the form of a function application, possibly with intervening +parens and type signatures, with a variable at the head. It may have rule +for-alls at the top. e.g. -In particular, the pragma takes the form of a function application, -possibly with intervening parens and type signatures, with a variable -at the head. It may have rule for-alls at the top. e.g. {-# SPECIALISE f1 @Int 3 #-} {-# SPECIALISE forall x xs. f2 (x:xs) #-} {-# SPECIALISE f3 :: Int -> Int #-} @@ -714,41 +713,65 @@ See `GHC.Rename.Bind.checkSpecESigShape` for the shape-check. Example: - f :: forall a b. (Eq a, Eq b, Ord c) => a -> b -> c -> Bool -> blah + f :: forall a b. (Eq a, Eq b, Eq c) => a -> b -> c -> Bool -> blah {-# SPECIALISE forall x y. f (x::Int) y y True #-} -- y::p We want to generate: - RULE forall @p (d1::Eq Int) (d2::Eq p) (d3::Ord p) (x::Int) (y::p). + RULE forall @p (d1::Eq Int) (d2::Eq p) (d3::Eq p) (x::Int) (y::p). f @Int @p @p d1 d2 d3 x y y True - = $sf @p d1 d2 d3 x y - $sf @p (d1a::Eq Int) (d2a::Eq p) (d3a::Ord p) (x::Int) (y::p) + = $sf @p d2 x y + $sf @p (d2::Eq p) (x::Int) (y::p) = let d1 = $fEqInt - d2 = d2a - d3 = d3a - in let f = - in f @p @p @Int (d1::Eq p) (d2::Eq p) (d3::Ord Int) x y y True - -In terms of the code: - spe_tv_bndrs = @p - spe_id_bndrs = x:Int y y:p - spe_lhs_ev_bndrs = (e1:Eq p) (d2:Eq p) (d3:Ord Int) - spe_lhs_call = f @p @p @Int (d1::Eq p) (d2::Eq p) (d3::Ord Int) x y y True - -- We can't meddle with this; it's a perhaps-big expression - spe_rhs_ev_bndrs = @d1a @d2a @d3a - spe_rhs_binds = { d1=$fEqInt; d2=d2a; d3=d3a } + d3 = d2 + in @p @p @Int (d1::Eq p) (d2::Eq p) (d3::Eq p) x y y True Note that -* In the RULE we have separate binders for `d1` and `d2` even though they are +* The `rule_bndrs`, over which the RULE is quantified, are all the varaibles + free in the call to `f`, /ignoring/ all dictionary simplification. Why? + Because we want to make the rule maximimally applicable; provided the types + match, the dicionaries should match. + + rule_bndrs = @p (d1::Eq Int) (d2::Eq p) (d3::Eq p) (x::Int) (y::p). + + Note that we have separate binders for `d1` and `d2` even though they are the same (Eq p) dictionary. Reason: we don't want to force them to be visibly equal at the call site. -* The specialised function $sf takes all three dictionaries as arguments; but - the constraint solver does not use d1 (short-cut solved). We rely on the - Simplifier to drop the dead arguments. It isn't strictly necessary to pass d2 - either, but it does no harm. +* The `spec_bnrs`, which are lambda-bound in the specialised function `$sf`, + are a subset of `rul_bndrs`. + + spec_bndrs = @p (d2::Eq p) (x::Int) (y::p) + +* The `spec_const_binds` make up the difference between `rule_bndrs` and + `spec_bndrs`. They communicate the specialisation! + If `spec_bndrs` = `rule_bndrs`, no specialisation has happended. + + spec_const_binds = let d1 = $fEqInt + d3 = d2 + +How it works: + +* `GHC.Tc.Gen.Sig.tcSpecPrag` just typechecks the expresion, putting the results + into a `SpecPragE` record. Nothing very exciting happens here. + +* `GHC.Tc.Zonk.Type.zonkLTcSpecPrags` does a little extra work to collect any + free type variables of the LHS. See Note [Free tyvars on rule LHS] in + GHC.Tc.Zonk.Type. These weren't conveniently available earlier. + +* `GHC.HsToCore.Binds.dsSpec` does the clever stuff: + + * Simplifies the expression. This is important becuase a type signature in the + expression will have led to type/dictionary abstractions/applications. Now + it should look like + let in f e1 e1 e3 + + * `prepareSpecLHS` identifies the `spec_const_binds` (see above), discards + the other ditionary bindigns, and decomposes the call. + + * Then it can build the RULE and specialised function. Note [Handling old-form SPECIALISE pragmas] ===================================== compiler/GHC/Tc/Zonk/Type.hs ===================================== @@ -1745,9 +1745,17 @@ over it. Here is how: - make a fresh ref-cell to collect the skolemised type variables, - zonk the binders and LHS with ze_flexi = SkolemiseFlexi ref - read the ref-cell to get all the skolemised TyVars - - add them to the bineders + - add them to the binders All this applies for SPECIALISE pragmas too. + +Wrinkles: + +(FTV1) We just add the new tyvars to the front of the binder-list, but + that make make the list not be in dependency order. Example (T12925): + the existing list is [k:Type, b:k], and we add (a:k) to the front. + Also we just collect the new skolemised type variables in any old order, + so they may not be ordered with respect to each other. -} {- ===================================== testsuite/tests/simplCore/should_fail/T25117b.stderr ===================================== @@ -1,2 +1,2 @@ -T25117b.hs:6:1: error: [GHC-62037] +T25117b.hs:7:1: error: [GHC-62037] SPECIALIZE expression doesn't support multiple specialize type ascriptions View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/91d508f118177cf1fde3d73416dfb5b82d5d100b -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/91d508f118177cf1fde3d73416dfb5b82d5d100b You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 18:55:59 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 29 Nov 2024 13:55:59 -0500 Subject: [Git][ghc/ghc][ghc-9.8] 4 commits: compiler: Fix bootstrapping with 9.8.3 Message-ID: <674a0e3f8c47a_3af6d72e8308610ef@gitlab.mail> Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC Commits: 7a274a7f by Ben Gamari at 2024-11-25T14:20:29-05:00 compiler: Fix bootstrapping with 9.8.3 Bump the CPP in genSym to ensure that we don't look for `ghc_unique_counter64` in any compilers earlier than 9.8.4. Inconsistency noticed in #25519. - - - - - 0768fe93 by Cheng Shao at 2024-11-26T13:25:31-05:00 testsuite: bump T22744 timeout to 5x - - - - - 22559ece by Ben Gamari at 2024-11-27T10:09:54-05:00 testsuite: Skip T22744 due to #22524 This test has been routinely timing out on Darwin; this is being investigated but for the time being we will disable it to move ahead with the 9.8.4 release. - - - - - a3401159 by Mario Blažević at 2024-11-27T10:13:19-05:00 Bumped the upper bound of text to <2.2 (cherry picked from commit 471b267294bc5f17e4864ce9bb2f221c4d47eac8) - - - - - 4 changed files: - compiler/cbits/genSym.c - linters/lint-commit-msg/lint-commit-msg.cabal - linters/lint-submodule-refs/lint-submodule-refs.cabal - testsuite/tests/perf/compiler/all.T Changes: ===================================== compiler/cbits/genSym.c ===================================== @@ -9,7 +9,7 @@ // // The CPP is thus about the RTS version GHC is linked against, and not the // version of the GHC being built. -#if !MIN_VERSION_GLASGOW_HASKELL(9,7,0,0) +#if !MIN_VERSION_GLASGOW_HASKELL(9,8,4,0) HsWord64 ghc_unique_counter64 = 0; #endif #if !MIN_VERSION_GLASGOW_HASKELL(9,3,0,0) ===================================== linters/lint-commit-msg/lint-commit-msg.cabal ===================================== @@ -26,4 +26,4 @@ executable lint-commit-msg base >= 4.14 && < 5, text - >= 1.2 && < 2.1 + >= 1.2 && < 2.2 ===================================== linters/lint-submodule-refs/lint-submodule-refs.cabal ===================================== @@ -15,7 +15,7 @@ executable lint-submodule-refs base >= 4.14 && < 5, text - >= 1.2 && < 2.1, + >= 1.2 && < 2.2, linters-common ghc-options: ===================================== testsuite/tests/perf/compiler/all.T ===================================== @@ -692,7 +692,7 @@ test('T22744', req_interp, pre_cmd('$MAKE -s --no-print-directory T22744'), extra_files(['genT22744']), - compile_timeout_multiplier(3) + skip, # due to #25524 ], multimod_compile, ['T22744', '-v0']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1b2f40f996640a528c2039ec51cacc5b8c305f89...a3401159f2846605abb517e71af463df47398e72 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1b2f40f996640a528c2039ec51cacc5b8c305f89...a3401159f2846605abb517e71af463df47398e72 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 18:56:10 2024 From: gitlab at gitlab.haskell.org (Ben Gamari (@bgamari)) Date: Fri, 29 Nov 2024 13:56:10 -0500 Subject: [Git][ghc/ghc] Pushed new tag ghc-9.8.4-release Message-ID: <674a0e4a84128_3af6d72eb49061287@gitlab.mail> Ben Gamari pushed new tag ghc-9.8.4-release at Glasgow Haskell Compiler / GHC -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/ghc-9.8.4-release You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 23:50:54 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 29 Nov 2024 18:50:54 -0500 Subject: [Git][ghc/ghc][wip/T24359] Wibble old code path Message-ID: <674a535e8ed1a_36e9a557049043983@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 20a4ac3a by Simon Peyton Jones at 2024-11-29T23:49:07+00:00 Wibble old code path - - - - - 1 changed file: - compiler/GHC/HsToCore/Binds.hs Changes: ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -867,7 +867,7 @@ dsSpec poly_rhs (SpecPrag poly_id spec_co spec_inl) Left msg -> do { diagnosticDs msg; return Nothing } ; Right (rule_bndrs, poly_id, rule_lhs_args) -> finishSpecPrag poly_rhs rule_bndrs poly_id rule_lhs_args - rule_bndrs core_app spec_inl } } + spec_bndrs core_app spec_inl } } dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id , spe_bndrs = bndrs View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/20a4ac3a89eb4ed445fadb744791590c048dc8c9 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/20a4ac3a89eb4ed445fadb744791590c048dc8c9 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Fri Nov 29 23:51:36 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Fri, 29 Nov 2024 18:51:36 -0500 Subject: [Git][ghc/ghc][wip/T25445b] 134 commits: Refactored BooleanFormula to be in line with TTG (#21592) Message-ID: <674a5388ecd58_36e9a553f05c448a6@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445b at Glasgow Haskell Compiler / GHC Commits: 97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00 Refactored BooleanFormula to be in line with TTG (#21592) There are two parts to this commit. * We moved the definition of BooleanFormula over to L.H.S.BooleanFormula * We parameterized the BooleanFormula over the pass The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula. Because its parameterized over the pass its no longer a functor or traversable, but we defined bfMap and bfTraverse for the cases where we needed fmap and traverse originally. Most other changes are just churn. ------------------------- Metric Decrease: MultiLayerModulesTH_OneShot ------------------------- - - - - - d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00 ghc-heap: Fix incomplete selector warnings. Use utility functions instead of selectors to read partial attributes. Part of fixing #25380. - - - - - fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00 PPC NCG: Implement fmin and fmax - - - - - 8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00 Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial See https://github.com/haskell/core-libraries-committee/issues/293 `List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it. The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`. - - - - - 346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: copy zip files into the correct directory Fixes #25446 - - - - - bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00 release: Sign .gz bindists too Fixes #25447 - - - - - 0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00 hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi GHC 9.6 no good when it comes to multi-repl stuff, despite being well within the range of n-2 releases for bootstrapping, when the script was adapted to load haddock, in !12851 - - - - - d8f8a1c3 by Sylvain Henry at 2024-11-07T19:27:46-05:00 Handle the special ghc-prim:GHC.Prim module in the compiler Before this patch, some custom hacks were necessary in ghc-prim's Setup.hs to register the GHC.Prim (virtual) module and in Hadrian to generate haddocks properly. In this patch we special-case this module in the compiler itself instead (which it already is, see ghcPrimIface in GHC.Iface.Load). From Cabal/Hadrian's perspective GHC.Prim is now just a normal autogenerated module. This simplification is worthwhile on its own. It was found while looking into the work needed for #24453 which aims to merge ghc-prim, ghc-bignum, and ghc-internal. It's also one step closer to remove ghc-prim's custom setup. - - - - - a55adc8e by Cheng Shao at 2024-11-07T19:28:22-05:00 Clean up obsolete CPP guarded code paths from the tree This patch cleans up obsolete CPP guarded code paths from the tree. The minimum supported boot GHC version is 9.6, and all the pre-9.6 era code paths can be removed. - - - - - 9ede97f3 by Cheng Shao at 2024-11-07T19:28:58-05:00 Remove obsolete executable wrappers from the tree The executable wrappers are handled by hadrian and bindist Makefile. The various .wrapper scripts in the tree are unused since removal of Make build system, so this patch removes them all. - - - - - 7d42b2df by tristian at 2024-11-07T19:29:40-05:00 TcRnDuplicateDecls now suggests to use the DuplicateRecordFields extension. Fixes: !24627 - - - - - e56ed179 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: normalise some versions in callstacks (cherry picked from commit f230e29f30d0c1c566d4dd251807fcab76a2710e) - - - - - a28fc903 by Zubin Duggal at 2024-11-11T15:16:35+05:30 testsuite: use -fhide-source-paths to normalise some backpack tests (cherry picked from commit b19de476bc5ce5c7792e8af1354b94a4286a1a13) - - - - - ed16d303 by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite/haddock: strip version identifiers and unit hashes from html tests (cherry picked from commit fbf0889eadc410d43dd5c1657e320634b6738fa5) - - - - - e45e5836 by Zubin Duggal at 2024-11-11T15:16:36+05:30 haddock: oneshot tests can drop files if they share modtimes. Stop this by including the filename in the key. Ideally we would use `ghc -M` output to do a proper toposort Partially addresses #25372 (cherry picked from commit e78c7ef96e395f1ef41f04790aebecd0409b92b9) - - - - - 9104e6eb by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: fix normalisation of T9930fail so that it doesn't get tripped up by ghc executable (ARGV[0]) differences (cherry picked from commit a79a587e025d42d34bb30e115fc5c7cab6c1e030) - - - - - 2c31264a by Zubin Duggal at 2024-11-11T15:16:36+05:30 testsuite: normalise windows file seperators (cherry picked from commit f858875e03b9609656b542aaaaff85ad0a83878a) - - - - - 2807f91b by Zubin Duggal at 2024-11-11T15:21:30+05:30 testsuite: Also match <VERSION> placeholders when normalising callsites - - - - - c02add17 by Ben Gamari at 2024-11-12T01:22:11-05:00 configure: Check version number validity Here we verify the previously informal invariant that stable release version numbers must have three components, preventing costly failed releases. Specifically, the check fails in the following scenarios: * `version=9.13` while `RELEASE=YES` since this would imply a release made from an unstable branch * `version=9.13.0` since unstable versions should only have two components * `version=9.12` since this has the wrong number of version components for a stable branch Fixes #25390. - - - - - 747fd322 by Teo Camarasu at 2024-11-12T01:22:49-05:00 docs: link to #14474 in the template-haskell docs - - - - - 6d96bb62 by Zubin Duggal at 2024-11-12T01:23:25-05:00 testsuite: normalise execvp vs exec differences in process tests Fixes #25431 - - - - - 502e6711 by Torsten Schmits at 2024-11-12T01:24:01-05:00 fix test lint that accumulated while the checks were broken I didn't fix the issues flagged by the #ifdef linter because it were so many that it seemed like the rule has become obsolete. - - - - - 223a4cb5 by Torsten Schmits at 2024-11-12T01:24:02-05:00 test driver: fix file collection for regex linters When a testsuite linter is executed with the `tracked` strategy, the driver runs `git ls-tree` to collect eligible files. This appears to have ceased producing any paths – `ls-tree` restricts its results to the current working directory, which is `testsuite/tests/linters` in this case. As a quick fix, this patch changes the working directory to match expectations. - - - - - 9ad9ac63 by Alan Zimmerman at 2024-11-12T01:24:39-05:00 EPA: Capture location of '_' for wild card type binder And keep track of promotion status in HsExplicitTupleTy, so the round-trip ppr test works for it. Updates Haddock output too, using the PromotionFlag in HsExplicitTupleTy. Closes #25454 - - - - - c37b96fa by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix setImmediate() implementation for Cloudflare Workers This patch fixes setImmediate() implementation for Cloudflare Workers in the wasm backend's js prelude script. Cloudflare Workers doesn't support the MessageChannel API, and we use a setTimeout() based fallback implementation in this case. - - - - - bea8ea4c by Cheng Shao at 2024-11-12T01:25:15-05:00 wasm: fix FinalizationRegistry logic for Cloudflare Workers This patch fixes FinalizationRegistry related logic for Cloudflare Workers in wasm backend js post linker. Cloudflare Workers doesn't support FinalizationRegistry, in this case we use a dummy implementation that doesn't do anything. - - - - - 00d551bf by Cheng Shao at 2024-11-13T08:48:21-05:00 Remove obsolete cross-port script This patch removes the obsolete cross-port script in the tree. The script was based on the legacy Make build system which has been pruned from the tree long ago. For hadrian, proper support for two-stage bootstrapping onto a new unsupported platform is a work in progress in !11444. - - - - - 75a2eae4 by Cheng Shao at 2024-11-13T08:48:58-05:00 hadrian: fix bindist makefile for wasm32-wasi target This patch fixes one incoherent place between bindist makefile and hadrian logic: I forgot to include wasi/wasm32 in OsSupportsGHCi/ArchSupportsGHCi as well. And this results in incorrect settings file generated after installing the bindist, and "Use interpreter"/"Have interpreter" fields incorrectly have "NO" values where they should be "YES" like --info output of in-tree version. - - - - - 0614abef by Alan Zimmerman at 2024-11-13T08:49:34-05:00 EPA: Correctly capture leading semis in decl list Closes #25467 - - - - - 00d58ae1 by Sebastian Graf at 2024-11-13T15:21:23-05:00 DmdAnal: Make `prompt#` lazy (#25439) This applies the same treatment to `prompt#` as for `catch#`. See `Note [Strictness for mask/unmask/catch/prompt]`. Fixes #25439. - - - - - 93233a66 by Ben Gamari at 2024-11-13T15:21:59-05:00 boot: Do not attempt to update config.sub While Apple ARM hardware was new we found that the autoconf scripts included in some boot packages were too old. As a mitigation for this, we introduced logic in the `boot` script to update the `config.sub` with that from the GHC tree. However, this causes submodules which have `config.sub` committted to appear to be dirty. This is a considerable headache. Now since `config.sub` with full platform support is more common we can remove `boot`'s `config.sub` logic. Fixes #19574. - - - - - fa66fa64 by Ryan Scott at 2024-11-14T19:05:00-05:00 Add regression test for #16234 Issue #16234 was likely fixed by !9765. This adds a regression test to ensure that it remains fixed. Fixes #16234. - - - - - bfe64df8 by Matthew Pickering at 2024-11-14T19:05:36-05:00 ghc-internal: Update to Unicode 16 This patch updates the automatically generated code for querying unicode properties to unicode 16. Fixes #25402 - - - - - 1fd83f86 by Ben Gamari at 2024-11-14T19:06:13-05:00 configure: Accept happy-2.1.2 happy-2.1 was released in late Oct 2024. I have confirmed that master bootstraps with it. Here we teach configure to accept this tool. Fixes #25438. - - - - - aa58fc5b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Tighten up invariants of PACK - - - - - 8aa4c10a by Ben Gamari at 2024-11-14T19:06:49-05:00 testsuite: Fix badly escaped literals Use raw string literals to ensure that `\s` is correctly interpreted as a character class. - - - - - 0e084029 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts: Improve documentation of SLIDE bytecode instruction - - - - - 9bf3663b by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Assert that TEST*_P discriminators are valid - - - - - 1f668511 by Ben Gamari at 2024-11-14T19:06:49-05:00 rts/Interpreter: Improve documentation of TEST*_P instructions - - - - - 59e0a770 by Cheng Shao at 2024-11-14T19:07:25-05:00 misc: improve clangd compile_flags.txt flags This patch improves the compile_flags.txt config used to power clangd for the rts C codebase. The flags in the file are sampled & deduped from a real stage1 build with clang-19 and vastly improves the IDE accuracy when hacking the rts. For maximum code coverage under the default settings, compile_flags.txt defaults to threaded+profiled+dynamic+debug way. This does not mean profdyn needs to be actually built in _build/stage1 for IDE to work. To activate IDE for other RTS ways, simply remove one of the -D flags at the end of compile_flags.txt and restart clangd. - - - - - c2c562e0 by Ben Gamari at 2024-11-14T19:08:01-05:00 testsuite: Don't consider untracked files in dirtiness check Considering trees containing untracked files as dirty is a bridge too far. The chance of an untracked file significantly affecting measured performanced metrics is quite small whereas not collecting measurements is quite inconvenient for some workflows. We now ignore untracked files in the dirtiness check. Fixes #25471. - - - - - ed2ed6c5 by Cheng Shao at 2024-11-14T19:08:37-05:00 testsuite: add regression test T25473 This commit adds regression test T25473 marked as broken due to #25473. It will be fixed in the subsequent commit. - - - - - bd0a8b7e by Cheng Shao at 2024-11-14T19:08:37-05:00 wasm: fix foreign import javascript "wrapper" in TH/ghci This patch fixes foreign import javascript "wrapper" in wasm backend's TH/ghci by fixing the handling of dyld/finalization_registry magic variables. Fixes T25473 and closes #25473. - - - - - f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00 rts/linker: Make FreeBSD declarations proper prototypes The iconv declarations for FreeBSD were previously not prototypes, leading to warnings. - - - - - 086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00 base: Drop redundant import in FreeBSD ExecutablePath implementation - - - - - 79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00 compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect - - - - - 1acb73bf by Andrew Lelechenko at 2024-11-15T06:10:47-05:00 gitlab: mention CLC in MR template - - - - - 8f2e0832 by Ben Gamari at 2024-11-15T06:11:24-05:00 rts: Allow use of GNU-stack notes on FreeBSD Previously we gated use of GNU-style non-executable stack notes to only apply on Linux. However, these are also supported by FreeBSD, which also uses ELF. Fix this. Fixes #25475. - - - - - 2c427cb0 by Ben Gamari at 2024-11-16T05:27:40-05:00 rts: Fix EINTR check in timerfd ticker When `poll` failed we previously checked that `errno == -EINTR` to silence the failure warning. However, this is wrong as `errno` values are generally not negated error codes (in contrast to many system call results, which is likely what the original author had in mind). Fixes #25477. - - - - - a0fa4941 by Ben Gamari at 2024-11-16T05:28:16-05:00 rts: Increase gen_workspace alignment to 128 bytes on AArch64 Increase to match the 128-byte cache-line size of Apple's ARMv8 implementation. Closes #25459. - - - - - 142d8afa by Ben Gamari at 2024-11-16T16:20:47-05:00 rts/RtsFlags: Refactor size parsing This makes a number of improvements mentioned in #20201: * fail if the argument cannot be parsed as a number (`-Mturtles`) * fail if an unrecognized unit is given (e.g. `-M1x`) - - - - - b7a146e5 by Ben Gamari at 2024-11-16T16:20:47-05:00 testsuite: Add tests for RTS flag parsing error handling See #20201. - - - - - ddb7afa6 by Ben Gamari at 2024-11-16T16:21:23-05:00 users guide: Mention language extensions in equality constraints discussion As suggested in #24127, mention the language extensions necessary for usage of equality constriants in their documentation. Closes #24127. - - - - - 36133dac by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/9.14.1-notes: Fix list syntax - - - - - 888de658 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide/debug-info: Fix duplicate flag descriptions - - - - - f120e427 by Ben Gamari at 2024-11-16T16:21:23-05:00 users-guide: Fix reference to 9.14.1 release notes - - - - - 8e975032 by Ben Gamari at 2024-11-16T16:21:59-05:00 Introduce GHC.Tc.Plugin.lookupTHName This makes it significantly more convenient (and less GHC-version-dependent) to resolve a template-haskell name into a GHC Name. As proposed in #24741. - - - - - a0e168ec by ARATA Mizuki at 2024-11-16T16:22:40-05:00 x86 NCG SIMD: Lower packFloatX4#, insertFloatX4# and broadcastFloatX4# to SSE1 instructions Fixes #25441 Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 3936bf1b by sheaf at 2024-11-16T16:23:22-05:00 X86 NCG: allow VXOR at scalar floating-point types The NCG can emit VXOR instructions at scalar floating-point types, but the pretty-printer would panic instead of emitting the appropriate VXORPS/VXORPD instructions. This patch rectifies that oversight. Fixes #25455 - - - - - d9dff93a by Ben Gamari at 2024-11-16T16:23:58-05:00 rts: Fix platform-dependent pointer casts Previously we had unnecessary (and incorrect) platform-dependent casts to turn `OSThreadIds`s into a integer. We now just uniformly cast first to a `uintptr_t` (which is always safe, regardless of whether `OSThreadId` is a pointer), and then cast to the desired integral type. This fixes a warning on musl platforms. - - - - - 6d95cdb8 by Ben Gamari at 2024-11-16T16:24:34-05:00 testsuite: Mark encoding004 as broken on FreeBSD Due to #22003, CP936 fails to roundtrip: ```diff == CP936 +Failed to roundtrip given mutant byte at index 891 (251 /= 123 at index 891) +Failed to roundtrip given mutant byte at index 1605 (197 /= 69 at index 1605) +Failed to roundtrip given mutant byte at index 2411 (235 /= 107 at index 2411) +Failed to roundtrip given mutant byte at index 6480 (208 /= 80 at index 6480) +Failed to roundtrip given mutant byte at index 6482 (210 /= 82 at index 6482) +Failed to roundtrip given mutant byte at index 6484 (212 /= 84 at index 6484) +Failed to roundtrip given mutant byte at index 6496 (224 /= 96 at index 6496) +Failed to roundtrip given mutant byte at index 7243 (203 /= 75 at index 7243) +Failed to roundtrip given mutant byte at index 7277 (237 /= 109 at index 7277) +Failed to roundtrip given mutant byte at index 8027 (219 /= 91 at index 8027) +Failed to roundtrip given mutant byte at index 8801 (225 /= 97 at index 8801) ``` - - - - - 26e86984 by Ben Gamari at 2024-11-18T04:05:31-05:00 hadrian: Allow haddock options to be passed via key-value settings - - - - - 6e68b117 by Matthew Pickering at 2024-11-18T04:06:07-05:00 Exception rethrowing Basic changes: * Change `catch` function to propagate exceptions using the WhileHandling mechanism. * Introduce `catchNoPropagate`, which does the same as before, but passes an exception which can be rethrown. * Introduce `rethrowIO` combinator, which rethrows an exception with a context and doesn't add a new backtrace. * Introduce `tryWithContext` for a variant of `try` which can rethrow the exception with it's original context. * onException is modified to rethrow the original error rather than creating a new callstack. * Functions which rethrow in GHC.Internal.IO.Handle.FD, GHC.Internal.IO.Handle.Internals, GHC.Internal.IO.Handle.Text, and GHC.Internal.System.IO.Error are modified to not add a new callstack. Implements CLC proposal#202 <https://github.com/haskell/core-libraries-committee/issues/202> - - - - - a4e0d235 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 exceptions: Improve the message layout as per #285 This commit fixes the layout of the additional information included when displaying an exception, namely the type of the exception. It also fixes the default handler's heading message to work well together with the improved display message of SomeException. CLC proposal#285 - - - - - 284ffab3 by Rodrigo Mesquita at 2024-11-18T04:06:07-05:00 Display type and callstack of exception on handler This commit changes the Exception instance of SomeException to *simply* display the underlying exception in `displayException`. The augmented exception message that included the type and backtrace of the exception are now only printed on a call to `displayExceptionWithInfo`. At a surface level, existing programs should behave the same since the `uncaughtExceptionHandler`, which is responsible for printing out uncaught exceptions to the user, will use `displayExceptionWithInfo` by default. However, unlike the instance's `displayException` method, the `uncaughtExceptionHandler` can be overriden with `setUncaughtExceptionHandler`. This makes the extra information opt-in without fixing it the instance, which can be valuable if your program wants to display uncaught exceptions to users in a user-facing way (ie without backtraces). This is what was originally agreed for CLC#231 or CLC#261 with regard to the type of the exception information. The call stack also becoming part of the default handler rather than the Exception instance is an ammendment to CLC#164. Discussion of the ammendment is part of CLC#285. - - - - - 36cddd2c by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Remove redundant CallStack from exceptions Before the exception backtraces proposal was implemented, ErrorCall accumulated its own callstack via HasCallStack constraints, but ExceptionContext is now accumulated automatically. The original ErrorCall mechanism is now redundant and we get a duplicate CallStack Updates Cabal submodule to fix their usage of ErrorCallWithLocation to ErrorCall CLC proposal#285 Fixes #25283 - - - - - 7a74330b by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Freeze call stack in error throwing functions CLC proposal#285 - - - - - 3abf31a4 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 De-duplicate displayContext and displayExceptionContext The former was unused except for one module where it was essentially re-defining displayExceptionContext. Moreover, this commit extends the fix from bfe600f5bb3ecd2c8fa71c536c63d3c46984e3f8 to displayExceptionContext too, which was missing. - - - - - c0d783f8 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Re-export NoBacktrace from Control.Exception This was originally proposed and accepted in section "2.7 Capturing Backtraces on Exceptions" of the CLC proposal for exception backtraces. However, the implementation missed this re-export, which this commit now fixes. - - - - - 802b5c3e by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Fix exception backtraces from GHCi When running the program with `runhaskell`/`runghc` the backtrace should match the backtrace one would get by compiling and running the program. But currently, an exception thrown in a program interpreted with `runhaskell` will: * Not include the original exception backtrace at all * Include the backtrace from the internal GHCi/ghc rethrowing of the original exception This commit fixes this divergence by not annotating the ghc(i) backtrace (with NoBacktrace) and making sure that the backtrace of the original exception is serialized across the boundary and rethrown with the appropriate context. Fixes #25116 The !13301 MR (not this commit in particular) improves performance of MultiLayerModules. Unfortunately, T3294 regresses on aarch64-linux-deb12 by 1% allocations. Since this patch must be merged for 9.12 ASAP, we will not be able to investigate the slight regression on this platform in time. ------------------------- Metric Decrease: MultiLayerModulesRecomp MultiLayerModulesTH_OneShot Metric Increase: T3294 ------------------------- - - - - - 3e89eb65 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 base: Add to changelog.md CLC #285 - - - - - d9326a48 by Rodrigo Mesquita at 2024-11-18T04:06:08-05:00 Bump array and stm submodules for testsuite The testsuites of array and stm had to be updated according to !13301. Updates submodule array and stm. - - - - - 325fcb5d by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Clean up code style of Nativei386 adjustor - - - - - 39bb6e58 by Ben Gamari at 2024-11-18T04:06:45-05:00 rts/adjustor: Fix stack overrun error in Nativei386 adjustor We were reserving the wrong kind of adjustor context (the generic `AdjustorContext` used by other adjustor implementations, rather than the i386-specific `CCallContext`) to return the adjustor context while freeing, resulting in #25485. Fixes #25485. - - - - - 831aab22 by sheaf at 2024-11-18T21:22:36-05:00 Include diagnostic reason in -fdiagnostics-as-json This commit ensures that the -fdiagnostics-as-json output includes the diagnostic reason. This allows the full error message produced by GHC to be re-constructed from the JSON output. Fixes #25403 - - - - - 3e5bfdd3 by Ben Gamari at 2024-11-18T21:23:12-05:00 rts: Introduce printIPE This is a convenience utility for use in GDB. - - - - - 44d909a3 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Don't store boot locations in finder cache Partially reverts commit fff55592a7b Amends add(Home)ModuleToFinder so that locations for boot files are not stored in the finder cache. Removes InstalledModule field from InstalledFound constructor since it's the same as the key that was searched for. - - - - - 64c95292 by Sjoerd Visscher at 2024-11-19T14:38:24-05:00 Concentrate boot extension logic in Finder With new mkHomeModLocation that takes an extra HscSource to add boot extensions if required. - - - - - 11bad98d by ARATA Mizuki at 2024-11-19T14:39:08-05:00 Better documentation for floating-point min/max and SIMD primitives See #25350 for floating-point min/max Co-authored-by: sheaf <sam.derbyshire at gmail.com> - - - - - 791a47b2 by Arnaud Spiwack at 2024-11-20T14:00:05+00:00 Add test for #25185 - - - - - 374e18e5 by Arnaud Spiwack at 2024-11-20T14:09:30+00:00 Quick look: emit the multiplicity of app heads in tcValArgs Otherwise it's not scaled properly by the context, allowing unsound expressions. Fixes #25185. - - - - - 1fc02399 by sheaf at 2024-11-20T18:11:03-05:00 x86 NCG: fix regUsageOfInstr for VMOVU & friends This commit fixes the implementation of 'regUsageOfInstr' for vector operations that take an 'Operand' as the destination, by ensuring that when the destination is an address then the address should be *READ*, and not *WRITTEN*. Getting this wrong is a disaster, as it means the register allocator has incorrect information, which can lead to it discard stores to registers, segfaults ensuing. Fixes #25486 - - - - - 7bd407a6 by Brandon Chinn at 2024-11-21T14:08:15-05:00 Fix CRLF in multiline strings (#25375) - - - - - 7575709b by Rodrigo Mesquita at 2024-11-21T14:08:52-05:00 Improve reachability queries on ModuleGraph Introduces `ReachabilityIndex`, an index constructed from a `GHC.Data.Graph.Directed` `Graph` that supports fast reachability queries (in $O(1)$). This abstract data structure is exposed from `GHC.Data.Graph.Directed.Reachability`. This index is constructed from the module graph nodes and cached in `ModuleGraph`, enabling efficient reachability queries on the module graph. Previously, we'd construct a Map of Set of ModuleGraph nodes which used a lot of memory (`O(n^2)` in the number of nodes) and cache that in the `ModuleGraph`. By using the reachability index we get rid of this space leak in the module graph -- even though the index is still quadratic in the number of modules, it is much, much more space efficient due to its representation using an IntMap of IntSet as opposed to the transitive closure we previously cached. In a memory profile of MultiLayerModules with 100x100 modules, memory usage improved from 6GB residency to 2.8GB, out of which roughly 1.8GB are caused by a second space leak related to ModuleGraph. On the same program, it brings compile time from 7.5s to 5.5s. Note how we simplify `checkHomeUnitsClosed` in terms of `isReachableMany` and by avoiding constructing a second graph with the full transitive closure -- it suffices to answer the reachability query on the full graph without collapsing the transitive closure completely into nodes. Unfortunately, solving this leak means we have to do a little bit more work since we can no longer cache the result of turning vertex indices into nodes. This results in a slight regression in MultiLayerModulesTH_Make, but results in large performance and memory wins when compiling large amounts of modules. ------------------------- Metric Decrease: mhu-perf Metric Increase: MultiLayerModulesTH_Make ------------------------- - - - - - bcbcdaaf by Cheng Shao at 2024-11-21T14:09:28-05:00 driver: fix hpc undefined symbol issue in TH with -fprefer-byte-code This commit fixes an undefined symbol error in RTS linker when attempting to compile home modules with -fhpc and -fbyte-code-and-object-code/-fprefer-byte-code, see #25510 for detailed description and analysis of the bug. Also adds T25510/T25510c regression tests to test make mode/oneshot mode of the bug. - - - - - 970ada5a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Bump ci-images For introduction of Alpine/i386 image. Thanks to Julian for the base image. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 8115abc2 by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Add release job for i386/Alpine As requested by Mikolaj and started by Julian. Co-Authored-By: Julian Ospald <hasufell at hasufell.de> - - - - - 639f0149 by Ben Gamari at 2024-11-22T23:32:06-05:00 rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_ - - - - - 490d4d0a by Ben Gamari at 2024-11-22T23:32:06-05:00 gitlab-ci: Mark i386 Alpine test breakages Marks the following tests as broken on i386/Alpine: * T22033 due to #25497 * simd009, T25062_V16, T25169, T22187_run due to #25498 - - - - - 536cdf09 by Cheng Shao at 2024-11-22T23:32:42-05:00 compiler: remove unused GHC.Linker.Loader.loadExpr This patch removes the unused `GHC.Linker.Loader.loadExpr` function. It was moved from `GHC.Runtime.Linker.linkExpr` in `ghc-9.0` to `GHC.Linker.Loader.loadExpr` in `ghc-9.2`, and remain completely unused and untested ever since. There's also no third party user of this function to my best knowledge, so let's remove this. Anyone who wants to write their own GHC API function to load bytecode can consult the source code in older release branches. - - - - - 6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00 Fix a non-compiling example in the type abstractions docs This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422. - - - - - d1172e20 by Rodrigo Mesquita at 2024-11-22T23:34:02-05:00 Re-introduce ErrorCallWithLocation with a deprecation pragma With the removal of the duplicate backtrace, part of CLC proposal #285, the constructor `ErrorCallWithLocation` was removed from base. This commit re-introduces it with a deprecation. - - - - - 1187a60a by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Skip tests requiring Hadrian deps in out-of-tree testsuite runs Some testsuite tests require specific tools (e.g. `check-ppr` and `check-exact`) beyond those shipped in the binary distribution. Skip these tests. Fixes #13897. - - - - - c37d7a2e by Ben Gamari at 2024-11-22T23:34:39-05:00 testsuite: Declare exactprint tests' dependency on check-exact - - - - - 454ce957 by Ben Gamari at 2024-11-22T23:35:15-05:00 ghc-internal: Fix a few cases of missing Haddock markup - - - - - a249649b by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/GHCiPrimCall : Add missing Makefile includes - - - - - a021a493 by Ben Gamari at 2024-11-22T23:35:51-05:00 testsuite/IpeStats: Use Make rather than shell interpolation - - - - - 6e1fbda7 by Ben Gamari at 2024-11-25T03:55:44-05:00 hadrian-ghci-multi: Pass -this-package-name in unit response files As noted in #25509, the `-this-package-name` must be passed for each package to ensure that GHC can response references to the packages' exposed modules via package-qualified imports. Fix this. Closes #25509. - - - - - a05e4a9b by Simon Hengel at 2024-11-25T03:56:33-05:00 Refactoring: Use `OnOff` more consistently for `Extension` - - - - - 7536181d by Matthew Pickering at 2024-11-25T14:00:07-05:00 driver: Always link against "base" package when one shot linking The default value for base-unit-id is stored in the settings file. At install time, this can be set by using the BASE_UNIT_ID environment variable. At runtime, the value can be set by `-base-unit-id` flag. For whether all this is a good idea, see #25382 Fixes #25382 - - - - - 7f90f319 by Andreas Klebinger at 2024-11-25T14:00:44-05:00 Compacting GC: Handle black holes in large objects. As #14497 showed black holes can appear inside large objects when we capture a computation and later blackhole it like we do for AP_STACK closures. Fixes #24791 - - - - - 291388e1 by Cheng Shao at 2024-11-25T14:01:19-05:00 ci: minor nix-in-docker improvements This patch makes some minor improvements re nix-in-docker logic in the ci configuration: - Update `nixos/nix` to the latest version - Apply $CPUS to `cores`/`max-jobs` to avoid oversubscribing while allowing a reasonable degree of parallelism - Remove redundant `--extra-experimental-features nix-command` in later `nix shell` invocations, it's already configured in `/etc/nix/nix.conf` - - - - - e684c406 by Cheng Shao at 2024-11-25T14:01:57-05:00 ci: avoid depending on stack job for test-bootstrap jobs This patch makes test-bootstrap related ci jobs only depend on hadrian-ghc-in-ghci job to finish, consistent with other jobs in the full-build stage generated by gen_ci.hs. This allows the jobs to be spawned earlier and improve overall pipeline parallelism. - - - - - caaf5388 by Simon Hengel at 2024-11-25T14:02:41-05:00 Refactoring: Remove `pSupportedExts` from `ParserOpts` This is never used for lexing / parsing. It is only used by `GHC.Parser.Header.getOptions`. - - - - - 41f8365c by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Add test for #25515 - - - - - 9279619f by Arnaud Spiwack at 2024-11-25T14:03:23-05:00 Desugar record notation with correct multiplicities Simply uses the multiplicity as stored in the field. As I'm writing this commit, the only possible multiplicity is 1, but !13525 is changing this. It's actually easier to take !13525 into account. Fixes #25515. - - - - - fcc3ae6e by Andreas Klebinger at 2024-11-26T08:24:58-05:00 Clarify INLINE unfolding optimization docs. Fixes #24660 - - - - - 88c4fe1d by Cheng Shao at 2024-11-26T08:25:34-05:00 rts: remove -Wl,-U,___darwin_check_fd_set_overflow hack This patch bumps macOS minimum SDK version to 11.0 for x86_64-darwin to align it with aarch64-darwin. This allows us to get rid of the horrible -Wl,-U,___darwin_check_fd_set_overflow hack, which is causing linker warnings and testsuite failures on macOS 15. Fixes #25504. - - - - - 53f978c0 by doyougnu at 2024-11-26T16:07:26-05:00 ghc-experimental: expose GHC.RTS.Flags, GHC.Stats See this CLC proposal: - https://github.com/haskell/core-libraries-committee/issues/289 and this CLC proposal for background: - https://github.com/haskell/core-libraries-committee/issues/288 Metric Decrease: MultiLayerModulesTH_OneShot - - - - - e70d4140 by Wang Xin at 2024-11-26T16:08:10-05:00 Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform With the Medium code model, the jump range of the generated jump instruction is larger than that of the Small code model. It's a temporary fix of the problem descriped in https://gitlab.haskell .org/ghc/ghc/-/issues/25495. This commit requires that the LLVM used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c6679 83e1baf05, i.e., version 8.0 and later. Actually we should not rely on LLVM, so the only way to solve this problem is to implement the LoongArch backend. Add new type for codemodel - - - - - df42ba16 by Andreas Klebinger at 2024-11-27T11:40:49-05:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - bf3db97e by Ben Gamari at 2024-11-27T11:41:26-05:00 ghc-toolchain: Introduce basic flag validation We verify that required flags (currently `--output` and `--triple`) are provided. The implementation is truly awful, but so is getopt. Begins to address #25500. - - - - - a104508d by Ben Gamari at 2024-11-27T11:42:03-05:00 rts: Allow ExecPage to allocate anywhere in address space Currently the ExecPage facility has two users: * GHCi, for constructing info tables, and * the adjustor allocation path Despite neither of these have any spatial locality constraints ExecPage was using the linker's `mmapAnonForLinker`, which tries hard to ensure that mappings end up nearby the executable image. This makes adjustor allocation needlessly subject to fragmentation concerns. We now instead return less constrained mappings, improving the robustness of the mechanism. Addresses #25503. - - - - - c3fc9b86 by Ben Gamari at 2024-11-27T11:42:39-05:00 base: Fix incorrect mentions of GHC.Internal.Numeric These were incorrectly changed by the automated refactoring of the `ghc-internal` migration. Fixes #25521. - - - - - a362b943 by sheaf at 2024-11-27T23:44:28-05:00 Add checkExact to toolTargets This change means that the Hadrian multi target will include exactprint. In particular, this means that HLS will work on exactprint inside the GHC tree. - - - - - e6c957e4 by Arnaud Spiwack at 2024-11-27T23:45:09-05:00 Add test for #25428 - - - - - 52d97f4e by Arnaud Spiwack at 2024-11-27T23:45:09-05:00 Don't bypass MonoLocalBind in empty patterns Fixes #25428 - - - - - 7890f2d8 by Ben Gamari at 2024-11-28T10:26:46-05:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Also includes necessary Hadrian bootstrap plan bump. Fixes #24382. - - - - - 0fd43ea6 by Adam Sandberg Ericsson at 2024-11-28T10:27:22-05:00 mention -Iw in +RTS -? - - - - - 6cf579b9 by Ben Gamari at 2024-11-28T10:27:59-05:00 gitlab-ci: Set GIT_SUBMODULE_FORCE_HTTPS GitLab recommends using `https://` to clone submodules and provides the `GIT_SUBMODULE_FORCE_HTTPS` variable to force this. Fixes #25528. - - - - - ff673479 by Simon Peyton Jones at 2024-11-29T20:38:26+00:00 Start on refactoring Lint Addressing #25445 Does not yet even compile - - - - - 41a99418 by Simon Peyton Jones at 2024-11-29T20:38:26+00:00 Getting there - - - - - 58693d05 by Simon Peyton Jones at 2024-11-29T20:38:26+00:00 Wibbles - - - - - bb89e53b by Simon Peyton Jones at 2024-11-29T20:38:27+00:00 Don't return a kind when linting types - - - - - 2ee04658 by Simon Peyton Jones at 2024-11-29T20:38:27+00:00 Don't clone Ids - - - - - 24fb0470 by Simon Peyton Jones at 2024-11-29T20:38:27+00:00 Wibble - - - - - 8fc1ebcd by Simon Peyton Jones at 2024-11-29T20:38:27+00:00 More improvements - - - - - 985f6b8e by Simon Peyton Jones at 2024-11-29T20:38:27+00:00 Performance-related fixes Addresses #25463 (too much specialisation) and #20825 (Lint is expensive) - - - - - 12ee136c by Simon Peyton Jones at 2024-11-29T20:38:27+00:00 Try not returning gubbins from lintCoercion - - - - - b93049d5 by Simon Peyton Jones at 2024-11-29T20:38:27+00:00 Temporarily switch on Lint in tests/perf/compiler - - - - - fc762b24 by Simon Peyton Jones at 2024-11-29T20:38:28+00:00 lintType no longer returns a type - - - - - 43f782b8 by Simon Peyton Jones at 2024-11-29T20:38:28+00:00 Work in progres on linting applications - - - - - bf4ff999 by Simon Peyton Jones at 2024-11-29T20:38:28+00:00 Lint applications better Notably lint_app2 - - - - - bf9b08bc by Simon Peyton Jones at 2024-11-29T23:50:12+00:00 Improve forallty/forallco - - - - - 30 changed files: - .gitattributes - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/hello.hs - .gitlab/jobs.yaml - .gitlab/merge_request_templates/Default.md - .gitlab/rel_eng/recompress-all - .gitlab/rel_eng/upload.sh - boot - compile_flags.txt - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/Cmm/Opt.hs - compiler/GHC/CmmToAsm/Format.hs - compiler/GHC/CmmToAsm/PPC/CodeGen.hs - compiler/GHC/CmmToAsm/PPC/Instr.hs - compiler/GHC/CmmToAsm/PPC/Ppr.hs - compiler/GHC/CmmToAsm/Ppr.hs - compiler/GHC/CmmToAsm/X86/CodeGen.hs - compiler/GHC/CmmToAsm/X86/Instr.hs - compiler/GHC/CmmToAsm/X86/Ppr.hs - compiler/GHC/CmmToLlvm.hs - compiler/GHC/Core.hs - compiler/GHC/Core/Class.hs - compiler/GHC/Core/Coercion.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/Opt/SpecConstr.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a886a5de1f2649239868a39937898c1a5abe7ab6...bf9b08bcc60d4d8960a8335de3b8b4cd7522ff82 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a886a5de1f2649239868a39937898c1a5abe7ab6...bf9b08bcc60d4d8960a8335de3b8b4cd7522ff82 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 30 22:19:12 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Sat, 30 Nov 2024 17:19:12 -0500 Subject: [Git][ghc/ghc][wip/T24359] Wibbles Message-ID: <674b8f60cbb6c_ee00ecf9ea058730@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 4ddcf5ef by Simon Peyton Jones at 2024-11-30T22:18:43+00:00 Wibbles - - - - - 14 changed files: - compiler/GHC/Hs/Binds.hs - compiler/GHC/HsToCore.hs - compiler/GHC/HsToCore/Binds.hs - compiler/GHC/HsToCore/Errors/Ppr.hs - compiler/GHC/HsToCore/Errors/Types.hs - compiler/GHC/Runtime/Eval.hs - compiler/GHC/Tc/Gen/Sig.hs - compiler/GHC/Tc/Module.hs - compiler/GHC/Tc/Zonk/Type.hs - compiler/GHC/Types/Error/Codes.hs - testsuite/tests/ghc-api/T18522-dbg-ppr.hs - testsuite/tests/simplCore/should_compile/T8537.stderr - testsuite/tests/typecheck/should_compile/T10504.stderr - testsuite/tests/warnings/should_compile/T19296.stderr Changes: ===================================== compiler/GHC/Hs/Binds.hs ===================================== @@ -840,10 +840,15 @@ data TcSpecPrag -- ^ The Id to be specialised, a wrapper that specialises the -- polymorphic function, and inlining spec for the specialised function - | SpecPragE { spe_poly_id :: Id -- THe Id being specialised - , spe_bndrs :: [Var] -- TyVars, EvVars, and Ids - , spe_call :: LHsExpr GhcTc -- The LHS of the RULE: a call of f - , spe_inl :: InlinePragma } + | SpecPragE { spe_fn_nm :: Name -- The Name of the Id being specialised + , spe_fn_id :: Id -- The Id being specialised + -- The spe_fn_name may differ from (idName spe_fn_id) in the + -- case of instance methods, where the Name is the class-op + -- selector but the spe_fn_id is that for the local method + + , spe_bndrs :: [Var] -- TyVars, EvVars, and Ids + , spe_call :: LHsExpr GhcTc -- The LHS of the RULE: a call of f + , spe_inl :: InlinePragma } noSpecPrags :: TcSpecPrags noSpecPrags = SpecPrags [] ===================================== compiler/GHC/HsToCore.hs ===================================== @@ -292,27 +292,6 @@ deSugar hsc_env ; return (msgs, Just mod_guts) }}}} -dsImpSpecs :: [LTcSpecPrag] -> DsM (OrdList (Id,CoreExpr), [CoreRule]) -dsImpSpecs imp_specs - = do { spec_prs <- mapMaybeM spec_one imp_specs - ; let (spec_binds, spec_rules) = unzip spec_prs - ; return (concatOL spec_binds, spec_rules) } - where - spec_one (L _ prag) = dsSpec (get_rhs prag) prag - - get_rhs (SpecPrag poly_id _ _) = get_rhs1 poly_id - get_rhs (SpecPragE { spe_poly_id = poly_id }) = get_rhs1 poly_id - - get_rhs1 poly_id - | Just unfolding <- maybeUnfoldingTemplate (realIdUnfolding poly_id) - = unfolding -- Imported Id; this is its unfolding - -- Use realIdUnfolding so we get the unfolding - -- even when it is a loop breaker. - -- We want to specialise recursive functions! - | otherwise = pprPanic "dsImpSpecs" (ppr poly_id) - -- The type checker has checked that it *has* an unfolding - - combineEvBinds :: [CoreBind] -> [(Id,CoreExpr)] -> [CoreBind] -- Top-level bindings can include coercion bindings, but not via superclasses -- See Note [Top-level evidence] ===================================== compiler/GHC/HsToCore/Binds.hs ===================================== @@ -15,7 +15,8 @@ lower levels it is preserved with @let@/@letrec at s). -} module GHC.HsToCore.Binds - ( dsTopLHsBinds, dsLHsBinds, decomposeRuleLhs, dsSpec + ( dsTopLHsBinds, dsLHsBinds + , dsImpSpecs, decomposeRuleLhs , dsHsWrapper, dsHsWrappers , dsEvTerm, dsTcEvBinds, dsTcEvBinds_s, dsEvBinds , dsWarnOrphanRule @@ -845,6 +846,27 @@ dsSpecs poly_rhs (SpecPrags sps) ; let (spec_binds_s, rules) = unzip pairs ; return (concatOL spec_binds_s, rules) } +dsImpSpecs :: [LTcSpecPrag] -> DsM (OrdList (Id,CoreExpr), [CoreRule]) +dsImpSpecs imp_specs + = do { spec_prs <- mapMaybeM spec_one imp_specs + ; let (spec_binds, spec_rules) = unzip spec_prs + ; return (concatOL spec_binds, spec_rules) } + where + spec_one (L loc prag) = putSrcSpanDs loc $ + dsSpec (get_rhs prag) prag + + get_rhs (SpecPrag poly_id _ _) = get_rhs1 poly_id + get_rhs (SpecPragE { spe_fn_id = poly_id }) = get_rhs1 poly_id + + get_rhs1 poly_id + | Just unfolding <- maybeUnfoldingTemplate (realIdUnfolding poly_id) + = unfolding -- Imported Id; this is its unfolding + -- Use realIdUnfolding so we get the unfolding + -- even when it is a loop breaker. + -- We want to specialise recursive functions! + | otherwise = pprPanic "dsImpSpecs" (ppr poly_id) + -- The type checker has checked that it *has* an unfolding + dsLSpec :: CoreExpr -> Located TcSpecPrag -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) dsLSpec poly_rhs (L loc prag) @@ -866,13 +888,15 @@ dsSpec poly_rhs (SpecPrag poly_id spec_co spec_inl) (mkVarSet spec_bndrs) of { Left msg -> do { diagnosticDs msg; return Nothing } ; Right (rule_bndrs, poly_id, rule_lhs_args) -> - finishSpecPrag poly_rhs rule_bndrs poly_id rule_lhs_args - spec_bndrs core_app spec_inl } } - -dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id - , spe_bndrs = bndrs - , spe_call = the_call - , spe_inl = inl }) + finishSpecPrag (idName poly_id) poly_rhs + rule_bndrs poly_id rule_lhs_args + spec_bndrs core_app spec_inl } } + +dsSpec poly_rhs (SpecPragE { spe_fn_nm = poly_nm + , spe_fn_id = poly_id + , spe_bndrs = bndrs + , spe_call = the_call + , spe_inl = inl }) -- SpecPragE case: See Note [Handling new-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig = do { ds_call <- zapUnspecables $ -- zapUnspecables: see dsLExpr the_call -- Note [Desugaring RULE left hand sides] @@ -903,7 +927,7 @@ dsSpec poly_rhs (SpecPragE { spe_poly_id = poly_id , text "core_call fvs" <+> ppr (exprFreeVars core_call) , text "spec_const_binds" <+> ppr spec_const_binds ]) - ; finishSpecPrag poly_rhs + ; finishSpecPrag poly_nm poly_rhs rule_bndrs poly_id lhs_args spec_bndrs mk_spec_body inl } } } @@ -944,26 +968,26 @@ prepareSpecLHS poly_id evs the_call is_quant_id v = isId v && v `elemVarSet` qevs -- See Note [Desugaring SPECIALISE pragmas] wrinkle (DS1) -finishSpecPrag :: CoreExpr -- RHS to specialise +finishSpecPrag :: Name -> CoreExpr -- RHS to specialise -> [Var] -> Id -> [CoreExpr] -- RULE LHS pattern -> [Var] -> (CoreExpr -> CoreExpr) -> InlinePragma -- Specialised form -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule)) -finishSpecPrag poly_rhs rule_bndrs poly_id rule_args - spec_bndrs mk_spec_body spec_inl +finishSpecPrag poly_nm poly_rhs rule_bndrs poly_id rule_args + spec_bndrs mk_spec_body spec_inl | isJust (isClassOpId_maybe poly_id) - = do { diagnosticDs (DsUselessSpecialiseForClassMethodSelector poly_id) + = do { diagnosticDs (DsUselessSpecialiseForClassMethodSelector poly_nm) ; return Nothing } -- There is no point in trying to specialise a class op -- Moreover, classops don't (currently) have an inl_sat arity set -- (it would be Just 0) and that in turn makes makeCorePair bleat | no_act_spec && isNeverActive rule_act - = do { diagnosticDs (DsUselessSpecialiseForNoInlineFunction poly_id) + = do { diagnosticDs (DsUselessSpecialiseForNoInlineFunction poly_nm) ; return Nothing } -- Function is NOINLINE, and the specialisation inherits that -- See Note [Activation pragmas for SPECIALISE] --- | all is_nop_arg rule_args --- = do { diagnosticDs (DsUselessSpecialiseForNoInlineFunction poly_id) --- ; return Nothing } -- Specialisation does nothing + | all is_nop_arg rule_args + = do { diagnosticDs (DsUselessSpecialise poly_nm) + ; return Nothing } -- Specialisation does nothing | otherwise -- The RULE looks like @@ -1020,14 +1044,12 @@ finishSpecPrag poly_rhs rule_bndrs poly_id rule_args rule_act | no_act_spec = inl_prag_act -- Inherit | otherwise = spec_prag_act -- Specified by user -{- is_nop_arg (Type {}) = True is_nop_arg (Coercion {}) = True is_nop_arg (Cast e _) = is_nop_arg e is_nop_arg (Tick _ e) = is_nop_arg e is_nop_arg (Var x) = x `elem` spec_bndrs is_nop_arg _ = False --} specFunInlinePrag :: Id -> InlinePragma -> InlinePragma -> InlinePragma ===================================== compiler/GHC/HsToCore/Errors/Ppr.hs ===================================== @@ -89,6 +89,9 @@ instance Diagnostic DsMessage where DsUselessSpecialiseForNoInlineFunction poly_id -> mkSimpleDecorated $ text "Ignoring useless SPECIALISE pragma for NOINLINE function:" <+> quotes (ppr poly_id) + DsUselessSpecialise poly_id + -> mkSimpleDecorated $ + text "Ignoring useless SPECIALISE pragma for:" <+> quotes (ppr poly_id) DsOrphanRule rule -> mkSimpleDecorated $ text "Orphan rule:" <+> ppr rule DsRuleLhsTooComplicated orig_lhs lhs2 @@ -226,6 +229,7 @@ instance Diagnostic DsMessage where DsTopLevelBindsNotAllowed{} -> ErrorWithoutFlag DsUselessSpecialiseForClassMethodSelector{} -> WarningWithoutFlag DsUselessSpecialiseForNoInlineFunction{} -> WarningWithoutFlag + DsUselessSpecialise{} -> WarningWithoutFlag DsOrphanRule{} -> WarningWithFlag Opt_WarnOrphans DsRuleLhsTooComplicated{} -> WarningWithoutFlag DsRuleIgnoredDueToConstructor{} -> WarningWithoutFlag @@ -262,6 +266,7 @@ instance Diagnostic DsMessage where DsTopLevelBindsNotAllowed{} -> noHints DsUselessSpecialiseForClassMethodSelector{} -> noHints DsUselessSpecialiseForNoInlineFunction{} -> noHints + DsUselessSpecialise{} -> noHints DsOrphanRule{} -> noHints DsRuleLhsTooComplicated{} -> noHints DsRuleIgnoredDueToConstructor{} -> noHints ===================================== compiler/GHC/HsToCore/Errors/Types.hs ===================================== @@ -105,9 +105,11 @@ data DsMessage | DsTopLevelBindsNotAllowed !BindsType !(HsBindLR GhcTc GhcTc) - | DsUselessSpecialiseForClassMethodSelector !Id + | DsUselessSpecialiseForClassMethodSelector !Name - | DsUselessSpecialiseForNoInlineFunction !Id + | DsUselessSpecialiseForNoInlineFunction !Name + + | DsUselessSpecialise !Name | DsOrphanRule !CoreRule ===================================== compiler/GHC/Runtime/Eval.hs ===================================== @@ -122,12 +122,11 @@ import GHC.Unit.Module.ModIface import GHC.Unit.Module.ModSummary import GHC.Unit.Home.ModInfo -import GHC.Tc.Module ( runTcInteractive, tcRnType, loadUnqualIfaces ) +import GHC.Tc.Module ( runTcInteractive, tcRnTypeSkolemising, loadUnqualIfaces ) import GHC.Tc.Solver (simplifyWantedsTcM) import GHC.Tc.Utils.Env (tcGetInstEnvs, lookupGlobal) import GHC.Tc.Utils.Instantiate (instDFunType) import GHC.Tc.Utils.Monad -import GHC.Tc.Zonk.Env ( ZonkFlexi (SkolemiseFlexi) ) import GHC.Unit.Env import GHC.IfaceToCore @@ -136,7 +135,6 @@ import Control.Monad import Control.Monad.Catch as MC import Data.Array import Data.Dynamic -import Data.IORef( newIORef ) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.List (find,intercalate) @@ -1074,9 +1072,8 @@ parseInstanceHead str = withSession $ \hsc_env0 -> do (ty, _) <- liftIO $ runInteractiveHsc hsc_env0 $ do hsc_env <- getHscEnv ty <- hscParseType str - skol_tv_ref <- liftIO (newIORef []) ioMsgMaybe $ hoistTcRnMessage $ - tcRnType hsc_env (SkolemiseFlexi skol_tv_ref) True ty + tcRnTypeSkolemising hsc_env ty -- I'm not sure what to do about those zonked skolems return ty ===================================== compiler/GHC/Tc/Gen/Sig.hs ===================================== @@ -696,7 +696,7 @@ There are two major routes: {-# SPECIALISE f @Int 3 #-} - See Note [Handling new-form SPECIALISE pragmas] -Note [Handling new-form SPECIALISE pragmas] +Note [Handling new-form SPECIALISE pragmas]* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New-form SPECIALISE pragmas are described by GHC Proposal #493. @@ -974,10 +974,11 @@ tcSpecPrag poly_id (SpecSigE nm bndrs spec_e inl) , text "inl:" <+> ppr inl ] ; let lhs_call = mkLHsWrap (WpLet (TcEvBinds ev_binds_var)) spec_e' - ; return [SpecPragE { spe_poly_id = poly_id - , spe_bndrs = tv_bndrs ++ qevs ++ id_bndrs - , spe_call = lhs_call - , spe_inl = inl }] } + ; return [SpecPragE { spe_fn_nm = nm + , spe_fn_id = poly_id + , spe_bndrs = tv_bndrs ++ qevs ++ id_bndrs + , spe_call = lhs_call + , spe_inl = inl }] } tcSpecPrag _ prag = pprPanic "tcSpecPrag" (ppr prag) ===================================== compiler/GHC/Tc/Module.hs ===================================== @@ -16,7 +16,8 @@ -- -- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/type-checker module GHC.Tc.Module ( - tcRnStmt, tcRnExpr, TcRnExprMode(..), tcRnType, + tcRnStmt, tcRnExpr, TcRnExprMode(..), + tcRnType, tcRnTypeSkolemising, tcRnImportDecls, tcRnLookupRdrName, getModuleInterface, @@ -184,6 +185,7 @@ import qualified Data.Set as S import qualified Data.Map as M import Data.Foldable ( for_ ) import Data.Traversable ( for ) +import Data.IORef( newIORef ) @@ -2674,6 +2676,16 @@ tcRnImportDecls hsc_env import_decls where zap_rdr_env gbl_env = gbl_env { tcg_rdr_env = emptyGlobalRdrEnv } + +tcRnTypeSkolemising :: HscEnv + -> LHsType GhcPs + -> IO (Messages TcRnMessage, Maybe (Type, Kind)) +-- tcRnTypeSkolemising skolemisese any free unification variables, +-- and normalises the type +tcRnTypeSkolemising env ty + = do { skol_tv_ref <- liftIO (newIORef []) + ; tcRnType env (SkolemiseFlexi skol_tv_ref) True ty } + -- tcRnType just finds the kind of a type tcRnType :: HscEnv -> ZonkFlexi ===================================== compiler/GHC/Tc/Zonk/Type.hs ===================================== @@ -854,10 +854,9 @@ zonkLTcSpecPrags ps = do { co_fn' <- don'tBind $ zonkCoFn co_fn ; id' <- zonkIdOcc id ; return (L loc (SpecPrag id' co_fn' inl)) } - zonk_prag (L loc (SpecPragE { spe_poly_id = poly_id - , spe_bndrs = bndrs - , spe_call = spec_e - , spe_inl = inl })) + zonk_prag (L loc prag@(SpecPragE { spe_fn_id = poly_id + , spe_bndrs = bndrs + , spe_call = spec_e })) = do { poly_id' <- zonkIdOcc poly_id ; skol_tvs_ref <- lift $ newTcRef [] @@ -866,10 +865,9 @@ zonkLTcSpecPrags ps runZonkBndrT (zonkCoreBndrsX bndrs) $ \bndrs' -> do { spec_e' <- zonkLExpr spec_e ; skol_tvs <- lift $ readTcRef skol_tvs_ref - ; return (L loc (SpecPragE { spe_poly_id = poly_id' - , spe_bndrs = skol_tvs ++ bndrs' - , spe_call = spec_e' - , spe_inl = inl })) } } + ; return (L loc (prag { spe_fn_id = poly_id' + , spe_bndrs = skol_tvs ++ bndrs' + , spe_call = spec_e' })) } } {- ************************************************************************ ===================================== compiler/GHC/Types/Error/Codes.hs ===================================== @@ -149,6 +149,7 @@ type family GhcDiagnosticCode c = n | n -> c where GhcDiagnosticCode "DsTopLevelBindsNotAllowed" = 48099 GhcDiagnosticCode "DsUselessSpecialiseForClassMethodSelector" = 93315 GhcDiagnosticCode "DsUselessSpecialiseForNoInlineFunction" = 38524 + GhcDiagnosticCode "DsUselessSpecialise" = 66582 GhcDiagnosticCode "DsOrphanRule" = 58181 GhcDiagnosticCode "DsRuleLhsTooComplicated" = 69441 GhcDiagnosticCode "DsRuleIgnoredDueToConstructor" = 00828 ===================================== testsuite/tests/ghc-api/T18522-dbg-ppr.hs ===================================== @@ -45,8 +45,7 @@ main = do () |] let hs_t = fromRight (error "convertToHsType") $ convertToHsType (Generated OtherExpansion SkipPmc) noSrcSpan th_t - (messages, mres) <- - tcRnType hsc_env SkolemiseFlexi True hs_t + (messages, mres) <- tcRnTypeSkolemising hsc_env hs_t let (warnings, errors) = partitionMessages messages case mres of Nothing -> do ===================================== testsuite/tests/simplCore/should_compile/T8537.stderr ===================================== @@ -1,3 +1,4 @@ -T8537.hs:20:5: warning: [GHC-35827] - SPECIALISE pragma for non-overloaded function ‘fmap’ +T8537.hs:20:5: warning: [GHC-66582] + Ignoring useless SPECIALISE pragma for: ‘fmap’ + ===================================== testsuite/tests/typecheck/should_compile/T10504.stderr ===================================== @@ -1,3 +1,3 @@ -T10504.hs:5:1: warning: [GHC-35827] - SPECIALISE pragma for non-overloaded function ‘myfun’ +T10504.hs:5:1: warning: [GHC-66582] + Ignoring useless SPECIALISE pragma for: ‘myfun’ ===================================== testsuite/tests/warnings/should_compile/T19296.stderr ===================================== @@ -1,4 +1,3 @@ - T19296.hs:6:6: warning: [GHC-30606] [-Wredundant-constraints] Redundant constraint: Eq a In the type signature for: @@ -25,24 +24,11 @@ T19296.hs:13:6: warning: [GHC-30606] [-Wredundant-constraints] 13 | h :: (Eq a, Ord b) => a -> b -> b | ^^^^^^^^^^^^^ -T19296.hs:21:1: warning: [GHC-40548] - Forall'd constraint ‘Eq a’ is not bound in RULE lhs - Orig bndrs: [a, $dEq] - Orig lhs: let { - $dOrd :: Ord Int - [LclId] - $dOrd = GHC.Classes.$fOrdInt } in - spec @Int @a $dOrd - optimised lhs: spec @Int @a $dOrd - | -21 | {-# SPECIALISE spec :: Eq a => a -> Int -> Int #-} - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - T19296.hs:21:24: warning: [GHC-30606] [-Wredundant-constraints] • Redundant constraint: Eq a - In the type signature for: - spec :: forall a. Eq a => a -> Int -> Int - • In the pragma: {-# SPECIALISE spec :: Eq a => a -> Int -> Int #-} + In an expression type signature: + forall a. Eq a => a -> Int -> Int + • In the expression: spec :: Eq a => a -> Int -> Int | 21 | {-# SPECIALISE spec :: Eq a => a -> Int -> Int #-} | ^^^^ @@ -63,3 +49,4 @@ T19296.hs:39:12: warning: [GHC-30606] [-Wredundant-constraints] | 39 | bar :: (Eq b, Ord b) => Int -> b -> Int | ^^^^^^^^^^^^^ + View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ddcf5ef2fb5ff38ae7851675042a6fe24426c39 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4ddcf5ef2fb5ff38ae7851675042a6fe24426c39 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 30 23:02:52 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Sat, 30 Nov 2024 18:02:52 -0500 Subject: [Git][ghc/ghc][wip/T24359] 13 commits: ghc-experimental: expose GHC.RTS.Flags, GHC.Stats Message-ID: <674b999c44a7c_ee00ef93aa862494@gitlab.mail> Simon Peyton Jones pushed to branch wip/T24359 at Glasgow Haskell Compiler / GHC Commits: 53f978c0 by doyougnu at 2024-11-26T16:07:26-05:00 ghc-experimental: expose GHC.RTS.Flags, GHC.Stats See this CLC proposal: - https://github.com/haskell/core-libraries-committee/issues/289 and this CLC proposal for background: - https://github.com/haskell/core-libraries-committee/issues/288 Metric Decrease: MultiLayerModulesTH_OneShot - - - - - e70d4140 by Wang Xin at 2024-11-26T16:08:10-05:00 Add -mcmodel=medium moduleflag to generated LLVM IR on LoongArch platform With the Medium code model, the jump range of the generated jump instruction is larger than that of the Small code model. It's a temporary fix of the problem descriped in https://gitlab.haskell .org/ghc/ghc/-/issues/25495. This commit requires that the LLVM used contains the code of commit 9dd1d451d9719aa91b3bdd59c0c6679 83e1baf05, i.e., version 8.0 and later. Actually we should not rely on LLVM, so the only way to solve this problem is to implement the LoongArch backend. Add new type for codemodel - - - - - df42ba16 by Andreas Klebinger at 2024-11-27T11:40:49-05:00 Cmm constant folding: Narrow results to operations bitwidth. When constant folding ensure the result is still within bounds for the given type by explicitly narrowing the results. Not doing so results in a lot of spurious assembler warnings especially when testing primops. - - - - - bf3db97e by Ben Gamari at 2024-11-27T11:41:26-05:00 ghc-toolchain: Introduce basic flag validation We verify that required flags (currently `--output` and `--triple`) are provided. The implementation is truly awful, but so is getopt. Begins to address #25500. - - - - - a104508d by Ben Gamari at 2024-11-27T11:42:03-05:00 rts: Allow ExecPage to allocate anywhere in address space Currently the ExecPage facility has two users: * GHCi, for constructing info tables, and * the adjustor allocation path Despite neither of these have any spatial locality constraints ExecPage was using the linker's `mmapAnonForLinker`, which tries hard to ensure that mappings end up nearby the executable image. This makes adjustor allocation needlessly subject to fragmentation concerns. We now instead return less constrained mappings, improving the robustness of the mechanism. Addresses #25503. - - - - - c3fc9b86 by Ben Gamari at 2024-11-27T11:42:39-05:00 base: Fix incorrect mentions of GHC.Internal.Numeric These were incorrectly changed by the automated refactoring of the `ghc-internal` migration. Fixes #25521. - - - - - a362b943 by sheaf at 2024-11-27T23:44:28-05:00 Add checkExact to toolTargets This change means that the Hadrian multi target will include exactprint. In particular, this means that HLS will work on exactprint inside the GHC tree. - - - - - e6c957e4 by Arnaud Spiwack at 2024-11-27T23:45:09-05:00 Add test for #25428 - - - - - 52d97f4e by Arnaud Spiwack at 2024-11-27T23:45:09-05:00 Don't bypass MonoLocalBind in empty patterns Fixes #25428 - - - - - 7890f2d8 by Ben Gamari at 2024-11-28T10:26:46-05:00 hadrian: Bump directory bound to >=1.3.9 Earlier versions of `directory` are racy on Windows due to #24382. Also includes necessary Hadrian bootstrap plan bump. Fixes #24382. - - - - - 0fd43ea6 by Adam Sandberg Ericsson at 2024-11-28T10:27:22-05:00 mention -Iw in +RTS -? - - - - - 6cf579b9 by Ben Gamari at 2024-11-28T10:27:59-05:00 gitlab-ci: Set GIT_SUBMODULE_FORCE_HTTPS GitLab recommends using `https://` to clone submodules and provides the `GIT_SUBMODULE_FORCE_HTTPS` variable to force this. Fixes #25528. - - - - - 15ef6212 by Simon Peyton Jones at 2024-11-30T23:02:42+00:00 Specialising expresions -- at last This MR addresses #24359, which implements the GHC proposal 493 on SPECIALISE pragmas. * The old code path (using SpecSig and SpecPrag) still exists. * The new code path (using SpecSigE and SpecPragE) runs alongside it. * All SPECIALISE pragmas are routed through the new code path, except if you give multiple type sigs, when the old code path is still used. * Main documentation: Note [Handling new-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig` The Big Thing is to introduce {-# SPECIALISE forall x. f @Int x True #-} where you can give type arguments and value argument to specialise; and you can quantify them with forall, just as in Rules. I thought it was going to be pretty simple, but it was a Long, Long Saga. Highlights * Overview Note [Handling new-form SPECIALISE pragmas] in GHC.Tc.Gen.Sig - New data constructor `SpecSigE` in data type `L.H.S.Binds.Sig` - New data construtor `SpecPragE` in data type `GHC.Hs.Binds.TcSpecPrag` - Renamer: uses `checkSpecESigShape` to decide which function to assocate the SPECIALISE pragma with - Some of the action is in `GHC.Tc.Gen.Sig.tcSpecPrag` - The rest is in `GHC.HsToCore.Binds.dsSpec` * All of GHC.Tc.Gen.Rule is moved into GHC.Tc.Gen.Sig, because the code is very closely related. * The forall'd binders for SPECIALISE are the same as those for a RULE, so I refactored, introducing data type `L.H.S.Binds.RuleBndrs`, with functions to rename, zonk, typecheck it. This is not quite settled yet, I think. * On the LHS of RULES, or SPECIALISE, we want to disable the tricky mechanims described in Note [Desugaring non-canonical evidence] in GHC.HsToCore.Expr. Previously it wasn't fully disabled (just set to the empty set), and that didn't quite work in the new regime. * There are knock-on changes to Template Haskell. * For the LHS of a RULE and a SPECIALISE expression, I wanted to simplify it /without/ inlining the let-bindings for evidence variables. I added a flag `so_inline` to the SimpleOpt optimiser to support this. The entry point is `GHC.Core.SimpleOpt.simpleOptExprNoInline` * Since forever we have had a hack for type variables on the LHS of RULES. I took the opportunity to tidy this up. The main action is in the zonker. See GHC.Tc.Zonk.Type Note [Free tyvars on rule LHS], and especially data construtor `SkolemiseFlexi` in data type `GHC.Tc.Zonk.Env.ZonkFlexi` * Move `scopedSort` from GHC.Core.TyCo.FVs to GHC.Core.Predicate Reason: it now works for Ids as well, and I wanted to use isEvVar, which is defined in GHC.Core.Predicate Avoiding module loops meant that instead of exporting GHC.Core.TyCo.Tidy from GHC.Core.Type, modules now import the former directly. I also took the opportunity to remove unused exports from GHC.Core.Type.hs-boot - - - - - 30 changed files: - .gitlab-ci.yml - .gitlab/ci.sh - compiler/GHC/Builtin/Names.hs - compiler/GHC/Builtin/Names/TH.hs - compiler/GHC/Builtin/PrimOps/Ids.hs - compiler/GHC/Cmm/Opt.hs - compiler/GHC/CmmToLlvm.hs - compiler/GHC/Core/FamInstEnv.hs - compiler/GHC/Core/InstEnv.hs - compiler/GHC/Core/Make.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Utils.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Predicate.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/Tidy.hs - compiler/GHC/Core/TyCo/FVs.hs - compiler/GHC/Core/TyCo/Ppr.hs - compiler/GHC/Core/TyCo/Tidy.hs - compiler/GHC/Core/Type.hs - compiler/GHC/Core/Type.hs-boot - compiler/GHC/Core/Unify.hs - compiler/GHC/CoreToIface.hs - compiler/GHC/Driver/Config.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Hs/Binds.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Hs/Stats.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4ddcf5ef2fb5ff38ae7851675042a6fe24426c39...15ef6212f4ca218ccc10a5886ab2ef8a3aa8571c -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4ddcf5ef2fb5ff38ae7851675042a6fe24426c39...15ef6212f4ca218ccc10a5886ab2ef8a3aa8571c You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitlab at gitlab.haskell.org Sat Nov 30 23:43:32 2024 From: gitlab at gitlab.haskell.org (Simon Peyton Jones (@simonpj)) Date: Sat, 30 Nov 2024 18:43:32 -0500 Subject: [Git][ghc/ghc][wip/T25445b] Wibbles Message-ID: <674ba324a52e3_37cfffddc0c651d9@gitlab.mail> Simon Peyton Jones pushed to branch wip/T25445b at Glasgow Haskell Compiler / GHC Commits: ad2315ee by Simon Peyton Jones at 2024-11-30T23:43:02+00:00 Wibbles - - - - - 3 changed files: - compiler/GHC/Core/Lint.hs - compiler/GHC/Iface/Type.hs - testsuite/tests/perf/compiler/genT14766.py Changes: ===================================== compiler/GHC/Core/Lint.hs ===================================== @@ -2101,13 +2101,14 @@ lint_tyco_app msg fun_kind arg_tys ; return () } ---------------- -lint_app2 :: Outputable a => SDoc +lint_app2 :: forall a acc. Outputable a => + SDoc -> (a -> LintM OutType) -- Lint the thing and return its value -> (a -> Mult -> acc -> LintM (OutKind, acc)) -- Lint the thing and return its type -> OutType -> acc -> [a] -> LintM (OutType,acc) {-# INLINE lint_app2 #-} -- Very few call sites -- 'acc' is either () for types, or UsageEnv for terms -lint_app2 msg lint_val lint_ty !orig_fun_ty acc all_args +lint_app2 msg lint_forall_arg lint_arrow_arg !orig_fun_ty acc all_args = do { !in_scope <- getInScope -- We need the in_scope set to satisfy the invariant in -- Note [The substitution invariant] in GHC.Core.TyCo.Subst @@ -2115,10 +2116,12 @@ lint_app2 msg lint_val lint_ty !orig_fun_ty acc all_args ; let init_subst = mkEmptySubst in_scope + go :: Subst -> OutType -> acc -> [a] -> LintM (OutType, acc) + -- The Subst applies (only) to the fun_ty go subst fun_ty acc [] = return (substTy subst fun_ty, acc) go subst fun_ty@(FunTy _ mult exp_arg_ty res_ty) acc (arg:args) - = do { (arg_ty, acc') <- lint_ty arg mult acc + = do { (arg_ty, acc') <- lint_arrow_arg arg (substTy subst mult) acc ; ensureEqTys (substTy subst exp_arg_ty) arg_ty $ lint_app_fail_msg msg orig_fun_ty all_args (hang (text "Fun:" <+> ppr fun_ty) @@ -2127,7 +2130,7 @@ lint_app2 msg lint_val lint_ty !orig_fun_ty acc all_args ; go subst res_ty acc' args } go subst (ForAllTy (Bndr tv _vis) body_ty) acc (arg:args) - = do { arg' <- lint_val arg + = do { arg' <- lint_forall_arg arg ; let tv_kind = substTy subst (varType tv) karg' = typeKind arg' subst' = extendTCvSubst subst tv arg' @@ -3417,7 +3420,7 @@ addInScopeTyCoVar tcv tcv_type thing_inside | isEmptyTCvSubst subst -- No change in kind , not (tcv `elemInScopeSet` in_scope) -- No change in unique = -- Do not extend the substitution, just the in-scope set - (if (varType tcv `eqType` tcv_type) then (\x->x) else + (if (varType tcv `eqType` tcv_type) then (\x->x) else pprTrace "addInScopeTyCoVar" ( vcat [ text "tcv" <+> ppr tcv <+> dcolon <+> ppr (varType tcv) , text "tcv_type" <+> ppr tcv_type ])) $ ===================================== compiler/GHC/Iface/Type.hs ===================================== @@ -1980,7 +1980,7 @@ ppr_co ctxt_prec (IfaceFunCo r co_mult co1 co2) mb_conc _ = Nothing ppr_co _ (IfaceTyConAppCo r tc cos) - = parens (text "tcapp" <+> pprIfaceCoTcApp topPrec tc cos) <> ppr_role r + = parens (pprIfaceCoTcApp topPrec tc cos) <> ppr_role r ppr_co ctxt_prec (IfaceAppCo co1 co2) = maybeParen ctxt_prec appPrec $ ppr_co funPrec co1 <+> pprParendIfaceCoercion co2 ===================================== testsuite/tests/perf/compiler/genT14766.py ===================================== @@ -1,12 +1,8 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# N_VARS = 100 -# N_BINDS = 50 - -N_VARS = 600 -# N_VARS = 10 -N_BINDS = 1 +N_VARS = 100 +N_BINDS = 50 tyvars = ' '.join('v{i}'.format(i=i) for i in range(N_VARS)) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ad2315ee4b36092299b64872d2fcd8c541e71c02 -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ad2315ee4b36092299b64872d2fcd8c541e71c02 You're receiving this email because of your account on gitlab.haskell.org. -------------- next part -------------- An HTML attachment was scrubbed... URL: